summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-10-19 15:37:26 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-10-19 15:37:26 +0300
commit6c6e567eb34ad0f5a3bd90f6585c521543106401 (patch)
tree7f8dc62f12dd2b720ffdc738d393cd1a8f82921c
parent7421ae696c1ef2fb48adc73ba8564ef2f276d618 (diff)
parent218d404f34d79a8837f9c0230dd9d9f1180b4068 (diff)
downloadlibxml2-pristine-tar.tar.gz
Merge branch 'pristine-tar' of git://anonscm.debian.org/debian-xml-sgml/libxml2 into pristine-tarpristine-tar
-rw-r--r--AUTHORS5
-rw-r--r--COPYING23
-rw-r--r--ChangeLog19678
-rw-r--r--Copyright23
-rw-r--r--DOCBparser.c305
-rw-r--r--HTMLparser.c7087
-rw-r--r--HTMLtree.c1280
-rw-r--r--INSTALL370
-rw-r--r--Makefile.am1279
-rw-r--r--Makefile.in2917
-rw-r--r--Makefile.tests41
-rw-r--r--NEWS2642
-rw-r--r--README39
-rw-r--r--README.tests39
-rw-r--r--SAX.c180
-rw-r--r--SAX2.c3045
-rw-r--r--TODO278
-rw-r--r--TODO_SCHEMAS31
-rw-r--r--VxWorks/Makefile68
-rw-r--r--VxWorks/README86
-rw-r--r--VxWorks/build.sh85
-rw-r--r--acinclude.m428
-rw-r--r--aclocal.m41245
-rw-r--r--bakefile/Bakefiles.bkgen15
-rw-r--r--bakefile/Readme.txt92
-rw-r--r--bakefile/libxml2.bkl749
-rw-r--r--buf.c1304
-rw-r--r--buf.h72
-rw-r--r--c14n.c2238
-rw-r--r--catalog.c3825
-rwxr-xr-xcheck-relaxng-test-suite.py394
-rwxr-xr-xcheck-relaxng-test-suite2.py418
-rwxr-xr-xcheck-xinclude-test-suite.py221
-rwxr-xr-xcheck-xml-test-suite.py409
-rwxr-xr-xcheck-xsddata-test-suite.py420
-rw-r--r--chvalid.c336
-rwxr-xr-xconfig.guess1558
-rw-r--r--config.h.in333
-rwxr-xr-xconfig.sub1788
-rwxr-xr-xconfigure18091
-rw-r--r--configure.ac1664
-rwxr-xr-xdbgen.pl43
-rwxr-xr-xdbgenattr.pl42
-rw-r--r--debian/README.Debian12
-rw-r--r--debian/changelog1725
-rw-r--r--debian/compat1
-rw-r--r--debian/control148
-rw-r--r--debian/control.udeb16
-rw-r--r--debian/copyright104
-rw-r--r--debian/libxml2-dbg.preinst11
-rw-r--r--debian/libxml2-dev.install7
-rw-r--r--debian/libxml2-dev.manpages2
-rw-r--r--debian/libxml2-dev.preinst11
-rw-r--r--debian/libxml2-doc.doc-base10
-rw-r--r--debian/libxml2-doc.install2
-rw-r--r--debian/libxml2-udeb.install1
-rw-r--r--debian/libxml2-utils.install2
-rw-r--r--debian/libxml2-utils.manpages2
-rw-r--r--debian/libxml2-utils.preinst11
-rw-r--r--debian/libxml2.install1
-rw-r--r--debian/libxml2.lintian-overrides1
-rw-r--r--debian/libxml2.symbols171
-rw-r--r--debian/patches/0001-modify-xml2-config-and-pkgconfig-behaviour.patch95
-rw-r--r--debian/patches/0002-fix-python-multiarch-includes.patch35
-rw-r--r--debian/patches/series2
-rw-r--r--debian/python-libxml2-dbg.install1
-rw-r--r--debian/python-libxml2-dbg.lintian-overrides1
-rw-r--r--debian/python-libxml2-dbg.preinst11
-rw-r--r--debian/python-libxml2.examples2
-rw-r--r--debian/python-libxml2.install2
-rwxr-xr-xdebian/rules149
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/build41
-rw-r--r--debian/tests/control2
-rw-r--r--debian/tests/python22
-rw-r--r--debian/watch3
-rw-r--r--debugXML.c3428
-rwxr-xr-xdepcomp791
-rw-r--r--dict.c1259
-rw-r--r--doc/APIchunk0.html301
-rw-r--r--doc/APIchunk1.html382
-rw-r--r--doc/APIchunk10.html675
-rw-r--r--doc/APIchunk11.html339
-rw-r--r--doc/APIchunk12.html927
-rw-r--r--doc/APIchunk13.html681
-rw-r--r--doc/APIchunk14.html470
-rw-r--r--doc/APIchunk15.html454
-rw-r--r--doc/APIchunk16.html375
-rw-r--r--doc/APIchunk17.html580
-rw-r--r--doc/APIchunk18.html457
-rw-r--r--doc/APIchunk19.html373
-rw-r--r--doc/APIchunk2.html416
-rw-r--r--doc/APIchunk20.html330
-rw-r--r--doc/APIchunk21.html399
-rw-r--r--doc/APIchunk22.html599
-rw-r--r--doc/APIchunk23.html668
-rw-r--r--doc/APIchunk24.html1001
-rw-r--r--doc/APIchunk25.html451
-rw-r--r--doc/APIchunk26.html332
-rw-r--r--doc/APIchunk27.html349
-rw-r--r--doc/APIchunk28.html565
-rw-r--r--doc/APIchunk29.html131
-rw-r--r--doc/APIchunk3.html360
-rw-r--r--doc/APIchunk4.html351
-rw-r--r--doc/APIchunk5.html293
-rw-r--r--doc/APIchunk6.html294
-rw-r--r--doc/APIchunk7.html330
-rw-r--r--doc/APIchunk8.html307
-rw-r--r--doc/APIchunk9.html273
-rw-r--r--doc/APIconstructors.html595
-rw-r--r--doc/APIfiles.html3590
-rw-r--r--doc/APIfunctions.html2347
-rw-r--r--doc/APIsymbols.html3586
-rw-r--r--doc/ChangeLog.xsl117
-rw-r--r--doc/DOM.gifbin0 -> 3166 bytes
-rw-r--r--doc/DOM.html17
-rw-r--r--doc/FAQ.html299
-rw-r--r--doc/Libxml2-Logo-180x168.gifbin0 -> 8195 bytes
-rw-r--r--doc/Libxml2-Logo-90x34.gifbin0 -> 3070 bytes
-rw-r--r--doc/Makefile.am351
-rw-r--r--doc/Makefile.in1144
-rw-r--r--doc/README.docs24
-rw-r--r--doc/XMLinfo.html35
-rw-r--r--doc/XSLT.html13
-rw-r--r--doc/api.xsl394
-rwxr-xr-xdoc/apibuild.py2151
-rw-r--r--doc/architecture.html24
-rw-r--r--doc/bugs.html70
-rw-r--r--doc/catalog.gifbin0 -> 6105 bytes
-rw-r--r--doc/catalog.html261
-rw-r--r--doc/checkapisym.xsl48
-rw-r--r--doc/contribs.html41
-rw-r--r--doc/devhelp/Makefile.am79
-rw-r--r--doc/devhelp/Makefile.in668
-rw-r--r--doc/devhelp/devhelp.xsl127
-rw-r--r--doc/devhelp/general.html38
-rw-r--r--doc/devhelp/home.pngbin0 -> 654 bytes
-rw-r--r--doc/devhelp/html.xsl602
-rw-r--r--doc/devhelp/index.html67
-rw-r--r--doc/devhelp/left.pngbin0 -> 459 bytes
-rw-r--r--doc/devhelp/libxml2-DOCBparser.html138
-rw-r--r--doc/devhelp/libxml2-HTMLparser.html373
-rw-r--r--doc/devhelp/libxml2-HTMLtree.html172
-rw-r--r--doc/devhelp/libxml2-SAX.html243
-rw-r--r--doc/devhelp/libxml2-SAX2.html247
-rw-r--r--doc/devhelp/libxml2-c14n.html91
-rw-r--r--doc/devhelp/libxml2-catalog.html278
-rw-r--r--doc/devhelp/libxml2-chvalid.html241
-rw-r--r--doc/devhelp/libxml2-debugXML.html225
-rw-r--r--doc/devhelp/libxml2-dict.html134
-rw-r--r--doc/devhelp/libxml2-encoding.html218
-rw-r--r--doc/devhelp/libxml2-entities.html166
-rw-r--r--doc/devhelp/libxml2-globals.html383
-rw-r--r--doc/devhelp/libxml2-hash.html214
-rw-r--r--doc/devhelp/libxml2-list.html226
-rw-r--r--doc/devhelp/libxml2-nanoftp.html187
-rw-r--r--doc/devhelp/libxml2-nanohttp.html142
-rw-r--r--doc/devhelp/libxml2-parser.html766
-rw-r--r--doc/devhelp/libxml2-parserInternals.html688
-rw-r--r--doc/devhelp/libxml2-pattern.html166
-rw-r--r--doc/devhelp/libxml2-relaxng.html278
-rw-r--r--doc/devhelp/libxml2-schemasInternals.html860
-rw-r--r--doc/devhelp/libxml2-schematron.html166
-rw-r--r--doc/devhelp/libxml2-threads.html161
-rw-r--r--doc/devhelp/libxml2-tree.html1597
-rw-r--r--doc/devhelp/libxml2-uri.html154
-rw-r--r--doc/devhelp/libxml2-valid.html528
-rw-r--r--doc/devhelp/libxml2-xinclude.html169
-rw-r--r--doc/devhelp/libxml2-xlink.html160
-rw-r--r--doc/devhelp/libxml2-xmlIO.html347
-rw-r--r--doc/devhelp/libxml2-xmlautomata.html176
-rw-r--r--doc/devhelp/libxml2-xmlerror.html953
-rw-r--r--doc/devhelp/libxml2-xmlexports.html87
-rw-r--r--doc/devhelp/libxml2-xmlmemory.html186
-rw-r--r--doc/devhelp/libxml2-xmlmodule.html97
-rw-r--r--doc/devhelp/libxml2-xmlreader.html565
-rw-r--r--doc/devhelp/libxml2-xmlregexp.html280
-rw-r--r--doc/devhelp/libxml2-xmlsave.html133
-rw-r--r--doc/devhelp/libxml2-xmlschemas.html314
-rw-r--r--doc/devhelp/libxml2-xmlschemastypes.html237
-rw-r--r--doc/devhelp/libxml2-xmlstring.html217
-rw-r--r--doc/devhelp/libxml2-xmlunicode.html887
-rw-r--r--doc/devhelp/libxml2-xmlversion.html292
-rw-r--r--doc/devhelp/libxml2-xmlwriter.html479
-rw-r--r--doc/devhelp/libxml2-xpath.html542
-rw-r--r--doc/devhelp/libxml2-xpathInternals.html787
-rw-r--r--doc/devhelp/libxml2-xpointer.html171
-rw-r--r--doc/devhelp/libxml2.devhelp3573
-rw-r--r--doc/devhelp/right.pngbin0 -> 472 bytes
-rw-r--r--doc/devhelp/style.css66
-rw-r--r--doc/devhelp/up.pngbin0 -> 406 bytes
-rw-r--r--doc/docs.html34
-rw-r--r--doc/downloads.html40
-rw-r--r--doc/elfgcchack.xsl160
-rw-r--r--doc/encoding.html217
-rw-r--r--doc/entities.html64
-rw-r--r--doc/example.html187
-rw-r--r--doc/examples/Makefile.am135
-rw-r--r--doc/examples/Makefile.in964
-rw-r--r--doc/examples/examples.xml751
-rw-r--r--doc/examples/examples.xsl174
-rw-r--r--doc/examples/index.html14
-rwxr-xr-xdoc/examples/index.py314
-rw-r--r--doc/examples/io1.c166
-rw-r--r--doc/examples/io1.res5
-rw-r--r--doc/examples/io2.c58
-rw-r--r--doc/examples/io2.res2
-rw-r--r--doc/examples/parse1.c56
-rw-r--r--doc/examples/parse2.c72
-rw-r--r--doc/examples/parse3.c60
-rw-r--r--doc/examples/parse4.c143
-rw-r--r--doc/examples/reader1.c107
-rw-r--r--doc/examples/reader1.res14
-rw-r--r--doc/examples/reader2.c122
-rw-r--r--doc/examples/reader3.c120
-rw-r--r--doc/examples/reader3.res13
-rw-r--r--doc/examples/reader4.c122
-rw-r--r--doc/examples/reader4.res3
-rw-r--r--doc/examples/test1.xml1
-rw-r--r--doc/examples/test2.xml13
-rw-r--r--doc/examples/test3.xml39
-rw-r--r--doc/examples/testWriter.c1198
-rw-r--r--doc/examples/tree1.c94
-rw-r--r--doc/examples/tree1.res4
-rw-r--r--doc/examples/tree2.c118
-rw-r--r--doc/examples/tree2.res18
-rw-r--r--doc/examples/tst.xml7
-rw-r--r--doc/examples/writer.xml2
-rw-r--r--doc/examples/xpath1.c250
-rw-r--r--doc/examples/xpath1.res5
-rw-r--r--doc/examples/xpath2.c190
-rw-r--r--doc/examples/xpath2.res30
-rw-r--r--doc/guidelines.html374
-rw-r--r--doc/help.html26
-rw-r--r--doc/html/book1.html13
-rw-r--r--doc/html/home.pngbin0 -> 654 bytes
-rw-r--r--doc/html/index.html13
-rw-r--r--doc/html/left.pngbin0 -> 459 bytes
-rw-r--r--doc/html/libxml-DOCBparser.html51
-rw-r--r--doc/html/libxml-HTMLparser.html184
-rw-r--r--doc/html/libxml-HTMLtree.html73
-rw-r--r--doc/html/libxml-SAX.html125
-rw-r--r--doc/html/libxml-SAX2.html128
-rw-r--r--doc/html/libxml-c14n.html38
-rw-r--r--doc/html/libxml-catalog.html142
-rw-r--r--doc/html/libxml-chvalid.html72
-rw-r--r--doc/html/libxml-debugXML.html120
-rw-r--r--doc/html/libxml-dict.html58
-rw-r--r--doc/html/libxml-encoding.html124
-rw-r--r--doc/html/libxml-entities.html79
-rw-r--r--doc/html/libxml-globals.html152
-rw-r--r--doc/html/libxml-hash.html116
-rw-r--r--doc/html/libxml-lib.html13
-rw-r--r--doc/html/libxml-list.html120
-rw-r--r--doc/html/libxml-nanoftp.html94
-rw-r--r--doc/html/libxml-nanohttp.html65
-rw-r--r--doc/html/libxml-parser.html559
-rw-r--r--doc/html/libxml-parserInternals.html322
-rw-r--r--doc/html/libxml-pattern.html76
-rw-r--r--doc/html/libxml-relaxng.html162
-rw-r--r--doc/html/libxml-schemasInternals.html373
-rw-r--r--doc/html/libxml-schematron.html81
-rw-r--r--doc/html/libxml-threads.html72
-rw-r--r--doc/html/libxml-tree.html990
-rw-r--r--doc/html/libxml-uri.html73
-rw-r--r--doc/html/libxml-valid.html289
-rw-r--r--doc/html/libxml-xinclude.html59
-rw-r--r--doc/html/libxml-xlink.html82
-rw-r--r--doc/html/libxml-xmlIO.html212
-rw-r--r--doc/html/libxml-xmlautomata.html85
-rw-r--r--doc/html/libxml-xmlerror.html865
-rw-r--r--doc/html/libxml-xmlexports.html20
-rw-r--r--doc/html/libxml-xmlmemory.html107
-rw-r--r--doc/html/libxml-xmlmodule.html38
-rw-r--r--doc/html/libxml-xmlreader.html330
-rw-r--r--doc/html/libxml-xmlregexp.html143
-rw-r--r--doc/html/libxml-xmlsave.html60
-rw-r--r--doc/html/libxml-xmlschemas.html185
-rw-r--r--doc/html/libxml-xmlschemastypes.html123
-rw-r--r--doc/html/libxml-xmlstring.html108
-rw-r--r--doc/html/libxml-xmlunicode.html512
-rw-r--r--doc/html/libxml-xmlversion.html63
-rw-r--r--doc/html/libxml-xmlwriter.html261
-rw-r--r--doc/html/libxml-xpath.html316
-rw-r--r--doc/html/libxml-xpathInternals.html394
-rw-r--r--doc/html/libxml-xpointer.html83
-rw-r--r--doc/html/libxml-xzlib.html16
-rw-r--r--doc/html/right.pngbin0 -> 472 bytes
-rw-r--r--doc/html/up.pngbin0 -> 406 bytes
-rw-r--r--doc/index.html77
-rwxr-xr-xdoc/index.py1258
-rw-r--r--doc/interface.html59
-rw-r--r--doc/intro.html32
-rw-r--r--doc/library.html158
-rw-r--r--doc/libxml.gifbin0 -> 7692 bytes
-rw-r--r--doc/libxml2-api.xml18508
-rw-r--r--doc/libxml2.xsa104
-rw-r--r--doc/namespaces.html50
-rw-r--r--doc/newapi.xsl766
-rw-r--r--doc/news.html2368
-rw-r--r--doc/news.xsl44
-rw-r--r--doc/python.html254
-rw-r--r--doc/redhat.gifbin0 -> 697 bytes
-rw-r--r--doc/search.php476
-rw-r--r--doc/searches.html61
-rw-r--r--doc/searches.xsl97
-rw-r--r--doc/site.xsl741
-rw-r--r--doc/smallfootonly.gifbin0 -> 2772 bytes
-rw-r--r--doc/structure.gifbin0 -> 5559 bytes
-rw-r--r--doc/symbols.xml1768
-rw-r--r--doc/syms.xsl99
-rw-r--r--doc/threads.html30
-rw-r--r--doc/tree.html53
-rw-r--r--doc/tutorial/apa.html8
-rw-r--r--doc/tutorial/apb.html14
-rw-r--r--doc/tutorial/apc.html82
-rw-r--r--doc/tutorial/apd.html76
-rw-r--r--doc/tutorial/ape.html78
-rw-r--r--doc/tutorial/apf.html67
-rw-r--r--doc/tutorial/apg.html75
-rw-r--r--doc/tutorial/aph.html76
-rw-r--r--doc/tutorial/api.html4
-rw-r--r--doc/tutorial/ar01s02.html14
-rw-r--r--doc/tutorial/ar01s03.html47
-rw-r--r--doc/tutorial/ar01s04.html54
-rw-r--r--doc/tutorial/ar01s05.html55
-rw-r--r--doc/tutorial/ar01s06.html35
-rw-r--r--doc/tutorial/ar01s07.html30
-rw-r--r--doc/tutorial/ar01s08.html38
-rw-r--r--doc/tutorial/ar01s09.html63
-rw-r--r--doc/tutorial/images/blank.pngbin0 -> 374 bytes
-rw-r--r--doc/tutorial/images/callouts/1.pngbin0 -> 329 bytes
-rw-r--r--doc/tutorial/images/callouts/10.pngbin0 -> 361 bytes
-rw-r--r--doc/tutorial/images/callouts/2.pngbin0 -> 353 bytes
-rw-r--r--doc/tutorial/images/callouts/3.pngbin0 -> 350 bytes
-rw-r--r--doc/tutorial/images/callouts/4.pngbin0 -> 345 bytes
-rw-r--r--doc/tutorial/images/callouts/5.pngbin0 -> 348 bytes
-rw-r--r--doc/tutorial/images/callouts/6.pngbin0 -> 355 bytes
-rw-r--r--doc/tutorial/images/callouts/7.pngbin0 -> 344 bytes
-rw-r--r--doc/tutorial/images/callouts/8.pngbin0 -> 357 bytes
-rw-r--r--doc/tutorial/images/callouts/9.pngbin0 -> 357 bytes
-rw-r--r--doc/tutorial/images/caution.pngbin0 -> 1250 bytes
-rw-r--r--doc/tutorial/images/draft.pngbin0 -> 17454 bytes
-rw-r--r--doc/tutorial/images/home.pngbin0 -> 1156 bytes
-rw-r--r--doc/tutorial/images/important.pngbin0 -> 722 bytes
-rw-r--r--doc/tutorial/images/next.pngbin0 -> 1150 bytes
-rw-r--r--doc/tutorial/images/note.pngbin0 -> 490 bytes
-rw-r--r--doc/tutorial/images/prev.pngbin0 -> 1132 bytes
-rw-r--r--doc/tutorial/images/tip.pngbin0 -> 449 bytes
-rw-r--r--doc/tutorial/images/toc-blank.pngbin0 -> 318 bytes
-rw-r--r--doc/tutorial/images/toc-minus.pngbin0 -> 259 bytes
-rw-r--r--doc/tutorial/images/toc-plus.pngbin0 -> 264 bytes
-rw-r--r--doc/tutorial/images/up.pngbin0 -> 1111 bytes
-rw-r--r--doc/tutorial/images/warning.pngbin0 -> 1241 bytes
-rw-r--r--doc/tutorial/includeaddattribute.c64
-rw-r--r--doc/tutorial/includeaddkeyword.c75
-rw-r--r--doc/tutorial/includeconvert.c73
-rw-r--r--doc/tutorial/includegetattribute.c72
-rw-r--r--doc/tutorial/includekeyword.c79
-rw-r--r--doc/tutorial/includexpath.c74
-rw-r--r--doc/tutorial/index.html14
-rw-r--r--doc/tutorial/ix01.html1
-rw-r--r--doc/tutorial/xmltutorial.pdf1336
-rw-r--r--doc/upgrade.html112
-rw-r--r--doc/w3c.pngbin0 -> 2028 bytes
-rw-r--r--doc/wiki.xsl589
-rw-r--r--doc/xml.html5995
-rw-r--r--doc/xmlcatalog.1340
-rw-r--r--doc/xmlcatalog_man.html101
-rw-r--r--doc/xmlcatalog_man.xml450
-rw-r--r--doc/xmldtd.html107
-rw-r--r--doc/xmlio.html141
-rw-r--r--doc/xmllint.1647
-rw-r--r--doc/xmllint.html175
-rw-r--r--doc/xmllint.xml930
-rw-r--r--doc/xmlmem.html122
-rw-r--r--doc/xmlreader.html475
-rw-r--r--doc/xsa.xsl54
-rw-r--r--elfgcchack.h17808
-rw-r--r--enc.h32
-rw-r--r--encoding.c4085
-rw-r--r--entities.c1105
-rw-r--r--error.c996
-rw-r--r--example/Makefile.am7
-rw-r--r--example/Makefile.in692
-rw-r--r--example/gjobread.c309
-rw-r--r--example/gjobs.xml57
-rwxr-xr-xgenUnicode.py478
-rwxr-xr-xgentest.py963
-rw-r--r--globals.c1114
-rw-r--r--hash.c1124
-rw-r--r--include/Makefile.am5
-rw-r--r--include/Makefile.in718
-rw-r--r--include/libxml/DOCBparser.h96
-rw-r--r--include/libxml/HTMLparser.h306
-rw-r--r--include/libxml/HTMLtree.h147
-rw-r--r--include/libxml/Makefile.am54
-rw-r--r--include/libxml/Makefile.in709
-rw-r--r--include/libxml/SAX.h173
-rw-r--r--include/libxml/SAX2.h178
-rw-r--r--include/libxml/c14n.h126
-rw-r--r--include/libxml/catalog.h182
-rw-r--r--include/libxml/chvalid.h230
-rw-r--r--include/libxml/debugXML.h217
-rw-r--r--include/libxml/dict.h80
-rw-r--r--include/libxml/encoding.h240
-rw-r--r--include/libxml/entities.h151
-rw-r--r--include/libxml/globals.h509
-rw-r--r--include/libxml/hash.h233
-rw-r--r--include/libxml/list.h137
-rw-r--r--include/libxml/nanoftp.h163
-rw-r--r--include/libxml/nanohttp.h81
-rw-r--r--include/libxml/parser.h1241
-rw-r--r--include/libxml/parserInternals.h644
-rw-r--r--include/libxml/pattern.h100
-rw-r--r--include/libxml/relaxng.h217
-rw-r--r--include/libxml/schemasInternals.h958
-rw-r--r--include/libxml/schematron.h142
-rw-r--r--include/libxml/threads.h84
-rw-r--r--include/libxml/tree.h1310
-rw-r--r--include/libxml/uri.h94
-rw-r--r--include/libxml/valid.h458
-rw-r--r--include/libxml/xinclude.h129
-rw-r--r--include/libxml/xlink.h189
-rw-r--r--include/libxml/xmlIO.h366
-rw-r--r--include/libxml/xmlautomata.h146
-rw-r--r--include/libxml/xmlerror.h945
-rw-r--r--include/libxml/xmlexports.h162
-rw-r--r--include/libxml/xmlmemory.h224
-rw-r--r--include/libxml/xmlmodule.h57
-rw-r--r--include/libxml/xmlreader.h428
-rw-r--r--include/libxml/xmlregexp.h222
-rw-r--r--include/libxml/xmlsave.h88
-rw-r--r--include/libxml/xmlschemas.h246
-rw-r--r--include/libxml/xmlschemastypes.h151
-rw-r--r--include/libxml/xmlstring.h140
-rw-r--r--include/libxml/xmlunicode.h202
-rw-r--r--include/libxml/xmlversion.h489
-rw-r--r--include/libxml/xmlversion.h.in489
-rw-r--r--include/libxml/xmlwriter.h488
-rw-r--r--include/libxml/xpath.h557
-rw-r--r--include/libxml/xpathInternals.h632
-rw-r--r--include/libxml/xpointer.h114
-rw-r--r--include/win32config.h128
-rw-r--r--include/wsockcompat.h86
-rwxr-xr-xinstall-sh527
-rw-r--r--legacy.c1343
-rw-r--r--libxml-2.0-uninstalled.pc.in12
-rw-r--r--libxml-2.0.pc.in13
-rw-r--r--libxml.371
-rw-r--r--libxml.h112
-rw-r--r--libxml.m4188
-rw-r--r--libxml.spec.in151
-rw-r--r--libxml2-config.cmake.in50
-rw-r--r--libxml2.spec151
-rw-r--r--libxml2.syms2281
-rw-r--r--libxml2_2.9.2+dfsg1.orig.tar.xz.deltabin0 -> 26804 bytes
-rw-r--r--libxml2_2.9.2+dfsg1.orig.tar.xz.id1
-rw-r--r--list.c779
-rw-r--r--ltmain.sh9655
-rw-r--r--m4/libtool.m47992
-rw-r--r--m4/ltoptions.m4384
-rw-r--r--m4/ltsugar.m4123
-rw-r--r--m4/ltversion.m423
-rw-r--r--m4/lt~obsolete.m498
-rw-r--r--macos/README8
-rw-r--r--macos/libxml2.mcp.xml.sit.hqx1
-rw-r--r--macos/src/XMLTestPrefix.h1
-rw-r--r--macos/src/XMLTestPrefix2.h1
-rw-r--r--macos/src/config-mac.h192
-rw-r--r--macos/src/libxml2_GUSIConfig.cp1
-rw-r--r--macos/src/macos_main.c1
-rwxr-xr-xmissing215
-rw-r--r--nanoftp.c2121
-rw-r--r--nanohttp.c1890
-rw-r--r--os400/README400214
-rw-r--r--os400/dlfcn/dlfcn.c1213
-rw-r--r--os400/dlfcn/dlfcn.h32
-rw-r--r--os400/iconv/README.iconv47
-rw-r--r--os400/iconv/bldcsndfa/bldcsndfa.c1953
-rw-r--r--os400/iconv/bldcsndfa/ccsid_mibenum.dtd15
-rw-r--r--os400/iconv/bldcsndfa/ccsid_mibenum.xml270
-rw-r--r--os400/iconv/bldcsndfa/character-sets.xhtml3077
-rw-r--r--os400/iconv/ianatables.c4609
-rw-r--r--os400/iconv/iconv.c154
-rw-r--r--os400/iconv/iconv.h40
-rw-r--r--os400/initscript.sh290
-rw-r--r--os400/libxmlrpg/DOCBparser.rpgle116
-rw-r--r--os400/libxmlrpg/HTMLparser.rpgle403
-rw-r--r--os400/libxmlrpg/HTMLtree.rpgle166
-rw-r--r--os400/libxmlrpg/SAX.rpgle207
-rw-r--r--os400/libxmlrpg/SAX2.rpgle248
-rw-r--r--os400/libxmlrpg/c14n.rpgle119
-rw-r--r--os400/libxmlrpg/catalog.rpgle235
-rw-r--r--os400/libxmlrpg/chvalid.rpgle97
-rw-r--r--os400/libxmlrpg/debugXML.rpgle241
-rw-r--r--os400/libxmlrpg/dict.rpgle78
-rw-r--r--os400/libxmlrpg/encoding.rpgle274
-rw-r--r--os400/libxmlrpg/entities.rpgle174
-rw-r--r--os400/libxmlrpg/globals.rpgle557
-rw-r--r--os400/libxmlrpg/hash.rpgle231
-rw-r--r--os400/libxmlrpg/list.rpgle168
-rw-r--r--os400/libxmlrpg/nanoftp.rpgle156
-rw-r--r--os400/libxmlrpg/nanohttp.rpgle103
-rw-r--r--os400/libxmlrpg/parser.rpgle1407
-rw-r--r--os400/libxmlrpg/parserInternals.rpgle575
-rw-r--r--os400/libxmlrpg/pattern.rpgle117
-rw-r--r--os400/libxmlrpg/relaxng.rpgle297
-rw-r--r--os400/libxmlrpg/schemasInternals.rpgle1137
-rw-r--r--os400/libxmlrpg/schematron.rpgle195
-rw-r--r--os400/libxmlrpg/threads.rpgle70
-rw-r--r--os400/libxmlrpg/transcode.rpgle71
-rw-r--r--os400/libxmlrpg/tree.rpgle1628
-rw-r--r--os400/libxmlrpg/uri.rpgle100
-rw-r--r--os400/libxmlrpg/valid.rpgle575
-rw-r--r--os400/libxmlrpg/xinclude.rpgle147
-rw-r--r--os400/libxmlrpg/xlink.rpgle164
-rw-r--r--os400/libxmlrpg/xmlIO.rpgle441
-rw-r--r--os400/libxmlrpg/xmlautomata.rpgle179
-rw-r--r--os400/libxmlrpg/xmlerror.rpgle1681
-rw-r--r--os400/libxmlrpg/xmlexports.rpgle15
-rw-r--r--os400/libxmlrpg/xmlmemory.rpgle239
-rw-r--r--os400/libxmlrpg/xmlmodule.rpgle51
-rw-r--r--os400/libxmlrpg/xmlreader.rpgle619
-rw-r--r--os400/libxmlrpg/xmlregexp.rpgle246
-rw-r--r--os400/libxmlrpg/xmlsave.rpgle96
-rw-r--r--os400/libxmlrpg/xmlschemas.rpgle318
-rw-r--r--os400/libxmlrpg/xmlschemastypes.rpgle235
-rw-r--r--os400/libxmlrpg/xmlstdarg.rpgle34
-rw-r--r--os400/libxmlrpg/xmlstring.rpgle162
-rw-r--r--os400/libxmlrpg/xmlunicode.rpgle668
-rw-r--r--os400/libxmlrpg/xmlversion.rpgle.in352
-rw-r--r--os400/libxmlrpg/xmlwriter.rpgle725
-rw-r--r--os400/libxmlrpg/xpath.rpgle649
-rw-r--r--os400/libxmlrpg/xpathInternals.rpgle672
-rw-r--r--os400/libxmlrpg/xpointer.rpgle157
-rw-r--r--os400/make-bldcsndfa.sh43
-rw-r--r--os400/make-include.sh81
-rw-r--r--os400/make-rpg.sh97
-rw-r--r--os400/make-src.sh241
-rw-r--r--os400/make.sh75
-rw-r--r--os400/os400config.h.in353
-rw-r--r--os400/rpgsupport.c270
-rw-r--r--os400/rpgsupport.h157
-rw-r--r--os400/transcode.c268
-rw-r--r--os400/transcode.h43
-rw-r--r--os400/wrappers.c170
-rw-r--r--os400/wrappers.h70
-rw-r--r--parser.c15683
-rw-r--r--parserInternals.c2140
-rw-r--r--pattern.c2617
-rw-r--r--python/Makefile.am54
-rw-r--r--python/Makefile.in969
-rw-r--r--python/README34
-rw-r--r--python/TODO57
-rw-r--r--python/drv_libxml2.py377
-rwxr-xr-xpython/generator.py1228
-rw-r--r--python/libxml.c3934
-rw-r--r--python/libxml.py788
-rw-r--r--python/libxml2-export.c2063
-rw-r--r--python/libxml2-py.c14789
-rw-r--r--python/libxml2-py.h2063
-rw-r--r--python/libxml2-python-api.xml350
-rw-r--r--python/libxml2.py9319
-rw-r--r--python/libxml2class.py8531
-rw-r--r--python/libxml2class.txt1177
-rw-r--r--python/libxml_wrap.h279
-rwxr-xr-xpython/setup.py242
-rwxr-xr-xpython/setup.py.in242
-rw-r--r--python/tests/Makefile.am75
-rw-r--r--python/tests/Makefile.in664
-rwxr-xr-xpython/tests/attribs.py34
-rwxr-xr-xpython/tests/build.py59
-rwxr-xr-xpython/tests/compareNodes.py50
-rwxr-xr-xpython/tests/ctxterror.py56
-rwxr-xr-xpython/tests/cutnpaste.py48
-rwxr-xr-xpython/tests/dtdvalid.py32
-rwxr-xr-xpython/tests/error.py51
-rwxr-xr-xpython/tests/inbuf.py30
-rwxr-xr-xpython/tests/indexes.py113
-rwxr-xr-xpython/tests/input_callback.py148
-rw-r--r--python/tests/invalid.xml6
-rwxr-xr-xpython/tests/nsdel.py62
-rwxr-xr-xpython/tests/outbuf.py110
-rwxr-xr-xpython/tests/push.py35
-rwxr-xr-xpython/tests/pushSAX.py64
-rwxr-xr-xpython/tests/pushSAXhtml.py65
-rwxr-xr-xpython/tests/reader.py446
-rwxr-xr-xpython/tests/reader2.py265
-rwxr-xr-xpython/tests/reader3.py160
-rwxr-xr-xpython/tests/reader4.py50
-rwxr-xr-xpython/tests/reader5.py47
-rwxr-xr-xpython/tests/reader6.py128
-rwxr-xr-xpython/tests/reader7.py101
-rwxr-xr-xpython/tests/reader8.py36
-rwxr-xr-xpython/tests/readererr.py56
-rwxr-xr-xpython/tests/readernext.py86
-rwxr-xr-xpython/tests/regexp.py32
-rwxr-xr-xpython/tests/relaxng.py48
-rwxr-xr-xpython/tests/resolver.py44
-rwxr-xr-xpython/tests/schema.py52
-rwxr-xr-xpython/tests/serialize.py150
-rwxr-xr-xpython/tests/sync.py138
-rw-r--r--python/tests/test.dtd1
-rwxr-xr-xpython/tests/thread2.py99
-rwxr-xr-xpython/tests/tst.py28
-rw-r--r--python/tests/tst.xml1
-rwxr-xr-xpython/tests/tstLastError.py82
-rwxr-xr-xpython/tests/tstURI.py41
-rwxr-xr-xpython/tests/tstmem.py36
-rwxr-xr-xpython/tests/tstxpath.py63
-rw-r--r--python/tests/valid.xml4
-rwxr-xr-xpython/tests/validDTD.py59
-rwxr-xr-xpython/tests/validRNG.py76
-rwxr-xr-xpython/tests/validSchemas.py83
-rwxr-xr-xpython/tests/validate.py82
-rwxr-xr-xpython/tests/walker.py144
-rwxr-xr-xpython/tests/xpath.py51
-rwxr-xr-xpython/tests/xpathext.py49
-rwxr-xr-xpython/tests/xpathleak.py65
-rwxr-xr-xpython/tests/xpathns.py29
-rwxr-xr-xpython/tests/xpathret.py57
-rw-r--r--python/types.c957
-rwxr-xr-xregressions.py350
-rw-r--r--regressions.xml226
-rw-r--r--relaxng.c11053
-rw-r--r--result/japancrlf.xml4
-rw-r--r--result/japancrlf.xml.rde7
-rw-r--r--result/japancrlf.xml.rdr7
-rw-r--r--result/japancrlf.xml.sax11
-rw-r--r--result/japancrlf.xml.sax211
-rw-r--r--result/noent/japancrlf.xml4
-rw-r--r--result/relaxng/710744_10
-rw-r--r--result/relaxng/710744_1.err1
-rw-r--r--result/relaxng/710744_20
-rw-r--r--result/relaxng/710744_2.err2
-rw-r--r--runsuite.c1172
-rw-r--r--runtest.c4480
-rw-r--r--runxmlconf.c607
-rw-r--r--save.h35
-rw-r--r--schematron.c1787
-rw-r--r--test/japancrlf.xml6
-rw-r--r--test/relaxng/710744.rng16
-rw-r--r--test/relaxng/710744_1.xml2
-rw-r--r--test/relaxng/710744_2.xml3
-rw-r--r--testAutomata.c309
-rw-r--r--testC14N.c370
-rw-r--r--testHTML.c880
-rw-r--r--testModule.c82
-rw-r--r--testReader.c145
-rw-r--r--testRegexp.c402
-rw-r--r--testRelax.c194
-rw-r--r--testSAX.c1198
-rw-r--r--testSchemas.c185
-rw-r--r--testThreads.c200
-rw-r--r--testThreadsWin32.c150
-rw-r--r--testURI.c124
-rw-r--r--testXPath.c229
-rw-r--r--testapi.c52172
-rw-r--r--testchar.c617
-rw-r--r--testdict.c444
-rw-r--r--testdso.c12
-rw-r--r--testlimits.c1637
-rw-r--r--testrecurse.c965
-rw-r--r--threads.c1039
-rw-r--r--timsort.h514
-rw-r--r--tree.c10102
-rw-r--r--trio.c6895
-rw-r--r--trio.h230
-rw-r--r--triodef.h228
-rw-r--r--trionan.c914
-rw-r--r--trionan.h84
-rw-r--r--triop.h150
-rw-r--r--triostr.c2112
-rw-r--r--triostr.h144
-rw-r--r--uri.c2566
-rw-r--r--valid.c7052
-rwxr-xr-xvms/build_libxml.com273
-rwxr-xr-xvms/config.vms216
-rw-r--r--vms/diffs.vms192
-rw-r--r--vms/readme.vms143
-rw-r--r--win32/Makefile.bcb355
-rw-r--r--win32/Makefile.mingw354
-rw-r--r--win32/Makefile.msvc489
-rw-r--r--win32/Readme.txt226
-rw-r--r--win32/VC10/README.vc1027
-rw-r--r--win32/VC10/RuleSet1.ruleset3
-rw-r--r--win32/VC10/config.h125
-rw-r--r--win32/VC10/libxml2-focus.vcxproj184
-rw-r--r--win32/VC10/libxml2.sln49
-rw-r--r--win32/VC10/libxml2.vcxproj137
-rw-r--r--win32/VC10/libxml2.vcxproj.filters171
-rw-r--r--win32/VC10/runsuite.vcxproj85
-rw-r--r--win32/VC10/runsuite.vcxproj.filters22
-rw-r--r--win32/configure.js708
-rw-r--r--win32/defgen.xsl288
-rw-r--r--win32/libxml2.def.src3190
-rw-r--r--win32/wince/libxml2.vcb1
-rw-r--r--win32/wince/libxml2.vcl122
-rw-r--r--win32/wince/libxml2.vco1
-rw-r--r--win32/wince/libxml2.vcp5273
-rw-r--r--win32/wince/libxml2.vcw41
-rw-r--r--win32/wince/wincecompat.c68
-rw-r--r--win32/wince/wincecompat.h50
-rw-r--r--xinclude.c2624
-rw-r--r--xlink.c183
-rw-r--r--xml2-config.130
-rw-r--r--xml2-config.in106
-rw-r--r--xml2Conf.sh.in8
-rw-r--r--xmlIO.c4186
-rw-r--r--xmlcatalog.c615
-rw-r--r--xmllint.c3801
-rw-r--r--xmlmemory.c1124
-rw-r--r--xmlmodule.c460
-rw-r--r--xmlreader.c5932
-rw-r--r--xmlregexp.c8167
-rw-r--r--xmlsave.c2788
-rw-r--r--xmlschemas.c28907
-rw-r--r--xmlschemastypes.c6139
-rw-r--r--xmlstring.c984
-rw-r--r--xmlunicode.c3179
-rw-r--r--xmlwriter.c4743
-rw-r--r--xpath.c15377
-rw-r--r--xpointer.c3031
-rw-r--r--xstc/Makefile.am132
-rw-r--r--xstc/Makefile.in668
-rwxr-xr-xxstc/xstc-to-python.xsl114
-rwxr-xr-xxstc/xstc.py693
-rw-r--r--xzlib.c798
-rw-r--r--xzlib.h19
730 files changed, 585357 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..cf2e9a6
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,5 @@
+Daniel Veillard <daniel@veillard.com>
+Bjorn Reese <breese@users.sourceforge.net>
+William Brack <wbrack@mmm.com.hk>
+Igor Zlatkovic <igor@zlatkovic.com> for the Windows port
+Aleksey Sanin <aleksey@aleksey.com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..d613185
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,23 @@
+Except where otherwise noted in the source code (e.g. the files hash.c,
+list.c and the trio files, which are covered by a similar licence but
+with different Copyright notices) all the files are:
+
+ Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..08725dd
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,19678 @@
+Fri Jul 10 16:11:34 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a regression in entity parsing when using the reader
+ introduced because we were not reusing _private on entities parsing
+ context
+
+Thu Jul 9 10:21:00 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ Aleksey Sanin support for c14n 1.1
+ * c14n.c include/libxml/c14n.h: adds support for C14N 1.1,
+ new flags at the API level
+ * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI
+ tools and test binaries
+ * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*:
+ add a new batch of tests
+
+Thu Jul 9 08:52:35 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in: update of libtool seems to have modified it
+ * python/libxml2class.txt: python update modified the order
+ of classes apparently
+
+Thu Jul 9 08:43:06 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: avoid calling xmlAddID with NULL values
+ * parser.c: add a few xmlInitParser in some entry points
+
+Fri Jun 19 19:51:08 CEST 2009 Rob Richards <rrichards@cdatazone.org>
+
+ * parser.c: use options from current parser context when creating
+ a parser context within xmlParseCtxtExternalEntity
+ * xmlwriter.c: fix error message when unable to create output file
+
+Thu Jun 4 11:17:23 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c
+ valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string
+ patch by Christian Persch, fixes #581612
+
+Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c threads.c: change the threading initialization sequence
+ as suggested by Igor Novoseltsev to avoid crash if xmlInitParser()
+ is called from a thread which is not the main one, should fix
+ #584605
+
+Fri May 15 17:54:48 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: make sure we keep line numbers fixes #580705
+ based Aaron Patterson patch
+
+Tue May 12 09:13:58 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: a broken HTML table attributes initialization,
+ fixes #581803, by Roland Steiner <rolandsteiner@google.com>
+
+Tue May 12 08:54:20 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * libxml2.doap: adding RDF dope file.
+
+Tue May 12 08:42:52 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: adapt the extra version detection code to git
+
+Wed Apr 29 16:09:38 CEST 2009 Rob Richards <rrichards@cdatazone.org>
+
+ * parser.c: do not set error code in xmlNsWarn
+
+Wed Apr 15 11:18:24 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h include/libxml/xmlwriter.h
+ include/libxml/relaxng.h include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in include/libxml/valid.h
+ include/libxml/xmlschemas.h include/libxml/xmlerror.h: change
+ ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT to avoid macro name
+ collisions with other packages and headers as reported by
+ Belgabor and Mike Hommey
+
+Thu Apr 2 13:57:15 CEST 2009 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: fix structured error handling problems #564217
+
+Thu Mar 26 19:08:08 CET 2009 Rob Richards <rrichards@cdatazone.org>
+
+ * parser.c: use options from current parser context when creating
+ an entity parser context
+
+Wed Mar 25 11:40:34 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*: updated SVN URL for GNOME as pointed by Vincent Lefevre
+ and regenerated docs
+
+Wed Mar 25 11:21:26 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: hide the nbParse* variables used for debugging
+ as pointed by Mike Hommey
+
+Wed Mar 25 10:50:05 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/wsockcompat.h win32/Makefile.bcb xpath.c: fixes for
+ Borland/CodeGear/Embarcadero compilers by Eric Zurcher
+
+Wed Mar 25 10:43:07 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: xmlXPathRegisterNs should not allow enpty prefixes
+
+Mon Mar 23 20:27:15 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: add a missing check in xmlAddSibling, patch by Kris Breuker
+ * xmlIO.c: avoid xmlAllocOutputBuffer using XML_BUFFER_EXACT which
+ leads to performances problems especially on Windows.
+
+Tue Mar 3 14:30.28 HKT 2009 William Brack <wbrack@mmm.com.hk>
+
+ * trio.h: changed include of config.h to be surrounded by
+ quotation marks #570806
+
+Sat Feb 21 10:20:34 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c parser.c: more warnings about xmlCleanupThreads and
+ xmlCleanupParser to avoid troubles like #571409
+
+Fri Feb 20 09:40:04 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: cleanups and error reports when xmlTextWriterVSprintf
+ fails, by Jinmei Tatuya
+
+Fri Feb 20 09:18:56 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: remove a couple of leaks on errors reported by
+ Jinmei Tatuya
+
+Sun Jan 18 22:37:59 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/xml.html doc/*: preparing 0.7.3 release
+ * include/libxml/parserInternals.h SAX2.c: fix a typo in a name
+
+Sun Jan 18 21:48:28 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h include/libxml/xmlwriter.h
+ include/libxml/relaxng.h include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in include/libxml/valid.h
+ include/libxml/xmlschemas.h include/libxml/xmlerror.h:
+ port patch from Marcus Meissner to add gcc checking for
+ printf like functions parameters, should fix #65068
+ * doc/apibuild.py doc/*: modified the script accordingly
+ and regenerated
+ * xpath.c xmlmemory.c threads.c: fix a few warnings
+
+Sun Jan 18 20:40:42 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlwin32version.h.in: windows header should
+ get the same define
+
+Sun Jan 18 18:22:33 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlversion.h.in include/libxml/xmlmemory.h:
+ apply patch from Marcus Meissner to add gcc attribute alloc_size
+ should fix #552505
+ * doc/apibuild.py doc/* testapi.c: regenerate the API
+ * include/libxml/parserInternals.h: fix a comment problem raised
+ by apibuild.py
+
+Sun Jan 18 16:39:01 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: also remove pthread key when stopping thread
+ support, patch based on Alex Ott one should fix #564723
+
+Sun Jan 18 15:55:18 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: patch from Daniel Zimmermann fixing a memory leak
+ in an edge case, solves #562230
+
+Sun Jan 18 15:06:05 CET 2009 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parserInternals.h SAX2.c: add a new define
+ XML_MAX_TEXT_LENGTH limiting the maximum size of a single text
+ node, the defaultis 10MB and can be removed with the HUGE
+ parsing option
+
+Mon Jan 05 18:28:41 CET 2009 Rob Richards <rrichards@cdatazone.org>
+
+ * include/libxml/parser.h parser.c: add XML_PARSE_OLDSAX parser
+ option to enable pre 2.7 SAX behavior.
+
+Wed Dec 31 23:11:37 CET 2008 Rob Richards <rrichards@cdatazone.org>
+
+ * tree.c: set doc on last child tree in xmlAddChildList for
+ bug #546772. Fix problem adding an attribute via with xmlAddChild
+ reported by Kris Breuker.
+
+Sun Dec 27 14:16:13 CET 2008 Rob Richards <rrichards@cdatazone.org>
+
+ * xmlwriter.c: fix indenting in xmlTextWriterFullEndElement for
+ bug# 554353.
+
+Thu Nov 27 16:24:52 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h tree.c python/generator.py: adds
+ element traversal support
+ * valid.c: avoid a warning
+ * doc/*: regenerated
+
+Mon Nov 17 16:56:18 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c parser.c: fix for CVE-2008-4226, a memory overflow
+ when building gigantic text nodes, and a bit of cleanup
+ to better handled out of memory problem in that code.
+ * tree.c: fix for CVE-2008-4225, lack of testing leads to
+ a busy loop test assuming one have enough core memory.
+
+Thu Nov 6 14:34:35 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: Matthias Kaehlcke reported a build problem when
+ not compiling HTML support in.
+
+Fri Oct 17 15:24:08 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/Makefile.am: patch from Adrian Bunk which
+ adds --disable-rebuild-docs to avoid rebuilding them
+
+Fri Oct 3 09:43:45 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* NEWS: preparing the release of 2.7.2
+ * dict.c: fix the Solaris portability issue
+ * parser.c: additional cleanup on #554660 fix
+ * test/ent13 result/ent13* result/noent/ent13*: added the
+ example in the regression test suite.
+ * HTMLparser.c: handle leading BOM in htmlParseElement()
+
+Thu Oct 2 22:53:39 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a nasty bug introduced when cleaning up
+ entities processing in 2.7.x , fixes #554660
+
+Thu Sep 25 18:04:20 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix an HTML parsing error on large data sections
+ reported by Mike Day
+ * test/HTML/utf8bug.html result/HTML/utf8bug.html.err
+ result/HTML/utf8bug.html.sax result/HTML/utf8bug.html: add the
+ reproducer to the test suite
+
+Thu Sep 25 17:35:57 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * runxmlconf.c: fix compilation if XPath is not included
+
+Thu Sep 25 16:54:04 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: patch from Riccardo Scussat fixing custom error
+ handlers problems.
+
+Thu Sep 25 16:30:11 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlsave.h xmlsave.c: new options to serialize
+ as XML/HTML/XHTML and restore old entry point behaviours
+
+Mon Sep 1 16:49:05 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/news.html configure.in python/setup.py NEWS:
+ prepare release of 2.7.1
+
+Mon Sep 1 15:35:13 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c xpath.c: applied a couple of patches from Martin
+ avoiding some leaks, fixinq QName checks in XPath, XPath debugging
+ and schematron code cleanups.
+ * python/tests/Makefile.am python/tests/xpathleak.py: add the
+ specific regression tests, just tweak it to avoid output by default
+
+Mon Sep 1 15:02:05 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * trionan.c: Borland C fix from Moritz Both
+ * testapi.c: regenerate, workaround a problem for buffer testing
+ * xmlIO.c HTMLtree.c: new internal entry point to hide even better
+ xmlAllocOutputBufferInternal
+ * tree.c: harden the code around buffer allocation schemes
+ * parser.c: restore the warning when namespace names are not absolute
+ URIs
+ * runxmlconf.c: continue regression tests if we get the expected
+ number of errors
+ * Makefile.am: run the python tests on make check
+ * xmlsave.c: handle the HTML documents and trees
+ * python/libxml.c: convert python serialization to the xmlSave APIs
+ and avoid some horrible hacks
+
+Sat Aug 30 16:58:40 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in, doc/*: preparing 2.7.0 release
+ * tree.c: remove some testing traces
+ * parser.c xmlIO.c xmlschemas.c: remove some warnings
+
+Sat Aug 30 14:50:16 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h tree.c: make a new kind of buffer where
+ shrinking and adding in head can avoid reallocation or full
+ buffer memmoves
+ * encoding.c xmlIO.c: use the new kind of buffers for output
+ buffers
+
+Sat Aug 30 10:18:13 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/* testapi.c: regenerated
+
+Fri Aug 29 21:53:12 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/reader3.c: patch from Robert Schwebel , allows to
+ compile the example if configured without output support fixes
+ #545582
+ * Makefile.am: add testrecurse to the make check tests
+ * HTMLparser.c: if the parser got a encoding argument it should be
+ used over what the meta specifies, patch fixing #536346
+
+Fri Aug 29 14:41:38 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: a couple more fixes
+ * nanohttp.c nanoftp.c: patch from Andreas Färber to compile on Haiku
+ fixes #527880
+ * doc/examples/*: regenerated
+
+Thu Aug 28 17:31:46 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/parser.h: completely different fix for
+ the recursion detection based on entity density, big cleanups
+ in the entity parsing code too
+ * result/*.sax*: the parser should not ask for used defined versions
+ of the predefined entities
+ * testrecurse.c: automatic test for entity recursion checks
+ * Makefile.am: added testrecurse
+ * test/recurse/lol* test/recurse/good*: a first set of tests for
+ the recursion
+
+Wed Aug 27 21:55:34 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlerror.h parser.c: a bit of cleanup and
+ added checks based on the regression tests of the xmlconf suite
+
+Wed Aug 27 19:22:35 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: bug in parsing RFC 3986 uris with port numbers
+
+Wed Aug 27 17:30:48 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in Makefile.am: add an --with-coverage configure option
+ and a 'make cov' target based on gcc profiling and the lcov
+ tool. Currently at 68.9% coverage out of 'make check' and
+ runsuite executions.
+ * xmlreader.c: remove warnings due to C++ comments
+
+Wed Aug 27 15:00:54 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parserInternals.h parser.c: cleanup entity
+ pushing error handling based on a patch from Ashwin
+
+Wed Aug 27 13:41:26 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: fix a small initialization problem raised by Ashwin
+ * testapi.c gentest.py: increase testing especially for document
+ with an internal subset, and entities
+ * tree.c: fix a deallocation issue when unlinking entities from
+ a document.
+ * valid.c: fix a missing entry point test not found previously.
+ * doc/*: regenerated the APIs, docs etc.
+
+Tue Aug 26 15:02:58 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h parser.c xmllint.c: strengthen some
+ of the internal parser limits, add an XML_PARSE_HUGE option
+ to bypass them all. More internal parser limits will still need
+ to be added.
+
+Tue Aug 26 09:42:08 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: add the testchar to 'make check'
+ * xmlschemas.c: Volker Grabsch pointed out a typo
+ * xmlregexp.c: production [19] from XML Schemas regexps were a
+ mistake removed in version REC-xmlschema-2-20041028, Volker Grabsch
+ provided a patch to remove it
+ * test/schemas/regexp-char-ref_0.xml test/schemas/regexp-char-ref_0.xsd
+ test/schemas/regexp-char-ref_1.xsd result/schemas/regexp-char-ref_0_0
+ result/schemas/regexp-char-ref_1_0: Volker Grabsch also provided
+ regession tests for this
+
+Tue Aug 26 09:25:39 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h xinclude.c xmllint.c: patch based on
+ Wieant Nielander contribution to add the option of not doing
+ URI base fixup in XInclude
+
+Mon Aug 25 16:52:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied patch from Aswin to fix tree skipping
+ * include/libxml/entities.h entities.c: fixed a comment and
+ added a new xmlNewEntity() entry point
+ * runtest.c: be less verbose
+ * tree.c: space and tabs cleanups
+
+Mon Aug 25 10:56:30 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/entities.h entities.c SAX2.c parser.c: rework
+ the patch to avoid some ABI issue with people allocating
+ entities structure directly
+
+Wed Aug 20 19:02:01 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h include/libxml/entities.h entities.c
+ parserInternals.c parser.c: fix for CVE-2008-3281
+
+Sun Aug 10 17:06:13 CEST 2008 Rob Richards <rrichards@ctindustries.net>
+
+ * dict.c: fix non GNUC builds.
+
+Fri Aug 8 14:13:06 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * makefile.am: adding a check-valgrind target
+
+Fri Aug 8 14:01:59 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am testdict.c: add the new test in 'make check' and
+ update it to check subdictionaries processing.
+
+Fri Aug 8 12:07:20 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * testdict.c: added a program to regression test the dictionary code
+ * dict.c: improve the lookup efficiency by caching the key.
+
+Thu Aug 7 18:30:55 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: chased and found a couple of nasty issues
+
+Thu Aug 7 15:51:31 CEST 2008 Sven Herzberg <sven@imendio.com>
+
+ Bug 546629 – runtests doesn't pass on my mac
+ Reviewed by William M. Brack.
+
+ * runtest.c: use libpthread on Mac OS X as well
+
+Wed Aug 6 12:24:33 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: allow [ and ] in fragment identifiers, 3986 disallow them
+ but it's widely used for XPointer, and would break DocBook
+ processing among others
+
+Wed Aug 6 11:32:21 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: change the big key algorithm to work properly with QName
+ too, fix a bug with dict size and sub dictionaries
+
+Mon Aug 4 17:27:27 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c include/libxml/uri.h: rewrite the URI parser to update to
+ rfc3986 (from 2396)
+ * test/errors/webdav.xml result/errors/webdav.xml*: removed the
+ error test, 'DAV:' is a correct URI under 3986
+ * Makefile.am: small cleanup in make check
+
+Thu Jul 31 21:49:45 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * runxmlconf.c: more progresses against the official regression tests
+ * runsuite.c: small cleanup for non-leak reports
+ * include/libxml/tree.h: parsing flags and other properties are
+ now added to the document node, this is generally useful and
+ allow to make Name and NmToken validations based on the parser
+ flags, more specifically the 5th edition of XML or not
+ * HTMLparser.c tree.c: small side effects for the previous changes
+ * parser.c SAX2.c valid.c: the bulk of teh changes are here,
+ the parser and validation behaviour can be affected, parsing
+ flags need to be copied, lot of changes. Also fixing various
+ validation problems in the regression tests.
+
+Thu Jul 31 10:15:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * runxmlconf.c: added a skipped list, insert rmt-ns10-035
+ * Makefile.am: improve 'make check'
+ * include/libxml/xmlerror.h parser.c: clean up namespace errors
+ checking and reporting, errors when a document is labelled
+ as UTF-16 while it is parsed as UTF-8 and no encoding was given
+ explicitely.
+ * result/errors/webdav.xml.*: some warnings are no recategorized
+ as Namespace errors
+
+Wed Jul 30 14:55:54 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlmemory.h xmlmemory.c: add xmlMemDisplayLast to
+ help debug incremental memory leaks, and some cleanups
+ * runxmlconf.c: use that new call and avoid ever touching the
+ system catalog in the regression tests
+
+Wed Jul 30 14:33:33 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/xmlerror.h: an XML-1.0 document can't load
+ an 1.1 entity
+ * runxmlconf.c: when using entities make sure we load them
+
+Tue Jul 29 18:43:07 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a bug not detecting cross entity comments probably
+ when comment parsing got optimized.
+ * Makefile.am: add make check
+ * runxmlconf.c: fix the log file name
+
+Tue Jul 29 18:09:26 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * runxmlconf.c Makefile.am: add a C program to run the W3C test
+ suite, work in progress
+ * xmllint.c: add a new option --oldxml10 to use the old parser
+ * parser.c: fix the XML_PARSE_OLD10 processing of the new option
+ and a bug in version parsing
+
+Tue Jul 29 11:12:40 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: space and tabs cleanup
+
+Tue Jul 29 10:59:36 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h include/libxml/xmlerror.h parser.c:
+ implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10
+ to stick to old behaviour
+ * testapi.c gentest.py: modified slightly and regenerated
+ * Makefile.am: add testchar
+
+Thu Jul 24 16:57:20 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am testchar.c Makefile.tests README.tests: add a
+ new regression test program for testing character ranges and
+ UTF8 encoding/decoding
+
+Wed Jul 23 15:32:39 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fix the build root
+
+Wed Jul 16 22:28:48 PDT 2008 William Brack <wbrack@mmm.com.hk>
+
+ * pattern.c: fix problem with xmlStreamPop when pattern includes
+ a "." element (see discussion on libxslt list)
+
+Mon Jul 7 15:49:59 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fix line number on text nodes, problem raised by Ralf Junker
+
+Sun Jun 29 17:04:28 CEST 2008 Rob Richards <rrichards@ctindustries.net>
+ * xmlschemas.c: fix crash with invalid whitespace facet
+
+Wed Jun 11 10:13:02 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/FAQ.html: add a section in the FAQ about
+ multithread and xmlCleanupParser
+
+Tue Jun 10 16:52:17 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: apply a couple of fixes based on a Coverity report
+ forwarded by Derrick Price.
+ * VxWorks/README VxWorks/Makefile VxWorks/build.sh: instructions
+ Makefile, and shell script to build on VxWorks 6.4+ provided by
+ Jim Wert.
+
+Tue Jun 3 18:07:13 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/setup.py: apply patch from Martin fixing
+ python whitespaces
+ * NEWS: following previous commit rebuilt now in UTF-8
+
+Mon Jun 2 17:39:42 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * ChangeLog: patch from Hans de Goede to switch the file to UTF-8
+ * doc/news.xsl: switch to generate the NEWS file in UTF-8 instead of
+ ISO-8859-1
+
+Mon May 12 15:12:44 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: avoid a regexp crash, should fix #523738
+
+Mon May 12 14:56:06 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h
+ python/types.c python/libxml_wrap.h python/libxml.c: fx compilation
+ when configured without the reader should fix #513110
+ * doc/*: regenerated
+
+Sat May 3 14:33:29 CEST 2008 Rob Richards <rrichards@ctindustries.net>
+
+ * dict.c: check for stdint.h and define types when using MSVC
+
+Mon Apr 28 20:06:12 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: applied patch from Ashwin to avoid a potential
+ double-free
+
+Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied patch from Ashwin fixing a number of realloc problems
+ * HTMLparser.c: improve handling for misplaced html/head/body
+
+Tue Apr 22 10:27:17 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: improvement on the hashing of the dictionnary, with visible
+ speed up as the number of strings in the hash increases, work from
+ Stefan Behnel
+
+Fri Apr 11 14:44:00 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlschemas.h xmlschemas.c: added new function
+ xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch
+ * doc/apibuild.py doc/*: regenerated the doc, chased why the new
+ function didn't got any documentation, added more checking in the
+ generator
+ * include/libxml/relaxng.h include/libxml/schematron.h
+ include/libxml/xmlschemas.h include/libxml/c14n.h
+ include/libxml/xmlregexp.h include/libxml/globals.h
+ include/libxml/xmlreader.h threads.c xmlschemas.c: various changes
+ and cleanups following the new reports
+
+
+Thu Apr 10 10:07:00 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: extend the cleanup rule
+ * xmlschemas.c: space cleanup
+
+Wed Apr 9 19:43:25 CEST 2008 Rob Richards <rrichards@ctindustries.net>
+
+ * include/wsockcompat.h: support older win32 platforms when building
+ with newer versions of VS
+
+Tue Apr 8 16:56:07 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: preparing release of 2.6.32
+
+Tue Apr 8 10:19:01 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix a bug introduced when fixing #438208 and reported by
+ Ashwin
+ * python/generator.py: fix an infinite loop bug
+
+Mon Apr 7 14:44:51 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fix a link to XmlNodeType doc reported by Martijn Arts
+ * docs/*: rebuilt
+
+Fri Apr 4 18:09:50 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: improve the *Recover* functions documentation
+
+Thu Apr 3 14:57:15 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: patch from Mark Rowe fixing BOM or encoding detection
+ in external parsed entities, should fix #440415
+
+Thu Apr 3 13:16:01 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix some problems with the *EatName functions when
+ running out of memory raised by Eric Schrock , should fix #438208
+
+Thu Apr 3 12:41:29 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: horror around the definition of the lexical
+ values for decimal and derived types, fixing to reject empty
+ values, should fix #503268
+
+Thu Apr 3 11:44:57 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: buffer may not be large enough to convert to
+ UCS4, patch from Christian Fruth , fixes #504015
+
+Thu Apr 3 11:02:02 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: apparently it's okay to forget the semicolumn after
+ entity refs in HTML, fixing char refs parsing accordingly based on
+ T. Manske patch, this should fix #517653
+
+Thu Apr 3 09:30:29 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: avoid a scary realloc() loop should fix #520383
+
+Thu Apr 3 08:22:52 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: more realloc problems pointed out by Ashwin
+
+Thu Apr 3 07:40:13 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am: applied patch from Mike Hommey fixing distclean,
+ fixes #520387
+
+Thu Apr 3 06:52:32 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xpath.h: small doc improvement for xmlXPathContext
+ from Jack Jansen, fixes #524759
+ * doc/newapi.xsl doc/*: fixed a problem and regenerated the docs
+
+Tue Apr 1 09:59:22 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: two patches from Alvaro Herrera to avoid problem when
+ running out of memory in XPath evaluations.
+
+Mon Mar 31 11:23:19 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: lot of out of memory handling fixes from Ashwin
+ * elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain
+ * include/libxml/threads.h: indenting cleanups
+
+Mon Mar 31 10:25:37 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c docs/*: trying to clarify even more the xmlCleanupParser()
+ use and the memory documentation
+
+Wed Mar 26 18:39:58 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: changes based on Alex Khesin patch where xmlParseCharRef
+ seems to not be checked correctly, fixes #520198
+
+Wed Mar 26 15:03:49 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: patch from Ashwin to avoid a problem of attribute
+ redefinition in the DTD. Remove a warning too.
+
+Wed Mar 26 14:38:31 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fix a problem in externalSubsetSplit with a patch
+ from Ashwin
+
+Tue Mar 25 17:48:02 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix various attribute normalisation problems reported
+ by Ashwin
+ * result/c14n/without-comments/example-4
+ result/c14n/with-comments/example-4: this impacted the result of
+ two c14n tests :-\
+ * test/att9 test/att10 test/att11 result//att9* result//att10*
+ result//att11*: added 3 specific regression tests coming from the
+ XML spec revision and from Ashwin
+
+Tue Mar 25 14:20:49 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fix saving for file:///X:/ URI embedding Windows file paths
+ should fix #524253
+
+Mon Mar 24 21:42:33 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a problem reported by Ashwin for system parameter
+ entities referenced from entities in external subset, add a
+ specific loading routine.
+ * test/valid/dtds/external.ent test/valid/dtds/external2.ent
+ test/valid/t11.xml result/valid/t11.xml*: added the test to
+ the regression suite
+
+Mon Mar 24 15:04:54 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel
+ when testing with W3C test suite
+
+Mon Mar 24 12:12:00 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: check some allocation with Ashwin patch
+
+Wed Mar 19 16:41:52 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * vms/build_libxml.com: update from Tycho Hilhorst, should fix #523378
+
+Tue Mar 18 09:23:05 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: check some malloc returns with Ashwin patch, add
+ error messages and reindent the module.
+
+Fri Mar 14 15:28:43 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: patch from Ashwin removing duplicate tests
+
+Fri Mar 14 13:44:29 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/schematron.h include/libxml/xmlerror.h schematron.c:
+ applied patch from Tobias Minich to allow plugin schematron error
+ reporting in the normal error system, should fix #513998
+
+Fri Mar 14 11:52:09 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xinclude.c: patch from Vasily Chekalkin fixes memory
+ leaks, should fix 512647
+
+Thu Mar 13 08:17:58 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: found a nasty bug in regexp automata build,
+ reported by Ashwin and Bjorn Reese
+
+Wed Mar 12 18:56:22 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: patch from Arnold Hendriks improving parsing of
+ html within html bogus data, still not a complete fix though
+
+Wed Mar 12 10:22:01 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c: fix a memory errro when using namespace nodes
+ returned from XPath queries, should fix #521699
+ * python/tests/Makefile.am python/tests/xpathns.py: add a specific
+ regression test for it
+
+Mon Mar 10 16:25:32 CET 2008 Rob Richards <rrichards@ctindustries.net>
+
+ * include/win32config.h: add ICONV_CONST define for win32 build
+ to satisfy encoding.c change in rev 3693
+
+Fri Mar 7 17:45:27 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c parser.c: fix handling of empty CDATA nodes as
+ reported and discussed around #514181 and associated patches
+ * test/emptycdata.xml result/emptycdata.xml*
+ result/noent/emptycdata.xml: added a specific test in the
+ regression suite.
+
+Thu Mar 6 15:23:10 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: poblem with encoding detection for UTF-16 reported by
+ Ashwin and found by Bill
+ * test/valid/dtds/utf16b.ent test/valid/dtds/utf16l.ent
+ test/valid/UTF16Entity.xml result/valid/UTF16Entity.xml*: added
+ the example to the regression tests
+
+Tue Mar 4 14:16:38 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: patch from Alex Khesin fixing CDATA output after
+ a text node.
+ * parser.c: fixed the comment for xmlParserCleanup
+ * globals.c: fixed indentation
+
+Mon Feb 25 16:42:19 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * testModule.c: patch from Florent Guiliani to fix build on
+ SCO OpenServer
+
+Thu Feb 21 22:46:08 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: made one of the changes suggested by Brian Krahmer
+ * testRegexp.c: allow to pass '--' on the command line to allow
+ regexps starting with the character '-'
+
+Tue Feb 19 08:49:32 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/tests/Makefile.am: applied cleanup
+ patches for cross compilation and MinGW from Roumen Petrov
+
+Sat Feb 16 11:06:54 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fix output bug reported by Petr Pajas and analyzed by
+ Bill
+
+Fri Feb 15 09:32:11 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlerror.h tree.c: patch from Julien Charbon
+ to simplify the processing of xmlSetProp()
+
+Fri Feb 15 08:45:32 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in encoding.c: patch from Roumen Petrov
+ to detect if iconv() needs a const for the second parameter
+
+Fri Feb 15 08:41:31 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * macos/src/XMLTestPrefix2.h win32/Makefile.msvc: EOL cleanups
+ from Florent Guiliani
+
+Wed Feb 13 10:56:38 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Alfred Mickautsch to flush the
+ output at the end of document.
+
+Fri Feb 8 11:57:03 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/examples.xml: regenerated, it was truncated.
+
+Fri Feb 8 11:47:18 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmodule.c: apply simple patch from Carlo Bramini to avoid
+ compilation problems with Mingw32
+
+Fri Feb 8 11:33:15 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: apply patch from Andrew Tosh to fix behaviour
+ when '.' is used in a posCharGroup
+ * test/schemas/poschargrp0_0.* result/schemas/poschargrp0_0_0*:
+ added the test to the regression suite
+
+Fri Feb 8 10:54:09 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: applied patch from Florent Guilian to remove an
+ useless mutex in the xmlDict structure.
+
+Wed Feb 6 17:00:20 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: another leak reported by Ashwin
+ * xinclude.c: fixed the behaviour when XIncluding a fragment
+ of the current document, patch from Chris Ryan
+
+Wed Feb 6 12:10:08 HKT 2008 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: added space for port number (when not 80) in
+ xmlNanoHTTPMethodRedir, plus a few more comments. Should
+ fix #514521.
+
+Tue Feb 5 09:41:46 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * schemas.c: apply fix suggested by Ashwin correcting a cut-n-paste
+ error about the SAX callback in cdataBlockSplit when streaming
+ XSD validation
+
+Tue Feb 5 09:36:46 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied a patch based on Petr Sumbera one to avoid a
+ problem with paths starting with //
+
+Mon Feb 4 17:48:30 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/xmlmem.html: added a small section on returning
+ memory to the kernel by compacting the heap provided by Wolfram Sang
+
+Fri Jan 25 20:01:42 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * include/win32config.h win32/Makefile.msvc: fix build under VS 2008.
+ patch by David Wimsey
+
+Thu Jan 24 15:37:04 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a memeory leak in internal subset parsing with
+ a fix from Ashwin
+ * test/errors/content1.xml result/errors/content1.xml*:
+ add test to regressions
+
+Fri Jan 11 09:00:09 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/*: preparing release of 2.6.31
+
+Fri Jan 11 08:58:49 CET 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: avoid a warning on 64bits introduced earlier
+ * parserInternals.c: make more checking on the UTF-8 input
+
+Fri Jan 11 15:37:05 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: avoid stopping parsing when encountering
+ out of range characters in an HTML file, report and
+ continue processing instead, should fix #472696
+
+Fri Jan 11 15:13:35 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * check-relaxng-test-suite2.py check-relaxng-test-suite.py
+ Makefile.am python/tests/Makefile.am python/Makefile.am
+ check-xsddata-test-suite.py: patches from John Carr to
+ start cleaning up 'make diskcheck' problems c.f. #506228
+
+Fri Jan 11 14:48:40 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: apply fix from Stefan Kost to avoid a crash
+ in xmllint, fixes 504284
+
+Fri Jan 11 14:39:03 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xml2-config.in: apply patch from Fred Crozat to avoid
+ outputting -L/usr/lib from xml2-config, fixes #497012
+
+Fri Jan 11 14:18:09 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix definition for <embed> to avoid error
+ when saving back, patch from Stefan Behnel fixing 495213
+
+Fri Jan 11 14:06:09 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Christian Schmidt fixing a
+ column counter update problem, fixes #472696
+
+Fri Jan 11 13:22:14 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: handle a erroneous parsing of attributes in
+ case said attribute has been redeclared in the DTD with a
+ different type
+ * hash.c: fix the hash scanner to not crash if a first element
+ from the hash list is been removed in the callback
+
+Wed Jan 9 10:15:50 CST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: fix indentation in xmlTextWriterFullEndElement,
+ as raised by Felipe Pena, should fix #508156
+
+Tue Dec 6 11:07:42 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * pattern.c: fix crash from double free of name for bug #501760
+
+Fri Nov 23 11:47:48 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: remove unused variable in __xmlGlobalInitMutexLock
+ reported by Hannes Eder
+
+Mon Nov 19 18:39:26 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: remove a cut-and-paste copy error
+
+Fri Nov 16 11:55:36 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * globals.c threads.c include/libxml/threads.h:
+ __xmlGlobalInitMutexDestroy() will free global_init_lock on Win32.
+ Patch from Marc-Antoine Ruel.
+
+Tue Nov 13 21:26:27 CET 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * schematron.c: fix crash/leaks from xmlSchematronParse due to improper
+ schema document ownership for bug #495215
+
+Tue Oct 30 21:24:55 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: xmlFree(NULL) should not crash in debug mode
+ should fix #491651
+
+Tue Oct 16 13:58:41 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * testURI.c: add a debug option printing all the fields within
+ the parsed URI structure
+
+Wed Oct 10 10:25:52 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fix to avoid a crash when dumping an attribute from
+ an XHTML document, patch contributed to fix #485298
+
+Tue Aug 28 19:32:28 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: another nasty regexp case fixed.
+ * test/regexp/ranges2 result/regexp/ranges2: added to regression
+ suite
+
+Fri Aug 24 10:58:58 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: Enhanced to include port number (if not == 80) on the
+ "Header:" URL (bug #469681).
+ * xmlregexp.c: Fixed a typo causing a warning message.
+
+Thu Aug 23 22:48:20 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: fix an open() call with creation without 3rd argument
+ hopefully that interface is never used.
+
+Thu Aug 23 17:00:49 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/*: preparing release of 2.6.30
+
+Thu Aug 23 20:58:28 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed xmlXPathCompOpEvalPositionalPredicate problem
+ with object caching (bug #469410)
+
+Thu Aug 23 11:28:38 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c test/schemas/*455953* result/schemas/bug455953*:
+ applied patch from Frank Gross fixing Schemas IDC import bug
+ #455953 and also add the test to the regression suite
+
+Wed Aug 22 18:29:42 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: try to fix for the nth time the automata generation
+ in case of complex ranges. I suppose that time it is actually okay
+
+Tue Aug 14 15:51:05 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: aligned xmlSAXUserParseMemory() to match
+ xmlSAXUserParseFile() logic based on Ashwin post, and ifdef
+ cleanup
+
+Tue Aug 14 11:42:27 CEST 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlIO.c: fixed windows path determination (patch from
+ Roland Schwarz, bug #462877)
+ * win32/Makefile.mingw win32/configure.js: fixed mingw build
+ (patch from Roland Schwarz, bug #462877)
+
+Wed Aug 1 09:50:12 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a parser bug where invalid char in comment may
+ not be detected, reported by Ashwin Sinha
+ * test/errors/comment1.xml result/errors/comment1.xml*: added
+ the example to the regression suite
+
+Thu Jul 26 13:42:26 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fixed problem reported on bug #460415
+
+Thu Jul 19 18:10:58 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: applied patch from from Patrik Fimml. Fixes bug #458268.
+
+Wed Jul 18 11:05:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: applied patch from bug #454608 from Patrik Fimml.
+ Fixes bug #454608.
+
+Wed Jul 11 19:57:59 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch for xsi:nil from Frank Gross, this
+ should fix bug #358125
+
+Wed Jul 4 17:44:20 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: patch from Dodji Seketeli to avoid a leak on repeated
+ uses of xmlTextWriterStartDocument()
+
+Tue Jun 26 13:30:50 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fix a crash on solaris when a printf %s with a NULL
+ argument occurs, should fix #450936
+
+Wed Jun 13 13:33:38 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem in previous fix to xmlXPathNodeSetSort
+
+Tue Jun 12 18:17:28 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * doc/* configure.in NEWS: release of libxml2 2.6.29
+ * valid.c: patch from Dagfinn I. Mannsåker for idness of name
+ in HTML, c.f. bug #305885.
+
+Tue Jun 12 17:14:08 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixing bug #319964, parsing of HTML attribute really
+ should not have namespace processing.
+
+Tue Jun 12 16:42:14 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed the push mode when a big comment occurs before
+ an internal subset, should close bug #438835
+ * test/comment6.xml result//comment6.xml*: added a special
+ test in the regression suite
+
+Tue Jun 12 15:41:09 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix bug #414846 where invalid characters in attributes
+ would sometimes not be detected.
+ * test/errors/attr4.xml result/errors/attr4.xml*: added a specific
+ test case to the regression tests
+
+Tue Jun 12 14:23:24 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am: apply patch from Ryan Hill to cope with changes
+ in GNU tar, should fix #396751
+
+Tue Jun 12 12:03:36 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c: try to allow compilation on old python version
+ should fix #398125
+
+Tue Jun 12 11:48:15 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: htmlNodeDumpFormatOutput didn't handle XML_ATTRIBUTE_NODe
+ fixes bug #438390
+
+Tue Jun 12 11:37:55 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: workaround misgenerated file: URIs c.f. #437385
+
+Tue Jun 12 11:22:47 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed bug #407436 a crash in a specific case of
+ Relax-NG validation
+
+Tue Jun 12 11:12:50 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed bug #383687, some case of recursion on next
+ were not caught in the catalog code.
+
+Tue Jun 12 10:37:42 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed bug #381877, avoid reading over the end
+ of stream when generating an UTF-8 encoding error.
+
+Tue Jun 12 10:16:48 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #366161, trivially added the check in
+ xmlCtxtReset()
+
+Fri Jun 8 21:48:21 CEST 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * win32/configure.js win32/Makefile.msvc: add --vcmanifest flag (yes/no)
+ for VC8 build support to embed manifest within files. Under MS VC, build
+ libxml2_a_dll.lib by default (LIBXML_STATIC_FOR_DLL flag).
+
+Fri Jun 8 21:37:46 CEST 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * threads.c include/libxml/threads.h: use specified calling convention
+ for xmlDllMain. Old SDKs (VC6) only support InterlockedCompareExchange.
+ add xmlDllMain to header for win32 when building for static dll
+
+Fri Jun 8 10:51:28 CEST 2007 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlwriter.c: fixed problem with namespace declaration being
+ written more than once per element start tag
+
+Wed Jun 6 10:18:28 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with xmlXPathNodeSetSort;
+ fixed problem with xmlXPathNodeTrailingSorted (both bug#413451)
+
+Wed May 30 22:05:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with string value for PI node
+ (bug #442275)
+
+Mon May 28 16:14:50 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fix bug reported by François Delyon
+
+Tue May 22 08:59:48 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c: Fixed typo in xmlCharEncFirstLine pointed out
+ by Mark Rowe (bug #440159)
+ * include/libxml/xmlversion.h.in: Added check for definition of
+ _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from
+ Wendy Doyle and Mark Rowe, bug #346675)
+ * schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor
+ changes to fix compilation warnings - no change to logic.
+
+Tue May 15 22:18:08 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: small enhancement to last fix, pointed out
+ by Alex Cornejo
+
+Tue May 15 12:38:38 PDT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: fixed problem on gzip streams (bug #438045)
+ * xpath.c: fixed minor spot of redundant code - no logic change.
+
+Fri May 11 22:45:18 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: enhanced the coding for xmlXPathCastNumberToString
+ in order to produce the required number of significant digits
+ (bug #437179)
+
+Thu May 10 01:52:42 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * list.c: applied patch to fix xmlListAppend() from
+ Georges-André SILBER
+ * valid.c: also fix the place wher it was called.
+
+Wed May 2 18:47:33 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: tried to fix an error problem on entity content failure
+ reported by Michael Day
+
+Wed May 2 18:23:35 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: typo patch from Bjorn Reese
+
+Wed May 2 18:12:58 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from Michael Day to add support for
+ <embed>
+
+Thu Apr 26 10:58:50 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: Jean-Daniel Dupas pointed a couple of problems
+ in htmlCreateDocParserCtxt.
+
+Thu Apr 26 10:36:26 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c include/libxml/uri.h: patch from Richard Jones to save
+ the query part in raw form.
+ * libxml2-python-api.xml: also added accessor for the python bindings
+
+Wed Apr 25 15:57:32 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am doc/examples/Makefile.am Makefile.am: applied
+ patch from Richard Jones to for the silent flag on valgrind
+ when doing "make valgrind"
+ * xmlregexp.c: raise a regexp error when '\' is misused to escape
+ a standard character.
+
+Tue Apr 24 20:15:14 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it
+
+Tue Apr 24 10:59:28 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fix xmlURIUnescapeString comments which was confusing
+
+Wed Apr 18 09:52:25 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * include/win32config.h libxml.h: new patch from Andreas Stricke to
+ better integrate support for Windows CE
+
+Tue Apr 17 16:50:12 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * doc/* configure.in NEWS: release of libxml2 2.6.28
+
+Tue Apr 17 14:47:42 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c
+ xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied
+ patch from Andreas Stricke to ease the compilation on Windows CE
+
+Tue Apr 17 14:34:45 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c catalog.c: "xmllint unusable on win32" so applied
+ a libxml2 patch from Christian Ehrlicher
+
+Mon Apr 16 09:05:01 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: change the way script/style are parsed to
+ not try to detect comments, reported by Mike Day
+ * result/HTML/doc3.*: affects the result of that test
+
+Wed Apr 11 22:38:18 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: small enhancement for quantifier range with
+ min occurs of 0; fixes bug 425542.
+
+Fri Mar 30 14:41:57 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied change from Michael Day to avoid a problem when
+ compiled without zlib support.
+
+Wed Mar 21 17:58:13 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xpath.h: applied documentation patch from James Dennett
+
+Wed Mar 21 21:20:48 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: fixed problem with 0x2d in Char Range (bug #420596)
+ * test/regexp/bug420596, result/regexp/bug420596: added regression
+ test for this
+
+Wed Mar 21 14:23:08 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c: fixed memory access error on parsing of meta data
+ which had errors (bug #382206). Also cleaned up a few warnings
+ by adding some additional DECL macros.
+
+Tue Mar 20 09:58:13 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: applied patch from Björn Wiberg to try to fix again
+ the silly __ss_familly problem on various AIXes, should fix #420184
+
+Wed Mar 14 20:30:38 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in: corrected small error in last commit
+ * xmlreader.c: corrected small typo in last commit
+
+Wed Mar 14 19:35:28 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: fixed problem with referenced attribute groups
+ (bug #417621)
+ * configure.in: re-ordered some includes for types.h / socket.h
+ (bug #416001)
+
+Fri Mar 9 17:54:40 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied patch from Julien Reichel cleaning up mode
+ and state internal flags mixups
+
+Wed Mar 7 16:18:18 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed xmlXPathCmpNodes for incorrect result on certain
+ cases when comparing identical nodes (bug #415567) with patch
+ from Oleg Paraschenko
+
+Fri Feb 16 09:13:38 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * python/libxml.py: fixed tab problem with patch from
+ Andreas Hanke (bug #408626)
+
+Thu Feb 15 12:43:28 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * doc/xml.html: Changed all references to libxml2 CVS over to
+ the corresponding SVN. A few other spelling/grammar/links
+ also changed.
+ * doc/libxml2-api.xml, doc/*.html: Regenerated all docs.
+
+Tue Feb 13 18:15:58 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: Fixed memory bug with invalid function reported by
+ Francois Delyon on mailing list
+
+Mon Feb 12 16:40:48 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem with invalid char encountered
+ during text include (reported on xslt mailing list)
+
+Mon Feb 12 18:30:01 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: small cleanup to avoid packaging .svn
+ * libxml.h threads.c parser.c: applied patch to avoid a problem
+ in concurrent threaded initialization fix from Ted Phelps
+
+Thu Feb 08 15:35:18 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: added a GROW when parsing complex comments (bug #405666)
+ * gentest.py, testapi.c: added a hack to prevent destruction of any
+ param with 'destroy' in it's description (i.e. param destroyed by
+ the routine under test, so shouldn't be destroyed by testapi)
+ * xmlreader.c: added freeing of 'input' param even on error
+ (fixes leak detected by testapi)
+
+Wed Jan 31 10:25:38 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * testAutomata.c, testRegexp.c, testThreads.c, testThreadsWin32.c,
+ xmlwriter.c: repositioned #include for libxml.h to avoid
+ compilation error on some architectures (bug #398277)
+ * fixed screwed-up ChangeLog (deleted some duplicate entries)
+
+Fri Jan 26 00:05:18 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * implemented patch from Stéphane Bidoul for uri.c (bug #389767)
+
+Thu Jan 25 11:15:08 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: added checks for alloc fail on calls to
+ xmlXPathNewContext (libxslt bug #400242)
+
+Thu Jan 11 15:38:08 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * Re-generated the documentation (API chunks 27-29 were missing)
+ (also causes changes to testapi.c, elfgcchack.h and
+ win32/libxml2.def.src)
+
+Tue Jan 9 22:24:26 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: fix a memory leak in the python string handling
+ when SAX event are passed back to the python handlers
+
+Thu Jan 4 18:27:49 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fix xmlTextReaderSetup() description
+ * test/relaxng/empty1.rng test/relaxng/comps_0.xml
+ test/relaxng/empty1_0.xml test/relaxng/comps.rng
+ test/relaxng/empty0.rng test/relaxng/empty0_0.xml
+ test/relaxng/empty1_1.xml: tests which were apparently
+ never commited to CVS
+
+Wed Jan 3 16:05:21 PST 2007 Aleksey Sanin <aleksey@aleksey.com>
+
+ * xmlreader.c include/libxml/xmlreader.h win32/libxml2.def.src:
+ expose xmlTextReaderSetup() function
+
+Wed Jan 3 16:14:13 CET 2007 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: adapt the extra versioning code to SVN
+
+Thu Dec 14 16:52:34 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.py: apparently id() sometimes
+ generate negative values and %X outputs -XXXX :-(
+
+Mon Dec 4 10:30:25 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/tree.h: patch from Michael Day on standalone
+ and XML declaration detection, and associated documentation change
+
+Mon Dec 4 10:27:01 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: another XInclude user data propagation patch from
+ Michael Day
+
+Thu Nov 23 17:22:03 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from Steven Rainwater to fix
+ UTF8ToHtml behaviour on code points which are not mappable to
+ predefined HTML entities, fixes #377544
+
+Thu Nov 23 17:11:23 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed a bug where the principal node type of an axis
+ wasn't tested on name check, fixes bug #377432
+
+Wed Nov 8 10:19:27 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: change htmlCtxtReset() following Michael Day bug
+ report and suggestion.
+
+Mon Nov 6 09:56:41 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied patch from Igor for path conversion on Windows
+
+Thu Nov 2 11:29:17 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: another small change on the algorithm for the
+ elimination of epsilon transitions, should help on #362989 too
+
+Wed Nov 1 16:33:10 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied documentation patches from Markus Keim
+ * xmlregexp.c: fixed one bug and added a couple of optimisations
+ while working on bug #362989
+
+Fri Oct 27 14:54:07 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied a reworked version of Usamah Malik patch
+ to avoid growing the parser stack in some autoclose cases, should
+ fix #361221
+
+Thu Oct 26 10:54:40 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: William spotted an obvious bug
+
+Wed Oct 25 18:04:50 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in testapi.c doc//*: preparing release of
+ libxml2-2.6.27
+ * include/libxml/tree.h: fix a small problem with preproc flags
+
+Fri Oct 20 14:55:47 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix comment for xmlDocSetRootElement c.f. #351981
+ * xmllint.c: order XPath elements when using --shell
+
+Tue Oct 17 23:23:26 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: applied fix from Christopher Boumenot for bug
+ #362714 on regexps missing ']'
+
+Tue Oct 17 22:32:42 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: applied patch from Marius Konitzer to avoid
+ leaking in xmlNewInputFromFile() in case of HTTP redirection
+
+Tue Oct 17 22:19:02 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix one problem found in htmlCtxtUseOptions()
+ and pointed in #340591
+
+Tue Oct 17 22:04:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
+ htmlReadIO() this should fix #340322
+
+Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: applied patch from Olaf Walkowiak which should fix #334104
+
+Tue Oct 17 18:12:34 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixing HTML minimized attribute values to be generated
+ internally if not present, fixes bug #332124
+ * result/HTML/doc2.htm.sax result/HTML/doc3.htm.sax
+ result/HTML/wired.html.sax: this affects the SAX event strem for
+ a few test cases
+
+Tue Oct 17 17:56:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixing HTML entities in attributes parsing bug #362552
+ * result/HTML/entities2.html* test/HTML/entities2.html: added to
+ the regression suite
+
+Tue Oct 17 01:21:37 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: started to switch xmllint to use xmlSaveDoc to test
+ #342556
+ * xmlsave.c: fixed #342556 easy and a whole set of problems with
+ encodings, BOM and xmlSaveDoc()
+
+Mon Oct 16 15:14:53 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix #348252 if the document clains to be in a
+ different encoding in the meta tag and it's obviously wrong,
+ don't screw up the end of the content.
+
+Mon Oct 16 11:32:09 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix a chunking and script bug #347708
+
+Mon Oct 16 09:51:05 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: remove a warning
+ * encoding.c: check with uppercase for AIX iconv() should fix #352644
+ * doc/examples/Makefile.am: partially handle one bug report
+
+Sun Oct 15 22:31:42 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix the patch for unreproductable #343000 but
+ also fix a line/column keeping error
+ * result/errors/attr1.xml.err result/errors/attr2.xml.err
+ result/errors/name.xml.err result/errors/name2.xml.err
+ result/schemas/anyAttr-processContents-err1_0_0.err
+ result/schemas/bug312957_1_0.err: affected lines in error output
+ of the regression tests
+
+Sat Oct 14 10:46:46 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixing bug #344390 with xmlReconciliateNs
+
+Sat Oct 14 00:31:49 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added --html --memory to test htmlReadMemory to
+ test #321632
+ * HTMLparser.c: added various initialization calls which may help
+ #321632 but not conclusive
+ * testapi.c tree.c include/libxml/tree.h: fixed compilation with
+ --with-minimum --with-sax1 and --with-minimum --with-schemas
+ fixing #326442
+
+Fri Oct 13 18:30:55 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fix a Relax-NG bug related to element content processing,
+ fixes bug #302836
+ * test/relaxng/302836.rng test/relaxng/302836_0.xml
+ result/relaxng/302836*: added to regression tests
+
+Fri Oct 13 14:42:44 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a problem in xmlSplitQName resulting in bug #334669
+
+Fri Oct 13 12:27:22 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed xmlIOParseDTD handling of @input in error case,
+ Should fix #335085
+ * testapi.c: reset the http_proxy env variable to not waste time
+ on regression tests
+
+Thu Oct 12 23:07:43 CEST 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlIO.c: fix Windows compile - missing xmlWrapOpen.
+
+Thu Oct 12 18:21:18 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed the heuristic used when trying to detect mixed-content
+ elememts if the parser wants to treat ignorable whitespaces
+ in a non-standard way, should fix bug #300263
+
+Thu Oct 12 14:52:38 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a first arg error in SAX callback pointed out by
+ Mike Hommey, and another one still hanging around. Should fix #342737
+
+Wed Oct 11 23:11:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlversion.h.in: fix comment on versions
+ * xmlmemory.c: do not spend too much time digging in dumped memory
+
+Wed Oct 11 18:40:00 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed a weird error where validity context whould not
+ show up if warnings were disabled pointed out by Bob Stayton
+ * xmlIO.c doc/generator.py: cleanup and fix to regenerate the docs
+ * doc//* testapi.c: rebuilt the docs
+
+Wed Oct 11 14:32:00 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * libxml-2.0.pc.in: applied patch from Mikhail Zabaluev to separate
+ library flags for shared and static builds, fixes #344594. If this
+ bites you, use xml2-config.
+
+Wed Oct 11 11:27:37 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: remove the build path recorded in the python
+ shared module as Peter Breitenlohner pointed out, should fix #346022
+
+Wed Oct 11 11:14:51 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Mikhail Zabaluev fixing the conditions
+ of unescaping from URL to filepath, should fix #344588.
+
+Wed Oct 11 10:24:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xstc/Makefile.am: applied patch from Peter Breitenlohner
+ for wget detection and fix of a Python path problem, should fix
+ #340993
+
+Tue Oct 10 22:02:29 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/entities.h entities.c SAX2.c parser.c: trying to
+ fix entities behaviour when using SAX, had to extend entities
+ content and hack on the entities processing code, but that should
+ fix the long standing bug #159219
+
+Tue Oct 10 14:36:18 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c include/libxml/uri.h: add a new function xmlPathToUri()
+ to provide a clean conversion when setting up a base
+ * SAX2.c tree.c: use said function when setting up doc->URL
+ or using the xmlSetBase function. Should fix #346261
+
+Tue Oct 10 11:05:59 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied a portability patch from Emelyanov Alexey
+
+Tue Oct 10 10:52:01 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied and slightly modified a patch from Michael Day to
+ keep _private in the parser context when parsing external entities
+
+Tue Oct 10 10:33:43 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py python/types.c: applied patch from Ross Reedstrom,
+ Brian West and Stefan Anca to add XPointer suport to the Python bindings
+
+Fri Sep 29 11:13:59 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fixed a comment
+ * xinclude.c include/libxml/xinclude.h: applied a patch from Michael Day
+ to add a new function providing the _private field for the generated
+ parser contexts xmlXIncludeProcessFlagsData()
+
+Thu Sep 21 10:36:11 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Michael Day doing some refactoring
+ for the catalog entity loaders.
+
+Thu Sep 21 08:53:06 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c include/libxml/HTMLparser.h: exports htmlNewParserCtxt()
+ as Michael Day pointed out this is needed to use htmlCtxtRead*()
+
+Tue Sep 19 14:42:59 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Ben Darnell on #321545, I could not
+ reproduce the problem but 1/ this is safe 2/ it's better to be safe.
+
+Sat Sep 16 16:02:23 CEST 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: xmlTextConcat works with comments and PI nodes (bug #355962).
+ * parser.c: fix resulting tree corruption when using XML namespace
+ with existing doc in xmlParseBalancedChunkMemoryRecover.
+
+Fri Sep 1 11:52:55 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: another patch from Emelyanov Alexey to clean up a few things
+ in the previous patch.
+
+Wed Aug 30 15:10:09 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Roland Schwingel to fix the problem
+ with file names in UTF-8 on Windows, and compat on older win9x
+ versions.
+
+Tue Aug 22 16:51:22 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed a bug #203125 in Red hat bugzilla, crashing PHP4
+ on validation errors, the heuristic to guess is a vctxt user
+ pointer is the parsing context was insufficient.
+
+Mon Aug 21 10:40:10 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml:
+ applied patch to man pages from Daniel Leidert and regenerated
+
+Thu Aug 17 00:48:31 CEST 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlwriter.c: Add a document to the xmlwriter structure and
+ pass document when writing attribute content for encoding support.
+
+Wed Aug 16 01:15:12 CEST 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * HTMLtree.c xmlsave.c: Add linefeeds to error messages allowing
+ for consistant handling.
+
+Tue Aug 15 15:02:18 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Applied the proposed fix for the documentation
+ of xmlXPathCastToString(); see bug #346202.
+
+Tue Aug 15 14:49:18 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: While investigating bug #350247, I noticed
+ that xmlSchemaIDCMatcher structs are massively recreated
+ although only a maximum of 3 structs is used at the same
+ time; added a cache for those structures to the
+ validation context.
+
+Sat Aug 12 16:12:53 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Marton Illes to fix an allocation
+ bug in xmlSchemaXPathEvaluate should close #351032
+
+Mon Aug 7 13:08:46 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Bertrand Fritsch to fix a bug in
+ xmlSchemaClearValidCtxt
+
+Fri Aug 4 14:50:41 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: fixed the conversion of long parameters
+
+Thu Jul 13 15:03:11 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlsave.c: Removed the automatic generation of CDATA sections
+ for the content of the "script" and "style" elements when
+ serializing XHTML. The issue was reported by Vincent Lefevre,
+ bug #345147.
+ * result/xhtml1 result/noent/xhtml1: Adjusted regression test
+ results due to the serialization change described above.
+
+Thu Jul 13 08:32:21 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in parser.c xmllint.c include/libxml/parser.h
+ include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko
+ to expose if zlib support was compiled in, in the header, in the
+ feature API and in the xmllint --version output.
+
+Thu Jul 13 08:24:14 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: refactor to use normal warnings for entities problem
+ and not straight SAX callbacks.
+
+Wed Jul 12 17:13:03 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed bug #347316, reported by David Belius:
+ The simple type, which was the content type definition
+ of a complex type, which in turn was the base type of a
+ extending complex type, was missed to be set on this
+ extending complex type in the derivation machinery.
+
+Mon Jul 3 13:36:43 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Changed xmlXPathCollectAndTest() to use
+ xmlXPathNodeSetAddNs() when adding a ns-node in case of
+ NODE_TEST_TYPE (the ns-node was previously added plainly
+ to the list). Since for NODE_TEST_ALL and NODE_TEST_NAME
+ this specialized ns-addition function was already used,
+ I assume it was missed to be used with NODE_TEST_TYPE.
+
+Mon Jul 3 10:57:33 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied const'ification of strings patch from
+ Matthias Clasen
+
+Thu Jun 29 13:51:12 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: patch from Andrew W. Nosenko, xmlFreeRMutex forgot to
+ destroy the condition associated to the mutex.
+
+Thu Jun 29 12:48:00 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fixed a double-free in xmlXPathCompOpEvalToBoolean(),
+ revealed by a Libxslt regression test.
+
+Thu Jun 29 12:28:07 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Enhanced xmlXPathCompOpEvalToBoolean() to be also
+ usable outside predicate evaluation; the intention is to
+ use it via xmlXPathCompiledEvalToBoolean() for XSLT tests,
+ like in <xsl:if test="/foo">.
+
+Wed Jun 28 19:11:16 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fix a memory leak which occurred when using
+ xmlXPathCompiledEvalToBoolean().
+
+Mon Jun 26 17:24:28 UTC 2006 William Brack <wbrack@mmm.com.hk>
+
+ * python/libxml.c, python/libxml.py, python/tests/compareNodes.py,
+ python/tests/Makefile.am:
+ Added code submitted by Andreas Pakulat to provide node
+ equality, inequality and hash functions, plus a single
+ test program to check the functions (bugs 345779 + 345961).
+
+Mon Jun 26 18:38:51 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Added xmlXPathCompiledEvalToBoolean() to the API and
+ adjusted/added xmlXPathRunEval(), xmlXPathRunStreamEval(),
+ xmlXPathCompOpEvalToBoolean(), xmlXPathNodeCollectAndTest()
+ to be aware of a boolean result request. The new function
+ is now used to evaluate predicates.
+
+Mon Jun 26 16:22:50 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fixed an bug in xmlXPathCompExprAdd(): the newly
+ introduced field @rewriteType on xmlXPathStepOp was not
+ initialized to zero here; this could lead to the activation
+ of the axis rewrite code in xmlXPathNodeCollectAndTest() when
+ @rewriteType is randomly set to the value 1. A test
+ (hardcoding the intial value to 1) revealed that the
+ resulting incorrect behaviour is similar to the behaviour
+ as described by Arnold Hendriks on the mailing list; so I
+ hope that will fix the issue.
+
+Fri Jun 23 18:26:08 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fixed an error in xmlXPathEvalExpr(), which
+ was introduced with the addition of the d-o-s rewrite
+ and made xpath.c unable to compile if XPATH_STREAMING
+ was not defined (reported by Kupriyanov Anatolij -
+ #345752). Fixed the check for d-o-s rewrite
+ to work on the correct XPath string, which is ctxt->base
+ and not comp->expr in this case.
+
+Mon Jun 19 12:23:41 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Added optimization for positional predicates
+ (only short-hand form "[n]"), which have a preceding
+ predicate: "/foo[descendant::bar][3]".
+
+Sun Jun 18 20:59:02 EDT 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: try to fix the crash raised by the parser in
+ recover mode as pointed by Ryan Phillips
+
+Sun Jun 18 18:44:56 EDT 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c: patch from Nic Ferrier to provide a better type
+ mapping from XPath to python
+
+Sun Jun 18 18:35:50 EDT 2006 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: applied patch from Boz for VMS and reporting
+ Schemas errors.
+
+Sun Jun 18 18:22:25 EDT 2006 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c: applied patch from Felipe Contreras when compiling
+ with --with-minimum
+
+Fri Jun 16 21:37:44 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c include/libxml/tree.h: Fixed a bug in
+ xmlDOMWrapAdoptNode(); the tree traversal stopped if the
+ very first given node had an attribute node :-( This was due
+ to a missed check in the traversal mechanism.
+ Expanded the xmlDOMWrapCtxt: it now holds the namespace map
+ used in xmlDOMWrapAdoptNode() and xmlDOMWrapCloneNode() for
+ reusal; so the map-items don't need to be created for every
+ cloning/adoption. Added a callback function to it for
+ retrieval of xmlNsPtr to be set on node->ns; this is needed
+ for my custom handling of ns-references in my DOM wrapper.
+ Substituted code which created the XML namespace decl on
+ the doc for a call to xmlTreeEnsureXMLDecl(). Removed
+ those nastly "warnigns" from the docs of the clone/adopt
+ functions; they work fine on my side.
+
+Mon Jun 12 13:23:11 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/pattern/namespaces: Adjusted the result of a
+ regression test, since the fix of xmlGetNodePath() revealed a
+ bug in this test result.
+
+Mon Jun 12 13:06:03 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Got rid of a compiler warning in xmlGetNodePath().
+
+Mon Jun 12 12:54:25 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Fixed xmlGetNodePath() to generate the node test "*"
+ for elements in the default namespace, rather than generating
+ an unprefixed named node test and loosing the namespace
+ information.
+
+Fri Jun 9 21:45:02 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * include/libxml/parser.h: Clarified in the docs that the tree
+ must not be tried to be modified if using the parser flag
+ XML_PARSE_COMPACT as suggested by Stefan Behnel
+ (#344390).
+
+Tue Jun 6 17:50:43 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.ini NEWS doc//* libxml.spec.in : preparing release of 2.6.26
+
+Tue Jun 6 17:25:23 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Fixed self-invented a segfault in xmlXPathCtxtCompile(),
+ when the expression was not valid and @comp was NULL and I
+ tried to do the d-o-s rewrite.
+
+Tue Jun 6 15:19:57 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.ini NEWS doc//* libxml.spec.in : preparing release of 2.6.25
+
+Tue Jun 6 11:28:15 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Enabled the compound traversal again; I added a
+ check to use this only if the have an expression starting
+ with the document node; so in the case of "//foo", we
+ already know at compilation-time, that there will be only
+ 1 initial context node. Added the rewrite also to
+ xmlXPathEvalExpr().
+
+Tue Jun 6 10:23:10 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fix bug #343968, include='text' can't lead to a
+ recursion.
+
+Fri Jun 2 22:47:08 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Disabled the compound traversal for the release;
+ I need first to assure that this is done only if we have
+ 1 initial node.
+
+Wed May 31 13:53:41 PST 2006 Aleksey Sanin <aleksey@aleksey.com>
+
+ * xpath.c: fixed memory leak in xpath error reporting
+
+Wed May 31 15:30:16 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h triodef.h: applied patch from Olli Savia for LynxOS
+
+Wed May 31 14:33:00 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c include/libxml/xpath.h runsuite.c:
+ Changed the name of the recently added public function
+ xmlXPathContextSetObjectCache() to
+ xmlXPathContextSetCache(); so a more generic one, in
+ case we decide to cache more things than only XPath
+ objects.
+
+Tue May 30 21:36:16 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Optimized xmlXPathNodeCollectAndTest() and
+ xmlXPathNodeCollectAndTestNth() to evaluate a compound
+ traversal of 2 axes when we have a "//foo" expression.
+ This is done with a rewrite of the XPath AST in
+ xmlXPathRewriteDOSExpression(); I added an additional field
+ to xmlXPathStepOp for this (but the field's name should be
+ changed). The mechanism: the embracing descendant-or-self
+ axis traversal (also optimized to return only nodes which
+ can hold elements), will produce context nodes for the
+ inner traversal of the child axis. This way we avoid a full
+ node-collecting traversal of the descendant-or-self axis.
+ Some tests indicate that this can reduce execution time of
+ "//foo" to 50%. Together with the XPath object cache this
+ all significantly speeds up libxslt.
+
+Tue May 30 11:38:47 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: A warning will now be reported in the value of
+ the XSD attribute 'schemaLocation' does not consist of tuples
+ (namespace-name, document-URI). A warning will be reported
+ if a schema document could not be found at the specified
+ location (via 'schemaLocation' or
+ 'noNamespaceSchemaLocation').
+ * include/libxml/xmlerror.h: Added XML_SCHEMAV_MISC to
+ xmlParserErrors.
+
+Tue May 30 11:21:34 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Enhanced xmlXPathNodeCollectAndTest() to avoid
+ recreation (if possible) of the node-set which is used to
+ collect the nodes in the current axis for the currect context
+ node. Especially for "//foo" this will decrease dramatically
+ the number of created node-sets, since for each node in the
+ result node-set of the evaluation of descendant-or-self::node()
+ a new temporary node-set was created. Added node iterator
+ xmlXPathNextChildElement() as a tiny optimization for
+ child::foo.
+
+Mon May 29 18:06:17 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c include/libxml/xpath.h: Added an XPath object cache.
+ It sits on an xmlXPathContext and need to be explicitely
+ activated (or deactivated again) with
+ xmlXPathContextSetObjectCache(). The cache consists of 5
+ lists for node-set, string, number, boolean and misc XPath
+ objects. Internally the xpath.c module will use object-
+ deposition and -acquisition functions which will try to reuse
+ as many XPath objects as possible, and fallback to normal
+ free/create behaviour if no cache is available or if the cache
+ is full.
+ * runsuite.c: Adjusted to deactivate the cache for XML Schema
+ tests if a cache-creation is turned on by default for the whole
+ library, e.g. for testing purposes of the cache. It is
+ deactivated here in order to avoid confusion of the memory leak
+ detection in runsuite.c.
+
+Wed May 24 10:54:25 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Removed a memcpy if xmlXPathNodeSetMerge(); it
+ seems we really need to walk the whole list, since those
+ nastly namespace nodes need to be added with
+ xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible.
+ A flag on the node-set indicating if namespace nodes are in
+ the set would help here; this is the 3rd flag which would
+ be usefull with node-sets. The current flags I have in mind:
+ 1) Is a node-set already sorted?
+ This would allow for rebust and optimizable sorting
+ behaviour.
+ 2) Of what type are the nodes in the set (or of mixed type)?
+ This would allow for faster merging of node-sets.
+ 3) Are namespace nodes in the set?
+ This would allow to skipp all the namespace node specific
+ special handling. Faster node-set merging if the first
+ set is empty; just memcpy the set.
+
+Mon May 22 17:14:00 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Optimization of count(): eliminated sorting
+ (see bug #165547). Optimization of XPATH_OP_FILTER if the
+ predicate is a [1] (disable with XP_OPTIMIZED_FILTER_FIRST if
+ it produces trouble). Tiny opt in xmlXPathNodeSetMerge().
+
+Mon May 22 13:33:12 CEST 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: Revert behavior change in xmlSetProp to handle attributes
+ with colons in name and no namespace.
+
+Fri May 19 21:56:43 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Substituted all remaining calls to xmlXPathCmpNodes()
+ for xmlXPathCmpNodesExt(). Tiny further enhancement of
+ xmlXPathCmpNodesExt(). Added additional checks in various code
+ parts to avoid calling sorting or merging functions if the
+ node-set(s) don't need them; i.e., if they are empty or contain
+ just one node.
+
+Fri May 19 13:16:58 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Optimized the comparison for non-element nodes
+ in xmlXPathCmpNodesExt(); the comparison is used for sorting
+ of node-sets. This enhancement is related to bug #165547.
+ There are other places where the old comparison function
+ xmlXPathCmpNodes() is still called, but I currently don't
+ know exactly what those calls are for; thus if they can be
+ substituted (if it makes sense) for the new function.
+
+Tue May 16 16:55:13 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xpath.c: Applied patch from Rob Richards, fixing a potential
+ memory leak in xmlXPathTryStreamCompile(), when a list of
+ namespaces was assigned to the XPath compilation context;
+ here a new namespace list was created and passed to
+ xmlPatterncompile(); but this list was not freed afterwards.
+ Additionally we avoid now in xmlXPathTryStreamCompile() to
+ compile the expression, if it has a colon - indicating
+ prefixed name tests - and no namespace list was given. The
+ streaming XPath mechanism needs a namespace list at
+ compilation time (unlike normal XPath, where we can bind
+ namespace names to prefixes at execution time).
+ * pattern.c: Enhanced to use a string dict for local-names,
+ ns-prefixes and and namespace-names.
+ Fixed xmlStreamPushInternal() not to use string-pointer
+ comparison if a dict is available; this won't work, since
+ one does not know it the given strings originate from the
+ same dict - and they normally don't do, since e.g.
+ namespaces are hold on xmlNs->href. I think this would be
+ worth an investigation: if we can add a @doc field to xmlNs
+ and put the @href in to a additionan namespace dict hold
+ in xmlDoc. Daniel will surely not like this idea :-) But
+ evaluation of tons of elements/attributes in namespaces
+ with xmlStrEqual() isn't the way we should go forever.
+
+Thu May 11 18:03:49 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed bug #341337, reported by David Grohmann.
+ The code expected a node (xmlNodePtr) on the info for a
+ non-existent default attribute, which clearly cannot be
+ expected, since the attribute does not exist. I can only
+ guess that this sneaked trying to eliminate the query
+ for the owner-element, which is unavoidable actually.
+ Note that creation of default attributes won't have an
+ effect if validating via SAX/XMLReader; i.e., the processor
+ won't fire additional start-attribute events (I'm not even
+ sure if Libxml2 has such a SAX-event; I think it hands them
+ all over in the start-element event).
+
+Tue May 9 21:47:58 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed bug #341150, reported by Michael Romer.
+ In xmlSchemaBuildContentModelForSubstGroup(),
+ xmlAutomataNewOnceTrans2() was incorrectly used instead of
+ xmlAutomataNewTransition2() to mimic a xs:choice for
+ substitution-groups.
+ * test/schemas/subst-group-1_1.xsd
+ test/schemas/subst-group-1_0.xml
+ result/schemas/subst-group-1_0_1
+ result/schemas/subst-group-1_0_1.err: Added regression test
+ supplied by Michael Romer for bug #341150.
+
+Sat May 6 11:05:24 HKT 2006 William M. Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: Fixed compilation error with patch supplied by
+ Graham Bennett.
+
+Thu May 4 19:14:03 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: We'll raise an internal error and stop
+ validation now when an entity is found in the instance
+ document, since we don't support automatic entity
+ substitution by the schema processor (yet?) -
+ see bug #340316, reported by Nick Wellnhofer.
+
+Wed May 3 15:16:00 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: applied another Python detection patch from Joseph Sacco
+ * libxml.spec.in: cleanup the changelog section, asciifies the spec file
+ too
+
+Tue May 2 22:34:54 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fix a mix of code and declarations showing up on Windows
+ patch from Kjartan Maraas, fixing #340404
+
+Tue May 2 14:24:40 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fixing bug #340398 xmlCharEncOutFunc writing to
+ input buffer
+
+Fri Apr 28 18:29:22 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in doc//*: preparing 2.6.24 release, fixed Python
+ paths at the last moment
+ * relaxng.c testapi.c tree.c: fix some comments
+
+Thu Apr 27 10:15:45 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Roland Schwingel to allow UTF-8
+ file paths on Windows
+
+Thu Apr 27 10:10:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: patch from Jason Viers for line breaks after EndPI
+
+Tue Apr 25 22:22:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix compilation without tree
+
+Tue Apr 25 18:17:37 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: applied patch from Gary Coady to really make sure
+ xmllint --nonet would not reach the network, should fix #337483.
+
+Tue Apr 25 14:52:15 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: applied patch from Joseph Sacco changing slightly
+ the python detection scheme should fix bug #338526
+
+Mon Apr 24 10:50:19 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix the error message for invalid code point in content
+ c.f. bug #339311
+
+Wed Apr 19 13:16:23 CEST 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c test/schemas/restriction-enum-1*
+ result/schemas/restriction-enum-1*: Fixed incorrect
+ validation of restricted enumerations. Added related
+ regression tests.
+
+Thu Apr 13 09:47:25 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixing a deallocation problem in xmlSchemaAddSchemaDoc()
+ in case of errors, should fix bug #338303
+
+Thu Apr 13 09:31:45 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixing a deallocation problem in xmlRelaxNGParse()
+ in case of errors, should fix bug #338306
+
+Thu Apr 6 10:22:17 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml:
+ applied man page improvements from Daniel Leidert
+
+Mon Mar 27 11:44:07 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: removed unused code or variables, from Stefan Kost
+ fixing #336163 and #336164
+
+Mon Mar 27 11:38:21 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Stefan Kost fixing #336160
+
+Mon Mar 27 11:23:39 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * chvalid.c genChRanges.py genUnicode.py xmlunicode.c
+ include/libxml/chvalid.h include/libxml/xmlunicode.h: applied
+ patches from Aivars Kalvans to make unicode tables const, fixes
+ bug #336096, this also updates to Unicode 4.01 final with a couple
+ of character ranges fixes.
+
+Mon Mar 27 00:51:40 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug
+ #335603 and resync'ed genChRanges.py to the expected output.
+
+Wed Mar 22 00:14:34 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: applied patch from Youri Golovanov fixing bug
+ #316338 and adding a couple of optimizations in the regexp
+ compilation engine.
+ * test/regexp/bug316338 result/regexp/bug316338: added regression
+ tests based on the examples provided in the bug report.
+
+Fri Mar 10 08:40:55 EST 2006 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few
+ warning raised by gcc-4.1 and latests changes
+
+Fri Mar 10 01:34:42 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c
+ xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first
+ pass on coverity reports.
+
+Thu Mar 9 19:36:14 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlschemas.c xmlschemastypes.c: more cleanups based
+ on coverity reports.
+
+Thu Mar 9 17:47:40 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c catalog.c encoding.c entities.c example/gjobread.c
+ python/libxml.c: more cleanups based on coverity reports.
+
+Thu Mar 9 15:12:19 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch
+ of small cleanups based on coverity reports.
+
+Thu Mar 9 09:42:10 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.bcb: added schematron as pointed out by Eric Zurcher
+
+Tue Mar 7 09:50:09 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xml2-config.in: fix Red Hat bug #184170
+
+Mon Mar 6 14:21:08 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Simplified usage of the internal xmlNsMap. Added a
+ "strict" lookup for namespaces based on a prefix. Fixed a
+ namespace processing issue in the clone-node function, which
+ occured if a @ctxt argument was given.
+
+Fri Mar 3 17:44:10 CET 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * valid.c: fix HTML attribute ID checking for input element.
+ Maintain current attribute "name" behavior for now.
+
+Thu Mar 2 18:59:50 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Bundled lookup of attr-nodes and retrieving their
+ values into the functions xmlGetPropNodeInternal() and
+ xmlGetPropNodeValueInternal(). Changed relevant code
+ to use those functions.
+
+Mon Feb 27 20:42:04 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: workaround HP-UX compiler bug by Rick Jones
+
+Mon Feb 27 10:57:05 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml2.py: remove a tab, as pointed out on IRC
+
+Sat Feb 25 18:12:10 CET 2006 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: Fix the add sibling functions when passing attributes.
+ Modify testing for ID in xmlSetProp.
+ No longer remove IDness when unlinking or replacing an attribute.
+
+Fri Feb 24 21:20:33 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: Martin Cole pointed out a bug in xmlCatalogAdd()
+ if /etc/xml/catalog doesn't exist.
+
+Thu Feb 23 23:06:18 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc//*: updated the Ruby bindings links, and regenerated the
+ docs.
+
+Thu Feb 23 09:12:27 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: improve catalog debugging message patch from Rick Jones
+
+Wed Feb 22 16:09:10 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c: Nic Ferrier found debug statement left in the
+ XPath conversion code
+
+Tue Feb 21 20:23:14 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.xml: small man page improvements from
+ Daniel Leidert
+
+Mon Feb 20 15:45:19 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a side-effect of the previous XSI bugfix:
+ The constructor needs a bucket to be assigned during component
+ fixup.
+
+Mon Feb 20 14:32:36 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlschemastypes.c: Fixed xs:boolean to reject
+ the empty string (reported by Bas Driessen on the mailing-list).
+ Fixed schema XSI-acquisition and construction: the schemata
+ (xmlSchema) didn't get the targetNamespace in some cases, thus
+ the component resolution mechanism failed to work. The XSI
+ stuff needs to be tested more intensively; think about how
+ to test this for regression.
+
+Mon Feb 20 09:57:41 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.xml: more man page improvements from
+ Daniel Leidert
+
+Sun Feb 19 22:31:33 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.xml: man page improvements from Daniel
+ Leidert, c.f. #331290
+
+Sun Feb 19 17:54:04 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: fix an error report when using --path and --valid
+ closes bug #331290
+
+Sun Feb 19 16:20:43 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: trying to fix #331062, this is again a problem
+ around interleave, there is no good fix unless reimplementing
+ but this works around some cases and allow to validate in that
+ case.
+
+Wed Feb 15 11:55:22 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Fixed bug #328896 reported by Liron. The path
+ for text- and CDATA-section-nodes was computed incorrectly
+ in xmlGetNodePath().
+
+Sun Feb 12 20:12:22 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: bug fixes for #327167 as well as some cleanups
+ and more thorough tests on atoms comparisons.
+
+Thu Feb 9 10:07:20 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * include/wsockcompat.h: patch from Eric Zurcher to compile with
+ Borland C++ 6
+
+Sun Feb 5 04:03:59 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: bill pointed out a missing block in xmlParseComment
+ trying to fill with a normal processing of the given character.
+
+Sun Feb 5 03:41:39 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed the comment streaming bug raised by Graham Bennett
+ * test/badcomment.xml result//badcomment.xml*: added to the regression
+ suite.
+
+Fri Feb 3 17:36:41 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * include/libxml/tree.h: Added the xmlDOMWrapCloneNode() to
+ the header file.
+
+Fri Feb 3 17:29:22 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Added an initial version of xmlDOMWrapCloneNode() to
+ the API. It will be used to reflect DOM's Node.cloneNode and
+ Document.importNode methods.
+ The pros: 1) non-recursive, 2) optimized ns-lookup
+ (mostly pointer comparison), 3) user defined ns-lookup,
+ 4) save ns-processing. The function is in an unfinished
+ and experimental state and should be only used to test it.
+
+Fri Feb 3 10:42:48 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied patch from Rob Richards fixing the URI regressions
+ tests on Windows which seems to indicate bad escaping.
+
+Thu Feb 2 13:11:26 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt
+ the previous addition of the removal of redundant ns-decls.
+
+Wed Feb 1 17:32:25 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove
+ redundant ns-decls if the option XML_DOM_RECONNS_REMOVEREDUND
+ was given. Note that I haven't moved this option to the
+ header file yet; so just call this function with an @option
+ of 1 to test the behaviour.
+
+Wed Feb 1 12:21:08 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tapi.c win32/Makefile.*: Added changed as proposed on
+ the mailing list by venkat naidu in order to compile
+ testapi.c on windows.
+
+Thu Jan 19 09:57:28 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xml2-config.in: trying to fix windows/configure
+ issues reported by Tim Van Holder
+
+Wed Jan 18 18:21:15 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c libxml.h parser.c: try to fix xmlParseInNodeContext
+ when operating on an HTML document.
+
+Mon Jan 9 17:27:15 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * relaxng.c include/libxml/relaxng.h: Added
+ xmlRelaxNGSetParserStructuredErrors() to the API.
+
+Mon Jan 9 15:33:16 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: reverted first patches for #319279 which led to #326295
+ and fixed the problem in xmlParseChunk() instead
+ * test/ent11 result//ent11*: added test for #326295 to the regression
+ suite
+
+Thu Jan 5 16:25:06 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in libxml.spec.in testapi.c doc/*: upated the news
+ regenerated the docs, preparing for release of 2.6.23
+ * pattern.c xmlschemas.c: fixed some comments
+
+Thu Jan 5 15:48:27 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/XPath/docs/nodes test/XPath/tests/nodespat
+ result/XPath/tests/nodespat: Added regression tests for
+ the latest XPath/pattern fixes.
+
+Thu Jan 5 15:43:38 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c: Another fix to handle "foo//.": "foo" was not
+ included in the resulting node-set.
+
+Thu Jan 5 13:22:29 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c xpath.c include/libxml/pattern.h:
+ Fixed bug #322928, reported by Erich Schubert: The bug was
+ in pattern.c, which is used for a tiny subset of xpath
+ expression which can be evaluated in an optimized way.
+ The doc-node was never considered when evaluating "//"
+ expressions. Additionally, we fixed resolution
+ to nodes of any type in pattern.c; i.e. a "//." didn't work
+ yet, as it did select only element-nodes. Due to this
+ issue the pushing of nodes in xpath.c needed to be adjusted
+ as well.
+
+Wed Jan 4 18:07:47 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: tiny refactoring patch from Bjorn Reese
+
+Wed Jan 4 15:00:51 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fix bug #324432 with <xml:foo/>
+ * test/ns7 resul//ns7*: added to the regression tests
+
+Wed Jan 4 10:53:56 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * include/wsockcompat.h: applied patch from Mark Junker, fixing a
+ MinGW compilation problem, should close bug #324943
+
+Tue Jan 3 11:49:54 CET 2006 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed last dependency on the obsolete enum
+ xmlSchemaValidError.
+
+Mon Jan 2 11:20:00 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation
+ and doc build fixes from Michael Day
+
+Wed Dec 28 22:12:34 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: bug in xmlRegExecPushString2() pointed out by
+ Sreeni Nair.
+
+Tue Dec 20 16:55:31 CET 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is
+ a child of an element (fix by Oleksandr Kononenko).
+ * HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat.
+
+Tue Dec 20 11:43:06 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlstring.c: Fixed a segfault during
+ text concatenation when validating a node tree:
+ xmlStrncat was called with a @len of -1; but unlike
+ xmlStrncatNew, it does not calculate the length
+ automatically in such a case (reported by Judy Hay
+ on the mailing list).
+ Updated the descriptions of the involved string
+ functions to note this.
+
+Thu Dec 15 12:11:07 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: applied patch from Gary Coady to accept gzipped
+ http resources.
+
+Wed Dec 14 18:41:26 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * win32/configure.js: Added enable/disable of runtime
+ debugging (LIBXML_DEBUG_RUNTIME).
+
+Wed Dec 14 18:11:50 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * include/libxml/xmlversion.h.in: Fixed to define
+ LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@.
+
+Tue Dec 13 12:49:23 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/bug321475* result/schemas/bug321475*:
+ Added regression test for bug #321475 (reported by
+ Gabor Nagy). Fixing of bug #323510 seemed to have
+ fixed this bug as well.
+
+Mon Dec 12 16:19:16 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/bug323510* result/schemas/bug323510*:
+ Added regression test for bug #323510.
+
+Mon Dec 12 16:11:13 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Workaround for bug #323510 (reported by
+ Jonathan Filiatrault): substituted the epsilon transition
+ for a labelled transition, in order to avoid a bug in
+ xmlregexp.c which eliminated the epsilon transition and
+ marked the initial state as final.
+
+Mon Dec 12 14:25:46 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: Gary Coady pointed a memory leak in
+ xmlTextReaderReadInnerXml() applied patch fixing #323864
+
+Sat Dec 10 12:08:28 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c
+ testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number
+ of warnings shown by HP-UX compiler and reported by Rick Jones
+
+Fri Dec 9 18:57:31 CET 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlwriter.c: Insert space between pubid and sysid when both
+ passed to xmlTextWriterStartDTD and indenting not being used.
+ Remove no longer used Mem callbacks.
+
+Fri Dec 9 11:01:16 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * runsuite.c: Changed to instantly mark instance-tests as
+ failed if the corresponding schema was invalid. This
+ reflects the side of the Python code for the XML Schema test
+ suite. We now get the same number of failed tests on both
+ sides.
+
+Wed Dec 7 14:59:01 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlreader.c include/libxml/xmlreader.h: Added
+ xmlTextReaderSchemaValidateCtxt() to the API.
+
+Wed Dec 7 12:59:56 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a segfault: the instance document was
+ still tried to be validated, if the schema, dynamically
+ acquired using XSI was invalid, thus mangled. The
+ validation will stop (or rather won't validate) now in
+ such a case. The schema parser error code will be set
+ on the validion context now; this is somehow not nice,
+ but it assures that the validation context indicates an
+ error in there was a parser error.
+
+Tue Dec 6 18:57:23 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: small doc patch from Aron Stansvik
+ * legacy.c: another doc patch for a deprecated API
+
+Mon Dec 5 16:23:49 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * Makefile.am: Tiny change for 'make tests': raised
+ the number of expected failures for James Clark's
+ XML Schema datatype tests from 10 to 11. The additional
+ reported error was agreed to be correct long time ago,
+ but we missed to adjust the message reported by
+ the testing script.
+
+Fri Dec 2 13:51:14 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/decimal* result/schemas/bug322411*:
+ Added missing regression test results for the latest IDC
+ and xs:decimal bugs.
+
+Wed Nov 30 12:22:23 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/decimal* test/schemas/bug322411*: Added
+ regression tests for the latest IDC and xs:decimal bugs.
+
+Wed Nov 30 11:57:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed bubbling of duplicate IDC nodes: the
+ parent's list of duplicates was filled with NULLs instead
+ of the nodes under certain conditions. This lead to a
+ segfault when the list's entries were accessed.
+
+Mon Nov 28 17:28:53 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Fixed parsing of xs:decimal to
+ allow/deny special lexical forms. Fixed the totalDigits
+ for values in the range (x < 1) && (x > -1) && (x != 0);
+ E.g "0.123" has now a totalDigits of 3 (was 4 previously).
+ Adjusted the comparison function for decimals due to this
+ change. As a side effect comparison against zeroes was
+ optimized.
+
+Mon Nov 28 13:25:11 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: An assignment to a local variable, which was
+ used to access the IDC node list, was missing after the
+ reallocation of the list (reported by Fabrice GUY
+ bug #322411). Renamed the define ENABLE_IDC_NODE_TABLES
+ to ENABLE_IDC_NODE_TABLES_TEST and *disabled* it, since
+ it is used to force bubbling of IDC node tables even
+ if not necessary; this was intended to be used for test
+ purposes, but I obviously missed to disable it (although
+ it apparently helped finding the bug).
+
+Wed Nov 23 17:34:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: In xmlSchemaAssembleByXSI() the return value
+ of xmlSchemaGetMetaAttrInfo() was not assigned to anything;
+ this caused XSI-driven-dynamic schema acquisition to fail
+ with @noNamespaceSchemaLocation (reported by Julien Lamy
+ on the mailing list).
+
+Tue Nov 22 18:31:34 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a bug in xmlSchemaFindRedefCompInGraph()
+ which caused the search for components to stop at the
+ first encountered attribute group component.
+ Fixed error report in xmlSchemaCheckSRCRedefineFirst(): the
+ designation of a not-found component was not reported.
+
+Mon Nov 21 12:23:28 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: Albert Chin found another signed/unsigned problem
+ in the date and time code raised on IRIX 6.5
+
+Fri Nov 18 18:13:38 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/xmlschemas.h:
+ Added xmlSchemaSetParserStructuredErrors() to the API.
+ Fixed channeling of error relevant information to
+ subsequent parser/validation contexts.
+
+Thu Nov 17 14:11:43 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: removed unreachable code pointed out by
+ Oleksandr Kononenko, fixes bug #321695
+
+Thu Nov 17 08:24:31 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: use ctxt->standalone = -2 to indicate that the
+ XMLDecl was parsed but no standalone attribute was found,
+ suggested by Michael Day to detect if an XMLDecl was found.
+
+Tue Nov 15 09:49:24 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests
+ were not properly reported.
+
+Sun Nov 13 13:42:41 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Geert Jansen to remove xmlBufferClose()
+ which is not needed.
+
+Fri Nov 11 13:48:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Changed xmlSchemaFormatIDCKeySequence()
+ to use xmlSchemaGetCanonValueWhtspExt() in order to
+ correctly report values for xs:anySimpleType.
+ * test/schemas/idc-keyref-err1*
+ result/schemas/idc-keyref-err1*: Added a test for this change.
+
+Wed Nov 9 13:07:24 EST 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlIO.c xmlwriter.c: function consolidation when writing to xmlBuffer.
+ Return error condition not len if xmlwriter fails writing to buffer.
+
+Wed Nov 9 09:54:54 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c xmlIO.c include/libxml/xmlIO.h include/libxml/xmlsave.h:
+ applied patch from Geert Jansen to implement the save function to
+ a xmlBuffer, and a bit of cleanup.
+
+Mon Nov 7 14:58:39 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlschemastypes.c: Fixed the type of the
+ totalDigits value to be positiveInteger.
+ Fixed crash in an error report function when we gave it
+ the document node; only element and attribute nodes are
+ processed now (reported by Rob Richards).
+
+Tue Nov 1 16:22:29 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fix bug #319897, problem with counted atoms
+ when the transition itself is counted too
+ * result/regexp/hard test/regexp/hard: augmented the regression
+ tests with the problem exposed.
+
+Tue Nov 1 11:54:39 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.mingw include/win32config.h: applied patch from
+ Mark Junker to fix compilation with MinGW
+
+Fri Oct 28 18:36:08 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.3: tiny fix from Albert Chin
+ * runsuite.c runtest.c testapi.c: portability cleanup for arch
+ needing trio for *printf
+
+Fri Oct 28 12:21:39 EDT 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: add additional checks to prevent tree corruption. fix problem
+ copying attribute using xmlDocCopyNode from one document to another.
+
+Fri Oct 28 17:58:13 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in vms/config.vms macos/src/config-mac.h:
+ cleanup from Albert Chin
+ * doc/Makefile.am: html/index.sgml doesn't exist anymore
+
+Fri Oct 28 16:53:51 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c xmlmodule.c: more portability patches from Albert Chin for
+ HP-UX and AIX
+
+Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmodule.c configure.in: applied 2 patches from Albert Chin for
+ module portability
+
+Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: fixing a portability problem on some old Unices with
+ patch from Albert Chin
+
+2005-10-27 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c result/c14n/exc-without-comments/test-2
+ test/c14n/exc-without-comments/test-2.xml
+ test/c14n/exc-without-comments/test-2.xpath: fixing
+ bug in exc-c14n namespace visibility + test case (bug #319367)
+
+Thu Oct 27 16:10:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: remove warnings to stdout patch from Nic Ferrier
+
+Thu Oct 27 13:54:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c xmlregexp.c include/libxml/valid.h
+ include/libxml/xmlregexp.h: avoid function parameters names 'list'
+ as this seems to give troubles with VC6 and stl as reported by
+ Samuel Diaz Garcia.
+
+Wed Oct 26 10:59:21 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fix a problem in some error case on Solaris
+ when passed a NULL filename, pointed by Albert Chin.
+
+Tue Oct 25 14:34:58 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: script HTML parser error fix, corrects bug #319715
+ * result/HTML/53867* test/HTML/53867.html: added test from Michael Day
+ to the regression suite
+
+Tue Oct 25 14:21:11 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: typo fix from Michael Day
+
+Mon Oct 24 20:16:23 EDT 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * tree.c: fix issue adding non-namespaced attributes in xmlAddChild(),
+ xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1.
+
+Sat Oct 22 10:00:41 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed second spot where CRLF split between chunks
+ could cause trouble (bug #319279)
+ * gentest.py, testapi.c: fixed two problems involved with
+ --with-minimum compilation (compilation errors with schematron
+ and formal expressions tests)
+
+Fri Oct 21 10:50:14 EDT 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlsave.c: prevent output of fragment tags when serializing XHTML.
+
+Wed Oct 19 16:53:47 BST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: commiting a some fixes and debug done yesterday in
+ the London airport.
+
+Thu Oct 20 12:54:23 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed creation of a temporary parser context
+ during validation when processing xsi:type; this previously
+ added a string to the dict of the schema - to assure thread
+ safety, we don't want to modify a given schema during
+ validation.
+
+Thu Oct 20 17:05:29 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xmlwriter.c: fixed problem in xmlTextWriterVSprintf caused by
+ misuse of vsnprintf
+ * configure.in, config.h.in: added a configuration check for
+ va_copy and added a define for VA_COPY for xmlwriter.c fix
+ * parser.c: fixed problem with CRLF split between chunks (bug
+ #319279) (fix provided by Brion Vibber)
+
+Wed Oct 19 18:49:52 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a potential memory leak in
+ xmlSchemaCheckCSelectorXPath() when an internal error occurs.
+ Fixed setting of ctxt->err to the given error code in
+ the parsing error functions.
+ * pattern.c: Added internal xmlCompileIDCXPathPath() as a
+ starting point for IDC XPath compilation; this and some other
+ tiny changes fixes issues regarding whitespace in the
+ expressions and IDC selector/field relevant restrictions of
+ the subset of XPath. Fixed a missing blocking of attributes
+ in xmlStreamPushInternal().
+
+Mon Oct 17 15:06:05 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: removed the error message
+ * relaxng.c xmlschemas.c: removed 2 instability warnings from function
+ documentation
+ * include/libxml/schemasInternals.h: changed warning about API stability
+ * xmlregexp.c: trying to improve runtime execution of non-deterministic
+ regexps and automata. Not fully finished but should be way better.
+
+Mon Oct 17 16:12:02 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a memory leak in
+ xmlSchemaContentModelDump(). Added output of local types
+ in xmlSchemaElementDump(). Tiny cosmetical changes to the
+ dump output.
+
+Mon Oct 17 14:29:08 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c pattern.c: Silenced intel compiler warnings (reported
+ by Kjartan Maraas, bug #318517).
+ * xmlschemas.c: The above changes in pattern.c revealed an
+ inconsistency wrt IDCs: we now _only_ pop XPath states, if
+ we really pushed them beforehand; this was previously not
+ checked for the case when we discover an element node to be
+ invalid wrt the content model.
+ Fixed segfault in xmlSchemaGetEffectiveValueConstraint().
+
+Fri Oct 14 16:40:18 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/*.err: Adapted regression test results.
+
+Fri Oct 14 16:21:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed some identity-constraint issues:
+ Restructured IDC node-tables
+ Allowed IDCs to resolve also to nodes of complex type with
+ simple content.
+ Added check for keyrefs with references to keyrefs.
+ IDC target-nodes were interferring with IDC node-tables,
+ since they used one list of entries only. I separated this
+ one big list into 3 lists: 1 for IDC node-table entries,
+ 1 for _duplicates_ of IDC node-table entries and 1 for
+ IDC target-nodes. More code, but cleaner and it works at last.
+ Keyrefs will fail to resolve to duplicate key/unique entries.
+ I thought this was already working this way, but it didn't.
+ The wording of the definition for [node table] in the spec
+ can lead to a scenario, where keyrefs resolve perfectly, even
+ if the relevant key-sequences of the referenced key/unique have
+ duplicates in the subtree. Currently only Saxon 8.5.1 is
+ dissallowing resolution to duplicate entries correctly - we
+ will follow Saxon here.
+ Removed some intel compiler warnings (reported by
+ Kjartan Maraas, bug #318517).
+ * pattern.c: Fixed an IDC-XPath problem when resolving to
+ attributes.
+
+Mon Oct 14 01:15:14 CEST 2005 Rob Richards <rrichards@ctindustries.net>
+ * nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak
+ to use getaddrinfo() if supported in Windows build (bug# 317431).
+
+Mon Oct 10 15:33:48 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/*: Adapted regression test results.
+
+Mon Oct 10 15:12:43 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: Initial implementation for
+ redefinitions; this still misses checks for restrictions
+ of the content model of complex types.
+ Fixed default/fixed values for attributes (looks like they
+ did not work in the last releases).
+ Completed constraints for attribute uses.
+ Seperated attribute derivation from attribute constraints.
+ Completed constraints for attribute group definitions.
+ Disallowing <import>s of schemas in no target namespace if the
+ importing schema is a chameleon schema. This contradicts
+ the way Saxon, Xerces-J, XSV and IBM's SQC works, but the
+ W3C XML Schema WG, thinks it is correct to dissalow such
+ imports.
+ Added cos-all-limited constraints.
+ Restructured reference resolution to model groups and element
+ declarations.
+ Misc cleanup.
+
+Fri Oct 7 04:34:12 CEST 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * schematron.c xmlregexp.c: remove warnings under Windows.
+
+Wed Sep 28 23:42:14 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Massimo Morara fixing bug #317447
+ about risk of invalid write in xmlStringLenDecodeEntities
+
+Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: Adrian Mouat pointed out redundancies in xmlReportError()
+
+Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: seems a test to avoid duplicate transition is
+ really needed at all times. Luka Por gave an example hitting
+ this. Changed back the internal API.
+
+Thu Sep 22 13:14:07 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixing leak in xmlTextReaderReadString() #316924
+
+Thu Sep 15 16:12:44 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: more fixes to the behaviour of xmlBuildRelativeURI
+
+Thu Sep 15 15:08:21 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: detect combinatory explosion and return with
+ a runtime error in those case, c.f. #316338 though maybe we
+ should not see such an explosion with that specific regexp,
+ more checking needs to be done.
+
+Wed Sep 14 19:52:18 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * include/libxml/schemasInternals.h: Added some comments for the
+ struct fields.
+
+Wed Sep 14 13:24:27 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: fixed problem when xmlBuildRelativeURI was given a
+ blank path (bug 316224)
+
+Mon Sep 12 23:41:40 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in doc//*: release of 2.6.22 updated doc and
+ rebuild.
+ * xmlsave.c include/libxml/xmlsave.h: added XML_SAVE_NO_XHTML
+ xmlSaveOption
+ * xmlschemas.c: minor cleanups
+
+Mon Sep 12 21:42:47 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/import1_0.xsd: And adapting another one.
+
+Mon Sep 12 21:29:35 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/derivation-ok-extension_0_0: Adapted result.
+
+Mon Sep 12 21:20:41 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/allsg_0_3.err result/schemas/allsg_0_4.err
+ result/schemas/changelog093_1_0.err
+ result/schemas/derivation-ok-extension_0_0.err
+ result/schemas/import1_0_0.err
+ result/schemas/derivation-ok-restriction-2-1-1_0_0.err:
+ Adapted regression results.
+
+Mon Sep 12 21:00:53 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: Completion of the schema graph.
+ Centralisation, more robustness of the schema document
+ aquisition story. Centralised and restructured component fixup.
+ Fixed attribute derivation when 'prohibiting' attribute uses.
+ Added warnings: when schema documents cannot be localized
+ during imports; when we get duplicate and pointless attribute
+ prohibitions. Changed error reports for IDCs to report
+ the relevant IDC designation as well (requested by GUY Fabrice).
+ Misc code-cleanup.
+
+Mon Sep 12 16:02:12 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: applied second patch from David Madore to be less intrusive
+ when handling scripts and style elements in XHTML1 should fix #316041
+ * test/xhtml1 result//xhtml1\*: updated the test accordingly
+
+Mon Sep 12 15:09:09 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in doc/devhelp/*: finished the integration with
+ devhelp, completing the index and inserted into the gtk-doc
+ database at "make install" stage
+
+Mon Sep 12 14:14:12 CEST 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * include/libxml/xmlsave.h xmlsave.c: add XML_SAVE_NO_EMPTY save option
+ and use option from xmlSaveCtxtPtr rather than global during output.
+ * xmlsave.c: fix some output formatting for meta element under XHTML.
+
+Mon Sep 12 11:12:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h parser.c xmllint.c: damn XML_FEATURE_UNICODE
+ clashes with Expat headers rename to XML_WITH_ to fix bug #316053.
+ * doc/Makefile.am: build devhelp before the examples.
+ * doc/*: regenerated the API
+
+Mon Sep 12 02:03:12 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fix bug #316034, where xmlElemDump() can crash if
+ given a document pointer instead of an element
+
+Mon Sep 12 01:26:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/devhelp/devhelp.xsl: improvements on the html generation,
+ should be complete with navigation, what is left done is glueing
+
+Mon Sep 12 00:03:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml
+ doc/devhelp/*: started work needed to generate devhelp content,
+ not too hard based on the existing format and extractor.
+
+Fri Sep 9 12:56:19 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixes bug #315617 when using push CDATA in some cases.
+
+Thu Sep 8 23:39:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: patch from Stéphane Bidoul to compile without schematron
+
+Wed Sep 7 00:16:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: patch from Oleg Paraschenko to fix xmlDebugDumpNode()
+ when handled a namespace node.
+
+Sun Sep 4 23:36:45 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS elfgcchack.h testapi.c doc/*: updated the docs and rebuild
+ releasing 2.6.21
+ * include/libxml/threads.h threads.c: removed xmlIsThreadsEnabled()
+ * threads.c include/libxml/threads.h xmllint.c: added the more
+ generic xmlHasFeature() as suggested by Bjorn Reese, xmllint uses it.
+
+Sun Sep 4 22:45:49 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* configure.in: prepare for release
+ * xpath.c: work for #303289, fix a formatting bug for MIN_INT
+
+Sun Sep 4 15:48:57 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: real fix for #314881 and #314759 is was a bit more complex
+ than initially expected as ctxt->error == NULL had behaviour side
+ effects at the compilation level itself.
+
+Sun Sep 4 14:01:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c xpath.c include/libxml/pattern.h: fixing yet another
+ pattern induced XPath bug #314282
+ * relaxng.c: reverted back last change it was seriously broken
+
+Sat Sep 3 16:51:55 CEST 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlsave.c: check for NULL to prevent crash with meta elements
+
+Sat Sep 3 16:26:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: structured error reporting problem with Relax-NG
+ should fix #314881 and #314759
+
+Sat Sep 3 15:42:29 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c: fixes a portability problem raised by C370 on Z/OS
+
+Sat Sep 3 15:26:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id
+ but more generally related to attributes and ID handling, fixes
+ #314358 among other things
+
+Fri Sep 2 14:26:43 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c parserInternals.c: avoid passing a char[] as snprintf
+ first argument.
+ * threads.c include/libxml/threads.h: implemented xmlIsThreadsEnabled()
+ based on Andrew W. Nosenko idea.
+ * doc/* elfgcchack.h: regenerated the API
+
+Thu Sep 1 14:44:42 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: the use of AM_PATH_PYTHON is not portable enough
+ reverting back to AM_PATH_PROG
+
+Thu Sep 1 11:42:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: Applied the last patch from Gary Coady for #304637
+ changing the behaviour when text nodes are found in body
+ * result/HTML/*: this changes the output of some tests
+
+Thu Sep 1 11:22:37 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/downloads.html doc/xml.html: adding reference to Bull AIX rpms
+ c.f. #160598
+
+Wed Aug 31 11:39:02 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xml2-config.in: removed the obsolete --libtool-libs option, c.f.
+ bug #314853
+
+Fri Aug 26 17:33:26 CEST 2005 Rob Richards <rrichards@ctindustries.net>
+
+ * xmlsave.c: move handling of meta element for http-equiv in XHTML docs
+ to serialization and no longer modify internal tree.
+
+Fri Aug 26 00:51:58 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: the profiling usually don't work, disabled
+ * doc/*: rebuilt
+
+Thu Aug 25 23:47:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: trying to fix the first part of #310033 by
+ detecting gcc <= 3.2
+
+Thu Aug 25 22:13:37 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: fixed bug #310033, the URI extraction code given a
+ node is a bit twisted and broke in the last months.
+
+Thu Aug 25 16:18:15 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c result/XPath/xptr/strrange2: uninitialized field and
+ fix on test.
+
+Thu Aug 25 16:03:05 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: change verbosity depending on API
+ * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: get back
+ to previous outputs
+
+Thu Aug 25 15:14:56 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c
+ xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h:
+ added a parser XML_PARSE_COMPACT option to allocate small
+ text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits)
+ directly within the node, various changes to cope with this.
+ * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this
+ slightly change the output
+
+Thu Aug 25 12:16:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: patch from Andrew W. Nosenko, use se $GCC = 'yes'
+ instead of $CC = 'gcc' because GCC may have a different name
+
+Thu Aug 25 00:18:20 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: changes the way the python binary is found, should
+ also fix bug #308004
+
+Wed Aug 24 16:44:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: found another bug while looking at #309616 on missing
+ entities.
+ * result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the
+ SAX stream in missing conditions for a few tests
+
+Wed Aug 24 16:19:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: applied the patch suggested #309565 which can avoid
+ looping in error conditions.
+
+Wed Aug 24 16:04:17 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c tree.c: line numbers are now carried by most nodes, fixing
+ xmlGetLineNo() c.f. bug #309205
+
+Wed Aug 24 14:43:34 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c error.c include/libxml/xmlerror.h: finally converted
+ the encoding module to the common error reporting mechanism
+ * doc/* doc/html/libxml-xmlerror.html: rebuilt
+
+Wed Aug 24 11:35:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: removed a potentially uninitialized variable error
+ * python/generator.py: fixed a deprecation warning
+ * python/tests/tstLastError.py: silent the damn test when Okay !
+
+Wed Aug 24 00:11:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c
+ include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation
+ when configured --without-sax1 and other cleanups fixes bug #172683
+ * doc/* elfgcchack.h: regenerated
+
+Tue Aug 23 20:05:05 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #170489 reported by Jirka Kosek
+ * test/valid/objednavka.xml test/valid/dtds/objednavka.dtd
+ result/valid/objednavka*: added the test to the regression suite.
+
+Tue Aug 23 18:04:08 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c include/libxml/HTMLparser.h: added a recovery mode
+ for the HTML parser based on the suggestions of bug #169834 by
+ Paul Loberg
+
+Tue Aug 23 15:38:46 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * elfgcchack.h testapi.c doc/*: regenerated
+ * schematron.c: fixed a compilation problem
+ * xmlregexp.c include/libxml/xmlregexp.h: some cleanups and one bug fix
+ * result/expr/base: slightly changes the number of Cons.
+
+Mon Aug 22 23:19:50 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * elfgcchack.h testapi.c doc/*: rescanned code and rebuilt
+ * xmlregexp.c: small cleanup
+ * include/libxml/schematron.h include/libxml/xmlexports.h
+ include/libxml/xmlversion.h.in: cleanup problems from code scanner
+
+Mon Aug 22 18:00:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: applied patch from Kuba Nowakowski fixing bug
+ #313982
+ * result/schemas/bug313982* test/schemas/bug313982*: also added
+ the test case to the regression suite.
+
+Mon Aug 22 17:50:20 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testRegexp.c: printed the wrong string
+
+Mon Aug 22 16:42:07 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testRegexp.c xmlregexp.c include/libxml/xmlregexp.h: exported
+ xmlExpExpDerive(), added it to the testRegexp command line
+ tool when providing multiple expressions.
+
+Mon Aug 22 14:57:13 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am result/expr/base test/expr/base: added the first
+ regression test suite set for the new expression support
+
+Mon Aug 22 13:49:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed an uninitialized variable
+ * xmlregexp.c include/libxml/xmlregexp.h: extended the API to
+ add the parser, serializer and some debugging
+ * include/libxml/xmlversion.h.in: made the new support compiled
+ by default if Schemas is included
+ * testRegexp.c: cleanup and integration of the first part of the
+ new code with a special switch
+ * xmllint.c: show up Expr in --version if compiled in
+ * include/libxml/tree.h: moved the xmlBuffer definition up
+
+Mon Aug 22 12:11:10 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Some preparation for the creation of a graph
+ of imported/included/redefined schemas; this is needed for
+ at least the redefinitions.
+ Centralized the creation of the parser context in one function.
+
+Mon Aug 22 02:19:33 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c include/libxml/xmlregexp.h: pushing the formal expression
+ handling code to have it in CVs from now. Not plugged, and misses
+ APIs it's not compiled in yet.
+
+Sat Aug 20 23:13:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied another patch from Rob Richards to fix
+ xmlTextReaderGetAttributeNs and xmlTextReaderMoveToAttributeNs
+
+Wed Aug 17 09:06:33 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied patch from Rob Richards to fix
+ xmlTextReaderGetAttribute behaviour with namespace declarations
+
+Fri Aug 12 14:12:56 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/xmlerror.h:
+ Changed output for keyref-match errors; the target-node will
+ be now reported rather than the scope-node of the keyref
+ definition - allowing easier chasing of instance errors.
+ This was reported by Guy Fabrice to the mailing list.
+ Some initial parsing code for schema redefinitions.
+ * result/schemas/bug303566_1_1.err
+ result/schemas/bug312957_1_0.err: Adapted test results due
+ to the keyref changes.
+
+Fri Aug 12 12:17:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: applied patch from Derek Poon fixing bug #310692
+
+Wed Aug 10 23:39:02 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fix for bug #312945 as pointed by Dean Hill, the
+ context type was not always properly initialized.
+
+Wed Aug 10 18:21:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed bug #307377 about validation of choices in
+ list values.
+ * test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c:
+ added examples to the regression tests, problem is that streaming
+ version gives slightly more informations.
+
+Wed Aug 10 15:25:53 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixed bug #302302, nasty but the fix is rather simple.
+
+Wed Aug 10 11:59:46 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/any6_1_0*: Added missing test results.
+
+Tue Aug 9 23:37:22 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixed a determinism detection problem exposed by
+ ##other tests commited by Kasimier, also added a small speedup
+ of determinism detection.
+ * test/results/any6_2_0* any8_1_0* any7_1_2* any7_2_2*: added
+ the results to the regression tests now
+
+Tue Aug 9 15:54:09 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/any7_2.xml test/schemas/any6_2.xsd
+ test/schemas/any8_1.xsd test/schemas/any8_0.xml:
+ Added some more tests for element wildcards.
+
+Tue Aug 9 14:22:47 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed #312957 reported by Carol Hunter:
+ streaming XPath states were not popped in every case,
+ thus failed to resolve correctly for subsequent input.
+ * test/schemas/bug312957* result/schemas/bug312957*:
+ Added the test submitted by Carol Hunter.
+
+Tue Aug 9 13:07:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c: trying to nail down the remaining
+ ##other issues
+ * result/schemas/any7* test/schemas/any7: completed the tests
+ and added the results
+ * result/schemas/any3_0_0.err result/schemas/any5_0_0.err
+ result/schemas/any5_1_0.err: this slightly chnages the output
+ from 3 existing tests
+
+Mon Aug 8 22:33:08 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c xmlschemastypes.c: applied patch from
+ Marcus Boerger to remove warnings on Windows.
+
+Mon Aug 8 16:43:04 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c include/libxml/xmlsave.h: fixed #145092 by adding
+ an xmlSaveOption to omit XML declaration
+
+Mon Aug 8 15:44:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixed bug #310333 with a patch close to the provided
+ patch for HTML UTF-8 serialization
+ * result/HTML/script2.html: this changed the output of that test
+
+Mon Aug 8 15:01:51 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixed bug #310264, basically it's about reentrancy
+ of count based transition, when going though the counter must
+ be reset to 0
+ * test/schemas/bug310264* result/schemas/bug310264*: added the
+ regression test.
+
+Mon Aug 8 14:40:52 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a memory leak: xmlSchemaFreeAnnot() was
+ only freeing the first annotation in the list.
+
+Mon Aug 8 09:44:34 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied patch from Rob Richards fixing
+ xmlTextReaderGetAttribute
+
+Mon Aug 8 01:41:53 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed an uninitialized memory access spotted by
+ valgrind
+
+Sun Aug 7 12:39:35 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * test/relaxng/docbook_0.xml: get rid of the dependancy on a locally
+ installed DTD
+ * uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to
+ cleanup the Path/URI conversion mess, needed fixing in various
+ layers and a new API to the uri module which also fixes #306861
+ * runtest.c: integrated a regression test specific to check the
+ URI conversions done before calling the I/O handlers.
+
+Sat Aug 6 11:06:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/XSLT.html doc/xml.html: small doc fix for #312647
+
+Tue Aug 2 13:26:42 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * win32/configure.js: applied patch from Rob Richards to allow
+ disabling modules in win32, fixes #304071
+
+Mon Aug 1 07:18:53 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: applied fix from Jakub Piotr Clapa for
+ xmlAttr.parent(), closing #312181
+
+Sun Jul 31 18:48:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c: report improvement
+ * test/schematron/zvon* result/schematron/zvon*: more tests
+
+Sun Jul 31 16:02:59 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.msvc win32/configure.js: applied patch from Rob
+ Richards to add schematron to the build on Windows
+ * test/schematron/zvon3* result/schematron/zvon3*: second test
+ * test/schematron/zvon10* result/schematron/zvon10*: this is the
+ real second test 10 and 2 are swapped.
+
+Sun Jul 31 15:42:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c: more bug fixes, improve the error reporting.
+ * test/schematron/zvon2* result/schematron/zvon2*: second test
+
+Sun Jul 31 14:15:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c xmllint.c: fixing the loop bug, fixing schematron
+ text error rendering
+ * Makefile.am result/schematron/* test/schematron/zvon1*.sct:
+ started integrating within "make tests"
+
+Sat Jul 30 17:26:58 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * test/schematron/*: a few first tests from Zvon unfortunately
+ with the old syntax
+
+Sat Jul 30 17:08:07 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c xmllint.c include/libxml/schematron.h: commiting
+ work done on the plane last week-end
+
+Sat Jul 30 15:16:29 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: allows an extra argument to subset the tests
+ * xmlregexp.c: big speedup for validation, basically avoided
+ transition creation explosion when removing epsilon transition
+
+Sat Jul 30 00:00:46 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am globals.c parserInternals.c xmlreader.c xmlunicode.c
+ xmlwriter.c: more cleanups based on sparse reports, added
+ "make sparse"
+
+Fri Jul 29 12:11:25 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: don't output any message on failed resolver lookups,
+ better done by the python user provided resolver layer.
+
+Fri Jul 29 01:48:02 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c
+ runsuite.c runtest.c schematron.c testHTML.c testReader.c
+ testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c
+ xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of
+ small cleanups based on Linus' sparse check output.
+
+Thu Jul 28 21:28:33 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/Makefile.am: added schematron.h, oops ...
+
+Thu Jul 28 02:38:21 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Added creation of the content type of
+ xs:anyType. This is needed when trying to extend xs:anyType
+ (although it makes no sense to extend it; IMHO the schema
+ people should have ruled this out). This was reported
+ by Yong Chen to the mailing list.
+ * xmlschemas.c: Fixed handling of xs:anyType in
+ xmlSchemaCheckCOSCTExtends() (reported by Young Chen). Tiny
+ adjustment to an error report output.
+ * test/schemas/extension2* result/schemas/extension2*:
+ Added a test case provided by Young Chen.
+
+Mon Jul 25 11:41:18 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: enhanced xmlBuildRelativeURI to allow the URI and the
+ base to be in "relative" form
+
+Sun Jul 24 10:25:41 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * schematron.c xmllint.c: started adding schematron to the xmllint
+ tool, the report infrastructure is gonna be fun.
+
+Sat Jul 23 23:23:51 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/any6* test/schemas/any7*: Added regression tests
+ (they fail currently), but did not added results yet.
+
+Sat Jul 23 23:07:05 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed the workaround code in
+ xmlSchemaValidateElemWildcard() for the <any> wildcard
+ with namespace == ##other. Support for such wildcards was
+ implemented by Daniel at the automaton level recently, and
+ the workaround code iterfered with it.
+
+Sat Jul 23 10:55:50 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c include/libxml/pattern.h: changed xmlPatterncompile
+ signature to pass an int and not an enum since it can generate
+ ABI compat troubles.
+ * include/libxml/schematron.h schematron.c: adding the new
+ schematron code, work in progress lots to be left and needing
+ testing
+ * include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in
+ Makefile.am configure.in: integration of schematron into the
+ build
+ * xpath.c include/libxml/xpath.h: adding flags to control compilation
+ options right now just XML_XPATH_CHECKNS.
+
+Sat Jul 23 16:39:35 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed an "internal error" message from
+ xmlSchemaBuildAContentModel() when an empty model group
+ definition is hit.
+
+Sat Jul 23 00:34:07 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c: Changed xmlCompileStepPattern() and
+ xmlCompileAttributeTest() to handle the "xml" prefix without
+ caring if the XML namespace was supplied by the user.
+
+Fri Jul 22 00:08:43 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed xmlSchemaPSimpleTypeErr(), which did not
+ output the given string arguments correctly.
+
+Thu Jul 21 09:21:00 EDT 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c globals.c parser.c runtest.c testHTML.c testSAX.c
+ threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c
+ xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h
+ include/libxml/valid.h include/libxml/xmlIO.h
+ include/libxml/xmlerror.h include/libxml/xmlexports.h
+ include/libxml/xmlschemas.h: applied a patch from Marcus Boerger
+ to fix problems with calling conventions on Windows this should
+ fix #309757
+
+Wed Jul 20 14:45:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: an optimization of the char data inner loop,
+ can gain up to 10% in pure SAX2 parsing speed
+ * xmlschemas.c: applied patch from Kupriyanov Anatolij fixing
+ a bug in XML Schemas facet comparison #310893
+
+Tue Jul 19 17:27:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c: fixed the error reporting for
+ not transitions
+ * result/schemas/any5_0_0* result/schemas/any5_0_2*
+ result/schemas/any5_1_0*: fixed output
+
+Tue Jul 19 15:34:12 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: fixing
+ bug #172215 about foreign namespaces by adding support for
+ negated string transitions. Error messages still need to be
+ improved.
+ * test/schemas/any5* result/schemas/any5*: adding regression
+ tests for this.
+
+Tue Jul 19 12:33:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath
+ on namespaced attributes #310417.
+
+Mon Jul 18 23:01:15 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: --nonet was
+ ducplicated
+
+Mon Jul 18 20:49:28 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed xsd:all when used in conjunction with
+ substitution groups
+ * test/schemas/allsg_* result/schemas/allsg_*: adding specific
+ regression tests, strangely missing from NIST/Sun/Microsoft
+ testsuites
+
+Sun Jul 17 07:11:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed bug #307508, a bad automata was built but
+ this showed as an indeterminist result
+
+Thu Jul 14 17:53:02 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: found the last bug raised by NIST tests in
+ comparing base64 strings, result from runsuite:
+ ## NIST test suite for Schemas version NIST2004-01-14
+ Ran 23170 tests (3953 schemata), no errors
+
+Thu Jul 14 14:57:36 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testRegexp.c: fixed where xmlMemoryDump() should be called.
+ * xmlregexp.c: fixed handling of {0}, \n, \r and \t, two bugs
+ affecting NIST regression tests
+
+Thu Jul 14 11:30:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: applied a patch from Gerrit P. Haase to add
+ module support on cygwin
+
+Thu Jul 14 10:56:42 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed a potential buffer overrun error introduced
+ on last commit to htmlParseScript() c.f. #310229
+
+Thu Jul 14 23:48:17 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: Changed the behaviour of xmlXPathEqualNodeSetFloat to
+ return TRUE if a nodeset with a numeric value of NaN is compared
+ for inequality with any numeric value (bug 309914).
+
+Thu Jul 14 01:03:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c relaxng.c xmlreader.c xmlschemas.c include/libxml/relaxng.h
+ include/libxml/xmlschemas.h: applied patch from Marcus Boerger
+ to route relaxng and schemas error messages when using the reader
+ through the structured interface if activated.
+ * elfgcchack.h doc/* testapi.c: rebuilt since this add new APIs
+ to test.
+
+Wed Jul 13 18:35:47 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied UTF-8 script parsing bug #310229 fix from
+ Jiri Netolicky
+ * result/HTML/script2.html* test/HTML/script2.html: added the test
+ case from the regression suite
+
+Tue Jul 12 17:08:11 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: fixed bug #310105 with http_proxy environments with
+ patch provided by Peter Breitenlohner
+
+Mon Jul 11 00:28:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am NEWS configure.in doc/*: preparing release 2.6.20
+ * xmllint.c: removed a compilation problem
+
+Sun Jul 10 23:33:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am README README.tests Makefile.tests Makefile.am:
+ preparing to make testsuite releases along with code source releases
+ * gentest.py testapi.c: fixed a couple of problem introduced by
+ the new Schemas support for Readers
+ * xpath.c: fixed the XPath attribute:: bug #309580, #309864 in a crude
+ but simple way.
+ * xmlschemas.c include/libxml/tree.h: fixed a couple of problems
+ raised by the doc builder.
+ * doc/*: made rebuild
+
+Sun Jul 10 21:51:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed a bug introduced on last commit
+
+Sun Jul 10 21:00:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.html doc/xmllint.xml: fixed a typo
+ pointed by Jeroen Ruigrok
+ * include/libxml/xmlreader.h include/libxml/xmlschemas.h: increased
+ the APIs for xmlReader schemas validation support
+ * xmllint.c xmlreader.c xmlschemas.c: xmlReader schemas validation
+ implementation and testing as xmllint --stream --schema ...
+
+Sun Jul 10 16:11:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlwin32version.h.in: try to avoid conflicts.
+
+Sat Jul 9 19:29:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix for #309761 from Dylan Shell
+ * xmlschemas.c include/libxml/xmlschemas.h: added xmlSchemaSAXPlug
+ and xmlSchemaSAXUnplug generic APIs for SAX Schemas validation.
+ * xmllint.c: couple of fixes plus added descriptions for --sax and
+ --sax1
+
+Fri Jul 8 23:35:00 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added c-props-correct constraint to check
+ for equal cardinality of keyref/key.
+ * include/libxml/xmlerror.h: Added an error code.
+
+Fri Jul 8 21:56:04 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c: Fixed evaluation of attributes. Actually only
+ attribute at the first level were evaluated (e.g. "@attr");
+ expression like "foo/@attr" always failed.
+
+Fri Jul 8 20:04:29 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: tiny fix in xmlSchemaValidateStream() if a
+ user-provided SAX handler is given.
+
+Fri Jul 8 19:25:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix some potential leaks in error cases.
+ * xmllint.c: added --sax, to allow testing of --schemas --sax and
+ various other combinations.
+ * xmlschemas.c: fix a couple of tiny problems in
+ xmlSchemaValidateStream()
+
+Fri Jul 8 18:34:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Changed xmlSchemaValidateFile() to use
+ xmlSchemaValidateStream() internally.
+
+Fri Jul 8 17:02:14 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * test/relaxng/docbook_0.xml: added the missing entity to the
+ document internal subset to avoid errors if the DocBook catalogs
+ are not there
+ * xmlschemas.c: first cut at implementing xmlSchemaValidateStream()
+ untested yet
+
+Wed Jul 6 15:45:48 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed problem with free on dupl attribute in
+ dtd (bug309637).
+ * test/errors/attr3.xml, result/errors/attr3.*: added
+ regression test for this
+
+Wed Jul 6 13:11:35 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * win32/Makefile.msvc: try again to fix file format for Windows
+
+Wed Jul 6 12:20:13 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * win32/Makefile.msvc: removed spurious ^M
+ * runtest.c: added check for option O_BINARY
+ * test/schemas/bug309338*, result/schemas/bug309338*: changed
+ sticky tag to 'binary'
+
+Wed Jul 6 10:38:02 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * debugXML.c: excluded content string check for XML_ELEMENT_DECL
+ in xmlCtxtGenericNodeCheck
+ * runtest.c: changed "open" calls to include O_BINARY for Windows
+
+Wed Jul 6 17:14:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug #166777 (and #169838), it was an heuristic
+ in areBlanks which failed.
+ * result/winblanks.xml* result/noent/winblanks.xml test/winblanks.xml:
+ added the input file to the regression tests
+
+Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov
+ Anotolij.
+ * test/schemas/bug309338* result/schemas/bug309338*:
+ Added a regression test for the above bug.
+
+Tue Jul 5 16:03:05 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: first steps toward a testsuite dist
+ * SAX2.c include/libxml/xmlerror.h: fixed bug #307870
+
+Tue Jul 5 12:38:36 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * runsuite.c runtest.c: Tiny portability adjustment for win.
+ * win32/Makefile.*: Added runtest.exe and runsuite.exe to
+ be created.
+
+Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: first stb at unimplemnted detection
+ * runtest.c: fixing Windows code
+
+Mon Jul 4 17:19:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: fix on schemas error
+ * runtest.c: portability glob() on Windows
+
+Mon Jul 4 16:23:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c runtest.c: cleanups, logfile and portability
+ * xmllint.c: fixed a memory leak
+
+Mon Jul 4 13:11:12 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a bug failing to detect UTF-8 violations in
+ CData in push mode.
+ * result/errors/cdata.xml* test/errors/cdata.xml: added the test
+ to the regressions
+
+Mon Jul 4 11:26:57 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: added enhancement for #309057 in xmllint shell
+
+Mon Jul 4 00:58:44 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from James Bursa fixing an html parsing
+ bug in push mode
+ * result/HTML/repeat.html* test/HTML/repeat.html: added the test to the
+ regression suite
+
+Sun Jul 3 23:42:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c tree.c: fixing a leak detected by testapi in
+ xmlDOMWrapAdoptNode, and fixing another side effect in testapi
+ seems to pass tests fine now.
+ * include/libxml/parser.h parser.c: xmlStopParser() is no more limited
+ to push mode
+ * error.c: remove a warning
+ * runtest.c xmllint.c: avoid compilation errors if only some parts
+ of the library are compiled in.
+
+Mon Jul 4 00:39:35 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: fix a problem with previous patch to
+ testapi.c
+
+Sun Jul 3 22:59:28 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c runtest.c tree.c: fixing compilations when
+ disabling parts of the library at configure time.
+
+Sun Jul 3 18:17:58 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fix bug raised by zamez on IRC
+ * testapi.c: regenerated, seems to pop-up leaks in new tree functions
+ * tree.c: added comments missing.
+ * doc/*: regenerated
+
+Sun Jul 3 18:06:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c runsuite.c runtest.c: fixing #307823 and a couple of
+ assorted bugs
+ * python/generator.py python/libxml2-python-api.xml: fixed
+ conditionals in generator too
+ * doc/apibuild.py doc/libxml2-api.xml doc/* elfgcchack.h: some
+ cleanups too and rebuilt
+
+Sun Jul 3 16:42:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fixed bug #307503 misplaced #ifdef
+
+Sun Jul 3 16:34:47 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: expanded test
+ * xmlregexp.c: found and fixed the leak exposed by Microsoft regtests
+
+Sat Jul 2 23:38:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: a bit of progresses on xstc
+
+Sat Jul 2 09:30:13 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runsuite.c: completed the simple checks for Relax-NG suites
+ back to the same 11 errors as in the Python runs.
+
+Thu Jun 30 15:01:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: complete, checking on other platforms is needed
+ * README: updated
+ * debugXML.c: fix a bug raised by bill on IRC
+ * relaxng.c: fix a leak in weird circumstances
+ * runsuite.c Makefile.am: standalone test tool agaisnt
+ the regression suites, work in progress
+
+Tue Jun 28 08:30:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: adding URI tests
+
+Mon Jun 27 23:55:56 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: adding xml:id
+
+Mon Jun 27 23:29:36 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: finishing XPath, adding XPointer
+
+Mon Jun 27 17:39:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: adding more coverage, XInclude and starting XPath
+
+Mon Jun 27 17:02:14 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c include/libxml/tree.h: Added allocation/deallocation
+ functions for the DOM-wrapper context.
+
+Mon Jun 27 15:41:30 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Commented the new functions to be experimental.
+
+Mon Jun 27 14:41:14 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * error.c valid.c: working some weird error reporting problem for
+ DTD validation.
+ * runtest.c: augmented with DTD validation tests
+ * result/VC/OneID*: slight change in validation output.
+
+Mon Jun 27 13:44:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: added most HTML tests
+
+Mon Jun 27 14:06:10 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/namespaces/reconcile/tests.xml
+ test/namespaces/reconcile/tests-to-c.xsl: Added initial tests
+ for some new DOM-wrapper helping functions.
+
+Mon Jun 27 14:01:06 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/xstc-to-python.xsl: Cleanup.
+ * xstc/sun-test-def.xml xstc/nist-test-def.xml xstc/ms-test-def.xml:
+ Removed, those are not needed anymore due to the new test suite.
+
+Mon Jun 27 11:39:50 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * result/*.sax2 MAkefile.am: added SAXv2 regression tests apparently
+ missing.
+ * runtest.c: added SAX1/SAX2 checks.
+
+Mon Jun 27 12:24:54 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c include/libxml/tree.h: Added
+ xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and
+ xmlDOMWrapRemoveNode() to the API. These are functions intended
+ to be used with DOM-wrappers.
+
+Mon Jun 27 10:14:57 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: continue to increase the tests
+
+Mon Jun 27 09:21:49 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: continue to increase the tests
+
+Mon Jun 27 01:01:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * runtest.c: continue to increase the tests
+
+Sun Jun 26 20:08:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/valid.h valid.c: avoid name glob in agruments as
+ it matches the glob() routine.
+ * runtest.c Makefile.am: first steps toward a C regression test
+ framework.
+
+Sat Jun 25 01:37:22 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in: fixed a problem with the detection of
+ ss_family for ipV6, as reported on the mailing list by
+ Doug Orleans.
+
+Tue Jun 21 10:44:34 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/empty-value* result/schemas/empty-value*:
+ Added regression tests (from Dhyanesh).
+
+Tue Jun 21 10:35:43 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed NULL values to be validated as empty
+ string values (reported by Dhyanesh to the mailing list).
+ Adjusted text concatenation of mixed content.
+
+Mon Jun 20 18:11:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c valid.c: applied patch from Rob Richards for removal
+ of ID (and xml:id)
+ * xmlreader.c: applied patch from James Wert implementing
+ xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml
+
+Thu Jun 16 14:38:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed SAX2 validation: grow of internal
+ namespace list, appending of element character content.
+ * xstc/xstc.py: Added "--sax" option for SAX2 validation.
+
+Wed Jun 15 15:34:52 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Added missing function descriptions.
+
+Wed Jun 15 15:26:14 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: if sax1 is used and input is a file use the old
+ API xmlParseFile()
+ * xmlschemas.c: cleanups
+ * doc/* testapi.c elfgcchack.h: rebuilt to add python bindings
+ for the new functions in Schemas.
+
+Wed Jun 15 14:50:48 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/xmlschemas.h: Added
+ xmlSchemaValidateFile() to the public API. This will use
+ SAX2-driven validation.
+
+Wed Jun 15 11:11:38 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/bug306806_1_0 result/schemas/bug306806_1_0.err:
+ Added schema test results (Tom Browder, bug #306806).
+
+Wed Jun 15 11:08:34 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/bug306806_1.xsd test/schemas/bug306806_0.xml:
+ Added schema tests submitted by Tom Browder (bug #306806).
+
+Tue Jun 14 15:03:22 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * pattern.c: adjusted last change to xmlCompilePathPattern,
+ fixed one compilation warning
+
+Tue Jun 14 21:19:16 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c: Some changes/fixes to the streaming evaluation.
+ * xmlschemas.c: A bit of support for parsing the schema for
+ schema. Fixed attribute derivation when the use is
+ "prohibited" and was "optional". Fixed an attribute construction
+ bug, a left-over from the time, where <complexContent>,
+ <extension>, etc. where created as structs.
+
+Tue Jun 14 12:35:12 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * libxml-2.0.pc.in: removed a redundant include path
+
+Mon Jun 13 14:58:33 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/Makefile.am: Some more adjustments.
+
+Mon Jun 13 14:35:59 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/Makefile.am: Changed test extraction process, since some
+ boxes don't know about "tar --strip-path".
+
+Mon Jun 13 13:39:43 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed a bug exposed by Rob Richards in the mailing-list
+ * result//compare0* test//compare0*: added the regression test in
+ the suite as this went unnoticed !
+
+Wed Jun 9 11:07:42 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * pattern.c, xpath.c, include/libxml/pattern.h: Further
+ enhancement for XPath streaming, consolidated with
+ schemas usage of pattern.c. Added a new enum
+ xmlPatternFlags.
+ * doc/*, testapi.c, elfgcchack.h: updated to reflect new
+ enum.
+ * test/XPath/tests/mixedpat, test/XPath/docs/mixed,
+ result/XPath/mixedpat: added regression test for problems
+ reported in bug306348
+
+Thu Jun 9 16:51:31 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Changed non-prefixed QNames to be bound to a
+ default namespace if existent.
+
+Thu Jun 9 15:11:38 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Fixed a bug which I invented: hexBinary's string
+ values were not duplicated corrently when creating a computed value
+ in xmlSchemaValAtomicType.
+
+Thu Jun 9 13:20:57 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c result/schemas/include1_0_0.err:
+ Fixed an attribute fixed/default value constraint error.
+
+Thu Jun 9 12:51:23 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/*: Adapted regression test results.
+
+Thu Jun 9 12:22:45 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h
+ include/libxml/xmlschemastypes.h: Changed the validation process
+ to be able to work in streaming mode. Some datatype fixes,
+ especially for list and union types. Due to the changes the
+ error report output has changed in most cases. Initial migration to
+ functions usable by both, the parser and the validator. This should
+ ease a yet-to-come XS construction API in the long term as well.
+
+Thu Jun 9 10:16:11 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Malcolm Rowe to avoid namespace
+ troubles on rollback parsing of elements start #304761
+ * test/nsclean.xml result/noent/nsclean.xml result/nsclean.xml*:
+ added it to the regression tests.
+
+Thu Jun 9 00:33:50 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/xmlerror.h: applied patch from Rob Richards
+ for xml:space and xml:lang handling with SAX2 api.
+
+Wed Jun 8 19:41:38 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: applied patch from Morten Welinder, closing bug #306901
+ on compiling subsets of the library
+
+Wed Jun 8 19:11:42 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/Makefile.am xstc.py xstc-to-python.xsl: Adapted the
+ XS tests to use the new release of tests and test-definitions.
+
+2005-06-07 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c: fix rendering of attributes when parent node
+ is not in the node set
+
+2005-06-06 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c: fixed xml attributes processing bug in exc c14n
+ * xmllint.c: added --exc-c14n command line option
+
+Mon Jun 6 06:43:33 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c, pattern.c: Enhanced xmlXPathRunStreamEval, fixed
+ handling of depth/level for cases like union operator
+ (bug #306348 reported by Bob Stayton). Also enhanced
+ several comments throughout pattern.c.
+ * doc/apibuild.py: fixed problem in handling of
+ 'signed' declaration. Rebuilt the docs.
+
+Tue May 31 20:35:27 PDT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: Enhanced handling of xml:base for included
+ elements, fixing bugs 169209 and 302353.
+
+Wed May 25 18:59:53 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed facet errors to be channelled back for
+ union type members; facet-validation will stop now on the
+ first error. Reported by GUY Fabrice to the mailing-list.
+ * xmlschemastypes.c: Changed to ignore lengh-related facet
+ validation for QNames and NOTATIONs as proposed by the
+ schema people.
+ * test/schemas/union2* result/schemas/union2*: Added
+ regression tests for union types (by GUY Fabrice).
+
+Fri May 20 20:48:08 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: applied patch from Mark Vakoc fixing saving of
+ CDATA with NULL content.
+
+Thu May 12 15:14:26 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Changed the VALID_TZO macro to restrict
+ the timezone to -840 to 840.
+
+Thu May 12 15:05:11 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Applied patch from Steve Nairn (bug #303670)
+ for "signed int" of the date-time timezone field. Silenced
+ a warning.
+
+Wed May 11 20:04:09 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch for replaceNode from Brent Hendricks
+
+Tue May 10 17:27:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed bug #303682 of a leak reported by Malcolm Rowe
+
+Tue May 10 11:50:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c: applied patch from Steve Nairn tof fix the compilation
+ problem exposed in bug #303640
+
+Tue May 10 11:11:26 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/bug303566_1* result/schemas/bug303566_1_1*:
+ Added regression a test provided by Heiko Oberdiek (bug #303566).
+
+Mon May 9 17:56:58 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c: Changed the XPath "." to resolve only on the first
+ level for XML Schema IDCs (bug #303566 reported by Heiko Oberdiek).
+ This should not affect pattern-like resolution on every level.
+
+Sun May 8 13:35:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: fixed #169630 segfault in xmlMemDisplay
+
+Fri May 6 13:40:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: fixing bug #303068 increasing the nanoftp buffer.
+ * doc/apibuild.py: fixed __attribute() parsing problem
+ * doc/* testapi.c: regenerated the descriptions and docs.
+
+Wed May 4 11:16:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in threads.c: on linux/gcc use weak definitions
+ to avoid linking with pthread library on non-threaded environments.
+ * xpath.c: applied patch from Mark Vakoc w.r.t. a buggy namespace
+ list allocation.
+
+Fri Apr 29 11:27:37 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * parser.c: Fixed a test for duplicate attributes: Non-prefixed
+ attributes were treated as being bound to the default namespace.
+
+Tue Apr 19 17:51:32 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Fixed date-time related validation
+ (reported by David Crossley, bug #300576).
+
+Tue Apr 19 16:55:40 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlregexp.c: Removed 5 unnecessary
+ dereferences (reported by Andriy, bug #301074).
+
+Tue Apr 19 22:33:18 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: Added some code to avoid integer overflow for
+ ceil, floor and round functions (bug 301162)
+
+Tue Apr 19 13:21:54 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed workaround for bug #172215, since it
+ does more harm in some scenarios. Added some of the
+ "Particle Restriction OK" constraints - not yet enabled.
+
+Mon Apr 18 13:02:55 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * result/schemas/changelog093*: Added test results.
+
+Mon Apr 18 12:42:14 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added output of canonical values in
+ identity-constraint error messages.
+ * xmlschemastypes.c include/libxml/xmlschemastypes.h:
+ Added xmlSchemaGetCanonValueWhtsp() to the API.
+ Further enhancement of the canonical value
+ conversion.
+ * test/schemas/changelog093_0.*: Added test with an XSD
+ submitted by Randy J. Ray.
+
+Fri Apr 15 09:33:21 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: Applied Daniel's fix for memory leak in dtd
+ prefix (bug 300550).
+ * xpath.c: minor change to comment only
+
+Thu Apr 14 20:52:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: added the call to the breakpoint routine
+ when a monitored block is reallocated or freed
+
+Wed Apr 13 05:55:51 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: applied patch from Aron Stansvik for bug #172525
+ about HTTP query string parameter being lost
+
+Tue Apr 12 04:03:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/libxml.py: applied patch from Brent Hendricks
+ adding namespace removal at the python level #300209
+ * python/tests/Makefile.am python/tests/nsdel.py: added the regression
+ test
+
+Sun Apr 10 09:03:22 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed several places where memory cleanup was not
+ properly done after an error was detected (problem was
+ reported on the mailing list by Pawel Palucha)
+
+Fri Apr 8 21:58:04 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added substitution group constraints; changed
+ the build of the pre-computed substitution groups. Channeled
+ errors during xsi assembling of schemas to the validation
+ context. Fixed a big memory leak, which occured when using
+ IDCs: the precomputed value of attributes was not freed if
+ the attribute did not resolve to an IDC field (discovered
+ with the help of Randy J. Ray's schema, posted to the
+ xmlschema-dev maling list).
+
+Fri Apr 8 13:22:01 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added "Particle correct 2" to parsing of model groups.
+ Added handling substitution groups inside <choice> and <sequence>;
+ for <all> this is not supported yet. Changed circular checks for
+ model groups definitions. "memberTypes" are processed at different
+ levels now: component resolution first, construction later; this
+ goes hand in hand with a global change to handle component
+ resolution in a distinct phase. Fixed invalid default values for
+ elements to mark the schema as invalid; this just resulted in an
+ error report previously, but the schema was handled as valid.
+ Separated the assignment of the model groups to referencing
+ model group definition references (i.e. particles); this was
+ needed to perform the circularity check for model group definitions.
+ Added "Element Declaration Properties Correct (e-props-correct)"
+ constraints. Separated component resolution for simple/complex
+ types.
+ * include/libxml/schemasInternals.h: Added a flag for substitution
+ group heads.
+
+Wed Apr 6 23:14:03 CEST 2005 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.*: make install cleanup
+
+Wed Apr 6 22:42:23 CEST 2005 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.mingw: fixed mingw compilation
+ * testModule.c: removed mingw warnings
+
+Wed Apr 6 21:59:11 CEST 2005 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * .cvsignore: added Eclipse project files to ignore list
+
+Wed Apr 6 16:08:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed the bug in lang() as raised by Elliotte Rusty Harold
+ * result/XPath/tests/langsimple test/XPath/tests/langsimple
+ test/XPath/docs/lang: added a regression test
+
+Tue Apr 5 23:48:35 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: applied fix from Rob Richards to compile on Windows.
+
+Tue Apr 5 17:02:58 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added "Type Derivation OK (Complex)" constraints
+ and anchored them in the "Element Locally Valid (Element)"
+ constraints. This restricts the type substitution via "xsi:type".
+
+Tue Apr 5 13:10:06 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: patch from Matthew Burgess to improve some schemas
+ facets validation messages.
+
+Sat Apr 2 12:48:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/* configure.in NEWS: preparing release 2.6.19, updated docs and
+ rebuilding.
+
+Sat Apr 2 13:27:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am: integrated fixup-tests.py
+
+Fri Apr 1 19:14:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: fixed a lack of comment and missing test for
+ a pointer in the API.
+
+Fri Apr 1 17:54:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/fixup-tests.py: A tiny script to fixup some of the schema
+ files used for the tests.
+
+Fri Apr 1 17:33:50 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ result/schemas/src-element2-*.err result/schemas/element-*.err:
+ Committing again, since the CVS server aborted.
+
+Fri Apr 1 15:29:27 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Corrected 'length' facet validation for
+ QNames and notations. Corrected xmlSchemaGetCanonValue: some
+ data types did not return a value if already in normalized
+ form.
+ * xmlschemas.c include/libxml/schemasInternals.h:
+ Eliminated creation of structs for <restriction>, <extension>,
+ <simpleContent>, <complexContent>, <list> and <union>: the
+ information is now set directly on the corresponding simple/
+ complex type. Added some more complex type constraints.
+ Added facet derivation constraints. Introduced "particle"
+ components, which seem to be really needed if applying
+ constraints. Corrected/change some of the parsing functions.
+ This is all a bit scary, since a significant change to the code.
+ * result/schemas/src-element2-*.err result/schemas/element-*.err:
+ Adapted regression test results.
+
+Fri Apr 1 16:07:59 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
+ format to cope with gcc4 change of aliasing allowed scopes, had
+ to add extra informations to doc/libxml2-api.xml to separate
+ the header from the c module source.
+ * *.c: updated all c library files to add a #define bottom_xxx
+ and reimport elfgcchack.h thereafter, and a bit of cleanups.
+ * doc//* testapi.c: regenerated when rebuilding the API
+
+Thu Mar 31 17:20:32 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fixed bug reported by Petr Pajas, in the absence of
+ encoding UTF-8 should really be assumed. This may break if
+ the HTTP headers indicates for example ISO-8859-1 since this
+ then becomes a well formedness error.
+
+Thu Mar 31 16:57:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixed #172260 redundant assignment.
+ * parser.c include/libxml/parser.h: fixed xmlSAXParseDoc() and
+ xmlParseDoc() signatures #172257.
+
+Thu Mar 31 16:11:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix potential crash if ctxt->sax->ignorableWhitespace
+ is NULL as reported by bug #172255
+
+Thu Mar 31 15:36:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed a problem in Relax-NG validation #159968
+ * test/relaxng/list.* result/relaxng/list_*: added the test
+ to the regression suite
+
+Thu Mar 31 13:06:02 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: fixed bug #168504
+
+Thu Mar 31 12:22:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in nanoftp.c nanohttp.c xmllint.c
+ macos/src/config-mac.h: use XML_SOCKLEN_T instead of SOCKLEN_T
+ since apparently IBM can't avoid breaking common defines #166922
+
+Thu Mar 31 10:41:45 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fix unitinialized variable in not frequently used
+ code bug #172182
+
+Thu Mar 31 00:45:18 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.py: another patch from Brent
+ Hendricks to add new handlers with the various validity contexts
+ * python/tests/Makefile.am python/tests/validDTD.py
+ python/tests/validRNG.py python/tests/validSchemas.py: also
+ added the regression tests he provided
+
+Wed Mar 30 09:39:27 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c: applied patch from Brent
+ Hendricks to avoid leak in python bindings when using schemas
+ error handlers.
+
+Tue Mar 29 22:29:28 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixing bug 168196, <a name=""> must be URI escaped too
+
+Sun Mar 27 13:24:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: cleanup of the Prop related functions and xmlNewNodeEatName
+ by Rob Richards
+
+Thu Mar 24 19:01:22 PST 2005 William Brack <wbrack@mmm.com.hk>
+
+ * gentest.py, testapi.c: fixed problem with 'minimal library'
+ compilation (LIBXML_PATTERN_ENABLED not properly checked) reported
+ by Greg Morgan
+
+Thu Mar 24 12:01:30 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed call to a facet error report: the type of
+ the error was wrong, resulting in a segfault (bug #171220, reported
+ by GUY Fabrice).
+
+Mon Mar 21 22:58:37 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed a stupid bug in xmlSchemaValidateAttributes,
+ failing to build a linked list correctly (bug #169898, reported
+ by bing song, hmm...).
+
+Mon Mar 21 21:09:07 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a segfault, which occured during bubbling
+ of IDC nodes (bug #170779 and #170778, reported by GUY Fabrice):
+ a variable was missed to be reset in a loop. Deactivated bubbling,
+ if not referenced by a keyref.
+
+Sun Mar 20 11:13:02 PST 2005 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c include/libxml/xmlerror.h: special case "DAV:" namespace
+ in c14n relative namespaces check and add structured error messages
+ to c14n code
+
+Thu Mar 17 12:55:23 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Removed inheritance of "mixed" content type for
+ short-hand restrictions of "anyType" (reported by Guy Fabrice
+ to the mailing list). Added the namespace conversion (chameleon
+ includes) for the base type reference of <restriction> and
+ <extension>.
+ * test/schemas/bug152470_1.xsd: Adapted due to the above change
+ of "mixed" inheritance.
+
+Thu Mar 17 11:03:59 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed a = -> == error pointed by GUY Fabrice
+
+Wed Mar 16 22:53:53 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: more debug messages from Matthew Burgess
+ * xmlschemastypes.c: xmlSchemaValidateLengthFacet API missing check.
+
+Wed Mar 16 17:37:04 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Aaaannnd putting back the previous changes done
+ by Daniel, which I overwrote with the previous commit.
+
+Wed Mar 16 17:20:25 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemastypes.h:
+ Hopefully finished validation against facets to use the normalized
+ value of both, the facets and instance values. Added
+ xmlSchemaValidateLengthFacetWhtsp(), xmlSchemaValidateFacetWhtsp()
+ and xmlSchemaGetValType() to the schema API.
+
+Wed Mar 16 13:55:31 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: do not package .la files
+ * xmllint.c: applied patch from Gerry Murphy for xmllint return code
+ * xmlschemastypes.c: fixed a couple of missing tests of parameters
+ at public API entry points.
+
+Tue Mar 15 23:31:14 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemastypes.c: a couple of more changes to various
+ decimal-handling routines. Fixes python some problems
+ turned up by the python tests.
+ * Makefile.am: change SchemasPythonTests message to warn
+ that there are 10 'expected' errors (rather than 6) since
+ we now reject a '+' sign on an unsigned.
+
+Tue Mar 15 15:43:27 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c xmlschemastypes.h: In preparation to use
+ normalized values of facets during validation: changed the
+ arguments of some string comparison functions; added a static
+ xmlSchemaValidateFacetInternal() with more arguments to be
+ more flexible. Prepared XML_SCHEMA_FACET_ENUMERATION validation
+ to use the comparison functions. Fixed some assignments in
+ xmlSchemaValAtomicType(): total digit count, lo, mi, hi.
+
+Sun Mar 13 19:32:03 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in testapi.c doc/*: preparing release of 2.6.18
+ updated docs and rebuilt
+ * libxml.spec.in: reactivated gcc profiling for gcc >= 4.0.0
+
+Sat Mar 12 19:50:22 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: removed a static buffer in xmlByteConsumed(),
+ as pointed by Ben Maurer, fixes #170086
+ * xmlschemas.c: remove a potentially uninitialized pointer warning
+
+Fri Mar 11 23:53:13 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemastypes.c: enhanced the parsing of XML_SCHEMAS_DECIMAL
+ and much of the routine xmlSchemaCompareDecimals. The
+ changes were necessary to fix a problem reported on the
+ mailing list by John Hockaday.
+
+Fri Mar 11 13:22:52 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: The schema parser will stop if components could
+ not be resolved. This is not conforming to the spec but for now
+ will avoid internal errors during type fixup and content model
+ creation. Restructured inclusion/import of schemata: this avoids
+ duplicate, self and circular inclusion. Chameleon includes are
+ still workarounded. Added restriction to disallow references to
+ non-imported namespaces. Corrected parsing of <group>.
+ * result/schemas/bug167754_0_0*: Added a missing test result.
+
+Thu Mar 10 16:02:17 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/encoding.html: Enriched encoding.html with more
+ link and foreword warning to avoid problem with ignorant
+ programmers, c.f #169721
+
+Thu Mar 10 15:01:34 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/tests/Makefile.am python/tests/readernext.py: added
+ a regression test from Rob Richards for the previous bug
+
+Thu Mar 10 13:22:36 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: applied fix for xmlTextReaderNext() bug from
+ Rob Richards
+
+Thu Mar 10 11:35:57 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmodule.c: second patch from Rick Jones, portability fix for
+ HP-UX
+ * doc/examples/xpath1.c doc/examples/xpath2.c: first fix from Rick Jones
+ to avoid warnings.
+
+Thu Mar 10 10:20:23 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/hash.h libxml.h libxml.spec.in: some gcc4 portability
+ patches, including a serious aliasing bug exposed in s390
+ when trying to convert data pointer to code pointer.
+
+Mon Mar 7 18:34:00 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Tiny restructuring of the validation start-up
+ functions. Added cleanup of the validation context at the
+ end of validation. This takes care of the validation context
+ being reused.
+
+Mon Mar 7 12:12:01 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemastypes.c: Tiny changes in the comparison functions
+ I forgot to commit last time.
+
+Fri Mar 4 22:51:42 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added IDC validation of anySimpleType attribute
+ values; anyway the IDC key comparison is restricted to
+ anySimpleType <--> string based types. For other types we
+ would possibly need the canonical lexical representation of
+ them; this sounds not performant, since we would need to
+ build such a representation each time we want to compare against
+ anySimpleType. TODO: think about buffering the canonical values
+ somewhere. Fixed error reports for default attributes to work
+ without a node being specified. This all and the enabling of IDC
+ validation fixes bug #165346 (reported by Benoit Gr?goire - could
+ not read his last name correctly from bugzilla).
+
+Fri Mar 4 18:57:44 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Enabled IDC parsing and validation.
+ * xmlschemastypes.c include/libxml/xmlschemastypes.h:
+ Added xmlSchemaCopyValue to the API; this was done due to
+ validation of default attributes against IDCs: since IDC keys
+ consume the precomputed value, one needs a copy.
+ * pattern.c: Enabled IDC support; this is currently done
+ via calling xmlPatterncompile with a flag arg of 1.
+
+Wed Mar 2 11:45:18 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am doc/examples/Makefile.am python/tests/Makefile.am
+ xstc/Makefile.am: try to fix a problem with valgrind.
+ * python/generator.py python/libxml.c python/tests/Makefile.am
+ python/tests/tstmem.py: applied memory leak fix from Brent Hendricks
+ c.f. bug #165349
+
+Mon Feb 28 11:18:24 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * tree.c: Changed xmlSearchNsByHref to call xmlNsInScope with
+ the prefix instead of the namespace name.
+ * test/schemas/annot-err_0.xsd test/schemas/element-err_0.xsd:
+ Adapted invalid values of the "id" attribute, since they are
+ validated now.
+
+Fri Feb 25 08:31:16 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: new version with fixes from Rob Richards
+
+Thu Feb 24 16:37:51 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: applied patch from Rich Salz for multithreading on
+ Windows.
+
+Wed Feb 23 15:04:46 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied a patch from Rob Richards fixing a couple
+ of bugs in the writer
+
+Mon Feb 21 21:51:03 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033).
+ * xpath.c: fixed compilation warning, no change to logic.
+ * xmlschemastypes.c: fixed compilation warning, no change to logic.
+
+Mon Feb 21 14:48:27 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Rob Richards to fix a problem with
+ xmlTextWriterStartAttributeNS
+
+Mon Feb 21 11:41:41 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c xpath.c: fixed remaining known bugs in the XPath streaming,
+ and switched XPath to use it by default when possible
+
+Sat Feb 19 19:25:14 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: a bit of cleanup
+ * elfgcchack.h testapi.c doc/*: rebuilt the API the tests and
+ the documentation as a result.
+
+Fri Feb 18 20:34:03 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h: applied patch from
+ Aron Stansvik to add xmlTextReaderByteConsumed()
+ * testReader.c: added a test option
+ * xmlschemastypes.c: fix a lack of pointer checking in APIs
+
+Fri Feb 18 12:41:10 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/bug167754_0*: Added the regression test of Frans
+ Englich for bug #167754.
+
+Fri Feb 18 12:31:49 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Started support for IDC resolution to default
+ attributes. If building the content model for <all>: ensured
+ to put element declarations and not the particles into the
+ content model automaton (this was bug #167754, reported by
+ Frans Englich).
+
+Thu Feb 17 22:31:58 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * pattern.c pattern.h: Some experimental addition for parsing
+ of expressions and streamable validation.
+ Added xmlStreamPushAttr to the API.
+
+Thu Feb 17 19:57:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added validation for the attribute "id" in the
+ schemata; doing this needed error report fixes for notations,
+ facets and group. Changed NOTATION validation to work with the
+ declared NOTATIONs in the schema; this does have no impact on
+ the validation via the relaxng module.
+ * xmlschemastypes.c include/libxml/xmlschemastypes.h:
+ Added xmlSchemaNewNOTATIONValue to the API to be able to do
+ the NOTATION validation described above.
+ * test/schemas/element-err_0.xsd test/schemas/annot-err_0.xsd:
+ Fixed the values of the "id" attributes, which were not validated
+ previously.
+
+Thu Feb 17 12:03:46 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed comparison for default/fixed attribute
+ values, if the type was 'xsd:string'. Changed the comparison
+ for IDCs to use the whitespace aware comparison function.
+ * xmlschemastypes.c include/libxml/xmlschemastypes.h:
+ Added xmlSchemaGetCanonValue, xmlSchemaNewStringValue and
+ xmlSchemaCompareValuesWhtsp to the API. Added functions
+ to compare strings with whitespace combinations of "preserve",
+ "replace" and "collapse".
+
+Wed Feb 16 13:24:35 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Further work on IDCs, especially evaluation for
+ attribute nodes.
+
+Wed Feb 16 01:19:27 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fix the comment to describe the real return values
+ * pattern.c xpath.c include/libxml/pattern.h: lot of work on
+ the patterns, pluggin in the XPath default evaluation, but
+ disabled right now because it's not yet good enough for XSLT.
+ pattern.h streaming API are likely to be changed to handle
+ relative and absolute paths in the same expression.
+
+Tue Feb 15 15:33:32 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Added IDC evaluation for attribute nodes.
+ Made 'nil'ed elements work. Added a specific error message
+ for 'strict' attribute wildcards.
+ * include/libxml/xmlerror.h: Added an error code for
+ wildcards.
+ * result/schemas/anyAttr-processContents-err1_0_0.err: Adapted.
+
+Sun Feb 13 16:15:03 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ This change started out as a simple desire to speed up the
+ execution time of testapi.c, which was being delayed by
+ nameserver requests for non-existent URL's. From there it
+ just sort of grew, and grew....
+ * nanohttp.c, nanoftp.c: changed the processing of URL's
+ to use the uri.c routines instead of custom code.
+ * include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX
+ * uri.c: added accepting ipV6 addresses, in accordance with
+ RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6)
+ * gentest.py, testapi.c: fixed a few problems with the
+ testing of the nanoftp and nanohttp routines.
+ * include/libxml/xmlversion.h: minor change to fix a
+ warning on the docs generation
+ * regenerated the docs
+
+Sat Feb 12 09:07:11 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed xmlXIncludeParseFile to prevent
+ overwriting XML_COMPLETE_ATTRS when setting pctxt->loadsubset
+ (bug 166199)
+ * Makefile.am, python/tests/Makefile.am, xstc/Makefile.am: added
+ code to add $(top_builddir)/.libs to LD_LIBRARY_PATH whenever
+ PYTHONPATH is set, to assure new libxml2 routines are used.
+
+Fri Feb 11 22:20:41 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed problem when no initial "chunk" was
+ given to xmlCreatePushParser (bug 162613)
+
+Fri Feb 11 18:37:22 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * dict.c: fixed compilation warning
+ * parser.c: changed xmlWarningMsg so ctxt->errNo is not set
+ * xmllint.c: changed to return non-zero status if error
+ on xinclude processing
+ * xmlsave.c: minor deletion of a redundant condition statement
+
+Wed Feb 9 17:47:40 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch to xmlSetNsProp from Mike Hommey
+
+Sun Feb 6 00:17:57 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c xmllint.c: fixed implementation for |
+ * test/pattern/conj.* result/pattern/conj: added a specific regression
+ test
+
+Sat Feb 5 18:36:56 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c: first implementation for | support
+
+Sat Feb 5 14:58:46 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c: fixed the namespaces support
+ * tree.c: fixed xmlGetNodePath when namespaces are used
+ * result/pattern/multiple result/pattern/namespaces
+ test/pattern/multiple.* test/pattern/namespaces.*: added
+ more regression tests
+
+Fri Feb 4 18:26:43 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed one internal function
+ * doc/Makefile.am doc/wiki.xsl: applied patch from Joel Reed
+ * testapi.c doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated
+
+Fri Feb 4 00:25:43 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: use the walker to test the patterns instead of
+ the normal reader
+ * pattern.c xmllint.c: bug fixes in the train including fixing the
+ stupid build break.
+
+Tue Feb 1 18:15:52 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c: more bug fixes for the XPath streaming code.
+
+Mon Jan 31 17:59:24 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Integrated the streaming pattern from the
+ pattern module. Fixed some IDC code bugs. Changed
+ fallback for attribute declaration addition to work like for
+ element declarations.
+
+Mon Jan 31 01:27:22 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c xmllint.c: bugfixes around the streaming patterns
+
+Sun Jan 30 23:35:19 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in result/pattern/simple
+ test/pattern/simple.*: added first test for the patterns
+ * pattern.c xmllint.c: a few fixes
+
+Sun Jan 30 19:27:23 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c include/libxml/pattern.h xmllint.c: added a
+ streaming pattern detector for a subset of XPath, should
+ help Kasimier for identity constraints
+ * python/generator.py: applied Stéphane Bidoul patch to find
+ paths without breaking.
+
+Fri Jan 28 18:53:40 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed an untested pointer dereference and a & vs &&
+
+Fri Jan 28 18:37:18 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: implementation of xmlTextReaderReadString by
+ Bjorn Reese
+
+Fri Jan 28 16:51:47 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Corrected an ambigious symbol-space for
+ local attribute declarations. IFDEFed more IDC code to
+ surpress compiler warnings.
+
+Fri Jan 28 00:57:04 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * bakefile/Readme.txt bakefile/Bakefiles.bkgen bakefile/libxml2.bkl:
+ files for the Bakefile generator for Makefiles from Francesco
+ Montorsi
+ * win32/configure.js: fixes for Windows compilation with non-default
+ flags by Joel Reed
+
+Thu Jan 27 18:23:50 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed xmlCopyDoc to also copy the doc->URL as pointed
+ by Martijn Faassen
+
+Thu Jan 27 13:39:04 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h:
+ Added an initial skeleton for indentity-constraints. This is all
+ defined out, since not complete, plus it needs support from other
+ modules.
+ Added machanism to store element information for the
+ ancestor-or-self axis; this is needed for identity-constraints
+ and should be helpfull for a future streamable validation.
+ * include/libxml/xmlerror.h: Added an error code for
+ identity-constraints.
+
+Wed Jan 26 01:03:37 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: had to fix generation and rebuild.
+ * valid.c: the testapi found a bug in the last code of course !
+
+Wed Jan 26 00:43:05 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am testapi.c doc/Makefile.am: fixing the way testapi.c
+ is generated, fixes bug #161386
+ * dict.c: fix a comment typo
+ * elfgcchack.h doc/*: regenerated
+
+Tue Jan 25 22:39:33 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: found and fixed 2 problems in the internal subset scanning
+ code affecting the push parser (and the reader), fixes #165126
+ * test/intsubset2.xml result//intsubset2.xml*: added the test case
+ to the regression tests.
+
+Tue Jan 25 01:20:11 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * testdso.c xmlregexp.c: warning patches from Peter Breitenlohner
+ * include/libxml/valid.h valid.c parser.c: serious DTD parsing
+ speedups, start to deprecate 3 ElementDef related entry point
+ and replace them with better ones.
+
+Mon Jan 24 00:47:41 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: more hash dictionary interning changes
+
+Sun Jan 23 23:54:39 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * hash.c include/libxml/hash.h: added xmlHashCreateDict where
+ the hash reuses the dictionnary for internal strings
+ * entities.c valid.c parser.c: reuse that new API, leads to a decent
+ speedup when parsing for example DocBook documents.
+
+Sun Jan 23 21:14:20 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: small speedup in skipping blanks characters
+ * entities.c: interning the entities strings
+
+Sun Jan 23 18:35:00 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: boosting common commnent parsing code, it was really
+ slow.
+ * test/comment[3-5].xml result//comment[3-5].xml*: added sprecific
+ regression tests
+
+Sun Jan 23 01:00:09 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: small optimization back.
+
+Sat Jan 22 00:40:31 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c parser.c include/libxml/dict.h: a single lock version
+ mostly avoid the cost penalty of the lock in case of low
+ parallelism, so applying that version instead.
+
+Fri Jan 21 17:54:06 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: patch from Gary Coady to fix a race in dict reference
+ counting in multithreaded apps.
+
+Fri Jan 21 16:08:21 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #164556 where non-fatal errors stopped
+ push parsing and xmlreader.
+ * Makefile.am: fixup
+ * test/errors/webdav.xml result/errors/webdav*: adding regression
+ test for this problem.
+
+Wed Jan 19 17:24:34 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Corrected targetNamespace in
+ xmlSchemaElementDump. Cosmetic changes to the dump output.
+
+Sun Jan 16 21:00:53 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: preparing release of 2.6.17,
+ updated and rebuilt the docs
+
+Sun Jan 16 19:58:36 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: better fix for #151694 not killing c14n regression tests
+ * xmlschemastypes.c: fixing bug #157653
+
+Sun Jan 16 19:01:06 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug #151694, line should always be set in the
+ elements.
+
+Sun Jan 16 01:04:18 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: trying to fix at least the message from
+ bug #158628
+ * include/libxml/xmlsave.h xmlsave.c: added first xmlsave option
+ for format, c.f. bug #159997
+
+Sat Jan 15 18:44:30 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: make __str__ call serialize() on nodes, c.f.
+ bug #157872
+
+Sat Jan 15 18:18:07 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: applied patch from Dan McNichol for compilation on AIX
+
+Sat Jan 15 13:35:19 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed bug #157633 in relaxng choice optimization
+ * result/relaxng/choice0* test/relaxng/choice0*: added regression
+ tests about it.
+ * doc/*: rebuilt
+ * testdso.c: removed a warning due to a missing void in signature.
+
+Thu Jan 13 17:42:55 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * include/libxml/schemasInternals.h xmlschemas.c:
+ Exposed targetNamespace for simple/complex types, model groups,
+ attribute groups and notations (reported by Michael Hewarth
+ to the mailing list). Added targetNamespace to xmlSchemaType,
+ xmlSchemaAttributeGroup and xmlSchemaNotation.
+ Tiny cosmetic change to the content model error report output.
+ * result//all_*.err result//any3_0_0.err result//choice_*.err
+ result//list0_0_1.err result//list0_1_1.err: Adapted output
+ of regression tests.
+
+Thu Jan 13 13:20:51 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Put the fix of Daniel (from Tue Jan 11 14:41:47 CET)
+ back in, since I missed to update xmlschemas.c before doing
+ the previous commit.
+
+Thu Jan 13 12:59:25 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Integrated xmlRegExecErrInfo and xmlRegExecNextValues
+ from xmlregexp.c to report expected elements on content model errors.
+ * all_*.err any3_0_0.err choice_*.err list0_0_1.err list0_1_1.err:
+ Adapted output of regression tests.
+
+Thu Jan 13 12:24:09 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in xmlmodule.c: trying to work around
+ the compilation problem on HP-UX
+
+Wed Jan 12 22:03:33 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c: fixed the fixed size array structure problem reported by
+ Patrick Streule
+
+Wed Jan 12 15:15:02 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * elfgcchack.h testapi.c doc/libxml2-api.xml doc/*: regenerated
+ the API description, rebuilt, improved navigation in documentation
+ a bit.
+
+Wed Jan 12 14:17:14 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlregexp.h xmlregexp.c: extended xmlRegExecErrInfo()
+ and xmlRegExecNextValues() to return error transition strings too,
+ and sink state detection and handling.
+
+Tue Jan 11 14:41:47 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed bug #163641 when the value passed for
+ an atomic list type is NULL.
+
+Tue Jan 11 10:14:33 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * Makefile.am configure.in: fixed dependency on python 2.3,
+ also small improvement for cygwin (bug 163273)
+
+Sun Jan 9 18:46:32 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: William noticed I forgot to add special
+ support for xmlmodules.c define
+ * xmlregexp.c include/libxml/xmlregexp.h: added terminal to
+ xmlRegExecErrInfo() API, adding new xmlRegExecNextValues()
+ entry point and refactored to use both code.
+
+Mon Jan 10 01:02:41 HKT 2006 William Brack <wbrack@mmm.com.hk>
+
+ * doc/xml.html, doc/FAQ.html: added an FAQ under Developer for
+ setting up a "private" library (after some list posts about
+ people having trouble doing it)
+
+Sat Jan 8 23:04:10 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixing behaviour for xmlRegExecErrInfo in case of
+ rollback
+
+Fri Jan 7 14:54:51 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * TODO: small update
+ * xmlregexp.c: trying to add an API to get useful error informations
+ back from a failing regexp context.
+
+Thu Jan 6 17:35:41 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with xmlXPathErr when error number
+ subscript was out of range (bug 163055)
+
+Thu Jan 6 09:57:03 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: fixed problem with xmlURIEscape when query part was
+ empty (actually fixed xmlURIEscapeStr to return an empty
+ string rather than NULL for empty string input) (bug 163079)
+
+Tue Jan 4 17:08:45 PST 2005 Aleksey Sanin <aleksey@aleksey.com>
+
+ * parser.c, parserInternal.c: fixed "col" calculation for
+ struct _xmlParserInput (based on patch from Rob Richards)
+ * include/libxml/xmlerror.h, error.c: propagated error column
+ number in the xmlError structure
+
+Tue Jan 4 22:47:22 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed namespace bug in push mode reported by
+ Rob Richards
+ * test/ns6 result//ns6*: added it to the regression tests
+ * xmlmodule.c testModule.c include/libxml/xmlmodule.h:
+ added an extra option argument to module opening and defined
+ a couple of flags to the API.
+
+Tue Jan 4 21:16:05 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmodule.c include/libxml/xmlmodule.h: applied patch from
+ Bjorn Reese, plus some cleanups
+ * elfgcchack.h doc/elfgcchack.xsl: fixed the stylesheet to
+ add the new header
+ * doc/* testapi.c: regenerated the API
+
+Tue Jan 4 18:47:19 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: making DSO support an option
+ * xmlmodule.c xmlreader.c include/libxml/xmlmodule.h: code
+ and documentation cleanups
+ * elfgcchack.h testapi.c doc/*: regenerated the docs and
+ checks for new module
+ * test/valid/REC-xml-19980210.xml: fix a small change introduced
+ previously
+
+Tue Jan 4 16:07:52 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am config.h.in configure.in error.c libxml-2.0.pc.in
+ testModule.c testdso.c xml2-config.in xmllint.c xmlmodule.c
+ include/libxml/Makefile.am include/libxml/xmlerror.h
+ include/libxml/xmlmodule.h include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in: applied DSO support
+ patch 2 from Joel Reed
+
+Tue Jan 4 15:30:15 CET 2005 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: applied patch from Marcin Konicki for BeOS
+
+Mon Jan 3 13:57:21 PST 2005 Aleksey Sanin <aleksey@aleksey.com>
+
+ * parser.c: added GetLineNumber and GetColumnNumber functions for xmlReader
+
+Sun Jan 2 17:51:18 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+ Re-examined the problems of configuring a "minimal" library.
+ Synchronized the header files with the library code in order
+ to assure that all the various conditionals (LIBXML_xxxx_ENABLED)
+ were the same in both. Modified the API database content to more
+ accurately reflect the conditionals. Enhanced the generation
+ of that database. Although there was no substantial change to
+ any of the library code's logic, a large number of files were
+ modified to achieve the above, and the configuration script
+ was enhanced to do some automatic enabling of features (e.g.
+ --with-xinclude forces --with-xpath). Additionally, all the format
+ errors discovered by apibuild.py were corrected.
+ * configure.in: enhanced cross-checking of options
+ * doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml,
+ doc/libxml2-api.xml, gentest.py: changed the usage of the
+ <cond> element in module descriptions
+ * elfgcchack.h, testapi.c: regenerated with proper conditionals
+ * HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c,
+ testSAX.c: cleaned up conditionals
+ * include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h,
+ hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h,
+ valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]:
+ synchronized the conditionals with the corresponding module code
+ * doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c:
+ added additional conditions required for compilation
+ * doc/*.html, doc/html/*.html: rebuilt the docs
+
+Sat Dec 25 18:10:02 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parserInternals.c: fixed to skip (if necessary) the BOM for
+ encoding 'utf-16'. Completes the fix for bug #152286.
+ * tree.c, parser.c: minor warning cleanup, no change to logic
+
+Fri Dec 24 16:31:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/generator.py: added most required entires to
+ foreign encoding table, plus some additional logic to
+ assure only the 1st param uses the 't#' format. Fixes
+ bug #152286, but may still have some other UTF-16 problems.
+
+Thu Dec 23 23:44:08 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * Makefile.am, gentest.py: enhanced for enabling build in
+ a different directory. Added (optional) param to gentest.py
+ to specify the source directory (bug #155468)
+ * doc/Makefile.am: changed destination of NEWS from (top_srcdir)
+ to (top_builddir) (bug #155468)
+ * python/Makefile.am, python/generator.py: enhanced for enabling
+ build in a different directory(bug #155468). Added (optional)
+ param to generator.py to specify the source directory. Added
+ a new table of functions which have possible "foreign" encodings
+ (e.g. UTF16), and code to use python 't' format instead of
+ 'z' format (mostly solving bug #152286, but still need to
+ populate the table).
+
+Tue Dec 21 08:10:44 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/site.xsl, doc/xml.html, plus rebuilt all the html pages
+ Change reference to new site for Solaris binaries, fixing bug
+ 160598
+
+
+Mon Dec 20 08:02:57 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: reset input->base within xmlStopParser
+ * xmlstring.c: removed call to xmlUTF8Strlen from within
+ xmlUTF8Strpos (Bill Moseley pointed out it was not
+ useful)
+
+Fri Dec 17 16:03:41 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: changed xmlErrValidWarning to use ctxt->warning
+ instead of ctxt->error for its reports (bug #160662)
+
+Fri Dec 17 14:52:17 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/generator.py: modified to allow the ns and nsDefs
+ accessors to return None instead of error when no namespace
+ is present (bug #)
+
+Fri Dec 17 11:40:21 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * doc/Makefile.am: changed maintainer-clean dependency with
+ suggestion from Crispin Flowerday (bug #157634)
+ * debugXML.c: fixed crash when ATTRIBUTE or DOCUMENT nodes
+ were specified with debugDumpNode (bug #160621)
+
+Fri Dec 10 11:24:41 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed ID deallocation problem based on patch from
+ Steve Shepard fixes bug #160893
+ * xmlmemory.c: improving comment.
+ * testapi.c: new test for xmlDictExists() is generated.
+
+Wed Dec 1 22:35:37 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * dict.c, xpath.c, include/libxml/hash.h: fixed up some gcc warnings,
+ no change to logic. New macro XML_CAST_FPTR to circumvent gcc
+ warnings on function pointer <-> object pointer (a hack).
+
+Mon Nov 29 14:07:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed a memory leak on errors in some circumstances #159812
+
+Fri Nov 26 23:20:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlIO.c: added a check within xmlOutputBufferWriteEscape to prevent
+ a dead loop on bad data (bug 159550)
+
+Fri Nov 26 13:09:04 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed strict/lax element wildcards: the children
+ of elements for which a declaration existed were still processed
+ by the wildcard mechanism (reported by philippe ventrillon to the
+ mailing list).
+ Changed the import and include machanism to share dictionaries.
+
+Fri Nov 26 11:44:36 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c parser.c: make sure xmlCtxtReadFile and htmlCtxtReadFile
+ go through the catalog resolution.
+ * gentest.py testapi.c: fix a side effect wrning of the change
+
+Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c include/libxml/dict.h: added xmlDictExists() to the
+ dictionnary interface.
+ * xmlreader.c: applying xmlTextReaderHasAttributes fix for namespaces
+ from Rob Richards
+
+Wed Nov 17 13:54:37 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: tiny enhancement for content model error reports
+ (#157190, #143948). Removed abbreviations: CT, ST and WC
+ (#157190, reported by Frans Englich).
+ Initial: no report of local components.
+ * result/schemas/all* result/schemas/any3_0_0.err
+ result/schemas/choice*
+ result/schemas/cos-st-restricts-1-2-err_0_0.err
+ result/schemas/derivation-ok-extension-err_0_0.err
+ result/schemas/derivation-ok-extension_0_0.err
+ result/schemas/derivation-ok-restriction-2-1-1_0_0.err
+ result/schemas/derivation-ok-restriction-4-1-err_0_0.err
+ result/schemas/deter0_0_0.err result/schemas/extension1_0_2.err
+ result/schemas/facet-unionST-err1_0_0.err
+ result/schemas/hexbinary_0_1.err
+ result/schemas/list* result/schemas/restriction-attr1_0_0.err
+ result/schemas/vdv-first4_0_1.err result/schemas/vdv-first4_0_2.err:
+ Adapted output.
+
+Mon Nov 15 13:04:28 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Moved execution of xmlSchemaCheckDefaults to
+ xmlSchemaTypeFixup; this ensures facets of inherited types to be
+ checked prior to facets of derived types - which caused a seg
+ fault otherwise (bug #158216, reported by Frans Englich).
+
+Sun Nov 14 22:23:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * gentest.py, testapi.c: further enhancement, now all
+ compilation warnings have been fixed.
+ * xmlschemastypes.c: added NULL check for one function
+
+Fri Nov 12 23:58:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: trivial change (changed CHECK_CONTEXT to CHECK_CTXT
+ on a couple of lines)
+ * gentest.py, testapi.c: enhanced to reduce compilation warnings
+
+Fri Nov 12 16:12:48 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Un-commented a TODO in xmlSchemaParseElement.
+
+Fri Nov 12 14:55:36 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Correct symbol space for 'all' and 'choice'.
+ * xmlschemastypes.c include/xmlschemastypes.h: Added 'replace'
+ normalization for 'normalizedString'.
+ Added xmlSchemaWhiteSpaceReplace to the API.
+
+Thu Nov 11 21:43:02 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: forgot a $(srcdir)
+ * encoding.c: stupid error wrong name #157976
+
+Wed Nov 10 15:35:25 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in doc/*: preparing release of libxml2-2.6.16
+
+Wed Nov 10 12:55:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml2class.txt
+ python/libxml_wrap.h python/types.c: Applied patch from Brent
+ Hendricks adding support for late DTD validation.
+ * python/tests/Makefile.am python/tests/dtdvalid.py
+ python/tests/test.dtd: integrated the provided regression test
+
+Tue nov 9 19:24:31 CET 2004 Dodji Seketeli <dodji@seketeli.org>
+
+ * configure.in: detect when struct sockaddr_storage
+ has the __ss_family member instead of ss_family and
+ behave accordingly. We now can use ipv6 on aix.
+
+Tue Nov 9 17:15:46 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am gentest.py testapi.c: integrated in "make tests"
+ added -q option, and more conditional features fixes
+ * catalog.c debugXML.c parser.c testThreads.c xmllint.c
+ xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h
+ include/libxml/debugXML.h: various compilation and conditional
+ cleanups.
+ * doc/*: regenerated
+
+Tue Nov 9 15:59:50 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: better handling of conditional features
+ * HTMLparser.c SAX2.c parserInternals.c xmlwriter.c: more testing
+ on parser contexts closed leaks, error messages
+
+Tue Nov 9 10:21:37 GMT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem concerning XPath context corruption
+ during function argument evaluation (bug 157652)
+
+Mon Nov 8 18:54:52 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c: more types.
+ * parserInternals.c xpath.c: more fixes
+
+Mon Nov 8 18:16:43 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: better parser options coverage
+ * SAX2.c xpath.c: more cleanups.
+
+Tue Nov 9 01:50:08 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c: trying to fix some optional support brokenness
+
+Mon Nov 8 17:25:27 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more coverage
+ * debugXML.c parser.c xmlregexp.c xpath.c: more fixes
+
+Mon Nov 8 15:02:39 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more coverage
+ * SAX2.c parser.c parserInternals.c: more fixes
+
+Mon Nov 8 12:55:16 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c testapi.c xmlIO.c xmlstring.c: more fixes.
+
+Mon Nov 8 11:24:57 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more types, more coverage
+ * parser.c parserInternals.c relaxng.c valid.c xmlIO.c
+ xmlschemastypes.c: more problems fixed
+
+Mon Nov 8 10:24:28 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * gentest.py: fixed test file corruption problem
+
+Sun Nov 7 13:18:05 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: fixed typos and avoid Catalogs verbosity
+
+Sat Nov 6 23:25:16 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testapi.c: augmented the number of types
+
+Sat Nov 6 20:24:07 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new
+ bug fixes and documentation updates.
+
+Sat Nov 6 15:50:11 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: augmented type autogeneration for enums
+ * xpath.c include/libxml/xpath.h: removed direct error reporting.
+
+Sat Nov 6 14:27:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fixed a regression in iconv support.
+
+Fri Nov 5 18:19:23 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: autogenerate a minimal NULL value sequence
+ for unknown pointer types
+ * HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
+ parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
+ xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
+ xpointer.c: This uncovered an impressive amount of entry points
+ not checking for NULL pointers when they ought to, closing all
+ the open gaps.
+
+Fri Nov 5 16:26:28 UTC 2004 William Brack <wbrack@mmm.com.hk>
+
+ * catalog.c: fixed problem with NULL entry (bug 157407)
+ * xpath.c: fixed a couple of warnings (no change to logic)
+
+Fri Nov 5 15:30:43 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more coverage
+ * xmlunicode.c: one fix
+
+Fri Nov 5 23:15:51 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: fixed a compilation problem on a recent change
+
+Fri Nov 5 12:50:09 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more coverage
+ * nanoftp.c tree.c: more fixes
+
+Fri Nov 5 11:02:28 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: fixed the way the generator works,
+ extended the testing, especially with more real trees and nodes.
+ * HTMLtree.c tree.c valid.c xinclude.c xmlIO.c xmlsave.c: a bunch
+ of real problems found and fixed.
+ * entities.c: fix error reporting to go through the new handlers
+
+Thu Nov 4 18:44:56 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: dohh ... stupid change killing xmlParseDoc()
+
+Thu Nov 4 18:32:22 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: changing the way the .c is generated,
+ extending the tests coverage
+ * include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some
+ function signatures, regenerating stuff
+ * SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening
+
+Thu Nov 4 13:32:19 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: extending the tests coverage
+
+Thu Nov 4 11:52:28 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: gentest.py was missing from the EXTRA_DIST
+
+Thu Nov 4 11:48:47 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: extending the tests coverage
+ * HTMLtree.c tree.c xmlsave.c xpointer.c: more fixes and cleanups
+
+Thu Nov 4 00:25:36 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more fixes and extending the tests coverage
+ * nanoftp.c xmlIO.c: more fixes and hardening
+
+Wed Nov 3 20:16:24 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more fixes and extending the tests coverage
+ * valid.c: bunch of cleanups and 2 leaks removed
+
+Wed Nov 3 18:06:44 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more fixes and extending the tests coverage
+ * list.c tree.c: more fixes and hardening
+
+Wed Nov 3 15:19:22 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more fixes and extending the tests coverage
+ * relaxng.c include/libxml/relaxng.h: adding a type init interface
+ * include/libxml/xmlerror.h parser.c xmlreader.c xmlwriter.c: more
+ cleanups and bug fixes raised by the regression tests
+
+Wed Nov 3 12:49:30 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more fixes and extending the tests coverage
+ * xmlwriter.c list.c: more hardeing of APIs
+ * doc/apibuild.py: skip testapi.c when scanning the C files.
+
+Tue Nov 2 23:09:06 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more testing and coverage
+ * elfgcchack.h xmlstring.c include/libxml/xmlstring.h: more cleanups
+ * doc/*: rebuilt
+
+Tue Nov 2 19:44:32 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * gentest.py testapi.c: more developments on the API testing
+ * HTMLparser.c tree.c: more cleanups
+ * doc/*: rebuilt
+
+Tue Nov 2 15:49:34 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c include/libxml/xmlmemory.h: adding xmlMemBlocks()
+ * Makefile.am gentest.py testapi.c: work on generator of an
+ automatic API regression test tool.
+ * SAX2.c nanoftp.c parser.c parserInternals.c tree.c xmlIO.c
+ xmlstring.c: various API hardeing changes as a result of running
+ teh first set of automatic API regression tests.
+ * test/slashdot16.xml: apparently missing from CVS, commited it
+
+Mon Nov 1 15:54:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed an UTF-8 parsing bug reported by Markus Bertheau
+ on #fedora-devel
+
+Sun Oct 31 22:03:38 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a bug reported by Petr Pajas on the list and
+ affecting XML::Libxml
+
+Sun Oct 31 16:33:54 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c doc/examples/testWriter.c: Fixed bug #153937, making
+ sure the conversion functions return the number of byte written.
+ Had to fix one of the examples.
+
+Fri Oct 29 14:16:56 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.1 doc/xmllint.xml: indicate - means stdin closing #156626
+
+Fri Oct 29 14:03:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: register xmlSchemaSetValidErrors, patch from
+ Brent Hendricks in the mailing-list
+ * include/libxml/valid.h HTMLparser.c SAX2.c valid.c
+ parserInternals.c: fix #156626 and more generally how to find out
+ if a validation contect is part of a parsing context or not. This
+ can probably be improved to make 100% sure that vctxt->userData
+ is the parser context too. It's a bit hairy because we can't
+ change the xmlValidCtxt structure without breaking the ABI since
+ this change xmlParserCtxt information indexes.
+
+Wed Oct 27 19:26:20 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * ChangeLog NEWS configure.in doc/*: preparing release 2.6.15
+ * debugXML.c nanoftp.c xmlschemas.c xmlschemastypes.c: cleanups
+
+Wed Oct 27 09:31:24 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: fixed a stupid mistake in xmlBuildRelativeURI
+ (bug 156527)
+
+Wed Oct 27 11:44:35 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c: second part of the security fix for
+ xmlNanoFTPConnect() and xmlNanoHTTPConnectHost().
+
+Tue Oct 26 23:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: applied fixes for a couple of potential security problems
+ * tree.c valid.c xmllint.c: more fixes on the string interning checks
+
+Tue Oct 26 18:09:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/xmlerror.h: added checking for names
+ values and dictionnaries generates a tons of errors
+ * SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c
+ include/libxml/tree.h: fixing the errors in the regression tests
+
+Mon Oct 25 16:04:22 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: modified the handling of _private for entity
+ expansion (bug 155816)
+
+Mon Oct 25 17:11:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed the leak reported by Volker Roth on the list
+ * test/ent10 result//ent10*: added a specific test for the problem
+
+Sat Oct 23 11:07:41 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: unlinked the internal subset within xmlValidateDtd
+ (bug 141827)
+ * configure.in: added -Wall to developer's flags
+ * doc/examples/reader4.res: added to CVS
+
+Fri Oct 22 16:36:50 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: added support for HTML PIs #156087
+ * test/HTML/python.html result/HTML/python.html*: added specific tests
+
+Fri Oct 22 15:20:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: fixed nasty bug #156087
+
+Fri Oct 22 21:04:20 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: fixed a problem occuring only in x86_64 when
+ very large error messages are raised to the Python handlers.
+
+Thu Oct 21 18:03:21 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed a memory bug
+ * doc/examples/reader4.c doc/examples/*: added test from Graham Bennett
+ and regenerated the directory
+
+Tue Oct 19 11:06:39 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlreader.h xmlreader.c: applied patch from
+ Graham Bennett adding 4 convenience functions to the reader API.
+
+Fri Oct 15 11:22:48 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * debugXML.c: excluded a few nodes (with no content) from the
+ string check routine.
+
+Fri Oct 15 10:48:30 EDT 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/xmlerror.h: added UTF-8 string checking,
+ raise a problem, need debug
+
+Wed Oct 13 02:17:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: applied patch from Thomas Fitzsimmons fixing
+ #155240 building outside the source tree. but make tests fails.
+
+Mon Oct 11 16:26:51 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/xmlerror.h: added namespace checking
+
+Sat Oct 9 22:36:21 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: some framework preparation to add namespace checkings
+
+Thu Oct 7 15:12:58 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/debugXML.h include/libxml/xmlerror.h:
+ adding the tree debug mode
+ * parser.c relaxng.c tree.c xpath.c: fixing various problems reported
+ by the debug mode.
+ * SAX2.c: another tree fix from Rob Richards
+
+Wed Oct 6 10:50:03 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * catalog.c: small change to last fix, to get xml:base right
+
+Wed Oct 6 09:33:51 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * catalog.c: added code to handle <group>, including dumping
+ to output (bug 151924).
+ * xmlcatalog.c, xmlstring.c, parser.c: minor compiler warning
+ cleanup (no change to logic)
+
+Mon Oct 4 16:09:07 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in debugXML.c include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in: revamped the XML debugging
+ module and prepare for a new checking mode
+
+Mon Oct 4 13:53:24 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Malcolm Tredinnick fixing bug #152426
+
+Mon Oct 4 12:26:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/tests/outbuf.py:
+ applied patch from Malcolm Tredinnick fixing bug #154294
+ related to saving to python file objects.
+
+Sat Oct 2 21:08:51 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: changed xmlHasNsProp to properly handle a request for
+ the default namespace (bug 153557)
+
+Sat Oct 2 18:18:27 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed problem with dictionary handling within
+ xmlParseInNodeContext (bug 153175)
+
+Sat Oct 2 15:46:37 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * check-relaxng-test-suite.py, check-relaxng-test-suite2.py,
+ check-xinclude-test-suite.py, check-xml-test-suite.py,
+ check-xsddata-test-suite.py, doc/examples/index.py: changed
+ changed sys.path setting from 'append' to 'insert' (patch
+ supplied by Malcolm Tredinnick) (bug 153716)
+
+Sat Oct 2 15:03:14 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/parserInternals.h: added two new macros
+ IS_ASCII_LETTER and IS_ASCII_DIGIT used with (html)
+ parsing and xpath for testing data not necessarily
+ unicode.
+ * HTMLparser.c, xpath.c: changed use of IS_LETTER_CH and
+ IS_DIGIT_CH macros to ascii versions (bug 153936).
+
+Fri Oct 1 20:37:25 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * error.c: added some coding to attempt to display which file
+ contains an error when using XInclude (bug 152623)
+
+Thu Sep 30 11:19:17 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: stupid cut'n paste bug in xmllint detection
+
+Wed Sep 29 17:47:56 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/*: releasing 2.6.14, rebuilding the docs
+
+Wed Sep 29 15:00:11 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h
+ include/libxml/schemasInternals.h: Parsing of <complexContent>
+ - handle attribute 'mixed', catch illegal attributes.
+ Parsing of <complexType> - handle attributes 'abstract',
+ 'final' and 'block', catch illegal attributes.
+ Validation of complex types - handle abstract types.
+ Added handling of default/fixed attributes and element values.
+ Per validation option attribute nodes/text nodes are created
+ on the instance.
+ Added the corresponding constraints for fixed/default.
+ Added xmlSchemaSetValidOptions, xmlSchemaGetValidOptions
+ to the external API.
+ Extended element declaration constraints.
+ Got rid of perseverative creation of temporery validation/parser
+ contexts.
+ Added handling of xsi:schemaLocation and
+ xsi:noNamespaceSchemaLocation.
+ Fixed xsi:type component resolution if using non-prefixed
+ QNames.
+ * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h:
+ Enabled namespace awareness of the content model if using the
+ model group "all".
+ * test/schemas/bug152470_1.xsd: Removed an "abstract" attribute,
+ which broke the test.
+ * xstc/xstc.py: Workaround to accomodate case insensitive
+ test definitions in ms-test.def.xml (was missing in a previous
+ commit).
+
+Wed Sep 29 11:03:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/drv_libxml2.py: another patch from Malcolm Tredinnick
+ adding option not to load dtd from the drv_libxml2.py module
+ #134633
+
+Tue Sep 28 14:30:22 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * acconfig.h config.h.in configure.in xmlIO.c xmlregexp.c xmlschemas.c
+ xmlschemastypes.c: another patch from Malcolm Tredinnick fixing
+ warning generated by the Nonstop Kernel Open System Services
+ compiler #151710
+
+Tue Sep 28 13:07:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: applied patch from Malcolm Tredinnick fixing
+ python exception hierarchy #139824
+
+Sun Sep 26 16:40:24 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c TODO: applied patch from Malcolm Tredinnick fixing errata
+ E20 concerning NMTOKENS and co. validation #153722
+ * result/VC/AttributeNmtokens test/VC/AttributeNmtokens
+ test/VCM/AttributeNmtokens.xml: also added tests from Malcolm
+
+Sun Sep 26 16:24:44 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/xstc.py: applied patch from Malcolm Tredinnick fixing space/tabs
+ #153713
+ * xpath.c: fixed a realloc potential problem
+
+Fri Sep 24 16:14:12 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: fixed make valgrind xstc
+
+Thu Sep 23 18:23:46 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: fixing an out of bound adressing issue
+
+Thu Sep 23 15:14:12 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c parser.c relaxng.c xmlschemas.c: more memory related
+ code cleanups.
+
+Thu Sep 23 01:04:30 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a bunch of errors when realloc failed.
+
+Wed Sep 22 23:56:05 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c uri.c: couple of memory fixes from Mark Vakoc reported
+ by Purify on Windows.
+
+Mon Sep 20 22:01:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added --timing --copy timing for the copy
+ * vms/build_libxml.com: applied patch from Craig Berry
+ to build with recent releases
+
+Fri Sep 17 21:25:33 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c, include/libxml/nanohttp.h: added the routine
+ xmlNanoHTTPContentLength to the external API (bug151968).
+ * parser.c: fixed unnecessary internal error message (bug152060);
+ also changed call to strncmp over to xmlStrncmp.
+ * encoding.c: fixed compilation warning (bug152307).
+ * tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed
+ a couple of compilation warnings.
+ * HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation
+ warnings; no change to logic.
+
+Fri Sep 17 10:40:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: removed some extern before function code reported by
+ Kjartan Maraas on IRC
+ * legacy.c: fixed compiling when configuring out the HTML parser
+ * Makefile.am: added a declaration for CVS_EXTRA_DIST
+ * HTMLparser.c: beginning of an attempt at cleaning up the construction
+ of the HTML parser data structures, current data generate a huge
+ amount of ELF relocations at loading time.
+
+Fri Sep 17 10:36:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * ChangeLog: applied fix from Stepan Kasal to fix duplication
+ in the change log and cleanup of space/tabs issues.
+
+Thu Sep 16 13:24:27 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ test/schemas/bug152470_1.* result/schemas/bug152470_1_1*:
+ Simpified attribute wildcard creation and assignment to get rid
+ of memory leaks.
+ Restructured the validation process.
+ Restructured and expanded parsing of <attributeGroup>.
+ Added initial handing of xsi:type.
+ Advanced handling of xsi:nil (should work now for simple types).
+ Added construction of schemata using xsi:schemaLocation and
+ xsi:noNamespaceSchemaLocation; this is not enabled, since
+ no corresponding API exists yet.
+ Moved the content model to complex type components.
+ Resolution of types for attributes will look for simple types
+ only (incl. all the built-in simple types).
+ Extended parsing of 'anyAttribute'.
+ Fixed content-type type for complex types if derived from
+ 'anyType' using the short-hand form (see bug # 152470,
+ submitted by Thilo Jeremias).
+ * include/libxml/xmlschematypes.h: Cleaned up some comments.
+ * xstc/xstc.py: Workaround to accomodate case insensitive
+ test definitions in ms-test.def.xml.
+ * result/schemas/deter0_0_0.err result/schemas/ns0_0_2.err
+ result/schemas/ns0_1_2.err: Adapted.
+
+Sat Sep 11 09:04:22 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlwriter.c: changed char array initialisation to avoid a
+ complaint from some compiler(s) (bug 152308)
+
+Thu Sep 9 07:22:11 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c: applied fixes for the UTF8ToISO8859x transcoding
+ routine suggested by Mark Itzcovitz
+
+Wed Sep 8 22:50:27 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c xmlsave.c: fixed 2 problems raised by #152140, one
+ which is that notation not in the internal subset should
+ not be saved, and the second more nasty on an error saving
+ NOTATIONs, if there is a proof that nobody uses notations !
+
+Wed Sep 8 11:04:27 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/xmlschemas.h: Added the function
+ xmlSchemaValidateOneElement to the XML Schema validation API,
+ as proposed by Jeffrey Fink - see bug # 152073.
+
+Tue Sep 7 11:10:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/Makefile.am xstc/Makefile.am: some cleanup
+ checking for xmllint and xsltproc in configure.in, fixed
+ make dist w.r.t. the new xstc subdir.
+ * doc/*: rebuilt
+
+Mon Sep 6 16:42:59 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/xstc.py: Changed to finally validate instance documents.
+
+Mon Sep 6 16:04:01 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am Makefile.am: integrated to "make valgrind",
+ heavy ... weight 250MB of VM !
+
+Mon Sep 6 14:54:39 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xstc/Makefile.am xstc/xstc-to-python.xsl xstc/xstc.py Makefile.am:
+ more cleanup in integrating the xstc testsuite
+
+Mon Sep 6 13:56:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in xstc/.cvsignore xstc/Makefile.am:
+ starting to integrate the xstc suite in the normal regression
+ tests
+
+Mon Sep 6 13:14:11 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/sun-test-def.xml: The "tsDir" attribute was not
+ set correctly.
+
+Mon Sep 6 11:52:50 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * check-xinclude-test-suite.py: when output and expected do not match
+ exactly run diff to put the differences in the log c.f. #148691
+
+Mon Sep 6 11:17:35 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xstc/xstc-to-python.xslt xstc/ms-test-def.xml xstc/nist-test-def.xml
+ xstc/sun-test-def.xml: Initial release of generation files to
+ create python test scripts, which will run the W3C XML Schema Test
+ Collection. The ms-test-def.xml and sun-test-def.xml files
+ were extracted from the online HTML XSTC results [1], since they did
+ not exist for the SUN tests, and only partially did exist for the
+ MS tests. The NIST definition file was created by concatenation
+ of the existing definition files for each single datatype.
+ The stylesheet "xstc-to-python.xslt" should be run against the
+ definition files to produce the python scripts.
+ [1] "http://www.w3.org/XML/2001/05/xmlschema-test-collection/
+ results-master.html"
+
+Fri Sep 3 20:29:59 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: Fixed a seg fault in xmlGetQNameProp:
+ a format argument was missing.
+ Fixed wrong assignment of the owner of a wildcard in
+ xmlSchemaBuildAttributeValidation (in the shorthandform of
+ <complexType>; this caused a seg fault, due to a double-free
+ of the wildcard.
+ Added a check for circular attribute group references.
+ Added a check for circular model group definition references.
+ Fixed a dublicate xmlParserErrors enum value - see bug #151738.
+
+Fri Sep 3 10:08:13 PDT 2004 William Brack <wbrack@mmmm.com.hk>
+
+ * xmlstring.c: modified comments on xmlGetUTF8Char in
+ response to bug 151760 (no change to logic)
+
+Tue Aug 31 09:46:18 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlstring.c: fixed error reported on the list caused by
+ my last change
+
+Tue Aug 31 15:41:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in doc/*: release of libxml2-2.6.13
+
+Tue Aug 31 14:14:30 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fixing #151456, an encoding error could generate
+ a serialization loop.
+
+Tue Aug 31 11:34:04 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: also produce a tar ball with just the sources
+ * xmllint.c: added --path option and --load-trace options to
+ xmllint, RFE #147740 based on xsltproc versions
+ * doc/xmllint.* doc/*: updated the man page and rebuilt
+
+Tue Aug 31 10:37:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: "" is a valid hexbinary string dixit xmlschema-dev
+ * result/schemas/hexbinary_0_1.err test/schemas/hexbinary_1.xml:
+ update the test.
+ * test/ns5 result//ns5*: added a test for the namespace bug fixed
+ in previous commit.
+ * Makefile.am: added a message in the regression tests
+
+Mon Aug 30 23:36:21 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c: fixed bug introduced during OOM fixup causing problems
+ with default namespace when a named prefix with the same href
+ was present (reported on the mailing list by Karl Eichwalder.
+ * xmlstring.c: modified xmlCheckUTF8 with suggested code from
+ Julius Mittenzwei.
+ * dict.c: added a typecast to try to avoid problem reported by
+ Pascal Rodes.
+
+Mon Aug 30 12:45:46 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: Fixed a bug in xmlSchemasCheckFacet, which did
+ not create a computed value on a facet and thus crashed during
+ validation of instances.
+ Expanded validity checks for min/maxOccurs attributes.
+ Expanded validity checks for the value of the attribute "form".
+
+Fri Aug 27 18:32:24 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlstring.c: fixed a problem with xmlCheckUTF8 reported on the
+ mailing list by Julius Mittenzwei
+
+Fri Aug 27 00:13:39 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: added BuildRequires: zlib-devel, fixes
+ Red Hat bug #124942
+
+Thu Aug 26 12:27:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: remove a warning on Solaris
+ * xmlschemastype.c: fix a crashing bug #151111
+
+Wed Aug 25 22:20:18 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * test/schemas/import-bad-1_0.imp: Added missing test file.
+ * xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h:
+ Substituted the obsolete xmlSchemaValidError(s) for xmlParserErrors
+ - see #150840.
+ Changed the import of schemas to allow failure of location
+ of a resource to be imported.
+ * result/schemas/all_* result/schemas/any3_0_0.err
+ result/schemas/choice_* result/schemas/import1_0_0.err
+ result/schemas/list0_0_1.err result/schemas/list0_1_0.err
+ result/schemas/list0_1_1.err result/schemas/ns0_0_2.err
+ result/schemas/ns0_1_2.err: Adapted regression test results.
+
+Tue Aug 24 20:49:15 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml, xmltutorial.pdf, *.html
+ fix Xpath memory leak (thanks to sKaBoy and William Brack)
+
+Tue Aug 24 21:10:59 CEST 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * parser.c: fixed path problem in DTD loading reported by
+ Sameer Abhinkar
+
+Tue Aug 24 16:40:51 CEST 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/configure.js: added support for version extra
+ * win32/Makefile.*: upgraded to zlib 1.2.1
+
+Mon Aug 23 14:33:54 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: removing -O -g from default gcc flags #150828
+
+Sun Aug 22 16:26:46 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* NEWS: preparing 2.6.12 release, updated and
+ and rebuilt the docs.
+
+Sun Aug 22 16:07:20 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: fix a problem on last commit
+
+Sun Aug 22 15:16:53 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c xpath.c include/libxml/xpath.h
+ include/libxml/xpathInternals.h python/libxml.c
+ python/libxml_wrap.h: trying to remove some warning when compiling
+ on Fedora Core 3 and 64bits
+
+Sat Aug 21 0:035:10 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
+
+ * xmlschemas.c: modified parsing of <list>, <union>, <restriction>,
+ <sequence>, <choice>, <include>, <import>.
+ Fixed schema defaults (elementFormDefault, etc.) for included
+ schemas.
+ Fixed a bug which reported attributes as invalid on
+ elements declarations with the built-in type 'anyType'.
+ Added "lax" validation of the content of elements of type
+ 'anyType'.
+ Fixed: element declarations with the same name were treated
+ as duplicate if located in the subtree of <choice> -> <sequence>.
+ (This was bug 150623, submitted by Roland Lezuo)
+ Fixed cleanup of error codes in xmlSchemaValidateDoc as proposed
+ by Igor Kapitanker. (This was bug 150647, submitted by Igor
+ Kapitanker)
+ * xmlschemastypes.c: Changed the type of anyType to
+ XML_SCHEMAS_ANYTYPE.
+ * include/libxml/xmlerror.h: Added schema parser errors.
+ * result/schemas/bug145246_0_0*
+ result/schemas/extension1_0_2.err: Changed test results.
+ * result/schemas/ct-sc-nobase_0_0*
+ result/schemas/facet-whiteSpace_0_0*
+ result/schemas/import1_0_0* result/schemas/import2_0_0*
+ result/schemas/include2_0_0* result/schemas/include3_0_0*
+ result/schemas/restriction-attr1_0_0*
+ result/schemas/seq-dubl-elem1_0_0*
+ result/schemas/xsd-list-itemType_0_0*: Added new rest results.
+ test/schemas/bug145246.xsd.imp test/schemas/ct-sc-nobase_0*
+ test/schemas/facet-whiteSpace_0* test/schemas/import1_0*
+ test/schemas/import2_0* test/schemas/include2_0*
+ test/schemas/include3_0* test/schemas/restriction-attr1_0*
+ test/schemas/seq-dubl-elem1_0* test/schemas/xml.xsd
+ test/schemas/xsd-list-itemType_0*: Added new tests and missing
+ files.
+
+Fri Aug 20 18:51:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in: a bit of cleanup and a extra variable for
+ CVS dist
+
+Thu Aug 19 07:44:07 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml, xmllint.1, xmllint.html:
+ Edit and rebuild the man pages with Daniel's C14 update
+
+Wed Aug 18 19:15:27 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed missing line numbers on entity as reported
+ on the list by Steve Cheng
+
+Wed Aug 18 14:04:31 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in globals.c include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in: added some code to
+ include the CVS ChangeLog version in the xmlParserVersion
+ string (printed by xmllint with --version)
+
+Wed Aug 18 11:14:06 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/xmlschemas.h python/generator.py
+ python/libxml.c python/libxml_wrap.h python/types.c
+ python/tests/schema.py python/tests/Makefile.am: Applied patch
+ from Torkel Lyng to add Schemas support to the Python bindings
+ and extend the schemas error API, registered a new test.
+ * doc/* elfgcchack.h: rebuilt to regenerate the bindings
+
+Mon Aug 16 14:36:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: added help for new set shell command
+ * xinclude.c xmllint.c xmlreader.c include/libxml/parser.h:
+ added parser option to not generate XInclude start/end nodes,
+ added a specific option to xmllint to test it fixes #130769
+ * Makefile.am: regression test the new feature
+ * doc/xmllint.1 doc/xmllint.xml: updated man page to document option.
+
+Mon Aug 16 02:42:30 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: small typo pointed out by Mike Hommey
+ * doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved
+ the --c14n description, c.f. #144675 .
+ * nanohttp.c nanoftp.c: applied a first simple patch from
+ Mike Hommey for $no_proxy, c.f. #133470
+ * parserInternals.c include/libxml/parserInternals.h
+ include/libxml/xmlerror.h: cleanup to avoid 'error' identifier
+ in includes #137414
+ * parser.c SAX2.c debugXML.c include/libxml/parser.h:
+ first version of the inplementation of parsing within
+ the context of a node in the tree #142359, new function
+ xmlParseInNodeContext(), added support at the xmllint --shell
+ level as the "set" function
+ * test/scripts/set* result/scripts/* Makefile.am: extended
+ the script based regression tests to instrument the new function.
+
+Sat Aug 14 18:53:08 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml, xmllint.html, xmllint.1:
+ add c14n to man page (man, it's hard to keep up with
+ Daniel!)
+
+Sat Aug 14 18:45:38 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml, xmllint.html, xmllint.1:
+ add pattern, walker, maxmem, output and xmlout to man page
+ fixes #144675
+
+Sun Aug 15 00:41:12 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added a --c14n option to canonicalize the output
+ should close the RFE #143226
+
+Sat Aug 14 23:50:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Dodji pointed out a bug in xmlGetNodePath()
+ * xmlcatalog.c: applied patch from Albert Chin to add a
+ --no-super-update option to xmlcatalog see #145461
+ and another patch also from Albert Chin to not crash
+ on -sgml --del without args see #145462
+ * Makefile.am: applied another patch from Albert Chin to
+ fix a problem with diff on Solaris #145511
+ * xmlstring.c: fix xmlCheckUTF8() according to the suggestion
+ in bug #148115
+ * python/libxml.py: apply fix from Marc-Antoine Parent about
+ the errors in libxml(2).py on the node wrapper #135547
+
+Sat Aug 14 13:18:57 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: added a dumb rule to able to compile tst.c
+ when people submit a sample test program
+ * xmlschemas.c: applied small patch from Eric Haszlakiewicz
+ to document xmlSchemasSetValidErrors() limitations, #141827
+ * error.c: Add information in generic and structured error
+ setter functions that this need to be done per thread #144308
+ * xmlsave.c: fixed bug whith missing NOTATION(s) serialization
+ bug #144162
+ * doc/xmllint.xml: typo fix #144840
+
+Tue Aug 10 07:19:31 PDT 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xmlregexp.c xmlschemas.c xmlschemastypes.c
+ include/libxml/schemasInternals.h include/libxml/xmlerror.h
+ include/libxml/xmlschemastypes.h: applied Schemas patches
+ from Kasimier Buchcik
+ * test/ result/ bug141333* annot-err* any[1-4]* bug145246*
+ element-err* element-minmax-err* include1* restrict-CT-attr-ref*:
+ lot of new tests for things fixed by the patch
+
+Fri Aug 6 09:22:34 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: fixed my mis-handling of External ID on last
+ change.
+
+Wed Aug 4 23:40:21 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: changed the parsing of a document's DTD to use
+ the proper base path (bug 144366)
+
+Wed Aug 4 16:58:08 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am config.h.in configure.in python/Makefile.am:
+ applied a patch from Gerrit P. Haase to get python bindings
+ on Cygwin
+
+Tue Aug 3 15:08:22 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/valid.h: elaborated on description of
+ xmlValidityWarningFunc and xmlValidityErrorFunc (bug
+ 144760)
+ * xmlIO.c, xmlschemastypes.c, include/libxml/schemasinternals.h:
+ minor fixes to comments for doc rebuilding errors.
+ * doc/*.html: rebuilt the docs
+
+Tue Aug 3 23:59:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/ChangeLog.xsl doc/downloads.html doc/xml.html doc/*:
+ fixes documentation glitches raised by Oliver Stoeneberg
+
+Tue Aug 3 09:42:31 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: fixed problem with memory leak on text nodes in DTD
+ (bug 148965) with patch provided by Darrell Kindred
+
+Tue Aug 3 08:14:44 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c: fixed initialisation problem for htmlReadMemory
+ (bug 149041)
+
+Sat Jul 31 11:01:33 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * doc/buildDocBookCatalog: enhanced per bug 119876. Further
+ info posted to the mailing list.
+
+Sat Jul 31 09:12:44 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c, encoding.c, error.c, parser.c, tree.c, uri.c, xmlIO.c,
+ xmlreader.c, include/libxml/tree.h: many further little changes
+ for OOM problems. Now seems to be getting closer to "ok".
+ * testOOM.c: added code to intercept more errors, found more
+ problems with library. Changed method of flagging / counting
+ errors intercepted.
+
+Fri Jul 30 13:57:55 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied a couple of patch one from Oliver Stoeneberg
+ and another one from Rob Richards fixing #148448
+
+Thu Jul 29 13:20:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: 1 line patch, apparently htmlNewDoc() was not
+ setting doc->charset.
+
+Thu Jul 29 00:05:58 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c, tree.c, uri.c, xmlIO.c, xmlreader.c: further
+ fixes for out of memory condition, mostly from Olivier
+ Andrieu.
+ * testOOM.c: some further improvement by Olivier, with
+ a further small enhancement for easier debugging.
+
+Tue Jul 27 00:34:07 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c, error.c, parser.c, tree.c, xmlreader.c:
+ implemented patches supplied by Olivier Andrieu
+ (bug 148588), plus made some further enhancements, to
+ correct some problems with out of memory conditions.
+ * testOOM.c: improved with patches from Olivier Andrieu
+
+Mon Jul 26 11:03:18 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: put in patch for Windows buffer re-allocation
+ submitted by Steve Hay (bug 146697)
+
+Sun Jul 25 17:18:39 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: added some code to check, when an include is
+ done, whether the requested URL gets mapped to some other
+ location (e.g. with a catalog entry) and, if so, take care
+ of the xml:base properly (bug 146988)
+
+Sun Jul 25 14:02:24 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * error.c: fixed to assure user data param is set correctly
+ when user structured error handler is called (bug 144823)
+
+Thu Jul 22 10:14:48 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlreader.c: fixed problem with reader state after
+ processing attributes (bug 147993)
+
+Wed Jul 21 17:04:27 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in, Makefile.am: put in an auto* check for the
+ path to perl (if it exists), and modified make Timingtests
+ to use that path instead of just executing the dbgenattr.pl
+ script (bug 148056)
+
+Fri Jul 16 18:36:33 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/generator.py: added a check on the argument for some
+ classes (e.g. xmlDoc and xmlNode) to prevent a segfault (as
+ reported on the list). Further enhancement should be done
+ to auto-create the appropriate object.
+ * python/libxml.c: minor fix for a warning message; added a
+ routine, currently not used, to report the description of a
+ PyCObject.
+ * python/libxml2class.txt: regenerated
+
+Fri Jul 16 11:01:40 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c test/catalogs/white* result/catalogs/white*:
+ applied patches from Peter Breitenlohner to fix handling
+ of white space normalization in public ids and add tests
+
+Tue Jul 13 17:24:13 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: applied a small fix from Steve Hay
+
+Tue Jul 13 23:02:19 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: Added code to in PREDICATE/FILTER handling to reset
+ the xpath context document pointer (part of fix to libxslt
+ bug 147445)
+
+Tue Jul 13 00:14:08 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/libxml.py: ran 'expand' on the file to get rid of mixture
+ of tabs and spaces (bug 147424)
+
+Sun Jul 11 22:38:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/drv_libxml.py: added an encoding "special comment" to avoid
+ warning message in python2.3 (bug 146889)
+ * Makefile.am, python/Makefile.am, python/tests/Makefile.am: small
+ change to make "make tests" a little quieter (MAKEFLAGS+=--silent)
+ * xpath.c: enhanced to take advantage of current libxslt handling
+ of tmpRVT. Fixes bug 145547.
+
+Fri Jul 9 14:02:54 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h uri.c: fixed a couple of problems in the new
+ elfgcchack.h trick pointed by Peter Breitenlohner
+
+Wed Jul 7 00:45:48 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * elfgcchack.h doc/apibuild.py doc/libxml2-api.xml: fixed a bug
+ which prevented building with --with-minimum
+
+Mon Jul 5 19:43:51 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/*: releasing 2.6.11, updated and regenerated the
+ docs
+
+Mon Jul 5 18:43:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: make the push interfaces synchronous
+ * python/tests/sync.py: added a specific test
+ * python/tests/Makefile.am doc/examples/Makefile.am
+ doc/examples/index.py: added the new test, cleaning up
+ "make tests" output
+
+Mon Jul 5 15:09:17 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Kasimier to fix some Relax-NG
+ datatype facet problem with recent changes.
+
+Sat Jul 3 11:31:02 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * python/libxml.c: Changed the number of XPath extension functions
+ allowed to be variable-length (patch supplied by Marc-Antoine
+ Parent, bug 143805). Added code to "unregister" the functions
+ when the parser cleanup takes place.
+
+Fri Jul 2 14:22:14 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c python/libxml.c python/libxml2-python-api.xml:
+ some updates with memory debugging facilities while messing
+ with libxslt python bindings
+
+Thu Jul 1 14:53:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/generator.py python/libxml.py
+ python/libxml2-python-api.xml python/libxml2class.txt:
+ applied patch from Stéphane Bidoul to fix some Python bindings
+ initialization, then had to change the parserCleanup()
+ to handle memory released there.
+ * xmlmemory.c: added more debugging comments.
+
+Thu Jul 1 13:18:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: seems the reader buffer could be used while not
+ allocated, fixes bug #145218
+
+Thu Jul 1 11:34:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: do not provide functions used as destructor
+ of classes as public methods to avoid double-free problem like
+ in bug #145185
+
+Wed Jun 30 19:45:23 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c, xmlschemastypes.c: warning message cleanup.
+ Now compiles warning-free, all tests passed.
+ * SAX2.c: small change to comments for documentation.
+ No change to logic.
+
+Tue Jun 29 15:00:13 PDT 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: more fixes with Kasimier, looks far cleaner :-)
+
+Tue Jun 29 23:00:05 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: Kasimier Buchcik fixed the memory access and
+ allocation problem
+
+Tue Jun 29 19:00:32 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h
+ include/libxml/schemasInternals.h include/libxml/xmlschemastypes.h:
+ applied Schemas patches from Kasimier Buchcik, there is still
+ one open issue about referencing freed memory.
+ * test/schemas/* result/schemas/*: updated with new tests from
+ Kasimier
+
+Tue Jun 29 14:52:18 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/globals.h include/libxml/xmlIO.h
+ doc/libxml2-api.xml doc/libxml2-refs.xml: moved some definitions
+ to globals.h to avoid some troubles pointed out by Rob Richards
+
+Mon Jun 28 11:25:31 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.m4: applied changes suggested by Mike Hommey, remove
+ libxml1 support and use CPPFLAGS instead of CFLAGS
+
+Sun Jun 27 14:17:15 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: another, more 'experimental' feature to
+ get compiler optimization based on gcc runtime profiling
+
+Sun Jun 27 14:02:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de
+ Ven suggestion to reduce ELF footprint and generated code. Based on
+ aliasing of libraries function to generate direct call instead of
+ indirect ones
+ * doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic
+ generation of elfgcchack.h based on the API description, extended
+ the API description to show the conditionals configuration flags
+ required for symbols.
+ * nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup
+ * doc/*: regenerated the docs.
+
+Sun Jun 27 10:02:28 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * regressions.py, regressions.xml: new files for running
+ regression tests under Python. Not yet complete, but
+ should provide good testing under both Linux and Windows.
+ * testHTML.c, testSAX.c, xmllint.c: changed the 'fopen' used
+ for --push testing to include the 'rb' param when compiled
+ under Windows.
+
+Fri Jun 25 13:38:57 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c: fixed a problem when base path was "./xxx"
+ * result/XInclude/*: 5 test results changed by above.
+ * Makefile.am: fixed a couple of spots where a new
+ result file used different flags that the testing one.
+
+Thu Jun 24 16:27:44 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: suppressed warnings from within xmlValidGetValidElements
+ (bug 144644)
+ * doc/examples/testWriter.c: corrected typo in comment for ISO-8859-1
+ (bug 144245)
+
+Thu Jun 24 10:17:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: implemented bugfix from Massimo Morara for DTD
+ dumping problem.
+ * test/valid/t10.xml, result/valid/t10.*: added regression
+ for above
+ * configure.in: small change for my profile settings
+
+Wed Jun 23 20:18:19 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog_man.xml, xmlcatalog.1
+ Docs patch from Ville Skytta, bugzilla #144841
+
+Sat Jun 19 18:34:11 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml, xmllint.html, xmllint.1
+ update man page to reflect William's newly disciplined return
+ code mojo
+
+Thu Jun 17 00:51:55 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/io2.c doc/examples/parse4.c: fixing a couple of
+ compilation errors when configured with --with-minimum
+
+Wed Jun 16 16:07:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: applied patch from Stefano Debenedetti to register
+ namespaces in the debug shell
+
+Mon Jun 14 21:56:31 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fix from Steve Ball and update of the comment.
+ * Makefile.am result/errors/*.str: William pointed out that
+ the streaming error checking part wasn't streaming, fixing
+
+Mon Jun 14 14:11:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: patch from Igor for the default catalog path on Windows
+
+Sat Jun 12 09:03:57 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in: apparently wasn't updated last time
+
+Thu Jun 10 20:57:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in, xmlmemory.c, globals.c: fixed problem when
+ configuring using --with-thread-alloc
+
+Wed Jun 9 16:31:24 CEST 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/configure.js win32/Makefile.* minor changes for the new
+ layout of the Windows binary package
+
+Tue Jun 8 19:50:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/xmlerror.h: applied another patch
+ from Kasimier Buchcik for Schema Component Constraints
+ * test/schemas/* result/schemas/*: added the regression tests
+
+Tue Jun 8 21:27:03 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmllint.c: fixed missing error return code for schema
+ validation (bug 143880), also changed over to an enum for
+ defining the error return codes for all conditions.
+
+Tue Jun 8 14:01:14 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xmlreader.c include/libxml/parser.h: fixed a serious
+ problem when substituing entities using the Reader, the entities
+ content might be freed and if rereferenced would crash
+ * Makefile.am test/* result/*: added a new test case and a new
+ test operation for the reader with substitution of entities.
+
+Tue Jun 8 12:14:16 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c xmlIO.c include/libxml/globals.h include/libxml/xmlIO.h:
+ applied patch from Rob Richards for the per thread I/O mappings
+
+Tue Jun 8 09:58:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: some further enhancement to take care of
+ xml:base for XPointer elements (bug 143886). Also fixed
+ a problem when xml:base was already specified on an
+ XInclude'd element.
+
+Mon Jun 7 22:14:58 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: fixed a problem with internal cleanup of <DIV> element
+ (bug 143738).
+
+Mon Jun 7 16:57:43 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * uri.c, include/libxml/uri.h: added a new routine
+ xmlBuildRelativeURI needed for enhancement of xinclude.c
+ * xinclude.c: changed handling of xml:base (bug 135864)
+ * result/XInclude/*: results of 5 tests changed as a result
+ of the above change
+
+Fri Jun 4 11:27:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * test/schemas/* result/schemas/*: added a bunch of tests from
+ Kasimier Buchcik posted on May 11
+
+Thu Jun 3 17:58:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: new patch from Kasimier Buchcik for processContents
+ of wildcards attribute handling
+ * test/schemas/anyAttr-* result/schemas/anyAttr-*: added specific
+ regression tests
+
+Thu Jun 3 13:20:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a bug where invalid charrefs may not be detected
+ sometimes as pointed by Morus Walter.
+ * test/errors/charref1.xm result/errors/charref1.xml*: added the
+ test in the regression suite.
+
+Thu Jun 3 18:38:27 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: small change to xmlSchemaValidateAttributes,
+ also corrected typo on error code enum.
+ * include/libxml/xmlerror.h: corrected typo on schema error
+ code enum
+
+Thu Jun 3 10:12:38 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: minor cosmetic changes, no change to logic.
+ * result/schemas/attruse_0_[12].err: regenerated
+ * globals.c: added a newline at end to make gcc happy
+
+Wed Jun 2 21:16:26 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: applied a patch from Kasimier Buchcik
+ implementing attribute uses and wildcards.
+ * test/schemas/* result/schemas/*: added/fixed a bunch of tests
+
+Wed Jun 2 18:15:51 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c xmlIO.c include/libxml/globals.h: applied patch from
+ Rob Richards for custom I/O BufferCreateFilenane fixes bug
+ #143366
+
+Wed Jun 02 16:25:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with predicate evaluation on an
+ empty nodeset (bug 143409)
+
+Wed Jun 02 11:26:41 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * testSAX.c: fixed problem with attribute listing (bug 142674)
+ and added macro LIBXML_TEST_VERSION to assure xmlInitParser
+ gets called (bug 142686)
+
+Sat May 29 21:35:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * test/schemas/date_0.xml xmlschemastypes.c: applied a patch from
+ Charles Bozeman fixing a side effect in date handling
+
+Thu May 27 19:47:48 MDT 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml fix lack of cast in Xpath example
+ * doc/tutorial/*.html, xmltutorial.pdf rebuild html, pdf
+
+2004-05-25 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c: fixed c14n bug with serializing attribute namespaces
+
+Mon May 24 08:22:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed to allow '+' in exponent of number
+ (bug 143005)
+ * SAX2.c: fixed typo in last commit
+
+Sat May 22 09:08:24 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c: skipped call to xmlValidateNCName when compiling
+ --with-minimum (bug 142917)
+
+Tue May 18 06:48:00 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: reverted the broken change.
+
+Mon May 17 23:07:15 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/*: updated the docs for 2.6.10
+
+Mon May 17 05:52:03 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in : releasing 2.6.10
+
+Sun May 16 23:12:35 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: avoid returning default namespace when searching
+ from an attribute
+ * entities.c xmlwriter.c: reverse xmlEncodeSpecialChars() behaviour
+ back to escaping " since the normal serialization routines do not
+ use it anymore, should close bug #134477 . Tried to make
+ the writer avoid it too but it didn't work.
+
+Sun May 16 01:07:16 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/ChangeLog.awk doc/ChangeLog.xsl: fixed escaping
+ handling and added direct links to bugzilla report for
+ bug numbers.
+
+Sun May 16 11:11:13 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * error.c: modified to assure proper user data is sent to
+ structured error routine (bug 142598)
+
+Sun May 16 03:18:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: a couple of large static variable which should really
+ not be declared as such cluttered the .bss section.
+
+Sun May 16 03:06:31 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/ChangeLog.awk: fixed a couple of problems when parsing
+ libxslt ChangeLog
+
+Sat May 15 20:14:21 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/ChangeLog.awk doc/ChangeLog.xsl: first steps of a good
+ ChangeLog page generation. The awk shoudl escape characters
+ not okay in XML and the xslt should make links to functions
+ or variables or bug reported in the entries.
+
+Sat May 15 14:57:40 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c include/libxml/xmlsave.h: start adding API for
+ escaping customization.
+
+Sat May 15 12:38:17 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: more xmlSave cleanup, optimization and refactoring
+
+Fri May 14 17:51:48 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c xmlsave.c: third pass at the escaping refactoring.
+
+Fri May 14 12:37:24 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: enhanced the enhancement, fixed another couple of
+ special cases.
+
+Fri May 14 11:48:33 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: small enhancement to dtd handling of (a?)+ (bug 142487)
+
+Thu May 13 23:19:00 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c xmlsave.c include/libxml/xmlIO.h: second pass on escaping
+ handling, start to looks better, need to be completed and added
+ directly at the saving context level.
+
+Thu May 13 10:31:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c xmlsave.c include/libxml/xmlIO.h: first pass at refactoring
+ the escape on save routines for better performances (less malloc)
+ and more flexibility using the new saving context. Preliminary
+ work, interface will change.
+
+Wed May 12 22:34:03 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: added code in xmlSchemaBuildAContentModel to handle
+ element reference within the xs:all construct (bug 139897)
+
+Wed May 12 17:27:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: a little further fixing of fallback processing, this
+ time for fallback with children (bug 139520).
+
+Wed May 12 08:21:33 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: added code in xmlSchemaBuildContentModel to
+ allow ref in group definition (bug 134411). Also fixed
+ misc compilation warning messages.
+ * result/schema/group0_0_0, result/schema/group0_0_0.err:
+ regenerated (now no error reported).
+
+Tue May 11 11:55:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fix to the fix for #141864 from Paul Elseth
+ * HTMLparser.c result/HTML/doc3.htm: apply fix from David Gatwood for
+ #141195 about text between comments.
+
+Tue May 11 23:04:47 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c, include/libxml/schemasInternals.h,
+ include/libxml/xmlerror.h: Applied patches supplied by
+ Kasimier Buchcik.
+ * test/schemas/po1_0.xml, test/schemas/po1_0.xsd:
+ changed test to account for above patch.
+
+Tue May 11 09:06:53 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/tests/tstLastError.py: better portability fix for f(*args),
+ use apply(f, args) as Stéphane Bidoul suggested
+
+Mon May 10 15:49:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: enhanced xmlRegStateAddTrans to check if transition
+ is already present and, if so, to ignore the request to add it.
+ This has a very dramatic effect on memory requirements as well
+ as efficiency. It also fixes bug 141762.
+
+Sun May 9 20:40:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am python/tests/Makefile.am python/tests/tstLastError.py:
+ applied patch from Ed Davis to allow "make tests" to work
+ with Python 1.5
+
+Sun May 9 19:46:13 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
+ fixes bug #141266
+ * test/xhtmlcomp result//xhtmlcomp*: added the specific regression
+ test
+
+Sun May 9 14:07:21 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: fix for a pedantic make check without make all request
+
+Sat May 8 22:56:22 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c xmlIO.c: fixing some problems in URI unescaping
+ and output buffer opening, this should fix #141864
+
+Fri May 7 22:31:54 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c include/libxml/valid.h: fixes the use of 'list' as a parameter
+ * xmlIO.c include/libxml/xmlIO.h: added xmlPopInputCallback for
+ Matt Sergeant
+
+Thu May 6 21:14:38 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: enhanced the handling of subexpression ranges
+ which have a minOccurs of 0 (bug 140478 again); cleaned up
+ comments throughout the module.
+
+Tue May 4 00:52:16 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: adding a --maxmem option to check memory used.
+
+Sat May 1 01:08:44 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c xmlsave.c python/generator.py python/libxml.c: Fixed
+ bug #141529 i.e. various problems when building with --without-html
+
+Fri Apr 30 18:12:31 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c xmlreader.c: fixing bug #141384 where the reader didn't
+ call the deregistering functions. Also added the check to
+ xmllint --stream --chkregister .
+
+Fri Apr 30 08:57:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.msvc: applied a second patch from Mark Vakoc for
+ regression tests on Windows
+
+Thu Apr 29 21:47:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: never commit without running make tests first !
+
+Thu Apr 29 20:15:20 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fix a nasty problem with reading over the end
+ * xmlsave.c: fix a reported memory leak apparently
+
+Thu Apr 29 17:05:00 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.msvc: patch from Mark Vakoc for regression tests
+ on Windows.
+ * xpath.c: the NaN problem also shows up on Borland
+
+Mon Apr 26 23:37:12 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: enhanced xmlFARegExec range evaluation for min
+ occurs 0 problems - fixes bug 140478.
+
+Thu Apr 22 09:12:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * rngparser.c: tiny path fixes the "xmlConvertCRNGFile" function name
+ from Kasimier Buchcik
+ * xmlschemas.c: recursive xs:extension fix from taihei goi
+
+Wed Apr 21 00:19:29 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: small buffer resizing improvement from Morten Welinder
+ closes #140629
+
+Tue Apr 20 23:40:14 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: last version of the fix for MSC version 1200
+
+Tue Apr 20 19:40:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: killing the strncmp vs. memcmp controversy and #140593
+
+Tue Apr 20 13:27:06 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/SAX2.h: Kasimier Buchcik pointed out some
+ inexistent functions, cleaned them out.
+
+Tue Apr 20 11:42:50 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: Johnson Cameron pointed out that
+ initGenericErrorDefaultFunc() was really wrong.
+ * xmlreader.c include/libxml/xmlreader.h: xmlTextReaderMode enum
+ must be made public, added some missing comments on the XMLReader
+ header.
+ * c14n.c: Alexsey fixed C14N bug with processing namespaces
+ from attributes
+
+Mon Apr 19 23:27:46 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed a stupid () error + Mark name.
+
+Sun Apr 18 23:45:46 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.6.9 release
+ * doc/* News: updated and rebuilt the docs
+
+Sun Apr 18 22:51:43 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: relaxed id() to not check taht the name(s) passed
+ are actually NCName, decided this in agreement with Aleksey Sanin
+ since existing specs like Visa3D broke that conformance checking
+ and other tools seems to not implement it sigh...
+ * SAX2.c: check attribute decls for xml:id and the value is an
+ NCName.
+ * test/xmlid/id_err* result/xmlid/id_err*: added error testing
+
+Sun Apr 18 21:46:17 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: work around Microsoft compiler NaN bug raise reported
+ by Mark Vakoc
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: fixed a recusive extention schemas
+ compilation error raised by taihei goi
+
+Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: keep the ChangeLog compressed
+ * xmlreader.c: fix a segfault when using Close()
+ * python/tests/Makefile.am python/tests/reader8.py: test for
+ the Close() reader API.
+
+Sat Apr 17 22:42:13 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c, xmlwriter.c, doc/examples/parse4.c,
+ doc/examples/io2.c: minor warning cleanup (no change to logic)
+ * xinclude: fixed return value for internal function
+ xmlXIncludeLoadFallback (now always 0 or -1)
+
+Sat Apr 17 21:32:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: small enhancement to fix bug 139791
+
+Fri Apr 16 18:44:47 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/schemasInternals.h
+ include/libxml/xmlerror.h: applied patches from Kasimier Buchcik
+ for the attribute use support
+ * test/schemas/attruse* result/schemas/attruse*: added the
+ tests to the regression suite.
+
+Fri Apr 16 18:22:25 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: move the TODO as comments as the function while not
+ finished are usable as-is
+ * xmlschemas.c include/libxml/xmlerror.h: patch from Kasimier Buchcik
+ implementing union
+ * test/schemas/union_0_0.x* result/schemas/union_0_0*: added example
+ * python/Makefile.am: applied fix from Mike Hommey
+
+Fri Apr 16 23:58:42 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed problem with detecting external dtd
+ encoding (bug 135229).
+ * Makefile.am: minor change to test label
+
+Fri Apr 16 16:09:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem causing duplicate fallback
+ execution (bug 139520)
+ * test/XInclude/docs/fallback2.xml result/XInclude/fallback2.*:
+ added testcase
+
+Fri Apr 9 23:49:37 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c include/libxml/tree.h: adding xml:id draft support
+ * Makefile.am test/xmlid/id_tst* result/xmlid/id_tst*: adding
+ 4 first regression tests
+
+Fri Apr 9 11:56:08 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fixing Red Hat bug #120482 , libxml2-python
+ should depend on the version of python used to compile it.
+
+Mon Apr 5 09:07:24 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from James Bursa, frameset should
+ close head.
+
+Fri Apr 2 22:02:24 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: fixed problem in xmlRelaxNGCompareNameClasses
+ which was causing check-relaxng-test-suite.py test 351 to fail.
+
+Fri Apr 2 17:03:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: implemented fix for M$ IIS redirect provided
+ by Ian Hummel
+ * relaxng.c: fixed problem with notAllowed compilation
+ (bug 138793)
+
+Thu Apr 1 22:07:52 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fix for xmlUriEscape on "http://user@somewhere.com"
+ from Mark Vakoc.
+
+2004-04-01 Johan Dahlin <johan@gnome.org>
+
+ * python/.cvsignore: Add generated files, to make cvs silent.
+
+Thu Apr 1 12:41:36 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: small signed-ness patch from Steve Little
+
+Wed Mar 31 17:47:28 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: patched a bug in parsing production 1 and 2 of
+ xmlschemas regexp that William pointed out while working on
+ #134120
+ * test/regexp/branch result/regexp/branch: added a specific
+ regression test
+
+Wed Mar 31 09:50:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * Makefile.am: added PYTHONPATH to python tests for Schemas
+ and RelaxNG
+ * test/xsdtest/xsdtestsuite.xml: added testfile for
+ SchemasPythonTests
+
+Mon Mar 29 16:56:49 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/examples.xsl doc/examples/index.html: added
+ information about compiling on Unix
+
+Mon Mar 29 14:18:12 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixes the comments for xmlCatalogDump and xmlDumpACatalog
+ * doc/*: rebuilt to update
+
+Sun Mar 28 18:11:41 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: optimize indentation based on the new context
+
+Sun Mar 28 14:17:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/xpath2.c doc/examples/xpath2.res: handle and explain
+ a very tricky problem when modifying the tree based on an XPath
+ result query.
+
+Sat Mar 27 09:56:14 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: fixed problem with IS_COMPILABLE flag
+ (bug 130216)
+
+Fri Mar 26 18:28:32 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Dave Beckett to correct line number
+ errors when using push with CDATA
+
+Fri Mar 26 14:53:58 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/xpath1.c: added a test template
+ * doc/examples/xpath2.c doc/examples/xpath2.res doc/examples/*:
+ added a new example, and make valgrind target
+
+Fri Mar 26 11:47:29 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: apply fix for #136693
+
+Thu Mar 25 20:21:01 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/examples/io2.c
+ * doc/examples/io2.res
+ add xmlDocDumpMemory example in response to mailing list FAQ
+ (rebuilt xml and html also)
+
+Thu Mar 25 10:33:05 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied
+ patch from Mark Vakoc avoiding using xmlParse* option and use
+ xmlRead* instead
+ * win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher
+ to avoid problems with some pathnames.
+
+Tue Mar 23 12:35:08 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* News: preparing 2.6.8 release, updated and rebuilt
+ the docs.
+ * Makefile.am: use valgring fro the new Python based regression tests
+
+Mon Mar 22 20:07:27 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: remove a memory leak on schemas type facets.
+ * check-relaxng-test-suite.py check-relaxng-test-suite2.py
+ check-xsddata-test-suite.py: reduce verbosity
+ * configure.in Makefile.am: incorporated the Python regressions
+ tests for Relax-NG and Schemas Datatype to "make tests"
+
+Mon Mar 22 16:16:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c include/libxml/xmlwriter.h doc/* : applied patch from
+ Alfred Mickautsch for better DTD support.
+ * SAX2.c HTMLparser.c parser.c xinclude.c xmllint.c xmlreader.c
+ xmlschemas.c: fixed bug #137867 i.e. fixed properly the way
+ reference counting is handled in the XML parser which had the
+ side effect of removing a lot of hazardous cruft added to try
+ to fix the problems associated as they popped up.
+ * xmlIO.c: FILE * close fixup for stderr/stdout
+
+Sun Mar 21 19:19:41 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: added an error message when an element is not
+ found within a <choice> (bug 126093)
+
+Sat Mar 20 22:25:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: enhanced the logic of parsing char groups to
+ better handle initial or ending '-' (bug 135972)
+
+Sat Mar 20 19:26:03 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: added check for external reference in
+ xmlRelaxNGGetElements (bug 137718)
+ * test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added
+ regression test for above
+
+Wed Mar 17 16:37:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c: added a close for the local file descriptor
+ (bug 137474)
+
+Mon Mar 15 15:46:59 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: switched the output routines to use the new context.
+
+Mon Mar 15 10:37:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * relaxng.c: enhanced to ignore XML_XINCLUDE_START and XML_XINCLUDE_END
+ nodes (bug 137153)
+
+Sun Mar 14 13:19:20 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: applied patch from John Belmonte for anyURI.
+
+Wed Mar 10 17:22:48 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix bug reported by Holger Rauch
+ * test/att8 result/noent/att8 result/att8 result/att8.rdr
+ result/att8.sax: added the test to th regression suite
+
+Wed Mar 10 19:42:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * doc/search.php: Minor change for later verson of php requiring
+ $HTTP_GET_VARS.
+
+Wed Mar 10 00:12:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: Changed the flag to xmlDocCopyNode (and similar routines),
+ previously used only for recursion, to use a value of '2' to
+ indicate copy properties & namespaces, but not children.
+ * xinclude.c: changed the handling of ranges to use the above new
+ facility. Fixes Bug 134268.
+
+Tue Mar 9 18:48:51 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * win32/Makefile.bcb, win32/Makefile.mingw, win32/Makefile.msvc:
+ added new module xmlsave with patch supplied by Eric Zurcher
+ (second attempt - don't know what happened to the first one!)
+
+Tue Mar 9 09:59:25 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/libxml.py: applied patch from Anthony Carrico
+ providing Python bindings for the Canonicalization C14N support.
+
+Mon Mar 8 11:12:23 CET 2004 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * .cvsignore and python/.cvsignore patched
+
+Mon Mar 8 22:33:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: enhanced to assure that if xpointer is called
+ for a document, the XML_PARSE_NOENT flag is set before parsing
+ the included document so that entities will automatically get
+ taken care of.
+ * xpointer.c: corrected code so that, if an XML_ENTITY_REF node
+ is encountered, it will log it and not crash (bug 135713)
+
+Sun Mar 7 19:03:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: modified to make sub-includes inherit the
+ parse flags from the parent document (bug 132597)
+
+Fri Mar 5 01:13:22 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: QName handling fixes for the XML Schemas
+ support from Adam Dickmeiss
+ * test/schemas/po1_0.xsd: also fix the schemas
+ * test/schemas/ns[12]* result/schemas/ns[12]*: added the specific
+ regression tests
+
+Thu Mar 4 23:03:02 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/Makefile.am include/libxml/Makefile.am:
+ paalied patch from Julio M. Merino Vidal fixing bug #134751
+ to fix --with-html-dir option.
+ * doc/*: rebuilt fully the docs
+ * doc/html/libxml-xmlsave.html: new file from new header.
+
+Thu Mar 4 16:57:50 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c testHTML.c tree.c doc/examples/*.c
+ include/libxml/xmlsave.h: fixing compilation bug with some options
+ disabled as well as --with-minimum should fix #134695
+
+Thu Mar 4 15:00:45 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c: allow fallback to URI lookup when SYSTEM fails,
+ should close #134092
+
+Thu Mar 4 14:39:38 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am tree.c xmlsave.c include/libxml/xmlsave.h: commiting
+ the new xmlsave module before the actuall big code change.
+
+Thu Mar 4 12:38:53 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Adam Dickmeiss for mixed content
+ * test/schemas/mixed* result/schemas/mixed*: added his regression
+ tests too.
+
+Mon Mar 1 15:22:06 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testSAX.c: fix a compilation problem about a missing timb include
+
+Sat Feb 28 22:35:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * testSAX.c: small enhancement to prevent trying to print
+ strings with null pointers (caused "make tests" errors on
+ HP-UX)
+
+Thu Feb 26 20:19:40 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml
+ * doc/xmllint.1
+ * doc/xmllint.html
+ * doc/xmlcatalog_man.xml
+ * doc/xmlcatalog.1
+ * doc/xmlcatalog_man.html
+ applying patch from Mike Hommey to clarify XML_CATALOG_FILES
+ use
+
+Thu Feb 26 23:47:43 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: patch for cross-compilation to Windows from
+ Christophe de VIENNE.
+
+Thu Feb 26 18:52:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * doc/*.html, doc/html/*.html: regenerated docs using older
+ version of xsltproc pending resolution of AVT problem
+
+Thu Feb 26 10:56:29 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: applied patch from Charles Bozeman to not use
+ the system xmllint.
+
+Wed Feb 25 18:07:05 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlexports.h: applied patch from Roland Schwingel
+ for MingW
+
+Wed Feb 25 13:57:25 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am catalog.c configure.in: applied a cleanup patch
+ from Peter Breitenlohner
+ * tree.c: removed a doc build warning by fixing a param comment
+ * doc/* : rebuilt the docs
+
+Wed Feb 25 13:33:07 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c HTMLparser.c: avoid ID error message if using
+ HTML_PARSE_NOERROR should fix #130762
+
+Wed Feb 25 12:50:53 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c:
+ fixing compilation and link option when configuring with
+ --without-valid should fix #135309
+
+Wed Feb 25 11:36:06 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed the main issues reported by Peter Breitenlohner
+ * parser.c: cleanup
+ * valid.c: speedup patch from Petr Pajas
+
+Wed Feb 25 16:07:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed a memory leak (xmlXPathLangFunction) reported
+ on the list by Mike Hommey
+
+Mon Feb 23 17:28:34 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/* NEWS configure.in: preparing 2.6.7 release, updated and
+ rebuilt the documentation.
+
+Mon Feb 23 11:52:12 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/tests/*.py: applied patch from Malcolm Tredinnick
+ to avoid tabs in python sources, should fix #135095
+
+Sun Feb 22 23:16:23 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testSAX.c: add --timing option
+ * relaxng.c: use the psvi field of the nodes instead of _private
+ which may be used for other purposes.
+
+Sat Feb 21 16:57:48 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: small patch to try to fix a warning with Sun One compiler
+
+Sat Feb 21 16:22:35 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: small patch removing a warning with MS compiler.
+
+Sat Feb 21 13:52:30 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: added "relaxng" option to the debugging shell
+ * Makefile.am test/errors/* result/errors/*: some regression tests
+ for some error tests cases.
+
+Fri Feb 20 09:56:47 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: xmlAttrSerializeTxtContent don't segfault if NULL
+ is passed.
+ * test/att7 result//att7*: adding an old regression test
+ laying around on my laptop
+
+Thu Feb 19 17:33:36 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed xmllint --memory --stream memory consumption
+ on large file by using xmlParserInputBufferCreateStatic() with
+ the mmap'ed file
+
+Thu Feb 19 13:56:53 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: some clarification in xmlDocDumpMemory() documentation
+ * xmllint.c: fixed xmllint --stream --timing to get timings back
+
+Wed Feb 18 15:20:42 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a problem in push mode when attribute contains
+ unescaped '>' characters, fixes bug #134566
+ * test/att6 result//att6*: added the test to the regression suite
+
+Tue Feb 17 17:26:31 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: removing a non-linear behaviour from ID/IDREF raised
+ by Petr Pajas. Call xmlListAppend instead of xmlListInsert in
+ xmlAddRef
+
+Tue Feb 17 13:27:27 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/tests/indexes.py python/tests/reader.py: indicated
+ encoding of the test file, needed for python 2.3
+
+Tue Feb 17 21:08:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with numbers having > 19
+ fractional places (bug 133921)
+
+Tue Feb 17 12:47:20 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: applied optimization patch from Petr Pajas
+
+Tue Feb 17 12:39:08 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c include/libxml/xmlwriter.h: applied update
+ from Alfred Mickautsch and the added patch from Lucas Brasilino
+
+Sun Feb 15 12:01:30 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * benchmark.png index.html xml.html: updating the benchmark
+ graph and using a PNG instead of a GIF
+ * xmlreader.c: updated the TODO
+
+Sat Feb 14 18:55:40 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml
+ * doc/tutorial/xmltutorial.pdf
+ * doc/tutorial/*.html
+ Fix bug in XPath example in the tutorial, thanks to Carlos, whose
+ last name I don't know, for pointing this out
+
+Thu Feb 12 16:28:12 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in: preparing release of 2.6.6
+ * doc/*: updated the docs and rebuilt them
+
+Thu Feb 12 13:41:16 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixing bug #132930 with the provided patch, a bit
+ suspicious about it but this is fairly contained and regression
+ tests still passes.
+ * test/schemas/all1* result/schemas/all1*: added the test to
+ the regression suite.
+
+Thu Feb 12 12:54:26 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #132575 about finding the end of the
+ internal subset in push mode.
+ * test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml:
+ added the test to the regression suite
+
+Wed Feb 11 14:19:31 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
+ include/libxml/xmlIO.h: added xmlByteConsumed() interface
+ * doc/*: updated the benchmark rebuilt the docs
+ * python/tests/Makefile.am python/tests/indexes.py: added a
+ specific regression test for xmlByteConsumed()
+ * include/libxml/encoding.h rngparser.c tree.c: small cleanups
+
+Wed Feb 11 08:13:58 HKT 2004 William Brack <wbrack@mmm.com.hk
+
+ * tree.c: fixed missing output of internal DTD param entities when
+ nothing else present in DTD (bug 134052)
+
+Tue Feb 10 19:24:38 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c: applied patch supplied by Christophe Dubach
+ to fix problem with --with-minimum configuration
+ (bug 133773)
+ * nanoftp.c: fixed potential buffer overflow problem,
+ similar to fix just applied to nanohttp.c.
+
+Mon Feb 9 18:40:21 CET 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * nanohttp.c: fixed the fix for the buffer overflow, thanx
+ William :-)
+
+Mon Feb 9 22:37:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * acinclude.m4, configure.in: fixed problem concerning
+ determining SOCKLEN_T as pointed out by Daniel Richard G.
+ on the mailing list
+
+Mon Feb 9 15:31:24 CET 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * nanohttp.c: fixed buffer overflow reported by Yuuichi Teranishi
+
+Mon Feb 9 13:45:59 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: small patch from Philip Ludlam to avoid warnings.
+
+Mon Feb 9 13:41:47 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: applied a small patch from Alfred Mickautsch
+ to avoid an out of bound error in isolat1ToUTF8()
+
+Mon Feb 9 13:35:50 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: remove the warning on the 2001 namespace
+ * parser.c parserInternals.c xpath.c: remove some warnings
+ when compiling with MSVC6
+ * nanohttp.c: applied a patch when using _WINSOCKAPI_
+
+Sun Feb 8 12:09:55 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: added a small hack to fix interference between
+ my fixes for bugs 132585 and 132588.
+ * python/libxml.c: fixed problem with serialization of namespace
+ reported on the mailing list by Anthony Carrico
+
+Sat Feb 7 16:53:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem with function xmlXIncludeCopyRange
+ (bug 133686).
+
+Fri Feb 6 21:03:41 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlwriter.c: fixed problem with return value of
+ xmlTextWriterWriteIndent() (bug 133297)
+
+Fri Feb 6 19:07:04 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: changed coding to output good XIncludes when
+ one or more bad ones are present (bug 132588)
+
+Fri Feb 6 17:34:21 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: corrected handling of empty fallback condition
+ (bug 132585)
+
+Fri Feb 6 15:28:36 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c: added initialisation for ctxt->vctxt
+ in HTMLInitParser (bug 133127)
+ * valid.c: minor cosmetic change (removed ATTRIBUTE_UNUSED
+ from several function params)
+
+Tue Feb 3 16:48:57 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem regarding freeing of dictionary
+ when there are errors within an XInclude file (bug 133106).
+ Thanks to Oleg Paraschenko for the assistance.
+
+Tue Feb 3 09:53:18 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemastypes.c: fixed validation of maxLength with no
+ content using patch submitted by Eric Haszlakiewicz
+ (bug 133259)
+
+Tue Feb 3 09:21:09 CET 2004 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/xmlreader.h include/libxml/xmlmemory.h: added
+ calling convention to the public function prototypes (rep by
+ Cameron Johnson)
+ * include/libxml/xmlexports.h: fixed mingw+msys compilation
+ (rep by Mikhail Grushinskiy)
+
+Mon Feb 2 20:22:18 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlwriter.c: enhanced output indenting (bug 133264)
+
+Mon Feb 2 16:13:33 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlreader.c, include/libxml/xmlreader.h: applied patch from
+ Steve Ball to provide structured error reports.
+
+Sun Feb 1 01:48:14 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c, include/libxml/tree.h: moved serialization of
+ attribute text data (xmlSerializeContent) into a separate
+ routine (xmlSerializeTxtContent) so it can be used by xmlwriter.c
+ * xmlwriter.c: changed handling of attribute string to use the
+ routine above (fixed bug 131548)
+
+Sat Jan 31 08:22:02 MST 2004 John Fleck <jfleck@inkstain.net
+
+ * doc/examples/reader1.c, reader2.c, reader3.c
+ * doc/examples/examples.xml
+ * doc/examples/*.html
+ add note that reader examples need libmxl2 > 2.6, rebuild
+ html - this time doing it correctly :-)
+
+Fri Jan 30 20:45:36 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/examples/examples.xml
+ * doc/examples/*.html
+ add note that reader examples need libmxl2 > 2.6, rebuild
+ html
+
+Thu Jan 29 23:51:48 PST 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: added (void *) type override to prevent
+ warning on Solaris (Bug 132671)
+
+Wed Jan 28 07:20:37 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/examples/Makefile.am
+ per Jan. 15 email to the list from oliverst, the index.html
+ file from this directory wasn't making it into the tarball
+
+Mon Jan 26 18:01:00 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * acinclude.m4: applied fix from Alexander Winston for a problem
+ related to automake-1.8 , c.f. #132513 and #129861
+
+Mon Jan 26 12:53:11 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/index.py: don't rely on . being on the path for
+ make tests, should keep Mr. Crozat quiet until next time...
+
+Sun Jan 25 21:45:03 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: preparing release 2.6.5, rebuilt the
+ docs, checked rngparser stuff does not end up in the tarball
+
+Sun Jan 25 20:59:20 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: applied patch from Frederic Peters
+ fixing the wrong arg order in xpath callback in bug #130980
+
+Sun Jan 25 20:52:09 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixing #130453 XInclude element with no href attribute
+ * relaxng.c rngparser.c include/libxml2/relaxng.h: fully integrating
+ the compact syntax will require more work, postponed for the
+ 2.6.5 release.
+
+Sat Jan 24 09:30:22 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/schemasInternals.h xmlschemas.c: applied patch from
+ Steve Ball to avoid a double-free.
+
+Fri Jan 23 14:03:21 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/*: added io1.c an example ox xmlIO usage and io1.res
+ test result, fixed a awful lot of memory leaks showing up in
+ testWriter.c, changed the examples and the Makefiles to test
+ memory leaks.
+ * xmlwriter.c: fixed a memory leak
+ * Makefile.am: run the doc/examples regression tests as part of
+ make tests
+ * xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to
+ compile an XPath expression within a context, currently the goal
+ is to be able to reuse the XSLT stylesheet dictionnary, but this
+ opens the door to others possible optimizations.
+ * dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows
+ to build a new dictionnary based on another read-only dictionnary.
+ This is needed for XSLT to keep the stylesheet dictionnary read-only
+ while being able to reuse the strings for the transformation
+ dictionnary.
+ * xinclude.c: fixed a dictionnar reference counting problem occuring
+ when document parsing failed.
+ * testSAX.c: adding option --repeat for timing 100times the parsing
+ * doc/* : rebuilt all the docs
+
+Thu Jan 22 14:17:05 2004 Aleksey Sanin <aleksey@aleksey.com>
+
+ * xmlmemory.c: make xmlReallocLoc() accept NULL pointer
+
+Thu Jan 22 08:26:20 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: applied patch from John Belmonte for
+ normalizedString datatype support.
+
+Thu Jan 22 10:43:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed problem with union when last() is used
+ in predicate (bug #131971)
+ * xpointer.c: minor change to comment for doc generation
+
+Wed Jan 21 17:03:17 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #131745 raised by Shaun McCance with the
+ suggested patch
+
+Wed Jan 21 10:59:55 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Alfred Mickautsch fixing a memory
+ leak reported on the list.
+
+Thu Jan 15 00:48:46 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/tests/tstLastError.py: applied
+ patch from Stéphane Bidoul to add enums to the Python bindings.
+
+Tue Jan 13 21:50:05 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * testHTML.c: another small patch from Mark Vakoc
+
+Tue Jan 13 21:39:58 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c relaxng.c testRelax.c testSchemas.c: applied
+ patch from Mark Vakoc to not use SAX1 unless necessary.
+
+Mon Jan 12 17:22:57 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c parser.c xmlstring.c: some parser optimizations,
+ xmllint --memory --timing --repeat --stream ./db10000.xml
+ went down from 16.5 secs to 15.5 secs.
+
+Thu Jan 8 17:57:50 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: removed a memory leak remaining from the switch
+ to a dictionnary for string allocations c.f. #130891
+
+Thu Jan 8 17:48:46 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixing some problem if configured --without-xinclude
+ c.f. #130902
+
+Thu Jan 8 17:42:48 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: changed AC_OUTPUT() macro to avoid a cygwin problem
+ c.f. #130896
+
+Thu Jan 8 00:36:00 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc:
+ applying patch from Mark Vakoc for Windows
+ * doc/catalog.html doc/encoding.html doc/xml.html: applied doc
+ fixes from Sven Zimmerman
+
+Tue Jan 6 23:51:46 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml2-python-api.xml python/libxml_wrap.h python/types.c
+ python/tests/Makefile.am python/tests/tstLastError.py: applied
+ patch from Stéphane Bidoul for structured error handling from
+ python, and the associated test
+
+Tue Jan 6 23:18:11 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * configure.in: fixed Bug130593
+ * xmlwriter.c: fixed compilation warning
+
+Tue Jan 6 15:15:23 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlstring.h: fixed the comment in the header
+ * doc/*: rebuilt the docs
+
+Tue Jan 6 19:40:04 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c, parser.c, xmlstring.c, Makefile.am,
+ include/libxml/Makefile.am, include/libxml/catalog.c,
+ include/libxml/chvalid.h, include/libxml/encoding.h,
+ include/libxml/parser.h, include/libxml/relaxng.h,
+ include/libxml/tree.h, include/libxml/xmlwriter.h,
+ include/libxml/xmlstring.h:
+ moved string and UTF8 routines out of parser.c and encoding.c
+ into a new module xmlstring.c with include file
+ include/libxml/xmlstring.h mostly using patches from Reid
+ Spencer. Since xmlChar now defined in xmlstring.h, several
+ include files needed to have a #include added for safety.
+ * doc/apibuild.py: added some additional sorting for various
+ references displayed in the APIxxx.html files. Rebuilt the
+ docs, and also added new file for xmlstring module.
+ * configure.in: small addition to help my testing; no effect on
+ normal usage.
+ * doc/search.php: added $_GET[query] so that persistent globals
+ can be disabled (for recent versions of PHP)
+
+Mon Jan 5 20:47:07 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/customfo.xsl
+ * doc/tutorial/customhtml.xsl
+ update custom tutorial-building stylesheets in preparation
+ for tutorial update
+
+Tue Jan 6 00:10:33 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * rngparser.c: commiting the compact relax ng parser. It's not
+ completely finished, it's not integrated but I want to save the
+ current state
+
+Mon Jan 5 22:22:48 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * doc/apibuild.py, doc/APIconstructors.html, doc/libxml2-refs.xml,
+ win32/libxml2.def.src: fixed apibuild.py's generation of
+ "constructors" to be in alphabetical order (instead of previous
+ random sequence); regenerated resulting files.
+
+Mon Jan 5 14:03:59 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Lucas Brasilino fixing an indent
+ problem.
+
+Sun Jan 4 18:54:29 MST 2004 John Fleck <jfleck@inkstain.net>
+
+ * doc/newapi.xsl: change background color of function
+ declaration to improve readability
+ * doc/*: rebuild docs with new stylesheet
+
+Sun Jan 4 22:45:14 HKT 2004 William Brack <wbarck@mmm.com.hk>
+
+ * parser.c, include/libxml/parser.h: added a routine
+ xmlStrncatNew to create a new string from 2 frags.
+ * tree.c: added code to check if node content is from
+ dictionary before trying to change or concatenate.
+
+Sun Jan 4 08:57:51 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xmlmemory.c: applied suggestion from Miloslav Trmac (see
+ Bug 130419) and eliminated xmlInitMemoryDone. More
+ improvement needed.
+ * xml2-config.in: added an additional flag (--exec-prefix) to
+ allow library directory to be different from include directory
+ (Bug 129558).
+
+Fri Jan 2 21:22:18 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: applied patch from Stéphane Bidoul for structured error
+ reporting.
+
+Fri Jan 2 21:03:17 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlwriter.h xmlwriter.c: applied the patch from
+ Lucas Brasilino to add indentation support to xmlWriter
+
+Fri Jan 2 22:58:29 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem with "recursive" include (fallback
+ contains another include - Bug 129969)
+
+Fri Jan 2 11:40:06 CET 2004 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: found and fixed a bug misallocating some non
+ blank text node strings from the dictionnary.
+ * xmlmemory.c: fixed a problem with the memory debug mutex
+ release.
+
+Wed Dec 31 22:02:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xinclude.c: fixed problem caused by wrong dictionary
+ reference count, reported on the list by Christopher
+ Grayce.
+
+Wed Dec 31 15:55:55 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * python/generator.py, python/libxml2class.txt: fixed problem
+ pointed out by Stéphane Bidoul on the list.
+ * xinclude.c, xpointer.c, xpath.c, include/libxml/xpointer.h:
+ completed modifications required to fix Bug 129967 (at last!).
+ Now wait to see how long before further trouble...
+
+Tue Dec 30 16:26:13 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c, xmlmemory.c, include/libxml/xmlmemory.h: Fixed
+ memory leak reported by Dave Beckett
+ * xmlschemas.c: Removed spurious comment reported on the mailing
+ list
+ * xinclude.c, xpath.c, xpointer.c, libxml/include/xpointer.h:
+ Further work on Bug 129967 concerning xpointer range handling
+ and range-to function; much better, but still not complete
+
+Mon Dec 29 18:08:05 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: xmlValidateElement could crash for element holding a
+ namespace declaration but not in a namespace. Oliver Fischer
+ provided the example.
+
+Mon Dec 29 11:29:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: issue validation status on stderr, not stdout as suggested
+ by Pawel Palucha
+ * result/relaxng/*: this change slightly all the output from RNG
+ regressions.
+
+Mon Dec 28 10:47:32 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: edited a couple of comments in accordance with
+ posting on the mailing list (no logic change)
+ * xpointer.c: working on Bug 129967, added check for NULL
+ nodeset to prevent crash. Further work required.
+ * xpath.c: working on Bug 129967, added code to handle
+ XPATH_LOCATIONSET in RANGETO code, also added code to
+ handle it in xmlXPathEvaluatePredicateResult. Further
+ work required.
+
+Sat Dec 27 12:32:58 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: added tests for xs:all to assure minOccurs
+ and maxOccurs <= 1 (Bug 130020)
+
+Sat Dec 27 09:53:06 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: fixed xmlFAParseCharRange for Unicode ranges
+ with patch from Charles Bozeman.
+
+Fri Dec 26 14:03:41 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlregexp.c: fixed problem causing segfault on validation error
+ condition (reported on mailing list)
+
+Thu Dec 25 21:16:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlschemas.c: fixed missing dictionaries for Memory and Doc
+ parser contexts (problem reported on mailing list)
+ * doc/apibuild.py: small change to prevent duplicate lines
+ on API functions list. It will take effect the next time
+ the docs are rebuilt.
+
+Wed Dec 24 12:54:25 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: updated the docs and prepared a new
+ release 2.6.4
+
+Wed Dec 24 12:07:52 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * legacy.c: remove deprecated warning on startElement()
+
+Wed Dec 24 12:04:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c result/XInclude/nodes2.*: XInclude xpointer support
+ was broken with the new namespace. Fixes #129932
+
+Wed Dec 24 00:29:30 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/schemasInternals.h: types might be
+ redefined in includes, quick fix to allow this but lacks the
+ equality of the redefinition test.
+
+Tue Dec 23 15:14:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: fixed bug concerning validation using external
+ dtd of element with mutiple namespace declarations
+ (Bug 129821)
+
+Tue Dec 23 11:41:42 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: inhibited production of "(null):" in xmlGetNodePath
+ when node has default namespace (Bug 129710)
+
+Tue Dec 23 09:29:14 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: small enhancement to xmlXPathCmpNodes to assure
+ document order for attributes is retained (Bug 129331)
+
+Mon Dec 22 19:06:16 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xmlreader.c: change xmlReadFd() xmlCtxtReadFd()
+ xmlReaderNewFd() xmlReaderForFd(), change those to not close
+ the file descriptor. Updated the comment, should close #129683
+
+Mon Dec 22 00:34:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixed a serious problem in XInclude #129021
+
+Sun Dec 21 13:59:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed bug #129489, propagation of parsing flags
+ in entities.
+ * parser.c xmlreader.c: improved the comments of parsing options
+
+Sun Dec 21 18:14:04 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * python/Makefile.am, python/tests/Makefile.am,
+ doc/Makefile.am: applied fixes to allow build from
+ 'outside' directory (Bug 129172)
+
+Sat Dec 20 16:42:07 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * tree.c - add explanation of namespace inheritance when
+ ns is NULL to xmlNewChild and xmlNewTextChild API doc
+
+Sat Dec 20 18:17:28 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/xpathInternals.h: undid last change (my
+ bad). Put necessary fix in libxslt/libexslt instead.
+ * include/libxml/DOCBparser.h: put test for __GCC__ on
+ warning directive (Bug 129105)
+
+Sat Dec 20 10:48:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/xpathInternals.h: fixed xmlXPathReturnString
+ to cater for NULL pointer (bug 129561)
+ * globals.c: added comment to suppress documentation warning
+ * doc/apibuild.py: fixed problem which caused last APIchunkxx.html
+ to be lost. Rebuilt doc/* (including adding APIchunk26.html)
+
+Fri Dec 19 18:24:02 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: trying to fix #129692 xmlTextReaderExpand() when
+ using an xmlReaderWalker()
+
+Thu Dec 18 20:10:34 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * tree.c: fix misc. typos in doc comments
+ * include/libxml/tree.h: elaborate on macro define doc comments
+ * doc/*: rebuild docs
+
+Wed Dec 17 16:07:33 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/*: don't call the result files .out but .res as
+ the Makefiles tend to try generating binaries for .out targets...
+
+Tue Dec 16 20:53:54 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/html/libxml-pattern.html: - cvs add API docs for new
+ pattern stuff
+
+Tue Dec 16 20:40:40 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * tree.c
+ * doc/*:
+ Elaborate in documentation discussion of xmlNewChild
+ and xmlNewTextChild. Thanks to Steve Lenti for pointing
+ out the usefulness of a more explicit explanation of the
+ reserved character escaping issue.
+
+Fri Dec 12 15:55:15 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c: applied patch from Stefan Kost
+
+Thu Dec 11 15:15:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/testWriter.c: applied small fix from Lucas Brasilino
+
+Thu Dec 11 14:55:22 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.* win32/configure.js: Added pattern support
+
+Wed Dec 10 14:11:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* libxml.spec.in: preparing release of
+ libxml2-2.6.3, updated and regenerated the docs.
+
+Wed Dec 10 11:43:33 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c pattern.c: removed some compilation warnings
+
+Wed Dec 10 11:16:29 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: fixing bug #119264 xmllint failing to report
+ serialization errors in some cases.
+
+Tue Dec 9 23:50:23 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: fixed an XML entities content serialization
+ potentially triggered by XInclude, see #126817
+
+Tue Dec 9 16:12:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied the patch to xmlTextWriterStartPI()
+ suggested by Daniel Schulman in #128313
+
+Tue Dec 9 15:18:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in Makefile.am: another patch from Kenneth Haley
+ for Mingw, c.f. #128787
+
+Tue Dec 9 15:07:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlexports.h: applied patch from Kenneth Haley
+ for compiling on Mingw see #128786
+
+Tue Dec 9 14:52:59 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: some flags were not passed down correctly as
+ parsing options. Fixes #126806
+
+Tue Dec 9 12:29:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c xmllint.c xmlreader.c include/libxml/xinclude.h
+ include/libxml/xmlerror.h: augmented the XInclude API
+ to be able to pass XML parser flags down to the Inclusion
+ process. Also resynchronized with the Last Call W3C Working
+ Draft 10 November 2003 for the xpointer attribute.
+ * Makefile.am test/XInclude/docs/nodes[23].xml
+ result/XInclude/*: augmented the tests for the new namespace and
+ testing the xpointer attribute, changed the way error messages
+ are tested
+ * doc/*: regenerated the documentation
+
+Mon Dec 8 18:38:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: filter warning messages if the global setting blocks them
+ * xinclude.c xmlreader.c include/libxml/xinclude.h
+ include/libxml/xmlerror.h: updated the change of namespace at
+ the XInclude level, raise a warning if the old one is found,
+ and some cleanup
+
+Mon Dec 8 13:09:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: tentative fix for #126117 character reference in
+ attributes output problem in some cornercase.
+
+Mon Dec 8 11:08:45 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: tried to fix the problems reported in
+ bug #126735
+ * xpath.c SAX2.c error.c parser.c valid.c include/libxml/xmlerror.h:
+ fixed again some problem trying to use the structured error
+ handlers, c.f. bug #126735
+ * result/VC/ElementValid: tiny change due to the fix
+
+Sun Dec 7 22:27:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c: fixed __xmlRaiseError to use structured error handlers
+ defined by xmlSetStructuredErrorFunc(), fixes bug #126211
+
+Sun Dec 7 20:30:53 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: attempt to fix #126211 ...
+
+Fri Dec 5 17:07:29 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c xmlreader.c xmllint.c include/libxml/pattern.h
+ include/libxml/xmlreader.h: fixed the pattern interfaces
+ but not yet the parser to handle the namespaces.
+ * doc/examples/reader3.c doc/*: fixed the example, rebuilt the docs.
+
+Fri Dec 5 15:49:44 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c xmlwriter.c doc/apibuild.py include/libxml/globals.h
+ include/libxml/pattern.h include/libxml/schemasInternals.h
+ include/libxml/xmlexports.h include/libxml/xmlwriter.h: cleanup
+ the make rebuild in doc, this include new directive to stop
+ documentation warnings
+ * doc/* doc/html/*: rebuilt the docs
+ * pattern.c xmlreader.c include/libxml/pattern.h
+ include/libxml/xmlreader.h: adding xmlTextReaderPreservePattern()
+ to save nodes while scanning the tree with the reader, cleanup
+ the way element were freed, and xmlTextReaderPreserve()
+ implementation, the API might change for namespace binding support
+ when compiling patterns.
+ * doc/examples/*: added reader3.c exposing the xmlTextReaderPreserve()
+
+Thu Dec 4 15:10:57 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: oops forgot to modify/commit the new code.
+
+Thu Dec 4 13:29:19 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml_wrap.h:
+ cleanup the output buffer support to at least get the basic
+ to work
+ * python/tests/outbuf.py python/tests/serialize.py: fixes and
+ cleanup.
+ * include/libxml/xmlwriter.h: cleanup
+
+Wed Dec 3 21:38:56 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * include/libxml/xmlversion.h.in
+ * doc/*: add WITH_TRIO comment so it shows up in the docs, rebuild
+ docs
+
+Wed Dec 3 13:10:08 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in xmlregexp.c: fix bug #128401 affecting
+ regexp quantifiers
+
+Tue Dec 2 23:29:56 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * pattern.c include/libxml/pattern.h: adding the pattern node
+ selection code. Inheried in part from libxslt but smaller.
+ * Makefile.am configure.in include/libxml/xmlversion.h.in:
+ integrated the pattern module, made it a configure time option
+ * xmllint.c: added --pattern to test when doing --stream
+
+Tue Dec 2 11:25:25 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed a problem in xmlreader validation when
+ streaming exposed by reader2 example.
+
+Mon Dec 1 20:40:51 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html
+ * doc/docs.html:
+ add reference to the Code Examples page to docs.html list
+ of resources
+
+Mon Dec 1 12:30:28 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.bcb win32/configure.js: Applied the BCB patch
+ from Eric
+
+Sun Nov 30 21:33:37 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * include/libxml/xinclude.h
+ * doc/*: Add comments for macro definitions in xinclude.h and
+ rebuild the docs
+
+Sun Nov 30 21:06:29 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/docdescr.doc
+ Updating William's explanation of how to build docs,
+ reflecting Daniel's new docs build system
+
+Sat Nov 29 18:38:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlmemory.c: enhanced by adding mutex to protect global
+ structures in a multi-threading environment. This fixed
+ some random errors on the Threads regression tests.
+
+Fri Nov 28 21:39:49 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html doc/python.html: fix tst.py text, which didn't
+ import sys
+
+Fri Nov 28 17:28:47 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c, include/libxml/encoding.h: Enhanced the handling of
+ UTF-16, UTF-16LE and UTF-16BE encodings. Now UTF-16 output is
+ handled internally by default, with proper BOM and UTF-16LE
+ encoding. Native UTF-16LE and UTF-16BE encoding will not generate
+ BOM on output, and will be automatically recognized on input.
+ * test/utf16lebom.xml, test/utf16bebom.xml, result/utf16?ebom*:
+ added regression tests for above.
+
+Thu Nov 27 19:25:10 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.* win32/configure.js: Modified to allow coexistent
+ build with all compilers. Added C-Runtime option for MSVC. Included
+ xmlWriter.
+ * xmlwriter.c: Added IN_LIBXML macro
+
+Wed Nov 26 21:54:01 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.bcb: applied patch from Eric
+
+Wed Nov 26 21:33:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h: stefan on IRC pointed out that XML_GET_LINE
+ is broken on 2.6.x
+
+Tue Nov 25 18:39:44 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: fixed #127877, never output &quot; in element content
+ * result/isolat3 result/slashdot16.xml result/noent/isolat3
+ result/noent/slashdot16.xml result/valid/REC-xml-19980210.xml
+ result/valid/index.xml result/valid/xlink.xml: this changes the
+ output of a few tests
+
+Tue Nov 25 16:36:21 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/schemasInternals.h include/libxml/xmlerror.h
+ testSchemas.c xmlschemas.c: added xsd:include support, fixed
+ testSchemas behaviour when a schemas failed to parse.
+ * test/schemas/vdv-* result/schemas/vdv-first5_0_0*: added one
+ test for xsd:include from Eric Van der Vlist
+
+Tue Nov 25 08:18:12 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: swapped the attribute defaulting and attribute checking
+ parts of parsing a new element start, fixes bug #127772
+ * result/valid/127772.* test/valid/127772.xml
+ test/valid/dtds/127772.dtd: added the example in the regression tests
+
+Tue Nov 25 08:00:15 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: moved xmlCleanupThreads() to the end of xmlCleanupParser()
+ to avoid bug #127851
+
+Mon Nov 24 15:26:21 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixing some Negative Character Group and
+ Character Class Subtraction handling.
+
+Mon Nov 24 14:01:57 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c: more XML Schemas fixes based
+ on Eric van der Vlist examples
+ * result/schemas/vdv-first4* test/schemas/vdv-first4*:
+ added regression tests
+ * doc/examples/Makefile.am doc/examples/index.py: do not
+ regenerate the index on make all target, but only on
+ make rebuild to avoid troubles.
+
+Sat Nov 22 21:35:42 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h
+ include/libxml/schemasInternals.h: lot of bug fixes, cleanup,
+ starting to add proper namespace support too.
+ * test/schemas/* result/schemas/*: added a number of tests
+ fixed the result from some regression tests too.
+
+Fri Nov 21 20:50:59 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html, docs.html: remove reference to gtk-doc now that
+ Daniel has removed it, fix link to George's IBM article, other
+ minor edits
+
+Fri Nov 21 01:26:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: applied patch from Robert Stepanek to start
+ import os schemas support, cleaned up stuff and the patch.
+ * test/schemas/import0_0.* result/schemas/import0_0_0*: added test
+ to regression, fixed a few regressions too.
+
+Thu Nov 20 22:58:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied two parsing fixes from James Bursa
+
+Thu Nov 20 19:20:46 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/*: added two xmlReader examples
+ * xmlreader.c: cleaned up some bugs in the process
+
+Thu Nov 20 12:54:30 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c include/libxml/xmlwriter.h: applied patch from
+ Alfred Mickautsch, bugfixes and comments
+ * doc/examples/*: added his test as the xmlWriter example
+ * doc/html/ doc/*.html: this resulted in some improvements
+ * include/libxml/hash.h: fixed an inclusion problem when
+ <libxml/hash.h> wasn't preceeded by <xml/parser.h>
+
+Wed Nov 19 17:19:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fix an error message
+ * doc/examples/*: added tree2 example from Lucas Brasilino
+
+Wed Nov 19 17:50:47 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/newapi.xsl: improve the sort sequence for page content
+ * doc/html/*.html: regenerate the web pages
+
+Wed Nov 19 00:48:56 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: do not package cvs versioning temp files.
+ * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup,
+ slightly improved the API xml format, fixed a lot of small
+ rendering problems
+ * doc/html/libxml*.html: rebuilt
+
+Tue Nov 18 21:51:15 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/*.h include/libxml/*.h.in: modified the file
+ header to add more informations, painful...
+ * genChRanges.py genUnicode.py: updated to generate said changes
+ in headers
+ * doc/apibuild.py: extract headers, add them to libxml2-api.xml
+ * *.html *.xsl *.xml: updated the stylesheets to flag geprecated
+ APIs modules. Updated the stylesheets, some cleanups, regenerated
+ * doc/html/*.html: regenerated added back book1 and libxml-lib.html
+
+Tue Nov 18 14:43:16 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am doc/*.xsl doc/*.html doc/apibuild.py: cleaned up
+ the build process to remove all remains from the old gtk-doc
+ inherited, libxml2-refs.xml is now generated by apibuild.py, the
+ stylesheets have been improved, and the API*html now generated
+ are XHTML1 valid too
+
+Tue Nov 18 14:28:32 HKT 2003 William Brack <mmm.com.hk>
+
+ * genChRanges.py, chvalid.c, include/libxml/chvalid.h: minor
+ enhancement to prevent comment with unreferenced variable.
+ * threads.c xmlreader.c xmlwriter.c: edited some comments to
+ improve auto-generation of documentation
+ * apibuild.py: minor change to an error message
+
+Mon Nov 17 17:55:51 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup,
+ improving navigation
+ * doc/html/*.html: updated the result
+
+Mon Nov 17 14:54:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl:
+ improvement of the stylesheets, fixed a API generation problem,
+ switched the stylesheet and Makefile to build the HTML output.
+ * doc/html/*.html: complete update, ditched some old files, might
+ introduce some breakage...
+
+Mon Nov 17 12:50:28 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/newapi.xsl: lot of improvements, this starts looking good
+ enough to be usable.
+
+Mon Nov 17 00:58:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/newapi.xsl: stylesheet to build HTML pages from the
+ API XML description, Work in Progress
+
+Sun Nov 16 16:03:24 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed bug 126976 (string != empty nodeset
+ should be false)
+
+Sun Nov 16 14:00:08 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/html/*.html: Finally - found the problem with the
+ page generation (XMLPUBFUN not recognized by gtkdoc).
+ Re-created the pages using a temporary version of
+ include/libxml/*.h.
+ * testOOMlib.c,include/libxml/encoding.h,
+ include/libxml/schemasInternals.h,include/libxml/valid.h,
+ include/libxml/xlink.h,include/libxml/xmlwin32version.h,
+ include/libxml/xmlwin32version.h.in,
+ include/libxml/xpathInternals.h: minor edit of comments
+ to help automatic documentation generation
+ * doc/docdescr.doc: small elaboration
+ * doc/examples/test1.c,doc/examples/Makefile.am: re-commit
+ (messed up on last try)
+ * xmlreader.c: minor change to clear warning.
+
+Sat Nov 15 19:20:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Copyright: fixed some wording
+ * libxml.spec.in: make sure doc/examples is packaged
+ * include/libxml/tree.h valid.c xmlreader.c: fixed the really
+ annoying problem about xmlRemoveID and xmlReader streaming.
+ Thing looks fixed now, had to add a doc reference to the
+ xmlID structure though...
+
+Sat Nov 15 09:53:36 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/docdescr.doc: added description of man page building
+
+Sat Nov 15 19:08:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/html/libxml-chvalid.html, doc/html/libxml-dict.html,
+ doc/html/libxml-list.html, doc/html/libxml-testOOMlib.html,
+ doc/html/libxml-wincecompat, doc/html/winsockcompat.html,
+ doc/html/libxml-xmlexports.html, doc/html/libxml-xmlversion.html,
+ doc/html/libxml-xmlwin32version.html, doc/html/libxml-xmlwriter.html:
+ added missing pages for the website.
+
+Sat Nov 15 18:23:48 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/Makefile.am doc/*.html doc/html/*.html: rebuilt the
+ generated pages (again), manually restored doc/html/index.html
+ and manually edited generated file doc/gnome-xml.xml to put
+ in appropriate headings.
+ * doc/docdescr.doc: new file to describe details of the
+ document generation (helps my memory for the next time)
+ * genChRanges.py,chvalid.c,include/libxml/chvalid.h: minor
+ enhancement to please the automatic documentation generation.
+
+Fri Nov 14 23:47:31 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * catalog.c,relaxng.c,testAutomata.c,xpointer.c,genChRanges.py,
+ chvalid.c,include/libxml/chvalid.h,doc/examples/test1.c:
+ minor error cleanup for gcc-3.3.[12] compilation warnings.
+
+Fri Nov 14 15:08:13 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * tree.c: minor changes to some comments
+ * doc/*.html: rebuilt the generated HTML pages for changes
+ from jfleck (bug 126945)
+
+Thu Nov 13 12:44:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/*: added Dodji's example, added output handling
+
+Thu Nov 13 11:35:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/examples/*: added Aleksey XPath example, fixed bugs
+ in the indexer
+
+Wed Nov 12 23:48:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*: integrating the examples in the navigation menus
+ * doc/examples/*: added make tests, updated the navigation,
+ added a new test, cleanups, updates.
+
+Wed Nov 12 17:50:36 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*.html: rebuilt the generated HTML pages
+ * doc/examples/*: updated the stylesheets, added a synopsis,
+ Makefile.am is now generated by index.py
+
+Wed Nov 12 01:38:16 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/site.xsl doc/examples/Makefile.am doc/examples/index.html:
+ added autogeneration of a web page for the examples
+ * doc/examples/example1.c doc/examples/.cvsignore
+ doc/examples/examples.xml doc/examples/index.py: updated the
+ informations extracted, improved the format and indexing.
+
+Tue Nov 11 22:08:59 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xinclude-test-suite.py: less verbose on difference
+ * libxml.spec.in: cleanup
+ * parser.c: fixed xmlCleanupParser() doc
+ * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml
+ doc/examples/Makefile.am doc/examples/example1.c
+ doc/examples/examples.xml doc/examples/index.py
+ doc/examples/test1.xml: work on adding C examples and
+ generating automated information about those. examples.xml
+ is autogenerated describing the examples.
+ * example/Makefile.am: cleanup
+
+Mon Nov 10 23:47:03 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h:
+ fixed missing '-' in block names, enhanced the hack for
+ ABI aliasing.
+
+Sun Nov 9 20:28:21 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h,
+ python/libxml2class.txt: enhanced for range checking,
+ updated to Unicode version 4.0.1 (API docs also updated)
+ * python/generator.py: minor change to fix a warning
+
+Wed Nov 5 23:46:36 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: apply fix from Karl Eichwalder for script path
+
+Wed Nov 5 10:49:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/configure.js: applied patch from Mark Vakoc to simplify
+ his work from CVS checkouts.
+
+Tue Nov 4 21:16:47 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlreader.html: minor cleanups
+
+Tue Nov 4 15:52:28 PST 2003 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/xmlversion.h.in: changed macro ATTRIBUTE_UNUSED
+ for gcc so that, if undefined, it's defined as
+ __attribute__((unused))
+
+Tue Nov 4 15:28:07 PST 2003 William Brack <wbrack@mmm.com.hk>
+
+ * python/generator.py: small enhancement to assure ATTRIBUTE_UNUSED
+ appears after the variable declaration.
+ * valid.c: trivial change to eliminate a warning message
+
+Tue Nov 4 11:24:04 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: preparing release 2.6.2, updated and
+ rebuilt the docs
+
+Tue Nov 4 09:38:46 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: change --html to make sure we use the HTML serialization
+ rule by default when HTML parser is used, add --xmlout to allow to
+ force the XML serializer on HTML.
+ * HTMLtree.c: ugly tweak to fix the output on <p> element and
+ solve #125093
+ * result/HTML/*: this changes the output of some tests
+
+Mon Nov 3 17:51:28 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixed bug #125812, about XPointer in XInclude
+ failing but not returning an error.
+
+Mon Nov 3 17:18:22 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed bug #125811 related to DTD post validation
+ where the DTD doesn't pertain to a document.
+
+Mon Nov 3 15:25:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xmlIO.c include/libxml/parserInternals.h: implemented
+ the XML_PARSE_NONET parser option.
+ * xmllint.c: converted xmllint.c to use the option instead of
+ relying on the global resolver variable.
+
+Mon Nov 3 13:26:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c xmlreader.c include/libxml/xinclude.h: adding XInclude
+ support to the reader interface. Lot of testing of the walker,
+ various bug fixes.
+ * xmllint.c: added --walker and made sure --xinclude --stream --debug
+ works as expected
+ * Makefile.am result/dtd11.rdr result/ent6.rdr test/dtd11 test/ent6
+ result/XInclude/*.rdr: added regression tests for the walker and
+ XInclude xmlReader support, had to slightly change a couple of tests
+ because the walker can't distinguish <foo/> from <foo></foo>
+
+Sat Nov 1 17:42:27 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c nanohttp.c threads.c: second BeOS patch from
+ Marcin 'Shard' Konicki
+
+Fri Oct 31 15:35:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: always generate line numbers
+
+Fri Oct 31 11:53:46 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed another regression introduced in fixing #125823
+
+Fri Oct 31 11:33:18 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: previous fix for #124044 was broken, correct
+ fix provided.
+ * HTMLparser.c parser.c parserInternals.c xmlIO.c: fix xmlStopParser()
+ and the error handlers to address #125877
+
+Thu Oct 30 23:10:46 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: side effect of #123105 patch, namespace resolution
+ would fail when defined in internal entities, fixes #125823
+
+Thu Oct 30 14:10:42 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: be more defensive in the xmlReader python bindings
+ fixing bug #124044
+
+Thu Oct 30 11:14:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: the a-posteriori DTD validation code was not validating
+ the namespace declarations, this fixes #124110
+
+Wed Oct 29 14:13:03 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlIO.c: enhanced to bypass compression detection code
+ when input file is stdin (bug 125801)
+
+Wed Oct 29 18:21:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fix needed when HTTP is not compiled in by Mark Vakoc
+
+Wed Oct 29 18:05:53 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: more fixes about unregistering objects
+ * include/libxml/relaxng.h: applied patch from Mark Vakoc
+ missing _cplusplus processing clause
+
+Wed Oct 29 07:49:52 2003 Aleksey Sanin <aleksey@aleksey.com>
+
+ * include/libxml/parser.h parser.c: added xmlStrVPrintf function
+
+Wed Oct 29 14:37:40 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c testThreads.c threads.c: applied patch from
+ Marcin 'Shard' Konicki to provide BeOS thread support.
+
+Wed Oct 29 14:20:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/xmlschemas.h: applied patch
+ from Steve Ball to make a schema parser from a preparsed document.
+
+Wed Oct 29 13:52:25 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied a couple of patches from Mark Lilback about text
+ nodes coalescing
+
+Wed Oct 29 12:16:52 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: change suggested by Anthony Carrico when unregistering
+ a namespace prefix to a context
+ * hash.c: be more careful about calling callbacks with NULL payloads.
+
+Wed Oct 29 00:04:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/*: preparing release 2.6.1, updated and
+ regenerated docs and APIs
+ * parser.c: cleanup and last change to fix #123105
+
+Tue Oct 28 23:02:29 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: Fix #124907 by simply backporting the same
+ fix as for the XML parser
+ * result/HTML/doc3.htm.err: change to ID detecting modified one
+ test result.
+
+Tue Oct 28 22:28:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/parser.h: included a new function
+ to reuse a Push parser context, based on Graham Bennett original
+ code
+ * valid.c: in HTML, a name in an input is not an ID
+ * TODO: bug list update
+
+Tue Oct 28 19:54:37 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: applied patch from nico@xtradyne.com for #125030
+
+Tue Oct 28 16:42:16 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: cleanup
+ * error.c valid.c include/libxml/xmlerror.h: fixing bug #125653
+ sometimes the error handlers can get a parser context on DTD
+ errors, and sometime they don't. So be very careful when trying
+ to grab those informations.
+
+Tue Oct 28 15:26:18 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch from Kasimier Buchcik which fixes a
+ problem in xmlSearchNs introduced in 2.6.0
+
+Tue Oct 28 14:57:03 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed #123263, the encoding is mandatory in a textdecl.
+
+Tue Oct 28 13:48:52 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix bug #125047 about serializing when finding a
+ document fragment node.
+
+Mon Oct 27 11:11:29 EST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * testSAX.c: fix bug #125592 need a NULL check
+ * include/libxml/chvalid.h: rename a parameter
+
+Mon Oct 27 09:43:48 EST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from #123105 about defaulted attributes
+ from element coming from an entity
+
+Mon Oct 27 21:12:27 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmllint.c: fixed warning message from IRIX (bug 125182)
+ * python/libxml.py: removed tabs, replaced with spaces
+ (bug 125572)
+
+Mon Oct 27 06:17:30 EST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h parserInternals.c xmlIO.c: make sure we report errors
+ if xmlNewInputFromFile() fails.
+ * xmlreader.c: avoid using _private for the node or document
+ elements.
+
+Sat Oct 25 17:33:59 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/configure.js: added declaration for verMicroSuffix
+
+Fri Oct 24 23:08:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.m4: applied patch from Patrick Welche provided in
+ bug #125432 , future proofing the .m4 file.
+ * parser.c: resetting the context should also reset the error
+ * TODO: problem of conformance w.r.t. E20 was raised in the
+ XML Core telconf and libxml2 isn't conformant there.
+
+Wed Oct 22 14:33:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlwriter.c: applied patch from Alfred Mickautsch fixing #125180
+
+Wed Oct 22 10:50:31 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * chvalid.c genChRanges.py: Stéphane Bidoul pointed out another
+ small glitch missing a const
+
+Wed Oct 22 10:43:21 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * chvalid.c genChRanges.py: Stéphane Bidoul pointed out that
+ it doesn't define IN_LIBXML
+
+Tue Oct 21 21:14:55 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.mingw: typo pointed out by Stéphane Bidoul
+
+Tue Oct 21 11:26:36 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc
+ win32/configure.js: set of Win32 patches for 2.6.0 by Joachim Bauch
+
+Tue Oct 21 02:07:22 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: last minute patch from Eric Zurcher making it into 2.6.0
+
+Tue Oct 21 02:03:03 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS doc/libxml2.xsa: preparing libxml2-2.6.0
+ * doc/*: updated and regenerated the docs and API
+
+Tue Oct 21 01:01:55 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c error.c tree.c: moved the line number to their proper
+ field in elements now.
+
+Tue Oct 21 00:28:20 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xmlwriter.c Makefile.am include/libxml/xmlwriter.h
+ include/libxml/Makefile.am include/libxml/xmlversion.h.in:
+ added the xmlWriter module contributed by Alfred Mickautsch
+ * include/libxml/tree.h: added room for line and extra information
+ * xmlreader.c python/tests/reader6.py: bugfixing some problem some
+ of them introduced in September
+ * win32/libxml2.def.src doc/libxml2-api.xml: regenerated the API
+
+Mon Oct 20 19:02:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in xmldwalk.c xmlreader.c
+ include/libxml/Makefile.am include/libxml/xmldwalk.h
+ include/libxml/xmlversion.h.in: removing xmldwalk module
+ since it got merged with the xmlreader.
+ * parser.c: cleanup
+ * win32/libxml2.def.src python/libxml2class.txt doc/libxml2-api.xml:
+ rebuilt the API
+ * python/tests/Makefile.am python/tests/reader7.py
+ python/tests/walker.py: adding regression testing for the
+ new xmlreader APIs, new APIs for reader creation, including
+ makeing reader "walker" operating on preparsed document trees.
+
+Sun Oct 20 22:37:03 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * entities.c, valid.c: fixed problem reported on the mailing
+ list by Melvyn Sopacua - wrong argument order on functions
+ called through xmlHashScan.
+
+Sun Oct 19 23:57:45 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c xmlIO.c: fixes for compiling using --with-minimum
+
+Sun Oct 19 23:46:04 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: cleanup xmlNodeGetContent() reusing xmlNodeBufGetContent(),
+ tested it through the xslt regression suite.
+
+Sun Oct 19 22:42:16 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c include/libxml/tree.h: adding xmlNodeBufGetContent()
+ allowing to grab the content without forcing allocations.
+ * python/libxml2class.txt doc/libxml2-api.xml: rebuilt the API
+ * xpath.c xmldwalk.c: removed a couple of comment errors.
+
+Sun Oct 19 16:39:36 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch from Chris Anderson to change back
+ memcmp with CMPx()
+
+Sun Oct 19 16:24:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed to not send NULL to %s printing
+ * python/tests/error.py result/HTML/doc3.htm.err
+ result/HTML/test3.html.err result/HTML/wired.html.err
+ result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning
+ up some of the regression tests error
+
+Sun Oct 19 15:31:43 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/nanohttp.h include/libxml/parserInternals.h
+ include/libxml/xmlIO.h nanohttp.c parserInternals.c xmlIO.c:
+ Fixed the HTTP<->parser interraction, which should fix 2 long
+ standing bugs #104790 and #124054 , this also fix the fact that
+ HTTP error code (> 400) should not generate data, we usually
+ don't want to parse the HTML error information instead of the
+ resource looked at.
+
+Sun Oct 19 19:20:48 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/Makefile.am: enhanced the installation of tutorial files
+ to avoid installing CVS subdirectories (bug 122943)
+
+Sun Oct 19 17:33:27 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlIO.c: fixed segfault when input file not present
+ * tree.c: changed output formatting of XML_CDATA_SECTION
+ (bug 120917)
+
+Sun Oct 19 00:15:38 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * include/libxml/parserInternals.h HTMLparser.c HTMLtree.c
+ SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c
+ testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c
+ xpath.c: Changed all (?) occurences where validation macros
+ (IS_xxx) had single-byte arguments to use IS_xxx_CH instead
+ (e.g. IS_BLANK changed to IS_BLANK_CH). This gets rid of
+ many warning messages on certain platforms, and also high-
+ lights places in the library which may need to be enhanced
+ for proper UTF8 handling.
+
+Sat Oct 18 20:34:18 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genChRanges.py, chvalid.c, include/libxml/chvalid.h,
+ doc/apibuild.py: enhanced to include enough comments to
+ make the api doc generation happy.
+
+Sat Oct 18 07:28:25 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c xmlIO.c include/libxml/nanohttp.h: starting work
+ to fix the HTTP/XML parser integration.
+
+Sat Oct 18 11:04:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h: added new APIs
+ for creating reader from sources or reusing a reader with
+ a new source, like the xmlReadxx and xmlCtxtReadxxx
+ * win32/libxml2.def.src doc/libxml2-api.xml doc/apibuild.py
+ doc/Makefile.am: regenerated the APIs
+ * doc/xml.html: applied a patch from Stefan Kost for namesapce docs
+
+Sat Oct 18 12:46:02 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genChRanges.py, chvalid.c, include/libxml/chvalid.h,
+ include/libxml/parserInternals.h: enhanced macros to avoid
+ breaking ABI from previous versions.
+ * catalog.c, parser.c, tree.c: modified to use IS_* macros
+ defined in parserInternals.h. Makes maintenance much easier.
+ * testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid
+ compilation warnings
+ * configuration.in: fixed pushHTML test error; enhanced for
+ better devel (me) testing
+
+Fri Oct 17 14:38:54 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * legacy.c: remove the warning for startDocument(), as it is used by
+ glade (or glade-python)
+ * parser.c relaxng.c xmlschemastypes.c: fixed an assorted set of
+ invalid accesses found by running some Python based regression
+ tests under valgrind. There is still a few leaks reported by the
+ relaxng regressions which need some attention.
+ * doc/Makefile.am: fixed a make install problem c.f. #124539
+ * include/libxml/parserInternals.h: addition of xmlParserMaxDepth
+ patch from crutcher
+
+Wed Oct 15 12:47:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Marc Liyanage pointed out that xmlCleanupParser()
+ was missing xmlCleanupInputCallbacks and xmlCleanupOutputCallbacks
+ calls.
+
+Wed Oct 15 10:16:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * vms/build_libxml.com trionan.c: VMS patch from Craig A. Berry
+
+Mon Oct 13 21:46:25 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: small fix from Bjorn Reese
+
+Mon Oct 13 15:59:25 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fix a call missing arguments
+
+Sun Oct 12 18:42:18 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genChRanges.py, chvalid.c, include/libxml/chvalid.h: fixed
+ a bug in the range search; enhanced range generation (inline code
+ if a small number of intervals); enhanced the readability of the
+ output files.
+
+Sun Oct 12 00:52:14 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * chvalid.def chvalid.c include/libxml/chvalid.h: rebuilt
+ chvalid.def from scratch based on XML 2nd edition REC
+ and regenerated the code.
+
+Sat Oct 11 22:54:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: removed some annoying warnings
+ * chvalid.def chvalid.c include/libxml/chvalid.h: fixed a bug
+ in the PubidChars definition, regenerated, there is still
+ a bug left somewhere
+ * genChRanges.py: save the header directly in include/libxml/
+ * configure.in: I generated a 2.6.0beta6 earlier today
+
+Sat Oct 11 23:32:47 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * fixed small error on previous commit (chvalid.h in
+ base dir instead of include directory)
+
+Sat Oct 11 23:11:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * genChRange.py, chvalid.def, chvalid.c, include/libxml/chvalid.h:
+ new files for a different method for doing range validation
+ of character data.
+ * Makefile.am, parserInternals.c, include/libxml/Makefile.am,
+ include/libxml/parserInternals.h: modified for new range method.
+ * catalog.c: small enhance for warning message (using one
+ of the new range routines)
+
+Sat Oct 11 13:24:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c include/libxml/valid.h: adding an serror field to
+ the validation context breaks the ABI for the xmlParserCtxt
+ structure since it's embedded by content and not by reference
+
+Sat Oct 11 12:46:49 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: patch from Mike Hommey
+ * threads.c: applied Windows patch from Jesse Pelton and Stephane
+ Bidoul
+ * parser.c: fix the potentially nasty access to ctxt->serror
+ without checking first that the SAX block is version 2
+
+Fri Oct 10 21:34:01 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixed a nasty bug with interning some text strings
+ * configure.in: prepare for beta5 of 2.6.0
+ * libxml.h nanoftp.c nanohttp.c xmlIO.c include/libxml/xmlerror.h:
+ better error handling for I/O and converted FTP and HTTP
+ * parser.c: fixed another bug
+
+Fri Oct 10 16:45:20 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixed uninitialized new field.
+ * result/VC/OneID2 result/relaxng/*.err: fixed a typo updating
+ all messages
+
+Fri Oct 10 16:19:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h: make room in Doc, Element, Attributes
+ for PSVI type informations.
+
+Fri Oct 10 16:08:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c c14n.c catalog.c error.c globals.c parser.c
+ parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c
+ xmlschemas.c xpath.c xpointer.c include/libxml/globals.h
+ include/libxml/parser.h include/libxml/valid.h
+ include/libxml/xmlerror.h: Setting up the framework for structured
+ error reporting, touches a lot of modules, but little code now
+ the error handling trail has been cleaned up.
+
+Fri Oct 10 14:29:42 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c include/libxml/xmlerror.h: converted the C14N module too
+
+Fri Oct 10 13:40:51 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: cleanup
+ * xpointer.c include/libxml/xmlerror.h: migrated XPointer module
+ to the new error mechanism
+
+Fri Oct 10 12:49:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c xmlschemas.c: a bit of cleanup
+ * result/schemas/*.err: updated with the new result strings
+
+Fri Oct 10 03:58:39 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: fixed bug 124061
+
+Fri Oct 10 02:47:22 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: cleanup
+ * encoding.c: fix a funny typo
+ * error.c xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h:
+ converted the Schemas code to the new error handling. PITA,
+ still need to check output from regression tests.
+
+Thu Oct 9 15:13:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c include/libxml/xmlerror.h: converted too
+ * tree.c: small cleanup
+
+Thu Oct 9 13:44:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: comment fix
+ * catalog.c include/libxml/xmlerror.h: migrating the catalog code
+ to the new infrastructure
+
+Thu Oct 9 00:36:03 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: final error handling cleanup
+ * xinclude.c error.c: converted XInclude to the new error handling
+ * include/libxml/xmlerror.h: added XInclude errors
+
+Wed Oct 8 23:31:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: bug in compression saving was crashing galeon
+ reported by teuf
+
+Wed Oct 8 21:18:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c tree.c xmlIO.c xmllint.c: more cleanup through the
+ I/O error path
+
+Wed Oct 8 20:57:27 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: better handling of error cases
+
+Wed Oct 8 13:51:14 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c xmllint.c include/libxml/xmlerror.h: first pass at
+ cleaning up error handling in the I/O module.
+
+Wed Oct 8 10:52:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c include/libxml/xmlerror.h: error handling
+ cleanup of the Regexp module.
+
+Wed Oct 8 01:09:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: converting the tree module too
+ * error.c include/libxml/xmlerror.h: created a simpler internal
+ error reporting function.
+
+Tue Oct 7 23:19:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c include/libxml/xmlerror.h include/libxml/xpath.h
+ include/libxml/xpathInternals.h xpath.c: cleaning up XPath
+ error reporting that time.
+ * threads.c: applied the two patches for TLS threads
+ on Windows from Jesse Pelton
+ * parser.c: tiny safety patch for xmlStrPrintf() make sure the
+ return is always zero terminated. Should also help detecting
+ passing wrong buffer size easilly.
+ * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err:
+ updated the results to follow the errors string generated by
+ last commit.
+
+Tue Oct 7 14:16:45 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c include/libxml/xmlerror.h: last cleanup of error
+ handling in the Relax-NG module.
+
+Tue Oct 7 13:30:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG
+ module to teh new error reporting. Better default report, adds
+ the element associated if found, context and node are included
+ in the xmlError
+ * python/tests/reader2.py: the error messages changed.
+ * result/relaxng/*: error message changed too.
+
+Mon Oct 6 10:46:35 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc
+ win32/configure.js: applied patch from Stéphane Bidoul to
+ fix the compilation of 2.6.0 code on Win32
+
+Mon Oct 6 10:16:30 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: fixing the script
+ * parser.c: replace sequences of RAW && NXT(.) == '.' with
+ memcmp calls, seems to not break conformance, slightly inflate
+ the size of the gcc generated code though.
+
+Sun Oct 5 23:30:48 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c parser.c valid.c include/libxml/parserInternals.h:
+ more cleanup of error handling in parserInternals, sharing the
+ routine for memory errors.
+
+Sun Oct 5 15:49:14 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c Makefile.am legacy.c parser.c parserInternals.c
+ include/libxml/xmlerror.h: more code cleanup, especially around
+ error messages, the HTML parser has now been upgraded to the new
+ handling.
+ * result/HTML/*: a few changes in the resulting error messages
+
+Sat Oct 4 23:06:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/xmlerror.h: more error/warning
+ handling cleanups, the XML parser module should be okay now.
+
+Sat Oct 4 01:58:27 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in xmldwalk.c include/libxml/Makefile.am
+ include/libxml/xmldwalk.h include/libxml/xmlversion.h.in:
+ integrated the xmlDocWalker API given by Alfred Mickautsch,
+ and providing an xmlReader like API but working on a xmlDocPtr.
+
+Sat Oct 4 00:18:29 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: more cleanup in make tests
+ * error.c valid.c parser.c include/libxml/xmlerror.h: more work
+ in the transition to the new error reporting strategy.
+ * python/tests/reader2.py result/VC/* result/valid/*:
+ few changes in the strings generated by the validation output
+
+Fri Oct 3 00:19:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: changed 'make tests' to use a concise output,
+ scrolling to see where thing broke wasn't pleasant
+ * configure.in: some beta4 preparation, but not ready yet
+ * error.c globals.c include/libxml/globals.h include/libxml/xmlerror.h:
+ new error handling code, last error informations are stored
+ in the parsing context or a global variable, new APIs to
+ handle the xmlErrorPtr type.
+ * parser.c parserInternals.c valid.c : started migrating to the
+ new error handling code, it's a royal pain.
+ * include/libxml/parser.h include/libxml/parserInternals.h:
+ moved the definition of xmlNewParserCtxt()
+ * parser.c: small potential buffer access problem in push code
+ provided by Justin Fletcher
+ * result/*.sax result/VC/PENesting* result/namespaces/*
+ result/valid/*.err: some error messages were sligthly changed.
+
+Thu Oct 2 13:01:13 2003 Aleksey Sanin <aleksey@aleksey.com>
+
+ * include/libxml/parser.h parser.c: introduced xmlStrPrintf
+ function (wrapper around snprintf)
+
+Wed Oct 1 21:12:06 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: Fix error on output of high codepoint charref like
+ &#x10FFFF; , reported by Eric Hanchrow
+
+Wed Oct 1 14:20:10 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c include/libxml/DOCBparser.h: let's see how much
+ of a pain murrayc is really gonna be.
+
+Wed Oct 1 11:03:40 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: Applied fix for bug #123481 reported by Peter Derr
+
+Tue Sep 30 15:34:31 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c legacy.c parser.c: made the predefined entities
+ static predefined structures to avoid the work, memory and
+ hazards associated to initialization/cleanup.
+
+Tue Sep 30 14:30:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c Makefile.am configure.in legacy.c parser.c
+ parserInternals.c testHTML.c xmllint.c include/libxml/HTMLparser.h
+ include/libxml/parser.h include/libxml/parserInternals.h
+ include/libxml/xmlversion.h.in: added a new configure
+ option --with-push, some cleanups, chased code size anomalies.
+ Now a library configured --with-minimum is around 150KB,
+ sounds good enough.
+
+Tue Sep 30 12:31:00 AEST 2003 Malcolm Tredinnick <malcolm@commsecure.com.au>
+
+ * libxml-2.0-uninstalled.pc.in: New file for building against
+ uninstalled libxml2 builds.
+ * configure.in, Makefile.am: Support the *-uninstalled.pc file.
+ * .cvsignore: Ignore the new generated *.pc file.
+
+Tue Sep 30 02:38:16 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am SAX.c SAX2.c configure.in globals.c parser.c
+ parserInternals.c testReader.c testSAX.c xmlIO.c xmllint.c
+ xmlreader.c example/gjobread.c include/libxml/xmlversion.h.in:
+ added 2 new configure option: --with-reader --with-sax1
+ to allow removing the reader or non-xmlReadxxx() interfaces.
+
+Mon Sep 29 19:58:26 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in entities.c tree.c valid.c xmllint.c
+ include/libxml/tree.h include/libxml/xmlversion.h.in:
+ Adding a configure option to remove tree manipulation
+ code which is not strictly needed by the parser.
+
+Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c: last finishing touch to the BeOS
+ patch from Marcin 'Shard' Konicki
+
+Mon Sep 29 15:15:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
+ encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
+ testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
+ testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
+ xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
+ example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
+ include/libxml/catalog.h include/libxml/debugXML.h
+ include/libxml/entities.h include/libxml/nanohttp.h
+ include/libxml/relaxng.h include/libxml/tree.h
+ include/libxml/valid.h include/libxml/xmlIO.h
+ include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
+ include/libxml/xpathInternals.h python/libxml.c:
+ Okay this is scary but it is just adding a configure option
+ to disable output, this touches most of the files.
+
+Mon Sep 29 12:53:56 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: better fix, avoids breaking the python bindings
+
+Mon Sep 29 11:21:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: fix a compilation problem when configuring
+ with debug but without mem-debug
+
+Sun Sep 28 20:53:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: cleanup, creating a new legacy.c module,
+ made sure make tests ran in reduced conditions
+ * SAX.c SAX2.c configure.in entities.c globals.c parser.c
+ parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c
+ xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in:
+ increased the modularization, allow to configure out
+ validation code and legacy code, added a configuration
+ option --with-minimum compiling only the mandatory code
+ which then shrink to 200KB.
+
+Sun Sep 28 02:15:07 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix a bug raised by the Mips compiler.
+ * include/libxml/SAX.h include/libxml/parser.h: move the
+ SAXv1 block definitions to parser.h fixes bug #123380
+ * xmlreader.c include/libxml/xmlreader.h: reinstanciate
+ the attribute and element pool borken 2 commits ago.
+ Start playing with an entry point to preserve a subtree.
+ * entities.c: remove a warning.
+
+Sat Sep 27 12:19:38 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c, parser.c, relaxng.c: further (final?) minor
+ changes for compilation warnings. No change to logic.
+
+Fri Sep 26 18:03:42 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * parser.c: fixed small problem with missing entities (test/ent2)
+
+Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: William's change allowed to spot a nasty bug in xmlDoRead
+ if the result is not well formed that ctxt->myDoc is not NULL
+ and uses the context dictionnary.
+
+Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: other patches from William Brack to avoid
+ compilation warnings on AIX.
+
+Fri Sep 26 11:03:08 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c, entities.c, xmlreader.c: minor change to
+ avoid compilation warnings on some (e.g. AIX) systems
+
+Fri Sep 26 16:49:25 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fixed a backward compatibility problem
+ when formatting "deprecated SAXv1 function ignorableWhitespace"
+ could be reproduced by xmllint --format
+
+Fri Sep 26 15:50:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/libxml2-api.xml: rebuilt the API
+ * xmllint.c doc/xmllint.1 doc/xmllint.xml: added the new options
+ --nocdata and --nsclean to remove CDATA section and surperfluous
+ namespace declarations
+ * parser.c SAX2.c: implementation of the 2 new options
+
+Fri Sep 26 14:41:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c testHTML.c xmllint.c include/libxml/HTMLparser.h:
+ added the same htmlRead APIs than their XML counterparts
+ * include/libxml/parser.h: new parser options, not yet implemented,
+ added an options field to the context.
+ * tree.c: patch from Shaun McCance to fix bug #123238 when ]]>
+ is found within a cdata section.
+ * result/noent/cdata2 result/cdata2 result/cdata2.rdr
+ result/cdata2.sax test/cdata2: add one more cdata test
+
+Thu Sep 25 23:03:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xmllint.c doc/libxml2-api.xml include/libxml/parser.h:
+ Changed the new xmlRead/xmlCtxtRead APIs to have an extra
+ base URL parameter when not loading from a file or URL.
+
+Thu Sep 25 16:23:58 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing a beta3 solving the ABI problems
+ * globals.c parser.c parserInternals.c testHTML.c HTMLparser.c SAX.c
+ include/libxml/globals.h include/libxml/SAX.h: make sure the
+ global variables for the default SAX handler are V1 ones to
+ avoid ABI compat problems.
+ * xmlreader.c: cleanup of uneeded code
+ * hash.c: fix a comment
+
+Thu Sep 25 14:16:51 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c hash.c parser.c include/libxml/xmlexports.h
+ include/libxml/xmlmemory.h include/libxml/xmlversion.h.in:
+ fixing some comments to avoid warnings from apibuild.py
+
+Wed Sep 24 23:42:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/configure.js: patch from Stéphane Bidoul for configuring
+ the beta2 version #123104
+
+Wed Sep 24 23:17:59 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: adding repeated parsing and validating tests
+ * SAX2.c parser.c tree.c include/libxml/parser.h: make the new
+ DOM tree building interfaces use the dictionary from the
+ parsing context to build the element and attributes names
+ as well as formatting spaces and short text nodes
+ * include/libxml/dict.h dict.c: added some reference counting
+ for xmlDictPtr because they can be shared by documents and
+ a parser context.
+ * xmlreader.c: a bit of cleanup, remove the specific tree freeing
+ functions and use the standard ones now.
+ * xmllint.c: add --nodict
+ * python/libxml.c: fix a stupid bug so that ns() works on
+ attribute nodes.
+
+Tue Sep 23 23:07:45 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/parser.h: adding a new set of
+ API for parsing xmlReadDoc() xmlReadFile() ... xmlReadIO()
+ and xmlCtxtReadDoc() ... xmlCtxtReadIO(). That with
+ a clear define of xmlParserOption, xmlCtxtUseOptions()
+ should simplify custom parsing without being tempted to
+ use global variables, and xmlCtxtReset() should allow reuse
+ of a context for multiple parsing.
+ * xmllint.c: switched to use xmlReadXXX, allow options to
+ be used simultaneously with less troubles.
+ * tree.c: simple warning removal
+ * doc/apibuild.py: small fix
+ * doc/libxml2-api.xml win32/libxml2.def.src: updated
+
+Tue Sep 23 11:15:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: revert xmlCreateDocParserCtxt() since this break
+ the parseDoc() python bindings
+
+Tue Sep 23 11:00:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: make sure xmlDetectSAX2() is called only at
+ parsing time to avoid breaking apps changing the SAX
+ callbacks after context allocation, change xmlCreateDocParserCtxt()
+ to use an immutable buffer instead of a copy
+
+Tue Sep 23 09:40:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied patch from Markus Keim fixing a problem
+ with I/O callback registration.
+ * include/libxml/xmlerror.h: fixed #122994 comment numbering
+ for xmlParserErrors
+
+Mon Sep 22 12:21:11 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c include/libxml/tree.h: the uri arg to xmlNodeSetBase is
+ really a const xmlChar*
+ * xmlreader.c include/libxml/xmlreader.h: addin the
+ xmlTextReaderConstString() to get an interned string from
+ the reader
+
+Sun Sep 20 17:22:20 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * error.c: fixed a warning message (trivial)
+ * doc/search.php: removed incorrect warning message when word
+ search not found in last of multiple tables (bug 119535)
+
+Fri Sep 19 14:26:28 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing a 2.6.0-beta2 release
+ * xmlIO.c: avoid a warning
+ * tree.c: avoid duplicate code in xmlReplaceNode as pointed out
+ by Chris Ryland
+ * include/libxml/dict.h: add a QName access lookup to the
+ dictionary.
+ * xmlreader.c include/libxml/xmlreader.h: adding const access
+ based on the dictionary interface for string read from the
+ reader, the node content access is still TODO, it's too different
+
+Fri Sep 19 00:01:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixing namespace DTD validations
+ * result/valid/ns2.xml result/valid/ns.xml: the output of defaulted
+ namespaces is slightly different now.
+ * Makefile.am: report the memory used in Timingtests (as well as time)
+
+Thu Sep 18 15:29:46 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: add streaming on memory regression tests, found
+ bad bugs in the reader interface
+ * xmlreader.c: fixing bugs w.r.t. very large names, and special
+ condition in end of file.
+ * xmlIO.c tree.c include/libxml/tree.h include/libxml/xmlIO.h:
+ adding immutable buffers, and parser input based on those,
+ but this should not be used (yet) for general parsing
+ * parser.c: added a comment about using immutable buffers for
+ general parsing.
+ * result/bigname.xml.rdr result/bigname2.xml.rdr: fixing the
+ output of the regression tests
+ * xmllint.c: using the immutable buffers when streaming on
+ mmaped file (--stream --memory)
+
+Thu Sep 18 12:04:50 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: the last patch broke unicity of returned strings, removed
+
+Thu Sep 18 00:31:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: add a Timingtests target to check bad behaviour
+ from the streaming engine
+ * dbgen.pl dbgenattr.pl: perl script to generate big instances
+ * xmlreader.c: fix a bad behaviour on large buffer inputs
+
+Wed Sep 17 23:25:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c xmlreader.c: two small improvements
+
+Wed Sep 17 22:53:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: avoid a leak with previous patch
+
+Wed Sep 17 22:06:11 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: use stderr and not stdout for default errors
+ in python environment bug #122552
+
+Wed Sep 17 21:33:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: small fix from Rob Richards for input filename
+ * xmllint.c: fixes for --repeat and --memory/--stream for speed tests
+ * xmlIO: adding a guard in one function
+
+Wed Sep 17 15:57:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c xmlreader.c include/libxml/parser.h: more performance hunting
+ reducing memory allocation and free and avoiding expensive routines
+
+Wed Sep 17 12:23:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c parser.c parserInternals.c xmlreader.c: started messing
+ seriously with per-document dict and element and attribute nodes
+ reuse in the xmlReader. This seems to lead to an interesting
+ speedup of the xmlReader already.
+
+Wed Sep 17 01:07:56 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c include/libxml/dict.h: do string allocations in large
+ pools, allowing to find if a string pertain to a dict quickly
+ * xmllint.c: fix --stream --repeat --timing
+ * Makefile.am: the testThreads run output should be seen.
+
+Mon Sep 15 16:46:28 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c include/libxml/parser.h: starting work on reusing the
+ parser dictionary for the element and attribute tag names.
+ Add pools for Element and Attributes in the parser context,
+ which should help speeding up the reader.
+ * Makefile.am result/*.rdr : adding non-python reader regression
+ tests.
+
+Mon Sep 15 14:54:42 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c parser.c valid.c: starting to cleanup some of the
+ problems exposed by the W3C/NIST regression suite.
+ * result/ent7.sax result/xml2.sax: small fixes.
+
+Mon Sep 15 11:46:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: more parser error factoring
+
+Sun Sep 14 21:53:39 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLtree.c: Fixed bug 121394 - missing ns on attributes
+
+Sun Sep 14 21:43:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/xmlerror.h: factoring of more
+ error handling code, serious size reduction and more lisibility
+ of the resulting code.
+ * parserInternals.c parser.c include/libxml/parserInternals.h
+ include/libxml/parser.h: changing the way VC:Proper Group/PE Nesting
+ checks are done, use a counter for entities. Entities where freed and
+ reallocated at the same address failing the check.
+ * tree.c: avoid a warning
+ * result/valid/* result/VC/*: this slightly changes some validation
+ error messages.
+
+Sun Sep 14 11:03:27 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * valid.c: fixed bug 121759 - early declaration of
+ attribute-list in external DTD
+
+Sat Sep 13 14:42:11 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/xmlerror.h: starting cleaning up
+ error handling, factorize error processing
+ * doc/xmllint.html: update of the page, remove --sgml
+
+Sat Sep 13 02:13:50 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am DOCBparser.c parserInternals.c testDocbook.c
+ xmllint.c doc/xmllint.xml doc/xmllint.1: removing the
+ broken pseudo SGML DocBook parser code.
+
+Fri Sep 12 17:24:11 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fix a problem with strcpy() in xmlXPathFormatNumber()
+ valgrind pointed out the strings overlapped. cleanup .
+
+Fri Sep 12 11:43:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied speedup to xmlSearchNs() as suggested by
+ Luca Padovani. Cleaned up xmlSearchNsByHref() in the process
+ applying the same trick.
+
+Fri Sep 12 01:36:20 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c parserInternals.c tree.c include/libxml/parser.h
+ include/libxml/xmlerror.h: adding namespace checkings
+ while making sure they still parse as wellformed documents.
+ Add an nsWellFormed status report to the context, and
+ provide new appropriate error codes.
+ * Makefile.am result/namespaces/* test/namespaces/*: add
+ specific regression testing for the new namespace support
+ * test/att5 result/noent/att5 result/att5 result/att5.sax:
+ add more coverage for the attribute parsing and normalization
+ code.
+
+Fri Sep 12 01:34:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: backport of a thread bugfix from 2_5_X branch
+
+Thu Sep 11 18:29:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a bug in one corner case of attribute parsing.
+
+Thu Sep 11 16:21:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* : 2.6.0beta1 changes
+ * SAX2.c hash.c parser.c parserInternals.c: Fixing attribute
+ normalization, might not be totally fixed but this should
+ make sure SAX event provide the right strings for attributes
+ except entities for which libxml2 is different by default
+ This should fix #109564
+ * result/attrib.xml.sax result/ent3.sax result/p3p.sax: minor changes
+ in attribute callback values
+ * result/c14n/with-comments/example-4
+ result/c14n/without-comments/example-4: this also fixes a subtle
+ bug in the canonicalization tests.
+
+Wed Sep 10 12:38:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ Time to commit 3 days of work rewriting the parser internal,
+ fixing bugs and migrating to SAX2 interface by default. There
+ is some work letf TODO, like namespace validation and attributes
+ normalization (this break C14N right now)
+ * Makefile.am: fixed the test rules
+ * include/libxml/SAX2.h include/libxml/parser.h
+ include/libxml/parserInternals.h SAX2.c parser.c
+ parserInternals.c: changing the parser, migrating to SAX2,
+ adding new interface to switch back to SAX1 or initialize a
+ SAX block for v1 or v2. Most of the namespace work is done
+ below SAX, as well as attribute defaulting
+ * globals.c: changed initialization of the default SAX handlers
+ * hash.c tree.c include/libxml/hash.h: added QName specific handling
+ * xmlIO.c: small fix
+ * xmllint.c testSAX.c: provide a --sax1 switch to test the old
+ version code path
+ * result/p3p result/p3p.sax result/noent/p3p test/p3p: the new code
+ pointed out a typo in a very old test namespace
+
+Sun Sep 7 19:58:33 PTD 2003 William Brack <wbrack@mmm.com.hk>
+
+ * xmlIO.c include/libxml/xmlIO.h parser.c: Implemented detection
+ of compressed files, setting doc->compressed appropriately
+ (bug #120503).
+
+Sun Sep 7 22:53:06 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: try to cope with the fact that apps may still
+ have allocated smaller SAX callbak block
+
+Sun Sep 7 11:11:45 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c: allow to give -1 for undefined length in lookups
+ * include/libxml/parser.h parser.c parserInternals.c testSAX.c:
+ first round of work on the new SAX2 interfaces, the API
+ will change but commiting before changing for historical
+ reference.
+
+Sat Sep 6 10:55:01 PTD 2003 William Brack <wbrack@mmm.com.hk>
+
+ * SAX2.c, xmlIO.c: fixed bug #121210 (callback to sax->error,
+ sax->warning with wrong params).
+
+Fri Sep 5 10:33:42 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/globals.h: patch from Stéphane Bidoul to export
+ globals entry points to the python bindings
+
+Wed Sep 3 15:24:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: when creating a DOCTYPE use "html" lowercase
+ by default instead of "HTML"
+ * parser.c xmlreader.c: optimization, gain a few % parsing speed by
+ avoiding calls to "areBlanks" when not needed.
+ * include/libxml/parser.h include/libxml/tree.h: some structure
+ extensions for future work on using per-document dictionaries.
+
+Wed Sep 3 15:08:06 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am results/*.sax SAXResult/*: removing the SAXresults
+ tree, keeping result in the same tree, added SAXtests to the
+ default "make tests"
+
+Tue Sep 2 15:59:04 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/xmlexports.h: defined additional macros which
+ affect exports and added mingw section
+
+Mon Sep 1 15:15:18 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/index.py: fixed problem parsing xhtml docs
+ * doc/xmlreader.html,doc/guidelines.html: small modification
+ to avoid problem in python parsing.
+ * doc/search.php: fixed upper case filename problem for XSLT docs
+
+Mon Sep 1 22:55:09 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: patch from Mark Vakoc that allows compiling
+ with XInclude but without XPointer support.
+
+Mon Sep 1 22:31:38 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xml2-config.in: Applied a patch from Kevin P. Fleming
+ to add --libtool-libs option to xml2-config script.
+
+Sun Aug 31 21:52:12 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/README.docs, doc/Makefile.am: new file added,
+ giving some description of the documentation generation process
+ * doc/search.php: fixed problem with upper case on filenames
+
+Fri Aug 29 12:25:01 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.bcb: updates by Eric Zurcher
+
+Thu Aug 28 22:58:38 PDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/apibuild.py, doc/libxml2-api.xml: enhanced code
+ to compensate for pollution from Igor's header taint
+ (quick before Daniel notices)
+
+Thu Aug 28 23:01:36 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixed a namespace error on attribute reporting bug
+ pointed out by Tobias Reif
+ * test/p3p result/p3p result/noent/p3p: this test case was wrong
+ using xmlsn instead of xmlns...
+
+Thu Aug 28 18:25:07 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/globals.h include/libxml/xmlexports.h: fixed
+ typos reported by Mark Vakoc
+
+Thu Aug 28 08:59:51 MDT 2003 John Fleck <jfleck@inkstain.net>
+
+ add:
+ * doc/tutorial/api.html
+ * doc/tutorial/ar01s09.html
+ * doc/tutorial/includexpath.c
+ updated
+ * doc/tutorial/*.html
+ fix my bad - forgot to check in new files when I last
+ updated
+
+Thu Aug 28 14:31:13 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.bcb: new file, support for Borland C++
+ * xmllint.c: fixed time inclusion for various compilers
+
+Thu Aug 28 12:32:59 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * parser.c parserInternals.c DOCBparser.c HTMLparser.c: added
+ few casts to shut the compiler warnings
+
+Thu Aug 28 12:23:51 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.* win32/configure.js: fixed for mingw
+
+Thu Aug 28 10:01:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c threads.c: fixing bug #120870 try to avoid problem
+ with uninitialized mutexes
+
+Wed Aug 27 16:12:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed an error reporting bug in Relax-NG when we end
+ up with multiple states, select the "best" one. Fix #120682
+ * result/relaxng/tutor11_2_3.err: small change resulting
+
+Wed Aug 27 11:25:25 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: applied base64 support patch from Anthony Carrico
+
+Wed Aug 27 10:58:51 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/[threads-xpointer].h: realigned parameters
+ after taint
+
+Wed Aug 27 09:59:54 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/xmlexports.h: fixed defs for Borland compiler,
+ as reported by Eric Zurcher
+
+Tue Aug 26 15:54:04 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed bug #120386 again a problem introduced when
+ trying to reuse automata for content validation. Fix a bug report
+ problem on zeroOrMore
+ * result/relaxng/tutor3_7_err: change slightly error reporting.
+
+Mon Aug 25 13:24:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/Makefile.am: make sure the new header will
+ be included when generating a new distribution.
+
+Mon Aug 25 12:37:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed a couple of stupid bugs in the state allocation
+ routines which led to bug #120040 and the ones reported by
+ Martijn Faassen
+
+Mon Aug 25 12:37:23 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/parserInternals.h include/libxml/relaxng.h
+ include/libxml/SAX.h include/libxml/SAX2.h: realigned the
+ parameters after taint.
+
+Mon Aug 25 11:16:01 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/xmlversion.h.in: moved export defs to a separate
+ file for consistency.
+ * include/libxml/xmlexports.h: new file, contains export defs.
+
+Mon Aug 25 11:01:49 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * include/libxml/*.h genUnicode.py: exportability taint
+ of the headers.
+
+Thu Aug 21 12:37:46 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: make the deprecated interfaces log an error message
+ to be sure it won't get used.
+
+Thu Aug 21 00:50:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am SAX2.c include/libxml/Makefile.am include/libxml/SAX2.h:
+ Adding new version of the SAX interface, it's not there yet,
+ currently just preparing the work
+ * globals.c parser.c SAX.c include/libxml/SAX.h
+ include/libxml/globals.h include/libxml/parser.h: doing some
+ refactoring of the SAXv1 interfaces, obsoleting a bunch of them
+ while keeping functionalities, preparing SAX2 integration.
+ * dict.c: small cleanup.
+
+Wed Aug 20 00:20:01 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixes a small bug introduced in last commit and detected
+ by valgrind.
+
+Tue Aug 19 16:54:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c hash.c: optimization when freeing hash tables.
+ * parser.c xmlIO.c include/libxml/tree.h: some tuning of buffer
+ allocations
+ * parser.c parserInternals.c include/libxml/parser.h: keep a
+ single allocated block for all the attributes callbacks,
+ avoid useless malloc()/free()
+ * tree.c: do not realloc() when growing a buffer if the buffer
+ ain't full, malloc/memcpy/free avoid copying memory.
+
+Mon Aug 18 18:37:01 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c doc/xmllint.xml doc/xmllint.1: added option
+ --dtdvalidfpi for Tobias Reif
+
+Mon Aug 18 14:03:03 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * dict.c include/libxml/dict.h Makefile.am include/libxml/Makefile.am:
+ new dictionary module to keep a single instance of the names used
+ by the parser
+ * DOCBparser.c HTMLparser.c parser.c parserInternals.c valid.c:
+ switched all parsers to use the dictionary internally
+ * include/libxml/HTMLparser.h include/libxml/parser.h
+ include/libxml/parserInternals.h include/libxml/valid.h:
+ Some of the interfaces changed as a result to receive or return
+ "const xmlChar *" instead of "xmlChar *", this is either
+ insignificant from an user point of view or when the returning
+ value changed, those function are really parser internal methods
+ that no user code should really change
+ * doc/libxml2-api.xml doc/html/*: the API interface changed and
+ the docs were regenerated
+
+Sun Aug 17 23:05:38 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied patch to xmlCleanupParser from Dave Beckett
+
+Sat Aug 16 22:53:42 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/parsedecl.py, doc/libxml2-refs.xml, doc/API*.html:
+ fixed part (2) of bug 119535 (wrong alpha case on filenames)
+
+Sat Aug 16 20:35:28 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/API*.html, doc/html/*: regenerated API documentation
+ for xmlsoft.org (part of Bug 119535)
+
+Fri Aug 15 14:58:37 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c, threads.c, include/libxml/HTMLparser.h,
+ doc/libxml2-api.xml: Minor changes to comments, etc. for
+ improving documentation generation
+ * doc/Makefile.am: further adjustment to auto-generation of
+ win32/libxml2.def.src
+
+Fri Aug 15 02:24:20 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * News configure.in: preparing libxml2-2.5.10 release
+ * doc/* : updated the doc and rebuilt
+
+Fri Aug 15 01:55:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing the xmlSAXParseDTD bug #119536 raised by
+ Malcolm Tredinnick with the patch he suggested.
+
+Fri Aug 15 01:37:10 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: allocation error #119784 raised by Oliver Stoeneberg
+
+Fri Aug 15 00:41:58 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fixing an use of strcpy() where both strings overlap
+ pointed out by valgrind.
+
+Thu Aug 14 17:10:39 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c globals.c include/libxml/xmlmemory.h: get rid of
+ some compilation warnings.
+ * xinclude.c: fix the performance problem reported by Kevin Ruscoe
+ plus some cleanup and better error reporting.
+
+Thu Aug 14 14:13:43 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: applied UTF-16 encoding handling patch provided by
+ Mark Itzcovitz
+ * encoding.c parser.c: more cleanup and fixes for UTF-16 when
+ not having iconv support.
+
+Thu Aug 14 03:19:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c
+ nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for
+ mingw compiler on Windows.
+
+Thu Aug 14 02:28:36 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed the serious CPU usage problem reported by
+ Grant Goodale
+ * HTMLparser.c: applied patch from Oliver Stoeneberg about a free
+ missing in htmlSAXParseDoc
+
+Tue Aug 12 22:48:10 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * doc/Makefile.am: Removed dependency from libxml2.def.src
+
+Tue Aug 12 18:55:08 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * autogen.sh: took away the requirement for automake-1.4,
+ changed the messages for getting auto* tools to current
+ gnu pages.
+ * configure.in: added check for Linux Dec alpha requiring
+ -ieee flag, fixed test for ipv6
+ * trionan.c: fixed problem for compiling on Linux Dec alpha
+ using native compiler
+ * doc/Makefile.am: implemented regeneration of win32/libxml2.def.src
+ whenever libxml2-api.xml is changed.
+
+Mon Aug 11 17:02:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: cleaning up a problem when parsing UTF-16 and libiconv
+ is not used.
+
+Sun Aug 10 08:13:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * win32/libxml2.def.src: renerated with fixed libxml2-api.xml
+
+Sun Aug 10 00:22:55 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * News configure.in: preparing libxml2-2.5.9 release
+ * doc/* : updated the doc and rebuilt
+
+Sat Aug 9 20:00:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlreader.h doc/libxml2-api.xml: changing an enum
+ definition to get a correct API XML description. This was apparently
+ breaking Windows build.
+
+Sat Aug 9 13:41:21 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed a nasty bug #119387, bad heuristic from
+ the progressive HTML parser front-end on large character data
+ island leading to an erroneous end of data detection by the
+ parser. Some cleanup too to get closer from the XML progressive
+ parser.
+
+Sat Aug 9 00:42:47 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * win32/configure.js: Added in support for the ISO8859X
+ module (patch provided by Jesse Pelton)
+
+Fri Aug 8 15:56:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c tree.c threads.c: hum try to avoid some troubles
+ when the library is not initialized and one try to save, the
+ locks in threaded env might not been initialized, playing safe
+ * xmlschemastypes.c: apply patch for hexBinary from Charles Bozeman
+ * test/schemas/hexbinary_* result/schemas/hexbinary_*: also added
+ his tests to the regression suite.
+
+Fri Aug 8 18:47:38 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * win32/defgen.xsl, win32/libxml2.def.src: Bug 119343
+ (with apologies to Igor) - Enhanced handling of docb and
+ nanohttp.
+
+Thu Aug 7 21:13:22 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * encoding.c: further small changes for warnings when
+ configured with --with-iconv=no
+
+Wed Aug 6 12:32:11 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * error.c trionan.[ch] testThreads.c python/generator.py:
+ further small changes to elminate most of the remaining
+ warnings.
+
+Tue Aug 5 23:51:21 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * error.c HTMLparser.c testC14N.c testHTML.c testURI.c
+ xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c
+ python/libxml.c include/libxml/xmlmemory.h: small changes
+ to syntax to get rid of compiler warnings. No changes
+ to logic.
+
+Mon Aug 4 22:40:54 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/libxml2-api.xml doc/html/*: rebuilt the API and docs.
+
+Mon Aug 4 21:40:34 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed a small problem in the patch for #118763
+ * result/HTML/doc3.htm*: this reverts back to the previous result
+
+Sun Aug 3 21:41:49 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/FAQ.html doc/xml.html: applied doc patch to xml.html
+ and rebuilt, apparently some C++ wrappers are not available,
+ c.f. bug #118943
+
+Sun Aug 3 21:30:31 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixing HTML attribute serialization bug #118763
+ applying a modified version of the patch from Bacek
+ * result/HTML/doc3.htm*: this modifies the output from one test
+
+Sun Aug 3 21:02:30 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c include/libxml/tree.h: added a new API to split a
+ QName without generating any memory allocation
+ * valid.c: fixed another problem with namespaces on element
+ in mixed content case
+ * python/tests/reader2.py: updated the testcase with
+ Bjorn Reese fix to reader for unsignificant white space
+ * parser.c HTMLparser.c: cleanup.
+
+Sun Aug 3 20:55:40 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: trying to fix #118754 of possible recursion in the
+ catalogs. Not fantastically happy about the current fix since
+ it's likely to break under very thread intensive concurrent
+ access to the catalog. Better solution might to keep the depth
+ an extra argument to the resolution functions.
+
+Sun Aug 3 18:56:54 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed bug #118712 about mixed content, and namespaced
+ element names.
+ * test/valid/mixed_ns.xml result/valid/mixed_ns*: added a check
+ in the regression tests
+
+Fri Aug 1 23:55:23 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ Coninuing work on bug 118559
+ * DOCBparser.c: removed 2 unsed vars
+ * xmlregexp.c: changed some numeric const to their enum symbols
+ * xmlreader.c: changed one var define from int to enum
+ (a little more to be done, awaiting co-ordination)
+ * relaxng.c: deleted one unused var
+ * xmllint.c: deleted some unused vars, changed one arg
+ val from int to enum
+ * testHTML.c, testDocbook.c: changed some arg vals to enum const
+ * xmlIO.c: fixed typo from last night (small warning msg)
+
+Thu Jul 31 22:44:33 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ Working on bug 118559
+ * error.c: deleted unused variable
+ * parserInternals.c: deleted unneeded 'const' qualifier
+ * parser.c: changed variable type for enum temp storage
+ * xmlIO.c: changed debugging var to be inside #ifdef
+ * valid.c: removed unused variable
+ * HTMLparser.c: removed some unneeded 'const' qualifiers
+ * xpath.c: added some type casts, removed some unused vars
+ * xinclude.c: added one type cast
+ * nanohttp.c: repositioned some #ifdef to avoid unused var
+ * nanoftp.c: removed unused var
+
+Wed Jul 30 14:57:55 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied a patch from William Brack about
+ the problem of parsing very large HTML instance with comments
+ as raised by Nick Kew
+
+Wed Jul 30 12:29:38 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h: applying cleanup
+ patch from Bjorn Reese for xmlTextReaderNodeType() and
+ significant whitespace. There is an enum for node type
+ values now.
+
+Wed Jul 30 11:08:21 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: applying patch from Peter Jacobi to added
+ ISO-8859-x encoding support when iconv is not available
+ * configure.in include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h.in: added the glue needed
+ at the configure level and made it the default for Windows
+
+Tue Jul 29 16:43:48 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml2class.txt:
+ patch from Joachim Bauch + cleanup for Relax NG error callbacks
+ in python
+
+Tue Jul 29 12:46:08 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c parserInternals.c tree.c: applied Peter Jacobi encoding
+ cleanup patch, and also avoided a possible memory leak
+
+Tue Jul 29 09:28:09 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fix the previous commit
+
+Tue Jul 29 12:28:17 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c: fixed problem with comments reported by Nick Kew
+ * encoding.c: added routines xmlUTF8Size and xmlUTF8Charcmp for
+ some future cleanup of UTF8 handling
+
+Mon Jul 28 16:39:14 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: applied a change suggested by Sean Griffin in bug
+ #118494 about a memory leak in EXSLT
+
+Sun Jul 27 14:30:56 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed a Relax-NG compilation/streaming bug introduced
+ when fixing the previous Relax-NG bugs
+ * result/relaxng/*: This slightly changes the output messages of
+ some regression tests.
+ * configure.in: added support of -with-fexceptions for nested C++
+ support.
+
+Thu Jul 24 15:46:02 MDT 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/apa.html
+ * doc/tutorial/apb.html
+ * doc/tutorial/apc.html
+ * doc/tutorial/apd.html
+ * doc/tutorial/ape.html
+ * doc/tutorial/apf.html
+ * doc/tutorial/apg.html
+ * doc/tutorial/aph.html
+ * doc/tutorial/ar01s02.html
+ * doc/tutorial/ar01s03.html
+ * doc/tutorial/ar01s04.html
+ * doc/tutorial/ar01s05.html
+ * doc/tutorial/ar01s06.html
+ * doc/tutorial/ar01s07.html
+ * doc/tutorial/ar01s08.html
+ * doc/tutorial/index.html
+ * doc/tutorial/ix01.html
+ * doc/tutorial/xmltutorial.pdf
+ * doc/tutorial/xmltutorial.xml
+ update tutorial with XPath example
+
+Thu Jul 24 17:07:06 IST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c parser.c: fixing a bug about a special case of namespace
+ handling, this closes bug #116841
+
+Wed Jul 23 20:52:36 IST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c result/relaxng/*: checked and fixed the compilation
+ of RNG schemas, fixes a couple of bugs #117097 and #117001 .
+ This slightly changes the output messages of some regression tests.
+
+Wed Jul 23 15:15:08 IST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed an out of bound error #118052 , the good
+ part if that base64 code was not in use yet ...
+
+Tue Jul 22 19:42:15 MDT 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.html
+ include html version of the xmllint man page, so an
+ up-to-date version is visible on the Web
+
+Mon Jul 21 21:53:43 IST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c include/libxml/xinclude.h: added a new API
+ xmlXIncludeProcessTree() to process XInclude only on a subtree
+ this should fix bug #115385
+
+Fri Jul 18 17:11:42 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c include/libxml/relaxng.h: adding Get interface for
+ the error callback and parameters of parsing and validation
+ contexts
+ * xmlreader.c: patch to fix bug #117702 about incomplete Read()
+ on text nodes.
+
+Wed Jul 16 23:15:53 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: patch from Dodji Seketeli about UTF16 BOM
+ when using the push XML parser.
+ * result/utf16bom.xml result/noent/utf16bom.xml test/utf16bom.xml:
+ added the test to the regression suite.
+
+Tue Jul 15 22:03:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: add xmlThrDefMutex = NULL in xmlCleanupGlobals()
+ as suggested by Rob Richards
+
+Tue Jul 15 15:30:55 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c
+ xmlschemas.c xpath.c: removed some warnings by casting xmlChar
+ to unsigned int and a couple of others.
+
+Fri Jul 11 16:44:22 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: fixes a segfault on empty hexBinary strings
+
+Thu Jul 10 16:02:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c: cleanup patches from Peter Breitenlohner
+
+Tue Jul 8 16:02:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c threads.c: fixes some problem when freeing unititialized
+ mutexes
+
+Tue Jul 8 14:15:07 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c: the modules should not import <config.h>
+ directly, some cleanups
+ * xmlschemas.c: Peter Sobisch found a nasty bug in the Schemas
+ validation code.
+
+Mon Jul 7 18:00:51 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/configure.js: Jesse Pelton pointed out a problem in the
+ javascript code.
+
+Mon Jul 7 16:39:31 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/*: regenerated
+ * nanoftp.c nanohttp.c: might fix includes problems with the
+ Ipv6 support on solaris
+ * tree.c: patch from Markus Keim about xmlHasNsProp() on attributes
+ defined as #IMPLIED
+
+Sun Jul 6 23:09:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/*: preparing release 2.5.8
+ * nanohttp.c: changed some preprocessor block
+ * xmlschemastypes.c: applied patch from Charles Bozeman adding
+ hexBinary schema datatype and adding support for totalDigits and
+ fractionDigits facets.
+
+Sun Jul 6 19:56:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c xpath.c: fixed 2 bugs pointed in #116448
+
+Sun Jul 6 19:34:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixed bug #116095 removing the error message when
+ reapplying XInclude to a document.
+
+Sat Jul 5 22:40:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied small changes to portability layer for
+ compilation on DJGPP Ms-DOS compiler.
+
+Sat Jul 5 22:30:25 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c HTMLparser.c: use the character() SAX callback
+ if the cdataBlock ain't defined.
+ * xpath.c: fix bug #115349 allowing compilation when configured
+ with --without-xpath since the Schemas code needs NAN and co.
+
+Sat Jul 5 00:51:30 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+ Fixed problem with multi-threading, shown by the test program
+ testThreads. After fix, ran mutiple tests on various speed
+ machines (single and dual processor X86), which all seem okay.
+
+ * catalog.c: added missing xmlRMutexUnlock in xmlLoadCatalog
+
+ * threads.c: added missing initialisation for condition variable
+ in xmlNewRMutex.
+
+Sat Jun 21 16:10:24 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ Applying IPv6 patch from Archana Shah <archana.shah@wipro.com>
+ closing bug #114837
+
+ * configure.in: Added checks for IPv6 support and getaddrinfo().
+
+ * acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6.
+
+ * config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6.
+
+ * nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage
+ field or sockaddr_in field, depending upon the availability of IPv6
+ support.
+ have_ipv6(): Added to check for run-time IPv6 support.
+ (xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy):
+ Modified to parse a URI with IPv6 address given in [].
+ (xmlNanoFTPConnect): Changed to use getaddrinfo for address
+ resolution, if it is available on the system, as gethostbyname
+ does not return IPv6 addresses on some platforms.
+ (xmlNanoFTPGetConnection): Modified type of dataAddr variable to
+ sockaddr_storage or sockaddr_in depending upon the IPv6 support.
+ Sending EPSV, EPRT or PASV, PORT depending upon the type of address
+ we are dealing with.
+
+ * nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support.
+ (xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse
+ a URI with IPv6 address given in [].
+ (xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is
+ available on the system. Also IPv6 addresses will be resolved by
+ gethostbyname only if IPv6 run-time support is available.
+ (xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address.
+
+Sat Jun 14 18:46:51 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/configure.js include/win32config.h
+ include/libxml/xmlversion.h.in: Applied the patch for BCB
+ by Eric Zurcher.
+
+Fri Jun 13 14:27:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am doc/html/*: reverted back patch for #113521,
+ due to #115104 and while fixing #115101 . HTML URLs must not
+ be version dependant.
+
+Fri Jun 13 12:03:30 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: do not generate &quot; for " outside of attributes
+ * result//*: this changes the output of some tests
+
+Mon Jun 9 12:28:58 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xmlIO.c: trying to fix #114277 about when file
+ remapping and escaping should really be attempted.
+
+Mon Jun 9 11:06:09 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*: applied a patch from Gman for building docs
+ * valid.c xmllint.c include/libxml/valid.h: applied a patch from
+ Gary Pennington to provide an allocator for xmlValidCtxt
+ * xmlreader.c: applied patch from Jacek Konieczny fixing bug
+ #113580 about data not being passed immediately.
+
+Thu Jun 5 11:31:02 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied a couple of patches from Mark Itzcovitz
+ to handle saving back "UTF-16" documents.
+
+Mon Jun 2 21:56:15 MVT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlschemas.c include/libxml/schemasInternals.h: commiting
+ some work done while in the Maldives (hence the timezone on the
+ laptop !)
+ * result/schemas/length3* test/schemas/deter0_*
+ test/schemas/group0_*: some tests added too
+
+Mon Jun 2 15:34:17 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: small fix
+ * xmlIO.c: fixed an error message
+
+Tue May 20 14:21:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fixing Red Hat bug #91013 where xmllint was
+ accepting an improper UTF8 sequence
+
+Sat May 17 12:53:11 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * threads.c: applied the patch from Stéphane Bidoul for getting
+ rid of extra threads in a dynamic library.
+ * win32/configure.js: threads default to 'native' now.
+
+Fri May 16 13:17:52 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixing bug #112904: html output method escaped
+ plus sign character in URI attribute.
+
+Thu May 15 18:06:18 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * build_glob.py global.data globals.c parser.c
+ include/libxml/globals.h: patch from Stéphane Bidoul for setting
+ up threads global defaults.
+ * doc/libxml2-api.xml: this extends the API with new functions
+ * python/tests/Makefile.am python/tests/reader2.py
+ python/tests/thread2.py: integrated the associated testcase and
+ fixed the error string used in reader2
+
+Wed May 14 14:56:46 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in libxml.spec.in python/Makefile.am: trying
+ to conciliate --with-python= requirements and RPM builds,
+ a PITA really...
+
+Tue May 13 18:30:34 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: oops last commit introduced a memory leak.
+
+Tue May 13 18:10:38 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c doc/xmllint.xml: added --nonet option
+ * doc/Makefile.am: fixing #112803 by adding --nonet when calling
+ xsltproc or xmllint
+ * doc/xmllint.xml doc/xmllint.1: also added --schema doc and
+ rebuilt
+ * HTMLparser.c: cleaned up the HTML parser context build when
+ using an URL
+
+Tue May 13 16:35:04 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: added a comment about bug #112902
+
+Mon May 12 21:58:00 EDT 2003 William Brack <wbrack@mmm.com.hk>
+
+ * minor cleanup of configure '--help' display
+ * error.c: enhanced xmlParserPrintFileContext to fix bug #109942
+
+Mon May 12 17:53:30 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: PI nodes in external subset were not freed :-\
+ fixes bug #112842
+
+Mon May 12 11:23:27 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added --schema option to run WXS schema validation
+ * xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h:
+ tried to improve error reporting in the Schema code, some cleanup
+ too.
+
+Sun May 11 16:13:20 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed some problems in the handling of errors,
+ and attributes addressed by references.
+ * test/schemas/* result/schemas/*: dropped the verbosity level
+ and added a couple of new tests
+
+Sat May 10 16:01:21 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: Stéphane Bidoul found an off by one addressing
+ error on the error handling.
+
+Fri May 9 19:08:20 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: trying to fix #112673
+
+Fri May 9 18:14:16 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c catalog.c parser.c relaxng.c: removed multiple
+ warning, this fixed a bug and should close #111574
+
+Fri May 9 15:34:32 EDT 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixing bug #104081 with xs:all with an element
+ holding minOccurs="0"
+ * test/schemas/all_* result/schemas/all_*: added some regression
+ tests for that bug
+ * xmllint.c xmlreader.c: patches from Joerg Schmitz-Linneweber and
+ Garry Pennington to compile without schemas support.
+
+Thu May 1 10:02:35 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed a problem with xmlUnlinkNode() for DTDs.
+
+Wed Apr 30 14:16:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xml2-config.in: try to fix Red hat bug #89957, do not
+ output -L/usr/lib64
+ * xmlreader.c: fixed a typo in a comment
+
+Tue Apr 29 07:32:02 MDT 2003 John Fleck <jfleck@inkstain.ent>
+
+ * doc/tutorial/aph.html, ix01.html
+ forgot to cvs add the new files. Thanks to Roland van Laar
+ for pointing this out
+
+Tue Apr 29 14:36:49 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c doc/libxml2-api.xml: fixing a function comment
+ * doc/Makefile.am doc/apibuild.py doc/gnome-xml.sgml: switching
+ to the XML/XSLT doc generation closing #111799
+ * doc/html/*: complete update of the HTML results
+
+Mon Apr 28 14:51:41 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/defgen.xsl: fixed the conditional for unicode map,
+ removed hardcoded schema entries
+
+Mon Apr 28 02:19:00 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/defgen.xsl: new file, stylesheet for generating
+ win32/libxml2.def.src from doc/libxml2-api.xml
+ * win32/libxml2.def.src: is autogenerated from now on, changes
+ to this file will not appear here anymore
+
+Mon Apr 28 00:12:11 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * win32/configure.js python/setup.py.in: applied patch
+ from Stéphane Bidoul for the Python bindings on the new
+ release.
+
+Sun Apr 27 17:56:21 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * debugXML.c: included libxml/uri.h for xmlCanonicPath
+ declaration
+ * win32/configure.js: thread-enabled build is now default
+ * win32/libxml2.def.src: added more exports
+
+Sun Apr 27 00:23:05 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/*.xsl doc/*.html: updated the web site separated
+ developers from common pages, made the transition to XHTML1,
+ added validity checking to the makefile rules.
+
+Sat Apr 26 23:17:51 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fix for xmlIOParseDTD same as previous and reported
+ by Petr Pajas
+
+Sat Apr 26 15:26:04 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied fix to xmlSAXParseDTD from Malcolm Tredinnick
+ closing #111638
+
+Sat Apr 26 14:00:58 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: fixed a problem in the generator where
+ the way functions are remapped as methods on classes was
+ not symetric and dependant on python internal hash order,
+ as reported by Stéphane Bidoul
+
+Fri Apr 25 21:52:33 MDT 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial:
+ xmltutorial.xml
+ xmltutorial.pdf
+ *.html
+ add appendix on generating compiler flags, more indexing
+
+Sat Apr 26 01:10:48 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * triodef.h vms/build_libxml.com: applied patch from Craig A. Berry
+ to get libxml-2.5.7 to compile on OpenVMS
+
+Fri Apr 25 18:42:35 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing an xmlParseDTD bug raised by Petr Pajas
+
+Fri Apr 25 15:20:29 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am doc/xmlcatalog.1 doc/xmlcatalog_man.xml
+ doc/xmllint.1 doc/xmllint.xml: automated the generation of the
+ man page based on xsltproc and a stylesheet PI in the XML.
+
+Fri Apr 25 12:37:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmllint.*: trying to fix #110541 where &nbsp; generated
+ character preventing rendering by the man command.
+
+Fri Apr 25 01:09:23 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS configure.in: preparing release 2.5.7
+ * doc/*: updated and rebuilt the docs
+ * doc/apibuild.py: fixed the script
+
+Thu Apr 24 19:11:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am doc/apibuild.py: make sure the OOM code don't
+ get in the way of the builds
+ * doc/libxml2-api.xml python/libxml2class.txt: automatic update
+
+Thu Apr 24 18:01:46 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am testOOM.c testOOMlib.[ch] : integrated the Out Of
+ Memory test from Havoc Pennington #109368
+ * SAX.c parser.c parserInternals.c tree.c uri.c valid.c
+ xmlmemory.c xmlreader.c xmlregexp.c include/libxml/tree.h
+ include/libxml/parser.h: a lot of memory allocation cleanups
+ based on the results of the OOM testing
+ * check-relaxng-test-suite2.py: seems I forgot to commit the
+ script.
+
+Wed Apr 23 17:16:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: trivial fix for 109774 removing a warning
+
+Wed Apr 23 15:49:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find
+ more places where xmlCanonicPath() must be used to convert
+ filenames to URLs, trying to fix #111088
+
+Wed Apr 23 09:35:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/libxml.py: applied patch from
+ Brent M Hendricks adding binding for xmlCatalogAddLocal
+
+Tue Apr 22 15:18:01 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: tried to fix #98879 again in a more solid
+ way.
+
+Tue Apr 22 13:58:43 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/libxml2.def.src: added more exports from the relaxng and
+ xmlreader clan
+
+Tue Apr 22 10:35:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c test/valid/ns* test/result/ns*: applied the patch
+ provided by Brent Hendricks fixing #105992 and integrated the
+ examples in the testsuite.
+
+Tue Apr 22 01:06:09 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * TODO: updated a bit
+ * configure.in: fixed the comment, threads now default to on
+ * parserInternals.c: fixed an erroneous xmlMallocAtomic() call
+
+Mon Apr 21 23:33:38 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c
+ xmlreader.c include/libxml/parser.h: a lot of performance work
+ especially the speed of streaming through the reader and push
+ interface. Some thread related optimizations. Nearly doubled the
+ speed of parsing through the reader.
+
+Sun Apr 20 10:36:05 MDT 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml
+ * doc/xmllint.1
+ update man page to explain use of --stream
+
+Sat Apr 19 02:03:24 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c
+ nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c
+ xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c
+ include/libxml/globals.h include/libxml/xmlmemory.h: added
+ xmlMallocAtomic() to be used when allocating blocks which
+ do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet()
+ to allow registering the full set of functions needed by
+ a garbage collecting allocator like libgc, ref #109944
+
+Fri Apr 18 16:37:41 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: switched to have thread support enabled by default,
+ didn't got troubles with ABI compatibility on Linux, hope it
+ won't break on strange OSes, if yes, report the system ID
+ * doc/libxml2-api.xml: just rebuilt the API
+
+Fri Apr 18 14:31:15 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c:
+ added support for large file, tested with a 3+GB instance,
+ and some cleanup.
+ * catalog.c: added a TODO
+ * Makefile.am: added some "make tests" comments
+
+Thu Apr 17 14:51:57 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: some cleanups
+ * doc/xmlreader.html: extended the document to cover RelaxNG and
+ tree operations
+ * python/tests/Makefile.am python/tests/reader[46].py: added some
+ xmlReader example/regression tests
+ * result/relaxng/tutor*.err: updated the output of a number of tests
+
+Thu Apr 17 11:35:37 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: valgrind pointed out an uninitialized variable error.
+
+Thu Apr 17 11:06:28 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/relaxng.h relaxng.c include/libxml/xmlreader.h
+ xmlreader.c: augnemting the APIs, cleanups.
+ * parser.c: cleanup bug #111005
+ * xmlIO.c: added some missing comments
+
+Wed Apr 16 17:46:50 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmllint.c: more work on RelaxNG streaming validation
+ trying to improve the subset compiled, and more testing.
+ * doc/downloads.html doc/xml.html doc/xmlmem.html: some updates on the
+ documentation
+ * test/relaxng/tutor11_1_3.xml: fixes the DTD path
+ * result/relaxng/*.err: fix some of the outputs
+
+Wed Apr 16 01:28:15 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlreader.c xmllint.c include/libxml/relaxng.h
+ include/libxml/xmlreader.h: implemented streaming of
+ RelaxNG (when possible) on top of the xmlReader interface,
+ provided it as xmllint --stream --relaxng .rng .xml
+ This seems to mostly work.
+ * Makefile.am: updated to test RelaxNG streaming
+
+Mon Apr 14 18:08:33 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c include/libxml/relaxng.h: integrated the regexp
+ based validity checking of fragments of the document for
+ which the RNG can be compiled to regexps. Works on all regression
+ tests, only fix needed is related to error messages.
+
+Sun Apr 13 21:51:00 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlregexp.c include/libxml/xmlautomata.h
+ include/libxml/xmlregexp.h: Starting work precompiling
+ parts of RelaxNG schemas. Not plugged onto validity checking
+ yet, just the regexp building part. Needed to extend some
+ of the automata and regexp APIs.
+
+Fri Apr 11 21:36:21 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c xmlreader.c include/libxml/xmlreader.h: make sure
+ xmllint --stream and xmllint --stream --valid returns errors
+ code appropriately
+
+Fri Apr 11 10:59:24 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h: Added the Expand()
+ and Next() operation to work on subtrees within the reader
+ framework.
+ * doc/libxml2-api.xml python/libxml2class.txt: resulting updates
+ * python/tests/reader5.py: added an example for those new
+ functions of the reader.
+
+Thu Apr 10 23:38:13 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: patch from Vasily Tchekalkin to fix #109865
+
+Thu Apr 10 15:32:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixing HasValue for namespace as raised by
+ Denys Duchier
+
+Wed Apr 9 14:07:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c include/libxml/HTMLparser.h: exported
+ htmlCreateMemoryParserCtxt() it was static
+
+Wed Apr 9 13:21:48 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemas.h:
+ update from Charles Bozeman for date and duration types
+ * test/schemas/date_0.* test/schemas/dur_0.*
+ result/schemas/date_0.* result/schemas/dur_0.*: updated too
+
+Mon Apr 7 12:19:26 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c valid.c xpath.c include/libxml/tree.h include/libxml/valid.h:
+ fixing bug #107129, removing excessive allocation and calls
+ to *printf in the code to build QName strings.
+
+Sat Apr 5 11:41:36 CEST 2003 Igoe Zlatkovic <igor@zlatkovic.com>
+
+ * win32/libxml2.def.src: fixed conditional exports, reported by
+ Luke Murray.
+
+Fri Apr 4 18:08:00 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a possible problem with xmlRecoverMemory()
+
+Thu Apr 3 17:24:44 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * trio.c trio.h triodef.h trionan.c trionan.h triop.h triostr.c
+ triostr.h: Bjorn sent an update for the TRIO portability layer.
+
+Tue Apr 1 21:57:26 CEST 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/libxml2.def.src: exported new functions
+
+Tue Apr 1 13:09:46 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS: preparing release 2.5.6
+ * doc/*: updated and rebuilt the docs
+
+Tue Apr 1 11:52:15 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixed an uninitialized memory access pointed by valgrind
+ on C14Ntests
+
+Tue Apr 1 00:12:28 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: one more fixup of error message reporting
+
+Mon Mar 31 18:36:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on bug #109225, and fixed an uninitialized
+ variable pointed out by valgrind
+
+Mon Mar 31 18:05:22 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: try to work on bug #109225 and provide better
+ error reports.
+ * result/relaxng/* : this change the output of a number of tests
+ * xinclude.c: fixing the parsed entity redefinition problem
+ raised on the list.
+ * test/schemas/date_0.xsd: updated the date test c.f. E2-12
+
+Mon Mar 31 13:19:04 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: fixed date comparison to handle the tzo
+ The only failures left are disagreements on Notations and
+ '+1' not being allowed for ulong, uint, ushort and ubyte.
+
+Mon Mar 31 12:11:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: fixed gMonth parsing routine accordingly
+ to the XML Schemas errata
+ http://www.w3.org/2001/05/xmlschema-errata#e2-12
+
+Sun Mar 30 23:04:18 CEST 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlschemastypes.c: more work on XML Schemas datatypes
+ and facets support. Currently only schemas with binHex or
+ base64 don't compile. A few error left in the test suite:
+ found 1035 test instances: 919 success 23 failures
+ most are gdate or gdateyear failing check, and a few cases where
+ James clark tests results are strange.
+ * valid.c: allow to reuse the Notation checking routine without
+ having a validation context.
+ * SAX.c: removed a #if 0
+
+Sat Mar 29 17:35:05 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: forgot to apply one check from #106931 patch
+ * xmlschemastypes.c: more work on XML Schemas datatypes
+
+Sat Mar 29 11:49:25 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c include/libxml/relaxng.h xmlschemastypes.c: more work
+ on cleaning up XML Schemas datatypes based on James Clark tests
+ test/xsdtest/xsdtest.xml
+
+Fri Mar 28 14:24:08 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: implemented comparisons for Schemas values.
+ * xmlschemastypes.c include/libxml/xmlschemastypes.h: fixed
+ some bugs in duration handling, comparisons for durations
+ and decimals, removed all memory leaks pointed out by James
+ testsuite. Current status is now
+ found 238 test schemas: 197 success 41 failures
+ found 1035 test instances: 803 success 130 failures
+
+Fri Mar 28 00:41:55 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/xmlschemas.h: fixed bugs and memory
+ leaks in the W3C XML Schemas code
+ * xmlschemastypes.c: implemented nonPositiveInteger
+ * test/schemas/length2_0.xsd result/schemas/length2_0_0.err:
+ fixed the test and result.
+
+Thu Mar 27 22:23:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c tree.c: two patches from James Bursa on the HTML
+ parser and a typo
+ * xmlschemastypes.c: reindenting, fixing a memory access
+ problem with dates.
+
+Thu Mar 27 15:53:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing #109227 providing more context in case of
+ start/end tag mismatch
+ * python/tests/ctxterror.py python/tests/readererr.py: update the
+ tests accordingly
+
+Thu Mar 27 15:22:41 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: should fix #109327 errors on memory accesses
+
+Thu Mar 27 15:06:13 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: Fixed reopening of #78662 <form action="...">
+ is an URI reference
+
+Wed Mar 26 22:38:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed bug #109160 on non-ASCII IDs
+
+Wed Mar 26 17:30:37 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Norm suggested a nicer error message for xml:space values
+ errors
+
+Wed Mar 26 01:34:19 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c include/libxml/xpath.h: first part of the fix to
+ performance bug #108905, adds xmlXPathOrderDocElems() providing
+ document order for nodes.
+ * python/libxml.c: Python may require TRIO as Albert Chin pointed out
+
+Tue Mar 25 16:07:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: removing a warning with Sun compiler
+ bug #109154
+
+Tue Mar 25 07:02:56 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml
+ * doc/xmllint.1
+ update xmllint man page with --relaxng option
+
+Tue Mar 25 12:07:03 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/setup.py.in : was missing "drv_libxml2.py"
+
+Mon Mar 24 19:38:05 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c xpath.c: some changes related to the new way of
+ handling Result Value Tree, before 2.5.5
+
+Mon Mar 24 16:36:23 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS: preparing release 2.5.5
+ * doc/* : updated the documentation and regenerated it.
+
+Mon Mar 24 14:56:01 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed some problems related to #75813 about handling
+ of Result Value Trees
+
+Sun Mar 23 22:57:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied a set of patches from Lorenzo Viali correcting
+ URI parsing errors.
+
+Sun Mar 23 22:00:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: validity status was not passed back when validating in
+ entities, but raised by Oliver Fischer
+
+Sun Mar 23 21:30:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: avoid escaping ',' in URIs
+
+Sun Mar 23 12:57:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug #108976 get the ID/REFs to reference
+ the ID in the document content and not in the entity copy
+ * SAX.c include/libxml/parser.h: more checking of the ID/REF
+ stuff, better solution for #107208
+ * xmlregexp.c: removed a direct printf, dohhh
+ * xmlreader.c: fixed a bug on streaming validation of empty
+ elements in entities
+ * result/VC/ElementValid8 test/VCM/v20.xml result/valid/xhtml1.xhtml:
+ cleanup of the validation tests
+ * test/valid/id* test/valid/dtds/destfoo.ent result/valid/id*:
+ added more ID/IDREF tests to the suite
+
+Sat Mar 22 23:38:08 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed #107043 removing 2 warnings with Sun One
+ compiler.
+
+Sat Mar 22 18:50:45 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: valgrind'ed and cleaned up a couple of memory issues.
+
+Sat Mar 22 16:15:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fix bug #107208 avoid false duplicates when ID/REFs are
+ defined in entities content
+
+Sat Mar 22 15:53:27 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: Fixed validation bug #108858 on namespace names using
+ entities and reported by Brent Hendricks
+ * xmllint.c: report xmlTextReaderHasValue() result in --stream
+ --debug output.
+
+Sat Mar 22 13:32:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed bug #108801 reported by Malcolm Tredinnick
+ about the DocType node not being reported sometimes.
+ * python/tests/reader.py: added to test to the regression checks
+
+Sat Mar 22 01:57:40 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed bug #108546 on long CDATA (or text nodes)
+ reported by Edd Dumbill
+
+Sat Mar 23 01:00:24 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c parser.c parserInternals.c: patch from
+ johan@evenhuis.nl for #107937 fixing some line counting
+ problems, and some other cleanups.
+ * result/HTML/: this result in some line number changes
+
+Fri Mar 21 22:19:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec
+ instead of libxml.spec
+ * relaxng.c: fixed some of the error reporting excessive
+ verbosity
+ * catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c
+ xmlschemastypes.c: removed some warnings from gcc
+ * doc/libxml2-api.xml: rebuilt
+
+Fri Mar 21 17:25:23 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: another optimization, for choice this time
+ * result/relaxng/spec1* result/relaxng/tutor12_1*
+ result/relaxng/tutor3_7: cleanups.
+
+Fri Mar 21 13:41:23 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed xmlRelaxNGNodeMatchesList
+ * test/relaxng/testsuite.xml: augmented the test suite
+ * result/relaxng/spec1* result/relaxng/tutor12_1*: this fixes
+ some schemas validation tests in the presence of foreign
+ namespaces.
+
+Fri Mar 21 02:23:34 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: added another interleave speedup.
+
+Thu Mar 20 17:22:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: added integer and fixed one of the
+ IDREFS regression tests pbm
+ * result/relaxng/docbook_0.err: updated
+
+Wed Mar 19 21:58:47 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S)
+ declared both in the DTD and in the Schemas <grin/>
+ * relaxng.c: more debug, added a big optimization for <mixed>
+ * test/relaxng/testsuite.xml: augmented the testsuite
+ * test/relaxng/ result/relaxng: added the RelaxNG spec and a
+ DocBook example to the regression tests
+
+Wed Mar 19 11:34:10 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xsddata-test-suite.py: cosmetic change for output
+ * relaxng.c: try to minimize calls to malloc/free for states.
+
+Tue Mar 18 17:50:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: removed a warning
+ * xmlschemastypes.c: more cleanup, added ENTITY and ENTITIES
+ support
+ * check-relaxng-test-suite.py check-xsddata-test-suite.py:
+ cleanup/improvements of the regression tests batch
+ * test/relaxng/testsuite.xml: augmented libxml2 own testsuite
+
+Tue Mar 18 12:36:22 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed error msg cleanup deallocation
+ * xmlschemastypes.c: added a function to handle lists of
+ atomic types, added support for IDREFS
+
+Tue Mar 18 01:28:15 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c valid.c xmlschemastypes.c: added Datatype ID
+ and IDREF, usable from RelaxNG now
+ * include/libxml/xmlschemastypes.h: need to add a new interface
+ because the validation modifies the infoset
+ * test/relaxng/testsuite.xml: extended the testsuite
+
+Mon Mar 17 16:34:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed the last core RelaxNG bug known #107083,
+ shemas datatype ID/IDREF support still missing though.
+ * xmlreader.c: fix a crashing bug with prefix raised by
+ Merijn Broeren
+ * test/relaxng/testsuite.xml: augmented the testsuite with
+ complex inheritance tests
+
+Sun Mar 16 18:45:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: switched back to the previous Relax-NG code base,
+ the derivation algorithm need severe constraining code to avoid
+ combinatorial explosion. Fixed the problem with Sebastian Rahtz
+ TEI based example and other bugs
+ * result/relaxng/*err: updated the results
+ * test/relaxng/testsuite.xml: started a new test suite
+
+Sat Mar 15 22:26:46 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c include/libxml/relaxng.h: After coming to the conclusion
+ that the original RelaxNG validation code was un-fixeable, it got
+ rewritten to use the derivation algorithm from James Clark and
+ redebugged it (nearly) from scratch:
+ found 373 test schemas: 372 success 1 failures
+ found 529 test instances: 529 success 0 failures
+
+Tue Mar 11 12:08:23 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c parser.c: fix some recursion problems introduced in the
+ last release.
+ * relaxng.c: more debugging of the RNG validation engine, still
+ problems though.
+
+Mon Mar 10 14:10:47 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: stop generating wrong result file with * in name
+ * relaxng.c: fixing the include bug raised by Sebastian Rahtz
+ * result/relaxng/demo* test/relaxng/demo: added the tests from
+ Sebastian reproducing the problem.
+
+Sun Mar 9 18:02:31 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.1: regenerating man page from xmllint.xml to pick
+ up Aleksey's change
+
+Sun Mar 9 13:53:16 2003 Aleksey Sanin <aleksey@aleksey.com>
+
+ * xmllint.c doc/xmllint.xml: use $XMLLINT_INDENT environment
+ variable to control the indentation for the xmllint "--format"
+ option
+
+Sat Mar 8 14:27:43 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * encoding.c: applied Gennady's patch against buffer overrun
+
+Fri Mar 7 19:29:40 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * test/xsdtest/xsdtest.xml uri.c: after and exchange with James
+ Clark it appeared I had bug in URI parsing code ...
+ * relaxng.c include/libxml/relaxng.h: completely revamped error
+ reporting to not loose message from optional parts.
+ * xmllint.c: added timing for RNG validation steps
+ * result/relaxng/*: updated the result, all error messages changed
+
+Fri Mar 7 15:18:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fix bug #107804, the algorithm used for document order
+ computation was failing on attributes.
+
+Thu Mar 6 22:35:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fix bug #107764 , possibility of buffer overflow
+ in xmlValidDebug()
+
+Wed Mar 5 17:41:37 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c include/libxml/nanoftp.h: adding xmlNanoFTPDele()
+ from Philipp Dunkel
+
+Wed Mar 5 10:57:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastype.c: made powten array static it should not be exported
+ * HTMLparser.c: fix bug #107361 by reusing the code from the XML
+ parser function.
+ * testHTML.c: get rid of valgrind messages on the HTML SAX tests
+
+Fri Feb 28 00:23:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed a node dump crash on attributes
+ * test/xsdtest/xsdtest.xml test/xsdtest/xsdtest.xsl: fixed
+ an URI test bug and get better output.
+
+Thu Feb 27 22:28:40 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xsddata-test-suite.py: give more infos
+ * relaxng.c: fix a bug reported by Sebastian Rahtz and
+ REF->DEF in attribute values.
+
+Thu Feb 27 21:09:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xsddata-test-suite.py test/xsdtest/xsdtest.xml
+ test/xsdtest/xsdtest.xsl: import of the XSD Datatype
+ regression tests from James Clark.
+
+Thu Feb 27 18:40:04 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c xmlschemas.c xmlschemastypes.c
+ include/libxml/xmlschemastypes.h: added param support for relaxng
+ type checking, started to increment the pool of simple types
+ registered, still much work to be done on simple types and
+ facets checkings.
+
+Wed Feb 26 16:45:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: fixes again one of the problem raised by
+ James Clark in #106788
+
+Wed Feb 26 15:46:48 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: Fixed a couple of problem raised by James Clark
+ in bug #107083, the support for ID/IDREF/IDREFS at the WXS
+ datatype level still not fixed though.
+
+Mon Feb 24 21:09:19 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing release 2.5.4
+ * doc/*: updated and rebuilt the docs
+ * relaxng.c: removed warnings
+ * result/relaxng/*: updated the results
+
+Mon Feb 24 20:53:17 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixes a DTD regexp generation problem.
+
+Mon Feb 24 20:12:57 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixes bug #105998 about false detection of
+ attribute consumption loop.
+
+Mon Feb 24 19:14:57 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: Fixes bug #106931 in XInclude entities merging.
+
+Mon Feb 24 18:50:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixed bug #105992
+
+Mon Feb 24 18:14:16 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed xmlSetProp and al. when the node passed is not an
+ element.
+ * relaxng.c: fixed bugs 7.3 (though not complete) and memory leaks
+ found 373 test schemas: 369 success 4 failures
+ found 529 test instances: 525 success 4 failures
+ * check-relaxng-test-suite.py: added memory debug reporting
+
+Mon Feb 24 12:41:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c parser.c: some warning removal on Igor's patch
+ * tree.c: seems I messed up with #106788 fix
+ * python/libxml.c: fixed some base problems when Python provides
+ the resolver.
+ * relaxng.c: fixed the interleave algorithm
+ found 373 test schemas: 364 success 9 failures
+ found 529 test instances: 525 success 4 failures
+ the resulting failures are bug in the algorithm from 7.3 and
+ lack of support for params
+
+Sun Feb 23 14:49:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: another fix for nodeinfo in entities problem
+ * tree.c entities.c: fixed bug #106788 from James Clark
+ some spaces need to be serialized as character references.
+
+Sat Feb 22 18:28:16 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * parser.c uri.c: fixed the bug I introduced in the path
+ handling, reported by Sebastian Bergmann
+
+Sat Feb 22 00:19:48 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing some nodeinfo in entities problem raised
+ by Glenn W. Bach
+ * relaxng.c: implemented the first section 7.3 check
+ * result/relaxng/*: updated the results
+
+Fri Feb 21 18:12:19 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: fixed some problems in the previous commit
+ and finished implementing 4.16 rules checking
+ found 373 test schemas: 353 success 20 failures
+ found 529 test instances: 519 success 6 failures
+ * result/relaxng/*: updated the results
+
+Fri Feb 21 16:37:39 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: implemented checks from section 7.2
+
+Thu Feb 20 16:00:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: implemented the checks from section 7.1, fixed
+ some of the 4.20 and 4.21 problems.
+ found 373 test schemas: 338 success 35 failures
+ found 529 test instances: 519 success 6 failures
+ * result/relaxng/*: updated the results
+
+Thu Feb 20 01:09:24 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: implemented the 4.20 and 4.21 simplification rules.
+ * result/relaxng/*: updated the results
+
+Wed Feb 19 18:30:30 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more bugfixes
+ * result/relaxng/*: updated the results
+
+Wed Feb 19 15:39:56 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * DOCBparser.c: obsoleted xmlNormalizeWindowsPath
+ * HTMLparser.c: obsoleted xmlNormalizeWindowsPath
+ * SAX.c: ensured xmlDoc.URL is always canonic
+ * parser.c: obsoleted xmlNormalizeWindowsPath
+ * uri.c include/libxml/uri.h: introduced xmlCanonicPath
+ * xmlIO.c include/libxml/xmlIO.h: obsoleted xmlNormalizeWindowsPath
+ * win32/libxml2.def.src: added few exports
+
+Wed Feb 19 14:26:51 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in: patched to have shared libraries
+ for Python regression tests and static binaries for gdb debug
+ in my development environment
+ * relaxng.c: more bugfixes
+ found 373 test schemas: 296 success 77 failures
+ found 529 test instances: 516 success 8 failures
+ * result/relaxng/*: updated the results
+
+Wed Feb 19 01:17:48 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: guess what ! Relax-NG bugfixing, what a surprize...
+
+Tue Feb 18 22:09:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: float/double check bugfix
+ * tree.c include/libxml/tree.h: exported a function for NMTOKEN
+ validation
+ * xmlreader.c: add a TODO for Jody
+ * relaxng.c: bugfix bugfix bugfix
+ found 373 test schemas: 300 success 73 failures
+ found 529 test instances: 507 success 10 failures
+ * result/relaxng/*: updated the results
+
+Tue Feb 18 00:33:17 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c check-relaxng-test-suite.py: more RelaxNG bug hunting
+
+Mon Feb 17 18:23:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c check-relaxng-test-suite.py: more work on the
+ RelaxNG implementation conformance testing.
+ found 373 test schemas: 284 success 89 failures
+ found 529 test instances: 448 success 47 failures
+ * result/relaxng/*: updated the results
+
+Sun Feb 16 16:48:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * ChangeLog tree.c doc/libxml-doc.el doc/libxml2-api.xml: applied
+ a patch from Kjartan Maraas to fix some typos
+
+Sun Feb 16 16:40:52 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more bug-hunting
+ * testRelax.c include/libxml/relaxng.h: added --tree to dump the
+ intermediate rng tree
+ * python/generator.py: patch from Stéphane Bidoul to fix the generator
+ on python < 2.2
+
+Fri Feb 14 17:49:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-relaxng-test-suite.py relaxng.c: more testing on the
+ Relax-NG front, cleaning up the regression tests failures
+ current state and I forgot support for "mixed":
+ found 373 test schemas: 280 success 93 failures
+ found 529 test instances: 401 success 68 failures
+ * tree.c include/libxml/tree.h xmlschemastypes.c: finished and
+ moved the Name, NCName and QName validation routine in tree.c
+ * uri.c: fixed handling of URI ending up with #, i.e. having
+ an empty fragment ID.
+ * result/relaxng/*: updated the results
+
+Thu Feb 13 16:49:24 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xinclude-test-suite.py: improved the script accordingly
+ to the XInclude regression tests updates
+ * xpointer.c: Implemented XPointer element() Scheme W3C PR of 13
+ November 2002
+ * result/XPath/xptr/chapterschildseq result/XPath/xptr/vidchildseq
+ test/XPath/xptr/chapterschildseq test/XPath/xptr/vidchildseq:
+ augmented the Xpointer testsuite for the element() scheme
+
+Thu Feb 13 12:00:30 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: added TODO for the DTD compatibility spec
+ * xinclude.c: more bug fixes driven by the testsuite
+
+Tue Feb 11 19:01:02 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * check-xinclude-test-suite.py xinclude.c: Work on the W3C/NIST
+ regression tests for XInclude, improved the script, improving
+ XInclude error reporting mechanism
+
+Mon Feb 10 17:19:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/* configure.in: preparing release 2.5.3
+
+Mon Feb 10 17:11:22 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: trying to fix #104934 about some XHTML1 serialization
+ issues.
+
+Mon Feb 10 16:41:13 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c xmlIO.c: fixing bug #104646 about iconv based
+ encoding conversion when the input buffer stops in the
+ middle of a multibyte char
+
+Mon Feb 10 15:24:47 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * test/relaxng/OASIS/spectest.xml: OASIS RelaxNG testsuite
+ * check-relaxng-test-suite.py: python script to run regression
+ against OASIS RelaxNG testsuite
+ * relaxng.c: some cleanup tweaks
+ * HTMLparser.c globals.c: cleanups in comments
+ * doc/libxml2-api.xml: updated the API
+ * result/relaxng/*: errors moved files, so large diffs but
+ no changes at the semantic level.
+
+Mon Feb 10 01:00:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixing #105678 problem when dumping a namespace node.
+
+Mon Feb 10 00:30:01 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed doc comment problems
+ * python/generator.py python/libxml_wrap.h python/types.c: adding
+ RelaxNG wrappers
+ * python/tests/Makefile.am python/tests/relaxng.py: added a specific
+ test of those early Python RelaxNG bindings
+
+Sun Feb 9 15:18:43 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fixes a libtool problem on AMD 64bits builds
+ * relaxng.c: found the validation problem I had with interleave
+ when not covering all remaining siblings
+ * Makefile.am test.relaxng/* result/relaxng/*: augmented the
+ testsuite and check the RNG schemas against the RNG schemas
+ given in appendix A
+
+Sat Feb 8 18:55:43 CET 2003 Igor Zlatkovic <igor@zlatkovic.com>
+
+ * win32/Makefile.msvc: updates for RelaxNG
+ * win32/Makefile.mingw: updates for RelaxNG
+ * win32/libxml2.def.src: added RelaxNG exports
+
+Fri Feb 7 14:00:53 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: applied another bug fix from Sean Chittenden
+
+Fri Feb 7 13:34:08 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xmllint.c: I f...ed up the default configuration
+ of schemas and --relaxng option display in xmllint, pointed by
+ Morus Walter.
+ * xlink.c: Sean Chittenden pointed a couple of errors in the XLink
+ detection module, fixes bug #105374.
+
+Fri Feb 7 01:43:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: added the boolean base type.
+
+Thu Feb 6 10:23:52 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: started implementing some of the missing
+ default simple types
+ * result/relaxng/*: updated the results
+
+Wed Feb 5 15:28:04 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/*: updated the docs, ready for 2.5.2 release
+
+Wed Feb 5 14:15:59 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c tree.c xmlIO.c: comments cleanups
+ * Makefile.am: use xmllint for doing the RelaxNG tests
+ * configure.in: preparing 2.5.2 made schemas support default to
+ on instead of off
+ * relaxng.c: removed the verbosity
+ * xmllint.c: added --relaxng option
+ * python/generator.py python/libxml_wrap.h: prepared the integration
+ of the new RelaxNG module and schemas
+ * result/relaxng/*: less verbose output
+
+Wed Feb 5 12:00:36 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: do not run content model validation if the
+ content is not determinist
+
+Wed Feb 5 11:43:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: added the redefinition of namespaced attribute
+ check that was missing as Fabrice Desré pointed out.
+
+Wed Feb 5 11:09:29 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c include/libxml/HTMLparser.h: applied HTML
+ improvements from Nick Kew, allowing to do more checking
+ to HTML elements and attributes.
+
+Tue Feb 4 23:47:06 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fixing bug #105137 about entities declaration
+ needing to be copied to the including document.
+
+Tue Feb 4 20:26:22 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed bug #104817 with delegateURI
+ * xpath.c: fixing bugs #104123 and #104125
+
+Tue Feb 4 17:12:56 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in valid.c xmlreader.c python/libxml_wrap.h
+ python/types.c: fixing #104096 to compile without regexps
+
+Tue Feb 4 16:31:55 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixing bug #103969 forgot to add an epsilon transition
+ when building the automata for elem*
+
+Tue Feb 4 16:21:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: applied patch from Arne de Bruijn fixing
+ bug #103827
+
+Tue Feb 4 16:17:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: updating a comment, fixing #103776
+
+Tue Feb 4 16:05:53 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug 105049 for validity checking of content
+ within recursive entities.
+
+Tue Feb 4 15:40:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: try to fix # 105049
+ * relaxng.c xmlschemastypes.c: a couple of changes and extensions
+ * tree.c: updated a function comment
+
+Tue Feb 4 00:20:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng: more work on grammars and refs/defs
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Mon Feb 3 14:16:59 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng: more work on name classes, except support
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Mon Feb 3 11:56:05 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng: more work on name classes, the "validate all" schemas
+ seems to work now.
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Mon Feb 3 09:50:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: removed an unprotedted debug message Aleksi Suhonen
+ * parser.c: put a guard against infinite document depth, basically
+ trying to avoid another kind of DoS attack.
+ * relaxng.c: some code w.r.t. nameClasses
+
+Sun Feb 2 17:01:43 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * test/relaxng/* result/relaxng/*: check all the namespace support
+ was actually correct based on tutorial section 10.
+
+Sun Feb 2 15:33:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng: include seems to work okay now
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Sat Feb 1 19:44:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: a bit of work done in the train back.
+ * test/relaxng/*: added one of the include tests
+
+Thu Jan 30 14:06:55 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng: more work done in the train
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Wed Jan 29 23:44:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: debugging of externalRef
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Wed Jan 29 22:06:04 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG, implementing externalRef
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+ * Makefile.am: cleanup to Relaxtests target
+
+Wed Jan 29 00:08:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG, implementing interleave
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Tue Jan 28 21:56:49 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG, implementing interleave
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Mon Jan 27 07:35:29 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/customfo.xsl
+ * doc/tutorial/customhtml.xsl
+ adding stylesheet customizations used to generate fo
+ for pdf and html
+
+Mon Jan 27 13:29:43 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+ * xmlschemastypes.c: added a number of base type definition but not
+ the associated checks, those are still TODOs
+
+Sun Jan 26 17:37:06 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ in docs/tutorial:
+ * apa.html
+ * apb.html
+ * apc.html
+ * apd.html
+ * ape.html
+ * apf.html
+ * apg.html
+ * ar01s02.html
+ * ar01s03.html
+ * ar01s04.html
+ * ar01s05.html
+ * ar01s06.html
+ * ar01s07.html
+ * ar01s08.html
+ * index.html
+ * xmltutorial.pdf
+ * xmltutorial.xml
+ add index to tutorial
+
+Sun Jan 26 17:02:29 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog.1
+ * doc/xmlcatalog_man.html
+ * doc/xmlcatalog_man.xml
+ belatedly fixing bug #93622 (adds rewriteURI type to
+ "--add" option in xmlcatalog man page
+
+Sun Jan 26 20:47:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c xmllint.c: applied patch for NetBSD by
+ Julio Merino, closing #104475
+
+Sun Jan 26 20:38:43 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Sun Jan 26 01:49:58 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Sat Jan 25 18:59:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * README: updated the policy on private mail answers
+ * relaxng.c: more work on Relax-NG
+ * test/relaxng/* result/relaxng/*: augmented/updated the
+ regression tests
+
+Fri Jan 24 15:12:44 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * error.c parser.c tree.c: applied a documentation patch from
+ Stefan Kost
+
+Fri Jan 24 02:00:50 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * relaxng.c: more work on Relax-NG
+ * doc/*: regenerated the docs
+ * test/relaxng/* result/relaxng/*: updated and augmented the
+ Relax-NG regression tests and results
+
+Thu Jan 23 19:26:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in relaxng.c include/libxml/relaxng.h:
+ First commit of the new Relax-NG validation code, not generally
+ useful yet.
+ * test/relaxng/* result/relaxng/*: current state of the regression
+ tests
+
+Thu Jan 23 19:22:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: minimized the memory allocated for GetContent
+ and a bit of cleanup.
+
+Thu Jan 23 17:41:37 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: seems there is no good reasons to
+ not generate bindings for XPointer
+
+Tue Jan 21 13:19:35 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c doc/apibuild.py: applied a new patch from
+ Stéphane Bidoul for cleanups
+ * doc/libxml2-api.xml: rebuilt the API description with
+ new entry points
+
+Mon Jan 20 23:25:00 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/drv_libxml2.py python/generator.py
+ python/libxml.c python/libxml.py python/libxml_wrap.h
+ python/types.c: patch from Stéphane Bidoul for better per
+ context error message APIs
+ * python/tests/ctxterror.py python/tests/readererr.py:
+ update of the tests
+
+Sun Jan 19 17:09:28 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/guidelines.html
+ grammar and spelling cleanup
+
+Fri Jan 17 00:31:30 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h python/generator.py
+ python/libxml.c python/libxml.py win32/libxml2.def.src: applied
+ a patch from Stéphane Bidoul to allow per XMLtextReader error
+ and warning handling
+ * python/tests/Makefile.am python/tests/readererr.py: adding the
+ specific regression test
+
+Tue Jan 14 17:00:08 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: Alexey Efimov pointed out that concat('a', 'b', )
+ should raise a syntax error
+
+Tue Jan 14 15:39:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: cleanup patch from Stéphane Bidoul
+
+Tue Jan 14 14:41:18 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fixing bug #103100 with a dummy UTF8ToUTF8 copy
+
+Tue Jan 14 12:40:29 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml.py
+ python/libxml_wrap.h python/types.c: applied and fixed a patch
+ from Stéphane Bidoul to provide per parser error handlers at the
+ Python level.
+ * python/tests/Makefile.am python/tests/ctxterror.py: added a
+ regression test for it.
+
+Tue Jan 14 01:15:04 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: fixed the streaming property of the reader,
+ it was generating tree faster than consuming it. Pointed out
+ by Nate Myers
+ * tree.c: fixed a bug in xmlSaveFormatFileEnc if passed a NULL doc
+
+Sun Jan 12 22:18:02 CET 2003 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: added more xmlreader and other exports
+
+Fri Jan 10 18:04:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fix to the XPath implementation for parent and
+ ancestors axis when operating on a Result Value Tree.
+ Fixes bug #100271
+
+Fri Jan 10 17:07:01 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c nanohttp.c xmlIO.c: patch from Stefano Zacchiroli
+ to fix some URI/file escaping problems
+
+Fri Jan 10 16:20:34 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: fixed a bug raised by Raymond Wiker,
+ docSetRootElement() should not raise an exception if the
+ return is None
+
+Fri Jan 10 14:13:03 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py python/libxml.c python/libxml2-python-api.xml:
+ fixed bug #102181 by applying the suggested change and fixing
+ the generation/registration problem.
+
+Fri Jan 10 13:47:55 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed bug #102960 by reusing the XML name parsing
+ routines.
+
+Fri Jan 10 00:16:49 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: one more IsEmptyElement crazyness, that time in
+ external parsed entities if substitution is asked.
+ * python/tests/reader3.py: added a specific test.
+
+Thu Jan 9 22:35:31 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/drv_libxml2.py: update from Stéphane Bidoul: python 2.1
+ support and improved error handler registration
+
+Thu Jan 9 14:16:38 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c tree.c: fixes #102920 about namespace handling in
+ HTML output and section 16.2 "HTML Output Method" of XSLT-1.0
+ * README: fixed a link
+
+Wed Jan 8 18:32:25 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* NEWS: preparing 2.5.1 release
+ * SAX.c parser.c: fixing XmlTextReader bug
+
+Wed Jan 8 00:13:01 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fuck, I introduced a memory leak on external parsed
+ entities in 2.5.0 :-(
+
+Tue Jan 7 12:12:45 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: another fix needed as pointed by Christophe Merlet
+ for --stream --debug if compiled without debug support.
+
+Mon Jan 6 20:53:08 MST 2003 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml
+ * doc/xmllint.1:
+ update man page with --stream and --chkregister
+
+Tue Jan 7 01:17:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: fixed --with-threads compile
+ * xmllint.c: fixed --without-debug compile
+ * include/libxml/globals.h: cleanup
+ * include/libxml/schemasInternals.h: add a missing include
+
+Mon Jan 6 14:06:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in NEWS: preparing 2.5.0 release
+ * SAX.c: only warn in pedantic mode about namespace name
+ brokeness
+ * globals.c: fix a doc generation problem
+ * uri.c: fix #101520
+ * doc/*: updated and rebuilt the doc for the release, includuding
+ stylesheet update
+ * python/Makefile.am: fix a filename bug
+
+Mon Jan 6 12:05:12 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/tutorial/* : fixed #101894 if doc == NULL xmlFreeDoc
+ should not be called.
+
+Mon Jan 6 11:59:09 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml-2.0.pc.in: applied the patch to fix #101894
+
+Sun Jan 5 23:35:47 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c : applied patch from Lukas Schroeder for register callbacks
+ * valid.c: modified patch from Lukas Schroeder to test
+ register callbacks with --chkregister
+
+Sun Jan 5 02:23:20 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: seriously changed the way data are pushed to
+ the underlying parser, go by block of 512 bytes instead of
+ tryng to detect tag boundaries at that level. Changed the
+ way empty element are detected and tagged.
+ * python/tests/reader.py python/tests/reader2.py
+ python/tests/reader3.py: small changes mostly due to context
+ reporting being different and DTD node being reported. Some
+ errors previously undetected are now caught and fixed.
+ * doc/xmlreader.html: flagged last section as TODO
+
+Sat Jan 4 20:40:28 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: integrated the Python 2.2 optimizations
+ from Hannu Krosing, while maintaining compatibility with
+ 1.5 and 2.1
+
+Sat Jan 4 17:33:17 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: a bit of cleanup
+ * xmlreader.c: small fix
+ * doc/xmlreader.html: more work on the XmlTextReader tutorial
+ * python/libxml.py: a few fixes pointed out by Hannu Krosing
+
+Sat Jan 4 13:46:14 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * python/setup.py.in: patch from Stéphane Bidoul to include
+ drv_libxml2.py in setup.py
+
+Sat Jan 4 01:43:06 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmlreader.html: starting documenting the new XmlTextReader
+ interface.
+
+Fri Jan 3 17:18:32 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added the --stream flag to use the TextReader API
+ * xmlreader.c: small performance tweak
+
+Fri Jan 3 13:50:55 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader2py: okay the DTD validation
+ code on top of the XMLTextParser API should be solid now.
+
+Fri Jan 3 02:17:18 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader2py: Fixing some more mess
+ with validation and recursive entities while using the
+ reader interface, it's getting a bit messy...
+
+Thu Jan 2 15:15:26 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: another couple of problem
+ related to IsEmptyElement reported by Stéphane Bidoul needed
+ some fixes.
+
+Thu Jan 2 13:57:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in python/Makefile.am python/drv_libxml2.py:
+ integrated drv_libxml2.py Python xml.sax driver from Stéphane Bidoul
+ based on the python XmlTextReader interface.
+
+Wed Jan 1 22:05:40 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: backing out one change in the last patch which broke the
+ regression tests
+
+Wed Jan 1 21:57:28 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * global.data globals.c tree.c include/libxml/globals.h: applied
+ an old patch from Lukas Schroeder to track node creation and
+ destruction. Probably missing a lot of references at the moment
+ and not usable reliably.
+
+Wed Jan 1 20:12:07 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS doc/Makefile.am doc/news.xsl: generate the NEWS file
+ from doc/news.html and a stylesheet
+
+Wed Jan 1 16:09:57 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: fixed another couple of
+ xmlreader bugs reported by Stéphane Bidoul and added tests.
+
+Wed Jan 1 15:42:54 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader2.py: fixed another validity
+ checking in external parsed entities raised by Stéphane Bidoul
+ and added a specific regression test.
+ * python/tests/reader3.py: cleanup
+
+Tue Dec 31 15:44:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader2.py: fixed a problem with
+ validation within entities pointed by Stéphane Bidoul, augmented
+ the tests to catch those.
+
+Tue Dec 31 12:15:37 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: modified the generator to allow keeping
+ class references when creating new classes, needed to fix a bug
+ pointed by Stéphane Bidoul where the input buffer of the
+ xmlTextReader instance gets destroyed if the python wrapper for
+ the input is not referenced anymore.
+
+Mon Dec 30 19:39:36 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: fixed another pair of problem
+ pointed by Stéphane Bidoul: depth start at 0 and a parse problem.
+
+Mon Dec 30 13:36:50 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: fixed another problem
+ pointed by Stéphane Bidoul
+
+Mon Dec 30 12:39:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: fixed a limit case problem
+ with "<a/>"
+
+Mon Dec 30 11:53:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: warn on xmlns:prefix="foo"
+ * xmlreader.c python/tests/reader.py: fixed a couple of problem
+ for namespace attributes handling.
+
+Mon Dec 30 00:59:07 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c parser.c tree.c include/libxml/entities.h: Fixed
+ a really nasty problem raised by a DocBook XSLT transform
+ provided by Sebastian Bergmann
+
+Sun Dec 29 12:13:18 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c python/tests/reader.py: fixed a bug pointed out
+ by Stéphane Bidoul and integrated it into the tests
+
+Sat Dec 28 23:49:12 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml:
+ extended the XmlTextReader API a bit, addding accessors for
+ the current doc and node, and an entity substitution mode for
+ the parser.
+ * python/libxml.py python/libxml2class.txt: related updates
+ * python/tests/Makefile.am python/tests/reader.py
+ python/tests/reader2.py python/tests/reader3.py: updated a bit
+ the old tests and added a new one to test the entities handling
+
+Sat Dec 28 22:11:57 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml2class.txt
+ python/tests/reader.py python/tests/reader2.py: changed the
+ generator to provide casing for the XmlTextReader similar to
+ C# so that examples and documentation are more directly transposable.
+ Fixed the couple of tests in the suite.
+
+Sat Dec 28 15:55:32 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/guidelines.html: added a document on guildeline for
+ publishing and deploying XML
+
+Fri Dec 27 20:35:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c xmlreader.c: final touch running DTD validation
+ on the XmlTextReader
+ * python/tests/Makefile.am python/tests/reader2.py: added a
+ specific run based on the examples from test/valid/*.xml
+
+Fri Dec 27 15:17:20 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.py: added a few predefined xmlTextReader parser
+ configuration values.
+
+Fri Dec 27 12:57:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml_wrap.h: trying to fix #102037
+
+Fri Dec 27 12:18:14 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixing bug #95296, when the predefined entities
+ are redefined in the DTD the default one must be used
+ instead anyway.
+
+Wed Dec 25 19:22:06 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml
+ * doc/xmllint.1
+ Add discussion of XML_DEBUG_CATALOG to xmllint man
+ page - bug #100907
+
+Mon Dec 23 16:54:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c: Fixed the empty node detection to avoid reporting
+ an inexistant close tag.
+
+Mon Dec 23 15:42:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/setup.py.in: patch from Stéphane Bidoul
+ for Python 2.1
+
+Sun Dec 22 11:24:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * testC14N.c vms/config.vms: applied Craig A. Berry patches for VMS
+
+Fri Dec 20 11:27:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/libxml2-api.xml python/tests/reader.py: one really need
+ to provide the base URI information when creating a reader parser
+ from an input stream. Updated the API and the example using it.
+
+Fri Dec 20 01:11:30 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * testReader.c xmlreader.c valid.c include/libxml/tree.h
+ include/libxml/valid.h include/libxml/xmlreader.h: working on
+ DTD validation on top of xml reader interfaces. Allows to
+ validate arbitrary large instances. This required some extensions
+ to the valid module interface and augmenting the size of xmlID
+ and xmlRef structs a bit.
+ * uri.c xmlregexp.c: simple cleanup.
+
+Wed Dec 18 15:51:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more
+ work on the xml reader interfaces.
+ * AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the
+ Web page for the Windows binaries.
+
+Tue Dec 17 19:31:07 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied a patch for VMS following the report by
+ Nigel Hall
+
+Tue Dec 17 11:29:41 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: the parseStartTag bug fix wasn't complete.
+
+Mon Dec 16 23:00:05 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Vyacheslav Pindyura managed to trigger a bug in
+ parseStartTag, fixing it.
+ * test/att4 result/att4 result/noent/att4: adding the test
+ * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
+ more methods to XmlTextReader.
+
+Mon Dec 16 19:31:16 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: added more xml reader exports
+ * win32/Makefile.msvc win32/Makefile.mingw: added xml reader interface
+ to the build
+
+Mon Dec 16 06:36:54 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml
+ plus generated html and pdf
+ Updating tutorial again based on further comments from Niraj
+ Tolia on the last iteration
+
+Sun Dec 15 21:27:30 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml
+ * doc/tutorial/includekeyword.c
+ * doc/tutorial/includegetattribute.c
+ plus generated html and pdf
+ Adding fix from Niraj Tolia to tutorial to properly free memory.
+
+Mon Dec 16 00:34:25 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
+ more methods of XmlTextReader.
+ * python/libxml2class.txt python/tests/reader.py: this increased the
+ methods in the bndings, augmented the test to check those new
+ functions.
+
+Sat Dec 14 23:57:39 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlreader.c doc/libxml2-api.xml: added the close and getattribute
+ methods of XmlTextReader.
+ * python/generator.py python/libxml_wrap.h python/types.c
+ python/libxml2class.txt: added the reader to the Python bindings
+ * python/tests/Makefile.am python/tests/reader.py: added a specific
+ test for the Python bindings of the Reader APIs
+ * parser.c: small cleanup.
+
+Fri Dec 13 11:39:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: fallback was only copying the first child not the
+ full child list of the fallback element, closes #89684 as reopened
+ by Bernd Kuemmerlen
+
+Thu Dec 12 13:34:59 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: exported htmlNodeDumpOutput
+
+Thu Dec 12 10:59:11 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing release of 2.4.30
+ * doc/apibuild.py doc/libxml2-api.xml: fixups to the api builder,
+ gives enum values, fix functype return type, put back fields in
+ structs
+ * doc/*: updated the docs rebuilt
+
+Thu Dec 12 01:09:34 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c include/libxml/HTMLtree.h: patch from Mark Vakoc
+ about htmlNodeDumpOutput location.
+ * xpath.c: removed an undefined function signature
+ * doc/apibuild.py doc/libxml2-api.xml: the script was exporting
+ too many symbols in the API breaking the python bindings.
+ Updated with the libxslt/libexslt changes.
+
+Wed Dec 11 20:26:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing release of 2.4.29
+ * doc/*: rebuilt the docs and API
+ * xmlreader.c: a few more fixes for the XmlTextReader API
+
+Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * include/win32config.h: applied mingw patch from Magnus Henoch
+
+Wed Dec 11 16:58:48 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c doc/libxml2-api.xml: a bit more cleanup
+
+Wed Dec 11 14:54:47 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API
+ building Python script, does the C parsing directly, generates
+ a better API description including structure fieds defs and
+ enums. Still a couple of bugs, but good enough for the python
+ wrappers now.
+ * DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c
+ valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c
+ include/libxml/schemasInternals.h include/libxml/tree.h: more
+ cleanup based on the python analysis script reports.
+ * libxml.spec.in: make sure the API XML description is part of the
+ devel package.
+
+Tue Dec 10 16:16:34 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c
+ nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c
+ testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c
+ xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c:
+ code cleanup, especially the function comments.
+ * tree.c: fixed a small bug when freeing nodes which are XInclude ones.
+
+Mon Dec 9 15:08:17 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am xmlreader.c include/libxml/Makefile.am
+ include/libxml/xmlreader.h: Adding a new set of APIs based on
+ the C# TextXmlReader API but converted to C. Allow to parse
+ in constant memory usage, far simpler to program and explain
+ than the SAX like APIs, unfinished but working.
+ * testReader.c: test program
+
+Sun Dec 8 18:36:01 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: applied YALDSP from Mark Vakoc
+
+Wed Dec 4 16:08:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Chip turner indicated that XHTML1 serialization
+ rule for style actually break on both IE and Mozilla,
+ try to avoid the rule if escaping ain't necessary
+
+Wed Dec 4 12:43:28 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * nanhttp.c: handle HTTP URL escaping, problem reported by
+ Glen Nakamura and Stefano Zacchiroli
+
+Sat Nov 30 12:19:17 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c HTMLparser.c parser.c valid.c xpath.c: code cleanup
+
+Thu Nov 28 12:53:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: Johann Richard pointed out some XPointer problems for
+ URN based URI references in XInclude. Modified the URI parsing
+ and saving routines to allow correct parsing and saving of
+ XPointers, especially when attached to "opaque" scheme accordingly
+ to RFC 2396
+
+Wed Nov 27 20:36:08 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c include/libxml/HTMLtree.h: applied the same kind
+ of refactoring to the HTML saving code.
+ * doc/libxml2-*.xml doc/API*.html: slight API changes got reflected
+ in the doc.
+
+Wed Nov 27 12:40:16 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c include/libxml/tree.h: refactored the XML dump of a node
+ to a buffer API to reuse the generic dump to an OutputIO layer,
+ this reduces code, fixes xmlNodeDump() for XHTML, also made
+ xmlNodeDump() now return the number of byte written.
+
+Wed Nov 27 09:00:00 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/setup.py.in: another patch from Stéphane Bidoul for
+ Python bindings on Windows
+ * doc/parsedecl.py: small cleanup
+
+Mon Nov 25 17:28:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in configure.in: add a line in %changelog for releases
+
+Mon Nov 25 14:18:27 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: patch from Marcus Clarke fixing a problem in entities
+ parsing that was detected in KDe documentations environment.
+
+Mon Nov 24 14:13:21 CET 2002 ERDI Gergo <cactus@cactus.rulez.org>
+
+ * python/libxml.c (libxml_prev): Return the previous as opposed to
+ the next node (I guess this is the result of some cut & paste programming:)
+
+Sat Nov 23 17:22:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am: Jan Rafaj pointed a bug in the Makefile.
+
+Sat Nov 23 12:21:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/setup.py.in: trying
+ to fix the Python bindings build on Windows (Stéphane Bidoul)
+
+Fri Nov 22 22:41:34 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/configure.js: added option for python bindings
+ * win32/libxml2.def.src: added more exports
+
+Fri Nov 22 18:50:34 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/Makefile.mingw: fixed unresolved symbols when linking with
+ pthreads
+ * win32/wince/*: applied updates to Windows CE port from Javier
+
+Fri Nov 22 15:51:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.28
+ * libxml.spec.in doc/Makefile.am: some cleanup
+ * doc/*: updated the news and regenerated.
+
+Fri Nov 22 14:15:14 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: final touch at closing #87235 </p> end tags
+ need to be generated.
+ * result/HTML/cf_128.html result/HTML/test2.html result/HTML/test3.html:
+ this change slightly the output of a few tests
+ * doc/*: regenerated
+
+Fri Nov 22 13:26:19 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fixing bug #99190 when UTF8 document are
+ parsed using the progressive parser and the end of the chunk
+ is in the middle of an UTF8 multibyte character.
+
+Fri Nov 22 13:13:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+ * threads.c: fixed initialization problem in xmlNewGlobalState
+ which was causing crash.
+ * globals.c: removed duplicate call to initxmlDefaultSAXHandler
+ in xmlInitializeGlobalState.
+ * parserInternals.c: cleaned up ctxt->sax initialisation.
+
+Thu Nov 21 15:05:45 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c include/libxml/tree.h: modified the existing APIs
+ to handle XHTML1 serialization rules automatically, also add
+ xmlIsXHTML() to libxml2 API. Some tweaking to make sure
+ libxslt serialization uses it when needed without changing
+ the library API.
+ * test/xhtml1 result/noent/xhtml1 result/valid/xhtml1.xhtml
+ result/xhtml1: added a new test specifically for xhtml1 output
+ and updated the result of one XHTML1 test
+
+Wed Nov 20 14:24:56 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c parserInternals.c encoding.c: fixed #99082
+ for xi:include encoding="..." support on text includes.
+ * result/XInclude/tstencoding.xml test/XInclude/docs/tstencoding.xml
+ test/XInclude/ents/isolatin.txt : added a specific regression test
+ * python/generator.py python/libxml2class.txt: fixed the generator
+ the new set of comments generated for doc/libxml2-api.xml were
+ breaking the python generation.
+
+Tue Nov 19 23:25:47 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am: repair some problem if gtk-doc fail or such
+ * configure.in: patch for Solaris on new autoconf closes #98880
+ * doc/parsedecl.py: repair the frigging API building script,
+ did I say that python xmllib sucks ?
+ * doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated, reordering
+ and some comment are no more truncated.
+
+Tue Nov 19 09:09:04 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Martin Stoilov pointed out a potential leak in
+ xmlCreateMemoryParserCtxt
+
+Mon Nov 18 16:05:51 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed bug #98879 a corner case when 0 is
+ included in HTML documents and using the push parser.
+
+Mon Nov 18 00:11:24 CET 2002 ERDI Gergo <cactus@cactus.rulez.org>
+
+ * configure.in (PYTHON_SITE_PACKAGES): If --with-python is
+ specified, look for the Python interpreter not just in the
+ specified root but also in the specified location. Fixes #98825
+
+Sun Nov 17 23:36:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: fixing bug #98792 , node may have no doc
+ and dereferencing without checking ain't good ...
+
+Sun Nov 17 10:25:43 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing release 2.4.27
+ * doc/* : updated and rebuilt the docs
+ * doc/Makefile.am libxml.spec.in: try to make sure the tutorial
+ and all the docs are actually packaged and in the final RPMs
+ * parser.c parserInternals.c include/libxml/parser.h: restore
+ xmllint --recover feature.
+
+Sat Nov 16 16:30:25 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c xpath.c: fixing #96925 wich was also dependent on the
+ processing of parsed entities, and XPath computation on sustitued
+ entities.
+ * testXPath.c: make sure entities are substitued.
+
+Fri Nov 15 16:22:54 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed #96594, which was totally dependent on the
+ processing of internal parsed entities, which had to be changed.
+
+Fri Nov 15 12:16:07 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am python/Makefile.am python/tests/Makefile.am:
+ trying to fix bug #98517 about building outside the source tree
+ * doc/xml.html doc/FAQ.html: fixed the link to libiconv #94585
+
+Thu Nov 14 18:41:55 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * include/win32config.h: cleanup
+ * win32/Makefile.mingw: integrated mingw in JScript configure
+ * win32/Makefile.msvc: modified to allow mingw coexistence
+ * win32/configure.js: integrated mingw
+ * win32/Readme.txt: cleanup
+
+Tue Nov 12 22:06:45 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: strengthen the guard in the Pop macros,
+ like in the XML parser, closes bug #97315
+
+Tue Nov 12 21:56:39 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h: fixed bug #98338 , fatalError SAX
+ callback is never used.
+
+Tue Nov 12 13:32:50 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: fixed the initialization of the SAX structure
+ which was breaking xsltproc
+ * xpath.c: patch from Petr Pajas for CDATA nodes
+ * tree.c: patch from Petr Pajas improving xmlGetNodePath()
+ * parser.c include/libxml/parser.h: patch from Peter Jones
+ removing a leak in xmlSAXParseMemory() and adding the
+ function xmlSAXParseMemoryWithData()
+
+Mon Nov 11 20:47:03 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ adding pdf of tutorial, changing web page to link to it
+ * doc/tutorial/xmltutorial.pdf
+ * doc/xml.html
+ * doc/docs.html
+
+Sun Nov 10 20:48:57 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/ar01s08.html
+ adding file what I forgot for tutorial
+
+Sun Nov 10 20:33:13 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ Adding encoding discussion to tutorial
+ Added:
+ * doc/tutorial/images/*.png: DocBook admonition image files
+ * doc/tutorial/apf.html, apg.html: new generated html
+ * doc/tutorial/includeconvert.c: conversion code entity file
+ changed:
+ * doc/tutorial/xmltutorial.xml: DocBook original
+ * doc/tutorial/*.html: generated html
+
+Fri Nov 8 17:59:32 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * include/libxml/*.h: retired xmlwin32version.h
+ * doc/Makefile.am: retired xmlwin32version.h
+ * win32/configure.js: retired xmlwin32version.h
+
+Fri Nov 8 16:55:47 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: exported additional symbols
+ * include/libxml/xmlmemory.h: exported the rest of the xmlMem*
+ sisterhood
+
+Fri Nov 8 16:08:13 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: fixed a typo pointed out by Igor
+ * xpath.c: try to speed up node compare using line numbers
+ if available.
+
+Thu Nov 7 15:16:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: make xmlFreeNode() handle attributes correctly.
+
+Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * catalog.c: completed the #96963 fix, as reported by Karl
+ Eichwalder
+
+Wed Nov 6 16:48:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpointer.c: tried to fix bug #97852 reported by Nicolas Noffke
+
+Sun Nov 3 10:43:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: switched the order of a couple of includes
+ to fix bugs #97100
+
+Thu Oct 31 17:11:46 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * catalog.c: fixed bug #96963, reverted to the old behaviour of
+ xmlLoadCatalogs that used to separate directories with a ':'.
+
+Thu Oct 31 16:55:21 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * threads.c: improvements to the Windows-side of thread handling
+ * testThreads.c: conditionally excluded unistd.h
+ * testThradsWin32.c: broke overlong lines
+ * include/win32config.h: adapted thread-related macros to the new
+ scheme and for pthreads on Windows
+ * win32/Makefile.msvc: introduced a more flexible thread build,
+ added testThreads[Win32].c to the build
+ * win32/configure.js: introduced a more flexible thread config
+
+2002-10-31 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html (and, by implication, FAQ.html)
+ added UTF-8 conversaion FAQ from Marcus Labib Iskander
+
+Tue Oct 29 18:32:33 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * configure.in: removed xmlwin32version.h
+ * include/libxml/Makefile.am: removed xmlwin32version.h
+
+Mon Oct 28 14:01:29 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch from Brian Stafford to fix a bug
+ in xmlReconciliateNs()
+
+Mon Oct 28 13:51:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch from Christian Glahn to allow
+ xmlNewChild() on document fragment nodes
+
+Sat Oct 26 15:27:00 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Christian Glahn found a problem with a recent
+ patch to xmlParseBalancedChunkMemoryRecover()
+ * xmlschemas.c: Charles Bozeman fixed some Schemas validation
+ problems
+ * result/schemas/elem* result/schemas/seq* test/schemas.elem*
+ test/schemas/seq*: added the test cases from Charles
+
+Wed Oct 23 16:42:29 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am config.h.in libxml.spec.in doc/Makefile.am:
+ serious cleanup of the spec file and associated changes
+ in the Makefiles.
+ * valid.c: try to remove some warnings on x86_64
+
+Wed Oct 23 10:53:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/Makefile.am: added winsockcompat.h to EXTRA_DIST to
+ fix bug #96586
+
+Tue Oct 22 21:13:06 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML
+ parsing, applied his patch
+ * result/HTML/attrents.html result/HTML/attrents.html.err
+ result/HTML/attrents.html.sax test/HTML/attrents.html:
+ added the test and result case provided by Mikhail Sogrine
+
+Tue Oct 22 19:33:20 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * vms/build_libxml.com vms/config.vms vms/readme.vms
+ include/libxml/parser.h include/libxml/parserInternals.h
+ include/libxml/tree.h include/libxml/xmlIO.h
+ HTMLparser.c catalog.c debugXML.c parser.c parserInternals.c
+ tree.c triodef.h trionan.c uri.c xmlIO.c xpath.c:
+ Applied the VMS update patch from Craig A. Berry
+ * doc/*.html: update
+
+Tue Oct 22 16:27:31 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/encoding.h encoding.c: made xmlGetUTF8Char public
+
+Tue Oct 22 16:25:18 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: adding a grep command to --shell in xmllint
+ for T.V. Raman
+
+Tue Oct 22 16:23:57 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c: tried to fix some of the problem with --sgml
+
+Mon Oct 21 09:57:10 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: tried to fix bug #91500 where doc->children may
+ be overriden by a call to xmlParseBalancedChunkMemory()
+
+Mon Oct 21 09:04:32 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: tried to fix bug #90945 w.r.t. parsing of system
+ identifiers in SGML catalogs containing '&'
+
+Sun Oct 20 23:31:47 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c: fixed bugs when passing result value tree
+ to Python functions.
+
+Fri Oct 18 13:18:53 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing the release of 2.4.26
+ * doc/*: updated and rebuilt the documentation
+
+Wed Oct 16 20:01:46 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a XML Namespace compliance bug reported by
+ Alexander Grimalovsky
+
+Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixed serialization of script and style when
+ they are not lowercase (i.e. added using the API to the tree).
+
+Wed Oct 16 16:31:05 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: make xmlValidateDocument emit a warning msg if there
+ is no DTD, pointed by Christian Glahn
+
+Wed Oct 16 16:05:38 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c: fixed the validation of sequences
+ content model when some of the blocks have min or max, and a couple
+ of bugs found in the process.
+ * result/schemas/list0* test/schemas/list0*: added some specific
+ regression tests
+
+Tue Oct 15 12:41:01 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * README: updated the contact informations
+
+Tue Oct 15 10:35:57 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: use test -f instead of test -e since Solaris /bin/sh
+ misses it, reported by Peter Bray.
+
+Mon Oct 14 17:37:32 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: investigating xmlNodeGetContent() on namespace nodes
+ and removed a few warnings
+
+Mon Oct 14 13:12:55 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Christian Glahn found a small bug in the push parser.
+ * xmlIO.c include/libxml/xmlIO.h: cleaned up and made xmlCheckFilename
+ public
+
+Wed Oct 9 23:11:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c include/libxml/xmlschemas.h: added
+ xmlSchemaNewMemParserCtxt to parse a schemas from a memory area
+ * testSchemas.c: added --memory to test the new interface
+
+Wed Oct 9 16:22:54 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/index.py doc/search.php: integrated the XSLT indexing,
+ a few fixed in the indexer, added a scope selection at the
+ search level.
+
+Wed Oct 9 12:18:37 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: Joe Marcus Clarke reported a segfault on FBsd
+ this was due to uninitialized parts of the validation context
+
+Tue Oct 8 23:24:20 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: applied patch from Mark Vakoc except the API
+ change, preserved it.
+ * doc/*: updated the docs to point to the search engine for
+ information lookup or before bug/help reports.
+
+Tue Oct 8 18:53:31 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/index.py doc/search.php: added mailing-list archives
+ indexing and lookup
+
+Tue Oct 8 10:25:07 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: patch from Mark Vakoc to fix xmlNodeGetPath()
+
+Mon Oct 7 13:12:03 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/index.py: improved HTML indexing
+ * doc/search.php: make the queries also lookup the HTML based indexes
+
+Sun Oct 6 23:50:29 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/index.py: added HTML page indexing
+
+Fri Oct 4 15:33:55 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * xmlIO.c: extended Windows path normalisation to fix the base
+ problem in libxslt.
+ * catalog.c: fixed list handling in XML_CATALOG_FILES
+
+Fri Oct 4 13:43:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: typo/bug found by Christian Glahn
+
+Sun Sep 29 19:44:10 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * xmlIO.c: applied Windows CE patch from Javier.
+ * win32/wince: new directory, contains support for the PocketPC
+ with Windows CE from Javier.
+ * include/win32config.h: reorganised, removed duplicate
+ definitions and applied WinCE patch from Javier.
+ * include/wsockcompat.h: new file, now contains WinSock
+ compatibility macros.
+ * win32/Makefile.msvc: introduced double-run compilation.
+
+Thu Sep 26 19:48:06 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing release
+ of 2.4.25
+ * doc/*: updated and regenerated teh docs and web pages.
+
+Thu Sep 26 17:33:46 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c valid.c include/libxml/valid.h: fixed bug #92518 validation
+ error were not covering namespace declarations.
+ * result/valid/dia.xml test/valid/dia.xml: the test wasn't valid,
+ it was missing the attribute declaration for the namespace
+ * result/VC/NS3: the fix now report breakages in that test
+
+Thu Sep 26 14:39:07 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixing bug #94241 on HTML boolean attributes
+
+Thu Sep 26 14:25:33 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*: added the 3 new modules xmlregexp xmlautomata and xmlunicode
+ and regenerated the docs and web site
+
+Thu Sep 26 11:45:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c xmlschemas.c xmlschemastypes.c xpath.c: make sure
+ ATTRIBUTE_UNUSED is always put after the attribute declaration,
+ not before
+
+Thu Sep 26 11:33:28 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml2class.txt: fixed a stupid error
+ breaking the python API
+
+Thu Sep 26 00:31:46 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * trio.c trio.h triodef.h trionan.c trionan.h triop.h
+ triostr.c triostr.h: applied a trio update patch from
+ Bjorn Reese which should work with MinGW
+
+Thu Sep 26 00:21:18 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: improving some documentation comments
+ * xmlregexp.c: found and fixed a mem leak with python regression tests
+ * doc/*: rebuilt the doc and the API XML file including the
+ xmlregexp.h xmlautomata.h and xmlunicode.h headers
+ * python/generator.py python/libxml2class.txt python/libxml_wrap.h
+ python/types.c: added access to the XML Schemas regexps from
+ python
+ * python/tests/Makefile.am python/tests/regexp.py: added a
+ simple regexp bindings test
+
+Tue Sep 24 08:10:48 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html:
+ fixing ftp links - thanks to Vitaly Ostanin
+
+Tue Sep 24 16:08:17 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: fixed the data callback on transition functionality
+ which was broken when using the compact form
+ * result/schemas/*: updated the results, less verbose, all tests
+ pass like before
+ * DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c
+ testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c
+ xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of
+ annoying warnings
+ * xpath.c: try to provide better error report when possible
+
+Sat Sep 21 14:56:37 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: fixed a breakage raised by Jacob
+
+Fri Sep 20 20:08:18 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * include/win32config.h: added HAVE_ERRNO_H definition for parts
+ which don't use sockets
+
+Fri Sep 20 18:40:50 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/Makefile.msvc: applied zlib patch from Daniel Gehriger
+ * win32/configure.js: applied zlib patch from Daniel Gehriger
+
+Fri Sep 20 15:40:14 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/configure.js: applied the patch from Mark Vakoc for
+ regexp support
+ * win32/libxml2.def.src: applied the patch from Mark Vakoc
+ for regexp support
+
+Fri Sep 20 15:35:33 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: as pointed by Igor Float and Double
+ parsing ain't finished yet
+
+Fri Sep 20 14:00:16 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in: trying to fix #88412 by bypassing
+ all the python subdir if python ain't detected
+
+Thu Sep 19 21:46:53 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in include/libxml/xmlversion.h.in:
+ made configuring with regexps/automata/unicode the default
+ but without schemas ATM
+ * testRegexp.c valid.c xmlregexp.c include/libxml/xmlregexp.h:
+ fixed the regexp based DTD validation performance and memory
+ problem by switching to a compact form for determinist regexps
+ and detecting the determinism property in the process. Seems
+ as fast as the old DTD validation specific engine :-) despite
+ the regexp built and compaction process.
+
+Wed Sep 18 18:27:26 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: determinism is debugged, new DTD checking code now works
+ but xmlFAComputesDeterminism takes far too much CPU and the whole
+ set usues too much memory to be really usable as-is
+
+Wed Sep 18 00:54:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed another stupid bug in xmlGetNodePath()
+ * xmllint.c: --version now report the options compiled in
+
+Tue Sep 17 23:48:07 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: small cleanup
+ * valid.c xmlregexp.c: switched DTD validation to use only regexp
+ when configured with them. A bit of debugging around the determinism
+ checks is still needed
+
+Tue Sep 17 21:22:25 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml_wrap.h: stupid bug found by mattam@netcourrier.com
+
+Tue Sep 17 19:58:26 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: small portability glitch fixed.
+
+Mon Sep 17 12:38:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: incomplete steps for real/double support
+ * testAutomata.c include/libxml/xmlautomata.h
+ include/libxml/xmlregexp.h: avoiding a compilation problem
+ * valid.c include/libxml/valid.h: starting the work toward using
+ the regexps for actual DTD validation
+
+Fri Sep 13 16:46:14 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * hash.c: cosmetic cleanup
+ * valid.c include/libxml/tree.h include/libxml/valid.h: started
+ integrating a DTD validation layer based on the regexps
+
+Thu Sep 12 18:01:29 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c: fixed a bug reported by Jeff Goff,
+ the determinism was tested before eliminating the epsilon
+ transitions :-(
+
+Thu Sep 12 16:57:45 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml.py
+ python/libxml2-python-api.xml python/libxml2class.txt
+ python/libxml_wrap.h python/types.c: updated the python
+ bindings, added code for easier File I/O, and the ability to
+ define a resolver from Python fixing bug #91635
+ * python/tests/Makefile.am python/tests/inbuf.py
+ python/tests/outbuf.py python/tests/pushSAXhtml.py
+ python/tests/resolver.py python/tests/serialize.py: updated
+ and augmented the set of Python tests.
+
+Tue Sep 10 21:05:28 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/configure.js: added more readme info for the binary
+ package.
+
+Tue Sep 10 14:15:18 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fixed a stupid out of bound array error
+
+Tue Sep 10 13:09:14 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlIO.h xmlIO.c parser.c HTMLparser.c DOCBparser.c:
+ messing around with support for Windows path, cleanups,
+ trying to identify and fix the various code path to the
+ filename access. Added xmlNormalizeWindowsPath()
+
+Thu Sep 5 16:19:18 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * error.c valid.c: working on better error reporting of validity
+ errors, especially providing an accurate context.
+ * result/valid/xlink.xml.err result/valid/rss.xml.err: better
+ error reports in those cases.
+
+Thu Sep 5 13:29:47 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c HTMLparser.c c14n.c entities.c list.c
+ parser.c parserInternals.c xmlIO.c: get rid of all the
+ perror() calls made in the library execution paths. This
+ should fix both #92059 and #92385
+
+Thu Sep 5 13:13:17 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: memory leak reporting was broken after a change
+ of the preprocessor symbol used to activate it.
+
+Thu Sep 5 13:10:57 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: try to make the copy function work for node of
+ type XML_DOCUMENT_FRAG_NODE, they are only created by the
+ DOM layers though, not libxml2 itself.
+
+Thu Sep 5 12:57:38 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: try to provide file and line informations, not all
+ messages are covered, but it's a (good) start
+
+Thu Sep 5 12:49:35 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: reimplemented a large part of the XInclude
+ processor, trying to minimize resources used, James Henstridge
+ provided a huge test case which was exhibiting severe memory
+ consumption problems.
+
+Thu Sep 5 10:07:13 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: applied patch from Christophe Merlet to
+ reestablish DESTDIR
+
+Wed Sep 4 14:13:34 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fixes libary path for x86_64 AMD
+
+Tue Sep 3 21:14:19 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/includekeyword.c
+ * doc/tutorial/xmltutorial.xml:
+ (plus resulting generated html files)
+ fixing one spot I missed in the tutorial where I hadn't freed
+ memory properly
+
+Sat Aug 31 19:31:17 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/includeaddattribute.c
+ * doc/tutorial/includeaddkeyword.c
+ * doc/tutorial/includegetattribute.c
+ * doc/tutorial/includekeyword.c
+ * doc/tutorial/xmltutorial.xml
+ * doc/tutorial/*.html:
+ update tutorial to properly free memory (thanks to Christopher
+ R. Harris for pointing out that this needs to be done)
+ * doc/tutorial/images/callouts/*.png:
+ added image files so the callouts are graphical, making it
+ easier to read ( use "--param callout.graphics 1" to generate
+ html with graphical callouts)
+
+Wed Aug 28 13:44:54 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Libxml2-Logo-180x168.gif doc/Libxml2-Logo-90x34.gif:
+ nice logos generated by Marc Liyanage
+ * doc/site.xsl *.html: changed the stylesheet to show the new
+ logo and regenerated the pages
+
+Sun Aug 25 16:38:05 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: handle Windows sepecific file://localhost/ semantic ...
+
+Thu Aug 22 22:03:19 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: possible mem leak patch from Jason Adams
+
+Thu Aug 22 17:27:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: integrated xf:escape-uri() from Wesley Terpstra
+ in the XQuery namespace
+ * configure.in: preparing 2.4.24
+ * doc/*.html: updated the web pages
+
+Thu Aug 22 16:19:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: closing bug #85258 by generating conditional
+ compile check to avoid linking to routines not configured in.
+
+2002-08-22 Havoc Pennington <hp@pobox.com>
+
+ * autogen.sh: update error message for missing automake
+
+Thu Aug 22 11:45:50 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: typo in target name resulted in libxml2.py
+ to not be rebuilt. fixed DESTDIR similary to the libxslt one.
+
+Thu Aug 22 09:15:00 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * win32/win32/Makefile.mingw: updated with version from
+ Elizabeth Barham at http://soggytrousers.net/repository/
+
+Tue Aug 20 16:40:48 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/Makefile.msvc: added the prefix location to the include
+ and lib search path.
+
+2002-08-18 Havoc Pennington <hp@pobox.com>
+
+ * autogen.sh: hardcode aclocal-1.4/automake-1.4 so that users with
+ both automake 1.6 and 1.4 installed get the right automake. Means
+ compilation from CVS will now require the latest automake 1.4
+ release, or manually creating symlinks called "automake-1.4" and
+ "aclocal-1.4"
+
+Wed Aug 14 18:54:19 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in python/Makefile.am: more AMD 64 induced changes from
+ Frederic Crozat
+
+Wed Aug 14 16:43:53 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: oops I was missing the xml:base fixup too
+ * result/XInclude/*.xml: this adds xml:base attributes to most
+ results of the tests
+
+Wed Aug 14 16:05:37 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xinclude.c: quick but apparently working implementation of
+ xi:fallback, should close bug #89684
+ * Makefile.am test/XInclude/docs/fallback.xml
+ result/XInclude/fallback.xml: added a basic test for fallback,
+ and run with --nowarning to avoid a spurious warning
+ * configure.in: applied patch from Frederic Crozat for python
+ bindings on AMD 64bits machines.
+
+Wed Aug 14 10:47:46 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: xmlSAXUserParseMemory() really ought to fail if
+ the caller don't pass a SAX callback block.
+
+Wed Aug 14 10:29:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied the same fix for the XML-1.0 namespace to
+ xmlSearchNsByHref() as was done for xmlSearchNs()
+
+Mon Aug 12 16:52:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.3: small cleanup of the man page
+ * HTMLtree.c: fixed a potential problem raised by Petr Vandrovec
+ when serializing HREF attributes generated by XSLT.
+
+Mon Aug 12 15:24:05 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c include/libxml/HTMLtree.h: integrated a cleaned up
+ version of Marc Liyanage' patch for boolean attributes in HTML
+ output
+
+Mon Aug 12 14:11:59 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/tests/serialize.py: fixed the test results, indenting
+ behaviour changed slightly
+
+Thu Aug 8 11:00:26 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * win32/dsp/libxml2.def.src win32/libxml2.def.src: added
+ new c14n function to Windows def files
+
+Fri Aug 2 16:46:46 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c: fixed a memory leak in c14n code
+
+Sat Aug 3 00:15:06 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/parser.h: adding a new API for Christian
+ Glahn: xmlParseBalancedChunkMemoryRecover
+ * valid.c: patch from Rick Jones for some grammar cleanup in
+ validation messages
+ * result/VC/* result/valid/*: this slightly change some of the
+ regression tests outputs
+
+Thu Aug 1 14:50:28 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: trying to fix a problem in namespaced attribute handling
+ raised by Christian Glahn
+
+Thu Aug 1 12:17:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c include/libxml/encoding.h: Opening the interface
+ xmlNewCharEncodingHandler as requested in #89415
+ * python/generator.py python/setup.py.in: applied cleanup
+ patches from Marc-Andre Lemburg
+ * tree.c: fixing bug #89332 on a specific case of loosing
+ the XML-1.0 namespace on xml:xxx attributes
+
+Wed Jul 31 23:27:42 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c include/libxml/c14n.h: fixed one more c14n + namespaces
+ corner case from new Merlin's test suite and added a callback
+ that will be used to improve xmlsec performance
+
+Mon Jul 29 18:22:00 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: trying to fix the <style> escaping problem in
+ HTML serialization bug #89342
+
+Thu Jul 25 01:33:47 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/*.html: applied syntax patch from Rick Jones
+ and rebuilt the web site.
+
+Mon Jul 22 11:04:48 PDT 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * include/libxml/tree.h: added _private member to xmlNs struct
+
+Sun Jul 21 17:48:47 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixing bug #84876 based on the xml working
+ code.
+
+Sun Jul 21 19:15:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+ * python/Makefile.am: enhanced to fix bug 72012 (errors
+ when using '-jX' make parameter)
+
+Fri Jul 19 16:35:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: small additional enhancement for booleans
+ compared to nodesets
+
+Wed Jul 17 19:48:14 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: changed the order of the encoding declaration
+ attributes in the meta tags due to a bug in IE/Mac
+
+Fri Jul 12 08:45:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: enhanced handling of booleans (especially '='
+ and '!=' for nodesets) - fixes bug 85256. Added new
+ routine xmlXPathNotEqualValues for more proper handling
+ of '!=' when nodesets are involved.
+
+Thu Jul 11 21:45:52 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am: fixing Red Hat bug #68614 by adding the
+ doc/xmlcatalog_man.xml to the source distribution
+
+Wed Jul 10 21:26:13 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/Makefile.msvc: Added a copy *.pdb to install, few have
+ asked for this.
+
+Sat Jul 6 21:55:59 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.23
+ * doc/*: rebuilt the docs
+
+Sat Jul 6 21:11:20 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug #84169 by fixing the
+ comment of xmlCreatePushParserCtxt to describe the
+ encoding detection parameters better.
+
+Sat Jul 6 19:44:56 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixing bug #79331 in one path the lookup for
+ ID attributes on a namespaced node wasn't handled correctly :-\
+
+Fri Jul 5 20:07:43 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: trying to fix 87235 about discarded white
+ spaces in the HTML parser.
+ * result/HTML/*: this changes the output of a number of HTML
+ regression tests
+
+Mon Jul 1 23:23:41 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: applied patch from Richard Jinks for the namespace
+ axis + fixed a memory error.
+ * parser.c parserInternals.c: applied patches from Peter Jacobi
+ removing ctxt->token for good.
+ * xmlschemas.c xmlschemastypes.c: fixed a few memory leaks
+ popped out by the regression tests.
+ * Makefile.am: patch for threads makefile from Gary Pennington
+
+Fri Jun 28 19:38:00 HKT 2002 William Brack <wbrack@mmm.com.hk>
+
+ * xpath.c: enhanced behaviour of position() after usage of
+ expressions involving preceding-sibling (et al).
+
+Tue Jun 18 09:58:48 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * hash.c: applied a patch from Peter Jacobi to solve a problem
+ when compiling with the Watcom C on Win32
+ * result/schemas/*.err: the change of hashing algo generated
+ permutations in the output
+
+Mon Jun 17 19:02:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * hash.c: applied patch from Sander Vesik improving the quality of
+ the hash function.
+
+2002-06-14 Aleksey Sanin <aleksey@aleksey.com>
+
+ * DOCBparser.c HTMLparser.c debugXML.c encoding.c
+ nanoftp.c nanohttp.c parser.c tree.c uri.c xmlIO.c
+ xmllint.c xpath.c: replaced sprintf() with snprintf()
+ to prevent possible buffer overflow (the bug was pointed
+ out by Anju Premachandran)
+
+Thu Jun 13 17:30:25 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: removed an uninitialized data error popped by valgrind
+ on PE references
+
+Wed Jun 12 21:38:46 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/xml.html
+ adding tutorial reference to the web page
+
+Wed Jun 12 21:26:08 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/tutorial/xmltutorial.xml
+ * doc/tutorial/ar01s07.html
+ * doc/tutorial/ape.html
+ * doc/tutorial/includegetattribute.c
+ adding section to tutorial about retrieving an attribute
+ value
+
+Tue Jun 11 12:07:04 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: applied a couple of patches from Peter Jacobi to start
+ to get rid of ctxt->token, with a possible significant speed
+ improvement to be gained once done. Better compliance with PE
+ references constructs in DTDs too.
+ * test/valid/t[0-9]* result/valid/t[0-9]*: added a set of tests
+ from Peter too
+
+Tue Jun 11 09:25:12 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Babak Vahedipour-Kunze reported that openTag in
+ xmlParseElement was likely to have been deallocated at the
+ time of the report, possibly leading to segfault. Just report
+ the tag name now.
+
+Mon Jun 10 18:00:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: patch from Richard Jinks for XPath substring() function
+ * result/XPath/expr/strings test/XPath/expr/strings: new set of tests
+
+2002-06-06 Aleksey Sanin <aleksey@aleksey.com>
+
+ * xmlIO.c: patch from Rachel Hestilow to fix bug #84340
+
+Wed Jun 5 19:14:49 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ *doc/FAQ.html
+ fixing typos in FAQ, thanks to Robert Funnell for the
+ editing help
+
+Wed Jun 5 14:50:24 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * NEWS: got complaints from rpmlint that it was empty
+
+Tue Jun 4 09:09:18 MDT 2002 John Fleck <jfleck@inkstain.net>
+
+ * added doc/tutorial, including:
+ apa.html
+ apb.html
+ apc.html
+ apd.html
+ ar01s02.html
+ ar01s03.html
+ ar01s04.html
+ ar01s05.html
+ ar01s06.html
+ includeaddattribute.c
+ includeaddkeyword.c
+ includekeyword.c
+ includestory.xml
+ index.html
+ xmltutorial.xml
+ libxml tutorial, including generated html
+
+Mon Jun 3 21:21:26 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * result/c14n/exc-without-comments/merlin-c14n-two-*
+ result/c14n/without-comments/merlin-c14n-two-*
+ test/c14n/exc-without-comments/merlin-c14n-two-*
+ test/c14n/without-comments/merlin-c14n-two-*
+ testC14N.c Makefile.am: added merlin-c14n-two.tar.gz tests for
+ c14n/exc-c14n and slightly modified test script to handle
+ these test cases
+ * c14n.c: fixed bugs for complicated nodes set (namespace
+ without node and others from merlin-c14n-two.tar.gz)
+ * include/libxml/xpathInternals.h win32/dsp/libxml2.def.src
+ win32/libxml2.def.src: "opened" xmlXPathNodeSetFreeNs() function
+ for xmlsec performance patch
+ * xpath.c: fixed self::node() for namespaces and attributes
+
+Mon Jun 03 00:04:21 2002 Chema Celorio <chema@ximian.com>
+
+ * tree.h: added xmlDocFormatDump which is just as xmlDocDump
+ but with the format parameter
+ * tree.c: made xmlDocDump a wrapper arround xmlDocFormatDump
+
+Fri May 31 12:16:48 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * Makefile.am: updated c14n tests suite
+ * c14n.c: performance improvement for previous c14n patch
+
+Fri May 31 11:47:12 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: another peroformance patch from Peter Jacobi, that
+ time on parsing attribute values.
+
+Thu May 30 23:34:27 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * Makefile.am result/c14n/* test/c14n/*: C14N tests integrated
+ into LibXML2 test suite
+
+Thu May 30 21:23:06 2002 Aleksey Sanin <aleksey@aleksey.com>
+
+ * c14n.c: propagating xpath ancesstors node fix to c14n
+ plus small performance improvement to reduce number of
+ mallocs
+ * xpath.c: fixed ancestors axis processing for namespace nodes
+
+Wed May 29 10:21:39 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c parser.c tree.c include/libxml/tree.h: performance patch from
+ Peter Jacobi
+
+Mon May 27 23:18:33 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.22
+
+Mon May 27 16:44:04 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c win32/libxml2.def.src win32/dsp/libxml2.def.src
+ include/libxml/HTMLparser.h: fixing #79334 making htmlParseDocument
+ a public entry point.
+ * doc/*: rebuilt the API and docs
+
+Mon May 27 14:16:28 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: patch from Richard Jinks to fix a problem introduced
+ in the previous patch and pointed by Norm
+
+Fri May 24 13:10:22 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: fixing bug #81112
+
+Fri May 24 13:03:24 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: fixing bug #82848
+
+Fri May 24 09:54:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * result/catalogs/mycatalog.full: Aleksey's commit changed the
+ output of one catalog test
+
+Fri 24 May 2002 12:17:45 AM PDT Aleksey Sanin <aleksey@aleksey.com>
+
+ * global.data globals.c tree.c include/libxml/globals.h
+ win32/libxml2.def.src win32/dsp/libxml2.def.src: changed
+ default value for global parameter xmlIndentTreeOutput to 1 and
+ introduced new global parameter xmlTreeIndentString (the string
+ used to do one-level indent) with default value " " (as it was
+ in tree.c)
+
+Thu May 23 13:55:57 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: Merijn Broeren pointed out a problem when compiling
+ with trio and schemas.
+
+Wed May 22 11:57:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: patch from Richard Jinks to fix the problem raised in
+ http://mail.gnome.org/archives/xml/2002-April/msg00246.htm
+
+Wed May 22 08:38:19 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: a bit of work on import.
+ * xmlschemastypes.c: Charles Bozeman provided a compare function
+ for date/time types so min/max facet restrictions should work,
+ indeterminate comparisons return an error instead of equal.
+ * test/schemas/date_0* result/schemas/date_0_0: specific test
+ from Charles Bozeman too
+
+Sat May 18 09:54:12 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.3 doc/buildDocBookCatalog: apply a couple of patches
+ from Christian Cornelssen fixing the man pages and the Catalog
+ building script.
+ * xmlschemas.c include/libxml/schemasInternals.h: nothing new yet
+ next step is <xs:import> I now have a reasonable understanding
+ of how it works.
+
+Thu May 16 10:43:26 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: applied a small buffer performance patch from Gary Pennington
+
+Wed May 15 00:25:34 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/libxml2.def.src: exported xmlXPathNodeSetAddNs()
+
+Tue May 14 13:00:48 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixing an XPath function evalutation bug pointed out
+ by Alexey Efimov where the context was lost when evaluating
+ the function arguments
+
+Mon 13 May 2002 11:37:39 PM PDT Aleksey Sanin <aleksey@aleksey.com>
+
+ * xpath.c include/libxml/xpathInternals.h: maked xmlXPathNodeSetAddNs()
+ function public for XMLSec performance optimizations
+
+Mon May 13 12:32:22 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml2class.txt : fixed a problem
+ with the HTML parser pointed by Gary Benson
+ * python/tests/Makefile.am python/tests/pushSAXhtml.py: sdding the
+ example
+
+Thu 09 May 2002 11:19:00 AM PDT Aleksey Sanin <aleksey@aleksey.com>
+ * parser.c: fixed bug #81159 (memory growth in SAX)
+
+Tue 07 May 2002 09:20:21 AM PDT Aleksey Sanin <aleksey@aleksey.com>
+ * xpath.c: fixed bug #78858 (the real fix)
+
+Sat 04 May 2002 11:56:31 PM PDT Aleksey Sanin <aleksey@aleksey.com>
+ * xpath.c: fixed bug #78858 (quick and durty fix to hide the problem)
+
+Sun May 5 08:57:08 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: modified xmlNodeSetBase to allow changing the
+ base of a document.
+
+Fri May 3 09:20:41 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemastypes.c: patch Charles Bozeman for validation of
+ all the date, time, and duration types
+ * test/schemas/dur_0* result/schemas/dur_0*: associated tests
+ * configure.in: fixed an error pointed by an user
+ * xml2-config.in: fixed an error pointed by an user
+
+Wed 01 May 2002 11:29:27 AM PDT Aleksey Sanin <aleksey@aleksey.com>
+
+ * include/libxml/xmlIO.h win32/dsp/libxml2.def.src
+ win32/libxml2.def.src xmlIO.c: exported default
+ 'file:', 'http:' and 'ftp:' protocols input handlers
+ and maked protocols comparisson case insensitive
+
+Tue Apr 30 16:29:05 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: Neven Has detected a typo
+
+Tue Apr 30 08:48:11 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * AUTHORS HACKING: added Aleksey Sanin <aleksey@aleksey.com>
+ as one of the persons allowed to commit directly to the
+ module.
+
+Mon Apr 29 17:48:26 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing 2.4.21
+ * valid.c: raised a too low limit
+ * doc/*: rebuilt the docs
+
+Wed Apr 24 13:41:03 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * test/XPath/expr/floats test/XPath/expr/functions
+ result/XPath/expr/floats result/XPath/expr/functions
+ xpath.c: another XPath conformance patch from Richard Jinks
+
+Tue Apr 23 19:50:40 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: fixed validation of attribute groups.
+ * test/schemas result/schemas: added an example from the primer
+
+Tue Apr 23 09:11:37 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am xmlschemas.c xmlschemastypes.c: more work on Schemas
+ * test/schemas result/schemas: updated the test list
+
+Mon Apr 22 17:59:14 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * TODO: updated a bit
+ * parser.c: made a comment more specific
+ * xmlregexp.c xmlschemas.c xmlschemastypes.c: more work on the
+ Schemas conformance.
+ * test/schemas result/schemas: updated the test list
+
+Sat Apr 20 19:36:39 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h:
+ implementing xs:all with minOccurs = 0
+ * tes/schemas/* result/schemas/*: added more tests covering
+ xs:all
+
+Sat Apr 20 09:22:50 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c: first implementation of the all particle, this
+ may need to be revisited for case where not all transitions
+ must be crossed.
+
+Fri Apr 19 18:26:04 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: another entity processing update from Markus Henke
+
+Fri Apr 19 17:14:24 CEST 2002 Bjorn Reese <breese@users.sourceforge.net>
+
+ * trionan.c: fixed crash on OSF/1
+
+Fri Apr 19 09:00:56 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c: more Schemas work
+ * test/schemas/* result/schemas/*: added more tests coming
+ from the spec.
+
+Thu Apr 18 23:00:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: patch from Aleksey Sanin reflecting a change in the
+ ExcC14N specification
+
+Thu Apr 18 18:38:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: patch from Markus Henke, fix for recursive entities.
+
+Thu Apr 18 17:49:24 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fix a problem with string() on a document node.
+
+Thu Apr 18 16:40:42 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am xmlschemas.c: more Schemas work
+ * test/schemas/* result/schemas/*: added more tests coming
+ from the spec.
+
+Thu Apr 18 13:52:52 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixed & serialization bug introduced in 2.4.20
+ * result/HTML/*: this changes a few things in the results
+
+Wed Apr 17 20:34:37 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * include/libxml/tree.h: eliminated 'declaration different than
+ prototype' warning
+ * include/win32config.h: "resolved" conflicts with errno.h
+
+Wed Apr 17 18:26:07 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: more work
+ on the automata interfaces and debug of counted choices
+ * test/schemas/* result/schemas/*: added a number of tests
+
+Wed Apr 17 11:03:03 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemas.h:
+ a bit of work on Schemas
+ * testSchemas.c: try to make it more useful
+ * test/schemas/* result/schemas/* Makefile.am: changed the
+ Schemas regression test procedure, started adding a few samples
+
+Tue Apr 16 19:52:01 CEST 2002 Igor Zlatkovic <izlatkovic@stud.fh-frankfurt.de>
+
+ * include/libxml/encoding.h: Patch for the Borland C++ builder
+ * include/libxml/tree.h: Patch for the Borland C++ builder
+ * threads.c: Patch for the Borland C++ builder
+ * win32/bcb5: New directory for the Borland C++ builder
+ project files
+
+Tue Apr 16 19:46:55 CEST 2002 Igor Zlatkovic <izlatkovic@stud.fh-frankfurt.de>
+
+ * win32/Makefile.msvc: Update for XML Schema support
+ * win32/configure.js: Update for XML Schema support
+ * win32/libxml2.def.src: Update for XML Schema support
+
+Tue Apr 16 17:46:43 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am TODO_SCHEMAS configure.in genUnicode.py testAutomata.c
+ testRegexp.c testSchemas.c xmlregexp.c xmlschemas.c xmlschemastypes.c
+ xmlunicode.c include/libxml/Makefile.am
+ include/libxml/schemasInternals.h include/libxml/xmlautomata.h
+ include/libxml/xmlregexp.h include/libxml/xmlschemas.h
+ include/libxml/xmlschemastypes.h include/libxml/xmlunicode.h
+ include/libxml/xmlversion.h.in : merged the current state of
+ XML Schemas implementation, it is not configured in by default,
+ a specific --schemas configure option has been added.
+ * test/automata test/regexp test/schemas Makefile.am
+ result/automata result/regexp result/schemas:
+ merged automata/regexp/schemas regression tests
+
+Tue Apr 16 09:48:44 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: Gary found a compile time problem, fixes #78823
+
+Mon Apr 15 19:11:36 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: release of 2.4.20
+ * doc/*: updated and rebuilt the docs
+
+Mon Apr 15 14:55:53 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: patch from Cristian Gafton to build on
+ Red Hat 6.2, should also fix #75779
+
+Mon Apr 15 12:14:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: first part of fixing #78729
+
+Sun Apr 14 23:44:58 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c uri.c: fixing bug #78662 i.e. add proper
+ escaping of URI when saving HTML files.
+ * result/HTML/*: this impacted some tests
+
+Sun Apr 14 14:55:15 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: trying to fix #77441
+
+Fri Apr 12 23:02:16 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlIO.h: Hallski complained it could not be
+ included by itself.
+
+Thu Apr 11 10:23:36 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: applied an IEEE flag patch for OSF/1 #77825
+
+Wed Apr 10 23:31:34 CEST 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+ * win32/configure.js: patch from Nilo for the c14n option
+ * win32/Makefile.msvc: fixed libxml2.def generation with threads
+
+Wed Apr 10 21:24:16 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c include/libxml/xmlwin32version.h.in: Silvan Minghetti
+ pointed erroneous use of LIBXML_THREADS_ENABLED instead of
+ LIBXML_THREAD_ENABLED
+
+Wed Apr 10 18:12:52 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: another patch from Richard Jinks for substring conformance
+ * test/XPath/expr/floats test/XPath/expr/strings
+ result/XPath/expr/floats result/XPath/expr/strings: update of the
+ test suite to check those.
+
+Wed Apr 10 13:29:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: patch from Richard Jinks for .x float parsing.
+
+Tue Apr 9 18:09:31 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: patch from Markus Henke when an encoding ain't recognized
+
+Tue Apr 9 15:47:14 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.m4: got a report that #include <string.h> was needed
+
+Tue Apr 9 11:51:25 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: applied a fix from Anthony Jones for -o /--output
+
+Tue Apr 2 20:27:11 MST 2002 John Fleck <jfleck@inkstain.net>
+
+ * doc/example.html: fixing typo
+
+Mon Apr 1 10:02:57 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed a bug in the nodeset to boolean comparison code
+ pointed out by Melvyn Sopacua.
+
+Fri Mar 29 23:41:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.m4: Frédéric Crozat gave a patch related to the change
+ of Include paths breaking the libxml.m4
+
+Fri Mar 29 18:25:54 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: Fix bug #76927 forgot to save some context
+ when evaluating binary expressions
+
+Thu Mar 28 19:22:48 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: fixed configure for MPE/iX from Markus Henke
+ * xmlmemory.c: fixed initialization problems
+ * xpath.c: another set of patches from Richard Jinks this
+ fixes "make XPathtests" on linux
+
+Wed Mar 27 17:09:43 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * trionan.c trionan.h xpath.c: more patches from Richard Jinks
+ * test/XPath/expr/compare test/XPath/expr/equality
+ test/XPath/expr/floats test/XPath/expr/functions
+ test/XPath/expr/strings result/XPath/expr/compare
+ result/XPath/expr/equality result/XPath/expr/floats
+ result/XPath/expr/functions result/XPath/expr/strings: Updated
+ tests though they show a divergence on Linux
+
+Wed Mar 27 10:06:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c trionan.c: previous commit also included patches
+ from Richard Jinks on some IEEE support corner case
+
+Wed Mar 27 10:03:11 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * AUTHORS HACKING: Added Igor Zlatkovic as official maintainer
+ * python/Makefile.am python/tests/Makefile.am: Albert Chin pointed
+ that $(datadir) should be used for docs
+
+Tue Mar 26 13:43:16 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: Thomas Steinborn pointed out #76404 that libxml2
+ could leak filedescriptors
+
+Tue Mar 26 08:55:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in nanohttp.c: applied patch from Allan Clark for
+ UnixWare/OpenServer
+
+Mon Mar 25 17:45:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.19
+ * doc/*: rebuilt the docs
+
+Mon Mar 25 17:34:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * nanohttp.c: fixing #76043, got fed up with non-portability
+ of that piece of code.
+
+Mon Mar 25 13:08:21 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c SAX.c: Never commit without running "make tests" :-(
+ fix a couple of stupidities in the previous commit
+ * result/*: a few changes in some attribute order result of previous
+ commit.
+
+Mon Mar 25 11:46:05 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c SAX.c: fixed bug #76168, attribute redeclared in
+ the internal subset should not raise duplicate ID errors,
+ also there was a small bug in conjunction to namespace
+ declarations defaulted and xml:xxx attributes DTD definitions.
+
+Fri Mar 22 15:13:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: Richard Jinks also raised some rounding problems
+ this tries to fix them
+
+Fri Mar 22 13:22:09 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: Richard Jinks spotted an incoherent memory allocation
+ behaviour in xmlXPathCastToString()
+
+Thu Mar 21 14:25:29 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: fixed a bug in the ISO-Latin 1 to UTF8 encoder
+ raised by Morus Walter
+
+Thu Mar 21 14:07:13 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c include/libxml/xmlversion.h.in: applied 2 fixups
+ from Igor
+
+Thu Mar 21 13:30:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixing #75619, related to a problem when trying
+ to evaluate condition when the current node set resulting
+ from that sub-step evaluation is empty. Also fixes 2 potential
+ problem with previous-sibling and next-siblings axis.
+
+Thu Mar 21 09:03:59 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: patch from Mark Vakoc to build C14N if DocBook and
+ HTML support is not configured in.
+
+Wed Mar 20 22:42:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c error.c parser.c parserInternals.c tree.c xmlIO.c
+ include/libxml/tree.h: dohh I really didn't intended to commit
+ this test version :-(
+
+Wed Mar 20 20:20:57 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * testSAX.c: I wanted to see the real speed at the SAX interface
+ after a little too many Ximianer started complaining about the
+ parser speed.
+ added a --quiet option:
+ paphio:~/XML -> ls -l db100000.xml
+ -rw-rw-r-- 1 veillard www 20182040 Mar 20 10:30 db100000.xml
+ paphio:~/XML -> time ./testSAX --quiet db100000.xml
+ 3200006 callbacks generated
+ real 0m1.270s
+ Which means 16MBytes/s and 3Mcallback/s
+
+Tue Mar 19 19:33:57 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: valgrind spotted another error that time when running
+ on libxslt regression tests
+
+Tue Mar 19 15:24:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: adding "make valgrind" running the full regression
+ tests (except python ones) under Valgrind (using valgrind -q
+ which was kindly added by the author).
+ * valid.c: stupid bug pinpointed by Valgrind, the regression tests
+ passes cleanly now except an obcure floating point initialization
+ raised in log10() in one XPath regression test ???
+ * tree.c: edited some comments to close #75244
+
+Tue Mar 19 12:15:20 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: pretty insane thing, the xmlXPathFormatNumber()
+ was not serializing 1 as "1" if LC_ALL=sv_SE :-( and in the
+ context of ScrollKeeper, made sure that if the number is
+ an integer, the serialization follows the description at
+ http://www.w3.org/TR/xpath#section-String-Functions
+
+Mon Mar 18 19:18:13 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.18
+ * doc/*: updated and rebuilt the web site
+ * *.c libxml.h: implement the new IN_LIBXML scheme discussed with
+ the Windows and Cygwin maintainers.
+ * parser.c: humm, changed the way the SAX parser work when
+ xmlSubstituteEntitiesDefault(1) is set, it will then
+ do the entity registration and loading by itself in case the
+ user provided SAX getEntity() returns NULL.
+ * testSAX.c: added --noent to test the behaviour.
+
+Mon Mar 18 12:44:23 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Wilfried Teiken provided a hackish but working
+ way to get context reported back on entities when parsing
+ with SAX and without breaking the DOM build.
+
+Sun Mar 17 11:31:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: applied a new patch from Aleksey Sanin
+ * doc/site.xsl doc/xml.html doc/*.html: updated the documentation
+ to reference Aleksey implementation of XML digital Signatures
+
+Sat Mar 16 23:01:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: small fix to avoid potential problem due to
+ ordering of freeing data
+ * python/Makefile.am: people were complaining about
+ the generated file in python dir not being built
+
+Fri Mar 15 23:21:40 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in python/Makefile.am python/tests/Makefile.am
+ python/generator.py python/libxml.c python/types.c: Cleanup
+ of the python Makefiles based on Jacob and James feedback,
+ fixed the spec file accordingly, fixed the number of warning
+ that passing my pedantic CFLAGS was generating. Conclusion
+ is that Python includes are real crap.
+
+Fri Mar 15 19:41:25 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure,in: it was reported quite a few times that
+ xml2-config --cflags should not output
+ -I$includeprefix/libxml2/libxml because libxml2 header names
+ clashes with existing names like list.h from C++ stl.
+ Includes should be #include<libxml/xxx.h> so ...
+
+Fri Mar 15 10:41:50 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: another patch from Aleksey Sanin
+
+Fri Mar 15 08:55:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: applied patch from Aleksey Sanin fixing a problem in the
+ canonicalization algorithm
+ * doc/xml.html doc/index.html: added the C14N references on the
+ index page.
+
+2002-03-13 jacob berkman <jacob@ximian.com>
+
+ * python/Makefile.am: remove LDADD and CFLAGS as this is broken
+ usage, redundant, and gcc specific
+
+Wed Mar 13 11:00:59 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: speedup some node selection operations, this can
+ have a significant impact on DocBook Norm's stylesheets
+ * nanohttp.c: someone reported that SOCKLEN_T may not be defined
+ make sure it's always the case
+ * debugXML.c: distinguish CDATA and comments in ls operations
+
+Tue Mar 12 19:45:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/*.h: Heiko W. Rupp fixed a lot of comments
+ to generate better API descriptions etc...
+
+Mon Mar 11 10:10:30 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: Fixing #74186, made sure all boolean expressions
+ get fully parenthesized, ran indent on the output
+ * configure.in HTMLtree.c SAX.c c14n.c debugXML.c tree.c xpointer.c
+ include/libxml/tree.h: also #74186 related, removed the
+ --with-buffers option, and all the preprocessor conditional
+ sections that were resulting from it.
+
+Sun Mar 10 17:47:58 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: applied patch from Dodji Seketeli fixing an
+ uninitailized variable in xmlValidGetValidElements()
+
+Sat Mar 9 15:10:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * c14n.c: fixed a few comments
+ * doc/*.html doc/*/*.html: regenerated the docs and added
+ the C14N API
+ * doc/api.xsl doc/gnome-xml.sgml: fixups and added IDs
+
+Sat Mar 9 11:16:11 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: fix to adapt varaiations in the
+ bindings
+ * configure.in python/setup.py python/setup.py.in: fixed to
+ have the version of the python scripts automatically updated
+
+Fri Mar 8 16:45:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed a bug newly introduced and pointed by Uwe Fechner
+ in xmlCopyProp()
+
+Fri Mar 8 15:49:10 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.17 release
+ * doc/*: updated and rebuilt the docs
+ * xpath.c: fixed a comment
+ * python/libxml.c: fixed a possible reentrancy problem
+
+Thu Mar 7 23:19:28 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c python/tests/Makefile.am python/tests/attribs.py:
+ fixed xmlHasNsProp() bugs for defaulted from DTD attribs,
+ added a specific regression test
+ * python/generator.py: xmlHasNsProp() and xmlHasProp() shall
+ not raise exceptions when failing to find the attribute.
+
+Thu Mar 7 16:11:35 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xmllint.c: owen pointed out a problem with the
+ ftme fix, gettimeofday() was not detected by configure and
+ the ftime header wasn't included, dohhh
+
+Thu Mar 7 12:19:36 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in xmllint.c: trying to fix #71457 for timing
+ precision when gettimeofday() is not availble but ftime() is
+
+Thu Mar 7 11:24:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in doc/Makefile.am: Fixed #73408 missing images
+ are now copied on install and part of the -devel RPM
+
+Thu Mar 7 09:34:16 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: trying to avoid bug #72150 which was apparently
+ caused by a gcc bug (or a processor problem) as detailed
+ at http://veillard.com/gcc.bug
+
+Thu Mar 7 01:02:37 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c python/tests/Makefile.am python/tests/cutnpaste.py:
+ fixed xmlReconciliateNs(), added a Python test/example for
+ inter-document cut'n paste
+ * python/libxml.py: fixed node.doc on document nodes and added
+ xpathEval() onto node objects
+
+Wed Mar 6 22:38:03 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c: fixed some htmlSetMetaEncoding() problems
+ * python/libxml.c python/tests/Makefile.am python/tests/serialize.py:
+ fixup and integrated tests for the serialization stuff
+
+Wed Mar 6 19:40:57 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am libxml.3 libxml.4 libxml.spec.in: Fixed bug #72570
+ moved the libxml man page to section 3
+
+Wed Mar 6 18:34:07 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fix bug #72490
+ * python/libxml.c python/libxml.py: added methods serialize()
+ and saveTo() to all node elements.
+
+Tue Mar 5 21:27:03 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: closed #73430, don't read from an input source
+ which indicated an end-of-file or an error.
+
+Tue Mar 5 16:33:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: make sure SAX endDocument is always called as
+ this could result in a Python memory leak otherwise (it's
+ used to decrement ref-counting)
+ * python/generator.py python/libxml.c python/libxml.py
+ python/libxml2-python-api.xml python/libxml2class.txt
+ python/tests/error.py python/tests/xpath.py: implemented
+ the suggestions made by Gary Benson and extended the tests
+ to match it.
+
+Tue Mar 5 10:35:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py: applied patch fixing #73450
+
+Mon Mar 4 17:59:29 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixing #61290 "namespace nodes have no parent"
+ long standing divergence from the XPath REC. NodeSets
+ simply hold a copy of namespace nodes and those node ->next
+ points to the parent (which may not be the node carrying the
+ definition).
+ * include/libxml/xpath.h: flagged but didn't added a possible
+ speedup
+ * DOCBparser.c HTMLparser.c: removed some warnings from push
+ parser due to new state being added.
+ * tree.c: new fix from Boris Erdmann
+ * configure.in c14n.c include/libxml/c14n.h testC14N.c: added
+ the XML Canonalization support from Aleksey Sanin
+
+Sun Mar 3 15:12:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: patch from Boris Erdmann fixing some namespace odities
+ with xmlCopyNode()
+
+Sat Mar 2 10:33:04 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: fix bug #72706 when loading a NULL entity
+
+Fri Mar 1 17:14:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: Fixed #72346, about handling of xmlns:foo="", this could
+ actually change in a future XML Namespace revision.
+
+Fri Mar 1 17:12:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/types.c python/tests/Makefile.am python/tests/xpathret.py:
+ added the possibility of returning nodesets from XPath extension
+ functions written in Python
+
+Fri Mar 1 13:56:12 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/*: commiting some Python bindings work done while travelling
+
+Fri Mar 1 10:11:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: close #72663 and #72658, don't memdump unless compiled
+ explicitely with memory debugging switched on
+
+Sat Feb 23 11:08:09 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt python/libxml_wrap.h python/types.c:
+ Added wrapper for the xmlURIPtr type, provided accessors, fixed
+ the accessor generator for strings
+ * python/tests/Makefile.am python/tests/tstURI.py: added a specific
+ regression test.
+
+Fri Feb 22 23:44:57 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/README python/generator.py python/libxml.c python/setup.py:
+ added the 'usual' setup.py to allow building a libxml2-python
+ module based on the same code. The initialization is however
+ different the 2 .so files fo libxml2 and libxslt are identical and
+ they entry point initialize both libraries. this is done to avoid
+ some possible nasty problem since the Python don't merge the maps
+ of all shared modules.
+
+Wed Feb 20 23:16:08 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed a push/encoding bug reported by Michael
+ on librsvg
+
+Wed Feb 20 19:54:05 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parserInternals.h: fixes a misplaced #endif
+
+Wed Feb 20 17:47:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c valid.c: found and fixed a couple of allocation bugs
+
+Wed Feb 20 15:36:03 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xml.html doc/python.html doc/*: added a Python and binding
+ page describing the current state of the Python bindings and
+ giving pointers to the other languages wrappers.
+
+Wed Feb 20 11:16:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing 2.4.16
+ * doc/* python/libxml2class.txt: updated and rebuilt the docs,
+ rebuilt the API and web site
+ * xpath.c: fixed #71978 portability bugs
+
+Tue Feb 19 22:49:36 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: oops broke automatic defaulting of namespaces attributes.
+
+Tue Feb 19 22:01:35 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parserInternals.h parser.c: had to change
+ 2 internal parsing API when processing document content
+ to check the start and end of element content are defined
+ in the same entity
+ * valid.c include/libxml/valid.h: attribute normalization can
+ generate a validity error added xmlValidCtxtNormalizeAttributeValue()
+ with the context to report it.
+ * SAX.c: fixed the last known bugs, crazy validation constraints
+ when a document is standalone seems correctly handled. There
+ is a couple of open issues left which need consideration especially
+ PE93 on external unparsed entities and standalone status.
+ Ran 1819 tests: 1817 suceeded, 2 failed and 0 generated an error in 8.26 s.
+ The 2 tests left failing are actually in error. Cleanup done.
+
+Tue Feb 19 15:17:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: implemented E59 spaces in CDATA does not match the
+ nonterminal S
+
+Tue Feb 19 14:44:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c parser.c valid.c: more validation test fixups
+ * check-xml-test-suite.py: added duration info for the tests
+
+Mon Feb 18 23:25:08 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c valid.c: a couple of errors were reported but not
+ saved back as such in the parsing context. Down to 1% failure rate
+ Ran 1819 tests: 1801 suceeded, 18 failed and 0 generated an error
+
+Mon Feb 18 20:16:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlInternald.c: isExtender was missing a char
+ * parser.c include/libxml/parser.h: % are acceptable in the
+ internal subset if within a PUBLIC ID
+
+Mon Feb 18 19:27:32 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c parserInternals.c valid.c: more work on the conformance
+ suite. Took the step to finally block documents with encoding
+ errors. It's a fatal error per the spec, people should have fixed
+ their documents by now.
+
+Mon Feb 18 15:30:14 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: fixed the test script after some discussion
+ on the semantic of TYPE="error"
+ * Makefile.am: added the script to the distrib
+
+Mon Feb 18 12:17:41 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c entities.c: fixed a couple of conformances issues deep
+ into the validation code (standalone and undeclared Notations)
+
+Mon Feb 18 00:17:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed #71741 supid typo an a bug about encoding parsing
+ stayed there for years !
+
+Mon Feb 18 00:06:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c SAX.c: fixed #71740 NotationDecl with a required field
+ missing
+
+Sun Feb 17 23:45:40 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: improved the behaviour a bit as
+ well as the logs
+ * parser.c valid.c SAX.c: fixed a few more bugs
+ "Ran 1819 tests: 1778 suceeded, 41 failed, and 0 generated an error"
+
+Sun Feb 17 20:41:37 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * check-xml-test-suite.py: python script to run regression tests
+ against the XML Test suite of W3C/OASis
+ * SAX.c: fixed a validation bug
+ * parser.c: fixed 3 errors pointed by the test suite
+ * doc/buildDocBookCatalog: fixed a typo pointed by drake
+ * python/Makefile.am: fixed a dependendy
+
+Fri Feb 15 21:47:13 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: avoid a warning bug #71594
+
+Wed Feb 13 22:13:33 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: Jesse Perry provided a patch to remove a few
+ warning on alpha/Tru64
+
+Wed Feb 13 14:30:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/entities.h: fixing a comment
+ * valid.c: fixing some troubles with validity check on namespaces
+ * result/VC/NS3 test/VC/NS3: added a specific regression test
+
+Wed Feb 13 14:05:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Fixing #71342 serializing '\n' in attribute values
+ * result/noent/att3 result/att3 test/att3: added a specific
+ test.
+
+Tue Feb 12 14:45:32 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c: couple of bug fixes
+
+Mon Feb 11 19:41:29 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/*.py: removed tabs and used spaces.
+
+Mon Feb 11 19:25:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing 2.4.15
+ * doc/news.html doc/xml.html doc/xmlio.html: rebuilt some docs
+
+Mon Feb 11 14:53:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmlcatalog_man.xml: trying to close Red Hat bug #58707
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=58707
+
+Mon Feb 11 09:53:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/encoding.h include/libxml/entities.h
+ include/libxml/globals.h include/libxml/parser.h
+ include/libxml/threads.h include/libxml/tree.h
+ include/libxml/xmlmemory.h: trying to fix the include mess
+
+Mon Feb 11 08:53:33 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlmemory.h: reverted part of the previous
+ attempt to provide #69655, this was breaking the build.
+
+Sun Feb 10 14:13:34 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c Makefile.am build_glob.py configure.in debugXML.c
+ globals.c parser.c threads.c tree.c valid.c xmlmemory.c
+ xpath.c xpointer.c include/libxml/globals.h include/libxml/parser.h
+ include/libxml/parserInternals.h include/libxml/tree.h
+ include/libxml/xmlmemory.h include/libxml/xpathInternals.h:
+ Tentatively fixed #69655 , make compiling with -Wredundant-decls
+ clean.
+ * python/libxml.c: fixed a warning.
+
+Sun Feb 10 12:02:59 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c valid.c xinclude.c: fix #68882, cleanup the XInclude
+ copying of node, merge back IDs in the target document.
+ * result/XInclude/docids.xml test/XInclude/docs/docids.xml
+ test/XInclude/ents/ids.xml: test case
+ * result/VC/ElementValid4: output changed due to a typo fix
+
+Sat Feb 9 23:15:04 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: seems some version of automake didn't
+ generate the dependencies right as Jacob found out. Add
+ an extra dependency rule.
+
+Sat Feb 9 18:59:23 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c valid.c: Justin Fletcher found some parts
+ of the code needing cleanup
+ * libxml.spec.in python/Makefile.am python/generator.py
+ python/libxml.c python/libxml.py: Fixed the python Makefiles
+ corrected a bug showing up on ia64, changed the name of the
+ python internal module too
+
+Fri Feb 8 15:19:28 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: applied patch from Andris Pavenis for binary
+ name suffixes
+
+Fri Feb 8 14:43:17 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c win32/win32config.h: fixing #68748
+
+Fri Feb 8 14:37:05 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixing #70166
+
+Fri Feb 8 14:31:24 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixing #70077
+
+Fri Feb 8 14:24:02 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Copyright Makefile.am README configure.in libxml.spec.in:
+ Changed to the MIT Licence
+ * doc/FAQ.html doc/catalog.html doc/intro.html doc/xml.html
+ doc/xmlio.html: updated the doc accordingly
+ * include/libxml/xmlwin32version.h configure.in: preparing
+ 2.4.14 release
+ * python/generator.py python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt python/libxml_wrap.h python/types.c:
+ fixed the const xmlChar * wrapper and generator, XPath extension
+ functions now use the context as first argument
+ * python/tests/tstxpath.py python/tests/xpath.py
+ python/tests/xpathext.py: Updated the tests accordingly
+ * tree.c: fixed bug #70067
+
+Thu Feb 7 17:33:58 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: cleanup
+ * debugXML.c: always use stdout if output is NULL
+ * xmlIO.c: don't close filedescriptors passed to outputBuffers
+ * python/Makefile.am python/generator.py python/libxml2class.txt
+ python/libxml_wrap.h python/types.c: augmented the number of bindings
+ handling FILE * and XPath contexts
+ * python/tests/Makefile.am: avoid a stupid problem due to the
+ use of TEST.
+
+Wed Feb 6 23:37:07 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: fixed stupid bug #70738 found by alfons hoogervorst
+
+Wed Feb 6 17:04:51 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/TODO python/libxml.c: cleanup the extension function lookup
+ * xmlmemory.c include/libxml/xmlmemory.h: always compile the list
+
+Tue Feb 5 17:33:30 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in python/Makefile.am: do not install outside
+ of prefix
+
+Mon Feb 4 15:05:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/TODO python/libxml.c: started adding SAX interfaces
+ * python/tests/Makefile.am python/tests/pushSAX.py: added a basic
+ SAX test
+
+Mon Feb 4 01:12:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: hardened the addChild function
+ * python/generator.py python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt python/libxml_wrap.h python/TODO:
+ added accessors needed for xmlNode, a bit more testing and
+ extension of interfaces
+ * python/tests/Makefile.am python/tests/build.py: added a test
+ build from scratch/save/load/check
+
+Sun Feb 3 21:10:39 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: change a small bit in the way valididy
+ error messages get initialized
+ * python/TODO python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt python/libxml_wrap.h python/types.c:
+ added some memory debugging to track leaks at the libxml2 level
+ * python/tests/*.py: changed all tests to check for leaks,
+ there is just one left in XPath extension registrations.
+
+Sun Feb 3 17:50:46 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/TODO python/generator.py python/libxml2-python-api.xml
+ python/libxml2class.txt: more accessor classes for the parser
+ context, allow to switch on and check validity
+ * python/tests/Makefile.am python/tests/error.py
+ python/tests/invalid.xml python/tests/valid.xml
+ python/tests/validate.py: attded more test and and added error.py
+ which I forgot to commit in the last step
+
+Sun Feb 3 16:03:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/types.c: cleanup
+ * python/libxml.c python/libxml.py python/libxml_wrap.h
+ python/generator.py python/libxml2-python-api.xml
+ python/libxml2class.txt: added class for parser context, added
+ first cut for push mode support. Added a framework to generate
+ accessors functions.
+ * python/tests/Makefile.am python/tests/push.py: added a push
+ test
+
+Sun Feb 3 00:17:26 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/TODO python/libxml.py: fixed a small
+ bug a bit of cleanup.
+
+Sat Feb 2 22:47:10 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt: adding error redirections and preformat
+ to a python handler
+ * python/tests/Makefile.am python/tests/*.py: cleanup made all
+ tests self checking
+
+Sat Feb 2 13:18:54 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/libxml.c python/libxml.py: fixed a stupid bug when renaming
+ a function
+
+Sat Feb 2 11:25:51 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in python/Makefile.am python/TODO python/generator.py
+ python/libxml.c python/libxml2-python-api.xml
+ python/libxml2class.txt: Progressing through the TODOs, class
+ description output, extra XML API, RPM now builds the wrappers
+ for all python installed versions
+
+Sat Feb 2 10:13:52 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in libxml.spec.in python/Makefile.am python/TODO
+ python/generator.py python/libxml2class.txt: added more informations
+ in the libxml2-python package including docs. Slightly changed
+ the class hierarchy
+ * python/tests/*: added basic regression tests infrastructure too
+
+Fri Feb 1 23:11:58 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in libxml.spec.in example/Makefile.am python/Makefile.am:
+ added libxml2-python as part of the packages installed
+
+Fri Feb 1 18:48:19 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/generator.py python/libxml.c
+ python/libxml.py: more work, now able to extend the
+ XPath interpreter with functions written in python.
+
+Fri Feb 1 10:28:51 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am: Jacob sent a patch to allow building from
+ tarfile.
+
+Fri Feb 1 00:40:48 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/Makefile.am python/libxml.c configure.in Makefile.am:
+ inserted the python wrappers build, I hope this won't be too
+ unportable
+
+Thu Jan 31 21:27:37 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: minor optimization
+ * python/generator.py python/libxml.c python/libxml.py
+ python/libxml_wrap.h: more work on the python bindings,
+ they now support XPath and there is no evident leak
+
+Thu Jan 31 00:48:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml.py:
+ more work on the python bindings generator.
+
+Wed Jan 30 21:51:26 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml_wrap.h:
+ more work on the python bindings.
+
+Wed Jan 30 17:35:33 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * python/generator.py python/libxml.c python/libxml.py
+ python/libxml_wrap.h: commited early version of a python binding
+ for private use only ATM
+
+Sat Jan 26 22:41:13 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c tree.c include/libxml/entities.h: applied patch
+ from Anthony Jones to implement copy of DTD subtree too. Had
+ just to keep 2 function private which really ought to become
+ public ones.
+
+Fri Jan 25 15:14:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: added pointers to the web pages in the usage()
+
+Thu Jan 24 17:04:04 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: more fixes from Petr Kozelka for attribute handling
+ in the tree API to align the semantic with DOM.
+
+Thu Jan 24 16:00:53 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c tree.c entities.c: another set of patches from
+ Anthony Jones for copy operations cleanup and robustness
+
+Wed Jan 23 18:53:55 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/APIchunk*.html doc/parsedecl.py doc/api.xsl: generated
+ an alphabetic index based on comments content
+ * doc/*: rebuilt the web site with the new references
+
+Wed Jan 23 15:14:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.h: Greg Sjaardema suggested to use an
+ eponential buffer groth policy in xmlParserAddNodeInfo()
+
+Wed Jan 23 13:32:40 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/api.xsl doc/APIconstructors.html doc/APIfiles.html
+ doc/APIfunctions.html doc/APIsymbols.html doc/libxml2-refs.xml
+ doc/parsedecl.py doc/Makefile.am: updated the python extractor
+ to generate cross-references, and added/updated the stylesheets
+ to generate and link API indexes. The generic keyword index
+ is not done yet.
+ * doc/*.html: regenerated all the usual docs too
+
+Tue Jan 22 23:11:26 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: added an xpath function to the shell for T. V. Raman
+
+Tue Jan 22 22:42:23 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: patch from Anthony Jones to catch NULL nodes in
+ debug routines.
+
+Tue Jan 22 22:38:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: apply an patch from Petr Kozelka for unlink and replace
+ support of attribute nodes
+
+Tue Jan 22 19:12:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/libxml2-api.xml doc/parsedecl.py: Build a new version
+ hopefully near complete and fully documented of the API in XML
+ * HTMLtree.c SAX.c debugXML.c error.c globals.c parser.c tree.c
+ xmlIO.c xmlmemory.c include/libxml/catalog.h include/libxml/hash.h
+ include/libxml/list.h include/libxml/parser.h include/libxml/tree.h
+ include/libxml/parserInternals.h include/libxml/valid.hi
+ include/libxml/xmlIO.h include/libxml/xmlerror.hi
+ include/libxml/xmlmemory.h include/libxml/xmlversion.h.ini
+ include/libxml/xpath.h include/libxml/xpathInternals.h:
+ Cleaned up the doc comments a lot in the process, the interface
+ coverage is now 100%
+
+Tue Jan 22 00:12:58 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/libxml2-api.xml doc/parsedecl.py: improved the script to
+ extracts comments from the gtk-doc DocBook output (a bit
+ convoluted but seems to work).
+
+Mon Jan 21 18:29:19 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am doc/Makefile.am doc/libxml2-api.xml doc/parsedecl.py:
+ added an XML description of the API, moved the script generating
+ it here. Added a "make api" target
+
+Mon Jan 21 14:34:37 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Adam Lounds pointed out a bug in xmlSearchNs()
+
+Mon Jan 21 09:55:21 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c include/libxml/xpathInternals.h: the change made to
+ xmlXPathFuncLookupFunc was incompatible roll it back
+
+Sun Jan 20 23:03:41 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: cleanup patch from Anthony Jones
+ * doc/Makefile.am: fix the headers to avoid in make scan
+ * parserInternals.c xpath.c include/libxml/*.h: cleanup of the
+ includes, * vs Ptr and general cleanup
+ * parsedecl.py: first version of a script to extract the
+ module interfaces, the goal will be to provide .decl or XML
+ specification of the interfaces to build wrappers.
+
+Sun Jan 20 13:38:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/xmlcatalog_man.xml xmlcatalog.c: Fixed bug #68830, xmlcatalog
+ now provides return codes in case of errors
+
+Sat Jan 19 16:36:21 CET 2002 Bjorn Reese <breese@users.sourceforge.net>
+
+ * trio.h trio.c triodef.h triop.h trionan.h trionan.c Makefile.am:
+ Upgraded to trio baseline 1.6
+ * strio.h strio.c: Replaced by triostr.h and triostr.c
+
+Fri Jan 18 17:22:50 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c xmlIO.c xmlcatalog.c: removed the last occurences
+ of strdup usage in the code
+
+Fri Jan 18 12:47:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c error.c: Keith Isdale complained rightly that
+ xmlInitParser() did not preserve value set by xmlSetGenericErrorFunc
+
+Thu Jan 17 09:44:44 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed the funxtion to set the xml: attributes
+ * debugXML.c: added "setbase" to test it.
+
+Wed Jan 16 16:36:08 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: update xmlNodeSetContent() and xmlNodeSetContentLen()
+ to allow updating an attribute content
+
+Tue Jan 15 18:09:23 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h: try to avoid problems when compiling on Windows
+
+Mon Jan 14 18:56:25 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * hash.c: patch from Anthony Jones for hash.c allocation size
+ * Makefile.am: trying to work around Yet Another Libtool Madness
+ and build the 2.4.13 release finally ...
+
+Mon Jan 14 18:27:19 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: updated to 2.4.13
+ * doc/* : update of the documentation
+
+Mon Jan 14 17:53:41 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c tree.c: some cleanup after an unsuccessful attempt
+ at fixing #61290 :-(
+
+Sun Jan 13 21:30:54 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed xmlSaveFormatFileEnc() when encoding == NULL
+ Fixes bug #67229
+
+Sun Jan 13 17:14:06 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: trying to avoid troubles when a subtree is copied
+ and coalesced in part with the target tree. Should fix
+ bug #67407
+
+Sun Jan 13 16:37:15 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed validation of attributes content of type
+ NAME NAMES NMTOKEN and NMTOKENS to accept internationalized
+ values, very old bug. Fixes #67671
+
+Sun Jan 13 15:07:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c include/libxml/parserInternals.h tree.c: integrated
+ a couple of fixes and a new API function xmlSetEntityReferenceFunc()
+ from Keith Isdale and dedicated to xsldbg the XSLT debugger.
+
+Sun Jan 13 14:23:21 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: applied Serguei Narojnyi's patch to add native
+ thread support on the Win32 platform
+ * testThreadsWin32.c Makefile.am: added the test program also
+ from Serguei, Win32 specific
+ * include/win32config.h include/libxml/xmlwin32version.h.in:
+ added patch from Igor for the Windows thread specific defines.
+
+Wed Jan 9 12:50:39 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: Anthony Jones pointed a bug in xmlCopyEntity()
+
+Tue Jan 8 14:23:22 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*.html doc/site.xsl doc/Makefile: renamed XML.html
+ output page into XMLinfo.html. Close bug #66951 and
+ raised by Robert Collins too.
+
+Tue Jan 8 14:13:18 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c: Paul Keogh pointed out a possibility of segfault
+ on repeted xmlAddEncodingAlias() / xmlCleanupEncodingAlias().
+ Closes bug # 68238
+
+Tue Jan 8 12:48:27 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/*.html: updated the Gdome2 links
+
+Tue Jan 8 11:32:30 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h: Applied following patches from Robert Collins
+ and make sure IN_LIBXML is defined when compiling it
+ -------
+ * include/libxml/xmlversion.h.in (LIBXML_DLL_IMPORT): Use on Cygwin
+ as well as Visual C.
+ * parser.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
+ * parserInternals.c (XML_DIR_SEP): Don't use '\\' for Cygwin.
+ * strio.c (PLATFORM_UNIX): Define for Cygwin.
+ * triodef.h (TRIO_PLATFORM_UNIX): Define for Cygwin.
+ * xmlIO.c (xmlFileOpen): Use unix behaviour for Cygwin.
+ Use binary mode opens for Cygwin (xmlFileOpenW xmlParserGetDirectory
+ xmlSysIDExists xmlNoNetExists).
+ * xmllint.c: Don't include winsock2.h for Cygwin.
+
+Mon Jan 7 17:52:48 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Jirka Kosek pointer out a bug in xmlParseTextDecl()
+ when the version info is not present.
+
+Mon Jan 7 00:03:58 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Anthony Jones pointed out a problem in
+ xmlStringGetNodeList() and provided a fix for it
+
+Sun Jan 6 13:45:49 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: patch from Frank J Franklin to remove a bug in
+ xmlCreatePushParserCtxt() when the initial buffer passed
+ is large.
+
+Sat Jan 5 19:24:23 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * win32/*: big cleanup of the Windows/MSVC project files
+ from Igor Zlatkovic
+
+Wed Jan 2 14:11:35 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * doc/Makefile.am: should fix #67674 and avoid troubles if
+ xsltproc is not available or fails in the prefix provided
+
+Tue Jan 1 17:48:56 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * xmlmemory.c: one more doc patch from Charlie Bozeman.
+
+Mon Dec 31 17:35:40 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c parser.c valid.c include/libxml/parserInternals.h
+ include/libxml/xmlerror.h include/libxml/xpathInternals.h:
+ Fixed a few other problems raised by Charlie Bozeman.
+ * result/VC/ElementValid[5-7]: fixed the output
+
+Mon Dec 31 17:13:34 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * *.c include/libxml/*.h doc/html/*: applied 42 documentation
+ patches from Charlie Bozeman. Regenerated the HTML docs.
+
+Thu Dec 20 14:59:52 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/debugXML.h win32/dsp/libxml2.def.src: fixes
+ for Windows from Igor
+
+Tue Dec 18 12:13:33 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: applied Justin Fletcher patch for --output or -o
+
+Tue Dec 18 08:52:32 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/libxml2/libxml2.def.src: close #67019
+
+Tue Dec 18 08:08:51 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: applied Justin Fletcher generic timing patch
+ similar to the one already applied to xsltproc.
+
+Mon Dec 17 16:29:08 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h tree.c: applied documentation patches
+ from Charlie Bozeman
+
+Thu Dec 13 21:24:16 MST 2001 John Fleck <jfleck@inkstain.net>
+
+ *doc/xmllint.xml, xmllint.1 - document --dropdtd
+
+Thu Dec 13 23:19:50 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fix the xmlStrdup() used in the previous patch.
+ * valid.c: added --dropdtd
+ * tree.c: fixed xmlUnlinkNode so it also removes the references
+ from the document if the node is a DTD
+
+Thu Dec 13 15:54:35 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c valid.c: cleanup some static declarations
+
+Thu Dec 13 15:23:04 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: removed another strdup()
+ * doc/FAQ: removed the HP/UX entry
+
+Thu Dec 13 09:44:58 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fix bug #66816 when validating.
+ * xmllint.c: don't use sys/time.h if configure did not found it
+
+Mon Dec 10 21:39:55 MST 2001 John Fleck <jfleck@inkstain.net>
+
+ * docs/xmllint.1, xmllint.xml, xmlcatalog.1, xmlcatalog_man.html,
+ xmlcatalog_man.xml
+
+Mon Dec 10 22:06:16 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlmemory.h: Hietaniemi Jarkko pointed out that
+ xmlInitMemory() was declared twice
+
+Sun Dec 9 14:59:23 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: do not reference strdup() !
+ * configure.in libxml-2.0.pc.in: trying to fix the libs
+ of the various config extraction modules
+
+Fri Dec 7 15:21:33 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in : preparing 2.4.12
+ * doc/* : updated and rebuilt the docs
+
+Fri Dec 7 12:32:00 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: closed bug #66159
+ * testURI.c: added --escape option
+ * configure.in: some cleanup for xml2-config --cflags
+
+Thu Dec 6 15:31:30 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c testThreads.c: removed some misplaced includes
+ of xmlversion.h
+
+Thu Dec 6 09:06:08 EST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * threads.c: patch from Gary Pennington fixing a possible
+ problem at initialization time.
+
+Wed Dec 5 13:01:37 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in libxml.h parser.c testThreads.c macos/: integrated
+ Eric Lavigne contribution to build libxml2 on MacOS using
+ CodeWarrior.
+
+Tue Dec 4 14:13:44 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: applied Geert Kloosterman's patch to fix
+ --repeat --timing output
+
+Thu Nov 29 17:10:22 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Robin Berjon <robin@knowscape.com> found a case
+ where non-wellformed XML declaractions were not detected.
+
+Wed Nov 28 15:41:40 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpointer.c: fixed a compilation bug pointed by Danny Jamshy
+
+Wed Nov 28 10:09:51 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: as robert pointed again, xmlInputCallbackInitialized
+ gets reset by xmlCleanupInputCallbacks() and this makes the
+ function useless. Same for output.
+
+Tue Nov 27 17:22:36 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: robert pointed out a loop error in callback cleanups
+
+Mon Nov 26 16:56:00 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c debugXML.c include/libxml/tree.h include/libxml/debugXML.h:
+ moved xmlGetLineNo() and xmlGetNodePath() into the main tree module,
+ they are not really tied to debugging
+
+Mon Nov 26 11:31:36 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing 2.4.11
+ * xmllint.c: better --catalogs description
+
+Sun Nov 25 11:34:24 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: fixed a couple of problems in xmlSetProp()
+
+Thu Nov 22 19:19:10 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c tree.c xmlIO.c xmlmemory.c: some cleanups when chasing
+ unappropriate stdout output.
+
+Thu Nov 22 13:58:14 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h: Fixed a couple of macro errors pointed out
+ by Denis Beurive, closes #65111
+
+Tue Nov 20 10:34:01 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: in case of content model validity error, don't
+ print it if validity warnings were not requested.
+
+Tue Nov 20 09:30:02 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: applied a couple of patches from Brian D Ripley.
+ * parserInternals.c: removed the last exit() call. Print an
+ unmaskable error on stderr instead (library mismatch detection)
+
+Sat Nov 17 17:16:51 MST 2001 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmllint.xml, doc/xmllint.1 - update xmllint man page with
+ shell instructions from Heiko Rupp
+
+Thu Nov 15 14:53:42 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: use the URL notation file:// for default catalog paths
+
+Wed Nov 14 16:03:02 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/tree.h: better comments for _private fields
+ * tree.c: removed a problem when copying an entity reference.
+
+Tue Nov 13 16:23:04 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * vms/*: updated instructions and diffs from John A Fotheringham
+
+Mon Nov 12 23:43:22 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlerror.h: avoid an include problem if
+ #include <libxml/xmlerror.h> happens first in code
+ seems to be the case in KDE libs
+
+Mon Nov 12 22:32:41 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/* include/libxml/xmlwin32version.h.in: update
+ from Igor for Windows
+
+Mon Nov 12 10:19:41 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: Gary Pennington pointed out a missing prefix
+
+Sat Nov 10 12:55:42 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: preparing 2.4.10
+ * doc/*: upgraded and rebuilt the docs
+
+Sat Nov 10 12:33:38 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fix comment in scripts element parsing.
+ * result/HTML/doc3*: updated the results.
+
+Sat Nov 10 11:18:18 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: another URI bug fix #63336, using Joel Young patch.
+
+Sat Nov 10 11:07:26 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/debugXML.h: add xmlGetNodePath()
+ a cleaned up version of the Pwd shell string generation.
+
+Fri Nov 9 00:34:13 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c include/libxml/tree.h: trying to fix namespaces +
+ validation problems for good, closing #63619 in the process
+ * result/valid/dia.xml test/valid/dia.xml: the Dia test was
+ wrong in this respect, fixed it.
+
+Thu Nov 8 18:31:40 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: Morus Walter patch to allow --format and --encode
+
+Thu Nov 8 14:52:18 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: Stefan Kost provided an help command for the shell
+
+Wed Nov 7 14:32:55 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: Heiko Rupp pointed that the shell would crash
+ on empty nodesets returns.
+
+Wed Nov 7 13:52:36 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: Weiqi Gao pointed out that xmlcatalog
+ migh need the history libraries
+
+Tue Nov 6 23:49:09 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c test/HTML/lt.html result/HTML/lt.html*:
+ handle the case of < in quoted attributes, Bastian Kleineidam
+
+Tue Nov 6 16:21:33 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in include/libxml/xmlwin32version.h: releasing 2.4.9
+ fixing catalog breakages
+ * Makefile.am catalog.c result/catalogs/catal
+ result/catalogs/mycatalog.* test/catalogs/catal*:
+ fixed more problems in catalog support, added more regression tests
+ for both XML and SGML catalog handling
+
+Mon Nov 5 20:26:41 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c: applied an improvement to xmlGetLineNo() from
+ Keith Isdale
+
+Mon Nov 5 15:20:16 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: dohhhh XML catalog add and remove ops were broken too.
+ Side effect of the progressive catalog loading
+
+Mon Nov 5 12:40:54 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: confexecdir and confexec_DATA were defined twice
+ pointed out by Karl Eichwalder
+
+Sun Nov 4 23:18:34 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmlcatalog.c: avoid unlink() and use remove() instead.
+
+Sun Nov 4 23:12:38 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.spec.in: cleanup
+ * include/libxml/xmlwin32version.h: updated with 2.4.8
+
+Sun Nov 4 21:17:24 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c global.data globals.c testThreads.c: fix bug #63752
+ of compiling libxml with a non standard set of options
+
+Sun Nov 4 13:11:41 MST 2001 John Fleck <jfleck@inkstain.net
+
+ * doc/xmllint.xml, xmllint.1 - updating xmllint man page to
+ document --sgml option, fixing gnome bugzilla #63382
+
+Sun Nov 4 20:56:53 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/catalog.h catalog.c: Fixed SGML catalogs
+ breakage of 2.4.7, added a couple of really needed APIs
+ like xmlCatalogIsEmpty() and xmlNewCatalog()
+ * xmlcatalog.c: updated --sgml --noout to be a suitable replacement
+ for install-catalog
+ * configure.in: preparing 2.4.8
+
+Thu Nov 1 15:29:31 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c tree.c include/libxml/HTMLtree.h
+ include/libxml/tree.h include/libxml/xmlIO.h: more include
+ cleanups, export cleanly one html output + format function.
+
+Thu Nov 1 14:12:12 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: removed initGenericErrorDefaultFunc call from
+ xmlInitParser() since it could destroy previous calls to
+ xsltSetGenericErrorFunc() effects
+
+Thu Nov 1 09:37:13 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * debugXML.c include/libxml/debugXML.h: bool can be a reserved
+ keyword.
+
+Wed Oct 31 18:50:08 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: cleanup
+ * threads.c: cleanup too
+ * xmlIO.c include/libxml/xmlIO.h: added xmlNoNetExternalEntityLoader()
+ from xsltproc
+ * include/libxml/tree.h include/libxml/parser.h: trying to break a
+ dependency loop.
+
+Tue Oct 30 18:38:53 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: Justin Fletcher pointed out that xmlParseXMLCatalog
+ was not used anymore !
+
+Tue Oct 30 13:33:13 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.7
+ * Makefile.am doc/Makefile.am: switched to the latest xmllint
+ manual page from John
+ * doc/*: updated the doc and rebuilt the generated pages
+
+Tue Oct 30 11:31:19 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: closing bug #62711, the library should never
+ close stdin or stdout.
+
+Tue Oct 30 10:46:12 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: second pass at fixing #63336, using Joel Young
+ final patch. looks okay.
+
+Tue Oct 30 00:56:05 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c include/libxml/uri.h: trying to clear #63336
+ allowing the escaping routine to parse unconformant
+ URI-References.
+
+Mon Oct 29 19:09:46 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * vms/readme.vms vms/build_libxml.com nanoftp.c
+ include/libxml/xmlversion.h.in: a few VMS updates from
+ John A Fotheringham
+ * include/libxml/xmlIO.h xmlIO.c: added xmlCleanupInputCallbacks()
+ and xmlCleanupOutputCallbacks() for the Perl binding people.
+
+Mon Oct 29 12:44:17 CET 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c globals.c DOCBparser.c HTMLparser.c error.c:
+ apply fixes to close #63271 and avoid segfaults when
+ the error routine gets callbed before xmlInitParser()
+ get called.
+ * nanoftp.c error.c: Applied patches from Justin Fletcher
+ correcting some xmlGenericError misuses.
+
+Sat Oct 27 14:04:45 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ *doc/xmllint.xml, doc/xmllint.1
+ New and improved man page for xmllint - .xml is the original, .1
+ is the generated man page
+
+Wed Oct 24 14:34:25 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * doc/site.xsl doc/*.html doc/Makefile.am: now autogenerate
+ the web site from the main HTML document.
+
+Tue Oct 23 14:32:04 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixed an erroneous validation bug when PE refs
+ occurs in external parsed entities referenced from the
+ internals subset
+ * test/valid/index.xml test/valid/dtds/nitf-2-5.dtd
+ test/valid/dtds/NewsMLv1.0.dtd result/valid/index.xml*:
+ added the associated testcase, it's a nice one.
+ * HTMLparser.c: generate the DTD node as HTML still ...
+ * HTMLtree.c: fixed errors in Set/GetMetaEncoding
+
+Mon Oct 22 14:20:17 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: fixed a bug in htmlNewDoc()
+
+Mon Oct 22 11:32:36 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * test/threads/*: added entities testing to the Thread test
+ * testThreads.c: make the test reasonable
+ * DOCBparser.c: fix the DTD public and system ID
+ * xmllint.c: added --sgml for SGML DocBook importing
+ * Makefile.am: added Docbtests target
+
+Fri Oct 19 11:47:13 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * nanoftp.c: use only "anonymous@" string for anonymous passwds
+ * testThreads.c: removed bogus include
+
+Thu Oct 18 16:56:23 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c valid.c result/valid/rss.xml result/valid/rss.xml.err:
+ fixed a very serious (looping) validation bug
+
+Wed Oct 17 11:56:25 EDT 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/globals.h include/libxml/threads.h threads.c
+ testThreads.c: far more testing, cleaning up bugs
+ * *.c : make sure globals.h is always included.
+
+Wed Oct 17 17:41:41 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c: try to get rid of parser loops for good.
+
+Wed Oct 17 13:29:02 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: fixed some bugs in CFLAGS passing.
+ * test/threads Makefile.am testThreads.c: added a specific
+ threaded test case (really nasty, guaranteed).
+
+Tue Oct 16 23:01:49 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: serious cleanup on the management of the
+ XML catalog tree, more tests done, especially with
+ the catalog PI.
+
+Tue Oct 16 08:43:43 EDT 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: avoid a problem in catalog cleanup on SMP if
+ catalogs were not initialized.
+
+Tue Oct 16 14:33:19 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c xpath.c: trying to cleanup the not thread safe
+ parts of the library.
+
+Mon Oct 15 14:30:11 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/globals.h configure.in global.data: make
+ the allocation be per-thread a configure option
+ * encoding.c include/libxml/parser.h: fixed compilation
+ errors
+
+Mon Oct 15 12:45:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/parser.h: Norm reported that a few lines
+ added were breaking libxslt compile, removed them for now
+
+Sun Oct 14 05:55:01 EDT 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c parserInternals.c threads.c: debugged and fixed
+ initialization problems which were giving troubles on SMP
+ boxes.
+
+Sat Oct 13 16:17:13 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/Makefile.am: missing globals.h
+
+Sat Oct 13 14:15:00 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * globals.c: added a couple of standard includes.
+
+Sat Oct 13 11:08:20 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
+ include/libxml/parserInternals.h include/libxml/tree.h
+ include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
+ nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
+ testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
+ Applied the last patches from Gary, cleanup, activated threading
+ all user accessible global variables are now handled in globals.[ch]
+ Still a bit rought but make tests passes with either
+ --with-threads defined at configure time or not.
+ * Makefile.am example/Makefile.am: added globals.[ch] and threads
+ linking options
+
+Fri Oct 12 19:25:55 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am include/libxml/Makefile.am
+ include/libxml/globals.h globals.c include/libxml/threads.h
+ threads.c build_glob.py global.data xmlcatalog.c acconfig.h
+ configure.in: started integrating the core of the thread support
+ not activated yet but half integrated. The code should still
+ compile and work anyway.
+
+Fri Oct 12 00:53:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLtree.c catalog.c debugXML.c entities.c nanoftp.c
+ parser.c valid.c xmlmemory.c xpath.c xpointer.c: started
+ integrating the non-controversial parts of Gary Pennington
+ multithread patches
+ * catalog.c: corrected a small bug introduced
+
+Thu Oct 11 20:58:15 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c include/libxml/catalog.h: very serious cleanup,
+ isolating unportable code and as much as possible the accesses
+ to the global shared catalog. May need more testing !
+
+Thu Oct 11 11:10:31 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/debugXML.h debugXML.c tree.c: integrating
+ Keith Isdale patches for the XSLT debugger interfaces. Some
+ cleanup
+
+Thu Oct 11 08:44:01 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.mingw: update from Tobias Peters for 2.4.5
+ * DOCBparser.c: generate line nubers in elements
+
+Wed Oct 10 11:35:45 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing 2.4.6 release
+ * doc/xml.html doc/html/*: updated and rebuilt the docs
+ * include/libxml/*.h *.c: fixed a number of teh/the widht/width typos
+
+Mon Oct 8 20:38:27 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog_man.xml, xmlcatalog.1, xmlcatalog_man.html
+ adding documentation for DV's supercatalog support
+
+Mon Oct 8 17:00:16 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/catalog.h catalog.c xmlcatalog.c: adding SGML
+ super catalog support adding one API and one flag --sgml to
+ xmlcatalog
+
+Sun Oct 7 16:43:57 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog_man.xml, xmlcatalog.1
+ One more crack at
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=54392
+
+Sun Oct 7 18:47:02 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * xpath.c: implemented xmlXPathObjectCopy for external objects
+ * include/libxml/xpathInternals.h: added xmlXPathStackIsExternal
+
+Sat Oct 6 16:25:52 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ *doc/xmlcatalog_man.xml, xmlcatalog_man.html, xmlcatalog.1
+ finishing up fix to
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=54392, making
+ the xmlcatalog man page display more elegantly
+
+Sat Oct 6 15:27:12 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: closing bug #61832
+ * HTMLparser.c: removed a warning
+
+Sat Oct 6 15:07:14 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixing #61673 part I, do not loose doc information
+ when copying result value trees.
+
+Sat Oct 6 11:58:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: trying to harden the XPath interpreter
+
+Fri Oct 5 20:37:51 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog.1 updated using a new stylesheet to address, in
+ part, https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=54392
+
+Fri Oct 5 23:35:00 HKT 2001 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser: repaired another loop problem
+
+Fri Oct 5 11:16:21 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * uri.c: applied fix from Mathias Hasselmann about a bug in URI
+ parsing.
+ * xpath.c: fix bug #61291 the default XML namespace node is
+ missing from the namespace axis.
+ * tree.c: refuse to create namespaces nodes with prefix "xml"
+
+Thu Oct 4 16:47:44 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: ouch a non-defined namespace could lead to a crash,
+ fixed #61215
+
+Thu Oct 4 16:24:26 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: closed bug #61054
+
+Wed Oct 3 15:19:04 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/Makefile.am: closing #60708
+
+Tue Oct 2 15:52:05 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/libxml2.def.src include/libxml/parser.h parser.c:
+ adding xmlSAXParseFileWithData following Marco Stipek suggestion
+
+Tue Oct 2 11:27:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: close bug #61550 when xml: wasn't considered a namespace
+
+Tue Oct 2 11:18:32 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/libxml2.def.src: Igor Zlatkovic patches
+ * DOCBparser.c HTMLparser.c parser.c: fixed typos
+
+Mon Oct 1 09:34:51 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: Justin Fletcher provided cleaup code in case
+ HAVE_STAT is not defined
+ * include/win32config.h: Igor Zlatkovic suggested to have
+ HAVE_STAT defined there
+
+Sat Sep 29 00:15:00 HKT 2001 William Brack <wbrack@mmm.com.hk>
+
+ * catalog.c - fixed typing error reported by M. Barros
+
+Sun Sep 23 21:02:39 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ * xmllint.c - fixing typo
+
+Sat Sep 22 10:00:00 HKT 2001 William Brack <wbrack@mmm.com.hk>
+
+ * HTMLparser.c: small enhancement to prevent loop on
+ unrecognizable data
+
+Fri Sep 21 11:45:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parserInternals.c: applying patch from bug #60757 this
+ should close it
+
+Thu Sep 20 15:54:29 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c xmlcatalog.c: removed a couple of warning
+ * xpath.c: try to solve the linking problem on platforms
+ needing trio to compile
+
+Wed Sep 19 10:01:37 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am libxml.spec.in: backing up non-documented changes
+ commited without review or aproval by Jens Finke <jens@gnome.org>
+ * HACKING: made 100% clear that no commit should be done directly
+
+Mon Sep 17 18:52:37 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: Joe Orton provided a patch fixing a problem
+ when iconv is specified to be in a non-standard directory
+ but wasn't exported in xml2-config --cflags
+
+Fri Sep 14 19:32:43 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: let's ship 2.4.5 before getting too much
+ troubles with 2.4.4 errors.
+
+Fri Sep 14 12:26:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * encoding.c entities.c: do not output hexadecimal charrefs
+ when serializing HTML since some version of Netscape can't
+ grok it, generate decimal ones.
+ * result/HTML/doc3.htm: output changed due to previous test
+ * parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4
+
+Thu Sep 13 13:34:27 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxml-2.0.pc.in: dohh generated the wrong include path :-(
+ * doc/Makefile.am libxml.spec.in: re-dohh forgot the new manpage :-(
+
+Wed Sep 12 22:14:55 CEST 2001 Daniel Veillard <daniel@veillard.com>
+ Released 2.4.4
+
+ * config.h.in configure.in libxml.spec.in include/libxml/Makefile.am
+ libxml-2.0.pc.in: moved includes to includedir/libxml2/libxml,
+ updated the configuration scripts systems accordingly
+
+Wed Sep 12 20:49:32 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in: preparing for 2.4.4
+ * doc/xml.html doc/html/*: updated and rebuilt the docs
+
+Wed Sep 12 16:58:16 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/libxml2.def.src: tried to incorporate comments
+ from bug #59220
+
+Tue Sep 11 11:25:36 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c result/noent/wml.xml: fixed bug #59981 related
+ to handling of '&' in attributes when entities are substitued
+
+Mon Sep 10 22:14:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.h include/libxml/xmlversion.h.in
+ include/libxml/xmlwin32version.h include/libxml/xmlwin32version.h.in:
+ Tried to close bug #60131
+
+Mon Sep 10 20:46:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixed a bug in the HTML parser introduced Sep 9
+
+Mon Sep 10 20:13:09 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: fixing bug #59946 on xmlns=""
+
+Mon Sep 10 16:39:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/xmlerror.h SAX.c: fixing bug 59732, simple
+ but allocates a new error code.
+
+Sun Sep 9 10:33:15 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: John Fleck fixed typos in the options output
+ * parser.c SAX.c: fix ignorable white space SAX selection
+
+Sat Sep 8 11:43:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * entities.c: Steve Underwood found the possibility of an
+ ininite loop in case of error.
+
+Fri Sep 7 11:35:00 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am: Need $(ICONV_LIBS) in libxml2_la_LIBADD
+
+Wed Sep 5 17:47:43 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: warn if version is not 1.0 but it's not
+ strictly speaking an error after analyzing the spec
+
+Mon Sep 3 10:07:03 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ *doc/catalog.html - add link to the html version of the
+ man page, other linguistic cleanups
+
+Mon Sep 3 09:10:08 MDT 2001 John Fleck <jfleck@inkstain.net>
+
+ * doc/xmlcatalog_man.xml, xmlcatalog_man.html, xmlcatalog.1
+ adding documentation for xmlcatalog. Note: xmlcatalog.1, the man
+ file, has not yet been included in the build.
+
+Sat Sep 1 18:17:47 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: removed a duplicate affectation Justin Fletcher
+
+Fri Aug 31 22:02:10 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: Armin Sander pointed a possible text coalescing
+ problem, completed his patch.
+
+Fri Aug 31 18:30:28 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * trionan.c: Fixed const and volatile re-definition problem
+
+Fri Aug 31 16:51:28 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.4 parser.c: doc updates from Heiko Rupp
+ * parserInternals.c: 2 sanity checks from Heiko Rupp
+
+Tue Aug 28 22:38:45 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * tree.c: applied patch from Armin Sander to make some pointers
+ const in xmlCopyNode()
+ * include/libxml/tree.h: added fix to the header
+
+Mon Aug 27 16:24:47 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: hum, restrict the integer usage gcc bug workaround
+ to only gcc compilers so that other architecture don't get
+ penalized by this limitation.
+ * include/libxml/xpath.h: small typo fix from Heiko W. Rupp
+
+Sun Aug 26 20:45:04 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * valid.c: fixed a Windows compiler warning (Chris Poblete)
+ * xpath.c: fix for mod when dividend is 0 (Chris Poblete)
+
+Sat Aug 25 15:30:17 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/catalog.h catalog.c xmlcatalog.c: added a
+ --convert option to xmlcatalog to convert SGML ones to
+ the XML syntax.
+ * xmllint.c: small cleanup for $SGML_CATALOG_FILES support.
+
+ 2.4.3 got released at that point
+Thu Aug 23 23:16:32 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c xmlIO.c: started some serious testing and fixed
+ a few bug and optmization needs.
+
+Thu Aug 23 17:26:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am configure.in include/libxml/xmlwin32version.h:
+ preparing for a 2.4.3 release even if it may not be ready yet
+ * catalog.c parser.c xmlIO.c include/libxml/catalog.h: redirected
+ all file parsing lookup to go through the entity resolver, add
+ to add an API to bypass it (needed to load catalogs themselves),
+ some cleanup on the catalog code too.
+ * nanoftp.c: small cleanup
+ * doc/catalog.html: small update
+
+Thu Aug 23 12:22:26 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed bugi #59406 in SGML catalog parsing reported by
+ Jun Kuriyama
+
+Thu Aug 23 02:51:29 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * doc/catalog.html: finished the catalog documentation
+
+Thu Aug 23 01:38:42 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * doc/catalog.html doc/xml.html: added documentation about
+ Catalog support, misses an API description
+ * doc/html/*: reextracted the API pages
+
+Wed Aug 22 18:27:47 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/catalog.h catalog.c xmlIO.c HTMLparser.c:
+ Added the part about section 7.2 on URI resolution,
+ fixed a side effect in the HTML parser, look complete
+ and ready to rock except the URI/SystemID part!
+
+Wed Aug 22 16:27:03 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/catalog.h include/libxml/parser.h
+ include/libxml/xmlerror.h catalog.c parser.c parserInternals.c
+ xmlIO.c: added support and APIs needed for the catalog PI
+ * include/libxml/xmlIO.h: cleanup
+
+Wed Aug 22 02:03:31 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c parser.c xmlIO.c xmlcatalog.c xmllint.c
+ include/libxml/catalog.h: starts to look okay, really
+ plugged the new framework, cleaned a lot of stuff,
+ added some APIs, except the PI's support missing this
+ should be mostly complete
+ * result/catalogs/* test/catalogs/*: added new test, enriched
+ the existing one with URN ID tests
+
+Tue Aug 21 14:56:18 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * catalog.c: fixed nextCatalog
+ * result/catalogs/docbook test/catalogs/*: started adding
+ a small regression test
+
+Tue Aug 21 12:52:38 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am catalog.c xmlcatalog.c include/libxml/catalog.h:
+ more work on the XML catalog support.
+ * parser.c include/libxml/parser.h: small cleanup seems using
+ list as a public parameter name can give portability troubles
+ * trionan.c trionan.h xpath.c include/libxml/trionan.h
+ include/libxml/xpath.h include/libxml/Makefile.am: removed
+ trionan from the libxml API, added xmlXPathIsInf and xmlXPathIsNaN
+ wrappers
+
+Tue Aug 21 11:18:45 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * Makefile.am trio.c triodef.h trionan.c xpath.c
+ include/libxml/Makefile.am include/libxml/trionan.h:
+ Re-worked Not-A-Number and Infinity support.
+ * xmlcatalog.c: added readline include files
+
+Mon Aug 20 02:04:13 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * Makefile.am xmlcatalog.c libxml.spec.in: renaming
+ testCatalog as xmlcatalog, making it an installed app
+ adding a shell, and preparing it to be a /etc/xml/catalog
+ management tool, though not ready yet
+ * catalog.c include/libxml/catalog.h: adding support for
+ XML Catalogs http://www.oasis-open.org/committees/entity/
+ not finished, there is some interesting tradeoffs and a
+ few open questions left.
+
+Sun Aug 19 14:59:56 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: fixed a line formatting problem
+
+Fri Aug 17 11:35:31 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: removed a couple of unused variable (Albert Chin)
+
+Fri Aug 17 01:25:21 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HTMLparser.c HTMLtree.c include/libxml/HTMLparser.h:
+ trying to fix some troubles w.r.t. function returning
+ const xxxPtr.
+
+Thu Aug 16 21:33:20 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/libxml2.def.src: another set of symbols conditionally
+ defined
+
+Thu Aug 16 21:31:14 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpointer.c: removed unused var
+
+Thu Aug 16 18:26:40 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * testXPath.c: another small cleanup closing bug #59110
+
+Thu Aug 16 17:59:18 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * win32/dsp/libxml2.def.src: small cleanup closing bug
+ #59108
+
+Wed Aug 15 22:46:01 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * example/gjobread.c: add xmlCleanupParser() before leaving
+
+Wed Aug 15 14:57:08 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * config.h.in configure.in include/libxml/xmlwin32version.h:
+ released 2.4.2
+
+Wed Aug 15 13:56:22 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * include/libxml/valid.h debugXML.c valid.c: deprecate
+ the non-boundchecking Sprintf functions, add Snprintf
+ this should close bug #57984
+
+Wed Aug 15 10:46:07 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmlIO.c: xmlOutputBufferCreateFilename() didn't unescaped
+ URIs before doing the lookups (pointed by Mark Vakoc)
+
+Tue Aug 14 18:37:23 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: serious changes on Result Value Trees and NodeSets
+ w.r.t. deallocation and collect operations. Probably not
+ 100% clean (merge of allocated trees smells like a problem).
+ Seems sufficient to close #58943
+
+Tue Aug 14 16:12:00 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xmllint.c: adding a --format option
+
+Tue Aug 14 14:16:24 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: count() was broken on Result Value Tree
+ * xmlIO.c: fixed file:/// accesses on _WIN32
+
+Mon Aug 13 13:22:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxml.m4: s/LIBXML_VERSION_NUMBER/LIBXML_VERSION/ seems the
+ macro was renamed, this should close bug #58683
+
+Mon Aug 13 12:33:40 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: small fix fixing bug #58539 reported by coolo, in
+ entity substitution mode text at the end of the entity might
+ be added due to text coalescing.
+ * nanoftp.c parser.c: small cleanup
+
+Wed Aug 8 22:57:05 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * HACKING: added John Fleck right to commit in the doc subdir
+
+Tue Aug 7 03:05:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c testXPath.c valid.c xmllint.c include/libxml/valid.h:
+ allow to inherit attributes from the DTD directly in the
+ tree, this is needed for XPath and can be a useful feature.
+ Inherited namespaces are always provided at the tree level now
+ * test/defattr* result/defattr* result/noent/defattr*: added a couple
+ of tests for this feature (XSLT being the prime user).
+
+Fri Aug 3 14:02:20 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * DOCBparser.c Makefile.am nanohttp.c parser.c testHTML.c
+ testSAX.c xmlIO.c xmllint.c include/win32config.h
+ include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h
+ include/libxml/xmlwin32version.h.in win32/README.MSDev
+ win32/dsp/*: applied Win32 Facelift No.2 patches from
+ Igor Zlatkovic for Windows/MSC
+
+Wed Aug 1 23:21:06 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * SAX.c: unparsedEntityDecl() the URI computation of the
+ entity wasn't done breaking XSLT unparsed-entity-uri()
+
+Wed Aug 1 17:44:57 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * xpath.c: fixed a bug when walking the descendants and
+ the current node has no children
+ * debugXML.c: show up when a text node is supposed to not be escaped
+
+Wed Aug 1 01:33:35 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * xpath.c: fixed a bug in xmlXPathNodeTrailingSorted (for now it
+ worked like the set:leading() function)
+ * include/libxml/xpathInternals.h: added xmlXPathNodeSetContains
+
+Tue Jul 31 18:24:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * nanohttp.c: protected an use of EAGAIN, Brian Stafford
+
+Tue Jul 31 17:48:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/xmlIO.h: apply change to close #58141
+ * win32/libxml2/*: update of the MSC projects from Igor Zlatkovic
+
+Tue Jul 31 17:09:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: when the internal subset uses a PE, then the
+ included entity can use conditional sections.
+
+Mon Jul 30 12:58:39 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c include/libxml/xpath.h: fixed a serious memory problen
+ when walking the namespace axis showing up in
+ libxst/tests/general/bug-12
+ * xmlmemory.c: added the possibility to trace a given block
+ defined by its address
+
+Sun Jul 29 07:18:53 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: don't override existing encoding specified before
+ starting xmlParseDocument()
+
+Sat Jul 28 13:33:10 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/xmlwin32version.h: reinserted, needed for
+ Windows users of CVS
+
+2001-07-27 Darin Adler <darin@bentspoon.com>
+
+ * encoding.c: (xmlIconvWrapper): Add cast to fix warning.
+ * testCatalog.c: Add include of <libxml/parser.h>.
+
+2001-07-27 Darin Adler <darin@bentspoon.com>
+
+ * include/libxml/.cvsignore:
+ * include/libxml/xmlwin32version.h:
+ Remove this file from CVS because it's generated.
+
+Fri Jul 27 10:03:56 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c include/libxml/parser.h: applied const patches from
+ Tom Moog #58002
+
+Thu Jul 26 18:55:52 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * xpath.c include/libxml/xpath{,Internals}.h: added a function
+ lookup framework
+
+Fri Jul 27 01:50:20 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed xmlCopyNode() for documents
+
+Thu Jul 26 12:40:35 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed bugs #58073 reported by Greg Shtilman
+
+Thu Jul 26 11:38:37 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixes bug #57652 reported by Morus Walter
+
+Thu Jul 26 10:24:34 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * nanohttp.c: John Kroll provided a small fix to xmlNanoHTTPSave
+
+Thu Jul 26 07:16:04 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c parserInternals.c: fixed the xmlLineNumbersDefault()
+ errors, lesson don't add new functions at 1am before a release
+ * xpath.c: integrated fix from Bjorn to avoid divide by zero
+ from XPath initialization when possible.
+
+Tue Jul 24 15:39:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * result/scripts/base*: removing history/readline changed
+ this slightly
+ * include/libxml/parser.h SAX.c parser.c parserInternals.c
+ xmllint.c: make element content line number generation
+ optionnal to avoid breaking old apps added interface to switch
+
+Tue Jul 24 15:06:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: get rid of the readline and libhistory
+ dependencies by default, release 2.4.1 with IA64 fix
+ * nanohttp.c tree.c xmlIO.c include/libxml/nanohttp.h
+ include/libxml/tree.h include/libxml/xmlIO.h: incorporated
+ John Kroll fixes to allow saving to HTTP via PUT (or
+ POST of needed).
+ * doc/html/*.html: regenerated the docs
+
+Sun Jul 22 05:56:16 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * hash.c include/libxml/hash.h: added xmlHashScannerFull,
+ xmlHashScanFull and xmlHashScannFull3 to get passed the
+ three keys as arguments to the callback function
+
+Thu Jul 19 15:29:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in Makefile.am: removed libxml softlink for good
+ * include/libxml/*.h *.c doc/Makefile.am: cleanup to get
+ 100% coverage by gtk-doc
+
+Tue Jul 17 17:36:46 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlmemory.c include/libxml/xmlmemory.h: debugging on IA64,
+ fixed serious troubles due to size_t vs. int mismatch
+
+Tue Jul 17 16:04:36 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c xmlIO.c: cleaned up some warning on the Alpha
+
+Mon Jul 16 06:32:44 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * include/libxml/xpath{,Internals}.h xpath.c: added a more
+ convenient extension API for value and context managing
+ Now handles external objects through xmlXPathPopExternal,
+ xmlXPathWrapExternal and xmlXPathReturnExternal.
+ Added functions for sets operations (intersection, etc.)
+
+Mon Jul 16 20:05:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/parserInternals.h include/libxml/HTMLparser.h
+ xmlIO.c tree.c parserInternals.c entities.c encoding.c
+ HTMLparser.c: cleanup of global variables, marking some
+ const or private.
+
+Mon Jul 16 00:17:15 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
+
+ * include/libxml/xpath.h: exported xmlXPath{NAN,PINF,NINF}
+ fixed xmlXPathNodeSetItem when passing index=0
+
+Sun Jul 15 17:58:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/xmlwin32version.h.in: added xmlCheckVersion()
+
+Sat Jul 14 19:31:21 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmllint.c: fixed compilation under Cygwin #57503
+ * TODO: update
+
+2001-07-13 Peter Williams <peterw@ximian.com>
+
+ * config.h.in: add #undef HAVE_DLFCN_H
+
+ * example/Makefile.am (INCLUDES): Compile fix when srcdir !=
+ builddir.
+
+Fri Jul 13 11:09:56 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * win32/libxml2/libxml2.def.src: added a couple of exported entries
+ raised by #57348 and #57381
+
+Thu Jul 12 21:20:17 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c HTMLparser.c HTMLtree.c SAX.c debugXML.c parser.c
+ tree.c xpointer.c: store the line numbder in element->content,
+ may break some software, need a configuration mechanism
+
+2001-07-10 Darin Adler <darin@bentspoon.com>
+
+ * .cvsignore:
+ * example/.cvsignore:
+ * include/.cvsignore:
+ * include/libxml/.cvsignore:
+ Various things that are generated and should be ignored.
+
+Tue Jul 10 17:47:09 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in include/libxml/xmlwin32version.h: release of 2.4.0
+ * doc/xml.html doc/html/*: updated the docs
+
+Mon Jul 9 22:06:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: fixed "Internal: MIXED struct bad" when #CDATA elements
+ validation occured on content with element child
+
+Mon Jul 9 17:59:08 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed XML Base computation which was broken
+ * debugXML.c: added a base function to the shell
+ * Makefile.am result/scripts/* test/scripts/*: added scripts
+ based regression tests, and adding 2 XML Base tests
+
+Mon Jul 9 12:31:05 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: set properties doc and call xmlSetListDoc for properties
+ content when grafting them in a different tree.
+ * aclocal.m4: remove from CVS
+
+Sun Jul 8 23:09:07 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * win32/libxml2/libxml2.def.src: added some missing entry point
+ for XPath (Mark Vakoc)
+
+Sun Jul 8 20:34:35 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: fixed an old bug raised by Bernhard Zwisch, the I/O
+ layer should URI-Unescape before trying to open resources.
+
+Sun Jul 8 16:26:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fix the name() bug for elements in the default
+ namespace reported by Charlie Bozeman
+
+Sun Jul 8 15:11:05 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c parser.c testXPath.c xpath.c: trying to fix #56948, this
+ led to an XPath fix, improvements of SAX initialization, and
+ an added option --nocdata to testXPath
+
+Sat Jul 7 21:09:55 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/libxml-doc.el: Felix Natter provided anew version working
+ with XEmacs too
+
+Sat Jul 7 02:16:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/xpath.h: small cleanup
+ * doc/xml.html: update
+
+Fri Jul 6 01:40:23 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am configure.in include/libxml/xmlwin32version.h:
+ released 2.3.14
+
+Fri Jul 6 00:47:41 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/html/*: rebuilt the docs for the release
+ * doc/xml.html: added 2.3.14 release.
+
+Thu Jul 5 22:01:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: a bug reported by Stephan Kulow empty nodesets
+ were not equal to empty strings
+
+Thu Jul 5 00:52:25 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c: fixed a URI-Reference computation problem when validating
+ * xmlIO.c: small cleanup
+
+Thu Jul 5 00:04:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: improved the description of a couple of interfaces
+ upon Larry Stamper suggestion
+
+Wed Jul 4 21:42:24 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c entities.c parser.c: changed completely the way entities
+ are handled when running the parser in entity substitution mode.
+ This fixes a bug reported by Stephan Kulow and nearly divides
+ by 3 the amount of memory required by libxslt to load and process
+ DocBook TDG.
+
+Wed Jul 4 18:02:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: fixing a too early root closing problem raised
+ byt Prashanth Naidu
+
+Wed Jul 4 01:42:01 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed a missing copy in xmlXPathVariableLookupNS()
+ raised by Mark Vakoc.
+
+Tue Jul 3 18:35:48 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * example/Makefile.am: fixed the include path to add srcdir/include
+ * Makefile.am configure.in: fix from Albert Chin for iconv detection
+ and some cleanup
+
+Tue Jul 3 10:12:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c include/libxml/xpath.h include/libxml/xpathInternals.h:
+ lot of optimization work, results in significant improvements
+ when handling really complex XPath queries. Add a small optimizer
+ for unions, improve [n] and [last()], avoid some costly ops.
+
+Fri Jun 29 23:26:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/parser.h parser.c: xmlStrstr args are both const
+ * xpath.c: small cleanup
+ * xmlGetNsList: reformated, fixed problems if used on Entities
+
+Thu Jun 28 18:19:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: added 1.8.14 and 2.3.13 releases
+
+Thu Jun 28 18:16:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in include/libxml/xmlwin32version.h: released 2.3.13
+ * Makefile.am example/Makefile.am: workaround automake generating
+ erroneous deps
+
+Thu Jun 28 15:08:22 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/win32config.h: bug #56801 Yon Derek provided a patch
+ to the windows config file.
+
+Thu Jun 28 14:51:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpointer.c include/win32config.h win32/libxml2/libxml2.def.src
+ libxml.h : Yon Derek provided a set of changes to compile from
+ CVS on Windows/MSC
+
+Thu Jun 28 14:11:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed UTF8 BOM support in push mode
+ * test/utf8bom.xml result/utf8bom.xml result/noent/utf8bom.xml:
+ added a specific testcase
+
+Wed Jun 27 18:33:13 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: added --push regression tests
+ * parserInternals.c: the XML parser segfaulted in --push mode
+
+Wed Jun 27 13:09:51 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: moved the symlinks detection within a CVS
+ check, this is not portable and will be removed soon.
+ * xpath.c: small cleanup/speedup
+
+Tue Jun 26 18:05:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in doc/xml.html include/libxml/xmlwin32version.h:
+ release of 2.3.12
+ * parser.c: make an error message if unknow entities in all cases
+
+Tue Jun 26 09:46:29 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * uri.c: fixed 2 uri normalization bugs on '//' reduction
+
+Mon Jun 25 18:06:23 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/libxml/Makefile.am: Laszlo Peter pointed out that
+ includes were installed in the wrong dir
+
+Mon Jun 25 17:07:37 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/html.xml: warn against sending code to exhibit bugs.
+
+Sun Jun 24 23:31:56 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: patch to xmlXPathFormatNumber for the optimizer on
+ Tru64 from Thomas Leitner
+
+Sun Jun 24 14:05:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * AUTHORS: added William and Bjorn
+ * include/libxml/*.h *.c README doc/*.html etc.: changed old email to
+ daniel@veillard.com hopefully I won't have to do this again
+ * doc/Makefile.am doc/html/*.html: cleanup makefile, checked that
+ docs can be rebuilt cleanly now
+ * include/libxml/xml*version.h*: removed include/libxml/xmlversion.h
+ from CVs it's generated, added include/libxml/xmlwin32version.h
+ also generated but which should change far less frequently.
+ * catalog.c nanoftp.c: made sure to include libxml.h not
+ libxml/xmlversion.h directly
+ * include/libxml/*.h: include xmlwin32version.h instead of xmlversion.h
+ when compiling on WIN32 and MSC
+
+Sat Jun 23 23:54:12 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/Makefile.am include/libxml/Makefile.am configure.in:
+ fixed make distcheck and rebuilding the rpms
+
+Sat Jun 23 20:50:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: should finish the migration of exported includes
+ into a real include/libxml in CVS, at least for CVS users.
+ * removed the exported headers, added in include/libxml (as well
+ as xmlversion.h.in).
+
+Sat Jun 23 20:37:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: fixed the way to detect symlink
+
+Sat Jun 23 20:30:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: updated, include/libxml is now a real CVS dir
+
+Sat Jun 23 19:36:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/libxml-doc.el: a new version of libxml-doc.el. This new
+ version works with both libxml1 and libxml2 (it autodetects
+ the prefix of the html-files) from Felix Natter.
+ * doc/xml.html: updated doc accordingly
+
+Sat Jun 23 18:30:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed the bug generating a template loop in libxslt
+ when using docbook-xsl-1.4, * should filter out document nodes
+ * HACKING: added William
+ * TODO: updated
+
+Fri Jun 22 18:02:37 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/FAQ.html: added a warning about gcc-3.0
+ * doc/xml.html: added reference to gdome2 and removed a confusing
+ sentence
+
+Fri Jun 22 17:02:16 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlversion.h: okay this is a generated file, but Windows
+ users need it and they can't generate it, and I want CVS
+ Windows users ...
+ * win32/libxml2/libxml2_so.dsp: Windows project file for
+ the shared lib version of libxml2
+ * win32/libxml2/libxml2.def.src: bug #56527 set of exported
+ resources needed for libxslt/xsltproc by Yon Derek
+
+Fri Jun 22 16:39:36 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * trio.c: MSVC fix (provided by Igor Zlatkovic)
+
+Fri Jun 22 12:42:16 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/win32config.h: another small fix for ATTRIBUTE_UNUSED
+
+Fri Jun 22 12:42:16 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * include/win32config.h: Yon Derek provided a first fix
+ to be able to compile libxslt/xsltproc on Windows
+
+Fri Jun 22 00:04:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: attempt to work around what seemed a gcc optimizer
+ bug when handling floats on i386 http://veillard.com/gcc.bug
+ * tree.c entities.c encoding.c: doing some cleanups while
+ chasing it
+
+Thu Jun 21 13:13:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: cleanup when --without-debug is specified
+ * xinclude.c xpath.c xpathInternals.h xpointer.c: cleanup
+ w.r.t. --without-debug and other include points
+ * catalog.h testCatalog.c: a bit of cleanup and prepare for XML
+ Catalogs
+ * configure.in entities.h tree.h HTMLparser.c: removed
+ --without-corba, made the _private field mandatory
+
+Wed Jun 20 19:37:25 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c parserInternals.c encoding.c: Since Notepad on Win2k
+ outputs a BOM in UTF8, an errata has been issued to avoid the
+ problem, that was the most reasonable solution... Add support
+ for a leading UTF8 BOM in entities.
+
+Wed Jun 20 15:38:59 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: fixed a bug found when post validating an entity ref
+ * xmllint.c: added --loaddtd and sligly changed --postvalid to
+ activate it too
+
+Tue Jun 19 20:03:40 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c xinclude.c xpointer.c: bug #56402 exposed a number of
+ weakness in the node copy the XPointer and the XInclude
+ implementations. Serious cleanup.
+
+Tue Jun 19 14:50:18 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: Kjartan Maraas provided a small patch to
+ add xml2-config.in to EXTRA_DIST
+
+Tue Jun 19 13:04:10 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c tree.c parserInternals.c parser.c: Stephan Kulow
+ provided another failing case found in KDE, the way the
+ ctxt->vctxt.nodeTab was allocated and freed changed over
+ time but it wasn't completely cleaned up. This should fix it.
+
+Sun Jun 17 19:56:33 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: Stephan Kulow also raised the fact that line number
+ could get miscounted making debug harder, fixed the problem
+ in xmlParseCharData()
+
+Sun Jun 17 19:17:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: Stephan Kulow pointed out a problem when validating
+ and using an empty entity, forgot a 'break' in a case.
+
+Sun Jun 17 16:47:40 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed xmlHasNsProp() accordingly to bug #55683
+ * doc/xml.html: updated with 2.3.11
+
+Sun Jun 17 12:24:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * TODO: updated adding cleanup of generated doc
+ * configure.in: prepared to release 2.3.11
+ * xmllint.c: added --version for bug reporting
+ * doc/html/*.html: rebuilt the doc
+
+Sat Jun 16 23:23:33 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: first part of the work on selecting namespace to
+ fix bug #56115
+
+Sat Jun 16 00:20:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am example/Makefile.am: Laszlo PETER provided a fix
+ when using -liconv
+ * TODO: updated
+
+Fri Jun 15 07:08:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.[ch]: more work on the HTML serialization routnes,
+ cleanup, encoding support.
+
+Thu Jun 14 10:31:17 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: Thomas Broyer suggested a better patch for the / arg
+
+Thu Jun 14 01:01:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: bug detected by Ankh when / is used as a function arg
+
+Wed Jun 13 23:08:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.[ch] HTMLtree.c: stored the inline/block property
+ of element and use it to avoid outputting formatting spaces at
+ the wrong place. Implemented the format parameter for HTML save.
+ * result/HTML/doc2.htm result/HTML/doc3.htm result/HTML/fp40.htm
+ result/HTML/script.html result/HTML/test2.html result/HTML/test3.html
+ result/HTML/wired.html: of course this impact the result of a
+ number of HTML tests
+
+Thu Jun 14 09:49:09 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.[ch]: started augmenting the HTML save API with
+ encoding and formatting parameters
+
+Wed Jun 13 09:44:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.h: cleanup and started evaluating the work needed on
+ revamping the HTML output code
+
+Mon Jun 11 19:29:40 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c: handling of PIs and <?sgml-declaration in entities.
+
+Tue Jun 12 08:46:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: fixed bug #56049, forgot one check in the
+ validation routine
+
+Tue Jun 12 08:09:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch]: grrr ... namespace is a C++ reserved keyword
+
+Tue Jun 12 06:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxml.h: fixed an error in last commit
+ * doc/FAQ.html: added an entry for compilation from CVS
+
+Mon Jun 11 10:07:29 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlversion.h.in libxml.h: Cygwin patches
+ * tree.c: xmlFreeNodeList patch similar to xmlFreeNode one
+ * tree.h: cleanup
+
+Sat Jun 9 19:16:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: patched xmlFreeNode() to avoid freeing() a static
+ memory block in a strange case where libxml is linked twice
+ in the binary.
+
+Sat Jun 9 18:39:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: (a? , b? , c? , ... , z?) was storing/restauring
+ state far too often, simple fix used to avoid it.
+
+Sat Jun 9 16:10:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xinclude.c: Raphael Hertzog had a trouble with DTD nodes
+ being processed, applied his patch
+ * tree.c: fixed a bug raised in xmlStaticCopyNodeList()
+
+Sat Jun 9 15:50:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * nanoftp.c nanohttp.c uri.c include/win32config.h: Igor Zlatkovic
+ provided fixes to compile on MSCC again
+ * win32/libxml2/libxml2.def.src win32/libxml2/libxml2*.dsp: he
+ also provided an update for the project files.
+
+Thu Jun 7 21:52:10 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: applied Steve Tinney patch to xmlNewNsProp to fix
+ bug #55810
+
+Thu Jun 7 21:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed xmlGetNsProp() to close bug #55683
+ Note this requires libxslt to use it's own function instead.
+
+Thu Jun 7 18:06:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: when in a pre element no formatting space should
+ be added.
+ * test/HTML/pre.html result/HTML/pre.html*: added a regression test
+
+Thu Jun 7 17:29:38 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: added tests for signal() and signal.h
+
+Fri Jun 8 10:17:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: robert pointed out xmlXPathNINF was not initialized
+
+Fri Jun 8 10:01:45 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/libxml-doc.el: Felix Natter provided a new version for
+ libxml2
+
+Fri Jun 8 07:20:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: when in a pre element no formatting space should
+ be added.
+
+Wed Jun 6 18:07:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: add -mieee to CFLAGS when compiling on Linux/alpha
+
+Thu Jun 7 06:44:01 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c: implemented the <?sgml-declaration encoding="xxx"?>
+ hack
+ * tree.[ch]: added xmlHasNsProp as suggested in bug report #55653
+ * uri.c: fixed a warning
+
+Tue Jun 5 22:54:21 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: trying to close bug #55772 escaping in script
+ elements
+ * doc/xml.html: suggest to send mail to the list
+
+Tue Jun 5 19:11:02 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * error.c: attempt to fix the xmlGetVarStr breakage once and for
+ good. Use a macro and based on the solution provided in
+ vsnprintf manual page from GNU.
+
+Tue Jun 5 14:46:10 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * error.c: Workaround for non-preserving variadic list.
+ * trio.c trio.h triop.h strio.c strio.h: Upgraded to trio baseline 1.4
+
+Sat Jun 2 06:12:33 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: added 2.3.10 release
+
+Fri Jun 1 11:27:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: releasing 2.3.10
+
+Thu May 31 20:42:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: Gary Pennington spotted a few troubles with file:///
+
+Thu May 31 20:18:59 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * encoding.c: Robert Collins provided a patch to add the
+ "US-ASCII" encoding alias
+
+Wed May 30 21:12:45 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c encoding.[ch]: William M. Brack provided a set of UTF8
+ string oriented functions and started cleaning the related areas
+ in xpath.c which needed fixing in this respect
+
+Wed May 30 20:30:47 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: applied patch from Jaroslaw Kolakowski to close bug
+ #55380
+ * tree.c: patch to xmlNodeGetContent() to get CDATA section content
+
+Mon May 28 12:56:29 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * TODO: updated
+ * nanohttp.[ch] : started adding APIs to get the redirected URL
+ when this occurs (needed for further base computation
+ * tree.h: cleanup
+ * encoding.c: cleanup
+ * SAX.c: minor change around ctxt->loadsubset
+
+Fri May 25 09:36:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am include/Makefile.am: small change to have
+ include/libxml rebuilt if working from CVS.
+ * uri.c: applied another patch from Carl Douglas for URI escaping,
+ this should close bug #51876
+
+Wed May 23 15:40:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xinclude.c: fixed XInclude recursive behaviour bug #54678
+ * result/XInclude/recursive.xml test/XInclude/docs/recursive.xml
+ test/XInclude/ents/inc.txt test/XInclude/ents/sub-inc.ent:
+ added specific regression test
+ * parser.h: preparing for the XSLT mode where DTD inherited
+ attributes are added to the tree.
+
+Wed May 23 13:59:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xinclude.[ch]: Updated the namespace for the Last Call version
+ * result/XInclude/include test/XInclude/include: updated the
+ testsuite accordingly
+
+Wed May 23 12:27:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * uri.[ch]: applied a patch from Carl Douglas for URI escaping,
+ related to bug #51876
+
+Tue May 22 18:46:56 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed a gross mistake in base computation, xml:base is
+ not completely correct yet (need cascade).
+ * xpath.[ch]: added the few things needed to find a function name
+ and URI from the XPath context when it is called.
+
+Tue May 22 17:00:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * catalog.[ch]: fixes and add xmlLoadCatalogs()
+ * DOCBparser.c: small cleanup
+ * xmllint.c: added a --catalogs option to load catalogs from
+ $SGML_CATALOG_FILES
+ * tree.c: cleanup
+ * configure.in: iconv library fixup, ICONV_LIBS
+
+Mon May 21 16:05:22 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * catalog.c: handling of CATALOG entries. detection of recursion,
+ and a few bugfixes
+ * xpath.c: fixing bug #54951 QNAME with no prefix should not match
+ against the default namespace
+
+Mon May 21 10:14:07 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: Joe Orton reported a bug found with IRIx compiler.
+
+Sun May 20 15:15:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed propagation context info when parsing an
+ external entity.
+ * doc/html/*.html: regenerated a couple of docs
+
+Sat May 19 17:11:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: update with 2.3.9 informations
+
+Sat May 19 16:50:47 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.h debugXML.h parserInternals.h tree.h valid.c
+ xmlversion.h.in xpathInternals.h xpath.h: some cleanup for gtk-doc
+ * doc/html/* : rebuilt the docs
+ * valid.c: small patch which may improve some case when
+ validating.
+
+Sat May 19 15:20:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: Closed bug #54891
+ * result/HTML/cf_128.html* test/HTML/cf_128.html: added the test
+ to the suite
+
+Thu May 17 14:15:07 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * encoding.h hash.c nanoftp.h parser.h tree.h uri.h xlink.h xpointer.c:
+ applied a documentation patch from LotR and filled in a few missing
+ descriptions
+
+Wed May 16 23:02:41 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c tree.c parser.c: speed optimizations at the parser level
+ document tree freeing and xpath evaluation
+
+Wed May 16 12:55:48 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c parser.h parserInternals.h: fixed a couple of
+ interfaces for handling memory buffer input to const char *
+ upon suggestion of JamesH.
+
+Tue May 15 17:22:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: LoTR sent a patch fixing the previous commit
+
+Tue May 15 14:40:04 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: trying to deal again with the stoopid -R linking
+ flag of Solaris
+
+Tue May 15 12:49:50 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.h: two nodeset access macros from Thomas Broyer
+
+Tue May 15 11:42:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c xpath.h xpathInternals.h: apply an XPath API cleanup
+ patch from Thomas Broyer
+
+Tue May 15 10:52:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c test/VCM/v2[34].xml: Fixed bug #54631 added specific test
+ case
+ * INSTALL: was empty added stuff from the FAQ
+
+Fri May 11 19:37:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch]: fixing bug #54446, by cleaning some bugs in the
+ attributes handling and #54433 by adding xmlUnsetProp()
+ and xmlUnsetNsProp()
+
+Fri May 11 16:07:13 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: Patch from Jonas Borgström
+ (htmlGetEndPriority): New function, returns
+ the priority of a certain element.
+ (htmlAutoCloseOnClose): Only close inline elements if they
+ all have lower or equal priority.
+ * result/HTML: this of course changed a number of tests results.
+
+Thu May 10 17:30:22 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c catalog.c: plugged in the default catalog resolution
+ * doc/gnome-xml.sgml: linked in the Docbook parser and catalog
+ documentations
+ * doc/html/libxml-*.html: rebuild added the missing ones to CVS
+
+Thu May 10 16:14:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am xmlversion.h.in configure.in include/Makefile.am:
+ integrating catalogs
+ * catalog.[ch] testCatalog.c: adding a small catalo API
+ (only SGML catalog support).
+ * parser.c: restaured xmlKeepBlanksDefault(0) API
+
+Wed May 9 12:50:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: zb@bisp.com reported an error in xmlNodeGetLang()
+
+Tue May 8 12:31:40 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: added xmlParseExternalEntityPrivate() to allow
+ propagation of ctxt->_private when parsing external entities
+
+Tue May 8 10:26:22 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: fixed the bug reported by Bjorn in htmlNodeDump
+
+Tue May 8 09:30:12 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: fixed a small portability problem with AM_CONDITIONAL
+
+Mon May 7 22:44:45 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: warn when indeterminist content model is detected
+ * result/VC/ElementValid8: this adds a message
+ * Makefile.am: add --novalid for VCM tests
+ * parserInternals.c: added a call to Init memory
+
+Fri May 4 19:51:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: fixed htmlNewDoc SYSTEM and PUBLIC ID inversion
+ when both parameters are NULL.
+
+Fri May 4 17:19:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: applied small patch from Gary Pennington, reindented
+ some part of the code.
+
+Thu May 3 13:10:43 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in doc/xml.html doc/html/*: preparing for 2.3.8
+ release, updated and regenerated the docs
+
+Thu May 3 12:47:46 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c result/XPath/expr/floats : clarified and cleanup
+ printing of abnormal floats in tests.
+
+Thu May 3 10:25:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: trying to fix the problem reported by Jonas Borgström
+ * results/HTML/ : a few changes in the output of the HTML tests as
+ a result.
+ * configure.in: tying to fix -liconv where needed
+
+Wed May 2 19:10:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: fixed a stupid error
+
+Wed May 2 18:39:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in Makefile.am: make the inclusion of the trio
+ modules in the library conditional
+
+Wed May 2 14:39:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c: patche from László Kovács, fixed entities refs
+ in attributes handling
+
+Wed May 2 12:56:04 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: Bjorn Reese provided a fix for a problem on buffer
+ flushing
+
+Mon Apr 30 22:29:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fix of an XSLT namespace bug reported on the list
+ general/bug-8-
+
+Mon Apr 30 19:42:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * strio.h trio.c: Dan McNichol suggested a couple of small
+ fixes for AIX 4.3.3 using Visual Age 5.0.2 compiler
+
+Mon Apr 30 13:44:48 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c parser.c encoding.c: spent a bit more time looking
+ at the parsing speed and DOM handling. Added a few more
+ speedups.
+
+Sun Apr 29 21:53:47 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: small but effective parsing speed improvement
+
+Sun Apr 29 19:02:13 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: default on the DocBook parser inclusion (for Gnome)
+ * DOCBparser.h: fixed a header reference
+
+Sat Apr 28 19:00:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in xpath.c: applied Bjorn patches for FPE on the
+ alpha
+
+Sat Apr 28 18:54:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch] xmlIO.h: applied patch from Joe McAlerney to add
+ xmlSaveFormatFileTo()
+
+Sat Apr 28 16:33:05 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: simple and efficient optimization, XPath functions
+ aways bind to the same code, cache this
+ * TODO: updated (by saying some is obsolete)
+
+Sat Apr 28 14:23:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: more cleanup work on XPath name parsing routines
+
+Fri Apr 27 19:06:13 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parserInternals.c xpath.[ch]: some UTF8 cleanup on
+ xmlXPathParseName
+ * xpath.c: Igor Zlatkovic suggested a change for NAN and MSC
+ * debugXML.c: avoid compilation problems if compiling without
+ HTML support, Igor Zlatkovic
+ * win32/libxml2/libxml2.def.src: being able to compile without
+ XPath on Windows
+
+Thu Apr 26 22:53:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxml.m4: yet another patch from Toshio Kuratomi
+
+Thu Apr 26 21:27:43 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxml.m4 libxml2-spec.in: new patches from Toshio Kuratomi
+
+Thu Apr 26 20:53:48 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch]: added xmlSaveFormatFile interface for saving
+ and indenting a file.
+
+Thu Apr 26 16:35:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed bug #53689 related to processing-instruction()
+
+Thu Apr 26 12:57:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c: patche from László Kovács
+
+Thu Apr 26 11:31:54 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: applied fixes from Christian Glahn bug report #53391
+
+Thu Apr 26 11:14:56 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * error.c: Jean François Lecomte provided a complete description
+ and a fix to bug #53537
+
+Thu Apr 26 09:42:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * libxml.m4: added AM_PATH_XML2 provided by Toshio Kuratomi
+
+Wed Apr 25 21:05:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c SAX.c: a bit more work on entities processing.
+ Still Need to cleanup XML output and references in attributes
+
+Wed Apr 25 17:52:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c include/Makefile.am: two patches from László Kovács
+
+Wed Apr 25 14:56:26 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: trying to fix #53574, not completely complete,
+ I would like xmllint --copy --debug test/ent1 and
+ xmllint --debug test/ent1 to show the same result.
+ * xpath.c: fix a bug when trying to sort namespace nodes
+
+Wed Apr 25 12:28:57 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: real fix for #53402
+
+Tue Apr 24 17:36:35 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c HTMLtree.h : closing #53402 i.e. output of
+ PIs when using xsl:output
+ * valid.c: closing #53537 some case generate segfaults if there
+ is validity errors
+
+Tue Apr 24 15:19:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c testDocbook.c DOCBparser.c: more work on the support
+ of external parsed entities, added --noent to testDocbook
+ * valid.c: Garry Pennington found an uninitialized variable
+ access in xmlValidateElementContent()
+
+Tue Apr 24 14:41:25 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c : HTML parsing still sucks ... trying to deal
+ with madness
+ * result/HTML/ : this modified the result of the regression tests
+ a lot.
+
+Tue Apr 24 14:10:38 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * entities.c: xmlEncodeEntitiesReentrant fixed a few accesses
+ to doc where it wasn't checked against NULL reported by
+ Jens Laas
+
+Tue Apr 24 13:21:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: Jonas Borgström patch, the <td>, and <th> elements
+ now means the end of any open <span>,<font>,<a>,<b>,<i>,<u>.
+
+Mon Apr 23 15:40:04 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * DOCBparser.c DOCBparser.h testDocbook.c configure.in Makefile.am
+ xmlversion.h.in: started (re)integrating the DocBook SGML parser.
+ * SAX.[ch]: cleanup and updates for DocBook
+ * debugXML.c parser.h tree.[ch] valid.c xpath.c: small macro or
+ ex SGML identifier changes
+ * valid.c: removed a static unused function.
+
+Mon Apr 23 11:05:56 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLtree.c: applied change for Paul Sponagl on script saving
+ * Makefile.am: the warning about entity title.xml are normal.
+
+Sun Apr 22 22:09:35 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: release of 2.3.7
+ * Makefile.am: fixing make distcheck
+
+Sun Apr 22 21:29:52 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/html/* doc/xml.html: updated and regenerated the docs
+
+Sun Apr 22 21:11:45 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed the XPointer problem introduced in 2.3.6
+
+Sun Apr 22 14:11:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed #53388 with the provided patch
+
+Sun Apr 22 12:34:41 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: Bjorn detected an invalid memory access. Fixed
+ vstateVPush()
+
+Sun Apr 22 10:49:23 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed xmlXPathCompile to detected unproperly ended expr
+
+Sat Apr 21 18:27:51 CEST 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * libxml.h: new header used only for the compilation of libxml
+ * HTMLparser.c HTMLtree.c SAX.c debugXML.c encoding.c entities.c
+ error.c hash.c list.c nanoftp.c nanohttp.c parser.c
+ parserInternals.c testHTML.c testSAX.c testURI.c testXPath.c
+ tree.c uri.c valid.c xinclude.c xlink.c xmlIO.c xmllint.c
+ xmlmemory.c xpath.c xpointer.c: libxml.h integration
+ * trio.[ch] triop.h strio.[ch]: upgraded to the latest trio
+ baseline (version 1.2 plus a single patch).
+ * xpath.c result/XPath/expr/floats test/XPath/expr/floats: parses
+ scientific notation for numbers. Tests added.
+ * xpath.c: formatting of numbers changed to use sprintf
+ (contribution from William Brack)
+
+Sat Apr 21 16:12:59 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: cleanup, more useful debugging
+ * parserInternals.c: cleanup vctxt.nodeTab (de)allocation
+ * xmlIO.c: entity loading is printed as an error when validating
+
+Sat Apr 21 12:25:49 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: fixed to validate within entities
+ * test/VCM/v22.xml: added a specific testcase
+
+Fri Apr 20 17:45:47 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: forgot an epsilon transition in for ()+
+ * test/VCM/v21.xml : added a specific test case
+
+Fri Apr 20 15:46:04 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: removed a state explosion exhibited by RSS
+ * test/valid/rss.xml result/valid/rss.xml*: added the testcase
+ from bug #51872
+
+Fri Apr 20 14:52:44 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.[ch] tree.h: worked *hard* to get non-determinist content
+ validation without using an ugly NFA -> DFA algo in the source.
+ Made a specific algorithm easier to maintain, using a single
+ stack and without recursion.
+ * Makefile.am test/VCM/*.xml: added more tests to "make Validtests"
+ * hash.c: made the growing routine static
+ * tree.h parser.c: added the parent information to an
+ xmlElementContent node.
+
+Wed Apr 18 23:33:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c parser.c xpath.c: generating IDs when not validating
+ from an external parsed entity was poisoning the ID has table
+ with removed values. This was killing XSLT on the KDE help
+ browser.
+
+Wed Apr 18 17:09:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * entities.h: andrew@ugh.net.au detected a double declaration
+
+Wed Apr 18 15:06:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * debugXML.c hash.c tree.h valid.c : some changes related to
+ the validation suport to improve speed with DocBook
+ * result/VC/OneID2 result/VC/OneID3 : this slightly changes
+ the way validation errors get reported
+
+Wed Apr 18 11:42:47 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c HTMLtree.c: applied part of the patches provided
+ by P C Chow and William M. Brack for XSLT HTML output
+
+Mon Apr 16 19:44:36 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlversion.h.in win32config.h win32/libxml2/*: applied
+ Igor Zlatkovic patches for MSC compilation and added his
+ updates
+
+Tue Apr 17 10:08:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed xmlXPathNodeCollectAndTest() to do proper
+ prefix lookup.
+ * parserInternals.c: fixed the bug reported by Morus Walter
+ due to an off by one typo in xmlStringCurrentChar()
+
+Thu Apr 12 17:41:09 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c result/HTML/*: revamped the way the HTML
+ parser handles end of tags or end of input
+
+Thu Apr 12 10:50:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch] : added xmlDocCopyNode for gdome2 support
+
+Wed Apr 11 16:37:50 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.h: include xmlmemory.h this seems to havoid a nasty glibc
+ bug where the linktime verions of free() won't work ...
+
+Wed Apr 11 14:21:31 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * config.h.in configure.in xmlversion.h.in: added ansidecl.h test
+
+Wed Apr 11 13:50:42 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: added 2.3.6 release
+
+Wed Apr 11 13:26:34 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed xmlStringGetNodeList() to handle charrefs
+ * result/wml.xml: resulted in a small output change
+
+Wed Apr 11 09:47:55 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: xmlNewDoc was missing the charset initialization
+ * xmllint.c: added --auto to autogenerate a doc, allow to
+ reproduce the problem fixed on xmlNewDoc
+
+Tue Apr 10 18:13:10 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: trying to get 52979 solved
+ * tree.c result/ result/noent/: trying to get 52712 solved, this
+ also made me clean up the fact that XML output in general should
+ not add formating blanks by default, this changed the output of
+ a few tests
+
+Tue Apr 10 16:30:20 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: Bill Brack pointer an error in detecting a null nodeset
+
+Sun Apr 8 15:07:16 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: finally released 2.3.6
+
+Sun Apr 8 11:39:21 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: checking for null pointer generated by new code
+
+Fri Apr 6 12:53:05 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed a [] evaluation problem reported
+ * test/XPath/tests/simpleaddr: extended test
+ * result/XPath/simpleaddr: updated result
+
+Wed Apr 4 02:07:53 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmllint.c: Dan Timis reported a portability problem
+ on Macs without mmap, fixed it.
+
+Tue Apr 3 20:20:51 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * testXPath.c : added a --tree option allowing to display the
+ tree dump of the XPath expression
+
+Mon Apr 2 17:13:51 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed a memleak when comparing nodesets
+ * HTMLtree.c: don't invent the HTML doctype if not available (XSLT)
+ * tree.c: added a TODO
+
+Tue Mar 27 14:32:06 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in Makefile.am config.h.in xmlversion.h.in: detect if
+ we need string functions
+ * trio.[ch] strio.[ch]: embedded the Trio-0.23 string functions
+ to be able to use them where needed. Applied some changes
+ to reduce name linking pollution and compile in only what's
+ needed.
+ * HTMLtree.c debugXML.c entities.c error.c nanoftp.c valid.c
+ xlink.c xmlversion.h.in xpath.c: got rid of the #ifdef
+ for the string manipulation functions
+ * xmlmemory.[ch]: removed DEBUG_MEMORY_FREED and added it automatically
+ to the free() function of xmlmemory.c
+ * entities.c HTMLtree.c parserInternals.c tree.c uri.c valid.c
+ xinclude.c xmlIO.c xpath.c xpointer.c: removed the MEM_CLEANUP
+ usage.
+
+Tue Mar 27 02:30:23 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * error.c: applied the context output patch of the error
+ handling submitted by Chuck Griffith
+ * error/VC/*: this slightly change some error logs
+
+Tue Mar 27 00:51:27 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed line number reporting on error
+
+Mon Mar 26 23:21:41 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: Sullivan and Darin found a parser bug,
+ applied the patch.
+
+Mon Mar 26 18:24:52 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c HTMLtree.c SAX.c debugXML.c error.c parserInternals.c
+ testHTML.c testSAX.c tree.c valid.c xmlIO.c xmlmemory.c
+ xmlversion.h.in xpointer.c: of course the way I defined
+ UNUSED breaks on old gcc version. Try to be smart and
+ also define it directly in xmlversion.h
+ * configure.in: removed -ansi flag from the pedantic set
+
+Sat Mar 24 17:45:36 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+ Huge cleanup, I switched to compile with
+ -Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit
+ -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat
+ -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
+ -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
+ -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
+ * HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch]
+ encoding.h entities.c error.c list.[ch] nanoftp.c
+ nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c
+ testSAX.c testURI.c testXPath.c tree.[ch] uri.c
+ valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c
+ xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c:
+ Cleanup, staticfied a number of non-exported functions,
+ detected and cleaned up a dozen of problem found this way,
+ avoided a lot of public function name/typedef/system names clashes
+ * doc/xml.html: updated
+ * configure.in: switched private flags to the really pedantic ones.
+
+Thu Mar 22 22:44:15 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: 2.3.5
+ * doc/html/*: rebuilt the docs
+
+Thu Mar 22 15:36:45 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed a reported bug in NOTATION parsing
+ * uri.c: accepted but not fixed bug 51876, added TODO
+ * Makefile.am: fixed bug 51876
+
+Thu Mar 22 13:41:22 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * config.h.in configure.in error.c: fix a compilation problem
+ on platforms without vsnprintf (xml@thewrittenword.com)
+
+Wed Mar 21 19:04:34 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed a function name header typo
+ * SAX.c: notations can also occur in external subset.
+
+Tue Mar 20 14:21:28 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * error.c: removed a C++ like comment
+
+Tue Mar 20 12:22:36 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixing bug 52299 strange condition leading
+ to a parser crash due to a buffer overflow
+ * result/noent/attrib.xml result/attrib.xml test/attrib.xml:
+ added the specific test case
+
+Mon Mar 19 16:50:52 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.[ch]: still a lot of cleanup based on XSLT, added
+ xmlXPathConvert{String,Number,Boolean} to be able to make
+ type casts without a context stack, fixed some implementation
+ problems related to the absence of context at parse-time,
+ added xmlXPathEvalPredicate() and xmlXPathFreeCompExpr()
+ in the public API too
+ * xpointer.c xpathInternals.h: we need to know at parse time
+ whether we are compiling an XPointer
+
+Mon Mar 19 11:54:31 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.[ch] xpointer.c: restaured the Binary and API compatibility
+ cleaned up the parser internals, refactored XPath code, added
+ new compilation based APIs and cleanly separated public and
+ private APIs.
+
+Mon Mar 19 00:59:25 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.h: the comp field must be added at the end to avoid
+ killing binary compat.
+
+Mon Mar 19 00:11:18 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: detect XPath memleaks in regreson tests
+ * error.c: fixed and error w.r.t. error reporting still using
+ stderr
+ * hash.c: added new line at end of file
+ * tree.h: minor cleanup
+ * xpath.[ch] xpointer.[ch]: Major changes ! Separated XPath
+ expression parsing from evaluation, resulted in a number of
+ changes internally, and in XPointer. Likely to break stuff
+ using xpathInternals.h but should remain binary compatible,
+ new interfaces will be added.
+
+Wed Mar 14 20:34:02 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: fixed a couple of problems reported by
+ okiddle@yahoo.co.uk and allanc@chickenandporn.com when compiling
+ without gcc on non linux platforms.
+
+Wed Mar 14 20:13:54 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/Makefile.am configure.in: yearke@eng.buffalo.edu suggested
+ a fix for --with-html-dir= configure support. I hope it won't
+ break rpm generation
+
+Wed Mar 14 17:28:49 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: one function comment cleanup.
+
+Wed Mar 14 14:55:46 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * SAX.c: external subset notations were improperly registered
+ in the internal subset.
+
+Tue Mar 13 10:28:49 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * README.cvs-commits: added, pointing to HACKING
+ * HACKING: updated
+
+Mon Mar 12 22:09:40 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: and Matt Sergeant found one in the XML push
+ parser (erroneous check I forgot to remove when I fixed the
+ main parser).
+
+Mon Mar 12 19:19:04 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: ptittom found a small bug in UnaryExpr
+
+Sat Mar 10 13:09:53 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: bumped to 2.3.4
+ * error.c: fixed bug #51860
+ * tree.c: fixed bug #51861
+ * valid.c: cleanup, more debug, failed to fix one bug crap ...
+ * tree.[ch] : added xmlDefaultBufferSize
+ * nanoftp.c: typo in function name header block
+ * doc/xml.html : updated, added link to XML::LibXSLT
+ * doc/html/* : rebuilt the docs
+
+Wed Mar 7 20:43:47 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c SAX.c: the new content parsing code raised an
+ ugly bug in the characters() SAX callback. Found it
+ just because of strangeness in XSLT XML Rec ouptut :-(
+
+Wed Mar 7 16:50:22 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: Martin Baulig suggested to add -lm
+ * tree.c: found another bug in xmlNodeGetContent()
+
+Tue Mar 6 09:21:30 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: Bjorn found the error related to strictness of comparison.
+
+Mon Mar 5 21:47:31 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: trying to fix the Dtd parsing problem reported
+ by Gary, side effect of last week speed optimizations.
+
+Sat Mar 3 19:45:59 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xml2Conf.sh.in: fixes pointed out by Fredrik Hallenberg
+ * parserInternals.c: removed unneeded test raised by Stric
+
+Sat Mar 3 13:04:37 CET 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * xpath.c: Fixed xmlXPathNodeCollectAndTest (problem reported
+ and fixed by William Brack). Added xmlXPathFormatNumber.
+ Changed the sorting slightly.
+ * configure.in Makefile.am example/Makefile.am: Added -lm.
+ Please note that applications linking with libxml2, must
+ also like with the math library from now on.
+
+Sat Mar 3 07:38:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: fixed loop reported by Marc Sanfacon
+
+Sat Mar 3 02:10:24 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: one must report spaces even if the Dtd element
+ content proves that this is not part of the element content.
+ * result/valid/*.xml: this changed the ouptu slightly
+
+Thu Mar 1 17:53:39 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: bumped to 2.3.3
+ * doc/xml.html: updated
+
+Wed Feb 28 00:43:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: minor doc fix
+ * xpath.c: deallocation issues when a result tree has been
+ converted to a node-set
+
+Mon Feb 26 22:09:45 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: oops corrected dates s/2000/2001
+
+Mon Feb 26 12:48:35 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: new patch from Gary Pennington
+
+Mon Feb 26 09:30:23 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: applied patch from Ankh
+
+Mon Feb 26 03:34:43 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xinclude.c: fixed a problem building on Mac
+
+Sun Feb 25 21:52:30 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: more work on increasing parsing ferformances
+
+Sun Feb 25 18:03:42 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlmemory.h HTMLparser.c HTMLtree.c entities.c parser.c
+ xpath.c xpointer.c tree.c uri.c valid.c xinclude.c xmlIO.c:
+ avoiding memcpy in production builds MEM_CLEANUP macro use
+ * parser.[ch] parserInternals.c: optimizations of the tightest
+ internal loops inside the parser. Better checking of I/O
+ flushing/loading conditions
+ * xmllint.c : added --timing
+
+Sun Feb 25 05:48:51 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: bumped to 2.3.2
+ * doc/xml.html: updated for release
+
+Sat Feb 24 14:07:52 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: found a memleak and fixed a nasty bug
+
+Sat Feb 24 03:35:48 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmllint.[c1] : added return code errors for xmllint
+ * xpath.c: specific debug dump function for result value trees
+
+Thu Feb 22 07:52:27 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: finally implemented xmlXPathCompareNodeSets
+ * test/XPath/expr/floats results/XPath/expr/floats: added
+ a test for float expressions
+
+Tue Feb 20 18:57:54 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed xmlNodeGetContent, it was not recursing on child
+ * parserInternals.[ch]: trying to speed up parsing
+ * xpath.c : speeded up node set equality op
+
+Mon Feb 19 19:01:57 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am valid.c list.[ch]: Gary Pennington provided a
+ better handling of ID/IDREF and the list modules associated
+ * configure.in: small CFLAGS cleanup
+
+Mon Feb 19 16:13:22 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: fixed iconv detection on AIX (stric)
+
+Mon Feb 19 10:59:41 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed "*" (unbelievable !) and a couple of warnings
+
+Sun Feb 18 17:52:37 MET 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+ * xpath.c: fixed whitespace handling in xmlXPathStringEvalNumber,
+ and optimized xmlXPathNodeSetSort
+
+Sat Feb 17 14:18:42 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: bug fix when context size is 0
+ * parser.c: I like Norm's Dtd because they still manage to break
+ the parser occasionally
+
+Fri Feb 16 14:20:35 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: xmlXPathEqualNodeSetFloat the arg is really a double now
+
+Fri Feb 16 01:10:06 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.[ch] parser.c xpath.c: fixed the problem of addressing
+ attributes within the XML-1.0 namespace
+
+Thu Feb 15 16:53:20 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpathInternals.h: exported a few axis functions
+ * doc/xml.html: updated the doc
+
+Thu Feb 15 15:57:14 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: applied patch from Daniel van Balen for OpenBSD
+ and bumped version to 2.3.1
+ * HTMLtree.c result/HTML/doc3.htm result/HTML/wired.html: the
+ attempt to find autoclosing was simply broken, removed it,
+ updated the examples, this is better
+
+Wed Feb 14 11:35:39 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * hash.[ch]: added Paolo Casarini patch to provide Delete from
+ hash functionnalities.
+ * doc/html/* : rebuild the doc
+
+Tue Feb 13 18:01:48 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c result/XPath/tests/chaptersprefol: bugfixes on order and
+ on predicate
+ * HTMLparser.[ch] HTMLtree.c result/HTML/doc3.htm.err
+ result/HTML/doc3.htm.sax result/HTML/wired.html: sometimes one
+ really want to have tags closed on output even if we accept
+ unclosed ones on input
+
+Mon Feb 12 18:33:20 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: ouch don't free NULL, rare case fixed
+ * tree.c: don't coalesce text nodes if they don't have the
+ same behaviour wrt escaping on output
+
+Sun Feb 11 21:15:41 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: small fixup
+ * SAX.c: don't warn on empty namespaces.
+
+Thu Feb 8 11:28:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * README: a bit of cleanup
+ * configure.in: preparing for 2.3.0 release
+
+Thu Feb 8 10:37:00 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * hash.[ch]: added a first version of xmlHashSize()
+ * valid.c: another bug fix from Gary Pennington
+
+Wed Feb 7 19:22:37 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * valid.c: couple of bug fixes pointed by Gary Pennington
+ * HTMLtree.c: #if 0 cleanup
+
+Tue Feb 6 14:02:56 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: started profiling XSLT, added xmlXPathNodeSetAddUnique()
+ which removes a time consuming check of xmlXPathNodeSetAdd()
+ and use it in places where we are sure to not break unicity
+
+Mon Feb 5 18:51:36 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: bug fixes found from XSLT
+ * tree.c: preserve node->name special values when copying nodes.
+ * parserInternals.[ch] parser.[ch] SAX.c : added a mode where
+ external subset are fetched when available but without full
+ validation. Added xmlLoadExtDtdDefaultValue, need a function.
+ * HTMLtree.c: add support for xmlStringTextNoenc for XSLt HTML
+ output with encoding disabled.
+
+Sat Feb 3 09:50:29 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmliO.c: Harry Blundell pointed out that xmlCheckFilename
+ xmlCheckFilename should not be called from xmlFileOpenW
+ and xmlGzfileOpenW
+
+Fri Feb 2 18:04:35 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * uri.c: rewrite of xmlNormalizeURIPath from Paul D. Smith
+ * test/URI/smith.uri result/URI/smith.uri Makefile.am:
+ added the new tests for URI normalization
+ * testURI.c: fixed stoopid bugs
+ * result/VC/OneID3 result/VC/UniqueElementTypeDeclaration:
+ the URI in the error messages are now properly normalized
+
+Fri Feb 2 09:18:53 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * uri.c: applied Marc Sanfacon's patch for xmlNormalizeURIPath
+
+Thu Feb 1 05:28:55 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed a number of problems in XPATH_XSLT_TREE processing
+
+Wed Jan 31 21:45:37 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed mod operator
+
+Wed Jan 31 16:50:42 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c: fixed xmlStrcat doc
+ * tree.c: 2 fixes form Anders Carlson for copying nodes and
+ trees.
+
+Wed Jan 31 14:19:16 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c result/XPath/tests/chaptersbase
+ result/XPath/tests/simplebase: fixed XPath node()
+ * tree.c: small fix in xmlNewNs()
+ * Makefile.am: removed extraneous xml2Conf.sh rule
+
+Sun Jan 28 08:37:03 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am configure.in libxml.spec.in example/Makefile.am:
+ Changed the library name, in order to get libxml-devel and
+ libxml2-devel to coexist on a single system
+ * xml-config.1 xml-config.in xmlConf.sh.in: renamed
+ * xml2-config.1 xml2-config.in xml2Conf.sh.in: new files
+
+Sat Jan 27 19:58:22 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am configure.in libxml-2.0.pc.in: started working on getting
+ libxml2-devel installable in // as libxml-devel.
+
+Sat Jan 27 18:49:02 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/Makefile.am: fixed make rebuild in doc
+ * doc/html/*.html: rebuilt the docs
+
+Fri Jan 26 10:30:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: patch from Bjorn Reese on xmlBufferCCat
+
+Thu Jan 25 19:22:25 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am doc/Makefile.am libxml.spec.in: painful work to get
+ the HTML doc to go into the -devel RPM ...
+ * aclocal.m4 config.h.in: some updates due to auto* magic
+
+Thu Jan 25 19:11:49 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.h: added a hook in the context structure allowing to
+ link to extra support, needed for XSLT
+
+Thu Jan 25 13:34:11 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.[ch] xpointer.c: added xmlXPathCmpNodes, changed
+ xmlXPtrCmpPoints to use it.
+ * propagated the following patch from Alejandro Forero
+ * include/win32config.h xmlIO.c: applied further suggestions
+ from Igor Zlatkovic <igorz@dialup.nacamar.de> and cleanup
+ * example/gjobread.c: fixed warnings, now that it builds
+
+Wed Jan 24 20:27:28 COT 2001 Alejandro Forero <bachue@bachue.com>
+
+ * xmlIO.c (xmlFileOpen, xmlFileOpenW): Removed unnecesary checks.
+
+ * xmlIO.c (xmlCheckFilename): Function added to know whether a given
+ filename points to a valid file (not a directory).
+ * xmlIO.c (xmlFileOpen, xmlFileOpenW, xmlGzfileOpen, xmlGzfileOpenW):
+ Added calls to xmlCheckFilenameDir.
+
+ * xmlIO.c (xmlGzfileOpen, xmlGzfileOpenW, xmlFdOpen, xmlFdOpenW): Pass
+ `path' (rather than `filename') as the parameter to gzopen and open.
+
+Tue Jan 23 16:26:30 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: fixed a problem with EXTRA_DIST
+
+Mon Jan 22 23:42:17 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am example/Makefile.am: finally found the trick
+ to build the example, i.e. add "." in SUBDIRS before example
+ in the list <grin/>
+
+Mon Jan 22 16:30:37 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * doc/xml.html: updated with an XSLT section, removed pointer to
+ W3C CVS base.
+
+Mon Jan 22 11:43:21 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: when copying a XSLT tree object teh tree need to be copied
+ too, and deallocation need to occur the same way.
+
+Mon Jan 22 10:35:40 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpathInternals.h xpath.[ch] debugXML.c: added the XPATH_XSLT_TREE
+ type correponding to an XSLT result tree fragment. Share most
+ of the data format with node set, as well as operators.
+ * HTMLtree.c: added a newline at the end of the doctype output
+ whe this one is not present initially.
+ * tree.c: make sure taht the parent and doc pointers are properly
+ set when copying attributes (lists).
+
+Sun Jan 21 10:47:38 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * htmlTree.[ch] xmlIO.h: exported htmlDocContentDumpOutput
+
+Fri Jan 19 18:15:50 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: seems I finally killed that ugly path evaluation
+ context bug (tagged 9999 in case is is wrong)
+
+Fri Jan 19 06:30:38 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.[ch] xpathInternals.h: added xmlXPathRegisterVariableLookup()
+ for XSLT
+
+Thu Jan 18 16:19:47 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: Gary Pennington <Gary.Pennington@uk.sun.com> fix
+ for xmlGzfileOpen() bug
+
+Thu Jan 18 13:11:50 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: removed an error found by XSLT usage
+ * tree.c parserInternals.h: use a predefined static string
+ for text and comment nodes, avoid freeing them in xmlFreeNode,
+ exported the string name in parserInternals.h and added
+ another value to disable encoding at output (for XSLT),
+ gain memory, time.
+
+Wed Jan 17 09:15:16 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * win32/README.MSDev win32/libxml2/libxml2_a.dsp
+ win32/libxml2/libxml2_so.dsp: new makefiles and update
+ provided by Igor Zlatkovic <igor@stud.fh-frankfurt.de>
+
+Tue Jan 16 18:24:46 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c : xmlSaveFile, xmlSaveFileEnc, applied patch from
+ Gary Pennington
+
+Mon Jan 15 20:24:18 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xpath.c: fixed the comaprision of values and nodelists,
+ need to compare nodelist still ...
+ * debugXML.c: avoided a possible core dump
+ * HTMLparser.c: cleanup
+ * nanohttp.c: contributed fix.
+ * tree.c: fixes in properties handling added xmlSetNsProp
+ needed by libxslt
+ * xpathInternals.h: exported xmlXPathBooleanFunction, added a
+ comment
+ * TODO: updated
+
+Sat Jan 6 22:05:09 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * parser.c parserInternals.c: applied Bjorn Reese optimization
+ patch
+
+Sat Jan 6 19:13:27 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * Makefile.am: applied patch fro make check from Martin Vidner
+
+Thu Jan 4 19:07:49 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * configure.in: preparing 2.2.11
+ * doc/html/*: rebuild the HTML files
+ * doc/xml.html : updated
+
+Thu Jan 4 14:09:58 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * tree.c: fixed a stupid bug
+ * valid.c: applied "Paul D. Smith" <pausmith@nortelnetworks.com>
+ patches related to validation of an XInclude processing result
+ * TODO: updated
+
+Thu Jan 4 11:46:40 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * encoding.c xmlIO.c: Fixing the problem reported by Marc Sanfacon
+ on large files
+
+Wed Jan 3 21:51:13 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmlIO.c: fixed xmlParserInputBufferCreateMem doc
+
+Wed Jan 3 18:56:00 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * HTMLparser.c: htmlCheckParagraph to check htmlOmittedDefaultValue,
+ reported by Jonas Borgström
+ * nanohttp.c: Applied Bjorn Reese' IPV6 first patch
+
+Wed Jan 3 16:19:39 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * testXPath.c xpath.c: fixing the XPath union expressions problem
+ reported by Martin Vidner <martin@artax.karlin.mff.cuni.cz>
+
+Wed Jan 3 14:22:33 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
+
+ * xmllint.c: Made is so if the file name is "-" is will read form
+ standard input. Sven Heinicke <sven@zen.org>
+ * tree.c: fixed a problem when growing buffer
+ * tree.h: fixed the comment of the node types following andersca
+ comment
+ * TODO: updated
+
+Wed Dec 27 12:35:49 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.[ch]: added a way to avoid adding automatically
+ omitted tags. htmlHandleOmittedElem() allows to change the
+ default handling.
+ * tree.[ch] xmllint.c: added xmlDocDumpFormatMemory() and
+ xmlDocDumpFormatMemoryEnc(), uses memory functions for output
+ of xmllint too when using --memory flag, added a memory test
+ suite at the Makefile level.
+ * xpathInternals.h xpath.[ch] xpointer.c: fixed problems
+ with namespace use when encountering QNames in XPath evalation,
+ added xmlns() scheme in XPointer.
+ * nanoftp.c : incorporated a fix
+ * parser.c xmlIO.c: fixed problems raised with encoding when using
+ the memory I/O
+ * parserInternals.c: closed bug 25934 reported by
+ torsten.landschoff@innominate.de
+ * TODO: updated
+
+Sat Nov 25 11:46:27 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in doc/html/* doc/xml.html: made a 2.2.9 release
+ on a non-updated tree :-(, made a 2.2.10 release to correct the
+ situation
+
+Sat Nov 25 10:41:37 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.c parser.[ch] tree.[ch] xmlIO.[ch] xmllint.c xpath.c
+ parserInternals.h vms/build_libxml.com vms/config.vms Makefile.am:
+ integrated a set of OpenVMS changes from Howard Taylor
+ <Howard.Taylor@pacoast.com>
+
+Sat Nov 25 01:21:01 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] xmlIO.c: added xmlDocDumpMemoryEnc() from John Kroll
+ * error.c: applied fix suggested by "Leo Davidson" <leo@ox.compsoc.net>
+
+Sat Nov 25 00:24:49 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: some fixes on auto-open of html/head/body
+ * encoding.c: fixed a compilation error on some gcc env
+ * xpath.c xpointer.[ch] xpathInternals.h: improved the
+ XPointer implementation
+ * test/XPath/xptr/strpoint test/XPath/xptr/strrange3: added
+ related XPointer tests and associated results
+
+Fri Nov 24 14:01:44 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xmldtd.html doc/xml.html: following a short step by step
+ guidance on IRC to help maciej with DTDs I started a small
+ page on the subject.
+
+Fri Nov 17 17:28:06 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: fixed handling of broken charrefs
+ * xmlmemory.h libxml2.dsp include/win32config.h: reporting Windows
+ patches
+
+Mon Nov 13 19:17:20 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html doc/html/* : rebuilt the docs after adding
+ xinclude and updated page for 2.2.7 and 2.2.8
+ * configure.in: releasing 2.2.8
+
+Mon Nov 13 12:39:38 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] parserInternals.c: applied the conditional
+ section processing fix from Jonathan P Springer
+ <jonathan.springer2@gte.net>
+ * xmlversion.h.in win32/libxml2/libxml2.dsp : Updated MS
+ project file, fixed iconv default non support
+ * xpath.c: fixed the problem of evaluating relative expressions
+ when a node context is provided.
+
+Sun Nov 12 16:31:19 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c: fixed gcc 2.95 new warnings
+ * SAX.c: fixed a stupid bug
+ * tree.c: fixed a formatting problem when round-tripping
+ from/to memory
+ * xinclude.c: chased memleak, fixed a base problem
+ * xpointer.c: added xmlXPtrBuildRangeNodeList(), finished ?
+ xmlXPtrBuildNodeList()
+ * TODO: updated
+ * Makefile.am test/XInclude/docs test/XInclude/ents result/XInclude:
+ adding a first small set of regression tests for XInclude
+
+Tue Nov 7 15:11:34 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.[ch]: applied Wayne Davison patches to access
+ the WWW-Authorization header.
+ * parser.c: Closed Bug#30847: Problems when switching encoding
+ in short files by applying Simon Berg's patch.
+ * valid.c: fixed a validation problem
+ * hash.c parser.h parserInternals.h testHTML.c testSAX.c tree.h
+ xmlerror.h xmlmemory.h xmlversion.h.in: applied a DLL patch from
+ Wayne Davison
+ * xpointer.[ch]: added first version of xmlXPtrBuildNodeList()
+ need to be extended to non full nodes selections.
+ * xinclude.c: starts to work decently
+
+Mon Nov 6 17:22:46 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] xinclude.[ch] xmllint.c configure.in valid.c
+ debugXML.c xmlversion.h.in: Started adding XInclude support,
+ this is a new xmllint option
+ * tree.c xpath.c: applied TOM patches for XPath
+ * xpointer.c: fixed a couple of errors.
+ * uri.c: added an escaping function needed for xinclude
+ * testXPath.c hash.c HTMLtree.c: minor cleanups raised by
+ new warning from RH70 gcc's version
+
+Tue Oct 31 14:14:13 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: fixed loop on invalid char in scripts
+ * parser.c: update to description of xmlIOParseDTD()
+ * libxml.m4 xmlversion.h.in: changes contributed by
+ Michael Schmeing <m.schmeing@internet-factory.de>
+ * configure.in: preparing for 2.2.7
+ * Makefile.am: trying to avoid config.h and acconfig.h
+ being included in the distrib
+ * configure.in: released 2.2.7
+
+Mon Oct 30 17:08:10 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] debugXML.c parserInternals.c xpath.c: Deprecated Pi's
+ like namespaces for good. Unified xmlNs and xmlNode somewhat.
+
+Mon Oct 30 16:26:49 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch]: added xmlIOParseDTD()
+ * xpointer.c: added support for the 2 extra parameters of
+ string-range, fixed a stoopid error when '0' was present
+ in XPointer expressions
+ * test/XPath/xptr/strrange2 result/XPath/xptr/strrange2: added
+ testsuite for the above
+
+Mon Oct 30 10:26:43 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * libxml.spec.in: improved package descriptions
+
+Sun Oct 29 19:03:11 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c xpathInternals.h: applied a large cleaning patch
+ from TOM <ptittom@free.fr>, it also add namespace support
+ for function and variables registration.
+
+Sun Oct 29 18:51:46 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c: Wayne Davison's patch fixing xmlBuildURI()
+ * Makefile.mingw: Wayne Davison's update adding hash.c
+
+Sun Oct 29 18:38:12 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c: fixed the root evaluation problems
+ * HTMLparser.c result/HTML/doc3.htm: fixed the problem of non
+ ignorable spaces with <b> <bold> <em>
+ * tree.c: fixed a loop in xmlSearchNsByHref()
+
+Fri Oct 27 18:57:32 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c: applied another XPath patch from TOM
+ * xpath.c include/makefile.am: applied another patch from
+ china@thewrittenword.com (cleanup on IRIX).
+
+Fri Oct 27 13:45:28 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xml-config.1: received a fixed version from Fredrik Hallenberg
+ <hallon@lysator.liu.se>
+
+Thu Oct 26 16:05:25 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c textXPath.c xpathInternals.h: applied TOM <ptittom@free.fr>
+ cleanup patch for XPath
+
+Wed Oct 25 21:31:10 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * patched to redirrect all "out of context" error messages to
+ a reconfigurable routine. The changes are:
+ * xmlerror.h : added the export of an error context type (void *)
+ an error handler type xmlGenericErrorFunc there is an interface
+ xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
+ to reset the error handling routine and its argument
+ (by default it's equivalent to respectively fprintf and stderr.
+ * all the c files: all wild accesses to stderr or stdout within
+ the library have been replaced to calls to the handler.
+
+Wed Oct 25 15:27:19 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: release 2.2.6
+ * xpath.[ch] xpointer.c xpathInternals.h: added xpathInternals.h
+ exporting the inner functions of xpath for extension modules
+ * doc/*: updated and rebuilt the doc
+
+Wed Oct 25 12:48:55 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.c : applied Wayne HTTP cleanup patch
+ * tree.[ch]: applied TOM <ptittom@free.fr> for xmlNodeSetBase()
+ and xmlNodeSetSpacePreserve()
+
+Wed Oct 25 12:11:03 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c: closing bug #29260
+
+Tue Oct 24 18:49:34 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * hash.[ch] debugXML.c: expanded/enhanced the API, added
+ multikey tuples, made hash structure opaque
+ * valid.[ch]: moved elements, attributes, notations decalarations
+ as well as ID and refs to hash tables.
+ * entities.c: hash cleanup
+ * xmlmemory.c: fixed a dump problem in debug mode
+ * include/Makefile.am: problem passing in DESTDIR= values patch
+ from Marc Christensen <marc@calderasystems.com>
+ * nanohttp.c: removed debugging remains
+ * HTMLparser.c: the bogus tag should be ignored (Wayne)
+ * HTMLparser.c parser.c: fixing a number of problems with the
+ macros in the *parser.c files (Wayne).
+ * HTMLparser.c: close the previous option when opening a new one
+ (Marc Sanfacon).
+ * result/HTML/*: updated the HTML results accordingly
+
+Sun Oct 22 18:39:19 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * entities.[ch] xpath.[ch] hash.[ch] debugXML.c tree.h: added/hacked
+ hash tables from Bjorn Reese <breese@mail1.stofanet.dk>. Switched
+ XPath functions and XML entities table to them. More to come...
+ * xmlIO.c: fixed libxml closing FILEs it didn't open.
+
+Sun Oct 22 13:59:50 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: coalesce adjacent text nodes
+ * valid.c: handling of blank nodes in DTd validation (raised
+ by problems with a posteriori validation).
+ * nanohttp.c: changing behaviour on HTTP write stuff.
+ * HTMLtree.c: forced body and html to be explicitely closed.
+ * xpath.h: exported more XPath functions.
+
+Sun Oct 15 22:28:32 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Release of 2.2.5
+ * xpointer.c: range() range-inside and other helper functions
+ * parserInternals.c: fixed perf problem raised by rolf@pointsman.de
+
+Sun Oct 15 16:21:27 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.c: HTML attributes need normalization too (Bjorn Reese)
+ * HTMLparser.[ch]: addded htmlIsScriptAttribute()
+
+Sun Oct 15 13:18:36 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/*: rebuilt docs preparing for 2.2.5 release, added URI
+ and XPointer modules
+
+Sun Oct 15 12:13:30 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.h: closed #25107
+
+Sun Oct 15 12:06:16 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * testSAX.c: fixed problem with cdata reporting
+ * SAXresult/* : updated
+
+Sun Oct 15 12:00:24 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c test/wap.xml result/noent/wap.xml result/wap.xml:
+ Closed bug #27499, added to regression tests
+ * TODO: updated
+
+Sun Oct 15 01:34:37 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c HTMLtree.[ch] SAX.c testHTML.c tree.c: fixed HTML
+ support for SCRIPT and STYLE with help from Bjorn Reese
+ * test/HTML/* result/HTML/*: added simple testcase and updated
+ the existing ones.
+
+Fri Oct 13 18:24:31 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c xpointer.c: XPointer reorder of ranges start/end and
+ string-range for empty strings
+ * test/XPath/docs/str test/XPath/xptr/chaptersrange
+ test/XPath/xptr/strrange: augmented the XPointer testsuite
+
+Fri Oct 13 12:21:48 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html doc/xmlmem.html: added a module describing memory
+ interfaces and use, updated the main page.
+
+Fri Oct 13 01:23:48 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c nanohttp.c xmlIO.c: Wayne Davison Win32 patch
+ nanoftp code work on Windows too now
+
+Fri Oct 13 00:54:37 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * testXPath.c xpath.[ch]: moved some debug functions to xpath core
+ * xpointer.c: implemented string-range() at least a good first version
+ * test/XPath/docs/str test/XPath/xptr/strrange
+ result/XPath/xptr/strrange: the string-range() tests
+
+Thu Oct 12 10:02:59 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am include/Makefile.am include/win32config.h
+ win32/Makefile.mingw: fixed problems reported by Wayne Davison
+ and make distcheck
+
+Thu Oct 12 01:44:08 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.c: added xmlNanoHTTPTimeout(int delay), removed a bug
+ xmlNanoHTTPMethod on input MimeType Tony Lam <Tony.Lam@eng.sun.com>
+ * xpointer.c: slight extension of xmlXPtrLocationSetMerge
+
+Thu Oct 12 01:37:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * config.h.in configure.in nanoftp.c nanohttp.c xmlversion.h.in :
+ patch for socklen_t detection by
+ Albert Chin-A-Young <china@thewrittenword.com>
+
+Wed Oct 11 17:53:57 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c valid.c xmllint.c: Fixed a few postvalidation bugs
+ and added a --dtdvalid option to xmllint used to test it
+
+Wed Oct 11 15:01:29 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xml-config.1 Makefile.am libxml.spec.in: adding a man page for
+ xml-config by Fredrik Hallenberg <hallon@lysator.liu.se>
+
+Wed Oct 11 12:41:30 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.[ch] xpointer.[ch]: worked on XPath functions and variable
+ handlings (registration, lookup, cleanup)
+
+Wed Oct 11 01:46:44 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in Makefile.am include/makefile.am: adding XPointer
+ and XPtrtests target
+ * xpointer.[ch] : new files for XPointer support
+ * test/XPath/xptr result/XPath/xptr: added XPointer testsuite and
+ more XPath tests
+
+Wed Oct 11 01:23:25 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: fixed, very broken, make distcheck works again
+
+Wed Oct 11 02:53:10 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * More work toward 2.2.5, integrated a number of patches
+ * configure.in Makefile.am win32config.h.in: trying to cleanup
+ make distcheck .... huh ...
+ * include/Makefile.am include/win32config.h: new directory
+ for includes
+ * win32/Makefile.mingw win32/README.MSDev win32/libxml2/libxml2.dsp
+ updated teh makefiles and instructions for WIN32
+ * xpath.c: small fixes
+ * test/XPath/ results/XPath: updated the testcases and results
+ * HTMLparser.c nanohttp.c testXPath.c: incorporated provided or
+ suggested patches
+ * valid.c: fixed an ID bug
+
+Mon Oct 9 14:28:56 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * moved xml-error.h to xmlerror.h: seems this allowed to bypass
+ the automake bug where wrong dependencies were generated.
+ * xpath.[ch]: worked on XPointer
+
+Fri Oct 6 12:58:04 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in Makefile.am: 2.2.5, ship the include in an
+ include/libxml subdirectory, use symlinks when using CVS
+ * testSAX.c: fixed small bug
+ * testXPath.c: changed the way testfiles are parsed
+ * debugXML.c: same kind of cleanup when parsing an argument expression
+ XPath/XPointers can have blanks embedded
+ * xpath.[ch]: more cleanup, reorgs for XPointer work
+ * parserInternals.c parser.c HTMLparser.c: fixed wrong include
+ * win32/README.MSDev win32/libxml2/libxml2.dsp: Windows stuff
+
+Thu Oct 5 18:13:15 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * debugXML.c testXPath.c xpath.[ch]: got pissed by some nastyness
+ in the XPath engine, rewrote large parts of it, now it's far
+ cleaner and in sync with the REC not an old WD. Fixed a parsing
+ problem in the interactive XML shell found when testing XPath.
+
+Wed Oct 4 15:25:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * debugXML.c testXPath.c xpath.[ch]: More work on XPath/Xpointer,
+ incorporated "(TOM)" <ptittom@free.fr> patches rebuilt the XPath
+ examples with the extra test
+
+Wed Oct 4 14:39:01 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c xmlIO.c xmlIO.h: fixed bug 26650, and improved
+ the global init function.
+
+Tue Oct 3 11:28:52 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: Doohhh, attribute name parsing was still case
+ sensitive ! Fixed this ...
+ * result/HTML/* : updated the tests results accordingly
+
+Mon Oct 2 23:47:32 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.[ch] debugXML.c testXPath.c: fixed the XPath evaluation
+ engine, should be far more stable, incorporated a new version of
+ preceding/following axis, need testing
+ * uri.c: fixed file:///c:/a/b/c problem
+ * test/XPath/tests/idsimple: augmented the XPath tests
+
+Sun Oct 1 22:33:00 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/* rebuilding docs for 2.2.4 release
+
+Sun Oct 1 22:16:33 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: releasing 2.2.4
+ * parser.[ch]: added xmlStrEqual()
+ * HTMLparser.c HTMLtree.c SAX.c debugXML.c entities.c parser.c
+ tree.c valid.c xlink.c xpath.c: converted all !xmlStrcmp to
+ use xmlStrEqual instead
+ * TODO: updated
+ * added an XPath test
+
+Sun Oct 1 20:19:39 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: fixed htmlStartCloseIndexinitialized init
+ * entities.h: exported xmlInitializePredefinedEntities
+ * parser.[ch] : added xmlInitParser()
+ * parserInternals.h : had to export htmlInitAutoClose()
+
+Sun Oct 1 16:28:22 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.[ch] : fixed some serious XPath Predicate evaluation
+ problems
+ * Makefile.am : added XPath regression tests to normal tests
+ * uri.c: fixed a problem with local paths, cleanup
+ * parser.c: fixed a problem with large CData sections
+
+Sat Sep 30 16:35:54 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in xml-config.in: patch from "Ben Taylor"
+ <sol7x86@hotmail.com> for solaris shared libs lookup
+
+2000-09-30 Martin Baulig <baulig@suse.de>
+
+ * libxml-2.0.pc.in: Provide pkg-config script.
+
+ * configure.in: Create the libxml-2.0.pc script from the
+ libxml-2.0.pc.in templates.
+ * Makefile.am (pkgconfig_DATA): Install the libxml-2.0.pc
+ script in `$(libdir)/pkgconfig'.
+
+Mon Sep 25 16:23:41 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c parser.c tree.c tree.h: Avoiding a few warning
+ when compiling with MSC
+
+Sun Sep 24 20:32:52 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c: patch for normalize-string() substring-before(),
+ substring-after() and translate() functions from Bjorn Reese
+ <breese@mail1.stofanet.dk>
+ * libxml.m4 Makefile.am: added libxml.m4 from Debian ?
+ Fredrik Hallenberg <hallon@lysator.liu.se>
+ * TODO: updated
+
+Sun Sep 24 10:00:49 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlversion.h.in nanoftp.c nanohttp.c: traying to work out the
+ problem of socklen_t being undefined on a number of platforms
+ * debugXML.c: fixed a compilation problem when without snprintf
+
+Sat Sep 23 12:19:45 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c uri.c: Another patch from Wayne Davison, correcting
+ an URI bug and a fix for the control-character-induced infinite loop
+ * nanohttp.c: preventive fix for compiling on WIN32
+
+Fri Sep 22 18:06:08 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlint.c: closing bug #25000
+
+Fri Sep 22 14:17:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlIO.h tree.h: made xmlNodeDump() and xmlNodeDumpOutput() public
+ * parser.[ch] nanohttp.c HTMLtree.c HTMLparser.c tree.c: applied and
+ modified slightly Wayne Davison patch adding xmlStrcasecmp and
+ related function, fixing xmlStrncmp(), and associated cleanup
+ * result/HTML/entities.html.sax: updating result
+
+Tue Sep 19 14:20:10 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c: applied patch for URI escaping from Wayne Davison
+ <wayned@blorf.net>
+ * tree.c parserInternals.c HTMLparser.c: memset checks patches
+ from Denis Barbier <barbier@imacs.polytechnique.fr>
+ * HTMLparser.c: UTF8 characters in HTML tag-attribute values
+ patch from Wayne Davison
+
+Sun Sep 17 18:37:03 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html : updated with new releases, adding "how to help"
+
+Sun Sep 17 17:58:37 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.c debugXML.c parser.c parserInternals.c tree.c valid.c xpath.c:
+ removed a few warnings in pedantic mode ...
+ * parserInternals.c parser.c: moved encoding switching function
+ to parserInternals.c
+ * configure.in, doc/Makefile.am libxml.spec.in: released 2.2.3
+
+Sat Sep 16 20:12:41 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c parser.c: set ctxt->errNo before calling the
+ error or warning handlers
+
+Wed Sep 13 22:03:18 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parserInternals.c parserInternals.h parser.c Makefile.am:
+ created a new module parserInternals.c, moved most of the
+ code shared by the various parsers there, as well as
+ deprecated code from parser.c. More cleanup of parser.c
+ * uri.c: fixed a problem when URI is NULL
+ * valid.c: speedup when looking for an attribute declaration
+
+Sun Sep 10 17:53:48 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished
+ the cleanup of the computation of URI references when seeking
+ external entities. The URI reference string and the resulting
+ URI are both stored now.
+ * parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c:
+ large s(n)printf checks and cleanup from Denis Barbier
+ <barbier@imacs.polytechnique.fr>
+ * xmlversion.h.in tree.h: couple of SGML declarations for a
+ possible docbook module.
+ * result/VC/ : a couple of test output changed due to the change
+ of the entities URI
+
+Sun Sep 10 15:59:58 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.h: added a _private field for linking user's data
+
+Sun Sep 10 15:14:43 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c parserInternals.h: demacroified most of the IS_XXX
+ the gain in size is significant so ...
+
+Fri Sep 8 20:48:29 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * entities.c: cases where looking up entities with doc==NULL
+ covered
+
+Tue Sep 5 12:41:15 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c: applied Wayne Davison patch
+ * Makefile.in test/URI/uri.data result/URI/uri.data: updated URI tests
+
+Mon Sep 4 13:01:45 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c testUri.c: applied Wayne Davison patches
+ * test/URI/uri.data result/URI/uri.data: first set of tests/results
+ * Makefile.in: added URItest and included thenin "make tests"
+
+Sun Sep 3 19:19:29 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlversion.h.in: closed bug 22941
+
+Thu Aug 31 16:55:55 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xmlio.html: added doc and example for entity loader
+ redefinition.
+
+Thu Aug 31 14:59:28 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xmlio.html doc/xml.html: added a doc on the I/O mechanism
+ used by libxml
+
+Tue Aug 29 20:22:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: Fixed bug on invalid ontent characters and when using
+ push.
+ * xmllint.c: fixed xmllint endling of errors in push mode
+
+Tue Aug 29 11:24:48 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c testHTML.c: applied two new patches from
+ Wayne Davison <wayned@users.sourceforge.net>
+ * result/HTML/*.sax: regenerated HTML SAX output
+ * parser.c: more cleanup.
+
+Mon Aug 28 11:58:12 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.[ch] testHTML.c: applied the second set of
+ patches from Wayne Davison <wayned@users.sourceforge.net>,
+ adding htmlEncodeEntities()
+ * HTMLparser.c: fixed an ignorable white space detection bug
+ occuring when parsing with SAX only
+ * result/HTML/*.sax: updated since the output is now HTML
+ encoded...
+
+Mon Aug 28 00:38:31 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.[ch]: applied some of Wayne Davison
+ <wayned@users.sourceforge.net> patches
+
+Sun Aug 27 22:14:01 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.c tree.c debugXML.c: fixed bogus behaviour when an
+ undeclared namespace prefix was used, added a warning.
+ Cleaned up support w.r.t. entities, spilling out a warning
+ and being pedantic on lookups.
+ * test/warning/ent9 : added testcase for previous example.
+ * TODO: updated
+ * parserInternals.h parser.c: changed the way names are parsed
+ now allow infinite size and decrease penalty for normal use
+ * parser.c: Started a big cleanup/check of the parser code,
+ fixed some of the most tortuous entity code, spotted code
+ unused anymore
+ * test/*: added tests for very long names and related nasty
+ things.
+
+Sat Aug 26 23:31:04 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/encoding.html: added encoding aliases doc
+ * doc/xml.html: updates
+ * encoding.[ch]: added EncodingAliases functions
+ * entities.[ch] valid.[ch] debugXML.c: removed two serious
+ bottleneck affecting large DTDs like Docbook
+ * parser.[ch] xmllint.c: added a pedantic option, will be
+ useful
+ * SAX.c: redefinition of entities is reported in pedantic mode
+ * testHTML.c: uninitialized warning from gcc
+ * uri.c: fixed a couple of bugs
+ * TODO: added issue raised by Michael
+
+Wed Aug 23 01:50:51 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/encoding.html: propagated Martin Duerst suggestions
+
+Wed Aug 23 00:23:41 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: Fixed Bug#21552: libxml fails to decode &amp;
+ * uri.c testUri.c patches, by Marc Sanfacon (1 left)
+ * parser.c HTMLparser.c: HTML/encoding push problems reportedi
+ by Wayne Davison
+
+Sun Aug 20 17:03:38 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c nanohttp.c: small cleanup
+ * TODO: updated
+
+Sat Aug 19 22:57:02 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * added an old VC testcase and updated title.xml entity
+
+Sat Aug 19 21:02:08 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c SAX.c tree.c HTMLtree.h result/HTML/*: work
+ done on auto-opening of <p> tags and cleanup of SAX output
+
+Sat Aug 19 18:45:40 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * libxml.4 xmllint.1 Makefile.am libxml.spec.in: added man pages
+
+Sat Aug 19 18:38:53 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html libxml.* structure.*: updated the doc a bit
+
+Thu Aug 17 15:50:00 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * testSAX.c testHTML.c result/HTML/: cleanup of the output
+ of SAX tests
+
+Mon Aug 14 13:56:33 EDT 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Patch from Albert Chin-A-Young <china@thewrittenword.com>:
+ * xmllint.c: workaround a MAP_FAILEd definition bug in DU-4.0
+
+Mon Aug 14 11:10:20 EDT 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Patch from Dave Yearke <yearke@eng.buffalo.edu>:
+ * testHTML.c: fix core dump on Solaris 2.x systems
+ * HTMLparser.c: fix segfault if ctxt->sax->characters() is NULL
+ * result/HTML/*.sax: previous bug fix lead to new results
+
+Mon Aug 14 10:26:09 EDT 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Patch from Albert Chin-A-Young <china@thewrittenword.com>:
+ * configure.in: added --with-readline=DIR to accept alternate
+ path for readline include/library
+ * configure.in: added AM_C_PROTOTYPES to add -Aa -D_HPUX_SOURCE
+ for ANSI under HP-UX
+ * config.in: Removed @LIBS@ from xml-config because @XML_LIBS@
+ includes @LIBS@
+
+Sat Aug 12 23:19:42 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/* : rebuilt the docs
+ * getting ready for 2.2.2 release
+
+Sat Aug 12 16:42:37 EDT 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch]: added xmlGetFeaturesList() xmlGetFeature()
+ and xmlAddFeature()
+ * tree.[ch]: added xmlAddChildList()
+ * xmllint.c: MAP_FAILED macro test
+ * parser.h: added xmlParseCtxtExternalEntity()
+ * valid.c: applied bug fixes removed warning
+ * tree.c: added CDATA block to elements content
+ * testSAX.c: cleanup of output
+ * testHTML.c: added SAX testing
+ * encoding.c: better error recovery
+ * SAX.c, parser.c: fixed one of the external entity processing
+ of the OASis testsuite
+ * Makefile.am: added HTML SAX regression tests
+ * configure.in: bumped to 2.2.2
+ * test/HTML/ result/HTML: added a few of HTML tests, and added the
+ SAX results
+
+Fri Aug 4 11:21:50 PDT 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: patch for HP compiler
+
+2000-08-04 Sven Heinicke <sven@zen.org>
+
+ * xmllint.c: Was coredumping sometimes when the file given didn't
+ exist.
+
+Sat Jul 22 05:59:05 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c xmlIO.[ch]: fixed the problem of encoding support
+
+ when using in memory parsing. Need some cleanup.
+ * xmllint.c configure.in: added a --memory flag to test memory
+ parsing
+
+Fri Jul 21 17:09:57 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.c: fixed socklen_t replacement to unsigned int
+ * parser.c: fixed a space handdling missing at the end of
+ production 28 DOCTYPE.
+ * xmlmemory.c: fixed a stupid bug on the routine to override
+ allocation functions
+ * TODO: updated
+
+Fri Jul 14 17:01:14 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/ regenerated the docs
+
+Fri Jul 14 16:12:20 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/encoding.html doc/xml.html: added I18N doc
+ * encoding.[ch] HTMLtree.[ch] parser.c HTMLparser.c: I18N encoding
+ improvements, both parser and filters, added ASCII & HTML,
+ fixed the ISO-Latin-1 one
+ * xmllint.c testHTML.c: added/made visible --encode
+ * debugXML.c : cleanup
+ * most .c files: applied patches due to warning on Windows and
+ when using Sun Pro cc compiler
+ * xpath.c : cleanup memleaks
+ * nanoftp.c : added a TESTING preprocessor flag for standalong
+ compile so that people can report bugs more easilly
+ * nanohttp.c : ditched socklen_t which was a portability mess
+ and replaced it with unsigned int.
+ * tree.[ch]: added xmlHasProp()
+ * TODO: updated
+ * test/ : added more test for entities, NS, encoding, HTML, wap
+ * configure.in: preparing for 2.2.0 release
+
+Mon Jul 10 16:17:18 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c: fixed the way the control connection is handled
+ * libxml.spec.in: fixed the dependencies and cleanup
+
+Mon Jul 3 14:37:07 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html: changed the xmlsoft.org structure, updated the
+ examples w.r.t. root and childs
+
+Sun Jul 2 20:51:43 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * libxml.spec.in: fixed bug #7419, dependencies fouled for libxml-devel
+
+Sun Jul 2 09:52:45 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: Work on character encoding support for the HTML parser
+ * HTMLparser.c: Fixed some autoopen/autoclose probs for the HTML parser
+ * encoding.c: Fixed a potential memleak in the encoding stuff
+
+Sat Jul 1 13:44:22 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/FAQ.html doc/Makefile.am : added a FAQ
+
+Fri Jun 30 20:29:08 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c HTMLtree.c SAX.c valid.c tree.h : more cleanup
+ of the HTML parser to force it to not bypass SAX
+
+Fri Jun 30 11:19:59 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * win32config.h.in: updated
+ * xmlversion.h.in: crap forgot to update this, this mean 2.1.0
+ lacks iconv support :-( need to release 2.1.1
+ * configure.in: release 2.1.1
+ * HTMLparser: fixed bug #14784
+ * xpath.c HTMLparser.c encoding.c parser.c: fix warning raised
+ by Windows compiler
+ * HTMLparser.c SAX.c HTMLtree.h tree.h: create HTML document in
+ the SAX startDocument() callback.
+ * TODO: updated
+
+Thu Jun 29 12:06:48 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * added xmlStopParser()
+
+Wed Jun 28 23:10:26 MEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: 2.1.0 prerelease
+ * Large resync between W3C and Gnome tree
+ * nanoftp, nanohttp.c: fixed stalled connections probs
+ * HTMLtree.c SAX.c : support for attribute without values in
+ HTML for andersca
+ * valid.c: Fixed most validation + namespace problems
+ * HTMLparser.c: start document callback for andersca
+ * debugXML.c xpath.c: lots of XPath fixups from Picdar Technology
+ * parser.h, SAX.c: serious speed improvement for large
+ CDATA blocks
+ * encoding.[ch] xmlIO.[ch]: Improved seriously saving to
+ different encoding
+ * example/Makefile.am example/gjobread.c tree.h: work on
+ libxml1 libxml2 convergence.
+ * config.h.in parser.c xmllint.c: added xmlCheckVersion()
+ and the LIBXML_TEST_VERSION macro
+
+Fri Jun 23 22:26:07 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html: various patches and improvements typo fixed by
+ Felix Natter
+ * doc/libxml-doc.el: Emacs module to lookup the libxml documentation
+ from Felix Natter <fnatter@gmx.net>
+
+Sat May 6 10:09:45 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/upgrade.html: updated with instructions for support of both
+ libxml-1.x and libxml-2.x
+ * doc/gjobread.c : applied Todd Dukes <tdukes@ibmoto.com> patch
+ for 2.x support and also fixed includes
+
+Wed May 3 14:21:25 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * encoding.[ch], xmlIO.[ch], parser.c, configure.in : revamped
+ the encoding support, added iconv support, so now libxml if
+ compiled with iconv automatically support japanese encodings
+ among others. Work based on initial patch from Yuan-Chen Cheng
+ I may have broken binary compat in the encoding handler
+ registration scheme, but that was so utterly broken I don't
+ expect anybody to have used this feature until now.
+ * parserInternals.h: fixup on the CHAR range macro
+ * xml-error.h, parser.c: catch URL/URI errors using the uri.c
+ code.
+ * tree.[ch]: added xmlBufferGrow(), was needed for iconv
+ * uri.c: added xmlParseURI() I can't believe I forgot to
+ implement this one in 2.0 !!!
+ * SAX.c: moved doc->encoding update in the endDocument() call.
+ * TODO: updated.
+
+Mon Apr 24 13:30:13 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.h: removed extraneous xmlRemoveProp definition
+ * TODO: added item about --disable-corba configure switch
+ * tree.c parser.c: fixed problems for xmlCopyDoc and postvalidation
+ * nanoftp.c: fixed include problems giving troubles on AIX and
+ slowlaris
+ * xmlIO.[ch] valid.h tree.[ch] xlink.c xmlmemory.c uri.c
+ parser.c nanoftp.c nanohttp.c SAX.c testSAX.c :
+ comment and headers changes to lower gtk-doc number of warnings
+ * doc/html/*: rebuilt docs
+
+Sun Apr 16 11:23:29 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HACKING: documented the tag for 1.x and instructions
+
+Wed Apr 12 15:47:22 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlIO.[ch] parser.[ch]: More interfaces for new I/O functions
+ xmlNewIOInputStream, xmlParserInputBufferCreateIO,
+ xmlCreateIOParserCtxt
+ * parser.c parserInternals.h: speedup of IS_CHAR like macros,
+ significant overall improvement
+ * xmllint.c: added I/O test to xmllint
+ * testSAX.c: added a speed test
+ * doc/* : updated/regenerated
+
+Sat Apr 8 14:54:54 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.c uri.h parserInternals.h: cosmetic changes from
+ "Timur I. Bakeyev" <timur@bat.ru>, including making
+ xmlCreateURI() public
+
+Fri Apr 7 18:35:02 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlIO.[ch] parser.c: cleane up the xmlParserInputBuffer mess
+ and the code at the same time. Added a clean mechanism for
+ overload or added input methods: xmlRegisterInputCallbacks()
+ * tree.c: fixed xmlPrevSibling and xmlNextSibling per
+ Christophe Le Gal (Christophe.Le-Gal@imag.fr) input
+ * TODO: updated
+ * doc/* : updated/regenerated
+ * doc/Makefile.am: tweaks to avoid problem with libxml link in the
+ source dir
+
+Wed Apr 5 21:11:35 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * testURI.c: yet another forgotten commit, I should get some sleep !
+
+Wed Apr 5 20:36:46 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmllint.c: forgot to commit this too ?
+
+Wed Apr 5 16:22:44 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlversion.h.in : forgot to commit this previously
+
+Mon Apr 3 21:47:10 CEST 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: preparing libxml-2.0.0 version looks Ok so far
+ * README TODO: updated for release
+ * uri.c uri.h: added authority parsing/saving
+ * uri.c testURI.c Makefile.am: moved the testing code to testURI.c
+ * xmlversion.h.in configure.in nanoftp.[ch] nanohttp.[ch] encoding.h
+ debugXML.[ch] xpath.[ch] xmlIO.c tester.c testXPath.c testHTML.c
+ tree.c HTMLtree.c HTMLparser.c tree.c tree.h parser.c
+ Makefile.am : added compile-time customization of libxml
+ --with-ftp --with-http --with-html --with-xpath --with-debug
+ --with-mem-debug
+ * *.[ch] autoconf.sh : moved to an absolute adressing of includes :
+ #include <libxml/xxx.h> I hope it won't break too much stuff
+ and will be manageable in the future...
+ * xmllint.c Makefile.am libxml.spec.in : renamed tester.c to xmllint.c
+ and added xmllint to the installed programs
+ * uri.h: added xmlFreeURI()
+
+Fri Mar 24 14:35:21 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * uri.c uri.h: finished the escaping handling, the base support
+ and the URI path normalization. Looks good just lacks the
+ authority content parsing code.
+ * Makefile.am: added instructions to generate testURI
+ * TODO: updated
+ * doc/xml.html, doc/smallfootonly.gif doc/w3c.png: updated,
+ added links and icons for W3C and Gnome
+
+Mon Mar 20 14:05:26 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlmemory.[ch] : seems I forgot to actually update the files in
+ the last commit :-)
+ * doc/xml.html doc/html/* : updated and uploaded the docs
+
+Mon Mar 20 12:33:51 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * test/valid/dtds/xhtml*: removed RCS infos (pain with CVS)
+ * TODO: updated
+ * xmlmemory.[ch] : added xmlMemSetup() and xmlMemGet() to override
+ libxml default allocation function with another set (like gmalloc/
+ gfree).
+ * Makefile.am, uri.c, uri.h: added a set of functions to do
+ exact (litteraly copied from the RFC 2396 productions) parsing
+ and handling of URI. Will be needed for XLink, one XML WFC,
+ XML Base and reused in the nano[ftp/http] modules. Still work
+ to be done.
+
+Tue Mar 14 20:52:35 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, libxml.spec.in : libxml2
+ * doc/* : updated the doc page, rebuilt the docs
+
+Tue Mar 14 19:11:29 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * all: tagged LIB_XML_1_X
+ * *.c *.h : updated from W3C CVS tree
+ * configure.in : 2.0.0-beta
+ * libxml.spec.in : libxml2 package nam
+ * result/* : new version of the tests output
+
+Mon Mar 6 09:34:52 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html, doc/update.html: updated docs, 1.8.7
+
+Sat Mar 4 16:14:42 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/* : rebuilt the docs
+ * parser.c: final patch on #6766
+ * valid.c: small patch on validity checks.
+
+Sat Mar 4 12:38:41 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/upgrade.html: instruction on how to upgrade from 1.x to 2.x
+ added
+ * parser.c: adding xmlKeepBlanksDefault() as a way to manage
+ compatibility w.r.t. XML spec and existing code.
+
+Thu Mar 2 04:45:15 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: seems a better solution to <a> </a> exists,
+ will try it for a while
+
+Thu Mar 2 02:26:13 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: tried to remove the <a> </a> generating <a/>
+ this is hard. Left a flag for that purpose. Fixed bug #6766
+ * configure.in: prepared 1.8.7 not released, due to previous
+ problem
+
+Thu Mar 2 03:03:50 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html : applied second patch from Paul DuBois
+
+Tue Feb 29 23:55:13 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html : applied patch from Paul DuBois
+
+Thu Feb 3 16:36:39 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c HTMLparser.c: do a bit of bufferization in push mode.
+
+Thu Feb 3 15:59:37 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c nanohttp.c tree.c HTMLtree.[ch] debugXML.c xpath.c: Fixed
+ compilation warnings on various platforms.
+ * parser.c: Fixed #5281 validity error callbacks are now desactived
+ by default if not validating.
+
+Thu Feb 3 13:46:14 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c, win32config.h.in: patches to compile on WIN32
+
+Wed Feb 2 22:51:16 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c: snprintf/sprintf patch courtesy George Katsirelos
+ <gkatsi@cs.toronto.edu>
+
+Mon Jan 31 18:58:21 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when
+ processing URLs
+
+Mon Jan 31 14:25:57 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.[ch]: cleanup, bug fixes, integration in rpmfind, added
+ xmlNanoFTPUpdateURL for persistent control connections.
+ * configure.in: 1.8.6
+
+Thu Jan 27 17:52:29 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.[ch], nanoftp.[ch]: cleanup, added proxy support
+ * tree.[ch] : added xmlSaveNoEmptyTags
+
+2000-01-29 James Henstridge <james@daa.com.au>
+
+ * nanoftp.c: include <netinet/in.h> for IPPROTO_TCP.
+
+ * Makefile.am: added nanoftp.[ch] to the build.
+
+Wed Jan 26 18:14:55 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.[ch]: cleanup, comments, API
+ * debugXML.c : fixed a bug in the cat command
+ * doc/*: regenerated the docs
+
+Wed Jan 26 16:52:50 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanoftp.[ch] parser.c xmlIO.[ch]: added a Nano FTP implementation
+ * debugXML.c : fixed a bug in the cat command
+ * valid.c: fixing some small probs
+ * libxml.spec.in: get rid of the SNAP suffix
+ * doc/xml.html: updated the status
+
+Mon Jan 24 14:31:09 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xml-config.in: xml-config --version to just return the
+ version number
+ * xpath.c: some cleanup w.r.t. axis when the current node is
+ an attribute.
+ * TODO: updated
+
+Tue Jan 18 18:46:06 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: prepared for libxml-1.8.5
+ * doc/* recompiled the documentation
+
+2000-01-17 Jody Goldberg <jgoldberg@home.com>
+
+ * configure.in : WARNING autoconf subtlety alert :
+ Use AC_CHECK_HEADERS rather than AC_CHECK_HEADER
+ when looking for zlib.h so that HAVE_ZLIB_H is defined.
+ * config.h.in : Have a #undef for HAVE_ZLIB_H so that it will
+ get defined by AC_CHECK_HEADERS.
+
+Mon Jan 17 17:04:12 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: fixed a hideous bug in xmlGetProp() thanks to
+ Rune.Djurhuus@fast.no
+
+Sat Jan 15 15:09:06 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * TODO: updated
+ * tree.c, parser.c: made sure that only memory alloc problems
+ and internal parser errors are allowed to write to stdout or
+ stderr.
+
+Thu Jan 13 11:49:11 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c : restored xmlNewGlobalNs since this seems used by
+ a lot of existing code :-(, fixed a bug in xmlNewNs
+ * nanohttp.c: fixed a problem with INCLUDE_WINSOCK
+ * HTMLparser.c, parser.c, entities.c, valid.c : removed all calls
+ to exit() from the library code.
+ * xpath.c, parser.c: removed bugs or unused code detected by
+ Windows compilers
+ * parser.c: started adding interfaces for parsing well balanced
+ XML fragments
+ * configure.in: releasing 1.8.4
+ * doc/* : rebuilt the docs
+
+Sun Jan 9 23:03:20 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] : added xmlNewDocFragment() for DOM
+ * testHTML.c: uninitialized variable.
+
+Wed Jan 5 17:29:17 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/* : rebuild the docs
+
+Wed Jan 5 17:08:43 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * acconfig.h: readline and history patch
+ * valid.[ch]: added xmlRemoveID() and xmlRemoveRef()
+ * tree.c: added check and handling when possibly removing an ID
+ * tree.c, HTMLparser.h, HTMLtree.h: fixed entities parsing
+ and saving.
+ * test/HTML/entities.html result/HTML/entities.html* : test for
+ various entities reference cases
+ * result/HTML/* : as a result output of some testcase have
+ changed
+ * HTMLparser.c, parser.c: fixed a bug in the push mode triggered
+ by previous example. added xmlParseTryOrFinish().
+ * xpath.h tree.h parser.h valid.h xmlIO.h xlink.h encoding.h
+ entities.h debugXML.h HTMLparser.h: changed the way struct are
+ declared to allow gtk-doc to expose those
+ * parser.c: closed bug #4960
+ * Makefile.am configure.in: Applied patch from
+ Albert Chin-A-Young <china@thewrittenword.com> for better zlib
+ and math/socket libs detection
+
+Mon Jan 3 18:29:43 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, Makefile.am: link tester against readline
+ * doc/xml.html doc/*/*: updated and rebuilt the documentation pages
+
+Mon Jan 3 11:58:05 CET 2000 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch]: added xmlRemoveProp
+ * win32config.h.in nanohttp.c: avoid including the Windows
+ socket stuff in every C files
+ * parser.c: removed an indetermination xmLDecl/PI(xml...) in
+ the XmL parser(s)
+ * test/ns4 result/ns4 etc...: added test case for previous prob
+ * tree.c: xmlNewNs wasn't checking for double definition
+ * Makefile.in: fixed a problem with dist-hook duplicates
+ * parser.[hc], xmlIO.c: fixed the loading of external entities
+ APIs, now xmlLoadExternalEntity() is used everywhere and
+ setting up an app specific front-end using the
+ * SAX.c parser.c: some fixes, now the xhtml spec validates
+ with the xhtml DTD.
+ * error.c: fixed crashes in case of no input stream
+ * test/valid/[dtds/]/xhtml* : added the xhtml spec and dtds
+ to the validation tests and results
+
+Wed Dec 29 15:29:52 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.[ch] testHTML.c: added push mode for the HTML parser
+ too htmlCreatePushParserCtxt() and htmlParseChunk()
+ * parser.c: a bit of cleanup.
+ * SAX.c, HTMLparser.c: some attributes may not have values (contrary
+ to XML) removed the last mem leak known
+ * HTMLtree.c: output message cleanup
+ * xmlmemory.c: display content info about memory blocks
+ * result/HTML/wired.* : missing att value warning change
+
+Tue Dec 28 17:42:41 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/* : rebuilt the documentation
+
+Tue Dec 28 18:44:22 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] parserInternals.h: Push parser for XML,
+ seems to work fine now
+ * tester.c debugXML.[ch]: Added an XML shell debug facility and
+ --push for push testing
+ * xpath.[ch] : cleaned up for Shell usage, added missing APIs
+ * testSAX.c: added --push
+ * HTMLtree.[ch] tree.[ch]: new functions for dumping parts of the
+ subtree
+ * xmlIO.[ch] : enriched API + fixes for push mode
+ * entities.[ch]: added the entity content length to the struct.
+ * xmlmemory.[ch]: new API to show the last entries for the shell
+ * valid.c: added required attribute testing
+ * SAX.c: the cdata callback now merge contiguous fragments
+ * HTMLparser.c: cleanup of some macros
+
+Wed Dec 22 12:20:53 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: fix for PIs name starting with xml
+ * tree.c: fixed a potential problem with || and && ops
+ * *.c, configure.in win32config.h.in : generate win32config.h for
+ those on the Other Side !
+
+Tue Dec 21 17:22:17 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: fixed a stupid = vs. == bug :-(
+ * doc/gnome-xml.sgml: s/glade/xml/
+
+Tue Dec 21 14:29:34 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, doc/xml.html : bug fix release 1.8.2
+ * debugXML.h nanohttp.h xml-error.h xmlmemory.h xpath.h :
+ Hopefully the end of that silly C++ include problem
+ * tree.[ch]: Added a few functions: xmlReplaceNode, xmlAddPrevSibling,
+ xmlAddNextSibling, xmlNodeSetName and xmlDocSetRootElement
+ * HTMLparser.c HTMLparser.h HTMLtree.c: When saving HTML try to avoid
+ troubles with autoclosed elements when the stree shape doesn't
+ follow the DtD specs. Added htmlIsAutoClosed() and
+ htmlAutoCloseTag()
+ * result/HTML/*.htm*: Updated the HTML examples regression tests output
+ * SAX.c tree.c: fixed bug on defaulting namespaces on attributes
+ * debugXML.c: fixed a bug on printing default namespaces.
+ * HTMLtree.c: fixed a problem when outputing XML parsed docs as HTML
+
+Mon Dec 20 16:20:55 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * result/HTML/*.htm[l] : updated the HTML regression tests according
+ to the new output
+ * xpath.h xml-error.h valid.h tree.h parser.h entities.h SAX.h
+ HTMLtree.h tree.c entities.c: headers tweakings to avoid a nasty
+ problem due to intermix of extern "C" { ... } declarations for C++
+ and recursive includes in the headers
+
+1999-12-20 Chris Lahey <clahey@umich.edu>
+
+ * HTMLtree.c: Made it so that html nodes with a single child do
+ not insert a carriage return before or after the child node.
+
+Sat Dec 18 16:07:03 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, doc/xml.html : bug fix release 1.8.1
+ * parser.c: fixed bug #4344
+ * xpath.h xml-error.h xlink.h nanohttp.h debugXML.h SAX.h HTMLparser.h
+ added the glue to avoid C++ problems
+ * doc/* : regenerated the documentation
+
+Thu Dec 16 16:19:29 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: fixed a bug introduced in 1.8.0 and breaking default
+ namespace recognition, and Dia as a resul :-(
+ * encoding.c: closed bug #3950
+
+Wed Dec 15 19:22:23 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * valid.c: debugging a posteriori validation, except URI expansion
+ stuff this should be fixed now
+ * parserInternals.h: fixed a bug in IS_BASECHAR reported by
+ Carl Nygard <cnygard@bellatlantic.net>
+ * tester.c: added --postvalid, cleaning of the code
+ * tree.[ch]: added xmlDocGetRootElement()
+
+Tue Dec 14 20:30:34 PST 1999 Ramiro Estrugo <ramiro@eazel.com>
+
+ * SAX.h, tree.h : changed 'namespace' to 'nameSpace' to workaround
+ c++ losage.
+
+Sun Dec 12 13:08:15 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, doc/xml.html : bumped to 1.8.0
+ * xlink.[ch], Makefile.am : added framework for link detection
+ * parser.h: added nbChars to parser context, needed for cleanup.
+ * xmlmemory.c: removed a nasty bug when out of mem
+ * valid.[ch]: adding namespace support for attribute decl
+ * tester.c: added --debugent option
+ * debugXML.[ch]: added xmlDebugDumpEntities()
+ * parser.c: cleanup, avoiding use of CUR_PTR like plague, using
+ buffers instead, this was really needed, validation was breaking
+ in strange ways due to that. Added xmlParseStringPEReference()
+ and other parsing from strings functions. Entities processing
+ modified again, but PERef are still not handled correcly but
+ unless you're Eve Maller you won't notice :-)
+ * HTMLparser.c: large changes toward reliability, and switched to
+ lowercase internal tags, XHTML is lowercase, so it will help
+ that output is closer to next version.
+ * doc/* : regenerated the documentation, it is now hosted at
+ http://xmlsoft.org/ (same bits I just bought the domain :-)
+
+Fri Dec 3 13:46:32 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.h, SAX.c, makefile.am: added SAX.h mostly useful for the
+ doc generation
+ * parser.c: fixed bugs #3908 and #3937 and a memory leak
+ in the SAX API
+ * doc/*: rebuilt the doc making sure everything appears in the
+ HTML files
+
+Wed Dec 1 10:27:47 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] HTMLtree.c, debugXML.c, configure.in, xml-config.in:
+ added the patch from Carl Nygard <cnygard@bellatlantic.net>
+ which allow impressive speed improvement on dataset with
+ large text pieces, but at the cost of broken binary
+ compatibility and slightly bigger memory usage.
+ Configure with --with-buffers to activate them, they
+ are protected with XML_USE_BUFFER_CONTENT define.
+ * entities.[ch], parser.c: added xmlCleanupPredefinedEntities(),
+ goal is 0 memory left allocated once parser is no more used
+ * testDAV.c, testHTML.c, testSAX.c, testXPath.c: make sure we
+ call xmlCleanupParser() and xmlMemoryDump()
+
+Wed Nov 24 19:00:06 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch] xmlIO.[ch] parser.c valid.c: code cleanup with -pedantic
+ * parser.[ch] encoding.[ch]: added memory cleanup routines
+ * parser.c: closing bug #3788
+ * doc/*: rebuilt the doc
+
+Tue Nov 23 11:23:55 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch]: closing bug 3748, added xmlNewDocRawNode(),
+ xmlNewTextChild() and xmlSetCompressMode() behaviour.
+ * tester.c: added --compress option
+ * doc/*: rebuilt the documentation
+
+Fri Nov 19 18:41:28 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: bugfixing, the damn thing MUST not crash even
+ if given /proc/kcore as input !
+ * doc/xml.html doc/*: updated and rebuilt the documentation
+
+Thu Nov 18 14:57:18 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: Fixed some wrongly space collapsing code due to
+ a misreading of the spec.
+ * result/*: fixed the output accordingly
+
+Wed Nov 17 18:28:06 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * encoding.c: bug fix and typos
+ * xmlIO.[ch] parser.c: first bits toward real progressive parsing
+ * parser.c: added attribute normalization closing bug #3597
+ * test/att* result/att* SAXresult/att*: testcase for attribute
+ normalization
+
+Mon Nov 15 18:50:56 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: closing bug #3163 by adding extra flags for the
+ cc compiler on HP-UX
+
+Fri Nov 12 17:41:20 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * valid.[ch] : removed a typo and an enumerated type bug in the
+ xmlAddElementDecl() function
+ * tree.c : I changed xmlSetProp() and xmlNewProp() to do the
+ call to xmlEncodeEntitiesReentrant() so that the functions
+ New, Set and Get are at the same level.
+ * parser.c HTMLparser.c: extra memory allocation bug for
+ attributes detected by someone using libxml in embedded systems :-)
+
+Thu Oct 28 17:49:26 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlmemory.h: turned off mem debug :-\
+
+Mon Oct 25 12:13:25 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: closed bug #2784 a one line fix, but worth pushing
+ a new release out
+ * HTMLparser.c: fixed auto-close bugs on list items, zeroing
+ some structures, comments before and after the
+ main element, and other nastyness
+ * HTMLtree.c tree.c: accomodate the extended HTML supported
+ * configure.in: pushing 1.7.4
+ * test/ent8 and related outputs : added a new test for bug #2784
+ * test/HTML/wired.html and related output: a nasty HTML example
+ * Makefile.am: improved the test scripts
+ * docs/* : reran the documentation extractor, updated xml.html
+
+Thu Oct 14 10:29:56 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c, HTMLtree.c, tree.h: completely revamped the
+ HTMLparser and debugged the HTML related code. HTML documents
+ now have their own type
+ * entities.c: do not dump &apos; for HTML output
+ * xmlmemory.c: improvement, breakpoint mechanism
+ * testHTML.c: added --sax --repeat ...
+ * Makefile.am: improved the HTML tests
+ * valid.[ch]: added xmlValidGetValidElements and
+ xmlValidGetPotentialChildren
+ * tester.c: added --insert to test the 2 new functions
+ * test//* result//* SAXresult//* : regression test cleanup
+ and extension.
+ * doc/html : added doc for new modules gnome-xml-xmlmemory.html and
+ gnome-xml-nanohttp.html
+
+Mon Oct 11 14:31:58 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: fixed problems with some autoclose tags
+ * tree.c: fixed XML output problems.
+ * result/* SAXresult/*: update of the tests output
+
+Sat Oct 9 11:02:57 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am: Arturo patch for xmlConf.sh version info
+ * parser.c: Tim Josling patch for single quoted items
+ * tester.c: Tim Josling patch for tester options usage
+ * tree.h: indent cleanup
+
+Fri Oct 8 16:35:37 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c parser.h : Fixed problems with HTML parsing
+ reported by Kristian Hogsberg Kristensen <hogsberg@daimi.au.dk>
+
+Fri Oct 8 11:37:11 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c : Raph patch for initialization of CORBA fields
+ * parser.c, xpath.c, ...: modification of doc comments
+ * xpath.c : allow spaces in xpath expressions
+
+Mon Sep 27 10:16:43 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlmemory.h: turning off memory debug :-(
+
+Sun Sep 26 13:16:54 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] : added xmlSAXUserParseFile() and xmlSAXUserParseMemory()
+ better SAX interfaces.
+ * testSAX.c: uses the new SAX routine, avoid fetching any remote
+ entity.
+ * configure.in: 1.7.2
+
+Fri Sep 24 16:01:01 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * libxml.spec.in: fixed the URL
+ * doc/xml.html: improved the documentation front-end
+
+Fri Sep 24 01:06:36 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * nanohttp.c: conditionned references to snprintf with HAVE_SNPRINTF
+
+Fri Sep 24 00:15:58 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * libxml.spec.in: fixed the alpha compile problem
+ * parser.[ch]: changed errno to errNo in the parser context :-(
+ * *.[ch]: changed CHAR to xmlChar to avoid problem on WIN32
+ * doc/xml.html: changed CHAR to xmlChar
+ * doc/html/*: recompiled the documentation
+ * configure.in: 1.7.1
+
+Wed Sep 22 11:40:31 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.h: modified the parser context struct to regain 1.4.0
+ binary compatibility
+ * parser.c, xml-error.h: added errno ot teh context and defined
+ a set of errors values with update of errno
+ * nanohttp.[ch]: minimalist HTTP front-end for fetching remote
+ DTDs and entities
+ * *.h, *.c: complete cleanup of the use of config.h and include
+ protection depending on the current setup.
+ * overalll debugging, maintenance and bug-fixing on all modules
+ * updated the documentation
+ * ready for 1.7.0
+
+Wed Sep 8 22:46:14 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c : cleanup
+ * SAX.c valid.c valid.h: added ID/IDREF checking
+ * tree.c tree.h: extended doc structure for refs
+ * configure.in: 1.6.2
+ * parser.c: patched bug in SAX user arg call
+ * parserInternals.h: patched missing close in C++ wrapping
+ * testXPath.c xpath.c xpath.h: prepared for extensibility,
+ especially upcoming XPointer implementation.
+ * doc/xml.html: augmented, typo
+
+Sat Sep 4 22:48:05 CEST 1999 Timur Bakeyev <mc@bat.ru>
+
+ * doc/Makefile.am: replaced "install -d " with "mkinstalldirs" -
+ not all invocations of install understand -d.
+
+Sat Sep 4 22:20:07 CEST 1999 Timur Bakeyev <mc@bat.ru>
+
+ * Makefile.am: prepend all the test* calls with $(top_builddir) -
+ to make 'check' works, when builddir != srcdir.
+
+Sat Sep 4 20:25:46 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * doc/xml.html : updated the documentation
+
+Fri Sep 3 00:01:08 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xmlmemory.[ch] Makefile.am :added a memory wrapper to chase
+ not deallocated memory blocks
+ * *.c : replaces all calls to malloc() free() and realloc() to
+ the wrapper functions/macros
+ * tree.c : removed memory leaks dues to calling xmlFreeNode()
+ instead of xmlFreeNodeList()
+
+Wed Sep 1 14:15:09 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c: corrected a stupid bug leading to core dump at
+ tree deallocation. Removed warnings indicated by
+ Stephane.Conversy@lri.fr
+ * entities.c: Fixes Yet Another Stupid Bug, entities were not
+ looked for in the external subset
+
+Mon Aug 30 13:22:26 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c valid.[ch] xpath.c: patched compilation warnings reported
+ on SGI by Stephane.Conversy@lri.fr
+
+Sun Aug 29 22:27:29 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * all .h : changed the prototype declaration indent as in gtk
+ * most .c : working on reducing the TODOs in the code
+ * most .c : cleanup though -pedantic and Insure++
+ * improvements on validation ID checkings.
+ * tree.[ch] SAX.c: added support for namespace on attributes #2022
+ * xml-config.in: closed #1810
+
+Mon Aug 16 03:27:38 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.h, valid.c, valid.h: more work on validity, IDs
+ * xpath.c: added/fixed comparidon and equlity, added a new isinf
+ definition for AIX
+
+Sun Aug 15 21:15:17 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am libxml.spec.in: corrected missing xmlConf.sh in
+ the distribution due to a cut'n paste error at last commit
+
+Tue Aug 10 20:28:09 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: upgraded to version 1.4.0
+ * valid.[ch], SAX.c, parser.[ch] parserInternals.h ...
+ Big update, added a large part of the validation process,
+ it should be usable, but some parts are missing
+ * xpath.c: improved the implementation w.r.t. root.
+ * Makefile.am: added more tests
+ * test and result trees: added a lot of tests
+ * libxml.spec.in: export libxml.so.0 and libxml.so.1
+
+Tue Aug 10 11:33:41 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Added an HACKING file
+
+Tue Jul 27 21:43:00 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xpath.[ch] : improvements and debug of the XPath implementation
+ * parser.c, HTMLparser.c : modified the parsers to be progressive
+ * tree.[ch] : extended the Buffer promitives
+ * xmlIO.[ch] : added basic I/O routines providing progressive
+ parsing and ready for I18N conversion plugins
+ * SAXresult/* : the SAX callback sequence maybe slightly different
+ now
+ * test*.c : improved/updated the tests programs
+ * doc/* : recompiled the docs.
+
+1999-07-26 Michael Meeks <michael@edenproject.org>
+
+ * tree.h: Add const to 'content' in xmlNewDocNode, xmlNewChild
+
+ * tree.c: Ditto.
+
+Thu Jul 15 16:17:16 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: upgraded to version 1.4.0
+ * xpath.c, xpath.h, testXPath.c, makefile.am: added code for the XPath
+ draft from W3C. Will be used by XPointer, Xlink, XSL, and possibly
+ XML query language, see http://www.w3.org/TR/xpath for more details.
+ * parser.c, parser.h: added CHAR* related string functions for XPath
+ * HTMLparser.[ch], HTMLtree.c: a bit of cleanup on entities.
+ * doc/gnome-xml.sgml, doc/html/* : added XPath and HTML documentation,
+ rebuild the docs.
+ * Makefile.am, test/XPath/*, result/XPath/*: added an XPathtests target
+ and regression testing capabilities for XPath.
+
+Mon Jul 12 12:36:39 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, HTMLparser.c: applied patch from John Ellson <ellson@lucent.com>
+ closing bug #1646
+
+Mon Jul 12 11:04:44 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am, example/Makefile.am: closed bug #1683
+
+Sun Jul 11 18:16:34 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * example/Makefile.am, configure.in: added the makefile for the
+ gjobread example
+
+Sat Jul 10 14:19:11 CEST 1999 Tomasz KÅ‚oczko <kloczek@pld.org.pl>
+
+ * doc/Makefile.am:
+ - fix which allow "make install DESTDIR=</install/prefix>".
+
+Fri Jul 9 12:10:24 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.c parser.c: applied patch from John Ellson <ellson@lucent.com>
+ which fixed a problem on the file reading-code.
+
+Wed Jul 7 09:28:43 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * HTMLparser.[ch], HTMLtree.[ch]: more work for HTML parsing and
+ output.
+ * Makefile.am, test/HTML/*, result/HTML/*: added HTMLtests targetestHTMLt
+
+Wed Jul 7 00:25:42 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.h : Oops removed the binary compatibility problem
+ * HTMLparser.[ch], HTMLtree.h : More work on the HTML parse/dump
+ * parser.c, HTMLparser.c: applied patches for reading from stdin
+
+Mon Jul 5 18:45:31 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, entities.c, valid.c: cleanup bug #1591
+ * configure.in: cleanup bug #1592
+ * HTMLparser.[ch], testHTML.c: started adding an HTML parser using
+ the same tree back-end. Hence gdome will be available for it.
+ * doc/Makefile.am: close bug #617
+
+Sat Jun 26 23:36:38 EDT 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: alloctate a per parser context SAX interface block
+
+Tue Jun 22 23:46:32 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * released 1.3.0 with xmlEncodeEntities restoring old behaviour
+ and xmlEncodeEntitiesReentrant with the correct one :-\
+
+Mon Jun 21 14:07:53 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * commit of my internal XML base changes, quite a lot of
+ changes, cleanups, better entities support, framework for
+ new I/O and charset detection and handling
+ * Fixed the configure/Makefile stuff to generate shared libs
+ with the proper version info, so we jumped on rev from
+ 0.0.0 to 1.2.0 ! The binary interfaces have been broken,
+ xmlEncodeEntities() result need to be freed now, and a string
+ xmlParserVersion provide the current library version.
+
+Tue Jun 15 14:24:19 1999 Raph Levien <raph@acm.org>
+
+ * parser.c: fixed a buffer overrun for when you have a very long
+ attribute with no entities in it.
+
+Mon Jun 14 00:17:50 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * added example directory
+ * added example/gjobs.xml gjobread.c, still need a Makefile.in
+
+Wed Jun 2 19:40:58 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Release of libxml-1.1, nearly everything has been touched for
+ this.
+ * Added more regression tests
+ * Updated the documentation
+
+Sat May 29 13:34:42 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch]: unified the XML_NO_CORBA defines.
+ * parser.c encoding.[ch]: started plugging in char encoding detection
+
+Fri May 28 22:58:42 EDT 1999 Manish Vachharajani <mvachhar@vger.rutgers.edu>
+
+ * tree.c: (xmlSaveFile) - removed double call of xmlContentDump.
+ Also freed allocated buffer.
+
+Wed Apr 21 22:07:35 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+ * parser.[ch] tree.[ch] entities.[ch] valid.[ch] : removed the main
+ reentrancy problem at printing. One is left in entities.c, to
+ remove ASAP
+ * testSAX.c : added a test example showing the use of the SAX
+ interface if one doesn't want to build the DOM tree.
+ * html/gnome-xml-*.html html/index.sgml: regenerated the documentation
+
+Mon Apr 5 14:14:40 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] tree.[ch] SAX.c, parserInternals.h valid.[ch]:
+ large revamping of the parser to use SAX callbacks
+ http://www.megginson.com/SAX/ (or at least a C like interface
+ a la Expat). It's now possible to set up your own callbacks
+ and the parser will not build a DOM tree.
+ * test/* result/*: updated the test suite, I finally removed
+ the old Namespace draft support (PI based).
+
+Fri Apr 2 17:57:32 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am: added test result to EXTRA_DIST for make tests
+
+Wed Mar 24 21:37:02 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, parserInternals.h: moved the chars macro definitions
+ to parserInternals.h
+ * parser.c, error.c: applied patches from "Knut Ã…kesson"
+ <ka@s2.chalmers.se> for clean compilation under MSVC 6 :-o
+
+Tue Mar 23 11:10:15 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xml-config.in : applied patch to make --version work
+
+1999-03-05 Raja R Harinath <harinath@cs.umn.edu>
+
+ * Makefile.am (check-local): Alias for `tests' target. This will
+ cause `make check' to do the right thing.
+ (tests): Don't run tests in srcdir. Also, replaced calls to
+ basename with a `sed' "equivalent".
+
+Fri Mar 5 07:23:53 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Renamed error.h to xml-error.h, corrected Makefile.am to list
+ it in the header and not the sources, updated the doc.
+ Thanks to Tim Mooney <mooney@dogbert.cc.ndsu.nodak.edu> for
+ pointing this out.
+
+Mon Mar 1 13:27:17 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, parser.h, parserInternals.h: memory leak hunting,
+ exported the inputStream routines.
+ * doc/html/* : updated accordingly
+
+Sun Feb 28 22:51:33 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, parser.h, parserInternals.h: added a few extra
+ internal calls to allocate and free parser contexts ...
+ * doc/html/* : updated accordingly
+
+Thu Feb 25 11:52:24 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in, Makefile.am, doc/makefile.am : General changes for
+ 1.0.0 release and including the generated HTML documentation.
+
+Thu Feb 25 09:44:52 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * makefile.am : added parserInternals.h, oops.
+
+Mon Feb 22 11:24:56 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parserInternals.h: added this header giving access to the parser
+ internal functions.
+ * doc/Makefile.am : added a rebuild target which rebuilds the full
+ set of documentations
+ * parser.[ch] tree.[ch] valid.[ch]: serious updates w.r.t. parsing
+ the internal subset.
+ * *.c *.h: modifications needed to generate the documentation using
+ gtk-doc, cleanup of functions blocks, reorganisation of struct
+ declarations.
+
+Tue Feb 16 17:27:29 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * Makefile.am, spec, doc/Makefile.am : upgrading to 0.99.8, fixing
+ the tar and spec file to include the beginning of the doc.
+
+1999-02-13 Nuno Ferreira <nmrf@rnl.ist.utl.pt>
+
+ * doc/.cvsignore: Added this file.
+
+Mon Feb 8 19:27:56 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: fixed xmlGetProp to return "" when the attribute
+ exists, even if the node-list is NULL.
+
+Mon Feb 8 16:10:15 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: patched an error outputting empty attribute values.
+ * Makefile.am and doc/makefile.am: have been updated during the
+ week-end. Sorry for an empty CVS log, I got a shell problem.
+
+Mon Feb 1 12:10:13 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.h: cleaned up using enums instead of defines
+ * parser.c, valid.[ch]: more work on parsing/output of element
+ declarations
+
+Sun Jan 31 22:06:48 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * valid.[ch], tree.c, parser.c : more work toward full parsing
+ of XML DTDs.
+ * README: added informations about mailing-list and on-line
+ documentation
+
+1999-01-27 Raja R Harinath <harinath@cs.umn.edu>
+
+ * configure.in (XML_INCLUDEDIR): Use -I not -L for includes.
+
+Sun Jan 17 20:06:36 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, tree.[ch] : more work toward conformance testing,
+ added a last element to accelerate parsing of very flat structures
+ started working on internal subset Element content declaration.
+ * valid.[ch] : first cut at adding code toward validation.
+ * previous changes had also small impact on most files, especially
+ the conformance testing using James Clark test suite.
+
+Sun Jan 17 14:45:06 CET 1999 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * test/* : updated the examples, most of them were not well
+ formed (humm), and added rdf2.
+ * result/* : resulting changes in the output.
+
+Sun Dec 6 13:06:58 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: changed the behaviour of xmlGetProp on NULL values.
+
+Sat Dec 5 12:25:09 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: patched a bug in the generation of empty attributes
+
+Fri Nov 27 01:36:54 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * entities.[ch], tree.[ch], tester.c: added copy interfaces
+ for node/trees/documents/... Biggest problem is namespace
+ support when copying subtrees.
+
+Sun Nov 15 19:59:47 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, entities.c: improve entities and char ref encoding,
+ and cleanups of error messages.
+
+Fri Nov 13 13:03:10 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c, entities.c: simple bug hunting done during rpm2html and
+ rpmfind integration.
+
+Sun Nov 8 13:11:07 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch]: Added interfaces allowing to specify a SAX
+ handler before parsing.
+
+Sun Nov 8 09:39:17 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: redirrect all errors reporting through the SAX
+ error function
+
+Wed Nov 4 14:21:54 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * entities.c: rather use HAVE_SNPRINTF and not depend on glib
+ * libtool, tlmain ...: update of the libtool files
+
+1998-11-04 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * entities.c: Use g_snprintf insteda of snprintf.
+
+Sun Nov 1 14:31:06 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * entities.c, parser.c: debug and cleanup of CharRef handling/saving.
+ added ent5 test for this purpose.
+ * parser.c, parser.h: formatting, comments and UTF-8 planning.
+
+Fri Oct 30 01:36:52 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: fixed? a strange error due to compression on a GWP
+ document.
+
+Thu Oct 29 00:48:45 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch]: bug fixing
+ * entities.[ch]: defined a specific type for predefined entities
+ * doc/xml.html: more documentation on the library, how to use it,
+ overview of the interfaces.
+
+Wed Oct 28 17:56:35 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.[ch]: more cleanup on the API, made the tree mor conformant.
+
+Tue Oct 27 17:54:00 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c: corrected a small bug
+ * doc/xml.html: continuing writing documentation.
+
+Tue Oct 27 17:54:00 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * debugXML.h debugXML.c: added debugging utilities.
+ * tester.c: added --debug switch.
+ * tree.c: patched an incorrect node->type assignment.
+ * parser.c: formatting, ensure that node->doc != NULL in attributes
+
+Tue Oct 27 01:15:39 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] SAX.c tree.[ch]: large amount of changes to improve
+ entity support and provide an internal representation close to
+ DOM one (entity ref nodes, and attribute value as tree). I tried
+ to preserve the interface but this will surely break some apps
+ (I have to change rpm2html/rpmfind for example). I had to change
+ two interfaces, and the generated tree is somewhat different.
+ * doc/* : started documenting the XML library, the tree and
+ DOM/Corba. This is a first step.
+
+Sat Oct 24 14:23:51 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: Set up the fonctions comment block, boring but useful.
+ * parser.h, SAX.c, parser.c: now attributes are processed through
+ the SAX interface. The problem is that my SAX interface diverged
+ quite a bit from the original one, well this is not an official
+ spec, and translating it from Java to C is hairy anyway...
+
+Tue Oct 20 02:11:21 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * SAX.c, entities.c, tree.c, encoding.c, error.c: Set up the
+ fonctions comment block, boring but useful.
+
+Sun Oct 18 20:40:58 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * encoding.[ch], Makefile.am: Added the UTF-8, UTF-16 and ISO Latin 1
+ conversion routines. However they are not yet used to convert the
+ inputs. The core will run with UTF-8.
+
+Sun Oct 18 15:08:19 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c : make sure that the type id is properly set-up when
+ a new object is allocated, needed for DOM.
+
+Sat Oct 17 02:43:21 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.h, tree.c: Ok, the main objects in the tree will be native
+ corba objects, it costs 8 bytes per Node, Attribute and Document
+ but it simplifies the Corba integration a lot (no extra interface
+ objects to allocate/free).
+
+Tue Oct 13 21:46:57 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.h, tree.c, parser.c: added prev and doc pointers to Node,
+ and changed NODEs contants for conformity with DOM Level 1
+
+Wed Oct 7 23:42:46 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * added hooks to keep track of servants when creating objects
+ xmlDoc and xmlNode (for Corba export).
+
+Sun Oct 4 03:18:09 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * added xml-config script.
+
+Thu Oct 1 16:22:37 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * autogen.sh : applied patch from Frederic Devernay <devernay@istar.fr>
+ to autoupdate libtool and automake conf files.
+
+1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * Makefile.am: Use '?' to separate the sed
+ commands as ',' is used when people pass -Wl,something.
+
+Thu Sep 24 15:13:29 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * tree.c, tree.h: added a per-document compression interface.
+
+Tue Sep 22 20:47:38 EDT 1998
+
+ * tree.c, tree.h: added saving with compression and added interfaces
+ to control the compression level (xmlGetCompressMode,
+ xmlSetCompressMode) and a new save to filename function (xmlSaveFile).
+
+Mon Sep 21 20:11:13 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.c: corrected a loop for files of size 0
+
+1998-08-20 Raja R Harinath <harinath@cs.umn.edu>
+
+ * error.h: New file. Contains prototyes from `error.c'.
+
+Thu Aug 13 19:02:34 1998 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.am (xmlincdir): New macro.
+ (xmlinc_HEADERS): Renamed from include_HEADERS.
+
+Thu Aug 13 00:40:14 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * applied small patch on numeric entities from
+ Christopher Blizzard <blizzard@appliedtheory.com>
+
+Wed Aug 12 23:12:58 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * New release 0.2, removed the old xml_* files so that it's
+ coherent with the other CVS base (W3C), far better conformance
+ to standard, new namespaces, decent entities support, beginning
+ of a SAX-like interface. Nearly nothing left intact, even the
+ test examples ...
+
+1998-07-30 Christopher Blizzard <blizzard@appliedtheory.com>
+
+ * .cvsignore: Add .deps dir
+
+Sun Jul 26 17:29:52 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * xml_tree: changed the memory allocation scheme for name in xmlNewNode
+
+Sun Jul 26 00:17:51 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * configure.in: added test for CPP
+ * AUTHORS, Changelog: the original ones didn't get commited but the
+ glib ones instead, fixed.
+ * Makefile.am: corrected an error in library naming
+
+Fri Jul 24 16:47:14 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * integrated code developped at W3C
+ * changed the original Copyright
+ * migrated to automake
+ * prefixed the filenames by xml_ to avoid filename clashes
+
+#
+# vim: set enc=utf-8
+#
diff --git a/Copyright b/Copyright
new file mode 100644
index 0000000..d613185
--- /dev/null
+++ b/Copyright
@@ -0,0 +1,23 @@
+Except where otherwise noted in the source code (e.g. the files hash.c,
+list.c and the trio files, which are covered by a similar licence but
+with different Copyright notices) all the files are:
+
+ Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/DOCBparser.c b/DOCBparser.c
new file mode 100644
index 0000000..f12511b
--- /dev/null
+++ b/DOCBparser.c
@@ -0,0 +1,305 @@
+/*
+ * DOCBparser.c : an attempt to parse SGML Docbook documents
+ *
+ * This is deprecated !!!
+ * Code removed with release 2.6.0 it was broken.
+ * The doc are expect to be migrated to XML DocBook
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_DOCB_ENABLED
+
+#include <libxml/xmlerror.h>
+#include <libxml/DOCBparser.h>
+
+/**
+ * docbEncodeEntities:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ * @quoteChar: the quote character to escape (' or ") or zero.
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ASCII
+ * plus SGML entities block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
+ int *outlen ATTRIBUTE_UNUSED,
+ const unsigned char *in ATTRIBUTE_UNUSED,
+ int *inlen ATTRIBUTE_UNUSED,
+ int quoteChar ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbEncodeEntities() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return(-1);
+}
+
+/**
+ * docbParseDocument:
+ * @ctxt: an SGML parser context
+ *
+ * parse an SGML document (and build a tree if using the standard SAX
+ * interface).
+ *
+ * Returns 0, -1 in case of error. the parser context is augmented
+ * as a result of the parsing.
+ */
+
+int
+docbParseDocument(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseDocument() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (xmlParseDocument(ctxt));
+}
+
+/**
+ * docbFreeParserCtxt:
+ * @ctxt: an SGML parser context
+ *
+ * Free all the memory used by a parser context. However the parsed
+ * document in ctxt->myDoc is not freed.
+ */
+
+void
+docbFreeParserCtxt(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbFreeParserCtxt() deprecated function reached\n");
+ deprecated = 1;
+ }
+ xmlFreeParserCtxt(ctxt);
+}
+
+/**
+ * docbParseChunk:
+ * @ctxt: an XML parser context
+ * @chunk: an char array
+ * @size: the size in byte of the chunk
+ * @terminate: last chunk indicator
+ *
+ * Parse a Chunk of memory
+ *
+ * Returns zero if no error, the xmlParserErrors otherwise.
+ */
+int
+docbParseChunk(docbParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ const char *chunk ATTRIBUTE_UNUSED,
+ int size ATTRIBUTE_UNUSED,
+ int terminate ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseChunk(ctxt, chunk, size, terminate));
+}
+
+/**
+ * docbCreatePushParserCtxt:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @chunk: a pointer to an array of chars
+ * @size: number of chars in the array
+ * @filename: an optional file name or URI
+ * @enc: an optional encoding
+ *
+ * Create a parser context for using the DocBook SGML parser in push mode
+ * To allow content encoding detection, @size should be >= 4
+ * The value of @filename is used for fetching external entities
+ * and error/warning reports.
+ *
+ * Returns the new parser context or NULL
+ */
+docbParserCtxtPtr
+docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *user_data ATTRIBUTE_UNUSED,
+ const char *chunk ATTRIBUTE_UNUSED,
+ int size ATTRIBUTE_UNUSED,
+ const char *filename ATTRIBUTE_UNUSED,
+ xmlCharEncoding enc ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return(xmlCreatePushParserCtxt(sax, user_data, chunk, size, filename));
+}
+
+/**
+ * docbSAXParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * parse an SGML in-memory document and build a tree.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED,
+ docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *userData ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlSAXParseMemoryWithData(sax, (const char *)cur,
+ xmlStrlen((const xmlChar *) cur), 0, userData));
+}
+
+/**
+ * docbParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ *
+ * parse an SGML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseChunk() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseDoc(cur));
+}
+
+
+/**
+ * docbCreateFileParserCtxt:
+ * @filename: the filename
+ * @encoding: the SGML document encoding, or NULL
+ *
+ * Create a parser context for a file content.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+docbParserCtxtPtr
+docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbCreateFileParserCtxt() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlCreateFileParserCtxt(filename));
+}
+
+/**
+ * docbSAXParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing the SGML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * parse an SGML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbSAXParseFile(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED,
+ docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
+ void *userData ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbSAXParseFile() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlSAXParseFileWithData(sax, filename, 0, userData));
+}
+
+/**
+ * docbParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing document encoding, or NULL
+ *
+ * parse a Docbook SGML file and build a tree. Automatic support for
+ * ZLIB/Compress compressed document is provided by default if found
+ * at compile-time.
+ *
+ * Returns the resulting document tree
+ */
+
+docbDocPtr
+docbParseFile(const char *filename ATTRIBUTE_UNUSED,
+ const char *encoding ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "docbParseFile() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return (xmlParseFile(filename));
+}
+#define bottom_DOCBparser
+#include "elfgcchack.h"
+#endif /* LIBXML_DOCB_ENABLED */
diff --git a/HTMLparser.c b/HTMLparser.c
new file mode 100644
index 0000000..d329d3b
--- /dev/null
+++ b/HTMLparser.c
@@ -0,0 +1,7087 @@
+/*
+ * HTMLparser.c : an HTML 4.0 non-verifying parser
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_HTML_ENABLED
+
+#include <string.h>
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/entities.h>
+#include <libxml/encoding.h>
+#include <libxml/valid.h>
+#include <libxml/xmlIO.h>
+#include <libxml/globals.h>
+#include <libxml/uri.h>
+
+#include "buf.h"
+#include "enc.h"
+
+#define HTML_MAX_NAMELEN 1000
+#define HTML_PARSER_BIG_BUFFER_SIZE 1000
+#define HTML_PARSER_BUFFER_SIZE 100
+
+/* #define DEBUG */
+/* #define DEBUG_PUSH */
+
+static int htmlOmittedDefaultValue = 1;
+
+xmlChar * htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len,
+ xmlChar end, xmlChar end2, xmlChar end3);
+static void htmlParseComment(htmlParserCtxtPtr ctxt);
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlErrMemory:
+ * @ctxt: an HTML parser context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+htmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL) {
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ }
+ if (extra)
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "Memory allocation failed\n");
+}
+
+/**
+ * htmlParseErr:
+ * @ctxt: an HTML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: string infor
+ * @str2: string infor
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+htmlParseErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ NULL, 0, 0,
+ msg, str1, str2);
+ if (ctxt != NULL)
+ ctxt->wellFormed = 0;
+}
+
+/**
+ * htmlParseErrInt:
+ * @ctxt: an HTML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @val: integer info
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+htmlParseErrInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, int val)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_HTML, error,
+ XML_ERR_ERROR, NULL, 0, NULL, NULL,
+ NULL, val, 0, msg, val);
+ if (ctxt != NULL)
+ ctxt->wellFormed = 0;
+}
+
+/************************************************************************
+ * *
+ * Parser stacks related functions and macros *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlnamePush:
+ * @ctxt: an HTML parser context
+ * @value: the element name
+ *
+ * Pushes a new element name on top of the name stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+htmlnamePush(htmlParserCtxtPtr ctxt, const xmlChar * value)
+{
+ if ((ctxt->html < 3) && (xmlStrEqual(value, BAD_CAST "head")))
+ ctxt->html = 3;
+ if ((ctxt->html < 10) && (xmlStrEqual(value, BAD_CAST "body")))
+ ctxt->html = 10;
+ if (ctxt->nameNr >= ctxt->nameMax) {
+ ctxt->nameMax *= 2;
+ ctxt->nameTab = (const xmlChar * *)
+ xmlRealloc((xmlChar * *)ctxt->nameTab,
+ ctxt->nameMax *
+ sizeof(ctxt->nameTab[0]));
+ if (ctxt->nameTab == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ return (0);
+ }
+ }
+ ctxt->nameTab[ctxt->nameNr] = value;
+ ctxt->name = value;
+ return (ctxt->nameNr++);
+}
+/**
+ * htmlnamePop:
+ * @ctxt: an HTML parser context
+ *
+ * Pops the top element name from the name stack
+ *
+ * Returns the name just removed
+ */
+static const xmlChar *
+htmlnamePop(htmlParserCtxtPtr ctxt)
+{
+ const xmlChar *ret;
+
+ if (ctxt->nameNr <= 0)
+ return (NULL);
+ ctxt->nameNr--;
+ if (ctxt->nameNr < 0)
+ return (NULL);
+ if (ctxt->nameNr > 0)
+ ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
+ else
+ ctxt->name = NULL;
+ ret = ctxt->nameTab[ctxt->nameNr];
+ ctxt->nameTab[ctxt->nameNr] = NULL;
+ return (ret);
+}
+
+/**
+ * htmlNodeInfoPush:
+ * @ctxt: an HTML parser context
+ * @value: the node info
+ *
+ * Pushes a new element name on top of the node info stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+htmlNodeInfoPush(htmlParserCtxtPtr ctxt, htmlParserNodeInfo *value)
+{
+ if (ctxt->nodeInfoNr >= ctxt->nodeInfoMax) {
+ if (ctxt->nodeInfoMax == 0)
+ ctxt->nodeInfoMax = 5;
+ ctxt->nodeInfoMax *= 2;
+ ctxt->nodeInfoTab = (htmlParserNodeInfo *)
+ xmlRealloc((htmlParserNodeInfo *)ctxt->nodeInfoTab,
+ ctxt->nodeInfoMax *
+ sizeof(ctxt->nodeInfoTab[0]));
+ if (ctxt->nodeInfoTab == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ return (0);
+ }
+ }
+ ctxt->nodeInfoTab[ctxt->nodeInfoNr] = *value;
+ ctxt->nodeInfo = &ctxt->nodeInfoTab[ctxt->nodeInfoNr];
+ return (ctxt->nodeInfoNr++);
+}
+
+/**
+ * htmlNodeInfoPop:
+ * @ctxt: an HTML parser context
+ *
+ * Pops the top element name from the node info stack
+ *
+ * Returns 0 in case of error, the pointer to NodeInfo otherwise
+ */
+static htmlParserNodeInfo *
+htmlNodeInfoPop(htmlParserCtxtPtr ctxt)
+{
+ if (ctxt->nodeInfoNr <= 0)
+ return (NULL);
+ ctxt->nodeInfoNr--;
+ if (ctxt->nodeInfoNr < 0)
+ return (NULL);
+ if (ctxt->nodeInfoNr > 0)
+ ctxt->nodeInfo = &ctxt->nodeInfoTab[ctxt->nodeInfoNr - 1];
+ else
+ ctxt->nodeInfo = NULL;
+ return &ctxt->nodeInfoTab[ctxt->nodeInfoNr];
+}
+
+/*
+ * Macros for accessing the content. Those should be used only by the parser,
+ * and not exported.
+ *
+ * Dirty macros, i.e. one need to make assumption on the context to use them
+ *
+ * CUR_PTR return the current pointer to the xmlChar to be parsed.
+ * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled
+ * in ISO-Latin or UTF-8, and the current 16 bit value if compiled
+ * in UNICODE mode. This should be used internally by the parser
+ * only to compare to ASCII values otherwise it would break when
+ * running with UTF-8 encoding.
+ * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
+ * to compare on ASCII based substring.
+ * UPP(n) returns the n'th next xmlChar converted to uppercase. Same as CUR
+ * it should be used only to compare on ASCII based substring.
+ * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
+ * strings without newlines within the parser.
+ *
+ * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
+ *
+ * CURRENT Returns the current char value, with the full decoding of
+ * UTF-8 if we are using this mode. It returns an int.
+ * NEXT Skip to the next character, this does the proper decoding
+ * in UTF-8 mode. It also pop-up unfinished entities on the fly.
+ * NEXTL(l) Skip the current unicode character of l xmlChars long.
+ * COPY(to) copy one char to *to, increment CUR_PTR and to accordingly
+ */
+
+#define UPPER (toupper(*ctxt->input->cur))
+
+#define SKIP(val) ctxt->nbChars += (val),ctxt->input->cur += (val),ctxt->input->col+=(val)
+
+#define NXT(val) ctxt->input->cur[(val)]
+
+#define UPP(val) (toupper(ctxt->input->cur[(val)]))
+
+#define CUR_PTR ctxt->input->cur
+
+#define SHRINK if ((ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
+ (ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
+ xmlParserInputShrink(ctxt->input)
+
+#define GROW if ((ctxt->progressive == 0) && \
+ (ctxt->input->end - ctxt->input->cur < INPUT_CHUNK)) \
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK)
+
+#define CURRENT ((int) (*ctxt->input->cur))
+
+#define SKIP_BLANKS htmlSkipBlankChars(ctxt)
+
+/* Inported from XML */
+
+/* #define CUR (ctxt->token ? ctxt->token : (int) (*ctxt->input->cur)) */
+#define CUR ((int) (*ctxt->input->cur))
+#define NEXT xmlNextChar(ctxt)
+
+#define RAW (ctxt->token ? -1 : (*ctxt->input->cur))
+
+
+#define NEXTL(l) do { \
+ if (*(ctxt->input->cur) == '\n') { \
+ ctxt->input->line++; ctxt->input->col = 1; \
+ } else ctxt->input->col++; \
+ ctxt->token = 0; ctxt->input->cur += l; ctxt->nbChars++; \
+ } while (0)
+
+/************
+ \
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
+ if (*ctxt->input->cur == '&') xmlParserHandleReference(ctxt);
+ ************/
+
+#define CUR_CHAR(l) htmlCurrentChar(ctxt, &l)
+#define CUR_SCHAR(s, l) xmlStringCurrentChar(ctxt, s, &l)
+
+#define COPY_BUF(l,b,i,v) \
+ if (l == 1) b[i++] = (xmlChar) v; \
+ else i += xmlCopyChar(l,&b[i],v)
+
+/**
+ * htmlFindEncoding:
+ * @the HTML parser context
+ *
+ * Ty to find and encoding in the current data available in the input
+ * buffer this is needed to try to switch to the proper encoding when
+ * one face a character error.
+ * That's an heuristic, since it's operating outside of parsing it could
+ * try to use a meta which had been commented out, that's the reason it
+ * should only be used in case of error, not as a default.
+ *
+ * Returns an encoding string or NULL if not found, the string need to
+ * be freed
+ */
+static xmlChar *
+htmlFindEncoding(xmlParserCtxtPtr ctxt) {
+ const xmlChar *start, *cur, *end;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL) ||
+ (ctxt->input->encoding != NULL) || (ctxt->input->buf == NULL) ||
+ (ctxt->input->buf->encoder != NULL))
+ return(NULL);
+ if ((ctxt->input->cur == NULL) || (ctxt->input->end == NULL))
+ return(NULL);
+
+ start = ctxt->input->cur;
+ end = ctxt->input->end;
+ /* we also expect the input buffer to be zero terminated */
+ if (*end != 0)
+ return(NULL);
+
+ cur = xmlStrcasestr(start, BAD_CAST "HTTP-EQUIV");
+ if (cur == NULL)
+ return(NULL);
+ cur = xmlStrcasestr(cur, BAD_CAST "CONTENT");
+ if (cur == NULL)
+ return(NULL);
+ cur = xmlStrcasestr(cur, BAD_CAST "CHARSET=");
+ if (cur == NULL)
+ return(NULL);
+ cur += 8;
+ start = cur;
+ while (((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '-') || (*cur == '_') || (*cur == ':') || (*cur == '/'))
+ cur++;
+ if (cur == start)
+ return(NULL);
+ return(xmlStrndup(start, cur - start));
+}
+
+/**
+ * htmlCurrentChar:
+ * @ctxt: the HTML parser context
+ * @len: pointer to the length of the char read
+ *
+ * The current char value, if using UTF-8 this may actually span multiple
+ * bytes in the input buffer. Implement the end of line normalization:
+ * 2.11 End-of-Line Handling
+ * If the encoding is unspecified, in the case we find an ISO-Latin-1
+ * char, then the encoding converter is plugged in automatically.
+ *
+ * Returns the current char value and its length
+ */
+
+static int
+htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(0);
+
+ if (ctxt->token != 0) {
+ *len = 0;
+ return(ctxt->token);
+ }
+ if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ *
+ * Check for the 0x110000 limit too
+ */
+ const unsigned char *cur = ctxt->input->cur;
+ unsigned char c;
+ unsigned int val;
+
+ c = *cur;
+ if (c & 0x80) {
+ if (cur[1] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[1] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xe0) == 0xe0) {
+
+ if (cur[2] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[2] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xf0) == 0xf0) {
+ if (cur[3] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if (((c & 0xf8) != 0xf0) ||
+ ((cur[3] & 0xc0) != 0x80))
+ goto encoding_error;
+ /* 4-byte code */
+ *len = 4;
+ val = (cur[0] & 0x7) << 18;
+ val |= (cur[1] & 0x3f) << 12;
+ val |= (cur[2] & 0x3f) << 6;
+ val |= cur[3] & 0x3f;
+ } else {
+ /* 3-byte code */
+ *len = 3;
+ val = (cur[0] & 0xf) << 12;
+ val |= (cur[1] & 0x3f) << 6;
+ val |= cur[2] & 0x3f;
+ }
+ } else {
+ /* 2-byte code */
+ *len = 2;
+ val = (cur[0] & 0x1f) << 6;
+ val |= cur[1] & 0x3f;
+ }
+ if (!IS_CHAR(val)) {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x%X out of allowed range\n", val);
+ }
+ return(val);
+ } else {
+ if ((*ctxt->input->cur == 0) &&
+ (ctxt->input->cur < ctxt->input->end)) {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x%X out of allowed range\n", 0);
+ *len = 1;
+ return(' ');
+ }
+ /* 1-byte code */
+ *len = 1;
+ return((int) *ctxt->input->cur);
+ }
+ }
+ /*
+ * Assume it's a fixed length encoding (1) with
+ * a compatible encoding for the ASCII set, since
+ * XML constructs only use < 128 chars
+ */
+ *len = 1;
+ if ((int) *ctxt->input->cur < 0x80)
+ return((int) *ctxt->input->cur);
+
+ /*
+ * Humm this is bad, do an automatic flow conversion
+ */
+ {
+ xmlChar * guess;
+ xmlCharEncodingHandlerPtr handler;
+
+ guess = htmlFindEncoding(ctxt);
+ if (guess == NULL) {
+ xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_8859_1);
+ } else {
+ if (ctxt->input->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->input->encoding);
+ ctxt->input->encoding = guess;
+ handler = xmlFindCharEncodingHandler((const char *) guess);
+ if (handler != NULL) {
+ xmlSwitchToEncoding(ctxt, handler);
+ } else {
+ htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
+ "Unsupported encoding %s", guess, NULL);
+ }
+ }
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ }
+
+ return(xmlCurrentChar(ctxt, len));
+
+encoding_error:
+ /*
+ * If we detect an UTF8 error that probably mean that the
+ * input encoding didn't get properly advertized in the
+ * declaration header. Report the error and switch the encoding
+ * to ISO-Latin-1 (if you don't like this policy, just declare the
+ * encoding !)
+ */
+ {
+ char buffer[150];
+
+ if (ctxt->input->end - ctxt->input->cur >= 4) {
+ snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ ctxt->input->cur[0], ctxt->input->cur[1],
+ ctxt->input->cur[2], ctxt->input->cur[3]);
+ } else {
+ snprintf(buffer, 149, "Bytes: 0x%02X\n", ctxt->input->cur[0]);
+ }
+ htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
+ "Input is not proper UTF-8, indicate encoding !\n",
+ BAD_CAST buffer, NULL);
+ }
+
+ ctxt->charset = XML_CHAR_ENCODING_8859_1;
+ *len = 1;
+ return((int) *ctxt->input->cur);
+}
+
+/**
+ * htmlSkipBlankChars:
+ * @ctxt: the HTML parser context
+ *
+ * skip all blanks character found at that point in the input streams.
+ *
+ * Returns the number of space chars skipped
+ */
+
+static int
+htmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
+ int res = 0;
+
+ while (IS_BLANK_CH(*(ctxt->input->cur))) {
+ if ((*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) {
+ xmlPopInput(ctxt);
+ } else {
+ if (*(ctxt->input->cur) == '\n') {
+ ctxt->input->line++; ctxt->input->col = 1;
+ } else ctxt->input->col++;
+ ctxt->input->cur++;
+ ctxt->nbChars++;
+ if (*ctxt->input->cur == 0)
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ }
+ res++;
+ }
+ return(res);
+}
+
+
+
+/************************************************************************
+ * *
+ * The list of HTML elements and their properties *
+ * *
+ ************************************************************************/
+
+/*
+ * Start Tag: 1 means the start tag can be ommited
+ * End Tag: 1 means the end tag can be ommited
+ * 2 means it's forbidden (empty elements)
+ * 3 means the tag is stylistic and should be closed easily
+ * Depr: this element is deprecated
+ * DTD: 1 means that this element is valid only in the Loose DTD
+ * 2 means that this element is valid only in the Frameset DTD
+ *
+ * Name,Start Tag,End Tag,Save End,Empty,Deprecated,DTD,inline,Description
+ , subElements , impliedsubelt , Attributes, userdata
+ */
+
+/* Definitions and a couple of vars for HTML Elements */
+
+#define FONTSTYLE "tt", "i", "b", "u", "s", "strike", "big", "small"
+#define NB_FONTSTYLE 8
+#define PHRASE "em", "strong", "dfn", "code", "samp", "kbd", "var", "cite", "abbr", "acronym"
+#define NB_PHRASE 10
+#define SPECIAL "a", "img", "applet", "embed", "object", "font", "basefont", "br", "script", "map", "q", "sub", "sup", "span", "bdo", "iframe"
+#define NB_SPECIAL 16
+#define INLINE FONTSTYLE, PHRASE, SPECIAL, FORMCTRL
+#define NB_INLINE NB_PCDATA + NB_FONTSTYLE + NB_PHRASE + NB_SPECIAL + NB_FORMCTRL
+#define BLOCK HEADING, LIST, "pre", "p", "dl", "div", "center", "noscript", "noframes", "blockquote", "form", "isindex", "hr", "table", "fieldset", "address"
+#define NB_BLOCK NB_HEADING + NB_LIST + 14
+#define FORMCTRL "input", "select", "textarea", "label", "button"
+#define NB_FORMCTRL 5
+#define PCDATA
+#define NB_PCDATA 0
+#define HEADING "h1", "h2", "h3", "h4", "h5", "h6"
+#define NB_HEADING 6
+#define LIST "ul", "ol", "dir", "menu"
+#define NB_LIST 4
+#define MODIFIER
+#define NB_MODIFIER 0
+#define FLOW BLOCK,INLINE
+#define NB_FLOW NB_BLOCK + NB_INLINE
+#define EMPTY NULL
+
+
+static const char* const html_flow[] = { FLOW, NULL } ;
+static const char* const html_inline[] = { INLINE, NULL } ;
+
+/* placeholders: elts with content but no subelements */
+static const char* const html_pcdata[] = { NULL } ;
+#define html_cdata html_pcdata
+
+
+/* ... and for HTML Attributes */
+
+#define COREATTRS "id", "class", "style", "title"
+#define NB_COREATTRS 4
+#define I18N "lang", "dir"
+#define NB_I18N 2
+#define EVENTS "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"
+#define NB_EVENTS 9
+#define ATTRS COREATTRS,I18N,EVENTS
+#define NB_ATTRS NB_NB_COREATTRS + NB_I18N + NB_EVENTS
+#define CELLHALIGN "align", "char", "charoff"
+#define NB_CELLHALIGN 3
+#define CELLVALIGN "valign"
+#define NB_CELLVALIGN 1
+
+static const char* const html_attrs[] = { ATTRS, NULL } ;
+static const char* const core_i18n_attrs[] = { COREATTRS, I18N, NULL } ;
+static const char* const core_attrs[] = { COREATTRS, NULL } ;
+static const char* const i18n_attrs[] = { I18N, NULL } ;
+
+
+/* Other declarations that should go inline ... */
+static const char* const a_attrs[] = { ATTRS, "charset", "type", "name",
+ "href", "hreflang", "rel", "rev", "accesskey", "shape", "coords",
+ "tabindex", "onfocus", "onblur", NULL } ;
+static const char* const target_attr[] = { "target", NULL } ;
+static const char* const rows_cols_attr[] = { "rows", "cols", NULL } ;
+static const char* const alt_attr[] = { "alt", NULL } ;
+static const char* const src_alt_attrs[] = { "src", "alt", NULL } ;
+static const char* const href_attrs[] = { "href", NULL } ;
+static const char* const clear_attrs[] = { "clear", NULL } ;
+static const char* const inline_p[] = { INLINE, "p", NULL } ;
+
+static const char* const flow_param[] = { FLOW, "param", NULL } ;
+static const char* const applet_attrs[] = { COREATTRS , "codebase",
+ "archive", "alt", "name", "height", "width", "align",
+ "hspace", "vspace", NULL } ;
+static const char* const area_attrs[] = { "shape", "coords", "href", "nohref",
+ "tabindex", "accesskey", "onfocus", "onblur", NULL } ;
+static const char* const basefont_attrs[] =
+ { "id", "size", "color", "face", NULL } ;
+static const char* const quote_attrs[] = { ATTRS, "cite", NULL } ;
+static const char* const body_contents[] = { FLOW, "ins", "del", NULL } ;
+static const char* const body_attrs[] = { ATTRS, "onload", "onunload", NULL } ;
+static const char* const body_depr[] = { "background", "bgcolor", "text",
+ "link", "vlink", "alink", NULL } ;
+static const char* const button_attrs[] = { ATTRS, "name", "value", "type",
+ "disabled", "tabindex", "accesskey", "onfocus", "onblur", NULL } ;
+
+
+static const char* const col_attrs[] = { ATTRS, "span", "width", CELLHALIGN, CELLVALIGN, NULL } ;
+static const char* const col_elt[] = { "col", NULL } ;
+static const char* const edit_attrs[] = { ATTRS, "datetime", "cite", NULL } ;
+static const char* const compact_attrs[] = { ATTRS, "compact", NULL } ;
+static const char* const dl_contents[] = { "dt", "dd", NULL } ;
+static const char* const compact_attr[] = { "compact", NULL } ;
+static const char* const label_attr[] = { "label", NULL } ;
+static const char* const fieldset_contents[] = { FLOW, "legend" } ;
+static const char* const font_attrs[] = { COREATTRS, I18N, "size", "color", "face" , NULL } ;
+static const char* const form_contents[] = { HEADING, LIST, INLINE, "pre", "p", "div", "center", "noscript", "noframes", "blockquote", "isindex", "hr", "table", "fieldset", "address", NULL } ;
+static const char* const form_attrs[] = { ATTRS, "method", "enctype", "accept", "name", "onsubmit", "onreset", "accept-charset", NULL } ;
+static const char* const frame_attrs[] = { COREATTRS, "longdesc", "name", "src", "frameborder", "marginwidth", "marginheight", "noresize", "scrolling" , NULL } ;
+static const char* const frameset_attrs[] = { COREATTRS, "rows", "cols", "onload", "onunload", NULL } ;
+static const char* const frameset_contents[] = { "frameset", "frame", "noframes", NULL } ;
+static const char* const head_attrs[] = { I18N, "profile", NULL } ;
+static const char* const head_contents[] = { "title", "isindex", "base", "script", "style", "meta", "link", "object", NULL } ;
+static const char* const hr_depr[] = { "align", "noshade", "size", "width", NULL } ;
+static const char* const version_attr[] = { "version", NULL } ;
+static const char* const html_content[] = { "head", "body", "frameset", NULL } ;
+static const char* const iframe_attrs[] = { COREATTRS, "longdesc", "name", "src", "frameborder", "marginwidth", "marginheight", "scrolling", "align", "height", "width", NULL } ;
+static const char* const img_attrs[] = { ATTRS, "longdesc", "name", "height", "width", "usemap", "ismap", NULL } ;
+static const char* const embed_attrs[] = { COREATTRS, "align", "alt", "border", "code", "codebase", "frameborder", "height", "hidden", "hspace", "name", "palette", "pluginspace", "pluginurl", "src", "type", "units", "vspace", "width", NULL } ;
+static const char* const input_attrs[] = { ATTRS, "type", "name", "value", "checked", "disabled", "readonly", "size", "maxlength", "src", "alt", "usemap", "ismap", "tabindex", "accesskey", "onfocus", "onblur", "onselect", "onchange", "accept", NULL } ;
+static const char* const prompt_attrs[] = { COREATTRS, I18N, "prompt", NULL } ;
+static const char* const label_attrs[] = { ATTRS, "for", "accesskey", "onfocus", "onblur", NULL } ;
+static const char* const legend_attrs[] = { ATTRS, "accesskey", NULL } ;
+static const char* const align_attr[] = { "align", NULL } ;
+static const char* const link_attrs[] = { ATTRS, "charset", "href", "hreflang", "type", "rel", "rev", "media", NULL } ;
+static const char* const map_contents[] = { BLOCK, "area", NULL } ;
+static const char* const name_attr[] = { "name", NULL } ;
+static const char* const action_attr[] = { "action", NULL } ;
+static const char* const blockli_elt[] = { BLOCK, "li", NULL } ;
+static const char* const meta_attrs[] = { I18N, "http-equiv", "name", "scheme", "charset", NULL } ;
+static const char* const content_attr[] = { "content", NULL } ;
+static const char* const type_attr[] = { "type", NULL } ;
+static const char* const noframes_content[] = { "body", FLOW MODIFIER, NULL } ;
+static const char* const object_contents[] = { FLOW, "param", NULL } ;
+static const char* const object_attrs[] = { ATTRS, "declare", "classid", "codebase", "data", "type", "codetype", "archive", "standby", "height", "width", "usemap", "name", "tabindex", NULL } ;
+static const char* const object_depr[] = { "align", "border", "hspace", "vspace", NULL } ;
+static const char* const ol_attrs[] = { "type", "compact", "start", NULL} ;
+static const char* const option_elt[] = { "option", NULL } ;
+static const char* const optgroup_attrs[] = { ATTRS, "disabled", NULL } ;
+static const char* const option_attrs[] = { ATTRS, "disabled", "label", "selected", "value", NULL } ;
+static const char* const param_attrs[] = { "id", "value", "valuetype", "type", NULL } ;
+static const char* const width_attr[] = { "width", NULL } ;
+static const char* const pre_content[] = { PHRASE, "tt", "i", "b", "u", "s", "strike", "a", "br", "script", "map", "q", "span", "bdo", "iframe", NULL } ;
+static const char* const script_attrs[] = { "charset", "src", "defer", "event", "for", NULL } ;
+static const char* const language_attr[] = { "language", NULL } ;
+static const char* const select_content[] = { "optgroup", "option", NULL } ;
+static const char* const select_attrs[] = { ATTRS, "name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange", NULL } ;
+static const char* const style_attrs[] = { I18N, "media", "title", NULL } ;
+static const char* const table_attrs[] = { ATTRS, "summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding", "datapagesize", NULL } ;
+static const char* const table_depr[] = { "align", "bgcolor", NULL } ;
+static const char* const table_contents[] = { "caption", "col", "colgroup", "thead", "tfoot", "tbody", "tr", NULL} ;
+static const char* const tr_elt[] = { "tr", NULL } ;
+static const char* const talign_attrs[] = { ATTRS, CELLHALIGN, CELLVALIGN, NULL} ;
+static const char* const th_td_depr[] = { "nowrap", "bgcolor", "width", "height", NULL } ;
+static const char* const th_td_attr[] = { ATTRS, "abbr", "axis", "headers", "scope", "rowspan", "colspan", CELLHALIGN, CELLVALIGN, NULL } ;
+static const char* const textarea_attrs[] = { ATTRS, "name", "disabled", "readonly", "tabindex", "accesskey", "onfocus", "onblur", "onselect", "onchange", NULL } ;
+static const char* const tr_contents[] = { "th", "td", NULL } ;
+static const char* const bgcolor_attr[] = { "bgcolor", NULL } ;
+static const char* const li_elt[] = { "li", NULL } ;
+static const char* const ul_depr[] = { "type", "compact", NULL} ;
+static const char* const dir_attr[] = { "dir", NULL} ;
+
+#define DECL (const char**)
+
+static const htmlElemDesc
+html40ElementTable[] = {
+{ "a", 0, 0, 0, 0, 0, 0, 1, "anchor ",
+ DECL html_inline , NULL , DECL a_attrs , DECL target_attr, NULL
+},
+{ "abbr", 0, 0, 0, 0, 0, 0, 1, "abbreviated form",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "acronym", 0, 0, 0, 0, 0, 0, 1, "",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "address", 0, 0, 0, 0, 0, 0, 0, "information on author ",
+ DECL inline_p , NULL , DECL html_attrs, NULL, NULL
+},
+{ "applet", 0, 0, 0, 0, 1, 1, 2, "java applet ",
+ DECL flow_param , NULL , NULL , DECL applet_attrs, NULL
+},
+{ "area", 0, 2, 2, 1, 0, 0, 0, "client-side image map area ",
+ EMPTY , NULL , DECL area_attrs , DECL target_attr, DECL alt_attr
+},
+{ "b", 0, 3, 0, 0, 0, 0, 1, "bold text style",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "base", 0, 2, 2, 1, 0, 0, 0, "document base uri ",
+ EMPTY , NULL , NULL , DECL target_attr, DECL href_attrs
+},
+{ "basefont", 0, 2, 2, 1, 1, 1, 1, "base font size " ,
+ EMPTY , NULL , NULL, DECL basefont_attrs, NULL
+},
+{ "bdo", 0, 0, 0, 0, 0, 0, 1, "i18n bidi over-ride ",
+ DECL html_inline , NULL , DECL core_i18n_attrs, NULL, DECL dir_attr
+},
+{ "big", 0, 3, 0, 0, 0, 0, 1, "large text style",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "blockquote", 0, 0, 0, 0, 0, 0, 0, "long quotation ",
+ DECL html_flow , NULL , DECL quote_attrs , NULL, NULL
+},
+{ "body", 1, 1, 0, 0, 0, 0, 0, "document body ",
+ DECL body_contents , "div" , DECL body_attrs, DECL body_depr, NULL
+},
+{ "br", 0, 2, 2, 1, 0, 0, 1, "forced line break ",
+ EMPTY , NULL , DECL core_attrs, DECL clear_attrs , NULL
+},
+{ "button", 0, 0, 0, 0, 0, 0, 2, "push button ",
+ DECL html_flow MODIFIER , NULL , DECL button_attrs, NULL, NULL
+},
+{ "caption", 0, 0, 0, 0, 0, 0, 0, "table caption ",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "center", 0, 3, 0, 0, 1, 1, 0, "shorthand for div align=center ",
+ DECL html_flow , NULL , NULL, DECL html_attrs, NULL
+},
+{ "cite", 0, 0, 0, 0, 0, 0, 1, "citation",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "code", 0, 0, 0, 0, 0, 0, 1, "computer code fragment",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "col", 0, 2, 2, 1, 0, 0, 0, "table column ",
+ EMPTY , NULL , DECL col_attrs , NULL, NULL
+},
+{ "colgroup", 0, 1, 0, 0, 0, 0, 0, "table column group ",
+ DECL col_elt , "col" , DECL col_attrs , NULL, NULL
+},
+{ "dd", 0, 1, 0, 0, 0, 0, 0, "definition description ",
+ DECL html_flow , NULL , DECL html_attrs, NULL, NULL
+},
+{ "del", 0, 0, 0, 0, 0, 0, 2, "deleted text ",
+ DECL html_flow , NULL , DECL edit_attrs , NULL, NULL
+},
+{ "dfn", 0, 0, 0, 0, 0, 0, 1, "instance definition",
+ DECL html_inline , NULL , DECL html_attrs, NULL, NULL
+},
+{ "dir", 0, 0, 0, 0, 1, 1, 0, "directory list",
+ DECL blockli_elt, "li" , NULL, DECL compact_attrs, NULL
+},
+{ "div", 0, 0, 0, 0, 0, 0, 0, "generic language/style container",
+ DECL html_flow, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "dl", 0, 0, 0, 0, 0, 0, 0, "definition list ",
+ DECL dl_contents , "dd" , DECL html_attrs, DECL compact_attr, NULL
+},
+{ "dt", 0, 1, 0, 0, 0, 0, 0, "definition term ",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "em", 0, 3, 0, 0, 0, 0, 1, "emphasis",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "embed", 0, 1, 0, 0, 1, 1, 1, "generic embedded object ",
+ EMPTY, NULL, DECL embed_attrs, NULL, NULL
+},
+{ "fieldset", 0, 0, 0, 0, 0, 0, 0, "form control group ",
+ DECL fieldset_contents , NULL, DECL html_attrs, NULL, NULL
+},
+{ "font", 0, 3, 0, 0, 1, 1, 1, "local change to font ",
+ DECL html_inline, NULL, NULL, DECL font_attrs, NULL
+},
+{ "form", 0, 0, 0, 0, 0, 0, 0, "interactive form ",
+ DECL form_contents, "fieldset", DECL form_attrs , DECL target_attr, DECL action_attr
+},
+{ "frame", 0, 2, 2, 1, 0, 2, 0, "subwindow " ,
+ EMPTY, NULL, NULL, DECL frame_attrs, NULL
+},
+{ "frameset", 0, 0, 0, 0, 0, 2, 0, "window subdivision" ,
+ DECL frameset_contents, "noframes" , NULL , DECL frameset_attrs, NULL
+},
+{ "h1", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "h2", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "h3", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "h4", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "h5", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "h6", 0, 0, 0, 0, 0, 0, 0, "heading ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "head", 1, 1, 0, 0, 0, 0, 0, "document head ",
+ DECL head_contents, NULL, DECL head_attrs, NULL, NULL
+},
+{ "hr", 0, 2, 2, 1, 0, 0, 0, "horizontal rule " ,
+ EMPTY, NULL, DECL html_attrs, DECL hr_depr, NULL
+},
+{ "html", 1, 1, 0, 0, 0, 0, 0, "document root element ",
+ DECL html_content , NULL , DECL i18n_attrs, DECL version_attr, NULL
+},
+{ "i", 0, 3, 0, 0, 0, 0, 1, "italic text style",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "iframe", 0, 0, 0, 0, 0, 1, 2, "inline subwindow ",
+ DECL html_flow, NULL, NULL, DECL iframe_attrs, NULL
+},
+{ "img", 0, 2, 2, 1, 0, 0, 1, "embedded image ",
+ EMPTY, NULL, DECL img_attrs, DECL align_attr, DECL src_alt_attrs
+},
+{ "input", 0, 2, 2, 1, 0, 0, 1, "form control ",
+ EMPTY, NULL, DECL input_attrs , DECL align_attr, NULL
+},
+{ "ins", 0, 0, 0, 0, 0, 0, 2, "inserted text",
+ DECL html_flow, NULL, DECL edit_attrs, NULL, NULL
+},
+{ "isindex", 0, 2, 2, 1, 1, 1, 0, "single line prompt ",
+ EMPTY, NULL, NULL, DECL prompt_attrs, NULL
+},
+{ "kbd", 0, 0, 0, 0, 0, 0, 1, "text to be entered by the user",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "label", 0, 0, 0, 0, 0, 0, 1, "form field label text ",
+ DECL html_inline MODIFIER, NULL, DECL label_attrs , NULL, NULL
+},
+{ "legend", 0, 0, 0, 0, 0, 0, 0, "fieldset legend ",
+ DECL html_inline, NULL, DECL legend_attrs , DECL align_attr, NULL
+},
+{ "li", 0, 1, 1, 0, 0, 0, 0, "list item ",
+ DECL html_flow, NULL, DECL html_attrs, NULL, NULL
+},
+{ "link", 0, 2, 2, 1, 0, 0, 0, "a media-independent link ",
+ EMPTY, NULL, DECL link_attrs, DECL target_attr, NULL
+},
+{ "map", 0, 0, 0, 0, 0, 0, 2, "client-side image map ",
+ DECL map_contents , NULL, DECL html_attrs , NULL, DECL name_attr
+},
+{ "menu", 0, 0, 0, 0, 1, 1, 0, "menu list ",
+ DECL blockli_elt , NULL, NULL, DECL compact_attrs, NULL
+},
+{ "meta", 0, 2, 2, 1, 0, 0, 0, "generic metainformation ",
+ EMPTY, NULL, DECL meta_attrs , NULL , DECL content_attr
+},
+{ "noframes", 0, 0, 0, 0, 0, 2, 0, "alternate content container for non frame-based rendering ",
+ DECL noframes_content, "body" , DECL html_attrs, NULL, NULL
+},
+{ "noscript", 0, 0, 0, 0, 0, 0, 0, "alternate content container for non script-based rendering ",
+ DECL html_flow, "div", DECL html_attrs, NULL, NULL
+},
+{ "object", 0, 0, 0, 0, 0, 0, 2, "generic embedded object ",
+ DECL object_contents , "div" , DECL object_attrs, DECL object_depr, NULL
+},
+{ "ol", 0, 0, 0, 0, 0, 0, 0, "ordered list ",
+ DECL li_elt , "li" , DECL html_attrs, DECL ol_attrs, NULL
+},
+{ "optgroup", 0, 0, 0, 0, 0, 0, 0, "option group ",
+ DECL option_elt , "option", DECL optgroup_attrs, NULL, DECL label_attr
+},
+{ "option", 0, 1, 0, 0, 0, 0, 0, "selectable choice " ,
+ DECL html_pcdata, NULL, DECL option_attrs, NULL, NULL
+},
+{ "p", 0, 1, 0, 0, 0, 0, 0, "paragraph ",
+ DECL html_inline, NULL, DECL html_attrs, DECL align_attr, NULL
+},
+{ "param", 0, 2, 2, 1, 0, 0, 0, "named property value ",
+ EMPTY, NULL, DECL param_attrs, NULL, DECL name_attr
+},
+{ "pre", 0, 0, 0, 0, 0, 0, 0, "preformatted text ",
+ DECL pre_content, NULL, DECL html_attrs, DECL width_attr, NULL
+},
+{ "q", 0, 0, 0, 0, 0, 0, 1, "short inline quotation ",
+ DECL html_inline, NULL, DECL quote_attrs, NULL, NULL
+},
+{ "s", 0, 3, 0, 0, 1, 1, 1, "strike-through text style",
+ DECL html_inline, NULL, NULL, DECL html_attrs, NULL
+},
+{ "samp", 0, 0, 0, 0, 0, 0, 1, "sample program output, scripts, etc.",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "script", 0, 0, 0, 0, 0, 0, 2, "script statements ",
+ DECL html_cdata, NULL, DECL script_attrs, DECL language_attr, DECL type_attr
+},
+{ "select", 0, 0, 0, 0, 0, 0, 1, "option selector ",
+ DECL select_content, NULL, DECL select_attrs, NULL, NULL
+},
+{ "small", 0, 3, 0, 0, 0, 0, 1, "small text style",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "span", 0, 0, 0, 0, 0, 0, 1, "generic language/style container ",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "strike", 0, 3, 0, 0, 1, 1, 1, "strike-through text",
+ DECL html_inline, NULL, NULL, DECL html_attrs, NULL
+},
+{ "strong", 0, 3, 0, 0, 0, 0, 1, "strong emphasis",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "style", 0, 0, 0, 0, 0, 0, 0, "style info ",
+ DECL html_cdata, NULL, DECL style_attrs, NULL, DECL type_attr
+},
+{ "sub", 0, 3, 0, 0, 0, 0, 1, "subscript",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "sup", 0, 3, 0, 0, 0, 0, 1, "superscript ",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "table", 0, 0, 0, 0, 0, 0, 0, "",
+ DECL table_contents , "tr" , DECL table_attrs , DECL table_depr, NULL
+},
+{ "tbody", 1, 0, 0, 0, 0, 0, 0, "table body ",
+ DECL tr_elt , "tr" , DECL talign_attrs, NULL, NULL
+},
+{ "td", 0, 0, 0, 0, 0, 0, 0, "table data cell",
+ DECL html_flow, NULL, DECL th_td_attr, DECL th_td_depr, NULL
+},
+{ "textarea", 0, 0, 0, 0, 0, 0, 1, "multi-line text field ",
+ DECL html_pcdata, NULL, DECL textarea_attrs, NULL, DECL rows_cols_attr
+},
+{ "tfoot", 0, 1, 0, 0, 0, 0, 0, "table footer ",
+ DECL tr_elt , "tr" , DECL talign_attrs, NULL, NULL
+},
+{ "th", 0, 1, 0, 0, 0, 0, 0, "table header cell",
+ DECL html_flow, NULL, DECL th_td_attr, DECL th_td_depr, NULL
+},
+{ "thead", 0, 1, 0, 0, 0, 0, 0, "table header ",
+ DECL tr_elt , "tr" , DECL talign_attrs, NULL, NULL
+},
+{ "title", 0, 0, 0, 0, 0, 0, 0, "document title ",
+ DECL html_pcdata, NULL, DECL i18n_attrs, NULL, NULL
+},
+{ "tr", 0, 0, 0, 0, 0, 0, 0, "table row ",
+ DECL tr_contents , "td" , DECL talign_attrs, DECL bgcolor_attr, NULL
+},
+{ "tt", 0, 3, 0, 0, 0, 0, 1, "teletype or monospaced text style",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+},
+{ "u", 0, 3, 0, 0, 1, 1, 1, "underlined text style",
+ DECL html_inline, NULL, NULL, DECL html_attrs, NULL
+},
+{ "ul", 0, 0, 0, 0, 0, 0, 0, "unordered list ",
+ DECL li_elt , "li" , DECL html_attrs, DECL ul_depr, NULL
+},
+{ "var", 0, 0, 0, 0, 0, 0, 1, "instance of a variable or program argument",
+ DECL html_inline, NULL, DECL html_attrs, NULL, NULL
+}
+};
+
+/*
+ * start tags that imply the end of current element
+ */
+static const char * const htmlStartClose[] = {
+"form", "form", "p", "hr", "h1", "h2", "h3", "h4", "h5", "h6",
+ "dl", "ul", "ol", "menu", "dir", "address", "pre",
+ "listing", "xmp", "head", NULL,
+"head", "p", NULL,
+"title", "p", NULL,
+"body", "head", "style", "link", "title", "p", NULL,
+"frameset", "head", "style", "link", "title", "p", NULL,
+"li", "p", "h1", "h2", "h3", "h4", "h5", "h6", "dl", "address",
+ "pre", "listing", "xmp", "head", "li", NULL,
+"hr", "p", "head", NULL,
+"h1", "p", "head", NULL,
+"h2", "p", "head", NULL,
+"h3", "p", "head", NULL,
+"h4", "p", "head", NULL,
+"h5", "p", "head", NULL,
+"h6", "p", "head", NULL,
+"dir", "p", "head", NULL,
+"address", "p", "head", "ul", NULL,
+"pre", "p", "head", "ul", NULL,
+"listing", "p", "head", NULL,
+"xmp", "p", "head", NULL,
+"blockquote", "p", "head", NULL,
+"dl", "p", "dt", "menu", "dir", "address", "pre", "listing",
+ "xmp", "head", NULL,
+"dt", "p", "menu", "dir", "address", "pre", "listing", "xmp",
+ "head", "dd", NULL,
+"dd", "p", "menu", "dir", "address", "pre", "listing", "xmp",
+ "head", "dt", NULL,
+"ul", "p", "head", "ol", "menu", "dir", "address", "pre",
+ "listing", "xmp", NULL,
+"ol", "p", "head", "ul", NULL,
+"menu", "p", "head", "ul", NULL,
+"p", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", FONTSTYLE, NULL,
+"div", "p", "head", NULL,
+"noscript", "p", NULL,
+"center", "font", "b", "i", "p", "head", NULL,
+"a", "a", "head", NULL,
+"caption", "p", NULL,
+"colgroup", "caption", "colgroup", "col", "p", NULL,
+"col", "caption", "col", "p", NULL,
+"table", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6", "pre",
+ "listing", "xmp", "a", NULL,
+"th", "th", "td", "p", "span", "font", "a", "b", "i", "u", NULL,
+"td", "th", "td", "p", "span", "font", "a", "b", "i", "u", NULL,
+"tr", "th", "td", "tr", "caption", "col", "colgroup", "p", NULL,
+"thead", "caption", "col", "colgroup", NULL,
+"tfoot", "th", "td", "tr", "caption", "col", "colgroup", "thead",
+ "tbody", "p", NULL,
+"tbody", "th", "td", "tr", "caption", "col", "colgroup", "thead",
+ "tfoot", "tbody", "p", NULL,
+"optgroup", "option", NULL,
+"option", "option", NULL,
+"fieldset", "legend", "p", "head", "h1", "h2", "h3", "h4", "h5", "h6",
+ "pre", "listing", "xmp", "a", NULL,
+/* most tags in in FONTSTYLE, PHRASE and SPECIAL should close <head> */
+"tt", "head", NULL,
+"i", "head", NULL,
+"b", "head", NULL,
+"u", "head", NULL,
+"s", "head", NULL,
+"strike", "head", NULL,
+"big", "head", NULL,
+"small", "head", NULL,
+
+"em", "head", NULL,
+"strong", "head", NULL,
+"dfn", "head", NULL,
+"code", "head", NULL,
+"samp", "head", NULL,
+"kbd", "head", NULL,
+"var", "head", NULL,
+"cite", "head", NULL,
+"abbr", "head", NULL,
+"acronym", "head", NULL,
+
+/* "a" */
+"img", "head", NULL,
+/* "applet" */
+/* "embed" */
+/* "object" */
+"font", "head", NULL,
+/* "basefont" */
+"br", "head", NULL,
+/* "script" */
+"map", "head", NULL,
+"q", "head", NULL,
+"sub", "head", NULL,
+"sup", "head", NULL,
+"span", "head", NULL,
+"bdo", "head", NULL,
+"iframe", "head", NULL,
+NULL
+};
+
+/*
+ * The list of HTML elements which are supposed not to have
+ * CDATA content and where a p element will be implied
+ *
+ * TODO: extend that list by reading the HTML SGML DTD on
+ * implied paragraph
+ */
+static const char *const htmlNoContentElements[] = {
+ "html",
+ "head",
+ NULL
+};
+
+/*
+ * The list of HTML attributes which are of content %Script;
+ * NOTE: when adding ones, check htmlIsScriptAttribute() since
+ * it assumes the name starts with 'on'
+ */
+static const char *const htmlScriptAttributes[] = {
+ "onclick",
+ "ondblclick",
+ "onmousedown",
+ "onmouseup",
+ "onmouseover",
+ "onmousemove",
+ "onmouseout",
+ "onkeypress",
+ "onkeydown",
+ "onkeyup",
+ "onload",
+ "onunload",
+ "onfocus",
+ "onblur",
+ "onsubmit",
+ "onreset",
+ "onchange",
+ "onselect"
+};
+
+/*
+ * This table is used by the htmlparser to know what to do with
+ * broken html pages. By assigning different priorities to different
+ * elements the parser can decide how to handle extra endtags.
+ * Endtags are only allowed to close elements with lower or equal
+ * priority.
+ */
+
+typedef struct {
+ const char *name;
+ int priority;
+} elementPriority;
+
+static const elementPriority htmlEndPriority[] = {
+ {"div", 150},
+ {"td", 160},
+ {"th", 160},
+ {"tr", 170},
+ {"thead", 180},
+ {"tbody", 180},
+ {"tfoot", 180},
+ {"table", 190},
+ {"head", 200},
+ {"body", 200},
+ {"html", 220},
+ {NULL, 100} /* Default priority */
+};
+
+static const char** htmlStartCloseIndex[100];
+static int htmlStartCloseIndexinitialized = 0;
+
+/************************************************************************
+ * *
+ * functions to handle HTML specific data *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlInitAutoClose:
+ *
+ * Initialize the htmlStartCloseIndex for fast lookup of closing tags names.
+ * This is not reentrant. Call xmlInitParser() once before processing in
+ * case of use in multithreaded programs.
+ */
+void
+htmlInitAutoClose(void) {
+ int indx, i = 0;
+
+ if (htmlStartCloseIndexinitialized) return;
+
+ for (indx = 0;indx < 100;indx ++) htmlStartCloseIndex[indx] = NULL;
+ indx = 0;
+ while ((htmlStartClose[i] != NULL) && (indx < 100 - 1)) {
+ htmlStartCloseIndex[indx++] = (const char**) &htmlStartClose[i];
+ while (htmlStartClose[i] != NULL) i++;
+ i++;
+ }
+ htmlStartCloseIndexinitialized = 1;
+}
+
+/**
+ * htmlTagLookup:
+ * @tag: The tag name in lowercase
+ *
+ * Lookup the HTML tag in the ElementTable
+ *
+ * Returns the related htmlElemDescPtr or NULL if not found.
+ */
+const htmlElemDesc *
+htmlTagLookup(const xmlChar *tag) {
+ unsigned int i;
+
+ for (i = 0; i < (sizeof(html40ElementTable) /
+ sizeof(html40ElementTable[0]));i++) {
+ if (!xmlStrcasecmp(tag, BAD_CAST html40ElementTable[i].name))
+ return((htmlElemDescPtr) &html40ElementTable[i]);
+ }
+ return(NULL);
+}
+
+/**
+ * htmlGetEndPriority:
+ * @name: The name of the element to look up the priority for.
+ *
+ * Return value: The "endtag" priority.
+ **/
+static int
+htmlGetEndPriority (const xmlChar *name) {
+ int i = 0;
+
+ while ((htmlEndPriority[i].name != NULL) &&
+ (!xmlStrEqual((const xmlChar *)htmlEndPriority[i].name, name)))
+ i++;
+
+ return(htmlEndPriority[i].priority);
+}
+
+
+/**
+ * htmlCheckAutoClose:
+ * @newtag: The new tag name
+ * @oldtag: The old tag name
+ *
+ * Checks whether the new tag is one of the registered valid tags for
+ * closing old.
+ * Initialize the htmlStartCloseIndex for fast lookup of closing tags names.
+ *
+ * Returns 0 if no, 1 if yes.
+ */
+static int
+htmlCheckAutoClose(const xmlChar * newtag, const xmlChar * oldtag)
+{
+ int i, indx;
+ const char **closed = NULL;
+
+ if (htmlStartCloseIndexinitialized == 0)
+ htmlInitAutoClose();
+
+ /* inefficient, but not a big deal */
+ for (indx = 0; indx < 100; indx++) {
+ closed = htmlStartCloseIndex[indx];
+ if (closed == NULL)
+ return (0);
+ if (xmlStrEqual(BAD_CAST * closed, newtag))
+ break;
+ }
+
+ i = closed - htmlStartClose;
+ i++;
+ while (htmlStartClose[i] != NULL) {
+ if (xmlStrEqual(BAD_CAST htmlStartClose[i], oldtag)) {
+ return (1);
+ }
+ i++;
+ }
+ return (0);
+}
+
+/**
+ * htmlAutoCloseOnClose:
+ * @ctxt: an HTML parser context
+ * @newtag: The new tag name
+ * @force: force the tag closure
+ *
+ * The HTML DTD allows an ending tag to implicitly close other tags.
+ */
+static void
+htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag)
+{
+ const htmlElemDesc *info;
+ int i, priority;
+
+ priority = htmlGetEndPriority(newtag);
+
+ for (i = (ctxt->nameNr - 1); i >= 0; i--) {
+
+ if (xmlStrEqual(newtag, ctxt->nameTab[i]))
+ break;
+ /*
+ * A missplaced endtag can only close elements with lower
+ * or equal priority, so if we find an element with higher
+ * priority before we find an element with
+ * matching name, we just ignore this endtag
+ */
+ if (htmlGetEndPriority(ctxt->nameTab[i]) > priority)
+ return;
+ }
+ if (i < 0)
+ return;
+
+ while (!xmlStrEqual(newtag, ctxt->name)) {
+ info = htmlTagLookup(ctxt->name);
+ if ((info != NULL) && (info->endTag == 3)) {
+ htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Opening and ending tag mismatch: %s and %s\n",
+ newtag, ctxt->name);
+ }
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, ctxt->name);
+ htmlnamePop(ctxt);
+ }
+}
+
+/**
+ * htmlAutoCloseOnEnd:
+ * @ctxt: an HTML parser context
+ *
+ * Close all remaining tags at the end of the stream
+ */
+static void
+htmlAutoCloseOnEnd(htmlParserCtxtPtr ctxt)
+{
+ int i;
+
+ if (ctxt->nameNr == 0)
+ return;
+ for (i = (ctxt->nameNr - 1); i >= 0; i--) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, ctxt->name);
+ htmlnamePop(ctxt);
+ }
+}
+
+/**
+ * htmlAutoClose:
+ * @ctxt: an HTML parser context
+ * @newtag: The new tag name or NULL
+ *
+ * The HTML DTD allows a tag to implicitly close other tags.
+ * The list is kept in htmlStartClose array. This function is
+ * called when a new tag has been detected and generates the
+ * appropriates closes if possible/needed.
+ * If newtag is NULL this mean we are at the end of the resource
+ * and we should check
+ */
+static void
+htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag)
+{
+ while ((newtag != NULL) && (ctxt->name != NULL) &&
+ (htmlCheckAutoClose(newtag, ctxt->name))) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, ctxt->name);
+ htmlnamePop(ctxt);
+ }
+ if (newtag == NULL) {
+ htmlAutoCloseOnEnd(ctxt);
+ return;
+ }
+ while ((newtag == NULL) && (ctxt->name != NULL) &&
+ ((xmlStrEqual(ctxt->name, BAD_CAST "head")) ||
+ (xmlStrEqual(ctxt->name, BAD_CAST "body")) ||
+ (xmlStrEqual(ctxt->name, BAD_CAST "html")))) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, ctxt->name);
+ htmlnamePop(ctxt);
+ }
+}
+
+/**
+ * htmlAutoCloseTag:
+ * @doc: the HTML document
+ * @name: The tag name
+ * @elem: the HTML element
+ *
+ * The HTML DTD allows a tag to implicitly close other tags.
+ * The list is kept in htmlStartClose array. This function checks
+ * if the element or one of it's children would autoclose the
+ * given tag.
+ *
+ * Returns 1 if autoclose, 0 otherwise
+ */
+int
+htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem) {
+ htmlNodePtr child;
+
+ if (elem == NULL) return(1);
+ if (xmlStrEqual(name, elem->name)) return(0);
+ if (htmlCheckAutoClose(elem->name, name)) return(1);
+ child = elem->children;
+ while (child != NULL) {
+ if (htmlAutoCloseTag(doc, name, child)) return(1);
+ child = child->next;
+ }
+ return(0);
+}
+
+/**
+ * htmlIsAutoClosed:
+ * @doc: the HTML document
+ * @elem: the HTML element
+ *
+ * The HTML DTD allows a tag to implicitly close other tags.
+ * The list is kept in htmlStartClose array. This function checks
+ * if a tag is autoclosed by one of it's child
+ *
+ * Returns 1 if autoclosed, 0 otherwise
+ */
+int
+htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem) {
+ htmlNodePtr child;
+
+ if (elem == NULL) return(1);
+ child = elem->children;
+ while (child != NULL) {
+ if (htmlAutoCloseTag(doc, elem->name, child)) return(1);
+ child = child->next;
+ }
+ return(0);
+}
+
+/**
+ * htmlCheckImplied:
+ * @ctxt: an HTML parser context
+ * @newtag: The new tag name
+ *
+ * The HTML DTD allows a tag to exists only implicitly
+ * called when a new tag has been detected and generates the
+ * appropriates implicit tags if missing
+ */
+static void
+htmlCheckImplied(htmlParserCtxtPtr ctxt, const xmlChar *newtag) {
+ int i;
+
+ if (ctxt->options & HTML_PARSE_NOIMPLIED)
+ return;
+ if (!htmlOmittedDefaultValue)
+ return;
+ if (xmlStrEqual(newtag, BAD_CAST"html"))
+ return;
+ if (ctxt->nameNr <= 0) {
+ htmlnamePush(ctxt, BAD_CAST"html");
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
+ ctxt->sax->startElement(ctxt->userData, BAD_CAST"html", NULL);
+ }
+ if ((xmlStrEqual(newtag, BAD_CAST"body")) || (xmlStrEqual(newtag, BAD_CAST"head")))
+ return;
+ if ((ctxt->nameNr <= 1) &&
+ ((xmlStrEqual(newtag, BAD_CAST"script")) ||
+ (xmlStrEqual(newtag, BAD_CAST"style")) ||
+ (xmlStrEqual(newtag, BAD_CAST"meta")) ||
+ (xmlStrEqual(newtag, BAD_CAST"link")) ||
+ (xmlStrEqual(newtag, BAD_CAST"title")) ||
+ (xmlStrEqual(newtag, BAD_CAST"base")))) {
+ if (ctxt->html >= 3) {
+ /* we already saw or generated an <head> before */
+ return;
+ }
+ /*
+ * dropped OBJECT ... i you put it first BODY will be
+ * assumed !
+ */
+ htmlnamePush(ctxt, BAD_CAST"head");
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
+ ctxt->sax->startElement(ctxt->userData, BAD_CAST"head", NULL);
+ } else if ((!xmlStrEqual(newtag, BAD_CAST"noframes")) &&
+ (!xmlStrEqual(newtag, BAD_CAST"frame")) &&
+ (!xmlStrEqual(newtag, BAD_CAST"frameset"))) {
+ if (ctxt->html >= 10) {
+ /* we already saw or generated a <body> before */
+ return;
+ }
+ for (i = 0;i < ctxt->nameNr;i++) {
+ if (xmlStrEqual(ctxt->nameTab[i], BAD_CAST"body")) {
+ return;
+ }
+ if (xmlStrEqual(ctxt->nameTab[i], BAD_CAST"head")) {
+ return;
+ }
+ }
+
+ htmlnamePush(ctxt, BAD_CAST"body");
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
+ ctxt->sax->startElement(ctxt->userData, BAD_CAST"body", NULL);
+ }
+}
+
+/**
+ * htmlCheckParagraph
+ * @ctxt: an HTML parser context
+ *
+ * Check whether a p element need to be implied before inserting
+ * characters in the current element.
+ *
+ * Returns 1 if a paragraph has been inserted, 0 if not and -1
+ * in case of error.
+ */
+
+static int
+htmlCheckParagraph(htmlParserCtxtPtr ctxt) {
+ const xmlChar *tag;
+ int i;
+
+ if (ctxt == NULL)
+ return(-1);
+ tag = ctxt->name;
+ if (tag == NULL) {
+ htmlAutoClose(ctxt, BAD_CAST"p");
+ htmlCheckImplied(ctxt, BAD_CAST"p");
+ htmlnamePush(ctxt, BAD_CAST"p");
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
+ ctxt->sax->startElement(ctxt->userData, BAD_CAST"p", NULL);
+ return(1);
+ }
+ if (!htmlOmittedDefaultValue)
+ return(0);
+ for (i = 0; htmlNoContentElements[i] != NULL; i++) {
+ if (xmlStrEqual(tag, BAD_CAST htmlNoContentElements[i])) {
+ htmlAutoClose(ctxt, BAD_CAST"p");
+ htmlCheckImplied(ctxt, BAD_CAST"p");
+ htmlnamePush(ctxt, BAD_CAST"p");
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL))
+ ctxt->sax->startElement(ctxt->userData, BAD_CAST"p", NULL);
+ return(1);
+ }
+ }
+ return(0);
+}
+
+/**
+ * htmlIsScriptAttribute:
+ * @name: an attribute name
+ *
+ * Check if an attribute is of content type Script
+ *
+ * Returns 1 is the attribute is a script 0 otherwise
+ */
+int
+htmlIsScriptAttribute(const xmlChar *name) {
+ unsigned int i;
+
+ if (name == NULL)
+ return(0);
+ /*
+ * all script attributes start with 'on'
+ */
+ if ((name[0] != 'o') || (name[1] != 'n'))
+ return(0);
+ for (i = 0;
+ i < sizeof(htmlScriptAttributes)/sizeof(htmlScriptAttributes[0]);
+ i++) {
+ if (xmlStrEqual(name, (const xmlChar *) htmlScriptAttributes[i]))
+ return(1);
+ }
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * The list of HTML predefined entities *
+ * *
+ ************************************************************************/
+
+
+static const htmlEntityDesc html40EntitiesTable[] = {
+/*
+ * the 4 absolute ones, plus apostrophe.
+ */
+{ 34, "quot", "quotation mark = APL quote, U+0022 ISOnum" },
+{ 38, "amp", "ampersand, U+0026 ISOnum" },
+{ 39, "apos", "single quote" },
+{ 60, "lt", "less-than sign, U+003C ISOnum" },
+{ 62, "gt", "greater-than sign, U+003E ISOnum" },
+
+/*
+ * A bunch still in the 128-255 range
+ * Replacing them depend really on the charset used.
+ */
+{ 160, "nbsp", "no-break space = non-breaking space, U+00A0 ISOnum" },
+{ 161, "iexcl","inverted exclamation mark, U+00A1 ISOnum" },
+{ 162, "cent", "cent sign, U+00A2 ISOnum" },
+{ 163, "pound","pound sign, U+00A3 ISOnum" },
+{ 164, "curren","currency sign, U+00A4 ISOnum" },
+{ 165, "yen", "yen sign = yuan sign, U+00A5 ISOnum" },
+{ 166, "brvbar","broken bar = broken vertical bar, U+00A6 ISOnum" },
+{ 167, "sect", "section sign, U+00A7 ISOnum" },
+{ 168, "uml", "diaeresis = spacing diaeresis, U+00A8 ISOdia" },
+{ 169, "copy", "copyright sign, U+00A9 ISOnum" },
+{ 170, "ordf", "feminine ordinal indicator, U+00AA ISOnum" },
+{ 171, "laquo","left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum" },
+{ 172, "not", "not sign, U+00AC ISOnum" },
+{ 173, "shy", "soft hyphen = discretionary hyphen, U+00AD ISOnum" },
+{ 174, "reg", "registered sign = registered trade mark sign, U+00AE ISOnum" },
+{ 175, "macr", "macron = spacing macron = overline = APL overbar, U+00AF ISOdia" },
+{ 176, "deg", "degree sign, U+00B0 ISOnum" },
+{ 177, "plusmn","plus-minus sign = plus-or-minus sign, U+00B1 ISOnum" },
+{ 178, "sup2", "superscript two = superscript digit two = squared, U+00B2 ISOnum" },
+{ 179, "sup3", "superscript three = superscript digit three = cubed, U+00B3 ISOnum" },
+{ 180, "acute","acute accent = spacing acute, U+00B4 ISOdia" },
+{ 181, "micro","micro sign, U+00B5 ISOnum" },
+{ 182, "para", "pilcrow sign = paragraph sign, U+00B6 ISOnum" },
+{ 183, "middot","middle dot = Georgian comma Greek middle dot, U+00B7 ISOnum" },
+{ 184, "cedil","cedilla = spacing cedilla, U+00B8 ISOdia" },
+{ 185, "sup1", "superscript one = superscript digit one, U+00B9 ISOnum" },
+{ 186, "ordm", "masculine ordinal indicator, U+00BA ISOnum" },
+{ 187, "raquo","right-pointing double angle quotation mark right pointing guillemet, U+00BB ISOnum" },
+{ 188, "frac14","vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum" },
+{ 189, "frac12","vulgar fraction one half = fraction one half, U+00BD ISOnum" },
+{ 190, "frac34","vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum" },
+{ 191, "iquest","inverted question mark = turned question mark, U+00BF ISOnum" },
+{ 192, "Agrave","latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1" },
+{ 193, "Aacute","latin capital letter A with acute, U+00C1 ISOlat1" },
+{ 194, "Acirc","latin capital letter A with circumflex, U+00C2 ISOlat1" },
+{ 195, "Atilde","latin capital letter A with tilde, U+00C3 ISOlat1" },
+{ 196, "Auml", "latin capital letter A with diaeresis, U+00C4 ISOlat1" },
+{ 197, "Aring","latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1" },
+{ 198, "AElig","latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1" },
+{ 199, "Ccedil","latin capital letter C with cedilla, U+00C7 ISOlat1" },
+{ 200, "Egrave","latin capital letter E with grave, U+00C8 ISOlat1" },
+{ 201, "Eacute","latin capital letter E with acute, U+00C9 ISOlat1" },
+{ 202, "Ecirc","latin capital letter E with circumflex, U+00CA ISOlat1" },
+{ 203, "Euml", "latin capital letter E with diaeresis, U+00CB ISOlat1" },
+{ 204, "Igrave","latin capital letter I with grave, U+00CC ISOlat1" },
+{ 205, "Iacute","latin capital letter I with acute, U+00CD ISOlat1" },
+{ 206, "Icirc","latin capital letter I with circumflex, U+00CE ISOlat1" },
+{ 207, "Iuml", "latin capital letter I with diaeresis, U+00CF ISOlat1" },
+{ 208, "ETH", "latin capital letter ETH, U+00D0 ISOlat1" },
+{ 209, "Ntilde","latin capital letter N with tilde, U+00D1 ISOlat1" },
+{ 210, "Ograve","latin capital letter O with grave, U+00D2 ISOlat1" },
+{ 211, "Oacute","latin capital letter O with acute, U+00D3 ISOlat1" },
+{ 212, "Ocirc","latin capital letter O with circumflex, U+00D4 ISOlat1" },
+{ 213, "Otilde","latin capital letter O with tilde, U+00D5 ISOlat1" },
+{ 214, "Ouml", "latin capital letter O with diaeresis, U+00D6 ISOlat1" },
+{ 215, "times","multiplication sign, U+00D7 ISOnum" },
+{ 216, "Oslash","latin capital letter O with stroke latin capital letter O slash, U+00D8 ISOlat1" },
+{ 217, "Ugrave","latin capital letter U with grave, U+00D9 ISOlat1" },
+{ 218, "Uacute","latin capital letter U with acute, U+00DA ISOlat1" },
+{ 219, "Ucirc","latin capital letter U with circumflex, U+00DB ISOlat1" },
+{ 220, "Uuml", "latin capital letter U with diaeresis, U+00DC ISOlat1" },
+{ 221, "Yacute","latin capital letter Y with acute, U+00DD ISOlat1" },
+{ 222, "THORN","latin capital letter THORN, U+00DE ISOlat1" },
+{ 223, "szlig","latin small letter sharp s = ess-zed, U+00DF ISOlat1" },
+{ 224, "agrave","latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1" },
+{ 225, "aacute","latin small letter a with acute, U+00E1 ISOlat1" },
+{ 226, "acirc","latin small letter a with circumflex, U+00E2 ISOlat1" },
+{ 227, "atilde","latin small letter a with tilde, U+00E3 ISOlat1" },
+{ 228, "auml", "latin small letter a with diaeresis, U+00E4 ISOlat1" },
+{ 229, "aring","latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1" },
+{ 230, "aelig","latin small letter ae = latin small ligature ae, U+00E6 ISOlat1" },
+{ 231, "ccedil","latin small letter c with cedilla, U+00E7 ISOlat1" },
+{ 232, "egrave","latin small letter e with grave, U+00E8 ISOlat1" },
+{ 233, "eacute","latin small letter e with acute, U+00E9 ISOlat1" },
+{ 234, "ecirc","latin small letter e with circumflex, U+00EA ISOlat1" },
+{ 235, "euml", "latin small letter e with diaeresis, U+00EB ISOlat1" },
+{ 236, "igrave","latin small letter i with grave, U+00EC ISOlat1" },
+{ 237, "iacute","latin small letter i with acute, U+00ED ISOlat1" },
+{ 238, "icirc","latin small letter i with circumflex, U+00EE ISOlat1" },
+{ 239, "iuml", "latin small letter i with diaeresis, U+00EF ISOlat1" },
+{ 240, "eth", "latin small letter eth, U+00F0 ISOlat1" },
+{ 241, "ntilde","latin small letter n with tilde, U+00F1 ISOlat1" },
+{ 242, "ograve","latin small letter o with grave, U+00F2 ISOlat1" },
+{ 243, "oacute","latin small letter o with acute, U+00F3 ISOlat1" },
+{ 244, "ocirc","latin small letter o with circumflex, U+00F4 ISOlat1" },
+{ 245, "otilde","latin small letter o with tilde, U+00F5 ISOlat1" },
+{ 246, "ouml", "latin small letter o with diaeresis, U+00F6 ISOlat1" },
+{ 247, "divide","division sign, U+00F7 ISOnum" },
+{ 248, "oslash","latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1" },
+{ 249, "ugrave","latin small letter u with grave, U+00F9 ISOlat1" },
+{ 250, "uacute","latin small letter u with acute, U+00FA ISOlat1" },
+{ 251, "ucirc","latin small letter u with circumflex, U+00FB ISOlat1" },
+{ 252, "uuml", "latin small letter u with diaeresis, U+00FC ISOlat1" },
+{ 253, "yacute","latin small letter y with acute, U+00FD ISOlat1" },
+{ 254, "thorn","latin small letter thorn with, U+00FE ISOlat1" },
+{ 255, "yuml", "latin small letter y with diaeresis, U+00FF ISOlat1" },
+
+{ 338, "OElig","latin capital ligature OE, U+0152 ISOlat2" },
+{ 339, "oelig","latin small ligature oe, U+0153 ISOlat2" },
+{ 352, "Scaron","latin capital letter S with caron, U+0160 ISOlat2" },
+{ 353, "scaron","latin small letter s with caron, U+0161 ISOlat2" },
+{ 376, "Yuml", "latin capital letter Y with diaeresis, U+0178 ISOlat2" },
+
+/*
+ * Anything below should really be kept as entities references
+ */
+{ 402, "fnof", "latin small f with hook = function = florin, U+0192 ISOtech" },
+
+{ 710, "circ", "modifier letter circumflex accent, U+02C6 ISOpub" },
+{ 732, "tilde","small tilde, U+02DC ISOdia" },
+
+{ 913, "Alpha","greek capital letter alpha, U+0391" },
+{ 914, "Beta", "greek capital letter beta, U+0392" },
+{ 915, "Gamma","greek capital letter gamma, U+0393 ISOgrk3" },
+{ 916, "Delta","greek capital letter delta, U+0394 ISOgrk3" },
+{ 917, "Epsilon","greek capital letter epsilon, U+0395" },
+{ 918, "Zeta", "greek capital letter zeta, U+0396" },
+{ 919, "Eta", "greek capital letter eta, U+0397" },
+{ 920, "Theta","greek capital letter theta, U+0398 ISOgrk3" },
+{ 921, "Iota", "greek capital letter iota, U+0399" },
+{ 922, "Kappa","greek capital letter kappa, U+039A" },
+{ 923, "Lambda", "greek capital letter lambda, U+039B ISOgrk3" },
+{ 924, "Mu", "greek capital letter mu, U+039C" },
+{ 925, "Nu", "greek capital letter nu, U+039D" },
+{ 926, "Xi", "greek capital letter xi, U+039E ISOgrk3" },
+{ 927, "Omicron","greek capital letter omicron, U+039F" },
+{ 928, "Pi", "greek capital letter pi, U+03A0 ISOgrk3" },
+{ 929, "Rho", "greek capital letter rho, U+03A1" },
+{ 931, "Sigma","greek capital letter sigma, U+03A3 ISOgrk3" },
+{ 932, "Tau", "greek capital letter tau, U+03A4" },
+{ 933, "Upsilon","greek capital letter upsilon, U+03A5 ISOgrk3" },
+{ 934, "Phi", "greek capital letter phi, U+03A6 ISOgrk3" },
+{ 935, "Chi", "greek capital letter chi, U+03A7" },
+{ 936, "Psi", "greek capital letter psi, U+03A8 ISOgrk3" },
+{ 937, "Omega","greek capital letter omega, U+03A9 ISOgrk3" },
+
+{ 945, "alpha","greek small letter alpha, U+03B1 ISOgrk3" },
+{ 946, "beta", "greek small letter beta, U+03B2 ISOgrk3" },
+{ 947, "gamma","greek small letter gamma, U+03B3 ISOgrk3" },
+{ 948, "delta","greek small letter delta, U+03B4 ISOgrk3" },
+{ 949, "epsilon","greek small letter epsilon, U+03B5 ISOgrk3" },
+{ 950, "zeta", "greek small letter zeta, U+03B6 ISOgrk3" },
+{ 951, "eta", "greek small letter eta, U+03B7 ISOgrk3" },
+{ 952, "theta","greek small letter theta, U+03B8 ISOgrk3" },
+{ 953, "iota", "greek small letter iota, U+03B9 ISOgrk3" },
+{ 954, "kappa","greek small letter kappa, U+03BA ISOgrk3" },
+{ 955, "lambda","greek small letter lambda, U+03BB ISOgrk3" },
+{ 956, "mu", "greek small letter mu, U+03BC ISOgrk3" },
+{ 957, "nu", "greek small letter nu, U+03BD ISOgrk3" },
+{ 958, "xi", "greek small letter xi, U+03BE ISOgrk3" },
+{ 959, "omicron","greek small letter omicron, U+03BF NEW" },
+{ 960, "pi", "greek small letter pi, U+03C0 ISOgrk3" },
+{ 961, "rho", "greek small letter rho, U+03C1 ISOgrk3" },
+{ 962, "sigmaf","greek small letter final sigma, U+03C2 ISOgrk3" },
+{ 963, "sigma","greek small letter sigma, U+03C3 ISOgrk3" },
+{ 964, "tau", "greek small letter tau, U+03C4 ISOgrk3" },
+{ 965, "upsilon","greek small letter upsilon, U+03C5 ISOgrk3" },
+{ 966, "phi", "greek small letter phi, U+03C6 ISOgrk3" },
+{ 967, "chi", "greek small letter chi, U+03C7 ISOgrk3" },
+{ 968, "psi", "greek small letter psi, U+03C8 ISOgrk3" },
+{ 969, "omega","greek small letter omega, U+03C9 ISOgrk3" },
+{ 977, "thetasym","greek small letter theta symbol, U+03D1 NEW" },
+{ 978, "upsih","greek upsilon with hook symbol, U+03D2 NEW" },
+{ 982, "piv", "greek pi symbol, U+03D6 ISOgrk3" },
+
+{ 8194, "ensp", "en space, U+2002 ISOpub" },
+{ 8195, "emsp", "em space, U+2003 ISOpub" },
+{ 8201, "thinsp","thin space, U+2009 ISOpub" },
+{ 8204, "zwnj", "zero width non-joiner, U+200C NEW RFC 2070" },
+{ 8205, "zwj", "zero width joiner, U+200D NEW RFC 2070" },
+{ 8206, "lrm", "left-to-right mark, U+200E NEW RFC 2070" },
+{ 8207, "rlm", "right-to-left mark, U+200F NEW RFC 2070" },
+{ 8211, "ndash","en dash, U+2013 ISOpub" },
+{ 8212, "mdash","em dash, U+2014 ISOpub" },
+{ 8216, "lsquo","left single quotation mark, U+2018 ISOnum" },
+{ 8217, "rsquo","right single quotation mark, U+2019 ISOnum" },
+{ 8218, "sbquo","single low-9 quotation mark, U+201A NEW" },
+{ 8220, "ldquo","left double quotation mark, U+201C ISOnum" },
+{ 8221, "rdquo","right double quotation mark, U+201D ISOnum" },
+{ 8222, "bdquo","double low-9 quotation mark, U+201E NEW" },
+{ 8224, "dagger","dagger, U+2020 ISOpub" },
+{ 8225, "Dagger","double dagger, U+2021 ISOpub" },
+
+{ 8226, "bull", "bullet = black small circle, U+2022 ISOpub" },
+{ 8230, "hellip","horizontal ellipsis = three dot leader, U+2026 ISOpub" },
+
+{ 8240, "permil","per mille sign, U+2030 ISOtech" },
+
+{ 8242, "prime","prime = minutes = feet, U+2032 ISOtech" },
+{ 8243, "Prime","double prime = seconds = inches, U+2033 ISOtech" },
+
+{ 8249, "lsaquo","single left-pointing angle quotation mark, U+2039 ISO proposed" },
+{ 8250, "rsaquo","single right-pointing angle quotation mark, U+203A ISO proposed" },
+
+{ 8254, "oline","overline = spacing overscore, U+203E NEW" },
+{ 8260, "frasl","fraction slash, U+2044 NEW" },
+
+{ 8364, "euro", "euro sign, U+20AC NEW" },
+
+{ 8465, "image","blackletter capital I = imaginary part, U+2111 ISOamso" },
+{ 8472, "weierp","script capital P = power set = Weierstrass p, U+2118 ISOamso" },
+{ 8476, "real", "blackletter capital R = real part symbol, U+211C ISOamso" },
+{ 8482, "trade","trade mark sign, U+2122 ISOnum" },
+{ 8501, "alefsym","alef symbol = first transfinite cardinal, U+2135 NEW" },
+{ 8592, "larr", "leftwards arrow, U+2190 ISOnum" },
+{ 8593, "uarr", "upwards arrow, U+2191 ISOnum" },
+{ 8594, "rarr", "rightwards arrow, U+2192 ISOnum" },
+{ 8595, "darr", "downwards arrow, U+2193 ISOnum" },
+{ 8596, "harr", "left right arrow, U+2194 ISOamsa" },
+{ 8629, "crarr","downwards arrow with corner leftwards = carriage return, U+21B5 NEW" },
+{ 8656, "lArr", "leftwards double arrow, U+21D0 ISOtech" },
+{ 8657, "uArr", "upwards double arrow, U+21D1 ISOamsa" },
+{ 8658, "rArr", "rightwards double arrow, U+21D2 ISOtech" },
+{ 8659, "dArr", "downwards double arrow, U+21D3 ISOamsa" },
+{ 8660, "hArr", "left right double arrow, U+21D4 ISOamsa" },
+
+{ 8704, "forall","for all, U+2200 ISOtech" },
+{ 8706, "part", "partial differential, U+2202 ISOtech" },
+{ 8707, "exist","there exists, U+2203 ISOtech" },
+{ 8709, "empty","empty set = null set = diameter, U+2205 ISOamso" },
+{ 8711, "nabla","nabla = backward difference, U+2207 ISOtech" },
+{ 8712, "isin", "element of, U+2208 ISOtech" },
+{ 8713, "notin","not an element of, U+2209 ISOtech" },
+{ 8715, "ni", "contains as member, U+220B ISOtech" },
+{ 8719, "prod", "n-ary product = product sign, U+220F ISOamsb" },
+{ 8721, "sum", "n-ary summation, U+2211 ISOamsb" },
+{ 8722, "minus","minus sign, U+2212 ISOtech" },
+{ 8727, "lowast","asterisk operator, U+2217 ISOtech" },
+{ 8730, "radic","square root = radical sign, U+221A ISOtech" },
+{ 8733, "prop", "proportional to, U+221D ISOtech" },
+{ 8734, "infin","infinity, U+221E ISOtech" },
+{ 8736, "ang", "angle, U+2220 ISOamso" },
+{ 8743, "and", "logical and = wedge, U+2227 ISOtech" },
+{ 8744, "or", "logical or = vee, U+2228 ISOtech" },
+{ 8745, "cap", "intersection = cap, U+2229 ISOtech" },
+{ 8746, "cup", "union = cup, U+222A ISOtech" },
+{ 8747, "int", "integral, U+222B ISOtech" },
+{ 8756, "there4","therefore, U+2234 ISOtech" },
+{ 8764, "sim", "tilde operator = varies with = similar to, U+223C ISOtech" },
+{ 8773, "cong", "approximately equal to, U+2245 ISOtech" },
+{ 8776, "asymp","almost equal to = asymptotic to, U+2248 ISOamsr" },
+{ 8800, "ne", "not equal to, U+2260 ISOtech" },
+{ 8801, "equiv","identical to, U+2261 ISOtech" },
+{ 8804, "le", "less-than or equal to, U+2264 ISOtech" },
+{ 8805, "ge", "greater-than or equal to, U+2265 ISOtech" },
+{ 8834, "sub", "subset of, U+2282 ISOtech" },
+{ 8835, "sup", "superset of, U+2283 ISOtech" },
+{ 8836, "nsub", "not a subset of, U+2284 ISOamsn" },
+{ 8838, "sube", "subset of or equal to, U+2286 ISOtech" },
+{ 8839, "supe", "superset of or equal to, U+2287 ISOtech" },
+{ 8853, "oplus","circled plus = direct sum, U+2295 ISOamsb" },
+{ 8855, "otimes","circled times = vector product, U+2297 ISOamsb" },
+{ 8869, "perp", "up tack = orthogonal to = perpendicular, U+22A5 ISOtech" },
+{ 8901, "sdot", "dot operator, U+22C5 ISOamsb" },
+{ 8968, "lceil","left ceiling = apl upstile, U+2308 ISOamsc" },
+{ 8969, "rceil","right ceiling, U+2309 ISOamsc" },
+{ 8970, "lfloor","left floor = apl downstile, U+230A ISOamsc" },
+{ 8971, "rfloor","right floor, U+230B ISOamsc" },
+{ 9001, "lang", "left-pointing angle bracket = bra, U+2329 ISOtech" },
+{ 9002, "rang", "right-pointing angle bracket = ket, U+232A ISOtech" },
+{ 9674, "loz", "lozenge, U+25CA ISOpub" },
+
+{ 9824, "spades","black spade suit, U+2660 ISOpub" },
+{ 9827, "clubs","black club suit = shamrock, U+2663 ISOpub" },
+{ 9829, "hearts","black heart suit = valentine, U+2665 ISOpub" },
+{ 9830, "diams","black diamond suit, U+2666 ISOpub" },
+
+};
+
+/************************************************************************
+ * *
+ * Commodity functions to handle entities *
+ * *
+ ************************************************************************/
+
+/*
+ * Macro used to grow the current buffer.
+ */
+#define growBuffer(buffer) { \
+ xmlChar *tmp; \
+ buffer##_size *= 2; \
+ tmp = (xmlChar *) xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
+ if (tmp == NULL) { \
+ htmlErrMemory(ctxt, "growing buffer\n"); \
+ xmlFree(buffer); \
+ return(NULL); \
+ } \
+ buffer = tmp; \
+}
+
+/**
+ * htmlEntityLookup:
+ * @name: the entity name
+ *
+ * Lookup the given entity in EntitiesTable
+ *
+ * TODO: the linear scan is really ugly, an hash table is really needed.
+ *
+ * Returns the associated htmlEntityDescPtr if found, NULL otherwise.
+ */
+const htmlEntityDesc *
+htmlEntityLookup(const xmlChar *name) {
+ unsigned int i;
+
+ for (i = 0;i < (sizeof(html40EntitiesTable)/
+ sizeof(html40EntitiesTable[0]));i++) {
+ if (xmlStrEqual(name, BAD_CAST html40EntitiesTable[i].name)) {
+ return((htmlEntityDescPtr) &html40EntitiesTable[i]);
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * htmlEntityValueLookup:
+ * @value: the entity's unicode value
+ *
+ * Lookup the given entity in EntitiesTable
+ *
+ * TODO: the linear scan is really ugly, an hash table is really needed.
+ *
+ * Returns the associated htmlEntityDescPtr if found, NULL otherwise.
+ */
+const htmlEntityDesc *
+htmlEntityValueLookup(unsigned int value) {
+ unsigned int i;
+
+ for (i = 0;i < (sizeof(html40EntitiesTable)/
+ sizeof(html40EntitiesTable[0]));i++) {
+ if (html40EntitiesTable[i].value >= value) {
+ if (html40EntitiesTable[i].value > value)
+ break;
+ return((htmlEntityDescPtr) &html40EntitiesTable[i]);
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * UTF8ToHtml:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ASCII
+ * plus HTML entities block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+UTF8ToHtml(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ const unsigned char* processed = in;
+ const unsigned char* outend;
+ const unsigned char* outstart = out;
+ const unsigned char* instart = in;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
+ if (in == NULL) {
+ /*
+ * initialization nothing to do
+ */
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend = in + (*inlen);
+ outend = out + (*outlen);
+ while (in < inend) {
+ d = *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in Ascii */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing) {
+ break;
+ }
+
+ for ( ; trailing; trailing--) {
+ if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80))
+ break;
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (c < 0x80) {
+ if (out + 1 >= outend)
+ break;
+ *out++ = c;
+ } else {
+ int len;
+ const htmlEntityDesc * ent;
+ const char *cp;
+ char nbuf[16];
+
+ /*
+ * Try to lookup a predefined HTML entity for it
+ */
+
+ ent = htmlEntityValueLookup(c);
+ if (ent == NULL) {
+ snprintf(nbuf, sizeof(nbuf), "#%u", c);
+ cp = nbuf;
+ }
+ else
+ cp = ent->name;
+ len = strlen(cp);
+ if (out + 2 + len >= outend)
+ break;
+ *out++ = '&';
+ memcpy(out, cp, len);
+ out += len;
+ *out++ = ';';
+ }
+ processed = in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(0);
+}
+
+/**
+ * htmlEncodeEntities:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ * @quoteChar: the quote character to escape (' or ") or zero.
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ASCII
+ * plus HTML entities block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+htmlEncodeEntities(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen, int quoteChar) {
+ const unsigned char* processed = in;
+ const unsigned char* outend;
+ const unsigned char* outstart = out;
+ const unsigned char* instart = in;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL))
+ return(-1);
+ outend = out + (*outlen);
+ inend = in + (*inlen);
+ while (in < inend) {
+ d = *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in Ascii */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing)
+ break;
+
+ while (trailing--) {
+ if (((d= *in++) & 0xC0) != 0x80) {
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if ((c < 0x80) && (c != (unsigned int) quoteChar) &&
+ (c != '&') && (c != '<') && (c != '>')) {
+ if (out >= outend)
+ break;
+ *out++ = c;
+ } else {
+ const htmlEntityDesc * ent;
+ const char *cp;
+ char nbuf[16];
+ int len;
+
+ /*
+ * Try to lookup a predefined HTML entity for it
+ */
+ ent = htmlEntityValueLookup(c);
+ if (ent == NULL) {
+ snprintf(nbuf, sizeof(nbuf), "#%u", c);
+ cp = nbuf;
+ }
+ else
+ cp = ent->name;
+ len = strlen(cp);
+ if (out + 2 + len > outend)
+ break;
+ *out++ = '&';
+ memcpy(out, cp, len);
+ out += len;
+ *out++ = ';';
+ }
+ processed = in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Commodity functions to handle streams *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlNewInputStream:
+ * @ctxt: an HTML parser context
+ *
+ * Create a new input stream structure
+ * Returns the new input stream or NULL
+ */
+static htmlParserInputPtr
+htmlNewInputStream(htmlParserCtxtPtr ctxt) {
+ htmlParserInputPtr input;
+
+ input = (xmlParserInputPtr) xmlMalloc(sizeof(htmlParserInput));
+ if (input == NULL) {
+ htmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
+ return(NULL);
+ }
+ memset(input, 0, sizeof(htmlParserInput));
+ input->filename = NULL;
+ input->directory = NULL;
+ input->base = NULL;
+ input->cur = NULL;
+ input->buf = NULL;
+ input->line = 1;
+ input->col = 1;
+ input->buf = NULL;
+ input->free = NULL;
+ input->version = NULL;
+ input->consumed = 0;
+ input->length = 0;
+ return(input);
+}
+
+
+/************************************************************************
+ * *
+ * Commodity functions, cleanup needed ? *
+ * *
+ ************************************************************************/
+/*
+ * all tags allowing pc data from the html 4.01 loose dtd
+ * NOTE: it might be more apropriate to integrate this information
+ * into the html40ElementTable array but I don't want to risk any
+ * binary incomptibility
+ */
+static const char *allowPCData[] = {
+ "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big",
+ "blockquote", "body", "button", "caption", "center", "cite", "code",
+ "dd", "del", "dfn", "div", "dt", "em", "font", "form", "h1", "h2",
+ "h3", "h4", "h5", "h6", "i", "iframe", "ins", "kbd", "label", "legend",
+ "li", "noframes", "noscript", "object", "p", "pre", "q", "s", "samp",
+ "small", "span", "strike", "strong", "td", "th", "tt", "u", "var"
+};
+
+/**
+ * areBlanks:
+ * @ctxt: an HTML parser context
+ * @str: a xmlChar *
+ * @len: the size of @str
+ *
+ * Is this a sequence of blank chars that one can ignore ?
+ *
+ * Returns 1 if ignorable 0 otherwise.
+ */
+
+static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
+ unsigned int i;
+ int j;
+ xmlNodePtr lastChild;
+ xmlDtdPtr dtd;
+
+ for (j = 0;j < len;j++)
+ if (!(IS_BLANK_CH(str[j]))) return(0);
+
+ if (CUR == 0) return(1);
+ if (CUR != '<') return(0);
+ if (ctxt->name == NULL)
+ return(1);
+ if (xmlStrEqual(ctxt->name, BAD_CAST"html"))
+ return(1);
+ if (xmlStrEqual(ctxt->name, BAD_CAST"head"))
+ return(1);
+
+ /* Only strip CDATA children of the body tag for strict HTML DTDs */
+ if (xmlStrEqual(ctxt->name, BAD_CAST "body") && ctxt->myDoc != NULL) {
+ dtd = xmlGetIntSubset(ctxt->myDoc);
+ if (dtd != NULL && dtd->ExternalID != NULL) {
+ if (!xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4.01//EN") ||
+ !xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4//EN"))
+ return(1);
+ }
+ }
+
+ if (ctxt->node == NULL) return(0);
+ lastChild = xmlGetLastChild(ctxt->node);
+ while ((lastChild) && (lastChild->type == XML_COMMENT_NODE))
+ lastChild = lastChild->prev;
+ if (lastChild == NULL) {
+ if ((ctxt->node->type != XML_ELEMENT_NODE) &&
+ (ctxt->node->content != NULL)) return(0);
+ /* keep ws in constructs like ...<b> </b>...
+ for all tags "b" allowing PCDATA */
+ for ( i = 0; i < sizeof(allowPCData)/sizeof(allowPCData[0]); i++ ) {
+ if ( xmlStrEqual(ctxt->name, BAD_CAST allowPCData[i]) ) {
+ return(0);
+ }
+ }
+ } else if (xmlNodeIsText(lastChild)) {
+ return(0);
+ } else {
+ /* keep ws in constructs like <p><b>xy</b> <i>z</i><p>
+ for all tags "p" allowing PCDATA */
+ for ( i = 0; i < sizeof(allowPCData)/sizeof(allowPCData[0]); i++ ) {
+ if ( xmlStrEqual(lastChild->name, BAD_CAST allowPCData[i]) ) {
+ return(0);
+ }
+ }
+ }
+ return(1);
+}
+
+/**
+ * htmlNewDocNoDtD:
+ * @URI: URI for the dtd, or NULL
+ * @ExternalID: the external ID of the DTD, or NULL
+ *
+ * Creates a new HTML document without a DTD node if @URI and @ExternalID
+ * are NULL
+ *
+ * Returns a new document, do not initialize the DTD if not provided
+ */
+htmlDocPtr
+htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) {
+ xmlDocPtr cur;
+
+ /*
+ * Allocate a new document and fill the fields.
+ */
+ cur = (xmlDocPtr) xmlMalloc(sizeof(xmlDoc));
+ if (cur == NULL) {
+ htmlErrMemory(NULL, "HTML document creation failed\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlDoc));
+
+ cur->type = XML_HTML_DOCUMENT_NODE;
+ cur->version = NULL;
+ cur->intSubset = NULL;
+ cur->doc = cur;
+ cur->name = NULL;
+ cur->children = NULL;
+ cur->extSubset = NULL;
+ cur->oldNs = NULL;
+ cur->encoding = NULL;
+ cur->standalone = 1;
+ cur->compression = 0;
+ cur->ids = NULL;
+ cur->refs = NULL;
+ cur->_private = NULL;
+ cur->charset = XML_CHAR_ENCODING_UTF8;
+ cur->properties = XML_DOC_HTML | XML_DOC_USERBUILT;
+ if ((ExternalID != NULL) ||
+ (URI != NULL))
+ xmlCreateIntSubset(cur, BAD_CAST "html", ExternalID, URI);
+ return(cur);
+}
+
+/**
+ * htmlNewDoc:
+ * @URI: URI for the dtd, or NULL
+ * @ExternalID: the external ID of the DTD, or NULL
+ *
+ * Creates a new HTML document
+ *
+ * Returns a new document
+ */
+htmlDocPtr
+htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID) {
+ if ((URI == NULL) && (ExternalID == NULL))
+ return(htmlNewDocNoDtD(
+ BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd",
+ BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN"));
+
+ return(htmlNewDocNoDtD(URI, ExternalID));
+}
+
+
+/************************************************************************
+ * *
+ * The parser itself *
+ * Relates to http://www.w3.org/TR/html40 *
+ * *
+ ************************************************************************/
+
+/************************************************************************
+ * *
+ * The parser itself *
+ * *
+ ************************************************************************/
+
+static const xmlChar * htmlParseNameComplex(xmlParserCtxtPtr ctxt);
+
+/**
+ * htmlParseHTMLName:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML tag or attribute name, note that we convert it to lowercase
+ * since HTML names are not case-sensitive.
+ *
+ * Returns the Tag Name parsed or NULL
+ */
+
+static const xmlChar *
+htmlParseHTMLName(htmlParserCtxtPtr ctxt) {
+ int i = 0;
+ xmlChar loc[HTML_PARSER_BUFFER_SIZE];
+
+ if (!IS_ASCII_LETTER(CUR) && (CUR != '_') &&
+ (CUR != ':') && (CUR != '.')) return(NULL);
+
+ while ((i < HTML_PARSER_BUFFER_SIZE) &&
+ ((IS_ASCII_LETTER(CUR)) || (IS_ASCII_DIGIT(CUR)) ||
+ (CUR == ':') || (CUR == '-') || (CUR == '_') ||
+ (CUR == '.'))) {
+ if ((CUR >= 'A') && (CUR <= 'Z')) loc[i] = CUR + 0x20;
+ else loc[i] = CUR;
+ i++;
+
+ NEXT;
+ }
+
+ return(xmlDictLookup(ctxt->dict, loc, i));
+}
+
+
+/**
+ * htmlParseHTMLName_nonInvasive:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML tag or attribute name, note that we convert it to lowercase
+ * since HTML names are not case-sensitive, this doesn't consume the data
+ * from the stream, it's a look-ahead
+ *
+ * Returns the Tag Name parsed or NULL
+ */
+
+static const xmlChar *
+htmlParseHTMLName_nonInvasive(htmlParserCtxtPtr ctxt) {
+ int i = 0;
+ xmlChar loc[HTML_PARSER_BUFFER_SIZE];
+
+ if (!IS_ASCII_LETTER(NXT(1)) && (NXT(1) != '_') &&
+ (NXT(1) != ':')) return(NULL);
+
+ while ((i < HTML_PARSER_BUFFER_SIZE) &&
+ ((IS_ASCII_LETTER(NXT(1+i))) || (IS_ASCII_DIGIT(NXT(1+i))) ||
+ (NXT(1+i) == ':') || (NXT(1+i) == '-') || (NXT(1+i) == '_'))) {
+ if ((NXT(1+i) >= 'A') && (NXT(1+i) <= 'Z')) loc[i] = NXT(1+i) + 0x20;
+ else loc[i] = NXT(1+i);
+ i++;
+ }
+
+ return(xmlDictLookup(ctxt->dict, loc, i));
+}
+
+
+/**
+ * htmlParseName:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML name, this routine is case sensitive.
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static const xmlChar *
+htmlParseName(htmlParserCtxtPtr ctxt) {
+ const xmlChar *in;
+ const xmlChar *ret;
+ int count = 0;
+
+ GROW;
+
+ /*
+ * Accelerator for simple ASCII names
+ */
+ in = ctxt->input->cur;
+ if (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ (*in == '_') || (*in == ':')) {
+ in++;
+ while (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ ((*in >= 0x30) && (*in <= 0x39)) ||
+ (*in == '_') || (*in == '-') ||
+ (*in == ':') || (*in == '.'))
+ in++;
+ if ((*in > 0) && (*in < 0x80)) {
+ count = in - ctxt->input->cur;
+ ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
+ ctxt->input->cur = in;
+ ctxt->nbChars += count;
+ ctxt->input->col += count;
+ return(ret);
+ }
+ }
+ return(htmlParseNameComplex(ctxt));
+}
+
+static const xmlChar *
+htmlParseNameComplex(xmlParserCtxtPtr ctxt) {
+ int len = 0, l;
+ int c;
+ int count = 0;
+
+ /*
+ * Handler for more complex cases
+ */
+ GROW;
+ c = CUR_CHAR(l);
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!IS_LETTER(c) && (c != '_') &&
+ (c != ':'))) {
+ return(NULL);
+ }
+
+ while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
+ ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':') ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))) {
+ if (count++ > 100) {
+ count = 0;
+ GROW;
+ }
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ }
+ return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
+}
+
+
+/**
+ * htmlParseHTMLAttribute:
+ * @ctxt: an HTML parser context
+ * @stop: a char stop value
+ *
+ * parse an HTML attribute value till the stop (quote), if
+ * stop is 0 then it stops at the first space
+ *
+ * Returns the attribute parsed or NULL
+ */
+
+static xmlChar *
+htmlParseHTMLAttribute(htmlParserCtxtPtr ctxt, const xmlChar stop) {
+ xmlChar *buffer = NULL;
+ int buffer_size = 0;
+ xmlChar *out = NULL;
+ const xmlChar *name = NULL;
+ const xmlChar *cur = NULL;
+ const htmlEntityDesc * ent;
+
+ /*
+ * allocate a translation buffer.
+ */
+ buffer_size = HTML_PARSER_BUFFER_SIZE;
+ buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar));
+ if (buffer == NULL) {
+ htmlErrMemory(ctxt, "buffer allocation failed\n");
+ return(NULL);
+ }
+ out = buffer;
+
+ /*
+ * Ok loop until we reach one of the ending chars
+ */
+ while ((CUR != 0) && (CUR != stop)) {
+ if ((stop == 0) && (CUR == '>')) break;
+ if ((stop == 0) && (IS_BLANK_CH(CUR))) break;
+ if (CUR == '&') {
+ if (NXT(1) == '#') {
+ unsigned int c;
+ int bits;
+
+ c = htmlParseCharRef(ctxt);
+ if (c < 0x80)
+ { *out++ = c; bits= -6; }
+ else if (c < 0x800)
+ { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000)
+ { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else
+ { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ *out++ = ((c >> bits) & 0x3F) | 0x80;
+ }
+
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
+ } else {
+ ent = htmlParseEntityRef(ctxt, &name);
+ if (name == NULL) {
+ *out++ = '&';
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
+ } else if (ent == NULL) {
+ *out++ = '&';
+ cur = name;
+ while (*cur != 0) {
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
+ *out++ = *cur++;
+ }
+ } else {
+ unsigned int c;
+ int bits;
+
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
+ c = ent->value;
+ if (c < 0x80)
+ { *out++ = c; bits= -6; }
+ else if (c < 0x800)
+ { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000)
+ { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else
+ { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ *out++ = ((c >> bits) & 0x3F) | 0x80;
+ }
+ }
+ }
+ } else {
+ unsigned int c;
+ int bits, l;
+
+ if (out - buffer > buffer_size - 100) {
+ int indx = out - buffer;
+
+ growBuffer(buffer);
+ out = &buffer[indx];
+ }
+ c = CUR_CHAR(l);
+ if (c < 0x80)
+ { *out++ = c; bits= -6; }
+ else if (c < 0x800)
+ { *out++ =((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000)
+ { *out++ =((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else
+ { *out++ =((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ *out++ = ((c >> bits) & 0x3F) | 0x80;
+ }
+ NEXT;
+ }
+ }
+ *out = 0;
+ return(buffer);
+}
+
+/**
+ * htmlParseEntityRef:
+ * @ctxt: an HTML parser context
+ * @str: location to store the entity name
+ *
+ * parse an HTML ENTITY references
+ *
+ * [68] EntityRef ::= '&' Name ';'
+ *
+ * Returns the associated htmlEntityDescPtr if found, or NULL otherwise,
+ * if non-NULL *str will have to be freed by the caller.
+ */
+const htmlEntityDesc *
+htmlParseEntityRef(htmlParserCtxtPtr ctxt, const xmlChar **str) {
+ const xmlChar *name;
+ const htmlEntityDesc * ent = NULL;
+
+ if (str != NULL) *str = NULL;
+ if ((ctxt == NULL) || (ctxt->input == NULL)) return(NULL);
+
+ if (CUR == '&') {
+ NEXT;
+ name = htmlParseName(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "htmlParseEntityRef: no name\n", NULL, NULL);
+ } else {
+ GROW;
+ if (CUR == ';') {
+ if (str != NULL)
+ *str = name;
+
+ /*
+ * Lookup the entity in the table.
+ */
+ ent = htmlEntityLookup(name);
+ if (ent != NULL) /* OK that's ugly !!! */
+ NEXT;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING,
+ "htmlParseEntityRef: expecting ';'\n",
+ NULL, NULL);
+ if (str != NULL)
+ *str = name;
+ }
+ }
+ }
+ return(ent);
+}
+
+/**
+ * htmlParseAttValue:
+ * @ctxt: an HTML parser context
+ *
+ * parse a value for an attribute
+ * Note: the parser won't do substitution of entities here, this
+ * will be handled later in xmlStringGetNodeList, unless it was
+ * asked for ctxt->replaceEntities != 0
+ *
+ * Returns the AttValue parsed or NULL.
+ */
+
+static xmlChar *
+htmlParseAttValue(htmlParserCtxtPtr ctxt) {
+ xmlChar *ret = NULL;
+
+ if (CUR == '"') {
+ NEXT;
+ ret = htmlParseHTMLAttribute(ctxt, '"');
+ if (CUR != '"') {
+ htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue: \" expected\n", NULL, NULL);
+ } else
+ NEXT;
+ } else if (CUR == '\'') {
+ NEXT;
+ ret = htmlParseHTMLAttribute(ctxt, '\'');
+ if (CUR != '\'') {
+ htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue: ' expected\n", NULL, NULL);
+ } else
+ NEXT;
+ } else {
+ /*
+ * That's an HTMLism, the attribute value may not be quoted
+ */
+ ret = htmlParseHTMLAttribute(ctxt, 0);
+ if (ret == NULL) {
+ htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
+ "AttValue: no value found\n", NULL, NULL);
+ }
+ }
+ return(ret);
+}
+
+/**
+ * htmlParseSystemLiteral:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML Literal
+ *
+ * [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
+ *
+ * Returns the SystemLiteral parsed or NULL
+ */
+
+static xmlChar *
+htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
+ const xmlChar *q;
+ xmlChar *ret = NULL;
+
+ if (CUR == '"') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
+ "Unfinished SystemLiteral\n", NULL, NULL);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else if (CUR == '\'') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
+ "Unfinished SystemLiteral\n", NULL, NULL);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED,
+ " or ' expected\n", NULL, NULL);
+ }
+
+ return(ret);
+}
+
+/**
+ * htmlParsePubidLiteral:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML public literal
+ *
+ * [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
+ *
+ * Returns the PubidLiteral parsed or NULL.
+ */
+
+static xmlChar *
+htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
+ const xmlChar *q;
+ xmlChar *ret = NULL;
+ /*
+ * Name ::= (Letter | '_') (NameChar)*
+ */
+ if (CUR == '"') {
+ NEXT;
+ q = CUR_PTR;
+ while (IS_PUBIDCHAR_CH(CUR)) NEXT;
+ if (CUR != '"') {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
+ "Unfinished PubidLiteral\n", NULL, NULL);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else if (CUR == '\'') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_PUBIDCHAR_CH(CUR)) && (CUR != '\''))
+ NEXT;
+ if (CUR != '\'') {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
+ "Unfinished PubidLiteral\n", NULL, NULL);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else {
+ htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_STARTED,
+ "PubidLiteral \" or ' expected\n", NULL, NULL);
+ }
+
+ return(ret);
+}
+
+/**
+ * htmlParseScript:
+ * @ctxt: an HTML parser context
+ *
+ * parse the content of an HTML SCRIPT or STYLE element
+ * http://www.w3.org/TR/html4/sgml/dtd.html#Script
+ * http://www.w3.org/TR/html4/sgml/dtd.html#StyleSheet
+ * http://www.w3.org/TR/html4/types.html#type-script
+ * http://www.w3.org/TR/html4/types.html#h-6.15
+ * http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1
+ *
+ * Script data ( %Script; in the DTD) can be the content of the SCRIPT
+ * element and the value of intrinsic event attributes. User agents must
+ * not evaluate script data as HTML markup but instead must pass it on as
+ * data to a script engine.
+ * NOTES:
+ * - The content is passed like CDATA
+ * - the attributes for style and scripting "onXXX" are also described
+ * as CDATA but SGML allows entities references in attributes so their
+ * processing is identical as other attributes
+ */
+static void
+htmlParseScript(htmlParserCtxtPtr ctxt) {
+ xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
+ int nbchar = 0;
+ int cur,l;
+
+ SHRINK;
+ cur = CUR_CHAR(l);
+ while (IS_CHAR_CH(cur)) {
+ if ((cur == '<') && (NXT(1) == '/')) {
+ /*
+ * One should break here, the specification is clear:
+ * Authors should therefore escape "</" within the content.
+ * Escape mechanisms are specific to each scripting or
+ * style sheet language.
+ *
+ * In recovery mode, only break if end tag match the
+ * current tag, effectively ignoring all tags inside the
+ * script/style block and treating the entire block as
+ * CDATA.
+ */
+ if (ctxt->recovery) {
+ if (xmlStrncasecmp(ctxt->name, ctxt->input->cur+2,
+ xmlStrlen(ctxt->name)) == 0)
+ {
+ break; /* while */
+ } else {
+ htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Element %s embeds close tag\n",
+ ctxt->name, NULL);
+ }
+ } else {
+ if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
+ ((NXT(2) >= 'a') && (NXT(2) <= 'z')))
+ {
+ break; /* while */
+ }
+ }
+ }
+ COPY_BUF(l,buf,nbchar,cur);
+ if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
+ if (ctxt->sax->cdataBlock!= NULL) {
+ /*
+ * Insert as CDATA, which is the same as HTML_PRESERVE_NODE
+ */
+ ctxt->sax->cdataBlock(ctxt->userData, buf, nbchar);
+ } else if (ctxt->sax->characters != NULL) {
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ }
+ nbchar = 0;
+ }
+ GROW;
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ }
+
+ if ((!(IS_CHAR_CH(cur))) && (!((cur == 0) && (ctxt->progressive)))) {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Invalid char in CDATA 0x%X\n", cur);
+ if (ctxt->input->cur < ctxt->input->end) {
+ NEXT;
+ }
+ }
+
+ if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (ctxt->sax->cdataBlock!= NULL) {
+ /*
+ * Insert as CDATA, which is the same as HTML_PRESERVE_NODE
+ */
+ ctxt->sax->cdataBlock(ctxt->userData, buf, nbchar);
+ } else if (ctxt->sax->characters != NULL) {
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ }
+ }
+}
+
+
+/**
+ * htmlParseCharData:
+ * @ctxt: an HTML parser context
+ *
+ * parse a CharData section.
+ * if we are within a CDATA section ']]>' marks an end of section.
+ *
+ * [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
+ */
+
+static void
+htmlParseCharData(htmlParserCtxtPtr ctxt) {
+ xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
+ int nbchar = 0;
+ int cur, l;
+ int chunk = 0;
+
+ SHRINK;
+ cur = CUR_CHAR(l);
+ while (((cur != '<') || (ctxt->token == '<')) &&
+ ((cur != '&') || (ctxt->token == '&')) &&
+ (cur != 0)) {
+ if (!(IS_CHAR(cur))) {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Invalid char in CDATA 0x%X\n", cur);
+ } else {
+ COPY_BUF(l,buf,nbchar,cur);
+ }
+ if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
+ /*
+ * Ok the segment is to be consumed as chars.
+ */
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (areBlanks(ctxt, buf, nbchar)) {
+ if (ctxt->keepBlanks) {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ } else {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ buf, nbchar);
+ }
+ } else {
+ htmlCheckParagraph(ctxt);
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ }
+ }
+ nbchar = 0;
+ }
+ NEXTL(l);
+ chunk++;
+ if (chunk > HTML_PARSER_BUFFER_SIZE) {
+ chunk = 0;
+ SHRINK;
+ GROW;
+ }
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ }
+ }
+ if (nbchar != 0) {
+ buf[nbchar] = 0;
+
+ /*
+ * Ok the segment is to be consumed as chars.
+ */
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (areBlanks(ctxt, buf, nbchar)) {
+ if (ctxt->keepBlanks) {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ } else {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ buf, nbchar);
+ }
+ } else {
+ htmlCheckParagraph(ctxt);
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ }
+ }
+ } else {
+ /*
+ * Loop detection
+ */
+ if (cur == 0)
+ ctxt->instate = XML_PARSER_EOF;
+ }
+}
+
+/**
+ * htmlParseExternalID:
+ * @ctxt: an HTML parser context
+ * @publicID: a xmlChar** receiving PubidLiteral
+ *
+ * Parse an External ID or a Public ID
+ *
+ * [75] ExternalID ::= 'SYSTEM' S SystemLiteral
+ * | 'PUBLIC' S PubidLiteral S SystemLiteral
+ *
+ * [83] PublicID ::= 'PUBLIC' S PubidLiteral
+ *
+ * Returns the function returns SystemLiteral and in the second
+ * case publicID receives PubidLiteral, is strict is off
+ * it is possible to return NULL and have publicID set.
+ */
+
+static xmlChar *
+htmlParseExternalID(htmlParserCtxtPtr ctxt, xmlChar **publicID) {
+ xmlChar *URI = NULL;
+
+ if ((UPPER == 'S') && (UPP(1) == 'Y') &&
+ (UPP(2) == 'S') && (UPP(3) == 'T') &&
+ (UPP(4) == 'E') && (UPP(5) == 'M')) {
+ SKIP(6);
+ if (!IS_BLANK_CH(CUR)) {
+ htmlParseErr(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'SYSTEM'\n", NULL, NULL);
+ }
+ SKIP_BLANKS;
+ URI = htmlParseSystemLiteral(ctxt);
+ if (URI == NULL) {
+ htmlParseErr(ctxt, XML_ERR_URI_REQUIRED,
+ "htmlParseExternalID: SYSTEM, no URI\n", NULL, NULL);
+ }
+ } else if ((UPPER == 'P') && (UPP(1) == 'U') &&
+ (UPP(2) == 'B') && (UPP(3) == 'L') &&
+ (UPP(4) == 'I') && (UPP(5) == 'C')) {
+ SKIP(6);
+ if (!IS_BLANK_CH(CUR)) {
+ htmlParseErr(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'PUBLIC'\n", NULL, NULL);
+ }
+ SKIP_BLANKS;
+ *publicID = htmlParsePubidLiteral(ctxt);
+ if (*publicID == NULL) {
+ htmlParseErr(ctxt, XML_ERR_PUBID_REQUIRED,
+ "htmlParseExternalID: PUBLIC, no Public Identifier\n",
+ NULL, NULL);
+ }
+ SKIP_BLANKS;
+ if ((CUR == '"') || (CUR == '\'')) {
+ URI = htmlParseSystemLiteral(ctxt);
+ }
+ }
+ return(URI);
+}
+
+/**
+ * xmlParsePI:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML Processing Instruction.
+ *
+ * [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
+ */
+static void
+htmlParsePI(htmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = HTML_PARSER_BUFFER_SIZE;
+ int cur, l;
+ const xmlChar *target;
+ xmlParserInputState state;
+ int count = 0;
+
+ if ((RAW == '<') && (NXT(1) == '?')) {
+ state = ctxt->instate;
+ ctxt->instate = XML_PARSER_PI;
+ /*
+ * this is a Processing Instruction.
+ */
+ SKIP(2);
+ SHRINK;
+
+ /*
+ * Parse the target name and check for special support like
+ * namespace.
+ */
+ target = htmlParseName(ctxt);
+ if (target != NULL) {
+ if (RAW == '>') {
+ SKIP(1);
+
+ /*
+ * SAX: PI detected.
+ */
+ if ((ctxt->sax) && (!ctxt->disableSAX) &&
+ (ctxt->sax->processingInstruction != NULL))
+ ctxt->sax->processingInstruction(ctxt->userData,
+ target, NULL);
+ ctxt->instate = state;
+ return;
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ ctxt->instate = state;
+ return;
+ }
+ cur = CUR;
+ if (!IS_BLANK(cur)) {
+ htmlParseErr(ctxt, XML_ERR_SPACE_REQUIRED,
+ "ParsePI: PI %s space expected\n", target, NULL);
+ }
+ SKIP_BLANKS;
+ cur = CUR_CHAR(l);
+ while (IS_CHAR(cur) && (cur != '>')) {
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ xmlFree(buf);
+ ctxt->instate = state;
+ return;
+ }
+ buf = tmp;
+ }
+ count++;
+ if (count > 50) {
+ GROW;
+ count = 0;
+ }
+ COPY_BUF(l,buf,len,cur);
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ }
+ }
+ buf[len] = 0;
+ if (cur != '>') {
+ htmlParseErr(ctxt, XML_ERR_PI_NOT_FINISHED,
+ "ParsePI: PI %s never end ...\n", target, NULL);
+ } else {
+ SKIP(1);
+
+ /*
+ * SAX: PI detected.
+ */
+ if ((ctxt->sax) && (!ctxt->disableSAX) &&
+ (ctxt->sax->processingInstruction != NULL))
+ ctxt->sax->processingInstruction(ctxt->userData,
+ target, buf);
+ }
+ xmlFree(buf);
+ } else {
+ htmlParseErr(ctxt, XML_ERR_PI_NOT_STARTED,
+ "PI is not started correctly", NULL, NULL);
+ }
+ ctxt->instate = state;
+ }
+}
+
+/**
+ * htmlParseComment:
+ * @ctxt: an HTML parser context
+ *
+ * Parse an XML (SGML) comment <!-- .... -->
+ *
+ * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
+ */
+static void
+htmlParseComment(htmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len;
+ int size = HTML_PARSER_BUFFER_SIZE;
+ int q, ql;
+ int r, rl;
+ int cur, l;
+ xmlParserInputState state;
+
+ /*
+ * Check that there is a comment right here.
+ */
+ if ((RAW != '<') || (NXT(1) != '!') ||
+ (NXT(2) != '-') || (NXT(3) != '-')) return;
+
+ state = ctxt->instate;
+ ctxt->instate = XML_PARSER_COMMENT;
+ SHRINK;
+ SKIP(4);
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ htmlErrMemory(ctxt, "buffer allocation failed\n");
+ ctxt->instate = state;
+ return;
+ }
+ q = CUR_CHAR(ql);
+ NEXTL(ql);
+ r = CUR_CHAR(rl);
+ NEXTL(rl);
+ cur = CUR_CHAR(l);
+ len = 0;
+ while (IS_CHAR(cur) &&
+ ((cur != '>') ||
+ (r != '-') || (q != '-'))) {
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlFree(buf);
+ htmlErrMemory(ctxt, "growing buffer failed\n");
+ ctxt->instate = state;
+ return;
+ }
+ buf = tmp;
+ }
+ COPY_BUF(ql,buf,len,q);
+ q = r;
+ ql = rl;
+ r = cur;
+ rl = l;
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ }
+ }
+ buf[len] = 0;
+ if (!IS_CHAR(cur)) {
+ htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment not terminated \n<!--%.50s\n", buf, NULL);
+ xmlFree(buf);
+ } else {
+ NEXT;
+ if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->comment(ctxt->userData, buf);
+ xmlFree(buf);
+ }
+ ctxt->instate = state;
+}
+
+/**
+ * htmlParseCharRef:
+ * @ctxt: an HTML parser context
+ *
+ * parse Reference declarations
+ *
+ * [66] CharRef ::= '&#' [0-9]+ ';' |
+ * '&#x' [0-9a-fA-F]+ ';'
+ *
+ * Returns the value parsed (as an int)
+ */
+int
+htmlParseCharRef(htmlParserCtxtPtr ctxt) {
+ int val = 0;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseCharRef: context error\n",
+ NULL, NULL);
+ return(0);
+ }
+ if ((CUR == '&') && (NXT(1) == '#') &&
+ ((NXT(2) == 'x') || NXT(2) == 'X')) {
+ SKIP(3);
+ while (CUR != ';') {
+ if ((CUR >= '0') && (CUR <= '9'))
+ val = val * 16 + (CUR - '0');
+ else if ((CUR >= 'a') && (CUR <= 'f'))
+ val = val * 16 + (CUR - 'a') + 10;
+ else if ((CUR >= 'A') && (CUR <= 'F'))
+ val = val * 16 + (CUR - 'A') + 10;
+ else {
+ htmlParseErr(ctxt, XML_ERR_INVALID_HEX_CHARREF,
+ "htmlParseCharRef: missing semicolon\n",
+ NULL, NULL);
+ break;
+ }
+ NEXT;
+ }
+ if (CUR == ';')
+ NEXT;
+ } else if ((CUR == '&') && (NXT(1) == '#')) {
+ SKIP(2);
+ while (CUR != ';') {
+ if ((CUR >= '0') && (CUR <= '9'))
+ val = val * 10 + (CUR - '0');
+ else {
+ htmlParseErr(ctxt, XML_ERR_INVALID_DEC_CHARREF,
+ "htmlParseCharRef: missing semicolon\n",
+ NULL, NULL);
+ break;
+ }
+ NEXT;
+ }
+ if (CUR == ';')
+ NEXT;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_INVALID_CHARREF,
+ "htmlParseCharRef: invalid value\n", NULL, NULL);
+ }
+ /*
+ * Check the value IS_CHAR ...
+ */
+ if (IS_CHAR(val)) {
+ return(val);
+ } else {
+ htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
+ "htmlParseCharRef: invalid xmlChar value %d\n",
+ val);
+ }
+ return(0);
+}
+
+
+/**
+ * htmlParseDocTypeDecl:
+ * @ctxt: an HTML parser context
+ *
+ * parse a DOCTYPE declaration
+ *
+ * [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S?
+ * ('[' (markupdecl | PEReference | S)* ']' S?)? '>'
+ */
+
+static void
+htmlParseDocTypeDecl(htmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlChar *ExternalID = NULL;
+ xmlChar *URI = NULL;
+
+ /*
+ * We know that '<!DOCTYPE' has been detected.
+ */
+ SKIP(9);
+
+ SKIP_BLANKS;
+
+ /*
+ * Parse the DOCTYPE name.
+ */
+ name = htmlParseName(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "htmlParseDocTypeDecl : no DOCTYPE name !\n",
+ NULL, NULL);
+ }
+ /*
+ * Check that upper(name) == "HTML" !!!!!!!!!!!!!
+ */
+
+ SKIP_BLANKS;
+
+ /*
+ * Check for SystemID and ExternalID
+ */
+ URI = htmlParseExternalID(ctxt, &ExternalID);
+ SKIP_BLANKS;
+
+ /*
+ * We should be at the end of the DOCTYPE declaration.
+ */
+ if (CUR != '>') {
+ htmlParseErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED,
+ "DOCTYPE improperly terminated\n", NULL, NULL);
+ /* We shouldn't try to resynchronize ... */
+ }
+ NEXT;
+
+ /*
+ * Create or update the document accordingly to the DOCTYPE
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->internalSubset(ctxt->userData, name, ExternalID, URI);
+
+ /*
+ * Cleanup, since we don't use all those identifiers
+ */
+ if (URI != NULL) xmlFree(URI);
+ if (ExternalID != NULL) xmlFree(ExternalID);
+}
+
+/**
+ * htmlParseAttribute:
+ * @ctxt: an HTML parser context
+ * @value: a xmlChar ** used to store the value of the attribute
+ *
+ * parse an attribute
+ *
+ * [41] Attribute ::= Name Eq AttValue
+ *
+ * [25] Eq ::= S? '=' S?
+ *
+ * With namespace:
+ *
+ * [NS 11] Attribute ::= QName Eq AttValue
+ *
+ * Also the case QName == xmlns:??? is handled independently as a namespace
+ * definition.
+ *
+ * Returns the attribute name, and the value in *value.
+ */
+
+static const xmlChar *
+htmlParseAttribute(htmlParserCtxtPtr ctxt, xmlChar **value) {
+ const xmlChar *name;
+ xmlChar *val = NULL;
+
+ *value = NULL;
+ name = htmlParseHTMLName(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "error parsing attribute name\n", NULL, NULL);
+ return(NULL);
+ }
+
+ /*
+ * read the value
+ */
+ SKIP_BLANKS;
+ if (CUR == '=') {
+ NEXT;
+ SKIP_BLANKS;
+ val = htmlParseAttValue(ctxt);
+ }
+
+ *value = val;
+ return(name);
+}
+
+/**
+ * htmlCheckEncodingDirect:
+ * @ctxt: an HTML parser context
+ * @attvalue: the attribute value
+ *
+ * Checks an attribute value to detect
+ * the encoding
+ * If a new encoding is detected the parser is switched to decode
+ * it and pass UTF8
+ */
+static void
+htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
+
+ if ((ctxt == NULL) || (encoding == NULL) ||
+ (ctxt->options & HTML_PARSE_IGNORE_ENC))
+ return;
+
+ /* do not change encoding */
+ if (ctxt->input->encoding != NULL)
+ return;
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+ xmlCharEncodingHandlerPtr handler;
+
+ while ((*encoding == ' ') || (*encoding == '\t')) encoding++;
+
+ if (ctxt->input->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->input->encoding);
+ ctxt->input->encoding = xmlStrdup(encoding);
+
+ enc = xmlParseCharEncoding((const char *) encoding);
+ /*
+ * registered set of known encodings
+ */
+ if (enc != XML_CHAR_ENCODING_ERROR) {
+ if (((enc == XML_CHAR_ENCODING_UTF16LE) ||
+ (enc == XML_CHAR_ENCODING_UTF16BE) ||
+ (enc == XML_CHAR_ENCODING_UCS4LE) ||
+ (enc == XML_CHAR_ENCODING_UCS4BE)) &&
+ (ctxt->input->buf != NULL) &&
+ (ctxt->input->buf->encoder == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
+ "htmlCheckEncoding: wrong encoding meta\n",
+ NULL, NULL);
+ } else {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ } else {
+ /*
+ * fallback for unknown encodings
+ */
+ handler = xmlFindCharEncodingHandler((const char *) encoding);
+ if (handler != NULL) {
+ xmlSwitchToEncoding(ctxt, handler);
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "htmlCheckEncoding: unknown encoding %s\n",
+ encoding, NULL);
+ }
+ }
+
+ if ((ctxt->input->buf != NULL) &&
+ (ctxt->input->buf->encoder != NULL) &&
+ (ctxt->input->buf->raw != NULL) &&
+ (ctxt->input->buf->buffer != NULL)) {
+ int nbchars;
+ int processed;
+
+ /*
+ * convert as much as possible to the parser reading buffer.
+ */
+ processed = ctxt->input->cur - ctxt->input->base;
+ xmlBufShrink(ctxt->input->buf->buffer, processed);
+ nbchars = xmlCharEncInput(ctxt->input->buf, 1);
+ if (nbchars < 0) {
+ htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
+ "htmlCheckEncoding: encoder error\n",
+ NULL, NULL);
+ }
+ xmlBufResetInput(ctxt->input->buf->buffer, ctxt->input);
+ }
+ }
+}
+
+/**
+ * htmlCheckEncoding:
+ * @ctxt: an HTML parser context
+ * @attvalue: the attribute value
+ *
+ * Checks an http-equiv attribute from a Meta tag to detect
+ * the encoding
+ * If a new encoding is detected the parser is switched to decode
+ * it and pass UTF8
+ */
+static void
+htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
+ const xmlChar *encoding;
+
+ if (!attvalue)
+ return;
+
+ encoding = xmlStrcasestr(attvalue, BAD_CAST"charset");
+ if (encoding != NULL) {
+ encoding += 7;
+ }
+ /*
+ * skip blank
+ */
+ if (encoding && IS_BLANK_CH(*encoding))
+ encoding = xmlStrcasestr(attvalue, BAD_CAST"=");
+ if (encoding && *encoding == '=') {
+ encoding ++;
+ htmlCheckEncodingDirect(ctxt, encoding);
+ }
+}
+
+/**
+ * htmlCheckMeta:
+ * @ctxt: an HTML parser context
+ * @atts: the attributes values
+ *
+ * Checks an attributes from a Meta tag
+ */
+static void
+htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
+ int i;
+ const xmlChar *att, *value;
+ int http = 0;
+ const xmlChar *content = NULL;
+
+ if ((ctxt == NULL) || (atts == NULL))
+ return;
+
+ i = 0;
+ att = atts[i++];
+ while (att != NULL) {
+ value = atts[i++];
+ if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"http-equiv"))
+ && (!xmlStrcasecmp(value, BAD_CAST"Content-Type")))
+ http = 1;
+ else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"charset")))
+ htmlCheckEncodingDirect(ctxt, value);
+ else if ((value != NULL) && (!xmlStrcasecmp(att, BAD_CAST"content")))
+ content = value;
+ att = atts[i++];
+ }
+ if ((http) && (content != NULL))
+ htmlCheckEncoding(ctxt, content);
+
+}
+
+/**
+ * htmlParseStartTag:
+ * @ctxt: an HTML parser context
+ *
+ * parse a start of tag either for rule element or
+ * EmptyElement. In both case we don't parse the tag closing chars.
+ *
+ * [40] STag ::= '<' Name (S Attribute)* S? '>'
+ *
+ * [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
+ *
+ * With namespace:
+ *
+ * [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ *
+ * [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
+ *
+ * Returns 0 in case of success, -1 in case of error and 1 if discarded
+ */
+
+static int
+htmlParseStartTag(htmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ const xmlChar *attname;
+ xmlChar *attvalue;
+ const xmlChar **atts;
+ int nbatts = 0;
+ int maxatts;
+ int meta = 0;
+ int i;
+ int discardtag = 0;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseStartTag: context error\n", NULL, NULL);
+ return -1;
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ if (CUR != '<') return -1;
+ NEXT;
+
+ atts = ctxt->atts;
+ maxatts = ctxt->maxatts;
+
+ GROW;
+ name = htmlParseHTMLName(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "htmlParseStartTag: invalid element name\n",
+ NULL, NULL);
+ /* Dump the bogus tag like browsers do */
+ while ((IS_CHAR_CH(CUR)) && (CUR != '>') &&
+ (ctxt->instate != XML_PARSER_EOF))
+ NEXT;
+ return -1;
+ }
+ if (xmlStrEqual(name, BAD_CAST"meta"))
+ meta = 1;
+
+ /*
+ * Check for auto-closure of HTML elements.
+ */
+ htmlAutoClose(ctxt, name);
+
+ /*
+ * Check for implied HTML elements.
+ */
+ htmlCheckImplied(ctxt, name);
+
+ /*
+ * Avoid html at any level > 0, head at any level != 1
+ * or any attempt to recurse body
+ */
+ if ((ctxt->nameNr > 0) && (xmlStrEqual(name, BAD_CAST"html"))) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "htmlParseStartTag: misplaced <html> tag\n",
+ name, NULL);
+ discardtag = 1;
+ ctxt->depth++;
+ }
+ if ((ctxt->nameNr != 1) &&
+ (xmlStrEqual(name, BAD_CAST"head"))) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "htmlParseStartTag: misplaced <head> tag\n",
+ name, NULL);
+ discardtag = 1;
+ ctxt->depth++;
+ }
+ if (xmlStrEqual(name, BAD_CAST"body")) {
+ int indx;
+ for (indx = 0;indx < ctxt->nameNr;indx++) {
+ if (xmlStrEqual(ctxt->nameTab[indx], BAD_CAST"body")) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "htmlParseStartTag: misplaced <body> tag\n",
+ name, NULL);
+ discardtag = 1;
+ ctxt->depth++;
+ }
+ }
+ }
+
+ /*
+ * Now parse the attributes, it ends up with the ending
+ *
+ * (S Attribute)* S?
+ */
+ SKIP_BLANKS;
+ while ((IS_CHAR_CH(CUR)) &&
+ (CUR != '>') &&
+ ((CUR != '/') || (NXT(1) != '>'))) {
+ long cons = ctxt->nbChars;
+
+ GROW;
+ attname = htmlParseAttribute(ctxt, &attvalue);
+ if (attname != NULL) {
+
+ /*
+ * Well formedness requires at most one declaration of an attribute
+ */
+ for (i = 0; i < nbatts;i += 2) {
+ if (xmlStrEqual(atts[i], attname)) {
+ htmlParseErr(ctxt, XML_ERR_ATTRIBUTE_REDEFINED,
+ "Attribute %s redefined\n", attname, NULL);
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ }
+
+ /*
+ * Add the pair to atts
+ */
+ if (atts == NULL) {
+ maxatts = 22; /* allow for 10 attrs by default */
+ atts = (const xmlChar **)
+ xmlMalloc(maxatts * sizeof(xmlChar *));
+ if (atts == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ ctxt->atts = atts;
+ ctxt->maxatts = maxatts;
+ } else if (nbatts + 4 > maxatts) {
+ const xmlChar **n;
+
+ maxatts *= 2;
+ n = (const xmlChar **) xmlRealloc((void *) atts,
+ maxatts * sizeof(const xmlChar *));
+ if (n == NULL) {
+ htmlErrMemory(ctxt, NULL);
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ atts = n;
+ ctxt->atts = atts;
+ ctxt->maxatts = maxatts;
+ }
+ atts[nbatts++] = attname;
+ atts[nbatts++] = attvalue;
+ atts[nbatts] = NULL;
+ atts[nbatts + 1] = NULL;
+ }
+ else {
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ /* Dump the bogus attribute string up to the next blank or
+ * the end of the tag. */
+ while ((IS_CHAR_CH(CUR)) &&
+ !(IS_BLANK_CH(CUR)) && (CUR != '>') &&
+ ((CUR != '/') || (NXT(1) != '>')))
+ NEXT;
+ }
+
+failed:
+ SKIP_BLANKS;
+ if (cons == ctxt->nbChars) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseStartTag: problem parsing attributes\n",
+ NULL, NULL);
+ break;
+ }
+ }
+
+ /*
+ * Handle specific association to the META tag
+ */
+ if (meta && (nbatts != 0))
+ htmlCheckMeta(ctxt, atts);
+
+ /*
+ * SAX: Start of Element !
+ */
+ if (!discardtag) {
+ htmlnamePush(ctxt, name);
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL)) {
+ if (nbatts != 0)
+ ctxt->sax->startElement(ctxt->userData, name, atts);
+ else
+ ctxt->sax->startElement(ctxt->userData, name, NULL);
+ }
+ }
+
+ if (atts != NULL) {
+ for (i = 1;i < nbatts;i += 2) {
+ if (atts[i] != NULL)
+ xmlFree((xmlChar *) atts[i]);
+ }
+ }
+
+ return(discardtag);
+}
+
+/**
+ * htmlParseEndTag:
+ * @ctxt: an HTML parser context
+ *
+ * parse an end of tag
+ *
+ * [42] ETag ::= '</' Name S? '>'
+ *
+ * With namespace
+ *
+ * [NS 9] ETag ::= '</' QName S? '>'
+ *
+ * Returns 1 if the current level should be closed.
+ */
+
+static int
+htmlParseEndTag(htmlParserCtxtPtr ctxt)
+{
+ const xmlChar *name;
+ const xmlChar *oldname;
+ int i, ret;
+
+ if ((CUR != '<') || (NXT(1) != '/')) {
+ htmlParseErr(ctxt, XML_ERR_LTSLASH_REQUIRED,
+ "htmlParseEndTag: '</' not found\n", NULL, NULL);
+ return (0);
+ }
+ SKIP(2);
+
+ name = htmlParseHTMLName(ctxt);
+ if (name == NULL)
+ return (0);
+ /*
+ * We should definitely be at the ending "S? '>'" part
+ */
+ SKIP_BLANKS;
+ if ((!IS_CHAR_CH(CUR)) || (CUR != '>')) {
+ htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
+ "End tag : expected '>'\n", NULL, NULL);
+ if (ctxt->recovery) {
+ /*
+ * We're not at the ending > !!
+ * Error, unless in recover mode where we search forwards
+ * until we find a >
+ */
+ while (CUR != '\0' && CUR != '>') NEXT;
+ NEXT;
+ }
+ } else
+ NEXT;
+
+ /*
+ * if we ignored misplaced tags in htmlParseStartTag don't pop them
+ * out now.
+ */
+ if ((ctxt->depth > 0) &&
+ (xmlStrEqual(name, BAD_CAST "html") ||
+ xmlStrEqual(name, BAD_CAST "body") ||
+ xmlStrEqual(name, BAD_CAST "head"))) {
+ ctxt->depth--;
+ return (0);
+ }
+
+ /*
+ * If the name read is not one of the element in the parsing stack
+ * then return, it's just an error.
+ */
+ for (i = (ctxt->nameNr - 1); i >= 0; i--) {
+ if (xmlStrEqual(name, ctxt->nameTab[i]))
+ break;
+ }
+ if (i < 0) {
+ htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Unexpected end tag : %s\n", name, NULL);
+ return (0);
+ }
+
+
+ /*
+ * Check for auto-closure of HTML elements.
+ */
+
+ htmlAutoCloseOnClose(ctxt, name);
+
+ /*
+ * Well formedness constraints, opening and closing must match.
+ * With the exception that the autoclose may have popped stuff out
+ * of the stack.
+ */
+ if (!xmlStrEqual(name, ctxt->name)) {
+ if ((ctxt->name != NULL) && (!xmlStrEqual(ctxt->name, name))) {
+ htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Opening and ending tag mismatch: %s and %s\n",
+ name, ctxt->name);
+ }
+ }
+
+ /*
+ * SAX: End of Tag
+ */
+ oldname = ctxt->name;
+ if ((oldname != NULL) && (xmlStrEqual(oldname, name))) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlNodeInfoPop(ctxt);
+ htmlnamePop(ctxt);
+ ret = 1;
+ } else {
+ ret = 0;
+ }
+
+ return (ret);
+}
+
+
+/**
+ * htmlParseReference:
+ * @ctxt: an HTML parser context
+ *
+ * parse and handle entity references in content,
+ * this will end-up in a call to character() since this is either a
+ * CharRef, or a predefined entity.
+ */
+static void
+htmlParseReference(htmlParserCtxtPtr ctxt) {
+ const htmlEntityDesc * ent;
+ xmlChar out[6];
+ const xmlChar *name;
+ if (CUR != '&') return;
+
+ if (NXT(1) == '#') {
+ unsigned int c;
+ int bits, i = 0;
+
+ c = htmlParseCharRef(ctxt);
+ if (c == 0)
+ return;
+
+ if (c < 0x80) { out[i++]= c; bits= -6; }
+ else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else { out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ out[i++]= ((c >> bits) & 0x3F) | 0x80;
+ }
+ out[i] = 0;
+
+ htmlCheckParagraph(ctxt);
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, out, i);
+ } else {
+ ent = htmlParseEntityRef(ctxt, &name);
+ if (name == NULL) {
+ htmlCheckParagraph(ctxt);
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, BAD_CAST "&", 1);
+ return;
+ }
+ if ((ent == NULL) || !(ent->value > 0)) {
+ htmlCheckParagraph(ctxt);
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) {
+ ctxt->sax->characters(ctxt->userData, BAD_CAST "&", 1);
+ ctxt->sax->characters(ctxt->userData, name, xmlStrlen(name));
+ /* ctxt->sax->characters(ctxt->userData, BAD_CAST ";", 1); */
+ }
+ } else {
+ unsigned int c;
+ int bits, i = 0;
+
+ c = ent->value;
+ if (c < 0x80)
+ { out[i++]= c; bits= -6; }
+ else if (c < 0x800)
+ { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000)
+ { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else
+ { out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ out[i++]= ((c >> bits) & 0x3F) | 0x80;
+ }
+ out[i] = 0;
+
+ htmlCheckParagraph(ctxt);
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, out, i);
+ }
+ }
+}
+
+/**
+ * htmlParseContent:
+ * @ctxt: an HTML parser context
+ *
+ * Parse a content: comment, sub-element, reference or text.
+ * Kept for compatibility with old code
+ */
+
+static void
+htmlParseContent(htmlParserCtxtPtr ctxt) {
+ xmlChar *currentNode;
+ int depth;
+ const xmlChar *name;
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ while (1) {
+ long cons = ctxt->nbChars;
+
+ GROW;
+
+ if (ctxt->instate == XML_PARSER_EOF)
+ break;
+
+ /*
+ * Our tag or one of it's parent or children is ending.
+ */
+ if ((CUR == '<') && (NXT(1) == '/')) {
+ if (htmlParseEndTag(ctxt) &&
+ ((currentNode != NULL) || (ctxt->nameNr == 0))) {
+ if (currentNode != NULL)
+ xmlFree(currentNode);
+ return;
+ }
+ continue; /* while */
+ }
+
+ else if ((CUR == '<') &&
+ ((IS_ASCII_LETTER(NXT(1))) ||
+ (NXT(1) == '_') || (NXT(1) == ':'))) {
+ name = htmlParseHTMLName_nonInvasive(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "htmlParseStartTag: invalid element name\n",
+ NULL, NULL);
+ /* Dump the bogus tag like browsers do */
+ while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
+ NEXT;
+
+ if (currentNode != NULL)
+ xmlFree(currentNode);
+ return;
+ }
+
+ if (ctxt->name != NULL) {
+ if (htmlCheckAutoClose(name, ctxt->name) == 1) {
+ htmlAutoClose(ctxt, name);
+ continue;
+ }
+ }
+ }
+
+ /*
+ * Has this node been popped out during parsing of
+ * the next element
+ */
+ if ((ctxt->nameNr > 0) && (depth >= ctxt->nameNr) &&
+ (!xmlStrEqual(currentNode, ctxt->name)))
+ {
+ if (currentNode != NULL) xmlFree(currentNode);
+ return;
+ }
+
+ if ((CUR != 0) && ((xmlStrEqual(currentNode, BAD_CAST"script")) ||
+ (xmlStrEqual(currentNode, BAD_CAST"style")))) {
+ /*
+ * Handle SCRIPT/STYLE separately
+ */
+ htmlParseScript(ctxt);
+ } else {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((CUR == '<') && (NXT(1) == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ }
+
+ /*
+ * First case : a comment
+ */
+ if ((CUR == '<') && (NXT(1) == '!') &&
+ (NXT(2) == '-') && (NXT(3) == '-')) {
+ htmlParseComment(ctxt);
+ }
+
+ /*
+ * Second case : a Processing Instruction.
+ */
+ else if ((CUR == '<') && (NXT(1) == '?')) {
+ htmlParsePI(ctxt);
+ }
+
+ /*
+ * Third case : a sub-element.
+ */
+ else if (CUR == '<') {
+ htmlParseElement(ctxt);
+ }
+
+ /*
+ * Fourth case : a reference. If if has not been resolved,
+ * parsing returns it's Name, create the node
+ */
+ else if (CUR == '&') {
+ htmlParseReference(ctxt);
+ }
+
+ /*
+ * Fifth case : end of the resource
+ */
+ else if (CUR == 0) {
+ htmlAutoCloseOnEnd(ctxt);
+ break;
+ }
+
+ /*
+ * Last case, text. Note that References are handled directly.
+ */
+ else {
+ htmlParseCharData(ctxt);
+ }
+
+ if (cons == ctxt->nbChars) {
+ if (ctxt->node != NULL) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n",
+ NULL, NULL);
+ }
+ break;
+ }
+ }
+ GROW;
+ }
+ if (currentNode != NULL) xmlFree(currentNode);
+}
+
+/**
+ * htmlParseElement:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML element, this is highly recursive
+ * this is kept for compatibility with previous code versions
+ *
+ * [39] element ::= EmptyElemTag | STag content ETag
+ *
+ * [41] Attribute ::= Name Eq AttValue
+ */
+
+void
+htmlParseElement(htmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlChar *currentNode = NULL;
+ const htmlElemDesc * info;
+ htmlParserNodeInfo node_info;
+ int failed;
+ int depth;
+ const xmlChar *oldptr;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseElement: context error\n", NULL, NULL);
+ return;
+ }
+
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+
+ /* Capture start position */
+ if (ctxt->record_info) {
+ node_info.begin_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.begin_line = ctxt->input->line;
+ }
+
+ failed = htmlParseStartTag(ctxt);
+ name = ctxt->name;
+ if ((failed == -1) || (name == NULL)) {
+ if (CUR == '>')
+ NEXT;
+ return;
+ }
+
+ /*
+ * Lookup the info for that element.
+ */
+ info = htmlTagLookup(name);
+ if (info == NULL) {
+ htmlParseErr(ctxt, XML_HTML_UNKNOWN_TAG,
+ "Tag %s invalid\n", name, NULL);
+ }
+
+ /*
+ * Check for an Empty Element labeled the XML/SGML way
+ */
+ if ((CUR == '/') && (NXT(1) == '>')) {
+ SKIP(2);
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ return;
+ }
+
+ if (CUR == '>') {
+ NEXT;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
+ "Couldn't find end of Start Tag %s\n", name, NULL);
+
+ /*
+ * end of parsing of this node.
+ */
+ if (xmlStrEqual(name, ctxt->name)) {
+ nodePop(ctxt);
+ htmlnamePop(ctxt);
+ }
+
+ /*
+ * Capture end position and add node
+ */
+ if (ctxt->record_info) {
+ node_info.end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.end_line = ctxt->input->line;
+ node_info.node = ctxt->node;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+ return;
+ }
+
+ /*
+ * Check for an Empty Element from DTD definition
+ */
+ if ((info != NULL) && (info->empty)) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ return;
+ }
+
+ /*
+ * Parse the content of the element:
+ */
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ while (IS_CHAR_CH(CUR)) {
+ oldptr = ctxt->input->cur;
+ htmlParseContent(ctxt);
+ if (oldptr==ctxt->input->cur) break;
+ if (ctxt->nameNr < depth) break;
+ }
+
+ /*
+ * Capture end position and add node
+ */
+ if ( currentNode != NULL && ctxt->record_info ) {
+ node_info.end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.end_line = ctxt->input->line;
+ node_info.node = ctxt->node;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+ if (!IS_CHAR_CH(CUR)) {
+ htmlAutoCloseOnEnd(ctxt);
+ }
+
+ if (currentNode != NULL)
+ xmlFree(currentNode);
+}
+
+static void
+htmlParserFinishElementParsing(htmlParserCtxtPtr ctxt) {
+ /*
+ * Capture end position and add node
+ */
+ if ( ctxt->node != NULL && ctxt->record_info ) {
+ ctxt->nodeInfo->end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ ctxt->nodeInfo->end_line = ctxt->input->line;
+ ctxt->nodeInfo->node = ctxt->node;
+ xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
+ htmlNodeInfoPop(ctxt);
+ }
+ if (!IS_CHAR_CH(CUR)) {
+ htmlAutoCloseOnEnd(ctxt);
+ }
+}
+
+/**
+ * htmlParseElementInternal:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML element, new version, non recursive
+ *
+ * [39] element ::= EmptyElemTag | STag content ETag
+ *
+ * [41] Attribute ::= Name Eq AttValue
+ */
+
+static void
+htmlParseElementInternal(htmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ const htmlElemDesc * info;
+ htmlParserNodeInfo node_info = { 0, };
+ int failed;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseElementInternal: context error\n", NULL, NULL);
+ return;
+ }
+
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+
+ /* Capture start position */
+ if (ctxt->record_info) {
+ node_info.begin_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.begin_line = ctxt->input->line;
+ }
+
+ failed = htmlParseStartTag(ctxt);
+ name = ctxt->name;
+ if ((failed == -1) || (name == NULL)) {
+ if (CUR == '>')
+ NEXT;
+ return;
+ }
+
+ /*
+ * Lookup the info for that element.
+ */
+ info = htmlTagLookup(name);
+ if (info == NULL) {
+ htmlParseErr(ctxt, XML_HTML_UNKNOWN_TAG,
+ "Tag %s invalid\n", name, NULL);
+ }
+
+ /*
+ * Check for an Empty Element labeled the XML/SGML way
+ */
+ if ((CUR == '/') && (NXT(1) == '>')) {
+ SKIP(2);
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ return;
+ }
+
+ if (CUR == '>') {
+ NEXT;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
+ "Couldn't find end of Start Tag %s\n", name, NULL);
+
+ /*
+ * end of parsing of this node.
+ */
+ if (xmlStrEqual(name, ctxt->name)) {
+ nodePop(ctxt);
+ htmlnamePop(ctxt);
+ }
+
+ if (ctxt->record_info)
+ htmlNodeInfoPush(ctxt, &node_info);
+ htmlParserFinishElementParsing(ctxt);
+ return;
+ }
+
+ /*
+ * Check for an Empty Element from DTD definition
+ */
+ if ((info != NULL) && (info->empty)) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ return;
+ }
+
+ if (ctxt->record_info)
+ htmlNodeInfoPush(ctxt, &node_info);
+}
+
+/**
+ * htmlParseContentInternal:
+ * @ctxt: an HTML parser context
+ *
+ * Parse a content: comment, sub-element, reference or text.
+ * New version for non recursive htmlParseElementInternal
+ */
+
+static void
+htmlParseContentInternal(htmlParserCtxtPtr ctxt) {
+ xmlChar *currentNode;
+ int depth;
+ const xmlChar *name;
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ while (1) {
+ long cons = ctxt->nbChars;
+
+ GROW;
+
+ if (ctxt->instate == XML_PARSER_EOF)
+ break;
+
+ /*
+ * Our tag or one of it's parent or children is ending.
+ */
+ if ((CUR == '<') && (NXT(1) == '/')) {
+ if (htmlParseEndTag(ctxt) &&
+ ((currentNode != NULL) || (ctxt->nameNr == 0))) {
+ if (currentNode != NULL)
+ xmlFree(currentNode);
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ }
+ continue; /* while */
+ }
+
+ else if ((CUR == '<') &&
+ ((IS_ASCII_LETTER(NXT(1))) ||
+ (NXT(1) == '_') || (NXT(1) == ':'))) {
+ name = htmlParseHTMLName_nonInvasive(ctxt);
+ if (name == NULL) {
+ htmlParseErr(ctxt, XML_ERR_NAME_REQUIRED,
+ "htmlParseStartTag: invalid element name\n",
+ NULL, NULL);
+ /* Dump the bogus tag like browsers do */
+ while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
+ NEXT;
+
+ htmlParserFinishElementParsing(ctxt);
+ if (currentNode != NULL)
+ xmlFree(currentNode);
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ continue;
+ }
+
+ if (ctxt->name != NULL) {
+ if (htmlCheckAutoClose(name, ctxt->name) == 1) {
+ htmlAutoClose(ctxt, name);
+ continue;
+ }
+ }
+ }
+
+ /*
+ * Has this node been popped out during parsing of
+ * the next element
+ */
+ if ((ctxt->nameNr > 0) && (depth >= ctxt->nameNr) &&
+ (!xmlStrEqual(currentNode, ctxt->name)))
+ {
+ htmlParserFinishElementParsing(ctxt);
+ if (currentNode != NULL) xmlFree(currentNode);
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ continue;
+ }
+
+ if ((CUR != 0) && ((xmlStrEqual(currentNode, BAD_CAST"script")) ||
+ (xmlStrEqual(currentNode, BAD_CAST"style")))) {
+ /*
+ * Handle SCRIPT/STYLE separately
+ */
+ htmlParseScript(ctxt);
+ } else {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((CUR == '<') && (NXT(1) == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ }
+
+ /*
+ * First case : a comment
+ */
+ if ((CUR == '<') && (NXT(1) == '!') &&
+ (NXT(2) == '-') && (NXT(3) == '-')) {
+ htmlParseComment(ctxt);
+ }
+
+ /*
+ * Second case : a Processing Instruction.
+ */
+ else if ((CUR == '<') && (NXT(1) == '?')) {
+ htmlParsePI(ctxt);
+ }
+
+ /*
+ * Third case : a sub-element.
+ */
+ else if (CUR == '<') {
+ htmlParseElementInternal(ctxt);
+ if (currentNode != NULL) xmlFree(currentNode);
+
+ currentNode = xmlStrdup(ctxt->name);
+ depth = ctxt->nameNr;
+ }
+
+ /*
+ * Fourth case : a reference. If if has not been resolved,
+ * parsing returns it's Name, create the node
+ */
+ else if (CUR == '&') {
+ htmlParseReference(ctxt);
+ }
+
+ /*
+ * Fifth case : end of the resource
+ */
+ else if (CUR == 0) {
+ htmlAutoCloseOnEnd(ctxt);
+ break;
+ }
+
+ /*
+ * Last case, text. Note that References are handled directly.
+ */
+ else {
+ htmlParseCharData(ctxt);
+ }
+
+ if (cons == ctxt->nbChars) {
+ if (ctxt->node != NULL) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n",
+ NULL, NULL);
+ }
+ break;
+ }
+ }
+ GROW;
+ }
+ if (currentNode != NULL) xmlFree(currentNode);
+}
+
+/**
+ * htmlParseContent:
+ * @ctxt: an HTML parser context
+ *
+ * Parse a content: comment, sub-element, reference or text.
+ * This is the entry point when called from parser.c
+ */
+
+void
+__htmlParseContent(void *ctxt) {
+ if (ctxt != NULL)
+ htmlParseContentInternal((htmlParserCtxtPtr) ctxt);
+}
+
+/**
+ * htmlParseDocument:
+ * @ctxt: an HTML parser context
+ *
+ * parse an HTML document (and build a tree if using the standard SAX
+ * interface).
+ *
+ * Returns 0, -1 in case of error. the parser context is augmented
+ * as a result of the parsing.
+ */
+
+int
+htmlParseDocument(htmlParserCtxtPtr ctxt) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+ xmlDtdPtr dtd;
+
+ xmlInitParser();
+
+ htmlDefaultSAXHandlerInit();
+
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseDocument: context error\n", NULL, NULL);
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ ctxt->html = 1;
+ ctxt->linenumbers = 1;
+ GROW;
+ /*
+ * SAX: beginning of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
+
+ if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
+ ((ctxt->input->end - ctxt->input->cur) >= 4)) {
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(&start[0], 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+ /*
+ * Wipe out everything which is before the first '<'
+ */
+ SKIP_BLANKS;
+ if (CUR == 0) {
+ htmlParseErr(ctxt, XML_ERR_DOCUMENT_EMPTY,
+ "Document is empty\n", NULL, NULL);
+ }
+
+ if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+
+
+ /*
+ * Parse possible comments and PIs before any content
+ */
+ while (((CUR == '<') && (NXT(1) == '!') &&
+ (NXT(2) == '-') && (NXT(3) == '-')) ||
+ ((CUR == '<') && (NXT(1) == '?'))) {
+ htmlParseComment(ctxt);
+ htmlParsePI(ctxt);
+ SKIP_BLANKS;
+ }
+
+
+ /*
+ * Then possibly doc type declaration(s) and more Misc
+ * (doctypedecl Misc*)?
+ */
+ if ((CUR == '<') && (NXT(1) == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ htmlParseDocTypeDecl(ctxt);
+ }
+ SKIP_BLANKS;
+
+ /*
+ * Parse possible comments and PIs before any content
+ */
+ while (((CUR == '<') && (NXT(1) == '!') &&
+ (NXT(2) == '-') && (NXT(3) == '-')) ||
+ ((CUR == '<') && (NXT(1) == '?'))) {
+ htmlParseComment(ctxt);
+ htmlParsePI(ctxt);
+ SKIP_BLANKS;
+ }
+
+ /*
+ * Time to start parsing the tree itself
+ */
+ htmlParseContentInternal(ctxt);
+
+ /*
+ * autoclose
+ */
+ if (CUR == 0)
+ htmlAutoCloseOnEnd(ctxt);
+
+
+ /*
+ * SAX: end of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+
+ if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL)) {
+ dtd = xmlGetIntSubset(ctxt->myDoc);
+ if (dtd == NULL)
+ ctxt->myDoc->intSubset =
+ xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html",
+ BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN",
+ BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd");
+ }
+ if (! ctxt->wellFormed) return(-1);
+ return(0);
+}
+
+
+/************************************************************************
+ * *
+ * Parser contexts handling *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlInitParserCtxt:
+ * @ctxt: an HTML parser context
+ *
+ * Initialize a parser context
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+
+static int
+htmlInitParserCtxt(htmlParserCtxtPtr ctxt)
+{
+ htmlSAXHandler *sax;
+
+ if (ctxt == NULL) return(-1);
+ memset(ctxt, 0, sizeof(htmlParserCtxt));
+
+ ctxt->dict = xmlDictCreate();
+ if (ctxt->dict == NULL) {
+ htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
+ return(-1);
+ }
+ sax = (htmlSAXHandler *) xmlMalloc(sizeof(htmlSAXHandler));
+ if (sax == NULL) {
+ htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
+ return(-1);
+ }
+ else
+ memset(sax, 0, sizeof(htmlSAXHandler));
+
+ /* Allocate the Input stack */
+ ctxt->inputTab = (htmlParserInputPtr *)
+ xmlMalloc(5 * sizeof(htmlParserInputPtr));
+ if (ctxt->inputTab == NULL) {
+ htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ return(-1);
+ }
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 5;
+ ctxt->input = NULL;
+ ctxt->version = NULL;
+ ctxt->encoding = NULL;
+ ctxt->standalone = -1;
+ ctxt->instate = XML_PARSER_START;
+
+ /* Allocate the Node stack */
+ ctxt->nodeTab = (htmlNodePtr *) xmlMalloc(10 * sizeof(htmlNodePtr));
+ if (ctxt->nodeTab == NULL) {
+ htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 0;
+ ctxt->node = NULL;
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ return(-1);
+ }
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 10;
+ ctxt->node = NULL;
+
+ /* Allocate the Name stack */
+ ctxt->nameTab = (const xmlChar **) xmlMalloc(10 * sizeof(xmlChar *));
+ if (ctxt->nameTab == NULL) {
+ htmlErrMemory(NULL, "htmlInitParserCtxt: out of memory\n");
+ ctxt->nameNr = 0;
+ ctxt->nameMax = 0;
+ ctxt->name = NULL;
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 0;
+ ctxt->node = NULL;
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ return(-1);
+ }
+ ctxt->nameNr = 0;
+ ctxt->nameMax = 10;
+ ctxt->name = NULL;
+
+ ctxt->nodeInfoTab = NULL;
+ ctxt->nodeInfoNr = 0;
+ ctxt->nodeInfoMax = 0;
+
+ if (sax == NULL) ctxt->sax = (xmlSAXHandlerPtr) &htmlDefaultSAXHandler;
+ else {
+ ctxt->sax = sax;
+ memcpy(sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
+ }
+ ctxt->userData = ctxt;
+ ctxt->myDoc = NULL;
+ ctxt->wellFormed = 1;
+ ctxt->replaceEntities = 0;
+ ctxt->linenumbers = xmlLineNumbersDefaultValue;
+ ctxt->html = 1;
+ ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_0;
+ ctxt->vctxt.userData = ctxt;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ ctxt->record_info = 0;
+ ctxt->validate = 0;
+ ctxt->nbChars = 0;
+ ctxt->checkIndex = 0;
+ ctxt->catalogs = NULL;
+ xmlInitNodeInfoSeq(&ctxt->node_seq);
+ return(0);
+}
+
+/**
+ * htmlFreeParserCtxt:
+ * @ctxt: an HTML parser context
+ *
+ * Free all the memory used by a parser context. However the parsed
+ * document in ctxt->myDoc is not freed.
+ */
+
+void
+htmlFreeParserCtxt(htmlParserCtxtPtr ctxt)
+{
+ xmlFreeParserCtxt(ctxt);
+}
+
+/**
+ * htmlNewParserCtxt:
+ *
+ * Allocate and initialize a new parser context.
+ *
+ * Returns the htmlParserCtxtPtr or NULL in case of allocation error
+ */
+
+htmlParserCtxtPtr
+htmlNewParserCtxt(void)
+{
+ xmlParserCtxtPtr ctxt;
+
+ ctxt = (xmlParserCtxtPtr) xmlMalloc(sizeof(xmlParserCtxt));
+ if (ctxt == NULL) {
+ htmlErrMemory(NULL, "NewParserCtxt: out of memory\n");
+ return(NULL);
+ }
+ memset(ctxt, 0, sizeof(xmlParserCtxt));
+ if (htmlInitParserCtxt(ctxt) < 0) {
+ htmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ return(ctxt);
+}
+
+/**
+ * htmlCreateMemoryParserCtxt:
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ *
+ * Create a parser context for an HTML in-memory document.
+ *
+ * Returns the new parser context or NULL
+ */
+htmlParserCtxtPtr
+htmlCreateMemoryParserCtxt(const char *buffer, int size) {
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr input;
+ xmlParserInputBufferPtr buf;
+
+ if (buffer == NULL)
+ return(NULL);
+ if (size <= 0)
+ return(NULL);
+
+ ctxt = htmlNewParserCtxt();
+ if (ctxt == NULL)
+ return(NULL);
+
+ buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) return(NULL);
+
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ input->filename = NULL;
+ input->buf = buf;
+ xmlBufResetInput(buf->buffer, input);
+
+ inputPush(ctxt, input);
+ return(ctxt);
+}
+
+/**
+ * htmlCreateDocParserCtxt:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ *
+ * Create a parser context for an HTML document.
+ *
+ * TODO: check the need to add encoding handling there
+ *
+ * Returns the new parser context or NULL
+ */
+static htmlParserCtxtPtr
+htmlCreateDocParserCtxt(const xmlChar *cur, const char *encoding) {
+ int len;
+ htmlParserCtxtPtr ctxt;
+
+ if (cur == NULL)
+ return(NULL);
+ len = xmlStrlen(cur);
+ ctxt = htmlCreateMemoryParserCtxt((char *)cur, len);
+ if (ctxt == NULL)
+ return(NULL);
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+ xmlCharEncodingHandlerPtr handler;
+
+ if (ctxt->input->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->input->encoding);
+ ctxt->input->encoding = xmlStrdup((const xmlChar *) encoding);
+
+ enc = xmlParseCharEncoding(encoding);
+ /*
+ * registered set of known encodings
+ */
+ if (enc != XML_CHAR_ENCODING_ERROR) {
+ xmlSwitchEncoding(ctxt, enc);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "Unsupported encoding %s\n",
+ (const xmlChar *) encoding, NULL);
+ }
+ } else {
+ /*
+ * fallback for unknown encodings
+ */
+ handler = xmlFindCharEncodingHandler((const char *) encoding);
+ if (handler != NULL) {
+ xmlSwitchToEncoding(ctxt, handler);
+ } else {
+ htmlParseErr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "Unsupported encoding %s\n",
+ (const xmlChar *) encoding, NULL);
+ }
+ }
+ }
+ return(ctxt);
+}
+
+#ifdef LIBXML_PUSH_ENABLED
+/************************************************************************
+ * *
+ * Progressive parsing interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlParseLookupSequence:
+ * @ctxt: an HTML parser context
+ * @first: the first char to lookup
+ * @next: the next char to lookup or zero
+ * @third: the next char to lookup or zero
+ * @comment: flag to force checking inside comments
+ *
+ * Try to find if a sequence (first, next, third) or just (first next) or
+ * (first) is available in the input stream.
+ * This function has a side effect of (possibly) incrementing ctxt->checkIndex
+ * to avoid rescanning sequences of bytes, it DOES change the state of the
+ * parser, do not use liberally.
+ * This is basically similar to xmlParseLookupSequence()
+ *
+ * Returns the index to the current parsing point if the full sequence
+ * is available, -1 otherwise.
+ */
+static int
+htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
+ xmlChar next, xmlChar third, int iscomment,
+ int ignoreattrval)
+{
+ int base, len;
+ htmlParserInputPtr in;
+ const xmlChar *buf;
+ int incomment = 0;
+ int invalue = 0;
+ char valdellim = 0x0;
+
+ in = ctxt->input;
+ if (in == NULL)
+ return (-1);
+
+ base = in->cur - in->base;
+ if (base < 0)
+ return (-1);
+
+ if (ctxt->checkIndex > base)
+ base = ctxt->checkIndex;
+
+ if (in->buf == NULL) {
+ buf = in->base;
+ len = in->length;
+ } else {
+ buf = xmlBufContent(in->buf->buffer);
+ len = xmlBufUse(in->buf->buffer);
+ }
+
+ /* take into account the sequence length */
+ if (third)
+ len -= 2;
+ else if (next)
+ len--;
+ for (; base < len; base++) {
+ if ((!incomment) && (base + 4 < len) && (!iscomment)) {
+ if ((buf[base] == '<') && (buf[base + 1] == '!') &&
+ (buf[base + 2] == '-') && (buf[base + 3] == '-')) {
+ incomment = 1;
+ /* do not increment past <! - some people use <!--> */
+ base += 2;
+ }
+ }
+ if (ignoreattrval) {
+ if (buf[base] == '"' || buf[base] == '\'') {
+ if (invalue) {
+ if (buf[base] == valdellim) {
+ invalue = 0;
+ continue;
+ }
+ } else {
+ valdellim = buf[base];
+ invalue = 1;
+ continue;
+ }
+ } else if (invalue) {
+ continue;
+ }
+ }
+ if (incomment) {
+ if (base + 3 > len)
+ return (-1);
+ if ((buf[base] == '-') && (buf[base + 1] == '-') &&
+ (buf[base + 2] == '>')) {
+ incomment = 0;
+ base += 2;
+ }
+ continue;
+ }
+ if (buf[base] == first) {
+ if (third != 0) {
+ if ((buf[base + 1] != next) || (buf[base + 2] != third))
+ continue;
+ } else if (next != 0) {
+ if (buf[base + 1] != next)
+ continue;
+ }
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ if (next == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c' found at %d\n",
+ first, base);
+ else if (third == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c%c' found at %d\n",
+ first, next, base);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c%c%c' found at %d\n",
+ first, next, third, base);
+#endif
+ return (base - (in->cur - in->base));
+ }
+ }
+ if ((!incomment) && (!invalue))
+ ctxt->checkIndex = base;
+#ifdef DEBUG_PUSH
+ if (next == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c' failed\n", first);
+ else if (third == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c%c' failed\n", first, next);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: lookup '%c%c%c' failed\n", first, next,
+ third);
+#endif
+ return (-1);
+}
+
+/**
+ * htmlParseLookupChars:
+ * @ctxt: an HTML parser context
+ * @stop: Array of chars, which stop the lookup.
+ * @stopLen: Length of stop-Array
+ *
+ * Try to find if any char of the stop-Array is available in the input
+ * stream.
+ * This function has a side effect of (possibly) incrementing ctxt->checkIndex
+ * to avoid rescanning sequences of bytes, it DOES change the state of the
+ * parser, do not use liberally.
+ *
+ * Returns the index to the current parsing point if a stopChar
+ * is available, -1 otherwise.
+ */
+static int
+htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop,
+ int stopLen)
+{
+ int base, len;
+ htmlParserInputPtr in;
+ const xmlChar *buf;
+ int incomment = 0;
+ int i;
+
+ in = ctxt->input;
+ if (in == NULL)
+ return (-1);
+
+ base = in->cur - in->base;
+ if (base < 0)
+ return (-1);
+
+ if (ctxt->checkIndex > base)
+ base = ctxt->checkIndex;
+
+ if (in->buf == NULL) {
+ buf = in->base;
+ len = in->length;
+ } else {
+ buf = xmlBufContent(in->buf->buffer);
+ len = xmlBufUse(in->buf->buffer);
+ }
+
+ for (; base < len; base++) {
+ if (!incomment && (base + 4 < len)) {
+ if ((buf[base] == '<') && (buf[base + 1] == '!') &&
+ (buf[base + 2] == '-') && (buf[base + 3] == '-')) {
+ incomment = 1;
+ /* do not increment past <! - some people use <!--> */
+ base += 2;
+ }
+ }
+ if (incomment) {
+ if (base + 3 > len)
+ return (-1);
+ if ((buf[base] == '-') && (buf[base + 1] == '-') &&
+ (buf[base + 2] == '>')) {
+ incomment = 0;
+ base += 2;
+ }
+ continue;
+ }
+ for (i = 0; i < stopLen; ++i) {
+ if (buf[base] == stop[i]) {
+ ctxt->checkIndex = 0;
+ return (base - (in->cur - in->base));
+ }
+ }
+ }
+ ctxt->checkIndex = base;
+ return (-1);
+}
+
+/**
+ * htmlParseTryOrFinish:
+ * @ctxt: an HTML parser context
+ * @terminate: last chunk indicator
+ *
+ * Try to progress on parsing
+ *
+ * Returns zero if no parsing was possible
+ */
+static int
+htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
+ int ret = 0;
+ htmlParserInputPtr in;
+ int avail = 0;
+ xmlChar cur, next;
+
+ htmlParserNodeInfo node_info;
+
+#ifdef DEBUG_PUSH
+ switch (ctxt->instate) {
+ case XML_PARSER_EOF:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try EOF\n"); break;
+ case XML_PARSER_START:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try START\n"); break;
+ case XML_PARSER_MISC:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try MISC\n");break;
+ case XML_PARSER_COMMENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try COMMENT\n");break;
+ case XML_PARSER_PROLOG:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try PROLOG\n");break;
+ case XML_PARSER_START_TAG:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try START_TAG\n");break;
+ case XML_PARSER_CONTENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try CONTENT\n");break;
+ case XML_PARSER_CDATA_SECTION:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try CDATA_SECTION\n");break;
+ case XML_PARSER_END_TAG:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try END_TAG\n");break;
+ case XML_PARSER_ENTITY_DECL:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try ENTITY_DECL\n");break;
+ case XML_PARSER_ENTITY_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try ENTITY_VALUE\n");break;
+ case XML_PARSER_ATTRIBUTE_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try ATTRIBUTE_VALUE\n");break;
+ case XML_PARSER_DTD:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try DTD\n");break;
+ case XML_PARSER_EPILOG:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try EPILOG\n");break;
+ case XML_PARSER_PI:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try PI\n");break;
+ case XML_PARSER_SYSTEM_LITERAL:
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: try SYSTEM_LITERAL\n");break;
+ }
+#endif
+
+ while (1) {
+
+ in = ctxt->input;
+ if (in == NULL) break;
+ if (in->buf == NULL)
+ avail = in->length - (in->cur - in->base);
+ else
+ avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
+ if ((avail == 0) && (terminate)) {
+ htmlAutoCloseOnEnd(ctxt);
+ if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) {
+ /*
+ * SAX: end of the document processing.
+ */
+ ctxt->instate = XML_PARSER_EOF;
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ }
+ }
+ if (avail < 1)
+ goto done;
+ cur = in->cur[0];
+ if (cur == 0) {
+ SKIP(1);
+ continue;
+ }
+
+ switch (ctxt->instate) {
+ case XML_PARSER_EOF:
+ /*
+ * Document parsing is done !
+ */
+ goto done;
+ case XML_PARSER_START:
+ /*
+ * Very first chars read from the document flow.
+ */
+ cur = in->cur[0];
+ if (IS_BLANK_CH(cur)) {
+ SKIP_BLANKS;
+ if (in->buf == NULL)
+ avail = in->length - (in->cur - in->base);
+ else
+ avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
+ }
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData,
+ &xmlDefaultSAXLocator);
+ if ((ctxt->sax) && (ctxt->sax->startDocument) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+
+ cur = in->cur[0];
+ next = in->cur[1];
+ if ((cur == '<') && (next == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing internal subset\n");
+#endif
+ htmlParseDocTypeDecl(ctxt);
+ ctxt->instate = XML_PARSER_PROLOG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering PROLOG\n");
+#endif
+ } else {
+ ctxt->instate = XML_PARSER_MISC;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering MISC\n");
+#endif
+ }
+ break;
+ case XML_PARSER_MISC:
+ SKIP_BLANKS;
+ if (in->buf == NULL)
+ avail = in->length - (in->cur - in->base);
+ else
+ avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
+ /*
+ * no chars in buffer
+ */
+ if (avail < 1)
+ goto done;
+ /*
+ * not enouth chars in buffer
+ */
+ if (avail < 2) {
+ if (!terminate)
+ goto done;
+ else
+ next = ' ';
+ } else {
+ next = in->cur[1];
+ }
+ cur = in->cur[0];
+ if ((cur == '<') && (next == '!') &&
+ (in->cur[2] == '-') && (in->cur[3] == '-')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Comment\n");
+#endif
+ htmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_MISC;
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing PI\n");
+#endif
+ htmlParsePI(ctxt);
+ ctxt->instate = XML_PARSER_MISC;
+ } else if ((cur == '<') && (next == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing internal subset\n");
+#endif
+ htmlParseDocTypeDecl(ctxt);
+ ctxt->instate = XML_PARSER_PROLOG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering PROLOG\n");
+#endif
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 9)) {
+ goto done;
+ } else {
+ ctxt->instate = XML_PARSER_START_TAG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering START_TAG\n");
+#endif
+ }
+ break;
+ case XML_PARSER_PROLOG:
+ SKIP_BLANKS;
+ if (in->buf == NULL)
+ avail = in->length - (in->cur - in->base);
+ else
+ avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
+ if (avail < 2)
+ goto done;
+ cur = in->cur[0];
+ next = in->cur[1];
+ if ((cur == '<') && (next == '!') &&
+ (in->cur[2] == '-') && (in->cur[3] == '-')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Comment\n");
+#endif
+ htmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_PROLOG;
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing PI\n");
+#endif
+ htmlParsePI(ctxt);
+ ctxt->instate = XML_PARSER_PROLOG;
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 4)) {
+ goto done;
+ } else {
+ ctxt->instate = XML_PARSER_START_TAG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering START_TAG\n");
+#endif
+ }
+ break;
+ case XML_PARSER_EPILOG:
+ if (in->buf == NULL)
+ avail = in->length - (in->cur - in->base);
+ else
+ avail = xmlBufUse(in->buf->buffer) - (in->cur - in->base);
+ if (avail < 1)
+ goto done;
+ cur = in->cur[0];
+ if (IS_BLANK_CH(cur)) {
+ htmlParseCharData(ctxt);
+ goto done;
+ }
+ if (avail < 2)
+ goto done;
+ next = in->cur[1];
+ if ((cur == '<') && (next == '!') &&
+ (in->cur[2] == '-') && (in->cur[3] == '-')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Comment\n");
+#endif
+ htmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing PI\n");
+#endif
+ htmlParsePI(ctxt);
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 4)) {
+ goto done;
+ } else {
+ ctxt->errNo = XML_ERR_DOCUMENT_END;
+ ctxt->wellFormed = 0;
+ ctxt->instate = XML_PARSER_EOF;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering EOF\n");
+#endif
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ goto done;
+ }
+ break;
+ case XML_PARSER_START_TAG: {
+ const xmlChar *name;
+ int failed;
+ const htmlElemDesc * info;
+
+ /*
+ * no chars in buffer
+ */
+ if (avail < 1)
+ goto done;
+ /*
+ * not enouth chars in buffer
+ */
+ if (avail < 2) {
+ if (!terminate)
+ goto done;
+ else
+ next = ' ';
+ } else {
+ next = in->cur[1];
+ }
+ cur = in->cur[0];
+ if (cur != '<') {
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ }
+ if (next == '/') {
+ ctxt->instate = XML_PARSER_END_TAG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering END_TAG\n");
+#endif
+ break;
+ }
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+
+ /* Capture start position */
+ if (ctxt->record_info) {
+ node_info.begin_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.begin_line = ctxt->input->line;
+ }
+
+
+ failed = htmlParseStartTag(ctxt);
+ name = ctxt->name;
+ if ((failed == -1) ||
+ (name == NULL)) {
+ if (CUR == '>')
+ NEXT;
+ break;
+ }
+
+ /*
+ * Lookup the info for that element.
+ */
+ info = htmlTagLookup(name);
+ if (info == NULL) {
+ htmlParseErr(ctxt, XML_HTML_UNKNOWN_TAG,
+ "Tag %s invalid\n", name, NULL);
+ }
+
+ /*
+ * Check for an Empty Element labeled the XML/SGML way
+ */
+ if ((CUR == '/') && (NXT(1) == '>')) {
+ SKIP(2);
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ }
+
+ if (CUR == '>') {
+ NEXT;
+ } else {
+ htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
+ "Couldn't find end of Start Tag %s\n",
+ name, NULL);
+
+ /*
+ * end of parsing of this node.
+ */
+ if (xmlStrEqual(name, ctxt->name)) {
+ nodePop(ctxt);
+ htmlnamePop(ctxt);
+ }
+
+ if (ctxt->record_info)
+ htmlNodeInfoPush(ctxt, &node_info);
+
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ }
+
+ /*
+ * Check for an Empty Element from DTD definition
+ */
+ if ((info != NULL) && (info->empty)) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL))
+ ctxt->sax->endElement(ctxt->userData, name);
+ htmlnamePop(ctxt);
+ }
+
+ if (ctxt->record_info)
+ htmlNodeInfoPush(ctxt, &node_info);
+
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ }
+ case XML_PARSER_CONTENT: {
+ long cons;
+ /*
+ * Handle preparsed entities and charRef
+ */
+ if (ctxt->token != 0) {
+ xmlChar chr[2] = { 0 , 0 } ;
+
+ chr[0] = (xmlChar) ctxt->token;
+ htmlCheckParagraph(ctxt);
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
+ ctxt->sax->characters(ctxt->userData, chr, 1);
+ ctxt->token = 0;
+ ctxt->checkIndex = 0;
+ }
+ if ((avail == 1) && (terminate)) {
+ cur = in->cur[0];
+ if ((cur != '<') && (cur != '&')) {
+ if (ctxt->sax != NULL) {
+ if (IS_BLANK_CH(cur)) {
+ if (ctxt->keepBlanks) {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(
+ ctxt->userData, &cur, 1);
+ } else {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(
+ ctxt->userData, &cur, 1);
+ }
+ } else {
+ htmlCheckParagraph(ctxt);
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(
+ ctxt->userData, &cur, 1);
+ }
+ }
+ ctxt->token = 0;
+ ctxt->checkIndex = 0;
+ in->cur++;
+ break;
+ }
+ }
+ if (avail < 2)
+ goto done;
+ cur = in->cur[0];
+ next = in->cur[1];
+ cons = ctxt->nbChars;
+ if ((xmlStrEqual(ctxt->name, BAD_CAST"script")) ||
+ (xmlStrEqual(ctxt->name, BAD_CAST"style"))) {
+ /*
+ * Handle SCRIPT/STYLE separately
+ */
+ if (!terminate) {
+ int idx;
+ xmlChar val;
+
+ idx = htmlParseLookupSequence(ctxt, '<', '/', 0, 0, 0);
+ if (idx < 0)
+ goto done;
+ val = in->cur[idx + 2];
+ if (val == 0) /* bad cut of input */
+ goto done;
+ }
+ htmlParseScript(ctxt);
+ if ((cur == '<') && (next == '/')) {
+ ctxt->instate = XML_PARSER_END_TAG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering END_TAG\n");
+#endif
+ break;
+ }
+ } else {
+ /*
+ * Sometimes DOCTYPE arrives in the middle of the document
+ */
+ if ((cur == '<') && (next == '!') &&
+ (UPP(2) == 'D') && (UPP(3) == 'O') &&
+ (UPP(4) == 'C') && (UPP(5) == 'T') &&
+ (UPP(6) == 'Y') && (UPP(7) == 'P') &&
+ (UPP(8) == 'E')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+ htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
+ "Misplaced DOCTYPE declaration\n",
+ BAD_CAST "DOCTYPE" , NULL);
+ htmlParseDocTypeDecl(ctxt);
+ } else if ((cur == '<') && (next == '!') &&
+ (in->cur[2] == '-') && (in->cur[3] == '-')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(
+ ctxt, '-', '-', '>', 1, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Comment\n");
+#endif
+ htmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing PI\n");
+#endif
+ htmlParsePI(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ } else if ((cur == '<') && (next == '!') && (avail < 4)) {
+ goto done;
+ } else if ((cur == '<') && (next == '/')) {
+ ctxt->instate = XML_PARSER_END_TAG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering END_TAG\n");
+#endif
+ break;
+ } else if (cur == '<') {
+ ctxt->instate = XML_PARSER_START_TAG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering START_TAG\n");
+#endif
+ break;
+ } else if (cur == '&') {
+ if ((!terminate) &&
+ (htmlParseLookupChars(ctxt,
+ BAD_CAST "; >/", 4) < 0))
+ goto done;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing Reference\n");
+#endif
+ /* TODO: check generation of subtrees if noent !!! */
+ htmlParseReference(ctxt);
+ } else {
+ /*
+ * check that the text sequence is complete
+ * before handing out the data to the parser
+ * to avoid problems with erroneous end of
+ * data detection.
+ */
+ if ((!terminate) &&
+ (htmlParseLookupChars(ctxt, BAD_CAST "<&", 2) < 0))
+ goto done;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: Parsing char data\n");
+#endif
+ htmlParseCharData(ctxt);
+ }
+ }
+ if (cons == ctxt->nbChars) {
+ if (ctxt->node != NULL) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n",
+ NULL, NULL);
+ }
+ NEXT;
+ break;
+ }
+
+ break;
+ }
+ case XML_PARSER_END_TAG:
+ if (avail < 2)
+ goto done;
+ if ((!terminate) &&
+ (htmlParseLookupSequence(ctxt, '>', 0, 0, 0, 1) < 0))
+ goto done;
+ htmlParseEndTag(ctxt);
+ if (ctxt->nameNr == 0) {
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else {
+ ctxt->instate = XML_PARSER_CONTENT;
+ }
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_CDATA_SECTION:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == CDATA\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_DTD:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == DTD\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_COMMENT:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == COMMENT\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_PI:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == PI\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_ENTITY_DECL:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == ENTITY_DECL\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_ENTITY_VALUE:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == ENTITY_VALUE\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering DTD\n");
+#endif
+ break;
+ case XML_PARSER_ATTRIBUTE_VALUE:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == ATTRIBUTE_VALUE\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_START_TAG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering START_TAG\n");
+#endif
+ break;
+ case XML_PARSER_SYSTEM_LITERAL:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == XML_PARSER_SYSTEM_LITERAL\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_IGNORE:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == XML_PARSER_IGNORE\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_PUBLIC_LITERAL:
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "HPP: internal error, state == XML_PARSER_LITERAL\n",
+ NULL, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "HPP: entering CONTENT\n");
+#endif
+ break;
+
+ }
+ }
+done:
+ if ((avail == 0) && (terminate)) {
+ htmlAutoCloseOnEnd(ctxt);
+ if ((ctxt->nameNr == 0) && (ctxt->instate != XML_PARSER_EOF)) {
+ /*
+ * SAX: end of the document processing.
+ */
+ ctxt->instate = XML_PARSER_EOF;
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ }
+ }
+ if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL) &&
+ ((terminate) || (ctxt->instate == XML_PARSER_EOF) ||
+ (ctxt->instate == XML_PARSER_EPILOG))) {
+ xmlDtdPtr dtd;
+ dtd = xmlGetIntSubset(ctxt->myDoc);
+ if (dtd == NULL)
+ ctxt->myDoc->intSubset =
+ xmlCreateIntSubset(ctxt->myDoc, BAD_CAST "html",
+ BAD_CAST "-//W3C//DTD HTML 4.0 Transitional//EN",
+ BAD_CAST "http://www.w3.org/TR/REC-html40/loose.dtd");
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "HPP: done %d\n", ret);
+#endif
+ return(ret);
+}
+
+/**
+ * htmlParseChunk:
+ * @ctxt: an HTML parser context
+ * @chunk: an char array
+ * @size: the size in byte of the chunk
+ * @terminate: last chunk indicator
+ *
+ * Parse a Chunk of memory
+ *
+ * Returns zero if no error, the xmlParserErrors otherwise.
+ */
+int
+htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
+ int terminate) {
+ if ((ctxt == NULL) || (ctxt->input == NULL)) {
+ htmlParseErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "htmlParseChunk: context error\n", NULL, NULL);
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
+ size_t cur = ctxt->input->cur - ctxt->input->base;
+ int res;
+
+ res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+ if (res < 0) {
+ ctxt->errNo = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return (XML_PARSER_EOF);
+ }
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
+#endif
+
+#if 0
+ if ((terminate) || (ctxt->input->buf->buffer->use > 80))
+ htmlParseTryOrFinish(ctxt, terminate);
+#endif
+ } else if (ctxt->instate != XML_PARSER_EOF) {
+ if ((ctxt->input != NULL) && ctxt->input->buf != NULL) {
+ xmlParserInputBufferPtr in = ctxt->input->buf;
+ if ((in->encoder != NULL) && (in->buffer != NULL) &&
+ (in->raw != NULL)) {
+ int nbchars;
+ size_t base = xmlBufGetInputBase(in->buffer, ctxt->input);
+ size_t current = ctxt->input->cur - ctxt->input->base;
+
+ nbchars = xmlCharEncInput(in, terminate);
+ if (nbchars < 0) {
+ htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
+ "encoder error\n", NULL, NULL);
+ return(XML_ERR_INVALID_ENCODING);
+ }
+ xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current);
+ }
+ }
+ }
+ htmlParseTryOrFinish(ctxt, terminate);
+ if (terminate) {
+ if ((ctxt->instate != XML_PARSER_EOF) &&
+ (ctxt->instate != XML_PARSER_EPILOG) &&
+ (ctxt->instate != XML_PARSER_MISC)) {
+ ctxt->errNo = XML_ERR_DOCUMENT_END;
+ ctxt->wellFormed = 0;
+ }
+ if (ctxt->instate != XML_PARSER_EOF) {
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ }
+ ctxt->instate = XML_PARSER_EOF;
+ }
+ return((xmlParserErrors) ctxt->errNo);
+}
+
+/************************************************************************
+ * *
+ * User entry points *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlCreatePushParserCtxt:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @chunk: a pointer to an array of chars
+ * @size: number of chars in the array
+ * @filename: an optional file name or URI
+ * @enc: an optional encoding
+ *
+ * Create a parser context for using the HTML parser in push mode
+ * The value of @filename is used for fetching external entities
+ * and error/warning reports.
+ *
+ * Returns the new parser context or NULL
+ */
+htmlParserCtxtPtr
+htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
+ const char *chunk, int size, const char *filename,
+ xmlCharEncoding enc) {
+ htmlParserCtxtPtr ctxt;
+ htmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+
+ xmlInitParser();
+
+ buf = xmlAllocParserInputBuffer(enc);
+ if (buf == NULL) return(NULL);
+
+ ctxt = htmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return(NULL);
+ }
+ if(enc==XML_CHAR_ENCODING_UTF8 || buf->encoder)
+ ctxt->charset=XML_CHAR_ENCODING_UTF8;
+ if (sax != NULL) {
+ if (ctxt->sax != (xmlSAXHandlerPtr) &htmlDefaultSAXHandler)
+ xmlFree(ctxt->sax);
+ ctxt->sax = (htmlSAXHandlerPtr) xmlMalloc(sizeof(htmlSAXHandler));
+ if (ctxt->sax == NULL) {
+ xmlFree(buf);
+ xmlFree(ctxt);
+ return(NULL);
+ }
+ memcpy(ctxt->sax, sax, sizeof(htmlSAXHandler));
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ }
+ if (filename == NULL) {
+ ctxt->directory = NULL;
+ } else {
+ ctxt->directory = xmlParserGetDirectory(filename);
+ }
+
+ inputStream = htmlNewInputStream(ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ xmlFree(buf);
+ return(NULL);
+ }
+
+ if (filename == NULL)
+ inputStream->filename = NULL;
+ else
+ inputStream->filename = (char *)
+ xmlCanonicPath((const xmlChar *) filename);
+ inputStream->buf = buf;
+ xmlBufResetInput(buf->buffer, inputStream);
+
+ inputPush(ctxt, inputStream);
+
+ if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
+ size_t cur = ctxt->input->cur - ctxt->input->base;
+
+ xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
+#endif
+ }
+ ctxt->progressive = 1;
+
+ return(ctxt);
+}
+#endif /* LIBXML_PUSH_ENABLED */
+
+/**
+ * htmlSAXParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks
+ * to handle parse events. If sax is NULL, fallback to the default DOM
+ * behavior and return a tree.
+ *
+ * Returns the resulting document tree unless SAX is NULL or the document is
+ * not well formed.
+ */
+
+htmlDocPtr
+htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) {
+ htmlDocPtr ret;
+ htmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+
+ if (cur == NULL) return(NULL);
+
+
+ ctxt = htmlCreateDocParserCtxt(cur, encoding);
+ if (ctxt == NULL) return(NULL);
+ if (sax != NULL) {
+ if (ctxt->sax != NULL) xmlFree (ctxt->sax);
+ ctxt->sax = sax;
+ ctxt->userData = userData;
+ }
+
+ htmlParseDocument(ctxt);
+ ret = ctxt->myDoc;
+ if (sax != NULL) {
+ ctxt->sax = NULL;
+ ctxt->userData = NULL;
+ }
+ htmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * htmlParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ *
+ * parse an HTML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+
+htmlDocPtr
+htmlParseDoc(xmlChar *cur, const char *encoding) {
+ return(htmlSAXParseDoc(cur, encoding, NULL, NULL));
+}
+
+
+/**
+ * htmlCreateFileParserCtxt:
+ * @filename: the filename
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ *
+ * Create a parser context for a file content.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+htmlParserCtxtPtr
+htmlCreateFileParserCtxt(const char *filename, const char *encoding)
+{
+ htmlParserCtxtPtr ctxt;
+ htmlParserInputPtr inputStream;
+ char *canonicFilename;
+ /* htmlCharEncoding enc; */
+ xmlChar *content, *content_line = (xmlChar *) "charset=";
+
+ if (filename == NULL)
+ return(NULL);
+
+ ctxt = htmlNewParserCtxt();
+ if (ctxt == NULL) {
+ return(NULL);
+ }
+ canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename);
+ if (canonicFilename == NULL) {
+#ifdef LIBXML_SAX1_ENABLED
+ if (xmlDefaultSAXHandler.error != NULL) {
+ xmlDefaultSAXHandler.error(NULL, "out of memory\n");
+ }
+#endif
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputStream = xmlLoadExternalEntity(canonicFilename, NULL, ctxt);
+ xmlFree(canonicFilename);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputPush(ctxt, inputStream);
+
+ /* set encoding */
+ if (encoding) {
+ size_t l = strlen(encoding);
+
+ if (l < 1000) {
+ content = xmlMallocAtomic (xmlStrlen(content_line) + l + 1);
+ if (content) {
+ strcpy ((char *)content, (char *)content_line);
+ strcat ((char *)content, (char *)encoding);
+ htmlCheckEncoding (ctxt, content);
+ xmlFree (content);
+ }
+ }
+ }
+
+ return(ctxt);
+}
+
+/**
+ * htmlSAXParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ * @sax: the SAX handler block
+ * @userData: if using SAX, this pointer will be provided on callbacks.
+ *
+ * parse an HTML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree unless SAX is NULL or the document is
+ * not well formed.
+ */
+
+htmlDocPtr
+htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax,
+ void *userData) {
+ htmlDocPtr ret;
+ htmlParserCtxtPtr ctxt;
+ htmlSAXHandlerPtr oldsax = NULL;
+
+ xmlInitParser();
+
+ ctxt = htmlCreateFileParserCtxt(filename, encoding);
+ if (ctxt == NULL) return(NULL);
+ if (sax != NULL) {
+ oldsax = ctxt->sax;
+ ctxt->sax = sax;
+ ctxt->userData = userData;
+ }
+
+ htmlParseDocument(ctxt);
+
+ ret = ctxt->myDoc;
+ if (sax != NULL) {
+ ctxt->sax = oldsax;
+ ctxt->userData = NULL;
+ }
+ htmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * htmlParseFile:
+ * @filename: the filename
+ * @encoding: a free form C string describing the HTML document encoding, or NULL
+ *
+ * parse an HTML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ *
+ * Returns the resulting document tree
+ */
+
+htmlDocPtr
+htmlParseFile(const char *filename, const char *encoding) {
+ return(htmlSAXParseFile(filename, encoding, NULL, NULL));
+}
+
+/**
+ * htmlHandleOmittedElem:
+ * @val: int 0 or 1
+ *
+ * Set and return the previous value for handling HTML omitted tags.
+ *
+ * Returns the last value for 0 for no handling, 1 for auto insertion.
+ */
+
+int
+htmlHandleOmittedElem(int val) {
+ int old = htmlOmittedDefaultValue;
+
+ htmlOmittedDefaultValue = val;
+ return(old);
+}
+
+/**
+ * htmlElementAllowedHere:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element may be a direct child of a parent element.
+ * Note - doesn't check for deprecated elements
+ *
+ * Returns 1 if allowed; 0 otherwise.
+ */
+int
+htmlElementAllowedHere(const htmlElemDesc* parent, const xmlChar* elt) {
+ const char** p ;
+
+ if ( ! elt || ! parent || ! parent->subelts )
+ return 0 ;
+
+ for ( p = parent->subelts; *p; ++p )
+ if ( !xmlStrcmp((const xmlChar *)*p, elt) )
+ return 1 ;
+
+ return 0 ;
+}
+/**
+ * htmlElementStatusHere:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element may be a direct child of a parent element.
+ * and if so whether it is valid or deprecated.
+ *
+ * Returns one of HTML_VALID, HTML_DEPRECATED, HTML_INVALID
+ */
+htmlStatus
+htmlElementStatusHere(const htmlElemDesc* parent, const htmlElemDesc* elt) {
+ if ( ! parent || ! elt )
+ return HTML_INVALID ;
+ if ( ! htmlElementAllowedHere(parent, (const xmlChar*) elt->name ) )
+ return HTML_INVALID ;
+
+ return ( elt->dtd == 0 ) ? HTML_VALID : HTML_DEPRECATED ;
+}
+/**
+ * htmlAttrAllowed:
+ * @elt: HTML element
+ * @attr: HTML attribute
+ * @legacy: whether to allow deprecated attributes
+ *
+ * Checks whether an attribute is valid for an element
+ * Has full knowledge of Required and Deprecated attributes
+ *
+ * Returns one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, HTML_INVALID
+ */
+htmlStatus
+htmlAttrAllowed(const htmlElemDesc* elt, const xmlChar* attr, int legacy) {
+ const char** p ;
+
+ if ( !elt || ! attr )
+ return HTML_INVALID ;
+
+ if ( elt->attrs_req )
+ for ( p = elt->attrs_req; *p; ++p)
+ if ( !xmlStrcmp((const xmlChar*)*p, attr) )
+ return HTML_REQUIRED ;
+
+ if ( elt->attrs_opt )
+ for ( p = elt->attrs_opt; *p; ++p)
+ if ( !xmlStrcmp((const xmlChar*)*p, attr) )
+ return HTML_VALID ;
+
+ if ( legacy && elt->attrs_depr )
+ for ( p = elt->attrs_depr; *p; ++p)
+ if ( !xmlStrcmp((const xmlChar*)*p, attr) )
+ return HTML_DEPRECATED ;
+
+ return HTML_INVALID ;
+}
+/**
+ * htmlNodeStatus:
+ * @node: an htmlNodePtr in a tree
+ * @legacy: whether to allow deprecated elements (YES is faster here
+ * for Element nodes)
+ *
+ * Checks whether the tree node is valid. Experimental (the author
+ * only uses the HTML enhancements in a SAX parser)
+ *
+ * Return: for Element nodes, a return from htmlElementAllowedHere (if
+ * legacy allowed) or htmlElementStatusHere (otherwise).
+ * for Attribute nodes, a return from htmlAttrAllowed
+ * for other nodes, HTML_NA (no checks performed)
+ */
+htmlStatus
+htmlNodeStatus(const htmlNodePtr node, int legacy) {
+ if ( ! node )
+ return HTML_INVALID ;
+
+ switch ( node->type ) {
+ case XML_ELEMENT_NODE:
+ return legacy
+ ? ( htmlElementAllowedHere (
+ htmlTagLookup(node->parent->name) , node->name
+ ) ? HTML_VALID : HTML_INVALID )
+ : htmlElementStatusHere(
+ htmlTagLookup(node->parent->name) ,
+ htmlTagLookup(node->name) )
+ ;
+ case XML_ATTRIBUTE_NODE:
+ return htmlAttrAllowed(
+ htmlTagLookup(node->parent->name) , node->name, legacy) ;
+ default: return HTML_NA ;
+ }
+}
+/************************************************************************
+ * *
+ * New set (2.6.0) of simpler and more flexible APIs *
+ * *
+ ************************************************************************/
+/**
+ * DICT_FREE:
+ * @str: a string
+ *
+ * Free a string if it is not owned by the "dict" dictionnary in the
+ * current scope
+ */
+#define DICT_FREE(str) \
+ if ((str) && ((!dict) || \
+ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
+ xmlFree((char *)(str));
+
+/**
+ * htmlCtxtReset:
+ * @ctxt: an HTML parser context
+ *
+ * Reset a parser context
+ */
+void
+htmlCtxtReset(htmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr input;
+ xmlDictPtr dict;
+
+ if (ctxt == NULL)
+ return;
+
+ xmlInitParser();
+ dict = ctxt->dict;
+
+ while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
+ xmlFreeInputStream(input);
+ }
+ ctxt->inputNr = 0;
+ ctxt->input = NULL;
+
+ ctxt->spaceNr = 0;
+ if (ctxt->spaceTab != NULL) {
+ ctxt->spaceTab[0] = -1;
+ ctxt->space = &ctxt->spaceTab[0];
+ } else {
+ ctxt->space = NULL;
+ }
+
+
+ ctxt->nodeNr = 0;
+ ctxt->node = NULL;
+
+ ctxt->nameNr = 0;
+ ctxt->name = NULL;
+
+ DICT_FREE(ctxt->version);
+ ctxt->version = NULL;
+ DICT_FREE(ctxt->encoding);
+ ctxt->encoding = NULL;
+ DICT_FREE(ctxt->directory);
+ ctxt->directory = NULL;
+ DICT_FREE(ctxt->extSubURI);
+ ctxt->extSubURI = NULL;
+ DICT_FREE(ctxt->extSubSystem);
+ ctxt->extSubSystem = NULL;
+ if (ctxt->myDoc != NULL)
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+
+ ctxt->standalone = -1;
+ ctxt->hasExternalSubset = 0;
+ ctxt->hasPErefs = 0;
+ ctxt->html = 1;
+ ctxt->external = 0;
+ ctxt->instate = XML_PARSER_START;
+ ctxt->token = 0;
+
+ ctxt->wellFormed = 1;
+ ctxt->nsWellFormed = 1;
+ ctxt->disableSAX = 0;
+ ctxt->valid = 1;
+ ctxt->vctxt.userData = ctxt;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ ctxt->record_info = 0;
+ ctxt->nbChars = 0;
+ ctxt->checkIndex = 0;
+ ctxt->inSubset = 0;
+ ctxt->errNo = XML_ERR_OK;
+ ctxt->depth = 0;
+ ctxt->charset = XML_CHAR_ENCODING_NONE;
+ ctxt->catalogs = NULL;
+ xmlInitNodeInfoSeq(&ctxt->node_seq);
+
+ if (ctxt->attsDefault != NULL) {
+ xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
+ ctxt->attsDefault = NULL;
+ }
+ if (ctxt->attsSpecial != NULL) {
+ xmlHashFree(ctxt->attsSpecial, NULL);
+ ctxt->attsSpecial = NULL;
+ }
+}
+
+/**
+ * htmlCtxtUseOptions:
+ * @ctxt: an HTML parser context
+ * @options: a combination of htmlParserOption(s)
+ *
+ * Applies the options to the parser context
+ *
+ * Returns 0 in case of success, the set of unknown or unimplemented options
+ * in case of error.
+ */
+int
+htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
+{
+ if (ctxt == NULL)
+ return(-1);
+
+ if (options & HTML_PARSE_NOWARNING) {
+ ctxt->sax->warning = NULL;
+ ctxt->vctxt.warning = NULL;
+ options -= XML_PARSE_NOWARNING;
+ ctxt->options |= XML_PARSE_NOWARNING;
+ }
+ if (options & HTML_PARSE_NOERROR) {
+ ctxt->sax->error = NULL;
+ ctxt->vctxt.error = NULL;
+ ctxt->sax->fatalError = NULL;
+ options -= XML_PARSE_NOERROR;
+ ctxt->options |= XML_PARSE_NOERROR;
+ }
+ if (options & HTML_PARSE_PEDANTIC) {
+ ctxt->pedantic = 1;
+ options -= XML_PARSE_PEDANTIC;
+ ctxt->options |= XML_PARSE_PEDANTIC;
+ } else
+ ctxt->pedantic = 0;
+ if (options & XML_PARSE_NOBLANKS) {
+ ctxt->keepBlanks = 0;
+ ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ options -= XML_PARSE_NOBLANKS;
+ ctxt->options |= XML_PARSE_NOBLANKS;
+ } else
+ ctxt->keepBlanks = 1;
+ if (options & HTML_PARSE_RECOVER) {
+ ctxt->recovery = 1;
+ options -= HTML_PARSE_RECOVER;
+ } else
+ ctxt->recovery = 0;
+ if (options & HTML_PARSE_COMPACT) {
+ ctxt->options |= HTML_PARSE_COMPACT;
+ options -= HTML_PARSE_COMPACT;
+ }
+ if (options & XML_PARSE_HUGE) {
+ ctxt->options |= XML_PARSE_HUGE;
+ options -= XML_PARSE_HUGE;
+ }
+ if (options & HTML_PARSE_NODEFDTD) {
+ ctxt->options |= HTML_PARSE_NODEFDTD;
+ options -= HTML_PARSE_NODEFDTD;
+ }
+ if (options & HTML_PARSE_IGNORE_ENC) {
+ ctxt->options |= HTML_PARSE_IGNORE_ENC;
+ options -= HTML_PARSE_IGNORE_ENC;
+ }
+ if (options & HTML_PARSE_NOIMPLIED) {
+ ctxt->options |= HTML_PARSE_NOIMPLIED;
+ options -= HTML_PARSE_NOIMPLIED;
+ }
+ ctxt->dictNames = 0;
+ return (options);
+}
+
+/**
+ * htmlDoRead:
+ * @ctxt: an HTML parser context
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ * @reuse: keep the context for reuse
+ *
+ * Common front-end for the htmlRead functions
+ *
+ * Returns the resulting document tree or NULL
+ */
+static htmlDocPtr
+htmlDoRead(htmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
+ int options, int reuse)
+{
+ htmlDocPtr ret;
+
+ htmlCtxtUseOptions(ctxt, options);
+ ctxt->html = 1;
+ if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr hdlr;
+
+ hdlr = xmlFindCharEncodingHandler(encoding);
+ if (hdlr != NULL) {
+ xmlSwitchToEncoding(ctxt, hdlr);
+ if (ctxt->input->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->input->encoding);
+ ctxt->input->encoding = xmlStrdup((xmlChar *)encoding);
+ }
+ }
+ if ((URL != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->filename == NULL))
+ ctxt->input->filename = (char *) xmlStrdup((const xmlChar *) URL);
+ htmlParseDocument(ctxt);
+ ret = ctxt->myDoc;
+ ctxt->myDoc = NULL;
+ if (!reuse) {
+ if ((ctxt->dictNames) &&
+ (ret != NULL) &&
+ (ret->dict == ctxt->dict))
+ ctxt->dict = NULL;
+ xmlFreeParserCtxt(ctxt);
+ }
+ return (ret);
+}
+
+/**
+ * htmlReadDoc:
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)
+{
+ htmlParserCtxtPtr ctxt;
+
+ if (cur == NULL)
+ return (NULL);
+
+ xmlInitParser();
+ ctxt = htmlCreateDocParserCtxt(cur, NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ return (htmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * htmlReadFile:
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML file from the filesystem or the network.
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlReadFile(const char *filename, const char *encoding, int options)
+{
+ htmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+ ctxt = htmlCreateFileParserCtxt(filename, encoding);
+ if (ctxt == NULL)
+ return (NULL);
+ return (htmlDoRead(ctxt, NULL, NULL, options, 0));
+}
+
+/**
+ * htmlReadMemory:
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
+{
+ htmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+ ctxt = xmlCreateMemoryParserCtxt(buffer, size);
+ if (ctxt == NULL)
+ return (NULL);
+ htmlDefaultSAXHandlerInit();
+ if (ctxt->sax != NULL)
+ memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
+ return (htmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * htmlReadFd:
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML from a file descriptor and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlReadFd(int fd, const char *URL, const char *encoding, int options)
+{
+ htmlParserCtxtPtr ctxt;
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (fd < 0)
+ return (NULL);
+ xmlInitParser();
+
+ xmlInitParser();
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (NULL);
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ xmlFreeParserCtxt(ctxt);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * htmlReadIO:
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an HTML document from I/O functions and source and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
+ void *ioctx, const char *URL, const char *encoding, int options)
+{
+ htmlParserCtxtPtr ctxt;
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ioread == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+ ctxt = htmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ xmlFreeParserCtxt(ctxt);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * htmlCtxtReadDoc:
+ * @ctxt: an HTML parser context
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML in-memory document and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputPtr stream;
+
+ if (cur == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ htmlCtxtReset(ctxt);
+
+ stream = xmlNewStringInputStream(ctxt, cur);
+ if (stream == NULL) {
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * htmlCtxtReadFile:
+ * @ctxt: an HTML parser context
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML file from the filesystem or the network.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,
+ const char *encoding, int options)
+{
+ xmlParserInputPtr stream;
+
+ if (filename == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ htmlCtxtReset(ctxt);
+
+ stream = xmlLoadExternalEntity(filename, NULL, ctxt);
+ if (stream == NULL) {
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, NULL, encoding, options, 1));
+}
+
+/**
+ * htmlCtxtReadMemory:
+ * @ctxt: an HTML parser context
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML in-memory document and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ctxt == NULL)
+ return (NULL);
+ if (buffer == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ htmlCtxtReset(ctxt);
+
+ input = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ return(NULL);
+ }
+
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return(NULL);
+ }
+
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * htmlCtxtReadFd:
+ * @ctxt: an HTML parser context
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an XML from a file descriptor and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (fd < 0)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ htmlCtxtReset(ctxt);
+
+
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (NULL);
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * htmlCtxtReadIO:
+ * @ctxt: an HTML parser context
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of htmlParserOption(s)
+ *
+ * parse an HTML document from I/O functions and source and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+htmlDocPtr
+htmlCtxtReadIO(htmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose, void *ioctx,
+ const char *URL,
+ const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ioread == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ htmlCtxtReset(ctxt);
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (htmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+#define bottom_HTMLparser
+#include "elfgcchack.h"
+#endif /* LIBXML_HTML_ENABLED */
diff --git a/HTMLtree.c b/HTMLtree.c
new file mode 100644
index 0000000..5c57fc5
--- /dev/null
+++ b/HTMLtree.c
@@ -0,0 +1,1280 @@
+/*
+ * HTMLtree.c : implementation of access function for an HTML tree.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_HTML_ENABLED
+
+#include <string.h> /* for memset() only ! */
+
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/entities.h>
+#include <libxml/valid.h>
+#include <libxml/xmlerror.h>
+#include <libxml/parserInternals.h>
+#include <libxml/globals.h>
+#include <libxml/uri.h>
+
+#include "buf.h"
+
+/************************************************************************
+ * *
+ * Getting/Setting encoding meta tags *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlGetMetaEncoding:
+ * @doc: the document
+ *
+ * Encoding definition lookup in the Meta tags
+ *
+ * Returns the current encoding as flagged in the HTML source
+ */
+const xmlChar *
+htmlGetMetaEncoding(htmlDocPtr doc) {
+ htmlNodePtr cur;
+ const xmlChar *content;
+ const xmlChar *encoding;
+
+ if (doc == NULL)
+ return(NULL);
+ cur = doc->children;
+
+ /*
+ * Search the html
+ */
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrEqual(cur->name, BAD_CAST"html"))
+ break;
+ if (xmlStrEqual(cur->name, BAD_CAST"head"))
+ goto found_head;
+ if (xmlStrEqual(cur->name, BAD_CAST"meta"))
+ goto found_meta;
+ }
+ cur = cur->next;
+ }
+ if (cur == NULL)
+ return(NULL);
+ cur = cur->children;
+
+ /*
+ * Search the head
+ */
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrEqual(cur->name, BAD_CAST"head"))
+ break;
+ if (xmlStrEqual(cur->name, BAD_CAST"meta"))
+ goto found_meta;
+ }
+ cur = cur->next;
+ }
+ if (cur == NULL)
+ return(NULL);
+found_head:
+ cur = cur->children;
+
+ /*
+ * Search the meta elements
+ */
+found_meta:
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrEqual(cur->name, BAD_CAST"meta")) {
+ xmlAttrPtr attr = cur->properties;
+ int http;
+ const xmlChar *value;
+
+ content = NULL;
+ http = 0;
+ while (attr != NULL) {
+ if ((attr->children != NULL) &&
+ (attr->children->type == XML_TEXT_NODE) &&
+ (attr->children->next == NULL)) {
+ value = attr->children->content;
+ if ((!xmlStrcasecmp(attr->name, BAD_CAST"http-equiv"))
+ && (!xmlStrcasecmp(value, BAD_CAST"Content-Type")))
+ http = 1;
+ else if ((value != NULL)
+ && (!xmlStrcasecmp(attr->name, BAD_CAST"content")))
+ content = value;
+ if ((http != 0) && (content != NULL))
+ goto found_content;
+ }
+ attr = attr->next;
+ }
+ }
+ }
+ cur = cur->next;
+ }
+ return(NULL);
+
+found_content:
+ encoding = xmlStrstr(content, BAD_CAST"charset=");
+ if (encoding == NULL)
+ encoding = xmlStrstr(content, BAD_CAST"Charset=");
+ if (encoding == NULL)
+ encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
+ if (encoding != NULL) {
+ encoding += 8;
+ } else {
+ encoding = xmlStrstr(content, BAD_CAST"charset =");
+ if (encoding == NULL)
+ encoding = xmlStrstr(content, BAD_CAST"Charset =");
+ if (encoding == NULL)
+ encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
+ if (encoding != NULL)
+ encoding += 9;
+ }
+ if (encoding != NULL) {
+ while ((*encoding == ' ') || (*encoding == '\t')) encoding++;
+ }
+ return(encoding);
+}
+
+/**
+ * htmlSetMetaEncoding:
+ * @doc: the document
+ * @encoding: the encoding string
+ *
+ * Sets the current encoding in the Meta tags
+ * NOTE: this will not change the document content encoding, just
+ * the META flag associated.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
+ htmlNodePtr cur, meta = NULL, head = NULL;
+ const xmlChar *content = NULL;
+ char newcontent[100];
+
+ newcontent[0] = 0;
+
+ if (doc == NULL)
+ return(-1);
+
+ /* html isn't a real encoding it's just libxml2 way to get entities */
+ if (!xmlStrcasecmp(encoding, BAD_CAST "html"))
+ return(-1);
+
+ if (encoding != NULL) {
+ snprintf(newcontent, sizeof(newcontent), "text/html; charset=%s",
+ (char *)encoding);
+ newcontent[sizeof(newcontent) - 1] = 0;
+ }
+
+ cur = doc->children;
+
+ /*
+ * Search the html
+ */
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrcasecmp(cur->name, BAD_CAST"html") == 0)
+ break;
+ if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
+ goto found_head;
+ if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0)
+ goto found_meta;
+ }
+ cur = cur->next;
+ }
+ if (cur == NULL)
+ return(-1);
+ cur = cur->children;
+
+ /*
+ * Search the head
+ */
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
+ break;
+ if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) {
+ head = cur->parent;
+ goto found_meta;
+ }
+ }
+ cur = cur->next;
+ }
+ if (cur == NULL)
+ return(-1);
+found_head:
+ head = cur;
+ if (cur->children == NULL)
+ goto create;
+ cur = cur->children;
+
+found_meta:
+ /*
+ * Search and update all the remaining the meta elements carrying
+ * encoding informations
+ */
+ while (cur != NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
+ if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) {
+ xmlAttrPtr attr = cur->properties;
+ int http;
+ const xmlChar *value;
+
+ content = NULL;
+ http = 0;
+ while (attr != NULL) {
+ if ((attr->children != NULL) &&
+ (attr->children->type == XML_TEXT_NODE) &&
+ (attr->children->next == NULL)) {
+ value = attr->children->content;
+ if ((!xmlStrcasecmp(attr->name, BAD_CAST"http-equiv"))
+ && (!xmlStrcasecmp(value, BAD_CAST"Content-Type")))
+ http = 1;
+ else
+ {
+ if ((value != NULL) &&
+ (!xmlStrcasecmp(attr->name, BAD_CAST"content")))
+ content = value;
+ }
+ if ((http != 0) && (content != NULL))
+ break;
+ }
+ attr = attr->next;
+ }
+ if ((http != 0) && (content != NULL)) {
+ meta = cur;
+ break;
+ }
+
+ }
+ }
+ cur = cur->next;
+ }
+create:
+ if (meta == NULL) {
+ if ((encoding != NULL) && (head != NULL)) {
+ /*
+ * Create a new Meta element with the right attributes
+ */
+
+ meta = xmlNewDocNode(doc, NULL, BAD_CAST"meta", NULL);
+ if (head->children == NULL)
+ xmlAddChild(head, meta);
+ else
+ xmlAddPrevSibling(head->children, meta);
+ xmlNewProp(meta, BAD_CAST"http-equiv", BAD_CAST"Content-Type");
+ xmlNewProp(meta, BAD_CAST"content", BAD_CAST newcontent);
+ }
+ } else {
+ /* remove the meta tag if NULL is passed */
+ if (encoding == NULL) {
+ xmlUnlinkNode(meta);
+ xmlFreeNode(meta);
+ }
+ /* change the document only if there is a real encoding change */
+ else if (xmlStrcasestr(content, encoding) == NULL) {
+ xmlSetProp(meta, BAD_CAST"content", BAD_CAST newcontent);
+ }
+ }
+
+
+ return(0);
+}
+
+/**
+ * booleanHTMLAttrs:
+ *
+ * These are the HTML attributes which will be output
+ * in minimized form, i.e. <option selected="selected"> will be
+ * output as <option selected>, as per XSLT 1.0 16.2 "HTML Output Method"
+ *
+ */
+static const char* htmlBooleanAttrs[] = {
+ "checked", "compact", "declare", "defer", "disabled", "ismap",
+ "multiple", "nohref", "noresize", "noshade", "nowrap", "readonly",
+ "selected", NULL
+};
+
+
+/**
+ * htmlIsBooleanAttr:
+ * @name: the name of the attribute to check
+ *
+ * Determine if a given attribute is a boolean attribute.
+ *
+ * returns: false if the attribute is not boolean, true otherwise.
+ */
+int
+htmlIsBooleanAttr(const xmlChar *name)
+{
+ int i = 0;
+
+ while (htmlBooleanAttrs[i] != NULL) {
+ if (xmlStrcasecmp((const xmlChar *)htmlBooleanAttrs[i], name) == 0)
+ return 1;
+ i++;
+ }
+ return 0;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * private routine exported from xmlIO.c
+ */
+xmlOutputBufferPtr
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
+/************************************************************************
+ * *
+ * Output error handlers *
+ * *
+ ************************************************************************/
+/**
+ * htmlSaveErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+htmlSaveErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * htmlSaveErr:
+ * @code: the error number
+ * @node: the location of the error.
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+htmlSaveErr(int code, xmlNodePtr node, const char *extra)
+{
+ const char *msg = NULL;
+
+ switch(code) {
+ case XML_SAVE_NOT_UTF8:
+ msg = "string is not in UTF-8\n";
+ break;
+ case XML_SAVE_CHAR_INVALID:
+ msg = "invalid character value\n";
+ break;
+ case XML_SAVE_UNKNOWN_ENCODING:
+ msg = "unknown encoding %s\n";
+ break;
+ case XML_SAVE_NO_DOCTYPE:
+ msg = "HTML has no DOCTYPE\n";
+ break;
+ default:
+ msg = "unexpected error number\n";
+ }
+ __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
+}
+
+/************************************************************************
+ * *
+ * Dumping HTML tree content to a simple buffer *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlBufNodeDumpFormat:
+ * @buf: the xmlBufPtr output
+ * @doc: the document
+ * @cur: the current node
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too.
+ *
+ * Returns the number of byte written or -1 in case of error
+ */
+static size_t
+htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
+ int format) {
+ size_t use;
+ int ret;
+ xmlOutputBufferPtr outbuf;
+
+ if (cur == NULL) {
+ return (-1);
+ }
+ if (buf == NULL) {
+ return (-1);
+ }
+ outbuf = (xmlOutputBufferPtr) xmlMalloc(sizeof(xmlOutputBuffer));
+ if (outbuf == NULL) {
+ htmlSaveErrMemory("allocating HTML output buffer");
+ return (-1);
+ }
+ memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
+ outbuf->buffer = buf;
+ outbuf->encoder = NULL;
+ outbuf->writecallback = NULL;
+ outbuf->closecallback = NULL;
+ outbuf->context = NULL;
+ outbuf->written = 0;
+
+ use = xmlBufUse(buf);
+ htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format);
+ xmlFree(outbuf);
+ ret = xmlBufUse(buf) - use;
+ return (ret);
+}
+
+/**
+ * htmlNodeDump:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the current node
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too,
+ * and formatting returns are added.
+ *
+ * Returns the number of byte written or -1 in case of error
+ */
+int
+htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
+ xmlBufPtr buffer;
+ size_t ret;
+
+ if ((buf == NULL) || (cur == NULL))
+ return(-1);
+
+ xmlInitParser();
+ buffer = xmlBufFromBuffer(buf);
+ if (buffer == NULL)
+ return(-1);
+
+ ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1);
+
+ xmlBufBackToBuffer(buffer);
+
+ if (ret > INT_MAX)
+ return(-1);
+ return((int) ret);
+}
+
+/**
+ * htmlNodeDumpFileFormat:
+ * @out: the FILE pointer
+ * @doc: the document
+ * @cur: the current node
+ * @encoding: the document encoding
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too.
+ *
+ * TODO: if encoding == NULL try to save in the doc encoding
+ *
+ * returns: the number of byte written or -1 in case of failure.
+ */
+int
+htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
+ xmlNodePtr cur, const char *encoding, int format) {
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ int ret;
+
+ xmlInitParser();
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+
+ enc = xmlParseCharEncoding(encoding);
+ if (enc != XML_CHAR_ENCODING_UTF8) {
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+ }
+ }
+
+ /*
+ * Fallback to HTML or ASCII when the encoding is unspecified
+ */
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+
+ /*
+ * save the content to a temp buffer.
+ */
+ buf = xmlOutputBufferCreateFile(out, handler);
+ if (buf == NULL) return(0);
+
+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * htmlNodeDumpFile:
+ * @out: the FILE pointer
+ * @doc: the document
+ * @cur: the current node
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too,
+ * and formatting returns are added.
+ */
+void
+htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
+ htmlNodeDumpFileFormat(out, doc, cur, NULL, 1);
+}
+
+/**
+ * htmlDocDumpMemoryFormat:
+ * @cur: the document
+ * @mem: OUT: the memory pointer
+ * @size: OUT: the memory length
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML document in memory and return the xmlChar * and it's size.
+ * It's up to the caller to free the memory.
+ */
+void
+htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ const char *encoding;
+
+ xmlInitParser();
+
+ if ((mem == NULL) || (size == NULL))
+ return;
+ if (cur == NULL) {
+ *mem = NULL;
+ *size = 0;
+ return;
+ }
+
+ encoding = (const char *) htmlGetMetaEncoding(cur);
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+
+ enc = xmlParseCharEncoding(encoding);
+ if (enc != cur->charset) {
+ if (cur->charset != XML_CHAR_ENCODING_UTF8) {
+ /*
+ * Not supported yet
+ */
+ *mem = NULL;
+ *size = 0;
+ return;
+ }
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+
+ } else {
+ handler = xmlFindCharEncodingHandler(encoding);
+ }
+ }
+
+ /*
+ * Fallback to HTML or ASCII when the encoding is unspecified
+ */
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+
+ buf = xmlAllocOutputBufferInternal(handler);
+ if (buf == NULL) {
+ *mem = NULL;
+ *size = 0;
+ return;
+ }
+
+ htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
+
+ xmlOutputBufferFlush(buf);
+ if (buf->conv != NULL) {
+ *size = xmlBufUse(buf->conv);
+ *mem = xmlStrndup(xmlBufContent(buf->conv), *size);
+ } else {
+ *size = xmlBufUse(buf->buffer);
+ *mem = xmlStrndup(xmlBufContent(buf->buffer), *size);
+ }
+ (void)xmlOutputBufferClose(buf);
+}
+
+/**
+ * htmlDocDumpMemory:
+ * @cur: the document
+ * @mem: OUT: the memory pointer
+ * @size: OUT: the memory length
+ *
+ * Dump an HTML document in memory and return the xmlChar * and it's size.
+ * It's up to the caller to free the memory.
+ */
+void
+htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
+ htmlDocDumpMemoryFormat(cur, mem, size, 1);
+}
+
+
+/************************************************************************
+ * *
+ * Dumping HTML tree content to an I/O output buffer *
+ * *
+ ************************************************************************/
+
+void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
+
+/**
+ * htmlDtdDumpOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @encoding: the encoding string
+ *
+ * TODO: check whether encoding is needed
+ *
+ * Dump the HTML document DTD, if any.
+ */
+static void
+htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ const char *encoding ATTRIBUTE_UNUSED) {
+ xmlDtdPtr cur = doc->intSubset;
+
+ if (cur == NULL) {
+ htmlSaveErr(XML_SAVE_NO_DOCTYPE, (xmlNodePtr) doc, NULL);
+ return;
+ }
+ xmlOutputBufferWriteString(buf, "<!DOCTYPE ");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->ExternalID != NULL) {
+ xmlOutputBufferWriteString(buf, " PUBLIC ");
+ xmlBufWriteQuotedString(buf->buffer, cur->ExternalID);
+ if (cur->SystemID != NULL) {
+ xmlOutputBufferWriteString(buf, " ");
+ xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
+ }
+ } else if (cur->SystemID != NULL) {
+ xmlOutputBufferWriteString(buf, " SYSTEM ");
+ xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
+ }
+ xmlOutputBufferWriteString(buf, ">\n");
+}
+
+/**
+ * htmlAttrDumpOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the attribute pointer
+ * @encoding: the encoding string
+ *
+ * Dump an HTML attribute
+ */
+static void
+htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
+ const char *encoding ATTRIBUTE_UNUSED) {
+ xmlChar *value;
+
+ /*
+ * The html output method should not escape a & character
+ * occurring in an attribute value immediately followed by
+ * a { character (see Section B.7.1 of the HTML 4.0 Recommendation).
+ * This is implemented in xmlEncodeEntitiesReentrant
+ */
+
+ if (cur == NULL) {
+ return;
+ }
+ xmlOutputBufferWriteString(buf, " ");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWriteString(buf, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if ((cur->children != NULL) && (!htmlIsBooleanAttr(cur->name))) {
+ value = xmlNodeListGetString(doc, cur->children, 0);
+ if (value) {
+ xmlOutputBufferWriteString(buf, "=");
+ if ((cur->ns == NULL) && (cur->parent != NULL) &&
+ (cur->parent->ns == NULL) &&
+ ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) ||
+ (!xmlStrcasecmp(cur->name, BAD_CAST "action")) ||
+ (!xmlStrcasecmp(cur->name, BAD_CAST "src")) ||
+ ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) &&
+ (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) {
+ xmlChar *tmp = value;
+ /* xmlURIEscapeStr() escapes '"' so it can be safely used. */
+ xmlBufCCat(buf->buffer, "\"");
+
+ while (IS_BLANK_CH(*tmp)) tmp++;
+
+ /* URI Escape everything, except server side includes. */
+ for ( ; ; ) {
+ xmlChar *escaped;
+ xmlChar endChar;
+ xmlChar *end = NULL;
+ xmlChar *start = (xmlChar *)xmlStrstr(tmp, BAD_CAST "<!--");
+ if (start != NULL) {
+ end = (xmlChar *)xmlStrstr(tmp, BAD_CAST "-->");
+ if (end != NULL) {
+ *start = '\0';
+ }
+ }
+
+ /* Escape the whole string, or until start (set to '\0'). */
+ escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+");
+ if (escaped != NULL) {
+ xmlBufCat(buf->buffer, escaped);
+ xmlFree(escaped);
+ } else {
+ xmlBufCat(buf->buffer, tmp);
+ }
+
+ if (end == NULL) { /* Everything has been written. */
+ break;
+ }
+
+ /* Do not escape anything within server side includes. */
+ *start = '<'; /* Restore the first character of "<!--". */
+ end += 3; /* strlen("-->") */
+ endChar = *end;
+ *end = '\0';
+ xmlBufCat(buf->buffer, start);
+ *end = endChar;
+ tmp = end;
+ }
+
+ xmlBufCCat(buf->buffer, "\"");
+ } else {
+ xmlBufWriteQuotedString(buf->buffer, value);
+ }
+ xmlFree(value);
+ } else {
+ xmlOutputBufferWriteString(buf, "=\"\"");
+ }
+ }
+}
+
+/**
+ * htmlAttrListDumpOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the first attribute pointer
+ * @encoding: the encoding string
+ *
+ * Dump a list of HTML attributes
+ */
+static void
+htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, const char *encoding) {
+ if (cur == NULL) {
+ return;
+ }
+ while (cur != NULL) {
+ htmlAttrDumpOutput(buf, doc, cur, encoding);
+ cur = cur->next;
+ }
+}
+
+
+
+/**
+ * htmlNodeListDumpOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the first node
+ * @encoding: the encoding string
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML node list, recursive behaviour,children are printed too.
+ */
+static void
+htmlNodeListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ xmlNodePtr cur, const char *encoding, int format) {
+ if (cur == NULL) {
+ return;
+ }
+ while (cur != NULL) {
+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
+ cur = cur->next;
+ }
+}
+
+/**
+ * htmlNodeDumpFormatOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the current node
+ * @encoding: the encoding string
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too.
+ */
+void
+htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ xmlNodePtr cur, const char *encoding, int format) {
+ const htmlElemDesc * info;
+
+ xmlInitParser();
+
+ if ((cur == NULL) || (buf == NULL)) {
+ return;
+ }
+ /*
+ * Special cases.
+ */
+ if (cur->type == XML_DTD_NODE)
+ return;
+ if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE)){
+ htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding);
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding);
+ return;
+ }
+ if (cur->type == HTML_TEXT_NODE) {
+ if (cur->content != NULL) {
+ if (((cur->name == (const xmlChar *)xmlStringText) ||
+ (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
+ ((cur->parent == NULL) ||
+ ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
+ (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
+ xmlChar *buffer;
+
+ buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
+ if (buffer != NULL) {
+ xmlOutputBufferWriteString(buf, (const char *)buffer);
+ xmlFree(buffer);
+ }
+ } else {
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ }
+ }
+ return;
+ }
+ if (cur->type == HTML_COMMENT_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWriteString(buf, "<!--");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ xmlOutputBufferWriteString(buf, "-->");
+ }
+ return;
+ }
+ if (cur->type == HTML_PI_NODE) {
+ if (cur->name == NULL)
+ return;
+ xmlOutputBufferWriteString(buf, "<?");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->content != NULL) {
+ xmlOutputBufferWriteString(buf, " ");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ }
+ xmlOutputBufferWriteString(buf, ">");
+ return;
+ }
+ if (cur->type == HTML_ENTITY_REF_NODE) {
+ xmlOutputBufferWriteString(buf, "&");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWriteString(buf, ";");
+ return;
+ }
+ if (cur->type == HTML_PRESERVE_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ }
+ return;
+ }
+
+ /*
+ * Get specific HTML info for that node.
+ */
+ if (cur->ns == NULL)
+ info = htmlTagLookup(cur->name);
+ else
+ info = NULL;
+
+ xmlOutputBufferWriteString(buf, "<");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWriteString(buf, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->nsDef)
+ xmlNsListDumpOutput(buf, cur->nsDef);
+ if (cur->properties != NULL)
+ htmlAttrListDumpOutput(buf, doc, cur->properties, encoding);
+
+ if ((info != NULL) && (info->empty)) {
+ xmlOutputBufferWriteString(buf, ">");
+ if ((format) && (!info->isinline) && (cur->next != NULL)) {
+ if ((cur->next->type != HTML_TEXT_NODE) &&
+ (cur->next->type != HTML_ENTITY_REF_NODE) &&
+ (cur->parent != NULL) &&
+ (cur->parent->name != NULL) &&
+ (cur->parent->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+ return;
+ }
+ if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
+ (cur->children == NULL)) {
+ if ((info != NULL) && (info->saveEndTag != 0) &&
+ (xmlStrcmp(BAD_CAST info->name, BAD_CAST "html")) &&
+ (xmlStrcmp(BAD_CAST info->name, BAD_CAST "body"))) {
+ xmlOutputBufferWriteString(buf, ">");
+ } else {
+ xmlOutputBufferWriteString(buf, "></");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWriteString(buf, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWriteString(buf, ">");
+ }
+ if ((format) && (cur->next != NULL) &&
+ (info != NULL) && (!info->isinline)) {
+ if ((cur->next->type != HTML_TEXT_NODE) &&
+ (cur->next->type != HTML_ENTITY_REF_NODE) &&
+ (cur->parent != NULL) &&
+ (cur->parent->name != NULL) &&
+ (cur->parent->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+ return;
+ }
+ xmlOutputBufferWriteString(buf, ">");
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->content != NULL)) {
+ /*
+ * Uses the OutputBuffer property to automatically convert
+ * invalids to charrefs
+ */
+
+ xmlOutputBufferWriteString(buf, (const char *) cur->content);
+ }
+ if (cur->children != NULL) {
+ if ((format) && (info != NULL) && (!info->isinline) &&
+ (cur->children->type != HTML_TEXT_NODE) &&
+ (cur->children->type != HTML_ENTITY_REF_NODE) &&
+ (cur->children != cur->last) &&
+ (cur->name != NULL) &&
+ (cur->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format);
+ if ((format) && (info != NULL) && (!info->isinline) &&
+ (cur->last->type != HTML_TEXT_NODE) &&
+ (cur->last->type != HTML_ENTITY_REF_NODE) &&
+ (cur->children != cur->last) &&
+ (cur->name != NULL) &&
+ (cur->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+ xmlOutputBufferWriteString(buf, "</");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWriteString(buf, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWriteString(buf, ">");
+ if ((format) && (info != NULL) && (!info->isinline) &&
+ (cur->next != NULL)) {
+ if ((cur->next->type != HTML_TEXT_NODE) &&
+ (cur->next->type != HTML_ENTITY_REF_NODE) &&
+ (cur->parent != NULL) &&
+ (cur->parent->name != NULL) &&
+ (cur->parent->name[0] != 'p')) /* p, pre, param */
+ xmlOutputBufferWriteString(buf, "\n");
+ }
+}
+
+/**
+ * htmlNodeDumpOutput:
+ * @buf: the HTML buffer output
+ * @doc: the document
+ * @cur: the current node
+ * @encoding: the encoding string
+ *
+ * Dump an HTML node, recursive behaviour,children are printed too,
+ * and formatting returns/spaces are added.
+ */
+void
+htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
+ xmlNodePtr cur, const char *encoding) {
+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
+}
+
+/**
+ * htmlDocContentDumpFormatOutput:
+ * @buf: the HTML buffer output
+ * @cur: the document
+ * @encoding: the encoding string
+ * @format: should formatting spaces been added
+ *
+ * Dump an HTML document.
+ */
+void
+htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
+ const char *encoding, int format) {
+ int type;
+
+ xmlInitParser();
+
+ if ((buf == NULL) || (cur == NULL))
+ return;
+
+ /*
+ * force to output the stuff as HTML, especially for entities
+ */
+ type = cur->type;
+ cur->type = XML_HTML_DOCUMENT_NODE;
+ if (cur->intSubset != NULL) {
+ htmlDtdDumpOutput(buf, cur, NULL);
+ }
+ if (cur->children != NULL) {
+ htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format);
+ }
+ xmlOutputBufferWriteString(buf, "\n");
+ cur->type = (xmlElementType) type;
+}
+
+/**
+ * htmlDocContentDumpOutput:
+ * @buf: the HTML buffer output
+ * @cur: the document
+ * @encoding: the encoding string
+ *
+ * Dump an HTML document. Formating return/spaces are added.
+ */
+void
+htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
+ const char *encoding) {
+ htmlDocContentDumpFormatOutput(buf, cur, encoding, 1);
+}
+
+/************************************************************************
+ * *
+ * Saving functions front-ends *
+ * *
+ ************************************************************************/
+
+/**
+ * htmlDocDump:
+ * @f: the FILE*
+ * @cur: the document
+ *
+ * Dump an HTML document to an open FILE.
+ *
+ * returns: the number of byte written or -1 in case of failure.
+ */
+int
+htmlDocDump(FILE *f, xmlDocPtr cur) {
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ const char *encoding;
+ int ret;
+
+ xmlInitParser();
+
+ if ((cur == NULL) || (f == NULL)) {
+ return(-1);
+ }
+
+ encoding = (const char *) htmlGetMetaEncoding(cur);
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+
+ enc = xmlParseCharEncoding(encoding);
+ if (enc != cur->charset) {
+ if (cur->charset != XML_CHAR_ENCODING_UTF8) {
+ /*
+ * Not supported yet
+ */
+ return(-1);
+ }
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+ } else {
+ handler = xmlFindCharEncodingHandler(encoding);
+ }
+ }
+
+ /*
+ * Fallback to HTML or ASCII when the encoding is unspecified
+ */
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+
+ buf = xmlOutputBufferCreateFile(f, handler);
+ if (buf == NULL) return(-1);
+ htmlDocContentDumpOutput(buf, cur, NULL);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * htmlSaveFile:
+ * @filename: the filename (or URL)
+ * @cur: the document
+ *
+ * Dump an HTML document to a file. If @filename is "-" the stdout file is
+ * used.
+ * returns: the number of byte written or -1 in case of failure.
+ */
+int
+htmlSaveFile(const char *filename, xmlDocPtr cur) {
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ const char *encoding;
+ int ret;
+
+ if ((cur == NULL) || (filename == NULL))
+ return(-1);
+
+ xmlInitParser();
+
+ encoding = (const char *) htmlGetMetaEncoding(cur);
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+
+ enc = xmlParseCharEncoding(encoding);
+ if (enc != cur->charset) {
+ if (cur->charset != XML_CHAR_ENCODING_UTF8) {
+ /*
+ * Not supported yet
+ */
+ return(-1);
+ }
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+ }
+ }
+
+ /*
+ * Fallback to HTML or ASCII when the encoding is unspecified
+ */
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+
+ /*
+ * save the content to a temp buffer.
+ */
+ buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
+ if (buf == NULL) return(0);
+
+ htmlDocContentDumpOutput(buf, cur, NULL);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * htmlSaveFileFormat:
+ * @filename: the filename
+ * @cur: the document
+ * @format: should formatting spaces been added
+ * @encoding: the document encoding
+ *
+ * Dump an HTML document to a file using a given encoding.
+ *
+ * returns: the number of byte written or -1 in case of failure.
+ */
+int
+htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
+ const char *encoding, int format) {
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ int ret;
+
+ if ((cur == NULL) || (filename == NULL))
+ return(-1);
+
+ xmlInitParser();
+
+ if (encoding != NULL) {
+ xmlCharEncoding enc;
+
+ enc = xmlParseCharEncoding(encoding);
+ if (enc != cur->charset) {
+ if (cur->charset != XML_CHAR_ENCODING_UTF8) {
+ /*
+ * Not supported yet
+ */
+ return(-1);
+ }
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ htmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+ }
+ htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
+ } else {
+ htmlSetMetaEncoding(cur, (const xmlChar *) "UTF-8");
+ }
+
+ /*
+ * Fallback to HTML or ASCII when the encoding is unspecified
+ */
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+
+ /*
+ * save the content to a temp buffer.
+ */
+ buf = xmlOutputBufferCreateFilename(filename, handler, 0);
+ if (buf == NULL) return(0);
+
+ htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * htmlSaveFileEnc:
+ * @filename: the filename
+ * @cur: the document
+ * @encoding: the document encoding
+ *
+ * Dump an HTML document to a file using a given encoding
+ * and formatting returns/spaces are added.
+ *
+ * returns: the number of byte written or -1 in case of failure.
+ */
+int
+htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
+ return(htmlSaveFileFormat(filename, cur, encoding, 1));
+}
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#define bottom_HTMLtree
+#include "elfgcchack.h"
+#endif /* LIBXML_HTML_ENABLED */
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..007e939
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..70720f3
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,1279 @@
+## Process this file with automake to produce Makefile.in
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
+
+DIST_SUBDIRS = include . doc example python xstc
+
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
+
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
+
+noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
+ testThreads testC14N testAutomata testRegexp \
+ testReader testapi testModule runtest runsuite testchar \
+ testdict runxmlconf testrecurse testlimits
+
+bin_PROGRAMS = xmllint xmlcatalog
+
+bin_SCRIPTS=xml2-config
+
+lib_LTLIBRARIES = libxml2.la
+libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
+
+if USE_VERSION_SCRIPT
+LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
+else
+LIBXML2_VERSION_SCRIPT =
+endif
+
+libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \
+ $(LIBXML2_VERSION_SCRIPT) \
+ -version-info $(LIBXML_VERSION_INFO) \
+ $(MODULE_PLATFORM_LIBS)
+
+if WITH_SAX1_SOURCES
+docb_sources = DOCBparser.c
+else
+docb_sources =
+endif
+
+if WITH_TRIO_SOURCES
+trio_sources = triostr.c trio.c
+else
+trio_sources =
+endif
+
+libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
+ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
+ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
+ xpointer.c xinclude.c nanohttp.c nanoftp.c \
+ $(docb_sources) \
+ catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \
+ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
+ $(trio_sources) \
+ xmlreader.c relaxng.c dict.c SAX2.c \
+ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
+ xmlmodule.c schematron.c xzlib.c
+
+DEPS = $(top_builddir)/libxml2.la
+LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
+
+
+man_MANS = xml2-config.1 libxml.3
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = libxml.m4
+
+runtest_SOURCES=runtest.c
+runtest_LDFLAGS =
+runtest_DEPENDENCIES = $(DEPS)
+runtest_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+
+testrecurse_SOURCES=testrecurse.c
+testrecurse_LDFLAGS =
+testrecurse_DEPENDENCIES = $(DEPS)
+testrecurse_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+
+testlimits_SOURCES=testlimits.c
+testlimits_LDFLAGS =
+testlimits_DEPENDENCIES = $(DEPS)
+testlimits_LDADD= $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+
+testchar_SOURCES=testchar.c
+testchar_LDFLAGS =
+testchar_DEPENDENCIES = $(DEPS)
+testchar_LDADD= $(RDL_LIBS) $(LDADDS)
+
+testdict_SOURCES=testdict.c
+testdict_LDFLAGS =
+testdict_DEPENDENCIES = $(DEPS)
+testdict_LDADD= $(RDL_LIBS) $(LDADDS)
+
+runsuite_SOURCES=runsuite.c
+runsuite_LDFLAGS =
+runsuite_DEPENDENCIES = $(DEPS)
+runsuite_LDADD= $(RDL_LIBS) $(LDADDS)
+
+xmllint_SOURCES=xmllint.c
+xmllint_LDFLAGS =
+xmllint_DEPENDENCIES = $(DEPS)
+xmllint_LDADD= $(RDL_LIBS) $(LDADDS)
+
+testSAX_SOURCES=testSAX.c
+testSAX_LDFLAGS =
+testSAX_DEPENDENCIES = $(DEPS)
+testSAX_LDADD= $(LDADDS)
+
+testHTML_SOURCES=testHTML.c
+testHTML_LDFLAGS =
+testHTML_DEPENDENCIES = $(DEPS)
+testHTML_LDADD= $(LDADDS)
+
+xmlcatalog_SOURCES=xmlcatalog.c
+xmlcatalog_LDFLAGS =
+xmlcatalog_DEPENDENCIES = $(DEPS)
+xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
+
+testXPath_SOURCES=testXPath.c
+testXPath_LDFLAGS =
+testXPath_DEPENDENCIES = $(DEPS)
+testXPath_LDADD= $(LDADDS)
+
+testC14N_SOURCES=testC14N.c
+testC14N_LDFLAGS =
+testC14N_DEPENDENCIES = $(DEPS)
+testC14N_LDADD= $(LDADDS)
+
+if THREADS_W32
+testThreads_SOURCES = testThreadsWin32.c
+else
+testThreads_SOURCES = testThreads.c
+endif
+testThreads_LDFLAGS =
+testThreads_DEPENDENCIES = $(DEPS)
+testThreads_LDADD= $(BASE_THREAD_LIBS) $(LDADDS)
+
+testURI_SOURCES=testURI.c
+testURI_LDFLAGS =
+testURI_DEPENDENCIES = $(DEPS)
+testURI_LDADD= $(LDADDS)
+
+testRegexp_SOURCES=testRegexp.c
+testRegexp_LDFLAGS =
+testRegexp_DEPENDENCIES = $(DEPS)
+testRegexp_LDADD= $(LDADDS)
+
+testAutomata_SOURCES=testAutomata.c
+testAutomata_LDFLAGS =
+testAutomata_DEPENDENCIES = $(DEPS)
+testAutomata_LDADD= $(LDADDS)
+
+testSchemas_SOURCES=testSchemas.c
+testSchemas_LDFLAGS =
+testSchemas_DEPENDENCIES = $(DEPS)
+testSchemas_LDADD= $(LDADDS)
+
+testRelax_SOURCES=testRelax.c
+testRelax_LDFLAGS =
+testRelax_DEPENDENCIES = $(DEPS)
+testRelax_LDADD= $(LDADDS)
+
+testReader_SOURCES=testReader.c
+testReader_LDFLAGS =
+testReader_DEPENDENCIES = $(DEPS)
+testReader_LDADD= $(LDADDS)
+
+testModule_SOURCES=testModule.c
+testModule_LDFLAGS =
+testModule_DEPENDENCIES = $(DEPS)
+testModule_LDADD= $(LDADDS)
+
+noinst_LTLIBRARIES = testdso.la
+testdso_la_SOURCES = testdso.c
+testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
+
+# that one forces the rebuild when "make rebuild" is run on doc/
+rebuild_testapi:
+ -@(if [ "$(PYTHON)" != "" ] ; then \
+ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
+
+# that one is just to make sure it is rebuilt if missing
+# but adding the dependances generate mess
+testapi.c: $(srcdir)/gentest.py
+ -@(if [ "$(PYTHON)" != "" ] ; then \
+ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
+
+BUILT_SOURCES = testapi.c
+
+testapi_SOURCES=testapi.c
+testapi_LDFLAGS =
+testapi_DEPENDENCIES = $(DEPS)
+testapi_LDADD= $(LDADDS)
+
+runxmlconf_SOURCES=runxmlconf.c
+runxmlconf_LDFLAGS =
+runxmlconf_DEPENDENCIES = $(DEPS)
+runxmlconf_LDADD= $(LDADDS)
+
+#testOOM_SOURCES=testOOM.c testOOMlib.h testOOMlib.c
+#testOOM_LDFLAGS =
+#testOOM_DEPENDENCIES = $(DEPS)
+#testOOM_LDADD= $(LDADDS)
+
+runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
+ @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+ $(MAKE) tests ; fi)
+
+check: all runtests
+
+check-valgrind valgrind: all
+ @echo '## Running the regression tests under Valgrind'
+ @echo '## Go get a cup of coffee it is gonna take a while ...'
+ $(MAKE) CHECKER='valgrind -q' runtests
+
+testall : tests SVGtests SAXtests
+
+tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
+ @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+ $(MAKE) tests ; fi)
+ @(cd doc/examples ; $(MAKE) tests)
+
+APItests: testapi$(EXEEXT)
+ @echo "## Running the API regression tests this may take a little while"
+ -@($(CHECKER) $(top_builddir)/testapi -q)
+
+HTMLtests : testHTML$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## HTML regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name result.$$name ; \
+ diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \
+ $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name error.$$name ; \
+ fi ; fi ; done)
+
+HTMLPushtests : testHTML$(EXEEXT)
+ @echo "## Push HTML regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name result.$$name ; \
+ cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \
+ cut -b 1-15 error.$$name > errorcut2.$$name; \
+ diff -b errorcut.$$name errorcut2.$$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \
+ fi ; fi ; done)
+ @echo "## HTML SAX regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name.sax ; \
+ fi ; fi ; done)
+ @echo "## Push HTML SAX regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name.sax ; \
+ fi ; fi ; done)
+
+XMLtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ;\
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+ @echo "## XML regression tests on memory"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --memory $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ diff result.$$name result2.$$name ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+XMLPushtests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML push regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --push $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --push result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+NStests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML Namespaces regression tests"
+ -@(for i in $(srcdir)/test/namespaces/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i \
+ 2> $(srcdir)/result/namespaces/$$name.err \
+ > $(srcdir)/result/namespaces/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/namespaces/$$name result.$$name ; \
+ diff $(srcdir)/result/namespaces/$$name.err error.$$name`; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## xml:id regression tests"
+ -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \
+ 2> $(srcdir)/result/xmlid/$$name.err \
+ > $(srcdir)/result/xmlid/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/xmlid/$$name result.$$name ; \
+ diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Errtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Error cases regression tests"
+ -@(for i in $(srcdir)/test/errors/*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/errors/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i \
+ 2> $(srcdir)/result/errors/$$name.err \
+ > $(srcdir)/result/errors/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/errors/$$name result.$$name ; \
+ diff $(srcdir)/result/errors/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ @echo "## Error cases stream regression tests"
+ -@(for i in $(srcdir)/test/errors/*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --stream $$i \
+ 2> $(srcdir)/result/errors/$$name.str \
+ > /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm error.$$name ; \
+ fi ; fi ; done)
+
+Docbtests : xmllint$(EXEEXT)
+
+XMLenttests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML entity subst regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noent $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/noent/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent result.$$name 2>&1 > result2.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+URItests : testURI$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## URI module regression tests"
+ -@(for i in $(srcdir)/test/URI/*.data ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/URI/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/URI/*.uri ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testURI < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/URI/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+XPathtests : testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XPath regression tests"
+ -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
+ then echo Skipping debug not compiled in ; exit 0 ; fi ; \
+ for i in $(srcdir)/test/XPath/expr/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -f --expr $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/expr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; \
+ for i in $(srcdir)/test/XPath/docs/* ; do \
+ if [ ! -d $$i ] ; then \
+ doc=`basename $$i`; \
+ for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
+ if [ ! -f $$j ] ; then continue ; fi ; \
+ name=`basename $$j`; \
+ if [ ! -d $$j ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/tests/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; fi ; done)
+
+XPtrtests : testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XPointer regression tests"
+ -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
+ then echo Skipping debug not compiled in ; exit 0 ; fi ; \
+ for i in $(srcdir)/test/XPath/docs/* ; do \
+ if [ ! -d $$i ] ; then \
+ doc=`basename $$i`; \
+ for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \
+ if [ ! -f $$j ] ; then continue ; fi ; \
+ name=`basename $$j`; \
+ if [ ! -d $$j ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/xptr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; fi ; done)
+
+XIncludetests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XInclude regression tests"
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name result.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name result.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ @(echo > .memdump)
+ @echo "## XInclude xmlReader regression tests"
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Scripttests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Scripts regression tests"
+ @echo "## Some of the base computations may be different if srcdir != ."
+ -@(for i in $(srcdir)/test/scripts/*.script ; do \
+ name=`basename $$i .script`; \
+ xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \
+ if [ -f $$xml ] ; then \
+ if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/scripts/$$name result.$$name ; \
+ diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result.$$name.err ; \
+ fi ; fi ; done)
+
+Catatests : xmlcatalog$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Catalog regression tests"
+ -@(for i in $(srcdir)/test/catalogs/*.script ; do \
+ name=`basename $$i .script`; \
+ xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \
+ if [ -f $$xml ] ; then \
+ if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/catalogs/*.script ; do \
+ name=`basename $$i .script`; \
+ sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \
+ if [ -f $$sgml ] ; then \
+ if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Add and del operations on XML Catalogs"
+ -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ rm -f $(srcdir)/result/catalogs/mycatalog)
+
+SVGtests : xmllint$(EXEEXT)
+ @echo "## SVG parsing regression tests"
+ -@(for i in $(srcdir)/test/SVG/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ echo Testing $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/SVG/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff result.$$name result2.$$name ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+Threadtests : testThreads$(EXEEXT)
+ @echo "## Threaded regression tests"
+ -@($(CHECKER) $(top_builddir)/testThreads ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ exit 0)
+
+Readertests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Reader regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Reader on memory regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @(echo > .memdump)
+ @echo "## Walker regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Reader entities substitution regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rde ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rde result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+SAXtests : testSAX$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## SAX1 callbacks regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.sax ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/result/$$name.sax 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSAX $$i > result.$$name 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.sax result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## SAX2 callbacks regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.sax2 ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testSAX --sax2 $$i > $(srcdir)/result/$$name.sax2 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSAX --sax2 $$i > result.$$name 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.sax2 result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+Validtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Valid documents regression tests"
+ -@(for i in $(srcdir)/test/VCM/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ log=`$(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`;\
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ fi ; done ; exit 0)
+ @echo "## Validity checking regression tests"
+ -@(for i in $(srcdir)/test/VC/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/VC/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## General documents valid regression tests"
+ -@(for i in $(srcdir)/test/valid/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/valid/$$name result.$$name ; \
+ diff $(srcdir)/result/valid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Regexptests: testRegexp$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Regexp regression tests"
+ -@(for i in $(srcdir)/test/regexp/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testRegexp -i $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/regexp/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Formal expresssions regression tests"
+ -@(for i in $(srcdir)/test/expr/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/expr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/expr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+Automatatests: testAutomata$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Automata regression tests"
+ -@(for i in $(srcdir)/test/automata/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/automata/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testAutomata $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/automata/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+dba100000.xml: dbgenattr.pl
+ @echo "## generating dba100000.xml"
+ @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
+
+Timingtests: xmllint$(EXEEXT) dba100000.xml
+ @echo "## Timing tests to try to detect performance"
+ @echo "## as well a memory usage breakage when streaming"
+ @echo "## 1/ using the file interface"
+ @echo "## 2/ using the memory interface"
+ @echo "## 3/ repeated DOM parsing"
+ @echo "## 4/ repeated DOM validation"
+ -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+ -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+ -@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+
+VTimingtests: xmllint$(EXEEXT)
+ -@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+
+C14Ntests : testC14N$(EXEEXT)
+ @echo "## C14N and XPath regression tests"
+ -@(for m in with-comments without-comments 1-1-without-comments exc-without-comments ; do \
+ for i in $(srcdir)/test/c14n/$$m/*.xml ; do \
+ if [ ! -d $$i ] ; then \
+ name=`basename $$i .xml`; \
+ cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \
+ if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \
+ cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \
+ if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \
+ cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \
+ fi; \
+ fi; \
+ $$cmdline > $(srcdir)/test/c14n/test.tmp; \
+ if [ $$? -eq 0 ]; then \
+ diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \
+ if [ $$? -ne 0 ]; then \
+ echo "Test $$m/$$name failed"; \
+ cat $(srcdir)/test/c14n/test.tmp; \
+ fi; \
+ else \
+ echo "C14N failed"; \
+ fi; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ fi; \
+ rm -f $(srcdir)/test/c14n/test.tmp; \
+ done; \
+ done)
+
+Schemastests: testSchemas$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Schemas regression tests"
+ -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \
+ name=`basename $$i | sed 's+_.*++'`; \
+ sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \
+ for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$sno"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/testSchemas $$i $$j \
+ > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
+ 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSchemas $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \
+ err.$$name;\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$sno"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ;\
+ done; done)
+
+Relaxtests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Relax-NG regression tests"
+ -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
+ name=`basename $$i | sed 's+\.rng++'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_valid ] ; then \
+ echo New schemas $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
+ > $(srcdir)/result/relaxng/"$$name"_valid \
+ 2> $(srcdir)/result/relaxng/"$$name"_err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_valid \
+ res.$$name;\
+ diff $(srcdir)/result/relaxng/"$$name"_err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo schemas $$name result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi; \
+ for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+ @echo "## Relax-NG streaming regression tests"
+ -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
+ name=`basename $$i | sed 's+\.rng++'`; \
+ for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --stream --relaxng $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
+ if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" -a "$$name" != "tutor8_2" ] ; then \
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ fi ; grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+
+Schematrontests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Schematron regression tests"
+ -@(for i in $(srcdir)/test/schematron/*.sct ; do \
+ name=`basename $$i | sed 's+\.sct++'`; \
+ for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
+ > $(srcdir)/result/schematron/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+
+RelaxNGPythonTests:
+ @(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ echo "## Relax-NG Python based test suite 1" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
+ echo "## Relax-NG Python based test suite 2" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \
+ fi)
+
+SchemasPythonTests:
+ @(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ echo "## XML Schemas datatypes Python based test suite" ; \
+ echo "## It is normal to see 11 errors reported" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
+ fi)
+ @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
+
+Patterntests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Pattern regression tests"
+ -@(for i in $(srcdir)/test/pattern/*.pat ; do \
+ name=`basename $$i .pat`; \
+ if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \
+ if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \
+ rm -f result.$$name ; \
+ echo New test file $$name ; \
+ for pat in `cat $$i` ; do \
+ $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ done ;\
+ else \
+ rm -f result.$$name ; \
+ lst=`cat $$i` ; \
+ log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ done ;\
+ diff $(srcdir)/result/pattern/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ;)
+
+ModuleTests: testModule$(EXEEXT) testdso.la
+ @echo "## Module tests"
+ @(./testModule$(EXEEXT))
+
+cleanup:
+ -@(find . -name .\#\* -exec rm {} \;)
+ -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;)
+ -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;)
+
+dist-hook: cleanup libxml2.spec
+ -cp libxml2.spec $(distdir)
+ (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos os400 vms VxWorks bakefile test result) | (cd $(distdir); tar xf -)
+
+dist-source: distdir
+ $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz
+
+dist-test: distdir
+ (mkdir -p $(distdir))
+ (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
+ tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
+ @(rm -rf $(distdir)/xstc/Test)
+
+cleantar:
+ @(rm -f libxml*.tar.gz COPYING.LIB)
+
+rpm: cleanup cleantar
+ @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz)
+
+## We create xml2Conf.sh here and not from configure because we want
+## to get the paths expanded correctly. Macros like srcdir are given
+## the value NONE in configure if the user doesn't specify them (this
+## is an autoconf feature, not a bug).
+
+xml2Conf.sh: xml2Conf.sh.in Makefile
+## Use sed and then mv to avoid problems if the user interrupts.
+ sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
+ -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
+ -e 's?\@VERSION\@?$(VERSION)?g' \
+ -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
+ < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
+ && mv xml2Conf.tmp xml2Conf.sh
+
+CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res
+DISTCLEANFILES = COPYING missing.lst
+
+confexecdir=$(libdir)
+confexec_DATA = xml2Conf.sh
+CVS_EXTRA_DIST=
+EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
+ libxml.m4 Copyright check-xml-test-suite.py gentest.py \
+ check-relaxng-test-suite.py check-relaxng-test-suite2.py \
+ check-xsddata-test-suite.py check-xinclude-test-suite.py \
+ example/Makefile.am example/gjobread.c example/gjobs.xml \
+ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
+ libxml2-config.cmake.in \
+ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
+ triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
+ enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
+ dbgen.pl dbgenattr.pl regressions.py regressions.xml \
+ README.tests Makefile.tests libxml2.syms timsort.h \
+ $(CVS_EXTRA_DIST)
+
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libxml-2.0.pc
+
+cmakedir = $(libdir)/cmake/libxml2
+cmake_DATA = libxml2-config.cmake
+
+#
+# Install the tests program sources as examples
+#
+BASE_DIR=$(datadir)/doc
+DOC_MODULE=libxml2-$(VERSION)
+EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+ -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+ $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
+
+uninstall-local:
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
+ rm -rf $(DESTDIR)$(EXAMPLES_DIR)
+ rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
+ rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+
+tst: tst.c
+ $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma
+
+sparse: clean
+ $(MAKE) CC=cgcc
+
+#
+# Coverage support, largely borrowed from libvirt
+# Both binaries comes from the lcov package in Fedora
+#
+LCOV = /usr/bin/lcov
+GENHTML = /usr/bin/genhtml
+
+cov: clean-cov
+ if [ "`echo $(LDFLAGS) | grep coverage`" = "" ] ; then \
+ echo not configured with coverage; exit 1 ; fi
+ if [ ! -x $(LCOV) -o ! -x $(GENHTML) ] ; then \
+ echo Need $(LCOV) and $(GENHTML) excecutables; exit 1 ; fi
+ -@($(MAKE) check)
+ -@(./runsuite$(EXEEXT))
+ mkdir $(top_builddir)/coverage
+ $(LCOV) -c -o $(top_builddir)/coverage/libxml2.info.tmp -d $(top_srcdir)
+ $(LCOV) -r $(top_builddir)/coverage/libxml2.info.tmp -o $(top_builddir)/coverage/libxml2.info *usr*
+ rm $(top_builddir)/coverage/libxml2.info.tmp
+ $(GENHTML) -s -t "libxml2" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libxml2.info
+ echo "Coverage report is in $(top_builddir)/coverage/index.html"
+
+clean-cov:
+ rm -rf $(top_builddir)/coverage
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..fbe49ec
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,2917 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = testSchemas$(EXEEXT) testRelax$(EXEEXT) \
+ testSAX$(EXEEXT) testHTML$(EXEEXT) testXPath$(EXEEXT) \
+ testURI$(EXEEXT) testThreads$(EXEEXT) testC14N$(EXEEXT) \
+ testAutomata$(EXEEXT) testRegexp$(EXEEXT) testReader$(EXEEXT) \
+ testapi$(EXEEXT) testModule$(EXEEXT) runtest$(EXEEXT) \
+ runsuite$(EXEEXT) testchar$(EXEEXT) testdict$(EXEEXT) \
+ runxmlconf$(EXEEXT) testrecurse$(EXEEXT) testlimits$(EXEEXT)
+bin_PROGRAMS = xmllint$(EXEEXT) xmlcatalog$(EXEEXT)
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.h.in $(srcdir)/libxml.spec.in \
+ $(srcdir)/libxml-2.0.pc.in \
+ $(srcdir)/libxml-2.0-uninstalled.pc.in \
+ $(srcdir)/libxml2-config.cmake.in $(srcdir)/xml2-config.in \
+ depcomp COPYING TODO config.guess config.sub install-sh \
+ missing ltmain.sh
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = libxml2.spec libxml-2.0.pc \
+ libxml-2.0-uninstalled.pc libxml2-config.cmake xml2-config
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
+ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(cmakedir)" \
+ "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" \
+ "$(DESTDIR)$(pkgconfigdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libxml2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \
+ parserInternals.c parser.c tree.c hash.c list.c xmlIO.c \
+ xmlmemory.c uri.c valid.c xlink.c HTMLparser.c HTMLtree.c \
+ debugXML.c xpath.c xpointer.c xinclude.c nanohttp.c nanoftp.c \
+ DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.c \
+ buf.c xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
+ triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
+ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c \
+ schematron.c xzlib.c
+@WITH_SAX1_SOURCES_TRUE@am__objects_1 = DOCBparser.lo
+@WITH_TRIO_SOURCES_TRUE@am__objects_2 = triostr.lo trio.lo
+am_libxml2_la_OBJECTS = SAX.lo entities.lo encoding.lo error.lo \
+ parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo \
+ xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo \
+ HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo \
+ nanohttp.lo nanoftp.lo $(am__objects_1) catalog.lo globals.lo \
+ threads.lo c14n.lo xmlstring.lo buf.lo xmlregexp.lo \
+ xmlschemas.lo xmlschemastypes.lo xmlunicode.lo \
+ $(am__objects_2) xmlreader.lo relaxng.lo dict.lo SAX2.lo \
+ xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo \
+ xmlmodule.lo schematron.lo xzlib.lo
+libxml2_la_OBJECTS = $(am_libxml2_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libxml2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libxml2_la_LDFLAGS) $(LDFLAGS) -o $@
+testdso_la_LIBADD =
+am_testdso_la_OBJECTS = testdso.lo
+testdso_la_OBJECTS = $(am_testdso_la_OBJECTS)
+testdso_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testdso_la_LDFLAGS) $(LDFLAGS) -o $@
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am_runsuite_OBJECTS = runsuite.$(OBJEXT)
+runsuite_OBJECTS = $(am_runsuite_OBJECTS)
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(top_builddir)/libxml2.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+runsuite_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(runsuite_LDFLAGS) $(LDFLAGS) -o $@
+am_runtest_OBJECTS = runtest.$(OBJEXT)
+runtest_OBJECTS = $(am_runtest_OBJECTS)
+runtest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(runtest_LDFLAGS) $(LDFLAGS) -o $@
+am_runxmlconf_OBJECTS = runxmlconf.$(OBJEXT)
+runxmlconf_OBJECTS = $(am_runxmlconf_OBJECTS)
+runxmlconf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(runxmlconf_LDFLAGS) $(LDFLAGS) -o $@
+am_testAutomata_OBJECTS = testAutomata.$(OBJEXT)
+testAutomata_OBJECTS = $(am_testAutomata_OBJECTS)
+testAutomata_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testAutomata_LDFLAGS) $(LDFLAGS) -o $@
+am_testC14N_OBJECTS = testC14N.$(OBJEXT)
+testC14N_OBJECTS = $(am_testC14N_OBJECTS)
+testC14N_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testC14N_LDFLAGS) $(LDFLAGS) -o $@
+am_testHTML_OBJECTS = testHTML.$(OBJEXT)
+testHTML_OBJECTS = $(am_testHTML_OBJECTS)
+testHTML_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testHTML_LDFLAGS) $(LDFLAGS) -o $@
+am_testModule_OBJECTS = testModule.$(OBJEXT)
+testModule_OBJECTS = $(am_testModule_OBJECTS)
+testModule_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testModule_LDFLAGS) $(LDFLAGS) -o $@
+am_testReader_OBJECTS = testReader.$(OBJEXT)
+testReader_OBJECTS = $(am_testReader_OBJECTS)
+testReader_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testReader_LDFLAGS) $(LDFLAGS) -o $@
+am_testRegexp_OBJECTS = testRegexp.$(OBJEXT)
+testRegexp_OBJECTS = $(am_testRegexp_OBJECTS)
+testRegexp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testRegexp_LDFLAGS) $(LDFLAGS) -o $@
+am_testRelax_OBJECTS = testRelax.$(OBJEXT)
+testRelax_OBJECTS = $(am_testRelax_OBJECTS)
+testRelax_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testRelax_LDFLAGS) $(LDFLAGS) -o $@
+am_testSAX_OBJECTS = testSAX.$(OBJEXT)
+testSAX_OBJECTS = $(am_testSAX_OBJECTS)
+testSAX_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testSAX_LDFLAGS) $(LDFLAGS) -o $@
+am_testSchemas_OBJECTS = testSchemas.$(OBJEXT)
+testSchemas_OBJECTS = $(am_testSchemas_OBJECTS)
+testSchemas_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testSchemas_LDFLAGS) $(LDFLAGS) -o $@
+am__testThreads_SOURCES_DIST = testThreads.c testThreadsWin32.c
+@THREADS_W32_FALSE@am_testThreads_OBJECTS = testThreads.$(OBJEXT)
+@THREADS_W32_TRUE@am_testThreads_OBJECTS = testThreadsWin32.$(OBJEXT)
+testThreads_OBJECTS = $(am_testThreads_OBJECTS)
+testThreads_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testThreads_LDFLAGS) $(LDFLAGS) -o $@
+am_testURI_OBJECTS = testURI.$(OBJEXT)
+testURI_OBJECTS = $(am_testURI_OBJECTS)
+testURI_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testURI_LDFLAGS) $(LDFLAGS) -o $@
+am_testXPath_OBJECTS = testXPath.$(OBJEXT)
+testXPath_OBJECTS = $(am_testXPath_OBJECTS)
+testXPath_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testXPath_LDFLAGS) $(LDFLAGS) -o $@
+am_testapi_OBJECTS = testapi.$(OBJEXT)
+testapi_OBJECTS = $(am_testapi_OBJECTS)
+testapi_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testapi_LDFLAGS) $(LDFLAGS) -o $@
+am_testchar_OBJECTS = testchar.$(OBJEXT)
+testchar_OBJECTS = $(am_testchar_OBJECTS)
+testchar_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testchar_LDFLAGS) $(LDFLAGS) -o $@
+am_testdict_OBJECTS = testdict.$(OBJEXT)
+testdict_OBJECTS = $(am_testdict_OBJECTS)
+testdict_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testdict_LDFLAGS) $(LDFLAGS) -o $@
+am_testlimits_OBJECTS = testlimits.$(OBJEXT)
+testlimits_OBJECTS = $(am_testlimits_OBJECTS)
+testlimits_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testlimits_LDFLAGS) $(LDFLAGS) -o $@
+am_testrecurse_OBJECTS = testrecurse.$(OBJEXT)
+testrecurse_OBJECTS = $(am_testrecurse_OBJECTS)
+testrecurse_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testrecurse_LDFLAGS) $(LDFLAGS) -o $@
+am_xmlcatalog_OBJECTS = xmlcatalog.$(OBJEXT)
+xmlcatalog_OBJECTS = $(am_xmlcatalog_OBJECTS)
+xmlcatalog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(xmlcatalog_LDFLAGS) $(LDFLAGS) -o $@
+am_xmllint_OBJECTS = xmllint.$(OBJEXT)
+xmllint_OBJECTS = $(am_xmllint_OBJECTS)
+xmllint_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(xmllint_LDFLAGS) $(LDFLAGS) -o $@
+SCRIPTS = $(bin_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libxml2_la_SOURCES) $(testdso_la_SOURCES) \
+ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \
+ $(testAutomata_SOURCES) $(testC14N_SOURCES) \
+ $(testHTML_SOURCES) $(testModule_SOURCES) \
+ $(testReader_SOURCES) $(testRegexp_SOURCES) \
+ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \
+ $(testThreads_SOURCES) $(testURI_SOURCES) $(testXPath_SOURCES) \
+ $(testapi_SOURCES) $(testchar_SOURCES) $(testdict_SOURCES) \
+ $(testlimits_SOURCES) $(testrecurse_SOURCES) \
+ $(xmlcatalog_SOURCES) $(xmllint_SOURCES)
+DIST_SOURCES = $(am__libxml2_la_SOURCES_DIST) $(testdso_la_SOURCES) \
+ $(runsuite_SOURCES) $(runtest_SOURCES) $(runxmlconf_SOURCES) \
+ $(testAutomata_SOURCES) $(testC14N_SOURCES) \
+ $(testHTML_SOURCES) $(testModule_SOURCES) \
+ $(testReader_SOURCES) $(testRegexp_SOURCES) \
+ $(testRelax_SOURCES) $(testSAX_SOURCES) $(testSchemas_SOURCES) \
+ $(am__testThreads_SOURCES_DIST) $(testURI_SOURCES) \
+ $(testXPath_SOURCES) $(testapi_SOURCES) $(testchar_SOURCES) \
+ $(testdict_SOURCES) $(testlimits_SOURCES) \
+ $(testrecurse_SOURCES) $(xmlcatalog_SOURCES) \
+ $(xmllint_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+man1dir = $(mandir)/man1
+man3dir = $(mandir)/man3
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(cmake_DATA) $(confexec_DATA) $(m4data_DATA) $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
+DIST_SUBDIRS = include . doc example python xstc
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
+bin_SCRIPTS = xml2-config
+lib_LTLIBRARIES = libxml2.la
+libxml2_la_LIBADD = $(ICU_LIBS) $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
+@USE_VERSION_SCRIPT_FALSE@LIBXML2_VERSION_SCRIPT =
+@USE_VERSION_SCRIPT_TRUE@LIBXML2_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxml2.syms
+libxml2_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) \
+ $(LIBXML2_VERSION_SCRIPT) \
+ -version-info $(LIBXML_VERSION_INFO) \
+ $(MODULE_PLATFORM_LIBS)
+
+@WITH_SAX1_SOURCES_FALSE@docb_sources =
+@WITH_SAX1_SOURCES_TRUE@docb_sources = DOCBparser.c
+@WITH_TRIO_SOURCES_FALSE@trio_sources =
+@WITH_TRIO_SOURCES_TRUE@trio_sources = triostr.c trio.c
+libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
+ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
+ valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
+ xpointer.c xinclude.c nanohttp.c nanoftp.c \
+ $(docb_sources) \
+ catalog.c globals.c threads.c c14n.c xmlstring.c buf.c \
+ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
+ $(trio_sources) \
+ xmlreader.c relaxng.c dict.c SAX2.c \
+ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
+ xmlmodule.c schematron.c xzlib.c
+
+DEPS = $(top_builddir)/libxml2.la
+LDADDS = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
+man_MANS = xml2-config.1 libxml.3
+m4datadir = $(datadir)/aclocal
+m4data_DATA = libxml.m4
+runtest_SOURCES = runtest.c
+runtest_LDFLAGS =
+runtest_DEPENDENCIES = $(DEPS)
+runtest_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+testrecurse_SOURCES = testrecurse.c
+testrecurse_LDFLAGS =
+testrecurse_DEPENDENCIES = $(DEPS)
+testrecurse_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+testlimits_SOURCES = testlimits.c
+testlimits_LDFLAGS =
+testlimits_DEPENDENCIES = $(DEPS)
+testlimits_LDADD = $(BASE_THREAD_LIBS) $(RDL_LIBS) $(LDADDS)
+testchar_SOURCES = testchar.c
+testchar_LDFLAGS =
+testchar_DEPENDENCIES = $(DEPS)
+testchar_LDADD = $(RDL_LIBS) $(LDADDS)
+testdict_SOURCES = testdict.c
+testdict_LDFLAGS =
+testdict_DEPENDENCIES = $(DEPS)
+testdict_LDADD = $(RDL_LIBS) $(LDADDS)
+runsuite_SOURCES = runsuite.c
+runsuite_LDFLAGS =
+runsuite_DEPENDENCIES = $(DEPS)
+runsuite_LDADD = $(RDL_LIBS) $(LDADDS)
+xmllint_SOURCES = xmllint.c
+xmllint_LDFLAGS =
+xmllint_DEPENDENCIES = $(DEPS)
+xmllint_LDADD = $(RDL_LIBS) $(LDADDS)
+testSAX_SOURCES = testSAX.c
+testSAX_LDFLAGS =
+testSAX_DEPENDENCIES = $(DEPS)
+testSAX_LDADD = $(LDADDS)
+testHTML_SOURCES = testHTML.c
+testHTML_LDFLAGS =
+testHTML_DEPENDENCIES = $(DEPS)
+testHTML_LDADD = $(LDADDS)
+xmlcatalog_SOURCES = xmlcatalog.c
+xmlcatalog_LDFLAGS =
+xmlcatalog_DEPENDENCIES = $(DEPS)
+xmlcatalog_LDADD = $(RDL_LIBS) $(LDADDS)
+testXPath_SOURCES = testXPath.c
+testXPath_LDFLAGS =
+testXPath_DEPENDENCIES = $(DEPS)
+testXPath_LDADD = $(LDADDS)
+testC14N_SOURCES = testC14N.c
+testC14N_LDFLAGS =
+testC14N_DEPENDENCIES = $(DEPS)
+testC14N_LDADD = $(LDADDS)
+@THREADS_W32_FALSE@testThreads_SOURCES = testThreads.c
+@THREADS_W32_TRUE@testThreads_SOURCES = testThreadsWin32.c
+testThreads_LDFLAGS =
+testThreads_DEPENDENCIES = $(DEPS)
+testThreads_LDADD = $(BASE_THREAD_LIBS) $(LDADDS)
+testURI_SOURCES = testURI.c
+testURI_LDFLAGS =
+testURI_DEPENDENCIES = $(DEPS)
+testURI_LDADD = $(LDADDS)
+testRegexp_SOURCES = testRegexp.c
+testRegexp_LDFLAGS =
+testRegexp_DEPENDENCIES = $(DEPS)
+testRegexp_LDADD = $(LDADDS)
+testAutomata_SOURCES = testAutomata.c
+testAutomata_LDFLAGS =
+testAutomata_DEPENDENCIES = $(DEPS)
+testAutomata_LDADD = $(LDADDS)
+testSchemas_SOURCES = testSchemas.c
+testSchemas_LDFLAGS =
+testSchemas_DEPENDENCIES = $(DEPS)
+testSchemas_LDADD = $(LDADDS)
+testRelax_SOURCES = testRelax.c
+testRelax_LDFLAGS =
+testRelax_DEPENDENCIES = $(DEPS)
+testRelax_LDADD = $(LDADDS)
+testReader_SOURCES = testReader.c
+testReader_LDFLAGS =
+testReader_DEPENDENCIES = $(DEPS)
+testReader_LDADD = $(LDADDS)
+testModule_SOURCES = testModule.c
+testModule_LDFLAGS =
+testModule_DEPENDENCIES = $(DEPS)
+testModule_LDADD = $(LDADDS)
+noinst_LTLIBRARIES = testdso.la
+testdso_la_SOURCES = testdso.c
+testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
+BUILT_SOURCES = testapi.c
+testapi_SOURCES = testapi.c
+testapi_LDFLAGS =
+testapi_DEPENDENCIES = $(DEPS)
+testapi_LDADD = $(LDADDS)
+runxmlconf_SOURCES = runxmlconf.c
+runxmlconf_LDFLAGS =
+runxmlconf_DEPENDENCIES = $(DEPS)
+runxmlconf_LDADD = $(LDADDS)
+CLEANFILES = runxmlconf.log test.out xml2Conf.sh *.gcda *.gcno *.res
+DISTCLEANFILES = COPYING missing.lst
+confexecdir = $(libdir)
+confexec_DATA = xml2Conf.sh
+CVS_EXTRA_DIST =
+EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml2.spec \
+ libxml.m4 Copyright check-xml-test-suite.py gentest.py \
+ check-relaxng-test-suite.py check-relaxng-test-suite2.py \
+ check-xsddata-test-suite.py check-xinclude-test-suite.py \
+ example/Makefile.am example/gjobread.c example/gjobs.xml \
+ $(man_MANS) libxml-2.0.pc.in libxml-2.0-uninstalled.pc.in \
+ libxml2-config.cmake.in \
+ trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
+ triop.h triodef.h libxml.h elfgcchack.h xzlib.h buf.h \
+ enc.h save.h testThreadsWin32.c genUnicode.py TODO_SCHEMAS \
+ dbgen.pl dbgenattr.pl regressions.py regressions.xml \
+ README.tests Makefile.tests libxml2.syms timsort.h \
+ $(CVS_EXTRA_DIST)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libxml-2.0.pc
+cmakedir = $(libdir)/cmake/libxml2
+cmake_DATA = libxml2-config.cmake
+
+#
+# Install the tests program sources as examples
+#
+BASE_DIR = $(datadir)/doc
+DOC_MODULE = libxml2-$(VERSION)
+EXAMPLES_DIR = $(BASE_DIR)/$(DOC_MODULE)/examples
+
+#
+# Coverage support, largely borrowed from libvirt
+# Both binaries comes from the lcov package in Fedora
+#
+LCOV = /usr/bin/lcov
+GENHTML = /usr/bin/genhtml
+all: $(BUILT_SOURCES) config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+libxml2.spec: $(top_builddir)/config.status $(srcdir)/libxml.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libxml-2.0.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libxml-2.0-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/libxml-2.0-uninstalled.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libxml2-config.cmake: $(top_builddir)/config.status $(srcdir)/libxml2-config.cmake.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+xml2-config: $(top_builddir)/config.status $(srcdir)/xml2-config.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS)
+
+testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(testdso_la_LINK) $(testdso_la_OBJECTS) $(testdso_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+runsuite$(EXEEXT): $(runsuite_OBJECTS) $(runsuite_DEPENDENCIES) $(EXTRA_runsuite_DEPENDENCIES)
+ @rm -f runsuite$(EXEEXT)
+ $(AM_V_CCLD)$(runsuite_LINK) $(runsuite_OBJECTS) $(runsuite_LDADD) $(LIBS)
+
+runtest$(EXEEXT): $(runtest_OBJECTS) $(runtest_DEPENDENCIES) $(EXTRA_runtest_DEPENDENCIES)
+ @rm -f runtest$(EXEEXT)
+ $(AM_V_CCLD)$(runtest_LINK) $(runtest_OBJECTS) $(runtest_LDADD) $(LIBS)
+
+runxmlconf$(EXEEXT): $(runxmlconf_OBJECTS) $(runxmlconf_DEPENDENCIES) $(EXTRA_runxmlconf_DEPENDENCIES)
+ @rm -f runxmlconf$(EXEEXT)
+ $(AM_V_CCLD)$(runxmlconf_LINK) $(runxmlconf_OBJECTS) $(runxmlconf_LDADD) $(LIBS)
+
+testAutomata$(EXEEXT): $(testAutomata_OBJECTS) $(testAutomata_DEPENDENCIES) $(EXTRA_testAutomata_DEPENDENCIES)
+ @rm -f testAutomata$(EXEEXT)
+ $(AM_V_CCLD)$(testAutomata_LINK) $(testAutomata_OBJECTS) $(testAutomata_LDADD) $(LIBS)
+
+testC14N$(EXEEXT): $(testC14N_OBJECTS) $(testC14N_DEPENDENCIES) $(EXTRA_testC14N_DEPENDENCIES)
+ @rm -f testC14N$(EXEEXT)
+ $(AM_V_CCLD)$(testC14N_LINK) $(testC14N_OBJECTS) $(testC14N_LDADD) $(LIBS)
+
+testHTML$(EXEEXT): $(testHTML_OBJECTS) $(testHTML_DEPENDENCIES) $(EXTRA_testHTML_DEPENDENCIES)
+ @rm -f testHTML$(EXEEXT)
+ $(AM_V_CCLD)$(testHTML_LINK) $(testHTML_OBJECTS) $(testHTML_LDADD) $(LIBS)
+
+testModule$(EXEEXT): $(testModule_OBJECTS) $(testModule_DEPENDENCIES) $(EXTRA_testModule_DEPENDENCIES)
+ @rm -f testModule$(EXEEXT)
+ $(AM_V_CCLD)$(testModule_LINK) $(testModule_OBJECTS) $(testModule_LDADD) $(LIBS)
+
+testReader$(EXEEXT): $(testReader_OBJECTS) $(testReader_DEPENDENCIES) $(EXTRA_testReader_DEPENDENCIES)
+ @rm -f testReader$(EXEEXT)
+ $(AM_V_CCLD)$(testReader_LINK) $(testReader_OBJECTS) $(testReader_LDADD) $(LIBS)
+
+testRegexp$(EXEEXT): $(testRegexp_OBJECTS) $(testRegexp_DEPENDENCIES) $(EXTRA_testRegexp_DEPENDENCIES)
+ @rm -f testRegexp$(EXEEXT)
+ $(AM_V_CCLD)$(testRegexp_LINK) $(testRegexp_OBJECTS) $(testRegexp_LDADD) $(LIBS)
+
+testRelax$(EXEEXT): $(testRelax_OBJECTS) $(testRelax_DEPENDENCIES) $(EXTRA_testRelax_DEPENDENCIES)
+ @rm -f testRelax$(EXEEXT)
+ $(AM_V_CCLD)$(testRelax_LINK) $(testRelax_OBJECTS) $(testRelax_LDADD) $(LIBS)
+
+testSAX$(EXEEXT): $(testSAX_OBJECTS) $(testSAX_DEPENDENCIES) $(EXTRA_testSAX_DEPENDENCIES)
+ @rm -f testSAX$(EXEEXT)
+ $(AM_V_CCLD)$(testSAX_LINK) $(testSAX_OBJECTS) $(testSAX_LDADD) $(LIBS)
+
+testSchemas$(EXEEXT): $(testSchemas_OBJECTS) $(testSchemas_DEPENDENCIES) $(EXTRA_testSchemas_DEPENDENCIES)
+ @rm -f testSchemas$(EXEEXT)
+ $(AM_V_CCLD)$(testSchemas_LINK) $(testSchemas_OBJECTS) $(testSchemas_LDADD) $(LIBS)
+
+testThreads$(EXEEXT): $(testThreads_OBJECTS) $(testThreads_DEPENDENCIES) $(EXTRA_testThreads_DEPENDENCIES)
+ @rm -f testThreads$(EXEEXT)
+ $(AM_V_CCLD)$(testThreads_LINK) $(testThreads_OBJECTS) $(testThreads_LDADD) $(LIBS)
+
+testURI$(EXEEXT): $(testURI_OBJECTS) $(testURI_DEPENDENCIES) $(EXTRA_testURI_DEPENDENCIES)
+ @rm -f testURI$(EXEEXT)
+ $(AM_V_CCLD)$(testURI_LINK) $(testURI_OBJECTS) $(testURI_LDADD) $(LIBS)
+
+testXPath$(EXEEXT): $(testXPath_OBJECTS) $(testXPath_DEPENDENCIES) $(EXTRA_testXPath_DEPENDENCIES)
+ @rm -f testXPath$(EXEEXT)
+ $(AM_V_CCLD)$(testXPath_LINK) $(testXPath_OBJECTS) $(testXPath_LDADD) $(LIBS)
+
+testapi$(EXEEXT): $(testapi_OBJECTS) $(testapi_DEPENDENCIES) $(EXTRA_testapi_DEPENDENCIES)
+ @rm -f testapi$(EXEEXT)
+ $(AM_V_CCLD)$(testapi_LINK) $(testapi_OBJECTS) $(testapi_LDADD) $(LIBS)
+
+testchar$(EXEEXT): $(testchar_OBJECTS) $(testchar_DEPENDENCIES) $(EXTRA_testchar_DEPENDENCIES)
+ @rm -f testchar$(EXEEXT)
+ $(AM_V_CCLD)$(testchar_LINK) $(testchar_OBJECTS) $(testchar_LDADD) $(LIBS)
+
+testdict$(EXEEXT): $(testdict_OBJECTS) $(testdict_DEPENDENCIES) $(EXTRA_testdict_DEPENDENCIES)
+ @rm -f testdict$(EXEEXT)
+ $(AM_V_CCLD)$(testdict_LINK) $(testdict_OBJECTS) $(testdict_LDADD) $(LIBS)
+
+testlimits$(EXEEXT): $(testlimits_OBJECTS) $(testlimits_DEPENDENCIES) $(EXTRA_testlimits_DEPENDENCIES)
+ @rm -f testlimits$(EXEEXT)
+ $(AM_V_CCLD)$(testlimits_LINK) $(testlimits_OBJECTS) $(testlimits_LDADD) $(LIBS)
+
+testrecurse$(EXEEXT): $(testrecurse_OBJECTS) $(testrecurse_DEPENDENCIES) $(EXTRA_testrecurse_DEPENDENCIES)
+ @rm -f testrecurse$(EXEEXT)
+ $(AM_V_CCLD)$(testrecurse_LINK) $(testrecurse_OBJECTS) $(testrecurse_LDADD) $(LIBS)
+
+xmlcatalog$(EXEEXT): $(xmlcatalog_OBJECTS) $(xmlcatalog_DEPENDENCIES) $(EXTRA_xmlcatalog_DEPENDENCIES)
+ @rm -f xmlcatalog$(EXEEXT)
+ $(AM_V_CCLD)$(xmlcatalog_LINK) $(xmlcatalog_OBJECTS) $(xmlcatalog_LDADD) $(LIBS)
+
+xmllint$(EXEEXT): $(xmllint_OBJECTS) $(xmllint_DEPENDENCIES) $(EXTRA_xmllint_DEPENDENCIES)
+ @rm -f xmllint$(EXEEXT)
+ $(AM_V_CCLD)$(xmllint_LINK) $(xmllint_OBJECTS) $(xmllint_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DOCBparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTMLparser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTMLtree.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAX2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c14n.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/catalog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chvalid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugXML.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encoding.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entities.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legacy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanoftp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanohttp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parserInternals.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pattern.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relaxng.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runsuite.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runxmlconf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schematron.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAutomata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testC14N.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testHTML.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testModule.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testReader.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRegexp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRelax.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSAX.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSchemas.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreads.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testThreadsWin32.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testURI.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testXPath.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testapi.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testchar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdict.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdso.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlimits.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testrecurse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/triostr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uri.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xinclude.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlIO.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlcatalog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmllint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlmemory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlmodule.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlreader.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlregexp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlsave.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlschemas.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlschemastypes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlstring.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlunicode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlwriter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpointer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xzlib.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-man3: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man3dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.3[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man3:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man3dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.3[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
+install-cmakeDATA: $(cmake_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(cmake_DATA)'; test -n "$(cmakedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(cmakedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(cmakedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cmakedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(cmakedir)" || exit $$?; \
+ done
+
+uninstall-cmakeDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(cmake_DATA)'; test -n "$(cmakedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(cmakedir)'; $(am__uninstall_files_from_dir)
+install-confexecDATA: $(confexec_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(confexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(confexecdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(confexecdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(confexecdir)" || exit $$?; \
+ done
+
+uninstall-confexecDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(confexec_DATA)'; test -n "$(confexecdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(confexecdir)'; $(am__uninstall_files_from_dir)
+install-m4dataDATA: $(m4data_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(m4datadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(m4datadir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \
+ done
+
+uninstall-m4dataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(m4datadir)'; $(am__uninstall_files_from_dir)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
+ config.h
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(confexecdir)" "$(DESTDIR)$(m4datadir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-cmakeDATA install-data-local \
+ install-m4dataDATA install-man install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-confexecDATA install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1 install-man3
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-cmakeDATA uninstall-confexecDATA \
+ uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \
+ uninstall-man uninstall-pkgconfigDATA
+
+uninstall-man: uninstall-man1 uninstall-man3
+
+.MAKE: $(am__recursive_targets) all check install install-am \
+ install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-binPROGRAMS \
+ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \
+ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-binSCRIPTS install-cmakeDATA \
+ install-confexecDATA install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-m4dataDATA \
+ install-man install-man1 install-man3 install-pdf \
+ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-cmakeDATA uninstall-confexecDATA \
+ uninstall-libLTLIBRARIES uninstall-local uninstall-m4dataDATA \
+ uninstall-man uninstall-man1 uninstall-man3 \
+ uninstall-pkgconfigDATA
+
+
+# that one forces the rebuild when "make rebuild" is run on doc/
+rebuild_testapi:
+ -@(if [ "$(PYTHON)" != "" ] ; then \
+ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
+
+# that one is just to make sure it is rebuilt if missing
+# but adding the dependances generate mess
+testapi.c: $(srcdir)/gentest.py
+ -@(if [ "$(PYTHON)" != "" ] ; then \
+ $(PYTHON) $(srcdir)/gentest.py $(srcdir) ; fi )
+
+#testOOM_SOURCES=testOOM.c testOOMlib.h testOOMlib.c
+#testOOM_LDFLAGS =
+#testOOM_DEPENDENCIES = $(DEPS)
+#testOOM_LDADD= $(LDADDS)
+
+runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
+ @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+ $(MAKE) tests ; fi)
+
+check: all runtests
+
+check-valgrind valgrind: all
+ @echo '## Running the regression tests under Valgrind'
+ @echo '## Go get a cup of coffee it is gonna take a while ...'
+ $(MAKE) CHECKER='valgrind -q' runtests
+
+testall : tests SVGtests SAXtests
+
+tests: XMLtests XMLenttests NStests IDtests Errtests APItests $(READER_TEST) $(TEST_SAX) $(TEST_PUSH) $(TEST_HTML) $(TEST_PHTML) $(TEST_VALID) URItests $(TEST_PATTERN) $(TEST_XPATH) $(TEST_XPTR) $(TEST_XINCLUDE) $(TEST_C14N) $(TEST_DEBUG) $(TEST_CATALOG) $(TEST_REGEXPS) $(TEST_SCHEMAS) $(TEST_SCHEMATRON) $(TEST_THREADS) Timingtests $(TEST_VTIME) $(PYTHON_TESTS) $(TEST_MODULES)
+ @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
+ $(MAKE) tests ; fi)
+ @(cd doc/examples ; $(MAKE) tests)
+
+APItests: testapi$(EXEEXT)
+ @echo "## Running the API regression tests this may take a little while"
+ -@($(CHECKER) $(top_builddir)/testapi -q)
+
+HTMLtests : testHTML$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## HTML regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML $$i > result.$$name 2> error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name result.$$name ; \
+ diff -b $(srcdir)/result/HTML/$$name.err error.$$name ; \
+ $(CHECKER) $(top_builddir)/testHTML result.$$name > result2.$$name 2>error.$$name ; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name error.$$name ; \
+ fi ; fi ; done)
+
+HTMLPushtests : testHTML$(EXEEXT)
+ @echo "## Push HTML regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push $$i > $(srcdir)/result/HTML/$$name 2>$(srcdir)/result/HTML/$$name.err ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --push $$i > result.$$name 2> error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name result.$$name ; \
+ cut -b 1-15 $(srcdir)/result/HTML/$$name.err > errorcut.$$name; \
+ cut -b 1-15 error.$$name > errorcut2.$$name; \
+ diff -b errorcut.$$name errorcut2.$$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push result.$$name > result2.$$name 2>error.$$name ; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name error.$$name errorcut.$$name errorcut2.$$name ; \
+ fi ; fi ; done)
+ @echo "## HTML SAX regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name.sax ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --sax $$i > result.$$name.sax ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name.sax ; \
+ fi ; fi ; done)
+ @echo "## Push HTML SAX regression tests"
+ -@(for i in $(srcdir)/test/HTML/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/HTML/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testHTML --push --sax $$i > $(srcdir)/result/HTML/$$name.sax ; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testHTML --push --sax $$i 2>&1 > result.$$name.sax ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/HTML/$$name.sax result.$$name.sax` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name.sax ; \
+ fi ; fi ; done)
+
+XMLtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ;\
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+ @echo "## XML regression tests on memory"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --memory $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ diff result.$$name result2.$$name ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+XMLPushtests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML push regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --push $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --push result.$$name 2>&1 > result2.$$name | grep -v 'failed to load external entity' ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+NStests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML Namespaces regression tests"
+ -@(for i in $(srcdir)/test/namespaces/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/namespaces/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i \
+ 2> $(srcdir)/result/namespaces/$$name.err \
+ > $(srcdir)/result/namespaces/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/namespaces/$$name result.$$name ; \
+ diff $(srcdir)/result/namespaces/$$name.err error.$$name`; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+IDtests : xmllint$(EXEEXT) testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## xml:id regression tests"
+ -@(for i in $(srcdir)/test/xmlid/id_*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/xmlid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" \
+ 2> $(srcdir)/result/xmlid/$$name.err \
+ > $(srcdir)/result/xmlid/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -i $$i "id('bar')" 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/xmlid/$$name result.$$name ; \
+ diff $(srcdir)/result/xmlid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Errtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Error cases regression tests"
+ -@(for i in $(srcdir)/test/errors/*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/errors/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i \
+ 2> $(srcdir)/result/errors/$$name.err \
+ > $(srcdir)/result/errors/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint $$i 2> error.$$name > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/errors/$$name result.$$name ; \
+ diff $(srcdir)/result/errors/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ @echo "## Error cases stream regression tests"
+ -@(for i in $(srcdir)/test/errors/*.xml ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/errors/$$name.str ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --stream $$i \
+ 2> $(srcdir)/result/errors/$$name.str \
+ > /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm error.$$name ; \
+ fi ; fi ; done)
+
+Docbtests : xmllint$(EXEEXT)
+
+XMLenttests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XML entity subst regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/noent/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent $$i > $(srcdir)/result/noent/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noent $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff $(srcdir)/result/noent/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent result.$$name 2>&1 > result2.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result.$$name result2.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+URItests : testURI$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## URI module regression tests"
+ -@(for i in $(srcdir)/test/URI/*.data ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i > $(srcdir)/result/URI/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testURI -base 'http://foo.com/path/to/index.html?orig#help' < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/URI/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/URI/*.uri ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/URI/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testURI < $$i > $(srcdir)/result/URI/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testURI < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/URI/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+XPathtests : testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XPath regression tests"
+ -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
+ then echo Skipping debug not compiled in ; exit 0 ; fi ; \
+ for i in $(srcdir)/test/XPath/expr/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -f --expr $$i > $(srcdir)/result/XPath/expr/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -f --expr $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/expr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; \
+ for i in $(srcdir)/test/XPath/docs/* ; do \
+ if [ ! -d $$i ] ; then \
+ doc=`basename $$i`; \
+ for j in $(srcdir)/test/XPath/tests/$$doc* ; do \
+ if [ ! -f $$j ] ; then continue ; fi ; \
+ name=`basename $$j`; \
+ if [ ! -d $$j ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/tests/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j > $(srcdir)/result/XPath/tests/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -f -i $$i $$j 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/tests/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; fi ; done)
+
+XPtrtests : testXPath$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XPointer regression tests"
+ -@(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \
+ then echo Skipping debug not compiled in ; exit 0 ; fi ; \
+ for i in $(srcdir)/test/XPath/docs/* ; do \
+ if [ ! -d $$i ] ; then \
+ doc=`basename $$i`; \
+ for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \
+ if [ ! -f $$j ] ; then continue ; fi ; \
+ name=`basename $$j`; \
+ if [ ! -d $$j ] ; then \
+ if [ ! -f $(srcdir)/result/XPath/xptr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j > $(srcdir)/result/XPath/xptr/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ else \
+ log=`$(CHECKER) $(top_builddir)/testXPath -xptr -f -i $$i $$j 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XPath/xptr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ; fi ; done)
+
+XIncludetests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## XInclude regression tests"
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name result.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > $(srcdir)/result/XInclude/$$name 2> $(srcdir)/result/XInclude/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name result.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ @(echo > .memdump)
+ @echo "## XInclude xmlReader regression tests"
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/XInclude/docs/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/XInclude/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nowarning --noxincludenode --stream --debug $$i > $(srcdir)/result/XInclude/$$name.rdr ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nowarning --xinclude --stream --debug $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/XInclude/$$name.err error.$$name ; \
+ diff $(srcdir)/result/XInclude/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Scripttests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Scripts regression tests"
+ @echo "## Some of the base computations may be different if srcdir != ."
+ -@(for i in $(srcdir)/test/scripts/*.script ; do \
+ name=`basename $$i .script`; \
+ xml=$(srcdir)/test/scripts/`basename $$i .script`.xml; \
+ if [ -f $$xml ] ; then \
+ if [ ! -f $(srcdir)/result/scripts/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > $(srcdir)/result/scripts/$$name 2> $(srcdir)/result/scripts/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --shell $$xml < $$i > result.$$name 2> result.$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/scripts/$$name result.$$name ; \
+ diff $(srcdir)/result/scripts/$$name.err result.$$name.err` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name result.$$name.err ; \
+ fi ; fi ; done)
+
+Catatests : xmlcatalog$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Catalog regression tests"
+ -@(for i in $(srcdir)/test/catalogs/*.script ; do \
+ name=`basename $$i .script`; \
+ xml=$(srcdir)/test/catalogs/`basename $$i .script`.xml; \
+ if [ -f $$xml ] ; then \
+ if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > $(srcdir)/result/catalogs/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$xml < $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ -@(for i in $(srcdir)/test/catalogs/*.script ; do \
+ name=`basename $$i .script`; \
+ sgml=$(srcdir)/test/catalogs/`basename $$i .script`.sgml; \
+ if [ -f $$sgml ] ; then \
+ if [ ! -f $(srcdir)/result/catalogs/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > $(srcdir)/result/catalogs/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmlcatalog --shell $$sgml < $$i > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/catalogs/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Add and del operations on XML Catalogs"
+ -@($(CHECKER) $(top_builddir)/xmlcatalog --create --noout $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid sysid $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid2 sysid2 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --add public Pubid3 sysid3 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result/catalogs/mycatalog.full $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid3 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ $(CHECKER) $(top_builddir)/xmlcatalog --noout --del sysid2 $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ diff result/catalogs/mycatalog.empty $(srcdir)/result/catalogs/mycatalog; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ rm -f $(srcdir)/result/catalogs/mycatalog)
+
+SVGtests : xmllint$(EXEEXT)
+ @echo "## SVG parsing regression tests"
+ -@(for i in $(srcdir)/test/SVG/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/SVG/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > $(srcdir)/result/SVG/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ echo Testing $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint $$i > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/SVG/$$name result.$$name ; \
+ $(CHECKER) $(top_builddir)/xmllint result.$$name > result2.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff result.$$name result2.$$name ; \
+ rm result.$$name result2.$$name ; \
+ fi ; fi ; done)
+
+Threadtests : testThreads$(EXEEXT)
+ @echo "## Threaded regression tests"
+ -@($(CHECKER) $(top_builddir)/testThreads ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
+ exit 0)
+
+Readertests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Reader regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Reader on memory regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --memory --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @(echo > .memdump)
+ @echo "## Walker regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rdr ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > $(srcdir)/result/$$name.rdr 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --nonet --debug --walker $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rdr result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Reader entities substitution regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.rde ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > $(srcdir)/result/$$name.rde 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noent --nonet --debug --stream $$i > result.$$name 2>/dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.rde result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+SAXtests : testSAX$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## SAX1 callbacks regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.sax ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testSAX $$i > $(srcdir)/result/$$name.sax 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSAX $$i > result.$$name 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.sax result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## SAX2 callbacks regression tests"
+ -@(for i in $(srcdir)/test/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/$$name.sax2 ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testSAX --sax2 $$i > $(srcdir)/result/$$name.sax2 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSAX --sax2 $$i > result.$$name 2> /dev/null ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/$$name.sax2 result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+Validtests : xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Valid documents regression tests"
+ -@(for i in $(srcdir)/test/VCM/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ log=`$(CHECKER) $(top_builddir)/xmllint --valid --noout --nowarning $$i ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"`;\
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ fi ; done ; exit 0)
+ @echo "## Validity checking regression tests"
+ -@(for i in $(srcdir)/test/VC/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/VC/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> $(srcdir)/result/VC/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --noout --valid $$i 2> result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/VC/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## General documents valid regression tests"
+ -@(for i in $(srcdir)/test/valid/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/valid/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint --valid $$i > $(srcdir)/result/valid/$$name 2>$(srcdir)/result/valid/$$name.err ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint --valid $$i > result.$$name 2>error.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/valid/$$name result.$$name ; \
+ diff $(srcdir)/result/valid/$$name.err error.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name error.$$name ; \
+ fi ; fi ; done)
+
+Regexptests: testRegexp$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Regexp regression tests"
+ -@(for i in $(srcdir)/test/regexp/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testRegexp -i $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/regexp/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+ @echo "## Formal expresssions regression tests"
+ -@(for i in $(srcdir)/test/expr/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/expr/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/expr/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+Automatatests: testAutomata$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Automata regression tests"
+ -@(for i in $(srcdir)/test/automata/* ; do \
+ name=`basename $$i`; \
+ if [ ! -d $$i ] ; then \
+ if [ ! -f $(srcdir)/result/automata/$$name ] ; then \
+ echo New test file $$name ; \
+ $(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testAutomata $$i 2>&1 > result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/automata/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done)
+
+dba100000.xml: dbgenattr.pl
+ @echo "## generating dba100000.xml"
+ @($(PERL) $(top_srcdir)/dbgenattr.pl 100000 > dba100000.xml)
+
+Timingtests: xmllint$(EXEEXT) dba100000.xml
+ @echo "## Timing tests to try to detect performance"
+ @echo "## as well a memory usage breakage when streaming"
+ @echo "## 1/ using the file interface"
+ @echo "## 2/ using the memory interface"
+ @echo "## 3/ repeated DOM parsing"
+ @echo "## 4/ repeated DOM validation"
+ -@($(top_builddir)/xmllint --stream --timing dba100000.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+ -@($(top_builddir)/xmllint --stream --timing --memory dba100000.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+ -@($(top_builddir)/xmllint --noout --timing --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+
+VTimingtests: xmllint$(EXEEXT)
+ -@($(top_builddir)/xmllint --noout --timing --valid --repeat $(srcdir)/test/valid/REC-xml-19980210.xml; \
+ MEM=`cat .memdump | grep "MEMORY ALLOCATED" | awk '{ print $$7}'`;\
+ if [ "$$MEM" != "" ] ; then echo Using $$MEM bytes ; fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ exit 0)
+
+C14Ntests : testC14N$(EXEEXT)
+ @echo "## C14N and XPath regression tests"
+ -@(for m in with-comments without-comments 1-1-without-comments exc-without-comments ; do \
+ for i in $(srcdir)/test/c14n/$$m/*.xml ; do \
+ if [ ! -d $$i ] ; then \
+ name=`basename $$i .xml`; \
+ cmdline="$(CHECKER) $(top_builddir)/testC14N --$$m $$i"; \
+ if [ -f $(srcdir)/test/c14n/$$m/$$name.xpath ] ; then \
+ cmdline="$$cmdline $(srcdir)/test/c14n/$$m/$$name.xpath"; \
+ if [ -f $(srcdir)/test/c14n/$$m/$$name.ns ] ; then \
+ cmdline="$$cmdline '`cat $(srcdir)/test/c14n/$$m/$$name.ns`'"; \
+ fi; \
+ fi; \
+ $$cmdline > $(srcdir)/test/c14n/test.tmp; \
+ if [ $$? -eq 0 ]; then \
+ diff $(srcdir)/result/c14n/$$m/$$name $(srcdir)/test/c14n/test.tmp; \
+ if [ $$? -ne 0 ]; then \
+ echo "Test $$m/$$name failed"; \
+ cat $(srcdir)/test/c14n/test.tmp; \
+ fi; \
+ else \
+ echo "C14N failed"; \
+ fi; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ fi; \
+ rm -f $(srcdir)/test/c14n/test.tmp; \
+ done; \
+ done)
+
+Schemastests: testSchemas$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Schemas regression tests"
+ -@(for i in $(srcdir)/test/schemas/*_*.xsd ; do \
+ name=`basename $$i | sed 's+_.*++'`; \
+ sno=`basename $$i | sed 's+.*_\(.*\).xsd+\1+'`; \
+ for j in $(srcdir)/test/schemas/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$sno"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/testSchemas $$i $$j \
+ > $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
+ 2> $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/testSchemas $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/schemas/"$$name"_"$$sno"_"$$xno".err \
+ err.$$name;\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$sno"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ;\
+ done; done)
+
+Relaxtests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Relax-NG regression tests"
+ -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
+ name=`basename $$i | sed 's+\.rng++'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_valid ] ; then \
+ echo New schemas $$name ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
+ > $(srcdir)/result/relaxng/"$$name"_valid \
+ 2> $(srcdir)/result/relaxng/"$$name"_err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $(srcdir)/test/relaxng/tutorA.rng $$i \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_valid \
+ res.$$name;\
+ diff $(srcdir)/result/relaxng/"$$name"_err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo schemas $$name result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi; \
+ for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+ @echo "## Relax-NG streaming regression tests"
+ -@(for i in $(srcdir)/test/relaxng/*.rng ; do \
+ name=`basename $$i | sed 's+\.rng++'`; \
+ for j in $(srcdir)/test/relaxng/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/relaxng/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --relaxng $$i $$j \
+ > $(srcdir)/result/relaxng/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/relaxng/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --noout --stream --relaxng $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
+ if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" -a "$$name" != "tutor8_2" ] ; then \
+ diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ fi ; grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+
+Schematrontests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Schematron regression tests"
+ -@(for i in $(srcdir)/test/schematron/*.sct ; do \
+ name=`basename $$i | sed 's+\.sct++'`; \
+ for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
+ if [ -f $$j ] ; then \
+ xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
+ if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
+ then \
+ echo New test file "$$name"_"$$xno" ; \
+ $(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
+ > $(srcdir)/result/schematron/"$$name"_"$$xno" \
+ 2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ else \
+ log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
+ > res.$$name 2> err.$$name;\
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
+ res.$$name;\
+ diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
+ err.$$name | grep -v "error detected at";\
+ grep Unimplemented err.$$name`; \
+ if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
+ rm res.$$name err.$$name ; \
+ fi ; fi ; \
+ done; done)
+
+RelaxNGPythonTests:
+ @(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ echo "## Relax-NG Python based test suite 1" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
+ echo "## Relax-NG Python based test suite 2" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite2.py ; \
+ fi)
+
+SchemasPythonTests:
+ @(if [ -x $(PYTHON) ] ; then \
+ PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ echo "## XML Schemas datatypes Python based test suite" ; \
+ echo "## It is normal to see 11 errors reported" ; \
+ $(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
+ fi)
+ @(if [ -x $(PYTHON) -a -d xstc ] ; then cd xstc ; $(MAKE) CHECKER="$(CHECKER)" pytests ; fi)
+
+Patterntests: xmllint$(EXEEXT)
+ @(echo > .memdump)
+ @echo "## Pattern regression tests"
+ -@(for i in $(srcdir)/test/pattern/*.pat ; do \
+ name=`basename $$i .pat`; \
+ if [ -f $(srcdir)/test/pattern/$$name.xml ] ; then \
+ if [ ! -f $(srcdir)/result/pattern/$$name ] ; then \
+ rm -f result.$$name ; \
+ echo New test file $$name ; \
+ for pat in `cat $$i` ; do \
+ $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml >> $(srcdir)/result/pattern/$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ done ;\
+ else \
+ rm -f result.$$name ; \
+ lst=`cat $$i` ; \
+ log=`for pat in $$lst ; do $(CHECKER) $(top_builddir)/xmllint --walker --pattern $$pat $(srcdir)/test/pattern/$$name.xml 2>&1 >> result.$$name ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
+ done ;\
+ diff $(srcdir)/result/pattern/$$name result.$$name` ; \
+ if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
+ rm result.$$name ; \
+ fi ; fi ; done ;)
+
+ModuleTests: testModule$(EXEEXT) testdso.la
+ @echo "## Module tests"
+ @(./testModule$(EXEEXT))
+
+cleanup:
+ -@(find . -name .\#\* -exec rm {} \;)
+ -@(find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \;)
+ -@(find . -name \*.orig -o -name \*.rej -o -name \*.old -exec rm -f {} \;)
+
+dist-hook: cleanup libxml2.spec
+ -cp libxml2.spec $(distdir)
+ (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git win32 macos os400 vms VxWorks bakefile test result) | (cd $(distdir); tar xf -)
+
+dist-source: distdir
+ $(AMTAR) -chof - --exclude Tests --exclude test --exclude result $(distdir) | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-sources+"`.tar.gz
+
+dist-test: distdir
+ (mkdir -p $(distdir))
+ (cd $(srcdir) ; tar -cf - --exclude CVS --exclude .svn --exclude .git xstc/Tests) | (cd $(distdir); tar xf -)
+ tar -cf - $(distdir)/test $(distdir)/result $(distdir)/xstc/Tests $(distdir)/Makefile.tests $(distdir)/README $(distdir)/README.tests $(distdir)/AUTHORS $(distdir)/testapi.c $(distdir)/runtest.c $(distdir)/runsuite.c | GZIP=$(GZIP_ENV) gzip -c >`echo "$(distdir)" | sed "s+libxml2+libxml2-tests+"`.tar.gz
+ @(rm -rf $(distdir)/xstc/Test)
+
+cleantar:
+ @(rm -f libxml*.tar.gz COPYING.LIB)
+
+rpm: cleanup cleantar
+ @(unset CDPATH ; $(MAKE) dist-source dist && rpmbuild -ta $(distdir).tar.gz)
+
+xml2Conf.sh: xml2Conf.sh.in Makefile
+ sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
+ -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
+ -e 's?\@VERSION\@?$(VERSION)?g' \
+ -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
+ < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
+ && mv xml2Conf.tmp xml2Conf.sh
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+ -$(INSTALL) -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+ $(MKDIR_P) $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testHTML.c $(DESTDIR)$(EXAMPLES_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/testXPath.c $(DESTDIR)$(EXAMPLES_DIR)
+
+uninstall-local:
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testXPath.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testHTML.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/testSAX.c
+ rm -f $(DESTDIR)$(EXAMPLES_DIR)/xmllint.c
+ rm -rf $(DESTDIR)$(EXAMPLES_DIR)
+ rm -f $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)/Copyright
+ rm -rf $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
+
+tst: tst.c
+ $(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz -llzma
+
+sparse: clean
+ $(MAKE) CC=cgcc
+
+cov: clean-cov
+ if [ "`echo $(LDFLAGS) | grep coverage`" = "" ] ; then \
+ echo not configured with coverage; exit 1 ; fi
+ if [ ! -x $(LCOV) -o ! -x $(GENHTML) ] ; then \
+ echo Need $(LCOV) and $(GENHTML) excecutables; exit 1 ; fi
+ -@($(MAKE) check)
+ -@(./runsuite$(EXEEXT))
+ mkdir $(top_builddir)/coverage
+ $(LCOV) -c -o $(top_builddir)/coverage/libxml2.info.tmp -d $(top_srcdir)
+ $(LCOV) -r $(top_builddir)/coverage/libxml2.info.tmp -o $(top_builddir)/coverage/libxml2.info *usr*
+ rm $(top_builddir)/coverage/libxml2.info.tmp
+ $(GENHTML) -s -t "libxml2" -o $(top_builddir)/coverage --legend $(top_builddir)/coverage/libxml2.info
+ echo "Coverage report is in $(top_builddir)/coverage/index.html"
+
+clean-cov:
+ rm -rf $(top_builddir)/coverage
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Makefile.tests b/Makefile.tests
new file mode 100644
index 0000000..619cbfb
--- /dev/null
+++ b/Makefile.tests
@@ -0,0 +1,41 @@
+#
+# You may have to ajust to call the right compiler, or other oprions
+# for compiling and linking
+#
+
+CFLAGS=`xml2-config --cflags`
+LIBS=`xml2-config --libs`
+THREADLIB= -lpthread
+EXEEXT=
+
+all: runtest$(EXEEXT) runsuite$(EXEEXT) testapi$(EXEEXT) testchar$(EXEEXT)
+
+clean:
+ $(RM) runtest$(EXEEXT) runsuite$(EXEEXT) testapi$(EXEEXT)
+
+check: do_runtest do_testchar do_testapi do_runsuite
+
+runtest$(EXEEXT): runtest.c
+ $(CC) -o runtest$(EXEEXT) $(CFLAGS) runtest.c $(LIBS) $(THREADLIB)
+
+do_runtest: runtest$(EXEEXT)
+ ./runtest
+
+runsuite$(EXEEXT): runsuite.c
+ $(CC) -o runsuite$(EXEEXT) $(CFLAGS) runsuite.c $(LIBS)
+
+do_runsuite: runsuite$(EXEEXT)
+ ./runsuite
+
+testapi$(EXEEXT): testapi.c
+ $(CC) -o testapi$(EXEEXT) $(CFLAGS) testapi.c $(LIBS)
+
+do_testapi: testapi$(EXEEXT)
+ ./testapi
+
+testchar$(EXEEXT): testchar.c
+ $(CC) -o testchar$(EXEEXT) $(CFLAGS) testchar.c $(LIBS)
+
+do_testchar: testchar$(EXEEXT)
+ ./testchar
+
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..8027d55
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,2642 @@
+
+ NEWS file for libxml2
+
+ Note that this is automatically generated from the news webpage at:
+ http://xmlsoft.org/news.html
+
+The change log at
+ChangeLog.html
+ describes the recents commits
+to the GIT at
+http://git.gnome.org/browse/libxml2/
+ code base.Here is the list of public releases:
+2.9.2: Oct 16 2014:
+ - Security:
+ Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),
+ CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)
+
+ - Bug Fixes:
+ fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),
+ xmlmemory: handle realloc properly (Yegor Yefremov),
+ Python generator bug raised by the const change (Daniel Veillard),
+ Windows Critical sections not released correctly (Daniel Veillard),
+ Parser error on repeated recursive entity expansion containing &lt; (Daniel Veillard),
+ xpointer : fixing Null Pointers (Gaurav Gupta),
+ Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),
+ parser bug on misformed namespace attributes (Dennis Filder),
+ Pointer dereferenced before null check (Daniel Veillard),
+ Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),
+ Possible overflow in HTMLParser.c (Daniel Veillard),
+ python/tests/sync.py assumes Python dictionaries are ordered (John Beck),
+ Fix Enum check and missing break (Gaurav Gupta),
+ xmlIO: Handle error returns from dup() (Philip Withnall),
+ Fix a problem properly saving URIs (Daniel Veillard),
+ wrong error column in structured error when parsing attribute values (Juergen Keil),
+ wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),
+ no error column in structured error handler for xml schema validation errors (Juergen Keil),
+ Couple of Missing Null checks (Gaurav Gupta),
+ Add couple of missing Null checks (Daniel Veillard),
+ xmlschemastypes: Fix potential array overflow (Philip Withnall),
+ runtest: Fix a memory leak on parse failure (Philip Withnall),
+ xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),
+ xmlcatalog: Fix a memory leak on quit (Philip Withnall),
+ HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),
+ Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),
+ Avoid Possible Null Pointer in trio.c (Gaurav Gupta),
+ Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),
+ XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),
+ Fix various Missing Null checks (Gaurav Gupta),
+ Fix a potential NULL dereference (Daniel Veillard),
+ Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),
+ Add a missing argument check (Gaurav Gupta),
+ Adding a check in case of allocation error (Gaurav Gupta),
+ xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),
+ Adding some missing NULL checks (Gaurav),
+ Fixes for xmlInitParserCtxt (Daniel Veillard),
+ Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),
+ erroneously ignores a validation error if no error callback set (Daniel Veillard),
+ xmllint was not parsing the --c14n11 flag (Sérgio Batista),
+ Avoid Possible null pointer dereference in memory debug mode (Gaurav),
+ Avoid Double Null Check (Gaurav),
+ Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),
+ Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),
+ Avoid a possible NULL pointer dereference (Gaurav),
+ Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),
+ Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),
+ fixing a ptotential uninitialized access (Daniel Veillard),
+ Fix an fd leak in an error case (Daniel Veillard),
+ Missing initialization for the catalog module (Daniel Veillard),
+ Handling of XPath function arguments in error case (Nick Wellnhofer),
+ Fix a couple of missing NULL checks (Gaurav),
+ Avoid a possibility of dangling encoding handler (Gaurav),
+ Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),
+ Fix a bug loading some compressed files (Mike Alexander),
+ Fix XPath node comparison bug (Gaurav),
+ Type mismatch in xmlschemas.c (Gaurav),
+ Type mismatch in xmlschemastypes.c (Gaurav),
+ Avoid a deadcode in catalog.c (Daniel Veillard),
+ run close socket on Solaris, same as we do on other platforms (Denis Pauk),
+ Fix pointer dereferenced before null check (Gaurav),
+ Fix a potential NULL dereference in tree code (Daniel Veillard),
+ Fix potential NULL pointer dereferences in regexp code (Gaurav),
+ xmllint --pretty crashed without following numeric argument (Tim Galeckas),
+ Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),
+ Fix XPath '//' optimization with predicates (Nick Wellnhofer),
+ Clear up a potential NULL dereference (Daniel Veillard),
+ Fix a possible NULL dereference (Gaurav),
+ Avoid crash if allocation fails (Daniel Veillard),
+ Remove occasional leading space in XPath number formatting (Daniel Veillard),
+ Fix handling of mmap errors (Daniel Veillard),
+ Catch malloc error and exit accordingly (Daniel Veillard),
+ missing else in xlink.c (Ami Fischman),
+ Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),
+ Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),
+ properly quote the namespace uris written out during c14n (Aleksey Sanin),
+ Remove premature XInclude check on URI being relative (Alexey Neyman),
+ Fix missing break on last() function for attributes (dcb),
+ Do not URI escape in server side includes (Romain Bondue),
+ Fix an error in xmlCleanupParser (Alexander Pastukhov)
+
+ - Documentation:
+ typo in error messages "colon are forbidden from..." (Daniel Veillard),
+ Fix a link to James SAX documentation old page (Daniel Veillard),
+ Fix typos in relaxng.c (Jan Pokorný),
+ Fix a doc typo (Daniel Veillard),
+ Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),
+ Add limitations about encoding conversion (Daniel Veillard),
+ Fix typos in xmlschemas{,types}.c (Jan Pokorný),
+ Fix incorrect spelling entites->entities (Jan Pokorný),
+ Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)
+
+ - Portability:
+ AC_CONFIG_FILES and executable bit (Roumen Petrov),
+ remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),
+ fix some tabs mixing incompatible with python3 (Roumen Petrov),
+ Visual Studio 14 CTP defines snprintf() (Francis Dupont),
+ OS400: do not try to copy unexisting doc files (Patrick Monnerat),
+ OS400: use either configure.ac or configure.in. (Patrick Monnerat),
+ os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),
+ OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),
+ OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),
+ OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),
+ OS400: include in distribution tarball. (Patrick Monnerat),
+ OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),
+ OS400: Add compilation scripts. (Patrick Monnerat),
+ OS400: ILE RPG language header files. (Patrick Monnerat),
+ OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),
+ OS400: UTF8<-->EBCDIC wrappers for system and external library calls (Patrick Monnerat),
+ OS400: Easy character transcoding support (Patrick Monnerat),
+ OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),
+ OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),
+ Fix building when configuring without xpath and xptr (Daniel Veillard),
+ configure: Add --with-python-install-dir (Jonas Eriksson),
+ Fix compilation with minimum and xinclude. (Nicolas Le Cam),
+ Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),
+ Fix compilation with minimum and schematron. (Nicolas Le Cam),
+ Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),
+ Don't use xmlValidateName() when not available. (Nicolas Le Cam),
+ Fix a portability issue on Windows (Longstreth Jon),
+ Various portability patches for OpenVMS (Jacob (Jouk) Jansen),
+ Use specific macros for portability to OS/400 (Patrick Monnerat),
+ Add macros needed for OS/400 portability (Patrick Monnerat),
+ Portability patch for fopen on OS/400 (Patrick Monnerat),
+ Portability fixes for OS/400 (Patrick Monnerat),
+ Improve va_list portability (Patrick Monnerat),
+ Portability fix (Patrick Monnerat),
+ Portability fix (Patrick Monnerat),
+ Generic portability fix (Patrick Monnerat),
+ Shortening lines in headers (Patrick Monnerat),
+ build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),
+ build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),
+ fix some tabs mixing incompatible with python3 (Daniel Veillard),
+ add additional defines checks for support "./configure --with-minimum" (Denis Pauk),
+ Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),
+ python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),
+ python: Fix compiler warnings when building python3 bindings (Armin K),
+ Fix for compilation with python 2.6.8 (Petr Sumbera)
+
+ - Improvements:
+ win32/libxml2.def.src after rebuild in doc (Roumen Petrov),
+ elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),
+ elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),
+ Provide cmake module (Samuel Martin),
+ Fix a couple of issues raised by make dist (Daniel Veillard),
+ Fix and add const qualifiers (Kurt Roeckx),
+ Preparing for upcoming release of 2.9.2 (Daniel Veillard),
+ Fix zlib and lzma libraries check via command line (Dmitriy),
+ wrong error column in structured error when parsing end tag (Juergen Keil),
+ doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),
+ Add methods for python3 iterator (Ron Angeles),
+ Support element node traversal in document fragments. (Kyle VanderBeek),
+ xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),
+ Added macros for argument casts (Eric Zurcher),
+ adding init calls to xml and html Read parsing entry points (Daniel Veillard),
+ Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),
+ Implement choice for name classes on attributes (Shaun McCance),
+ Two small namespace tweaks (Daniel Veillard),
+ xmllint --memory should fail on empty files (Daniel Veillard),
+ Cast encoding name to char pointer to match arg type (Nikolay Sivov)
+
+ - Cleanups:
+ Removal of old configure.in (Daniel Veillard),
+ Unreachable code in tree.c (Gaurav Gupta),
+ Remove a couple of dead conditions (Gaurav Gupta),
+ Avoid some dead code and cleanup in relaxng.c (Gaurav),
+ Drop not needed checks (Denis Pauk),
+ Fix a wrong test (Daniel Veillard)
+
+
+
+2.9.1: Apr 19 2013:
+ - Features:
+ Support for Python3 (Daniel Veillard),
+ Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)
+
+ - Documentation:
+ Add documentation for xmllint --xpath (Daniel Veillard),
+ Fix the URL of the SAX documentation from James (Daniel Veillard),
+ Fix spelling of "length". (Michael Wood)
+
+ - Portability:
+ Fix python bindings with versions older than 2.7 (Daniel Veillard),
+ rebuild docs:Makefile.am (Roumen Petrov),
+ elfgcchack.h after rebuild in doc (Roumen Petrov),
+ elfgcchack for buf module (Roumen Petrov),
+ Fix a uneeded and wrong extra link parameter (Daniel Veillard),
+ Few cleanup patches for Windows (Denis Pauk),
+ Fix rpmbuild --nocheck (Mark Salter),
+ Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),
+ Fix Broken multi-arch support in xml2-config (Daniel Veillard),
+ Fix a portability issue for GCC < 3.4.0 (Daniel Veillard),
+ Windows build fixes (Daniel Richard),
+ Fix a thread portability problem (Friedrich Haubensak),
+ Downgrade autoconf requirement to 2.63 (Daniel Veillard)
+
+ - Bug Fixes:
+ Fix a linking error for python bindings (Daniel Veillard),
+ Fix a couple of return without value (Jüri Aedla),
+ Improve the hashing functions (Daniel Franke),
+ Improve handling of xmlStopParser() (Daniel Veillard),
+ Remove risk of lockup in dictionary initialization (Daniel Veillard),
+ Activate detection of encoding in external subset (Daniel Veillard),
+ Fix an output buffer flushing conversion bug (Mikhail Titov),
+ Fix an old bug in xmlSchemaValidateOneElement (Csaba László),
+ Fix configure cannot remove messages (Gilles Espinasse),
+ fix schema validation in combination with xsi:nil (Daniel Veillard),
+ xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),
+ Fix a few problems with setEntityLoader (Alexey Neyman),
+ Detect excessive entities expansion upon replacement (Daniel Veillard),
+ Fix the flushing out of raw buffers on encoding conversions (Daniel,
+Veillard),
+ Fix some buffer conversion issues (Daniel Veillard),
+ When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,
+Veillard),
+ Fix an error in the progressive DTD parsing code (Dan Winship),
+ xmllint should not load DTD by default when using the reader (Daniel,
+Veillard),
+ Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),
+ Fix potential out of bound access (Daniel Veillard),
+ Fix large parse of file from memory (Daniel Veillard),
+ Fix a bug in the nsclean option of the parser (Daniel Veillard),
+ Fix a regression in 2.9.0 breaking validation while streaming (Daniel,
+Veillard),
+ Remove potential calls to exit() (Daniel Veillard)
+
+ - Improvements:
+ Regenerated API, and testapi, rebuild documentation (Daniel Veillard),
+ Fix tree iterators broken by 2to3 script (Daniel Veillard),
+ update all tests for Python3 and Python2 (Daniel Veillard),
+ A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),
+ Fix compilation on Python3 (Daniel Veillard),
+ Converting apibuild.py to python3 (Daniel Veillard),
+ First pass at starting porting to python3 (Daniel Veillard),
+ updated configure.in for python3 (Daniel Veillard),
+ Add support for xpathRegisterVariable in Python (Shaun McCance),
+ Added a regression tests from bug 694228 data (Daniel Veillard),
+ Cache presence of '<' in entities content (Daniel Veillard),
+ Avoid extra processing on entities (Daniel Veillard),
+ Python binding for xmlRegisterInputCallback (Alexey Neyman),
+ Python bindings: DOM casts everything to xmlNode (Alexey Neyman),
+ Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),
+ Adding streaming validation to runtest checks (Daniel Veillard),
+ Add a --pushsmall option to xmllint (Daniel Veillard)
+
+ - Cleanups:
+ Switched comment in file to UTF-8 encoding (Daniel Veillard),
+ Extend gitignore (Daniel Veillard),
+ Silent the new python test on input (Alexey Neyman),
+ Cleanup of a duplicate test (Daniel Veillard),
+ Cleanup on duplicate test expressions (Daniel Veillard),
+ Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,
+Gansterer),
+ Spec cleanups and a fix for multiarch support (Daniel Veillard),
+ Silence a clang warning (Daniel Veillard),
+ Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),
+ rand_seed should be static in dict.c (Wouter Van Rooy),
+ Fix typos in parser comments (Jan Pokorný)
+
+
+
+2.9.0: Sep 11 2012:
+ - Features:
+ A few new API entry points,
+ More resilient push parser mode,
+ A lot of portability improvement,
+ Faster XPath evaluation
+
+ - Documentation:
+ xml2-config.1 markup error (Christian Weisgerber),
+ libxml(3) manpage typo fix (John Bradshaw),
+ More cleanups to the documentation part of libxml2 (Daniel Richard G)
+
+ - Portability:
+ Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),
+ fix builds not having stdint.h (Rob Richards),
+ GetProcAddressA is available only on WinCE (Daniel Veillard),
+ More updates and cleanups on autotools and Makefiles (Daniel Richard G),
+ More changes for Win32 compilation (Eric Zurcher),
+ Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),
+ Bundles all generated files for python into the distribution (Daniel Richard G),
+ Fix compiler warnings of wincecompat.c (Patrick Gansterer),
+ Fix non __GNUC__ build (Patrick Gansterer),
+ Fix windows unicode build (Patrick Gansterer),
+ clean redefinition of {v}snprintf in C-source (Roumen Petrov),
+ use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),
+ fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),
+ Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),
+ Various "make distcheck" and portability fixups (Daniel Richard G),
+ Fix compilation on older Visual Studio (Daniel Veillard)
+
+ - Bug Fixes:
+ Change the XPath code to percolate allocation errors (Daniel Veillard),
+ Fix reuse of xmlInitParser (Daniel Veillard),
+ Fix potential crash on entities errors (Daniel Veillard),
+ initialize var (Rob Richards),
+ Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),
+ Fix problem with specific and generic error handlers (Pietro Cerutti),
+ Avoid a potential infinite recursion (Daniel Veillard),
+ Fix an XSD error when generating internal automata (Daniel Veillard),
+ Patch for xinclude of text using multibyte characters (Vitaly Ostanin),
+ Fix a segfault on XSD validation on pattern error (Daniel Veillard),
+ Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),
+ Add a missing element check (Daniel Veillard),
+ Adding various checks on node type though the API (Daniel Veillard),
+ Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),
+ Fix make dist to include new private header files (Daniel Veillard),
+ More fixups on the push parser behaviour (Daniel Veillard),
+ Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),
+ Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),
+ Fixup limits parser (Daniel Veillard),
+ Do not fetch external parsed entities (Daniel Veillard),
+ Fix an error in previous commit (Aron Xu),
+ Fix entities local buffers size problems (Daniel Veillard),
+ Fix parser local buffers size problems (Daniel Veillard),
+ Fix a failure to report xmlreader parsing failures (Daniel Veillard)
+
+ - Improvements:
+ Keep libxml2.syms when running "make distclean" (Daniel Veillard),
+ Allow to set the quoting character of an xmlWriter (Csaba Raduly),
+ Keep non-significant blanks node in HTML parser (Daniel Veillard),
+ Add a forbidden variable error number and message to XPath (Daniel Veillard),
+ Support long path names on WNT (Michael Stahl),
+ Improve HTML escaping of attribute on output (Daniel Veillard),
+ Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),
+ Switching XPath node sorting to Timsort (Vojtech Fried),
+ Optimizing '//' in XPath expressions (Nick Wellnhofer),
+ Expose xmlBufShrink in the public tree API (Daniel Veillard),
+ Visible HTML elements close the head tag (Conrad Irwin),
+ Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),
+ Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),
+ minimize use of HAVE_CONFIG_H (Roumen Petrov),
+ fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),
+ Add support for big line numbers in error reporting (Daniel Veillard),
+ Avoid using xmlBuffer for serialization (Daniel Veillard),
+ Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),
+ Provide new accessors for xmlOutputBuffer (Daniel Veillard),
+ Improvements for old buffer compatibility (Daniel Veillard),
+ Expand the limit test program (Daniel Veillard),
+ Improve error reporting on parser errors (Daniel Veillard),
+ Implement some default limits in the XPath module (Daniel Veillard),
+ Introduce some default parser limits (Daniel Veillard),
+ Cleanups and new limit APIs for dictionaries (Daniel Veillard),
+ Fixup for buf.c (Daniel Veillard),
+ Cleanup URI module memory allocation code (Daniel Veillard),
+ Extend testlimits (Daniel Veillard),
+ More avoid quadratic behaviour (Daniel Veillard),
+ Impose a reasonable limit on PI size (Daniel Veillard),
+ first version of testlimits new test (Daniel Veillard),
+ Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),
+ Impose a reasonable limit on comment size (Daniel Veillard),
+ Impose a reasonable limit on attribute size (Daniel Veillard),
+ Harden the buffer code and make it more compatible (Daniel Veillard),
+ More cleanups for input/buffers code (Daniel Veillard),
+ Cleanup function xmlBufResetInput(), to set input from Buffer (Daniel Veillard)
+ Swicth the test program for characters to new input buffers (Daniel Veillard),
+ Convert the HTML tree module to the new buffers (Daniel Veillard),
+ Convert of the HTML parser to new input buffers (Daniel Veillard),
+ Convert the writer to new output buffer and save APIs (Daniel Veillard),
+ Convert XMLReader to the new input buffers (Daniel Veillard),
+ New saving functions using xmlBuf and conversion (Daniel Veillard),
+ Provide new xmlBuf based saving functions (Daniel Veillard),
+ Convert XInclude to the new input buffers (Daniel Veillard),
+ Convert catalog code to the new input buffers (Daniel Veillard),
+ Convert C14N to the new Input buffer (Daniel Veillard),
+ Convert xmlIO.c to the new input and output buffers (Daniel Veillard),
+ Convert XML parser to the new input buffers (Daniel Veillard),
+ Incompatible change to the Input and Output buffers (Daniel Veillard),
+ Adding new encoding function to deal with the new structures (Daniel Veillard),
+ Convert XPath to xmlBuf (Daniel Veillard),
+ Adding a new buf module for buffers (Daniel Veillard),
+ Memory error within SAX2 reuse common framework (Daniel Veillard),
+ Fix xmllint --xpath node initialization (Daniel Veillard)
+
+ - Cleanups:
+ Various cleanups to avoid compiler warnings (Daniel Veillard),
+ Big space and tab cleanup (Daniel Veillard),
+ Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),
+ Second round of cleanups for LibXML2 docs/examples (Daniel Richard),
+ Remove all .cvsignore as they are not used anymore (Daniel Veillard),
+ Fix a Timsort function helper comment (Daniel Veillard),
+ Small cleanup for valgrind target (Daniel Veillard),
+ Patch for portability of latin characters in C files (Daniel Veillard),
+ Cleanup some of the parser code (Daniel Veillard),
+ Fix a variable name in comment (Daniel Veillard),
+ Regenerated testapi.c (Daniel Veillard),
+ Regenerating docs and API files (Daniel Veillard),
+ Small cleanup of unused variables in test (Daniel Veillard),
+ Expand .gitignore with more files (Daniel Veillard)
+
+
+
+2.8.0: May 23 2012:
+ - Features:
+ add lzma compression support (Anders F Bjorklund)
+
+ - Documentation:
+ xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä),
+ Update README.tests (Daniel Veillard),
+ URI handling code is not OOM resilient (Daniel Veillard),
+ Fix an error in comment (Daniel Veillard),
+ Fixed bug #617016 (Daniel Mustieles),
+ Fixed two typos in the README document (Daniel Neel),
+ add generated html files (Anders F Bjorklund),
+ Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard),
+ Improve documentation a bit (Daniel Veillard),
+ Updated URL for lxml python bindings (Daniel Veillard)
+
+ - Portability:
+ Restore code for Windows compilation (Daniel Veillard),
+ Remove git error message during configure (Christian Dywan),
+ xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer),
+ remove a bashism in confgure.in (John Hein),
+ undef ERROR if already defined (Patrick R. Gansterer),
+ Fix library problems with mingw-w64 (Michael Cronenworth),
+ fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards),
+ prefer native threads on win32 (Sam Thursfield),
+ Allow to compile with Visual Studio 2010 (Thomas Lemm),
+ Fix mingw's snprintf configure check (Andoni Morales),
+ fixed a 64bit big endian issue (Marcus Meissner),
+ Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard),
+ Fix windows build from lzma addition (Rob Richards),
+ autogen: Only check for libtoolize (Colin Walters),
+ Fix the Windows build files (Patrick von Reth),
+ 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard),
+ 599241 fix an initialization problem on Win64 (Andrew W. Nosenko),
+ fix win build (Rob Richards)
+
+ - Bug fixes:
+ Part for rand_r checking missing (Daniel Veillard),
+ Cleanup on randomization (Daniel Veillard),
+ Fix undefined reference in python module (Pacho Ramos),
+ Fix a race in xmlNewInputStream (Daniel Veillard),
+ Fix weird streaming RelaxNG errors (Noam),
+ Fix various bugs in new code raised by the API checking (Daniel Veillard),
+ Fix various problems with "make dist" (Daniel Veillard),
+ Fix a memory leak in the xzlib code (Daniel Veillard),
+ HTML parser error with <noscript> in the <head> (Denis Pauk),
+ XSD: optional element in complex type extension (Remi Gacogne),
+ Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard),
+ Fix a wrong return value in previous patch (Daniel Veillard),
+ Fix an uninitialized variable use (Daniel Veillard),
+ Fix a compilation problem with --minimum (Brandon Slack),
+ Remove redundant and ungarded include of resolv.h (Daniel Veillard),
+ xinclude with parse="text" does not use the entity loader (Shaun McCance),
+ Allow to parse 1 byte HTML files (Denis Pauk),
+ Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder),
+ Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
+ Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
+ xmlParseNodeInContext problems with an empty document (Tim Elliott),
+ HTML element position is not detected propperly (Pavel Andrejs),
+ Fix an off by one pointer access (Jüri Aedla),
+ Try to fix a problem with entities in SAX mode (Daniel Veillard),
+ Fix a crash with xmllint --path on empty results (Daniel Veillard),
+ Fixed bug #667946 (Daniel Mustieles),
+ Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
+ Fix a wrong enum type use in Schemas Types (Nico Weber),
+ Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard),
+ Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard),
+ fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan),
+ fix a pair of possible out of array char references (Daniel Veillard),
+ Fix an allocation error when copying entities (Daniel Veillard),
+ Make sure the parser returns when getting a Stop order (Chris Evans),
+ Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng),
+ Fix a schema type duration comparison overflow (Daniel Veillard),
+ Fix an unimplemented part in RNG value validation (Daniel Veillard),
+ Fix missing error status in XPath evaluation (Daniel Veillard),
+ Hardening of XPath evaluation (Daniel Veillard),
+ Fix an off by one error in encoding (Daniel Veillard),
+ Fix RELAX NG include bug #655288 (Shaun McCance),
+ Fix XSD validation bug #630130 (Toyoda Eizi),
+ Fix some potential problems on reallocation failures (Chris Evans),
+ __xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin),
+ __xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin),
+ Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards),
+ Small fix for previous commit (Daniel Veillard),
+ Fix a potential freeing error in XPath (Daniel Veillard),
+ Fix a potential memory access error (Daniel Veillard),
+ Reactivate the shared library versionning script (Daniel Veillard)
+
+ - Improvements:
+ use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov),
+ New symbols added for the next release (Daniel Veillard),
+ xmlTextReader bails too quickly on error (Andy Lutomirski),
+ Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin),
+ Use buffers when constructing string node lists. (Conrad Irwin),
+ Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
+ wrong message for double hyphen in comment XML error (Bryan Henderson),
+ Fix "make tst" to grab lzma lib too (Daniel Veillard),
+ Add "whereis" command to xmllint shell (Ryan),
+ Improve xmllint shell (Ryan),
+ add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
+ Add --system support to autogen.sh (Daniel Veillard),
+ Add hash randomization to hash and dict structures (Daniel Veillard),
+ included xzlib in dist (Anders F Bjorklund),
+ move xz/lzma helpers to separate included files (Anders F Bjorklund),
+ add generated devhelp files (Anders F Bjorklund),
+ add XML_WITH_LZMA to api (Anders F Bjorklund),
+ autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
+ Improve the error report on undefined REFs (Daniel Veillard),
+ Add exception for new W3C PI xml-model (Daniel Veillard),
+ Add options to ignore the internal encoding (Daniel Veillard),
+ testapi: use the right type for the check (Stefan Kost),
+ various: handle return values of write calls (Stefan Kost),
+ testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost),
+ runxmlconf: update to latest testsuite version (Stefan Kost),
+ configure: add -Wno-long-long to CFLAGS (Stefan Kost),
+ configure: support silent automake rules if possible (Stefan Kost),
+ xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost),
+ __xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin),
+ __xmlRaiseError: do cheap code check early (Dmitry V. Levin)
+
+ - Cleanups:
+ Cleanups before 2.8.0-rc2 (Daniel Veillard),
+ Avoid an extra operation (Daniel Veillard),
+ Remove vestigial de-ANSI-fication support. (Javier Jardón),
+ autogen.sh: Fix typo (Javier Jardón),
+ Do not use unsigned but unsigned int (Daniel Veillard),
+ Remove two references to u_short (Daniel Veillard),
+ Fix -Wempty-body warning from clang (Nico Weber),
+ Cleanups of lzma support (Daniel Veillard),
+ Augment the list of ignored files (Daniel Veillard),
+ python: remove unused variable (Stefan Kost),
+ python: flag two unused args (Stefan Kost),
+ configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
+ xpath: remove unused variable (Stefan Kost)
+
+
+
+2.7.8: Nov 4 2010:
+ - Features:
+ 480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
+ Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
+
+ - Documentation:
+ Fix devhelp documentation installation (Mike Hommey),
+ Fix web site encoding problems (Daniel Veillard),
+ Fix a couple of typo in HTML parser error messages (Michael Day),
+ Forgot to update the news page for 0.7.7 (Daniel Veillard)
+
+ - Portability:
+ 607273 Fix python detection on MSys/Windows (LRN),
+ 614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer),
+ Fix compilation with Clang (Koop Mast),
+ Fix Win32 build (Rob Richards)
+
+ - Bug Fixes:
+ 595789 fix a remaining potential Solaris problem (Daniel Veillard),
+ 617468 fix progressive HTML parsing with style using "'" (Denis Pauk),
+ 616478 Fix xmllint shell write command (Gwenn Kahz),
+ 614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile),
+ 627987 Fix XSD IDC errors in imported schemas (Jim Panetta),
+ 629325 XPath rounding errors first cleanup (Phil Shafer),
+ 630140 fix iso995x encoding error (Daniel Veillard),
+ make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard),
+ Fix a change of semantic on XPath preceding and following axis (Daniel Veillard),
+ Fix a potential segfault due to weak symbols on pthreads (Mike Hommey),
+ Fix a leak in XPath compilation (Daniel Veillard),
+ Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard),
+ Avoid a descriptor leak in catalog loading code (Carlo Bramini),
+ Fix a small bug in XPath evaluation code (Marius Wachtler),
+ Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
+ Fix errors in XSD double validation check (Csaba Raduly),
+ Fix handling of apos in URIs (Daniel Veillard),
+ xmlTextReaderReadOuterXml should handle DTD (Rob Richards),
+ Autogen.sh needs to create m4 directory (Rob Richards)
+
+ - Improvements:
+ 606592 update language ID parser to RFC 5646 (Daniel Veillard),
+ Sort python generated stubs (Mike Hommey),
+ Add an HTML parser option to avoid a default doctype (Daniel Veillard)
+
+ - Cleanups:
+ 618831 don't ship generated files in git (Adrian Bunk),
+ Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk),
+ Various cleanups on encoding handling (Daniel Veillard),
+ Fix xmllint to use format=1 for default formatting (Adam Spragg),
+ Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg),
+ Cleanup encoding pointer comparison (Nikolay Sivov),
+ Small code cleanup on previous patch (Daniel Veillard)
+
+
+
+2.7.7: Mar 15 2010:
+ - Improvements:
+ Adding a --xpath option to xmllint (Daniel Veillard),
+ Make HTML parser non-recursive (Eugene Pimenov)
+
+ - Portability:
+ relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton),
+ Fix build failure on Sparc solaris (Roumen Petrov),
+ use autoreconf in autogen.sh (Daniel Veillard),
+ Fix build with mingw (Roumen Petrov),
+ Upgrade some of the configure and autogen (Daniel Veillard),
+ Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards),
+ Fix a const warning in xmlNodeSetBase (Martin Trappel),
+ Fix python generator to not use deprecated xmllib (Daniel Veillard),
+ Update some automake files (Daniel Veillard),
+ 598785 Fix nanohttp on Windows (spadix)
+
+ - Bug Fixes:
+ libxml violates the zlib interface and crashes (Mark Adler),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
+ Fix detection of python linker flags (Daniel Macks),
+ fix build error in libxml2/python (Paul Smith),
+ ChunkParser: Incorrect decoding of small xml files (Raul Hudea),
+ htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
+ Fix a missing #ifdef (Daniel Veillard),
+ Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
+ xmlPreviousElementSibling mistake (François Delyon),
+ 608773 add a missing check in xmlGROW (Daniel Veillard),
+ Fix xmlParseInNodeContext for HTML content (Daniel Veillard),
+ Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards),
+ Fix some missing commas in HTML element lists (Eugene Pimenov),
+ Correct variable type to unsigned (Nikolay Sivov),
+ Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard),
+ Fix memory leak in xmlXPathEvalExpression() (Martin),
+ Fix an init bug in global.c (Kai Henning),
+ Fix xmlNodeSetBase() comment (Daniel Veillard),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Don't give default HTML boolean attribute values in parser (Daniel Veillard),
+ xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
+
+ - Cleanups:
+ Cleanup a couple of weirdness in HTML parser (Eugene Pimenov)
+
+
+
+2.7.6: Oct 6 2009:
+ - Bug Fixes:
+ Restore thread support in default configuration (Andrew W. Nosenko),
+ URI with no path parsing problem (Daniel Veillard),
+ Minor patch for conditional defines in threads.c (Eric Zurcher)
+
+
+
+2.7.5: Sep 24 2009:
+ - Bug Fixes:
+ Restore behavior of --with-threads without argument (Andrew W. Nosenko),
+ Fix memory leak when doc is NULL (Rob Richards),
+ 595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard),
+ Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard),
+ Fix a parsing problem with little data at startup (Daniel Veillard),
+ link python module with python library (Frederic Crozat),
+ 594874 Forgot an fclose in xmllint (Daniel Veillard)
+
+ - Cleanup:
+ Adding symbols.xml to EXTRA_DIST (Daniel Veillard)
+
+
+
+2.7.4: Sep 10 2009:
+ - Improvements:
+ Switch to GIT (GNOME),
+ Add symbol versioning to libxml2 shared libs (Daniel Veillard)
+
+ - Portability:
+ 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard),
+ 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard),
+ Fix Windows build * relaxng.c: fix windows build (Rob Richards),
+ Fix the globals.h to use XMLPUBFUN (Paul Smith),
+ Problem with extern extern in header (Daniel Veillard),
+ Add -lnetwork for compiling on Haiku (Scott McCreary),
+ Runtest portability patch for Solaris (Tim Rice),
+ Small patch to accomodate the Haiku OS (Scott McCreary),
+ 584605 package VxWorks folder in the distribution (Daniel Veillard),
+ 574017 Realloc too expensive on most platform (Daniel Veillard),
+ Fix windows build (Rob Richards),
+ 545579 doesn't compile without schema support (Daniel Veillard),
+ xmllint use xmlGetNodePath when not compiled in (Daniel Veillard),
+ Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard),
+ Allow to select the threading system on Windows (LRN),
+ Fix Solaris binary links, cleanups (Daniel Veillard),
+ Bug 571059 – MSVC doesn't work with the bakefile (Intron),
+ fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey),
+ fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher)
+
+ - Documentation:
+ 544910 typo: "renciliateNs" (Leonid Evdokimov),
+ Add VxWorks to list of OSes (Daniel Veillard),
+ Regenerate the documentation and update for git (Daniel Veillard),
+ 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard),
+ Added sponsoring by AOE media for the server (Daniel Veillard),
+ updated URLs for GNOME (Vincent Lefevre),
+ more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard)
+
+ - Bug fixes:
+ 594514 memory leaks - duplicate initialization (MOD),
+ Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard),
+ 492317 Fix Relax-NG validation problems (Daniel Veillard),
+ 558452 fight with reg test and error report (Daniel Veillard),
+ 558452 RNG compilation of optional multiple child (Daniel Veillard),
+ 579746 XSD validation not correct / nilable groups (Daniel Veillard),
+ 502960 provide namespace stack when parsing entity (Daniel Veillard),
+ 566012 part 2 fix regresion tests and push mode (Daniel Veillard),
+ 566012 autodetected encoding and encoding conflict (Daniel Veillard),
+ 584220 xpointer(/) and xinclude problems (Daniel Veillard),
+ 587663 Incorrect Attribute-Value Normalization (Daniel Veillard),
+ 444994 HTML chunked failure for attribute with <> (Daniel Veillard),
+ Fix end of buffer char being split in XML parser (Daniel Veillard),
+ Non ASCII character may be split at buffer end (Adiel Mittmann),
+ 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel),
+ 572129 speed up parsing of large HTML text nodes (Markus Kull),
+ Fix HTML parsing with 0 character in CDATA (Daniel Veillard),
+ Fix SetGenericErrorFunc and SetStructured clash (Wang Lam),
+ 566012 Incomplete EBCDIC parsing support (Martin Kogler),
+ 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard),
+ 541237 error correcting missing end tags in HTML (Daniel Veillard),
+ 583439 missing line numbers in push mode (Daniel Veillard),
+ 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard),
+ 559501 avoid select and use poll for nanohttp (Raphael Prevost),
+ 559410 - Regexp bug on (...)? constructs (Daniel Veillard),
+ Fix a small problem on previous HTML parser patch (Daniel Veillard),
+ 592430 - HTML parser runs into endless loop (Daniel Veillard),
+ 447899 potential double free in xmlFreeTextReader (Daniel Veillard),
+ 446613 small validation bug mixed content with NS (Daniel Veillard),
+ Fix the problem of revalidating a doc with RNG (Daniel Veillard),
+ Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer),
+ 512131 refs from externalRef part need to be added (Daniel Veillard),
+ 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard),
+ 588441 allow '.' in HTML Names even if invalid (Daniel Veillard),
+ 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard),
+ 579317 Try to find the HTML encoding information (Daniel Veillard),
+ 575875 don't output charset=html (Daniel Veillard),
+ 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard),
+ 570702 fix a bug in regexp determinism checking (Daniel Veillard),
+ 567619 xmlValidateNotationUse missing param test (Daniel Veillard),
+ 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer),
+ Fix a couple of problems in the parser (Daniel Veillard),
+ 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen),
+ 582906 XSD validating multiple imports of the same schema (Jason Childs),
+ Bug 582887 ¿ problems validating complex schemas (Jason Childs),
+ Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos),
+ 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky),
+ Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre),
+ Preserve attributes of include start on tree copy (Petr Pajas),
+ Skip silently unrecognized XPointer schemes (Jakub Wilk),
+ Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard),
+ potential NULL dereference on non-glibc (Jim Meyering),
+ Fix an XSD validation crash (Daniel Veillard),
+ Fix a regression in streaming entities support (Daniel Veillard),
+ Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin),
+ Aleksey Sanin support for c14n 1.1 (Aleksey Sanin),
+ reader bug fix with entities (Daniel Veillard),
+ use options from current parser ctxt for external entities (Rob Richards),
+ 581612 use %s to printf strings (Christian Persch),
+ 584605 change the threading initialization sequence (Igor Novoseltsev),
+ 580705 keep line numbers in HTML parser (Aaron Patterson),
+ 581803 broken HTML table attributes init (Roland Steiner),
+ do not set error code in xmlNsWarn (Rob Richards),
+ 564217 fix structured error handling problems,
+ reuse options from current parser for entities (Rob Richards),
+ xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard),
+ add a missing check in xmlAddSibling (Kris Breuker),
+ avoid leaks on errors (Jinmei Tatuya)
+
+ - Cleanup:
+ Chasing dead assignments reported by clang-scan (Daniel Veillard),
+ A few more safety cleanup raised by scan (Daniel Veillard),
+ Fixing assorted potential problems raised by scan (Daniel Veillard),
+ Potential uninitialized arguments raised by scan (Daniel Veillard),
+ Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard),
+ Remove a pedantic warning (Daniel Veillard),
+ 555833 always use rm -f in uninstall-local (Daniel Veillard),
+ 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard),
+ Autoregenerate libxml2.syms automated checkings (Daniel Veillard),
+ Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard),
+ Both args of xmlStrcasestr are const (Daniel Veillard),
+ hide the nbParse* variables used for debugging (Mike Hommey),
+ 570806 changed include of config.h (William M. Brack),
+ cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya)
+
+
+
+2.7.3: Jan 18 2009:
+ - Build fix: fix build when HTML support is not included.
+ - Bug fixes: avoid memory overflow in gigantic text nodes,
+ indentation problem on the writed (Rob Richards),
+ xmlAddChildList pointer problem (Rob Richards and Kevin Milburn),
+ xmlAddChild problem with attribute (Rob Richards and Kris Breuker),
+ avoid a memory leak in an edge case (Daniel Zimmermann),
+ deallocate some pthread data (Alex Ott).
+ - Improvements: configure option to avoid rebuilding docs (Adrian Bunk),
+ limit text nodes to 10MB max by default, add element traversal
+ APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards),
+ add gcc malloc checking (Marcus Meissner), add gcc printf like functions
+ parameters checking (Marcus Meissner).
+
+
+2.7.2: Oct 3 2008:
+ - Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in
+ - Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+
+ - Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents
+
+
+2.7.1: Sep 1 2008:
+ - Portability fix: Borland C fix (Moritz Both)
+ - Bug fixes: python serialization wrappers, XPath QName corner
+ case handking and leaks (Martin)
+ - Improvement: extend the xmlSave to handle HTML documents and trees
+ - Cleanup: python serialization wrappers
+
+
+2.7.0: Aug 30 2008:
+ - Documentation: switch ChangeLog to UTF-8, improve mutithreads and
+ xmlParserCleanup docs
+ - Portability fixes: Older Win32 platforms (Rob Richards), MSVC
+ porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg),
+ non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
+
+ - Bug fixes: various realloc problems (Ashwin), potential double-free
+ (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
+ Richards), pattern fix when streaming (William Brack), various XML
+ parsing and validation fixes based on the W3C regression tests, reader
+ tree skipping function fix (Ashwin), Schemas regexps escaping fix
+ (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown
+ when encoder cant serialize characters on output
+ - Code cleanup: compilation fix without the reader, without the output
+ (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups,
+ serious cleanup of the entity handling code
+ - Improvement: switch parser to XML-1.0 5th edition, add parsing flags
+ for old versions, switch URI parsing to RFC 3986,
+ add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
+ new hashing functions for dictionnaries (based on Stefan Behnel work),
+ improve handling of misplaced html/head/body in HTML parser, better
+ regression test tools and code coverage display, better algorithms
+ to detect various versions of the billion laughts attacks, make
+ arbitrary parser limits avoidable as a parser option
+
+
+2.6.32: Apr 8 2008:
+ - Documentation: returning heap memory to kernel (Wolfram Sang),
+ trying to clarify xmlCleanupParser() use, xmlXPathContext improvement
+ (Jack Jansen), improve the *Recover* functions documentation,
+ XmlNodeType doc link fix (Martijn Arts)
+ - Bug fixes: internal subset memory leak (Ashwin), avoid problem with
+ paths starting with // (Petr Sumbera), streaming XSD validation callback
+ patches (Ashwin), fix redirection on port other than 80 (William Brack),
+ SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan),
+ regexp bug with '.' (Andrew Tosh), flush the writer at the end of the
+ document (Alfred Mickautsch), output I/O bug fix (William Brack),
+ writer CDATA output after a text node (Alex Khesin), UTF-16 encoding
+ detection (William Brack), fix handling of empty CDATA nodes for Safari
+ team, python binding problem with namespace nodes, improve HTML parsing
+ (Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily
+ Chekalkin), XSD test crash, weird system parameter entity parsing problem,
+ allow save to file:///X:/ windows paths, various attribute normalisation
+ problems, externalSubsetSplit fix (Ashwin), attribute redefinition in
+ the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many
+ out of memory handling fixes (Ashwin), XPath out of memory handling fixes
+ (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding
+ conversion buffer size (Christian Fruth), problems with EatName
+ functions on memory errors, BOM handling in external parsed entities
+ (Mark Rowe)
+ - Code cleanup: fix build under VS 2008 (David Wimsey), remove useless
+ mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo
+ Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need
+ a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon),
+ cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build
+ fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards),
+ duplicate code removal (Ashwin), missing malloc test and error reports
+ (Ashwin), VMS makefile fix (Tycho Hilhorst)
+ - improvements: better plug of schematron in the normal error handling
+ (Tobias Minich)
+
+
+2.6.31: Jan 11 2008:
+ - Security fix: missing of checks in UTF-8 parsing
+ - Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+
+ - Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)
+ - Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option,
+
+
+2.6.30: Aug 23 2007:
+ - Portability: Solaris crash on error handling, windows path fixes
+ (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)
+ - Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
+ reusing a writer for a new document (Dodji Seketeli), Schemas
+ xsi:nil handling patch (Frank Gross), relative URI build problem
+ (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
+ detection bug, fix disparity with xmlSAXUserParseMemory, automata
+ generation for complex regexp counts problems, Schemas IDC import
+ problems (Frank Gross), xpath predicate evailation error handling
+ (William Brack)
+
+
+2.6.29: Jun 12 2007:
+ - Portability: patches from Andreas Stricke for WinCEi,
+ fix compilation warnings (William Brack), avoid warnings on Apple OS/X
+ (Wendy Doyle and Mark Rowe), Windows compilation and threading
+ improvements (Rob Richards), compilation against old Python versions,
+ new GNU tar changes (Ryan Hill)
+ - Documentation: xmlURIUnescapeString comment,
+ - Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind'
+ flag fix (Richard Jones), regexp interpretation of \,
+ htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
+ typo (Bjorn Reese), entity content failure, xmlListAppend() fix
+ (Georges-André Silber), XPath number serialization (William Brack),
+ nanohttp gzipped stream fix (William Brack and Alex Cornejo),
+ xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon),
+ XPath string value of PI nodes (William Brack), XPath node set
+ sorting bugs (William Brack), avoid outputting namespace decl
+ dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
+ error handling, recustion on next in catalogs, fix a Relax-NG crash,
+ workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes,
+ invalid character in attribute detection bug, big comments before
+ internal subset streaming bug, HTML parsing of attributes with : in
+ the name, IDness of name in HTML (Dagfinn I. Mannsåker)
+ - Improvement: keep URI query parts in raw form (Richard Jones),
+ embed tag support in HTML (Michael Day)
+
+
+2.6.28: Apr 17 2007:
+ - Documentation: comment fixes (Markus Keim), xpath comments fixes too
+ (James Dennett)
+ - Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage
+ (Usamah Malik), various regexp bug fixes (DV and William), path conversion
+ on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
+ principal node of axis bug, HTML serialization of some codepoint
+ (Steven Rainwater), user data propagation in XInclude (Michael Day),
+ standalone and XML decl detection (Michael Day), Python id ouptut
+ for some id, fix the big python string memory leak, URI parsing fixes
+ (Stéphane Bidoul and William), long comments parsing bug (William),
+ concurrent threads initialization (Ted Phelps), invalid char
+ in text XInclude (William), XPath memory leak (William), tab in
+ python problems (Andreas Hanke), XPath node comparison error
+ (Oleg Paraschenko), cleanup patch for reader (Julien Reichel),
+ XML Schemas attribute group (William), HTML parsing problem (William),
+ fix char 0x2d in regexps (William), regexp quantifier range with
+ min occurs of 0 (William), HTML script/style parsing (Mike Day)
+ - Improvement: make xmlTextReaderSetup() public
+ - Compilation and postability: fix a missing include problem (William),
+ __ss_familly on AIX again (Björn Wiberg), compilation without zlib
+ (Michael Day), catalog patch for Win32 (Christian Ehrlicher),
+ Windows CE fixes (Andreas Stricke)
+ - Various CVS to SVN infrastructure changes
+
+
+2.6.27: Oct 25 2006:
+ - Portability fixes: file names on windows (Roland Schwingel,
+ Emelyanov Alexey), windows compile fixup (Rob Richards),
+ AIX iconv() is apparently case sensitive
+ - improvements: Python XPath types mapping (Nic Ferrier), XPath optimization
+ (Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node
+ equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest
+ improvememt (Kasimier), expose if library was compiled with zlib
+ support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs
+ (Kasimier), xmlTextConcat should work with comments and PIs (Rob
+ Richards), export htmlNewParserCtxt needed by Michael Day, refactoring
+ of catalog entity loaders (Michael Day), add XPointer support to
+ python bindings (Ross Reedstrom, Brian West and Stefan Anca),
+ try to sort out most file path to URI conversions and xmlPathToUri,
+ add --html --memory case to xmllint
+ - building fix: fix --with-minimum (Felipe Contreras), VMS fix,
+ const'ification of HTML parser structures (Matthias Clasen),
+ portability fix (Emelyanov Alexey), wget autodetection (Peter
+ Breitenlohner), remove the build path recorded in the python
+ shared module, separate library flags for shared and static builds
+ (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix
+ --with-minimum --with-schemas builds
+ - bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and
+ attribute (Kasimier), crash when using the recover mode,
+ xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier),
+ missing destry in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes
+ (Kasimier), warning on entities processing, XHTML script and style
+ serialization (Kasimier), python generator for long types, bug in
+ xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate
+ allocation bug (Marton Illes), error message end of line (Rob Richards),
+ fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
+ crasher, parser safety patch (Ben Darnell), _private context propagation
+ when parsing entities (with Michael Day), fix entities behaviour when
+ using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity
+ context, arg error in SAX callback (Mike Hommey), fix mixed-content
+ autodetect when using --noblanks, fix xmlIOParseDTD error handling,
+ fix bug in xmlSplitQName on special Names, fix Relax-NG element content
+ validation bug, fix xmlReconciliateNs bug, fix potential attribute
+ XML parsing bug, fix line/column accounting in XML parser, chunking bug
+ in the HTML parser on script, try to detect obviously buggy HTML
+ meta encoding indications, bugs with encoding BOM and xmlSaveDoc,
+ HTML entities in attributes parsing, HTML minimized attribute values,
+ htmlReadDoc and htmlReadIO were broken, error handling bug in
+ xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in
+ htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer),
+ bug on misformed SSD regexps (Christopher Boumenot)
+
+ - documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik),
+ fix xmlXPathCastToString documentation, improve man pages for
+ xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few
+ functions
+
+
+2.6.26: Jun 6 2006:
+ - portability fixes: Python detection (Joseph Sacco), compilation
+ error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)
+ - bug fixes: encoding buffer problem, mix of code and data in
+ xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik),
+ variousXSD validation fixes (Kasimier), memory leak in pattern (Rob
+ Richards andKasimier), attribute with colon in name (Rob Richards), XPath
+ leak inerror reporting (Aleksey Sanin), XInclude text include of
+ selfdocument.
+ - improvements: Xpath optimizations (Kasimier), XPath object
+ cache(Kasimier)
+
+
+2.6.25: Jun 6 2006::
+Do not use or package 2.6.25
+2.6.24: Apr 28 2006:
+ - Portability fixes: configure on Windows, testapi compile on windows
+ (Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher),
+ HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1
+ cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on
+ Windows (Roland Schwingel).
+
+ - Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier
+ Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.
+ - Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext()
+ on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming
+ bug, xmlParseComment (with William Brack), regexp bug fixes (DV &
+ Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier),
+ one Relax-NG interleave bug, xmllint --path and --valid,
+ XSD bugfixes (Kasimier), remove debug
+ left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole),
+ xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large
+ number of cleanups and small fixes based on Coverity reports, bug
+ in character ranges, Unicode tables const (Aivars Kalvans), schemas
+ fix (Stefan Kost), xmlRelaxNGParse error deallocation,
+ xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed
+ code point, ixmllint --nonet to never reach the net (Gary Coady),
+ line break in writer after end PI (Jason Viers).
+ - Documentation: man pages updates and cleanups (Daniel Leidert).
+ - New features: Relax NG structure error handlers.
+
+
+2.6.23: Jan 5 2006:
+ - portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+ (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+ --with-minimum compilation fixes (William Brack), error case handling fix
+ on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+ Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+ MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick
+ Jones),
+ - code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+ (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+ parsing code (Bjorn Reese)
+ - bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+ combinatory explosion and performances in regexp code, leak in
+ xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+ Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+ XPath pattern based evaluation bugs (DV & Kasimier),
+ xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+ xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+ vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+ split problem (William), issues with non-namespaced attributes in
+ xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+ HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+ exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+ totalDigits bug (Kasimier Buchcik), error handling when writing to an
+ xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+ Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+ XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+ fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+ (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+ runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+ (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+ compilation and build fixes (Michael Day), removed dependancies on
+ xmlSchemaValidError (Kasimier), bug with <xml:foo/>, more XPath
+ pattern based evaluation fixes (Kasimier)
+ - improvements: XSD Schemas redefinitions/restrictions (Kasimier
+ Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+ transition bug in regexps, ctxt->standalone = -2 to indicate no
+ standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+ (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+ (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+ htmlDocDumpMemoryFormat. (Rob Richards),
+ - documentation: typo (Michael Day), libxml man page (Albert Chin), save
+ function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),
+
+
+2.6.22: Sep 12 2005:
+ - build fixes: compile without schematron (Stéphane Bidoul)
+ - bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
+ CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+ XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+ output formatting for meta element (Rob Richards), script and style
+ XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+ (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)
+ - improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+ XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+ derive (Kasimier Buchcik).
+ - documentation: generation of gtk-doc like docs, integration with
+ devhelp.
+
+
+2.6.21: Sep 4 2005:
+ - build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
+ convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+ sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+ on Windows(Marcus Boerger), compilation without SAX1, detection of the
+ Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+ compilation/link with threads and old gcc, compile problem by C370 on
+ Z/OS,
+ - bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
+ bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+ htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+ Schemas comparisons NIST passes, automata build error xsd:all,
+ xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+ foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+ Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+ namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+ (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+ xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+ messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+ fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+ Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+ serialization, streaming XPath, Schemas determinism detection problem,
+ XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+ Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+ type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+ xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+ error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+ xml:id and IDness at the treee level fixes, XPath streaming patterns
+ bugs.
+ - improvements: structured interfaces for schemas and RNG error reports
+ (Marcus Boerger), optimization of the char data inner loop parsing
+ (thanks to Behdad Esfahbod for the idea), schematron validation though
+ not finished yet, xmlSaveOption to omit XML declaration, keyref match
+ error reports (Kasimier), formal expression handling code not plugged
+ yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+ for text nodes allocation.
+ - documentation: xmllint man page had --nonet duplicated
+
+
+2.6.20: Jul 10 2005:
+ - build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+ Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+ andriy@google.com), use gcc weak references to pthread to avoid the
+ pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+ of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+ compilation when disabling parts of the library, standalone test
+ distribution.
+ - bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+ HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+ overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+ (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+ (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+ on XInclude (William), pattern fixes (William), attribute bug in
+ exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+ Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+ QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+ (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+ Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+ Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+ areBlanks() heuristic failure, duplicate attributes in DTD bug
+ (William).
+ - improvements: lot of work on Schemas by Kasimier Buchcik both on
+ conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+ Matthew Burgess), namespace removal at the python level (Brent
+ Hendricks), Update to new Schemas regression tests from W3C/Nist
+ (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+ xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+ standalone test framework and programs, new DOM import APIs
+ xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+ xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+ Schemas regression tests, xmlStopParser() available in pull mode too,
+ ienhancement to xmllint --shell namespaces support, Windows port of the
+ standalone testing tools (Kasimier and William),
+ xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+ Schemas APIs, Schemas xmlReader support.
+
+
+2.6.19: Apr 02 2005:
+ - build fixes: drop .la from RPMs, --with-minimum build fix (William
+ Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+ 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+ Linux/ELF/gcc4
+ - bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+ code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+ Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+ segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+ (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+ HTML serialization of name attribute on a elements, Python error handlers
+ leaks and improvement (Brent Hendricks), uninitialized variable in
+ encoding code, Relax-NG validation bug, potential crash if
+ gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+ switched back to assuming UTF-8 in case no encoding is given at
+ serialization time
+ - improvements: lot of work on Schemas by Kasimier Buchcik on facets
+ checking and also mixed handling.
+ -
+
+
+2.6.18: Mar 13 2005:
+ - build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+ Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+ some gcc4 fixes, HP-UX portability fixes (Rick Jones).
+ - bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+ xmlreader stopping on non-fatal errors, thread support for dictionnaries
+ reference counting (Gary Coady), internal subset and push problem, URL
+ saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+ fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+ (Mike Hommey), warning should not count as error (William Brack),
+ xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+ FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+ xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+ empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+ (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+ Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+ (Rob Richards), Schemas decimal type fixes (William Brack),
+ xmlByteConsumed static buffer (Ben Maurer).
+ - improvement: speedup parsing comments and DTDs, dictionnary support for
+ hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+ subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+ values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+ Stansvik),
+ - Documentation: Wiki support (Joel Reed)
+
+
+2.6.17: Jan 16 2005:
+ - build fixes: Windows, warnings removal (William Brack),
+ maintainer-clean dependency(William), build in a different directory
+ (William), fixing --with-minimum configure build (William), BeOS build
+ (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+ McNichol)
+ - bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
+ to use the catalog(s), loop on output (William Brack), XPath memory leak,
+ ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+ warning not using error callback (William), xmlStopParser bug (William),
+ UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+ push mode (Rob Richards), line and col computations fixups (Aleksey
+ Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+ patterns with too many steps, bug in RNG choice optimization, line number
+ sometimes missing.
+ - improvements: XSD Schemas (Kasimier Buchcik), python generator
+ (William), xmlUTF8Strpos speedup (William), unicode Python strings
+ (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+ serialize().
+ - new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+ the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+ Reed), error extraction API from regexps, new XMLSave option for format
+ (Phil Shafer)
+ - documentation: site improvement (John Fleck), FAQ entries
+ (William).
+
+
+2.6.16: Nov 10 2004:
+ - general hardening and bug fixing crossing all the API based on new
+ automated regression testing
+ - build fix: IPv6 build and test on AIX (Dodji Seketeli)
+ - bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding
+ conversion functions return values, UTF-8 bug affecting XPath reported by
+ Markus Bertheau, catalog problem with NULL entries (William Brack)
+ - documentation: fix to xmllint man page, some API function descritpion
+ were updated.
+ - improvements: DTD validation APIs provided at the Python level (Brent
+ Hendricks)
+
+
+2.6.15: Oct 27 2004:
+ - security fixes on the nanoftp and nanohttp modules
+ - build fixes: xmllint detection bug in configure, building outside the
+ source tree (Thomas Fitzsimmons)
+ - bug fixes: HTML parser on broken ASCII chars in names (William), Python
+ paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William),
+ saving to python file objects (Malcolm Tredinnick), DTD lookup fix
+ (Malcolm), save back <group> in catalogs (William), tree build
+ fixes (DV and Rob Richards), Schemas memory bug, structured error handler
+ on Python 64bits, thread local memory deallocation, memory leak reported
+ by Volker Roth, xmlValidateDtd in the presence of an internal subset,
+ entities and _private problem (William), xmlBuildRelativeURI error
+ (William).
+ - improvements: better XInclude error reports (William), tree debugging
+ module and tests, convenience functions at the Reader API (Graham
+ Bennett), add support for PI in the HTML parser.
+
+
+2.6.14: Sep 29 2004:
+ - build fixes: configure paths for xmllint and xsltproc, compilation
+ without HTML parser, compilation warning cleanups (William Brack &
+ Malcolm Tredinnick), VMS makefile update (Craig Berry),
+ - bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier
+ Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
+ transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
+ (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
+ handling of failed realloc(), out of bound array adressing in Schemas
+ date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
+ E20 validation fix (Malcolm),
+ - improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
+ xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy
+ (Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm
+ Tredinnick), Schemas support for xsi:schemaLocation,
+ xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)
+
+
+2.6.13: Aug 31 2004:
+ - build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc,
+ Solaris compiler warning, fixing RPM BuildRequires,
+ - fixes: DTD loading on Windows (Igor), Schemas error reports APIs
+ (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
+ and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
+ problem (William), Schemas hexbinary empty values, encoding error could
+ genrate a serialization loop.
+ - Improvements: Schemas validity improvements (Kasimier), added --path
+ and --load-trace options to xmllint
+ - documentation: tutorial update (John Fleck)
+
+
+2.6.12: Aug 22 2004:
+ - build fixes: fix --with-minimum, elfgcchack.h fixes (Peter
+ Breitenlohner), perl path lookup (William), diff on Solaris (Albert
+ Chin), some 64bits cleanups.
+ - Python: avoid a warning with 2.3 (William Brack), tab and space mixes
+ (William), wrapper generator fixes (William), Cygwin support (Gerrit P.
+ Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support
+ (Torkel Lyng)
+ - Schemas: a lot of bug fixes and improvements from Kasimier Buchcik
+ - fixes: RVT fixes (William), XPath context resets bug (William), memory
+ debug (Steve Hay), catalog white space handling (Peter Breitenlohner),
+ xmlReader state after attribute reading (William), structured error
+ handler (William), XInclude generated xml:base fixup (William), Windows
+ memory reallocation problem (Steve Hay), Out of Memory conditions
+ handling (William and Olivier Andrieu), htmlNewDoc() charset bug,
+ htmlReadMemory init (William), a posteriori validation DTD base
+ (William), notations serialization missing, xmlGetNodePath (Dodji),
+ xmlCheckUTF8 (Diego Tartara), missing line numbers on entity
+ (William)
+ - improvements: DocBook catalog build scrip (William), xmlcatalog tool
+ (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey),
+ xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude
+ to not generate start/end nodes, extend xmllint --version to include CVS
+ tag (William)
+ - documentation: web pages fixes, validity API docs fixes (William)
+ schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)
+
+
+2.6.11: July 5 2004:
+ - Schemas: a lot of changes and improvements by Kasimier Buchcik for
+ attributes, namespaces and simple types.
+ - build fixes: --with-minimum (William Brack), some gcc cleanup
+ (William), --with-thread-alloc (William)
+ - portability: Windows binary package change (Igor Zlatkovic), Catalog
+ path on Windows
+ - documentation: update to the tutorial (John Fleck), xmllint return code
+ (John Fleck), man pages (Ville Skytta),
+ - bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX
+ properly initialize the library (William), empty node set in XPath
+ (William), xmlSchemas errors (William), invalid charref problem pointed
+ by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
+ with div processing (William), XPointer and xml:base problem(William),
+ Reader and entities, xmllint return code for schemas (William), reader
+ streaming problem (Steve Ball), DTD serialization problem (William),
+ libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on
+ Python classes, xmlReader buffer bug, Python bindings memory interfaces
+ improvement (with Stéphane Bidoul), Fixed the push parser to be back to
+ synchronous behaviour.
+ - improvement: custom per-thread I/O enhancement (Rob Richards), register
+ namespace in debug shell (Stefano Debenedetti), Python based regression
+ test for non-Unix users (William), dynamically increase the number of
+ XPath extension functions in Python and fix a memory leak (Marc-Antoine
+ Parent and William)
+ - performance: hack done with Arjan van de Ven to reduce ELF footprint
+ and generated code on Linux, plus use gcc runtime profiling to optimize
+ the code generated in the RPM packages.
+
+
+2.6.10: May 17 2004:
+ - Web page generated for ChangeLog
+ - build fixes: --without-html problems, make check without make all
+ - portability: problem with xpath.c on Windows (MSC and Borland), memcmp
+ vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not
+ use "list" as parameter name, make tests work with Python 1.5 (Ed
+ Davis),
+ - improvements: made xmlTextReaderMode public, small buffers resizing
+ (Morten Welinder), add --maxmem option to xmllint, add
+ xmlPopInputCallback() for Matt Sergeant, refactoring of serialization
+ escaping, added escaping customization
+ - bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William
+ Brack), xmlReader end of stream problem, node deregistration with reader,
+ URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp
+ transition reduction (William), various XSD Schemas fixes (Kasimier
+ Buchcik), XInclude fallback problem (William), weird problems with DTD
+ (William), structured error handler callback context (William), reverse
+ xmlEncodeSpecialChars() behaviour back to escaping '"'
+
+
+2.6.9: Apr 18 2004:
+ - implement xml:id Working Draft, relaxed XPath id() checking
+ - bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas
+ - improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs
+ - documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments,
+ - Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)
+
+
+2.6.8: Mar 23 2004:
+ - First step of the cleanup of the serialization code and APIs
+ - XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam
+ Dickmeiss), anyURI for "" (John Belmonte)
+ - Python: Canonicalization C14N support added (Anthony Carrico)
+ - xmlDocCopyNode() extension (William)
+ - Relax-NG: fix when processing XInclude results (William), external
+ reference in interleave (William), missing error on <choice>
+ failure (William), memory leak in schemas datatype facets.
+ - xmlWriter: patch for better DTD support (Alfred Mickautsch)
+ - bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William
+ Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to
+ URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
+ XInclude and XPointer fixes for entities (William), XML parser bug
+ reported by Holger Rauch, nanohttp fd leak (William), regexps char
+ groups '-' handling (William), dictionnary reference counting problems,
+ do not close stderr.
+ - performance patches from Petr Pajas
+ - Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)
+ - compilation and portability fixes: --without-valid, catalog cleanups
+ (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation
+ to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino
+ Vidal), Windows build (Eric Zurcher)
+
+
+2.6.7: Feb 23 2004:
+ - documentation: tutorial updates (John Fleck), benchmark results
+ - xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)
+ - XPath optimization (Petr Pajas)
+ - DTD ID handling optimization
+ - bugfixes: xpath number with > 19 fractional (William Brack), push
+ mode with unescaped '>' characters, fix xmllint --stream --timing, fix
+ xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent
+ handling NULL, trying to fix Relax-NG/Perl interface.
+ - python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)
+ - Added relaxng option to xmllint --shell
+
+
+2.6.6: Feb 12 2004:
+ - nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and
+ William) reported by Yuuichi Teranishi
+ - bugfixes: make test and path issues, xmlWriter attribute serialization
+ (William Brack), xmlWriter indentation (William), schemas validation
+ (Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
+ Paraschenko), XInclude empty fallback (William), HTML warnings (William),
+ XPointer in XInclude (William), Python namespace serialization,
+ isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
+ entities in internal subset (William), internal subset bug in push mode,
+ <xs:all> fix (Alexey Sarytchev)
+ - Build: fix for automake-1.8 (Alexander Winston), warnings removal
+ (Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix
+ --with-minimum configuration.
+ - XInclude: allow the 2001 namespace without warning.
+ - Documentation: missing example/index.html (John Fleck), version
+ dependancies (John Fleck)
+ - reader API: structured error reporting (Steve Ball)
+ - Windows compilation: mingw, msys (Mikhail Grushinskiy), function
+ prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
+ patch
+ - Parsers: added xmlByteConsumed(ctxt) API to get the byte offest in
+ input.
+
+
+2.6.5: Jan 25 2004:
+ - Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
+ (William), xs:all problem (William), a number of XPointer bugfixes
+ (William), xmllint error go to stderr, DTD validation problem with
+ namespace, memory leak (William), SAX1 cleanup and minimal options fixes
+ (Mark Vadoc), parser context reset on error (Shaun McCance), XPath union
+ evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin),
+ XML Schemas double free (Steve Ball), XInclude with no href, argument
+ callbacks order for XPath callbacks (Frederic Peters)
+ - Documentation: python scripts (William Brack), xslt stylesheets (John
+ Fleck), doc (Sven Zimmerman), I/O example.
+ - Python bindings: fixes (William), enum support (Stéphane Bidoul),
+ structured error reporting (Stéphane Bidoul)
+ - XInclude: various fixes for conformance, problem related to dictionnary
+ references (William & me), recursion (William)
+ - xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
+ Mickautsch),
+ - xmlSchemas: normalizedString datatype (John Belmonte)
+ - code cleanup for strings functions (William)
+ - Windows: compiler patches (Mark Vakoc)
+ - Parser optimizations, a few new XPath and dictionnary APIs for future
+ XSLT optimizations.
+
+
+2.6.4: Dec 24 2003:
+ - Windows build fixes (Igor Zlatkovic)
+ - Some serious XInclude problems reported by Oleg Paraschenko and
+ - Unix and Makefile packaging fixes (me, William Brack,
+ - Documentation improvements (John Fleck, William Brack), example fix
+ (Lucas Brasilino)
+ - bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of
+ NULL strings (William Brack) , API building reader or parser from
+ filedescriptor should not close it, changed XPath sorting to be stable
+ again (William Brack), xmlGetNodePath() generating '(null)' (William
+ Brack), DTD validation and namespace bug (William Brack), XML Schemas
+ double inclusion behaviour
+
+
+2.6.3: Dec 10 2003:
+ - documentation updates and cleanup (DV, William Brack, John Fleck)
+ - added a repository of examples, examples from Aleksey Sanin, Dodji
+ Seketeli, Alfred Mickautsch
+ - Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw
+ (Kenneth Haley)
+ - Unicode range checking (William Brack)
+ - code cleanup (William Brack)
+ - Python bindings: doc (John Fleck), bug fixes
+ - UTF-16 cleanup and BOM issues (William Brack)
+ - bug fixes: ID and xmlReader validation, XPath (William Brack),
+ xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser
+ (James Bursa), attribute defaulting and validation, some serialization
+ cleanups, XML_GET_LINE macro, memory debug when using threads (William
+ Brack), serialization of attributes and entities content, xmlWriter
+ (Daniel Schulman)
+ - XInclude bugfix, new APIs and update to the last version including the
+ namespace change.
+ - XML Schemas improvements: include (Robert Stepanek), import and
+ namespace handling, fixed the regression tests troubles, added examples
+ based on Eric van der Vlist book, regexp fixes
+ - preliminary pattern support for streaming (needed for schemas
+ constraints), added xmlTextReaderPreservePattern() to collect subdocument
+ when streaming.
+ - various fixes in the structured error handling
+
+
+2.6.2: Nov 4 2003:
+ - XPath context unregistration fixes
+ - text node coalescing fixes (Mark Lilback)
+ - API to screate a W3C Schemas from an existing document (Steve Ball)
+ - BeOS patches (Marcin 'Shard' Konicki)
+ - xmlStrVPrintf function added (Aleksey Sanin)
+ - compilation fixes (Mark Vakoc)
+ - stdin parsing fix (William Brack)
+ - a posteriori DTD validation fixes
+ - xmlReader bug fixes: Walker fixes, python bindings
+ - fixed xmlStopParser() to really stop the parser and errors
+ - always generate line numbers when using the new xmlReadxxx
+ functions
+ - added XInclude support to the xmlReader interface
+ - implemented XML_PARSE_NONET parser option
+ - DocBook XSLT processing bug fixed
+ - HTML serialization for <p> elements (William Brack and me)
+ - XPointer failure in XInclude are now handled as resource errors
+ - fixed xmllint --html to use the HTML serializer on output (added
+ --xmlout to implement the previous behaviour of saving it using the XML
+ serializer)
+
+
+2.6.1: Oct 28 2003:
+ - Mostly bugfixes after the big 2.6.0 changes
+ - Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup
+ (William Brack)
+ - Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor
+ Zlatkovic)
+ - xmlWriter bugfix (Alfred Mickautsch)
+ - chvalid.[ch]: couple of fixes from Stephane Bidoul
+ - context reset: error state reset, push parser reset (Graham
+ Bennett)
+ - context reuse: generate errors if file is not readable
+ - defaulted attributes for element coming from internal entities
+ (Stephane Bidoul)
+ - Python: tab and spaces mix (William Brack)
+ - Error handler could crash in DTD validation in 2.6.0
+ - xmlReader: do not use the document or element _private field
+ - testSAX.c: avoid a problem with some PIs (Massimo Morara)
+ - general bug fixes: mandatory encoding in text decl, serializing
+ Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik),
+ XPath errors not reported, slow HTML parsing of large documents.
+
+
+2.6.0: Oct 20 2003:
+ - Major revision release: should be API and ABI compatible but got a lot
+ of change
+ - Increased the library modularity, far more options can be stripped out,
+ a --with-minimum configuration will weight around 160KBytes
+ - Use per parser and per document dictionnary, allocate names and small
+ text nodes from the dictionnary
+ - Switch to a SAX2 like parser rewrote most of the XML parser core,
+ provides namespace resolution and defaulted attributes, minimize memory
+ allocations and copies, namespace checking and specific error handling,
+ immutable buffers, make predefined entities static structures, etc...
+ - rewrote all the error handling in the library, all errors can be
+ intercepted at a structured level, with precise information
+ available.
+ - New simpler and more generic XML and HTML parser APIs, allowing to
+ easilly modify the parsing options and reuse parser context for multiple
+ consecutive documents.
+ - Similar new APIs for the xmlReader, for options and reuse, provided new
+ functions to access content as const strings, use them for Python
+ bindings
+ - a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin),
+ Walker i.e. reader on a document tree based on Alfred Mickautsch code,
+ make room in nodes for line numbers, reference counting and future PSVI
+ extensions, generation of character ranges to be checked with faster
+ algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer
+ access
+ - New xmlWriter API provided by Alfred Mickautsch
+ - Schemas: base64 support by Anthony Carrico
+ - Parser<->HTTP integration fix, proper processing of the Mime-Type
+ and charset information if available.
+ - Relax-NG: bug fixes including the one reported by Martijn Faassen and
+ zeroOrMore, better error reporting.
+ - Python bindings (Stéphane Bidoul), never use stdout for errors
+ output
+ - Portability: all the headers have macros for export and calling
+ convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry),
+ Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor),
+ Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul),
+ warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin
+ 'Shard' Konicki)
+ - Documentation fixes and README (William Brack), search fix (William),
+ tutorial updates (John Fleck), namespace docs (Stefan Kost)
+ - Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized
+ mutexes, HTML doctype lowercase, SAX/IO (William), compression detection
+ and restore (William), attribute declaration in DTDs (William), namespace
+ on attribute in HTML output (William), input filename (Rob Richards),
+ namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks
+ (Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter
+ Derr), high codepoint charref like &#x10FFFF;, buffer access in push
+ mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug
+ (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
+ error handling.
+ - xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
+ testing, --nodict for building without tree dictionnary, --nocdata to
+ replace CDATA by text, --nsclean to remove surperfluous namespace
+ declarations
+ - added xml2-config --libtool-libs option from Kevin P. Fleming
+ - a lot of profiling and tuning of the code, speedup patch for
+ xmlSearchNs() by Luca Padovani. The xmlReader should do far less
+ allocation and it speed should get closer to SAX. Chris Anderson worked
+ on speeding and cleaning up repetitive checking code.
+ - cleanup of "make tests"
+ - libxml-2.0-uninstalled.pc from Malcolm Tredinnick
+ - deactivated the broken docBook SGML parser code and plugged the XML
+ parser instead.
+
+
+2.5.11: Sep 9 2003:
+A bugfix only release: - risk of crash in Relax-NG
+ - risk of crash when using multithreaded programs
+
+
+2.5.10: Aug 15 2003:
+A bugfixes only release - Windows Makefiles (William Brack)
+ - UTF-16 support fixes (Mark Itzcovitz)
+ - Makefile and portability (William Brack) automake, Linux alpha, Mingw
+ on Windows (Mikhail Grushinskiy)
+ - HTML parser (Oliver Stoeneberg)
+ - XInclude performance problem reported by Kevin Ruscoe
+ - XML parser performance problem reported by Grant Goodale
+ - xmlSAXParseDTD() bug fix from Malcolm Tredinnick
+ - and a couple other cleanup
+
+
+2.5.9: Aug 9 2003:
+ - bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build
+ (Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading
+ (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli),
+ xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean
+ Griffin), HTML parsing problem (William Brack), DTD validation for mixed
+ content + namespaces, HTML serialization, library initialization,
+ progressive HTML parser
+ - better interfaces for Relax-NG error handling (Joachim Bauch, )
+ - adding xmlXIncludeProcessTree() for XInclud'ing in a subtree
+ - doc fixes and improvements (John Fleck)
+ - configure flag for -with-fexceptions when embedding in C++
+ - couple of new UTF-8 helper functions (William Brack)
+ - general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)
+ - xmlTextReader cleanup + enum for node types (Bjorn Reese)
+ - general compilation/warning cleanup Solaris/HP-UX/... (William
+ Brack)
+
+
+2.5.8: Jul 6 2003:
+ - bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark
+ Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack),
+ PI related memleak, compilation without schemas or without xpath (Joerg
+ Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs,
+ rpm problem on , i86_64, removed a few compilation problems from 2.5.7,
+ xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)
+ - portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)
+ - William Brack fixed multithreading lock problems
+ - IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)
+ - Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane
+ Bidoul)
+ - A few W3C Schemas Structure improvements
+ - W3C Schemas Datatype improvements (Charlie Bozeman)
+ - Python bindings for thread globals (Stéphane Bidoul), and method/class
+ generator
+ - added --nonet option to xmllint
+ - documentation improvements (John Fleck)
+
+
+2.5.7: Apr 25 2003:
+ - Relax-NG: Compiling to regexp and streaming validation on top of the
+ xmlReader interface, added to xmllint --stream
+ - xmlReader: Expand(), Next() and DOM access glue, bug fixes
+ - Support for large files: RGN validated a 4.5GB instance
+ - Thread support is now configured in by default
+ - Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes
+ (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser
+ and zero bytes handling, some missing Windows file path conversions,
+ behaviour of the parser and validator in the presence of "out of memory"
+ error conditions
+ - extended the API to be able to plug a garbage collecting memory
+ allocator, added xmlMallocAtomic() and modified the allocations
+ accordingly.
+ - Performances: removed excessive malloc() calls, speedup of the push and
+ xmlReader interfaces, removed excessive thread locking
+ - Documentation: man page (John Fleck), xmlReader documentation
+ - Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)
+
+
+2.5.6: Apr 1 2003:
+ - Fixed W3C XML Schemas datatype, should be compliant now except for
+ binHex and base64 which are not supported yet.
+ - bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and
+ XInclude entities handling, encoding detection on external subsets, XML
+ Schemas bugs and memory leaks, HTML parser (James Bursa)
+ - portability: python/trio (Albert Chin), Sun compiler warnings
+ - documentation: added --relaxng option to xmllint man page (John)
+ - improved error reporting: xml:space, start/end tag mismatches, Relax NG
+ errors
+
+
+2.5.5: Mar 24 2003:
+ - Lot of fixes on the Relax NG implementation. More testing including
+ DocBook and TEI examples.
+ - Increased the support for W3C XML Schemas datatype
+ - Several bug fixes in the URI handling layer
+ - Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding
+ conversion, line counting in the parser.
+ - Added support for $XMLLINT_INDENT environment variable, FTP delete
+ - Fixed the RPM spec file name
+
+
+2.5.4: Feb 20 2003:
+ - Conformance testing and lot of fixes on Relax NG and XInclude
+ implementation
+ - Implementation of XPointer element() scheme
+ - Bug fixes: XML parser, XInclude entities merge, validity checking on
+ namespaces,
+ 2 serialization bugs, node info generation problems, a DTD regexp
+ generation problem.
+
+ - Portability: windows updates and path canonicalization (Igor)
+ - A few typo fixes (Kjartan Maraas)
+ - Python bindings generator fixes (Stephane Bidoul)
+
+
+2.5.3: Feb 10 2003:
+ - RelaxNG and XML Schemas datatypes improvements, and added a first
+ version of RelaxNG Python bindings
+ - Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for
+ serializing namespace nodes, encoding conversion bug, XHTML1
+ serialization
+ - Portability fixes: Windows (Igor), AMD 64bits RPM spec file
+
+
+2.5.2: Feb 5 2003:
+ - First implementation of RelaxNG, added --relaxng flag to xmllint
+ - Schemas support now compiled in by default.
+ - Bug fixes: DTD validation, namespace checking, XInclude and entities,
+ delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul),
+ XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory
+ consumption, HTML parser, HTML serialization in the presence of
+ namespaces
+ - added an HTML API to check elements and attributes.
+ - Documentation improvement, PDF for the tutorial (John Fleck), doc
+ patches (Stefan Kost)
+ - Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)
+ - Added python bindings for XPointer, contextual error reporting
+ (Stéphane Bidoul)
+ - URI/file escaping problems (Stefano Zacchiroli)
+
+
+2.5.1: Jan 8 2003:
+ - Fixes a memory leak and configuration/compilation problems in 2.5.0
+ - documentation updates (John)
+ - a couple of XmlTextReader fixes
+
+
+2.5.0: Jan 6 2003:
+ - New XmltextReader interface based on C#
+ API (with help of Stéphane Bidoul)
+ - Windows: more exports, including the new API (Igor)
+ - XInclude fallback fix
+ - Python: bindings for the new API, packaging (Stéphane Bidoul),
+ drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup
+ and iterators for Python-2.2 (Hannu Krosing)
+ - Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update
+ (John)
+ - Fix an XML parser bug raised by Vyacheslav Pindyura
+ - Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)
+ - Entities handling fixes
+ - new API to optionally track node creation and deletion (Lukas
+ Schroeder)
+ - Added documentation for the XmltextReader interface and some XML guidelines
+
+
+2.4.30: Dec 12 2002:
+ - 2.4.29 broke the python bindings, rereleasing
+ - Improvement/fixes of the XML API generator, and couple of minor code
+ fixes.
+
+
+2.4.29: Dec 11 2002:
+ - Windows fixes (Igor): Windows CE port, pthread linking, python bindings
+ (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates
+ - Fix for prev in python bindings (ERDI Gergo)
+ - Fix for entities handling (Marcus Clarke)
+ - Refactored the XML and HTML dumps to a single code path, fixed XHTML1
+ dump
+ - Fix for URI parsing when handling URNs with fragment identifiers
+ - Fix for HTTP URL escaping problem
+ - added an TextXmlReader (C#) like API (work in progress)
+ - Rewrote the API in XML generation script, includes a C parser and saves
+ more information needed for C# bindings
+
+
+2.4.28: Nov 22 2002:
+ - a couple of python binding fixes
+ - 2 bug fixes in the XML push parser
+ - potential memory leak removed (Martin Stoilov)
+ - fix to the configure script for Unix (Dimitri Papadopoulos)
+ - added encoding support for XInclude parse="text"
+ - autodetection of XHTML1 and specific serialization rules added
+ - nasty threading bug fixed (William Brack)
+
+
+2.4.27: Nov 17 2002:
+ - fixes for the Python bindings
+ - a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(),
+ HTML parser, Schemas (Charles Bozeman), document fragment support
+ (Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer,
+ xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr
+ Pajas), entities processing
+ - added grep to xmllint --shell
+ - VMS update patch from Craig A. Berry
+ - cleanup of the Windows build with support for more compilers (Igor),
+ better thread support on Windows
+ - cleanup of Unix Makefiles and spec file
+ - Improvements to the documentation (John Fleck)
+
+
+2.4.26: Oct 18 2002:
+ - Patches for Windows CE port, improvements on Windows paths handling
+ - Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() ,
+ HTML serialization, Namespace compliance, and a number of small
+ problems
+
+
+2.4.25: Sep 26 2002:
+ - A number of bug fixes: XPath, validation, Python bindings, DOM and
+ tree, xmlI/O, Html
+ - Serious rewrite of XInclude
+ - Made XML Schemas regexp part of the default build and APIs, small fix
+ and improvement of the regexp core
+ - Changed the validation code to reuse XML Schemas regexp APIs
+ - Better handling of Windows file paths, improvement of Makefiles (Igor,
+ Daniel Gehriger, Mark Vakoc)
+ - Improved the python I/O bindings, the tests, added resolver and regexp
+ APIs
+ - New logos from Marc Liyanage
+ - Tutorial improvements: John Fleck, Christopher Harris
+ - Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe
+ Merlet)
+ - removal of all stderr/perror use for error reporting
+ - Better error reporting: XPath and DTD validation
+ - update of the trio portability layer (Bjorn Reese)
+
+2.4.24: Aug 22 2002 - XPath fixes (William), xf:escape-uri() (Wesley Terpstra)
+ - Python binding fixes: makefiles (William), generator, rpm build, x86-64
+ (fcrozat)
+ - HTML <style> and boolean attributes serializer fixes
+ - C14N improvements by Aleksey
+ - doc cleanups: Rick Jones
+ - Windows compiler makefile updates: Igor and Elizabeth Barham
+ - XInclude: implementation of fallback and xml:base fixup added
+
+
+2.4.23: July 6 2002:
+ - performances patches: Peter Jacobi
+ - c14n fixes, testsuite and performances: Aleksey Sanin
+ - added xmlDocFormatDump: Chema Celorio
+ - new tutorial: John Fleck
+ - new hash functions and performances: Sander Vesik, portability fix from
+ Peter Jacobi
+ - a number of bug fixes: XPath (William Brack, Richard Jinks), XML and
+ HTML parsers, ID lookup function
+ - removal of all remaining sprintf: Aleksey Sanin
+
+
+2.4.22: May 27 2002:
+ - a number of bug fixes: configure scripts, base handling, parser, memory
+ usage, HTML parser, XPath, documentation (Christian Cornelssen),
+ indentation, URI parsing
+ - Optimizations for XMLSec, fixing and making public some of the network
+ protocol handlers (Aleksey)
+ - performance patch from Gary Pennington
+ - Charles Bozeman provided date and time support for XML Schemas
+ datatypes
+
+
+2.4.21: Apr 29 2002:
+This release is both a bug fix release and also contains the early XML
+Schemas structures at
+http://www.w3.org/TR/xmlschema-1/
+ and datatypes at
+http://www.w3.org/TR/xmlschema-2/
+ code, beware, all
+interfaces are likely to change, there is huge holes, it is clearly a work in
+progress and don't even think of putting this code in a production system,
+it's actually not compiled in by default. The real fixes are:
+ - a couple of bugs or limitations introduced in 2.4.20
+ - patches for Borland C++ and MSC by Igor
+ - some fixes on XPath strings and conformance patches by Richard
+ Jinks
+ - patch from Aleksey for the ExcC14N specification
+ - OSF/1 bug fix by Bjorn
+
+
+2.4.20: Apr 15 2002:
+ - bug fixes: file descriptor leak, XPath, HTML output, DTD validation
+ - XPath conformance testing by Richard Jinks
+ - Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings,
+ libxml.m4
+
+
+2.4.19: Mar 25 2002:
+ - bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
+ encoder
+ - portability fixes in the HTTP code
+ - memory allocation checks using valgrind, and profiling tests
+ - revamp of the Windows build and Makefiles
+
+
+2.4.18: Mar 18 2002:
+ - bug fixes: tree, SAX, canonicalization, validation, portability,
+ XPath
+ - removed the --with-buffer option it was becoming unmaintainable
+ - serious cleanup of the Python makefiles
+ - speedup patch to XPath very effective for DocBook stylesheets
+ - Fixes for Windows build, cleanup of the documentation
+
+
+2.4.17: Mar 8 2002:
+ - a lot of bug fixes, including "namespace nodes have no parents in
+ XPath"
+ - fixed/improved the Python wrappers, added more examples and more
+ regression tests, XPath extension functions can now return node-sets
+ - added the XML Canonicalization support from Aleksey Sanin
+
+
+2.4.16: Feb 20 2002:
+ - a lot of bug fixes, most of them were triggered by the XML Testsuite
+ from OASIS and W3C. Compliance has been significantly improved.
+ - a couple of portability fixes too.
+
+
+2.4.15: Feb 11 2002:
+ - Fixed the Makefiles, especially the python module ones
+ - A few bug fixes and cleanup
+ - Includes cleanup
+
+
+2.4.14: Feb 8 2002:
+ - Change of License to the MIT
+ License basically for integration in XFree86 codebase, and removing
+ confusion around the previous dual-licensing
+ - added Python bindings, beta software but should already be quite
+ complete
+ - a large number of fixes and cleanups, especially for all tree
+ manipulations
+ - cleanup of the headers, generation of a reference API definition in
+ XML
+
+
+2.4.13: Jan 14 2002:
+ - update of the documentation: John Fleck and Charlie Bozeman
+ - cleanup of timing code from Justin Fletcher
+ - fixes for Windows and initial thread support on Win32: Igor and Serguei
+ Narojnyi
+ - Cygwin patch from Robert Collins
+ - added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg
+
+
+2.4.12: Dec 7 2001:
+ - a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman),
+ XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups
+ (robert)
+ - Eric Lavigne contributed project files for MacOS
+ - some makefiles cleanups
+
+
+2.4.11: Nov 26 2001:
+ - fixed a couple of errors in the includes, fixed a few bugs, some code
+ cleanups
+ - xmllint man pages improvement by Heiko Rupp
+ - updated VMS build instructions from John A Fotheringham
+ - Windows Makefiles updates from Igor
+
+
+2.4.10: Nov 10 2001:
+ - URI escaping fix (Joel Young)
+ - added xmlGetNodePath() (for paths or XPointers generation)
+ - Fixes namespace handling problems when using DTD and validation
+ - improvements on xmllint: Morus Walter patches for --format and
+ --encode, Stefan Kost and Heiko Rupp improvements on the --shell
+ - fixes for xmlcatalog linking pointed by Weiqi Gao
+ - fixes to the HTML parser
+
+
+2.4.9: Nov 6 2001:
+ - fixes more catalog bugs
+ - avoid a compilation problem, improve xmlGetLineNo()
+
+
+2.4.8: Nov 4 2001:
+ - fixed SGML catalogs broken in previous release, updated xmlcatalog
+ tool
+ - fixed a compile errors and some includes troubles.
+
+
+2.4.7: Oct 30 2001:
+ - exported some debugging interfaces
+ - serious rewrite of the catalog code
+ - integrated Gary Pennington thread safety patch, added configure option
+ and regression tests
+ - removed an HTML parser bug
+ - fixed a couple of potentially serious validation bugs
+ - integrated the SGML DocBook support in xmllint
+ - changed the nanoftp anonymous login passwd
+ - some I/O cleanup and a couple of interfaces for Perl wrapper
+ - general bug fixes
+ - updated xmllint man page by John Fleck
+ - some VMS and Windows updates
+
+
+2.4.6: Oct 10 2001:
+ - added an updated man pages by John Fleck
+ - portability and configure fixes
+ - an infinite loop on the HTML parser was removed (William)
+ - Windows makefile patches from Igor
+ - fixed half a dozen bugs reported for libxml or libxslt
+ - updated xmlcatalog to be able to modify SGML super catalogs
+
+
+2.4.5: Sep 14 2001:
+ - Remove a few annoying bugs in 2.4.4
+ - forces the HTML serializer to output decimal charrefs since some
+ version of Netscape can't handle hexadecimal ones
+
+
+1.8.16: Sep 14 2001:
+ - maintenance release of the old libxml1 branch, couple of bug and
+ portability fixes
+
+
+2.4.4: Sep 12 2001:
+ - added --convert to xmlcatalog, bug fixes and cleanups of XML
+ Catalog
+ - a few bug fixes and some portability changes
+ - some documentation cleanups
+
+
+2.4.3: Aug 23 2001:
+ - XML Catalog support see the doc
+ - New NaN/Infinity floating point code
+ - A few bug fixes
+
+
+2.4.2: Aug 15 2001:
+ - adds xmlLineNumbersDefault() to control line number generation
+ - lot of bug fixes
+ - the Microsoft MSC projects files should now be up to date
+ - inheritance of namespaces from DTD defaulted attributes
+ - fixes a serious potential security bug
+ - added a --format option to xmllint
+
+
+2.4.1: July 24 2001:
+ - possibility to keep line numbers in the tree
+ - some computation NaN fixes
+ - extension of the XPath API
+ - cleanup for alpha and ia64 targets
+ - patch to allow saving through HTTP PUT or POST
+
+
+2.4.0: July 10 2001:
+ - Fixed a few bugs in XPath, validation, and tree handling.
+ - Fixed XML Base implementation, added a couple of examples to the
+ regression tests
+ - A bit of cleanup
+
+
+2.3.14: July 5 2001:
+ - fixed some entities problems and reduce memory requirement when
+ substituting them
+ - lots of improvements in the XPath queries interpreter can be
+ substantially faster
+ - Makefiles and configure cleanups
+ - Fixes to XPath variable eval, and compare on empty node set
+ - HTML tag closing bug fixed
+ - Fixed an URI reference computation problem when validating
+
+
+2.3.13: June 28 2001:
+ - 2.3.12 configure.in was broken as well as the push mode XML parser
+ - a few more fixes for compilation on Windows MSC by Yon Derek
+
+
+1.8.14: June 28 2001:
+ - Zbigniew Chyla gave a patch to use the old XML parser in push mode
+ - Small Makefile fix
+
+
+2.3.12: June 26 2001:
+ - lots of cleanup
+ - a couple of validation fix
+ - fixed line number counting
+ - fixed serious problems in the XInclude processing
+ - added support for UTF8 BOM at beginning of entities
+ - fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
+ miscompile uri.c (William), Thomas Leitner provided a fix for the
+ optimizer on Tru64
+ - incorporated Yon Derek and Igor Zlatkovic fixes and improvements for
+ compilation on Windows MSC
+ - update of libxml-doc.el (Felix Natter)
+ - fixed 2 bugs in URI normalization code
+
+
+2.3.11: June 17 2001:
+ - updates to trio, Makefiles and configure should fix some portability
+ problems (alpha)
+ - fixed some HTML serialization problems (pre, script, and block/inline
+ handling), added encoding aware APIs, cleanup of this code
+ - added xmlHasNsProp()
+ - implemented a specific PI for encoding support in the DocBook SGML
+ parser
+ - some XPath fixes (-Infinity, / as a function parameter and namespaces
+ node selection)
+ - fixed a performance problem and an error in the validation code
+ - fixed XInclude routine to implement the recursive behaviour
+ - fixed xmlFreeNode problem when libxml is included statically twice
+ - added --version to xmllint for bug reports
+
+
+2.3.10: June 1 2001:
+ - fixed the SGML catalog support
+ - a number of reported bugs got fixed, in XPath, iconv detection,
+ XInclude processing
+ - XPath string function should now handle unicode correctly
+
+
+2.3.9: May 19 2001:
+Lots of bugfixes, and added a basic SGML catalog support:
+ - HTML push bugfix #54891 and another patch from Jonas Borgstrom
+ - some serious speed optimization again
+ - some documentation cleanups
+ - trying to get better linking on Solaris (-R)
+ - XPath API cleanup from Thomas Broyer
+ - Validation bug fixed #54631, added a patch from Gary Pennington, fixed
+ xmlValidGetValidElements()
+ - Added an INSTALL file
+ - Attribute removal added to API: #54433
+ - added a basic support for SGML catalogs
+ - fixed xmlKeepBlanksDefault(0) API
+ - bugfix in xmlNodeGetLang()
+ - fixed a small configure portability problem
+ - fixed an inversion of SYSTEM and PUBLIC identifier in HTML document
+
+
+1.8.13: May 14 2001:
+ - bugfixes release of the old libxml1 branch used by Gnome
+
+
+2.3.8: May 3 2001:
+ - Integrated an SGML DocBook parser for the Gnome project
+ - Fixed a few things in the HTML parser
+ - Fixed some XPath bugs raised by XSLT use, tried to fix the floating
+ point portability issue
+ - Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for
+ DOM+validation using the XML REC as input and a 700MHz celeron).
+ - incorporated more Windows cleanup
+ - added xmlSaveFormatFile()
+ - fixed problems in copying nodes with entities references (gdome)
+ - removed some troubles surrounding the new validation module
+
+
+2.3.7: April 22 2001:
+ - lots of small bug fixes, corrected XPointer
+ - Non deterministic content model validation support
+ - added xmlDocCopyNode for gdome2
+ - revamped the way the HTML parser handles end of tags
+ - XPath: corrections of namespaces support and number formatting
+ - Windows: Igor Zlatkovic patches for MSC compilation
+ - HTML output fixes from P C Chow and William M. Brack
+ - Improved validation speed sensible for DocBook
+ - fixed a big bug with ID declared in external parsed entities
+ - portability fixes, update of Trio from Bjorn Reese
+
+
+2.3.6: April 8 2001:
+ - Code cleanup using extreme gcc compiler warning options, found and
+ cleared half a dozen potential problem
+ - the Eazel team found an XML parser bug
+ - cleaned up the user of some of the string formatting function. used the
+ trio library code to provide the one needed when the platform is missing
+ them
+ - xpath: removed a memory leak and fixed the predicate evaluation
+ problem, extended the testsuite and cleaned up the result. XPointer seems
+ broken ...
+
+
+2.3.5: Mar 23 2001:
+ - Biggest change is separate parsing and evaluation of XPath expressions,
+ there is some new APIs for this too
+ - included a number of bug fixes(XML push parser, 51876, notations,
+ 52299)
+ - Fixed some portability issues
+
+
+2.3.4: Mar 10 2001:
+ - Fixed bugs #51860 and #51861
+ - Added a global variable xmlDefaultBufferSize to allow default buffer
+ size to be application tunable.
+ - Some cleanup in the validation code, still a bug left and this part
+ should probably be rewritten to support ambiguous content model :-\
+ - Fix a couple of serious bugs introduced or raised by changes in 2.3.3
+ parser
+ - Fixed another bug in xmlNodeGetContent()
+ - Bjorn fixed XPath node collection and Number formatting
+ - Fixed a loop reported in the HTML parsing
+ - blank space are reported even if the Dtd content model proves that they
+ are formatting spaces, this is for XML conformance
+
+
+2.3.3: Mar 1 2001:
+ - small change in XPath for XSLT
+ - documentation cleanups
+ - fix in validation by Gary Pennington
+ - serious parsing performances improvements
+
+
+2.3.2: Feb 24 2001:
+ - chasing XPath bugs, found a bunch, completed some TODO
+ - fixed a Dtd parsing bug
+ - fixed a bug in xmlNodeGetContent
+ - ID/IDREF support partly rewritten by Gary Pennington
+
+
+2.3.1: Feb 15 2001:
+ - some XPath and HTML bug fixes for XSLT
+ - small extension of the hash table interfaces for DOM gdome2
+ implementation
+ - A few bug fixes
+
+
+2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track):
+ - Lots of XPath bug fixes
+ - Add a mode with Dtd lookup but without validation error reporting for
+ XSLT
+ - Add support for text node without escaping (XSLT)
+ - bug fixes for xmlCheckFilename
+ - validation code bug fixes from Gary Pennington
+ - Patch from Paul D. Smith correcting URI path normalization
+ - Patch to allow simultaneous install of libxml-devel and
+ libxml2-devel
+ - the example Makefile is now fixed
+ - added HTML to the RPM packages
+ - tree copying bugfixes
+ - updates to Windows makefiles
+ - optimization patch from Bjorn Reese
+
+
+2.2.11: Jan 4 2001:
+ - bunch of bug fixes (memory I/O, xpath, ftp/http, ...)
+ - added htmlHandleOmittedElem()
+ - Applied Bjorn Reese's IPV6 first patch
+ - Applied Paul D. Smith patches for validation of XInclude results
+ - added XPointer xmlns() new scheme support
+
+
+2.2.10: Nov 25 2000:
+ - Fix the Windows problems of 2.2.8
+ - integrate OpenVMS patches
+ - better handling of some nasty HTML input
+ - Improved the XPointer implementation
+ - integrate a number of provided patches
+
+
+2.2.9: Nov 25 2000:
+ - erroneous release :-(
+
+
+2.2.8: Nov 13 2000:
+ - First version of XInclude
+ support
+ - Patch in conditional section handling
+ - updated MS compiler project
+ - fixed some XPath problems
+ - added an URI escaping function
+ - some other bug fixes
+
+
+2.2.7: Oct 31 2000:
+ - added message redirection
+ - XPath improvements (thanks TOM !)
+ - xmlIOParseDTD() added
+ - various small fixes in the HTML, URI, HTTP and XPointer support
+ - some cleanup of the Makefile, autoconf and the distribution content
+
+
+2.2.6: Oct 25 2000::
+ - Added an hash table module, migrated a number of internal structure to
+ those
+ - Fixed a posteriori validation problems
+ - HTTP module cleanups
+ - HTML parser improvements (tag errors, script/style handling, attribute
+ normalization)
+ - coalescing of adjacent text nodes
+ - couple of XPath bug fixes, exported the internal API
+
+
+2.2.5: Oct 15 2000::
+ - XPointer implementation and testsuite
+ - Lot of XPath fixes, added variable and functions registration, more
+ tests
+ - Portability fixes, lots of enhancements toward an easy Windows build
+ and release
+ - Late validation fixes
+ - Integrated a lot of contributed patches
+ - added memory management docs
+ - a performance problem when using large buffer seems fixed
+
+
+2.2.4: Oct 1 2000::
+ - main XPath problem fixed
+ - Integrated portability patches for Windows
+ - Serious bug fixes on the URI and HTML code
+
+
+2.2.3: Sep 17 2000:
+ - bug fixes
+ - cleanup of entity handling code
+ - overall review of all loops in the parsers, all sprintf usage has been
+ checked too
+ - Far better handling of larges Dtd. Validating against DocBook XML Dtd
+ works smoothly now.
+
+
+1.8.10: Sep 6 2000:
+ - bug fix release for some Gnome projects
+
+
+2.2.2: August 12 2000:
+ - mostly bug fixes
+ - started adding routines to access xml parser context options
+
+
+2.2.1: July 21 2000:
+ - a purely bug fixes release
+ - fixed an encoding support problem when parsing from a memory block
+ - fixed a DOCTYPE parsing problem
+ - removed a bug in the function allowing to override the memory
+ allocation routines
+
+
+2.2.0: July 14 2000:
+ - applied a lot of portability fixes
+ - better encoding support/cleanup and saving (content is now always
+ encoded in UTF-8)
+ - the HTML parser now correctly handles encodings
+ - added xmlHasProp()
+ - fixed a serious problem with &#38;
+ - propagated the fix to FTP client
+ - cleanup, bugfixes, etc ...
+ - Added a page about libxml Internationalization
+ support
+
+
+1.8.9: July 9 2000:
+ - fixed the spec the RPMs should be better
+ - fixed a serious bug in the FTP implementation, released 1.8.9 to solve
+ rpmfind users problem
+
+
+2.1.1: July 1 2000:
+ - fixes a couple of bugs in the 2.1.0 packaging
+ - improvements on the HTML parser
+
+
+2.1.0 and 1.8.8: June 29 2000:
+ - 1.8.8 is mostly a commodity package for upgrading to libxml2 according
+ to new instructions. It fixes a nasty problem
+ about &#38; charref parsing
+ - 2.1.0 also ease the upgrade from libxml v1 to the recent version. it
+ also contains numerous fixes and enhancements:
+
+ added xmlStopParser() to stop parsing
+ improved a lot parsing speed when there is large CDATA blocs
+ includes XPath patches provided by Picdar Technology
+ tried to fix as much as possible DTD validation and namespace
+ related problems
+ output to a given encoding has been added/tested
+ lot of various fixes
+
+
+ - added xmlStopParser() to stop parsing
+ - improved a lot parsing speed when there is large CDATA blocs
+ - includes XPath patches provided by Picdar Technology
+ - tried to fix as much as possible DTD validation and namespace
+ related problems
+ - output to a given encoding has been added/tested
+ - lot of various fixes
+
+
+2.0.0: Apr 12 2000:
+ - First public release of libxml2. If you are using libxml, it's a good
+ idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially
+ scheduled for Apr 3 the release occurred only on Apr 12 due to massive
+ workload.
+ - The include are now located under $prefix/include/libxml (instead of
+ $prefix/include/gnome-xml), they also are referenced by
+ #include <libxml/xxx.h>
+ instead of
+ #include "xxx.h"
+
+ - a new URI module for parsing URIs and following strictly RFC 2396
+ - the memory allocation routines used by libxml can now be overloaded
+ dynamically by using xmlMemSetup()
+ - The previously CVS only tool tester has been renamed
+ xmllint and is now installed as part of the libxml2
+ package
+ - The I/O interface has been revamped. There is now ways to plug in
+ specific I/O modules, either at the URI scheme detection level using
+ xmlRegisterInputCallbacks() or by passing I/O functions when creating a
+ parser context using xmlCreateIOParserCtxt()
+ - there is a C preprocessor macro LIBXML_VERSION providing the version
+ number of the libxml module in use
+ - a number of optional features of libxml can now be excluded at
+ configure time (FTP/HTTP/HTML/XPath/Debug)
+
+
+2.0.0beta: Mar 14 2000:
+ - This is a first Beta release of libxml version 2
+ - It's available only fromxmlsoft.org
+ FTP, it's packaged as libxml2-2.0.0beta and available as tar and
+ RPMs
+ - This version is now the head in the Gnome CVS base, the old one is
+ available under the tag LIB_XML_1_X
+ - This includes a very large set of changes. From a programmatic point
+ of view applications should not have to be modified too much, check the
+ upgrade page
+ - Some interfaces may changes (especially a bit about encoding).
+ - the updates includes:
+
+ fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
+ handled now
+ Better handling of entities, especially well-formedness checking
+ and proper PEref extensions in external subsets
+ DTD conditional sections
+ Validation now correctly handle entities content
+ change
+ structures to accommodate DOM
+
+
+ - fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
+ handled now
+ - Better handling of entities, especially well-formedness checking
+ and proper PEref extensions in external subsets
+ - DTD conditional sections
+ - Validation now correctly handle entities content
+ - change
+ structures to accommodate DOM
+ - Serious progress were made toward compliance, here are the result of the test against the
+ OASIS testsuite (except the Japanese tests since I don't support that
+ encoding yet). This URL is rebuilt every couple of hours using the CVS
+ head version.
+
+
+1.8.7: Mar 6 2000:
+ - This is a bug fix release:
+ - It is possible to disable the ignorable blanks heuristic used by
+ libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
+ that for adherence to XML spec, this behaviour will be disabled by
+ default in 2.x . The same function will allow to keep compatibility for
+ old code.
+ - Blanks in <a> </a> constructs are not ignored anymore,
+ avoiding heuristic is really the Right Way :-\
+ - The unchecked use of snprintf which was breaking libxml-1.8.6
+ compilation on some platforms has been fixed
+ - nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
+ URIs
+
+
+1.8.6: Jan 31 2000:
+ - added a nanoFTP transport module, debugged until the new version of rpmfind can use
+ it without troubles
+
+
+1.8.5: Jan 21 2000:
+ - adding APIs to parse a well balanced chunk of XML (production [43] content of the
+ XML spec)
+ - fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no
+ - Jody Goldberg <jgoldberg@home.com> provided another patch trying
+ to solve the zlib checks problems
+ - The current state in gnome CVS base is expected to ship as 1.8.5 with
+ gnumeric soon
+
+
+1.8.4: Jan 13 2000:
+ - bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()
+ - all exit() call should have been removed from libxml
+ - fixed a problem with INCLUDE_WINSOCK on WIN32 platform
+ - added newDocFragment()
+
+
+1.8.3: Jan 5 2000:
+ - a Push interface for the XML and HTML parsers
+ - a shell-like interface to the document tree (try tester --shell :-)
+ - lots of bug fixes and improvement added over XMas holidays
+ - fixed the DTD parsing code to work with the xhtml DTD
+ - added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()
+ - Fixed bugs in xmlNewNs()
+ - External entity loading code has been revamped, now it uses
+ xmlLoadExternalEntity(), some fix on entities processing were added
+ - cleaned up WIN32 includes of socket stuff
+
+
+1.8.2: Dec 21 1999:
+ - I got another problem with includes and C++, I hope this issue is fixed
+ for good this time
+ - Added a few tree modification functions: xmlReplaceNode,
+ xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and
+ xmlDocSetRootElement
+ - Tried to improve the HTML output with help from Chris Lahey
+
+
+1.8.1: Dec 18 1999:
+ - various patches to avoid troubles when using libxml with C++ compilers
+ the "namespace" keyword and C escaping in include files
+ - a problem in one of the core macros IS_CHAR was corrected
+ - fixed a bug introduced in 1.8.0 breaking default namespace processing,
+ and more specifically the Dia application
+ - fixed a posteriori validation (validation after parsing, or by using a
+ Dtd not specified in the original document)
+ - fixed a bug in
+
+
+1.8.0: Dec 12 1999:
+ - cleanup, especially memory wise
+ - the parser should be more reliable, especially the HTML one, it should
+ not crash, whatever the input !
+ - Integrated various patches, especially a speedup improvement for large
+ dataset from Carl Nygard,
+ configure with --with-buffers to enable them.
+ - attribute normalization, oops should have been added long ago !
+ - attributes defaulted from DTDs should be available, xmlSetProp() now
+ does entities escaping by default.
+
+
+1.7.4: Oct 25 1999:
+ - Lots of HTML improvement
+ - Fixed some errors when saving both XML and HTML
+ - More examples, the regression tests should now look clean
+ - Fixed a bug with contiguous charref
+
+
+1.7.3: Sep 29 1999:
+ - portability problems fixed
+ - snprintf was used unconditionally, leading to link problems on system
+ were it's not available, fixed
+
+
+1.7.1: Sep 24 1999:
+ - The basic type for strings manipulated by libxml has been renamed in
+ 1.7.1 from CHAR to xmlChar. The reason
+ is that CHAR was conflicting with a predefined type on Windows. However
+ on non WIN32 environment, compatibility is provided by the way of a
+ #define .
+ - Changed another error : the use of a structure field called errno, and
+ leading to troubles on platforms where it's a macro
+
+
+1.7.0: Sep 23 1999:
+ - Added the ability to fetch remote DTD or parsed entities, see the nanohttp module.
+ - Added an errno to report errors by another mean than a simple printf
+ like callback
+ - Finished ID/IDREF support and checking when validation
+ - Serious memory leaks fixed (there is now a memory wrapper module)
+ - Improvement of XPath
+ implementation
+ - Added an HTML parser front-end
+
+Daniel Veillard at
+bugs.html
diff --git a/README b/README
new file mode 100644
index 0000000..749e671
--- /dev/null
+++ b/README
@@ -0,0 +1,39 @@
+
+ XML toolkit from the GNOME project
+
+Full documentation is available on-line at
+ http://xmlsoft.org/
+
+This code is released under the MIT Licence see the Copyright file.
+
+To build on an Unixised setup:
+ ./configure ; make ; make install
+To build on Windows:
+ see instructions on win32/Readme.txt
+
+To assert build quality:
+ on an Unixised setup:
+ run make tests
+ otherwise:
+ There is 3 standalone tools runtest.c runsuite.c testapi.c, which
+ should compile as part of the build or as any application would.
+ Launch them from this directory to get results, runtest checks
+ the proper functionning of libxml2 main APIs while testapi does
+ a full coverage check. Report failures to the list.
+
+To report bugs, follow the instructions at:
+ http://xmlsoft.org/bugs.html
+
+A mailing-list xml@gnome.org is available, to subscribe:
+ http://mail.gnome.org/mailman/listinfo/xml
+
+The list archive is at:
+ http://mail.gnome.org/archives/xml/
+
+All technical answers asked privately will be automatically answered on
+the list and archived for public access unless privacy is explicitly
+required and justified.
+
+Daniel Veillard
+
+$Id$
diff --git a/README.tests b/README.tests
new file mode 100644
index 0000000..8d86f2a
--- /dev/null
+++ b/README.tests
@@ -0,0 +1,39 @@
+ README.tests
+
+ Instructions for standalone test regressions of libxml2
+
+libxml2-tests-$version.tar.gz contains 3 standalone C programs as well
+as a large amount of tests and results coming from libxml2 itself and
+from W3C, NIST, Sun Microsystems, Microsoft and James Clark. Each C
+program has a different testing purpose:
+
+ runtest.c : runs libxml2 basic internal regression tests
+ runsuite.c: runs libxml2 against external regression tests
+ testapi.c : exercises the library public entry points
+ testchar.c: exercise the check of character ranges and UTF-8 validation
+
+The command:
+
+ make check
+or
+ make -f Makefile.tests check
+
+should be sufficient on an Unix system to build and exercise the tests
+for the version of the library installed on the system. Note however
+that there isn't backward compatibility provided so if the installed
+version is older than the testsuite one, failing to compile or run the tests
+is likely. In any event this won't work with an installed libxml2 older
+than 2.6.20.
+
+Building on other platforms should be a matter of compiling the C files
+like any other program using libxml2, running the test should be done
+simply by launching the resulting executables.
+
+Also note the availability of a "make valgrind" target which will run the
+above tests under valgrind to check for memory errors (but this relies
+on the availability of the valgrind command and take far more time to
+complete).
+
+Daniel Veillard
+Mon May 7 2012
+
diff --git a/SAX.c b/SAX.c
new file mode 100644
index 0000000..292af57
--- /dev/null
+++ b/SAX.c
@@ -0,0 +1,180 @@
+/*
+ * SAX.c : Old SAX v1 handlers to build a tree.
+ * Deprecated except for compatibility
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ */
+
+
+#define IN_LIBXML
+#include "libxml.h"
+#include <stdlib.h>
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlIO.h>
+#include <libxml/SAX.h>
+#include <libxml/uri.h>
+#include <libxml/valid.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/globals.h>
+#include <libxml/SAX2.h>
+
+#ifdef LIBXML_LEGACY_ENABLED
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * initxmlDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ * @warning: flag if non-zero sets the handler warning procedure
+ *
+ * Initialize the default XML SAX version 1 handler
+ * DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks
+ */
+void
+initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
+{
+
+ if(hdlr->initialized == 1)
+ return;
+
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = xmlSAX2ExternalSubset;
+ hdlr->isStandalone = xmlSAX2IsStandalone;
+ hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
+ hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
+ hdlr->resolveEntity = xmlSAX2ResolveEntity;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = xmlSAX2GetParameterEntity;
+ hdlr->entityDecl = xmlSAX2EntityDecl;
+ hdlr->attributeDecl = xmlSAX2AttributeDecl;
+ hdlr->elementDecl = xmlSAX2ElementDecl;
+ hdlr->notationDecl = xmlSAX2NotationDecl;
+ hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->reference = xmlSAX2Reference;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = xmlSAX2CDataBlock;
+ hdlr->ignorableWhitespace = xmlSAX2Characters;
+ hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
+ if (warning == 0)
+ hdlr->warning = NULL;
+ else
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ hdlr->initialized = 1;
+}
+
+#ifdef LIBXML_HTML_ENABLED
+
+/**
+ * inithtmlDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ *
+ * Initialize the default HTML SAX version 1 handler
+ * DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks
+ */
+void
+inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
+{
+ if(hdlr->initialized == 1)
+ return;
+
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = NULL;
+ hdlr->isStandalone = NULL;
+ hdlr->hasInternalSubset = NULL;
+ hdlr->hasExternalSubset = NULL;
+ hdlr->resolveEntity = NULL;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = NULL;
+ hdlr->entityDecl = NULL;
+ hdlr->attributeDecl = NULL;
+ hdlr->elementDecl = NULL;
+ hdlr->notationDecl = NULL;
+ hdlr->unparsedEntityDecl = NULL;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->reference = NULL;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = xmlSAX2CDataBlock;
+ hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
+ hdlr->comment = xmlSAX2Comment;
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ hdlr->initialized = 1;
+}
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+/**
+ * initdocbDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ *
+ * Initialize the default DocBook SAX version 1 handler
+ * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
+ */
+void
+initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr)
+{
+ if(hdlr->initialized == 1)
+ return;
+
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = NULL;
+ hdlr->isStandalone = xmlSAX2IsStandalone;
+ hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
+ hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
+ hdlr->resolveEntity = xmlSAX2ResolveEntity;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = NULL;
+ hdlr->entityDecl = xmlSAX2EntityDecl;
+ hdlr->attributeDecl = NULL;
+ hdlr->elementDecl = NULL;
+ hdlr->notationDecl = NULL;
+ hdlr->unparsedEntityDecl = NULL;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->reference = xmlSAX2Reference;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = NULL;
+ hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ hdlr->processingInstruction = NULL;
+ hdlr->comment = xmlSAX2Comment;
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ hdlr->initialized = 1;
+}
+
+#endif /* LIBXML_DOCB_ENABLED */
+
+#endif /* LIBXML_SAX1_ENABLED */
+
+#define bottom_SAX
+#include "elfgcchack.h"
+#endif /* LIBXML_LEGACY_ENABLED */
diff --git a/SAX2.c b/SAX2.c
new file mode 100644
index 0000000..ffef3e1
--- /dev/null
+++ b/SAX2.c
@@ -0,0 +1,3045 @@
+/*
+ * SAX2.c : Default SAX2 handler to build a tree.
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ */
+
+
+#define IN_LIBXML
+#include "libxml.h"
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlIO.h>
+#include <libxml/SAX.h>
+#include <libxml/uri.h>
+#include <libxml/valid.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/globals.h>
+
+/* Define SIZE_T_MAX unless defined through <limits.h>. */
+#ifndef SIZE_T_MAX
+# define SIZE_T_MAX ((size_t)-1)
+#endif /* !SIZE_T_MAX */
+
+/* #define DEBUG_SAX2 */
+/* #define DEBUG_SAX2_TREE */
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ * XML_CATALOG_PREFER user env to select between system/public prefered
+ * option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk>
+ *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
+ *> values "system" and "public". I have made the default be "system" to
+ *> match yours.
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/*
+ * xmlSAX2ErrMemory:
+ * @ctxt: an XML validation parser context
+ * @msg: a string to accompany the error message
+ */
+static void
+xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
+ xmlStructuredErrorFunc schannel = NULL;
+ const char *str1 = "out of memory\n";
+
+ if (ctxt != NULL) {
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
+ schannel = ctxt->sax->serror;
+ __xmlRaiseError(schannel,
+ ctxt->vctxt.error, ctxt->vctxt.userData,
+ ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ NULL, NULL, 0, 0,
+ msg, (const char *) str1, NULL);
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ } else {
+ __xmlRaiseError(schannel,
+ NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, XML_ERR_NO_MEMORY,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ NULL, NULL, 0, 0,
+ msg, (const char *) str1, NULL);
+ }
+}
+
+/**
+ * xmlValidError:
+ * @ctxt: an XML validation parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ *
+ * Handle a validation error
+ */
+static void
+xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const char *str1, const char *str2)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL) {
+ ctxt->errNo = error;
+ if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
+ schannel = ctxt->sax->serror;
+ __xmlRaiseError(schannel,
+ ctxt->vctxt.error, ctxt->vctxt.userData,
+ ctxt, NULL, XML_FROM_DTD, error,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ ctxt->valid = 0;
+ } else {
+ __xmlRaiseError(schannel,
+ NULL, NULL,
+ ctxt, NULL, XML_FROM_DTD, error,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ }
+}
+
+/**
+ * xmlFatalErrMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an error string
+ * @str2: an error string
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_FATAL, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ NULL, 0, 0, msg, str1, str2);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ ctxt->valid = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlWarnMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an error string
+ * @str2: an error string
+ *
+ * Handle a parser warning
+ */
+static void
+xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_WARNING, NULL, 0,
+ (const char *) str1, NULL,
+ NULL, 0, 0, msg, str1);
+}
+
+/**
+ * xmlNsErrMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an error string
+ * @str2: an error string
+ *
+ * Handle a namespace error
+ */
+static void
+xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ NULL, 0, 0, msg, str1, str2);
+}
+
+/**
+ * xmlNsWarnMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an error string
+ *
+ * Handle a namespace warning
+ */
+static void
+xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
+ XML_ERR_WARNING, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ NULL, 0, 0, msg, str1, str2);
+}
+
+/**
+ * xmlSAX2GetPublicId:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
+ *
+ * Returns a xmlChar *
+ */
+const xmlChar *
+xmlSAX2GetPublicId(void *ctx ATTRIBUTE_UNUSED)
+{
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+ return(NULL);
+}
+
+/**
+ * xmlSAX2GetSystemId:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provides the system ID, basically URL or filename e.g.
+ * http://www.sgmlsource.com/dtds/memo.dtd
+ *
+ * Returns a xmlChar *
+ */
+const xmlChar *
+xmlSAX2GetSystemId(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
+ return((const xmlChar *) ctxt->input->filename);
+}
+
+/**
+ * xmlSAX2GetLineNumber:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provide the line number of the current parsing point.
+ *
+ * Returns an int
+ */
+int
+xmlSAX2GetLineNumber(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
+ return(ctxt->input->line);
+}
+
+/**
+ * xmlSAX2GetColumnNumber:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provide the column number of the current parsing point.
+ *
+ * Returns an int
+ */
+int
+xmlSAX2GetColumnNumber(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
+ return(ctxt->input->col);
+}
+
+/**
+ * xmlSAX2IsStandalone:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+int
+xmlSAX2IsStandalone(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0);
+ return(ctxt->myDoc->standalone == 1);
+}
+
+/**
+ * xmlSAX2HasInternalSubset:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+int
+xmlSAX2HasInternalSubset(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0);
+ return(ctxt->myDoc->intSubset != NULL);
+}
+
+/**
+ * xmlSAX2HasExternalSubset:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+int
+xmlSAX2HasExternalSubset(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if ((ctxt == NULL) || (ctxt->myDoc == NULL)) return(0);
+ return(ctxt->myDoc->extSubset != NULL);
+}
+
+/**
+ * xmlSAX2InternalSubset:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ */
+void
+xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlDtdPtr dtd;
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2InternalSubset(%s, %s, %s)\n",
+ name, ExternalID, SystemID);
+#endif
+
+ if (ctxt->myDoc == NULL)
+ return;
+ dtd = xmlGetIntSubset(ctxt->myDoc);
+ if (dtd != NULL) {
+ if (ctxt->html)
+ return;
+ xmlUnlinkNode((xmlNodePtr) dtd);
+ xmlFreeDtd(dtd);
+ ctxt->myDoc->intSubset = NULL;
+ }
+ ctxt->myDoc->intSubset =
+ xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID);
+ if (ctxt->myDoc->intSubset == NULL)
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset");
+}
+
+/**
+ * xmlSAX2ExternalSubset:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ */
+void
+xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2ExternalSubset(%s, %s, %s)\n",
+ name, ExternalID, SystemID);
+#endif
+ if (((ExternalID != NULL) || (SystemID != NULL)) &&
+ (((ctxt->validate) || (ctxt->loadsubset != 0)) &&
+ (ctxt->wellFormed && ctxt->myDoc))) {
+ /*
+ * Try to fetch and parse the external subset.
+ */
+ xmlParserInputPtr oldinput;
+ int oldinputNr;
+ int oldinputMax;
+ xmlParserInputPtr *oldinputTab;
+ xmlParserInputPtr input = NULL;
+ xmlCharEncoding enc;
+ int oldcharset;
+ const xmlChar *oldencoding;
+
+ /*
+ * Ask the Entity resolver to load the damn thing
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL))
+ input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID,
+ SystemID);
+ if (input == NULL) {
+ return;
+ }
+
+ xmlNewDtd(ctxt->myDoc, name, ExternalID, SystemID);
+
+ /*
+ * make sure we won't destroy the main document context
+ */
+ oldinput = ctxt->input;
+ oldinputNr = ctxt->inputNr;
+ oldinputMax = ctxt->inputMax;
+ oldinputTab = ctxt->inputTab;
+ oldcharset = ctxt->charset;
+ oldencoding = ctxt->encoding;
+ ctxt->encoding = NULL;
+
+ ctxt->inputTab = (xmlParserInputPtr *)
+ xmlMalloc(5 * sizeof(xmlParserInputPtr));
+ if (ctxt->inputTab == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset");
+ ctxt->input = oldinput;
+ ctxt->inputNr = oldinputNr;
+ ctxt->inputMax = oldinputMax;
+ ctxt->inputTab = oldinputTab;
+ ctxt->charset = oldcharset;
+ ctxt->encoding = oldencoding;
+ return;
+ }
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 5;
+ ctxt->input = NULL;
+ xmlPushInput(ctxt, input);
+
+ /*
+ * On the fly encoding conversion if needed
+ */
+ if (ctxt->input->length >= 4) {
+ enc = xmlDetectCharEncoding(ctxt->input->cur, 4);
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ if (input->filename == NULL)
+ input->filename = (char *) xmlCanonicPath(SystemID);
+ input->line = 1;
+ input->col = 1;
+ input->base = ctxt->input->cur;
+ input->cur = ctxt->input->cur;
+ input->free = NULL;
+
+ /*
+ * let's parse that entity knowing it's an external subset.
+ */
+ xmlParseExternalSubset(ctxt, ExternalID, SystemID);
+
+ /*
+ * Free up the external entities
+ */
+
+ while (ctxt->inputNr > 1)
+ xmlPopInput(ctxt);
+ xmlFreeInputStream(ctxt->input);
+ xmlFree(ctxt->inputTab);
+
+ /*
+ * Restore the parsing context of the main entity
+ */
+ ctxt->input = oldinput;
+ ctxt->inputNr = oldinputNr;
+ ctxt->inputMax = oldinputMax;
+ ctxt->inputTab = oldinputTab;
+ ctxt->charset = oldcharset;
+ if ((ctxt->encoding != NULL) &&
+ ((ctxt->dict == NULL) ||
+ (!xmlDictOwns(ctxt->dict, ctxt->encoding))))
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = oldencoding;
+ /* ctxt->wellFormed = oldwellFormed; */
+ }
+}
+
+/**
+ * xmlSAX2ResolveEntity:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this xmlSAX2ResolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+xmlParserInputPtr
+xmlSAX2ResolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr ret;
+ xmlChar *URI;
+ const char *base = NULL;
+
+ if (ctx == NULL) return(NULL);
+ if (ctxt->input != NULL)
+ base = ctxt->input->filename;
+ if (base == NULL)
+ base = ctxt->directory;
+
+ URI = xmlBuildURI(systemId, (const xmlChar *) base);
+
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2ResolveEntity(%s, %s)\n", publicId, systemId);
+#endif
+
+ ret = xmlLoadExternalEntity((const char *) URI,
+ (const char *) publicId, ctxt);
+ if (URI != NULL)
+ xmlFree(URI);
+ return(ret);
+}
+
+/**
+ * xmlSAX2GetEntity:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+xmlEntityPtr
+xmlSAX2GetEntity(void *ctx, const xmlChar *name)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlEntityPtr ret = NULL;
+
+ if (ctx == NULL) return(NULL);
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2GetEntity(%s)\n", name);
+#endif
+
+ if (ctxt->inSubset == 0) {
+ ret = xmlGetPredefinedEntity(name);
+ if (ret != NULL)
+ return(ret);
+ }
+ if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) {
+ if (ctxt->inSubset == 2) {
+ ctxt->myDoc->standalone = 0;
+ ret = xmlGetDocEntity(ctxt->myDoc, name);
+ ctxt->myDoc->standalone = 1;
+ } else {
+ ret = xmlGetDocEntity(ctxt->myDoc, name);
+ if (ret == NULL) {
+ ctxt->myDoc->standalone = 0;
+ ret = xmlGetDocEntity(ctxt->myDoc, name);
+ if (ret != NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NOT_STANDALONE,
+ "Entity(%s) document marked standalone but requires external subset\n",
+ name, NULL);
+ }
+ ctxt->myDoc->standalone = 1;
+ }
+ }
+ } else {
+ ret = xmlGetDocEntity(ctxt->myDoc, name);
+ }
+ if ((ret != NULL) &&
+ ((ctxt->validate) || (ctxt->replaceEntities)) &&
+ (ret->children == NULL) &&
+ (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
+ int val;
+
+ /*
+ * for validation purposes we really need to fetch and
+ * parse the external entity
+ */
+ xmlNodePtr children;
+ unsigned long oldnbent = ctxt->nbentities;
+
+ val = xmlParseCtxtExternalEntity(ctxt, ret->URI,
+ ret->ExternalID, &children);
+ if (val == 0) {
+ xmlAddChildList((xmlNodePtr) ret, children);
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
+ "Failure to process entity %s\n", name, NULL);
+ ctxt->validate = 0;
+ return(NULL);
+ }
+ ret->owner = 1;
+ if (ret->checked == 0) {
+ ret->checked = (ctxt->nbentities - oldnbent + 1) * 2;
+ if ((ret->content != NULL) && (xmlStrchr(ret->content, '<')))
+ ret->checked |= 1;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlSAX2GetParameterEntity:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+xmlEntityPtr
+xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlEntityPtr ret;
+
+ if (ctx == NULL) return(NULL);
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2GetParameterEntity(%s)\n", name);
+#endif
+
+ ret = xmlGetParameterEntity(ctxt->myDoc, name);
+ return(ret);
+}
+
+
+/**
+ * xmlSAX2EntityDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+void
+xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+ xmlEntityPtr ent;
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2EntityDecl(%s, %d, %s, %s, %s)\n",
+ name, type, publicId, systemId, content);
+#endif
+ if (ctxt->inSubset == 1) {
+ ent = xmlAddDocEntity(ctxt->myDoc, name, type, publicId,
+ systemId, content);
+ if ((ent == NULL) && (ctxt->pedantic))
+ xmlWarnMsg(ctxt, XML_WAR_ENTITY_REDEFINED,
+ "Entity(%s) already defined in the internal subset\n",
+ name);
+ if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
+ xmlChar *URI;
+ const char *base = NULL;
+
+ if (ctxt->input != NULL)
+ base = ctxt->input->filename;
+ if (base == NULL)
+ base = ctxt->directory;
+
+ URI = xmlBuildURI(systemId, (const xmlChar *) base);
+ ent->URI = URI;
+ }
+ } else if (ctxt->inSubset == 2) {
+ ent = xmlAddDtdEntity(ctxt->myDoc, name, type, publicId,
+ systemId, content);
+ if ((ent == NULL) && (ctxt->pedantic) &&
+ (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
+ ctxt->sax->warning(ctxt->userData,
+ "Entity(%s) already defined in the external subset\n", name);
+ if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
+ xmlChar *URI;
+ const char *base = NULL;
+
+ if (ctxt->input != NULL)
+ base = ctxt->input->filename;
+ if (base == NULL)
+ base = ctxt->directory;
+
+ URI = xmlBuildURI(systemId, (const xmlChar *) base);
+ ent->URI = URI;
+ }
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_PROCESSING,
+ "SAX.xmlSAX2EntityDecl(%s) called while not in subset\n",
+ name, NULL);
+ }
+}
+
+/**
+ * xmlSAX2AttributeDecl:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed
+ */
+void
+xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
+ int type, int def, const xmlChar *defaultValue,
+ xmlEnumerationPtr tree)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlAttributePtr attr;
+ xmlChar *name = NULL, *prefix = NULL;
+
+ if ((ctxt == NULL) || (ctxt->myDoc == NULL))
+ return;
+
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
+ elem, fullname, type, def, defaultValue);
+#endif
+ if ((xmlStrEqual(fullname, BAD_CAST "xml:id")) &&
+ (type != XML_ATTRIBUTE_ID)) {
+ /*
+ * Raise the error but keep the validity flag
+ */
+ int tmp = ctxt->valid;
+ xmlErrValid(ctxt, XML_DTD_XMLID_TYPE,
+ "xml:id : attribute type should be ID\n", NULL, NULL);
+ ctxt->valid = tmp;
+ }
+ /* TODO: optimize name/prefix allocation */
+ name = xmlSplitQName(ctxt, fullname, &prefix);
+ ctxt->vctxt.valid = 1;
+ if (ctxt->inSubset == 1)
+ attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, elem,
+ name, prefix, (xmlAttributeType) type,
+ (xmlAttributeDefault) def, defaultValue, tree);
+ else if (ctxt->inSubset == 2)
+ attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem,
+ name, prefix, (xmlAttributeType) type,
+ (xmlAttributeDefault) def, defaultValue, tree);
+ else {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "SAX.xmlSAX2AttributeDecl(%s) called while not in subset\n",
+ name, NULL);
+ xmlFreeEnumeration(tree);
+ return;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ if (ctxt->vctxt.valid == 0)
+ ctxt->valid = 0;
+ if ((attr != NULL) && (ctxt->validate) && (ctxt->wellFormed) &&
+ (ctxt->myDoc->intSubset != NULL))
+ ctxt->valid &= xmlValidateAttributeDecl(&ctxt->vctxt, ctxt->myDoc,
+ attr);
+#endif /* LIBXML_VALID_ENABLED */
+ if (prefix != NULL)
+ xmlFree(prefix);
+ if (name != NULL)
+ xmlFree(name);
+}
+
+/**
+ * xmlSAX2ElementDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed
+ */
+void
+xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
+ xmlElementContentPtr content)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlElementPtr elem = NULL;
+
+ if ((ctxt == NULL) || (ctxt->myDoc == NULL))
+ return;
+
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type);
+#endif
+
+ if (ctxt->inSubset == 1)
+ elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset,
+ name, (xmlElementTypeVal) type, content);
+ else if (ctxt->inSubset == 2)
+ elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset,
+ name, (xmlElementTypeVal) type, content);
+ else {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "SAX.xmlSAX2ElementDecl(%s) called while not in subset\n",
+ name, NULL);
+ return;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ if (elem == NULL)
+ ctxt->valid = 0;
+ if (ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &=
+ xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem);
+#endif /* LIBXML_VALID_ENABLED */
+}
+
+/**
+ * xmlSAX2NotationDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+void
+xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNotationPtr nota = NULL;
+
+ if ((ctxt == NULL) || (ctxt->myDoc == NULL))
+ return;
+
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
+#endif
+
+ if ((publicId == NULL) && (systemId == NULL)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
+ "SAX.xmlSAX2NotationDecl(%s) externalID or PublicID missing\n",
+ name, NULL);
+ return;
+ } else if (ctxt->inSubset == 1)
+ nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name,
+ publicId, systemId);
+ else if (ctxt->inSubset == 2)
+ nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, name,
+ publicId, systemId);
+ else {
+ xmlFatalErrMsg(ctxt, XML_ERR_NOTATION_PROCESSING,
+ "SAX.xmlSAX2NotationDecl(%s) called while not in subset\n",
+ name, NULL);
+ return;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ if (nota == NULL) ctxt->valid = 0;
+ if ((ctxt->validate) && (ctxt->wellFormed) &&
+ (ctxt->myDoc->intSubset != NULL))
+ ctxt->valid &= xmlValidateNotationDecl(&ctxt->vctxt, ctxt->myDoc,
+ nota);
+#endif /* LIBXML_VALID_ENABLED */
+}
+
+/**
+ * xmlSAX2UnparsedEntityDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+void
+xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+ xmlEntityPtr ent;
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2UnparsedEntityDecl(%s, %s, %s, %s)\n",
+ name, publicId, systemId, notationName);
+#endif
+ if (ctxt->inSubset == 1) {
+ ent = xmlAddDocEntity(ctxt->myDoc, name,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
+ publicId, systemId, notationName);
+ if ((ent == NULL) && (ctxt->pedantic) &&
+ (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
+ ctxt->sax->warning(ctxt->userData,
+ "Entity(%s) already defined in the internal subset\n", name);
+ if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
+ xmlChar *URI;
+ const char *base = NULL;
+
+ if (ctxt->input != NULL)
+ base = ctxt->input->filename;
+ if (base == NULL)
+ base = ctxt->directory;
+
+ URI = xmlBuildURI(systemId, (const xmlChar *) base);
+ ent->URI = URI;
+ }
+ } else if (ctxt->inSubset == 2) {
+ ent = xmlAddDtdEntity(ctxt->myDoc, name,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
+ publicId, systemId, notationName);
+ if ((ent == NULL) && (ctxt->pedantic) &&
+ (ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
+ ctxt->sax->warning(ctxt->userData,
+ "Entity(%s) already defined in the external subset\n", name);
+ if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
+ xmlChar *URI;
+ const char *base = NULL;
+
+ if (ctxt->input != NULL)
+ base = ctxt->input->filename;
+ if (base == NULL)
+ base = ctxt->directory;
+
+ URI = xmlBuildURI(systemId, (const xmlChar *) base);
+ ent->URI = URI;
+ }
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "SAX.xmlSAX2UnparsedEntityDecl(%s) called while not in subset\n",
+ name, NULL);
+ }
+}
+
+/**
+ * xmlSAX2SetDocumentLocator:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+void
+xmlSAX2SetDocumentLocator(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2SetDocumentLocator()\n");
+#endif
+}
+
+/**
+ * xmlSAX2StartDocument:
+ * @ctx: the user data (XML parser context)
+ *
+ * called when the document start being processed.
+ */
+void
+xmlSAX2StartDocument(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlDocPtr doc;
+
+ if (ctx == NULL) return;
+
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2StartDocument()\n");
+#endif
+ if (ctxt->html) {
+#ifdef LIBXML_HTML_ENABLED
+ if (ctxt->myDoc == NULL)
+ ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL);
+ if (ctxt->myDoc == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
+ return;
+ }
+ ctxt->myDoc->properties = XML_DOC_HTML;
+ ctxt->myDoc->parseFlags = ctxt->options;
+#else
+ xmlGenericError(xmlGenericErrorContext,
+ "libxml2 built without HTML support\n");
+ ctxt->errNo = XML_ERR_INTERNAL_ERROR;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return;
+#endif
+ } else {
+ doc = ctxt->myDoc = xmlNewDoc(ctxt->version);
+ if (doc != NULL) {
+ doc->properties = 0;
+ if (ctxt->options & XML_PARSE_OLD10)
+ doc->properties |= XML_DOC_OLD10;
+ doc->parseFlags = ctxt->options;
+ if (ctxt->encoding != NULL)
+ doc->encoding = xmlStrdup(ctxt->encoding);
+ else
+ doc->encoding = NULL;
+ doc->standalone = ctxt->standalone;
+ } else {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
+ return;
+ }
+ if ((ctxt->dictNames) && (doc != NULL)) {
+ doc->dict = ctxt->dict;
+ xmlDictReference(doc->dict);
+ }
+ }
+ if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) &&
+ (ctxt->input != NULL) && (ctxt->input->filename != NULL)) {
+ ctxt->myDoc->URL = xmlPathToURI((const xmlChar *)ctxt->input->filename);
+ if (ctxt->myDoc->URL == NULL)
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartDocument");
+ }
+}
+
+/**
+ * xmlSAX2EndDocument:
+ * @ctx: the user data (XML parser context)
+ *
+ * called when the document end has been detected.
+ */
+void
+xmlSAX2EndDocument(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2EndDocument()\n");
+#endif
+ if (ctx == NULL) return;
+#ifdef LIBXML_VALID_ENABLED
+ if (ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc);
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * Grab the encoding if it was added on-the-fly
+ */
+ if ((ctxt->encoding != NULL) && (ctxt->myDoc != NULL) &&
+ (ctxt->myDoc->encoding == NULL)) {
+ ctxt->myDoc->encoding = ctxt->encoding;
+ ctxt->encoding = NULL;
+ }
+ if ((ctxt->inputTab != NULL) &&
+ (ctxt->inputNr > 0) && (ctxt->inputTab[0] != NULL) &&
+ (ctxt->inputTab[0]->encoding != NULL) && (ctxt->myDoc != NULL) &&
+ (ctxt->myDoc->encoding == NULL)) {
+ ctxt->myDoc->encoding = xmlStrdup(ctxt->inputTab[0]->encoding);
+ }
+ if ((ctxt->charset != XML_CHAR_ENCODING_NONE) && (ctxt->myDoc != NULL) &&
+ (ctxt->myDoc->charset == XML_CHAR_ENCODING_NONE)) {
+ ctxt->myDoc->charset = ctxt->charset;
+ }
+}
+
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+/**
+ * xmlSAX2AttributeInternal:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The attribute name, including namespace prefix
+ * @value: The attribute value
+ * @prefix: the prefix on the element node
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+static void
+xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
+ const xmlChar *value, const xmlChar *prefix ATTRIBUTE_UNUSED)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlAttrPtr ret;
+ xmlChar *name;
+ xmlChar *ns;
+ xmlChar *nval;
+ xmlNsPtr namespace;
+
+ if (ctxt->html) {
+ name = xmlStrdup(fullname);
+ ns = NULL;
+ namespace = NULL;
+ } else {
+ /*
+ * Split the full name into a namespace prefix and the tag name
+ */
+ name = xmlSplitQName(ctxt, fullname, &ns);
+ if ((name != NULL) && (name[0] == 0)) {
+ if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
+ xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR,
+ "invalid namespace declaration '%s'\n",
+ fullname, NULL);
+ } else {
+ xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN,
+ "Avoid attribute ending with ':' like '%s'\n",
+ fullname, NULL);
+ }
+ if (ns != NULL)
+ xmlFree(ns);
+ ns = NULL;
+ xmlFree(name);
+ name = xmlStrdup(fullname);
+ }
+ }
+ if (name == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ if (ns != NULL)
+ xmlFree(ns);
+ return;
+ }
+
+#ifdef LIBXML_HTML_ENABLED
+ if ((ctxt->html) &&
+ (value == NULL) && (htmlIsBooleanAttr(fullname))) {
+ nval = xmlStrdup(fullname);
+ value = (const xmlChar *) nval;
+ } else
+#endif
+ {
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * Do the last stage of the attribute normalization
+ * Needed for HTML too:
+ * http://www.w3.org/TR/html4/types.html#h-6.2
+ */
+ ctxt->vctxt.valid = 1;
+ nval = xmlValidCtxtNormalizeAttributeValue(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node,
+ fullname, value);
+ if (ctxt->vctxt.valid != 1) {
+ ctxt->valid = 0;
+ }
+ if (nval != NULL)
+ value = nval;
+#else
+ nval = NULL;
+#endif /* LIBXML_VALID_ENABLED */
+ }
+
+ /*
+ * Check whether it's a namespace definition
+ */
+ if ((!ctxt->html) && (ns == NULL) &&
+ (name[0] == 'x') && (name[1] == 'm') && (name[2] == 'l') &&
+ (name[3] == 'n') && (name[4] == 's') && (name[5] == 0)) {
+ xmlNsPtr nsret;
+ xmlChar *val;
+
+ if (!ctxt->replaceEntities) {
+ ctxt->depth++;
+ val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
+ 0,0,0);
+ ctxt->depth--;
+ if (val == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ if (name != NULL)
+ xmlFree(name);
+ return;
+ }
+ } else {
+ val = (xmlChar *) value;
+ }
+
+ if (val[0] != 0) {
+ xmlURIPtr uri;
+
+ uri = xmlParseURI((const char *)val);
+ if (uri == NULL) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
+ ctxt->sax->warning(ctxt->userData,
+ "xmlns: %s not a valid URI\n", val);
+ } else {
+ if (uri->scheme == NULL) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
+ ctxt->sax->warning(ctxt->userData,
+ "xmlns: URI %s is not absolute\n", val);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+
+ /* a default namespace definition */
+ nsret = xmlNewNs(ctxt->node, val, NULL);
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * Validate also for namespace decls, they are attributes from
+ * an XML-1.0 perspective
+ */
+ if (nsret != NULL && ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
+ ctxt->node, prefix, nsret, val);
+#endif /* LIBXML_VALID_ENABLED */
+ if (name != NULL)
+ xmlFree(name);
+ if (nval != NULL)
+ xmlFree(nval);
+ if (val != value)
+ xmlFree(val);
+ return;
+ }
+ if ((!ctxt->html) &&
+ (ns != NULL) && (ns[0] == 'x') && (ns[1] == 'm') && (ns[2] == 'l') &&
+ (ns[3] == 'n') && (ns[4] == 's') && (ns[5] == 0)) {
+ xmlNsPtr nsret;
+ xmlChar *val;
+
+ if (!ctxt->replaceEntities) {
+ ctxt->depth++;
+ val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
+ 0,0,0);
+ ctxt->depth--;
+ if (val == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ xmlFree(ns);
+ if (name != NULL)
+ xmlFree(name);
+ return;
+ }
+ } else {
+ val = (xmlChar *) value;
+ }
+
+ if (val[0] == 0) {
+ xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY,
+ "Empty namespace name for prefix %s\n", name, NULL);
+ }
+ if ((ctxt->pedantic != 0) && (val[0] != 0)) {
+ xmlURIPtr uri;
+
+ uri = xmlParseURI((const char *)val);
+ if (uri == NULL) {
+ xmlNsWarnMsg(ctxt, XML_WAR_NS_URI,
+ "xmlns:%s: %s not a valid URI\n", name, value);
+ } else {
+ if (uri->scheme == NULL) {
+ xmlNsWarnMsg(ctxt, XML_WAR_NS_URI_RELATIVE,
+ "xmlns:%s: URI %s is not absolute\n", name, value);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+
+ /* a standard namespace definition */
+ nsret = xmlNewNs(ctxt->node, val, name);
+ xmlFree(ns);
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * Validate also for namespace decls, they are attributes from
+ * an XML-1.0 perspective
+ */
+ if (nsret != NULL && ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
+ ctxt->node, prefix, nsret, value);
+#endif /* LIBXML_VALID_ENABLED */
+ if (name != NULL)
+ xmlFree(name);
+ if (nval != NULL)
+ xmlFree(nval);
+ if (val != value)
+ xmlFree(val);
+ return;
+ }
+
+ if (ns != NULL) {
+ namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, ns);
+
+ if (namespace == NULL) {
+ xmlNsErrMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s of attribute %s is not defined\n",
+ ns, name);
+ } else {
+ xmlAttrPtr prop;
+
+ prop = ctxt->node->properties;
+ while (prop != NULL) {
+ if (prop->ns != NULL) {
+ if ((xmlStrEqual(name, prop->name)) &&
+ ((namespace == prop->ns) ||
+ (xmlStrEqual(namespace->href, prop->ns->href)))) {
+ xmlNsErrMsg(ctxt, XML_ERR_ATTRIBUTE_REDEFINED,
+ "Attribute %s in %s redefined\n",
+ name, namespace->href);
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0) ctxt->disableSAX = 1;
+ goto error;
+ }
+ }
+ prop = prop->next;
+ }
+ }
+ } else {
+ namespace = NULL;
+ }
+
+ /* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */
+ ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL);
+
+ if (ret != NULL) {
+ if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
+ xmlNodePtr tmp;
+
+ ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
+ tmp = ret->children;
+ while (tmp != NULL) {
+ tmp->parent = (xmlNodePtr) ret;
+ if (tmp->next == NULL)
+ ret->last = tmp;
+ tmp = tmp->next;
+ }
+ } else if (value != NULL) {
+ ret->children = xmlNewDocText(ctxt->myDoc, value);
+ ret->last = ret->children;
+ if (ret->children != NULL)
+ ret->children->parent = (xmlNodePtr) ret;
+ }
+ }
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset) {
+
+ /*
+ * If we don't substitute entities, the validation should be
+ * done on a value with replaced entities anyway.
+ */
+ if (!ctxt->replaceEntities) {
+ xmlChar *val;
+
+ ctxt->depth++;
+ val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
+ 0,0,0);
+ ctxt->depth--;
+
+ if (val == NULL)
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, value);
+ else {
+ xmlChar *nvalnorm;
+
+ /*
+ * Do the last stage of the attribute normalization
+ * It need to be done twice ... it's an extra burden related
+ * to the ability to keep xmlSAX2References in attributes
+ */
+ nvalnorm = xmlValidNormalizeAttributeValue(ctxt->myDoc,
+ ctxt->node, fullname, val);
+ if (nvalnorm != NULL) {
+ xmlFree(val);
+ val = nvalnorm;
+ }
+
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, val);
+ xmlFree(val);
+ }
+ } else {
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
+ ctxt->node, ret, value);
+ }
+ } else
+#endif /* LIBXML_VALID_ENABLED */
+ if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) &&
+ (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
+ ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) {
+ /*
+ * when validating, the ID registration is done at the attribute
+ * validation level. Otherwise we have to do specific handling here.
+ */
+ if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
+ /*
+ * Add the xml:id value
+ *
+ * Open issue: normalization of the value.
+ */
+ if (xmlValidateNCName(value, 1) != 0) {
+ xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
+ "xml:id : attribute value %s is not an NCName\n",
+ (const char *) value, NULL);
+ }
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
+ xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
+ }
+
+error:
+ if (nval != NULL)
+ xmlFree(nval);
+ if (ns != NULL)
+ xmlFree(ns);
+}
+
+/*
+ * xmlCheckDefaultedAttributes:
+ *
+ * Check defaulted attributes from the DTD
+ */
+static void
+xmlCheckDefaultedAttributes(xmlParserCtxtPtr ctxt, const xmlChar *name,
+ const xmlChar *prefix, const xmlChar **atts) {
+ xmlElementPtr elemDecl;
+ const xmlChar *att;
+ int internal = 1;
+ int i;
+
+ elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->intSubset, name, prefix);
+ if (elemDecl == NULL) {
+ elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset, name, prefix);
+ internal = 0;
+ }
+
+process_external_subset:
+
+ if (elemDecl != NULL) {
+ xmlAttributePtr attr = elemDecl->attributes;
+ /*
+ * Check against defaulted attributes from the external subset
+ * if the document is stamped as standalone
+ */
+ if ((ctxt->myDoc->standalone == 1) &&
+ (ctxt->myDoc->extSubset != NULL) &&
+ (ctxt->validate)) {
+ while (attr != NULL) {
+ if ((attr->defaultValue != NULL) &&
+ (xmlGetDtdQAttrDesc(ctxt->myDoc->extSubset,
+ attr->elem, attr->name,
+ attr->prefix) == attr) &&
+ (xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset,
+ attr->elem, attr->name,
+ attr->prefix) == NULL)) {
+ xmlChar *fulln;
+
+ if (attr->prefix != NULL) {
+ fulln = xmlStrdup(attr->prefix);
+ fulln = xmlStrcat(fulln, BAD_CAST ":");
+ fulln = xmlStrcat(fulln, attr->name);
+ } else {
+ fulln = xmlStrdup(attr->name);
+ }
+ if (fulln == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ break;
+ }
+
+ /*
+ * Check that the attribute is not declared in the
+ * serialization
+ */
+ att = NULL;
+ if (atts != NULL) {
+ i = 0;
+ att = atts[i];
+ while (att != NULL) {
+ if (xmlStrEqual(att, fulln))
+ break;
+ i += 2;
+ att = atts[i];
+ }
+ }
+ if (att == NULL) {
+ xmlErrValid(ctxt, XML_DTD_STANDALONE_DEFAULTED,
+ "standalone: attribute %s on %s defaulted from external subset\n",
+ (const char *)fulln,
+ (const char *)attr->elem);
+ }
+ xmlFree(fulln);
+ }
+ attr = attr->nexth;
+ }
+ }
+
+ /*
+ * Actually insert defaulted values when needed
+ */
+ attr = elemDecl->attributes;
+ while (attr != NULL) {
+ /*
+ * Make sure that attributes redefinition occuring in the
+ * internal subset are not overriden by definitions in the
+ * external subset.
+ */
+ if (attr->defaultValue != NULL) {
+ /*
+ * the element should be instantiated in the tree if:
+ * - this is a namespace prefix
+ * - the user required for completion in the tree
+ * like XSLT
+ * - there isn't already an attribute definition
+ * in the internal subset overriding it.
+ */
+ if (((attr->prefix != NULL) &&
+ (xmlStrEqual(attr->prefix, BAD_CAST "xmlns"))) ||
+ ((attr->prefix == NULL) &&
+ (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) ||
+ (ctxt->loadsubset & XML_COMPLETE_ATTRS)) {
+ xmlAttributePtr tst;
+
+ tst = xmlGetDtdQAttrDesc(ctxt->myDoc->intSubset,
+ attr->elem, attr->name,
+ attr->prefix);
+ if ((tst == attr) || (tst == NULL)) {
+ xmlChar fn[50];
+ xmlChar *fulln;
+
+ fulln = xmlBuildQName(attr->name, attr->prefix, fn, 50);
+ if (fulln == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ return;
+ }
+
+ /*
+ * Check that the attribute is not declared in the
+ * serialization
+ */
+ att = NULL;
+ if (atts != NULL) {
+ i = 0;
+ att = atts[i];
+ while (att != NULL) {
+ if (xmlStrEqual(att, fulln))
+ break;
+ i += 2;
+ att = atts[i];
+ }
+ }
+ if (att == NULL) {
+ xmlSAX2AttributeInternal(ctxt, fulln,
+ attr->defaultValue, prefix);
+ }
+ if ((fulln != fn) && (fulln != attr->name))
+ xmlFree(fulln);
+ }
+ }
+ }
+ attr = attr->nexth;
+ }
+ if (internal == 1) {
+ elemDecl = xmlGetDtdQElementDesc(ctxt->myDoc->extSubset,
+ name, prefix);
+ internal = 0;
+ goto process_external_subset;
+ }
+ }
+}
+
+/**
+ * xmlSAX2StartElement:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * called when an opening tag has been processed.
+ */
+void
+xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret;
+ xmlNodePtr parent;
+ xmlNsPtr ns;
+ xmlChar *name;
+ xmlChar *prefix;
+ const xmlChar *att;
+ const xmlChar *value;
+ int i;
+
+ if ((ctx == NULL) || (fullname == NULL) || (ctxt->myDoc == NULL)) return;
+ parent = ctxt->node;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2StartElement(%s)\n", fullname);
+#endif
+
+ /*
+ * First check on validity:
+ */
+ if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
+ ((ctxt->myDoc->intSubset == NULL) ||
+ ((ctxt->myDoc->intSubset->notations == NULL) &&
+ (ctxt->myDoc->intSubset->elements == NULL) &&
+ (ctxt->myDoc->intSubset->attributes == NULL) &&
+ (ctxt->myDoc->intSubset->entities == NULL)))) {
+ xmlErrValid(ctxt, XML_ERR_NO_DTD,
+ "Validation failed: no DTD found !", NULL, NULL);
+ ctxt->validate = 0;
+ }
+
+
+ /*
+ * Split the full name into a namespace prefix and the tag name
+ */
+ name = xmlSplitQName(ctxt, fullname, &prefix);
+
+
+ /*
+ * Note : the namespace resolution is deferred until the end of the
+ * attributes parsing, since local namespace can be defined as
+ * an attribute at this level.
+ */
+ ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL, name, NULL);
+ if (ret == NULL) {
+ if (prefix != NULL)
+ xmlFree(prefix);
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
+ return;
+ }
+ if (ctxt->myDoc->children == NULL) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext, "Setting %s as root\n", name);
+#endif
+ xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
+ } else if (parent == NULL) {
+ parent = ctxt->myDoc->children;
+ }
+ ctxt->nodemem = -1;
+ if (ctxt->linenumbers) {
+ if (ctxt->input != NULL) {
+ if (ctxt->input->line < 65535)
+ ret->line = (short) ctxt->input->line;
+ else
+ ret->line = 65535;
+ }
+ }
+
+ /*
+ * We are parsing a new node.
+ */
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext, "pushing(%s)\n", name);
+#endif
+ nodePush(ctxt, ret);
+
+ /*
+ * Link the child element
+ */
+ if (parent != NULL) {
+ if (parent->type == XML_ELEMENT_NODE) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding child %s to %s\n", name, parent->name);
+#endif
+ xmlAddChild(parent, ret);
+ } else {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding sibling %s to ", name);
+ xmlDebugDumpOneNode(stderr, parent, 0);
+#endif
+ xmlAddSibling(parent, ret);
+ }
+ }
+
+ /*
+ * Insert all the defaulted attributes from the DTD especially namespaces
+ */
+ if ((!ctxt->html) &&
+ ((ctxt->myDoc->intSubset != NULL) ||
+ (ctxt->myDoc->extSubset != NULL))) {
+ xmlCheckDefaultedAttributes(ctxt, name, prefix, atts);
+ }
+
+ /*
+ * process all the attributes whose name start with "xmlns"
+ */
+ if (atts != NULL) {
+ i = 0;
+ att = atts[i++];
+ value = atts[i++];
+ if (!ctxt->html) {
+ while ((att != NULL) && (value != NULL)) {
+ if ((att[0] == 'x') && (att[1] == 'm') && (att[2] == 'l') &&
+ (att[3] == 'n') && (att[4] == 's'))
+ xmlSAX2AttributeInternal(ctxt, att, value, prefix);
+
+ att = atts[i++];
+ value = atts[i++];
+ }
+ }
+ }
+
+ /*
+ * Search the namespace, note that since the attributes have been
+ * processed, the local namespaces are available.
+ */
+ ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
+ if ((ns == NULL) && (parent != NULL))
+ ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
+ if ((prefix != NULL) && (ns == NULL)) {
+ ns = xmlNewNs(ret, NULL, prefix);
+ xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s is not defined\n",
+ prefix, NULL);
+ }
+
+ /*
+ * set the namespace node, making sure that if the default namspace
+ * is unbound on a parent we simply kee it NULL
+ */
+ if ((ns != NULL) && (ns->href != NULL) &&
+ ((ns->href[0] != 0) || (ns->prefix != NULL)))
+ xmlSetNs(ret, ns);
+
+ /*
+ * process all the other attributes
+ */
+ if (atts != NULL) {
+ i = 0;
+ att = atts[i++];
+ value = atts[i++];
+ if (ctxt->html) {
+ while (att != NULL) {
+ xmlSAX2AttributeInternal(ctxt, att, value, NULL);
+ att = atts[i++];
+ value = atts[i++];
+ }
+ } else {
+ while ((att != NULL) && (value != NULL)) {
+ if ((att[0] != 'x') || (att[1] != 'm') || (att[2] != 'l') ||
+ (att[3] != 'n') || (att[4] != 's'))
+ xmlSAX2AttributeInternal(ctxt, att, value, NULL);
+
+ /*
+ * Next ones
+ */
+ att = atts[i++];
+ value = atts[i++];
+ }
+ }
+ }
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * If it's the Document root, finish the DTD validation and
+ * check the document root element for validity
+ */
+ if ((ctxt->validate) && (ctxt->vctxt.finishDtd == XML_CTXT_FINISH_DTD_0)) {
+ int chk;
+
+ chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc);
+ if (chk <= 0)
+ ctxt->valid = 0;
+ if (chk < 0)
+ ctxt->wellFormed = 0;
+ ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
+ ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+
+ if (prefix != NULL)
+ xmlFree(prefix);
+
+}
+
+/**
+ * xmlSAX2EndElement:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+void
+xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr cur;
+
+ if (ctx == NULL) return;
+ cur = ctxt->node;
+#ifdef DEBUG_SAX
+ if (name == NULL)
+ xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(NULL)\n");
+ else
+ xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name);
+#endif
+
+ /* Capture end position and add node */
+ if (cur != NULL && ctxt->record_info) {
+ ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base;
+ ctxt->nodeInfo->end_line = ctxt->input->line;
+ ctxt->nodeInfo->node = cur;
+ xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
+ }
+ ctxt->nodemem = -1;
+
+#ifdef LIBXML_VALID_ENABLED
+ if (ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc,
+ cur);
+#endif /* LIBXML_VALID_ENABLED */
+
+
+ /*
+ * end of parsing of this node.
+ */
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext, "popping(%s)\n", cur->name);
+#endif
+ nodePop(ctxt);
+}
+#endif /* LIBXML_SAX1_ENABLED || LIBXML_HTML_ENABLED || LIBXML_LEGACY_ENABLED */
+
+/*
+ * xmlSAX2TextNode:
+ * @ctxt: the parser context
+ * @str: the input string
+ * @len: the string length
+ *
+ * Callback for a text node
+ *
+ * Returns the newly allocated string or NULL if not needed or error
+ */
+static xmlNodePtr
+xmlSAX2TextNode(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
+ xmlNodePtr ret;
+ const xmlChar *intern = NULL;
+
+ /*
+ * Allocate
+ */
+ if (ctxt->freeElems != NULL) {
+ ret = ctxt->freeElems;
+ ctxt->freeElems = ret->next;
+ ctxt->freeElemsNr--;
+ } else {
+ ret = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ }
+ if (ret == NULL) {
+ xmlErrMemory(ctxt, "xmlSAX2Characters");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlNode));
+ /*
+ * intern the formatting blanks found between tags, or the
+ * very short strings
+ */
+ if (ctxt->dictNames) {
+ xmlChar cur = str[len];
+
+ if ((len < (int) (2 * sizeof(void *))) &&
+ (ctxt->options & XML_PARSE_COMPACT)) {
+ /* store the string in the node overriding properties and nsDef */
+ xmlChar *tmp = (xmlChar *) &(ret->properties);
+ memcpy(tmp, str, len);
+ tmp[len] = 0;
+ intern = tmp;
+ } else if ((len <= 3) && ((cur == '"') || (cur == '\'') ||
+ ((cur == '<') && (str[len + 1] != '!')))) {
+ intern = xmlDictLookup(ctxt->dict, str, len);
+ } else if (IS_BLANK_CH(*str) && (len < 60) && (cur == '<') &&
+ (str[len + 1] != '!')) {
+ int i;
+
+ for (i = 1;i < len;i++) {
+ if (!IS_BLANK_CH(str[i])) goto skip;
+ }
+ intern = xmlDictLookup(ctxt->dict, str, len);
+ }
+ }
+skip:
+ ret->type = XML_TEXT_NODE;
+
+ ret->name = xmlStringText;
+ if (intern == NULL) {
+ ret->content = xmlStrndup(str, len);
+ if (ret->content == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2TextNode");
+ xmlFree(ret);
+ return(NULL);
+ }
+ } else
+ ret->content = (xmlChar *) intern;
+
+ if (ctxt->linenumbers) {
+ if (ctxt->input != NULL) {
+ if (ctxt->input->line < 65535)
+ ret->line = (short) ctxt->input->line;
+ else {
+ ret->line = 65535;
+ if (ctxt->options & XML_PARSE_BIG_LINES)
+ ret->psvi = (void *) (long) ctxt->input->line;
+ }
+ }
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(ret);
+ return(ret);
+}
+
+#ifdef LIBXML_VALID_ENABLED
+/*
+ * xmlSAX2DecodeAttrEntities:
+ * @ctxt: the parser context
+ * @str: the input string
+ * @len: the string length
+ *
+ * Remove the entities from an attribute value
+ *
+ * Returns the newly allocated string or NULL if not needed or error
+ */
+static xmlChar *
+xmlSAX2DecodeAttrEntities(xmlParserCtxtPtr ctxt, const xmlChar *str,
+ const xmlChar *end) {
+ const xmlChar *in;
+ xmlChar *ret;
+
+ in = str;
+ while (in < end)
+ if (*in++ == '&')
+ goto decode;
+ return(NULL);
+decode:
+ ctxt->depth++;
+ ret = xmlStringLenDecodeEntities(ctxt, str, end - str,
+ XML_SUBSTITUTE_REF, 0,0,0);
+ ctxt->depth--;
+ return(ret);
+}
+#endif /* LIBXML_VALID_ENABLED */
+
+/**
+ * xmlSAX2AttributeNs:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the attribute
+ * @prefix: the attribute namespace prefix if available
+ * @URI: the attribute namespace name if available
+ * @value: Start of the attribute value
+ * @valueend: end of the attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+static void
+xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
+ const xmlChar * localname,
+ const xmlChar * prefix,
+ const xmlChar * value,
+ const xmlChar * valueend)
+{
+ xmlAttrPtr ret;
+ xmlNsPtr namespace = NULL;
+ xmlChar *dup = NULL;
+
+ /*
+ * Note: if prefix == NULL, the attribute is not in the default namespace
+ */
+ if (prefix != NULL)
+ namespace = xmlSearchNs(ctxt->myDoc, ctxt->node, prefix);
+
+ /*
+ * allocate the node
+ */
+ if (ctxt->freeAttrs != NULL) {
+ ret = ctxt->freeAttrs;
+ ctxt->freeAttrs = ret->next;
+ ctxt->freeAttrsNr--;
+ memset(ret, 0, sizeof(xmlAttr));
+ ret->type = XML_ATTRIBUTE_NODE;
+
+ ret->parent = ctxt->node;
+ ret->doc = ctxt->myDoc;
+ ret->ns = namespace;
+
+ if (ctxt->dictNames)
+ ret->name = localname;
+ else
+ ret->name = xmlStrdup(localname);
+
+ /* link at the end to preserv order, TODO speed up with a last */
+ if (ctxt->node->properties == NULL) {
+ ctxt->node->properties = ret;
+ } else {
+ xmlAttrPtr prev = ctxt->node->properties;
+
+ while (prev->next != NULL) prev = prev->next;
+ prev->next = ret;
+ ret->prev = prev;
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
+ } else {
+ if (ctxt->dictNames)
+ ret = xmlNewNsPropEatName(ctxt->node, namespace,
+ (xmlChar *) localname, NULL);
+ else
+ ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL);
+ if (ret == NULL) {
+ xmlErrMemory(ctxt, "xmlSAX2AttributeNs");
+ return;
+ }
+ }
+
+ if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
+ xmlNodePtr tmp;
+
+ /*
+ * We know that if there is an entity reference, then
+ * the string has been dup'ed and terminates with 0
+ * otherwise with ' or "
+ */
+ if (*valueend != 0) {
+ tmp = xmlSAX2TextNode(ctxt, value, valueend - value);
+ ret->children = tmp;
+ ret->last = tmp;
+ if (tmp != NULL) {
+ tmp->doc = ret->doc;
+ tmp->parent = (xmlNodePtr) ret;
+ }
+ } else {
+ ret->children = xmlStringLenGetNodeList(ctxt->myDoc, value,
+ valueend - value);
+ tmp = ret->children;
+ while (tmp != NULL) {
+ tmp->doc = ret->doc;
+ tmp->parent = (xmlNodePtr) ret;
+ if (tmp->next == NULL)
+ ret->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+ } else if (value != NULL) {
+ xmlNodePtr tmp;
+
+ tmp = xmlSAX2TextNode(ctxt, value, valueend - value);
+ ret->children = tmp;
+ ret->last = tmp;
+ if (tmp != NULL) {
+ tmp->doc = ret->doc;
+ tmp->parent = (xmlNodePtr) ret;
+ }
+ }
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset) {
+ /*
+ * If we don't substitute entities, the validation should be
+ * done on a value with replaced entities anyway.
+ */
+ if (!ctxt->replaceEntities) {
+ dup = xmlSAX2DecodeAttrEntities(ctxt, value, valueend);
+ if (dup == NULL) {
+ if (*valueend == 0) {
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, value);
+ } else {
+ /*
+ * That should already be normalized.
+ * cheaper to finally allocate here than duplicate
+ * entry points in the full validation code
+ */
+ dup = xmlStrndup(value, valueend - value);
+
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, dup);
+ }
+ } else {
+ /*
+ * dup now contains a string of the flattened attribute
+ * content with entities substitued. Check if we need to
+ * apply an extra layer of normalization.
+ * It need to be done twice ... it's an extra burden related
+ * to the ability to keep references in attributes
+ */
+ if (ctxt->attsSpecial != NULL) {
+ xmlChar *nvalnorm;
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(localname, prefix, fn, 50);
+ if (fullname != NULL) {
+ ctxt->vctxt.valid = 1;
+ nvalnorm = xmlValidCtxtNormalizeAttributeValue(
+ &ctxt->vctxt, ctxt->myDoc,
+ ctxt->node, fullname, dup);
+ if (ctxt->vctxt.valid != 1)
+ ctxt->valid = 0;
+
+ if ((fullname != fn) && (fullname != localname))
+ xmlFree(fullname);
+ if (nvalnorm != NULL) {
+ xmlFree(dup);
+ dup = nvalnorm;
+ }
+ }
+ }
+
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, dup);
+ }
+ } else {
+ /*
+ * if entities already have been substitued, then
+ * the attribute as passed is already normalized
+ */
+ dup = xmlStrndup(value, valueend - value);
+
+ ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ ctxt->myDoc, ctxt->node, ret, dup);
+ }
+ } else
+#endif /* LIBXML_VALID_ENABLED */
+ if (((ctxt->loadsubset & XML_SKIP_IDS) == 0) &&
+ (((ctxt->replaceEntities == 0) && (ctxt->external != 2)) ||
+ ((ctxt->replaceEntities != 0) && (ctxt->inSubset == 0)))) {
+ /*
+ * when validating, the ID registration is done at the attribute
+ * validation level. Otherwise we have to do specific handling here.
+ */
+ if ((prefix == ctxt->str_xml) &&
+ (localname[0] == 'i') && (localname[1] == 'd') &&
+ (localname[2] == 0)) {
+ /*
+ * Add the xml:id value
+ *
+ * Open issue: normalization of the value.
+ */
+ if (dup == NULL)
+ dup = xmlStrndup(value, valueend - value);
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_VALID_ENABLED
+ if (xmlValidateNCName(dup, 1) != 0) {
+ xmlErrValid(ctxt, XML_DTD_XMLID_VALUE,
+ "xml:id : attribute value %s is not an NCName\n",
+ (const char *) dup, NULL);
+ }
+#endif
+#endif
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) {
+ /* might be worth duplicate entry points and not copy */
+ if (dup == NULL)
+ dup = xmlStrndup(value, valueend - value);
+ xmlAddID(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ } else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret)) {
+ if (dup == NULL)
+ dup = xmlStrndup(value, valueend - value);
+ xmlAddRef(&ctxt->vctxt, ctxt->myDoc, dup, ret);
+ }
+ }
+ if (dup != NULL)
+ xmlFree(dup);
+}
+
+/**
+ * xmlSAX2StartElementNs:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes.
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace informations for the element, as well as
+ * the new namespace declarations on the element.
+ */
+void
+xmlSAX2StartElementNs(void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret;
+ xmlNodePtr parent;
+ xmlNsPtr last = NULL, ns;
+ const xmlChar *uri, *pref;
+ xmlChar *lname = NULL;
+ int i, j;
+
+ if (ctx == NULL) return;
+ parent = ctxt->node;
+ /*
+ * First check on validity:
+ */
+ if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
+ ((ctxt->myDoc->intSubset == NULL) ||
+ ((ctxt->myDoc->intSubset->notations == NULL) &&
+ (ctxt->myDoc->intSubset->elements == NULL) &&
+ (ctxt->myDoc->intSubset->attributes == NULL) &&
+ (ctxt->myDoc->intSubset->entities == NULL)))) {
+ xmlErrValid(ctxt, XML_DTD_NO_DTD,
+ "Validation failed: no DTD found !", NULL, NULL);
+ ctxt->validate = 0;
+ }
+
+ /*
+ * Take care of the rare case of an undefined namespace prefix
+ */
+ if ((prefix != NULL) && (URI == NULL)) {
+ if (ctxt->dictNames) {
+ const xmlChar *fullname;
+
+ fullname = xmlDictQLookup(ctxt->dict, prefix, localname);
+ if (fullname != NULL)
+ localname = fullname;
+ } else {
+ lname = xmlBuildQName(localname, prefix, NULL, 0);
+ }
+ }
+ /*
+ * allocate the node
+ */
+ if (ctxt->freeElems != NULL) {
+ ret = ctxt->freeElems;
+ ctxt->freeElems = ret->next;
+ ctxt->freeElemsNr--;
+ memset(ret, 0, sizeof(xmlNode));
+ ret->type = XML_ELEMENT_NODE;
+
+ if (ctxt->dictNames)
+ ret->name = localname;
+ else {
+ if (lname == NULL)
+ ret->name = xmlStrdup(localname);
+ else
+ ret->name = lname;
+ if (ret->name == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
+ return;
+ }
+ }
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(ret);
+ } else {
+ if (ctxt->dictNames)
+ ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
+ (xmlChar *) localname, NULL);
+ else if (lname == NULL)
+ ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
+ else
+ ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
+ (xmlChar *) lname, NULL);
+ if (ret == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
+ return;
+ }
+ }
+ if (ctxt->linenumbers) {
+ if (ctxt->input != NULL) {
+ if (ctxt->input->line < 65535)
+ ret->line = (short) ctxt->input->line;
+ else
+ ret->line = 65535;
+ }
+ }
+
+ if (parent == NULL) {
+ xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
+ }
+ /*
+ * Build the namespace list
+ */
+ for (i = 0,j = 0;j < nb_namespaces;j++) {
+ pref = namespaces[i++];
+ uri = namespaces[i++];
+ ns = xmlNewNs(NULL, uri, pref);
+ if (ns != NULL) {
+ if (last == NULL) {
+ ret->nsDef = last = ns;
+ } else {
+ last->next = ns;
+ last = ns;
+ }
+ if ((URI != NULL) && (prefix == pref))
+ ret->ns = ns;
+ } else {
+ /*
+ * any out of memory error would already have been raised
+ * but we can't be garanteed it's the actual error due to the
+ * API, best is to skip in this case
+ */
+ continue;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset) {
+ ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
+ ret, prefix, ns, uri);
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ }
+ ctxt->nodemem = -1;
+
+ /*
+ * We are parsing a new node.
+ */
+ nodePush(ctxt, ret);
+
+ /*
+ * Link the child element
+ */
+ if (parent != NULL) {
+ if (parent->type == XML_ELEMENT_NODE) {
+ xmlAddChild(parent, ret);
+ } else {
+ xmlAddSibling(parent, ret);
+ }
+ }
+
+ /*
+ * Insert the defaulted attributes from the DTD only if requested:
+ */
+ if ((nb_defaulted != 0) &&
+ ((ctxt->loadsubset & XML_COMPLETE_ATTRS) == 0))
+ nb_attributes -= nb_defaulted;
+
+ /*
+ * Search the namespace if it wasn't already found
+ * Note that, if prefix is NULL, this searches for the default Ns
+ */
+ if ((URI != NULL) && (ret->ns == NULL)) {
+ ret->ns = xmlSearchNs(ctxt->myDoc, parent, prefix);
+ if ((ret->ns == NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
+ ret->ns = xmlSearchNs(ctxt->myDoc, ret, prefix);
+ }
+ if (ret->ns == NULL) {
+ ns = xmlNewNs(ret, NULL, prefix);
+ if (ns == NULL) {
+
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
+ return;
+ }
+ if (prefix != NULL)
+ xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s was not found\n",
+ prefix, NULL);
+ else
+ xmlNsWarnMsg(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace default prefix was not found\n",
+ NULL, NULL);
+ }
+ }
+
+ /*
+ * process all the other attributes
+ */
+ if (nb_attributes > 0) {
+ for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
+ /*
+ * Handle the rare case of an undefined atribute prefix
+ */
+ if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
+ if (ctxt->dictNames) {
+ const xmlChar *fullname;
+
+ fullname = xmlDictQLookup(ctxt->dict, attributes[j+1],
+ attributes[j]);
+ if (fullname != NULL) {
+ xmlSAX2AttributeNs(ctxt, fullname, NULL,
+ attributes[j+3], attributes[j+4]);
+ continue;
+ }
+ } else {
+ lname = xmlBuildQName(attributes[j], attributes[j+1],
+ NULL, 0);
+ if (lname != NULL) {
+ xmlSAX2AttributeNs(ctxt, lname, NULL,
+ attributes[j+3], attributes[j+4]);
+ xmlFree(lname);
+ continue;
+ }
+ }
+ }
+ xmlSAX2AttributeNs(ctxt, attributes[j], attributes[j+1],
+ attributes[j+3], attributes[j+4]);
+ }
+ }
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * If it's the Document root, finish the DTD validation and
+ * check the document root element for validity
+ */
+ if ((ctxt->validate) && (ctxt->vctxt.finishDtd == XML_CTXT_FINISH_DTD_0)) {
+ int chk;
+
+ chk = xmlValidateDtdFinal(&ctxt->vctxt, ctxt->myDoc);
+ if (chk <= 0)
+ ctxt->valid = 0;
+ if (chk < 0)
+ ctxt->wellFormed = 0;
+ ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
+ ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_1;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+}
+
+/**
+ * xmlSAX2EndElementNs:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace informations for the element.
+ */
+void
+xmlSAX2EndElementNs(void *ctx,
+ const xmlChar * localname ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED,
+ const xmlChar * URI ATTRIBUTE_UNUSED)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserNodeInfo node_info;
+ xmlNodePtr cur;
+
+ if (ctx == NULL) return;
+ cur = ctxt->node;
+ /* Capture end position and add node */
+ if ((ctxt->record_info) && (cur != NULL)) {
+ node_info.end_pos = ctxt->input->cur - ctxt->input->base;
+ node_info.end_line = ctxt->input->line;
+ node_info.node = cur;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+ ctxt->nodemem = -1;
+
+#ifdef LIBXML_VALID_ENABLED
+ if (ctxt->validate && ctxt->wellFormed &&
+ ctxt->myDoc && ctxt->myDoc->intSubset)
+ ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur);
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * end of parsing of this node.
+ */
+ nodePop(ctxt);
+}
+
+/**
+ * xmlSAX2Reference:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * called when an entity xmlSAX2Reference is detected.
+ */
+void
+xmlSAX2Reference(void *ctx, const xmlChar *name)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret;
+
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2Reference(%s)\n", name);
+#endif
+ if (name[0] == '#')
+ ret = xmlNewCharRef(ctxt->myDoc, name);
+ else
+ ret = xmlNewReference(ctxt->myDoc, name);
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "add xmlSAX2Reference %s to %s \n", name, ctxt->node->name);
+#endif
+ if (xmlAddChild(ctxt->node, ret) == NULL) {
+ xmlFreeNode(ret);
+ }
+}
+
+/**
+ * xmlSAX2Characters:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ */
+void
+xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr lastChild;
+
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2Characters(%.30s, %d)\n", ch, len);
+#endif
+ /*
+ * Handle the data if any. If there is no child
+ * add it as content, otherwise if the last child is text,
+ * concatenate it, else create a new node of type text.
+ */
+
+ if (ctxt->node == NULL) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "add chars: ctxt->node == NULL !\n");
+#endif
+ return;
+ }
+ lastChild = ctxt->node->last;
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "add chars to %s \n", ctxt->node->name);
+#endif
+
+ /*
+ * Here we needed an accelerator mechanism in case of very large
+ * elements. Use an attribute in the structure !!!
+ */
+ if (lastChild == NULL) {
+ lastChild = xmlSAX2TextNode(ctxt, ch, len);
+ if (lastChild != NULL) {
+ ctxt->node->children = lastChild;
+ ctxt->node->last = lastChild;
+ lastChild->parent = ctxt->node;
+ lastChild->doc = ctxt->node->doc;
+ ctxt->nodelen = len;
+ ctxt->nodemem = len + 1;
+ } else {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
+ return;
+ }
+ } else {
+ int coalesceText = (lastChild != NULL) &&
+ (lastChild->type == XML_TEXT_NODE) &&
+ (lastChild->name == xmlStringText);
+ if ((coalesceText) && (ctxt->nodemem != 0)) {
+ /*
+ * The whole point of maintaining nodelen and nodemem,
+ * xmlTextConcat is too costly, i.e. compute length,
+ * reallocate a new buffer, move data, append ch. Here
+ * We try to minimaze realloc() uses and avoid copying
+ * and recomputing length over and over.
+ */
+ if (lastChild->content == (xmlChar *)&(lastChild->properties)) {
+ lastChild->content = xmlStrdup(lastChild->content);
+ lastChild->properties = NULL;
+ } else if ((ctxt->nodemem == ctxt->nodelen + 1) &&
+ (xmlDictOwns(ctxt->dict, lastChild->content))) {
+ lastChild->content = xmlStrdup(lastChild->content);
+ }
+ if (lastChild->content == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: xmlStrdup returned NULL");
+ return;
+ }
+ if (((size_t)ctxt->nodelen + (size_t)len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node");
+ return;
+ }
+ if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
+ (size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented");
+ return;
+ }
+ if (ctxt->nodelen + len >= ctxt->nodemem) {
+ xmlChar *newbuf;
+ size_t size;
+
+ size = ctxt->nodemem + len;
+ size *= 2;
+ newbuf = (xmlChar *) xmlRealloc(lastChild->content,size);
+ if (newbuf == NULL) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
+ return;
+ }
+ ctxt->nodemem = size;
+ lastChild->content = newbuf;
+ }
+ memcpy(&lastChild->content[ctxt->nodelen], ch, len);
+ ctxt->nodelen += len;
+ lastChild->content[ctxt->nodelen] = 0;
+ } else if (coalesceText) {
+ if (xmlTextConcat(lastChild, ch, len)) {
+ xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters");
+ }
+ if (ctxt->node->children != NULL) {
+ ctxt->nodelen = xmlStrlen(lastChild->content);
+ ctxt->nodemem = ctxt->nodelen + 1;
+ }
+ } else {
+ /* Mixed content, first time */
+ lastChild = xmlSAX2TextNode(ctxt, ch, len);
+ if (lastChild != NULL) {
+ xmlAddChild(ctxt->node, lastChild);
+ if (ctxt->node->children != NULL) {
+ ctxt->nodelen = len;
+ ctxt->nodemem = len + 1;
+ }
+ }
+ }
+ }
+}
+
+/**
+ * xmlSAX2IgnorableWhitespace:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use xmlSAX2Characters
+ */
+void
+xmlSAX2IgnorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
+{
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2IgnorableWhitespace(%.30s, %d)\n", ch, len);
+#endif
+}
+
+/**
+ * xmlSAX2ProcessingInstruction:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ */
+void
+xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
+ const xmlChar *data)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret;
+ xmlNodePtr parent;
+
+ if (ctx == NULL) return;
+ parent = ctxt->node;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data);
+#endif
+
+ ret = xmlNewDocPI(ctxt->myDoc, target, data);
+ if (ret == NULL) return;
+
+ if (ctxt->linenumbers) {
+ if (ctxt->input != NULL) {
+ if (ctxt->input->line < 65535)
+ ret->line = (short) ctxt->input->line;
+ else
+ ret->line = 65535;
+ }
+ }
+ if (ctxt->inSubset == 1) {
+ xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
+ return;
+ } else if (ctxt->inSubset == 2) {
+ xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
+ return;
+ }
+ if (parent == NULL) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "Setting PI %s as root\n", target);
+#endif
+ xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
+ return;
+ }
+ if (parent->type == XML_ELEMENT_NODE) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding PI %s child to %s\n", target, parent->name);
+#endif
+ xmlAddChild(parent, ret);
+ } else {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding PI %s sibling to ", target);
+ xmlDebugDumpOneNode(stderr, parent, 0);
+#endif
+ xmlAddSibling(parent, ret);
+ }
+}
+
+/**
+ * xmlSAX2Comment:
+ * @ctx: the user data (XML parser context)
+ * @value: the xmlSAX2Comment content
+ *
+ * A xmlSAX2Comment has been parsed.
+ */
+void
+xmlSAX2Comment(void *ctx, const xmlChar *value)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret;
+ xmlNodePtr parent;
+
+ if (ctx == NULL) return;
+ parent = ctxt->node;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Comment(%s)\n", value);
+#endif
+ ret = xmlNewDocComment(ctxt->myDoc, value);
+ if (ret == NULL) return;
+ if (ctxt->linenumbers) {
+ if (ctxt->input != NULL) {
+ if (ctxt->input->line < 65535)
+ ret->line = (short) ctxt->input->line;
+ else
+ ret->line = 65535;
+ }
+ }
+
+ if (ctxt->inSubset == 1) {
+ xmlAddChild((xmlNodePtr) ctxt->myDoc->intSubset, ret);
+ return;
+ } else if (ctxt->inSubset == 2) {
+ xmlAddChild((xmlNodePtr) ctxt->myDoc->extSubset, ret);
+ return;
+ }
+ if (parent == NULL) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "Setting xmlSAX2Comment as root\n");
+#endif
+ xmlAddChild((xmlNodePtr) ctxt->myDoc, (xmlNodePtr) ret);
+ return;
+ }
+ if (parent->type == XML_ELEMENT_NODE) {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding xmlSAX2Comment child to %s\n", parent->name);
+#endif
+ xmlAddChild(parent, ret);
+ } else {
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "adding xmlSAX2Comment sibling to ");
+ xmlDebugDumpOneNode(stderr, parent, 0);
+#endif
+ xmlAddSibling(parent, ret);
+ }
+}
+
+/**
+ * xmlSAX2CDataBlock:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+void
+xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlNodePtr ret, lastChild;
+
+ if (ctx == NULL) return;
+#ifdef DEBUG_SAX
+ xmlGenericError(xmlGenericErrorContext,
+ "SAX.pcdata(%.10s, %d)\n", value, len);
+#endif
+ lastChild = xmlGetLastChild(ctxt->node);
+#ifdef DEBUG_SAX_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "add chars to %s \n", ctxt->node->name);
+#endif
+ if ((lastChild != NULL) &&
+ (lastChild->type == XML_CDATA_SECTION_NODE)) {
+ xmlTextConcat(lastChild, value, len);
+ } else {
+ ret = xmlNewCDataBlock(ctxt->myDoc, value, len);
+ xmlAddChild(ctxt->node, ret);
+ }
+}
+
+static int xmlSAX2DefaultVersionValue = 2;
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlSAXDefaultVersion:
+ * @version: the version, 1 or 2
+ *
+ * Set the default version of SAX used globally by the library.
+ * By default, during initialization the default is set to 2.
+ * Note that it is generally a better coding style to use
+ * xmlSAXVersion() to set up the version explicitly for a given
+ * parsing context.
+ *
+ * Returns the previous value in case of success and -1 in case of error.
+ */
+int
+xmlSAXDefaultVersion(int version)
+{
+ int ret = xmlSAX2DefaultVersionValue;
+
+ if ((version != 1) && (version != 2))
+ return(-1);
+ xmlSAX2DefaultVersionValue = version;
+ return(ret);
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/**
+ * xmlSAXVersion:
+ * @hdlr: the SAX handler
+ * @version: the version, 1 or 2
+ *
+ * Initialize the default XML SAX handler according to the version
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlSAXVersion(xmlSAXHandler *hdlr, int version)
+{
+ if (hdlr == NULL) return(-1);
+ if (version == 2) {
+ hdlr->startElement = NULL;
+ hdlr->endElement = NULL;
+ hdlr->startElementNs = xmlSAX2StartElementNs;
+ hdlr->endElementNs = xmlSAX2EndElementNs;
+ hdlr->serror = NULL;
+ hdlr->initialized = XML_SAX2_MAGIC;
+#ifdef LIBXML_SAX1_ENABLED
+ } else if (version == 1) {
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->initialized = 1;
+#endif /* LIBXML_SAX1_ENABLED */
+ } else
+ return(-1);
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = xmlSAX2ExternalSubset;
+ hdlr->isStandalone = xmlSAX2IsStandalone;
+ hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
+ hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
+ hdlr->resolveEntity = xmlSAX2ResolveEntity;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = xmlSAX2GetParameterEntity;
+ hdlr->entityDecl = xmlSAX2EntityDecl;
+ hdlr->attributeDecl = xmlSAX2AttributeDecl;
+ hdlr->elementDecl = xmlSAX2ElementDecl;
+ hdlr->notationDecl = xmlSAX2NotationDecl;
+ hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->reference = xmlSAX2Reference;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = xmlSAX2CDataBlock;
+ hdlr->ignorableWhitespace = xmlSAX2Characters;
+ hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
+ hdlr->comment = xmlSAX2Comment;
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ return(0);
+}
+
+/**
+ * xmlSAX2InitDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ * @warning: flag if non-zero sets the handler warning procedure
+ *
+ * Initialize the default XML SAX2 handler
+ */
+void
+xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
+{
+ if ((hdlr == NULL) || (hdlr->initialized != 0))
+ return;
+
+ xmlSAXVersion(hdlr, xmlSAX2DefaultVersionValue);
+ if (warning == 0)
+ hdlr->warning = NULL;
+ else
+ hdlr->warning = xmlParserWarning;
+}
+
+/**
+ * xmlDefaultSAXHandlerInit:
+ *
+ * Initialize the default SAX2 handler
+ */
+void
+xmlDefaultSAXHandlerInit(void)
+{
+#ifdef LIBXML_SAX1_ENABLED
+ xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
+#endif /* LIBXML_SAX1_ENABLED */
+}
+
+#ifdef LIBXML_HTML_ENABLED
+
+/**
+ * xmlSAX2InitHtmlDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ *
+ * Initialize the default HTML SAX2 handler
+ */
+void
+xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
+{
+ if ((hdlr == NULL) || (hdlr->initialized != 0))
+ return;
+
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = NULL;
+ hdlr->isStandalone = NULL;
+ hdlr->hasInternalSubset = NULL;
+ hdlr->hasExternalSubset = NULL;
+ hdlr->resolveEntity = NULL;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = NULL;
+ hdlr->entityDecl = NULL;
+ hdlr->attributeDecl = NULL;
+ hdlr->elementDecl = NULL;
+ hdlr->notationDecl = NULL;
+ hdlr->unparsedEntityDecl = NULL;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->reference = NULL;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = xmlSAX2CDataBlock;
+ hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
+ hdlr->comment = xmlSAX2Comment;
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ hdlr->initialized = 1;
+}
+
+/**
+ * htmlDefaultSAXHandlerInit:
+ *
+ * Initialize the default SAX handler
+ */
+void
+htmlDefaultSAXHandlerInit(void)
+{
+ xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
+}
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+
+/**
+ * xmlSAX2InitDocbDefaultSAXHandler:
+ * @hdlr: the SAX handler
+ *
+ * Initialize the default DocBook SAX2 handler
+ */
+void
+xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr)
+{
+ if ((hdlr == NULL) || (hdlr->initialized != 0))
+ return;
+
+ hdlr->internalSubset = xmlSAX2InternalSubset;
+ hdlr->externalSubset = NULL;
+ hdlr->isStandalone = xmlSAX2IsStandalone;
+ hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
+ hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
+ hdlr->resolveEntity = xmlSAX2ResolveEntity;
+ hdlr->getEntity = xmlSAX2GetEntity;
+ hdlr->getParameterEntity = NULL;
+ hdlr->entityDecl = xmlSAX2EntityDecl;
+ hdlr->attributeDecl = NULL;
+ hdlr->elementDecl = NULL;
+ hdlr->notationDecl = NULL;
+ hdlr->unparsedEntityDecl = NULL;
+ hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
+ hdlr->startDocument = xmlSAX2StartDocument;
+ hdlr->endDocument = xmlSAX2EndDocument;
+ hdlr->startElement = xmlSAX2StartElement;
+ hdlr->endElement = xmlSAX2EndElement;
+ hdlr->reference = xmlSAX2Reference;
+ hdlr->characters = xmlSAX2Characters;
+ hdlr->cdataBlock = NULL;
+ hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ hdlr->processingInstruction = NULL;
+ hdlr->comment = xmlSAX2Comment;
+ hdlr->warning = xmlParserWarning;
+ hdlr->error = xmlParserError;
+ hdlr->fatalError = xmlParserError;
+
+ hdlr->initialized = 1;
+}
+
+/**
+ * docbDefaultSAXHandlerInit:
+ *
+ * Initialize the default SAX handler
+ */
+void
+docbDefaultSAXHandlerInit(void)
+{
+ xmlSAX2InitDocbDefaultSAXHandler((xmlSAXHandlerPtr) &docbDefaultSAXHandler);
+}
+
+#endif /* LIBXML_DOCB_ENABLED */
+#define bottom_SAX2
+#include "elfgcchack.h"
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..9c32224
--- /dev/null
+++ b/TODO
@@ -0,0 +1,278 @@
+124907 HTML parse buffer problem when parsing larse in-memory docs
+124110 DTD validation && wrong namespace
+123564 xmllint --html --format
+
+ TODO for the XML parser and stuff:
+ ==================================
+
+ $Id$
+
+ this tend to be outdated :-\ ...
+
+DOCS:
+=====
+
+- use case of using XInclude to load for example a description.
+ order document + product base -(XSLT)-> quote with XIncludes
+ |
+ HTML output with description of parts <---(XSLT)--
+
+TODO:
+=====
+- XInclude at the SAX level (libSRVG)
+- fix the C code prototype to bring back doc/libxml-undocumented.txt
+ to a reasonable level
+- Computation of base when HTTP redirect occurs, might affect HTTP
+ interfaces.
+- Computation of base in XInclude. Relativization of URIs.
+- listing all attributes in a node.
+- Better checking of external parsed entities TAG 1234
+- Go through erratas and do the cleanup.
+ http://www.w3.org/XML/xml-19980210-errata ... started ...
+- jamesh suggestion: SAX like functions to save a document ie. call a
+ function to open a new element with given attributes, write character
+ data, close last element, etc
+ + inversted SAX, initial patch in April 2002 archives.
+- htmlParseDoc has parameter encoding which is not used.
+ Function htmlCreateDocParserCtxt ignore it.
+- fix realloc() usage.
+- Stricten the UTF8 conformance (Martin Duerst):
+ http://www.w3.org/2001/06/utf-8-test/.
+ The bad files are in http://www.w3.org/2001/06/utf-8-wrong/.
+- xml:id normalized value
+
+TODO:
+=====
+
+- move all string manipulation functions (xmlStrdup, xmlStrlen, etc.) to
+ global.c. Bjorn noted that the following files depends on parser.o solely
+ because of these string functions: entities.o, global.o, hash.o, tree.o,
+ xmlIO.o, and xpath.o.
+
+- Optimization of tag strings allocation ?
+
+- maintain coherency of namespace when doing cut'n paste operations
+ => the functions are coded, but need testing
+
+- function to rebuild the ID table
+- functions to rebuild the DTD hash tables (after DTD changes).
+
+
+EXTENSIONS:
+===========
+
+- Tools to produce man pages from the SGML docs.
+
+- Add Xpointer recognition/API
+
+- Add Xlink recognition/API
+ => started adding an xlink.[ch] with a unified API for XML and HTML.
+ it's crap :-(
+
+- Implement XSchemas
+ => Really need to be done <grin/>
+ - datatype are complete, but structure support is very limited.
+
+- extend the shell with:
+ - edit
+ - load/save
+ - mv (yum, yum, but it's harder because directories are ordered in
+ our case, mvup and mvdown would be required)
+
+
+Done:
+=====
+
+- Add HTML validation using the XHTML DTD
+ - problem: do we want to keep and maintain the code for handling
+ DTD/System ID cache directly in libxml ?
+ => not really done that way, but there are new APIs to check elements
+ or attributes. Otherwise XHTML validation directly ...
+
+- XML Schemas datatypes except Base64 and BinHex
+
+- Relax NG validation
+
+- XmlTextReader streaming API + validation
+
+- Add a DTD cache prefilled with xhtml DTDs and entities and a program to
+ manage them -> like the /usr/bin/install-catalog from SGML
+ right place seems $datadir/xmldtds
+ Maybe this is better left to user apps
+ => use a catalog instead , and xhtml1-dtd package
+
+- Add output to XHTML
+ => XML serializer automatically recognize the DTd and apply the specific
+ rules.
+
+- Fix output of <tst val="x&#xA;y"/>
+
+- compliance to XML-Namespace checking, see section 6 of
+ http://www.w3.org/TR/REC-xml-names/
+
+- Correct standalone checking/emitting (hard)
+ 2.9 Standalone Document Declaration
+
+- Implement OASIS XML Catalog support
+ http://www.oasis-open.org/committees/entity/
+
+- Get OASIS testsuite to a more friendly result, check all the results
+ once stable. the check-xml-test-suite.py script does this
+
+- Implement XSLT
+ => libxslt
+
+- Finish XPath
+ => attributes addressing troubles
+ => defaulted attributes handling
+ => namespace axis ?
+ done as XSLT got debugged
+
+- bug reported by Michael Meallin on validation problems
+ => Actually means I need to add support (and warn) for non-deterministic
+ content model.
+- Handle undefined namespaces in entity contents better ... at least
+ issue a warning
+- DOM needs
+ int xmlPruneProp(xmlNodePtr node, xmlAtttrPtr attr);
+ => done it's actually xmlRemoveProp xmlUnsetProp xmlUnsetNsProp
+
+- HTML: handling of Script and style data elements, need special code in
+ the parser and saving functions (handling of < > " ' ...):
+ http://www.w3.org/TR/html4/types.html#type-script
+ Attributes are no problems since entities are accepted.
+- DOM needs
+ xmlAttrPtr xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value)
+- problem when parsing hrefs with & with the HTML parser (IRC ac)
+- If the internal encoding is not UTF8 saving to a given encoding doesn't
+ work => fix to force UTF8 encoding ...
+ done, added documentation too
+- Add an ASCII I/O encoder (asciiToUTF8 and UTF8Toascii)
+- Issue warning when using non-absolute namespaces URI.
+- the html parser should add <head> and <body> if they don't exist
+ started, not finished.
+ Done, the automatic closing is added and 3 testcases were inserted
+- Command to force the parser to stop parsing and ignore the rest of the file.
+ xmlStopParser() should allow this, mostly untested
+- support for HTML empty attributes like <hr noshade>
+- plugged iconv() in for support of a large set of encodings.
+- xmlSwitchToEncoding() rewrite done
+- URI checkings (no fragments) rfc2396.txt
+- Added a clean mechanism for overload or added input methods:
+ xmlRegisterInputCallbacks()
+- dynamically adapt the alloc entry point to use g_alloc()/g_free()
+ if the programmer wants it:
+ - use xmlMemSetup() to reset the routines used.
+- Check attribute normalization especially xmlGetProp()
+- Validity checking problems for NOTATIONS attributes
+- Validity checking problems for ENTITY ENTITIES attributes
+- Parsing of a well balanced chunk xmlParseBalancedChunkMemory()
+- URI module: validation, base, etc ... see uri.[ch]
+- turn tester into a generic program xmllint installed with libxml
+- extend validity checks to go through entities content instead of
+ just labelling them PCDATA
+- Save Dtds using the children list instead of dumping the tables,
+ order is preserved as well as comments and PIs
+- Wrote a notice of changes requires to go from 1.x to 2.x
+- make sure that all SAX callbacks are disabled if a WF error is detected
+- checking/handling of newline normalization
+ http://localhost/www.xml.com/axml/target.html#sec-line-ends
+- correct checking of '&' '%' on entities content.
+- checking of PE/Nesting on entities declaration
+- checking/handling of xml:space
+ - checking done.
+ - handling done, not well tested
+- Language identification code, productions [33] to [38]
+ => done, the check has been added and report WFness errors
+- Conditional sections in DTDs [61] to [65]
+ => should this crap be really implemented ???
+ => Yep OASIS testsuite uses them
+- Allow parsed entities defined in the internal subset to override
+ the ones defined in the external subset (DtD customization).
+ => This mean that the entity content should be computed only at
+ use time, i.e. keep the orig string only at parse time and expand
+ only when referenced from the external subset :-(
+ Needed for complete use of most DTD from Eve Maler
+- Add regression tests for all WFC errors
+ => did some in test/WFC
+ => added OASIS testsuite routines
+ http://xmlsoft.org/conf/result.html
+
+- I18N: http://wap.trondheim.com/vaer/index.phtml is not XML and accepted
+ by the XML parser, UTF-8 should be checked when there is no "encoding"
+ declared !
+- Support for UTF-8 and UTF-16 encoding
+ => added some convertion routines provided by Martin Durst
+ patched them, got fixes from @@@
+ I plan to keep everything internally as UTF-8 (or ISO-Latin-X)
+ this is slightly more costly but more compact, and recent processors
+ efficiency is cache related. The key for good performances is keeping
+ the data set small, so will I.
+ => the new progressive reading routines call the detection code
+ is enabled, tested the ISO->UTF-8 stuff
+- External entities loading:
+ - allow override by client code
+ - make sure it is alled for all external entities referenced
+ Done, client code should use xmlSetExternalEntityLoader() to set
+ the default loading routine. It will be called each time an external
+ entity entity resolution is triggered.
+- maintain ID coherency when removing/changing attributes
+ The function used to deallocate attributes now check for it being an
+ ID and removes it from the table.
+- push mode parsing i.e. non-blocking state based parser
+ done, both for XML and HTML parsers. Use xmlCreatePushParserCtxt()
+ and xmlParseChunk() and html counterparts.
+ The tester program now has a --push option to select that parser
+ front-end. Douplicated tests to use both and check results are similar.
+
+- Most of XPath, still see some troubles and occasionnal memleaks.
+- an XML shell, allowing to traverse/manipulate an XML document with
+ a shell like interface, and using XPath for the anming syntax
+ - use of readline and history added when available
+ - the shell interface has been cleanly separated and moved to debugXML.c
+- HTML parser, should be fairly stable now
+- API to search the lang of an attribute
+- Collect IDs at parsing and maintain a table.
+ PBM: maintain the table coherency
+ PBM: how to detect ID types in absence of DtD !
+- Use it for XPath ID support
+- Add validity checking
+ Should be finished now !
+- Add regression tests with entity substitutions
+
+- External Parsed entities, either XML or external Subset [78] and [79]
+ parsing the xmllang DtD now works, so it should be sufficient for
+ most cases !
+
+- progressive reading. The entity support is a first step toward
+ asbtraction of an input stream. A large part of the context is still
+ located on the stack, moving to a state machine and putting everyting
+ in the parsing context should provide an adequate solution.
+ => Rather than progressive parsing, give more power to the SAX-like
+ interface. Currently the DOM-like representation is built but
+ => it should be possible to define that only as a set of SAX callbacks
+ and remove the tree creation from the parser code.
+ DONE
+
+- DOM support, instead of using a proprietary in memory
+ format for the document representation, the parser should
+ call a DOM API to actually build the resulting document.
+ Then the parser becomes independent of the in-memory
+ representation of the document. Even better using RPC's
+ the parser can actually build the document in another
+ program.
+ => Work started, now the internal representation is by default
+ very near a direct DOM implementation. The DOM glue is implemented
+ as a separate module. See the GNOME gdome module.
+
+- C++ support : John Ehresman <jehresma@dsg.harvard.edu>
+- Updated code to follow more recent specs, added compatibility flag
+- Better error handling, use a dedicated, overridable error
+ handling function.
+- Support for CDATA.
+- Keep track of line numbers for better error reporting.
+- Support for PI (SAX one).
+- Support for Comments (bad, should be in ASAP, they are parsed
+ but not stored), should be configurable.
+- Improve the support of entities on save (+SAX).
+
diff --git a/TODO_SCHEMAS b/TODO_SCHEMAS
new file mode 100644
index 0000000..145a4ed
--- /dev/null
+++ b/TODO_SCHEMAS
@@ -0,0 +1,31 @@
+- implement counted transitions at the automata level
+
+- Unicode:
+ + upgrade to 3.2
+ + improve the python script to generate better test
+ expressions to check the list of ranges.
+
+- Implement the interface at the SAX level
+
+- Implement the missing parts in the Structure part
+ + all content model
+ + enumerations
+ + countless others c.f. the TODO scattered in the code
+
+- Complete the Built-In datatype collections and Facets implementations
+
+- Regression tests based on
+ + the primer:
+ http://www.w3.org/TR/xmlschema-0/
+ + the Schemas Test Collection:
+ http://www.w3.org/2001/05/xmlschema-test-collection/
+ + archives of the schemas-dev list
+
+- Integrity constraints:
+ + what's that ? How need to read about it
+
+- "formal" checking, i.e. go through the full Structure spec and
+ bind code and associated parts of the Schemas spec
+
+- go though the erratas
+ http://www.w3.org/2001/05/xmlschema-errata
diff --git a/VxWorks/Makefile b/VxWorks/Makefile
new file mode 100644
index 0000000..a1f6902
--- /dev/null
+++ b/VxWorks/Makefile
@@ -0,0 +1,68 @@
+##----------------------------------------------------------------
+##
+##-- Filename: Makefile
+##
+##-- $Date: 2008/02/23 02:56:17 $
+##-- $Revision: 1.2 $
+##-- $Name: $
+##
+##----------------------------------------------------------------
+
+NAME = xml2
+TOOL_FAMILY=gnu
+
+include $(WIND_USR)/tool/gnu/make.$(VXCPU)
+
+FLAGS = -Wall -g -Isrc -Isrc/include -D_REENTRANT=1
+#FLAGS = -Wall -O2 -Isrc -Isrc/include -D_REENTRANT=1
+
+FLAGS += $(DEFINE_CC) $(CC_ARCH_SPEC) -MD -MP -D_VX_CPU=_VX_$(CPU) -D_VX_TOOL_FAMILY=gnu -D_VX_TOOL=$(TOOL)
+ifeq ($(VXTYPE),RTP)
+FLAGS += -mrtp -fpic -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip
+else
+FLAGS += -D_WRS_KERNEL -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip
+endif
+
+ifeq ($(VXTYPE),RTP)
+ifeq ($(CPU),SH32)
+LIB_LDFLAGS += -L$(WIND_USR)/lib/sh/SH32/commonle/PIC
+else
+LIB_LDFLAGS += $(LD_LINK_PATH_ATEND) $(LD_PARTIAL_LAST_FLAGS)
+endif
+endif
+
+OBJS = c14n.o catalog.o chvalid.o \
+ debugXML.o dict.o DOCBparser.o \
+ encoding.o entities.o error.o \
+ globals.o \
+ hash.o \
+ legacy.o list.o \
+ parser.o parserInternals.o pattern.o \
+ relaxng.o \
+ SAX2.o SAX.o schematron.o \
+ threads.o tree.o \
+ uri.o \
+ valid.o \
+ xinclude.o xlink.o xmlcatalog.o xmlIO.o \
+ xmlmemory.o xmlmodule.o xmlreader.o xmlregexp.o \
+ xmlsave.o xmlschemas.o xmlschemastypes.o xmlstring.o \
+ xmlunicode.o xmlwriter.o xpath.o xpointer.o
+
+all : lib$(NAME).so
+
+init :
+ mkdir -p objs
+
+.PHONY : lib$(NAME).so
+
+lib$(NAME).so : init $(patsubst %.o, objs/%.o, $(OBJS))
+ $(CC) $(FLAGS) $(LIB_LDFLAGS) -shared -o $@ $(patsubst %.o, objs/%.o, $(OBJS))
+
+(NAME).out : init $(patsubst %.o, objs/%.o, $(OBJS))
+ $(CC) $(FLAGS) -o $@ $(patsubst %.o, objs/%.o, $(OBJS))
+
+objs/%.o: src/%.c
+ $(CC) $(FLAGS) -o $@ -c $<
+
+clean:
+ rm -fR *.so objs
diff --git a/VxWorks/README b/VxWorks/README
new file mode 100644
index 0000000..b756677
--- /dev/null
+++ b/VxWorks/README
@@ -0,0 +1,86 @@
+ libxml2 on VxWorks 6.4+
+
+Here are my instructions for building on VxWorks.... I am very ashamed of
+how I did this because it is a complete hack, but it works great, so I
+can't complain too much.
+
+General Information
+
+1. The only way to build for VxWorks is to cross compile from a windows or
+linux system. We use a RedHat 5.1 workstation system as our build
+environment.
+
+2. VxWorks 6.X has two main types of executable, DKMs (dynamic kernel
+modules), and RTPs (real-time processes). Kernel modules are the bread
+and butter of VxWorks, but they look nothing like processes/threads in
+normal UNIX/Windows systems. RTPs are more like processes that have
+memory protection, threads, etc. VxWorks 6.X also introduces some level
+of POSIX conformance to their environment. The POSIX conformance was the
+key for us to be able to port libxml2. We support accessing libxml2 from
+both DKMs and RTPs.
+
+3. There are 2 compilers for VxWorks, the WindRiver compiler, and a port
+of the GNU toolchain, we have only tested and built with the GNU
+toolchain.
+
+How To Build
+
+1. Run the configure on your native linux system (this is the cheesy
+hack). Since the VxWorks GNU toolchain is very close in version to the
+one in red hat, it generates a good config.h file. We configured libxml2
+with the following to keep the size down, (but we have done basic testing
+with everything compiled in).
+
+./configure --with-minimum --with-reader --with-writer --with-regexps
+--with-threads --with-thread-alloc
+
+2. Rename the libxml2 folder to "src". This step is required for our
+replacement makefile to work.
+
+3. Run the replacement makefile. I wrote a new makefile that sets all the
+proper vxworks defines and uses the correct compilers. The two defines on
+the make command line are to tell it which VxWorks Target (SH3.2 little
+endian), and the executable type. We have tested this code on PENTIUM2gnu
+and SH32gnule.
+
+This makefile creates a shared library that runs on VxWorks: (libxml2.so)
+make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=RTP
+
+This makefile creates a kernel module that runs on VxWorks: (xml2.out)
+make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=DKM
+
+Important Notes
+
+1. There are several ways that this process could be improved, but at the
+end of the day, we make products, not port libraries, so we did a meets
+minimum for our needs.
+
+2. VxWorks is the devil, give me embedded linux every day.
+
+3. No matter what I tried, I couldn't get the configure to pick up the
+VxWorks toolchain, and in my investigation, it has something to do with
+automake/autoconf, not any individual package. VxWorks doesn't play by
+the normal rules for building toolchains.
+
+4. The PIC flag in VxWorks (especially for SH processors) is very
+important, and very troublesome. On linux, you can liberally use the PIC
+flag when compiling and the compiler/linker will ignore it as needed, on
+VxWorks if must always be on for shared libraries, and always be off for
+static libraries and executables.
+
+5. If anyone wants to work on a better way to do the build of libxml2 for
+VxWorks, I'm happy to help as much as I can, but I'm not looking to
+support it myself.
+
+Attached Files
+
+1. To use my Makefile for vxworks, you should enter the vxworks
+environment (/opt/windriver/wrenv.linux -p vxworks-6.4 for me).
+2. Run: build.sh libxml2-2.6.32 SH32gnule RTP (where you have
+libxml2-2.6.32.tar.gz and the Makefile in the same directory as the script
+file).
+
+Thanks,
+
+Jim Wert Jr.
+JWert@ILSTechnology.com
diff --git a/VxWorks/build.sh b/VxWorks/build.sh
new file mode 100644
index 0000000..c195062
--- /dev/null
+++ b/VxWorks/build.sh
@@ -0,0 +1,85 @@
+LIBXML2=$1
+TARGETCPU=$2
+TARGETTYPE=$3
+
+if [ -z "$2" ]; then
+ TARGETCPU=SIMPENTIUMgnu
+fi
+
+if [ -z "$3" ]; then
+ TARGETTYPE=RTP
+fi
+
+echo "LIBXML2 Version: ${LIBXML2}"
+echo "LIBXML2 Target CPU: ${TARGETCPU}"
+echo "LIBXML2 Target Type: ${TARGETTYPE}"
+
+rm -fR src
+tar xvzf ${LIBXML2}.tar.gz
+mv ${LIBXML2} src
+cd src
+
+./configure --with-minimum --with-reader --with-writer --with-regexps --with-threads --with-thread-alloc
+
+find . -name '*.in' -exec rm -fR {} +
+find . -name '*.am' -exec rm -fR {} +
+rm -fR *.m4
+rm -fR *.pc
+rm -fR *.pl
+rm -fR *.py
+rm -fR *.spec
+rm -fR .deps
+rm -fR AUTHORS
+rm -fR bakefile
+rm -fR ChangeLog
+rm -fR config.guess
+rm -fR config.log
+rm -fR config.status
+rm -fR config.stub
+rm -fR config.sub
+rm -fR configure
+rm -fR COPYING
+rm -fR Copyright
+rm -fR depcomp
+rm -fR doc
+rm -fR example
+rm -fR INSTALL
+rm -fR install-sh
+rm -fR libxml.3
+rm -fR ltmain.sh
+rm -fR Makefile
+rm -fR Makefile.tests
+rm -fR macos
+rm -fR mkinstalldirs
+rm -fR missing
+rm -fR nanoftp.c
+rm -fR nanohttp.c
+rm -fR NEWS
+rm -fR python
+rm -fR README
+rm -fR README.tests
+rm -fR regressions.xml
+rm -fR result
+rm -fR runsuite.c
+rm -fR runtest.c
+rm -fR test
+rm -fR test*.c
+rm -fR TODO*
+rm -fR trio*
+rm -fR vms
+rm -fR win32
+rm -fR xml2*
+rm -fR xmllint.c
+rm -fR xstc
+
+cd ..
+
+make clean all VXCPU=${TARGETCPU} VXTYPE=${TARGETTYPE}
+
+if [ "${TARGETTYPE}" = "RTP" ]; then
+ cp libxml2.so ../../lib/.
+else
+ cp xml2.out ../../bin/.
+fi
+
+cp -R src/include/libxml ../../include/. \ No newline at end of file
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..7ad8630
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,28 @@
+dnl Like AC_TRY_EVAL but also errors out if the compiler generates
+dnl _any_ output. Some compilers might issue warnings which we want
+dnl to catch.
+AC_DEFUN([AC_TRY_EVAL2],
+[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AS_MESSAGE_LOG_FD; dnl
+(eval [$]$1) 2>&AS_MESSAGE_LOG_FD; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }])
+
+dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL
+AC_DEFUN([AC_TRY_COMPILE2],
+[cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$1]
+int main(void) {
+[$2]
+; return 0; }
+EOF
+if AC_TRY_EVAL2(ac_compile); then
+ ifelse([$3], , :, [rm -rf conftest*
+ $3])
+else
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
+ifelse([$4], , , [ rm -rf conftest*
+ $4
+])dnl
+fi
+rm -f conftest*])
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..51ce905
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1245 @@
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.13'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.13.4], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.13.4])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([acinclude.m4])
diff --git a/bakefile/Bakefiles.bkgen b/bakefile/Bakefiles.bkgen
new file mode 100644
index 0000000..8342de3
--- /dev/null
+++ b/bakefile/Bakefiles.bkgen
@@ -0,0 +1,15 @@
+<?xml version="1.0" ?>
+<!-- $Id$ -->
+
+<bakefile-gen>
+
+ <disable-formats>gnu,dmars,cbx_unix,cbuilderx</disable-formats>
+ <input>libxml2.bkl</input>
+
+ <!-- List of output formats to generate: -->
+ <add-formats>
+ borland,dmars,mingw,msvc,msvc6prj,watcom,cbuilderx,cbx_unix,gnu
+ </add-formats>
+
+
+</bakefile-gen> \ No newline at end of file
diff --git a/bakefile/Readme.txt b/bakefile/Readme.txt
new file mode 100644
index 0000000..98a9ca8
--- /dev/null
+++ b/bakefile/Readme.txt
@@ -0,0 +1,92 @@
+
+ LIBXML2 build system for Win32 README
+ -------------------------------------
+
+ In this folder are stored all the files required to compile LIBXML2 with win32 compilers.
+ Bakefile (http://bakefile.sourceforge.net) is used as makefile generator.
+
+ Supported makefiles:
+ - makefile.vc for Microsoft NMAKE
+ - makefile.bcc for Borland MAKE
+ - makefile.wat for OpenWatcom MAKE
+ - makefile.gcc for MinGW MINGW32-MAKE
+ - all DSP & DSW for Microsoft VisualC++ 6.0 (can be used also with VS.NET AFAIK)
+
+ This readme is organized as:
+ 1.0 HOWTO compile LIBXML2 using makefiles <-- for users who want to build the library using *command-line*
+ 1.1 HOWTO compile LIBXML2 using an IDE <-- for users who want to build the library using an *IDE*
+ 1.2 HOWTO regenerate makefiles for LIBXML2 <-- for libxml2 mantainers/developers/advanced users
+
+ If you just want to compile the library (and the test programs) you should definitely avoid the
+ section 1.1 and focus on the 1.0.
+
+
+
+
+
+
+ 1.0 HOWTO compile LIBXML2 using makefiles
+ -----------------------------------------
+
+ Choose your preferred compiler among those actually supported (see above) and then run
+
+ mycompilermake -fmakefile.makefileext [options]
+
+ for a full list of the available options you should open with a notepad (or something like that)
+ the makefile you want to use; at the beginning you should see a section which starts as:
+
+ # -------------------------------------------------------------------------
+ # These are configurable options:
+ # -------------------------------------------------------------------------
+
+ here you can find all the options actually used by that makefile.
+ They can be customized when running the makefile writing something like:
+
+ nmake -fmakefile.vc BUILD=release
+ mingw32-make -fmakefile.gcc BUILD=debug ICONV_DIR=c:\myiconv
+
+ or they can be permanently changed modifying the makefile.
+ That's all: for any problem/compile-error/suggestion, write to
+ frm@users.sourceforge.net with the word "libxml2" in the subject.
+
+
+
+
+
+ 1.1 HOWTO compile LIBXML2 using an IDE
+ --------------------------------------
+
+ Actually only the Microsoft VisualC++ 6.0 project files are generated.
+ In future other Integrated Development Environments (IDEs) will be supported as well.
+
+ With MSVC++ 6.0, you should open the DSW file and then set as the active project the
+ "libxml2" project, if you want to build the library or one of the test projects if you
+ want to run them.
+ Using the command "Build->Set Active Configuration" you can choose one of the predefined
+ configuration.
+
+
+
+
+
+ 1.2 HOWTO regenerate makefiles for LIBXML2
+ ------------------------------------------
+
+ Be sure to have installed Bakefile (http://bakefile.sourceforge.net).
+ Just run the "bakefile_gen" command inside the folder containing the "libxml2.bkl" file.
+ NOTE: if you want to remove all the makefiles, you can use the "bakefile_gen -c" command.
+
+ The template files used to generate all makefiles are only two:
+ - libxml2.bkl (the main one)
+ - Bakefiles.bkgen
+ All the other files can be dinamically regenerated.
+
+
+
+
+
+ If you have problems with the compilation of LIBXML2 under windows (using one of the supported compiler)
+ please write to:
+
+ Francesco Montorsi <frm@users.sourceforge.net>
+
diff --git a/bakefile/libxml2.bkl b/bakefile/libxml2.bkl
new file mode 100644
index 0000000..f314465
--- /dev/null
+++ b/bakefile/libxml2.bkl
@@ -0,0 +1,749 @@
+<?xml version="1.0" ?>
+
+<!-- Author: Francesco Montorsi <frm@users.sourceforge.net> -->
+<!-- Date: 30/8/2004 -->
+<!-- Last revision: 26/1/2005 -->
+
+
+<!-- LIBXML2 BAKEFILE -->
+<!-- -->
+<!-- The bakefile used to build the library and the test -->
+<!-- programs. The makefiles output is put: -->
+<!-- -->
+<!-- - in the ..\LIB folder -->
+<!-- - in the ..\BIN folder -->
+<!-- -->
+
+<makefile>
+
+ <using module="datafiles"/>
+ <requires version="0.1.5"/>
+
+
+ <!-- This is a bakefile, that is, a generic template used to -->
+ <!-- generate makefiles ALL supported compilers. -->
+ <!-- To use this project file you need Bakefile installed. -->
+ <!-- With the command "bakefile_gen" you can regen all the -->
+ <!-- makefiles and project files. -->
+ <!-- See http://bakefile.sourceforge.net for more info. -->
+
+
+ <!--
+ This file is divided in:
+ - generic options
+ - generic variables
+ - libxml2 options
+ - libxml2 variables
+ - about config.h creation
+ - templates
+ - libxml2 library target
+ - libxml2 test program targets
+ -->
+
+
+
+ <!-- -->
+ <!-- GENERIC OPTIONS -->
+ <!-- -->
+
+
+ <!-- This is a standard option that determines -->
+ <!-- whether the user wants to build this library as -->
+ <!-- a dll or as a static library. -->
+ <option name="SHARED">
+ <values>0,1</values>
+ <values-description>,DLL</values-description>
+ <default-value>0</default-value>
+ <description>If set to zero a STATIC libxml library will be built</description>
+ </option>
+
+ <!-- Configuration for building the bakefile with -->
+ <!-- unicode strings or not (unicode or ansi). -->
+ <option name="UNICODE">
+ <values>0,1</values>
+ <values-description>,Unicode</values-description>
+ <default-value>0</default-value>
+ <description>Compile Unicode build?</description>
+ </option>
+
+
+ <!-- There are several options that deal with build -->
+ <!-- types. First, there's this one, BUILD. -->
+ <!-- -->
+ <!-- BUILD determines whether or not we want to build -->
+ <!-- in release or debug mode. Note that in practice -->
+ <!-- this means modifying the optimize tag, which by -->
+ <!-- default is set to off. In this case debug means -->
+ <!-- off (no optimizations), and release means speed -->
+ <!-- (fast with inlining). There is also a size option -->
+ <!-- that is not addressed in this example bakefile. -->
+ <option name="BUILD">
+ <values>debug,release</values>
+ <values-description>Debug,Release</values-description>
+ <default-value>release</default-value>
+ <description>
+ Type of compiled binaries
+ </description>
+ </option>
+
+
+
+ <!-- -->
+ <!-- GENERIC VARIABLES -->
+ <!-- -->
+
+ <!-- Set the ISDLL variable, so that we can use it -->
+ <!-- inside an if statement later on (options not -->
+ <!-- allowed in if statements). -->
+ <set var="ISDLL" cond="SHARED=='1'">1</set>
+ <set var="ISDLL" cond="SHARED=='0'">0</set>
+
+ <!-- The unicode define we want. By default bakefile -->
+ <!-- makes variables an empty string, so if unicode -->
+ <!-- is not defined $(UNICODE_DEFINE) would expand -->
+ <!-- to nothing (literally). -->
+ <set var="UNICODE_DEFINE">
+ <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
+ </set>
+
+ <!-- The debug define we need with win32 compilers -->
+ <!-- (on Linux, the wx-config program is used). -->
+ <set var="DEBUG_DEFINE">
+ <if cond="FORMAT!='autoconf' and BUILD=='debug'">
+ __WXDEBUG__
+ </if>
+ </set>
+
+ <!-- Value we will use later on for the debug-info -->
+ <!-- tag inside our templates. -->
+ <set var="DEBUGINFO">
+ <if cond="BUILD=='debug'">on</if>
+ <if cond="BUILD=='release'">off</if>
+ </set>
+
+ <!-- Value we will use later on for the debug-runtime -->
+ <!-- tag inside our templates. -->
+ <set var="DEBUGRUNTIME">
+ <if cond="BUILD=='debug'">on</if>
+ <if cond="BUILD=='release'">off</if>
+ </set>
+
+ <!-- Value for optimize tag. -->
+ <set var="OPTIMIZEFLAG">
+ <if cond="BUILD=='debug'">off</if>
+ <if cond="BUILD=='release'">speed</if>
+ </set>
+
+ <!-- Level of warnings. Here we max it out in debug -->
+ <!-- mode, and turn them off in release mode. -->
+ <set var="WARNINGS">
+ <if cond="BUILD=='debug'">max</if>
+ <if cond="BUILD=='release'">no</if>
+ </set>
+
+ <!-- Set MYCPPFLAGS as empty; maybe it will be filled later... -->
+ <set var="MYCPPFLAGS"></set>
+ <if cond="FORMAT=='mingw' or FORMAT=='autoconf'">
+
+ <!-- With GCC, settings warnings to MAX would force -->
+ <!-- Bakefile to call GCC with "-W -Wall" which generates -->
+ <!-- a *lot* of warnings about wxWidgets headers... -->
+ <!-- this is why "-W -Wall" is here replaced by "-Wall". -->
+ <set var="WARNINGS">default</set>
+ <set var="MYCPPFLAGS">-Wall</set>
+ </if>
+
+
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 OPTIONS -->
+ <!-- -->
+ <!-- Note #1: not all of them are used by win32 makefiles -->
+ <!-- -->
+ <!-- Note #2: since all combinations of non-path options are -->
+ <!-- translated into different 'configurations' by -->
+ <!-- Bakefile when using the MSVC6PRJ output, we must -->
+ <!-- avoid to create a 10 MB libxml2.dsp file forcing -->
+ <!-- some options to their default values... this -->
+ <!-- behaviour can be overridden by the -->
+ <!-- FULL_OPTIONS_SUPPORT -->
+ <!-- variable defined below... -->
+
+ <set var="FULL_OPTIONS_SUPPORT">
+ <if cond="FORMAT=='msvc6prj'">0</if>
+ <if cond="FORMAT!='msvc6prj'">1</if>
+ </set>
+
+ <option name="ICONV_DIR" category="path">
+ <default-value>c:\iconv</default-value>
+ <description>The iconv library main folder</description>
+ </option>
+
+ <option name="WITH_TRIO">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable TRIO string manipulator</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_THREADS">native</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_THREADS">
+ <values>no,ctls,native,posix</values>
+ <default-value>native</default-value>
+ <description>Enable thread safety</description>
+ </option>
+ </if>
+
+ <option name="WITH_FTP">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable FTP client</description>
+ </option>
+
+ <option name="WITH_HTTP">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable HTTP client</description>
+ </option>
+
+ <option name="WITH_C14N">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable C14N support</description>
+ </option>
+
+ <option name="WITH_CATALOG">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable catalog support</description>
+ </option>
+
+ <option name="WITH_DOCB">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable DocBook support</description>
+ </option>
+
+ <option name="WITH_XPATH">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XPath support</description>
+ </option>
+
+ <option name="WITH_XPTR">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XPointer support</description>
+ </option>
+
+ <option name="WITH_XINCLUDE">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XInclude support</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_ICONV">1</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_ICONV">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable iconv support</description>
+ </option>
+ </if>
+
+ <option name="WITH_ISO8859X">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable iso8859x support</description>
+ </option>
+
+ <!-- see the note #2 -->
+ <if cond="FULL_OPTIONS_SUPPORT=='0'">
+ <set var="WITH_ZLIB">0</set>
+ </if>
+ <if cond="FULL_OPTIONS_SUPPORT=='1'">
+ <option name="WITH_ZLIB">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Enable ZLIB support</description>
+ </option>
+ </if>
+
+ <option name="WITH_REGEXPS">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable regular expressions</description>
+ </option>
+
+ <option name="WITH_TREE">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable tree api</description>
+ </option>
+
+ <option name="WITH_READER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlReader api</description>
+ </option>
+
+ <option name="WITH_WRITER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlWriter api</description>
+ </option>
+
+ <option name="WITH_WALKER">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlDocWalker api</description>
+ </option>
+
+ <option name="WITH_PATTERN">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable xmlPattern api</description>
+ </option>
+
+ <option name="WITH_PUSH">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable push api</description>
+ </option>
+
+ <option name="WITH_VALID">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable DTD validation support</description>
+ </option>
+
+ <option name="WITH_SAX1">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable SAX1 api</description>
+ </option>
+
+ <option name="WITH_SCHEMAS">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable XML Schema support</description>
+ </option>
+
+ <option name="WITH_LEGACY">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable deprecated APIs</description>
+ </option>
+
+ <option name="WITH_OUTPUT">
+ <values>0,1</values>
+ <default-value>1</default-value>
+ <description>Enable serialization support</description>
+ </option>
+
+ <option name="WITH_PYTHON">
+ <values>0,1</values>
+ <default-value>0</default-value>
+ <description>Build Python bindings</description>
+ </option>
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 VARIABLES -->
+ <!-- -->
+
+ <!-- Put all the objects files generated by -->
+ <!-- the compilation in a subfolder of BUILD -->
+ <set var="BUILDDIR">$(FORMAT)</set>
+
+ <!-- This variable is set to 1 when the current output writer supports -->
+ <!-- the __DEFINE_ARG variable. Otherwise it's set to zero. -->
+ <set var="HAS_DEFINE_ARG">
+ <if cond="FORMAT!='msvc6prj'">1</if>
+ <if cond="FORMAT=='msvc6prj'">0</if>
+ </set>
+
+ <!-- The root directory of libxml2 -->
+ <set var="XMLBASEDIR">..</set>
+
+ <!-- The directory where libxml2' tests will be put -->
+ <set var="XMLTESTDIR">$(XMLBASEDIR)$(DIRSEP)bin</set>
+
+ <set var="LIBXML_MAJOR_VERSION">2</set>
+ <set var="LIBXML_MINOR_VERSION">6</set>
+ <set var="LIBXML_MICRO_VERSION">16</set>
+
+ <!-- some defines related to threads -->
+ <set var="THREADS_DEF">
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='native'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS
+ </if>
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='ctls'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS $(__DEFINE_ARG)HAVE_COMPILER_TLS
+ </if>
+ <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='posix'">
+ $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_PTHREAD_H
+ </if>
+ </set>
+ <if cond="FORMAT=='borland'">
+ <set var="THREADS_DEF">
+ <if cond="WITH_THREADS=='native'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ <if cond="WITH_THREADS=='ctls'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ <if cond="WITH_THREADS=='posix'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
+ </set>
+ </if>
+
+
+ <!-- some other conditional defines -->
+ <set var="ZLIB_DEF"><if cond="WITH_ZLIB=='1'">HAVE_ZLIB_H</if></set>
+ <set var="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
+ <set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
+
+ <!-- this is very very important when compiling with MINGW: without this line,
+ the test programs (and all the programs built with libxml2 which use xmlFree)
+ won't build because of "undefined references to __xmlFree" -->
+ <set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
+
+ <!-- some conditional libraries dependencies -->
+ <set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
+ <set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
+ <set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
+ <set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
+
+ <set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
+
+
+
+
+ <!-- -->
+ <!-- ABOUT CONFIG.H HEADER CREATION -->
+ <!-- -->
+
+ <set var="CONFIG_SRCNAME">win32config.h</set>
+ <set var="CONFIG_DSTNAME">config.h</set>
+
+ <if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
+ <copy-file-to-file id="setup">
+ <!-- On win32 we need to manually copy a default config.h file -->
+ <!-- from the include/mc/msw folder to include/mc -->
+ <src>../include/$(CONFIG_SRCNAME)</src>
+ <dst>../$(CONFIG_DSTNAME)</dst>
+ <dependency-of>all</dependency-of>
+
+ <!-- With autoconf, we will use the configure script to translate -->
+ <!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
+ <!-- not need to do anything here... -->
+ </copy-file-to-file>
+ </if>
+
+ <if cond="FORMAT!='msvc6prj'">
+
+ <mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
+ <mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
+
+ <!-- Creates all output folders -->
+ <phony id="setupdirs">
+ <dependency-of>all</dependency-of>
+ <depends>setuplibdir</depends>
+ <depends>setupbindir</depends>
+ </phony>
+ </if>
+
+ <!-- This defines a tag which includes headers on MSVC -->
+ <!-- Note that $(value) is stuck in there by bakefile, -->
+ <!-- and is the value between the beginning and end tag. -->
+ <define-tag name="headers" rules="dll,lib,exe">
+ <if cond="FORMAT=='msvc6prj'">
+ <msvc-project-files>
+ $(value)
+ </msvc-project-files>
+ </if>
+ </define-tag>
+
+ <!-- Creates the following custom build rule for MSVC6PRJ file:
+ copies ..\include\win32config.h into ..\config.h
+ NOTE: this tag must be used before the <sources> tag if you want that the configuration
+ file will be created before any other source file is compiled... -->
+ <define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
+ <if cond="FORMAT=='msvc6prj'">
+ <headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
+ <set var="__subdir">$(value)</set>
+ <set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
+ <set var="_custom_build____include_win32config_h">
+Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\$(CONFIG_SRCNAME)
+InputPath=..\include\$(CONFIG_SRCNAME)
+
+"..\$(CONFIG_DSTNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
+$(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
+ </set>
+ </if>
+ </define-tag>
+
+
+
+
+
+ <!-- -->
+ <!-- TEMPLATES -->
+ <!-- -->
+
+ <!-- The basic template: used by all the targets -->
+ <template id="base">
+ <if cond="FORMAT=='mingw'">
+ <define>HAVE_W32API_H</define>
+ <ldflags>-mthreads</ldflags>
+ </if>
+
+ <cxxflags>$(MYCPPFLAGS)</cxxflags>
+ <warnings>$(WARNINGS)</warnings>
+ <define>$(UNICODE_DEFINE)</define>
+ <optimize>$(OPTIMIZEFLAG)</optimize>
+ <debug-info>$(DEBUGINFO)</debug-info>
+ <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
+ </template>
+
+ <!-- The template used both by the library and by the test programs -->
+ <template id="xml2" template="base">
+
+ <!-- -I & -L equivalents -->
+ <include>$(XMLBASEDIR)$(DIRSEP)include</include>
+ <include>$(ICONV_DIR)$(DIRSEP)include</include>
+ <lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>
+
+ <!-- some conditional define flags -->
+ <cflags>$(THREADS_DEF)</cflags>
+ <define>$(ZLIB_DEF)</define>
+ <define>$(DEBUG_DEF)</define>
+ <define>$(STATIC_DEF)</define>
+
+ <if cond="HAS_DEFINE_ARG=='0'">
+
+ <!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
+ <define>_REENTRANT</define>
+ <define>HAVE_WIN32_THREADS</define>
+ </if>
+
+
+ <!-- these must always be defined on win32 -->
+ <define>WIN32</define>
+ <define>_WINDOWS</define>
+ <define>_MBCS</define>
+
+ <if cond="FORMAT=='borland'">
+ <define>_NO_VCL</define>
+ <define>EILSEQ=2</define>
+ </if>
+ </template>
+
+ <!-- The template used by libxml2 test programs -->
+ <template id="xml2test" template="xml2">
+ <dirname>$(XMLTESTDIR)</dirname>
+ <app-type>console</app-type>
+
+ <library>libxml2</library>
+
+ <sys-lib>$(ICONV_LIB)</sys-lib>
+ <sys-lib>$(WSOCK32_LIB)</sys-lib>
+ <sys-lib>$(ZLIB_LIB)</sys-lib>
+ <sys-lib>$(POSIX_LIB)</sys-lib>
+ </template>
+
+
+
+
+
+
+ <!-- -->
+ <!-- LIBXML2 LIBRARY TARGET -->
+ <!-- -->
+
+ <lib id="libxml2" template="xml2">
+
+ <!-- this is useful only when using MSVC6PRJ -->
+ <if cond="FORMAT=='msvc6prj'">
+ <msvc-copy-setup-h/>
+ <msvc-file-group>Config headers:*config.h</msvc-file-group>
+ </if>
+ <if cond="FORMAT!='msvc6prj'">
+ <depends>setup</depends>
+ <depends>setuplibdir</depends>
+ </if>
+
+ <!-- output folder -->
+ <dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
+
+ <!-- The output name must be "libxml2.lib" with all compilers.
+ Since mingw format autoadds the "lib" prefix to the library
+ name, we must intercept that case to avoid to get "liblibxml2.a" -->
+ <if cond="FORMAT!='mingw'">
+ <libname>libxml2</libname>
+ </if>
+ <if cond="FORMAT=='mingw'">
+ <libname>xml2</libname>
+ </if>
+
+ <!-- the list of source files to compile -->
+ <sources>
+ $(XMLBASEDIR)$(DIRSEP)c14n.c
+ $(XMLBASEDIR)$(DIRSEP)catalog.c
+ $(XMLBASEDIR)$(DIRSEP)chvalid.c
+ $(XMLBASEDIR)$(DIRSEP)debugXML.c
+ $(XMLBASEDIR)$(DIRSEP)dict.c
+ $(XMLBASEDIR)$(DIRSEP)DOCBparser.c
+ $(XMLBASEDIR)$(DIRSEP)encoding.c
+ $(XMLBASEDIR)$(DIRSEP)entities.c
+ $(XMLBASEDIR)$(DIRSEP)error.c
+ $(XMLBASEDIR)$(DIRSEP)globals.c
+ $(XMLBASEDIR)$(DIRSEP)hash.c
+ $(XMLBASEDIR)$(DIRSEP)HTMLparser.c
+ $(XMLBASEDIR)$(DIRSEP)HTMLtree.c
+ $(XMLBASEDIR)$(DIRSEP)legacy.c
+ $(XMLBASEDIR)$(DIRSEP)list.c
+ $(XMLBASEDIR)$(DIRSEP)nanoftp.c
+ $(XMLBASEDIR)$(DIRSEP)nanohttp.c
+ $(XMLBASEDIR)$(DIRSEP)parser.c
+ $(XMLBASEDIR)$(DIRSEP)parserInternals.c
+ $(XMLBASEDIR)$(DIRSEP)pattern.c
+ $(XMLBASEDIR)$(DIRSEP)relaxng.c
+ $(XMLBASEDIR)$(DIRSEP)SAX2.c
+ $(XMLBASEDIR)$(DIRSEP)SAX.c
+ $(XMLBASEDIR)$(DIRSEP)threads.c
+ $(XMLBASEDIR)$(DIRSEP)tree.c
+ $(XMLBASEDIR)$(DIRSEP)uri.c
+ $(XMLBASEDIR)$(DIRSEP)valid.c
+ $(XMLBASEDIR)$(DIRSEP)xinclude.c
+ $(XMLBASEDIR)$(DIRSEP)xlink.c
+ $(XMLBASEDIR)$(DIRSEP)xmlIO.c
+ $(XMLBASEDIR)$(DIRSEP)xmlmemory.c
+ $(XMLBASEDIR)$(DIRSEP)xmlreader.c
+ $(XMLBASEDIR)$(DIRSEP)xmlregexp.c
+ $(XMLBASEDIR)$(DIRSEP)xmlsave.c
+ $(XMLBASEDIR)$(DIRSEP)xmlschemas.c
+ $(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
+ $(XMLBASEDIR)$(DIRSEP)xmlunicode.c
+ $(XMLBASEDIR)$(DIRSEP)xmlwriter.c
+ $(XMLBASEDIR)$(DIRSEP)xpath.c
+ $(XMLBASEDIR)$(DIRSEP)xpointer.c
+ $(XMLBASEDIR)$(DIRSEP)xmlstring.c
+ </sources>
+
+ <!-- the list of header files (for IDE projects) -->
+ <headers>
+ $(XMLINCLUDEDIR)c14n.h
+ $(XMLINCLUDEDIR)catalog.h
+ $(XMLINCLUDEDIR)chvalid.h
+ $(XMLINCLUDEDIR)debugXML.h
+ $(XMLINCLUDEDIR)dict.h
+ $(XMLINCLUDEDIR)DOCBparser.h
+ $(XMLINCLUDEDIR)encoding.h
+ $(XMLINCLUDEDIR)entities.h
+ $(XMLINCLUDEDIR)globals.h
+ $(XMLINCLUDEDIR)hash.h
+ $(XMLINCLUDEDIR)HTMLparser.h
+ $(XMLINCLUDEDIR)HTMLtree.h
+ $(XMLINCLUDEDIR)list.h
+ $(XMLINCLUDEDIR)nanoftp.h
+ $(XMLINCLUDEDIR)nanohttp.h
+ $(XMLINCLUDEDIR)parser.h
+ $(XMLINCLUDEDIR)parserInternals.h
+ $(XMLINCLUDEDIR)pattern.h
+ $(XMLINCLUDEDIR)relaxng.h
+ $(XMLINCLUDEDIR)SAX.h
+ $(XMLINCLUDEDIR)SAX2.h
+ $(XMLINCLUDEDIR)schemasInternals.h
+ $(XMLINCLUDEDIR)threads.h
+ $(XMLINCLUDEDIR)tree.h
+ $(XMLINCLUDEDIR)uri.h
+ $(XMLINCLUDEDIR)valid.h
+ $(XMLINCLUDEDIR)xinclude.h
+ $(XMLINCLUDEDIR)xlink.h
+ $(XMLINCLUDEDIR)xmlautomata.h
+ $(XMLINCLUDEDIR)xmlerror.h
+ $(XMLINCLUDEDIR)xmlexports.h
+ $(XMLINCLUDEDIR)xmlIO.h
+ $(XMLINCLUDEDIR)xmlmemory.h
+ $(XMLINCLUDEDIR)xmlmodule.h
+ $(XMLINCLUDEDIR)xmlreader.h
+ $(XMLINCLUDEDIR)xmlregexp.h
+ $(XMLINCLUDEDIR)xmlsave.h
+ $(XMLINCLUDEDIR)xmlschemas.h
+ $(XMLINCLUDEDIR)xmlschemastypes.h
+ $(XMLINCLUDEDIR)xmlstring.h
+ $(XMLINCLUDEDIR)xmlunicode.h
+ $(XMLINCLUDEDIR)xmlversion.h
+ $(XMLINCLUDEDIR)xmlwriter.h
+ $(XMLINCLUDEDIR)xpath.h
+ $(XMLINCLUDEDIR)xpathInternals.h
+ $(XMLINCLUDEDIR)xpointer.h
+ </headers>
+
+ <!-- these ones are not inside the include/libxml folder -->
+ <headers>
+ $(XMLBASEDIR)$(DIRSEP)libxml.h
+ $(XMLBASEDIR)$(DIRSEP)triodef.h
+ $(XMLBASEDIR)$(DIRSEP)trionan.h
+ $(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h
+ </headers>
+ </lib>
+
+
+
+ <!-- -->
+ <!-- LIBXML2 test programs -->
+ <!-- -->
+
+ <set var="BUILD_ALL_TESTS">
+
+ <!-- when using full options support with MSVC6PRJ we should
+ avoid to create all the DSP files required for the test
+ programs: they would take a _lot_ of space !! -->
+ <if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
+
+ <!-- when creating a makefile or using MSVC6PRJ with limited
+ options support, then we can build all the tests safely -->
+ <if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
+
+ </set>
+
+ <if cond="BUILD_ALL_TESTS=='1'">
+
+ <exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
+ <exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
+ <exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
+ <exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
+ <exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
+ <exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
+ <exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
+ <exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
+ <exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
+ <exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
+ <exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
+
+ <if cond="FORMAT=='autoconf'">
+ <exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
+ </if>
+
+ <!-- FIXME:
+ <exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
+
+ <if cond="WITH_THREADS=='posix'">
+ <exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
+ </if>
+ <if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
+ <exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
+ </if>
+ -->
+ </if>
+
+</makefile>
diff --git a/buf.c b/buf.c
new file mode 100644
index 0000000..6efc7b6
--- /dev/null
+++ b/buf.c
@@ -0,0 +1,1304 @@
+/*
+ * buf.c: memory buffers for libxml2
+ *
+ * new buffer structures and entry points to simplify the maintainance
+ * of libxml2 and ensure we keep good control over memory allocations
+ * and stay 64 bits clean.
+ * The new entry point use the xmlBufPtr opaque structure and
+ * xmlBuf...() counterparts to the old xmlBuf...() functions
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h> /* for memset() only ! */
+#include <limits.h>
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/tree.h>
+#include <libxml/globals.h>
+#include <libxml/tree.h>
+#include "buf.h"
+
+#define WITH_BUFFER_COMPAT
+
+/**
+ * xmlBuf:
+ *
+ * A buffer structure. The base of the structure is somehow compatible
+ * with struct _xmlBuffer to limit risks on application which accessed
+ * directly the input->buf->buffer structures.
+ */
+
+struct _xmlBuf {
+ xmlChar *content; /* The buffer content UTF8 */
+ unsigned int compat_use; /* for binary compatibility */
+ unsigned int compat_size; /* for binary compatibility */
+ xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
+ size_t use; /* The buffer size used */
+ size_t size; /* The buffer size */
+ xmlBufferPtr buffer; /* wrapper for an old buffer */
+ int error; /* an error code if a failure occured */
+};
+
+#ifdef WITH_BUFFER_COMPAT
+/*
+ * Macro for compatibility with xmlBuffer to be used after an xmlBuf
+ * is updated. This makes sure the compat fields are updated too.
+ */
+#define UPDATE_COMPAT(buf) \
+ if (buf->size < INT_MAX) buf->compat_size = buf->size; \
+ else buf->compat_size = INT_MAX; \
+ if (buf->use < INT_MAX) buf->compat_use = buf->use; \
+ else buf->compat_use = INT_MAX;
+
+/*
+ * Macro for compatibility with xmlBuffer to be used in all the xmlBuf
+ * entry points, it checks that the compat fields have not been modified
+ * by direct call to xmlBuffer function from code compiled before 2.9.0 .
+ */
+#define CHECK_COMPAT(buf) \
+ if (buf->size != (size_t) buf->compat_size) \
+ if (buf->compat_size < INT_MAX) \
+ buf->size = buf->compat_size; \
+ if (buf->use != (size_t) buf->compat_use) \
+ if (buf->compat_use < INT_MAX) \
+ buf->use = buf->compat_use;
+
+#else /* ! WITH_BUFFER_COMPAT */
+#define UPDATE_COMPAT(buf)
+#define CHECK_COMPAT(buf)
+#endif /* WITH_BUFFER_COMPAT */
+
+/**
+ * xmlBufMemoryError:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ * To be improved...
+ */
+static void
+xmlBufMemoryError(xmlBufPtr buf, const char *extra)
+{
+ __xmlSimpleError(XML_FROM_BUFFER, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+ if ((buf) && (buf->error == 0))
+ buf->error = XML_ERR_NO_MEMORY;
+}
+
+/**
+ * xmlBufOverflowError:
+ * @extra: extra informations
+ *
+ * Handle a buffer overflow error
+ * To be improved...
+ */
+static void
+xmlBufOverflowError(xmlBufPtr buf, const char *extra)
+{
+ __xmlSimpleError(XML_FROM_BUFFER, XML_BUF_OVERFLOW, NULL, NULL, extra);
+ if ((buf) && (buf->error == 0))
+ buf->error = XML_BUF_OVERFLOW;
+}
+
+
+/**
+ * xmlBufCreate:
+ *
+ * routine to create an XML buffer.
+ * returns the new structure.
+ */
+xmlBufPtr
+xmlBufCreate(void) {
+ xmlBufPtr ret;
+
+ ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
+ if (ret == NULL) {
+ xmlBufMemoryError(NULL, "creating buffer");
+ return(NULL);
+ }
+ ret->compat_use = 0;
+ ret->use = 0;
+ ret->error = 0;
+ ret->buffer = NULL;
+ ret->size = xmlDefaultBufferSize;
+ ret->compat_size = xmlDefaultBufferSize;
+ ret->alloc = xmlBufferAllocScheme;
+ ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
+ if (ret->content == NULL) {
+ xmlBufMemoryError(ret, "creating buffer");
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->content[0] = 0;
+ ret->contentIO = NULL;
+ return(ret);
+}
+
+/**
+ * xmlBufCreateSize:
+ * @size: initial size of buffer
+ *
+ * routine to create an XML buffer.
+ * returns the new structure.
+ */
+xmlBufPtr
+xmlBufCreateSize(size_t size) {
+ xmlBufPtr ret;
+
+ ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
+ if (ret == NULL) {
+ xmlBufMemoryError(NULL, "creating buffer");
+ return(NULL);
+ }
+ ret->compat_use = 0;
+ ret->use = 0;
+ ret->error = 0;
+ ret->buffer = NULL;
+ ret->alloc = xmlBufferAllocScheme;
+ ret->size = (size ? size+2 : 0); /* +1 for ending null */
+ ret->compat_size = (int) ret->size;
+ if (ret->size){
+ ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
+ if (ret->content == NULL) {
+ xmlBufMemoryError(ret, "creating buffer");
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->content[0] = 0;
+ } else
+ ret->content = NULL;
+ ret->contentIO = NULL;
+ return(ret);
+}
+
+/**
+ * xmlBufDetach:
+ * @buf: the buffer
+ *
+ * Remove the string contained in a buffer and give it back to the
+ * caller. The buffer is reset to an empty content.
+ * This doesn't work with immutable buffers as they can't be reset.
+ *
+ * Returns the previous string contained by the buffer.
+ */
+xmlChar *
+xmlBufDetach(xmlBufPtr buf) {
+ xmlChar *ret;
+
+ if (buf == NULL)
+ return(NULL);
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(NULL);
+ if (buf->buffer != NULL)
+ return(NULL);
+ if (buf->error)
+ return(NULL);
+
+ ret = buf->content;
+ buf->content = NULL;
+ buf->size = 0;
+ buf->use = 0;
+ buf->compat_use = 0;
+ buf->compat_size = 0;
+
+ return ret;
+}
+
+
+/**
+ * xmlBufCreateStatic:
+ * @mem: the memory area
+ * @size: the size in byte
+ *
+ * routine to create an XML buffer from an immutable memory area.
+ * The area won't be modified nor copied, and is expected to be
+ * present until the end of the buffer lifetime.
+ *
+ * returns the new structure.
+ */
+xmlBufPtr
+xmlBufCreateStatic(void *mem, size_t size) {
+ xmlBufPtr ret;
+
+ if ((mem == NULL) || (size == 0))
+ return(NULL);
+
+ ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
+ if (ret == NULL) {
+ xmlBufMemoryError(NULL, "creating buffer");
+ return(NULL);
+ }
+ if (size < INT_MAX) {
+ ret->compat_use = size;
+ ret->compat_size = size;
+ } else {
+ ret->compat_use = INT_MAX;
+ ret->compat_size = INT_MAX;
+ }
+ ret->use = size;
+ ret->size = size;
+ ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
+ ret->content = (xmlChar *) mem;
+ ret->error = 0;
+ ret->buffer = NULL;
+ return(ret);
+}
+
+/**
+ * xmlBufGetAllocationScheme:
+ * @buf: the buffer
+ *
+ * Get the buffer allocation scheme
+ *
+ * Returns the scheme or -1 in case of error
+ */
+int
+xmlBufGetAllocationScheme(xmlBufPtr buf) {
+ if (buf == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufGetAllocationScheme: buf == NULL\n");
+#endif
+ return(-1);
+ }
+ return(buf->alloc);
+}
+
+/**
+ * xmlBufSetAllocationScheme:
+ * @buf: the buffer to tune
+ * @scheme: allocation scheme to use
+ *
+ * Sets the allocation scheme for this buffer
+ *
+ * returns 0 in case of success and -1 in case of failure
+ */
+int
+xmlBufSetAllocationScheme(xmlBufPtr buf,
+ xmlBufferAllocationScheme scheme) {
+ if ((buf == NULL) || (buf->error != 0)) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufSetAllocationScheme: buf == NULL or in error\n");
+#endif
+ return(-1);
+ }
+ if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
+ (buf->alloc == XML_BUFFER_ALLOC_IO))
+ return(-1);
+ if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
+ (scheme == XML_BUFFER_ALLOC_EXACT) ||
+ (scheme == XML_BUFFER_ALLOC_HYBRID) ||
+ (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) {
+ buf->alloc = scheme;
+ if (buf->buffer)
+ buf->buffer->alloc = scheme;
+ return(0);
+ }
+ /*
+ * Switching a buffer ALLOC_IO has the side effect of initializing
+ * the contentIO field with the current content
+ */
+ if (scheme == XML_BUFFER_ALLOC_IO) {
+ buf->alloc = XML_BUFFER_ALLOC_IO;
+ buf->contentIO = buf->content;
+ }
+ return(-1);
+}
+
+/**
+ * xmlBufFree:
+ * @buf: the buffer to free
+ *
+ * Frees an XML buffer. It frees both the content and the structure which
+ * encapsulate it.
+ */
+void
+xmlBufFree(xmlBufPtr buf) {
+ if (buf == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufFree: buf == NULL\n");
+#endif
+ return;
+ }
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
+ (buf->contentIO != NULL)) {
+ xmlFree(buf->contentIO);
+ } else if ((buf->content != NULL) &&
+ (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
+ xmlFree(buf->content);
+ }
+ xmlFree(buf);
+}
+
+/**
+ * xmlBufEmpty:
+ * @buf: the buffer
+ *
+ * empty a buffer.
+ */
+void
+xmlBufEmpty(xmlBufPtr buf) {
+ if ((buf == NULL) || (buf->error != 0)) return;
+ if (buf->content == NULL) return;
+ CHECK_COMPAT(buf)
+ buf->use = 0;
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
+ buf->content = BAD_CAST "";
+ } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
+ (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ buf->size += start_buf;
+ buf->content = buf->contentIO;
+ buf->content[0] = 0;
+ } else {
+ buf->content[0] = 0;
+ }
+ UPDATE_COMPAT(buf)
+}
+
+/**
+ * xmlBufShrink:
+ * @buf: the buffer to dump
+ * @len: the number of xmlChar to remove
+ *
+ * Remove the beginning of an XML buffer.
+ * NOTE that this routine behaviour differs from xmlBufferShrink()
+ * as it will return 0 on error instead of -1 due to size_t being
+ * used as the return type.
+ *
+ * Returns the number of byte removed or 0 in case of failure
+ */
+size_t
+xmlBufShrink(xmlBufPtr buf, size_t len) {
+ if ((buf == NULL) || (buf->error != 0)) return(0);
+ CHECK_COMPAT(buf)
+ if (len == 0) return(0);
+ if (len > buf->use) return(0);
+
+ buf->use -= len;
+ if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
+ ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
+ /*
+ * we just move the content pointer, but also make sure
+ * the perceived buffer size has shrinked accordingly
+ */
+ buf->content += len;
+ buf->size -= len;
+
+ /*
+ * sometimes though it maybe be better to really shrink
+ * on IO buffers
+ */
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+ if (start_buf >= buf->size) {
+ memmove(buf->contentIO, &buf->content[0], buf->use);
+ buf->content = buf->contentIO;
+ buf->content[buf->use] = 0;
+ buf->size += start_buf;
+ }
+ }
+ } else {
+ memmove(buf->content, &buf->content[len], buf->use);
+ buf->content[buf->use] = 0;
+ }
+ UPDATE_COMPAT(buf)
+ return(len);
+}
+
+/**
+ * xmlBufGrowInternal:
+ * @buf: the buffer
+ * @len: the minimum free size to allocate
+ *
+ * Grow the available space of an XML buffer, @len is the target value
+ * Error checking should be done on buf->error since using the return
+ * value doesn't work that well
+ *
+ * Returns 0 in case of error or the length made available otherwise
+ */
+static size_t
+xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
+ size_t size;
+ xmlChar *newbuf;
+
+ if ((buf == NULL) || (buf->error != 0)) return(0);
+ CHECK_COMPAT(buf)
+
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
+ if (buf->use + len < buf->size)
+ return(buf->size - buf->use);
+
+ /*
+ * Windows has a BIG problem on realloc timing, so we try to double
+ * the buffer size (if that's enough) (bug 146697)
+ * Apparently BSD too, and it's probably best for linux too
+ * On an embedded system this may be something to change
+ */
+#if 1
+ if (buf->size > (size_t) len)
+ size = buf->size * 2;
+ else
+ size = buf->use + len + 100;
+#else
+ size = buf->use + len + 100;
+#endif
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ newbuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + size);
+ if (newbuf == NULL) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return(0);
+ }
+ buf->contentIO = newbuf;
+ buf->content = newbuf + start_buf;
+ } else {
+ newbuf = (xmlChar *) xmlRealloc(buf->content, size);
+ if (newbuf == NULL) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return(0);
+ }
+ buf->content = newbuf;
+ }
+ buf->size = size;
+ UPDATE_COMPAT(buf)
+ return(buf->size - buf->use);
+}
+
+/**
+ * xmlBufGrow:
+ * @buf: the buffer
+ * @len: the minimum free size to allocate
+ *
+ * Grow the available space of an XML buffer, @len is the target value
+ * This is been kept compatible with xmlBufferGrow() as much as possible
+ *
+ * Returns -1 in case of error or the length made available otherwise
+ */
+int
+xmlBufGrow(xmlBufPtr buf, int len) {
+ size_t ret;
+
+ if ((buf == NULL) || (len < 0)) return(-1);
+ if (len == 0)
+ return(0);
+ ret = xmlBufGrowInternal(buf, len);
+ if (buf->error != 0)
+ return(-1);
+ return((int) ret);
+}
+
+/**
+ * xmlBufInflate:
+ * @buf: the buffer
+ * @len: the minimum extra free size to allocate
+ *
+ * Grow the available space of an XML buffer, adding at least @len bytes
+ *
+ * Returns 0 if successful or -1 in case of error
+ */
+int
+xmlBufInflate(xmlBufPtr buf, size_t len) {
+ if (buf == NULL) return(-1);
+ xmlBufGrowInternal(buf, len + buf->size);
+ if (buf->error)
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlBufDump:
+ * @file: the file output
+ * @buf: the buffer to dump
+ *
+ * Dumps an XML buffer to a FILE *.
+ * Returns the number of #xmlChar written
+ */
+size_t
+xmlBufDump(FILE *file, xmlBufPtr buf) {
+ size_t ret;
+
+ if ((buf == NULL) || (buf->error != 0)) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufDump: buf == NULL or in error\n");
+#endif
+ return(0);
+ }
+ if (buf->content == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufDump: buf->content == NULL\n");
+#endif
+ return(0);
+ }
+ CHECK_COMPAT(buf)
+ if (file == NULL)
+ file = stdout;
+ ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file);
+ return(ret);
+}
+
+/**
+ * xmlBufContent:
+ * @buf: the buffer
+ *
+ * Function to extract the content of a buffer
+ *
+ * Returns the internal content
+ */
+
+xmlChar *
+xmlBufContent(const xmlBuf *buf)
+{
+ if ((!buf) || (buf->error))
+ return NULL;
+
+ return(buf->content);
+}
+
+/**
+ * xmlBufEnd:
+ * @buf: the buffer
+ *
+ * Function to extract the end of the content of a buffer
+ *
+ * Returns the end of the internal content or NULL in case of error
+ */
+
+xmlChar *
+xmlBufEnd(xmlBufPtr buf)
+{
+ if ((!buf) || (buf->error))
+ return NULL;
+ CHECK_COMPAT(buf)
+
+ return(&buf->content[buf->use]);
+}
+
+/**
+ * xmlBufAddLen:
+ * @buf: the buffer
+ * @len: the size which were added at the end
+ *
+ * Sometime data may be added at the end of the buffer without
+ * using the xmlBuf APIs that is used to expand the used space
+ * and set the zero terminating at the end of the buffer
+ *
+ * Returns -1 in case of error and 0 otherwise
+ */
+int
+xmlBufAddLen(xmlBufPtr buf, size_t len) {
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (len > (buf->size - buf->use))
+ return(-1);
+ buf->use += len;
+ UPDATE_COMPAT(buf)
+ if (buf->size > buf->use)
+ buf->content[buf->use] = 0;
+ else
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlBufErase:
+ * @buf: the buffer
+ * @len: the size to erase at the end
+ *
+ * Sometime data need to be erased at the end of the buffer
+ *
+ * Returns -1 in case of error and 0 otherwise
+ */
+int
+xmlBufErase(xmlBufPtr buf, size_t len) {
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (len > buf->use)
+ return(-1);
+ buf->use -= len;
+ buf->content[buf->use] = 0;
+ UPDATE_COMPAT(buf)
+ return(0);
+}
+
+/**
+ * xmlBufLength:
+ * @buf: the buffer
+ *
+ * Function to get the length of a buffer
+ *
+ * Returns the length of data in the internal content
+ */
+
+size_t
+xmlBufLength(const xmlBufPtr buf)
+{
+ if ((!buf) || (buf->error))
+ return 0;
+ CHECK_COMPAT(buf)
+
+ return(buf->use);
+}
+
+/**
+ * xmlBufUse:
+ * @buf: the buffer
+ *
+ * Function to get the length of a buffer
+ *
+ * Returns the length of data in the internal content
+ */
+
+size_t
+xmlBufUse(const xmlBufPtr buf)
+{
+ if ((!buf) || (buf->error))
+ return 0;
+ CHECK_COMPAT(buf)
+
+ return(buf->use);
+}
+
+/**
+ * xmlBufAvail:
+ * @buf: the buffer
+ *
+ * Function to find how much free space is allocated but not
+ * used in the buffer. It does not account for the terminating zero
+ * usually needed
+ *
+ * Returns the amount or 0 if none or an error occured
+ */
+
+size_t
+xmlBufAvail(const xmlBufPtr buf)
+{
+ if ((!buf) || (buf->error))
+ return 0;
+ CHECK_COMPAT(buf)
+
+ return(buf->size - buf->use);
+}
+
+/**
+ * xmlBufIsEmpty:
+ * @buf: the buffer
+ *
+ * Tell if a buffer is empty
+ *
+ * Returns 0 if no, 1 if yes and -1 in case of error
+ */
+int
+xmlBufIsEmpty(const xmlBufPtr buf)
+{
+ if ((!buf) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+
+ return(buf->use == 0);
+}
+
+/**
+ * xmlBufResize:
+ * @buf: the buffer to resize
+ * @size: the desired size
+ *
+ * Resize a buffer to accommodate minimum size of @size.
+ *
+ * Returns 0 in case of problems, 1 otherwise
+ */
+int
+xmlBufResize(xmlBufPtr buf, size_t size)
+{
+ unsigned int newSize;
+ xmlChar* rebuf = NULL;
+ size_t start_buf;
+
+ if ((buf == NULL) || (buf->error))
+ return(0);
+ CHECK_COMPAT(buf)
+
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
+
+ /* Don't resize if we don't have to */
+ if (size < buf->size)
+ return 1;
+
+ /* figure out new size */
+ switch (buf->alloc){
+ case XML_BUFFER_ALLOC_IO:
+ case XML_BUFFER_ALLOC_DOUBLEIT:
+ /*take care of empty case*/
+ newSize = (buf->size ? buf->size*2 : size + 10);
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
+ break;
+ case XML_BUFFER_ALLOC_EXACT:
+ newSize = size+10;
+ break;
+ case XML_BUFFER_ALLOC_HYBRID:
+ if (buf->use < BASE_BUFFER_SIZE)
+ newSize = size;
+ else {
+ newSize = buf->size * 2;
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
+ }
+ break;
+
+ default:
+ newSize = size+10;
+ break;
+ }
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ start_buf = buf->content - buf->contentIO;
+
+ if (start_buf > newSize) {
+ /* move data back to start */
+ memmove(buf->contentIO, buf->content, buf->use);
+ buf->content = buf->contentIO;
+ buf->content[buf->use] = 0;
+ buf->size += start_buf;
+ } else {
+ rebuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + newSize);
+ if (rebuf == NULL) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return 0;
+ }
+ buf->contentIO = rebuf;
+ buf->content = rebuf + start_buf;
+ }
+ } else {
+ if (buf->content == NULL) {
+ rebuf = (xmlChar *) xmlMallocAtomic(newSize);
+ } else if (buf->size - buf->use < 100) {
+ rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
+ } else {
+ /*
+ * if we are reallocating a buffer far from being full, it's
+ * better to make a new allocation and copy only the used range
+ * and free the old one.
+ */
+ rebuf = (xmlChar *) xmlMallocAtomic(newSize);
+ if (rebuf != NULL) {
+ memcpy(rebuf, buf->content, buf->use);
+ xmlFree(buf->content);
+ rebuf[buf->use] = 0;
+ }
+ }
+ if (rebuf == NULL) {
+ xmlBufMemoryError(buf, "growing buffer");
+ return 0;
+ }
+ buf->content = rebuf;
+ }
+ buf->size = newSize;
+ UPDATE_COMPAT(buf)
+
+ return 1;
+}
+
+/**
+ * xmlBufAdd:
+ * @buf: the buffer to dump
+ * @str: the #xmlChar string
+ * @len: the number of #xmlChar to add
+ *
+ * Add a string range to an XML buffer. if len == -1, the length of
+ * str is recomputed.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
+ unsigned int needSize;
+
+ if ((str == NULL) || (buf == NULL) || (buf->error))
+ return -1;
+ CHECK_COMPAT(buf)
+
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (len < -1) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufAdd: len < 0\n");
+#endif
+ return -1;
+ }
+ if (len == 0) return 0;
+
+ if (len < 0)
+ len = xmlStrlen(str);
+
+ if (len < 0) return -1;
+ if (len == 0) return 0;
+
+ needSize = buf->use + len + 2;
+ if (needSize > buf->size){
+ if (!xmlBufResize(buf, needSize)){
+ xmlBufMemoryError(buf, "growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+
+ memmove(&buf->content[buf->use], str, len*sizeof(xmlChar));
+ buf->use += len;
+ buf->content[buf->use] = 0;
+ UPDATE_COMPAT(buf)
+ return 0;
+}
+
+/**
+ * xmlBufAddHead:
+ * @buf: the buffer
+ * @str: the #xmlChar string
+ * @len: the number of #xmlChar to add
+ *
+ * Add a string range to the beginning of an XML buffer.
+ * if len == -1, the length of @str is recomputed.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
+ unsigned int needSize;
+
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufAddHead: str == NULL\n");
+#endif
+ return -1;
+ }
+ if (len < -1) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufAddHead: len < 0\n");
+#endif
+ return -1;
+ }
+ if (len == 0) return 0;
+
+ if (len < 0)
+ len = xmlStrlen(str);
+
+ if (len <= 0) return -1;
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ if (start_buf > (unsigned int) len) {
+ /*
+ * We can add it in the space previously shrinked
+ */
+ buf->content -= len;
+ memmove(&buf->content[0], str, len);
+ buf->use += len;
+ buf->size += len;
+ UPDATE_COMPAT(buf)
+ return(0);
+ }
+ }
+ needSize = buf->use + len + 2;
+ if (needSize > buf->size){
+ if (!xmlBufResize(buf, needSize)){
+ xmlBufMemoryError(buf, "growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+
+ memmove(&buf->content[len], &buf->content[0], buf->use);
+ memmove(&buf->content[0], str, len);
+ buf->use += len;
+ buf->content[buf->use] = 0;
+ UPDATE_COMPAT(buf)
+ return 0;
+}
+
+/**
+ * xmlBufCat:
+ * @buf: the buffer to add to
+ * @str: the #xmlChar string
+ *
+ * Append a zero terminated string to an XML buffer.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufCat(xmlBufPtr buf, const xmlChar *str) {
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) return -1;
+ return xmlBufAdd(buf, str, -1);
+}
+
+/**
+ * xmlBufCCat:
+ * @buf: the buffer to dump
+ * @str: the C char string
+ *
+ * Append a zero terminated C string to an XML buffer.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufCCat(xmlBufPtr buf, const char *str) {
+ const char *cur;
+
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufCCat: str == NULL\n");
+#endif
+ return -1;
+ }
+ for (cur = str;*cur != 0;cur++) {
+ if (buf->use + 10 >= buf->size) {
+ if (!xmlBufResize(buf, buf->use+10)){
+ xmlBufMemoryError(buf, "growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+ buf->content[buf->use++] = *cur;
+ }
+ buf->content[buf->use] = 0;
+ UPDATE_COMPAT(buf)
+ return 0;
+}
+
+/**
+ * xmlBufWriteCHAR:
+ * @buf: the XML buffer
+ * @string: the string to add
+ *
+ * routine which manages and grows an output buffer. This one adds
+ * xmlChars at the end of the buffer.
+ *
+ * Returns 0 if successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string) {
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(-1);
+ return(xmlBufCat(buf, string));
+}
+
+/**
+ * xmlBufWriteChar:
+ * @buf: the XML buffer output
+ * @string: the string to add
+ *
+ * routine which manage and grows an output buffer. This one add
+ * C chars at the end of the array.
+ *
+ * Returns 0 if successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufWriteChar(xmlBufPtr buf, const char *string) {
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(-1);
+ return(xmlBufCCat(buf, string));
+}
+
+
+/**
+ * xmlBufWriteQuotedString:
+ * @buf: the XML buffer output
+ * @string: the string to add
+ *
+ * routine which manage and grows an output buffer. This one writes
+ * a quoted or double quoted #xmlChar string, checking first if it holds
+ * quote or double-quotes internally
+ *
+ * Returns 0 if successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) {
+ const xmlChar *cur, *base;
+ if ((buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(-1);
+ if (xmlStrchr(string, '\"')) {
+ if (xmlStrchr(string, '\'')) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufWriteQuotedString: string contains quote and double-quotes !\n");
+#endif
+ xmlBufCCat(buf, "\"");
+ base = cur = string;
+ while(*cur != 0){
+ if(*cur == '"'){
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&quot;", 6);
+ cur++;
+ base = cur;
+ }
+ else {
+ cur++;
+ }
+ }
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufCCat(buf, "\"");
+ }
+ else{
+ xmlBufCCat(buf, "\'");
+ xmlBufCat(buf, string);
+ xmlBufCCat(buf, "\'");
+ }
+ } else {
+ xmlBufCCat(buf, "\"");
+ xmlBufCat(buf, string);
+ xmlBufCCat(buf, "\"");
+ }
+ return(0);
+}
+
+/**
+ * xmlBufFromBuffer:
+ * @buffer: incoming old buffer to convert to a new one
+ *
+ * Helper routine to switch from the old buffer structures in use
+ * in various APIs. It creates a wrapper xmlBufPtr which will be
+ * used for internal processing until the xmlBufBackToBuffer() is
+ * issued.
+ *
+ * Returns a new xmlBufPtr unless the call failed and NULL is returned
+ */
+xmlBufPtr
+xmlBufFromBuffer(xmlBufferPtr buffer) {
+ xmlBufPtr ret;
+
+ if (buffer == NULL)
+ return(NULL);
+
+ ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
+ if (ret == NULL) {
+ xmlBufMemoryError(NULL, "creating buffer");
+ return(NULL);
+ }
+ ret->use = buffer->use;
+ ret->size = buffer->size;
+ ret->compat_use = buffer->use;
+ ret->compat_size = buffer->size;
+ ret->error = 0;
+ ret->buffer = buffer;
+ ret->alloc = buffer->alloc;
+ ret->content = buffer->content;
+ ret->contentIO = buffer->contentIO;
+
+ return(ret);
+}
+
+/**
+ * xmlBufBackToBuffer:
+ * @buf: new buffer wrapping the old one
+ *
+ * Function to be called once internal processing had been done to
+ * update back the buffer provided by the user. This can lead to
+ * a failure in case the size accumulated in the xmlBuf is larger
+ * than what an xmlBuffer can support on 64 bits (INT_MAX)
+ * The xmlBufPtr @buf wrapper is deallocated by this call in any case.
+ *
+ * Returns the old xmlBufferPtr unless the call failed and NULL is returned
+ */
+xmlBufferPtr
+xmlBufBackToBuffer(xmlBufPtr buf) {
+ xmlBufferPtr ret;
+
+ if ((buf == NULL) || (buf->error))
+ return(NULL);
+ CHECK_COMPAT(buf)
+ if (buf->buffer == NULL) {
+ xmlBufFree(buf);
+ return(NULL);
+ }
+
+ ret = buf->buffer;
+ /*
+ * What to do in case of error in the buffer ???
+ */
+ if (buf->use > INT_MAX) {
+ /*
+ * Worse case, we really allocated and used more than the
+ * maximum allowed memory for an xmlBuffer on this architecture.
+ * Keep the buffer but provide a truncated size value.
+ */
+ xmlBufOverflowError(buf, "Used size too big for xmlBuffer");
+ ret->use = INT_MAX;
+ ret->size = INT_MAX;
+ } else if (buf->size > INT_MAX) {
+ /*
+ * milder case, we allocated more than the maximum allowed memory
+ * for an xmlBuffer on this architecture, but used less than the
+ * limit.
+ * Keep the buffer but provide a truncated size value.
+ */
+ xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer");
+ ret->size = INT_MAX;
+ }
+ ret->use = (int) buf->use;
+ ret->size = (int) buf->size;
+ ret->alloc = buf->alloc;
+ ret->content = buf->content;
+ ret->contentIO = buf->contentIO;
+ xmlFree(buf);
+ return(ret);
+}
+
+/**
+ * xmlBufMergeBuffer:
+ * @buf: an xmlBufPtr
+ * @buffer: the buffer to consume into @buf
+ *
+ * The content of @buffer is appended to @buf and @buffer is freed
+ *
+ * Returns -1 in case of error, 0 otherwise, in any case @buffer is freed
+ */
+int
+xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer) {
+ int ret = 0;
+
+ if ((buf == NULL) || (buf->error)) {
+ xmlBufferFree(buffer);
+ return(-1);
+ }
+ CHECK_COMPAT(buf)
+ if ((buffer != NULL) && (buffer->content != NULL) &&
+ (buffer->use > 0)) {
+ ret = xmlBufAdd(buf, buffer->content, buffer->use);
+ }
+ xmlBufferFree(buffer);
+ return(ret);
+}
+
+/**
+ * xmlBufResetInput:
+ * @buf: an xmlBufPtr
+ * @input: an xmlParserInputPtr
+ *
+ * Update the input to use the current set of pointers from the buffer.
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+int
+xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input) {
+ if ((input == NULL) || (buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ input->base = input->cur = buf->content;
+ input->end = &buf->content[buf->use];
+ return(0);
+}
+
+/**
+ * xmlBufGetInputBase:
+ * @buf: an xmlBufPtr
+ * @input: an xmlParserInputPtr
+ *
+ * Get the base of the @input relative to the beginning of the buffer
+ *
+ * Returns the size_t corresponding to the displacement
+ */
+size_t
+xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) {
+ size_t base;
+
+ if ((input == NULL) || (buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ base = input->base - buf->content;
+ /*
+ * We could do some pointer arythmetic checks but that's probably
+ * sufficient.
+ */
+ if (base > buf->size) {
+ xmlBufOverflowError(buf, "Input reference outside of the buffer");
+ base = 0;
+ }
+ return(base);
+}
+
+/**
+ * xmlBufSetInputBaseCur:
+ * @buf: an xmlBufPtr
+ * @input: an xmlParserInputPtr
+ * @base: the base value relative to the beginning of the buffer
+ * @cur: the cur value relative to the beginning of the buffer
+ *
+ * Update the input to use the base and cur relative to the buffer
+ * after a possible reallocation of its content
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+int
+xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
+ size_t base, size_t cur) {
+ if ((input == NULL) || (buf == NULL) || (buf->error))
+ return(-1);
+ CHECK_COMPAT(buf)
+ input->base = &buf->content[base];
+ input->cur = input->base + cur;
+ input->end = &buf->content[buf->use];
+ return(0);
+}
+
+#define bottom_buf
+#include "elfgcchack.h"
diff --git a/buf.h b/buf.h
new file mode 100644
index 0000000..ebdc978
--- /dev/null
+++ b/buf.h
@@ -0,0 +1,72 @@
+/*
+ * Summary: Internal Interfaces for memory buffers in libxml2
+ * Description: this module describes most of the new xmlBuf buffer
+ * entry points, those are private routines, with a
+ * few exceptions exported in tree.h. This was added
+ * in 2.9.0.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_BUF_H__
+#define __XML_BUF_H__
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+xmlBufPtr xmlBufCreate(void);
+xmlBufPtr xmlBufCreateSize(size_t size);
+xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
+
+int xmlBufSetAllocationScheme(xmlBufPtr buf,
+ xmlBufferAllocationScheme scheme);
+int xmlBufGetAllocationScheme(xmlBufPtr buf);
+
+void xmlBufFree(xmlBufPtr buf);
+void xmlBufEmpty(xmlBufPtr buf);
+
+/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
+int xmlBufGrow(xmlBufPtr buf, int len);
+int xmlBufInflate(xmlBufPtr buf, size_t len);
+int xmlBufResize(xmlBufPtr buf, size_t len);
+
+int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
+int xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len);
+int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
+int xmlBufCCat(xmlBufPtr buf, const char *str);
+int xmlBufWriteCHAR(xmlBufPtr buf, const xmlChar *string);
+int xmlBufWriteChar(xmlBufPtr buf, const char *string);
+int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
+
+size_t xmlBufAvail(const xmlBufPtr buf);
+size_t xmlBufLength(const xmlBufPtr buf);
+/* size_t xmlBufUse(const xmlBufPtr buf); */
+int xmlBufIsEmpty(const xmlBufPtr buf);
+int xmlBufAddLen(xmlBufPtr buf, size_t len);
+int xmlBufErase(xmlBufPtr buf, size_t len);
+
+/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
+/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
+
+xmlChar * xmlBufDetach(xmlBufPtr buf);
+
+size_t xmlBufDump(FILE *file, xmlBufPtr buf);
+
+xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
+xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
+int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
+
+int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
+size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
+int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
+ size_t base, size_t cur);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_BUF_H__ */
+
diff --git a/c14n.c b/c14n.c
new file mode 100644
index 0000000..ca77f92
--- /dev/null
+++ b/c14n.c
@@ -0,0 +1,2238 @@
+/*
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
+ */
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/uri.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/c14n.h>
+
+#include "buf.h"
+
+/************************************************************************
+ * *
+ * Some declaration better left private ATM *
+ * *
+ ************************************************************************/
+
+typedef enum {
+ XMLC14N_BEFORE_DOCUMENT_ELEMENT = 0,
+ XMLC14N_INSIDE_DOCUMENT_ELEMENT = 1,
+ XMLC14N_AFTER_DOCUMENT_ELEMENT = 2
+} xmlC14NPosition;
+
+typedef struct _xmlC14NVisibleNsStack {
+ int nsCurEnd; /* number of nodes in the set */
+ int nsPrevStart; /* the begginning of the stack for previous visible node */
+ int nsPrevEnd; /* the end of the stack for previous visible node */
+ int nsMax; /* size of the array as allocated */
+ xmlNsPtr *nsTab; /* array of ns in no particular order */
+ xmlNodePtr *nodeTab; /* array of nodes in no particular order */
+} xmlC14NVisibleNsStack, *xmlC14NVisibleNsStackPtr;
+
+typedef struct _xmlC14NCtx {
+ /* input parameters */
+ xmlDocPtr doc;
+ xmlC14NIsVisibleCallback is_visible_callback;
+ void* user_data;
+ int with_comments;
+ xmlOutputBufferPtr buf;
+
+ /* position in the XML document */
+ xmlC14NPosition pos;
+ int parent_is_doc;
+ xmlC14NVisibleNsStackPtr ns_rendered;
+
+ /* C14N mode */
+ xmlC14NMode mode;
+
+ /* exclusive canonicalization */
+ xmlChar **inclusive_ns_prefixes;
+
+ /* error number */
+ int error;
+} xmlC14NCtx, *xmlC14NCtxPtr;
+
+static xmlC14NVisibleNsStackPtr xmlC14NVisibleNsStackCreate (void);
+static void xmlC14NVisibleNsStackDestroy (xmlC14NVisibleNsStackPtr cur);
+static void xmlC14NVisibleNsStackAdd (xmlC14NVisibleNsStackPtr cur,
+ xmlNsPtr ns,
+ xmlNodePtr node);
+static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur,
+ xmlC14NVisibleNsStackPtr state);
+static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur,
+ xmlC14NVisibleNsStackPtr state);
+static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur);
+static int xmlC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
+ xmlNsPtr ns);
+static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
+ xmlNsPtr ns,
+ xmlC14NCtxPtr ctx);
+
+static int xmlC14NIsNodeInNodeset (xmlNodeSetPtr nodes,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+
+
+
+static int xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur);
+static int xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur);
+typedef enum {
+ XMLC14N_NORMALIZE_ATTR = 0,
+ XMLC14N_NORMALIZE_COMMENT = 1,
+ XMLC14N_NORMALIZE_PI = 2,
+ XMLC14N_NORMALIZE_TEXT = 3
+} xmlC14NNormalizationMode;
+
+static xmlChar *xmlC11NNormalizeString(const xmlChar * input,
+ xmlC14NNormalizationMode mode);
+
+#define xmlC11NNormalizeAttr( a ) \
+ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_ATTR)
+#define xmlC11NNormalizeComment( a ) \
+ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_COMMENT)
+#define xmlC11NNormalizePI( a ) \
+ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_PI)
+#define xmlC11NNormalizeText( a ) \
+ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_TEXT)
+
+#define xmlC14NIsVisible( ctx, node, parent ) \
+ (((ctx)->is_visible_callback != NULL) ? \
+ (ctx)->is_visible_callback((ctx)->user_data, \
+ (xmlNodePtr)(node), (xmlNodePtr)(parent)) : 1)
+
+#define xmlC14NIsExclusive( ctx ) \
+ ( (ctx)->mode == XML_C14N_EXCLUSIVE_1_0 )
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlC14NErrMemory:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of memory error
+ */
+static void
+xmlC14NErrMemory(const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlC14NErrParam:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of param error
+ */
+static void
+xmlC14NErrParam(const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_ERR_INTERNAL_ERROR, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Invalid parameter : %s\n", extra);
+}
+
+/**
+ * xmlC14NErrInternal:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of internal error
+ */
+static void
+xmlC14NErrInternal(const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_ERR_INTERNAL_ERROR, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Internal error : %s\n", extra);
+}
+
+/**
+ * xmlC14NErrInvalidNode:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of invalid node error
+ */
+static void
+xmlC14NErrInvalidNode(const char *node_type, const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_C14N_INVALID_NODE, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Node %s is invalid here : %s\n", node_type, extra);
+}
+
+/**
+ * xmlC14NErrUnknownNode:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of unknown node error
+ */
+static void
+xmlC14NErrUnknownNode(int node_type, const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_C14N_UNKNOW_NODE, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Unknown node type %d found : %s\n", node_type, extra);
+}
+
+/**
+ * xmlC14NErrRelativeNamespace:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of relative namespace error
+ */
+static void
+xmlC14NErrRelativeNamespace(const char *ns_uri)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N,
+ XML_C14N_RELATIVE_NAMESPACE, XML_ERR_ERROR, NULL, 0, NULL,
+ NULL, NULL, 0, 0,
+ "Relative namespace UR is invalid here : %s\n", ns_uri);
+}
+
+
+
+/**
+ * xmlC14NErr:
+ * @ctxt: a C14N evaluation context
+ * @node: the context node
+ * @error: the erorr code
+ * @msg: the message
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error,
+ const char * msg)
+{
+ if (ctxt != NULL)
+ ctxt->error = error;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, node, XML_FROM_C14N, error,
+ XML_ERR_ERROR, NULL, 0,
+ NULL, NULL, NULL, 0, 0, "%s", msg);
+}
+
+/************************************************************************
+ * *
+ * The implementation internals *
+ * *
+ ************************************************************************/
+#define XML_NAMESPACES_DEFAULT 16
+
+static int
+xmlC14NIsNodeInNodeset(xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent) {
+ if((nodes != NULL) && (node != NULL)) {
+ if(node->type != XML_NAMESPACE_DECL) {
+ return(xmlXPathNodeSetContains(nodes, node));
+ } else {
+ xmlNs ns;
+
+ memcpy(&ns, node, sizeof(ns));
+
+ /* this is a libxml hack! check xpath.c for details */
+ if((parent != NULL) && (parent->type == XML_ATTRIBUTE_NODE)) {
+ ns.next = (xmlNsPtr)parent->parent;
+ } else {
+ ns.next = (xmlNsPtr)parent;
+ }
+
+ /*
+ * If the input is an XPath node-set, then the node-set must explicitly
+ * contain every node to be rendered to the canonical form.
+ */
+ return(xmlXPathNodeSetContains(nodes, (xmlNodePtr)&ns));
+ }
+ }
+ return(1);
+}
+
+static xmlC14NVisibleNsStackPtr
+xmlC14NVisibleNsStackCreate(void) {
+ xmlC14NVisibleNsStackPtr ret;
+
+ ret = (xmlC14NVisibleNsStackPtr) xmlMalloc(sizeof(xmlC14NVisibleNsStack));
+ if (ret == NULL) {
+ xmlC14NErrMemory("creating namespaces stack");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlC14NVisibleNsStack));
+ return(ret);
+}
+
+static void
+xmlC14NVisibleNsStackDestroy(xmlC14NVisibleNsStackPtr cur) {
+ if(cur == NULL) {
+ xmlC14NErrParam("destroying namespaces stack");
+ return;
+ }
+ if(cur->nsTab != NULL) {
+ memset(cur->nsTab, 0, cur->nsMax * sizeof(xmlNsPtr));
+ xmlFree(cur->nsTab);
+ }
+ if(cur->nodeTab != NULL) {
+ memset(cur->nodeTab, 0, cur->nsMax * sizeof(xmlNodePtr));
+ xmlFree(cur->nodeTab);
+ }
+ memset(cur, 0, sizeof(xmlC14NVisibleNsStack));
+ xmlFree(cur);
+
+}
+
+static void
+xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node) {
+ if((cur == NULL) ||
+ ((cur->nsTab == NULL) && (cur->nodeTab != NULL)) ||
+ ((cur->nsTab != NULL) && (cur->nodeTab == NULL))) {
+ xmlC14NErrParam("adding namespace to stack");
+ return;
+ }
+
+ if ((cur->nsTab == NULL) && (cur->nodeTab == NULL)) {
+ cur->nsTab = (xmlNsPtr*) xmlMalloc(XML_NAMESPACES_DEFAULT * sizeof(xmlNsPtr));
+ cur->nodeTab = (xmlNodePtr*) xmlMalloc(XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr));
+ if ((cur->nsTab == NULL) || (cur->nodeTab == NULL)) {
+ xmlC14NErrMemory("adding node to stack");
+ return;
+ }
+ memset(cur->nsTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNsPtr));
+ memset(cur->nodeTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr));
+ cur->nsMax = XML_NAMESPACES_DEFAULT;
+ } else if(cur->nsMax == cur->nsCurEnd) {
+ void *tmp;
+ int tmpSize;
+
+ tmpSize = 2 * cur->nsMax;
+ tmp = xmlRealloc(cur->nsTab, tmpSize * sizeof(xmlNsPtr));
+ if (tmp == NULL) {
+ xmlC14NErrMemory("adding node to stack");
+ return;
+ }
+ cur->nsTab = (xmlNsPtr*)tmp;
+
+ tmp = xmlRealloc(cur->nodeTab, tmpSize * sizeof(xmlNodePtr));
+ if (tmp == NULL) {
+ xmlC14NErrMemory("adding node to stack");
+ return;
+ }
+ cur->nodeTab = (xmlNodePtr*)tmp;
+
+ cur->nsMax = tmpSize;
+ }
+ cur->nsTab[cur->nsCurEnd] = ns;
+ cur->nodeTab[cur->nsCurEnd] = node;
+
+ ++cur->nsCurEnd;
+}
+
+static void
+xmlC14NVisibleNsStackSave(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state) {
+ if((cur == NULL) || (state == NULL)) {
+ xmlC14NErrParam("saving namespaces stack");
+ return;
+ }
+
+ state->nsCurEnd = cur->nsCurEnd;
+ state->nsPrevStart = cur->nsPrevStart;
+ state->nsPrevEnd = cur->nsPrevEnd;
+}
+
+static void
+xmlC14NVisibleNsStackRestore(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state) {
+ if((cur == NULL) || (state == NULL)) {
+ xmlC14NErrParam("restoring namespaces stack");
+ return;
+ }
+ cur->nsCurEnd = state->nsCurEnd;
+ cur->nsPrevStart = state->nsPrevStart;
+ cur->nsPrevEnd = state->nsPrevEnd;
+}
+
+static void
+xmlC14NVisibleNsStackShift(xmlC14NVisibleNsStackPtr cur) {
+ if(cur == NULL) {
+ xmlC14NErrParam("shifting namespaces stack");
+ return;
+ }
+ cur->nsPrevStart = cur->nsPrevEnd;
+ cur->nsPrevEnd = cur->nsCurEnd;
+}
+
+static int
+xmlC14NStrEqual(const xmlChar *str1, const xmlChar *str2) {
+ if (str1 == str2) return(1);
+ if (str1 == NULL) return((*str2) == '\0');
+ if (str2 == NULL) return((*str1) == '\0');
+ do {
+ if (*str1++ != *str2) return(0);
+ } while (*str2++);
+ return(1);
+}
+
+/**
+ * xmlC14NVisibleNsStackFind:
+ * @ctx: the C14N context
+ * @ns: the namespace to check
+ *
+ * Checks whether the given namespace was already rendered or not
+ *
+ * Returns 1 if we already wrote this namespace or 0 otherwise
+ */
+static int
+xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns)
+{
+ int i;
+ const xmlChar *prefix;
+ const xmlChar *href;
+ int has_empty_ns;
+
+ if(cur == NULL) {
+ xmlC14NErrParam("searching namespaces stack (c14n)");
+ return (0);
+ }
+
+ /*
+ * if the default namespace xmlns="" is not defined yet then
+ * we do not want to print it out
+ */
+ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix;
+ href = ((ns == NULL) || (ns->href == NULL)) ? BAD_CAST "" : ns->href;
+ has_empty_ns = (xmlC14NStrEqual(prefix, NULL) && xmlC14NStrEqual(href, NULL));
+
+ if (cur->nsTab != NULL) {
+ int start = (has_empty_ns) ? 0 : cur->nsPrevStart;
+ for (i = cur->nsCurEnd - 1; i >= start; --i) {
+ xmlNsPtr ns1 = cur->nsTab[i];
+
+ if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) {
+ return(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL));
+ }
+ }
+ }
+ return(has_empty_ns);
+}
+
+static int
+xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NCtxPtr ctx) {
+ int i;
+ const xmlChar *prefix;
+ const xmlChar *href;
+ int has_empty_ns;
+
+ if(cur == NULL) {
+ xmlC14NErrParam("searching namespaces stack (exc c14n)");
+ return (0);
+ }
+
+ /*
+ * if the default namespace xmlns="" is not defined yet then
+ * we do not want to print it out
+ */
+ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix;
+ href = ((ns == NULL) || (ns->href == NULL)) ? BAD_CAST "" : ns->href;
+ has_empty_ns = (xmlC14NStrEqual(prefix, NULL) && xmlC14NStrEqual(href, NULL));
+
+ if (cur->nsTab != NULL) {
+ int start = 0;
+ for (i = cur->nsCurEnd - 1; i >= start; --i) {
+ xmlNsPtr ns1 = cur->nsTab[i];
+
+ if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) {
+ if(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)) {
+ return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i]));
+ } else {
+ return(0);
+ }
+ }
+ }
+ }
+ return(has_empty_ns);
+}
+
+
+
+
+/**
+ * xmlC14NIsXmlNs:
+ * @ns: the namespace to check
+ *
+ * Checks whether the given namespace is a default "xml:" namespace
+ * with href="http://www.w3.org/XML/1998/namespace"
+ *
+ * Returns 1 if the node is default or 0 otherwise
+ */
+
+/* todo: make it a define? */
+static int
+xmlC14NIsXmlNs(xmlNsPtr ns)
+{
+ return ((ns != NULL) &&
+ (xmlStrEqual(ns->prefix, BAD_CAST "xml")) &&
+ (xmlStrEqual(ns->href, XML_XML_NAMESPACE)));
+}
+
+
+/**
+ * xmlC14NNsCompare:
+ * @ns1: the pointer to first namespace
+ * @ns2: the pointer to second namespace
+ *
+ * Compares the namespaces by names (prefixes).
+ *
+ * Returns -1 if ns1 < ns2, 0 if ns1 == ns2 or 1 if ns1 > ns2.
+ */
+static int
+xmlC14NNsCompare(xmlNsPtr ns1, xmlNsPtr ns2)
+{
+ if (ns1 == ns2)
+ return (0);
+ if (ns1 == NULL)
+ return (-1);
+ if (ns2 == NULL)
+ return (1);
+
+ return (xmlStrcmp(ns1->prefix, ns2->prefix));
+}
+
+
+/**
+ * xmlC14NPrintNamespaces:
+ * @ns: the pointer to namespace
+ * @ctx: the C14N context
+ *
+ * Prints the given namespace to the output buffer from C14N context.
+ *
+ * Returns 1 on success or 0 on fail.
+ */
+static int
+xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx)
+{
+
+ if ((ns == NULL) || (ctx == NULL)) {
+ xmlC14NErrParam("writing namespaces");
+ return 0;
+ }
+
+ if (ns->prefix != NULL) {
+ xmlOutputBufferWriteString(ctx->buf, " xmlns:");
+ xmlOutputBufferWriteString(ctx->buf, (const char *) ns->prefix);
+ xmlOutputBufferWriteString(ctx->buf, "=");
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, " xmlns=");
+ }
+ if(ns->href != NULL) {
+ xmlBufWriteQuotedString(ctx->buf->buffer, ns->href);
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, "\"\"");
+ }
+ return (1);
+}
+
+/**
+ * xmlC14NProcessNamespacesAxis:
+ * @ctx: the C14N context
+ * @node: the current node
+ *
+ * Prints out canonical namespace axis of the current node to the
+ * buffer from C14N context as follows
+ *
+ * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n)
+ *
+ * Namespace Axis
+ * Consider a list L containing only namespace nodes in the
+ * axis and in the node-set in lexicographic order (ascending). To begin
+ * processing L, if the first node is not the default namespace node (a node
+ * with no namespace URI and no local name), then generate a space followed
+ * by xmlns="" if and only if the following conditions are met:
+ * - the element E that owns the axis is in the node-set
+ * - The nearest ancestor element of E in the node-set has a default
+ * namespace node in the node-set (default namespace nodes always
+ * have non-empty values in XPath)
+ * The latter condition eliminates unnecessary occurrences of xmlns="" in
+ * the canonical form since an element only receives an xmlns="" if its
+ * default namespace is empty and if it has an immediate parent in the
+ * canonical form that has a non-empty default namespace. To finish
+ * processing L, simply process every namespace node in L, except omit
+ * namespace node with local name xml, which defines the xml prefix,
+ * if its string value is http://www.w3.org/XML/1998/namespace.
+ *
+ * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n)
+ * Canonical XML applied to a document subset requires the search of the
+ * ancestor nodes of each orphan element node for attributes in the xml
+ * namespace, such as xml:lang and xml:space. These are copied into the
+ * element node except if a declaration of the same attribute is already
+ * in the attribute axis of the element (whether or not it is included in
+ * the document subset). This search and copying are omitted from the
+ * Exclusive XML Canonicalization method.
+ *
+ * Returns 0 on success or -1 on fail.
+ */
+static int
+xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
+{
+ xmlNodePtr n;
+ xmlNsPtr ns, tmp;
+ xmlListPtr list;
+ int already_rendered;
+ int has_empty_ns = 0;
+
+ if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) {
+ xmlC14NErrParam("processing namespaces axis (c14n)");
+ return (-1);
+ }
+
+ /*
+ * Create a sorted list to store element namespaces
+ */
+ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NNsCompare);
+ if (list == NULL) {
+ xmlC14NErrInternal("creating namespaces list (c14n)");
+ return (-1);
+ }
+
+ /* check all namespaces */
+ for(n = cur; n != NULL; n = n->parent) {
+ for(ns = n->nsDef; ns != NULL; ns = ns->next) {
+ tmp = xmlSearchNs(cur->doc, cur, ns->prefix);
+
+ if((tmp == ns) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) {
+ already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns);
+ if(visible) {
+ xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
+ }
+ if(!already_rendered) {
+ xmlListInsert(list, ns);
+ }
+ if(xmlStrlen(ns->prefix) == 0) {
+ has_empty_ns = 1;
+ }
+ }
+ }
+ }
+
+ /**
+ * if the first node is not the default namespace node (a node with no
+ * namespace URI and no local name), then generate a space followed by
+ * xmlns="" if and only if the following conditions are met:
+ * - the element E that owns the axis is in the node-set
+ * - the nearest ancestor element of E in the node-set has a default
+ * namespace node in the node-set (default namespace nodes always
+ * have non-empty values in XPath)
+ */
+ if(visible && !has_empty_ns) {
+ static xmlNs ns_default;
+
+ memset(&ns_default, 0, sizeof(ns_default));
+ if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) {
+ xmlC14NPrintNamespaces(&ns_default, ctx);
+ }
+ }
+
+
+ /*
+ * print out all elements from list
+ */
+ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx);
+
+ /*
+ * Cleanup
+ */
+ xmlListDelete(list);
+ return (0);
+}
+
+
+/**
+ * xmlExcC14NProcessNamespacesAxis:
+ * @ctx: the C14N context
+ * @node: the current node
+ *
+ * Prints out exclusive canonical namespace axis of the current node to the
+ * buffer from C14N context as follows
+ *
+ * Exclusive XML Canonicalization
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * If the element node is in the XPath subset then output the node in
+ * accordance with Canonical XML except for namespace nodes which are
+ * rendered as follows:
+ *
+ * 1. Render each namespace node iff:
+ * * it is visibly utilized by the immediate parent element or one of
+ * its attributes, or is present in InclusiveNamespaces PrefixList, and
+ * * its prefix and value do not appear in ns_rendered. ns_rendered is
+ * obtained by popping the state stack in order to obtain a list of
+ * prefixes and their values which have already been rendered by
+ * an output ancestor of the namespace node's parent element.
+ * 2. Append the rendered namespace node to the list ns_rendered of namespace
+ * nodes rendered by output ancestors. Push ns_rendered on state stack and
+ * recurse.
+ * 3. After the recursion returns, pop thestate stack.
+ *
+ *
+ * Returns 0 on success or -1 on fail.
+ */
+static int
+xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
+{
+ xmlNsPtr ns;
+ xmlListPtr list;
+ xmlAttrPtr attr;
+ int already_rendered;
+ int has_empty_ns = 0;
+ int has_visibly_utilized_empty_ns = 0;
+ int has_empty_ns_in_inclusive_list = 0;
+
+ if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) {
+ xmlC14NErrParam("processing namespaces axis (exc c14n)");
+ return (-1);
+ }
+
+ if(!xmlC14NIsExclusive(ctx)) {
+ xmlC14NErrParam("processing namespaces axis (exc c14n)");
+ return (-1);
+
+ }
+
+ /*
+ * Create a sorted list to store element namespaces
+ */
+ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NNsCompare);
+ if (list == NULL) {
+ xmlC14NErrInternal("creating namespaces list (exc c14n)");
+ return (-1);
+ }
+
+ /*
+ * process inclusive namespaces:
+ * All namespace nodes appearing on inclusive ns list are
+ * handled as provided in Canonical XML
+ */
+ if(ctx->inclusive_ns_prefixes != NULL) {
+ xmlChar *prefix;
+ int i;
+
+ for (i = 0; ctx->inclusive_ns_prefixes[i] != NULL; ++i) {
+ prefix = ctx->inclusive_ns_prefixes[i];
+ /*
+ * Special values for namespace with empty prefix
+ */
+ if (xmlStrEqual(prefix, BAD_CAST "#default")
+ || xmlStrEqual(prefix, BAD_CAST "")) {
+ prefix = NULL;
+ has_empty_ns_in_inclusive_list = 1;
+ }
+
+ ns = xmlSearchNs(cur->doc, cur, prefix);
+ if((ns != NULL) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) {
+ already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns);
+ if(visible) {
+ xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
+ }
+ if(!already_rendered) {
+ xmlListInsert(list, ns);
+ }
+ if(xmlStrlen(ns->prefix) == 0) {
+ has_empty_ns = 1;
+ }
+ }
+ }
+ }
+
+ /* add node namespace */
+ if(cur->ns != NULL) {
+ ns = cur->ns;
+ } else {
+ ns = xmlSearchNs(cur->doc, cur, NULL);
+ has_visibly_utilized_empty_ns = 1;
+ }
+ if((ns != NULL) && !xmlC14NIsXmlNs(ns)) {
+ if(visible && xmlC14NIsVisible(ctx, ns, cur)) {
+ if(!xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, ns, ctx)) {
+ xmlListInsert(list, ns);
+ }
+ }
+ if(visible) {
+ xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur);
+ }
+ if(xmlStrlen(ns->prefix) == 0) {
+ has_empty_ns = 1;
+ }
+ }
+
+
+ /* add attributes */
+ for(attr = cur->properties; attr != NULL; attr = attr->next) {
+ /*
+ * we need to check that attribute is visible and has non
+ * default namespace (XML Namespaces: "default namespaces
+ * do not apply directly to attributes")
+ */
+ if((attr->ns != NULL) && !xmlC14NIsXmlNs(attr->ns) && xmlC14NIsVisible(ctx, attr, cur)) {
+ already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
+ xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
+ if(!already_rendered && visible) {
+ xmlListInsert(list, attr->ns);
+ }
+ if(xmlStrlen(attr->ns->prefix) == 0) {
+ has_empty_ns = 1;
+ }
+ } else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) {
+ has_visibly_utilized_empty_ns = 1;
+ }
+ }
+
+ /*
+ * Process xmlns=""
+ */
+ if(visible && has_visibly_utilized_empty_ns &&
+ !has_empty_ns && !has_empty_ns_in_inclusive_list) {
+ static xmlNs ns_default;
+
+ memset(&ns_default, 0, sizeof(ns_default));
+
+ already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default, ctx);
+ if(!already_rendered) {
+ xmlC14NPrintNamespaces(&ns_default, ctx);
+ }
+ } else if(visible && !has_empty_ns && has_empty_ns_in_inclusive_list) {
+ static xmlNs ns_default;
+
+ memset(&ns_default, 0, sizeof(ns_default));
+ if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) {
+ xmlC14NPrintNamespaces(&ns_default, ctx);
+ }
+ }
+
+
+
+ /*
+ * print out all elements from list
+ */
+ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx);
+
+ /*
+ * Cleanup
+ */
+ xmlListDelete(list);
+ return (0);
+}
+
+
+/**
+ * xmlC14NIsXmlAttr:
+ * @attr: the attr to check
+ *
+ * Checks whether the given attribute is a default "xml:" namespace
+ * with href="http://www.w3.org/XML/1998/namespace"
+ *
+ * Returns 1 if the node is default or 0 otherwise
+ */
+
+/* todo: make it a define? */
+static int
+xmlC14NIsXmlAttr(xmlAttrPtr attr)
+{
+ return ((attr->ns != NULL) &&
+ (xmlC14NIsXmlNs(attr->ns) != 0));
+}
+
+
+/**
+ * xmlC14NAttrsCompare:
+ * @attr1: the pointer tls o first attr
+ * @attr2: the pointer to second attr
+ *
+ * Prints the given attribute to the output buffer from C14N context.
+ *
+ * Returns -1 if attr1 < attr2, 0 if attr1 == attr2 or 1 if attr1 > attr2.
+ */
+static int
+xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2)
+{
+ int ret = 0;
+
+ /*
+ * Simple cases
+ */
+ if (attr1 == attr2)
+ return (0);
+ if (attr1 == NULL)
+ return (-1);
+ if (attr2 == NULL)
+ return (1);
+ if (attr1->ns == attr2->ns) {
+ return (xmlStrcmp(attr1->name, attr2->name));
+ }
+
+ /*
+ * Attributes in the default namespace are first
+ * because the default namespace is not applied to
+ * unqualified attributes
+ */
+ if (attr1->ns == NULL)
+ return (-1);
+ if (attr2->ns == NULL)
+ return (1);
+ if (attr1->ns->prefix == NULL)
+ return (-1);
+ if (attr2->ns->prefix == NULL)
+ return (1);
+
+ ret = xmlStrcmp(attr1->ns->href, attr2->ns->href);
+ if (ret == 0) {
+ ret = xmlStrcmp(attr1->name, attr2->name);
+ }
+ return (ret);
+}
+
+
+/**
+ * xmlC14NPrintAttrs:
+ * @attr: the pointer to attr
+ * @ctx: the C14N context
+ *
+ * Prints out canonical attribute urrent node to the
+ * buffer from C14N context as follows
+ *
+ * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n)
+ *
+ * Returns 1 on success or 0 on fail.
+ */
+static int
+xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx)
+{
+ xmlChar *value;
+ xmlChar *buffer;
+
+ if ((attr == NULL) || (ctx == NULL)) {
+ xmlC14NErrParam("writing attributes");
+ return (0);
+ }
+
+ xmlOutputBufferWriteString(ctx->buf, " ");
+ if (attr->ns != NULL && xmlStrlen(attr->ns->prefix) > 0) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) attr->ns->prefix);
+ xmlOutputBufferWriteString(ctx->buf, ":");
+ }
+ xmlOutputBufferWriteString(ctx->buf, (const char *) attr->name);
+ xmlOutputBufferWriteString(ctx->buf, "=\"");
+
+ value = xmlNodeListGetString(ctx->doc, attr->children, 1);
+ /* todo: should we log an error if value==NULL ? */
+ if (value != NULL) {
+ buffer = xmlC11NNormalizeAttr(value);
+ xmlFree(value);
+ if (buffer != NULL) {
+ xmlOutputBufferWriteString(ctx->buf, (const char *) buffer);
+ xmlFree(buffer);
+ } else {
+ xmlC14NErrInternal("normalizing attributes axis");
+ return (0);
+ }
+ }
+ xmlOutputBufferWriteString(ctx->buf, "\"");
+ return (1);
+}
+
+/**
+ * xmlC14NFindHiddenParentAttr:
+ *
+ * Finds an attribute in a hidden parent node.
+ *
+ * Returns a pointer to the attribute node (if found) or NULL otherwise.
+ */
+static xmlAttrPtr
+xmlC14NFindHiddenParentAttr(xmlC14NCtxPtr ctx, xmlNodePtr cur, const xmlChar * name, const xmlChar * ns)
+{
+ xmlAttrPtr res;
+ while((cur != NULL) && (!xmlC14NIsVisible(ctx, cur, cur->parent))) {
+ res = xmlHasNsProp(cur, name, ns);
+ if(res != NULL) {
+ return res;
+ }
+
+ cur = cur->parent;
+ }
+
+ return NULL;
+}
+
+/**
+ * xmlC14NFixupBaseAttr:
+ *
+ * Fixes up the xml:base attribute
+ *
+ * Returns the newly created attribute or NULL
+ */
+static xmlAttrPtr
+xmlC14NFixupBaseAttr(xmlC14NCtxPtr ctx, xmlAttrPtr xml_base_attr)
+{
+ xmlChar * res = NULL;
+ xmlNodePtr cur;
+ xmlAttrPtr attr;
+ xmlChar * tmp_str;
+ xmlChar * tmp_str2;
+ int tmp_str_len;
+
+ if ((ctx == NULL) || (xml_base_attr == NULL) || (xml_base_attr->parent == NULL)) {
+ xmlC14NErrParam("processing xml:base attribute");
+ return (NULL);
+ }
+
+ /* start from current value */
+ res = xmlNodeListGetString(ctx->doc, xml_base_attr->children, 1);
+ if(res == NULL) {
+ xmlC14NErrInternal("processing xml:base attribute - can't get attr value");
+ return (NULL);
+ }
+
+ /* go up the stack until we find a node that we rendered already */
+ cur = xml_base_attr->parent->parent;
+ while((cur != NULL) && (!xmlC14NIsVisible(ctx, cur, cur->parent))) {
+ attr = xmlHasNsProp(cur, BAD_CAST "base", XML_XML_NAMESPACE);
+ if(attr != NULL) {
+ /* get attr value */
+ tmp_str = xmlNodeListGetString(ctx->doc, attr->children, 1);
+ if(tmp_str == NULL) {
+ xmlFree(res);
+
+ xmlC14NErrInternal("processing xml:base attribute - can't get attr value");
+ return (NULL);
+ }
+
+ /* we need to add '/' if our current base uri ends with '..' or '.'
+ to ensure that we are forced to go "up" all the time */
+ tmp_str_len = xmlStrlen(tmp_str);
+ if(tmp_str_len > 1 && tmp_str[tmp_str_len - 2] == '.') {
+ tmp_str2 = xmlStrcat(tmp_str, BAD_CAST "/");
+ if(tmp_str2 == NULL) {
+ xmlFree(tmp_str);
+ xmlFree(res);
+
+ xmlC14NErrInternal("processing xml:base attribute - can't modify uri");
+ return (NULL);
+ }
+
+ tmp_str = tmp_str2;
+ }
+
+ /* build uri */
+ tmp_str2 = xmlBuildURI(res, tmp_str);
+ if(tmp_str2 == NULL) {
+ xmlFree(tmp_str);
+ xmlFree(res);
+
+ xmlC14NErrInternal("processing xml:base attribute - can't construct uri");
+ return (NULL);
+ }
+
+ /* cleanup and set the new res */
+ xmlFree(tmp_str);
+ xmlFree(res);
+ res = tmp_str2;
+ }
+
+ /* next */
+ cur = cur->parent;
+ }
+
+ /* check if result uri is empty or not */
+ if((res == NULL) || xmlStrEqual(res, BAD_CAST "")) {
+ xmlFree(res);
+ return (NULL);
+ }
+
+ /* create and return the new attribute node */
+ attr = xmlNewNsProp(NULL, xml_base_attr->ns, BAD_CAST "base", res);
+ if(attr == NULL) {
+ xmlFree(res);
+
+ xmlC14NErrInternal("processing xml:base attribute - can't construct attribute");
+ return (NULL);
+ }
+
+ /* done */
+ xmlFree(res);
+ return (attr);
+}
+
+/**
+ * xmlC14NProcessAttrsAxis:
+ * @ctx: the C14N context
+ * @cur: the current node
+ * @parent_visible: the visibility of parent node
+ * @all_parents_visible: the visibility of all parent nodes
+ *
+ * Prints out canonical attribute axis of the current node to the
+ * buffer from C14N context as follows
+ *
+ * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n)
+ *
+ * Attribute Axis
+ * In lexicographic order (ascending), process each node that
+ * is in the element's attribute axis and in the node-set.
+ *
+ * The processing of an element node E MUST be modified slightly
+ * when an XPath node-set is given as input and the element's
+ * parent is omitted from the node-set.
+ *
+ *
+ * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n)
+ *
+ * Canonical XML applied to a document subset requires the search of the
+ * ancestor nodes of each orphan element node for attributes in the xml
+ * namespace, such as xml:lang and xml:space. These are copied into the
+ * element node except if a declaration of the same attribute is already
+ * in the attribute axis of the element (whether or not it is included in
+ * the document subset). This search and copying are omitted from the
+ * Exclusive XML Canonicalization method.
+ *
+ * Returns 0 on success or -1 on fail.
+ */
+static int
+xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int parent_visible)
+{
+ xmlAttrPtr attr;
+ xmlListPtr list;
+ xmlAttrPtr attrs_to_delete = NULL;
+
+ /* special processing for 1.1 spec */
+ xmlAttrPtr xml_base_attr = NULL;
+ xmlAttrPtr xml_lang_attr = NULL;
+ xmlAttrPtr xml_space_attr = NULL;
+
+ if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) {
+ xmlC14NErrParam("processing attributes axis");
+ return (-1);
+ }
+
+ /*
+ * Create a sorted list to store element attributes
+ */
+ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NAttrsCompare);
+ if (list == NULL) {
+ xmlC14NErrInternal("creating attributes list");
+ return (-1);
+ }
+
+ switch(ctx->mode) {
+ case XML_C14N_1_0:
+ /* The processing of an element node E MUST be modified slightly when an XPath node-set is
+ * given as input and the element's parent is omitted from the node-set. The method for processing
+ * the attribute axis of an element E in the node-set is enhanced. All element nodes along E's
+ * ancestor axis are examined for nearest occurrences of attributes in the xml namespace, such
+ * as xml:lang and xml:space (whether or not they are in the node-set). From this list of attributes,
+ * remove any that are in E's attribute axis (whether or not they are in the node-set). Then,
+ * lexicographically merge this attribute list with the nodes of E's attribute axis that are in
+ * the node-set. The result of visiting the attribute axis is computed by processing the attribute
+ * nodes in this merged attribute list.
+ */
+
+ /*
+ * Add all visible attributes from current node.
+ */
+ attr = cur->properties;
+ while (attr != NULL) {
+ /* check that attribute is visible */
+ if (xmlC14NIsVisible(ctx, attr, cur)) {
+ xmlListInsert(list, attr);
+ }
+ attr = attr->next;
+ }
+
+ /*
+ * Handle xml attributes
+ */
+ if (parent_visible && (cur->parent != NULL) &&
+ (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent)))
+ {
+ xmlNodePtr tmp;
+
+ /*
+ * If XPath node-set is not specified then the parent is always
+ * visible!
+ */
+ tmp = cur->parent;
+ while (tmp != NULL) {
+ attr = tmp->properties;
+ while (attr != NULL) {
+ if (xmlC14NIsXmlAttr(attr) != 0) {
+ if (xmlListSearch(list, attr) == NULL) {
+ xmlListInsert(list, attr);
+ }
+ }
+ attr = attr->next;
+ }
+ tmp = tmp->parent;
+ }
+ }
+
+ /* done */
+ break;
+ case XML_C14N_EXCLUSIVE_1_0:
+ /* attributes in the XML namespace, such as xml:lang and xml:space
+ * are not imported into orphan nodes of the document subset
+ */
+
+ /*
+ * Add all visible attributes from current node.
+ */
+ attr = cur->properties;
+ while (attr != NULL) {
+ /* check that attribute is visible */
+ if (xmlC14NIsVisible(ctx, attr, cur)) {
+ xmlListInsert(list, attr);
+ }
+ attr = attr->next;
+ }
+
+ /* do nothing special for xml attributes */
+ break;
+ case XML_C14N_1_1:
+ /* The processing of an element node E MUST be modified slightly when an XPath node-set is
+ * given as input and some of the element's ancestors are omitted from the node-set.
+ *
+ * Simple inheritable attributes are attributes that have a value that requires at most a simple
+ * redeclaration. This redeclaration is done by supplying a new value in the child axis. The
+ * redeclaration of a simple inheritable attribute A contained in one of E's ancestors is done
+ * by supplying a value to an attribute Ae inside E with the same name. Simple inheritable attributes
+ * are xml:lang and xml:space.
+ *
+ * The method for processing the attribute axis of an element E in the node-set is hence enhanced.
+ * All element nodes along E's ancestor axis are examined for the nearest occurrences of simple
+ * inheritable attributes in the xml namespace, such as xml:lang and xml:space (whether or not they
+ * are in the node-set). From this list of attributes, any simple inheritable attributes that are
+ * already in E's attribute axis (whether or not they are in the node-set) are removed. Then,
+ * lexicographically merge this attribute list with the nodes of E's attribute axis that are in
+ * the node-set. The result of visiting the attribute axis is computed by processing the attribute
+ * nodes in this merged attribute list.
+ *
+ * The xml:id attribute is not a simple inheritable attribute and no processing of these attributes is
+ * performed.
+ *
+ * The xml:base attribute is not a simple inheritable attribute and requires special processing beyond
+ * a simple redeclaration.
+ *
+ * Attributes in the XML namespace other than xml:base, xml:id, xml:lang, and xml:space MUST be processed
+ * as ordinary attributes.
+ */
+
+ /*
+ * Add all visible attributes from current node.
+ */
+ attr = cur->properties;
+ while (attr != NULL) {
+ /* special processing for XML attribute kiks in only when we have invisible parents */
+ if ((!parent_visible) || (xmlC14NIsXmlAttr(attr) == 0)) {
+ /* check that attribute is visible */
+ if (xmlC14NIsVisible(ctx, attr, cur)) {
+ xmlListInsert(list, attr);
+ }
+ } else {
+ int matched = 0;
+
+ /* check for simple inheritance attributes */
+ if((!matched) && (xml_lang_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "lang")) {
+ xml_lang_attr = attr;
+ matched = 1;
+ }
+ if((!matched) && (xml_space_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "space")) {
+ xml_space_attr = attr;
+ matched = 1;
+ }
+
+ /* check for base attr */
+ if((!matched) && (xml_base_attr == NULL) && xmlStrEqual(attr->name, BAD_CAST "base")) {
+ xml_base_attr = attr;
+ matched = 1;
+ }
+
+ /* otherwise, it is a normal attribute, so just check if it is visible */
+ if((!matched) && xmlC14NIsVisible(ctx, attr, cur)) {
+ xmlListInsert(list, attr);
+ }
+ }
+
+ /* move to the next one */
+ attr = attr->next;
+ }
+
+ /* special processing for XML attribute kiks in only when we have invisible parents */
+ if ((parent_visible)) {
+
+ /* simple inheritance attributes - copy */
+ if(xml_lang_attr == NULL) {
+ xml_lang_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "lang", XML_XML_NAMESPACE);
+ }
+ if(xml_lang_attr != NULL) {
+ xmlListInsert(list, xml_lang_attr);
+ }
+ if(xml_space_attr == NULL) {
+ xml_space_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "space", XML_XML_NAMESPACE);
+ }
+ if(xml_space_attr != NULL) {
+ xmlListInsert(list, xml_space_attr);
+ }
+
+ /* base uri attribute - fix up */
+ if(xml_base_attr == NULL) {
+ /* if we don't have base uri attribute, check if we have a "hidden" one above */
+ xml_base_attr = xmlC14NFindHiddenParentAttr(ctx, cur->parent, BAD_CAST "base", XML_XML_NAMESPACE);
+ }
+ if(xml_base_attr != NULL) {
+ xml_base_attr = xmlC14NFixupBaseAttr(ctx, xml_base_attr);
+ if(xml_base_attr != NULL) {
+ xmlListInsert(list, xml_base_attr);
+
+ /* note that we MUST delete returned attr node ourselves! */
+ xml_base_attr->next = attrs_to_delete;
+ attrs_to_delete = xml_base_attr;
+ }
+ }
+ }
+
+ /* done */
+ break;
+ }
+
+ /*
+ * print out all elements from list
+ */
+ xmlListWalk(list, (xmlListWalker) xmlC14NPrintAttrs, (const void *) ctx);
+
+ /*
+ * Cleanup
+ */
+ xmlFreePropList(attrs_to_delete);
+ xmlListDelete(list);
+ return (0);
+}
+
+/**
+ * xmlC14NCheckForRelativeNamespaces:
+ * @ctx: the C14N context
+ * @cur: the current element node
+ *
+ * Checks that current element node has no relative namespaces defined
+ *
+ * Returns 0 if the node has no relative namespaces or -1 otherwise.
+ */
+static int
+xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur)
+{
+ xmlNsPtr ns;
+
+ if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) {
+ xmlC14NErrParam("checking for relative namespaces");
+ return (-1);
+ }
+
+ ns = cur->nsDef;
+ while (ns != NULL) {
+ if (xmlStrlen(ns->href) > 0) {
+ xmlURIPtr uri;
+
+ uri = xmlParseURI((const char *) ns->href);
+ if (uri == NULL) {
+ xmlC14NErrInternal("parsing namespace uri");
+ return (-1);
+ }
+ if (xmlStrlen((const xmlChar *) uri->scheme) == 0) {
+ xmlC14NErrRelativeNamespace(uri->scheme);
+ xmlFreeURI(uri);
+ return (-1);
+ }
+ if ((xmlStrcasecmp((const xmlChar *) uri->scheme, BAD_CAST "urn") != 0)
+ && (xmlStrcasecmp((const xmlChar *) uri->scheme, BAD_CAST "dav") !=0)
+ && (xmlStrlen((const xmlChar *) uri->server) == 0)) {
+ xmlC14NErrRelativeNamespace(uri->scheme);
+ xmlFreeURI(uri);
+ return (-1);
+ }
+ xmlFreeURI(uri);
+ }
+ ns = ns->next;
+ }
+ return (0);
+}
+
+/**
+ * xmlC14NProcessElementNode:
+ * @ctx: the pointer to C14N context object
+ * @cur: the node to process
+ * @visible: this node is visible
+ * @all_parents_visible: whether all the parents of this node are visible
+ *
+ * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n)
+ *
+ * Element Nodes
+ * If the element is not in the node-set, then the result is obtained
+ * by processing the namespace axis, then the attribute axis, then
+ * processing the child nodes of the element that are in the node-set
+ * (in document order). If the element is in the node-set, then the result
+ * is an open angle bracket (<), the element QName, the result of
+ * processing the namespace axis, the result of processing the attribute
+ * axis, a close angle bracket (>), the result of processing the child
+ * nodes of the element that are in the node-set (in document order), an
+ * open angle bracket, a forward slash (/), the element QName, and a close
+ * angle bracket.
+ *
+ * Returns non-negative value on success or negative value on fail
+ */
+static int
+xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible)
+{
+ int ret;
+ xmlC14NVisibleNsStack state;
+ int parent_is_doc = 0;
+
+ if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) {
+ xmlC14NErrParam("processing element node");
+ return (-1);
+ }
+
+ /*
+ * Check relative relative namespaces:
+ * implementations of XML canonicalization MUST report an operation
+ * failure on documents containing relative namespace URIs.
+ */
+ if (xmlC14NCheckForRelativeNamespaces(ctx, cur) < 0) {
+ xmlC14NErrInternal("checking for relative namespaces");
+ return (-1);
+ }
+
+
+ /*
+ * Save ns_rendered stack position
+ */
+ memset(&state, 0, sizeof(state));
+ xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state);
+
+ if (visible) {
+ if (ctx->parent_is_doc) {
+ /* save this flag into the stack */
+ parent_is_doc = ctx->parent_is_doc;
+ ctx->parent_is_doc = 0;
+ ctx->pos = XMLC14N_INSIDE_DOCUMENT_ELEMENT;
+ }
+ xmlOutputBufferWriteString(ctx->buf, "<");
+
+ if ((cur->ns != NULL) && (xmlStrlen(cur->ns->prefix) > 0)) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) cur->ns->prefix);
+ xmlOutputBufferWriteString(ctx->buf, ":");
+ }
+ xmlOutputBufferWriteString(ctx->buf, (const char *) cur->name);
+ }
+
+ if (!xmlC14NIsExclusive(ctx)) {
+ ret = xmlC14NProcessNamespacesAxis(ctx, cur, visible);
+ } else {
+ ret = xmlExcC14NProcessNamespacesAxis(ctx, cur, visible);
+ }
+ if (ret < 0) {
+ xmlC14NErrInternal("processing namespaces axis");
+ return (-1);
+ }
+ /* todo: shouldn't this go to "visible only"? */
+ if(visible) {
+ xmlC14NVisibleNsStackShift(ctx->ns_rendered);
+ }
+
+ ret = xmlC14NProcessAttrsAxis(ctx, cur, visible);
+ if (ret < 0) {
+ xmlC14NErrInternal("processing attributes axis");
+ return (-1);
+ }
+
+ if (visible) {
+ xmlOutputBufferWriteString(ctx->buf, ">");
+ }
+ if (cur->children != NULL) {
+ ret = xmlC14NProcessNodeList(ctx, cur->children);
+ if (ret < 0) {
+ xmlC14NErrInternal("processing childrens list");
+ return (-1);
+ }
+ }
+ if (visible) {
+ xmlOutputBufferWriteString(ctx->buf, "</");
+ if ((cur->ns != NULL) && (xmlStrlen(cur->ns->prefix) > 0)) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) cur->ns->prefix);
+ xmlOutputBufferWriteString(ctx->buf, ":");
+ }
+ xmlOutputBufferWriteString(ctx->buf, (const char *) cur->name);
+ xmlOutputBufferWriteString(ctx->buf, ">");
+ if (parent_is_doc) {
+ /* restore this flag from the stack for next node */
+ ctx->parent_is_doc = parent_is_doc;
+ ctx->pos = XMLC14N_AFTER_DOCUMENT_ELEMENT;
+ }
+ }
+
+ /*
+ * Restore ns_rendered stack position
+ */
+ xmlC14NVisibleNsStackRestore(ctx->ns_rendered, &state);
+ return (0);
+}
+
+/**
+ * xmlC14NProcessNode:
+ * @ctx: the pointer to C14N context object
+ * @cur: the node to process
+ *
+ * Processes the given node
+ *
+ * Returns non-negative value on success or negative value on fail
+ */
+static int
+xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur)
+{
+ int ret = 0;
+ int visible;
+
+ if ((ctx == NULL) || (cur == NULL)) {
+ xmlC14NErrParam("processing node");
+ return (-1);
+ }
+
+ visible = xmlC14NIsVisible(ctx, cur, cur->parent);
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ ret = xmlC14NProcessElementNode(ctx, cur, visible);
+ break;
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ /*
+ * Text Nodes
+ * the string value, except all ampersands are replaced
+ * by &amp;, all open angle brackets (<) are replaced by &lt;, all closing
+ * angle brackets (>) are replaced by &gt;, and all #xD characters are
+ * replaced by &#xD;.
+ */
+ /* cdata sections are processed as text nodes */
+ /* todo: verify that cdata sections are included in XPath nodes set */
+ if ((visible) && (cur->content != NULL)) {
+ xmlChar *buffer;
+
+ buffer = xmlC11NNormalizeText(cur->content);
+ if (buffer != NULL) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) buffer);
+ xmlFree(buffer);
+ } else {
+ xmlC14NErrInternal("normalizing text node");
+ return (-1);
+ }
+ }
+ break;
+ case XML_PI_NODE:
+ /*
+ * Processing Instruction (PI) Nodes-
+ * The opening PI symbol (<?), the PI target name of the node,
+ * a leading space and the string value if it is not empty, and
+ * the closing PI symbol (?>). If the string value is empty,
+ * then the leading space is not added. Also, a trailing #xA is
+ * rendered after the closing PI symbol for PI children of the
+ * root node with a lesser document order than the document
+ * element, and a leading #xA is rendered before the opening PI
+ * symbol of PI children of the root node with a greater document
+ * order than the document element.
+ */
+ if (visible) {
+ if (ctx->pos == XMLC14N_AFTER_DOCUMENT_ELEMENT) {
+ xmlOutputBufferWriteString(ctx->buf, "\x0A<?");
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, "<?");
+ }
+
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) cur->name);
+ if ((cur->content != NULL) && (*(cur->content) != '\0')) {
+ xmlChar *buffer;
+
+ xmlOutputBufferWriteString(ctx->buf, " ");
+
+ /* todo: do we need to normalize pi? */
+ buffer = xmlC11NNormalizePI(cur->content);
+ if (buffer != NULL) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) buffer);
+ xmlFree(buffer);
+ } else {
+ xmlC14NErrInternal("normalizing pi node");
+ return (-1);
+ }
+ }
+
+ if (ctx->pos == XMLC14N_BEFORE_DOCUMENT_ELEMENT) {
+ xmlOutputBufferWriteString(ctx->buf, "?>\x0A");
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, "?>");
+ }
+ }
+ break;
+ case XML_COMMENT_NODE:
+ /*
+ * Comment Nodes
+ * Nothing if generating canonical XML without comments. For
+ * canonical XML with comments, generate the opening comment
+ * symbol (<!--), the string value of the node, and the
+ * closing comment symbol (-->). Also, a trailing #xA is rendered
+ * after the closing comment symbol for comment children of the
+ * root node with a lesser document order than the document
+ * element, and a leading #xA is rendered before the opening
+ * comment symbol of comment children of the root node with a
+ * greater document order than the document element. (Comment
+ * children of the root node represent comments outside of the
+ * top-level document element and outside of the document type
+ * declaration).
+ */
+ if (visible && ctx->with_comments) {
+ if (ctx->pos == XMLC14N_AFTER_DOCUMENT_ELEMENT) {
+ xmlOutputBufferWriteString(ctx->buf, "\x0A<!--");
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, "<!--");
+ }
+
+ if (cur->content != NULL) {
+ xmlChar *buffer;
+
+ /* todo: do we need to normalize comment? */
+ buffer = xmlC11NNormalizeComment(cur->content);
+ if (buffer != NULL) {
+ xmlOutputBufferWriteString(ctx->buf,
+ (const char *) buffer);
+ xmlFree(buffer);
+ } else {
+ xmlC14NErrInternal("normalizing comment node");
+ return (-1);
+ }
+ }
+
+ if (ctx->pos == XMLC14N_BEFORE_DOCUMENT_ELEMENT) {
+ xmlOutputBufferWriteString(ctx->buf, "-->\x0A");
+ } else {
+ xmlOutputBufferWriteString(ctx->buf, "-->");
+ }
+ }
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE: /* should be processed as document? */
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE: /* should be processed as document? */
+#endif
+#ifdef LIBXML_HTML_ENABLED
+ case XML_HTML_DOCUMENT_NODE: /* should be processed as document? */
+#endif
+ if (cur->children != NULL) {
+ ctx->pos = XMLC14N_BEFORE_DOCUMENT_ELEMENT;
+ ctx->parent_is_doc = 1;
+ ret = xmlC14NProcessNodeList(ctx, cur->children);
+ }
+ break;
+
+ case XML_ATTRIBUTE_NODE:
+ xmlC14NErrInvalidNode("XML_ATTRIBUTE_NODE", "processing node");
+ return (-1);
+ case XML_NAMESPACE_DECL:
+ xmlC14NErrInvalidNode("XML_NAMESPACE_DECL", "processing node");
+ return (-1);
+ case XML_ENTITY_REF_NODE:
+ xmlC14NErrInvalidNode("XML_ENTITY_REF_NODE", "processing node");
+ return (-1);
+ case XML_ENTITY_NODE:
+ xmlC14NErrInvalidNode("XML_ENTITY_NODE", "processing node");
+ return (-1);
+
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+#ifdef LIBXML_XINCLUDE_ENABLED
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#endif
+ /*
+ * should be ignored according to "W3C Canonical XML"
+ */
+ break;
+ default:
+ xmlC14NErrUnknownNode(cur->type, "processing node");
+ return (-1);
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlC14NProcessNodeList:
+ * @ctx: the pointer to C14N context object
+ * @cur: the node to start from
+ *
+ * Processes all nodes in the row starting from cur.
+ *
+ * Returns non-negative value on success or negative value on fail
+ */
+static int
+xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur)
+{
+ int ret;
+
+ if (ctx == NULL) {
+ xmlC14NErrParam("processing node list");
+ return (-1);
+ }
+
+ for (ret = 0; cur != NULL && ret >= 0; cur = cur->next) {
+ ret = xmlC14NProcessNode(ctx, cur);
+ }
+ return (ret);
+}
+
+
+/**
+ * xmlC14NFreeCtx:
+ * @ctx: the pointer to C14N context object
+ *
+ * Cleanups the C14N context object.
+ */
+
+static void
+xmlC14NFreeCtx(xmlC14NCtxPtr ctx)
+{
+ if (ctx == NULL) {
+ xmlC14NErrParam("freeing context");
+ return;
+ }
+
+ if (ctx->ns_rendered != NULL) {
+ xmlC14NVisibleNsStackDestroy(ctx->ns_rendered);
+ }
+ xmlFree(ctx);
+}
+
+/**
+ * xmlC14NNewCtx:
+ * @doc: the XML document for canonization
+ * @is_visible_callback:the function to use to determine is node visible
+ * or not
+ * @user_data: the first parameter for @is_visible_callback function
+ * (in most cases, it is nodes set)
+ * @mode: the c14n mode (see @xmlC14NMode)
+ * @inclusive_ns_prefixe the list of inclusive namespace prefixes
+ * ended with a NULL or NULL if there is no
+ * inclusive namespaces (only for `
+ * canonicalization)
+ * @with_comments: include comments in the result (!=0) or not (==0)
+ * @buf: the output buffer to store canonical XML; this
+ * buffer MUST have encoder==NULL because C14N requires
+ * UTF-8 output
+ *
+ * Creates new C14N context object to store C14N parameters.
+ *
+ * Returns pointer to newly created object (success) or NULL (fail)
+ */
+static xmlC14NCtxPtr
+xmlC14NNewCtx(xmlDocPtr doc,
+ xmlC14NIsVisibleCallback is_visible_callback, void* user_data,
+ xmlC14NMode mode, xmlChar ** inclusive_ns_prefixes,
+ int with_comments, xmlOutputBufferPtr buf)
+{
+ xmlC14NCtxPtr ctx = NULL;
+
+ if ((doc == NULL) || (buf == NULL)) {
+ xmlC14NErrParam("creating new context");
+ return (NULL);
+ }
+
+ /*
+ * Validate the encoding output buffer encoding
+ */
+ if (buf->encoder != NULL) {
+ xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8,
+"xmlC14NNewCtx: output buffer encoder != NULL but C14N requires UTF8 output\n");
+ return (NULL);
+ }
+
+ /*
+ * Validate the XML document encoding value, if provided.
+ */
+ if (doc->charset != XML_CHAR_ENCODING_UTF8) {
+ xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8,
+ "xmlC14NNewCtx: source document not in UTF8\n");
+ return (NULL);
+ }
+
+ /*
+ * Allocate a new xmlC14NCtxPtr and fill the fields.
+ */
+ ctx = (xmlC14NCtxPtr) xmlMalloc(sizeof(xmlC14NCtx));
+ if (ctx == NULL) {
+ xmlC14NErrMemory("creating context");
+ return (NULL);
+ }
+ memset(ctx, 0, sizeof(xmlC14NCtx));
+
+ /*
+ * initialize C14N context
+ */
+ ctx->doc = doc;
+ ctx->with_comments = with_comments;
+ ctx->is_visible_callback = is_visible_callback;
+ ctx->user_data = user_data;
+ ctx->buf = buf;
+ ctx->parent_is_doc = 1;
+ ctx->pos = XMLC14N_BEFORE_DOCUMENT_ELEMENT;
+ ctx->ns_rendered = xmlC14NVisibleNsStackCreate();
+
+ if(ctx->ns_rendered == NULL) {
+ xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_CREATE_STACK,
+ "xmlC14NNewCtx: xmlC14NVisibleNsStackCreate failed\n");
+ xmlC14NFreeCtx(ctx);
+ return (NULL);
+ }
+
+ /*
+ * Set "mode" flag and remember list of incluseve prefixes
+ * for exclusive c14n
+ */
+ ctx->mode = mode;
+ if(xmlC14NIsExclusive(ctx)) {
+ ctx->inclusive_ns_prefixes = inclusive_ns_prefixes;
+ }
+ return (ctx);
+}
+
+/**
+ * xmlC14NExecute:
+ * @doc: the XML document for canonization
+ * @is_visible_callback:the function to use to determine is node visible
+ * or not
+ * @user_data: the first parameter for @is_visible_callback function
+ * (in most cases, it is nodes set)
+ * @mode: the c14n mode (see @xmlC14NMode)
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
+ * ended with a NULL or NULL if there is no
+ * inclusive namespaces (only for exclusive
+ * canonicalization, ignored otherwise)
+ * @with_comments: include comments in the result (!=0) or not (==0)
+ * @buf: the output buffer to store canonical XML; this
+ * buffer MUST have encoder==NULL because C14N requires
+ * UTF-8 output
+ *
+ * Dumps the canonized image of given XML document into the provided buffer.
+ * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
+ * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)
+ *
+ * Returns non-negative value on success or a negative value on fail
+ */
+int
+xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback,
+ void* user_data, int mode, xmlChar **inclusive_ns_prefixes,
+ int with_comments, xmlOutputBufferPtr buf) {
+
+ xmlC14NCtxPtr ctx;
+ xmlC14NMode c14n_mode = XML_C14N_1_0;
+ int ret;
+
+ if ((buf == NULL) || (doc == NULL)) {
+ xmlC14NErrParam("executing c14n");
+ return (-1);
+ }
+
+ /* for backward compatibility, we have to have "mode" as "int"
+ and here we check that user gives valid value */
+ switch(mode) {
+ case XML_C14N_1_0:
+ case XML_C14N_EXCLUSIVE_1_0:
+ case XML_C14N_1_1:
+ c14n_mode = (xmlC14NMode)mode;
+ break;
+ default:
+ xmlC14NErrParam("invalid mode for executing c14n");
+ return (-1);
+ }
+
+ /*
+ * Validate the encoding output buffer encoding
+ */
+ if (buf->encoder != NULL) {
+ xmlC14NErr(NULL, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8,
+"xmlC14NExecute: output buffer encoder != NULL but C14N requires UTF8 output\n");
+ return (-1);
+ }
+
+ ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data,
+ c14n_mode, inclusive_ns_prefixes,
+ with_comments, buf);
+ if (ctx == NULL) {
+ xmlC14NErr(NULL, (xmlNodePtr) doc, XML_C14N_CREATE_CTXT,
+ "xmlC14NExecute: unable to create C14N context\n");
+ return (-1);
+ }
+
+
+
+ /*
+ * Root Node
+ * The root node is the parent of the top-level document element. The
+ * result of processing each of its child nodes that is in the node-set
+ * in document order. The root node does not generate a byte order mark,
+ * XML declaration, nor anything from within the document type
+ * declaration.
+ */
+ if (doc->children != NULL) {
+ ret = xmlC14NProcessNodeList(ctx, doc->children);
+ if (ret < 0) {
+ xmlC14NErrInternal("processing docs children list");
+ xmlC14NFreeCtx(ctx);
+ return (-1);
+ }
+ }
+
+ /*
+ * Flush buffer to get number of bytes written
+ */
+ ret = xmlOutputBufferFlush(buf);
+ if (ret < 0) {
+ xmlC14NErrInternal("flushing output buffer");
+ xmlC14NFreeCtx(ctx);
+ return (-1);
+ }
+
+ /*
+ * Cleanup
+ */
+ xmlC14NFreeCtx(ctx);
+ return (ret);
+}
+
+/**
+ * xmlC14NDocSaveTo:
+ * @doc: the XML document for canonization
+ * @nodes: the nodes set to be included in the canonized image
+ * or NULL if all document nodes should be included
+ * @mode: the c14n mode (see @xmlC14NMode)
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
+ * ended with a NULL or NULL if there is no
+ * inclusive namespaces (only for exclusive
+ * canonicalization, ignored otherwise)
+ * @with_comments: include comments in the result (!=0) or not (==0)
+ * @buf: the output buffer to store canonical XML; this
+ * buffer MUST have encoder==NULL because C14N requires
+ * UTF-8 output
+ *
+ * Dumps the canonized image of given XML document into the provided buffer.
+ * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
+ * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)
+ *
+ * Returns non-negative value on success or a negative value on fail
+ */
+int
+xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes,
+ int mode, xmlChar ** inclusive_ns_prefixes,
+ int with_comments, xmlOutputBufferPtr buf) {
+ return(xmlC14NExecute(doc,
+ (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset,
+ nodes,
+ mode,
+ inclusive_ns_prefixes,
+ with_comments,
+ buf));
+}
+
+
+/**
+ * xmlC14NDocDumpMemory:
+ * @doc: the XML document for canonization
+ * @nodes: the nodes set to be included in the canonized image
+ * or NULL if all document nodes should be included
+ * @mode: the c14n mode (see @xmlC14NMode)
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
+ * ended with a NULL or NULL if there is no
+ * inclusive namespaces (only for exclusive
+ * canonicalization, ignored otherwise)
+ * @with_comments: include comments in the result (!=0) or not (==0)
+ * @doc_txt_ptr: the memory pointer for allocated canonical XML text;
+ * the caller of this functions is responsible for calling
+ * xmlFree() to free allocated memory
+ *
+ * Dumps the canonized image of given XML document into memory.
+ * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
+ * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)
+ *
+ * Returns the number of bytes written on success or a negative value on fail
+ */
+int
+xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes,
+ int mode, xmlChar ** inclusive_ns_prefixes,
+ int with_comments, xmlChar ** doc_txt_ptr)
+{
+ int ret;
+ xmlOutputBufferPtr buf;
+
+ if (doc_txt_ptr == NULL) {
+ xmlC14NErrParam("dumping doc to memory");
+ return (-1);
+ }
+
+ *doc_txt_ptr = NULL;
+
+ /*
+ * create memory buffer with UTF8 (default) encoding
+ */
+ buf = xmlAllocOutputBuffer(NULL);
+ if (buf == NULL) {
+ xmlC14NErrMemory("creating output buffer");
+ return (-1);
+ }
+
+ /*
+ * canonize document and write to buffer
+ */
+ ret = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes,
+ with_comments, buf);
+ if (ret < 0) {
+ xmlC14NErrInternal("saving doc to output buffer");
+ (void) xmlOutputBufferClose(buf);
+ return (-1);
+ }
+
+ ret = xmlBufUse(buf->buffer);
+ if (ret > 0) {
+ *doc_txt_ptr = xmlStrndup(xmlBufContent(buf->buffer), ret);
+ }
+ (void) xmlOutputBufferClose(buf);
+
+ if ((*doc_txt_ptr == NULL) && (ret > 0)) {
+ xmlC14NErrMemory("coping canonicanized document");
+ return (-1);
+ }
+ return (ret);
+}
+
+/**
+ * xmlC14NDocSave:
+ * @doc: the XML document for canonization
+ * @nodes: the nodes set to be included in the canonized image
+ * or NULL if all document nodes should be included
+ * @mode: the c14n mode (see @xmlC14NMode)
+ * @inclusive_ns_prefixes: the list of inclusive namespace prefixes
+ * ended with a NULL or NULL if there is no
+ * inclusive namespaces (only for exclusive
+ * canonicalization, ignored otherwise)
+ * @with_comments: include comments in the result (!=0) or not (==0)
+ * @filename: the filename to store canonical XML image
+ * @compression: the compression level (zlib requred):
+ * -1 - libxml default,
+ * 0 - uncompressed,
+ * >0 - compression level
+ *
+ * Dumps the canonized image of given XML document into the file.
+ * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or
+ * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)
+ *
+ * Returns the number of bytes written success or a negative value on fail
+ */
+int
+xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes,
+ int mode, xmlChar ** inclusive_ns_prefixes,
+ int with_comments, const char *filename, int compression)
+{
+ xmlOutputBufferPtr buf;
+ int ret;
+
+ if (filename == NULL) {
+ xmlC14NErrParam("saving doc");
+ return (-1);
+ }
+#ifdef HAVE_ZLIB_H
+ if (compression < 0)
+ compression = xmlGetCompressMode();
+#endif
+
+ /*
+ * save the content to a temp buffer, use default UTF8 encoding.
+ */
+ buf = xmlOutputBufferCreateFilename(filename, NULL, compression);
+ if (buf == NULL) {
+ xmlC14NErrInternal("creating temporary filename");
+ return (-1);
+ }
+
+ /*
+ * canonize document and write to buffer
+ */
+ ret = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes,
+ with_comments, buf);
+ if (ret < 0) {
+ xmlC14NErrInternal("cannicanize document to buffer");
+ (void) xmlOutputBufferClose(buf);
+ return (-1);
+ }
+
+ /*
+ * get the numbers of bytes written
+ */
+ ret = xmlOutputBufferClose(buf);
+ return (ret);
+}
+
+
+
+/*
+ * Macro used to grow the current buffer.
+ */
+#define growBufferReentrant() { \
+ buffer_size *= 2; \
+ buffer = (xmlChar *) \
+ xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \
+ if (buffer == NULL) { \
+ xmlC14NErrMemory("growing buffer"); \
+ return(NULL); \
+ } \
+}
+
+/**
+ * xmlC11NNormalizeString:
+ * @input: the input string
+ * @mode: the normalization mode (attribute, comment, PI or text)
+ *
+ * Converts a string to a canonical (normalized) format. The code is stolen
+ * from xmlEncodeEntitiesReentrant(). Added normalization of \x09, \x0a, \x0A
+ * and the @mode parameter
+ *
+ * Returns a normalized string (caller is responsible for calling xmlFree())
+ * or NULL if an error occurs
+ */
+static xmlChar *
+xmlC11NNormalizeString(const xmlChar * input,
+ xmlC14NNormalizationMode mode)
+{
+ const xmlChar *cur = input;
+ xmlChar *buffer = NULL;
+ xmlChar *out = NULL;
+ int buffer_size = 0;
+
+ if (input == NULL)
+ return (NULL);
+
+ /*
+ * allocate an translation buffer.
+ */
+ buffer_size = 1000;
+ buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlC14NErrMemory("allocating buffer");
+ return (NULL);
+ }
+ out = buffer;
+
+ while (*cur != '\0') {
+ if ((out - buffer) > (buffer_size - 10)) {
+ int indx = out - buffer;
+
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+
+ if ((*cur == '<') && ((mode == XMLC14N_NORMALIZE_ATTR) ||
+ (mode == XMLC14N_NORMALIZE_TEXT))) {
+ *out++ = '&';
+ *out++ = 'l';
+ *out++ = 't';
+ *out++ = ';';
+ } else if ((*cur == '>') && (mode == XMLC14N_NORMALIZE_TEXT)) {
+ *out++ = '&';
+ *out++ = 'g';
+ *out++ = 't';
+ *out++ = ';';
+ } else if ((*cur == '&') && ((mode == XMLC14N_NORMALIZE_ATTR) ||
+ (mode == XMLC14N_NORMALIZE_TEXT))) {
+ *out++ = '&';
+ *out++ = 'a';
+ *out++ = 'm';
+ *out++ = 'p';
+ *out++ = ';';
+ } else if ((*cur == '"') && (mode == XMLC14N_NORMALIZE_ATTR)) {
+ *out++ = '&';
+ *out++ = 'q';
+ *out++ = 'u';
+ *out++ = 'o';
+ *out++ = 't';
+ *out++ = ';';
+ } else if ((*cur == '\x09') && (mode == XMLC14N_NORMALIZE_ATTR)) {
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = 'x';
+ *out++ = '9';
+ *out++ = ';';
+ } else if ((*cur == '\x0A') && (mode == XMLC14N_NORMALIZE_ATTR)) {
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = 'x';
+ *out++ = 'A';
+ *out++ = ';';
+ } else if ((*cur == '\x0D') && ((mode == XMLC14N_NORMALIZE_ATTR) ||
+ (mode == XMLC14N_NORMALIZE_TEXT) ||
+ (mode == XMLC14N_NORMALIZE_COMMENT) ||
+ (mode == XMLC14N_NORMALIZE_PI))) {
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = 'x';
+ *out++ = 'D';
+ *out++ = ';';
+ } else {
+ /*
+ * Works because on UTF-8, all extended sequences cannot
+ * result in bytes in the ASCII range.
+ */
+ *out++ = *cur;
+ }
+ cur++;
+ }
+ *out = 0;
+ return (buffer);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+#define bottom_c14n
+#include "elfgcchack.h"
+#endif /* LIBXML_C14N_ENABLED */
diff --git a/catalog.c b/catalog.c
new file mode 100644
index 0000000..5773db3
--- /dev/null
+++ b/catalog.c
@@ -0,0 +1,3825 @@
+/**
+ * catalog.c: set of generic Catalog related routines
+ *
+ * Reference: SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel.Veillard@imag.fr
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_CATALOG_ENABLED
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/hash.h>
+#include <libxml/uri.h>
+#include <libxml/parserInternals.h>
+#include <libxml/catalog.h>
+#include <libxml/xmlerror.h>
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+
+#include "buf.h"
+
+#define MAX_DELEGATE 50
+#define MAX_CATAL_DEPTH 50
+
+#ifdef _WIN32
+# define PATH_SEAPARATOR ';'
+#else
+# define PATH_SEAPARATOR ':'
+#endif
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ * XML_CATALOG_PREFER user env to select between system/public prefered
+ * option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk>
+ *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
+ *> values "system" and "public". I have made the default be "system" to
+ *> match yours.
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#define XML_URN_PUBID "urn:publicid:"
+#define XML_CATAL_BREAK ((xmlChar *) -1)
+#ifndef XML_XML_DEFAULT_CATALOG
+#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
+#endif
+#ifndef XML_SGML_DEFAULT_CATALOG
+#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
+#endif
+
+#if defined(_WIN32) && defined(_MSC_VER)
+#undef XML_XML_DEFAULT_CATALOG
+static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
+#if defined(_WIN32_WCE)
+/* Windows CE don't have a A variant */
+#define GetModuleHandleA GetModuleHandle
+#define GetModuleFileNameA GetModuleFileName
+#else
+#if !defined(_WINDOWS_)
+void* __stdcall GetModuleHandleA(const char*);
+unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long);
+#endif
+#endif
+#endif
+
+static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID);
+static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename);
+
+/************************************************************************
+ * *
+ * Types, all private *
+ * *
+ ************************************************************************/
+
+typedef enum {
+ XML_CATA_REMOVED = -1,
+ XML_CATA_NONE = 0,
+ XML_CATA_CATALOG,
+ XML_CATA_BROKEN_CATALOG,
+ XML_CATA_NEXT_CATALOG,
+ XML_CATA_GROUP,
+ XML_CATA_PUBLIC,
+ XML_CATA_SYSTEM,
+ XML_CATA_REWRITE_SYSTEM,
+ XML_CATA_DELEGATE_PUBLIC,
+ XML_CATA_DELEGATE_SYSTEM,
+ XML_CATA_URI,
+ XML_CATA_REWRITE_URI,
+ XML_CATA_DELEGATE_URI,
+ SGML_CATA_SYSTEM,
+ SGML_CATA_PUBLIC,
+ SGML_CATA_ENTITY,
+ SGML_CATA_PENTITY,
+ SGML_CATA_DOCTYPE,
+ SGML_CATA_LINKTYPE,
+ SGML_CATA_NOTATION,
+ SGML_CATA_DELEGATE,
+ SGML_CATA_BASE,
+ SGML_CATA_CATALOG,
+ SGML_CATA_DOCUMENT,
+ SGML_CATA_SGMLDECL
+} xmlCatalogEntryType;
+
+typedef struct _xmlCatalogEntry xmlCatalogEntry;
+typedef xmlCatalogEntry *xmlCatalogEntryPtr;
+struct _xmlCatalogEntry {
+ struct _xmlCatalogEntry *next;
+ struct _xmlCatalogEntry *parent;
+ struct _xmlCatalogEntry *children;
+ xmlCatalogEntryType type;
+ xmlChar *name;
+ xmlChar *value;
+ xmlChar *URL; /* The expanded URL using the base */
+ xmlCatalogPrefer prefer;
+ int dealloc;
+ int depth;
+ struct _xmlCatalogEntry *group;
+};
+
+typedef enum {
+ XML_XML_CATALOG_TYPE = 1,
+ XML_SGML_CATALOG_TYPE
+} xmlCatalogType;
+
+#define XML_MAX_SGML_CATA_DEPTH 10
+struct _xmlCatalog {
+ xmlCatalogType type; /* either XML or SGML */
+
+ /*
+ * SGML Catalogs are stored as a simple hash table of catalog entries
+ * Catalog stack to check against overflows when building the
+ * SGML catalog
+ */
+ char *catalTab[XML_MAX_SGML_CATA_DEPTH]; /* stack of catals */
+ int catalNr; /* Number of current catal streams */
+ int catalMax; /* Max number of catal streams */
+ xmlHashTablePtr sgml;
+
+ /*
+ * XML Catalogs are stored as a tree of Catalog entries
+ */
+ xmlCatalogPrefer prefer;
+ xmlCatalogEntryPtr xml;
+};
+
+/************************************************************************
+ * *
+ * Global variables *
+ * *
+ ************************************************************************/
+
+/*
+ * Those are preferences
+ */
+static int xmlDebugCatalogs = 0; /* used for debugging */
+static xmlCatalogAllow xmlCatalogDefaultAllow = XML_CATA_ALLOW_ALL;
+static xmlCatalogPrefer xmlCatalogDefaultPrefer = XML_CATA_PREFER_PUBLIC;
+
+/*
+ * Hash table containing all the trees of XML catalogs parsed by
+ * the application.
+ */
+static xmlHashTablePtr xmlCatalogXMLFiles = NULL;
+
+/*
+ * The default catalog in use by the application
+ */
+static xmlCatalogPtr xmlDefaultCatalog = NULL;
+
+/*
+ * A mutex for modifying the shared global catalog(s)
+ * xmlDefaultCatalog tree.
+ * It also protects xmlCatalogXMLFiles
+ * The core of this readers/writer scheme is in xmlFetchXMLCatalogFile()
+ */
+static xmlRMutexPtr xmlCatalogMutex = NULL;
+
+/*
+ * Whether the catalog support was initialized.
+ */
+static int xmlCatalogInitialized = 0;
+
+/************************************************************************
+ * *
+ * Catalog error handlers *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlCatalogErrMemory(const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_CATALOG,
+ XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlCatalogErr:
+ * @catal: the Catalog entry
+ * @node: the context node
+ * @msg: the error message
+ * @extra: extra informations
+ *
+ * Handle a catalog error
+ */
+static void
+xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2,
+ const xmlChar *str3)
+{
+ __xmlRaiseError(NULL, NULL, NULL, catal, node, XML_FROM_CATALOG,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ (const char *) str3, 0, 0,
+ msg, str1, str2, str3);
+}
+
+
+/************************************************************************
+ * *
+ * Allocation and Freeing *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNewCatalogEntry:
+ * @type: type of entry
+ * @name: name of the entry
+ * @value: value of the entry
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ * @group: for members of a group, the group entry
+ *
+ * create a new Catalog entry, this type is shared both by XML and
+ * SGML catalogs, but the acceptable types values differs.
+ *
+ * Returns the xmlCatalogEntryPtr or NULL in case of error
+ */
+static xmlCatalogEntryPtr
+xmlNewCatalogEntry(xmlCatalogEntryType type, const xmlChar *name,
+ const xmlChar *value, const xmlChar *URL, xmlCatalogPrefer prefer,
+ xmlCatalogEntryPtr group) {
+ xmlCatalogEntryPtr ret;
+ xmlChar *normid = NULL;
+
+ ret = (xmlCatalogEntryPtr) xmlMalloc(sizeof(xmlCatalogEntry));
+ if (ret == NULL) {
+ xmlCatalogErrMemory("allocating catalog entry");
+ return(NULL);
+ }
+ ret->next = NULL;
+ ret->parent = NULL;
+ ret->children = NULL;
+ ret->type = type;
+ if (type == XML_CATA_PUBLIC || type == XML_CATA_DELEGATE_PUBLIC) {
+ normid = xmlCatalogNormalizePublic(name);
+ if (normid != NULL)
+ name = (*normid != 0 ? normid : NULL);
+ }
+ if (name != NULL)
+ ret->name = xmlStrdup(name);
+ else
+ ret->name = NULL;
+ if (normid != NULL)
+ xmlFree(normid);
+ if (value != NULL)
+ ret->value = xmlStrdup(value);
+ else
+ ret->value = NULL;
+ if (URL == NULL)
+ URL = value;
+ if (URL != NULL)
+ ret->URL = xmlStrdup(URL);
+ else
+ ret->URL = NULL;
+ ret->prefer = prefer;
+ ret->dealloc = 0;
+ ret->depth = 0;
+ ret->group = group;
+ return(ret);
+}
+
+static void
+xmlFreeCatalogEntryList(xmlCatalogEntryPtr ret);
+
+/**
+ * xmlFreeCatalogEntry:
+ * @ret: a Catalog entry
+ *
+ * Free the memory allocated to a Catalog entry
+ */
+static void
+xmlFreeCatalogEntry(xmlCatalogEntryPtr ret) {
+ if (ret == NULL)
+ return;
+ /*
+ * Entries stored in the file hash must be deallocated
+ * only by the file hash cleaner !
+ */
+ if (ret->dealloc == 1)
+ return;
+
+ if (xmlDebugCatalogs) {
+ if (ret->name != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Free catalog entry %s\n", ret->name);
+ else if (ret->value != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Free catalog entry %s\n", ret->value);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Free catalog entry\n");
+ }
+
+ if (ret->name != NULL)
+ xmlFree(ret->name);
+ if (ret->value != NULL)
+ xmlFree(ret->value);
+ if (ret->URL != NULL)
+ xmlFree(ret->URL);
+ xmlFree(ret);
+}
+
+/**
+ * xmlFreeCatalogEntryList:
+ * @ret: a Catalog entry list
+ *
+ * Free the memory allocated to a full chained list of Catalog entries
+ */
+static void
+xmlFreeCatalogEntryList(xmlCatalogEntryPtr ret) {
+ xmlCatalogEntryPtr next;
+
+ while (ret != NULL) {
+ next = ret->next;
+ xmlFreeCatalogEntry(ret);
+ ret = next;
+ }
+}
+
+/**
+ * xmlFreeCatalogHashEntryList:
+ * @ret: a Catalog entry list
+ *
+ * Free the memory allocated to list of Catalog entries from the
+ * catalog file hash.
+ */
+static void
+xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) {
+ xmlCatalogEntryPtr children, next;
+
+ if (catal == NULL)
+ return;
+
+ children = catal->children;
+ while (children != NULL) {
+ next = children->next;
+ children->dealloc = 0;
+ children->children = NULL;
+ xmlFreeCatalogEntry(children);
+ children = next;
+ }
+ catal->dealloc = 0;
+ xmlFreeCatalogEntry(catal);
+}
+
+/**
+ * xmlCreateNewCatalog:
+ * @type: type of catalog
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ *
+ * create a new Catalog, this type is shared both by XML and
+ * SGML catalogs, but the acceptable types values differs.
+ *
+ * Returns the xmlCatalogPtr or NULL in case of error
+ */
+static xmlCatalogPtr
+xmlCreateNewCatalog(xmlCatalogType type, xmlCatalogPrefer prefer) {
+ xmlCatalogPtr ret;
+
+ ret = (xmlCatalogPtr) xmlMalloc(sizeof(xmlCatalog));
+ if (ret == NULL) {
+ xmlCatalogErrMemory("allocating catalog");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlCatalog));
+ ret->type = type;
+ ret->catalNr = 0;
+ ret->catalMax = XML_MAX_SGML_CATA_DEPTH;
+ ret->prefer = prefer;
+ if (ret->type == XML_SGML_CATALOG_TYPE)
+ ret->sgml = xmlHashCreate(10);
+ return(ret);
+}
+
+/**
+ * xmlFreeCatalog:
+ * @catal: a Catalog
+ *
+ * Free the memory allocated to a Catalog
+ */
+void
+xmlFreeCatalog(xmlCatalogPtr catal) {
+ if (catal == NULL)
+ return;
+ if (catal->xml != NULL)
+ xmlFreeCatalogEntryList(catal->xml);
+ if (catal->sgml != NULL)
+ xmlHashFree(catal->sgml,
+ (xmlHashDeallocator) xmlFreeCatalogEntry);
+ xmlFree(catal);
+}
+
+/************************************************************************
+ * *
+ * Serializing Catalogs *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlCatalogDumpEntry:
+ * @entry: the catalog entry
+ * @out: the file.
+ *
+ * Serialize an SGML Catalog entry
+ */
+static void
+xmlCatalogDumpEntry(xmlCatalogEntryPtr entry, FILE *out) {
+ if ((entry == NULL) || (out == NULL))
+ return;
+ switch (entry->type) {
+ case SGML_CATA_ENTITY:
+ fprintf(out, "ENTITY "); break;
+ case SGML_CATA_PENTITY:
+ fprintf(out, "ENTITY %%"); break;
+ case SGML_CATA_DOCTYPE:
+ fprintf(out, "DOCTYPE "); break;
+ case SGML_CATA_LINKTYPE:
+ fprintf(out, "LINKTYPE "); break;
+ case SGML_CATA_NOTATION:
+ fprintf(out, "NOTATION "); break;
+ case SGML_CATA_PUBLIC:
+ fprintf(out, "PUBLIC "); break;
+ case SGML_CATA_SYSTEM:
+ fprintf(out, "SYSTEM "); break;
+ case SGML_CATA_DELEGATE:
+ fprintf(out, "DELEGATE "); break;
+ case SGML_CATA_BASE:
+ fprintf(out, "BASE "); break;
+ case SGML_CATA_CATALOG:
+ fprintf(out, "CATALOG "); break;
+ case SGML_CATA_DOCUMENT:
+ fprintf(out, "DOCUMENT "); break;
+ case SGML_CATA_SGMLDECL:
+ fprintf(out, "SGMLDECL "); break;
+ default:
+ return;
+ }
+ switch (entry->type) {
+ case SGML_CATA_ENTITY:
+ case SGML_CATA_PENTITY:
+ case SGML_CATA_DOCTYPE:
+ case SGML_CATA_LINKTYPE:
+ case SGML_CATA_NOTATION:
+ fprintf(out, "%s", (const char *) entry->name); break;
+ case SGML_CATA_PUBLIC:
+ case SGML_CATA_SYSTEM:
+ case SGML_CATA_SGMLDECL:
+ case SGML_CATA_DOCUMENT:
+ case SGML_CATA_CATALOG:
+ case SGML_CATA_BASE:
+ case SGML_CATA_DELEGATE:
+ fprintf(out, "\"%s\"", entry->name); break;
+ default:
+ break;
+ }
+ switch (entry->type) {
+ case SGML_CATA_ENTITY:
+ case SGML_CATA_PENTITY:
+ case SGML_CATA_DOCTYPE:
+ case SGML_CATA_LINKTYPE:
+ case SGML_CATA_NOTATION:
+ case SGML_CATA_PUBLIC:
+ case SGML_CATA_SYSTEM:
+ case SGML_CATA_DELEGATE:
+ fprintf(out, " \"%s\"", entry->value); break;
+ default:
+ break;
+ }
+ fprintf(out, "\n");
+}
+
+/**
+ * xmlDumpXMLCatalogNode:
+ * @catal: top catalog entry
+ * @catalog: pointer to the xml tree
+ * @doc: the containing document
+ * @ns: the current namespace
+ * @cgroup: group node for group members
+ *
+ * Serializes a Catalog entry, called by xmlDumpXMLCatalog and recursively
+ * for group entries
+ */
+static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
+ xmlDocPtr doc, xmlNsPtr ns, xmlCatalogEntryPtr cgroup) {
+ xmlNodePtr node;
+ xmlCatalogEntryPtr cur;
+ /*
+ * add all the catalog entries
+ */
+ cur = catal;
+ while (cur != NULL) {
+ if (cur->group == cgroup) {
+ switch (cur->type) {
+ case XML_CATA_REMOVED:
+ break;
+ case XML_CATA_BROKEN_CATALOG:
+ case XML_CATA_CATALOG:
+ if (cur == catal) {
+ cur = cur->children;
+ continue;
+ }
+ break;
+ case XML_CATA_NEXT_CATALOG:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "nextCatalog", NULL);
+ xmlSetProp(node, BAD_CAST "catalog", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_NONE:
+ break;
+ case XML_CATA_GROUP:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "group", NULL);
+ xmlSetProp(node, BAD_CAST "id", cur->name);
+ if (cur->value != NULL) {
+ xmlNsPtr xns;
+ xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE);
+ if (xns != NULL)
+ xmlSetNsProp(node, xns, BAD_CAST "base",
+ cur->value);
+ }
+ switch (cur->prefer) {
+ case XML_CATA_PREFER_NONE:
+ break;
+ case XML_CATA_PREFER_PUBLIC:
+ xmlSetProp(node, BAD_CAST "prefer", BAD_CAST "public");
+ break;
+ case XML_CATA_PREFER_SYSTEM:
+ xmlSetProp(node, BAD_CAST "prefer", BAD_CAST "system");
+ break;
+ }
+ xmlDumpXMLCatalogNode(cur->next, node, doc, ns, cur);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_PUBLIC:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "public", NULL);
+ xmlSetProp(node, BAD_CAST "publicId", cur->name);
+ xmlSetProp(node, BAD_CAST "uri", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_SYSTEM:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "system", NULL);
+ xmlSetProp(node, BAD_CAST "systemId", cur->name);
+ xmlSetProp(node, BAD_CAST "uri", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_REWRITE_SYSTEM:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteSystem", NULL);
+ xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name);
+ xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_DELEGATE_PUBLIC:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "delegatePublic", NULL);
+ xmlSetProp(node, BAD_CAST "publicIdStartString", cur->name);
+ xmlSetProp(node, BAD_CAST "catalog", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_DELEGATE_SYSTEM:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "delegateSystem", NULL);
+ xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name);
+ xmlSetProp(node, BAD_CAST "catalog", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_URI:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "uri", NULL);
+ xmlSetProp(node, BAD_CAST "name", cur->name);
+ xmlSetProp(node, BAD_CAST "uri", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_REWRITE_URI:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteURI", NULL);
+ xmlSetProp(node, BAD_CAST "uriStartString", cur->name);
+ xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case XML_CATA_DELEGATE_URI:
+ node = xmlNewDocNode(doc, ns, BAD_CAST "delegateURI", NULL);
+ xmlSetProp(node, BAD_CAST "uriStartString", cur->name);
+ xmlSetProp(node, BAD_CAST "catalog", cur->value);
+ xmlAddChild(catalog, node);
+ break;
+ case SGML_CATA_SYSTEM:
+ case SGML_CATA_PUBLIC:
+ case SGML_CATA_ENTITY:
+ case SGML_CATA_PENTITY:
+ case SGML_CATA_DOCTYPE:
+ case SGML_CATA_LINKTYPE:
+ case SGML_CATA_NOTATION:
+ case SGML_CATA_DELEGATE:
+ case SGML_CATA_BASE:
+ case SGML_CATA_CATALOG:
+ case SGML_CATA_DOCUMENT:
+ case SGML_CATA_SGMLDECL:
+ break;
+ }
+ }
+ cur = cur->next;
+ }
+}
+
+static int
+xmlDumpXMLCatalog(FILE *out, xmlCatalogEntryPtr catal) {
+ int ret;
+ xmlDocPtr doc;
+ xmlNsPtr ns;
+ xmlDtdPtr dtd;
+ xmlNodePtr catalog;
+ xmlOutputBufferPtr buf;
+
+ /*
+ * Rebuild a catalog
+ */
+ doc = xmlNewDoc(NULL);
+ if (doc == NULL)
+ return(-1);
+ dtd = xmlNewDtd(doc, BAD_CAST "catalog",
+ BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN",
+BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
+
+ xmlAddChild((xmlNodePtr) doc, (xmlNodePtr) dtd);
+
+ ns = xmlNewNs(NULL, XML_CATALOGS_NAMESPACE, NULL);
+ if (ns == NULL) {
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ catalog = xmlNewDocNode(doc, ns, BAD_CAST "catalog", NULL);
+ if (catalog == NULL) {
+ xmlFreeNs(ns);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ catalog->nsDef = ns;
+ xmlAddChild((xmlNodePtr) doc, catalog);
+
+ xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
+
+ /*
+ * reserialize it
+ */
+ buf = xmlOutputBufferCreateFile(out, NULL);
+ if (buf == NULL) {
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ ret = xmlSaveFormatFileTo(buf, doc, NULL, 1);
+
+ /*
+ * Free it
+ */
+ xmlFreeDoc(doc);
+
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Converting SGML Catalogs to XML *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogConvertEntry:
+ * @entry: the entry
+ * @catal: pointer to the catalog being converted
+ *
+ * Convert one entry from the catalog
+ */
+static void
+xmlCatalogConvertEntry(xmlCatalogEntryPtr entry, xmlCatalogPtr catal) {
+ if ((entry == NULL) || (catal == NULL) || (catal->sgml == NULL) ||
+ (catal->xml == NULL))
+ return;
+ switch (entry->type) {
+ case SGML_CATA_ENTITY:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_PENTITY:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_DOCTYPE:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_LINKTYPE:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_NOTATION:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_PUBLIC:
+ entry->type = XML_CATA_PUBLIC;
+ break;
+ case SGML_CATA_SYSTEM:
+ entry->type = XML_CATA_SYSTEM;
+ break;
+ case SGML_CATA_DELEGATE:
+ entry->type = XML_CATA_DELEGATE_PUBLIC;
+ break;
+ case SGML_CATA_CATALOG:
+ entry->type = XML_CATA_CATALOG;
+ break;
+ default:
+ xmlHashRemoveEntry(catal->sgml, entry->name,
+ (xmlHashDeallocator) xmlFreeCatalogEntry);
+ return;
+ }
+ /*
+ * Conversion successful, remove from the SGML catalog
+ * and add it to the default XML one
+ */
+ xmlHashRemoveEntry(catal->sgml, entry->name, NULL);
+ entry->parent = catal->xml;
+ entry->next = NULL;
+ if (catal->xml->children == NULL)
+ catal->xml->children = entry;
+ else {
+ xmlCatalogEntryPtr prev;
+
+ prev = catal->xml->children;
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = entry;
+ }
+}
+
+/**
+ * xmlConvertSGMLCatalog:
+ * @catal: the catalog
+ *
+ * Convert all the SGML catalog entries as XML ones
+ *
+ * Returns the number of entries converted if successful, -1 otherwise
+ */
+int
+xmlConvertSGMLCatalog(xmlCatalogPtr catal) {
+
+ if ((catal == NULL) || (catal->type != XML_SGML_CATALOG_TYPE))
+ return(-1);
+
+ if (xmlDebugCatalogs) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Converting SGML catalog to XML\n");
+ }
+ xmlHashScan(catal->sgml,
+ (xmlHashScanner) xmlCatalogConvertEntry,
+ &catal);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Helper function *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogUnWrapURN:
+ * @urn: an "urn:publicid:" to unwrap
+ *
+ * Expand the URN into the equivalent Public Identifier
+ *
+ * Returns the new identifier or NULL, the string must be deallocated
+ * by the caller.
+ */
+static xmlChar *
+xmlCatalogUnWrapURN(const xmlChar *urn) {
+ xmlChar result[2000];
+ unsigned int i = 0;
+
+ if (xmlStrncmp(urn, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1))
+ return(NULL);
+ urn += sizeof(XML_URN_PUBID) - 1;
+
+ while (*urn != 0) {
+ if (i > sizeof(result) - 4)
+ break;
+ if (*urn == '+') {
+ result[i++] = ' ';
+ urn++;
+ } else if (*urn == ':') {
+ result[i++] = '/';
+ result[i++] = '/';
+ urn++;
+ } else if (*urn == ';') {
+ result[i++] = ':';
+ result[i++] = ':';
+ urn++;
+ } else if (*urn == '%') {
+ if ((urn[1] == '2') && (urn[2] == 'B'))
+ result[i++] = '+';
+ else if ((urn[1] == '3') && (urn[2] == 'A'))
+ result[i++] = ':';
+ else if ((urn[1] == '2') && (urn[2] == 'F'))
+ result[i++] = '/';
+ else if ((urn[1] == '3') && (urn[2] == 'B'))
+ result[i++] = ';';
+ else if ((urn[1] == '2') && (urn[2] == '7'))
+ result[i++] = '\'';
+ else if ((urn[1] == '3') && (urn[2] == 'F'))
+ result[i++] = '?';
+ else if ((urn[1] == '2') && (urn[2] == '3'))
+ result[i++] = '#';
+ else if ((urn[1] == '2') && (urn[2] == '5'))
+ result[i++] = '%';
+ else {
+ result[i++] = *urn;
+ urn++;
+ continue;
+ }
+ urn += 3;
+ } else {
+ result[i++] = *urn;
+ urn++;
+ }
+ }
+ result[i] = 0;
+
+ return(xmlStrdup(result));
+}
+
+/**
+ * xmlParseCatalogFile:
+ * @filename: the filename
+ *
+ * parse an XML file and build a tree. It's like xmlParseFile()
+ * except it bypass all catalog lookups.
+ *
+ * Returns the resulting document tree or NULL in case of error
+ */
+
+xmlDocPtr
+xmlParseCatalogFile(const char *filename) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr ctxt;
+ char *directory = NULL;
+ xmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+#ifdef LIBXML_SAX1_ENABLED
+ if (xmlDefaultSAXHandler.error != NULL) {
+ xmlDefaultSAXHandler.error(NULL, "out of memory\n");
+ }
+#endif
+ return(NULL);
+ }
+
+ buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputStream = xmlNewInputStream(ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
+ inputStream->buf = buf;
+ xmlBufResetInput(buf->buffer, inputStream);
+
+ inputPush(ctxt, inputStream);
+ if ((ctxt->directory == NULL) && (directory == NULL))
+ directory = xmlParserGetDirectory(filename);
+ if ((ctxt->directory == NULL) && (directory != NULL))
+ ctxt->directory = directory;
+ ctxt->valid = 0;
+ ctxt->validate = 0;
+ ctxt->loadsubset = 0;
+ ctxt->pedantic = 0;
+ ctxt->dictNames = 1;
+
+ xmlParseDocument(ctxt);
+
+ if (ctxt->wellFormed)
+ ret = ctxt->myDoc;
+ else {
+ ret = NULL;
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlLoadFileContent:
+ * @filename: a file path
+ *
+ * Load a file content into memory.
+ *
+ * Returns a pointer to the 0 terminated string or NULL in case of error
+ */
+static xmlChar *
+xmlLoadFileContent(const char *filename)
+{
+#ifdef HAVE_STAT
+ int fd;
+#else
+ FILE *fd;
+#endif
+ int len;
+ long size;
+
+#ifdef HAVE_STAT
+ struct stat info;
+#endif
+ xmlChar *content;
+
+ if (filename == NULL)
+ return (NULL);
+
+#ifdef HAVE_STAT
+ if (stat(filename, &info) < 0)
+ return (NULL);
+#endif
+
+#ifdef HAVE_STAT
+ if ((fd = open(filename, O_RDONLY)) < 0)
+#else
+ if ((fd = fopen(filename, "rb")) == NULL)
+#endif
+ {
+ return (NULL);
+ }
+#ifdef HAVE_STAT
+ size = info.st_size;
+#else
+ if (fseek(fd, 0, SEEK_END) || (size = ftell(fd)) == EOF || fseek(fd, 0, SEEK_SET)) { /* File operations denied? ok, just close and return failure */
+ fclose(fd);
+ return (NULL);
+ }
+#endif
+ content = (xmlChar*)xmlMallocAtomic(size + 10);
+ if (content == NULL) {
+ xmlCatalogErrMemory("allocating catalog data");
+#ifdef HAVE_STAT
+ close(fd);
+#else
+ fclose(fd);
+#endif
+ return (NULL);
+ }
+#ifdef HAVE_STAT
+ len = read(fd, content, size);
+ close(fd);
+#else
+ len = fread(content, 1, size, fd);
+ fclose(fd);
+#endif
+ if (len < 0) {
+ xmlFree(content);
+ return (NULL);
+ }
+ content[len] = 0;
+
+ return(content);
+}
+
+/**
+ * xmlCatalogNormalizePublic:
+ * @pubID: the public ID string
+ *
+ * Normalizes the Public Identifier
+ *
+ * Implements 6.2. Public Identifier Normalization
+ * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Returns the new string or NULL, the string must be deallocated
+ * by the caller.
+ */
+static xmlChar *
+xmlCatalogNormalizePublic(const xmlChar *pubID)
+{
+ int ok = 1;
+ int white;
+ const xmlChar *p;
+ xmlChar *ret;
+ xmlChar *q;
+
+ if (pubID == NULL)
+ return(NULL);
+
+ white = 1;
+ for (p = pubID;*p != 0 && ok;p++) {
+ if (!xmlIsBlank_ch(*p))
+ white = 0;
+ else if (*p == 0x20 && !white)
+ white = 1;
+ else
+ ok = 0;
+ }
+ if (ok && !white) /* is normalized */
+ return(NULL);
+
+ ret = xmlStrdup(pubID);
+ q = ret;
+ white = 0;
+ for (p = pubID;*p != 0;p++) {
+ if (xmlIsBlank_ch(*p)) {
+ if (q != ret)
+ white = 1;
+ } else {
+ if (white) {
+ *(q++) = 0x20;
+ white = 0;
+ }
+ *(q++) = *p;
+ }
+ }
+ *q = 0;
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The XML Catalog parser *
+ * *
+ ************************************************************************/
+
+static xmlCatalogEntryPtr
+xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename);
+static void
+xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer,
+ xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup);
+static xmlChar *
+xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
+ const xmlChar *sysID);
+static xmlChar *
+xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI);
+
+
+/**
+ * xmlGetXMLCatalogEntryType:
+ * @name: the name
+ *
+ * lookup the internal type associated to an XML catalog entry name
+ *
+ * Returns the type associated with that name
+ */
+static xmlCatalogEntryType
+xmlGetXMLCatalogEntryType(const xmlChar *name) {
+ xmlCatalogEntryType type = XML_CATA_NONE;
+ if (xmlStrEqual(name, (const xmlChar *) "system"))
+ type = XML_CATA_SYSTEM;
+ else if (xmlStrEqual(name, (const xmlChar *) "public"))
+ type = XML_CATA_PUBLIC;
+ else if (xmlStrEqual(name, (const xmlChar *) "rewriteSystem"))
+ type = XML_CATA_REWRITE_SYSTEM;
+ else if (xmlStrEqual(name, (const xmlChar *) "delegatePublic"))
+ type = XML_CATA_DELEGATE_PUBLIC;
+ else if (xmlStrEqual(name, (const xmlChar *) "delegateSystem"))
+ type = XML_CATA_DELEGATE_SYSTEM;
+ else if (xmlStrEqual(name, (const xmlChar *) "uri"))
+ type = XML_CATA_URI;
+ else if (xmlStrEqual(name, (const xmlChar *) "rewriteURI"))
+ type = XML_CATA_REWRITE_URI;
+ else if (xmlStrEqual(name, (const xmlChar *) "delegateURI"))
+ type = XML_CATA_DELEGATE_URI;
+ else if (xmlStrEqual(name, (const xmlChar *) "nextCatalog"))
+ type = XML_CATA_NEXT_CATALOG;
+ else if (xmlStrEqual(name, (const xmlChar *) "catalog"))
+ type = XML_CATA_CATALOG;
+ return(type);
+}
+
+/**
+ * xmlParseXMLCatalogOneNode:
+ * @cur: the XML node
+ * @type: the type of Catalog entry
+ * @name: the name of the node
+ * @attrName: the attribute holding the value
+ * @uriAttrName: the attribute holding the URI-Reference
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ * @cgroup: the group which includes this node
+ *
+ * Finishes the examination of an XML tree node of a catalog and build
+ * a Catalog entry from it.
+ *
+ * Returns the new Catalog entry node or NULL in case of error.
+ */
+static xmlCatalogEntryPtr
+xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type,
+ const xmlChar *name, const xmlChar *attrName,
+ const xmlChar *uriAttrName, xmlCatalogPrefer prefer,
+ xmlCatalogEntryPtr cgroup) {
+ int ok = 1;
+ xmlChar *uriValue;
+ xmlChar *nameValue = NULL;
+ xmlChar *base = NULL;
+ xmlChar *URL = NULL;
+ xmlCatalogEntryPtr ret = NULL;
+
+ if (attrName != NULL) {
+ nameValue = xmlGetProp(cur, attrName);
+ if (nameValue == NULL) {
+ xmlCatalogErr(ret, cur, XML_CATALOG_MISSING_ATTR,
+ "%s entry lacks '%s'\n", name, attrName, NULL);
+ ok = 0;
+ }
+ }
+ uriValue = xmlGetProp(cur, uriAttrName);
+ if (uriValue == NULL) {
+ xmlCatalogErr(ret, cur, XML_CATALOG_MISSING_ATTR,
+ "%s entry lacks '%s'\n", name, uriAttrName, NULL);
+ ok = 0;
+ }
+ if (!ok) {
+ if (nameValue != NULL)
+ xmlFree(nameValue);
+ if (uriValue != NULL)
+ xmlFree(uriValue);
+ return(NULL);
+ }
+
+ base = xmlNodeGetBase(cur->doc, cur);
+ URL = xmlBuildURI(uriValue, base);
+ if (URL != NULL) {
+ if (xmlDebugCatalogs > 1) {
+ if (nameValue != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Found %s: '%s' '%s'\n", name, nameValue, URL);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Found %s: '%s'\n", name, URL);
+ }
+ ret = xmlNewCatalogEntry(type, nameValue, uriValue, URL, prefer, cgroup);
+ } else {
+ xmlCatalogErr(ret, cur, XML_CATALOG_ENTRY_BROKEN,
+ "%s entry '%s' broken ?: %s\n", name, uriAttrName, uriValue);
+ }
+ if (nameValue != NULL)
+ xmlFree(nameValue);
+ if (uriValue != NULL)
+ xmlFree(uriValue);
+ if (base != NULL)
+ xmlFree(base);
+ if (URL != NULL)
+ xmlFree(URL);
+ return(ret);
+}
+
+/**
+ * xmlParseXMLCatalogNode:
+ * @cur: the XML node
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ * @parent: the parent Catalog entry
+ * @cgroup: the group which includes this node
+ *
+ * Examines an XML tree node of a catalog and build
+ * a Catalog entry from it adding it to its parent. The examination can
+ * be recursive.
+ */
+static void
+xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer,
+ xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup)
+{
+ xmlChar *base = NULL;
+ xmlCatalogEntryPtr entry = NULL;
+
+ if (cur == NULL)
+ return;
+ if (xmlStrEqual(cur->name, BAD_CAST "group")) {
+ xmlChar *prop;
+ xmlCatalogPrefer pref = XML_CATA_PREFER_NONE;
+
+ prop = xmlGetProp(cur, BAD_CAST "prefer");
+ if (prop != NULL) {
+ if (xmlStrEqual(prop, BAD_CAST "system")) {
+ prefer = XML_CATA_PREFER_SYSTEM;
+ } else if (xmlStrEqual(prop, BAD_CAST "public")) {
+ prefer = XML_CATA_PREFER_PUBLIC;
+ } else {
+ xmlCatalogErr(parent, cur, XML_CATALOG_PREFER_VALUE,
+ "Invalid value for prefer: '%s'\n",
+ prop, NULL, NULL);
+ }
+ xmlFree(prop);
+ pref = prefer;
+ }
+ prop = xmlGetProp(cur, BAD_CAST "id");
+ base = xmlGetNsProp(cur, BAD_CAST "base", XML_XML_NAMESPACE);
+ entry = xmlNewCatalogEntry(XML_CATA_GROUP, prop, base, NULL, pref, cgroup);
+ xmlFree(prop);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "public")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_PUBLIC,
+ BAD_CAST "public", BAD_CAST "publicId", BAD_CAST "uri", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "system")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_SYSTEM,
+ BAD_CAST "system", BAD_CAST "systemId", BAD_CAST "uri", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteSystem")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_SYSTEM,
+ BAD_CAST "rewriteSystem", BAD_CAST "systemIdStartString",
+ BAD_CAST "rewritePrefix", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "delegatePublic")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_PUBLIC,
+ BAD_CAST "delegatePublic", BAD_CAST "publicIdStartString",
+ BAD_CAST "catalog", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "delegateSystem")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_SYSTEM,
+ BAD_CAST "delegateSystem", BAD_CAST "systemIdStartString",
+ BAD_CAST "catalog", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "uri")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_URI,
+ BAD_CAST "uri", BAD_CAST "name",
+ BAD_CAST "uri", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteURI")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_URI,
+ BAD_CAST "rewriteURI", BAD_CAST "uriStartString",
+ BAD_CAST "rewritePrefix", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "delegateURI")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_URI,
+ BAD_CAST "delegateURI", BAD_CAST "uriStartString",
+ BAD_CAST "catalog", prefer, cgroup);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "nextCatalog")) {
+ entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_NEXT_CATALOG,
+ BAD_CAST "nextCatalog", NULL,
+ BAD_CAST "catalog", prefer, cgroup);
+ }
+ if (entry != NULL) {
+ if (parent != NULL) {
+ entry->parent = parent;
+ if (parent->children == NULL)
+ parent->children = entry;
+ else {
+ xmlCatalogEntryPtr prev;
+
+ prev = parent->children;
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = entry;
+ }
+ }
+ if (entry->type == XML_CATA_GROUP) {
+ /*
+ * Recurse to propagate prefer to the subtree
+ * (xml:base handling is automated)
+ */
+ xmlParseXMLCatalogNodeList(cur->children, prefer, parent, entry);
+ }
+ }
+ if (base != NULL)
+ xmlFree(base);
+}
+
+/**
+ * xmlParseXMLCatalogNodeList:
+ * @cur: the XML node list of siblings
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ * @parent: the parent Catalog entry
+ * @cgroup: the group which includes this list
+ *
+ * Examines a list of XML sibling nodes of a catalog and build
+ * a list of Catalog entry from it adding it to the parent.
+ * The examination will recurse to examine node subtrees.
+ */
+static void
+xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer,
+ xmlCatalogEntryPtr parent, xmlCatalogEntryPtr cgroup) {
+ while (cur != NULL) {
+ if ((cur->ns != NULL) && (cur->ns->href != NULL) &&
+ (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) {
+ xmlParseXMLCatalogNode(cur, prefer, parent, cgroup);
+ }
+ cur = cur->next;
+ }
+ /* TODO: sort the list according to REWRITE lengths and prefer value */
+}
+
+/**
+ * xmlParseXMLCatalogFile:
+ * @prefer: the PUBLIC vs. SYSTEM current preference value
+ * @filename: the filename for the catalog
+ *
+ * Parses the catalog file to extract the XML tree and then analyze the
+ * tree to build a list of Catalog entries corresponding to this catalog
+ *
+ * Returns the resulting Catalog entries list
+ */
+static xmlCatalogEntryPtr
+xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) {
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ xmlChar *prop;
+ xmlCatalogEntryPtr parent = NULL;
+
+ if (filename == NULL)
+ return(NULL);
+
+ doc = xmlParseCatalogFile((const char *) filename);
+ if (doc == NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to parse catalog %s\n", filename);
+ return(NULL);
+ }
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "%d Parsing catalog %s\n", xmlGetThreadId(), filename);
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur != NULL) && (xmlStrEqual(cur->name, BAD_CAST "catalog")) &&
+ (cur->ns != NULL) && (cur->ns->href != NULL) &&
+ (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) {
+
+ parent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
+ (const xmlChar *)filename, NULL, prefer, NULL);
+ if (parent == NULL) {
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ prop = xmlGetProp(cur, BAD_CAST "prefer");
+ if (prop != NULL) {
+ if (xmlStrEqual(prop, BAD_CAST "system")) {
+ prefer = XML_CATA_PREFER_SYSTEM;
+ } else if (xmlStrEqual(prop, BAD_CAST "public")) {
+ prefer = XML_CATA_PREFER_PUBLIC;
+ } else {
+ xmlCatalogErr(NULL, cur, XML_CATALOG_PREFER_VALUE,
+ "Invalid value for prefer: '%s'\n",
+ prop, NULL, NULL);
+ }
+ xmlFree(prop);
+ }
+ cur = cur->children;
+ xmlParseXMLCatalogNodeList(cur, prefer, parent, NULL);
+ } else {
+ xmlCatalogErr(NULL, (xmlNodePtr) doc, XML_CATALOG_NOT_CATALOG,
+ "File %s is not an XML Catalog\n",
+ filename, NULL, NULL);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ xmlFreeDoc(doc);
+ return(parent);
+}
+
+/**
+ * xmlFetchXMLCatalogFile:
+ * @catal: an existing but incomplete catalog entry
+ *
+ * Fetch and parse the subcatalog referenced by an entry
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+static int
+xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) {
+ xmlCatalogEntryPtr doc;
+
+ if (catal == NULL)
+ return(-1);
+ if (catal->URL == NULL)
+ return(-1);
+
+ /*
+ * lock the whole catalog for modification
+ */
+ xmlRMutexLock(xmlCatalogMutex);
+ if (catal->children != NULL) {
+ /* Okay someone else did it in the meantime */
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(0);
+ }
+
+ if (xmlCatalogXMLFiles != NULL) {
+ doc = (xmlCatalogEntryPtr)
+ xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
+ if (doc != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Found %s in file hash\n", catal->URL);
+
+ if (catal->type == XML_CATA_CATALOG)
+ catal->children = doc->children;
+ else
+ catal->children = doc;
+ catal->dealloc = 0;
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(0);
+ }
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "%s not found in file hash\n", catal->URL);
+ }
+
+ /*
+ * Fetch and parse. Note that xmlParseXMLCatalogFile does not
+ * use the existing catalog, there is no recursion allowed at
+ * that level.
+ */
+ doc = xmlParseXMLCatalogFile(catal->prefer, catal->URL);
+ if (doc == NULL) {
+ catal->type = XML_CATA_BROKEN_CATALOG;
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(-1);
+ }
+
+ if (catal->type == XML_CATA_CATALOG)
+ catal->children = doc->children;
+ else
+ catal->children = doc;
+
+ doc->dealloc = 1;
+
+ if (xmlCatalogXMLFiles == NULL)
+ xmlCatalogXMLFiles = xmlHashCreate(10);
+ if (xmlCatalogXMLFiles != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "%s added to file hash\n", catal->URL);
+ xmlHashAddEntry(xmlCatalogXMLFiles, catal->URL, doc);
+ }
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * XML Catalog handling *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlAddXMLCatalog:
+ * @catal: top of an XML catalog
+ * @type: the type of record to add to the catalog
+ * @orig: the system, public or prefix to match (or NULL)
+ * @replace: the replacement value for the match
+ *
+ * Add an entry in the XML catalog, it may overwrite existing but
+ * different entries.
+ *
+ * Returns 0 if successful, -1 otherwise
+ */
+static int
+xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
+ const xmlChar *orig, const xmlChar *replace) {
+ xmlCatalogEntryPtr cur;
+ xmlCatalogEntryType typ;
+ int doregister = 0;
+
+ if ((catal == NULL) ||
+ ((catal->type != XML_CATA_CATALOG) &&
+ (catal->type != XML_CATA_BROKEN_CATALOG)))
+ return(-1);
+ if (catal->children == NULL) {
+ xmlFetchXMLCatalogFile(catal);
+ }
+ if (catal->children == NULL)
+ doregister = 1;
+
+ typ = xmlGetXMLCatalogEntryType(type);
+ if (typ == XML_CATA_NONE) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to add unknown element %s to catalog\n", type);
+ return(-1);
+ }
+
+ cur = catal->children;
+ /*
+ * Might be a simple "update in place"
+ */
+ if (cur != NULL) {
+ while (cur != NULL) {
+ if ((orig != NULL) && (cur->type == typ) &&
+ (xmlStrEqual(orig, cur->name))) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Updating element %s to catalog\n", type);
+ if (cur->value != NULL)
+ xmlFree(cur->value);
+ if (cur->URL != NULL)
+ xmlFree(cur->URL);
+ cur->value = xmlStrdup(replace);
+ cur->URL = xmlStrdup(replace);
+ return(0);
+ }
+ if (cur->next == NULL)
+ break;
+ cur = cur->next;
+ }
+ }
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Adding element %s to catalog\n", type);
+ if (cur == NULL)
+ catal->children = xmlNewCatalogEntry(typ, orig, replace,
+ NULL, catal->prefer, NULL);
+ else
+ cur->next = xmlNewCatalogEntry(typ, orig, replace,
+ NULL, catal->prefer, NULL);
+ if (doregister) {
+ catal->type = XML_CATA_CATALOG;
+ cur = (xmlCatalogEntryPtr)xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
+ if (cur != NULL)
+ cur->children = catal->children;
+ }
+
+ return(0);
+}
+
+/**
+ * xmlDelXMLCatalog:
+ * @catal: top of an XML catalog
+ * @value: the value to remove from the catalog
+ *
+ * Remove entries in the XML catalog where the value or the URI
+ * is equal to @value
+ *
+ * Returns the number of entries removed if successful, -1 otherwise
+ */
+static int
+xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) {
+ xmlCatalogEntryPtr cur;
+ int ret = 0;
+
+ if ((catal == NULL) ||
+ ((catal->type != XML_CATA_CATALOG) &&
+ (catal->type != XML_CATA_BROKEN_CATALOG)))
+ return(-1);
+ if (value == NULL)
+ return(-1);
+ if (catal->children == NULL) {
+ xmlFetchXMLCatalogFile(catal);
+ }
+
+ /*
+ * Scan the children
+ */
+ cur = catal->children;
+ while (cur != NULL) {
+ if (((cur->name != NULL) && (xmlStrEqual(value, cur->name))) ||
+ (xmlStrEqual(value, cur->value))) {
+ if (xmlDebugCatalogs) {
+ if (cur->name != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Removing element %s from catalog\n", cur->name);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Removing element %s from catalog\n", cur->value);
+ }
+ cur->type = XML_CATA_REMOVED;
+ }
+ cur = cur->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlCatalogXMLResolve:
+ * @catal: a catalog list
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier for a
+ * list of catalog entries.
+ *
+ * Implements (or tries to) 7.1. External Identifier Resolution
+ * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Returns the URI of the resource or NULL if not found
+ */
+static xmlChar *
+xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
+ const xmlChar *sysID) {
+ xmlChar *ret = NULL;
+ xmlCatalogEntryPtr cur;
+ int haveDelegate = 0;
+ int haveNext = 0;
+
+ /*
+ * protection against loops
+ */
+ if (catal->depth > MAX_CATAL_DEPTH) {
+ xmlCatalogErr(catal, NULL, XML_CATALOG_RECURSION,
+ "Detected recursion in catalog %s\n",
+ catal->name, NULL, NULL);
+ return(NULL);
+ }
+ catal->depth++;
+
+ /*
+ * First tries steps 2/ 3/ 4/ if a system ID is provided.
+ */
+ if (sysID != NULL) {
+ xmlCatalogEntryPtr rewrite = NULL;
+ int lenrewrite = 0, len;
+ cur = catal;
+ haveDelegate = 0;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_CATA_SYSTEM:
+ if (xmlStrEqual(sysID, cur->name)) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Found system match %s, using %s\n",
+ cur->name, cur->URL);
+ catal->depth--;
+ return(xmlStrdup(cur->URL));
+ }
+ break;
+ case XML_CATA_REWRITE_SYSTEM:
+ len = xmlStrlen(cur->name);
+ if ((len > lenrewrite) &&
+ (!xmlStrncmp(sysID, cur->name, len))) {
+ lenrewrite = len;
+ rewrite = cur;
+ }
+ break;
+ case XML_CATA_DELEGATE_SYSTEM:
+ if (!xmlStrncmp(sysID, cur->name, xmlStrlen(cur->name)))
+ haveDelegate++;
+ break;
+ case XML_CATA_NEXT_CATALOG:
+ haveNext++;
+ break;
+ default:
+ break;
+ }
+ cur = cur->next;
+ }
+ if (rewrite != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Using rewriting rule %s\n", rewrite->name);
+ ret = xmlStrdup(rewrite->URL);
+ if (ret != NULL)
+ ret = xmlStrcat(ret, &sysID[lenrewrite]);
+ catal->depth--;
+ return(ret);
+ }
+ if (haveDelegate) {
+ const xmlChar *delegates[MAX_DELEGATE];
+ int nbList = 0, i;
+
+ /*
+ * Assume the entries have been sorted by decreasing substring
+ * matches when the list was produced.
+ */
+ cur = catal;
+ while (cur != NULL) {
+ if ((cur->type == XML_CATA_DELEGATE_SYSTEM) &&
+ (!xmlStrncmp(sysID, cur->name, xmlStrlen(cur->name)))) {
+ for (i = 0;i < nbList;i++)
+ if (xmlStrEqual(cur->URL, delegates[i]))
+ break;
+ if (i < nbList) {
+ cur = cur->next;
+ continue;
+ }
+ if (nbList < MAX_DELEGATE)
+ delegates[nbList++] = cur->URL;
+
+ if (cur->children == NULL) {
+ xmlFetchXMLCatalogFile(cur);
+ }
+ if (cur->children != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Trying system delegate %s\n", cur->URL);
+ ret = xmlCatalogListXMLResolve(
+ cur->children, NULL, sysID);
+ if (ret != NULL) {
+ catal->depth--;
+ return(ret);
+ }
+ }
+ }
+ cur = cur->next;
+ }
+ /*
+ * Apply the cut algorithm explained in 4/
+ */
+ catal->depth--;
+ return(XML_CATAL_BREAK);
+ }
+ }
+ /*
+ * Then tries 5/ 6/ if a public ID is provided
+ */
+ if (pubID != NULL) {
+ cur = catal;
+ haveDelegate = 0;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_CATA_PUBLIC:
+ if (xmlStrEqual(pubID, cur->name)) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Found public match %s\n", cur->name);
+ catal->depth--;
+ return(xmlStrdup(cur->URL));
+ }
+ break;
+ case XML_CATA_DELEGATE_PUBLIC:
+ if (!xmlStrncmp(pubID, cur->name, xmlStrlen(cur->name)) &&
+ (cur->prefer == XML_CATA_PREFER_PUBLIC))
+ haveDelegate++;
+ break;
+ case XML_CATA_NEXT_CATALOG:
+ if (sysID == NULL)
+ haveNext++;
+ break;
+ default:
+ break;
+ }
+ cur = cur->next;
+ }
+ if (haveDelegate) {
+ const xmlChar *delegates[MAX_DELEGATE];
+ int nbList = 0, i;
+
+ /*
+ * Assume the entries have been sorted by decreasing substring
+ * matches when the list was produced.
+ */
+ cur = catal;
+ while (cur != NULL) {
+ if ((cur->type == XML_CATA_DELEGATE_PUBLIC) &&
+ (cur->prefer == XML_CATA_PREFER_PUBLIC) &&
+ (!xmlStrncmp(pubID, cur->name, xmlStrlen(cur->name)))) {
+
+ for (i = 0;i < nbList;i++)
+ if (xmlStrEqual(cur->URL, delegates[i]))
+ break;
+ if (i < nbList) {
+ cur = cur->next;
+ continue;
+ }
+ if (nbList < MAX_DELEGATE)
+ delegates[nbList++] = cur->URL;
+
+ if (cur->children == NULL) {
+ xmlFetchXMLCatalogFile(cur);
+ }
+ if (cur->children != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Trying public delegate %s\n", cur->URL);
+ ret = xmlCatalogListXMLResolve(
+ cur->children, pubID, NULL);
+ if (ret != NULL) {
+ catal->depth--;
+ return(ret);
+ }
+ }
+ }
+ cur = cur->next;
+ }
+ /*
+ * Apply the cut algorithm explained in 4/
+ */
+ catal->depth--;
+ return(XML_CATAL_BREAK);
+ }
+ }
+ if (haveNext) {
+ cur = catal;
+ while (cur != NULL) {
+ if (cur->type == XML_CATA_NEXT_CATALOG) {
+ if (cur->children == NULL) {
+ xmlFetchXMLCatalogFile(cur);
+ }
+ if (cur->children != NULL) {
+ ret = xmlCatalogListXMLResolve(cur->children, pubID, sysID);
+ if (ret != NULL) {
+ catal->depth--;
+ return(ret);
+ } else if (catal->depth > MAX_CATAL_DEPTH) {
+ return(NULL);
+ }
+ }
+ }
+ cur = cur->next;
+ }
+ }
+
+ catal->depth--;
+ return(NULL);
+}
+
+/**
+ * xmlCatalogXMLResolveURI:
+ * @catal: a catalog list
+ * @URI: the URI
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier for a
+ * list of catalog entries.
+ *
+ * Implements (or tries to) 7.2.2. URI Resolution
+ * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Returns the URI of the resource or NULL if not found
+ */
+static xmlChar *
+xmlCatalogXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
+ xmlChar *ret = NULL;
+ xmlCatalogEntryPtr cur;
+ int haveDelegate = 0;
+ int haveNext = 0;
+ xmlCatalogEntryPtr rewrite = NULL;
+ int lenrewrite = 0, len;
+
+ if (catal == NULL)
+ return(NULL);
+
+ if (URI == NULL)
+ return(NULL);
+
+ if (catal->depth > MAX_CATAL_DEPTH) {
+ xmlCatalogErr(catal, NULL, XML_CATALOG_RECURSION,
+ "Detected recursion in catalog %s\n",
+ catal->name, NULL, NULL);
+ return(NULL);
+ }
+
+ /*
+ * First tries steps 2/ 3/ 4/ if a system ID is provided.
+ */
+ cur = catal;
+ haveDelegate = 0;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_CATA_URI:
+ if (xmlStrEqual(URI, cur->name)) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Found URI match %s\n", cur->name);
+ return(xmlStrdup(cur->URL));
+ }
+ break;
+ case XML_CATA_REWRITE_URI:
+ len = xmlStrlen(cur->name);
+ if ((len > lenrewrite) &&
+ (!xmlStrncmp(URI, cur->name, len))) {
+ lenrewrite = len;
+ rewrite = cur;
+ }
+ break;
+ case XML_CATA_DELEGATE_URI:
+ if (!xmlStrncmp(URI, cur->name, xmlStrlen(cur->name)))
+ haveDelegate++;
+ break;
+ case XML_CATA_NEXT_CATALOG:
+ haveNext++;
+ break;
+ default:
+ break;
+ }
+ cur = cur->next;
+ }
+ if (rewrite != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Using rewriting rule %s\n", rewrite->name);
+ ret = xmlStrdup(rewrite->URL);
+ if (ret != NULL)
+ ret = xmlStrcat(ret, &URI[lenrewrite]);
+ return(ret);
+ }
+ if (haveDelegate) {
+ const xmlChar *delegates[MAX_DELEGATE];
+ int nbList = 0, i;
+
+ /*
+ * Assume the entries have been sorted by decreasing substring
+ * matches when the list was produced.
+ */
+ cur = catal;
+ while (cur != NULL) {
+ if (((cur->type == XML_CATA_DELEGATE_SYSTEM) ||
+ (cur->type == XML_CATA_DELEGATE_URI)) &&
+ (!xmlStrncmp(URI, cur->name, xmlStrlen(cur->name)))) {
+ for (i = 0;i < nbList;i++)
+ if (xmlStrEqual(cur->URL, delegates[i]))
+ break;
+ if (i < nbList) {
+ cur = cur->next;
+ continue;
+ }
+ if (nbList < MAX_DELEGATE)
+ delegates[nbList++] = cur->URL;
+
+ if (cur->children == NULL) {
+ xmlFetchXMLCatalogFile(cur);
+ }
+ if (cur->children != NULL) {
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Trying URI delegate %s\n", cur->URL);
+ ret = xmlCatalogListXMLResolveURI(
+ cur->children, URI);
+ if (ret != NULL)
+ return(ret);
+ }
+ }
+ cur = cur->next;
+ }
+ /*
+ * Apply the cut algorithm explained in 4/
+ */
+ return(XML_CATAL_BREAK);
+ }
+ if (haveNext) {
+ cur = catal;
+ while (cur != NULL) {
+ if (cur->type == XML_CATA_NEXT_CATALOG) {
+ if (cur->children == NULL) {
+ xmlFetchXMLCatalogFile(cur);
+ }
+ if (cur->children != NULL) {
+ ret = xmlCatalogListXMLResolveURI(cur->children, URI);
+ if (ret != NULL)
+ return(ret);
+ }
+ }
+ cur = cur->next;
+ }
+ }
+
+ return(NULL);
+}
+
+/**
+ * xmlCatalogListXMLResolve:
+ * @catal: a catalog list
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier for a
+ * list of catalogs
+ *
+ * Implements (or tries to) 7.1. External Identifier Resolution
+ * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Returns the URI of the resource or NULL if not found
+ */
+static xmlChar *
+xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
+ const xmlChar *sysID) {
+ xmlChar *ret = NULL;
+ xmlChar *urnID = NULL;
+ xmlChar *normid;
+
+ if (catal == NULL)
+ return(NULL);
+ if ((pubID == NULL) && (sysID == NULL))
+ return(NULL);
+
+ normid = xmlCatalogNormalizePublic(pubID);
+ if (normid != NULL)
+ pubID = (*normid != 0 ? normid : NULL);
+
+ if (!xmlStrncmp(pubID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
+ urnID = xmlCatalogUnWrapURN(pubID);
+ if (xmlDebugCatalogs) {
+ if (urnID == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Public URN ID %s expanded to NULL\n", pubID);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Public URN ID expanded to %s\n", urnID);
+ }
+ ret = xmlCatalogListXMLResolve(catal, urnID, sysID);
+ if (urnID != NULL)
+ xmlFree(urnID);
+ if (normid != NULL)
+ xmlFree(normid);
+ return(ret);
+ }
+ if (!xmlStrncmp(sysID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
+ urnID = xmlCatalogUnWrapURN(sysID);
+ if (xmlDebugCatalogs) {
+ if (urnID == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "System URN ID %s expanded to NULL\n", sysID);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "System URN ID expanded to %s\n", urnID);
+ }
+ if (pubID == NULL)
+ ret = xmlCatalogListXMLResolve(catal, urnID, NULL);
+ else if (xmlStrEqual(pubID, urnID))
+ ret = xmlCatalogListXMLResolve(catal, pubID, NULL);
+ else {
+ ret = xmlCatalogListXMLResolve(catal, pubID, urnID);
+ }
+ if (urnID != NULL)
+ xmlFree(urnID);
+ if (normid != NULL)
+ xmlFree(normid);
+ return(ret);
+ }
+ while (catal != NULL) {
+ if (catal->type == XML_CATA_CATALOG) {
+ if (catal->children == NULL) {
+ xmlFetchXMLCatalogFile(catal);
+ }
+ if (catal->children != NULL) {
+ ret = xmlCatalogXMLResolve(catal->children, pubID, sysID);
+ if (ret != NULL) {
+ break;
+ } else if ((catal->children != NULL) &&
+ (catal->children->depth > MAX_CATAL_DEPTH)) {
+ ret = NULL;
+ break;
+ }
+ }
+ }
+ catal = catal->next;
+ }
+ if (normid != NULL)
+ xmlFree(normid);
+ return(ret);
+}
+
+/**
+ * xmlCatalogListXMLResolveURI:
+ * @catal: a catalog list
+ * @URI: the URI
+ *
+ * Do a complete resolution lookup of an URI for a list of catalogs
+ *
+ * Implements (or tries to) 7.2. URI Resolution
+ * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Returns the URI of the resource or NULL if not found
+ */
+static xmlChar *
+xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
+ xmlChar *ret = NULL;
+ xmlChar *urnID = NULL;
+
+ if (catal == NULL)
+ return(NULL);
+ if (URI == NULL)
+ return(NULL);
+
+ if (!xmlStrncmp(URI, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
+ urnID = xmlCatalogUnWrapURN(URI);
+ if (xmlDebugCatalogs) {
+ if (urnID == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "URN ID %s expanded to NULL\n", URI);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "URN ID expanded to %s\n", urnID);
+ }
+ ret = xmlCatalogListXMLResolve(catal, urnID, NULL);
+ if (urnID != NULL)
+ xmlFree(urnID);
+ return(ret);
+ }
+ while (catal != NULL) {
+ if (catal->type == XML_CATA_CATALOG) {
+ if (catal->children == NULL) {
+ xmlFetchXMLCatalogFile(catal);
+ }
+ if (catal->children != NULL) {
+ ret = xmlCatalogXMLResolveURI(catal->children, URI);
+ if (ret != NULL)
+ return(ret);
+ }
+ }
+ catal = catal->next;
+ }
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The SGML Catalog parser *
+ * *
+ ************************************************************************/
+
+
+#define RAW *cur
+#define NEXT cur++;
+#define SKIP(x) cur += x;
+
+#define SKIP_BLANKS while (IS_BLANK_CH(*cur)) NEXT;
+
+/**
+ * xmlParseSGMLCatalogComment:
+ * @cur: the current character
+ *
+ * Skip a comment in an SGML catalog
+ *
+ * Returns new current character
+ */
+static const xmlChar *
+xmlParseSGMLCatalogComment(const xmlChar *cur) {
+ if ((cur[0] != '-') || (cur[1] != '-'))
+ return(cur);
+ SKIP(2);
+ while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-'))))
+ NEXT;
+ if (cur[0] == 0) {
+ return(NULL);
+ }
+ return(cur + 2);
+}
+
+/**
+ * xmlParseSGMLCatalogPubid:
+ * @cur: the current character
+ * @id: the return location
+ *
+ * Parse an SGML catalog ID
+ *
+ * Returns new current character and store the value in @id
+ */
+static const xmlChar *
+xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
+ xmlChar *buf = NULL, *tmp;
+ int len = 0;
+ int size = 50;
+ xmlChar stop;
+ int count = 0;
+
+ *id = NULL;
+
+ if (RAW == '"') {
+ NEXT;
+ stop = '"';
+ } else if (RAW == '\'') {
+ NEXT;
+ stop = '\'';
+ } else {
+ stop = ' ';
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlCatalogErrMemory("allocating public ID");
+ return(NULL);
+ }
+ while (IS_PUBIDCHAR_CH(*cur) || (*cur == '?')) {
+ if ((*cur == stop) && (stop != ' '))
+ break;
+ if ((stop == ' ') && (IS_BLANK_CH(*cur)))
+ break;
+ if (len + 1 >= size) {
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlCatalogErrMemory("allocating public ID");
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ buf[len++] = *cur;
+ count++;
+ NEXT;
+ }
+ buf[len] = 0;
+ if (stop == ' ') {
+ if (!IS_BLANK_CH(*cur)) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ } else {
+ if (*cur != stop) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ NEXT;
+ }
+ *id = buf;
+ return(cur);
+}
+
+/**
+ * xmlParseSGMLCatalogName:
+ * @cur: the current character
+ * @name: the return location
+ *
+ * Parse an SGML catalog name
+ *
+ * Returns new current character and store the value in @name
+ */
+static const xmlChar *
+xmlParseSGMLCatalogName(const xmlChar *cur, xmlChar **name) {
+ xmlChar buf[XML_MAX_NAMELEN + 5];
+ int len = 0;
+ int c;
+
+ *name = NULL;
+
+ /*
+ * Handler for more complex cases
+ */
+ c = *cur;
+ if ((!IS_LETTER(c) && (c != '_') && (c != ':'))) {
+ return(NULL);
+ }
+
+ while (((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':'))) {
+ buf[len++] = c;
+ cur++;
+ c = *cur;
+ if (len >= XML_MAX_NAMELEN)
+ return(NULL);
+ }
+ *name = xmlStrndup(buf, len);
+ return(cur);
+}
+
+/**
+ * xmlGetSGMLCatalogEntryType:
+ * @name: the entry name
+ *
+ * Get the Catalog entry type for a given SGML Catalog name
+ *
+ * Returns Catalog entry type
+ */
+static xmlCatalogEntryType
+xmlGetSGMLCatalogEntryType(const xmlChar *name) {
+ xmlCatalogEntryType type = XML_CATA_NONE;
+ if (xmlStrEqual(name, (const xmlChar *) "SYSTEM"))
+ type = SGML_CATA_SYSTEM;
+ else if (xmlStrEqual(name, (const xmlChar *) "PUBLIC"))
+ type = SGML_CATA_PUBLIC;
+ else if (xmlStrEqual(name, (const xmlChar *) "DELEGATE"))
+ type = SGML_CATA_DELEGATE;
+ else if (xmlStrEqual(name, (const xmlChar *) "ENTITY"))
+ type = SGML_CATA_ENTITY;
+ else if (xmlStrEqual(name, (const xmlChar *) "DOCTYPE"))
+ type = SGML_CATA_DOCTYPE;
+ else if (xmlStrEqual(name, (const xmlChar *) "LINKTYPE"))
+ type = SGML_CATA_LINKTYPE;
+ else if (xmlStrEqual(name, (const xmlChar *) "NOTATION"))
+ type = SGML_CATA_NOTATION;
+ else if (xmlStrEqual(name, (const xmlChar *) "SGMLDECL"))
+ type = SGML_CATA_SGMLDECL;
+ else if (xmlStrEqual(name, (const xmlChar *) "DOCUMENT"))
+ type = SGML_CATA_DOCUMENT;
+ else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
+ type = SGML_CATA_CATALOG;
+ else if (xmlStrEqual(name, (const xmlChar *) "BASE"))
+ type = SGML_CATA_BASE;
+ return(type);
+}
+
+/**
+ * xmlParseSGMLCatalog:
+ * @catal: the SGML Catalog
+ * @value: the content of the SGML Catalog serialization
+ * @file: the filepath for the catalog
+ * @super: should this be handled as a Super Catalog in which case
+ * parsing is not recursive
+ *
+ * Parse an SGML catalog content and fill up the @catal hash table with
+ * the new entries found.
+ *
+ * Returns 0 in case of success, -1 in case of error.
+ */
+static int
+xmlParseSGMLCatalog(xmlCatalogPtr catal, const xmlChar *value,
+ const char *file, int super) {
+ const xmlChar *cur = value;
+ xmlChar *base = NULL;
+ int res;
+
+ if ((cur == NULL) || (file == NULL))
+ return(-1);
+ base = xmlStrdup((const xmlChar *) file);
+
+ while ((cur != NULL) && (cur[0] != 0)) {
+ SKIP_BLANKS;
+ if (cur[0] == 0)
+ break;
+ if ((cur[0] == '-') && (cur[1] == '-')) {
+ cur = xmlParseSGMLCatalogComment(cur);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ } else {
+ xmlChar *sysid = NULL;
+ xmlChar *name = NULL;
+ xmlCatalogEntryType type = XML_CATA_NONE;
+
+ cur = xmlParseSGMLCatalogName(cur, &name);
+ if (name == NULL) {
+ /* error */
+ break;
+ }
+ if (!IS_BLANK_CH(*cur)) {
+ /* error */
+ break;
+ }
+ SKIP_BLANKS;
+ if (xmlStrEqual(name, (const xmlChar *) "SYSTEM"))
+ type = SGML_CATA_SYSTEM;
+ else if (xmlStrEqual(name, (const xmlChar *) "PUBLIC"))
+ type = SGML_CATA_PUBLIC;
+ else if (xmlStrEqual(name, (const xmlChar *) "DELEGATE"))
+ type = SGML_CATA_DELEGATE;
+ else if (xmlStrEqual(name, (const xmlChar *) "ENTITY"))
+ type = SGML_CATA_ENTITY;
+ else if (xmlStrEqual(name, (const xmlChar *) "DOCTYPE"))
+ type = SGML_CATA_DOCTYPE;
+ else if (xmlStrEqual(name, (const xmlChar *) "LINKTYPE"))
+ type = SGML_CATA_LINKTYPE;
+ else if (xmlStrEqual(name, (const xmlChar *) "NOTATION"))
+ type = SGML_CATA_NOTATION;
+ else if (xmlStrEqual(name, (const xmlChar *) "SGMLDECL"))
+ type = SGML_CATA_SGMLDECL;
+ else if (xmlStrEqual(name, (const xmlChar *) "DOCUMENT"))
+ type = SGML_CATA_DOCUMENT;
+ else if (xmlStrEqual(name, (const xmlChar *) "CATALOG"))
+ type = SGML_CATA_CATALOG;
+ else if (xmlStrEqual(name, (const xmlChar *) "BASE"))
+ type = SGML_CATA_BASE;
+ else if (xmlStrEqual(name, (const xmlChar *) "OVERRIDE")) {
+ xmlFree(name);
+ cur = xmlParseSGMLCatalogName(cur, &name);
+ if (name == NULL) {
+ /* error */
+ break;
+ }
+ xmlFree(name);
+ continue;
+ }
+ xmlFree(name);
+ name = NULL;
+
+ switch(type) {
+ case SGML_CATA_ENTITY:
+ if (*cur == '%')
+ type = SGML_CATA_PENTITY;
+ case SGML_CATA_PENTITY:
+ case SGML_CATA_DOCTYPE:
+ case SGML_CATA_LINKTYPE:
+ case SGML_CATA_NOTATION:
+ cur = xmlParseSGMLCatalogName(cur, &name);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ if (!IS_BLANK_CH(*cur)) {
+ /* error */
+ break;
+ }
+ SKIP_BLANKS;
+ cur = xmlParseSGMLCatalogPubid(cur, &sysid);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ break;
+ case SGML_CATA_PUBLIC:
+ case SGML_CATA_SYSTEM:
+ case SGML_CATA_DELEGATE:
+ cur = xmlParseSGMLCatalogPubid(cur, &name);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ if (type != SGML_CATA_SYSTEM) {
+ xmlChar *normid;
+
+ normid = xmlCatalogNormalizePublic(name);
+ if (normid != NULL) {
+ if (name != NULL)
+ xmlFree(name);
+ if (*normid != 0)
+ name = normid;
+ else {
+ xmlFree(normid);
+ name = NULL;
+ }
+ }
+ }
+ if (!IS_BLANK_CH(*cur)) {
+ /* error */
+ break;
+ }
+ SKIP_BLANKS;
+ cur = xmlParseSGMLCatalogPubid(cur, &sysid);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ break;
+ case SGML_CATA_BASE:
+ case SGML_CATA_CATALOG:
+ case SGML_CATA_DOCUMENT:
+ case SGML_CATA_SGMLDECL:
+ cur = xmlParseSGMLCatalogPubid(cur, &sysid);
+ if (cur == NULL) {
+ /* error */
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ if (cur == NULL) {
+ if (name != NULL)
+ xmlFree(name);
+ if (sysid != NULL)
+ xmlFree(sysid);
+ break;
+ } else if (type == SGML_CATA_BASE) {
+ if (base != NULL)
+ xmlFree(base);
+ base = xmlStrdup(sysid);
+ } else if ((type == SGML_CATA_PUBLIC) ||
+ (type == SGML_CATA_SYSTEM)) {
+ xmlChar *filename;
+
+ filename = xmlBuildURI(sysid, base);
+ if (filename != NULL) {
+ xmlCatalogEntryPtr entry;
+
+ entry = xmlNewCatalogEntry(type, name, filename,
+ NULL, XML_CATA_PREFER_NONE, NULL);
+ res = xmlHashAddEntry(catal->sgml, name, entry);
+ if (res < 0) {
+ xmlFreeCatalogEntry(entry);
+ }
+ xmlFree(filename);
+ }
+
+ } else if (type == SGML_CATA_CATALOG) {
+ if (super) {
+ xmlCatalogEntryPtr entry;
+
+ entry = xmlNewCatalogEntry(type, sysid, NULL, NULL,
+ XML_CATA_PREFER_NONE, NULL);
+ res = xmlHashAddEntry(catal->sgml, sysid, entry);
+ if (res < 0) {
+ xmlFreeCatalogEntry(entry);
+ }
+ } else {
+ xmlChar *filename;
+
+ filename = xmlBuildURI(sysid, base);
+ if (filename != NULL) {
+ xmlExpandCatalog(catal, (const char *)filename);
+ xmlFree(filename);
+ }
+ }
+ }
+ /*
+ * drop anything else we won't handle it
+ */
+ if (name != NULL)
+ xmlFree(name);
+ if (sysid != NULL)
+ xmlFree(sysid);
+ }
+ }
+ if (base != NULL)
+ xmlFree(base);
+ if (cur == NULL)
+ return(-1);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * SGML Catalog handling *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogGetSGMLPublic:
+ * @catal: an SGML catalog hash
+ * @pubID: the public ID string
+ *
+ * Try to lookup the catalog local reference associated to a public ID
+ *
+ * Returns the local resource if found or NULL otherwise.
+ */
+static const xmlChar *
+xmlCatalogGetSGMLPublic(xmlHashTablePtr catal, const xmlChar *pubID) {
+ xmlCatalogEntryPtr entry;
+ xmlChar *normid;
+
+ if (catal == NULL)
+ return(NULL);
+
+ normid = xmlCatalogNormalizePublic(pubID);
+ if (normid != NULL)
+ pubID = (*normid != 0 ? normid : NULL);
+
+ entry = (xmlCatalogEntryPtr) xmlHashLookup(catal, pubID);
+ if (entry == NULL) {
+ if (normid != NULL)
+ xmlFree(normid);
+ return(NULL);
+ }
+ if (entry->type == SGML_CATA_PUBLIC) {
+ if (normid != NULL)
+ xmlFree(normid);
+ return(entry->URL);
+ }
+ if (normid != NULL)
+ xmlFree(normid);
+ return(NULL);
+}
+
+/**
+ * xmlCatalogGetSGMLSystem:
+ * @catal: an SGML catalog hash
+ * @sysID: the system ID string
+ *
+ * Try to lookup the catalog local reference for a system ID
+ *
+ * Returns the local resource if found or NULL otherwise.
+ */
+static const xmlChar *
+xmlCatalogGetSGMLSystem(xmlHashTablePtr catal, const xmlChar *sysID) {
+ xmlCatalogEntryPtr entry;
+
+ if (catal == NULL)
+ return(NULL);
+
+ entry = (xmlCatalogEntryPtr) xmlHashLookup(catal, sysID);
+ if (entry == NULL)
+ return(NULL);
+ if (entry->type == SGML_CATA_SYSTEM)
+ return(entry->URL);
+ return(NULL);
+}
+
+/**
+ * xmlCatalogSGMLResolve:
+ * @catal: the SGML catalog
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier
+ *
+ * Returns the URI of the resource or NULL if not found
+ */
+static const xmlChar *
+xmlCatalogSGMLResolve(xmlCatalogPtr catal, const xmlChar *pubID,
+ const xmlChar *sysID) {
+ const xmlChar *ret = NULL;
+
+ if (catal->sgml == NULL)
+ return(NULL);
+
+ if (pubID != NULL)
+ ret = xmlCatalogGetSGMLPublic(catal->sgml, pubID);
+ if (ret != NULL)
+ return(ret);
+ if (sysID != NULL)
+ ret = xmlCatalogGetSGMLSystem(catal->sgml, sysID);
+ if (ret != NULL)
+ return(ret);
+ return(NULL);
+}
+
+/************************************************************************
+ * *
+ * Specific Public interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlLoadSGMLSuperCatalog:
+ * @filename: a file path
+ *
+ * Load an SGML super catalog. It won't expand CATALOG or DELEGATE
+ * references. This is only needed for manipulating SGML Super Catalogs
+ * like adding and removing CATALOG or DELEGATE entries.
+ *
+ * Returns the catalog parsed or NULL in case of error
+ */
+xmlCatalogPtr
+xmlLoadSGMLSuperCatalog(const char *filename)
+{
+ xmlChar *content;
+ xmlCatalogPtr catal;
+ int ret;
+
+ content = xmlLoadFileContent(filename);
+ if (content == NULL)
+ return(NULL);
+
+ catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
+ if (catal == NULL) {
+ xmlFree(content);
+ return(NULL);
+ }
+
+ ret = xmlParseSGMLCatalog(catal, content, filename, 1);
+ xmlFree(content);
+ if (ret < 0) {
+ xmlFreeCatalog(catal);
+ return(NULL);
+ }
+ return (catal);
+}
+
+/**
+ * xmlLoadACatalog:
+ * @filename: a file path
+ *
+ * Load the catalog and build the associated data structures.
+ * This can be either an XML Catalog or an SGML Catalog
+ * It will recurse in SGML CATALOG entries. On the other hand XML
+ * Catalogs are not handled recursively.
+ *
+ * Returns the catalog parsed or NULL in case of error
+ */
+xmlCatalogPtr
+xmlLoadACatalog(const char *filename)
+{
+ xmlChar *content;
+ xmlChar *first;
+ xmlCatalogPtr catal;
+ int ret;
+
+ content = xmlLoadFileContent(filename);
+ if (content == NULL)
+ return(NULL);
+
+
+ first = content;
+
+ while ((*first != 0) && (*first != '-') && (*first != '<') &&
+ (!(((*first >= 'A') && (*first <= 'Z')) ||
+ ((*first >= 'a') && (*first <= 'z')))))
+ first++;
+
+ if (*first != '<') {
+ catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
+ if (catal == NULL) {
+ xmlFree(content);
+ return(NULL);
+ }
+ ret = xmlParseSGMLCatalog(catal, content, filename, 0);
+ if (ret < 0) {
+ xmlFreeCatalog(catal);
+ xmlFree(content);
+ return(NULL);
+ }
+ } else {
+ catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer);
+ if (catal == NULL) {
+ xmlFree(content);
+ return(NULL);
+ }
+ catal->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
+ NULL, BAD_CAST filename, xmlCatalogDefaultPrefer, NULL);
+ }
+ xmlFree(content);
+ return (catal);
+}
+
+/**
+ * xmlExpandCatalog:
+ * @catal: a catalog
+ * @filename: a file path
+ *
+ * Load the catalog and expand the existing catal structure.
+ * This can be either an XML Catalog or an SGML Catalog
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+static int
+xmlExpandCatalog(xmlCatalogPtr catal, const char *filename)
+{
+ int ret;
+
+ if ((catal == NULL) || (filename == NULL))
+ return(-1);
+
+
+ if (catal->type == XML_SGML_CATALOG_TYPE) {
+ xmlChar *content;
+
+ content = xmlLoadFileContent(filename);
+ if (content == NULL)
+ return(-1);
+
+ ret = xmlParseSGMLCatalog(catal, content, filename, 0);
+ if (ret < 0) {
+ xmlFree(content);
+ return(-1);
+ }
+ xmlFree(content);
+ } else {
+ xmlCatalogEntryPtr tmp, cur;
+ tmp = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
+ NULL, BAD_CAST filename, xmlCatalogDefaultPrefer, NULL);
+
+ cur = catal->xml;
+ if (cur == NULL) {
+ catal->xml = tmp;
+ } else {
+ while (cur->next != NULL) cur = cur->next;
+ cur->next = tmp;
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlACatalogResolveSystem:
+ * @catal: a Catalog
+ * @sysID: the system ID string
+ *
+ * Try to lookup the catalog resource for a system ID
+ *
+ * Returns the resource if found or NULL otherwise, the value returned
+ * must be freed by the caller.
+ */
+xmlChar *
+xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) {
+ xmlChar *ret = NULL;
+
+ if ((sysID == NULL) || (catal == NULL))
+ return(NULL);
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve sysID %s\n", sysID);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ ret = xmlCatalogListXMLResolve(catal->xml, NULL, sysID);
+ if (ret == XML_CATAL_BREAK)
+ ret = NULL;
+ } else {
+ const xmlChar *sgml;
+
+ sgml = xmlCatalogGetSGMLSystem(catal->sgml, sysID);
+ if (sgml != NULL)
+ ret = xmlStrdup(sgml);
+ }
+ return(ret);
+}
+
+/**
+ * xmlACatalogResolvePublic:
+ * @catal: a Catalog
+ * @pubID: the public ID string
+ *
+ * Try to lookup the catalog local reference associated to a public ID in that catalog
+ *
+ * Returns the local resource if found or NULL otherwise, the value returned
+ * must be freed by the caller.
+ */
+xmlChar *
+xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) {
+ xmlChar *ret = NULL;
+
+ if ((pubID == NULL) || (catal == NULL))
+ return(NULL);
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve pubID %s\n", pubID);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ ret = xmlCatalogListXMLResolve(catal->xml, pubID, NULL);
+ if (ret == XML_CATAL_BREAK)
+ ret = NULL;
+ } else {
+ const xmlChar *sgml;
+
+ sgml = xmlCatalogGetSGMLPublic(catal->sgml, pubID);
+ if (sgml != NULL)
+ ret = xmlStrdup(sgml);
+ }
+ return(ret);
+}
+
+/**
+ * xmlACatalogResolve:
+ * @catal: a Catalog
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlACatalogResolve(xmlCatalogPtr catal, const xmlChar * pubID,
+ const xmlChar * sysID)
+{
+ xmlChar *ret = NULL;
+
+ if (((pubID == NULL) && (sysID == NULL)) || (catal == NULL))
+ return (NULL);
+
+ if (xmlDebugCatalogs) {
+ if ((pubID != NULL) && (sysID != NULL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve: pubID %s sysID %s\n", pubID, sysID);
+ } else if (pubID != NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve: pubID %s\n", pubID);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve: sysID %s\n", sysID);
+ }
+ }
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ ret = xmlCatalogListXMLResolve(catal->xml, pubID, sysID);
+ if (ret == XML_CATAL_BREAK)
+ ret = NULL;
+ } else {
+ const xmlChar *sgml;
+
+ sgml = xmlCatalogSGMLResolve(catal, pubID, sysID);
+ if (sgml != NULL)
+ ret = xmlStrdup(sgml);
+ }
+ return (ret);
+}
+
+/**
+ * xmlACatalogResolveURI:
+ * @catal: a Catalog
+ * @URI: the URI
+ *
+ * Do a complete resolution lookup of an URI
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlACatalogResolveURI(xmlCatalogPtr catal, const xmlChar *URI) {
+ xmlChar *ret = NULL;
+
+ if ((URI == NULL) || (catal == NULL))
+ return(NULL);
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve URI %s\n", URI);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ ret = xmlCatalogListXMLResolveURI(catal->xml, URI);
+ if (ret == XML_CATAL_BREAK)
+ ret = NULL;
+ } else {
+ const xmlChar *sgml;
+
+ sgml = xmlCatalogSGMLResolve(catal, NULL, URI);
+ if (sgml != NULL)
+ ret = xmlStrdup(sgml);
+ }
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlACatalogDump:
+ * @catal: a Catalog
+ * @out: the file.
+ *
+ * Dump the given catalog to the given file.
+ */
+void
+xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
+ if ((out == NULL) || (catal == NULL))
+ return;
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ xmlDumpXMLCatalog(out, catal->xml);
+ } else {
+ xmlHashScan(catal->sgml,
+ (xmlHashScanner) xmlCatalogDumpEntry, out);
+ }
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlACatalogAdd:
+ * @catal: a Catalog
+ * @type: the type of record to add to the catalog
+ * @orig: the system, public or prefix to match
+ * @replace: the replacement value for the match
+ *
+ * Add an entry in the catalog, it may overwrite existing but
+ * different entries.
+ *
+ * Returns 0 if successful, -1 otherwise
+ */
+int
+xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type,
+ const xmlChar * orig, const xmlChar * replace)
+{
+ int res = -1;
+
+ if (catal == NULL)
+ return(-1);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ res = xmlAddXMLCatalog(catal->xml, type, orig, replace);
+ } else {
+ xmlCatalogEntryType cattype;
+
+ cattype = xmlGetSGMLCatalogEntryType(type);
+ if (cattype != XML_CATA_NONE) {
+ xmlCatalogEntryPtr entry;
+
+ entry = xmlNewCatalogEntry(cattype, orig, replace, NULL,
+ XML_CATA_PREFER_NONE, NULL);
+ if (catal->sgml == NULL)
+ catal->sgml = xmlHashCreate(10);
+ res = xmlHashAddEntry(catal->sgml, orig, entry);
+ }
+ }
+ return (res);
+}
+
+/**
+ * xmlACatalogRemove:
+ * @catal: a Catalog
+ * @value: the value to remove
+ *
+ * Remove an entry from the catalog
+ *
+ * Returns the number of entries removed if successful, -1 otherwise
+ */
+int
+xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) {
+ int res = -1;
+
+ if ((catal == NULL) || (value == NULL))
+ return(-1);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ res = xmlDelXMLCatalog(catal->xml, value);
+ } else {
+ res = xmlHashRemoveEntry(catal->sgml, value,
+ (xmlHashDeallocator) xmlFreeCatalogEntry);
+ if (res == 0)
+ res = 1;
+ }
+ return(res);
+}
+
+/**
+ * xmlNewCatalog:
+ * @sgml: should this create an SGML catalog
+ *
+ * create a new Catalog.
+ *
+ * Returns the xmlCatalogPtr or NULL in case of error
+ */
+xmlCatalogPtr
+xmlNewCatalog(int sgml) {
+ xmlCatalogPtr catal = NULL;
+
+ if (sgml) {
+ catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE,
+ xmlCatalogDefaultPrefer);
+ if ((catal != NULL) && (catal->sgml == NULL))
+ catal->sgml = xmlHashCreate(10);
+ } else
+ catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
+ xmlCatalogDefaultPrefer);
+ return(catal);
+}
+
+/**
+ * xmlCatalogIsEmpty:
+ * @catal: should this create an SGML catalog
+ *
+ * Check is a catalog is empty
+ *
+ * Returns 1 if the catalog is empty, 0 if not, amd -1 in case of error.
+ */
+int
+xmlCatalogIsEmpty(xmlCatalogPtr catal) {
+ if (catal == NULL)
+ return(-1);
+
+ if (catal->type == XML_XML_CATALOG_TYPE) {
+ if (catal->xml == NULL)
+ return(1);
+ if ((catal->xml->type != XML_CATA_CATALOG) &&
+ (catal->xml->type != XML_CATA_BROKEN_CATALOG))
+ return(-1);
+ if (catal->xml->children == NULL)
+ return(1);
+ return(0);
+ } else {
+ int res;
+
+ if (catal->sgml == NULL)
+ return(1);
+ res = xmlHashSize(catal->sgml);
+ if (res == 0)
+ return(1);
+ if (res < 0)
+ return(-1);
+ }
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Public interfaces manipulating the global shared default catalog *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlInitializeCatalogData:
+ *
+ * Do the catalog initialization only of global data, doesn't try to load
+ * any catalog actually.
+ * this function is not thread safe, catalog initialization should
+ * preferably be done once at startup
+ */
+static void
+xmlInitializeCatalogData(void) {
+ if (xmlCatalogInitialized != 0)
+ return;
+
+ if (getenv("XML_DEBUG_CATALOG"))
+ xmlDebugCatalogs = 1;
+ xmlCatalogMutex = xmlNewRMutex();
+
+ xmlCatalogInitialized = 1;
+}
+/**
+ * xmlInitializeCatalog:
+ *
+ * Do the catalog initialization.
+ * this function is not thread safe, catalog initialization should
+ * preferably be done once at startup
+ */
+void
+xmlInitializeCatalog(void) {
+ if (xmlCatalogInitialized != 0)
+ return;
+
+ xmlInitializeCatalogData();
+ xmlRMutexLock(xmlCatalogMutex);
+
+ if (getenv("XML_DEBUG_CATALOG"))
+ xmlDebugCatalogs = 1;
+
+ if (xmlDefaultCatalog == NULL) {
+ const char *catalogs;
+ char *path;
+ const char *cur, *paths;
+ xmlCatalogPtr catal;
+ xmlCatalogEntryPtr *nextent;
+
+ catalogs = (const char *) getenv("XML_CATALOG_FILES");
+ if (catalogs == NULL)
+#if defined(_WIN32) && defined(_MSC_VER)
+ {
+ void* hmodule;
+ hmodule = GetModuleHandleA("libxml2.dll");
+ if (hmodule == NULL)
+ hmodule = GetModuleHandleA(NULL);
+ if (hmodule != NULL) {
+ char buf[256];
+ unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
+ if (len != 0) {
+ char* p = &(buf[len]);
+ while (*p != '\\' && p > buf)
+ p--;
+ if (p != buf) {
+ xmlChar* uri;
+ strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
+ uri = xmlCanonicPath((const xmlChar*)buf);
+ if (uri != NULL) {
+ strncpy(XML_XML_DEFAULT_CATALOG, uri, 255);
+ xmlFree(uri);
+ }
+ }
+ }
+ }
+ catalogs = XML_XML_DEFAULT_CATALOG;
+ }
+#else
+ catalogs = XML_XML_DEFAULT_CATALOG;
+#endif
+
+ catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
+ xmlCatalogDefaultPrefer);
+ if (catal != NULL) {
+ /* the XML_CATALOG_FILES envvar is allowed to contain a
+ space-separated list of entries. */
+ cur = catalogs;
+ nextent = &catal->xml;
+ while (*cur != '\0') {
+ while (xmlIsBlank_ch(*cur))
+ cur++;
+ if (*cur != 0) {
+ paths = cur;
+ while ((*cur != 0) && (!xmlIsBlank_ch(*cur)))
+ cur++;
+ path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths);
+ if (path != NULL) {
+ *nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
+ NULL, BAD_CAST path, xmlCatalogDefaultPrefer, NULL);
+ if (*nextent != NULL)
+ nextent = &((*nextent)->next);
+ xmlFree(path);
+ }
+ }
+ }
+ xmlDefaultCatalog = catal;
+ }
+ }
+
+ xmlRMutexUnlock(xmlCatalogMutex);
+}
+
+
+/**
+ * xmlLoadCatalog:
+ * @filename: a file path
+ *
+ * Load the catalog and makes its definitions effective for the default
+ * external entity loader. It will recurse in SGML CATALOG entries.
+ * this function is not thread safe, catalog initialization should
+ * preferably be done once at startup
+ *
+ * Returns 0 in case of success -1 in case of error
+ */
+int
+xmlLoadCatalog(const char *filename)
+{
+ int ret;
+ xmlCatalogPtr catal;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalogData();
+
+ xmlRMutexLock(xmlCatalogMutex);
+
+ if (xmlDefaultCatalog == NULL) {
+ catal = xmlLoadACatalog(filename);
+ if (catal == NULL) {
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(-1);
+ }
+
+ xmlDefaultCatalog = catal;
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(0);
+ }
+
+ ret = xmlExpandCatalog(xmlDefaultCatalog, filename);
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(ret);
+}
+
+/**
+ * xmlLoadCatalogs:
+ * @pathss: a list of directories separated by a colon or a space.
+ *
+ * Load the catalogs and makes their definitions effective for the default
+ * external entity loader.
+ * this function is not thread safe, catalog initialization should
+ * preferably be done once at startup
+ */
+void
+xmlLoadCatalogs(const char *pathss) {
+ const char *cur;
+ const char *paths;
+ xmlChar *path;
+#ifdef _WIN32
+ int i, iLen;
+#endif
+
+ if (pathss == NULL)
+ return;
+
+ cur = pathss;
+ while (*cur != 0) {
+ while (xmlIsBlank_ch(*cur)) cur++;
+ if (*cur != 0) {
+ paths = cur;
+ while ((*cur != 0) && (*cur != PATH_SEAPARATOR) && (!xmlIsBlank_ch(*cur)))
+ cur++;
+ path = xmlStrndup((const xmlChar *)paths, cur - paths);
+#ifdef _WIN32
+ iLen = strlen((const char*)path);
+ for(i = 0; i < iLen; i++) {
+ if(path[i] == '\\') {
+ path[i] = '/';
+ }
+ }
+#endif
+ if (path != NULL) {
+ xmlLoadCatalog((const char *) path);
+ xmlFree(path);
+ }
+ }
+ while (*cur == PATH_SEAPARATOR)
+ cur++;
+ }
+}
+
+/**
+ * xmlCatalogCleanup:
+ *
+ * Free up all the memory associated with catalogs
+ */
+void
+xmlCatalogCleanup(void) {
+ if (xmlCatalogInitialized == 0)
+ return;
+
+ xmlRMutexLock(xmlCatalogMutex);
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Catalogs cleanup\n");
+ if (xmlCatalogXMLFiles != NULL)
+ xmlHashFree(xmlCatalogXMLFiles,
+ (xmlHashDeallocator)xmlFreeCatalogHashEntryList);
+ xmlCatalogXMLFiles = NULL;
+ if (xmlDefaultCatalog != NULL)
+ xmlFreeCatalog(xmlDefaultCatalog);
+ xmlDefaultCatalog = NULL;
+ xmlDebugCatalogs = 0;
+ xmlCatalogInitialized = 0;
+ xmlRMutexUnlock(xmlCatalogMutex);
+ xmlFreeRMutex(xmlCatalogMutex);
+}
+
+/**
+ * xmlCatalogResolveSystem:
+ * @sysID: the system ID string
+ *
+ * Try to lookup the catalog resource for a system ID
+ *
+ * Returns the resource if found or NULL otherwise, the value returned
+ * must be freed by the caller.
+ */
+xmlChar *
+xmlCatalogResolveSystem(const xmlChar *sysID) {
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ ret = xmlACatalogResolveSystem(xmlDefaultCatalog, sysID);
+ return(ret);
+}
+
+/**
+ * xmlCatalogResolvePublic:
+ * @pubID: the public ID string
+ *
+ * Try to lookup the catalog reference associated to a public ID
+ *
+ * Returns the resource if found or NULL otherwise, the value returned
+ * must be freed by the caller.
+ */
+xmlChar *
+xmlCatalogResolvePublic(const xmlChar *pubID) {
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ ret = xmlACatalogResolvePublic(xmlDefaultCatalog, pubID);
+ return(ret);
+}
+
+/**
+ * xmlCatalogResolve:
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlCatalogResolve(const xmlChar *pubID, const xmlChar *sysID) {
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ ret = xmlACatalogResolve(xmlDefaultCatalog, pubID, sysID);
+ return(ret);
+}
+
+/**
+ * xmlCatalogResolveURI:
+ * @URI: the URI
+ *
+ * Do a complete resolution lookup of an URI
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlCatalogResolveURI(const xmlChar *URI) {
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ ret = xmlACatalogResolveURI(xmlDefaultCatalog, URI);
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlCatalogDump:
+ * @out: the file.
+ *
+ * Dump all the global catalog content to the given file.
+ */
+void
+xmlCatalogDump(FILE *out) {
+ if (out == NULL)
+ return;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ xmlACatalogDump(xmlDefaultCatalog, out);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlCatalogAdd:
+ * @type: the type of record to add to the catalog
+ * @orig: the system, public or prefix to match
+ * @replace: the replacement value for the match
+ *
+ * Add an entry in the catalog, it may overwrite existing but
+ * different entries.
+ * If called before any other catalog routine, allows to override the
+ * default shared catalog put in place by xmlInitializeCatalog();
+ *
+ * Returns 0 if successful, -1 otherwise
+ */
+int
+xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace) {
+ int res = -1;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalogData();
+
+ xmlRMutexLock(xmlCatalogMutex);
+ /*
+ * Specific case where one want to override the default catalog
+ * put in place by xmlInitializeCatalog();
+ */
+ if ((xmlDefaultCatalog == NULL) &&
+ (xmlStrEqual(type, BAD_CAST "catalog"))) {
+ xmlDefaultCatalog = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
+ xmlCatalogDefaultPrefer);
+ xmlDefaultCatalog->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL,
+ orig, NULL, xmlCatalogDefaultPrefer, NULL);
+
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(0);
+ }
+
+ res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace);
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(res);
+}
+
+/**
+ * xmlCatalogRemove:
+ * @value: the value to remove
+ *
+ * Remove an entry from the catalog
+ *
+ * Returns the number of entries removed if successful, -1 otherwise
+ */
+int
+xmlCatalogRemove(const xmlChar *value) {
+ int res;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ xmlRMutexLock(xmlCatalogMutex);
+ res = xmlACatalogRemove(xmlDefaultCatalog, value);
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(res);
+}
+
+/**
+ * xmlCatalogConvert:
+ *
+ * Convert all the SGML catalog entries as XML ones
+ *
+ * Returns the number of entries converted if successful, -1 otherwise
+ */
+int
+xmlCatalogConvert(void) {
+ int res = -1;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ xmlRMutexLock(xmlCatalogMutex);
+ res = xmlConvertSGMLCatalog(xmlDefaultCatalog);
+ xmlRMutexUnlock(xmlCatalogMutex);
+ return(res);
+}
+
+/************************************************************************
+ * *
+ * Public interface manipulating the common preferences *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogGetDefaults:
+ *
+ * Used to get the user preference w.r.t. to what catalogs should
+ * be accepted
+ *
+ * Returns the current xmlCatalogAllow value
+ */
+xmlCatalogAllow
+xmlCatalogGetDefaults(void) {
+ return(xmlCatalogDefaultAllow);
+}
+
+/**
+ * xmlCatalogSetDefaults:
+ * @allow: what catalogs should be accepted
+ *
+ * Used to set the user preference w.r.t. to what catalogs should
+ * be accepted
+ */
+void
+xmlCatalogSetDefaults(xmlCatalogAllow allow) {
+ if (xmlDebugCatalogs) {
+ switch (allow) {
+ case XML_CATA_ALLOW_NONE:
+ xmlGenericError(xmlGenericErrorContext,
+ "Disabling catalog usage\n");
+ break;
+ case XML_CATA_ALLOW_GLOBAL:
+ xmlGenericError(xmlGenericErrorContext,
+ "Allowing only global catalogs\n");
+ break;
+ case XML_CATA_ALLOW_DOCUMENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "Allowing only catalogs from the document\n");
+ break;
+ case XML_CATA_ALLOW_ALL:
+ xmlGenericError(xmlGenericErrorContext,
+ "Allowing all catalogs\n");
+ break;
+ }
+ }
+ xmlCatalogDefaultAllow = allow;
+}
+
+/**
+ * xmlCatalogSetDefaultPrefer:
+ * @prefer: the default preference for delegation
+ *
+ * Allows to set the preference between public and system for deletion
+ * in XML Catalog resolution. C.f. section 4.1.1 of the spec
+ * Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM
+ *
+ * Returns the previous value of the default preference for delegation
+ */
+xmlCatalogPrefer
+xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer) {
+ xmlCatalogPrefer ret = xmlCatalogDefaultPrefer;
+
+ if (prefer == XML_CATA_PREFER_NONE)
+ return(ret);
+
+ if (xmlDebugCatalogs) {
+ switch (prefer) {
+ case XML_CATA_PREFER_PUBLIC:
+ xmlGenericError(xmlGenericErrorContext,
+ "Setting catalog preference to PUBLIC\n");
+ break;
+ case XML_CATA_PREFER_SYSTEM:
+ xmlGenericError(xmlGenericErrorContext,
+ "Setting catalog preference to SYSTEM\n");
+ break;
+ default:
+ return(ret);
+ }
+ }
+ xmlCatalogDefaultPrefer = prefer;
+ return(ret);
+}
+
+/**
+ * xmlCatalogSetDebug:
+ * @level: the debug level of catalogs required
+ *
+ * Used to set the debug level for catalog operation, 0 disable
+ * debugging, 1 enable it
+ *
+ * Returns the previous value of the catalog debugging level
+ */
+int
+xmlCatalogSetDebug(int level) {
+ int ret = xmlDebugCatalogs;
+
+ if (level <= 0)
+ xmlDebugCatalogs = 0;
+ else
+ xmlDebugCatalogs = level;
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Minimal interfaces used for per-document catalogs by the parser *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCatalogFreeLocal:
+ * @catalogs: a document's list of catalogs
+ *
+ * Free up the memory associated to the catalog list
+ */
+void
+xmlCatalogFreeLocal(void *catalogs) {
+ xmlCatalogEntryPtr catal;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ catal = (xmlCatalogEntryPtr) catalogs;
+ if (catal != NULL)
+ xmlFreeCatalogEntryList(catal);
+}
+
+
+/**
+ * xmlCatalogAddLocal:
+ * @catalogs: a document's list of catalogs
+ * @URL: the URL to a new local catalog
+ *
+ * Add the new entry to the catalog list
+ *
+ * Returns the updated list
+ */
+void *
+xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
+ xmlCatalogEntryPtr catal, add;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ if (URL == NULL)
+ return(catalogs);
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Adding document catalog %s\n", URL);
+
+ add = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, URL, NULL,
+ xmlCatalogDefaultPrefer, NULL);
+ if (add == NULL)
+ return(catalogs);
+
+ catal = (xmlCatalogEntryPtr) catalogs;
+ if (catal == NULL)
+ return((void *) add);
+
+ while (catal->next != NULL)
+ catal = catal->next;
+ catal->next = add;
+ return(catalogs);
+}
+
+/**
+ * xmlCatalogLocalResolve:
+ * @catalogs: a document's list of catalogs
+ * @pubID: the public ID string
+ * @sysID: the system ID string
+ *
+ * Do a complete resolution lookup of an External Identifier using a
+ * document's private catalog list
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID,
+ const xmlChar *sysID) {
+ xmlCatalogEntryPtr catal;
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ if ((pubID == NULL) && (sysID == NULL))
+ return(NULL);
+
+ if (xmlDebugCatalogs) {
+ if ((pubID != NULL) && (sysID != NULL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Local Resolve: pubID %s sysID %s\n", pubID, sysID);
+ } else if (pubID != NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Local Resolve: pubID %s\n", pubID);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Local Resolve: sysID %s\n", sysID);
+ }
+ }
+
+ catal = (xmlCatalogEntryPtr) catalogs;
+ if (catal == NULL)
+ return(NULL);
+ ret = xmlCatalogListXMLResolve(catal, pubID, sysID);
+ if ((ret != NULL) && (ret != XML_CATAL_BREAK))
+ return(ret);
+ return(NULL);
+}
+
+/**
+ * xmlCatalogLocalResolveURI:
+ * @catalogs: a document's list of catalogs
+ * @URI: the URI
+ *
+ * Do a complete resolution lookup of an URI using a
+ * document's private catalog list
+ *
+ * Returns the URI of the resource or NULL if not found, it must be freed
+ * by the caller.
+ */
+xmlChar *
+xmlCatalogLocalResolveURI(void *catalogs, const xmlChar *URI) {
+ xmlCatalogEntryPtr catal;
+ xmlChar *ret;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ if (URI == NULL)
+ return(NULL);
+
+ if (xmlDebugCatalogs)
+ xmlGenericError(xmlGenericErrorContext,
+ "Resolve URI %s\n", URI);
+
+ catal = (xmlCatalogEntryPtr) catalogs;
+ if (catal == NULL)
+ return(NULL);
+ ret = xmlCatalogListXMLResolveURI(catal, URI);
+ if ((ret != NULL) && (ret != XML_CATAL_BREAK))
+ return(ret);
+ return(NULL);
+}
+
+/************************************************************************
+ * *
+ * Deprecated interfaces *
+ * *
+ ************************************************************************/
+/**
+ * xmlCatalogGetSystem:
+ * @sysID: the system ID string
+ *
+ * Try to lookup the catalog reference associated to a system ID
+ * DEPRECATED, use xmlCatalogResolveSystem()
+ *
+ * Returns the resource if found or NULL otherwise.
+ */
+const xmlChar *
+xmlCatalogGetSystem(const xmlChar *sysID) {
+ xmlChar *ret;
+ static xmlChar result[1000];
+ static int msg = 0;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ if (msg == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Use of deprecated xmlCatalogGetSystem() call\n");
+ msg++;
+ }
+
+ if (sysID == NULL)
+ return(NULL);
+
+ /*
+ * Check first the XML catalogs
+ */
+ if (xmlDefaultCatalog != NULL) {
+ ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml, NULL, sysID);
+ if ((ret != NULL) && (ret != XML_CATAL_BREAK)) {
+ snprintf((char *) result, sizeof(result) - 1, "%s", (char *) ret);
+ result[sizeof(result) - 1] = 0;
+ return(result);
+ }
+ }
+
+ if (xmlDefaultCatalog != NULL)
+ return(xmlCatalogGetSGMLSystem(xmlDefaultCatalog->sgml, sysID));
+ return(NULL);
+}
+
+/**
+ * xmlCatalogGetPublic:
+ * @pubID: the public ID string
+ *
+ * Try to lookup the catalog reference associated to a public ID
+ * DEPRECATED, use xmlCatalogResolvePublic()
+ *
+ * Returns the resource if found or NULL otherwise.
+ */
+const xmlChar *
+xmlCatalogGetPublic(const xmlChar *pubID) {
+ xmlChar *ret;
+ static xmlChar result[1000];
+ static int msg = 0;
+
+ if (!xmlCatalogInitialized)
+ xmlInitializeCatalog();
+
+ if (msg == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Use of deprecated xmlCatalogGetPublic() call\n");
+ msg++;
+ }
+
+ if (pubID == NULL)
+ return(NULL);
+
+ /*
+ * Check first the XML catalogs
+ */
+ if (xmlDefaultCatalog != NULL) {
+ ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml, pubID, NULL);
+ if ((ret != NULL) && (ret != XML_CATAL_BREAK)) {
+ snprintf((char *) result, sizeof(result) - 1, "%s", (char *) ret);
+ result[sizeof(result) - 1] = 0;
+ return(result);
+ }
+ }
+
+ if (xmlDefaultCatalog != NULL)
+ return(xmlCatalogGetSGMLPublic(xmlDefaultCatalog->sgml, pubID));
+ return(NULL);
+}
+
+#define bottom_catalog
+#include "elfgcchack.h"
+#endif /* LIBXML_CATALOG_ENABLED */
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py
new file mode 100755
index 0000000..f4a5a69
--- /dev/null
+++ b/check-relaxng-test-suite.py
@@ -0,0 +1,394 @@
+#!/usr/bin/python
+import sys
+import time
+import os
+import string
+import StringIO
+sys.path.insert(0, "python")
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+debug = 0
+verbose = 0
+quiet = 1
+
+#
+# the testsuite description
+#
+CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/OASIS/spectest.xml")
+LOG="check-relaxng-test-suite.log"
+RES="relaxng-test-results.xml"
+
+log = open(LOG, "w")
+nb_schemas_tests = 0
+nb_schemas_success = 0
+nb_schemas_failed = 0
+nb_instances_tests = 0
+nb_instances_success = 0
+nb_instances_failed = 0
+
+libxml2.lineNumbersDefault(1)
+#
+# Error and warnng callbacks
+#
+def callback(ctx, str):
+ global log
+ log.write("%s%s" % (ctx, str))
+
+libxml2.registerErrorHandler(callback, "")
+
+#
+# Resolver callback
+#
+resources = {}
+def resolver(URL, ID, ctxt):
+ global resources
+
+ if string.find(URL, '#') != -1:
+ URL = URL[0:string.find(URL, '#')]
+ if resources.has_key(URL):
+ return(StringIO.StringIO(resources[URL]))
+ log.write("Resolver failure: asked %s\n" % (URL))
+ log.write("resources: %s\n" % (resources))
+ return None
+
+#
+# Load the previous results
+#
+#results = {}
+#previous = {}
+#
+#try:
+# res = libxml2.parseFile(RES)
+#except:
+# log.write("Could not parse %s" % (RES))
+
+#
+# handle a valid instance
+#
+def handle_valid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nFailed to parse correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ return
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ except:
+ ret = -1
+ if ret != 0:
+ log.write("\nFailed to validate correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+ doc.freeDoc()
+
+#
+# handle an invalid instance
+#
+def handle_invalid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nStrange: failed to parse incorrect instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ return
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ except:
+ ret = -1
+ if ret == 0:
+ log.write("\nFailed to detect validation problem in instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+ doc.freeDoc()
+
+#
+# handle an incorrect test
+#
+def handle_correct(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs == None:
+ log.write("\nFailed to compile correct schema:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+ nb_schemas_success = nb_schemas_success + 1
+ return rngs
+
+def handle_incorrect(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs != None:
+ log.write("\nFailed to detect schema error in:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+# log.write("\nSuccess detecting schema error in:\n-----\n")
+# log.write(schema)
+# log.write("\n-----\n")
+ nb_schemas_success = nb_schemas_success + 1
+ return None
+
+#
+# resource handling: keep a dictionary of URL->string mappings
+#
+def handle_resource(node, dir):
+ global resources
+
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ res = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ res = res + child.serialize()
+ child = child.next
+ resources[name] = res
+
+#
+# dir handling: pseudo directory resources
+#
+def handle_dir(node, dir):
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, name)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, name)
+
+#
+# handle a testCase element
+#
+def handle_testCase(node):
+ global nb_schemas_tests
+ global nb_instances_tests
+ global resources
+
+ sections = node.xpathEval('string(section)')
+ log.write("\n ======== test %d line %d section %s ==========\n" % (
+
+ nb_schemas_tests, node.lineNo(), sections))
+ resources = {}
+ if debug:
+ print "test %d line %d" % (nb_schemas_tests, node.lineNo())
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, None)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, None)
+
+ tsts = node.xpathEval('incorrect')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <incorrect> example" %(node.lineNo())
+ schema = handle_incorrect(tsts[0])
+ else:
+ tsts = node.xpathEval('correct')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <correct> example"% (node.lineNo())
+ schema = handle_correct(tsts[0])
+ else:
+ print "warning <testCase> line %d has no <correct> nor <incorrect> child" % (node.lineNo())
+
+ nb_schemas_tests = nb_schemas_tests + 1;
+
+ valids = node.xpathEval('valid')
+ invalids = node.xpathEval('invalid')
+ nb_instances_tests = nb_instances_tests + len(valids) + len(invalids)
+ if schema != None:
+ for valid in valids:
+ handle_valid(valid, schema)
+ for invalid in invalids:
+ handle_invalid(invalid, schema)
+
+
+#
+# handle a testSuite element
+#
+def handle_testSuite(node, level = 0):
+ global nb_schemas_tests, nb_schemas_success, nb_schemas_failed
+ global nb_instances_tests, nb_instances_success, nb_instances_failed
+ global quiet
+ if level >= 1:
+ old_schemas_tests = nb_schemas_tests
+ old_schemas_success = nb_schemas_success
+ old_schemas_failed = nb_schemas_failed
+ old_instances_tests = nb_instances_tests
+ old_instances_success = nb_instances_success
+ old_instances_failed = nb_instances_failed
+
+ docs = node.xpathEval('documentation')
+ authors = node.xpathEval('author')
+ if docs != []:
+ msg = ""
+ for doc in docs:
+ msg = msg + doc.content + " "
+ if authors != []:
+ msg = msg + "written by "
+ for author in authors:
+ msg = msg + author.content + " "
+ if quiet == 0:
+ print msg
+ sections = node.xpathEval('section')
+ if sections != [] and level <= 0:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ if quiet == 0:
+ print "Tests for section %s" % (msg)
+ for test in node.xpathEval('testCase'):
+ handle_testCase(test)
+ for test in node.xpathEval('testSuite'):
+ handle_testSuite(test, level + 1)
+
+
+ if verbose and level >= 1 and sections != []:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ print "Result of tests for section %s" % (msg)
+ if nb_schemas_tests != old_schemas_tests:
+ print "found %d test schemas: %d success %d failures" % (
+ nb_schemas_tests - old_schemas_tests,
+ nb_schemas_success - old_schemas_success,
+ nb_schemas_failed - old_schemas_failed)
+ if nb_instances_tests != old_instances_tests:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests - old_instances_tests,
+ nb_instances_success - old_instances_success,
+ nb_instances_failed - old_instances_failed)
+#
+# Parse the conf file
+#
+libxml2.substituteEntitiesDefault(1);
+testsuite = libxml2.parseFile(CONF)
+libxml2.setEntityLoader(resolver)
+root = testsuite.getRootElement()
+if root.name != 'testSuite':
+ print "%s doesn't start with a testSuite element, aborting" % (CONF)
+ sys.exit(1)
+if quiet == 0:
+ print "Running Relax NG testsuite"
+handle_testSuite(root)
+
+if quiet == 0:
+ print "\nTOTAL:\n"
+if quiet == 0 or nb_schemas_failed != 0:
+ print "found %d test schemas: %d success %d failures" % (
+ nb_schemas_tests, nb_schemas_success, nb_schemas_failed)
+if quiet == 0 or nb_instances_failed != 0:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests, nb_instances_success, nb_instances_failed)
+
+testsuite.freeDoc()
+
+# Memory debug specific
+libxml2.relaxNGCleanupTypes()
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ if quiet == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()
diff --git a/check-relaxng-test-suite2.py b/check-relaxng-test-suite2.py
new file mode 100755
index 0000000..8618db7
--- /dev/null
+++ b/check-relaxng-test-suite2.py
@@ -0,0 +1,418 @@
+#!/usr/bin/python
+import sys
+import time
+import os
+import string
+import StringIO
+sys.path.insert(0, "python")
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+debug = 0
+quiet = 1
+
+#
+# the testsuite description
+#
+CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/testsuite.xml")
+LOG="check-relaxng-test-suite2.log"
+
+log = open(LOG, "w")
+nb_schemas_tests = 0
+nb_schemas_success = 0
+nb_schemas_failed = 0
+nb_instances_tests = 0
+nb_instances_success = 0
+nb_instances_failed = 0
+
+libxml2.lineNumbersDefault(1)
+#
+# Resolver callback
+#
+resources = {}
+def resolver(URL, ID, ctxt):
+ global resources
+
+ if resources.has_key(URL):
+ return(StringIO.StringIO(resources[URL]))
+ log.write("Resolver failure: asked %s\n" % (URL))
+ log.write("resources: %s\n" % (resources))
+ return None
+
+#
+# Load the previous results
+#
+#results = {}
+#previous = {}
+#
+#try:
+# res = libxml2.parseFile(RES)
+#except:
+# log.write("Could not parse %s" % (RES))
+
+#
+# handle a valid instance
+#
+def handle_valid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = node.prop("dtd")
+ if instance == None:
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+# mem = libxml2.debugMemory(1);
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nFailed to parse correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ return
+
+ if debug:
+ print "instance line %d" % (node.lineNo())
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ del ctxt
+ except:
+ ret = -1
+
+ doc.freeDoc()
+# if mem != libxml2.debugMemory(1):
+# print "validating instance %d line %d leaks" % (
+# nb_instances_tests, node.lineNo())
+
+ if ret != 0:
+ log.write("\nFailed to validate correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+
+#
+# handle an invalid instance
+#
+def handle_invalid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = node.prop("dtd")
+ if instance == None:
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+# mem = libxml2.debugMemory(1);
+
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nStrange: failed to parse incorrect instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ return
+
+ if debug:
+ print "instance line %d" % (node.lineNo())
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ del ctxt
+
+ except:
+ ret = -1
+
+ doc.freeDoc()
+# mem2 = libxml2.debugMemory(1)
+# if mem != mem2:
+# print "validating instance %d line %d leaks %d bytes" % (
+# nb_instances_tests, node.lineNo(), mem2 - mem)
+
+ if ret == 0:
+ log.write("\nFailed to detect validation problem in instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+
+#
+# handle an incorrect test
+#
+def handle_correct(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs == None:
+ log.write("\nFailed to compile correct schema:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+ nb_schemas_success = nb_schemas_success + 1
+ return rngs
+
+def handle_incorrect(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs != None:
+ log.write("\nFailed to detect schema error in:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+# log.write("\nSuccess detecting schema error in:\n-----\n")
+# log.write(schema)
+# log.write("\n-----\n")
+ nb_schemas_success = nb_schemas_success + 1
+ return None
+
+#
+# resource handling: keep a dictionary of URL->string mappings
+#
+def handle_resource(node, dir):
+ global resources
+
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ res = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ res = res + child.serialize()
+ child = child.next
+ resources[name] = res
+
+#
+# dir handling: pseudo directory resources
+#
+def handle_dir(node, dir):
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, name)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, name)
+
+#
+# handle a testCase element
+#
+def handle_testCase(node):
+ global nb_schemas_tests
+ global nb_instances_tests
+ global resources
+
+ sections = node.xpathEval('string(section)')
+ log.write("\n ======== test %d line %d section %s ==========\n" % (
+
+ nb_schemas_tests, node.lineNo(), sections))
+ resources = {}
+ if debug:
+ print "test %d line %d" % (nb_schemas_tests, node.lineNo())
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, None)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, None)
+
+ tsts = node.xpathEval('incorrect')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <incorrect> example" %(node.lineNo())
+ schema = handle_incorrect(tsts[0])
+ else:
+ tsts = node.xpathEval('correct')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <correct> example"% (node.lineNo())
+ schema = handle_correct(tsts[0])
+ else:
+ print "warning <testCase> line %d has no <correct> nor <incorrect> child" % (node.lineNo())
+
+ nb_schemas_tests = nb_schemas_tests + 1;
+
+ valids = node.xpathEval('valid')
+ invalids = node.xpathEval('invalid')
+ nb_instances_tests = nb_instances_tests + len(valids) + len(invalids)
+ if schema != None:
+ for valid in valids:
+ handle_valid(valid, schema)
+ for invalid in invalids:
+ handle_invalid(invalid, schema)
+
+
+#
+# handle a testSuite element
+#
+def handle_testSuite(node, level = 0):
+ global nb_schemas_tests, nb_schemas_success, nb_schemas_failed
+ global nb_instances_tests, nb_instances_success, nb_instances_failed
+ if level >= 1:
+ old_schemas_tests = nb_schemas_tests
+ old_schemas_success = nb_schemas_success
+ old_schemas_failed = nb_schemas_failed
+ old_instances_tests = nb_instances_tests
+ old_instances_success = nb_instances_success
+ old_instances_failed = nb_instances_failed
+
+ docs = node.xpathEval('documentation')
+ authors = node.xpathEval('author')
+ if docs != []:
+ msg = ""
+ for doc in docs:
+ msg = msg + doc.content + " "
+ if authors != []:
+ msg = msg + "written by "
+ for author in authors:
+ msg = msg + author.content + " "
+ if quiet == 0:
+ print msg
+ sections = node.xpathEval('section')
+ if sections != [] and level <= 0:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ if quiet == 0:
+ print "Tests for section %s" % (msg)
+ for test in node.xpathEval('testCase'):
+ handle_testCase(test)
+ for test in node.xpathEval('testSuite'):
+ handle_testSuite(test, level + 1)
+
+
+ if level >= 1 and sections != []:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ print "Result of tests for section %s" % (msg)
+ if nb_schemas_tests != old_schemas_tests:
+ print "found %d test schemas: %d success %d failures" % (
+ nb_schemas_tests - old_schemas_tests,
+ nb_schemas_success - old_schemas_success,
+ nb_schemas_failed - old_schemas_failed)
+ if nb_instances_tests != old_instances_tests:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests - old_instances_tests,
+ nb_instances_success - old_instances_success,
+ nb_instances_failed - old_instances_failed)
+#
+# Parse the conf file
+#
+libxml2.substituteEntitiesDefault(1);
+testsuite = libxml2.parseFile(CONF)
+
+#
+# Error and warnng callbacks
+#
+def callback(ctx, str):
+ global log
+ log.write("%s%s" % (ctx, str))
+
+libxml2.registerErrorHandler(callback, "")
+
+libxml2.setEntityLoader(resolver)
+root = testsuite.getRootElement()
+if root.name != 'testSuite':
+ print "%s doesn't start with a testSuite element, aborting" % (CONF)
+ sys.exit(1)
+if quiet == 0:
+ print "Running Relax NG testsuite"
+handle_testSuite(root)
+
+if quiet == 0:
+ print "\nTOTAL:\n"
+if quiet == 0 or nb_schemas_failed != 0:
+ print "found %d test schemas: %d success %d failures" % (
+ nb_schemas_tests, nb_schemas_success, nb_schemas_failed)
+if quiet == 0 or nb_instances_failed != 0:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests, nb_instances_success, nb_instances_failed)
+
+
+testsuite.freeDoc()
+
+# Memory debug specific
+libxml2.relaxNGCleanupTypes()
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ if quiet == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()
diff --git a/check-xinclude-test-suite.py b/check-xinclude-test-suite.py
new file mode 100755
index 0000000..f470011
--- /dev/null
+++ b/check-xinclude-test-suite.py
@@ -0,0 +1,221 @@
+#!/usr/bin/python
+import sys
+import time
+import os
+import string
+sys.path.insert(0, "python")
+import libxml2
+
+#
+# the testsuite description
+#
+DIR="xinclude-test-suite"
+CONF="testdescr.xml"
+LOG="check-xinclude-test-suite.log"
+
+log = open(LOG, "w")
+
+os.chdir(DIR)
+
+test_nr = 0
+test_succeed = 0
+test_failed = 0
+test_error = 0
+#
+# Error and warning handlers
+#
+error_nr = 0
+error_msg = ''
+
+def errorHandler(ctx, str):
+ global error_nr
+ global error_msg
+
+ if string.find(str, "error:") >= 0:
+ error_nr = error_nr + 1
+ if len(error_msg) < 300:
+ if len(error_msg) == 0 or error_msg[-1] == '\n':
+ error_msg = error_msg + " >>" + str
+ else:
+ error_msg = error_msg + str
+
+libxml2.registerErrorHandler(errorHandler, None)
+
+def testXInclude(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ print "testXInclude(%s, %s)" % (filename, id)
+ return 1
+
+def runTest(test, basedir):
+ global test_nr
+ global test_failed
+ global test_error
+ global test_succeed
+ global error_msg
+ global log
+
+ fatal_error = 0
+ uri = test.prop('href')
+ id = test.prop('id')
+ type = test.prop('type')
+ if uri == None:
+ print "Test without ID:", uri
+ return -1
+ if id == None:
+ print "Test without URI:", id
+ return -1
+ if type == None:
+ print "Test without URI:", id
+ return -1
+ if basedir != None:
+ URI = basedir + "/" + uri
+ else:
+ URI = uri
+ if os.access(URI, os.R_OK) == 0:
+ print "Test %s missing: base %s uri %s" % (URI, basedir, uri)
+ return -1
+
+ expected = None
+ outputfile = None
+ diff = None
+ if type != 'error':
+ output = test.xpathEval('string(output)')
+ if output == 'No output file.':
+ output = None
+ if output == '':
+ output = None
+ if output != None:
+ if basedir != None:
+ output = basedir + "/" + output
+ if os.access(output, os.R_OK) == 0:
+ print "Result for %s missing: %s" % (id, output)
+ output = None
+ else:
+ try:
+ f = open(output)
+ expected = f.read()
+ outputfile = output
+ except:
+ print "Result for %s unreadable: %s" % (id, output)
+
+ try:
+ # print "testing %s" % (URI)
+ doc = libxml2.parseFile(URI)
+ except:
+ doc = None
+ if doc != None:
+ res = doc.xincludeProcess()
+ if res >= 0 and expected != None:
+ result = doc.serialize()
+ if result != expected:
+ print "Result for %s differs" % (id)
+ open("xinclude.res", "w").write(result)
+ diff = os.popen("diff %s xinclude.res" % outputfile).read()
+
+ doc.freeDoc()
+ else:
+ print "Failed to parse %s" % (URI)
+ res = -1
+
+
+
+ test_nr = test_nr + 1
+ if type == 'success':
+ if res > 0:
+ test_succeed = test_succeed + 1
+ elif res == 0:
+ test_failed = test_failed + 1
+ print "Test %s: no substitution done ???" % (id)
+ elif res < 0:
+ test_error = test_error + 1
+ print "Test %s: failed valid XInclude processing" % (id)
+ elif type == 'error':
+ if res > 0:
+ test_error = test_error + 1
+ print "Test %s: failed to detect invalid XInclude processing" % (id)
+ elif res == 0:
+ test_failed = test_failed + 1
+ print "Test %s: Invalid but no substitution done" % (id)
+ elif res < 0:
+ test_succeed = test_succeed + 1
+ elif type == 'optional':
+ if res > 0:
+ test_succeed = test_succeed + 1
+ else:
+ print "Test %s: failed optional test" % (id)
+
+ # Log the ontext
+ if res != 1:
+ log.write("Test ID %s\n" % (id))
+ log.write(" File: %s\n" % (URI))
+ content = string.strip(test.content)
+ while content[-1] == '\n':
+ content = content[0:-1]
+ log.write(" %s:%s\n\n" % (type, content))
+ if error_msg != '':
+ log.write(" ----\n%s ----\n" % (error_msg))
+ error_msg = ''
+ log.write("\n")
+ if diff != None:
+ log.write("diff from test %s:\n" %(id))
+ log.write(" -----------\n%s\n -----------\n" % (diff));
+
+ return 0
+
+
+def runTestCases(case):
+ creator = case.prop('creator')
+ if creator != None:
+ print "=>", creator
+ base = case.getBase(None)
+ basedir = case.prop('basedir')
+ if basedir != None:
+ base = libxml2.buildURI(basedir, base)
+ test = case.children
+ while test != None:
+ if test.name == 'testcase':
+ runTest(test, base)
+ if test.name == 'testcases':
+ runTestCases(test)
+ test = test.next
+
+conf = libxml2.parseFile(CONF)
+if conf == None:
+ print "Unable to load %s" % CONF
+ sys.exit(1)
+
+testsuite = conf.getRootElement()
+if testsuite.name != 'testsuite':
+ print "Expecting TESTSUITE root element: aborting"
+ sys.exit(1)
+
+profile = testsuite.prop('PROFILE')
+if profile != None:
+ print profile
+
+start = time.time()
+
+case = testsuite.children
+while case != None:
+ if case.name == 'testcases':
+ old_test_nr = test_nr
+ old_test_succeed = test_succeed
+ old_test_failed = test_failed
+ old_test_error = test_error
+ runTestCases(case)
+ print " Ran %d tests: %d suceeded, %d failed and %d generated an error" % (
+ test_nr - old_test_nr, test_succeed - old_test_succeed,
+ test_failed - old_test_failed, test_error - old_test_error)
+ case = case.next
+
+conf.freeDoc()
+log.close()
+
+print "Ran %d tests: %d suceeded, %d failed and %d generated an error in %.2f s." % (
+ test_nr, test_succeed, test_failed, test_error, time.time() - start)
diff --git a/check-xml-test-suite.py b/check-xml-test-suite.py
new file mode 100755
index 0000000..2de07b1
--- /dev/null
+++ b/check-xml-test-suite.py
@@ -0,0 +1,409 @@
+#!/usr/bin/python
+import sys
+import time
+import os
+import string
+sys.path.insert(0, "python")
+import libxml2
+
+test_nr = 0
+test_succeed = 0
+test_failed = 0
+test_error = 0
+
+#
+# the testsuite description
+#
+CONF="xml-test-suite/xmlconf/xmlconf.xml"
+LOG="check-xml-test-suite.log"
+
+log = open(LOG, "w")
+
+#
+# Error and warning handlers
+#
+error_nr = 0
+error_msg = ''
+def errorHandler(ctx, str):
+ global error_nr
+ global error_msg
+
+ error_nr = error_nr + 1
+ if len(error_msg) < 300:
+ if len(error_msg) == 0 or error_msg[-1] == '\n':
+ error_msg = error_msg + " >>" + str
+ else:
+ error_msg = error_msg + str
+
+libxml2.registerErrorHandler(errorHandler, None)
+
+#warning_nr = 0
+#warning = ''
+#def warningHandler(ctx, str):
+# global warning_nr
+# global warning
+#
+# warning_nr = warning_nr + 1
+# warning = warning + str
+#
+#libxml2.registerWarningHandler(warningHandler, None)
+
+#
+# Used to load the XML testsuite description
+#
+def loadNoentDoc(filename):
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return None
+ ctxt.replaceEntities(1)
+ ctxt.parseDocument()
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if ctxt.wellFormed() != 1:
+ doc.freeDoc()
+ return None
+ return doc
+
+#
+# The conformance testing routines
+#
+
+def testNotWf(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if doc != None:
+ doc.freeDoc()
+ if ret == 0 or ctxt.wellFormed() != 0:
+ print "%s: error: Well Formedness error not detected" % (id)
+ log.write("%s: error: Well Formedness error not detected\n" % (id))
+ return 0
+ return 1
+
+def testNotWfEnt(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.replaceEntities(1)
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if doc != None:
+ doc.freeDoc()
+ if ret == 0 or ctxt.wellFormed() != 0:
+ print "%s: error: Well Formedness error not detected" % (id)
+ log.write("%s: error: Well Formedness error not detected\n" % (id))
+ return 0
+ return 1
+
+def testNotWfEntDtd(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.replaceEntities(1)
+ ctxt.loadSubset(1)
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if doc != None:
+ doc.freeDoc()
+ if ret == 0 or ctxt.wellFormed() != 0:
+ print "%s: error: Well Formedness error not detected" % (id)
+ log.write("%s: error: Well Formedness error not detected\n" % (id))
+ return 0
+ return 1
+
+def testWfEntDtd(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.replaceEntities(1)
+ ctxt.loadSubset(1)
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if doc == None or ret != 0 or ctxt.wellFormed() == 0:
+ print "%s: error: wrongly failed to parse the document" % (id)
+ log.write("%s: error: wrongly failed to parse the document\n" % (id))
+ if doc != None:
+ doc.freeDoc()
+ return 0
+ if error_nr != 0:
+ print "%s: warning: WF document generated an error msg" % (id)
+ log.write("%s: error: WF document generated an error msg\n" % (id))
+ doc.freeDoc()
+ return 2
+ doc.freeDoc()
+ return 1
+
+def testError(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.replaceEntities(1)
+ ctxt.loadSubset(1)
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ if doc != None:
+ doc.freeDoc()
+ if ctxt.wellFormed() == 0:
+ print "%s: warning: failed to parse the document but accepted" % (id)
+ log.write("%s: warning: failed to parse the document but accepte\n" % (id))
+ return 2
+ if error_nr != 0:
+ print "%s: warning: WF document generated an error msg" % (id)
+ log.write("%s: error: WF document generated an error msg\n" % (id))
+ return 2
+ return 1
+
+def testInvalid(filename, id):
+ global error_nr
+ global error_msg
+ global log
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.validate(1)
+ ret = ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ valid = ctxt.isValid()
+ if doc == None:
+ print "%s: error: wrongly failed to parse the document" % (id)
+ log.write("%s: error: wrongly failed to parse the document\n" % (id))
+ return 0
+ if valid == 1:
+ print "%s: error: Validity error not detected" % (id)
+ log.write("%s: error: Validity error not detected\n" % (id))
+ doc.freeDoc()
+ return 0
+ if error_nr == 0:
+ print "%s: warning: Validity error not reported" % (id)
+ log.write("%s: warning: Validity error not reported\n" % (id))
+ doc.freeDoc()
+ return 2
+
+ doc.freeDoc()
+ return 1
+
+def testValid(filename, id):
+ global error_nr
+ global error_msg
+
+ error_nr = 0
+ error_msg = ''
+
+ ctxt = libxml2.createFileParserCtxt(filename)
+ if ctxt == None:
+ return -1
+ ctxt.validate(1)
+ ctxt.parseDocument()
+
+ try:
+ doc = ctxt.doc()
+ except:
+ doc = None
+ valid = ctxt.isValid()
+ if doc == None:
+ print "%s: error: wrongly failed to parse the document" % (id)
+ log.write("%s: error: wrongly failed to parse the document\n" % (id))
+ return 0
+ if valid != 1:
+ print "%s: error: Validity check failed" % (id)
+ log.write("%s: error: Validity check failed\n" % (id))
+ doc.freeDoc()
+ return 0
+ if error_nr != 0 or valid != 1:
+ print "%s: warning: valid document reported an error" % (id)
+ log.write("%s: warning: valid document reported an error\n" % (id))
+ doc.freeDoc()
+ return 2
+ doc.freeDoc()
+ return 1
+
+def runTest(test):
+ global test_nr
+ global test_succeed
+ global test_failed
+ global error_msg
+ global log
+
+ uri = test.prop('URI')
+ id = test.prop('ID')
+ if uri == None:
+ print "Test without ID:", uri
+ return -1
+ if id == None:
+ print "Test without URI:", id
+ return -1
+ base = test.getBase(None)
+ URI = libxml2.buildURI(uri, base)
+ if os.access(URI, os.R_OK) == 0:
+ print "Test %s missing: base %s uri %s" % (URI, base, uri)
+ return -1
+ type = test.prop('TYPE')
+ if type == None:
+ print "Test %s missing TYPE" % (id)
+ return -1
+
+ extra = None
+ if type == "invalid":
+ res = testInvalid(URI, id)
+ elif type == "valid":
+ res = testValid(URI, id)
+ elif type == "not-wf":
+ extra = test.prop('ENTITIES')
+ # print URI
+ #if extra == None:
+ # res = testNotWfEntDtd(URI, id)
+ #elif extra == 'none':
+ # res = testNotWf(URI, id)
+ #elif extra == 'general':
+ # res = testNotWfEnt(URI, id)
+ #elif extra == 'both' or extra == 'parameter':
+ res = testNotWfEntDtd(URI, id)
+ #else:
+ # print "Unknow value %s for an ENTITIES test value" % (extra)
+ # return -1
+ elif type == "error":
+ res = testError(URI, id)
+ else:
+ # TODO skipped for now
+ return -1
+
+ test_nr = test_nr + 1
+ if res > 0:
+ test_succeed = test_succeed + 1
+ elif res == 0:
+ test_failed = test_failed + 1
+ elif res < 0:
+ test_error = test_error + 1
+
+ # Log the ontext
+ if res != 1:
+ log.write(" File: %s\n" % (URI))
+ content = string.strip(test.content)
+ while content[-1] == '\n':
+ content = content[0:-1]
+ if extra != None:
+ log.write(" %s:%s:%s\n" % (type, extra, content))
+ else:
+ log.write(" %s:%s\n\n" % (type, content))
+ if error_msg != '':
+ log.write(" ----\n%s ----\n" % (error_msg))
+ error_msg = ''
+ log.write("\n")
+
+ return 0
+
+
+def runTestCases(case):
+ profile = case.prop('PROFILE')
+ if profile != None and \
+ string.find(profile, "IBM XML Conformance Test Suite - Production") < 0:
+ print "=>", profile
+ test = case.children
+ while test != None:
+ if test.name == 'TEST':
+ runTest(test)
+ if test.name == 'TESTCASES':
+ runTestCases(test)
+ test = test.next
+
+conf = loadNoentDoc(CONF)
+if conf == None:
+ print "Unable to load %s" % CONF
+ sys.exit(1)
+
+testsuite = conf.getRootElement()
+if testsuite.name != 'TESTSUITE':
+ print "Expecting TESTSUITE root element: aborting"
+ sys.exit(1)
+
+profile = testsuite.prop('PROFILE')
+if profile != None:
+ print profile
+
+start = time.time()
+
+case = testsuite.children
+while case != None:
+ if case.name == 'TESTCASES':
+ old_test_nr = test_nr
+ old_test_succeed = test_succeed
+ old_test_failed = test_failed
+ old_test_error = test_error
+ runTestCases(case)
+ print " Ran %d tests: %d suceeded, %d failed and %d generated an error" % (
+ test_nr - old_test_nr, test_succeed - old_test_succeed,
+ test_failed - old_test_failed, test_error - old_test_error)
+ case = case.next
+
+conf.freeDoc()
+log.close()
+
+print "Ran %d tests: %d suceeded, %d failed and %d generated an error in %.2f s." % (
+ test_nr, test_succeed, test_failed, test_error, time.time() - start)
diff --git a/check-xsddata-test-suite.py b/check-xsddata-test-suite.py
new file mode 100755
index 0000000..c946129
--- /dev/null
+++ b/check-xsddata-test-suite.py
@@ -0,0 +1,420 @@
+#!/usr/bin/python
+import sys
+import time
+import os
+import string
+import StringIO
+sys.path.insert(0, "python")
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+debug = 0
+verbose = 0
+quiet = 1
+
+#
+# the testsuite description
+#
+CONF=os.path.join(os.path.dirname(__file__), "test/xsdtest/xsdtestsuite.xml")
+LOG="check-xsddata-test-suite.log"
+
+log = open(LOG, "w")
+nb_schemas_tests = 0
+nb_schemas_success = 0
+nb_schemas_failed = 0
+nb_instances_tests = 0
+nb_instances_success = 0
+nb_instances_failed = 0
+
+libxml2.lineNumbersDefault(1)
+#
+# Error and warnng callbacks
+#
+def callback(ctx, str):
+ global log
+ log.write("%s%s" % (ctx, str))
+
+libxml2.registerErrorHandler(callback, "")
+
+#
+# Resolver callback
+#
+resources = {}
+def resolver(URL, ID, ctxt):
+ global resources
+
+ if resources.has_key(URL):
+ return(StringIO.StringIO(resources[URL]))
+ log.write("Resolver failure: asked %s\n" % (URL))
+ log.write("resources: %s\n" % (resources))
+ return None
+
+#
+# handle a valid instance
+#
+def handle_valid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = node.prop("dtd")
+ if instance == None:
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+ mem = libxml2.debugMemory(1);
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nFailed to parse correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ return
+
+ if debug:
+ print "instance line %d" % (node.lineNo())
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ del ctxt
+ except:
+ ret = -1
+
+ doc.freeDoc()
+ if mem != libxml2.debugMemory(1):
+ print "validating instance %d line %d leaks" % (
+ nb_instances_tests, node.lineNo())
+
+ if ret != 0:
+ log.write("\nFailed to validate correct instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+
+#
+# handle an invalid instance
+#
+def handle_invalid(node, schema):
+ global log
+ global nb_instances_success
+ global nb_instances_failed
+
+ instance = node.prop("dtd")
+ if instance == None:
+ instance = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ instance = instance + child.serialize()
+ child = child.next
+
+# mem = libxml2.debugMemory(1);
+
+ try:
+ doc = libxml2.parseDoc(instance)
+ except:
+ doc = None
+
+ if doc == None:
+ log.write("\nStrange: failed to parse incorrect instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ return
+
+ if debug:
+ print "instance line %d" % (node.lineNo())
+
+ try:
+ ctxt = schema.relaxNGNewValidCtxt()
+ ret = doc.relaxNGValidateDoc(ctxt)
+ del ctxt
+
+ except:
+ ret = -1
+
+ doc.freeDoc()
+# if mem != libxml2.debugMemory(1):
+# print "validating instance %d line %d leaks" % (
+# nb_instances_tests, node.lineNo())
+
+ if ret == 0:
+ log.write("\nFailed to detect validation problem in instance:\n-----\n")
+ log.write(instance)
+ log.write("\n-----\n")
+ nb_instances_failed = nb_instances_failed + 1
+ else:
+ nb_instances_success = nb_instances_success + 1
+
+#
+# handle an incorrect test
+#
+def handle_correct(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs == None:
+ log.write("\nFailed to compile correct schema:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+ nb_schemas_success = nb_schemas_success + 1
+ return rngs
+
+def handle_incorrect(node):
+ global log
+ global nb_schemas_success
+ global nb_schemas_failed
+
+ schema = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ schema = schema + child.serialize()
+ child = child.next
+
+ try:
+ rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+ rngs = rngp.relaxNGParse()
+ except:
+ rngs = None
+ if rngs != None:
+ log.write("\nFailed to detect schema error in:\n-----\n")
+ log.write(schema)
+ log.write("\n-----\n")
+ nb_schemas_failed = nb_schemas_failed + 1
+ else:
+# log.write("\nSuccess detecting schema error in:\n-----\n")
+# log.write(schema)
+# log.write("\n-----\n")
+ nb_schemas_success = nb_schemas_success + 1
+ return None
+
+#
+# resource handling: keep a dictionary of URL->string mappings
+#
+def handle_resource(node, dir):
+ global resources
+
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ res = ""
+ child = node.children
+ while child != None:
+ if child.type != 'text':
+ res = res + child.serialize()
+ child = child.next
+ resources[name] = res
+
+#
+# dir handling: pseudo directory resources
+#
+def handle_dir(node, dir):
+ try:
+ name = node.prop('name')
+ except:
+ name = None
+
+ if name == None or name == '':
+ log.write("resource has no name")
+ return;
+
+ if dir != None:
+# name = libxml2.buildURI(name, dir)
+ name = dir + '/' + name
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, name)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, name)
+
+#
+# handle a testCase element
+#
+def handle_testCase(node):
+ global nb_schemas_tests
+ global nb_instances_tests
+ global resources
+
+ sections = node.xpathEval('string(section)')
+ log.write("\n ======== test %d line %d section %s ==========\n" % (
+
+ nb_schemas_tests, node.lineNo(), sections))
+ resources = {}
+ if debug:
+ print "test %d line %d" % (nb_schemas_tests, node.lineNo())
+
+ dirs = node.xpathEval('dir')
+ for dir in dirs:
+ handle_dir(dir, None)
+ res = node.xpathEval('resource')
+ for r in res:
+ handle_resource(r, None)
+
+ tsts = node.xpathEval('incorrect')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <incorrect> example" %(node.lineNo())
+ schema = handle_incorrect(tsts[0])
+ else:
+ tsts = node.xpathEval('correct')
+ if tsts != []:
+ if len(tsts) != 1:
+ print "warning test line %d has more than one <correct> example"% (node.lineNo())
+ schema = handle_correct(tsts[0])
+ else:
+ print "warning <testCase> line %d has no <correct> nor <incorrect> child" % (node.lineNo())
+
+ nb_schemas_tests = nb_schemas_tests + 1;
+
+ valids = node.xpathEval('valid')
+ invalids = node.xpathEval('invalid')
+ nb_instances_tests = nb_instances_tests + len(valids) + len(invalids)
+ if schema != None:
+ for valid in valids:
+ handle_valid(valid, schema)
+ for invalid in invalids:
+ handle_invalid(invalid, schema)
+
+
+#
+# handle a testSuite element
+#
+def handle_testSuite(node, level = 0):
+ global nb_schemas_tests, nb_schemas_success, nb_schemas_failed
+ global nb_instances_tests, nb_instances_success, nb_instances_failed
+ if verbose and level >= 0:
+ old_schemas_tests = nb_schemas_tests
+ old_schemas_success = nb_schemas_success
+ old_schemas_failed = nb_schemas_failed
+ old_instances_tests = nb_instances_tests
+ old_instances_success = nb_instances_success
+ old_instances_failed = nb_instances_failed
+
+ docs = node.xpathEval('documentation')
+ authors = node.xpathEval('author')
+ if docs != []:
+ msg = ""
+ for doc in docs:
+ msg = msg + doc.content + " "
+ if authors != []:
+ msg = msg + "written by "
+ for author in authors:
+ msg = msg + author.content + " "
+ if quiet == 0:
+ print msg
+ sections = node.xpathEval('section')
+ if verbose and sections != [] and level <= 0:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ if quiet == 0:
+ print "Tests for section %s" % (msg)
+ for test in node.xpathEval('testCase'):
+ handle_testCase(test)
+ for test in node.xpathEval('testSuite'):
+ handle_testSuite(test, level + 1)
+
+
+ if verbose and level >= 0 :
+ if sections != []:
+ msg = ""
+ for section in sections:
+ msg = msg + section.content + " "
+ print "Result of tests for section %s" % (msg)
+ elif docs != []:
+ msg = ""
+ for doc in docs:
+ msg = msg + doc.content + " "
+ print "Result of tests for %s" % (msg)
+
+ if nb_schemas_tests != old_schemas_tests:
+ print "found %d test schemas: %d success %d failures" % (
+ nb_schemas_tests - old_schemas_tests,
+ nb_schemas_success - old_schemas_success,
+ nb_schemas_failed - old_schemas_failed)
+ if nb_instances_tests != old_instances_tests:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests - old_instances_tests,
+ nb_instances_success - old_instances_success,
+ nb_instances_failed - old_instances_failed)
+#
+# Parse the conf file
+#
+libxml2.substituteEntitiesDefault(1);
+testsuite = libxml2.parseFile(CONF)
+
+#
+# Error and warnng callbacks
+#
+def callback(ctx, str):
+ global log
+ log.write("%s%s" % (ctx, str))
+
+libxml2.registerErrorHandler(callback, "")
+
+libxml2.setEntityLoader(resolver)
+root = testsuite.getRootElement()
+if root.name != 'testSuite':
+ print "%s doesn't start with a testSuite element, aborting" % (CONF)
+ sys.exit(1)
+if quiet == 0:
+ print "Running Relax NG testsuite"
+handle_testSuite(root)
+
+if quiet == 0 or nb_schemas_failed != 0:
+ print "\nTOTAL:\nfound %d test schemas: %d success %d failures" % (
+ nb_schemas_tests, nb_schemas_success, nb_schemas_failed)
+if quiet == 0 or nb_instances_failed != 0:
+ print "found %d test instances: %d success %d failures" % (
+ nb_instances_tests, nb_instances_success, nb_instances_failed)
+
+testsuite.freeDoc()
+
+# Memory debug specific
+libxml2.relaxNGCleanupTypes()
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ if quiet == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()
diff --git a/chvalid.c b/chvalid.c
new file mode 100644
index 0000000..06e8db0
--- /dev/null
+++ b/chvalid.c
@@ -0,0 +1,336 @@
+/*
+ * chvalid.c: this module implements the character range
+ * validation APIs
+ *
+ * This file is automatically generated from the cvs source
+ * definition files using the genChRanges.py Python script
+ *
+ * Generation date: Mon Mar 27 11:09:48 2006
+ * Sources: chvalid.def
+ * William Brack <wbrack@mmm.com.hk>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#include <libxml/chvalid.h>
+
+/*
+ * The initial tables ({func_name}_tab) are used to validate whether a
+ * single-byte character is within the specified group. Each table
+ * contains 256 bytes, with each byte representing one of the 256
+ * possible characters. If the table byte is set, the character is
+ * allowed.
+ *
+ */
+const unsigned char xmlIsPubidChar_tab[256] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01,
+ 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00 };
+
+static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
+ {0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
+ {0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
+ {0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
+ {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
+ {0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
+ {0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
+ {0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
+ {0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
+ {0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
+ {0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
+ {0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
+ {0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
+ {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
+ {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
+ {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
+ {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
+ {0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
+ {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
+ {0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
+ {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
+ {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
+ {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
+ {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
+ {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
+ {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
+ {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
+ {0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
+ {0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
+ {0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
+ {0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
+ {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
+ {0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
+ {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
+ {0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
+ {0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
+ {0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
+ {0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
+ {0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
+ {0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
+ {0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
+ {0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
+ {0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
+ {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
+ {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
+ {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
+ {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
+ {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
+ {0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
+ {0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
+const xmlChRangeGroup xmlIsBaseCharGroup =
+ {197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
+
+static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
+ {0xe000, 0xfffd}};
+static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
+const xmlChRangeGroup xmlIsCharGroup =
+ {2, 1, xmlIsChar_srng, xmlIsChar_lrng};
+
+static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
+ {0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
+ {0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
+ {0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
+ {0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903},
+ {0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954},
+ {0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be},
+ {0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
+ {0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c},
+ {0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48},
+ {0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc},
+ {0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03},
+ {0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d},
+ {0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
+ {0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44},
+ {0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83},
+ {0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
+ {0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
+ {0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e},
+ {0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd},
+ {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39},
+ {0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b},
+ {0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
+ {0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
+ {0x3099, 0x3099}, {0x309a, 0x309a}};
+const xmlChRangeGroup xmlIsCombiningGroup =
+ {95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
+
+static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
+ {0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
+ {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
+ {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
+ {0xf20, 0xf29}};
+const xmlChRangeGroup xmlIsDigitGroup =
+ {14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
+
+static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
+ {0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
+ {0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
+ {0x30fc, 0x30fe}};
+const xmlChRangeGroup xmlIsExtenderGroup =
+ {10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
+
+static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
+ {0x3021, 0x3029}, {0x4e00, 0x9fa5}};
+const xmlChRangeGroup xmlIsIdeographicGroup =
+ {3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};
+
+
+/**
+ * xmlCharInRange:
+ * @val: character to be validated
+ * @rptr: pointer to range to be used to validate
+ *
+ * Does a binary search of the range table to determine if char
+ * is valid
+ *
+ * Returns: true if character valid, false otherwise
+ */
+int
+xmlCharInRange (unsigned int val, const xmlChRangeGroup *rptr) {
+ int low, high, mid;
+ const xmlChSRange *sptr;
+ const xmlChLRange *lptr;
+
+ if (rptr == NULL) return(0);
+ if (val < 0x10000) { /* is val in 'short' or 'long' array? */
+ if (rptr->nbShortRange == 0)
+ return 0;
+ low = 0;
+ high = rptr->nbShortRange - 1;
+ sptr = rptr->shortRange;
+ while (low <= high) {
+ mid = (low + high) / 2;
+ if ((unsigned short) val < sptr[mid].low) {
+ high = mid - 1;
+ } else {
+ if ((unsigned short) val > sptr[mid].high) {
+ low = mid + 1;
+ } else {
+ return 1;
+ }
+ }
+ }
+ } else {
+ if (rptr->nbLongRange == 0) {
+ return 0;
+ }
+ low = 0;
+ high = rptr->nbLongRange - 1;
+ lptr = rptr->longRange;
+ while (low <= high) {
+ mid = (low + high) / 2;
+ if (val < lptr[mid].low) {
+ high = mid - 1;
+ } else {
+ if (val > lptr[mid].high) {
+ low = mid + 1;
+ } else {
+ return 1;
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+/**
+ * xmlIsBaseChar:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsBaseChar(unsigned int ch) {
+ return(xmlIsBaseCharQ(ch));
+}
+
+
+/**
+ * xmlIsBlank:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsBlank_ch or xmlIsBlankQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsBlank(unsigned int ch) {
+ return(xmlIsBlankQ(ch));
+}
+
+
+/**
+ * xmlIsChar:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsChar_ch or xmlIsCharQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsChar(unsigned int ch) {
+ return(xmlIsCharQ(ch));
+}
+
+
+/**
+ * xmlIsCombining:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsCombiningQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsCombining(unsigned int ch) {
+ return(xmlIsCombiningQ(ch));
+}
+
+
+/**
+ * xmlIsDigit:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsDigit_ch or xmlIsDigitQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsDigit(unsigned int ch) {
+ return(xmlIsDigitQ(ch));
+}
+
+
+/**
+ * xmlIsExtender:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsExtender_ch or xmlIsExtenderQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsExtender(unsigned int ch) {
+ return(xmlIsExtenderQ(ch));
+}
+
+
+/**
+ * xmlIsIdeographic:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsIdeographicQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsIdeographic(unsigned int ch) {
+ return(xmlIsIdeographicQ(ch));
+}
+
+
+/**
+ * xmlIsPubidChar:
+ * @ch: character to validate
+ *
+ * This function is DEPRECATED.
+ * Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead
+ *
+ * Returns true if argument valid, false otherwise
+ */
+int
+xmlIsPubidChar(unsigned int ch) {
+ return(xmlIsPubidCharQ(ch));
+}
+
+#define bottom_chvalid
+#include "elfgcchack.h"
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..eaef4d4
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,333 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Type cast for the gethostbyname() argument */
+#undef GETHOSTBYNAME_ARG_CAST
+
+/* Define to 1 if you have the <ansidecl.h> header file. */
+#undef HAVE_ANSIDECL_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
+/* Whether struct sockaddr::__ss_family exists */
+#undef HAVE_BROKEN_SS_FAMILY
+
+/* Define to 1 if you have the `class' function. */
+#undef HAVE_CLASS
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Have dlopen based dso */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you have the <dl.h> header file. */
+#undef HAVE_DL_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define to 1 if you have the `fprintf' function. */
+#undef HAVE_FPRINTF
+
+/* Define to 1 if you have the `fp_class' function. */
+#undef HAVE_FP_CLASS
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+#undef HAVE_FP_CLASS_H
+
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
+/* Define if getaddrinfo is there */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `isascii' function. */
+#undef HAVE_ISASCII
+
+/* Define if isinf is there */
+#undef HAVE_ISINF
+
+/* Define if isnan is there */
+#undef HAVE_ISNAN
+
+/* Define to 1 if you have the `isnand' function. */
+#undef HAVE_ISNAND
+
+/* Define if history library is there (-lhistory) */
+#undef HAVE_LIBHISTORY
+
+/* Have compression library */
+#undef HAVE_LIBLZMA
+
+/* Define if pthread library is there (-lpthread) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if readline library is there (-lreadline) */
+#undef HAVE_LIBREADLINE
+
+/* Have compression library */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `localtime' function. */
+#undef HAVE_LOCALTIME
+
+/* Define to 1 if you have the <lzma.h> header file. */
+#undef HAVE_LZMA_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* mmap() is no good without munmap() */
+#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
+# undef /**/ HAVE_MMAP
+#endif
+
+/* Define to 1 if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the `printf' function. */
+#undef HAVE_PRINTF
+
+/* Define if <pthread.h> is there */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have the `rand' function. */
+#undef HAVE_RAND
+
+/* Define to 1 if you have the `rand_r' function. */
+#undef HAVE_RAND_R
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Have shl_load based dso */
+#undef HAVE_SHLLOAD
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `sprintf' function. */
+#undef HAVE_SPRINTF
+
+/* Define to 1 if you have the `srand' function. */
+#undef HAVE_SRAND
+
+/* Define to 1 if you have the `sscanf' function. */
+#undef HAVE_SSCANF
+
+/* Define to 1 if you have the `stat' function. */
+#undef HAVE_STAT
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Whether va_copy() is available */
+#undef HAVE_VA_COPY
+
+/* Define to 1 if you have the `vfprintf' function. */
+#undef HAVE_VFPRINTF
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have the `vsprintf' function. */
+#undef HAVE_VSPRINTF
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if you have the `_stat' function. */
+#undef HAVE__STAT
+
+/* Whether __va_copy() is available */
+#undef HAVE___VA_COPY
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Type cast for the send() function 2nd arg */
+#undef SEND_ARG2_CAST
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Support for IPv6 */
+#undef SUPPORT_IP6
+
+/* Define if va_list is an array type */
+#undef VA_LIST_IS_ARRAY
+
+/* Version number of package */
+#undef VERSION
+
+/* Determine what socket length (socklen_t) data type is */
+#undef XML_SOCKLEN_T
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Using the Win32 Socket implementation */
+#undef _WINSOCKAPI_
+
+/* ss_family is not defined here, use __ss_family instead */
+#undef ss_family
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint32_t
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..c765b34
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1788 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-04-24'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or1k-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..d63dce1
--- /dev/null
+++ b/configure
@@ -0,0 +1,18091 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+
+ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="entities.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+PYTHON_TESTS
+RELDATE
+RDL_LIBS
+M_LIBS
+PYTHON_SITE_PACKAGES
+PYTHON_INCLUDES
+PYTHON_VERSION
+HAVE_ISINF
+HAVE_ISNAN
+XML_INCLUDEDIR
+ICONV_LIBS
+XML_LIBTOOLLIBS
+XML_LIBS
+XML_LIBDIR
+XML_CFLAGS
+CYGWIN_EXTRA_PYTHON_LIBADD
+CYGWIN_EXTRA_LDFLAGS
+WIN32_EXTRA_PYTHON_LIBADD
+WIN32_EXTRA_LDFLAGS
+WIN32_EXTRA_LIBADD
+WITH_RUN_DEBUG
+WITH_MEM_DEBUG
+TEST_DEBUG
+DEBUG_OBJ
+WITH_DEBUG
+TEST_REGEXPS
+WITH_REGEXPS
+TEST_SCHEMAS
+WITH_SCHEMAS
+WITH_ISO8859X
+ICU_LIBS
+WITH_ICU
+WITH_ICONV
+WITH_OUTPUT
+TEST_XPATH
+XPATH_OBJ
+WITH_XPATH
+TEST_SCHEMATRON
+WITH_SCHEMATRON
+TEST_XINCLUDE
+XINCLUDE_OBJ
+WITH_XINCLUDE
+TEST_C14N
+C14N_OBJ
+WITH_C14N
+TEST_XPTR
+XPTR_OBJ
+WITH_XPTR
+DOCB_OBJ
+WITH_DOCB
+TEST_CATALOG
+CATALOG_OBJ
+WITH_CATALOG
+TEST_VTIME
+TEST_VALID
+WITH_VALID
+TEST_PHTML
+TEST_HTML
+HTML_OBJ
+WITH_HTML
+TEST_PUSH
+WITH_PUSH
+TEST_SAX
+WITH_SAX1_SOURCES_FALSE
+WITH_SAX1_SOURCES_TRUE
+WITH_SAX1
+TEST_PATTERN
+WITH_PATTERN
+WITH_WRITER
+READER_TEST
+WITH_READER
+WITH_LEGACY
+HTTP_OBJ
+WITH_HTTP
+FTP_OBJ
+WITH_FTP
+WITH_TREE
+THREADS_W32_FALSE
+THREADS_W32_TRUE
+WITH_THREAD_ALLOC
+TEST_THREADS
+THREAD_CFLAGS
+WITH_THREADS
+BASE_THREAD_LIBS
+THREAD_LIBS
+WITH_TRIO
+WITH_TRIO_SOURCES_FALSE
+WITH_TRIO_SOURCES_TRUE
+STATIC_BINARIES
+TEST_MODULES
+MODULE_EXTENSION
+MODULE_PLATFORM_LIBS
+WITH_MODULES
+PYTHON_LIBS
+PYTHON_SUBDIR
+pythondir
+WITH_PYTHON_FALSE
+WITH_PYTHON_TRUE
+PYTHON
+WITH_LZMA
+LZMA_LIBS
+LZMA_CFLAGS
+WITH_ZLIB
+Z_LIBS
+Z_CFLAGS
+REBUILD_DOCS_FALSE
+REBUILD_DOCS_TRUE
+HTML_DIR
+USE_VERSION_SCRIPT_FALSE
+USE_VERSION_SCRIPT_TRUE
+VERSION_SCRIPT_FLAGS
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+DLLTOOL
+OBJDUMP
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+XSLTPROC
+XMLLINT
+WGET
+PERL
+TAR
+MV
+CPP
+LN_S
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+LIBXML_VERSION_EXTRA
+LIBXML_VERSION_NUMBER
+LIBXML_VERSION_INFO
+LIBXML_VERSION
+LIBXML_MICRO_VERSION
+LIBXML_MINOR_VERSION
+LIBXML_MAJOR_VERSION
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+with_c14n
+with_catalog
+with_debug
+with_docbook
+with_fexceptions
+with_ftp
+with_history
+with_html
+with_html_dir
+with_html_subdir
+with_http
+with_iconv
+with_icu
+with_iso8859x
+with_legacy
+with_mem_debug
+with_minimum
+with_output
+with_pattern
+with_push
+with_python
+with_python_install_dir
+with_reader
+with_readline
+with_regexps
+with_run_debug
+with_sax1
+with_schemas
+with_schematron
+with_threads
+with_thread_alloc
+with_tree
+with_valid
+with_writer
+with_xinclude
+with_xpath
+with_xptr
+with_modules
+with_zlib
+with_lzma
+with_coverage
+enable_rebuild_docs
+enable_ipv6
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+LZMA_CFLAGS
+LZMA_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-rebuild-docs[=yes/no] rebuild some generated docs [default=no]
+ --enable-ipv6[=yes/no] enables compilation of IPv6 code [default=yes]
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
+ --with-c14n add the Canonicalization support (on)
+ --with-catalog add the Catalog support (on)
+ --with-debug add the debugging module (on)
+ --with-docbook add Docbook SGML support (on)
+ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)
+ --with-ftp add the FTP support (on)
+ --with-history add history support to xmllint shell(off)
+ --with-html add the HTML support (on)
+ --with-html-dir=path path to base html directory, default
+ $datadir/doc/html
+ --with-html-subdir=path directory used under html-dir, default
+ $PACKAGE-$VERSION/html
+ --with-http add the HTTP support (on)
+ --with-iconv[=DIR] add ICONV support (on)
+ --with-icu add ICU support (off)
+ --with-iso8859x add ISO8859X support if no iconv (on)
+ --with-legacy add deprecated APIs for compatibility (on)
+ --with-mem-debug add the memory debugging module (off)
+ --with-minimum build a minimally sized library (off)
+ --with-output add the serialization support (on)
+ --with-pattern add the xmlPattern selection interface (on)
+ --with-push add the PUSH parser interfaces (on)
+ --with-python[=DIR] build Python bindings if found
+ --with-python-install-dir=DIR
+ install Python bindings in DIR
+ --with-reader add the xmlReader parsing interface (on)
+ --with-readline=DIR use readline in DIR
+ --with-regexps add Regular Expressions support (on)
+ --with-run-debug add the runtime debugging module (off)
+ --with-sax1 add the older SAX1 interface (on)
+ --with-schemas add Relax-NG and Schemas support (on)
+ --with-schematron add Schematron support (on)
+ --with-threads add multithread support(on)
+ --with-thread-alloc add per-thread memory(off)
+ --with-tree add the DOM like tree manipulation APIs (on)
+ --with-valid add the DTD validation support (on)
+ --with-writer add the xmlWriter saving interface (on)
+ --with-xinclude add the XInclude support (on)
+ --with-xpath add the XPATH support (on)
+ --with-xptr add the XPointer support (on)
+ --with-modules add the dynamic modules support (on)
+ --with-zlib[=DIR] use libz in DIR
+ --with-lzma[=DIR] use liblzma in DIR
+ --with-coverage build for code coverage with GCC (off)
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config
+ LZMA_LIBS linker flags for LZMA, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ case $ac_type in #(
+ uint$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+LIBXML_MAJOR_VERSION=2
+LIBXML_MINOR_VERSION=9
+LIBXML_MICRO_VERSION=2
+LIBXML_MICRO_VERSION_SUFFIX=
+LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
+LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
+
+LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
+
+if test -f CVS/Entries ; then
+ extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-CVS$extra"
+ fi
+else if test -d .svn ; then
+ extra=`svn info | grep Revision | sed 's+Revision: ++'`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-SVN$extra"
+ fi
+else if test -d .git ; then
+ extra=`git describe 2>/dev/null | sed 's+LIBXML[0-9.]*-++'`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-GIT$extra"
+ fi
+fi
+fi
+fi
+
+
+
+
+
+
+
+
+VERSION=${LIBXML_VERSION}
+
+am__api_version='1.13'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+
+ PACKAGE=libxml2
+ VERSION=$VERSION
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+
+# Support silent build rules, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
+# to make
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Extract the first word of "mv", so it can be a program name with args.
+set dummy mv; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MV+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MV in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MV="$MV" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_MV" && ac_cv_path_MV="/bin/mv"
+ ;;
+esac
+fi
+MV=$ac_cv_path_MV
+if test -n "$MV"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
+$as_echo "$MV" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "tar", so it can be a program name with args.
+set dummy tar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $TAR in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="/bin/tar"
+ ;;
+esac
+fi
+TAR=$ac_cv_path_TAR
+if test -n "$TAR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
+$as_echo "$TAR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/bin/perl"
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "wget", so it can be a program name with args.
+set dummy wget; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_WGET+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $WGET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WGET="$WGET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_WGET" && ac_cv_path_WGET="/usr/bin/wget"
+ ;;
+esac
+fi
+WGET=$ac_cv_path_WGET
+if test -n "$WGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5
+$as_echo "$WGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "xmllint", so it can be a program name with args.
+set dummy xmllint; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XMLLINT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $XMLLINT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_XMLLINT" && ac_cv_path_XMLLINT="/usr/bin/xmllint"
+ ;;
+esac
+fi
+XMLLINT=$ac_cv_path_XMLLINT
+if test -n "$XMLLINT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
+$as_echo "$XMLLINT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "xsltproc", so it can be a program name with args.
+set dummy xsltproc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XSLTPROC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $XSLTPROC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="/usr/bin/xsltproc"
+ ;;
+esac
+fi
+XSLTPROC=$ac_cv_path_XSLTPROC
+if test -n "$XSLTPROC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case "$ECHO" in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${lt_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${lt_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if ${lt_cv_path_NM+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if ${lt_cv_nm_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if ${lt_cv_sys_max_cmd_len+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if ${lt_cv_deplibs_check_method+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if ${lt_cv_apple_cc_single_mod+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if ${lt_cv_prog_compiler_static_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if ${lt_cv_prog_compiler_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='${wl}--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_="/usr/lib:/lib"
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -b"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[23].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if ${ac_cv_lib_svld_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if ${ac_cv_lib_dld_dld_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+VERSION_SCRIPT_FLAGS=
+# lt_cv_prog_gnu_ld is from libtool 2.+
+if test "$lt_cv_prog_gnu_ld" = yes; then
+ VERSION_SCRIPT_FLAGS=-Wl,--version-script=
+else
+ case $host in
+ *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
+ esac
+fi
+
+ if test -n "$VERSION_SCRIPT_FLAGS"; then
+ USE_VERSION_SCRIPT_TRUE=
+ USE_VERSION_SCRIPT_FALSE='#'
+else
+ USE_VERSION_SCRIPT_TRUE='#'
+ USE_VERSION_SCRIPT_FALSE=
+fi
+
+
+
+_cppflags="${CPPFLAGS}"
+_libs="${LIBS}"
+
+
+# Check whether --with-c14n was given.
+if test "${with_c14n+set}" = set; then :
+ withval=$with_c14n;
+fi
+
+
+# Check whether --with-catalog was given.
+if test "${with_catalog+set}" = set; then :
+ withval=$with_catalog;
+fi
+
+
+# Check whether --with-debug was given.
+if test "${with_debug+set}" = set; then :
+ withval=$with_debug;
+fi
+
+
+# Check whether --with-docbook was given.
+if test "${with_docbook+set}" = set; then :
+ withval=$with_docbook;
+fi
+
+
+# Check whether --with-fexceptions was given.
+if test "${with_fexceptions+set}" = set; then :
+ withval=$with_fexceptions;
+fi
+
+
+# Check whether --with-ftp was given.
+if test "${with_ftp+set}" = set; then :
+ withval=$with_ftp;
+fi
+
+
+# Check whether --with-history was given.
+if test "${with_history+set}" = set; then :
+ withval=$with_history;
+fi
+
+
+# Check whether --with-html was given.
+if test "${with_html+set}" = set; then :
+ withval=$with_html;
+fi
+
+
+# Check whether --with-html-dir was given.
+if test "${with_html_dir+set}" = set; then :
+ withval=$with_html_dir; HTML_DIR=$withval
+else
+ HTML_DIR='$(datadir)/doc'
+fi
+
+
+
+# Check whether --with-html-subdir was given.
+if test "${with_html_subdir+set}" = set; then :
+ withval=$with_html_subdir; test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"
+else
+ HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"
+fi
+
+
+
+# Check whether --with-http was given.
+if test "${with_http+set}" = set; then :
+ withval=$with_http;
+fi
+
+
+# Check whether --with-iconv was given.
+if test "${with_iconv+set}" = set; then :
+ withval=$with_iconv;
+fi
+
+
+# Check whether --with-icu was given.
+if test "${with_icu+set}" = set; then :
+ withval=$with_icu;
+fi
+
+
+# Check whether --with-iso8859x was given.
+if test "${with_iso8859x+set}" = set; then :
+ withval=$with_iso8859x;
+fi
+
+
+# Check whether --with-legacy was given.
+if test "${with_legacy+set}" = set; then :
+ withval=$with_legacy;
+fi
+
+
+# Check whether --with-mem_debug was given.
+if test "${with_mem_debug+set}" = set; then :
+ withval=$with_mem_debug;
+fi
+
+
+# Check whether --with-minimum was given.
+if test "${with_minimum+set}" = set; then :
+ withval=$with_minimum;
+fi
+
+
+# Check whether --with-output was given.
+if test "${with_output+set}" = set; then :
+ withval=$with_output;
+fi
+
+
+# Check whether --with-pattern was given.
+if test "${with_pattern+set}" = set; then :
+ withval=$with_pattern;
+fi
+
+
+# Check whether --with-push was given.
+if test "${with_push+set}" = set; then :
+ withval=$with_push;
+fi
+
+
+# Check whether --with-python was given.
+if test "${with_python+set}" = set; then :
+ withval=$with_python;
+fi
+
+
+# Check whether --with-python_install_dir was given.
+if test "${with_python_install_dir+set}" = set; then :
+ withval=$with_python_install_dir;
+fi
+
+
+# Check whether --with-reader was given.
+if test "${with_reader+set}" = set; then :
+ withval=$with_reader;
+fi
+
+
+# Check whether --with-readline was given.
+if test "${with_readline+set}" = set; then :
+ withval=$with_readline;
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ RDL_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+
+fi
+
+
+# Check whether --with-regexps was given.
+if test "${with_regexps+set}" = set; then :
+ withval=$with_regexps;
+fi
+
+
+# Check whether --with-run_debug was given.
+if test "${with_run_debug+set}" = set; then :
+ withval=$with_run_debug;
+fi
+
+
+# Check whether --with-sax1 was given.
+if test "${with_sax1+set}" = set; then :
+ withval=$with_sax1;
+fi
+
+
+# Check whether --with-schemas was given.
+if test "${with_schemas+set}" = set; then :
+ withval=$with_schemas;
+fi
+
+
+# Check whether --with-schematron was given.
+if test "${with_schematron+set}" = set; then :
+ withval=$with_schematron;
+fi
+
+
+# Check whether --with-threads was given.
+if test "${with_threads+set}" = set; then :
+ withval=$with_threads;
+fi
+
+
+# Check whether --with-thread-alloc was given.
+if test "${with_thread_alloc+set}" = set; then :
+ withval=$with_thread_alloc;
+fi
+
+
+# Check whether --with-tree was given.
+if test "${with_tree+set}" = set; then :
+ withval=$with_tree;
+fi
+
+
+# Check whether --with-valid was given.
+if test "${with_valid+set}" = set; then :
+ withval=$with_valid;
+fi
+
+
+# Check whether --with-writer was given.
+if test "${with_writer+set}" = set; then :
+ withval=$with_writer;
+fi
+
+
+# Check whether --with-xinclude was given.
+if test "${with_xinclude+set}" = set; then :
+ withval=$with_xinclude;
+fi
+
+
+# Check whether --with-xpath was given.
+if test "${with_xpath+set}" = set; then :
+ withval=$with_xpath;
+fi
+
+
+# Check whether --with-xptr was given.
+if test "${with_xptr+set}" = set; then :
+ withval=$with_xptr;
+fi
+
+
+# Check whether --with-modules was given.
+if test "${with_modules+set}" = set; then :
+ withval=$with_modules;
+fi
+
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+ withval=$with_zlib;
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ Z_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+
+fi
+
+
+# Check whether --with-lzma was given.
+if test "${with_lzma+set}" = set; then :
+ withval=$with_lzma;
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ LZMA_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+
+fi
+
+
+# Check whether --with-coverage was given.
+if test "${with_coverage+set}" = set; then :
+ withval=$with_coverage;
+fi
+
+
+# Check whether --enable-rebuild-docs was given.
+if test "${enable_rebuild_docs+set}" = set; then :
+ enableval=$enable_rebuild_docs;
+fi
+
+if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
+ as_fn_error $? "cannot rebuild docs when builddir != srcdir" "$LINENO" 5
+fi
+ if test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"; then
+ REBUILD_DOCS_TRUE=
+ REBUILD_DOCS_FALSE='#'
+else
+ REBUILD_DOCS_TRUE='#'
+ REBUILD_DOCS_FALSE=
+fi
+
+
+if test "$with_schemas" = "yes"
+then
+ with_pattern=yes
+ with_regexps=yes
+fi
+if test "$with_schematron" = "yes"
+then
+ with_pattern=yes
+ with_tree=yes
+ with_xpath=yes
+fi
+if test "$with_reader" = "yes"
+then
+ with_push=yes
+fi
+if test "$with_xptr" = "yes"
+then
+ with_xpath=yes
+fi
+if test "$with_minimum" = "yes"
+then
+ echo "Configuring for a minimal library"
+ if test "$with_c14n" = ""
+ then
+ with_c14n=no
+ fi
+ if test "$with_catalog" = ""
+ then
+ with_catalog=no
+ fi
+ echo So far so good!
+ if test "$with_debug" = ""
+ then
+ with_debug=no
+ fi
+ if test "$with_docbook" = ""
+ then
+ with_docbook=no
+ fi
+ if test "$with_fexceptions" = ""
+ then
+ with_fexceptions=no
+ fi
+ if test "$with_ftp" = ""
+ then
+ with_ftp=no
+ fi
+ if test "$with_history" = ""
+ then
+ with_history=no
+ fi
+ if test "$with_html" = ""
+ then
+ with_html=no
+ fi
+ if test "$with_http" = ""
+ then
+ with_http=no
+ fi
+ if test "$with_iconv" = ""
+ then
+ with_iconv=no
+ fi
+ if test "$with_iso8859x" = ""
+ then
+ with_iso8859x=no
+ fi
+ if test "$with_legacy" = ""
+ then
+ with_legacy=no
+ fi
+ if test "$with_mem_debug" = ""
+ then
+ with_mem_debug=no
+ fi
+ if test "$with_output" = ""
+ then
+ with_output=no
+ fi
+ if test "$with_pattern" = ""
+ then
+ with_pattern=no
+ fi
+ if test "$with_push" = ""
+ then
+ with_push=no
+ fi
+ if test "$with_python" = ""
+ then
+ with_python=no
+ fi
+ if test "$with_reader" = ""
+ then
+ with_reader=no
+ fi
+ if test "$with_readline" = ""
+ then
+ with_readline=no
+ fi
+ if test "$with_regexps" = ""
+ then
+ with_regexps=no
+ fi
+ if test "$with_run_debug" = ""
+ then
+ with_run_debug=no
+ fi
+ if test "$with_sax1" = ""
+ then
+ with_sax1=no
+ fi
+ if test "$with_schemas" = ""
+ then
+ with_schemas=no
+ fi
+ if test "$with_schematron" = ""
+ then
+ with_schematron=no
+ fi
+ if test "$with_threads" = ""
+ then
+ with_threads=no
+ fi
+ if test "$with_thread_alloc" = ""
+ then
+ with_thread_alloc=no
+ fi
+ if test "$with_tree" = ""
+ then
+ with_tree=no
+ fi
+ if test "$with_valid" = ""
+ then
+ with_valid=no
+ fi
+ if test "$with_writer" = ""
+ then
+ with_writer=no
+ fi
+ if test "$with_xinclude" = ""
+ then
+ with_xinclude=no
+ fi
+ if test "$with_xpath" = ""
+ then
+ with_xpath=no
+ fi
+ if test "$with_xptr" = ""
+ then
+ with_xptr=no
+ fi
+ if test "$with_zlib" = ""
+ then
+ with_zlib=no
+ fi
+ if test "$with_modules" = ""
+ then
+ with_modules=no
+ fi
+fi
+
+echo Checking zlib
+
+
+WITH_ZLIB=0
+if test "$with_zlib" = "no"; then
+ echo "Disabling compression support"
+else
+ for ac_header in zlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ZLIB_H 1
+_ACEOF
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${Z_DIR}/lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzread in -lz" >&5
+$as_echo_n "checking for gzread in -lz... " >&6; }
+if ${ac_cv_lib_z_gzread+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzread ();
+int
+main ()
+{
+return gzread ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_gzread=yes
+else
+ ac_cv_lib_z_gzread=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5
+$as_echo "$ac_cv_lib_z_gzread" >&6; }
+if test "x$ac_cv_lib_z_gzread" = xyes; then :
+
+
+$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+ WITH_ZLIB=1
+ if test "x${Z_DIR}" != "x"; then
+ Z_CFLAGS="-I${Z_DIR}/include"
+ Z_LIBS="-L${Z_DIR}/lib -lz"
+ case ${host} in
+ *-*-solaris*)
+ Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
+ ;;
+ esac
+ else
+ Z_LIBS="-lz"
+ fi
+fi
+
+ LDFLAGS="${SAVE_LDFLAGS}"
+fi
+
+done
+
+fi
+
+
+
+
+
+echo Checking lzma
+
+
+WITH_LZMA=0
+if test "$with_lzma" = "no"; then
+ echo "Disabling compression support"
+else
+ # Try pkg-config first so that static linking works.
+ # If this succeeeds, we ignore the WITH_LZMA directory.
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZMA" >&5
+$as_echo_n "checking for LZMA... " >&6; }
+
+if test -n "$LZMA_CFLAGS"; then
+ pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LZMA_LIBS"; then
+ pkg_cv_LZMA_LIBS="$LZMA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1`
+ else
+ LZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LZMA_PKG_ERRORS" >&5
+
+ have_liblzma=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_liblzma=no
+else
+ LZMA_CFLAGS=$pkg_cv_LZMA_CFLAGS
+ LZMA_LIBS=$pkg_cv_LZMA_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_liblzma=yes
+fi
+
+ # If pkg-config failed, fall back to AC_CHECK_LIB. This
+ # will not pick up the necessary LIBS flags for liblzma's
+ # private dependencies, though, so static linking may fail.
+ if test "x$have_liblzma" = "xno"; then
+ for ac_header in lzma.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
+if test "x$ac_cv_header_lzma_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LZMA_H 1
+_ACEOF
+ SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${LZMA_DIR}/lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
+$as_echo_n "checking for lzma_code in -llzma... " >&6; }
+if ${ac_cv_lib_lzma_lzma_code+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llzma $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lzma_code ();
+int
+main ()
+{
+return lzma_code ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_lzma_lzma_code=yes
+else
+ ac_cv_lib_lzma_lzma_code=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5
+$as_echo "$ac_cv_lib_lzma_lzma_code" >&6; }
+if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then :
+
+ have_liblzma=yes
+ if test "x${LZMA_DIR}" != "x"; then
+ LZMA_CFLAGS="-I${LZMA_DIR}/include"
+ LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
+ else
+ LZMA_LIBS="-llzma"
+ fi
+else
+ have_liblzma=no
+fi
+
+ LDFLAGS="${SAVE_LDFLAGS}"
+fi
+
+done
+
+ fi
+
+ # Found the library via either method?
+ if test "x$have_liblzma" = "xyes"; then
+
+$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
+
+ WITH_LZMA=1
+ fi
+fi
+
+
+
+
+
+CPPFLAGS=${_cppflags}
+LIBS=${_libs}
+
+echo Checking headers
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+for ac_header in fcntl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
+if test "x$ac_cv_header_fcntl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FCNTL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in unistd.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in ctype.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default"
+if test "x$ac_cv_header_ctype_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CTYPE_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in dirent.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
+if test "x$ac_cv_header_dirent_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRENT_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in errno.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
+if test "x$ac_cv_header_errno_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ERRNO_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in malloc.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_malloc_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MALLOC_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in stdarg.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdarg_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDARG_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/stat.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_stat_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_STAT_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/types.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_types_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in inttypes.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in time.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_time_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TIME_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in ansidecl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "ansidecl.h" "ac_cv_header_ansidecl_h" "$ac_includes_default"
+if test "x$ac_cv_header_ansidecl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ANSIDECL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in ieeefp.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
+if test "x$ac_cv_header_ieeefp_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_IEEEFP_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in nan.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "nan.h" "ac_cv_header_nan_h" "$ac_includes_default"
+if test "x$ac_cv_header_nan_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NAN_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in math.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
+if test "x$ac_cv_header_math_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MATH_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in limits.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
+if test "x$ac_cv_header_limits_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in fp_class.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "fp_class.h" "ac_cv_header_fp_class_h" "$ac_includes_default"
+if test "x$ac_cv_header_fp_class_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FP_CLASS_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in float.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
+if test "x$ac_cv_header_float_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOAT_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/socket.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+
+"
+if test "x$ac_cv_header_sys_socket_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SOCKET_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in netinet/in.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+
+"
+if test "x$ac_cv_header_netinet_in_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NETINET_IN_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in arpa/inet.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+#if HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
+
+"
+if test "x$ac_cv_header_arpa_inet_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ARPA_INET_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in netdb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
+if test "x$ac_cv_header_netdb_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NETDB_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/time.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_time_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIME_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/select.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_select_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_SELECT_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in poll.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
+if test "x$ac_cv_header_poll_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_POLL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/mman.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_mman_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_MMAN_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in signal.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
+if test "x$ac_cv_header_signal_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNAL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in arpa/nameser.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+
+"
+if test "x$ac_cv_header_arpa_nameser_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ARPA_NAMESER_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in resolv.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+# endif
+#if HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+# endif
+
+"
+if test "x$ac_cv_header_resolv_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RESOLV_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in dl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
+if test "x$ac_cv_header_dl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+echo Checking types
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+ no|yes) ;; #(
+ *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+ esac
+
+
+
+echo Checking libraries
+
+for ac_func in strftime
+do :
+ ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+ # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if ${ac_cv_lib_intl_strftime+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_strftime=yes
+else
+ ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes; then :
+ $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+for ac_func in strdup strndup strerror
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in finite isnand fp_class class fpclass
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in strftime localtime gettimeofday ftime
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in stat _stat signal
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in rand rand_r srand time
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in isascii mmap munmap putenv
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+$as_echo_n "checking for va_copy... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+va_list ap1,ap2;
+int
+main ()
+{
+va_copy(ap1,ap2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_va_copy=yes
+else
+ have_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_va_copy" >&5
+$as_echo "$have_va_copy" >&6; }
+if test x"$have_va_copy" = x"yes"; then
+
+$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __va_copy" >&5
+$as_echo_n "checking for __va_copy... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+ va_list ap1,ap2;
+int
+main ()
+{
+__va_copy(ap1,ap2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have___va_copy=yes
+else
+ have___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have___va_copy" >&5
+$as_echo "$have___va_copy" >&6; }
+ if test x"$have___va_copy" = x"yes"; then
+
+$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
+
+ fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array type" >&5
+$as_echo_n "checking whether va_list is an array type... " >&6; }
+cat > conftest.$ac_ext <<EOF
+#line 13721 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+void a(va_list * ap) {}
+int main(void) {
+
+va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1
+; return 0; }
+EOF
+if { (eval echo configure:13731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
+
+fi
+rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostent" >&5
+$as_echo_n "checking for library containing gethostent... " >&6; }
+if ${ac_cv_search_gethostent+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostent ();
+int
+main ()
+{
+return gethostent ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' nsl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_gethostent=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_gethostent+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_gethostent+:} false; then :
+
+else
+ ac_cv_search_gethostent=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostent" >&5
+$as_echo "$ac_cv_search_gethostent" >&6; }
+ac_res=$ac_cv_search_gethostent
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+$as_echo_n "checking for library containing setsockopt... " >&6; }
+if ${ac_cv_search_setsockopt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char setsockopt ();
+int
+main ()
+{
+return setsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' socket net network; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_setsockopt=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_setsockopt+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_setsockopt+:} false; then :
+
+else
+ ac_cv_search_setsockopt=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
+$as_echo "$ac_cv_search_setsockopt" >&6; }
+ac_res=$ac_cv_search_setsockopt
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing connect" >&5
+$as_echo_n "checking for library containing connect... " >&6; }
+if ${ac_cv_search_connect+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' inet; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_connect=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_connect+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_connect+:} false; then :
+
+else
+ ac_cv_search_connect=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_connect" >&5
+$as_echo "$ac_cv_search_connect" >&6; }
+ac_res=$ac_cv_search_connect
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of socket length (socklen_t)" >&5
+$as_echo_n "checking for type of socket length (socklen_t)... " >&6; }
+cat > conftest.$ac_ext <<EOF
+#line 13921 "configure"
+#include "confdefs.h"
+
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+int main(void) {
+
+(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)
+; return 0; }
+EOF
+if { (eval echo configure:13932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: socklen_t *" >&5
+$as_echo "socklen_t *" >&6; }
+ XML_SOCKLEN_T=socklen_t
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ cat > conftest.$ac_ext <<EOF
+#line 13944 "configure"
+#include "confdefs.h"
+
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+int main(void) {
+
+(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)
+; return 0; }
+EOF
+if { (eval echo configure:13955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: size_t *" >&5
+$as_echo "size_t *" >&6; }
+ XML_SOCKLEN_T=size_t
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ cat > conftest.$ac_ext <<EOF
+#line 13967 "configure"
+#include "confdefs.h"
+
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+int main(void) {
+
+(void)getsockopt (1, 1, 1, NULL, (int *)NULL)
+; return 0; }
+EOF
+if { (eval echo configure:13978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; _out=`eval $ac_compile 2>&1` && test "x$_out" = x; }; then
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: int *" >&5
+$as_echo "int *" >&6; }
+ XML_SOCKLEN_T=int
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine" >&5
+$as_echo "$as_me: WARNING: could not determine" >&2;}
+ XML_SOCKLEN_T="int"
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+
+cat >>confdefs.h <<_ACEOF
+#define XML_SOCKLEN_T $XML_SOCKLEN_T
+_ACEOF
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for const gethostbyname() argument" >&5
+$as_echo_n "checking for const gethostbyname() argument... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <netdb.h>
+int
+main ()
+{
+(void)gethostbyname((const char *)"");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_gethostbyname_const_arg=yes
+else
+ have_gethostbyname_const_arg=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gethostbyname_const_arg" >&5
+$as_echo "$have_gethostbyname_const_arg" >&6; }
+if test x"$have_gethostbyname_const_arg" = x"yes"; then
+
+$as_echo "#define GETHOSTBYNAME_ARG_CAST /**/" >>confdefs.h
+
+else
+
+$as_echo "#define GETHOSTBYNAME_ARG_CAST (char *)" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for const send() second argument" >&5
+$as_echo_n "checking for const send() second argument... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/socket.h>
+int
+main ()
+{
+(void)send(1,(const char *)"",1,1);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_send_const_arg2=yes
+else
+ have_send_const_arg2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_send_const_arg2" >&5
+$as_echo "$have_send_const_arg2" >&6; }
+if test x"$have_send_const_arg2" = x"yes"; then
+
+$as_echo "#define SEND_ARG2_CAST /**/" >>confdefs.h
+
+else
+
+$as_echo "#define SEND_ARG2_CAST (char *)" >>confdefs.h
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IPv6" >&5
+$as_echo_n "checking whether to enable IPv6... " >&6; }
+# Check whether --enable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then :
+ enableval=$enable_ipv6;
+else
+ enable_ipv6=yes
+fi
+
+if test "$with_minimum" = "yes"
+then
+ enable_ipv6=no
+fi
+if test $enable_ipv6 = yes; then
+ have_ipv6=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <sys/types.h>
+# include <sys/socket.h>
+
+int
+main ()
+{
+
+ struct sockaddr_storage ss;
+ socket(AF_INET6, SOCK_STREAM, 0)
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_ipv6=yes
+else
+ have_ipv6=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipv6" >&5
+$as_echo "$have_ipv6" >&6; }
+
+ if test $have_ipv6 = yes; then
+
+$as_echo "#define SUPPORT_IP6 /**/" >>confdefs.h
+
+ have_broken_ss_family=no
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr::ss_family" >&5
+$as_echo_n "checking struct sockaddr::ss_family... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <sys/types.h>
+# include <sys/socket.h>
+
+int
+main ()
+{
+
+ struct sockaddr_storage ss ;
+ ss.ss_family = 0 ;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_ss_family=yes
+else
+ have_ss_family=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ss_family" >&5
+$as_echo "$have_ss_family" >&6; }
+ if test x$have_ss_family = xno ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking broken struct sockaddr::ss_family" >&5
+$as_echo_n "checking broken struct sockaddr::ss_family... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <sys/types.h>
+# include <sys/socket.h>
+
+int
+main ()
+{
+
+ struct sockaddr_storage ss ;
+ ss.__ss_family = 0 ;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_broken_ss_family=yes
+else
+ have_broken_ss_family=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_broken_ss_family" >&5
+$as_echo "$have_broken_ss_family" >&6; }
+ if test x$have_broken_ss_family = xyes ; then
+
+$as_echo "#define HAVE_BROKEN_SS_FAMILY /**/" >>confdefs.h
+
+
+$as_echo "#define ss_family __ss_family" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ss_family and __ss_family not found" >&5
+$as_echo "$as_me: WARNING: ss_family and __ss_family not found" >&2;}
+ fi
+ fi
+
+ have_getaddrinfo=no
+ ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
+if test "x$ac_cv_func_getaddrinfo" = xyes; then :
+ have_getaddrinfo=yes
+fi
+
+ if test $have_getaddrinfo != yes; then
+ for lib in bsd socket inet; do
+ as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_getaddrinfo" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$lib" >&5
+$as_echo_n "checking for getaddrinfo in -l$lib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$lib $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break
+fi
+
+ done
+ fi
+
+ if test $have_getaddrinfo = yes; then
+
+$as_echo "#define HAVE_GETADDRINFO /**/" >>confdefs.h
+
+ fi
+ fi
+fi
+
+
+ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan"
+if test "x$ac_cv_func_isnan" = xyes; then :
+
+$as_echo "#define HAVE_ISNAN /**/" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan in -lm" >&5
+$as_echo_n "checking for isnan in -lm... " >&6; }
+if ${ac_cv_lib_m_isnan+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char isnan ();
+int
+main ()
+{
+return isnan ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_isnan=yes
+else
+ ac_cv_lib_m_isnan=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isnan" >&5
+$as_echo "$ac_cv_lib_m_isnan" >&6; }
+if test "x$ac_cv_lib_m_isnan" = xyes; then :
+
+$as_echo "#define HAVE_ISNAN /**/" >>confdefs.h
+
+fi
+
+fi
+
+
+ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf"
+if test "x$ac_cv_func_isinf" = xyes; then :
+
+$as_echo "#define HAVE_ISINF /**/" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in -lm" >&5
+$as_echo_n "checking for isinf in -lm... " >&6; }
+if ${ac_cv_lib_m_isinf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char isinf ();
+int
+main ()
+{
+return isinf ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_isinf=yes
+else
+ ac_cv_lib_m_isinf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_isinf" >&5
+$as_echo "$ac_cv_lib_m_isinf" >&6; }
+if test "x$ac_cv_lib_m_isinf" = xyes; then :
+
+$as_echo "#define HAVE_ISINF /**/" >>confdefs.h
+
+fi
+
+fi
+
+
+XML_LIBDIR='-L${libdir}'
+XML_INCLUDEDIR='-I${includedir}/libxml2'
+
+XML_CFLAGS=""
+RDL_LIBS=""
+
+if test "${GCC}" != "yes" ; then
+ case "${host}" in
+ hppa*-*-hpux* )
+ CFLAGS="${CFLAGS} -Wp,-H30000"
+ ;;
+ *-dec-osf* )
+ CFLAGS="${CFLAGS} -ieee"
+ ;;
+ alpha*-*-linux* )
+ CFLAGS="${CFLAGS} -ieee"
+ ;;
+ esac
+else
+ if test "$with_fexceptions" = "yes"
+ then
+ #
+ # Not activated by default because this inflates the code size
+ # Used to allow propagation of C++ exceptions through the library
+ #
+ CFLAGS="${CFLAGS} -fexceptions"
+ fi
+
+ # warnings we'd like to see
+ CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+ # warnings we'd like to supress
+ CFLAGS="${CFLAGS} -Wno-long-long"
+ case "${host}" in
+ alpha*-*-linux* )
+ CFLAGS="${CFLAGS} -mieee"
+ ;;
+ alpha*-*-osf* )
+ CFLAGS="${CFLAGS} -mieee"
+ ;;
+ esac
+fi
+case ${host} in
+ *-*-solaris*)
+ XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
+ ;;
+ hppa*-hp-mpeix)
+ NEED_TRIO=1
+ ;;
+ *-*-mingw* | *-*-cygwin* | *-*-msvc* )
+ # If the host is Windows, and shared libraries are disabled, we
+ # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
+ # work properly (without it, xmlexports.h would force the use of
+ # DLL imports, which obviously aren't present in a static
+ # library).
+ if test "x$enable_shared" = "xno"; then
+ XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
+ CFLAGS="$CFLAGS -DLIBXML_STATIC"
+ fi
+ ;;
+esac
+
+
+
+PYTHON_VERSION=
+PYTHON_INCLUDES=
+PYTHON_SITE_PACKAGES=
+PYTHON_TESTS=
+pythondir=
+if test "$with_python" != "no" ; then
+ if test -x "$with_python/bin/python"
+ then
+ echo Found python in $with_python/bin/python
+ PYTHON="$with_python/bin/python"
+ else
+ if test -x "$with_python/python.exe"
+ then
+ echo Found python in $with_python/python.exe
+ PYTHON="$with_python/python.exe"
+ else
+ if test -x "$with_python"
+ then
+ echo Found python in $with_python
+ PYTHON="$with_python"
+ else
+ if test -x "$PYTHON"
+ then
+ echo Found python in environment PYTHON=$PYTHON
+ with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
+ else
+ # Extract the first word of "python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5", so it can be a program name with args.
+set dummy python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PYTHON in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ fi
+ fi
+ fi
+ if test "$PYTHON" != ""
+ then
+ PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
+ PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
+# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
+#
+# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
+ echo Found Python version $PYTHON_VERSION
+ fi
+ if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
+ then
+ if test -r $with_python/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
+ else
+ if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
+ else
+ if test -r /usr/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
+ else
+ if test -r $with_python/include/Python.h
+ then
+ PYTHON_INCLUDES=$with_python/include
+ else
+ echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test "$with_python_install_dir" != ""
+ then
+ PYTHON_SITE_PACKAGES="$with_python_install_dir"
+ fi
+ if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
+ then
+ if test -d $libdir/python$PYTHON_VERSION/site-packages
+ then
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+ else
+ if test -d $with_python/lib/site-packages
+ then
+ PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
+ else
+ PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
+ fi
+ fi
+ fi
+ pythondir='$(PYTHON_SITE_PACKAGES)'
+ PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
+else
+ PYTHON=
+fi
+ if test "$PYTHON_INCLUDES" != ""; then
+ WITH_PYTHON_TRUE=
+ WITH_PYTHON_FALSE='#'
+else
+ WITH_PYTHON_TRUE='#'
+ WITH_PYTHON_FALSE=
+fi
+
+if test "$PYTHON_INCLUDES" != ""
+then
+ PYTHON_SUBDIR=python
+else
+ PYTHON_SUBDIR=
+fi
+
+
+
+
+WITH_MODULES=0
+TEST_MODULES=
+
+if test "$with_modules" != "no" ; then
+ case "$host" in
+ *-*-cygwin*)
+ MODULE_EXTENSION=".dll"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcygwin" >&5
+$as_echo_n "checking for dlopen in -lcygwin... " >&6; }
+if ${ac_cv_lib_cygwin_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcygwin $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_cygwin_dlopen=yes
+else
+ ac_cv_lib_cygwin_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cygwin_dlopen" >&5
+$as_echo "$ac_cv_lib_cygwin_dlopen" >&6; }
+if test "x$ac_cv_lib_cygwin_dlopen" = xyes; then :
+
+ WITH_MODULES=1
+ MODULE_PLATFORM_LIBS=
+
+$as_echo "#define HAVE_DLOPEN /**/" >>confdefs.h
+
+
+fi
+
+ ;;
+ *-*-mingw*)
+ MODULE_EXTENSION=".dll"
+ WITH_MODULES=1
+ ;;
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; then :
+ libxml_have_shl_load=yes
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if ${ac_cv_lib_dld_shl_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
+
+ MODULE_PLATFORM_LIBS="-ldld"
+ libxml_have_shl_load=yes
+else
+
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes; then :
+ libxml_have_dlopen=yes
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if ${ac_cv_lib_dl_dlopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
+
+ MODULE_PLATFORM_LIBS="-ldl"
+ libxml_have_dlopen=yes
+fi
+
+fi
+
+fi
+
+fi
+
+
+ if test "${libxml_have_shl_load}" = "yes"; then
+ MODULE_EXTENSION=".sl"
+ WITH_MODULES=1
+
+$as_echo "#define HAVE_SHLLOAD /**/" >>confdefs.h
+
+ fi
+
+ if test "${libxml_have_dlopen}" = "yes"; then
+ case "${host}" in
+ *-*-hpux* )
+ MODULE_EXTENSION=".sl"
+ ;;
+ * )
+ MODULE_EXTENSION=".so"
+ ;;
+ esac
+
+ WITH_MODULES=1
+
+$as_echo "#define HAVE_DLOPEN /**/" >>confdefs.h
+
+ fi
+ ;;
+ esac
+fi
+
+if test "${WITH_MODULES}" = "1"; then
+ TEST_MODULES="ModuleTests"
+fi
+
+
+
+
+
+
+
+if [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ] || \
+ [ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ] || \
+ [ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ]
+ then
+ if test "$with_minimum" != "yes"
+ then
+ if test "${with_mem_debug}" = "" ; then
+ echo Activating memory debugging
+ with_mem_debug="yes"
+ with_run_debug="yes"
+ fi
+ if test "${with_docbook}" = "" ; then
+ with_docbook="yes"
+ fi
+ fi
+ if test "${GCC}" = "yes" ; then
+ CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
+ fi
+ STATIC_BINARIES="-static"
+else
+ STATIC_BINARIES=
+fi
+
+
+
+if test "${NEED_TRIO}" = "1" ; then
+ echo Adding trio library for string functions
+ WITH_TRIO=1
+else
+ WITH_TRIO=0
+fi
+ if test "${NEED_TRIO}" = "1"; then
+ WITH_TRIO_SOURCES_TRUE=
+ WITH_TRIO_SOURCES_FALSE='#'
+else
+ WITH_TRIO_SOURCES_TRUE='#'
+ WITH_TRIO_SOURCES_FALSE=
+fi
+
+
+
+echo Checking configuration requirements
+
+THREAD_LIBS=""
+BASE_THREAD_LIBS=""
+WITH_THREADS=0
+THREAD_CFLAGS=""
+TEST_THREADS=""
+THREADS_W32=""
+WITH_THREAD_ALLOC=0
+
+if test "$with_threads" = "no" ; then
+ echo Disabling multithreaded support
+else
+ echo Enabling multithreaded support
+
+ case $host_os in
+ *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
+ WITH_THREADS="1"
+ THREADS_W32="1"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
+ fi
+ ;;
+ esac
+
+ if test -z "$THREADS_W32"; then
+ if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
+ ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5
+$as_echo_n "checking for pthread_join in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_join+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pthread_pthread_join=yes
+else
+ ac_cv_lib_pthread_pthread_join=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_join" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_join" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then :
+
+ THREAD_LIBS="-lpthread"
+
+$as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h
+
+
+$as_echo "#define HAVE_PTHREAD_H /**/" >>confdefs.h
+
+ WITH_THREADS="1"
+fi
+
+fi
+
+
+ fi
+ fi
+
+ case $host_os in
+ *cygwin*) THREAD_LIBS=""
+ ;;
+ *beos*) WITH_THREADS="1"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
+ ;;
+ *linux*)
+ if test "${GCC}" = "yes" ; then
+ GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+ GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
+ GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'`
+ if test "${THREAD_LIBS}" = "-lpthread" ; then
+ if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ if expr ${GCC_MAJOR} \> 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ echo old GCC disabling weak symbols for pthread
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "$WITH_THREADS" = "1" ; then
+ THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
+ TEST_THREADS="Threadtests"
+ fi
+fi
+if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
+ WITH_THREAD_ALLOC=1
+fi
+
+
+
+
+
+
+
+ if test -n "$THREADS_W32"; then
+ THREADS_W32_TRUE=
+ THREADS_W32_FALSE='#'
+else
+ THREADS_W32_TRUE='#'
+ THREADS_W32_FALSE=
+fi
+
+
+if test "$with_history" = "yes" ; then
+ echo Enabling xmllint shell history
+ unset tcap
+ for termlib in ncurses curses termcap terminfo termlib; do
+ as_ac_Lib=`$as_echo "ac_cv_lib_${termlib}''_tputs" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -l${termlib}" >&5
+$as_echo_n "checking for tputs in -l${termlib}... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l${termlib} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tputs ();
+int
+main ()
+{
+return tputs ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ tcap="-l$termlib"
+fi
+
+ test -n "$tcap" && break
+ done
+
+ ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_history_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lhistory" >&5
+$as_echo_n "checking for append_history in -lhistory... " >&6; }
+if ${ac_cv_lib_history_append_history+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lhistory $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char append_history ();
+int
+main ()
+{
+return append_history ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_history_append_history=yes
+else
+ ac_cv_lib_history_append_history=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_history_append_history" >&5
+$as_echo "$ac_cv_lib_history_append_history" >&6; }
+if test "x$ac_cv_lib_history_append_history" = xyes; then :
+
+ RDL_LIBS="-lhistory"
+
+$as_echo "#define HAVE_LIBHISTORY /**/" >>confdefs.h
+
+fi
+
+fi
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
+if test "x$ac_cv_header_readline_readline_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5
+$as_echo_n "checking for readline in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_readline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $tcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readline ();
+int
+main ()
+{
+return readline ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_readline_readline=yes
+else
+ ac_cv_lib_readline_readline=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5
+$as_echo "$ac_cv_lib_readline_readline" >&6; }
+if test "x$ac_cv_lib_readline_readline" = xyes; then :
+
+ RDL_LIBS="-lreadline $RDL_LIBS $tcap"
+
+$as_echo "#define HAVE_LIBREADLINE /**/" >>confdefs.h
+
+fi
+
+fi
+
+
+ if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
+ CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
+ RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
+ fi
+fi
+
+if test "$with_tree" = "no" ; then
+ echo Disabling DOM like tree manipulation APIs
+ WITH_TREE=0
+else
+ WITH_TREE=1
+fi
+
+
+if test "$with_ftp" = "no" ; then
+ echo Disabling FTP support
+ WITH_FTP=0
+ FTP_OBJ=
+else
+ WITH_FTP=1
+ FTP_OBJ=nanoftp.o
+fi
+
+
+
+if test "$with_http" = "no" ; then
+ echo Disabling HTTP support
+ WITH_HTTP=0
+ HTTP_OBJ=
+else
+ WITH_HTTP=1
+ HTTP_OBJ=nanohttp.o
+fi
+
+
+
+if test "$with_legacy" = "no" ; then
+ echo Disabling deprecated APIs
+ WITH_LEGACY=0
+else
+ WITH_LEGACY=1
+fi
+
+
+if test "$with_reader" = "no" ; then
+ echo Disabling the xmlReader parsing interface
+ WITH_READER=0
+ READER_TEST=
+else
+ WITH_READER=1
+ READER_TEST=Readertests
+ if test "$with_push" = "no" ; then
+ echo xmlReader requires Push interface - enabling it
+ with_push=yes
+ fi
+fi
+
+
+
+if test "$with_writer" = "no" ; then
+ echo Disabling the xmlWriter saving interface
+ WITH_WRITER=0
+# WRITER_TEST=
+else
+ WITH_WRITER=1
+# WRITER_TEST=Writertests
+ if test "$with_push" = "no" ; then
+ echo xmlWriter requires Push interface - enabling it
+ with_push=yes
+ fi
+ if test "$with_output" = "no" ; then
+ echo xmlWriter requires Output interface - enabling it
+ with_output=yes
+ fi
+fi
+
+#AC_SUBST(WRITER_TEST)
+
+if test "$with_pattern" = "no" ; then
+ echo Disabling the xmlPattern parsing interface
+ WITH_PATTERN=0
+ TEST_PATTERN=
+else
+ WITH_PATTERN=1
+ TEST_PATTERN=Patterntests
+fi
+
+
+
+if test "$with_sax1" = "no" ; then
+ echo Disabling the older SAX1 interface
+ WITH_SAX1=0
+ TEST_SAX=
+else
+ WITH_SAX1=1
+ TEST_SAX=SAXtests
+fi
+
+ if test "${WITH_TRIO}" = "1"; then
+ WITH_SAX1_SOURCES_TRUE=
+ WITH_SAX1_SOURCES_FALSE='#'
+else
+ WITH_SAX1_SOURCES_TRUE='#'
+ WITH_SAX1_SOURCES_FALSE=
+fi
+
+
+
+if test "$with_push" = "no" ; then
+ echo Disabling the PUSH parser interfaces
+ WITH_PUSH=0
+ TEST_PUSH=
+else
+ WITH_PUSH=1
+ TEST_PUSH="XMLPushtests"
+fi
+
+
+
+if test "$with_html" = "no" ; then
+ echo Disabling HTML support
+ WITH_HTML=0
+ HTML_OBJ=
+ TEST_HTML=
+else
+ WITH_HTML=1
+ HTML_OBJ="HTMLparser.o HTMLtree.o"
+ TEST_HTML=HTMLtests
+ if test "$with_push" != "no" ; then
+ TEST_PHTML=HTMLPushtests
+ else
+ TEST_PHTML=
+ fi
+fi
+
+
+
+
+
+if test "$with_valid" = "no" ; then
+ echo Disabling DTD validation support
+ WITH_VALID=0
+ TEST_VALID=
+ TEST_VTIME=
+else
+ WITH_VALID=1
+ TEST_VALID=Validtests
+ TEST_VTIME=VTimingtests
+fi
+
+
+
+
+if test "$with_catalog" = "no" ; then
+ echo Disabling Catalog support
+ WITH_CATALOG=0
+ CATALOG_OBJ=
+ TEST_CATALOG=
+else
+ WITH_CATALOG=1
+ CATALOG_OBJ="catalog.o"
+ TEST_CATALOG=Catatests
+fi
+
+
+
+
+if test "$with_docbook" = "no" ; then
+ echo Disabling Docbook support
+ WITH_DOCB=0
+ DOCB_OBJ=
+else
+ WITH_DOCB=1
+ DOCB_OBJ="DOCBparser.o"
+fi
+
+
+
+
+if test "$with_xptr" = "no" ; then
+ echo Disabling XPointer support
+ WITH_XPTR=0
+ XPTR_OBJ=
+ TEST_XPTR=
+else
+ WITH_XPTR=1
+ XPTR_OBJ=xpointer.o
+ TEST_XPTR=XPtrtests
+ if test "$with_xpath" = "no" ; then
+ echo XPointer requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+
+
+
+
+if test "$with_c14n" = "no" ; then
+ echo Disabling C14N support
+ WITH_C14N=0
+ C14N_OBJ=
+ TEST_C14N=
+else
+ WITH_C14N=1
+ C14N_OBJ="c14n.c"
+ TEST_C14N=C14Ntests
+ if test "$with_xpath" = "no" ; then
+ echo C14N requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+
+
+
+
+if test "$with_xinclude" = "no" ; then
+ echo Disabling XInclude support
+ WITH_XINCLUDE=0
+ XINCLUDE_OBJ=
+ with_xinclude="no"
+ TEST_XINCLUDE=
+else
+ WITH_XINCLUDE=1
+ XINCLUDE_OBJ=xinclude.o
+ TEST_XINCLUDE=XIncludetests
+ if test "$with_xpath" = "no" ; then
+ echo XInclude requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+
+
+
+
+if test "$with_xptr" = "" -a "$with_xpath" = "no" ; then
+ with_xptr=no
+fi
+
+if test "$with_schematron" = "" -a "$with_xpath" = "no" ; then
+ with_schematron=no
+fi
+
+if test "$with_schematron" = "no" ; then
+ echo "Disabling Schematron support"
+ WITH_SCHEMATRON=0
+ TEST_SCHEMATRON=
+else
+ echo "Enabled Schematron support"
+ WITH_SCHEMATRON=1
+ TEST_SCHEMATRON="Schematrontests"
+ with_xpath=yes
+ with_pattern=yes
+ with_schematron=yes
+fi
+
+
+
+if test "$with_xpath" = "no" ; then
+ echo Disabling XPATH support
+ WITH_XPATH=0
+ XPATH_OBJ=
+ TEST_XPATH=
+else
+ WITH_XPATH=1
+ XPATH_OBJ=xpath.o
+ TEST_XPATH=XPathtests
+fi
+
+
+
+
+if test "$with_output" = "no" ; then
+ echo Disabling serialization/saving support
+ WITH_OUTPUT=0
+else
+ WITH_OUTPUT=1
+fi
+
+
+WITH_ICONV=0
+if test "$with_iconv" = "no" ; then
+ echo Disabling ICONV support
+else
+ if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
+ CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
+ # Export this since our headers include iconv.h
+ XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
+ ICONV_LIBS="-L$with_iconv/lib"
+ fi
+
+ ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
+if test "x$ac_cv_header_iconv_h" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+
+iconv_t cd = iconv_open ("","");
+iconv (cd, NULL, NULL, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ WITH_ICONV=1
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
+$as_echo_n "checking for iconv in -liconv... " >&6; }
+
+ _ldflags="${LDFLAGS}"
+ _libs="${LIBS}"
+ LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
+ LIBS="${LIBS} -liconv"
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+
+iconv_t cd = iconv_open ("","");
+iconv (cd, NULL, NULL, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ WITH_ICONV=1
+ ICONV_LIBS="${ICONV_LIBS} -liconv"
+ LIBS="${_libs}"
+ LDFLAGS="${_ldflags}"
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ LIBS="${_libs}"
+ LDFLAGS="${_ldflags}"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+ if test "$WITH_ICONV" = "1" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if ${xml_cv_iconv_arg2+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ xml_cv_iconv_arg2=""
+else
+ xml_cv_iconv_arg2="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${xml_xxx:-
+ }$xml_cv_iconv_decl" >&5
+$as_echo "${xml_xxx:-
+ }$xml_cv_iconv_decl" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $xml_cv_iconv_arg2
+_ACEOF
+
+ fi
+fi
+case "$host" in
+ *mingw*) M_LIBS=""
+ ;;
+ *beos*) M_LIBS=""
+ ;;
+ *haiku*) M_LIBS=""
+ ;;
+ *) M_LIBS="-lm"
+ ;;
+esac
+XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
+XML_LIBTOOLLIBS="libxml2.la"
+
+
+WITH_ICU=0
+ICU_LIBS=""
+if test "$with_icu" != "yes" ; then
+ echo Disabling ICU support
+else
+ ICU_CONFIG=icu-config
+ if ${ICU_CONFIG} --cflags >/dev/null 2>&1
+ then
+ ICU_LIBS=`${ICU_CONFIG} --ldflags`
+ WITH_ICU=1
+ echo Enabling ICU support
+ else
+ as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
+ fi
+fi
+
+
+
+WITH_ISO8859X=1
+if test "$WITH_ICONV" != "1" ; then
+if test "$with_iso8859x" = "no" ; then
+ echo Disabling ISO8859X support
+ WITH_ISO8859X=0
+fi
+fi
+
+
+if test "$with_schemas" = "no" ; then
+ echo "Disabling Schemas/Relax-NG support"
+ WITH_SCHEMAS=0
+ TEST_SCHEMAS=
+else
+ echo "Enabled Schemas/Relax-NG support"
+ WITH_SCHEMAS=1
+ TEST_SCHEMAS="Schemastests Relaxtests"
+ if test "$PYTHON_INCLUDES" != "" ; then
+ PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
+ fi
+ with_regexps=yes
+fi
+
+
+
+if test "$with_regexps" = "no" ; then
+ echo Disabling Regexps support
+ WITH_REGEXPS=0
+ TEST_REGEXPS=
+else
+ WITH_REGEXPS=1
+ TEST_REGEXPS="Regexptests Automatatests"
+fi
+
+
+
+if test "$with_debug" = "no" ; then
+ echo Disabling DEBUG support
+ WITH_DEBUG=0
+ DEBUG_OBJ=
+ TEST_DEBUG=
+else
+ WITH_DEBUG=1
+ DEBUG_OBJ=debugXML.o
+ TEST_DEBUG=Scripttests
+fi
+
+
+
+
+if test "$with_mem_debug" = "yes" ; then
+ if test "$with_thread_alloc" = "yes" ; then
+ echo Disabling memory debug - cannot use mem-debug with thread-alloc!
+ WITH_MEM_DEBUG=0
+ else
+ echo Enabling memory debug support
+ WITH_MEM_DEBUG=1
+ fi
+else
+ WITH_MEM_DEBUG=0
+fi
+
+
+if test "$with_run_debug" = "yes" ; then
+ echo Enabling runtime debug support
+ WITH_RUN_DEBUG=1
+else
+ WITH_RUN_DEBUG=0
+fi
+
+
+WIN32_EXTRA_LIBADD=
+WIN32_EXTRA_LDFLAGS=
+CYGWIN_EXTRA_LDFLAGS=
+CYGWIN_EXTRA_PYTHON_LIBADD=
+WIN32_EXTRA_PYTHON_LIBADD=
+case "$host" in
+ *-*-mingw*)
+ CPPFLAGS="$CPPFLAGS -DWIN32"
+ WIN32_EXTRA_LIBADD="-lws2_32"
+ WIN32_EXTRA_LDFLAGS="-no-undefined"
+
+$as_echo "#define _WINSOCKAPI_ 1" >>confdefs.h
+
+ if test "${PYTHON}" != ""
+ then
+ WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
+ fi
+ ;;
+ *-*-cygwin*)
+ CYGWIN_EXTRA_LDFLAGS="-no-undefined"
+ if test "${PYTHON}" != ""
+ then
+ CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+ fi
+ ;;
+esac
+
+
+
+
+
+
+for ac_func in printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ NEED_TRIO=1
+fi
+done
+
+
+if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
+then
+ echo Enabling code coverage for GCC
+ CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
+else
+ echo Disabling code coverage for GCC
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+RELDATE=`date +'%a %b %e %Y'`
+
+
+
+rm -f COPYING.LIB COPYING
+ln -s $srcdir/Copyright COPYING
+
+# keep on one line for cygwin c.f. #130896
+ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake"
+
+ac_config_files="$ac_config_files python/setup.py"
+
+ac_config_files="$ac_config_files xml2-config"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_VERSION_SCRIPT_TRUE}" && test -z "${USE_VERSION_SCRIPT_FALSE}"; then
+ as_fn_error $? "conditional \"USE_VERSION_SCRIPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${REBUILD_DOCS_TRUE}" && test -z "${REBUILD_DOCS_FALSE}"; then
+ as_fn_error $? "conditional \"REBUILD_DOCS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_PYTHON_TRUE}" && test -z "${WITH_PYTHON_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_PYTHON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_TRIO_SOURCES_TRUE}" && test -z "${WITH_TRIO_SOURCES_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_TRIO_SOURCES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${THREADS_W32_TRUE}" && test -z "${THREADS_W32_FALSE}"; then
+ as_fn_error $? "conditional \"THREADS_W32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WITH_SAX1_SOURCES_TRUE}" && test -z "${WITH_SAX1_SOURCES_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_SAX1_SOURCES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "libxml2.spec") CONFIG_FILES="$CONFIG_FILES libxml2.spec:libxml.spec.in" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
+ "include/libxml/Makefile") CONFIG_FILES="$CONFIG_FILES include/libxml/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/examples/Makefile" ;;
+ "doc/devhelp/Makefile") CONFIG_FILES="$CONFIG_FILES doc/devhelp/Makefile" ;;
+ "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;;
+ "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;;
+ "python/tests/Makefile") CONFIG_FILES="$CONFIG_FILES python/tests/Makefile" ;;
+ "xstc/Makefile") CONFIG_FILES="$CONFIG_FILES xstc/Makefile" ;;
+ "include/libxml/xmlversion.h") CONFIG_FILES="$CONFIG_FILES include/libxml/xmlversion.h" ;;
+ "libxml-2.0.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0.pc" ;;
+ "libxml-2.0-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES libxml-2.0-uninstalled.pc" ;;
+ "libxml2-config.cmake") CONFIG_FILES="$CONFIG_FILES libxml2-config.cmake" ;;
+ "python/setup.py") CONFIG_FILES="$CONFIG_FILES python/setup.py" ;;
+ "xml2-config") CONFIG_FILES="$CONFIG_FILES xml2-config" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "python/setup.py":F) chmod +x python/setup.py ;;
+ "xml2-config":F) chmod +x xml2-config ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo Done configuring
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..14ac0a8
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1664 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.63])
+AC_INIT
+AC_CONFIG_SRCDIR([entities.c])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_HOST
+
+LIBXML_MAJOR_VERSION=2
+LIBXML_MINOR_VERSION=9
+LIBXML_MICRO_VERSION=2
+LIBXML_MICRO_VERSION_SUFFIX=
+LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
+LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
+
+LIBXML_VERSION_NUMBER=`expr $LIBXML_MAJOR_VERSION \* 10000 + $LIBXML_MINOR_VERSION \* 100 + $LIBXML_MICRO_VERSION`
+
+if test -f CVS/Entries ; then
+ extra=`grep ChangeLog CVS/Entries | grep -v LIBXML | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-CVS$extra"
+ fi
+else if test -d .svn ; then
+ extra=`svn info | grep Revision | sed 's+Revision: ++'`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-SVN$extra"
+ fi
+else if test -d .git ; then
+ extra=`git describe 2>/dev/null | sed 's+LIBXML[[0-9.]]*-++'`
+ echo extra=$extra
+ if test "$extra" != ""
+ then
+ LIBXML_VERSION_EXTRA="-GIT$extra"
+ fi
+fi
+fi
+fi
+AC_SUBST(LIBXML_MAJOR_VERSION)
+AC_SUBST(LIBXML_MINOR_VERSION)
+AC_SUBST(LIBXML_MICRO_VERSION)
+AC_SUBST(LIBXML_VERSION)
+AC_SUBST(LIBXML_VERSION_INFO)
+AC_SUBST(LIBXML_VERSION_NUMBER)
+AC_SUBST(LIBXML_VERSION_EXTRA)
+
+VERSION=${LIBXML_VERSION}
+
+AM_INIT_AUTOMAKE(libxml2, $VERSION)
+
+# Support silent build rules, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
+# to make
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_CPP
+AC_PATH_PROG(MV, mv, /bin/mv)
+AC_PATH_PROG(TAR, tar, /bin/tar)
+AC_PATH_PROG(PERL, perl, /usr/bin/perl)
+AC_PATH_PROG(WGET, wget, /usr/bin/wget)
+AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
+AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
+PKG_PROG_PKG_CONFIG
+
+LT_INIT
+
+dnl
+dnl if the system support linker version scripts for symbol versioning
+dnl then add it
+dnl
+VERSION_SCRIPT_FLAGS=
+# lt_cv_prog_gnu_ld is from libtool 2.+
+if test "$lt_cv_prog_gnu_ld" = yes; then
+ VERSION_SCRIPT_FLAGS=-Wl,--version-script=
+else
+ case $host in
+ *-*-sunos*) VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,";;
+ esac
+fi
+AC_SUBST(VERSION_SCRIPT_FLAGS)
+AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
+
+dnl
+dnl We process the AC_ARG_WITH first so that later we can modify
+dnl some of them to try to prevent impossible combinations. This
+dnl also allows up so alphabetize the choices
+dnl
+
+dnl
+dnl zlib option might change flags, so we save them initially
+dnl
+_cppflags="${CPPFLAGS}"
+_libs="${LIBS}"
+
+AC_ARG_WITH(c14n,
+[ --with-c14n add the Canonicalization support (on)])
+AC_ARG_WITH(catalog,
+[ --with-catalog add the Catalog support (on)])
+AC_ARG_WITH(debug,
+[ --with-debug add the debugging module (on)])
+AC_ARG_WITH(docbook,
+[ --with-docbook add Docbook SGML support (on)])
+AC_ARG_WITH(fexceptions,
+[ --with-fexceptions add GCC flag -fexceptions for C++ exceptions (off)])
+AC_ARG_WITH(ftp,
+[ --with-ftp add the FTP support (on)])
+AC_ARG_WITH(history,
+[ --with-history add history support to xmllint shell(off)])
+AC_ARG_WITH(html,
+[ --with-html add the HTML support (on)])
+dnl Specific dir for HTML output ?
+AC_ARG_WITH(html-dir, AS_HELP_STRING([--with-html-dir=path],
+ [path to base html directory, default $datadir/doc/html]),
+ [HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
+
+AC_ARG_WITH(html-subdir, AS_HELP_STRING([--with-html-subdir=path],
+ [directory used under html-dir, default $PACKAGE-$VERSION/html]),
+ [test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
+ [HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
+AC_SUBST(HTML_DIR)
+AC_ARG_WITH(http,
+[ --with-http add the HTTP support (on)])
+AC_ARG_WITH(iconv,
+[ --with-iconv[[=DIR]] add ICONV support (on)])
+AC_ARG_WITH(icu,
+[ --with-icu add ICU support (off)])
+AC_ARG_WITH(iso8859x,
+[ --with-iso8859x add ISO8859X support if no iconv (on)])
+AC_ARG_WITH(legacy,
+[ --with-legacy add deprecated APIs for compatibility (on)])
+AC_ARG_WITH(mem_debug,
+[ --with-mem-debug add the memory debugging module (off)])
+AC_ARG_WITH(minimum,
+[ --with-minimum build a minimally sized library (off)])
+AC_ARG_WITH(output,
+[ --with-output add the serialization support (on)])
+AC_ARG_WITH(pattern,
+[ --with-pattern add the xmlPattern selection interface (on)])
+AC_ARG_WITH(push,
+[ --with-push add the PUSH parser interfaces (on)])
+AC_ARG_WITH(python,
+[ --with-python[[=DIR]] build Python bindings if found])
+AC_ARG_WITH(python_install_dir,
+[ --with-python-install-dir=DIR
+ install Python bindings in DIR])
+AC_ARG_WITH(reader,
+[ --with-reader add the xmlReader parsing interface (on)])
+AC_ARG_WITH(readline,
+[ --with-readline=DIR use readline in DIR],[
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ RDL_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+])
+AC_ARG_WITH(regexps,
+[ --with-regexps add Regular Expressions support (on)])
+AC_ARG_WITH(run_debug,
+[ --with-run-debug add the runtime debugging module (off)])
+AC_ARG_WITH(sax1,
+[ --with-sax1 add the older SAX1 interface (on)])
+AC_ARG_WITH(schemas,
+[ --with-schemas add Relax-NG and Schemas support (on)])
+AC_ARG_WITH(schematron,
+[ --with-schematron add Schematron support (on)])
+AC_ARG_WITH(threads,
+[ --with-threads add multithread support(on)])
+AC_ARG_WITH(thread-alloc,
+[ --with-thread-alloc add per-thread memory(off)])
+AC_ARG_WITH(tree,
+[ --with-tree add the DOM like tree manipulation APIs (on)])
+AC_ARG_WITH(valid,
+[ --with-valid add the DTD validation support (on)])
+AC_ARG_WITH(writer,
+[ --with-writer add the xmlWriter saving interface (on)])
+AC_ARG_WITH(xinclude,
+[ --with-xinclude add the XInclude support (on)])
+AC_ARG_WITH(xpath,
+[ --with-xpath add the XPATH support (on)])
+AC_ARG_WITH(xptr,
+[ --with-xptr add the XPointer support (on)])
+AC_ARG_WITH(modules,
+[ --with-modules add the dynamic modules support (on)])
+AC_ARG_WITH(zlib,
+[ --with-zlib[[=DIR]] use libz in DIR],[
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ Z_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+])
+AC_ARG_WITH(lzma,
+[ --with-lzma[[=DIR]] use liblzma in DIR],[
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ LZMA_DIR=$withval
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LIBS="${LIBS} -L$withval/lib"
+ fi
+])
+AC_ARG_WITH(coverage,
+[ --with-coverage build for code coverage with GCC (off)])
+
+AC_ARG_ENABLE(rebuild-docs,
+[ --enable-rebuild-docs[[=yes/no]] rebuild some generated docs [[default=no]]])
+if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
+ AC_MSG_ERROR([cannot rebuild docs when builddir != srcdir])
+fi
+AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"])
+
+dnl
+dnl hard dependancies on options
+dnl
+if test "$with_schemas" = "yes"
+then
+ with_pattern=yes
+ with_regexps=yes
+fi
+if test "$with_schematron" = "yes"
+then
+ with_pattern=yes
+ with_tree=yes
+ with_xpath=yes
+fi
+if test "$with_reader" = "yes"
+then
+ with_push=yes
+fi
+if test "$with_xptr" = "yes"
+then
+ with_xpath=yes
+fi
+dnl
+dnl option to build a minimal libxml2 library
+dnl
+if test "$with_minimum" = "yes"
+then
+ echo "Configuring for a minimal library"
+ if test "$with_c14n" = ""
+ then
+ with_c14n=no
+ fi
+ if test "$with_catalog" = ""
+ then
+ with_catalog=no
+ fi
+ echo So far so good!
+ if test "$with_debug" = ""
+ then
+ with_debug=no
+ fi
+ if test "$with_docbook" = ""
+ then
+ with_docbook=no
+ fi
+ if test "$with_fexceptions" = ""
+ then
+ with_fexceptions=no
+ fi
+ if test "$with_ftp" = ""
+ then
+ with_ftp=no
+ fi
+ if test "$with_history" = ""
+ then
+ with_history=no
+ fi
+ if test "$with_html" = ""
+ then
+ with_html=no
+ fi
+ if test "$with_http" = ""
+ then
+ with_http=no
+ fi
+ if test "$with_iconv" = ""
+ then
+ with_iconv=no
+ fi
+ if test "$with_iso8859x" = ""
+ then
+ with_iso8859x=no
+ fi
+ if test "$with_legacy" = ""
+ then
+ with_legacy=no
+ fi
+ if test "$with_mem_debug" = ""
+ then
+ with_mem_debug=no
+ fi
+ if test "$with_output" = ""
+ then
+ with_output=no
+ fi
+ if test "$with_pattern" = ""
+ then
+ with_pattern=no
+ fi
+ if test "$with_push" = ""
+ then
+ with_push=no
+ fi
+ if test "$with_python" = ""
+ then
+ with_python=no
+ fi
+ if test "$with_reader" = ""
+ then
+ with_reader=no
+ fi
+ if test "$with_readline" = ""
+ then
+ with_readline=no
+ fi
+ if test "$with_regexps" = ""
+ then
+ with_regexps=no
+ fi
+ if test "$with_run_debug" = ""
+ then
+ with_run_debug=no
+ fi
+ if test "$with_sax1" = ""
+ then
+ with_sax1=no
+ fi
+ if test "$with_schemas" = ""
+ then
+ with_schemas=no
+ fi
+ if test "$with_schematron" = ""
+ then
+ with_schematron=no
+ fi
+ if test "$with_threads" = ""
+ then
+ with_threads=no
+ fi
+ if test "$with_thread_alloc" = ""
+ then
+ with_thread_alloc=no
+ fi
+ if test "$with_tree" = ""
+ then
+ with_tree=no
+ fi
+ if test "$with_valid" = ""
+ then
+ with_valid=no
+ fi
+ if test "$with_writer" = ""
+ then
+ with_writer=no
+ fi
+ if test "$with_xinclude" = ""
+ then
+ with_xinclude=no
+ fi
+ if test "$with_xpath" = ""
+ then
+ with_xpath=no
+ fi
+ if test "$with_xptr" = ""
+ then
+ with_xptr=no
+ fi
+ if test "$with_zlib" = ""
+ then
+ with_zlib=no
+ fi
+ if test "$with_modules" = ""
+ then
+ with_modules=no
+ fi
+fi
+
+echo Checking zlib
+
+dnl Checks for zlib library.
+
+WITH_ZLIB=0
+if test "$with_zlib" = "no"; then
+ echo "Disabling compression support"
+else
+ AC_CHECK_HEADERS(zlib.h,
+ [SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${Z_DIR}/lib"
+ AC_CHECK_LIB(z, gzread,[
+ AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
+ WITH_ZLIB=1
+ if test "x${Z_DIR}" != "x"; then
+ Z_CFLAGS="-I${Z_DIR}/include"
+ Z_LIBS="-L${Z_DIR}/lib -lz"
+ [case ${host} in
+ *-*-solaris*)
+ Z_LIBS="-L${Z_DIR}/lib -R${Z_DIR}/lib -lz"
+ ;;
+ esac]
+ else
+ Z_LIBS="-lz"
+ fi])
+ LDFLAGS="${SAVE_LDFLAGS}"])
+fi
+
+AC_SUBST(Z_CFLAGS)
+AC_SUBST(Z_LIBS)
+AC_SUBST(WITH_ZLIB)
+
+echo Checking lzma
+
+dnl Checks for lzma library.
+
+WITH_LZMA=0
+if test "$with_lzma" = "no"; then
+ echo "Disabling compression support"
+else
+ # Try pkg-config first so that static linking works.
+ # If this succeeeds, we ignore the WITH_LZMA directory.
+ PKG_CHECK_MODULES([LZMA],[liblzma],
+ [have_liblzma=yes],
+ [have_liblzma=no])
+
+ # If pkg-config failed, fall back to AC_CHECK_LIB. This
+ # will not pick up the necessary LIBS flags for liblzma's
+ # private dependencies, though, so static linking may fail.
+ if test "x$have_liblzma" = "xno"; then
+ AC_CHECK_HEADERS(lzma.h,
+ [SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${LZMA_DIR}/lib"
+ AC_CHECK_LIB(lzma, lzma_code,[
+ have_liblzma=yes
+ if test "x${LZMA_DIR}" != "x"; then
+ LZMA_CFLAGS="-I${LZMA_DIR}/include"
+ LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
+ else
+ LZMA_LIBS="-llzma"
+ fi],
+ [have_liblzma=no])
+ LDFLAGS="${SAVE_LDFLAGS}"])
+ fi
+
+ # Found the library via either method?
+ if test "x$have_liblzma" = "xyes"; then
+ AC_DEFINE([HAVE_LIBLZMA], [1], [Have compression library])
+ WITH_LZMA=1
+ fi
+fi
+
+AC_SUBST(LZMA_CFLAGS)
+AC_SUBST(LZMA_LIBS)
+AC_SUBST(WITH_LZMA)
+
+CPPFLAGS=${_cppflags}
+LIBS=${_libs}
+
+echo Checking headers
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([ctype.h])
+AC_CHECK_HEADERS([dirent.h])
+AC_CHECK_HEADERS([errno.h])
+AC_CHECK_HEADERS([malloc.h])
+AC_CHECK_HEADERS([stdarg.h])
+AC_CHECK_HEADERS([sys/stat.h])
+AC_CHECK_HEADERS([sys/types.h])
+AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([inttypes.h])
+AC_CHECK_HEADERS([time.h])
+AC_CHECK_HEADERS([ansidecl.h])
+AC_CHECK_HEADERS([ieeefp.h])
+AC_CHECK_HEADERS([nan.h])
+AC_CHECK_HEADERS([math.h])
+AC_CHECK_HEADERS([limits.h])
+AC_CHECK_HEADERS([fp_class.h])
+AC_CHECK_HEADERS([float.h])
+AC_CHECK_HEADERS([stdlib.h])
+AC_CHECK_HEADERS([sys/socket.h], [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+])
+AC_CHECK_HEADERS([netinet/in.h], [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+])
+AC_CHECK_HEADERS([arpa/inet.h], [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+#if HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
+])
+AC_CHECK_HEADERS([netdb.h])
+AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([sys/select.h])
+AC_CHECK_HEADERS([poll.h])
+AC_CHECK_HEADERS([sys/mman.h])
+AC_CHECK_HEADERS([sys/timeb.h])
+AC_CHECK_HEADERS([signal.h])
+AC_CHECK_HEADERS([arpa/nameser.h], [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+])
+AC_CHECK_HEADERS([resolv.h], [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+# endif
+#if HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+# endif
+])
+AC_CHECK_HEADERS([dl.h])
+AC_CHECK_HEADERS([dlfcn.h])
+
+
+echo Checking types
+
+AC_TYPE_UINT32_T
+
+
+echo Checking libraries
+
+dnl Checks for library functions.
+AC_FUNC_STRFTIME
+AC_CHECK_FUNCS(strdup strndup strerror)
+AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
+AC_CHECK_FUNCS(strftime localtime gettimeofday ftime)
+AC_CHECK_FUNCS(stat _stat signal)
+AC_CHECK_FUNCS(rand rand_r srand time)
+AC_CHECK_FUNCS(isascii mmap munmap putenv)
+
+AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
+#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
+# undef /**/ HAVE_MMAP
+#endif])
+
+dnl Checking for va_copy availability
+AC_MSG_CHECKING([for va_copy])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+va_list ap1,ap2;]], [[va_copy(ap1,ap2);]])],
+have_va_copy=yes,
+have_va_copy=no)
+AC_MSG_RESULT($have_va_copy)
+if test x"$have_va_copy" = x"yes"; then
+ AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
+else
+ AC_MSG_CHECKING([for __va_copy])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ va_list ap1,ap2;]], [[__va_copy(ap1,ap2);]])],
+ have___va_copy=yes,
+ have___va_copy=no)
+ AC_MSG_RESULT($have___va_copy)
+ if test x"$have___va_copy" = x"yes"; then
+ AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
+ fi
+fi
+
+dnl Checking whether va_list is an array type
+AC_MSG_CHECKING([whether va_list is an array type])
+AC_TRY_COMPILE2([
+#include <stdarg.h>
+void a(va_list * ap) {}],[
+va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1],[
+ AC_MSG_RESULT(no)],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([VA_LIST_IS_ARRAY], [1],[Define if va_list is an array type])])
+
+dnl Checks for inet libraries:
+AC_SEARCH_LIBS(gethostent, [nsl])
+AC_SEARCH_LIBS(setsockopt, [socket net network])
+AC_SEARCH_LIBS(connect, [inet])
+
+dnl Determine what socket length (socklen_t) data type is
+AC_MSG_CHECKING([for type of socket length (socklen_t)])
+AC_TRY_COMPILE2([
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>],[
+(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
+ AC_MSG_RESULT(socklen_t *)
+ XML_SOCKLEN_T=socklen_t],[
+ AC_TRY_COMPILE2([
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>],[
+(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
+ AC_MSG_RESULT(size_t *)
+ XML_SOCKLEN_T=size_t],[
+ AC_TRY_COMPILE2([
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>],[
+(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
+ AC_MSG_RESULT(int *)
+ XML_SOCKLEN_T=int],[
+ AC_MSG_WARN(could not determine)
+ XML_SOCKLEN_T="int"])])])
+AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
+
+dnl Checking if gethostbyname() argument is const.
+AC_MSG_CHECKING([for const gethostbyname() argument])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
+ [[(void)gethostbyname((const char *)"");]])],
+have_gethostbyname_const_arg=yes,
+have_gethostbyname_const_arg=no)
+AC_MSG_RESULT($have_gethostbyname_const_arg)
+if test x"$have_gethostbyname_const_arg" = x"yes"; then
+ AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [],
+ [Type cast for the gethostbyname() argument])
+else
+ AC_DEFINE([GETHOSTBYNAME_ARG_CAST], [(char *)],
+ [Type cast for the gethostbyname() argument])
+fi
+
+dnl Checking if send() second argument is const.
+AC_MSG_CHECKING([for const send() second argument])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#include <sys/socket.h>]],
+ [[(void)send(1,(const char *)"",1,1);]])],
+have_send_const_arg2=yes,
+have_send_const_arg2=no)
+AC_MSG_RESULT($have_send_const_arg2)
+if test x"$have_send_const_arg2" = x"yes"; then
+ AC_DEFINE([SEND_ARG2_CAST], [],
+ [Type cast for the send() function 2nd arg])
+else
+ AC_DEFINE([SEND_ARG2_CAST], [(char *)],
+ [Type cast for the send() function 2nd arg])
+fi
+
+dnl ***********************Checking for availability of IPv6*******************
+
+AC_MSG_CHECKING([whether to enable IPv6])
+AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
+if test "$with_minimum" = "yes"
+then
+ enable_ipv6=no
+fi
+if test $enable_ipv6 = yes; then
+ have_ipv6=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+# include <sys/types.h>
+# include <sys/socket.h>
+ ]], [[
+ struct sockaddr_storage ss;
+ socket(AF_INET6, SOCK_STREAM, 0)
+ ]])],
+ have_ipv6=yes,
+ have_ipv6=no
+ )
+ AC_MSG_RESULT($have_ipv6)
+
+ if test $have_ipv6 = yes; then
+ AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
+ have_broken_ss_family=no
+
+ dnl *********************************************************************
+ dnl on some platforms (like AIX 5L), the structure sockaddr doesn't have
+ dnl a ss_family member, but rather __ss_family. Let's detect that
+ dnl and define the HAVE_BROKEN_SS_FAMILY when we are on one of these
+ dnl platforms. However, we should only do this if ss_family is not
+ dnl present.
+ dnl ********************************************************************
+ AC_MSG_CHECKING([struct sockaddr::ss_family])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+# include <sys/types.h>
+# include <sys/socket.h>
+ ]], [[
+ struct sockaddr_storage ss ;
+ ss.ss_family = 0 ;
+ ]])],
+ have_ss_family=yes,
+ have_ss_family=no
+ )
+ AC_MSG_RESULT($have_ss_family)
+ if test x$have_ss_family = xno ; then
+ AC_MSG_CHECKING([broken struct sockaddr::ss_family])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+# include <sys/types.h>
+# include <sys/socket.h>
+ ]], [[
+ struct sockaddr_storage ss ;
+ ss.__ss_family = 0 ;
+ ]])],
+ have_broken_ss_family=yes,
+ have_broken_ss_family=no
+ )
+ AC_MSG_RESULT($have_broken_ss_family)
+ if test x$have_broken_ss_family = xyes ; then
+ AC_DEFINE(HAVE_BROKEN_SS_FAMILY, [],
+ [Whether struct sockaddr::__ss_family exists])
+ AC_DEFINE(ss_family, __ss_family,
+ [ss_family is not defined here, use __ss_family instead])
+ else
+ AC_MSG_WARN(ss_family and __ss_family not found)
+ fi
+ fi
+
+ have_getaddrinfo=no
+ AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
+ if test $have_getaddrinfo != yes; then
+ for lib in bsd socket inet; do
+ AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes;break])
+ done
+ fi
+
+ if test $have_getaddrinfo = yes; then
+ AC_DEFINE([HAVE_GETADDRINFO], [], [Define if getaddrinfo is there])
+ fi
+ fi
+fi
+
+dnl ******************************End IPv6 checks******************************
+
+dnl Checks for isnan in libm if not in libc
+AC_CHECK_FUNC(isnan, AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there]) , AC_CHECK_LIB(m, isnan,
+ [AC_DEFINE([HAVE_ISNAN],[], [Define if isnan is there])]))
+
+AC_CHECK_FUNC(isinf, AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there]) , AC_CHECK_LIB(m, isinf,
+ [AC_DEFINE([HAVE_ISINF], [], [Define if isinf is there])]))
+
+XML_LIBDIR='-L${libdir}'
+XML_INCLUDEDIR='-I${includedir}/libxml2'
+
+dnl
+dnl Extra flags
+dnl
+XML_CFLAGS=""
+RDL_LIBS=""
+
+dnl
+dnl Workaround for native compilers
+dnl HP : http://bugs.gnome.org/db/31/3163.html
+dnl DEC : Enable NaN/Inf
+dnl
+if test "${GCC}" != "yes" ; then
+ case "${host}" in
+ hppa*-*-hpux* )
+ CFLAGS="${CFLAGS} -Wp,-H30000"
+ ;;
+ *-dec-osf* )
+ CFLAGS="${CFLAGS} -ieee"
+ ;;
+ alpha*-*-linux* )
+ CFLAGS="${CFLAGS} -ieee"
+ ;;
+ esac
+else
+ if test "$with_fexceptions" = "yes"
+ then
+ #
+ # Not activated by default because this inflates the code size
+ # Used to allow propagation of C++ exceptions through the library
+ #
+ CFLAGS="${CFLAGS} -fexceptions"
+ fi
+
+ # warnings we'd like to see
+ CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+ # warnings we'd like to supress
+ CFLAGS="${CFLAGS} -Wno-long-long"
+ case "${host}" in
+ alpha*-*-linux* )
+ CFLAGS="${CFLAGS} -mieee"
+ ;;
+ alpha*-*-osf* )
+ CFLAGS="${CFLAGS} -mieee"
+ ;;
+ esac
+fi
+case ${host} in
+ *-*-solaris*)
+ XML_LIBDIR="${XML_LIBDIR} -R${libdir}"
+ ;;
+ hppa*-hp-mpeix)
+ NEED_TRIO=1
+ ;;
+ *-*-mingw* | *-*-cygwin* | *-*-msvc* )
+ # If the host is Windows, and shared libraries are disabled, we
+ # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
+ # work properly (without it, xmlexports.h would force the use of
+ # DLL imports, which obviously aren't present in a static
+ # library).
+ if test "x$enable_shared" = "xno"; then
+ XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
+ CFLAGS="$CFLAGS -DLIBXML_STATIC"
+ fi
+ ;;
+esac
+
+
+dnl
+dnl check for python
+dnl
+
+PYTHON_VERSION=
+PYTHON_INCLUDES=
+PYTHON_SITE_PACKAGES=
+PYTHON_TESTS=
+pythondir=
+if test "$with_python" != "no" ; then
+ if test -x "$with_python/bin/python"
+ then
+ echo Found python in $with_python/bin/python
+ PYTHON="$with_python/bin/python"
+ else
+ if test -x "$with_python/python.exe"
+ then
+ echo Found python in $with_python/python.exe
+ PYTHON="$with_python/python.exe"
+ else
+ if test -x "$with_python"
+ then
+ echo Found python in $with_python
+ PYTHON="$with_python"
+ else
+ if test -x "$PYTHON"
+ then
+ echo Found python in environment PYTHON=$PYTHON
+ with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
+ else
+ AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
+ fi
+ fi
+ fi
+ fi
+ if test "$PYTHON" != ""
+ then
+ PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
+ PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
+# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
+#
+# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
+ echo Found Python version $PYTHON_VERSION
+ fi
+ if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
+ then
+ if test -r $with_python/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
+ else
+ if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
+ else
+ if test -r /usr/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
+ else
+ if test -r $with_python/include/Python.h
+ then
+ PYTHON_INCLUDES=$with_python/include
+ else
+ echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test "$with_python_install_dir" != ""
+ then
+ PYTHON_SITE_PACKAGES="$with_python_install_dir"
+ fi
+ if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
+ then
+ if test -d $libdir/python$PYTHON_VERSION/site-packages
+ then
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
+ else
+ if test -d $with_python/lib/site-packages
+ then
+ PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
+ else
+ PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
+ fi
+ fi
+ fi
+ pythondir='$(PYTHON_SITE_PACKAGES)'
+ PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
+else
+ PYTHON=
+fi
+AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
+if test "$PYTHON_INCLUDES" != ""
+then
+ PYTHON_SUBDIR=python
+else
+ PYTHON_SUBDIR=
+fi
+AC_SUBST(pythondir)
+AC_SUBST(PYTHON_SUBDIR)
+AC_SUBST(PYTHON_LIBS)
+
+dnl check for dso support
+WITH_MODULES=0
+TEST_MODULES=
+
+if test "$with_modules" != "no" ; then
+ case "$host" in
+ *-*-cygwin*)
+ MODULE_EXTENSION=".dll"
+ AC_CHECK_LIB(cygwin, dlopen, [
+ WITH_MODULES=1
+ MODULE_PLATFORM_LIBS=
+ AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+ ])
+ ;;
+ *-*-mingw*)
+ MODULE_EXTENSION=".dll"
+ WITH_MODULES=1
+ ;;
+ *)
+ AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [
+ AC_CHECK_LIB(dld, shl_load, [
+ MODULE_PLATFORM_LIBS="-ldld"
+ libxml_have_shl_load=yes], [
+ AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [
+ AC_CHECK_LIB(dl, dlopen, [
+ MODULE_PLATFORM_LIBS="-ldl"
+ libxml_have_dlopen=yes])])])])
+
+ if test "${libxml_have_shl_load}" = "yes"; then
+ MODULE_EXTENSION=".sl"
+ WITH_MODULES=1
+ AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
+ fi
+
+ if test "${libxml_have_dlopen}" = "yes"; then
+ case "${host}" in
+ *-*-hpux* )
+ MODULE_EXTENSION=".sl"
+ ;;
+ * )
+ MODULE_EXTENSION=".so"
+ ;;
+ esac
+
+ WITH_MODULES=1
+ AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+ fi
+ ;;
+ esac
+fi
+
+if test "${WITH_MODULES}" = "1"; then
+ TEST_MODULES="ModuleTests"
+fi
+
+AC_SUBST(WITH_MODULES)
+AC_SUBST(MODULE_PLATFORM_LIBS)
+AC_SUBST(MODULE_EXTENSION)
+AC_SUBST(TEST_MODULES)
+
+dnl
+dnl Tester makes use of readline if present
+dnl
+
+dnl
+dnl specific tests to setup DV and Bill's devel environments with debug etc ...
+dnl (-Wunreachable-code)
+dnl
+if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
+ [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/home/veillard/libxml2" ]] || \
+ [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomesvn/libxml2" ]]
+ then
+ if test "$with_minimum" != "yes"
+ then
+ if test "${with_mem_debug}" = "" ; then
+ echo Activating memory debugging
+ with_mem_debug="yes"
+ with_run_debug="yes"
+ fi
+ if test "${with_docbook}" = "" ; then
+ with_docbook="yes"
+ fi
+ fi
+ if test "${GCC}" = "yes" ; then
+ CFLAGS="-g -O -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
+ fi
+ STATIC_BINARIES="-static"
+dnl -Wcast-qual -ansi
+else
+ STATIC_BINARIES=
+fi
+AC_SUBST(STATIC_BINARIES)
+
+dnl
+dnl Check for trio string functions
+dnl
+
+if test "${NEED_TRIO}" = "1" ; then
+ echo Adding trio library for string functions
+ WITH_TRIO=1
+else
+ WITH_TRIO=0
+fi
+AM_CONDITIONAL(WITH_TRIO_SOURCES, test "${NEED_TRIO}" = "1")
+AC_SUBST(WITH_TRIO)
+
+dnl
+dnl Allow to enable/disable various pieces
+dnl
+echo Checking configuration requirements
+
+dnl
+dnl Thread-related stuff
+dnl
+THREAD_LIBS=""
+BASE_THREAD_LIBS=""
+WITH_THREADS=0
+THREAD_CFLAGS=""
+TEST_THREADS=""
+THREADS_W32=""
+WITH_THREAD_ALLOC=0
+
+if test "$with_threads" = "no" ; then
+ echo Disabling multithreaded support
+else
+ echo Enabling multithreaded support
+
+ dnl Default to native threads on Win32
+ case $host_os in
+ *mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
+ WITH_THREADS="1"
+ THREADS_W32="1"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
+ fi
+ ;;
+ esac
+
+ dnl Use pthread by default in other cases
+ if test -z "$THREADS_W32"; then
+ if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
+ AC_CHECK_HEADER(pthread.h,
+ AC_CHECK_LIB(pthread, pthread_join,[
+ THREAD_LIBS="-lpthread"
+ AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
+ AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
+ WITH_THREADS="1"]))
+ fi
+ fi
+
+ case $host_os in
+ *cygwin*) THREAD_LIBS=""
+ ;;
+ *beos*) WITH_THREADS="1"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
+ ;;
+ *linux*)
+ if test "${GCC}" = "yes" ; then
+ GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+ GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
+ GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
+ if test "${THREAD_LIBS}" = "-lpthread" ; then
+ if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ if expr ${GCC_MAJOR} \> 3 > /dev/null
+ then
+ THREAD_LIBS=""
+ BASE_THREAD_LIBS="-lpthread"
+ else
+ echo old GCC disabling weak symbols for pthread
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "$WITH_THREADS" = "1" ; then
+ THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"
+ TEST_THREADS="Threadtests"
+ fi
+fi
+if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then
+ WITH_THREAD_ALLOC=1
+fi
+
+AC_SUBST(THREAD_LIBS)
+AC_SUBST(BASE_THREAD_LIBS)
+AC_SUBST(WITH_THREADS)
+AC_SUBST(THREAD_CFLAGS)
+AC_SUBST(TEST_THREADS)
+AC_SUBST(WITH_THREAD_ALLOC)
+AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"])
+
+dnl
+dnl xmllint shell history
+dnl
+if test "$with_history" = "yes" ; then
+ echo Enabling xmllint shell history
+ dnl check for terminal library. this is a very cool solution
+ dnl from octave's configure.in
+ unset tcap
+ for termlib in ncurses curses termcap terminfo termlib; do
+ AC_CHECK_LIB(${termlib}, tputs, [tcap="-l$termlib"])
+ test -n "$tcap" && break
+ done
+
+ AC_CHECK_HEADER(readline/history.h,
+ AC_CHECK_LIB(history, append_history,[
+ RDL_LIBS="-lhistory"
+ AC_DEFINE([HAVE_LIBHISTORY], [], [Define if history library is there (-lhistory)])]))
+ AC_CHECK_HEADER(readline/readline.h,
+ AC_CHECK_LIB(readline, readline,[
+ RDL_LIBS="-lreadline $RDL_LIBS $tcap"
+ AC_DEFINE([HAVE_LIBREADLINE], [], [Define if readline library is there (-lreadline)])], , $tcap))
+ if test -n "$RDL_DIR" -a -n "$RDL_LIBS"; then
+ CPPFLAGS="$CPPFLAGS -I${RDL_DIR}/include"
+ RDL_LIBS="-L${RDL_DIR}/lib $RDL_LIBS"
+ fi
+fi
+
+dnl
+dnl Tree functions
+dnl
+if test "$with_tree" = "no" ; then
+ echo Disabling DOM like tree manipulation APIs
+ WITH_TREE=0
+else
+ WITH_TREE=1
+fi
+AC_SUBST(WITH_TREE)
+
+if test "$with_ftp" = "no" ; then
+ echo Disabling FTP support
+ WITH_FTP=0
+ FTP_OBJ=
+else
+ WITH_FTP=1
+ FTP_OBJ=nanoftp.o
+fi
+AC_SUBST(WITH_FTP)
+AC_SUBST(FTP_OBJ)
+
+if test "$with_http" = "no" ; then
+ echo Disabling HTTP support
+ WITH_HTTP=0
+ HTTP_OBJ=
+else
+ WITH_HTTP=1
+ HTTP_OBJ=nanohttp.o
+fi
+AC_SUBST(WITH_HTTP)
+AC_SUBST(HTTP_OBJ)
+
+if test "$with_legacy" = "no" ; then
+ echo Disabling deprecated APIs
+ WITH_LEGACY=0
+else
+ WITH_LEGACY=1
+fi
+AC_SUBST(WITH_LEGACY)
+
+if test "$with_reader" = "no" ; then
+ echo Disabling the xmlReader parsing interface
+ WITH_READER=0
+ READER_TEST=
+else
+ WITH_READER=1
+ READER_TEST=Readertests
+ if test "$with_push" = "no" ; then
+ echo xmlReader requires Push interface - enabling it
+ with_push=yes
+ fi
+fi
+AC_SUBST(WITH_READER)
+AC_SUBST(READER_TEST)
+
+if test "$with_writer" = "no" ; then
+ echo Disabling the xmlWriter saving interface
+ WITH_WRITER=0
+# WRITER_TEST=
+else
+ WITH_WRITER=1
+# WRITER_TEST=Writertests
+ if test "$with_push" = "no" ; then
+ echo xmlWriter requires Push interface - enabling it
+ with_push=yes
+ fi
+ if test "$with_output" = "no" ; then
+ echo xmlWriter requires Output interface - enabling it
+ with_output=yes
+ fi
+fi
+AC_SUBST(WITH_WRITER)
+#AC_SUBST(WRITER_TEST)
+
+if test "$with_pattern" = "no" ; then
+ echo Disabling the xmlPattern parsing interface
+ WITH_PATTERN=0
+ TEST_PATTERN=
+else
+ WITH_PATTERN=1
+ TEST_PATTERN=Patterntests
+fi
+AC_SUBST(WITH_PATTERN)
+AC_SUBST(TEST_PATTERN)
+
+if test "$with_sax1" = "no" ; then
+ echo Disabling the older SAX1 interface
+ WITH_SAX1=0
+ TEST_SAX=
+else
+ WITH_SAX1=1
+ TEST_SAX=SAXtests
+fi
+AC_SUBST(WITH_SAX1)
+AM_CONDITIONAL(WITH_SAX1_SOURCES, test "${WITH_TRIO}" = "1")
+AC_SUBST(TEST_SAX)
+
+if test "$with_push" = "no" ; then
+ echo Disabling the PUSH parser interfaces
+ WITH_PUSH=0
+ TEST_PUSH=
+else
+ WITH_PUSH=1
+ TEST_PUSH="XMLPushtests"
+fi
+AC_SUBST(WITH_PUSH)
+AC_SUBST(TEST_PUSH)
+
+if test "$with_html" = "no" ; then
+ echo Disabling HTML support
+ WITH_HTML=0
+ HTML_OBJ=
+ TEST_HTML=
+else
+ WITH_HTML=1
+ HTML_OBJ="HTMLparser.o HTMLtree.o"
+ TEST_HTML=HTMLtests
+ if test "$with_push" != "no" ; then
+ TEST_PHTML=HTMLPushtests
+ else
+ TEST_PHTML=
+ fi
+fi
+AC_SUBST(WITH_HTML)
+AC_SUBST(HTML_OBJ)
+AC_SUBST(TEST_HTML)
+AC_SUBST(TEST_PHTML)
+
+if test "$with_valid" = "no" ; then
+ echo Disabling DTD validation support
+ WITH_VALID=0
+ TEST_VALID=
+ TEST_VTIME=
+else
+ WITH_VALID=1
+ TEST_VALID=Validtests
+ TEST_VTIME=VTimingtests
+fi
+AC_SUBST(WITH_VALID)
+AC_SUBST(TEST_VALID)
+AC_SUBST(TEST_VTIME)
+
+if test "$with_catalog" = "no" ; then
+ echo Disabling Catalog support
+ WITH_CATALOG=0
+ CATALOG_OBJ=
+ TEST_CATALOG=
+else
+ WITH_CATALOG=1
+ CATALOG_OBJ="catalog.o"
+ TEST_CATALOG=Catatests
+fi
+AC_SUBST(WITH_CATALOG)
+AC_SUBST(CATALOG_OBJ)
+AC_SUBST(TEST_CATALOG)
+
+if test "$with_docbook" = "no" ; then
+ echo Disabling Docbook support
+ WITH_DOCB=0
+ DOCB_OBJ=
+else
+ WITH_DOCB=1
+ DOCB_OBJ="DOCBparser.o"
+fi
+AC_SUBST(WITH_DOCB)
+AC_SUBST(DOCB_OBJ)
+
+
+if test "$with_xptr" = "no" ; then
+ echo Disabling XPointer support
+ WITH_XPTR=0
+ XPTR_OBJ=
+ TEST_XPTR=
+else
+ WITH_XPTR=1
+ XPTR_OBJ=xpointer.o
+ TEST_XPTR=XPtrtests
+ if test "$with_xpath" = "no" ; then
+ echo XPointer requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+AC_SUBST(WITH_XPTR)
+AC_SUBST(XPTR_OBJ)
+AC_SUBST(TEST_XPTR)
+
+if test "$with_c14n" = "no" ; then
+ echo Disabling C14N support
+ WITH_C14N=0
+ C14N_OBJ=
+ TEST_C14N=
+else
+ WITH_C14N=1
+ C14N_OBJ="c14n.c"
+ TEST_C14N=C14Ntests
+ if test "$with_xpath" = "no" ; then
+ echo C14N requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+AC_SUBST(WITH_C14N)
+AC_SUBST(C14N_OBJ)
+AC_SUBST(TEST_C14N)
+
+if test "$with_xinclude" = "no" ; then
+ echo Disabling XInclude support
+ WITH_XINCLUDE=0
+ XINCLUDE_OBJ=
+ with_xinclude="no"
+ TEST_XINCLUDE=
+else
+ WITH_XINCLUDE=1
+ XINCLUDE_OBJ=xinclude.o
+ TEST_XINCLUDE=XIncludetests
+ if test "$with_xpath" = "no" ; then
+ echo XInclude requires XPath support - enabling it
+ with_xpath=yes
+ fi
+fi
+AC_SUBST(WITH_XINCLUDE)
+AC_SUBST(XINCLUDE_OBJ)
+AC_SUBST(TEST_XINCLUDE)
+
+if test "$with_xptr" = "" -a "$with_xpath" = "no" ; then
+ with_xptr=no
+fi
+
+if test "$with_schematron" = "" -a "$with_xpath" = "no" ; then
+ with_schematron=no
+fi
+
+if test "$with_schematron" = "no" ; then
+ echo "Disabling Schematron support"
+ WITH_SCHEMATRON=0
+ TEST_SCHEMATRON=
+else
+ echo "Enabled Schematron support"
+ WITH_SCHEMATRON=1
+ TEST_SCHEMATRON="Schematrontests"
+ with_xpath=yes
+ with_pattern=yes
+ with_schematron=yes
+fi
+AC_SUBST(WITH_SCHEMATRON)
+AC_SUBST(TEST_SCHEMATRON)
+
+if test "$with_xpath" = "no" ; then
+ echo Disabling XPATH support
+ WITH_XPATH=0
+ XPATH_OBJ=
+ TEST_XPATH=
+else
+ WITH_XPATH=1
+ XPATH_OBJ=xpath.o
+ TEST_XPATH=XPathtests
+fi
+AC_SUBST(WITH_XPATH)
+AC_SUBST(XPATH_OBJ)
+AC_SUBST(TEST_XPATH)
+
+dnl
+dnl output functions
+dnl
+if test "$with_output" = "no" ; then
+ echo Disabling serialization/saving support
+ WITH_OUTPUT=0
+else
+ WITH_OUTPUT=1
+fi
+AC_SUBST(WITH_OUTPUT)
+
+WITH_ICONV=0
+if test "$with_iconv" = "no" ; then
+ echo Disabling ICONV support
+else
+ if test "$with_iconv" != "yes" -a "$with_iconv" != "" ; then
+ CPPFLAGS="${CPPFLAGS} -I$with_iconv/include"
+ # Export this since our headers include iconv.h
+ XML_INCLUDEDIR="${XML_INCLUDEDIR} -I$with_iconv/include"
+ ICONV_LIBS="-L$with_iconv/lib"
+ fi
+
+ AC_CHECK_HEADER(iconv.h,
+ AC_MSG_CHECKING(for iconv)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+#include <iconv.h>]],[[
+iconv_t cd = iconv_open ("","");
+iconv (cd, NULL, NULL, NULL, NULL);]])],[
+ AC_MSG_RESULT(yes)
+ WITH_ICONV=1],[
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(for iconv in -liconv)
+
+ _ldflags="${LDFLAGS}"
+ _libs="${LIBS}"
+ LDFLAGS="${LDFLAGS} ${ICONV_LIBS}"
+ LIBS="${LIBS} -liconv"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+#include <iconv.h>]],[[
+iconv_t cd = iconv_open ("","");
+iconv (cd, NULL, NULL, NULL, NULL);]])],[
+ AC_MSG_RESULT(yes)
+ WITH_ICONV=1
+ ICONV_LIBS="${ICONV_LIBS} -liconv"
+ LIBS="${_libs}"
+ LDFLAGS="${_ldflags}"],[
+ AC_MSG_RESULT(no)
+ LIBS="${_libs}"
+ LDFLAGS="${_ldflags}"])]))
+
+ if test "$WITH_ICONV" = "1" ; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(xml_cv_iconv_arg2, [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+]], [])], xml_cv_iconv_arg2="", xml_cv_iconv_arg2="const")])
+
+ xml_cv_iconv_decl="extern size_t iconv (iconv_t cd, $xml_cv_iconv_arg2 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+ AC_MSG_RESULT([${xml_xxx:-
+ }$xml_cv_iconv_decl])
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $xml_cv_iconv_arg2,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+fi
+case "$host" in
+ *mingw*) M_LIBS=""
+ ;;
+ *beos*) M_LIBS=""
+ ;;
+ *haiku*) M_LIBS=""
+ ;;
+ *) M_LIBS="-lm"
+ ;;
+esac
+XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
+XML_LIBTOOLLIBS="libxml2.la"
+AC_SUBST(WITH_ICONV)
+
+WITH_ICU=0
+ICU_LIBS=""
+if test "$with_icu" != "yes" ; then
+ echo Disabling ICU support
+else
+ ICU_CONFIG=icu-config
+ if ${ICU_CONFIG} --cflags >/dev/null 2>&1
+ then
+ ICU_LIBS=`${ICU_CONFIG} --ldflags`
+ WITH_ICU=1
+ echo Enabling ICU support
+ else
+ AC_MSG_ERROR([libicu config program icu-config not found])
+ fi
+fi
+AC_SUBST(WITH_ICU)
+AC_SUBST(ICU_LIBS)
+
+WITH_ISO8859X=1
+if test "$WITH_ICONV" != "1" ; then
+if test "$with_iso8859x" = "no" ; then
+ echo Disabling ISO8859X support
+ WITH_ISO8859X=0
+fi
+fi
+AC_SUBST(WITH_ISO8859X)
+
+if test "$with_schemas" = "no" ; then
+ echo "Disabling Schemas/Relax-NG support"
+ WITH_SCHEMAS=0
+ TEST_SCHEMAS=
+else
+ echo "Enabled Schemas/Relax-NG support"
+ WITH_SCHEMAS=1
+ TEST_SCHEMAS="Schemastests Relaxtests"
+ if test "$PYTHON_INCLUDES" != "" ; then
+ PYTHON_TESTS="$PYTHON_TESTS RelaxNGPythonTests SchemasPythonTests"
+ fi
+ with_regexps=yes
+fi
+AC_SUBST(WITH_SCHEMAS)
+AC_SUBST(TEST_SCHEMAS)
+
+if test "$with_regexps" = "no" ; then
+ echo Disabling Regexps support
+ WITH_REGEXPS=0
+ TEST_REGEXPS=
+else
+ WITH_REGEXPS=1
+ TEST_REGEXPS="Regexptests Automatatests"
+fi
+AC_SUBST(WITH_REGEXPS)
+AC_SUBST(TEST_REGEXPS)
+
+if test "$with_debug" = "no" ; then
+ echo Disabling DEBUG support
+ WITH_DEBUG=0
+ DEBUG_OBJ=
+ TEST_DEBUG=
+else
+ WITH_DEBUG=1
+ DEBUG_OBJ=debugXML.o
+ TEST_DEBUG=Scripttests
+fi
+AC_SUBST(WITH_DEBUG)
+AC_SUBST(DEBUG_OBJ)
+AC_SUBST(TEST_DEBUG)
+
+if test "$with_mem_debug" = "yes" ; then
+ if test "$with_thread_alloc" = "yes" ; then
+ echo Disabling memory debug - cannot use mem-debug with thread-alloc!
+ WITH_MEM_DEBUG=0
+ else
+ echo Enabling memory debug support
+ WITH_MEM_DEBUG=1
+ fi
+else
+ WITH_MEM_DEBUG=0
+fi
+AC_SUBST(WITH_MEM_DEBUG)
+
+if test "$with_run_debug" = "yes" ; then
+ echo Enabling runtime debug support
+ WITH_RUN_DEBUG=1
+else
+ WITH_RUN_DEBUG=0
+fi
+AC_SUBST(WITH_RUN_DEBUG)
+
+WIN32_EXTRA_LIBADD=
+WIN32_EXTRA_LDFLAGS=
+CYGWIN_EXTRA_LDFLAGS=
+CYGWIN_EXTRA_PYTHON_LIBADD=
+WIN32_EXTRA_PYTHON_LIBADD=
+case "$host" in
+ *-*-mingw*)
+ CPPFLAGS="$CPPFLAGS -DWIN32"
+ WIN32_EXTRA_LIBADD="-lws2_32"
+ WIN32_EXTRA_LDFLAGS="-no-undefined"
+ AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
+ if test "${PYTHON}" != ""
+ then
+ WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)"
+ fi
+ ;;
+ *-*-cygwin*)
+ CYGWIN_EXTRA_LDFLAGS="-no-undefined"
+ if test "${PYTHON}" != ""
+ then
+ CYGWIN_EXTRA_PYTHON_LIBADD="-L/usr/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+ fi
+ ;;
+esac
+AC_SUBST(WIN32_EXTRA_LIBADD)
+AC_SUBST(WIN32_EXTRA_LDFLAGS)
+AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD)
+AC_SUBST(CYGWIN_EXTRA_LDFLAGS)
+AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD)
+
+dnl Checking the standard string functions availability
+dnl
+dnl Note mingw* has C99 implementation that produce expected xml numbers
+dnl if code use {v}snprintf functions.
+dnl If you like to activate at run-time C99 compatible number output
+dnl see release note for mingw runtime 3.15:
+dnl http://sourceforge.net/project/shownotes.php?release_id=24832
+dnl
+dnl Also *win32*config.h files redefine them for various MSC compilers.
+dnl
+dnl So do not redefine {v}snprintf to _{v}snprintf like follwing:
+dnl AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
+dnl AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])
+dnl and do not redefine those functions is C-source files.
+dnl
+AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
+ NEED_TRIO=1)
+
+if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
+then
+ echo Enabling code coverage for GCC
+ CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
+else
+ echo Disabling code coverage for GCC
+fi
+
+AC_SUBST(CPPFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(XML_CFLAGS)
+
+AC_SUBST(XML_LIBDIR)
+AC_SUBST(XML_LIBS)
+AC_SUBST(XML_LIBTOOLLIBS)
+AC_SUBST(ICONV_LIBS)
+AC_SUBST(XML_INCLUDEDIR)
+AC_SUBST(HTML_DIR)
+AC_SUBST(HAVE_ISNAN)
+AC_SUBST(HAVE_ISINF)
+AC_SUBST(PYTHON)
+AC_SUBST(PYTHON_VERSION)
+AC_SUBST(PYTHON_INCLUDES)
+AC_SUBST(PYTHON_SITE_PACKAGES)
+
+AC_SUBST(M_LIBS)
+AC_SUBST(RDL_LIBS)
+
+dnl for the spec file
+RELDATE=`date +'%a %b %e %Y'`
+AC_SUBST(RELDATE)
+AC_SUBST(PYTHON_TESTS)
+
+rm -f COPYING.LIB COPYING
+ln -s $srcdir/Copyright COPYING
+
+# keep on one line for cygwin c.f. #130896
+AC_CONFIG_FILES([libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h libxml-2.0.pc libxml-2.0-uninstalled.pc libxml2-config.cmake])
+AC_CONFIG_FILES([python/setup.py], [chmod +x python/setup.py])
+AC_CONFIG_FILES([xml2-config], [chmod +x xml2-config])
+AC_OUTPUT
+
+echo Done configuring
diff --git a/dbgen.pl b/dbgen.pl
new file mode 100755
index 0000000..1383d6e
--- /dev/null
+++ b/dbgen.pl
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+$size = shift;
+
+if ($size eq "")
+{
+ die "usage: dbgen.pl [size]\n";
+}
+
+@firstnames = ("Al", "Bob", "Charles", "David", "Egon", "Farbood",
+ "George", "Hank", "Inki", "James");
+@lastnames = ("Aranow", "Barker", "Corsetti", "Dershowitz", "Engleman",
+ "Franklin", "Grice", "Haverford", "Ilvedson", "Jones");
+@states = ("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA",
+ "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
+ "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
+ "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
+ "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY");
+
+print "<?xml version=\"1.0\"?>\n";
+print "\n";
+print "<table>\n";
+
+for ($i=0; $i<$size; $i++)
+{
+ $first = $firstnames [$i % 10];
+ $last = $lastnames [($i / 10) % 10];
+ $state = $states [($i / 100) % 50];
+ $zip = 22000 + $i / 5000;
+
+ printf " <row>\n";
+ printf " <id>%04d</id>\n", $i;
+ printf " <firstname>$first</firstname>\n", $i;
+ printf " <lastname>$last</lastname>\n", $i;
+ printf " <street>%d Any St.</street>\n", ($i % 100) + 1;
+ printf " <city>Anytown</city>\n";
+ printf " <state>$state</state>\n";
+ printf " <zip>%d</zip>\n", $zip;
+ printf " </row>\n";
+}
+
+print "</table>\n";
+
diff --git a/dbgenattr.pl b/dbgenattr.pl
new file mode 100755
index 0000000..dce11cd
--- /dev/null
+++ b/dbgenattr.pl
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+
+$size = shift;
+
+if ($size eq "")
+{
+ die "usage: dbgen.pl [size]\n";
+}
+
+@firstnames = ("Al", "Bob", "Charles", "David", "Egon", "Farbood",
+ "George", "Hank", "Inki", "James");
+@lastnames = ("Aranow", "Barker", "Corsetti", "Dershowitz", "Engleman",
+ "Franklin", "Grice", "Haverford", "Ilvedson", "Jones");
+@states = ("AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA",
+ "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
+ "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
+ "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
+ "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY");
+
+print "<?xml version=\"1.0\"?>\n";
+print "\n";
+print "<table>\n";
+
+for ($i=0; $i<$size; $i++)
+{
+ $first = $firstnames [$i % 10];
+ $last = $lastnames [($i / 10) % 10];
+ $state = $states [($i / 100) % 50];
+ $zip = 22000 + $i / 5000;
+
+ printf " <row\n";
+ printf " id='%04d'\n", $i;
+ printf " firstname='$first'\n", $i;
+ printf " lastname='$last'\n", $i;
+ printf " street='%d Any St.'\n", ($i % 100) + 1;
+ printf " city='Anytown'\n";
+ printf " state='$state'\n";
+ printf " zip='%d'/>\n", $zip;
+}
+
+print "</table>\n";
+
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..29b4b7f
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,12 @@
+Notes about libxml2
+-------------------
+While libxml2 is trying to fit at best the XML, XPath, XIncludes, etc.
+standards, it is likely to contain implementation bugs which tend to
+disappear with newer versions.
+For this reason, if you are using libxml2 libraries or tools for standard
+conforming development, it's suggested to upgrade libxml2 with newer
+packages from either testing or unstable Debian repositories.
+If you're using libxml2 in Gnome context, or similar case (ie. xml usage
+not requiring heavy standards compliance), you don't need such upgrade.
+
+-- Mike Hommey <glandium@debian.org>, Sat Oct 16 14:29:43 JST 2004
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a2f9950
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,1725 @@
+libxml2 (2.9.1+dfsg1-4) unstable; urgency=low
+
+ [ Christian Svensson ]
+ * Do not build-depend on readline (Closes: #742350)
+
+ [ Daniel Schepler ]
+ * Patch to bootstrap without python (Closes: #738080)
+
+ [ Helmut Grohne ]
+ * Drop unneeded B-D on perl and binutils (Closes: #753005)
+
+ [ Adam Conrad ]
+ * Actually run dh_autoreconf, which the old/new mixed rules file misses.
+
+ [ Matthias Klose ]
+ * Add patch to fix python multiarch issue
+ * Allow the package to cross-build by tweaking B-Ds on python
+ * Set PYTHON_LIBS for cross builds
+
+ [ Aron Xu ]
+ * Use correct $CC
+ * Configure udeb without python
+ * New round of cherry-picking upstream fixes
+ - Includes fixes for CVE-2014-0191 (Closes: #747309).
+ * Call prename with -vf
+ * Require python-all-dev (>= 2.7.5-5~)
+ * Bump std-ver: 3.9.4 -> 3.9.5, no change
+
+ -- Aron Xu <aron@debian.org> Wed, 09 Jul 2014 05:40:15 +0800
+
+libxml2 (2.9.1+dfsg1-3) unstable; urgency=low
+
+ * debian/patches/0007-Fix-XPath-optimization-with-predicates.patch:
+ - Upstream patch to fix XPath evaluation issue. (Closes: #713146)
+
+ -- Aron Xu <aron@debian.org> Mon, 05 Aug 2013 11:02:43 +0800
+
+libxml2 (2.9.1+dfsg1-2) unstable; urgency=low
+
+ * Upload to unstable.
+ * debian/patches/000[2-6]-*.patch:
+ - cherry-picking upstream post-release fixes.
+
+ -- Aron Xu <aron@debian.org> Mon, 17 Jun 2013 23:24:07 +0800
+
+libxml2 (2.9.1+dfsg1-1) experimental; urgency=low
+
+ * New upstream release (Closes: #696300, #705722).
+ * Add -llzma for static linking (Closes: #697382).
+ * Update symbols.
+ * Update debian/watch, thanks to Bart Martens.
+ * Use canonical Vcs-* fields.
+ * Mark python-libxml2-dbg as "Multi-Arch: same".
+
+ -- Aron Xu <aron@debian.org> Sun, 09 Jun 2013 00:34:16 +0800
+
+libxml2 (2.9.0+dfsg1-4) experimental; urgency=low
+
+ [ Daniel Veillard ]
+ * Fix potential out of bound access
+ CVE-2012-5134, Closes: #694521.
+
+ -- Aron Xu <aron@debian.org> Wed, 28 Nov 2012 22:34:15 +0800
+
+libxml2 (2.9.0+dfsg1-3) experimental; urgency=low
+
+ [ Aron Xu ]
+ * Remove -L/usr/lib from xml2-config, advise to use pkg-config
+ in man, and add pkg-config to Suggests. (Closes: #689168)
+
+ [ YunQiang Su ]
+ * Fix python-libxml2 undefined symbol (Closes: #689191)
+
+ [ Daniel Holbach ]
+ * Add simple autopkgtest to the package (Closes: #690047)
+
+ -- Aron Xu <aron@debian.org> Sun, 28 Oct 2012 03:59:43 +0800
+
+libxml2 (2.9.0+dfsg1-2) experimental; urgency=low
+
+ * Fix a thread portability problem by cherry-picking upstream
+ patch (Closes: #688473).
+
+ -- Aron Xu <aron@debian.org> Sun, 23 Sep 2012 16:50:12 +0800
+
+libxml2 (2.9.0+dfsg1-1) experimental; urgency=low
+
+ * New upstream release.
+ * Remove old patches applied upstream, cherry-pick one
+ upstream post release patch.
+ * Update symbols.
+ * Update std-ver 3.9.3 -> 3.9.4, no change required.
+
+ -- Aron Xu <aron@debian.org> Fri, 21 Sep 2012 00:21:42 +0800
+
+libxml2 (2.8.0+dfsg1-5) unstable; urgency=low
+
+ [ Daniel Veillard ]
+ * Fix parser local buffers size problems
+ * Fix entities local buffers size problems
+ CVE-2012-2807, Closes: #679280.
+
+ -- Aron Xu <aron@debian.org> Thu, 19 Jul 2012 17:11:09 +0800
+
+libxml2 (2.8.0+dfsg1-4) unstable; urgency=low
+
+ * Sanitize the output of `xml2-config --libs`.
+
+ -- Aron Xu <aron@debian.org> Thu, 19 Jul 2012 17:10:06 +0800
+
+libxml2 (2.8.0+dfsg1-3) unstable; urgency=low
+
+ * Remove odd output of xml2-config --libs (Closes: #675682).
+ * Mark libxml2-dev "M-A: same" again, fixed xml2-config
+ (Closes: #674474).
+
+ -- Aron Xu <aron@debian.org> Tue, 05 Jun 2012 01:44:14 +0800
+
+libxml2 (2.8.0+dfsg1-2) unstable; urgency=low
+
+ * debian/control:
+ - Remove "M-A: same" from libxml2-dev (Closes: #674474).
+ - Add "M-A: foreign" to libxml2-doc.
+ * debian/rules:
+ - Style change on calling dh using --with.
+ - Enable all hardening features.
+ - The sed command for removing DEB_HOST_MULTIARCH is not reverted
+ because it's generally a good idea to avoid it here.
+ * lintian-overrides:
+ - libxml2: package-name-doesnt-match-sonames
+ - python-libxml2-dbg: hardening-no-fortify-functions
+
+ -- Aron Xu <aron@debian.org> Sat, 02 Jun 2012 15:09:37 +0800
+
+libxml2 (2.8.0+dfsg1-1) unstable; urgency=low
+
+ * New upstream release. (Closes: #148220, #590934)
+ * Adjust changelog of previous NMU (Closes: #674739).
+ * Try to avoid useless space in /usr/bin/xml-config (Closes: #674474).
+
+ -- Aron Xu <aron@debian.org> Fri, 25 May 2012 04:06:35 +0000
+
+libxml2 (2.7.8.dfsg-9.1) unstable; urgency=high
+
+ * Non-maintainer upload by the Security Team.
+ * Fix CVE-2011-3102: off by one pointer access in xpointer.c
+ (Closes: #674191).
+
+ -- Michael Gilbert <mgilbert@debian.org> Wed, 23 May 2012 13:48:52 -0400
+
+libxml2 (2.7.8.dfsg-9) unstable; urgency=low
+
+ * Multi-Arch ready. (Closes: #643026)
+ - M-A:same packages are libxml2, libxml2-dev and libxml2-dbg.
+ - M-A:foreign package is libxml2-utils, others are not M-A.
+ - Library files in udeb are still placed under usr/lib directly.
+ * New binary: libxml2-utils-dbg.
+ Move debuggings symbols of libxml2-utils binaries to another package
+ in favor of marking libxml2-dbg as M-A: same. Descriptions of related
+ binary packages are slightly modified.
+ * Enable hardening for Python modules. (Closes: #664107)
+ * Add support for build-arch and build target, essentially make the
+ package not FTBFS anymore. (Closes: #668672)
+ * Use dh compat 9. Not hardcoding libdir in debian/rules.
+ * Port to source format 3.0 to ease future maintenance of patches.
+ - Old patches are stored in 01_historical_changes.patch
+ - Do not patch Makefile.in directly, use dh_autoreconf with patches to
+ configure.in and Makefile.am instead. This will not actually make
+ bootstraping a new architecture more difficult since we already have
+ gettext and autoconf in deep B-D, porters need to break it anyway.
+ - Store doc/examples/index.html in patch to avoid ciculate B-D with
+ xsltproc, we should not B-D on it.
+ * debian/*.dirs: removed, useless.
+
+ -- Aron Xu <aron@debian.org> Sun, 22 Apr 2012 00:16:37 +0800
+
+libxml2 (2.7.8.dfsg-8) unstable; urgency=high
+
+ * New maintainer (Closes: #654176).
+ * Apply upstream patch to add randomization to hashing with large
+ dictionaries to mitigate hash DoS (CVE-2012-0841; Closes: #660846)
+ * Bump std-ver to 3.9.3, no change needed.
+
+ -- Aron Xu <aron@debian.org> Thu, 12 Apr 2012 09:19:04 +0800
+
+libxml2 (2.7.8.dfsg-7) unstable; urgency=low
+
+ * Team upload.
+ * parser.c: Fix an allocation error when copying entities.
+ CVE-2011-3919. Closes: #656377.
+
+ -- Andrew O. Shadura <bugzilla@tut.by> Fri, 20 Jan 2012 12:54:41 +0300
+
+libxml2 (2.7.8.dfsg-6) unstable; urgency=low
+
+ * Team upload.
+ * Enabled hardened build flags (Closes: #654903).
+ * error.c: Fix __xmlRaiseError (Closes: #622358).
+
+ -- Andrew O. Shadura <bugzilla@tut.by> Thu, 12 Jan 2012 00:57:32 +0300
+
+libxml2 (2.7.8.dfsg-5.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * encoding.c: Fix off by one error. CVE-2011-0216.
+ * parser.c: Make sure parser returns when getting a Stop order.
+ CVE-2011-3905.
+ * Both closes: #652352.
+
+ -- Luk Claes <luk@debian.org> Fri, 30 Dec 2011 18:31:13 +0100
+
+libxml2 (2.7.8.dfsg-5) unstable; urgency=low
+
+ * xpath.c, xpointer.c, include/libxml/xpath.h: Hardening of XPath evaluation.
+ CVE-2011-2821.
+ * xpath.c: Fix for undefined namespaces. CVE-2011-2834.
+ * Both closes: #643648.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 07 Oct 2011 09:31:14 +0200
+
+libxml2 (2.7.8.dfsg-4) unstable; urgency=low
+
+ * debian/rules: Add --with python2 to dh call.
+ * debian/control:
+ - Remove build dependency on python-support.
+ - Build depend on python-all-dev >= 2.6.6-3~.
+ - Remove XB-Python-Version header.
+ - Bump Standards-Version to 3.9.2.0. No changes required.
+ * debian/pycompat: Removed. With the above changes, closes: #631416.
+ Thanks Colin Watson.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 29 Jul 2011 12:33:08 +0200
+
+libxml2 (2.7.8.dfsg-3) unstable; urgency=low
+
+ * xpath.c: Fix some potential problems on reallocation failures.
+ Closes: #628537.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 04 Jun 2011 10:40:39 +0900
+
+libxml2 (2.7.8.dfsg-2) unstable; urgency=low
+
+ * xpath.c: Fix a double-freeing error in XPath processing code.
+ (CVE-2010-4494). Closes: #607922.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 25 Dec 2010 10:48:27 +0100
+
+libxml2 (2.7.8.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * configure.in: Applied upstream fix to reactivate symbol versioning script.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 05 Nov 2010 08:23:58 +0100
+
+libxml2 (2.7.7.dfsg-4) unstable; urgency=low
+
+ * debian/rules:
+ - Use a variable to express which sub-targets to invoke for
+ configure/build/install.
+ - Refactor configure-% and build-% rules.
+ - Avoid possible renaming of _d.so files to _d_d.so files in the
+ install-python%-dbg rules.
+ * debian/control, debian/control.udeb, debian/libxml2-udeb.install,
+ debian/rules: Add an udeb package when building for Ubuntu.
+ Closes: #583767.
+ * debian/control:
+ - Remove old Conflicts/Replaces for packages that have disappeared before
+ etch.
+ - Bump Standards-Version to 3.9.0.0.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 29 Jun 2010 12:42:35 +0200
+
+libxml2 (2.7.7.dfsg-3) unstable; urgency=low
+
+ * debian/rules: Use build_python* instead of build-python* as build
+ directory when configuring python modules. build-python$* would get
+ matched by make as an existing file and would prevent evaluation of the
+ corresponding build rule. Thanks Loïc Minier.
+ * debian/python-libxml2.install: Don't hardcode site-/dist-packages in
+ .install. Cope with builds which don't have any dist-packages (or
+ site-packages) based python versions. Thanks Loïc Minier.
+ * debian/rules, debian/python-libxml2-dbg.install, debian/control:
+ Add a python-libxml2-dbg package. Closes: #583582.
+ * debian/rules: Don't link against libpython.
+ * python-libxml2-dbg.preinst: Remove /usr/share/doc/python-libxml2-dbg
+ symlink when it exists (which is the case with older Ubuntu packages).
+
+ -- Mike Hommey <glandium@debian.org> Wed, 23 Jun 2010 18:52:51 +0200
+
+libxml2 (2.7.7.dfsg-2) unstable; urgency=low
+
+ * debian/libxml2-dbg.preinst, debian/libxml2-dev.preinst,
+ debian/libxml2-utils.preinst: Remove /usr/share/doc symbolic links on
+ upgrade. They will then be replaced by directories by dpkg.
+ Closes: #577025.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 09 Apr 2010 10:21:02 +0200
+
+libxml2 (2.7.7.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/control:
+ + Bump Standards-Version to 3.8.4.0.
+ + Depend on a version of debhelper that provides dh and supports
+ overrides.
+ * debian/compat: Bump to 7.
+ * debian/rules:
+ + Don't avoid to build in example/. There is no reason to do so anymore.
+ + Remove remains of WORKAROUND_MODIFIED_FILES, that was removed 2 years
+ ago.
+ + Change the way python libs are built. We now use configure to set
+ different environment with and without python, and arrange things so
+ that we don't have to build the base libxml2 library several times.
+ + Deduplicate in /usr/lib/pyshared, not
+ /usr/lib/python-support/python-libxml2.
+ + Remove old source and diff rules that only displayed a message
+ inviting to use dpkg-source -b.
+ + Force -Wl,--as-needed at the beginning of the gcc command line.
+ + Simplify rules by switching to dh.
+ + Don't refresh COPYING during clean target, it appears not to be
+ necessary anymore.
+ + Use a common cache for main and python configure passes.
+ * debian/python-libxml2.install: Install python files from
+ /usr/lib/python*/dist-packages.
+ * python/generator.py: Sort python generated stubs so that libxml2.py
+ doesn't differ between python 2.5 and 2.6.
+ * doc/devhelp/Makefile.{am,in}: Properly install devhelp files when
+ builddir != srcdir.
+
+ -- Mike Hommey <glandium@debian.org> Sun, 21 Mar 2010 09:51:17 +0100
+
+libxml2 (2.7.6.dfsg-2) unstable; urgency=low
+
+ * Cherry-picks from upstream git:
+ + globals.c: fix the initialization of the mutex.
+ + xmlIO.c: remove an abuse of zlib API and use a clean interface
+ available in zlib >= 1.2.3. Closes: #565683, #565823.
+ * debian/control:
+ + Put libreadline-dev before libreadline5-dev in Build-Deps.
+ Closes: #553803.
+ + Add misc:Depends dependencies where they are missing.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 19 Jan 2010 18:41:49 +0100
+
+libxml2 (2.7.6.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/control:
+ + Bump Standards-Version to 3.8.3.0.
+ + Set libxml2 package priority to standard to match override.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 10 Oct 2009 23:55:41 +0200
+
+libxml2 (2.7.5.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ + Fixed a RelaxNG bug introduced in 2.7.4. Closes: #546442.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 25 Sep 2009 22:28:53 +0200
+
+libxml2 (2.7.4.dfsg-2) unstable; urgency=low
+
+ * debian/libxml2.symbols: Force binaries that use versioned symbols to
+ depend on version 2.7.4 at least.
+ * parser.c: Fix a parsing problem with little data at startup.
+ Cherry-picked from upstream git. Closes: #546254, #546488.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 16 Sep 2009 00:12:50 +0200
+
+libxml2 (2.7.4.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * Revert old change to entities.c.
+ * debian/copyright: Change upstream url. Closes: #541082.
+ * debian/libxml2.symbols: Change symbols file to use newly introduced
+ symbol versioning
+ * debian/rules: bump shlibs to current version.
+
+ -- Mike Hommey <glandium@debian.org> Thu, 10 Sep 2009 23:04:35 +0200
+
+libxml2 (2.7.3.dfsg-2.1) unstable; urgency=high
+
+ * Non-maintainer upload by the Security Team (Closes: #540865).
+ * Fix multiple use-after-free flaws when parsing notation and
+ enumeration attribute types (CVE-2009-2416).
+ * Fix stack overflow when parsing root XML document element DTD
+ definition (CVE-2009-2414).
+
+ -- Nico Golde <nion@debian.org> Sun, 16 Aug 2009 17:45:17 +0200
+
+libxml2 (2.7.3.dfsg-2) unstable; urgency=low
+
+ * debian/no-upstream-changelog: Removed.
+ * debian/rules: Don't use symlinks in /usr/share/doc anymore, and only
+ install the upstream changelog in the libxml2 package. Considering
+ its size, we don't need it everywhere. Closes: #496959.
+ * include/libxml/*.h: change ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT
+ to avoid macro name. Cherry-pick upstream f076f34. Closes: #521994.
+ * error.c: fix structured error handling problems. Cherry-pick upstream
+ 719f397. Closes: #522669.
+ * debian/control:
+ + Change libxml2-dbg's section to "debug".
+ + Bump Standards-Version to 3.8.2.0.
+ + Add Homepage, Vcs-Git and Vcs-Browser fields.
+
+ -- Mike Hommey <glandium@debian.org> Mon, 13 Jul 2009 08:56:37 +0200
+
+libxml2 (2.7.3.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * parser.c: Remove useless nbParse* variables and avoid exporting them as
+ symbols.
+ * debian/libxml2.symbols: Reference the new symbols.
+ * debian/rules: bump shlibs to current version.
+
+ -- Mike Hommey <glandium@debian.org> Sun, 01 Mar 2009 11:57:55 +0100
+
+libxml2 (2.6.32.dfsg-5) unstable; urgency=high
+
+ * parserInternals.c: apply patch from upstream revision 3741 to avoid
+ double-free in some situations. This fixes a crash while running the
+ W3C/OASIS XML conformance test.
+ * tree.c: Fix infinite loop. Fixes: CVE-2008-4225.
+ * SAX2.c: Fix integer overflow. Fixes: CVE-2008-4226.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 18 Nov 2008 08:08:34 +0100
+
+libxml2 (2.6.32.dfsg-4) unstable; urgency=high
+
+ * Fix regressions due to previous security fixes. Fixes: CVE-2008-3529.
+ Closes: #498768.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 19 Sep 2008 21:26:19 +0200
+
+libxml2 (2.6.32.dfsg-3) unstable; urgency=high
+
+ * Fix DoS which leads to recursive evaluation of entities.
+ Fixes: CVE-2008-3281, without breaking librsvg and others. Closes: #496125.
+
+ -- Mike Hommey <glandium@debian.org> Mon, 25 Aug 2008 22:01:17 +0200
+
+libxml2 (2.6.32.dfsg-2) unstable; urgency=low
+
+ * debian/control:
+ + Use ${binary:Version} instead of ${Source-Version}.
+ + Fixed spelling error for "Python".
+ * debian/rules: Don't ignore make distclean errors.
+ * debian/libxml2-doc.doc-base: Changed section to fit doc-base sections
+ changes.
+ * xml2-config.1: Remove unknown groff command.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 19 Apr 2008 20:38:50 +0200
+
+libxml2 (2.6.32.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/control: Bumped Standards-Version to 3.7.3.0. No changes.
+ * debian/rules:
+ + Make dpkg-shlibdeps fail when symbols are missing.
+ + Removed the workaround for removed and modified files during build. The
+ former was for svn-buildpackage that I don't use anymore, and the latter
+ for a file that isn't in the .orig.tar.gz anymore.
+ + Bump shlibs to current version, since a new symbol was added.
+ * debian/libxml2.symbols: Reference the new symbol.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 09 Apr 2008 11:25:18 +0200
+
+libxml2 (2.6.31.dfsg-2) unstable; urgency=low
+
+ * debian/rules: Brown paper bag: uncomment $(MAKE) distclean.
+ Closes: #442656.
+ * xstc/Makefile.am, xstc/Makefile.in: Properly clean generated files.
+ * nanohttp.c: Apply fix from svn revision 3685 to allocate enough memory
+ for the Host HTTP header when containing a port number. Closes: #464173.
+ * error.c: Don't grow error buffer indefinitely when vsnprintf returns -1,
+ which, if it happens, on glibc-based systems, will happen indefinitely.
+ Closes: #456653.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 05 Mar 2008 23:42:37 +0100
+
+libxml2 (2.6.31.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * Acknowledged NMU.
+ * testModule.c: Revert our change to add PATH_MAX for the Hurd, since we now
+ don't even build this file.
+ * debian/rules: bump shlibs to current version, since a new symbol was added.
+ * debian/libxml2.symbols: Reference the new symbol.
+ * autogen.sh: Switch to automake1.10 to follow upstream.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 19 Jan 2008 18:46:41 +0100
+
+libxml2 (2.6.30.dfsg-3.1) unstable; urgency=high
+
+ * Non-maintainer upload by security team.
+ * This update addresses the following security issue:
+ - CVE-2007-6284: The xmlCurrentChar function allows context-dependent
+ attackers to cause a denial of service (infinite loop) via XML
+ containing invalid UTF-8 sequences (Closes: #460292).
+
+ -- Nico Golde <nion@debian.org> Sun, 13 Jan 2008 15:15:04 +0100
+
+libxml2 (2.6.30.dfsg-3) unstable; urgency=low
+
+ * debian/libxml2.symbols: Add a symbols file to benefit from the new
+ features in dpkg-shlibdeps.
+ * debian/control: Build depend on debhelper (>= 5.0.61) and dpkg-dev (>=
+ 1.14.9), accordingly.
+ * debian/rules:
+ + Apply rules suggested in autotools-dev documentation.
+ + Add -Wl,--as-needed to LDFLAGS so that useless dependencies are not
+ added.
+ * Makefile.am, Makefile.in: Don't build noinst targets.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 21 Nov 2007 19:22:51 +0100
+
+libxml2 (2.6.30.dfsg-2) unstable; urgency=low
+
+ * libxml.h: define _LARGEFILE64_SOURCE to properly get gzopen64 defines in
+ zlib.h. Closes: #439843. Thanks Dann Frazier.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 28 Aug 2007 21:52:30 +0200
+
+libxml2 (2.6.30.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Mike Hommey <glandium@debian.org> Sun, 26 Aug 2007 10:52:39 +0200
+
+libxml2 (2.6.29.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/rules: bump shlibs to current version, since new symbols were added.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 13 Jun 2007 20:52:41 +0200
+
+libxml2 (2.6.28.dfsg-1) unstable; urgency=low
+
+ * New upstream release:
+ + Provides doc/html/index.html. Closes: #405802.
+ + Fixed infinite loop with invalid characters in Xincluded files.
+ Closes: #410762.
+ * debian/rules: bump shlibs to current version, since new symbols were added.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 18 Apr 2007 08:09:16 +0200
+
+libxml2 (2.6.27.dfsg-1) unstable; urgency=low
+
+ * New "huge bug fixes list" upstream release.
+ * autogen.sh: Updated so that doc/examples/index.html gets updated
+ correctly.
+ * debian/control: Bumped Standards-Version to 3.7.2.2. No changes required.
+ * debian/rules: bump shlibs to current version, since new symbols were added.
+
+ -- Mike Hommey <glandium@debian.org> Thu, 26 Oct 2006 23:15:00 +0200
+
+libxml2 (2.6.26.dfsg-4) unstable; urgency=low
+
+ * debian/control:
+ + Bumped Standards-Version to 3.7.2.1. No changes required.
+ + Added a conflict to the sarge version of libxslt1.1 to avoid upgrade
+ problems. Closes: #390733.
+ * debian/watch: Updated to mangle the Debian version.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 4 Oct 2006 16:51:29 +0200
+
+libxml2 (2.6.26.dfsg-3) unstable; urgency=medium
+
+ * debian/rules, debian/libxml2-dev.install: Don't install libxml2.la
+ directly and sed it to remove the dependency_libs. Note that will break
+ linking statically libxml2 with libtool, we recommend to use pkg-config
+ --static --libs libxml-2.0 instead of relying on libtool.
+ Closes: #379807, #378511.
+ * xml2-config.in: Fixed usage alignment of the new option introduced in
+ previous upload.
+
+ -- Mike Hommey <glandium@debian.org> Thu, 27 Jul 2006 19:40:27 +0200
+
+libxml2 (2.6.26.dfsg-2) unstable; urgency=low
+
+ * The slithering release.
+
+ * debian/python-libxml2.examples.in: Renamed to
+ debian/python-libxml2.examples
+ * debian/python-libxml2.install.in: Renamed to
+ debian/python-libxml2.install, and replaced PYVERS by a wildcard.
+ * debian/control:
+ + Adapted dependencies to fit all changes.
+ + Added fields required by new Python policy.
+ + Added fields necessary for flawless transition.
+ + Replaced dummy python-libxml2 package by a full real package which
+ itself replaces python2.x-libxml2 packages.
+ * debian/rules:
+ + Changed rules to get the python versions we want to build for and
+ adapted some rules to fit with the new setting.
+ + Changed shell loops to make loops.
+ + In case python binary modules are identical (and they are, but they
+ may not be with future versions of the python headers), replace some
+ of them with symbolic links.
+ + Adapted rules to the fact we're installing in only one python package
+ instead of several.
+ * debian/pycompat: Set to 2, for new Python policy. Closes: #373456.
+ * Switching to the new policy avoids necessity to conflict with very old
+ versions of the python bindings packages. Closes: #365057.
+
+ * debian/libxml2-doc.install: Added the /usr/share/gtk-doc directory.
+ Closes: #375113.
+ * debian/control: Made libxml2-doc suggest devhelper.
+ * libxml-2.0.pc.in, libxml-2.0-uninstalled.pc.in: Split Libs in Libs and
+ Libs.private.
+ * configure.in, configure: Adapted to fill the variables correctly for
+ libraries.
+ * xml2-config.in, xml2-config.1: Added a --static option to add to --libs
+ so that we can split what is needed when building statically and what is
+ needed when building dynamically. Closes: #374017.
+ * libxml-2.0.pc.in, libxml-2.0-uninstalled.pc.in, xml2-config.in: Added
+ BASE_THREADS_LIBS to the static link information so that -lpthread would
+ appear. Closes: #372945.
+ * debian/control: Removed dependency on zlib-dev for libxml2-dev.
+ * debian/rules: Add the NEWS file to dh_install calls. Closes: #365596.
+ * debian/watch: Updated.
+ * NEWS: Updated.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 1 Jul 2006 10:45:02 +0200
+
+libxml2 (2.6.26.dfsg-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/rules:
+ + Added -fno-strict-aliasing to the CFLAGS.
+ + Use dpkg-architecture to feed configure.
+ + Bumped shlibs to current version, since new symbol for XPath cache has
+ been added.
+ * debian/control: Bumped Standards-Version to 3.7.2.0. No changes required.
+
+ -- Mike Hommey <glandium@debian.org> Thu, 8 Jun 2006 21:39:55 +0200
+
+libxml2 (2.6.24.dfsg-1) unstable; urgency=low
+
+ * New upstream release. Closes: #365246.
+ * debian/control:
+ + Changed libxml2-dbg's priority to extra.
+ + Bumped Standards-Version to 3.7.0.0. No changes required.
+ * debian/rules: bump shlibs to current version, since new symbols were added.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 29 Apr 2006 22:18:14 +0200
+
+libxml2 (2.6.23.dfsg.2-3) unstable; urgency=low
+
+ * debian/rules: Correctly strip python modules.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 18 Mar 2006 19:15:53 +0100
+
+libxml2 (2.6.23.dfsg.2-2) unstable; urgency=low
+
+ * debian/control: Removed python2.2-libxml2 and build-dep on python2.2-dev.
+ Closes: #351125.
+ * doc/xmllint.xml, doc/xmllint.1: Applied patch from upstream cvs. That
+ improves the manual page by many ways.
+ * doc/xmllint.html: Manually updated with changes from the .xml file.
+ * xmllint.c: Don't throw error when failed to load an entity through --path
+ option of xmllint (patch from upstream cvs). Closes: #352634.
+ Thanks Daniel Leidert.
+
+ -- Mike Hommey <glandium@debian.org> Mon, 20 Feb 2006 10:52:46 +0100
+
+libxml2 (2.6.23.dfsg.2-1) unstable; urgency=low
+
+ * result/, test/: Totally removed. There is more suspicious content than
+ what has been removed in previous upload, so I'm just dropping the
+ regression tests from the archive until all files are investigated.
+ Closes: #331534.
+ * debian/control, debian/rules: Added a libxml2-dbg package containing
+ debug symlbols for the library and the utilities. We don't provide the
+ symbols for the python modules, though. Closes: #296299.
+ * debian/control, debian/compat: Adjust build dependencies and debhelper
+ compatibility accordingly.
+ * debian/libxml2-dbg.dirs: Add /usr/share/doc in the new libxml2-dbg
+ package.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 31 Jan 2006 20:17:37 +0100
+
+libxml2 (2.6.23.dfsg.1-0.1) unstable; urgency=medium
+
+ * NMU.
+ * Medium urgency due to RC bugfix.
+ * Removed non-free test files from upstream tarball. Closes: #331534.
+
+ -- Per Olofsson <pelle@debian.org> Sun, 15 Jan 2006 23:02:12 +0100
+
+libxml2 (2.6.23-1.1) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * Fix XML parser to unbreak xsltproc (Closes: #346594).
+
+ -- Luk Claes <luk@debian.org> Thu, 12 Jan 2006 15:25:42 +0100
+
+libxml2 (2.6.23-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/control:
+ + Added | libreadline-dev for readline dependency.
+ + Bumped Standards-Version to 3.6.2.1. No changes needed.
+ * debian/rules: bump shlibs to current version, since new symbols were added.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 6 Jan 2006 19:03:57 +0100
+
+libxml2 (2.6.22-2) unstable; urgency=low
+
+ * autogen.sh: Changed the way we rebuild the examples.
+ * debian/rules: Added history support in xmllint. Closes: #318083.
+ * debian/control: Added build dependency upon libreadline5-dev for history
+ support in xmllint.
+ * xmllint.c: Added some spaces in usage(). Closes: #335015.
+ * testModule.c: Added PATH_MAX definition for the Hurd. Closes: #333623.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 2 Nov 2005 19:22:41 +0100
+
+libxml2 (2.6.22-1) unstable; urgency=low
+
+ * New upstream release
+ * error.c: Reenable support of validation errors in structured error
+ handler.
+ * autogen.sh: Use automake1.9, as upstream does, and run it.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 13 Sep 2005 18:04:10 +0200
+
+libxml2 (2.6.21-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/control, debian/rules: Removed dummy package. Closes: #322052.
+ * debian/rules: bump shlibs to current version.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 7 Sep 2005 19:11:32 +0200
+
+libxml2 (2.6.20-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules: bump shlibs to current version.
+
+ -- Mike Hommey <glandium@debian.org> Thu, 14 Jul 2005 09:42:27 +0200
+
+libxml2 (2.6.19-1) unstable; urgency=low
+
+ * The "Sarge got released but I was offline, so couldn't upload" release.
+ * New upstream release.
+ * debian/rules: bump shlibs to current version.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 8 Jul 2005 19:29:29 +0200
+
+libxml2 (2.6.16-7) unstable; urgency=low
+
+ * The "dummy packages are arch: all, dammit" release.
+ * debian/control: Changed to Architecture: all for dummy package.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 9 Apr 2005 11:57:29 +0200
+
+libxml2 (2.6.16-6) unstable; urgency=low
+
+ * The "Let's do it cleaner" release.
+ * debian/rules: fix installation of python files and make proper use of
+ DESTDIR at install time.
+
+ -- Mike Hommey <glandium@debian.org> Mon, 28 Mar 2005 18:12:15 +0200
+
+libxml2 (2.6.16-5) unstable; urgency=low
+
+ * debian/watch: use svn-upgrade instead of uupdate.
+ * debian/control, debian/rules, debian/python-libxml2.*.in:
+ Added support for several python bindings packages. Currently for python
+ 2.2, 2.3 and 2.4.
+ * debian/python2.3-libxml2.*: Removed.
+
+ -- Mike Hommey <glandium@debian.org> Sun, 27 Mar 2005 21:36:53 +0200
+
+libxml2 (2.6.16-4) unstable; urgency=high
+
+ * Urgency set to high because we avoid breaking packages depending on us
+ when we don't properly bytecompile our python bindings.
+ * debian/rules: Call dh_python. We now get proper maintainer scripts for
+ bytecompiling files at install time and removing them at removal time.
+ Closes: #300834.
+ * debian/control: Adjust build dependencies accordingly.
+
+ -- Mike Hommey <glandium@debian.org> Tue, 22 Mar 2005 21:56:50 +0100
+
+libxml2 (2.6.16-3) unstable; urgency=low
+
+ * tree.c: Avoid adding namespaced attributes to other elements than element
+ nodes. Closes: #293592.
+ * encoding.c: Fix the comments to describe the real return values of
+ UTF8Toisolat1 and isolat1ToUTF8.
+ * doc/: Regenerate API documentation.
+
+ -- Mike Hommey <glandium@debian.org> Wed, 16 Feb 2005 20:31:17 +0100
+
+libxml2 (2.6.17-1) experimental; urgency=low
+
+ * New upstream release.
+
+ -- Mike Hommey <glandium@debian.org> Sat, 5 Feb 2005 13:10:13 +0100
+
+libxml2 (2.6.16-2) unstable; urgency=low
+
+ * Upload to unstable, targetted for sarge.
+ * Changed my maintainer address to the fresh new Debian one.
+ * debian/rules: Added changelog and copyright files in dummy package.
+ * debian/libxml2-doc.doc-base: Fixed files sections. Closes: #281242.
+
+ -- Mike Hommey <glandium@debian.org> Fri, 4 Feb 2005 20:45:48 +0100
+
+libxml2 (2.6.16-1) experimental; urgency=low
+
+ * New upstream release
+ * debian/control, debian/rules: Changed libxml2-python2.3's name to
+ python2.3-libxml2. Added a dummy package for smooth transition.
+ * debian/libxml2-python2.3.*: Renamed to python2.3-libxml2.*.
+ Closes: #279343.
+ * debian/rules:
+ - Don't install files in the dummy libxml2-python2.3 package.
+ - Bump shlibs to current version.
+
+ -- Mike Hommey <mh@glandium.org> Sat, 13 Nov 2004 16:38:37 +0900
+
+libxml2 (2.6.15-2) experimental; urgency=low
+
+ * error.c: Removed support of validation errors in structured error handler.
+ That avoids it to crash when a validation error happens. (That was a
+ broken feature added in 2.6.15. This will get properly fixed in 2.6.16).
+ Closes: #279040.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 8 Nov 2004 22:16:00 +0900
+
+libxml2 (2.6.15-1) experimental; urgency=low
+
+ * New upstream release
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.15)'", since version
+ 2.6.16 introduces some new symbols.
+
+ -- Mike Hommey <mh@glandium.org> Thu, 28 Oct 2004 19:08:20 +0900
+
+libxml2 (2.6.11-5) unstable; urgency=high
+
+ * Backport patch from libxml2-2.6.15 to fix buffer overflows [nanohttp.c,
+ nanoftp.c, CAN-2004-0989]
+
+ -- Mike Hommey <mh@glandium.org> Thu, 28 Oct 2004 17:34:54 +0900
+
+
+libxml2 (2.6.14-1) experimental; urgency=low
+
+ * New upstream release. Closes: #273961.
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.14)'", since version
+ 2.6.14 introduces some new symbols.
+ * debian/shlibs.local: Removed, since it is not useful any more.
+
+ -- Mike Hommey <mh@glandium.org> Sat, 16 Oct 2004 16:29:06 +0900
+
+libxml2 (2.6.11-4) unstable; urgency=low
+
+ * The "let's do some clean up for sarge" release.
+ * debian/libxml2-python2.3.install: don't install .a and .la files.
+ * debian/rules: Avoid compression of both python examples and documentation.
+ * Reorganization in documentation:
+ + debian/libxml2-doc.examples: removed, they will get installed by
+ libxml2-doc.install, and we don't ship gjob* examples anymore, they
+ have been superseded by a lot of better examples.
+ + debian/libxml2-doc.install, debian/rules: changed the way files are
+ installed in the libxml2-doc package, and their location.
+ + debian/libxml2-doc.doc-base: changed the location of the documentation
+ base to fit the new one.
+ + doc/examples/index.html: generated this file from examples.x?l by
+ hand. It would otherwise require a build dependency on xsltproc, itself
+ depending upon libxml2... wouldn't be very reasonnable.
+ * debian/no-upstream-changelog, debian/rules, debian/libxml2-dev.dirs,
+ debian/libxml2-utils.dirs: /usr/share/doc directories have been replaced
+ by a symbolic link in packages libxml2-utils and libxml2-dev.
+ In libxml2-python2.3, all files but TODO are symlinks to the corresponding
+ file from libxml2. The one from libxml2-doc is replaced by an explicative
+ text saying where to find it and why it has been (re)moved.
+ That will save some space in the archive, especially considering this
+ file is constantly growing.
+ * debian/README.Debian: Added a recommentation to upgrade package if user
+ needs heavy standards compliance.
+ * debian/shlibs.local: Added to tighten dependencies between libxml2-*
+ packages.
+ * xmlIO.c: Fixed typo (Closes: #265740).
+ * nanohttp.c, nanoftp.c: no_proxy environment variable doesn't disable proxy
+ anymore. (Closes: #266430)
+ * debian/rules, debian/control: Removed the workaround to compile with
+ gcc-3.2 on hppa, since $254549 is closed.
+
+ -- Mike Hommey <mh@glandium.org> Sat, 16 Oct 2004 16:20:54 +0900
+
+libxml2 (2.6.11-3) unstable; urgency=low
+
+ * debian/control: add a space between gcc-3.2 and [hppa]. Closes: #262101.
+ * python/drv_libxml2.py: add encoding declaration. Closes: #259526.
+ * debian/rules: Backup files that are removed or modified by upstream build
+ system and restore them so that calling the clean target actually gives
+ the same tree as before a build.
+
+ -- Mike Hommey <mh@glandium.org> Sun, 1 Aug 2004 05:02:14 +0900
+
+libxml2 (2.6.11-2) unstable; urgency=medium
+
+ * Thanks to Andreas Metzler:
+ + Hotfix for toolchain breakage (#254549), because libxml2 blocks lots of
+ packages from propagating to testing. Compile with gcc-3.2 on hppa.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 21 Jul 2004 23:37:22 +0900
+
+libxml2 (2.6.11-1) unstable; urgency=low
+
+ * New upstream release
+ * libxml.m4: removed debian changes which have been incorporated upstream.
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.11)'", since
+ version 2.6.11 introduces some new functions.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 7 Jul 2004 00:54:50 +0900
+
+libxml2 (2.6.10-3) unstable; urgency=low
+
+ * debian/control: changed deps on libz-dev to zlib1g-dev | libz-dev.
+ * debian/rules: made binary-indep target actually build the libxml2-doc
+ package which is Arch: all. Closes: #251971.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 2 Jun 2004 15:57:21 +0900
+
+libxml2 (2.6.10-2) unstable; urgency=low
+
+ * debian/watch: updated the watch file to exclude the cvs-snapshot from
+ the scope. Closes: #250177.
+ * debian/rules: rename libxml.m4 to libxml2.m4 in the /usr/share/aclocal
+ directory.
+ * libxml.m4: removed the AM_PATH_XML macro which is a macro for checking
+ libxml, not libxml2. Changed CFLAGS to CPPFLAGS from test compiles so
+ that using C++ also works. Closes: #249033.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 26 May 2004 21:28:54 +0900
+
+libxml2 (2.6.10-1) unstable; urgency=low
+
+ * New upstream release:
+ + Fixes xincludes fallback issues. Closes: #243580.
+ + Fixes output formatting issues. Closes: #246181.
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.10)'", since
+ version 2.6.10 introduces some few new functions.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 17 May 2004 17:16:44 +0900
+
+libxml2 (2.6.9-2) unstable; urgency=low
+
+ * Enable AM_MAINTAINER_MODE and re-run the autotools suite.
+ Closes: #245990.
+
+ -- Mike Hommey <mh@glandium.org> Tue, 27 Apr 2004 16:31:21 +0900
+
+libxml2 (2.6.9-1) unstable; urgency=high
+
+ * New upstream release:
+ + xincludes fallbacks fixed. Closes: #243580.
+ * Urgency set to high because of RC bug fixed and it's been too long
+ libxml2 has been stucking packages in sid.
+ * Ran all the autotools suite, especially the latest libtool.
+ Closes: #244557.
+ * debian/rules:
+ + Removed all python file removals since these files get now
+ correctly removed upstream.
+ + Changed once more the python/libxml2-py.c workaround to finally
+ work really properly.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 19 Apr 2004 17:58:56 +0900
+
+libxml2 (2.6.8-2) unstable; urgency=high
+
+ * Urgency set to high because of the FTBFS RC bug fixed.
+ * debian/changelog:
+ + Added missing changes for release 2.6.8-1.
+ + Converted changelog file to UTF-8.
+ * debian/rules: Changed the python/libxml2-py.c workaround stuff to
+ actually work properly
+
+ -- Mike Hommey <mh@glandium.org> Sat, 17 Apr 2004 16:59:01 +0000
+
+libxml2 (2.6.8-1.1) unstable; urgency=high
+
+ * NMU. Urgency set to high as libxml2 has been preventing too many packages
+ from entering testing for too long.
+ * Grabbed from SVN:
+ Mike Hommey <mh@glandium.org> Sat, 10 Apr 2004 12:42:03 +0900
+ * debian/control:
+ + Updated section for libxml2-doc package.
+ + Added dependency on libz-dev for libxml2-dev. (Closes: #242683)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 16 Apr 2004 22:37:08 +0200
+
+libxml2 (2.6.8-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules:
+ + Use "dh_makeshlibs -V 'libxml2 (>= 2.6.8)'", since version 2.6.8
+ introduces some few new functions.
+ + Try to circumvent new troubles with the python/libxml2-py.c with
+ svn-buildpackage not wanting to make the build (the file used to
+ be removed because it was modified by the build).
+ * Removed changes about XML_CATALOG_FILES in manual pages, since it has
+ been incorporated upstream.
+
+ -- Mike Hommey <mh@glandium.org> Thu, 25 Mar 2004 14:57:44 +0900
+
+libxml2 (2.6.7-2) unstable; urgency=low
+
+ * debian/control: Changed Maintainer to Debian SGML/XML Group and
+ put myself into Uploaders.
+ * Merged back libxml2-headers into libxml2-dev. That was too much of
+ a split. Closes: #238109.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 22 Mar 2004 15:41:30 +0900
+
+libxml2 (2.6.7-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.7)'", since
+ version 2.6.7 introduces some few new functions.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 25 Feb 2004 15:43:11 +0900
+
+libxml2 (2.6.6-2) unstable; urgency=low
+
+ * debian/control:
+ + Added a Recommends: xml-core to libxml2 package.
+ + Added a libxml2-headers and a libxml2-docs packages to split
+ arch-dependent and arch-independent files. These files used to be
+ in the libxml2-dev package. Note that the new libxml2-dev package
+ depends on libxml2-headers, so that upgrade will keep the header
+ files on the system, but libxml2-headers only suggests libxml2-doc,
+ while libxml2-dev doesn't say anything about it, which means that
+ the documentation files won't be automagically installed on your
+ system. Closes: #233405.
+ + Added the adequate dependencies between new and old packages.
+ + Uniformized short descriptions.
+ + Slightly modified long descriptions.
+ * debian/rules:
+ + Externalized all dh_* calls with arguments. (i.e. created
+ corresponding debian/package.dh_stuff files)
+ + Moved installation of some doc files to the install target.
+ * Removed un-needed debian/libxml2-python2.3.docs.
+ * Moved libxml manpage from libxml2 to libxml2-dev.
+ * doc/xmlcatalog_man.xml: Added a note about the incompatibility between
+ xmlcatalog and update-catalog from xml-core in the man page.
+ * doc/xmllint.xml, doc/xmlcatalog_man.xml: Added a note about the
+ XML_CATALOG_FILES environment variable. Closes: #232728.
+
+ -- Mike Hommey <mh@glandium.org> Wed, 18 Feb 2004 21:29:58 +0900
+
+libxml2 (2.6.6-1) unstable; urgency=high
+
+ * New upstream release
+ * Set urgency to high, since this new upstream fixes buffer overflows.
+ Closes: #232447.
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.6.6)'", since
+ version 2.6.6 introduces some new functions.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 16 Feb 2004 16:56:57 +0900
+
+libxml2 (2.6.5-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules:
+ - Made better use of CFLAGS.
+ - Replaced an mv by cp -r. Closes: #227392.
+ - Use "dh_makeshlibs -V 'libxml2 (>= 2.6.5)'", since version 2.6.5
+ introduced some new functions.
+ - Make some clean-up in the example directory.
+
+ -- Mike Hommey <mh@glandium.org> Fri, 30 Jan 2004 15:14:02 +0900
+
+libxml2 (2.6.4-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Mike Hommey <mh@glandium.org> Sat, 27 Dec 2003 18:25:17 +0900
+
+libxml2 (2.6.3-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules:
+ - Use "dh_makeshlibs -V 'libxml2 (>= 2.6.3)'", since versions 2.6.3
+ introduced some new functions.
+ - Put more examples in /usr/share/doc/libxml2-dev/examples.
+
+ -- Mike Hommey <mh@glandium.org> Fri, 12 Dec 2003 14:45:24 +0900
+
+libxml2 (2.6.2-1) unstable; urgency=low
+
+ * New upstream release
+ * debian/rules:
+ - Use "dh_makeshlibs -V 'libxml2 (>= 2.6.2)'", since versions 2.6.2
+ introduced some new functions.
+ - Put the API docs back in /usr/share/doc/libxml2-dev/libxml-dev.html.
+
+ -- Mike Hommey <mh@glandium.org> Mon, 10 Nov 2003 22:20:33 +0900
+
+libxml2 (2.6.1-1) experimental; urgency=low
+
+ * New upstream release
+
+ -- Mike Hommey <mh@glandium.org> Wed, 29 Oct 2003 14:07:11 +0900
+
+libxml2 (2.6.0-1) experimental; urgency=low
+
+ * New upstream release: should be API and ABI compatible but got a lot
+ of changes.
+ * debian/rules:
+ - Use "dh_makeshlibs -V 'libxml2 (>= 2.6.0)'", since applications
+ using the new API won't work on previous versions.
+ Note that this doesn't prevent applications built with older versions
+ to work properly with newer releases, since it is not supposed to be
+ any API/ABI breakage.
+ - Don't remove non-existant python/test/tmp.xml file on clean rule.
+ - Remove python/libxml2-py.c file on clean rule, to avoid its changes
+ made during build to be stored in the diff file.
+ - Added handling of the nostrip DEB_BUILD_OPTIONS.
+ - Changed old fashion dh_movefiles to dh_install --sourcedir=debian/tmp.
+ - Added installation of the python/TODO file in the libxml2-python2.3
+ package.
+ - Now take what is installed in debian/tmp/usr/share/doc/... for
+ documentation.
+ - Copy Copyright file into COPYING file in clean rule to avoid
+ unrepresentable changes to source.
+ * debian/*.files: renamed to debian/*.install.
+ * debian/libxml2.install: removed reference to non-existant
+ usr/lib/libxml.so.*
+ * Removed unneeded debian/libxml2-dev.dirs file.
+
+ -- Mike Hommey <mh@glandium.org> Tue, 21 Oct 2003 14:07:04 +0900
+
+libxml2 (2.5.11-2) unstable; urgency=low
+
+ * debian/rules: Use "dh_makeshlibs -V 'libxml2 (>= 2.5.9)'", since
+ versions 2.5.8 and 2.5.9 introduced some changes in API.
+ Closes: #212819, #211318.
+
+ -- Mike Hommey <mh@glandium.org> Sun, 28 Sep 2003 21:57:32 +0200
+
+libxml2 (2.5.11-1) unstable; urgency=low
+
+ * New upstream release.
+ * New maintainer.
+ * Bumped Standards-Version to 3.6.1 (no changes needed).
+ * Removed garbage debian/libxml-utils.
+ * moved debhelper compatibility to debian/compat.
+
+ -- Mike Hommey <mh@glandium.org> Sun, 14 Sep 2003 16:03:46 +0200
+
+libxml2 (2.5.10-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 26 Aug 2003 20:08:31 +0200
+
+libxml2 (2.5.8-2) unstable; urgency=low
+
+ * Use python 2.3 (closes: #205145)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 13 Aug 2003 21:28:14 +0200
+
+libxml2 (2.5.8-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 7 Aug 2003 20:08:23 +0200
+
+libxml2 (2.5.7-1) unstable; urgency=low
+
+ * New upstream release (closes: #194757)
+ * Updated shlibs file (closes: #191022)
+ * Put xmllint and xmlcatalog in new package (closes: #174823)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 26 May 2003 20:16:01 +0200
+
+libxml2 (2.5.6-2) unstable; urgency=low
+
+ * Update libtool (closes: #188967)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 14 Apr 2003 20:52:45 +0200
+
+libxml2 (2.5.6-1) unstable; urgency=low
+
+ * New upstream release (closes: #188004)
+ * Applied patch from Graham Wilson <bob@decoy.wox.org> to handle
+ noopt build option. (closes: #171782)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 12 Apr 2003 20:54:13 +0200
+
+libxml2 (2.5.4-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 14 Mar 2003 18:40:08 +0100
+
+libxml2 (2.5.3-1.1) unstable; urgency=high
+
+ * Applied patch by Paul Hampson <Paul.Hampson@anu.edu.au> to correct
+ licensing information in debian/copyright which Colin Watson reported
+ as incorrect. (Addresses #178060 for sid)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 16 Mar 2003 09:55:59 +0100
+
+libxml2 (2.5.3-1) unstable; urgency=low
+
+ * New upstream release
+ * xml2-config --libs should be correct (closes: #155312)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 22 Feb 2003 17:34:23 +0100
+
+libxml2 (2.5.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 18 Jan 2003 10:52:56 +0100
+
+libxml2 (2.5.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 7 Jan 2003 19:02:10 +0100
+
+libxml2 (2.4.30-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 14 Dec 2002 16:55:13 +0100
+
+libxml2 (2.4.28-2) unstable; urgency=low
+
+ * Upgraded libtool (closes: #172418)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 1 Dec 2002 15:59:49 +0100
+
+libxml2 (2.4.28-1) unstable; urgency=low
+
+ * New upstream release
+ * Added patch from CVS to fix KDE problems.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 26 Nov 2002 19:58:54 +0100
+
+libxml2 (2.4.27-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 18 Nov 2002 21:05:07 +0100
+
+libxml2 (2.4.26-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 15 Nov 2002 17:29:30 +0100
+
+libxml2 (2.4.24-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 24 Aug 2002 22:28:24 +0200
+
+libxml2 (2.4.23-2) unstable; urgency=low
+
+ * Created new libxml2-python package
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 30 Jul 2002 20:16:17 +0200
+
+libxml2 (2.4.23-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 8 Jul 2002 00:20:43 +0200
+
+libxml2 (2.4.22-1) unstable; urgency=low
+
+ * New upstream release (closes: #149287)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 7 Jun 2002 19:43:21 +0200
+
+libxml2 (2.4.21-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 10 May 2002 18:40:02 +0200
+
+libxml2 (2.4.20-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 23 Apr 2002 22:13:37 +0200
+
+libxml2 (2.4.19-4) unstable; urgency=low
+
+ * Make libxml2-dev replace libxml2 <= 2.4.19-1 (closes: #142609, #142741)
+ * Update shlibs version to 2.4.19-4 (closes: #142806)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 14 Apr 2002 12:19:51 +0200
+
+libxml2 (2.4.19-3) unstable; urgency=low
+
+ * Dont use threads for now (closes: #142596)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 13 Apr 2002 15:53:04 +0200
+
+libxml2 (2.4.19-2) unstable; urgency=low
+
+ * Move pkgconfig stuff to -dev package (closes: #142171)
+ * Compile with thread support (closes: #141764)
+ * xml2-config --cflags will return same paths as previous versions
+ (closes: #142229)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 12 Apr 2002 18:21:48 +0200
+
+libxml2 (2.4.19-1) unstable; urgency=low
+
+ * New upstream release
+ * Fixed doc-base (closes: #141067)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 3 Apr 2002 19:45:33 +0200
+
+libxml2 (2.4.16-2) unstable; urgency=low
+
+ * New version as last version was built with broken debhelper.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 26 Feb 2002 22:28:24 +0100
+
+libxml2 (2.4.16-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 23 Feb 2002 20:21:34 +0100
+
+libxml2 (2.4.13-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 15 Jan 2002 20:02:53 +0100
+
+libxml2 (2.4.12-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 8 Dec 2001 22:52:44 +0100
+
+libxml2 (2.4.10-1) unstable; urgency=low
+
+ * New upstream release
+ * Applied patch from LaMont Jones <lamont@smallone.fc.hp.com> to fix
+ gcc 3.0 build problem (closes: #120254)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 20 Nov 2001 18:02:29 +0100
+
+libxml2 (2.4.8-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 5 Nov 2001 19:49:26 +0100
+
+libxml2 (2.4.6-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 18 Oct 2001 19:48:07 +0200
+
+libxml2 (2.4.5-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 15 Sep 2001 23:11:11 +0200
+
+libxml2 (2.4.3-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 27 Aug 2001 20:32:21 +0200
+
+libxml2 (2.4.2-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 21 Aug 2001 20:39:44 +0200
+
+libxml2 (2.4.1-1) unstable; urgency=low
+
+ * New upstream release
+ * Added ncurses and readline build depends.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 24 Jul 2001 21:08:16 +0200
+
+libxml2 (2.4.0-2) unstable; urgency=low
+
+ * xml2-config --libs only outputs -lxml2 (closes: #97739)
+ * Patched libxml.m4 to include string.h
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 18 Jul 2001 13:44:10 +0200
+
+libxml2 (2.4.0-1) unstable; urgency=low
+
+ * New upstream release (closes: #105568)
+ * Fixed xml2-config to not output -I/usr/include, -L/usr/lib
+ (closes: #101390)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 17 Jul 2001 12:43:34 +0200
+
+libxml2 (2.3.13-3.1) unstable; urgency=low
+
+ * NMU (for porting)
+ * Change configure / configure.in to not specify -I/usr/include
+ (closes: #104603)
+
+ -- Matthew Wilcox <willy@debian.org> Fri, 13 Jul 2001 17:08:36 -0600
+
+libxml2 (2.3.13-3) unstable; urgency=low
+
+ * Don't build example (closes: #103220, #103281)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 3 Jul 2001 16:13:31 +0200
+
+libxml2 (2.3.13-2) unstable; urgency=low
+
+ * xmllint is back
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 2 Jul 2001 21:05:25 +0200
+
+libxml2 (2.3.13-1) unstable; urgency=low
+
+ * New upstream release
+ * Use DH_COMPAT 3
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 1 Jul 2001 17:37:08 +0200
+
+libxml2 (2.3.11-1) unstable; urgency=low
+
+ * New upstream release
+ * Apparently builds on Alpha now (closes: #95938)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 17 Jun 2001 21:33:36 +0200
+
+libxml2 (2.3.10-2) unstable; urgency=low
+
+ * Quick hack to fix makefiles on m68k (closes: #99897)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 11 Jun 2001 14:51:14 +0200
+
+libxml2 (2.3.10-1) unstable; urgency=low
+
+ * New upstream release
+ * Leave pkgconfig as someone wants it (closes: #97621)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 3 Jun 2001 22:02:25 +0200
+
+libxml2 (2.3.9-1) unstable; urgency=low
+
+ * I am back. Some bugs closed by NMUs (closes: #96944, #86508)
+ * Updated libtool (closes: #98137)
+ * Fixed dependency (closes: #98323)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 2 Jun 2001 16:37:18 +0200
+
+libxml2 (2.3.9-0.1) unstable; urgency=low
+
+ * NMU of a new upstream release.
+ * Changed shlibs, they should change every time the API is augmented.
+ * Updated xmllint(1) manpage. Removed useless libxml(4) manpage.
+
+ -- Nicolás Lichtmaier <nick@debian.org> Sun, 20 May 2001 20:25:02 -0300
+
+libxml2 (2.3.8-0.2) unstable; urgency=low
+
+ * Non-maintainer upload with permission from maintainer to fix the
+ libxml-dev conflict.
+ * The symbolic links to old, libxml-dev names introduced in 2.3.0-1 are
+ now gone: programs wanting to link with libxml2 should explicity call
+ the new libxml2-config (almost all the packages in debian are already
+ doing that.)
+ * Changed libxml-dev to libxml2-dev in debian/libxml2-dev.doc-base to
+ resolve libxml-dev conflict.
+ * Fixed shlibs problem introduced in previous NMU by wrong -V argument
+ of dh_makeshlibs.
+
+ -- Federico Di Gregorio <fog@debian.org> Thu, 10 May 2001 16:37:59 +0200
+
+libxml2 (2.3.8-0.1) unstable; urgency=low
+
+ * Non-maintainer upload with permission from maintainer
+ * New upstream release
+ * Fixes shlibs version info (closes: #96291)
+ * config.sub & config.guess updated (closes: #96100)
+
+ -- Jeremy T. Bouse <jbouse@debian.org> Wed, 9 May 2001 22:57:28 -0700
+
+libxml2 (2.3.7-1) unstable; urgency=low
+
+ * New upstream release (closes: #95692)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 29 Apr 2001 11:42:54 +0200
+
+libxml2 (2.3.5-2) unstable; urgency=low
+
+ * Rebuild to avoid link problems (closes: #92721)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 3 Apr 2001 16:12:20 +0200
+
+libxml2 (2.3.5-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 25 Mar 2001 10:58:21 +0200
+
+libxml2 (2.3.4-1) unstable; urgency=low
+
+ * New upstream release
+ * Applied IBM S/390 patch on config.sub (closes: #88551)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 15 Mar 2001 19:49:17 +0100
+
+libxml2 (2.3.3-2) unstable; urgency=low
+
+ * Updated shlibs file with dependency (closes: #87337)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 8 Mar 2001 10:26:46 +0100
+
+libxml2 (2.3.3-1) unstable; urgency=low
+
+ * New upstream release
+ * Fixed xml2Conf.sh so gnome-config works (closes: #88341)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 3 Mar 2001 16:53:05 +0100
+
+libxml2 (2.3.2-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 1 Mar 2001 09:46:37 +0100
+
+libxml2 (2.3.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 20 Feb 2001 09:44:04 +0100
+
+libxml2 (2.3.0-1) unstable; urgency=low
+
+ * New upstream release (closes: #86379)
+ For some reason the library has changed name from libxml to libxml2 and
+ the config script from libxml-config to libxml2-config. I am providing
+ symbolic links to the old names, hopefully this will prevent stuff from
+ breaking.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 17 Feb 2001 23:25:43 +0100
+
+libxml2 (2.2.8-1) unstable; urgency=low
+
+ * New upstream release
+ * Probably a bad idea to remove -lz so put it back and add dependency on
+ libz-dev in dev-package.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 20 Nov 2000 14:03:34 +0100
+
+libxml2 (2.2.6-1) unstable; urgency=low
+
+ * New upstream release
+ * Removed -lz from xml-config --libs (closes: #74709)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Fri, 27 Oct 2000 12:47:57 +0200
+
+libxml2 (2.2.4-1) unstable; urgency=low
+
+ * New upstream release (closes: #74488, #70051)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 11 Oct 2000 07:26:31 +0200
+
+libxml2 (2.2.2-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 29 Aug 2000 22:55:43 +0200
+
+libxml2 (2.2.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 3 Aug 2000 21:28:29 +0200
+
+libxml2 (2.0.0-3) unstable; urgency=low
+
+ * Doc-base now uses correct directory
+
+ -- Fredrik Hallenberg <hallon@debian.org> Mon, 3 Jul 2000 09:20:23 +0200
+
+libxml2 (2.0.0-2) unstable; urgency=low
+
+ * Renamed dev-package to libxml2-dev
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 28 Jun 2000 10:48:48 +0200
+
+libxml2 (2.0.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 20 Jun 2000 11:36:12 +0200
+
+libxml (1.8.7-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 11 Mar 2000 20:33:28 +0100
+
+libxml (1.8.6-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 5 Feb 2000 15:01:51 +0100
+
+libxml (1.8.5-1) unstable; urgency=low
+
+ * New upstream release (closes: #56172)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 25 Jan 2000 14:57:12 +0100
+
+libxml (1.8.4-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 16 Jan 2000 13:01:14 +0100
+
+libxml (1.8.2-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 30 Dec 1999 11:38:47 +0100
+
+libxml (1.7.3-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Wed, 29 Sep 1999 23:33:28 +0200
+
+libxml (1.4.0-4) unstable; urgency=low
+
+ * Oops, must of course replace old libxml0 package. (closes: #43519)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 26 Aug 1999 09:37:18 +0200
+
+libxml (1.4.0-3) unstable; urgency=low
+
+ * Provide libxml.so.0 (which is binary compatible with libxml1)
+ (closes: #43385)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 24 Aug 1999 09:31:15 +0200
+
+libxml (1.4.0-2) unstable; urgency=low
+
+ * Include example in dev-package.
+ * Fixed postinst to only call ldconfig on configure.
+ * Let dh_installdocs handle doc-base.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 21 Aug 1999 14:44:52 +0200
+
+libxml (1.4.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 5 Aug 1999 16:05:26 +0200
+
+libxml (1.1.0-2) unstable; urgency=low
+
+ * Added man page for xml-config. (closes: #39471)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sat, 3 Jul 1999 14:55:55 +0200
+
+libxml (1.1.0-1) unstable; urgency=low
+
+ * New upstream release. (closes: #39791)
+ * Use install-docs on dev documents.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 20 Jun 1999 10:20:53 +0200
+
+libxml (1.0.0-2) unstable; urgency=low
+
+ * Moved html-documentation to dev package. (closes: #39049)
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 15 Jun 1999 21:07:44 +0200
+
+libxml (1.0.0-1) unstable; urgency=low
+
+ * Patched xml-config.in. xml-config --version didn't work as expected.
+ Fixes bug #34881.
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Tue, 16 Mar 1999 18:36:11 +0100
+
+libxml (0.99.8-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Fredrik Hallenberg <hallon@debian.org> Thu, 18 Feb 1999 15:40:19 +0100
+
+libxml (0.99.3-2) unstable; urgency=low
+
+ * New maintainer.
+ * Some files were missing from the last release (xml-config, encoding.h,
+ debugXML.h)
+ * New rules file.
+
+ -- Fredrik Hallenberg <hallon@debian.org> Sun, 14 Feb 1999 18:56:10 +0100
+
+libxml (0.99.3-1) unstable; urgency=low
+
+ * New upstream version.
+ * Recompile with lastest GNOME libs.
+ * Fix #28869.
+
+ -- Vincent Renardias <vincent@waw.com> Wed, 20 Jan 1999 11:32:55 +0100
+
+libxml (0.30-1) unstable; urgency=low
+
+ * Initial debianization.
+
+ -- Vincent Renardias <vincent@waw.com> Fri, 25 Sep 1998 19:16:53 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1220df1
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,148 @@
+Source: libxml2
+Priority: optional
+Section: libs
+Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs@lists.alioth.debian.org>
+Uploaders: Aron Xu <aron@debian.org>, YunQiang Su <wzssyqa@gmail.com>
+Standards-Version: 3.9.5
+Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev,
+ libpython-all-dev, libpython-all-dbg,
+ python-all-dev:any (>= 2.7.5-5~), python-all-dbg:any,
+ zlib1g-dev | libz-dev, liblzma-dev
+Homepage: http://xmlsoft.org/
+Vcs-Git: git://anonscm.debian.org/debian-xml-sgml/libxml2.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-xml-sgml/libxml2.git
+XS-Testsuite: autopkgtest
+
+Package: libxml2
+Priority: standard
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: xml-core
+Multi-Arch: same
+Description: GNOME XML library
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package provides a library providing an extensive API to handle
+ such XML data files.
+
+Package: libxml2-utils
+Architecture: any
+Section: text
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: foreign
+Description: XML utilities
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package provides xmllint, a tool for validating and reformatting
+ XML documents, and xmlcatalog, a tool to parse and manipulate XML or
+ SGML catalog files.
+
+Package: libxml2-utils-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: libxml2-utils (= ${binary:Version}), ${misc:Depends}
+Description: XML utilities (debug extension)
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package provides the debugging symbols for the utilities provided
+ by the libxml2-utils package.
+
+Package: libxml2-dev
+Architecture: any
+Section: libdevel
+Depends: libxml2 (= ${binary:Version}), ${misc:Depends}
+Suggests: pkg-config
+Multi-Arch: same
+Description: Development files for the GNOME XML library
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ Install this package if you wish to develop your own programs using
+ the GNOME XML library.
+
+Package: libxml2-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: libxml2 (= ${binary:Version}), ${misc:Depends}
+Multi-Arch: same
+Description: Debugging symbols for the GNOME XML library
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package provides the debugging symbols for the library.
+
+Package: libxml2-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}
+Suggests: devhelp
+Multi-Arch: foreign
+Description: Documentation for the GNOME XML library
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package contains general information about the GNOME XML library
+ and more specific API references.
+
+Package: python-libxml2
+Architecture: any
+Section: python
+Provides: ${python:Provides}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Python bindings for the GNOME XML library
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package contains the files needed to use the GNOME XML library
+ in Python programs.
+
+Package: python-libxml2-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Provides: ${python:Provides}
+Depends: python-dbg, python-libxml2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Python bindings for the GNOME XML library (debug extension)
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This package contains the files needed to use the GNOME XML library
+ in Python programs for use with the Python debug interpreter.
diff --git a/debian/control.udeb b/debian/control.udeb
new file mode 100644
index 0000000..bba35d3
--- /dev/null
+++ b/debian/control.udeb
@@ -0,0 +1,16 @@
+
+Package: libxml2-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: GNOME XML library - minimal runtime
+ XML is a metalanguage to let you design your own markup language.
+ A regular markup language defines a way to describe information in
+ a certain class of documents (eg HTML). XML lets you define your
+ own customized markup languages for many classes of document. It
+ can do this because it's written in SGML, the international standard
+ metalanguage for markup languages.
+ .
+ This is a minimal package for use in debian-installer that yields a
+ library providing an extensive API to handle such XML data files.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..7a37994
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,104 @@
+This package was debianized by Vincent Renardias <vincent@waw.com> on
+Sat, 26 Sep 1998 16:50:54 +0200
+
+It was downloaded from ftp://xmlsoft.org/libxml2/
+
+==========================
+
+Except where otherwise noted in the source code (trio files, hash.c and list.c)
+covered by a similar licence but with different Copyright notices:
+
+ Copyright (C) 1998-2002 Daniel Veillard. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is fur-
+nished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
+NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Daniel Veillard shall not
+be used in advertising or otherwise to promote the sale, use or other deal-
+ings in this Software without prior written authorization from him.
+==========================
+trio.c, trio.h:
+Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+==========================
+triop.h:
+Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+==========================
+hash.c:
+Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+==========================
+list.c:
+Copyright (C) 2000 Gary Pennington and Daniel Veillard.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+==========================
+triodef.h, trionan.c, trionan.h:
+Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+==========================
+triostr.c, triostr.h:
+Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
diff --git a/debian/libxml2-dbg.preinst b/debian/libxml2-dbg.preinst
new file mode 100644
index 0000000..c248ab0
--- /dev/null
+++ b/debian/libxml2-dbg.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "upgrade" ] &&
+[ -L /usr/share/doc/libxml2-dbg ] &&
+rm -f /usr/share/doc/libxml2-dbg
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libxml2-dev.install b/debian/libxml2-dev.install
new file mode 100644
index 0000000..aa09d9e
--- /dev/null
+++ b/debian/libxml2-dev.install
@@ -0,0 +1,7 @@
+usr/bin/xml2-config
+usr/lib/*/libxml2.so
+usr/lib/*/libxml2.a
+usr/lib/*/xml2Conf.sh
+usr/share/aclocal
+usr/lib/*/pkgconfig
+usr/include/libxml2
diff --git a/debian/libxml2-dev.manpages b/debian/libxml2-dev.manpages
new file mode 100644
index 0000000..17f65f5
--- /dev/null
+++ b/debian/libxml2-dev.manpages
@@ -0,0 +1,2 @@
+libxml.3
+xml2-config.1
diff --git a/debian/libxml2-dev.preinst b/debian/libxml2-dev.preinst
new file mode 100644
index 0000000..6429c86
--- /dev/null
+++ b/debian/libxml2-dev.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "upgrade" ] &&
+[ -L /usr/share/doc/libxml2-dev ] &&
+rm -f /usr/share/doc/libxml2-dev
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libxml2-doc.doc-base b/debian/libxml2-doc.doc-base
new file mode 100644
index 0000000..156af5a
--- /dev/null
+++ b/debian/libxml2-doc.doc-base
@@ -0,0 +1,10 @@
+Document: libxml2-doc
+Title: Reference manual for the libxml2.
+Author: Daniel Veillard
+Abstract: This manual describes the functions available in libxml2.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libxml2-doc/index.html
+Files: /usr/share/doc/libxml2-doc/*.html
+ /usr/share/doc/libxml2-doc/*/*.html
diff --git a/debian/libxml2-doc.install b/debian/libxml2-doc.install
new file mode 100644
index 0000000..2a59cf4
--- /dev/null
+++ b/debian/libxml2-doc.install
@@ -0,0 +1,2 @@
+usr/share/doc/libxml2-doc
+usr/share/gtk-doc
diff --git a/debian/libxml2-udeb.install b/debian/libxml2-udeb.install
new file mode 100644
index 0000000..dc0c3ec
--- /dev/null
+++ b/debian/libxml2-udeb.install
@@ -0,0 +1 @@
+usr/lib/*/libxml2.so.* usr/lib
diff --git a/debian/libxml2-utils.install b/debian/libxml2-utils.install
new file mode 100644
index 0000000..3cafad4
--- /dev/null
+++ b/debian/libxml2-utils.install
@@ -0,0 +1,2 @@
+usr/bin/xmllint
+usr/bin/xmlcatalog
diff --git a/debian/libxml2-utils.manpages b/debian/libxml2-utils.manpages
new file mode 100644
index 0000000..470f8f7
--- /dev/null
+++ b/debian/libxml2-utils.manpages
@@ -0,0 +1,2 @@
+doc/xmllint.1
+doc/xmlcatalog.1
diff --git a/debian/libxml2-utils.preinst b/debian/libxml2-utils.preinst
new file mode 100644
index 0000000..8c07be8
--- /dev/null
+++ b/debian/libxml2-utils.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "upgrade" ] &&
+[ -L /usr/share/doc/libxml2-utils ] &&
+rm -f /usr/share/doc/libxml2-utils
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libxml2.install b/debian/libxml2.install
new file mode 100644
index 0000000..d1a994c
--- /dev/null
+++ b/debian/libxml2.install
@@ -0,0 +1 @@
+usr/lib/*/libxml2.so.*
diff --git a/debian/libxml2.lintian-overrides b/debian/libxml2.lintian-overrides
new file mode 100644
index 0000000..05487a2
--- /dev/null
+++ b/debian/libxml2.lintian-overrides
@@ -0,0 +1 @@
+libxml2: package-name-doesnt-match-sonames
diff --git a/debian/libxml2.symbols b/debian/libxml2.symbols
new file mode 100644
index 0000000..374ef1d
--- /dev/null
+++ b/debian/libxml2.symbols
@@ -0,0 +1,171 @@
+libxml2.so.2 libxml2 #MINVER#
+ (symver|optional)LIBXML2_2.4.30 2.7.4
+ (symver|optional)LIBXML2_2.5.0 2.7.4
+ (symver|optional)LIBXML2_2.5.2 2.7.4
+ (symver|optional)LIBXML2_2.5.4 2.7.4
+ (symver|optional)LIBXML2_2.5.5 2.7.4
+ (symver|optional)LIBXML2_2.5.6 2.7.4
+ (symver|optional)LIBXML2_2.5.7 2.7.4
+ (symver|optional)LIBXML2_2.5.8 2.7.4
+ (symver|optional)LIBXML2_2.5.9 2.7.4
+ (symver|optional)LIBXML2_2.6.0 2.7.4
+ (symver|optional)LIBXML2_2.6.10 2.7.4
+ (symver|optional)LIBXML2_2.6.11 2.7.4
+ (symver|optional)LIBXML2_2.6.12 2.7.4
+ (symver|optional)LIBXML2_2.6.14 2.7.4
+ (symver|optional)LIBXML2_2.6.15 2.7.4
+ (symver|optional)LIBXML2_2.6.16 2.7.4
+ (symver|optional)LIBXML2_2.6.17 2.7.4
+ (symver|optional)LIBXML2_2.6.18 2.7.4
+ (symver|optional)LIBXML2_2.6.19 2.7.4
+ (symver|optional)LIBXML2_2.6.1 2.7.4
+ (symver|optional)LIBXML2_2.6.20 2.7.4
+ (symver|optional)LIBXML2_2.6.21 2.7.4
+ (symver|optional)LIBXML2_2.6.23 2.7.4
+ (symver|optional)LIBXML2_2.6.24 2.7.4
+ (symver|optional)LIBXML2_2.6.25 2.7.4
+ (symver|optional)LIBXML2_2.6.27 2.7.4
+ (symver|optional)LIBXML2_2.6.28 2.7.4
+ (symver|optional)LIBXML2_2.6.29 2.7.4
+ (symver|optional)LIBXML2_2.6.2 2.7.4
+ (symver|optional)LIBXML2_2.6.32 2.7.4
+ (symver|optional)LIBXML2_2.6.3 2.7.4
+ (symver|optional)LIBXML2_2.6.5 2.7.4
+ (symver|optional)LIBXML2_2.6.6 2.7.4
+ (symver|optional)LIBXML2_2.6.7 2.7.4
+ (symver|optional)LIBXML2_2.6.8 2.7.4
+ (symver|optional)LIBXML2_2.7.0 2.7.4
+ (symver|optional)LIBXML2_2.7.3 2.7.4
+ (symver|optional)LIBXML2_2.7.4 2.7.4
+ (symver|optional)LIBXML2_2.8.0 2.8.0
+ (symver|optional)LIBXML2_2.9.0 2.9.0
+ (symver|optional)LIBXML2_2.9.1 2.9.1
+ __docbDefaultSAXHandler@Base 2.6.27
+ __htmlDefaultSAXHandler@Base 2.6.27
+ __htmlParseContent@Base 2.6.27
+ __libxml2_xzclose@Base 2.8.0
+ __libxml2_xzdopen@Base 2.8.0
+ __libxml2_xzopen@Base 2.8.0
+ __libxml2_xzread@Base 2.8.0
+ __oldXMLWDcompatibility@Base 2.6.27
+ __xmlBufferAllocScheme@Base 2.6.27
+ __xmlDefaultBufferSize@Base 2.6.27
+ __xmlDefaultSAXHandler@Base 2.6.27
+ __xmlDefaultSAXLocator@Base 2.6.27
+ __xmlDeregisterNodeDefaultValue@Base 2.6.27
+ __xmlDoValidityCheckingDefaultValue@Base 2.6.27
+ __xmlErrEncoding@Base 2.6.27
+ __xmlGenericError@Base 2.6.27
+ __xmlGenericErrorContext@Base 2.6.27
+ __xmlGetWarningsDefaultValue@Base 2.6.27
+ __xmlGlobalInitMutexDestroy@Base 2.6.31
+ __xmlGlobalInitMutexLock@Base 2.6.28
+ __xmlGlobalInitMutexUnlock@Base 2.6.28
+ __xmlIOErr@Base 2.6.27
+ __xmlIndentTreeOutput@Base 2.6.27
+ __xmlInitializeDict@Base 2.9.1
+ __xmlKeepBlanksDefaultValue@Base 2.6.27
+ __xmlLastError@Base 2.6.27
+ __xmlLineNumbersDefaultValue@Base 2.6.27
+ __xmlLoadExtDtdDefaultValue@Base 2.6.27
+ __xmlLoaderErr@Base 2.6.27
+ __xmlOutputBufferCreateFilename@Base 2.6.27
+ __xmlOutputBufferCreateFilenameValue@Base 2.6.27
+ __xmlParserDebugEntities@Base 2.6.27
+ __xmlParserInputBufferCreateFilename@Base 2.6.27
+ __xmlParserInputBufferCreateFilenameValue@Base 2.6.27
+ __xmlParserVersion@Base 2.6.27
+ __xmlPedanticParserDefaultValue@Base 2.6.27
+ __xmlRaiseError@Base 2.6.27
+ __xmlRandom@Base 2.8.0
+ __xmlRegisterCallbacks@Base 2.6.27
+ __xmlRegisterNodeDefaultValue@Base 2.6.27
+ __xmlSaveNoEmptyTags@Base 2.6.27
+ __xmlSimpleError@Base 2.6.27
+ __xmlStructuredError@Base 2.6.27
+ __xmlStructuredErrorContext@Base 2.7.4
+ __xmlSubstituteEntitiesDefaultValue@Base 2.6.27
+ __xmlTreeIndentString@Base 2.6.27
+ compute_minrun@Base 2.9.0
+ htmlDecodeEntities@Base 2.6.27
+ libxml_domnode_binary_insertion_sort@Base 2.9.0
+ libxml_domnode_tim_sort@Base 2.9.0
+ xmlAllocOutputBufferInternal@Base 2.7.1
+ xmlAutomataSetFlags@Base 2.7.4
+ xmlBufAdd@Base 2.9.0
+ xmlBufAddHead@Base 2.9.0
+ xmlBufAddLen@Base 2.9.0
+ xmlBufAttrSerializeTxtContent@Base 2.9.0
+ xmlBufAvail@Base 2.9.0
+ xmlBufBackToBuffer@Base 2.9.0
+ xmlBufCCat@Base 2.9.0
+ xmlBufCat@Base 2.9.0
+ xmlBufContent@LIBXML2_2.9.0 2.9.0
+ xmlBufCreate@Base 2.9.0
+ xmlBufCreateSize@Base 2.9.0
+ xmlBufCreateStatic@Base 2.9.0
+ xmlBufDetach@Base 2.9.0
+ xmlBufDump@Base 2.9.0
+ xmlBufDumpAttributeDecl@Base 2.9.0
+ xmlBufDumpElementDecl@Base 2.9.0
+ xmlBufDumpEntityDecl@Base 2.9.0
+ xmlBufDumpNotationTable@Base 2.9.0
+ xmlBufEmpty@Base 2.9.0
+ xmlBufEnd@LIBXML2_2.9.0 2.9.0
+ xmlBufErase@Base 2.9.0
+ xmlBufFree@Base 2.9.0
+ xmlBufFromBuffer@Base 2.9.0
+ xmlBufGetAllocationScheme@Base 2.9.0
+ xmlBufGetInputBase@Base 2.9.0
+ xmlBufGetNodeContent@LIBXML2_2.9.0 2.9.0
+ xmlBufGrow@Base 2.9.0
+ xmlBufInflate@Base 2.9.0
+ xmlBufIsEmpty@Base 2.9.0
+ xmlBufLength@Base 2.9.0
+ xmlBufMergeBuffer@Base 2.9.0
+ xmlBufNodeDump@LIBXML2_2.9.0 2.9.0
+ xmlBufResetInput@Base 2.9.0
+ xmlBufResize@Base 2.9.0
+ xmlBufSetAllocationScheme@Base 2.9.0
+ xmlBufSetInputBaseCur@Base 2.9.0
+ xmlBufShrink@LIBXML2_2.9.0 2.9.0
+ xmlBufUse@LIBXML2_2.9.0 2.9.0
+ xmlBufWriteCHAR@Base 2.9.0
+ xmlBufWriteChar@Base 2.9.0
+ xmlBufWriteQuotedString@Base 2.9.0
+ xmlBufferDetach@LIBXML2_2.8.0 2.8.0
+ xmlBuildRelativeURI@LIBXML2_2.6.11 2.8.0
+ xmlCharEncFirstLineInput@Base 2.9.0
+ xmlCharEncFirstLineInt@Base 2.7.4
+ xmlCharEncInput@Base 2.9.0
+ xmlCharEncOutput@Base 2.9.0
+ xmlDictGetUsage@LIBXML2_2.9.0 2.9.0
+ xmlDictSetLimit@LIBXML2_2.9.0 2.9.0
+ xmlEncodeAttributeEntities@Base 2.9.0
+ xmlGenericErrorDefaultFunc@Base 2.6.27
+ xmlInitializeDict@LIBXML2_2.8.0 2.8.0
+ xmlMallocBreakpoint@Base 2.6.27
+ xmlNop@Base 2.9.1
+ xmlNsListDumpOutput@Base 2.6.27
+ xmlOutputBufferCreateFilenameDefault@LIBXML2_2.6.11 2.8.0
+ xmlOutputBufferCreateFilenameValue@LIBXML2_2.6.11 2.8.0
+ xmlOutputBufferGetContent@LIBXML2_2.9.0 2.9.0
+ xmlOutputBufferGetSize@LIBXML2_2.9.0 2.9.0
+ xmlParserInputBufferCreateFilenameDefault@LIBXML2_2.6.11 2.8.0
+ xmlParserInputBufferCreateFilenameValue@LIBXML2_2.6.11 2.8.0
+ xmlSchemaCollapseString@LIBXML2_2.6.11 2.8.0
+ xmlSchemaFreeWildcard@LIBXML2_2.6.11 2.8.0
+ xmlSchemaGetBuiltInListSimpleTypeItemType@LIBXML2_2.6.11 2.8.0
+ xmlSchemaGetBuiltInType@LIBXML2_2.6.11 2.8.0
+ xmlSchemaIsBuiltInTypeFacet@LIBXML2_2.6.11 2.8.0
+ xmlSchemaValidateListSimpleTypeFacet@LIBXML2_2.6.11 2.8.0
+ xmlSchemaValidateSetFilename@LIBXML2_2.9.0 2.9.0
+ xmlSchemaValidateSetLocator@LIBXML2_2.9.0 2.9.0
+ xmlTextWriterSetQuoteChar@LIBXML2_2.9.0 2.9.0
+ xmlThrDefOutputBufferCreateFilenameDefault@LIBXML2_2.6.11 2.8.0
+ xmlThrDefParserInputBufferCreateFilenameDefault@LIBXML2_2.6.11 2.8.0
+ xmlTextReaderRelaxNGValidateCtxt@LIBXML2_2.8.0
+ xmlUpgradeOldNs@Base 2.6.27
+ xmlXPathNodeEval@LIBXML2_2.9.1 2.9.1
+ xmlXPathSetContextNode@LIBXML2_2.9.1 2.9.1
+ xmlXPtrAdvanceNode@Base 2.6.27
diff --git a/debian/patches/0001-modify-xml2-config-and-pkgconfig-behaviour.patch b/debian/patches/0001-modify-xml2-config-and-pkgconfig-behaviour.patch
new file mode 100644
index 0000000..b835d4d
--- /dev/null
+++ b/debian/patches/0001-modify-xml2-config-and-pkgconfig-behaviour.patch
@@ -0,0 +1,95 @@
+From: Aron Xu <aron@debian.org>
+Date: Sun, 26 Oct 2014 06:02:29 +0800
+Subject: modify xml2-config and pkgconfig behaviour
+
+---
+ configure.ac | 2 +-
+ libxml-2.0-uninstalled.pc.in | 2 ++
+ xml2-config.1 | 4 ++++
+ xml2-config.in | 22 ++++++++++------------
+ 4 files changed, 17 insertions(+), 13 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 14ac0a8..21d90ab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1476,7 +1476,7 @@ case "$host" in
+ *) M_LIBS="-lm"
+ ;;
+ esac
+-XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
++XML_LIBS="-lxml2"
+ XML_LIBTOOLLIBS="libxml2.la"
+ AC_SUBST(WITH_ICONV)
+
+diff --git a/libxml-2.0-uninstalled.pc.in b/libxml-2.0-uninstalled.pc.in
+index 60b886b..6bd7349 100644
+--- a/libxml-2.0-uninstalled.pc.in
++++ b/libxml-2.0-uninstalled.pc.in
+@@ -9,4 +9,6 @@ Version: @VERSION@
+ Description: libXML library version2.
+ Requires:
+ Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
++Libs: -L${libdir} -lxml2
++Libs.private: @BASE_THREAD_LIBS@ @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
+ Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@
+diff --git a/xml2-config.1 b/xml2-config.1
+index 8cf9858..7b4195d 100644
+--- a/xml2-config.1
++++ b/xml2-config.1
+@@ -8,11 +8,15 @@ xml-config - script to get information about the installed version of GNOME-XML
+ \fIxml-config\fP is a tool that is used to determine the compile and
+ linker flags that should be used to compile and link programs that use
+ \fIGNOME-XML\fP.
++It is highly recommended to use pkg-config instead because building in a
++multi-arch environment is not well supported in this script.
+ .SH OPTIONS
+ \fIxml-config\fP accepts the following options:
+ .TP 8
+ .B \-\-version
+ Print the currently installed version of \fIGNOME-XML\fP on the standard output.
++Add the \fB\-\-static\fP option to print the linker flags that are necessary
++to \fBstatically\fP link a \fIGNOME-XML\fP program.
+ .TP 8
+ .B \-\-libs
+ Print the linker flags that are necessary to link a \fIGNOME-XML\fP program.
+diff --git a/xml2-config.in b/xml2-config.in
+index 1957486..b764d83 100644
+--- a/xml2-config.in
++++ b/xml2-config.in
+@@ -15,6 +15,8 @@ Known values for OPTION are:
+ --prefix=DIR change libxml prefix [default $prefix]
+ --exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
+ --libs print library linking information
++ add --static to print static library linking
++ information
+ --cflags print pre-processor and compiler flags
+ --modules module support enabled
+ --help display this help and exit
+@@ -82,18 +84,14 @@ while test $# -gt 0; do
+ ;;
+
+ --libs)
+- if [ "`uname`" = "Linux" ]
+- then
+- if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
+- then
+- echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
+- else
+- echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
+- fi
+- else
+- echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ @WIN32_EXTRA_LIBADD@
+- fi
+- ;;
++ LIBS="@XML_LIBS@ @WIN32_EXTRA_LIBADD@"
++ if [ "$2" = "--static" ]
++ then
++ shift
++ LIBS="${LIBS} @Z_LIBS@ @BASE_THREAD_LIBS@@THREAD_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@"
++ fi
++ echo ${LIBS}
++ ;;
+
+ *)
+ usage
diff --git a/debian/patches/0002-fix-python-multiarch-includes.patch b/debian/patches/0002-fix-python-multiarch-includes.patch
new file mode 100644
index 0000000..129d53d
--- /dev/null
+++ b/debian/patches/0002-fix-python-multiarch-includes.patch
@@ -0,0 +1,35 @@
+From: Matthias Klose <doko@ubuntu.com>
+Date: Wed, 9 Jul 2014 05:30:24 +0800
+Subject: fix python multiarch includes
+
+---
+ python/Makefile.am | 2 +-
+ python/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 34aed96..8445ea5 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -19,7 +19,7 @@ if WITH_PYTHON
+ AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+- -I$(PYTHON_INCLUDES)
++ $(PYTHON_INCLUDES)
+
+ python_LTLIBRARIES = libxml2mod.la
+
+diff --git a/python/Makefile.in b/python/Makefile.in
+index 03fbd5b..7299c82 100644
+--- a/python/Makefile.in
++++ b/python/Makefile.in
+@@ -490,7 +490,7 @@ EXTRA_DIST = \
+ @WITH_PYTHON_TRUE@AM_CPPFLAGS = \
+ @WITH_PYTHON_TRUE@ -I$(top_builddir)/include \
+ @WITH_PYTHON_TRUE@ -I$(top_srcdir)/include \
+-@WITH_PYTHON_TRUE@ -I$(PYTHON_INCLUDES)
++@WITH_PYTHON_TRUE@ $(PYTHON_INCLUDES)
+
+ @WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
+ @WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f537d6b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-modify-xml2-config-and-pkgconfig-behaviour.patch
+0002-fix-python-multiarch-includes.patch
diff --git a/debian/python-libxml2-dbg.install b/debian/python-libxml2-dbg.install
new file mode 100644
index 0000000..fc34bbe
--- /dev/null
+++ b/debian/python-libxml2-dbg.install
@@ -0,0 +1 @@
+usr/lib/python*/*-packages/*.so
diff --git a/debian/python-libxml2-dbg.lintian-overrides b/debian/python-libxml2-dbg.lintian-overrides
new file mode 100644
index 0000000..970ee3e
--- /dev/null
+++ b/debian/python-libxml2-dbg.lintian-overrides
@@ -0,0 +1 @@
+python-libxml2-dbg: hardening-no-fortify-functions
diff --git a/debian/python-libxml2-dbg.preinst b/debian/python-libxml2-dbg.preinst
new file mode 100644
index 0000000..8553b97
--- /dev/null
+++ b/debian/python-libxml2-dbg.preinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ "$1" = "upgrade" ] &&
+[ -L /usr/share/doc/python-libxml2-dbg ] &&
+rm -f /usr/share/doc/python-libxml2-dbg
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/python-libxml2.examples b/debian/python-libxml2.examples
new file mode 100644
index 0000000..de4ebf8
--- /dev/null
+++ b/debian/python-libxml2.examples
@@ -0,0 +1,2 @@
+python/tests/*.py
+python/tests/*.xml
diff --git a/debian/python-libxml2.install b/debian/python-libxml2.install
new file mode 100644
index 0000000..66c4906
--- /dev/null
+++ b/debian/python-libxml2.install
@@ -0,0 +1,2 @@
+usr/lib/python*/*-packages/*.py*
+usr/lib/python*/*-packages/*.so
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..55b006d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,149 @@
+#!/usr/bin/make -f
+export DH_VERBOSE=1
+
+# The versions of python currently supported
+PYVERS=$(shell pyversions -s)
+# The current default version of python
+PYVER=$(shell pyversions -d)
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+CFLAGS = `dpkg-buildflags --get CFLAGS` -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS` -Wl,--as-needed
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
+TARGETS := main $(PYVERS) $(PYVERS:%=%-dbg)
+
+WITH_UDEB := $(shell dpkg-vendor --derives-from Ubuntu && echo yes)
+
+ifdef WITH_UDEB
+$(if $(shell grep -q libxml2-udeb debian/control || echo yes),$(shell cat debian/control.udeb >> debian/control))
+TARGETS += udeb
+else
+$(if $(shell grep -q libxml2-udeb debian/control && echo yes),$(shell sed -i /libxml2-udeb/,\$$d debian/control))
+export DH_OPTIONS = -Nlibxml2-udeb
+endif
+
+ifeq ($(DEB_BUILD_PROFILE),stage1)
+DH_OPTIONS += -Npython-libxml2 -Npython-libxml2-dbg
+export DH_OPTIONS
+endif
+
+CONFIGURE_FLAGS := --disable-silent-rules --with-history CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" --cache-file="$(CURDIR)/builddir/config.cache"
+
+override_dh_auto_configure: $(TARGETS:%=doconfigure-%)
+
+debian/autoreconf.after:
+ dh_autoreconf
+
+doconfigure-%: debian/autoreconf.after
+ dh_auto_configure --builddirectory=builddir/$* -- $(CONFIGURE_FLAGS)
+
+doconfigure-main: CONFIGURE_FLAGS += --without-python
+doconfigure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$*
+#doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-minimum --with-tree --with-output
+doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-tree --with-output --without-python
+
+override_dh_auto_build: $(TARGETS:%=dobuild-%)
+
+dobuild-%: BUILD_DIR=builddir/$*
+dobuild-%: doconfigure-%
+ $(if $(filter $(BUILD_DIR),builddir/$*),,[ -d $(BUILD_DIR) ] || mv builddir/$*/python $(BUILD_DIR))
+ dh_auto_build --builddirectory=$(BUILD_DIR) -- $(BUILD_FLAGS)
+
+dobuild-python%: BUILD_DIR=builddir/main/$*
+dobuild-python%: BUILD_FLAGS = libxml2mod_la_LIBADD='$$(mylibs)' \
+ PYTHON_INCLUDES="$(shell $(DEB_HOST_GNU_TYPE)-python-config --includes)" \
+ PYTHON_LIBS="$(shell $(DEB_HOST_GNU_TYPE)-python-config --ldflags)"
+dobuild-python%-dbg: BUILD_FLAGS += PYTHON_INCLUDES="$(shell $(DEB_HOST_GNU_TYPE)-python-dbg-config --includes)" \
+ PYTHON_LIBS="$(shell $(DEB_HOST_GNU_TYPE)-python-dbg-config --ldflags)" \
+ CFLAGS="$(CFLAGS) -Wall -g -O0" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) \
+ -L$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)"
+build-arch: $(TARGETS:%=dobuild-%)
+build-indep:
+build: build-arch build-indep
+
+override_dh_auto_clean:
+ rm -rf builddir debian/tmp-dbg debian/tmp-udeb
+ dh_auto_clean
+
+override_dh_auto_install: $(TARGETS:%=doinstall-%)
+ find debian/ -name *.la -delete
+
+doinstall-main:
+ dh_auto_install --builddirectory=builddir/main
+ mv debian/tmp/usr/share/aclocal/libxml.m4 debian/tmp/usr/share/aclocal/libxml2.m4
+
+ # Properly install documentation in /usr/share/doc/libxml2-doc
+ install -d debian/tmp/usr/share/doc/libxml2-doc/examples
+ install -m 644 \
+ doc/*.html \
+ doc/*.gif \
+ doc/*.png \
+ doc/libxml2-api.xml debian/tmp/usr/share/doc/libxml2-doc
+ install -m 644 \
+ doc/examples/*.c \
+ doc/examples/*.res \
+ doc/examples/index.html \
+ doc/examples/[tw]*.xml debian/tmp/usr/share/doc/libxml2-doc/examples
+ cp -a \
+ doc/html \
+ doc/tutorial debian/tmp/usr/share/doc/libxml2-doc
+
+doinstall-python%-dbg:
+ $(MAKE) -C builddir/main/python$*-dbg DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES
+ prename -vf 's/(?<!_d)\.so$$/_d.so/' debian/tmp-dbg/usr/lib/python$*/*-packages/*.so
+
+doinstall-python%:
+ dh_auto_install --builddirectory=builddir/main/python$*
+
+doinstall-udeb:
+ dh_auto_install --builddirectory=builddir/udeb --destdir=debian/tmp-udeb
+
+override_dh_installdocs:
+ dh_installdocs -A AUTHORS TODO README NEWS
+ dh_installdocs -ppython-libxml2 python/TODO
+
+override_dh_compress:
+ dh_compress -Xexamples/ -Xtutorial/ -Xhtml/ -X.html
+
+override_dh_installchangelogs:
+ dh_installchangelogs -plibxml2 ChangeLog
+ dh_installchangelogs -Nlibxml2 -XChangeLog
+
+override_dh_install:
+ dh_install -Npython-libxml2-dbg -Nlibxml2-udeb
+ifneq ($(DEB_BUILD_PROFILE),stage1)
+ dh_install -ppython-libxml2-dbg --sourcedir=debian/tmp-dbg
+endif
+ dh_install -plibxml2-udeb --sourcedir=debian/tmp-udeb
+ sed -i -e 's,/lib/$(DEB_HOST_MULTIARCH),/lib,' debian/libxml2-dev/usr/bin/xml2-config
+
+override_dh_strip:
+ dh_strip -a --dbg-package=libxml2-dbg -Nlibxml2-udeb -Nlibxml2-utils -Nlibxml2-utils-dbg -Npython-libxml2 -Npython-libxml2-dbg
+ dh_strip -plibxml2-utils --dbg-package=libxml2-utils-dbg
+ifneq ($(DEB_BUILD_PROFILE),stage1)
+ dh_strip -ppython-libxml2 --dbg-package=python-libxml2-dbg
+endif
+ $(foreach python, $(filter-out $(PYVER), $(PYVERS)),\
+ cd $(CURDIR)/debian/python-libxml2/usr/lib/pyshared; \
+ if diff $(python)/libxml2mod.so $(PYVER)/libxml2mod.so > /dev/null 2>&1; then \
+ rm -f $(python)/libxml2mod.so; \
+ ln -s ../$(PYVER)/libxml2mod.so $(python)/libxml2mod.so; \
+ fi;)
+ dh_strip
+
+override_dh_makeshlibs:
+ dh_makeshlibs -a $(if $(WITH_UDEB),--add-udeb=libxml2-udeb )-V 'libxml2 (>= 2.7.4)' -- -c4
+
+%:
+ifeq ($(DEB_BUILD_PROFILE),stage1)
+ dh $@ --with autoreconf
+else
+ dh $@ --with autoreconf,python2
+endif
+
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/build b/debian/tests/build
new file mode 100644
index 0000000..714befa
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,41 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against libxml2, to verify that the
+# headers and pkg-config file are installed correctly
+# (C) 2012 Canonical Ltd.
+# Author: Daniel Holbach <daniel.holbach@ubuntu.com>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > xmltest.c
+#include <libxml/parser.h>
+
+int
+main(void)
+{
+
+ xmlNodePtr n;
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlNewDoc(BAD_CAST "1.0");
+ n = xmlNewNode(NULL, BAD_CAST "root");
+ xmlNodeSetContent(n, BAD_CAST "content");
+ xmlDocSetRootElement(doc, n);
+
+ cur = xmlDocGetRootElement(doc);
+ if (xmlStrcmp(cur->name, (const xmlChar *) "root"))
+ return (1);
+ xmlFreeDoc(doc);
+ return (0);
+
+}
+EOF
+
+gcc -o xmltest xmltest.c `pkg-config --cflags --libs libxml-2.0`
+echo "build: OK"
+[ -x xmltest ]
+./xmltest
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..92f5df1
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build python
+Depends: libxml2-dev, python-libxml2, build-essential, pkg-config
diff --git a/debian/tests/python b/debian/tests/python
new file mode 100644
index 0000000..5fa3338
--- /dev/null
+++ b/debian/tests/python
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+python <<EOF
+import libxml2
+import sys
+
+doc = libxml2.parseDoc(
+"""<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE test [
+<!ELEMENT test (#PCDATA) >
+<!ATTLIST test xmlns:abc CDATA #FIXED "http://abc.org" >
+<!ATTLIST test abc:attr CDATA #FIXED "def" >
+]>
+<test />
+""")
+elem = doc.getRootElement()
+attr = elem.hasNsProp('attr', 'http://abc.org')
+if attr == None or attr.serialize()[:-1] != """<!ATTLIST test abc:attr CDATA #FIXED "def">""":
+ print("Failed to find defaulted attribute abc:attr")
+ sys.exit(1)
+doc.freeDoc()
+EOF
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..ebd77f0
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$//,uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|BETA|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/ \
+ftp://xmlsoft.org/libxml2/libxml2-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
diff --git a/debugXML.c b/debugXML.c
new file mode 100644
index 0000000..b05fdff
--- /dev/null
+++ b/debugXML.c
@@ -0,0 +1,3428 @@
+/*
+ * debugXML.c : This is a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef LIBXML_DEBUG_ENABLED
+
+#include <string.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/valid.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/uri.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#endif
+
+#define DUMP_TEXT_TYPE 1
+
+typedef struct _xmlDebugCtxt xmlDebugCtxt;
+typedef xmlDebugCtxt *xmlDebugCtxtPtr;
+struct _xmlDebugCtxt {
+ FILE *output; /* the output file */
+ char shift[101]; /* used for indenting */
+ int depth; /* current depth */
+ xmlDocPtr doc; /* current document */
+ xmlNodePtr node; /* current node */
+ xmlDictPtr dict; /* the doc dictionnary */
+ int check; /* do just checkings */
+ int errors; /* number of errors found */
+ int nodict; /* if the document has no dictionnary */
+ int options; /* options */
+};
+
+static void xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node);
+
+static void
+xmlCtxtDumpInitCtxt(xmlDebugCtxtPtr ctxt)
+{
+ int i;
+
+ ctxt->depth = 0;
+ ctxt->check = 0;
+ ctxt->errors = 0;
+ ctxt->output = stdout;
+ ctxt->doc = NULL;
+ ctxt->node = NULL;
+ ctxt->dict = NULL;
+ ctxt->nodict = 0;
+ ctxt->options = 0;
+ for (i = 0; i < 100; i++)
+ ctxt->shift[i] = ' ';
+ ctxt->shift[100] = 0;
+}
+
+static void
+xmlCtxtDumpCleanCtxt(xmlDebugCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ /* remove the ATTRIBUTE_UNUSED when this is added */
+}
+
+/**
+ * xmlNsCheckScope:
+ * @node: the node
+ * @ns: the namespace node
+ *
+ * Check that a given namespace is in scope on a node.
+ *
+ * Returns 1 if in scope, -1 in case of argument error,
+ * -2 if the namespace is not in scope, and -3 if not on
+ * an ancestor node.
+ */
+static int
+xmlNsCheckScope(xmlNodePtr node, xmlNsPtr ns)
+{
+ xmlNsPtr cur;
+
+ if ((node == NULL) || (ns == NULL))
+ return(-1);
+
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE) &&
+ (node->type != XML_DOCUMENT_NODE) &&
+ (node->type != XML_TEXT_NODE) &&
+ (node->type != XML_HTML_DOCUMENT_NODE) &&
+ (node->type != XML_XINCLUDE_START))
+ return(-2);
+
+ while ((node != NULL) &&
+ ((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_ATTRIBUTE_NODE) ||
+ (node->type == XML_TEXT_NODE) ||
+ (node->type == XML_XINCLUDE_START))) {
+ if ((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_XINCLUDE_START)) {
+ cur = node->nsDef;
+ while (cur != NULL) {
+ if (cur == ns)
+ return(1);
+ if (xmlStrEqual(cur->prefix, ns->prefix))
+ return(-2);
+ cur = cur->next;
+ }
+ }
+ node = node->parent;
+ }
+ /* the xml namespace may be declared on the document node */
+ if ((node != NULL) &&
+ ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE))) {
+ xmlNsPtr oldNs = ((xmlDocPtr) node)->oldNs;
+ if (oldNs == ns)
+ return(1);
+ }
+ return(-3);
+}
+
+static void
+xmlCtxtDumpSpaces(xmlDebugCtxtPtr ctxt)
+{
+ if (ctxt->check)
+ return;
+ if ((ctxt->output != NULL) && (ctxt->depth > 0)) {
+ if (ctxt->depth < 50)
+ fprintf(ctxt->output, "%s", &ctxt->shift[100 - 2 * ctxt->depth]);
+ else
+ fprintf(ctxt->output, "%s", ctxt->shift);
+ }
+}
+
+/**
+ * xmlDebugErr:
+ * @ctxt: a debug context
+ * @error: the error code
+ *
+ * Handle a debug error.
+ */
+static void
+xmlDebugErr(xmlDebugCtxtPtr ctxt, int error, const char *msg)
+{
+ ctxt->errors++;
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, ctxt->node, XML_FROM_CHECK,
+ error, XML_ERR_ERROR, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ "%s", msg);
+}
+static void
+xmlDebugErr2(xmlDebugCtxtPtr ctxt, int error, const char *msg, int extra)
+{
+ ctxt->errors++;
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, ctxt->node, XML_FROM_CHECK,
+ error, XML_ERR_ERROR, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ msg, extra);
+}
+static void
+xmlDebugErr3(xmlDebugCtxtPtr ctxt, int error, const char *msg, const char *extra)
+{
+ ctxt->errors++;
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, ctxt->node, XML_FROM_CHECK,
+ error, XML_ERR_ERROR, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ msg, extra);
+}
+
+/**
+ * xmlCtxtNsCheckScope:
+ * @ctxt: the debugging context
+ * @node: the node
+ * @ns: the namespace node
+ *
+ * Report if a given namespace is is not in scope.
+ */
+static void
+xmlCtxtNsCheckScope(xmlDebugCtxtPtr ctxt, xmlNodePtr node, xmlNsPtr ns)
+{
+ int ret;
+
+ ret = xmlNsCheckScope(node, ns);
+ if (ret == -2) {
+ if (ns->prefix == NULL)
+ xmlDebugErr(ctxt, XML_CHECK_NS_SCOPE,
+ "Reference to default namespace not in scope\n");
+ else
+ xmlDebugErr3(ctxt, XML_CHECK_NS_SCOPE,
+ "Reference to namespace '%s' not in scope\n",
+ (char *) ns->prefix);
+ }
+ if (ret == -3) {
+ if (ns->prefix == NULL)
+ xmlDebugErr(ctxt, XML_CHECK_NS_ANCESTOR,
+ "Reference to default namespace not on ancestor\n");
+ else
+ xmlDebugErr3(ctxt, XML_CHECK_NS_ANCESTOR,
+ "Reference to namespace '%s' not on ancestor\n",
+ (char *) ns->prefix);
+ }
+}
+
+/**
+ * xmlCtxtCheckString:
+ * @ctxt: the debug context
+ * @str: the string
+ *
+ * Do debugging on the string, currently it just checks the UTF-8 content
+ */
+static void
+xmlCtxtCheckString(xmlDebugCtxtPtr ctxt, const xmlChar * str)
+{
+ if (str == NULL) return;
+ if (ctxt->check) {
+ if (!xmlCheckUTF8(str)) {
+ xmlDebugErr3(ctxt, XML_CHECK_NOT_UTF8,
+ "String is not UTF-8 %s", (const char *) str);
+ }
+ }
+}
+
+/**
+ * xmlCtxtCheckName:
+ * @ctxt: the debug context
+ * @name: the name
+ *
+ * Do debugging on the name, for example the dictionnary status and
+ * conformance to the Name production.
+ */
+static void
+xmlCtxtCheckName(xmlDebugCtxtPtr ctxt, const xmlChar * name)
+{
+ if (ctxt->check) {
+ if (name == NULL) {
+ xmlDebugErr(ctxt, XML_CHECK_NO_NAME, "Name is NULL");
+ return;
+ }
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ if (xmlValidateName(name, 0)) {
+ xmlDebugErr3(ctxt, XML_CHECK_NOT_NCNAME,
+ "Name is not an NCName '%s'", (const char *) name);
+ }
+#endif
+ if ((ctxt->dict != NULL) &&
+ (!xmlDictOwns(ctxt->dict, name)) &&
+ ((ctxt->doc == NULL) ||
+ ((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) {
+ xmlDebugErr3(ctxt, XML_CHECK_OUTSIDE_DICT,
+ "Name is not from the document dictionnary '%s'",
+ (const char *) name);
+ }
+ }
+}
+
+static void
+xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
+ xmlDocPtr doc;
+ xmlDictPtr dict;
+
+ doc = node->doc;
+
+ if (node->parent == NULL)
+ xmlDebugErr(ctxt, XML_CHECK_NO_PARENT,
+ "Node has no parent\n");
+ if (node->doc == NULL) {
+ xmlDebugErr(ctxt, XML_CHECK_NO_DOC,
+ "Node has no doc\n");
+ dict = NULL;
+ } else {
+ dict = doc->dict;
+ if ((dict == NULL) && (ctxt->nodict == 0)) {
+#if 0
+ /* desactivated right now as it raises too many errors */
+ if (doc->type == XML_DOCUMENT_NODE)
+ xmlDebugErr(ctxt, XML_CHECK_NO_DICT,
+ "Document has no dictionnary\n");
+#endif
+ ctxt->nodict = 1;
+ }
+ if (ctxt->doc == NULL)
+ ctxt->doc = doc;
+
+ if (ctxt->dict == NULL) {
+ ctxt->dict = dict;
+ }
+ }
+ if ((node->parent != NULL) && (node->doc != node->parent->doc) &&
+ (!xmlStrEqual(node->name, BAD_CAST "pseudoroot")))
+ xmlDebugErr(ctxt, XML_CHECK_WRONG_DOC,
+ "Node doc differs from parent's one\n");
+ if (node->prev == NULL) {
+ if (node->type == XML_ATTRIBUTE_NODE) {
+ if ((node->parent != NULL) &&
+ (node != (xmlNodePtr) node->parent->properties))
+ xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
+ "Attr has no prev and not first of attr list\n");
+
+ } else if ((node->parent != NULL) && (node->parent->children != node))
+ xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
+ "Node has no prev and not first of parent list\n");
+ } else {
+ if (node->prev->next != node)
+ xmlDebugErr(ctxt, XML_CHECK_WRONG_PREV,
+ "Node prev->next : back link wrong\n");
+ }
+ if (node->next == NULL) {
+ if ((node->parent != NULL) && (node->type != XML_ATTRIBUTE_NODE) &&
+ (node->parent->last != node) &&
+ (node->parent->type == XML_ELEMENT_NODE))
+ xmlDebugErr(ctxt, XML_CHECK_NO_NEXT,
+ "Node has no next and not last of parent list\n");
+ } else {
+ if (node->next->prev != node)
+ xmlDebugErr(ctxt, XML_CHECK_WRONG_NEXT,
+ "Node next->prev : forward link wrong\n");
+ if (node->next->parent != node->parent)
+ xmlDebugErr(ctxt, XML_CHECK_WRONG_PARENT,
+ "Node next->prev : forward link wrong\n");
+ }
+ if (node->type == XML_ELEMENT_NODE) {
+ xmlNsPtr ns;
+
+ ns = node->nsDef;
+ while (ns != NULL) {
+ xmlCtxtNsCheckScope(ctxt, node, ns);
+ ns = ns->next;
+ }
+ if (node->ns != NULL)
+ xmlCtxtNsCheckScope(ctxt, node, node->ns);
+ } else if (node->type == XML_ATTRIBUTE_NODE) {
+ if (node->ns != NULL)
+ xmlCtxtNsCheckScope(ctxt, node, node->ns);
+ }
+
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE) &&
+ (node->type != XML_ELEMENT_DECL) &&
+ (node->type != XML_ATTRIBUTE_DECL) &&
+ (node->type != XML_DTD_NODE) &&
+ (node->type != XML_HTML_DOCUMENT_NODE) &&
+ (node->type != XML_DOCUMENT_NODE)) {
+ if (node->content != NULL)
+ xmlCtxtCheckString(ctxt, (const xmlChar *) node->content);
+ }
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ xmlCtxtCheckName(ctxt, node->name);
+ break;
+ case XML_TEXT_NODE:
+ if ((node->name == xmlStringText) ||
+ (node->name == xmlStringTextNoenc))
+ break;
+ /* some case of entity substitution can lead to this */
+ if ((ctxt->dict != NULL) &&
+ (node->name == xmlDictLookup(ctxt->dict, BAD_CAST "nbktext",
+ 7)))
+ break;
+
+ xmlDebugErr3(ctxt, XML_CHECK_WRONG_NAME,
+ "Text node has wrong name '%s'",
+ (const char *) node->name);
+ break;
+ case XML_COMMENT_NODE:
+ if (node->name == xmlStringComment)
+ break;
+ xmlDebugErr3(ctxt, XML_CHECK_WRONG_NAME,
+ "Comment node has wrong name '%s'",
+ (const char *) node->name);
+ break;
+ case XML_PI_NODE:
+ xmlCtxtCheckName(ctxt, node->name);
+ break;
+ case XML_CDATA_SECTION_NODE:
+ if (node->name == NULL)
+ break;
+ xmlDebugErr3(ctxt, XML_CHECK_NAME_NOT_NULL,
+ "CData section has non NULL name '%s'",
+ (const char *) node->name);
+ break;
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ break;
+ }
+}
+
+static void
+xmlCtxtDumpString(xmlDebugCtxtPtr ctxt, const xmlChar * str)
+{
+ int i;
+
+ if (ctxt->check) {
+ return;
+ }
+ /* TODO: check UTF8 content of the string */
+ if (str == NULL) {
+ fprintf(ctxt->output, "(NULL)");
+ return;
+ }
+ for (i = 0; i < 40; i++)
+ if (str[i] == 0)
+ return;
+ else if (IS_BLANK_CH(str[i]))
+ fputc(' ', ctxt->output);
+ else if (str[i] >= 0x80)
+ fprintf(ctxt->output, "#%X", str[i]);
+ else
+ fputc(str[i], ctxt->output);
+ fprintf(ctxt->output, "...");
+}
+
+static void
+xmlCtxtDumpDtdNode(xmlDebugCtxtPtr ctxt, xmlDtdPtr dtd)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (dtd == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "DTD node is NULL\n");
+ return;
+ }
+
+ if (dtd->type != XML_DTD_NODE) {
+ xmlDebugErr(ctxt, XML_CHECK_NOT_DTD,
+ "Node is not a DTD");
+ return;
+ }
+ if (!ctxt->check) {
+ if (dtd->name != NULL)
+ fprintf(ctxt->output, "DTD(%s)", (char *) dtd->name);
+ else
+ fprintf(ctxt->output, "DTD");
+ if (dtd->ExternalID != NULL)
+ fprintf(ctxt->output, ", PUBLIC %s", (char *) dtd->ExternalID);
+ if (dtd->SystemID != NULL)
+ fprintf(ctxt->output, ", SYSTEM %s", (char *) dtd->SystemID);
+ fprintf(ctxt->output, "\n");
+ }
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, (xmlNodePtr) dtd);
+}
+
+static void
+xmlCtxtDumpAttrDecl(xmlDebugCtxtPtr ctxt, xmlAttributePtr attr)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (attr == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Attribute declaration is NULL\n");
+ return;
+ }
+ if (attr->type != XML_ATTRIBUTE_DECL) {
+ xmlDebugErr(ctxt, XML_CHECK_NOT_ATTR_DECL,
+ "Node is not an attribute declaration");
+ return;
+ }
+ if (attr->name != NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "ATTRDECL(%s)", (char *) attr->name);
+ } else
+ xmlDebugErr(ctxt, XML_CHECK_NO_NAME,
+ "Node attribute declaration has no name");
+ if (attr->elem != NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, " for %s", (char *) attr->elem);
+ } else
+ xmlDebugErr(ctxt, XML_CHECK_NO_ELEM,
+ "Node attribute declaration has no element name");
+ if (!ctxt->check) {
+ switch (attr->atype) {
+ case XML_ATTRIBUTE_CDATA:
+ fprintf(ctxt->output, " CDATA");
+ break;
+ case XML_ATTRIBUTE_ID:
+ fprintf(ctxt->output, " ID");
+ break;
+ case XML_ATTRIBUTE_IDREF:
+ fprintf(ctxt->output, " IDREF");
+ break;
+ case XML_ATTRIBUTE_IDREFS:
+ fprintf(ctxt->output, " IDREFS");
+ break;
+ case XML_ATTRIBUTE_ENTITY:
+ fprintf(ctxt->output, " ENTITY");
+ break;
+ case XML_ATTRIBUTE_ENTITIES:
+ fprintf(ctxt->output, " ENTITIES");
+ break;
+ case XML_ATTRIBUTE_NMTOKEN:
+ fprintf(ctxt->output, " NMTOKEN");
+ break;
+ case XML_ATTRIBUTE_NMTOKENS:
+ fprintf(ctxt->output, " NMTOKENS");
+ break;
+ case XML_ATTRIBUTE_ENUMERATION:
+ fprintf(ctxt->output, " ENUMERATION");
+ break;
+ case XML_ATTRIBUTE_NOTATION:
+ fprintf(ctxt->output, " NOTATION ");
+ break;
+ }
+ if (attr->tree != NULL) {
+ int indx;
+ xmlEnumerationPtr cur = attr->tree;
+
+ for (indx = 0; indx < 5; indx++) {
+ if (indx != 0)
+ fprintf(ctxt->output, "|%s", (char *) cur->name);
+ else
+ fprintf(ctxt->output, " (%s", (char *) cur->name);
+ cur = cur->next;
+ if (cur == NULL)
+ break;
+ }
+ if (cur == NULL)
+ fprintf(ctxt->output, ")");
+ else
+ fprintf(ctxt->output, "...)");
+ }
+ switch (attr->def) {
+ case XML_ATTRIBUTE_NONE:
+ break;
+ case XML_ATTRIBUTE_REQUIRED:
+ fprintf(ctxt->output, " REQUIRED");
+ break;
+ case XML_ATTRIBUTE_IMPLIED:
+ fprintf(ctxt->output, " IMPLIED");
+ break;
+ case XML_ATTRIBUTE_FIXED:
+ fprintf(ctxt->output, " FIXED");
+ break;
+ }
+ if (attr->defaultValue != NULL) {
+ fprintf(ctxt->output, "\"");
+ xmlCtxtDumpString(ctxt, attr->defaultValue);
+ fprintf(ctxt->output, "\"");
+ }
+ fprintf(ctxt->output, "\n");
+ }
+
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, (xmlNodePtr) attr);
+}
+
+static void
+xmlCtxtDumpElemDecl(xmlDebugCtxtPtr ctxt, xmlElementPtr elem)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (elem == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Element declaration is NULL\n");
+ return;
+ }
+ if (elem->type != XML_ELEMENT_DECL) {
+ xmlDebugErr(ctxt, XML_CHECK_NOT_ELEM_DECL,
+ "Node is not an element declaration");
+ return;
+ }
+ if (elem->name != NULL) {
+ if (!ctxt->check) {
+ fprintf(ctxt->output, "ELEMDECL(");
+ xmlCtxtDumpString(ctxt, elem->name);
+ fprintf(ctxt->output, ")");
+ }
+ } else
+ xmlDebugErr(ctxt, XML_CHECK_NO_NAME,
+ "Element declaration has no name");
+ if (!ctxt->check) {
+ switch (elem->etype) {
+ case XML_ELEMENT_TYPE_UNDEFINED:
+ fprintf(ctxt->output, ", UNDEFINED");
+ break;
+ case XML_ELEMENT_TYPE_EMPTY:
+ fprintf(ctxt->output, ", EMPTY");
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ fprintf(ctxt->output, ", ANY");
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+ fprintf(ctxt->output, ", MIXED ");
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ fprintf(ctxt->output, ", MIXED ");
+ break;
+ }
+ if ((elem->type != XML_ELEMENT_NODE) && (elem->content != NULL)) {
+ char buf[5001];
+
+ buf[0] = 0;
+ xmlSnprintfElementContent(buf, 5000, elem->content, 1);
+ buf[5000] = 0;
+ fprintf(ctxt->output, "%s", buf);
+ }
+ fprintf(ctxt->output, "\n");
+ }
+
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, (xmlNodePtr) elem);
+}
+
+static void
+xmlCtxtDumpEntityDecl(xmlDebugCtxtPtr ctxt, xmlEntityPtr ent)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (ent == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Entity declaration is NULL\n");
+ return;
+ }
+ if (ent->type != XML_ENTITY_DECL) {
+ xmlDebugErr(ctxt, XML_CHECK_NOT_ENTITY_DECL,
+ "Node is not an entity declaration");
+ return;
+ }
+ if (ent->name != NULL) {
+ if (!ctxt->check) {
+ fprintf(ctxt->output, "ENTITYDECL(");
+ xmlCtxtDumpString(ctxt, ent->name);
+ fprintf(ctxt->output, ")");
+ }
+ } else
+ xmlDebugErr(ctxt, XML_CHECK_NO_NAME,
+ "Entity declaration has no name");
+ if (!ctxt->check) {
+ switch (ent->etype) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ fprintf(ctxt->output, ", internal\n");
+ break;
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ fprintf(ctxt->output, ", external parsed\n");
+ break;
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ fprintf(ctxt->output, ", unparsed\n");
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, ", parameter\n");
+ break;
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, ", external parameter\n");
+ break;
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ fprintf(ctxt->output, ", predefined\n");
+ break;
+ }
+ if (ent->ExternalID) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, " ExternalID=%s\n",
+ (char *) ent->ExternalID);
+ }
+ if (ent->SystemID) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, " SystemID=%s\n",
+ (char *) ent->SystemID);
+ }
+ if (ent->URI != NULL) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, " URI=%s\n", (char *) ent->URI);
+ }
+ if (ent->content) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, " content=");
+ xmlCtxtDumpString(ctxt, ent->content);
+ fprintf(ctxt->output, "\n");
+ }
+ }
+
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, (xmlNodePtr) ent);
+}
+
+static void
+xmlCtxtDumpNamespace(xmlDebugCtxtPtr ctxt, xmlNsPtr ns)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (ns == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "namespace node is NULL\n");
+ return;
+ }
+ if (ns->type != XML_NAMESPACE_DECL) {
+ xmlDebugErr(ctxt, XML_CHECK_NOT_NS_DECL,
+ "Node is not a namespace declaration");
+ return;
+ }
+ if (ns->href == NULL) {
+ if (ns->prefix != NULL)
+ xmlDebugErr3(ctxt, XML_CHECK_NO_HREF,
+ "Incomplete namespace %s href=NULL\n",
+ (char *) ns->prefix);
+ else
+ xmlDebugErr(ctxt, XML_CHECK_NO_HREF,
+ "Incomplete default namespace href=NULL\n");
+ } else {
+ if (!ctxt->check) {
+ if (ns->prefix != NULL)
+ fprintf(ctxt->output, "namespace %s href=",
+ (char *) ns->prefix);
+ else
+ fprintf(ctxt->output, "default namespace href=");
+
+ xmlCtxtDumpString(ctxt, ns->href);
+ fprintf(ctxt->output, "\n");
+ }
+ }
+}
+
+static void
+xmlCtxtDumpNamespaceList(xmlDebugCtxtPtr ctxt, xmlNsPtr ns)
+{
+ while (ns != NULL) {
+ xmlCtxtDumpNamespace(ctxt, ns);
+ ns = ns->next;
+ }
+}
+
+static void
+xmlCtxtDumpEntity(xmlDebugCtxtPtr ctxt, xmlEntityPtr ent)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (ent == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Entity is NULL\n");
+ return;
+ }
+ if (!ctxt->check) {
+ switch (ent->etype) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ fprintf(ctxt->output, "INTERNAL_GENERAL_ENTITY ");
+ break;
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL_GENERAL_PARSED_ENTITY ");
+ break;
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL_GENERAL_UNPARSED_ENTITY ");
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, "INTERNAL_PARAMETER_ENTITY ");
+ break;
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL_PARAMETER_ENTITY ");
+ break;
+ default:
+ fprintf(ctxt->output, "ENTITY_%d ! ", (int) ent->etype);
+ }
+ fprintf(ctxt->output, "%s\n", ent->name);
+ if (ent->ExternalID) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "ExternalID=%s\n",
+ (char *) ent->ExternalID);
+ }
+ if (ent->SystemID) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "SystemID=%s\n", (char *) ent->SystemID);
+ }
+ if (ent->URI) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "URI=%s\n", (char *) ent->URI);
+ }
+ if (ent->content) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "content=");
+ xmlCtxtDumpString(ctxt, ent->content);
+ fprintf(ctxt->output, "\n");
+ }
+ }
+}
+
+/**
+ * xmlCtxtDumpAttr:
+ * @output: the FILE * for the output
+ * @attr: the attribute
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the attribute
+ */
+static void
+xmlCtxtDumpAttr(xmlDebugCtxtPtr ctxt, xmlAttrPtr attr)
+{
+ xmlCtxtDumpSpaces(ctxt);
+
+ if (attr == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Attr is NULL");
+ return;
+ }
+ if (!ctxt->check) {
+ fprintf(ctxt->output, "ATTRIBUTE ");
+ xmlCtxtDumpString(ctxt, attr->name);
+ fprintf(ctxt->output, "\n");
+ if (attr->children != NULL) {
+ ctxt->depth++;
+ xmlCtxtDumpNodeList(ctxt, attr->children);
+ ctxt->depth--;
+ }
+ }
+ if (attr->name == NULL)
+ xmlDebugErr(ctxt, XML_CHECK_NO_NAME,
+ "Attribute has no name");
+
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, (xmlNodePtr) attr);
+}
+
+/**
+ * xmlCtxtDumpAttrList:
+ * @output: the FILE * for the output
+ * @attr: the attribute list
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the attribute list
+ */
+static void
+xmlCtxtDumpAttrList(xmlDebugCtxtPtr ctxt, xmlAttrPtr attr)
+{
+ while (attr != NULL) {
+ xmlCtxtDumpAttr(ctxt, attr);
+ attr = attr->next;
+ }
+}
+
+/**
+ * xmlCtxtDumpOneNode:
+ * @output: the FILE * for the output
+ * @node: the node
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the element node, it is not recursive
+ */
+static void
+xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
+{
+ if (node == NULL) {
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "node is NULL\n");
+ }
+ return;
+ }
+ ctxt->node = node;
+
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "ELEMENT ");
+ if ((node->ns != NULL) && (node->ns->prefix != NULL)) {
+ xmlCtxtDumpString(ctxt, node->ns->prefix);
+ fprintf(ctxt->output, ":");
+ }
+ xmlCtxtDumpString(ctxt, node->name);
+ fprintf(ctxt->output, "\n");
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:
+ if (!ctxt->check)
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "Error, ATTRIBUTE found here\n");
+ xmlCtxtGenericNodeCheck(ctxt, node);
+ return;
+ case XML_TEXT_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ if (node->name == (const xmlChar *) xmlStringTextNoenc)
+ fprintf(ctxt->output, "TEXT no enc");
+ else
+ fprintf(ctxt->output, "TEXT");
+ if (ctxt->options & DUMP_TEXT_TYPE) {
+ if (node->content == (xmlChar *) &(node->properties))
+ fprintf(ctxt->output, " compact\n");
+ else if (xmlDictOwns(ctxt->dict, node->content) == 1)
+ fprintf(ctxt->output, " interned\n");
+ else
+ fprintf(ctxt->output, "\n");
+ } else
+ fprintf(ctxt->output, "\n");
+ }
+ break;
+ case XML_CDATA_SECTION_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "CDATA_SECTION\n");
+ }
+ break;
+ case XML_ENTITY_REF_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "ENTITY_REF(%s)\n",
+ (char *) node->name);
+ }
+ break;
+ case XML_ENTITY_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "ENTITY\n");
+ }
+ break;
+ case XML_PI_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "PI %s\n", (char *) node->name);
+ }
+ break;
+ case XML_COMMENT_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "COMMENT\n");
+ }
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ }
+ fprintf(ctxt->output, "Error, DOCUMENT found here\n");
+ xmlCtxtGenericNodeCheck(ctxt, node);
+ return;
+ case XML_DOCUMENT_TYPE_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "DOCUMENT_TYPE\n");
+ }
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "DOCUMENT_FRAG\n");
+ }
+ break;
+ case XML_NOTATION_NODE:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "NOTATION\n");
+ }
+ break;
+ case XML_DTD_NODE:
+ xmlCtxtDumpDtdNode(ctxt, (xmlDtdPtr) node);
+ return;
+ case XML_ELEMENT_DECL:
+ xmlCtxtDumpElemDecl(ctxt, (xmlElementPtr) node);
+ return;
+ case XML_ATTRIBUTE_DECL:
+ xmlCtxtDumpAttrDecl(ctxt, (xmlAttributePtr) node);
+ return;
+ case XML_ENTITY_DECL:
+ xmlCtxtDumpEntityDecl(ctxt, (xmlEntityPtr) node);
+ return;
+ case XML_NAMESPACE_DECL:
+ xmlCtxtDumpNamespace(ctxt, (xmlNsPtr) node);
+ return;
+ case XML_XINCLUDE_START:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "INCLUDE START\n");
+ }
+ return;
+ case XML_XINCLUDE_END:
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "INCLUDE END\n");
+ }
+ return;
+ default:
+ if (!ctxt->check)
+ xmlCtxtDumpSpaces(ctxt);
+ xmlDebugErr2(ctxt, XML_CHECK_UNKNOWN_NODE,
+ "Unknown node type %d\n", node->type);
+ return;
+ }
+ if (node->doc == NULL) {
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ }
+ fprintf(ctxt->output, "PBM: doc == NULL !!!\n");
+ }
+ ctxt->depth++;
+ if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL))
+ xmlCtxtDumpNamespaceList(ctxt, node->nsDef);
+ if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL))
+ xmlCtxtDumpAttrList(ctxt, node->properties);
+ if (node->type != XML_ENTITY_REF_NODE) {
+ if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) {
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "content=");
+ xmlCtxtDumpString(ctxt, node->content);
+ fprintf(ctxt->output, "\n");
+ }
+ }
+ } else {
+ xmlEntityPtr ent;
+
+ ent = xmlGetDocEntity(node->doc, node->name);
+ if (ent != NULL)
+ xmlCtxtDumpEntity(ctxt, ent);
+ }
+ ctxt->depth--;
+
+ /*
+ * Do a bit of checking
+ */
+ xmlCtxtGenericNodeCheck(ctxt, node);
+}
+
+/**
+ * xmlCtxtDumpNode:
+ * @output: the FILE * for the output
+ * @node: the node
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the element node, it is recursive
+ */
+static void
+xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
+{
+ if (node == NULL) {
+ if (!ctxt->check) {
+ xmlCtxtDumpSpaces(ctxt);
+ fprintf(ctxt->output, "node is NULL\n");
+ }
+ return;
+ }
+ xmlCtxtDumpOneNode(ctxt, node);
+ if ((node->type != XML_NAMESPACE_DECL) &&
+ (node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
+ ctxt->depth++;
+ xmlCtxtDumpNodeList(ctxt, node->children);
+ ctxt->depth--;
+ }
+}
+
+/**
+ * xmlCtxtDumpNodeList:
+ * @output: the FILE * for the output
+ * @node: the node list
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the list of element node, it is recursive
+ */
+static void
+xmlCtxtDumpNodeList(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
+{
+ while (node != NULL) {
+ xmlCtxtDumpNode(ctxt, node);
+ node = node->next;
+ }
+}
+
+static void
+xmlCtxtDumpDocHead(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
+{
+ if (doc == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "DOCUMENT == NULL !\n");
+ return;
+ }
+ ctxt->node = (xmlNodePtr) doc;
+
+ switch (doc->type) {
+ case XML_ELEMENT_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_ELEMENT,
+ "Misplaced ELEMENT node\n");
+ break;
+ case XML_ATTRIBUTE_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_ATTRIBUTE,
+ "Misplaced ATTRIBUTE node\n");
+ break;
+ case XML_TEXT_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_TEXT,
+ "Misplaced TEXT node\n");
+ break;
+ case XML_CDATA_SECTION_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_CDATA,
+ "Misplaced CDATA node\n");
+ break;
+ case XML_ENTITY_REF_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_ENTITYREF,
+ "Misplaced ENTITYREF node\n");
+ break;
+ case XML_ENTITY_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_ENTITY,
+ "Misplaced ENTITY node\n");
+ break;
+ case XML_PI_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_PI,
+ "Misplaced PI node\n");
+ break;
+ case XML_COMMENT_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_COMMENT,
+ "Misplaced COMMENT node\n");
+ break;
+ case XML_DOCUMENT_NODE:
+ if (!ctxt->check)
+ fprintf(ctxt->output, "DOCUMENT\n");
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ if (!ctxt->check)
+ fprintf(ctxt->output, "HTML DOCUMENT\n");
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_DOCTYPE,
+ "Misplaced DOCTYPE node\n");
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_FRAGMENT,
+ "Misplaced FRAGMENT node\n");
+ break;
+ case XML_NOTATION_NODE:
+ xmlDebugErr(ctxt, XML_CHECK_FOUND_NOTATION,
+ "Misplaced NOTATION node\n");
+ break;
+ default:
+ xmlDebugErr2(ctxt, XML_CHECK_UNKNOWN_NODE,
+ "Unknown node type %d\n", doc->type);
+ }
+}
+
+/**
+ * xmlCtxtDumpDocumentHead:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information cncerning the document, not recursive
+ */
+static void
+xmlCtxtDumpDocumentHead(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
+{
+ if (doc == NULL) return;
+ xmlCtxtDumpDocHead(ctxt, doc);
+ if (!ctxt->check) {
+ if (doc->name != NULL) {
+ fprintf(ctxt->output, "name=");
+ xmlCtxtDumpString(ctxt, BAD_CAST doc->name);
+ fprintf(ctxt->output, "\n");
+ }
+ if (doc->version != NULL) {
+ fprintf(ctxt->output, "version=");
+ xmlCtxtDumpString(ctxt, doc->version);
+ fprintf(ctxt->output, "\n");
+ }
+ if (doc->encoding != NULL) {
+ fprintf(ctxt->output, "encoding=");
+ xmlCtxtDumpString(ctxt, doc->encoding);
+ fprintf(ctxt->output, "\n");
+ }
+ if (doc->URL != NULL) {
+ fprintf(ctxt->output, "URL=");
+ xmlCtxtDumpString(ctxt, doc->URL);
+ fprintf(ctxt->output, "\n");
+ }
+ if (doc->standalone)
+ fprintf(ctxt->output, "standalone=true\n");
+ }
+ if (doc->oldNs != NULL)
+ xmlCtxtDumpNamespaceList(ctxt, doc->oldNs);
+}
+
+/**
+ * xmlCtxtDumpDocument:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information for the document, it's recursive
+ */
+static void
+xmlCtxtDumpDocument(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
+{
+ if (doc == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "DOCUMENT == NULL !\n");
+ return;
+ }
+ xmlCtxtDumpDocumentHead(ctxt, doc);
+ if (((doc->type == XML_DOCUMENT_NODE) ||
+ (doc->type == XML_HTML_DOCUMENT_NODE))
+ && (doc->children != NULL)) {
+ ctxt->depth++;
+ xmlCtxtDumpNodeList(ctxt, doc->children);
+ ctxt->depth--;
+ }
+}
+
+static void
+xmlCtxtDumpEntityCallback(xmlEntityPtr cur, xmlDebugCtxtPtr ctxt)
+{
+ if (cur == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Entity is NULL");
+ return;
+ }
+ if (!ctxt->check) {
+ fprintf(ctxt->output, "%s : ", (char *) cur->name);
+ switch (cur->etype) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ fprintf(ctxt->output, "INTERNAL GENERAL, ");
+ break;
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL PARSED, ");
+ break;
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL UNPARSED, ");
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, "INTERNAL PARAMETER, ");
+ break;
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ fprintf(ctxt->output, "EXTERNAL PARAMETER, ");
+ break;
+ default:
+ xmlDebugErr2(ctxt, XML_CHECK_ENTITY_TYPE,
+ "Unknown entity type %d\n", cur->etype);
+ }
+ if (cur->ExternalID != NULL)
+ fprintf(ctxt->output, "ID \"%s\"", (char *) cur->ExternalID);
+ if (cur->SystemID != NULL)
+ fprintf(ctxt->output, "SYSTEM \"%s\"", (char *) cur->SystemID);
+ if (cur->orig != NULL)
+ fprintf(ctxt->output, "\n orig \"%s\"", (char *) cur->orig);
+ if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL))
+ fprintf(ctxt->output, "\n content \"%s\"",
+ (char *) cur->content);
+ fprintf(ctxt->output, "\n");
+ }
+}
+
+/**
+ * xmlCtxtDumpEntities:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information for all the entities in use by the document
+ */
+static void
+xmlCtxtDumpEntities(xmlDebugCtxtPtr ctxt, xmlDocPtr doc)
+{
+ if (doc == NULL) return;
+ xmlCtxtDumpDocHead(ctxt, doc);
+ if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) {
+ xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
+ doc->intSubset->entities;
+
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Entities in internal subset\n");
+ xmlHashScan(table, (xmlHashScanner) xmlCtxtDumpEntityCallback,
+ ctxt);
+ } else
+ fprintf(ctxt->output, "No entities in internal subset\n");
+ if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) {
+ xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
+ doc->extSubset->entities;
+
+ if (!ctxt->check)
+ fprintf(ctxt->output, "Entities in external subset\n");
+ xmlHashScan(table, (xmlHashScanner) xmlCtxtDumpEntityCallback,
+ ctxt);
+ } else if (!ctxt->check)
+ fprintf(ctxt->output, "No entities in external subset\n");
+}
+
+/**
+ * xmlCtxtDumpDTD:
+ * @output: the FILE * for the output
+ * @dtd: the DTD
+ *
+ * Dumps debug information for the DTD
+ */
+static void
+xmlCtxtDumpDTD(xmlDebugCtxtPtr ctxt, xmlDtdPtr dtd)
+{
+ if (dtd == NULL) {
+ if (!ctxt->check)
+ fprintf(ctxt->output, "DTD is NULL\n");
+ return;
+ }
+ xmlCtxtDumpDtdNode(ctxt, dtd);
+ if (dtd->children == NULL)
+ fprintf(ctxt->output, " DTD is empty\n");
+ else {
+ ctxt->depth++;
+ xmlCtxtDumpNodeList(ctxt, dtd->children);
+ ctxt->depth--;
+ }
+}
+
+/************************************************************************
+ * *
+ * Public entry points for dump *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlDebugDumpString:
+ * @output: the FILE * for the output
+ * @str: the string
+ *
+ * Dumps informations about the string, shorten it if necessary
+ */
+void
+xmlDebugDumpString(FILE * output, const xmlChar * str)
+{
+ int i;
+
+ if (output == NULL)
+ output = stdout;
+ if (str == NULL) {
+ fprintf(output, "(NULL)");
+ return;
+ }
+ for (i = 0; i < 40; i++)
+ if (str[i] == 0)
+ return;
+ else if (IS_BLANK_CH(str[i]))
+ fputc(' ', output);
+ else if (str[i] >= 0x80)
+ fprintf(output, "#%X", str[i]);
+ else
+ fputc(str[i], output);
+ fprintf(output, "...");
+}
+
+/**
+ * xmlDebugDumpAttr:
+ * @output: the FILE * for the output
+ * @attr: the attribute
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the attribute
+ */
+void
+xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) {
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL) return;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.depth = depth;
+ xmlCtxtDumpAttr(&ctxt, attr);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+
+/**
+ * xmlDebugDumpEntities:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information for all the entities in use by the document
+ */
+void
+xmlDebugDumpEntities(FILE * output, xmlDocPtr doc)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL) return;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ xmlCtxtDumpEntities(&ctxt, doc);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpAttrList:
+ * @output: the FILE * for the output
+ * @attr: the attribute list
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the attribute list
+ */
+void
+xmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL) return;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.depth = depth;
+ xmlCtxtDumpAttrList(&ctxt, attr);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpOneNode:
+ * @output: the FILE * for the output
+ * @node: the node
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the element node, it is not recursive
+ */
+void
+xmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL) return;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.depth = depth;
+ xmlCtxtDumpOneNode(&ctxt, node);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpNode:
+ * @output: the FILE * for the output
+ * @node: the node
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the element node, it is recursive
+ */
+void
+xmlDebugDumpNode(FILE * output, xmlNodePtr node, int depth)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.depth = depth;
+ xmlCtxtDumpNode(&ctxt, node);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpNodeList:
+ * @output: the FILE * for the output
+ * @node: the node list
+ * @depth: the indentation level.
+ *
+ * Dumps debug information for the list of element node, it is recursive
+ */
+void
+xmlDebugDumpNodeList(FILE * output, xmlNodePtr node, int depth)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.depth = depth;
+ xmlCtxtDumpNodeList(&ctxt, node);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpDocumentHead:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information cncerning the document, not recursive
+ */
+void
+xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
+ ctxt.output = output;
+ xmlCtxtDumpDocumentHead(&ctxt, doc);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpDocument:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Dumps debug information for the document, it's recursive
+ */
+void
+xmlDebugDumpDocument(FILE * output, xmlDocPtr doc)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
+ ctxt.output = output;
+ xmlCtxtDumpDocument(&ctxt, doc);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/**
+ * xmlDebugDumpDTD:
+ * @output: the FILE * for the output
+ * @dtd: the DTD
+ *
+ * Dumps debug information for the DTD
+ */
+void
+xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.options |= DUMP_TEXT_TYPE;
+ ctxt.output = output;
+ xmlCtxtDumpDTD(&ctxt, dtd);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+}
+
+/************************************************************************
+ * *
+ * Public entry points for checkings *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlDebugCheckDocument:
+ * @output: the FILE * for the output
+ * @doc: the document
+ *
+ * Check the document for potential content problems, and output
+ * the errors to @output
+ *
+ * Returns the number of errors found
+ */
+int
+xmlDebugCheckDocument(FILE * output, xmlDocPtr doc)
+{
+ xmlDebugCtxt ctxt;
+
+ if (output == NULL)
+ output = stdout;
+ xmlCtxtDumpInitCtxt(&ctxt);
+ ctxt.output = output;
+ ctxt.check = 1;
+ xmlCtxtDumpDocument(&ctxt, doc);
+ xmlCtxtDumpCleanCtxt(&ctxt);
+ return(ctxt.errors);
+}
+
+/************************************************************************
+ * *
+ * Helpers for Shell *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlLsCountNode:
+ * @node: the node to count
+ *
+ * Count the children of @node.
+ *
+ * Returns the number of children of @node.
+ */
+int
+xmlLsCountNode(xmlNodePtr node) {
+ int ret = 0;
+ xmlNodePtr list = NULL;
+
+ if (node == NULL)
+ return(0);
+
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ list = node->children;
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ list = ((xmlDocPtr) node)->children;
+ break;
+ case XML_ATTRIBUTE_NODE:
+ list = ((xmlAttrPtr) node)->children;
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ if (node->content != NULL) {
+ ret = xmlStrlen(node->content);
+ }
+ break;
+ case XML_ENTITY_REF_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ ret = 1;
+ break;
+ }
+ for (;list != NULL;ret++)
+ list = list->next;
+ return(ret);
+}
+
+/**
+ * xmlLsOneNode:
+ * @output: the FILE * for the output
+ * @node: the node to dump
+ *
+ * Dump to @output the type and name of @node.
+ */
+void
+xmlLsOneNode(FILE *output, xmlNodePtr node) {
+ if (output == NULL) return;
+ if (node == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ fprintf(output, "-");
+ break;
+ case XML_ATTRIBUTE_NODE:
+ fprintf(output, "a");
+ break;
+ case XML_TEXT_NODE:
+ fprintf(output, "t");
+ break;
+ case XML_CDATA_SECTION_NODE:
+ fprintf(output, "C");
+ break;
+ case XML_ENTITY_REF_NODE:
+ fprintf(output, "e");
+ break;
+ case XML_ENTITY_NODE:
+ fprintf(output, "E");
+ break;
+ case XML_PI_NODE:
+ fprintf(output, "p");
+ break;
+ case XML_COMMENT_NODE:
+ fprintf(output, "c");
+ break;
+ case XML_DOCUMENT_NODE:
+ fprintf(output, "d");
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ fprintf(output, "h");
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ fprintf(output, "T");
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ fprintf(output, "F");
+ break;
+ case XML_NOTATION_NODE:
+ fprintf(output, "N");
+ break;
+ case XML_NAMESPACE_DECL:
+ fprintf(output, "n");
+ break;
+ default:
+ fprintf(output, "?");
+ }
+ if (node->type != XML_NAMESPACE_DECL) {
+ if (node->properties != NULL)
+ fprintf(output, "a");
+ else
+ fprintf(output, "-");
+ if (node->nsDef != NULL)
+ fprintf(output, "n");
+ else
+ fprintf(output, "-");
+ }
+
+ fprintf(output, " %8d ", xmlLsCountNode(node));
+
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ if (node->name != NULL) {
+ if ((node->ns != NULL) && (node->ns->prefix != NULL))
+ fprintf(output, "%s:", node->ns->prefix);
+ fprintf(output, "%s", (const char *) node->name);
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:
+ if (node->name != NULL)
+ fprintf(output, "%s", (const char *) node->name);
+ break;
+ case XML_TEXT_NODE:
+ if (node->content != NULL) {
+ xmlDebugDumpString(output, node->content);
+ }
+ break;
+ case XML_CDATA_SECTION_NODE:
+ break;
+ case XML_ENTITY_REF_NODE:
+ if (node->name != NULL)
+ fprintf(output, "%s", (const char *) node->name);
+ break;
+ case XML_ENTITY_NODE:
+ if (node->name != NULL)
+ fprintf(output, "%s", (const char *) node->name);
+ break;
+ case XML_PI_NODE:
+ if (node->name != NULL)
+ fprintf(output, "%s", (const char *) node->name);
+ break;
+ case XML_COMMENT_NODE:
+ break;
+ case XML_DOCUMENT_NODE:
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ break;
+ case XML_NOTATION_NODE:
+ break;
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) node;
+
+ if (ns->prefix == NULL)
+ fprintf(output, "default -> %s", (char *)ns->href);
+ else
+ fprintf(output, "%s -> %s", (char *)ns->prefix,
+ (char *)ns->href);
+ break;
+ }
+ default:
+ if (node->name != NULL)
+ fprintf(output, "%s", (const char *) node->name);
+ }
+ fprintf(output, "\n");
+}
+
+/**
+ * xmlBoolToText:
+ * @boolval: a bool to turn into text
+ *
+ * Convenient way to turn bool into text
+ *
+ * Returns a pointer to either "True" or "False"
+ */
+const char *
+xmlBoolToText(int boolval)
+{
+ if (boolval)
+ return("True");
+ else
+ return("False");
+}
+
+#ifdef LIBXML_XPATH_ENABLED
+/****************************************************************
+ * *
+ * The XML shell related functions *
+ * *
+ ****************************************************************/
+
+
+
+/*
+ * TODO: Improvement/cleanups for the XML shell
+ * - allow to shell out an editor on a subpart
+ * - cleanup function registrations (with help) and calling
+ * - provide registration routines
+ */
+
+/**
+ * xmlShellPrintXPathError:
+ * @errorType: valid xpath error id
+ * @arg: the argument that cause xpath to fail
+ *
+ * Print the xpath error to libxml default error channel
+ */
+void
+xmlShellPrintXPathError(int errorType, const char *arg)
+{
+ const char *default_arg = "Result";
+
+ if (!arg)
+ arg = default_arg;
+
+ switch (errorType) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n", arg);
+ break;
+ }
+#if 0
+ xmlGenericError(xmlGenericErrorContext,
+ "Try casting the result string function (xpath builtin)\n",
+ arg);
+#endif
+}
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlShellPrintNodeCtxt:
+ * @ctxt : a non-null shell context
+ * @node : a non-null node to print to the output FILE
+ *
+ * Print node to the output FILE
+ */
+static void
+xmlShellPrintNodeCtxt(xmlShellCtxtPtr ctxt,xmlNodePtr node)
+{
+ FILE *fp;
+
+ if (!node)
+ return;
+ if (ctxt == NULL)
+ fp = stdout;
+ else
+ fp = ctxt->output;
+
+ if (node->type == XML_DOCUMENT_NODE)
+ xmlDocDump(fp, (xmlDocPtr) node);
+ else if (node->type == XML_ATTRIBUTE_NODE)
+ xmlDebugDumpAttrList(fp, (xmlAttrPtr) node, 0);
+ else
+ xmlElemDump(fp, node->doc, node);
+
+ fprintf(fp, "\n");
+}
+
+/**
+ * xmlShellPrintNode:
+ * @node : a non-null node to print to the output FILE
+ *
+ * Print node to the output FILE
+ */
+void
+xmlShellPrintNode(xmlNodePtr node)
+{
+ xmlShellPrintNodeCtxt(NULL, node);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlShellPrintXPathResultCtxt:
+ * @ctxt: a valid shell context
+ * @list: a valid result generated by an xpath evaluation
+ *
+ * Prints result to the output FILE
+ */
+static void
+xmlShellPrintXPathResultCtxt(xmlShellCtxtPtr ctxt,xmlXPathObjectPtr list)
+{
+ if (!ctxt)
+ return;
+
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_NODESET:{
+#ifdef LIBXML_OUTPUT_ENABLED
+ int indx;
+
+ if (list->nodesetval) {
+ for (indx = 0; indx < list->nodesetval->nodeNr;
+ indx++) {
+ xmlShellPrintNodeCtxt(ctxt,
+ list->nodesetval->nodeTab[indx]);
+ }
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Empty node set\n");
+ }
+ break;
+#else
+ xmlGenericError(xmlGenericErrorContext,
+ "Node set\n");
+#endif /* LIBXML_OUTPUT_ENABLED */
+ }
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "Is a Boolean:%s\n",
+ xmlBoolToText(list->boolval));
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "Is a number:%0g\n", list->floatval);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "Is a string:%s\n", list->stringval);
+ break;
+
+ default:
+ xmlShellPrintXPathError(list->type, NULL);
+ }
+ }
+}
+
+/**
+ * xmlShellPrintXPathResult:
+ * @list: a valid result generated by an xpath evaluation
+ *
+ * Prints result to the output FILE
+ */
+void
+xmlShellPrintXPathResult(xmlXPathObjectPtr list)
+{
+ xmlShellPrintXPathResultCtxt(NULL, list);
+}
+
+/**
+ * xmlShellList:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "ls"
+ * Does an Unix like listing of the given node (like a directory)
+ *
+ * Returns 0
+ */
+int
+xmlShellList(xmlShellCtxtPtr ctxt,
+ char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlNodePtr cur;
+ if (!ctxt)
+ return (0);
+ if (node == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE)) {
+ cur = ((xmlDocPtr) node)->children;
+ } else if (node->type == XML_NAMESPACE_DECL) {
+ xmlLsOneNode(ctxt->output, node);
+ return (0);
+ } else if (node->children != NULL) {
+ cur = node->children;
+ } else {
+ xmlLsOneNode(ctxt->output, node);
+ return (0);
+ }
+ while (cur != NULL) {
+ xmlLsOneNode(ctxt->output, cur);
+ cur = cur->next;
+ }
+ return (0);
+}
+
+/**
+ * xmlShellBase:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "base"
+ * dumps the current XML base of the node
+ *
+ * Returns 0
+ */
+int
+xmlShellBase(xmlShellCtxtPtr ctxt,
+ char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlChar *base;
+ if (!ctxt)
+ return 0;
+ if (node == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+
+ base = xmlNodeGetBase(node->doc, node);
+
+ if (base == NULL) {
+ fprintf(ctxt->output, " No base found !!!\n");
+ } else {
+ fprintf(ctxt->output, "%s\n", base);
+ xmlFree(base);
+ }
+ return (0);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlShellSetBase:
+ * @ctxt: the shell context
+ * @arg: the new base
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "setbase"
+ * change the current XML base of the node
+ *
+ * Returns 0
+ */
+static int
+xmlShellSetBase(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlNodeSetBase(node, (xmlChar*) arg);
+ return (0);
+}
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlShellRegisterNamespace:
+ * @ctxt: the shell context
+ * @arg: a string in prefix=nsuri format
+ * @node: unused
+ * @node2: unused
+ *
+ * Implements the XML shell function "setns"
+ * register/unregister a prefix=namespace pair
+ * on the XPath context
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+static int
+xmlShellRegisterNamespace(xmlShellCtxtPtr ctxt, char *arg,
+ xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlChar* nsListDup;
+ xmlChar* prefix;
+ xmlChar* href;
+ xmlChar* next;
+
+ nsListDup = xmlStrdup((xmlChar *) arg);
+ next = nsListDup;
+ while(next != NULL) {
+ /* skip spaces */
+ /*while((*next) == ' ') next++;*/
+ if((*next) == '\0') break;
+
+ /* find prefix */
+ prefix = next;
+ next = (xmlChar*)xmlStrchr(next, '=');
+ if(next == NULL) {
+ fprintf(ctxt->output, "setns: prefix=[nsuri] required\n");
+ xmlFree(nsListDup);
+ return(-1);
+ }
+ *(next++) = '\0';
+
+ /* find href */
+ href = next;
+ next = (xmlChar*)xmlStrchr(next, ' ');
+ if(next != NULL) {
+ *(next++) = '\0';
+ }
+
+ /* do register namespace */
+ if(xmlXPathRegisterNs(ctxt->pctxt, prefix, href) != 0) {
+ fprintf(ctxt->output,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", prefix, href);
+ xmlFree(nsListDup);
+ return(-1);
+ }
+ }
+
+ xmlFree(nsListDup);
+ return(0);
+}
+/**
+ * xmlShellRegisterRootNamespaces:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @node: the root element
+ * @node2: unused
+ *
+ * Implements the XML shell function "setrootns"
+ * which registers all namespaces declarations found on the root element.
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+static int
+xmlShellRegisterRootNamespaces(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
+ xmlNodePtr root, xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlNsPtr ns;
+
+ if ((root == NULL) || (root->type != XML_ELEMENT_NODE) ||
+ (root->nsDef == NULL) || (ctxt == NULL) || (ctxt->pctxt == NULL))
+ return(-1);
+ ns = root->nsDef;
+ while (ns != NULL) {
+ if (ns->prefix == NULL)
+ xmlXPathRegisterNs(ctxt->pctxt, BAD_CAST "defaultns", ns->href);
+ else
+ xmlXPathRegisterNs(ctxt->pctxt, ns->prefix, ns->href);
+ ns = ns->next;
+ }
+ return(0);
+}
+#endif
+
+/**
+ * xmlShellGrep:
+ * @ctxt: the shell context
+ * @arg: the string or regular expression to find
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "grep"
+ * dumps informations about the node (namespace, attributes, content).
+ *
+ * Returns 0
+ */
+static int
+xmlShellGrep(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ char *arg, xmlNodePtr node, xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ if (!ctxt)
+ return (0);
+ if (node == NULL)
+ return (0);
+ if (arg == NULL)
+ return (0);
+#ifdef LIBXML_REGEXP_ENABLED
+ if ((xmlStrchr((xmlChar *) arg, '?')) ||
+ (xmlStrchr((xmlChar *) arg, '*')) ||
+ (xmlStrchr((xmlChar *) arg, '.')) ||
+ (xmlStrchr((xmlChar *) arg, '['))) {
+ }
+#endif
+ while (node != NULL) {
+ if (node->type == XML_COMMENT_NODE) {
+ if (xmlStrstr(node->content, (xmlChar *) arg)) {
+
+ fprintf(ctxt->output, "%s : ", xmlGetNodePath(node));
+ xmlShellList(ctxt, NULL, node, NULL);
+ }
+ } else if (node->type == XML_TEXT_NODE) {
+ if (xmlStrstr(node->content, (xmlChar *) arg)) {
+
+ fprintf(ctxt->output, "%s : ", xmlGetNodePath(node->parent));
+ xmlShellList(ctxt, NULL, node->parent, NULL);
+ }
+ }
+
+ /*
+ * Browse the full subtree, deep first
+ */
+
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE)) {
+ node = ((xmlDocPtr) node)->children;
+ } else if ((node->children != NULL)
+ && (node->type != XML_ENTITY_REF_NODE)) {
+ /* deep first */
+ node = node->children;
+ } else if (node->next != NULL) {
+ /* then siblings */
+ node = node->next;
+ } else {
+ /* go up to parents->next if needed */
+ while (node != NULL) {
+ if (node->parent != NULL) {
+ node = node->parent;
+ }
+ if (node->next != NULL) {
+ node = node->next;
+ break;
+ }
+ if (node->parent == NULL) {
+ node = NULL;
+ break;
+ }
+ }
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlShellDir:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "dir"
+ * dumps informations about the node (namespace, attributes, content).
+ *
+ * Returns 0
+ */
+int
+xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ char *arg ATTRIBUTE_UNUSED, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ if (!ctxt)
+ return (0);
+ if (node == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE)) {
+ xmlDebugDumpDocumentHead(ctxt->output, (xmlDocPtr) node);
+ } else if (node->type == XML_ATTRIBUTE_NODE) {
+ xmlDebugDumpAttr(ctxt->output, (xmlAttrPtr) node, 0);
+ } else {
+ xmlDebugDumpOneNode(ctxt->output, node, 0);
+ }
+ return (0);
+}
+
+/**
+ * xmlShellSetContent:
+ * @ctxt: the shell context
+ * @value: the content as a string
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "dir"
+ * dumps informations about the node (namespace, attributes, content).
+ *
+ * Returns 0
+ */
+static int
+xmlShellSetContent(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ char *value, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlNodePtr results;
+ xmlParserErrors ret;
+
+ if (!ctxt)
+ return (0);
+ if (node == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+ if (value == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+
+ ret = xmlParseInNodeContext(node, value, strlen(value), 0, &results);
+ if (ret == XML_ERR_OK) {
+ if (node->children != NULL) {
+ xmlFreeNodeList(node->children);
+ node->children = NULL;
+ node->last = NULL;
+ }
+ xmlAddChildList(node, results);
+ } else {
+ fprintf(ctxt->output, "failed to parse content\n");
+ }
+ return (0);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+/**
+ * xmlShellRNGValidate:
+ * @ctxt: the shell context
+ * @schemas: the path to the Relax-NG schemas
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "relaxng"
+ * validating the instance against a Relax-NG schemas
+ *
+ * Returns 0
+ */
+static int
+xmlShellRNGValidate(xmlShellCtxtPtr sctxt, char *schemas,
+ xmlNodePtr node ATTRIBUTE_UNUSED,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlRelaxNGPtr relaxngschemas;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ xmlRelaxNGValidCtxtPtr vctxt;
+ int ret;
+
+ ctxt = xmlRelaxNGNewParserCtxt(schemas);
+ xmlRelaxNGSetParserErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ relaxngschemas = xmlRelaxNGParse(ctxt);
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ if (relaxngschemas == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Relax-NG schema %s failed to compile\n", schemas);
+ return(-1);
+ }
+ vctxt = xmlRelaxNGNewValidCtxt(relaxngschemas);
+ xmlRelaxNGSetValidErrors(vctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ ret = xmlRelaxNGValidateDoc(vctxt, sctxt->doc);
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", sctxt->filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", sctxt->filename);
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ sctxt->filename);
+ }
+ xmlRelaxNGFreeValidCtxt(vctxt);
+ if (relaxngschemas != NULL)
+ xmlRelaxNGFree(relaxngschemas);
+ return(0);
+}
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlShellCat:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "cat"
+ * dumps the serialization node content (XML or HTML).
+ *
+ * Returns 0
+ */
+int
+xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
+ xmlNodePtr node, xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ if (!ctxt)
+ return (0);
+ if (node == NULL) {
+ fprintf(ctxt->output, "NULL\n");
+ return (0);
+ }
+ if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) {
+#ifdef LIBXML_HTML_ENABLED
+ if (node->type == XML_HTML_DOCUMENT_NODE)
+ htmlDocDump(ctxt->output, (htmlDocPtr) node);
+ else
+ htmlNodeDumpFile(ctxt->output, ctxt->doc, node);
+#else
+ if (node->type == XML_DOCUMENT_NODE)
+ xmlDocDump(ctxt->output, (xmlDocPtr) node);
+ else
+ xmlElemDump(ctxt->output, ctxt->doc, node);
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ if (node->type == XML_DOCUMENT_NODE)
+ xmlDocDump(ctxt->output, (xmlDocPtr) node);
+ else
+ xmlElemDump(ctxt->output, ctxt->doc, node);
+ }
+ fprintf(ctxt->output, "\n");
+ return (0);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlShellLoad:
+ * @ctxt: the shell context
+ * @filename: the file name
+ * @node: unused
+ * @node2: unused
+ *
+ * Implements the XML shell function "load"
+ * loads a new document specified by the filename
+ *
+ * Returns 0 or -1 if loading failed
+ */
+int
+xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
+ xmlNodePtr node ATTRIBUTE_UNUSED,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlDocPtr doc;
+ int html = 0;
+
+ if ((ctxt == NULL) || (filename == NULL)) return(-1);
+ if (ctxt->doc != NULL)
+ html = (ctxt->doc->type == XML_HTML_DOCUMENT_NODE);
+
+ if (html) {
+#ifdef LIBXML_HTML_ENABLED
+ doc = htmlParseFile(filename, NULL);
+#else
+ fprintf(ctxt->output, "HTML support not compiled in\n");
+ doc = NULL;
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ doc = xmlReadFile(filename,NULL,0);
+ }
+ if (doc != NULL) {
+ if (ctxt->loaded == 1) {
+ xmlFreeDoc(ctxt->doc);
+ }
+ ctxt->loaded = 1;
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeContext(ctxt->pctxt);
+#endif /* LIBXML_XPATH_ENABLED */
+ xmlFree(ctxt->filename);
+ ctxt->doc = doc;
+ ctxt->node = (xmlNodePtr) doc;
+#ifdef LIBXML_XPATH_ENABLED
+ ctxt->pctxt = xmlXPathNewContext(doc);
+#endif /* LIBXML_XPATH_ENABLED */
+ ctxt->filename = (char *) xmlCanonicPath((xmlChar *) filename);
+ } else
+ return (-1);
+ return (0);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlShellWrite:
+ * @ctxt: the shell context
+ * @filename: the file name
+ * @node: a node in the tree
+ * @node2: unused
+ *
+ * Implements the XML shell function "write"
+ * Write the current node to the filename, it saves the serialization
+ * of the subtree under the @node specified
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlShellWrite(xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ if (node == NULL)
+ return (-1);
+ if ((filename == NULL) || (filename[0] == 0)) {
+ return (-1);
+ }
+#ifdef W_OK
+ if (access((char *) filename, W_OK)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot write to %s\n", filename);
+ return (-1);
+ }
+#endif
+ switch (node->type) {
+ case XML_DOCUMENT_NODE:
+ if (xmlSaveFile((char *) filename, ctxt->doc) < -1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to write to %s\n", filename);
+ return (-1);
+ }
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_HTML_ENABLED
+ if (htmlSaveFile((char *) filename, ctxt->doc) < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to write to %s\n", filename);
+ return (-1);
+ }
+#else
+ if (xmlSaveFile((char *) filename, ctxt->doc) < -1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to write to %s\n", filename);
+ return (-1);
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ break;
+ default:{
+ FILE *f;
+
+ f = fopen((char *) filename, "w");
+ if (f == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to write to %s\n", filename);
+ return (-1);
+ }
+ xmlElemDump(f, ctxt->doc, node);
+ fclose(f);
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlShellSave:
+ * @ctxt: the shell context
+ * @filename: the file name (optional)
+ * @node: unused
+ * @node2: unused
+ *
+ * Implements the XML shell function "save"
+ * Write the current document to the filename, or it's original name
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlShellSave(xmlShellCtxtPtr ctxt, char *filename,
+ xmlNodePtr node ATTRIBUTE_UNUSED,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ if ((ctxt == NULL) || (ctxt->doc == NULL))
+ return (-1);
+ if ((filename == NULL) || (filename[0] == 0))
+ filename = ctxt->filename;
+ if (filename == NULL)
+ return (-1);
+#ifdef W_OK
+ if (access((char *) filename, W_OK)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot save to %s\n", filename);
+ return (-1);
+ }
+#endif
+ switch (ctxt->doc->type) {
+ case XML_DOCUMENT_NODE:
+ if (xmlSaveFile((char *) filename, ctxt->doc) < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to save to %s\n", filename);
+ }
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_HTML_ENABLED
+ if (htmlSaveFile((char *) filename, ctxt->doc) < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to save to %s\n", filename);
+ }
+#else
+ if (xmlSaveFile((char *) filename, ctxt->doc) < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to save to %s\n", filename);
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ break;
+ default:
+ xmlGenericError(xmlGenericErrorContext,
+ "To save to subparts of a document use the 'write' command\n");
+ return (-1);
+
+ }
+ return (0);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+/**
+ * xmlShellValidate:
+ * @ctxt: the shell context
+ * @dtd: the DTD URI (optional)
+ * @node: unused
+ * @node2: unused
+ *
+ * Implements the XML shell function "validate"
+ * Validate the document, if a DTD path is provided, then the validation
+ * is done against the given DTD.
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlShellValidate(xmlShellCtxtPtr ctxt, char *dtd,
+ xmlNodePtr node ATTRIBUTE_UNUSED,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlValidCtxt vctxt;
+ int res = -1;
+
+ if ((ctxt == NULL) || (ctxt->doc == NULL)) return(-1);
+ vctxt.userData = stderr;
+ vctxt.error = (xmlValidityErrorFunc) fprintf;
+ vctxt.warning = (xmlValidityWarningFunc) fprintf;
+
+ if ((dtd == NULL) || (dtd[0] == 0)) {
+ res = xmlValidateDocument(&vctxt, ctxt->doc);
+ } else {
+ xmlDtdPtr subset;
+
+ subset = xmlParseDTD(NULL, (xmlChar *) dtd);
+ if (subset != NULL) {
+ res = xmlValidateDtd(&vctxt, ctxt->doc, subset);
+
+ xmlFreeDtd(subset);
+ }
+ }
+ return (res);
+}
+#endif /* LIBXML_VALID_ENABLED */
+
+/**
+ * xmlShellDu:
+ * @ctxt: the shell context
+ * @arg: unused
+ * @tree: a node defining a subtree
+ * @node2: unused
+ *
+ * Implements the XML shell function "du"
+ * show the structure of the subtree under node @tree
+ * If @tree is null, the command works on the current node.
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlShellDu(xmlShellCtxtPtr ctxt,
+ char *arg ATTRIBUTE_UNUSED, xmlNodePtr tree,
+ xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlNodePtr node;
+ int indent = 0, i;
+
+ if (!ctxt)
+ return (-1);
+
+ if (tree == NULL)
+ return (-1);
+ node = tree;
+ while (node != NULL) {
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE)) {
+ fprintf(ctxt->output, "/\n");
+ } else if (node->type == XML_ELEMENT_NODE) {
+ for (i = 0; i < indent; i++)
+ fprintf(ctxt->output, " ");
+ if ((node->ns) && (node->ns->prefix))
+ fprintf(ctxt->output, "%s:", node->ns->prefix);
+ fprintf(ctxt->output, "%s\n", node->name);
+ } else {
+ }
+
+ /*
+ * Browse the full subtree, deep first
+ */
+
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE)) {
+ node = ((xmlDocPtr) node)->children;
+ } else if ((node->children != NULL)
+ && (node->type != XML_ENTITY_REF_NODE)) {
+ /* deep first */
+ node = node->children;
+ indent++;
+ } else if ((node != tree) && (node->next != NULL)) {
+ /* then siblings */
+ node = node->next;
+ } else if (node != tree) {
+ /* go up to parents->next if needed */
+ while (node != tree) {
+ if (node->parent != NULL) {
+ node = node->parent;
+ indent--;
+ }
+ if ((node != tree) && (node->next != NULL)) {
+ node = node->next;
+ break;
+ }
+ if (node->parent == NULL) {
+ node = NULL;
+ break;
+ }
+ if (node == tree) {
+ node = NULL;
+ break;
+ }
+ }
+ /* exit condition */
+ if (node == tree)
+ node = NULL;
+ } else
+ node = NULL;
+ }
+ return (0);
+}
+
+/**
+ * xmlShellPwd:
+ * @ctxt: the shell context
+ * @buffer: the output buffer
+ * @node: a node
+ * @node2: unused
+ *
+ * Implements the XML shell function "pwd"
+ * Show the full path from the root to the node, if needed building
+ * thumblers when similar elements exists at a given ancestor level.
+ * The output is compatible with XPath commands.
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer,
+ xmlNodePtr node, xmlNodePtr node2 ATTRIBUTE_UNUSED)
+{
+ xmlChar *path;
+
+ if ((node == NULL) || (buffer == NULL))
+ return (-1);
+
+ path = xmlGetNodePath(node);
+ if (path == NULL)
+ return (-1);
+
+ /*
+ * This test prevents buffer overflow, because this routine
+ * is only called by xmlShell, in which the second argument is
+ * 500 chars long.
+ * It is a dirty hack before a cleaner solution is found.
+ * Documentation should mention that the second argument must
+ * be at least 500 chars long, and could be stripped if too long.
+ */
+ snprintf(buffer, 499, "%s", path);
+ buffer[499] = '0';
+ xmlFree(path);
+
+ return (0);
+}
+
+/**
+ * xmlShell:
+ * @doc: the initial document
+ * @filename: the output buffer
+ * @input: the line reading function
+ * @output: the output FILE*, defaults to stdout if NULL
+ *
+ * Implements the XML shell
+ * This allow to load, validate, view, modify and save a document
+ * using a environment similar to a UNIX commandline.
+ */
+void
+xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
+ FILE * output)
+{
+ char prompt[500] = "/ > ";
+ char *cmdline = NULL, *cur;
+ char command[100];
+ char arg[400];
+ int i;
+ xmlShellCtxtPtr ctxt;
+ xmlXPathObjectPtr list;
+
+ if (doc == NULL)
+ return;
+ if (filename == NULL)
+ return;
+ if (input == NULL)
+ return;
+ if (output == NULL)
+ output = stdout;
+ ctxt = (xmlShellCtxtPtr) xmlMalloc(sizeof(xmlShellCtxt));
+ if (ctxt == NULL)
+ return;
+ ctxt->loaded = 0;
+ ctxt->doc = doc;
+ ctxt->input = input;
+ ctxt->output = output;
+ ctxt->filename = (char *) xmlStrdup((xmlChar *) filename);
+ ctxt->node = (xmlNodePtr) ctxt->doc;
+
+#ifdef LIBXML_XPATH_ENABLED
+ ctxt->pctxt = xmlXPathNewContext(ctxt->doc);
+ if (ctxt->pctxt == NULL) {
+ xmlFree(ctxt);
+ return;
+ }
+#endif /* LIBXML_XPATH_ENABLED */
+ while (1) {
+ if (ctxt->node == (xmlNodePtr) ctxt->doc)
+ snprintf(prompt, sizeof(prompt), "%s > ", "/");
+ else if ((ctxt->node != NULL) && (ctxt->node->name) &&
+ (ctxt->node->ns) && (ctxt->node->ns->prefix))
+ snprintf(prompt, sizeof(prompt), "%s:%s > ",
+ (ctxt->node->ns->prefix), ctxt->node->name);
+ else if ((ctxt->node != NULL) && (ctxt->node->name))
+ snprintf(prompt, sizeof(prompt), "%s > ", ctxt->node->name);
+ else
+ snprintf(prompt, sizeof(prompt), "? > ");
+ prompt[sizeof(prompt) - 1] = 0;
+
+ /*
+ * Get a new command line
+ */
+ cmdline = ctxt->input(prompt);
+ if (cmdline == NULL)
+ break;
+
+ /*
+ * Parse the command itself
+ */
+ cur = cmdline;
+ while ((*cur == ' ') || (*cur == '\t'))
+ cur++;
+ i = 0;
+ while ((*cur != ' ') && (*cur != '\t') &&
+ (*cur != '\n') && (*cur != '\r')) {
+ if (*cur == 0)
+ break;
+ command[i++] = *cur++;
+ }
+ command[i] = 0;
+ if (i == 0)
+ continue;
+
+ /*
+ * Parse the argument
+ */
+ while ((*cur == ' ') || (*cur == '\t'))
+ cur++;
+ i = 0;
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ if (*cur == 0)
+ break;
+ arg[i++] = *cur++;
+ }
+ arg[i] = 0;
+
+ /*
+ * start interpreting the command
+ */
+ if (!strcmp(command, "exit"))
+ break;
+ if (!strcmp(command, "quit"))
+ break;
+ if (!strcmp(command, "bye"))
+ break;
+ if (!strcmp(command, "help")) {
+ fprintf(ctxt->output, "\tbase display XML base of the node\n");
+ fprintf(ctxt->output, "\tsetbase URI change the XML base of the node\n");
+ fprintf(ctxt->output, "\tbye leave shell\n");
+ fprintf(ctxt->output, "\tcat [node] display node or current node\n");
+ fprintf(ctxt->output, "\tcd [path] change directory to path or to root\n");
+ fprintf(ctxt->output, "\tdir [path] dumps informations about the node (namespace, attributes, content)\n");
+ fprintf(ctxt->output, "\tdu [path] show the structure of the subtree under path or the current node\n");
+ fprintf(ctxt->output, "\texit leave shell\n");
+ fprintf(ctxt->output, "\thelp display this help\n");
+ fprintf(ctxt->output, "\tfree display memory usage\n");
+ fprintf(ctxt->output, "\tload [name] load a new document with name\n");
+ fprintf(ctxt->output, "\tls [path] list contents of path or the current directory\n");
+ fprintf(ctxt->output, "\tset xml_fragment replace the current node content with the fragment parsed in context\n");
+#ifdef LIBXML_XPATH_ENABLED
+ fprintf(ctxt->output, "\txpath expr evaluate the XPath expression in that context and print the result\n");
+ fprintf(ctxt->output, "\tsetns nsreg register a namespace to a prefix in the XPath evaluation context\n");
+ fprintf(ctxt->output, "\t format for nsreg is: prefix=[nsuri] (i.e. prefix= unsets a prefix)\n");
+ fprintf(ctxt->output, "\tsetrootns register all namespace found on the root element\n");
+ fprintf(ctxt->output, "\t the default namespace if any uses 'defaultns' prefix\n");
+#endif /* LIBXML_XPATH_ENABLED */
+ fprintf(ctxt->output, "\tpwd display current working directory\n");
+ fprintf(ctxt->output, "\twhereis display absolute path of [path] or current working directory\n");
+ fprintf(ctxt->output, "\tquit leave shell\n");
+#ifdef LIBXML_OUTPUT_ENABLED
+ fprintf(ctxt->output, "\tsave [name] save this document to name or the original name\n");
+ fprintf(ctxt->output, "\twrite [name] write the current node to the filename\n");
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_VALID_ENABLED
+ fprintf(ctxt->output, "\tvalidate check the document for errors\n");
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ fprintf(ctxt->output, "\trelaxng rng validate the document agaisnt the Relax-NG schemas\n");
+#endif
+ fprintf(ctxt->output, "\tgrep string search for a string in the subtree\n");
+#ifdef LIBXML_VALID_ENABLED
+ } else if (!strcmp(command, "validate")) {
+ xmlShellValidate(ctxt, arg, NULL, NULL);
+#endif /* LIBXML_VALID_ENABLED */
+ } else if (!strcmp(command, "load")) {
+ xmlShellLoad(ctxt, arg, NULL, NULL);
+#ifdef LIBXML_SCHEMAS_ENABLED
+ } else if (!strcmp(command, "relaxng")) {
+ xmlShellRNGValidate(ctxt, arg, NULL, NULL);
+#endif
+#ifdef LIBXML_OUTPUT_ENABLED
+ } else if (!strcmp(command, "save")) {
+ xmlShellSave(ctxt, arg, NULL, NULL);
+ } else if (!strcmp(command, "write")) {
+ if (arg[0] == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "Write command requires a filename argument\n");
+ else
+ xmlShellWrite(ctxt, arg, ctxt->node, NULL);
+#endif /* LIBXML_OUTPUT_ENABLED */
+ } else if (!strcmp(command, "grep")) {
+ xmlShellGrep(ctxt, arg, ctxt->node, NULL);
+ } else if (!strcmp(command, "free")) {
+ if (arg[0] == 0) {
+ xmlMemShow(ctxt->output, 0);
+ } else {
+ int len = 0;
+
+ sscanf(arg, "%d", &len);
+ xmlMemShow(ctxt->output, len);
+ }
+ } else if (!strcmp(command, "pwd")) {
+ char dir[500];
+
+ if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL))
+ fprintf(ctxt->output, "%s\n", dir);
+ } else if (!strcmp(command, "du")) {
+ if (arg[0] == 0) {
+ xmlShellDu(ctxt, NULL, ctxt->node, NULL);
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+#ifdef LIBXML_XPATH_ENABLED
+ ctxt->pctxt->node = ctxt->node;
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+#else
+ list = NULL;
+#endif /* LIBXML_XPATH_ENABLED */
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+ case XPATH_NODESET:{
+ int indx;
+
+ if (list->nodesetval == NULL)
+ break;
+
+ for (indx = 0;
+ indx < list->nodesetval->nodeNr;
+ indx++)
+ xmlShellDu(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ break;
+ }
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n",
+ arg);
+ break;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeObject(list);
+#endif
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ }
+ ctxt->pctxt->node = NULL;
+ }
+ } else if (!strcmp(command, "base")) {
+ xmlShellBase(ctxt, NULL, ctxt->node, NULL);
+ } else if (!strcmp(command, "set")) {
+ xmlShellSetContent(ctxt, arg, ctxt->node, NULL);
+#ifdef LIBXML_XPATH_ENABLED
+ } else if (!strcmp(command, "setns")) {
+ if (arg[0] == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "setns: prefix=[nsuri] required\n");
+ } else {
+ xmlShellRegisterNamespace(ctxt, arg, NULL, NULL);
+ }
+ } else if (!strcmp(command, "setrootns")) {
+ xmlNodePtr root;
+
+ root = xmlDocGetRootElement(ctxt->doc);
+ xmlShellRegisterRootNamespaces(ctxt, NULL, root, NULL);
+ } else if (!strcmp(command, "xpath")) {
+ if (arg[0] == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xpath: expression required\n");
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+ xmlXPathDebugDumpObject(ctxt->output, list, 0);
+ xmlXPathFreeObject(list);
+ }
+#endif /* LIBXML_XPATH_ENABLED */
+#ifdef LIBXML_TREE_ENABLED
+ } else if (!strcmp(command, "setbase")) {
+ xmlShellSetBase(ctxt, arg, ctxt->node, NULL);
+#endif
+ } else if ((!strcmp(command, "ls")) || (!strcmp(command, "dir"))) {
+ int dir = (!strcmp(command, "dir"));
+
+ if (arg[0] == 0) {
+ if (dir)
+ xmlShellDir(ctxt, NULL, ctxt->node, NULL);
+ else
+ xmlShellList(ctxt, NULL, ctxt->node, NULL);
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+#ifdef LIBXML_XPATH_ENABLED
+ ctxt->pctxt->node = ctxt->node;
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+#else
+ list = NULL;
+#endif /* LIBXML_XPATH_ENABLED */
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+ case XPATH_NODESET:{
+ int indx;
+
+ if (list->nodesetval == NULL)
+ break;
+
+ for (indx = 0;
+ indx < list->nodesetval->nodeNr;
+ indx++) {
+ if (dir)
+ xmlShellDir(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ else
+ xmlShellList(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ }
+ break;
+ }
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n",
+ arg);
+ break;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeObject(list);
+#endif
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ }
+ ctxt->pctxt->node = NULL;
+ }
+ } else if (!strcmp(command, "whereis")) {
+ char dir[500];
+
+ if (arg[0] == 0) {
+ if (!xmlShellPwd(ctxt, dir, ctxt->node, NULL))
+ fprintf(ctxt->output, "%s\n", dir);
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+#ifdef LIBXML_XPATH_ENABLED
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+#else
+ list = NULL;
+#endif /* LIBXML_XPATH_ENABLED */
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+ case XPATH_NODESET:{
+ int indx;
+
+ if (list->nodesetval == NULL)
+ break;
+
+ for (indx = 0;
+ indx < list->nodesetval->nodeNr;
+ indx++) {
+ if (!xmlShellPwd(ctxt, dir, list->nodesetval->
+ nodeTab[indx], NULL))
+ fprintf(ctxt->output, "%s\n", dir);
+ }
+ break;
+ }
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n",
+ arg);
+ break;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeObject(list);
+#endif
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ }
+ ctxt->pctxt->node = NULL;
+ }
+ } else if (!strcmp(command, "cd")) {
+ if (arg[0] == 0) {
+ ctxt->node = (xmlNodePtr) ctxt->doc;
+ } else {
+#ifdef LIBXML_XPATH_ENABLED
+ int l;
+
+ ctxt->pctxt->node = ctxt->node;
+ l = strlen(arg);
+ if ((l >= 2) && (arg[l - 1] == '/'))
+ arg[l - 1] = 0;
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+#else
+ list = NULL;
+#endif /* LIBXML_XPATH_ENABLED */
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+ case XPATH_NODESET:
+ if (list->nodesetval != NULL) {
+ if (list->nodesetval->nodeNr == 1) {
+ ctxt->node = list->nodesetval->nodeTab[0];
+ if ((ctxt->node != NULL) &&
+ (ctxt->node->type ==
+ XML_NAMESPACE_DECL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "cannot cd to namespace\n");
+ ctxt->node = NULL;
+ }
+ } else
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a %d Node Set\n",
+ arg,
+ list->nodesetval->nodeNr);
+ } else
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an empty Node Set\n",
+ arg);
+ break;
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n",
+ arg);
+ break;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeObject(list);
+#endif
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ }
+ ctxt->pctxt->node = NULL;
+ }
+#ifdef LIBXML_OUTPUT_ENABLED
+ } else if (!strcmp(command, "cat")) {
+ if (arg[0] == 0) {
+ xmlShellCat(ctxt, NULL, ctxt->node, NULL);
+ } else {
+ ctxt->pctxt->node = ctxt->node;
+#ifdef LIBXML_XPATH_ENABLED
+ ctxt->pctxt->node = ctxt->node;
+ list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
+#else
+ list = NULL;
+#endif /* LIBXML_XPATH_ENABLED */
+ if (list != NULL) {
+ switch (list->type) {
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ break;
+ case XPATH_NODESET:{
+ int indx;
+
+ if (list->nodesetval == NULL)
+ break;
+
+ for (indx = 0;
+ indx < list->nodesetval->nodeNr;
+ indx++) {
+ if (i > 0)
+ fprintf(ctxt->output, " -------\n");
+ xmlShellCat(ctxt, NULL,
+ list->nodesetval->
+ nodeTab[indx], NULL);
+ }
+ break;
+ }
+ case XPATH_BOOLEAN:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a Boolean\n", arg);
+ break;
+ case XPATH_NUMBER:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a number\n", arg);
+ break;
+ case XPATH_STRING:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a string\n", arg);
+ break;
+ case XPATH_POINT:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a point\n", arg);
+ break;
+ case XPATH_RANGE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_LOCATIONSET:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is a range\n", arg);
+ break;
+ case XPATH_USERS:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is user-defined\n", arg);
+ break;
+ case XPATH_XSLT_TREE:
+ xmlGenericError(xmlGenericErrorContext,
+ "%s is an XSLT value tree\n",
+ arg);
+ break;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeObject(list);
+#endif
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: no such node\n", arg);
+ }
+ ctxt->pctxt->node = NULL;
+ }
+#endif /* LIBXML_OUTPUT_ENABLED */
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Unknown command %s\n", command);
+ }
+ free(cmdline); /* not xmlFree here ! */
+ cmdline = NULL;
+ }
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathFreeContext(ctxt->pctxt);
+#endif /* LIBXML_XPATH_ENABLED */
+ if (ctxt->loaded) {
+ xmlFreeDoc(ctxt->doc);
+ }
+ if (ctxt->filename != NULL)
+ xmlFree(ctxt->filename);
+ xmlFree(ctxt);
+ if (cmdline != NULL)
+ free(cmdline); /* not xmlFree here ! */
+}
+
+#endif /* LIBXML_XPATH_ENABLED */
+#define bottom_debugXML
+#include "elfgcchack.h"
+#endif /* LIBXML_DEBUG_ENABLED */
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..4ebd5b3
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/dict.c b/dict.c
new file mode 100644
index 0000000..5f71d55
--- /dev/null
+++ b/dict.c
@@ -0,0 +1,1259 @@
+/*
+ * dict.c: dictionary of reusable strings, just used to avoid allocation
+ * and freeing operations.
+ *
+ * Copyright (C) 2003-2012 Daniel Veillard.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ * Author: daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <limits.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+/*
+ * Following http://www.ocert.org/advisories/ocert-2011-003.html
+ * it seems that having hash randomization might be a good idea
+ * when using XML with untrusted data
+ * Note1: that it works correctly only if compiled with WITH_BIG_KEY
+ * which is the default.
+ * Note2: the fast function used for a small dict won't protect very
+ * well but since the attack is based on growing a very big hash
+ * list we will use the BigKey algo as soon as the hash size grows
+ * over MIN_DICT_SIZE so this actually works
+ */
+#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
+#define DICT_RANDOMIZATION
+#endif
+
+#include <string.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#elif defined(WIN32)
+typedef unsigned __int32 uint32_t;
+#endif
+#endif
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+
+/* #define DEBUG_GROW */
+/* #define DICT_DEBUG_PATTERNS */
+
+#define MAX_HASH_LEN 3
+#define MIN_DICT_SIZE 128
+#define MAX_DICT_HASH 8 * 2048
+#define WITH_BIG_KEY
+
+#ifdef WITH_BIG_KEY
+#define xmlDictComputeKey(dict, name, len) \
+ (((dict)->size == MIN_DICT_SIZE) ? \
+ xmlDictComputeFastKey(name, len, (dict)->seed) : \
+ xmlDictComputeBigKey(name, len, (dict)->seed))
+
+#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
+ (((prefix) == NULL) ? \
+ (xmlDictComputeKey(dict, name, len)) : \
+ (((dict)->size == MIN_DICT_SIZE) ? \
+ xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) : \
+ xmlDictComputeBigQKey(prefix, plen, name, len, (dict)->seed)))
+
+#else /* !WITH_BIG_KEY */
+#define xmlDictComputeKey(dict, name, len) \
+ xmlDictComputeFastKey(name, len, (dict)->seed)
+#define xmlDictComputeQKey(dict, prefix, plen, name, len) \
+ xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed)
+#endif /* WITH_BIG_KEY */
+
+/*
+ * An entry in the dictionnary
+ */
+typedef struct _xmlDictEntry xmlDictEntry;
+typedef xmlDictEntry *xmlDictEntryPtr;
+struct _xmlDictEntry {
+ struct _xmlDictEntry *next;
+ const xmlChar *name;
+ unsigned int len;
+ int valid;
+ unsigned long okey;
+};
+
+typedef struct _xmlDictStrings xmlDictStrings;
+typedef xmlDictStrings *xmlDictStringsPtr;
+struct _xmlDictStrings {
+ xmlDictStringsPtr next;
+ xmlChar *free;
+ xmlChar *end;
+ size_t size;
+ size_t nbStrings;
+ xmlChar array[1];
+};
+/*
+ * The entire dictionnary
+ */
+struct _xmlDict {
+ int ref_counter;
+
+ struct _xmlDictEntry *dict;
+ size_t size;
+ unsigned int nbElems;
+ xmlDictStringsPtr strings;
+
+ struct _xmlDict *subdict;
+ /* used for randomization */
+ int seed;
+ /* used to impose a limit on size */
+ size_t limit;
+};
+
+/*
+ * A mutex for modifying the reference counter for shared
+ * dictionaries.
+ */
+static xmlRMutexPtr xmlDictMutex = NULL;
+
+/*
+ * Whether the dictionary mutex was initialized.
+ */
+static int xmlDictInitialized = 0;
+
+#ifdef DICT_RANDOMIZATION
+#ifdef HAVE_RAND_R
+/*
+ * Internal data for random function, protected by xmlDictMutex
+ */
+static unsigned int rand_seed = 0;
+#endif
+#endif
+
+/**
+ * xmlInitializeDict:
+ *
+ * Do the dictionary mutex initialization.
+ * this function is deprecated
+ *
+ * Returns 0 if initialization was already done, and 1 if that
+ * call led to the initialization
+ */
+int xmlInitializeDict(void) {
+ return(0);
+}
+
+/**
+ * __xmlInitializeDict:
+ *
+ * This function is not public
+ * Do the dictionary mutex initialization.
+ * this function is not thread safe, initialization should
+ * normally be done once at setup when called from xmlOnceInit()
+ * we may also land in this code if thread support is not compiled in
+ *
+ * Returns 0 if initialization was already done, and 1 if that
+ * call led to the initialization
+ */
+int __xmlInitializeDict(void) {
+ if (xmlDictInitialized)
+ return(1);
+
+ if ((xmlDictMutex = xmlNewRMutex()) == NULL)
+ return(0);
+ xmlRMutexLock(xmlDictMutex);
+
+#ifdef DICT_RANDOMIZATION
+#ifdef HAVE_RAND_R
+ rand_seed = time(NULL);
+ rand_r(& rand_seed);
+#else
+ srand(time(NULL));
+#endif
+#endif
+ xmlDictInitialized = 1;
+ xmlRMutexUnlock(xmlDictMutex);
+ return(1);
+}
+
+#ifdef DICT_RANDOMIZATION
+int __xmlRandom(void) {
+ int ret;
+
+ if (xmlDictInitialized == 0)
+ __xmlInitializeDict();
+
+ xmlRMutexLock(xmlDictMutex);
+#ifdef HAVE_RAND_R
+ ret = rand_r(& rand_seed);
+#else
+ ret = rand();
+#endif
+ xmlRMutexUnlock(xmlDictMutex);
+ return(ret);
+}
+#endif
+
+/**
+ * xmlDictCleanup:
+ *
+ * Free the dictionary mutex. Do not call unless sure the library
+ * is not in use anymore !
+ */
+void
+xmlDictCleanup(void) {
+ if (!xmlDictInitialized)
+ return;
+
+ xmlFreeRMutex(xmlDictMutex);
+
+ xmlDictInitialized = 0;
+}
+
+/*
+ * xmlDictAddString:
+ * @dict: the dictionnary
+ * @name: the name of the userdata
+ * @len: the length of the name
+ *
+ * Add the string to the array[s]
+ *
+ * Returns the pointer of the local string, or NULL in case of error.
+ */
+static const xmlChar *
+xmlDictAddString(xmlDictPtr dict, const xmlChar *name, unsigned int namelen) {
+ xmlDictStringsPtr pool;
+ const xmlChar *ret;
+ size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+ size_t limit = 0;
+
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "-");
+#endif
+ pool = dict->strings;
+ while (pool != NULL) {
+ if (pool->end - pool->free > namelen)
+ goto found_pool;
+ if (pool->size > size) size = pool->size;
+ limit += pool->size;
+ pool = pool->next;
+ }
+ /*
+ * Not found, need to allocate
+ */
+ if (pool == NULL) {
+ if ((dict->limit > 0) && (limit > dict->limit)) {
+ return(NULL);
+ }
+
+ if (size == 0) size = 1000;
+ else size *= 4; /* exponential growth */
+ if (size < 4 * namelen)
+ size = 4 * namelen; /* just in case ! */
+ pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size);
+ if (pool == NULL)
+ return(NULL);
+ pool->size = size;
+ pool->nbStrings = 0;
+ pool->free = &pool->array[0];
+ pool->end = &pool->array[size];
+ pool->next = dict->strings;
+ dict->strings = pool;
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "+");
+#endif
+ }
+found_pool:
+ ret = pool->free;
+ memcpy(pool->free, name, namelen);
+ pool->free += namelen;
+ *(pool->free++) = 0;
+ pool->nbStrings++;
+ return(ret);
+}
+
+/*
+ * xmlDictAddQString:
+ * @dict: the dictionnary
+ * @prefix: the prefix of the userdata
+ * @plen: the prefix length
+ * @name: the name of the userdata
+ * @len: the length of the name
+ *
+ * Add the QName to the array[s]
+ *
+ * Returns the pointer of the local string, or NULL in case of error.
+ */
+static const xmlChar *
+xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, unsigned int plen,
+ const xmlChar *name, unsigned int namelen)
+{
+ xmlDictStringsPtr pool;
+ const xmlChar *ret;
+ size_t size = 0; /* + sizeof(_xmlDictStrings) == 1024 */
+ size_t limit = 0;
+
+ if (prefix == NULL) return(xmlDictAddString(dict, name, namelen));
+
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "=");
+#endif
+ pool = dict->strings;
+ while (pool != NULL) {
+ if (pool->end - pool->free > namelen + plen + 1)
+ goto found_pool;
+ if (pool->size > size) size = pool->size;
+ limit += pool->size;
+ pool = pool->next;
+ }
+ /*
+ * Not found, need to allocate
+ */
+ if (pool == NULL) {
+ if ((dict->limit > 0) && (limit > dict->limit)) {
+ return(NULL);
+ }
+
+ if (size == 0) size = 1000;
+ else size *= 4; /* exponential growth */
+ if (size < 4 * (namelen + plen + 1))
+ size = 4 * (namelen + plen + 1); /* just in case ! */
+ pool = (xmlDictStringsPtr) xmlMalloc(sizeof(xmlDictStrings) + size);
+ if (pool == NULL)
+ return(NULL);
+ pool->size = size;
+ pool->nbStrings = 0;
+ pool->free = &pool->array[0];
+ pool->end = &pool->array[size];
+ pool->next = dict->strings;
+ dict->strings = pool;
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "+");
+#endif
+ }
+found_pool:
+ ret = pool->free;
+ memcpy(pool->free, prefix, plen);
+ pool->free += plen;
+ *(pool->free++) = ':';
+ memcpy(pool->free, name, namelen);
+ pool->free += namelen;
+ *(pool->free++) = 0;
+ pool->nbStrings++;
+ return(ret);
+}
+
+#ifdef WITH_BIG_KEY
+/*
+ * xmlDictComputeBigKey:
+ *
+ * Calculate a hash key using a good hash function that works well for
+ * larger hash table sizes.
+ *
+ * Hash function by "One-at-a-Time Hash" see
+ * http://burtleburtle.net/bob/hash/doobs.html
+ */
+
+static uint32_t
+xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
+ uint32_t hash;
+ int i;
+
+ if (namelen <= 0 || data == NULL) return(0);
+
+ hash = seed;
+
+ for (i = 0;i < namelen; i++) {
+ hash += data[i];
+ hash += (hash << 10);
+ hash ^= (hash >> 6);
+ }
+ hash += (hash << 3);
+ hash ^= (hash >> 11);
+ hash += (hash << 15);
+
+ return hash;
+}
+
+/*
+ * xmlDictComputeBigQKey:
+ *
+ * Calculate a hash key for two strings using a good hash function
+ * that works well for larger hash table sizes.
+ *
+ * Hash function by "One-at-a-Time Hash" see
+ * http://burtleburtle.net/bob/hash/doobs.html
+ *
+ * Neither of the two strings must be NULL.
+ */
+static unsigned long
+xmlDictComputeBigQKey(const xmlChar *prefix, int plen,
+ const xmlChar *name, int len, int seed)
+{
+ uint32_t hash;
+ int i;
+
+ hash = seed;
+
+ for (i = 0;i < plen; i++) {
+ hash += prefix[i];
+ hash += (hash << 10);
+ hash ^= (hash >> 6);
+ }
+ hash += ':';
+ hash += (hash << 10);
+ hash ^= (hash >> 6);
+
+ for (i = 0;i < len; i++) {
+ hash += name[i];
+ hash += (hash << 10);
+ hash ^= (hash >> 6);
+ }
+ hash += (hash << 3);
+ hash ^= (hash >> 11);
+ hash += (hash << 15);
+
+ return hash;
+}
+#endif /* WITH_BIG_KEY */
+
+/*
+ * xmlDictComputeFastKey:
+ *
+ * Calculate a hash key using a fast hash function that works well
+ * for low hash table fill.
+ */
+static unsigned long
+xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
+ unsigned long value = seed;
+
+ if (name == NULL) return(0);
+ value = *name;
+ value <<= 5;
+ if (namelen > 10) {
+ value += name[namelen - 1];
+ namelen = 10;
+ }
+ switch (namelen) {
+ case 10: value += name[9];
+ case 9: value += name[8];
+ case 8: value += name[7];
+ case 7: value += name[6];
+ case 6: value += name[5];
+ case 5: value += name[4];
+ case 4: value += name[3];
+ case 3: value += name[2];
+ case 2: value += name[1];
+ default: break;
+ }
+ return(value);
+}
+
+/*
+ * xmlDictComputeFastQKey:
+ *
+ * Calculate a hash key for two strings using a fast hash function
+ * that works well for low hash table fill.
+ *
+ * Neither of the two strings must be NULL.
+ */
+static unsigned long
+xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
+ const xmlChar *name, int len, int seed)
+{
+ unsigned long value = (unsigned long) seed;
+
+ if (plen == 0)
+ value += 30 * (unsigned long) ':';
+ else
+ value += 30 * (*prefix);
+
+ if (len > 10) {
+ value += name[len - (plen + 1 + 1)];
+ len = 10;
+ if (plen > 10)
+ plen = 10;
+ }
+ switch (plen) {
+ case 10: value += prefix[9];
+ case 9: value += prefix[8];
+ case 8: value += prefix[7];
+ case 7: value += prefix[6];
+ case 6: value += prefix[5];
+ case 5: value += prefix[4];
+ case 4: value += prefix[3];
+ case 3: value += prefix[2];
+ case 2: value += prefix[1];
+ case 1: value += prefix[0];
+ default: break;
+ }
+ len -= plen;
+ if (len > 0) {
+ value += (unsigned long) ':';
+ len--;
+ }
+ switch (len) {
+ case 10: value += name[9];
+ case 9: value += name[8];
+ case 8: value += name[7];
+ case 7: value += name[6];
+ case 6: value += name[5];
+ case 5: value += name[4];
+ case 4: value += name[3];
+ case 3: value += name[2];
+ case 2: value += name[1];
+ case 1: value += name[0];
+ default: break;
+ }
+ return(value);
+}
+
+/**
+ * xmlDictCreate:
+ *
+ * Create a new dictionary
+ *
+ * Returns the newly created dictionnary, or NULL if an error occured.
+ */
+xmlDictPtr
+xmlDictCreate(void) {
+ xmlDictPtr dict;
+
+ if (!xmlDictInitialized)
+ if (!__xmlInitializeDict())
+ return(NULL);
+
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "C");
+#endif
+
+ dict = xmlMalloc(sizeof(xmlDict));
+ if (dict) {
+ dict->ref_counter = 1;
+ dict->limit = 0;
+
+ dict->size = MIN_DICT_SIZE;
+ dict->nbElems = 0;
+ dict->dict = xmlMalloc(MIN_DICT_SIZE * sizeof(xmlDictEntry));
+ dict->strings = NULL;
+ dict->subdict = NULL;
+ if (dict->dict) {
+ memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry));
+#ifdef DICT_RANDOMIZATION
+ dict->seed = __xmlRandom();
+#else
+ dict->seed = 0;
+#endif
+ return(dict);
+ }
+ xmlFree(dict);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlDictCreateSub:
+ * @sub: an existing dictionnary
+ *
+ * Create a new dictionary, inheriting strings from the read-only
+ * dictionnary @sub. On lookup, strings are first searched in the
+ * new dictionnary, then in @sub, and if not found are created in the
+ * new dictionnary.
+ *
+ * Returns the newly created dictionnary, or NULL if an error occured.
+ */
+xmlDictPtr
+xmlDictCreateSub(xmlDictPtr sub) {
+ xmlDictPtr dict = xmlDictCreate();
+
+ if ((dict != NULL) && (sub != NULL)) {
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "R");
+#endif
+ dict->seed = sub->seed;
+ dict->subdict = sub;
+ xmlDictReference(dict->subdict);
+ }
+ return(dict);
+}
+
+/**
+ * xmlDictReference:
+ * @dict: the dictionnary
+ *
+ * Increment the reference counter of a dictionary
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlDictReference(xmlDictPtr dict) {
+ if (!xmlDictInitialized)
+ if (!__xmlInitializeDict())
+ return(-1);
+
+ if (dict == NULL) return -1;
+ xmlRMutexLock(xmlDictMutex);
+ dict->ref_counter++;
+ xmlRMutexUnlock(xmlDictMutex);
+ return(0);
+}
+
+/**
+ * xmlDictGrow:
+ * @dict: the dictionnary
+ * @size: the new size of the dictionnary
+ *
+ * resize the dictionnary
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlDictGrow(xmlDictPtr dict, size_t size) {
+ unsigned long key, okey;
+ size_t oldsize, i;
+ xmlDictEntryPtr iter, next;
+ struct _xmlDictEntry *olddict;
+#ifdef DEBUG_GROW
+ unsigned long nbElem = 0;
+#endif
+ int ret = 0;
+ int keep_keys = 1;
+
+ if (dict == NULL)
+ return(-1);
+ if (size < 8)
+ return(-1);
+ if (size > 8 * 2048)
+ return(-1);
+
+#ifdef DICT_DEBUG_PATTERNS
+ fprintf(stderr, "*");
+#endif
+
+ oldsize = dict->size;
+ olddict = dict->dict;
+ if (olddict == NULL)
+ return(-1);
+ if (oldsize == MIN_DICT_SIZE)
+ keep_keys = 0;
+
+ dict->dict = xmlMalloc(size * sizeof(xmlDictEntry));
+ if (dict->dict == NULL) {
+ dict->dict = olddict;
+ return(-1);
+ }
+ memset(dict->dict, 0, size * sizeof(xmlDictEntry));
+ dict->size = size;
+
+ /* If the two loops are merged, there would be situations where
+ a new entry needs to allocated and data copied into it from
+ the main dict. It is nicer to run through the array twice, first
+ copying all the elements in the main array (less probability of
+ allocate) and then the rest, so we only free in the second loop.
+ */
+ for (i = 0; i < oldsize; i++) {
+ if (olddict[i].valid == 0)
+ continue;
+
+ if (keep_keys)
+ okey = olddict[i].okey;
+ else
+ okey = xmlDictComputeKey(dict, olddict[i].name, olddict[i].len);
+ key = okey % dict->size;
+
+ if (dict->dict[key].valid == 0) {
+ memcpy(&(dict->dict[key]), &(olddict[i]), sizeof(xmlDictEntry));
+ dict->dict[key].next = NULL;
+ dict->dict[key].okey = okey;
+ } else {
+ xmlDictEntryPtr entry;
+
+ entry = xmlMalloc(sizeof(xmlDictEntry));
+ if (entry != NULL) {
+ entry->name = olddict[i].name;
+ entry->len = olddict[i].len;
+ entry->okey = okey;
+ entry->next = dict->dict[key].next;
+ entry->valid = 1;
+ dict->dict[key].next = entry;
+ } else {
+ /*
+ * we don't have much ways to alert from herei
+ * result is loosing an entry and unicity garantee
+ */
+ ret = -1;
+ }
+ }
+#ifdef DEBUG_GROW
+ nbElem++;
+#endif
+ }
+
+ for (i = 0; i < oldsize; i++) {
+ iter = olddict[i].next;
+ while (iter) {
+ next = iter->next;
+
+ /*
+ * put back the entry in the new dict
+ */
+
+ if (keep_keys)
+ okey = iter->okey;
+ else
+ okey = xmlDictComputeKey(dict, iter->name, iter->len);
+ key = okey % dict->size;
+ if (dict->dict[key].valid == 0) {
+ memcpy(&(dict->dict[key]), iter, sizeof(xmlDictEntry));
+ dict->dict[key].next = NULL;
+ dict->dict[key].valid = 1;
+ dict->dict[key].okey = okey;
+ xmlFree(iter);
+ } else {
+ iter->next = dict->dict[key].next;
+ iter->okey = okey;
+ dict->dict[key].next = iter;
+ }
+
+#ifdef DEBUG_GROW
+ nbElem++;
+#endif
+
+ iter = next;
+ }
+ }
+
+ xmlFree(olddict);
+
+#ifdef DEBUG_GROW
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlDictGrow : from %lu to %lu, %u elems\n", oldsize, size, nbElem);
+#endif
+
+ return(ret);
+}
+
+/**
+ * xmlDictFree:
+ * @dict: the dictionnary
+ *
+ * Free the hash @dict and its contents. The userdata is
+ * deallocated with @f if provided.
+ */
+void
+xmlDictFree(xmlDictPtr dict) {
+ size_t i;
+ xmlDictEntryPtr iter;
+ xmlDictEntryPtr next;
+ int inside_dict = 0;
+ xmlDictStringsPtr pool, nextp;
+
+ if (dict == NULL)
+ return;
+
+ if (!xmlDictInitialized)
+ if (!__xmlInitializeDict())
+ return;
+
+ /* decrement the counter, it may be shared by a parser and docs */
+ xmlRMutexLock(xmlDictMutex);
+ dict->ref_counter--;
+ if (dict->ref_counter > 0) {
+ xmlRMutexUnlock(xmlDictMutex);
+ return;
+ }
+
+ xmlRMutexUnlock(xmlDictMutex);
+
+ if (dict->subdict != NULL) {
+ xmlDictFree(dict->subdict);
+ }
+
+ if (dict->dict) {
+ for(i = 0; ((i < dict->size) && (dict->nbElems > 0)); i++) {
+ iter = &(dict->dict[i]);
+ if (iter->valid == 0)
+ continue;
+ inside_dict = 1;
+ while (iter) {
+ next = iter->next;
+ if (!inside_dict)
+ xmlFree(iter);
+ dict->nbElems--;
+ inside_dict = 0;
+ iter = next;
+ }
+ }
+ xmlFree(dict->dict);
+ }
+ pool = dict->strings;
+ while (pool != NULL) {
+ nextp = pool->next;
+ xmlFree(pool);
+ pool = nextp;
+ }
+ xmlFree(dict);
+}
+
+/**
+ * xmlDictLookup:
+ * @dict: the dictionnary
+ * @name: the name of the userdata
+ * @len: the length of the name, if -1 it is recomputed
+ *
+ * Add the @name to the dictionnary @dict if not present.
+ *
+ * Returns the internal copy of the name or NULL in case of internal error
+ */
+const xmlChar *
+xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
+ unsigned long key, okey, nbi = 0;
+ xmlDictEntryPtr entry;
+ xmlDictEntryPtr insert;
+ const xmlChar *ret;
+ unsigned int l;
+
+ if ((dict == NULL) || (name == NULL))
+ return(NULL);
+
+ if (len < 0)
+ l = strlen((const char *) name);
+ else
+ l = len;
+
+ if (((dict->limit > 0) && (l >= dict->limit)) ||
+ (l > INT_MAX / 2))
+ return(NULL);
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ okey = xmlDictComputeKey(dict, name, l);
+ key = okey % dict->size;
+ if (dict->dict[key].valid == 0) {
+ insert = NULL;
+ } else {
+ for (insert = &(dict->dict[key]); insert->next != NULL;
+ insert = insert->next) {
+#ifdef __GNUC__
+ if ((insert->okey == okey) && (insert->len == l)) {
+ if (!memcmp(insert->name, name, l))
+ return(insert->name);
+ }
+#else
+ if ((insert->okey == okey) && (insert->len == l) &&
+ (!xmlStrncmp(insert->name, name, l)))
+ return(insert->name);
+#endif
+ nbi++;
+ }
+#ifdef __GNUC__
+ if ((insert->okey == okey) && (insert->len == l)) {
+ if (!memcmp(insert->name, name, l))
+ return(insert->name);
+ }
+#else
+ if ((insert->okey == okey) && (insert->len == l) &&
+ (!xmlStrncmp(insert->name, name, l)))
+ return(insert->name);
+#endif
+ }
+
+ if (dict->subdict) {
+ unsigned long skey;
+
+ /* we cannot always reuse the same okey for the subdict */
+ if (((dict->size == MIN_DICT_SIZE) &&
+ (dict->subdict->size != MIN_DICT_SIZE)) ||
+ ((dict->size != MIN_DICT_SIZE) &&
+ (dict->subdict->size == MIN_DICT_SIZE)))
+ skey = xmlDictComputeKey(dict->subdict, name, l);
+ else
+ skey = okey;
+
+ key = skey % dict->subdict->size;
+ if (dict->subdict->dict[key].valid != 0) {
+ xmlDictEntryPtr tmp;
+
+ for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
+ tmp = tmp->next) {
+#ifdef __GNUC__
+ if ((tmp->okey == skey) && (tmp->len == l)) {
+ if (!memcmp(tmp->name, name, l))
+ return(tmp->name);
+ }
+#else
+ if ((tmp->okey == skey) && (tmp->len == l) &&
+ (!xmlStrncmp(tmp->name, name, l)))
+ return(tmp->name);
+#endif
+ nbi++;
+ }
+#ifdef __GNUC__
+ if ((tmp->okey == skey) && (tmp->len == l)) {
+ if (!memcmp(tmp->name, name, l))
+ return(tmp->name);
+ }
+#else
+ if ((tmp->okey == skey) && (tmp->len == l) &&
+ (!xmlStrncmp(tmp->name, name, l)))
+ return(tmp->name);
+#endif
+ }
+ key = okey % dict->size;
+ }
+
+ ret = xmlDictAddString(dict, name, l);
+ if (ret == NULL)
+ return(NULL);
+ if (insert == NULL) {
+ entry = &(dict->dict[key]);
+ } else {
+ entry = xmlMalloc(sizeof(xmlDictEntry));
+ if (entry == NULL)
+ return(NULL);
+ }
+ entry->name = ret;
+ entry->len = l;
+ entry->next = NULL;
+ entry->valid = 1;
+ entry->okey = okey;
+
+
+ if (insert != NULL)
+ insert->next = entry;
+
+ dict->nbElems++;
+
+ if ((nbi > MAX_HASH_LEN) &&
+ (dict->size <= ((MAX_DICT_HASH / 2) / MAX_HASH_LEN))) {
+ if (xmlDictGrow(dict, MAX_HASH_LEN * 2 * dict->size) != 0)
+ return(NULL);
+ }
+ /* Note that entry may have been freed at this point by xmlDictGrow */
+
+ return(ret);
+}
+
+/**
+ * xmlDictExists:
+ * @dict: the dictionnary
+ * @name: the name of the userdata
+ * @len: the length of the name, if -1 it is recomputed
+ *
+ * Check if the @name exists in the dictionnary @dict.
+ *
+ * Returns the internal copy of the name or NULL if not found.
+ */
+const xmlChar *
+xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
+ unsigned long key, okey, nbi = 0;
+ xmlDictEntryPtr insert;
+ unsigned int l;
+
+ if ((dict == NULL) || (name == NULL))
+ return(NULL);
+
+ if (len < 0)
+ l = strlen((const char *) name);
+ else
+ l = len;
+ if (((dict->limit > 0) && (l >= dict->limit)) ||
+ (l > INT_MAX / 2))
+ return(NULL);
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ okey = xmlDictComputeKey(dict, name, l);
+ key = okey % dict->size;
+ if (dict->dict[key].valid == 0) {
+ insert = NULL;
+ } else {
+ for (insert = &(dict->dict[key]); insert->next != NULL;
+ insert = insert->next) {
+#ifdef __GNUC__
+ if ((insert->okey == okey) && (insert->len == l)) {
+ if (!memcmp(insert->name, name, l))
+ return(insert->name);
+ }
+#else
+ if ((insert->okey == okey) && (insert->len == l) &&
+ (!xmlStrncmp(insert->name, name, l)))
+ return(insert->name);
+#endif
+ nbi++;
+ }
+#ifdef __GNUC__
+ if ((insert->okey == okey) && (insert->len == l)) {
+ if (!memcmp(insert->name, name, l))
+ return(insert->name);
+ }
+#else
+ if ((insert->okey == okey) && (insert->len == l) &&
+ (!xmlStrncmp(insert->name, name, l)))
+ return(insert->name);
+#endif
+ }
+
+ if (dict->subdict) {
+ unsigned long skey;
+
+ /* we cannot always reuse the same okey for the subdict */
+ if (((dict->size == MIN_DICT_SIZE) &&
+ (dict->subdict->size != MIN_DICT_SIZE)) ||
+ ((dict->size != MIN_DICT_SIZE) &&
+ (dict->subdict->size == MIN_DICT_SIZE)))
+ skey = xmlDictComputeKey(dict->subdict, name, l);
+ else
+ skey = okey;
+
+ key = skey % dict->subdict->size;
+ if (dict->subdict->dict[key].valid != 0) {
+ xmlDictEntryPtr tmp;
+
+ for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
+ tmp = tmp->next) {
+#ifdef __GNUC__
+ if ((tmp->okey == skey) && (tmp->len == l)) {
+ if (!memcmp(tmp->name, name, l))
+ return(tmp->name);
+ }
+#else
+ if ((tmp->okey == skey) && (tmp->len == l) &&
+ (!xmlStrncmp(tmp->name, name, l)))
+ return(tmp->name);
+#endif
+ nbi++;
+ }
+#ifdef __GNUC__
+ if ((tmp->okey == skey) && (tmp->len == l)) {
+ if (!memcmp(tmp->name, name, l))
+ return(tmp->name);
+ }
+#else
+ if ((tmp->okey == skey) && (tmp->len == l) &&
+ (!xmlStrncmp(tmp->name, name, l)))
+ return(tmp->name);
+#endif
+ }
+ }
+
+ /* not found */
+ return(NULL);
+}
+
+/**
+ * xmlDictQLookup:
+ * @dict: the dictionnary
+ * @prefix: the prefix
+ * @name: the name
+ *
+ * Add the QName @prefix:@name to the hash @dict if not present.
+ *
+ * Returns the internal copy of the QName or NULL in case of internal error
+ */
+const xmlChar *
+xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) {
+ unsigned long okey, key, nbi = 0;
+ xmlDictEntryPtr entry;
+ xmlDictEntryPtr insert;
+ const xmlChar *ret;
+ unsigned int len, plen, l;
+
+ if ((dict == NULL) || (name == NULL))
+ return(NULL);
+ if (prefix == NULL)
+ return(xmlDictLookup(dict, name, -1));
+
+ l = len = strlen((const char *) name);
+ plen = strlen((const char *) prefix);
+ len += 1 + plen;
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ okey = xmlDictComputeQKey(dict, prefix, plen, name, l);
+ key = okey % dict->size;
+ if (dict->dict[key].valid == 0) {
+ insert = NULL;
+ } else {
+ for (insert = &(dict->dict[key]); insert->next != NULL;
+ insert = insert->next) {
+ if ((insert->okey == okey) && (insert->len == len) &&
+ (xmlStrQEqual(prefix, name, insert->name)))
+ return(insert->name);
+ nbi++;
+ }
+ if ((insert->okey == okey) && (insert->len == len) &&
+ (xmlStrQEqual(prefix, name, insert->name)))
+ return(insert->name);
+ }
+
+ if (dict->subdict) {
+ unsigned long skey;
+
+ /* we cannot always reuse the same okey for the subdict */
+ if (((dict->size == MIN_DICT_SIZE) &&
+ (dict->subdict->size != MIN_DICT_SIZE)) ||
+ ((dict->size != MIN_DICT_SIZE) &&
+ (dict->subdict->size == MIN_DICT_SIZE)))
+ skey = xmlDictComputeQKey(dict->subdict, prefix, plen, name, l);
+ else
+ skey = okey;
+
+ key = skey % dict->subdict->size;
+ if (dict->subdict->dict[key].valid != 0) {
+ xmlDictEntryPtr tmp;
+ for (tmp = &(dict->subdict->dict[key]); tmp->next != NULL;
+ tmp = tmp->next) {
+ if ((tmp->okey == skey) && (tmp->len == len) &&
+ (xmlStrQEqual(prefix, name, tmp->name)))
+ return(tmp->name);
+ nbi++;
+ }
+ if ((tmp->okey == skey) && (tmp->len == len) &&
+ (xmlStrQEqual(prefix, name, tmp->name)))
+ return(tmp->name);
+ }
+ key = okey % dict->size;
+ }
+
+ ret = xmlDictAddQString(dict, prefix, plen, name, l);
+ if (ret == NULL)
+ return(NULL);
+ if (insert == NULL) {
+ entry = &(dict->dict[key]);
+ } else {
+ entry = xmlMalloc(sizeof(xmlDictEntry));
+ if (entry == NULL)
+ return(NULL);
+ }
+ entry->name = ret;
+ entry->len = len;
+ entry->next = NULL;
+ entry->valid = 1;
+ entry->okey = okey;
+
+ if (insert != NULL)
+ insert->next = entry;
+
+ dict->nbElems++;
+
+ if ((nbi > MAX_HASH_LEN) &&
+ (dict->size <= ((MAX_DICT_HASH / 2) / MAX_HASH_LEN)))
+ xmlDictGrow(dict, MAX_HASH_LEN * 2 * dict->size);
+ /* Note that entry may have been freed at this point by xmlDictGrow */
+
+ return(ret);
+}
+
+/**
+ * xmlDictOwns:
+ * @dict: the dictionnary
+ * @str: the string
+ *
+ * check if a string is owned by the disctionary
+ *
+ * Returns 1 if true, 0 if false and -1 in case of error
+ * -1 in case of error
+ */
+int
+xmlDictOwns(xmlDictPtr dict, const xmlChar *str) {
+ xmlDictStringsPtr pool;
+
+ if ((dict == NULL) || (str == NULL))
+ return(-1);
+ pool = dict->strings;
+ while (pool != NULL) {
+ if ((str >= &pool->array[0]) && (str <= pool->free))
+ return(1);
+ pool = pool->next;
+ }
+ if (dict->subdict)
+ return(xmlDictOwns(dict->subdict, str));
+ return(0);
+}
+
+/**
+ * xmlDictSize:
+ * @dict: the dictionnary
+ *
+ * Query the number of elements installed in the hash @dict.
+ *
+ * Returns the number of elements in the dictionnary or
+ * -1 in case of error
+ */
+int
+xmlDictSize(xmlDictPtr dict) {
+ if (dict == NULL)
+ return(-1);
+ if (dict->subdict)
+ return(dict->nbElems + dict->subdict->nbElems);
+ return(dict->nbElems);
+}
+
+/**
+ * xmlDictSetLimit:
+ * @dict: the dictionnary
+ * @limit: the limit in bytes
+ *
+ * Set a size limit for the dictionary
+ * Added in 2.9.0
+ *
+ * Returns the previous limit of the dictionary or 0
+ */
+size_t
+xmlDictSetLimit(xmlDictPtr dict, size_t limit) {
+ size_t ret;
+
+ if (dict == NULL)
+ return(0);
+ ret = dict->limit;
+ dict->limit = limit;
+ return(ret);
+}
+
+/**
+ * xmlDictGetUsage:
+ * @dict: the dictionnary
+ *
+ * Get how much memory is used by a dictionary for strings
+ * Added in 2.9.0
+ *
+ * Returns the amount of strings allocated
+ */
+size_t
+xmlDictGetUsage(xmlDictPtr dict) {
+ xmlDictStringsPtr pool;
+ size_t limit = 0;
+
+ if (dict == NULL)
+ return(0);
+ pool = dict->strings;
+ while (pool != NULL) {
+ limit += pool->size;
+ pool = pool->next;
+ }
+ return(limit);
+}
+
+#define bottom_dict
+#include "elfgcchack.h"
diff --git a/doc/APIchunk0.html b/doc/APIchunk0.html
new file mode 100644
index 0000000..c90e042
--- /dev/null
+++ b/doc/APIchunk0.html
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index A-B for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index A-B for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter A:</h2><dl><dt>A-Z</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>A-Za-z</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+</dd><dt>A-Za-z0-9</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+</dd><dt>ABC</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>ABI</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>ALL</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+</dd><dt>ANY</dt><dd><a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>APIs</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+</dd><dt>ARRAY</dt><dd><a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>ASCII</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>ATTLIST</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+</dd><dt>ATTRIBUTE</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+</dd><dt>Absolute</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+</dd><dt>Accessor</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+</dd><dt>Activation</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>Actually</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+</dd><dt>Add</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</dd><dt>Added</dt><dd><a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+</dd><dt>Additional</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
+<a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
+</dd><dt>AegeanNumbers</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a><br />
+</dd><dt>All</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+</dd><dt>Allocate</dt><dd><a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+<a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>Allocates</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+</dd><dt>Allows</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+</dd><dt>AlphabeticPresentationForms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a><br />
+</dd><dt>Also</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+</dd><dt>Always</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br />
+</dd><dt>Append</dt><dd><a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+</dd><dt>Appendix</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>Appends</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+</dd><dt>Applies</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+</dd><dt>Apply</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+</dd><dt>Arabic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsArabic">xmlUCSIsArabic</a><br />
+</dd><dt>ArabicPresentationForms-A</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsA">xmlUCSIsArabicPresentationFormsA</a><br />
+</dd><dt>ArabicPresentationForms-B</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsB">xmlUCSIsArabicPresentationFormsB</a><br />
+</dd><dt>Armenian</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsArmenian">xmlUCSIsArmenian</a><br />
+</dd><dt>Array</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>Arrows</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsArrows">xmlUCSIsArrows</a><br />
+</dd><dt>Associate</dt><dd><a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+</dd><dt>Att</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>AttDef</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+</dd><dt>AttType</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>AttValue</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>AttlistDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Attribute</dt><dd><a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>Attribute-Value</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>Attributes</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>Automatic</dt><dd><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+</dd><dt>Automatically</dt><dd><a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
+</dd></dl><h2>Letter B:</h2><dl><dt>BASE</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>BAr</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>BOM</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>Balanced</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+</dd><dt>Base</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>BaseChar</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+</dd><dt>Based</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>BasicLatin</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBasicLatin">xmlUCSIsBasicLatin</a><br />
+</dd><dt>Basically</dt><dd><a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>Before</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>Behaves</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+</dd><dt>Behaviour</dt><dd><a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
+</dd><dt>Bengali</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBengali">xmlUCSIsBengali</a><br />
+</dd><dt>Best</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>BinHex</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+</dd><dt>Bit</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+</dd><dt>BlockElements</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBlockElements">xmlUCSIsBlockElements</a><br />
+</dd><dt>Blocks</dt><dd><a href="html/libxml-parser.html#xmlStopParser">xmlStopParser</a><br />
+</dd><dt>Bopomofo</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a><br />
+</dd><dt>BopomofoExtended</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a><br />
+</dd><dt>Both</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>BoxDrawing</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br />
+</dd><dt>BraillePatterns</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br />
+</dd><dt>Brzozowski</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+</dd><dt>Buffer</dt><dd><a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+</dd><dt>Bugs:</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>Buhid</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsBuhid">xmlUCSIsBuhid</a><br />
+</dd><dt>Build</dt><dd><a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+<a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>Builds</dt><dd><a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+</dd><dt>But</dt><dd><a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>ByzantineMusicalSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsByzantineMusicalSymbols">xmlUCSIsByzantineMusicalSymbols</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk1.html b/doc/APIchunk1.html
new file mode 100644
index 0000000..7947196
--- /dev/null
+++ b/doc/APIchunk1.html
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index C-C for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index C-C for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter C:</h2><dl><dt>C14N</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+</dd><dt>CATALOG</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>CDATA</dt><dd><a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>CDEnd</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+</dd><dt>CDSect</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>CDStart</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+</dd><dt>CData</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+</dd><dt>CJKCompatibility</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibility">xmlUCSIsCJKCompatibility</a><br />
+</dd><dt>CJKCompatibilityForms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityForms">xmlUCSIsCJKCompatibilityForms</a><br />
+</dd><dt>CJKCompatibilityIdeographs</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographs">xmlUCSIsCJKCompatibilityIdeographs</a><br />
+</dd><dt>CJKCompatibilityIdeographsSupplement</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographsSupplement">xmlUCSIsCJKCompatibilityIdeographsSupplement</a><br />
+</dd><dt>CJKRadicalsSupplement</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKRadicalsSupplement">xmlUCSIsCJKRadicalsSupplement</a><br />
+</dd><dt>CJKSymbolsandPunctuation</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKSymbolsandPunctuation">xmlUCSIsCJKSymbolsandPunctuation</a><br />
+</dd><dt>CJKUnifiedIdeographs</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographs">xmlUCSIsCJKUnifiedIdeographs</a><br />
+</dd><dt>CJKUnifiedIdeographsExtensionA</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionA">xmlUCSIsCJKUnifiedIdeographsExtensionA</a><br />
+</dd><dt>CJKUnifiedIdeographsExtensionB</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionB">xmlUCSIsCJKUnifiedIdeographsExtensionB</a><br />
+</dd><dt>CVS</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+</dd><dt>CWD</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+</dd><dt>Cache</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>Call</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>Callback</dt><dd><a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-list.html#xmlListDeallocator">xmlListDeallocator</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>Callback:</dt><dd><a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+</dd><dt>Called</dt><dd><a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+</dd><dt>Calling</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+</dd><dt>Canonical</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>Canonicalization</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>Carl</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>Catalog</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a><br />
+<a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlFreeCatalog">xmlFreeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+</dd><dt>Catalogs</dt><dd><a href="html/libxml-catalog.html#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>Change</dt><dd><a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+</dd><dt>Changes</dt><dd><a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+</dd><dt>Char</dt><dd><a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+</dd><dt>CharData</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>CharRef</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>Character</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+</dd><dt>Characters</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+</dd><dt>Checka</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>Checks</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a><br />
+</dd><dt>Cherokee</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCherokee">xmlUCSIsCherokee</a><br />
+</dd><dt>Children</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>Chunk</dt><dd><a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>Cleanup</dt><dd><a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetError">xmlResetError</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+</dd><dt>Clear</dt><dd><a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+</dd><dt>Clears</dt><dd><a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+</dd><dt>Close</dt><dd><a href="html/libxml-xmlIO.html#xmlFileClose">xmlFileClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+</dd><dt>Closed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+</dd><dt>CombiningChar</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+</dd><dt>CombiningDiacriticalMarks</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarks">xmlUCSIsCombiningDiacriticalMarks</a><br />
+</dd><dt>CombiningDiacriticalMarksforSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarksforSymbols">xmlUCSIsCombiningDiacriticalMarksforSymbols</a><br />
+</dd><dt>CombiningHalfMarks</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningHalfMarks">xmlUCSIsCombiningHalfMarks</a><br />
+</dd><dt>CombiningMarksforSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningMarksforSymbols">xmlUCSIsCombiningMarksforSymbols</a><br />
+</dd><dt>Comment</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+</dd><dt>Compare</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+</dd><dt>Compile</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>Compress</dt><dd><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+</dd><dt>Computes</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+</dd><dt>Concat</dt><dd><a href="html/libxml-tree.html#xmlTextConcat">xmlTextConcat</a><br />
+</dd><dt>Constructs</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>Content</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>Content-Type</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+</dd><dt>Contrary</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+</dd><dt>ControlPictures</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsControlPictures">xmlUCSIsControlPictures</a><br />
+</dd><dt>Convenient</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+</dd><dt>Convert</dt><dd><a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+</dd><dt>Converts</dt><dd><a href="html/libxml-xpath.html#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+</dd><dt>Copies</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+</dd><dt>Copy</dt><dd><a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>Correct</dt><dd><a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>Could</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>Count</dt><dd><a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+</dd><dt>Creates</dt><dd><a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>Creation</dt><dd><a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-tree.html#xmlNewText">xmlNewText</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+</dd><dt>CurrencySymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCurrencySymbols">xmlUCSIsCurrencySymbols</a><br />
+</dd><dt>Current</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>Currently</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>Cut</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>CypriotSyllabary</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCypriotSyllabary">xmlUCSIsCypriotSyllabary</a><br />
+</dd><dt>Cyrillic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillic">xmlUCSIsCyrillic</a><br />
+</dd><dt>CyrillicSupplement</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillicSupplement">xmlUCSIsCyrillicSupplement</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk10.html b/doc/APIchunk10.html
new file mode 100644
index 0000000..22d5061
--- /dev/null
+++ b/doc/APIchunk10.html
@@ -0,0 +1,675 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index Y-a for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index Y-a for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter Y:</h2><dl><dt>YES</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>YiRadicals</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsYiRadicals">xmlUCSIsYiRadicals</a><br />
+</dd><dt>YiSyllables</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsYiSyllables">xmlUCSIsYiSyllables</a><br />
+</dd><dt>YijingHexagramSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsYijingHexagramSymbols">xmlUCSIsYijingHexagramSymbols</a><br />
+</dd></dl><h2>Letter Z:</h2><dl><dt>ZLIB</dt><dd><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>Zlib</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a><br />
+</dd></dl><h2>Letter a:</h2><dl><dt>a-z</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>a-zA-Z</dt><dd><a href="html/libxml-parserInternals.html#IS_ASCII_LETTER">IS_ASCII_LETTER</a><br />
+</dd><dt>a-zA-Z0-9</dt><dd><a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+</dd><dt>a@b</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>abc</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>abc-</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>able</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>about</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+</dd><dt>above</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>absent</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+</dd><dt>absoluteURI</dt><dd><a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+</dd><dt>abstain</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>abstract</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
+</dd><dt>accept</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+</dd><dt>acceptable</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>accepted</dt><dd><a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>accepting</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>accepts</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</dd><dt>access</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+</dd><dt>accessed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>accesses</dt><dd><a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+</dd><dt>accexpted</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</dd><dt>accommodate</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+</dd><dt>according</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXVersion">xmlSAXVersion</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>accordingly</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+</dd><dt>account</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+</dd><dt>acquire</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+</dd><dt>act</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>action</dt><dd><a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+</dd><dt>activate</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+</dd><dt>activated</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>activates</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>acts</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+</dd><dt>actual</dt><dd><a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+</dd><dt>actually</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>actuate</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+</dd><dt>add</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+</dd><dt>added</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>adding</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+</dd><dt>addition</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>additional</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>additionally</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>address</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+</dd><dt>adds</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+</dd><dt>adequate</dt><dd><a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>adjacent</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+</dd><dt>affect</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>affected</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+</dd><dt>affiliation</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>afraid</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>after</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>again</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+</dd><dt>against</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>aggregate</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+</dd><dt>ahead</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+</dd><dt>algebraic</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+</dd><dt>alias</dt><dd><a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+</dd><dt>aliases</dt><dd><a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br />
+</dd><dt>aliasing</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+</dd><dt>allocate</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+</dd><dt>allocation</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>allocations</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+</dd><dt>allocator</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a><br />
+</dd><dt>allocators</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>allow</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>allowable</dt><dd><a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>allowed</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>allowing</dt><dd><a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>allows</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+</dd><dt>alphanumerics</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>already</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+</dd><dt>also</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>alternative</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+</dd><dt>always</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>amd</dt><dd><a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+</dd><dt>amount</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+</dd><dt>amp</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>ampersand</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>analysis</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>analyze</dt><dd><a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>analyzed</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+</dd><dt>ancestor</dt><dd><a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+</dd><dt>ancestor-or-self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+</dd><dt>ancestors</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+</dd><dt>anchored</dt><dd><a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+</dd><dt>angle</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+</dd><dt>annotation</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAnnot">_xmlSchemaAnnot</a><br />
+</dd><dt>another</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+</dd><dt>anySimpleType</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>anyURI</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>anymore</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</dd><dt>anyway</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>apart</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>apos</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>appear</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>appearing</dt><dd><a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+</dd><dt>appears</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>append</dt><dd><a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>appended</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+</dd><dt>appending</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>appendix</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>applicable</dt><dd><a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+</dd><dt>application</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+</dd><dt>applications</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>applied</dt><dd><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+</dd><dt>applies</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>apply</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>applying</dt><dd><a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>appropriate</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>arcs</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+</dd><dt>area</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>areas</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+</dd><dt>args</dt><dd><a href="html/libxml-xpathInternals.html#CHECK_ARITY">CHECK_ARITY</a><br />
+<a href="">x</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+</dd><dt>around</dt><dd><a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+</dd><dt>arrays</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>arry</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+</dd><dt>asked</dt><dd><a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+</dd><dt>assume</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+</dd><dt>assumed</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>assumes</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>assuming</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</dd><dt>assure</dt><dd><a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+</dd><dt>atom</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+</dd><dt>atomic</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>attached</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>attempt</dt><dd><a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+</dd><dt>attempts</dt><dd><a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+</dd><dt>attr</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-tree.html#_xmlID">_xmlID</a><br />
+<a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+</dd><dt>attribute-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>attribute-list</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+</dd><dt>attribute-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+</dd><dt>attribute-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>attributeFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
+</dd><dt>augmented</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+</dd><dt>autark</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>authentication</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+</dd><dt>author</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>authority</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>authorized</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>auto</dt><dd><a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+</dd><dt>auto-repair</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>autoclose</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+</dd><dt>autoclosed</dt><dd><a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+</dd><dt>autogeneration</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>automatically</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>automaton</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>autoreference</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>avoid</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>avoiding</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>aware</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk11.html b/doc/APIchunk11.html
new file mode 100644
index 0000000..9f94a1f
--- /dev/null
+++ b/doc/APIchunk11.html
@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index b-b for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index b-b for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter b:</h2><dl><dt>back</dt><dd><a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
+</dd><dt>bad</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+</dd><dt>badly</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>bahaviour</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>balanced</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>bar</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>base64</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+</dd><dt>based</dt><dd><a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>basically</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>basis</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>bear</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>becomes</dt><dd><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+</dd><dt>before</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>beginning</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>begins</dt><dd><a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br />
+</dd><dt>behaves</dt><dd><a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br />
+</dd><dt>behavior</dt><dd><a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>behaviour</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>below</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>better</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+</dd><dt>between</dt><dd><a href="html/libxml-encoding.html#_uconv_t">_uconv_t</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+</dd><dt>beyond</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>binary</dt><dd><a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+</dd><dt>bindings</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+</dd><dt>bit</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+</dd><dt>bits</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+</dd><dt>blanks</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>bloc</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>blockDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a><br />
+</dd><dt>blocked</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</dd><dt>blocking</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+</dd><dt>blocks</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a><br />
+</dd><dt>body</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>book1</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>bool</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+</dd><dt>both</dt><dd><a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>bound</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+</dd><dt>boundaries</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>boundary</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>bracket</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+</dd><dt>branch</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+</dd><dt>break</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+</dd><dt>breaking</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>breaks</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>brk</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>broke</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>broken</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>buf</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</dd><dt>buffered</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>buffers</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+</dd><dt>builded</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
+</dd><dt>building</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd><dt>builds</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>built</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>built-in</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>builtin</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+</dd><dt>bunch</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>bypass</dt><dd><a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk12.html b/doc/APIchunk12.html
new file mode 100644
index 0000000..de376f7
--- /dev/null
+++ b/doc/APIchunk12.html
@@ -0,0 +1,927 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index c-c for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index c-c for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter c:</h2><dl><dt>c14n</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>cache</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>cached</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>caching:</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>calculated</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>calculates</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+</dd><dt>calling</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>calls</dt><dd><a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>came</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+</dd><dt>cannot</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+</dd><dt>canonic</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+</dd><dt>canonical</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+</dd><dt>canonicalization</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>canonicalized</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>canonization</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>canonized</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>canot</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>capable</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>caracters</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+</dd><dt>cardinality</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>carried</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+</dd><dt>carries</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</dd><dt>carrying</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+</dd><dt>case-ignoring</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+</dd><dt>cases</dt><dd><a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>cast</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_NUMBER">CAST_TO_NUMBER</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+</dd><dt>casting</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>cat</dt><dd><a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+</dd><dt>catalogs</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogCleanup">xmlCatalogCleanup</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>category</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br />
+</dd><dt>cause</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+</dd><dt>caution</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>cdata-section-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>ceiling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+</dd><dt>certainly</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>chained</dt><dd><a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+</dd><dt>change</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+</dd><dt>changed</dt><dd><a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>changes</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+</dd><dt>changing</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+</dd><dt>channel</dt><dd><a href="html/libxml-xmlIO.html#xmlFileClose">xmlFileClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+</dd><dt>characters</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>charencoding</dt><dd><a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+</dd><dt>chars??</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+</dd><dt>charset</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+</dd><dt>checked</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+</dd><dt>checking</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+</dd><dt>checkings</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>checks</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+</dd><dt>child-</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+</dd><dt>childrens</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+</dd><dt>childs</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>choice</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>choices</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>choices:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>chunk</dt><dd><a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+</dd><dt>circular</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+</dd><dt>clean</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>cleanly</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+</dd><dt>cleans</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>cleanup</dt><dd><a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+</dd><dt>clear</dt><dd><a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+</dd><dt>clears</dt><dd><a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+</dd><dt>client</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>clone</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>cloned</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>close</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+</dd><dt>closed</dt><dd><a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+</dd><dt>closes</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+</dd><dt>closest</dt><dd><a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+</dd><dt>closing</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>cncerning</dt><dd><a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+</dd><dt>codes</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>coding</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>collapse</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a><br />
+</dd><dt>collect</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+</dd><dt>collected</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>colon</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>column</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a><br />
+</dd><dt>com</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+</dd><dt>combining</dt><dd><a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br />
+</dd><dt>come</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>coment</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
+</dd><dt>comes</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>coming</dt><dd><a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+</dd><dt>command</dt><dd><a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+</dd><dt>commandline</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>commands</dt><dd><a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd><dt>comment</dt><dd><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-parser.html#commentSAXFunc">commentSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartComment">xmlTextWriterStartComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+</dd><dt>comment-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>comments</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+</dd><dt>commodity</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>common</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+</dd><dt>comp</dt><dd><a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a><br />
+</dd><dt>compare</dt><dd><a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>compared</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>compares</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+</dd><dt>comparing</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>comparison</dt><dd><a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>comparisons</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>compatibility</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+</dd><dt>compatible</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd><dt>compilation</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+<a href="html/libxml-xpath.html#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+</dd><dt>compile</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+</dd><dt>compile-time</dt><dd><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+</dd><dt>compiled-in</dt><dd><a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a><br />
+</dd><dt>compiling</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+</dd><dt>complement</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>complete</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+</dd><dt>completed</dt><dd><a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+</dd><dt>completely</dt><dd><a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>complex</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>complexType</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+</dd><dt>complicated</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>component</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>components</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+</dd><dt>compound</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+</dd><dt>compress</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+</dd><dt>compressed</dt><dd><a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+</dd><dt>compression</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>comprising</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>computation</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>compute</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+</dd><dt>computed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+</dd><dt>computes</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+</dd><dt>concat</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br />
+</dd><dt>concatenated</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+</dd><dt>concatenation</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br />
+</dd><dt>condition</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+</dd><dt>conditionalSect</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+</dd><dt>configured</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
+</dd><dt>conforming</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>conforms</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>conjunction</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+</dd><dt>connection</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+</dd><dt>connector</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>consequent</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>consideration</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>considered</dt><dd><a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>consist</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+</dd><dt>const</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>constant</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcardNs">_xmlSchemaWildcardNs</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>constraints</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>construct</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>construction</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>constructs</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>consumed</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>consuming</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>contain</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>contained</dt><dd><a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+</dd><dt>contains</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathContainsFunction">xmlXPathContainsFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>content:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+</dd><dt>contentType</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+</dd><dt>contents</dt><dd><a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+</dd><dt>contentspec</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+</dd><dt>context?</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>contexts</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+</dd><dt>contextual</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+</dd><dt>continuing</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>contraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>contrary</dt><dd><a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+</dd><dt>contrast</dt><dd><a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+</dd><dt>control</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>conveniently</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>conversion</dt><dd><a href="html/libxml-encoding.html#_uconv_t">_uconv_t</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathType">_xmlXPathType</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+</dd><dt>conversions</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+</dd><dt>convert</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>converted</dt><dd><a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>converter</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+</dd><dt>converting</dt><dd><a href="html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+</dd><dt>converts</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>cope</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>copied</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+</dd><dt>copier</dt><dd><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+</dd><dt>copying</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>correct</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>correctly</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>correponding</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>correspond</dt><dd><a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+</dd><dt>corresponding</dt><dd><a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>cost</dt><dd><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>costly</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>could</dt><dd><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>count</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpRef">xmlExpRef</a><br />
+<a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCountFunction">xmlXPathCountFunction</a><br />
+</dd><dt>counter</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+</dd><dt>counterparts</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+</dd><dt>course</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>cover</dt><dd><a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>crash</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>create</dt><dd><a href="html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+</dd><dt>creates</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>creating</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>creation</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+</dd><dt>cross</dt><dd><a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>crossed</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+</dd><dt>cshema</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a><br />
+</dd><dt>ctrio</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>ctxt</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+</dd><dt>ctxt-</dt><dd><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>cur</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>curent</dt><dd><a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+</dd><dt>currently</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>custom</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk13.html b/doc/APIchunk13.html
new file mode 100644
index 0000000..b1f069d
--- /dev/null
+++ b/doc/APIchunk13.html
@@ -0,0 +1,681 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index d-d for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index d-d for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter d:</h2><dl><dt>dangerous</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>data-type</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+</dd><dt>datatype</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+</dd><dt>day</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>day:minute</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>de-coupled</dt><dd><a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>deactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>deallocate</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-list.html#xmlListDeallocator">xmlListDeallocator</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+</dd><dt>deallocated</dt><dd><a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+</dd><dt>deallocation</dt><dd><a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+</dd><dt>deallocator</dt><dd><a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+</dd><dt>debug</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+</dd><dt>debugging</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>decimal</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>decl</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+</dd><dt>declarations</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>declare</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>declared</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>declaring</dt><dd><a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+</dd><dt>decode</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+</dd><dt>def</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>defaulted</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+</dd><dt>defaultexternal</dt><dd><a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+</dd><dt>defaults</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>define</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>defined</dt><dd><a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+</dd><dt>defining</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_HREF">XINCLUDE_HREF</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE">XINCLUDE_PARSE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+</dd><dt>definitions</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>defs</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>delayed</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+</dd><dt>delegation</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</dd><dt>delete</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+</dd><dt>deletion</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</dd><dt>dependant</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>depending</dt><dd><a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+</dd><dt>deprecated</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a><br />
+</dd><dt>deregistration</dt><dd><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+</dd><dt>derivation</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+</dd><dt>des</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>desactivated</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>descend</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>descendant</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+</dd><dt>descendant-or-self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+</dd><dt>descendants</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+</dd><dt>described</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>describing</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>description</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlEntityDesc">_htmlEntityDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+</dd><dt>descriptor</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</dd><dt>designed</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>desired</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+</dd><dt>destination</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>destroy</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+</dd><dt>destroyed</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+</dd><dt>destruction</dt><dd><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+</dd><dt>details</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>detect</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>detected</dt><dd><a href="html/libxml-xpathInternals.html#CHECK_ERROR">CHECK_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ERROR0">CHECK_ERROR0</a><br />
+<a href="html/libxml-SAX.html#endDocument">endDocument</a><br />
+<a href="html/libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#endElement">endElement</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndDocument">xmlSAX2EndDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElement">xmlSAX2EndElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+</dd><dt>detection</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>determine</dt><dd><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+</dd><dt>determined</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>determinist</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+</dd><dt>dict</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>dictionaries</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+</dd><dt>dictionary</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>dictionnary</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+</dd><dt>did</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+</dd><dt>difference</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+</dd><dt>different</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+</dd><dt>differentiate</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>differently</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>differs</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</dd><dt>digit</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>digits</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>dir</dt><dd><a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+</dd><dt>direct</dt><dd><a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>direction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+</dd><dt>directly</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>directories</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>directory</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+</dd><dt>disable</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+</dd><dt>disabled</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>disables</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>disabling</dt><dd><a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+</dd><dt>disallowed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a><br />
+</dd><dt>discard</dt><dd><a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>discarded</dt><dd><a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+</dd><dt>discarding</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>disconnected</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewState">xmlAutomataNewState</a><br />
+</dd><dt>discovering</dt><dd><a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+</dd><dt>disctionary</dt><dd><a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+</dd><dt>display</dt><dd><a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+</dd><dt>distinct</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+</dd><dt>distinguish</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>div</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>doc</dt><dd><a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+</dd><dt>doc-</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>docs</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>doctypedecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+</dd><dt>documents</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>doesn</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>doing</dt><dd><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+</dd><dt>don</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>dotgnu</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>double</dt><dd><a href="">val</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNumber">xmlXPathReturnNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+</dd><dt>double-hyphen</dt><dd><a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+</dd><dt>double-quotes</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>doubleit</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>doublequotes</dt><dd><a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+</dd><dt>doubt</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>down</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>draft</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+</dd><dt>drop</dt><dd><a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>dtd</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>dtds</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>due</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>dump</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
+<a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>dumping</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+</dd><dt>dumps</dt><dd><a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+</dd><dt>duplicate</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>duplicated</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>duplicates</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+</dd><dt>duration</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>during</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+</dd><dt>dynamic</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk14.html b/doc/APIchunk14.html
new file mode 100644
index 0000000..0e33ddb
--- /dev/null
+++ b/doc/APIchunk14.html
@@ -0,0 +1,470 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index e-e for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index e-e for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter e:</h2><dl><dt>each</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>edition</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>effect</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>effective</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>efficiency</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>either</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>either:</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>elem</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+</dd><dt>elem-</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+</dd><dt>element-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>element-node</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+</dd><dt>element-nodes</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>elementFormDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
+</dd><dt>elementdecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>elements</dt><dd><a href="html/libxml-catalog.html#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a><br />
+<a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+<a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
+<a href="html/libxml-list.html#xmlListSize">xmlListSize</a><br />
+<a href="html/libxml-list.html#xmlListSort">xmlListSort</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>else</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>embedded</dt><dd><a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+</dd><dt>emitted</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+</dd><dt>empty-element</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>enable</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+</dd><dt>enabled</dt><dd><a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+</dd><dt>enables</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>enabling</dt><dd><a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+</dd><dt>enc</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+</dd><dt>encapsulate</dt><dd><a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+</dd><dt>encapsulating</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+</dd><dt>enclose</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+</dd><dt>encode</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+</dd><dt>encoded</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>encoder</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>encoder==NULL</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>enconding</dt><dd><a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>encountered</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>encountering</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>end-tag</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+</dd><dt>end-up</dt><dd><a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+</dd><dt>ended</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>ending</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+</dd><dt>ends</dt><dd><a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+</dd><dt>enforced</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+</dd><dt>engine</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+</dd><dt>englobing</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</dd><dt>enhancements</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>enough</dt><dd><a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+</dd><dt>ensure</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>ensures</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>ensuring</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>entire</dt><dd><a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+</dd><dt>entities:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>entproc</dt><dd><a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>entries</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+</dd><dt>entry</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+</dd><dt>enumerated</dt><dd><a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+</dd><dt>enumeration</dt><dd><a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+</dd><dt>environment</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-xpath.html#xmlXPathInit">xmlXPathInit</a><br />
+</dd><dt>epsilon</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+</dd><dt>equal</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPositionFunction">xmlXPathPositionFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>equality</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+</dd><dt>equivalent</dt><dd><a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+</dd><dt>escape</dt><dd><a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>escaped</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>escapes</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>escaping</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+</dd><dt>especially</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>established</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+</dd><dt>etc</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>evaluate</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+</dd><dt>evaluated</dt><dd><a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>evaluating</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+</dd><dt>evaluation</dt><dd><a href="html/libxml-xpath.html#_xmlXPathFunct">_xmlXPathFunct</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+</dd><dt>evaulation</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+</dd><dt>even</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+</dd><dt>event</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</dd><dt>events</dt><dd><a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</dd><dt>ever</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+</dd><dt>everywhere</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>exact</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>examined</dt><dd><a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+</dd><dt>example</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>examples</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>except</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>exception</dt><dd><a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>excluding</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+</dd><dt>exclusions</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
+</dd><dt>exclusions:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
+</dd><dt>exclusive</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>executed</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+</dd><dt>execution</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+</dd><dt>exist</dt><dd><a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+</dd><dt>existent</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>exists</dt><dd><a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>exit</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>expand</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>expanded</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+</dd><dt>expected</dt><dd><a href="">x</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>explicitly</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>explored</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>exposing</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+</dd><dt>express</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+</dd><dt>expressing</dt><dd><a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>expressions</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</dd><dt>exslSetsDistinctSorted</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+</dd><dt>exslSetsLeadingSorted</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+</dd><dt>exslSetsNodeLeadingSorted</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+</dd><dt>ext</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>extParsedEnt</dt><dd><a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+</dd><dt>extSubset</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+</dd><dt>extSubsetDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+</dd><dt>extend</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+</dd><dt>extended</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>extension</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>extensions</dt><dd><a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+</dd><dt>extent</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+</dd><dt>extlang</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>extract</dt><dd><a href="html/libxml-tree.html#XML_GET_CONTENT">XML_GET_CONTENT</a><br />
+<a href="html/libxml-tree.html#XML_GET_LINE">XML_GET_LINE</a><br />
+<a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+<a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk15.html b/doc/APIchunk15.html
new file mode 100644
index 0000000..163d67b
--- /dev/null
+++ b/doc/APIchunk15.html
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index f-f for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index f-f for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter f:</h2><dl><dt>fTP</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+</dd><dt>face</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+</dd><dt>facet</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacetLink">_xmlSchemaFacetLink</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</dd><dt>facets</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+</dd><dt>facility</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+</dd><dt>fail</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+</dd><dt>failed</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>fails</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>fallback</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>far</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+</dd><dt>fashion</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+</dd><dt>fast</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+</dd><dt>faster</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+</dd><dt>fatal</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+</dd><dt>fatalError</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+</dd><dt>favor</dt><dd><a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+</dd><dt>feature</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+</dd><dt>features</dt><dd><a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+</dd><dt>fed</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>feed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+</dd><dt>fetch</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+</dd><dt>fetching</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+</dd><dt>field</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>fields</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>files</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+</dd><dt>filesystem</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-parser.html#xmlReadFile">xmlReadFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+</dd><dt>filled</dt><dd><a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+</dd><dt>fills</dt><dd><a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>filters</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+</dd><dt>final</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>finalDefault</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a><br />
+</dd><dt>find</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+</dd><dt>finding</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>finds</dt><dd><a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+</dd><dt>finishDtd</dt><dd><a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+</dd><dt>finished</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>finishing</dt><dd><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>finite</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>firs</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>fist</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+</dd><dt>fit</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>fixed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>fixup</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a><br />
+</dd><dt>flag</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+</dd><dt>flagged</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+</dd><dt>flags</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</dd><dt>flat</dt><dd><a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</dd><dt>floor</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+</dd><dt>flow</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</dd><dt>flushed</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+</dd><dt>flushes</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+</dd><dt>follow</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>followed</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>following-sibling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+</dd><dt>follows</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+</dd><dt>follows:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>fonctionnalities</dt><dd><a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+</dd><dt>for:</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>forbid</dt><dd><a href="html/libxml-xpath.html#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a><br />
+</dd><dt>force</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+</dd><dt>forced</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>form</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>formal</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a><br />
+</dd><dt>formatted</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+</dd><dt>formatting</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+</dd><dt>formed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>forward</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</dd><dt>fptr</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>fragment</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+</dd><dt>fragments</dt><dd><a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>freeing</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>frees</dt><dd><a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>front</dt><dd><a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>front-end</dt><dd><a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>ftp:</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+</dd><dt>ftp_proxy</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>ftp_proxy_password</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>ftp_proxy_user</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>full</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+</dd><dt>fully</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+</dd><dt>func</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>funcs</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>function:</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>functionality</dt><dd><a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>functions</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+</dd><dt>further</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parser.html#xmlStopParser">xmlStopParser</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</dd><dt>future</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk16.html b/doc/APIchunk16.html
new file mode 100644
index 0000000..92d3845
--- /dev/null
+++ b/doc/APIchunk16.html
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index g-h for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index g-h for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter g:</h2><dl><dt>gDay</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>gMonth</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>gMonthDay</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>gYear</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>gYearMonth</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>garanteed</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>garbage</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>gcc</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>gcc4</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>genChRanges</dt><dd><a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
+</dd><dt>general</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>generally</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>generate</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>generated</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+</dd><dt>generates</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+</dd><dt>generating</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+</dd><dt>generic</dt><dd><a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+</dd><dt>get</dt><dd><a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+<a href="html/libxml-tree.html#xmlBufferLength">xmlBufferLength</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>gie</dt><dd><a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+</dd><dt>gif</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>give</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>gives</dt><dd><a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+</dd><dt>giving</dt><dd><a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+</dd><dt>global</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a><br />
+<a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+</dd><dt>globally</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>gnu</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>good</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>grafted</dt><dd><a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+</dd><dt>grammar:</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>greater</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>greater-than</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>group</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>groups</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>grow</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>grows</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>guarantee</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>guaranteed</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>guess</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd></dl><h2>Letter h:</h2><dl><dt>had</dt><dd><a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+</dd><dt>hand</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+</dd><dt>handled</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>handlers</dt><dd><a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+</dd><dt>handles</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>handling</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a><br />
+<a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+</dd><dt>hard</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>has-same-nodes</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+</dd><dt>haystack</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+</dd><dt>head</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>header</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+</dd><dt>headers</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+</dd><dt>heading</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>held</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+</dd><dt>helper</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+</dd><dt>here</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+</dd><dt>heuristic</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>heuristic:</dt><dd><a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+</dd><dt>hex</dt><dd><a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>hierarchy</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+</dd><dt>highly</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+</dd><dt>hold</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>holding</dt><dd><a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlID">_xmlID</a><br />
+<a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+</dd><dt>holds</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>hooks</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+</dd><dt>host</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>hosting</dt><dd><a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+</dd><dt>hostname</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+</dd><dt>hour</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>how</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+</dd><dt>href</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_HREF">XINCLUDE_HREF</a><br />
+</dd><dt>href==NULL</dt><dd><a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+</dd><dt>hrefs</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</dd><dt>html</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>htmlAttrAllowed</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>htmlElemDescPtr</dt><dd><a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+</dd><dt>htmlElementAllowedHere</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>htmlElementStatusHere</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>htmlEntityDescPtr</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+</dd><dt>htmlNodePtr</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>htmlParserCtxtPtr</dt><dd><a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+</dd><dt>htmlParserOption</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadMemory">htmlReadMemory</a><br />
+</dd><dt>htmlStartClose</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+</dd><dt>htmlStartCloseIndex</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+</dd><dt>http:</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>human-readable</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk17.html b/doc/APIchunk17.html
new file mode 100644
index 0000000..070f8ce
--- /dev/null
+++ b/doc/APIchunk17.html
@@ -0,0 +1,580 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index i-i for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index i-i for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter i:</h2><dl><dt>i-xxx</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>iconv</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
+</dd><dt>icu</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a><br />
+</dd><dt>identify</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>identitier</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+</dd><dt>identity-constraint</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>ignorable</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+</dd><dt>ignorableWhitespace</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>ignored</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>ignoring</dt><dd><a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>image</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>imbrication</dt><dd><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+</dd><dt>img</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>immediately</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>immutable</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+</dd><dt>implementation</dt><dd><a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+</dd><dt>implementation-defined</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+</dd><dt>implemented</dt><dd><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>implicitly</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+</dd><dt>implied</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>impossible</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>improves</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>in-</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>in-extenso</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a><br />
+</dd><dt>in-memory</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadMemory">htmlReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseDoc">xmlParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlParseMemory">xmlParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+</dd><dt>incase</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+</dd><dt>incl</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>include</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+</dd><dt>include:</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>included</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+</dd><dt>includes</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</dd><dt>including</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a><br />
+<a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>inclusive</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>increase</dt><dd><a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+</dd><dt>increment</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+</dd><dt>incremental</dt><dd><a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+</dd><dt>indent</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+</dd><dt>indentation</dt><dd><a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>indentation?</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+</dd><dt>indented</dt><dd><a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+</dd><dt>indenting</dt><dd><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+</dd><dt>independently</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+</dd><dt>index</dt><dd><a href="">index</a><br />
+<a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+</dd><dt>indicate</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>indicated</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>indicates</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>indicating</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>indication</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+</dd><dt>indicative</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+</dd><dt>indicator</dt><dd><a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+</dd><dt>indirect</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+</dd><dt>indirectly</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>infinite</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>infinity</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>info</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>information</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+<a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>informations</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+</dd><dt>informative</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>infos</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>inherited</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+</dd><dt>inheriting</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+</dd><dt>inherits</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>initial</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+</dd><dt>initialisation</dt><dd><a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
+</dd><dt>initialization</dt><dd><a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>initialize</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+</dd><dt>initialized</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+</dd><dt>initializes</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+</dd><dt>initiate</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>initiated</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>inline</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>inlined</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>inputs</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>insensitive</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>insert</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>inserted</dt><dd><a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>insertion</dt><dd><a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>inspect</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>instace</dt><dd><a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+</dd><dt>installed</dt><dd><a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+</dd><dt>instances</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+</dd><dt>instead</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>instruction</dt><dd><a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+<a href="html/libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a><br />
+</dd><dt>insufficient</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>intact</dt><dd><a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>integer</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>intended</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>intensively</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>interact</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>interface</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>interfaces</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+</dd><dt>intern</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+</dd><dt>internally</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>interned</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+</dd><dt>interning</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+</dd><dt>interoperability</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>interoperable</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>interprestation</dt><dd><a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+</dd><dt>interpreter</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>intersection</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>introduced</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+</dd><dt>ints</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+</dd><dt>invalid</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>invited</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>isinf</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+</dd><dt>isn</dt><dd><a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+</dd><dt>isnan</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>issue</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>issued</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</dd><dt>issues</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>item</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>items</dt><dd><a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</dd><dt>itself</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk18.html b/doc/APIchunk18.html
new file mode 100644
index 0000000..90249a1
--- /dev/null
+++ b/doc/APIchunk18.html
@@ -0,0 +1,457 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index j-l for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index j-l for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter j:</h2><dl><dt>just</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd></dl><h2>Letter k:</h2><dl><dt>keep</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+</dd><dt>keeps</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>kept</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>keyword</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>kill</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+</dd><dt>kind</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaNotation">_xmlSchemaNotation</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+</dd><dt>know</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>knowledge</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+</dd><dt>known</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+</dd></dl><h2>Letter l:</h2><dl><dt>label</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>labeled</dt><dd><a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>lack</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>lang</dt><dd><a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>langtag</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>language</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>languages</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</dd><dt>large</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>largest</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+</dd><dt>later</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>latest</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+</dd><dt>layer</dt><dd><a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-xmlmemory.html#xmlInitMemory">xmlInitMemory</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+</dd><dt>leading</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>leak</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>least</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>led</dt><dd><a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+</dd><dt>left</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>legacy</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>len</dt><dd><a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrndup">xmlCharStrndup</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>length-1</dt><dd><a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>less</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>less-than</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>level</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-xmlmemory.html#xmlCleanupMemory">xmlCleanupMemory</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>lexical</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>lib</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+</dd><dt>libc</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+</dd><dt>libraries</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
+</dd><dt>library</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-xmlmemory.html#xmlCleanupMemory">xmlCleanupMemory</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>libs</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>libxml</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>libxml1</dt><dd><a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+</dd><dt>libxml2</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>lifetime</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+</dd><dt>like</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>likely</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>limit</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+</dd><dt>limitation</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+</dd><dt>limited</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+</dd><dt>linear</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+</dd><dt>lines</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+</dd><dt>linked</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeLink">_xmlSchemaAttributeLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacetLink">_xmlSchemaFacetLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaTypeLink">_xmlSchemaTypeLink</a><br />
+</dd><dt>linking</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</dd><dt>links</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>listing</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+</dd><dt>lists</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>literal</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>load</dt><dd><a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+</dd><dt>loaded</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>loader</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>loaders</dt><dd><a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+</dd><dt>loading</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+</dd><dt>loads</dt><dd><a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+</dd><dt>loadsubset</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+</dd><dt>local-name</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+</dd><dt>localname</dt><dd><a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+</dd><dt>location</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+</dd><dt>locations</dt><dd><a href="html/libxml-xpointer.html#_xmlLocationSet">_xmlLocationSet</a><br />
+</dd><dt>locator</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+</dd><dt>locators</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</dd><dt>lock</dt><dd><a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>logging</dt><dd><a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>long</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+</dd><dt>longer</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>look-ahead</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>lookahead</dt><dd><a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+</dd><dt>looked</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+</dd><dt>looks</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+</dd><dt>lookups</dt><dd><a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+</dd><dt>loop</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>loops</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>lossless</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+</dd><dt>lower</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+</dd><dt>lowercase</dt><dd><a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk19.html b/doc/APIchunk19.html
new file mode 100644
index 0000000..23f434e
--- /dev/null
+++ b/doc/APIchunk19.html
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index m-m for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index m-m for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter m:</h2><dl><dt>machine</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+</dd><dt>macro</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br />
+</dd><dt>made</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+</dd><dt>main</dt><dd><a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
+</dd><dt>maintained</dt><dd><a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</dd><dt>major</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+</dd><dt>make</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+</dd><dt>makes</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+</dd><dt>malloc</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</dd><dt>mallocAtomicFunc</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>manage</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>manages</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+</dd><dt>mandate</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>manipulated</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+</dd><dt>manipulating</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>manipulation</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
+</dd><dt>many</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>map</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+</dd><dt>maps</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br />
+</dd><dt>mark</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+</dd><dt>marked</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+</dd><dt>marker</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>marking</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+</dd><dt>marks</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+</dd><dt>markup</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+</dd><dt>markupdecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>masked</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>matched</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>matches</dt><dd><a href="html/libxml-xpathInternals.html#CHECK_ARITY">CHECK_ARITY</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileMatch">xmlFileMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPMatch">xmlIOFTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPMatch">xmlIOHTTPMatch</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>matching</dt><dd><a href="html/libxml-xmlIO.html#xmlFileMatch">xmlFileMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPMatch">xmlIOFTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPMatch">xmlIOHTTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>max</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+</dd><dt>maxLength</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>maximal</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+</dd><dt>maximum</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>maybe</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>mean</dt><dd><a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+</dd><dt>means</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>mechanism</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+</dd><dt>mechanisms</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>meet</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>member</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>member-types</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>memo</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+</dd><dt>memorylist</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a><br />
+</dd><dt>merged</dt><dd><a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+</dd><dt>merging</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+</dd><dt>messages</dt><dd><a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>method</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>might</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>migrate</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>min</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>minLength</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>minimal</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>minimum</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+</dd><dt>minus</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>minute</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>misc</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>misleading</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>missing</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>mixed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>mixed-content</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>mmap</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+</dd><dt>mod</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+</dd><dt>mode</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+</dd><dt>model</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+</dd><dt>modified</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+</dd><dt>modifies</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+</dd><dt>modify</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>module</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+</dd><dt>modules</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+</dd><dt>moment</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>month</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>more</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>moreover</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+</dd><dt>most</dt><dd><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+</dd><dt>move</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+</dd><dt>moved</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+</dd><dt>much</dt><dd><a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>multi-threaded</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>multi-threading</dt><dd><a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
+<a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
+</dd><dt>multiple</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+</dd><dt>multiply</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+</dd><dt>multithreaded</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+</dd><dt>mutex</dt><dd><a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</dd><dt>myDoc</dt><dd><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+</dd><dt>myproxy</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>myproxy:3128</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk2.html b/doc/APIchunk2.html
new file mode 100644
index 0000000..1d10f93
--- /dev/null
+++ b/doc/APIchunk2.html
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index D-E for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index D-E for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter D:</h2><dl><dt>DEBUG_MEMORY</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+</dd><dt>DEBUG_MEMORY_FREED</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+</dd><dt>DEBUG_MEMORY_LOCATION</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+</dd><dt>DELE</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+</dd><dt>DELEGATE</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>DEMO</dt><dd><a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+</dd><dt>DEPRECATED</dt><dd><a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+<a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+</dd><dt>DIGIT</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>DOCTYPE</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+</dd><dt>DOM-wrapper</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+</dd><dt>DTDs</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>Data</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+</dd><dt>Datatype</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>Datatypes</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+</dd><dt>Deallocate</dt><dd><a href="html/libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br />
+<a href="html/libxml-entities.html#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeIDTable">xmlFreeIDTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeNotationTable">xmlFreeNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+<a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br />
+<a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
+</dd><dt>Deallocates</dt><dd><a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br />
+</dd><dt>Debugging</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+</dd><dt>Declaration</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+</dd><dt>Declared</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+</dd><dt>Default</dt><dd><a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>DefaultDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>Deletes</dt><dd><a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br />
+</dd><dt>Depth</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>Dereference</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
+</dd><dt>DeregisterNodeFunc</dt><dd><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+</dd><dt>Deseret</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsDeseret">xmlUCSIsDeseret</a><br />
+</dd><dt>Determine</dt><dd><a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+</dd><dt>Devanagari</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a><br />
+</dd><dt>Different</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>Digit</dt><dd><a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+</dd><dt>Digits</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>Digits?</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>Dingbats</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsDingbats">xmlUCSIsDingbats</a><br />
+</dd><dt>Display</dt><dd><a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+</dd><dt>Displays</dt><dd><a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+</dd><dt>DocBook</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+</dd><dt>Docbook</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+</dd><dt>Document</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+</dd><dt>Does</dt><dd><a href="html/libxml-SAX.html#hasExternalSubset">hasExternalSubset</a><br />
+<a href="html/libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#hasInternalSubset">hasInternalSubset</a><br />
+<a href="html/libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>Douglas</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>Draft</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>DtD</dt><dd><a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>DtDs</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+</dd><dt>Dtd</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>Dumps</dt><dd><a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+</dd><dt>Duplicate</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-list.html#xmlListDup">xmlListDup</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+</dd></dl><h2>Letter E:</h2><dl><dt>ELEMENT</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>EMPTY</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>ENTITIES</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>ENTITY</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>ENTITY_REF</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+</dd><dt>ENTITY_REFs</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</dd><dt>ETag</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+</dd><dt>EXSLT</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>Element</dt><dd><a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>ElementTable</dt><dd><a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+</dd><dt>Empties</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a><br />
+</dd><dt>EmptyElemTag</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>EmptyElement</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>EncName</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+</dd><dt>Encapsulating</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>EnclosedAlphanumerics</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedAlphanumerics">xmlUCSIsEnclosedAlphanumerics</a><br />
+</dd><dt>EnclosedCJKLettersandMonths</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedCJKLettersandMonths">xmlUCSIsEnclosedCJKLettersandMonths</a><br />
+</dd><dt>Encoding</dt><dd><a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>EncodingDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+</dd><dt>EncodingDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+</dd><dt>End</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndPI">xmlTextWriterEndPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+</dd><dt>End-of-Line</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>Ensures</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>Entities</dt><dd><a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>EntitiesTable</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+</dd><dt>Entity</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>EntityDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>EntityDef</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>EntityRef</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>EntityReference</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+</dd><dt>EntityValue</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+</dd><dt>Enumerated</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+</dd><dt>EnumeratedType</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+</dd><dt>Enumeration</dt><dd><a href="html/libxml-tree.html#_xmlEnumeration">_xmlEnumeration</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+</dd><dt>Equal</dt><dd><a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+</dd><dt>Escaping</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>Ethiopic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsEthiopic">xmlUCSIsEthiopic</a><br />
+</dd><dt>Evaluate</dt><dd><a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>Evaluates</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+</dd><dt>Everything</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>Examines</dt><dd><a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+</dd><dt>Exclusive</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>Existing</dt><dd><a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</dd><dt>Exp</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+</dd><dt>Experimental</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>Expr</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>Expresses</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>Expression</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+</dd><dt>Extender</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+</dd><dt>External</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+</dd><dt>ExternalID</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>Extract</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk20.html b/doc/APIchunk20.html
new file mode 100644
index 0000000..0317066
--- /dev/null
+++ b/doc/APIchunk20.html
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index n-n for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index n-n for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter n:</h2><dl><dt>named</dt><dd><a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+</dd><dt>names</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>namespace-binding</dt><dd><a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+</dd><dt>namespace-uri</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+</dd><dt>namespace:</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>namespaces</dt><dd><a href="html/libxml-xpath.html#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>naming</dt><dd><a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+</dd><dt>nbBytes</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+</dd><dt>nbval</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>ncname</dt><dd><a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+</dd><dt>ndata</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+</dd><dt>nearest</dt><dd><a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>nearly</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>necessary</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+</dd><dt>needed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>needing</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>needle</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+</dd><dt>needs</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>negated</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+</dd><dt>negative</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>neither</dt><dd><a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>nested</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>net</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>network</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlReadFile">xmlReadFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+</dd><dt>nice</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>nillable</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+</dd><dt>nod</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+</dd><dt>node-</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>node-set?</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+</dd><dt>nodeInfos</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>nodelist</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+</dd><dt>nodes1</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+</dd><dt>nodes2</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+</dd><dt>nodeset</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>nodesets</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+</dd><dt>non</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+</dd><dt>non-CDATA</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>non-NULL</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+</dd><dt>non-UTF-8</dt><dd><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>non-blank</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>non-determinist</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>non-empty</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+</dd><dt>non-final</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+</dd><dt>non-negative</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>non-normative</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>non-null</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+</dd><dt>non-recursive</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>non-stateless</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>non-validating</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+</dd><dt>non-zero</dt><dd><a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+</dd><dt>none</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+</dd><dt>nor</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+</dd><dt>normal</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>normalization</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>normalization:</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>normalizations</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>normalize</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>normalize-space</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>normalized</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>normalizing</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>normally</dt><dd><a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+<a href="">c</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>notations</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>note</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+</dd><dt>notice</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>now</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>ns-binding</dt><dd><a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+</dd><dt>ns-decls</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>ns-references</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>nsDef</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>null</dt><dd><a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+</dd><dt>null-terminated</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>number:</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_VERSION">LIBXML_VERSION</a><br />
+</dd><dt>number?</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>numbers</dt><dd><a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>numeric</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk21.html b/doc/APIchunk21.html
new file mode 100644
index 0000000..c655198
--- /dev/null
+++ b/doc/APIchunk21.html
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index o-o for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index o-o for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter o:</h2><dl><dt>object?</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNumberFunction">xmlXPathNumberFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>objects</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+</dd><dt>objects:</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+</dd><dt>obligated</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+</dd><dt>obsolete</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>obsolete:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+</dd><dt>occupied</dt><dd><a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>occur</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>occured</dt><dd><a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+</dd><dt>occurences</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+</dd><dt>occurred</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+</dd><dt>occurrence</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+</dd><dt>occurrences</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>occurs</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+</dd><dt>octets</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>of:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>off</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>okay</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>old</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+</dd><dt>oldNs</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>older</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>omitted</dt><dd><a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>once</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>ones</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+</dd><dt>ononymous</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+</dd><dt>onto</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>opaque</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>open</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-tree.html#xmlDocDump">xmlDocDump</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+</dd><dt>opening</dt><dd><a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+</dd><dt>operands</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>operating</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+</dd><dt>operation</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>operations</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>operator</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>operators</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>opposite</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>optimized</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+</dd><dt>option</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
+</dd><dt>options</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>ordered</dt><dd><a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+</dd><dt>ordering</dt><dd><a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+</dd><dt>org</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>oriented</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>origin</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>original</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+</dd><dt>other</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>our</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>out</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>out-of</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>output?</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+</dd><dt>outside</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>over</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+</dd><dt>overflow</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+</dd><dt>override</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>overriding</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+</dd><dt>overwrite</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+</dd><dt>overwritten</dt><dd><a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+</dd><dt>own</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlCleanupMemory">xmlCleanupMemory</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>owned</dt><dd><a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+</dd><dt>owner</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>ownership</dt><dd><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+</dd><dt>owning</dt><dd><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+</dd><dt>owns</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk22.html b/doc/APIchunk22.html
new file mode 100644
index 0000000..2f20018
--- /dev/null
+++ b/doc/APIchunk22.html
@@ -0,0 +1,599 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index p-p for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index p-p for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter p:</h2><dl><dt>pairs</dt><dd><a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+</dd><dt>param</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+</dd><dt>parameter-entity</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>parameters</dt><dd><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+<a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+</dd><dt>parent-</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+</dd><dt>parentheses</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>parenthesis</dt><dd><a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</dd><dt>parenthesized</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>parents</dt><dd><a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+</dd><dt>partial</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+</dd><dt>particular</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+</dd><dt>pass</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+</dd><dt>passed</dt><dd><a href="html/libxml-xpathInternals.html#CHECK_ARITY">CHECK_ARITY</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>passive</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+</dd><dt>password</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>past</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>paste</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>path</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+</dd><dt>pathological</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>pattern</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>patterns</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+</dd><dt>pcdata</dt><dd><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+<a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
+</dd><dt>pedantic</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+</dd><dt>per</dt><dd><a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>per-thread</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+</dd><dt>performance</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>performed</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>permanently</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>pertain</dt><dd><a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+</dd><dt>pertains</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+</dd><dt>phase</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</dd><dt>pic1</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>piece</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+</dd><dt>pieces</dt><dd><a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>place</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+</dd><dt>places</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+</dd><dt>platforms</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>plug</dt><dd><a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+</dd><dt>plugin</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>plugins</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>plus</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+</dd><dt>pnetlib-doc</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>pointed</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+</dd><dt>pointers</dt><dd><a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>points</dt><dd><a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br />
+</dd><dt>pop</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+</dd><dt>popped</dt><dd><a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+</dd><dt>pops</dt><dd><a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>port</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>portability</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>portable</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>pos</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>position:</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>positioned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+</dd><dt>positionned</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+</dd><dt>positions</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>possible</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>possibly</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>posteriori</dt><dd><a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+</dd><dt>potential</dt><dd><a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+</dd><dt>potentially</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>practice</dt><dd><a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+</dd><dt>pre-interned</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>preallocated</dt><dd><a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+</dd><dt>precede</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+</dd><dt>preceded</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>precedes</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+</dd><dt>preceding</dt><dd><a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>preceding-sibling</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>precisely</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>precompiled</dt><dd><a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+</dd><dt>precomputed</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>predefined</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a><br />
+<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+</dd><dt>predicate</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>preferably</dt><dd><a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+</dd><dt>preference</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+</dd><dt>prefixes</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>preparing</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>preparsed</dt><dd><a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+</dd><dt>prepend</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>present</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>preserve</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>preserved</dt><dd><a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>preserving</dt><dd><a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+</dd><dt>prev</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>prevent</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>previous</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>primitive</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+</dd><dt>print</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</dd><dt>printed</dt><dd><a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+</dd><dt>prior</dt><dd><a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+</dd><dt>private</dt><dd><a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+</dd><dt>privateuse</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>problem</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+</dd><dt>problems</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</dd><dt>procedure</dt><dd><a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+</dd><dt>process</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>processed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>processing-instruction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+</dd><dt>processing-instruction-node</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>processing-instruction-nodes</dt><dd><a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>processor</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>procgressed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>produce</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</dd><dt>produced</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>producing</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>production:</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>productions</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>program</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>programs</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+</dd><dt>progresses</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</dd><dt>progressive</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</dd><dt>prohibited</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+</dd><dt>projects</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>prolog</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+</dd><dt>prompt</dt><dd><a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+</dd><dt>proper</dt><dd><a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+</dd><dt>properly</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>properties</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+</dd><dt>property</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+</dd><dt>protocol</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>prototype</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</dd><dt>provenance</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+</dd><dt>provide</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+</dd><dt>provides</dt><dd><a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+</dd><dt>providing</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+</dd><dt>provoked</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>proximity</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>proxy</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>prune</dt><dd><a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+</dd><dt>pthread_t</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>pthreads</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>publicID</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>pull</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>pure</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+</dd><dt>purposes</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</dd><dt>push</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+</dd><dt>pushed</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+</dd><dt>pushing</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+</dd><dt>put</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+</dd><dt>putative</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>pwd</dt><dd><a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk23.html b/doc/APIchunk23.html
new file mode 100644
index 0000000..16c7c21
--- /dev/null
+++ b/doc/APIchunk23.html
@@ -0,0 +1,668 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index q-r for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index q-r for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter q:</h2><dl><dt>qualified</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+</dd><dt>query</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>quot</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>quotation</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+</dd><dt>quote</dt><dd><a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+</dd><dt>quoted</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+</dd><dt>quotes</dt><dd><a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+</dd><dt>quoting</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+</dd></dl><h2>Letter r:</h2><dl><dt>raise</dt><dd><a href="html/libxml-xpathInternals.html#XP_ERROR">XP_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#XP_ERROR0">XP_ERROR0</a><br />
+</dd><dt>raised</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCheckError">xmlXPathCheckError</a><br />
+</dd><dt>range</dt><dd><a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+</dd><dt>range-to</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+</dd><dt>ranges</dt><dd><a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>rangesets</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>rather</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+</dd><dt>ratio</dt><dd><a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>ration</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+</dd><dt>raw</dt><dd><a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+</dd><dt>re-entrant</dt><dd><a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>reachable</dt><dd><a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+</dd><dt>reached</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+</dd><dt>read-only</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+</dd><dt>readable</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+</dd><dt>reader-</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>reading</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>ready</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+</dd><dt>realloc</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>reallocated</dt><dd><a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+</dd><dt>really</dt><dd><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+</dd><dt>reasonable</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>receive</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+</dd><dt>received</dt><dd><a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+</dd><dt>receives</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>receiving</dt><dd><a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>reclaim</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+</dd><dt>recognized</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>recommendation</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>recommendation:</dt><dd><a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>recomputed</dt><dd><a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+</dd><dt>reconciliate</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>record</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+</dd><dt>recover</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+</dd><dt>recovery</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>recurse</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>recursive</dt><dd><a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>recursively</dt><dd><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>redeclared</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>redefined</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
+</dd><dt>redefinition</dt><dd><a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+</dd><dt>redir</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+</dd><dt>redirected</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+</dd><dt>redirection</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+</dd><dt>reentrant</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</dd><dt>ref</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+</dd><dt>referenced</dt><dd><a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>referencing</dt><dd><a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+</dd><dt>referred</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+</dd><dt>refs</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>refuse</dt><dd><a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+</dd><dt>regex</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+</dd><dt>regexp</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeRegexp">xmlRegFreeRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+</dd><dt>regexps</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>region</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>register</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+</dd><dt>registered</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+</dd><dt>registers</dt><dd><a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</dd><dt>registration</dt><dd><a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a><br />
+</dd><dt>regular</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+</dd><dt>reinitialize</dt><dd><a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+</dd><dt>related</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>relationships</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>relative</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>relative-ref</dt><dd><a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>relativeURI</dt><dd><a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+</dd><dt>release</dt><dd><a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>releases</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+</dd><dt>reliable</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+</dd><dt>rely</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>remainder</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>remaining</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>remapped</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>remote</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+</dd><dt>removal</dt><dd><a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+</dd><dt>remove</dt><dd><a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+</dd><dt>removed</dt><dd><a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>removes</dt><dd><a href="html/libxml-parserInternals.html#xmlParserInputShrink">xmlParserInputShrink</a><br />
+</dd><dt>removing</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>rename</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>repeat</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>repeated</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+</dd><dt>repetition</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+</dd><dt>replace</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>replaced</dt><dd><a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>replacement</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>replaces</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+</dd><dt>replacing</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>reporting</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+</dd><dt>reports</dt><dd><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+</dd><dt>repr</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</dd><dt>representation</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+</dd><dt>representations</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>represented</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>represented:</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>representing</dt><dd><a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+</dd><dt>request</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+</dd><dt>requested</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+</dd><dt>requests</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+</dd><dt>required</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
+<a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>requires</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+</dd><dt>requred</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+</dd><dt>reserved</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+</dd><dt>reset</dt><dd><a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>resides</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+</dd><dt>resize</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+</dd><dt>resolution</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>resolveEntity</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+</dd><dt>resolved</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+</dd><dt>resolver</dt><dd><a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+</dd><dt>resources</dt><dd><a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br />
+<a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</dd><dt>resp</dt><dd><a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+</dd><dt>respect</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+</dd><dt>respecting</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>responsability</dt><dd><a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</dd><dt>response</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+</dd><dt>responsible</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+</dd><dt>restored</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+</dd><dt>restrict</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>restriction</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+</dd><dt>results</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+</dd><dt>retValue</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>retrieve</dt><dd><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+</dd><dt>retrieved</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</dd><dt>retry</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>returning</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>reusal</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>reuse</dt><dd><a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+</dd><dt>reused</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>reuses</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+</dd><dt>reusing</dt><dd><a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+</dd><dt>reverse</dt><dd><a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>rewrite</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>rfc</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>rfc-editor</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>rfc5646</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>right</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+</dd><dt>role</dt><dd><a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</dd><dt>roles</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</dd><dt>rollback</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>root</dt><dd><a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
+</dd><dt>round</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+</dd><dt>routines</dt><dd><a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+</dd><dt>rule</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>rules</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>run</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+</dd><dt>running</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>runtime</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk24.html b/doc/APIchunk24.html
new file mode 100644
index 0000000..e81f34d
--- /dev/null
+++ b/doc/APIchunk24.html
@@ -0,0 +1,1001 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index s-s for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index s-s for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter s:</h2><dl><dt>s390</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>safe</dt><dd><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>safety</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+</dd><dt>same</dt><dd><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
+<a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+</dd><dt>save</dt><dd><a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+</dd><dt>saved</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+</dd><dt>saves</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</dd><dt>saving</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+</dd><dt>sax</dt><dd><a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>say</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>says</dt><dd><a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+</dd><dt>scan</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>scanner</dt><dd><a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+</dd><dt>scanning</dt><dd><a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+</dd><dt>scannner</dt><dd><a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+</dd><dt>schemas</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+</dd><dt>schematron</dt><dd><a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+</dd><dt>scheme</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>schemes</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>scope</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+</dd><dt>scoping</dt><dd><a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+</dd><dt>script</dt><dd><a href="html/libxml-HTMLparser.html#htmlIsScriptAttribute">htmlIsScriptAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>search</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathAxis">_xmlXPathAxis</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+</dd><dt>searched</dt><dd><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+</dd><dt>section</dt><dd><a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+</dd><dt>sections</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd><dt>seems</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</dd><dt>selected</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>selection</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+</dd><dt>selects</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>self</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+</dd><dt>semantic</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</dd><dt>semantics</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>sense</dt><dd><a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+</dd><dt>separated</dt><dd><a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+</dd><dt>separately</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>seq</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+</dd><dt>sequence</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>sequences</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>sequqnce</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+</dd><dt>serialization</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+</dd><dt>serialized</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+</dd><dt>serializing</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</dd><dt>server</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+</dd><dt>set:difference</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+</dd><dt>set:distinct</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+</dd><dt>set:has-same-node</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+</dd><dt>set:intersection</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>set:leading</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+</dd><dt>set:trailing</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>sets</dt><dd><a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>setting</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>setups</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+</dd><dt>severity</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+</dd><dt>sgmlsource</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+</dd><dt>shadowed</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+</dd><dt>shall</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>shared</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+</dd><dt>shares</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+</dd><dt>shell</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</dd><dt>shorten</dt><dd><a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+</dd><dt>shortest</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>shorthand</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+</dd><dt>show</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+</dd><dt>shown</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>sibling</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>siblings</dt><dd><a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+</dd><dt>sign</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>signal</dt><dd><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>signature</dt><dd><a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+</dd><dt>signs</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>similar</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>simple</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</dd><dt>simpleType</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+</dd><dt>simply</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>since</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+</dd><dt>single</dt><dd><a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+</dd><dt>single-byte</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a><br />
+</dd><dt>singleton</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>site1</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>site2</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>size_t</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+</dd><dt>sizes</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>skip</dt><dd><a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>skipped</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>slot</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>slots</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>small</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>smaller</dt><dd><a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>smallest</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+</dd><dt>socket</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+</dd><dt>sockets</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+</dd><dt>software</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>solution</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>some</dt><dd><a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+</dd><dt>somehow</dt><dd><a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+</dd><dt>sometimes</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+</dd><dt>somewhat</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>sorted</dt><dd><a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>sounds</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>source</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+</dd><dt>sourceDoc</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>sourceforge</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>spaces</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>span</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+</dd><dt>spec</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+</dd><dt>spec:</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK">IS_BLANK</a><br />
+<a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+<a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+</dd><dt>special</dt><dd><a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
+<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+</dd><dt>specialized</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+</dd><dt>specific</dt><dd><a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+</dd><dt>specification</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>specifications</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>specify</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+</dd><dt>specifying</dt><dd><a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</dd><dt>speed</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>speedup</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+</dd><dt>split</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>stacked</dt><dd><a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+</dd><dt>stage</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a><br />
+</dd><dt>stamps</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>standalone</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+</dd><dt>standalone=</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>standalone?</dt><dd><a href="html/libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a><br />
+</dd><dt>standard</dt><dd><a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>start</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+</dd><dt>start-tag</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>started</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+</dd><dt>starting</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+</dd><dt>starts</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a><br />
+</dd><dt>starts-with</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a><br />
+</dd><dt>startup</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>stashed</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+</dd><dt>stat</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+</dd><dt>stateful</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>states</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>static</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>status</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+</dd><dt>stderr</dt><dd><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+</dd><dt>stdin</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+</dd><dt>stdout</dt><dd><a href="html/libxml-HTMLtree.html#htmlSaveFile">htmlSaveFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>step</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>steps</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+</dd><dt>still</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+</dd><dt>stop</dt><dd><a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</dd><dt>stops</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>storage</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>store</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>stored</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>stores</dt><dd><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+</dd><dt>str</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+</dd><dt>strcasecmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+</dd><dt>strcat</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+</dd><dt>strchr</dt><dd><a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+</dd><dt>strcmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+</dd><dt>strdup</dt><dd><a href="html/libxml-xmlstring.html#xmlCharStrdup">xmlCharStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+</dd><dt>streamable</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+</dd><dt>streaming</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>streams</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+</dd><dt>strict</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+</dd><dt>string--that</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+</dd><dt>string-length</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>string?</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>stringi</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+</dd><dt>strings</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>stripping</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>strncasecmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+</dd><dt>strncat</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+</dd><dt>strncmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+</dd><dt>strndup</dt><dd><a href="html/libxml-xmlstring.html#xmlCharStrndup">xmlCharStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+</dd><dt>strstr</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+</dd><dt>struct</dt><dd><a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>structured</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>structures</dt><dd><a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
+<a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
+<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+</dd><dt>struture</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+</dd><dt>stuff</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>style</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>sub</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+</dd><dt>sub-elements</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>subelement</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlDefaultSubelement">htmlDefaultSubelement</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+</dd><dt>subelements</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>subexpression</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</dd><dt>subexpressions</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>subject</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>sublanguage</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>submits</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+</dd><dt>subsequent</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>subset?</dt><dd><a href="html/libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a><br />
+</dd><dt>subsets</dt><dd><a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>substituion</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a><br />
+</dd><dt>substitute</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>substituted</dt><dd><a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+</dd><dt>substituting</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>substitutionGroup</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
+</dd><dt>substitutions</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+</dd><dt>substitutions:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a><br />
+</dd><dt>substring</dt><dd><a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>substring-after</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+</dd><dt>substring-before</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+</dd><dt>subtag</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>subtags</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>subtraction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+</dd><dt>subtree</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+</dd><dt>succeed</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+</dd><dt>succeeded</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>succeeds</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+</dd><dt>successful</dt><dd><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+</dd><dt>successfully</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+</dd><dt>succession</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+</dd><dt>successive</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+</dd><dt>sucessors</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>such</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+</dd><dt>suffix</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+</dd><dt>suggested</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>suitable</dt><dd><a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>sum</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSumFunction">xmlXPathSumFunction</a><br />
+</dd><dt>super</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>super-strict</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>supplied</dt><dd><a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+</dd><dt>supported</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>supposed</dt><dd><a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+</dd><dt>sure</dt><dd><a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+</dd><dt>surprising</dt><dd><a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+</dd><dt>surrogate</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>switch</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+</dd><dt>symbol</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>synchronizing</dt><dd><a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+</dd><dt>syntax</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>systematically</dt><dd><a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk25.html b/doc/APIchunk25.html
new file mode 100644
index 0000000..dec65ba
--- /dev/null
+++ b/doc/APIchunk25.html
@@ -0,0 +1,451 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index t-t for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index t-t for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter t:</h2><dl><dt>tag</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+</dd><dt>tagged</dt><dd><a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+<a href="html/libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a><br />
+</dd><dt>tags</dt><dd><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+</dd><dt>take</dt><dd><a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+</dd><dt>taken</dt><dd><a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+</dd><dt>takes</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+</dd><dt>tatkes</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+</dd><dt>tell</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>tells</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>temporary</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+</dd><dt>terminal</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>terminals</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>terminated</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+</dd><dt>termination</dt><dd><a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+</dd><dt>terms</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>test</dt><dd><a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+</dd><dt>tested</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>testing</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</dd><dt>text-</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd><dt>text-node</dt><dd><a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+</dd><dt>textDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+</dd><dt>their</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>them</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>these</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>they</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>third</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>this?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>those</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>though</dt><dd><a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+</dd><dt>thread</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>through</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+</dd><dt>thumblers</dt><dd><a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd><dt>thus</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+</dd><dt>tight</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>time</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>title</dt><dd><a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</dd><dt>titles</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</dd><dt>todo:</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>token</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+</dd><dt>token_r</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</dd><dt>tokens</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>too</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-tree.html#xmlFreeProp">xmlFreeProp</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+</dd><dt>top</dt><dd><a href="html/libxml-xpathInternals.html#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_NUMBER">CAST_TO_NUMBER</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE">CHECK_TYPE</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE0">CHECK_TYPE0</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+<a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+</dd><dt>total</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>touch</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>track</dt><dd><a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+</dd><dt>tracking</dt><dd><a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+</dd><dt>trailing</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>trancoding</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</dd><dt>transaction</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+</dd><dt>transcoding</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+</dd><dt>transfered</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+</dd><dt>transformation</dt><dd><a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>transformed</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+</dd><dt>transitions</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>translate</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>translation</dt><dd><a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>transmit</dt><dd><a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+</dd><dt>transport</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+</dd><dt>traversal</dt><dd><a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>traverse</dt><dd><a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>treaming</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>treated</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>tried</dt><dd><a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+</dd><dt>tries</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>trio</dt><dd><a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>troubles</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>try</dt><dd><a href="html/libxml-xpathInternals.html#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_NUMBER">CAST_TO_NUMBER</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
+<a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>ttribute</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+</dd><dt>tune</dt><dd><a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+</dd><dt>tuple</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</dd><dt>tuples</dt><dd><a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+</dd><dt>turn</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+</dd><dt>turned</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+</dd><dt>two</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+</dd><dt>two-character</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>txt</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>type:</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>typefixed</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
+</dd><dt>types</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk26.html b/doc/APIchunk26.html
new file mode 100644
index 0000000..c68ae92
--- /dev/null
+++ b/doc/APIchunk26.html
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index u-v for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index u-v for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter u:</h2><dl><dt>ugly</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+</dd><dt>unary</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+</dd><dt>unclean</dt><dd><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+</dd><dt>uncompressed</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+</dd><dt>under</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+</dd><dt>underlying</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>understand</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>unescape</dt><dd><a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>unescaped</dt><dd><a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>unescaping</dt><dd><a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>unfriendly</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+</dd><dt>unicode</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+</dd><dt>unimplemented</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+</dd><dt>union</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>unique</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>uniquely</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>uniqueness</dt><dd><a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>units</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>unknown</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBlock">xmlUCSIsBlock</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br />
+</dd><dt>unless</dt><dd><a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+</dd><dt>unlink</dt><dd><a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>unlinked</dt><dd><a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>unload</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+</dd><dt>unloaded</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+</dd><dt>unlock</dt><dd><a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</dd><dt>unparsed</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+</dd><dt>unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</dd><dt>unpredictable</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+</dd><dt>unpredictiable</dt><dd><a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>unregisters</dt><dd><a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+</dd><dt>unsafe</dt><dd><a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</dd><dt>unsigned</dt><dd><a href="">c</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>unsupported</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>until</dt><dd><a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+</dd><dt>unused</dt><dd><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</dd><dt>update</dt><dd><a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+</dd><dt>updated</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+</dd><dt>upon</dt><dd><a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+</dd><dt>upper</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+</dd><dt>uri</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>usage</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>used:</dt><dd><a href="html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a><br />
+</dd><dt>used?</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>useful</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+</dd><dt>useless</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>userData</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>users</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+</dd><dt>uses</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>usual</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>usually</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+<a href="">c</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>utf8</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd></dl><h2>Letter v:</h2><dl><dt>val1</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>valgrind</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>validated</dt><dd><a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</dd><dt>validates</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>validating</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+</dd><dt>validator</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+</dd><dt>validity</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>value:</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>values:</dt><dd><a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>varags</dt><dd><a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+</dd><dt>vararg</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>variables</dt><dd><a href="html/libxml-xpath.html#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+</dd><dt>variant</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>variants</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>variety</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+</dd><dt>various</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+</dd><dt>versions</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+</dd><dt>very</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>via</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+</dd><dt>view</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>violated</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>visible</dt><dd><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+</dd><dt>void</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>volume</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk27.html b/doc/APIchunk27.html
new file mode 100644
index 0000000..cabaa27
--- /dev/null
+++ b/doc/APIchunk27.html
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index w-w for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index w-w for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter w:</h2><dl><dt>walker</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</dd><dt>walking</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</dd><dt>want</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+</dd><dt>warn</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+</dd><dt>warning</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>warnings</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+</dd><dt>way</dt><dd><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+</dd><dt>ways:</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>well</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>well-balanced</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>well-formed</dt><dd><a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>well-formedness</dt><dd><a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+</dd><dt>wellformed</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+</dd><dt>were</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+</dd><dt>wether</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+</dd><dt>what</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+</dd><dt>where</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+</dd><dt>while</dt><dd><a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>white</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>whitespace</dt><dd><a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>whitespace-facet</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a><br />
+</dd><dt>whitespace-separated</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>whitespaces</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+</dd><dt>whole</dt><dd><a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+</dd><dt>whose</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+</dd><dt>why</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</dd><dt>wierd</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>wildcard</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br />
+</dd><dt>wildcards</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+</dd><dt>windows</dt><dd><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+</dd><dt>with_ns</dt><dd><a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+</dd><dt>within</dt><dd><a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+</dd><dt>without</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>won</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>word</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>words</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+</dd><dt>work</dt><dd><a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>worked</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+</dd><dt>works</dt><dd><a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+</dd><dt>worry</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+</dd><dt>worthwhile</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>would</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>wrapper</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>wraps</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+</dd><dt>write</dt><dd><a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</dd><dt>writer</dt><dd><a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+</dd><dt>writes</dt><dd><a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+</dd><dt>writing</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+</dd><dt>wrt</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>www</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk28.html b/doc/APIchunk28.html
new file mode 100644
index 0000000..c5993f9
--- /dev/null
+++ b/doc/APIchunk28.html
@@ -0,0 +1,565 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index x-x for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index x-x for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter x:</h2><dl><dt>x00B7</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x02D0</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x02D1</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x0387</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x0640</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x0E46</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x0EC6</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x10000-</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>x10FFFF</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>x20</dt><dd><a href="html/libxml-parserInternals.html#IS_BLANK">IS_BLANK</a><br />
+<a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+</dd><dt>x20-</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>x3005</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x3007</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+</dd><dt>x3021-</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+</dd><dt>x3029</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+</dd><dt>x3031-</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x3035</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x309D-</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x309E</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x30FC-</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x30FE</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+</dd><dt>x4E00-</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+</dd><dt>x9FA5</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+</dd><dt>xD7FF</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>xE000-</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>xFFFD</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>xlink</dt><dd><a href="html/libxml-xlink.html#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
+</dd><dt>xlinkHandlerPtr</dt><dd><a href="html/libxml-xlink.html#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a><br />
+</dd><dt>xlinkType</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</dd><dt>xml-c14n</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>xml-exc-c14n</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</dd><dt>xml-name</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>xml:</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+</dd><dt>xml:base</dt><dd><a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+</dd><dt>xml:id</dt><dd><a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
+</dd><dt>xml:lang</dt><dd><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+</dd><dt>xml:space</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+</dd><dt>xmlAddDocEntity</dt><dd><a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</dd><dt>xmlAttr</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+</dd><dt>xmlAttrPtr</dt><dd><a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+</dd><dt>xmlAttributePtr</dt><dd><a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+</dd><dt>xmlAttributeTablePtr</dt><dd><a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+</dd><dt>xmlBufNodeDump</dt><dd><a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+</dd><dt>xmlBufPtr</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+</dd><dt>xmlBuffer</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+</dd><dt>xmlBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+</dd><dt>xmlBufferShrink</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+</dd><dt>xmlBuildURI</dt><dd><a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+</dd><dt>xmlBytesConsumed</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+</dd><dt>xmlCatalogAllow</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+</dd><dt>xmlCatalogPtr</dt><dd><a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+</dd><dt>xmlCatalogResolvePublic</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+</dd><dt>xmlCatalogResolveSystem</dt><dd><a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+</dd><dt>xmlCharEncoding</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+</dd><dt>xmlCharEncodingHandler</dt><dd><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</dd><dt>xmlCharEncodingHandlerPtr</dt><dd><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+</dd><dt>xmlCharEncodingInputFunc</dt><dd><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</dd><dt>xmlCharEncodingOutputFunc</dt><dd><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</dd><dt>xmlChars</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+</dd><dt>xmlCleanupParser</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>xmlCleanupThreads</dt><dd><a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd><dt>xmlCopyDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+</dd><dt>xmlCreateIntSubset</dt><dd><a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+</dd><dt>xmlDOMWrapCtxtPtr</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+</dd><dt>xmlDefaultSAXLocator</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>xmlDoc</dt><dd><a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+</dd><dt>xmlDocCopyNodeList</dt><dd><a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+</dd><dt>xmlDocNewPI</dt><dd><a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+</dd><dt>xmlDocProperties</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>xmlDocPtr</dt><dd><a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+</dd><dt>xmlDtdPtr</dt><dd><a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+</dd><dt>xmlElementContentPtr</dt><dd><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>xmlElementPtr</dt><dd><a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+</dd><dt>xmlElementTablePtr</dt><dd><a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+</dd><dt>xmlEncodeEntities</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+</dd><dt>xmlEncodeEntitiesReentrant</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+</dd><dt>xmlEncodeSpecialChars</dt><dd><a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+</dd><dt>xmlEntitiesTablePtr</dt><dd><a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+</dd><dt>xmlEntityPtr</dt><dd><a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+</dd><dt>xmlEnumerationPtr</dt><dd><a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+</dd><dt>xmlExpFree</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+</dd><dt>xmlExpRef</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+</dd><dt>xmlExternalEntityLoader</dt><dd><a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+</dd><dt>xmlFileOpen_real</dt><dd><a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+</dd><dt>xmlFree</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+</dd><dt>xmlFreeDoc</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+</dd><dt>xmlFreeDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+</dd><dt>xmlFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+</dd><dt>xmlFreeNode</dt><dd><a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>xmlFreeStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+</dd><dt>xmlGetGlobalState</dt><dd><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+</dd><dt>xmlGetNoNsProp</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+</dd><dt>xmlGetNsProp</dt><dd><a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+</dd><dt>xmlGetProp</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+</dd><dt>xmlGetThreadId</dt><dd><a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+</dd><dt>xmlHashTablePtr</dt><dd><a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+</dd><dt>xmlIDPtr</dt><dd><a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+</dd><dt>xmlIndentTreeOutput</dt><dd><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+</dd><dt>xmlInitParser</dt><dd><a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+</dd><dt>xmlInitThreads</dt><dd><a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+</dd><dt>xmlInitializeCatalog</dt><dd><a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+</dd><dt>xmlInitializeGlobalState</dt><dd><a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+</dd><dt>xmlInputCloseCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</dd><dt>xmlInputMatchCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</dd><dt>xmlInputOpenCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</dd><dt>xmlInputReadCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</dd><dt>xmlIsBaseCharQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+</dd><dt>xmlIsBaseChar_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+</dd><dt>xmlIsBlankNode</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>xmlIsBlankQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+</dd><dt>xmlIsBlank_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+</dd><dt>xmlIsCharQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+</dd><dt>xmlIsChar_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+</dd><dt>xmlIsCombiningQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+</dd><dt>xmlIsDigitQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+</dd><dt>xmlIsDigit_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+</dd><dt>xmlIsExtenderQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+</dd><dt>xmlIsExtender_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+</dd><dt>xmlIsIdeographicQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+</dd><dt>xmlIsMainThread</dt><dd><a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
+</dd><dt>xmlIsPubidCharQ</dt><dd><a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+</dd><dt>xmlIsPubidChar_ch</dt><dd><a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+</dd><dt>xmlKeepBlanksDefault</dt><dd><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+</dd><dt>xmlListWalk</dt><dd><a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</dd><dt>xmlLoadExtDtdDefaultValue</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+</dd><dt>xmlLocationSetPtr</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+</dd><dt>xmlLockLibrary</dt><dd><a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+</dd><dt>xmlModuleOption</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+</dd><dt>xmlMutexLock</dt><dd><a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+</dd><dt>xmlMutexUnlock</dt><dd><a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+</dd><dt>xmlNanoFTPGet</dt><dd><a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+</dd><dt>xmlNanoFTPList</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>xmlNewChild</dt><dd><a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>xmlNewDocElementContent</dt><dd><a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+</dd><dt>xmlNewDocRawNode</dt><dd><a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+</dd><dt>xmlNewMutex</dt><dd><a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+</dd><dt>xmlNewNode</dt><dd><a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+</dd><dt>xmlNewTextChild</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+</dd><dt>xmlNewTextWriter</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+</dd><dt>xmlNodeListGetString</dt><dd><a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+</dd><dt>xmlNodePtr</dt><dd><a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>xmlNodeSetContent</dt><dd><a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+</dd><dt>xmlNodeSetContentLen</dt><dd><a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+</dd><dt>xmlNodeSetPtr</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+</dd><dt>xmlNodeType</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>xmlNotationPtr</dt><dd><a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+</dd><dt>xmlNotationTablePtr</dt><dd><a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+</dd><dt>xmlNs</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+</dd><dt>xmlNsPtr</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+</dd><dt>xmlOutputBuffer</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+</dd><dt>xmlOutputBufferClose</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</dd><dt>xmlOutputBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+</dd><dt>xmlOutputCloseCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</dd><dt>xmlOutputMatchCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</dd><dt>xmlOutputOpenCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</dd><dt>xmlOutputWriteCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</dd><dt>xmlParseAttValue</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>xmlParseChunk</dt><dd><a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+</dd><dt>xmlParseElementContentDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>xmlParseElementDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>xmlParseExternalID</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>xmlParseFile</dt><dd><a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+</dd><dt>xmlParseNamespace:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>xmlParseURI</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>xmlParserCtxt</dt><dd><a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+</dd><dt>xmlParserCtxtPtr</dt><dd><a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+</dd><dt>xmlParserError</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+</dd><dt>xmlParserErrors</dt><dd><a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+</dd><dt>xmlParserFindNodeInfoIndex</dt><dd><a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+</dd><dt>xmlParserHandleReference</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>xmlParserInputBuffer</dt><dd><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+</dd><dt>xmlParserInputBufferPtr</dt><dd><a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+</dd><dt>xmlParserInputPtr</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlFreeInputStream">xmlFreeInputStream</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>xmlParserNodeInfo</dt><dd><a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+</dd><dt>xmlParserProperties</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+</dd><dt>xmlPattern</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+</dd><dt>xmlPatternFlags</dt><dd><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+</dd><dt>xmlPatternGetStreamCtxt</dt><dd><a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+</dd><dt>xmlPatterncompile</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>xmlPopInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+</dd><dt>xmlPushInput:</dt><dd><a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+</dd><dt>xmlRFreeMutex</dt><dd><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+</dd><dt>xmlRMutexLock</dt><dd><a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+</dd><dt>xmlRMutexUnlock</dt><dd><a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</dd><dt>xmlRNewMutex</dt><dd><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+</dd><dt>xmlReader</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br />
+</dd><dt>xmlRefPtr</dt><dd><a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+</dd><dt>xmlRelaxNGParserFlag</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+</dd><dt>xmlRelaxNGValidatePushElement</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+</dd><dt>xmlSAX2Attribute</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+</dd><dt>xmlSAX2AttributeDecl</dt><dd><a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+</dd><dt>xmlSAX2CDataBlock</dt><dd><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+</dd><dt>xmlSAX2Characters</dt><dd><a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+</dd><dt>xmlSAX2Comment</dt><dd><a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a><br />
+</dd><dt>xmlSAX2ElementDecl</dt><dd><a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+</dd><dt>xmlSAX2EndDocument</dt><dd><a href="html/libxml-SAX.html#endDocument">endDocument</a><br />
+</dd><dt>xmlSAX2EndElement</dt><dd><a href="html/libxml-SAX.html#endElement">endElement</a><br />
+</dd><dt>xmlSAX2EntityDecl</dt><dd><a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+</dd><dt>xmlSAX2ExternalSubset</dt><dd><a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+</dd><dt>xmlSAX2GetColumnNumber</dt><dd><a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+</dd><dt>xmlSAX2GetEntity</dt><dd><a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+</dd><dt>xmlSAX2GetLineNumber</dt><dd><a href="html/libxml-SAX.html#getLineNumber">getLineNumber</a><br />
+</dd><dt>xmlSAX2GetParameterEntity</dt><dd><a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+</dd><dt>xmlSAX2GetPublicId</dt><dd><a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+</dd><dt>xmlSAX2GetSystemId</dt><dd><a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+</dd><dt>xmlSAX2HasExternalSubset</dt><dd><a href="html/libxml-SAX.html#hasExternalSubset">hasExternalSubset</a><br />
+</dd><dt>xmlSAX2HasInternalSubset</dt><dd><a href="html/libxml-SAX.html#hasInternalSubset">hasInternalSubset</a><br />
+</dd><dt>xmlSAX2IgnorableWhitespace</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>xmlSAX2InitDefaultSAXHandler</dt><dd><a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+</dd><dt>xmlSAX2InitDocbDefaultSAXHandler</dt><dd><a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+</dd><dt>xmlSAX2InitHtmlDefaultSAXHandler</dt><dd><a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+</dd><dt>xmlSAX2InternalSubset</dt><dd><a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+</dd><dt>xmlSAX2IsStandalone</dt><dd><a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+</dd><dt>xmlSAX2NotationDecl</dt><dd><a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+</dd><dt>xmlSAX2ProcessingInstruction</dt><dd><a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+</dd><dt>xmlSAX2Reference</dt><dd><a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+</dd><dt>xmlSAX2ResolveEntity</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>xmlSAX2StartDocument</dt><dd><a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+</dd><dt>xmlSAX2StartElement</dt><dd><a href="html/libxml-SAX.html#startElement">startElement</a><br />
+</dd><dt>xmlSAX2UnparsedEntityDecl</dt><dd><a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+</dd><dt>xmlSAXHandlerPtr</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</dd><dt>xmlSAXVersion</dt><dd><a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+</dd><dt>xmlSaveOptions</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</dd><dt>xmlSchemaSAXPlug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+</dd><dt>xmlSchemaValType</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+</dd><dt>xmlSchemaValidOption</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+</dd><dt>xmlSchematronValidOptions</dt><dd><a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+</dd><dt>xmlSetExternalEntityLoader</dt><dd><a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</dd><dt>xmlSnprintfElementContent</dt><dd><a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</dd><dt>xmlStrcmp</dt><dd><a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+</dd><dt>xmlStrdup</dt><dd><a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+</dd><dt>xmlStreamPush</dt><dd><a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+</dd><dt>xmlStringDecodeEntities</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+</dd><dt>xmlStringGetNodeList</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>xmlStrncat</dt><dd><a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+</dd><dt>xmlStrncmp</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+</dd><dt>xmlTextReader</dt><dd><a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>xmlTextReaderCurrentDoc</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>xmlTextReaderLocatorPtr</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+</dd><dt>xmlTextReaderRead</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+</dd><dt>xmlTextWriterStartDTDEntity</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+</dd><dt>xmlTextWriterWriteDTD</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br />
+</dd><dt>xmlTextWriterWritePI</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br />
+</dd><dt>xmlURI</dt><dd><a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+<a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br />
+<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+</dd><dt>xmlURIEscapeStr</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>xmlURIFromPath</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>xmlURIPtr</dt><dd><a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</dd><dt>xmlUnlinkNode</dt><dd><a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+</dd><dt>xmlUnlockLibrary</dt><dd><a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</dd><dt>xmlValidCtxtPtr</dt><dd><a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</dd><dt>xmlValidGetValidElements</dt><dd><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</dd><dt>xmlValidateAttributeDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>xmlValidateAttributeValue</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>xmlValidateOneAttribute</dt><dd><a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>xmlWriter</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+</dd><dt>xmlXPathCheckError</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+</dd><dt>xmlXPathCompExprPtr</dt><dd><a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+</dd><dt>xmlXPathContext</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</dd><dt>xmlXPathError</dt><dd><a href="">err</a><br />
+</dd><dt>xmlXPathEvalPredicate</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>xmlXPathFreeObject</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+</dd><dt>xmlXPathFunction</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+</dd><dt>xmlXPathNodeTrailingSorted</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+</dd><dt>xmlXPathObject</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>xmlXPathObjectPtr</dt><dd><a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewBoolean">xmlXPathNewBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewCString">xmlXPathNewCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</dd><dt>xmlXPathParserContext</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+</dd><dt>xmlXPathTrailingSorted</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+</dd><dt>xmlns</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+</dd><dt>xmlns:???</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+</dd><dt>xmltextReader</dt><dd><a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+</dd><dt>xpath</dt><dd><a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+</dd><dt>xpointer</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk29.html b/doc/APIchunk29.html
new file mode 100644
index 0000000..2aaa21b
--- /dev/null
+++ b/doc/APIchunk29.html
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index y-z for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index y-z for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter y:</h2><dl><dt>year</dt><dd><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</dd><dt>yes</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-tree.html#xmlNodeIsText">xmlNodeIsText</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
+</dd><dt>yet</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+</dd><dt>you</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+</dd><dt>your</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+</dd></dl><h2>Letter z:</h2><dl><dt>zero</dt><dd><a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>zero-based</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+</dd><dt>zeros</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>zlib</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk3.html b/doc/APIchunk3.html
new file mode 100644
index 0000000..515118a
--- /dev/null
+++ b/doc/APIchunk3.html
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index F-I for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index F-I for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter F:</h2><dl><dt>FALSE</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+</dd><dt>FFFE</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>FFFF</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+</dd><dt>FIXED</dt><dd><a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>FREE</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>Facet</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />
+</dd><dt>False</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+</dd><dt>Fetch</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+</dd><dt>File</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>Fills</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+</dd><dt>Find</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+</dd><dt>Finds</dt><dd><a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+</dd><dt>First</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+</dd><dt>Fixed</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>Float</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</dd><dt>Flush</dt><dd><a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFlush">xmlTextWriterFlush</a><br />
+</dd><dt>For</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+</dd><dt>Form</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+</dd><dt>Formating</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+</dd><dt>Formats</dt><dd><a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPatherror">xmlXPatherror</a><br />
+</dd><dt>Formed</dt><dd><a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>Fragment</dt><dd><a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+</dd><dt>Frameset</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>Frees</dt><dd><a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+</dd><dt>Front-end</dt><dd><a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+</dd><dt>Function</dt><dd><a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+<a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+<a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+<a href="html/libxml-tree.html#xmlBufferLength">xmlBufferLength</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+</dd></dl><h2>Letter G:</h2><dl><dt>GCC</dt><dd><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a><br />
+</dd><dt>GEDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>GET</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+</dd><dt>GeneralPunctuation</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGeneralPunctuation">xmlUCSIsGeneralPunctuation</a><br />
+</dd><dt>Generic</dt><dd><a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>GeometricShapes</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGeometricShapes">xmlUCSIsGeometricShapes</a><br />
+</dd><dt>Georgian</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGeorgian">xmlUCSIsGeorgian</a><br />
+</dd><dt>Gets</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a><br />
+</dd><dt>Gives</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+</dd><dt>Global</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>Gothic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGothic">xmlUCSIsGothic</a><br />
+</dd><dt>Greek</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGreek">xmlUCSIsGreek</a><br />
+</dd><dt>GreekExtended</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGreekExtended">xmlUCSIsGreekExtended</a><br />
+</dd><dt>GreekandCoptic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGreekandCoptic">xmlUCSIsGreekandCoptic</a><br />
+</dd><dt>Group</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>Grow</dt><dd><a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+</dd><dt>Guess</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>Gujarati</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGujarati">xmlUCSIsGujarati</a><br />
+</dd><dt>Gurmukhi</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsGurmukhi">xmlUCSIsGurmukhi</a><br />
+</dd></dl><h2>Letter H:</h2><dl><dt>HTML_DEPRECATED</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+</dd><dt>HTML_INVALID</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+</dd><dt>HTML_NA</dt><dd><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</dd><dt>HTML_REQUIRED</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+</dd><dt>HTML_VALID</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+</dd><dt>Hacking</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+</dd><dt>HalfwidthandFullwidthForms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHalfwidthandFullwidthForms">xmlUCSIsHalfwidthandFullwidthForms</a><br />
+</dd><dt>Handle</dt><dd><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathErr">xmlXPathErr</a><br />
+</dd><dt>Handling</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>HangulCompatibilityJamo</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHangulCompatibilityJamo">xmlUCSIsHangulCompatibilityJamo</a><br />
+</dd><dt>HangulJamo</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHangulJamo">xmlUCSIsHangulJamo</a><br />
+</dd><dt>HangulSyllables</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHangulSyllables">xmlUCSIsHangulSyllables</a><br />
+</dd><dt>Hanunoo</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHanunoo">xmlUCSIsHanunoo</a><br />
+</dd><dt>Has</dt><dd><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+</dd><dt>Hash</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>Hebrew</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHebrew">xmlUCSIsHebrew</a><br />
+</dd><dt>Hence</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>HighPrivateUseSurrogates</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHighPrivateUseSurrogates">xmlUCSIsHighPrivateUseSurrogates</a><br />
+</dd><dt>HighSurrogates</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a><br />
+</dd><dt>Hiragana</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsHiragana">xmlUCSIsHiragana</a><br />
+</dd><dt>Hmm</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+</dd><dt>Holds</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>How</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+</dd><dt>However</dt><dd><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+</dd></dl><h2>Letter I:</h2><dl><dt>I18N</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+</dd><dt>IANA</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>IDREF</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>IDREFS</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+</dd><dt>IDREFs</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>IDs</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>IEEE</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>IMPLIED</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>IPAExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a><br />
+</dd><dt>ISO</dt><dd><a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>ISO-8859-</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
+</dd><dt>ISO-Latin</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+</dd><dt>ISO639Code</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>ISOLatin</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+</dd><dt>IS_BLANK</dt><dd><a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
+</dd><dt>IS_CHAR</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+</dd><dt>IS_DIGIT</dt><dd><a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+</dd><dt>IS_EXTENDER</dt><dd><a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+</dd><dt>IS_LETTER</dt><dd><a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br />
+</dd><dt>IS_PUBIDCHAR</dt><dd><a href="html/libxml-parserInternals.html#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a><br />
+</dd><dt>IanaCode</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Identifier</dt><dd><a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+</dd><dt>Identifiers</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+</dd><dt>Ideographic</dt><dd><a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+</dd><dt>IdeographicDescriptionCharacters</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsIdeographicDescriptionCharacters">xmlUCSIsIdeographicDescriptionCharacters</a><br />
+</dd><dt>Ignore</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+</dd><dt>Ignored</dt><dd><a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+</dd><dt>Implements</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>Included</dt><dd><a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>Increase</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpRef">xmlExpRef</a><br />
+</dd><dt>Increment</dt><dd><a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+</dd><dt>Indicate</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+</dd><dt>Indicates</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+</dd><dt>Infinity</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>Initial</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+</dd><dt>Initialization</dt><dd><a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+</dd><dt>Initialize</dt><dd><a href="html/libxml-SAX2.html#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-SAX2.html#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-xmlmemory.html#xmlInitMemory">xmlInitMemory</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlInitParserCtxt">xmlInitParserCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXVersion">xmlSAXVersion</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br />
+<a href="html/libxml-xpath.html#xmlXPathInit">xmlXPathInit</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
+</dd><dt>Initially</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>Initiate</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+</dd><dt>Initilize</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
+</dd><dt>Input</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+</dd><dt>Insert</dt><dd><a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+</dd><dt>Instruction</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+</dd><dt>Instuction</dt><dd><a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+</dd><dt>Intended</dt><dd><a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+</dd><dt>Internal</dt><dd><a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Introduced</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+</dd><dt>Irregular</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk4.html b/doc/APIchunk4.html
new file mode 100644
index 0000000..d26883b
--- /dev/null
+++ b/doc/APIchunk4.html
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index J-N for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index J-N for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter J:</h2><dl><dt>Jan</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>Java</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd></dl><h2>Letter K:</h2><dl><dt>Kanbun</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKanbun">xmlUCSIsKanbun</a><br />
+</dd><dt>KangxiRadicals</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKangxiRadicals">xmlUCSIsKangxiRadicals</a><br />
+</dd><dt>Kannada</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKannada">xmlUCSIsKannada</a><br />
+</dd><dt>Katakana</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKatakana">xmlUCSIsKatakana</a><br />
+</dd><dt>KatakanaPhoneticExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKatakanaPhoneticExtensions">xmlUCSIsKatakanaPhoneticExtensions</a><br />
+</dd><dt>Khmer</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKhmer">xmlUCSIsKhmer</a><br />
+</dd><dt>KhmerSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsKhmerSymbols">xmlUCSIsKhmerSymbols</a><br />
+</dd></dl><h2>Letter L:</h2><dl><dt>Langcode</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>LanguageID</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Lao</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLao">xmlUCSIsLao</a><br />
+</dd><dt>Last</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+</dd><dt>Latin</dt><dd><a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+</dd><dt>Latin-1Supplement</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLatin1Supplement">xmlUCSIsLatin1Supplement</a><br />
+</dd><dt>LatinExtended-A</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedA">xmlUCSIsLatinExtendedA</a><br />
+</dd><dt>LatinExtended-B</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedB">xmlUCSIsLatinExtendedB</a><br />
+</dd><dt>LatinExtendedAdditional</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedAdditional">xmlUCSIsLatinExtendedAdditional</a><br />
+</dd><dt>Legal</dt><dd><a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+</dd><dt>Length</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+</dd><dt>Letter</dt><dd><a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+</dd><dt>LetterlikeSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLetterlikeSymbols">xmlUCSIsLetterlikeSymbols</a><br />
+</dd><dt>Like</dt><dd><a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</dd><dt>Limbu</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLimbu">xmlUCSIsLimbu</a><br />
+</dd><dt>LinearBIdeograms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBIdeograms">xmlUCSIsLinearBIdeograms</a><br />
+</dd><dt>LinearBSyllabary</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBSyllabary">xmlUCSIsLinearBSyllabary</a><br />
+</dd><dt>List</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>Literal</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+</dd><dt>Load</dt><dd><a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+</dd><dt>Local</dt><dd><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>LocalPart</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+</dd><dt>Location</dt><dd><a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>LocationSet</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</dd><dt>Locator</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>Lookup</dt><dd><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+</dd><dt>Loose</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>LowSurrogates</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsLowSurrogates">xmlUCSIsLowSurrogates</a><br />
+</dd><dt>Lzma</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a><br />
+</dd></dl><h2>Letter M:</h2><dl><dt>META</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+</dd><dt>MODIFIER</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>MULT</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>MUST</dt><dd><a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>Makes</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+</dd><dt>Malayalam</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMalayalam">xmlUCSIsMalayalam</a><br />
+</dd><dt>Maps</dt><dd><a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+</dd><dt>Marks</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+</dd><dt>Markup</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Match</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+</dd><dt>MathematicalAlphanumericSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalAlphanumericSymbols">xmlUCSIsMathematicalAlphanumericSymbols</a><br />
+</dd><dt>MathematicalOperators</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalOperators">xmlUCSIsMathematicalOperators</a><br />
+</dd><dt>Max</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+</dd><dt>Maximum</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+</dd><dt>May</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>Memory</dt><dd><a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+</dd><dt>Merge</dt><dd><a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+</dd><dt>Merges</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</dd><dt>Meta</dt><dd><a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+</dd><dt>Method</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</dd><dt>Mime-Type</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+</dd><dt>Minimal</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+</dd><dt>Misc</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+</dd><dt>MiscellaneousMathematicalSymbols-A</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsA">xmlUCSIsMiscellaneousMathematicalSymbolsA</a><br />
+</dd><dt>MiscellaneousMathematicalSymbols-B</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsB">xmlUCSIsMiscellaneousMathematicalSymbolsB</a><br />
+</dd><dt>MiscellaneousSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbols">xmlUCSIsMiscellaneousSymbols</a><br />
+</dd><dt>MiscellaneousSymbolsandArrows</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbolsandArrows">xmlUCSIsMiscellaneousSymbolsandArrows</a><br />
+</dd><dt>MiscellaneousTechnical</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousTechnical">xmlUCSIsMiscellaneousTechnical</a><br />
+</dd><dt>Mixed</dt><dd><a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>Mongolian</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMongolian">xmlUCSIsMongolian</a><br />
+</dd><dt>More</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>Move</dt><dd><a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+</dd><dt>Moves</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+</dd><dt>MusicalSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMusicalSymbols">xmlUCSIsMusicalSymbols</a><br />
+</dd><dt>Myanmar</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsMyanmar">xmlUCSIsMyanmar</a><br />
+</dd></dl><h2>Letter N:</h2><dl><dt>NAME</dt><dd><a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+</dd><dt>NCName</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+</dd><dt>NCNameChar</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+</dd><dt>NDATA</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>NDataDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>NDataDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>NMTOKEN</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+</dd><dt>NMTOKENS</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+</dd><dt>NMToken</dt><dd><a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+</dd><dt>NOTATION</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>NOTE</dt><dd><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+</dd><dt>NOTE:</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+</dd><dt>NRK</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>NSDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+</dd><dt>NaN</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>NameChar</dt><dd><a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+</dd><dt>Names</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a><br />
+</dd><dt>Namespace</dt><dd><a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</dd><dt>Nanespace</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>Needed</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>Nesting</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>New</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>Nmtoken</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+</dd><dt>Nmtokens</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+</dd><dt>Node</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+</dd><dt>NodeInfo</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>NodeList</dt><dd><a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+</dd><dt>NodePtr</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+</dd><dt>NodeSet</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+</dd><dt>NodeSetList</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+</dd><dt>NodeType</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+</dd><dt>Nodeset</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+</dd><dt>Non-static</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+</dd><dt>Normalization</dt><dd><a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+</dd><dt>Normalization:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+</dd><dt>Not</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>NotaNumber</dt><dd><a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>Notation</dt><dd><a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>NotationDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>NotationType</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+</dd><dt>Note:</dt><dd><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</dd><dt>Number</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+</dd><dt>NumberForms</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsNumberForms">xmlUCSIsNumberForms</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk5.html b/doc/APIchunk5.html
new file mode 100644
index 0000000..da60d1a
--- /dev/null
+++ b/doc/APIchunk5.html
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index O-P for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index O-P for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter O:</h2><dl><dt>OBSOLETE:</dt><dd><a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+</dd><dt>ONCE</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>OPT</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>OUT</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>OUT:</dt><dd><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+</dd><dt>Obsolete</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+</dd><dt>Obtain</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+</dd><dt>Ogham</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOgham">xmlUCSIsOgham</a><br />
+</dd><dt>OldItalic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOldItalic">xmlUCSIsOldItalic</a><br />
+</dd><dt>One</dt><dd><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+</dd><dt>Open</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+</dd><dt>Opens</dt><dd><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+</dd><dt>OpticalCharacterRecognition</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOpticalCharacterRecognition">xmlUCSIsOpticalCharacterRecognition</a><br />
+</dd><dt>Optional</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+</dd><dt>Oriya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOriya">xmlUCSIsOriya</a><br />
+</dd><dt>Osmanya</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a><br />
+</dd><dt>Other</dt><dd><a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>Otherwise</dt><dd><a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+</dd><dt>Output</dt><dd><a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+</dd><dt>OutputBufferCreateFilenameFunc</dt><dd><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+</dd><dt>Override</dt><dd><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</dd></dl><h2>Letter P:</h2><dl><dt>P32</dt><dd><a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+</dd><dt>PCDATA</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</dd><dt>PEDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>PEDef</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+</dd><dt>PEReference</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>PEs</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>PITarget</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePITarget">xmlParsePITarget</a><br />
+</dd><dt>PIs</dt><dd><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+</dd><dt>PLUS</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>POST</dt><dd><a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+</dd><dt>PSVI</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+</dd><dt>PUBLIC</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>PUT</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+</dd><dt>Parameter</dt><dd><a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>Parameter-entity</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>Parse</dt><dd><a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+</dd><dt>Parsed</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>ParserInputBufferCreateFilenameFunc</dt><dd><a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+</dd><dt>Parses</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+</dd><dt>Parsing</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>Part</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+</dd><dt>Path</dt><dd><a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+</dd><dt>People</dt><dd><a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+</dd><dt>PhoneticExtensions</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br />
+</dd><dt>Please</dt><dd><a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+</dd><dt>Plug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</dd><dt>Pointer</dt><dd><a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+</dd><dt>Points</dt><dd><a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+</dd><dt>Pop</dt><dd><a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+</dd><dt>Pops</dt><dd><a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+</dd><dt>Position</dt><dd><a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br />
+</dd><dt>Possibility</dt><dd><a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+</dd><dt>Precompiled</dt><dd><a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+</dd><dt>Predicate</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>PredicateExpr</dt><dd><a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+</dd><dt>Prefix</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+</dd><dt>PrefixDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+</dd><dt>Print</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+</dd><dt>Prints</dt><dd><a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+</dd><dt>PrivateUse</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUse">xmlUCSIsPrivateUse</a><br />
+</dd><dt>PrivateUseArea</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUseArea">xmlUCSIsPrivateUseArea</a><br />
+</dd><dt>Processing</dt><dd><a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+</dd><dt>Productions</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>Proper</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Prototype</dt><dd><a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+</dd><dt>Provide</dt><dd><a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+<a href="html/libxml-SAX.html#getLineNumber">getLineNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a><br />
+</dd><dt>Provides</dt><dd><a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+</dd><dt>Proxy</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</dd><dt>Proxy-Authenticate</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+</dd><dt>PubidChar</dt><dd><a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+</dd><dt>PubidLiteral</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+</dd><dt>Public</dt><dd><a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+</dd><dt>PublicID</dt><dd><a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+</dd><dt>Push</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+</dd><dt>Pushes</dt><dd><a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnExternal">xmlXPathReturnExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnFalse">xmlXPathReturnFalse</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNumber">xmlXPathReturnNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnString">xmlXPathReturnString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnTrue">xmlXPathReturnTrue</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk6.html b/doc/APIchunk6.html
new file mode 100644
index 0000000..346e7e5
--- /dev/null
+++ b/doc/APIchunk6.html
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index Q-R for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index Q-R for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter Q:</h2><dl><dt>QName</dt><dd><a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</dd><dt>QNames</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+</dd><dt>QUIT</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+</dd><dt>Qualified</dt><dd><a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+</dd><dt>Query</dt><dd><a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</dd></dl><h2>Letter R:</h2><dl><dt>REC</dt><dd><a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>REC-xml</dt><dd><a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>REFs</dt><dd><a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+</dd><dt>REQUIRED</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>RFC</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>RFC2396</dt><dd><a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd><dt>Raises</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSetArityError">xmlXPathSetArityError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetError">xmlXPathSetError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetTypeError">xmlXPathSetTypeError</a><br />
+</dd><dt>Read</dt><dd><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>Reader</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+</dd><dt>Readers</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>Reads</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+</dd><dt>Rec</dt><dd><a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+</dd><dt>Receive</dt><dd><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</dd><dt>Receiving</dt><dd><a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+</dd><dt>Recurse</dt><dd><a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+</dd><dt>Recursion</dt><dd><a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+</dd><dt>Ref</dt><dd><a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+</dd><dt>Reference</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>Reference:</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>References</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+</dd><dt>Reflects</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
+</dd><dt>Refresh</dt><dd><a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+</dd><dt>Reg</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+</dd><dt>Register</dt><dd><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+</dd><dt>RegisterNodeFunc</dt><dd><a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+</dd><dt>Registers</dt><dd><a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+</dd><dt>Relative</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+</dd><dt>Relax-NG</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+</dd><dt>RelaxNG</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+</dd><dt>RelaxNGs</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+</dd><dt>Remove</dt><dd><a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-list.html#xmlListClear">xmlListClear</a><br />
+<a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+</dd><dt>Removes</dt><dd><a href="html/libxml-list.html#xmlListPopBack">xmlListPopBack</a><br />
+<a href="html/libxml-list.html#xmlListPopFront">xmlListPopFront</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+</dd><dt>Replace</dt><dd><a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+</dd><dt>Replaces</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+</dd><dt>Required</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>Reset</dt><dd><a href="html/libxml-HTMLparser.html#htmlCtxtReset">htmlCtxtReset</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReset">xmlCtxtReset</a><br />
+<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
+</dd><dt>Resize</dt><dd><a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+</dd><dt>Resolves</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+</dd><dt>Resolving</dt><dd><a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+</dd><dt>Retrieve</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+</dd><dt>Return</dt><dd><a href="html/libxml-xpathInternals.html#CHECK_TYPE0">CHECK_TYPE0</a><br />
+</dd><dt>Returns</dt><dd><a href="html/libxml-HTMLparser.html#htmlDefaultSubelement">htmlDefaultSubelement</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCheckError">xmlXPathCheckError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetContextNode">xmlXPathGetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetDocument">xmlXPathGetDocument</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetError">xmlXPathGetError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a><br />
+</dd><dt>Returns:</dt><dd><a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+</dd><dt>Reverse</dt><dd><a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
+</dd><dt>Root</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>Runic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsRunic">xmlUCSIsRunic</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk7.html b/doc/APIchunk7.html
new file mode 100644
index 0000000..3f46f99
--- /dev/null
+++ b/doc/APIchunk7.html
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index S-S for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index S-S for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter S:</h2><dl><dt>SAX1</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+</dd><dt>SAX2</dt><dd><a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-SAX2.html#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</dd><dt>SAX::substituteEntities</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</dd><dt>SDDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>SDDecl?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+</dd><dt>SEQ</dt><dd><a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+</dd><dt>SGML</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+</dd><dt>SGMLSOURCE</dt><dd><a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+</dd><dt>SITE</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>STag</dt><dd><a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>SYSTEM</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+</dd><dt>Same</dt><dd><a href="html/libxml-parserInternals.html#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a><br />
+</dd><dt>Save</dt><dd><a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+</dd><dt>Scan</dt><dd><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+</dd><dt>Schema</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>Schemas</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+</dd><dt>Schematron</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+</dd><dt>Schematrons</dt><dd><a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+</dd><dt>Script</dt><dd><a href="html/libxml-HTMLparser.html#htmlIsScriptAttribute">htmlIsScriptAttribute</a><br />
+</dd><dt>Search</dt><dd><a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+</dd><dt>Searches</dt><dd><a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+</dd><dt>Second</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Section</dt><dd><a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+</dd><dt>See</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+</dd><dt>Semi</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+</dd><dt>Send</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+</dd><dt>Serialize</dt><dd><a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+</dd><dt>Sets</dt><dd><a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</dd><dt>Setting</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+</dd><dt>Setup</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+</dd><dt>Shavian</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsShavian">xmlUCSIsShavian</a><br />
+</dd><dt>Shell</dt><dd><a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+</dd><dt>Shema</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+</dd><dt>Should</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</dd><dt>Show</dt><dd><a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+</dd><dt>Signature</dt><dd><a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+</dd><dt>Similarly</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+</dd><dt>Simply</dt><dd><a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+</dd><dt>Since</dt><dd><a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+</dd><dt>Single</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Sinhala</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSinhala">xmlUCSIsSinhala</a><br />
+</dd><dt>Skip</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
+<a href="html/libxml-parserInternals.html#xmlNextChar">xmlNextChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+</dd><dt>Skips</dt><dd><a href="html/libxml-parserInternals.html#MOVETO_ENDTAG">MOVETO_ENDTAG</a><br />
+<a href="html/libxml-parserInternals.html#MOVETO_STARTTAG">MOVETO_STARTTAG</a><br />
+<a href="html/libxml-parserInternals.html#SKIP_EOL">SKIP_EOL</a><br />
+</dd><dt>SmallFormVariants</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSmallFormVariants">xmlUCSIsSmallFormVariants</a><br />
+</dd><dt>Some</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+</dd><dt>Sort</dt><dd><a href="html/libxml-list.html#xmlListSort">xmlListSort</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a><br />
+</dd><dt>SpacingModifierLetters</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSpacingModifierLetters">xmlUCSIsSpacingModifierLetters</a><br />
+</dd><dt>Spec</dt><dd><a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>Special</dt><dd><a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+<a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+</dd><dt>Specials</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSpecials">xmlUCSIsSpecials</a><br />
+</dd><dt>Speed</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>Standalone</dt><dd><a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+</dd><dt>Start</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartComment">xmlTextWriterStartComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartPI">xmlTextWriterStartPI</a><br />
+</dd><dt>StringType</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>Strings</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>Subcode</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Subset</dt><dd><a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Super</dt><dd><a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+</dd><dt>SuperscriptsandSubscripts</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSuperscriptsandSubscripts">xmlUCSIsSuperscriptsandSubscripts</a><br />
+</dd><dt>SupplementalArrows-A</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsA">xmlUCSIsSupplementalArrowsA</a><br />
+</dd><dt>SupplementalArrows-B</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsB">xmlUCSIsSupplementalArrowsB</a><br />
+</dd><dt>SupplementalMathematicalOperators</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalMathematicalOperators">xmlUCSIsSupplementalMathematicalOperators</a><br />
+</dd><dt>SupplementaryPrivateUseArea-A</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaA">xmlUCSIsSupplementaryPrivateUseAreaA</a><br />
+</dd><dt>SupplementaryPrivateUseArea-B</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaB">xmlUCSIsSupplementaryPrivateUseAreaB</a><br />
+</dd><dt>Syriac</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsSyriac">xmlUCSIsSyriac</a><br />
+</dd><dt>System</dt><dd><a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>SystemLiteral</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk8.html b/doc/APIchunk8.html
new file mode 100644
index 0000000..934e39d
--- /dev/null
+++ b/doc/APIchunk8.html
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index T-U for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index T-U for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter T:</h2><dl><dt>TEXT</dt><dd><a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+</dd><dt>TEXTs</dt><dd><a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</dd><dt>TODO</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+</dd><dt>TODO:</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+</dd><dt>TRUE</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+</dd><dt>Tagalog</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTagalog">xmlUCSIsTagalog</a><br />
+</dd><dt>Tagbanwa</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTagbanwa">xmlUCSIsTagbanwa</a><br />
+</dd><dt>Tags</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTags">xmlUCSIsTags</a><br />
+</dd><dt>TaiLe</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTaiLe">xmlUCSIsTaiLe</a><br />
+</dd><dt>TaiXuanJingSymbols</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTaiXuanJingSymbols">xmlUCSIsTaiXuanJingSymbols</a><br />
+</dd><dt>Take</dt><dd><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</dd><dt>Takes</dt><dd><a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>Tamil</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTamil">xmlUCSIsTamil</a><br />
+</dd><dt>Telugu</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTelugu">xmlUCSIsTelugu</a><br />
+</dd><dt>Test</dt><dd><a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+</dd><dt>Text</dt><dd><a href="html/libxml-tree.html#xmlNodeIsText">xmlNodeIsText</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+</dd><dt>TextDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+</dd><dt>TextDecl?</dt><dd><a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+</dd><dt>Thaana</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsThaana">xmlUCSIsThaana</a><br />
+</dd><dt>Thai</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsThai">xmlUCSIsThai</a><br />
+</dd><dt>That</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+</dd><dt>Then</dt><dd><a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>There</dt><dd><a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>Those</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+</dd><dt>Thus:</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+</dd><dt>Tibetan</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsTibetan">xmlUCSIsTibetan</a><br />
+</dd><dt>Token</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+</dd><dt>TokenizedType</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>Traversal</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+</dd><dt>Tree</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+</dd><dt>Tree:-</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>Trickery:</dt><dd><a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>Tries</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+</dd><dt>True</dt><dd><a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+</dd><dt>Try</dt><dd><a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>Type</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>Types</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+</dd></dl><h2>Letter U:</h2><dl><dt>UCS4</dt><dd><a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+</dd><dt>UNICODE</dt><dd><a href="html/libxml-HTMLparser.html#_htmlEntityDesc">_htmlEntityDesc</a><br />
+<a href="">c</a><br />
+</dd><dt>UNIX</dt><dd><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</dd><dt>UNUSED:</dt><dd><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+</dd><dt>URI-reference</dt><dd><a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+</dd><dt>URN</dt><dd><a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+</dd><dt>USER</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+</dd><dt>UTF-16</dt><dd><a href="html/libxml-encoding.html#_uconv_t">_uconv_t</a><br />
+</dd><dt>UTF16</dt><dd><a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</dd><dt>UTF4</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+</dd><dt>UTF8</dt><dd><a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="">p</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+</dd><dt>Ugaritic</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsUgaritic">xmlUCSIsUgaritic</a><br />
+</dd><dt>Unescaping</dt><dd><a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</dd><dt>Unicode</dt><dd><a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+</dd><dt>UnifiedCanadianAboriginalSyllabics</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsUnifiedCanadianAboriginalSyllabics">xmlUCSIsUnifiedCanadianAboriginalSyllabics</a><br />
+</dd><dt>Unique</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>Unix</dt><dd><a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+</dd><dt>Unlink</dt><dd><a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+</dd><dt>Unlinks</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</dd><dt>Unplug</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+</dd><dt>Unregisters</dt><dd><a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+</dd><dt>Update</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+</dd><dt>Upgrade</dt><dd><a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+</dd><dt>Use</dt><dd><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+</dd><dt>Used</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+</dd><dt>User</dt><dd><a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>UserCode</dt><dd><a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+</dd><dt>Uses</dt><dd><a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIchunk9.html b/doc/APIchunk9.html
new file mode 100644
index 0000000..8c4ac1f
--- /dev/null
+++ b/doc/APIchunk9.html
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>API Alphabetic Index V-X for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>API Alphabetic Index V-X for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><h2>Letter V:</h2><dl><dt>Valid</dt><dd><a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+</dd><dt>Validate</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNameValue">xmlValidateNameValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+</dd><dt>Validity</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+</dd><dt>Value</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+</dd><dt>Values</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+</dd><dt>Variable</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+</dd><dt>VariationSelectors</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectors">xmlUCSIsVariationSelectors</a><br />
+</dd><dt>VariationSelectorsSupplement</dt><dd><a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectorsSupplement">xmlUCSIsVariationSelectorsSupplement</a><br />
+</dd><dt>VersionInfo</dt><dd><a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+</dd><dt>VersionInfo?</dt><dd><a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+</dd><dt>VersionNum</dt><dd><a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+</dd></dl><h2>Letter W:</h2><dl><dt>W3C</dt><dd><a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+</dd><dt>WARNING:</dt><dd><a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>WFC:</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+</dd><dt>WWW-Authenticate</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+</dd><dt>WXS</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+</dd><dt>Walk</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+</dd><dt>Warning</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</dd><dt>Was</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+</dd><dt>Well</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+</dd><dt>What</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+<a href="html/libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+</dd><dt>When</dt><dd><a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+</dd><dt>Wherever</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+</dd><dt>Whitespace</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+</dd><dt>Will</dt><dd><a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+</dd><dt>With</dt><dd><a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+</dd><dt>Workaround</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+</dd><dt>Working</dt><dd><a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+</dd><dt>Wrap</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</dd><dt>Wrapper</dt><dd><a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+</dd><dt>Wraps</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathWrapCString">xmlXPathWrapCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapExternal">xmlXPathWrapExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
+</dd><dt>Writes</dt><dd><a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+</dd></dl><h2>Letter X:</h2><dl><dt>XHTML</dt><dd><a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+</dd><dt>XInclude</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</dd><dt>XInclude?</dt><dd><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+</dd><dt>XLINK_TYPE_NONE</dt><dd><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</dd><dt>XML-1</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</dd><dt>XML-Schema</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+</dd><dt>XMLDecl</dt><dd><a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+</dd><dt>XMLDecl?</dt><dd><a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+</dd><dt>XMLSchema</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+</dd><dt>XML_ATTRIBUTE_DECL</dt><dd><a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+</dd><dt>XML_ATTRIBUTE_ENUMERATION</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+</dd><dt>XML_ATTRIBUTE_FIXED</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>XML_ATTRIBUTE_IMPLIED</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>XML_ATTRIBUTE_NODE</dt><dd><a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+</dd><dt>XML_ATTRIBUTE_NONE</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>XML_ATTRIBUTE_NOTATION</dt><dd><a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+</dd><dt>XML_ATTRIBUTE_REQUIRED</dt><dd><a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+</dd><dt>XML_BUFFER_ALLOC_DOUBLEIT</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>XML_BUFFER_ALLOC_EXACT</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+</dd><dt>XML_BUFFER_ALLOC_HYBRID</dt><dd><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+</dd><dt>XML_CAST_FPTR</dt><dd><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+</dd><dt>XML_CATA_PREFER_PUBLIC</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</dd><dt>XML_CATA_PREFER_SYSTEM</dt><dd><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</dd><dt>XML_CHAR_ENCODING_</dt><dd><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</dd><dt>XML_CHAR_ENCODING_NONE</dt><dd><a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+</dd><dt>XML_DOCUMENT_NODE</dt><dd><a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+</dd><dt>XML_DTD_NODE</dt><dd><a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+</dd><dt>XML_ELEMENT_DECL</dt><dd><a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+</dd><dt>XML_ELEMENT_TYPE_xxx</dt><dd><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</dd><dt>XML_ENTITY_DECL</dt><dd><a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+</dd><dt>XML_ERR_OK</dt><dd><a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</dd><dt>XML_PARSE_BIG_LINES</dt><dd><a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+</dd><dt>XML_PARSE_HUGE</dt><dd><a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+</dd><dt>XML_SCHEMAS_ELEM_GLOBAL</dt><dd><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+</dd><dt>XML_SCHEMAS_FACET_PRESERVE</dt><dd><a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+</dd><dt>XML_SCHEMAS_STRING</dt><dd><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+</dd><dt>XML_SUBSTITUTE_PEREF</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>XML_SUBSTITUTE_REF</dt><dd><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+</dd><dt>XML_xxx_yyy_ENTITY</dt><dd><a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</dd><dt>XMl-Schema</dt><dd><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+</dd><dt>XPATH</dt><dd><a href="html/libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a><br />
+</dd><dt>XPATH_INVALID_ARITY</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSetArityError">xmlXPathSetArityError</a><br />
+</dd><dt>XPATH_INVALID_TYPE</dt><dd><a href="html/libxml-xpathInternals.html#xmlXPathSetTypeError">xmlXPathSetTypeError</a><br />
+</dd><dt>XPointer</dt><dd><a href="html/libxml-xmlversion.html#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+</dd><dt>XSD</dt><dd><a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</dd><dt>XSLT</dt><dd><a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a><br />
+</dd><dt>Xinclude</dt><dd><a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+</dd><dt>Xml</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd><dt>XmlNodeType</dt><dd><a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+</dd></dl><h2 align="center"><a href="APIchunk0.html">A-B</a>
+<a href="APIchunk1.html">C-C</a>
+<a href="APIchunk2.html">D-E</a>
+<a href="APIchunk3.html">F-I</a>
+<a href="APIchunk4.html">J-N</a>
+<a href="APIchunk5.html">O-P</a>
+<a href="APIchunk6.html">Q-R</a>
+<a href="APIchunk7.html">S-S</a>
+<a href="APIchunk8.html">T-U</a>
+<a href="APIchunk9.html">V-X</a>
+<a href="APIchunk10.html">Y-a</a>
+<a href="APIchunk11.html">b-b</a>
+<a href="APIchunk12.html">c-c</a>
+<a href="APIchunk13.html">d-d</a>
+<a href="APIchunk14.html">e-e</a>
+<a href="APIchunk15.html">f-f</a>
+<a href="APIchunk16.html">g-h</a>
+<a href="APIchunk17.html">i-i</a>
+<a href="APIchunk18.html">j-l</a>
+<a href="APIchunk19.html">m-m</a>
+<a href="APIchunk20.html">n-n</a>
+<a href="APIchunk21.html">o-o</a>
+<a href="APIchunk22.html">p-p</a>
+<a href="APIchunk23.html">q-r</a>
+<a href="APIchunk24.html">s-s</a>
+<a href="APIchunk25.html">t-t</a>
+<a href="APIchunk26.html">u-v</a>
+<a href="APIchunk27.html">w-w</a>
+<a href="APIchunk28.html">x-x</a>
+<a href="APIchunk29.html">y-z</a>
+</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIconstructors.html b/doc/APIconstructors.html
new file mode 100644
index 0000000..d5ca488
--- /dev/null
+++ b/doc/APIconstructors.html
@@ -0,0 +1,595 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>List of constructors for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>List of constructors for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Type SOCKET:</h2><p><a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+</p><h2>Type const htmlElemDesc *:</h2><p><a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+</p><h2>Type const htmlEntityDesc *:</h2><p><a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+</p><h2>Type const xmlChar *:</h2><p><a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePITarget">xmlParsePITarget</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+</p><h2>Type const xmlParserNodeInfo *:</h2><p><a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+</p><h2>Type docbDocPtr:</h2><p><a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+</p><h2>Type docbParserCtxtPtr:</h2><p><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+</p><h2>Type double:</h2><p><a href="html/libxml-xpath.html#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+</p><h2>Type htmlDocPtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadMemory">htmlReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+</p><h2>Type htmlParserCtxtPtr:</h2><p><a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+</p><h2>Type htmlStatus:</h2><p><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</p><h2>Type long:</h2><p><a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+</p><h2>Type size_t:</h2><p><a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+</p><h2>Type unsigned long:</h2><p><a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+</p><h2>Type void *:</h2><p><a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+</p><h2>Type xlinkHandlerPtr:</h2><p><a href="html/libxml-xlink.html#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a><br />
+</p><h2>Type xlinkNodeDetectFunc:</h2><p><a href="html/libxml-xlink.html#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a><br />
+</p><h2>Type xlinkType:</h2><p><a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+</p><h2>Type xmlAttrPtr:</h2><p><a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+</p><h2>Type xmlAttributePtr:</h2><p><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+</p><h2>Type xmlAttributeTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+</p><h2>Type xmlAutomataPtr:</h2><p><a href="html/libxml-xmlautomata.html#xmlNewAutomata">xmlNewAutomata</a><br />
+</p><h2>Type xmlAutomataStatePtr:</h2><p><a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewState">xmlAutomataNewState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+</p><h2>Type xmlBufferAllocationScheme:</h2><p><a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-globals.html#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a><br />
+</p><h2>Type xmlBufferPtr:</h2><p><a href="html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+</p><h2>Type xmlCatalogAllow:</h2><p><a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+</p><h2>Type xmlCatalogPrefer:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</p><h2>Type xmlCatalogPtr:</h2><p><a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+</p><h2>Type xmlChar:</h2><p><a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+</p><h2>Type xmlChar *:</h2><p><a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+<a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrdup">xmlCharStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrndup">xmlCharStrndup</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+</p><h2>Type xmlCharEncoding:</h2><p><a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+</p><h2>Type xmlCharEncodingHandlerPtr:</h2><p><a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</p><h2>Type xmlDOMWrapCtxtPtr:</h2><p><a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+</p><h2>Type xmlDeregisterNodeFunc:</h2><p><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a><br />
+</p><h2>Type xmlDictPtr:</h2><p><a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+</p><h2>Type xmlDocPtr:</h2><p><a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+<a href="html/libxml-parser.html#xmlParseDoc">xmlParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-parser.html#xmlParseMemory">xmlParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-parser.html#xmlReadFile">xmlReadFile</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+</p><h2>Type xmlDtdPtr:</h2><p><a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlGetIntSubset">xmlGetIntSubset</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+</p><h2>Type xmlElementContentPtr:</h2><p><a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+</p><h2>Type xmlElementPtr:</h2><p><a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+</p><h2>Type xmlElementTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+</p><h2>Type xmlEntitiesTablePtr:</h2><p><a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+</p><h2>Type xmlEntityPtr:</h2><p><a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+</p><h2>Type xmlEnumerationPtr:</h2><p><a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+</p><h2>Type xmlErrorPtr:</h2><p><a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+</p><h2>Type xmlExpCtxtPtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+</p><h2>Type xmlExpNodePtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+</p><h2>Type xmlExternalEntityLoader:</h2><p><a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+</p><h2>Type xmlGlobalStatePtr:</h2><p><a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+</p><h2>Type xmlHashTablePtr:</h2><p><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+</p><h2>Type xmlIDPtr:</h2><p><a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+</p><h2>Type xmlLinkPtr:</h2><p><a href="html/libxml-list.html#xmlListEnd">xmlListEnd</a><br />
+<a href="html/libxml-list.html#xmlListFront">xmlListFront</a><br />
+</p><h2>Type xmlListPtr:</h2><p><a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+<a href="html/libxml-list.html#xmlListDup">xmlListDup</a><br />
+</p><h2>Type xmlLocationSetPtr:</h2><p><a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+</p><h2>Type xmlModulePtr:</h2><p><a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+</p><h2>Type xmlMutexPtr:</h2><p><a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+</p><h2>Type xmlNodePtr:</h2><p><a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-tree.html#xmlNewText">xmlNewText</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+</p><h2>Type xmlNodeSetPtr:</h2><p><a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+</p><h2>Type xmlNotationPtr:</h2><p><a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+</p><h2>Type xmlNotationTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+</p><h2>Type xmlNsPtr:</h2><p><a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+</p><h2>Type xmlNsPtr *:</h2><p><a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+</p><h2>Type xmlOutputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br />
+</p><h2>Type xmlOutputBufferPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+</p><h2>Type xmlParserCtxtPtr:</h2><p><a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+</p><h2>Type xmlParserErrors:</h2><p><a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</p><h2>Type xmlParserInputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a><br />
+</p><h2>Type xmlParserInputBufferPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+</p><h2>Type xmlParserInputPtr:</h2><p><a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputStream">xmlNewInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+</p><h2>Type xmlPatternPtr:</h2><p><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+</p><h2>Type xmlRMutexPtr:</h2><p><a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+</p><h2>Type xmlRefPtr:</h2><p><a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+</p><h2>Type xmlRegExecCtxtPtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</p><h2>Type xmlRegexpPtr:</h2><p><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+</p><h2>Type xmlRegisterNodeFunc:</h2><p><a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a><br />
+</p><h2>Type xmlRelaxNGParserCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+</p><h2>Type xmlRelaxNGPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+</p><h2>Type xmlRelaxNGValidCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</p><h2>Type xmlSchemaFacetPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />
+</p><h2>Type xmlSchemaParserCtxtPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+</p><h2>Type xmlSchemaPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+</p><h2>Type xmlSchemaSAXPlugPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</p><h2>Type xmlSchemaTypePtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+</p><h2>Type xmlSchemaValPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+</p><h2>Type xmlSchemaValType:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+</p><h2>Type xmlSchemaValidCtxtPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+</p><h2>Type xmlSchematronParserCtxtPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+</p><h2>Type xmlSchematronPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+</p><h2>Type xmlSchematronValidCtxtPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+</p><h2>Type xmlStreamCtxtPtr:</h2><p><a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+</p><h2>Type xmlTextReaderPtr:</h2><p><a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+</p><h2>Type xmlTextWriterPtr:</h2><p><a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+</p><h2>Type xmlURIPtr:</h2><p><a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+</p><h2>Type xmlValidCtxtPtr:</h2><p><a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br />
+</p><h2>Type xmlXIncludeCtxtPtr:</h2><p><a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+</p><h2>Type xmlXPathCompExprPtr:</h2><p><a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+</p><h2>Type xmlXPathContextPtr:</h2><p><a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</p><h2>Type xmlXPathFunction:</h2><p><a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+</p><h2>Type xmlXPathObjectPtr:</h2><p><a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewBoolean">xmlXPathNewBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewCString">xmlXPathNewCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapCString">xmlXPathWrapCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapExternal">xmlXPathWrapExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</p><h2>Type xmlXPathParserContextPtr:</h2><p><a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIfiles.html b/doc/APIfiles.html
new file mode 100644
index 0000000..65e004b
--- /dev/null
+++ b/doc/APIfiles.html
@@ -0,0 +1,3590 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>List of Symbols per Module for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>List of Symbols per Module for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2><a name="DOCBparser" id="DOCBparser">Module DOCBparser</a>:</h2><p><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserCtxt">docbParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserInput">docbParserInput</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserInputPtr">docbParserInputPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXHandler">docbSAXHandler</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+</p><h2><a name="HTMLparser" id="HTMLparser">Module HTMLparser</a>:</h2><p><a href="html/libxml-HTMLparser.html#HTML_DEPRECATED">HTML_DEPRECATED</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_INVALID">HTML_INVALID</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_NA">HTML_NA</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_COMPACT">HTML_PARSE_COMPACT</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_IGNORE_ENC">HTML_PARSE_IGNORE_ENC</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOBLANKS">HTML_PARSE_NOBLANKS</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NODEFDTD">HTML_PARSE_NODEFDTD</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOERROR">HTML_PARSE_NOERROR</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOIMPLIED">HTML_PARSE_NOIMPLIED</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NONET">HTML_PARSE_NONET</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOWARNING">HTML_PARSE_NOWARNING</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_PEDANTIC">HTML_PARSE_PEDANTIC</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_RECOVER">HTML_PARSE_RECOVER</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_REQUIRED">HTML_REQUIRED</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_VALID">HTML_VALID</a><br />
+<a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlEntityDesc">_htmlEntityDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReset">htmlCtxtReset</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-HTMLparser.html#htmlDefaultSubelement">htmlDefaultSubelement</a><br />
+<a href="html/libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsScriptAttribute">htmlIsScriptAttribute</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserCtxt">htmlParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserInput">htmlParserInput</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserInputPtr">htmlParserInputPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserNodeInfo">htmlParserNodeInfo</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserOption">htmlParserOption</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadMemory">htmlReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXHandler">htmlSAXHandler</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlStatus">htmlStatus</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+</p><h2><a name="HTMLtree" id="HTMLtree">Module HTMLtree</a>:</h2><p><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFile">htmlSaveFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+</p><h2><a name="SAX" id="SAX">Module SAX</a>:</h2><p><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+<a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+<a href="html/libxml-SAX.html#endDocument">endDocument</a><br />
+<a href="html/libxml-SAX.html#endElement">endElement</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+<a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-SAX.html#getLineNumber">getLineNumber</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-SAX.html#hasExternalSubset">hasExternalSubset</a><br />
+<a href="html/libxml-SAX.html#hasInternalSubset">hasInternalSubset</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+<a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+<a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+<a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
+<a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+</p><h2><a name="SAX2" id="SAX2">Module SAX2</a>:</h2><p><a href="html/libxml-SAX2.html#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-SAX2.html#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-SAX2.html#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndDocument">xmlSAX2EndDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElement">xmlSAX2EndElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXVersion">xmlSAXVersion</a><br />
+</p><h2><a name="c14n" id="c14n">Module c14n</a>:</h2><p><a href="html/libxml-c14n.html#XML_C14N_1_0">XML_C14N_1_0</a><br />
+<a href="html/libxml-c14n.html#XML_C14N_1_1">XML_C14N_1_1</a><br />
+<a href="html/libxml-c14n.html#XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-c14n.html#xmlC14NMode">xmlC14NMode</a><br />
+</p><h2><a name="catalog" id="catalog">Module catalog</a>:</h2><p><a href="html/libxml-catalog.html#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a><br />
+<a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalog">xmlCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogCleanup">xmlCatalogCleanup</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlFreeCatalog">xmlFreeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+</p><h2><a name="chvalid" id="chvalid">Module chvalid</a>:</h2><p><a href="html/libxml-chvalid.html#_xmlChLRange">_xmlChLRange</a><br />
+<a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br />
+<a href="html/libxml-chvalid.html#_xmlChSRange">_xmlChSRange</a><br />
+<a href="html/libxml-chvalid.html#xmlChLRange">xmlChLRange</a><br />
+<a href="html/libxml-chvalid.html#xmlChLRangePtr">xmlChLRangePtr</a><br />
+<a href="html/libxml-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlChRangeGroupPtr">xmlChRangeGroupPtr</a><br />
+<a href="html/libxml-chvalid.html#xmlChSRange">xmlChSRange</a><br />
+<a href="html/libxml-chvalid.html#xmlChSRangePtr">xmlChSRangePtr</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseCharGroup">xmlIsBaseCharGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharGroup">xmlIsCharGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningGroup">xmlIsCombiningGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitGroup">xmlIsDigitGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderGroup">xmlIsExtenderGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicGroup">xmlIsIdeographicGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_tab">xmlIsPubidChar_tab</a><br />
+</p><h2><a name="debugXML" id="debugXML">Module debugXML</a>:</h2><p><a href="html/libxml-debugXML.html#_xmlShellCtxt">_xmlShellCtxt</a><br />
+<a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+<a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCtxt">xmlShellCtxt</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</p><h2><a name="dict" id="dict">Module dict</a>:</h2><p><a href="html/libxml-dict.html#xmlDict">xmlDict</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+<a href="html/libxml-dict.html#xmlDictPtr">xmlDictPtr</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+</p><h2><a name="encoding" id="encoding">Module encoding</a>:</h2><p><a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_2022_JP">XML_CHAR_ENCODING_2022_JP</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_1">XML_CHAR_ENCODING_8859_1</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_2">XML_CHAR_ENCODING_8859_2</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_3">XML_CHAR_ENCODING_8859_3</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_4">XML_CHAR_ENCODING_8859_4</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_5">XML_CHAR_ENCODING_8859_5</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_6">XML_CHAR_ENCODING_8859_6</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_7">XML_CHAR_ENCODING_8859_7</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_8">XML_CHAR_ENCODING_8859_8</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_9">XML_CHAR_ENCODING_8859_9</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_ASCII">XML_CHAR_ENCODING_ASCII</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_EBCDIC">XML_CHAR_ENCODING_EBCDIC</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_ERROR">XML_CHAR_ENCODING_ERROR</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_EUC_JP">XML_CHAR_ENCODING_EUC_JP</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_SHIFT_JIS">XML_CHAR_ENCODING_SHIFT_JIS</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS2">XML_CHAR_ENCODING_UCS2</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4BE">XML_CHAR_ENCODING_UCS4BE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4LE">XML_CHAR_ENCODING_UCS4LE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4_2143">XML_CHAR_ENCODING_UCS4_2143</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4_3412">XML_CHAR_ENCODING_UCS4_3412</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF16BE">XML_CHAR_ENCODING_UTF16BE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF16LE">XML_CHAR_ENCODING_UTF16LE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF8">XML_CHAR_ENCODING_UTF8</a><br />
+<a href="html/libxml-encoding.html#_uconv_t">_uconv_t</a><br />
+<a href="html/libxml-encoding.html#_xmlCharEncodingHandler">_xmlCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#uconv_t">uconv_t</a><br />
+<a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+</p><h2><a name="entities" id="entities">Module entities</a>:</h2><p><a href="html/libxml-entities.html#XML_EXTERNAL_GENERAL_PARSED_ENTITY">XML_EXTERNAL_GENERAL_PARSED_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_EXTERNAL_GENERAL_UNPARSED_ENTITY">XML_EXTERNAL_GENERAL_UNPARSED_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_EXTERNAL_PARAMETER_ENTITY">XML_EXTERNAL_PARAMETER_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_GENERAL_ENTITY">XML_INTERNAL_GENERAL_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_PARAMETER_ENTITY">XML_INTERNAL_PARAMETER_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_PREDEFINED_ENTITY">XML_INTERNAL_PREDEFINED_ENTITY</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br />
+<a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-entities.html#xmlEntitiesTable">xmlEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a><br />
+<a href="html/libxml-entities.html#xmlEntityType">xmlEntityType</a><br />
+<a href="html/libxml-entities.html#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a><br />
+<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+</p><h2><a name="globals" id="globals">Module globals</a>:</h2><p><a href="html/libxml-globals.html#_xmlGlobalState">_xmlGlobalState</a><br />
+<a href="html/libxml-globals.html#docbDefaultSAXHandler">docbDefaultSAXHandler</a><br />
+<a href="html/libxml-globals.html#htmlDefaultSAXHandler">htmlDefaultSAXHandler</a><br />
+<a href="html/libxml-globals.html#oldXMLWDcompatibility">oldXMLWDcompatibility</a><br />
+<a href="html/libxml-globals.html#xmlBufferAllocScheme">xmlBufferAllocScheme</a><br />
+<a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
+<a href="html/libxml-globals.html#xmlDefaultBufferSize">xmlDefaultBufferSize</a><br />
+<a href="html/libxml-globals.html#xmlDefaultSAXHandler">xmlDefaultSAXHandler</a><br />
+<a href="html/libxml-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefaultValue">xmlDeregisterNodeDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+<a href="html/libxml-globals.html#xmlDoValidityCheckingDefaultValue">xmlDoValidityCheckingDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlFree">xmlFree</a><br />
+<a href="html/libxml-globals.html#xmlGenericError">xmlGenericError</a><br />
+<a href="html/libxml-globals.html#xmlGenericErrorContext">xmlGenericErrorContext</a><br />
+<a href="html/libxml-globals.html#xmlGetWarningsDefaultValue">xmlGetWarningsDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlGlobalState">xmlGlobalState</a><br />
+<a href="html/libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a><br />
+<a href="html/libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a><br />
+<a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
+<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+<a href="html/libxml-globals.html#xmlKeepBlanksDefaultValue">xmlKeepBlanksDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlLastError">xmlLastError</a><br />
+<a href="html/libxml-globals.html#xmlLineNumbersDefaultValue">xmlLineNumbersDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlLoadExtDtdDefaultValue">xmlLoadExtDtdDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlMalloc">xmlMalloc</a><br />
+<a href="html/libxml-globals.html#xmlMallocAtomic">xmlMallocAtomic</a><br />
+<a href="html/libxml-globals.html#xmlMemStrdup">xmlMemStrdup</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameValue">xmlOutputBufferCreateFilenameValue</a><br />
+<a href="html/libxml-globals.html#xmlParserDebugEntities">xmlParserDebugEntities</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameValue">xmlParserInputBufferCreateFilenameValue</a><br />
+<a href="html/libxml-globals.html#xmlParserVersion">xmlParserVersion</a><br />
+<a href="html/libxml-globals.html#xmlPedanticParserDefaultValue">xmlPedanticParserDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlRealloc">xmlRealloc</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefaultValue">xmlRegisterNodeDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a><br />
+<a href="html/libxml-globals.html#xmlSaveNoEmptyTags">xmlSaveNoEmptyTags</a><br />
+<a href="html/libxml-globals.html#xmlStructuredError">xmlStructuredError</a><br />
+<a href="html/libxml-globals.html#xmlStructuredErrorContext">xmlStructuredErrorContext</a><br />
+<a href="html/libxml-globals.html#xmlSubstituteEntitiesDefaultValue">xmlSubstituteEntitiesDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDefaultBufferSize">xmlThrDefDefaultBufferSize</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDoValidityCheckingDefaultValue">xmlThrDefDoValidityCheckingDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefGetWarningsDefaultValue">xmlThrDefGetWarningsDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefIndentTreeOutput">xmlThrDefIndentTreeOutput</a><br />
+<a href="html/libxml-globals.html#xmlThrDefKeepBlanksDefaultValue">xmlThrDefKeepBlanksDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefLineNumbersDefaultValue">xmlThrDefLineNumbersDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefLoadExtDtdDefaultValue">xmlThrDefLoadExtDtdDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserDebugEntities">xmlThrDefParserDebugEntities</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefPedanticParserDefaultValue">xmlThrDefPedanticParserDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSaveNoEmptyTags">xmlThrDefSaveNoEmptyTags</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSubstituteEntitiesDefaultValue">xmlThrDefSubstituteEntitiesDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a><br />
+<a href="html/libxml-globals.html#xmlTreeIndentString">xmlTreeIndentString</a><br />
+</p><h2><a name="hash" id="hash">Module hash</a>:</h2><p><a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+<a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-hash.html#xmlHashTable">xmlHashTable</a><br />
+<a href="html/libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</p><h2><a name="list" id="list">Module list</a>:</h2><p><a href="html/libxml-list.html#xmlLink">xmlLink</a><br />
+<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-list.html#xmlLinkPtr">xmlLinkPtr</a><br />
+<a href="html/libxml-list.html#xmlList">xmlList</a><br />
+<a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListClear">xmlListClear</a><br />
+<a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+<a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+<a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-list.html#xmlListDeallocator">xmlListDeallocator</a><br />
+<a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br />
+<a href="html/libxml-list.html#xmlListDup">xmlListDup</a><br />
+<a href="html/libxml-list.html#xmlListEmpty">xmlListEmpty</a><br />
+<a href="html/libxml-list.html#xmlListEnd">xmlListEnd</a><br />
+<a href="html/libxml-list.html#xmlListFront">xmlListFront</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+<a href="html/libxml-list.html#xmlListPopBack">xmlListPopBack</a><br />
+<a href="html/libxml-list.html#xmlListPopFront">xmlListPopFront</a><br />
+<a href="html/libxml-list.html#xmlListPtr">xmlListPtr</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-list.html#xmlListSize">xmlListSize</a><br />
+<a href="html/libxml-list.html#xmlListSort">xmlListSort</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</p><h2><a name="nanoftp" id="nanoftp">Module nanoftp</a>:</h2><p><a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+<a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+</p><h2><a name="nanohttp" id="nanohttp">Module nanohttp</a>:</h2><p><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+</p><h2><a name="parser" id="parser">Module parser</a>:</h2><p><a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ATTRIBUTE_VALUE">XML_PARSER_ATTRIBUTE_VALUE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_CDATA_SECTION">XML_PARSER_CDATA_SECTION</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_COMMENT">XML_PARSER_COMMENT</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_CONTENT">XML_PARSER_CONTENT</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_DTD">XML_PARSER_DTD</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_END_TAG">XML_PARSER_END_TAG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ENTITY_DECL">XML_PARSER_ENTITY_DECL</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ENTITY_VALUE">XML_PARSER_ENTITY_VALUE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_EOF">XML_PARSER_EOF</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_EPILOG">XML_PARSER_EPILOG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_IGNORE">XML_PARSER_IGNORE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_MISC">XML_PARSER_MISC</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PI">XML_PARSER_PI</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PROLOG">XML_PARSER_PROLOG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PUBLIC_LITERAL">XML_PARSER_PUBLIC_LITERAL</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_START">XML_PARSER_START</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_START_TAG">XML_PARSER_START_TAG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_SYSTEM_LITERAL">XML_PARSER_SYSTEM_LITERAL</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_COMPACT">XML_PARSE_COMPACT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DOM">XML_PARSE_DOM</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDATTR">XML_PARSE_DTDATTR</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDLOAD">XML_PARSE_DTDLOAD</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDVALID">XML_PARSE_DTDVALID</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOBASEFIX">XML_PARSE_NOBASEFIX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOBLANKS">XML_PARSE_NOBLANKS</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NODICT">XML_PARSE_NODICT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOENT">XML_PARSE_NOENT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOERROR">XML_PARSE_NOERROR</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NONET">XML_PARSE_NONET</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOWARNING">XML_PARSE_NOWARNING</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_OLD10">XML_PARSE_OLD10</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_OLDSAX">XML_PARSE_OLDSAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PEDANTIC">XML_PARSE_PEDANTIC</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PUSH_DOM">XML_PARSE_PUSH_DOM</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PUSH_SAX">XML_PARSE_PUSH_SAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_READER">XML_PARSE_READER</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_RECOVER">XML_PARSE_RECOVER</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_SAX">XML_PARSE_SAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_SAX1">XML_PARSE_SAX1</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_UNKNOWN">XML_PARSE_UNKNOWN</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a><br />
+<a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-parser.html#XML_WITH_AUTOMATA">XML_WITH_AUTOMATA</a><br />
+<a href="html/libxml-parser.html#XML_WITH_C14N">XML_WITH_C14N</a><br />
+<a href="html/libxml-parser.html#XML_WITH_CATALOG">XML_WITH_CATALOG</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG">XML_WITH_DEBUG</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG_MEM">XML_WITH_DEBUG_MEM</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG_RUN">XML_WITH_DEBUG_RUN</a><br />
+<a href="html/libxml-parser.html#XML_WITH_EXPR">XML_WITH_EXPR</a><br />
+<a href="html/libxml-parser.html#XML_WITH_FTP">XML_WITH_FTP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_HTML">XML_WITH_HTML</a><br />
+<a href="html/libxml-parser.html#XML_WITH_HTTP">XML_WITH_HTTP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ICONV">XML_WITH_ICONV</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ICU">XML_WITH_ICU</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ISO8859X">XML_WITH_ISO8859X</a><br />
+<a href="html/libxml-parser.html#XML_WITH_LEGACY">XML_WITH_LEGACY</a><br />
+<a href="html/libxml-parser.html#XML_WITH_LZMA">XML_WITH_LZMA</a><br />
+<a href="html/libxml-parser.html#XML_WITH_MODULES">XML_WITH_MODULES</a><br />
+<a href="html/libxml-parser.html#XML_WITH_NONE">XML_WITH_NONE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_OUTPUT">XML_WITH_OUTPUT</a><br />
+<a href="html/libxml-parser.html#XML_WITH_PATTERN">XML_WITH_PATTERN</a><br />
+<a href="html/libxml-parser.html#XML_WITH_PUSH">XML_WITH_PUSH</a><br />
+<a href="html/libxml-parser.html#XML_WITH_READER">XML_WITH_READER</a><br />
+<a href="html/libxml-parser.html#XML_WITH_REGEXP">XML_WITH_REGEXP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SAX1">XML_WITH_SAX1</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SCHEMAS">XML_WITH_SCHEMAS</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SCHEMATRON">XML_WITH_SCHEMATRON</a><br />
+<a href="html/libxml-parser.html#XML_WITH_THREAD">XML_WITH_THREAD</a><br />
+<a href="html/libxml-parser.html#XML_WITH_TREE">XML_WITH_TREE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_UNICODE">XML_WITH_UNICODE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_VALID">XML_WITH_VALID</a><br />
+<a href="html/libxml-parser.html#XML_WITH_WRITER">XML_WITH_WRITER</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XINCLUDE">XML_WITH_XINCLUDE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XPATH">XML_WITH_XPATH</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XPTR">XML_WITH_XPTR</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ZLIB">XML_WITH_ZLIB</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br />
+<a href="html/libxml-parser.html#_xmlParserNodeInfoSeq">_xmlParserNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
+<a href="html/libxml-parser.html#_xmlSAXLocator">_xmlSAXLocator</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-parser.html#commentSAXFunc">commentSAXFunc</a><br />
+<a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a><br />
+<a href="html/libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a><br />
+<a href="html/libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReset">xmlCtxtReset</a><br />
+<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlFeature">xmlFeature</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-parser.html#xmlInitParserCtxt">xmlInitParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlParseDoc">xmlParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parser.html#xmlParseMemory">xmlParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+<a href="html/libxml-parser.html#xmlParserInputState">xmlParserInputState</a><br />
+<a href="html/libxml-parser.html#xmlParserMode">xmlParserMode</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a><br />
+<a href="html/libxml-parser.html#xmlParserOption">xmlParserOption</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-parser.html#xmlReadFile">xmlReadFile</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a><br />
+<a href="html/libxml-parser.html#xmlSAXHandlerV1Ptr">xmlSAXHandlerV1Ptr</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-parser.html#xmlStopParser">xmlStopParser</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+</p><h2><a name="parserInternals" id="parserInternals">Module parserInternals</a>:</h2><p><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-parserInternals.html#IS_ASCII_DIGIT">IS_ASCII_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#IS_ASCII_LETTER">IS_ASCII_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK">IS_BLANK</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#MOVETO_ENDTAG">MOVETO_ENDTAG</a><br />
+<a href="html/libxml-parserInternals.html#MOVETO_STARTTAG">MOVETO_STARTTAG</a><br />
+<a href="html/libxml-parserInternals.html#SKIP_EOL">SKIP_EOL</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+<a href="html/libxml-parserInternals.html#xmlFreeInputStream">xmlFreeInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputStream">xmlNewInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNextChar">xmlNextChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePITarget">xmlParsePITarget</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserInputShrink">xmlParserInputShrink</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserMaxDepth">xmlParserMaxDepth</a><br />
+<a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringComment">xmlStringComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringText">xmlStringText</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringTextNoenc">xmlStringTextNoenc</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+</p><h2><a name="pattern" id="pattern">Module pattern</a>:</h2><p><a href="html/libxml-pattern.html#XML_PATTERN_DEFAULT">XML_PATTERN_DEFAULT</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XPATH">XML_PATTERN_XPATH</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XSFIELD">XML_PATTERN_XSFIELD</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XSSEL">XML_PATTERN_XSSEL</a><br />
+<a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPattern">xmlPattern</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFlags">xmlPatternFlags</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</p><h2><a name="relaxng" id="relaxng">Module relaxng</a>:</h2><p><a href="html/libxml-relaxng.html#XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTREXTRANS">XML_RELAXNG_ERR_ATTREXTRANS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRNAME">XML_RELAXNG_ERR_ATTRNAME</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRNONS">XML_RELAXNG_ERR_ATTRNONS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRVALID">XML_RELAXNG_ERR_ATTRVALID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRWRONGNS">XML_RELAXNG_ERR_ATTRWRONGNS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_CONTENTVALID">XML_RELAXNG_ERR_CONTENTVALID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DATAELEM">XML_RELAXNG_ERR_DATAELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DATATYPE">XML_RELAXNG_ERR_DATATYPE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DUPID">XML_RELAXNG_ERR_DUPID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMEXTRANS">XML_RELAXNG_ERR_ELEMEXTRANS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNAME">XML_RELAXNG_ERR_ELEMNAME</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNONS">XML_RELAXNG_ERR_ELEMNONS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNOTEMPTY">XML_RELAXNG_ERR_ELEMNOTEMPTY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMWRONG">XML_RELAXNG_ERR_ELEMWRONG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMWRONGNS">XML_RELAXNG_ERR_ELEMWRONGNS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_EXTRACONTENT">XML_RELAXNG_ERR_EXTRACONTENT</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_EXTRADATA">XML_RELAXNG_ERR_EXTRADATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTEREXTRA">XML_RELAXNG_ERR_INTEREXTRA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERNAL">XML_RELAXNG_ERR_INTERNAL</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERNODATA">XML_RELAXNG_ERR_INTERNODATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERSEQ">XML_RELAXNG_ERR_INTERSEQ</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INVALIDATTR">XML_RELAXNG_ERR_INVALIDATTR</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LACKDATA">XML_RELAXNG_ERR_LACKDATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LIST">XML_RELAXNG_ERR_LIST</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTELEM">XML_RELAXNG_ERR_LISTELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTEMPTY">XML_RELAXNG_ERR_LISTEMPTY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTEXTRA">XML_RELAXNG_ERR_LISTEXTRA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_MEMORY">XML_RELAXNG_ERR_MEMORY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NODEFINE">XML_RELAXNG_ERR_NODEFINE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOELEM">XML_RELAXNG_ERR_NOELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOGRAMMAR">XML_RELAXNG_ERR_NOGRAMMAR</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOSTATE">XML_RELAXNG_ERR_NOSTATE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOTELEM">XML_RELAXNG_ERR_NOTELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TEXTWRONG">XML_RELAXNG_ERR_TEXTWRONG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPE">XML_RELAXNG_ERR_TYPE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPECMP">XML_RELAXNG_ERR_TYPECMP</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPEVAL">XML_RELAXNG_ERR_TYPEVAL</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_VALELEM">XML_RELAXNG_ERR_VALELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_VALUE">XML_RELAXNG_ERR_VALUE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_OK">XML_RELAXNG_OK</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNG">xmlRelaxNG</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+</p><h2><a name="schemasInternals" id="schemasInternals">Module schemasInternals</a>:</h2><p><a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYSIMPLETYPE">XML_SCHEMAS_ANYSIMPLETYPE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYTYPE">XML_SCHEMAS_ANYTYPE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYURI">XML_SCHEMAS_ANYURI</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BASE64BINARY">XML_SCHEMAS_BASE64BINARY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BOOLEAN">XML_SCHEMAS_BOOLEAN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BYTE">XML_SCHEMAS_BYTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DATE">XML_SCHEMAS_DATE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DATETIME">XML_SCHEMAS_DATETIME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DECIMAL">XML_SCHEMAS_DECIMAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DOUBLE">XML_SCHEMAS_DOUBLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DURATION">XML_SCHEMAS_DURATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ENTITIES">XML_SCHEMAS_ENTITIES</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ENTITY">XML_SCHEMAS_ENTITY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FLOAT">XML_SCHEMAS_FLOAT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GDAY">XML_SCHEMAS_GDAY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GMONTH">XML_SCHEMAS_GMONTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GMONTHDAY">XML_SCHEMAS_GMONTHDAY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GYEAR">XML_SCHEMAS_GYEAR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GYEARMONTH">XML_SCHEMAS_GYEARMONTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_HEXBINARY">XML_SCHEMAS_HEXBINARY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ID">XML_SCHEMAS_ID</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_IDREF">XML_SCHEMAS_IDREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_IDREFS">XML_SCHEMAS_IDREFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INT">XML_SCHEMAS_INT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INTEGER">XML_SCHEMAS_INTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_LANGUAGE">XML_SCHEMAS_LANGUAGE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_LONG">XML_SCHEMAS_LONG</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NAME">XML_SCHEMAS_NAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NCNAME">XML_SCHEMAS_NCNAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NINTEGER">XML_SCHEMAS_NINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NMTOKEN">XML_SCHEMAS_NMTOKEN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NMTOKENS">XML_SCHEMAS_NMTOKENS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NNINTEGER">XML_SCHEMAS_NNINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NORMSTRING">XML_SCHEMAS_NORMSTRING</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NOTATION">XML_SCHEMAS_NOTATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NPINTEGER">XML_SCHEMAS_NPINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_PINTEGER">XML_SCHEMAS_PINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QNAME">XML_SCHEMAS_QNAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_SHORT">XML_SCHEMAS_SHORT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_STRING">XML_SCHEMAS_STRING</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TIME">XML_SCHEMAS_TIME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TOKEN">XML_SCHEMAS_TOKEN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UBYTE">XML_SCHEMAS_UBYTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UINT">XML_SCHEMAS_UINT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ULONG">XML_SCHEMAS_ULONG</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UNKNOWN">XML_SCHEMAS_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_USHORT">XML_SCHEMAS_USHORT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_EMPTY">XML_SCHEMA_CONTENT_EMPTY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_LENGTH">XML_SCHEMA_FACET_LENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXEXCLUSIVE">XML_SCHEMA_FACET_MAXEXCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_PATTERN">XML_SCHEMA_FACET_PATTERN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_TOTALDIGITS">XML_SCHEMA_FACET_TOTALDIGITS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_WHITESPACE">XML_SCHEMA_FACET_WHITESPACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ALL">XML_SCHEMA_TYPE_ALL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX_CONTENT">XML_SCHEMA_TYPE_COMPLEX_CONTENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ELEMENT">XML_SCHEMA_TYPE_ELEMENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SEQUENCE">XML_SCHEMA_TYPE_SEQUENCE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE">XML_SCHEMA_TYPE_SIMPLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE_CONTENT">XML_SCHEMA_TYPE_SIMPLE_CONTENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UR">XML_SCHEMA_TYPE_UR</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAnnot">_xmlSchemaAnnot</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeLink">_xmlSchemaAttributeLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacetLink">_xmlSchemaFacetLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaNotation">_xmlSchemaNotation</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaTypeLink">_xmlSchemaTypeLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcardNs">_xmlSchemaWildcardNs</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttribute">xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaElementPtr">xmlSchemaElementPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacet">xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetLink">xmlSchemaFacetLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaNotationPtr">xmlSchemaNotationPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaType">xmlSchemaType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaVal">xmlSchemaVal</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a><br />
+</p><h2><a name="schematron" id="schematron">Module schematron</a>:</h2><p><a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_BUFFER">XML_SCHEMATRON_OUT_BUFFER</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_ERROR">XML_SCHEMATRON_OUT_ERROR</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_FILE">XML_SCHEMATRON_OUT_FILE</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_IO">XML_SCHEMATRON_OUT_IO</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_QUIET">XML_SCHEMATRON_OUT_QUIET</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_TEXT">XML_SCHEMATRON_OUT_TEXT</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_XML">XML_SCHEMATRON_OUT_XML</a><br />
+<a href="html/libxml-schematron.html#xmlSchematron">xmlSchematron</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidOptions">xmlSchematronValidOptions</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+</p><h2><a name="threads" id="threads">Module threads</a>:</h2><p><a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-threads.html#xmlDllMain">xmlDllMain</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
+<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-threads.html#xmlMutex">xmlMutex</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutex">xmlRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+</p><h2><a name="tree" id="tree">Module tree</a>:</h2><p><a href="html/libxml-tree.html#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a><br />
+<a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a><br />
+<a href="html/libxml-tree.html#XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a><br />
+<a href="html/libxml-tree.html#XML_COMMENT_NODE">XML_COMMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCB_DOCUMENT_NODE">XML_DOCB_DOCUMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOC_DTDVALID">XML_DOC_DTDVALID</a><br />
+<a href="html/libxml-tree.html#XML_DOC_HTML">XML_DOC_HTML</a><br />
+<a href="html/libxml-tree.html#XML_DOC_INTERNAL">XML_DOC_INTERNAL</a><br />
+<a href="html/libxml-tree.html#XML_DOC_NSVALID">XML_DOC_NSVALID</a><br />
+<a href="html/libxml-tree.html#XML_DOC_OLD10">XML_DOC_OLD10</a><br />
+<a href="html/libxml-tree.html#XML_DOC_USERBUILT">XML_DOC_USERBUILT</a><br />
+<a href="html/libxml-tree.html#XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a><br />
+<a href="html/libxml-tree.html#XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a><br />
+<a href="html/libxml-tree.html#XML_DTD_NODE">XML_DTD_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_DECL">XML_ELEMENT_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_NODE">XML_ELEMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_DECL">XML_ENTITY_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_NODE">XML_ENTITY_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-tree.html#XML_GET_CONTENT">XML_GET_CONTENT</a><br />
+<a href="html/libxml-tree.html#XML_GET_LINE">XML_GET_LINE</a><br />
+<a href="html/libxml-tree.html#XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a><br />
+<a href="html/libxml-tree.html#XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a><br />
+<a href="html/libxml-tree.html#XML_NOTATION_NODE">XML_NOTATION_NODE</a><br />
+<a href="html/libxml-tree.html#XML_PI_NODE">XML_PI_NODE</a><br />
+<a href="html/libxml-tree.html#XML_TEXT_NODE">XML_TEXT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_XINCLUDE_END">XML_XINCLUDE_END</a><br />
+<a href="html/libxml-tree.html#XML_XINCLUDE_START">XML_XINCLUDE_START</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
+<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+<a href="html/libxml-tree.html#_xmlEnumeration">_xmlEnumeration</a><br />
+<a href="html/libxml-tree.html#_xmlID">_xmlID</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
+<a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+<a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlAttr">xmlAttr</a><br />
+<a href="html/libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-tree.html#xmlAttribute">xmlAttribute</a><br />
+<a href="html/libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a><br />
+<a href="html/libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a><br />
+<a href="html/libxml-tree.html#xmlAttributeType">xmlAttributeType</a><br />
+<a href="html/libxml-tree.html#xmlBuf">xmlBuf</a><br />
+<a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+<a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlBufPtr">xmlBufPtr</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+<a href="html/libxml-tree.html#xmlBuffer">xmlBuffer</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-tree.html#xmlBufferEmpty">xmlBufferEmpty</a><br />
+<a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBufferLength">xmlBufferLength</a><br />
+<a href="html/libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a><br />
+<a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-tree.html#xmlDoc">xmlDoc</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocDump">xmlDocDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocProperties">xmlDocProperties</a><br />
+<a href="html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDtd">xmlDtd</a><br />
+<a href="html/libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-tree.html#xmlElement">xmlElement</a><br />
+<a href="html/libxml-tree.html#xmlElementContent">xmlElementContent</a><br />
+<a href="html/libxml-tree.html#xmlElementContentOccur">xmlElementContentOccur</a><br />
+<a href="html/libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a><br />
+<a href="html/libxml-tree.html#xmlElementContentType">xmlElementContentType</a><br />
+<a href="html/libxml-tree.html#xmlElementPtr">xmlElementPtr</a><br />
+<a href="html/libxml-tree.html#xmlElementType">xmlElementType</a><br />
+<a href="html/libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a><br />
+<a href="html/libxml-tree.html#xmlEntity">xmlEntity</a><br />
+<a href="html/libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a><br />
+<a href="html/libxml-tree.html#xmlEnumeration">xmlEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
+<a href="html/libxml-tree.html#xmlFreeDtd">xmlFreeDtd</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
+<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+<a href="html/libxml-tree.html#xmlFreeProp">xmlFreeProp</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetIntSubset">xmlGetIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-tree.html#xmlID">xmlID</a><br />
+<a href="html/libxml-tree.html#xmlIDPtr">xmlIDPtr</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-tree.html#xmlNewText">xmlNewText</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlNode">xmlNode</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeIsText">xmlNodeIsText</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNotation">xmlNotation</a><br />
+<a href="html/libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a><br />
+<a href="html/libxml-tree.html#xmlNs">xmlNs</a><br />
+<a href="html/libxml-tree.html#xmlNsPtr">xmlNsPtr</a><br />
+<a href="html/libxml-tree.html#xmlNsType">xmlNsType</a><br />
+<a href="html/libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a><br />
+<a href="html/libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a><br />
+<a href="html/libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a><br />
+<a href="html/libxml-tree.html#xmlParserInput">xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a><br />
+<a href="html/libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a><br />
+<a href="html/libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-tree.html#xmlRef">xmlRef</a><br />
+<a href="html/libxml-tree.html#xmlRefPtr">xmlRefPtr</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+<a href="html/libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a><br />
+<a href="html/libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a><br />
+<a href="html/libxml-tree.html#xmlSAXLocator">xmlSAXLocator</a><br />
+<a href="html/libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a><br />
+<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlTextConcat">xmlTextConcat</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+</p><h2><a name="uri" id="uri">Module uri</a>:</h2><p><a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+<a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+<a href="html/libxml-uri.html#xmlURI">xmlURI</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+<a href="html/libxml-uri.html#xmlURIPtr">xmlURIPtr</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+</p><h2><a name="valid" id="valid">Module valid</a>:</h2><p><a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-valid.html#xmlAttributeTable">xmlAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a><br />
+<a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlElementTable">xmlElementTable</a><br />
+<a href="html/libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a><br />
+<a href="html/libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlFreeIDTable">xmlFreeIDTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeNotationTable">xmlFreeNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeValidCtxt">xmlFreeValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-valid.html#xmlIDTable">xmlIDTable</a><br />
+<a href="html/libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlNotationTable">xmlNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a><br />
+<a href="html/libxml-valid.html#xmlRefTable">xmlRefTable</a><br />
+<a href="html/libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidState">xmlValidState</a><br />
+<a href="html/libxml-valid.html#xmlValidStatePtr">xmlValidStatePtr</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNameValue">xmlValidateNameValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</p><h2><a name="xinclude" id="xinclude">Module xinclude</a>:</h2><p><a href="html/libxml-xinclude.html#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_HREF">XINCLUDE_HREF</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE">XINCLUDE_PARSE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</p><h2><a name="xlink" id="xlink">Module xlink</a>:</h2><p><a href="html/libxml-xlink.html#XLINK_ACTUATE_AUTO">XLINK_ACTUATE_AUTO</a><br />
+<a href="html/libxml-xlink.html#XLINK_ACTUATE_NONE">XLINK_ACTUATE_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_ACTUATE_ONREQUEST">XLINK_ACTUATE_ONREQUEST</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_EMBED">XLINK_SHOW_EMBED</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_NEW">XLINK_SHOW_NEW</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_NONE">XLINK_SHOW_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_REPLACE">XLINK_SHOW_REPLACE</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_EXTENDED">XLINK_TYPE_EXTENDED</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_EXTENDED_SET">XLINK_TYPE_EXTENDED_SET</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_NONE">XLINK_TYPE_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_SIMPLE">XLINK_TYPE_SIMPLE</a><br />
+<a href="html/libxml-xlink.html#_xlinkHandler">_xlinkHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkActuate">xlinkActuate</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkHRef">xlinkHRef</a><br />
+<a href="html/libxml-xlink.html#xlinkHandler">xlinkHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkRole">xlinkRole</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkShow">xlinkShow</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkTitle">xlinkTitle</a><br />
+<a href="html/libxml-xlink.html#xlinkType">xlinkType</a><br />
+</p><h2><a name="xmlIO" id="xmlIO">Module xmlIO</a>:</h2><p><a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileClose">xmlFileClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileMatch">xmlFileMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPMatch">xmlIOFTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPMatch">xmlIOHTTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</p><h2><a name="xmlautomata" id="xmlautomata">Module xmlautomata</a>:</h2><p><a href="html/libxml-xmlautomata.html#xmlAutomata">xmlAutomata</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewState">xmlAutomataNewState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataState">xmlAutomataState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a><br />
+<a href="html/libxml-xmlautomata.html#xmlFreeAutomata">xmlFreeAutomata</a><br />
+<a href="html/libxml-xmlautomata.html#xmlNewAutomata">xmlNewAutomata</a><br />
+</p><h2><a name="xmlerror" id="xmlerror">Module xmlerror</a>:</h2><p><a href="html/libxml-xmlerror.html#XML_BUF_OVERFLOW">XML_BUF_OVERFLOW</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_CREATE_CTXT">XML_C14N_CREATE_CTXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_CREATE_STACK">XML_C14N_CREATE_STACK</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_INVALID_NODE">XML_C14N_INVALID_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_RELATIVE_NAMESPACE">XML_C14N_RELATIVE_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_REQUIRES_UTF8">XML_C14N_REQUIRES_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_UNKNOW_NODE">XML_C14N_UNKNOW_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_ENTRY_BROKEN">XML_CATALOG_ENTRY_BROKEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_MISSING_ATTR">XML_CATALOG_MISSING_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_NOT_CATALOG">XML_CATALOG_NOT_CATALOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_PREFER_VALUE">XML_CATALOG_PREFER_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_RECURSION">XML_CATALOG_RECURSION</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_ENTITY_TYPE">XML_CHECK_ENTITY_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ATTRIBUTE">XML_CHECK_FOUND_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_CDATA">XML_CHECK_FOUND_CDATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_COMMENT">XML_CHECK_FOUND_COMMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_DOCTYPE">XML_CHECK_FOUND_DOCTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ENTITY">XML_CHECK_FOUND_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ENTITYREF">XML_CHECK_FOUND_ENTITYREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_FRAGMENT">XML_CHECK_FOUND_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_NOTATION">XML_CHECK_FOUND_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_PI">XML_CHECK_FOUND_PI</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_TEXT">XML_CHECK_FOUND_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NAME_NOT_NULL">XML_CHECK_NAME_NOT_NULL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ATTR">XML_CHECK_NOT_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ATTR_DECL">XML_CHECK_NOT_ATTR_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_DTD">XML_CHECK_NOT_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ELEM_DECL">XML_CHECK_NOT_ELEM_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ENTITY_DECL">XML_CHECK_NOT_ENTITY_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_NCNAME">XML_CHECK_NOT_NCNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_NS_DECL">XML_CHECK_NOT_NS_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_UTF8">XML_CHECK_NOT_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_DICT">XML_CHECK_NO_DICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_DOC">XML_CHECK_NO_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_ELEM">XML_CHECK_NO_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_HREF">XML_CHECK_NO_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_NAME">XML_CHECK_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_NEXT">XML_CHECK_NO_NEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_PARENT">XML_CHECK_NO_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_PREV">XML_CHECK_NO_PREV</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NS_ANCESTOR">XML_CHECK_NS_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NS_SCOPE">XML_CHECK_NS_SCOPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_OUTSIDE_DICT">XML_CHECK_OUTSIDE_DICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_UNKNOWN_NODE">XML_CHECK_UNKNOWN_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_DOC">XML_CHECK_WRONG_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_NAME">XML_CHECK_WRONG_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_NEXT">XML_CHECK_WRONG_NEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_PARENT">XML_CHECK_WRONG_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_PREV">XML_CHECK_WRONG_PREV</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_DEFAULT">XML_DTD_ATTRIBUTE_DEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_REDEFINED">XML_DTD_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_VALUE">XML_DTD_ATTRIBUTE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_ERROR">XML_DTD_CONTENT_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_MODEL">XML_DTD_CONTENT_MODEL</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_NOT_DETERMINIST">XML_DTD_CONTENT_NOT_DETERMINIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_DIFFERENT_PREFIX">XML_DTD_DIFFERENT_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_DUP_TOKEN">XML_DTD_DUP_TOKEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_DEFAULT_NAMESPACE">XML_DTD_ELEM_DEFAULT_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_NAMESPACE">XML_DTD_ELEM_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_REDEFINED">XML_DTD_ELEM_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_EMPTY_NOTATION">XML_DTD_EMPTY_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ENTITY_TYPE">XML_DTD_ENTITY_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_FIXED">XML_DTD_ID_FIXED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_REDEFINED">XML_DTD_ID_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_SUBSET">XML_DTD_ID_SUBSET</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_INVALID_CHILD">XML_DTD_INVALID_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_INVALID_DEFAULT">XML_DTD_INVALID_DEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_LOAD_ERROR">XML_DTD_LOAD_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MISSING_ATTRIBUTE">XML_DTD_MISSING_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MIXED_CORRUPT">XML_DTD_MIXED_CORRUPT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MULTIPLE_ID">XML_DTD_MULTIPLE_ID</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOTATION_REDEFINED">XML_DTD_NOTATION_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOTATION_VALUE">XML_DTD_NOTATION_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_EMPTY">XML_DTD_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_PCDATA">XML_DTD_NOT_PCDATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_STANDALONE">XML_DTD_NOT_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_DOC">XML_DTD_NO_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_DTD">XML_DTD_NO_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_ELEM_NAME">XML_DTD_NO_ELEM_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_PREFIX">XML_DTD_NO_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_ROOT">XML_DTD_NO_ROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ROOT_NAME">XML_DTD_ROOT_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_STANDALONE_DEFAULTED">XML_DTD_STANDALONE_DEFAULTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_STANDALONE_WHITE_SPACE">XML_DTD_STANDALONE_WHITE_SPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ATTRIBUTE">XML_DTD_UNKNOWN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ELEM">XML_DTD_UNKNOWN_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_FINISHED">XML_ERR_ATTLIST_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_STARTED">XML_ERR_ATTLIST_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_FINISHED">XML_ERR_ATTRIBUTE_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_STARTED">XML_ERR_ATTRIBUTE_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_REDEFINED">XML_ERR_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_WITHOUT_VALUE">XML_ERR_ATTRIBUTE_WITHOUT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CDATA_NOT_FINISHED">XML_ERR_CDATA_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_AT_EOF">XML_ERR_CHARREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_DTD">XML_ERR_CHARREF_IN_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_EPILOG">XML_ERR_CHARREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_PROLOG">XML_ERR_CHARREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_COMMENT_NOT_FINISHED">XML_ERR_COMMENT_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_INVALID">XML_ERR_CONDSEC_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_INVALID_KEYWORD">XML_ERR_CONDSEC_INVALID_KEYWORD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_NOT_FINISHED">XML_ERR_CONDSEC_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_NOT_STARTED">XML_ERR_CONDSEC_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCTYPE_NOT_FINISHED">XML_ERR_DOCTYPE_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_EMPTY">XML_ERR_DOCUMENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_END">XML_ERR_DOCUMENT_END</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_START">XML_ERR_DOCUMENT_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_FINISHED">XML_ERR_ELEMCONTENT_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_STARTED">XML_ERR_ELEMCONTENT_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENCODING_NAME">XML_ERR_ENCODING_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_AT_EOF">XML_ERR_ENTITYREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_DTD">XML_ERR_ENTITYREF_IN_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_EPILOG">XML_ERR_ENTITYREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_PROLOG">XML_ERR_ENTITYREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_NO_NAME">XML_ERR_ENTITYREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_SEMICOL_MISSING">XML_ERR_ENTITYREF_SEMICOL_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_BOUNDARY">XML_ERR_ENTITY_BOUNDARY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_CHAR_ERROR">XML_ERR_ENTITY_CHAR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_IS_EXTERNAL">XML_ERR_ENTITY_IS_EXTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_IS_PARAMETER">XML_ERR_ENTITY_IS_PARAMETER</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_LOOP">XML_ERR_ENTITY_LOOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_NOT_FINISHED">XML_ERR_ENTITY_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_NOT_STARTED">XML_ERR_ENTITY_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_PE_INTERNAL">XML_ERR_ENTITY_PE_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_PROCESSING">XML_ERR_ENTITY_PROCESSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EQUAL_REQUIRED">XML_ERR_EQUAL_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ERROR">XML_ERR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXTRA_CONTENT">XML_ERR_EXTRA_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXT_ENTITY_STANDALONE">XML_ERR_EXT_ENTITY_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXT_SUBSET_NOT_FINISHED">XML_ERR_EXT_SUBSET_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_FATAL">XML_ERR_FATAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_GT_REQUIRED">XML_ERR_GT_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_HYPHEN_IN_COMMENT">XML_ERR_HYPHEN_IN_COMMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INTERNAL_ERROR">XML_ERR_INTERNAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_CHAR">XML_ERR_INVALID_CHAR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_CHARREF">XML_ERR_INVALID_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_DEC_CHARREF">XML_ERR_INVALID_DEC_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_ENCODING">XML_ERR_INVALID_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_HEX_CHARREF">XML_ERR_INVALID_HEX_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_URI">XML_ERR_INVALID_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LITERAL_NOT_FINISHED">XML_ERR_LITERAL_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LITERAL_NOT_STARTED">XML_ERR_LITERAL_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LTSLASH_REQUIRED">XML_ERR_LTSLASH_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LT_IN_ATTRIBUTE">XML_ERR_LT_IN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LT_REQUIRED">XML_ERR_LT_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MISPLACED_CDATA_END">XML_ERR_MISPLACED_CDATA_END</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MISSING_ENCODING">XML_ERR_MISSING_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MIXED_NOT_FINISHED">XML_ERR_MIXED_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MIXED_NOT_STARTED">XML_ERR_MIXED_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NAME_REQUIRED">XML_ERR_NAME_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NMTOKEN_REQUIRED">XML_ERR_NMTOKEN_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NONE">XML_ERR_NONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_NOT_FINISHED">XML_ERR_NOTATION_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_NOT_STARTED">XML_ERR_NOTATION_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_PROCESSING">XML_ERR_NOTATION_PROCESSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOT_STANDALONE">XML_ERR_NOT_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOT_WELL_BALANCED">XML_ERR_NOT_WELL_BALANCED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NO_DTD">XML_ERR_NO_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NO_MEMORY">XML_ERR_NO_MEMORY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NS_DECL_ERROR">XML_ERR_NS_DECL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_OK">XML_ERR_OK</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PCDATA_REQUIRED">XML_ERR_PCDATA_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_AT_EOF">XML_ERR_PEREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_EPILOG">XML_ERR_PEREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_INT_SUBSET">XML_ERR_PEREF_IN_INT_SUBSET</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_PROLOG">XML_ERR_PEREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_NO_NAME">XML_ERR_PEREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_SEMICOL_MISSING">XML_ERR_PEREF_SEMICOL_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PI_NOT_FINISHED">XML_ERR_PI_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PI_NOT_STARTED">XML_ERR_PI_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PUBID_REQUIRED">XML_ERR_PUBID_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_RESERVED_XML_NAME">XML_ERR_RESERVED_XML_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_SEPARATOR_REQUIRED">XML_ERR_SEPARATOR_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_SPACE_REQUIRED">XML_ERR_SPACE_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STANDALONE_VALUE">XML_ERR_STANDALONE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STRING_NOT_CLOSED">XML_ERR_STRING_NOT_CLOSED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STRING_NOT_STARTED">XML_ERR_STRING_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_TAG_NAME_MISMATCH">XML_ERR_TAG_NAME_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_TAG_NOT_FINISHED">XML_ERR_TAG_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNDECLARED_ENTITY">XML_ERR_UNDECLARED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNKNOWN_ENCODING">XML_ERR_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNPARSED_ENTITY">XML_ERR_UNPARSED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_USER_STOP">XML_ERR_USER_STOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_WARNING">XML_ERR_WARNING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_XMLDECL_NOT_FINISHED">XML_ERR_XMLDECL_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_XMLDECL_NOT_STARTED">XML_ERR_XMLDECL_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_BUFFER">XML_FROM_BUFFER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_C14N">XML_FROM_C14N</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_CATALOG">XML_FROM_CATALOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_CHECK">XML_FROM_CHECK</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_DATATYPE">XML_FROM_DATATYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_DTD">XML_FROM_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_FTP">XML_FROM_FTP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_HTML">XML_FROM_HTML</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_HTTP">XML_FROM_HTTP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_I18N">XML_FROM_I18N</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_IO">XML_FROM_IO</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_MEMORY">XML_FROM_MEMORY</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_MODULE">XML_FROM_MODULE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_NAMESPACE">XML_FROM_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_NONE">XML_FROM_NONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_OUTPUT">XML_FROM_OUTPUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_PARSER">XML_FROM_PARSER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_REGEXP">XML_FROM_REGEXP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_RELAXNGP">XML_FROM_RELAXNGP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_RELAXNGV">XML_FROM_RELAXNGV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASP">XML_FROM_SCHEMASP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMATRONV">XML_FROM_SCHEMATRONV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_TREE">XML_FROM_TREE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_URI">XML_FROM_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_VALID">XML_FROM_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_WRITER">XML_FROM_WRITER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XPATH">XML_FROM_XPATH</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XPOINTER">XML_FROM_XPOINTER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XSLT">XML_FROM_XSLT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_ACCNT">XML_FTP_ACCNT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_URL_SYNTAX">XML_HTTP_URL_SYNTAX</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_USE_IP">XML_HTTP_USE_IP</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_CONV_FAILED">XML_I18N_CONV_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_EXCESS_HANDLER">XML_I18N_EXCESS_HANDLER</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_HANDLER">XML_I18N_NO_HANDLER</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_NAME">XML_I18N_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_OUTPUT">XML_I18N_NO_OUTPUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_BUFFER_FULL">XML_IO_BUFFER_FULL</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EACCES">XML_IO_EACCES</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EADDRINUSE">XML_IO_EADDRINUSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EAFNOSUPPORT">XML_IO_EAFNOSUPPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EAGAIN">XML_IO_EAGAIN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EALREADY">XML_IO_EALREADY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBADF">XML_IO_EBADF</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBADMSG">XML_IO_EBADMSG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBUSY">XML_IO_EBUSY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECANCELED">XML_IO_ECANCELED</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECHILD">XML_IO_ECHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECONNREFUSED">XML_IO_ECONNREFUSED</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EDEADLK">XML_IO_EDEADLK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EDOM">XML_IO_EDOM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EEXIST">XML_IO_EEXIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EFAULT">XML_IO_EFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EFBIG">XML_IO_EFBIG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINPROGRESS">XML_IO_EINPROGRESS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINTR">XML_IO_EINTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINVAL">XML_IO_EINVAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EIO">XML_IO_EIO</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EISCONN">XML_IO_EISCONN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EISDIR">XML_IO_EISDIR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMFILE">XML_IO_EMFILE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMLINK">XML_IO_EMLINK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMSGSIZE">XML_IO_EMSGSIZE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENAMETOOLONG">XML_IO_ENAMETOOLONG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENCODER">XML_IO_ENCODER</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENETUNREACH">XML_IO_ENETUNREACH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENFILE">XML_IO_ENFILE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENODEV">XML_IO_ENODEV</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOENT">XML_IO_ENOENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOEXEC">XML_IO_ENOEXEC</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOLCK">XML_IO_ENOLCK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOMEM">XML_IO_ENOMEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOSPC">XML_IO_ENOSPC</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOSYS">XML_IO_ENOSYS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTDIR">XML_IO_ENOTDIR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTEMPTY">XML_IO_ENOTEMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTSOCK">XML_IO_ENOTSOCK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTSUP">XML_IO_ENOTSUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTTY">XML_IO_ENOTTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENXIO">XML_IO_ENXIO</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EPERM">XML_IO_EPERM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EPIPE">XML_IO_EPIPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ERANGE">XML_IO_ERANGE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EROFS">XML_IO_EROFS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ESPIPE">XML_IO_ESPIPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ESRCH">XML_IO_ESRCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ETIMEDOUT">XML_IO_ETIMEDOUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EXDEV">XML_IO_EXDEV</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_FLUSH">XML_IO_FLUSH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_LOAD_ERROR">XML_IO_LOAD_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_NETWORK_ATTEMPT">XML_IO_NETWORK_ATTEMPT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_NO_INPUT">XML_IO_NO_INPUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_UNKNOWN">XML_IO_UNKNOWN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_WRITE">XML_IO_WRITE</a><br />
+<a href="html/libxml-xmlerror.html#XML_MODULE_CLOSE">XML_MODULE_CLOSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_MODULE_OPEN">XML_MODULE_OPEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_ATTRIBUTE_REDEFINED">XML_NS_ERR_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_COLON">XML_NS_ERR_COLON</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_EMPTY">XML_NS_ERR_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_REGEXP_COMPILE_ERROR">XML_REGEXP_COMPILE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ANYNAME_ATTR_ANCESTOR">XML_RNGP_ANYNAME_ATTR_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_CHILDREN">XML_RNGP_ATTRIBUTE_CHILDREN</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_CONTENT">XML_RNGP_ATTRIBUTE_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_EMPTY">XML_RNGP_ATTRIBUTE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_NOOP">XML_RNGP_ATTRIBUTE_NOOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTR_CONFLICT">XML_RNGP_ATTR_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CHOICE_CONTENT">XML_RNGP_CHOICE_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CHOICE_EMPTY">XML_RNGP_CHOICE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CREATE_FAILURE">XML_RNGP_CREATE_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DATA_CONTENT">XML_RNGP_DATA_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_CREATE_FAILED">XML_RNGP_DEFINE_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_EMPTY">XML_RNGP_DEFINE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_MISSING">XML_RNGP_DEFINE_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_NAME_MISSING">XML_RNGP_DEFINE_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEF_CHOICE_AND_INTERLEAVE">XML_RNGP_DEF_CHOICE_AND_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_CONTENT">XML_RNGP_ELEMENT_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_EMPTY">XML_RNGP_ELEMENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_NAME">XML_RNGP_ELEMENT_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_NO_CONTENT">XML_RNGP_ELEMENT_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_CONTENT_EMPTY">XML_RNGP_ELEM_CONTENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_CONTENT_ERROR">XML_RNGP_ELEM_CONTENT_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_TEXT_CONFLICT">XML_RNGP_ELEM_TEXT_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY">XML_RNGP_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_CONSTRUCT">XML_RNGP_EMPTY_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_CONTENT">XML_RNGP_EMPTY_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_NOT_EMPTY">XML_RNGP_EMPTY_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ERROR_TYPE_LIB">XML_RNGP_ERROR_TYPE_LIB</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_EMPTY">XML_RNGP_EXCEPT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_MISSING">XML_RNGP_EXCEPT_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_MULTIPLE">XML_RNGP_EXCEPT_MULTIPLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_NO_CONTENT">XML_RNGP_EXCEPT_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNALREF_EMTPY">XML_RNGP_EXTERNALREF_EMTPY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNALREF_RECURSE">XML_RNGP_EXTERNALREF_RECURSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNAL_REF_FAILURE">XML_RNGP_EXTERNAL_REF_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_FORBIDDEN_ATTRIBUTE">XML_RNGP_FORBIDDEN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_FOREIGN_ELEMENT">XML_RNGP_FOREIGN_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_CONTENT">XML_RNGP_GRAMMAR_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_EMPTY">XML_RNGP_GRAMMAR_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_MISSING">XML_RNGP_GRAMMAR_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_NO_START">XML_RNGP_GRAMMAR_NO_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GROUP_ATTR_CONFLICT">XML_RNGP_GROUP_ATTR_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_HREF_ERROR">XML_RNGP_HREF_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_EMPTY">XML_RNGP_INCLUDE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_FAILURE">XML_RNGP_INCLUDE_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_RECURSE">XML_RNGP_INCLUDE_RECURSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_ADD">XML_RNGP_INTERLEAVE_ADD</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_CREATE_FAILED">XML_RNGP_INTERLEAVE_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_EMPTY">XML_RNGP_INTERLEAVE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_NO_CONTENT">XML_RNGP_INTERLEAVE_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_DEFINE_NAME">XML_RNGP_INVALID_DEFINE_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_URI">XML_RNGP_INVALID_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_VALUE">XML_RNGP_INVALID_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_MISSING_HREF">XML_RNGP_MISSING_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NAME_MISSING">XML_RNGP_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NEED_COMBINE">XML_RNGP_NEED_COMBINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NOTALLOWED_NOT_EMPTY">XML_RNGP_NOTALLOWED_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NSNAME_ATTR_ANCESTOR">XML_RNGP_NSNAME_ATTR_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NSNAME_NO_NS">XML_RNGP_NSNAME_NO_NS</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARAM_FORBIDDEN">XML_RNGP_PARAM_FORBIDDEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARAM_NAME_MISSING">XML_RNGP_PARAM_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_CREATE_FAILED">XML_RNGP_PARENTREF_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NAME_INVALID">XML_RNGP_PARENTREF_NAME_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NOT_EMPTY">XML_RNGP_PARENTREF_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NO_NAME">XML_RNGP_PARENTREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NO_PARENT">XML_RNGP_PARENTREF_NO_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARSE_ERROR">XML_RNGP_PARSE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ATTR_ATTR">XML_RNGP_PAT_ATTR_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ATTR_ELEM">XML_RNGP_PAT_ATTR_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ATTR">XML_RNGP_PAT_DATA_EXCEPT_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ELEM">XML_RNGP_PAT_DATA_EXCEPT_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_EMPTY">XML_RNGP_PAT_DATA_EXCEPT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_GROUP">XML_RNGP_PAT_DATA_EXCEPT_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE">XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_LIST">XML_RNGP_PAT_DATA_EXCEPT_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ONEMORE">XML_RNGP_PAT_DATA_EXCEPT_ONEMORE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_REF">XML_RNGP_PAT_DATA_EXCEPT_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_TEXT">XML_RNGP_PAT_DATA_EXCEPT_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_ATTR">XML_RNGP_PAT_LIST_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_ELEM">XML_RNGP_PAT_LIST_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_INTERLEAVE">XML_RNGP_PAT_LIST_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_LIST">XML_RNGP_PAT_LIST_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_REF">XML_RNGP_PAT_LIST_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_TEXT">XML_RNGP_PAT_LIST_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME">XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ONEMORE_GROUP_ATTR">XML_RNGP_PAT_ONEMORE_GROUP_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR">XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_ATTR">XML_RNGP_PAT_START_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_DATA">XML_RNGP_PAT_START_DATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_EMPTY">XML_RNGP_PAT_START_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_GROUP">XML_RNGP_PAT_START_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_INTERLEAVE">XML_RNGP_PAT_START_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_LIST">XML_RNGP_PAT_START_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_ONEMORE">XML_RNGP_PAT_START_ONEMORE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_TEXT">XML_RNGP_PAT_START_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_VALUE">XML_RNGP_PAT_START_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PREFIX_UNDEFINED">XML_RNGP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_CREATE_FAILED">XML_RNGP_REF_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_CYCLE">XML_RNGP_REF_CYCLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NAME_INVALID">XML_RNGP_REF_NAME_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NOT_EMPTY">XML_RNGP_REF_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NO_DEF">XML_RNGP_REF_NO_DEF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NO_NAME">XML_RNGP_REF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_CHOICE_AND_INTERLEAVE">XML_RNGP_START_CHOICE_AND_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_CONTENT">XML_RNGP_START_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_EMPTY">XML_RNGP_START_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_MISSING">XML_RNGP_START_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TEXT_EXPECTED">XML_RNGP_TEXT_EXPECTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TEXT_HAS_CHILD">XML_RNGP_TEXT_HAS_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_MISSING">XML_RNGP_TYPE_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_NOT_FOUND">XML_RNGP_TYPE_NOT_FOUND</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_VALUE">XML_RNGP_TYPE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_ATTRIBUTE">XML_RNGP_UNKNOWN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_COMBINE">XML_RNGP_UNKNOWN_COMBINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_CONSTRUCT">XML_RNGP_UNKNOWN_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_TYPE_LIB">XML_RNGP_UNKNOWN_TYPE_LIB</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_URI_FRAGMENT">XML_RNGP_URI_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_URI_NOT_ABSOLUTE">XML_RNGP_URI_NOT_ABSOLUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_VALUE_EMPTY">XML_RNGP_VALUE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT">XML_RNGP_VALUE_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_XMLNS_NAME">XML_RNGP_XMLNS_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_XML_NS">XML_RNGP_XML_NS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_CHAR_INVALID">XML_SAVE_CHAR_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_1">XML_SCHEMAP_COS_VALID_DEFAULT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_1">XML_SCHEMAP_CT_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_2">XML_SCHEMAP_CT_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_3">XML_SCHEMAP_CT_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_4">XML_SCHEMAP_CT_PROPS_CORRECT_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_5">XML_SCHEMAP_CT_PROPS_CORRECT_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CVC_SIMPLE_TYPE">XML_SCHEMAP_CVC_SIMPLE_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_C_PROPS_CORRECT">XML_SCHEMAP_C_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DEF_AND_PREFIX">XML_SCHEMAP_DEF_AND_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEMFORMDEFAULT_VALUE">XML_SCHEMAP_ELEMFORMDEFAULT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEM_DEFAULT_FIXED">XML_SCHEMAP_ELEM_DEFAULT_FIXED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEM_NONAME_NOREF">XML_SCHEMAP_ELEM_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_EXTENSION_NO_BASE">XML_SCHEMAP_EXTENSION_NO_BASE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_2">XML_SCHEMAP_E_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_3">XML_SCHEMAP_E_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_4">XML_SCHEMAP_E_PROPS_CORRECT_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_5">XML_SCHEMAP_E_PROPS_CORRECT_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_6">XML_SCHEMAP_E_PROPS_CORRECT_6</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FACET_NO_VALUE">XML_SCHEMAP_FACET_NO_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_BUILD_IMPORT">XML_SCHEMAP_FAILED_BUILD_IMPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_LOAD">XML_SCHEMAP_FAILED_LOAD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_PARSE">XML_SCHEMAP_FAILED_PARSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_GROUP_NONAME_NOREF">XML_SCHEMAP_GROUP_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI">XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_REDEFINE_NSNAME">XML_SCHEMAP_IMPORT_REDEFINE_NSNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INTERNAL">XML_SCHEMAP_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE">XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_COMBINATION">XML_SCHEMAP_INVALID_ATTR_COMBINATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION">XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_NAME">XML_SCHEMAP_INVALID_ATTR_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET_VALUE">XML_SCHEMAP_INVALID_FACET_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_MAXOCCURS">XML_SCHEMAP_INVALID_MAXOCCURS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_MINOCCURS">XML_SCHEMAP_INVALID_MINOCCURS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_REF_AND_SUBTYPE">XML_SCHEMAP_INVALID_REF_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_WHITE_SPACE">XML_SCHEMAP_INVALID_WHITE_SPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_1">XML_SCHEMAP_MG_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_2">XML_SCHEMAP_MG_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD">XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOATTR_NOREF">XML_SCHEMAP_NOATTR_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOROOT">XML_SCHEMAP_NOROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTATION_NO_NAME">XML_SCHEMAP_NOTATION_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTHING_TO_PARSE">XML_SCHEMAP_NOTHING_TO_PARSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_DETERMINISTIC">XML_SCHEMAP_NOT_DETERMINISTIC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NO_XMLNS">XML_SCHEMAP_NO_XMLNS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NO_XSI">XML_SCHEMAP_NO_XSI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_1">XML_SCHEMAP_P_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_1">XML_SCHEMAP_P_PROPS_CORRECT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_2">XML_SCHEMAP_P_PROPS_CORRECT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_GROUP">XML_SCHEMAP_REDEFINED_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_NOTATION">XML_SCHEMAP_REDEFINED_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_TYPE">XML_SCHEMAP_REDEFINED_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REF_AND_CONTENT">XML_SCHEMAP_REF_AND_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REF_AND_SUBTYPE">XML_SCHEMAP_REF_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REGEXP_INVALID">XML_SCHEMAP_REGEXP_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RESTRICTION_NONAME_NOREF">XML_SCHEMAP_RESTRICTION_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_INVALID_VALUE">XML_SCHEMAP_S4S_ATTR_INVALID_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_MISSING">XML_SCHEMAP_S4S_ATTR_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED">XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ELEM_MISSING">XML_SCHEMAP_S4S_ELEM_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED">XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SIMPLETYPE_NONAME">XML_SCHEMAP_SIMPLETYPE_NONAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_1">XML_SCHEMAP_SRC_ATTRIBUTE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_2">XML_SCHEMAP_SRC_ATTRIBUTE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_1">XML_SCHEMAP_SRC_ATTRIBUTE_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_2">XML_SCHEMAP_SRC_ATTRIBUTE_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_4">XML_SCHEMAP_SRC_ATTRIBUTE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_CT_1">XML_SCHEMAP_SRC_CT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_1">XML_SCHEMAP_SRC_ELEMENT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_1">XML_SCHEMAP_SRC_ELEMENT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_2">XML_SCHEMAP_SRC_ELEMENT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_3">XML_SCHEMAP_SRC_ELEMENT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT">XML_SCHEMAP_SRC_IMPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_1">XML_SCHEMAP_SRC_IMPORT_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_2">XML_SCHEMAP_SRC_IMPORT_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2">XML_SCHEMAP_SRC_IMPORT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_1">XML_SCHEMAP_SRC_IMPORT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_2">XML_SCHEMAP_SRC_IMPORT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_1">XML_SCHEMAP_SRC_IMPORT_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_2">XML_SCHEMAP_SRC_IMPORT_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_INCLUDE">XML_SCHEMAP_SRC_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_REDEFINE">XML_SCHEMAP_SRC_REDEFINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_RESOLVE">XML_SCHEMAP_SRC_RESOLVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_1">XML_SCHEMAP_SRC_SIMPLE_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_2">XML_SCHEMAP_SRC_SIMPLE_TYPE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_3">XML_SCHEMAP_SRC_SIMPLE_TYPE_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_4">XML_SCHEMAP_SRC_SIMPLE_TYPE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES">XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_1">XML_SCHEMAP_ST_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_2">XML_SCHEMAP_ST_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_3">XML_SCHEMAP_ST_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE">XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_TYPE_AND_SUBTYPE">XML_SCHEMAP_TYPE_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNION_NOT_EXPRESSIBLE">XML_SCHEMAP_UNION_NOT_EXPRESSIBLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ALL_CHILD">XML_SCHEMAP_UNKNOWN_ALL_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD">XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD">XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP">XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTR_CHILD">XML_SCHEMAP_UNKNOWN_ATTR_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_BASE_TYPE">XML_SCHEMAP_UNKNOWN_BASE_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_CHOICE_CHILD">XML_SCHEMAP_UNKNOWN_CHOICE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ELEM_CHILD">XML_SCHEMAP_UNKNOWN_ELEM_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD">XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_CHILD">XML_SCHEMAP_UNKNOWN_FACET_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_TYPE">XML_SCHEMAP_UNKNOWN_FACET_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_GROUP_CHILD">XML_SCHEMAP_UNKNOWN_GROUP_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_REF">XML_SCHEMAP_UNKNOWN_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD">XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD">XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD">XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_TYPE">XML_SCHEMAP_UNKNOWN_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_UNION_CHILD">XML_SCHEMAP_UNKNOWN_UNION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_SKIP_SCHEMA">XML_SCHEMAP_WARN_SKIP_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER">XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMATRONV_ASSERT">XML_SCHEMATRONV_ASSERT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMATRONV_REPORT">XML_SCHEMATRONV_REPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ATTRINVALID">XML_SCHEMAV_ATTRINVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ATTRUNKNOWN">XML_SCHEMAV_ATTRUNKNOWN</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CONSTRUCT">XML_SCHEMAV_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_1">XML_SCHEMAV_CVC_ATTRIBUTE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_2">XML_SCHEMAV_CVC_ATTRIBUTE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_3">XML_SCHEMAV_CVC_ATTRIBUTE_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_4">XML_SCHEMAV_CVC_ATTRIBUTE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_AU">XML_SCHEMAV_CVC_AU</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_1">XML_SCHEMAV_CVC_ELT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_2">XML_SCHEMAV_CVC_ELT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_1">XML_SCHEMAV_CVC_ELT_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_1">XML_SCHEMAV_CVC_ELT_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_2">XML_SCHEMAV_CVC_ELT_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_1">XML_SCHEMAV_CVC_ELT_4_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_2">XML_SCHEMAV_CVC_ELT_4_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_3">XML_SCHEMAV_CVC_ELT_4_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_1">XML_SCHEMAV_CVC_ELT_5_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_2">XML_SCHEMAV_CVC_ELT_5_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_1">XML_SCHEMAV_CVC_ELT_5_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_2">XML_SCHEMAV_CVC_ELT_5_2_2_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_6">XML_SCHEMAV_CVC_ELT_6</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_7">XML_SCHEMAV_CVC_ELT_7</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXLENGTH_VALID">XML_SCHEMAV_CVC_MAXLENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MININCLUSIVE_VALID">XML_SCHEMAV_CVC_MININCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MINLENGTH_VALID">XML_SCHEMAV_CVC_MINLENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_PATTERN_VALID">XML_SCHEMAV_CVC_PATTERN_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TOTALDIGITS_VALID">XML_SCHEMAV_CVC_TOTALDIGITS_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_1">XML_SCHEMAV_CVC_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_EXTRACONTENT">XML_SCHEMAV_EXTRACONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_FACET">XML_SCHEMAV_FACET</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_HAVEDEFAULT">XML_SCHEMAV_HAVEDEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INTERNAL">XML_SCHEMAV_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INVALIDATTR">XML_SCHEMAV_INVALIDATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INVALIDELEM">XML_SCHEMAV_INVALIDELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ISABSTRACT">XML_SCHEMAV_ISABSTRACT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_MISC">XML_SCHEMAV_MISC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_MISSING">XML_SCHEMAV_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOROLLBACK">XML_SCHEMAV_NOROLLBACK</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOROOT">XML_SCHEMAV_NOROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTDETERMINIST">XML_SCHEMAV_NOTDETERMINIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTEMPTY">XML_SCHEMAV_NOTEMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTNILLABLE">XML_SCHEMAV_NOTNILLABLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTSIMPLE">XML_SCHEMAV_NOTSIMPLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTTOPLEVEL">XML_SCHEMAV_NOTTOPLEVEL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTYPE">XML_SCHEMAV_NOTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_UNDECLAREDELEM">XML_SCHEMAV_UNDECLAREDELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_VALUE">XML_SCHEMAV_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_WRONGELEM">XML_SCHEMAV_WRONGELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_INVALID_DEC">XML_TREE_INVALID_DEC</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_INVALID_HEX">XML_TREE_INVALID_HEX</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_NOT_UTF8">XML_TREE_NOT_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_UNTERMINATED_ENTITY">XML_TREE_UNTERMINATED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_CATALOG_PI">XML_WAR_CATALOG_PI</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_ENTITY_REDEFINED">XML_WAR_ENTITY_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_LANG_VALUE">XML_WAR_LANG_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_COLUMN">XML_WAR_NS_COLUMN</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_URI">XML_WAR_NS_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_URI_RELATIVE">XML_WAR_NS_URI_RELATIVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_SPACE_VALUE">XML_WAR_SPACE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_UNDECLARED_ENTITY">XML_WAR_UNDECLARED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_UNKNOWN_VERSION">XML_WAR_UNKNOWN_VERSION</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_BUILD_FAILED">XML_XINCLUDE_BUILD_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_DEPRECATED_NS">XML_XINCLUDE_DEPRECATED_NS</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_ENTITY_DEF_MISMATCH">XML_XINCLUDE_ENTITY_DEF_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FALLBACKS_IN_INCLUDE">XML_XINCLUDE_FALLBACKS_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE">XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FRAGMENT_ID">XML_XINCLUDE_FRAGMENT_ID</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_HREF_URI">XML_XINCLUDE_HREF_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_INCLUDE_IN_INCLUDE">XML_XINCLUDE_INCLUDE_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_INVALID_CHAR">XML_XINCLUDE_INVALID_CHAR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_MULTIPLE_ROOT">XML_XINCLUDE_MULTIPLE_ROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_NO_FALLBACK">XML_XINCLUDE_NO_FALLBACK</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_NO_HREF">XML_XINCLUDE_NO_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_PARSE_VALUE">XML_XINCLUDE_PARSE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_RECURSION">XML_XINCLUDE_RECURSION</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_TEXT_DOCUMENT">XML_XINCLUDE_TEXT_DOCUMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_TEXT_FRAGMENT">XML_XINCLUDE_TEXT_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_UNKNOWN_ENCODING">XML_XINCLUDE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_FAILED">XML_XINCLUDE_XPTR_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_RESULT">XML_XINCLUDE_XPTR_RESULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_ENCODING_ERROR">XML_XPATH_ENCODING_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_EXPRESSION_OK">XML_XPATH_EXPRESSION_OK</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_EXPR_ERROR">XML_XPATH_EXPR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_ARITY">XML_XPATH_INVALID_ARITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CHAR_ERROR">XML_XPATH_INVALID_CHAR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CTXT_POSITION">XML_XPATH_INVALID_CTXT_POSITION</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CTXT_SIZE">XML_XPATH_INVALID_CTXT_SIZE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_OPERAND">XML_XPATH_INVALID_OPERAND</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_PREDICATE_ERROR">XML_XPATH_INVALID_PREDICATE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_TYPE">XML_XPATH_INVALID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_MEMORY_ERROR">XML_XPATH_MEMORY_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_NUMBER_ERROR">XML_XPATH_NUMBER_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_START_LITERAL_ERROR">XML_XPATH_START_LITERAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNCLOSED_ERROR">XML_XPATH_UNCLOSED_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNDEF_PREFIX_ERROR">XML_XPATH_UNDEF_PREFIX_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNDEF_VARIABLE_ERROR">XML_XPATH_UNDEF_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNFINISHED_LITERAL_ERROR">XML_XPATH_UNFINISHED_LITERAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNKNOWN_FUNC_ERROR">XML_XPATH_UNKNOWN_FUNC_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_VARIABLE_REF_ERROR">XML_XPATH_VARIABLE_REF_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_CHILDSEQ_START">XML_XPTR_CHILDSEQ_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_EVAL_FAILED">XML_XPTR_EVAL_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_EXTRA_OBJECTS">XML_XPTR_EXTRA_OBJECTS</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_RESOURCE_ERROR">XML_XPTR_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_SUB_RESOURCE_ERROR">XML_XPTR_SUB_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_SYNTAX_ERROR">XML_XPTR_SYNTAX_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_UNKNOWN_SCHEME">XML_XPTR_UNKNOWN_SCHEME</a><br />
+<a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlError">xmlError</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorDomain">xmlErrorDomain</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorLevel">xmlErrorLevel</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetError">xmlResetError</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+</p><h2><a name="xmlexports" id="xmlexports">Module xmlexports</a>:</h2><p><a href="html/libxml-xmlexports.html#LIBXML_DLL_IMPORT">LIBXML_DLL_IMPORT</a><br />
+<a href="html/libxml-xmlexports.html#XMLCALL">XMLCALL</a><br />
+<a href="html/libxml-xmlexports.html#XMLCDECL">XMLCDECL</a><br />
+<a href="html/libxml-xmlexports.html#XMLPUBFUN">XMLPUBFUN</a><br />
+<a href="html/libxml-xmlexports.html#XMLPUBVAR">XMLPUBVAR</a><br />
+<a href="html/libxml-xmlexports.html#_REENTRANT">_REENTRANT</a><br />
+</p><h2><a name="xmlmemory" id="xmlmemory">Module xmlmemory</a>:</h2><p><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlmemory.html#xmlCleanupMemory">xmlCleanupMemory</a><br />
+<a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlInitMemory">xmlInitMemory</a><br />
+<a href="html/libxml-globals.html#xmlMalloc">xmlMalloc</a><br />
+<a href="html/libxml-globals.html#xmlMallocAtomic">xmlMallocAtomic</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-globals.html#xmlMemStrdup">xmlMemStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-globals.html#xmlRealloc">xmlRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+</p><h2><a name="xmlmodule" id="xmlmodule">Module xmlmodule</a>:</h2><p><a href="html/libxml-xmlmodule.html#XML_MODULE_LAZY">XML_MODULE_LAZY</a><br />
+<a href="html/libxml-xmlmodule.html#XML_MODULE_LOCAL">XML_MODULE_LOCAL</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModule">xmlModule</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOption">xmlModuleOption</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</p><h2><a name="xmlreader" id="xmlreader">Module xmlreader</a>:</h2><p><a href="html/libxml-xmlreader.html#XML_PARSER_DEFAULTATTRS">XML_PARSER_DEFAULTATTRS</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_LOADDTD">XML_PARSER_LOADDTD</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_ERROR">XML_PARSER_SEVERITY_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_ERROR">XML_PARSER_SEVERITY_VALIDITY_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_WARNING">XML_PARSER_SEVERITY_VALIDITY_WARNING</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_WARNING">XML_PARSER_SEVERITY_WARNING</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SUBST_ENTITIES">XML_PARSER_SUBST_ENTITIES</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_VALIDATE">XML_PARSER_VALIDATE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ATTRIBUTE">XML_READER_TYPE_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_CDATA">XML_READER_TYPE_CDATA</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_COMMENT">XML_READER_TYPE_COMMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT">XML_READER_TYPE_DOCUMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT_FRAGMENT">XML_READER_TYPE_DOCUMENT_FRAGMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT_TYPE">XML_READER_TYPE_DOCUMENT_TYPE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ELEMENT">XML_READER_TYPE_ELEMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_END_ELEMENT">XML_READER_TYPE_END_ELEMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_END_ENTITY">XML_READER_TYPE_END_ENTITY</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ENTITY">XML_READER_TYPE_ENTITY</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ENTITY_REFERENCE">XML_READER_TYPE_ENTITY_REFERENCE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_NONE">XML_READER_TYPE_NONE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_NOTATION">XML_READER_TYPE_NOTATION</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_PROCESSING_INSTRUCTION">XML_READER_TYPE_PROCESSING_INSTRUCTION</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_SIGNIFICANT_WHITESPACE">XML_READER_TYPE_SIGNIFICANT_WHITESPACE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_TEXT">XML_READER_TYPE_TEXT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_WHITESPACE">XML_READER_TYPE_WHITESPACE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_XML_DECLARATION">XML_READER_TYPE_XML_DECLARATION</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_CLOSED">XML_TEXTREADER_MODE_CLOSED</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_EOF">XML_TEXTREADER_MODE_EOF</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_ERROR">XML_TEXTREADER_MODE_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_INITIAL">XML_TEXTREADER_MODE_INITIAL</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_INTERACTIVE">XML_TEXTREADER_MODE_INTERACTIVE</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_READING">XML_TEXTREADER_MODE_READING</a><br />
+<a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a><br />
+<a href="html/libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderTypes">xmlReaderTypes</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReader">xmlTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMode">xmlTextReaderMode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+</p><h2><a name="xmlregexp" id="xmlregexp">Module xmlregexp</a>:</h2><p><a href="html/libxml-xmlregexp.html#XML_EXP_ATOM">XML_EXP_ATOM</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_COUNT">XML_EXP_COUNT</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_EMPTY">XML_EXP_EMPTY</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_FORBID">XML_EXP_FORBID</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_OR">XML_EXP_OR</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_SEQ">XML_EXP_SEQ</a><br />
+<a href="html/libxml-xmlregexp.html#emptyExp">emptyExp</a><br />
+<a href="html/libxml-xmlregexp.html#forbiddenExp">forbiddenExp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxt">xmlExpCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFreeCtxt">xmlExpFreeCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNode">xmlExpNode</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNodeType">xmlExpNodeType</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpRef">xmlExpRef</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCtxt">xmlRegExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeRegexp">xmlRegFreeRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexp">xmlRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a><br />
+</p><h2><a name="xmlsave" id="xmlsave">Module xmlsave</a>:</h2><p><a href="html/libxml-xmlsave.html#XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_XML">XML_SAVE_AS_XML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_FORMAT">XML_SAVE_FORMAT</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_WSNONSIG">XML_SAVE_WSNONSIG</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_XHTML">XML_SAVE_XHTML</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+</p><h2><a name="xmlschemas" id="xmlschemas">Module xmlschemas</a>:</h2><p><a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_">XML_SCHEMAS_ERR_</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ATTRINVALID">XML_SCHEMAS_ERR_ATTRINVALID</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ATTRUNKNOWN">XML_SCHEMAS_ERR_ATTRUNKNOWN</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_CONSTRUCT">XML_SCHEMAS_ERR_CONSTRUCT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ELEMCONT">XML_SCHEMAS_ERR_ELEMCONT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_EXTRACONTENT">XML_SCHEMAS_ERR_EXTRACONTENT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_FACET">XML_SCHEMAS_ERR_FACET</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_HAVEDEFAULT">XML_SCHEMAS_ERR_HAVEDEFAULT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INTERNAL">XML_SCHEMAS_ERR_INTERNAL</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDATTR">XML_SCHEMAS_ERR_INVALIDATTR</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDELEM">XML_SCHEMAS_ERR_INVALIDELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ISABSTRACT">XML_SCHEMAS_ERR_ISABSTRACT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_MISSING">XML_SCHEMAS_ERR_MISSING</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOROLLBACK">XML_SCHEMAS_ERR_NOROLLBACK</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOROOT">XML_SCHEMAS_ERR_NOROOT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTDETERMINIST">XML_SCHEMAS_ERR_NOTDETERMINIST</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTEMPTY">XML_SCHEMAS_ERR_NOTEMPTY</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTNILLABLE">XML_SCHEMAS_ERR_NOTNILLABLE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTSIMPLE">XML_SCHEMAS_ERR_NOTSIMPLE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTTOPLEVEL">XML_SCHEMAS_ERR_NOTTOPLEVEL</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTYPE">XML_SCHEMAS_ERR_NOTYPE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_OK">XML_SCHEMAS_ERR_OK</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_UNDECLAREDELEM">XML_SCHEMAS_ERR_UNDECLAREDELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_VALUE">XML_SCHEMAS_ERR_VALUE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_WRONGELEM">XML_SCHEMAS_ERR_WRONGELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_XXX">XML_SCHEMAS_ERR_XXX</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMA_VAL_VC_I_CREATE">XML_SCHEMA_VAL_VC_I_CREATE</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchema">xmlSchema</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidError">xmlSchemaValidError</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+</p><h2><a name="xmlschemastypes" id="xmlschemastypes">Module xmlschemastypes</a>:</h2><p><a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a><br />
+</p><h2><a name="xmlstring" id="xmlstring">Module xmlstring</a>:</h2><p><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
+<a href="html/libxml-xmlstring.html#xmlChar">xmlChar</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrdup">xmlCharStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrndup">xmlCharStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+</p><h2><a name="xmlunicode" id="xmlunicode">Module xmlunicode</a>:</h2><p><a href="html/libxml-xmlunicode.html#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabic">xmlUCSIsArabic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsA">xmlUCSIsArabicPresentationFormsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsB">xmlUCSIsArabicPresentationFormsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArmenian">xmlUCSIsArmenian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArrows">xmlUCSIsArrows</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBasicLatin">xmlUCSIsBasicLatin</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBengali">xmlUCSIsBengali</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBlock">xmlUCSIsBlock</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBlockElements">xmlUCSIsBlockElements</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBuhid">xmlUCSIsBuhid</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsByzantineMusicalSymbols">xmlUCSIsByzantineMusicalSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibility">xmlUCSIsCJKCompatibility</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityForms">xmlUCSIsCJKCompatibilityForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographs">xmlUCSIsCJKCompatibilityIdeographs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographsSupplement">xmlUCSIsCJKCompatibilityIdeographsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKRadicalsSupplement">xmlUCSIsCJKRadicalsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKSymbolsandPunctuation">xmlUCSIsCJKSymbolsandPunctuation</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographs">xmlUCSIsCJKUnifiedIdeographs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionA">xmlUCSIsCJKUnifiedIdeographsExtensionA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionB">xmlUCSIsCJKUnifiedIdeographsExtensionB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatC">xmlUCSIsCatC</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCc">xmlUCSIsCatCc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCf">xmlUCSIsCatCf</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCo">xmlUCSIsCatCo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCs">xmlUCSIsCatCs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatL">xmlUCSIsCatL</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLl">xmlUCSIsCatLl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLm">xmlUCSIsCatLm</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLo">xmlUCSIsCatLo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLt">xmlUCSIsCatLt</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLu">xmlUCSIsCatLu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatM">xmlUCSIsCatM</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMc">xmlUCSIsCatMc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMe">xmlUCSIsCatMe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMn">xmlUCSIsCatMn</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatN">xmlUCSIsCatN</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNd">xmlUCSIsCatNd</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNl">xmlUCSIsCatNl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNo">xmlUCSIsCatNo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatP">xmlUCSIsCatP</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPc">xmlUCSIsCatPc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPd">xmlUCSIsCatPd</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPe">xmlUCSIsCatPe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPf">xmlUCSIsCatPf</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPi">xmlUCSIsCatPi</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPo">xmlUCSIsCatPo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPs">xmlUCSIsCatPs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatS">xmlUCSIsCatS</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSc">xmlUCSIsCatSc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSk">xmlUCSIsCatSk</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSm">xmlUCSIsCatSm</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSo">xmlUCSIsCatSo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZ">xmlUCSIsCatZ</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZl">xmlUCSIsCatZl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZp">xmlUCSIsCatZp</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZs">xmlUCSIsCatZs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCherokee">xmlUCSIsCherokee</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarks">xmlUCSIsCombiningDiacriticalMarks</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarksforSymbols">xmlUCSIsCombiningDiacriticalMarksforSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningHalfMarks">xmlUCSIsCombiningHalfMarks</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningMarksforSymbols">xmlUCSIsCombiningMarksforSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsControlPictures">xmlUCSIsControlPictures</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCurrencySymbols">xmlUCSIsCurrencySymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCypriotSyllabary">xmlUCSIsCypriotSyllabary</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillic">xmlUCSIsCyrillic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillicSupplement">xmlUCSIsCyrillicSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDeseret">xmlUCSIsDeseret</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDingbats">xmlUCSIsDingbats</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedAlphanumerics">xmlUCSIsEnclosedAlphanumerics</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedCJKLettersandMonths">xmlUCSIsEnclosedCJKLettersandMonths</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEthiopic">xmlUCSIsEthiopic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeneralPunctuation">xmlUCSIsGeneralPunctuation</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeometricShapes">xmlUCSIsGeometricShapes</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeorgian">xmlUCSIsGeorgian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGothic">xmlUCSIsGothic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreek">xmlUCSIsGreek</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreekExtended">xmlUCSIsGreekExtended</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreekandCoptic">xmlUCSIsGreekandCoptic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGujarati">xmlUCSIsGujarati</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGurmukhi">xmlUCSIsGurmukhi</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHalfwidthandFullwidthForms">xmlUCSIsHalfwidthandFullwidthForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulCompatibilityJamo">xmlUCSIsHangulCompatibilityJamo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulJamo">xmlUCSIsHangulJamo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulSyllables">xmlUCSIsHangulSyllables</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHanunoo">xmlUCSIsHanunoo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHebrew">xmlUCSIsHebrew</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHighPrivateUseSurrogates">xmlUCSIsHighPrivateUseSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHiragana">xmlUCSIsHiragana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsIdeographicDescriptionCharacters">xmlUCSIsIdeographicDescriptionCharacters</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKanbun">xmlUCSIsKanbun</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKangxiRadicals">xmlUCSIsKangxiRadicals</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKannada">xmlUCSIsKannada</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKatakana">xmlUCSIsKatakana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKatakanaPhoneticExtensions">xmlUCSIsKatakanaPhoneticExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKhmer">xmlUCSIsKhmer</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKhmerSymbols">xmlUCSIsKhmerSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLao">xmlUCSIsLao</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatin1Supplement">xmlUCSIsLatin1Supplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedA">xmlUCSIsLatinExtendedA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedAdditional">xmlUCSIsLatinExtendedAdditional</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedB">xmlUCSIsLatinExtendedB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLetterlikeSymbols">xmlUCSIsLetterlikeSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLimbu">xmlUCSIsLimbu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBIdeograms">xmlUCSIsLinearBIdeograms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBSyllabary">xmlUCSIsLinearBSyllabary</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLowSurrogates">xmlUCSIsLowSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMalayalam">xmlUCSIsMalayalam</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalAlphanumericSymbols">xmlUCSIsMathematicalAlphanumericSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalOperators">xmlUCSIsMathematicalOperators</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsA">xmlUCSIsMiscellaneousMathematicalSymbolsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsB">xmlUCSIsMiscellaneousMathematicalSymbolsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbols">xmlUCSIsMiscellaneousSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbolsandArrows">xmlUCSIsMiscellaneousSymbolsandArrows</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousTechnical">xmlUCSIsMiscellaneousTechnical</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMongolian">xmlUCSIsMongolian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMusicalSymbols">xmlUCSIsMusicalSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMyanmar">xmlUCSIsMyanmar</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsNumberForms">xmlUCSIsNumberForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOgham">xmlUCSIsOgham</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOldItalic">xmlUCSIsOldItalic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOpticalCharacterRecognition">xmlUCSIsOpticalCharacterRecognition</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOriya">xmlUCSIsOriya</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUse">xmlUCSIsPrivateUse</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUseArea">xmlUCSIsPrivateUseArea</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsRunic">xmlUCSIsRunic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsShavian">xmlUCSIsShavian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSinhala">xmlUCSIsSinhala</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSmallFormVariants">xmlUCSIsSmallFormVariants</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSpacingModifierLetters">xmlUCSIsSpacingModifierLetters</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSpecials">xmlUCSIsSpecials</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSuperscriptsandSubscripts">xmlUCSIsSuperscriptsandSubscripts</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsA">xmlUCSIsSupplementalArrowsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsB">xmlUCSIsSupplementalArrowsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalMathematicalOperators">xmlUCSIsSupplementalMathematicalOperators</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaA">xmlUCSIsSupplementaryPrivateUseAreaA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaB">xmlUCSIsSupplementaryPrivateUseAreaB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSyriac">xmlUCSIsSyriac</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTagalog">xmlUCSIsTagalog</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTagbanwa">xmlUCSIsTagbanwa</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTags">xmlUCSIsTags</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTaiLe">xmlUCSIsTaiLe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTaiXuanJingSymbols">xmlUCSIsTaiXuanJingSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTamil">xmlUCSIsTamil</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTelugu">xmlUCSIsTelugu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsThaana">xmlUCSIsThaana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsThai">xmlUCSIsThai</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTibetan">xmlUCSIsTibetan</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsUgaritic">xmlUCSIsUgaritic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsUnifiedCanadianAboriginalSyllabics">xmlUCSIsUnifiedCanadianAboriginalSyllabics</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectors">xmlUCSIsVariationSelectors</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectorsSupplement">xmlUCSIsVariationSelectorsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYiRadicals">xmlUCSIsYiRadicals</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYiSyllables">xmlUCSIsYiSyllables</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYijingHexagramSymbols">xmlUCSIsYijingHexagramSymbols</a><br />
+</p><h2><a name="xmlversion" id="xmlversion">Module xmlversion</a>:</h2><p><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+<a href="html/libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION">LIBXML_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+</p><h2><a name="xmlwriter" id="xmlwriter">Module xmlwriter</a>:</h2><p><a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriter">xmlTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndPI">xmlTextWriterEndPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFlush">xmlTextWriterFlush</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartComment">xmlTextWriterStartComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartPI">xmlTextWriterStartPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteString">xmlTextWriterWriteString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+</p><h2><a name="xpath" id="xpath">Module xpath</a>:</h2><p><a href="html/libxml-xpath.html#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a><br />
+<a href="html/libxml-xpath.html#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a><br />
+<a href="html/libxml-xpath.html#XPATH_BOOLEAN">XPATH_BOOLEAN</a><br />
+<a href="html/libxml-xpath.html#XPATH_ENCODING_ERROR">XPATH_ENCODING_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_EXPRESSION_OK">XPATH_EXPRESSION_OK</a><br />
+<a href="html/libxml-xpath.html#XPATH_EXPR_ERROR">XPATH_EXPR_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_FORBID_VARIABLE_ERROR">XPATH_FORBID_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CHAR_ERROR">XPATH_INVALID_CHAR_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT">XPATH_INVALID_CTXT</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT_POSITION">XPATH_INVALID_CTXT_POSITION</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT_SIZE">XPATH_INVALID_CTXT_SIZE</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_OPERAND">XPATH_INVALID_OPERAND</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_PREDICATE_ERROR">XPATH_INVALID_PREDICATE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a><br />
+<a href="html/libxml-xpath.html#XPATH_LOCATIONSET">XPATH_LOCATIONSET</a><br />
+<a href="html/libxml-xpath.html#XPATH_MEMORY_ERROR">XPATH_MEMORY_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_NODESET">XPATH_NODESET</a><br />
+<a href="html/libxml-xpath.html#XPATH_NUMBER">XPATH_NUMBER</a><br />
+<a href="html/libxml-xpath.html#XPATH_NUMBER_ERROR">XPATH_NUMBER_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_POINT">XPATH_POINT</a><br />
+<a href="html/libxml-xpath.html#XPATH_RANGE">XPATH_RANGE</a><br />
+<a href="html/libxml-xpath.html#XPATH_STACK_ERROR">XPATH_STACK_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_START_LITERAL_ERROR">XPATH_START_LITERAL_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_STRING">XPATH_STRING</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNCLOSED_ERROR">XPATH_UNCLOSED_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEFINED">XPATH_UNDEFINED</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEF_PREFIX_ERROR">XPATH_UNDEF_PREFIX_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEF_VARIABLE_ERROR">XPATH_UNDEF_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNFINISHED_LITERAL_ERROR">XPATH_UNFINISHED_LITERAL_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNKNOWN_FUNC_ERROR">XPATH_UNKNOWN_FUNC_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_USERS">XPATH_USERS</a><br />
+<a href="html/libxml-xpath.html#XPATH_VARIABLE_REF_ERROR">XPATH_VARIABLE_REF_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_XSLT_TREE">XPATH_XSLT_TREE</a><br />
+<a href="html/libxml-xpath.html#XPTR_RESOURCE_ERROR">XPTR_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPTR_SUB_RESOURCE_ERROR">XPTR_SUB_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPTR_SYNTAX_ERROR">XPTR_SYNTAX_ERROR</a><br />
+<a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathAxis">_xmlXPathAxis</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathFunct">_xmlXPathFunct</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathObject">_xmlXPathObject</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathType">_xmlXPathType</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathVariable">_xmlXPathVariable</a><br />
+<a href="html/libxml-xpath.html#xmlNodeSet">xmlNodeSet</a><br />
+<a href="html/libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxis">xmlXPathAxis</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContext">xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathError">xmlXPathError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncPtr">xmlXPathFuncPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunct">xmlXPathFunct</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathInit">xmlXPathInit</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNAN">xmlXPathNAN</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNINF">xmlXPathNINF</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObject">xmlXPathObject</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+<a href="html/libxml-xpath.html#xmlXPathPINF">xmlXPathPINF</a><br />
+<a href="html/libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+<a href="html/libxml-xpath.html#xmlXPathType">xmlXPathType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariable">xmlXPathVariable</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariablePtr">xmlXPathVariablePtr</a><br />
+</p><h2><a name="xpathInternals" id="xpathInternals">Module xpathInternals</a>:</h2><p><a href="html/libxml-xpathInternals.html#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_NUMBER">CAST_TO_NUMBER</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ARITY">CHECK_ARITY</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ERROR">CHECK_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ERROR0">CHECK_ERROR0</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE">CHECK_TYPE</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE0">CHECK_TYPE0</a><br />
+<a href="html/libxml-xpathInternals.html#XP_ERROR">XP_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#XP_ERROR0">XP_ERROR0</a><br />
+<a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCheckError">xmlXPathCheckError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathContainsFunction">xmlXPathContainsFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCountFunction">xmlXPathCountFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathErr">xmlXPathErr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFalseFunction">xmlXPathFalseFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetContextNode">xmlXPathGetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetDocument">xmlXPathGetDocument</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetError">xmlXPathGetError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLastFunction">xmlXPathLastFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewBoolean">xmlXPathNewBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewCString">xmlXPathNewCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotFunction">xmlXPathNotFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNumberFunction">xmlXPathNumberFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPositionFunction">xmlXPathPositionFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnExternal">xmlXPathReturnExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnFalse">xmlXPathReturnFalse</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNumber">xmlXPathReturnNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnString">xmlXPathReturnString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnTrue">xmlXPathReturnTrue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetArityError">xmlXPathSetArityError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetError">xmlXPathSetError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetTypeError">xmlXPathSetTypeError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSumFunction">xmlXPathSumFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrueFunction">xmlXPathTrueFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapCString">xmlXPathWrapCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapExternal">xmlXPathWrapExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPatherror">xmlXPatherror</a><br />
+</p><h2><a name="xpointer" id="xpointer">Module xpointer</a>:</h2><p><a href="html/libxml-xpointer.html#_xmlLocationSet">_xmlLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlLocationSet">xmlLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIfunctions.html b/doc/APIfunctions.html
new file mode 100644
index 0000000..9027afe
--- /dev/null
+++ b/doc/APIfunctions.html
@@ -0,0 +1,2347 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>List of function manipulating types in libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>List of function manipulating types in libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Type ...:</h2><p><a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+</p><h2>Type FILE *:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
+<a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-tree.html#xmlDocDump">xmlDocDump</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+</p><h2>Type char **:</h2><p><a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+</p><h2>Type char const *:</h2><p><a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+</p><h2>Type const char **:</h2><p><a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+</p><h2>Type const htmlElemDesc *:</h2><p><a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+</p><h2>Type const htmlNodePtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+</p><h2>Type const unsigned char *:</h2><p><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+</p><h2>Type const void *:</h2><p><a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+</p><h2>Type const xlinkHRef:</h2><p><a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</p><h2>Type const xlinkHRef *:</h2><p><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</p><h2>Type const xlinkRole:</h2><p><a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</p><h2>Type const xlinkRole *:</h2><p><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</p><h2>Type const xlinkTitle:</h2><p><a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+</p><h2>Type const xlinkTitle *:</h2><p><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+</p><h2>Type const xmlBuf *:</h2><p><a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+</p><h2>Type const xmlBufPtr:</h2><p><a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+</p><h2>Type const xmlBuffer *:</h2><p><a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+<a href="html/libxml-tree.html#xmlBufferLength">xmlBufferLength</a><br />
+</p><h2>Type const xmlChRangeGroup *:</h2><p><a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+</p><h2>Type const xmlChar *:</h2><p><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+<a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-parser.html#commentSAXFunc">commentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+<a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#endElement">endElement</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsScriptAttribute">htmlIsScriptAttribute</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+<a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+<a href="html/libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+<a href="html/libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a><br />
+<a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-tree.html#xmlNewText">xmlNewText</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlParseDoc">xmlParseDoc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElement">xmlSAX2EndElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-tree.html#xmlTextConcat">xmlTextConcat</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartPI">xmlTextWriterStartPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteString">xmlTextWriterWriteString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-valid.html#xmlValidateNameValue">xmlValidateNameValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+</p><h2>Type const xmlChar **:</h2><p><a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</p><h2>Type const xmlDoc *:</h2><p><a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-tree.html#xmlGetIntSubset">xmlGetIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+</p><h2>Type const xmlListPtr:</h2><p><a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+<a href="html/libxml-list.html#xmlListDup">xmlListDup</a><br />
+</p><h2>Type const xmlNode *:</h2><p><a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeIsText">xmlNodeIsText</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+</p><h2>Type const xmlNodePtr:</h2><p><a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+</p><h2>Type const xmlParserCtxtPtr:</h2><p><a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+</p><h2>Type const xmlParserNodeInfoPtr:</h2><p><a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+</p><h2>Type const xmlParserNodeInfoSeqPtr:</h2><p><a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+</p><h2>Type docbParserCtxtPtr:</h2><p><a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+</p><h2>Type docbSAXHandlerPtr:</h2><p><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+</p><h2>Type double:</h2><p><a href="html/libxml-xpath.html#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+</p><h2>Type ftpDataCallback:</h2><p><a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+</p><h2>Type ftpListCallback:</h2><p><a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+</p><h2>Type htmlDocPtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+</p><h2>Type htmlNodePtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+</p><h2>Type htmlParserCtxtPtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReset">htmlCtxtReset</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+</p><h2>Type htmlSAXHandlerPtr:</h2><p><a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+</p><h2>Type int *:</h2><p><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+</p><h2>Type long:</h2><p><a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+</p><h2>Type size_t:</h2><p><a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+</p><h2>Type unsigned char *:</h2><p><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+</p><h2>Type unsigned int:</h2><p><a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+</p><h2>Type unsigned long:</h2><p><a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-threads.html#xmlDllMain">xmlDllMain</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</p><h2>Type unsigned long *:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+</p><h2>Type va_list:</h2><p><a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+</p><h2>Type void *:</h2><p><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+<a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+<a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-parser.html#commentSAXFunc">commentSAXFunc</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+<a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+<a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#endDocument">endDocument</a><br />
+<a href="html/libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#endElement">endElement</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+<a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+<a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+<a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getLineNumber">getLineNumber</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+<a href="html/libxml-SAX.html#hasExternalSubset">hasExternalSubset</a><br />
+<a href="html/libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#hasInternalSubset">hasInternalSubset</a><br />
+<a href="html/libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+<a href="html/libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+<a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+<a href="html/libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a><br />
+<a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+<a href="html/libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a><br />
+<a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
+<a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-threads.html#xmlDllMain">xmlDllMain</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileClose">xmlFileClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndDocument">xmlSAX2EndDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElement">xmlSAX2EndElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapExternal">xmlXPathWrapExternal</a><br />
+</p><h2>Type void **:</h2><p><a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+</p><h2>Type xlinkActuate *:</h2><p><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+</p><h2>Type xlinkHandlerPtr:</h2><p><a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
+</p><h2>Type xlinkNodeDetectFunc:</h2><p><a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
+</p><h2>Type xlinkShow *:</h2><p><a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+</p><h2>Type xmlAttrPtr:</h2><p><a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-tree.html#xmlFreeProp">xmlFreeProp</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+</p><h2>Type xmlAttributeDefault:</h2><p><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+</p><h2>Type xmlAttributePtr:</h2><p><a href="html/libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+</p><h2>Type xmlAttributeTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a><br />
+</p><h2>Type xmlAttributeType:</h2><p><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+</p><h2>Type xmlAutomataPtr:</h2><p><a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewState">xmlAutomataNewState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlFreeAutomata">xmlFreeAutomata</a><br />
+</p><h2>Type xmlAutomataStatePtr:</h2><p><a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+</p><h2>Type xmlBufPtr:</h2><p><a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+</p><h2>Type xmlBufferAllocationScheme:</h2><p><a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-globals.html#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a><br />
+</p><h2>Type xmlBufferPtr:</h2><p><a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-tree.html#xmlBufferEmpty">xmlBufferEmpty</a><br />
+<a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+</p><h2>Type xmlC14NIsVisibleCallback:</h2><p><a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+</p><h2>Type xmlCatalogAllow:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+</p><h2>Type xmlCatalogPrefer:</h2><p><a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+</p><h2>Type xmlCatalogPtr:</h2><p><a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlFreeCatalog">xmlFreeCatalog</a><br />
+</p><h2>Type xmlChar:</h2><p><a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+</p><h2>Type xmlChar *:</h2><p><a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
+</p><h2>Type xmlChar **:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+</p><h2>Type xmlCharEncoding:</h2><p><a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+</p><h2>Type xmlCharEncodingHandler *:</h2><p><a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+</p><h2>Type xmlCharEncodingHandlerPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+</p><h2>Type xmlCharEncodingInputFunc:</h2><p><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+</p><h2>Type xmlCharEncodingOutputFunc:</h2><p><a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+</p><h2>Type xmlDOMWrapCtxtPtr:</h2><p><a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+</p><h2>Type xmlDeregisterNodeFunc:</h2><p><a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a><br />
+</p><h2>Type xmlDict *:</h2><p><a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+</p><h2>Type xmlDictPtr:</h2><p><a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+</p><h2>Type xmlDocPtr:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFile">htmlSaveFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocDump">xmlDocDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+</p><h2>Type xmlDocPtr *:</h2><p><a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+</p><h2>Type xmlDtdPtr:</h2><p><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-tree.html#xmlFreeDtd">xmlFreeDtd</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+</p><h2>Type xmlElementContent *:</h2><p><a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+</p><h2>Type xmlElementContentPtr:</h2><p><a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+<a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+</p><h2>Type xmlElementContentPtr *:</h2><p><a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+</p><h2>Type xmlElementContentType:</h2><p><a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+</p><h2>Type xmlElementPtr:</h2><p><a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+</p><h2>Type xmlElementTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br />
+</p><h2>Type xmlElementTypeVal:</h2><p><a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+</p><h2>Type xmlEntitiesTablePtr:</h2><p><a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a><br />
+</p><h2>Type xmlEntityPtr:</h2><p><a href="html/libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+</p><h2>Type xmlEntityReferenceFunc:</h2><p><a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
+</p><h2>Type xmlEnumerationPtr:</h2><p><a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+</p><h2>Type xmlEnumerationPtr *:</h2><p><a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+</p><h2>Type xmlErrorPtr:</h2><p><a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetError">xmlResetError</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+</p><h2>Type xmlExpCtxtPtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFreeCtxt">xmlExpFreeCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</p><h2>Type xmlExpNodePtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpRef">xmlExpRef</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+</p><h2>Type xmlExternalEntityLoader:</h2><p><a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+</p><h2>Type xmlFeature:</h2><p><a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+</p><h2>Type xmlFreeFunc:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</p><h2>Type xmlFreeFunc *:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+</p><h2>Type xmlGenericErrorFunc:</h2><p><a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a><br />
+</p><h2>Type xmlGenericErrorFunc *:</h2><p><a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+</p><h2>Type xmlGlobalStatePtr:</h2><p><a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+</p><h2>Type xmlHashCopier:</h2><p><a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+</p><h2>Type xmlHashDeallocator:</h2><p><a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</p><h2>Type xmlHashScanner:</h2><p><a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+</p><h2>Type xmlHashScannerFull:</h2><p><a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+</p><h2>Type xmlHashTablePtr:</h2><p><a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+</p><h2>Type xmlIDTablePtr:</h2><p><a href="html/libxml-valid.html#xmlFreeIDTable">xmlFreeIDTable</a><br />
+</p><h2>Type xmlInputCloseCallback:</h2><p><a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</p><h2>Type xmlInputMatchCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</p><h2>Type xmlInputOpenCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</p><h2>Type xmlInputReadCallback:</h2><p><a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+</p><h2>Type xmlLinkPtr:</h2><p><a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-list.html#xmlListDeallocator">xmlListDeallocator</a><br />
+</p><h2>Type xmlListDataCompare:</h2><p><a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+</p><h2>Type xmlListDeallocator:</h2><p><a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+</p><h2>Type xmlListPtr:</h2><p><a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListClear">xmlListClear</a><br />
+<a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+<a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br />
+<a href="html/libxml-list.html#xmlListEmpty">xmlListEmpty</a><br />
+<a href="html/libxml-list.html#xmlListEnd">xmlListEnd</a><br />
+<a href="html/libxml-list.html#xmlListFront">xmlListFront</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+<a href="html/libxml-list.html#xmlListPopBack">xmlListPopBack</a><br />
+<a href="html/libxml-list.html#xmlListPopFront">xmlListPopFront</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-list.html#xmlListSize">xmlListSize</a><br />
+<a href="html/libxml-list.html#xmlListSort">xmlListSort</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+</p><h2>Type xmlListWalker:</h2><p><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+</p><h2>Type xmlLocationSetPtr:</h2><p><a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</p><h2>Type xmlMallocFunc:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</p><h2>Type xmlMallocFunc *:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+</p><h2>Type xmlModulePtr:</h2><p><a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+</p><h2>Type xmlMutexPtr:</h2><p><a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+</p><h2>Type xmlNode *:</h2><p><a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+</p><h2>Type xmlNodePtr:</h2><p><a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+<a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-tree.html#xmlTextConcat">xmlTextConcat</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+</p><h2>Type xmlNodePtr *:</h2><p><a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+</p><h2>Type xmlNodeSetPtr:</h2><p><a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+</p><h2>Type xmlNotationPtr:</h2><p><a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+</p><h2>Type xmlNotationTablePtr:</h2><p><a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeNotationTable">xmlFreeNotationTable</a><br />
+</p><h2>Type xmlNsPtr:</h2><p><a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
+<a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
+<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+</p><h2>Type xmlOutputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br />
+</p><h2>Type xmlOutputBufferPtr:</h2><p><a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+</p><h2>Type xmlOutputCloseCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</p><h2>Type xmlOutputMatchCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</p><h2>Type xmlOutputOpenCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+</p><h2>Type xmlOutputWriteCallback:</h2><p><a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+</p><h2>Type xmlParserCtxtPtr:</h2><p><a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReset">xmlCtxtReset</a><br />
+<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-parser.html#xmlInitParserCtxt">xmlInitParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputStream">xmlNewInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlNextChar">xmlNextChar</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePITarget">xmlParsePITarget</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-parser.html#xmlStopParser">xmlStopParser</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+</p><h2>Type xmlParserInputBufferCreateFilenameFunc:</h2><p><a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a><br />
+</p><h2>Type xmlParserInputBufferPtr:</h2><p><a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+</p><h2>Type xmlParserInputPtr:</h2><p><a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlFreeInputStream">xmlFreeInputStream</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserInputShrink">xmlParserInputShrink</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+</p><h2>Type xmlParserNodeInfoSeqPtr:</h2><p><a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+</p><h2>Type xmlParserSeverities:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+</p><h2>Type xmlPatternPtr:</h2><p><a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+</p><h2>Type xmlRMutexPtr:</h2><p><a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+</p><h2>Type xmlReallocFunc:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</p><h2>Type xmlReallocFunc *:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+</p><h2>Type xmlRefTablePtr:</h2><p><a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+</p><h2>Type xmlRegExecCallbacks:</h2><p><a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+</p><h2>Type xmlRegExecCtxtPtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+</p><h2>Type xmlRegexpPtr:</h2><p><a href="html/libxml-xmlregexp.html#xmlRegFreeRegexp">xmlRegFreeRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+</p><h2>Type xmlRegisterNodeFunc:</h2><p><a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a><br />
+</p><h2>Type xmlRelaxNGParserCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+</p><h2>Type xmlRelaxNGPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+</p><h2>Type xmlRelaxNGValidCtxtPtr:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+</p><h2>Type xmlRelaxNGValidityErrorFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+</p><h2>Type xmlRelaxNGValidityErrorFunc *:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+</p><h2>Type xmlRelaxNGValidityWarningFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+</p><h2>Type xmlRelaxNGValidityWarningFunc *:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+</p><h2>Type xmlSAXHandler *:</h2><p><a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXVersion">xmlSAXVersion</a><br />
+</p><h2>Type xmlSAXHandlerPtr:</h2><p><a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+</p><h2>Type xmlSAXHandlerPtr *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+</p><h2>Type xmlSAXHandlerV1 *:</h2><p><a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+</p><h2>Type xmlSAXLocatorPtr:</h2><p><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+</p><h2>Type xmlSaveCtxtPtr:</h2><p><a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+</p><h2>Type xmlSchemaFacetPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+</p><h2>Type xmlSchemaParserCtxtPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+</p><h2>Type xmlSchemaPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+</p><h2>Type xmlSchemaSAXPlugPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+</p><h2>Type xmlSchemaTypePtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+</p><h2>Type xmlSchemaValPtr:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+</p><h2>Type xmlSchemaValPtr *:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+</p><h2>Type xmlSchemaValType:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</p><h2>Type xmlSchemaValidCtxtPtr:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+</p><h2>Type xmlSchemaValidityErrorFunc:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+</p><h2>Type xmlSchemaValidityErrorFunc *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+</p><h2>Type xmlSchemaValidityLocatorFunc:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+</p><h2>Type xmlSchemaValidityWarningFunc:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+</p><h2>Type xmlSchemaValidityWarningFunc *:</h2><p><a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+</p><h2>Type xmlSchemaWhitespaceValueType:</h2><p><a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+</p><h2>Type xmlSchemaWildcardPtr:</h2><p><a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br />
+</p><h2>Type xmlSchematronParserCtxtPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+</p><h2>Type xmlSchematronPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+</p><h2>Type xmlSchematronValidCtxtPtr:</h2><p><a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+</p><h2>Type xmlShellCtxtPtr:</h2><p><a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+</p><h2>Type xmlShellReadlineFunc:</h2><p><a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+</p><h2>Type xmlStrdupFunc:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+</p><h2>Type xmlStrdupFunc *:</h2><p><a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+</p><h2>Type xmlStreamCtxtPtr:</h2><p><a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+</p><h2>Type xmlStructuredErrorFunc:</h2><p><a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br />
+</p><h2>Type xmlTextReaderErrorFunc:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+</p><h2>Type xmlTextReaderErrorFunc *:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+</p><h2>Type xmlTextReaderLocatorPtr:</h2><p><a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+</p><h2>Type xmlTextReaderPtr:</h2><p><a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+</p><h2>Type xmlTextWriterPtr:</h2><p><a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndPI">xmlTextWriterEndPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFlush">xmlTextWriterFlush</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartComment">xmlTextWriterStartComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartPI">xmlTextWriterStartPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteString">xmlTextWriterWriteString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+</p><h2>Type xmlURIPtr:</h2><p><a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+</p><h2>Type xmlValidCtxtPtr:</h2><p><a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-valid.html#xmlFreeValidCtxt">xmlFreeValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+</p><h2>Type xmlXIncludeCtxtPtr:</h2><p><a href="html/libxml-xinclude.html#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+</p><h2>Type xmlXPathCompExprPtr:</h2><p><a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a><br />
+</p><h2>Type xmlXPathContextPtr:</h2><p><a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+</p><h2>Type xmlXPathFuncLookupFunc:</h2><p><a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+</p><h2>Type xmlXPathFunction:</h2><p><a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+</p><h2>Type xmlXPathObjectPtr:</h2><p><a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+</p><h2>Type xmlXPathParserContextPtr:</h2><p><a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathContainsFunction">xmlXPathContainsFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCountFunction">xmlXPathCountFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathErr">xmlXPathErr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFalseFunction">xmlXPathFalseFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLastFunction">xmlXPathLastFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotFunction">xmlXPathNotFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNumberFunction">xmlXPathNumberFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPositionFunction">xmlXPathPositionFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSumFunction">xmlXPathSumFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrueFunction">xmlXPathTrueFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPatherror">xmlXPatherror</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+</p><h2>Type xmlXPathVariableLookupFunc:</h2><p><a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
new file mode 100644
index 0000000..c2b82e7
--- /dev/null
+++ b/doc/APIsymbols.html
@@ -0,0 +1,3586 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Alphabetic List of Symbols in libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Alphabetic List of Symbols in libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Letter A:</h2><p><a href="html/libxml-xmlversion.html#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a><br />
+</p><h2>Letter B:</h2><p><a href="html/libxml-xmlstring.html#BAD_CAST">BAD_CAST</a><br />
+<a href="html/libxml-tree.html#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a><br />
+</p><h2>Letter C:</h2><p><a href="html/libxml-xpathInternals.html#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_NUMBER">CAST_TO_NUMBER</a><br />
+<a href="html/libxml-xpathInternals.html#CAST_TO_STRING">CAST_TO_STRING</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ARITY">CHECK_ARITY</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ERROR">CHECK_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_ERROR0">CHECK_ERROR0</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE">CHECK_TYPE</a><br />
+<a href="html/libxml-xpathInternals.html#CHECK_TYPE0">CHECK_TYPE0</a><br />
+</p><h2>Letter D:</h2><p><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
+<a href="html/libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a><br />
+</p><h2>Letter H:</h2><p><a href="html/libxml-HTMLtree.html#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_DEPRECATED">HTML_DEPRECATED</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_INVALID">HTML_INVALID</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_NA">HTML_NA</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_COMPACT">HTML_PARSE_COMPACT</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_IGNORE_ENC">HTML_PARSE_IGNORE_ENC</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOBLANKS">HTML_PARSE_NOBLANKS</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NODEFDTD">HTML_PARSE_NODEFDTD</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOERROR">HTML_PARSE_NOERROR</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOIMPLIED">HTML_PARSE_NOIMPLIED</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NONET">HTML_PARSE_NONET</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_NOWARNING">HTML_PARSE_NOWARNING</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_PEDANTIC">HTML_PARSE_PEDANTIC</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_PARSE_RECOVER">HTML_PARSE_RECOVER</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PI_NODE">HTML_PI_NODE</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_REQUIRED">HTML_REQUIRED</a><br />
+<a href="html/libxml-HTMLtree.html#HTML_TEXT_NODE">HTML_TEXT_NODE</a><br />
+<a href="html/libxml-HTMLparser.html#HTML_VALID">HTML_VALID</a><br />
+</p><h2>Letter I:</h2><p><a href="html/libxml-parserInternals.html#INPUT_CHUNK">INPUT_CHUNK</a><br />
+<a href="html/libxml-nanoftp.html#INVALID_SOCKET">INVALID_SOCKET</a><br />
+<a href="html/libxml-parserInternals.html#IS_ASCII_DIGIT">IS_ASCII_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#IS_ASCII_LETTER">IS_ASCII_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#IS_BASECHAR">IS_BASECHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK">IS_BLANK</a><br />
+<a href="html/libxml-parserInternals.html#IS_BLANK_CH">IS_BLANK_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_BYTE_CHAR">IS_BYTE_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR">IS_CHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_CHAR_CH">IS_CHAR_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING">IS_COMBINING</a><br />
+<a href="html/libxml-parserInternals.html#IS_COMBINING_CH">IS_COMBINING_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a><br />
+<a href="html/libxml-parserInternals.html#IS_DIGIT_CH">IS_DIGIT_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a><br />
+<a href="html/libxml-parserInternals.html#IS_EXTENDER_CH">IS_EXTENDER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER">IS_LETTER</a><br />
+<a href="html/libxml-parserInternals.html#IS_LETTER_CH">IS_LETTER_CH</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a><br />
+<a href="html/libxml-parserInternals.html#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a><br />
+</p><h2>Letter L:</h2><p><a href="html/libxml-tree.html#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a><br />
+<a href="html/libxml-xmlexports.html#LIBXML_DLL_IMPORT">LIBXML_DLL_IMPORT</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION">LIBXML_VERSION</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a><br />
+<a href="html/libxml-xmlversion.html#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a><br />
+</p><h2>Letter M:</h2><p><a href="html/libxml-parserInternals.html#MOVETO_ENDTAG">MOVETO_ENDTAG</a><br />
+<a href="html/libxml-parserInternals.html#MOVETO_STARTTAG">MOVETO_STARTTAG</a><br />
+</p><h2>Letter S:</h2><p><a href="html/libxml-parserInternals.html#SKIP_EOL">SKIP_EOL</a><br />
+<a href="html/libxml-nanoftp.html#SOCKET">SOCKET</a><br />
+</p><h2>Letter U:</h2><p><a href="html/libxml-HTMLparser.html#UTF8ToHtml">UTF8ToHtml</a><br />
+<a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a><br />
+</p><h2>Letter W:</h2><p><a href="html/libxml-xmlversion.html#WITHOUT_TRIO">WITHOUT_TRIO</a><br />
+<a href="html/libxml-xmlversion.html#WITH_TRIO">WITH_TRIO</a><br />
+</p><h2>Letter X:</h2><p><a href="html/libxml-xinclude.html#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_HREF">XINCLUDE_HREF</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NODE">XINCLUDE_NODE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_NS">XINCLUDE_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE">XINCLUDE_PARSE</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a><br />
+<a href="html/libxml-xinclude.html#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a><br />
+<a href="html/libxml-xlink.html#XLINK_ACTUATE_AUTO">XLINK_ACTUATE_AUTO</a><br />
+<a href="html/libxml-xlink.html#XLINK_ACTUATE_NONE">XLINK_ACTUATE_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_ACTUATE_ONREQUEST">XLINK_ACTUATE_ONREQUEST</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_EMBED">XLINK_SHOW_EMBED</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_NEW">XLINK_SHOW_NEW</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_NONE">XLINK_SHOW_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_SHOW_REPLACE">XLINK_SHOW_REPLACE</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_EXTENDED">XLINK_TYPE_EXTENDED</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_EXTENDED_SET">XLINK_TYPE_EXTENDED_SET</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_NONE">XLINK_TYPE_NONE</a><br />
+<a href="html/libxml-xlink.html#XLINK_TYPE_SIMPLE">XLINK_TYPE_SIMPLE</a><br />
+<a href="html/libxml-xmlexports.html#XMLCALL">XMLCALL</a><br />
+<a href="html/libxml-xmlexports.html#XMLCDECL">XMLCDECL</a><br />
+<a href="html/libxml-xmlexports.html#XMLPUBFUN">XMLPUBFUN</a><br />
+<a href="html/libxml-xmlexports.html#XMLPUBVAR">XMLPUBVAR</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a><br />
+<a href="html/libxml-tree.html#XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a><br />
+<a href="html/libxml-tree.html#XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a><br />
+<a href="html/libxml-xmlerror.html#XML_BUF_OVERFLOW">XML_BUF_OVERFLOW</a><br />
+<a href="html/libxml-c14n.html#XML_C14N_1_0">XML_C14N_1_0</a><br />
+<a href="html/libxml-c14n.html#XML_C14N_1_1">XML_C14N_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_CREATE_CTXT">XML_C14N_CREATE_CTXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_CREATE_STACK">XML_C14N_CREATE_STACK</a><br />
+<a href="html/libxml-c14n.html#XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_INVALID_NODE">XML_C14N_INVALID_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_RELATIVE_NAMESPACE">XML_C14N_RELATIVE_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_REQUIRES_UTF8">XML_C14N_REQUIRES_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_C14N_UNKNOW_NODE">XML_C14N_UNKNOW_NODE</a><br />
+<a href="html/libxml-hash.html#XML_CAST_FPTR">XML_CAST_FPTR</a><br />
+<a href="html/libxml-catalog.html#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_ENTRY_BROKEN">XML_CATALOG_ENTRY_BROKEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_MISSING_ATTR">XML_CATALOG_MISSING_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_NOT_CATALOG">XML_CATALOG_NOT_CATALOG</a><br />
+<a href="html/libxml-catalog.html#XML_CATALOG_PI">XML_CATALOG_PI</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_PREFER_VALUE">XML_CATALOG_PREFER_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CATALOG_RECURSION">XML_CATALOG_RECURSION</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a><br />
+<a href="html/libxml-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a><br />
+<a href="html/libxml-tree.html#XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_2022_JP">XML_CHAR_ENCODING_2022_JP</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_1">XML_CHAR_ENCODING_8859_1</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_2">XML_CHAR_ENCODING_8859_2</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_3">XML_CHAR_ENCODING_8859_3</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_4">XML_CHAR_ENCODING_8859_4</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_5">XML_CHAR_ENCODING_8859_5</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_6">XML_CHAR_ENCODING_8859_6</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_7">XML_CHAR_ENCODING_8859_7</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_8">XML_CHAR_ENCODING_8859_8</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_8859_9">XML_CHAR_ENCODING_8859_9</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_ASCII">XML_CHAR_ENCODING_ASCII</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_EBCDIC">XML_CHAR_ENCODING_EBCDIC</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_ERROR">XML_CHAR_ENCODING_ERROR</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_EUC_JP">XML_CHAR_ENCODING_EUC_JP</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_SHIFT_JIS">XML_CHAR_ENCODING_SHIFT_JIS</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS2">XML_CHAR_ENCODING_UCS2</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4BE">XML_CHAR_ENCODING_UCS4BE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4LE">XML_CHAR_ENCODING_UCS4LE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4_2143">XML_CHAR_ENCODING_UCS4_2143</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UCS4_3412">XML_CHAR_ENCODING_UCS4_3412</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF16BE">XML_CHAR_ENCODING_UTF16BE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF16LE">XML_CHAR_ENCODING_UTF16LE</a><br />
+<a href="html/libxml-encoding.html#XML_CHAR_ENCODING_UTF8">XML_CHAR_ENCODING_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_ENTITY_TYPE">XML_CHECK_ENTITY_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ATTRIBUTE">XML_CHECK_FOUND_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_CDATA">XML_CHECK_FOUND_CDATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_COMMENT">XML_CHECK_FOUND_COMMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_DOCTYPE">XML_CHECK_FOUND_DOCTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ENTITY">XML_CHECK_FOUND_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_ENTITYREF">XML_CHECK_FOUND_ENTITYREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_FRAGMENT">XML_CHECK_FOUND_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_NOTATION">XML_CHECK_FOUND_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_PI">XML_CHECK_FOUND_PI</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_FOUND_TEXT">XML_CHECK_FOUND_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NAME_NOT_NULL">XML_CHECK_NAME_NOT_NULL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ATTR">XML_CHECK_NOT_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ATTR_DECL">XML_CHECK_NOT_ATTR_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_DTD">XML_CHECK_NOT_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ELEM_DECL">XML_CHECK_NOT_ELEM_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_ENTITY_DECL">XML_CHECK_NOT_ENTITY_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_NCNAME">XML_CHECK_NOT_NCNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_NS_DECL">XML_CHECK_NOT_NS_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NOT_UTF8">XML_CHECK_NOT_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_DICT">XML_CHECK_NO_DICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_DOC">XML_CHECK_NO_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_ELEM">XML_CHECK_NO_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_HREF">XML_CHECK_NO_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_NAME">XML_CHECK_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_NEXT">XML_CHECK_NO_NEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_PARENT">XML_CHECK_NO_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NO_PREV">XML_CHECK_NO_PREV</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NS_ANCESTOR">XML_CHECK_NS_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_NS_SCOPE">XML_CHECK_NS_SCOPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_OUTSIDE_DICT">XML_CHECK_OUTSIDE_DICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_UNKNOWN_NODE">XML_CHECK_UNKNOWN_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_DOC">XML_CHECK_WRONG_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_NAME">XML_CHECK_WRONG_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_NEXT">XML_CHECK_WRONG_NEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_PARENT">XML_CHECK_WRONG_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_CHECK_WRONG_PREV">XML_CHECK_WRONG_PREV</a><br />
+<a href="html/libxml-tree.html#XML_COMMENT_NODE">XML_COMMENT_NODE</a><br />
+<a href="html/libxml-parser.html#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a><br />
+<a href="html/libxml-valid.html#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a><br />
+<a href="html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a><br />
+<a href="html/libxml-parser.html#XML_DETECT_IDS">XML_DETECT_IDS</a><br />
+<a href="html/libxml-tree.html#XML_DOCB_DOCUMENT_NODE">XML_DOCB_DOCUMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a><br />
+<a href="html/libxml-tree.html#XML_DOC_DTDVALID">XML_DOC_DTDVALID</a><br />
+<a href="html/libxml-tree.html#XML_DOC_HTML">XML_DOC_HTML</a><br />
+<a href="html/libxml-tree.html#XML_DOC_INTERNAL">XML_DOC_INTERNAL</a><br />
+<a href="html/libxml-tree.html#XML_DOC_NSVALID">XML_DOC_NSVALID</a><br />
+<a href="html/libxml-tree.html#XML_DOC_OLD10">XML_DOC_OLD10</a><br />
+<a href="html/libxml-tree.html#XML_DOC_USERBUILT">XML_DOC_USERBUILT</a><br />
+<a href="html/libxml-tree.html#XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a><br />
+<a href="html/libxml-tree.html#XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_DEFAULT">XML_DTD_ATTRIBUTE_DEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_REDEFINED">XML_DTD_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ATTRIBUTE_VALUE">XML_DTD_ATTRIBUTE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_ERROR">XML_DTD_CONTENT_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_MODEL">XML_DTD_CONTENT_MODEL</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_CONTENT_NOT_DETERMINIST">XML_DTD_CONTENT_NOT_DETERMINIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_DIFFERENT_PREFIX">XML_DTD_DIFFERENT_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_DUP_TOKEN">XML_DTD_DUP_TOKEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_DEFAULT_NAMESPACE">XML_DTD_ELEM_DEFAULT_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_NAMESPACE">XML_DTD_ELEM_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ELEM_REDEFINED">XML_DTD_ELEM_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_EMPTY_NOTATION">XML_DTD_EMPTY_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ENTITY_TYPE">XML_DTD_ENTITY_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_FIXED">XML_DTD_ID_FIXED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_REDEFINED">XML_DTD_ID_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ID_SUBSET">XML_DTD_ID_SUBSET</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_INVALID_CHILD">XML_DTD_INVALID_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_INVALID_DEFAULT">XML_DTD_INVALID_DEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_LOAD_ERROR">XML_DTD_LOAD_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MISSING_ATTRIBUTE">XML_DTD_MISSING_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MIXED_CORRUPT">XML_DTD_MIXED_CORRUPT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_MULTIPLE_ID">XML_DTD_MULTIPLE_ID</a><br />
+<a href="html/libxml-tree.html#XML_DTD_NODE">XML_DTD_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOTATION_REDEFINED">XML_DTD_NOTATION_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOTATION_VALUE">XML_DTD_NOTATION_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_EMPTY">XML_DTD_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_PCDATA">XML_DTD_NOT_PCDATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NOT_STANDALONE">XML_DTD_NOT_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_DOC">XML_DTD_NO_DOC</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_DTD">XML_DTD_NO_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_ELEM_NAME">XML_DTD_NO_ELEM_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_PREFIX">XML_DTD_NO_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_NO_ROOT">XML_DTD_NO_ROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_ROOT_NAME">XML_DTD_ROOT_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_STANDALONE_DEFAULTED">XML_DTD_STANDALONE_DEFAULTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_STANDALONE_WHITE_SPACE">XML_DTD_STANDALONE_WHITE_SPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ATTRIBUTE">XML_DTD_UNKNOWN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ELEM">XML_DTD_UNKNOWN_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_DECL">XML_ELEMENT_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_NODE">XML_ELEMENT_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a><br />
+<a href="html/libxml-tree.html#XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_DECL">XML_ENTITY_DECL</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_NODE">XML_ENTITY_NODE</a><br />
+<a href="html/libxml-tree.html#XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_FINISHED">XML_ERR_ATTLIST_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTLIST_NOT_STARTED">XML_ERR_ATTLIST_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_FINISHED">XML_ERR_ATTRIBUTE_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_STARTED">XML_ERR_ATTRIBUTE_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_REDEFINED">XML_ERR_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ATTRIBUTE_WITHOUT_VALUE">XML_ERR_ATTRIBUTE_WITHOUT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CDATA_NOT_FINISHED">XML_ERR_CDATA_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_AT_EOF">XML_ERR_CHARREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_DTD">XML_ERR_CHARREF_IN_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_EPILOG">XML_ERR_CHARREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CHARREF_IN_PROLOG">XML_ERR_CHARREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_COMMENT_NOT_FINISHED">XML_ERR_COMMENT_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_INVALID">XML_ERR_CONDSEC_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_INVALID_KEYWORD">XML_ERR_CONDSEC_INVALID_KEYWORD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_NOT_FINISHED">XML_ERR_CONDSEC_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_CONDSEC_NOT_STARTED">XML_ERR_CONDSEC_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCTYPE_NOT_FINISHED">XML_ERR_DOCTYPE_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_EMPTY">XML_ERR_DOCUMENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_END">XML_ERR_DOCUMENT_END</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_DOCUMENT_START">XML_ERR_DOCUMENT_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_FINISHED">XML_ERR_ELEMCONTENT_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_STARTED">XML_ERR_ELEMCONTENT_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENCODING_NAME">XML_ERR_ENCODING_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_AT_EOF">XML_ERR_ENTITYREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_DTD">XML_ERR_ENTITYREF_IN_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_EPILOG">XML_ERR_ENTITYREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_IN_PROLOG">XML_ERR_ENTITYREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_NO_NAME">XML_ERR_ENTITYREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITYREF_SEMICOL_MISSING">XML_ERR_ENTITYREF_SEMICOL_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_BOUNDARY">XML_ERR_ENTITY_BOUNDARY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_CHAR_ERROR">XML_ERR_ENTITY_CHAR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_IS_EXTERNAL">XML_ERR_ENTITY_IS_EXTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_IS_PARAMETER">XML_ERR_ENTITY_IS_PARAMETER</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_LOOP">XML_ERR_ENTITY_LOOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_NOT_FINISHED">XML_ERR_ENTITY_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_NOT_STARTED">XML_ERR_ENTITY_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_PE_INTERNAL">XML_ERR_ENTITY_PE_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ENTITY_PROCESSING">XML_ERR_ENTITY_PROCESSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EQUAL_REQUIRED">XML_ERR_EQUAL_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_ERROR">XML_ERR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXTRA_CONTENT">XML_ERR_EXTRA_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXT_ENTITY_STANDALONE">XML_ERR_EXT_ENTITY_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_EXT_SUBSET_NOT_FINISHED">XML_ERR_EXT_SUBSET_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_FATAL">XML_ERR_FATAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_GT_REQUIRED">XML_ERR_GT_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_HYPHEN_IN_COMMENT">XML_ERR_HYPHEN_IN_COMMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INTERNAL_ERROR">XML_ERR_INTERNAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_CHAR">XML_ERR_INVALID_CHAR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_CHARREF">XML_ERR_INVALID_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_DEC_CHARREF">XML_ERR_INVALID_DEC_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_ENCODING">XML_ERR_INVALID_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_HEX_CHARREF">XML_ERR_INVALID_HEX_CHARREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_INVALID_URI">XML_ERR_INVALID_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LITERAL_NOT_FINISHED">XML_ERR_LITERAL_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LITERAL_NOT_STARTED">XML_ERR_LITERAL_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LTSLASH_REQUIRED">XML_ERR_LTSLASH_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LT_IN_ATTRIBUTE">XML_ERR_LT_IN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_LT_REQUIRED">XML_ERR_LT_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MISPLACED_CDATA_END">XML_ERR_MISPLACED_CDATA_END</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MISSING_ENCODING">XML_ERR_MISSING_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MIXED_NOT_FINISHED">XML_ERR_MIXED_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_MIXED_NOT_STARTED">XML_ERR_MIXED_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NAME_REQUIRED">XML_ERR_NAME_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NMTOKEN_REQUIRED">XML_ERR_NMTOKEN_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NONE">XML_ERR_NONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_NOT_FINISHED">XML_ERR_NOTATION_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_NOT_STARTED">XML_ERR_NOTATION_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOTATION_PROCESSING">XML_ERR_NOTATION_PROCESSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOT_STANDALONE">XML_ERR_NOT_STANDALONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NOT_WELL_BALANCED">XML_ERR_NOT_WELL_BALANCED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NO_DTD">XML_ERR_NO_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NO_MEMORY">XML_ERR_NO_MEMORY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_NS_DECL_ERROR">XML_ERR_NS_DECL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_OK">XML_ERR_OK</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PCDATA_REQUIRED">XML_ERR_PCDATA_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_AT_EOF">XML_ERR_PEREF_AT_EOF</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_EPILOG">XML_ERR_PEREF_IN_EPILOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_INT_SUBSET">XML_ERR_PEREF_IN_INT_SUBSET</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_IN_PROLOG">XML_ERR_PEREF_IN_PROLOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_NO_NAME">XML_ERR_PEREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PEREF_SEMICOL_MISSING">XML_ERR_PEREF_SEMICOL_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PI_NOT_FINISHED">XML_ERR_PI_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PI_NOT_STARTED">XML_ERR_PI_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_PUBID_REQUIRED">XML_ERR_PUBID_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_RESERVED_XML_NAME">XML_ERR_RESERVED_XML_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_SEPARATOR_REQUIRED">XML_ERR_SEPARATOR_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_SPACE_REQUIRED">XML_ERR_SPACE_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STANDALONE_VALUE">XML_ERR_STANDALONE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STRING_NOT_CLOSED">XML_ERR_STRING_NOT_CLOSED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_STRING_NOT_STARTED">XML_ERR_STRING_NOT_STARTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_TAG_NAME_MISMATCH">XML_ERR_TAG_NAME_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_TAG_NOT_FINISHED">XML_ERR_TAG_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNDECLARED_ENTITY">XML_ERR_UNDECLARED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNKNOWN_ENCODING">XML_ERR_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNPARSED_ENTITY">XML_ERR_UNPARSED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_USER_STOP">XML_ERR_USER_STOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_WARNING">XML_ERR_WARNING</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_XMLDECL_NOT_FINISHED">XML_ERR_XMLDECL_NOT_FINISHED</a><br />
+<a href="html/libxml-xmlerror.html#XML_ERR_XMLDECL_NOT_STARTED">XML_ERR_XMLDECL_NOT_STARTED</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_ATOM">XML_EXP_ATOM</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_COUNT">XML_EXP_COUNT</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_EMPTY">XML_EXP_EMPTY</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_FORBID">XML_EXP_FORBID</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_OR">XML_EXP_OR</a><br />
+<a href="html/libxml-xmlregexp.html#XML_EXP_SEQ">XML_EXP_SEQ</a><br />
+<a href="html/libxml-entities.html#XML_EXTERNAL_GENERAL_PARSED_ENTITY">XML_EXTERNAL_GENERAL_PARSED_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_EXTERNAL_GENERAL_UNPARSED_ENTITY">XML_EXTERNAL_GENERAL_UNPARSED_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_EXTERNAL_PARAMETER_ENTITY">XML_EXTERNAL_PARAMETER_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_BUFFER">XML_FROM_BUFFER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_C14N">XML_FROM_C14N</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_CATALOG">XML_FROM_CATALOG</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_CHECK">XML_FROM_CHECK</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_DATATYPE">XML_FROM_DATATYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_DTD">XML_FROM_DTD</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_FTP">XML_FROM_FTP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_HTML">XML_FROM_HTML</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_HTTP">XML_FROM_HTTP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_I18N">XML_FROM_I18N</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_IO">XML_FROM_IO</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_MEMORY">XML_FROM_MEMORY</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_MODULE">XML_FROM_MODULE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_NAMESPACE">XML_FROM_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_NONE">XML_FROM_NONE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_OUTPUT">XML_FROM_OUTPUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_PARSER">XML_FROM_PARSER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_REGEXP">XML_FROM_REGEXP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_RELAXNGP">XML_FROM_RELAXNGP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_RELAXNGV">XML_FROM_RELAXNGV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASP">XML_FROM_SCHEMASP</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMATRONV">XML_FROM_SCHEMATRONV</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_TREE">XML_FROM_TREE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_URI">XML_FROM_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_VALID">XML_FROM_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_WRITER">XML_FROM_WRITER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XPATH">XML_FROM_XPATH</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XPOINTER">XML_FROM_XPOINTER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FROM_XSLT">XML_FROM_XSLT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_ACCNT">XML_FTP_ACCNT</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a><br />
+<a href="html/libxml-xmlerror.html#XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a><br />
+<a href="html/libxml-tree.html#XML_GET_CONTENT">XML_GET_CONTENT</a><br />
+<a href="html/libxml-tree.html#XML_GET_LINE">XML_GET_LINE</a><br />
+<a href="html/libxml-tree.html#XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_URL_SYNTAX">XML_HTTP_URL_SYNTAX</a><br />
+<a href="html/libxml-xmlerror.html#XML_HTTP_USE_IP">XML_HTTP_USE_IP</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_CONV_FAILED">XML_I18N_CONV_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_EXCESS_HANDLER">XML_I18N_EXCESS_HANDLER</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_HANDLER">XML_I18N_NO_HANDLER</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_NAME">XML_I18N_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_I18N_NO_OUTPUT">XML_I18N_NO_OUTPUT</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_GENERAL_ENTITY">XML_INTERNAL_GENERAL_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_PARAMETER_ENTITY">XML_INTERNAL_PARAMETER_ENTITY</a><br />
+<a href="html/libxml-entities.html#XML_INTERNAL_PREDEFINED_ENTITY">XML_INTERNAL_PREDEFINED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_BUFFER_FULL">XML_IO_BUFFER_FULL</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EACCES">XML_IO_EACCES</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EADDRINUSE">XML_IO_EADDRINUSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EAFNOSUPPORT">XML_IO_EAFNOSUPPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EAGAIN">XML_IO_EAGAIN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EALREADY">XML_IO_EALREADY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBADF">XML_IO_EBADF</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBADMSG">XML_IO_EBADMSG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EBUSY">XML_IO_EBUSY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECANCELED">XML_IO_ECANCELED</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECHILD">XML_IO_ECHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ECONNREFUSED">XML_IO_ECONNREFUSED</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EDEADLK">XML_IO_EDEADLK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EDOM">XML_IO_EDOM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EEXIST">XML_IO_EEXIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EFAULT">XML_IO_EFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EFBIG">XML_IO_EFBIG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINPROGRESS">XML_IO_EINPROGRESS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINTR">XML_IO_EINTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EINVAL">XML_IO_EINVAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EIO">XML_IO_EIO</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EISCONN">XML_IO_EISCONN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EISDIR">XML_IO_EISDIR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMFILE">XML_IO_EMFILE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMLINK">XML_IO_EMLINK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EMSGSIZE">XML_IO_EMSGSIZE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENAMETOOLONG">XML_IO_ENAMETOOLONG</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENCODER">XML_IO_ENCODER</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENETUNREACH">XML_IO_ENETUNREACH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENFILE">XML_IO_ENFILE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENODEV">XML_IO_ENODEV</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOENT">XML_IO_ENOENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOEXEC">XML_IO_ENOEXEC</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOLCK">XML_IO_ENOLCK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOMEM">XML_IO_ENOMEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOSPC">XML_IO_ENOSPC</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOSYS">XML_IO_ENOSYS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTDIR">XML_IO_ENOTDIR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTEMPTY">XML_IO_ENOTEMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTSOCK">XML_IO_ENOTSOCK</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTSUP">XML_IO_ENOTSUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENOTTY">XML_IO_ENOTTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ENXIO">XML_IO_ENXIO</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EPERM">XML_IO_EPERM</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EPIPE">XML_IO_EPIPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ERANGE">XML_IO_ERANGE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EROFS">XML_IO_EROFS</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ESPIPE">XML_IO_ESPIPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ESRCH">XML_IO_ESRCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_ETIMEDOUT">XML_IO_ETIMEDOUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_EXDEV">XML_IO_EXDEV</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_FLUSH">XML_IO_FLUSH</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_LOAD_ERROR">XML_IO_LOAD_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_NETWORK_ATTEMPT">XML_IO_NETWORK_ATTEMPT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_NO_INPUT">XML_IO_NO_INPUT</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_UNKNOWN">XML_IO_UNKNOWN</a><br />
+<a href="html/libxml-xmlerror.html#XML_IO_WRITE">XML_IO_WRITE</a><br />
+<a href="html/libxml-tree.html#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a><br />
+<a href="html/libxml-xmlerror.html#XML_MODULE_CLOSE">XML_MODULE_CLOSE</a><br />
+<a href="html/libxml-xmlmodule.html#XML_MODULE_LAZY">XML_MODULE_LAZY</a><br />
+<a href="html/libxml-xmlmodule.html#XML_MODULE_LOCAL">XML_MODULE_LOCAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_MODULE_OPEN">XML_MODULE_OPEN</a><br />
+<a href="html/libxml-tree.html#XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a><br />
+<a href="html/libxml-tree.html#XML_NOTATION_NODE">XML_NOTATION_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_ATTRIBUTE_REDEFINED">XML_NS_ERR_ATTRIBUTE_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_COLON">XML_NS_ERR_COLON</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_EMPTY">XML_NS_ERR_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ATTRIBUTE_VALUE">XML_PARSER_ATTRIBUTE_VALUE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_CDATA_SECTION">XML_PARSER_CDATA_SECTION</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_COMMENT">XML_PARSER_COMMENT</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_CONTENT">XML_PARSER_CONTENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_DEFAULTATTRS">XML_PARSER_DEFAULTATTRS</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_DTD">XML_PARSER_DTD</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_END_TAG">XML_PARSER_END_TAG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ENTITY_DECL">XML_PARSER_ENTITY_DECL</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_ENTITY_VALUE">XML_PARSER_ENTITY_VALUE</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_EOF">XML_PARSER_EOF</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_EPILOG">XML_PARSER_EPILOG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_IGNORE">XML_PARSER_IGNORE</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_LOADDTD">XML_PARSER_LOADDTD</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_MISC">XML_PARSER_MISC</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PI">XML_PARSER_PI</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PROLOG">XML_PARSER_PROLOG</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_PUBLIC_LITERAL">XML_PARSER_PUBLIC_LITERAL</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_ERROR">XML_PARSER_SEVERITY_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_ERROR">XML_PARSER_SEVERITY_VALIDITY_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_WARNING">XML_PARSER_SEVERITY_VALIDITY_WARNING</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SEVERITY_WARNING">XML_PARSER_SEVERITY_WARNING</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_START">XML_PARSER_START</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_START_TAG">XML_PARSER_START_TAG</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_SUBST_ENTITIES">XML_PARSER_SUBST_ENTITIES</a><br />
+<a href="html/libxml-parser.html#XML_PARSER_SYSTEM_LITERAL">XML_PARSER_SYSTEM_LITERAL</a><br />
+<a href="html/libxml-xmlreader.html#XML_PARSER_VALIDATE">XML_PARSER_VALIDATE</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_COMPACT">XML_PARSE_COMPACT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DOM">XML_PARSE_DOM</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDATTR">XML_PARSE_DTDATTR</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDLOAD">XML_PARSE_DTDLOAD</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_DTDVALID">XML_PARSE_DTDVALID</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOBASEFIX">XML_PARSE_NOBASEFIX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOBLANKS">XML_PARSE_NOBLANKS</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NODICT">XML_PARSE_NODICT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOENT">XML_PARSE_NOENT</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOERROR">XML_PARSE_NOERROR</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NONET">XML_PARSE_NONET</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOWARNING">XML_PARSE_NOWARNING</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_OLD10">XML_PARSE_OLD10</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_OLDSAX">XML_PARSE_OLDSAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PEDANTIC">XML_PARSE_PEDANTIC</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PUSH_DOM">XML_PARSE_PUSH_DOM</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_PUSH_SAX">XML_PARSE_PUSH_SAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_READER">XML_PARSE_READER</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_RECOVER">XML_PARSE_RECOVER</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_SAX">XML_PARSE_SAX</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_SAX1">XML_PARSE_SAX1</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_UNKNOWN">XML_PARSE_UNKNOWN</a><br />
+<a href="html/libxml-parser.html#XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_DEFAULT">XML_PATTERN_DEFAULT</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XPATH">XML_PATTERN_XPATH</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XSFIELD">XML_PATTERN_XSFIELD</a><br />
+<a href="html/libxml-pattern.html#XML_PATTERN_XSSEL">XML_PATTERN_XSSEL</a><br />
+<a href="html/libxml-tree.html#XML_PI_NODE">XML_PI_NODE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ATTRIBUTE">XML_READER_TYPE_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_CDATA">XML_READER_TYPE_CDATA</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_COMMENT">XML_READER_TYPE_COMMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT">XML_READER_TYPE_DOCUMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT_FRAGMENT">XML_READER_TYPE_DOCUMENT_FRAGMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_DOCUMENT_TYPE">XML_READER_TYPE_DOCUMENT_TYPE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ELEMENT">XML_READER_TYPE_ELEMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_END_ELEMENT">XML_READER_TYPE_END_ELEMENT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_END_ENTITY">XML_READER_TYPE_END_ENTITY</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ENTITY">XML_READER_TYPE_ENTITY</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_ENTITY_REFERENCE">XML_READER_TYPE_ENTITY_REFERENCE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_NONE">XML_READER_TYPE_NONE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_NOTATION">XML_READER_TYPE_NOTATION</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_PROCESSING_INSTRUCTION">XML_READER_TYPE_PROCESSING_INSTRUCTION</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_SIGNIFICANT_WHITESPACE">XML_READER_TYPE_SIGNIFICANT_WHITESPACE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_TEXT">XML_READER_TYPE_TEXT</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_WHITESPACE">XML_READER_TYPE_WHITESPACE</a><br />
+<a href="html/libxml-xmlreader.html#XML_READER_TYPE_XML_DECLARATION">XML_READER_TYPE_XML_DECLARATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_REGEXP_COMPILE_ERROR">XML_REGEXP_COMPILE_ERROR</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTREXTRANS">XML_RELAXNG_ERR_ATTREXTRANS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRNAME">XML_RELAXNG_ERR_ATTRNAME</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRNONS">XML_RELAXNG_ERR_ATTRNONS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRVALID">XML_RELAXNG_ERR_ATTRVALID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ATTRWRONGNS">XML_RELAXNG_ERR_ATTRWRONGNS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_CONTENTVALID">XML_RELAXNG_ERR_CONTENTVALID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DATAELEM">XML_RELAXNG_ERR_DATAELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DATATYPE">XML_RELAXNG_ERR_DATATYPE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_DUPID">XML_RELAXNG_ERR_DUPID</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMEXTRANS">XML_RELAXNG_ERR_ELEMEXTRANS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNAME">XML_RELAXNG_ERR_ELEMNAME</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNONS">XML_RELAXNG_ERR_ELEMNONS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMNOTEMPTY">XML_RELAXNG_ERR_ELEMNOTEMPTY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMWRONG">XML_RELAXNG_ERR_ELEMWRONG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_ELEMWRONGNS">XML_RELAXNG_ERR_ELEMWRONGNS</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_EXTRACONTENT">XML_RELAXNG_ERR_EXTRACONTENT</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_EXTRADATA">XML_RELAXNG_ERR_EXTRADATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTEREXTRA">XML_RELAXNG_ERR_INTEREXTRA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERNAL">XML_RELAXNG_ERR_INTERNAL</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERNODATA">XML_RELAXNG_ERR_INTERNODATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INTERSEQ">XML_RELAXNG_ERR_INTERSEQ</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_INVALIDATTR">XML_RELAXNG_ERR_INVALIDATTR</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LACKDATA">XML_RELAXNG_ERR_LACKDATA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LIST">XML_RELAXNG_ERR_LIST</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTELEM">XML_RELAXNG_ERR_LISTELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTEMPTY">XML_RELAXNG_ERR_LISTEMPTY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_LISTEXTRA">XML_RELAXNG_ERR_LISTEXTRA</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_MEMORY">XML_RELAXNG_ERR_MEMORY</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NODEFINE">XML_RELAXNG_ERR_NODEFINE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOELEM">XML_RELAXNG_ERR_NOELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOGRAMMAR">XML_RELAXNG_ERR_NOGRAMMAR</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOSTATE">XML_RELAXNG_ERR_NOSTATE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_NOTELEM">XML_RELAXNG_ERR_NOTELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TEXTWRONG">XML_RELAXNG_ERR_TEXTWRONG</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPE">XML_RELAXNG_ERR_TYPE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPECMP">XML_RELAXNG_ERR_TYPECMP</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_TYPEVAL">XML_RELAXNG_ERR_TYPEVAL</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_VALELEM">XML_RELAXNG_ERR_VALELEM</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_ERR_VALUE">XML_RELAXNG_ERR_VALUE</a><br />
+<a href="html/libxml-relaxng.html#XML_RELAXNG_OK">XML_RELAXNG_OK</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ANYNAME_ATTR_ANCESTOR">XML_RNGP_ANYNAME_ATTR_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_CHILDREN">XML_RNGP_ATTRIBUTE_CHILDREN</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_CONTENT">XML_RNGP_ATTRIBUTE_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_EMPTY">XML_RNGP_ATTRIBUTE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTRIBUTE_NOOP">XML_RNGP_ATTRIBUTE_NOOP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ATTR_CONFLICT">XML_RNGP_ATTR_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CHOICE_CONTENT">XML_RNGP_CHOICE_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CHOICE_EMPTY">XML_RNGP_CHOICE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_CREATE_FAILURE">XML_RNGP_CREATE_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DATA_CONTENT">XML_RNGP_DATA_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_CREATE_FAILED">XML_RNGP_DEFINE_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_EMPTY">XML_RNGP_DEFINE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_MISSING">XML_RNGP_DEFINE_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEFINE_NAME_MISSING">XML_RNGP_DEFINE_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_DEF_CHOICE_AND_INTERLEAVE">XML_RNGP_DEF_CHOICE_AND_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_CONTENT">XML_RNGP_ELEMENT_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_EMPTY">XML_RNGP_ELEMENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_NAME">XML_RNGP_ELEMENT_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEMENT_NO_CONTENT">XML_RNGP_ELEMENT_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_CONTENT_EMPTY">XML_RNGP_ELEM_CONTENT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_CONTENT_ERROR">XML_RNGP_ELEM_CONTENT_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ELEM_TEXT_CONFLICT">XML_RNGP_ELEM_TEXT_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY">XML_RNGP_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_CONSTRUCT">XML_RNGP_EMPTY_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_CONTENT">XML_RNGP_EMPTY_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EMPTY_NOT_EMPTY">XML_RNGP_EMPTY_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_ERROR_TYPE_LIB">XML_RNGP_ERROR_TYPE_LIB</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_EMPTY">XML_RNGP_EXCEPT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_MISSING">XML_RNGP_EXCEPT_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_MULTIPLE">XML_RNGP_EXCEPT_MULTIPLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXCEPT_NO_CONTENT">XML_RNGP_EXCEPT_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNALREF_EMTPY">XML_RNGP_EXTERNALREF_EMTPY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNALREF_RECURSE">XML_RNGP_EXTERNALREF_RECURSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_EXTERNAL_REF_FAILURE">XML_RNGP_EXTERNAL_REF_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_FORBIDDEN_ATTRIBUTE">XML_RNGP_FORBIDDEN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_FOREIGN_ELEMENT">XML_RNGP_FOREIGN_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_CONTENT">XML_RNGP_GRAMMAR_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_EMPTY">XML_RNGP_GRAMMAR_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_MISSING">XML_RNGP_GRAMMAR_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GRAMMAR_NO_START">XML_RNGP_GRAMMAR_NO_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_GROUP_ATTR_CONFLICT">XML_RNGP_GROUP_ATTR_CONFLICT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_HREF_ERROR">XML_RNGP_HREF_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_EMPTY">XML_RNGP_INCLUDE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_FAILURE">XML_RNGP_INCLUDE_FAILURE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INCLUDE_RECURSE">XML_RNGP_INCLUDE_RECURSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_ADD">XML_RNGP_INTERLEAVE_ADD</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_CREATE_FAILED">XML_RNGP_INTERLEAVE_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_EMPTY">XML_RNGP_INTERLEAVE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INTERLEAVE_NO_CONTENT">XML_RNGP_INTERLEAVE_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_DEFINE_NAME">XML_RNGP_INVALID_DEFINE_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_URI">XML_RNGP_INVALID_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_INVALID_VALUE">XML_RNGP_INVALID_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_MISSING_HREF">XML_RNGP_MISSING_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NAME_MISSING">XML_RNGP_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NEED_COMBINE">XML_RNGP_NEED_COMBINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NOTALLOWED_NOT_EMPTY">XML_RNGP_NOTALLOWED_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NSNAME_ATTR_ANCESTOR">XML_RNGP_NSNAME_ATTR_ANCESTOR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_NSNAME_NO_NS">XML_RNGP_NSNAME_NO_NS</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARAM_FORBIDDEN">XML_RNGP_PARAM_FORBIDDEN</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARAM_NAME_MISSING">XML_RNGP_PARAM_NAME_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_CREATE_FAILED">XML_RNGP_PARENTREF_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NAME_INVALID">XML_RNGP_PARENTREF_NAME_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NOT_EMPTY">XML_RNGP_PARENTREF_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NO_NAME">XML_RNGP_PARENTREF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARENTREF_NO_PARENT">XML_RNGP_PARENTREF_NO_PARENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PARSE_ERROR">XML_RNGP_PARSE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ATTR_ATTR">XML_RNGP_PAT_ATTR_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ATTR_ELEM">XML_RNGP_PAT_ATTR_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ATTR">XML_RNGP_PAT_DATA_EXCEPT_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ELEM">XML_RNGP_PAT_DATA_EXCEPT_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_EMPTY">XML_RNGP_PAT_DATA_EXCEPT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_GROUP">XML_RNGP_PAT_DATA_EXCEPT_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE">XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_LIST">XML_RNGP_PAT_DATA_EXCEPT_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ONEMORE">XML_RNGP_PAT_DATA_EXCEPT_ONEMORE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_REF">XML_RNGP_PAT_DATA_EXCEPT_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_TEXT">XML_RNGP_PAT_DATA_EXCEPT_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_ATTR">XML_RNGP_PAT_LIST_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_ELEM">XML_RNGP_PAT_LIST_ELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_INTERLEAVE">XML_RNGP_PAT_LIST_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_LIST">XML_RNGP_PAT_LIST_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_REF">XML_RNGP_PAT_LIST_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_LIST_TEXT">XML_RNGP_PAT_LIST_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME">XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ONEMORE_GROUP_ATTR">XML_RNGP_PAT_ONEMORE_GROUP_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR">XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_ATTR">XML_RNGP_PAT_START_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_DATA">XML_RNGP_PAT_START_DATA</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_EMPTY">XML_RNGP_PAT_START_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_GROUP">XML_RNGP_PAT_START_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_INTERLEAVE">XML_RNGP_PAT_START_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_LIST">XML_RNGP_PAT_START_LIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_ONEMORE">XML_RNGP_PAT_START_ONEMORE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_TEXT">XML_RNGP_PAT_START_TEXT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PAT_START_VALUE">XML_RNGP_PAT_START_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_PREFIX_UNDEFINED">XML_RNGP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_CREATE_FAILED">XML_RNGP_REF_CREATE_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_CYCLE">XML_RNGP_REF_CYCLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NAME_INVALID">XML_RNGP_REF_NAME_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NOT_EMPTY">XML_RNGP_REF_NOT_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NO_DEF">XML_RNGP_REF_NO_DEF</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_REF_NO_NAME">XML_RNGP_REF_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_CHOICE_AND_INTERLEAVE">XML_RNGP_START_CHOICE_AND_INTERLEAVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_CONTENT">XML_RNGP_START_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_EMPTY">XML_RNGP_START_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_START_MISSING">XML_RNGP_START_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TEXT_EXPECTED">XML_RNGP_TEXT_EXPECTED</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TEXT_HAS_CHILD">XML_RNGP_TEXT_HAS_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_MISSING">XML_RNGP_TYPE_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_NOT_FOUND">XML_RNGP_TYPE_NOT_FOUND</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_TYPE_VALUE">XML_RNGP_TYPE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_ATTRIBUTE">XML_RNGP_UNKNOWN_ATTRIBUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_COMBINE">XML_RNGP_UNKNOWN_COMBINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_CONSTRUCT">XML_RNGP_UNKNOWN_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_UNKNOWN_TYPE_LIB">XML_RNGP_UNKNOWN_TYPE_LIB</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_URI_FRAGMENT">XML_RNGP_URI_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_URI_NOT_ABSOLUTE">XML_RNGP_URI_NOT_ABSOLUTE</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_VALUE_EMPTY">XML_RNGP_VALUE_EMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT">XML_RNGP_VALUE_NO_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_XMLNS_NAME">XML_RNGP_XMLNS_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_RNGP_XML_NS">XML_RNGP_XML_NS</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_XML">XML_SAVE_AS_XML</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_CHAR_INVALID">XML_SAVE_CHAR_INVALID</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_FORMAT">XML_SAVE_FORMAT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br />
+<a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_WSNONSIG">XML_SAVE_WSNONSIG</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_XHTML">XML_SAVE_XHTML</a><br />
+<a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_1">XML_SCHEMAP_COS_VALID_DEFAULT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_1">XML_SCHEMAP_CT_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_2">XML_SCHEMAP_CT_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_3">XML_SCHEMAP_CT_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_4">XML_SCHEMAP_CT_PROPS_CORRECT_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_5">XML_SCHEMAP_CT_PROPS_CORRECT_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_CVC_SIMPLE_TYPE">XML_SCHEMAP_CVC_SIMPLE_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_C_PROPS_CORRECT">XML_SCHEMAP_C_PROPS_CORRECT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DEF_AND_PREFIX">XML_SCHEMAP_DEF_AND_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEMFORMDEFAULT_VALUE">XML_SCHEMAP_ELEMFORMDEFAULT_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEM_DEFAULT_FIXED">XML_SCHEMAP_ELEM_DEFAULT_FIXED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ELEM_NONAME_NOREF">XML_SCHEMAP_ELEM_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_EXTENSION_NO_BASE">XML_SCHEMAP_EXTENSION_NO_BASE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_2">XML_SCHEMAP_E_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_3">XML_SCHEMAP_E_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_4">XML_SCHEMAP_E_PROPS_CORRECT_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_5">XML_SCHEMAP_E_PROPS_CORRECT_5</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_6">XML_SCHEMAP_E_PROPS_CORRECT_6</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FACET_NO_VALUE">XML_SCHEMAP_FACET_NO_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_BUILD_IMPORT">XML_SCHEMAP_FAILED_BUILD_IMPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_LOAD">XML_SCHEMAP_FAILED_LOAD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_FAILED_PARSE">XML_SCHEMAP_FAILED_PARSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_GROUP_NONAME_NOREF">XML_SCHEMAP_GROUP_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI">XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_REDEFINE_NSNAME">XML_SCHEMAP_IMPORT_REDEFINE_NSNAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INTERNAL">XML_SCHEMAP_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE">XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_COMBINATION">XML_SCHEMAP_INVALID_ATTR_COMBINATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION">XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_NAME">XML_SCHEMAP_INVALID_ATTR_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_FACET_VALUE">XML_SCHEMAP_INVALID_FACET_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_MAXOCCURS">XML_SCHEMAP_INVALID_MAXOCCURS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_MINOCCURS">XML_SCHEMAP_INVALID_MINOCCURS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_REF_AND_SUBTYPE">XML_SCHEMAP_INVALID_REF_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_INVALID_WHITE_SPACE">XML_SCHEMAP_INVALID_WHITE_SPACE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_1">XML_SCHEMAP_MG_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_2">XML_SCHEMAP_MG_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD">XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOATTR_NOREF">XML_SCHEMAP_NOATTR_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOROOT">XML_SCHEMAP_NOROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTATION_NO_NAME">XML_SCHEMAP_NOTATION_NO_NAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTHING_TO_PARSE">XML_SCHEMAP_NOTHING_TO_PARSE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_DETERMINISTIC">XML_SCHEMAP_NOT_DETERMINISTIC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NO_XMLNS">XML_SCHEMAP_NO_XMLNS</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_NO_XSI">XML_SCHEMAP_NO_XSI</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_1">XML_SCHEMAP_P_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_1">XML_SCHEMAP_P_PROPS_CORRECT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_2">XML_SCHEMAP_P_PROPS_CORRECT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_GROUP">XML_SCHEMAP_REDEFINED_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_NOTATION">XML_SCHEMAP_REDEFINED_NOTATION</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REDEFINED_TYPE">XML_SCHEMAP_REDEFINED_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REF_AND_CONTENT">XML_SCHEMAP_REF_AND_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REF_AND_SUBTYPE">XML_SCHEMAP_REF_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_REGEXP_INVALID">XML_SCHEMAP_REGEXP_INVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_RESTRICTION_NONAME_NOREF">XML_SCHEMAP_RESTRICTION_NONAME_NOREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_INVALID_VALUE">XML_SCHEMAP_S4S_ATTR_INVALID_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_MISSING">XML_SCHEMAP_S4S_ATTR_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED">XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ELEM_MISSING">XML_SCHEMAP_S4S_ELEM_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED">XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SIMPLETYPE_NONAME">XML_SCHEMAP_SIMPLETYPE_NONAME</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_1">XML_SCHEMAP_SRC_ATTRIBUTE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_2">XML_SCHEMAP_SRC_ATTRIBUTE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_1">XML_SCHEMAP_SRC_ATTRIBUTE_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_2">XML_SCHEMAP_SRC_ATTRIBUTE_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_4">XML_SCHEMAP_SRC_ATTRIBUTE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_CT_1">XML_SCHEMAP_SRC_CT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_1">XML_SCHEMAP_SRC_ELEMENT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_1">XML_SCHEMAP_SRC_ELEMENT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_2">XML_SCHEMAP_SRC_ELEMENT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_3">XML_SCHEMAP_SRC_ELEMENT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT">XML_SCHEMAP_SRC_IMPORT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_1">XML_SCHEMAP_SRC_IMPORT_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_2">XML_SCHEMAP_SRC_IMPORT_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2">XML_SCHEMAP_SRC_IMPORT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_1">XML_SCHEMAP_SRC_IMPORT_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_2">XML_SCHEMAP_SRC_IMPORT_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_1">XML_SCHEMAP_SRC_IMPORT_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_2">XML_SCHEMAP_SRC_IMPORT_3_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_INCLUDE">XML_SCHEMAP_SRC_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_REDEFINE">XML_SCHEMAP_SRC_REDEFINE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_RESOLVE">XML_SCHEMAP_SRC_RESOLVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_1">XML_SCHEMAP_SRC_SIMPLE_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_2">XML_SCHEMAP_SRC_SIMPLE_TYPE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_3">XML_SCHEMAP_SRC_SIMPLE_TYPE_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_4">XML_SCHEMAP_SRC_SIMPLE_TYPE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES">XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_1">XML_SCHEMAP_ST_PROPS_CORRECT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_2">XML_SCHEMAP_ST_PROPS_CORRECT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_3">XML_SCHEMAP_ST_PROPS_CORRECT_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE">XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_TYPE_AND_SUBTYPE">XML_SCHEMAP_TYPE_AND_SUBTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNION_NOT_EXPRESSIBLE">XML_SCHEMAP_UNION_NOT_EXPRESSIBLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ALL_CHILD">XML_SCHEMAP_UNKNOWN_ALL_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD">XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD">XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP">XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTR_CHILD">XML_SCHEMAP_UNKNOWN_ATTR_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_BASE_TYPE">XML_SCHEMAP_UNKNOWN_BASE_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_CHOICE_CHILD">XML_SCHEMAP_UNKNOWN_CHOICE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_ELEM_CHILD">XML_SCHEMAP_UNKNOWN_ELEM_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD">XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_CHILD">XML_SCHEMAP_UNKNOWN_FACET_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_TYPE">XML_SCHEMAP_UNKNOWN_FACET_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_GROUP_CHILD">XML_SCHEMAP_UNKNOWN_GROUP_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_REF">XML_SCHEMAP_UNKNOWN_REF</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD">XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD">XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD">XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_TYPE">XML_SCHEMAP_UNKNOWN_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_UNKNOWN_UNION_CHILD">XML_SCHEMAP_UNKNOWN_UNION_CHILD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_SKIP_SCHEMA">XML_SCHEMAP_WARN_SKIP_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER">XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYSIMPLETYPE">XML_SCHEMAS_ANYSIMPLETYPE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYTYPE">XML_SCHEMAS_ANYTYPE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANYURI">XML_SCHEMAS_ANYURI</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BASE64BINARY">XML_SCHEMAS_BASE64BINARY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BOOLEAN">XML_SCHEMAS_BOOLEAN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_BYTE">XML_SCHEMAS_BYTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DATE">XML_SCHEMAS_DATE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DATETIME">XML_SCHEMAS_DATETIME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DECIMAL">XML_SCHEMAS_DECIMAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DOUBLE">XML_SCHEMAS_DOUBLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_DURATION">XML_SCHEMAS_DURATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ENTITIES">XML_SCHEMAS_ENTITIES</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ENTITY">XML_SCHEMAS_ENTITY</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_">XML_SCHEMAS_ERR_</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ATTRINVALID">XML_SCHEMAS_ERR_ATTRINVALID</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ATTRUNKNOWN">XML_SCHEMAS_ERR_ATTRUNKNOWN</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_CONSTRUCT">XML_SCHEMAS_ERR_CONSTRUCT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ELEMCONT">XML_SCHEMAS_ERR_ELEMCONT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_EXTRACONTENT">XML_SCHEMAS_ERR_EXTRACONTENT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_FACET">XML_SCHEMAS_ERR_FACET</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_HAVEDEFAULT">XML_SCHEMAS_ERR_HAVEDEFAULT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INTERNAL">XML_SCHEMAS_ERR_INTERNAL</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDATTR">XML_SCHEMAS_ERR_INVALIDATTR</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDELEM">XML_SCHEMAS_ERR_INVALIDELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_ISABSTRACT">XML_SCHEMAS_ERR_ISABSTRACT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_MISSING">XML_SCHEMAS_ERR_MISSING</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOROLLBACK">XML_SCHEMAS_ERR_NOROLLBACK</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOROOT">XML_SCHEMAS_ERR_NOROOT</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTDETERMINIST">XML_SCHEMAS_ERR_NOTDETERMINIST</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTEMPTY">XML_SCHEMAS_ERR_NOTEMPTY</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTNILLABLE">XML_SCHEMAS_ERR_NOTNILLABLE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTSIMPLE">XML_SCHEMAS_ERR_NOTSIMPLE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTTOPLEVEL">XML_SCHEMAS_ERR_NOTTOPLEVEL</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_NOTYPE">XML_SCHEMAS_ERR_NOTYPE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_OK">XML_SCHEMAS_ERR_OK</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_UNDECLAREDELEM">XML_SCHEMAS_ERR_UNDECLAREDELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_VALUE">XML_SCHEMAS_ERR_VALUE</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_WRONGELEM">XML_SCHEMAS_ERR_WRONGELEM</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMAS_ERR_XXX">XML_SCHEMAS_ERR_XXX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_FLOAT">XML_SCHEMAS_FLOAT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GDAY">XML_SCHEMAS_GDAY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GMONTH">XML_SCHEMAS_GMONTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GMONTHDAY">XML_SCHEMAS_GMONTHDAY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GYEAR">XML_SCHEMAS_GYEAR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_GYEARMONTH">XML_SCHEMAS_GYEARMONTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_HEXBINARY">XML_SCHEMAS_HEXBINARY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ID">XML_SCHEMAS_ID</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_IDREF">XML_SCHEMAS_IDREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_IDREFS">XML_SCHEMAS_IDREFS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INT">XML_SCHEMAS_INT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_INTEGER">XML_SCHEMAS_INTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_LANGUAGE">XML_SCHEMAS_LANGUAGE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_LONG">XML_SCHEMAS_LONG</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NAME">XML_SCHEMAS_NAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NCNAME">XML_SCHEMAS_NCNAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NINTEGER">XML_SCHEMAS_NINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NMTOKEN">XML_SCHEMAS_NMTOKEN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NMTOKENS">XML_SCHEMAS_NMTOKENS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NNINTEGER">XML_SCHEMAS_NNINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NORMSTRING">XML_SCHEMAS_NORMSTRING</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NOTATION">XML_SCHEMAS_NOTATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_NPINTEGER">XML_SCHEMAS_NPINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_PINTEGER">XML_SCHEMAS_PINTEGER</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QNAME">XML_SCHEMAS_QNAME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_SHORT">XML_SCHEMAS_SHORT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_STRING">XML_SCHEMAS_STRING</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TIME">XML_SCHEMAS_TIME</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TOKEN">XML_SCHEMAS_TOKEN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UBYTE">XML_SCHEMAS_UBYTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UINT">XML_SCHEMAS_UINT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_ULONG">XML_SCHEMAS_ULONG</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_UNKNOWN">XML_SCHEMAS_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_USHORT">XML_SCHEMAS_USHORT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMATRONV_ASSERT">XML_SCHEMATRONV_ASSERT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMATRONV_REPORT">XML_SCHEMATRONV_REPORT</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_BUFFER">XML_SCHEMATRON_OUT_BUFFER</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_ERROR">XML_SCHEMATRON_OUT_ERROR</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_FILE">XML_SCHEMATRON_OUT_FILE</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_IO">XML_SCHEMATRON_OUT_IO</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_QUIET">XML_SCHEMATRON_OUT_QUIET</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_TEXT">XML_SCHEMATRON_OUT_TEXT</a><br />
+<a href="html/libxml-schematron.html#XML_SCHEMATRON_OUT_XML">XML_SCHEMATRON_OUT_XML</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ATTRINVALID">XML_SCHEMAV_ATTRINVALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ATTRUNKNOWN">XML_SCHEMAV_ATTRUNKNOWN</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CONSTRUCT">XML_SCHEMAV_CONSTRUCT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_1">XML_SCHEMAV_CVC_ATTRIBUTE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_2">XML_SCHEMAV_CVC_ATTRIBUTE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_3">XML_SCHEMAV_CVC_ATTRIBUTE_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_4">XML_SCHEMAV_CVC_ATTRIBUTE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_AU">XML_SCHEMAV_CVC_AU</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_4</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_1">XML_SCHEMAV_CVC_ELT_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_2">XML_SCHEMAV_CVC_ELT_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_1">XML_SCHEMAV_CVC_ELT_3_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_1">XML_SCHEMAV_CVC_ELT_3_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_2">XML_SCHEMAV_CVC_ELT_3_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_1">XML_SCHEMAV_CVC_ELT_4_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_2">XML_SCHEMAV_CVC_ELT_4_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_3">XML_SCHEMAV_CVC_ELT_4_3</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_1">XML_SCHEMAV_CVC_ELT_5_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_2">XML_SCHEMAV_CVC_ELT_5_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_1">XML_SCHEMAV_CVC_ELT_5_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_2_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_2">XML_SCHEMAV_CVC_ELT_5_2_2_2_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_6">XML_SCHEMAV_CVC_ELT_6</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ELT_7">XML_SCHEMAV_CVC_ELT_7</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MAXLENGTH_VALID">XML_SCHEMAV_CVC_MAXLENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MININCLUSIVE_VALID">XML_SCHEMAV_CVC_MININCLUSIVE_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_MINLENGTH_VALID">XML_SCHEMAV_CVC_MINLENGTH_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_PATTERN_VALID">XML_SCHEMAV_CVC_PATTERN_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TOTALDIGITS_VALID">XML_SCHEMAV_CVC_TOTALDIGITS_VALID</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_1">XML_SCHEMAV_CVC_TYPE_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_EXTRACONTENT">XML_SCHEMAV_EXTRACONTENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_FACET">XML_SCHEMAV_FACET</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_HAVEDEFAULT">XML_SCHEMAV_HAVEDEFAULT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INTERNAL">XML_SCHEMAV_INTERNAL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INVALIDATTR">XML_SCHEMAV_INVALIDATTR</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_INVALIDELEM">XML_SCHEMAV_INVALIDELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_ISABSTRACT">XML_SCHEMAV_ISABSTRACT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_MISC">XML_SCHEMAV_MISC</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_MISSING">XML_SCHEMAV_MISSING</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOROLLBACK">XML_SCHEMAV_NOROLLBACK</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOROOT">XML_SCHEMAV_NOROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTDETERMINIST">XML_SCHEMAV_NOTDETERMINIST</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTEMPTY">XML_SCHEMAV_NOTEMPTY</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTNILLABLE">XML_SCHEMAV_NOTNILLABLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTSIMPLE">XML_SCHEMAV_NOTSIMPLE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTTOPLEVEL">XML_SCHEMAV_NOTTOPLEVEL</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_NOTYPE">XML_SCHEMAV_NOTYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_UNDECLAREDELEM">XML_SCHEMAV_UNDECLAREDELEM</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_VALUE">XML_SCHEMAV_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_SCHEMAV_WRONGELEM">XML_SCHEMAV_WRONGELEM</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_EMPTY">XML_SCHEMA_CONTENT_EMPTY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_LENGTH">XML_SCHEMA_FACET_LENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXEXCLUSIVE">XML_SCHEMA_FACET_MAXEXCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_PATTERN">XML_SCHEMA_FACET_PATTERN</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_TOTALDIGITS">XML_SCHEMA_FACET_TOTALDIGITS</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_FACET_WHITESPACE">XML_SCHEMA_FACET_WHITESPACE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ALL">XML_SCHEMA_TYPE_ALL</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX_CONTENT">XML_SCHEMA_TYPE_COMPLEX_CONTENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_ELEMENT">XML_SCHEMA_TYPE_ELEMENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SEQUENCE">XML_SCHEMA_TYPE_SEQUENCE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE">XML_SCHEMA_TYPE_SIMPLE</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE_CONTENT">XML_SCHEMA_TYPE_SIMPLE_CONTENT</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a><br />
+<a href="html/libxml-schemasInternals.html#XML_SCHEMA_TYPE_UR">XML_SCHEMA_TYPE_UR</a><br />
+<a href="html/libxml-xmlschemas.html#XML_SCHEMA_VAL_VC_I_CREATE">XML_SCHEMA_VAL_VC_I_CREATE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a><br />
+<a href="html/libxml-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a><br />
+<a href="html/libxml-parser.html#XML_SKIP_IDS">XML_SKIP_IDS</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a><br />
+<a href="html/libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_CLOSED">XML_TEXTREADER_MODE_CLOSED</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_EOF">XML_TEXTREADER_MODE_EOF</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_ERROR">XML_TEXTREADER_MODE_ERROR</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_INITIAL">XML_TEXTREADER_MODE_INITIAL</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_INTERACTIVE">XML_TEXTREADER_MODE_INTERACTIVE</a><br />
+<a href="html/libxml-xmlreader.html#XML_TEXTREADER_MODE_READING">XML_TEXTREADER_MODE_READING</a><br />
+<a href="html/libxml-tree.html#XML_TEXT_NODE">XML_TEXT_NODE</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_INVALID_DEC">XML_TREE_INVALID_DEC</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_INVALID_HEX">XML_TREE_INVALID_HEX</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_NOT_UTF8">XML_TREE_NOT_UTF8</a><br />
+<a href="html/libxml-xmlerror.html#XML_TREE_UNTERMINATED_ENTITY">XML_TREE_UNTERMINATED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_CATALOG_PI">XML_WAR_CATALOG_PI</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_ENTITY_REDEFINED">XML_WAR_ENTITY_REDEFINED</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_LANG_VALUE">XML_WAR_LANG_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_COLUMN">XML_WAR_NS_COLUMN</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_URI">XML_WAR_NS_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_NS_URI_RELATIVE">XML_WAR_NS_URI_RELATIVE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_SPACE_VALUE">XML_WAR_SPACE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_UNDECLARED_ENTITY">XML_WAR_UNDECLARED_ENTITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_WAR_UNKNOWN_VERSION">XML_WAR_UNKNOWN_VERSION</a><br />
+<a href="html/libxml-parser.html#XML_WITH_AUTOMATA">XML_WITH_AUTOMATA</a><br />
+<a href="html/libxml-parser.html#XML_WITH_C14N">XML_WITH_C14N</a><br />
+<a href="html/libxml-parser.html#XML_WITH_CATALOG">XML_WITH_CATALOG</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG">XML_WITH_DEBUG</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG_MEM">XML_WITH_DEBUG_MEM</a><br />
+<a href="html/libxml-parser.html#XML_WITH_DEBUG_RUN">XML_WITH_DEBUG_RUN</a><br />
+<a href="html/libxml-parser.html#XML_WITH_EXPR">XML_WITH_EXPR</a><br />
+<a href="html/libxml-parser.html#XML_WITH_FTP">XML_WITH_FTP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_HTML">XML_WITH_HTML</a><br />
+<a href="html/libxml-parser.html#XML_WITH_HTTP">XML_WITH_HTTP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ICONV">XML_WITH_ICONV</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ICU">XML_WITH_ICU</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ISO8859X">XML_WITH_ISO8859X</a><br />
+<a href="html/libxml-parser.html#XML_WITH_LEGACY">XML_WITH_LEGACY</a><br />
+<a href="html/libxml-parser.html#XML_WITH_LZMA">XML_WITH_LZMA</a><br />
+<a href="html/libxml-parser.html#XML_WITH_MODULES">XML_WITH_MODULES</a><br />
+<a href="html/libxml-parser.html#XML_WITH_NONE">XML_WITH_NONE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_OUTPUT">XML_WITH_OUTPUT</a><br />
+<a href="html/libxml-parser.html#XML_WITH_PATTERN">XML_WITH_PATTERN</a><br />
+<a href="html/libxml-parser.html#XML_WITH_PUSH">XML_WITH_PUSH</a><br />
+<a href="html/libxml-parser.html#XML_WITH_READER">XML_WITH_READER</a><br />
+<a href="html/libxml-parser.html#XML_WITH_REGEXP">XML_WITH_REGEXP</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SAX1">XML_WITH_SAX1</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SCHEMAS">XML_WITH_SCHEMAS</a><br />
+<a href="html/libxml-parser.html#XML_WITH_SCHEMATRON">XML_WITH_SCHEMATRON</a><br />
+<a href="html/libxml-parser.html#XML_WITH_THREAD">XML_WITH_THREAD</a><br />
+<a href="html/libxml-parser.html#XML_WITH_TREE">XML_WITH_TREE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_UNICODE">XML_WITH_UNICODE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_VALID">XML_WITH_VALID</a><br />
+<a href="html/libxml-parser.html#XML_WITH_WRITER">XML_WITH_WRITER</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XINCLUDE">XML_WITH_XINCLUDE</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XPATH">XML_WITH_XPATH</a><br />
+<a href="html/libxml-parser.html#XML_WITH_XPTR">XML_WITH_XPTR</a><br />
+<a href="html/libxml-parser.html#XML_WITH_ZLIB">XML_WITH_ZLIB</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_BUILD_FAILED">XML_XINCLUDE_BUILD_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_DEPRECATED_NS">XML_XINCLUDE_DEPRECATED_NS</a><br />
+<a href="html/libxml-tree.html#XML_XINCLUDE_END">XML_XINCLUDE_END</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_ENTITY_DEF_MISMATCH">XML_XINCLUDE_ENTITY_DEF_MISMATCH</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FALLBACKS_IN_INCLUDE">XML_XINCLUDE_FALLBACKS_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE">XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_FRAGMENT_ID">XML_XINCLUDE_FRAGMENT_ID</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_HREF_URI">XML_XINCLUDE_HREF_URI</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_INCLUDE_IN_INCLUDE">XML_XINCLUDE_INCLUDE_IN_INCLUDE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_INVALID_CHAR">XML_XINCLUDE_INVALID_CHAR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_MULTIPLE_ROOT">XML_XINCLUDE_MULTIPLE_ROOT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_NO_FALLBACK">XML_XINCLUDE_NO_FALLBACK</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_NO_HREF">XML_XINCLUDE_NO_HREF</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_PARSE_VALUE">XML_XINCLUDE_PARSE_VALUE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_RECURSION">XML_XINCLUDE_RECURSION</a><br />
+<a href="html/libxml-tree.html#XML_XINCLUDE_START">XML_XINCLUDE_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_TEXT_DOCUMENT">XML_XINCLUDE_TEXT_DOCUMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_TEXT_FRAGMENT">XML_XINCLUDE_TEXT_FRAGMENT</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_UNKNOWN_ENCODING">XML_XINCLUDE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_FAILED">XML_XINCLUDE_XPTR_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XINCLUDE_XPTR_RESULT">XML_XINCLUDE_XPTR_RESULT</a><br />
+<a href="html/libxml-tree.html#XML_XML_ID">XML_XML_ID</a><br />
+<a href="html/libxml-tree.html#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a><br />
+<a href="html/libxml-xpath.html#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_ENCODING_ERROR">XML_XPATH_ENCODING_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_EXPRESSION_OK">XML_XPATH_EXPRESSION_OK</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_EXPR_ERROR">XML_XPATH_EXPR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_ARITY">XML_XPATH_INVALID_ARITY</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CHAR_ERROR">XML_XPATH_INVALID_CHAR_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CTXT_POSITION">XML_XPATH_INVALID_CTXT_POSITION</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_CTXT_SIZE">XML_XPATH_INVALID_CTXT_SIZE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_OPERAND">XML_XPATH_INVALID_OPERAND</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_PREDICATE_ERROR">XML_XPATH_INVALID_PREDICATE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_INVALID_TYPE">XML_XPATH_INVALID_TYPE</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_MEMORY_ERROR">XML_XPATH_MEMORY_ERROR</a><br />
+<a href="html/libxml-xpath.html#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_NUMBER_ERROR">XML_XPATH_NUMBER_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_START_LITERAL_ERROR">XML_XPATH_START_LITERAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNCLOSED_ERROR">XML_XPATH_UNCLOSED_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNDEF_PREFIX_ERROR">XML_XPATH_UNDEF_PREFIX_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNDEF_VARIABLE_ERROR">XML_XPATH_UNDEF_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNFINISHED_LITERAL_ERROR">XML_XPATH_UNFINISHED_LITERAL_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_UNKNOWN_FUNC_ERROR">XML_XPATH_UNKNOWN_FUNC_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPATH_VARIABLE_REF_ERROR">XML_XPATH_VARIABLE_REF_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_CHILDSEQ_START">XML_XPTR_CHILDSEQ_START</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_EVAL_FAILED">XML_XPTR_EVAL_FAILED</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_EXTRA_OBJECTS">XML_XPTR_EXTRA_OBJECTS</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_RESOURCE_ERROR">XML_XPTR_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_SUB_RESOURCE_ERROR">XML_XPTR_SUB_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_SYNTAX_ERROR">XML_XPTR_SYNTAX_ERROR</a><br />
+<a href="html/libxml-xmlerror.html#XML_XPTR_UNKNOWN_SCHEME">XML_XPTR_UNKNOWN_SCHEME</a><br />
+<a href="html/libxml-xpath.html#XPATH_BOOLEAN">XPATH_BOOLEAN</a><br />
+<a href="html/libxml-xpath.html#XPATH_ENCODING_ERROR">XPATH_ENCODING_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_EXPRESSION_OK">XPATH_EXPRESSION_OK</a><br />
+<a href="html/libxml-xpath.html#XPATH_EXPR_ERROR">XPATH_EXPR_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_FORBID_VARIABLE_ERROR">XPATH_FORBID_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CHAR_ERROR">XPATH_INVALID_CHAR_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT">XPATH_INVALID_CTXT</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT_POSITION">XPATH_INVALID_CTXT_POSITION</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_CTXT_SIZE">XPATH_INVALID_CTXT_SIZE</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_OPERAND">XPATH_INVALID_OPERAND</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_PREDICATE_ERROR">XPATH_INVALID_PREDICATE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a><br />
+<a href="html/libxml-xpath.html#XPATH_LOCATIONSET">XPATH_LOCATIONSET</a><br />
+<a href="html/libxml-xpath.html#XPATH_MEMORY_ERROR">XPATH_MEMORY_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_NODESET">XPATH_NODESET</a><br />
+<a href="html/libxml-xpath.html#XPATH_NUMBER">XPATH_NUMBER</a><br />
+<a href="html/libxml-xpath.html#XPATH_NUMBER_ERROR">XPATH_NUMBER_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_POINT">XPATH_POINT</a><br />
+<a href="html/libxml-xpath.html#XPATH_RANGE">XPATH_RANGE</a><br />
+<a href="html/libxml-xpath.html#XPATH_STACK_ERROR">XPATH_STACK_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_START_LITERAL_ERROR">XPATH_START_LITERAL_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_STRING">XPATH_STRING</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNCLOSED_ERROR">XPATH_UNCLOSED_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEFINED">XPATH_UNDEFINED</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEF_PREFIX_ERROR">XPATH_UNDEF_PREFIX_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNDEF_VARIABLE_ERROR">XPATH_UNDEF_VARIABLE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNFINISHED_LITERAL_ERROR">XPATH_UNFINISHED_LITERAL_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_UNKNOWN_FUNC_ERROR">XPATH_UNKNOWN_FUNC_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_USERS">XPATH_USERS</a><br />
+<a href="html/libxml-xpath.html#XPATH_VARIABLE_REF_ERROR">XPATH_VARIABLE_REF_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPATH_XSLT_TREE">XPATH_XSLT_TREE</a><br />
+<a href="html/libxml-xpath.html#XPTR_RESOURCE_ERROR">XPTR_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPTR_SUB_RESOURCE_ERROR">XPTR_SUB_RESOURCE_ERROR</a><br />
+<a href="html/libxml-xpath.html#XPTR_SYNTAX_ERROR">XPTR_SYNTAX_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#XP_ERROR">XP_ERROR</a><br />
+<a href="html/libxml-xpathInternals.html#XP_ERROR0">XP_ERROR0</a><br />
+</p><h2>Letter _:</h2><p><a href="html/libxml-xmlexports.html#_REENTRANT">_REENTRANT</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#_htmlEntityDesc">_htmlEntityDesc</a><br />
+<a href="html/libxml-encoding.html#_uconv_t">_uconv_t</a><br />
+<a href="html/libxml-xlink.html#_xlinkHandler">_xlinkHandler</a><br />
+<a href="html/libxml-tree.html#_xmlAttr">_xmlAttr</a><br />
+<a href="html/libxml-tree.html#_xmlAttribute">_xmlAttribute</a><br />
+<a href="html/libxml-tree.html#_xmlBuffer">_xmlBuffer</a><br />
+<a href="html/libxml-chvalid.html#_xmlChLRange">_xmlChLRange</a><br />
+<a href="html/libxml-chvalid.html#_xmlChRangeGroup">_xmlChRangeGroup</a><br />
+<a href="html/libxml-chvalid.html#_xmlChSRange">_xmlChSRange</a><br />
+<a href="html/libxml-encoding.html#_xmlCharEncodingHandler">_xmlCharEncodingHandler</a><br />
+<a href="html/libxml-tree.html#_xmlDOMWrapCtxt">_xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#_xmlDoc">_xmlDoc</a><br />
+<a href="html/libxml-tree.html#_xmlDtd">_xmlDtd</a><br />
+<a href="html/libxml-tree.html#_xmlElement">_xmlElement</a><br />
+<a href="html/libxml-tree.html#_xmlElementContent">_xmlElementContent</a><br />
+<a href="html/libxml-entities.html#_xmlEntity">_xmlEntity</a><br />
+<a href="html/libxml-tree.html#_xmlEnumeration">_xmlEnumeration</a><br />
+<a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
+<a href="html/libxml-globals.html#_xmlGlobalState">_xmlGlobalState</a><br />
+<a href="html/libxml-tree.html#_xmlID">_xmlID</a><br />
+<a href="html/libxml-xpointer.html#_xmlLocationSet">_xmlLocationSet</a><br />
+<a href="html/libxml-tree.html#_xmlNode">_xmlNode</a><br />
+<a href="html/libxml-xpath.html#_xmlNodeSet">_xmlNodeSet</a><br />
+<a href="html/libxml-tree.html#_xmlNotation">_xmlNotation</a><br />
+<a href="html/libxml-tree.html#_xmlNs">_xmlNs</a><br />
+<a href="html/libxml-xmlIO.html#_xmlOutputBuffer">_xmlOutputBuffer</a><br />
+<a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
+<a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
+<a href="html/libxml-xmlIO.html#_xmlParserInputBuffer">_xmlParserInputBuffer</a><br />
+<a href="html/libxml-parser.html#_xmlParserNodeInfo">_xmlParserNodeInfo</a><br />
+<a href="html/libxml-parser.html#_xmlParserNodeInfoSeq">_xmlParserNodeInfoSeq</a><br />
+<a href="html/libxml-tree.html#_xmlRef">_xmlRef</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandler">_xmlSAXHandler</a><br />
+<a href="html/libxml-parser.html#_xmlSAXHandlerV1">_xmlSAXHandlerV1</a><br />
+<a href="html/libxml-parser.html#_xmlSAXLocator">_xmlSAXLocator</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAnnot">_xmlSchemaAnnot</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttribute">_xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeGroup">_xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaAttributeLink">_xmlSchemaAttributeLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaElement">_xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacet">_xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaFacetLink">_xmlSchemaFacetLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaNotation">_xmlSchemaNotation</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaType">_xmlSchemaType</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaTypeLink">_xmlSchemaTypeLink</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcard">_xmlSchemaWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#_xmlSchemaWildcardNs">_xmlSchemaWildcardNs</a><br />
+<a href="html/libxml-debugXML.html#_xmlShellCtxt">_xmlShellCtxt</a><br />
+<a href="html/libxml-uri.html#_xmlURI">_xmlURI</a><br />
+<a href="html/libxml-valid.html#_xmlValidCtxt">_xmlValidCtxt</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathAxis">_xmlXPathAxis</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathContext">_xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathFunct">_xmlXPathFunct</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathObject">_xmlXPathObject</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathParserContext">_xmlXPathParserContext</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathType">_xmlXPathType</a><br />
+<a href="html/libxml-xpath.html#_xmlXPathVariable">_xmlXPathVariable</a><br />
+</p><h2>Letter a:</h2><p><a href="html/libxml-SAX.html#attribute">attribute</a><br />
+<a href="html/libxml-SAX.html#attributeDecl">attributeDecl</a><br />
+<a href="html/libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#attributeSAXFunc">attributeSAXFunc</a><br />
+</p><h2>Letter c:</h2><p><a href="html/libxml-SAX.html#cdataBlock">cdataBlock</a><br />
+<a href="html/libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a><br />
+<a href="html/libxml-SAX.html#characters">characters</a><br />
+<a href="html/libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a><br />
+<a href="html/libxml-SAX.html#checkNamespace">checkNamespace</a><br />
+<a href="html/libxml-SAX.html#comment">comment</a><br />
+<a href="html/libxml-parser.html#commentSAXFunc">commentSAXFunc</a><br />
+</p><h2>Letter d:</h2><p><a href="html/libxml-DOCBparser.html#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a><br />
+<a href="html/libxml-globals.html#docbDefaultSAXHandler">docbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbEncodeEntities">docbEncodeEntities</a><br />
+<a href="html/libxml-DOCBparser.html#docbFreeParserCtxt">docbFreeParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseChunk">docbParseChunk</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDoc">docbParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseDocument">docbParseDocument</a><br />
+<a href="html/libxml-DOCBparser.html#docbParseFile">docbParseFile</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserCtxt">docbParserCtxt</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserInput">docbParserInput</a><br />
+<a href="html/libxml-DOCBparser.html#docbParserInputPtr">docbParserInputPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXHandler">docbSAXHandler</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseDoc">docbSAXParseDoc</a><br />
+<a href="html/libxml-DOCBparser.html#docbSAXParseFile">docbSAXParseFile</a><br />
+</p><h2>Letter e:</h2><p><a href="html/libxml-SAX.html#elementDecl">elementDecl</a><br />
+<a href="html/libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a><br />
+<a href="html/libxml-xmlregexp.html#emptyExp">emptyExp</a><br />
+<a href="html/libxml-SAX.html#endDocument">endDocument</a><br />
+<a href="html/libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#endElement">endElement</a><br />
+<a href="html/libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a><br />
+<a href="html/libxml-SAX.html#entityDecl">entityDecl</a><br />
+<a href="html/libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a><br />
+<a href="html/libxml-parser.html#errorSAXFunc">errorSAXFunc</a><br />
+<a href="html/libxml-SAX.html#externalSubset">externalSubset</a><br />
+<a href="html/libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a><br />
+</p><h2>Letter f:</h2><p><a href="html/libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a><br />
+<a href="html/libxml-xmlregexp.html#forbiddenExp">forbiddenExp</a><br />
+<a href="html/libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a><br />
+<a href="html/libxml-nanoftp.html#ftpListCallback">ftpListCallback</a><br />
+</p><h2>Letter g:</h2><p><a href="html/libxml-SAX.html#getColumnNumber">getColumnNumber</a><br />
+<a href="html/libxml-SAX.html#getEntity">getEntity</a><br />
+<a href="html/libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getLineNumber">getLineNumber</a><br />
+<a href="html/libxml-SAX.html#getNamespace">getNamespace</a><br />
+<a href="html/libxml-SAX.html#getParameterEntity">getParameterEntity</a><br />
+<a href="html/libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a><br />
+<a href="html/libxml-SAX.html#getPublicId">getPublicId</a><br />
+<a href="html/libxml-SAX.html#getSystemId">getSystemId</a><br />
+<a href="html/libxml-SAX.html#globalNamespace">globalNamespace</a><br />
+</p><h2>Letter h:</h2><p><a href="html/libxml-SAX.html#hasExternalSubset">hasExternalSubset</a><br />
+<a href="html/libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#hasInternalSubset">hasInternalSubset</a><br />
+<a href="html/libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a><br />
+<a href="html/libxml-HTMLparser.html#htmlAutoCloseTag">htmlAutoCloseTag</a><br />
+<a href="html/libxml-parserInternals.html#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadDoc">htmlCtxtReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFd">htmlCtxtReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadFile">htmlCtxtReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadIO">htmlCtxtReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReadMemory">htmlCtxtReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtReset">htmlCtxtReset</a><br />
+<a href="html/libxml-HTMLparser.html#htmlCtxtUseOptions">htmlCtxtUseOptions</a><br />
+<a href="html/libxml-globals.html#htmlDefaultSAXHandler">htmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-HTMLparser.html#htmlDefaultSubelement">htmlDefaultSubelement</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a><br />
+<a href="html/libxml-HTMLtree.html#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a><br />
+<a href="html/libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEncodeEntities">htmlEncodeEntities</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityLookup">htmlEntityLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlEntityValueLookup">htmlEntityValueLookup</a><br />
+<a href="html/libxml-HTMLparser.html#htmlFreeParserCtxt">htmlFreeParserCtxt</a><br />
+<a href="html/libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlHandleOmittedElem">htmlHandleOmittedElem</a><br />
+<a href="html/libxml-parserInternals.html#htmlInitAutoClose">htmlInitAutoClose</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsAutoClosed">htmlIsAutoClosed</a><br />
+<a href="html/libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlIsScriptAttribute">htmlIsScriptAttribute</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNewParserCtxt">htmlNewParserCtxt</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a><br />
+<a href="html/libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlNodeStatus">htmlNodeStatus</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseCharRef">htmlParseCharRef</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseChunk">htmlParseChunk</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDoc">htmlParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseDocument">htmlParseDocument</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseElement">htmlParseElement</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseEntityRef">htmlParseEntityRef</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParseFile">htmlParseFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserCtxt">htmlParserCtxt</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserInput">htmlParserInput</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserInputPtr">htmlParserInputPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserNodeInfo">htmlParserNodeInfo</a><br />
+<a href="html/libxml-HTMLparser.html#htmlParserOption">htmlParserOption</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadDoc">htmlReadDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFd">htmlReadFd</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadFile">htmlReadFile</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadIO">htmlReadIO</a><br />
+<a href="html/libxml-HTMLparser.html#htmlReadMemory">htmlReadMemory</a><br />
+<a href="html/libxml-HTMLparser.html#htmlRequiredAttrs">htmlRequiredAttrs</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXHandler">htmlSAXHandler</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseDoc">htmlSAXParseDoc</a><br />
+<a href="html/libxml-HTMLparser.html#htmlSAXParseFile">htmlSAXParseFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFile">htmlSaveFile</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a><br />
+<a href="html/libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a><br />
+<a href="html/libxml-HTMLparser.html#htmlStatus">htmlStatus</a><br />
+<a href="html/libxml-HTMLparser.html#htmlTagLookup">htmlTagLookup</a><br />
+</p><h2>Letter i:</h2><p><a href="html/libxml-SAX.html#ignorableWhitespace">ignorableWhitespace</a><br />
+<a href="html/libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a><br />
+<a href="html/libxml-xmlerror.html#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a><br />
+<a href="html/libxml-SAX.html#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX.html#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a><br />
+<a href="html/libxml-parserInternals.html#inputPop">inputPop</a><br />
+<a href="html/libxml-parserInternals.html#inputPush">inputPush</a><br />
+<a href="html/libxml-SAX.html#internalSubset">internalSubset</a><br />
+<a href="html/libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a><br />
+<a href="html/libxml-SAX.html#isStandalone">isStandalone</a><br />
+<a href="html/libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a><br />
+<a href="html/libxml-encoding.html#isolat1ToUTF8">isolat1ToUTF8</a><br />
+</p><h2>Letter n:</h2><p><a href="html/libxml-parserInternals.html#namePop">namePop</a><br />
+<a href="html/libxml-parserInternals.html#namePush">namePush</a><br />
+<a href="html/libxml-SAX.html#namespaceDecl">namespaceDecl</a><br />
+<a href="html/libxml-parserInternals.html#nodePop">nodePop</a><br />
+<a href="html/libxml-parserInternals.html#nodePush">nodePush</a><br />
+<a href="html/libxml-SAX.html#notationDecl">notationDecl</a><br />
+<a href="html/libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a><br />
+</p><h2>Letter o:</h2><p><a href="html/libxml-globals.html#oldXMLWDcompatibility">oldXMLWDcompatibility</a><br />
+</p><h2>Letter p:</h2><p><a href="html/libxml-SAX.html#processingInstruction">processingInstruction</a><br />
+<a href="html/libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a><br />
+</p><h2>Letter r:</h2><p><a href="html/libxml-SAX.html#reference">reference</a><br />
+<a href="html/libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a><br />
+<a href="html/libxml-SAX.html#resolveEntity">resolveEntity</a><br />
+<a href="html/libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a><br />
+</p><h2>Letter s:</h2><p><a href="html/libxml-SAX.html#setDocumentLocator">setDocumentLocator</a><br />
+<a href="html/libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a><br />
+<a href="html/libxml-SAX.html#setNamespace">setNamespace</a><br />
+<a href="html/libxml-SAX.html#startDocument">startDocument</a><br />
+<a href="html/libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a><br />
+<a href="html/libxml-SAX.html#startElement">startElement</a><br />
+<a href="html/libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a><br />
+<a href="html/libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a><br />
+</p><h2>Letter u:</h2><p><a href="html/libxml-encoding.html#uconv_t">uconv_t</a><br />
+<a href="html/libxml-SAX.html#unparsedEntityDecl">unparsedEntityDecl</a><br />
+<a href="html/libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a><br />
+</p><h2>Letter v:</h2><p><a href="html/libxml-xpathInternals.html#valuePop">valuePop</a><br />
+<a href="html/libxml-xpathInternals.html#valuePush">valuePush</a><br />
+</p><h2>Letter w:</h2><p><a href="html/libxml-parser.html#warningSAXFunc">warningSAXFunc</a><br />
+</p><h2>Letter x:</h2><p><a href="html/libxml-xlink.html#xlinkActuate">xlinkActuate</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkHRef">xlinkHRef</a><br />
+<a href="html/libxml-xlink.html#xlinkHandler">xlinkHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a><br />
+<a href="html/libxml-xlink.html#xlinkIsLink">xlinkIsLink</a><br />
+<a href="html/libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a><br />
+<a href="html/libxml-xlink.html#xlinkRole">xlinkRole</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a><br />
+<a href="html/libxml-xlink.html#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a><br />
+<a href="html/libxml-xlink.html#xlinkShow">xlinkShow</a><br />
+<a href="html/libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a><br />
+<a href="html/libxml-xlink.html#xlinkTitle">xlinkTitle</a><br />
+<a href="html/libxml-xlink.html#xlinkType">xlinkType</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogAdd">xmlACatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogDump">xmlACatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogRemove">xmlACatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolve">xmlACatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlACatalogResolveURI">xmlACatalogResolveURI</a><br />
+<a href="html/libxml-valid.html#xmlAddAttributeDecl">xmlAddAttributeDecl</a><br />
+<a href="html/libxml-tree.html#xmlAddChild">xmlAddChild</a><br />
+<a href="html/libxml-tree.html#xmlAddChildList">xmlAddChildList</a><br />
+<a href="html/libxml-entities.html#xmlAddDocEntity">xmlAddDocEntity</a><br />
+<a href="html/libxml-entities.html#xmlAddDtdEntity">xmlAddDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlAddElementDecl">xmlAddElementDecl</a><br />
+<a href="html/libxml-encoding.html#xmlAddEncodingAlias">xmlAddEncodingAlias</a><br />
+<a href="html/libxml-valid.html#xmlAddID">xmlAddID</a><br />
+<a href="html/libxml-tree.html#xmlAddNextSibling">xmlAddNextSibling</a><br />
+<a href="html/libxml-valid.html#xmlAddNotationDecl">xmlAddNotationDecl</a><br />
+<a href="html/libxml-tree.html#xmlAddPrevSibling">xmlAddPrevSibling</a><br />
+<a href="html/libxml-valid.html#xmlAddRef">xmlAddRef</a><br />
+<a href="html/libxml-tree.html#xmlAddSibling">xmlAddSibling</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
+<a href="html/libxml-tree.html#xmlAttr">xmlAttr</a><br />
+<a href="html/libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a><br />
+<a href="html/libxml-tree.html#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a><br />
+<a href="html/libxml-tree.html#xmlAttribute">xmlAttribute</a><br />
+<a href="html/libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a><br />
+<a href="html/libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a><br />
+<a href="html/libxml-valid.html#xmlAttributeTable">xmlAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a><br />
+<a href="html/libxml-tree.html#xmlAttributeType">xmlAttributeType</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomata">xmlAutomata</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataCompile">xmlAutomataCompile</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataGetInitState">xmlAutomataGetInitState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounter">xmlAutomataNewCounter</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewState">xmlAutomataNewState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition">xmlAutomataNewTransition</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataState">xmlAutomataState</a><br />
+<a href="html/libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a><br />
+<a href="html/libxml-debugXML.html#xmlBoolToText">xmlBoolToText</a><br />
+<a href="html/libxml-tree.html#xmlBuf">xmlBuf</a><br />
+<a href="html/libxml-tree.html#xmlBufContent">xmlBufContent</a><br />
+<a href="html/libxml-tree.html#xmlBufEnd">xmlBufEnd</a><br />
+<a href="html/libxml-tree.html#xmlBufGetNodeContent">xmlBufGetNodeContent</a><br />
+<a href="html/libxml-tree.html#xmlBufNodeDump">xmlBufNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlBufPtr">xmlBufPtr</a><br />
+<a href="html/libxml-tree.html#xmlBufShrink">xmlBufShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufUse">xmlBufUse</a><br />
+<a href="html/libxml-tree.html#xmlBuffer">xmlBuffer</a><br />
+<a href="html/libxml-tree.html#xmlBufferAdd">xmlBufferAdd</a><br />
+<a href="html/libxml-tree.html#xmlBufferAddHead">xmlBufferAddHead</a><br />
+<a href="html/libxml-globals.html#xmlBufferAllocScheme">xmlBufferAllocScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferCCat">xmlBufferCCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferCat">xmlBufferCat</a><br />
+<a href="html/libxml-tree.html#xmlBufferContent">xmlBufferContent</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateSize">xmlBufferCreateSize</a><br />
+<a href="html/libxml-tree.html#xmlBufferCreateStatic">xmlBufferCreateStatic</a><br />
+<a href="html/libxml-tree.html#xmlBufferDetach">xmlBufferDetach</a><br />
+<a href="html/libxml-tree.html#xmlBufferDump">xmlBufferDump</a><br />
+<a href="html/libxml-tree.html#xmlBufferEmpty">xmlBufferEmpty</a><br />
+<a href="html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a><br />
+<a href="html/libxml-tree.html#xmlBufferGrow">xmlBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlBufferLength">xmlBufferLength</a><br />
+<a href="html/libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a><br />
+<a href="html/libxml-tree.html#xmlBufferResize">xmlBufferResize</a><br />
+<a href="html/libxml-tree.html#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlBufferShrink">xmlBufferShrink</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteChar">xmlBufferWriteChar</a><br />
+<a href="html/libxml-tree.html#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a><br />
+<a href="html/libxml-tree.html#xmlBuildQName">xmlBuildQName</a><br />
+<a href="html/libxml-uri.html#xmlBuildRelativeURI">xmlBuildRelativeURI</a><br />
+<a href="html/libxml-uri.html#xmlBuildURI">xmlBuildURI</a><br />
+<a href="html/libxml-parser.html#xmlByteConsumed">xmlByteConsumed</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSave">xmlC14NDocSave</a><br />
+<a href="html/libxml-c14n.html#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a><br />
+<a href="html/libxml-c14n.html#xmlC14NExecute">xmlC14NExecute</a><br />
+<a href="html/libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a><br />
+<a href="html/libxml-c14n.html#xmlC14NMode">xmlC14NMode</a><br />
+<a href="html/libxml-uri.html#xmlCanonicPath">xmlCanonicPath</a><br />
+<a href="html/libxml-catalog.html#xmlCatalog">xmlCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAdd">xmlCatalogAdd</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAddLocal">xmlCatalogAddLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogCleanup">xmlCatalogCleanup</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogConvert">xmlCatalogConvert</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogDump">xmlCatalogDump</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetPublic">xmlCatalogGetPublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogGetSystem">xmlCatalogGetSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogRemove">xmlCatalogRemove</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolve">xmlCatalogResolve</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogResolveURI">xmlCatalogResolveURI</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDebug">xmlCatalogSetDebug</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a><br />
+<a href="html/libxml-catalog.html#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a><br />
+<a href="html/libxml-chvalid.html#xmlChLRange">xmlChLRange</a><br />
+<a href="html/libxml-chvalid.html#xmlChLRangePtr">xmlChLRangePtr</a><br />
+<a href="html/libxml-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlChRangeGroupPtr">xmlChRangeGroupPtr</a><br />
+<a href="html/libxml-chvalid.html#xmlChSRange">xmlChSRange</a><br />
+<a href="html/libxml-chvalid.html#xmlChSRangePtr">xmlChSRangePtr</a><br />
+<a href="html/libxml-xmlstring.html#xmlChar">xmlChar</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncFirstLine">xmlCharEncFirstLine</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncInFunc">xmlCharEncInFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncOutFunc">xmlCharEncOutFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a><br />
+<a href="html/libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a><br />
+<a href="html/libxml-chvalid.html#xmlCharInRange">xmlCharInRange</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrdup">xmlCharStrdup</a><br />
+<a href="html/libxml-xmlstring.html#xmlCharStrndup">xmlCharStrndup</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckFilename">xmlCheckFilename</a><br />
+<a href="html/libxml-xmlIO.html#xmlCheckHTTPInput">xmlCheckHTTPInput</a><br />
+<a href="html/libxml-parserInternals.html#xmlCheckLanguageID">xmlCheckLanguageID</a><br />
+<a href="html/libxml-xmlstring.html#xmlCheckUTF8">xmlCheckUTF8</a><br />
+<a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
+<a href="html/libxml-tree.html#xmlChildElementCount">xmlChildElementCount</a><br />
+<a href="html/libxml-tree.html#xmlChildrenNode">xmlChildrenNode</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a><br />
+<a href="html/libxml-encoding.html#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a><br />
+<a href="html/libxml-globals.html#xmlCleanupGlobals">xmlCleanupGlobals</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlCleanupMemory">xmlCleanupMemory</a><br />
+<a href="html/libxml-xmlIO.html#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a><br />
+<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
+<a href="html/libxml-entities.html#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a><br />
+<a href="html/libxml-threads.html#xmlCleanupThreads">xmlCleanupThreads</a><br />
+<a href="html/libxml-parser.html#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlClearParserCtxt">xmlClearParserCtxt</a><br />
+<a href="html/libxml-catalog.html#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a><br />
+<a href="html/libxml-valid.html#xmlCopyAttributeTable">xmlCopyAttributeTable</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyChar">xmlCopyChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a><br />
+<a href="html/libxml-tree.html#xmlCopyDoc">xmlCopyDoc</a><br />
+<a href="html/libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlCopyDtd">xmlCopyDtd</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementContent">xmlCopyElementContent</a><br />
+<a href="html/libxml-valid.html#xmlCopyElementTable">xmlCopyElementTable</a><br />
+<a href="html/libxml-entities.html#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlCopyEnumeration">xmlCopyEnumeration</a><br />
+<a href="html/libxml-xmlerror.html#xmlCopyError">xmlCopyError</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
+<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
+<a href="html/libxml-tree.html#xmlCopyNode">xmlCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlCopyNodeList">xmlCopyNodeList</a><br />
+<a href="html/libxml-valid.html#xmlCopyNotationTable">xmlCopyNotationTable</a><br />
+<a href="html/libxml-tree.html#xmlCopyProp">xmlCopyProp</a><br />
+<a href="html/libxml-tree.html#xmlCopyPropList">xmlCopyPropList</a><br />
+<a href="html/libxml-parser.html#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a><br />
+<a href="html/libxml-entities.html#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a><br />
+<a href="html/libxml-valid.html#xmlCreateEnumeration">xmlCreateEnumeration</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a><br />
+<a href="html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a><br />
+<a href="html/libxml-uri.html#xmlCreateURI">xmlCreateURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtGetLastError">xmlCtxtGetLastError</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadDoc">xmlCtxtReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFd">xmlCtxtReadFd</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadIO">xmlCtxtReadIO</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReadMemory">xmlCtxtReadMemory</a><br />
+<a href="html/libxml-parser.html#xmlCtxtReset">xmlCtxtReset</a><br />
+<a href="html/libxml-xmlerror.html#xmlCtxtResetLastError">xmlCtxtResetLastError</a><br />
+<a href="html/libxml-parser.html#xmlCtxtResetPush">xmlCtxtResetPush</a><br />
+<a href="html/libxml-parser.html#xmlCtxtUseOptions">xmlCtxtUseOptions</a><br />
+<a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a><br />
+<a href="html/libxml-tree.html#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugCheckDocument">xmlDebugCheckDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttr">xmlDebugDumpAttr</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDTD">xmlDebugDumpDTD</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocument">xmlDebugDumpDocument</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpEntities">xmlDebugDumpEntities</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNode">xmlDebugDumpNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a><br />
+<a href="html/libxml-debugXML.html#xmlDebugDumpString">xmlDebugDumpString</a><br />
+<a href="html/libxml-parserInternals.html#xmlDecodeEntities">xmlDecodeEntities</a><br />
+<a href="html/libxml-globals.html#xmlDefaultBufferSize">xmlDefaultBufferSize</a><br />
+<a href="html/libxml-globals.html#xmlDefaultSAXHandler">xmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a><br />
+<a href="html/libxml-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a><br />
+<a href="html/libxml-encoding.html#xmlDelEncodingAlias">xmlDelEncodingAlias</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeDefaultValue">xmlDeregisterNodeDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a><br />
+<a href="html/libxml-encoding.html#xmlDetectCharEncoding">xmlDetectCharEncoding</a><br />
+<a href="html/libxml-dict.html#xmlDict">xmlDict</a><br />
+<a href="html/libxml-dict.html#xmlDictCleanup">xmlDictCleanup</a><br />
+<a href="html/libxml-dict.html#xmlDictCreate">xmlDictCreate</a><br />
+<a href="html/libxml-dict.html#xmlDictCreateSub">xmlDictCreateSub</a><br />
+<a href="html/libxml-dict.html#xmlDictExists">xmlDictExists</a><br />
+<a href="html/libxml-dict.html#xmlDictFree">xmlDictFree</a><br />
+<a href="html/libxml-dict.html#xmlDictGetUsage">xmlDictGetUsage</a><br />
+<a href="html/libxml-dict.html#xmlDictLookup">xmlDictLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictOwns">xmlDictOwns</a><br />
+<a href="html/libxml-dict.html#xmlDictPtr">xmlDictPtr</a><br />
+<a href="html/libxml-dict.html#xmlDictQLookup">xmlDictQLookup</a><br />
+<a href="html/libxml-dict.html#xmlDictReference">xmlDictReference</a><br />
+<a href="html/libxml-dict.html#xmlDictSetLimit">xmlDictSetLimit</a><br />
+<a href="html/libxml-dict.html#xmlDictSize">xmlDictSize</a><br />
+<a href="html/libxml-threads.html#xmlDllMain">xmlDllMain</a><br />
+<a href="html/libxml-globals.html#xmlDoValidityCheckingDefaultValue">xmlDoValidityCheckingDefaultValue</a><br />
+<a href="html/libxml-tree.html#xmlDoc">xmlDoc</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNode">xmlDocCopyNode</a><br />
+<a href="html/libxml-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a><br />
+<a href="html/libxml-tree.html#xmlDocDump">xmlDocDump</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemory">xmlDocDumpMemory</a><br />
+<a href="html/libxml-tree.html#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a><br />
+<a href="html/libxml-tree.html#xmlDocFormatDump">xmlDocFormatDump</a><br />
+<a href="html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDocProperties">xmlDocProperties</a><br />
+<a href="html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a><br />
+<a href="html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a><br />
+<a href="html/libxml-tree.html#xmlDtd">xmlDtd</a><br />
+<a href="html/libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpAttributeTable">xmlDumpAttributeTable</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementDecl">xmlDumpElementDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpElementTable">xmlDumpElementTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlDumpEntityDecl">xmlDumpEntityDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationDecl">xmlDumpNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlDumpNotationTable">xmlDumpNotationTable</a><br />
+<a href="html/libxml-tree.html#xmlElemDump">xmlElemDump</a><br />
+<a href="html/libxml-tree.html#xmlElement">xmlElement</a><br />
+<a href="html/libxml-tree.html#xmlElementContent">xmlElementContent</a><br />
+<a href="html/libxml-tree.html#xmlElementContentOccur">xmlElementContentOccur</a><br />
+<a href="html/libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a><br />
+<a href="html/libxml-tree.html#xmlElementContentType">xmlElementContentType</a><br />
+<a href="html/libxml-tree.html#xmlElementPtr">xmlElementPtr</a><br />
+<a href="html/libxml-valid.html#xmlElementTable">xmlElementTable</a><br />
+<a href="html/libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a><br />
+<a href="html/libxml-tree.html#xmlElementType">xmlElementType</a><br />
+<a href="html/libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntities">xmlEncodeEntities</a><br />
+<a href="html/libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a><br />
+<a href="html/libxml-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a><br />
+<a href="html/libxml-entities.html#xmlEntitiesTable">xmlEntitiesTable</a><br />
+<a href="html/libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a><br />
+<a href="html/libxml-tree.html#xmlEntity">xmlEntity</a><br />
+<a href="html/libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a><br />
+<a href="html/libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a><br />
+<a href="html/libxml-entities.html#xmlEntityType">xmlEntityType</a><br />
+<a href="html/libxml-tree.html#xmlEnumeration">xmlEnumeration</a><br />
+<a href="html/libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a><br />
+<a href="html/libxml-parserInternals.html#xmlErrMemory">xmlErrMemory</a><br />
+<a href="html/libxml-xmlerror.html#xmlError">xmlError</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorDomain">xmlErrorDomain</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorLevel">xmlErrorLevel</a><br />
+<a href="html/libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxt">xmlExpCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpDump">xmlExpDump</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpExpDerive">xmlExpExpDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFree">xmlExpFree</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpFreeCtxt">xmlExpFreeCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetLanguage">xmlExpGetLanguage</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpGetStart">xmlExpGetStart</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpIsNillable">xmlExpIsNillable</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpMaxToken">xmlExpMaxToken</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewAtom">xmlExpNewAtom</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewCtxt">xmlExpNewCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewOr">xmlExpNewOr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewRange">xmlExpNewRange</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNewSeq">xmlExpNewSeq</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNode">xmlExpNode</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpNodeType">xmlExpNodeType</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpParse">xmlExpParse</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpRef">xmlExpRef</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpStringDerive">xmlExpStringDerive</a><br />
+<a href="html/libxml-xmlregexp.html#xmlExpSubsume">xmlExpSubsume</a><br />
+<a href="html/libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlFeature">xmlFeature</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileClose">xmlFileClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileMatch">xmlFileMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileOpen">xmlFileOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlFileRead">xmlFileRead</a><br />
+<a href="html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a><br />
+<a href="html/libxml-tree.html#xmlFirstElementChild">xmlFirstElementChild</a><br />
+<a href="html/libxml-globals.html#xmlFree">xmlFree</a><br />
+<a href="html/libxml-valid.html#xmlFreeAttributeTable">xmlFreeAttributeTable</a><br />
+<a href="html/libxml-xmlautomata.html#xmlFreeAutomata">xmlFreeAutomata</a><br />
+<a href="html/libxml-catalog.html#xmlFreeCatalog">xmlFreeCatalog</a><br />
+<a href="html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a><br />
+<a href="html/libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlFreeDtd">xmlFreeDtd</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementContent">xmlFreeElementContent</a><br />
+<a href="html/libxml-valid.html#xmlFreeElementTable">xmlFreeElementTable</a><br />
+<a href="html/libxml-entities.html#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a><br />
+<a href="html/libxml-valid.html#xmlFreeEnumeration">xmlFreeEnumeration</a><br />
+<a href="html/libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a><br />
+<a href="html/libxml-valid.html#xmlFreeIDTable">xmlFreeIDTable</a><br />
+<a href="html/libxml-parserInternals.html#xmlFreeInputStream">xmlFreeInputStream</a><br />
+<a href="html/libxml-threads.html#xmlFreeMutex">xmlFreeMutex</a><br />
+<a href="html/libxml-tree.html#xmlFreeNode">xmlFreeNode</a><br />
+<a href="html/libxml-tree.html#xmlFreeNodeList">xmlFreeNodeList</a><br />
+<a href="html/libxml-valid.html#xmlFreeNotationTable">xmlFreeNotationTable</a><br />
+<a href="html/libxml-tree.html#xmlFreeNs">xmlFreeNs</a><br />
+<a href="html/libxml-tree.html#xmlFreeNsList">xmlFreeNsList</a><br />
+<a href="html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a><br />
+<a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
+<a href="html/libxml-pattern.html#xmlFreePattern">xmlFreePattern</a><br />
+<a href="html/libxml-pattern.html#xmlFreePatternList">xmlFreePatternList</a><br />
+<a href="html/libxml-tree.html#xmlFreeProp">xmlFreeProp</a><br />
+<a href="html/libxml-tree.html#xmlFreePropList">xmlFreePropList</a><br />
+<a href="html/libxml-threads.html#xmlFreeRMutex">xmlFreeRMutex</a><br />
+<a href="html/libxml-valid.html#xmlFreeRefTable">xmlFreeRefTable</a><br />
+<a href="html/libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a><br />
+<a href="html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a><br />
+<a href="html/libxml-uri.html#xmlFreeURI">xmlFreeURI</a><br />
+<a href="html/libxml-valid.html#xmlFreeValidCtxt">xmlFreeValidCtxt</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemGet">xmlGcMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlGcMemSetup">xmlGcMemSetup</a><br />
+<a href="html/libxml-globals.html#xmlGenericError">xmlGenericError</a><br />
+<a href="html/libxml-globals.html#xmlGenericErrorContext">xmlGenericErrorContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a><br />
+<a href="html/libxml-tree.html#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a><br />
+<a href="html/libxml-encoding.html#xmlGetCharEncodingName">xmlGetCharEncodingName</a><br />
+<a href="html/libxml-tree.html#xmlGetCompressMode">xmlGetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a><br />
+<a href="html/libxml-entities.html#xmlGetDocEntity">xmlGetDocEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a><br />
+<a href="html/libxml-entities.html#xmlGetDtdEntity">xmlGetDtdEntity</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a><br />
+<a href="html/libxml-valid.html#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a><br />
+<a href="html/libxml-encoding.html#xmlGetEncodingAlias">xmlGetEncodingAlias</a><br />
+<a href="html/libxml-parser.html#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlGetFeature">xmlGetFeature</a><br />
+<a href="html/libxml-parser.html#xmlGetFeaturesList">xmlGetFeaturesList</a><br />
+<a href="html/libxml-threads.html#xmlGetGlobalState">xmlGetGlobalState</a><br />
+<a href="html/libxml-valid.html#xmlGetID">xmlGetID</a><br />
+<a href="html/libxml-tree.html#xmlGetIntSubset">xmlGetIntSubset</a><br />
+<a href="html/libxml-tree.html#xmlGetLastChild">xmlGetLastChild</a><br />
+<a href="html/libxml-xmlerror.html#xmlGetLastError">xmlGetLastError</a><br />
+<a href="html/libxml-tree.html#xmlGetLineNo">xmlGetLineNo</a><br />
+<a href="html/libxml-tree.html#xmlGetNoNsProp">xmlGetNoNsProp</a><br />
+<a href="html/libxml-tree.html#xmlGetNodePath">xmlGetNodePath</a><br />
+<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
+<a href="html/libxml-tree.html#xmlGetNsProp">xmlGetNsProp</a><br />
+<a href="html/libxml-entities.html#xmlGetParameterEntity">xmlGetParameterEntity</a><br />
+<a href="html/libxml-entities.html#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a><br />
+<a href="html/libxml-tree.html#xmlGetProp">xmlGetProp</a><br />
+<a href="html/libxml-valid.html#xmlGetRefs">xmlGetRefs</a><br />
+<a href="html/libxml-threads.html#xmlGetThreadId">xmlGetThreadId</a><br />
+<a href="html/libxml-xmlstring.html#xmlGetUTF8Char">xmlGetUTF8Char</a><br />
+<a href="html/libxml-globals.html#xmlGetWarningsDefaultValue">xmlGetWarningsDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlGlobalState">xmlGlobalState</a><br />
+<a href="html/libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a><br />
+<a href="html/libxml-parserInternals.html#xmlHandleEntity">xmlHandleEntity</a><br />
+<a href="html/libxml-parser.html#xmlHasFeature">xmlHasFeature</a><br />
+<a href="html/libxml-tree.html#xmlHasNsProp">xmlHasNsProp</a><br />
+<a href="html/libxml-tree.html#xmlHasProp">xmlHasProp</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry">xmlHashAddEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry2">xmlHashAddEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashAddEntry3">xmlHashAddEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashCopier">xmlHashCopier</a><br />
+<a href="html/libxml-hash.html#xmlHashCopy">xmlHashCopy</a><br />
+<a href="html/libxml-hash.html#xmlHashCreate">xmlHashCreate</a><br />
+<a href="html/libxml-hash.html#xmlHashCreateDict">xmlHashCreateDict</a><br />
+<a href="html/libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a><br />
+<a href="html/libxml-hash.html#xmlHashFree">xmlHashFree</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup">xmlHashLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup2">xmlHashLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashLookup3">xmlHashLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup">xmlHashQLookup</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup2">xmlHashQLookup2</a><br />
+<a href="html/libxml-hash.html#xmlHashQLookup3">xmlHashQLookup3</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry">xmlHashRemoveEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a><br />
+<a href="html/libxml-hash.html#xmlHashScan">xmlHashScan</a><br />
+<a href="html/libxml-hash.html#xmlHashScan3">xmlHashScan3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull">xmlHashScanFull</a><br />
+<a href="html/libxml-hash.html#xmlHashScanFull3">xmlHashScanFull3</a><br />
+<a href="html/libxml-hash.html#xmlHashScanner">xmlHashScanner</a><br />
+<a href="html/libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a><br />
+<a href="html/libxml-hash.html#xmlHashSize">xmlHashSize</a><br />
+<a href="html/libxml-hash.html#xmlHashTable">xmlHashTable</a><br />
+<a href="html/libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry">xmlHashUpdateEntry</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a><br />
+<a href="html/libxml-hash.html#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a><br />
+<a href="html/libxml-tree.html#xmlID">xmlID</a><br />
+<a href="html/libxml-tree.html#xmlIDPtr">xmlIDPtr</a><br />
+<a href="html/libxml-valid.html#xmlIDTable">xmlIDTable</a><br />
+<a href="html/libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPClose">xmlIOFTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPMatch">xmlIOFTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPOpen">xmlIOFTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOFTPRead">xmlIOFTPRead</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPClose">xmlIOHTTPClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPMatch">xmlIOHTTPMatch</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpen">xmlIOHTTPOpen</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a><br />
+<a href="html/libxml-xmlIO.html#xmlIOHTTPRead">xmlIOHTTPRead</a><br />
+<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
+<a href="html/libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a><br />
+<a href="html/libxml-encoding.html#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a><br />
+<a href="html/libxml-globals.html#xmlInitGlobals">xmlInitGlobals</a><br />
+<a href="html/libxml-xmlmemory.html#xmlInitMemory">xmlInitMemory</a><br />
+<a href="html/libxml-parser.html#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlInitParser">xmlInitParser</a><br />
+<a href="html/libxml-parser.html#xmlInitParserCtxt">xmlInitParserCtxt</a><br />
+<a href="html/libxml-threads.html#xmlInitThreads">xmlInitThreads</a><br />
+<a href="html/libxml-catalog.html#xmlInitializeCatalog">xmlInitializeCatalog</a><br />
+<a href="html/libxml-dict.html#xmlInitializeDict">xmlInitializeDict</a><br />
+<a href="html/libxml-globals.html#xmlInitializeGlobalState">xmlInitializeGlobalState</a><br />
+<a href="html/libxml-entities.html#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar">xmlIsBaseChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseCharGroup">xmlIsBaseCharGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank">xmlIsBlank</a><br />
+<a href="html/libxml-tree.html#xmlIsBlankNode">xmlIsBlankNode</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar">xmlIsChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharGroup">xmlIsCharGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombining">xmlIsCombining</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningGroup">xmlIsCombiningGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit">xmlIsDigit</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitGroup">xmlIsDigitGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender">xmlIsExtender</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderGroup">xmlIsExtenderGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a><br />
+<a href="html/libxml-valid.html#xmlIsID">xmlIsID</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographic">xmlIsIdeographic</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicGroup">xmlIsIdeographicGroup</a><br />
+<a href="html/libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a><br />
+<a href="html/libxml-parserInternals.html#xmlIsLetter">xmlIsLetter</a><br />
+<a href="html/libxml-threads.html#xmlIsMainThread">xmlIsMainThread</a><br />
+<a href="html/libxml-valid.html#xmlIsMixedElement">xmlIsMixedElement</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar">xmlIsPubidChar</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a><br />
+<a href="html/libxml-chvalid.html#xmlIsPubidChar_tab">xmlIsPubidChar_tab</a><br />
+<a href="html/libxml-valid.html#xmlIsRef">xmlIsRef</a><br />
+<a href="html/libxml-tree.html#xmlIsXHTML">xmlIsXHTML</a><br />
+<a href="html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a><br />
+<a href="html/libxml-globals.html#xmlKeepBlanksDefaultValue">xmlKeepBlanksDefaultValue</a><br />
+<a href="html/libxml-tree.html#xmlLastElementChild">xmlLastElementChild</a><br />
+<a href="html/libxml-globals.html#xmlLastError">xmlLastError</a><br />
+<a href="html/libxml-parser.html#xmlLineNumbersDefault">xmlLineNumbersDefault</a><br />
+<a href="html/libxml-globals.html#xmlLineNumbersDefaultValue">xmlLineNumbersDefaultValue</a><br />
+<a href="html/libxml-list.html#xmlLink">xmlLink</a><br />
+<a href="html/libxml-list.html#xmlLinkGetData">xmlLinkGetData</a><br />
+<a href="html/libxml-list.html#xmlLinkPtr">xmlLinkPtr</a><br />
+<a href="html/libxml-list.html#xmlList">xmlList</a><br />
+<a href="html/libxml-list.html#xmlListAppend">xmlListAppend</a><br />
+<a href="html/libxml-list.html#xmlListClear">xmlListClear</a><br />
+<a href="html/libxml-list.html#xmlListCopy">xmlListCopy</a><br />
+<a href="html/libxml-list.html#xmlListCreate">xmlListCreate</a><br />
+<a href="html/libxml-list.html#xmlListDataCompare">xmlListDataCompare</a><br />
+<a href="html/libxml-list.html#xmlListDeallocator">xmlListDeallocator</a><br />
+<a href="html/libxml-list.html#xmlListDelete">xmlListDelete</a><br />
+<a href="html/libxml-list.html#xmlListDup">xmlListDup</a><br />
+<a href="html/libxml-list.html#xmlListEmpty">xmlListEmpty</a><br />
+<a href="html/libxml-list.html#xmlListEnd">xmlListEnd</a><br />
+<a href="html/libxml-list.html#xmlListFront">xmlListFront</a><br />
+<a href="html/libxml-list.html#xmlListInsert">xmlListInsert</a><br />
+<a href="html/libxml-list.html#xmlListMerge">xmlListMerge</a><br />
+<a href="html/libxml-list.html#xmlListPopBack">xmlListPopBack</a><br />
+<a href="html/libxml-list.html#xmlListPopFront">xmlListPopFront</a><br />
+<a href="html/libxml-list.html#xmlListPtr">xmlListPtr</a><br />
+<a href="html/libxml-list.html#xmlListPushBack">xmlListPushBack</a><br />
+<a href="html/libxml-list.html#xmlListPushFront">xmlListPushFront</a><br />
+<a href="html/libxml-list.html#xmlListRemoveAll">xmlListRemoveAll</a><br />
+<a href="html/libxml-list.html#xmlListRemoveFirst">xmlListRemoveFirst</a><br />
+<a href="html/libxml-list.html#xmlListRemoveLast">xmlListRemoveLast</a><br />
+<a href="html/libxml-list.html#xmlListReverse">xmlListReverse</a><br />
+<a href="html/libxml-list.html#xmlListReverseSearch">xmlListReverseSearch</a><br />
+<a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
+<a href="html/libxml-list.html#xmlListSearch">xmlListSearch</a><br />
+<a href="html/libxml-list.html#xmlListSize">xmlListSize</a><br />
+<a href="html/libxml-list.html#xmlListSort">xmlListSort</a><br />
+<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
+<a href="html/libxml-list.html#xmlListWalker">xmlListWalker</a><br />
+<a href="html/libxml-catalog.html#xmlLoadACatalog">xmlLoadACatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalog">xmlLoadCatalog</a><br />
+<a href="html/libxml-catalog.html#xmlLoadCatalogs">xmlLoadCatalogs</a><br />
+<a href="html/libxml-globals.html#xmlLoadExtDtdDefaultValue">xmlLoadExtDtdDefaultValue</a><br />
+<a href="html/libxml-parser.html#xmlLoadExternalEntity">xmlLoadExternalEntity</a><br />
+<a href="html/libxml-catalog.html#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a><br />
+<a href="html/libxml-xpointer.html#xmlLocationSet">xmlLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a><br />
+<a href="html/libxml-threads.html#xmlLockLibrary">xmlLockLibrary</a><br />
+<a href="html/libxml-debugXML.html#xmlLsCountNode">xmlLsCountNode</a><br />
+<a href="html/libxml-debugXML.html#xmlLsOneNode">xmlLsOneNode</a><br />
+<a href="html/libxml-globals.html#xmlMalloc">xmlMalloc</a><br />
+<a href="html/libxml-globals.html#xmlMallocAtomic">xmlMallocAtomic</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMallocLoc">xmlMallocLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemBlocks">xmlMemBlocks</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplay">xmlMemDisplay</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemDisplayLast">xmlMemDisplayLast</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemFree">xmlMemFree</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemGet">xmlMemGet</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemMalloc">xmlMemMalloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemRealloc">xmlMemRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemSetup">xmlMemSetup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemShow">xmlMemShow</a><br />
+<a href="html/libxml-globals.html#xmlMemStrdup">xmlMemStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemStrdupLoc">xmlMemStrdupLoc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemUsed">xmlMemUsed</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a><br />
+<a href="html/libxml-xmlmemory.html#xmlMemoryStrdup">xmlMemoryStrdup</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModule">xmlModule</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleClose">xmlModuleClose</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleFree">xmlModuleFree</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOpen">xmlModuleOpen</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleOption">xmlModuleOption</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a><br />
+<a href="html/libxml-xmlmodule.html#xmlModuleSymbol">xmlModuleSymbol</a><br />
+<a href="html/libxml-threads.html#xmlMutex">xmlMutex</a><br />
+<a href="html/libxml-threads.html#xmlMutexLock">xmlMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a><br />
+<a href="html/libxml-threads.html#xmlMutexUnlock">xmlMutexUnlock</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
+<a href="html/libxml-parserInternals.html#xmlNamespaceParseQName">xmlNamespaceParseQName</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPClose">xmlNanoFTPClose</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnect">xmlNanoFTPConnect</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPCwd">xmlNanoFTPCwd</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPDele">xmlNanoFTPDele</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPInit">xmlNanoFTPInit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPOpen">xmlNanoFTPOpen</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPProxy">xmlNanoFTPProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPQuit">xmlNanoFTPQuit</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPRead">xmlNanoFTPRead</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a><br />
+<a href="html/libxml-nanoftp.html#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPInit">xmlNanoHTTPInit</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRead">xmlNanoHTTPRead</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
+<a href="html/libxml-nanohttp.html#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a><br />
+<a href="html/libxml-xmlautomata.html#xmlNewAutomata">xmlNewAutomata</a><br />
+<a href="html/libxml-tree.html#xmlNewCDataBlock">xmlNewCDataBlock</a><br />
+<a href="html/libxml-catalog.html#xmlNewCatalog">xmlNewCatalog</a><br />
+<a href="html/libxml-encoding.html#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a><br />
+<a href="html/libxml-tree.html#xmlNewCharRef">xmlNewCharRef</a><br />
+<a href="html/libxml-tree.html#xmlNewChild">xmlNewChild</a><br />
+<a href="html/libxml-tree.html#xmlNewComment">xmlNewComment</a><br />
+<a href="html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a><br />
+<a href="html/libxml-tree.html#xmlNewDocComment">xmlNewDocComment</a><br />
+<a href="html/libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a><br />
+<a href="html/libxml-tree.html#xmlNewDocFragment">xmlNewDocFragment</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewDocPI">xmlNewDocPI</a><br />
+<a href="html/libxml-tree.html#xmlNewDocProp">xmlNewDocProp</a><br />
+<a href="html/libxml-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a><br />
+<a href="html/libxml-tree.html#xmlNewDocText">xmlNewDocText</a><br />
+<a href="html/libxml-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a><br />
+<a href="html/libxml-tree.html#xmlNewDtd">xmlNewDtd</a><br />
+<a href="html/libxml-valid.html#xmlNewElementContent">xmlNewElementContent</a><br />
+<a href="html/libxml-entities.html#xmlNewEntity">xmlNewEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewEntityInputStream">xmlNewEntityInputStream</a><br />
+<a href="html/libxml-tree.html#xmlNewGlobalNs">xmlNewGlobalNs</a><br />
+<a href="html/libxml-parser.html#xmlNewIOInputStream">xmlNewIOInputStream</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputFromFile">xmlNewInputFromFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewInputStream">xmlNewInputStream</a><br />
+<a href="html/libxml-threads.html#xmlNewMutex">xmlNewMutex</a><br />
+<a href="html/libxml-tree.html#xmlNewNode">xmlNewNode</a><br />
+<a href="html/libxml-tree.html#xmlNewNodeEatName">xmlNewNodeEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewNs">xmlNewNs</a><br />
+<a href="html/libxml-tree.html#xmlNewNsProp">xmlNewNsProp</a><br />
+<a href="html/libxml-tree.html#xmlNewNsPropEatName">xmlNewNsPropEatName</a><br />
+<a href="html/libxml-tree.html#xmlNewPI">xmlNewPI</a><br />
+<a href="html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlNewProp">xmlNewProp</a><br />
+<a href="html/libxml-threads.html#xmlNewRMutex">xmlNewRMutex</a><br />
+<a href="html/libxml-tree.html#xmlNewReference">xmlNewReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlNewStringInputStream">xmlNewStringInputStream</a><br />
+<a href="html/libxml-tree.html#xmlNewText">xmlNewText</a><br />
+<a href="html/libxml-tree.html#xmlNewTextChild">xmlNewTextChild</a><br />
+<a href="html/libxml-tree.html#xmlNewTextLen">xmlNewTextLen</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReader">xmlNewTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a><br />
+<a href="html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a><br />
+<a href="html/libxml-valid.html#xmlNewValidCtxt">xmlNewValidCtxt</a><br />
+<a href="html/libxml-parserInternals.html#xmlNextChar">xmlNextChar</a><br />
+<a href="html/libxml-tree.html#xmlNextElementSibling">xmlNextElementSibling</a><br />
+<a href="html/libxml-xmlIO.html#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a><br />
+<a href="html/libxml-tree.html#xmlNode">xmlNode</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContent">xmlNodeAddContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeAddContentLen">xmlNodeAddContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeBufGetContent">xmlNodeBufGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeDump">xmlNodeDump</a><br />
+<a href="html/libxml-tree.html#xmlNodeDumpOutput">xmlNodeDumpOutput</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetBase">xmlNodeGetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetContent">xmlNodeGetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetLang">xmlNodeGetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a><br />
+<a href="html/libxml-tree.html#xmlNodeIsText">xmlNodeIsText</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a><br />
+<a href="html/libxml-tree.html#xmlNodeListGetString">xmlNodeListGetString</a><br />
+<a href="html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a><br />
+<a href="html/libxml-xpath.html#xmlNodeSet">xmlNodeSet</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetBase">xmlNodeSetBase</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetLang">xmlNodeSetLang</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetName">xmlNodeSetName</a><br />
+<a href="html/libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a><br />
+<a href="html/libxml-tree.html#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a><br />
+<a href="html/libxml-uri.html#xmlNormalizeURIPath">xmlNormalizeURIPath</a><br />
+<a href="html/libxml-xmlIO.html#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a><br />
+<a href="html/libxml-tree.html#xmlNotation">xmlNotation</a><br />
+<a href="html/libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a><br />
+<a href="html/libxml-valid.html#xmlNotationTable">xmlNotationTable</a><br />
+<a href="html/libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a><br />
+<a href="html/libxml-tree.html#xmlNs">xmlNs</a><br />
+<a href="html/libxml-tree.html#xmlNsPtr">xmlNsPtr</a><br />
+<a href="html/libxml-tree.html#xmlNsType">xmlNsType</a><br />
+<a href="html/libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferClose">xmlOutputBufferClose</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlOutputBufferCreateFilenameValue">xmlOutputBufferCreateFilenameValue</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferFlush">xmlOutputBufferFlush</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a><br />
+<a href="html/libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWrite">xmlOutputBufferWrite</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a><br />
+<a href="html/libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttValue">xmlParseAttValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttribute">xmlParseAttribute</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseAttributeType">xmlParseAttributeType</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
+<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCDSect">xmlParseCDSect</a><br />
+<a href="html/libxml-catalog.html#xmlParseCatalogFile">xmlParseCatalogFile</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharData">xmlParseCharData</a><br />
+<a href="html/libxml-encoding.html#xmlParseCharEncoding">xmlParseCharEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseCharRef">xmlParseCharRef</a><br />
+<a href="html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseComment">xmlParseComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseContent">xmlParseContent</a><br />
+<a href="html/libxml-parser.html#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a><br />
+<a href="html/libxml-parser.html#xmlParseDTD">xmlParseDTD</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDefaultDecl">xmlParseDefaultDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseDoc">xmlParseDoc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseDocument">xmlParseDocument</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElement">xmlParseElement</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncName">xmlParseEncName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEncodingDecl">xmlParseEncodingDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEndTag">xmlParseEndTag</a><br />
+<a href="html/libxml-parser.html#xmlParseEntity">xmlParseEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityDecl">xmlParseEntityDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityRef">xmlParseEntityRef</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEntityValue">xmlParseEntityValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumeratedType">xmlParseEnumeratedType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseEnumerationType">xmlParseEnumerationType</a><br />
+<a href="html/libxml-parser.html#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a><br />
+<a href="html/libxml-parser.html#xmlParseExternalEntity">xmlParseExternalEntity</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseExternalSubset">xmlParseExternalSubset</a><br />
+<a href="html/libxml-parser.html#xmlParseFile">xmlParseFile</a><br />
+<a href="html/libxml-parser.html#xmlParseInNodeContext">xmlParseInNodeContext</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMarkupDecl">xmlParseMarkupDecl</a><br />
+<a href="html/libxml-parser.html#xmlParseMemory">xmlParseMemory</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseMisc">xmlParseMisc</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseName">xmlParseName</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNamespace">xmlParseNamespace</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNmtoken">xmlParseNmtoken</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationDecl">xmlParseNotationDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseNotationType">xmlParseNotationType</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePI">xmlParsePI</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePITarget">xmlParsePITarget</a><br />
+<a href="html/libxml-parserInternals.html#xmlParsePubidLiteral">xmlParsePubidLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseQuotedString">xmlParseQuotedString</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSDDecl">xmlParseSDDecl</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseStartTag">xmlParseStartTag</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseSystemLiteral">xmlParseSystemLiteral</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseTextDecl">xmlParseTextDecl</a><br />
+<a href="html/libxml-uri.html#xmlParseURI">xmlParseURI</a><br />
+<a href="html/libxml-uri.html#xmlParseURIRaw">xmlParseURIRaw</a><br />
+<a href="html/libxml-uri.html#xmlParseURIReference">xmlParseURIReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionInfo">xmlParseVersionInfo</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseVersionNum">xmlParseVersionNum</a><br />
+<a href="html/libxml-parserInternals.html#xmlParseXMLDecl">xmlParseXMLDecl</a><br />
+<a href="html/libxml-parser.html#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a><br />
+<a href="html/libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a><br />
+<a href="html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a><br />
+<a href="html/libxml-globals.html#xmlParserDebugEntities">xmlParserDebugEntities</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserError">xmlParserError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserGetDirectory">xmlParserGetDirectory</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a><br />
+<a href="html/libxml-tree.html#xmlParserInput">xmlParserInput</a><br />
+<a href="html/libxml-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a><br />
+<a href="html/libxml-globals.html#xmlParserInputBufferCreateFilenameValue">xmlParserInputBufferCreateFilenameValue</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a><br />
+<a href="html/libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferPush">xmlParserInputBufferPush</a><br />
+<a href="html/libxml-xmlIO.html#xmlParserInputBufferRead">xmlParserInputBufferRead</a><br />
+<a href="html/libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a><br />
+<a href="html/libxml-parser.html#xmlParserInputGrow">xmlParserInputGrow</a><br />
+<a href="html/libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a><br />
+<a href="html/libxml-parser.html#xmlParserInputRead">xmlParserInputRead</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserInputShrink">xmlParserInputShrink</a><br />
+<a href="html/libxml-parser.html#xmlParserInputState">xmlParserInputState</a><br />
+<a href="html/libxml-parserInternals.html#xmlParserMaxDepth">xmlParserMaxDepth</a><br />
+<a href="html/libxml-parser.html#xmlParserMode">xmlParserMode</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a><br />
+<a href="html/libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a><br />
+<a href="html/libxml-parser.html#xmlParserOption">xmlParserOption</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileContext">xmlParserPrintFileContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a><br />
+<a href="html/libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a><br />
+<a href="html/libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityError">xmlParserValidityError</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserValidityWarning">xmlParserValidityWarning</a><br />
+<a href="html/libxml-globals.html#xmlParserVersion">xmlParserVersion</a><br />
+<a href="html/libxml-xmlerror.html#xmlParserWarning">xmlParserWarning</a><br />
+<a href="html/libxml-uri.html#xmlPathToURI">xmlPathToURI</a><br />
+<a href="html/libxml-pattern.html#xmlPattern">xmlPattern</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFlags">xmlPatternFlags</a><br />
+<a href="html/libxml-pattern.html#xmlPatternFromRoot">xmlPatternFromRoot</a><br />
+<a href="html/libxml-pattern.html#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMatch">xmlPatternMatch</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMaxDepth">xmlPatternMaxDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternMinDepth">xmlPatternMinDepth</a><br />
+<a href="html/libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a><br />
+<a href="html/libxml-pattern.html#xmlPatternStreamable">xmlPatternStreamable</a><br />
+<a href="html/libxml-pattern.html#xmlPatterncompile">xmlPatterncompile</a><br />
+<a href="html/libxml-parser.html#xmlPedanticParserDefault">xmlPedanticParserDefault</a><br />
+<a href="html/libxml-globals.html#xmlPedanticParserDefaultValue">xmlPedanticParserDefaultValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlPopInput">xmlPopInput</a><br />
+<a href="html/libxml-xmlIO.html#xmlPopInputCallbacks">xmlPopInputCallbacks</a><br />
+<a href="html/libxml-tree.html#xmlPreviousElementSibling">xmlPreviousElementSibling</a><br />
+<a href="html/libxml-uri.html#xmlPrintURI">xmlPrintURI</a><br />
+<a href="html/libxml-parserInternals.html#xmlPushInput">xmlPushInput</a><br />
+<a href="html/libxml-threads.html#xmlRMutex">xmlRMutex</a><br />
+<a href="html/libxml-threads.html#xmlRMutexLock">xmlRMutexLock</a><br />
+<a href="html/libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a><br />
+<a href="html/libxml-threads.html#xmlRMutexUnlock">xmlRMutexUnlock</a><br />
+<a href="html/libxml-parser.html#xmlReadDoc">xmlReadDoc</a><br />
+<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
+<a href="html/libxml-parser.html#xmlReadFile">xmlReadFile</a><br />
+<a href="html/libxml-parser.html#xmlReadIO">xmlReadIO</a><br />
+<a href="html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForDoc">xmlReaderForDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForIO">xmlReaderForIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderForMemory">xmlReaderForMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewDoc">xmlReaderNewDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewIO">xmlReaderNewIO</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewMemory">xmlReaderNewMemory</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderNewWalker">xmlReaderNewWalker</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderTypes">xmlReaderTypes</a><br />
+<a href="html/libxml-xmlreader.html#xmlReaderWalker">xmlReaderWalker</a><br />
+<a href="html/libxml-globals.html#xmlRealloc">xmlRealloc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a><br />
+<a href="html/libxml-xmlmemory.html#xmlReallocLoc">xmlReallocLoc</a><br />
+<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
+<a href="html/libxml-parser.html#xmlRecoverDoc">xmlRecoverDoc</a><br />
+<a href="html/libxml-parser.html#xmlRecoverFile">xmlRecoverFile</a><br />
+<a href="html/libxml-parser.html#xmlRecoverMemory">xmlRecoverMemory</a><br />
+<a href="html/libxml-tree.html#xmlRef">xmlRef</a><br />
+<a href="html/libxml-tree.html#xmlRefPtr">xmlRefPtr</a><br />
+<a href="html/libxml-valid.html#xmlRefTable">xmlRefTable</a><br />
+<a href="html/libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCtxt">xmlRegExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecErrInfo">xmlRegExecErrInfo</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecNextValues">xmlRegExecNextValues</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString">xmlRegExecPushString</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegExecPushString2">xmlRegExecPushString2</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegFreeRegexp">xmlRegFreeRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexp">xmlRegexp</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpCompile">xmlRegexpCompile</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpExec">xmlRegexpExec</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
+<a href="html/libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a><br />
+<a href="html/libxml-encoding.html#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeDefaultValue">xmlRegisterNodeDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a><br />
+<a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNG">xmlRelaxNG</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDump">xmlRelaxNGDump</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFree">xmlRelaxNGFree</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParse">xmlRelaxNGParse</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a><br />
+<a href="html/libxml-relaxng.html#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a><br />
+<a href="html/libxml-valid.html#xmlRemoveID">xmlRemoveID</a><br />
+<a href="html/libxml-tree.html#xmlRemoveProp">xmlRemoveProp</a><br />
+<a href="html/libxml-valid.html#xmlRemoveRef">xmlRemoveRef</a><br />
+<a href="html/libxml-tree.html#xmlReplaceNode">xmlReplaceNode</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetError">xmlResetError</a><br />
+<a href="html/libxml-xmlerror.html#xmlResetLastError">xmlResetLastError</a><br />
+<a href="html/libxml-tree.html#xmlRootNode">xmlRootNode</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndDocument">xmlSAX2EndDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElement">xmlSAX2EndElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetEntity">xmlSAX2GetEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartDocument">xmlSAX2StartDocument</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElement">xmlSAX2StartElement</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a><br />
+<a href="html/libxml-SAX2.html#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a><br />
+<a href="html/libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a><br />
+<a href="html/libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a><br />
+<a href="html/libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a><br />
+<a href="html/libxml-parser.html#xmlSAXHandlerV1Ptr">xmlSAXHandlerV1Ptr</a><br />
+<a href="html/libxml-tree.html#xmlSAXLocator">xmlSAXLocator</a><br />
+<a href="html/libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDTD">xmlSAXParseDTD</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseDoc">xmlSAXParseDoc</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseEntity">xmlSAXParseEntity</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFile">xmlSAXParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemory">xmlSAXParseMemory</a><br />
+<a href="html/libxml-parser.html#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
+<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
+<a href="html/libxml-SAX2.html#xmlSAXVersion">xmlSAXVersion</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveDoc">xmlSaveDoc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFile">xmlSaveFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveFlush">xmlSaveFlush</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a><br />
+<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
+<a href="html/libxml-globals.html#xmlSaveNoEmptyTags">xmlSaveNoEmptyTags</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveOption">xmlSaveOption</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveSetEscape">xmlSaveSetEscape</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToBuffer">xmlSaveToBuffer</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFd">xmlSaveToFd</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToFilename">xmlSaveToFilename</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveToIO">xmlSaveToIO</a><br />
+<a href="html/libxml-xmlsave.html#xmlSaveTree">xmlSaveTree</a><br />
+<a href="html/libxml-uri.html#xmlSaveUri">xmlSaveUri</a><br />
+<a href="html/libxml-parserInternals.html#xmlScanName">xmlScanName</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchema">xmlSchema</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttribute">xmlSchemaAttribute</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCollapseString">xmlSchemaCollapseString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValues">xmlSchemaCompareValues</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaCopyValue">xmlSchemaCopyValue</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaDump">xmlSchemaDump</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaElementPtr">xmlSchemaElementPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacet">xmlSchemaFacet</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetLink">xmlSchemaFacetLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFree">xmlSchemaFree</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeType">xmlSchemaFreeType</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaFreeValue">xmlSchemaFreeValue</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaGetValType">xmlSchemaGetValType</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaInitTypes">xmlSchemaInitTypes</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaIsValid">xmlSchemaIsValid</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewFacet">xmlSchemaNewFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaNotationPtr">xmlSchemaNotationPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParse">xmlSchemaParse</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaType">xmlSchemaType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaVal">xmlSchemaVal</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidError">xmlSchemaValidError</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateFile">xmlSchemaValidateFile</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidateStream">xmlSchemaValidateStream</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a><br />
+<a href="html/libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueAppend">xmlSchemaValueAppend</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a><br />
+<a href="html/libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a><br />
+<a href="html/libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematron">xmlSchematron</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFree">xmlSchematronFree</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParse">xmlSchematronParse</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidOptions">xmlSchematronValidOptions</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a><br />
+<a href="html/libxml-schematron.html#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a><br />
+<a href="html/libxml-tree.html#xmlSearchNs">xmlSearchNs</a><br />
+<a href="html/libxml-tree.html#xmlSearchNsByHref">xmlSearchNsByHref</a><br />
+<a href="html/libxml-tree.html#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a><br />
+<a href="html/libxml-tree.html#xmlSetCompressMode">xmlSetCompressMode</a><br />
+<a href="html/libxml-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a><br />
+<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
+<a href="html/libxml-parser.html#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a><br />
+<a href="html/libxml-parser.html#xmlSetFeature">xmlSetFeature</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a><br />
+<a href="html/libxml-tree.html#xmlSetListDoc">xmlSetListDoc</a><br />
+<a href="html/libxml-tree.html#xmlSetNs">xmlSetNs</a><br />
+<a href="html/libxml-tree.html#xmlSetNsProp">xmlSetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlSetProp">xmlSetProp</a><br />
+<a href="html/libxml-xmlerror.html#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a><br />
+<a href="html/libxml-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a><br />
+<a href="html/libxml-parser.html#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a><br />
+<a href="html/libxml-debugXML.html#xmlShell">xmlShell</a><br />
+<a href="html/libxml-debugXML.html#xmlShellBase">xmlShellBase</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCat">xmlShellCat</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCmd">xmlShellCmd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCtxt">xmlShellCtxt</a><br />
+<a href="html/libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDir">xmlShellDir</a><br />
+<a href="html/libxml-debugXML.html#xmlShellDu">xmlShellDu</a><br />
+<a href="html/libxml-debugXML.html#xmlShellList">xmlShellList</a><br />
+<a href="html/libxml-debugXML.html#xmlShellLoad">xmlShellLoad</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintNode">xmlShellPrintNode</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathError">xmlShellPrintXPathError</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a><br />
+<a href="html/libxml-debugXML.html#xmlShellPwd">xmlShellPwd</a><br />
+<a href="html/libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a><br />
+<a href="html/libxml-debugXML.html#xmlShellSave">xmlShellSave</a><br />
+<a href="html/libxml-debugXML.html#xmlShellValidate">xmlShellValidate</a><br />
+<a href="html/libxml-debugXML.html#xmlShellWrite">xmlShellWrite</a><br />
+<a href="html/libxml-parserInternals.html#xmlSkipBlankChars">xmlSkipBlankChars</a><br />
+<a href="html/libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a><br />
+<a href="html/libxml-parserInternals.html#xmlSplitQName">xmlSplitQName</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName2">xmlSplitQName2</a><br />
+<a href="html/libxml-tree.html#xmlSplitQName3">xmlSplitQName3</a><br />
+<a href="html/libxml-valid.html#xmlSprintfElementContent">xmlSprintfElementContent</a><br />
+<a href="html/libxml-parser.html#xmlStopParser">xmlStopParser</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrEqual">xmlStrEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrPrintf">xmlStrPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrQEqual">xmlStrQEqual</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrVPrintf">xmlStrVPrintf</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasecmp">xmlStrcasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcasestr">xmlStrcasestr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcat">xmlStrcat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrcmp">xmlStrcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a><br />
+<a href="html/libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a><br />
+<a href="html/libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a><br />
+<a href="html/libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPop">xmlStreamPop</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPush">xmlStreamPush</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushAttr">xmlStreamPushAttr</a><br />
+<a href="html/libxml-pattern.html#xmlStreamPushNode">xmlStreamPushNode</a><br />
+<a href="html/libxml-pattern.html#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringComment">xmlStringComment</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringCurrentChar">xmlStringCurrentChar</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a><br />
+<a href="html/libxml-tree.html#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringText">xmlStringText</a><br />
+<a href="html/libxml-parserInternals.html#xmlStringTextNoenc">xmlStringTextNoenc</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncasecmp">xmlStrncasecmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncat">xmlStrncat</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncatNew">xmlStrncatNew</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrndup">xmlStrndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrstr">xmlStrstr</a><br />
+<a href="html/libxml-xmlstring.html#xmlStrsub">xmlStrsub</a><br />
+<a href="html/libxml-globals.html#xmlStructuredError">xmlStructuredError</a><br />
+<a href="html/libxml-globals.html#xmlStructuredErrorContext">xmlStructuredErrorContext</a><br />
+<a href="html/libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a><br />
+<a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
+<a href="html/libxml-globals.html#xmlSubstituteEntitiesDefaultValue">xmlSubstituteEntitiesDefaultValue</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchEncoding">xmlSwitchEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a><br />
+<a href="html/libxml-parserInternals.html#xmlSwitchToEncoding">xmlSwitchToEncoding</a><br />
+<a href="html/libxml-tree.html#xmlTextConcat">xmlTextConcat</a><br />
+<a href="html/libxml-tree.html#xmlTextMerge">xmlTextMerge</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReader">xmlTextReader</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderClose">xmlTextReaderClose</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstString">xmlTextReaderConstString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderExpand">xmlTextReaderExpand</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocalName">xmlTextReaderLocalName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMode">xmlTextReaderMode</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderName">xmlTextReaderName</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNext">xmlTextReaderNext</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPrefix">xmlTextReaderPrefix</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreserve">xmlTextReaderPreserve</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadState">xmlTextReaderReadState</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderReadString">xmlTextReaderReadString</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderSetup">xmlTextReaderSetup</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderStandalone">xmlTextReaderStandalone</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderValue">xmlTextReaderValue</a><br />
+<a href="html/libxml-xmlreader.html#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriter">xmlTextWriter</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndComment">xmlTextWriterEndComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterEndPI">xmlTextWriterEndPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFlush">xmlTextWriterFlush</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartComment">xmlTextWriterStartComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterStartPI">xmlTextWriterStartPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteString">xmlTextWriterWriteString</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a><br />
+<a href="html/libxml-xmlwriter.html#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a><br />
+<a href="html/libxml-globals.html#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDefaultBufferSize">xmlThrDefDefaultBufferSize</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefDoValidityCheckingDefaultValue">xmlThrDefDoValidityCheckingDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefGetWarningsDefaultValue">xmlThrDefGetWarningsDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefIndentTreeOutput">xmlThrDefIndentTreeOutput</a><br />
+<a href="html/libxml-globals.html#xmlThrDefKeepBlanksDefaultValue">xmlThrDefKeepBlanksDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefLineNumbersDefaultValue">xmlThrDefLineNumbersDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefLoadExtDtdDefaultValue">xmlThrDefLoadExtDtdDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserDebugEntities">xmlThrDefParserDebugEntities</a><br />
+<a href="html/libxml-globals.html#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefPedanticParserDefaultValue">xmlThrDefPedanticParserDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSaveNoEmptyTags">xmlThrDefSaveNoEmptyTags</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a><br />
+<a href="html/libxml-globals.html#xmlThrDefSubstituteEntitiesDefaultValue">xmlThrDefSubstituteEntitiesDefaultValue</a><br />
+<a href="html/libxml-globals.html#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a><br />
+<a href="html/libxml-globals.html#xmlTreeIndentString">xmlTreeIndentString</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabic">xmlUCSIsArabic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsA">xmlUCSIsArabicPresentationFormsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArabicPresentationFormsB">xmlUCSIsArabicPresentationFormsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArmenian">xmlUCSIsArmenian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsArrows">xmlUCSIsArrows</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBasicLatin">xmlUCSIsBasicLatin</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBengali">xmlUCSIsBengali</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBlock">xmlUCSIsBlock</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBlockElements">xmlUCSIsBlockElements</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsBuhid">xmlUCSIsBuhid</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsByzantineMusicalSymbols">xmlUCSIsByzantineMusicalSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibility">xmlUCSIsCJKCompatibility</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityForms">xmlUCSIsCJKCompatibilityForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographs">xmlUCSIsCJKCompatibilityIdeographs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographsSupplement">xmlUCSIsCJKCompatibilityIdeographsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKRadicalsSupplement">xmlUCSIsCJKRadicalsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKSymbolsandPunctuation">xmlUCSIsCJKSymbolsandPunctuation</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographs">xmlUCSIsCJKUnifiedIdeographs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionA">xmlUCSIsCJKUnifiedIdeographsExtensionA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionB">xmlUCSIsCJKUnifiedIdeographsExtensionB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCat">xmlUCSIsCat</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatC">xmlUCSIsCatC</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCc">xmlUCSIsCatCc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCf">xmlUCSIsCatCf</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCo">xmlUCSIsCatCo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatCs">xmlUCSIsCatCs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatL">xmlUCSIsCatL</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLl">xmlUCSIsCatLl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLm">xmlUCSIsCatLm</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLo">xmlUCSIsCatLo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLt">xmlUCSIsCatLt</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatLu">xmlUCSIsCatLu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatM">xmlUCSIsCatM</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMc">xmlUCSIsCatMc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMe">xmlUCSIsCatMe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatMn">xmlUCSIsCatMn</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatN">xmlUCSIsCatN</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNd">xmlUCSIsCatNd</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNl">xmlUCSIsCatNl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatNo">xmlUCSIsCatNo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatP">xmlUCSIsCatP</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPc">xmlUCSIsCatPc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPd">xmlUCSIsCatPd</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPe">xmlUCSIsCatPe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPf">xmlUCSIsCatPf</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPi">xmlUCSIsCatPi</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPo">xmlUCSIsCatPo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatPs">xmlUCSIsCatPs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatS">xmlUCSIsCatS</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSc">xmlUCSIsCatSc</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSk">xmlUCSIsCatSk</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSm">xmlUCSIsCatSm</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatSo">xmlUCSIsCatSo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZ">xmlUCSIsCatZ</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZl">xmlUCSIsCatZl</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZp">xmlUCSIsCatZp</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCatZs">xmlUCSIsCatZs</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCherokee">xmlUCSIsCherokee</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarks">xmlUCSIsCombiningDiacriticalMarks</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarksforSymbols">xmlUCSIsCombiningDiacriticalMarksforSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningHalfMarks">xmlUCSIsCombiningHalfMarks</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCombiningMarksforSymbols">xmlUCSIsCombiningMarksforSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsControlPictures">xmlUCSIsControlPictures</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCurrencySymbols">xmlUCSIsCurrencySymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCypriotSyllabary">xmlUCSIsCypriotSyllabary</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillic">xmlUCSIsCyrillic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsCyrillicSupplement">xmlUCSIsCyrillicSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDeseret">xmlUCSIsDeseret</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsDingbats">xmlUCSIsDingbats</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedAlphanumerics">xmlUCSIsEnclosedAlphanumerics</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEnclosedCJKLettersandMonths">xmlUCSIsEnclosedCJKLettersandMonths</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsEthiopic">xmlUCSIsEthiopic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeneralPunctuation">xmlUCSIsGeneralPunctuation</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeometricShapes">xmlUCSIsGeometricShapes</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGeorgian">xmlUCSIsGeorgian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGothic">xmlUCSIsGothic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreek">xmlUCSIsGreek</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreekExtended">xmlUCSIsGreekExtended</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGreekandCoptic">xmlUCSIsGreekandCoptic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGujarati">xmlUCSIsGujarati</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsGurmukhi">xmlUCSIsGurmukhi</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHalfwidthandFullwidthForms">xmlUCSIsHalfwidthandFullwidthForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulCompatibilityJamo">xmlUCSIsHangulCompatibilityJamo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulJamo">xmlUCSIsHangulJamo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHangulSyllables">xmlUCSIsHangulSyllables</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHanunoo">xmlUCSIsHanunoo</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHebrew">xmlUCSIsHebrew</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHighPrivateUseSurrogates">xmlUCSIsHighPrivateUseSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsHiragana">xmlUCSIsHiragana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsIdeographicDescriptionCharacters">xmlUCSIsIdeographicDescriptionCharacters</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKanbun">xmlUCSIsKanbun</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKangxiRadicals">xmlUCSIsKangxiRadicals</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKannada">xmlUCSIsKannada</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKatakana">xmlUCSIsKatakana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKatakanaPhoneticExtensions">xmlUCSIsKatakanaPhoneticExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKhmer">xmlUCSIsKhmer</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsKhmerSymbols">xmlUCSIsKhmerSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLao">xmlUCSIsLao</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatin1Supplement">xmlUCSIsLatin1Supplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedA">xmlUCSIsLatinExtendedA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedAdditional">xmlUCSIsLatinExtendedAdditional</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLatinExtendedB">xmlUCSIsLatinExtendedB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLetterlikeSymbols">xmlUCSIsLetterlikeSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLimbu">xmlUCSIsLimbu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBIdeograms">xmlUCSIsLinearBIdeograms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLinearBSyllabary">xmlUCSIsLinearBSyllabary</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsLowSurrogates">xmlUCSIsLowSurrogates</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMalayalam">xmlUCSIsMalayalam</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalAlphanumericSymbols">xmlUCSIsMathematicalAlphanumericSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMathematicalOperators">xmlUCSIsMathematicalOperators</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsA">xmlUCSIsMiscellaneousMathematicalSymbolsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsB">xmlUCSIsMiscellaneousMathematicalSymbolsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbols">xmlUCSIsMiscellaneousSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousSymbolsandArrows">xmlUCSIsMiscellaneousSymbolsandArrows</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMiscellaneousTechnical">xmlUCSIsMiscellaneousTechnical</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMongolian">xmlUCSIsMongolian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMusicalSymbols">xmlUCSIsMusicalSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsMyanmar">xmlUCSIsMyanmar</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsNumberForms">xmlUCSIsNumberForms</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOgham">xmlUCSIsOgham</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOldItalic">xmlUCSIsOldItalic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOpticalCharacterRecognition">xmlUCSIsOpticalCharacterRecognition</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOriya">xmlUCSIsOriya</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUse">xmlUCSIsPrivateUse</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsPrivateUseArea">xmlUCSIsPrivateUseArea</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsRunic">xmlUCSIsRunic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsShavian">xmlUCSIsShavian</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSinhala">xmlUCSIsSinhala</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSmallFormVariants">xmlUCSIsSmallFormVariants</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSpacingModifierLetters">xmlUCSIsSpacingModifierLetters</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSpecials">xmlUCSIsSpecials</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSuperscriptsandSubscripts">xmlUCSIsSuperscriptsandSubscripts</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsA">xmlUCSIsSupplementalArrowsA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalArrowsB">xmlUCSIsSupplementalArrowsB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementalMathematicalOperators">xmlUCSIsSupplementalMathematicalOperators</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaA">xmlUCSIsSupplementaryPrivateUseAreaA</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaB">xmlUCSIsSupplementaryPrivateUseAreaB</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsSyriac">xmlUCSIsSyriac</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTagalog">xmlUCSIsTagalog</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTagbanwa">xmlUCSIsTagbanwa</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTags">xmlUCSIsTags</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTaiLe">xmlUCSIsTaiLe</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTaiXuanJingSymbols">xmlUCSIsTaiXuanJingSymbols</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTamil">xmlUCSIsTamil</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTelugu">xmlUCSIsTelugu</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsThaana">xmlUCSIsThaana</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsThai">xmlUCSIsThai</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsTibetan">xmlUCSIsTibetan</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsUgaritic">xmlUCSIsUgaritic</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsUnifiedCanadianAboriginalSyllabics">xmlUCSIsUnifiedCanadianAboriginalSyllabics</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectors">xmlUCSIsVariationSelectors</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsVariationSelectorsSupplement">xmlUCSIsVariationSelectorsSupplement</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYiRadicals">xmlUCSIsYiRadicals</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYiSyllables">xmlUCSIsYiSyllables</a><br />
+<a href="html/libxml-xmlunicode.html#xmlUCSIsYijingHexagramSymbols">xmlUCSIsYijingHexagramSymbols</a><br />
+<a href="html/libxml-uri.html#xmlURI">xmlURI</a><br />
+<a href="html/libxml-uri.html#xmlURIEscape">xmlURIEscape</a><br />
+<a href="html/libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a><br />
+<a href="html/libxml-uri.html#xmlURIPtr">xmlURIPtr</a><br />
+<a href="html/libxml-uri.html#xmlURIUnescapeString">xmlURIUnescapeString</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Charcmp">xmlUTF8Charcmp</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Size">xmlUTF8Size</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strlen">xmlUTF8Strlen</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strloc">xmlUTF8Strloc</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strndup">xmlUTF8Strndup</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strpos">xmlUTF8Strpos</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsize">xmlUTF8Strsize</a><br />
+<a href="html/libxml-xmlstring.html#xmlUTF8Strsub">xmlUTF8Strsub</a><br />
+<a href="html/libxml-tree.html#xmlUnlinkNode">xmlUnlinkNode</a><br />
+<a href="html/libxml-threads.html#xmlUnlockLibrary">xmlUnlockLibrary</a><br />
+<a href="html/libxml-tree.html#xmlUnsetNsProp">xmlUnsetNsProp</a><br />
+<a href="html/libxml-tree.html#xmlUnsetProp">xmlUnsetProp</a><br />
+<a href="html/libxml-valid.html#xmlValidBuildContentModel">xmlValidBuildContentModel</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a><br />
+<a href="html/libxml-valid.html#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a><br />
+<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
+<a href="html/libxml-valid.html#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidState">xmlValidState</a><br />
+<a href="html/libxml-valid.html#xmlValidStatePtr">xmlValidStatePtr</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateAttributeValue">xmlValidateAttributeValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocument">xmlValidateDocument</a><br />
+<a href="html/libxml-valid.html#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd</a><br />
+<a href="html/libxml-valid.html#xmlValidateDtdFinal">xmlValidateDtdFinal</a><br />
+<a href="html/libxml-valid.html#xmlValidateElement">xmlValidateElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateElementDecl">xmlValidateElementDecl</a><br />
+<a href="html/libxml-tree.html#xmlValidateNCName">xmlValidateNCName</a><br />
+<a href="html/libxml-tree.html#xmlValidateNMToken">xmlValidateNMToken</a><br />
+<a href="html/libxml-tree.html#xmlValidateName">xmlValidateName</a><br />
+<a href="html/libxml-valid.html#xmlValidateNameValue">xmlValidateNameValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNamesValue">xmlValidateNamesValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationDecl">xmlValidateNotationDecl</a><br />
+<a href="html/libxml-valid.html#xmlValidateNotationUse">xmlValidateNotationUse</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneAttribute">xmlValidateOneAttribute</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneElement">xmlValidateOneElement</a><br />
+<a href="html/libxml-valid.html#xmlValidateOneNamespace">xmlValidateOneNamespace</a><br />
+<a href="html/libxml-valid.html#xmlValidatePopElement">xmlValidatePopElement</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushCData">xmlValidatePushCData</a><br />
+<a href="html/libxml-valid.html#xmlValidatePushElement">xmlValidatePushElement</a><br />
+<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
+<a href="html/libxml-valid.html#xmlValidateRoot">xmlValidateRoot</a><br />
+<a href="html/libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a><br />
+<a href="html/libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeNewContext">xmlXIncludeNewContext</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a><br />
+<a href="html/libxml-xinclude.html#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathAddValues">xmlXPathAddValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxis">xmlXPathAxis</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToNumber">xmlXPathCastToNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCastToString">xmlXPathCastToString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCheckError">xmlXPathCheckError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCmpNodes">xmlXPathCmpNodes</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCompareValues">xmlXPathCompareValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompile">xmlXPathCompile</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEval">xmlXPathCompiledEval</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathConcatFunction">xmlXPathConcatFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathContainsFunction">xmlXPathContainsFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContext">xmlXPathContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathContextSetCache">xmlXPathContextSetCache</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertNumber">xmlXPathConvertNumber</a><br />
+<a href="html/libxml-xpath.html#xmlXPathConvertString">xmlXPathConvertString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathCountFunction">xmlXPathCountFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDifference">xmlXPathDifference</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinct">xmlXPathDistinct</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathDivValues">xmlXPathDivValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEqualValues">xmlXPathEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathErr">xmlXPathErr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathError">xmlXPathError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEval">xmlXPathEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvalExpr">xmlXPathEvalExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFalseFunction">xmlXPathFalseFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFloorFunction">xmlXPathFloorFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFuncPtr">xmlXPathFuncPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunct">xmlXPathFunct</a><br />
+<a href="html/libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetContextNode">xmlXPathGetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetDocument">xmlXPathGetDocument</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathGetError">xmlXPathGetError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIdFunction">xmlXPathIdFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathInit">xmlXPathInit</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIntersection">xmlXPathIntersection</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsInf">xmlXPathIsInf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathIsNaN">xmlXPathIsNaN</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathIsNodeType">xmlXPathIsNodeType</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLangFunction">xmlXPathLangFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLastFunction">xmlXPathLastFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeading">xmlXPathLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathModValues">xmlXPathModValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathMultValues">xmlXPathMultValues</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNAN">xmlXPathNAN</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNINF">xmlXPathNINF</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewBoolean">xmlXPathNewBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewCString">xmlXPathNewCString</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewFloat">xmlXPathNewFloat</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewParserContext">xmlXPathNewParserContext</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewString">xmlXPathNewString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNewValueTree">xmlXPathNewValueTree</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestor">xmlXPathNextAncestor</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextAttribute">xmlXPathNextAttribute</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextChild">xmlXPathNextChild</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendant">xmlXPathNextDescendant</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextNamespace">xmlXPathNextNamespace</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextParent">xmlXPathNextParent</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPreceding">xmlXPathNextPreceding</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNextSelf">xmlXPathNextSelf</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeEval">xmlXPathNodeEval</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeading">xmlXPathNodeLeading</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a><br />
+<a href="html/libxml-xpath.html#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNotFunction">xmlXPathNotFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNsLookup">xmlXPathNsLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathNumberFunction">xmlXPathNumberFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObject">xmlXPathObject</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectCopy">xmlXPathObjectCopy</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a><br />
+<a href="html/libxml-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a><br />
+<a href="html/libxml-xpath.html#xmlXPathPINF">xmlXPathPINF</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseNCName">xmlXPathParseNCName</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathParseName">xmlXPathParseName</a><br />
+<a href="html/libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a><br />
+<a href="html/libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopBoolean">xmlXPathPopBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopExternal">xmlXPathPopExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopNumber">xmlXPathPopNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPopString">xmlXPathPopString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathPositionFunction">xmlXPathPositionFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnExternal">xmlXPathReturnExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnFalse">xmlXPathReturnFalse</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnNumber">xmlXPathReturnNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnString">xmlXPathReturnString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathReturnTrue">xmlXPathReturnTrue</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathRoundFunction">xmlXPathRoundFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetArityError">xmlXPathSetArityError</a><br />
+<a href="html/libxml-xpath.html#xmlXPathSetContextNode">xmlXPathSetContextNode</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetError">xmlXPathSetError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSetTypeError">xmlXPathSetTypeError</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubValues">xmlXPathSubValues</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathSumFunction">xmlXPathSumFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailing">xmlXPathTrailing</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathTrueFunction">xmlXPathTrueFunction</a><br />
+<a href="html/libxml-xpath.html#xmlXPathType">xmlXPathType</a><br />
+<a href="html/libxml-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariable">xmlXPathVariable</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookup">xmlXPathVariableLookup</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a><br />
+<a href="html/libxml-xpath.html#xmlXPathVariablePtr">xmlXPathVariablePtr</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapCString">xmlXPathWrapCString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapExternal">xmlXPathWrapExternal</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPathWrapString">xmlXPathWrapString</a><br />
+<a href="html/libxml-xpathInternals.html#xmlXPatherror">xmlXPatherror</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEval">xmlXPtrEval</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewContext">xmlXPtrNewContext</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRange">xmlXPtrNewRange</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a><br />
+<a href="html/libxml-xpointer.html#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a><br />
+</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/ChangeLog.xsl b/doc/ChangeLog.xsl
new file mode 100644
index 0000000..7073ba2
--- /dev/null
+++ b/doc/ChangeLog.xsl
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!-- this stylesheet builds the ChangeLog.html -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <!-- Import the rest of the site stylesheets -->
+ <xsl:import href="site.xsl"/>
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <xsl:param name="module">libxml2</xsl:param>
+
+ <!-- The table of content for the HTML page -->
+ <xsl:variable name="menu_name">API Menu</xsl:variable>
+ <xsl:variable name="develtoc">
+ <form action="../search.php"
+ enctype="application/x-www-form-urlencoded" method="get">
+ <input name="query" type="text" size="20" value=""/>
+ <input name="submit" type="submit" value="Search ..."/>
+ </form>
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a style="font-weight:bold"
+ href="{$href_base}index.html">Main Menu</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}docs.html">Developer Menu</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}html/index.html">Modules Index</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}examples/index.html">Code Examples</a></li>
+ <li><a style="font-weight:bold"
+ href="index.html">API Menu</a></li>
+ <li><a href="html/libxml-parser.html">Parser API</a></li>
+ <li><a href="html/libxml-tree.html">Tree API</a></li>
+ <li><a href="html/libxml-xmlreader.html">Reader API</a></li>
+ <li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
+ </ul>
+ </xsl:variable>
+
+ <xsl:template match="bug">
+ <a href="http://bugzilla.gnome.org/show_bug.cgi?id={@number}">
+ <xsl:value-of select="@number"/></a>
+ </xsl:template>
+
+ <xsl:template match="item">
+ <li><xsl:apply-templates/></li>
+ </xsl:template>
+
+ <xsl:template match="entry">
+
+ <p>
+ <b><xsl:value-of select="@who"/></b>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@date"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@timezone"/>
+ <ul>
+ <xsl:apply-templates select="item"/>
+ </ul>
+ </p>
+ </xsl:template>
+
+ <xsl:template match="log">
+ <xsl:variable name="title">ChangeLog last entries of <xsl:value-of select="$module"/></xsl:variable>
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates select="entry"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/DOM.gif b/doc/DOM.gif
new file mode 100644
index 0000000..a44882f
--- /dev/null
+++ b/doc/DOM.gif
Binary files differ
diff --git a/doc/DOM.html b/doc/DOM.html
new file mode 100644
index 0000000..5b2517c
--- /dev/null
+++ b/doc/DOM.html
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>DOM Principles</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>DOM Principles</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/DOM/">DOM</a> stands for the <em>Document
+Object Model</em>; this is an API for accessing XML or HTML structured
+documents. Native support for DOM in Gnome is on the way (module gnome-dom),
+and will be based on gnome-xml. This will be a far cleaner interface to
+manipulate XML files within Gnome since it won't expose the internal
+structure.</p><p>The current DOM implementation on top of libxml2 is the <a href="http://svn.gnome.org/viewvc/gdome2/trunk/">gdome2 Gnome module</a>, this
+is a full DOM interface, thanks to Paolo Casarini, check the <a href="http://gdome2.cs.unibo.it/">Gdome2 homepage</a> for more
+information.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/FAQ.html b/doc/FAQ.html
new file mode 100644
index 0000000..3481c19
--- /dev/null
+++ b/doc/FAQ.html
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul>
+ <li><a href="FAQ.html#License">License(s)</a></li>
+ <li><a href="FAQ.html#Installati">Installation</a></li>
+ <li><a href="FAQ.html#Compilatio">Compilation</a></li>
+ <li><a href="FAQ.html#Developer">Developer corner</a></li>
+</ul><h3><a name="License" id="License">License</a>(s)</h3><ol>
+ <li><em>Licensing Terms for libxml</em>
+ <p>libxml2 is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a>; see the file Copyright in the distribution for the precise
+ wording</p>
+ </li>
+ <li><em>Can I embed libxml2 in a proprietary application ?</em>
+ <p>Yes. The MIT License allows you to keep proprietary the changes you
+ made to libxml, but it would be graceful to send-back bug fixes and
+ improvements as patches for possible incorporation in the main
+ development tree.</p>
+ </li>
+</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol>
+ <li><strong><span style="background-color: #FF0000">Do Not Use
+ libxml1</span></strong>, use libxml2</li>
+ <p></p>
+ <li><em>Where can I get libxml</em> ?
+ <p>The original distribution comes from <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p>
+ <p>Most Linux and BSD distributions include libxml, this is probably the
+ safer way for end-users to use libxml.</p>
+ <p>David Doolin provides precompiled Windows versions at <a href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p>
+ </li>
+ <p></p>
+ <li><em>I see libxml and libxml2 releases, which one should I install ?</em>
+ <ul>
+ <li>If you are not constrained by backward compatibility issues with
+ existing applications, install libxml2 only</li>
+ <li>If you are not doing development, you can safely install both.
+ Usually the packages <a href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are
+ compatible (this is not the case for development packages).</li>
+ <li>If you are a developer and your system provides separate packaging
+ for shared libraries and the development components, it is possible
+ to install libxml and libxml2, and also <a href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>
+ and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>
+ too for libxml2 &gt;= 2.3.0</li>
+ <li>If you are developing a new application, please develop against
+ libxml2(-devel)</li>
+ </ul>
+ </li>
+ <li><em>I can't install the libxml package, it conflicts with libxml0</em>
+ <p>You probably have an old libxml0 package used to provide the shared
+ library for libxml.so.0, you can probably safely remove it. The libxml
+ packages provided on <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> provide
+ libxml.so.0</p>
+ </li>
+ <li><em>I can't install the libxml(2) RPM package due to failed
+ dependencies</em>
+ <p>The most generic solution is to re-fetch the latest src.rpm , and
+ rebuild it locally with</p>
+ <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
+ <p>If everything goes well it will generate two binary rpm packages (one
+ providing the shared libs and xmllint, and the other one, the -devel
+ package, providing includes, static libraries and scripts needed to build
+ applications with libxml(2)) that you can install locally.</p>
+ </li>
+</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol>
+ <li><em>What is the process to compile libxml2 ?</em>
+ <p>As most UNIX libraries libxml2 follows the "standard":</p>
+ <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p>
+ <p><code>cd libxml-xxxx</code></p>
+ <p><code>./configure --help</code></p>
+ <p>to see the options, then the compilation/installation proper</p>
+ <p><code>./configure [possible options]</code></p>
+ <p><code>make</code></p>
+ <p><code>make install</code></p>
+ <p>At that point you may have to rerun ldconfig or a similar utility to
+ update your list of installed shared libs.</p>
+ </li>
+ <li><em>What other libraries are needed to compile/install libxml2 ?</em>
+ <p>Libxml2 does not require any other library, the normal C ANSI API
+ should be sufficient (please report any violation to this rule you may
+ find).</p>
+ <p>However if found at configuration time libxml2 will detect and use the
+ following libs:</p>
+ <ul>
+ <li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
+ highly portable and available widely compression library.</li>
+ <li>iconv: a powerful character encoding conversion library. It is
+ included by default in recent glibc libraries, so it doesn't need to
+ be installed specifically on Linux. It now seems a <a href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part
+ of the official UNIX</a> specification. Here is one <a href="http://www.gnu.org/software/libiconv/">implementation of the
+ library</a> which source can be found <a href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li>
+ </ul>
+ </li>
+ <p></p>
+ <li><em>Make check fails on some platforms</em>
+ <p>Sometimes the regression tests' results don't completely match the
+ value produced by the parser, and the makefile uses diff to print the
+ delta. On some platforms the diff return breaks the compilation process;
+ if the diff is small this is probably not a serious problem.</p>
+ <p>Sometimes (especially on Solaris) make checks fail due to limitations
+ in make. Try using GNU-make instead.</p>
+ </li>
+ <li><em>I use the SVN version and there is no configure script</em>
+ <p>The configure script (and other Makefiles) are generated. Use the
+ autogen.sh script to regenerate the configure script and Makefiles,
+ like:</p>
+ <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
+ </li>
+ <li><em>I have troubles when running make tests with gcc-3.0</em>
+ <p>It seems the initial release of gcc-3.0 has a problem with the
+ optimizer which miscompiles the URI module. Please use another
+ compiler.</p>
+ </li>
+</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol>
+ <li><em>Troubles compiling or linking programs using libxml2</em>
+ <p>Usually the problem comes from the fact that the compiler doesn't get
+ the right compilation or linking flags. There is a small shell script
+ <code>xml2-config</code> which is installed as part of libxml2 usual
+ install process which provides those flags. Use</p>
+ <p><code>xml2-config --cflags</code></p>
+ <p>to get the compilation flags and</p>
+ <p><code>xml2-config --libs</code></p>
+ <p>to get the linker flags. Usually this is done directly from the
+ Makefile as:</p>
+ <p><code>CFLAGS=`xml2-config --cflags`</code></p>
+ <p><code>LIBS=`xml2-config --libs`</code></p>
+ </li>
+ <li><em>I want to install my own copy of libxml2 in my home directory and
+ link my programs against it, but it doesn't work</em>
+ <p>There are many different ways to accomplish this. Here is one way to
+ do this under Linux. Suppose your home directory is <code>/home/user.
+ </code>Then:</p>
+ <ul>
+ <li>Create a subdirectory, let's call it <code>myxml</code></li>
+ <li>unpack the libxml2 distribution into that subdirectory</li>
+ <li>chdir into the unpacked distribution
+ (<code>/home/user/myxml/libxml2 </code>)</li>
+ <li>configure the library using the "<code>--prefix</code>" switch,
+ specifying an installation subdirectory in
+ <code>/home/user/myxml</code>, e.g.
+ <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
+ configuration options}</p>
+ </li>
+ <li>now run <code>make</code> followed by <code>make install</code></li>
+ <li>At this point, the installation subdirectory contains the complete
+ "private" include files, library files and binary program files (e.g.
+ xmllint), located in
+ <p><code>/home/user/myxml/xmlinst/lib,
+ /home/user/myxml/xmlinst/include </code> and <code>
+ /home/user/myxml/xmlinst/bin</code></p>
+ respectively.</li>
+ <li>In order to use this "private" library, you should first add it to
+ the beginning of your default PATH (so that your own private program
+ files such as xmllint will be used instead of the normal system
+ ones). To do this, the Bash command would be
+ <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p>
+ </li>
+ <li>Now suppose you have a program <code>test1.c</code> that you would
+ like to compile with your "private" library. Simply compile it using
+ the command
+ <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
+ Note that, because your PATH has been set with <code>
+ /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
+ program which you just installed will be used instead of the system
+ default one, and this will <em>automatically</em> get the correct
+ libraries linked with your program.</li>
+ </ul>
+ </li>
+
+ <p></p>
+ <li><em>xmlDocDump() generates output on one line.</em>
+ <p>Libxml2 will not <strong>invent</strong> spaces in the content of a
+ document since <strong>all spaces in the content of a document are
+ significant</strong>. If you build a tree from the API and want
+ indentation:</p>
+ <ol>
+ <li>the correct way is to generate those yourself too.</li>
+ <li>the dangerous way is to ask libxml2 to add those blanks to your
+ content <strong>modifying the content of your document in the
+ process</strong>. The result may not be what you expect. There is
+ <strong>NO</strong> way to guarantee that such a modification won't
+ affect other parts of the content of your document. See <a href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault
+ ()</a> and <a href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile
+ ()</a></li>
+ </ol>
+ </li>
+ <p></p>
+ <li><em>Extra nodes in the document:</em>
+ <p><em>For an XML file as below:</em></p>
+ <pre>&lt;?xml version="1.0"?&gt;
+&lt;PLAN xmlns="http://www.argus.ca/autotest/1.0/"&gt;
+&lt;NODE CommFlag="0"/&gt;
+&lt;NODE CommFlag="1"/&gt;
+&lt;/PLAN&gt;</pre>
+ <p><em>after parsing it with the function
+ pxmlDoc=xmlParseFile(...);</em></p>
+ <p><em>I want to the get the content of the first node (node with the
+ CommFlag="0")</em></p>
+ <p><em>so I did it as following;</em></p>
+ <pre>xmlNodePtr pnode;
+pnode=pxmlDoc-&gt;children-&gt;children;</pre>
+ <p><em>but it does not work. If I change it to</em></p>
+ <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
+ <p><em>then it works. Can someone explain it to me.</em></p>
+ <p></p>
+ <p>In XML all characters in the content of the document are significant
+ <strong>including blanks and formatting line breaks</strong>.</p>
+ <p>The extra nodes you are wondering about are just that, text nodes with
+ the formatting spaces which are part of the document but that people tend
+ to forget. There is a function <a href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
+ ()</a> to remove those at parse time, but that's an heuristic, and its
+ use should be limited to cases where you are certain there is no
+ mixed-content in the document.</p>
+ </li>
+ <li><em>I get compilation errors of existing code like when accessing
+ <strong>root</strong> or <strong>child fields</strong> of nodes.</em>
+ <p>You are compiling code developed for libxml version 1 and using a
+ libxml2 development environment. Either switch back to libxml v1 devel or
+ even better fix the code to compile with libxml2 (or both) by <a href="upgrade.html">following the instructions</a>.</p>
+ </li>
+ <li><em>I get compilation errors about non existing
+ <strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong>
+ fields.</em>
+ <p>The source code you are using has been <a href="upgrade.html">upgraded</a> to be able to compile with both libxml
+ and libxml2, but you need to install a more recent version:
+ libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
+ </li>
+ <li><em>Random crashes in threaded applications</em>
+ <p>Read and follow all advices on the <a href="threads.html">thread
+ safety</a> page, and make 100% sure you never call xmlCleanupParser()
+ while the library or an XML document might still be in use by another
+ thread.</p>
+ </li>
+ <li><em>The example provided in the web page does not compile.</em>
+ <p>It's hard to maintain the documentation in sync with the code
+ &lt;grin/&gt; ...</p>
+ <p>Check the previous points 1/ and 2/ raised before, and please send
+ patches.</p>
+ </li>
+ <li><em>Where can I get more examples and information than provided on the
+ web page?</em>
+ <p>Ideally a libxml2 book would be nice. I have no such plan ... But you
+ can:</p>
+ <ul>
+ <li>check more deeply the <a href="html/libxml-lib.html">existing
+ generated doc</a></li>
+ <li>have a look at <a href="examples/index.html">the set of
+ examples</a>.</li>
+ <li>look for examples of use for libxml2 function using the Gnome code
+ or by asking on Google.</li>
+ <li><a href="http://svn.gnome.org/viewvc/libxml2/trunk/">Browse
+ the libxml2 source</a> , I try to write code as clean and documented
+ as possible, so looking at it may be helpful. In particular the code
+ of <a href="http://svn.gnome.org/viewvc/libxml2/trunk/xmllint.c?view=markup">xmllint.c</a> and of the various testXXX.c test programs should
+ provide good examples of how to do things with the library.</li>
+ </ul>
+ </li>
+ <p></p>
+ <li><em>What about C++ ?</em>
+ <p>libxml2 is written in pure C in order to allow easy reuse on a number
+ of platforms, including embedded systems. I don't intend to convert to
+ C++.</p>
+ <p>There is however a C++ wrapper which may fulfill your needs:</p>
+ <ul>
+ <li>by Ari Johnson &lt;ari@btigate.com&gt;:
+ <p>Website: <a href="http://libxmlplusplus.sourceforge.net/">http://libxmlplusplus.sourceforge.net/</a></p>
+ <p>Download: <a href="http://sourceforge.net/project/showfiles.php?group_id=12999">http://sourceforge.net/project/showfiles.php?group_id=12999</a></p>
+ </li>
+ </ul>
+ </li>
+ <li><em>How to validate a document a posteriori ?</em>
+ <p>It is possible to validate documents which had not been validated at
+ initial parsing time or documents which have been built from scratch
+ using the API. Use the <a href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a>
+ function. It is also possible to simply add a DTD to an existing
+ document:</p>
+ <pre>xmlDocPtr doc; /* your existing document */
+xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
+
+ dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
+
+ doc-&gt;intSubset = dtd;
+ if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
+ else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd);
+ </pre>
+ </li>
+ <li><em>So what is this funky "xmlChar" used all the time?</em>
+ <p>It is a null terminated sequence of utf-8 characters. And only utf-8!
+ You need to convert strings encoded in different ways to utf-8 before
+ passing them to the API. This can be accomplished with the iconv library
+ for instance.</p>
+ </li>
+ <li>etc ...</li>
+</ol><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/Libxml2-Logo-180x168.gif b/doc/Libxml2-Logo-180x168.gif
new file mode 100644
index 0000000..ebded4f
--- /dev/null
+++ b/doc/Libxml2-Logo-180x168.gif
Binary files differ
diff --git a/doc/Libxml2-Logo-90x34.gif b/doc/Libxml2-Logo-90x34.gif
new file mode 100644
index 0000000..b96fff0
--- /dev/null
+++ b/doc/Libxml2-Logo-90x34.gif
Binary files differ
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..0cc0a50
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,351 @@
+## Process this file with automake to produce Makefile.in
+SUBDIRS = . devhelp examples
+
+# The top-level SGML file.
+DOC_MAIN_XML_FILE=gnome-xml.xml
+
+# The directory containing the source code (if it contains documentation).
+DOC_SOURCE_DIR=..
+
+# A file in win32 depends upon one of the doc files
+WIN32_DIR=$(top_srcdir)/win32
+
+PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
+ downloads.html entities.html example.html help.html index.html \
+ interface.html intro.html library.html namespaces.html news.html \
+ tree.html xmldtd.html XMLinfo.html XSLT.html
+APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
+ APIsymbols.html APIchunk0.html
+
+if REBUILD_DOCS
+EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \
+ $(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \
+ $(wildcard tutorial/images/*.png) \
+ $(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \
+ $(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \
+ $(wildcard *.gif) w3c.png $(wildcard html/*.html) \
+ $(wildcard html/*.png) libxml2-api.xml index.py search.php \
+ apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
+ README.docs symbols.xml
+endif
+
+# Expanded form of EXTRA_DIST_wc
+#
+EXTRA_DIST = \
+ APIchunk0.html \
+ APIchunk1.html \
+ APIchunk2.html \
+ APIchunk3.html \
+ APIchunk4.html \
+ APIchunk5.html \
+ APIchunk6.html \
+ APIchunk7.html \
+ APIchunk8.html \
+ APIchunk9.html \
+ APIchunk10.html \
+ APIchunk11.html \
+ APIchunk12.html \
+ APIchunk13.html \
+ APIchunk14.html \
+ APIchunk15.html \
+ APIchunk16.html \
+ APIchunk17.html \
+ APIchunk18.html \
+ APIchunk19.html \
+ APIchunk20.html \
+ APIchunk21.html \
+ APIchunk22.html \
+ APIchunk23.html \
+ APIchunk24.html \
+ APIchunk25.html \
+ APIchunk26.html \
+ APIchunk27.html \
+ APIchunk28.html \
+ APIchunk29.html \
+ APIconstructors.html \
+ APIfiles.html \
+ APIfunctions.html \
+ APIsymbols.html \
+ ChangeLog.xsl \
+ DOM.gif \
+ DOM.html \
+ FAQ.html \
+ Libxml2-Logo-180x168.gif \
+ Libxml2-Logo-90x34.gif \
+ README.docs \
+ XMLinfo.html \
+ XSLT.html \
+ api.xsl \
+ apibuild.py \
+ architecture.html \
+ bugs.html \
+ catalog.gif \
+ catalog.html \
+ checkapisym.xsl \
+ contribs.html \
+ docs.html \
+ downloads.html \
+ elfgcchack.xsl \
+ encoding.html \
+ entities.html \
+ example.html \
+ guidelines.html \
+ help.html \
+ html/book1.html \
+ html/home.png \
+ html/index.html \
+ html/left.png \
+ html/libxml-DOCBparser.html \
+ html/libxml-HTMLparser.html \
+ html/libxml-HTMLtree.html \
+ html/libxml-SAX.html \
+ html/libxml-SAX2.html \
+ html/libxml-c14n.html \
+ html/libxml-catalog.html \
+ html/libxml-chvalid.html \
+ html/libxml-debugXML.html \
+ html/libxml-dict.html \
+ html/libxml-encoding.html \
+ html/libxml-entities.html \
+ html/libxml-globals.html \
+ html/libxml-hash.html \
+ html/libxml-lib.html \
+ html/libxml-list.html \
+ html/libxml-nanoftp.html \
+ html/libxml-nanohttp.html \
+ html/libxml-parser.html \
+ html/libxml-parserInternals.html \
+ html/libxml-pattern.html \
+ html/libxml-relaxng.html \
+ html/libxml-schemasInternals.html \
+ html/libxml-schematron.html \
+ html/libxml-threads.html \
+ html/libxml-tree.html \
+ html/libxml-uri.html \
+ html/libxml-valid.html \
+ html/libxml-xinclude.html \
+ html/libxml-xlink.html \
+ html/libxml-xmlIO.html \
+ html/libxml-xmlautomata.html \
+ html/libxml-xmlerror.html \
+ html/libxml-xmlexports.html \
+ html/libxml-xmlmemory.html \
+ html/libxml-xmlmodule.html \
+ html/libxml-xmlreader.html \
+ html/libxml-xmlregexp.html \
+ html/libxml-xmlsave.html \
+ html/libxml-xmlschemas.html \
+ html/libxml-xmlschemastypes.html \
+ html/libxml-xmlstring.html \
+ html/libxml-xmlunicode.html \
+ html/libxml-xmlversion.html \
+ html/libxml-xmlwriter.html \
+ html/libxml-xpath.html \
+ html/libxml-xpathInternals.html \
+ html/libxml-xpointer.html \
+ html/libxml-xzlib.html \
+ html/right.png \
+ html/up.png \
+ index.html \
+ index.py \
+ interface.html \
+ intro.html \
+ library.html \
+ libxml.gif \
+ libxml2-api.xml \
+ libxml2.xsa \
+ namespaces.html \
+ newapi.xsl \
+ news.html \
+ news.xsl \
+ python.html \
+ redhat.gif \
+ search.php \
+ searches.html \
+ searches.xsl \
+ site.xsl \
+ smallfootonly.gif \
+ structure.gif \
+ symbols.xml \
+ syms.xsl \
+ threads.html \
+ tree.html \
+ tutorial/apa.html \
+ tutorial/apb.html \
+ tutorial/apc.html \
+ tutorial/apd.html \
+ tutorial/ape.html \
+ tutorial/apf.html \
+ tutorial/apg.html \
+ tutorial/aph.html \
+ tutorial/api.html \
+ tutorial/ar01s02.html \
+ tutorial/ar01s03.html \
+ tutorial/ar01s04.html \
+ tutorial/ar01s05.html \
+ tutorial/ar01s06.html \
+ tutorial/ar01s07.html \
+ tutorial/ar01s08.html \
+ tutorial/ar01s09.html \
+ tutorial/images/blank.png \
+ tutorial/images/callouts/1.png \
+ tutorial/images/callouts/10.png \
+ tutorial/images/callouts/2.png \
+ tutorial/images/callouts/3.png \
+ tutorial/images/callouts/4.png \
+ tutorial/images/callouts/5.png \
+ tutorial/images/callouts/6.png \
+ tutorial/images/callouts/7.png \
+ tutorial/images/callouts/8.png \
+ tutorial/images/callouts/9.png \
+ tutorial/images/caution.png \
+ tutorial/images/draft.png \
+ tutorial/images/home.png \
+ tutorial/images/important.png \
+ tutorial/images/next.png \
+ tutorial/images/note.png \
+ tutorial/images/prev.png \
+ tutorial/images/tip.png \
+ tutorial/images/toc-blank.png \
+ tutorial/images/toc-minus.png \
+ tutorial/images/toc-plus.png \
+ tutorial/images/up.png \
+ tutorial/images/warning.png \
+ tutorial/includeaddattribute.c \
+ tutorial/includeaddkeyword.c \
+ tutorial/includeconvert.c \
+ tutorial/includegetattribute.c \
+ tutorial/includekeyword.c \
+ tutorial/includexpath.c \
+ tutorial/index.html \
+ tutorial/ix01.html \
+ tutorial/xmltutorial.pdf \
+ upgrade.html \
+ w3c.png \
+ wiki.xsl \
+ xml.html \
+ xmlcatalog.1 \
+ xmlcatalog_man.html \
+ xmlcatalog_man.xml \
+ xmldtd.html \
+ xmlio.html \
+ xmllint.1 \
+ xmllint.html \
+ xmllint.xml \
+ xmlmem.html \
+ xmlreader.html \
+ xsa.xsl
+
+man_MANS = xmllint.1 xmlcatalog.1
+
+if REBUILD_DOCS
+docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
+
+api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
+
+web: $(PAGES)
+
+../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the elfgcchack.h header" ; \
+ $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
+ if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
+ echo "updating ../elfgcchack.h"; \
+ cp elfgcchack.h ../elfgcchack.h; \
+ fi ; rm -f elfgcchack.h ; fi );
+
+$(PAGES): xml.html $(srcdir)/site.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the HTML Web pages from xml.html" ; \
+ $(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi );
+ -@(if [ -x $(XMLLINT) ] ; then \
+ echo "Validating the HTML Web pages" ; \
+ $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
+
+$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi );
+
+libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the NEWS file" ; \
+ $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi );
+
+$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
+ $(XSLTPROC) --nonet --html $(srcdir)/api.xsl \
+ $(srcdir)/xml.html ; fi );
+ -@(if [ -x $(XMLLINT) ] ; then \
+ echo "Validating the HTML API pages" ; \
+ $(XMLLINT) --nonet --valid --noout API*.html ; fi );
+
+$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the HTML pages from the XML API" ; \
+ $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi )
+ -@(if [ -x $(XMLLINT) ] ; then \
+ echo "Validating the resulting XHTML pages" ; \
+ $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
+
+wiki: libxml2-api.xml $(srcdir)/wiki.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding the wiki HTML pages from the XML API" ; \
+ $(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi )
+
+$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \
+ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
+
+source_file_deps = \
+ $(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \
+ $(top_srcdir)/include/libxml/xmlversion.h.in \
+ $(wildcard $(top_srcdir)/*.c)
+
+libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps)
+ test -f $(top_srcdir)/include/libxml/xmlversion.h
+ (cd $(srcdir) && ./apibuild.py)
+ ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml)
+ ($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml)
+ -@(cd .. ; $(MAKE) rebuild_testapi)
+
+
+xmllint.1: xmllint.xml
+ -@($(XSLTPROC) --nonet xmllint.xml)
+
+xmlcatalog.1: xmlcatalog_man.xml
+ -@($(XSLTPROC) --nonet xmlcatalog_man.xml)
+
+check-extra-dist:
+ for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
+ for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
+ diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
+ rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
+endif
+
+clean-local:
+ rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
+
+maintainer-clean-local: clean-local
+ rm -rf libxml-decl-list.txt libxml-decl.txt
+
+rebuild: api docs
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html
+ -$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
+ -$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial/images
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+
+.PHONY: docs api web wiki rebuild
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..03fcbd3
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,1144 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = . devhelp examples
+
+# The top-level SGML file.
+DOC_MAIN_XML_FILE = gnome-xml.xml
+
+# The directory containing the source code (if it contains documentation).
+DOC_SOURCE_DIR = ..
+
+# A file in win32 depends upon one of the doc files
+WIN32_DIR = $(top_srcdir)/win32
+PAGES = architecture.html bugs.html contribs.html docs.html DOM.html \
+ downloads.html entities.html example.html help.html index.html \
+ interface.html intro.html library.html namespaces.html news.html \
+ tree.html xmldtd.html XMLinfo.html XSLT.html
+
+APIPAGES = APIconstructors.html APIfiles.html APIfunctions.html \
+ APIsymbols.html APIchunk0.html
+
+@REBUILD_DOCS_TRUE@EXTRA_DIST_wc = xmlcatalog_man.xml $(wildcard tutorial/*.html) \
+@REBUILD_DOCS_TRUE@ $(wildcard tutorial/*.c) $(wildcard tutorial/*.pdf) \
+@REBUILD_DOCS_TRUE@ $(wildcard tutorial/images/*.png) \
+@REBUILD_DOCS_TRUE@ $(wildcard tutorial/images/callouts/*.png) $(wildcard API*.html) \
+@REBUILD_DOCS_TRUE@ $(wildcard *.1) $(wildcard *.xsl) $(wildcard *.html) \
+@REBUILD_DOCS_TRUE@ $(wildcard *.gif) w3c.png $(wildcard html/*.html) \
+@REBUILD_DOCS_TRUE@ $(wildcard html/*.png) libxml2-api.xml index.py search.php \
+@REBUILD_DOCS_TRUE@ apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
+@REBUILD_DOCS_TRUE@ README.docs symbols.xml
+
+
+# Expanded form of EXTRA_DIST_wc
+#
+EXTRA_DIST = \
+ APIchunk0.html \
+ APIchunk1.html \
+ APIchunk2.html \
+ APIchunk3.html \
+ APIchunk4.html \
+ APIchunk5.html \
+ APIchunk6.html \
+ APIchunk7.html \
+ APIchunk8.html \
+ APIchunk9.html \
+ APIchunk10.html \
+ APIchunk11.html \
+ APIchunk12.html \
+ APIchunk13.html \
+ APIchunk14.html \
+ APIchunk15.html \
+ APIchunk16.html \
+ APIchunk17.html \
+ APIchunk18.html \
+ APIchunk19.html \
+ APIchunk20.html \
+ APIchunk21.html \
+ APIchunk22.html \
+ APIchunk23.html \
+ APIchunk24.html \
+ APIchunk25.html \
+ APIchunk26.html \
+ APIchunk27.html \
+ APIchunk28.html \
+ APIchunk29.html \
+ APIconstructors.html \
+ APIfiles.html \
+ APIfunctions.html \
+ APIsymbols.html \
+ ChangeLog.xsl \
+ DOM.gif \
+ DOM.html \
+ FAQ.html \
+ Libxml2-Logo-180x168.gif \
+ Libxml2-Logo-90x34.gif \
+ README.docs \
+ XMLinfo.html \
+ XSLT.html \
+ api.xsl \
+ apibuild.py \
+ architecture.html \
+ bugs.html \
+ catalog.gif \
+ catalog.html \
+ checkapisym.xsl \
+ contribs.html \
+ docs.html \
+ downloads.html \
+ elfgcchack.xsl \
+ encoding.html \
+ entities.html \
+ example.html \
+ guidelines.html \
+ help.html \
+ html/book1.html \
+ html/home.png \
+ html/index.html \
+ html/left.png \
+ html/libxml-DOCBparser.html \
+ html/libxml-HTMLparser.html \
+ html/libxml-HTMLtree.html \
+ html/libxml-SAX.html \
+ html/libxml-SAX2.html \
+ html/libxml-c14n.html \
+ html/libxml-catalog.html \
+ html/libxml-chvalid.html \
+ html/libxml-debugXML.html \
+ html/libxml-dict.html \
+ html/libxml-encoding.html \
+ html/libxml-entities.html \
+ html/libxml-globals.html \
+ html/libxml-hash.html \
+ html/libxml-lib.html \
+ html/libxml-list.html \
+ html/libxml-nanoftp.html \
+ html/libxml-nanohttp.html \
+ html/libxml-parser.html \
+ html/libxml-parserInternals.html \
+ html/libxml-pattern.html \
+ html/libxml-relaxng.html \
+ html/libxml-schemasInternals.html \
+ html/libxml-schematron.html \
+ html/libxml-threads.html \
+ html/libxml-tree.html \
+ html/libxml-uri.html \
+ html/libxml-valid.html \
+ html/libxml-xinclude.html \
+ html/libxml-xlink.html \
+ html/libxml-xmlIO.html \
+ html/libxml-xmlautomata.html \
+ html/libxml-xmlerror.html \
+ html/libxml-xmlexports.html \
+ html/libxml-xmlmemory.html \
+ html/libxml-xmlmodule.html \
+ html/libxml-xmlreader.html \
+ html/libxml-xmlregexp.html \
+ html/libxml-xmlsave.html \
+ html/libxml-xmlschemas.html \
+ html/libxml-xmlschemastypes.html \
+ html/libxml-xmlstring.html \
+ html/libxml-xmlunicode.html \
+ html/libxml-xmlversion.html \
+ html/libxml-xmlwriter.html \
+ html/libxml-xpath.html \
+ html/libxml-xpathInternals.html \
+ html/libxml-xpointer.html \
+ html/libxml-xzlib.html \
+ html/right.png \
+ html/up.png \
+ index.html \
+ index.py \
+ interface.html \
+ intro.html \
+ library.html \
+ libxml.gif \
+ libxml2-api.xml \
+ libxml2.xsa \
+ namespaces.html \
+ newapi.xsl \
+ news.html \
+ news.xsl \
+ python.html \
+ redhat.gif \
+ search.php \
+ searches.html \
+ searches.xsl \
+ site.xsl \
+ smallfootonly.gif \
+ structure.gif \
+ symbols.xml \
+ syms.xsl \
+ threads.html \
+ tree.html \
+ tutorial/apa.html \
+ tutorial/apb.html \
+ tutorial/apc.html \
+ tutorial/apd.html \
+ tutorial/ape.html \
+ tutorial/apf.html \
+ tutorial/apg.html \
+ tutorial/aph.html \
+ tutorial/api.html \
+ tutorial/ar01s02.html \
+ tutorial/ar01s03.html \
+ tutorial/ar01s04.html \
+ tutorial/ar01s05.html \
+ tutorial/ar01s06.html \
+ tutorial/ar01s07.html \
+ tutorial/ar01s08.html \
+ tutorial/ar01s09.html \
+ tutorial/images/blank.png \
+ tutorial/images/callouts/1.png \
+ tutorial/images/callouts/10.png \
+ tutorial/images/callouts/2.png \
+ tutorial/images/callouts/3.png \
+ tutorial/images/callouts/4.png \
+ tutorial/images/callouts/5.png \
+ tutorial/images/callouts/6.png \
+ tutorial/images/callouts/7.png \
+ tutorial/images/callouts/8.png \
+ tutorial/images/callouts/9.png \
+ tutorial/images/caution.png \
+ tutorial/images/draft.png \
+ tutorial/images/home.png \
+ tutorial/images/important.png \
+ tutorial/images/next.png \
+ tutorial/images/note.png \
+ tutorial/images/prev.png \
+ tutorial/images/tip.png \
+ tutorial/images/toc-blank.png \
+ tutorial/images/toc-minus.png \
+ tutorial/images/toc-plus.png \
+ tutorial/images/up.png \
+ tutorial/images/warning.png \
+ tutorial/includeaddattribute.c \
+ tutorial/includeaddkeyword.c \
+ tutorial/includeconvert.c \
+ tutorial/includegetattribute.c \
+ tutorial/includekeyword.c \
+ tutorial/includexpath.c \
+ tutorial/index.html \
+ tutorial/ix01.html \
+ tutorial/xmltutorial.pdf \
+ upgrade.html \
+ w3c.png \
+ wiki.xsl \
+ xml.html \
+ xmlcatalog.1 \
+ xmlcatalog_man.html \
+ xmlcatalog_man.xml \
+ xmldtd.html \
+ xmlio.html \
+ xmllint.1 \
+ xmllint.html \
+ xmllint.xml \
+ xmlmem.html \
+ xmlreader.html \
+ xsa.xsl
+
+man_MANS = xmllint.1 xmlcatalog.1
+@REBUILD_DOCS_TRUE@source_file_deps = \
+@REBUILD_DOCS_TRUE@ $(filter-out %/xmlversion.h, $(wildcard $(top_srcdir)/include/libxml/*.h)) \
+@REBUILD_DOCS_TRUE@ $(top_srcdir)/include/libxml/xmlversion.h.in \
+@REBUILD_DOCS_TRUE@ $(wildcard $(top_srcdir)/*.c)
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-man
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+ maintainer-clean-local
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool clean-local \
+ cscopelist-am ctags ctags-am distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ maintainer-clean-local mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-man uninstall-man1
+
+
+@REBUILD_DOCS_TRUE@docs: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
+
+@REBUILD_DOCS_TRUE@api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h $(srcdir)/site.xsl
+
+@REBUILD_DOCS_TRUE@web: $(PAGES)
+
+@REBUILD_DOCS_TRUE@../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the elfgcchack.h header" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
+@REBUILD_DOCS_TRUE@ if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
+@REBUILD_DOCS_TRUE@ echo "updating ../elfgcchack.h"; \
+@REBUILD_DOCS_TRUE@ cp elfgcchack.h ../elfgcchack.h; \
+@REBUILD_DOCS_TRUE@ fi ; rm -f elfgcchack.h ; fi );
+
+@REBUILD_DOCS_TRUE@$(PAGES): xml.html $(srcdir)/site.xsl
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML Web pages from xml.html" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet --html --path $(srcdir) $(srcdir)/site.xsl $(srcdir)/xml.html > index.html ; fi );
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Validating the HTML Web pages" ; \
+@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
+
+@REBUILD_DOCS_TRUE@$(top_builddir)/NEWS: $(srcdir)/news.xsl $(srcdir)/news.html
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/news.xsl $(srcdir)/news.html > $(top_builddir)/NEWS ; fi );
+
+@REBUILD_DOCS_TRUE@libxml2.xsa: $(srcdir)/xsa.xsl $(srcdir)/news.html
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the NEWS file" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/xsa.xsl $(srcdir)/news.html > libxml2.xsa ; fi );
+
+@REBUILD_DOCS_TRUE@$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(srcdir)/site.xsl $(srcdir)/api.xsl
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet --html $(srcdir)/api.xsl \
+@REBUILD_DOCS_TRUE@ $(srcdir)/xml.html ; fi );
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Validating the HTML API pages" ; \
+@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout API*.html ; fi );
+
+@REBUILD_DOCS_TRUE@$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the HTML pages from the XML API" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libxml2-api.xml ; fi )
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XMLLINT) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Validating the resulting XHTML pages" ; \
+@REBUILD_DOCS_TRUE@ $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
+
+@REBUILD_DOCS_TRUE@wiki: libxml2-api.xml $(srcdir)/wiki.xsl
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo "Rebuilding the wiki HTML pages from the XML API" ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet $(srcdir)/wiki.xsl $(srcdir)/libxml2-api.xml; fi )
+
+@REBUILD_DOCS_TRUE@$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \
+@REBUILD_DOCS_TRUE@ --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
+
+@REBUILD_DOCS_TRUE@libxml2-api.xml libxml2-refs.xml ../libxml2.syms: apibuild.py symbols.xml syms.xsl checkapisym.xsl $(source_file_deps)
+@REBUILD_DOCS_TRUE@ test -f $(top_srcdir)/include/libxml/xmlversion.h
+@REBUILD_DOCS_TRUE@ (cd $(srcdir) && ./apibuild.py)
+@REBUILD_DOCS_TRUE@ ($(XSLTPROC) $(srcdir)/checkapisym.xsl $(srcdir)/libxml2-api.xml)
+@REBUILD_DOCS_TRUE@ ($(XSLTPROC) -o ../libxml2.syms $(srcdir)/syms.xsl $(srcdir)/symbols.xml)
+@REBUILD_DOCS_TRUE@ -@(cd .. ; $(MAKE) rebuild_testapi)
+
+@REBUILD_DOCS_TRUE@xmllint.1: xmllint.xml
+@REBUILD_DOCS_TRUE@ -@($(XSLTPROC) --nonet xmllint.xml)
+
+@REBUILD_DOCS_TRUE@xmlcatalog.1: xmlcatalog_man.xml
+@REBUILD_DOCS_TRUE@ -@($(XSLTPROC) --nonet xmlcatalog_man.xml)
+
+@REBUILD_DOCS_TRUE@check-extra-dist:
+@REBUILD_DOCS_TRUE@ for f in $(EXTRA_DIST_wc) ; do echo $$f; done | sort -u >tmp.EXTRA_DIST_wc
+@REBUILD_DOCS_TRUE@ for f in $(EXTRA_DIST) ; do echo $$f; done | sort >tmp.EXTRA_DIST
+@REBUILD_DOCS_TRUE@ diff -u tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
+@REBUILD_DOCS_TRUE@ rm -f tmp.EXTRA_DIST_wc tmp.EXTRA_DIST
+
+clean-local:
+ rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
+
+maintainer-clean-local: clean-local
+ rm -rf libxml-decl-list.txt libxml-decl.txt
+
+rebuild: api docs
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/html
+ -$(INSTALL) -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
+ -$(INSTALL) -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial/images
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+ -$(INSTALL) -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
+ $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
+
+.PHONY: docs api web wiki rebuild
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/README.docs b/doc/README.docs
new file mode 100644
index 0000000..279b375
--- /dev/null
+++ b/doc/README.docs
@@ -0,0 +1,24 @@
+
+ XML toolkit from the GNOME project
+
+Full documentation is available on-line at
+ http://xmlsoft.org/
+
+This code is released under the MIT Licence see the Copyright file.
+
+To report bugs, follow the instructions at:
+ http://xmlsoft.org/bugs.html
+
+A mailing-list xml@gnome.org is available, to subscribe:
+ http://mail.gnome.org/mailman/listinfo/xml
+
+The list archive is at:
+ http://mail.gnome.org/archives/xml/
+
+All technical answers asked privately will be automatically answered on
+the list and archived for public access unless pricacy is explicitely
+required and justified.
+
+Daniel Veillard
+
+$Id$
diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html
new file mode 100644
index 0000000..44a7b36
--- /dev/null
+++ b/doc/XMLinfo.html
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
+markup-based structured documents. Here is <a name="example" id="example">an example XML
+document</a>:</p><pre>&lt;?xml version="1.0"?&gt;
+&lt;EXAMPLE prop1="gnome is great" prop2="&amp;amp; linux too"&gt;
+ &lt;head&gt;
+ &lt;title&gt;Welcome to Gnome&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;chapter&gt;
+ &lt;title&gt;The Linux adventure&lt;/title&gt;
+ &lt;p&gt;bla bla bla ...&lt;/p&gt;
+ &lt;image href="linus.gif"/&gt;
+ &lt;p&gt;...&lt;/p&gt;
+ &lt;/chapter&gt;
+&lt;/EXAMPLE&gt;</pre><p>The first line specifies that it is an XML document and gives useful
+information about its encoding. Then the rest of the document is a text
+format whose structure is specified by tags between brackets. <strong>Each
+tag opened has to be closed</strong>. XML is pedantic about this. However, if
+a tag is empty (no content), a single tag can serve as both the opening and
+closing tag if it ends with <code>/&gt;</code> rather than with
+<code>&gt;</code>. Note that, for example, the image tag has no content (just
+an attribute) and is closed by ending the tag with <code>/&gt;</code>.</p><p>XML can be applied successfully to a wide range of tasks, ranging from
+long term structured document maintenance (where it follows the steps of
+SGML) to simple data encoding mechanisms like configuration file formatting
+(glade), spreadsheets (gnumeric), or even shorter lived documents such as
+WebDAV where it is used to encode remote calls between a client and a
+server.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/XSLT.html b/doc/XSLT.html
new file mode 100644
index 0000000..264a677
--- /dev/null
+++ b/doc/XSLT.html
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a
+language for transforming XML documents into other XML documents (or
+HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for
+libxml2. This module "libxslt" too can be found in the Gnome SVN base.</p><p>You can check the progresses on the libxslt <a href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/api.xsl b/doc/api.xsl
new file mode 100644
index 0000000..6f9007f
--- /dev/null
+++ b/doc/api.xsl
@@ -0,0 +1,394 @@
+<?xml version="1.0"?>
+<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ exclude-result-prefixes="exsl">
+
+ <!-- Import the rest of the site stylesheets -->
+ <xsl:import href="site.xsl"/>
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <xsl:variable name="href_base" select="''"/>
+ <xsl:variable name="apirefs" select="document('libxml2-refs.xml')"/>
+ <xsl:variable name="module" select="$apirefs/apirefs/@name"/>
+ <xsl:key name="refhref" match="reference" use="@name"/>
+
+ <xsl:template match="ref" mode="anchor">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:for-each select="document('libxml2-refs.xml')">
+ <a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template match="type" mode="reflist">
+ <h2>Type <xsl:value-of select="@name"/>:</h2>
+ <p>
+ <xsl:for-each select="ref">
+ <xsl:apply-templates mode="anchor" select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </p>
+ </xsl:template>
+ <xsl:template match="letter" mode="reflist">
+ <h2>Letter <xsl:value-of select="@name"/>:</h2>
+ <p>
+ <xsl:for-each select="ref">
+ <xsl:apply-templates mode="anchor" select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </p>
+ </xsl:template>
+ <xsl:template match="file" mode="reflist">
+ <h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
+ <p>
+ <xsl:for-each select="ref">
+ <xsl:apply-templates mode="anchor" select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </p>
+ </xsl:template>
+ <xsl:template match="letter" mode="wordlist">
+ <h2>Letter <xsl:value-of select="@name"/>:</h2>
+ <dl>
+ <xsl:for-each select="word">
+ <dt><xsl:value-of select="@name"/></dt>
+ <dd>
+ <xsl:for-each select="ref">
+ <xsl:apply-templates mode="anchor" select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </dd>
+ </xsl:for-each>
+ </dl>
+ </xsl:template>
+
+ <xsl:template match="constructors">
+ <xsl:message>Generating API Constructors</xsl:message>
+ <xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
+ <xsl:document href="APIconstructors.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="reflist" select="type"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template match="files">
+ <xsl:message>Generating API List of synbols per file</xsl:message>
+ <xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
+ <xsl:document href="APIfiles.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="reflist" select="file"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template match="functions">
+ <xsl:message>Generating API Functions by Type</xsl:message>
+ <xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
+ <xsl:document href="APIfunctions.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="reflist" select="type"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template match="alpha">
+ <xsl:message>Generating API Alphabetic list</xsl:message>
+ <xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
+ <xsl:document href="APIsymbols.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="reflist" select="letter"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template name="apichunks">
+ <h2 align="center">
+ <xsl:for-each select="/apirefs/index/chunks/chunk">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="start" select="@start"/>
+ <xsl:variable name="end" select="@end"/>
+ <xsl:variable name="block" select="concat($start, '-', $end)"/>
+ <a href="API{$name}.html"><xsl:value-of select="$block"/></a>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ </h2>
+ </xsl:template>
+ <xsl:template match="chunk">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="start" select="@start"/>
+ <xsl:variable name="end" select="@end"/>
+ <xsl:variable name="block" select="concat($start, '-', $end)"/>
+ <xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
+ <xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
+ <xsl:document href="API{$name}.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="develtoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:call-template name="apichunks"/>
+ <xsl:apply-templates mode="wordlist"
+ select="$target/letter"/>
+ <xsl:call-template name="apichunks"/>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="index">
+ <xsl:message>Generating API Index</xsl:message>
+ <xsl:apply-templates select="chunks/chunk"/>
+ </xsl:template>
+
+ <xsl:template match="apirefs">
+ <xsl:message>Generating API Cross References</xsl:message>
+ <xsl:apply-templates select="constructors"/>
+ <xsl:apply-templates select="functions"/>
+ <xsl:apply-templates select="alpha"/>
+ <xsl:apply-templates select="files"/>
+ <xsl:apply-templates select="index"/>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="$apirefs/apirefs"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/apibuild.py b/doc/apibuild.py
new file mode 100755
index 0000000..b5b669a
--- /dev/null
+++ b/doc/apibuild.py
@@ -0,0 +1,2151 @@
+#!/usr/bin/python -u
+#
+# This is the API builder, it parses the C sources and build the
+# API formal description in XML.
+#
+# See Copyright for the status of this software.
+#
+# daniel@veillard.com
+#
+import os, sys
+import string
+import glob
+
+debug=0
+#debugsym='ignorableWhitespaceSAXFunc'
+debugsym=None
+
+#
+# C parser analysis code
+#
+ignored_files = {
+ "trio": "too many non standard macros",
+ "trio.c": "too many non standard macros",
+ "trionan.c": "too many non standard macros",
+ "triostr.c": "too many non standard macros",
+ "acconfig.h": "generated portability layer",
+ "config.h": "generated portability layer",
+ "libxml.h": "internal only",
+ "testOOM.c": "out of memory tester",
+ "testOOMlib.h": "out of memory tester",
+ "testOOMlib.c": "out of memory tester",
+ "rngparser.c": "not yet integrated",
+ "rngparser.h": "not yet integrated",
+ "elfgcchack.h": "not a normal header",
+ "testHTML.c": "test tool",
+ "testReader.c": "test tool",
+ "testSchemas.c": "test tool",
+ "testXPath.c": "test tool",
+ "testAutomata.c": "test tool",
+ "testModule.c": "test tool",
+ "testRegexp.c": "test tool",
+ "testThreads.c": "test tool",
+ "testC14N.c": "test tool",
+ "testRelax.c": "test tool",
+ "testThreadsWin32.c": "test tool",
+ "testSAX.c": "test tool",
+ "testURI.c": "test tool",
+ "testapi.c": "generated regression tests",
+ "runtest.c": "regression tests program",
+ "runsuite.c": "regression tests program",
+ "tst.c": "not part of the library",
+ "test.c": "not part of the library",
+ "testdso.c": "test for dynamid shared libraries",
+ "testrecurse.c": "test for entities recursions",
+ "xzlib.h": "Internal API only 2.8.0",
+ "buf.h": "Internal API only 2.9.0",
+ "enc.h": "Internal API only 2.9.0",
+ "/save.h": "Internal API only 2.9.0",
+ "timsort.h": "Internal header only for xpath.c 2.9.0",
+}
+
+ignored_words = {
+ "WINAPI": (0, "Windows keyword"),
+ "LIBXML_DLL_IMPORT": (0, "Special macro to flag external keywords"),
+ "XMLPUBVAR": (0, "Special macro for extern vars for win32"),
+ "XSLTPUBVAR": (0, "Special macro for extern vars for win32"),
+ "EXSLTPUBVAR": (0, "Special macro for extern vars for win32"),
+ "XMLPUBFUN": (0, "Special macro for extern funcs for win32"),
+ "XSLTPUBFUN": (0, "Special macro for extern funcs for win32"),
+ "EXSLTPUBFUN": (0, "Special macro for extern funcs for win32"),
+ "XMLCALL": (0, "Special macro for win32 calls"),
+ "XSLTCALL": (0, "Special macro for win32 calls"),
+ "XMLCDECL": (0, "Special macro for win32 calls"),
+ "EXSLTCALL": (0, "Special macro for win32 calls"),
+ "__declspec": (3, "Windows keyword"),
+ "__stdcall": (0, "Windows keyword"),
+ "ATTRIBUTE_UNUSED": (0, "macro keyword"),
+ "LIBEXSLT_PUBLIC": (0, "macro keyword"),
+ "X_IN_Y": (5, "macro function builder"),
+ "ATTRIBUTE_ALLOC_SIZE": (3, "macro for gcc checking extension"),
+ "ATTRIBUTE_PRINTF": (5, "macro for gcc printf args checking extension"),
+ "LIBXML_ATTR_FORMAT": (5, "macro for gcc printf args checking extension"),
+ "LIBXML_ATTR_ALLOC_SIZE": (3, "macro for gcc checking extension"),
+}
+
+def escape(raw):
+ raw = raw.replace('&', '&amp;')
+ raw = raw.replace('<', '&lt;')
+ raw = raw.replace('>', '&gt;')
+ raw = raw.replace("'", '&apos;')
+ raw = raw.replace('"', '&quot;')
+ return raw
+
+def uniq(items):
+ d = {}
+ for item in items:
+ d[item]=1
+ return list(d.keys())
+
+class identifier:
+ def __init__(self, name, header=None, module=None, type=None, lineno = 0,
+ info=None, extra=None, conditionals = None):
+ self.name = name
+ self.header = header
+ self.module = module
+ self.type = type
+ self.info = info
+ self.extra = extra
+ self.lineno = lineno
+ self.static = 0
+ if conditionals == None or len(conditionals) == 0:
+ self.conditionals = None
+ else:
+ self.conditionals = conditionals[:]
+ if self.name == debugsym:
+ print("=> define %s : %s" % (debugsym, (module, type, info,
+ extra, conditionals)))
+
+ def __repr__(self):
+ r = "%s %s:" % (self.type, self.name)
+ if self.static:
+ r = r + " static"
+ if self.module != None:
+ r = r + " from %s" % (self.module)
+ if self.info != None:
+ r = r + " " + repr(self.info)
+ if self.extra != None:
+ r = r + " " + repr(self.extra)
+ if self.conditionals != None:
+ r = r + " " + repr(self.conditionals)
+ return r
+
+
+ def set_header(self, header):
+ self.header = header
+ def set_module(self, module):
+ self.module = module
+ def set_type(self, type):
+ self.type = type
+ def set_info(self, info):
+ self.info = info
+ def set_extra(self, extra):
+ self.extra = extra
+ def set_lineno(self, lineno):
+ self.lineno = lineno
+ def set_static(self, static):
+ self.static = static
+ def set_conditionals(self, conditionals):
+ if conditionals == None or len(conditionals) == 0:
+ self.conditionals = None
+ else:
+ self.conditionals = conditionals[:]
+
+ def get_name(self):
+ return self.name
+ def get_header(self):
+ return self.module
+ def get_module(self):
+ return self.module
+ def get_type(self):
+ return self.type
+ def get_info(self):
+ return self.info
+ def get_lineno(self):
+ return self.lineno
+ def get_extra(self):
+ return self.extra
+ def get_static(self):
+ return self.static
+ def get_conditionals(self):
+ return self.conditionals
+
+ def update(self, header, module, type = None, info = None, extra=None,
+ conditionals=None):
+ if self.name == debugsym:
+ print("=> update %s : %s" % (debugsym, (module, type, info,
+ extra, conditionals)))
+ if header != None and self.header == None:
+ self.set_header(module)
+ if module != None and (self.module == None or self.header == self.module):
+ self.set_module(module)
+ if type != None and self.type == None:
+ self.set_type(type)
+ if info != None:
+ self.set_info(info)
+ if extra != None:
+ self.set_extra(extra)
+ if conditionals != None:
+ self.set_conditionals(conditionals)
+
+class index:
+ def __init__(self, name = "noname"):
+ self.name = name
+ self.identifiers = {}
+ self.functions = {}
+ self.variables = {}
+ self.includes = {}
+ self.structs = {}
+ self.enums = {}
+ self.typedefs = {}
+ self.macros = {}
+ self.references = {}
+ self.info = {}
+
+ def add_ref(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None):
+ if name[0:2] == '__':
+ return None
+ d = None
+ try:
+ d = self.identifiers[name]
+ d.update(header, module, type, lineno, info, extra, conditionals)
+ except:
+ d = identifier(name, header, module, type, lineno, info, extra, conditionals)
+ self.identifiers[name] = d
+
+ if d != None and static == 1:
+ d.set_static(1)
+
+ if d != None and name != None and type != None:
+ self.references[name] = d
+
+ if name == debugsym:
+ print("New ref: %s" % (d))
+
+ return d
+
+ def add(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None):
+ if name[0:2] == '__':
+ return None
+ d = None
+ try:
+ d = self.identifiers[name]
+ d.update(header, module, type, lineno, info, extra, conditionals)
+ except:
+ d = identifier(name, header, module, type, lineno, info, extra, conditionals)
+ self.identifiers[name] = d
+
+ if d != None and static == 1:
+ d.set_static(1)
+
+ if d != None and name != None and type != None:
+ if type == "function":
+ self.functions[name] = d
+ elif type == "functype":
+ self.functions[name] = d
+ elif type == "variable":
+ self.variables[name] = d
+ elif type == "include":
+ self.includes[name] = d
+ elif type == "struct":
+ self.structs[name] = d
+ elif type == "enum":
+ self.enums[name] = d
+ elif type == "typedef":
+ self.typedefs[name] = d
+ elif type == "macro":
+ self.macros[name] = d
+ else:
+ print("Unable to register type ", type)
+
+ if name == debugsym:
+ print("New symbol: %s" % (d))
+
+ return d
+
+ def merge(self, idx):
+ for id in list(idx.functions.keys()):
+ #
+ # macro might be used to override functions or variables
+ # definitions
+ #
+ if id in self.macros:
+ del self.macros[id]
+ if id in self.functions:
+ print("function %s from %s redeclared in %s" % (
+ id, self.functions[id].header, idx.functions[id].header))
+ else:
+ self.functions[id] = idx.functions[id]
+ self.identifiers[id] = idx.functions[id]
+ for id in list(idx.variables.keys()):
+ #
+ # macro might be used to override functions or variables
+ # definitions
+ #
+ if id in self.macros:
+ del self.macros[id]
+ if id in self.variables:
+ print("variable %s from %s redeclared in %s" % (
+ id, self.variables[id].header, idx.variables[id].header))
+ else:
+ self.variables[id] = idx.variables[id]
+ self.identifiers[id] = idx.variables[id]
+ for id in list(idx.structs.keys()):
+ if id in self.structs:
+ print("struct %s from %s redeclared in %s" % (
+ id, self.structs[id].header, idx.structs[id].header))
+ else:
+ self.structs[id] = idx.structs[id]
+ self.identifiers[id] = idx.structs[id]
+ for id in list(idx.typedefs.keys()):
+ if id in self.typedefs:
+ print("typedef %s from %s redeclared in %s" % (
+ id, self.typedefs[id].header, idx.typedefs[id].header))
+ else:
+ self.typedefs[id] = idx.typedefs[id]
+ self.identifiers[id] = idx.typedefs[id]
+ for id in list(idx.macros.keys()):
+ #
+ # macro might be used to override functions or variables
+ # definitions
+ #
+ if id in self.variables:
+ continue
+ if id in self.functions:
+ continue
+ if id in self.enums:
+ continue
+ if id in self.macros:
+ print("macro %s from %s redeclared in %s" % (
+ id, self.macros[id].header, idx.macros[id].header))
+ else:
+ self.macros[id] = idx.macros[id]
+ self.identifiers[id] = idx.macros[id]
+ for id in list(idx.enums.keys()):
+ if id in self.enums:
+ print("enum %s from %s redeclared in %s" % (
+ id, self.enums[id].header, idx.enums[id].header))
+ else:
+ self.enums[id] = idx.enums[id]
+ self.identifiers[id] = idx.enums[id]
+
+ def merge_public(self, idx):
+ for id in list(idx.functions.keys()):
+ if id in self.functions:
+ # check that function condition agrees with header
+ if idx.functions[id].conditionals != \
+ self.functions[id].conditionals:
+ print("Header condition differs from Function for %s:" \
+ % id)
+ print(" H: %s" % self.functions[id].conditionals)
+ print(" C: %s" % idx.functions[id].conditionals)
+ up = idx.functions[id]
+ self.functions[id].update(None, up.module, up.type, up.info, up.extra)
+ # else:
+ # print "Function %s from %s is not declared in headers" % (
+ # id, idx.functions[id].module)
+ # TODO: do the same for variables.
+
+ def analyze_dict(self, type, dict):
+ count = 0
+ public = 0
+ for name in list(dict.keys()):
+ id = dict[name]
+ count = count + 1
+ if id.static == 0:
+ public = public + 1
+ if count != public:
+ print(" %d %s , %d public" % (count, type, public))
+ elif count != 0:
+ print(" %d public %s" % (count, type))
+
+
+ def analyze(self):
+ self.analyze_dict("functions", self.functions)
+ self.analyze_dict("variables", self.variables)
+ self.analyze_dict("structs", self.structs)
+ self.analyze_dict("typedefs", self.typedefs)
+ self.analyze_dict("macros", self.macros)
+
+class CLexer:
+ """A lexer for the C language, tokenize the input by reading and
+ analyzing it line by line"""
+ def __init__(self, input):
+ self.input = input
+ self.tokens = []
+ self.line = ""
+ self.lineno = 0
+
+ def getline(self):
+ line = ''
+ while line == '':
+ line = self.input.readline()
+ if not line:
+ return None
+ self.lineno = self.lineno + 1
+ line = line.lstrip()
+ line = line.rstrip()
+ if line == '':
+ continue
+ while line[-1] == '\\':
+ line = line[:-1]
+ n = self.input.readline()
+ self.lineno = self.lineno + 1
+ n = n.lstrip()
+ n = n.rstrip()
+ if not n:
+ break
+ else:
+ line = line + n
+ return line
+
+ def getlineno(self):
+ return self.lineno
+
+ def push(self, token):
+ self.tokens.insert(0, token);
+
+ def debug(self):
+ print("Last token: ", self.last)
+ print("Token queue: ", self.tokens)
+ print("Line %d end: " % (self.lineno), self.line)
+
+ def token(self):
+ while self.tokens == []:
+ if self.line == "":
+ line = self.getline()
+ else:
+ line = self.line
+ self.line = ""
+ if line == None:
+ return None
+
+ if line[0] == '#':
+ self.tokens = list(map((lambda x: ('preproc', x)),
+ line.split()))
+ break;
+ l = len(line)
+ if line[0] == '"' or line[0] == "'":
+ end = line[0]
+ line = line[1:]
+ found = 0
+ tok = ""
+ while found == 0:
+ i = 0
+ l = len(line)
+ while i < l:
+ if line[i] == end:
+ self.line = line[i+1:]
+ line = line[:i]
+ l = i
+ found = 1
+ break
+ if line[i] == '\\':
+ i = i + 1
+ i = i + 1
+ tok = tok + line
+ if found == 0:
+ line = self.getline()
+ if line == None:
+ return None
+ self.last = ('string', tok)
+ return self.last
+
+ if l >= 2 and line[0] == '/' and line[1] == '*':
+ line = line[2:]
+ found = 0
+ tok = ""
+ while found == 0:
+ i = 0
+ l = len(line)
+ while i < l:
+ if line[i] == '*' and i+1 < l and line[i+1] == '/':
+ self.line = line[i+2:]
+ line = line[:i-1]
+ l = i
+ found = 1
+ break
+ i = i + 1
+ if tok != "":
+ tok = tok + "\n"
+ tok = tok + line
+ if found == 0:
+ line = self.getline()
+ if line == None:
+ return None
+ self.last = ('comment', tok)
+ return self.last
+ if l >= 2 and line[0] == '/' and line[1] == '/':
+ line = line[2:]
+ self.last = ('comment', line)
+ return self.last
+ i = 0
+ while i < l:
+ if line[i] == '/' and i+1 < l and line[i+1] == '/':
+ self.line = line[i:]
+ line = line[:i]
+ break
+ if line[i] == '/' and i+1 < l and line[i+1] == '*':
+ self.line = line[i:]
+ line = line[:i]
+ break
+ if line[i] == '"' or line[i] == "'":
+ self.line = line[i:]
+ line = line[:i]
+ break
+ i = i + 1
+ l = len(line)
+ i = 0
+ while i < l:
+ if line[i] == ' ' or line[i] == '\t':
+ i = i + 1
+ continue
+ o = ord(line[i])
+ if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \
+ (o >= 48 and o <= 57):
+ s = i
+ while i < l:
+ o = ord(line[i])
+ if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \
+ (o >= 48 and o <= 57) or \
+ (" \t(){}:;,+-*/%&!|[]=><".find(line[i])) == -1:
+ i = i + 1
+ else:
+ break
+ self.tokens.append(('name', line[s:i]))
+ continue
+ if "(){}:;,[]".find(line[i]) != -1:
+# if line[i] == '(' or line[i] == ')' or line[i] == '{' or \
+# line[i] == '}' or line[i] == ':' or line[i] == ';' or \
+# line[i] == ',' or line[i] == '[' or line[i] == ']':
+ self.tokens.append(('sep', line[i]))
+ i = i + 1
+ continue
+ if "+-*><=/%&!|.".find(line[i]) != -1:
+# if line[i] == '+' or line[i] == '-' or line[i] == '*' or \
+# line[i] == '>' or line[i] == '<' or line[i] == '=' or \
+# line[i] == '/' or line[i] == '%' or line[i] == '&' or \
+# line[i] == '!' or line[i] == '|' or line[i] == '.':
+ if line[i] == '.' and i + 2 < l and \
+ line[i+1] == '.' and line[i+2] == '.':
+ self.tokens.append(('name', '...'))
+ i = i + 3
+ continue
+
+ j = i + 1
+ if j < l and (
+ "+-*><=/%&!|".find(line[j]) != -1):
+# line[j] == '+' or line[j] == '-' or line[j] == '*' or \
+# line[j] == '>' or line[j] == '<' or line[j] == '=' or \
+# line[j] == '/' or line[j] == '%' or line[j] == '&' or \
+# line[j] == '!' or line[j] == '|'):
+ self.tokens.append(('op', line[i:j+1]))
+ i = j + 1
+ else:
+ self.tokens.append(('op', line[i]))
+ i = i + 1
+ continue
+ s = i
+ while i < l:
+ o = ord(line[i])
+ if (o >= 97 and o <= 122) or (o >= 65 and o <= 90) or \
+ (o >= 48 and o <= 57) or (
+ " \t(){}:;,+-*/%&!|[]=><".find(line[i]) == -1):
+# line[i] != ' ' and line[i] != '\t' and
+# line[i] != '(' and line[i] != ')' and
+# line[i] != '{' and line[i] != '}' and
+# line[i] != ':' and line[i] != ';' and
+# line[i] != ',' and line[i] != '+' and
+# line[i] != '-' and line[i] != '*' and
+# line[i] != '/' and line[i] != '%' and
+# line[i] != '&' and line[i] != '!' and
+# line[i] != '|' and line[i] != '[' and
+# line[i] != ']' and line[i] != '=' and
+# line[i] != '*' and line[i] != '>' and
+# line[i] != '<'):
+ i = i + 1
+ else:
+ break
+ self.tokens.append(('name', line[s:i]))
+
+ tok = self.tokens[0]
+ self.tokens = self.tokens[1:]
+ self.last = tok
+ return tok
+
+class CParser:
+ """The C module parser"""
+ def __init__(self, filename, idx = None):
+ self.filename = filename
+ if len(filename) > 2 and filename[-2:] == '.h':
+ self.is_header = 1
+ else:
+ self.is_header = 0
+ self.input = open(filename)
+ self.lexer = CLexer(self.input)
+ if idx == None:
+ self.index = index()
+ else:
+ self.index = idx
+ self.top_comment = ""
+ self.last_comment = ""
+ self.comment = None
+ self.collect_ref = 0
+ self.no_error = 0
+ self.conditionals = []
+ self.defines = []
+
+ def collect_references(self):
+ self.collect_ref = 1
+
+ def stop_error(self):
+ self.no_error = 1
+
+ def start_error(self):
+ self.no_error = 0
+
+ def lineno(self):
+ return self.lexer.getlineno()
+
+ def index_add(self, name, module, static, type, info=None, extra = None):
+ if self.is_header == 1:
+ self.index.add(name, module, module, static, type, self.lineno(),
+ info, extra, self.conditionals)
+ else:
+ self.index.add(name, None, module, static, type, self.lineno(),
+ info, extra, self.conditionals)
+
+ def index_add_ref(self, name, module, static, type, info=None,
+ extra = None):
+ if self.is_header == 1:
+ self.index.add_ref(name, module, module, static, type,
+ self.lineno(), info, extra, self.conditionals)
+ else:
+ self.index.add_ref(name, None, module, static, type, self.lineno(),
+ info, extra, self.conditionals)
+
+ def warning(self, msg):
+ if self.no_error:
+ return
+ print(msg)
+
+ def error(self, msg, token=-1):
+ if self.no_error:
+ return
+
+ print("Parse Error: " + msg)
+ if token != -1:
+ print("Got token ", token)
+ self.lexer.debug()
+ sys.exit(1)
+
+ def debug(self, msg, token=-1):
+ print("Debug: " + msg)
+ if token != -1:
+ print("Got token ", token)
+ self.lexer.debug()
+
+ def parseTopComment(self, comment):
+ res = {}
+ lines = comment.split("\n")
+ item = None
+ for line in lines:
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ while line != "" and line[0] == '*':
+ line = line[1:]
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ try:
+ (it, line) = line.split(":", 1)
+ item = it
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ if item in res:
+ res[item] = res[item] + " " + line
+ else:
+ res[item] = line
+ except:
+ if item != None:
+ if item in res:
+ res[item] = res[item] + " " + line
+ else:
+ res[item] = line
+ self.index.info = res
+
+ def parseComment(self, token):
+ if self.top_comment == "":
+ self.top_comment = token[1]
+ if self.comment == None or token[1][0] == '*':
+ self.comment = token[1];
+ else:
+ self.comment = self.comment + token[1]
+ token = self.lexer.token()
+
+ if self.comment.find("DOC_DISABLE") != -1:
+ self.stop_error()
+
+ if self.comment.find("DOC_ENABLE") != -1:
+ self.start_error()
+
+ return token
+
+ #
+ # Parse a comment block associate to a typedef
+ #
+ def parseTypeComment(self, name, quiet = 0):
+ if name[0:2] == '__':
+ quiet = 1
+
+ args = []
+ desc = ""
+
+ if self.comment == None:
+ if not quiet:
+ self.warning("Missing comment for type %s" % (name))
+ return((args, desc))
+ if self.comment[0] != '*':
+ if not quiet:
+ self.warning("Missing * in type comment for %s" % (name))
+ return((args, desc))
+ lines = self.comment.split('\n')
+ if lines[0] == '*':
+ del lines[0]
+ if lines[0] != "* %s:" % (name):
+ if not quiet:
+ self.warning("Misformatted type comment for %s" % (name))
+ self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0]))
+ return((args, desc))
+ del lines[0]
+ while len(lines) > 0 and lines[0] == '*':
+ del lines[0]
+ desc = ""
+ while len(lines) > 0:
+ l = lines[0]
+ while len(l) > 0 and l[0] == '*':
+ l = l[1:]
+ l = l.strip()
+ desc = desc + " " + l
+ del lines[0]
+
+ desc = desc.strip()
+
+ if quiet == 0:
+ if desc == "":
+ self.warning("Type comment for %s lack description of the macro" % (name))
+
+ return(desc)
+ #
+ # Parse a comment block associate to a macro
+ #
+ def parseMacroComment(self, name, quiet = 0):
+ if name[0:2] == '__':
+ quiet = 1
+
+ args = []
+ desc = ""
+
+ if self.comment == None:
+ if not quiet:
+ self.warning("Missing comment for macro %s" % (name))
+ return((args, desc))
+ if self.comment[0] != '*':
+ if not quiet:
+ self.warning("Missing * in macro comment for %s" % (name))
+ return((args, desc))
+ lines = self.comment.split('\n')
+ if lines[0] == '*':
+ del lines[0]
+ if lines[0] != "* %s:" % (name):
+ if not quiet:
+ self.warning("Misformatted macro comment for %s" % (name))
+ self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0]))
+ return((args, desc))
+ del lines[0]
+ while lines[0] == '*':
+ del lines[0]
+ while len(lines) > 0 and lines[0][0:3] == '* @':
+ l = lines[0][3:]
+ try:
+ (arg, desc) = l.split(':', 1)
+ desc=desc.strip()
+ arg=arg.strip()
+ except:
+ if not quiet:
+ self.warning("Misformatted macro comment for %s" % (name))
+ self.warning(" problem with '%s'" % (lines[0]))
+ del lines[0]
+ continue
+ del lines[0]
+ l = lines[0].strip()
+ while len(l) > 2 and l[0:3] != '* @':
+ while l[0] == '*':
+ l = l[1:]
+ desc = desc + ' ' + l.strip()
+ del lines[0]
+ if len(lines) == 0:
+ break
+ l = lines[0]
+ args.append((arg, desc))
+ while len(lines) > 0 and lines[0] == '*':
+ del lines[0]
+ desc = ""
+ while len(lines) > 0:
+ l = lines[0]
+ while len(l) > 0 and l[0] == '*':
+ l = l[1:]
+ l = l.strip()
+ desc = desc + " " + l
+ del lines[0]
+
+ desc = desc.strip()
+
+ if quiet == 0:
+ if desc == "":
+ self.warning("Macro comment for %s lack description of the macro" % (name))
+
+ return((args, desc))
+
+ #
+ # Parse a comment block and merge the informations found in the
+ # parameters descriptions, finally returns a block as complete
+ # as possible
+ #
+ def mergeFunctionComment(self, name, description, quiet = 0):
+ if name == 'main':
+ quiet = 1
+ if name[0:2] == '__':
+ quiet = 1
+
+ (ret, args) = description
+ desc = ""
+ retdesc = ""
+
+ if self.comment == None:
+ if not quiet:
+ self.warning("Missing comment for function %s" % (name))
+ return(((ret[0], retdesc), args, desc))
+ if self.comment[0] != '*':
+ if not quiet:
+ self.warning("Missing * in function comment for %s" % (name))
+ return(((ret[0], retdesc), args, desc))
+ lines = self.comment.split('\n')
+ if lines[0] == '*':
+ del lines[0]
+ if lines[0] != "* %s:" % (name):
+ if not quiet:
+ self.warning("Misformatted function comment for %s" % (name))
+ self.warning(" Expecting '* %s:' got '%s'" % (name, lines[0]))
+ return(((ret[0], retdesc), args, desc))
+ del lines[0]
+ while lines[0] == '*':
+ del lines[0]
+ nbargs = len(args)
+ while len(lines) > 0 and lines[0][0:3] == '* @':
+ l = lines[0][3:]
+ try:
+ (arg, desc) = l.split(':', 1)
+ desc=desc.strip()
+ arg=arg.strip()
+ except:
+ if not quiet:
+ self.warning("Misformatted function comment for %s" % (name))
+ self.warning(" problem with '%s'" % (lines[0]))
+ del lines[0]
+ continue
+ del lines[0]
+ l = lines[0].strip()
+ while len(l) > 2 and l[0:3] != '* @':
+ while l[0] == '*':
+ l = l[1:]
+ desc = desc + ' ' + l.strip()
+ del lines[0]
+ if len(lines) == 0:
+ break
+ l = lines[0]
+ i = 0
+ while i < nbargs:
+ if args[i][1] == arg:
+ args[i] = (args[i][0], arg, desc)
+ break;
+ i = i + 1
+ if i >= nbargs:
+ if not quiet:
+ self.warning("Unable to find arg %s from function comment for %s" % (
+ arg, name))
+ while len(lines) > 0 and lines[0] == '*':
+ del lines[0]
+ desc = ""
+ while len(lines) > 0:
+ l = lines[0]
+ while len(l) > 0 and l[0] == '*':
+ l = l[1:]
+ l = l.strip()
+ if len(l) >= 6 and l[0:6] == "return" or l[0:6] == "Return":
+ try:
+ l = l.split(' ', 1)[1]
+ except:
+ l = ""
+ retdesc = l.strip()
+ del lines[0]
+ while len(lines) > 0:
+ l = lines[0]
+ while len(l) > 0 and l[0] == '*':
+ l = l[1:]
+ l = l.strip()
+ retdesc = retdesc + " " + l
+ del lines[0]
+ else:
+ desc = desc + " " + l
+ del lines[0]
+
+ retdesc = retdesc.strip()
+ desc = desc.strip()
+
+ if quiet == 0:
+ #
+ # report missing comments
+ #
+ i = 0
+ while i < nbargs:
+ if args[i][2] == None and args[i][0] != "void" and \
+ ((args[i][1] != None) or (args[i][1] == '')):
+ self.warning("Function comment for %s lacks description of arg %s" % (name, args[i][1]))
+ i = i + 1
+ if retdesc == "" and ret[0] != "void":
+ self.warning("Function comment for %s lacks description of return value" % (name))
+ if desc == "":
+ self.warning("Function comment for %s lacks description of the function" % (name))
+
+ return(((ret[0], retdesc), args, desc))
+
+ def parsePreproc(self, token):
+ if debug:
+ print("=> preproc ", token, self.lexer.tokens)
+ name = token[1]
+ if name == "#include":
+ token = self.lexer.token()
+ if token == None:
+ return None
+ if token[0] == 'preproc':
+ self.index_add(token[1], self.filename, not self.is_header,
+ "include")
+ return self.lexer.token()
+ return token
+ if name == "#define":
+ token = self.lexer.token()
+ if token == None:
+ return None
+ if token[0] == 'preproc':
+ # TODO macros with arguments
+ name = token[1]
+ lst = []
+ token = self.lexer.token()
+ while token != None and token[0] == 'preproc' and \
+ token[1][0] != '#':
+ lst.append(token[1])
+ token = self.lexer.token()
+ try:
+ name = name.split('(') [0]
+ except:
+ pass
+ info = self.parseMacroComment(name, not self.is_header)
+ self.index_add(name, self.filename, not self.is_header,
+ "macro", info)
+ return token
+
+ #
+ # Processing of conditionals modified by Bill 1/1/05
+ #
+ # We process conditionals (i.e. tokens from #ifdef, #ifndef,
+ # #if, #else and #endif) for headers and mainline code,
+ # store the ones from the header in libxml2-api.xml, and later
+ # (in the routine merge_public) verify that the two (header and
+ # mainline code) agree.
+ #
+ # There is a small problem with processing the headers. Some of
+ # the variables are not concerned with enabling / disabling of
+ # library functions (e.g. '__XML_PARSER_H__'), and we don't want
+ # them to be included in libxml2-api.xml, or involved in
+ # the check between the header and the mainline code. To
+ # accomplish this, we ignore any conditional which doesn't include
+ # the string 'ENABLED'
+ #
+ if name == "#ifdef":
+ apstr = self.lexer.tokens[0][1]
+ try:
+ self.defines.append(apstr)
+ if apstr.find('ENABLED') != -1:
+ self.conditionals.append("defined(%s)" % apstr)
+ except:
+ pass
+ elif name == "#ifndef":
+ apstr = self.lexer.tokens[0][1]
+ try:
+ self.defines.append(apstr)
+ if apstr.find('ENABLED') != -1:
+ self.conditionals.append("!defined(%s)" % apstr)
+ except:
+ pass
+ elif name == "#if":
+ apstr = ""
+ for tok in self.lexer.tokens:
+ if apstr != "":
+ apstr = apstr + " "
+ apstr = apstr + tok[1]
+ try:
+ self.defines.append(apstr)
+ if apstr.find('ENABLED') != -1:
+ self.conditionals.append(apstr)
+ except:
+ pass
+ elif name == "#else":
+ if self.conditionals != [] and \
+ self.defines[-1].find('ENABLED') != -1:
+ self.conditionals[-1] = "!(%s)" % self.conditionals[-1]
+ elif name == "#endif":
+ if self.conditionals != [] and \
+ self.defines[-1].find('ENABLED') != -1:
+ self.conditionals = self.conditionals[:-1]
+ self.defines = self.defines[:-1]
+ token = self.lexer.token()
+ while token != None and token[0] == 'preproc' and \
+ token[1][0] != '#':
+ token = self.lexer.token()
+ return token
+
+ #
+ # token acquisition on top of the lexer, it handle internally
+ # preprocessor and comments since they are logically not part of
+ # the program structure.
+ #
+ def token(self):
+ global ignored_words
+
+ token = self.lexer.token()
+ while token != None:
+ if token[0] == 'comment':
+ token = self.parseComment(token)
+ continue
+ elif token[0] == 'preproc':
+ token = self.parsePreproc(token)
+ continue
+ elif token[0] == "name" and token[1] == "__const":
+ token = ("name", "const")
+ return token
+ elif token[0] == "name" and token[1] == "__attribute":
+ token = self.lexer.token()
+ while token != None and token[1] != ";":
+ token = self.lexer.token()
+ return token
+ elif token[0] == "name" and token[1] in ignored_words:
+ (n, info) = ignored_words[token[1]]
+ i = 0
+ while i < n:
+ token = self.lexer.token()
+ i = i + 1
+ token = self.lexer.token()
+ continue
+ else:
+ if debug:
+ print("=> ", token)
+ return token
+ return None
+
+ #
+ # Parse a typedef, it records the type and its name.
+ #
+ def parseTypedef(self, token):
+ if token == None:
+ return None
+ token = self.parseType(token)
+ if token == None:
+ self.error("parsing typedef")
+ return None
+ base_type = self.type
+ type = base_type
+ #self.debug("end typedef type", token)
+ while token != None:
+ if token[0] == "name":
+ name = token[1]
+ signature = self.signature
+ if signature != None:
+ type = type.split('(')[0]
+ d = self.mergeFunctionComment(name,
+ ((type, None), signature), 1)
+ self.index_add(name, self.filename, not self.is_header,
+ "functype", d)
+ else:
+ if base_type == "struct":
+ self.index_add(name, self.filename, not self.is_header,
+ "struct", type)
+ base_type = "struct " + name
+ else:
+ # TODO report missing or misformatted comments
+ info = self.parseTypeComment(name, 1)
+ self.index_add(name, self.filename, not self.is_header,
+ "typedef", type, info)
+ token = self.token()
+ else:
+ self.error("parsing typedef: expecting a name")
+ return token
+ #self.debug("end typedef", token)
+ if token != None and token[0] == 'sep' and token[1] == ',':
+ type = base_type
+ token = self.token()
+ while token != None and token[0] == "op":
+ type = type + token[1]
+ token = self.token()
+ elif token != None and token[0] == 'sep' and token[1] == ';':
+ break;
+ elif token != None and token[0] == 'name':
+ type = base_type
+ continue;
+ else:
+ self.error("parsing typedef: expecting ';'", token)
+ return token
+ token = self.token()
+ return token
+
+ #
+ # Parse a C code block, used for functions it parse till
+ # the balancing } included
+ #
+ def parseBlock(self, token):
+ while token != None:
+ if token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseBlock(token)
+ elif token[0] == "sep" and token[1] == "}":
+ self.comment = None
+ token = self.token()
+ return token
+ else:
+ if self.collect_ref == 1:
+ oldtok = token
+ token = self.token()
+ if oldtok[0] == "name" and oldtok[1][0:3] == "xml":
+ if token[0] == "sep" and token[1] == "(":
+ self.index_add_ref(oldtok[1], self.filename,
+ 0, "function")
+ token = self.token()
+ elif token[0] == "name":
+ token = self.token()
+ if token[0] == "sep" and (token[1] == ";" or
+ token[1] == "," or token[1] == "="):
+ self.index_add_ref(oldtok[1], self.filename,
+ 0, "type")
+ elif oldtok[0] == "name" and oldtok[1][0:4] == "XML_":
+ self.index_add_ref(oldtok[1], self.filename,
+ 0, "typedef")
+ elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXML_":
+ self.index_add_ref(oldtok[1], self.filename,
+ 0, "typedef")
+
+ else:
+ token = self.token()
+ return token
+
+ #
+ # Parse a C struct definition till the balancing }
+ #
+ def parseStruct(self, token):
+ fields = []
+ #self.debug("start parseStruct", token)
+ while token != None:
+ if token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseTypeBlock(token)
+ elif token[0] == "sep" and token[1] == "}":
+ self.struct_fields = fields
+ #self.debug("end parseStruct", token)
+ #print fields
+ token = self.token()
+ return token
+ else:
+ base_type = self.type
+ #self.debug("before parseType", token)
+ token = self.parseType(token)
+ #self.debug("after parseType", token)
+ if token != None and token[0] == "name":
+ fname = token[1]
+ token = self.token()
+ if token[0] == "sep" and token[1] == ";":
+ self.comment = None
+ token = self.token()
+ fields.append((self.type, fname, self.comment))
+ self.comment = None
+ else:
+ self.error("parseStruct: expecting ;", token)
+ elif token != None and token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseTypeBlock(token)
+ if token != None and token[0] == "name":
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == ";":
+ token = self.token()
+ else:
+ self.error("parseStruct: expecting ;", token)
+ else:
+ self.error("parseStruct: name", token)
+ token = self.token()
+ self.type = base_type;
+ self.struct_fields = fields
+ #self.debug("end parseStruct", token)
+ #print fields
+ return token
+
+ #
+ # Parse a C enum block, parse till the balancing }
+ #
+ def parseEnumBlock(self, token):
+ self.enums = []
+ name = None
+ self.comment = None
+ comment = ""
+ value = "0"
+ while token != None:
+ if token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseTypeBlock(token)
+ elif token[0] == "sep" and token[1] == "}":
+ if name != None:
+ if self.comment != None:
+ comment = self.comment
+ self.comment = None
+ self.enums.append((name, value, comment))
+ token = self.token()
+ return token
+ elif token[0] == "name":
+ if name != None:
+ if self.comment != None:
+ comment = self.comment.strip()
+ self.comment = None
+ self.enums.append((name, value, comment))
+ name = token[1]
+ comment = ""
+ token = self.token()
+ if token[0] == "op" and token[1][0] == "=":
+ value = ""
+ if len(token[1]) > 1:
+ value = token[1][1:]
+ token = self.token()
+ while token[0] != "sep" or (token[1] != ',' and
+ token[1] != '}'):
+ value = value + token[1]
+ token = self.token()
+ else:
+ try:
+ value = "%d" % (int(value) + 1)
+ except:
+ self.warning("Failed to compute value of enum %s" % (name))
+ value=""
+ if token[0] == "sep" and token[1] == ",":
+ token = self.token()
+ else:
+ token = self.token()
+ return token
+
+ #
+ # Parse a C definition block, used for structs it parse till
+ # the balancing }
+ #
+ def parseTypeBlock(self, token):
+ while token != None:
+ if token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseTypeBlock(token)
+ elif token[0] == "sep" and token[1] == "}":
+ token = self.token()
+ return token
+ else:
+ token = self.token()
+ return token
+
+ #
+ # Parse a type: the fact that the type name can either occur after
+ # the definition or within the definition makes it a little harder
+ # if inside, the name token is pushed back before returning
+ #
+ def parseType(self, token):
+ self.type = ""
+ self.struct_fields = []
+ self.signature = None
+ if token == None:
+ return token
+
+ while token[0] == "name" and (
+ token[1] == "const" or \
+ token[1] == "unsigned" or \
+ token[1] == "signed"):
+ if self.type == "":
+ self.type = token[1]
+ else:
+ self.type = self.type + " " + token[1]
+ token = self.token()
+
+ if token[0] == "name" and (token[1] == "long" or token[1] == "short"):
+ if self.type == "":
+ self.type = token[1]
+ else:
+ self.type = self.type + " " + token[1]
+ if token[0] == "name" and token[1] == "int":
+ if self.type == "":
+ self.type = tmp[1]
+ else:
+ self.type = self.type + " " + tmp[1]
+
+ elif token[0] == "name" and token[1] == "struct":
+ if self.type == "":
+ self.type = token[1]
+ else:
+ self.type = self.type + " " + token[1]
+ token = self.token()
+ nametok = None
+ if token[0] == "name":
+ nametok = token
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseStruct(token)
+ elif token != None and token[0] == "op" and token[1] == "*":
+ self.type = self.type + " " + nametok[1] + " *"
+ token = self.token()
+ while token != None and token[0] == "op" and token[1] == "*":
+ self.type = self.type + " *"
+ token = self.token()
+ if token[0] == "name":
+ nametok = token
+ token = self.token()
+ else:
+ self.error("struct : expecting name", token)
+ return token
+ elif token != None and token[0] == "name" and nametok != None:
+ self.type = self.type + " " + nametok[1]
+ return token
+
+ if nametok != None:
+ self.lexer.push(token)
+ token = nametok
+ return token
+
+ elif token[0] == "name" and token[1] == "enum":
+ if self.type == "":
+ self.type = token[1]
+ else:
+ self.type = self.type + " " + token[1]
+ self.enums = []
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == "{":
+ token = self.token()
+ token = self.parseEnumBlock(token)
+ else:
+ self.error("parsing enum: expecting '{'", token)
+ enum_type = None
+ if token != None and token[0] != "name":
+ self.lexer.push(token)
+ token = ("name", "enum")
+ else:
+ enum_type = token[1]
+ for enum in self.enums:
+ self.index_add(enum[0], self.filename,
+ not self.is_header, "enum",
+ (enum[1], enum[2], enum_type))
+ return token
+
+ elif token[0] == "name":
+ if self.type == "":
+ self.type = token[1]
+ else:
+ self.type = self.type + " " + token[1]
+ else:
+ self.error("parsing type %s: expecting a name" % (self.type),
+ token)
+ return token
+ token = self.token()
+ while token != None and (token[0] == "op" or
+ token[0] == "name" and token[1] == "const"):
+ self.type = self.type + " " + token[1]
+ token = self.token()
+
+ #
+ # if there is a parenthesis here, this means a function type
+ #
+ if token != None and token[0] == "sep" and token[1] == '(':
+ self.type = self.type + token[1]
+ token = self.token()
+ while token != None and token[0] == "op" and token[1] == '*':
+ self.type = self.type + token[1]
+ token = self.token()
+ if token == None or token[0] != "name" :
+ self.error("parsing function type, name expected", token);
+ return token
+ self.type = self.type + token[1]
+ nametok = token
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == ')':
+ self.type = self.type + token[1]
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == '(':
+ token = self.token()
+ type = self.type;
+ token = self.parseSignature(token);
+ self.type = type;
+ else:
+ self.error("parsing function type, '(' expected", token);
+ return token
+ else:
+ self.error("parsing function type, ')' expected", token);
+ return token
+ self.lexer.push(token)
+ token = nametok
+ return token
+
+ #
+ # do some lookahead for arrays
+ #
+ if token != None and token[0] == "name":
+ nametok = token
+ token = self.token()
+ if token != None and token[0] == "sep" and token[1] == '[':
+ self.type = self.type + nametok[1]
+ while token != None and token[0] == "sep" and token[1] == '[':
+ self.type = self.type + token[1]
+ token = self.token()
+ while token != None and token[0] != 'sep' and \
+ token[1] != ']' and token[1] != ';':
+ self.type = self.type + token[1]
+ token = self.token()
+ if token != None and token[0] == 'sep' and token[1] == ']':
+ self.type = self.type + token[1]
+ token = self.token()
+ else:
+ self.error("parsing array type, ']' expected", token);
+ return token
+ elif token != None and token[0] == "sep" and token[1] == ':':
+ # remove :12 in case it's a limited int size
+ token = self.token()
+ token = self.token()
+ self.lexer.push(token)
+ token = nametok
+
+ return token
+
+ #
+ # Parse a signature: '(' has been parsed and we scan the type definition
+ # up to the ')' included
+ def parseSignature(self, token):
+ signature = []
+ if token != None and token[0] == "sep" and token[1] == ')':
+ self.signature = []
+ token = self.token()
+ return token
+ while token != None:
+ token = self.parseType(token)
+ if token != None and token[0] == "name":
+ signature.append((self.type, token[1], None))
+ token = self.token()
+ elif token != None and token[0] == "sep" and token[1] == ',':
+ token = self.token()
+ continue
+ elif token != None and token[0] == "sep" and token[1] == ')':
+ # only the type was provided
+ if self.type == "...":
+ signature.append((self.type, "...", None))
+ else:
+ signature.append((self.type, None, None))
+ if token != None and token[0] == "sep":
+ if token[1] == ',':
+ token = self.token()
+ continue
+ elif token[1] == ')':
+ token = self.token()
+ break
+ self.signature = signature
+ return token
+
+ #
+ # Parse a global definition, be it a type, variable or function
+ # the extern "C" blocks are a bit nasty and require it to recurse.
+ #
+ def parseGlobal(self, token):
+ static = 0
+ if token[1] == 'extern':
+ token = self.token()
+ if token == None:
+ return token
+ if token[0] == 'string':
+ if token[1] == 'C':
+ token = self.token()
+ if token == None:
+ return token
+ if token[0] == 'sep' and token[1] == "{":
+ token = self.token()
+# print 'Entering extern "C line ', self.lineno()
+ while token != None and (token[0] != 'sep' or
+ token[1] != "}"):
+ if token[0] == 'name':
+ token = self.parseGlobal(token)
+ else:
+ self.error(
+ "token %s %s unexpected at the top level" % (
+ token[0], token[1]))
+ token = self.parseGlobal(token)
+# print 'Exiting extern "C" line', self.lineno()
+ token = self.token()
+ return token
+ else:
+ return token
+ elif token[1] == 'static':
+ static = 1
+ token = self.token()
+ if token == None or token[0] != 'name':
+ return token
+
+ if token[1] == 'typedef':
+ token = self.token()
+ return self.parseTypedef(token)
+ else:
+ token = self.parseType(token)
+ type_orig = self.type
+ if token == None or token[0] != "name":
+ return token
+ type = type_orig
+ self.name = token[1]
+ token = self.token()
+ while token != None and (token[0] == "sep" or token[0] == "op"):
+ if token[0] == "sep":
+ if token[1] == "[":
+ type = type + token[1]
+ token = self.token()
+ while token != None and (token[0] != "sep" or \
+ token[1] != ";"):
+ type = type + token[1]
+ token = self.token()
+
+ if token != None and token[0] == "op" and token[1] == "=":
+ #
+ # Skip the initialization of the variable
+ #
+ token = self.token()
+ if token[0] == 'sep' and token[1] == '{':
+ token = self.token()
+ token = self.parseBlock(token)
+ else:
+ self.comment = None
+ while token != None and (token[0] != "sep" or \
+ (token[1] != ';' and token[1] != ',')):
+ token = self.token()
+ self.comment = None
+ if token == None or token[0] != "sep" or (token[1] != ';' and
+ token[1] != ','):
+ self.error("missing ';' or ',' after value")
+
+ if token != None and token[0] == "sep":
+ if token[1] == ";":
+ self.comment = None
+ token = self.token()
+ if type == "struct":
+ self.index_add(self.name, self.filename,
+ not self.is_header, "struct", self.struct_fields)
+ else:
+ self.index_add(self.name, self.filename,
+ not self.is_header, "variable", type)
+ break
+ elif token[1] == "(":
+ token = self.token()
+ token = self.parseSignature(token)
+ if token == None:
+ return None
+ if token[0] == "sep" and token[1] == ";":
+ d = self.mergeFunctionComment(self.name,
+ ((type, None), self.signature), 1)
+ self.index_add(self.name, self.filename, static,
+ "function", d)
+ token = self.token()
+ elif token[0] == "sep" and token[1] == "{":
+ d = self.mergeFunctionComment(self.name,
+ ((type, None), self.signature), static)
+ self.index_add(self.name, self.filename, static,
+ "function", d)
+ token = self.token()
+ token = self.parseBlock(token);
+ elif token[1] == ',':
+ self.comment = None
+ self.index_add(self.name, self.filename, static,
+ "variable", type)
+ type = type_orig
+ token = self.token()
+ while token != None and token[0] == "sep":
+ type = type + token[1]
+ token = self.token()
+ if token != None and token[0] == "name":
+ self.name = token[1]
+ token = self.token()
+ else:
+ break
+
+ return token
+
+ def parse(self):
+ self.warning("Parsing %s" % (self.filename))
+ token = self.token()
+ while token != None:
+ if token[0] == 'name':
+ token = self.parseGlobal(token)
+ else:
+ self.error("token %s %s unexpected at the top level" % (
+ token[0], token[1]))
+ token = self.parseGlobal(token)
+ return
+ self.parseTopComment(self.top_comment)
+ return self.index
+
+
+class docBuilder:
+ """A documentation builder"""
+ def __init__(self, name, directories=['.'], excludes=[]):
+ self.name = name
+ self.directories = directories
+ self.excludes = excludes + list(ignored_files.keys())
+ self.modules = {}
+ self.headers = {}
+ self.idx = index()
+ self.xref = {}
+ self.index = {}
+ if name == 'libxml2':
+ self.basename = 'libxml'
+ else:
+ self.basename = name
+
+ def indexString(self, id, str):
+ if str == None:
+ return
+ str = str.replace("'", ' ')
+ str = str.replace('"', ' ')
+ str = str.replace("/", ' ')
+ str = str.replace('*', ' ')
+ str = str.replace("[", ' ')
+ str = str.replace("]", ' ')
+ str = str.replace("(", ' ')
+ str = str.replace(")", ' ')
+ str = str.replace("<", ' ')
+ str = str.replace('>', ' ')
+ str = str.replace("&", ' ')
+ str = str.replace('#', ' ')
+ str = str.replace(",", ' ')
+ str = str.replace('.', ' ')
+ str = str.replace(';', ' ')
+ tokens = str.split()
+ for token in tokens:
+ try:
+ c = token[0]
+ if string.ascii_letters.find(c) < 0:
+ pass
+ elif len(token) < 3:
+ pass
+ else:
+ lower = token.lower()
+ # TODO: generalize this a bit
+ if lower == 'and' or lower == 'the':
+ pass
+ elif token in self.xref:
+ self.xref[token].append(id)
+ else:
+ self.xref[token] = [id]
+ except:
+ pass
+
+ def analyze(self):
+ print("Project %s : %d headers, %d modules" % (self.name, len(list(self.headers.keys())), len(list(self.modules.keys()))))
+ self.idx.analyze()
+
+ def scanHeaders(self):
+ for header in list(self.headers.keys()):
+ parser = CParser(header)
+ idx = parser.parse()
+ self.headers[header] = idx;
+ self.idx.merge(idx)
+
+ def scanModules(self):
+ for module in list(self.modules.keys()):
+ parser = CParser(module)
+ idx = parser.parse()
+ # idx.analyze()
+ self.modules[module] = idx
+ self.idx.merge_public(idx)
+
+ def scan(self):
+ for directory in self.directories:
+ files = glob.glob(directory + "/*.c")
+ for file in files:
+ skip = 0
+ for excl in self.excludes:
+ if file.find(excl) != -1:
+ print("Skipping %s" % file)
+ skip = 1
+ break
+ if skip == 0:
+ self.modules[file] = None;
+ files = glob.glob(directory + "/*.h")
+ for file in files:
+ skip = 0
+ for excl in self.excludes:
+ if file.find(excl) != -1:
+ print("Skipping %s" % file)
+ skip = 1
+ break
+ if skip == 0:
+ self.headers[file] = None;
+ self.scanHeaders()
+ self.scanModules()
+
+ def modulename_file(self, file):
+ module = os.path.basename(file)
+ if module[-2:] == '.h':
+ module = module[:-2]
+ elif module[-2:] == '.c':
+ module = module[:-2]
+ return module
+
+ def serialize_enum(self, output, name):
+ id = self.idx.enums[name]
+ output.write(" <enum name='%s' file='%s'" % (name,
+ self.modulename_file(id.header)))
+ if id.info != None:
+ info = id.info
+ if info[0] != None and info[0] != '':
+ try:
+ val = eval(info[0])
+ except:
+ val = info[0]
+ output.write(" value='%s'" % (val));
+ if info[2] != None and info[2] != '':
+ output.write(" type='%s'" % info[2]);
+ if info[1] != None and info[1] != '':
+ output.write(" info='%s'" % escape(info[1]));
+ output.write("/>\n")
+
+ def serialize_macro(self, output, name):
+ id = self.idx.macros[name]
+ output.write(" <macro name='%s' file='%s'>\n" % (name,
+ self.modulename_file(id.header)))
+ if id.info != None:
+ try:
+ (args, desc) = id.info
+ if desc != None and desc != "":
+ output.write(" <info>%s</info>\n" % (escape(desc)))
+ self.indexString(name, desc)
+ for arg in args:
+ (name, desc) = arg
+ if desc != None and desc != "":
+ output.write(" <arg name='%s' info='%s'/>\n" % (
+ name, escape(desc)))
+ self.indexString(name, desc)
+ else:
+ output.write(" <arg name='%s'/>\n" % (name))
+ except:
+ pass
+ output.write(" </macro>\n")
+
+ def serialize_typedef(self, output, name):
+ id = self.idx.typedefs[name]
+ if id.info[0:7] == 'struct ':
+ output.write(" <struct name='%s' file='%s' type='%s'" % (
+ name, self.modulename_file(id.header), id.info))
+ name = id.info[7:]
+ if name in self.idx.structs and ( \
+ type(self.idx.structs[name].info) == type(()) or
+ type(self.idx.structs[name].info) == type([])):
+ output.write(">\n");
+ try:
+ for field in self.idx.structs[name].info:
+ desc = field[2]
+ self.indexString(name, desc)
+ if desc == None:
+ desc = ''
+ else:
+ desc = escape(desc)
+ output.write(" <field name='%s' type='%s' info='%s'/>\n" % (field[1] , field[0], desc))
+ except:
+ print("Failed to serialize struct %s" % (name))
+ output.write(" </struct>\n")
+ else:
+ output.write("/>\n");
+ else :
+ output.write(" <typedef name='%s' file='%s' type='%s'" % (
+ name, self.modulename_file(id.header), id.info))
+ try:
+ desc = id.extra
+ if desc != None and desc != "":
+ output.write(">\n <info>%s</info>\n" % (escape(desc)))
+ output.write(" </typedef>\n")
+ else:
+ output.write("/>\n")
+ except:
+ output.write("/>\n")
+
+ def serialize_variable(self, output, name):
+ id = self.idx.variables[name]
+ if id.info != None:
+ output.write(" <variable name='%s' file='%s' type='%s'/>\n" % (
+ name, self.modulename_file(id.header), id.info))
+ else:
+ output.write(" <variable name='%s' file='%s'/>\n" % (
+ name, self.modulename_file(id.header)))
+
+ def serialize_function(self, output, name):
+ id = self.idx.functions[name]
+ if name == debugsym:
+ print("=>", id)
+
+ output.write(" <%s name='%s' file='%s' module='%s'>\n" % (id.type,
+ name, self.modulename_file(id.header),
+ self.modulename_file(id.module)))
+ #
+ # Processing of conditionals modified by Bill 1/1/05
+ #
+ if id.conditionals != None:
+ apstr = ""
+ for cond in id.conditionals:
+ if apstr != "":
+ apstr = apstr + " &amp;&amp; "
+ apstr = apstr + cond
+ output.write(" <cond>%s</cond>\n"% (apstr));
+ try:
+ (ret, params, desc) = id.info
+ if (desc == None or desc == '') and \
+ name[0:9] != "xmlThrDef" and name != "xmlDllMain":
+ print("%s %s from %s has no description" % (id.type, name,
+ self.modulename_file(id.module)))
+
+ output.write(" <info>%s</info>\n" % (escape(desc)))
+ self.indexString(name, desc)
+ if ret[0] != None:
+ if ret[0] == "void":
+ output.write(" <return type='void'/>\n")
+ else:
+ output.write(" <return type='%s' info='%s'/>\n" % (
+ ret[0], escape(ret[1])))
+ self.indexString(name, ret[1])
+ for param in params:
+ if param[0] == 'void':
+ continue
+ if param[2] == None:
+ output.write(" <arg name='%s' type='%s' info=''/>\n" % (param[1], param[0]))
+ else:
+ output.write(" <arg name='%s' type='%s' info='%s'/>\n" % (param[1], param[0], escape(param[2])))
+ self.indexString(name, param[2])
+ except:
+ print("Failed to save function %s info: " % name, repr(id.info))
+ output.write(" </%s>\n" % (id.type))
+
+ def serialize_exports(self, output, file):
+ module = self.modulename_file(file)
+ output.write(" <file name='%s'>\n" % (module))
+ dict = self.headers[file]
+ if dict.info != None:
+ for data in ('Summary', 'Description', 'Author'):
+ try:
+ output.write(" <%s>%s</%s>\n" % (
+ data.lower(),
+ escape(dict.info[data]),
+ data.lower()))
+ except:
+ print("Header %s lacks a %s description" % (module, data))
+ if 'Description' in dict.info:
+ desc = dict.info['Description']
+ if desc.find("DEPRECATED") != -1:
+ output.write(" <deprecated/>\n")
+
+ ids = list(dict.macros.keys())
+ ids.sort()
+ for id in uniq(ids):
+ # Macros are sometime used to masquerade other types.
+ if id in dict.functions:
+ continue
+ if id in dict.variables:
+ continue
+ if id in dict.typedefs:
+ continue
+ if id in dict.structs:
+ continue
+ if id in dict.enums:
+ continue
+ output.write(" <exports symbol='%s' type='macro'/>\n" % (id))
+ ids = list(dict.enums.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='enum'/>\n" % (id))
+ ids = list(dict.typedefs.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='typedef'/>\n" % (id))
+ ids = list(dict.structs.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='struct'/>\n" % (id))
+ ids = list(dict.variables.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='variable'/>\n" % (id))
+ ids = list(dict.functions.keys())
+ ids.sort()
+ for id in uniq(ids):
+ output.write(" <exports symbol='%s' type='function'/>\n" % (id))
+ output.write(" </file>\n")
+
+ def serialize_xrefs_files(self, output):
+ headers = list(self.headers.keys())
+ headers.sort()
+ for file in headers:
+ module = self.modulename_file(file)
+ output.write(" <file name='%s'>\n" % (module))
+ dict = self.headers[file]
+ ids = uniq(list(dict.functions.keys()) + list(dict.variables.keys()) + \
+ list(dict.macros.keys()) + list(dict.typedefs.keys()) + \
+ list(dict.structs.keys()) + list(dict.enums.keys()))
+ ids.sort()
+ for id in ids:
+ output.write(" <ref name='%s'/>\n" % (id))
+ output.write(" </file>\n")
+ pass
+
+ def serialize_xrefs_functions(self, output):
+ funcs = {}
+ for name in list(self.idx.functions.keys()):
+ id = self.idx.functions[name]
+ try:
+ (ret, params, desc) = id.info
+ for param in params:
+ if param[0] == 'void':
+ continue
+ if param[0] in funcs:
+ funcs[param[0]].append(name)
+ else:
+ funcs[param[0]] = [name]
+ except:
+ pass
+ typ = list(funcs.keys())
+ typ.sort()
+ for type in typ:
+ if type == '' or type == 'void' or type == "int" or \
+ type == "char *" or type == "const char *" :
+ continue
+ output.write(" <type name='%s'>\n" % (type))
+ ids = funcs[type]
+ ids.sort()
+ pid = '' # not sure why we have dups, but get rid of them!
+ for id in ids:
+ if id != pid:
+ output.write(" <ref name='%s'/>\n" % (id))
+ pid = id
+ output.write(" </type>\n")
+
+ def serialize_xrefs_constructors(self, output):
+ funcs = {}
+ for name in list(self.idx.functions.keys()):
+ id = self.idx.functions[name]
+ try:
+ (ret, params, desc) = id.info
+ if ret[0] == "void":
+ continue
+ if ret[0] in funcs:
+ funcs[ret[0]].append(name)
+ else:
+ funcs[ret[0]] = [name]
+ except:
+ pass
+ typ = list(funcs.keys())
+ typ.sort()
+ for type in typ:
+ if type == '' or type == 'void' or type == "int" or \
+ type == "char *" or type == "const char *" :
+ continue
+ output.write(" <type name='%s'>\n" % (type))
+ ids = funcs[type]
+ ids.sort()
+ for id in ids:
+ output.write(" <ref name='%s'/>\n" % (id))
+ output.write(" </type>\n")
+
+ def serialize_xrefs_alpha(self, output):
+ letter = None
+ ids = list(self.idx.identifiers.keys())
+ ids.sort()
+ for id in ids:
+ if id[0] != letter:
+ if letter != None:
+ output.write(" </letter>\n")
+ letter = id[0]
+ output.write(" <letter name='%s'>\n" % (letter))
+ output.write(" <ref name='%s'/>\n" % (id))
+ if letter != None:
+ output.write(" </letter>\n")
+
+ def serialize_xrefs_references(self, output):
+ typ = list(self.idx.identifiers.keys())
+ typ.sort()
+ for id in typ:
+ idf = self.idx.identifiers[id]
+ module = idf.header
+ output.write(" <reference name='%s' href='%s'/>\n" % (id,
+ 'html/' + self.basename + '-' +
+ self.modulename_file(module) + '.html#' +
+ id))
+
+ def serialize_xrefs_index(self, output):
+ index = self.xref
+ typ = list(index.keys())
+ typ.sort()
+ letter = None
+ count = 0
+ chunk = 0
+ chunks = []
+ for id in typ:
+ if len(index[id]) > 30:
+ continue
+ if id[0] != letter:
+ if letter == None or count > 200:
+ if letter != None:
+ output.write(" </letter>\n")
+ output.write(" </chunk>\n")
+ count = 0
+ chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ output.write(" <chunk name='chunk%s'>\n" % (chunk))
+ first_letter = id[0]
+ chunk = chunk + 1
+ elif letter != None:
+ output.write(" </letter>\n")
+ letter = id[0]
+ output.write(" <letter name='%s'>\n" % (letter))
+ output.write(" <word name='%s'>\n" % (id))
+ tokens = index[id];
+ tokens.sort()
+ tok = None
+ for token in tokens:
+ if tok == token:
+ continue
+ tok = token
+ output.write(" <ref name='%s'/>\n" % (token))
+ count = count + 1
+ output.write(" </word>\n")
+ if letter != None:
+ output.write(" </letter>\n")
+ output.write(" </chunk>\n")
+ if count != 0:
+ chunks.append(["chunk%s" % (chunk -1), first_letter, letter])
+ output.write(" <chunks>\n")
+ for ch in chunks:
+ output.write(" <chunk name='%s' start='%s' end='%s'/>\n" % (
+ ch[0], ch[1], ch[2]))
+ output.write(" </chunks>\n")
+
+ def serialize_xrefs(self, output):
+ output.write(" <references>\n")
+ self.serialize_xrefs_references(output)
+ output.write(" </references>\n")
+ output.write(" <alpha>\n")
+ self.serialize_xrefs_alpha(output)
+ output.write(" </alpha>\n")
+ output.write(" <constructors>\n")
+ self.serialize_xrefs_constructors(output)
+ output.write(" </constructors>\n")
+ output.write(" <functions>\n")
+ self.serialize_xrefs_functions(output)
+ output.write(" </functions>\n")
+ output.write(" <files>\n")
+ self.serialize_xrefs_files(output)
+ output.write(" </files>\n")
+ output.write(" <index>\n")
+ self.serialize_xrefs_index(output)
+ output.write(" </index>\n")
+
+ def serialize(self):
+ filename = "%s-api.xml" % self.name
+ print("Saving XML description %s" % (filename))
+ output = open(filename, "w")
+ output.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
+ output.write("<api name='%s'>\n" % self.name)
+ output.write(" <files>\n")
+ headers = list(self.headers.keys())
+ headers.sort()
+ for file in headers:
+ self.serialize_exports(output, file)
+ output.write(" </files>\n")
+ output.write(" <symbols>\n")
+ macros = list(self.idx.macros.keys())
+ macros.sort()
+ for macro in macros:
+ self.serialize_macro(output, macro)
+ enums = list(self.idx.enums.keys())
+ enums.sort()
+ for enum in enums:
+ self.serialize_enum(output, enum)
+ typedefs = list(self.idx.typedefs.keys())
+ typedefs.sort()
+ for typedef in typedefs:
+ self.serialize_typedef(output, typedef)
+ variables = list(self.idx.variables.keys())
+ variables.sort()
+ for variable in variables:
+ self.serialize_variable(output, variable)
+ functions = list(self.idx.functions.keys())
+ functions.sort()
+ for function in functions:
+ self.serialize_function(output, function)
+ output.write(" </symbols>\n")
+ output.write("</api>\n")
+ output.close()
+
+ filename = "%s-refs.xml" % self.name
+ print("Saving XML Cross References %s" % (filename))
+ output = open(filename, "w")
+ output.write('<?xml version="1.0" encoding="ISO-8859-1"?>\n')
+ output.write("<apirefs name='%s'>\n" % self.name)
+ self.serialize_xrefs(output)
+ output.write("</apirefs>\n")
+ output.close()
+
+
+def rebuild():
+ builder = None
+ if glob.glob("parser.c") != [] :
+ print("Rebuilding API description for libxml2")
+ builder = docBuilder("libxml2", [".", "."],
+ ["xmlwin32version.h", "tst.c"])
+ elif glob.glob("../parser.c") != [] :
+ print("Rebuilding API description for libxml2")
+ builder = docBuilder("libxml2", ["..", "../include/libxml"],
+ ["xmlwin32version.h", "tst.c"])
+ elif glob.glob("../libxslt/transform.c") != [] :
+ print("Rebuilding API description for libxslt")
+ builder = docBuilder("libxslt", ["../libxslt"],
+ ["win32config.h", "libxslt.h", "tst.c"])
+ else:
+ print("rebuild() failed, unable to guess the module")
+ return None
+ builder.scan()
+ builder.analyze()
+ builder.serialize()
+ if glob.glob("../libexslt/exslt.c") != [] :
+ extra = docBuilder("libexslt", ["../libexslt"], ["libexslt.h"])
+ extra.scan()
+ extra.analyze()
+ extra.serialize()
+ return builder
+
+#
+# for debugging the parser
+#
+def parse(filename):
+ parser = CParser(filename)
+ idx = parser.parse()
+ return idx
+
+if __name__ == "__main__":
+ if len(sys.argv) > 1:
+ debug = 1
+ parse(sys.argv[1])
+ else:
+ rebuild()
diff --git a/doc/architecture.html b/doc/architecture.html
new file mode 100644
index 0000000..62a922f
--- /dev/null
+++ b/doc/architecture.html
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>libxml2 architecture</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>libxml2 architecture</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Libxml2 is made of multiple components; some of them are optional, and
+most of the block interfaces are public. The main components are:</p><ul>
+ <li>an Input/Output layer</li>
+ <li>FTP and HTTP client layers (optional)</li>
+ <li>an Internationalization layer managing the encodings support</li>
+ <li>a URI module</li>
+ <li>the XML parser and its basic SAX interface</li>
+ <li>an HTML parser using the same SAX interface (optional)</li>
+ <li>a SAX tree module to build an in-memory DOM representation</li>
+ <li>a tree module to manipulate the DOM representation</li>
+ <li>a validation module using the DOM representation (optional)</li>
+ <li>an XPath module for global lookup in a DOM representation
+ (optional)</li>
+ <li>a debug module (optional)</li>
+</ul><p>Graphically this gives the following:</p><p><img src="libxml.gif" alt="a graphical view of the various" /></p><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/bugs.html b/doc/bugs.html
new file mode 100644
index 0000000..55ff296
--- /dev/null
+++ b/doc/bugs.html
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Well, bugs or missing features are always possible, and I will make a
+point of fixing them in a timely fashion. The best way to report a bug is to
+use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome
+bug tracking database</a> (make sure to use the "libxml2" module name). I
+look at reports there regularly and it's good to have a reminder when a bug
+is still open. Be sure to specify that the bug is for the package libxml2.</p><p>For small problems you can try to get help on IRC, the #xml channel on
+irc.gnome.org (port 6667) usually have a few person subscribed which may help
+(but there is no guarantee and if a real issue is raised it should go on the
+mailing-list for archival).</p><p>There is also a mailing-list <a href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a href="http://xmlsoft.org/messages">old</a>). To subscribe to this list,
+please visit the <a href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and
+follow the instructions. <strong>Do not send code, I won't debug it</strong>
+(but patches are really appreciated!).</p><p>Please note that with the current amount of virus and SPAM, sending mail
+to the list without being subscribed won't work. There is *far too many
+bounces* (in the order of a thousand a day !) I cannot approve them manually
+anymore. If your mail to the list bounced waiting for administrator approval,
+it is LOST ! Repost it and fix the problem triggering the error. Also please
+note that <span style="color: #FF0000; background-color: #FFFFFF">emails with
+a legal warning asking to not copy or redistribute freely the information
+they contain</span> are <strong>NOT</strong> acceptable for the mailing-list,
+such mail will as much as possible be discarded automatically, and are less
+likely to be answered if they made it to the list, <strong>DO NOT</strong>
+post to the list from an email address where such legal requirements are
+automatically added, get private paying support if you can't share
+information.</p><p>Check the following <strong><span style="color: #FF0000">before
+posting</span></strong>:</p><ul>
+ <li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
+ search engine</a> to get information related to your problem.</li>
+ <li>Make sure you are <a href="ftp://xmlsoft.org/libxml2/">using a recent
+ version</a>, and that the problem still shows up in a recent version.</li>
+ <li>Check the <a href="http://mail.gnome.org/archives/xml/">list
+ archives</a> to see if the problem was reported already. In this case
+ there is probably a fix available, similarly check the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">registered
+ open bugs</a>.</li>
+ <li>Make sure you can reproduce the bug with xmllint or one of the test
+ programs found in source in the distribution.</li>
+ <li>Please send the command showing the error as well as the input (as an
+ attachment)</li>
+</ul><p>Then send the bug with associated information to reproduce it to the <a href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
+related I will approve it. Please do not send mail to me directly, it makes
+things really hard to track and in some cases I am not the best person to
+answer a given question, ask on the list.</p><p>To <span style="color: #E50000">be really clear about support</span>:</p><ul>
+ <li>Support or help <span style="color: #E50000">requests MUST be sent to
+ the list or on bugzilla</span> in case of problems, so that the Question
+ and Answers can be shared publicly. Failing to do so carries the implicit
+ message "I want free support but I don't want to share the benefits with
+ others" and is not welcome. I will automatically Carbon-Copy the
+ xml@gnome.org mailing list for any technical reply made about libxml2 or
+ libxslt.</li>
+ <li>There is <span style="color: #E50000">no guarantee of support</span>. If
+ your question remains unanswered after a week, repost it, making sure you
+ gave all the detail needed and the information requested.</li>
+ <li>Failing to provide information as requested or double checking first
+ for prior feedback also carries the implicit message "the time of the
+ library maintainers is less valuable than my time" and might not be
+ welcome.</li>
+</ul><p>Of course, bugs reported with a suggested patch for fixing them will
+probably be processed faster than those without.</p><p>If you're looking for help, a quick look at <a href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually
+provide the answer. I usually send source samples when answering libxml2
+usage questions. The <a href="http://xmlsoft.org/html/book1.html">auto-generated documentation</a> is
+not as polished as I would like (i need to learn more about DocBook), but
+it's a good starting point.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/catalog.gif b/doc/catalog.gif
new file mode 100644
index 0000000..f2e2bd3
--- /dev/null
+++ b/doc/catalog.gif
Binary files differ
diff --git a/doc/catalog.html b/doc/catalog.html
new file mode 100644
index 0000000..3d5bbe1
--- /dev/null
+++ b/doc/catalog.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Catalog support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Catalog support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol>
+ <li><a href="General2">General overview</a></li>
+ <li><a href="#definition">The definition</a></li>
+ <li><a href="#Simple">Using catalogs</a></li>
+ <li><a href="#Some">Some examples</a></li>
+ <li><a href="#reference">How to tune catalog usage</a></li>
+ <li><a href="#validate">How to debug catalog processing</a></li>
+ <li><a href="#Declaring">How to create and maintain catalogs</a></li>
+ <li><a href="#implemento">The implementor corner quick review of the
+ API</a></li>
+ <li><a href="#Other">Other resources</a></li>
+</ol><h3><a name="General2" id="General2">General overview</a></h3><p>What is a catalog? Basically it's a lookup mechanism used when an entity
+(a file or a remote resource) references another entity. The catalog lookup
+is inserted between the moment the reference is recognized by the software
+(XML parser, stylesheet processing, or even images referenced for inclusion
+in a rendering) and the time where loading that resource is actually
+started.</p><p>It is basically used for 3 things:</p><ul>
+ <li>mapping from "logical" names, the public identifiers and a more
+ concrete name usable for download (and URI). For example it can associate
+ the logical name
+ <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p>
+ <p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be
+ downloaded</p>
+ <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
+ </li>
+ <li>remapping from a given URL to another one, like an HTTP indirection
+ saying that
+ <p>"http://www.oasis-open.org/committes/tr.xsl"</p>
+ <p>should really be looked at</p>
+ <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p>
+ </li>
+ <li>providing a local cache mechanism allowing to load the entities
+ associated to public identifiers or remote resources, this is a really
+ important feature for any significant deployment of XML or SGML since it
+ allows to avoid the aleas and delays associated to fetching remote
+ resources.</li>
+</ul><h3><a name="definition" id="definition">The definitions</a></h3><p>Libxml, as of 2.4.3 implements 2 kind of catalogs:</p><ul>
+ <li>the older SGML catalogs, the official spec is SGML Open Technical
+ Resolution TR9401:1997, but is better understood by reading <a href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from
+ James Clark. This is relatively old and not the preferred mode of
+ operation of libxml.</li>
+ <li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML
+ Catalogs</a> is far more flexible, more recent, uses an XML syntax and
+ should scale quite better. This is the default option of libxml.</li>
+</ul><p></p><h3><a name="Simple" id="Simple">Using catalog</a></h3><p>In a normal environment libxml2 will by default check the presence of a
+catalog in /etc/xml/catalog, and assuming it has been correctly populated,
+the processing is completely transparent to the document user. To take a
+concrete example, suppose you are authoring a DocBook document, this one
+starts with the following DOCTYPE definition:</p><pre>&lt;?xml version='1.0'?&gt;
+&lt;!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
+ "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"&gt;</pre><p>When validating the document with libxml, the catalog will be
+automatically consulted to lookup the public identifier "-//Norman Walsh//DTD
+DocBk XML V3.1.4//EN" and the system identifier
+"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have
+been installed on your system and the catalogs actually point to them, libxml
+will fetch them from the local disk.</p><p style="font-size: 10pt"><strong>Note</strong>: Really don't use this
+DOCTYPE example it's a really old version, but is fine as an example.</p><p>Libxml2 will check the catalog each time that it is requested to load an
+entity, this includes DTD, external parsed entities, stylesheets, etc ... If
+your system is correctly configured all the authoring phase and processing
+should use only local files, even if your document stays portable because it
+uses the canonical public and system ID, referencing the remote document.</p><h3><a name="Some" id="Some">Some examples:</a></h3><p>Here is a couple of fragments from XML Catalogs used in libxml2 early
+regression tests in <code>test/catalogs</code> :</p><pre>&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC
+ "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
+ &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
+ uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
+...</pre><p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are
+written in XML, there is a specific namespace for catalog elements
+"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this
+catalog is a <code>public</code> mapping it allows to associate a Public
+Identifier with an URI.</p><pre>...
+ &lt;rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
+ rewritePrefix="file:///usr/share/xml/docbook/"/&gt;
+...</pre><p>A <code>rewriteSystem</code> is a very powerful instruction, it says that
+any URI starting with a given prefix should be looked at another URI
+constructed by replacing the prefix with an new one. In effect this acts like
+a cache system for a full area of the Web. In practice it is extremely useful
+with a file prefix if you have installed a copy of those resources on your
+local system.</p><pre>...
+&lt;delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegateURI uriStartString="http://www.oasis-open.org/docbook/"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+...</pre><p>Delegation is the core features which allows to build a tree of catalogs,
+easier to maintain than a single catalog, based on Public Identifier, System
+Identifier or URI prefixes it instructs the catalog software to look up
+entries in another resource. This feature allow to build hierarchies of
+catalogs, the set of entries presented should be sufficient to redirect the
+resolution of all DocBook references to the specific catalog in
+<code>/usr/share/xml/docbook.xml</code> this one in turn could delegate all
+references for DocBook 4.2.1 to a specific catalog installed at the same time
+as the DocBook resources on the local machine.</p><h3><a name="reference" id="reference">How to tune catalog usage:</a></h3><p>The user can change the default catalog behaviour by redirecting queries
+to its own set of catalogs, this can be done by setting the
+<code>XML_CATALOG_FILES</code> environment variable to a list of catalogs, an
+empty one should deactivate loading the default <code>/etc/xml/catalog</code>
+default catalog</p><h3><a name="validate" id="validate">How to debug catalog processing:</a></h3><p>Setting up the <code>XML_DEBUG_CATALOG</code> environment variable will
+make libxml2 output debugging information for each catalog operations, for
+example:</p><pre>orchis:~/XML -&gt; xmllint --memory --noout test/ent2
+warning: failed to load external entity "title.xml"
+orchis:~/XML -&gt; export XML_DEBUG_CATALOG=
+orchis:~/XML -&gt; xmllint --memory --noout test/ent2
+Failed to parse catalog /etc/xml/catalog
+Failed to parse catalog /etc/xml/catalog
+warning: failed to load external entity "title.xml"
+Catalogs cleanup
+orchis:~/XML -&gt; </pre><p>The test/ent2 references an entity, running the parser from memory makes
+the base URI unavailable and the the "title.xml" entity cannot be loaded.
+Setting up the debug environment variable allows to detect that an attempt is
+made to load the <code>/etc/xml/catalog</code> but since it's not present the
+resolution fails.</p><p>But the most advanced way to debug XML catalog processing is to use the
+<strong>xmlcatalog</strong> command shipped with libxml2, it allows to load
+catalogs and make resolution queries to see what is going on. This is also
+used for the regression tests:</p><pre>orchis:~/XML -&gt; ./xmlcatalog test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+orchis:~/XML -&gt; </pre><p>For debugging what is going on, adding one -v flags increase the verbosity
+level to indicate the processing done (adding a second flag also indicate
+what elements are recognized at parsing):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -v test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+Parsing catalog test/catalogs/docbook.xml's content
+Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+Catalogs cleanup
+orchis:~/XML -&gt; </pre><p>A shell interface is also available to debug and process multiple queries
+(and for regression tests):</p><pre>orchis:~/XML -&gt; ./xmlcatalog -shell test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+&gt; help
+Commands available:
+public PublicID: make a PUBLIC identifier lookup
+system SystemID: make a SYSTEM identifier lookup
+resolve PublicID SystemID: do a full resolver lookup
+add 'type' 'orig' 'replace' : add an entry
+del 'values' : remove values
+dump: print the current catalog state
+debug: increase the verbosity level
+quiet: decrease the verbosity level
+exit: quit the shell
+&gt; public "-//OASIS//DTD DocBook XML V4.1.2//EN"
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+&gt; quit
+orchis:~/XML -&gt; </pre><p>This should be sufficient for most debugging purpose, this was actually
+used heavily to debug the XML Catalog implementation itself.</p><h3><a name="Declaring" id="Declaring">How to create and maintain</a> catalogs:</h3><p>Basically XML Catalogs are XML files, you can either use XML tools to
+manage them or use <strong>xmlcatalog</strong> for this. The basic step is
+to create a catalog the -create option provide this facility:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --create tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
+orchis:~/XML -&gt; </pre><p>By default xmlcatalog does not overwrite the original catalog and save the
+result on the standard output, this can be overridden using the -noout
+option. The <code>-add</code> command allows to add entries in the
+catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --noout --create --add "public" \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+ http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
+orchis:~/XML -&gt; cat tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
+&lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
+ uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
+&lt;/catalog&gt;
+orchis:~/XML -&gt; </pre><p>The <code>-add</code> option will always take 3 parameters even if some of
+the XML Catalog constructs (like nextCatalog) will have only a single
+argument, just pass a third empty string, it will be ignored.</p><p>Similarly the <code>-del</code> option remove matching entries from the
+catalog:</p><pre>orchis:~/XML -&gt; ./xmlcatalog --del \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
+orchis:~/XML -&gt; </pre><p>The catalog is now empty. Note that the matching of <code>-del</code> is
+exact and would have worked in a similar fashion with the Public ID
+string.</p><p>This is rudimentary but should be sufficient to manage a not too complex
+catalog tree of resources.</p><h3><a name="implemento" id="implemento">The implementor corner quick review of the
+API:</a></h3><p>First, and like for every other module of libxml, there is an
+automatically generated <a href="html/libxml-catalog.html">API page for
+catalog support</a>.</p><p>The header for the catalog interfaces should be included as:</p><pre>#include &lt;libxml/catalog.h&gt;</pre><p>The API is voluntarily kept very simple. First it is not obvious that
+applications really need access to it since it is the default behaviour of
+libxml2 (Note: it is possible to completely override libxml2 default catalog
+by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to
+plug an application specific resolver).</p><p>Basically libxml2 support 2 catalog lists:</p><ul>
+ <li>the default one, global shared by all the application</li>
+ <li>a per-document catalog, this one is built if the document uses the
+ <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
+ associated to the parser context and destroyed when the parsing context
+ is destroyed.</li>
+</ul><p>the document one will be used first if it exists.</p><h4>Initialization routines:</h4><p>xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() should be
+used at startup to initialize the catalog, if the catalog should be
+initialized with specific values xmlLoadCatalog() or xmlLoadCatalogs()
+should be called before xmlInitializeCatalog() which would otherwise do a
+default initialization first.</p><p>The xmlCatalogAddLocal() call is used by the parser to grow the document
+own catalog list if needed.</p><h4>Preferences setup:</h4><p>The XML Catalog spec requires the possibility to select default
+preferences between public and system delegation,
+xmlCatalogSetDefaultPrefer() allows this, xmlCatalogSetDefaults() and
+xmlCatalogGetDefaults() allow to control if XML Catalogs resolution should
+be forbidden, allowed for global catalog, for document catalog or both, the
+default is to allow both.</p><p>And of course xmlCatalogSetDebug() allows to generate debug messages
+(through the xmlGenericError() mechanism).</p><h4>Querying routines:</h4><p>xmlCatalogResolve(), xmlCatalogResolveSystem(), xmlCatalogResolvePublic()
+and xmlCatalogResolveURI() are relatively explicit if you read the XML
+Catalog specification they correspond to section 7 algorithms, they should
+also work if you have loaded an SGML catalog with a simplified semantic.</p><p>xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the same but
+operate on the document catalog list</p><h4>Cleanup and Miscellaneous:</h4><p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is
+the per-document equivalent.</p><p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically modify the
+first catalog in the global list, and xmlCatalogDump() allows to dump a
+catalog state, those routines are primarily designed for xmlcatalog, I'm not
+sure that exposing more complex interfaces (like navigation ones) would be
+really useful.</p><p>The xmlParseCatalogFile() is a function used to load XML Catalog files,
+it's similar as xmlParseFile() except it bypass all catalog lookups, it's
+provided because this functionality may be useful for client tools.</p><h4>threaded environments:</h4><p>Since the catalog tree is built progressively, some care has been taken to
+try to avoid troubles in multithreaded environments. The code is now thread
+safe assuming that the libxml2 library has been compiled with threads
+support.</p><p></p><h3><a name="Other" id="Other">Other resources</a></h3><p>The XML Catalog specification is relatively recent so there isn't much
+literature to point at:</p><ul>
+ <li>You can find a good rant from Norm Walsh about <a href="http://www.arbortext.com/Think_Tank/XML_Resources/Issue_Three/issue_three.html">the
+ need for catalogs</a>, it provides a lot of context information even if
+ I don't agree with everything presented. Norm also wrote a more recent
+ article <a href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML
+ entities and URI resolvers</a> describing them.</li>
+ <li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML
+ catalog proposal</a> from John Cowan</li>
+ <li>The <a href="http://www.rddl.org/">Resource Directory Description
+ Language</a> (RDDL) another catalog system but more oriented toward
+ providing metadata for XML namespaces.</li>
+ <li>the page from the OASIS Technical <a href="http://www.oasis-open.org/committees/entity/">Committee on Entity
+ Resolution</a> who maintains XML Catalog, you will find pointers to the
+ specification update, some background and pointers to others tools
+ providing XML Catalog support</li>
+ <li>There is a <a href="buildDocBookCatalog">shell script</a> to generate
+ XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/
+ directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
+ the resources found on the system. Otherwise it will just create
+ ~/xmlcatalog and ~/dbkxmlcatalog and doing:
+ <p><code>export XML_CATALOG_FILES=$HOME/xmlcatalog</code></p>
+ <p>should allow to process DocBook documentations without requiring
+ network accesses for the DTD or stylesheets</p>
+ </li>
+ <li>I have uploaded <a href="ftp://xmlsoft.org/libxml2/test/dbk412catalog.tar.gz">a
+ small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems
+ to work fine for me too</li>
+ <li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog
+ manual page</a></li>
+</ul><p>If you have suggestions for corrections or additions, simply contact
+me:</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/checkapisym.xsl b/doc/checkapisym.xsl
new file mode 100644
index 0000000..8591393
--- /dev/null
+++ b/doc/checkapisym.xsl
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!-- This stylesheet is used to check that symbols exported
+ from libxml2-api.xml are also present in the symbol file
+ symbols.xml which is used to generate libxml2.syms setting
+ up the allowed access point to the shared libraries -->
+
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:variable name="syms" select="document('symbols.xml')"/>
+
+ <xsl:template match="/">
+ <xsl:message terminate="no">
+ <xsl:text>Looking for functions in symbols.xml</xsl:text>
+ </xsl:message>
+ <xsl:apply-templates select="/api/symbols/function"/>
+ <xsl:message terminate="no">
+ <xsl:text>Found </xsl:text>
+ <xsl:value-of select="count(/api/symbols/function)"/>
+ <xsl:text> functions</xsl:text>
+ </xsl:message>
+ <xsl:message terminate="no">
+ <xsl:text>Looking for variables in symbols.xml</xsl:text>
+ </xsl:message>
+ <xsl:apply-templates select="/api/symbols/variable"/>
+ <xsl:message terminate="no">
+ <xsl:text>Found </xsl:text>
+ <xsl:value-of select="count(/api/symbols/variable)"/>
+ <xsl:text> variables</xsl:text>
+ </xsl:message>
+ </xsl:template>
+
+ <xsl:template match="function|variable">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="symbol"
+ select="$syms/symbols/release/symbol[. = $name]"/>
+ <xsl:if test="string($symbol) != $name">
+ <xsl:message terminate="yes">
+ <xsl:text>Failed to find export in symbols.xml: </xsl:text>
+ <xsl:value-of select="$name"/>
+ </xsl:message>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/doc/contribs.html b/doc/contribs.html
new file mode 100644
index 0000000..37a50c9
--- /dev/null
+++ b/doc/contribs.html
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Contributions</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Contributions</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><ul>
+ <li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
+ patches, Gary Pennington worked on the validation API, threading support
+ and Solaris port.</li>
+ <li>John Fleck helps maintaining the documentation and man pages.</li>
+ <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the
+ maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
+ binaries</a></li>
+ <li><a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides
+ <a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
+ <li><a href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
+ Sergeant</a> developed <a href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
+ libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
+ application server</a></li>
+ <li><a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
+ documentation</li>
+ <li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a href="http://xmlsoft.org/messages/0488.html">man pages</a></li>
+ <li>there is a module for <a href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
+ in OpenNSD/AOLServer</a></li>
+ <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the
+ first version of libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li>
+ <li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
+ libxml2</a> with Kylix and Delphi and other Pascal compilers</li>
+ <li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the
+ <a href="http://www.w3.org/Signature/">XML Canonicalization and XML
+ Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li>
+ <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and
+ contributors maintain <a href="http://tclxml.sourceforge.net/">tcl
+ bindings for libxml2 and libxslt</a>, as well as <a href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
+ xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>
+ a GUI for xsltproc.</li>
+</ul><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/devhelp/Makefile.am b/doc/devhelp/Makefile.am
new file mode 100644
index 0000000..dad7975
--- /dev/null
+++ b/doc/devhelp/Makefile.am
@@ -0,0 +1,79 @@
+devhelpdir = $(datadir)/gtk-doc/html/libxml2
+
+dist_devhelp_DATA = \
+ libxml2.devhelp \
+ $(HTML_FILES) \
+ $(EXTRA_FORMAT)
+
+HTML_FILES = \
+ general.html \
+ index.html \
+ $(HTML_MODULES)
+
+HTML_MODULES= \
+ libxml2-c14n.html \
+ libxml2-catalog.html \
+ libxml2-chvalid.html \
+ libxml2-debugXML.html \
+ libxml2-dict.html \
+ libxml2-DOCBparser.html \
+ libxml2-encoding.html \
+ libxml2-entities.html \
+ libxml2-globals.html \
+ libxml2-hash.html \
+ libxml2-HTMLparser.html \
+ libxml2-HTMLtree.html \
+ libxml2-list.html \
+ libxml2-nanoftp.html \
+ libxml2-nanohttp.html \
+ libxml2-parser.html \
+ libxml2-parserInternals.html \
+ libxml2-pattern.html \
+ libxml2-relaxng.html \
+ libxml2-SAX2.html \
+ libxml2-SAX.html \
+ libxml2-schemasInternals.html \
+ libxml2-schematron.html \
+ libxml2-threads.html \
+ libxml2-tree.html \
+ libxml2-uri.html \
+ libxml2-valid.html \
+ libxml2-xinclude.html \
+ libxml2-xlink.html \
+ libxml2-xmlautomata.html \
+ libxml2-xmlerror.html \
+ libxml2-xmlexports.html \
+ libxml2-xmlIO.html \
+ libxml2-xmlmemory.html \
+ libxml2-xmlmodule.html \
+ libxml2-xmlreader.html \
+ libxml2-xmlregexp.html \
+ libxml2-xmlsave.html \
+ libxml2-xmlschemas.html \
+ libxml2-xmlschemastypes.html \
+ libxml2-xmlstring.html \
+ libxml2-xmlunicode.html \
+ libxml2-xmlversion.html \
+ libxml2-xmlwriter.html \
+ libxml2-xpath.html \
+ libxml2-xpathInternals.html \
+ libxml2-xpointer.html
+
+EXTRA_FORMAT= \
+ home.png \
+ left.png \
+ right.png \
+ up.png \
+ style.css
+
+EXTRA_DIST = devhelp.xsl html.xsl
+
+if REBUILD_DOCS
+rebuild: libxml2.devhelp $(HTML_FILES)
+.PHONY: rebuild
+
+libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo Rebuilding devhelp files ; \
+ $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi );
+endif
diff --git a/doc/devhelp/Makefile.in b/doc/devhelp/Makefile.in
new file mode 100644
index 0000000..4a86a2d
--- /dev/null
+++ b/doc/devhelp/Makefile.in
@@ -0,0 +1,668 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc/devhelp
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(dist_devhelp_DATA)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(devhelpdir)"
+DATA = $(dist_devhelp_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+devhelpdir = $(datadir)/gtk-doc/html/libxml2
+dist_devhelp_DATA = \
+ libxml2.devhelp \
+ $(HTML_FILES) \
+ $(EXTRA_FORMAT)
+
+HTML_FILES = \
+ general.html \
+ index.html \
+ $(HTML_MODULES)
+
+HTML_MODULES = \
+ libxml2-c14n.html \
+ libxml2-catalog.html \
+ libxml2-chvalid.html \
+ libxml2-debugXML.html \
+ libxml2-dict.html \
+ libxml2-DOCBparser.html \
+ libxml2-encoding.html \
+ libxml2-entities.html \
+ libxml2-globals.html \
+ libxml2-hash.html \
+ libxml2-HTMLparser.html \
+ libxml2-HTMLtree.html \
+ libxml2-list.html \
+ libxml2-nanoftp.html \
+ libxml2-nanohttp.html \
+ libxml2-parser.html \
+ libxml2-parserInternals.html \
+ libxml2-pattern.html \
+ libxml2-relaxng.html \
+ libxml2-SAX2.html \
+ libxml2-SAX.html \
+ libxml2-schemasInternals.html \
+ libxml2-schematron.html \
+ libxml2-threads.html \
+ libxml2-tree.html \
+ libxml2-uri.html \
+ libxml2-valid.html \
+ libxml2-xinclude.html \
+ libxml2-xlink.html \
+ libxml2-xmlautomata.html \
+ libxml2-xmlerror.html \
+ libxml2-xmlexports.html \
+ libxml2-xmlIO.html \
+ libxml2-xmlmemory.html \
+ libxml2-xmlmodule.html \
+ libxml2-xmlreader.html \
+ libxml2-xmlregexp.html \
+ libxml2-xmlsave.html \
+ libxml2-xmlschemas.html \
+ libxml2-xmlschemastypes.html \
+ libxml2-xmlstring.html \
+ libxml2-xmlunicode.html \
+ libxml2-xmlversion.html \
+ libxml2-xmlwriter.html \
+ libxml2-xpath.html \
+ libxml2-xpathInternals.html \
+ libxml2-xpointer.html
+
+EXTRA_FORMAT = \
+ home.png \
+ left.png \
+ right.png \
+ up.png \
+ style.css
+
+EXTRA_DIST = devhelp.xsl html.xsl
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/devhelp/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/devhelp/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-dist_devhelpDATA: $(dist_devhelp_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_devhelp_DATA)'; test -n "$(devhelpdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(devhelpdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(devhelpdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(devhelpdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(devhelpdir)" || exit $$?; \
+ done
+
+uninstall-dist_devhelpDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_devhelp_DATA)'; test -n "$(devhelpdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(devhelpdir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(devhelpdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_devhelpDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_devhelpDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_devhelpDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_devhelpDATA
+
+
+@REBUILD_DOCS_TRUE@rebuild: libxml2.devhelp $(HTML_FILES)
+@REBUILD_DOCS_TRUE@.PHONY: rebuild
+
+@REBUILD_DOCS_TRUE@libxml2.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/doc/libxml2-api.xml
+@REBUILD_DOCS_TRUE@ -@(if [ -x $(XSLTPROC) ] ; then \
+@REBUILD_DOCS_TRUE@ echo Rebuilding devhelp files ; \
+@REBUILD_DOCS_TRUE@ $(XSLTPROC) --nonet -o $(srcdir)/libxml2.devhelp $(srcdir)/devhelp.xsl $(top_srcdir)/doc/libxml2-api.xml ; fi );
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/devhelp/devhelp.xsl b/doc/devhelp/devhelp.xsl
new file mode 100644
index 0000000..f19c3f1
--- /dev/null
+++ b/doc/devhelp/devhelp.xsl
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.devhelp.net/book"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="exsl str"
+ exclude-result-prefixes="exsl str">
+ <!-- The stylesheet for the html pages -->
+ <xsl:import href="html.xsl"/>
+
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+ <!-- Build keys for all symbols -->
+ <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
+
+ <xsl:template match="/api">
+ <book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
+ <xsl:apply-templates select="files"/>
+ <xsl:apply-templates select="symbols"/>
+ </book>
+ <xsl:call-template name="generate_index"/>
+ <xsl:call-template name="generate_general"/>
+ </xsl:template>
+ <xsl:template match="/api/files">
+ <chapters>
+ <sub name="API" link="general.html">
+ <xsl:apply-templates select="file"/>
+ </sub>
+ </chapters>
+ </xsl:template>
+ <xsl:template match="/api/files/file">
+ <xsl:variable name="module" select="@name"/>
+ <xsl:variable name="prev" select="string(preceding-sibling::file[position()=1]/@name)"/>
+ <xsl:variable name="next" select="string(following-sibling::file[position()=1]/@name)"/>
+ <sub name="{@name}" link="libxml2-{@name}.html"/>
+ <xsl:document xmlns="" href="libxml2-{@name}.html" method="xml" indent="yes" encoding="UTF-8">
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <xsl:if test="$prev != ''">
+ <td><a accesskey="p" href="libxml2-{$prev}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"/></a></td>
+ </xsl:if>
+ <td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
+ <xsl:if test="$next != ''">
+ <td><a accesskey="n" href="libxml2-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
+ </xsl:if>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2><span class="refentrytitle"><xsl:value-of select="@name"/></span></h2>
+ <p><xsl:value-of select="@name"/> - <xsl:value-of select="summary"/></p>
+ <p><xsl:value-of select="description"/></p>
+ <xsl:if test="deprecated">
+ <p> WARNING: this module is deprecated !</p>
+ </xsl:if>
+ <p>Author(s): <xsl:value-of select="author"/></p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">
+ <xsl:apply-templates mode="synopsis" select="exports"/>
+ </pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <xsl:apply-templates mode="details" select="/api/symbols/macro[@file=$module]"/>
+ <xsl:apply-templates mode="details" select="/api/symbols/typedef[@file=$module] | /api/symbols/struct[@file=$module]"/>
+ <xsl:apply-templates mode="details" select="/api/symbols/functype[@file=$module]"/>
+ <xsl:apply-templates mode="details" select="/api/symbols/variable[@file=$module]"/>
+ <xsl:apply-templates mode="details" select="/api/symbols/function[@file=$module]"/>
+ </div>
+ </div>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template match="/api/symbols">
+ <functions>
+ <xsl:apply-templates select="macro"/>
+ <xsl:apply-templates select="enum"/>
+ <xsl:apply-templates select="typedef"/>
+ <xsl:apply-templates select="struct"/>
+ <xsl:apply-templates select="functype"/>
+ <xsl:apply-templates select="variable"/>
+ <xsl:apply-templates select="function"/>
+ </functions>
+ </xsl:template>
+ <xsl:template match="/api/symbols/functype">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/function">
+ <function name="{@name} ()" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/typedef">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/enum">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/struct">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/macro">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+ <xsl:template match="/api/symbols/variable">
+ <function name="{@name}" link="libxml2-{@file}.html#{@name}"/>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+
diff --git a/doc/devhelp/general.html b/doc/devhelp/general.html
new file mode 100644
index 0000000..68f9380
--- /dev/null
+++ b/doc/devhelp/general.html
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>libxml2: </title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="index.html" title="libxml2 Reference Manual"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="u" href="index.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-DOCBparser.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">libxml2 API Modules</span>
+ </h2>
+ <p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionnary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlsave.html">xmlsave</a> - the XML document serializer<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version informations<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
+ </body>
+</html>
diff --git a/doc/devhelp/home.png b/doc/devhelp/home.png
new file mode 100644
index 0000000..1700361
--- /dev/null
+++ b/doc/devhelp/home.png
Binary files differ
diff --git a/doc/devhelp/html.xsl b/doc/devhelp/html.xsl
new file mode 100644
index 0000000..1720b29
--- /dev/null
+++ b/doc/devhelp/html.xsl
@@ -0,0 +1,602 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="exsl str"
+ exclude-result-prefixes="exsl str">
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+ <!-- This is convoluted but needed to force the current document to
+ be the API one and not the result tree from the tokenize() result,
+ because the keys are only defined on the main document -->
+ <xsl:template mode="dumptoken" match='*'>
+ <xsl:param name="token"/>
+ <xsl:variable name="ref" select="key('symbols', $token)"/>
+ <xsl:choose>
+ <xsl:when test="$ref">
+ <a href="libxml2-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$token"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- dumps a string, making cross-reference links -->
+ <xsl:template name="dumptext">
+ <xsl:param name="text"/>
+ <xsl:variable name="ctxt" select='.'/>
+ <!-- <xsl:value-of select="$text"/> -->
+ <xsl:for-each select="str:tokenize($text, ' &#9;')">
+ <xsl:apply-templates select="$ctxt" mode='dumptoken'>
+ <xsl:with-param name="token" select="string(.)"/>
+ </xsl:apply-templates>
+ <xsl:if test="position() != last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+<!--
+
+ The following builds the Synopsis section
+
+-->
+ <xsl:template mode="synopsis" match="function">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <a href="#{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>);</xsl:text>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="synopsis" match="functype">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <xsl:text>typedef </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a href="#{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>);</xsl:text>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="synopsis" match="exports[@type='function']">
+ <xsl:variable name="def" select="key('symbols',@symbol)"/>
+ <xsl:apply-templates mode="synopsis" select="$def"/>
+ </xsl:template>
+
+ <xsl:template mode="synopsis" match="exports[@type='typedef']">
+ <xsl:text>typedef </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="string(key('symbols',@symbol)/@type)"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
+ <xsl:text>;
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="synopsis" match="exports[@type='macro']">
+ <xsl:variable name="def" select="key('symbols',@symbol)"/>
+ <xsl:text>#define </xsl:text>
+ <a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
+ <xsl:if test="$def/arg">
+ <xsl:text>(</xsl:text>
+ <xsl:for-each select="$def/arg">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>;
+</xsl:text>
+ </xsl:template>
+ <xsl:template mode="synopsis" match="exports[@type='enum']">
+ </xsl:template>
+ <xsl:template mode="synopsis" match="exports[@type='struct']">
+ </xsl:template>
+
+<!--
+
+ The following builds the Details section
+
+-->
+ <xsl:template mode="details" match="struct">
+ <xsl:variable name="name" select="string(@name)"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}">Structure </a><xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:value-of select="@type"/><xsl:text> {
+</xsl:text>
+ <xsl:if test="not(field)">
+ <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="field">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="@info != ''">
+ <xsl:text>&#9;: </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="substring(@info, 1, 70)"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>} </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>;
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="typedef[@type != 'enum']">
+ <xsl:variable name="name" select="string(@name)"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}">Typedef </a><xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="string(@type)"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>;
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="variable">
+ <xsl:variable name="name" select="string(@name)"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}">Variable </a><xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="string(@type)"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>;
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="typedef[@type = 'enum']">
+ <xsl:variable name="name" select="string(@name)"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}">Enum </a><xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:text>enum </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text> {
+</xsl:text>
+ <xsl:for-each select="/api/symbols/enum[@type=$name]">
+ <xsl:sort select="@value" data-type="number" order="ascending"/>
+ <xsl:text> </xsl:text>
+ <a name="{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:if test="@value">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="@value"/>
+ </xsl:if>
+ <xsl:if test="@info">
+ <xsl:text> /* </xsl:text>
+ <xsl:value-of select="@info"/>
+ <xsl:text> */</xsl:text>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>};
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="macro">
+ <xsl:variable name="name" select="string(@name)"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}">Macro </a><xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:text>#define </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:if test="arg">
+ <xsl:text>(</xsl:text>
+ <xsl:for-each select="arg">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>;
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p>
+ <xsl:if test="arg">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody></table></div>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="function">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}"></a><xsl:value-of select="$name"/> ()</h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text><br/>
+ <xsl:text>
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ <xsl:if test="arg | return/@info">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ </div><hr/>
+ </xsl:template>
+
+ <xsl:template mode="details" match="functype">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <div class="refsect2" lang="en">
+ <h3><a name="{$name}"></a>Function type <xsl:value-of select="$name"/> </h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text><br/>
+ <xsl:text>
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ <xsl:if test="arg | return/@info">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ </div><hr/>
+ </xsl:template>
+
+<!--
+
+ The following builds the general.html page
+
+-->
+ <xsl:template name="generate_general">
+ <xsl:variable name="next" select="string(/api/files/file[position()=1]/@name)"/>
+ <xsl:document xmlns="" href="general.html" method="xml" indent="yes" encoding="UTF-8">
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="index.html" title="libxml2 Reference Manual"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
+ <xsl:if test="$next != ''">
+ <td><a accesskey="n" href="libxml2-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
+ </xsl:if>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2><span class="refentrytitle">libxml2 API Modules</span></h2>
+ <p>
+ <xsl:for-each select="/api/files/file">
+ <a href="libxml2-{@name}.html"><xsl:value-of select="@name"/></a> - <xsl:value-of select="summary"/><br/>
+ </xsl:for-each>
+ </p>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+<!--
+
+ The following builds the index.html page
+
+-->
+ <xsl:template name="generate_index">
+ <xsl:document xmlns="" href="index.html" method="xml" indent="yes" encoding="UTF-8">
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>libxml2 Reference Manual</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
+ <td><a accesskey="n" href="general.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2><span class="refentrytitle">libxml2 Reference Manual</span></h2>
+<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
+(but usable outside of the Gnome platform), it is free software available
+under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License</a>. XML itself is a metalanguage to design markup languages, i.e.
+text language where semantic and structure are added to the content using
+extra "markup" information enclosed between angle brackets. HTML is the most
+well-known markup language. Though the library is written in C <a href="http://xmlsoft.org/python.html">a variety of language bindings</a> make it available in
+other environments.</p>
+<p>Libxml2 implements a number of existing standards related to markup
+languages:</p>
+<ul><li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
+<li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
+<li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
+<li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
+Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
+<li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
+<li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
+<li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
+<li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
+<li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
+and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
+[UTF-16] Unicode encodings, and more if using iconv support</li>
+<li>part of SGML Open Technical Resolution TR9401:1997</li>
+<li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
+<li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
+and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
+<li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
+<li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+2001</a></li>
+<li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+April 2004</li>
+</ul>
+ <p> As a result the <a href="general.html">libxml2 API</a> is very
+ large. If you get lost searching for some specific API use
+ <a href="http://xmlsoft.org/search.php">the online search
+ engine</a> hosted on <a href="http://xmlsoft.org/">xmlsoft.org</a>
+ the libxml2 and libxslt project page. </p>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+</xsl:stylesheet>
+
+
diff --git a/doc/devhelp/index.html b/doc/devhelp/index.html
new file mode 100644
index 0000000..26c2839
--- /dev/null
+++ b/doc/devhelp/index.html
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>libxml2 Reference Manual</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="general.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">libxml2 Reference Manual</span>
+ </h2>
+ <p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
+(but usable outside of the Gnome platform), it is free software available
+under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License</a>. XML itself is a metalanguage to design markup languages, i.e.
+text language where semantic and structure are added to the content using
+extra "markup" information enclosed between angle brackets. HTML is the most
+well-known markup language. Though the library is written in C <a href="http://xmlsoft.org/python.html">a variety of language bindings</a> make it available in
+other environments.</p>
+ <p>Libxml2 implements a number of existing standards related to markup
+languages:</p>
+ <ul>
+ <li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
+ <li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
+ <li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
+Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
+ <li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
+ <li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
+ <li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
+ <li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
+ <li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
+and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
+[UTF-16] Unicode encodings, and more if using iconv support</li>
+ <li>part of SGML Open Technical Resolution TR9401:1997</li>
+ <li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
+ <li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
+and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
+ <li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
+ <li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+2001</a></li>
+ <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+April 2004</li>
+ </ul>
+ <p> As a result the <a href="general.html">libxml2 API</a> is very
+ large. If you get lost searching for some specific API use
+ <a href="http://xmlsoft.org/search.php">the online search
+ engine</a> hosted on <a href="http://xmlsoft.org/">xmlsoft.org</a>
+ the libxml2 and libxslt project page. </p>
+ </body>
+</html>
diff --git a/doc/devhelp/left.png b/doc/devhelp/left.png
new file mode 100644
index 0000000..2d05b3d
--- /dev/null
+++ b/doc/devhelp/left.png
Binary files differ
diff --git a/doc/devhelp/libxml2-DOCBparser.html b/doc/devhelp/libxml2-DOCBparser.html
new file mode 100644
index 0000000..a7b514e
--- /dev/null
+++ b/doc/devhelp/libxml2-DOCBparser.html
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>DOCBparser: old DocBook SGML parser</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-HTMLparser.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">DOCBparser</span>
+ </h2>
+ <p>DOCBparser - old DocBook SGML parser</p>
+ <p>interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore. </p>
+ <p> WARNING: this module is deprecated !</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#docbParserInputPtr">docbParserInputPtr</a>;
+typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a href="#docbParserCtxt">docbParserCtxt</a>;
+typedef <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#docbParserCtxtPtr">docbParserCtxtPtr</a>;
+typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> <a href="#docbParserInput">docbParserInput</a>;
+typedef <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#docbDocPtr">docbDocPtr</a>;
+typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a href="#docbSAXHandler">docbSAXHandler</a>;
+typedef <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a href="#docbSAXHandlerPtr">docbSAXHandlerPtr</a>;
+void <a href="#docbFreeParserCtxt">docbFreeParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
+<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseDoc">docbParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding);
+<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a> (const char * filename, <br/> const char * encoding);
+<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseFile">docbSAXParseFile</a> (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
+<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseDoc">docbSAXParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData);
+<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a> (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+int <a href="#docbEncodeEntities">docbEncodeEntities</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar);
+<a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseFile">docbParseFile</a> (const char * filename, <br/> const char * encoding);
+int <a href="#docbParseDocument">docbParseDocument</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt);
+int <a href="#docbParseChunk">docbParseChunk</a> (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="docbDocPtr">Typedef </a>docbDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> docbDocPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParserCtxt">Typedef </a>docbParserCtxt</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> docbParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParserCtxtPtr">Typedef </a>docbParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> docbParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParserInput">Typedef </a>docbParserInput</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> docbParserInput;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParserInputPtr">Typedef </a>docbParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> docbParserInputPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbSAXHandler">Typedef </a>docbSAXHandler</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> docbSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbSAXHandlerPtr">Typedef </a>docbSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> docbSAXHandlerPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbCreateFileParserCtxt"/>docbCreateFileParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreateFileParserCtxt (const char * filename, <br/> const char * encoding)<br/>
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbCreatePushParserCtxt"/>docbCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreatePushParserCtxt (<a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbEncodeEntities"/>docbEncodeEntities ()</h3><pre class="programlisting">int docbEncodeEntities (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar)<br/>
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbFreeParserCtxt"/>docbFreeParserCtxt ()</h3><pre class="programlisting">void docbFreeParserCtxt (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParseChunk"/>docbParseChunk ()</h3><pre class="programlisting">int docbParseChunk (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParseDoc"/>docbParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding)<br/>
+</pre><p>parse an SGML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParseDocument"/>docbParseDocument ()</h3><pre class="programlisting">int docbParseDocument (<a href="libxml2-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an SGML document (and build a tree if using the standard SAX interface).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbParseFile"/>docbParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseFile (const char * filename, <br/> const char * encoding)<br/>
+</pre><p>parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbSAXParseDoc"/>docbSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
+</pre><p>parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbSAXParseFile"/>docbSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseFile (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
+</pre><p>parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-HTMLparser.html b/doc/devhelp/libxml2-HTMLparser.html
new file mode 100644
index 0000000..6d8a42a
--- /dev/null
+++ b/doc/devhelp/libxml2-HTMLparser.html
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>HTMLparser: interface for an HTML 4.0 non-verifying parser</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-DOCBparser.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-HTMLtree.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">HTMLparser</span>
+ </h2>
+ <p>HTMLparser - interface for an HTML 4.0 non-verifying parser</p>
+ <p>this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#htmlDefaultSubelement">htmlDefaultSubelement</a>(elt);
+#define <a href="#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a>(parent, elt);
+#define <a href="#htmlRequiredAttrs">htmlRequiredAttrs</a>(elt);
+typedef <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> <a href="#htmlParserNodeInfo">htmlParserNodeInfo</a>;
+typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> <a href="#htmlParserInput">htmlParserInput</a>;
+typedef <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#htmlParserCtxtPtr">htmlParserCtxtPtr</a>;
+typedef struct _htmlEntityDesc <a href="#htmlEntityDesc">htmlEntityDesc</a>;
+typedef <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#htmlDocPtr">htmlDocPtr</a>;
+typedef <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a href="#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a>;
+typedef enum <a href="#htmlStatus">htmlStatus</a>;
+typedef <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#htmlNodePtr">htmlNodePtr</a>;
+typedef <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a href="#htmlElemDescPtr">htmlElemDescPtr</a>;
+typedef struct _htmlElemDesc <a href="#htmlElemDesc">htmlElemDesc</a>;
+typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a href="#htmlSAXHandler">htmlSAXHandler</a>;
+typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#htmlParserInputPtr">htmlParserInputPtr</a>;
+typedef enum <a href="#htmlParserOption">htmlParserOption</a>;
+typedef <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityDescPtr">htmlEntityDescPtr</a>;
+typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a href="#htmlParserCtxt">htmlParserCtxt</a>;
+int <a href="#htmlIsScriptAttribute">htmlIsScriptAttribute</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#htmlHandleOmittedElem">htmlHandleOmittedElem</a> (int val);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFd">htmlReadFd</a> (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadIO">htmlReadIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseFile">htmlParseFile</a> (const char * filename, <br/> const char * encoding);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadDoc">htmlCtxtReadDoc</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#htmlAutoCloseTag">htmlAutoCloseTag</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
+int <a href="#htmlParseChunk">htmlParseChunk</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
+const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a href="#htmlTagLookup">htmlTagLookup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * tag);
+<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a> (const char * buffer, <br/> int size);
+void <a href="#htmlCtxtReset">htmlCtxtReset</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
+int <a href="#htmlElementAllowedHere">htmlElementAllowedHere</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elt);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadIO">htmlCtxtReadIO</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadMemory">htmlReadMemory</a> (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#htmlIsAutoClosed">htmlIsAutoClosed</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem);
+int <a href="#htmlParseCharRef">htmlParseCharRef</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadDoc">htmlReadDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#htmlEncodeEntities">htmlEncodeEntities</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar);
+<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlNodeStatus">htmlNodeStatus</a> (const <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br/> int legacy);
+<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlAttrAllowed">htmlAttrAllowed</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * attr, <br/> int legacy);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseFile">htmlSAXParseFile</a> (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData);
+const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlParseEntityRef">htmlParseEntityRef</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** str);
+<a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlElementStatusHere">htmlElementStatusHere</a> (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt);
+const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityValueLookup">htmlEntityValueLookup</a> (unsigned int value);
+void <a href="#htmlParseElement">htmlParseElement</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
+int <a href="#UTF8ToHtml">UTF8ToHtml</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
+const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityLookup">htmlEntityLookup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#htmlFreeParserCtxt">htmlFreeParserCtxt</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadMemory">htmlCtxtReadMemory</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFd">htmlCtxtReadFd</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFile">htmlReadFile</a> (const char * filename, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFile">htmlCtxtReadFile</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options);
+int <a href="#htmlParseDocument">htmlParseDocument</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlNewParserCtxt">htmlNewParserCtxt</a> (void);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseDoc">htmlSAXParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData);
+int <a href="#htmlCtxtUseOptions">htmlCtxtUseOptions</a> (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int options);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseDoc">htmlParseDoc</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="htmlDefaultSubelement">Macro </a>htmlDefaultSubelement</h3><pre class="programlisting">#define <a href="#htmlDefaultSubelement">htmlDefaultSubelement</a>(elt);
+</pre><p>Returns the default subelement for this element</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlElementAllowedHereDesc">Macro </a>htmlElementAllowedHereDesc</h3><pre class="programlisting">#define <a href="#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a>(parent, elt);
+</pre><p>Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlRequiredAttrs">Macro </a>htmlRequiredAttrs</h3><pre class="programlisting">#define <a href="#htmlRequiredAttrs">htmlRequiredAttrs</a>(elt);
+</pre><p>Returns the attributes required for the specified element.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocPtr">Typedef </a>htmlDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> htmlDocPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlElemDesc">Structure </a>htmlElemDesc</h3><pre class="programlisting">struct _htmlElemDesc {
+ const char * name : The tag name
+ char startTag : Whether the start tag can be implied
+ char endTag : Whether the end tag can be implied
+ char saveEndTag : Whether the end tag should be saved
+ char empty : Is this an empty element ?
+ char depr : Is this a deprecated element ?
+ char dtd : 1: only in Loose DTD, 2: only Frameset one
+ char isinline : is this a block 0 or inline 1 element
+ const char * desc : the description NRK Jan.2003 * New fields encapsulating HTML structur
+ const char ** subelts : allowed sub-elements of this element
+ const char * defaultsubelt : subelement for suggested auto-repair if necessary or NULL
+ const char ** attrs_opt : Optional Attributes
+ const char ** attrs_depr : Additional deprecated attributes
+ const char ** attrs_req : Required attributes
+} htmlElemDesc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlElemDescPtr">Typedef </a>htmlElemDescPtr</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * htmlElemDescPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlEntityDesc">Structure </a>htmlEntityDesc</h3><pre class="programlisting">struct _htmlEntityDesc {
+ unsigned int value : the UNICODE value for the character
+ const char * name : The entity name
+ const char * desc : the description
+} htmlEntityDesc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlEntityDescPtr">Typedef </a>htmlEntityDescPtr</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityDescPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodePtr">Typedef </a>htmlNodePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> htmlNodePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserCtxt">Typedef </a>htmlParserCtxt</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> htmlParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserCtxtPtr">Typedef </a>htmlParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> htmlParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserInput">Typedef </a>htmlParserInput</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> htmlParserInput;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserInputPtr">Typedef </a>htmlParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> htmlParserInputPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserNodeInfo">Typedef </a>htmlParserNodeInfo</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> htmlParserNodeInfo;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParserOption">Enum </a>htmlParserOption</h3><pre class="programlisting">enum <a href="#htmlParserOption">htmlParserOption</a> {
+ <a name="HTML_PARSE_RECOVER">HTML_PARSE_RECOVER</a> = 1 /* Relaxed parsing */
+ <a name="HTML_PARSE_NODEFDTD">HTML_PARSE_NODEFDTD</a> = 4 /* do not default a doctype if not found */
+ <a name="HTML_PARSE_NOERROR">HTML_PARSE_NOERROR</a> = 32 /* suppress error reports */
+ <a name="HTML_PARSE_NOWARNING">HTML_PARSE_NOWARNING</a> = 64 /* suppress warning reports */
+ <a name="HTML_PARSE_PEDANTIC">HTML_PARSE_PEDANTIC</a> = 128 /* pedantic error reporting */
+ <a name="HTML_PARSE_NOBLANKS">HTML_PARSE_NOBLANKS</a> = 256 /* remove blank nodes */
+ <a name="HTML_PARSE_NONET">HTML_PARSE_NONET</a> = 2048 /* Forbid network access */
+ <a name="HTML_PARSE_NOIMPLIED">HTML_PARSE_NOIMPLIED</a> = 8192 /* Do not add implied html/body... elements */
+ <a name="HTML_PARSE_COMPACT">HTML_PARSE_COMPACT</a> = 65536 /* compact small text nodes */
+ <a name="HTML_PARSE_IGNORE_ENC">HTML_PARSE_IGNORE_ENC</a> = 2097152 /* ignore internal document encoding hint */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSAXHandler">Typedef </a>htmlSAXHandler</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> htmlSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSAXHandlerPtr">Typedef </a>htmlSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> htmlSAXHandlerPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlStatus">Enum </a>htmlStatus</h3><pre class="programlisting">enum <a href="#htmlStatus">htmlStatus</a> {
+ <a name="HTML_NA">HTML_NA</a> = 0 /* something we don't check at all */
+ <a name="HTML_INVALID">HTML_INVALID</a> = 1
+ <a name="HTML_DEPRECATED">HTML_DEPRECATED</a> = 2
+ <a name="HTML_VALID">HTML_VALID</a> = 4
+ <a name="HTML_REQUIRED">HTML_REQUIRED</a> = 12 /* VALID bit set so ( &amp; HTML_VALID ) is TRUE */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="UTF8ToHtml"/>UTF8ToHtml ()</h3><pre class="programlisting">int UTF8ToHtml (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlAttrAllowed"/>htmlAttrAllowed ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlAttrAllowed (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * attr, <br/> int legacy)<br/>
+</pre><p>Checks whether an <a href="libxml2-SAX.html#attribute">attribute</a> is valid for an element Has full knowledge of Required and Deprecated attributes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>HTML <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated attributes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, <a href="libxml2-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlAutoCloseTag"/>htmlAutoCloseTag ()</h3><pre class="programlisting">int htmlAutoCloseTag (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br/>
+</pre><p>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The tag name</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclose, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCreateMemoryParserCtxt"/>htmlCreateMemoryParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateMemoryParserCtxt (const char * buffer, <br/> int size)<br/>
+</pre><p>Create a parser context for an HTML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCreatePushParserCtxt"/>htmlCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreatePushParserCtxt (<a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a parser context for using the HTML parser in push mode The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReadDoc"/>htmlCtxtReadDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadDoc (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReadFd"/>htmlCtxtReadFd ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFd (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReadFile"/>htmlCtxtReadFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFile (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReadIO"/>htmlCtxtReadIO ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadIO (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReadMemory"/>htmlCtxtReadMemory ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadMemory (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtReset"/>htmlCtxtReset ()</h3><pre class="programlisting">void htmlCtxtReset (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Reset a parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCtxtUseOptions"/>htmlCtxtUseOptions ()</h3><pre class="programlisting">int htmlCtxtUseOptions (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> int options)<br/>
+</pre><p>Applies the options to the parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, the set of unknown or unimplemented options in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlElementAllowedHere"/>htmlElementAllowedHere ()</h3><pre class="programlisting">int htmlElementAllowedHere (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elt)<br/>
+</pre><p>Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if allowed; 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlElementStatusHere"/>htmlElementStatusHere ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlElementStatusHere (const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br/> const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt)<br/>
+</pre><p>Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_VALID, HTML_DEPRECATED, <a href="libxml2-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlEncodeEntities"/>htmlEncodeEntities ()</h3><pre class="programlisting">int htmlEncodeEntities (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen, <br/> int quoteChar)<br/>
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlEntityLookup"/>htmlEntityLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityLookup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlEntityValueLookup"/>htmlEntityValueLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityValueLookup (unsigned int value)<br/>
+</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the entity's unicode value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlFreeParserCtxt"/>htmlFreeParserCtxt ()</h3><pre class="programlisting">void htmlFreeParserCtxt (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlHandleOmittedElem"/>htmlHandleOmittedElem ()</h3><pre class="programlisting">int htmlHandleOmittedElem (int val)<br/>
+</pre><p>Set and return the previous value for handling HTML omitted tags.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no handling, 1 for auto insertion.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlIsAutoClosed"/>htmlIsAutoClosed ()</h3><pre class="programlisting">int htmlIsAutoClosed (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br/>
+</pre><p>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclosed, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlIsScriptAttribute"/>htmlIsScriptAttribute ()</h3><pre class="programlisting">int htmlIsScriptAttribute (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Check if an <a href="libxml2-SAX.html#attribute">attribute</a> is of content type Script</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 is the <a href="libxml2-SAX.html#attribute">attribute</a> is a script 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNewParserCtxt"/>htmlNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlNewParserCtxt (void)<br/>
+</pre><p>Allocate and initialize a new parser context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> or NULL in case of allocation error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeStatus"/>htmlNodeStatus ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlStatus">htmlStatus</a> htmlNodeStatus (const <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br/> int legacy)<br/>
+</pre><p>Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an <a href="libxml2-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> in a tree</td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated elements (YES is faster here for Element nodes)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>for Element nodes, a return from <a href="libxml2-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a> (if legacy allowed) or <a href="libxml2-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a> (otherwise). for Attribute nodes, a return from <a href="libxml2-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a> for other nodes, <a href="libxml2-HTMLparser.html#HTML_NA">HTML_NA</a> (no checks performed)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseCharRef"/>htmlParseCharRef ()</h3><pre class="programlisting">int htmlParseCharRef (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse Reference declarations [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value parsed (as an int)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseChunk"/>htmlParseChunk ()</h3><pre class="programlisting">int htmlParseChunk (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseDoc"/>htmlParseDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding)<br/>
+</pre><p>parse an HTML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseDocument"/>htmlParseDocument ()</h3><pre class="programlisting">int htmlParseDocument (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an HTML document (and build a tree if using the standard SAX interface).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseElement"/>htmlParseElement ()</h3><pre class="programlisting">void htmlParseElement (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an HTML element, this is highly recursive this is kept for compatibility with previous code versions [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseEntityRef"/>htmlParseEntityRef ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlParseEntityRef (<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** str)<br/>
+</pre><p>parse an HTML ENTITY references [68] EntityRef ::= '&amp;' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>location to store the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml2-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlParseFile"/>htmlParseFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseFile (const char * filename, <br/> const char * encoding)<br/>
+</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlReadDoc"/>htmlReadDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlReadFd"/>htmlReadFd ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFd (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML from a file descriptor and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlReadFile"/>htmlReadFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFile (const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlReadIO"/>htmlReadIO ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an HTML document from I/O functions and source and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlReadMemory"/>htmlReadMemory ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadMemory (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSAXParseDoc"/>htmlSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseDoc (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
+</pre><p>Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSAXParseFile"/>htmlSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseFile (const char * filename, <br/> const char * encoding, <br/> <a href="libxml2-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br/> void * userData)<br/>
+</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlTagLookup"/>htmlTagLookup ()</h3><pre class="programlisting">const <a href="libxml2-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * htmlTagLookup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * tag)<br/>
+</pre><p>Lookup the HTML tag in the ElementTable</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tag</tt></i>:</span></td><td>The tag name in lowercase</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the related <a href="libxml2-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a> or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-HTMLtree.html b/doc/devhelp/libxml2-HTMLtree.html
new file mode 100644
index 0000000..6430f8b
--- /dev/null
+++ b/doc/devhelp/libxml2-HTMLtree.html
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>HTMLtree: specific APIs to process HTML tree, especially serialization</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-HTMLparser.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-SAX.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">HTMLtree</span>
+ </h2>
+ <p>HTMLtree - specific APIs to process HTML tree, especially serialization</p>
+ <p>this module implements a few function needed to process tree in an HTML specific way. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a>;
+#define <a href="#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a>;
+#define <a href="#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a>;
+#define <a href="#HTML_TEXT_NODE">HTML_TEXT_NODE</a>;
+#define <a href="#HTML_PI_NODE">HTML_PI_NODE</a>;
+int <a href="#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format);
+void <a href="#htmlDocDumpMemory">htmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size);
+int <a href="#htmlSaveFile">htmlSaveFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+int <a href="#htmlDocDump">htmlDocDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+void <a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format);
+int <a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#htmlSaveFileFormat">htmlSaveFileFormat</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
+void <a href="#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format);
+int <a href="#htmlSetMetaEncoding">htmlSetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding);
+int <a href="#htmlSaveFileEnc">htmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
+void <a href="#htmlNodeDumpOutput">htmlNodeDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding);
+int <a href="#htmlNodeDump">htmlNodeDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDoc">htmlNewDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a> (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc);
+void <a href="#htmlNodeDumpFile">htmlNodeDumpFile</a> (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
+<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID);
+void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="HTML_COMMENT_NODE">Macro </a>HTML_COMMENT_NODE</h3><pre class="programlisting">#define <a href="#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a>;
+</pre><p>Macro. A <a href="libxml2-SAX.html#comment">comment</a> in a HTML document is really implemented the same way as a <a href="libxml2-SAX.html#comment">comment</a> in an XML document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="HTML_ENTITY_REF_NODE">Macro </a>HTML_ENTITY_REF_NODE</h3><pre class="programlisting">#define <a href="#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a>;
+</pre><p>Macro. An entity <a href="libxml2-SAX.html#reference">reference</a> in a HTML document is really implemented the same way as an entity <a href="libxml2-SAX.html#reference">reference</a> in an XML document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="HTML_PI_NODE">Macro </a>HTML_PI_NODE</h3><pre class="programlisting">#define <a href="#HTML_PI_NODE">HTML_PI_NODE</a>;
+</pre><p>Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="HTML_PRESERVE_NODE">Macro </a>HTML_PRESERVE_NODE</h3><pre class="programlisting">#define <a href="#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a>;
+</pre><p>Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="HTML_TEXT_NODE">Macro </a>HTML_TEXT_NODE</h3><pre class="programlisting">#define <a href="#HTML_TEXT_NODE">HTML_TEXT_NODE</a>;
+</pre><p>Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpFormatOutput"/>htmlDocContentDumpFormatOutput ()</h3><pre class="programlisting">void htmlDocContentDumpFormatOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an HTML document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpOutput"/>htmlDocContentDumpOutput ()</h3><pre class="programlisting">void htmlDocContentDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
+</pre><p>Dump an HTML document. Formating return/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocDump"/>htmlDocDump ()</h3><pre class="programlisting">int htmlDocDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
+</pre><p>Dump an HTML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemory"/>htmlDocDumpMemory ()</h3><pre class="programlisting">void htmlDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size)<br/>
+</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemoryFormat"/>htmlDocDumpMemoryFormat ()</h3><pre class="programlisting">void htmlDocDumpMemoryFormat (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format)<br/>
+</pre><p>Dump an HTML document in memory and return the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlGetMetaEncoding"/>htmlGetMetaEncoding ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br/>
+</pre><p>Encoding definition lookup in the Meta tags</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlIsBooleanAttr"/>htmlIsBooleanAttr ()</h3><pre class="programlisting">int htmlIsBooleanAttr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Determine if a given <a href="libxml2-SAX.html#attribute">attribute</a> is a boolean attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a> to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>false if the <a href="libxml2-SAX.html#attribute">attribute</a> is not boolean, true otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNewDoc"/>htmlNewDoc ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br/>
+</pre><p>Creates a new HTML document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNewDocNoDtD"/>htmlNewDocNoDtD ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDocNoDtD (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br/>
+</pre><p>Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document, do not initialize the DTD if not provided</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeDump"/>htmlNodeDump ()</h3><pre class="programlisting">int htmlNodeDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFile"/>htmlNodeDumpFile ()</h3><pre class="programlisting">void htmlNodeDumpFile (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFileFormat"/>htmlNodeDumpFileFormat ()</h3><pre class="programlisting">int htmlNodeDumpFileFormat (FILE * out, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFormatOutput"/>htmlNodeDumpFormatOutput ()</h3><pre class="programlisting">void htmlNodeDumpFormatOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlNodeDumpOutput"/>htmlNodeDumpOutput ()</h3><pre class="programlisting">void htmlNodeDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const char * encoding)<br/>
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSaveFile"/>htmlSaveFile ()</h3><pre class="programlisting">int htmlSaveFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
+</pre><p>Dump an HTML document to a file. If @filename is "-" the stdout file is used.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSaveFileEnc"/>htmlSaveFileEnc ()</h3><pre class="programlisting">int htmlSaveFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
+</pre><p>Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSaveFileFormat"/>htmlSaveFileFormat ()</h3><pre class="programlisting">int htmlSaveFileFormat (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an HTML document to a file using a given encoding.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlSetMetaEncoding"/>htmlSetMetaEncoding ()</h3><pre class="programlisting">int htmlSetMetaEncoding (<a href="libxml2-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding)<br/>
+</pre><p>Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-SAX.html b/doc/devhelp/libxml2-SAX.html
new file mode 100644
index 0000000..5163b7b
--- /dev/null
+++ b/doc/devhelp/libxml2-SAX.html
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>SAX: Old SAX version 1 handler, deprecated</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-HTMLtree.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-SAX2.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">SAX</span>
+ </h2>
+ <p>SAX - Old SAX version 1 handler, deprecated</p>
+ <p>DEPRECATED set of SAX version 1 interfaces used to build the DOM tree. </p>
+ <p> WARNING: this module is deprecated !</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">void <a href="#comment">comment</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#checkNamespace">checkNamespace</a> (void * ctx, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespace);
+int <a href="#getColumnNumber">getColumnNumber</a> (void * ctx);
+void <a href="#entityDecl">entityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+void <a href="#attribute">attribute</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#getNamespace">getNamespace</a> (void * ctx);
+void <a href="#setDocumentLocator">setDocumentLocator</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
+void <a href="#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br/> int warning);
+void <a href="#ignorableWhitespace">ignorableWhitespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+int <a href="#hasExternalSubset">hasExternalSubset</a> (void * ctx);
+void <a href="#unparsedEntityDecl">unparsedEntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
+void <a href="#globalNamespace">globalNamespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+int <a href="#hasInternalSubset">hasInternalSubset</a> (void * ctx);
+void <a href="#reference">reference</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#notationDecl">notationDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getSystemId">getSystemId</a> (void * ctx);
+void <a href="#externalSubset">externalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#resolveEntity">resolveEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+void <a href="#startDocument">startDocument</a> (void * ctx);
+void <a href="#setNamespace">setNamespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#cdataBlock">cdataBlock</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getPublicId">getPublicId</a> (void * ctx);
+void <a href="#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr);
+void <a href="#processingInstruction">processingInstruction</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data);
+void <a href="#endElement">endElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#namespaceDecl">namespaceDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+void <a href="#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a> (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getEntity">getEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#characters">characters</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+void <a href="#elementDecl">elementDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
+void <a href="#startElement">startElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getParameterEntity">getParameterEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#attributeDecl">attributeDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
+int <a href="#isStandalone">isStandalone</a> (void * ctx);
+void <a href="#internalSubset">internalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+void <a href="#endDocument">endDocument</a> (void * ctx);
+int <a href="#getLineNumber">getLineNumber</a> (void * ctx);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="attribute"/>attribute ()</h3><pre class="programlisting">void attribute (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Handle an <a href="libxml2-SAX.html#attribute">attribute</a> that has been read by the parser. The default handling is to convert the <a href="libxml2-SAX.html#attribute">attribute</a> into an DOM subtree and past it in a new <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> element added to the element. DEPRECATED: use xmlSAX2Attribute()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="attributeDecl"/>attributeDecl ()</h3><pre class="programlisting">void attributeDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
+</pre><p>An <a href="libxml2-SAX.html#attribute">attribute</a> definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="cdataBlock"/>cdataBlock ()</h3><pre class="programlisting">void cdataBlock (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
+</pre><p>called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="characters"/>characters ()</h3><pre class="programlisting">void characters (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="checkNamespace"/>checkNamespace ()</h3><pre class="programlisting">int checkNamespace (void * ctx, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespace)<br/>
+</pre><p>Check that the current element namespace is the same as the one read upon parsing. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>namespace</tt></i>:</span></td><td>the namespace to check against</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="comment"/>comment ()</h3><pre class="programlisting">void comment (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>A <a href="libxml2-SAX.html#comment">comment</a> has been parsed. DEPRECATED: use xmlSAX2Comment()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="elementDecl"/>elementDecl ()</h3><pre class="programlisting">void elementDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
+</pre><p>An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="endDocument"/>endDocument ()</h3><pre class="programlisting">void endDocument (void * ctx)<br/>
+</pre><p>called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="endElement"/>endElement ()</h3><pre class="programlisting">void endElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="entityDecl"/>entityDecl ()</h3><pre class="programlisting">void entityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="externalSubset"/>externalSubset ()</h3><pre class="programlisting">void externalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getColumnNumber"/>getColumnNumber ()</h3><pre class="programlisting">int getColumnNumber (void * ctx)<br/>
+</pre><p>Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getEntity"/>getEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get an entity by name DEPRECATED: use xmlSAX2GetEntity()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getLineNumber"/>getLineNumber ()</h3><pre class="programlisting">int getLineNumber (void * ctx)<br/>
+</pre><p>Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getNamespace"/>getNamespace ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> getNamespace (void * ctx)<br/>
+</pre><p>Get the current element namespace. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL if none</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getParameterEntity"/>getParameterEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getParameterEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getPublicId"/>getPublicId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * getPublicId (void * ctx)<br/>
+</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" DEPRECATED: use xmlSAX2GetPublicId()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getSystemId"/>getSystemId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * getSystemId (void * ctx)<br/>
+</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="globalNamespace"/>globalNamespace ()</h3><pre class="programlisting">void globalNamespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>An old global namespace has been parsed. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="hasExternalSubset"/>hasExternalSubset ()</h3><pre class="programlisting">int hasExternalSubset (void * ctx)<br/>
+</pre><p>Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="hasInternalSubset"/>hasInternalSubset ()</h3><pre class="programlisting">int hasInternalSubset (void * ctx)<br/>
+</pre><p>Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="ignorableWhitespace"/>ignorableWhitespace ()</h3><pre class="programlisting">void ignorableWhitespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml2-SAX.html#characters">characters</a> DEPRECATED: use xmlSAX2IgnorableWhitespace()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="initdocbDefaultSAXHandler"/>initdocbDefaultSAXHandler ()</h3><pre class="programlisting">void initdocbDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br/>
+</pre><p>Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="inithtmlDefaultSAXHandler"/>inithtmlDefaultSAXHandler ()</h3><pre class="programlisting">void inithtmlDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br/>
+</pre><p>Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="initxmlDefaultSAXHandler"/>initxmlDefaultSAXHandler ()</h3><pre class="programlisting">void initxmlDefaultSAXHandler (<a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br/> int warning)<br/>
+</pre><p>Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="internalSubset"/>internalSubset ()</h3><pre class="programlisting">void internalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="isStandalone"/>isStandalone ()</h3><pre class="programlisting">int isStandalone (void * ctx)<br/>
+</pre><p>Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="namespaceDecl"/>namespaceDecl ()</h3><pre class="programlisting">void namespaceDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>A namespace has been parsed. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="notationDecl"/>notationDecl ()</h3><pre class="programlisting">void notationDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="processingInstruction"/>processingInstruction ()</h3><pre class="programlisting">void processingInstruction (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data)<br/>
+</pre><p>A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="reference"/>reference ()</h3><pre class="programlisting">void reference (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>called when an entity <a href="libxml2-SAX.html#reference">reference</a> is detected. DEPRECATED: use xmlSAX2Reference()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="resolveEntity"/>resolveEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> resolveEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine DEPRECATED: use xmlSAX2ResolveEntity()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="setDocumentLocator"/>setDocumentLocator ()</h3><pre class="programlisting">void setDocumentLocator (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br/>
+</pre><p>Receive the document locator at startup, actually <a href="libxml2-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="setNamespace"/>setNamespace ()</h3><pre class="programlisting">void setNamespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Set the current element namespace. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="startDocument"/>startDocument ()</h3><pre class="programlisting">void startDocument (void * ctx)<br/>
+</pre><p>called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="startElement"/>startElement ()</h3><pre class="programlisting">void startElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br/>
+</pre><p>called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="unparsedEntityDecl"/>unparsedEntityDecl ()</h3><pre class="programlisting">void unparsedEntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
+</pre><p>What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-SAX2.html b/doc/devhelp/libxml2-SAX2.html
new file mode 100644
index 0000000..e80199e
--- /dev/null
+++ b/doc/devhelp/libxml2-SAX2.html
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>SAX2: SAX2 parser interface used to build the DOM tree</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-SAX.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-c14n.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">SAX2</span>
+ </h2>
+ <p>SAX2 - SAX2 parser interface used to build the DOM tree</p>
+ <p>those are the default SAX2 interfaces used by the library when building DOM tree. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">void <a href="#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
+void <a href="#xmlSAX2Reference">xmlSAX2Reference</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
+void <a href="#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
+void <a href="#xmlSAX2Comment">xmlSAX2Comment</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a> (void * ctx);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetEntity">xmlSAX2GetEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
+void <a href="#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr);
+int <a href="#xmlSAXVersion">xmlSAXVersion</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int version);
+void <a href="#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+void <a href="#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+void <a href="#xmlSAX2StartDocument">xmlSAX2StartDocument</a> (void * ctx);
+void <a href="#xmlSAX2EndElement">xmlSAX2EndElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+void <a href="#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a> (void * ctx);
+int <a href="#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a> (void * ctx);
+void <a href="#xmlSAX2EndDocument">xmlSAX2EndDocument</a> (void * ctx);
+void <a href="#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data);
+void <a href="#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+void <a href="#xmlSAX2Characters">xmlSAX2Characters</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+int <a href="#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a> (int version);
+void <a href="#xmlSAX2StartElement">xmlSAX2StartElement</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts);
+void <a href="#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
+void <a href="#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
+void <a href="#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes);
+int <a href="#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a> (void * ctx);
+void <a href="#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a> (void);
+int <a href="#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a> (void * ctx);
+int <a href="#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a> (void * ctx);
+void <a href="#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr);
+void <a href="#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a> (void);
+void <a href="#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a> (void);
+void <a href="#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a> (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int warning);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a> (void * ctx);
+void <a href="#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="docbDefaultSAXHandlerInit"/>docbDefaultSAXHandlerInit ()</h3><pre class="programlisting">void docbDefaultSAXHandlerInit (void)<br/>
+</pre><p>Initialize the default SAX handler</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDefaultSAXHandlerInit"/>htmlDefaultSAXHandlerInit ()</h3><pre class="programlisting">void htmlDefaultSAXHandlerInit (void)<br/>
+</pre><p>Initialize the default SAX handler</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXHandlerInit"/>xmlDefaultSAXHandlerInit ()</h3><pre class="programlisting">void xmlDefaultSAXHandlerInit (void)<br/>
+</pre><p>Initialize the default SAX2 handler</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2AttributeDecl"/>xmlSAX2AttributeDecl ()</h3><pre class="programlisting">void xmlSAX2AttributeDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
+</pre><p>An <a href="libxml2-SAX.html#attribute">attribute</a> definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2CDataBlock"/>xmlSAX2CDataBlock ()</h3><pre class="programlisting">void xmlSAX2CDataBlock (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
+</pre><p>called when a pcdata block has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2Characters"/>xmlSAX2Characters ()</h3><pre class="programlisting">void xmlSAX2Characters (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>receiving some chars from the parser.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2Comment"/>xmlSAX2Comment ()</h3><pre class="programlisting">void xmlSAX2Comment (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>A <a href="libxml2-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2ElementDecl"/>xmlSAX2ElementDecl ()</h3><pre class="programlisting">void xmlSAX2ElementDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
+</pre><p>An element definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2EndDocument"/>xmlSAX2EndDocument ()</h3><pre class="programlisting">void xmlSAX2EndDocument (void * ctx)<br/>
+</pre><p>called when the document end has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2EndElement"/>xmlSAX2EndElement ()</h3><pre class="programlisting">void xmlSAX2EndElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>called when the end of an element has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2EndElementNs"/>xmlSAX2EndElementNs ()</h3><pre class="programlisting">void xmlSAX2EndElementNs (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
+</pre><p>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2EntityDecl"/>xmlSAX2EntityDecl ()</h3><pre class="programlisting">void xmlSAX2EntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>An entity definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2ExternalSubset"/>xmlSAX2ExternalSubset ()</h3><pre class="programlisting">void xmlSAX2ExternalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on external subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetColumnNumber"/>xmlSAX2GetColumnNumber ()</h3><pre class="programlisting">int xmlSAX2GetColumnNumber (void * ctx)<br/>
+</pre><p>Provide the column number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetEntity"/>xmlSAX2GetEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get an entity by name</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetLineNumber"/>xmlSAX2GetLineNumber ()</h3><pre class="programlisting">int xmlSAX2GetLineNumber (void * ctx)<br/>
+</pre><p>Provide the line number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetParameterEntity"/>xmlSAX2GetParameterEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetParameterEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get a parameter entity by name</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetPublicId"/>xmlSAX2GetPublicId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetPublicId (void * ctx)<br/>
+</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2GetSystemId"/>xmlSAX2GetSystemId ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetSystemId (void * ctx)<br/>
+</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2HasExternalSubset"/>xmlSAX2HasExternalSubset ()</h3><pre class="programlisting">int xmlSAX2HasExternalSubset (void * ctx)<br/>
+</pre><p>Does this document has an external subset</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2HasInternalSubset"/>xmlSAX2HasInternalSubset ()</h3><pre class="programlisting">int xmlSAX2HasInternalSubset (void * ctx)<br/>
+</pre><p>Does this document has an internal subset</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2IgnorableWhitespace"/>xmlSAX2IgnorableWhitespace ()</h3><pre class="programlisting">void xmlSAX2IgnorableWhitespace (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml2-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2InitDefaultSAXHandler"/>xmlSAX2InitDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int warning)<br/>
+</pre><p>Initialize the default XML SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2InitDocbDefaultSAXHandler"/>xmlSAX2InitDocbDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitDocbDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br/>
+</pre><p>Initialize the default DocBook SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2InitHtmlDefaultSAXHandler"/>xmlSAX2InitHtmlDefaultSAXHandler ()</h3><pre class="programlisting">void xmlSAX2InitHtmlDefaultSAXHandler (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br/>
+</pre><p>Initialize the default HTML SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2InternalSubset"/>xmlSAX2InternalSubset ()</h3><pre class="programlisting">void xmlSAX2InternalSubset (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on internal subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2IsStandalone"/>xmlSAX2IsStandalone ()</h3><pre class="programlisting">int xmlSAX2IsStandalone (void * ctx)<br/>
+</pre><p>Is this document tagged standalone ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2NotationDecl"/>xmlSAX2NotationDecl ()</h3><pre class="programlisting">void xmlSAX2NotationDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>What to do when a notation declaration has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2ProcessingInstruction"/>xmlSAX2ProcessingInstruction ()</h3><pre class="programlisting">void xmlSAX2ProcessingInstruction (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data)<br/>
+</pre><p>A processing instruction has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2Reference"/>xmlSAX2Reference ()</h3><pre class="programlisting">void xmlSAX2Reference (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>called when an entity <a href="libxml2-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a> is detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2ResolveEntity"/>xmlSAX2ResolveEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlSAX2ResolveEntity (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this xmlSAX2ResolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2SetDocumentLocator"/>xmlSAX2SetDocumentLocator ()</h3><pre class="programlisting">void xmlSAX2SetDocumentLocator (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br/>
+</pre><p>Receive the document locator at startup, actually <a href="libxml2-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2StartDocument"/>xmlSAX2StartDocument ()</h3><pre class="programlisting">void xmlSAX2StartDocument (void * ctx)<br/>
+</pre><p>called when the document start being processed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2StartElement"/>xmlSAX2StartElement ()</h3><pre class="programlisting">void xmlSAX2StartElement (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br/>
+</pre><p>called when an opening tag has been processed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2StartElementNs"/>xmlSAX2StartElementNs ()</h3><pre class="programlisting">void xmlSAX2StartElementNs (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes)<br/>
+</pre><p>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr><tr><td><span class="term"><i><tt>nb_namespaces</tt></i>:</span></td><td>number of namespace definitions on that node</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>pointer to the array of prefix/URI pairs namespace definitions</td></tr><tr><td><span class="term"><i><tt>nb_attributes</tt></i>:</span></td><td>the number of attributes on that node</td></tr><tr><td><span class="term"><i><tt>nb_defaulted</tt></i>:</span></td><td>the number of defaulted attributes.</td></tr><tr><td><span class="term"><i><tt>attributes</tt></i>:</span></td><td>pointer to the array of (localname/prefix/URI/value/end) <a href="libxml2-SAX.html#attribute">attribute</a> values.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAX2UnparsedEntityDecl"/>xmlSAX2UnparsedEntityDecl ()</h3><pre class="programlisting">void xmlSAX2UnparsedEntityDecl (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
+</pre><p>What to do when an unparsed entity declaration is parsed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXDefaultVersion"/>xmlSAXDefaultVersion ()</h3><pre class="programlisting">int xmlSAXDefaultVersion (int version)<br/>
+</pre><p>Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXVersion"/>xmlSAXVersion ()</h3><pre class="programlisting">int xmlSAXVersion (<a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br/> int version)<br/>
+</pre><p>Initialize the default XML SAX handler according to the version</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-c14n.html b/doc/devhelp/libxml2-c14n.html
new file mode 100644
index 0000000..914500e
--- /dev/null
+++ b/doc/devhelp/libxml2-c14n.html
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>c14n: Provide Canonical XML and Exclusive XML Canonicalization</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-SAX2.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-catalog.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">c14n</span>
+ </h2>
+ <p>c14n - Provide Canonical XML and Exclusive XML Canonicalization</p>
+ <p>the c14n modules provides a "Canonical XML" implementation</p>
+ <p>Author(s): Aleksey Sanin &lt;aleksey@aleksey.com&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef enum <a href="#xmlC14NMode">xmlC14NMode</a>;
+int <a href="#xmlC14NExecute">xmlC14NExecute</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br/> void * user_data, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
+int <a href="#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf);
+typedef int <a href="#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> (void * user_data, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
+int <a href="#xmlC14NDocSave">xmlC14NDocSave</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> const char * filename, <br/> int compression);
+int <a href="#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NMode">Enum </a>xmlC14NMode</h3><pre class="programlisting">enum <a href="#xmlC14NMode">xmlC14NMode</a> {
+ <a name="XML_C14N_1_0">XML_C14N_1_0</a> = 0 /* Origianal C14N 1.0 spec */
+ <a name="XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a> = 1 /* Exclusive C14N 1.0 spec */
+ <a name="XML_C14N_1_1">XML_C14N_1_1</a> = 2 /* C14N 1.1 spec */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NIsVisibleCallback"/>Function type xmlC14NIsVisibleCallback</h3><pre class="programlisting">int xmlC14NIsVisibleCallback (void * user_data, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
+</pre><p>Signature for a C14N callback on visible nodes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>user data</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the curent node</td></tr><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node should be included</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NDocDumpMemory"/>xmlC14NDocDumpMemory ()</h3><pre class="programlisting">int xmlC14NDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr)<br/>
+</pre><p>Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written on success or a negative value on fail</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NDocSave"/>xmlC14NDocSave ()</h3><pre class="programlisting">int xmlC14NDocSave (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> const char * filename, <br/> int compression)<br/>
+</pre><p>Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename to store canonical XML image</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, &gt;0 - compression level</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written success or a negative value on fail</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NDocSaveTo"/>xmlC14NDocSaveTo ()</h3><pre class="programlisting">int xmlC14NDocSaveTo (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br/>
+</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlC14NExecute"/>xmlC14NExecute ()</h3><pre class="programlisting">int xmlC14NExecute (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br/> void * user_data, <br/> int mode, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br/> int with_comments, <br/> <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br/>
+</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>is_visible_callback</tt></i>:</span></td><td>the function to use to determine is node visible or not</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the first parameter for @is_visible_callback function (in most cases, it is nodes set)</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-catalog.html b/doc/devhelp/libxml2-catalog.html
new file mode 100644
index 0000000..11fc4c6
--- /dev/null
+++ b/doc/devhelp/libxml2-catalog.html
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>catalog: interfaces to the Catalog handling system</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-c14n.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-chvalid.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">catalog</span>
+ </h2>
+ <p>catalog - interfaces to the Catalog handling system</p>
+ <p>the catalog module implements the support for XML Catalogs and SGML catalogs </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
+#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
+typedef enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a>;
+typedef enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a>;
+typedef struct _xmlCatalog <a href="#xmlCatalog">xmlCatalog</a>;
+typedef <a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * <a href="#xmlCatalogPtr">xmlCatalogPtr</a>;
+void <a href="#xmlFreeCatalog">xmlFreeCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
+void <a href="#xmlLoadCatalogs">xmlLoadCatalogs</a> (const char * pathss);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+int <a href="#xmlACatalogAdd">xmlACatalogAdd</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
+<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> <a href="#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a> (void);
+int <a href="#xmlACatalogRemove">xmlACatalogRemove</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> <a href="#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a> (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveURI">xmlACatalogResolveURI</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
+int <a href="#xmlCatalogAdd">xmlCatalogAdd</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetSystem">xmlCatalogGetSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+void <a href="#xmlInitializeCatalog">xmlInitializeCatalog</a> (void);
+int <a href="#xmlLoadCatalog">xmlLoadCatalog</a> (const char * filename);
+int <a href="#xmlCatalogRemove">xmlCatalogRemove</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
+void <a href="#xmlACatalogDump">xmlACatalogDump</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out);
+void <a href="#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a> (void * catalogs);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolve">xmlACatalogResolve</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a> (const char * filename);
+int <a href="#xmlCatalogConvert">xmlCatalogConvert</a> (void);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetPublic">xmlCatalogGetPublic</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID);
+<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadACatalog">xmlLoadACatalog</a> (const char * filename);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
+int <a href="#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a> (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal);
+void * <a href="#xmlCatalogAddLocal">xmlCatalogAddLocal</a> (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL);
+<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlNewCatalog">xmlNewCatalog</a> (int sgml);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseCatalogFile">xmlParseCatalogFile</a> (const char * filename);
+int <a href="#xmlCatalogSetDebug">xmlCatalogSetDebug</a> (int level);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolve">xmlCatalogResolve</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID);
+void <a href="#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a> (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow);
+void <a href="#xmlCatalogDump">xmlCatalogDump</a> (FILE * out);
+void <a href="#xmlCatalogCleanup">xmlCatalogCleanup</a> (void);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveURI">xmlCatalogResolveURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_CATALOGS_NAMESPACE">Macro </a>XML_CATALOGS_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a>;
+</pre><p>The namespace for the XML Catalogs elements.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_CATALOG_PI">Macro </a>XML_CATALOG_PI</h3><pre class="programlisting">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a>;
+</pre><p>The specific XML Catalog Processing Instuction name.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalog">Structure </a>xmlCatalog</h3><pre class="programlisting">struct _xmlCatalog {
+The content of this structure is not made public by the API.
+} xmlCatalog;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogAllow">Enum </a>xmlCatalogAllow</h3><pre class="programlisting">enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a> {
+ <a name="XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a> = 0
+ <a name="XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a> = 1
+ <a name="XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a> = 2
+ <a name="XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a> = 3
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogPrefer">Enum </a>xmlCatalogPrefer</h3><pre class="programlisting">enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a> {
+ <a name="XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a> = 0
+ <a name="XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> = 1
+ <a name="XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a> = 2
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogPtr">Typedef </a>xmlCatalogPtr</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalog">xmlCatalog</a> * xmlCatalogPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogAdd"/>xmlACatalogAdd ()</h3><pre class="programlisting">int xmlACatalogAdd (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
+</pre><p>Add an entry in the catalog, it may overwrite existing but different entries.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogDump"/>xmlACatalogDump ()</h3><pre class="programlisting">void xmlACatalogDump (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> FILE * out)<br/>
+</pre><p>Dump the given catalog to the given file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogRemove"/>xmlACatalogRemove ()</h3><pre class="programlisting">int xmlACatalogRemove (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Remove an entry from the catalog</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolve"/>xmlACatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolve (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Do a complete resolution lookup of an External Identifier</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolvePublic"/>xmlACatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolvePublic (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
+</pre><p>Try to lookup the catalog local <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID in that catalog</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveSystem"/>xmlACatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveSystem (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Try to lookup the catalog resource for a system ID</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlACatalogResolveURI"/>xmlACatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveURI (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
+</pre><p>Do a complete resolution lookup of an URI</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogAdd"/>xmlCatalogAdd ()</h3><pre class="programlisting">int xmlCatalogAdd (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * replace)<br/>
+</pre><p>Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogAddLocal"/>xmlCatalogAddLocal ()</h3><pre class="programlisting">void * xmlCatalogAddLocal (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL)<br/>
+</pre><p>Add the new entry to the catalog list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to a new local catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the updated list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogCleanup"/>xmlCatalogCleanup ()</h3><pre class="programlisting">void xmlCatalogCleanup (void)<br/>
+</pre><p>Free up all the memory associated with catalogs</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogConvert"/>xmlCatalogConvert ()</h3><pre class="programlisting">int xmlCatalogConvert (void)<br/>
+</pre><p>Convert all the SGML catalog entries as XML ones</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogDump"/>xmlCatalogDump ()</h3><pre class="programlisting">void xmlCatalogDump (FILE * out)<br/>
+</pre><p>Dump all the global catalog content to the given file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogFreeLocal"/>xmlCatalogFreeLocal ()</h3><pre class="programlisting">void xmlCatalogFreeLocal (void * catalogs)<br/>
+</pre><p>Free up the memory associated to the catalog list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetDefaults"/>xmlCatalogGetDefaults ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> xmlCatalogGetDefaults (void)<br/>
+</pre><p>Used to get the user preference w.r.t. to what catalogs should be accepted</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetPublic"/>xmlCatalogGetPublic ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetPublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
+</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogGetSystem"/>xmlCatalogGetSystem ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogIsEmpty"/>xmlCatalogIsEmpty ()</h3><pre class="programlisting">int xmlCatalogIsEmpty (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
+</pre><p>Check is a catalog is empty</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the catalog is empty, 0 if not, amd -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolve"/>xmlCatalogLocalResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolve (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Do a complete resolution lookup of an External Identifier using a document's private catalog list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogLocalResolveURI"/>xmlCatalogLocalResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolveURI (void * catalogs, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
+</pre><p>Do a complete resolution lookup of an URI using a document's private catalog list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogRemove"/>xmlCatalogRemove ()</h3><pre class="programlisting">int xmlCatalogRemove (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Remove an entry from the catalog</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolve"/>xmlCatalogResolve ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolve (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Do a complete resolution lookup of an External Identifier</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolvePublic"/>xmlCatalogResolvePublic ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolvePublic (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br/>
+</pre><p>Try to lookup the catalog <a href="libxml2-SAX.html#reference">reference</a> associated to a public ID</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveSystem"/>xmlCatalogResolveSystem ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveSystem (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br/>
+</pre><p>Try to lookup the catalog resource for a system ID</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogResolveURI"/>xmlCatalogResolveURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
+</pre><p>Do a complete resolution lookup of an URI</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDebug"/>xmlCatalogSetDebug ()</h3><pre class="programlisting">int xmlCatalogSetDebug (int level)<br/>
+</pre><p>Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the debug level of catalogs required</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the catalog debugging level</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaultPrefer"/>xmlCatalogSetDefaultPrefer ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> xmlCatalogSetDefaultPrefer (<a href="libxml2-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer)<br/>
+</pre><p>Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are <a href="libxml2-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> or <a href="libxml2-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prefer</tt></i>:</span></td><td>the default preference for delegation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the default preference for delegation</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCatalogSetDefaults"/>xmlCatalogSetDefaults ()</h3><pre class="programlisting">void xmlCatalogSetDefaults (<a href="libxml2-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow)<br/>
+</pre><p>Used to set the user preference w.r.t. to what catalogs should be accepted</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>allow</tt></i>:</span></td><td>what catalogs should be accepted</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlConvertSGMLCatalog"/>xmlConvertSGMLCatalog ()</h3><pre class="programlisting">int xmlConvertSGMLCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
+</pre><p>Convert all the SGML catalog entries as XML ones</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>the catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeCatalog"/>xmlFreeCatalog ()</h3><pre class="programlisting">void xmlFreeCatalog (<a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br/>
+</pre><p>Free the memory allocated to a Catalog</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitializeCatalog"/>xmlInitializeCatalog ()</h3><pre class="programlisting">void xmlInitializeCatalog (void)<br/>
+</pre><p>Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadACatalog"/>xmlLoadACatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadACatalog (const char * filename)<br/>
+</pre><p>Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadCatalog"/>xmlLoadCatalog ()</h3><pre class="programlisting">int xmlLoadCatalog (const char * filename)<br/>
+</pre><p>Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadCatalogs"/>xmlLoadCatalogs ()</h3><pre class="programlisting">void xmlLoadCatalogs (const char * pathss)<br/>
+</pre><p>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pathss</tt></i>:</span></td><td>a list of directories separated by a colon or a space.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadSGMLSuperCatalog"/>xmlLoadSGMLSuperCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadSGMLSuperCatalog (const char * filename)<br/>
+</pre><p>Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewCatalog"/>xmlNewCatalog ()</h3><pre class="programlisting"><a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlNewCatalog (int sgml)<br/>
+</pre><p>create a new Catalog.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sgml</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCatalogFile"/>xmlParseCatalogFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseCatalogFile (const char * filename)<br/>
+</pre><p>parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-chvalid.html b/doc/devhelp/libxml2-chvalid.html
new file mode 100644
index 0000000..9c77158
--- /dev/null
+++ b/doc/devhelp/libxml2-chvalid.html
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>chvalid: Unicode character range checking</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-catalog.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-debugXML.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">chvalid</span>
+ </h2>
+ <p>chvalid - Unicode character range checking</p>
+ <p>this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script </p>
+ <p>Author(s): William Brack &lt;wbrack@mmm.com.hk&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#xmlIsExtender_ch">xmlIsExtender_ch</a>(c);
+#define <a href="#xmlIsPubidCharQ">xmlIsPubidCharQ</a>(c);
+#define <a href="#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a>(c);
+#define <a href="#xmlIsIdeographicQ">xmlIsIdeographicQ</a>(c);
+#define <a href="#xmlIsExtenderQ">xmlIsExtenderQ</a>(c);
+#define <a href="#xmlIsChar_ch">xmlIsChar_ch</a>(c);
+#define <a href="#xmlIsDigitQ">xmlIsDigitQ</a>(c);
+#define <a href="#xmlIsDigit_ch">xmlIsDigit_ch</a>(c);
+#define <a href="#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a>(c);
+#define <a href="#xmlIsCombiningQ">xmlIsCombiningQ</a>(c);
+#define <a href="#xmlIsBlankQ">xmlIsBlankQ</a>(c);
+#define <a href="#xmlIsCharQ">xmlIsCharQ</a>(c);
+#define <a href="#xmlIsBaseCharQ">xmlIsBaseCharQ</a>(c);
+#define <a href="#xmlIsBlank_ch">xmlIsBlank_ch</a>(c);
+typedef struct _xmlChLRange <a href="#xmlChLRange">xmlChLRange</a>;
+typedef <a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * <a href="#xmlChSRangePtr">xmlChSRangePtr</a>;
+typedef <a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * <a href="#xmlChLRangePtr">xmlChLRangePtr</a>;
+typedef <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * <a href="#xmlChRangeGroupPtr">xmlChRangeGroupPtr</a>;
+typedef struct _xmlChSRange <a href="#xmlChSRange">xmlChSRange</a>;
+typedef struct _xmlChRangeGroup <a href="#xmlChRangeGroup">xmlChRangeGroup</a>;
+int <a href="#xmlIsChar">xmlIsChar</a> (unsigned int ch);
+int <a href="#xmlIsDigit">xmlIsDigit</a> (unsigned int ch);
+int <a href="#xmlIsBlank">xmlIsBlank</a> (unsigned int ch);
+int <a href="#xmlIsIdeographic">xmlIsIdeographic</a> (unsigned int ch);
+int <a href="#xmlCharInRange">xmlCharInRange</a> (unsigned int val, <br/> const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr);
+int <a href="#xmlIsPubidChar">xmlIsPubidChar</a> (unsigned int ch);
+int <a href="#xmlIsCombining">xmlIsCombining</a> (unsigned int ch);
+int <a href="#xmlIsBaseChar">xmlIsBaseChar</a> (unsigned int ch);
+int <a href="#xmlIsExtender">xmlIsExtender</a> (unsigned int ch);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBaseCharQ">Macro </a>xmlIsBaseCharQ</h3><pre class="programlisting">#define <a href="#xmlIsBaseCharQ">xmlIsBaseCharQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBaseChar_ch">Macro </a>xmlIsBaseChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBlankQ">Macro </a>xmlIsBlankQ</h3><pre class="programlisting">#define <a href="#xmlIsBlankQ">xmlIsBlankQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBlank_ch">Macro </a>xmlIsBlank_ch</h3><pre class="programlisting">#define <a href="#xmlIsBlank_ch">xmlIsBlank_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsCharQ">Macro </a>xmlIsCharQ</h3><pre class="programlisting">#define <a href="#xmlIsCharQ">xmlIsCharQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsChar_ch">Macro </a>xmlIsChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsChar_ch">xmlIsChar_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsCombiningQ">Macro </a>xmlIsCombiningQ</h3><pre class="programlisting">#define <a href="#xmlIsCombiningQ">xmlIsCombiningQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsDigitQ">Macro </a>xmlIsDigitQ</h3><pre class="programlisting">#define <a href="#xmlIsDigitQ">xmlIsDigitQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsDigit_ch">Macro </a>xmlIsDigit_ch</h3><pre class="programlisting">#define <a href="#xmlIsDigit_ch">xmlIsDigit_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsExtenderQ">Macro </a>xmlIsExtenderQ</h3><pre class="programlisting">#define <a href="#xmlIsExtenderQ">xmlIsExtenderQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsExtender_ch">Macro </a>xmlIsExtender_ch</h3><pre class="programlisting">#define <a href="#xmlIsExtender_ch">xmlIsExtender_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographicQ">Macro </a>xmlIsIdeographicQ</h3><pre class="programlisting">#define <a href="#xmlIsIdeographicQ">xmlIsIdeographicQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsPubidCharQ">Macro </a>xmlIsPubidCharQ</h3><pre class="programlisting">#define <a href="#xmlIsPubidCharQ">xmlIsPubidCharQ</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar_ch">Macro </a>xmlIsPubidChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a>(c);
+</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChLRange">Structure </a>xmlChLRange</h3><pre class="programlisting">struct _xmlChLRange {
+ unsigned int low
+ unsigned int high
+} xmlChLRange;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChLRangePtr">Typedef </a>xmlChLRangePtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * xmlChLRangePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChRangeGroup">Structure </a>xmlChRangeGroup</h3><pre class="programlisting">struct _xmlChRangeGroup {
+ int nbShortRange
+ int nbLongRange
+ const <a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * shortRange : points to an array of ranges
+ const <a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * longRange
+} xmlChRangeGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChRangeGroupPtr">Typedef </a>xmlChRangeGroupPtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * xmlChRangeGroupPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChSRange">Structure </a>xmlChSRange</h3><pre class="programlisting">struct _xmlChSRange {
+ unsigned short low
+ unsigned short high
+} xmlChSRange;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChSRangePtr">Typedef </a>xmlChSRangePtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * xmlChSRangePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBaseCharGroup">Variable </a>xmlIsBaseCharGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsBaseCharGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsCharGroup">Variable </a>xmlIsCharGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsCharGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsCombiningGroup">Variable </a>xmlIsCombiningGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsCombiningGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsDigitGroup">Variable </a>xmlIsDigitGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsDigitGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsExtenderGroup">Variable </a>xmlIsExtenderGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsExtenderGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographicGroup">Variable </a>xmlIsIdeographicGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsIdeographicGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar_tab">Variable </a>xmlIsPubidChar_tab</h3><pre class="programlisting">const unsigned charxmlIsPubidChar_tab[256] xmlIsPubidChar_tab;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharInRange"/>xmlCharInRange ()</h3><pre class="programlisting">int xmlCharInRange (unsigned int val, <br/> const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr)<br/>
+</pre><p>Does a binary search of the range table to determine if char is valid</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>character to be validated</td></tr><tr><td><span class="term"><i><tt>rptr</tt></i>:</span></td><td>pointer to range to be used to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if character valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBaseChar"/>xmlIsBaseChar ()</h3><pre class="programlisting">int xmlIsBaseChar (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBlank"/>xmlIsBlank ()</h3><pre class="programlisting">int xmlIsBlank (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a> or <a href="libxml2-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsChar"/>xmlIsChar ()</h3><pre class="programlisting">int xmlIsChar (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsCharQ">xmlIsCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsCombining"/>xmlIsCombining ()</h3><pre class="programlisting">int xmlIsCombining (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsDigit"/>xmlIsDigit ()</h3><pre class="programlisting">int xmlIsDigit (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a> or <a href="libxml2-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsExtender"/>xmlIsExtender ()</h3><pre class="programlisting">int xmlIsExtender (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a> or <a href="libxml2-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographic"/>xmlIsIdeographic ()</h3><pre class="programlisting">int xmlIsIdeographic (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar"/>xmlIsPubidChar ()</h3><pre class="programlisting">int xmlIsPubidChar (unsigned int ch)<br/>
+</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-debugXML.html b/doc/devhelp/libxml2-debugXML.html
new file mode 100644
index 0000000..00541cd
--- /dev/null
+++ b/doc/devhelp/libxml2-debugXML.html
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>debugXML: Tree debugging APIs</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-chvalid.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-dict.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">debugXML</span>
+ </h2>
+ <p>debugXML - Tree debugging APIs</p>
+ <p>Interfaces to a set of routines used for debugging the tree produced by the XML parser. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlShellCtxt <a href="#xmlShellCtxt">xmlShellCtxt</a>;
+typedef <a href="libxml2-debugXML.html#xmlShellCtxt">xmlShellCtxt</a> * <a href="#xmlShellCtxtPtr">xmlShellCtxtPtr</a>;
+void <a href="#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth);
+void <a href="#xmlLsOneNode">xmlLsOneNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+typedef char * <a href="#xmlShellReadlineFunc">xmlShellReadlineFunc</a> (char * prompt);
+int <a href="#xmlShellSave">xmlShellSave</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+const char * <a href="#xmlBoolToText">xmlBoolToText</a> (int boolval);
+int <a href="#xmlShellWrite">xmlShellWrite</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+int <a href="#xmlShellDu">xmlShellDu</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+int <a href="#xmlShellValidate">xmlShellValidate</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * dtd, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+int <a href="#xmlDebugCheckDocument">xmlDebugCheckDocument</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list);
+typedef int <a href="#xmlShellCmd">xmlShellCmd</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+int <a href="#xmlShellLoad">xmlShellLoad</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+void <a href="#xmlDebugDumpString">xmlDebugDumpString</a> (FILE * output, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+int <a href="#xmlShellBase">xmlShellBase</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+int <a href="#xmlShellCat">xmlShellCat</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+void <a href="#xmlDebugDumpDTD">xmlDebugDumpDTD</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
+void <a href="#xmlDebugDumpNode">xmlDebugDumpNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
+void <a href="#xmlDebugDumpEntities">xmlDebugDumpEntities</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlShellPrintNode">xmlShellPrintNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlShellPwd">xmlShellPwd</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+void <a href="#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
+void <a href="#xmlDebugDumpAttr">xmlDebugDumpAttr</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth);
+void <a href="#xmlDebugDumpDocument">xmlDebugDumpDocument</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlLsCountNode">xmlLsCountNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlShellPrintXPathError">xmlShellPrintXPathError</a> (int errorType, <br/> const char * arg);
+int <a href="#xmlShellDir">xmlShellDir</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+void <a href="#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth);
+int <a href="#xmlShellList">xmlShellList</a> (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+void <a href="#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a> (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlShell">xmlShell</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> char * filename, <br/> <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br/> FILE * output);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlShellCtxt">Structure </a>xmlShellCtxt</h3><pre class="programlisting">struct _xmlShellCtxt {
+ char * filename
+ <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> pctxt
+ int loaded
+ FILE * output
+ <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input
+} xmlShellCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellCtxtPtr">Typedef </a>xmlShellCtxtPtr</h3><pre class="programlisting"><a href="libxml2-debugXML.html#xmlShellCtxt">xmlShellCtxt</a> * xmlShellCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellCmd"/>Function type xmlShellCmd</h3><pre class="programlisting">int xmlShellCmd (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>This is a generic signature for the XML shell functions.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a string argument</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>a second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int, negative returns indicating errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellReadlineFunc"/>Function type xmlShellReadlineFunc</h3><pre class="programlisting">char * xmlShellReadlineFunc (char * prompt)<br/>
+</pre><p>This is a generic signature for the XML shell input function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prompt</tt></i>:</span></td><td>a string prompt</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string which will be freed by the Shell.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBoolToText"/>xmlBoolToText ()</h3><pre class="programlisting">const char * xmlBoolToText (int boolval)<br/>
+</pre><p>Convenient way to turn bool into text</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>boolval</tt></i>:</span></td><td>a bool to turn into text</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to either "True" or "False"</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugCheckDocument"/>xmlDebugCheckDocument ()</h3><pre class="programlisting">int xmlDebugCheckDocument (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Check the document for potential content problems, and output the errors to @output</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of errors found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpAttr"/>xmlDebugDumpAttr ()</h3><pre class="programlisting">void xmlDebugDumpAttr (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth)<br/>
+</pre><p>Dumps debug information for the <a href="libxml2-SAX.html#attribute">attribute</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpAttrList"/>xmlDebugDumpAttrList ()</h3><pre class="programlisting">void xmlDebugDumpAttrList (FILE * output, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> int depth)<br/>
+</pre><p>Dumps debug information for the <a href="libxml2-SAX.html#attribute">attribute</a> list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDTD"/>xmlDebugDumpDTD ()</h3><pre class="programlisting">void xmlDebugDumpDTD (FILE * output, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br/>
+</pre><p>Dumps debug information for the DTD</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDocument"/>xmlDebugDumpDocument ()</h3><pre class="programlisting">void xmlDebugDumpDocument (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Dumps debug information for the document, it's recursive</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpDocumentHead"/>xmlDebugDumpDocumentHead ()</h3><pre class="programlisting">void xmlDebugDumpDocumentHead (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Dumps debug information cncerning the document, not recursive</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpEntities"/>xmlDebugDumpEntities ()</h3><pre class="programlisting">void xmlDebugDumpEntities (FILE * output, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Dumps debug information for all the entities in use by the document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpNode"/>xmlDebugDumpNode ()</h3><pre class="programlisting">void xmlDebugDumpNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
+</pre><p>Dumps debug information for the element node, it is recursive</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpNodeList"/>xmlDebugDumpNodeList ()</h3><pre class="programlisting">void xmlDebugDumpNodeList (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
+</pre><p>Dumps debug information for the list of element node, it is recursive</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpOneNode"/>xmlDebugDumpOneNode ()</h3><pre class="programlisting">void xmlDebugDumpOneNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int depth)<br/>
+</pre><p>Dumps debug information for the element node, it is not recursive</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDebugDumpString"/>xmlDebugDumpString ()</h3><pre class="programlisting">void xmlDebugDumpString (FILE * output, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Dumps informations about the string, shorten it if necessary</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLsCountNode"/>xmlLsCountNode ()</h3><pre class="programlisting">int xmlLsCountNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Count the children of @node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to count</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of children of @node.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLsOneNode"/>xmlLsOneNode ()</h3><pre class="programlisting">void xmlLsOneNode (FILE * output, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Dump to @output the type and name of @node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to dump</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShell"/>xmlShell ()</h3><pre class="programlisting">void xmlShell (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> char * filename, <br/> <a href="libxml2-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br/> FILE * output)<br/>
+</pre><p>Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the initial document</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the line reading function</td></tr><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the output FILE*, defaults to stdout if NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellBase"/>xmlShellBase ()</h3><pre class="programlisting">int xmlShellBase (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "base" dumps the current XML base of the node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellCat"/>xmlShellCat ()</h3><pre class="programlisting">int xmlShellCat (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellDir"/>xmlShellDir ()</h3><pre class="programlisting">int xmlShellDir (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellDu"/>xmlShellDu ()</h3><pre class="programlisting">int xmlShellDu (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining a subtree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellList"/>xmlShellList ()</h3><pre class="programlisting">int xmlShellList (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * arg, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellLoad"/>xmlShellLoad ()</h3><pre class="programlisting">int xmlShellLoad (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "load" loads a new document specified by the filename</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 if loading failed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellPrintNode"/>xmlShellPrintNode ()</h3><pre class="programlisting">void xmlShellPrintNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Print node to the output FILE</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a non-null node to print to the output FILE</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellPrintXPathError"/>xmlShellPrintXPathError ()</h3><pre class="programlisting">void xmlShellPrintXPathError (int errorType, <br/> const char * arg)<br/>
+</pre><p>Print the xpath error to libxml default error channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>errorType</tt></i>:</span></td><td>valid xpath error id</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>the argument that cause xpath to fail</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellPrintXPathResult"/>xmlShellPrintXPathResult ()</h3><pre class="programlisting">void xmlShellPrintXPathResult (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list)<br/>
+</pre><p>Prints result to the output FILE</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a valid result generated by an xpath evaluation</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellPwd"/>xmlShellPwd ()</h3><pre class="programlisting">int xmlShellPwd (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * buffer, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellSave"/>xmlShellSave ()</h3><pre class="programlisting">int xmlShellSave (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "save" Write the current document to the filename, or it's original name</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellValidate"/>xmlShellValidate ()</h3><pre class="programlisting">int xmlShellValidate (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * dtd, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD URI (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlShellWrite"/>xmlShellWrite ()</h3><pre class="programlisting">int xmlShellWrite (<a href="libxml2-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br/> char * filename, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the tree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-dict.html b/doc/devhelp/libxml2-dict.html
new file mode 100644
index 0000000..fd5f6b9
--- /dev/null
+++ b/doc/devhelp/libxml2-dict.html
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>dict: string dictionnary</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-debugXML.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-encoding.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">dict</span>
+ </h2>
+ <p>dict - string dictionnary</p>
+ <p>dictionary of reusable strings, just used to avoid allocation and freeing operations. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlDict <a href="#xmlDict">xmlDict</a>;
+typedef <a href="libxml2-dict.html#xmlDict">xmlDict</a> * <a href="#xmlDictPtr">xmlDictPtr</a>;
+size_t <a href="#xmlDictGetUsage">xmlDictGetUsage</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+int <a href="#xmlDictReference">xmlDictReference</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+void <a href="#xmlDictCleanup">xmlDictCleanup</a> (void);
+int <a href="#xmlDictSize">xmlDictSize</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictExists">xmlDictExists</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len);
+size_t <a href="#xmlDictSetLimit">xmlDictSetLimit</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> size_t limit);
+int <a href="#xmlDictOwns">xmlDictOwns</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictQLookup">xmlDictQLookup</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlInitializeDict">xmlInitializeDict</a> (void);
+<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreateSub">xmlDictCreateSub</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> sub);
+void <a href="#xmlDictFree">xmlDictFree</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictLookup">xmlDictLookup</a> (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len);
+<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreate">xmlDictCreate</a> (void);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlDict">Structure </a>xmlDict</h3><pre class="programlisting">struct _xmlDict {
+The content of this structure is not made public by the API.
+} xmlDict;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictPtr">Typedef </a>xmlDictPtr</h3><pre class="programlisting"><a href="libxml2-dict.html#xmlDict">xmlDict</a> * xmlDictPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictCleanup"/>xmlDictCleanup ()</h3><pre class="programlisting">void xmlDictCleanup (void)<br/>
+</pre><p>Free the dictionary mutex. Do not call unless sure the library is not in use anymore !</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictCreate"/>xmlDictCreate ()</h3><pre class="programlisting"><a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreate (void)<br/>
+</pre><p>Create a new dictionary</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictCreateSub"/>xmlDictCreateSub ()</h3><pre class="programlisting"><a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreateSub (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br/>
+</pre><p>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictExists"/>xmlDictExists ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlDictExists (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len)<br/>
+</pre><p>Check if the @name exists in the dictionnary @dict.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictFree"/>xmlDictFree ()</h3><pre class="programlisting">void xmlDictFree (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictGetUsage"/>xmlDictGetUsage ()</h3><pre class="programlisting">size_t xmlDictGetUsage (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Get how much memory is used by a dictionary for strings Added in 2.9.0</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictLookup"/>xmlDictLookup ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlDictLookup (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len)<br/>
+</pre><p>Add the @name to the dictionnary @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictOwns"/>xmlDictOwns ()</h3><pre class="programlisting">int xmlDictOwns (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>check if a string is owned by the disctionary</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictQLookup"/>xmlDictQLookup ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlDictQLookup (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Add the QName @prefix:@name to the hash @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictReference"/>xmlDictReference ()</h3><pre class="programlisting">int xmlDictReference (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Increment the <a href="libxml2-SAX.html#reference">reference</a> counter of a dictionary</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictSetLimit"/>xmlDictSetLimit ()</h3><pre class="programlisting">size_t xmlDictSetLimit (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br/> size_t limit)<br/>
+</pre><p>Set a size limit for the dictionary Added in 2.9.0</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDictSize"/>xmlDictSize ()</h3><pre class="programlisting">int xmlDictSize (<a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Query the number of elements installed in the hash @dict.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitializeDict"/>xmlInitializeDict ()</h3><pre class="programlisting">int xmlInitializeDict (void)<br/>
+</pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if initialization was already done, and 1 if that call led to the initialization</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-encoding.html b/doc/devhelp/libxml2-encoding.html
new file mode 100644
index 0000000..261e50a
--- /dev/null
+++ b/doc/devhelp/libxml2-encoding.html
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>encoding: interface for the encoding conversion functions</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-dict.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-entities.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">encoding</span>
+ </h2>
+ <p>encoding - interface for the encoding conversion functions</p>
+ <p>interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, "The Unicode Standard -- Worldwide Character Encoding -- Version 1.0", Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _uconv_t <a href="#uconv_t">uconv_t</a>;
+typedef enum <a href="#xmlCharEncoding">xmlCharEncoding</a>;
+typedef struct _xmlCharEncodingHandler <a href="#xmlCharEncodingHandler">xmlCharEncodingHandler</a>;
+typedef <a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * <a href="#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a>;
+int <a href="#xmlDelEncodingAlias">xmlDelEncodingAlias</a> (const char * alias);
+const char * <a href="#xmlGetEncodingAlias">xmlGetEncodingAlias</a> (const char * alias);
+void <a href="#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler);
+int <a href="#UTF8Toisolat1">UTF8Toisolat1</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
+void <a href="#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a> (void);
+int <a href="#xmlAddEncodingAlias">xmlAddEncodingAlias</a> (const char * name, <br/> const char * alias);
+void <a href="#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a> (void);
+int <a href="#xmlCharEncOutFunc">xmlCharEncOutFunc</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in);
+<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> <a href="#xmlParseCharEncoding">xmlParseCharEncoding</a> (const char * name);
+typedef int <a href="#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
+void <a href="#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a> (void);
+<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a> (const char * name, <br/> <a href="libxml2-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output);
+typedef int <a href="#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
+int <a href="#isolat1ToUTF8">isolat1ToUTF8</a> (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen);
+<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a> (const char * name);
+int <a href="#xmlCharEncInFunc">xmlCharEncInFunc</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in);
+<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a> (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+int <a href="#xmlCharEncFirstLine">xmlCharEncFirstLine</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in);
+<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> <a href="#xmlDetectCharEncoding">xmlDetectCharEncoding</a> (const unsigned char * in, <br/> int len);
+int <a href="#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler);
+const char * <a href="#xmlGetCharEncodingName">xmlGetCharEncodingName</a> (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="uconv_t">Structure </a>uconv_t</h3><pre class="programlisting">struct _uconv_t {
+ UConverter * uconv : for conversion between an encoding and UTF-16
+ UConverter * utf8 : for conversion between UTF-8 and UTF-16
+} uconv_t;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncoding">Enum </a>xmlCharEncoding</h3><pre class="programlisting">enum <a href="#xmlCharEncoding">xmlCharEncoding</a> {
+ <a name="XML_CHAR_ENCODING_ERROR">XML_CHAR_ENCODING_ERROR</a> = -1 /* No char encoding detected */
+ <a name="XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a> = 0 /* No char encoding detected */
+ <a name="XML_CHAR_ENCODING_UTF8">XML_CHAR_ENCODING_UTF8</a> = 1 /* UTF-8 */
+ <a name="XML_CHAR_ENCODING_UTF16LE">XML_CHAR_ENCODING_UTF16LE</a> = 2 /* UTF-16 little endian */
+ <a name="XML_CHAR_ENCODING_UTF16BE">XML_CHAR_ENCODING_UTF16BE</a> = 3 /* UTF-16 big endian */
+ <a name="XML_CHAR_ENCODING_UCS4LE">XML_CHAR_ENCODING_UCS4LE</a> = 4 /* UCS-4 little endian */
+ <a name="XML_CHAR_ENCODING_UCS4BE">XML_CHAR_ENCODING_UCS4BE</a> = 5 /* UCS-4 big endian */
+ <a name="XML_CHAR_ENCODING_EBCDIC">XML_CHAR_ENCODING_EBCDIC</a> = 6 /* EBCDIC uh! */
+ <a name="XML_CHAR_ENCODING_UCS4_2143">XML_CHAR_ENCODING_UCS4_2143</a> = 7 /* UCS-4 unusual ordering */
+ <a name="XML_CHAR_ENCODING_UCS4_3412">XML_CHAR_ENCODING_UCS4_3412</a> = 8 /* UCS-4 unusual ordering */
+ <a name="XML_CHAR_ENCODING_UCS2">XML_CHAR_ENCODING_UCS2</a> = 9 /* UCS-2 */
+ <a name="XML_CHAR_ENCODING_8859_1">XML_CHAR_ENCODING_8859_1</a> = 10 /* ISO-8859-1 ISO Latin 1 */
+ <a name="XML_CHAR_ENCODING_8859_2">XML_CHAR_ENCODING_8859_2</a> = 11 /* ISO-8859-2 ISO Latin 2 */
+ <a name="XML_CHAR_ENCODING_8859_3">XML_CHAR_ENCODING_8859_3</a> = 12 /* ISO-8859-3 */
+ <a name="XML_CHAR_ENCODING_8859_4">XML_CHAR_ENCODING_8859_4</a> = 13 /* ISO-8859-4 */
+ <a name="XML_CHAR_ENCODING_8859_5">XML_CHAR_ENCODING_8859_5</a> = 14 /* ISO-8859-5 */
+ <a name="XML_CHAR_ENCODING_8859_6">XML_CHAR_ENCODING_8859_6</a> = 15 /* ISO-8859-6 */
+ <a name="XML_CHAR_ENCODING_8859_7">XML_CHAR_ENCODING_8859_7</a> = 16 /* ISO-8859-7 */
+ <a name="XML_CHAR_ENCODING_8859_8">XML_CHAR_ENCODING_8859_8</a> = 17 /* ISO-8859-8 */
+ <a name="XML_CHAR_ENCODING_8859_9">XML_CHAR_ENCODING_8859_9</a> = 18 /* ISO-8859-9 */
+ <a name="XML_CHAR_ENCODING_2022_JP">XML_CHAR_ENCODING_2022_JP</a> = 19 /* ISO-2022-JP */
+ <a name="XML_CHAR_ENCODING_SHIFT_JIS">XML_CHAR_ENCODING_SHIFT_JIS</a> = 20 /* Shift_JIS */
+ <a name="XML_CHAR_ENCODING_EUC_JP">XML_CHAR_ENCODING_EUC_JP</a> = 21 /* EUC-JP */
+ <a name="XML_CHAR_ENCODING_ASCII">XML_CHAR_ENCODING_ASCII</a> = 22 /* pure ASCII */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncodingHandler">Structure </a>xmlCharEncodingHandler</h3><pre class="programlisting">struct _xmlCharEncodingHandler {
+ char * name
+ <a href="libxml2-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input
+ <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output
+ iconv_t iconv_in
+ iconv_t iconv_out
+ <a href="libxml2-encoding.html#uconv_t">uconv_t</a> * uconv_in
+ <a href="libxml2-encoding.html#uconv_t">uconv_t</a> * uconv_out
+} xmlCharEncodingHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncodingHandlerPtr">Typedef </a>xmlCharEncodingHandlerPtr</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * xmlCharEncodingHandlerPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncodingInputFunc"/>Function type xmlCharEncodingInputFunc</h3><pre class="programlisting">int xmlCharEncodingInputFunc (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
+</pre><p>Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the UTF-8 result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of chars in the original encoding</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncodingOutputFunc"/>Function type xmlCharEncodingOutputFunc</h3><pre class="programlisting">int xmlCharEncodingOutputFunc (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
+</pre><p>Take a block of UTF-8 chars in and try to convert it to another encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets produced.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="UTF8Toisolat1"/>UTF8Toisolat1 ()</h3><pre class="programlisting">int UTF8Toisolat1 (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="isolat1ToUTF8"/>isolat1ToUTF8 ()</h3><pre class="programlisting">int isolat1ToUTF8 (unsigned char * out, <br/> int * outlen, <br/> const unsigned char * in, <br/> int * inlen)<br/>
+</pre><p>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of ISO Latin 1 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddEncodingAlias"/>xmlAddEncodingAlias ()</h3><pre class="programlisting">int xmlAddEncodingAlias (const char * name, <br/> const char * alias)<br/>
+</pre><p>Registers an alias @alias for an encoding named @name. Existing alias will be overwritten.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncCloseFunc"/>xmlCharEncCloseFunc ()</h3><pre class="programlisting">int xmlCharEncCloseFunc (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler)<br/>
+</pre><p>Generic front-end for encoding handler close function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncFirstLine"/>xmlCharEncFirstLine ()</h3><pre class="programlisting">int xmlCharEncFirstLine (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br/>
+</pre><p>Front-end for the encoding handler input function, but handle only the very first line, i.e. limit itself to 45 chars.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncInFunc"/>xmlCharEncInFunc ()</h3><pre class="programlisting">int xmlCharEncInFunc (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br/>
+</pre><p>Generic front-end for the encoding handler input function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char encoding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharEncOutFunc"/>xmlCharEncOutFunc ()</h3><pre class="programlisting">int xmlCharEncOutFunc (<a href="libxml2-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br/>
+</pre><p>Generic front-end for the encoding handler output function a first call with @in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupCharEncodingHandlers"/>xmlCleanupCharEncodingHandlers ()</h3><pre class="programlisting">void xmlCleanupCharEncodingHandlers (void)<br/>
+</pre><p>Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupEncodingAliases"/>xmlCleanupEncodingAliases ()</h3><pre class="programlisting">void xmlCleanupEncodingAliases (void)<br/>
+</pre><p>Unregisters all aliases</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDelEncodingAlias"/>xmlDelEncodingAlias ()</h3><pre class="programlisting">int xmlDelEncodingAlias (const char * alias)<br/>
+</pre><p>Unregisters an encoding alias @alias</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDetectCharEncoding"/>xmlDetectCharEncoding ()</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> xmlDetectCharEncoding (const unsigned char * in, <br/> int len)<br/>
+</pre><p>Guess the encoding of the entity using the first bytes of the entity content according to the non-normative appendix F of the XML-1.0 recommendation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant).</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of the XML_CHAR_ENCODING_... values.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFindCharEncodingHandler"/>xmlFindCharEncodingHandler ()</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlFindCharEncodingHandler (const char * name)<br/>
+</pre><p>Search in the registered set the handler able to read/write that encoding.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>a string describing the char encoding.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the handler or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetCharEncodingHandler"/>xmlGetCharEncodingHandler ()</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlGetCharEncodingHandler (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Search in the registered set the handler able to read/write that encoding.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> value.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the handler or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetCharEncodingName"/>xmlGetCharEncodingName ()</h3><pre class="programlisting">const char * xmlGetCharEncodingName (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the canonical name for the given encoding</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetEncodingAlias"/>xmlGetEncodingAlias ()</h3><pre class="programlisting">const char * xmlGetEncodingAlias (const char * alias)<br/>
+</pre><p>Lookup an encoding name for the given alias.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise the original name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitCharEncodingHandlers"/>xmlInitCharEncodingHandlers ()</h3><pre class="programlisting">void xmlInitCharEncodingHandlers (void)<br/>
+</pre><p>Initialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn't need to be called in normal processing.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewCharEncodingHandler"/>xmlNewCharEncodingHandler ()</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlNewCharEncodingHandler (const char * name, <br/> <a href="libxml2-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output)<br/>
+</pre><p>Create and registers an xmlCharEncodingHandler.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the <a href="libxml2-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> to read that encoding</td></tr><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> to write that encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> created (or NULL in case of error).</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCharEncoding"/>xmlParseCharEncoding ()</h3><pre class="programlisting"><a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> xmlParseCharEncoding (const char * name)<br/>
+</pre><p>Compare the string to the encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of the XML_CHAR_ENCODING_... values or <a href="libxml2-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a> if not recognized.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterCharEncodingHandler"/>xmlRegisterCharEncodingHandler ()</h3><pre class="programlisting">void xmlRegisterCharEncodingHandler (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br/>
+</pre><p>Register the char encoding handler, surprising, isn't it ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler block</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-entities.html b/doc/devhelp/libxml2-entities.html
new file mode 100644
index 0000000..3262c40
--- /dev/null
+++ b/doc/devhelp/libxml2-entities.html
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>entities: interface for the XML entities handling</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-encoding.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-globals.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">entities</span>
+ </h2>
+ <p>entities - interface for the XML entities handling</p>
+ <p>this module provides some of the entity API needed for the parser and applications. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef enum <a href="#xmlEntityType">xmlEntityType</a>;
+typedef struct _xmlHashTable <a href="#xmlEntitiesTable">xmlEntitiesTable</a>;
+typedef <a href="libxml2-entities.html#xmlEntitiesTable">xmlEntitiesTable</a> * <a href="#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a>;
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlAddDocEntity">xmlAddDocEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlNewEntity">xmlNewEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetDocEntity">xmlGetDocEntity</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetDtdEntity">xmlGetDtdEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlAddDtdEntity">xmlAddDtdEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a> (<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);
+void <a href="#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a> (<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetParameterEntity">xmlGetParameterEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table);
+void <a href="#xmlDumpEntityDecl">xmlDumpEntityDecl</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent);
+void <a href="#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a> (void);
+<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a> (void);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeEntities">xmlEncodeEntities</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a> (void);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlEntitiesTable">Structure </a>xmlEntitiesTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlEntitiesTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEntitiesTablePtr">Typedef </a>xmlEntitiesTablePtr</h3><pre class="programlisting"><a href="libxml2-entities.html#xmlEntitiesTable">xmlEntitiesTable</a> * xmlEntitiesTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEntityType">Enum </a>xmlEntityType</h3><pre class="programlisting">enum <a href="#xmlEntityType">xmlEntityType</a> {
+ <a name="XML_INTERNAL_GENERAL_ENTITY">XML_INTERNAL_GENERAL_ENTITY</a> = 1
+ <a name="XML_EXTERNAL_GENERAL_PARSED_ENTITY">XML_EXTERNAL_GENERAL_PARSED_ENTITY</a> = 2
+ <a name="XML_EXTERNAL_GENERAL_UNPARSED_ENTITY">XML_EXTERNAL_GENERAL_UNPARSED_ENTITY</a> = 3
+ <a name="XML_INTERNAL_PARAMETER_ENTITY">XML_INTERNAL_PARAMETER_ENTITY</a> = 4
+ <a name="XML_EXTERNAL_PARAMETER_ENTITY">XML_EXTERNAL_PARAMETER_ENTITY</a> = 5
+ <a name="XML_INTERNAL_PREDEFINED_ENTITY">XML_INTERNAL_PREDEFINED_ENTITY</a> = 6
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddDocEntity"/>xmlAddDocEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDocEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Register a new entity for this document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddDtdEntity"/>xmlAddDtdEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDtdEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Register a new entity for this document DTD external subset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupPredefinedEntities"/>xmlCleanupPredefinedEntities ()</h3><pre class="programlisting">void xmlCleanupPredefinedEntities (void)<br/>
+</pre><p>Cleanup up the predefined entities table. Deprecated call</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyEntitiesTable"/>xmlCopyEntitiesTable ()</h3><pre class="programlisting"><a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCopyEntitiesTable (<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br/>
+</pre><p>Build a copy of an entity table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateEntitiesTable"/>xmlCreateEntitiesTable ()</h3><pre class="programlisting"><a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCreateEntitiesTable (void)<br/>
+</pre><p>create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> just created or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpEntitiesTable"/>xmlDumpEntitiesTable ()</h3><pre class="programlisting">void xmlDumpEntitiesTable (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br/>
+</pre><p>This will dump the content of the entity table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>An XML buffer.</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpEntityDecl"/>xmlDumpEntityDecl ()</h3><pre class="programlisting">void xmlDumpEntityDecl (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent)<br/>
+</pre><p>This will dump the content of the entity table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>An XML buffer.</td></tr><tr><td><span class="term"><i><tt>ent</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEncodeEntities"/>xmlEncodeEntities ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeEntities (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input)<br/>
+</pre><p>TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to <a href="libxml2-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a> ! This routine will issue a warning when encountered.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEncodeEntitiesReentrant"/>xmlEncodeEntitiesReentrant ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeEntitiesReentrant (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input)<br/>
+</pre><p>Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEncodeSpecialChars"/>xmlEncodeSpecialChars ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeSpecialChars (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * input)<br/>
+</pre><p>Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeEntitiesTable"/>xmlFreeEntitiesTable ()</h3><pre class="programlisting">void xmlFreeEntitiesTable (<a href="libxml2-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDocEntity"/>xmlGetDocEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDocEntity (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Do an entity lookup in the document entity hash table and</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding entity, otherwise a lookup is done in the predefined entities too. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdEntity"/>xmlGetDtdEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDtdEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Do an entity lookup in the DTD entity hash table and</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetParameterEntity"/>xmlGetParameterEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetParameterEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Do an entity lookup in the internal and external subsets and</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding parameter entity, if found. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetPredefinedEntity"/>xmlGetPredefinedEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetPredefinedEntity (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Check whether this name is an predefined entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitializePredefinedEntities"/>xmlInitializePredefinedEntities ()</h3><pre class="programlisting">void xmlInitializePredefinedEntities (void)<br/>
+</pre><p>Set up the predefined entities. Deprecated call</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewEntity"/>xmlNewEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlNewEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-globals.html b/doc/devhelp/libxml2-globals.html
new file mode 100644
index 0000000..415492b
--- /dev/null
+++ b/doc/devhelp/libxml2-globals.html
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>globals: interface for all global variables of the library</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-entities.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-hash.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">globals</span>
+ </h2>
+ <p>globals - interface for all global variables of the library</p>
+ <p>all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data </p>
+ <p>Author(s): Gary Pennington &lt;Gary.Pennington@uk.sun.com&gt;, Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-globals.html#xmlGlobalState">xmlGlobalState</a> * <a href="#xmlGlobalStatePtr">xmlGlobalStatePtr</a>;
+typedef struct _xmlGlobalState <a href="#xmlGlobalState">xmlGlobalState</a>;
+void <a href="#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a> (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler);
+void <a href="#xmlInitializeGlobalState">xmlInitializeGlobalState</a> (<a href="libxml2-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> gs);
+<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a> (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v);
+int <a href="#xmlThrDefPedanticParserDefaultValue">xmlThrDefPedanticParserDefaultValue</a> (int v);
+<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a> (<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func);
+typedef <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> <a href="#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a> (<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func);
+<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a> (<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func);
+int <a href="#xmlThrDefDefaultBufferSize">xmlThrDefDefaultBufferSize</a> (int v);
+<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> <a href="#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a> (<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func);
+int <a href="#xmlThrDefLoadExtDtdDefaultValue">xmlThrDefLoadExtDtdDefaultValue</a> (int v);
+<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a> (<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func);
+int <a href="#xmlThrDefKeepBlanksDefaultValue">xmlThrDefKeepBlanksDefaultValue</a> (int v);
+typedef void <a href="#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlThrDefParserDebugEntities">xmlThrDefParserDebugEntities</a> (int v);
+<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> <a href="#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a> (<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func);
+void <a href="#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a> (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler);
+<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> <a href="#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a> (<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func);
+int <a href="#xmlThrDefDoValidityCheckingDefaultValue">xmlThrDefDoValidityCheckingDefaultValue</a> (int v);
+void <a href="#xmlCleanupGlobals">xmlCleanupGlobals</a> (void);
+int <a href="#xmlThrDefGetWarningsDefaultValue">xmlThrDefGetWarningsDefaultValue</a> (int v);
+<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a> (<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func);
+int <a href="#xmlThrDefSubstituteEntitiesDefaultValue">xmlThrDefSubstituteEntitiesDefaultValue</a> (int v);
+typedef void <a href="#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlThrDefSaveNoEmptyTags">xmlThrDefSaveNoEmptyTags</a> (int v);
+int <a href="#xmlThrDefIndentTreeOutput">xmlThrDefIndentTreeOutput</a> (int v);
+typedef <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression);
+void <a href="#xmlInitGlobals">xmlInitGlobals</a> (void);
+int <a href="#xmlThrDefLineNumbersDefaultValue">xmlThrDefLineNumbersDefaultValue</a> (int v);
+const char * <a href="#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a> (const char * v);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlGlobalState">Structure </a>xmlGlobalState</h3><pre class="programlisting">struct _xmlGlobalState {
+ const char * xmlParserVersion
+ <a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> xmlDefaultSAXLocator
+ <a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> xmlDefaultSAXHandler
+ <a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> docbDefaultSAXHandler
+ <a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> htmlDefaultSAXHandler
+ <a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> xmlFree
+ <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMalloc
+ <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> xmlMemStrdup
+ <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> xmlRealloc
+ <a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> xmlGenericError
+ <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> xmlStructuredError
+ void * xmlGenericErrorContext
+ int oldXMLWDcompatibility
+ <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlBufferAllocScheme
+ int xmlDefaultBufferSize
+ int xmlSubstituteEntitiesDefaultValue
+ int xmlDoValidityCheckingDefaultValue
+ int xmlGetWarningsDefaultValue
+ int xmlKeepBlanksDefaultValue
+ int xmlLineNumbersDefaultValue
+ int xmlLoadExtDtdDefaultValue
+ int xmlParserDebugEntities
+ int xmlPedanticParserDefaultValue
+ int xmlSaveNoEmptyTags
+ int xmlIndentTreeOutput
+ const char * xmlTreeIndentString
+ <a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefaultValue
+ <a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefaultValue
+ <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMallocAtomic
+ <a href="libxml2-xmlerror.html#xmlError">xmlError</a> xmlLastError
+ <a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlParserInputBufferCreateFilenameValue
+ <a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlOutputBufferCreateFilenameValue
+ void * xmlStructuredErrorContext
+} xmlGlobalState;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGlobalStatePtr">Typedef </a>xmlGlobalStatePtr</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlGlobalState">xmlGlobalState</a> * xmlGlobalStatePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDeregisterNodeFunc"/>Function type xmlDeregisterNodeFunc</h3><pre class="programlisting">void xmlDeregisterNodeFunc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Signature for the deregistration callback of a discarded node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilenameFunc"/>Function type xmlOutputBufferCreateFilenameFunc</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilenameFunc (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression)<br/>
+</pre><p>Signature for the function doing the lookup for a suitable output method corresponding to an URI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI to write to</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> in case of success or NULL if no method was found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilenameFunc"/>Function type xmlParserInputBufferCreateFilenameFunc</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilenameFunc (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Signature for the function doing the lookup for a suitable input method corresponding to an URI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI to read from</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the requested source encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in case of success or NULL if no method was found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterNodeFunc"/>Function type xmlRegisterNodeFunc</h3><pre class="programlisting">void xmlRegisterNodeFunc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Signature for the registration callback of a created node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="docbDefaultSAXHandler">Variable </a>docbDefaultSAXHandler</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> docbDefaultSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlDefaultSAXHandler">Variable </a>htmlDefaultSAXHandler</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> htmlDefaultSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="oldXMLWDcompatibility">Variable </a>oldXMLWDcompatibility</h3><pre class="programlisting">int oldXMLWDcompatibility;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferAllocScheme">Variable </a>xmlBufferAllocScheme</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlBufferAllocScheme;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDefaultBufferSize">Variable </a>xmlDefaultBufferSize</h3><pre class="programlisting">int xmlDefaultBufferSize;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXHandler">Variable </a>xmlDefaultSAXHandler</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> xmlDefaultSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDefaultSAXLocator">Variable </a>xmlDefaultSAXLocator</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> xmlDefaultSAXLocator;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDeregisterNodeDefaultValue">Variable </a>xmlDeregisterNodeDefaultValue</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDoValidityCheckingDefaultValue">Variable </a>xmlDoValidityCheckingDefaultValue</h3><pre class="programlisting">int xmlDoValidityCheckingDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFree">Variable </a>xmlFree</h3><pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> xmlFree;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGenericError">Variable </a>xmlGenericError</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> xmlGenericError;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGenericErrorContext">Variable </a>xmlGenericErrorContext</h3><pre class="programlisting">void * xmlGenericErrorContext;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetWarningsDefaultValue">Variable </a>xmlGetWarningsDefaultValue</h3><pre class="programlisting">int xmlGetWarningsDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIndentTreeOutput">Variable </a>xmlIndentTreeOutput</h3><pre class="programlisting">int xmlIndentTreeOutput;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlKeepBlanksDefaultValue">Variable </a>xmlKeepBlanksDefaultValue</h3><pre class="programlisting">int xmlKeepBlanksDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLastError">Variable </a>xmlLastError</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlError">xmlError</a> xmlLastError;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLineNumbersDefaultValue">Variable </a>xmlLineNumbersDefaultValue</h3><pre class="programlisting">int xmlLineNumbersDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadExtDtdDefaultValue">Variable </a>xmlLoadExtDtdDefaultValue</h3><pre class="programlisting">int xmlLoadExtDtdDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMalloc">Variable </a>xmlMalloc</h3><pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMalloc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMallocAtomic">Variable </a>xmlMallocAtomic</h3><pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMallocAtomic;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemStrdup">Variable </a>xmlMemStrdup</h3><pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> xmlMemStrdup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilenameValue">Variable </a>xmlOutputBufferCreateFilenameValue</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlOutputBufferCreateFilenameValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserDebugEntities">Variable </a>xmlParserDebugEntities</h3><pre class="programlisting">int xmlParserDebugEntities;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilenameValue">Variable </a>xmlParserInputBufferCreateFilenameValue</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlParserInputBufferCreateFilenameValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserVersion">Variable </a>xmlParserVersion</h3><pre class="programlisting">const char * xmlParserVersion;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPedanticParserDefaultValue">Variable </a>xmlPedanticParserDefaultValue</h3><pre class="programlisting">int xmlPedanticParserDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRealloc">Variable </a>xmlRealloc</h3><pre class="programlisting"><a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> xmlRealloc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterNodeDefaultValue">Variable </a>xmlRegisterNodeDefaultValue</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveNoEmptyTags">Variable </a>xmlSaveNoEmptyTags</h3><pre class="programlisting">int xmlSaveNoEmptyTags;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStructuredError">Variable </a>xmlStructuredError</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> xmlStructuredError;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStructuredErrorContext">Variable </a>xmlStructuredErrorContext</h3><pre class="programlisting">void * xmlStructuredErrorContext;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSubstituteEntitiesDefaultValue">Variable </a>xmlSubstituteEntitiesDefaultValue</h3><pre class="programlisting">int xmlSubstituteEntitiesDefaultValue;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTreeIndentString">Variable </a>xmlTreeIndentString</h3><pre class="programlisting">const char * xmlTreeIndentString;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupGlobals"/>xmlCleanupGlobals ()</h3><pre class="programlisting">void xmlCleanupGlobals (void)<br/>
+</pre><p>Additional cleanup for multi-threading</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDeregisterNodeDefault"/>xmlDeregisterNodeDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefault (<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br/>
+</pre><p>Registers a callback for node destruction</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new DeregisterNodeFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the deregistration function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitGlobals"/>xmlInitGlobals ()</h3><pre class="programlisting">void xmlInitGlobals (void)<br/>
+</pre><p>Additional initialisation for multi-threading</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitializeGlobalState"/>xmlInitializeGlobalState ()</h3><pre class="programlisting">void xmlInitializeGlobalState (<a href="libxml2-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> gs)<br/>
+</pre><p>xmlInitializeGlobalState() initialize a global state with all the default values of the library.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>gs</tt></i>:</span></td><td>a pointer to a newly allocated global state</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilenameDefault"/>xmlOutputBufferCreateFilenameDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlOutputBufferCreateFilenameDefault (<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)<br/>
+</pre><p>Registers a callback for URI output file handling</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new OutputBufferCreateFilenameFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilenameDefault"/>xmlParserInputBufferCreateFilenameDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlParserInputBufferCreateFilenameDefault (<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)<br/>
+</pre><p>Registers a callback for URI input file handling</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new ParserInputBufferCreateFilenameFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterNodeDefault"/>xmlRegisterNodeDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefault (<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br/>
+</pre><p>Registers a callback for node creation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new RegisterNodeFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefBufferAllocScheme"/>xmlThrDefBufferAllocScheme ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlThrDefBufferAllocScheme (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefDefaultBufferSize"/>xmlThrDefDefaultBufferSize ()</h3><pre class="programlisting">int xmlThrDefDefaultBufferSize (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefDeregisterNodeDefault"/>xmlThrDefDeregisterNodeDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlThrDefDeregisterNodeDefault (<a href="libxml2-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefDoValidityCheckingDefaultValue"/>xmlThrDefDoValidityCheckingDefaultValue ()</h3><pre class="programlisting">int xmlThrDefDoValidityCheckingDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefGetWarningsDefaultValue"/>xmlThrDefGetWarningsDefaultValue ()</h3><pre class="programlisting">int xmlThrDefGetWarningsDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefIndentTreeOutput"/>xmlThrDefIndentTreeOutput ()</h3><pre class="programlisting">int xmlThrDefIndentTreeOutput (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefKeepBlanksDefaultValue"/>xmlThrDefKeepBlanksDefaultValue ()</h3><pre class="programlisting">int xmlThrDefKeepBlanksDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefLineNumbersDefaultValue"/>xmlThrDefLineNumbersDefaultValue ()</h3><pre class="programlisting">int xmlThrDefLineNumbersDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefLoadExtDtdDefaultValue"/>xmlThrDefLoadExtDtdDefaultValue ()</h3><pre class="programlisting">int xmlThrDefLoadExtDtdDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefOutputBufferCreateFilenameDefault"/>xmlThrDefOutputBufferCreateFilenameDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlThrDefOutputBufferCreateFilenameDefault (<a href="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefParserDebugEntities"/>xmlThrDefParserDebugEntities ()</h3><pre class="programlisting">int xmlThrDefParserDebugEntities (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefParserInputBufferCreateFilenameDefault"/>xmlThrDefParserInputBufferCreateFilenameDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlThrDefParserInputBufferCreateFilenameDefault (<a href="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefPedanticParserDefaultValue"/>xmlThrDefPedanticParserDefaultValue ()</h3><pre class="programlisting">int xmlThrDefPedanticParserDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefRegisterNodeDefault"/>xmlThrDefRegisterNodeDefault ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlThrDefRegisterNodeDefault (<a href="libxml2-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefSaveNoEmptyTags"/>xmlThrDefSaveNoEmptyTags ()</h3><pre class="programlisting">int xmlThrDefSaveNoEmptyTags (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefSetGenericErrorFunc"/>xmlThrDefSetGenericErrorFunc ()</h3><pre class="programlisting">void xmlThrDefSetGenericErrorFunc (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefSetStructuredErrorFunc"/>xmlThrDefSetStructuredErrorFunc ()</h3><pre class="programlisting">void xmlThrDefSetStructuredErrorFunc (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefSubstituteEntitiesDefaultValue"/>xmlThrDefSubstituteEntitiesDefaultValue ()</h3><pre class="programlisting">int xmlThrDefSubstituteEntitiesDefaultValue (int v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlThrDefTreeIndentString"/>xmlThrDefTreeIndentString ()</h3><pre class="programlisting">const char * xmlThrDefTreeIndentString (const char * v)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-hash.html b/doc/devhelp/libxml2-hash.html
new file mode 100644
index 0000000..c5a9911
--- /dev/null
+++ b/doc/devhelp/libxml2-hash.html
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>hash: Chained hash tables</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-globals.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-list.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">hash</span>
+ </h2>
+ <p>hash - Chained hash tables</p>
+ <p>This module implements the hash table support used in various places in the library. </p>
+ <p>Author(s): Bjorn Reese &lt;bjorn.reese@systematic.dk&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_CAST_FPTR">XML_CAST_FPTR</a>(fptr);
+typedef struct _xmlHashTable <a href="#xmlHashTable">xmlHashTable</a>;
+typedef <a href="libxml2-hash.html#xmlHashTable">xmlHashTable</a> * <a href="#xmlHashTablePtr">xmlHashTablePtr</a>;
+void <a href="#xmlHashScanFull">xmlHashScanFull</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br/> void * data);
+void <a href="#xmlHashScan">xmlHashScan</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br/> void * data);
+typedef void <a href="#xmlHashScannerFull">xmlHashScannerFull</a> (void * payload, <br/> void * data, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3);
+<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreateDict">xmlHashCreateDict</a> (int size, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+int <a href="#xmlHashAddEntry">xmlHashAddEntry</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> void * userdata);
+int <a href="#xmlHashUpdateEntry">xmlHashUpdateEntry</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+void * <a href="#xmlHashQLookup3">xmlHashQLookup3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix3, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3);
+void * <a href="#xmlHashQLookup2">xmlHashQLookup2</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2);
+void <a href="#xmlHashScan3">xmlHashScan3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br/> void * data);
+typedef void <a href="#xmlHashScanner">xmlHashScanner</a> (void * payload, <br/> void * data, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+typedef void <a href="#xmlHashDeallocator">xmlHashDeallocator</a> (void * payload, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreate">xmlHashCreate</a> (int size);
+void <a href="#xmlHashFree">xmlHashFree</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+void * <a href="#xmlHashLookup">xmlHashLookup</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void * <a href="#xmlHashQLookup">xmlHashQLookup</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+int <a href="#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+int <a href="#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCopy">xmlHashCopy</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashCopier">xmlHashCopier</a> f);
+void <a href="#xmlHashScanFull3">xmlHashScanFull3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br/> void * data);
+int <a href="#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+void * <a href="#xmlHashLookup3">xmlHashLookup3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3);
+void * <a href="#xmlHashLookup2">xmlHashLookup2</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2);
+int <a href="#xmlHashRemoveEntry">xmlHashRemoveEntry</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f);
+typedef void * <a href="#xmlHashCopier">xmlHashCopier</a> (void * payload, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlHashAddEntry2">xmlHashAddEntry2</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> void * userdata);
+int <a href="#xmlHashAddEntry3">xmlHashAddEntry3</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> void * userdata);
+int <a href="#xmlHashSize">xmlHashSize</a> (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_CAST_FPTR">Macro </a>XML_CAST_FPTR</h3><pre class="programlisting">#define <a href="#XML_CAST_FPTR">XML_CAST_FPTR</a>(fptr);
+</pre><p>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&amp;fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fptr</tt></i>:</span></td><td>pointer to a function</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashTable">Structure </a>xmlHashTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlHashTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashTablePtr">Typedef </a>xmlHashTablePtr</h3><pre class="programlisting"><a href="libxml2-hash.html#xmlHashTable">xmlHashTable</a> * xmlHashTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashCopier"/>Function type xmlHashCopier</h3><pre class="programlisting">void * xmlHashCopier (void * payload, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Callback to copy data from a hash.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the data or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashDeallocator"/>Function type xmlHashDeallocator</h3><pre class="programlisting">void xmlHashDeallocator (void * payload, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Callback to free data from a hash.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScanner"/>Function type xmlHashScanner</h3><pre class="programlisting">void xmlHashScanner (void * payload, <br/> void * data, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Callback when scanning data in a hash with the simple scanner.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra scannner data</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScannerFull"/>Function type xmlHashScannerFull</h3><pre class="programlisting">void xmlHashScannerFull (void * payload, <br/> void * data, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3)<br/>
+</pre><p>Callback when scanning data in a hash with the full scanner.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra scannner data</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>the second name associated</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>the third name associated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashAddEntry"/>xmlHashAddEntry ()</h3><pre class="programlisting">int xmlHashAddEntry (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> void * userdata)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashAddEntry2"/>xmlHashAddEntry2 ()</h3><pre class="programlisting">int xmlHashAddEntry2 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> void * userdata)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashAddEntry3"/>xmlHashAddEntry3 ()</h3><pre class="programlisting">int xmlHashAddEntry3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> void * userdata)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashCopy"/>xmlHashCopy ()</h3><pre class="programlisting"><a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCopy (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashCopier">xmlHashCopier</a> f)<br/>
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the copier function for items in the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new table or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashCreate"/>xmlHashCreate ()</h3><pre class="programlisting"><a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreate (int size)<br/>
+</pre><p>Create a new xmlHashTablePtr.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashCreateDict"/>xmlHashCreateDict ()</h3><pre class="programlisting"><a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreateDict (int size, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Create a new <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> which will use @dict as the internal dictionary</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>a dictionary to use for the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashFree"/>xmlHashFree ()</h3><pre class="programlisting">void xmlHashFree (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Free the hash @table and its contents. The userdata is deallocated with @f if provided.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for items in the hash</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashLookup"/>xmlHashLookup ()</h3><pre class="programlisting">void * xmlHashLookup (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Find the userdata specified by the @name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashLookup2"/>xmlHashLookup2 ()</h3><pre class="programlisting">void * xmlHashLookup2 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2)<br/>
+</pre><p>Find the userdata specified by the (@name, @name2) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashLookup3"/>xmlHashLookup3 ()</h3><pre class="programlisting">void * xmlHashLookup3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3)<br/>
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashQLookup"/>xmlHashQLookup ()</h3><pre class="programlisting">void * xmlHashQLookup (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Find the userdata specified by the QName @prefix:@name/@name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashQLookup2"/>xmlHashQLookup2 ()</h3><pre class="programlisting">void * xmlHashQLookup2 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2)<br/>
+</pre><p>Find the userdata specified by the QNames tuple</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix2</tt></i>:</span></td><td>the second prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashQLookup3"/>xmlHashQLookup3 ()</h3><pre class="programlisting">void * xmlHashQLookup3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix3, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3)<br/>
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix2</tt></i>:</span></td><td>the second prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix3</tt></i>:</span></td><td>the third prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a pointer to the userdata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashRemoveEntry"/>xmlHashRemoveEntry ()</h3><pre class="programlisting">int xmlHashRemoveEntry (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashRemoveEntry2"/>xmlHashRemoveEntry2 ()</h3><pre class="programlisting">int xmlHashRemoveEntry2 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashRemoveEntry3"/>xmlHashRemoveEntry3 ()</h3><pre class="programlisting">int xmlHashRemoveEntry3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScan"/>xmlHashScan ()</h3><pre class="programlisting">void xmlHashScan (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br/> void * data)<br/>
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScan3"/>xmlHashScan3 ()</h3><pre class="programlisting">void xmlHashScan3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br/> void * data)<br/>
+</pre><p>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScanFull"/>xmlHashScanFull ()</h3><pre class="programlisting">void xmlHashScanFull (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> <a href="libxml2-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br/> void * data)<br/>
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashScanFull3"/>xmlHashScanFull3 ()</h3><pre class="programlisting">void xmlHashScanFull3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> <a href="libxml2-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br/> void * data)<br/>
+</pre><p>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashSize"/>xmlHashSize ()</h3><pre class="programlisting">int xmlHashSize (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table)<br/>
+</pre><p>Query the number of elements installed in the hash @table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the hash table or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashUpdateEntry"/>xmlHashUpdateEntry ()</h3><pre class="programlisting">int xmlHashUpdateEntry (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashUpdateEntry2"/>xmlHashUpdateEntry2 ()</h3><pre class="programlisting">int xmlHashUpdateEntry2 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHashUpdateEntry3"/>xmlHashUpdateEntry3 ()</h3><pre class="programlisting">int xmlHashUpdateEntry3 (<a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name2, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name3, <br/> void * userdata, <br/> <a href="libxml2-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br/>
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-list.html b/doc/devhelp/libxml2-list.html
new file mode 100644
index 0000000..8a4fa73
--- /dev/null
+++ b/doc/devhelp/libxml2-list.html
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>list: lists interfaces</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-hash.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-nanoftp.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">list</span>
+ </h2>
+ <p>list - lists interfaces</p>
+ <p>this module implement the list support used in various place in the library. </p>
+ <p>Author(s): Gary Pennington &lt;Gary.Pennington@uk.sun.com&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlLink <a href="#xmlLink">xmlLink</a>;
+typedef <a href="libxml2-list.html#xmlLink">xmlLink</a> * <a href="#xmlLinkPtr">xmlLinkPtr</a>;
+typedef struct _xmlList <a href="#xmlList">xmlList</a>;
+typedef <a href="libxml2-list.html#xmlList">xmlList</a> * <a href="#xmlListPtr">xmlListPtr</a>;
+int <a href="#xmlListInsert">xmlListInsert</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+int <a href="#xmlListEmpty">xmlListEmpty</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+void <a href="#xmlListSort">xmlListSort</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+typedef void <a href="#xmlListDeallocator">xmlListDeallocator</a> (<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> lk);
+void <a href="#xmlListMerge">xmlListMerge</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l1, <br/> <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l2);
+<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlListCreate">xmlListCreate</a> (<a href="libxml2-list.html#xmlListDeallocator">xmlListDeallocator</a> deallocator, <br/> <a href="libxml2-list.html#xmlListDataCompare">xmlListDataCompare</a> compare);
+<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlListDup">xmlListDup</a> (const <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> old);
+int <a href="#xmlListRemoveLast">xmlListRemoveLast</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+void <a href="#xmlListWalk">xmlListWalk</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> <a href="libxml2-list.html#xmlListWalker">xmlListWalker</a> walker, <br/> const void * user);
+int <a href="#xmlListRemoveAll">xmlListRemoveAll</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+int <a href="#xmlListCopy">xmlListCopy</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> cur, <br/> const <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> old);
+void <a href="#xmlListPopFront">xmlListPopFront</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+void * <a href="#xmlListSearch">xmlListSearch</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+typedef int <a href="#xmlListWalker">xmlListWalker</a> (const void * data, <br/> const void * user);
+int <a href="#xmlListRemoveFirst">xmlListRemoveFirst</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+void <a href="#xmlListReverseWalk">xmlListReverseWalk</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> <a href="libxml2-list.html#xmlListWalker">xmlListWalker</a> walker, <br/> const void * user);
+void * <a href="#xmlLinkGetData">xmlLinkGetData</a> (<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> lk);
+void <a href="#xmlListClear">xmlListClear</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+int <a href="#xmlListAppend">xmlListAppend</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+void <a href="#xmlListReverse">xmlListReverse</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+typedef int <a href="#xmlListDataCompare">xmlListDataCompare</a> (const void * data0, <br/> const void * data1);
+int <a href="#xmlListSize">xmlListSize</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+int <a href="#xmlListPushFront">xmlListPushFront</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> <a href="#xmlListEnd">xmlListEnd</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+void <a href="#xmlListPopBack">xmlListPopBack</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+void * <a href="#xmlListReverseSearch">xmlListReverseSearch</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+int <a href="#xmlListPushBack">xmlListPushBack</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data);
+<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> <a href="#xmlListFront">xmlListFront</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+void <a href="#xmlListDelete">xmlListDelete</a> (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlLink">Structure </a>xmlLink</h3><pre class="programlisting">struct _xmlLink {
+The content of this structure is not made public by the API.
+} xmlLink;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLinkPtr">Typedef </a>xmlLinkPtr</h3><pre class="programlisting"><a href="libxml2-list.html#xmlLink">xmlLink</a> * xmlLinkPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlList">Structure </a>xmlList</h3><pre class="programlisting">struct _xmlList {
+The content of this structure is not made public by the API.
+} xmlList;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListPtr">Typedef </a>xmlListPtr</h3><pre class="programlisting"><a href="libxml2-list.html#xmlList">xmlList</a> * xmlListPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListDataCompare"/>Function type xmlListDataCompare</h3><pre class="programlisting">int xmlListDataCompare (const void * data0, <br/> const void * data1)<br/>
+</pre><p>Callback function used to compare 2 data.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>data0</tt></i>:</span></td><td>the first data</td></tr><tr><td><span class="term"><i><tt>data1</tt></i>:</span></td><td>the second data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 is equality, -1 or 1 otherwise depending on the ordering.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListDeallocator"/>Function type xmlListDeallocator</h3><pre class="programlisting">void xmlListDeallocator (<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)<br/>
+</pre><p>Callback function used to free data from a list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>lk</tt></i>:</span></td><td>the data to deallocate</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListWalker"/>Function type xmlListWalker</h3><pre class="programlisting">int xmlListWalker (const void * data, <br/> const void * user)<br/>
+</pre><p>Callback function used when walking a list with xmlListWalk().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data found in the list</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>extra user provided data to the walker</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 to stop walking the list, 1 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLinkGetData"/>xmlLinkGetData ()</h3><pre class="programlisting">void * xmlLinkGetData (<a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)<br/>
+</pre><p>See Returns.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>lk</tt></i>:</span></td><td>a link</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the data referenced from this link</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListAppend"/>xmlListAppend ()</h3><pre class="programlisting">int xmlListAppend (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Insert data in the ordered list at the end for this value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, 1 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListClear"/>xmlListClear ()</h3><pre class="programlisting">void xmlListClear (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Remove the all data in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListCopy"/>xmlListCopy ()</h3><pre class="programlisting">int xmlListCopy (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> cur, <br/> const <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> old)<br/>
+</pre><p>Move all the element from the old list in the new list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the new list</td></tr><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the old list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success 1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListCreate"/>xmlListCreate ()</h3><pre class="programlisting"><a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> xmlListCreate (<a href="libxml2-list.html#xmlListDeallocator">xmlListDeallocator</a> deallocator, <br/> <a href="libxml2-list.html#xmlListDataCompare">xmlListDataCompare</a> compare)<br/>
+</pre><p>Create a new list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>deallocator</tt></i>:</span></td><td>an optional deallocator function</td></tr><tr><td><span class="term"><i><tt>compare</tt></i>:</span></td><td>an optional comparison function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new list or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListDelete"/>xmlListDelete ()</h3><pre class="programlisting">void xmlListDelete (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Deletes the list and its associated data</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListDup"/>xmlListDup ()</h3><pre class="programlisting"><a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> xmlListDup (const <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> old)<br/>
+</pre><p>Duplicate the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new copy of the list or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListEmpty"/>xmlListEmpty ()</h3><pre class="programlisting">int xmlListEmpty (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Is the list empty ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the list is empty, 0 if not empty and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListEnd"/>xmlListEnd ()</h3><pre class="programlisting"><a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListEnd (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Get the last element in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element in the list, or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListFront"/>xmlListFront ()</h3><pre class="programlisting"><a href="libxml2-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListFront (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Get the first element in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first element in the list, or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListInsert"/>xmlListInsert ()</h3><pre class="programlisting">int xmlListInsert (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Insert data in the ordered list at the beginning for this value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, 1 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListMerge"/>xmlListMerge ()</h3><pre class="programlisting">void xmlListMerge (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l1, <br/> <a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l2)<br/>
+</pre><p>include all the elements of the second list in the first one and clear the second list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l1</tt></i>:</span></td><td>the original list</td></tr><tr><td><span class="term"><i><tt>l2</tt></i>:</span></td><td>the new list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListPopBack"/>xmlListPopBack ()</h3><pre class="programlisting">void xmlListPopBack (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Removes the last element in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListPopFront"/>xmlListPopFront ()</h3><pre class="programlisting">void xmlListPopFront (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Removes the first element in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListPushBack"/>xmlListPushBack ()</h3><pre class="programlisting">int xmlListPushBack (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>add the new data at the end of the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>new data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if successful, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListPushFront"/>xmlListPushFront ()</h3><pre class="programlisting">int xmlListPushFront (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>add the new data at the beginning of the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>new data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if successful, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListRemoveAll"/>xmlListRemoveAll ()</h3><pre class="programlisting">int xmlListRemoveAll (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Remove the all instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of deallocation, or 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListRemoveFirst"/>xmlListRemoveFirst ()</h3><pre class="programlisting">int xmlListRemoveFirst (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Remove the first instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if a deallocation occured, or 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListRemoveLast"/>xmlListRemoveLast ()</h3><pre class="programlisting">int xmlListRemoveLast (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Remove the last instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if a deallocation occured, or 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListReverse"/>xmlListReverse ()</h3><pre class="programlisting">void xmlListReverse (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Reverse the order of the elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListReverseSearch"/>xmlListReverseSearch ()</h3><pre class="programlisting">void * xmlListReverseSearch (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Search the list in reverse order for an existing value of @data</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>a search value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value associated to @data or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListReverseWalk"/>xmlListReverseWalk ()</h3><pre class="programlisting">void xmlListReverseWalk (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> <a href="libxml2-list.html#xmlListWalker">xmlListWalker</a> walker, <br/> const void * user)<br/>
+</pre><p>Walk all the element of the list in reverse order and apply the walker function to it</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>walker</tt></i>:</span></td><td>a processing function</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>a user parameter passed to the walker function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListSearch"/>xmlListSearch ()</h3><pre class="programlisting">void * xmlListSearch (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> void * data)<br/>
+</pre><p>Search the list for an existing value of @data</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>a search value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value associated to @data or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListSize"/>xmlListSize ()</h3><pre class="programlisting">int xmlListSize (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Get the number of elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the list or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListSort"/>xmlListSort ()</h3><pre class="programlisting">void xmlListSort (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l)<br/>
+</pre><p>Sort all the elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlListWalk"/>xmlListWalk ()</h3><pre class="programlisting">void xmlListWalk (<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> l, <br/> <a href="libxml2-list.html#xmlListWalker">xmlListWalker</a> walker, <br/> const void * user)<br/>
+</pre><p>Walk all the element of the first from first to last and apply the walker function to it</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>walker</tt></i>:</span></td><td>a processing function</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>a user parameter passed to the walker function</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-nanoftp.html b/doc/devhelp/libxml2-nanoftp.html
new file mode 100644
index 0000000..07e10f3
--- /dev/null
+++ b/doc/devhelp/libxml2-nanoftp.html
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>nanoftp: minimal FTP implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-list.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-nanohttp.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">nanoftp</span>
+ </h2>
+ <p>nanoftp - minimal FTP implementation</p>
+ <p>minimal FTP implementation allowing to fetch resources like external subset. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#INVALID_SOCKET">INVALID_SOCKET</a>;
+#define <a href="#SOCKET">SOCKET</a>;
+int <a href="#xmlNanoFTPQuit">xmlNanoFTPQuit</a> (void * ctx);
+int <a href="#xmlNanoFTPClose">xmlNanoFTPClose</a> (void * ctx);
+typedef void <a href="#ftpListCallback">ftpListCallback</a> (void * userData, <br/> const char * filename, <br/> const char * attrib, <br/> const char * owner, <br/> const char * group, <br/> unsigned long size, <br/> int links, <br/> int year, <br/> const char * month, <br/> int day, <br/> int hour, <br/> int minute);
+int <a href="#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a> (void * ctx);
+void <a href="#xmlNanoFTPProxy">xmlNanoFTPProxy</a> (const char * host, <br/> int port, <br/> const char * user, <br/> const char * passwd, <br/> int type);
+int <a href="#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a> (void * ctx, <br/> const char * URL);
+<a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a> (void * ctx);
+int <a href="#xmlNanoFTPDele">xmlNanoFTPDele</a> (void * ctx, <br/> const char * file);
+void * <a href="#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a> (const char * URL);
+int <a href="#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a> (void * ctx);
+void <a href="#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a> (const char * URL);
+typedef void <a href="#ftpDataCallback">ftpDataCallback</a> (void * userData, <br/> const char * data, <br/> int len);
+int <a href="#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a> (void * ctx);
+int <a href="#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void * ctx, <br/> const char * directory);
+void <a href="#xmlNanoFTPInit">xmlNanoFTPInit</a> (void);
+void * <a href="#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a> (const char * server, <br/> int port);
+int <a href="#xmlNanoFTPList">xmlNanoFTPList</a> (void * ctx, <br/> <a href="libxml2-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br/> void * userData, <br/> const char * filename);
+void * <a href="#xmlNanoFTPOpen">xmlNanoFTPOpen</a> (const char * URL);
+int <a href="#xmlNanoFTPConnect">xmlNanoFTPConnect</a> (void * ctx);
+<a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a> (void * ctx, <br/> const char * filename);
+int <a href="#xmlNanoFTPGet">xmlNanoFTPGet</a> (void * ctx, <br/> <a href="libxml2-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br/> void * userData, <br/> const char * filename);
+int <a href="#xmlNanoFTPRead">xmlNanoFTPRead</a> (void * ctx, <br/> void * dest, <br/> int len);
+void <a href="#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a> (void * ctx);
+void <a href="#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a> (void);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="INVALID_SOCKET">Macro </a>INVALID_SOCKET</h3><pre class="programlisting">#define <a href="#INVALID_SOCKET">INVALID_SOCKET</a>;
+</pre><p>macro used to provide portability of code to windows sockets the value to be used when the socket is not valid</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="SOCKET">Macro </a>SOCKET</h3><pre class="programlisting">#define <a href="#SOCKET">SOCKET</a>;
+</pre><p>macro used to provide portability of code to windows sockets</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="ftpDataCallback"/>Function type ftpDataCallback</h3><pre class="programlisting">void ftpDataCallback (void * userData, <br/> const char * data, <br/> int len)<br/>
+</pre><p>A callback for the <a href="libxml2-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a> command.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user provided context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data received</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>its size in bytes</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="ftpListCallback"/>Function type ftpListCallback</h3><pre class="programlisting">void ftpListCallback (void * userData, <br/> const char * filename, <br/> const char * attrib, <br/> const char * owner, <br/> const char * group, <br/> unsigned long size, <br/> int links, <br/> int year, <br/> const char * month, <br/> int day, <br/> int hour, <br/> int minute)<br/>
+</pre><p>A callback for the <a href="libxml2-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a> command. Note that only one of year and day:minute are specified.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the callback</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name (including "-&gt;" when links are shown)</td></tr><tr><td><span class="term"><i><tt>attrib</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> string</td></tr><tr><td><span class="term"><i><tt>owner</tt></i>:</span></td><td>the owner string</td></tr><tr><td><span class="term"><i><tt>group</tt></i>:</span></td><td>the group string</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the file size</td></tr><tr><td><span class="term"><i><tt>links</tt></i>:</span></td><td>the link count</td></tr><tr><td><span class="term"><i><tt>year</tt></i>:</span></td><td>the year</td></tr><tr><td><span class="term"><i><tt>month</tt></i>:</span></td><td>the month</td></tr><tr><td><span class="term"><i><tt>day</tt></i>:</span></td><td>the day</td></tr><tr><td><span class="term"><i><tt>hour</tt></i>:</span></td><td>the hour</td></tr><tr><td><span class="term"><i><tt>minute</tt></i>:</span></td><td>the minute</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCheckResponse"/>xmlNanoFTPCheckResponse ()</h3><pre class="programlisting">int xmlNanoFTPCheckResponse (void * ctx)<br/>
+</pre><p>Check if there is a response from the FTP server after a command.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the code number, or 0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCleanup"/>xmlNanoFTPCleanup ()</h3><pre class="programlisting">void xmlNanoFTPCleanup (void)<br/>
+</pre><p>Cleanup the FTP protocol layer. This cleanup proxy informations.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPClose"/>xmlNanoFTPClose ()</h3><pre class="programlisting">int xmlNanoFTPClose (void * ctx)<br/>
+</pre><p>Close the connection and both control and transport</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCloseConnection"/>xmlNanoFTPCloseConnection ()</h3><pre class="programlisting">int xmlNanoFTPCloseConnection (void * ctx)<br/>
+</pre><p>Close the data connection from the server</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPConnect"/>xmlNanoFTPConnect ()</h3><pre class="programlisting">int xmlNanoFTPConnect (void * ctx)<br/>
+</pre><p>Tries to open a control connection</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPConnectTo"/>xmlNanoFTPConnectTo ()</h3><pre class="programlisting">void * xmlNanoFTPConnectTo (const char * server, <br/> int port)<br/>
+</pre><p>Tries to open a control connection to the given server/port</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>server</tt></i>:</span></td><td>an FTP server name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the port (use 21 if 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an fTP context or NULL if it failed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPCwd"/>xmlNanoFTPCwd ()</h3><pre class="programlisting">int xmlNanoFTPCwd (void * ctx, <br/> const char * directory)<br/>
+</pre><p>Tries to change the remote directory</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>directory</tt></i>:</span></td><td>a directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if CWD worked, 0 if it failed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPDele"/>xmlNanoFTPDele ()</h3><pre class="programlisting">int xmlNanoFTPDele (void * ctx, <br/> const char * file)<br/>
+</pre><p>Tries to delete an item (file or directory) from server</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a file or directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if DELE worked, 0 if it failed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPFreeCtxt"/>xmlNanoFTPFreeCtxt ()</h3><pre class="programlisting">void xmlNanoFTPFreeCtxt (void * ctx)<br/>
+</pre><p>Frees the context after closing the connection.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGet"/>xmlNanoFTPGet ()</h3><pre class="programlisting">int xmlNanoFTPGet (void * ctx, <br/> <a href="libxml2-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br/> void * userData, <br/> const char * filename)<br/>
+</pre><p>Fetch the given file from the server. All data are passed back in the callbacks. The last callback has a size of 0 block.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>the user callback</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user callback data</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file to retrieve</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetConnection"/>xmlNanoFTPGetConnection ()</h3><pre class="programlisting"><a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetConnection (void * ctx)<br/>
+</pre><p>Try to open a data connection to the server. Currently only passive mode is supported.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetResponse"/>xmlNanoFTPGetResponse ()</h3><pre class="programlisting">int xmlNanoFTPGetResponse (void * ctx)<br/>
+</pre><p>Get the response from the FTP server after a command.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the code number</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPGetSocket"/>xmlNanoFTPGetSocket ()</h3><pre class="programlisting"><a href="libxml2-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetSocket (void * ctx, <br/> const char * filename)<br/>
+</pre><p>Initiate fetch of the given file from the server.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file to retrieve (or NULL if path is in context).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the socket for the data connection, or &lt;0 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPInit"/>xmlNanoFTPInit ()</h3><pre class="programlisting">void xmlNanoFTPInit (void)<br/>
+</pre><p>Initialize the FTP protocol layer. Currently it just checks for proxy informations, and get the hostname</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPList"/>xmlNanoFTPList ()</h3><pre class="programlisting">int xmlNanoFTPList (void * ctx, <br/> <a href="libxml2-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br/> void * userData, <br/> const char * filename)<br/>
+</pre><p>Do a listing on the server. All files info are passed back in the callbacks.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>the user callback</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user callback data</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>optional files to list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPNewCtxt"/>xmlNanoFTPNewCtxt ()</h3><pre class="programlisting">void * xmlNanoFTPNewCtxt (const char * URL)<br/>
+</pre><p>Allocate and initialize a new FTP context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL used to initialize the context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an FTP context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPOpen"/>xmlNanoFTPOpen ()</h3><pre class="programlisting">void * xmlNanoFTPOpen (const char * URL)<br/>
+</pre><p>Start to fetch the given ftp:// resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to the resource</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an FTP context, or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPProxy"/>xmlNanoFTPProxy ()</h3><pre class="programlisting">void xmlNanoFTPProxy (const char * host, <br/> int port, <br/> const char * user, <br/> const char * passwd, <br/> int type)<br/>
+</pre><p>Setup the FTP proxy informations. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>host</tt></i>:</span></td><td>the proxy host name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the proxy port</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>the proxy user name</td></tr><tr><td><span class="term"><i><tt>passwd</tt></i>:</span></td><td>the proxy password</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of proxy 1 for using SITE, 2 for USER a@b</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPQuit"/>xmlNanoFTPQuit ()</h3><pre class="programlisting">int xmlNanoFTPQuit (void * ctx)<br/>
+</pre><p>Send a QUIT command to the server</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPRead"/>xmlNanoFTPRead ()</h3><pre class="programlisting">int xmlNanoFTPRead (void * ctx, <br/> void * dest, <br/> int len)<br/>
+</pre><p>This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the FTP context</td></tr><tr><td><span class="term"><i><tt>dest</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the buffer length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPScanProxy"/>xmlNanoFTPScanProxy ()</h3><pre class="programlisting">void xmlNanoFTPScanProxy (const char * URL)<br/>
+</pre><p>(Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A NULL URL cleans up proxy informations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The proxy URL used to initialize the proxy context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoFTPUpdateURL"/>xmlNanoFTPUpdateURL ()</h3><pre class="programlisting">int xmlNanoFTPUpdateURL (void * ctx, <br/> const char * URL)<br/>
+</pre><p>Update an FTP context by parsing the URL and finding new path it indicates. If there is an error in the protocol, hostname, port or other information, the error is raised. It indicates a new connection has to be established.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL used to update the context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if Ok, -1 in case of error (other host).</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-nanohttp.html b/doc/devhelp/libxml2-nanohttp.html
new file mode 100644
index 0000000..075ae48
--- /dev/null
+++ b/doc/devhelp/libxml2-nanohttp.html
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>nanohttp: minimal HTTP implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-nanoftp.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-parser.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">nanohttp</span>
+ </h2>
+ <p>nanohttp - minimal HTTP implementation</p>
+ <p>minimal HTTP implementation allowing to fetch resources like external subset. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">int <a href="#xmlNanoHTTPRead">xmlNanoHTTPRead</a> (void * ctx, <br/> void * dest, <br/> int len);
+int <a href="#xmlNanoHTTPSave">xmlNanoHTTPSave</a> (void * ctxt, <br/> const char * filename);
+const char * <a href="#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a> (void * ctx);
+const char * <a href="#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a> (void * ctx);
+int <a href="#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a> (const char * URL, <br/> const char * filename, <br/> char ** contentType);
+int <a href="#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a> (void * ctx);
+const char * <a href="#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a> (void * ctx);
+void <a href="#xmlNanoHTTPClose">xmlNanoHTTPClose</a> (void * ctx);
+void <a href="#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a> (void);
+void * <a href="#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a> (const char * URL, <br/> const char * method, <br/> const char * input, <br/> char ** contentType, <br/> const char * headers, <br/> int ilen);
+void <a href="#xmlNanoHTTPInit">xmlNanoHTTPInit</a> (void);
+void * <a href="#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a> (const char * URL, <br/> char ** contentType);
+void * <a href="#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a> (const char * URL, <br/> char ** contentType, <br/> char ** redir);
+void * <a href="#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a> (const char * URL, <br/> const char * method, <br/> const char * input, <br/> char ** contentType, <br/> char ** redir, <br/> const char * headers, <br/> int ilen);
+void <a href="#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a> (const char * URL);
+const char * <a href="#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a> (void * ctx);
+int <a href="#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a> (void * ctx);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPAuthHeader"/>xmlNanoHTTPAuthHeader ()</h3><pre class="programlisting">const char * xmlNanoHTTPAuthHeader (void * ctx)<br/>
+</pre><p>Get the authentication header of an HTTP context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the stashed value of the WWW-Authenticate or Proxy-Authenticate header.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPCleanup"/>xmlNanoHTTPCleanup ()</h3><pre class="programlisting">void xmlNanoHTTPCleanup (void)<br/>
+</pre><p>Cleanup the HTTP protocol layer.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPClose"/>xmlNanoHTTPClose ()</h3><pre class="programlisting">void xmlNanoHTTPClose (void * ctx)<br/>
+</pre><p>This function closes an HTTP context, it ends up the connection and free all data related to it.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPContentLength"/>xmlNanoHTTPContentLength ()</h3><pre class="programlisting">int xmlNanoHTTPContentLength (void * ctx)<br/>
+</pre><p>Provides the specified content length from the HTTP header.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified content length from the HTTP header. Note that a value of -1 indicates that the content length element was not included in the response header.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPEncoding"/>xmlNanoHTTPEncoding ()</h3><pre class="programlisting">const char * xmlNanoHTTPEncoding (void * ctx)<br/>
+</pre><p>Provides the specified encoding if specified in the HTTP headers.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified encoding or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPFetch"/>xmlNanoHTTPFetch ()</h3><pre class="programlisting">int xmlNanoHTTPFetch (const char * URL, <br/> const char * filename, <br/> char ** contentType)<br/>
+</pre><p>This function try to fetch the indicated resource via HTTP GET and save it's content in the file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename where the content should be saved</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 incase of success. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPInit"/>xmlNanoHTTPInit ()</h3><pre class="programlisting">void xmlNanoHTTPInit (void)<br/>
+</pre><p>Initialize the HTTP protocol layer. Currently it just checks for proxy informations</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPMethod"/>xmlNanoHTTPMethod ()</h3><pre class="programlisting">void * xmlNanoHTTPMethod (const char * URL, <br/> const char * method, <br/> const char * input, <br/> char ** contentType, <br/> const char * headers, <br/> int ilen)<br/>
+</pre><p>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>method</tt></i>:</span></td><td>the HTTP method to use</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input string if any</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>the Content-Type information IN and OUT</td></tr><tr><td><span class="term"><i><tt>headers</tt></i>:</span></td><td>the extra headers</td></tr><tr><td><span class="term"><i><tt>ilen</tt></i>:</span></td><td>input length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPMethodRedir"/>xmlNanoHTTPMethodRedir ()</h3><pre class="programlisting">void * xmlNanoHTTPMethodRedir (const char * URL, <br/> const char * method, <br/> const char * input, <br/> char ** contentType, <br/> char ** redir, <br/> const char * headers, <br/> int ilen)<br/>
+</pre><p>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>method</tt></i>:</span></td><td>the HTTP method to use</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input string if any</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>the Content-Type information IN and OUT</td></tr><tr><td><span class="term"><i><tt>redir</tt></i>:</span></td><td>the redirected URL OUT</td></tr><tr><td><span class="term"><i><tt>headers</tt></i>:</span></td><td>the extra headers</td></tr><tr><td><span class="term"><i><tt>ilen</tt></i>:</span></td><td>input length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, or redir, if provided must be freed by the caller</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPMimeType"/>xmlNanoHTTPMimeType ()</h3><pre class="programlisting">const char * xmlNanoHTTPMimeType (void * ctx)<br/>
+</pre><p>Provides the specified Mime-Type if specified in the HTTP headers.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified Mime-Type or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPOpen"/>xmlNanoHTTPOpen ()</h3><pre class="programlisting">void * xmlNanoHTTPOpen (const char * URL, <br/> char ** contentType)<br/>
+</pre><p>This function try to open a connection to the indicated resource via HTTP GET.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPOpenRedir"/>xmlNanoHTTPOpenRedir ()</h3><pre class="programlisting">void * xmlNanoHTTPOpenRedir (const char * URL, <br/> char ** contentType, <br/> char ** redir)<br/>
+</pre><p>This function try to open a connection to the indicated resource via HTTP GET.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>redir</tt></i>:</span></td><td>if available the redirected URL will be returned</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPRead"/>xmlNanoHTTPRead ()</h3><pre class="programlisting">int xmlNanoHTTPRead (void * ctx, <br/> void * dest, <br/> int len)<br/>
+</pre><p>This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>dest</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the buffer length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPRedir"/>xmlNanoHTTPRedir ()</h3><pre class="programlisting">const char * xmlNanoHTTPRedir (void * ctx)<br/>
+</pre><p>Provides the specified redirection URL if available from the HTTP header.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified redirection URL or NULL if not redirected.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPReturnCode"/>xmlNanoHTTPReturnCode ()</h3><pre class="programlisting">int xmlNanoHTTPReturnCode (void * ctx)<br/>
+</pre><p>Get the latest HTTP return code received</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the HTTP return code for the request.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPSave"/>xmlNanoHTTPSave ()</h3><pre class="programlisting">int xmlNanoHTTPSave (void * ctxt, <br/> const char * filename)<br/>
+</pre><p>This function saves the output of the HTTP transaction to a file It closes and free the context at the end</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename where the content should be saved</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 incase of success.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNanoHTTPScanProxy"/>xmlNanoHTTPScanProxy ()</h3><pre class="programlisting">void xmlNanoHTTPScanProxy (const char * URL)<br/>
+</pre><p>(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy informations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The proxy URL used to initialize the proxy context</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-parser.html b/doc/devhelp/libxml2-parser.html
new file mode 100644
index 0000000..357c14a
--- /dev/null
+++ b/doc/devhelp/libxml2-parser.html
@@ -0,0 +1,766 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>parser: the core parser module</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-nanohttp.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-parserInternals.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">parser</span>
+ </h2>
+ <p>parser - the core parser module</p>
+ <p>Interfaces, constants and types related to the XML parser </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a>;
+#define <a href="#XML_SKIP_IDS">XML_SKIP_IDS</a>;
+#define <a href="#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a>;
+#define <a href="#XML_DETECT_IDS">XML_DETECT_IDS</a>;
+#define <a href="#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a>;
+typedef <a href="libxml2-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> * <a href="#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a>;
+typedef struct _xmlSAXHandlerV1 <a href="#xmlSAXHandlerV1">xmlSAXHandlerV1</a>;
+typedef enum <a href="#xmlParserInputState">xmlParserInputState</a>;
+typedef <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * <a href="#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a>;
+typedef struct _xmlParserNodeInfoSeq <a href="#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a>;
+typedef enum <a href="#xmlFeature">xmlFeature</a>;
+typedef enum <a href="#xmlParserMode">xmlParserMode</a>;
+typedef enum <a href="#xmlParserOption">xmlParserOption</a>;
+typedef <a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * <a href="#xmlSAXHandlerV1Ptr">xmlSAXHandlerV1Ptr</a>;
+typedef struct _xmlParserNodeInfo <a href="#xmlParserNodeInfo">xmlParserNodeInfo</a>;
+void <a href="#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buffer, <br/> const char * filename);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadFile">xmlCtxtReadFile</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst);
+typedef void <a href="#attributeDeclSAXFunc">attributeDeclSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
+typedef <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getEntitySAXFunc">getEntitySAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+typedef void <a href="#startElementSAXFunc">startElementSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts);
+typedef void <a href="#charactersSAXFunc">charactersSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+void <a href="#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a> (<a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);
+int <a href="#xmlParseChunk">xmlParseChunk</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseEntity">xmlParseEntity</a> (const char * filename);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverFile">xmlRecoverFile</a> (const char * filename);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadDoc">xmlCtxtReadDoc</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+typedef void <a href="#startElementNsSAX2Func">startElementNsSAX2Func</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+<a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> <a href="#xmlParseInNodeContext">xmlParseInNodeContext</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const char * data, <br/> int datalen, <br/> int options, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst);
+typedef void <a href="#referenceSAXFunc">referenceSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+typedef int <a href="#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> (void * ctx);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseDoc">xmlSAXParseDoc</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int recovery);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadMemory">xmlReadMemory</a> (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseMemory">xmlParseMemory</a> (const char * buffer, <br/> int size);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewIOInputStream">xmlNewIOInputStream</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+typedef void <a href="#processingInstructionSAXFunc">processingInstructionSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data);
+int <a href="#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst, <br/> int recover);
+void <a href="#xmlInitParser">xmlInitParser</a> (void);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur);
+typedef void <a href="#errorSAXFunc">errorSAXFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseMemory">xmlSAXParseMemory</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * buffer, <br/> int size, <br/> int recovery);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverMemory">xmlRecoverMemory</a> (const char * buffer, <br/> int size);
+typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlExternalEntityLoader">xmlExternalEntityLoader</a> (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context);
+typedef int <a href="#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> (void * ctx);
+typedef void <a href="#cdataBlockSAXFunc">cdataBlockSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseFile">xmlSAXParseFile</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename, <br/> int recovery);
+typedef void <a href="#xmlParserInputDeallocate">xmlParserInputDeallocate</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadIO">xmlCtxtReadIO</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * buffer, <br/> int size, <br/> int recovery, <br/> void * data);
+int <a href="#xmlGetFeature">xmlGetFeature</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * name, <br/> void * result);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlIOParseDTD">xmlIOParseDTD</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+void <a href="#xmlFreeParserCtxt">xmlFreeParserCtxt</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlParseDTD">xmlParseDTD</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverDoc">xmlRecoverDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur);
+typedef void <a href="#commentSAXFunc">commentSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlInitParserCtxt">xmlInitParserCtxt</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+typedef void <a href="#attributeSAXFunc">attributeSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlParserInputGrow">xmlParserInputGrow</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br/> int len);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadMemory">xmlCtxtReadMemory</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+typedef void <a href="#externalSubsetSAXFunc">externalSubsetSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+typedef <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#resolveEntitySAXFunc">resolveEntitySAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+int <a href="#xmlPedanticParserDefault">xmlPedanticParserDefault</a> (int val);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseEntity">xmlSAXParseEntity</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseDoc">xmlParseDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename, <br/> int recovery, <br/> void * data);
+int <a href="#xmlLineNumbersDefault">xmlLineNumbersDefault</a> (int val);
+<a href="libxml2-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> <a href="#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a> (void);
+typedef void <a href="#elementDeclSAXFunc">elementDeclSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
+int <a href="#xmlCtxtUseOptions">xmlCtxtUseOptions</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int options);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename);
+void <a href="#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadFd">xmlCtxtReadFd</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+typedef void <a href="#internalSubsetSAXFunc">internalSubsetSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlNewParserCtxt">xmlNewParserCtxt</a> (void);
+typedef void <a href="#endDocumentSAXFunc">endDocumentSAXFunc</a> (void * ctx);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseFile">xmlParseFile</a> (const char * filename);
+int <a href="#xmlParseDocument">xmlParseDocument</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+typedef void <a href="#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc);
+typedef <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+typedef void <a href="#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len);
+void <a href="#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a> (<a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq);
+int <a href="#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a> (int val);
+typedef void <a href="#endElementSAXFunc">endElementSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+unsigned long <a href="#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a> (const <a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+long <a href="#xmlByteConsumed">xmlByteConsumed</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlCtxtReset">xmlCtxtReset</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlSetFeature">xmlSetFeature</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * name, <br/> void * value);
+int <a href="#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a> (int val);
+int <a href="#xmlParserInputRead">xmlParserInputRead</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br/> int len);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadFile">xmlReadFile</a> (const char * filename, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlGetFeaturesList">xmlGetFeaturesList</a> (int * len, <br/> const char ** result);
+int <a href="#xmlHasFeature">xmlHasFeature</a> (<a href="libxml2-parser.html#xmlFeature">xmlFeature</a> feature);
+typedef void <a href="#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
+int <a href="#xmlSAXUserParseFile">xmlSAXUserParseFile</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * filename);
+typedef void <a href="#fatalErrorSAXFunc">fatalErrorSAXFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlSAXParseDTD">xmlSAXParseDTD</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+const <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * <a href="#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a> (const <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+typedef void <a href="#entityDeclSAXFunc">entityDeclSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlLoadExternalEntity">xmlLoadExternalEntity</a> (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlStopParser">xmlStopParser</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadFd">xmlReadFd</a> (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadIO">xmlReadIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadDoc">xmlReadDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a> (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * buffer, <br/> int size);
+int <a href="#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst);
+typedef void <a href="#endElementNsSAX2Func">endElementNsSAX2Func</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI);
+void <a href="#xmlCleanupParser">xmlCleanupParser</a> (void);
+int <a href="#xmlCtxtResetPush">xmlCtxtResetPush</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> const char * encoding);
+typedef int <a href="#isStandaloneSAXFunc">isStandaloneSAXFunc</a> (void * ctx);
+typedef void <a href="#startDocumentSAXFunc">startDocumentSAXFunc</a> (void * ctx);
+void <a href="#xmlClearParserCtxt">xmlClearParserCtxt</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseExternalEntity">xmlParseExternalEntity</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst);
+typedef void <a href="#notationDeclSAXFunc">notationDeclSAXFunc</a> (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId);
+typedef void <a href="#warningSAXFunc">warningSAXFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a> (<a href="libxml2-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_COMPLETE_ATTRS">Macro </a>XML_COMPLETE_ATTRS</h3><pre class="programlisting">#define <a href="#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a>;
+</pre><p>Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_DEFAULT_VERSION">Macro </a>XML_DEFAULT_VERSION</h3><pre class="programlisting">#define <a href="#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a>;
+</pre><p>The default version of XML used: 1.0</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_DETECT_IDS">Macro </a>XML_DETECT_IDS</h3><pre class="programlisting">#define <a href="#XML_DETECT_IDS">XML_DETECT_IDS</a>;
+</pre><p>Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SAX2_MAGIC">Macro </a>XML_SAX2_MAGIC</h3><pre class="programlisting">#define <a href="#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a>;
+</pre><p>Special constant found in SAX2 blocks initialized fields</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SKIP_IDS">Macro </a>XML_SKIP_IDS</h3><pre class="programlisting">#define <a href="#XML_SKIP_IDS">XML_SKIP_IDS</a>;
+</pre><p>Bit in the loadsubset context field to tell to not do ID/REFs registration. Used to initialize <a href="libxml2-globals.html#xmlLoadExtDtdDefaultValue">xmlLoadExtDtdDefaultValue</a> in some special cases.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFeature">Enum </a>xmlFeature</h3><pre class="programlisting">enum <a href="#xmlFeature">xmlFeature</a> {
+ <a name="XML_WITH_THREAD">XML_WITH_THREAD</a> = 1
+ <a name="XML_WITH_TREE">XML_WITH_TREE</a> = 2
+ <a name="XML_WITH_OUTPUT">XML_WITH_OUTPUT</a> = 3
+ <a name="XML_WITH_PUSH">XML_WITH_PUSH</a> = 4
+ <a name="XML_WITH_READER">XML_WITH_READER</a> = 5
+ <a name="XML_WITH_PATTERN">XML_WITH_PATTERN</a> = 6
+ <a name="XML_WITH_WRITER">XML_WITH_WRITER</a> = 7
+ <a name="XML_WITH_SAX1">XML_WITH_SAX1</a> = 8
+ <a name="XML_WITH_FTP">XML_WITH_FTP</a> = 9
+ <a name="XML_WITH_HTTP">XML_WITH_HTTP</a> = 10
+ <a name="XML_WITH_VALID">XML_WITH_VALID</a> = 11
+ <a name="XML_WITH_HTML">XML_WITH_HTML</a> = 12
+ <a name="XML_WITH_LEGACY">XML_WITH_LEGACY</a> = 13
+ <a name="XML_WITH_C14N">XML_WITH_C14N</a> = 14
+ <a name="XML_WITH_CATALOG">XML_WITH_CATALOG</a> = 15
+ <a name="XML_WITH_XPATH">XML_WITH_XPATH</a> = 16
+ <a name="XML_WITH_XPTR">XML_WITH_XPTR</a> = 17
+ <a name="XML_WITH_XINCLUDE">XML_WITH_XINCLUDE</a> = 18
+ <a name="XML_WITH_ICONV">XML_WITH_ICONV</a> = 19
+ <a name="XML_WITH_ISO8859X">XML_WITH_ISO8859X</a> = 20
+ <a name="XML_WITH_UNICODE">XML_WITH_UNICODE</a> = 21
+ <a name="XML_WITH_REGEXP">XML_WITH_REGEXP</a> = 22
+ <a name="XML_WITH_AUTOMATA">XML_WITH_AUTOMATA</a> = 23
+ <a name="XML_WITH_EXPR">XML_WITH_EXPR</a> = 24
+ <a name="XML_WITH_SCHEMAS">XML_WITH_SCHEMAS</a> = 25
+ <a name="XML_WITH_SCHEMATRON">XML_WITH_SCHEMATRON</a> = 26
+ <a name="XML_WITH_MODULES">XML_WITH_MODULES</a> = 27
+ <a name="XML_WITH_DEBUG">XML_WITH_DEBUG</a> = 28
+ <a name="XML_WITH_DEBUG_MEM">XML_WITH_DEBUG_MEM</a> = 29
+ <a name="XML_WITH_DEBUG_RUN">XML_WITH_DEBUG_RUN</a> = 30
+ <a name="XML_WITH_ZLIB">XML_WITH_ZLIB</a> = 31
+ <a name="XML_WITH_ICU">XML_WITH_ICU</a> = 32
+ <a name="XML_WITH_LZMA">XML_WITH_LZMA</a> = 33
+ <a name="XML_WITH_NONE">XML_WITH_NONE</a> = 99999 /* just to be sure of allocation size */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputState">Enum </a>xmlParserInputState</h3><pre class="programlisting">enum <a href="#xmlParserInputState">xmlParserInputState</a> {
+ <a name="XML_PARSER_EOF">XML_PARSER_EOF</a> = -1 /* nothing is to be parsed */
+ <a name="XML_PARSER_START">XML_PARSER_START</a> = 0 /* nothing has been parsed */
+ <a name="XML_PARSER_MISC">XML_PARSER_MISC</a> = 1 /* Misc* before int subset */
+ <a name="XML_PARSER_PI">XML_PARSER_PI</a> = 2 /* Within a processing instruction */
+ <a name="XML_PARSER_DTD">XML_PARSER_DTD</a> = 3 /* within some DTD content */
+ <a name="XML_PARSER_PROLOG">XML_PARSER_PROLOG</a> = 4 /* Misc* after internal subset */
+ <a name="XML_PARSER_COMMENT">XML_PARSER_COMMENT</a> = 5 /* within a comment */
+ <a name="XML_PARSER_START_TAG">XML_PARSER_START_TAG</a> = 6 /* within a start tag */
+ <a name="XML_PARSER_CONTENT">XML_PARSER_CONTENT</a> = 7 /* within the content */
+ <a name="XML_PARSER_CDATA_SECTION">XML_PARSER_CDATA_SECTION</a> = 8 /* within a CDATA section */
+ <a name="XML_PARSER_END_TAG">XML_PARSER_END_TAG</a> = 9 /* within a closing tag */
+ <a name="XML_PARSER_ENTITY_DECL">XML_PARSER_ENTITY_DECL</a> = 10 /* within an entity declaration */
+ <a name="XML_PARSER_ENTITY_VALUE">XML_PARSER_ENTITY_VALUE</a> = 11 /* within an entity value in a decl */
+ <a name="XML_PARSER_ATTRIBUTE_VALUE">XML_PARSER_ATTRIBUTE_VALUE</a> = 12 /* within an attribute value */
+ <a name="XML_PARSER_SYSTEM_LITERAL">XML_PARSER_SYSTEM_LITERAL</a> = 13 /* within a SYSTEM value */
+ <a name="XML_PARSER_EPILOG">XML_PARSER_EPILOG</a> = 14 /* the Misc* after the last end tag */
+ <a name="XML_PARSER_IGNORE">XML_PARSER_IGNORE</a> = 15 /* within an IGNORED section */
+ <a name="XML_PARSER_PUBLIC_LITERAL">XML_PARSER_PUBLIC_LITERAL</a> = 16 /* within a PUBLIC value */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserMode">Enum </a>xmlParserMode</h3><pre class="programlisting">enum <a href="#xmlParserMode">xmlParserMode</a> {
+ <a name="XML_PARSE_UNKNOWN">XML_PARSE_UNKNOWN</a> = 0
+ <a name="XML_PARSE_DOM">XML_PARSE_DOM</a> = 1
+ <a name="XML_PARSE_SAX">XML_PARSE_SAX</a> = 2
+ <a name="XML_PARSE_PUSH_DOM">XML_PARSE_PUSH_DOM</a> = 3
+ <a name="XML_PARSE_PUSH_SAX">XML_PARSE_PUSH_SAX</a> = 4
+ <a name="XML_PARSE_READER">XML_PARSE_READER</a> = 5
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfo">Structure </a>xmlParserNodeInfo</h3><pre class="programlisting">struct _xmlParserNodeInfo {
+ const struct _xmlNode * node : Position &amp; line # that text that created the node begins &amp; ends on
+ unsigned long begin_pos
+ unsigned long begin_line
+ unsigned long end_pos
+ unsigned long end_line
+} xmlParserNodeInfo;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoPtr">Typedef </a>xmlParserNodeInfoPtr</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * xmlParserNodeInfoPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoSeq">Structure </a>xmlParserNodeInfoSeq</h3><pre class="programlisting">struct _xmlParserNodeInfoSeq {
+ unsigned long maximum
+ unsigned long length
+ <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * buffer
+} xmlParserNodeInfoSeq;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserNodeInfoSeqPtr">Typedef </a>xmlParserNodeInfoSeqPtr</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> * xmlParserNodeInfoSeqPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserOption">Enum </a>xmlParserOption</h3><pre class="programlisting">enum <a href="#xmlParserOption">xmlParserOption</a> {
+ <a name="XML_PARSE_RECOVER">XML_PARSE_RECOVER</a> = 1 /* recover on errors */
+ <a name="XML_PARSE_NOENT">XML_PARSE_NOENT</a> = 2 /* substitute entities */
+ <a name="XML_PARSE_DTDLOAD">XML_PARSE_DTDLOAD</a> = 4 /* load the external subset */
+ <a name="XML_PARSE_DTDATTR">XML_PARSE_DTDATTR</a> = 8 /* default DTD attributes */
+ <a name="XML_PARSE_DTDVALID">XML_PARSE_DTDVALID</a> = 16 /* validate with the DTD */
+ <a name="XML_PARSE_NOERROR">XML_PARSE_NOERROR</a> = 32 /* suppress error reports */
+ <a name="XML_PARSE_NOWARNING">XML_PARSE_NOWARNING</a> = 64 /* suppress warning reports */
+ <a name="XML_PARSE_PEDANTIC">XML_PARSE_PEDANTIC</a> = 128 /* pedantic error reporting */
+ <a name="XML_PARSE_NOBLANKS">XML_PARSE_NOBLANKS</a> = 256 /* remove blank nodes */
+ <a name="XML_PARSE_SAX1">XML_PARSE_SAX1</a> = 512 /* use the SAX1 interface internally */
+ <a name="XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a> = 1024 /* Implement XInclude substitition */
+ <a name="XML_PARSE_NONET">XML_PARSE_NONET</a> = 2048 /* Forbid network access */
+ <a name="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 /* Do not reuse the context dictionnary */
+ <a name="XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a> = 8192 /* remove redundant namespaces declarations */
+ <a name="XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a> = 16384 /* merge CDATA as text nodes */
+ <a name="XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a> = 32768 /* do not generate XINCLUDE START/END nodes */
+ <a name="XML_PARSE_COMPACT">XML_PARSE_COMPACT</a> = 65536 /* compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree) */
+ <a name="XML_PARSE_OLD10">XML_PARSE_OLD10</a> = 131072 /* parse using XML-1.0 before update 5 */
+ <a name="XML_PARSE_NOBASEFIX">XML_PARSE_NOBASEFIX</a> = 262144 /* do not fixup XINCLUDE xml:base uris */
+ <a name="XML_PARSE_HUGE">XML_PARSE_HUGE</a> = 524288 /* relax any hardcoded limit from the parser */
+ <a name="XML_PARSE_OLDSAX">XML_PARSE_OLDSAX</a> = 1048576 /* parse using SAX2 interface before 2.7.0 */
+ <a name="XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a> = 2097152 /* ignore internal document encoding hint */
+ <a name="XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> = 4194304 /* Store big lines numbers in text PSVI field */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXHandlerV1">Structure </a>xmlSAXHandlerV1</h3><pre class="programlisting">struct _xmlSAXHandlerV1 {
+ <a href="libxml2-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset
+ <a href="libxml2-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone
+ <a href="libxml2-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset
+ <a href="libxml2-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset
+ <a href="libxml2-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity
+ <a href="libxml2-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity
+ <a href="libxml2-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl
+ <a href="libxml2-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl
+ <a href="libxml2-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl
+ <a href="libxml2-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl
+ <a href="libxml2-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl
+ <a href="libxml2-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator
+ <a href="libxml2-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument
+ <a href="libxml2-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument
+ <a href="libxml2-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement
+ <a href="libxml2-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement
+ <a href="libxml2-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference
+ <a href="libxml2-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters
+ <a href="libxml2-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace
+ <a href="libxml2-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction
+ <a href="libxml2-parser.html#commentSAXFunc">commentSAXFunc</a> comment
+ <a href="libxml2-parser.html#warningSAXFunc">warningSAXFunc</a> warning
+ <a href="libxml2-parser.html#errorSAXFunc">errorSAXFunc</a> error
+ <a href="libxml2-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors
+ <a href="libxml2-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity
+ <a href="libxml2-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock
+ <a href="libxml2-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset
+ unsigned int initialized
+} xmlSAXHandlerV1;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXHandlerV1Ptr">Typedef </a>xmlSAXHandlerV1Ptr</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * xmlSAXHandlerV1Ptr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="attributeDeclSAXFunc"/>Function type attributeDeclSAXFunc</h3><pre class="programlisting">void attributeDeclSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br/> int type, <br/> int def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
+</pre><p>An <a href="libxml2-SAX.html#attribute">attribute</a> definition has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="attributeSAXFunc"/>Function type attributeSAXFunc</h3><pre class="programlisting">void attributeSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Handle an <a href="libxml2-SAX.html#attribute">attribute</a> that has been read by the parser. The default handling is to convert the <a href="libxml2-SAX.html#attribute">attribute</a> into an DOM subtree and past it in a new <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> element added to the element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="cdataBlockSAXFunc"/>Function type cdataBlockSAXFunc</h3><pre class="programlisting">void cdataBlockSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
+</pre><p>Called when a pcdata block has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="charactersSAXFunc"/>Function type charactersSAXFunc</h3><pre class="programlisting">void charactersSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>Receiving some chars from the parser.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="commentSAXFunc"/>Function type commentSAXFunc</h3><pre class="programlisting">void commentSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>A <a href="libxml2-SAX.html#comment">comment</a> has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="elementDeclSAXFunc"/>Function type elementDeclSAXFunc</h3><pre class="programlisting">void elementDeclSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
+</pre><p>An element definition has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="endDocumentSAXFunc"/>Function type endDocumentSAXFunc</h3><pre class="programlisting">void endDocumentSAXFunc (void * ctx)<br/>
+</pre><p>Called when the document end has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="endElementNsSAX2Func"/>Function type endElementNsSAX2Func</h3><pre class="programlisting">void endElementNsSAX2Func (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI)<br/>
+</pre><p>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="endElementSAXFunc"/>Function type endElementSAXFunc</h3><pre class="programlisting">void endElementSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Called when the end of an element has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="entityDeclSAXFunc"/>Function type entityDeclSAXFunc</h3><pre class="programlisting">void entityDeclSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>An entity definition has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="errorSAXFunc"/>Function type errorSAXFunc</h3><pre class="programlisting">void errorSAXFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format an error messages, callback.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="externalSubsetSAXFunc"/>Function type externalSubsetSAXFunc</h3><pre class="programlisting">void externalSubsetSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on external subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="fatalErrorSAXFunc"/>Function type fatalErrorSAXFunc</h3><pre class="programlisting">void fatalErrorSAXFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getEntitySAXFunc"/>Function type getEntitySAXFunc</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getEntitySAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get an entity by name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="getParameterEntitySAXFunc"/>Function type getParameterEntitySAXFunc</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> getParameterEntitySAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Get a parameter entity by name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="hasExternalSubsetSAXFunc"/>Function type hasExternalSubsetSAXFunc</h3><pre class="programlisting">int hasExternalSubsetSAXFunc (void * ctx)<br/>
+</pre><p>Does this document has an external subset?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="hasInternalSubsetSAXFunc"/>Function type hasInternalSubsetSAXFunc</h3><pre class="programlisting">int hasInternalSubsetSAXFunc (void * ctx)<br/>
+</pre><p>Does this document has an internal subset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="ignorableWhitespaceSAXFunc"/>Function type ignorableWhitespaceSAXFunc</h3><pre class="programlisting">void ignorableWhitespaceSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ch, <br/> int len)<br/>
+</pre><p>Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="internalSubsetSAXFunc"/>Function type internalSubsetSAXFunc</h3><pre class="programlisting">void internalSubsetSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Callback on internal subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="isStandaloneSAXFunc"/>Function type isStandaloneSAXFunc</h3><pre class="programlisting">int isStandaloneSAXFunc (void * ctx)<br/>
+</pre><p>Is this document tagged standalone?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="notationDeclSAXFunc"/>Function type notationDeclSAXFunc</h3><pre class="programlisting">void notationDeclSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>What to do when a notation declaration has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="processingInstructionSAXFunc"/>Function type processingInstructionSAXFunc</h3><pre class="programlisting">void processingInstructionSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data)<br/>
+</pre><p>A processing instruction has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="referenceSAXFunc"/>Function type referenceSAXFunc</h3><pre class="programlisting">void referenceSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Called when an entity <a href="libxml2-SAX.html#reference">reference</a> is detected.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="resolveEntitySAXFunc"/>Function type resolveEntitySAXFunc</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> resolveEntitySAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br/>
+</pre><p>Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="setDocumentLocatorSAXFunc"/>Function type setDocumentLocatorSAXFunc</h3><pre class="programlisting">void setDocumentLocatorSAXFunc (void * ctx, <br/> <a href="libxml2-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br/>
+</pre><p>Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="startDocumentSAXFunc"/>Function type startDocumentSAXFunc</h3><pre class="programlisting">void startDocumentSAXFunc (void * ctx)<br/>
+</pre><p>Called when the document start being processed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="startElementNsSAX2Func"/>Function type startElementNsSAX2Func</h3><pre class="programlisting">void startElementNsSAX2Func (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> int nb_namespaces, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br/> int nb_attributes, <br/> int nb_defaulted, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** attributes)<br/>
+</pre><p>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr><tr><td><span class="term"><i><tt>nb_namespaces</tt></i>:</span></td><td>number of namespace definitions on that node</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>pointer to the array of prefix/URI pairs namespace definitions</td></tr><tr><td><span class="term"><i><tt>nb_attributes</tt></i>:</span></td><td>the number of attributes on that node</td></tr><tr><td><span class="term"><i><tt>nb_defaulted</tt></i>:</span></td><td>the number of defaulted attributes. The defaulted ones are at the end of the array</td></tr><tr><td><span class="term"><i><tt>attributes</tt></i>:</span></td><td>pointer to the array of (localname/prefix/URI/value/end) <a href="libxml2-SAX.html#attribute">attribute</a> values.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="startElementSAXFunc"/>Function type startElementSAXFunc</h3><pre class="programlisting">void startElementSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br/>
+</pre><p>Called when an opening tag has been processed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="unparsedEntityDeclSAXFunc"/>Function type unparsedEntityDeclSAXFunc</h3><pre class="programlisting">void unparsedEntityDeclSAXFunc (void * ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
+</pre><p>What to do when an unparsed entity declaration is parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="warningSAXFunc"/>Function type warningSAXFunc</h3><pre class="programlisting">void warningSAXFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format a warning messages, callback.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExternalEntityLoader"/>Function type xmlExternalEntityLoader</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlExternalEntityLoader (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context)<br/>
+</pre><p>External entity loaders types.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The System ID of the resource requested</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>The Public ID of the resource requested</td></tr><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the entity input parser.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputDeallocate"/>Function type xmlParserInputDeallocate</h3><pre class="programlisting">void xmlParserInputDeallocate (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Callback for freeing some parser input allocations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to deallocate</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlByteConsumed"/>xmlByteConsumed ()</h3><pre class="programlisting">long xmlByteConsumed (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the index in bytes from the beginning of the entity or -1 in case the index could not be computed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupParser"/>xmlCleanupParser ()</h3><pre class="programlisting">void xmlCleanupParser (void)<br/>
+</pre><p>This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlClearNodeInfoSeq"/>xmlClearNodeInfoSeq ()</h3><pre class="programlisting">void xmlClearNodeInfoSeq (<a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)<br/>
+</pre><p>-- Clear (release memory and reinitialize) node info sequence</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlClearParserCtxt"/>xmlClearParserCtxt ()</h3><pre class="programlisting">void xmlClearParserCtxt (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Clear (release owned resources) and reinitialize a parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateDocParserCtxt"/>xmlCreateDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateDocParserCtxt (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur)<br/>
+</pre><p>Creates a parser context for an XML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateIOParserCtxt"/>xmlCreateIOParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateIOParserCtxt (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a parser context for using the XML parser with an existing I/O stream</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreatePushParserCtxt"/>xmlCreatePushParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreatePushParserCtxt (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * chunk, <br/> int size, <br/> const char * filename)<br/>
+</pre><p>Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining <a href="libxml2-SAX.html#characters">characters</a> will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReadDoc"/>xmlCtxtReadDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadDoc (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReadFd"/>xmlCtxtReadFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadFd (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReadFile"/>xmlCtxtReadFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadFile (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReadIO"/>xmlCtxtReadIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadIO (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReadMemory"/>xmlCtxtReadMemory ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadMemory (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtReset"/>xmlCtxtReset ()</h3><pre class="programlisting">void xmlCtxtReset (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Reset a parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtResetPush"/>xmlCtxtResetPush ()</h3><pre class="programlisting">int xmlCtxtResetPush (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> const char * filename, <br/> const char * encoding)<br/>
+</pre><p>Reset a push parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and 1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtUseOptions"/>xmlCtxtUseOptions ()</h3><pre class="programlisting">int xmlCtxtUseOptions (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int options)<br/>
+</pre><p>Applies the options to the parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, the set of unknown or unimplemented options in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeParserCtxt"/>xmlFreeParserCtxt ()</h3><pre class="programlisting">void xmlFreeParserCtxt (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetExternalEntityLoader"/>xmlGetExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml2-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> xmlGetExternalEntityLoader (void)<br/>
+</pre><p>Get the default external entity resolver function for the application</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> function pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetFeature"/>xmlGetFeature ()</h3><pre class="programlisting">int xmlGetFeature (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * name, <br/> void * result)<br/>
+</pre><p>Read the current value of one feature of this parser instance</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML/HTML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the feature name</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>location to store the result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetFeaturesList"/>xmlGetFeaturesList ()</h3><pre class="programlisting">int xmlGetFeaturesList (int * len, <br/> const char ** result)<br/>
+</pre><p>Copy at most *@len feature names into the @result array</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the features name array (input/output)</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>an array of string to be filled with the features name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, or the total number of features, len is updated with the number of strings copied, strings must not be deallocated</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHasFeature"/>xmlHasFeature ()</h3><pre class="programlisting">int xmlHasFeature (<a href="libxml2-parser.html#xmlFeature">xmlFeature</a> feature)<br/>
+</pre><p>Examines if the library has been compiled with a given feature.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>feature</tt></i>:</span></td><td>the feature to be examined</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOParseDTD"/>xmlIOParseDTD ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlIOParseDTD (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Load and parse a DTD</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block or NULL</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an Input Buffer</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error. @input will be freed by the function in any case.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitNodeInfoSeq"/>xmlInitNodeInfoSeq ()</h3><pre class="programlisting">void xmlInitNodeInfoSeq (<a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)<br/>
+</pre><p>-- Initialize (set to initial state) node info sequence</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitParser"/>xmlInitParser ()</h3><pre class="programlisting">void xmlInitParser (void)<br/>
+</pre><p>Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitParserCtxt"/>xmlInitParserCtxt ()</h3><pre class="programlisting">int xmlInitParserCtxt (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Initialize a parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlKeepBlanksDefault"/>xmlKeepBlanksDefault ()</h3><pre class="programlisting">int xmlKeepBlanksDefault (int val)<br/>
+</pre><p>Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLineNumbersDefault"/>xmlLineNumbersDefault ()</h3><pre class="programlisting">int xmlLineNumbersDefault (int val)<br/>
+</pre><p>Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLoadExternalEntity"/>xmlLoadExternalEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlLoadExternalEntity (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Load an external entity, note that the use of this function for unparsed entities may generate problems</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the Public ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context in which the entity is called or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewIOInputStream"/>xmlNewIOInputStream ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewIOInputStream (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a new input stream structure encapsulating the @input into a stream suitable for the parser.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an I/O Input</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewParserCtxt"/>xmlNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlNewParserCtxt (void)<br/>
+</pre><p>Allocate and initialize a new parser context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseBalancedChunkMemory"/>xmlParseBalancedChunkMemory ()</h3><pre class="programlisting">int xmlParseBalancedChunkMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br/>
+</pre><p>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the input string in UTF8 or ISO-Latin (zero terminated)</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseBalancedChunkMemoryRecover"/>xmlParseBalancedChunkMemoryRecover ()</h3><pre class="programlisting">int xmlParseBalancedChunkMemoryRecover (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst, <br/> int recover)<br/>
+</pre><p>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the input string in UTF8 or ISO-Latin (zero terminated)</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>recover</tt></i>:</span></td><td>return nodes even if the data is broken (use 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseChunk"/>xmlParseChunk ()</h3><pre class="programlisting">int xmlParseChunk (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * chunk, <br/> int size, <br/> int terminate)<br/>
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCtxtExternalEntity"/>xmlParseCtxtExternalEntity ()</h3><pre class="programlisting">int xmlParseCtxtExternalEntity (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br/>
+</pre><p>Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the existing parsing context</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseDTD"/>xmlParseDTD ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlParseDTD (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Load and parse an external subset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>a NAME* containing the External ID of the DTD</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>a NAME* containing the URL to the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseDoc"/>xmlParseDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur)<br/>
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseDocument"/>xmlParseDocument ()</h3><pre class="programlisting">int xmlParseDocument (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEntity"/>xmlParseEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseEntity (const char * filename)<br/>
+</pre><p>parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseExtParsedEnt"/>xmlParseExtParsedEnt ()</h3><pre class="programlisting">int xmlParseExtParsedEnt (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseExternalEntity"/>xmlParseExternalEntity ()</h3><pre class="programlisting">int xmlParseExternalEntity (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> int depth, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br/>
+</pre><p>Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseFile"/>xmlParseFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseFile (const char * filename)<br/>
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree if the file was wellformed, NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseInNodeContext"/>xmlParseInNodeContext ()</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlParserErrors">xmlParserErrors</a> xmlParseInNodeContext (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const char * data, <br/> int datalen, <br/> int options, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br/>
+</pre><p>Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node. The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the context node</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>datalen</tt></i>:</span></td><td>the input string length in bytes</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td><a href="libxml2-xmlerror.html#XML_ERR_OK">XML_ERR_OK</a> if the chunk is well balanced, and the parser error code otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseMemory"/>xmlParseMemory ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseMemory (const char * buffer, <br/> int size)<br/>
+</pre><p>parse an XML in-memory block and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserAddNodeInfo"/>xmlParserAddNodeInfo ()</h3><pre class="programlisting">void xmlParserAddNodeInfo (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info)<br/>
+</pre><p>Insert node info record into the sorted sequence</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserFindNodeInfo"/>xmlParserFindNodeInfo ()</h3><pre class="programlisting">const <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * xmlParserFindNodeInfo (const <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Find the parser node info struct for a given node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an XML node within the tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> block pointer or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserFindNodeInfoIndex"/>xmlParserFindNodeInfoIndex ()</h3><pre class="programlisting">unsigned long xmlParserFindNodeInfoIndex (const <a href="libxml2-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq, <br/> const <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p><a href="libxml2-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a> : Find the index that the info record for the given node is or should be at in a sorted sequence</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an XML node pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a long indicating the position of the record</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputGrow"/>xmlParserInputGrow ()</h3><pre class="programlisting">int xmlParserInputGrow (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br/> int len)<br/>
+</pre><p>This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an indicative size for the lookahead</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of char read, or -1 in case of error, 0 indicate the end of this entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputRead"/>xmlParserInputRead ()</h3><pre class="programlisting">int xmlParserInputRead (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br/> int len)<br/>
+</pre><p>This function was internal and is deprecated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an indicative size for the lookahead</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 as this is an error to use it.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPedanticParserDefault"/>xmlPedanticParserDefault ()</h3><pre class="programlisting">int xmlPedanticParserDefault (int val)<br/>
+</pre><p>Set and return the previous value for enabling pedantic warnings.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReadDoc"/>xmlReadDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReadFd"/>xmlReadFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadFd (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReadFile"/>xmlReadFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadFile (const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReadIO"/>xmlReadIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML document from I/O functions and source and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReadMemory"/>xmlReadMemory ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadMemory (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRecoverDoc"/>xmlRecoverDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur)<br/>
+</pre><p>parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRecoverFile"/>xmlRecoverFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverFile (const char * filename)<br/>
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRecoverMemory"/>xmlRecoverMemory ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverMemory (const char * buffer, <br/> int size)<br/>
+</pre><p>parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseDTD"/>xmlSAXParseDTD ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlSAXParseDTD (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Load and parse an external subset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>a NAME* containing the External ID of the DTD</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>a NAME* containing the URL to the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseDoc"/>xmlSAXParseDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseDoc (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int recovery)<br/>
+</pre><p>parse an XML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseEntity"/>xmlSAXParseEntity ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseEntity (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename)<br/>
+</pre><p>parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseFile"/>xmlSAXParseFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseFile (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename, <br/> int recovery)<br/>
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseFileWithData"/>xmlSAXParseFileWithData ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseFileWithData (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * filename, <br/> int recovery, <br/> void * data)<br/>
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseMemory"/>xmlSAXParseMemory ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseMemory (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * buffer, <br/> int size, <br/> int recovery)<br/>
+</pre><p>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read not Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXParseMemoryWithData"/>xmlSAXParseMemoryWithData ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseMemoryWithData (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> const char * buffer, <br/> int size, <br/> int recovery, <br/> void * data)<br/>
+</pre><p>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXUserParseFile"/>xmlSAXUserParseFile ()</h3><pre class="programlisting">int xmlSAXUserParseFile (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * filename)<br/>
+</pre><p>parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or a error number otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXUserParseMemory"/>xmlSAXUserParseMemory ()</h3><pre class="programlisting">int xmlSAXUserParseMemory (<a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data, <br/> const char * buffer, <br/> int size)<br/>
+</pre><p>A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an in-memory XML document input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the XML document in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or a error number otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetExternalEntityLoader"/>xmlSetExternalEntityLoader ()</h3><pre class="programlisting">void xmlSetExternalEntityLoader (<a href="libxml2-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f)<br/>
+</pre><p>Changes the defaultexternal entity resolver function for the application</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the new entity resolver function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetFeature"/>xmlSetFeature ()</h3><pre class="programlisting">int xmlSetFeature (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * name, <br/> void * value)<br/>
+</pre><p>Change the current value of one feature of this parser instance</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML/HTML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the feature name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>pointer to the location of the new value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetupParserForBuffer"/>xmlSetupParserForBuffer ()</h3><pre class="programlisting">void xmlSetupParserForBuffer (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buffer, <br/> const char * filename)<br/>
+</pre><p>Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buffer</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStopParser"/>xmlStopParser ()</h3><pre class="programlisting">void xmlStopParser (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Blocks further parser processing</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSubstituteEntitiesDefault"/>xmlSubstituteEntitiesDefault ()</h3><pre class="programlisting">int xmlSubstituteEntitiesDefault (int val)<br/>
+</pre><p>Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-parserInternals.html b/doc/devhelp/libxml2-parserInternals.html
new file mode 100644
index 0000000..915ad5b
--- /dev/null
+++ b/doc/devhelp/libxml2-parserInternals.html
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>parserInternals: internals routines and limits exported by the parser.</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-parser.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-pattern.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">parserInternals</span>
+ </h2>
+ <p>parserInternals - internals routines and limits exported by the parser.</p>
+ <p>this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a>;
+#define <a href="#IS_BLANK">IS_BLANK</a>(c);
+#define <a href="#IS_BYTE_CHAR">IS_BYTE_CHAR</a>(c);
+#define <a href="#IS_PUBIDCHAR">IS_PUBIDCHAR</a>(c);
+#define <a href="#IS_DIGIT_CH">IS_DIGIT_CH</a>(c);
+#define <a href="#IS_EXTENDER">IS_EXTENDER</a>(c);
+#define <a href="#IS_ASCII_DIGIT">IS_ASCII_DIGIT</a>(c);
+#define <a href="#IS_COMBINING_CH">IS_COMBINING_CH</a>(c);
+#define <a href="#IS_CHAR">IS_CHAR</a>(c);
+#define <a href="#IS_LETTER">IS_LETTER</a>(c);
+#define <a href="#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a>(c);
+#define <a href="#MOVETO_STARTTAG">MOVETO_STARTTAG</a>(p);
+#define <a href="#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a>;
+#define <a href="#IS_ASCII_LETTER">IS_ASCII_LETTER</a>(c);
+#define <a href="#IS_DIGIT">IS_DIGIT</a>(c);
+#define <a href="#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a>;
+#define <a href="#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a>;
+#define <a href="#MOVETO_ENDTAG">MOVETO_ENDTAG</a>(p);
+#define <a href="#SKIP_EOL">SKIP_EOL</a>(p);
+#define <a href="#IS_EXTENDER_CH">IS_EXTENDER_CH</a>(c);
+#define <a href="#IS_BLANK_CH">IS_BLANK_CH</a>(c);
+#define <a href="#IS_LETTER_CH">IS_LETTER_CH</a>(c);
+#define <a href="#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a>;
+#define <a href="#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a>;
+#define <a href="#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a>;
+#define <a href="#IS_COMBINING">IS_COMBINING</a>(c);
+#define <a href="#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a>;
+#define <a href="#IS_BASECHAR">IS_BASECHAR</a>(c);
+#define <a href="#INPUT_CHUNK">INPUT_CHUNK</a>;
+#define <a href="#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a>(c);
+#define <a href="#IS_CHAR_CH">IS_CHAR_CH</a>(c);
+#define <a href="#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a>;
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#nodePop">nodePop</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseNotationDecl">xmlParseNotationDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseExternalSubset">xmlParseExternalSubset</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+void <a href="#xmlParseMisc">xmlParseMisc</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewStringInputStream">xmlNewStringInputStream</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buffer);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseExternalID">xmlParseExternalID</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** publicID, <br/> int strict);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlScanName">xmlScanName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseElementDecl">xmlParseElementDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseMarkupDecl">xmlParseMarkupDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a> (const char * filename, <br/> const char * encoding);
+int <a href="#inputPush">inputPush</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> value);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#namePop">namePop</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseContent">xmlParseContent</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewInputStream">xmlNewInputStream</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseQName">xmlNamespaceParseQName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewInputFromFile">xmlNewInputFromFile</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * filename);
+void <a href="#xmlParserHandlePEReference">xmlParserHandlePEReference</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStringDecodeEntities">xmlStringDecodeEntities</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a> (const char * filename);
+int <a href="#xmlParseCharRef">xmlParseCharRef</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseElement">xmlParseElement</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseTextDecl">xmlParseTextDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewEntityInputStream">xmlNewEntityInputStream</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity);
+int <a href="#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * out, <br/> int val);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int inputchk);
+void <a href="#xmlParseCharData">xmlParseCharData</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int cdata);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseVersionInfo">xmlParseVersionInfo</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseSDDecl">xmlParseSDDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseEnumeratedType">xmlParseEnumeratedType</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree);
+void <a href="#xmlHandleEntity">xmlHandleEntity</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity);
+int <a href="#xmlCurrentChar">xmlCurrentChar</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int * len);
+int <a href="#xmlSkipBlankChars">xmlSkipBlankChars</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlParseNotationType">xmlParseNotationType</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParserInputShrink">xmlParserInputShrink</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in);
+void <a href="#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a> (<a href="libxml2-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> func);
+void <a href="#xmlFreeInputStream">xmlFreeInputStream</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);
+void <a href="#xmlParsePEReference">xmlParsePEReference</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a> (const char * filename, <br/> int options);
+int <a href="#xmlIsLetter">xmlIsLetter</a> (int c);
+int <a href="#xmlCheckLanguageID">xmlCheckLanguageID</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang);
+void <a href="#xmlNextChar">xmlNextChar</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlParseEnumerationType">xmlParseEnumerationType</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseAttributeType">xmlParseAttributeType</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree);
+int <a href="#xmlParseDefaultDecl">xmlParseDefaultDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** value);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseSystemLiteral">xmlParseSystemLiteral</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseAttValue">xmlParseAttValue</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a> (const char * buffer, <br/> int size);
+void <a href="#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseName">xmlParseName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEncName">xmlParseEncName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#nodePush">nodePush</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> value);
+int <a href="#xmlSwitchEncoding">xmlSwitchEncoding</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+int <a href="#xmlSwitchToEncoding">xmlSwitchToEncoding</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler);
+<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlParseEntityRef">xmlParseEntityRef</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseAttribute">xmlParseAttribute</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** value);
+void <a href="#xmlParseEndTag">xmlParseEndTag</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEncodingDecl">xmlParseEncodingDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#htmlInitAutoClose">htmlInitAutoClose</a> (void);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName">xmlSplitQName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix);
+void <a href="#xmlParserHandleReference">xmlParserHandleReference</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParsePITarget">xmlParsePITarget</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlParseElementContentDecl">xmlParseElementContentDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> * result);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#inputPop">inputPop</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> <a href="#xmlPopInput">xmlPopInput</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParsePubidLiteral">xmlParsePubidLiteral</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlPushInput">xmlPushInput</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEntityValue">xmlParseEntityValue</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** orig);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDecodeEntities">xmlDecodeEntities</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int len, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseVersionNum">xmlParseVersionNum</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseXMLDecl">xmlParseXMLDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+typedef void <a href="#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> (<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> firstNode, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> lastNode);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int inputchk);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseQuotedString">xmlParseQuotedString</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseCDSect">xmlParseCDSect</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlStringCurrentChar">xmlStringCurrentChar</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int * len);
+void <a href="#xmlParseComment">xmlParseComment</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlErrMemory">xmlErrMemory</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * extra);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseNmtoken">xmlParseNmtoken</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseReference">xmlParseReference</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#namePush">namePush</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlParseNamespace">xmlParseNamespace</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+int <a href="#xmlCopyChar">xmlCopyChar</a> (int len, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * out, <br/> int val);
+void <a href="#xmlParsePI">xmlParsePI</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseStartTag">xmlParseStartTag</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+void <a href="#xmlParseEntityDecl">xmlParseEntityDecl</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="INPUT_CHUNK">Macro </a>INPUT_CHUNK</h3><pre class="programlisting">#define <a href="#INPUT_CHUNK">INPUT_CHUNK</a>;
+</pre><p>The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_ASCII_DIGIT">Macro </a>IS_ASCII_DIGIT</h3><pre class="programlisting">#define <a href="#IS_ASCII_DIGIT">IS_ASCII_DIGIT</a>(c);
+</pre><p>Macro to check [0-9]</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_ASCII_LETTER">Macro </a>IS_ASCII_LETTER</h3><pre class="programlisting">#define <a href="#IS_ASCII_LETTER">IS_ASCII_LETTER</a>(c);
+</pre><p>Macro to check [a-zA-Z]</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_BASECHAR">Macro </a>IS_BASECHAR</h3><pre class="programlisting">#define <a href="#IS_BASECHAR">IS_BASECHAR</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ...</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_BLANK">Macro </a>IS_BLANK</h3><pre class="programlisting">#define <a href="#IS_BLANK">IS_BLANK</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [3] S ::= (#x20 | #x9 | #xD | #xA)+</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_BLANK_CH">Macro </a>IS_BLANK_CH</h3><pre class="programlisting">#define <a href="#IS_BLANK_CH">IS_BLANK_CH</a>(c);
+</pre><p>Behaviour same as <a href="libxml2-parserInternals.html#IS_BLANK">IS_BLANK</a></p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value (normally unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_BYTE_CHAR">Macro </a>IS_BYTE_CHAR</h3><pre class="programlisting">#define <a href="#IS_BYTE_CHAR">IS_BYTE_CHAR</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an byte value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_CHAR">Macro </a>IS_CHAR</h3><pre class="programlisting">#define <a href="#IS_CHAR">IS_CHAR</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_CHAR_CH">Macro </a>IS_CHAR_CH</h3><pre class="programlisting">#define <a href="#IS_CHAR_CH">IS_CHAR_CH</a>(c);
+</pre><p>Behaves like <a href="libxml2-parserInternals.html#IS_CHAR">IS_CHAR</a> on single-byte value</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> (usually an unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_COMBINING">Macro </a>IS_COMBINING</h3><pre class="programlisting">#define <a href="#IS_COMBINING">IS_COMBINING</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ...</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_COMBINING_CH">Macro </a>IS_COMBINING_CH</h3><pre class="programlisting">#define <a href="#IS_COMBINING_CH">IS_COMBINING_CH</a>(c);
+</pre><p>Always false (all combining chars &gt; 0xff)</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> (usually an unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_DIGIT">Macro </a>IS_DIGIT</h3><pre class="programlisting">#define <a href="#IS_DIGIT">IS_DIGIT</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ...</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_DIGIT_CH">Macro </a>IS_DIGIT_CH</h3><pre class="programlisting">#define <a href="#IS_DIGIT_CH">IS_DIGIT_CH</a>(c);
+</pre><p>Behaves like <a href="libxml2-parserInternals.html#IS_DIGIT">IS_DIGIT</a> but with a single byte argument</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value (usually an unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_EXTENDER">Macro </a>IS_EXTENDER</h3><pre class="programlisting">#define <a href="#IS_EXTENDER">IS_EXTENDER</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_EXTENDER_CH">Macro </a>IS_EXTENDER_CH</h3><pre class="programlisting">#define <a href="#IS_EXTENDER_CH">IS_EXTENDER_CH</a>(c);
+</pre><p>Behaves like <a href="libxml2-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a> but with a single-byte argument</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value (usually an unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_IDEOGRAPHIC">Macro </a>IS_IDEOGRAPHIC</h3><pre class="programlisting">#define <a href="#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_LETTER">Macro </a>IS_LETTER</h3><pre class="programlisting">#define <a href="#IS_LETTER">IS_LETTER</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_LETTER_CH">Macro </a>IS_LETTER_CH</h3><pre class="programlisting">#define <a href="#IS_LETTER_CH">IS_LETTER_CH</a>(c);
+</pre><p>Macro behaves like IS_LETTER, but only check base chars</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value (normally unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_PUBIDCHAR">Macro </a>IS_PUBIDCHAR</h3><pre class="programlisting">#define <a href="#IS_PUBIDCHAR">IS_PUBIDCHAR</a>(c);
+</pre><p>Macro to check the following production in the XML spec: [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an UNICODE value (int)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="IS_PUBIDCHAR_CH">Macro </a>IS_PUBIDCHAR_CH</h3><pre class="programlisting">#define <a href="#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a>(c);
+</pre><p>Same as <a href="libxml2-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a> but for single-byte value</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> value (normally unsigned char)</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="MOVETO_ENDTAG">Macro </a>MOVETO_ENDTAG</h3><pre class="programlisting">#define <a href="#MOVETO_ENDTAG">MOVETO_ENDTAG</a>(p);
+</pre><p>Skips to the next '&gt;' char.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>p</tt></i>:</span></td><td>and UTF8 string pointer</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="MOVETO_STARTTAG">Macro </a>MOVETO_STARTTAG</h3><pre class="programlisting">#define <a href="#MOVETO_STARTTAG">MOVETO_STARTTAG</a>(p);
+</pre><p>Skips to the next '&lt;' char.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>p</tt></i>:</span></td><td>and UTF8 string pointer</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="SKIP_EOL">Macro </a>SKIP_EOL</h3><pre class="programlisting">#define <a href="#SKIP_EOL">SKIP_EOL</a>(p);
+</pre><p>Skips the end of line chars.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>p</tt></i>:</span></td><td>and UTF8 string pointer</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_MAX_DICTIONARY_LIMIT">Macro </a>XML_MAX_DICTIONARY_LIMIT</h3><pre class="programlisting">#define <a href="#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a>;
+</pre><p>Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use <a href="libxml2-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Introduced in 2.9.0</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_MAX_LOOKUP_LIMIT">Macro </a>XML_MAX_LOOKUP_LIMIT</h3><pre class="programlisting">#define <a href="#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a>;
+</pre><p>Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_MAX_NAMELEN">Macro </a>XML_MAX_NAMELEN</h3><pre class="programlisting">#define <a href="#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a>;
+</pre><p>Identifiers can be longer, but this will be more costly at runtime.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_MAX_NAME_LENGTH">Macro </a>XML_MAX_NAME_LENGTH</h3><pre class="programlisting">#define <a href="#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a>;
+</pre><p>Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use <a href="libxml2-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_MAX_TEXT_LENGTH">Macro </a>XML_MAX_TEXT_LENGTH</h3><pre class="programlisting">#define <a href="#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a>;
+</pre><p>Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use <a href="libxml2-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Introduced in 2.9.0</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SUBSTITUTE_BOTH">Macro </a>XML_SUBSTITUTE_BOTH</h3><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a>;
+</pre><p>Both general and parameter entities need to be substituted.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SUBSTITUTE_NONE">Macro </a>XML_SUBSTITUTE_NONE</h3><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a>;
+</pre><p>If no entities need to be substituted.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SUBSTITUTE_PEREF">Macro </a>XML_SUBSTITUTE_PEREF</h3><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a>;
+</pre><p>Whether parameter entities need to be substituted.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SUBSTITUTE_REF">Macro </a>XML_SUBSTITUTE_REF</h3><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a>;
+</pre><p>Whether general entities need to be substituted.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEntityReferenceFunc"/>Function type xmlEntityReferenceFunc</h3><pre class="programlisting">void xmlEntityReferenceFunc (<a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> firstNode, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> lastNode)<br/>
+</pre><p>Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ent</tt></i>:</span></td><td>the entity</td></tr><tr><td><span class="term"><i><tt>firstNode</tt></i>:</span></td><td>the fist node in the chunk</td></tr><tr><td><span class="term"><i><tt>lastNode</tt></i>:</span></td><td>the last nod in the chunk</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserMaxDepth">Variable </a>xmlParserMaxDepth</h3><pre class="programlisting">unsigned int xmlParserMaxDepth;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringComment">Variable </a>xmlStringComment</h3><pre class="programlisting">const xmlCharxmlStringComment[] xmlStringComment;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringText">Variable </a>xmlStringText</h3><pre class="programlisting">const xmlCharxmlStringText[] xmlStringText;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringTextNoenc">Variable </a>xmlStringTextNoenc</h3><pre class="programlisting">const xmlCharxmlStringTextNoenc[] xmlStringTextNoenc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlCreateFileParserCtxt"/>htmlCreateFileParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateFileParserCtxt (const char * filename, <br/> const char * encoding)<br/>
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="htmlInitAutoClose"/>htmlInitAutoClose ()</h3><pre class="programlisting">void htmlInitAutoClose (void)<br/>
+</pre><p>Initialize the htmlStartCloseIndex for fast lookup of closing tags names. This is not reentrant. Call xmlInitParser() once before processing in case of use in multithreaded programs.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="inputPop"/>inputPop ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> inputPop (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Pops the top parser input from the input stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the input just removed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="inputPush"/>inputPush ()</h3><pre class="programlisting">int inputPush (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> value)<br/>
+</pre><p>Pushes a new parser input on top of the input stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the parser input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="namePop"/>namePop ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namePop (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Pops the top element name from the name stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the name just removed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="namePush"/>namePush ()</h3><pre class="programlisting">int namePush (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Pushes a new element name on top of the name stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="nodePop"/>nodePop ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> nodePop (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Pops the top element node from the node stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node just removed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="nodePush"/>nodePush ()</h3><pre class="programlisting">int nodePush (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> value)<br/>
+</pre><p>Pushes a new element node on top of the node stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCheckLanguageID"/>xmlCheckLanguageID ()</h3><pre class="programlisting">int xmlCheckLanguageID (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang)<br/>
+</pre><p>Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The current REC <a href="libxml2-SAX.html#reference">reference</a> the sucessors of RFC 1766, currently 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO 15924 code region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum) extension = singleton 1*("-" (2*8alphanum)) ; Single alphanumerics ; "x" reserved for private use singleton = DIGIT ; 0 - 9 / %x41-57 ; A - W / %x59-5A ; Y - Z / %x61-77 ; a - w / %x79-7A ; y - z it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn't try to cope with extension or privateuse that could be added but that's not interoperable anyway</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>lang</tt></i>:</span></td><td>pointer to the string value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if correct 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyChar"/>xmlCopyChar ()</h3><pre class="programlisting">int xmlCopyChar (int len, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * out, <br/> int val)<br/>
+</pre><p>append the char value in the array</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>Ignored, compatibility</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> written</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyCharMultiByte"/>xmlCopyCharMultiByte ()</h3><pre class="programlisting">int xmlCopyCharMultiByte (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * out, <br/> int val)<br/>
+</pre><p>append the char value in the array</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>pointer to an array of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> written</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateEntityParserCtxt"/>xmlCreateEntityParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateEntityParserCtxt (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base)<br/>
+</pre><p>Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the entity URL</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the entity PUBLIC ID</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>a possible base for the target URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateFileParserCtxt"/>xmlCreateFileParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateFileParserCtxt (const char * filename)<br/>
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateMemoryParserCtxt"/>xmlCreateMemoryParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateMemoryParserCtxt (const char * buffer, <br/> int size)<br/>
+</pre><p>Create a parser context for an XML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateURLParserCtxt"/>xmlCreateURLParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateURLParserCtxt (const char * filename, <br/> int options)<br/>
+</pre><p>Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCurrentChar"/>xmlCurrentChar ()</h3><pre class="programlisting">int xmlCurrentChar (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int * len)<br/>
+</pre><p>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the char read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current char value and its length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDecodeEntities"/>xmlDecodeEntities ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlDecodeEntities (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int len, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3)<br/>
+</pre><p>This function is deprecated, we now always process entities content through <a href="libxml2-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a> TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len to decode (in bytes !), -1 for no size limit</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlErrMemory"/>xmlErrMemory ()</h3><pre class="programlisting">void xmlErrMemory (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * extra)<br/>
+</pre><p>Handle a redefinition of <a href="libxml2-SAX.html#attribute">attribute</a> error</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>extra</tt></i>:</span></td><td>extra informations</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeInputStream"/>xmlFreeInputStream ()</h3><pre class="programlisting">void xmlFreeInputStream (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br/>
+</pre><p>Free up an input stream.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHandleEntity"/>xmlHandleEntity ()</h3><pre class="programlisting">void xmlHandleEntity (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)<br/>
+</pre><p>Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>entity</tt></i>:</span></td><td>an XML entity pointer.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsLetter"/>xmlIsLetter ()</h3><pre class="programlisting">int xmlIsLetter (int c)<br/>
+</pre><p>Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an unicode character (int)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if not, non-zero otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNamespaceParseNCName"/>xmlNamespaceParseNCName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseNCName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNamespaceParseNSDef"/>xmlNamespaceParseNSDef ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseNSDef (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNamespaceParseQName"/>xmlNamespaceParseQName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseQName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br/>
+</pre><p>TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewEntityInputStream"/>xmlNewEntityInputStream ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewEntityInputStream (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)<br/>
+</pre><p>Create a new input stream based on an <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>entity</tt></i>:</span></td><td>an Entity pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewInputFromFile"/>xmlNewInputFromFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewInputFromFile (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const char * filename)<br/>
+</pre><p>Create a new input stream based on a file or an URL.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename to use as entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewInputStream"/>xmlNewInputStream ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewInputStream (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Create a new input stream structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewStringInputStream"/>xmlNewStringInputStream ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewStringInputStream (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buffer)<br/>
+</pre><p>Create a new input stream based on a memory buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an memory buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNextChar"/>xmlNextChar ()</h3><pre class="programlisting">void xmlNextChar (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Skip to the next char input char.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseAttValue"/>xmlParseAttValue ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseAttValue (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a value for an <a href="libxml2-SAX.html#attribute">attribute</a> Note: the parser won't do substitution of entities here, this will be handled later in <a href="libxml2-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a> [10] AttValue ::= '"' ([^&lt;&amp;"] | Reference)* '"' | "'" ([^&lt;&amp;'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an <a href="libxml2-SAX.html#attribute">attribute</a> is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character <a href="libxml2-SAX.html#reference">reference</a> is processed by appending the referenced character to the <a href="libxml2-SAX.html#attribute">attribute</a> value - an entity <a href="libxml2-SAX.html#reference">reference</a> is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other <a href="libxml2-SAX.html#characters">characters</a> are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml2-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml2-SAX.html#characters">characters</a> by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the AttValue parsed or NULL. The value has to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseAttribute"/>xmlParseAttribute ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseAttribute (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** value)<br/>
+</pre><p>parse an <a href="libxml2-SAX.html#attribute">attribute</a> [41] Attribute ::= Name Eq AttValue [ WFC: No External Entity References ] Attribute values cannot contain direct or indirect entity references to external entities. [ WFC: No &lt; in Attribute Values ] The replacement text of any entity referred to directly or indirectly in an <a href="libxml2-SAX.html#attribute">attribute</a> value (other than "&amp;lt;") must not contain a &lt;. [ VC: Attribute Value Type ] The <a href="libxml2-SAX.html#attribute">attribute</a> must have been declared; the value must be of the type declared for it. [25] Eq ::= S? '=' S? With namespace: [NS 11] Attribute ::= QName Eq AttValue Also the case QName == xmlns:??? is handled independently as a namespace definition.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** used to store the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name, and the value in *value.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseAttributeListDecl"/>xmlParseAttributeListDecl ()</h3><pre class="programlisting">void xmlParseAttributeListDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>: parse the Attribute list def for an element [52] AttlistDecl ::= '&lt;!ATTLIST' S Name AttDef* S? '&gt;' [53] AttDef ::= S Name S AttType S DefaultDecl</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseAttributeType"/>xmlParseAttributeType ()</h3><pre class="programlisting">int xmlParseAttributeType (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)<br/>
+</pre><p>parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' Validity constraints for <a href="libxml2-SAX.html#attribute">attribute</a> values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID <a href="libxml2-SAX.html#attribute">attribute</a> specified. [ VC: ID Attribute Default ] An ID <a href="libxml2-SAX.html#attribute">attribute</a> must have a declared default of #IMPLIED or #REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID <a href="libxml2-SAX.html#attribute">attribute</a> on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the enumeration tree built while parsing</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCDSect"/>xmlParseCDSect ()</h3><pre class="programlisting">void xmlParseCDSect (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '&lt;![CDATA[' [20] Data ::= (Char* - (Char* ']]&gt;' Char*)) [21] CDEnd ::= ']]&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCharData"/>xmlParseCharData ()</h3><pre class="programlisting">void xmlParseCharData (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int cdata)<br/>
+</pre><p>parse a CharData section. if we are within a CDATA section ']]&gt;' marks an end of section. The right angle bracket (&gt;) may be represented using the string "&amp;gt;", and must, for compatibility, be escaped using "&amp;gt;" or a character <a href="libxml2-SAX.html#reference">reference</a> when it appears in the string "]]&gt;" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>cdata</tt></i>:</span></td><td>int indicating whether we are within a CDATA section</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseCharRef"/>xmlParseCharRef ()</h3><pre class="programlisting">int xmlParseCharRef (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse Reference declarations [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value parsed (as an int), 0 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseComment"/>xmlParseComment ()</h3><pre class="programlisting">void xmlParseComment (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Skip an XML (SGML) <a href="libxml2-SAX.html#comment">comment</a> &lt;!-- .... --&gt; The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '&lt;!--' ((Char - '-') | ('-' (Char - '-')))* '--&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseContent"/>xmlParseContent ()</h3><pre class="programlisting">void xmlParseContent (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Parse a content: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseDefaultDecl"/>xmlParseDefaultDecl ()</h3><pre class="programlisting">int xmlParseDefaultDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** value)<br/>
+</pre><p>Parse an <a href="libxml2-SAX.html#attribute">attribute</a> default declaration [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the <a href="libxml2-SAX.html#attribute">attribute</a> must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared <a href="libxml2-SAX.html#attribute">attribute</a> type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an <a href="libxml2-SAX.html#attribute">attribute</a> has a default value declared with the #FIXED keyword, instances of that <a href="libxml2-SAX.html#attribute">attribute</a> must match the default value. [ WFC: No &lt; in Attribute Values ] handled in xmlParseAttValue()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>Receive a possible fixed default value for the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, <a href="libxml2-tree.html#XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> or XML_ATTRIBUTE_FIXED.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseDocTypeDecl"/>xmlParseDocTypeDecl ()</h3><pre class="programlisting">void xmlParseDocTypeDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a DOCTYPE declaration [28] doctypedecl ::= '&lt;!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '&gt;' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseElement"/>xmlParseElement ()</h3><pre class="programlisting">void xmlParseElement (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseElementChildrenContentDecl"/>xmlParseElementChildrenContentDecl ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlParseElementChildrenContentDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int inputchk)<br/>
+</pre><p>parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in <a href="libxml2-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a> [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity <a href="libxml2-SAX.html#reference">reference</a> appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>inputchk</tt></i>:</span></td><td>the input used for the current entity, needed for boundary checks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the tree of <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> describing the element hierarchy.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseElementContentDecl"/>xmlParseElementContentDecl ()</h3><pre class="programlisting">int xmlParseElementContentDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> * result)<br/>
+</pre><p>parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in <a href="libxml2-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a> [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the element being defined.</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>the Element Content pointer will be stored here if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type of element content XML_ELEMENT_TYPE_xxx</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseElementDecl"/>xmlParseElementDecl ()</h3><pre class="programlisting">int xmlParseElementDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an Element declaration. [45] elementdecl ::= '&lt;!ELEMENT' S Name S contentspec S? '&gt;' [ VC: Unique Element Type Declaration ] No element type may be declared more than once</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type of the element, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseElementMixedContentDecl"/>xmlParseElementMixedContentDecl ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlParseElementMixedContentDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int inputchk)<br/>
+</pre><p>parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in <a href="libxml2-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a> [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')' [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>inputchk</tt></i>:</span></td><td>the input used for the current entity, needed for boundary checks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the list of the <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> describing the element choices</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEncName"/>xmlParseEncName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEncName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the encoding name value or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEncodingDecl"/>xmlParseEncodingDecl ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEncodingDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the encoding value or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEndTag"/>xmlParseEndTag ()</h3><pre class="programlisting">void xmlParseEndTag (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an end of tag [42] ETag ::= '&lt;/' Name S? '&gt;' With namespace [NS 9] ETag ::= '&lt;/' QName S? '&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEntityDecl"/>xmlParseEntityDecl ()</h3><pre class="programlisting">void xmlParseEntityDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse &lt;!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= '&lt;!ENTITY' S Name S EntityDef S? '&gt;' [72] PEDecl ::= '&lt;!ENTITY' S '%' S Name S PEDef S? '&gt;' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEntityRef"/>xmlParseEntityRef ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlParseEntityRef (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse ENTITY references declarations [68] EntityRef ::= '&amp;' Name ';' [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity <a href="libxml2-SAX.html#reference">reference</a> must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it. Similarly, the declaration of a general entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'. [ WFC: Parsed Entity ] An entity <a href="libxml2-SAX.html#reference">reference</a> must not contain the name of an unparsed entity</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found, or NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEntityValue"/>xmlParseEntityValue ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEntityValue (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** orig)<br/>
+</pre><p>parse a value for ENTITY declarations [9] EntityValue ::= '"' ([^%&amp;"] | PEReference | Reference)* '"' | "'" ([^%&amp;'] | PEReference | Reference)* "'"</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>if non-NULL store a copy of the original entity value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the EntityValue parsed with <a href="libxml2-SAX.html#reference">reference</a> substituted or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEnumeratedType"/>xmlParseEnumeratedType ()</h3><pre class="programlisting">int xmlParseEnumeratedType (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)<br/>
+</pre><p>parse an Enumerated <a href="libxml2-SAX.html#attribute">attribute</a> type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the enumeration tree built while parsing</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td><a href="libxml2-tree.html#XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> or <a href="libxml2-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseEnumerationType"/>xmlParseEnumerationType ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlParseEnumerationType (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an Enumeration <a href="libxml2-SAX.html#attribute">attribute</a> type. [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the enumeration <a href="libxml2-SAX.html#attribute">attribute</a> tree built while parsing</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseExternalID"/>xmlParseExternalID ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseExternalID (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** publicID, <br/> int strict)<br/>
+</pre><p>Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral [83] PublicID ::= 'PUBLIC' S PubidLiteral</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>publicID</tt></i>:</span></td><td>a xmlChar** receiving PubidLiteral</td></tr><tr><td><span class="term"><i><tt>strict</tt></i>:</span></td><td>indicate whether we should restrict parsing to only production [75], see NOTE below</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseExternalSubset"/>xmlParseExternalSubset ()</h3><pre class="programlisting">void xmlParseExternalSubset (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external identifier</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system identifier (or URL)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseMarkupDecl"/>xmlParseMarkupDecl ()</h3><pre class="programlisting">void xmlParseMarkupDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseMisc"/>xmlParseMisc ()</h3><pre class="programlisting">void xmlParseMisc (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseName"/>xmlParseName ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20 Name)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Name parsed or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseNamespace"/>xmlParseNamespace ()</h3><pre class="programlisting">void xmlParseNamespace (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>xmlParseNamespace: parse specific PI '&lt;?namespace ...' constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseNmtoken"/>xmlParseNmtoken ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseNmtoken (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Nmtoken parsed or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseNotationDecl"/>xmlParseNotationDecl ()</h3><pre class="programlisting">void xmlParseNotationDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a notation declaration [82] NotationDecl ::= '&lt;!NOTATION' S Name S (ExternalID | PublicID) S? '&gt;' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseNotationType"/>xmlParseNotationType ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlParseNotationType (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an Notation <a href="libxml2-SAX.html#attribute">attribute</a> type. Note: the leading 'NOTATION' S part has already being parsed... [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the notation <a href="libxml2-SAX.html#attribute">attribute</a> tree built while parsing</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParsePEReference"/>xmlParsePEReference ()</h3><pre class="programlisting">void xmlParsePEReference (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse PEReference declarations The entity content is handled directly by pushing it's content as a new input stream. [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive <a href="libxml2-SAX.html#reference">reference</a> to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParsePI"/>xmlParsePI ()</h3><pre class="programlisting">void xmlParsePI (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML Processing Instruction. [16] PI ::= '&lt;?' PITarget (S (Char* - (Char* '?&gt;' Char*)))? '?&gt;' The processing is transfered to SAX once parsed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParsePITarget"/>xmlParsePITarget ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParsePITarget (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the PITarget name or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParsePubidLiteral"/>xmlParsePubidLiteral ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParsePubidLiteral (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the PubidLiteral parsed or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseQuotedString"/>xmlParseQuotedString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseQuotedString (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string parser or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseReference"/>xmlParseReference ()</h3><pre class="programlisting">void xmlParseReference (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseSDDecl"/>xmlParseSDDecl ()</h3><pre class="programlisting">int xmlParseSDDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the <a href="libxml2-SAX.html#attribute">attribute</a> appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if standalone="yes" 0 if standalone="no" -2 if standalone <a href="libxml2-SAX.html#attribute">attribute</a> is missing or invalid (A standalone value of -2 means that the XML declaration was found, but no value was specified for the standalone attribute).</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseStartTag"/>xmlParseStartTag ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseStartTag (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [40] STag ::= '&lt;' Name (S Attribute)* S? '&gt;' [ WFC: Unique Att Spec ] No <a href="libxml2-SAX.html#attribute">attribute</a> name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '&lt;' Name (S Attribute)* S? '/&gt;' [ WFC: Unique Att Spec ] No <a href="libxml2-SAX.html#attribute">attribute</a> name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '&lt;' QName (S Attribute)* S? '&gt;' [NS 10] EmptyElement ::= '&lt;' QName (S Attribute)* S? '/&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the element name parsed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseSystemLiteral"/>xmlParseSystemLiteral ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseSystemLiteral (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the SystemLiteral parsed or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseTextDecl"/>xmlParseTextDecl ()</h3><pre class="programlisting">void xmlParseTextDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML declaration header for external entities [77] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseVersionInfo"/>xmlParseVersionInfo ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseVersionInfo (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the version string, e.g. "1.0"</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseVersionNum"/>xmlParseVersionNum ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlParseVersionNum (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string giving the XML version number, or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseXMLDecl"/>xmlParseXMLDecl ()</h3><pre class="programlisting">void xmlParseXMLDecl (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse an XML declaration header [23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserHandlePEReference"/>xmlParserHandlePEReference ()</h3><pre class="programlisting">void xmlParserHandlePEReference (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive <a href="libxml2-SAX.html#reference">reference</a> to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any <a href="libxml2-SAX.html#reference">reference</a> to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity <a href="libxml2-SAX.html#reference">reference</a> within DTDs</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserHandleReference"/>xmlParserHandleReference ()</h3><pre class="programlisting">void xmlParserHandleReference (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&amp;' Name ';' [ WFC: Entity Declared ] the Name given in the entity <a href="libxml2-SAX.html#reference">reference</a> must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. [ WFC: Parsed Entity ] An entity <a href="libxml2-SAX.html#reference">reference</a> must not contain the name of an unparsed entity [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputShrink"/>xmlParserInputShrink ()</h3><pre class="programlisting">void xmlParserInputShrink (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in)<br/>
+</pre><p>This function removes used input for the parser.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPopInput"/>xmlPopInput ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> xmlPopInput (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>xmlPopInput: the current input pointed by ctxt-&gt;input came to an end pop it and return the next char.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> in the parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPushInput"/>xmlPushInput ()</h3><pre class="programlisting">int xmlPushInput (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br/>
+</pre><p>xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an XML parser input fragment (entity, XML fragment ...).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or the index in the input stack</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlScanName"/>xmlScanName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlScanName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Trickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of <a href="libxml2-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a> [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Name parsed or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetEntityReferenceFunc"/>xmlSetEntityReferenceFunc ()</h3><pre class="programlisting">void xmlSetEntityReferenceFunc (<a href="libxml2-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> func)<br/>
+</pre><p>Set the function to call call back when a xml <a href="libxml2-SAX.html#reference">reference</a> has been made</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>A valid function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSkipBlankChars"/>xmlSkipBlankChars ()</h3><pre class="programlisting">int xmlSkipBlankChars (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of space chars skipped</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSplitQName"/>xmlSplitQName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br/>
+</pre><p>parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringCurrentChar"/>xmlStringCurrentChar ()</h3><pre class="programlisting">int xmlStringCurrentChar (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int * len)<br/>
+</pre><p>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>pointer to the beginning of the char</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the char read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current char value and its length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringDecodeEntities"/>xmlStringDecodeEntities ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStringDecodeEntities (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3)<br/>
+</pre><p>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringLenDecodeEntities"/>xmlStringLenDecodeEntities ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStringLenDecodeEntities (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len, <br/> int what, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end2, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> end3)<br/>
+</pre><p>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the string length</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml2-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSwitchEncoding"/>xmlSwitchEncoding ()</h3><pre class="programlisting">int xmlSwitchEncoding (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the encoding value (number)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSwitchInputEncoding"/>xmlSwitchInputEncoding ()</h3><pre class="programlisting">int xmlSwitchInputEncoding (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br/>
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input stream</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the encoding handler</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSwitchToEncoding"/>xmlSwitchToEncoding ()</h3><pre class="programlisting">int xmlSwitchToEncoding (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br/>
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the encoding handler</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-pattern.html b/doc/devhelp/libxml2-pattern.html
new file mode 100644
index 0000000..321bd79
--- /dev/null
+++ b/doc/devhelp/libxml2-pattern.html
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>pattern: pattern expression handling</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-parserInternals.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-relaxng.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">pattern</span>
+ </h2>
+ <p>pattern - pattern expression handling</p>
+ <p>allows to compile and test pattern expressions for nodes either in a tree or based on a parser state. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a> * <a href="#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a>;
+typedef enum <a href="#xmlPatternFlags">xmlPatternFlags</a>;
+typedef struct _xmlStreamCtxt <a href="#xmlStreamCtxt">xmlStreamCtxt</a>;
+typedef struct _xmlPattern <a href="#xmlPattern">xmlPattern</a>;
+typedef <a href="libxml2-pattern.html#xmlPattern">xmlPattern</a> * <a href="#xmlPatternPtr">xmlPatternPtr</a>;
+int <a href="#xmlPatternMinDepth">xmlPatternMinDepth</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> <a href="#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+int <a href="#xmlPatternFromRoot">xmlPatternFromRoot</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+void <a href="#xmlFreePatternList">xmlFreePatternList</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+int <a href="#xmlPatternStreamable">xmlPatternStreamable</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+int <a href="#xmlStreamPushAttr">xmlStreamPushAttr</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
+int <a href="#xmlPatternMatch">xmlPatternMatch</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt);
+int <a href="#xmlStreamPop">xmlStreamPop</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream);
+void <a href="#xmlFreePattern">xmlFreePattern</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+int <a href="#xmlStreamPush">xmlStreamPush</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
+int <a href="#xmlPatternMaxDepth">xmlPatternMaxDepth</a> (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp);
+<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> <a href="#xmlPatterncompile">xmlPatterncompile</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/> <a href="libxml2-dict.html#xmlDict">xmlDict</a> * dict, <br/> int flags, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces);
+int <a href="#xmlStreamPushNode">xmlStreamPushNode</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> int nodeType);
+void <a href="#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlPattern">Structure </a>xmlPattern</h3><pre class="programlisting">struct _xmlPattern {
+The content of this structure is not made public by the API.
+} xmlPattern;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternFlags">Enum </a>xmlPatternFlags</h3><pre class="programlisting">enum <a href="#xmlPatternFlags">xmlPatternFlags</a> {
+ <a name="XML_PATTERN_DEFAULT">XML_PATTERN_DEFAULT</a> = 0 /* simple pattern match */
+ <a name="XML_PATTERN_XPATH">XML_PATTERN_XPATH</a> = 1 /* standard XPath pattern */
+ <a name="XML_PATTERN_XSSEL">XML_PATTERN_XSSEL</a> = 2 /* XPath subset for schema selector */
+ <a name="XML_PATTERN_XSFIELD">XML_PATTERN_XSFIELD</a> = 4 /* XPath subset for schema field */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternPtr">Typedef </a>xmlPatternPtr</h3><pre class="programlisting"><a href="libxml2-pattern.html#xmlPattern">xmlPattern</a> * xmlPatternPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamCtxt">Structure </a>xmlStreamCtxt</h3><pre class="programlisting">struct _xmlStreamCtxt {
+The content of this structure is not made public by the API.
+} xmlStreamCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamCtxtPtr">Typedef </a>xmlStreamCtxtPtr</h3><pre class="programlisting"><a href="libxml2-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a> * xmlStreamCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreePattern"/>xmlFreePattern ()</h3><pre class="programlisting">void xmlFreePattern (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Free up the memory allocated by @comp</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreePatternList"/>xmlFreePatternList ()</h3><pre class="programlisting">void xmlFreePatternList (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Free up the memory allocated by all the elements of @comp</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeStreamCtxt"/>xmlFreeStreamCtxt ()</h3><pre class="programlisting">void xmlFreeStreamCtxt (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br/>
+</pre><p>Free the stream context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternFromRoot"/>xmlPatternFromRoot ()</h3><pre class="programlisting">int xmlPatternFromRoot (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Check if the pattern must be looked at from the root.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternGetStreamCtxt"/>xmlPatternGetStreamCtxt ()</h3><pre class="programlisting"><a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> xmlPatternGetStreamCtxt (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Get a streaming context for that pattern Use <a href="libxml2-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> to free the context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the context or NULL in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternMatch"/>xmlPatternMatch ()</h3><pre class="programlisting">int xmlPatternMatch (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Test whether the node matches the pattern</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if it doesn't and -1 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternMaxDepth"/>xmlPatternMaxDepth ()</h3><pre class="programlisting">int xmlPatternMaxDepth (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Check the maximum depth reachable by a pattern</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 if no limit (using //), otherwise the depth, and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternMinDepth"/>xmlPatternMinDepth ()</h3><pre class="programlisting">int xmlPatternMinDepth (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Check the minimum depth reachable by a pattern, 0 mean the / or . are part of the set.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error otherwise the depth,</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatternStreamable"/>xmlPatternStreamable ()</h3><pre class="programlisting">int xmlPatternStreamable (<a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br/>
+</pre><p>Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if streamable, 0 if not and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPatterncompile"/>xmlPatterncompile ()</h3><pre class="programlisting"><a href="libxml2-pattern.html#xmlPatternPtr">xmlPatternPtr</a> xmlPatterncompile (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/> <a href="libxml2-dict.html#xmlDict">xmlDict</a> * dict, <br/> int flags, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br/>
+</pre><p>Compile a pattern.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, see <a href="libxml2-pattern.html#xmlPatternFlags">xmlPatternFlags</a></td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled form of the pattern or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamPop"/>xmlStreamPop ()</h3><pre class="programlisting">int xmlStreamPop (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br/>
+</pre><p>push one level from the stream.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamPush"/>xmlStreamPush ()</h3><pre class="programlisting">int xmlStreamPush (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamPushAttr"/>xmlStreamPushAttr ()</h3><pre class="programlisting">int xmlStreamPushAttr (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
+</pre><p>Push new <a href="libxml2-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamPushNode"/>xmlStreamPushNode ()</h3><pre class="programlisting">int xmlStreamPushNode (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> int nodeType)<br/>
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStreamWantsAnyNode"/>xmlStreamWantsAnyNode ()</h3><pre class="programlisting">int xmlStreamWantsAnyNode (<a href="libxml2-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br/>
+</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-relaxng.html b/doc/devhelp/libxml2-relaxng.html
new file mode 100644
index 0000000..23905d0
--- /dev/null
+++ b/doc/devhelp/libxml2-relaxng.html
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>relaxng: implementation of the Relax-NG validation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-pattern.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-schemasInternals.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">relaxng</span>
+ </h2>
+ <p>relaxng - implementation of the Relax-NG validation</p>
+ <p>implementation of the Relax-NG validation </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlRelaxNG <a href="#xmlRelaxNG">xmlRelaxNG</a>;
+typedef <a href="libxml2-relaxng.html#xmlRelaxNG">xmlRelaxNG</a> * <a href="#xmlRelaxNGPtr">xmlRelaxNGPtr</a>;
+typedef enum <a href="#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a>;
+typedef struct _xmlRelaxNGParserCtxt <a href="#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a>;
+typedef <a href="libxml2-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a> * <a href="#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a>;
+typedef enum <a href="#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a>;
+typedef struct _xmlRelaxNGValidCtxt <a href="#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a>;
+typedef <a href="libxml2-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a> * <a href="#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a>;
+void <a href="#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt);
+<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx);
+<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a> (const char * URL);
+int <a href="#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx);
+int <a href="#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> <a href="#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a> (const char * buffer, <br/> int size);
+void <a href="#xmlRelaxNGDump">xmlRelaxNGDump</a> (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void <a href="#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx);
+<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> <a href="#xmlRelaxNGParse">xmlRelaxNGParse</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
+void <a href="#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
+int <a href="#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+typedef void <a href="#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+int <a href="#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+void <a href="#xmlRelaxNGFree">xmlRelaxNGFree</a> (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+int <a href="#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
+void <a href="#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt);
+int <a href="#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx);
+int <a href="#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a> (void);
+void <a href="#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a> (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+void <a href="#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a> (void);
+int <a href="#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a> (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len);
+int <a href="#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a> (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags);
+typedef void <a href="#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNG">Structure </a>xmlRelaxNG</h3><pre class="programlisting">struct _xmlRelaxNG {
+The content of this structure is not made public by the API.
+} xmlRelaxNG;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxt">Structure </a>xmlRelaxNGParserCtxt</h3><pre class="programlisting">struct _xmlRelaxNGParserCtxt {
+The content of this structure is not made public by the API.
+} xmlRelaxNGParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserCtxtPtr">Typedef </a>xmlRelaxNGParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a> * xmlRelaxNGParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParserFlag">Enum </a>xmlRelaxNGParserFlag</h3><pre class="programlisting">enum <a href="#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> {
+ <a name="XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a> = 0
+ <a name="XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a> = 1
+ <a name="XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a> = 2
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGPtr">Typedef </a>xmlRelaxNGPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNG">xmlRelaxNG</a> * xmlRelaxNGPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxt">Structure </a>xmlRelaxNGValidCtxt</h3><pre class="programlisting">struct _xmlRelaxNGValidCtxt {
+The content of this structure is not made public by the API.
+} xmlRelaxNGValidCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidCtxtPtr">Typedef </a>xmlRelaxNGValidCtxtPtr</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a> * xmlRelaxNGValidCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidErr">Enum </a>xmlRelaxNGValidErr</h3><pre class="programlisting">enum <a href="#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a> {
+ <a name="XML_RELAXNG_OK">XML_RELAXNG_OK</a> = 0
+ <a name="XML_RELAXNG_ERR_MEMORY">XML_RELAXNG_ERR_MEMORY</a> = 1
+ <a name="XML_RELAXNG_ERR_TYPE">XML_RELAXNG_ERR_TYPE</a> = 2
+ <a name="XML_RELAXNG_ERR_TYPEVAL">XML_RELAXNG_ERR_TYPEVAL</a> = 3
+ <a name="XML_RELAXNG_ERR_DUPID">XML_RELAXNG_ERR_DUPID</a> = 4
+ <a name="XML_RELAXNG_ERR_TYPECMP">XML_RELAXNG_ERR_TYPECMP</a> = 5
+ <a name="XML_RELAXNG_ERR_NOSTATE">XML_RELAXNG_ERR_NOSTATE</a> = 6
+ <a name="XML_RELAXNG_ERR_NODEFINE">XML_RELAXNG_ERR_NODEFINE</a> = 7
+ <a name="XML_RELAXNG_ERR_LISTEXTRA">XML_RELAXNG_ERR_LISTEXTRA</a> = 8
+ <a name="XML_RELAXNG_ERR_LISTEMPTY">XML_RELAXNG_ERR_LISTEMPTY</a> = 9
+ <a name="XML_RELAXNG_ERR_INTERNODATA">XML_RELAXNG_ERR_INTERNODATA</a> = 10
+ <a name="XML_RELAXNG_ERR_INTERSEQ">XML_RELAXNG_ERR_INTERSEQ</a> = 11
+ <a name="XML_RELAXNG_ERR_INTEREXTRA">XML_RELAXNG_ERR_INTEREXTRA</a> = 12
+ <a name="XML_RELAXNG_ERR_ELEMNAME">XML_RELAXNG_ERR_ELEMNAME</a> = 13
+ <a name="XML_RELAXNG_ERR_ATTRNAME">XML_RELAXNG_ERR_ATTRNAME</a> = 14
+ <a name="XML_RELAXNG_ERR_ELEMNONS">XML_RELAXNG_ERR_ELEMNONS</a> = 15
+ <a name="XML_RELAXNG_ERR_ATTRNONS">XML_RELAXNG_ERR_ATTRNONS</a> = 16
+ <a name="XML_RELAXNG_ERR_ELEMWRONGNS">XML_RELAXNG_ERR_ELEMWRONGNS</a> = 17
+ <a name="XML_RELAXNG_ERR_ATTRWRONGNS">XML_RELAXNG_ERR_ATTRWRONGNS</a> = 18
+ <a name="XML_RELAXNG_ERR_ELEMEXTRANS">XML_RELAXNG_ERR_ELEMEXTRANS</a> = 19
+ <a name="XML_RELAXNG_ERR_ATTREXTRANS">XML_RELAXNG_ERR_ATTREXTRANS</a> = 20
+ <a name="XML_RELAXNG_ERR_ELEMNOTEMPTY">XML_RELAXNG_ERR_ELEMNOTEMPTY</a> = 21
+ <a name="XML_RELAXNG_ERR_NOELEM">XML_RELAXNG_ERR_NOELEM</a> = 22
+ <a name="XML_RELAXNG_ERR_NOTELEM">XML_RELAXNG_ERR_NOTELEM</a> = 23
+ <a name="XML_RELAXNG_ERR_ATTRVALID">XML_RELAXNG_ERR_ATTRVALID</a> = 24
+ <a name="XML_RELAXNG_ERR_CONTENTVALID">XML_RELAXNG_ERR_CONTENTVALID</a> = 25
+ <a name="XML_RELAXNG_ERR_EXTRACONTENT">XML_RELAXNG_ERR_EXTRACONTENT</a> = 26
+ <a name="XML_RELAXNG_ERR_INVALIDATTR">XML_RELAXNG_ERR_INVALIDATTR</a> = 27
+ <a name="XML_RELAXNG_ERR_DATAELEM">XML_RELAXNG_ERR_DATAELEM</a> = 28
+ <a name="XML_RELAXNG_ERR_VALELEM">XML_RELAXNG_ERR_VALELEM</a> = 29
+ <a name="XML_RELAXNG_ERR_LISTELEM">XML_RELAXNG_ERR_LISTELEM</a> = 30
+ <a name="XML_RELAXNG_ERR_DATATYPE">XML_RELAXNG_ERR_DATATYPE</a> = 31
+ <a name="XML_RELAXNG_ERR_VALUE">XML_RELAXNG_ERR_VALUE</a> = 32
+ <a name="XML_RELAXNG_ERR_LIST">XML_RELAXNG_ERR_LIST</a> = 33
+ <a name="XML_RELAXNG_ERR_NOGRAMMAR">XML_RELAXNG_ERR_NOGRAMMAR</a> = 34
+ <a name="XML_RELAXNG_ERR_EXTRADATA">XML_RELAXNG_ERR_EXTRADATA</a> = 35
+ <a name="XML_RELAXNG_ERR_LACKDATA">XML_RELAXNG_ERR_LACKDATA</a> = 36
+ <a name="XML_RELAXNG_ERR_INTERNAL">XML_RELAXNG_ERR_INTERNAL</a> = 37
+ <a name="XML_RELAXNG_ERR_ELEMWRONG">XML_RELAXNG_ERR_ELEMWRONG</a> = 38
+ <a name="XML_RELAXNG_ERR_TEXTWRONG">XML_RELAXNG_ERR_TEXTWRONG</a> = 39
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityErrorFunc"/>Function type xmlRelaxNGValidityErrorFunc</h3><pre class="programlisting">void xmlRelaxNGValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of an error callback from a Relax-NG validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidityWarningFunc"/>Function type xmlRelaxNGValidityWarningFunc</h3><pre class="programlisting">void xmlRelaxNGValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of a warning callback from a Relax-NG validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGCleanupTypes"/>xmlRelaxNGCleanupTypes ()</h3><pre class="programlisting">void xmlRelaxNGCleanupTypes (void)<br/>
+</pre><p>Cleanup the default Schemas type library associated to RelaxNG</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDump"/>xmlRelaxNGDump ()</h3><pre class="programlisting">void xmlRelaxNGDump (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
+</pre><p>Dump a RelaxNG structure back</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGDumpTree"/>xmlRelaxNGDumpTree ()</h3><pre class="programlisting">void xmlRelaxNGDumpTree (FILE * output, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
+</pre><p>Dump the transformed RelaxNG tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFree"/>xmlRelaxNGFree ()</h3><pre class="programlisting">void xmlRelaxNGFree (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
+</pre><p>Deallocate a RelaxNG structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeParserCtxt"/>xmlRelaxNGFreeParserCtxt ()</h3><pre class="programlisting">void xmlRelaxNGFreeParserCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGFreeValidCtxt"/>xmlRelaxNGFreeValidCtxt ()</h3><pre class="programlisting">void xmlRelaxNGFreeValidCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetParserErrors"/>xmlRelaxNGGetParserErrors ()</h3><pre class="programlisting">int xmlRelaxNGGetParserErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
+</pre><p>Get the callback information used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGGetValidErrors"/>xmlRelaxNGGetValidErrors ()</h3><pre class="programlisting">int xmlRelaxNGGetValidErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
+</pre><p>Get the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGInitTypes"/>xmlRelaxNGInitTypes ()</h3><pre class="programlisting">int xmlRelaxNGInitTypes (void)<br/>
+</pre><p>Initilize the default type libraries.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewDocParserCtxt"/>xmlRelaxNGNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewMemParserCtxt"/>xmlRelaxNGNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt (const char * buffer, <br/> int size)<br/>
+</pre><p>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewParserCtxt"/>xmlRelaxNGNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewParserCtxt (const char * URL)<br/>
+</pre><p>Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGNewValidCtxt"/>xmlRelaxNGNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> xmlRelaxNGNewValidCtxt (<a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
+</pre><p>Create an XML RelaxNGs validation context based on the given schema</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGParse"/>xmlRelaxNGParse ()</h3><pre class="programlisting"><a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserErrors"/>xmlRelaxNGSetParserErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetParserErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
+</pre><p>Set the callback functions used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetParserStructuredErrors"/>xmlRelaxNGSetParserStructuredErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetParserStructuredErrors (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
+</pre><p>Set the callback functions used to handle errors for a parsing context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetValidErrors"/>xmlRelaxNGSetValidErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetValidErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
+</pre><p>Set the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGSetValidStructuredErrors"/>xmlRelaxNGSetValidStructuredErrors ()</h3><pre class="programlisting">void xmlRelaxNGSetValidStructuredErrors (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateDoc"/>xmlRelaxNGValidateDoc ()</h3><pre class="programlisting">int xmlRelaxNGValidateDoc (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Validate a document tree in memory.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidateFullElement"/>xmlRelaxNGValidateFullElement ()</h3><pre class="programlisting">int xmlRelaxNGValidateFullElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePopElement"/>xmlRelaxNGValidatePopElement ()</h3><pre class="programlisting">int xmlRelaxNGValidatePopElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Pop the element end from the RelaxNG validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushCData"/>xmlRelaxNGValidatePushCData ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushCData (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len)<br/>
+</pre><p>check the CData parsed for validation in the current stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxNGValidatePushElement"/>xmlRelaxNGValidatePushElement ()</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Push a new element start on the RelaxNG validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRelaxParserSetFlag"/>xmlRelaxParserSetFlag ()</h3><pre class="programlisting">int xmlRelaxParserSetFlag (<a href="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br/> int flags)<br/>
+</pre><p>Semi private function used to pass informations to a parser context which are a combination of <a href="libxml2-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> .</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a RelaxNG parser context</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of flags values</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-schemasInternals.html b/doc/devhelp/libxml2-schemasInternals.html
new file mode 100644
index 0000000..2f9cbc9
--- /dev/null
+++ b/doc/devhelp/libxml2-schemasInternals.html
@@ -0,0 +1,860 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>schemasInternals: internal interfaces for XML Schemas</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-relaxng.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-schematron.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">schemasInternals</span>
+ </h2>
+ <p>schemasInternals - internal interfaces for XML Schemas</p>
+ <p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a>;
+#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a>;
+#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a>;
+#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a>;
+#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a>;
+#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a>;
+#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a>;
+#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a>;
+#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a>;
+#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a>;
+#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a>;
+#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a>;
+#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a>;
+#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a>;
+#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a>;
+#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a>;
+#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a>;
+#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a>;
+#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a>;
+#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a>;
+#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a>;
+#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a>;
+#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a>;
+#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a>;
+#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a>;
+#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a>;
+#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a>;
+#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a>;
+#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a>;
+#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a>;
+#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>;
+#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>;
+#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a>;
+#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a>;
+#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>;
+#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a>;
+#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a>;
+#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>;
+#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a>;
+#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>;
+#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a>;
+#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a>;
+#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a>;
+#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a>;
+#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a>;
+#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a>;
+#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a>;
+#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a>;
+#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a>;
+#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a> * <a href="#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a> * <a href="#xmlSchemaElementPtr">xmlSchemaElementPtr</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaFacetLink">xmlSchemaFacetLink</a> * <a href="#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>;
+typedef struct _xmlSchemaVal <a href="#xmlSchemaVal">xmlSchemaVal</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a> * <a href="#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a>;
+typedef struct _xmlSchemaType <a href="#xmlSchemaType">xmlSchemaType</a>;
+typedef struct _xmlSchemaAnnot <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * <a href="#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>;
+typedef struct _xmlSchemaElement <a href="#xmlSchemaElement">xmlSchemaElement</a>;
+typedef struct _xmlSchemaWildcard <a href="#xmlSchemaWildcard">xmlSchemaWildcard</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a> * <a href="#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaFacet">xmlSchemaFacet</a> * <a href="#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>;
+typedef struct _xmlSchemaTypeLink <a href="#xmlSchemaTypeLink">xmlSchemaTypeLink</a>;
+typedef struct _xmlSchemaAttributeLink <a href="#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaVal">xmlSchemaVal</a> * <a href="#xmlSchemaValPtr">xmlSchemaValPtr</a>;
+typedef struct _xmlSchemaFacetLink <a href="#xmlSchemaFacetLink">xmlSchemaFacetLink</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a> * <a href="#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a>;
+typedef struct _xmlSchemaAttributeGroup <a href="#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a> * <a href="#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>;
+typedef struct _xmlSchemaWildcardNs <a href="#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaAttribute">xmlSchemaAttribute</a> * <a href="#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a> * <a href="#xmlSchemaNotationPtr">xmlSchemaNotationPtr</a>;
+typedef enum <a href="#xmlSchemaValType">xmlSchemaValType</a>;
+typedef <a href="libxml2-schemasInternals.html#xmlSchemaType">xmlSchemaType</a> * <a href="#xmlSchemaTypePtr">xmlSchemaTypePtr</a>;
+typedef struct _xmlSchemaNotation <a href="#xmlSchemaNotation">xmlSchemaNotation</a>;
+typedef struct _xmlSchemaFacet <a href="#xmlSchemaFacet">xmlSchemaFacet</a>;
+typedef enum <a href="#xmlSchemaContentType">xmlSchemaContentType</a>;
+typedef enum <a href="#xmlSchemaTypeType">xmlSchemaTypeType</a>;
+typedef struct _xmlSchemaAttribute <a href="#xmlSchemaAttribute">xmlSchemaAttribute</a>;
+void <a href="#xmlSchemaFreeType">xmlSchemaFreeType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type);
+void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> wildcard);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANYATTR_LAX">Macro </a>XML_SCHEMAS_ANYATTR_LAX</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a>;
+</pre><p>Ignore validation non definition on attributes Obsolete, not used anymore.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANYATTR_SKIP">Macro </a>XML_SCHEMAS_ANYATTR_SKIP</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a>;
+</pre><p>Skip unknown <a href="libxml2-SAX.html#attribute">attribute</a> from validation Obsolete, not used anymore.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANYATTR_STRICT">Macro </a>XML_SCHEMAS_ANYATTR_STRICT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a>;
+</pre><p>Apply strict validation rules on attributes Obsolete, not used anymore.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANY_LAX">Macro </a>XML_SCHEMAS_ANY_LAX</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a>;
+</pre><p>Used by wildcards. Validate if type found, don't worry if not found</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANY_SKIP">Macro </a>XML_SCHEMAS_ANY_SKIP</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a>;
+</pre><p>Skip unknown <a href="libxml2-SAX.html#attribute">attribute</a> from validation</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ANY_STRICT">Macro </a>XML_SCHEMAS_ANY_STRICT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a>;
+</pre><p>Used by wildcards. Apply strict validation rules</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_GLOBAL">Macro </a>XML_SCHEMAS_ATTRGROUP_GLOBAL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a>;
+</pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS">Macro </a>XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a>;
+</pre><p>Whether this attr. group contains attr. group references.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED">Macro </a>XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a>;
+</pre><p>Marks the attr group as marked; used for circular checks.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED">Macro </a>XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a>;
+</pre><p>The attr group was redefined.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">Macro </a>XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a>;
+</pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_FIXED">Macro </a>XML_SCHEMAS_ATTR_FIXED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a>;
+</pre><p>the <a href="libxml2-SAX.html#attribute">attribute</a> has a fixed value</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_GLOBAL">Macro </a>XML_SCHEMAS_ATTR_GLOBAL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a>;
+</pre><p>allow elements in no namespace</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">Macro </a>XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a>;
+</pre><p>this is set when the "type" and "ref" references have been resolved.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_NSDEFAULT">Macro </a>XML_SCHEMAS_ATTR_NSDEFAULT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a>;
+</pre><p>allow elements in no namespace</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_USE_OPTIONAL">Macro </a>XML_SCHEMAS_ATTR_USE_OPTIONAL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a>;
+</pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> is optional.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_USE_PROHIBITED">Macro </a>XML_SCHEMAS_ATTR_USE_PROHIBITED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a>;
+</pre><p>Used by wildcards. The <a href="libxml2-SAX.html#attribute">attribute</a> is prohibited.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ATTR_USE_REQUIRED">Macro </a>XML_SCHEMAS_ATTR_USE_REQUIRED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a>;
+</pre><p>The <a href="libxml2-SAX.html#attribute">attribute</a> is required.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">Macro </a>XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a>;
+</pre><p>the schema has "extension" in the set of blockDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">Macro </a>XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a>;
+</pre><p>the schema has "restriction" in the set of blockDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">Macro </a>XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a>;
+</pre><p>the schema has "substitution" in the set of blockDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_ABSTRACT">Macro </a>XML_SCHEMAS_ELEM_ABSTRACT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a>;
+</pre><p>the element is abstract</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_BLOCK_ABSENT">Macro </a>XML_SCHEMAS_ELEM_BLOCK_ABSENT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a>;
+</pre><p>the "block" <a href="libxml2-SAX.html#attribute">attribute</a> is absent</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_BLOCK_EXTENSION">Macro </a>XML_SCHEMAS_ELEM_BLOCK_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a>;
+</pre><p>disallowed substitutions are absent</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">Macro </a>XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a>;
+</pre><p>disallowed substitutions: "restriction"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">Macro </a>XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a>;
+</pre><p>disallowed substitutions: "substituion"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_CIRCULAR">Macro </a>XML_SCHEMAS_ELEM_CIRCULAR</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a>;
+</pre><p>a helper flag for the search of circular references.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_DEFAULT">Macro </a>XML_SCHEMAS_ELEM_DEFAULT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a>;
+</pre><p>the element has a default value</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_FINAL_ABSENT">Macro </a>XML_SCHEMAS_ELEM_FINAL_ABSENT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a>;
+</pre><p>substitution group exclusions are absent</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_FINAL_EXTENSION">Macro </a>XML_SCHEMAS_ELEM_FINAL_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a>;
+</pre><p>substitution group exclusions: "extension"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_FINAL_RESTRICTION">Macro </a>XML_SCHEMAS_ELEM_FINAL_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a>;
+</pre><p>substitution group exclusions: "restriction"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_FIXED">Macro </a>XML_SCHEMAS_ELEM_FIXED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a>;
+</pre><p>the element has a fixed value</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_GLOBAL">Macro </a>XML_SCHEMAS_ELEM_GLOBAL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a>;
+</pre><p>the element is global</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_INTERNAL_CHECKED">Macro </a>XML_SCHEMAS_ELEM_INTERNAL_CHECKED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a>;
+</pre><p>this is set when the elem decl has been checked against all constraints</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">Macro </a>XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a>;
+</pre><p>this is set when "type", "ref", "substitutionGroup" references have been resolved.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_NILLABLE">Macro </a>XML_SCHEMAS_ELEM_NILLABLE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a>;
+</pre><p>the element is nillable</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_NSDEFAULT">Macro </a>XML_SCHEMAS_ELEM_NSDEFAULT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a>;
+</pre><p>allow elements in no namespace Obsolete, not used anymore.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_REF">Macro </a>XML_SCHEMAS_ELEM_REF</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a>;
+</pre><p>the element is a <a href="libxml2-SAX.html#reference">reference</a> to a type</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">Macro </a>XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a>;
+</pre><p>the declaration is a substitution group head</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_ELEM_TOPLEVEL">Macro </a>XML_SCHEMAS_ELEM_TOPLEVEL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a>;
+</pre><p>the element is top level obsolete: use <a href="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a> instead</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FACET_COLLAPSE">Macro </a>XML_SCHEMAS_FACET_COLLAPSE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a>;
+</pre><p>collapse the types of the facet</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FACET_PRESERVE">Macro </a>XML_SCHEMAS_FACET_PRESERVE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a>;
+</pre><p>preserve the type of the facet</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FACET_REPLACE">Macro </a>XML_SCHEMAS_FACET_REPLACE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a>;
+</pre><p>replace the type of the facet</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FACET_UNKNOWN">Macro </a>XML_SCHEMAS_FACET_UNKNOWN</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a>;
+</pre><p>unknown facet handling</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">Macro </a>XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a>;
+</pre><p>the schema has "extension" in the set of finalDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FINAL_DEFAULT_LIST">Macro </a>XML_SCHEMAS_FINAL_DEFAULT_LIST</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a>;
+</pre><p>the cshema has "list" in the set of finalDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">Macro </a>XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a>;
+</pre><p>the schema has "restriction" in the set of finalDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_FINAL_DEFAULT_UNION">Macro </a>XML_SCHEMAS_FINAL_DEFAULT_UNION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a>;
+</pre><p>the schema has "union" in the set of finalDefault.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_INCLUDING_CONVERT_NS">Macro </a>XML_SCHEMAS_INCLUDING_CONVERT_NS</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a>;
+</pre><p>the schema is currently including an other schema with no target namespace.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_QUALIF_ATTR">Macro </a>XML_SCHEMAS_QUALIF_ATTR</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a>;
+</pre><p>Reflects attributeFormDefault == qualified in an XML schema document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_QUALIF_ELEM">Macro </a>XML_SCHEMAS_QUALIF_ELEM</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a>;
+</pre><p>Reflects elementFormDefault == qualified in an XML schema document.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_ABSTRACT">Macro </a>XML_SCHEMAS_TYPE_ABSTRACT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a>;
+</pre><p>the simple/complexType is abstract.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_BLOCK_DEFAULT">Macro </a>XML_SCHEMAS_TYPE_BLOCK_DEFAULT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a>;
+</pre><p>the complexType did not specify 'block' so use the default of the &lt;schema&gt; item.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_BLOCK_EXTENSION">Macro </a>XML_SCHEMAS_TYPE_BLOCK_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a>;
+</pre><p>the complexType has a 'block' of "extension".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">Macro </a>XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a>;
+</pre><p>the complexType has a 'block' of "restriction".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">Macro </a>XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a>;
+</pre><p>Marks the item as a builtin primitive.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">Macro </a>XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a>;
+</pre><p>the simple or complex type has a derivation method of "extension".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">Macro </a>XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a>;
+</pre><p>the simple or complex type has a derivation method of "restriction".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FACETSNEEDVALUE">Macro </a>XML_SCHEMAS_TYPE_FACETSNEEDVALUE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a>;
+</pre><p>indicates if the facets need a computed value</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FINAL_DEFAULT">Macro </a>XML_SCHEMAS_TYPE_FINAL_DEFAULT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a>;
+</pre><p>the simpleType has a final of "default".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FINAL_EXTENSION">Macro </a>XML_SCHEMAS_TYPE_FINAL_EXTENSION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a>;
+</pre><p>the complexType has a final of "extension".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FINAL_LIST">Macro </a>XML_SCHEMAS_TYPE_FINAL_LIST</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a>;
+</pre><p>the simpleType has a final of "list".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FINAL_RESTRICTION">Macro </a>XML_SCHEMAS_TYPE_FINAL_RESTRICTION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a>;
+</pre><p>the simpleType/complexType has a final of "restriction".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FINAL_UNION">Macro </a>XML_SCHEMAS_TYPE_FINAL_UNION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a>;
+</pre><p>the simpleType has a final of "union".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_FIXUP_1">Macro </a>XML_SCHEMAS_TYPE_FIXUP_1</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a>;
+</pre><p>First stage of fixup was done.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_GLOBAL">Macro </a>XML_SCHEMAS_TYPE_GLOBAL</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a>;
+</pre><p>the type is global</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_HAS_FACETS">Macro </a>XML_SCHEMAS_TYPE_HAS_FACETS</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a>;
+</pre><p>has facets</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_INTERNAL_INVALID">Macro </a>XML_SCHEMAS_TYPE_INTERNAL_INVALID</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a>;
+</pre><p>indicates that the type is invalid</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">Macro </a>XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a>;
+</pre><p>indicates that the type was typefixed</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_MARKED">Macro </a>XML_SCHEMAS_TYPE_MARKED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a>;
+</pre><p>Marks the item as marked; used for circular checks.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_MIXED">Macro </a>XML_SCHEMAS_TYPE_MIXED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a>;
+</pre><p>the element content type is mixed</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_NORMVALUENEEDED">Macro </a>XML_SCHEMAS_TYPE_NORMVALUENEEDED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a>;
+</pre><p>indicates if the facets (pattern) need a normalized value</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">Macro </a>XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a>;
+</pre><p>the complexType owns an <a href="libxml2-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_REDEFINED">Macro </a>XML_SCHEMAS_TYPE_REDEFINED</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a>;
+</pre><p>The type was redefined.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a>;
+</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC">Macro </a>XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a>;
+</pre><p>the simpleType has a variety of "union".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_LIST">Macro </a>XML_SCHEMAS_TYPE_VARIETY_LIST</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a>;
+</pre><p>the simpleType has a variety of "list".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_VARIETY_UNION">Macro </a>XML_SCHEMAS_TYPE_VARIETY_UNION</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a>;
+</pre><p>the simpleType has a variety of "union".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">Macro </a>XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a>;
+</pre><p>a whitespace-facet value of "collapse"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">Macro </a>XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a>;
+</pre><p>a whitespace-facet value of "preserve"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">Macro </a>XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a>;
+</pre><p>a whitespace-facet value of "replace"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_SCHEMAS_WILDCARD_COMPLETE">Macro </a>XML_SCHEMAS_WILDCARD_COMPLETE</h3><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a>;
+</pre><p>If the wildcard is complete.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAnnot">Structure </a>xmlSchemaAnnot</h3><pre class="programlisting">struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot * next
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> content : the annotation
+} xmlSchemaAnnot;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAnnotPtr">Typedef </a>xmlSchemaAnnotPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * xmlSchemaAnnotPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttribute">Structure </a>xmlSchemaAttribute</h3><pre class="programlisting">struct _xmlSchemaAttribute {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type
+ struct _xmlSchemaAttribute * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> (not used?)
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the declaration
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * typeName : the local name of the type definition
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * typeNs : the ns URI of the type definition
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : Deprecated; not used
+ int occurs : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defValue : The initial value of the value constraint
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ int flags
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value constraint
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl : Deprecated; not used
+} xmlSchemaAttribute;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttributeGroup">Structure </a>xmlSchemaAttributeGroup</h3><pre class="programlisting">struct _xmlSchemaAttributeGroup {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaAttribute * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> if in a group ...
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int flags
+ <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ void * attrUses
+} xmlSchemaAttributeGroup;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttributeGroupPtr">Typedef </a>xmlSchemaAttributeGroupPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a> * xmlSchemaAttributeGroupPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttributeLink">Structure </a>xmlSchemaAttributeLink</h3><pre class="programlisting">struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink * next : the next <a href="libxml2-SAX.html#attribute">attribute</a> link ...
+ struct _xmlSchemaAttribute * attr : the linked <a href="libxml2-SAX.html#attribute">attribute</a>
+} xmlSchemaAttributeLink;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttributeLinkPtr">Typedef </a>xmlSchemaAttributeLinkPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a> * xmlSchemaAttributeLinkPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaAttributePtr">Typedef </a>xmlSchemaAttributePtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaAttribute">xmlSchemaAttribute</a> * xmlSchemaAttributePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaContentType">Enum </a>xmlSchemaContentType</h3><pre class="programlisting">enum <a href="#xmlSchemaContentType">xmlSchemaContentType</a> {
+ <a name="XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a> = 0
+ <a name="XML_SCHEMA_CONTENT_EMPTY">XML_SCHEMA_CONTENT_EMPTY</a> = 1
+ <a name="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2
+ <a name="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3
+ <a name="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4
+ <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 /* Obsolete */
+ <a name="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6
+ <a name="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaElement">Structure </a>xmlSchemaElement</h3><pre class="programlisting">struct _xmlSchemaElement {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaType * next : Not used?
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int flags
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namedType
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namedTypeNs
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * substGroup
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * substGroupNs
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * scope
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The original value of the value constraint.
+ struct _xmlSchemaElement * refDecl : This will now be used for the substitution group affiliation
+ <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Obsolete for WXS, maybe used for RelaxNG
+ <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value contraint.
+ void * idcs : The identity-constraint defs
+} xmlSchemaElement;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaElementPtr">Typedef </a>xmlSchemaElementPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a> * xmlSchemaElementPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacet">Structure </a>xmlSchemaFacet</h3><pre class="programlisting">struct _xmlSchemaFacet {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaFacet * next : the next type if in a sequence ...
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The original value
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int fixed : XML_SCHEMAS_FACET_PRESERVE, etc.
+ int whitespace
+ <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val : The compiled value
+ <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp : The regex for patterns
+} xmlSchemaFacet;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacetLink">Structure </a>xmlSchemaFacetLink</h3><pre class="programlisting">struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink * next : the next facet link ...
+ <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet : the linked facet
+} xmlSchemaFacetLink;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacetLinkPtr">Typedef </a>xmlSchemaFacetLinkPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaFacetLink">xmlSchemaFacetLink</a> * xmlSchemaFacetLinkPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFacetPtr">Typedef </a>xmlSchemaFacetPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaFacet">xmlSchemaFacet</a> * xmlSchemaFacetPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNotation">Structure </a>xmlSchemaNotation</h3><pre class="programlisting">struct _xmlSchemaNotation {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * identifier
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+} xmlSchemaNotation;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNotationPtr">Typedef </a>xmlSchemaNotationPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a> * xmlSchemaNotationPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaType">Structure </a>xmlSchemaType</h3><pre class="programlisting">struct _xmlSchemaType {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaType * next : the next type if in a sequence ...
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int flags
+ <a href="libxml2-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : Base type's local name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * baseNs : Base type's target namespace
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType : The base type component
+ <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets : Local facets
+ struct _xmlSchemaType * redef : Deprecated; not used
+ int recurse : Obsolete
+ <a href="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> * attributeUses : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard
+ int builtInType : Type of built-in types.
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes : member-types if a union type.
+ <a href="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet : All facets (incl. inherited)
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef : Used for the simple content of complex types. Could we use @subtypes
+ <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Holds the automaton of the content model
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ void * attrUses
+} xmlSchemaType;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypeLink">Structure </a>xmlSchemaTypeLink</h3><pre class="programlisting">struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink * next : the next type link ...
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked type
+} xmlSchemaTypeLink;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypeLinkPtr">Typedef </a>xmlSchemaTypeLinkPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a> * xmlSchemaTypeLinkPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypePtr">Typedef </a>xmlSchemaTypePtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaType">xmlSchemaType</a> * xmlSchemaTypePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaTypeType">Enum </a>xmlSchemaTypeType</h3><pre class="programlisting">enum <a href="#xmlSchemaTypeType">xmlSchemaTypeType</a> {
+ <a name="XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a> = 1 /* A built-in datatype */
+ <a name="XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a> = 2
+ <a name="XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a> = 3
+ <a name="XML_SCHEMA_TYPE_SIMPLE">XML_SCHEMA_TYPE_SIMPLE</a> = 4
+ <a name="XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a> = 5
+ <a name="XML_SCHEMA_TYPE_SEQUENCE">XML_SCHEMA_TYPE_SEQUENCE</a> = 6
+ <a name="XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a> = 7
+ <a name="XML_SCHEMA_TYPE_ALL">XML_SCHEMA_TYPE_ALL</a> = 8
+ <a name="XML_SCHEMA_TYPE_SIMPLE_CONTENT">XML_SCHEMA_TYPE_SIMPLE_CONTENT</a> = 9
+ <a name="XML_SCHEMA_TYPE_COMPLEX_CONTENT">XML_SCHEMA_TYPE_COMPLEX_CONTENT</a> = 10
+ <a name="XML_SCHEMA_TYPE_UR">XML_SCHEMA_TYPE_UR</a> = 11
+ <a name="XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a> = 12
+ <a name="XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a> = 13
+ <a name="XML_SCHEMA_TYPE_ELEMENT">XML_SCHEMA_TYPE_ELEMENT</a> = 14
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a> = 15
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a> = 16
+ <a name="XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a> = 17
+ <a name="XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a> = 18
+ <a name="XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a> = 19
+ <a name="XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a> = 20
+ <a name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a> = 21
+ <a name="XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a> = 22
+ <a name="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23
+ <a name="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24
+ <a name="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26
+ <a name="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000
+ <a name="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001
+ <a name="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002
+ <a name="XML_SCHEMA_FACET_MAXEXCLUSIVE">XML_SCHEMA_FACET_MAXEXCLUSIVE</a> = 1003
+ <a name="XML_SCHEMA_FACET_TOTALDIGITS">XML_SCHEMA_FACET_TOTALDIGITS</a> = 1004
+ <a name="XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a> = 1005
+ <a name="XML_SCHEMA_FACET_PATTERN">XML_SCHEMA_FACET_PATTERN</a> = 1006
+ <a name="XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a> = 1007
+ <a name="XML_SCHEMA_FACET_WHITESPACE">XML_SCHEMA_FACET_WHITESPACE</a> = 1008
+ <a name="XML_SCHEMA_FACET_LENGTH">XML_SCHEMA_FACET_LENGTH</a> = 1009
+ <a name="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010
+ <a name="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011
+ <a name="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000
+ <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaVal">Structure </a>xmlSchemaVal</h3><pre class="programlisting">struct _xmlSchemaVal {
+The content of this structure is not made public by the API.
+} xmlSchemaVal;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValPtr">Typedef </a>xmlSchemaValPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaVal">xmlSchemaVal</a> * xmlSchemaValPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValType">Enum </a>xmlSchemaValType</h3><pre class="programlisting">enum <a href="#xmlSchemaValType">xmlSchemaValType</a> {
+ <a name="XML_SCHEMAS_UNKNOWN">XML_SCHEMAS_UNKNOWN</a> = 0
+ <a name="XML_SCHEMAS_STRING">XML_SCHEMAS_STRING</a> = 1
+ <a name="XML_SCHEMAS_NORMSTRING">XML_SCHEMAS_NORMSTRING</a> = 2
+ <a name="XML_SCHEMAS_DECIMAL">XML_SCHEMAS_DECIMAL</a> = 3
+ <a name="XML_SCHEMAS_TIME">XML_SCHEMAS_TIME</a> = 4
+ <a name="XML_SCHEMAS_GDAY">XML_SCHEMAS_GDAY</a> = 5
+ <a name="XML_SCHEMAS_GMONTH">XML_SCHEMAS_GMONTH</a> = 6
+ <a name="XML_SCHEMAS_GMONTHDAY">XML_SCHEMAS_GMONTHDAY</a> = 7
+ <a name="XML_SCHEMAS_GYEAR">XML_SCHEMAS_GYEAR</a> = 8
+ <a name="XML_SCHEMAS_GYEARMONTH">XML_SCHEMAS_GYEARMONTH</a> = 9
+ <a name="XML_SCHEMAS_DATE">XML_SCHEMAS_DATE</a> = 10
+ <a name="XML_SCHEMAS_DATETIME">XML_SCHEMAS_DATETIME</a> = 11
+ <a name="XML_SCHEMAS_DURATION">XML_SCHEMAS_DURATION</a> = 12
+ <a name="XML_SCHEMAS_FLOAT">XML_SCHEMAS_FLOAT</a> = 13
+ <a name="XML_SCHEMAS_DOUBLE">XML_SCHEMAS_DOUBLE</a> = 14
+ <a name="XML_SCHEMAS_BOOLEAN">XML_SCHEMAS_BOOLEAN</a> = 15
+ <a name="XML_SCHEMAS_TOKEN">XML_SCHEMAS_TOKEN</a> = 16
+ <a name="XML_SCHEMAS_LANGUAGE">XML_SCHEMAS_LANGUAGE</a> = 17
+ <a name="XML_SCHEMAS_NMTOKEN">XML_SCHEMAS_NMTOKEN</a> = 18
+ <a name="XML_SCHEMAS_NMTOKENS">XML_SCHEMAS_NMTOKENS</a> = 19
+ <a name="XML_SCHEMAS_NAME">XML_SCHEMAS_NAME</a> = 20
+ <a name="XML_SCHEMAS_QNAME">XML_SCHEMAS_QNAME</a> = 21
+ <a name="XML_SCHEMAS_NCNAME">XML_SCHEMAS_NCNAME</a> = 22
+ <a name="XML_SCHEMAS_ID">XML_SCHEMAS_ID</a> = 23
+ <a name="XML_SCHEMAS_IDREF">XML_SCHEMAS_IDREF</a> = 24
+ <a name="XML_SCHEMAS_IDREFS">XML_SCHEMAS_IDREFS</a> = 25
+ <a name="XML_SCHEMAS_ENTITY">XML_SCHEMAS_ENTITY</a> = 26
+ <a name="XML_SCHEMAS_ENTITIES">XML_SCHEMAS_ENTITIES</a> = 27
+ <a name="XML_SCHEMAS_NOTATION">XML_SCHEMAS_NOTATION</a> = 28
+ <a name="XML_SCHEMAS_ANYURI">XML_SCHEMAS_ANYURI</a> = 29
+ <a name="XML_SCHEMAS_INTEGER">XML_SCHEMAS_INTEGER</a> = 30
+ <a name="XML_SCHEMAS_NPINTEGER">XML_SCHEMAS_NPINTEGER</a> = 31
+ <a name="XML_SCHEMAS_NINTEGER">XML_SCHEMAS_NINTEGER</a> = 32
+ <a name="XML_SCHEMAS_NNINTEGER">XML_SCHEMAS_NNINTEGER</a> = 33
+ <a name="XML_SCHEMAS_PINTEGER">XML_SCHEMAS_PINTEGER</a> = 34
+ <a name="XML_SCHEMAS_INT">XML_SCHEMAS_INT</a> = 35
+ <a name="XML_SCHEMAS_UINT">XML_SCHEMAS_UINT</a> = 36
+ <a name="XML_SCHEMAS_LONG">XML_SCHEMAS_LONG</a> = 37
+ <a name="XML_SCHEMAS_ULONG">XML_SCHEMAS_ULONG</a> = 38
+ <a name="XML_SCHEMAS_SHORT">XML_SCHEMAS_SHORT</a> = 39
+ <a name="XML_SCHEMAS_USHORT">XML_SCHEMAS_USHORT</a> = 40
+ <a name="XML_SCHEMAS_BYTE">XML_SCHEMAS_BYTE</a> = 41
+ <a name="XML_SCHEMAS_UBYTE">XML_SCHEMAS_UBYTE</a> = 42
+ <a name="XML_SCHEMAS_HEXBINARY">XML_SCHEMAS_HEXBINARY</a> = 43
+ <a name="XML_SCHEMAS_BASE64BINARY">XML_SCHEMAS_BASE64BINARY</a> = 44
+ <a name="XML_SCHEMAS_ANYTYPE">XML_SCHEMAS_ANYTYPE</a> = 45
+ <a name="XML_SCHEMAS_ANYSIMPLETYPE">XML_SCHEMAS_ANYSIMPLETYPE</a> = 46
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcard">Structure </a>xmlSchemaWildcard</h3><pre class="programlisting">struct _xmlSchemaWildcard {
+ <a href="libxml2-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int processContents
+ int any : Indicates if the ns constraint is of ##any
+ <a href="libxml2-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> nsSet : The list of allowed namespaces
+ <a href="libxml2-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> negNsSet : The negated namespace
+ int flags
+} xmlSchemaWildcard;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcardNs">Structure </a>xmlSchemaWildcardNs</h3><pre class="programlisting">struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs * next : the next constraint link ...
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : the value
+} xmlSchemaWildcardNs;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcardNsPtr">Typedef </a>xmlSchemaWildcardNsPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a> * xmlSchemaWildcardNsPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWildcardPtr">Typedef </a>xmlSchemaWildcardPtr</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a> * xmlSchemaWildcardPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeType"/>xmlSchemaFreeType ()</h3><pre class="programlisting">void xmlSchemaFreeType (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br/>
+</pre><p>Deallocate a Schema Type structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>a schema type structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeWildcard"/>xmlSchemaFreeWildcard ()</h3><pre class="programlisting">void xmlSchemaFreeWildcard (<a href="libxml2-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> wildcard)<br/>
+</pre><p>Deallocates a wildcard structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>wildcard</tt></i>:</span></td><td>a wildcard structure</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-schematron.html b/doc/devhelp/libxml2-schematron.html
new file mode 100644
index 0000000..c99e33e
--- /dev/null
+++ b/doc/devhelp/libxml2-schematron.html
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>schematron: XML Schemastron implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-schemasInternals.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-threads.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">schematron</span>
+ </h2>
+ <p>schematron - XML Schemastron implementation</p>
+ <p>interface to the XML Schematron validity checking. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlSchematronValidCtxt <a href="#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a>;
+typedef enum <a href="#xmlSchematronValidOptions">xmlSchematronValidOptions</a>;
+typedef <a href="libxml2-schematron.html#xmlSchematron">xmlSchematron</a> * <a href="#xmlSchematronPtr">xmlSchematronPtr</a>;
+typedef struct _xmlSchematronParserCtxt <a href="#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a>;
+typedef struct _xmlSchematron <a href="#xmlSchematron">xmlSchematron</a>;
+typedef <a href="libxml2-schematron.html#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a> * <a href="#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a>;
+typedef <a href="libxml2-schematron.html#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a> * <a href="#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a>;
+int <a href="#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a> (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance);
+void <a href="#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a> (<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt);
+<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a> (const char * buffer, <br/> int size);
+typedef void <a href="#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a> (const char * URL);
+typedef void <a href="#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlSchematronFree">xmlSchematronFree</a> (<a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema);
+void <a href="#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a> (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
+void <a href="#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a> (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt);
+<a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> <a href="#xmlSchematronParse">xmlSchematronParse</a> (<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt);
+<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> <a href="#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a> (<a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema, <br/> int options);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematron">Structure </a>xmlSchematron</h3><pre class="programlisting">struct _xmlSchematron {
+The content of this structure is not made public by the API.
+} xmlSchematron;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronParserCtxt">Structure </a>xmlSchematronParserCtxt</h3><pre class="programlisting">struct _xmlSchematronParserCtxt {
+The content of this structure is not made public by the API.
+} xmlSchematronParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronParserCtxtPtr">Typedef </a>xmlSchematronParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a> * xmlSchematronParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronPtr">Typedef </a>xmlSchematronPtr</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematron">xmlSchematron</a> * xmlSchematronPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidCtxt">Structure </a>xmlSchematronValidCtxt</h3><pre class="programlisting">struct _xmlSchematronValidCtxt {
+The content of this structure is not made public by the API.
+} xmlSchematronValidCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidCtxtPtr">Typedef </a>xmlSchematronValidCtxtPtr</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a> * xmlSchematronValidCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidOptions">Enum </a>xmlSchematronValidOptions</h3><pre class="programlisting">enum <a href="#xmlSchematronValidOptions">xmlSchematronValidOptions</a> {
+ <a name="XML_SCHEMATRON_OUT_QUIET">XML_SCHEMATRON_OUT_QUIET</a> = 1 /* quiet no report */
+ <a name="XML_SCHEMATRON_OUT_TEXT">XML_SCHEMATRON_OUT_TEXT</a> = 2 /* build a textual report */
+ <a name="XML_SCHEMATRON_OUT_XML">XML_SCHEMATRON_OUT_XML</a> = 4 /* output SVRL */
+ <a name="XML_SCHEMATRON_OUT_ERROR">XML_SCHEMATRON_OUT_ERROR</a> = 8 /* output via xmlStructuredErrorFunc */
+ <a name="XML_SCHEMATRON_OUT_FILE">XML_SCHEMATRON_OUT_FILE</a> = 256 /* output to a file descriptor */
+ <a name="XML_SCHEMATRON_OUT_BUFFER">XML_SCHEMATRON_OUT_BUFFER</a> = 512 /* output to a buffer */
+ <a name="XML_SCHEMATRON_OUT_IO">XML_SCHEMATRON_OUT_IO</a> = 1024 /* output to I/O mechanism */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidityErrorFunc"/>Function type xmlSchematronValidityErrorFunc</h3><pre class="programlisting">void xmlSchematronValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of an error callback from a Schematron validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidityWarningFunc"/>Function type xmlSchematronValidityWarningFunc</h3><pre class="programlisting">void xmlSchematronValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of a warning callback from a Schematron validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronFree"/>xmlSchematronFree ()</h3><pre class="programlisting">void xmlSchematronFree (<a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema)<br/>
+</pre><p>Deallocate a Schematron structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronFreeParserCtxt"/>xmlSchematronFreeParserCtxt ()</h3><pre class="programlisting">void xmlSchematronFreeParserCtxt (<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronFreeValidCtxt"/>xmlSchematronFreeValidCtxt ()</h3><pre class="programlisting">void xmlSchematronFreeValidCtxt (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronNewDocParserCtxt"/>xmlSchematronNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewDocParserCtxt (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronNewMemParserCtxt"/>xmlSchematronNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewMemParserCtxt (const char * buffer, <br/> int size)<br/>
+</pre><p>Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronNewParserCtxt"/>xmlSchematronNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewParserCtxt (const char * URL)<br/>
+</pre><p>Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronNewValidCtxt"/>xmlSchematronNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> xmlSchematronNewValidCtxt (<a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema, <br/> int options)<br/>
+</pre><p>Create an XML Schematrons validation context based on the given schema.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schematrons</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml2-schematron.html#xmlSchematronValidOptions">xmlSchematronValidOptions</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronParse"/>xmlSchematronParse ()</h3><pre class="programlisting"><a href="libxml2-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> xmlSchematronParse (<a href="libxml2-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schematron structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronSetValidStructuredErrors"/>xmlSchematronSetValidStructuredErrors ()</h3><pre class="programlisting">void xmlSchematronSetValidStructuredErrors (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Schematron validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchematronValidateDoc"/>xmlSchematronValidateDoc ()</h3><pre class="programlisting">int xmlSchematronValidateDoc (<a href="libxml2-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br/>
+</pre><p>Validate a tree instance against the schematron</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td>the document instace tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of internal error and an error count otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-threads.html b/doc/devhelp/libxml2-threads.html
new file mode 100644
index 0000000..0ddd0bc
--- /dev/null
+++ b/doc/devhelp/libxml2-threads.html
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>threads: interfaces for thread handling</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-schematron.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-tree.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">threads</span>
+ </h2>
+ <p>threads - interfaces for thread handling</p>
+ <p>set of generic threading related routines should work with pthreads, Windows native or TLS threads </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlMutex <a href="#xmlMutex">xmlMutex</a>;
+typedef struct _xmlRMutex <a href="#xmlRMutex">xmlRMutex</a>;
+typedef <a href="libxml2-threads.html#xmlRMutex">xmlRMutex</a> * <a href="#xmlRMutexPtr">xmlRMutexPtr</a>;
+typedef <a href="libxml2-threads.html#xmlMutex">xmlMutex</a> * <a href="#xmlMutexPtr">xmlMutexPtr</a>;
+void <a href="#xmlFreeRMutex">xmlFreeRMutex</a> (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
+int <a href="#xmlGetThreadId">xmlGetThreadId</a> (void);
+void <a href="#xmlMutexUnlock">xmlMutexUnlock</a> (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
+void <a href="#xmlCleanupThreads">xmlCleanupThreads</a> (void);
+void <a href="#xmlLockLibrary">xmlLockLibrary</a> (void);
+<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> <a href="#xmlNewRMutex">xmlNewRMutex</a> (void);
+void <a href="#xmlMutexLock">xmlMutexLock</a> (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
+int <a href="#xmlIsMainThread">xmlIsMainThread</a> (void);
+void <a href="#xmlRMutexUnlock">xmlRMutexUnlock</a> (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
+<a href="libxml2-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> <a href="#xmlGetGlobalState">xmlGetGlobalState</a> (void);
+<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> <a href="#xmlNewMutex">xmlNewMutex</a> (void);
+int <a href="#xmlDllMain">xmlDllMain</a> (void * hinstDLL, <br/> unsigned long fdwReason, <br/> void * lpvReserved);
+void <a href="#xmlFreeMutex">xmlFreeMutex</a> (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok);
+void <a href="#xmlUnlockLibrary">xmlUnlockLibrary</a> (void);
+void <a href="#xmlInitThreads">xmlInitThreads</a> (void);
+void <a href="#xmlRMutexLock">xmlRMutexLock</a> (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlMutex">Structure </a>xmlMutex</h3><pre class="programlisting">struct _xmlMutex {
+The content of this structure is not made public by the API.
+} xmlMutex;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMutexPtr">Typedef </a>xmlMutexPtr</h3><pre class="programlisting"><a href="libxml2-threads.html#xmlMutex">xmlMutex</a> * xmlMutexPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRMutex">Structure </a>xmlRMutex</h3><pre class="programlisting">struct _xmlRMutex {
+The content of this structure is not made public by the API.
+} xmlRMutex;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRMutexPtr">Typedef </a>xmlRMutexPtr</h3><pre class="programlisting"><a href="libxml2-threads.html#xmlRMutex">xmlRMutex</a> * xmlRMutexPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupThreads"/>xmlCleanupThreads ()</h3><pre class="programlisting">void xmlCleanupThreads (void)<br/>
+</pre><p>xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDllMain"/>xmlDllMain ()</h3><pre class="programlisting">int xmlDllMain (void * hinstDLL, <br/> unsigned long fdwReason, <br/> void * lpvReserved)<br/>
+</pre><p/>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>hinstDLL</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>fdwReason</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>lpvReserved</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeMutex"/>xmlFreeMutex ()</h3><pre class="programlisting">void xmlFreeMutex (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br/>
+</pre><p>xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeRMutex"/>xmlFreeRMutex ()</h3><pre class="programlisting">void xmlFreeRMutex (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br/>
+</pre><p>xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetGlobalState"/>xmlGetGlobalState ()</h3><pre class="programlisting"><a href="libxml2-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> xmlGetGlobalState (void)<br/>
+</pre><p>xmlGetGlobalState() is called to retrieve the global state for a thread.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the thread global state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetThreadId"/>xmlGetThreadId ()</h3><pre class="programlisting">int xmlGetThreadId (void)<br/>
+</pre><p>xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current thread ID number</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitThreads"/>xmlInitThreads ()</h3><pre class="programlisting">void xmlInitThreads (void)<br/>
+</pre><p>xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsMainThread"/>xmlIsMainThread ()</h3><pre class="programlisting">int xmlIsMainThread (void)<br/>
+</pre><p>xmlIsMainThread() check whether the current thread is the main thread.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current thread is the main thread, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLockLibrary"/>xmlLockLibrary ()</h3><pre class="programlisting">void xmlLockLibrary (void)<br/>
+</pre><p>xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMutexLock"/>xmlMutexLock ()</h3><pre class="programlisting">void xmlMutexLock (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br/>
+</pre><p>xmlMutexLock() is used to lock a libxml2 token.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMutexUnlock"/>xmlMutexUnlock ()</h3><pre class="programlisting">void xmlMutexUnlock (<a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br/>
+</pre><p>xmlMutexUnlock() is used to unlock a libxml2 token.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewMutex"/>xmlNewMutex ()</h3><pre class="programlisting"><a href="libxml2-threads.html#xmlMutexPtr">xmlMutexPtr</a> xmlNewMutex (void)<br/>
+</pre><p>xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new simple mutex pointer or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewRMutex"/>xmlNewRMutex ()</h3><pre class="programlisting"><a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> xmlNewRMutex (void)<br/>
+</pre><p>xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reentrant mutex pointer or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRMutexLock"/>xmlRMutexLock ()</h3><pre class="programlisting">void xmlRMutexLock (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br/>
+</pre><p>xmlRMutexLock() is used to lock a libxml2 token_r.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRMutexUnlock"/>xmlRMutexUnlock ()</h3><pre class="programlisting">void xmlRMutexUnlock (<a href="libxml2-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br/>
+</pre><p>xmlRMutexUnlock() is used to unlock a libxml2 token_r.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUnlockLibrary"/>xmlUnlockLibrary ()</h3><pre class="programlisting">void xmlUnlockLibrary (void)<br/>
+</pre><p>xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.</p>
+</div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html
new file mode 100644
index 0000000..3cc28c7
--- /dev/null
+++ b/doc/devhelp/libxml2-tree.html
@@ -0,0 +1,1597 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>tree: interfaces for tree manipulation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-threads.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-uri.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">tree</span>
+ </h2>
+ <p>tree - interfaces for tree manipulation</p>
+ <p>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>;
+#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>;
+#define <a href="#XML_XML_ID">XML_XML_ID</a>;
+#define <a href="#xmlRootNode">xmlRootNode</a>;
+#define <a href="#XML_GET_LINE">XML_GET_LINE</a>;
+#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>;
+#define <a href="#xmlChildrenNode">xmlChildrenNode</a>;
+#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>;
+#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>;
+typedef struct _xmlNs <a href="#xmlNs">xmlNs</a>;
+typedef struct _xmlElementContent <a href="#xmlElementContent">xmlElementContent</a>;
+typedef <a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * <a href="#xmlEnumerationPtr">xmlEnumerationPtr</a>;
+typedef struct _xmlBuffer <a href="#xmlBuffer">xmlBuffer</a>;
+typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * <a href="#xmlParserInputPtr">xmlParserInputPtr</a>;
+typedef <a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * <a href="#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a>;
+typedef struct _xmlParserInput <a href="#xmlParserInput">xmlParserInput</a>;
+typedef struct _xmlElement <a href="#xmlElement">xmlElement</a>;
+typedef <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> <a href="#xmlNsType">xmlNsType</a>;
+typedef enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a>;
+typedef struct _xmlNode <a href="#xmlNode">xmlNode</a>;
+typedef <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * <a href="#xmlDocPtr">xmlDocPtr</a>;
+typedef <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * <a href="#xmlBufferPtr">xmlBufferPtr</a>;
+typedef <a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * <a href="#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a>;
+typedef <a href="libxml2-tree.html#xmlRef">xmlRef</a> * <a href="#xmlRefPtr">xmlRefPtr</a>;
+typedef struct _xmlParserInputBuffer <a href="#xmlParserInputBuffer">xmlParserInputBuffer</a>;
+typedef struct _xmlRef <a href="#xmlRef">xmlRef</a>;
+typedef struct _xmlDOMWrapCtxt <a href="#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a>;
+typedef <a href="libxml2-tree.html#xmlNode">xmlNode</a> * <a href="#xmlNodePtr">xmlNodePtr</a>;
+typedef struct _xmlParserCtxt <a href="#xmlParserCtxt">xmlParserCtxt</a>;
+typedef <a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * <a href="#xmlDtdPtr">xmlDtdPtr</a>;
+typedef enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a>;
+typedef struct _xmlBuf <a href="#xmlBuf">xmlBuf</a>;
+typedef struct _xmlNotation <a href="#xmlNotation">xmlNotation</a>;
+typedef enum <a href="#xmlElementType">xmlElementType</a>;
+typedef struct _xmlEntity <a href="#xmlEntity">xmlEntity</a>;
+typedef struct _xmlAttr <a href="#xmlAttr">xmlAttr</a>;
+typedef <a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * <a href="#xmlAttributePtr">xmlAttributePtr</a>;
+typedef enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a>;
+typedef <a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * <a href="#xmlNotationPtr">xmlNotationPtr</a>;
+typedef <a href="libxml2-tree.html#xmlElement">xmlElement</a> * <a href="#xmlElementPtr">xmlElementPtr</a>;
+typedef <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * <a href="#xmlBufPtr">xmlBufPtr</a>;
+typedef enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a>;
+typedef <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * <a href="#xmlAttrPtr">xmlAttrPtr</a>;
+typedef struct _xmlDoc <a href="#xmlDoc">xmlDoc</a>;
+typedef struct _xmlID <a href="#xmlID">xmlID</a>;
+typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * <a href="#xmlParserCtxtPtr">xmlParserCtxtPtr</a>;
+typedef <a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * <a href="#xmlEntityPtr">xmlEntityPtr</a>;
+typedef struct _xmlEnumeration <a href="#xmlEnumeration">xmlEnumeration</a>;
+typedef enum <a href="#xmlAttributeType">xmlAttributeType</a>;
+typedef <a href="libxml2-tree.html#xmlNs">xmlNs</a> * <a href="#xmlNsPtr">xmlNsPtr</a>;
+typedef <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * <a href="#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a>;
+typedef struct _xmlSAXHandler <a href="#xmlSAXHandler">xmlSAXHandler</a>;
+typedef struct _xmlOutputBuffer <a href="#xmlOutputBuffer">xmlOutputBuffer</a>;
+typedef struct _xmlSAXLocator <a href="#xmlSAXLocator">xmlSAXLocator</a>;
+typedef <a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * <a href="#xmlElementContentPtr">xmlElementContentPtr</a>;
+typedef enum <a href="#xmlElementContentType">xmlElementContentType</a>;
+typedef enum <a href="#xmlDocProperties">xmlDocProperties</a>;
+typedef <a href="libxml2-tree.html#xmlID">xmlID</a> * <a href="#xmlIDPtr">xmlIDPtr</a>;
+typedef struct _xmlDtd <a href="#xmlDtd">xmlDtd</a>;
+typedef struct _xmlAttribute <a href="#xmlAttribute">xmlAttribute</a>;
+typedef <a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * <a href="#xmlOutputBufferPtr">xmlOutputBufferPtr</a>;
+typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * <a href="#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a>;
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNode">xmlDocCopyNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int extended);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocRawNode">xmlNewDocRawNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufContent">xmlBufContent</a> (const <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * buf);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsPropEatName">xmlNewNsPropEatName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringGetNodeList">xmlStringGetNodeList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCDataBlock">xmlNewCDataBlock</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+void <a href="#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetBase">xmlNodeGetBase</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+void <a href="#xmlBufferEmpty">xmlBufferEmpty</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildQName">xmlBuildQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br/> int len);
+int <a href="#xmlValidateNMToken">xmlValidateNMToken</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
+int <a href="#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddSibling">xmlAddSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreate">xmlBufferCreate</a> (void);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocFragment">xmlNewDocFragment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocGetRootElement">xmlDocGetRootElement</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetProp">xmlGetProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlValidateName">xmlValidateName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufEnd">xmlBufEnd</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf);
+int <a href="#xmlValidateQName">xmlValidateQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasNsProp">xmlHasNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddPrevSibling">xmlAddPrevSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int <a href="#xmlBufferAddHead">xmlBufferAddHead</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewPI">xmlNewPI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+void <a href="#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding, <br/> int format);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetProp">xmlSetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+unsigned long <a href="#xmlChildElementCount">xmlChildElementCount</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
+void <a href="#xmlElemDump">xmlElemDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+int <a href="#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlGetIntSubset">xmlGetIntSubset</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc);
+int <a href="#xmlNodeBufGetContent">xmlNodeBufGetContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNextElementSibling">xmlNextElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlBufferWriteChar">xmlBufferWriteChar</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * string);
+void <a href="#xmlBufferFree">xmlBufferFree</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
+int <a href="#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int deep, <br/> int options);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNode">xmlNewNode</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlSaveFileTo">xmlSaveFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextLen">xmlNewTextLen</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextChild">xmlNewTextChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+void <a href="#xmlNodeSetContent">xmlNodeSetContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlBufferAdd">xmlBufferAdd</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len);
+void <a href="#xmlNodeDumpOutput">xmlNodeDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format, <br/> const char * encoding);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespace">xmlCopyNamespace</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNsByHref">xmlSearchNsByHref</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChild">xmlAddChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+int <a href="#xmlReconciliateNs">xmlReconciliateNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree);
+int <a href="#xmlValidateNCName">xmlValidateNCName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocComment">xmlNewDocComment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlGetCompressMode">xmlGetCompressMode</a> (void);
+int <a href="#xmlNodeDump">xmlNodeDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format);
+<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateSize">xmlBufferCreateSize</a> (size_t size);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetString">xmlNodeListGetString</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br/> int inLine);
+void <a href="#xmlSetCompressMode">xmlSetCompressMode</a> (int mode);
+void <a href="#xmlSetTreeDoc">xmlSetTreeDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int options);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNodeList">xmlCopyNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChildList">xmlAddChildList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNodePath">xmlGetNodePath</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node);
+void <a href="#xmlFreePropList">xmlFreePropList</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
+void <a href="#xmlNodeAddContent">xmlNodeAddContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlUnsetNsProp">xmlUnsetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlFirstElementChild">xmlFirstElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddNextSibling">xmlAddNextSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int <a href="#xmlIsBlankNode">xmlIsBlankNode</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewGlobalNs">xmlNewGlobalNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+int <a href="#xmlBufferDump">xmlBufferDump</a> (FILE * file, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetContent">xmlNodeGetContent</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCopyDoc">xmlCopyDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int recursive);
+<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> <a href="#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a> (void);
+void <a href="#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding);
+int <a href="#xmlBufGetNodeContent">xmlBufGetNodeContent</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextMerge">xmlTextMerge</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second);
+void <a href="#xmlDocDumpMemory">xmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocPI">xmlNewDocPI</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+void <a href="#xmlFreeNs">xmlFreeNs</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
+int <a href="#xmlDocDump">xmlDocDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+void <a href="#xmlFreeProp">xmlFreeProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNoNsProp">xmlGetNoNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName2">xmlSplitQName2</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewProp">xmlNewProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlTextConcat">xmlTextConcat</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+int <a href="#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+int <a href="#xmlBufferShrink">xmlBufferShrink</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlPreviousElementSibling">xmlPreviousElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlNodeSetContentLen">xmlNodeSetContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+void <a href="#xmlNodeAddContentLen">xmlNodeAddContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+void <a href="#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyProp">xmlCopyProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlReplaceNode">xmlReplaceNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlSetDocCompressMode">xmlSetDocCompressMode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int mode);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNode">xmlCopyNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int extended);
+void <a href="#xmlUnlinkNode">xmlUnlinkNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName3">xmlSplitQName3</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int * len);
+typedef <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix);
+size_t <a href="#xmlBufUse">xmlBufUse</a> (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocSetRootElement">xmlDocSetRootElement</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root);
+long <a href="#xmlGetLineNo">xmlGetLineNo</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferContent">xmlBufferContent</a> (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf);
+int <a href="#xmlRemoveProp">xmlRemoveProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlLastElementChild">xmlLastElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetLang">xmlNodeGetLang</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur);
+int <a href="#xmlGetDocCompressMode">xmlGetDocCompressMode</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc);
+size_t <a href="#xmlBufNodeDump">xmlBufNodeDump</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNsProp">xmlGetNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewDocProp">xmlNewDocProp</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlFreeNode">xmlFreeNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsProp">xmlNewNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferDetach">xmlBufferDetach</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf);
+void <a href="#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewChild">xmlNewChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNs">xmlSearchNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len);
+int <a href="#xmlSaveFormatFile">xmlSaveFormatFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyPropList">xmlCopyPropList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur);
+int <a href="#xmlDocFormatDump">xmlDocFormatDump</a> (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format);
+void <a href="#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int val);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasProp">xmlHasProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlBufferCat">xmlBufferCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCreateIntSubset">xmlCreateIntSubset</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlNewDoc">xmlNewDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCharRef">xmlNewCharRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespaceList">xmlCopyNamespaceList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNodeEatName">xmlNewNodeEatName</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlBufferResize">xmlBufferResize</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int size);
+void <a href="#xmlNodeSetBase">xmlNodeSetBase</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewComment">xmlNewComment</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlBufferLength">xmlBufferLength</a> (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewText">xmlNewText</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlUnsetProp">xmlUnsetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a> (void);
+int <a href="#xmlSaveFile">xmlSaveFile</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNodeList">xmlDocCopyNodeList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlSetNs">xmlSetNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewNs">xmlNewNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+int <a href="#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int options);
+void <a href="#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCopyDtd">xmlCopyDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocText">xmlNewDocText</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetRawString">xmlNodeListGetRawString</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br/> int inLine);
+<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateStatic">xmlBufferCreateStatic</a> (void * mem, <br/> size_t size);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewReference">xmlNewReference</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> int options);
+int <a href="#xmlBufferCCat">xmlBufferCCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * str);
+<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * <a href="#xmlGetNsList">xmlGetNsList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node);
+int <a href="#xmlBufferGrow">xmlBufferGrow</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len);
+int <a href="#xmlNodeIsText">xmlNodeIsText</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node);
+void <a href="#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme);
+int <a href="#xmlIsXHTML">xmlIsXHTML</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID);
+void <a href="#xmlNodeSetLang">xmlNodeSetLang</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang);
+void <a href="#xmlFreeDtd">xmlFreeDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur);
+void <a href="#xmlFreeNodeList">xmlFreeNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlFreeDoc">xmlFreeDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
+size_t <a href="#xmlBufShrink">xmlBufShrink</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> size_t len);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNode">xmlNewDocNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlSaveFileEnc">xmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetNsProp">xmlSetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format);
+void <a href="#xmlSetListDoc">xmlSetListDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlNodeSetName">xmlNodeSetName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocTextLen">xmlNewDocTextLen</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlNewDtd">xmlNewDtd</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+void <a href="#xmlFreeNsList">xmlFreeNsList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlGetLastChild">xmlGetLastChild</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * parent);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="BASE_BUFFER_SIZE">Macro </a>BASE_BUFFER_SIZE</h3><pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>;
+</pre><p>default buffer size 4000.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML2_NEW_BUFFER">Macro </a>LIBXML2_NEW_BUFFER</h3><pre class="programlisting">#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>;
+</pre><p>Macro used to express that the API use the new buffers for <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> and xmlOutputBuffer. The change was introduced in 2.9.0.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_GET_CONTENT">Macro </a>XML_GET_CONTENT</h3><pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>;
+</pre><p>Macro to extract the content pointer of a node.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_GET_LINE">Macro </a>XML_GET_LINE</h3><pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a>;
+</pre><p>Macro to extract the line number of an element node.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_LOCAL_NAMESPACE">Macro </a>XML_LOCAL_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>;
+</pre><p>A namespace declaration node.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_XML_ID">Macro </a>XML_XML_ID</h3><pre class="programlisting">#define <a href="#XML_XML_ID">XML_XML_ID</a>;
+</pre><p>This is the name for the special xml:id <a href="libxml2-SAX.html#attribute">attribute</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_XML_NAMESPACE">Macro </a>XML_XML_NAMESPACE</h3><pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>;
+</pre><p>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChildrenNode">Macro </a>xmlChildrenNode</h3><pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a>;
+</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children."</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRootNode">Macro </a>xmlRootNode</h3><pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a>;
+</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children".</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttr">Structure </a>xmlAttr</h3><pre class="programlisting">struct _xmlAttr {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_NODE, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the property
+ struct _xmlNode * children : the value of the property
+ struct _xmlNode * last : NULL
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlAttr * next : next sibling link
+ struct _xmlAttr * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
+ <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : the <a href="libxml2-SAX.html#attribute">attribute</a> type if validating
+ void * psvi : for type/PSVI informations
+} xmlAttr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttrPtr">Typedef </a>xmlAttrPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * xmlAttrPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttribute">Structure </a>xmlAttribute</h3><pre class="programlisting">struct _xmlAttribute {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_DECL, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Attribute name
+ struct _xmlNode * children : NULL
+ struct _xmlNode * last : NULL
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ struct _xmlAttribute * nexth : next in hash table
+ <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : The <a href="libxml2-SAX.html#attribute">attribute</a> type
+ <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def : the default
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue : or the default value
+ <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree : or the enumeration tree if any
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem : Element holding the <a href="libxml2-SAX.html#attribute">attribute</a>
+} xmlAttribute;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttributeDefault">Enum </a>xmlAttributeDefault</h3><pre class="programlisting">enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a> {
+ <a name="XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a> = 1
+ <a name="XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a> = 2
+ <a name="XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> = 3
+ <a name="XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttributePtr">Typedef </a>xmlAttributePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * xmlAttributePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttributeType">Enum </a>xmlAttributeType</h3><pre class="programlisting">enum <a href="#xmlAttributeType">xmlAttributeType</a> {
+ <a name="XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a> = 1
+ <a name="XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a> = 2
+ <a name="XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a> = 3
+ <a name="XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a> = 4
+ <a name="XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a> = 5
+ <a name="XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a> = 6
+ <a name="XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a> = 7
+ <a name="XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a> = 8
+ <a name="XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> = 9
+ <a name="XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a> = 10
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBuf">Structure </a>xmlBuf</h3><pre class="programlisting">struct _xmlBuf {
+The content of this structure is not made public by the API.
+} xmlBuf;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufPtr">Typedef </a>xmlBufPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * xmlBufPtr;
+</pre><p>A pointer to a buffer structure, the actual structure internals are not public</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBuffer">Structure </a>xmlBuffer</h3><pre class="programlisting">struct _xmlBuffer {
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : The buffer content UTF8
+ unsigned int use : The buffer size used
+ unsigned int size : The buffer size
+ <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> alloc : The realloc method
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * contentIO : in IO mode we may have a different base
+} xmlBuffer;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferAllocationScheme">Enum </a>xmlBufferAllocationScheme</h3><pre class="programlisting">enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> {
+ <a name="XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> = 1 /* double each time one need to grow */
+ <a name="XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> = 2 /* grow only to the minimal size */
+ <a name="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 /* immutable buffer */
+ <a name="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 /* special allocation scheme used for I/O */
+ <a name="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 /* exact up to a threshold, and doubleit thereafter */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferPtr">Typedef </a>xmlBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * xmlBufferPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCtxt">Structure </a>xmlDOMWrapCtxt</h3><pre class="programlisting">struct _xmlDOMWrapCtxt {
+ void * _private : * The type of this context, just in case we need specialized * context
+ int type : * Internal namespace map used for various operations. *
+ void * namespaceMap : * Use this one to acquire an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> intended for node-&gt;ns. * (Note t
+ <a href="libxml2-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> getNsForNodeFunc
+} xmlDOMWrapCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCtxtPtr">Typedef </a>xmlDOMWrapCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * xmlDOMWrapCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDoc">Structure </a>xmlDoc</h3><pre class="programlisting">struct _xmlDoc {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DOCUMENT_NODE, must be second !
+ char * name : name/filename/URI of the document
+ struct _xmlNode * children : the document tree
+ struct _xmlNode * last : last child link
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : autoreference to itself End of common part
+ int compression : level of zlib compression
+ int standalone : standalone document (no external refs) 1 if standalone="yes" 0 if sta
+ struct _xmlDtd * intSubset : the document internal subset
+ struct _xmlDtd * extSubset : the document external subset
+ struct _xmlNs * oldNs : Global namespace, the old way
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : external initial encoding, if any
+ void * ids : Hash table for ID attributes if any
+ void * refs : Hash table for IDREFs attributes if any
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL : The URI for that document
+ int charset : encoding of the in-memory content actually an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a>
+ struct _xmlDict * dict : dict used to allocate names or NULL
+ void * psvi : for type/PSVI informations
+ int parseFlags : set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used to parse the document
+ int properties : set of <a href="libxml2-tree.html#xmlDocProperties">xmlDocProperties</a> for this document set at the end of parsing
+} xmlDoc;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocProperties">Enum </a>xmlDocProperties</h3><pre class="programlisting">enum <a href="#xmlDocProperties">xmlDocProperties</a> {
+ <a name="XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a> = 1 /* document is XML well formed */
+ <a name="XML_DOC_NSVALID">XML_DOC_NSVALID</a> = 2 /* document is Namespace valid */
+ <a name="XML_DOC_OLD10">XML_DOC_OLD10</a> = 4 /* parsed with old XML-1.0 parser */
+ <a name="XML_DOC_DTDVALID">XML_DOC_DTDVALID</a> = 8 /* DTD validation was successful */
+ <a name="XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a> = 16 /* XInclude substitution was done */
+ <a name="XML_DOC_USERBUILT">XML_DOC_USERBUILT</a> = 32 /* Document was built using the API and not by parsing an instance */
+ <a name="XML_DOC_INTERNAL">XML_DOC_INTERNAL</a> = 64 /* built for internal processing */
+ <a name="XML_DOC_HTML">XML_DOC_HTML</a> = 128 /* parsed or built HTML document */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocPtr">Typedef </a>xmlDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * xmlDocPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDtd">Structure </a>xmlDtd</h3><pre class="programlisting">struct _xmlDtd {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DTD_NODE, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Name of the DTD
+ struct _xmlNode * children : the value of the property link
+ struct _xmlNode * last : last child link
+ struct _xmlDoc * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document End of common part
+ void * notations : Hash table for notations if any
+ void * elements : Hash table for elements if any
+ void * attributes : Hash table for attributes if any
+ void * entities : Hash table for entities if any
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC DTD
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC DTD
+ void * pentities : Hash table for param entities if any
+} xmlDtd;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDtdPtr">Typedef </a>xmlDtdPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * xmlDtdPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElement">Structure </a>xmlElement</h3><pre class="programlisting">struct _xmlElement {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ELEMENT_DECL, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
+ struct _xmlNode * children : NULL
+ struct _xmlNode * last : NULL
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml2-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> etype : The type
+ <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content : the allowed element content
+ <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attributes : List of the declared attributes
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
+ <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : the validating regexp
+ void * contModel
+} xmlElement;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementContent">Structure </a>xmlElementContent</h3><pre class="programlisting">struct _xmlElementContent {
+ <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type : PCDATA, ELEMENT, SEQ or OR
+ <a href="libxml2-tree.html#xmlElementContentOccur">xmlElementContentOccur</a> ocur : ONCE, OPT, MULT or PLUS
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
+ struct _xmlElementContent * c1 : first child
+ struct _xmlElementContent * c2 : second child
+ struct _xmlElementContent * parent : parent
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : Namespace prefix
+} xmlElementContent;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementContentOccur">Enum </a>xmlElementContentOccur</h3><pre class="programlisting">enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a> {
+ <a name="XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a> = 1
+ <a name="XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a> = 2
+ <a name="XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a> = 3
+ <a name="XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementContentPtr">Typedef </a>xmlElementContentPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * xmlElementContentPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementContentType">Enum </a>xmlElementContentType</h3><pre class="programlisting">enum <a href="#xmlElementContentType">xmlElementContentType</a> {
+ <a name="XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a> = 1
+ <a name="XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a> = 2
+ <a name="XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a> = 3
+ <a name="XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementPtr">Typedef </a>xmlElementPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElement">xmlElement</a> * xmlElementPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementType">Enum </a>xmlElementType</h3><pre class="programlisting">enum <a href="#xmlElementType">xmlElementType</a> {
+ <a name="XML_ELEMENT_NODE">XML_ELEMENT_NODE</a> = 1
+ <a name="XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a> = 2
+ <a name="XML_TEXT_NODE">XML_TEXT_NODE</a> = 3
+ <a name="XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a> = 4
+ <a name="XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a> = 5
+ <a name="XML_ENTITY_NODE">XML_ENTITY_NODE</a> = 6
+ <a name="XML_PI_NODE">XML_PI_NODE</a> = 7
+ <a name="XML_COMMENT_NODE">XML_COMMENT_NODE</a> = 8
+ <a name="XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a> = 9
+ <a name="XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a> = 10
+ <a name="XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a> = 11
+ <a name="XML_NOTATION_NODE">XML_NOTATION_NODE</a> = 12
+ <a name="XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a> = 13
+ <a name="XML_DTD_NODE">XML_DTD_NODE</a> = 14
+ <a name="XML_ELEMENT_DECL">XML_ELEMENT_DECL</a> = 15
+ <a name="XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a> = 16
+ <a name="XML_ENTITY_DECL">XML_ENTITY_DECL</a> = 17
+ <a name="XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a> = 18
+ <a name="XML_XINCLUDE_START">XML_XINCLUDE_START</a> = 19
+ <a name="XML_XINCLUDE_END">XML_XINCLUDE_END</a> = 20
+ <a name="XML_DOCB_DOCUMENT_NODE">XML_DOCB_DOCUMENT_NODE</a> = 21
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementTypeVal">Enum </a>xmlElementTypeVal</h3><pre class="programlisting">enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a> {
+ <a name="XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a> = 0
+ <a name="XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a> = 1
+ <a name="XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a> = 2
+ <a name="XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a> = 3
+ <a name="XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEntity">Structure </a>xmlEntity</h3><pre class="programlisting">struct _xmlEntity {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ENTITY_DECL, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Entity name
+ struct _xmlNode * children : First child link
+ struct _xmlNode * last : Last child link
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig : content without ref substitution
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : content or ndata if unparsed
+ int length : the content length
+ <a href="libxml2-entities.html#xmlEntityType">xmlEntityType</a> etype : The entity type
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC Entity
+ struct _xmlEntity * nexte : unused
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI : the full URI as computed
+ int owner : does the entity own the childrens
+ int checked : was the entity content checked this is also used to count entities *
+} xmlEntity;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEntityPtr">Typedef </a>xmlEntityPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * xmlEntityPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEnumeration">Structure </a>xmlEnumeration</h3><pre class="programlisting">struct _xmlEnumeration {
+ struct _xmlEnumeration * next : next one
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Enumeration name
+} xmlEnumeration;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlEnumerationPtr">Typedef </a>xmlEnumerationPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * xmlEnumerationPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlID">Structure </a>xmlID</h3><pre class="programlisting">struct _xmlID {
+ struct _xmlID * next : next ID
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The ID name
+ <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available
+ int lineno : The line number if attr is not available
+ struct _xmlDoc * doc : The document holding the ID
+} xmlID;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIDPtr">Typedef </a>xmlIDPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlID">xmlID</a> * xmlIDPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNode">Structure </a>xmlNode</h3><pre class="programlisting">struct _xmlNode {
+ void * _private : application data
+ <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : type number, must be second !
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the node, or the entity
+ struct _xmlNode * children : parent-&gt;childs link
+ struct _xmlNode * last : last child link
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document End of common part
+ <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : the content
+ struct _xmlAttr * properties : properties list
+ <a href="libxml2-tree.html#xmlNs">xmlNs</a> * nsDef : namespace definitions on this node
+ void * psvi : for type/PSVI informations
+ unsigned short line : line number
+ unsigned short extra : extra data for XPath/XSLT
+} xmlNode;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodePtr">Typedef </a>xmlNodePtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNode">xmlNode</a> * xmlNodePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNotation">Structure </a>xmlNotation</h3><pre class="programlisting">struct _xmlNotation {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Notation name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID : Public identifier, if any
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : System identifier, if any
+} xmlNotation;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNotationPtr">Typedef </a>xmlNotationPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * xmlNotationPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNs">Structure </a>xmlNs</h3><pre class="programlisting">struct _xmlNs {
+ struct _xmlNs * next : next Ns link for this node
+ <a href="libxml2-tree.html#xmlNsType">xmlNsType</a> type : global or local
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href : URL for the namespace
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : prefix for the namespace
+ void * _private : application data
+ struct _xmlDoc * context : normally an <a href="libxml2-tree.html#xmlDoc">xmlDoc</a>
+} xmlNs;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNsPtr">Typedef </a>xmlNsPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNs">xmlNs</a> * xmlNsPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNsType">Typedef </a>xmlNsType</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementType">xmlElementType</a> xmlNsType;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBuffer">Structure </a>xmlOutputBuffer</h3><pre class="programlisting">struct _xmlOutputBuffer {
+ void * context
+ <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writecallback
+ <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closecallback
+ <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
+ <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8 or ISOLatin
+ <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> conv : if encoder != NULL buffer for output
+ int written : total number of byte written
+ int error
+} xmlOutputBuffer;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferPtr">Typedef </a>xmlOutputBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * xmlOutputBufferPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserCtxt">Structure </a>xmlParserCtxt</h3><pre class="programlisting">struct _xmlParserCtxt {
+ struct _xmlSAXHandler * sax : The SAX handler
+ void * userData : For SAX interface only, used by DOM build
+ <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> myDoc : the document being built
+ int wellFormed : is the document well formed
+ int replaceEntities : shall we replace entities ?
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : the declared encoding, if any
+ int standalone : standalone document
+ int html : an HTML(1)/Docbook(2) document * 3 is HTML after &lt;head&gt; * 10 is HTML
+ <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input : Current input stream
+ int inputNr : Number of current input streams
+ int inputMax : Max number of input streams
+ <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> * inputTab : stack of inputs Node analysis stack only used for DOM building
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node
+ int nodeNr : Depth of the parsing stack
+ int nodeMax : Max depth of the parsing stack
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes
+ int record_info : Whether node info should be kept
+ <a href="libxml2-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> node_seq : info about each node parsed
+ int errNo : error code
+ int hasExternalSubset : <a href="libxml2-SAX.html#reference">reference</a> and external subset
+ int hasPErefs : the internal subset has PE refs
+ int external : are we parsing an external entity
+ int valid : is the document valid
+ int validate : shall we try to validate ?
+ <a href="libxml2-valid.html#xmlValidCtxt">xmlValidCtxt</a> vctxt : The validity context
+ <a href="libxml2-parser.html#xmlParserInputState">xmlParserInputState</a> instate : current type of input
+ int token : next char look-ahead
+ char * directory : the data directory Node name stack
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Current parsed Node
+ int nameNr : Depth of the parsing stack
+ int nameMax : Max depth of the parsing stack
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nameTab : array of nodes
+ long nbChars : number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> processed
+ long checkIndex : used by progressive parsing lookup
+ int keepBlanks : ugly but ...
+ int disableSAX : SAX callbacks are disabled
+ int inSubset : Parsing is in int 1/ext 2 subset
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * intSubName : name of subset
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubURI : URI of external subset
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubSystem : SYSTEM ID of external subset xml:space values
+ int * space : Should the parser preserve spaces
+ int spaceNr : Depth of the parsing stack
+ int spaceMax : Max depth of the parsing stack
+ int * spaceTab : array of space infos
+ int depth : to prevent entity substitution loops
+ <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> entity : used to check entities boundaries
+ int charset : encoding of the in-memory content actually an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a>
+ int nodelen : Those two fields are there to
+ int nodemem : Speed up large node parsing
+ int pedantic : signal pedantic warnings
+ void * _private : For user data, libxml won't touch it
+ int loadsubset : should the external subset be loaded
+ int linenumbers : set line number in element content
+ void * catalogs : document's own catalog
+ int recovery : run in recovery mode
+ int progressive : is this a progressive parsing
+ <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionnary for the parser
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * atts : array for the attributes callbacks
+ int maxatts : the size of the array
+ int docdict : * pre-interned strings *
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xmlns
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml_ns : * Everything below is used only by the new SAX mode *
+ int sax2 : operating in the new SAX mode
+ int nsNr : the number of inherited namespaces
+ int nsMax : the size of the arrays
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nsTab : the array of prefix/namespace name
+ int * attallocs : which <a href="libxml2-SAX.html#attribute">attribute</a> were allocated
+ void * * pushTab : array of data for push
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsDefault : defaulted attributes if any
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsSpecial : non-CDATA attributes if any
+ int nsWellFormed : is the document XML Nanespace okay
+ int options : * Those fields are needed only for treaming parsing so far *
+ int dictNames : Use dictionary names for the tree
+ int freeElemsNr : number of freed element nodes
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> freeElems : List of freed element nodes
+ int freeAttrsNr : number of freed attributes nodes
+ <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> freeAttrs : * the complete error informations for the last error. *
+ <a href="libxml2-xmlerror.html#xmlError">xmlError</a> lastError
+ <a href="libxml2-parser.html#xmlParserMode">xmlParserMode</a> parseMode : the parser mode
+ unsigned long nbentities : number of entities references
+ unsigned long sizeentities : size of parsed entities for use by HTML non-recursive parser
+ <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfo : Current NodeInfo
+ int nodeInfoNr : Depth of the parsing stack
+ int nodeInfoMax : Max depth of the parsing stack
+ <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos
+ int input_id : we need to label inputs
+ unsigned long sizeentcopy : volume of entity copy
+} xmlParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserCtxtPtr">Typedef </a>xmlParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * xmlParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInput">Structure </a>xmlParserInput</h3><pre class="programlisting">struct _xmlParserInput {
+ <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> buf : UTF-8 encoded buffer
+ const char * filename : The file analyzed, if any
+ const char * directory : the directory/base of the file
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : Base of the array to parse
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur : Current char being parsed
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * end : end of the array to parse
+ int length : length if known
+ int line : Current line
+ int col : * NOTE: consumed is only tested for equality in the parser code, *
+ unsigned long consumed : How many xmlChars already consumed
+ <a href="libxml2-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a> free : function to deallocate the base
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : the encoding string for entity
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the version string for entity
+ int standalone : Was that entity marked standalone
+ int id : an unique identifier for the entity
+} xmlParserInput;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBuffer">Structure </a>xmlParserInputBuffer</h3><pre class="programlisting">struct _xmlParserInputBuffer {
+ void * context
+ <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readcallback
+ <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closecallback
+ <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
+ <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8
+ <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> raw : if encoder != NULL buffer for raw input
+ int compressed : -1=unknown, 0=not compressed, 1=compressed
+ int error
+ unsigned long rawconsumed : amount consumed from raw
+} xmlParserInputBuffer;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferPtr">Typedef </a>xmlParserInputBufferPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * xmlParserInputBufferPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputPtr">Typedef </a>xmlParserInputPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * xmlParserInputPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRef">Structure </a>xmlRef</h3><pre class="programlisting">struct _xmlRef {
+ struct _xmlRef * next : next Ref
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The Ref name
+ <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available
+ int lineno : The line number if attr is not available
+} xmlRef;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRefPtr">Typedef </a>xmlRefPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlRef">xmlRef</a> * xmlRefPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXHandler">Structure </a>xmlSAXHandler</h3><pre class="programlisting">struct _xmlSAXHandler {
+ <a href="libxml2-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset
+ <a href="libxml2-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone
+ <a href="libxml2-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset
+ <a href="libxml2-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset
+ <a href="libxml2-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity
+ <a href="libxml2-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity
+ <a href="libxml2-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl
+ <a href="libxml2-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl
+ <a href="libxml2-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl
+ <a href="libxml2-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl
+ <a href="libxml2-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl
+ <a href="libxml2-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator
+ <a href="libxml2-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument
+ <a href="libxml2-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument
+ <a href="libxml2-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement
+ <a href="libxml2-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement
+ <a href="libxml2-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference
+ <a href="libxml2-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters
+ <a href="libxml2-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace
+ <a href="libxml2-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction
+ <a href="libxml2-parser.html#commentSAXFunc">commentSAXFunc</a> comment
+ <a href="libxml2-parser.html#warningSAXFunc">warningSAXFunc</a> warning
+ <a href="libxml2-parser.html#errorSAXFunc">errorSAXFunc</a> error
+ <a href="libxml2-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors
+ <a href="libxml2-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity
+ <a href="libxml2-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock
+ <a href="libxml2-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset
+ unsigned int initialized : The following fields are extensions available only on version 2
+ void * _private
+ <a href="libxml2-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a> startElementNs
+ <a href="libxml2-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a> endElementNs
+ <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror
+} xmlSAXHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXHandlerPtr">Typedef </a>xmlSAXHandlerPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * xmlSAXHandlerPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXLocator">Structure </a>xmlSAXLocator</h3><pre class="programlisting">struct _xmlSAXLocator {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getPublicId) getPublicId
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getSystemId) getSystemId
+ int(*getLineNumber) getLineNumber
+ int(*getColumnNumber) getColumnNumber
+} xmlSAXLocator;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSAXLocatorPtr">Typedef </a>xmlSAXLocatorPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * xmlSAXLocatorPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapAcquireNsFunction"/>Function type xmlDOMWrapAcquireNsFunction</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlDOMWrapAcquireNsFunction (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix)<br/>
+</pre><p>A function called to acquire namespaces (xmlNs) from the wrapper.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the context node (element or attribute)</td></tr><tr><td><span class="term"><i><tt>nsName</tt></i>:</span></td><td>the requested namespace name</td></tr><tr><td><span class="term"><i><tt>nsPrefix</tt></i>:</span></td><td>the requested namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL in case of an error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddChild"/>xmlAddChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the child or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddChildList"/>xmlAddChildList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChildList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddNextSibling"/>xmlAddNextSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddNextSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddPrevSibling"/>xmlAddPrevSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddPrevSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml2-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddSibling"/>xmlAddSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new element or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttrSerializeTxtContent"/>xmlAttrSerializeTxtContent ()</h3><pre class="programlisting">void xmlAttrSerializeTxtContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
+</pre><p>Serialize text <a href="libxml2-SAX.html#attribute">attribute</a> values to an xml simple buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> node</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the text content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufContent"/>xmlBufContent ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufContent (const <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * buf)<br/>
+</pre><p>Function to extract the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufEnd"/>xmlBufEnd ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufEnd (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
+</pre><p>Function to extract the end of the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the end of the internal content or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufGetNodeContent"/>xmlBufGetNodeContent ()</h3><pre class="programlisting">int xmlBufGetNodeContent (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buf with this value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a></td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufNodeDump"/>xmlBufNodeDump ()</h3><pre class="programlisting">size_t xmlBufNodeDump (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format)<br/>
+</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufShrink"/>xmlBufShrink ()</h3><pre class="programlisting">size_t xmlBufShrink (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> size_t len)<br/>
+</pre><p>Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte removed or 0 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufUse"/>xmlBufUse ()</h3><pre class="programlisting">size_t xmlBufUse (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
+</pre><p>Function to get the length of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferAdd"/>xmlBufferAdd ()</h3><pre class="programlisting">int xmlBufferAdd (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len)<br/>
+</pre><p>Add a string range to an XML buffer. if len == -1, the length of str is recomputed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferAddHead"/>xmlBufferAddHead ()</h3><pre class="programlisting">int xmlBufferAddHead (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len)<br/>
+</pre><p>Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferCCat"/>xmlBufferCCat ()</h3><pre class="programlisting">int xmlBufferCCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * str)<br/>
+</pre><p>Append a zero terminated C string to an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the C char string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferCat"/>xmlBufferCat ()</h3><pre class="programlisting">int xmlBufferCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Append a zero terminated string to an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to add to</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferContent"/>xmlBufferContent ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferContent (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br/>
+</pre><p>Function to extract the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferCreate"/>xmlBufferCreate ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreate (void)<br/>
+</pre><p>routine to create an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferCreateSize"/>xmlBufferCreateSize ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateSize (size_t size)<br/>
+</pre><p>routine to create an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>initial size of buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferCreateStatic"/>xmlBufferCreateStatic ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateStatic (void * mem, <br/> size_t size)<br/>
+</pre><p>routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory area</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferDetach"/>xmlBufferDetach ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferDetach (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
+</pre><p>Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous string contained by the buffer.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferDump"/>xmlBufferDump ()</h3><pre class="programlisting">int xmlBufferDump (FILE * file, <br/> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
+</pre><p>Dumps an XML buffer to a FILE *.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar written</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferEmpty"/>xmlBufferEmpty ()</h3><pre class="programlisting">void xmlBufferEmpty (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
+</pre><p>empty a buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferFree"/>xmlBufferFree ()</h3><pre class="programlisting">void xmlBufferFree (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br/>
+</pre><p>Frees an XML buffer. It frees both the content and the structure which encapsulate it.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferGrow"/>xmlBufferGrow ()</h3><pre class="programlisting">int xmlBufferGrow (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len)<br/>
+</pre><p>Grow the available space of an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the minimum free size to allocate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new available space or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferLength"/>xmlBufferLength ()</h3><pre class="programlisting">int xmlBufferLength (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br/>
+</pre><p>Function to get the length of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferResize"/>xmlBufferResize ()</h3><pre class="programlisting">int xmlBufferResize (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int size)<br/>
+</pre><p>Resize a buffer to accommodate minimum size of @size.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to resize</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the desired size</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of problems, 1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferSetAllocationScheme"/>xmlBufferSetAllocationScheme ()</h3><pre class="programlisting">void xmlBufferSetAllocationScheme (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br/>
+</pre><p>Sets the allocation scheme for this buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to tune</td></tr><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation scheme to use</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferShrink"/>xmlBufferShrink ()</h3><pre class="programlisting">int xmlBufferShrink (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> unsigned int len)<br/>
+</pre><p>Remove the beginning of an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar removed, or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteCHAR"/>xmlBufferWriteCHAR ()</h3><pre class="programlisting">void xmlBufferWriteCHAR (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
+</pre><p>routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteChar"/>xmlBufferWriteChar ()</h3><pre class="programlisting">void xmlBufferWriteChar (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const char * string)<br/>
+</pre><p>routine which manage and grows an output buffer. This one add C chars at the end of the array.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBufferWriteQuotedString"/>xmlBufferWriteQuotedString ()</h3><pre class="programlisting">void xmlBufferWriteQuotedString (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br/>
+</pre><p>routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBuildQName"/>xmlBuildQName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br/> int len)<br/>
+</pre><p>Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ncname</tt></i>:</span></td><td>the Name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>preallocated memory</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>preallocated memory length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChildElementCount"/>xmlChildElementCount ()</h3><pre class="programlisting">unsigned long xmlChildElementCount (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
+</pre><p>Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the count of element child or 0 if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyDoc"/>xmlCopyDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCopyDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int recursive)<br/>
+</pre><p>Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>recursive</tt></i>:</span></td><td>if not zero do a recursive copy.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDocPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyDtd"/>xmlCopyDtd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCopyDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br/>
+</pre><p>Do a copy of the dtd.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the dtd</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDtdPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyNamespace"/>xmlCopyNamespace ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespace (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
+</pre><p>Do a copy of the namespace.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyNamespaceList"/>xmlCopyNamespaceList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespaceList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
+</pre><p>Do a copy of an namespace list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyNode"/>xmlCopyNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int extended)<br/>
+</pre><p>Do a copy of the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyNodeList"/>xmlCopyNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNodeList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyProp"/>xmlCopyProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
+</pre><p>Do a copy of the attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the <a href="libxml2-SAX.html#attribute">attribute</a> will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyPropList"/>xmlCopyPropList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyPropList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
+</pre><p>Do a copy of an <a href="libxml2-SAX.html#attribute">attribute</a> list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the attributes will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateIntSubset"/>xmlCreateIntSubset ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCreateIntSubset (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Create the internal subset of a document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external (PUBLIC) ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapAdoptNode"/>xmlDOMWrapAdoptNode ()</h3><pre class="programlisting">int xmlDOMWrapAdoptNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int options)<br/>
+</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used This is the case when you have an unlinked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapCloneNode"/>xmlDOMWrapCloneNode ()</h3><pre class="programlisting">int xmlDOMWrapCloneNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br/> int deep, <br/> int options)<br/>
+</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>resNode</tt></i>:</span></td><td>the clone of the given @node</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>deep</tt></i>:</span></td><td>descend into child if set</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapFreeCtxt"/>xmlDOMWrapFreeCtxt ()</h3><pre class="programlisting">void xmlDOMWrapFreeCtxt (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt)<br/>
+</pre><p>Frees the DOM-wrapper context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the DOM-wrapper context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapNewCtxt"/>xmlDOMWrapNewCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> xmlDOMWrapNewCtxt (void)<br/>
+</pre><p>Allocates and initializes a new DOM-wrapper context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> or NULL in case of an internal error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapReconcileNamespaces"/>xmlDOMWrapReconcileNamespaces ()</h3><pre class="programlisting">int xmlDOMWrapReconcileNamespaces (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> int options)<br/>
+</pre><p>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>DOM wrapper context, unused at the moment</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element-node</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded, -1 otherwise and on API/internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDOMWrapRemoveNode"/>xmlDOMWrapRemoveNode ()</h3><pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int options)<br/>
+</pre><p>Unlinks the given node from its owner. This will substitute ns-references to node-&gt;nsDef for ns-references to doc-&gt;oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the doc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to be removed.</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>set of options, unused at the moment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocCopyNode"/>xmlDocCopyNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int extended)<br/>
+</pre><p>Do a copy of the node to a given document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocCopyNodeList"/>xmlDocCopyNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Do a recursive copy of the node list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocDump"/>xmlDocDump ()</h3><pre class="programlisting">int xmlDocDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
+</pre><p>Dump an XML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocDumpFormatMemory"/>xmlDocDumpFormatMemory ()</h3><pre class="programlisting">void xmlDocDumpFormatMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size, <br/> int format)<br/>
+</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocDumpFormatMemoryEnc"/>xmlDocDumpFormatMemoryEnc ()</h3><pre class="programlisting">void xmlDocDumpFormatMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding, <br/> int format)<br/>
+</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocDumpMemory"/>xmlDocDumpMemory ()</h3><pre class="programlisting">void xmlDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br/> int * size)<br/>
+</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocDumpMemoryEnc"/>xmlDocDumpMemoryEnc ()</h3><pre class="programlisting">void xmlDocDumpMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br/> int * doc_txt_len, <br/> const char * txt_encoding)<br/>
+</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocFormatDump"/>xmlDocFormatDump ()</h3><pre class="programlisting">int xmlDocFormatDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format)<br/>
+</pre><p>Dump an XML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocGetRootElement"/>xmlDocGetRootElement ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocGetRootElement (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br/>
+</pre><p>Get the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the #xmlNodePtr for the root or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDocSetRootElement"/>xmlDocSetRootElement ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocSetRootElement (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root)<br/>
+</pre><p>Set the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>root</tt></i>:</span></td><td>the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old root element if any was found, NULL if root was NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElemDump"/>xmlElemDump ()</h3><pre class="programlisting">void xmlElemDump (FILE * f, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Dump an XML/HTML node, recursive behaviour, children are printed too.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFirstElementChild"/>xmlFirstElementChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlFirstElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
+</pre><p>Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first element child or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeDoc"/>xmlFreeDoc ()</h3><pre class="programlisting">void xmlFreeDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
+</pre><p>Free up all the structures used by a document, tree included.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>pointer to the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeDtd"/>xmlFreeDtd ()</h3><pre class="programlisting">void xmlFreeDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur)<br/>
+</pre><p>Free a DTD structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the DTD structure to free up</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeNode"/>xmlFreeNode ()</h3><pre class="programlisting">void xmlFreeNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeNodeList"/>xmlFreeNodeList ()</h3><pre class="programlisting">void xmlFreeNodeList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeNs"/>xmlFreeNs ()</h3><pre class="programlisting">void xmlFreeNs (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
+</pre><p>Free up the structures associated to a namespace</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeNsList"/>xmlFreeNsList ()</h3><pre class="programlisting">void xmlFreeNsList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br/>
+</pre><p>Free up all the structures associated to the chained namespaces.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeProp"/>xmlFreeProp ()</h3><pre class="programlisting">void xmlFreeProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
+</pre><p>Free one attribute, all the content is freed too</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreePropList"/>xmlFreePropList ()</h3><pre class="programlisting">void xmlFreePropList (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
+</pre><p>Free a property and all its siblings, all the children are freed too.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first property in the list</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetBufferAllocationScheme"/>xmlGetBufferAllocationScheme ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlGetBufferAllocationScheme (void)<br/>
+</pre><p>Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance <a href="libxml2-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current allocation scheme</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetCompressMode"/>xmlGetCompressMode ()</h3><pre class="programlisting">int xmlGetCompressMode (void)<br/>
+</pre><p>get the default compression mode used, ZLIB based.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDocCompressMode"/>xmlGetDocCompressMode ()</h3><pre class="programlisting">int xmlGetDocCompressMode (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br/>
+</pre><p>get the compression ratio for a document, ZLIB based</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetIntSubset"/>xmlGetIntSubset ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlGetIntSubset (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br/>
+</pre><p>Get the internal subset of a document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the DTD structure or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetLastChild"/>xmlGetLastChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlGetLastChild (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * parent)<br/>
+</pre><p>Search the last child of a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL if none.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetLineNo"/>xmlGetLineNo ()</h3><pre class="programlisting">long xmlGetLineNo (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br/>
+</pre><p>Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if <a href="libxml2-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> parser option was used</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>valid node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number if successful, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetNoNsProp"/>xmlGetNoNsProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNoNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to <a href="libxml2-tree.html#xmlGetProp">xmlGetProp</a> except it will accept only an <a href="libxml2-SAX.html#attribute">attribute</a> in no namespace.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetNodePath"/>xmlGetNodePath ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNodePath (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br/>
+</pre><p>Build a structure based Path for the given node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new path or NULL in case of error. The caller must free the returned string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetNsList"/>xmlGetNsList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * xmlGetNsList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br/>
+</pre><p>Search all the namespace applying to a given element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetNsProp"/>xmlGetNsProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
+</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetProp"/>xmlGetProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHasNsProp"/>xmlHasNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
+</pre><p>Search for an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlHasProp"/>xmlHasProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This function also looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsBlankNode"/>xmlIsBlankNode ()</h3><pre class="programlisting">int xmlIsBlankNode (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br/>
+</pre><p>Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsXHTML"/>xmlIsXHTML ()</h3><pre class="programlisting">int xmlIsXHTML (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID)<br/>
+</pre><p>Try to find if the document correspond to an XHTML DTD</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>systemID</tt></i>:</span></td><td>the system identifier</td></tr><tr><td><span class="term"><i><tt>publicID</tt></i>:</span></td><td>the public identifier</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if not and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLastElementChild"/>xmlLastElementChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlLastElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br/>
+</pre><p>Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element child or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewCDataBlock"/>xmlNewCDataBlock ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCDataBlock (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Creation of a new node containing a CDATA block.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the CDATA block content content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the block</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewCharRef"/>xmlNewCharRef ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCharRef (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Creation of a new character <a href="libxml2-SAX.html#reference">reference</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the char ref string, starting with # or "&amp;# ... ;"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewChild"/>xmlNewChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewComment"/>xmlNewComment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewComment (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new node containing a comment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDoc"/>xmlNewDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlNewDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version)<br/>
+</pre><p>Creates a new XML document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string giving the version of XML "1.0"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocComment"/>xmlNewDocComment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocComment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new node containing a <a href="libxml2-SAX.html#comment">comment</a> within a document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocFragment"/>xmlNewDocFragment ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocFragment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Creation of a new Fragment node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the fragment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocNode"/>xmlNewDocNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocNodeEatName"/>xmlNewDocNodeEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNodeEatName (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocPI"/>xmlNewDocPI ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocPI (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a processing instruction element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocProp"/>xmlNewDocProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewDocProp (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Create a new property carried by a document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocRawNode"/>xmlNewDocRawNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocRawNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocText"/>xmlNewDocText ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocText (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new text node within a document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocTextLen"/>xmlNewDocTextLen ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocTextLen (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Creation of a new text node with an extra content length parameter. The text node pertain to a given document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDtd"/>xmlNewDtd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlNewDtd (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewGlobalNs"/>xmlNewGlobalNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewNode"/>xmlNewNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object. Uses xmlStrdup() to make copy of @name.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewNodeEatName"/>xmlNewNodeEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNodeEatName (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object, with pointer @name as new node's name. Use xmlNewNode() if a copy of @name string is is needed as new node's name.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewNs"/>xmlNewNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, @prefix should be NULL. We use href==NULL in the case of an element creation where the namespace was not defined.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the element carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new namespace pointer or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewNsProp"/>xmlNewNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewNsPropEatName"/>xmlNewNsPropEatName ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsPropEatName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewPI"/>xmlNewPI ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewPI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a processing instruction element. Use xmlDocNewPI preferably to get string interning</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewProp"/>xmlNewProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Create a new property carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewReference"/>xmlNewReference ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewReference (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Creation of a new <a href="libxml2-SAX.html#reference">reference</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#reference">reference</a> name, or the <a href="libxml2-SAX.html#reference">reference</a> string with &amp; and ;</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewText"/>xmlNewText ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewText (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new text node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextChild"/>xmlNewTextChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextLen"/>xmlNewTextLen ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextLen (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Creation of a new text node with an extra parameter for the content's length</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNextElementSibling"/>xmlNextElementSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNextElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element sibling or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeAddContent"/>xmlNodeAddContent ()</h3><pre class="programlisting">void xmlNodeAddContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeAddContentLen"/>xmlNodeAddContentLen ()</h3><pre class="programlisting">void xmlNodeAddContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeBufGetContent"/>xmlNodeBufGetContent ()</h3><pre class="programlisting">int xmlNodeBufGetContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeDump"/>xmlNodeDump ()</h3><pre class="programlisting">int xmlNodeDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format)<br/>
+</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called Since this is using <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeDumpOutput"/>xmlNodeDumpOutput ()</h3><pre class="programlisting">void xmlNodeDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format, <br/> const char * encoding)<br/>
+</pre><p>Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>an optional encoding string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeGetBase"/>xmlNodeGetBase ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetBase (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc-&gt;URL in this case</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the node pertains to</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeGetContent"/>xmlNodeGetContent ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetContent (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeGetLang"/>xmlNodeGetLang ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetLang (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Searches the language of a node, i.e. the values of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeGetSpacePreserve"/>xmlNodeGetSpacePreserve ()</h3><pre class="programlisting">int xmlNodeGetSpacePreserve (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br/>
+</pre><p>Searches the space preserving behaviour of a node, i.e. the values of the xml:space <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if xml:space is not inherited, 0 if "default", 1 if "preserve"</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeIsText"/>xmlNodeIsText ()</h3><pre class="programlisting">int xmlNodeIsText (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br/>
+</pre><p>Is this node a Text node ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeListGetRawString"/>xmlNodeListGetRawString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetRawString (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br/> int inLine)<br/>
+</pre><p>Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeListGetString"/>xmlNodeListGetString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetString (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br/> int inLine)<br/>
+</pre><p>Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetBase"/>xmlNodeSetBase ()</h3><pre class="programlisting">void xmlNodeSetBase (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri)<br/>
+</pre><p>Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>the new base URI</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetContent"/>xmlNodeSetContent ()</h3><pre class="programlisting">void xmlNodeSetContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetContentLen"/>xmlNodeSetContentLen ()</h3><pre class="programlisting">void xmlNodeSetContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetLang"/>xmlNodeSetLang ()</h3><pre class="programlisting">void xmlNodeSetLang (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang)<br/>
+</pre><p>Set the language of a node, i.e. the values of the xml:lang attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>lang</tt></i>:</span></td><td>the language description</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetName"/>xmlNodeSetName ()</h3><pre class="programlisting">void xmlNodeSetName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Set (or reset) the name of a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the new tag name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetSpacePreserve"/>xmlNodeSetSpacePreserve ()</h3><pre class="programlisting">void xmlNodeSetSpacePreserve (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int val)<br/>
+</pre><p>Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the xml:space value ("0": default, 1: "preserve")</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPreviousElementSibling"/>xmlPreviousElementSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlPreviousElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml2-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous element sibling or NULL if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReconciliateNs"/>xmlReconciliateNs ()</h3><pre class="programlisting">int xmlReconciliateNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br/>
+</pre><p>This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining the subtree to reconciliate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of namespace declarations created or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRemoveProp"/>xmlRemoveProp ()</h3><pre class="programlisting">int xmlRemoveProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br/>
+</pre><p>Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReplaceNode"/>xmlReplaceNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlReplaceNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the old node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the @old node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFile"/>xmlSaveFile ()</h3><pre class="programlisting">int xmlSaveFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br/>
+</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFileEnc"/>xmlSaveFileEnc ()</h3><pre class="programlisting">int xmlSaveFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
+</pre><p>Dump an XML document, converting it to the given encoding</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of an encoding (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFileTo"/>xmlSaveFileTo ()</h3><pre class="programlisting">int xmlSaveFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding)<br/>
+</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFile"/>xmlSaveFormatFile ()</h3><pre class="programlisting">int xmlSaveFormatFile (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> int format)<br/>
+</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFileEnc"/>xmlSaveFormatFileEnc ()</h3><pre class="programlisting">int xmlSaveFormatFileEnc (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an XML document to a file or an URL.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL to output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document being saved</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of the encoding to use or NULL.</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces be added.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFormatFileTo"/>xmlSaveFormatFileTo ()</h3><pre class="programlisting">int xmlSaveFormatFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding, <br/> int format)<br/>
+</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSearchNs"/>xmlSearchNs ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br/>
+</pre><p>Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSearchNsByHref"/>xmlSearchNsByHref ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNsByHref (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href)<br/>
+</pre><p>Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetBufferAllocationScheme"/>xmlSetBufferAllocationScheme ()</h3><pre class="programlisting">void xmlSetBufferAllocationScheme (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br/>
+</pre><p>Set the buffer allocation method. Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation method to use</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetCompressMode"/>xmlSetCompressMode ()</h3><pre class="programlisting">void xmlSetCompressMode (int mode)<br/>
+</pre><p>set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetDocCompressMode"/>xmlSetDocCompressMode ()</h3><pre class="programlisting">void xmlSetDocCompressMode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int mode)<br/>
+</pre><p>set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetListDoc"/>xmlSetListDoc ()</h3><pre class="programlisting">void xmlSetListDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>update all nodes in the list to point to the right document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>the first element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetNs"/>xmlSetNs ()</h3><pre class="programlisting">void xmlSetNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br/>
+</pre><p>Associate a namespace to a node, a posteriori.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetNsProp"/>xmlSetNsProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. The ns structure must be in scope, this is not checked</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetProp"/>xmlSetProp ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name (a QName)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetTreeDoc"/>xmlSetTreeDoc ()</h3><pre class="programlisting">void xmlSetTreeDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>update all nodes under the tree to point to the right document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the top element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSplitQName2"/>xmlSplitQName2 ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName2 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br/>
+</pre><p>parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSplitQName3"/>xmlSplitQName3 ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int * len)<br/>
+</pre><p>parse an XML qualified name string,i</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringGetNodeList"/>xmlStringGetNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStringLenGetNodeList"/>xmlStringLenGetNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringLenGetNodeList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int len)<br/>
+</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the text</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the string value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextConcat"/>xmlTextConcat ()</h3><pre class="programlisting">int xmlTextConcat (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Concat the given string at the end of the existing node content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>@content length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextMerge"/>xmlTextMerge ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextMerge (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second)<br/>
+</pre><p>Merge two text nodes into one</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>first</tt></i>:</span></td><td>the first text node</td></tr><tr><td><span class="term"><i><tt>second</tt></i>:</span></td><td>the second text node being merged</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first text node augmented</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUnlinkNode"/>xmlUnlinkNode ()</h3><pre class="programlisting">void xmlUnlinkNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUnsetNsProp"/>xmlUnsetNsProp ()</h3><pre class="programlisting">int xmlUnsetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUnsetProp"/>xmlUnsetProp ()</h3><pre class="programlisting">int xmlUnsetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. This handles only attributes in no namespace.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNCName"/>xmlValidateNCName ()</h3><pre class="programlisting">int xmlValidateNCName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
+</pre><p>Check that a value conforms to the lexical space of NCName</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNMToken"/>xmlValidateNMToken ()</h3><pre class="programlisting">int xmlValidateNMToken (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
+</pre><p>Check that a value conforms to the lexical space of NMToken</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateName"/>xmlValidateName ()</h3><pre class="programlisting">int xmlValidateName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
+</pre><p>Check that a value conforms to the lexical space of Name</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateQName"/>xmlValidateQName ()</h3><pre class="programlisting">int xmlValidateQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> int space)<br/>
+</pre><p>Check that a value conforms to the lexical space of QName</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-uri.html b/doc/devhelp/libxml2-uri.html
new file mode 100644
index 0000000..8b33c4e
--- /dev/null
+++ b/doc/devhelp/libxml2-uri.html
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>uri: library of generic URI related routines</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-tree.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-valid.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">uri</span>
+ </h2>
+ <p>uri - library of generic URI related routines</p>
+ <p>library of generic URI related routines Implements RFC 2396 </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlURI <a href="#xmlURI">xmlURI</a>;
+typedef <a href="libxml2-uri.html#xmlURI">xmlURI</a> * <a href="#xmlURIPtr">xmlURIPtr</a>;
+int <a href="#xmlNormalizeURIPath">xmlNormalizeURIPath</a> (char * path);
+void <a href="#xmlPrintURI">xmlPrintURI</a> (FILE * stream, <br/> <a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
+<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlParseURIRaw">xmlParseURIRaw</a> (const char * str, <br/> int raw);
+char * <a href="#xmlURIUnescapeString">xmlURIUnescapeString</a> (const char * str, <br/> int len, <br/> char * target);
+<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlParseURI">xmlParseURI</a> (const char * str);
+<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlCreateURI">xmlCreateURI</a> (void);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscapeStr">xmlURIEscapeStr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * list);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlPathToURI">xmlPathToURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCanonicPath">xmlCanonicPath</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path);
+void <a href="#xmlFreeURI">xmlFreeURI</a> (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
+int <a href="#xmlParseURIReference">xmlParseURIReference</a> (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br/> const char * str);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildRelativeURI">xmlBuildRelativeURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSaveUri">xmlSaveUri</a> (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscape">xmlURIEscape</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildURI">xmlBuildURI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlURI">Structure </a>xmlURI</h3><pre class="programlisting">struct _xmlURI {
+ char * scheme : the URI scheme
+ char * opaque : opaque part
+ char * authority : the authority part
+ char * server : the server part
+ char * user : the user part
+ int port : the port number
+ char * path : the path string
+ char * query : the query string (deprecated - use with caution)
+ char * fragment : the fragment identifier
+ int cleanup : parsing potentially unclean URI
+ char * query_raw : the query string (as it appears in the URI)
+} xmlURI;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlURIPtr">Typedef </a>xmlURIPtr</h3><pre class="programlisting"><a href="libxml2-uri.html#xmlURI">xmlURI</a> * xmlURIPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBuildRelativeURI"/>xmlBuildRelativeURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildRelativeURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base)<br/>
+</pre><p>Expresses the URI of the <a href="libxml2-SAX.html#reference">reference</a> in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI <a href="libxml2-SAX.html#reference">reference</a> is really wierd or complicated, it may be worthwhile to first convert it into a "nice" one by calling <a href="libxml2-uri.html#xmlBuildURI">xmlBuildURI</a> (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI <a href="libxml2-SAX.html#reference">reference</a> under consideration</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI string (to be freed by the caller) or NULL in case error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlBuildURI"/>xmlBuildURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base)<br/>
+</pre><p>Computes he final URI of the <a href="libxml2-SAX.html#reference">reference</a> done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI instance found in the document</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI string (to be freed by the caller) or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCanonicPath"/>xmlCanonicPath ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCanonicPath (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path)<br/>
+</pre><p>Constructs a canonic path from the specified path.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the resource locator in a filesystem notation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateURI"/>xmlCreateURI ()</h3><pre class="programlisting"><a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> xmlCreateURI (void)<br/>
+</pre><p>Simply creates an empty <a href="libxml2-uri.html#xmlURI">xmlURI</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeURI"/>xmlFreeURI ()</h3><pre class="programlisting">void xmlFreeURI (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br/>
+</pre><p>Free up the <a href="libxml2-uri.html#xmlURI">xmlURI</a> struct</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml2-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNormalizeURIPath"/>xmlNormalizeURIPath ()</h3><pre class="programlisting">int xmlNormalizeURIPath (char * path)<br/>
+</pre><p>Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>pointer to the path string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or an error code</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseURI"/>xmlParseURI ()</h3><pre class="programlisting"><a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURI (const char * str)<br/>
+</pre><p>Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the URI string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly built <a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseURIRaw"/>xmlParseURIRaw ()</h3><pre class="programlisting"><a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURIRaw (const char * str, <br/> int raw)<br/>
+</pre><p>Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the URI string to analyze</td></tr><tr><td><span class="term"><i><tt>raw</tt></i>:</span></td><td>if 1 unescaping of URI pieces are disabled</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly built <a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParseURIReference"/>xmlParseURIReference ()</h3><pre class="programlisting">int xmlParseURIReference (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br/> const char * str)<br/>
+</pre><p>Parse an URI <a href="libxml2-SAX.html#reference">reference</a> string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an URI structure</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or the error code</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPathToURI"/>xmlPathToURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlPathToURI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path)<br/>
+</pre><p>Constructs an URI expressing the existing path</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the resource locator in a filesystem notation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPrintURI"/>xmlPrintURI ()</h3><pre class="programlisting">void xmlPrintURI (FILE * stream, <br/> <a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br/>
+</pre><p>Prints the URI in the stream @stream.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>a FILE* for the output</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml2-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveUri"/>xmlSaveUri ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSaveUri (<a href="libxml2-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br/>
+</pre><p>Save the URI as an escaped string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml2-uri.html#xmlURI">xmlURI</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new string (to be deallocated by caller)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlURIEscape"/>xmlURIEscape ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlURIEscape (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string of the URI to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an copy of the string, but escaped 25 May 2001 Uses <a href="libxml2-uri.html#xmlParseURI">xmlParseURI</a> and <a href="libxml2-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a> to try to escape correctly according to RFC2396. - Carl Douglas</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlURIEscapeStr"/>xmlURIEscapeStr ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlURIEscapeStr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * list)<br/>
+</pre><p>This routine escapes a string to hex, ignoring reserved <a href="libxml2-SAX.html#characters">characters</a> (a-z) and the <a href="libxml2-SAX.html#characters">characters</a> in the exception list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>string to escape</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>exception list string of chars not to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new escaped string or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlURIUnescapeString"/>xmlURIUnescapeString ()</h3><pre class="programlisting">char * xmlURIUnescapeString (const char * str, <br/> int len, <br/> char * target)<br/>
+</pre><p>Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to unescape</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length in bytes to unescape (or &lt;= 0 to indicate full string)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>optional destination buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the string, but unescaped, will return NULL only in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-valid.html b/doc/devhelp/libxml2-valid.html
new file mode 100644
index 0000000..fcb68e7
--- /dev/null
+++ b/doc/devhelp/libxml2-valid.html
@@ -0,0 +1,528 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>valid: The DTD validation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-uri.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xinclude.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">valid</span>
+ </h2>
+ <p>valid - The DTD validation</p>
+ <p>API for the DTD handling and the validity checking </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a>;
+#define <a href="#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a>;
+typedef struct _xmlHashTable <a href="#xmlElementTable">xmlElementTable</a>;
+typedef <a href="libxml2-valid.html#xmlValidState">xmlValidState</a> * <a href="#xmlValidStatePtr">xmlValidStatePtr</a>;
+typedef <a href="libxml2-valid.html#xmlIDTable">xmlIDTable</a> * <a href="#xmlIDTablePtr">xmlIDTablePtr</a>;
+typedef <a href="libxml2-valid.html#xmlNotationTable">xmlNotationTable</a> * <a href="#xmlNotationTablePtr">xmlNotationTablePtr</a>;
+typedef struct _xmlValidCtxt <a href="#xmlValidCtxt">xmlValidCtxt</a>;
+typedef <a href="libxml2-valid.html#xmlElementTable">xmlElementTable</a> * <a href="#xmlElementTablePtr">xmlElementTablePtr</a>;
+typedef <a href="libxml2-valid.html#xmlRefTable">xmlRefTable</a> * <a href="#xmlRefTablePtr">xmlRefTablePtr</a>;
+typedef struct _xmlHashTable <a href="#xmlNotationTable">xmlNotationTable</a>;
+typedef struct _xmlHashTable <a href="#xmlRefTable">xmlRefTable</a>;
+typedef struct _xmlValidState <a href="#xmlValidState">xmlValidState</a>;
+typedef struct _xmlHashTable <a href="#xmlAttributeTable">xmlAttributeTable</a>;
+typedef <a href="libxml2-valid.html#xmlAttributeTable">xmlAttributeTable</a> * <a href="#xmlAttributeTablePtr">xmlAttributeTablePtr</a>;
+typedef struct _xmlHashTable <a href="#xmlIDTable">xmlIDTable</a>;
+typedef <a href="libxml2-valid.html#xmlValidCtxt">xmlValidCtxt</a> * <a href="#xmlValidCtxtPtr">xmlValidCtxtPtr</a>;
+void <a href="#xmlFreeNotationTable">xmlFreeNotationTable</a> (<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);
+int <a href="#xmlValidateNameValue">xmlValidateNameValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlSnprintfElementContent">xmlSnprintfElementContent</a> (char * buf, <br/> int size, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br/> int englob);
+<a href="libxml2-tree.html#xmlRefPtr">xmlRefPtr</a> <a href="#xmlAddRef">xmlAddRef</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+void <a href="#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr);
+int <a href="#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlValidateDtdFinal">xmlValidateDtdFinal</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlDumpAttributeTable">xmlDumpAttributeTable</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);
+<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCreateEnumeration">xmlCreateEnumeration</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlValidateOneAttribute">xmlValidateOneAttribute</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlValidGetValidElements">xmlValidGetValidElements</a> (<a href="libxml2-tree.html#xmlNode">xmlNode</a> * prev, <br/> <a href="libxml2-tree.html#xmlNode">xmlNode</a> * next, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int max);
+int <a href="#xmlIsMixedElement">xmlIsMixedElement</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlDumpNotationDecl">xmlDumpNotationDecl</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota);
+int <a href="#xmlIsID">xmlIsID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewDocElementContent">xmlNewDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type);
+void <a href="#xmlFreeAttributeTable">xmlFreeAttributeTable</a> (<a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);
+typedef void <a href="#xmlValidityErrorFunc">xmlValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+int <a href="#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr);
+<a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> <a href="#xmlCopyNotationTable">xmlCopyNotationTable</a> (<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);
+int <a href="#xmlValidateDocument">xmlValidateDocument</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int * len, <br/> int max);
+<a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlAddNotationDecl">xmlAddNotationDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID);
+int <a href="#xmlValidateElementDecl">xmlValidateElementDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem);
+<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlAddAttributeDecl">xmlAddAttributeDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/> <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree);
+<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlGetID">xmlGetID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID);
+<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> <a href="#xmlCopyElementTable">xmlCopyElementTable</a> (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
+<a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlGetRefs">xmlGetRefs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID);
+void <a href="#xmlSprintfElementContent">xmlSprintfElementContent</a> (char * buf, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br/> int englob);
+int <a href="#xmlValidateOneElement">xmlValidateOneElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int <a href="#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlDumpElementTable">xmlDumpElementTable</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlDumpElementDecl">xmlDumpElementDecl</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem);
+void <a href="#xmlFreeElementContent">xmlFreeElementContent</a> (<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
+int <a href="#xmlValidateOneNamespace">xmlValidateOneNamespace</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlValidatePushElement">xmlValidatePushElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname);
+int <a href="#xmlIsRef">xmlIsRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
+<a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="#xmlAddID">xmlAddID</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+void <a href="#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml2-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table);
+int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
+void <a href="#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml2-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table);
+void <a href="#xmlFreeValidCtxt">xmlFreeValidCtxt</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> cur);
+<a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> <a href="#xmlCopyAttributeTable">xmlCopyAttributeTable</a> (<a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyElementContent">xmlCopyElementContent</a> (<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
+int <a href="#xmlValidateAttributeValue">xmlValidateAttributeValue</a> (<a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlRemoveRef">xmlRemoveRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
+typedef void <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+int <a href="#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname);
+void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
+<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
+<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
+<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> <a href="#xmlNewValidCtxt">xmlNewValidCtxt</a> (void);
+void <a href="#xmlDumpNotationTable">xmlDumpNotationTable</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table);
+<a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlAddElementDecl">xmlAddElementDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlValidBuildContentModel">xmlValidBuildContentModel</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem);
+int <a href="#xmlValidateElement">xmlValidateElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+int <a href="#xmlValidateNotationUse">xmlValidateNotationUse</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName);
+int <a href="#xmlValidateRoot">xmlValidateRoot</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlValidateNotationDecl">xmlValidateNotationDecl</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota);
+<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewElementContent">xmlNewElementContent</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type);
+<a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlValidatePushCData">xmlValidatePushCData</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len);
+int <a href="#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+void <a href="#xmlFreeDocElementContent">xmlFreeDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_CTXT_FINISH_DTD_0">Macro </a>XML_CTXT_FINISH_DTD_0</h3><pre class="programlisting">#define <a href="#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a>;
+</pre><p>Special value for finishDtd field when embedded in an <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_CTXT_FINISH_DTD_1">Macro </a>XML_CTXT_FINISH_DTD_1</h3><pre class="programlisting">#define <a href="#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a>;
+</pre><p>Special value for finishDtd field when embedded in an <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttributeTable">Structure </a>xmlAttributeTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlAttributeTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAttributeTablePtr">Typedef </a>xmlAttributeTablePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlAttributeTable">xmlAttributeTable</a> * xmlAttributeTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementTable">Structure </a>xmlElementTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlElementTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlElementTablePtr">Typedef </a>xmlElementTablePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlElementTable">xmlElementTable</a> * xmlElementTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIDTable">Structure </a>xmlIDTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlIDTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIDTablePtr">Typedef </a>xmlIDTablePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlIDTable">xmlIDTable</a> * xmlIDTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNotationTable">Structure </a>xmlNotationTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlNotationTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNotationTablePtr">Typedef </a>xmlNotationTablePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlNotationTable">xmlNotationTable</a> * xmlNotationTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRefTable">Structure </a>xmlRefTable</h3><pre class="programlisting">struct _xmlHashTable {
+The content of this structure is not made public by the API.
+} xmlRefTable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRefTablePtr">Typedef </a>xmlRefTablePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlRefTable">xmlRefTable</a> * xmlRefTablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidCtxt">Structure </a>xmlValidCtxt</h3><pre class="programlisting">struct _xmlValidCtxt {
+ void * userData : user specific data block
+ <a href="libxml2-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a> error : the callback in case of errors
+ <a href="libxml2-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a> warning : the callback in case of warning Node analysis stack used when validat
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node
+ int nodeNr : Depth of the parsing stack
+ int nodeMax : Max depth of the parsing stack
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes
+ unsigned int finishDtd : finished validating the Dtd ?
+ <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc : the document
+ int valid : temporary validity check result state state used for non-determinist
+ <a href="libxml2-valid.html#xmlValidState">xmlValidState</a> * vstate : current state
+ int vstateNr : Depth of the validation stack
+ int vstateMax : Max depth of the validation stack
+ <a href="libxml2-valid.html#xmlValidState">xmlValidState</a> * vstateTab : array of validation states
+ <a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am : the automata
+ <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state : used to build the automata
+ void * am
+ void * state
+} xmlValidCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidCtxtPtr">Typedef </a>xmlValidCtxtPtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlValidCtxt">xmlValidCtxt</a> * xmlValidCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidState">Structure </a>xmlValidState</h3><pre class="programlisting">struct _xmlValidState {
+The content of this structure is not made public by the API.
+} xmlValidState;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidStatePtr">Typedef </a>xmlValidStatePtr</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlValidState">xmlValidState</a> * xmlValidStatePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidityErrorFunc"/>Function type xmlValidityErrorFunc</h3><pre class="programlisting">void xmlValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Callback called when a validity error is found. This is a message oriented function similar to an *printf function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>usually an <a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the string to format *printf like vararg</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>remaining arguments to the format</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidityWarningFunc"/>Function type xmlValidityWarningFunc</h3><pre class="programlisting">void xmlValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>usually an <a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the string to format *printf like vararg</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>remaining arguments to the format</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddAttributeDecl"/>xmlAddAttributeDecl ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlAddAttributeDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns, <br/> <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/> <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br/> <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br/>
+</pre><p>Register a new <a href="libxml2-SAX.html#attribute">attribute</a> declaration Note that @tree becomes the ownership of the DTD</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> namespace prefix</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default type</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>if it's an enumeration, the associated list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not new, otherwise the <a href="libxml2-SAX.html#attribute">attribute</a> decl</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddElementDecl"/>xmlAddElementDecl ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> xmlAddElementDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br/>
+</pre><p>Register a new element declaration</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element content tree or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddID"/>xmlAddID ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a> xmlAddID (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Register a new id declaration</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value name</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> holding the ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new <a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddNotationDecl"/>xmlAddNotationDecl ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlAddNotationDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br/>
+</pre><p>Register a new notation declaration</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>PublicID</tt></i>:</span></td><td>the public identifier or NULL</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system identifier or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAddRef"/>xmlAddRef ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlRefPtr">xmlRefPtr</a> xmlAddRef (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Register a new ref declaration</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value name</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> holding the Ref</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new <a href="libxml2-tree.html#xmlRefPtr">xmlRefPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyAttributeTable"/>xmlCopyAttributeTable ()</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> xmlCopyAttributeTable (<a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br/>
+</pre><p>Build a copy of an <a href="libxml2-SAX.html#attribute">attribute</a> table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml2-SAX.html#attribute">attribute</a> table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyDocElementContent"/>xmlCopyDocElementContent ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyDocElementContent (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br/>
+</pre><p>Build a copy of an element content description.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyElementContent"/>xmlCopyElementContent ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyElementContent (<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br/>
+</pre><p>Build a copy of an element content description. Deprecated, use <a href="libxml2-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyElementTable"/>xmlCopyElementTable ()</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> xmlCopyElementTable (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br/>
+</pre><p>Build a copy of an element table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyEnumeration"/>xmlCopyEnumeration ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCopyEnumeration (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br/>
+</pre><p>Copy an enumeration <a href="libxml2-SAX.html#attribute">attribute</a> node (recursive).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the tree to copy.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> just created or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyNotationTable"/>xmlCopyNotationTable ()</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> xmlCopyNotationTable (<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br/>
+</pre><p>Build a copy of a notation table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>A notation table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCreateEnumeration"/>xmlCreateEnumeration ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCreateEnumeration (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>create and initialize an enumeration <a href="libxml2-SAX.html#attribute">attribute</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the enumeration name or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> just created or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpAttributeDecl"/>xmlDumpAttributeDecl ()</h3><pre class="programlisting">void xmlDumpAttributeDecl (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)<br/>
+</pre><p>This will dump the content of the <a href="libxml2-SAX.html#attribute">attribute</a> declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>An <a href="libxml2-SAX.html#attribute">attribute</a> declaration</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpAttributeTable"/>xmlDumpAttributeTable ()</h3><pre class="programlisting">void xmlDumpAttributeTable (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br/>
+</pre><p>This will dump the content of the <a href="libxml2-SAX.html#attribute">attribute</a> table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml2-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpElementDecl"/>xmlDumpElementDecl ()</h3><pre class="programlisting">void xmlDumpElementDecl (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br/>
+</pre><p>This will dump the content of the element declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpElementTable"/>xmlDumpElementTable ()</h3><pre class="programlisting">void xmlDumpElementTable (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br/>
+</pre><p>This will dump the content of the element table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpNotationDecl"/>xmlDumpNotationDecl ()</h3><pre class="programlisting">void xmlDumpNotationDecl (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)<br/>
+</pre><p>This will dump the content the notation declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>nota</tt></i>:</span></td><td>A notation declaration</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlDumpNotationTable"/>xmlDumpNotationTable ()</h3><pre class="programlisting">void xmlDumpNotationTable (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br/>
+</pre><p>This will dump the content of the notation table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>A notation table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeAttributeTable"/>xmlFreeAttributeTable ()</h3><pre class="programlisting">void xmlFreeAttributeTable (<a href="libxml2-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml2-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeDocElementContent"/>xmlFreeDocElementContent ()</h3><pre class="programlisting">void xmlFreeDocElementContent (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br/>
+</pre><p>Free an element content structure. The whole subtree is removed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeElementContent"/>xmlFreeElementContent ()</h3><pre class="programlisting">void xmlFreeElementContent (<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br/>
+</pre><p>Free an element content structure. The whole subtree is removed. Deprecated, use <a href="libxml2-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeElementTable"/>xmlFreeElementTable ()</h3><pre class="programlisting">void xmlFreeElementTable (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an element hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeEnumeration"/>xmlFreeEnumeration ()</h3><pre class="programlisting">void xmlFreeEnumeration (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br/>
+</pre><p>free an enumeration <a href="libxml2-SAX.html#attribute">attribute</a> node (recursive).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the tree to free.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeIDTable"/>xmlFreeIDTable ()</h3><pre class="programlisting">void xmlFreeIDTable (<a href="libxml2-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an ID hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An id table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeNotationTable"/>xmlFreeNotationTable ()</h3><pre class="programlisting">void xmlFreeNotationTable (<a href="libxml2-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An notation table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeRefTable"/>xmlFreeRefTable ()</h3><pre class="programlisting">void xmlFreeRefTable (<a href="libxml2-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table)<br/>
+</pre><p>Deallocate the memory used by an Ref hash table.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An ref table</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeValidCtxt"/>xmlFreeValidCtxt ()</h3><pre class="programlisting">void xmlFreeValidCtxt (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> cur)<br/>
+</pre><p>Free a validation context structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the validation context to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdAttrDesc"/>xmlGetDtdAttrDesc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdAttrDesc (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search the DTD for the description of this <a href="libxml2-SAX.html#attribute">attribute</a> on this element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> if found or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdElementDesc"/>xmlGetDtdElementDesc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdElementDesc (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search the DTD for the description of this element</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> if found or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdNotationDesc"/>xmlGetDtdNotationDesc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlGetDtdNotationDesc (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search the DTD for the description of this notation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the notation name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> if found or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdQAttrDesc"/>xmlGetDtdQAttrDesc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdQAttrDesc (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Search the DTD for the description of this qualified <a href="libxml2-SAX.html#attribute">attribute</a> on this element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> if found or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetDtdQElementDesc"/>xmlGetDtdQElementDesc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdQElementDesc (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Search the DTD for the description of this element</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> if found or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetID"/>xmlGetID ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlGetID (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID)<br/>
+</pre><p>Search the <a href="libxml2-SAX.html#attribute">attribute</a> declaring the given ID</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the ID value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise the <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> defining the ID</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetRefs"/>xmlGetRefs ()</h3><pre class="programlisting"><a href="libxml2-list.html#xmlListPtr">xmlListPtr</a> xmlGetRefs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ID)<br/>
+</pre><p>Find the set of references for the supplied ID.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the ID value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise node set for the ID.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsID"/>xmlIsID ()</h3><pre class="programlisting">int xmlIsID (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Determine whether an <a href="libxml2-SAX.html#attribute">attribute</a> is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsMixedElement"/>xmlIsMixedElement ()</h3><pre class="programlisting">int xmlIsMixedElement (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no, 1 if yes, and -1 if no element description is available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIsRef"/>xmlIsRef ()</h3><pre class="programlisting">int xmlIsRef (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Determine whether an <a href="libxml2-SAX.html#attribute">attribute</a> is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewDocElementContent"/>xmlNewDocElementContent ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewDocElementContent (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br/>
+</pre><p>Allocate an element content structure for the document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewElementContent"/>xmlNewElementContent ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewElementContent (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br/>
+</pre><p>Allocate an element content structure. Deprecated in favor of <a href="libxml2-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewValidCtxt"/>xmlNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> xmlNewValidCtxt (void)<br/>
+</pre><p>Allocate a validation context structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new validation context structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRemoveID"/>xmlRemoveID ()</h3><pre class="programlisting">int xmlRemoveID (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Remove the given <a href="libxml2-SAX.html#attribute">attribute</a> from the ID table maintained internally.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if the lookup failed and 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRemoveRef"/>xmlRemoveRef ()</h3><pre class="programlisting">int xmlRemoveRef (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br/>
+</pre><p>Remove the given <a href="libxml2-SAX.html#attribute">attribute</a> from the Ref table maintained internally.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if the lookup failed and 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSnprintfElementContent"/>xmlSnprintfElementContent ()</h3><pre class="programlisting">void xmlSnprintfElementContent (char * buf, <br/> int size, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br/> int englob)<br/>
+</pre><p>This will dump the content of the element content definition Intended just for the debug routine</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output buffer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the buffer size</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>englob</tt></i>:</span></td><td>1 if one must print the englobing parenthesis, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSprintfElementContent"/>xmlSprintfElementContent ()</h3><pre class="programlisting">void xmlSprintfElementContent (char * buf, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br/> int englob)<br/>
+</pre><p>Deprecated, unsafe, use <a href="libxml2-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output buffer</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>englob</tt></i>:</span></td><td>1 if one must print the englobing parenthesis, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidBuildContentModel"/>xmlValidBuildContentModel ()</h3><pre class="programlisting">int xmlValidBuildContentModel (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br/>
+</pre><p>(Re)Build the automata associated to the content model of this element</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element declaration node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidCtxtNormalizeAttributeValue"/>xmlValidCtxtNormalizeAttributeValue ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlValidCtxtNormalizeAttributeValue (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Does the validation related extra step of the normalization of <a href="libxml2-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml2-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml2-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt-&gt;valid accordingly</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidGetPotentialChildren"/>xmlValidGetPotentialChildren ()</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int * len, <br/> int max)<br/>
+</pre><p>Build/extend a list of potential children allowed by the content tree</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidGetValidElements"/>xmlValidGetValidElements ()</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml2-tree.html#xmlNode">xmlNode</a> * prev, <br/> <a href="libxml2-tree.html#xmlNode">xmlNode</a> * next, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** names, <br/> int max)<br/>
+</pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node-&gt;prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node-&gt;next, ... to replace 'node': xmlValidGetValidElements(node-&gt;prev, node-&gt;next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node-&gt;childs, to append a child to 'node': xmlValidGetValidElements(node-&gt;last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>an element to insert after</td></tr><tr><td><span class="term"><i><tt>next</tt></i>:</span></td><td>an element to insert next</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidNormalizeAttributeValue"/>xmlValidNormalizeAttributeValue ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlValidNormalizeAttributeValue (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Does the validation related extra step of the normalization of <a href="libxml2-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml2-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml2-SAX.html#characters">characters</a> by single space (#x20) character.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateAttributeDecl"/>xmlValidateAttributeDecl ()</h3><pre class="programlisting">int xmlValidateAttributeDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)<br/>
+</pre><p>Try to validate a single <a href="libxml2-SAX.html#attribute">attribute</a> definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Default Legal ] - [ VC: Enumeration ] - [ VC: ID Attribute Default ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateAttributeValue"/>xmlValidateAttributeValue ()</h3><pre class="programlisting">int xmlValidateAttributeValue (<a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Validate that the given <a href="libxml2-SAX.html#attribute">attribute</a> value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateDocument"/>xmlValidateDocument ()</h3><pre class="programlisting">int xmlValidateDocument (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateDocumentFinal"/>xmlValidateDocumentFinal ()</h3><pre class="programlisting">int xmlValidateDocumentFinal (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateDtd"/>xmlValidateDtd ()</h3><pre class="programlisting">int xmlValidateDtd (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br/>
+</pre><p>Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a dtd instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateDtdFinal"/>xmlValidateDtdFinal ()</h3><pre class="programlisting">int xmlValidateDtdFinal (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 if invalid and -1 if not well-formed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateElement"/>xmlValidateElement ()</h3><pre class="programlisting">int xmlValidateElement (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Try to validate the subtree under an element</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateElementDecl"/>xmlValidateElementDecl ()</h3><pre class="programlisting">int xmlValidateElementDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br/>
+</pre><p>Try to validate a single element definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: One ID per Element Type ] - [ VC: No Duplicate Types ] - [ VC: Unique Element Type Declaration ]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNameValue"/>xmlValidateNameValue ()</h3><pre class="programlisting">int xmlValidateNameValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Validate that the given value match Name production</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Name value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNamesValue"/>xmlValidateNamesValue ()</h3><pre class="programlisting">int xmlValidateNamesValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Validate that the given value match Names production</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Names value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNmtokenValue"/>xmlValidateNmtokenValue ()</h3><pre class="programlisting">int xmlValidateNmtokenValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Validate that the given value match Nmtoken production [ VC: Name Token ]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Nmtoken value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNmtokensValue"/>xmlValidateNmtokensValue ()</h3><pre class="programlisting">int xmlValidateNmtokensValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Validate that the given value match Nmtokens production [ VC: Name Token ]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Nmtokens value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNotationDecl"/>xmlValidateNotationDecl ()</h3><pre class="programlisting">int xmlValidateNotationDecl (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)<br/>
+</pre><p>Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: - it seems that no validity constraint exists on notation declarations But this function get called anyway ...</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>nota</tt></i>:</span></td><td>a notation definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateNotationUse"/>xmlValidateNotationUse ()</h3><pre class="programlisting">int xmlValidateNotationUse (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br/>
+</pre><p>Validate that the given name match a notation declaration. - [ VC: Notation Declared ]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the notation name to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateOneAttribute"/>xmlValidateOneAttribute ()</h3><pre class="programlisting">int xmlValidateOneAttribute (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Try to validate a single <a href="libxml2-SAX.html#attribute">attribute</a> for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>an <a href="libxml2-SAX.html#attribute">attribute</a> instance</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value (without entities processing)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateOneElement"/>xmlValidateOneElement ()</h3><pre class="programlisting">int xmlValidateOneElement (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each <a href="libxml2-SAX.html#attribute">attribute</a> present. The ID/IDREF checkings are done separately</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateOneNamespace"/>xmlValidateOneNamespace ()</h3><pre class="programlisting">int xmlValidateOneNamespace (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>an namespace declaration instance</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml2-SAX.html#attribute">attribute</a> value (without entities processing)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidatePopElement"/>xmlValidatePopElement ()</h3><pre class="programlisting">int xmlValidatePopElement (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname)<br/>
+</pre><p>Pop the element end from the validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidatePushCData"/>xmlValidatePushCData ()</h3><pre class="programlisting">int xmlValidatePushCData (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * data, <br/> int len)<br/>
+</pre><p>check the CData parsed for validation in the current stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidatePushElement"/>xmlValidatePushElement ()</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname)<br/>
+</pre><p>Push a new element start on the validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlValidateRoot"/>xmlValidateRoot ()</h3><pre class="programlisting">int xmlValidateRoot (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xinclude.html b/doc/devhelp/libxml2-xinclude.html
new file mode 100644
index 0000000..12a61d5
--- /dev/null
+++ b/doc/devhelp/libxml2-xinclude.html
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xinclude: implementation of XInclude</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-valid.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xlink.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xinclude</span>
+ </h2>
+ <p>xinclude - implementation of XInclude</p>
+ <p>API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a>;
+#define <a href="#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a>;
+#define <a href="#XINCLUDE_HREF">XINCLUDE_HREF</a>;
+#define <a href="#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a>;
+#define <a href="#XINCLUDE_NS">XINCLUDE_NS</a>;
+#define <a href="#XINCLUDE_PARSE">XINCLUDE_PARSE</a>;
+#define <a href="#XINCLUDE_NODE">XINCLUDE_NODE</a>;
+#define <a href="#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a>;
+#define <a href="#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a>;
+#define <a href="#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a>;
+typedef struct _xmlXIncludeCtxt <a href="#xmlXIncludeCtxt">xmlXIncludeCtxt</a>;
+typedef <a href="libxml2-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a> * <a href="#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a>;
+int <a href="#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> int flags, <br/> void * data);
+int <a href="#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int flags, <br/> void * data);
+int <a href="#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int flags);
+int <a href="#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree);
+int <a href="#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a> (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a> (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt);
+int <a href="#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a> (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br/> int flags);
+int <a href="#xmlXIncludeProcess">xmlXIncludeProcess</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> <a href="#xmlXIncludeNewContext">xmlXIncludeNewContext</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> int flags);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_FALLBACK">Macro </a>XINCLUDE_FALLBACK</h3><pre class="programlisting">#define <a href="#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a>;
+</pre><p>Macro defining "fallback"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_HREF">Macro </a>XINCLUDE_HREF</h3><pre class="programlisting">#define <a href="#XINCLUDE_HREF">XINCLUDE_HREF</a>;
+</pre><p>Macro defining "href"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_NODE">Macro </a>XINCLUDE_NODE</h3><pre class="programlisting">#define <a href="#XINCLUDE_NODE">XINCLUDE_NODE</a>;
+</pre><p>Macro defining "include"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_NS">Macro </a>XINCLUDE_NS</h3><pre class="programlisting">#define <a href="#XINCLUDE_NS">XINCLUDE_NS</a>;
+</pre><p>Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_OLD_NS">Macro </a>XINCLUDE_OLD_NS</h3><pre class="programlisting">#define <a href="#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a>;
+</pre><p>Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_PARSE">Macro </a>XINCLUDE_PARSE</h3><pre class="programlisting">#define <a href="#XINCLUDE_PARSE">XINCLUDE_PARSE</a>;
+</pre><p>Macro defining "parse"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_PARSE_ENCODING">Macro </a>XINCLUDE_PARSE_ENCODING</h3><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a>;
+</pre><p>Macro defining "encoding"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_PARSE_TEXT">Macro </a>XINCLUDE_PARSE_TEXT</h3><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a>;
+</pre><p>Macro defining "text"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_PARSE_XML">Macro </a>XINCLUDE_PARSE_XML</h3><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a>;
+</pre><p>Macro defining "xml"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XINCLUDE_PARSE_XPOINTER">Macro </a>XINCLUDE_PARSE_XPOINTER</h3><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a>;
+</pre><p>Macro defining "xpointer"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeCtxt">Structure </a>xmlXIncludeCtxt</h3><pre class="programlisting">struct _xmlXIncludeCtxt {
+The content of this structure is not made public by the API.
+} xmlXIncludeCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeCtxtPtr">Typedef </a>xmlXIncludeCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a> * xmlXIncludeCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeFreeContext"/>xmlXIncludeFreeContext ()</h3><pre class="programlisting">void xmlXIncludeFreeContext (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt)<br/>
+</pre><p>Free an XInclude context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XInclude context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeNewContext"/>xmlXIncludeNewContext ()</h3><pre class="programlisting"><a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> xmlXIncludeNewContext (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Creates a new XInclude context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML Document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcess"/>xmlXIncludeProcess ()</h3><pre class="programlisting">int xmlXIncludeProcess (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessFlags"/>xmlXIncludeProcessFlags ()</h3><pre class="programlisting">int xmlXIncludeProcessFlags (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int flags)<br/>
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessFlagsData"/>xmlXIncludeProcessFlagsData ()</h3><pre class="programlisting">int xmlXIncludeProcessFlagsData (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> int flags, <br/> void * data)<br/>
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>application data that will be passed to the parser context in the _private field of the parser context(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessNode"/>xmlXIncludeProcessNode ()</h3><pre class="programlisting">int xmlXIncludeProcessNode (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an existing XInclude context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessTree"/>xmlXIncludeProcessTree ()</h3><pre class="programlisting">int xmlXIncludeProcessTree (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br/>
+</pre><p>Implement the XInclude substitution for the given subtree</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessTreeFlags"/>xmlXIncludeProcessTreeFlags ()</h3><pre class="programlisting">int xmlXIncludeProcessTreeFlags (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> int flags)<br/>
+</pre><p>Implement the XInclude substitution for the given subtree</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeProcessTreeFlagsData"/>xmlXIncludeProcessTreeFlagsData ()</h3><pre class="programlisting">int xmlXIncludeProcessTreeFlagsData (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br/> int flags, <br/> void * data)<br/>
+</pre><p>Implement the XInclude substitution on the XML node @tree</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>an XML node</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>application data that will be passed to the parser context in the _private field of the parser context(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXIncludeSetFlags"/>xmlXIncludeSetFlags ()</h3><pre class="programlisting">int xmlXIncludeSetFlags (<a href="libxml2-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br/> int flags)<br/>
+</pre><p>Set the flags used for further processing of XML resources.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XInclude processing context</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xlink.html b/doc/devhelp/libxml2-xlink.html
new file mode 100644
index 0000000..abe6965
--- /dev/null
+++ b/doc/devhelp/libxml2-xlink.html
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xlink: unfinished XLink detection module</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xinclude.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlIO.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xlink</span>
+ </h2>
+ <p>xlink - unfinished XLink detection module</p>
+ <p>unfinished XLink detection module </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xlinkTitle">xlinkTitle</a>;
+typedef enum <a href="#xlinkShow">xlinkShow</a>;
+typedef <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xlinkHRef">xlinkHRef</a>;
+typedef enum <a href="#xlinkActuate">xlinkActuate</a>;
+typedef struct _xlinkHandler <a href="#xlinkHandler">xlinkHandler</a>;
+typedef <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xlinkRole">xlinkRole</a>;
+typedef <a href="libxml2-xlink.html#xlinkHandler">xlinkHandler</a> * <a href="#xlinkHandlerPtr">xlinkHandlerPtr</a>;
+typedef enum <a href="#xlinkType">xlinkType</a>;
+void <a href="#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a> (<a href="libxml2-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> func);
+void <a href="#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a> (<a href="libxml2-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> handler);
+typedef void <a href="#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int nbLocators, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * roles, <br/> int nbArcs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * from, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * to, <br/> <a href="libxml2-xlink.html#xlinkShow">xlinkShow</a> * show, <br/> <a href="libxml2-xlink.html#xlinkActuate">xlinkActuate</a> * actuate, <br/> int nbTitles, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langs);
+typedef void <a href="#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int nbLocators, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * roles, <br/> int nbTitles, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langs);
+typedef void <a href="#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> href, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> role, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> title);
+typedef void <a href="#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+<a href="libxml2-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> <a href="#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a> (void);
+<a href="libxml2-xlink.html#xlinkType">xlinkType</a> <a href="#xlinkIsLink">xlinkIsLink</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+<a href="libxml2-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> <a href="#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a> (void);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xlinkActuate">Enum </a>xlinkActuate</h3><pre class="programlisting">enum <a href="#xlinkActuate">xlinkActuate</a> {
+ <a name="XLINK_ACTUATE_NONE">XLINK_ACTUATE_NONE</a> = 0
+ <a name="XLINK_ACTUATE_AUTO">XLINK_ACTUATE_AUTO</a> = 1
+ <a name="XLINK_ACTUATE_ONREQUEST">XLINK_ACTUATE_ONREQUEST</a> = 2
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkHRef">Typedef </a>xlinkHRef</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xlinkHRef;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkHandler">Structure </a>xlinkHandler</h3><pre class="programlisting">struct _xlinkHandler {
+ <a href="libxml2-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a> simple
+ <a href="libxml2-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a> extended
+ <a href="libxml2-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a> set
+} xlinkHandler;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkHandlerPtr">Typedef </a>xlinkHandlerPtr</h3><pre class="programlisting"><a href="libxml2-xlink.html#xlinkHandler">xlinkHandler</a> * xlinkHandlerPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkRole">Typedef </a>xlinkRole</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xlinkRole;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkShow">Enum </a>xlinkShow</h3><pre class="programlisting">enum <a href="#xlinkShow">xlinkShow</a> {
+ <a name="XLINK_SHOW_NONE">XLINK_SHOW_NONE</a> = 0
+ <a name="XLINK_SHOW_NEW">XLINK_SHOW_NEW</a> = 1
+ <a name="XLINK_SHOW_EMBED">XLINK_SHOW_EMBED</a> = 2
+ <a name="XLINK_SHOW_REPLACE">XLINK_SHOW_REPLACE</a> = 3
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkTitle">Typedef </a>xlinkTitle</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xlinkTitle;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkType">Enum </a>xlinkType</h3><pre class="programlisting">enum <a href="#xlinkType">xlinkType</a> {
+ <a name="XLINK_TYPE_NONE">XLINK_TYPE_NONE</a> = 0
+ <a name="XLINK_TYPE_SIMPLE">XLINK_TYPE_SIMPLE</a> = 1
+ <a name="XLINK_TYPE_EXTENDED">XLINK_TYPE_EXTENDED</a> = 2
+ <a name="XLINK_TYPE_EXTENDED_SET">XLINK_TYPE_EXTENDED_SET</a> = 3
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkExtendedLinkFunk"/>Function type xlinkExtendedLinkFunk</h3><pre class="programlisting">void xlinkExtendedLinkFunk (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int nbLocators, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * roles, <br/> int nbArcs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * from, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * to, <br/> <a href="libxml2-xlink.html#xlinkShow">xlinkShow</a> * show, <br/> <a href="libxml2-xlink.html#xlinkActuate">xlinkActuate</a> * actuate, <br/> int nbTitles, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langs)<br/>
+</pre><p>This is the prototype for a extended link detection callback.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>nbLocators</tt></i>:</span></td><td>the number of locators detected on the link</td></tr><tr><td><span class="term"><i><tt>hrefs</tt></i>:</span></td><td>pointer to the array of locator hrefs</td></tr><tr><td><span class="term"><i><tt>roles</tt></i>:</span></td><td>pointer to the array of locator roles</td></tr><tr><td><span class="term"><i><tt>nbArcs</tt></i>:</span></td><td>the number of arcs detected on the link</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>pointer to the array of source roles found on the arcs</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>pointer to the array of target roles found on the arcs</td></tr><tr><td><span class="term"><i><tt>show</tt></i>:</span></td><td>array of values for the show attributes found on the arcs</td></tr><tr><td><span class="term"><i><tt>actuate</tt></i>:</span></td><td>array of values for the actuate attributes found on the arcs</td></tr><tr><td><span class="term"><i><tt>nbTitles</tt></i>:</span></td><td>the number of titles detected on the link</td></tr><tr><td><span class="term"><i><tt>titles</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>langs</tt></i>:</span></td><td>array of xml:lang values for the titles</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkExtendedLinkSetFunk"/>Function type xlinkExtendedLinkSetFunk</h3><pre class="programlisting">void xlinkExtendedLinkSetFunk (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int nbLocators, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> * roles, <br/> int nbTitles, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langs)<br/>
+</pre><p>This is the prototype for a extended link set detection callback.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>nbLocators</tt></i>:</span></td><td>the number of locators detected on the link</td></tr><tr><td><span class="term"><i><tt>hrefs</tt></i>:</span></td><td>pointer to the array of locator hrefs</td></tr><tr><td><span class="term"><i><tt>roles</tt></i>:</span></td><td>pointer to the array of locator roles</td></tr><tr><td><span class="term"><i><tt>nbTitles</tt></i>:</span></td><td>the number of titles detected on the link</td></tr><tr><td><span class="term"><i><tt>titles</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>langs</tt></i>:</span></td><td>array of xml:lang values for the titles</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkNodeDetectFunc"/>Function type xlinkNodeDetectFunc</h3><pre class="programlisting">void xlinkNodeDetectFunc (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to check</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkSimpleLinkFunk"/>Function type xlinkSimpleLinkFunk</h3><pre class="programlisting">void xlinkSimpleLinkFunk (void * ctx, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xlink.html#xlinkHRef">xlinkHRef</a> href, <br/> const <a href="libxml2-xlink.html#xlinkRole">xlinkRole</a> role, <br/> const <a href="libxml2-xlink.html#xlinkTitle">xlinkTitle</a> title)<br/>
+</pre><p>This is the prototype for a simple link detection callback.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the target of the link</td></tr><tr><td><span class="term"><i><tt>role</tt></i>:</span></td><td>the role string</td></tr><tr><td><span class="term"><i><tt>title</tt></i>:</span></td><td>the link title</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkGetDefaultDetect"/>xlinkGetDefaultDetect ()</h3><pre class="programlisting"><a href="libxml2-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> xlinkGetDefaultDetect (void)<br/>
+</pre><p>Get the default xlink detection routine</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current function or NULL;</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkGetDefaultHandler"/>xlinkGetDefaultHandler ()</h3><pre class="programlisting"><a href="libxml2-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> xlinkGetDefaultHandler (void)<br/>
+</pre><p>Get the default xlink handler.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml2-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> value.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkIsLink"/>xlinkIsLink ()</h3><pre class="programlisting"><a href="libxml2-xlink.html#xlinkType">xlinkType</a> xlinkIsLink (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don't try to do full checking of the link validity but tries to detect and return the appropriate link type.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the node</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node pointer itself</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xlink.html#xlinkType">xlinkType</a> of the node (XLINK_TYPE_NONE if there is no link detected.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkSetDefaultDetect"/>xlinkSetDefaultDetect ()</h3><pre class="programlisting">void xlinkSetDefaultDetect (<a href="libxml2-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> func)<br/>
+</pre><p>Set the default xlink detection routine</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>pointer to the new detection routine.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xlinkSetDefaultHandler"/>xlinkSetDefaultHandler ()</h3><pre class="programlisting">void xlinkSetDefaultHandler (<a href="libxml2-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> handler)<br/>
+</pre><p>Set the default xlink handlers</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new value for the xlink handler block</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlIO.html b/doc/devhelp/libxml2-xmlIO.html
new file mode 100644
index 0000000..5bccc27
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlIO.html
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlIO: interface for the I/O interfaces used by the parser</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xlink.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlautomata.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlIO</span>
+ </h2>
+ <p>xmlIO - interface for the I/O interfaces used by the parser</p>
+ <p>interface for the I/O interfaces used by the parser </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">int <a href="#xmlIOHTTPRead">xmlIOHTTPRead</a> (void * context, <br/> char * buffer, <br/> int len);
+typedef int <a href="#xmlInputMatchCallback">xmlInputMatchCallback</a> (char const * filename);
+void <a href="#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a> (void);
+int <a href="#xmlFileClose">xmlFileClose</a> (void * context);
+typedef int <a href="#xmlOutputMatchCallback">xmlOutputMatchCallback</a> (char const * filename);
+int <a href="#xmlParserInputBufferPush">xmlParserInputBufferPush</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len, <br/> const char * buf);
+int <a href="#xmlIOFTPRead">xmlIOFTPRead</a> (void * context, <br/> char * buffer, <br/> int len);
+void <a href="#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a> (void);
+void * <a href="#xmlIOFTPOpen">xmlIOFTPOpen</a> (const char * filename);
+int <a href="#xmlIOFTPClose">xmlIOFTPClose</a> (void * context);
+void * <a href="#xmlFileOpen">xmlFileOpen</a> (const char * filename);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a> (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
+int <a href="#xmlCheckFilename">xmlCheckFilename</a> (const char * path);
+typedef void * <a href="#xmlOutputOpenCallback">xmlOutputOpenCallback</a> (char const * filename);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+int <a href="#xmlOutputBufferClose">xmlOutputBufferClose</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a> (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a> (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
+typedef int <a href="#xmlOutputWriteCallback">xmlOutputWriteCallback</a> (void * context, <br/> const char * buffer, <br/> int len);
+int <a href="#xmlOutputBufferFlush">xmlOutputBufferFlush</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlCheckHTTPInput">xmlCheckHTTPInput</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret);
+int <a href="#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a> (<a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a> (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+int <a href="#xmlIOFTPMatch">xmlIOFTPMatch</a> (const char * filename);
+int <a href="#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> (<a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc);
+void <a href="#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in);
+void <a href="#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a> (void);
+int <a href="#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len);
+typedef int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a> (void * context);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a> (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
+<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
+int <a href="#xmlIOHTTPMatch">xmlIOHTTPMatch</a> (const char * filename);
+void * <a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a> (const char * filename);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a> (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path);
+typedef int <a href="#xmlInputReadCallback">xmlInputReadCallback</a> (void * context, <br/> char * buffer, <br/> int len);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a> (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
+int <a href="#xmlIOHTTPClose">xmlIOHTTPClose</a> (void * context);
+int <a href="#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping);
+<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a> (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression);
+size_t <a href="#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
+void <a href="#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a> (void);
+typedef void * <a href="#xmlInputOpenCallback">xmlInputOpenCallback</a> (char const * filename);
+int <a href="#xmlParserInputBufferRead">xmlParserInputBufferRead</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len);
+int <a href="#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const char * str);
+int <a href="#xmlFileMatch">xmlFileMatch</a> (const char * filename);
+int <a href="#xmlPopInputCallbacks">xmlPopInputCallbacks</a> (void);
+int <a href="#xmlFileRead">xmlFileRead</a> (void * context, <br/> char * buffer, <br/> int len);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a> (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+char * <a href="#xmlParserGetDirectory">xmlParserGetDirectory</a> (const char * filename);
+int <a href="#xmlOutputBufferWrite">xmlOutputBufferWrite</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> int len, <br/> const char * buf);
+void <a href="#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a> (void);
+typedef int <a href="#xmlInputCloseCallback">xmlInputCloseCallback</a> (void * context);
+void * <a href="#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a> (const char * post_uri, <br/> int compression);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a> (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlInputCloseCallback"/>Function type xmlInputCloseCallback</h3><pre class="programlisting">int xmlInputCloseCallback (void * context)<br/>
+</pre><p>Callback used in the I/O Input API to close the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInputMatchCallback"/>Function type xmlInputMatchCallback</h3><pre class="programlisting">int xmlInputMatchCallback (char const * filename)<br/>
+</pre><p>Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Input module should be used</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInputOpenCallback"/>Function type xmlInputOpenCallback</h3><pre class="programlisting">void * xmlInputOpenCallback (char const * filename)<br/>
+</pre><p>Callback used in the I/O Input API to open the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Input context or NULL in case or error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInputReadCallback"/>Function type xmlInputReadCallback</h3><pre class="programlisting">int xmlInputReadCallback (void * context, <br/> char * buffer, <br/> int len)<br/>
+</pre><p>Callback used in the I/O Input API to read the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer to store data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes read or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputCloseCallback"/>Function type xmlOutputCloseCallback</h3><pre class="programlisting">int xmlOutputCloseCallback (void * context)<br/>
+</pre><p>Callback used in the I/O Output API to close the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputMatchCallback"/>Function type xmlOutputMatchCallback</h3><pre class="programlisting">int xmlOutputMatchCallback (char const * filename)<br/>
+</pre><p>Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Output module should be used</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputOpenCallback"/>Function type xmlOutputOpenCallback</h3><pre class="programlisting">void * xmlOutputOpenCallback (char const * filename)<br/>
+</pre><p>Callback used in the I/O Output API to open the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Output context or NULL in case or error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputWriteCallback"/>Function type xmlOutputWriteCallback</h3><pre class="programlisting">int xmlOutputWriteCallback (void * context, <br/> const char * buffer, <br/> int len)<br/>
+</pre><p>Callback used in the I/O Output API to write to the resource</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer of data to write</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAllocOutputBuffer"/>xmlAllocOutputBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlAllocOutputBuffer (<a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered parser output</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAllocParserInputBuffer"/>xmlAllocParserInputBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlAllocParserInputBuffer (<a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for progressive parsing</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCheckFilename"/>xmlCheckFilename ()</h3><pre class="programlisting">int xmlCheckFilename (const char * path)<br/>
+</pre><p>function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the path to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCheckHTTPInput"/>xmlCheckHTTPInput ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlCheckHTTPInput (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret)<br/>
+</pre><p>Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ret</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the input or NULL in case of HTTP error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupInputCallbacks"/>xmlCleanupInputCallbacks ()</h3><pre class="programlisting">void xmlCleanupInputCallbacks (void)<br/>
+</pre><p>clears the entire input callback table. this includes the compiled-in I/O.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupOutputCallbacks"/>xmlCleanupOutputCallbacks ()</h3><pre class="programlisting">void xmlCleanupOutputCallbacks (void)<br/>
+</pre><p>clears the entire output callback table. this includes the compiled-in I/O callbacks.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFileClose"/>xmlFileClose ()</h3><pre class="programlisting">int xmlFileClose (void * context)<br/>
+</pre><p>Close an I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFileMatch"/>xmlFileMatch ()</h3><pre class="programlisting">int xmlFileMatch (const char * filename)<br/>
+</pre><p>input from FILE *</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFileOpen"/>xmlFileOpen ()</h3><pre class="programlisting">void * xmlFileOpen (const char * filename)<br/>
+</pre><p>Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handler or NULL in case or failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFileRead"/>xmlFileRead ()</h3><pre class="programlisting">int xmlFileRead (void * context, <br/> char * buffer, <br/> int len)<br/>
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or &lt; 0 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeParserInputBuffer"/>xmlFreeParserInputBuffer ()</h3><pre class="programlisting">void xmlFreeParserInputBuffer (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in)<br/>
+</pre><p>Free up the memory used by a buffered parser input</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOFTPClose"/>xmlIOFTPClose ()</h3><pre class="programlisting">int xmlIOFTPClose (void * context)<br/>
+</pre><p>Close an FTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOFTPMatch"/>xmlIOFTPMatch ()</h3><pre class="programlisting">int xmlIOFTPMatch (const char * filename)<br/>
+</pre><p>check if the URI matches an FTP one</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOFTPOpen"/>xmlIOFTPOpen ()</h3><pre class="programlisting">void * xmlIOFTPOpen (const char * filename)<br/>
+</pre><p>open an FTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOFTPRead"/>xmlIOFTPRead ()</h3><pre class="programlisting">int xmlIOFTPRead (void * context, <br/> char * buffer, <br/> int len)<br/>
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPClose"/>xmlIOHTTPClose ()</h3><pre class="programlisting">int xmlIOHTTPClose (void * context)<br/>
+</pre><p>Close an HTTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPMatch"/>xmlIOHTTPMatch ()</h3><pre class="programlisting">int xmlIOHTTPMatch (const char * filename)<br/>
+</pre><p>check if the URI matches an HTTP one</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpen"/>xmlIOHTTPOpen ()</h3><pre class="programlisting">void * xmlIOHTTPOpen (const char * filename)<br/>
+</pre><p>open an HTTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPOpenW"/>xmlIOHTTPOpenW ()</h3><pre class="programlisting">void * xmlIOHTTPOpenW (const char * post_uri, <br/> int compression)<br/>
+</pre><p>Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>post_uri</tt></i>:</span></td><td>The destination URI for the document</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>The compression desired for the document.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlIOHTTPRead"/>xmlIOHTTPRead ()</h3><pre class="programlisting">int xmlIOHTTPRead (void * context, <br/> char * buffer, <br/> int len)<br/>
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNoNetExternalEntityLoader"/>xmlNoNetExternalEntityLoader ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNoNetExternalEntityLoader (const char * URL, <br/> const char * ID, <br/> <a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br/>
+</pre><p>A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context in which the entity is called or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated xmlParserInputPtr, or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNormalizeWindowsPath"/>xmlNormalizeWindowsPath ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNormalizeWindowsPath (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * path)<br/>
+</pre><p>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the input file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a canonicalized version of the path</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferClose"/>xmlOutputBufferClose ()</h3><pre class="programlisting">int xmlOutputBufferClose (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
+</pre><p>flushes and close the output I/O channel and free up all the associated resources</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateBuffer"/>xmlOutputBufferCreateBuffer ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateBuffer (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered output for the progressive saving to a <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFd"/>xmlOutputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered output for the progressive saving to a file descriptor</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFile"/>xmlOutputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFile (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered output for the progressive saving to a FILE * buffered C I/O</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateFilename"/>xmlOutputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilename (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br/> int compression)<br/>
+</pre><p>Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression ration (0 none, 9 max).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferCreateIO"/>xmlOutputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateIO (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br/>
+</pre><p>Create a buffered output for the progressive saving to an I/O handler</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferFlush"/>xmlOutputBufferFlush ()</h3><pre class="programlisting">int xmlOutputBufferFlush (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
+</pre><p>flushes the output I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferGetContent"/>xmlOutputBufferGetContent ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlOutputBufferGetContent (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
+</pre><p>Gives a pointer to the data currently held in the output buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the data or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferGetSize"/>xmlOutputBufferGetSize ()</h3><pre class="programlisting">size_t xmlOutputBufferGetSize (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
+</pre><p>Gives the length of the data currently held in the output buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case or error or no data is held, the size otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWrite"/>xmlOutputBufferWrite ()</h3><pre class="programlisting">int xmlOutputBufferWrite (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> int len, <br/> const char * buf)<br/>
+</pre><p>Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWriteEscape"/>xmlOutputBufferWriteEscape ()</h3><pre class="programlisting">int xmlOutputBufferWriteEscape (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping)<br/>
+</pre><p>Write the content of the string in the output I/O buffer This routine escapes the caracters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated UTF-8 string</td></tr><tr><td><span class="term"><i><tt>escaping</tt></i>:</span></td><td>an optional escaping function (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlOutputBufferWriteString"/>xmlOutputBufferWriteString ()</h3><pre class="programlisting">int xmlOutputBufferWriteString (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br/> const char * str)<br/>
+</pre><p>Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated C string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserGetDirectory"/>xmlParserGetDirectory ()</h3><pre class="programlisting">char * xmlParserGetDirectory (const char * filename)<br/>
+</pre><p>lookup the directory for that file</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to a file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated string containing the directory, or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFd"/>xmlParserInputBufferCreateFd ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFd (int fd, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing for the input from a file descriptor</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFile"/>xmlParserInputBufferCreateFile ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFile (FILE * file, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateFilename"/>xmlParserInputBufferCreateFilename ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilename (const char * URI, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == <a href="libxml2-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateIO"/>xmlParserInputBufferCreateIO ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing for the input from an I/O handler</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateMem"/>xmlParserInputBufferCreateMem ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateMem (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing for the input from a memory area.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferCreateStatic"/>xmlParserInputBufferCreateStatic ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateStatic (const char * mem, <br/> int size, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br/>
+</pre><p>Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap'ed file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferGrow"/>xmlParserInputBufferGrow ()</h3><pre class="programlisting">int xmlParserInputBufferGrow (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len)<br/>
+</pre><p>Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in-&gt;buffer or in-&gt;raw</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferPush"/>xmlParserInputBufferPush ()</h3><pre class="programlisting">int xmlParserInputBufferPush (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len, <br/> const char * buf)<br/>
+</pre><p>Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserInputBufferRead"/>xmlParserInputBufferRead ()</h3><pre class="programlisting">int xmlParserInputBufferRead (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br/> int len)<br/>
+</pre><p>Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlPopInputCallbacks"/>xmlPopInputCallbacks ()</h3><pre class="programlisting">int xmlPopInputCallbacks (void)<br/>
+</pre><p>Clear the top input callback from the input stack. this includes the compiled-in I/O.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of input callback registered or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultInputCallbacks"/>xmlRegisterDefaultInputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultInputCallbacks (void)<br/>
+</pre><p>Registers the default compiled-in I/O handlers.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterDefaultOutputCallbacks"/>xmlRegisterDefaultOutputCallbacks ()</h3><pre class="programlisting">void xmlRegisterDefaultOutputCallbacks (void)<br/>
+</pre><p>Registers the default compiled-in I/O handlers.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterHTTPPostCallbacks"/>xmlRegisterHTTPPostCallbacks ()</h3><pre class="programlisting">void xmlRegisterHTTPPostCallbacks (void)<br/>
+</pre><p>By default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterInputCallbacks"/>xmlRegisterInputCallbacks ()</h3><pre class="programlisting">int xmlRegisterInputCallbacks (<a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc)<br/>
+</pre><p>Register a new set of I/O callback for handling parser input.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>readFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegisterOutputCallbacks"/>xmlRegisterOutputCallbacks ()</h3><pre class="programlisting">int xmlRegisterOutputCallbacks (<a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc)<br/>
+</pre><p>Register a new set of I/O callback for handling output.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>writeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlautomata.html b/doc/devhelp/libxml2-xmlautomata.html
new file mode 100644
index 0000000..d468442
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlautomata.html
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlautomata: API to build regexp automata</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlIO.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlerror.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlautomata</span>
+ </h2>
+ <p>xmlautomata - API to build regexp automata</p>
+ <p>the API to build regexp automata </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * <a href="#xmlAutomataStatePtr">xmlAutomataStatePtr</a>;
+typedef struct _xmlAutomata <a href="#xmlAutomata">xmlAutomata</a>;
+typedef <a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * <a href="#xmlAutomataPtr">xmlAutomataPtr</a>;
+typedef struct _xmlAutomataState <a href="#xmlAutomataState">xmlAutomataState</a>;
+void <a href="#xmlFreeAutomata">xmlFreeAutomata</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
+int <a href="#xmlAutomataNewCounter">xmlAutomataNewCounter</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> int min, <br/> int max);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataGetInitState">xmlAutomataGetInitState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewState">xmlAutomataNewState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> int min, <br/> int max, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> int min, <br/> int max, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int lax);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int counter);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int counter);
+<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlAutomataCompile">xmlAutomataCompile</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> int min, <br/> int max, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> <a href="#xmlNewAutomata">xmlNewAutomata</a> (void);
+int <a href="#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> int min, <br/> int max, <br/> void * data);
+<a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition">xmlAutomataNewTransition</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> void * data);
+int <a href="#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a> (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomata">Structure </a>xmlAutomata</h3><pre class="programlisting">struct _xmlAutomata {
+The content of this structure is not made public by the API.
+} xmlAutomata;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataPtr">Typedef </a>xmlAutomataPtr</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomata">xmlAutomata</a> * xmlAutomataPtr;
+</pre><p>A libxml automata description, It can be compiled into a regexp</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataState">Structure </a>xmlAutomataState</h3><pre class="programlisting">struct _xmlAutomataState {
+The content of this structure is not made public by the API.
+} xmlAutomataState;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataStatePtr">Typedef </a>xmlAutomataStatePtr</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * xmlAutomataStatePtr;
+</pre><p>A state int the automata description,</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataCompile"/>xmlAutomataCompile ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlAutomataCompile (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br/>
+</pre><p>Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled regexp or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataGetInitState"/>xmlAutomataGetInitState ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataGetInitState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br/>
+</pre><p>Initial state lookup</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the initial state of the automata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataIsDeterminist"/>xmlAutomataIsDeterminist ()</h3><pre class="programlisting">int xmlAutomataIsDeterminist (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br/>
+</pre><p>Checks if an automata is determinist.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if not, and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewAllTrans"/>xmlAutomataNewAllTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewAllTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int lax)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>lax</tt></i>:</span></td><td>allow to transition if not all all transitions have been activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewCountTrans"/>xmlAutomataNewCountTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> int min, <br/> int max, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewCountTrans2"/>xmlAutomataNewCountTrans2 ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> int min, <br/> int max, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewCountedTrans"/>xmlAutomataNewCountedTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountedTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int counter)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>counter</tt></i>:</span></td><td>the counter associated to that transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewCounter"/>xmlAutomataNewCounter ()</h3><pre class="programlisting">int xmlAutomataNewCounter (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> int min, <br/> int max)<br/>
+</pre><p>Create a new counter</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimal value on the counter</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximal value on the counter</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the counter number or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewCounterTrans"/>xmlAutomataNewCounterTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCounterTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> int counter)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>counter</tt></i>:</span></td><td>the counter associated to that transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewEpsilon"/>xmlAutomataNewEpsilon ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewEpsilon (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewNegTrans"/>xmlAutomataNewNegTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewNegTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the first input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewOnceTrans"/>xmlAutomataNewOnceTrans ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> int min, <br/> int max, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewOnceTrans2"/>xmlAutomataNewOnceTrans2 ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> int min, <br/> int max, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewState"/>xmlAutomataNewState ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br/>
+</pre><p>Create a new disconnected state in the automata</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewTransition"/>xmlAutomataNewTransition ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataNewTransition2"/>xmlAutomataNewTransition2 ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition2 (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token2, <br/> void * data)<br/>
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the first input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlAutomataSetFinalState"/>xmlAutomataSetFinalState ()</h3><pre class="programlisting">int xmlAutomataSetFinalState (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br/> <a href="libxml2-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state)<br/>
+</pre><p>Makes that state a final state</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>state</tt></i>:</span></td><td>a state in this automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeAutomata"/>xmlFreeAutomata ()</h3><pre class="programlisting">void xmlFreeAutomata (<a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br/>
+</pre><p>Free an automata</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewAutomata"/>xmlNewAutomata ()</h3><pre class="programlisting"><a href="libxml2-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> xmlNewAutomata (void)<br/>
+</pre><p>Create a new automata</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object or NULL in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlerror.html b/doc/devhelp/libxml2-xmlerror.html
new file mode 100644
index 0000000..13bab8a
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlerror.html
@@ -0,0 +1,953 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlerror: error handling</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlautomata.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlexports.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlerror</span>
+ </h2>
+ <p>xmlerror - error handling</p>
+ <p>the API used to report errors </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlerror.html#xmlError">xmlError</a> * <a href="#xmlErrorPtr">xmlErrorPtr</a>;
+typedef enum <a href="#xmlErrorLevel">xmlErrorLevel</a>;
+typedef enum <a href="#xmlParserErrors">xmlParserErrors</a>;
+typedef enum <a href="#xmlErrorDomain">xmlErrorDomain</a>;
+typedef struct _xmlError <a href="#xmlError">xmlError</a>;
+void <a href="#xmlParserValidityError">xmlParserValidityError</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+typedef void <a href="#xmlGenericErrorFunc">xmlGenericErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a> (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler);
+void <a href="#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);
+void <a href="#xmlCtxtResetLastError">xmlCtxtResetLastError</a> (void * ctx);
+void <a href="#xmlResetLastError">xmlResetLastError</a> (void);
+void <a href="#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a> (<a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> * handler);
+int <a href="#xmlCopyError">xmlCopyError</a> (<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> from, <br/> <a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> to);
+void <a href="#xmlParserValidityWarning">xmlParserValidityWarning</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlParserPrintFileContext">xmlParserPrintFileContext</a> (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input);
+void <a href="#xmlParserError">xmlParserError</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlParserWarning">xmlParserWarning</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+typedef void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userData, <br/> <a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> error);
+void <a href="#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a> (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler);
+void <a href="#xmlResetError">xmlResetError</a> (<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> err);
+<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> <a href="#xmlGetLastError">xmlGetLastError</a> (void);
+<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> <a href="#xmlCtxtGetLastError">xmlCtxtGetLastError</a> (void * ctx);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlError">Structure </a>xmlError</h3><pre class="programlisting">struct _xmlError {
+ int domain : What part of the library raised this error
+ int code : The error code, e.g. an <a href="libxml2-xmlerror.html#xmlParserError">xmlParserError</a>
+ char * message : human-readable informative error message
+ <a href="libxml2-xmlerror.html#xmlErrorLevel">xmlErrorLevel</a> level : how consequent is the error
+ char * file : the filename
+ int line : the line number if available
+ char * str1 : extra string information
+ char * str2 : extra string information
+ char * str3 : extra string information
+ int int1 : extra number information
+ int int2 : error column # or 0 if N/A (todo: rename field when we would brk ABI)
+ void * ctxt : the parser context if available
+ void * node : the node in the tree
+} xmlError;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlErrorDomain">Enum </a>xmlErrorDomain</h3><pre class="programlisting">enum <a href="#xmlErrorDomain">xmlErrorDomain</a> {
+ <a name="XML_FROM_NONE">XML_FROM_NONE</a> = 0
+ <a name="XML_FROM_PARSER">XML_FROM_PARSER</a> = 1 /* The XML parser */
+ <a name="XML_FROM_TREE">XML_FROM_TREE</a> = 2 /* The tree module */
+ <a name="XML_FROM_NAMESPACE">XML_FROM_NAMESPACE</a> = 3 /* The XML Namespace module */
+ <a name="XML_FROM_DTD">XML_FROM_DTD</a> = 4 /* The XML DTD validation with parser contex */
+ <a name="XML_FROM_HTML">XML_FROM_HTML</a> = 5 /* The HTML parser */
+ <a name="XML_FROM_MEMORY">XML_FROM_MEMORY</a> = 6 /* The memory allocator */
+ <a name="XML_FROM_OUTPUT">XML_FROM_OUTPUT</a> = 7 /* The serialization code */
+ <a name="XML_FROM_IO">XML_FROM_IO</a> = 8 /* The Input/Output stack */
+ <a name="XML_FROM_FTP">XML_FROM_FTP</a> = 9 /* The FTP module */
+ <a name="XML_FROM_HTTP">XML_FROM_HTTP</a> = 10 /* The HTTP module */
+ <a name="XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a> = 11 /* The XInclude processing */
+ <a name="XML_FROM_XPATH">XML_FROM_XPATH</a> = 12 /* The XPath module */
+ <a name="XML_FROM_XPOINTER">XML_FROM_XPOINTER</a> = 13 /* The XPointer module */
+ <a name="XML_FROM_REGEXP">XML_FROM_REGEXP</a> = 14 /* The regular expressions module */
+ <a name="XML_FROM_DATATYPE">XML_FROM_DATATYPE</a> = 15 /* The W3C XML Schemas Datatype module */
+ <a name="XML_FROM_SCHEMASP">XML_FROM_SCHEMASP</a> = 16 /* The W3C XML Schemas parser module */
+ <a name="XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a> = 17 /* The W3C XML Schemas validation module */
+ <a name="XML_FROM_RELAXNGP">XML_FROM_RELAXNGP</a> = 18 /* The Relax-NG parser module */
+ <a name="XML_FROM_RELAXNGV">XML_FROM_RELAXNGV</a> = 19 /* The Relax-NG validator module */
+ <a name="XML_FROM_CATALOG">XML_FROM_CATALOG</a> = 20 /* The Catalog module */
+ <a name="XML_FROM_C14N">XML_FROM_C14N</a> = 21 /* The Canonicalization module */
+ <a name="XML_FROM_XSLT">XML_FROM_XSLT</a> = 22 /* The XSLT engine from libxslt */
+ <a name="XML_FROM_VALID">XML_FROM_VALID</a> = 23 /* The XML DTD validation with valid context */
+ <a name="XML_FROM_CHECK">XML_FROM_CHECK</a> = 24 /* The error checking module */
+ <a name="XML_FROM_WRITER">XML_FROM_WRITER</a> = 25 /* The xmlwriter module */
+ <a name="XML_FROM_MODULE">XML_FROM_MODULE</a> = 26 /* The dynamically loaded module modul */
+ <a name="XML_FROM_I18N">XML_FROM_I18N</a> = 27 /* The module handling character conversion */
+ <a name="XML_FROM_SCHEMATRONV">XML_FROM_SCHEMATRONV</a> = 28 /* The Schematron validator module */
+ <a name="XML_FROM_BUFFER">XML_FROM_BUFFER</a> = 29 /* The buffers module */
+ <a name="XML_FROM_URI">XML_FROM_URI</a> = 30 /* The URI module */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlErrorLevel">Enum </a>xmlErrorLevel</h3><pre class="programlisting">enum <a href="#xmlErrorLevel">xmlErrorLevel</a> {
+ <a name="XML_ERR_NONE">XML_ERR_NONE</a> = 0
+ <a name="XML_ERR_WARNING">XML_ERR_WARNING</a> = 1 /* A simple warning */
+ <a name="XML_ERR_ERROR">XML_ERR_ERROR</a> = 2 /* A recoverable error */
+ <a name="XML_ERR_FATAL">XML_ERR_FATAL</a> = 3 /* A fatal error */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlErrorPtr">Typedef </a>xmlErrorPtr</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlError">xmlError</a> * xmlErrorPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserErrors">Enum </a>xmlParserErrors</h3><pre class="programlisting">enum <a href="#xmlParserErrors">xmlParserErrors</a> {
+ <a name="XML_ERR_OK">XML_ERR_OK</a> = 0
+ <a name="XML_ERR_INTERNAL_ERROR">XML_ERR_INTERNAL_ERROR</a> = 1 /* 1 */
+ <a name="XML_ERR_NO_MEMORY">XML_ERR_NO_MEMORY</a> = 2 /* 2 */
+ <a name="XML_ERR_DOCUMENT_START">XML_ERR_DOCUMENT_START</a> = 3 /* 3 */
+ <a name="XML_ERR_DOCUMENT_EMPTY">XML_ERR_DOCUMENT_EMPTY</a> = 4 /* 4 */
+ <a name="XML_ERR_DOCUMENT_END">XML_ERR_DOCUMENT_END</a> = 5 /* 5 */
+ <a name="XML_ERR_INVALID_HEX_CHARREF">XML_ERR_INVALID_HEX_CHARREF</a> = 6 /* 6 */
+ <a name="XML_ERR_INVALID_DEC_CHARREF">XML_ERR_INVALID_DEC_CHARREF</a> = 7 /* 7 */
+ <a name="XML_ERR_INVALID_CHARREF">XML_ERR_INVALID_CHARREF</a> = 8 /* 8 */
+ <a name="XML_ERR_INVALID_CHAR">XML_ERR_INVALID_CHAR</a> = 9 /* 9 */
+ <a name="XML_ERR_CHARREF_AT_EOF">XML_ERR_CHARREF_AT_EOF</a> = 10 /* 10 */
+ <a name="XML_ERR_CHARREF_IN_PROLOG">XML_ERR_CHARREF_IN_PROLOG</a> = 11 /* 11 */
+ <a name="XML_ERR_CHARREF_IN_EPILOG">XML_ERR_CHARREF_IN_EPILOG</a> = 12 /* 12 */
+ <a name="XML_ERR_CHARREF_IN_DTD">XML_ERR_CHARREF_IN_DTD</a> = 13 /* 13 */
+ <a name="XML_ERR_ENTITYREF_AT_EOF">XML_ERR_ENTITYREF_AT_EOF</a> = 14 /* 14 */
+ <a name="XML_ERR_ENTITYREF_IN_PROLOG">XML_ERR_ENTITYREF_IN_PROLOG</a> = 15 /* 15 */
+ <a name="XML_ERR_ENTITYREF_IN_EPILOG">XML_ERR_ENTITYREF_IN_EPILOG</a> = 16 /* 16 */
+ <a name="XML_ERR_ENTITYREF_IN_DTD">XML_ERR_ENTITYREF_IN_DTD</a> = 17 /* 17 */
+ <a name="XML_ERR_PEREF_AT_EOF">XML_ERR_PEREF_AT_EOF</a> = 18 /* 18 */
+ <a name="XML_ERR_PEREF_IN_PROLOG">XML_ERR_PEREF_IN_PROLOG</a> = 19 /* 19 */
+ <a name="XML_ERR_PEREF_IN_EPILOG">XML_ERR_PEREF_IN_EPILOG</a> = 20 /* 20 */
+ <a name="XML_ERR_PEREF_IN_INT_SUBSET">XML_ERR_PEREF_IN_INT_SUBSET</a> = 21 /* 21 */
+ <a name="XML_ERR_ENTITYREF_NO_NAME">XML_ERR_ENTITYREF_NO_NAME</a> = 22 /* 22 */
+ <a name="XML_ERR_ENTITYREF_SEMICOL_MISSING">XML_ERR_ENTITYREF_SEMICOL_MISSING</a> = 23 /* 23 */
+ <a name="XML_ERR_PEREF_NO_NAME">XML_ERR_PEREF_NO_NAME</a> = 24 /* 24 */
+ <a name="XML_ERR_PEREF_SEMICOL_MISSING">XML_ERR_PEREF_SEMICOL_MISSING</a> = 25 /* 25 */
+ <a name="XML_ERR_UNDECLARED_ENTITY">XML_ERR_UNDECLARED_ENTITY</a> = 26 /* 26 */
+ <a name="XML_WAR_UNDECLARED_ENTITY">XML_WAR_UNDECLARED_ENTITY</a> = 27 /* 27 */
+ <a name="XML_ERR_UNPARSED_ENTITY">XML_ERR_UNPARSED_ENTITY</a> = 28 /* 28 */
+ <a name="XML_ERR_ENTITY_IS_EXTERNAL">XML_ERR_ENTITY_IS_EXTERNAL</a> = 29 /* 29 */
+ <a name="XML_ERR_ENTITY_IS_PARAMETER">XML_ERR_ENTITY_IS_PARAMETER</a> = 30 /* 30 */
+ <a name="XML_ERR_UNKNOWN_ENCODING">XML_ERR_UNKNOWN_ENCODING</a> = 31 /* 31 */
+ <a name="XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a> = 32 /* 32 */
+ <a name="XML_ERR_STRING_NOT_STARTED">XML_ERR_STRING_NOT_STARTED</a> = 33 /* 33 */
+ <a name="XML_ERR_STRING_NOT_CLOSED">XML_ERR_STRING_NOT_CLOSED</a> = 34 /* 34 */
+ <a name="XML_ERR_NS_DECL_ERROR">XML_ERR_NS_DECL_ERROR</a> = 35 /* 35 */
+ <a name="XML_ERR_ENTITY_NOT_STARTED">XML_ERR_ENTITY_NOT_STARTED</a> = 36 /* 36 */
+ <a name="XML_ERR_ENTITY_NOT_FINISHED">XML_ERR_ENTITY_NOT_FINISHED</a> = 37 /* 37 */
+ <a name="XML_ERR_LT_IN_ATTRIBUTE">XML_ERR_LT_IN_ATTRIBUTE</a> = 38 /* 38 */
+ <a name="XML_ERR_ATTRIBUTE_NOT_STARTED">XML_ERR_ATTRIBUTE_NOT_STARTED</a> = 39 /* 39 */
+ <a name="XML_ERR_ATTRIBUTE_NOT_FINISHED">XML_ERR_ATTRIBUTE_NOT_FINISHED</a> = 40 /* 40 */
+ <a name="XML_ERR_ATTRIBUTE_WITHOUT_VALUE">XML_ERR_ATTRIBUTE_WITHOUT_VALUE</a> = 41 /* 41 */
+ <a name="XML_ERR_ATTRIBUTE_REDEFINED">XML_ERR_ATTRIBUTE_REDEFINED</a> = 42 /* 42 */
+ <a name="XML_ERR_LITERAL_NOT_STARTED">XML_ERR_LITERAL_NOT_STARTED</a> = 43 /* 43 */
+ <a name="XML_ERR_LITERAL_NOT_FINISHED">XML_ERR_LITERAL_NOT_FINISHED</a> = 44 /* 44 */
+ <a name="XML_ERR_COMMENT_NOT_FINISHED">XML_ERR_COMMENT_NOT_FINISHED</a> = 45 /* 45 */
+ <a name="XML_ERR_PI_NOT_STARTED">XML_ERR_PI_NOT_STARTED</a> = 46 /* 46 */
+ <a name="XML_ERR_PI_NOT_FINISHED">XML_ERR_PI_NOT_FINISHED</a> = 47 /* 47 */
+ <a name="XML_ERR_NOTATION_NOT_STARTED">XML_ERR_NOTATION_NOT_STARTED</a> = 48 /* 48 */
+ <a name="XML_ERR_NOTATION_NOT_FINISHED">XML_ERR_NOTATION_NOT_FINISHED</a> = 49 /* 49 */
+ <a name="XML_ERR_ATTLIST_NOT_STARTED">XML_ERR_ATTLIST_NOT_STARTED</a> = 50 /* 50 */
+ <a name="XML_ERR_ATTLIST_NOT_FINISHED">XML_ERR_ATTLIST_NOT_FINISHED</a> = 51 /* 51 */
+ <a name="XML_ERR_MIXED_NOT_STARTED">XML_ERR_MIXED_NOT_STARTED</a> = 52 /* 52 */
+ <a name="XML_ERR_MIXED_NOT_FINISHED">XML_ERR_MIXED_NOT_FINISHED</a> = 53 /* 53 */
+ <a name="XML_ERR_ELEMCONTENT_NOT_STARTED">XML_ERR_ELEMCONTENT_NOT_STARTED</a> = 54 /* 54 */
+ <a name="XML_ERR_ELEMCONTENT_NOT_FINISHED">XML_ERR_ELEMCONTENT_NOT_FINISHED</a> = 55 /* 55 */
+ <a name="XML_ERR_XMLDECL_NOT_STARTED">XML_ERR_XMLDECL_NOT_STARTED</a> = 56 /* 56 */
+ <a name="XML_ERR_XMLDECL_NOT_FINISHED">XML_ERR_XMLDECL_NOT_FINISHED</a> = 57 /* 57 */
+ <a name="XML_ERR_CONDSEC_NOT_STARTED">XML_ERR_CONDSEC_NOT_STARTED</a> = 58 /* 58 */
+ <a name="XML_ERR_CONDSEC_NOT_FINISHED">XML_ERR_CONDSEC_NOT_FINISHED</a> = 59 /* 59 */
+ <a name="XML_ERR_EXT_SUBSET_NOT_FINISHED">XML_ERR_EXT_SUBSET_NOT_FINISHED</a> = 60 /* 60 */
+ <a name="XML_ERR_DOCTYPE_NOT_FINISHED">XML_ERR_DOCTYPE_NOT_FINISHED</a> = 61 /* 61 */
+ <a name="XML_ERR_MISPLACED_CDATA_END">XML_ERR_MISPLACED_CDATA_END</a> = 62 /* 62 */
+ <a name="XML_ERR_CDATA_NOT_FINISHED">XML_ERR_CDATA_NOT_FINISHED</a> = 63 /* 63 */
+ <a name="XML_ERR_RESERVED_XML_NAME">XML_ERR_RESERVED_XML_NAME</a> = 64 /* 64 */
+ <a name="XML_ERR_SPACE_REQUIRED">XML_ERR_SPACE_REQUIRED</a> = 65 /* 65 */
+ <a name="XML_ERR_SEPARATOR_REQUIRED">XML_ERR_SEPARATOR_REQUIRED</a> = 66 /* 66 */
+ <a name="XML_ERR_NMTOKEN_REQUIRED">XML_ERR_NMTOKEN_REQUIRED</a> = 67 /* 67 */
+ <a name="XML_ERR_NAME_REQUIRED">XML_ERR_NAME_REQUIRED</a> = 68 /* 68 */
+ <a name="XML_ERR_PCDATA_REQUIRED">XML_ERR_PCDATA_REQUIRED</a> = 69 /* 69 */
+ <a name="XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a> = 70 /* 70 */
+ <a name="XML_ERR_PUBID_REQUIRED">XML_ERR_PUBID_REQUIRED</a> = 71 /* 71 */
+ <a name="XML_ERR_LT_REQUIRED">XML_ERR_LT_REQUIRED</a> = 72 /* 72 */
+ <a name="XML_ERR_GT_REQUIRED">XML_ERR_GT_REQUIRED</a> = 73 /* 73 */
+ <a name="XML_ERR_LTSLASH_REQUIRED">XML_ERR_LTSLASH_REQUIRED</a> = 74 /* 74 */
+ <a name="XML_ERR_EQUAL_REQUIRED">XML_ERR_EQUAL_REQUIRED</a> = 75 /* 75 */
+ <a name="XML_ERR_TAG_NAME_MISMATCH">XML_ERR_TAG_NAME_MISMATCH</a> = 76 /* 76 */
+ <a name="XML_ERR_TAG_NOT_FINISHED">XML_ERR_TAG_NOT_FINISHED</a> = 77 /* 77 */
+ <a name="XML_ERR_STANDALONE_VALUE">XML_ERR_STANDALONE_VALUE</a> = 78 /* 78 */
+ <a name="XML_ERR_ENCODING_NAME">XML_ERR_ENCODING_NAME</a> = 79 /* 79 */
+ <a name="XML_ERR_HYPHEN_IN_COMMENT">XML_ERR_HYPHEN_IN_COMMENT</a> = 80 /* 80 */
+ <a name="XML_ERR_INVALID_ENCODING">XML_ERR_INVALID_ENCODING</a> = 81 /* 81 */
+ <a name="XML_ERR_EXT_ENTITY_STANDALONE">XML_ERR_EXT_ENTITY_STANDALONE</a> = 82 /* 82 */
+ <a name="XML_ERR_CONDSEC_INVALID">XML_ERR_CONDSEC_INVALID</a> = 83 /* 83 */
+ <a name="XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a> = 84 /* 84 */
+ <a name="XML_ERR_NOT_WELL_BALANCED">XML_ERR_NOT_WELL_BALANCED</a> = 85 /* 85 */
+ <a name="XML_ERR_EXTRA_CONTENT">XML_ERR_EXTRA_CONTENT</a> = 86 /* 86 */
+ <a name="XML_ERR_ENTITY_CHAR_ERROR">XML_ERR_ENTITY_CHAR_ERROR</a> = 87 /* 87 */
+ <a name="XML_ERR_ENTITY_PE_INTERNAL">XML_ERR_ENTITY_PE_INTERNAL</a> = 88 /* 88 */
+ <a name="XML_ERR_ENTITY_LOOP">XML_ERR_ENTITY_LOOP</a> = 89 /* 89 */
+ <a name="XML_ERR_ENTITY_BOUNDARY">XML_ERR_ENTITY_BOUNDARY</a> = 90 /* 90 */
+ <a name="XML_ERR_INVALID_URI">XML_ERR_INVALID_URI</a> = 91 /* 91 */
+ <a name="XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a> = 92 /* 92 */
+ <a name="XML_WAR_CATALOG_PI">XML_WAR_CATALOG_PI</a> = 93 /* 93 */
+ <a name="XML_ERR_NO_DTD">XML_ERR_NO_DTD</a> = 94 /* 94 */
+ <a name="XML_ERR_CONDSEC_INVALID_KEYWORD">XML_ERR_CONDSEC_INVALID_KEYWORD</a> = 95 /* 95 */
+ <a name="XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a> = 96 /* 96 */
+ <a name="XML_WAR_UNKNOWN_VERSION">XML_WAR_UNKNOWN_VERSION</a> = 97 /* 97 */
+ <a name="XML_WAR_LANG_VALUE">XML_WAR_LANG_VALUE</a> = 98 /* 98 */
+ <a name="XML_WAR_NS_URI">XML_WAR_NS_URI</a> = 99 /* 99 */
+ <a name="XML_WAR_NS_URI_RELATIVE">XML_WAR_NS_URI_RELATIVE</a> = 100 /* 100 */
+ <a name="XML_ERR_MISSING_ENCODING">XML_ERR_MISSING_ENCODING</a> = 101 /* 101 */
+ <a name="XML_WAR_SPACE_VALUE">XML_WAR_SPACE_VALUE</a> = 102 /* 102 */
+ <a name="XML_ERR_NOT_STANDALONE">XML_ERR_NOT_STANDALONE</a> = 103 /* 103 */
+ <a name="XML_ERR_ENTITY_PROCESSING">XML_ERR_ENTITY_PROCESSING</a> = 104 /* 104 */
+ <a name="XML_ERR_NOTATION_PROCESSING">XML_ERR_NOTATION_PROCESSING</a> = 105 /* 105 */
+ <a name="XML_WAR_NS_COLUMN">XML_WAR_NS_COLUMN</a> = 106 /* 106 */
+ <a name="XML_WAR_ENTITY_REDEFINED">XML_WAR_ENTITY_REDEFINED</a> = 107 /* 107 */
+ <a name="XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a> = 108 /* 108 */
+ <a name="XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a> = 109 /* 109 */
+ <a name="XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a> = 110 /* 110 */
+ <a name="XML_ERR_USER_STOP">XML_ERR_USER_STOP</a> = 111 /* 111 */
+ <a name="XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a> = 200
+ <a name="XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a> = 201 /* 201 */
+ <a name="XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a> = 202 /* 202 */
+ <a name="XML_NS_ERR_ATTRIBUTE_REDEFINED">XML_NS_ERR_ATTRIBUTE_REDEFINED</a> = 203 /* 203 */
+ <a name="XML_NS_ERR_EMPTY">XML_NS_ERR_EMPTY</a> = 204 /* 204 */
+ <a name="XML_NS_ERR_COLON">XML_NS_ERR_COLON</a> = 205 /* 205 */
+ <a name="XML_DTD_ATTRIBUTE_DEFAULT">XML_DTD_ATTRIBUTE_DEFAULT</a> = 500
+ <a name="XML_DTD_ATTRIBUTE_REDEFINED">XML_DTD_ATTRIBUTE_REDEFINED</a> = 501 /* 501 */
+ <a name="XML_DTD_ATTRIBUTE_VALUE">XML_DTD_ATTRIBUTE_VALUE</a> = 502 /* 502 */
+ <a name="XML_DTD_CONTENT_ERROR">XML_DTD_CONTENT_ERROR</a> = 503 /* 503 */
+ <a name="XML_DTD_CONTENT_MODEL">XML_DTD_CONTENT_MODEL</a> = 504 /* 504 */
+ <a name="XML_DTD_CONTENT_NOT_DETERMINIST">XML_DTD_CONTENT_NOT_DETERMINIST</a> = 505 /* 505 */
+ <a name="XML_DTD_DIFFERENT_PREFIX">XML_DTD_DIFFERENT_PREFIX</a> = 506 /* 506 */
+ <a name="XML_DTD_ELEM_DEFAULT_NAMESPACE">XML_DTD_ELEM_DEFAULT_NAMESPACE</a> = 507 /* 507 */
+ <a name="XML_DTD_ELEM_NAMESPACE">XML_DTD_ELEM_NAMESPACE</a> = 508 /* 508 */
+ <a name="XML_DTD_ELEM_REDEFINED">XML_DTD_ELEM_REDEFINED</a> = 509 /* 509 */
+ <a name="XML_DTD_EMPTY_NOTATION">XML_DTD_EMPTY_NOTATION</a> = 510 /* 510 */
+ <a name="XML_DTD_ENTITY_TYPE">XML_DTD_ENTITY_TYPE</a> = 511 /* 511 */
+ <a name="XML_DTD_ID_FIXED">XML_DTD_ID_FIXED</a> = 512 /* 512 */
+ <a name="XML_DTD_ID_REDEFINED">XML_DTD_ID_REDEFINED</a> = 513 /* 513 */
+ <a name="XML_DTD_ID_SUBSET">XML_DTD_ID_SUBSET</a> = 514 /* 514 */
+ <a name="XML_DTD_INVALID_CHILD">XML_DTD_INVALID_CHILD</a> = 515 /* 515 */
+ <a name="XML_DTD_INVALID_DEFAULT">XML_DTD_INVALID_DEFAULT</a> = 516 /* 516 */
+ <a name="XML_DTD_LOAD_ERROR">XML_DTD_LOAD_ERROR</a> = 517 /* 517 */
+ <a name="XML_DTD_MISSING_ATTRIBUTE">XML_DTD_MISSING_ATTRIBUTE</a> = 518 /* 518 */
+ <a name="XML_DTD_MIXED_CORRUPT">XML_DTD_MIXED_CORRUPT</a> = 519 /* 519 */
+ <a name="XML_DTD_MULTIPLE_ID">XML_DTD_MULTIPLE_ID</a> = 520 /* 520 */
+ <a name="XML_DTD_NO_DOC">XML_DTD_NO_DOC</a> = 521 /* 521 */
+ <a name="XML_DTD_NO_DTD">XML_DTD_NO_DTD</a> = 522 /* 522 */
+ <a name="XML_DTD_NO_ELEM_NAME">XML_DTD_NO_ELEM_NAME</a> = 523 /* 523 */
+ <a name="XML_DTD_NO_PREFIX">XML_DTD_NO_PREFIX</a> = 524 /* 524 */
+ <a name="XML_DTD_NO_ROOT">XML_DTD_NO_ROOT</a> = 525 /* 525 */
+ <a name="XML_DTD_NOTATION_REDEFINED">XML_DTD_NOTATION_REDEFINED</a> = 526 /* 526 */
+ <a name="XML_DTD_NOTATION_VALUE">XML_DTD_NOTATION_VALUE</a> = 527 /* 527 */
+ <a name="XML_DTD_NOT_EMPTY">XML_DTD_NOT_EMPTY</a> = 528 /* 528 */
+ <a name="XML_DTD_NOT_PCDATA">XML_DTD_NOT_PCDATA</a> = 529 /* 529 */
+ <a name="XML_DTD_NOT_STANDALONE">XML_DTD_NOT_STANDALONE</a> = 530 /* 530 */
+ <a name="XML_DTD_ROOT_NAME">XML_DTD_ROOT_NAME</a> = 531 /* 531 */
+ <a name="XML_DTD_STANDALONE_WHITE_SPACE">XML_DTD_STANDALONE_WHITE_SPACE</a> = 532 /* 532 */
+ <a name="XML_DTD_UNKNOWN_ATTRIBUTE">XML_DTD_UNKNOWN_ATTRIBUTE</a> = 533 /* 533 */
+ <a name="XML_DTD_UNKNOWN_ELEM">XML_DTD_UNKNOWN_ELEM</a> = 534 /* 534 */
+ <a name="XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a> = 535 /* 535 */
+ <a name="XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a> = 536 /* 536 */
+ <a name="XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a> = 537 /* 537 */
+ <a name="XML_DTD_STANDALONE_DEFAULTED">XML_DTD_STANDALONE_DEFAULTED</a> = 538 /* 538 */
+ <a name="XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a> = 539 /* 539 */
+ <a name="XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a> = 540 /* 540 */
+ <a name="XML_DTD_DUP_TOKEN">XML_DTD_DUP_TOKEN</a> = 541 /* 541 */
+ <a name="XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a> = 800
+ <a name="XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a> = 801 /* 801 */
+ <a name="XML_RNGP_ANYNAME_ATTR_ANCESTOR">XML_RNGP_ANYNAME_ATTR_ANCESTOR</a> = 1000
+ <a name="XML_RNGP_ATTR_CONFLICT">XML_RNGP_ATTR_CONFLICT</a> = 1001 /* 1001 */
+ <a name="XML_RNGP_ATTRIBUTE_CHILDREN">XML_RNGP_ATTRIBUTE_CHILDREN</a> = 1002 /* 1002 */
+ <a name="XML_RNGP_ATTRIBUTE_CONTENT">XML_RNGP_ATTRIBUTE_CONTENT</a> = 1003 /* 1003 */
+ <a name="XML_RNGP_ATTRIBUTE_EMPTY">XML_RNGP_ATTRIBUTE_EMPTY</a> = 1004 /* 1004 */
+ <a name="XML_RNGP_ATTRIBUTE_NOOP">XML_RNGP_ATTRIBUTE_NOOP</a> = 1005 /* 1005 */
+ <a name="XML_RNGP_CHOICE_CONTENT">XML_RNGP_CHOICE_CONTENT</a> = 1006 /* 1006 */
+ <a name="XML_RNGP_CHOICE_EMPTY">XML_RNGP_CHOICE_EMPTY</a> = 1007 /* 1007 */
+ <a name="XML_RNGP_CREATE_FAILURE">XML_RNGP_CREATE_FAILURE</a> = 1008 /* 1008 */
+ <a name="XML_RNGP_DATA_CONTENT">XML_RNGP_DATA_CONTENT</a> = 1009 /* 1009 */
+ <a name="XML_RNGP_DEF_CHOICE_AND_INTERLEAVE">XML_RNGP_DEF_CHOICE_AND_INTERLEAVE</a> = 1010 /* 1010 */
+ <a name="XML_RNGP_DEFINE_CREATE_FAILED">XML_RNGP_DEFINE_CREATE_FAILED</a> = 1011 /* 1011 */
+ <a name="XML_RNGP_DEFINE_EMPTY">XML_RNGP_DEFINE_EMPTY</a> = 1012 /* 1012 */
+ <a name="XML_RNGP_DEFINE_MISSING">XML_RNGP_DEFINE_MISSING</a> = 1013 /* 1013 */
+ <a name="XML_RNGP_DEFINE_NAME_MISSING">XML_RNGP_DEFINE_NAME_MISSING</a> = 1014 /* 1014 */
+ <a name="XML_RNGP_ELEM_CONTENT_EMPTY">XML_RNGP_ELEM_CONTENT_EMPTY</a> = 1015 /* 1015 */
+ <a name="XML_RNGP_ELEM_CONTENT_ERROR">XML_RNGP_ELEM_CONTENT_ERROR</a> = 1016 /* 1016 */
+ <a name="XML_RNGP_ELEMENT_EMPTY">XML_RNGP_ELEMENT_EMPTY</a> = 1017 /* 1017 */
+ <a name="XML_RNGP_ELEMENT_CONTENT">XML_RNGP_ELEMENT_CONTENT</a> = 1018 /* 1018 */
+ <a name="XML_RNGP_ELEMENT_NAME">XML_RNGP_ELEMENT_NAME</a> = 1019 /* 1019 */
+ <a name="XML_RNGP_ELEMENT_NO_CONTENT">XML_RNGP_ELEMENT_NO_CONTENT</a> = 1020 /* 1020 */
+ <a name="XML_RNGP_ELEM_TEXT_CONFLICT">XML_RNGP_ELEM_TEXT_CONFLICT</a> = 1021 /* 1021 */
+ <a name="XML_RNGP_EMPTY">XML_RNGP_EMPTY</a> = 1022 /* 1022 */
+ <a name="XML_RNGP_EMPTY_CONSTRUCT">XML_RNGP_EMPTY_CONSTRUCT</a> = 1023 /* 1023 */
+ <a name="XML_RNGP_EMPTY_CONTENT">XML_RNGP_EMPTY_CONTENT</a> = 1024 /* 1024 */
+ <a name="XML_RNGP_EMPTY_NOT_EMPTY">XML_RNGP_EMPTY_NOT_EMPTY</a> = 1025 /* 1025 */
+ <a name="XML_RNGP_ERROR_TYPE_LIB">XML_RNGP_ERROR_TYPE_LIB</a> = 1026 /* 1026 */
+ <a name="XML_RNGP_EXCEPT_EMPTY">XML_RNGP_EXCEPT_EMPTY</a> = 1027 /* 1027 */
+ <a name="XML_RNGP_EXCEPT_MISSING">XML_RNGP_EXCEPT_MISSING</a> = 1028 /* 1028 */
+ <a name="XML_RNGP_EXCEPT_MULTIPLE">XML_RNGP_EXCEPT_MULTIPLE</a> = 1029 /* 1029 */
+ <a name="XML_RNGP_EXCEPT_NO_CONTENT">XML_RNGP_EXCEPT_NO_CONTENT</a> = 1030 /* 1030 */
+ <a name="XML_RNGP_EXTERNALREF_EMTPY">XML_RNGP_EXTERNALREF_EMTPY</a> = 1031 /* 1031 */
+ <a name="XML_RNGP_EXTERNAL_REF_FAILURE">XML_RNGP_EXTERNAL_REF_FAILURE</a> = 1032 /* 1032 */
+ <a name="XML_RNGP_EXTERNALREF_RECURSE">XML_RNGP_EXTERNALREF_RECURSE</a> = 1033 /* 1033 */
+ <a name="XML_RNGP_FORBIDDEN_ATTRIBUTE">XML_RNGP_FORBIDDEN_ATTRIBUTE</a> = 1034 /* 1034 */
+ <a name="XML_RNGP_FOREIGN_ELEMENT">XML_RNGP_FOREIGN_ELEMENT</a> = 1035 /* 1035 */
+ <a name="XML_RNGP_GRAMMAR_CONTENT">XML_RNGP_GRAMMAR_CONTENT</a> = 1036 /* 1036 */
+ <a name="XML_RNGP_GRAMMAR_EMPTY">XML_RNGP_GRAMMAR_EMPTY</a> = 1037 /* 1037 */
+ <a name="XML_RNGP_GRAMMAR_MISSING">XML_RNGP_GRAMMAR_MISSING</a> = 1038 /* 1038 */
+ <a name="XML_RNGP_GRAMMAR_NO_START">XML_RNGP_GRAMMAR_NO_START</a> = 1039 /* 1039 */
+ <a name="XML_RNGP_GROUP_ATTR_CONFLICT">XML_RNGP_GROUP_ATTR_CONFLICT</a> = 1040 /* 1040 */
+ <a name="XML_RNGP_HREF_ERROR">XML_RNGP_HREF_ERROR</a> = 1041 /* 1041 */
+ <a name="XML_RNGP_INCLUDE_EMPTY">XML_RNGP_INCLUDE_EMPTY</a> = 1042 /* 1042 */
+ <a name="XML_RNGP_INCLUDE_FAILURE">XML_RNGP_INCLUDE_FAILURE</a> = 1043 /* 1043 */
+ <a name="XML_RNGP_INCLUDE_RECURSE">XML_RNGP_INCLUDE_RECURSE</a> = 1044 /* 1044 */
+ <a name="XML_RNGP_INTERLEAVE_ADD">XML_RNGP_INTERLEAVE_ADD</a> = 1045 /* 1045 */
+ <a name="XML_RNGP_INTERLEAVE_CREATE_FAILED">XML_RNGP_INTERLEAVE_CREATE_FAILED</a> = 1046 /* 1046 */
+ <a name="XML_RNGP_INTERLEAVE_EMPTY">XML_RNGP_INTERLEAVE_EMPTY</a> = 1047 /* 1047 */
+ <a name="XML_RNGP_INTERLEAVE_NO_CONTENT">XML_RNGP_INTERLEAVE_NO_CONTENT</a> = 1048 /* 1048 */
+ <a name="XML_RNGP_INVALID_DEFINE_NAME">XML_RNGP_INVALID_DEFINE_NAME</a> = 1049 /* 1049 */
+ <a name="XML_RNGP_INVALID_URI">XML_RNGP_INVALID_URI</a> = 1050 /* 1050 */
+ <a name="XML_RNGP_INVALID_VALUE">XML_RNGP_INVALID_VALUE</a> = 1051 /* 1051 */
+ <a name="XML_RNGP_MISSING_HREF">XML_RNGP_MISSING_HREF</a> = 1052 /* 1052 */
+ <a name="XML_RNGP_NAME_MISSING">XML_RNGP_NAME_MISSING</a> = 1053 /* 1053 */
+ <a name="XML_RNGP_NEED_COMBINE">XML_RNGP_NEED_COMBINE</a> = 1054 /* 1054 */
+ <a name="XML_RNGP_NOTALLOWED_NOT_EMPTY">XML_RNGP_NOTALLOWED_NOT_EMPTY</a> = 1055 /* 1055 */
+ <a name="XML_RNGP_NSNAME_ATTR_ANCESTOR">XML_RNGP_NSNAME_ATTR_ANCESTOR</a> = 1056 /* 1056 */
+ <a name="XML_RNGP_NSNAME_NO_NS">XML_RNGP_NSNAME_NO_NS</a> = 1057 /* 1057 */
+ <a name="XML_RNGP_PARAM_FORBIDDEN">XML_RNGP_PARAM_FORBIDDEN</a> = 1058 /* 1058 */
+ <a name="XML_RNGP_PARAM_NAME_MISSING">XML_RNGP_PARAM_NAME_MISSING</a> = 1059 /* 1059 */
+ <a name="XML_RNGP_PARENTREF_CREATE_FAILED">XML_RNGP_PARENTREF_CREATE_FAILED</a> = 1060 /* 1060 */
+ <a name="XML_RNGP_PARENTREF_NAME_INVALID">XML_RNGP_PARENTREF_NAME_INVALID</a> = 1061 /* 1061 */
+ <a name="XML_RNGP_PARENTREF_NO_NAME">XML_RNGP_PARENTREF_NO_NAME</a> = 1062 /* 1062 */
+ <a name="XML_RNGP_PARENTREF_NO_PARENT">XML_RNGP_PARENTREF_NO_PARENT</a> = 1063 /* 1063 */
+ <a name="XML_RNGP_PARENTREF_NOT_EMPTY">XML_RNGP_PARENTREF_NOT_EMPTY</a> = 1064 /* 1064 */
+ <a name="XML_RNGP_PARSE_ERROR">XML_RNGP_PARSE_ERROR</a> = 1065 /* 1065 */
+ <a name="XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME</a> = 1066 /* 1066 */
+ <a name="XML_RNGP_PAT_ATTR_ATTR">XML_RNGP_PAT_ATTR_ATTR</a> = 1067 /* 1067 */
+ <a name="XML_RNGP_PAT_ATTR_ELEM">XML_RNGP_PAT_ATTR_ELEM</a> = 1068 /* 1068 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ATTR">XML_RNGP_PAT_DATA_EXCEPT_ATTR</a> = 1069 /* 1069 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ELEM">XML_RNGP_PAT_DATA_EXCEPT_ELEM</a> = 1070 /* 1070 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_EMPTY">XML_RNGP_PAT_DATA_EXCEPT_EMPTY</a> = 1071 /* 1071 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_GROUP">XML_RNGP_PAT_DATA_EXCEPT_GROUP</a> = 1072 /* 1072 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE">XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE</a> = 1073 /* 1073 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_LIST">XML_RNGP_PAT_DATA_EXCEPT_LIST</a> = 1074 /* 1074 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ONEMORE">XML_RNGP_PAT_DATA_EXCEPT_ONEMORE</a> = 1075 /* 1075 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_REF">XML_RNGP_PAT_DATA_EXCEPT_REF</a> = 1076 /* 1076 */
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_TEXT">XML_RNGP_PAT_DATA_EXCEPT_TEXT</a> = 1077 /* 1077 */
+ <a name="XML_RNGP_PAT_LIST_ATTR">XML_RNGP_PAT_LIST_ATTR</a> = 1078 /* 1078 */
+ <a name="XML_RNGP_PAT_LIST_ELEM">XML_RNGP_PAT_LIST_ELEM</a> = 1079 /* 1079 */
+ <a name="XML_RNGP_PAT_LIST_INTERLEAVE">XML_RNGP_PAT_LIST_INTERLEAVE</a> = 1080 /* 1080 */
+ <a name="XML_RNGP_PAT_LIST_LIST">XML_RNGP_PAT_LIST_LIST</a> = 1081 /* 1081 */
+ <a name="XML_RNGP_PAT_LIST_REF">XML_RNGP_PAT_LIST_REF</a> = 1082 /* 1082 */
+ <a name="XML_RNGP_PAT_LIST_TEXT">XML_RNGP_PAT_LIST_TEXT</a> = 1083 /* 1083 */
+ <a name="XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME</a> = 1084 /* 1084 */
+ <a name="XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME">XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME</a> = 1085 /* 1085 */
+ <a name="XML_RNGP_PAT_ONEMORE_GROUP_ATTR">XML_RNGP_PAT_ONEMORE_GROUP_ATTR</a> = 1086 /* 1086 */
+ <a name="XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR">XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR</a> = 1087 /* 1087 */
+ <a name="XML_RNGP_PAT_START_ATTR">XML_RNGP_PAT_START_ATTR</a> = 1088 /* 1088 */
+ <a name="XML_RNGP_PAT_START_DATA">XML_RNGP_PAT_START_DATA</a> = 1089 /* 1089 */
+ <a name="XML_RNGP_PAT_START_EMPTY">XML_RNGP_PAT_START_EMPTY</a> = 1090 /* 1090 */
+ <a name="XML_RNGP_PAT_START_GROUP">XML_RNGP_PAT_START_GROUP</a> = 1091 /* 1091 */
+ <a name="XML_RNGP_PAT_START_INTERLEAVE">XML_RNGP_PAT_START_INTERLEAVE</a> = 1092 /* 1092 */
+ <a name="XML_RNGP_PAT_START_LIST">XML_RNGP_PAT_START_LIST</a> = 1093 /* 1093 */
+ <a name="XML_RNGP_PAT_START_ONEMORE">XML_RNGP_PAT_START_ONEMORE</a> = 1094 /* 1094 */
+ <a name="XML_RNGP_PAT_START_TEXT">XML_RNGP_PAT_START_TEXT</a> = 1095 /* 1095 */
+ <a name="XML_RNGP_PAT_START_VALUE">XML_RNGP_PAT_START_VALUE</a> = 1096 /* 1096 */
+ <a name="XML_RNGP_PREFIX_UNDEFINED">XML_RNGP_PREFIX_UNDEFINED</a> = 1097 /* 1097 */
+ <a name="XML_RNGP_REF_CREATE_FAILED">XML_RNGP_REF_CREATE_FAILED</a> = 1098 /* 1098 */
+ <a name="XML_RNGP_REF_CYCLE">XML_RNGP_REF_CYCLE</a> = 1099 /* 1099 */
+ <a name="XML_RNGP_REF_NAME_INVALID">XML_RNGP_REF_NAME_INVALID</a> = 1100 /* 1100 */
+ <a name="XML_RNGP_REF_NO_DEF">XML_RNGP_REF_NO_DEF</a> = 1101 /* 1101 */
+ <a name="XML_RNGP_REF_NO_NAME">XML_RNGP_REF_NO_NAME</a> = 1102 /* 1102 */
+ <a name="XML_RNGP_REF_NOT_EMPTY">XML_RNGP_REF_NOT_EMPTY</a> = 1103 /* 1103 */
+ <a name="XML_RNGP_START_CHOICE_AND_INTERLEAVE">XML_RNGP_START_CHOICE_AND_INTERLEAVE</a> = 1104 /* 1104 */
+ <a name="XML_RNGP_START_CONTENT">XML_RNGP_START_CONTENT</a> = 1105 /* 1105 */
+ <a name="XML_RNGP_START_EMPTY">XML_RNGP_START_EMPTY</a> = 1106 /* 1106 */
+ <a name="XML_RNGP_START_MISSING">XML_RNGP_START_MISSING</a> = 1107 /* 1107 */
+ <a name="XML_RNGP_TEXT_EXPECTED">XML_RNGP_TEXT_EXPECTED</a> = 1108 /* 1108 */
+ <a name="XML_RNGP_TEXT_HAS_CHILD">XML_RNGP_TEXT_HAS_CHILD</a> = 1109 /* 1109 */
+ <a name="XML_RNGP_TYPE_MISSING">XML_RNGP_TYPE_MISSING</a> = 1110 /* 1110 */
+ <a name="XML_RNGP_TYPE_NOT_FOUND">XML_RNGP_TYPE_NOT_FOUND</a> = 1111 /* 1111 */
+ <a name="XML_RNGP_TYPE_VALUE">XML_RNGP_TYPE_VALUE</a> = 1112 /* 1112 */
+ <a name="XML_RNGP_UNKNOWN_ATTRIBUTE">XML_RNGP_UNKNOWN_ATTRIBUTE</a> = 1113 /* 1113 */
+ <a name="XML_RNGP_UNKNOWN_COMBINE">XML_RNGP_UNKNOWN_COMBINE</a> = 1114 /* 1114 */
+ <a name="XML_RNGP_UNKNOWN_CONSTRUCT">XML_RNGP_UNKNOWN_CONSTRUCT</a> = 1115 /* 1115 */
+ <a name="XML_RNGP_UNKNOWN_TYPE_LIB">XML_RNGP_UNKNOWN_TYPE_LIB</a> = 1116 /* 1116 */
+ <a name="XML_RNGP_URI_FRAGMENT">XML_RNGP_URI_FRAGMENT</a> = 1117 /* 1117 */
+ <a name="XML_RNGP_URI_NOT_ABSOLUTE">XML_RNGP_URI_NOT_ABSOLUTE</a> = 1118 /* 1118 */
+ <a name="XML_RNGP_VALUE_EMPTY">XML_RNGP_VALUE_EMPTY</a> = 1119 /* 1119 */
+ <a name="XML_RNGP_VALUE_NO_CONTENT">XML_RNGP_VALUE_NO_CONTENT</a> = 1120 /* 1120 */
+ <a name="XML_RNGP_XMLNS_NAME">XML_RNGP_XMLNS_NAME</a> = 1121 /* 1121 */
+ <a name="XML_RNGP_XML_NS">XML_RNGP_XML_NS</a> = 1122 /* 1122 */
+ <a name="XML_XPATH_EXPRESSION_OK">XML_XPATH_EXPRESSION_OK</a> = 1200
+ <a name="XML_XPATH_NUMBER_ERROR">XML_XPATH_NUMBER_ERROR</a> = 1201 /* 1201 */
+ <a name="XML_XPATH_UNFINISHED_LITERAL_ERROR">XML_XPATH_UNFINISHED_LITERAL_ERROR</a> = 1202 /* 1202 */
+ <a name="XML_XPATH_START_LITERAL_ERROR">XML_XPATH_START_LITERAL_ERROR</a> = 1203 /* 1203 */
+ <a name="XML_XPATH_VARIABLE_REF_ERROR">XML_XPATH_VARIABLE_REF_ERROR</a> = 1204 /* 1204 */
+ <a name="XML_XPATH_UNDEF_VARIABLE_ERROR">XML_XPATH_UNDEF_VARIABLE_ERROR</a> = 1205 /* 1205 */
+ <a name="XML_XPATH_INVALID_PREDICATE_ERROR">XML_XPATH_INVALID_PREDICATE_ERROR</a> = 1206 /* 1206 */
+ <a name="XML_XPATH_EXPR_ERROR">XML_XPATH_EXPR_ERROR</a> = 1207 /* 1207 */
+ <a name="XML_XPATH_UNCLOSED_ERROR">XML_XPATH_UNCLOSED_ERROR</a> = 1208 /* 1208 */
+ <a name="XML_XPATH_UNKNOWN_FUNC_ERROR">XML_XPATH_UNKNOWN_FUNC_ERROR</a> = 1209 /* 1209 */
+ <a name="XML_XPATH_INVALID_OPERAND">XML_XPATH_INVALID_OPERAND</a> = 1210 /* 1210 */
+ <a name="XML_XPATH_INVALID_TYPE">XML_XPATH_INVALID_TYPE</a> = 1211 /* 1211 */
+ <a name="XML_XPATH_INVALID_ARITY">XML_XPATH_INVALID_ARITY</a> = 1212 /* 1212 */
+ <a name="XML_XPATH_INVALID_CTXT_SIZE">XML_XPATH_INVALID_CTXT_SIZE</a> = 1213 /* 1213 */
+ <a name="XML_XPATH_INVALID_CTXT_POSITION">XML_XPATH_INVALID_CTXT_POSITION</a> = 1214 /* 1214 */
+ <a name="XML_XPATH_MEMORY_ERROR">XML_XPATH_MEMORY_ERROR</a> = 1215 /* 1215 */
+ <a name="XML_XPTR_SYNTAX_ERROR">XML_XPTR_SYNTAX_ERROR</a> = 1216 /* 1216 */
+ <a name="XML_XPTR_RESOURCE_ERROR">XML_XPTR_RESOURCE_ERROR</a> = 1217 /* 1217 */
+ <a name="XML_XPTR_SUB_RESOURCE_ERROR">XML_XPTR_SUB_RESOURCE_ERROR</a> = 1218 /* 1218 */
+ <a name="XML_XPATH_UNDEF_PREFIX_ERROR">XML_XPATH_UNDEF_PREFIX_ERROR</a> = 1219 /* 1219 */
+ <a name="XML_XPATH_ENCODING_ERROR">XML_XPATH_ENCODING_ERROR</a> = 1220 /* 1220 */
+ <a name="XML_XPATH_INVALID_CHAR_ERROR">XML_XPATH_INVALID_CHAR_ERROR</a> = 1221 /* 1221 */
+ <a name="XML_TREE_INVALID_HEX">XML_TREE_INVALID_HEX</a> = 1300
+ <a name="XML_TREE_INVALID_DEC">XML_TREE_INVALID_DEC</a> = 1301 /* 1301 */
+ <a name="XML_TREE_UNTERMINATED_ENTITY">XML_TREE_UNTERMINATED_ENTITY</a> = 1302 /* 1302 */
+ <a name="XML_TREE_NOT_UTF8">XML_TREE_NOT_UTF8</a> = 1303 /* 1303 */
+ <a name="XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a> = 1400
+ <a name="XML_SAVE_CHAR_INVALID">XML_SAVE_CHAR_INVALID</a> = 1401 /* 1401 */
+ <a name="XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a> = 1402 /* 1402 */
+ <a name="XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a> = 1403 /* 1403 */
+ <a name="XML_REGEXP_COMPILE_ERROR">XML_REGEXP_COMPILE_ERROR</a> = 1450
+ <a name="XML_IO_UNKNOWN">XML_IO_UNKNOWN</a> = 1500
+ <a name="XML_IO_EACCES">XML_IO_EACCES</a> = 1501 /* 1501 */
+ <a name="XML_IO_EAGAIN">XML_IO_EAGAIN</a> = 1502 /* 1502 */
+ <a name="XML_IO_EBADF">XML_IO_EBADF</a> = 1503 /* 1503 */
+ <a name="XML_IO_EBADMSG">XML_IO_EBADMSG</a> = 1504 /* 1504 */
+ <a name="XML_IO_EBUSY">XML_IO_EBUSY</a> = 1505 /* 1505 */
+ <a name="XML_IO_ECANCELED">XML_IO_ECANCELED</a> = 1506 /* 1506 */
+ <a name="XML_IO_ECHILD">XML_IO_ECHILD</a> = 1507 /* 1507 */
+ <a name="XML_IO_EDEADLK">XML_IO_EDEADLK</a> = 1508 /* 1508 */
+ <a name="XML_IO_EDOM">XML_IO_EDOM</a> = 1509 /* 1509 */
+ <a name="XML_IO_EEXIST">XML_IO_EEXIST</a> = 1510 /* 1510 */
+ <a name="XML_IO_EFAULT">XML_IO_EFAULT</a> = 1511 /* 1511 */
+ <a name="XML_IO_EFBIG">XML_IO_EFBIG</a> = 1512 /* 1512 */
+ <a name="XML_IO_EINPROGRESS">XML_IO_EINPROGRESS</a> = 1513 /* 1513 */
+ <a name="XML_IO_EINTR">XML_IO_EINTR</a> = 1514 /* 1514 */
+ <a name="XML_IO_EINVAL">XML_IO_EINVAL</a> = 1515 /* 1515 */
+ <a name="XML_IO_EIO">XML_IO_EIO</a> = 1516 /* 1516 */
+ <a name="XML_IO_EISDIR">XML_IO_EISDIR</a> = 1517 /* 1517 */
+ <a name="XML_IO_EMFILE">XML_IO_EMFILE</a> = 1518 /* 1518 */
+ <a name="XML_IO_EMLINK">XML_IO_EMLINK</a> = 1519 /* 1519 */
+ <a name="XML_IO_EMSGSIZE">XML_IO_EMSGSIZE</a> = 1520 /* 1520 */
+ <a name="XML_IO_ENAMETOOLONG">XML_IO_ENAMETOOLONG</a> = 1521 /* 1521 */
+ <a name="XML_IO_ENFILE">XML_IO_ENFILE</a> = 1522 /* 1522 */
+ <a name="XML_IO_ENODEV">XML_IO_ENODEV</a> = 1523 /* 1523 */
+ <a name="XML_IO_ENOENT">XML_IO_ENOENT</a> = 1524 /* 1524 */
+ <a name="XML_IO_ENOEXEC">XML_IO_ENOEXEC</a> = 1525 /* 1525 */
+ <a name="XML_IO_ENOLCK">XML_IO_ENOLCK</a> = 1526 /* 1526 */
+ <a name="XML_IO_ENOMEM">XML_IO_ENOMEM</a> = 1527 /* 1527 */
+ <a name="XML_IO_ENOSPC">XML_IO_ENOSPC</a> = 1528 /* 1528 */
+ <a name="XML_IO_ENOSYS">XML_IO_ENOSYS</a> = 1529 /* 1529 */
+ <a name="XML_IO_ENOTDIR">XML_IO_ENOTDIR</a> = 1530 /* 1530 */
+ <a name="XML_IO_ENOTEMPTY">XML_IO_ENOTEMPTY</a> = 1531 /* 1531 */
+ <a name="XML_IO_ENOTSUP">XML_IO_ENOTSUP</a> = 1532 /* 1532 */
+ <a name="XML_IO_ENOTTY">XML_IO_ENOTTY</a> = 1533 /* 1533 */
+ <a name="XML_IO_ENXIO">XML_IO_ENXIO</a> = 1534 /* 1534 */
+ <a name="XML_IO_EPERM">XML_IO_EPERM</a> = 1535 /* 1535 */
+ <a name="XML_IO_EPIPE">XML_IO_EPIPE</a> = 1536 /* 1536 */
+ <a name="XML_IO_ERANGE">XML_IO_ERANGE</a> = 1537 /* 1537 */
+ <a name="XML_IO_EROFS">XML_IO_EROFS</a> = 1538 /* 1538 */
+ <a name="XML_IO_ESPIPE">XML_IO_ESPIPE</a> = 1539 /* 1539 */
+ <a name="XML_IO_ESRCH">XML_IO_ESRCH</a> = 1540 /* 1540 */
+ <a name="XML_IO_ETIMEDOUT">XML_IO_ETIMEDOUT</a> = 1541 /* 1541 */
+ <a name="XML_IO_EXDEV">XML_IO_EXDEV</a> = 1542 /* 1542 */
+ <a name="XML_IO_NETWORK_ATTEMPT">XML_IO_NETWORK_ATTEMPT</a> = 1543 /* 1543 */
+ <a name="XML_IO_ENCODER">XML_IO_ENCODER</a> = 1544 /* 1544 */
+ <a name="XML_IO_FLUSH">XML_IO_FLUSH</a> = 1545 /* 1545 */
+ <a name="XML_IO_WRITE">XML_IO_WRITE</a> = 1546 /* 1546 */
+ <a name="XML_IO_NO_INPUT">XML_IO_NO_INPUT</a> = 1547 /* 1547 */
+ <a name="XML_IO_BUFFER_FULL">XML_IO_BUFFER_FULL</a> = 1548 /* 1548 */
+ <a name="XML_IO_LOAD_ERROR">XML_IO_LOAD_ERROR</a> = 1549 /* 1549 */
+ <a name="XML_IO_ENOTSOCK">XML_IO_ENOTSOCK</a> = 1550 /* 1550 */
+ <a name="XML_IO_EISCONN">XML_IO_EISCONN</a> = 1551 /* 1551 */
+ <a name="XML_IO_ECONNREFUSED">XML_IO_ECONNREFUSED</a> = 1552 /* 1552 */
+ <a name="XML_IO_ENETUNREACH">XML_IO_ENETUNREACH</a> = 1553 /* 1553 */
+ <a name="XML_IO_EADDRINUSE">XML_IO_EADDRINUSE</a> = 1554 /* 1554 */
+ <a name="XML_IO_EALREADY">XML_IO_EALREADY</a> = 1555 /* 1555 */
+ <a name="XML_IO_EAFNOSUPPORT">XML_IO_EAFNOSUPPORT</a> = 1556 /* 1556 */
+ <a name="XML_XINCLUDE_RECURSION">XML_XINCLUDE_RECURSION</a> = 1600
+ <a name="XML_XINCLUDE_PARSE_VALUE">XML_XINCLUDE_PARSE_VALUE</a> = 1601 /* 1601 */
+ <a name="XML_XINCLUDE_ENTITY_DEF_MISMATCH">XML_XINCLUDE_ENTITY_DEF_MISMATCH</a> = 1602 /* 1602 */
+ <a name="XML_XINCLUDE_NO_HREF">XML_XINCLUDE_NO_HREF</a> = 1603 /* 1603 */
+ <a name="XML_XINCLUDE_NO_FALLBACK">XML_XINCLUDE_NO_FALLBACK</a> = 1604 /* 1604 */
+ <a name="XML_XINCLUDE_HREF_URI">XML_XINCLUDE_HREF_URI</a> = 1605 /* 1605 */
+ <a name="XML_XINCLUDE_TEXT_FRAGMENT">XML_XINCLUDE_TEXT_FRAGMENT</a> = 1606 /* 1606 */
+ <a name="XML_XINCLUDE_TEXT_DOCUMENT">XML_XINCLUDE_TEXT_DOCUMENT</a> = 1607 /* 1607 */
+ <a name="XML_XINCLUDE_INVALID_CHAR">XML_XINCLUDE_INVALID_CHAR</a> = 1608 /* 1608 */
+ <a name="XML_XINCLUDE_BUILD_FAILED">XML_XINCLUDE_BUILD_FAILED</a> = 1609 /* 1609 */
+ <a name="XML_XINCLUDE_UNKNOWN_ENCODING">XML_XINCLUDE_UNKNOWN_ENCODING</a> = 1610 /* 1610 */
+ <a name="XML_XINCLUDE_MULTIPLE_ROOT">XML_XINCLUDE_MULTIPLE_ROOT</a> = 1611 /* 1611 */
+ <a name="XML_XINCLUDE_XPTR_FAILED">XML_XINCLUDE_XPTR_FAILED</a> = 1612 /* 1612 */
+ <a name="XML_XINCLUDE_XPTR_RESULT">XML_XINCLUDE_XPTR_RESULT</a> = 1613 /* 1613 */
+ <a name="XML_XINCLUDE_INCLUDE_IN_INCLUDE">XML_XINCLUDE_INCLUDE_IN_INCLUDE</a> = 1614 /* 1614 */
+ <a name="XML_XINCLUDE_FALLBACKS_IN_INCLUDE">XML_XINCLUDE_FALLBACKS_IN_INCLUDE</a> = 1615 /* 1615 */
+ <a name="XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE">XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE</a> = 1616 /* 1616 */
+ <a name="XML_XINCLUDE_DEPRECATED_NS">XML_XINCLUDE_DEPRECATED_NS</a> = 1617 /* 1617 */
+ <a name="XML_XINCLUDE_FRAGMENT_ID">XML_XINCLUDE_FRAGMENT_ID</a> = 1618 /* 1618 */
+ <a name="XML_CATALOG_MISSING_ATTR">XML_CATALOG_MISSING_ATTR</a> = 1650
+ <a name="XML_CATALOG_ENTRY_BROKEN">XML_CATALOG_ENTRY_BROKEN</a> = 1651 /* 1651 */
+ <a name="XML_CATALOG_PREFER_VALUE">XML_CATALOG_PREFER_VALUE</a> = 1652 /* 1652 */
+ <a name="XML_CATALOG_NOT_CATALOG">XML_CATALOG_NOT_CATALOG</a> = 1653 /* 1653 */
+ <a name="XML_CATALOG_RECURSION">XML_CATALOG_RECURSION</a> = 1654 /* 1654 */
+ <a name="XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a> = 1700
+ <a name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a> = 1701 /* 1701 */
+ <a name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a> = 1702 /* 1702 */
+ <a name="XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a> = 1703 /* 1703 */
+ <a name="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a> = 1704 /* 1704 */
+ <a name="XML_SCHEMAP_ELEMFORMDEFAULT_VALUE">XML_SCHEMAP_ELEMFORMDEFAULT_VALUE</a> = 1705 /* 1705 */
+ <a name="XML_SCHEMAP_ELEM_NONAME_NOREF">XML_SCHEMAP_ELEM_NONAME_NOREF</a> = 1706 /* 1706 */
+ <a name="XML_SCHEMAP_EXTENSION_NO_BASE">XML_SCHEMAP_EXTENSION_NO_BASE</a> = 1707 /* 1707 */
+ <a name="XML_SCHEMAP_FACET_NO_VALUE">XML_SCHEMAP_FACET_NO_VALUE</a> = 1708 /* 1708 */
+ <a name="XML_SCHEMAP_FAILED_BUILD_IMPORT">XML_SCHEMAP_FAILED_BUILD_IMPORT</a> = 1709 /* 1709 */
+ <a name="XML_SCHEMAP_GROUP_NONAME_NOREF">XML_SCHEMAP_GROUP_NONAME_NOREF</a> = 1710 /* 1710 */
+ <a name="XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI">XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI</a> = 1711 /* 1711 */
+ <a name="XML_SCHEMAP_IMPORT_REDEFINE_NSNAME">XML_SCHEMAP_IMPORT_REDEFINE_NSNAME</a> = 1712 /* 1712 */
+ <a name="XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a> = 1713 /* 1713 */
+ <a name="XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a> = 1714 /* 1714 */
+ <a name="XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a> = 1715 /* 1715 */
+ <a name="XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a> = 1716 /* 1716 */
+ <a name="XML_SCHEMAP_INVALID_FACET_VALUE">XML_SCHEMAP_INVALID_FACET_VALUE</a> = 1717 /* 1717 */
+ <a name="XML_SCHEMAP_INVALID_MAXOCCURS">XML_SCHEMAP_INVALID_MAXOCCURS</a> = 1718 /* 1718 */
+ <a name="XML_SCHEMAP_INVALID_MINOCCURS">XML_SCHEMAP_INVALID_MINOCCURS</a> = 1719 /* 1719 */
+ <a name="XML_SCHEMAP_INVALID_REF_AND_SUBTYPE">XML_SCHEMAP_INVALID_REF_AND_SUBTYPE</a> = 1720 /* 1720 */
+ <a name="XML_SCHEMAP_INVALID_WHITE_SPACE">XML_SCHEMAP_INVALID_WHITE_SPACE</a> = 1721 /* 1721 */
+ <a name="XML_SCHEMAP_NOATTR_NOREF">XML_SCHEMAP_NOATTR_NOREF</a> = 1722 /* 1722 */
+ <a name="XML_SCHEMAP_NOTATION_NO_NAME">XML_SCHEMAP_NOTATION_NO_NAME</a> = 1723 /* 1723 */
+ <a name="XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a> = 1724 /* 1724 */
+ <a name="XML_SCHEMAP_REF_AND_SUBTYPE">XML_SCHEMAP_REF_AND_SUBTYPE</a> = 1725 /* 1725 */
+ <a name="XML_SCHEMAP_RESTRICTION_NONAME_NOREF">XML_SCHEMAP_RESTRICTION_NONAME_NOREF</a> = 1726 /* 1726 */
+ <a name="XML_SCHEMAP_SIMPLETYPE_NONAME">XML_SCHEMAP_SIMPLETYPE_NONAME</a> = 1727 /* 1727 */
+ <a name="XML_SCHEMAP_TYPE_AND_SUBTYPE">XML_SCHEMAP_TYPE_AND_SUBTYPE</a> = 1728 /* 1728 */
+ <a name="XML_SCHEMAP_UNKNOWN_ALL_CHILD">XML_SCHEMAP_UNKNOWN_ALL_CHILD</a> = 1729 /* 1729 */
+ <a name="XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD">XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD</a> = 1730 /* 1730 */
+ <a name="XML_SCHEMAP_UNKNOWN_ATTR_CHILD">XML_SCHEMAP_UNKNOWN_ATTR_CHILD</a> = 1731 /* 1731 */
+ <a name="XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD">XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD</a> = 1732 /* 1732 */
+ <a name="XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP">XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP</a> = 1733 /* 1733 */
+ <a name="XML_SCHEMAP_UNKNOWN_BASE_TYPE">XML_SCHEMAP_UNKNOWN_BASE_TYPE</a> = 1734 /* 1734 */
+ <a name="XML_SCHEMAP_UNKNOWN_CHOICE_CHILD">XML_SCHEMAP_UNKNOWN_CHOICE_CHILD</a> = 1735 /* 1735 */
+ <a name="XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD</a> = 1736 /* 1736 */
+ <a name="XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD</a> = 1737 /* 1737 */
+ <a name="XML_SCHEMAP_UNKNOWN_ELEM_CHILD">XML_SCHEMAP_UNKNOWN_ELEM_CHILD</a> = 1738 /* 1738 */
+ <a name="XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD">XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD</a> = 1739 /* 1739 */
+ <a name="XML_SCHEMAP_UNKNOWN_FACET_CHILD">XML_SCHEMAP_UNKNOWN_FACET_CHILD</a> = 1740 /* 1740 */
+ <a name="XML_SCHEMAP_UNKNOWN_FACET_TYPE">XML_SCHEMAP_UNKNOWN_FACET_TYPE</a> = 1741 /* 1741 */
+ <a name="XML_SCHEMAP_UNKNOWN_GROUP_CHILD">XML_SCHEMAP_UNKNOWN_GROUP_CHILD</a> = 1742 /* 1742 */
+ <a name="XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a> = 1743 /* 1743 */
+ <a name="XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a> = 1744 /* 1744 */
+ <a name="XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a> = 1745 /* 1745 */
+ <a name="XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a> = 1746 /* 1746 */
+ <a name="XML_SCHEMAP_UNKNOWN_REF">XML_SCHEMAP_UNKNOWN_REF</a> = 1747 /* 1747 */
+ <a name="XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD">XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD</a> = 1748 /* 1748 */
+ <a name="XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD">XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD</a> = 1749 /* 1749 */
+ <a name="XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD">XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD</a> = 1750 /* 1750 */
+ <a name="XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD</a> = 1751 /* 1751 */
+ <a name="XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD</a> = 1752 /* 1752 */
+ <a name="XML_SCHEMAP_UNKNOWN_TYPE">XML_SCHEMAP_UNKNOWN_TYPE</a> = 1753 /* 1753 */
+ <a name="XML_SCHEMAP_UNKNOWN_UNION_CHILD">XML_SCHEMAP_UNKNOWN_UNION_CHILD</a> = 1754 /* 1754 */
+ <a name="XML_SCHEMAP_ELEM_DEFAULT_FIXED">XML_SCHEMAP_ELEM_DEFAULT_FIXED</a> = 1755 /* 1755 */
+ <a name="XML_SCHEMAP_REGEXP_INVALID">XML_SCHEMAP_REGEXP_INVALID</a> = 1756 /* 1756 */
+ <a name="XML_SCHEMAP_FAILED_LOAD">XML_SCHEMAP_FAILED_LOAD</a> = 1757 /* 1757 */
+ <a name="XML_SCHEMAP_NOTHING_TO_PARSE">XML_SCHEMAP_NOTHING_TO_PARSE</a> = 1758 /* 1758 */
+ <a name="XML_SCHEMAP_NOROOT">XML_SCHEMAP_NOROOT</a> = 1759 /* 1759 */
+ <a name="XML_SCHEMAP_REDEFINED_GROUP">XML_SCHEMAP_REDEFINED_GROUP</a> = 1760 /* 1760 */
+ <a name="XML_SCHEMAP_REDEFINED_TYPE">XML_SCHEMAP_REDEFINED_TYPE</a> = 1761 /* 1761 */
+ <a name="XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a> = 1762 /* 1762 */
+ <a name="XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a> = 1763 /* 1763 */
+ <a name="XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a> = 1764 /* 1764 */
+ <a name="XML_SCHEMAP_REDEFINED_NOTATION">XML_SCHEMAP_REDEFINED_NOTATION</a> = 1765 /* 1765 */
+ <a name="XML_SCHEMAP_FAILED_PARSE">XML_SCHEMAP_FAILED_PARSE</a> = 1766 /* 1766 */
+ <a name="XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a> = 1767 /* 1767 */
+ <a name="XML_SCHEMAP_DEF_AND_PREFIX">XML_SCHEMAP_DEF_AND_PREFIX</a> = 1768 /* 1768 */
+ <a name="XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a> = 1769 /* 1769 */
+ <a name="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a> = 1770 /* 1770 */
+ <a name="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a> = 1771 /* 1771 */
+ <a name="XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a> = 1772 /* 1772 */
+ <a name="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a> = 1773 /* 1773 */
+ <a name="XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a> = 1774 /* 1774 */
+ <a name="XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a> = 1775 /* 1775 */
+ <a name="XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE">XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE</a> = 1776 /* 1776 */
+ <a name="XML_SCHEMAP_INVALID_ATTR_COMBINATION">XML_SCHEMAP_INVALID_ATTR_COMBINATION</a> = 1777 /* 1777 */
+ <a name="XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION">XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION</a> = 1778 /* 1778 */
+ <a name="XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD">XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD</a> = 1779 /* 1779 */
+ <a name="XML_SCHEMAP_INVALID_ATTR_NAME">XML_SCHEMAP_INVALID_ATTR_NAME</a> = 1780 /* 1780 */
+ <a name="XML_SCHEMAP_REF_AND_CONTENT">XML_SCHEMAP_REF_AND_CONTENT</a> = 1781 /* 1781 */
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_1">XML_SCHEMAP_CT_PROPS_CORRECT_1</a> = 1782 /* 1782 */
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_2">XML_SCHEMAP_CT_PROPS_CORRECT_2</a> = 1783 /* 1783 */
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_3">XML_SCHEMAP_CT_PROPS_CORRECT_3</a> = 1784 /* 1784 */
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_4">XML_SCHEMAP_CT_PROPS_CORRECT_4</a> = 1785 /* 1785 */
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_5">XML_SCHEMAP_CT_PROPS_CORRECT_5</a> = 1786 /* 1786 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1</a> = 1787 /* 1787 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1</a> = 1788 /* 1788 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2</a> = 1789 /* 1789 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2</a> = 1790 /* 1790 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3</a> = 1791 /* 1791 */
+ <a name="XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER">XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER</a> = 1792 /* 1792 */
+ <a name="XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE">XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE</a> = 1793 /* 1793 */
+ <a name="XML_SCHEMAP_UNION_NOT_EXPRESSIBLE">XML_SCHEMAP_UNION_NOT_EXPRESSIBLE</a> = 1794 /* 1794 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_3_1">XML_SCHEMAP_SRC_IMPORT_3_1</a> = 1795 /* 1795 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_3_2">XML_SCHEMAP_SRC_IMPORT_3_2</a> = 1796 /* 1796 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1</a> = 1797 /* 1797 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2</a> = 1798 /* 1798 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3</a> = 1799 /* 1799 */
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a> = 1800 /* 1800 */
+ <a name="XML_SCHEMAV_NOROOT">XML_SCHEMAV_NOROOT</a> = 1801
+ <a name="XML_SCHEMAV_UNDECLAREDELEM">XML_SCHEMAV_UNDECLAREDELEM</a> = 1802 /* 1802 */
+ <a name="XML_SCHEMAV_NOTTOPLEVEL">XML_SCHEMAV_NOTTOPLEVEL</a> = 1803 /* 1803 */
+ <a name="XML_SCHEMAV_MISSING">XML_SCHEMAV_MISSING</a> = 1804 /* 1804 */
+ <a name="XML_SCHEMAV_WRONGELEM">XML_SCHEMAV_WRONGELEM</a> = 1805 /* 1805 */
+ <a name="XML_SCHEMAV_NOTYPE">XML_SCHEMAV_NOTYPE</a> = 1806 /* 1806 */
+ <a name="XML_SCHEMAV_NOROLLBACK">XML_SCHEMAV_NOROLLBACK</a> = 1807 /* 1807 */
+ <a name="XML_SCHEMAV_ISABSTRACT">XML_SCHEMAV_ISABSTRACT</a> = 1808 /* 1808 */
+ <a name="XML_SCHEMAV_NOTEMPTY">XML_SCHEMAV_NOTEMPTY</a> = 1809 /* 1809 */
+ <a name="XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a> = 1810 /* 1810 */
+ <a name="XML_SCHEMAV_HAVEDEFAULT">XML_SCHEMAV_HAVEDEFAULT</a> = 1811 /* 1811 */
+ <a name="XML_SCHEMAV_NOTNILLABLE">XML_SCHEMAV_NOTNILLABLE</a> = 1812 /* 1812 */
+ <a name="XML_SCHEMAV_EXTRACONTENT">XML_SCHEMAV_EXTRACONTENT</a> = 1813 /* 1813 */
+ <a name="XML_SCHEMAV_INVALIDATTR">XML_SCHEMAV_INVALIDATTR</a> = 1814 /* 1814 */
+ <a name="XML_SCHEMAV_INVALIDELEM">XML_SCHEMAV_INVALIDELEM</a> = 1815 /* 1815 */
+ <a name="XML_SCHEMAV_NOTDETERMINIST">XML_SCHEMAV_NOTDETERMINIST</a> = 1816 /* 1816 */
+ <a name="XML_SCHEMAV_CONSTRUCT">XML_SCHEMAV_CONSTRUCT</a> = 1817 /* 1817 */
+ <a name="XML_SCHEMAV_INTERNAL">XML_SCHEMAV_INTERNAL</a> = 1818 /* 1818 */
+ <a name="XML_SCHEMAV_NOTSIMPLE">XML_SCHEMAV_NOTSIMPLE</a> = 1819 /* 1819 */
+ <a name="XML_SCHEMAV_ATTRUNKNOWN">XML_SCHEMAV_ATTRUNKNOWN</a> = 1820 /* 1820 */
+ <a name="XML_SCHEMAV_ATTRINVALID">XML_SCHEMAV_ATTRINVALID</a> = 1821 /* 1821 */
+ <a name="XML_SCHEMAV_VALUE">XML_SCHEMAV_VALUE</a> = 1822 /* 1822 */
+ <a name="XML_SCHEMAV_FACET">XML_SCHEMAV_FACET</a> = 1823 /* 1823 */
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1</a> = 1824 /* 1824 */
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2</a> = 1825 /* 1825 */
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3</a> = 1826 /* 1826 */
+ <a name="XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a> = 1827 /* 1827 */
+ <a name="XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a> = 1828 /* 1828 */
+ <a name="XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a> = 1829 /* 1829 */
+ <a name="XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a> = 1830 /* 1830 */
+ <a name="XML_SCHEMAV_CVC_MINLENGTH_VALID">XML_SCHEMAV_CVC_MINLENGTH_VALID</a> = 1831 /* 1831 */
+ <a name="XML_SCHEMAV_CVC_MAXLENGTH_VALID">XML_SCHEMAV_CVC_MAXLENGTH_VALID</a> = 1832 /* 1832 */
+ <a name="XML_SCHEMAV_CVC_MININCLUSIVE_VALID">XML_SCHEMAV_CVC_MININCLUSIVE_VALID</a> = 1833 /* 1833 */
+ <a name="XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a> = 1834 /* 1834 */
+ <a name="XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID</a> = 1835 /* 1835 */
+ <a name="XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a> = 1836 /* 1836 */
+ <a name="XML_SCHEMAV_CVC_TOTALDIGITS_VALID">XML_SCHEMAV_CVC_TOTALDIGITS_VALID</a> = 1837 /* 1837 */
+ <a name="XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a> = 1838 /* 1838 */
+ <a name="XML_SCHEMAV_CVC_PATTERN_VALID">XML_SCHEMAV_CVC_PATTERN_VALID</a> = 1839 /* 1839 */
+ <a name="XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a> = 1840 /* 1840 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1</a> = 1841 /* 1841 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2</a> = 1842 /* 1842 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3</a> = 1843 /* 1843 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4</a> = 1844 /* 1844 */
+ <a name="XML_SCHEMAV_CVC_ELT_1">XML_SCHEMAV_CVC_ELT_1</a> = 1845 /* 1845 */
+ <a name="XML_SCHEMAV_CVC_ELT_2">XML_SCHEMAV_CVC_ELT_2</a> = 1846 /* 1846 */
+ <a name="XML_SCHEMAV_CVC_ELT_3_1">XML_SCHEMAV_CVC_ELT_3_1</a> = 1847 /* 1847 */
+ <a name="XML_SCHEMAV_CVC_ELT_3_2_1">XML_SCHEMAV_CVC_ELT_3_2_1</a> = 1848 /* 1848 */
+ <a name="XML_SCHEMAV_CVC_ELT_3_2_2">XML_SCHEMAV_CVC_ELT_3_2_2</a> = 1849 /* 1849 */
+ <a name="XML_SCHEMAV_CVC_ELT_4_1">XML_SCHEMAV_CVC_ELT_4_1</a> = 1850 /* 1850 */
+ <a name="XML_SCHEMAV_CVC_ELT_4_2">XML_SCHEMAV_CVC_ELT_4_2</a> = 1851 /* 1851 */
+ <a name="XML_SCHEMAV_CVC_ELT_4_3">XML_SCHEMAV_CVC_ELT_4_3</a> = 1852 /* 1852 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_1_1">XML_SCHEMAV_CVC_ELT_5_1_1</a> = 1853 /* 1853 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_1_2">XML_SCHEMAV_CVC_ELT_5_1_2</a> = 1854 /* 1854 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_1">XML_SCHEMAV_CVC_ELT_5_2_1</a> = 1855 /* 1855 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_1</a> = 1856 /* 1856 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_2_1</a> = 1857 /* 1857 */
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_2_2">XML_SCHEMAV_CVC_ELT_5_2_2_2_2</a> = 1858 /* 1858 */
+ <a name="XML_SCHEMAV_CVC_ELT_6">XML_SCHEMAV_CVC_ELT_6</a> = 1859 /* 1859 */
+ <a name="XML_SCHEMAV_CVC_ELT_7">XML_SCHEMAV_CVC_ELT_7</a> = 1860 /* 1860 */
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_1">XML_SCHEMAV_CVC_ATTRIBUTE_1</a> = 1861 /* 1861 */
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_2">XML_SCHEMAV_CVC_ATTRIBUTE_2</a> = 1862 /* 1862 */
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_3">XML_SCHEMAV_CVC_ATTRIBUTE_3</a> = 1863 /* 1863 */
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_4">XML_SCHEMAV_CVC_ATTRIBUTE_4</a> = 1864 /* 1864 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1</a> = 1865 /* 1865 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1</a> = 1866 /* 1866 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2</a> = 1867 /* 1867 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_4</a> = 1868 /* 1868 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1</a> = 1869 /* 1869 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2</a> = 1870 /* 1870 */
+ <a name="XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a> = 1871 /* 1871 */
+ <a name="XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a> = 1872 /* 1872 */
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_1</a> = 1873 /* 1873 */
+ <a name="XML_SCHEMAV_CVC_AU">XML_SCHEMAV_CVC_AU</a> = 1874 /* 1874 */
+ <a name="XML_SCHEMAV_CVC_TYPE_1">XML_SCHEMAV_CVC_TYPE_1</a> = 1875 /* 1875 */
+ <a name="XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a> = 1876 /* 1876 */
+ <a name="XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a> = 1877 /* 1877 */
+ <a name="XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a> = 1878 /* 1878 */
+ <a name="XML_SCHEMAV_MISC">XML_SCHEMAV_MISC</a> = 1879 /* 1879 */
+ <a name="XML_XPTR_UNKNOWN_SCHEME">XML_XPTR_UNKNOWN_SCHEME</a> = 1900
+ <a name="XML_XPTR_CHILDSEQ_START">XML_XPTR_CHILDSEQ_START</a> = 1901 /* 1901 */
+ <a name="XML_XPTR_EVAL_FAILED">XML_XPTR_EVAL_FAILED</a> = 1902 /* 1902 */
+ <a name="XML_XPTR_EXTRA_OBJECTS">XML_XPTR_EXTRA_OBJECTS</a> = 1903 /* 1903 */
+ <a name="XML_C14N_CREATE_CTXT">XML_C14N_CREATE_CTXT</a> = 1950
+ <a name="XML_C14N_REQUIRES_UTF8">XML_C14N_REQUIRES_UTF8</a> = 1951 /* 1951 */
+ <a name="XML_C14N_CREATE_STACK">XML_C14N_CREATE_STACK</a> = 1952 /* 1952 */
+ <a name="XML_C14N_INVALID_NODE">XML_C14N_INVALID_NODE</a> = 1953 /* 1953 */
+ <a name="XML_C14N_UNKNOW_NODE">XML_C14N_UNKNOW_NODE</a> = 1954 /* 1954 */
+ <a name="XML_C14N_RELATIVE_NAMESPACE">XML_C14N_RELATIVE_NAMESPACE</a> = 1955 /* 1955 */
+ <a name="XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a> = 2000
+ <a name="XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a> = 2001 /* 2001 */
+ <a name="XML_FTP_ACCNT">XML_FTP_ACCNT</a> = 2002 /* 2002 */
+ <a name="XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a> = 2003 /* 2003 */
+ <a name="XML_HTTP_URL_SYNTAX">XML_HTTP_URL_SYNTAX</a> = 2020
+ <a name="XML_HTTP_USE_IP">XML_HTTP_USE_IP</a> = 2021 /* 2021 */
+ <a name="XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a> = 2022 /* 2022 */
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_1">XML_SCHEMAP_SRC_SIMPLE_TYPE_1</a> = 3000
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_2">XML_SCHEMAP_SRC_SIMPLE_TYPE_2</a> = 3001 /* 3001 */
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_3">XML_SCHEMAP_SRC_SIMPLE_TYPE_3</a> = 3002 /* 3002 */
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_4">XML_SCHEMAP_SRC_SIMPLE_TYPE_4</a> = 3003 /* 3003 */
+ <a name="XML_SCHEMAP_SRC_RESOLVE">XML_SCHEMAP_SRC_RESOLVE</a> = 3004 /* 3004 */
+ <a name="XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE</a> = 3005 /* 3005 */
+ <a name="XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE</a> = 3006 /* 3006 */
+ <a name="XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES">XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES</a> = 3007 /* 3007 */
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_1">XML_SCHEMAP_ST_PROPS_CORRECT_1</a> = 3008 /* 3008 */
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_2">XML_SCHEMAP_ST_PROPS_CORRECT_2</a> = 3009 /* 3009 */
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_3">XML_SCHEMAP_ST_PROPS_CORRECT_3</a> = 3010 /* 3010 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_1</a> = 3011 /* 3011 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_2</a> = 3012 /* 3012 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1</a> = 3013 /* 3013 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2</a> = 3014 /* 3014 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_1</a> = 3015 /* 3015 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1</a> = 3016 /* 3016 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2</a> = 3017 /* 3017 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1</a> = 3018 /* 3018 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2</a> = 3019 /* 3019 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3</a> = 3020 /* 3020 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4</a> = 3021 /* 3021 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5</a> = 3022 /* 3022 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_1</a> = 3023 /* 3023 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1</a> = 3024 /* 3024 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2</a> = 3025 /* 3025 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2</a> = 3026 /* 3026 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1</a> = 3027 /* 3027 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3</a> = 3028 /* 3028 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4</a> = 3029 /* 3029 */
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5</a> = 3030 /* 3030 */
+ <a name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a> = 3031 /* 3031 */
+ <a name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a> = 3032 /* 3032 */
+ <a name="XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED">XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED</a> = 3033 /* 3033 */
+ <a name="XML_SCHEMAP_S4S_ELEM_MISSING">XML_SCHEMAP_S4S_ELEM_MISSING</a> = 3034 /* 3034 */
+ <a name="XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED">XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED</a> = 3035 /* 3035 */
+ <a name="XML_SCHEMAP_S4S_ATTR_MISSING">XML_SCHEMAP_S4S_ATTR_MISSING</a> = 3036 /* 3036 */
+ <a name="XML_SCHEMAP_S4S_ATTR_INVALID_VALUE">XML_SCHEMAP_S4S_ATTR_INVALID_VALUE</a> = 3037 /* 3037 */
+ <a name="XML_SCHEMAP_SRC_ELEMENT_1">XML_SCHEMAP_SRC_ELEMENT_1</a> = 3038 /* 3038 */
+ <a name="XML_SCHEMAP_SRC_ELEMENT_2_1">XML_SCHEMAP_SRC_ELEMENT_2_1</a> = 3039 /* 3039 */
+ <a name="XML_SCHEMAP_SRC_ELEMENT_2_2">XML_SCHEMAP_SRC_ELEMENT_2_2</a> = 3040 /* 3040 */
+ <a name="XML_SCHEMAP_SRC_ELEMENT_3">XML_SCHEMAP_SRC_ELEMENT_3</a> = 3041 /* 3041 */
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_1">XML_SCHEMAP_P_PROPS_CORRECT_1</a> = 3042 /* 3042 */
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_2_1">XML_SCHEMAP_P_PROPS_CORRECT_2_1</a> = 3043 /* 3043 */
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_2_2">XML_SCHEMAP_P_PROPS_CORRECT_2_2</a> = 3044 /* 3044 */
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_2">XML_SCHEMAP_E_PROPS_CORRECT_2</a> = 3045 /* 3045 */
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_3">XML_SCHEMAP_E_PROPS_CORRECT_3</a> = 3046 /* 3046 */
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_4">XML_SCHEMAP_E_PROPS_CORRECT_4</a> = 3047 /* 3047 */
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_5">XML_SCHEMAP_E_PROPS_CORRECT_5</a> = 3048 /* 3048 */
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_6">XML_SCHEMAP_E_PROPS_CORRECT_6</a> = 3049 /* 3049 */
+ <a name="XML_SCHEMAP_SRC_INCLUDE">XML_SCHEMAP_SRC_INCLUDE</a> = 3050 /* 3050 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_1">XML_SCHEMAP_SRC_ATTRIBUTE_1</a> = 3051 /* 3051 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_2">XML_SCHEMAP_SRC_ATTRIBUTE_2</a> = 3052 /* 3052 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_3_1">XML_SCHEMAP_SRC_ATTRIBUTE_3_1</a> = 3053 /* 3053 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_3_2">XML_SCHEMAP_SRC_ATTRIBUTE_3_2</a> = 3054 /* 3054 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_4">XML_SCHEMAP_SRC_ATTRIBUTE_4</a> = 3055 /* 3055 */
+ <a name="XML_SCHEMAP_NO_XMLNS">XML_SCHEMAP_NO_XMLNS</a> = 3056 /* 3056 */
+ <a name="XML_SCHEMAP_NO_XSI">XML_SCHEMAP_NO_XSI</a> = 3057 /* 3057 */
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_1">XML_SCHEMAP_COS_VALID_DEFAULT_1</a> = 3058 /* 3058 */
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_1</a> = 3059 /* 3059 */
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1</a> = 3060 /* 3060 */
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2</a> = 3061 /* 3061 */
+ <a name="XML_SCHEMAP_CVC_SIMPLE_TYPE">XML_SCHEMAP_CVC_SIMPLE_TYPE</a> = 3062 /* 3062 */
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a> = 3063 /* 3063 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_1_1">XML_SCHEMAP_SRC_IMPORT_1_1</a> = 3064 /* 3064 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_1_2">XML_SCHEMAP_SRC_IMPORT_1_2</a> = 3065 /* 3065 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_2">XML_SCHEMAP_SRC_IMPORT_2</a> = 3066 /* 3066 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_2_1">XML_SCHEMAP_SRC_IMPORT_2_1</a> = 3067 /* 3067 */
+ <a name="XML_SCHEMAP_SRC_IMPORT_2_2">XML_SCHEMAP_SRC_IMPORT_2_2</a> = 3068 /* 3068 */
+ <a name="XML_SCHEMAP_INTERNAL">XML_SCHEMAP_INTERNAL</a> = 3069 /* 3069 non-W3C */
+ <a name="XML_SCHEMAP_NOT_DETERMINISTIC">XML_SCHEMAP_NOT_DETERMINISTIC</a> = 3070 /* 3070 non-W3C */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1</a> = 3071 /* 3071 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2</a> = 3072 /* 3072 */
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3</a> = 3073 /* 3073 */
+ <a name="XML_SCHEMAP_MG_PROPS_CORRECT_1">XML_SCHEMAP_MG_PROPS_CORRECT_1</a> = 3074 /* 3074 */
+ <a name="XML_SCHEMAP_MG_PROPS_CORRECT_2">XML_SCHEMAP_MG_PROPS_CORRECT_2</a> = 3075 /* 3075 */
+ <a name="XML_SCHEMAP_SRC_CT_1">XML_SCHEMAP_SRC_CT_1</a> = 3076 /* 3076 */
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3</a> = 3077 /* 3077 */
+ <a name="XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a> = 3078 /* 3078 */
+ <a name="XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a> = 3079 /* 3079 */
+ <a name="XML_SCHEMAP_C_PROPS_CORRECT">XML_SCHEMAP_C_PROPS_CORRECT</a> = 3080 /* 3080 */
+ <a name="XML_SCHEMAP_SRC_REDEFINE">XML_SCHEMAP_SRC_REDEFINE</a> = 3081 /* 3081 */
+ <a name="XML_SCHEMAP_SRC_IMPORT">XML_SCHEMAP_SRC_IMPORT</a> = 3082 /* 3082 */
+ <a name="XML_SCHEMAP_WARN_SKIP_SCHEMA">XML_SCHEMAP_WARN_SKIP_SCHEMA</a> = 3083 /* 3083 */
+ <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 /* 3084 */
+ <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 /* 3085 */
+ <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 /* 3085 */
+ <a name="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 /* 3086 */
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 /* 3087 */
+ <a name="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 /* 3088 */
+ <a name="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 /* 3089 */
+ <a name="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 /* 3090 */
+ <a name="XML_SCHEMATRONV_ASSERT">XML_SCHEMATRONV_ASSERT</a> = 4000 /* 4000 */
+ <a name="XML_SCHEMATRONV_REPORT">XML_SCHEMATRONV_REPORT</a> = 4001
+ <a name="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 /* 4900 */
+ <a name="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 /* 4901 */
+ <a name="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000
+ <a name="XML_CHECK_FOUND_ATTRIBUTE">XML_CHECK_FOUND_ATTRIBUTE</a> = 5001 /* 5001 */
+ <a name="XML_CHECK_FOUND_TEXT">XML_CHECK_FOUND_TEXT</a> = 5002 /* 5002 */
+ <a name="XML_CHECK_FOUND_CDATA">XML_CHECK_FOUND_CDATA</a> = 5003 /* 5003 */
+ <a name="XML_CHECK_FOUND_ENTITYREF">XML_CHECK_FOUND_ENTITYREF</a> = 5004 /* 5004 */
+ <a name="XML_CHECK_FOUND_ENTITY">XML_CHECK_FOUND_ENTITY</a> = 5005 /* 5005 */
+ <a name="XML_CHECK_FOUND_PI">XML_CHECK_FOUND_PI</a> = 5006 /* 5006 */
+ <a name="XML_CHECK_FOUND_COMMENT">XML_CHECK_FOUND_COMMENT</a> = 5007 /* 5007 */
+ <a name="XML_CHECK_FOUND_DOCTYPE">XML_CHECK_FOUND_DOCTYPE</a> = 5008 /* 5008 */
+ <a name="XML_CHECK_FOUND_FRAGMENT">XML_CHECK_FOUND_FRAGMENT</a> = 5009 /* 5009 */
+ <a name="XML_CHECK_FOUND_NOTATION">XML_CHECK_FOUND_NOTATION</a> = 5010 /* 5010 */
+ <a name="XML_CHECK_UNKNOWN_NODE">XML_CHECK_UNKNOWN_NODE</a> = 5011 /* 5011 */
+ <a name="XML_CHECK_ENTITY_TYPE">XML_CHECK_ENTITY_TYPE</a> = 5012 /* 5012 */
+ <a name="XML_CHECK_NO_PARENT">XML_CHECK_NO_PARENT</a> = 5013 /* 5013 */
+ <a name="XML_CHECK_NO_DOC">XML_CHECK_NO_DOC</a> = 5014 /* 5014 */
+ <a name="XML_CHECK_NO_NAME">XML_CHECK_NO_NAME</a> = 5015 /* 5015 */
+ <a name="XML_CHECK_NO_ELEM">XML_CHECK_NO_ELEM</a> = 5016 /* 5016 */
+ <a name="XML_CHECK_WRONG_DOC">XML_CHECK_WRONG_DOC</a> = 5017 /* 5017 */
+ <a name="XML_CHECK_NO_PREV">XML_CHECK_NO_PREV</a> = 5018 /* 5018 */
+ <a name="XML_CHECK_WRONG_PREV">XML_CHECK_WRONG_PREV</a> = 5019 /* 5019 */
+ <a name="XML_CHECK_NO_NEXT">XML_CHECK_NO_NEXT</a> = 5020 /* 5020 */
+ <a name="XML_CHECK_WRONG_NEXT">XML_CHECK_WRONG_NEXT</a> = 5021 /* 5021 */
+ <a name="XML_CHECK_NOT_DTD">XML_CHECK_NOT_DTD</a> = 5022 /* 5022 */
+ <a name="XML_CHECK_NOT_ATTR">XML_CHECK_NOT_ATTR</a> = 5023 /* 5023 */
+ <a name="XML_CHECK_NOT_ATTR_DECL">XML_CHECK_NOT_ATTR_DECL</a> = 5024 /* 5024 */
+ <a name="XML_CHECK_NOT_ELEM_DECL">XML_CHECK_NOT_ELEM_DECL</a> = 5025 /* 5025 */
+ <a name="XML_CHECK_NOT_ENTITY_DECL">XML_CHECK_NOT_ENTITY_DECL</a> = 5026 /* 5026 */
+ <a name="XML_CHECK_NOT_NS_DECL">XML_CHECK_NOT_NS_DECL</a> = 5027 /* 5027 */
+ <a name="XML_CHECK_NO_HREF">XML_CHECK_NO_HREF</a> = 5028 /* 5028 */
+ <a name="XML_CHECK_WRONG_PARENT">XML_CHECK_WRONG_PARENT</a> = 5029 /* 5029 */
+ <a name="XML_CHECK_NS_SCOPE">XML_CHECK_NS_SCOPE</a> = 5030 /* 5030 */
+ <a name="XML_CHECK_NS_ANCESTOR">XML_CHECK_NS_ANCESTOR</a> = 5031 /* 5031 */
+ <a name="XML_CHECK_NOT_UTF8">XML_CHECK_NOT_UTF8</a> = 5032 /* 5032 */
+ <a name="XML_CHECK_NO_DICT">XML_CHECK_NO_DICT</a> = 5033 /* 5033 */
+ <a name="XML_CHECK_NOT_NCNAME">XML_CHECK_NOT_NCNAME</a> = 5034 /* 5034 */
+ <a name="XML_CHECK_OUTSIDE_DICT">XML_CHECK_OUTSIDE_DICT</a> = 5035 /* 5035 */
+ <a name="XML_CHECK_WRONG_NAME">XML_CHECK_WRONG_NAME</a> = 5036 /* 5036 */
+ <a name="XML_CHECK_NAME_NOT_NULL">XML_CHECK_NAME_NOT_NULL</a> = 5037 /* 5037 */
+ <a name="XML_I18N_NO_NAME">XML_I18N_NO_NAME</a> = 6000
+ <a name="XML_I18N_NO_HANDLER">XML_I18N_NO_HANDLER</a> = 6001 /* 6001 */
+ <a name="XML_I18N_EXCESS_HANDLER">XML_I18N_EXCESS_HANDLER</a> = 6002 /* 6002 */
+ <a name="XML_I18N_CONV_FAILED">XML_I18N_CONV_FAILED</a> = 6003 /* 6003 */
+ <a name="XML_I18N_NO_OUTPUT">XML_I18N_NO_OUTPUT</a> = 6004 /* 6004 */
+ <a name="XML_BUF_OVERFLOW">XML_BUF_OVERFLOW</a> = 7000
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGenericErrorFunc"/>Function type xmlGenericErrorFunc</h3><pre class="programlisting">void xmlGenericErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of the function to use when there is an error and no parsing or validity context available .</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>a parsing context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>the extra arguments of the varags to format the message</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStructuredErrorFunc"/>Function type xmlStructuredErrorFunc</h3><pre class="programlisting">void xmlStructuredErrorFunc (void * userData, <br/> <a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> error)<br/>
+</pre><p>Signature of the function to use when there is an error and the module handles the new error reporting mechanism.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="initGenericErrorDefaultFunc"/>initGenericErrorDefaultFunc ()</h3><pre class="programlisting">void initGenericErrorDefaultFunc (<a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> * handler)<br/>
+</pre><p>Set or reset (if NULL) the default handler for generic errors to the builtin error function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the handler</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCopyError"/>xmlCopyError ()</h3><pre class="programlisting">int xmlCopyError (<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> from, <br/> <a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> to)<br/>
+</pre><p>Save the original error to the new place.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>a source error</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>a target error</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtGetLastError"/>xmlCtxtGetLastError ()</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> xmlCtxtGetLastError (void * ctx)<br/>
+</pre><p>Get the last parsing error registered.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if no error occured or a pointer to the error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCtxtResetLastError"/>xmlCtxtResetLastError ()</h3><pre class="programlisting">void xmlCtxtResetLastError (void * ctx)<br/>
+</pre><p>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetLastError"/>xmlGetLastError ()</h3><pre class="programlisting"><a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> xmlGetLastError (void)<br/>
+</pre><p>Get the last global error registered. This is per thread if compiled with thread support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if no error occured or a pointer to the error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserError"/>xmlParserError ()</h3><pre class="programlisting">void xmlParserError (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format an error messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserPrintFileContext"/>xmlParserPrintFileContext ()</h3><pre class="programlisting">void xmlParserPrintFileContext (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br/>
+</pre><p>Displays current context within the input content for error tracking</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserPrintFileInfo"/>xmlParserPrintFileInfo ()</h3><pre class="programlisting">void xmlParserPrintFileInfo (<a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br/>
+</pre><p>Displays the associated file and line informations for the current input</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserValidityError"/>xmlParserValidityError ()</h3><pre class="programlisting">void xmlParserValidityError (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format an validity error messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserValidityWarning"/>xmlParserValidityWarning ()</h3><pre class="programlisting">void xmlParserValidityWarning (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format a validity warning messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserWarning"/>xmlParserWarning ()</h3><pre class="programlisting">void xmlParserWarning (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Display and format a warning messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlResetError"/>xmlResetError ()</h3><pre class="programlisting">void xmlResetError (<a href="libxml2-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> err)<br/>
+</pre><p>Cleanup the error.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlResetLastError"/>xmlResetLastError ()</h3><pre class="programlisting">void xmlResetLastError (void)<br/>
+</pre><p>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetGenericErrorFunc"/>xmlSetGenericErrorFunc ()</h3><pre class="programlisting">void xmlSetGenericErrorFunc (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)<br/>
+</pre><p>Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. For multi-threaded applications, this must be set separately for each thread.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the new error handling context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new handler function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSetStructuredErrorFunc"/>xmlSetStructuredErrorFunc ()</h3><pre class="programlisting">void xmlSetStructuredErrorFunc (void * ctx, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)<br/>
+</pre><p>Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the new error handling context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new handler function</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlexports.html b/doc/devhelp/libxml2-xmlexports.html
new file mode 100644
index 0000000..f0ee4b4
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlexports.html
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlexports: macros for marking symbols as exportable/importable.</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlerror.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlmemory.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlexports</span>
+ </h2>
+ <p>xmlexports - macros for marking symbols as exportable/importable.</p>
+ <p>macros for marking symbols as exportable/importable. </p>
+ <p>Author(s): Igor Zlatovic &lt;igor@zlatkovic.com&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#_REENTRANT">_REENTRANT</a>;
+#define <a href="#XMLCDECL">XMLCDECL</a>;
+#define <a href="#XMLPUBVAR">XMLPUBVAR</a>;
+#define <a href="#LIBXML_DLL_IMPORT">LIBXML_DLL_IMPORT</a>;
+#define <a href="#XMLCALL">XMLCALL</a>;
+#define <a href="#XMLPUBFUN">XMLPUBFUN</a>;
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_DLL_IMPORT">Macro </a>LIBXML_DLL_IMPORT</h3><pre class="programlisting">#define <a href="#LIBXML_DLL_IMPORT">LIBXML_DLL_IMPORT</a>;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XMLCALL">Macro </a>XMLCALL</h3><pre class="programlisting">#define <a href="#XMLCALL">XMLCALL</a>;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XMLCDECL">Macro </a>XMLCDECL</h3><pre class="programlisting">#define <a href="#XMLCDECL">XMLCDECL</a>;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XMLPUBFUN">Macro </a>XMLPUBFUN</h3><pre class="programlisting">#define <a href="#XMLPUBFUN">XMLPUBFUN</a>;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XMLPUBVAR">Macro </a>XMLPUBVAR</h3><pre class="programlisting">#define <a href="#XMLPUBVAR">XMLPUBVAR</a>;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="_REENTRANT">Macro </a>_REENTRANT</h3><pre class="programlisting">#define <a href="#_REENTRANT">_REENTRANT</a>;
+</pre><p/>
+</div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlmemory.html b/doc/devhelp/libxml2-xmlmemory.html
new file mode 100644
index 0000000..8610538
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlmemory.html
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlmemory: interface for the memory allocator</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlexports.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlmodule.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlmemory</span>
+ </h2>
+ <p>xmlmemory - interface for the memory allocator</p>
+ <p>provides interfaces for the memory allocator, including debugging capabilities. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#xmlRealloc">xmlRealloc</a>;
+#define <a href="#xmlMalloc">xmlMalloc</a>;
+#define <a href="#xmlMallocAtomic">xmlMallocAtomic</a>;
+#define <a href="#DEBUG_MEMORY">DEBUG_MEMORY</a>;
+#define <a href="#xmlMemStrdup">xmlMemStrdup</a>;
+void * <a href="#xmlMemRealloc">xmlMemRealloc</a> (void * ptr, <br/> size_t size);
+int <a href="#xmlInitMemory">xmlInitMemory</a> (void);
+void <a href="#xmlMemFree">xmlMemFree</a> (void * ptr);
+void * <a href="#xmlMemMalloc">xmlMemMalloc</a> (size_t size);
+void <a href="#xmlMemDisplayLast">xmlMemDisplayLast</a> (FILE * fp, <br/> long nbBytes);
+int <a href="#xmlMemGet">xmlMemGet</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc);
+void <a href="#xmlMemoryDump">xmlMemoryDump</a> (void);
+void * <a href="#xmlMallocLoc">xmlMallocLoc</a> (size_t size, <br/> const char * file, <br/> int line);
+void <a href="#xmlMemDisplay">xmlMemDisplay</a> (FILE * fp);
+int <a href="#xmlMemBlocks">xmlMemBlocks</a> (void);
+int <a href="#xmlGcMemGet">xmlGcMemGet</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc);
+typedef char * <a href="#xmlStrdupFunc">xmlStrdupFunc</a> (const char * str);
+typedef void <a href="#xmlFreeFunc">xmlFreeFunc</a> (void * mem);
+void <a href="#xmlMemShow">xmlMemShow</a> (FILE * fp, <br/> int nr);
+void * <a href="#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a> (size_t size, <br/> const char * file, <br/> int line);
+void * <a href="#xmlReallocLoc">xmlReallocLoc</a> (void * ptr, <br/> size_t size, <br/> const char * file, <br/> int line);
+void <a href="#xmlCleanupMemory">xmlCleanupMemory</a> (void);
+int <a href="#xmlMemUsed">xmlMemUsed</a> (void);
+int <a href="#xmlMemSetup">xmlMemSetup</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);
+typedef void * <a href="#xmlReallocFunc">xmlReallocFunc</a> (void * mem, <br/> size_t size);
+typedef void * <a href="#xmlMallocFunc">xmlMallocFunc</a> (size_t size);
+int <a href="#xmlGcMemSetup">xmlGcMemSetup</a> (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc);
+char * <a href="#xmlMemoryStrdup">xmlMemoryStrdup</a> (const char * str);
+char * <a href="#xmlMemStrdupLoc">xmlMemStrdupLoc</a> (const char * str, <br/> const char * file, <br/> int line);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="DEBUG_MEMORY">Macro </a>DEBUG_MEMORY</h3><pre class="programlisting">#define <a href="#DEBUG_MEMORY">DEBUG_MEMORY</a>;
+</pre><p><a href="libxml2-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> replaces the allocator with a collect and debug shell to the libc allocator. <a href="libxml2-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define <a href="libxml2-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeFunc"/>Function type xmlFreeFunc</h3><pre class="programlisting">void xmlFreeFunc (void * mem)<br/>
+</pre><p>Signature for a free() implementation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMallocFunc"/>Function type xmlMallocFunc</h3><pre class="programlisting">void * xmlMallocFunc (size_t size)<br/>
+</pre><p>Signature for a malloc() implementation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size requested in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly allocated block or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReallocFunc"/>Function type xmlReallocFunc</h3><pre class="programlisting">void * xmlReallocFunc (void * mem, <br/> size_t size)<br/>
+</pre><p>Signature for a realloc() implementation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the new size requested in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly reallocated block or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrdupFunc"/>Function type xmlStrdupFunc</h3><pre class="programlisting">char * xmlStrdupFunc (const char * str)<br/>
+</pre><p>Signature for an strdup() implementation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy of the string or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCleanupMemory"/>xmlCleanupMemory ()</h3><pre class="programlisting">void xmlCleanupMemory (void)<br/>
+</pre><p>Free up all the memory allocated by the library for its own use. This should not be called by user level code.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGcMemGet"/>xmlGcMemGet ()</h3><pre class="programlisting">int xmlGcMemGet (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br/>
+</pre><p>Provides the memory access functions set currently in use The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>place to save the atomic malloc() function in use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGcMemSetup"/>xmlGcMemSetup ()</h3><pre class="programlisting">int xmlGcMemSetup (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br/>
+</pre><p>Override the default memory access functions with a new set This has to be called before any other libxml routines ! The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators Should this be blocked if there was already some allocations done ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>the malloc() function to use for atomic allocations</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlInitMemory"/>xmlInitMemory ()</h3><pre class="programlisting">int xmlInitMemory (void)<br/>
+</pre><p>Initialize the memory layer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMallocAtomicLoc"/>xmlMallocAtomicLoc ()</h3><pre class="programlisting">void * xmlMallocAtomicLoc (size_t size, <br/> const char * file, <br/> int line)<br/>
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMallocLoc"/>xmlMallocLoc ()</h3><pre class="programlisting">void * xmlMallocLoc (size_t size, <br/> const char * file, <br/> int line)<br/>
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemBlocks"/>xmlMemBlocks ()</h3><pre class="programlisting">int xmlMemBlocks (void)<br/>
+</pre><p>Provides the number of memory areas currently allocated</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the number of blocks</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemDisplay"/>xmlMemDisplay ()</h3><pre class="programlisting">void xmlMemDisplay (FILE * fp)<br/>
+</pre><p>show in-extenso the memory blocks allocated</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemDisplayLast"/>xmlMemDisplayLast ()</h3><pre class="programlisting">void xmlMemDisplayLast (FILE * fp, <br/> long nbBytes)<br/>
+</pre><p>the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr><tr><td><span class="term"><i><tt>nbBytes</tt></i>:</span></td><td>the amount of memory to dump</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemFree"/>xmlMemFree ()</h3><pre class="programlisting">void xmlMemFree (void * ptr)<br/>
+</pre><p>a free() equivalent, with error checking.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the memory block pointer</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemGet"/>xmlMemGet ()</h3><pre class="programlisting">int xmlMemGet (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br/>
+</pre><p>Provides the memory access functions set currently in use</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemMalloc"/>xmlMemMalloc ()</h3><pre class="programlisting">void * xmlMemMalloc (size_t size)<br/>
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemRealloc"/>xmlMemRealloc ()</h3><pre class="programlisting">void * xmlMemRealloc (void * ptr, <br/> size_t size)<br/>
+</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemSetup"/>xmlMemSetup ()</h3><pre class="programlisting">int xmlMemSetup (<a href="libxml2-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br/> <a href="libxml2-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br/> <a href="libxml2-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br/>
+</pre><p>Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ?</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemShow"/>xmlMemShow ()</h3><pre class="programlisting">void xmlMemShow (FILE * fp, <br/> int nr)<br/>
+</pre><p>show a show display of the memory allocated, and dump the @nr last allocated areas which were not freed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file</td></tr><tr><td><span class="term"><i><tt>nr</tt></i>:</span></td><td>number of entries to dump</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemStrdupLoc"/>xmlMemStrdupLoc ()</h3><pre class="programlisting">char * xmlMemStrdupLoc (const char * str, <br/> const char * file, <br/> int line)<br/>
+</pre><p>a strdup() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemUsed"/>xmlMemUsed ()</h3><pre class="programlisting">int xmlMemUsed (void)<br/>
+</pre><p>Provides the amount of memory currently allocated</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the amount of memory allocated.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemoryDump"/>xmlMemoryDump ()</h3><pre class="programlisting">void xmlMemoryDump (void)<br/>
+</pre><p>Dump in-extenso the memory blocks allocated to the file .memorylist</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlMemoryStrdup"/>xmlMemoryStrdup ()</h3><pre class="programlisting">char * xmlMemoryStrdup (const char * str)<br/>
+</pre><p>a strdup() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReallocLoc"/>xmlReallocLoc ()</h3><pre class="programlisting">void * xmlReallocLoc (void * ptr, <br/> size_t size, <br/> const char * file, <br/> int line)<br/>
+</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlmodule.html b/doc/devhelp/libxml2-xmlmodule.html
new file mode 100644
index 0000000..08bb4ef
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlmodule.html
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlmodule: dynamic module loading</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlmemory.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlreader.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlmodule</span>
+ </h2>
+ <p>xmlmodule - dynamic module loading</p>
+ <p>basic API for dynamic module loading, used by libexslt added in 2.6.17 </p>
+ <p>Author(s): Joel W. Reed </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlModule <a href="#xmlModule">xmlModule</a>;
+typedef <a href="libxml2-xmlmodule.html#xmlModule">xmlModule</a> * <a href="#xmlModulePtr">xmlModulePtr</a>;
+typedef enum <a href="#xmlModuleOption">xmlModuleOption</a>;
+int <a href="#xmlModuleFree">xmlModuleFree</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module);
+int <a href="#xmlModuleSymbol">xmlModuleSymbol</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br/> const char * name, <br/> void ** symbol);
+<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> <a href="#xmlModuleOpen">xmlModuleOpen</a> (const char * name, <br/> int options);
+int <a href="#xmlModuleClose">xmlModuleClose</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlModule">Structure </a>xmlModule</h3><pre class="programlisting">struct _xmlModule {
+The content of this structure is not made public by the API.
+} xmlModule;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModuleOption">Enum </a>xmlModuleOption</h3><pre class="programlisting">enum <a href="#xmlModuleOption">xmlModuleOption</a> {
+ <a name="XML_MODULE_LAZY">XML_MODULE_LAZY</a> = 1 /* lazy binding */
+ <a name="XML_MODULE_LOCAL">XML_MODULE_LOCAL</a> = 2 /* local binding */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModulePtr">Typedef </a>xmlModulePtr</h3><pre class="programlisting"><a href="libxml2-xmlmodule.html#xmlModule">xmlModule</a> * xmlModulePtr;
+</pre><p>A handle to a dynamically loaded module</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModuleClose"/>xmlModuleClose ()</h3><pre class="programlisting">int xmlModuleClose (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br/>
+</pre><p>The close operations unload the associated module and free the data associated to the module.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModuleFree"/>xmlModuleFree ()</h3><pre class="programlisting">int xmlModuleFree (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br/>
+</pre><p>The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModuleOpen"/>xmlModuleOpen ()</h3><pre class="programlisting"><a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> xmlModuleOpen (const char * name, <br/> int options)<br/>
+</pre><p>Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * . TODO: options are not yet implemented.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the module name</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml2-xmlmodule.html#xmlModuleOption">xmlModuleOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handle for the module or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlModuleSymbol"/>xmlModuleSymbol ()</h3><pre class="programlisting">int xmlModuleSymbol (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br/> const char * name, <br/> void ** symbol)<br/>
+</pre><p>Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * .</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the symbol</td></tr><tr><td><span class="term"><i><tt>symbol</tt></i>:</span></td><td>the resulting symbol address</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the symbol was found, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlreader.html b/doc/devhelp/libxml2-xmlreader.html
new file mode 100644
index 0000000..3814f43
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlreader.html
@@ -0,0 +1,565 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlreader: the XMLReader implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlmodule.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlregexp.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlreader</span>
+ </h2>
+ <p>xmlreader - the XMLReader implementation</p>
+ <p>API of the XML streaming API based on C# interfaces. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlreader.html#xmlTextReader">xmlTextReader</a> * <a href="#xmlTextReaderPtr">xmlTextReaderPtr</a>;
+typedef enum <a href="#xmlParserSeverities">xmlParserSeverities</a>;
+typedef enum <a href="#xmlParserProperties">xmlParserProperties</a>;
+typedef enum <a href="#xmlTextReaderMode">xmlTextReaderMode</a>;
+typedef struct _xmlTextReader <a href="#xmlTextReader">xmlTextReader</a>;
+typedef void * <a href="#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a>;
+typedef enum <a href="#xmlReaderTypes">xmlReaderTypes</a>;
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a> (const char * URI);
+int <a href="#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderReadState">xmlTextReaderReadState</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForFile">xmlReaderForFile</a> (const char * filename, <br/> const char * encoding, <br/> int options);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderExpand">xmlTextReaderExpand</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForDoc">xmlReaderForDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlReaderNewIO">xmlReaderNewIO</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderClose">xmlTextReaderClose</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderNormalization">xmlTextReaderNormalization</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int prop);
+int <a href="#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderValue">xmlTextReaderValue</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderIsValid">xmlTextReaderIsValid</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstValue">xmlTextReaderConstValue</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlNewTextReader">xmlNewTextReader</a> (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> const char * URI);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int no);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstName">xmlTextReaderConstName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstString">xmlTextReaderConstString</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderDepth">xmlTextReaderDepth</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadString">xmlTextReaderReadString</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlReaderNewWalker">xmlReaderNewWalker</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderWalker">xmlReaderWalker</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderNodeType">xmlTextReaderNodeType</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+void <a href="#xmlFreeTextReader">xmlFreeTextReader</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderName">xmlTextReaderName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderRead">xmlTextReaderRead</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlReaderNewMemory">xmlReaderNewMemory</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options);
+int <a href="#xmlTextReaderHasValue">xmlTextReaderHasValue</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int no);
+int <a href="#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a> (<a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+int <a href="#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI);
+int <a href="#xmlTextReaderNext">xmlTextReaderNext</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+int <a href="#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForIO">xmlReaderForIO</a> (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> int options);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderPrefix">xmlTextReaderPrefix</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+typedef void <a href="#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> (void * arg, <br/> const char * msg, <br/> <a href="libxml2-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForFd">xmlReaderForFd</a> (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLocalName">xmlTextReaderLocalName</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderPreserve">xmlTextReaderPreserve</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int prop, <br/> int value);
+<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+void <a href="#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br/> void * arg);
+int <a href="#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlReaderNewDoc">xmlReaderNewDoc</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+void <a href="#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> * f, <br/> void ** arg);
+void <a href="#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> f, <br/> void * arg);
+int <a href="#xmlReaderNewFile">xmlReaderNewFile</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * filename, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema);
+int <a href="#xmlReaderNewFd">xmlReaderNewFd</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * rng);
+<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForMemory">xmlReaderForMemory</a> (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlTextReaderSetup">xmlTextReaderSetup</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> const char * URL, <br/> const char * encoding, <br/> int options);
+long <a href="#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a> (<a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+int <a href="#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * xsd);
+int <a href="#xmlTextReaderStandalone">xmlTextReaderStandalone</a> (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlParserProperties">Enum </a>xmlParserProperties</h3><pre class="programlisting">enum <a href="#xmlParserProperties">xmlParserProperties</a> {
+ <a name="XML_PARSER_LOADDTD">XML_PARSER_LOADDTD</a> = 1
+ <a name="XML_PARSER_DEFAULTATTRS">XML_PARSER_DEFAULTATTRS</a> = 2
+ <a name="XML_PARSER_VALIDATE">XML_PARSER_VALIDATE</a> = 3
+ <a name="XML_PARSER_SUBST_ENTITIES">XML_PARSER_SUBST_ENTITIES</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlParserSeverities">Enum </a>xmlParserSeverities</h3><pre class="programlisting">enum <a href="#xmlParserSeverities">xmlParserSeverities</a> {
+ <a name="XML_PARSER_SEVERITY_VALIDITY_WARNING">XML_PARSER_SEVERITY_VALIDITY_WARNING</a> = 1
+ <a name="XML_PARSER_SEVERITY_VALIDITY_ERROR">XML_PARSER_SEVERITY_VALIDITY_ERROR</a> = 2
+ <a name="XML_PARSER_SEVERITY_WARNING">XML_PARSER_SEVERITY_WARNING</a> = 3
+ <a name="XML_PARSER_SEVERITY_ERROR">XML_PARSER_SEVERITY_ERROR</a> = 4
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderTypes">Enum </a>xmlReaderTypes</h3><pre class="programlisting">enum <a href="#xmlReaderTypes">xmlReaderTypes</a> {
+ <a name="XML_READER_TYPE_NONE">XML_READER_TYPE_NONE</a> = 0
+ <a name="XML_READER_TYPE_ELEMENT">XML_READER_TYPE_ELEMENT</a> = 1
+ <a name="XML_READER_TYPE_ATTRIBUTE">XML_READER_TYPE_ATTRIBUTE</a> = 2
+ <a name="XML_READER_TYPE_TEXT">XML_READER_TYPE_TEXT</a> = 3
+ <a name="XML_READER_TYPE_CDATA">XML_READER_TYPE_CDATA</a> = 4
+ <a name="XML_READER_TYPE_ENTITY_REFERENCE">XML_READER_TYPE_ENTITY_REFERENCE</a> = 5
+ <a name="XML_READER_TYPE_ENTITY">XML_READER_TYPE_ENTITY</a> = 6
+ <a name="XML_READER_TYPE_PROCESSING_INSTRUCTION">XML_READER_TYPE_PROCESSING_INSTRUCTION</a> = 7
+ <a name="XML_READER_TYPE_COMMENT">XML_READER_TYPE_COMMENT</a> = 8
+ <a name="XML_READER_TYPE_DOCUMENT">XML_READER_TYPE_DOCUMENT</a> = 9
+ <a name="XML_READER_TYPE_DOCUMENT_TYPE">XML_READER_TYPE_DOCUMENT_TYPE</a> = 10
+ <a name="XML_READER_TYPE_DOCUMENT_FRAGMENT">XML_READER_TYPE_DOCUMENT_FRAGMENT</a> = 11
+ <a name="XML_READER_TYPE_NOTATION">XML_READER_TYPE_NOTATION</a> = 12
+ <a name="XML_READER_TYPE_WHITESPACE">XML_READER_TYPE_WHITESPACE</a> = 13
+ <a name="XML_READER_TYPE_SIGNIFICANT_WHITESPACE">XML_READER_TYPE_SIGNIFICANT_WHITESPACE</a> = 14
+ <a name="XML_READER_TYPE_END_ELEMENT">XML_READER_TYPE_END_ELEMENT</a> = 15
+ <a name="XML_READER_TYPE_END_ENTITY">XML_READER_TYPE_END_ENTITY</a> = 16
+ <a name="XML_READER_TYPE_XML_DECLARATION">XML_READER_TYPE_XML_DECLARATION</a> = 17
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReader">Structure </a>xmlTextReader</h3><pre class="programlisting">struct _xmlTextReader {
+The content of this structure is not made public by the API.
+} xmlTextReader;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorPtr">Typedef </a>xmlTextReaderLocatorPtr</h3><pre class="programlisting">void * xmlTextReaderLocatorPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMode">Enum </a>xmlTextReaderMode</h3><pre class="programlisting">enum <a href="#xmlTextReaderMode">xmlTextReaderMode</a> {
+ <a name="XML_TEXTREADER_MODE_INITIAL">XML_TEXTREADER_MODE_INITIAL</a> = 0
+ <a name="XML_TEXTREADER_MODE_INTERACTIVE">XML_TEXTREADER_MODE_INTERACTIVE</a> = 1
+ <a name="XML_TEXTREADER_MODE_ERROR">XML_TEXTREADER_MODE_ERROR</a> = 2
+ <a name="XML_TEXTREADER_MODE_EOF">XML_TEXTREADER_MODE_EOF</a> = 3
+ <a name="XML_TEXTREADER_MODE_CLOSED">XML_TEXTREADER_MODE_CLOSED</a> = 4
+ <a name="XML_TEXTREADER_MODE_READING">XML_TEXTREADER_MODE_READING</a> = 5
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderPtr">Typedef </a>xmlTextReaderPtr</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReader">xmlTextReader</a> * xmlTextReaderPtr;
+</pre><p>Pointer to an xmlReader context.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderErrorFunc"/>Function type xmlTextReaderErrorFunc</h3><pre class="programlisting">void xmlTextReaderErrorFunc (void * arg, <br/> const char * msg, <br/> <a href="libxml2-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)<br/>
+</pre><p>Signature of an error callback from a reader parser</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>the user argument</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>severity</tt></i>:</span></td><td>the severity of the error</td></tr><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>a locator indicating where the error occured</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeTextReader"/>xmlFreeTextReader ()</h3><pre class="programlisting">void xmlFreeTextReader (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Deallocate all the resources associated to the reader</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextReader"/>xmlNewTextReader ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReader (<a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> const char * URI)<br/>
+</pre><p>Create an <a href="libxml2-xmlreader.html#xmlTextReader">xmlTextReader</a> structure fed with @input</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> used to read data</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI information for the source if available</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextReaderFilename"/>xmlNewTextReaderFilename ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReaderFilename (const char * URI)<br/>
+</pre><p>Create an <a href="libxml2-xmlreader.html#xmlTextReader">xmlTextReader</a> structure fed with the resource at @URI</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI of the resource to process</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderForDoc"/>xmlReaderForDoc ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderForFd"/>xmlReaderForFd ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForFd (int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderForFile"/>xmlReaderForFile ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForFile (const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderForIO"/>xmlReaderForIO ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForIO (<a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderForMemory"/>xmlReaderForMemory ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForMemory (const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewDoc"/>xmlReaderNewDoc ()</h3><pre class="programlisting">int xmlReaderNewDoc (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewFd"/>xmlReaderNewFd ()</h3><pre class="programlisting">int xmlReaderNewFd (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int fd, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewFile"/>xmlReaderNewFile ()</h3><pre class="programlisting">int xmlReaderNewFile (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewIO"/>xmlReaderNewIO ()</h3><pre class="programlisting">int xmlReaderNewIO (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br/> <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Setup an xmltextReader to parse an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewMemory"/>xmlReaderNewMemory ()</h3><pre class="programlisting">int xmlReaderNewMemory (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * buffer, <br/> int size, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderNewWalker"/>xmlReaderNewWalker ()</h3><pre class="programlisting">int xmlReaderNewWalker (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlReaderWalker"/>xmlReaderWalker ()</h3><pre class="programlisting"><a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderWalker (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Create an xmltextReader for a preparsed document.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderAttributeCount"/>xmlTextReaderAttributeCount ()</h3><pre class="programlisting">int xmlTextReaderAttributeCount (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Provides the number of attributes of the current node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 i no attributes, -1 in case of error or the <a href="libxml2-SAX.html#attribute">attribute</a> count</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderBaseUri"/>xmlTextReaderBaseUri ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderBaseUri (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The base URI of the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderByteConsumed"/>xmlTextReaderByteConsumed ()</h3><pre class="programlisting">long xmlTextReaderByteConsumed (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the index in bytes from the beginning of the entity or -1 in case the index could not be computed.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderClose"/>xmlTextReaderClose ()</h3><pre class="programlisting">int xmlTextReaderClose (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstBaseUri"/>xmlTextReaderConstBaseUri ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstBaseUri (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The base URI of the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available, the string will be deallocated with the reader</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstEncoding"/>xmlTextReaderConstEncoding ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstEncoding (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Determine the encoding of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstLocalName"/>xmlTextReaderConstLocalName ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstLocalName (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The local name of the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, the string will be deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstName"/>xmlTextReaderConstName ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstName (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The qualified name of the node, equal to Prefix :LocalName.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, the string is deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstNamespaceUri"/>xmlTextReaderConstNamespaceUri ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstNamespaceUri (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The URI defining the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace URI or NULL if not available, the string will be deallocated with the reader</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstPrefix"/>xmlTextReaderConstPrefix ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstPrefix (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>A shorthand <a href="libxml2-SAX.html#reference">reference</a> to the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the prefix or NULL if not available, the string is deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstString"/>xmlTextReaderConstString ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstString (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Get an interned string from the reader, allows for example to speedup string name comparisons</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to intern.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an interned copy of the string or NULL in case of error. The string will be deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstValue"/>xmlTextReaderConstValue ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstValue (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Provides the text value of the node if present</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string or NULL if not available. The result will be deallocated on the next Read() operation.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstXmlLang"/>xmlTextReaderConstXmlLang ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstXmlLang (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The xml:lang scope within which the node resides.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xml:lang value or NULL if none exists.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderConstXmlVersion"/>xmlTextReaderConstXmlVersion ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstXmlVersion (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Determine the XML version of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderCurrentDoc"/>xmlTextReaderCurrentDoc ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlTextReaderCurrentDoc (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Hacking interface allowing to get the <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> correponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderCurrentNode"/>xmlTextReaderCurrentNode ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderCurrentNode (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Hacking interface allowing to get the <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderDepth"/>xmlTextReaderDepth ()</h3><pre class="programlisting">int xmlTextReaderDepth (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The depth of the node in the tree.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the depth or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderExpand"/>xmlTextReaderExpand ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderExpand (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttribute"/>xmlTextReaderGetAttribute ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttribute (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Provides the value of the <a href="libxml2-SAX.html#attribute">attribute</a> with the specified qualified name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the qualified name of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttributeNo"/>xmlTextReaderGetAttributeNo ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttributeNo (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int no)<br/>
+</pre><p>Provides the value of the <a href="libxml2-SAX.html#attribute">attribute</a> with the specified index relative to the containing element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the zero-based index of the <a href="libxml2-SAX.html#attribute">attribute</a> relative to the containing element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetAttributeNs"/>xmlTextReaderGetAttributeNs ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttributeNs (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br/>
+</pre><p>Provides the value of the specified <a href="libxml2-SAX.html#attribute">attribute</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name of the attribute.</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>the namespace URI of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetErrorHandler"/>xmlTextReaderGetErrorHandler ()</h3><pre class="programlisting">void xmlTextReaderGetErrorHandler (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> * f, <br/> void ** arg)<br/>
+</pre><p>Retrieve the error callback function and user argument.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function or NULL is no callback has been registered</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetParserColumnNumber"/>xmlTextReaderGetParserColumnNumber ()</h3><pre class="programlisting">int xmlTextReaderGetParserColumnNumber (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Provide the column number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the user data (XML reader context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int or 0 if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetParserLineNumber"/>xmlTextReaderGetParserLineNumber ()</h3><pre class="programlisting">int xmlTextReaderGetParserLineNumber (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Provide the line number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the user data (XML reader context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int or 0 if not available</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetParserProp"/>xmlTextReaderGetParserProp ()</h3><pre class="programlisting">int xmlTextReaderGetParserProp (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int prop)<br/>
+</pre><p>Read the parser internal property.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prop</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlParserProperties">xmlParserProperties</a> to get</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value, usually 0 or 1, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderGetRemainder"/>xmlTextReaderGetRemainder ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlTextReaderGetRemainder (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what's left in reader-&gt;input, and there is an allocation problem. Best would be to rewrite it differently.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> attached to the XML or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderHasAttributes"/>xmlTextReaderHasAttributes ()</h3><pre class="programlisting">int xmlTextReaderHasAttributes (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Whether the node has attributes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false, and -1 in case or error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderHasValue"/>xmlTextReaderHasValue ()</h3><pre class="programlisting">int xmlTextReaderHasValue (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Whether the node can have a text value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false, and -1 in case or error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsDefault"/>xmlTextReaderIsDefault ()</h3><pre class="programlisting">int xmlTextReaderIsDefault (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Whether an Attribute node was generated from the default value defined in the DTD or schema.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if not defaulted, 1 if defaulted, and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsEmptyElement"/>xmlTextReaderIsEmptyElement ()</h3><pre class="programlisting">int xmlTextReaderIsEmptyElement (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Check if the current node is empty</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if empty, 0 if not and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsNamespaceDecl"/>xmlTextReaderIsNamespaceDecl ()</h3><pre class="programlisting">int xmlTextReaderIsNamespaceDecl (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Determine whether the current node is a namespace declaration rather than a regular attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current node is a namespace declaration, 0 if it is a regular <a href="libxml2-SAX.html#attribute">attribute</a> or other type of node, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderIsValid"/>xmlTextReaderIsValid ()</h3><pre class="programlisting">int xmlTextReaderIsValid (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Retrieve the validity status from the parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the flag value 1 if valid, 0 if no, and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocalName"/>xmlTextReaderLocalName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLocalName (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The local name of the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorBaseURI"/>xmlTextReaderLocatorBaseURI ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLocatorBaseURI (<a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)<br/>
+</pre><p>Obtain the base URI for the given locator.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL in case of error, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderLocatorLineNumber"/>xmlTextReaderLocatorLineNumber ()</h3><pre class="programlisting">int xmlTextReaderLocatorLineNumber (<a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)<br/>
+</pre><p>Obtain the line number for the given locator.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderLookupNamespace"/>xmlTextReaderLookupNamespace ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLookupNamespace (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Resolves a namespace prefix in the scope of the current element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the namespace URI to which the prefix maps or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttribute"/>xmlTextReaderMoveToAttribute ()</h3><pre class="programlisting">int xmlTextReaderMoveToAttribute (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Moves the position of the current instance to the <a href="libxml2-SAX.html#attribute">attribute</a> with the specified qualified name.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the qualified name of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttributeNo"/>xmlTextReaderMoveToAttributeNo ()</h3><pre class="programlisting">int xmlTextReaderMoveToAttributeNo (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int no)<br/>
+</pre><p>Moves the position of the current instance to the <a href="libxml2-SAX.html#attribute">attribute</a> with the specified index relative to the containing element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the zero-based index of the <a href="libxml2-SAX.html#attribute">attribute</a> relative to the containing element.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToAttributeNs"/>xmlTextReaderMoveToAttributeNs ()</h3><pre class="programlisting">int xmlTextReaderMoveToAttributeNs (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br/>
+</pre><p>Moves the position of the current instance to the <a href="libxml2-SAX.html#attribute">attribute</a> with the specified local name and namespace URI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name of the attribute.</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>the namespace URI of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToElement"/>xmlTextReaderMoveToElement ()</h3><pre class="programlisting">int xmlTextReaderMoveToElement (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Moves the position of the current instance to the node that contains the current Attribute node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not moved</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToFirstAttribute"/>xmlTextReaderMoveToFirstAttribute ()</h3><pre class="programlisting">int xmlTextReaderMoveToFirstAttribute (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Moves the position of the current instance to the first <a href="libxml2-SAX.html#attribute">attribute</a> associated with the current node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderMoveToNextAttribute"/>xmlTextReaderMoveToNextAttribute ()</h3><pre class="programlisting">int xmlTextReaderMoveToNextAttribute (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Moves the position of the current instance to the next <a href="libxml2-SAX.html#attribute">attribute</a> associated with the current node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderName"/>xmlTextReaderName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderName (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The qualified name of the node, equal to Prefix :LocalName.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderNamespaceUri"/>xmlTextReaderNamespaceUri ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderNamespaceUri (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The URI defining the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderNext"/>xmlTextReaderNext ()</h3><pre class="programlisting">int xmlTextReaderNext (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Skip to the node following the current one in document order while avoiding the subtree if any.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderNextSibling"/>xmlTextReaderNextSibling ()</h3><pre class="programlisting">int xmlTextReaderNextSibling (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderNodeType"/>xmlTextReaderNodeType ()</h3><pre class="programlisting">int xmlTextReaderNodeType (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xmlNodeType of the current node or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderNormalization"/>xmlTextReaderNormalization ()</h3><pre class="programlisting">int xmlTextReaderNormalization (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The value indicating whether to normalize white space and <a href="libxml2-SAX.html#attribute">attribute</a> values. Since <a href="libxml2-SAX.html#attribute">attribute</a> value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like &amp;#0; is of course not supported either.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderPrefix"/>xmlTextReaderPrefix ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderPrefix (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>A shorthand <a href="libxml2-SAX.html#reference">reference</a> to the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the prefix or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderPreserve"/>xmlTextReaderPreserve ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderPreserve (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderPreservePattern"/>xmlTextReaderPreservePattern ()</h3><pre class="programlisting">int xmlTextReaderPreservePattern (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br/>
+</pre><p>This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>an XPath subset pattern</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a positive number in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderQuoteChar"/>xmlTextReaderQuoteChar ()</h3><pre class="programlisting">int xmlTextReaderQuoteChar (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The quotation mark character used to enclose the value of an attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>" or ' and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderRead"/>xmlTextReaderRead ()</h3><pre class="programlisting">int xmlTextReaderRead (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Moves the position of the current instance to the next node in the stream, exposing its properties.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadAttributeValue"/>xmlTextReaderReadAttributeValue ()</h3><pre class="programlisting">int xmlTextReaderReadAttributeValue (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Parses an <a href="libxml2-SAX.html#attribute">attribute</a> value into one or more Text and EntityReference nodes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 if the reader was not positionned on an ttribute node or all the <a href="libxml2-SAX.html#attribute">attribute</a> values have been read, or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadInnerXml"/>xmlTextReaderReadInnerXml ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadInnerXml (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Reads the contents of the current node, including child nodes and markup.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadOuterXml"/>xmlTextReaderReadOuterXml ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadOuterXml (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Reads the contents of the current node, including child nodes and markup.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the node and any XML content, or NULL if the current node cannot be serialized. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadState"/>xmlTextReaderReadState ()</h3><pre class="programlisting">int xmlTextReaderReadState (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Gets the read state of the reader.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the state value, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderReadString"/>xmlTextReaderReadString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadString (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Reads the contents of an element or a text node as a string.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the contents of the Element or Text node, or NULL if the reader is positioned on any other type of node. The string must be deallocated by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderRelaxNGSetSchema"/>xmlTextReaderRelaxNGSetSchema ()</h3><pre class="programlisting">int xmlTextReaderRelaxNGSetSchema (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br/>
+</pre><p>Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then RelaxNG validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled RelaxNG schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderRelaxNGValidate"/>xmlTextReaderRelaxNGValidate ()</h3><pre class="programlisting">int xmlTextReaderRelaxNGValidate (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * rng)<br/>
+</pre><p>Use RelaxNG schema to validate the document as it is processed. Activation is only possible before the first Read(). If @rng is NULL, then RelaxNG schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>rng</tt></i>:</span></td><td>the path to a RelaxNG schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderRelaxNGValidateCtxt"/>xmlTextReaderRelaxNGValidateCtxt ()</h3><pre class="programlisting">int xmlTextReaderRelaxNGValidateCtxt (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br/> int options)<br/>
+</pre><p>Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then RelaxNG schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidate"/>xmlTextReaderSchemaValidate ()</h3><pre class="programlisting">int xmlTextReaderSchemaValidate (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> const char * xsd)<br/>
+</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSchemaValidateCtxt"/>xmlTextReaderSchemaValidateCtxt ()</h3><pre class="programlisting">int xmlTextReaderSchemaValidateCtxt (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options)<br/>
+</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetErrorHandler"/>xmlTextReaderSetErrorHandler ()</h3><pre class="programlisting">void xmlTextReaderSetErrorHandler (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br/> void * arg)<br/>
+</pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function to call on error and warnings</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument to pass to the callback function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetParserProp"/>xmlTextReaderSetParserProp ()</h3><pre class="programlisting">int xmlTextReaderSetParserProp (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> int prop, <br/> int value)<br/>
+</pre><p>Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prop</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlParserProperties">xmlParserProperties</a> to set</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>usually 0 or 1 to (de)activate it</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the call was successful, or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetSchema"/>xmlTextReaderSetSchema ()</h3><pre class="programlisting">int xmlTextReaderSetSchema (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/>
+</pre><p>Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then Schema validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled Schema schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the Schema validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetStructuredErrorHandler"/>xmlTextReaderSetStructuredErrorHandler ()</h3><pre class="programlisting">void xmlTextReaderSetStructuredErrorHandler (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> f, <br/> void * arg)<br/>
+</pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function to call on error and warnings</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument to pass to the callback function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderSetup"/>xmlTextReaderSetup ()</h3><pre class="programlisting">int xmlTextReaderSetup (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> const char * URL, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Setup an XML reader with new options</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td><a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> used to feed the reader, will be destroyed with it.</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderStandalone"/>xmlTextReaderStandalone ()</h3><pre class="programlisting">int xmlTextReaderStandalone (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Determine the standalone status of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the document was declared to be standalone, 0 if it was declared to be not standalone, or -1 if the document did not specify its standalone status or in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderValue"/>xmlTextReaderValue ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderValue (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>Provides the text value of the node if present</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string or NULL if not available. The result must be deallocated with xmlFree()</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextReaderXmlLang"/>xmlTextReaderXmlLang ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderXmlLang (<a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br/>
+</pre><p>The xml:lang scope within which the node resides.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml2-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlregexp.html b/doc/devhelp/libxml2-xmlregexp.html
new file mode 100644
index 0000000..9427a34
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlregexp.html
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlregexp: regular expressions handling</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlreader.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlsave.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlregexp</span>
+ </h2>
+ <p>xmlregexp - regular expressions handling</p>
+ <p>basic API for libxml regular expressions handling used for XML Schemas and validation. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlregexp.html#xmlRegExecCtxt">xmlRegExecCtxt</a> * <a href="#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a>;
+typedef struct _xmlExpCtxt <a href="#xmlExpCtxt">xmlExpCtxt</a>;
+typedef <a href="libxml2-xmlregexp.html#xmlExpNode">xmlExpNode</a> * <a href="#xmlExpNodePtr">xmlExpNodePtr</a>;
+typedef <a href="libxml2-xmlregexp.html#xmlExpCtxt">xmlExpCtxt</a> * <a href="#xmlExpCtxtPtr">xmlExpCtxtPtr</a>;
+typedef enum <a href="#xmlExpNodeType">xmlExpNodeType</a>;
+typedef struct _xmlRegExecCtxt <a href="#xmlRegExecCtxt">xmlRegExecCtxt</a>;
+typedef struct _xmlExpNode <a href="#xmlExpNode">xmlExpNode</a>;
+typedef struct _xmlRegexp <a href="#xmlRegexp">xmlRegexp</a>;
+typedef <a href="libxml2-xmlregexp.html#xmlRegexp">xmlRegexp</a> * <a href="#xmlRegexpPtr">xmlRegexpPtr</a>;
+typedef void <a href="#xmlRegExecCallbacks">xmlRegExecCallbacks</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> void * transdata, <br/> void * inputdata);
+<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> <a href="#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a> (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/> <a href="libxml2-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a> callback, <br/> void * data);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewOr">xmlExpNewOr</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right);
+void <a href="#xmlRegFreeRegexp">xmlRegFreeRegexp</a> (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp);
+void <a href="#xmlExpRef">xmlExpRef</a> (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp);
+int <a href="#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a> (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp);
+int <a href="#xmlRegExecErrInfo">xmlRegExecErrInfo</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** string, <br/> int * nbval, <br/> int * nbneg, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** values, <br/> int * terminal);
+void <a href="#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec);
+int <a href="#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt);
+int <a href="#xmlExpSubsume">xmlExpSubsume</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub);
+int <a href="#xmlRegExecPushString2">xmlRegExecPushString2</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value2, <br/> void * data);
+int <a href="#xmlRegExecNextValues">xmlRegExecNextValues</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> int * nbval, <br/> int * nbneg, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** values, <br/> int * terminal);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpExpDerive">xmlExpExpDerive</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub);
+int <a href="#xmlExpIsNillable">xmlExpIsNillable</a> (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp);
+void <a href="#xmlExpFreeCtxt">xmlExpFreeCtxt</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt);
+void <a href="#xmlExpDump">xmlExpDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewSeq">xmlExpNewSeq</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right);
+void <a href="#xmlExpFree">xmlExpFree</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewRange">xmlExpNewRange</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> subset, <br/> int min, <br/> int max);
+<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlRegexpCompile">xmlRegexpCompile</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * regexp);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewAtom">xmlExpNewAtom</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len);
+int <a href="#xmlRegexpExec">xmlRegexpExec</a> (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlRegExecPushString">xmlRegExecPushString</a> (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> void * data);
+int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/> int len);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpParse">xmlExpParse</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const char * expr);
+<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> <a href="#xmlExpNewCtxt">xmlExpNewCtxt</a> (int maxNodes, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict);
+int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/> int len);
+<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpStringDerive">xmlExpStringDerive</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len);
+int <a href="#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a> (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt);
+int <a href="#xmlExpMaxToken">xmlExpMaxToken</a> (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr);
+void <a href="#xmlRegexpPrint">xmlRegexpPrint</a> (FILE * output, <br/> <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlExpCtxt">Structure </a>xmlExpCtxt</h3><pre class="programlisting">struct _xmlExpCtxt {
+The content of this structure is not made public by the API.
+} xmlExpCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpCtxtPtr">Typedef </a>xmlExpCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpCtxt">xmlExpCtxt</a> * xmlExpCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNode">Structure </a>xmlExpNode</h3><pre class="programlisting">struct _xmlExpNode {
+The content of this structure is not made public by the API.
+} xmlExpNode;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNodePtr">Typedef </a>xmlExpNodePtr</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNode">xmlExpNode</a> * xmlExpNodePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNodeType">Enum </a>xmlExpNodeType</h3><pre class="programlisting">enum <a href="#xmlExpNodeType">xmlExpNodeType</a> {
+ <a name="XML_EXP_EMPTY">XML_EXP_EMPTY</a> = 0
+ <a name="XML_EXP_FORBID">XML_EXP_FORBID</a> = 1
+ <a name="XML_EXP_ATOM">XML_EXP_ATOM</a> = 2
+ <a name="XML_EXP_SEQ">XML_EXP_SEQ</a> = 3
+ <a name="XML_EXP_OR">XML_EXP_OR</a> = 4
+ <a name="XML_EXP_COUNT">XML_EXP_COUNT</a> = 5
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecCtxt">Structure </a>xmlRegExecCtxt</h3><pre class="programlisting">struct _xmlRegExecCtxt {
+The content of this structure is not made public by the API.
+} xmlRegExecCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecCtxtPtr">Typedef </a>xmlRegExecCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegExecCtxt">xmlRegExecCtxt</a> * xmlRegExecCtxtPtr;
+</pre><p>A libxml progressive regular expression evaluation context</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexp">Structure </a>xmlRegexp</h3><pre class="programlisting">struct _xmlRegexp {
+The content of this structure is not made public by the API.
+} xmlRegexp;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexpPtr">Typedef </a>xmlRegexpPtr</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegexp">xmlRegexp</a> * xmlRegexpPtr;
+</pre><p>A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecCallbacks"/>Function type xmlRegExecCallbacks</h3><pre class="programlisting">void xmlRegExecCallbacks (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * token, <br/> void * transdata, <br/> void * inputdata)<br/>
+</pre><p>Callback function when doing a transition in the automata</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>the regular expression context</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the current token string</td></tr><tr><td><span class="term"><i><tt>transdata</tt></i>:</span></td><td>transition data</td></tr><tr><td><span class="term"><i><tt>inputdata</tt></i>:</span></td><td>input data</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="emptyExp">Variable </a>emptyExp</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> emptyExp;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="forbiddenExp">Variable </a>forbiddenExp</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> forbiddenExp;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpCtxtNbCons"/>xmlExpCtxtNbCons ()</h3><pre class="programlisting">int xmlExpCtxtNbCons (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br/>
+</pre><p>Debugging facility provides the number of allocated nodes over lifetime</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes ever allocated or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpCtxtNbNodes"/>xmlExpCtxtNbNodes ()</h3><pre class="programlisting">int xmlExpCtxtNbNodes (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br/>
+</pre><p>Debugging facility provides the number of allocated nodes at a that point</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes in use or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpDump"/>xmlExpDump ()</h3><pre class="programlisting">void xmlExpDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br/>
+</pre><p>Serialize the expression as compiled to the buffer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer to receive the output</td></tr><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>the compiled expression</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpExpDerive"/>xmlExpExpDerive ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpExpDerive (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)<br/>
+</pre><p>Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the englobing expression</td></tr><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>the subexpression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting expression or NULL in case of internal error, the result must be freed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpFree"/>xmlExpFree ()</h3><pre class="programlisting">void xmlExpFree (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/>
+</pre><p>Dereference the expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpFreeCtxt"/>xmlExpFreeCtxt ()</h3><pre class="programlisting">void xmlExpFreeCtxt (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br/>
+</pre><p>Free an expression context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpGetLanguage"/>xmlExpGetLanguage ()</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br/> int len)<br/>
+</pre><p>Find all the strings used in @exp and store them in @list</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpGetStart"/>xmlExpGetStart ()</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br/> int len)<br/>
+</pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpIsNillable"/>xmlExpIsNillable ()</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/>
+</pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if nillable, 0 if not and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpMaxToken"/>xmlExpMaxToken ()</h3><pre class="programlisting">int xmlExpMaxToken (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br/>
+</pre><p>Indicate the maximum number of input a expression can accept</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>a compiled expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum length or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNewAtom"/>xmlExpNewAtom ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewAtom (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> int len)<br/>
+</pre><p>Get the atom associated to this name from that context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name length in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNewCtxt"/>xmlExpNewCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt (int maxNodes, <br/> <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br/>
+</pre><p>Creates a new context for manipulating expressions</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionnary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNewOr"/>xmlExpNewOr ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewOr (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br/>
+</pre><p>Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>left</tt></i>:</span></td><td>left expression</td></tr><tr><td><span class="term"><i><tt>right</tt></i>:</span></td><td>right expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNewRange"/>xmlExpNewRange ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewRange (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> subset, <br/> int min, <br/> int max)<br/>
+</pre><p>Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>subset</tt></i>:</span></td><td>the expression to be repeated</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the lower bound for the repetition</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the upper bound for the repetition, -1 means infinite</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpNewSeq"/>xmlExpNewSeq ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewSeq (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br/>
+</pre><p>Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>left</tt></i>:</span></td><td>left expression</td></tr><tr><td><span class="term"><i><tt>right</tt></i>:</span></td><td>right expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpParse"/>xmlExpParse ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpParse (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> const char * expr)<br/>
+</pre><p>Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>the 0 terminated string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new expression or NULL in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpRef"/>xmlExpRef ()</h3><pre class="programlisting">void xmlExpRef (<a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br/>
+</pre><p>Increase the <a href="libxml2-SAX.html#reference">reference</a> count of the expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpStringDerive"/>xmlExpStringDerive ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpStringDerive (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int len)<br/>
+</pre><p>Do one step of Brzozowski derivation of the expression @exp with respect to the input string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the string len in bytes if available</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting expression or NULL in case of internal error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlExpSubsume"/>xmlExpSubsume ()</h3><pre class="programlisting">int xmlExpSubsume (<a href="libxml2-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br/> <a href="libxml2-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)<br/>
+</pre><p>Check whether @exp accepts all the languages accexpted by @sub the input being a subexpression.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the englobing expression</td></tr><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>the subexpression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 if false and -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecErrInfo"/>xmlRegExecErrInfo ()</h3><pre class="programlisting">int xmlRegExecErrInfo (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** string, <br/> int * nbval, <br/> int * nbneg, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** values, <br/> int * terminal)<br/>
+</pre><p>Extract error informations from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context generating an error</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>return value for the error string</td></tr><tr><td><span class="term"><i><tt>nbval</tt></i>:</span></td><td>pointer to the number of accepted values IN/OUT</td></tr><tr><td><span class="term"><i><tt>nbneg</tt></i>:</span></td><td>return number of negative transitions</td></tr><tr><td><span class="term"><i><tt>values</tt></i>:</span></td><td>pointer to the array of acceptable values</td></tr><tr><td><span class="term"><i><tt>terminal</tt></i>:</span></td><td>return value if this was a terminal state</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecNextValues"/>xmlRegExecNextValues ()</h3><pre class="programlisting">int xmlRegExecNextValues (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> int * nbval, <br/> int * nbneg, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** values, <br/> int * terminal)<br/>
+</pre><p>Extract informations from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context</td></tr><tr><td><span class="term"><i><tt>nbval</tt></i>:</span></td><td>pointer to the number of accepted values IN/OUT</td></tr><tr><td><span class="term"><i><tt>nbneg</tt></i>:</span></td><td>return number of negative transitions</td></tr><tr><td><span class="term"><i><tt>values</tt></i>:</span></td><td>pointer to the array of acceptable values</td></tr><tr><td><span class="term"><i><tt>terminal</tt></i>:</span></td><td>return value if this was a terminal state</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecPushString"/>xmlRegExecPushString ()</h3><pre class="programlisting">int xmlRegExecPushString (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> void * data)<br/>
+</pre><p>Push one input token in the execution context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context or NULL to indicate the end</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a string token input</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the token to reuse in callbacks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegExecPushString2"/>xmlRegExecPushString2 ()</h3><pre class="programlisting">int xmlRegExecPushString2 (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value2, <br/> void * data)<br/>
+</pre><p>Push one input token in the execution context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context or NULL to indicate the end</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the first string token input</td></tr><tr><td><span class="term"><i><tt>value2</tt></i>:</span></td><td>the second string token input</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the token to reuse in callbacks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegFreeExecCtxt"/>xmlRegFreeExecCtxt ()</h3><pre class="programlisting">void xmlRegFreeExecCtxt (<a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec)<br/>
+</pre><p>Free the structures associated to a regular expression evaulation context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regular expression evaulation context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegFreeRegexp"/>xmlRegFreeRegexp ()</h3><pre class="programlisting">void xmlRegFreeRegexp (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)<br/>
+</pre><p>Free a regexp</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>the regexp</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegNewExecCtxt"/>xmlRegNewExecCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> xmlRegNewExecCtxt (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/> <a href="libxml2-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a> callback, <br/> void * data)<br/>
+</pre><p>Build a context used for progressive evaluation of a regexp.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>a precompiled regular expression</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>a callback function used for handling progresses in the automata matching phase</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the context data associated to the callback in this context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexpCompile"/>xmlRegexpCompile ()</h3><pre class="programlisting"><a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlRegexpCompile (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * regexp)<br/>
+</pre><p>Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>a regular expression string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled expression or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexpExec"/>xmlRegexpExec ()</h3><pre class="programlisting">int xmlRegexpExec (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Check if the regular expression generates the value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled regular expression</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the value to check against the regular expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if not and a negative value in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexpIsDeterminist"/>xmlRegexpIsDeterminist ()</h3><pre class="programlisting">int xmlRegexpIsDeterminist (<a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp)<br/>
+</pre><p>Check if the regular expression is determinist</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled regular expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it yes, 0 if not and a negative value in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlRegexpPrint"/>xmlRegexpPrint ()</h3><pre class="programlisting">void xmlRegexpPrint (FILE * output, <br/> <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)<br/>
+</pre><p>Print the content of the compiled regular expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file for the output debug</td></tr><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>the compiled regexp</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlsave.html b/doc/devhelp/libxml2-xmlsave.html
new file mode 100644
index 0000000..f006e3b
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlsave.html
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlsave: the XML document serializer</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlregexp.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlschemas.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlsave</span>
+ </h2>
+ <p>xmlsave - the XML document serializer</p>
+ <p>API to save document or subtree of document </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef enum <a href="#xmlSaveOption">xmlSaveOption</a>;
+typedef struct _xmlSaveCtxt <a href="#xmlSaveCtxt">xmlSaveCtxt</a>;
+typedef <a href="libxml2-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a> * <a href="#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>;
+<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToIO">xmlSaveToIO</a> (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFd">xmlSaveToFd</a> (int fd, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlSaveClose">xmlSaveClose</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt);
+int <a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape);
+<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToBuffer">xmlSaveToBuffer</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const char * encoding, <br/> int options);
+<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFilename">xmlSaveToFilename</a> (const char * filename, <br/> const char * encoding, <br/> int options);
+int <a href="#xmlSaveFlush">xmlSaveFlush</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt);
+long <a href="#xmlSaveDoc">xmlSaveDoc</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlSaveSetEscape">xmlSaveSetEscape</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape);
+long <a href="#xmlSaveTree">xmlSaveTree</a> (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveCtxt">Structure </a>xmlSaveCtxt</h3><pre class="programlisting">struct _xmlSaveCtxt {
+The content of this structure is not made public by the API.
+} xmlSaveCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveCtxtPtr">Typedef </a>xmlSaveCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a> * xmlSaveCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveOption">Enum </a>xmlSaveOption</h3><pre class="programlisting">enum <a href="#xmlSaveOption">xmlSaveOption</a> {
+ <a name="XML_SAVE_FORMAT">XML_SAVE_FORMAT</a> = 1 /* format save output */
+ <a name="XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a> = 2 /* drop the xml declaration */
+ <a name="XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a> = 4 /* no empty tags */
+ <a name="XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a> = 8 /* disable XHTML1 specific rules */
+ <a name="XML_SAVE_XHTML">XML_SAVE_XHTML</a> = 16 /* force XHTML1 specific rules */
+ <a name="XML_SAVE_AS_XML">XML_SAVE_AS_XML</a> = 32 /* force XML serialization on HTML doc */
+ <a name="XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a> = 64 /* force HTML serialization on XML doc */
+ <a name="XML_SAVE_WSNONSIG">XML_SAVE_WSNONSIG</a> = 128 /* format with non-significant whitespace */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveClose"/>xmlSaveClose ()</h3><pre class="programlisting">int xmlSaveClose (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br/>
+</pre><p>Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveDoc"/>xmlSaveDoc ()</h3><pre class="programlisting">long xmlSaveDoc (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveFlush"/>xmlSaveFlush ()</h3><pre class="programlisting">int xmlSaveFlush (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br/>
+</pre><p>Flush a document saving context, i.e. make sure that all bytes have been output.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveSetAttrEscape"/>xmlSaveSetAttrEscape ()</h3><pre class="programlisting">int xmlSaveSetAttrEscape (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br/>
+</pre><p>Set a custom escaping function to be used for text in <a href="libxml2-SAX.html#attribute">attribute</a> content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveSetEscape"/>xmlSaveSetEscape ()</h3><pre class="programlisting">int xmlSaveSetEscape (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br/>
+</pre><p>Set a custom escaping function to be used for text in element content</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveToBuffer"/>xmlSaveToBuffer ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToBuffer (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveToFd"/>xmlSaveToFd ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFd (int fd, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveToFilename"/>xmlSaveToFilename ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFilename (const char * filename, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name or an URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveToIO"/>xmlSaveToIO ()</h3><pre class="programlisting"><a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToIO (<a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br/> <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br/> void * ioctx, <br/> const char * encoding, <br/> int options)<br/>
+</pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSaveTree"/>xmlSaveTree ()</h3><pre class="programlisting">long xmlSaveTree (<a href="libxml2-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the top node of the subtree to save</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlschemas.html b/doc/devhelp/libxml2-xmlschemas.html
new file mode 100644
index 0000000..533c114
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlschemas.html
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlschemas: incomplete XML Schemas structure implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlsave.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlschemastypes.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlschemas</span>
+ </h2>
+ <p>xmlschemas - incomplete XML Schemas structure implementation</p>
+ <p>interface to the XML Schemas handling and schema validity checking, it is incomplete right now. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef <a href="libxml2-xmlschemas.html#xmlSchema">xmlSchema</a> * <a href="#xmlSchemaPtr">xmlSchemaPtr</a>;
+typedef struct _xmlSchemaParserCtxt <a href="#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a>;
+typedef enum <a href="#xmlSchemaValidOption">xmlSchemaValidOption</a>;
+typedef <a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a> * <a href="#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a>;
+typedef struct _xmlSchemaSAXPlug <a href="#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a>;
+typedef <a href="libxml2-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a> * <a href="#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>;
+typedef <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a> * <a href="#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>;
+typedef struct _xmlSchema <a href="#xmlSchema">xmlSchema</a>;
+typedef enum <a href="#xmlSchemaValidError">xmlSchemaValidError</a>;
+typedef struct _xmlSchemaValidCtxt <a href="#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a>;
+<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+int <a href="#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a> (<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug);
+<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> <a href="#xmlSchemaParse">xmlSchemaParse</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);
+void <a href="#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);
+void <a href="#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> const char * filename);
+<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a> (const char * URL);
+int <a href="#xmlSchemaIsValid">xmlSchemaIsValid</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
+typedef void <a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> <a href="#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br/> void ** user_data);
+int <a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data);
+int <a href="#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx);
+void <a href="#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br/> void * ctxt);
+int <a href="#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
+void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
+void <a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx);
+int <a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
+int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> const char * filename, <br/> int options);
+int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+void <a href="#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
+<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> (const char * buffer, <br/> int size);
+typedef int <a href="#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> (void * ctx, <br/> const char ** file, <br/> unsigned long * line);
+int <a href="#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx);
+int <a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options);
+void <a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx);
+typedef void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
+void <a href="#xmlSchemaDump">xmlSchemaDump</a> (FILE * output, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
+void <a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
+<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
+void <a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
+<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> <a href="#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlSchema">Structure </a>xmlSchema</h3><pre class="programlisting">struct _xmlSchema {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : schema name
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : the target namespace
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete
+ <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc
+ <a href="libxml2-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ int flags
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> typeDecl
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attrDecl
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attrgrpDecl
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> elemDecl
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> notaDecl
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> schemasImports
+ void * _private : unused by the library for users or bindings
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> groupDecl
+ <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict
+ void * includes : the includes, this is opaque for now
+ int preserve : whether to free the document
+ int counter : used to give ononymous components unique names
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef : All identity-constraint defs.
+ void * volatiles : Obsolete
+} xmlSchema;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaParserCtxt">Structure </a>xmlSchemaParserCtxt</h3><pre class="programlisting">struct _xmlSchemaParserCtxt {
+The content of this structure is not made public by the API.
+} xmlSchemaParserCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaParserCtxtPtr">Typedef </a>xmlSchemaParserCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a> * xmlSchemaParserCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaPtr">Typedef </a>xmlSchemaPtr</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchema">xmlSchema</a> * xmlSchemaPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXPlugPtr">Typedef </a>xmlSchemaSAXPlugPtr</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a> * xmlSchemaSAXPlugPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXPlugStruct">Structure </a>xmlSchemaSAXPlugStruct</h3><pre class="programlisting">struct _xmlSchemaSAXPlug {
+The content of this structure is not made public by the API.
+} xmlSchemaSAXPlugStruct;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxt">Structure </a>xmlSchemaValidCtxt</h3><pre class="programlisting">struct _xmlSchemaValidCtxt {
+The content of this structure is not made public by the API.
+} xmlSchemaValidCtxt;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtPtr">Typedef </a>xmlSchemaValidCtxtPtr</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a> * xmlSchemaValidCtxtPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidError">Enum </a>xmlSchemaValidError</h3><pre class="programlisting">enum <a href="#xmlSchemaValidError">xmlSchemaValidError</a> {
+ <a name="XML_SCHEMAS_ERR_OK">XML_SCHEMAS_ERR_OK</a> = 0
+ <a name="XML_SCHEMAS_ERR_NOROOT">XML_SCHEMAS_ERR_NOROOT</a> = 1
+ <a name="XML_SCHEMAS_ERR_UNDECLAREDELEM">XML_SCHEMAS_ERR_UNDECLAREDELEM</a> = 2
+ <a name="XML_SCHEMAS_ERR_NOTTOPLEVEL">XML_SCHEMAS_ERR_NOTTOPLEVEL</a> = 3
+ <a name="XML_SCHEMAS_ERR_MISSING">XML_SCHEMAS_ERR_MISSING</a> = 4
+ <a name="XML_SCHEMAS_ERR_WRONGELEM">XML_SCHEMAS_ERR_WRONGELEM</a> = 5
+ <a name="XML_SCHEMAS_ERR_NOTYPE">XML_SCHEMAS_ERR_NOTYPE</a> = 6
+ <a name="XML_SCHEMAS_ERR_NOROLLBACK">XML_SCHEMAS_ERR_NOROLLBACK</a> = 7
+ <a name="XML_SCHEMAS_ERR_ISABSTRACT">XML_SCHEMAS_ERR_ISABSTRACT</a> = 8
+ <a name="XML_SCHEMAS_ERR_NOTEMPTY">XML_SCHEMAS_ERR_NOTEMPTY</a> = 9
+ <a name="XML_SCHEMAS_ERR_ELEMCONT">XML_SCHEMAS_ERR_ELEMCONT</a> = 10
+ <a name="XML_SCHEMAS_ERR_HAVEDEFAULT">XML_SCHEMAS_ERR_HAVEDEFAULT</a> = 11
+ <a name="XML_SCHEMAS_ERR_NOTNILLABLE">XML_SCHEMAS_ERR_NOTNILLABLE</a> = 12
+ <a name="XML_SCHEMAS_ERR_EXTRACONTENT">XML_SCHEMAS_ERR_EXTRACONTENT</a> = 13
+ <a name="XML_SCHEMAS_ERR_INVALIDATTR">XML_SCHEMAS_ERR_INVALIDATTR</a> = 14
+ <a name="XML_SCHEMAS_ERR_INVALIDELEM">XML_SCHEMAS_ERR_INVALIDELEM</a> = 15
+ <a name="XML_SCHEMAS_ERR_NOTDETERMINIST">XML_SCHEMAS_ERR_NOTDETERMINIST</a> = 16
+ <a name="XML_SCHEMAS_ERR_CONSTRUCT">XML_SCHEMAS_ERR_CONSTRUCT</a> = 17
+ <a name="XML_SCHEMAS_ERR_INTERNAL">XML_SCHEMAS_ERR_INTERNAL</a> = 18
+ <a name="XML_SCHEMAS_ERR_NOTSIMPLE">XML_SCHEMAS_ERR_NOTSIMPLE</a> = 19
+ <a name="XML_SCHEMAS_ERR_ATTRUNKNOWN">XML_SCHEMAS_ERR_ATTRUNKNOWN</a> = 20
+ <a name="XML_SCHEMAS_ERR_ATTRINVALID">XML_SCHEMAS_ERR_ATTRINVALID</a> = 21
+ <a name="XML_SCHEMAS_ERR_VALUE">XML_SCHEMAS_ERR_VALUE</a> = 22
+ <a name="XML_SCHEMAS_ERR_FACET">XML_SCHEMAS_ERR_FACET</a> = 23
+ <a name="XML_SCHEMAS_ERR_">XML_SCHEMAS_ERR_</a> = 24
+ <a name="XML_SCHEMAS_ERR_XXX">XML_SCHEMAS_ERR_XXX</a> = 25
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidOption">Enum </a>xmlSchemaValidOption</h3><pre class="programlisting">enum <a href="#xmlSchemaValidOption">xmlSchemaValidOption</a> {
+ <a name="XML_SCHEMA_VAL_VC_I_CREATE">XML_SCHEMA_VAL_VC_I_CREATE</a> = 1 /* Default/fixed: create an attribute node * or an element's text node on the instance. * */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityErrorFunc"/>Function type xmlSchemaValidityErrorFunc</h3><pre class="programlisting">void xmlSchemaValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of an error callback from an XSD validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityLocatorFunc"/>Function type xmlSchemaValidityLocatorFunc</h3><pre class="programlisting">int xmlSchemaValidityLocatorFunc (void * ctx, <br/> const char ** file, <br/> unsigned long * line)<br/>
+</pre><p>A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user provided context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>returned file information</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>returned line information</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityWarningFunc"/>Function type xmlSchemaValidityWarningFunc</h3><pre class="programlisting">void xmlSchemaValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
+</pre><p>Signature of a warning callback from an XSD validation</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaDump"/>xmlSchemaDump ()</h3><pre class="programlisting">void xmlSchemaDump (FILE * output, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/>
+</pre><p>Dump a Schema structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFree"/>xmlSchemaFree ()</h3><pre class="programlisting">void xmlSchemaFree (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/>
+</pre><p>Deallocate a Schema structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeParserCtxt"/>xmlSchemaFreeParserCtxt ()</h3><pre class="programlisting">void xmlSchemaFreeParserCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValidCtxt"/>xmlSchemaFreeValidCtxt ()</h3><pre class="programlisting">void xmlSchemaFreeValidCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetParserErrors"/>xmlSchemaGetParserErrors ()</h3><pre class="programlisting">int xmlSchemaGetParserErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
+</pre><p>Get the callback information used to handle errors for a parser context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetValidErrors"/>xmlSchemaGetValidErrors ()</h3><pre class="programlisting">int xmlSchemaGetValidErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx)<br/>
+</pre><p>Get the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaIsValid"/>xmlSchemaIsValid ()</h3><pre class="programlisting">int xmlSchemaIsValid (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
+</pre><p>Check if any error was detected during validation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewDocParserCtxt"/>xmlSchemaNewDocParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewDocParserCtxt (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewMemParserCtxt"/>xmlSchemaNewMemParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewMemParserCtxt (const char * buffer, <br/> int size)<br/>
+</pre><p>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewParserCtxt"/>xmlSchemaNewParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewParserCtxt (const char * URL)<br/>
+</pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewValidCtxt"/>xmlSchemaNewValidCtxt ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br/>
+</pre><p>Create an XML Schemas validation context based on the given schema.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaParse"/>xmlSchemaParse ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br/>
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXPlug"/>xmlSchemaSAXPlug ()</h3><pre class="programlisting"><a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> xmlSchemaSAXPlug (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br/> void ** user_data)<br/>
+</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSAXUnplug"/>xmlSchemaSAXUnplug ()</h3><pre class="programlisting">int xmlSchemaSAXUnplug (<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br/>
+</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml2-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserErrors"/>xmlSchemaSetParserErrors ()</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
+</pre><p>Set the callback functions used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetParserStructuredErrors"/>xmlSchemaSetParserStructuredErrors ()</h3><pre class="programlisting">void xmlSchemaSetParserStructuredErrors (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidErrors"/>xmlSchemaSetValidErrors ()</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx)<br/>
+</pre><p>Set the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidOptions"/>xmlSchemaSetValidOptions ()</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options)<br/>
+</pre><p>Sets the options to be used during the validation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml2-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaSetValidStructuredErrors"/>xmlSchemaSetValidStructuredErrors ()</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx)<br/>
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtGetOptions"/>xmlSchemaValidCtxtGetOptions ()</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
+</pre><p>Get the validation context options.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidCtxtGetParserCtxt"/>xmlSchemaValidCtxtGetParserCtxt ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlSchemaValidCtxtGetParserCtxt (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br/>
+</pre><p>allow access to the parser context of the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context of the schema validation context or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateDoc"/>xmlSchemaValidateDoc ()</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Validate a document tree in memory.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateFile"/>xmlSchemaValidateFile ()</h3><pre class="programlisting">int xmlSchemaValidateFile (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> const char * filename, <br/> int options)<br/>
+</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateOneElement"/>xmlSchemaValidateOneElement ()</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
+</pre><p>Validate a branch of a tree, starting with the given @elem.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateSetFilename"/>xmlSchemaValidateSetFilename ()</h3><pre class="programlisting">void xmlSchemaValidateSetFilename (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> const char * filename)<br/>
+</pre><p>Workaround to provide file error reporting information when this is not provided by current APIs</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateSetLocator"/>xmlSchemaValidateSetLocator ()</h3><pre class="programlisting">void xmlSchemaValidateSetLocator (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br/> void * ctxt)<br/>
+</pre><p>Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the locator function pointer</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the locator context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateStream"/>xmlSchemaValidateStream ()</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data)<br/>
+</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlschemastypes.html b/doc/devhelp/libxml2-xmlschemastypes.html
new file mode 100644
index 0000000..36a59f8
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlschemastypes.html
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlschemastypes: implementation of XML Schema Datatypes</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlschemas.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlstring.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlschemastypes</span>
+ </h2>
+ <p>xmlschemastypes - implementation of XML Schema Datatypes</p>
+ <p>module providing the XML Schema Datatypes implementation both definition and validity checking </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a>;
+int <a href="#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws);
+int <a href="#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> unsigned long * length, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws);
+int <a href="#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> int facetType);
+int <a href="#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue);
+<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type);
+int <a href="#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws);
+int <a href="#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaCollapseString">xmlSchemaCollapseString</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+int <a href="#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val);
+<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> <a href="#xmlSchemaNewFacet">xmlSchemaNewFacet</a> (void);
+int <a href="#xmlSchemaValueAppend">xmlSchemaValueAppend</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur);
+int <a href="#xmlSchemaCompareValues">xmlSchemaCompareValues</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y);
+int <a href="#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> unsigned long * length);
+<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> <a href="#xmlSchemaGetValType">xmlSchemaGetValType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val);
+<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
+int <a href="#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val);
+void <a href="#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet);
+int <a href="#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> unsigned long actualLen, <br/> unsigned long * expectedLen);
+unsigned long <a href="#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet);
+void <a href="#xmlSchemaFreeValue">xmlSchemaFreeValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value);
+<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val);
+<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaCopyValue">xmlSchemaCopyValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val);
+<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns);
+<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName);
+void <a href="#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a> (void);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
+<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a> (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type);
+void <a href="#xmlSchemaInitTypes">xmlSchemaInitTypes</a> (void);
+int <a href="#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws);
+int <a href="#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a> (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWhitespaceValueType">Enum </a>xmlSchemaWhitespaceValueType</h3><pre class="programlisting">enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> {
+ <a name="XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a> = 0
+ <a name="XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a> = 1
+ <a name="XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a> = 2
+ <a name="XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a> = 3
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCheckFacet"/>xmlSchemaCheckFacet ()</h3><pre class="programlisting">int xmlSchemaCheckFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Checks and computes the values of facets.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet</td></tr><tr><td><span class="term"><i><tt>typeDecl</tt></i>:</span></td><td>the schema type definition</td></tr><tr><td><span class="term"><i><tt>pctxt</tt></i>:</span></td><td>the schema parser context or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the optional name of the type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if valid, a positive error code if not valid and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCleanupTypes"/>xmlSchemaCleanupTypes ()</h3><pre class="programlisting">void xmlSchemaCleanupTypes (void)<br/>
+</pre><p>Cleanup the default XML Schemas type library</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCollapseString"/>xmlSchemaCollapseString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaCollapseString (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Removes and normalize white spaces in the string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCompareValues"/>xmlSchemaCompareValues ()</h3><pre class="programlisting">int xmlSchemaCompareValues (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)<br/>
+</pre><p>Compare 2 values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCompareValuesWhtsp"/>xmlSchemaCompareValuesWhtsp ()</h3><pre class="programlisting">int xmlSchemaCompareValuesWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)<br/>
+</pre><p>Compare 2 values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>xws</tt></i>:</span></td><td>the whitespace value of x</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>yws</tt></i>:</span></td><td>the whitespace value of y</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaCopyValue"/>xmlSchemaCopyValue ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaCopyValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/>
+</pre><p>Copies the precomputed value. This duplicates any string within.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value to be copied</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy or NULL if a copy for a data-type is not implemented.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeFacet"/>xmlSchemaFreeFacet ()</h3><pre class="programlisting">void xmlSchemaFreeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br/>
+</pre><p>Deallocate a Schema Facet structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>a schema facet structure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaFreeValue"/>xmlSchemaFreeValue ()</h3><pre class="programlisting">void xmlSchemaFreeValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)<br/>
+</pre><p>Cleanup the default XML Schemas type library</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetBuiltInListSimpleTypeItemType"/>xmlSchemaGetBuiltInListSimpleTypeItemType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInListSimpleTypeItemType (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br/>
+</pre><p>Lookup function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in simple type.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetBuiltInType"/>xmlSchemaGetBuiltInType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInType (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)<br/>
+</pre><p>Gives you the type struct for a built-in type by its type id.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of the built in type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetCanonValue"/>xmlSchemaGetCanonValue ()</h3><pre class="programlisting">int xmlSchemaGetCanonValue (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue)<br/>
+</pre><p>Get the canonical lexical representation of the value. The caller has to FREE the returned retValue. WARNING: Some value types are not supported yet, resulting in a @retValue of "???". TODO: XML Schema 1.0 does not define canonical representations for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay, anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetCanonValueWhtsp"/>xmlSchemaGetCanonValueWhtsp ()</h3><pre class="programlisting">int xmlSchemaGetCanonValueWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br/>
+</pre><p>Get the canonical representation of the value. The caller has to free the returned @retValue.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetFacetValueAsULong"/>xmlSchemaGetFacetValueAsULong ()</h3><pre class="programlisting">unsigned long xmlSchemaGetFacetValueAsULong (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br/>
+</pre><p>Extract the value of a facet</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>an schemas type facet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value as a long</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetPredefinedType"/>xmlSchemaGetPredefinedType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetPredefinedType (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
+</pre><p>Lookup a type in the default XML Schemas type library</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the type name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaGetValType"/>xmlSchemaGetValType ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> xmlSchemaGetValType (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/>
+</pre><p>Accessor for the type of a value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a schemas value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> of the value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaInitTypes"/>xmlSchemaInitTypes ()</h3><pre class="programlisting">void xmlSchemaInitTypes (void)<br/>
+</pre><p>Initialize the default XML Schemas type library</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaIsBuiltInTypeFacet"/>xmlSchemaIsBuiltInTypeFacet ()</h3><pre class="programlisting">int xmlSchemaIsBuiltInTypeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> int facetType)<br/>
+</pre><p>Evaluates if a specific facet can be used in conjunction with a type.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>facetType</tt></i>:</span></td><td>the facet type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewFacet"/>xmlSchemaNewFacet ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> xmlSchemaNewFacet (void)<br/>
+</pre><p>Allocate a new Facet structure.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly allocated structure or NULL in case or error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewNOTATIONValue"/>xmlSchemaNewNOTATIONValue ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewNOTATIONValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns)<br/>
+</pre><p>Allocate a new NOTATION value. The given values are consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the notation name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the notation namespace name or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewQNameValue"/>xmlSchemaNewQNameValue ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewQNameValue (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * localName)<br/>
+</pre><p>Allocate a new QName value. The given values are consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>namespaceName</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of an error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaNewStringValue"/>xmlSchemaNewStringValue ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewStringValue (<a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well. The given value is consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the value type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValPredefTypeNode"/>xmlSchemaValPredefTypeNode ()</h3><pre class="programlisting">int xmlSchemaValPredefTypeNode (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node containing the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValPredefTypeNodeNoNorm"/>xmlSchemaValPredefTypeNodeNoNorm ()</h3><pre class="programlisting">int xmlSchemaValPredefTypeNodeNoNorm (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node containing the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateFacet"/>xmlSchemaValidateFacet ()</h3><pre class="programlisting">int xmlSchemaValidateFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/>
+</pre><p>Check a value against a facet condition</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base type</td></tr><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateFacetWhtsp"/>xmlSchemaValidateFacetWhtsp ()</h3><pre class="programlisting">int xmlSchemaValidateFacetWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br/>
+</pre><p>Check a value against a facet condition. This takes value normalization according to the specified whitespace types into account. Note that @value needs to be the *normalized* value if the facet is of type "pattern".</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>fws</tt></i>:</span></td><td>the whitespace type of the facet's value</td></tr><tr><td><span class="term"><i><tt>valType</tt></i>:</span></td><td>the built-in type of the value</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical (or normalized for pattern) repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateLengthFacet"/>xmlSchemaValidateLengthFacet ()</h3><pre class="programlisting">int xmlSchemaValidateLengthFacet (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> unsigned long * length)<br/>
+</pre><p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr. of the value to be validated</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>length</tt></i>:</span></td><td>the actual length of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateLengthFacetWhtsp"/>xmlSchemaValidateLengthFacetWhtsp ()</h3><pre class="programlisting">int xmlSchemaValidateLengthFacetWhtsp (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br/> unsigned long * length, <br/> <a href="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br/>
+</pre><p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>valType</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr. of the value to be validated</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>length</tt></i>:</span></td><td>the actual length of the value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateListSimpleTypeFacet"/>xmlSchemaValidateListSimpleTypeFacet ()</h3><pre class="programlisting">int xmlSchemaValidateListSimpleTypeFacet (<a href="libxml2-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> unsigned long actualLen, <br/> unsigned long * expectedLen)<br/>
+</pre><p>Checks the value of a list simple type against a facet.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>actualLen</tt></i>:</span></td><td>the number of list items</td></tr><tr><td><span class="term"><i><tt>expectedLen</tt></i>:</span></td><td>the resulting expected number of list items</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValidatePredefinedType"/>xmlSchemaValidatePredefinedType ()</h3><pre class="programlisting">int xmlSchemaValidatePredefinedType (<a href="libxml2-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val)<br/>
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValueAppend"/>xmlSchemaValueAppend ()</h3><pre class="programlisting">int xmlSchemaValueAppend (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br/> <a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br/>
+</pre><p>Appends a next sibling to a list of computed values.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the value to be appended</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded and -1 on API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValueGetAsBoolean"/>xmlSchemaValueGetAsBoolean ()</h3><pre class="programlisting">int xmlSchemaValueGetAsBoolean (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/>
+</pre><p>Accessor for the boolean value of a computed value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true and 0 if false, or in case of an error. Hmm.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValueGetAsString"/>xmlSchemaValueGetAsString ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaValueGetAsString (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br/>
+</pre><p>Accessor for the string value of a computed value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string value or NULL if there was none, or on API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaValueGetNext"/>xmlSchemaValueGetNext ()</h3><pre class="programlisting"><a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaValueGetNext (<a href="libxml2-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br/>
+</pre><p>Accessor for the next sibling of a list of computed values.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next value or NULL if there was none, or on API errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlSchemaWhiteSpaceReplace"/>xmlSchemaWhiteSpaceReplace ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaWhiteSpaceReplace (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br/>
+</pre><p>Replaces 0xd, 0x9 and 0xa with a space.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlstring.html b/doc/devhelp/libxml2-xmlstring.html
new file mode 100644
index 0000000..6dfc70b
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlstring.html
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlstring: set of routines to process strings</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlschemastypes.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlunicode.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlstring</span>
+ </h2>
+ <p>xmlstring - set of routines to process strings</p>
+ <p>type and interfaces needed for the internal string handling of the library, especially UTF8 processing. </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#BAD_CAST">BAD_CAST</a>;
+typedef unsigned char <a href="#xmlChar">xmlChar</a>;
+int <a href="#xmlStrcmp">xmlStrcmp</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCharStrndup">xmlCharStrndup</a> (const char * cur, <br/> int len);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrcasestr">xmlStrcasestr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrcat">xmlStrcat</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add);
+int <a href="#xmlStrPrintf">xmlStrPrintf</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/> int len, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/> ... ...);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrstr">xmlStrstr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+int <a href="#xmlUTF8Size">xmlUTF8Size</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf);
+int <a href="#xmlStrQEqual">xmlStrQEqual</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pref, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrncatNew">xmlStrncatNew</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strpos">xmlUTF8Strpos</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int pos);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrdup">xmlStrdup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCharStrdup">xmlCharStrdup</a> (const char * cur);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrchr">xmlStrchr</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> val);
+int <a href="#xmlStrlen">xmlStrlen</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+int <a href="#xmlStrncmp">xmlStrncmp</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrsub">xmlStrsub</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int start, <br/> int len);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrncat">xmlStrncat</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br/> int len);
+int <a href="#xmlGetUTF8Char">xmlGetUTF8Char</a> (const unsigned char * utf, <br/> int * len);
+int <a href="#xmlStrcasecmp">xmlStrcasecmp</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrndup">xmlStrndup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int len);
+int <a href="#xmlStrVPrintf">xmlStrVPrintf</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/> int len, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/> va_list ap);
+int <a href="#xmlUTF8Strsize">xmlUTF8Strsize</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int len);
+int <a href="#xmlCheckUTF8">xmlCheckUTF8</a> (const unsigned char * utf);
+int <a href="#xmlStrncasecmp">xmlStrncasecmp</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len);
+int <a href="#xmlUTF8Strlen">xmlUTF8Strlen</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strsub">xmlUTF8Strsub</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int start, <br/> int len);
+int <a href="#xmlStrEqual">xmlStrEqual</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
+int <a href="#xmlUTF8Charcmp">xmlUTF8Charcmp</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf2);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strndup">xmlUTF8Strndup</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int len);
+int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utfchar);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="BAD_CAST">Macro </a>BAD_CAST</h3><pre class="programlisting">#define <a href="#BAD_CAST">BAD_CAST</a>;
+</pre><p>Macro to cast a string to an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * when one know its safe.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlChar">Typedef </a>xmlChar</h3><pre class="programlisting">unsigned char xmlChar;
+</pre><p>This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * (possibly making serialization back impossible).</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharStrdup"/>xmlCharStrdup ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCharStrdup (const char * cur)<br/>
+</pre><p>a strdup for char's to xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input char *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCharStrndup"/>xmlCharStrndup ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlCharStrndup (const char * cur, <br/> int len)<br/>
+</pre><p>a strndup for char's to xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input char *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @cur</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCheckUTF8"/>xmlCheckUTF8 ()</h3><pre class="programlisting">int xmlCheckUTF8 (const unsigned char * utf)<br/>
+</pre><p>Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>Pointer to putative UTF-8 encoded string.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>value: true if @utf is valid.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlGetUTF8Char"/>xmlGetUTF8Char ()</h3><pre class="programlisting">int xmlGetUTF8Char (const unsigned char * utf, <br/> int * len)<br/>
+</pre><p>Read the first UTF8 character from @utf</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrEqual"/>xmlStrEqual ()</h3><pre class="programlisting">int xmlStrEqual (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br/>
+</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrPrintf"/>xmlStrPrintf ()</h3><pre class="programlisting">int xmlStrPrintf (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/> int len, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/> ... ...)<br/>
+</pre><p>Formats @msg and places result into @buf.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrQEqual"/>xmlStrQEqual ()</h3><pre class="programlisting">int xmlStrQEqual (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pref, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Check if a QName is Equal to a given string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>pref</tt></i>:</span></td><td>the prefix of the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the localname of the QName</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrVPrintf"/>xmlStrVPrintf ()</h3><pre class="programlisting">int xmlStrVPrintf (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br/> int len, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * msg, <br/> va_list ap)<br/>
+</pre><p>Formats @msg and places result into @buf.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>ap</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrcasecmp"/>xmlStrcasecmp ()</h3><pre class="programlisting">int xmlStrcasecmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br/>
+</pre><p>a strcasecmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrcasestr"/>xmlStrcasestr ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrcasestr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>a case-ignoring strstr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrcat"/>xmlStrcat ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrcat (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add)<br/>
+</pre><p>a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * containing the concatenated string.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrchr"/>xmlStrchr ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrchr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> val)<br/>
+</pre><p>a strchr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrcmp"/>xmlStrcmp ()</h3><pre class="programlisting">int xmlStrcmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br/>
+</pre><p>a strcmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrdup"/>xmlStrdup ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrdup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur)<br/>
+</pre><p>a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrlen"/>xmlStrlen ()</h3><pre class="programlisting">int xmlStrlen (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>length of a xmlChar's string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> contained in the ARRAY.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrncasecmp"/>xmlStrncasecmp ()</h3><pre class="programlisting">int xmlStrncasecmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len)<br/>
+</pre><p>a strncasecmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrncat"/>xmlStrncat ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncat (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br/> int len)<br/>
+</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrncatNew"/>xmlStrncatNew ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncatNew (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len)<br/>
+</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or &lt; 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrncmp"/>xmlStrncmp ()</h3><pre class="programlisting">int xmlStrncmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br/> int len)<br/>
+</pre><p>a strncmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrndup"/>xmlStrndup ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrndup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br/> int len)<br/>
+</pre><p>a strndup for array of xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @cur</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrstr"/>xmlStrstr ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrstr (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>a strstr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlStrsub"/>xmlStrsub ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlStrsub (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> int start, <br/> int len)<br/>
+</pre><p>Extract a substring of a given string</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the index of the first char (zero based)</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the substring</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Charcmp"/>xmlUTF8Charcmp ()</h3><pre class="programlisting">int xmlUTF8Charcmp (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf2)<br/>
+</pre><p>compares the two UCS4 values</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf1</tt></i>:</span></td><td>pointer to first UTF8 char</td></tr><tr><td><span class="term"><i><tt>utf2</tt></i>:</span></td><td>pointer to second UTF8 char</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>result of the compare as with <a href="libxml2-xmlstring.html#xmlStrncmp">xmlStrncmp</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Size"/>xmlUTF8Size ()</h3><pre class="programlisting">int xmlUTF8Size (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf)<br/>
+</pre><p>calculates the internal size of a UTF8 character</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>pointer to the UTF8 character</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the numbers of bytes in the character, -1 on format error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strlen"/>xmlUTF8Strlen ()</h3><pre class="programlisting">int xmlUTF8Strlen (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf)<br/>
+</pre><p>compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> in the string or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strloc"/>xmlUTF8Strloc ()</h3><pre class="programlisting">int xmlUTF8Strloc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utfchar)<br/>
+</pre><p>a function to provide the relative location of a UTF8 char</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>utfchar</tt></i>:</span></td><td>the UTF8 character to be found</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the relative character position of the desired char or -1 if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strndup"/>xmlUTF8Strndup ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strndup (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int len)<br/>
+</pre><p>a strndup for array of UTF8's</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @utf (in chars)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new UTF8 * or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strpos"/>xmlUTF8Strpos ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strpos (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int pos)<br/>
+</pre><p>a function to provide the equivalent of fetching a character from a string array</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>pos</tt></i>:</span></td><td>the position of the desired UTF8 char (in chars)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the UTF8 character or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strsize"/>xmlUTF8Strsize ()</h3><pre class="programlisting">int xmlUTF8Strsize (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int len)<br/>
+</pre><p>storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-SAX.html#characters">characters</a> in the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage size of the first 'len' <a href="libxml2-SAX.html#characters">characters</a> of ARRAY</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUTF8Strsub"/>xmlUTF8Strsub ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strsub (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br/> int start, <br/> int len)<br/>
+</pre><p>Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>relative pos of first char</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>total number to copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a newly created string or NULL if any problem</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlunicode.html b/doc/devhelp/libxml2-xmlunicode.html
new file mode 100644
index 0000000..7d4f0d8
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlunicode.html
@@ -0,0 +1,887 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlunicode: Unicode character APIs</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlstring.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlversion.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlunicode</span>
+ </h2>
+ <p>xmlunicode - Unicode character APIs</p>
+ <p>API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">int <a href="#xmlUCSIsBlockElements">xmlUCSIsBlockElements</a> (int code);
+int <a href="#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a> (int code);
+int <a href="#xmlUCSIsDingbats">xmlUCSIsDingbats</a> (int code);
+int <a href="#xmlUCSIsSuperscriptsandSubscripts">xmlUCSIsSuperscriptsandSubscripts</a> (int code);
+int <a href="#xmlUCSIsCombiningHalfMarks">xmlUCSIsCombiningHalfMarks</a> (int code);
+int <a href="#xmlUCSIsTibetan">xmlUCSIsTibetan</a> (int code);
+int <a href="#xmlUCSIsYiRadicals">xmlUCSIsYiRadicals</a> (int code);
+int <a href="#xmlUCSIsCombiningMarksforSymbols">xmlUCSIsCombiningMarksforSymbols</a> (int code);
+int <a href="#xmlUCSIsHangulSyllables">xmlUCSIsHangulSyllables</a> (int code);
+int <a href="#xmlUCSIsBasicLatin">xmlUCSIsBasicLatin</a> (int code);
+int <a href="#xmlUCSIsCatSc">xmlUCSIsCatSc</a> (int code);
+int <a href="#xmlUCSIsCatSo">xmlUCSIsCatSo</a> (int code);
+int <a href="#xmlUCSIsLimbu">xmlUCSIsLimbu</a> (int code);
+int <a href="#xmlUCSIsCatSm">xmlUCSIsCatSm</a> (int code);
+int <a href="#xmlUCSIsCatSk">xmlUCSIsCatSk</a> (int code);
+int <a href="#xmlUCSIsKhmerSymbols">xmlUCSIsKhmerSymbols</a> (int code);
+int <a href="#xmlUCSIsMongolian">xmlUCSIsMongolian</a> (int code);
+int <a href="#xmlUCSIsMalayalam">xmlUCSIsMalayalam</a> (int code);
+int <a href="#xmlUCSIsMathematicalAlphanumericSymbols">xmlUCSIsMathematicalAlphanumericSymbols</a> (int code);
+int <a href="#xmlUCSIsThaana">xmlUCSIsThaana</a> (int code);
+int <a href="#xmlUCSIsMyanmar">xmlUCSIsMyanmar</a> (int code);
+int <a href="#xmlUCSIsTags">xmlUCSIsTags</a> (int code);
+int <a href="#xmlUCSIsCJKCompatibilityIdeographs">xmlUCSIsCJKCompatibilityIdeographs</a> (int code);
+int <a href="#xmlUCSIsTelugu">xmlUCSIsTelugu</a> (int code);
+int <a href="#xmlUCSIsLowSurrogates">xmlUCSIsLowSurrogates</a> (int code);
+int <a href="#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a> (int code);
+int <a href="#xmlUCSIsSyriac">xmlUCSIsSyriac</a> (int code);
+int <a href="#xmlUCSIsEthiopic">xmlUCSIsEthiopic</a> (int code);
+int <a href="#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a> (int code);
+int <a href="#xmlUCSIsGreekExtended">xmlUCSIsGreekExtended</a> (int code);
+int <a href="#xmlUCSIsGreekandCoptic">xmlUCSIsGreekandCoptic</a> (int code);
+int <a href="#xmlUCSIsKannada">xmlUCSIsKannada</a> (int code);
+int <a href="#xmlUCSIsByzantineMusicalSymbols">xmlUCSIsByzantineMusicalSymbols</a> (int code);
+int <a href="#xmlUCSIsEnclosedCJKLettersandMonths">xmlUCSIsEnclosedCJKLettersandMonths</a> (int code);
+int <a href="#xmlUCSIsCJKCompatibilityForms">xmlUCSIsCJKCompatibilityForms</a> (int code);
+int <a href="#xmlUCSIsCatCs">xmlUCSIsCatCs</a> (int code);
+int <a href="#xmlUCSIsCJKRadicalsSupplement">xmlUCSIsCJKRadicalsSupplement</a> (int code);
+int <a href="#xmlUCSIsCatCf">xmlUCSIsCatCf</a> (int code);
+int <a href="#xmlUCSIsSmallFormVariants">xmlUCSIsSmallFormVariants</a> (int code);
+int <a href="#xmlUCSIsHangulCompatibilityJamo">xmlUCSIsHangulCompatibilityJamo</a> (int code);
+int <a href="#xmlUCSIsCatCc">xmlUCSIsCatCc</a> (int code);
+int <a href="#xmlUCSIsCatCo">xmlUCSIsCatCo</a> (int code);
+int <a href="#xmlUCSIsCherokee">xmlUCSIsCherokee</a> (int code);
+int <a href="#xmlUCSIsGothic">xmlUCSIsGothic</a> (int code);
+int <a href="#xmlUCSIsKhmer">xmlUCSIsKhmer</a> (int code);
+int <a href="#xmlUCSIsCombiningDiacriticalMarksforSymbols">xmlUCSIsCombiningDiacriticalMarksforSymbols</a> (int code);
+int <a href="#xmlUCSIsOgham">xmlUCSIsOgham</a> (int code);
+int <a href="#xmlUCSIsOriya">xmlUCSIsOriya</a> (int code);
+int <a href="#xmlUCSIsLinearBIdeograms">xmlUCSIsLinearBIdeograms</a> (int code);
+int <a href="#xmlUCSIsBlock">xmlUCSIsBlock</a> (int code, <br/> const char * block);
+int <a href="#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a> (int code);
+int <a href="#xmlUCSIsHangulJamo">xmlUCSIsHangulJamo</a> (int code);
+int <a href="#xmlUCSIsTagbanwa">xmlUCSIsTagbanwa</a> (int code);
+int <a href="#xmlUCSIsGeneralPunctuation">xmlUCSIsGeneralPunctuation</a> (int code);
+int <a href="#xmlUCSIsCyrillic">xmlUCSIsCyrillic</a> (int code);
+int <a href="#xmlUCSIsArrows">xmlUCSIsArrows</a> (int code);
+int <a href="#xmlUCSIsControlPictures">xmlUCSIsControlPictures</a> (int code);
+int <a href="#xmlUCSIsCJKUnifiedIdeographs">xmlUCSIsCJKUnifiedIdeographs</a> (int code);
+int <a href="#xmlUCSIsCatNl">xmlUCSIsCatNl</a> (int code);
+int <a href="#xmlUCSIsCatNo">xmlUCSIsCatNo</a> (int code);
+int <a href="#xmlUCSIsYijingHexagramSymbols">xmlUCSIsYijingHexagramSymbols</a> (int code);
+int <a href="#xmlUCSIsVariationSelectorsSupplement">xmlUCSIsVariationSelectorsSupplement</a> (int code);
+int <a href="#xmlUCSIsBengali">xmlUCSIsBengali</a> (int code);
+int <a href="#xmlUCSIsPrivateUse">xmlUCSIsPrivateUse</a> (int code);
+int <a href="#xmlUCSIsMusicalSymbols">xmlUCSIsMusicalSymbols</a> (int code);
+int <a href="#xmlUCSIsMiscellaneousSymbols">xmlUCSIsMiscellaneousSymbols</a> (int code);
+int <a href="#xmlUCSIsCJKCompatibility">xmlUCSIsCJKCompatibility</a> (int code);
+int <a href="#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a> (int code);
+int <a href="#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a> (int code);
+int <a href="#xmlUCSIsSupplementalArrowsA">xmlUCSIsSupplementalArrowsA</a> (int code);
+int <a href="#xmlUCSIsSupplementalArrowsB">xmlUCSIsSupplementalArrowsB</a> (int code);
+int <a href="#xmlUCSIsNumberForms">xmlUCSIsNumberForms</a> (int code);
+int <a href="#xmlUCSIsSpacingModifierLetters">xmlUCSIsSpacingModifierLetters</a> (int code);
+int <a href="#xmlUCSIsOpticalCharacterRecognition">xmlUCSIsOpticalCharacterRecognition</a> (int code);
+int <a href="#xmlUCSIsCatPc">xmlUCSIsCatPc</a> (int code);
+int <a href="#xmlUCSIsCatPf">xmlUCSIsCatPf</a> (int code);
+int <a href="#xmlUCSIsCyrillicSupplement">xmlUCSIsCyrillicSupplement</a> (int code);
+int <a href="#xmlUCSIsCatPd">xmlUCSIsCatPd</a> (int code);
+int <a href="#xmlUCSIsCatPi">xmlUCSIsCatPi</a> (int code);
+int <a href="#xmlUCSIsCatPo">xmlUCSIsCatPo</a> (int code);
+int <a href="#xmlUCSIsHighPrivateUseSurrogates">xmlUCSIsHighPrivateUseSurrogates</a> (int code);
+int <a href="#xmlUCSIsLatinExtendedAdditional">xmlUCSIsLatinExtendedAdditional</a> (int code);
+int <a href="#xmlUCSIsCatPs">xmlUCSIsCatPs</a> (int code);
+int <a href="#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a> (int code);
+int <a href="#xmlUCSIsLao">xmlUCSIsLao</a> (int code);
+int <a href="#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a> (int code);
+int <a href="#xmlUCSIsDeseret">xmlUCSIsDeseret</a> (int code);
+int <a href="#xmlUCSIsEnclosedAlphanumerics">xmlUCSIsEnclosedAlphanumerics</a> (int code);
+int <a href="#xmlUCSIsCombiningDiacriticalMarks">xmlUCSIsCombiningDiacriticalMarks</a> (int code);
+int <a href="#xmlUCSIsIdeographicDescriptionCharacters">xmlUCSIsIdeographicDescriptionCharacters</a> (int code);
+int <a href="#xmlUCSIsPrivateUseArea">xmlUCSIsPrivateUseArea</a> (int code);
+int <a href="#xmlUCSIsCat">xmlUCSIsCat</a> (int code, <br/> const char * cat);
+int <a href="#xmlUCSIsCatLu">xmlUCSIsCatLu</a> (int code);
+int <a href="#xmlUCSIsCatLt">xmlUCSIsCatLt</a> (int code);
+int <a href="#xmlUCSIsYiSyllables">xmlUCSIsYiSyllables</a> (int code);
+int <a href="#xmlUCSIsShavian">xmlUCSIsShavian</a> (int code);
+int <a href="#xmlUCSIsCatLo">xmlUCSIsCatLo</a> (int code);
+int <a href="#xmlUCSIsCatLm">xmlUCSIsCatLm</a> (int code);
+int <a href="#xmlUCSIsCatLl">xmlUCSIsCatLl</a> (int code);
+int <a href="#xmlUCSIsMiscellaneousTechnical">xmlUCSIsMiscellaneousTechnical</a> (int code);
+int <a href="#xmlUCSIsUgaritic">xmlUCSIsUgaritic</a> (int code);
+int <a href="#xmlUCSIsCJKCompatibilityIdeographsSupplement">xmlUCSIsCJKCompatibilityIdeographsSupplement</a> (int code);
+int <a href="#xmlUCSIsCypriotSyllabary">xmlUCSIsCypriotSyllabary</a> (int code);
+int <a href="#xmlUCSIsTamil">xmlUCSIsTamil</a> (int code);
+int <a href="#xmlUCSIsCatC">xmlUCSIsCatC</a> (int code);
+int <a href="#xmlUCSIsCatN">xmlUCSIsCatN</a> (int code);
+int <a href="#xmlUCSIsCatL">xmlUCSIsCatL</a> (int code);
+int <a href="#xmlUCSIsCatM">xmlUCSIsCatM</a> (int code);
+int <a href="#xmlUCSIsUnifiedCanadianAboriginalSyllabics">xmlUCSIsUnifiedCanadianAboriginalSyllabics</a> (int code);
+int <a href="#xmlUCSIsCatS">xmlUCSIsCatS</a> (int code);
+int <a href="#xmlUCSIsCatP">xmlUCSIsCatP</a> (int code);
+int <a href="#xmlUCSIsSinhala">xmlUCSIsSinhala</a> (int code);
+int <a href="#xmlUCSIsGeorgian">xmlUCSIsGeorgian</a> (int code);
+int <a href="#xmlUCSIsCatZ">xmlUCSIsCatZ</a> (int code);
+int <a href="#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a> (int code);
+int <a href="#xmlUCSIsKangxiRadicals">xmlUCSIsKangxiRadicals</a> (int code);
+int <a href="#xmlUCSIsGreek">xmlUCSIsGreek</a> (int code);
+int <a href="#xmlUCSIsCatPe">xmlUCSIsCatPe</a> (int code);
+int <a href="#xmlUCSIsHanunoo">xmlUCSIsHanunoo</a> (int code);
+int <a href="#xmlUCSIsArmenian">xmlUCSIsArmenian</a> (int code);
+int <a href="#xmlUCSIsSupplementaryPrivateUseAreaB">xmlUCSIsSupplementaryPrivateUseAreaB</a> (int code);
+int <a href="#xmlUCSIsSupplementaryPrivateUseAreaA">xmlUCSIsSupplementaryPrivateUseAreaA</a> (int code);
+int <a href="#xmlUCSIsKatakanaPhoneticExtensions">xmlUCSIsKatakanaPhoneticExtensions</a> (int code);
+int <a href="#xmlUCSIsLetterlikeSymbols">xmlUCSIsLetterlikeSymbols</a> (int code);
+int <a href="#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a> (int code);
+int <a href="#xmlUCSIsArabic">xmlUCSIsArabic</a> (int code);
+int <a href="#xmlUCSIsHebrew">xmlUCSIsHebrew</a> (int code);
+int <a href="#xmlUCSIsOldItalic">xmlUCSIsOldItalic</a> (int code);
+int <a href="#xmlUCSIsArabicPresentationFormsA">xmlUCSIsArabicPresentationFormsA</a> (int code);
+int <a href="#xmlUCSIsCatZp">xmlUCSIsCatZp</a> (int code);
+int <a href="#xmlUCSIsCatZs">xmlUCSIsCatZs</a> (int code);
+int <a href="#xmlUCSIsArabicPresentationFormsB">xmlUCSIsArabicPresentationFormsB</a> (int code);
+int <a href="#xmlUCSIsGeometricShapes">xmlUCSIsGeometricShapes</a> (int code);
+int <a href="#xmlUCSIsCatZl">xmlUCSIsCatZl</a> (int code);
+int <a href="#xmlUCSIsTagalog">xmlUCSIsTagalog</a> (int code);
+int <a href="#xmlUCSIsSpecials">xmlUCSIsSpecials</a> (int code);
+int <a href="#xmlUCSIsGujarati">xmlUCSIsGujarati</a> (int code);
+int <a href="#xmlUCSIsKatakana">xmlUCSIsKatakana</a> (int code);
+int <a href="#xmlUCSIsHalfwidthandFullwidthForms">xmlUCSIsHalfwidthandFullwidthForms</a> (int code);
+int <a href="#xmlUCSIsLatinExtendedB">xmlUCSIsLatinExtendedB</a> (int code);
+int <a href="#xmlUCSIsLatinExtendedA">xmlUCSIsLatinExtendedA</a> (int code);
+int <a href="#xmlUCSIsBuhid">xmlUCSIsBuhid</a> (int code);
+int <a href="#xmlUCSIsMiscellaneousSymbolsandArrows">xmlUCSIsMiscellaneousSymbolsandArrows</a> (int code);
+int <a href="#xmlUCSIsTaiLe">xmlUCSIsTaiLe</a> (int code);
+int <a href="#xmlUCSIsCJKSymbolsandPunctuation">xmlUCSIsCJKSymbolsandPunctuation</a> (int code);
+int <a href="#xmlUCSIsTaiXuanJingSymbols">xmlUCSIsTaiXuanJingSymbols</a> (int code);
+int <a href="#xmlUCSIsGurmukhi">xmlUCSIsGurmukhi</a> (int code);
+int <a href="#xmlUCSIsMathematicalOperators">xmlUCSIsMathematicalOperators</a> (int code);
+int <a href="#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a> (int code);
+int <a href="#xmlUCSIsCurrencySymbols">xmlUCSIsCurrencySymbols</a> (int code);
+int <a href="#xmlUCSIsSupplementalMathematicalOperators">xmlUCSIsSupplementalMathematicalOperators</a> (int code);
+int <a href="#xmlUCSIsCJKUnifiedIdeographsExtensionA">xmlUCSIsCJKUnifiedIdeographsExtensionA</a> (int code);
+int <a href="#xmlUCSIsKanbun">xmlUCSIsKanbun</a> (int code);
+int <a href="#xmlUCSIsCJKUnifiedIdeographsExtensionB">xmlUCSIsCJKUnifiedIdeographsExtensionB</a> (int code);
+int <a href="#xmlUCSIsThai">xmlUCSIsThai</a> (int code);
+int <a href="#xmlUCSIsRunic">xmlUCSIsRunic</a> (int code);
+int <a href="#xmlUCSIsCatNd">xmlUCSIsCatNd</a> (int code);
+int <a href="#xmlUCSIsLatin1Supplement">xmlUCSIsLatin1Supplement</a> (int code);
+int <a href="#xmlUCSIsLinearBSyllabary">xmlUCSIsLinearBSyllabary</a> (int code);
+int <a href="#xmlUCSIsHiragana">xmlUCSIsHiragana</a> (int code);
+int <a href="#xmlUCSIsMiscellaneousMathematicalSymbolsB">xmlUCSIsMiscellaneousMathematicalSymbolsB</a> (int code);
+int <a href="#xmlUCSIsMiscellaneousMathematicalSymbolsA">xmlUCSIsMiscellaneousMathematicalSymbolsA</a> (int code);
+int <a href="#xmlUCSIsCatMn">xmlUCSIsCatMn</a> (int code);
+int <a href="#xmlUCSIsVariationSelectors">xmlUCSIsVariationSelectors</a> (int code);
+int <a href="#xmlUCSIsCatMc">xmlUCSIsCatMc</a> (int code);
+int <a href="#xmlUCSIsCatMe">xmlUCSIsCatMe</a> (int code);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsAegeanNumbers"/>xmlUCSIsAegeanNumbers ()</h3><pre class="programlisting">int xmlUCSIsAegeanNumbers (int code)<br/>
+</pre><p>Check whether the character is part of AegeanNumbers UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsAlphabeticPresentationForms"/>xmlUCSIsAlphabeticPresentationForms ()</h3><pre class="programlisting">int xmlUCSIsAlphabeticPresentationForms (int code)<br/>
+</pre><p>Check whether the character is part of AlphabeticPresentationForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsArabic"/>xmlUCSIsArabic ()</h3><pre class="programlisting">int xmlUCSIsArabic (int code)<br/>
+</pre><p>Check whether the character is part of Arabic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsArabicPresentationFormsA"/>xmlUCSIsArabicPresentationFormsA ()</h3><pre class="programlisting">int xmlUCSIsArabicPresentationFormsA (int code)<br/>
+</pre><p>Check whether the character is part of ArabicPresentationForms-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsArabicPresentationFormsB"/>xmlUCSIsArabicPresentationFormsB ()</h3><pre class="programlisting">int xmlUCSIsArabicPresentationFormsB (int code)<br/>
+</pre><p>Check whether the character is part of ArabicPresentationForms-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsArmenian"/>xmlUCSIsArmenian ()</h3><pre class="programlisting">int xmlUCSIsArmenian (int code)<br/>
+</pre><p>Check whether the character is part of Armenian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsArrows"/>xmlUCSIsArrows ()</h3><pre class="programlisting">int xmlUCSIsArrows (int code)<br/>
+</pre><p>Check whether the character is part of Arrows UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBasicLatin"/>xmlUCSIsBasicLatin ()</h3><pre class="programlisting">int xmlUCSIsBasicLatin (int code)<br/>
+</pre><p>Check whether the character is part of BasicLatin UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBengali"/>xmlUCSIsBengali ()</h3><pre class="programlisting">int xmlUCSIsBengali (int code)<br/>
+</pre><p>Check whether the character is part of Bengali UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBlock"/>xmlUCSIsBlock ()</h3><pre class="programlisting">int xmlUCSIsBlock (int code, <br/> const char * block)<br/>
+</pre><p>Check whether the character is part of the UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>block</tt></i>:</span></td><td>UCS block name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 on unknown block</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBlockElements"/>xmlUCSIsBlockElements ()</h3><pre class="programlisting">int xmlUCSIsBlockElements (int code)<br/>
+</pre><p>Check whether the character is part of BlockElements UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBopomofo"/>xmlUCSIsBopomofo ()</h3><pre class="programlisting">int xmlUCSIsBopomofo (int code)<br/>
+</pre><p>Check whether the character is part of Bopomofo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBopomofoExtended"/>xmlUCSIsBopomofoExtended ()</h3><pre class="programlisting">int xmlUCSIsBopomofoExtended (int code)<br/>
+</pre><p>Check whether the character is part of BopomofoExtended UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBoxDrawing"/>xmlUCSIsBoxDrawing ()</h3><pre class="programlisting">int xmlUCSIsBoxDrawing (int code)<br/>
+</pre><p>Check whether the character is part of BoxDrawing UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBraillePatterns"/>xmlUCSIsBraillePatterns ()</h3><pre class="programlisting">int xmlUCSIsBraillePatterns (int code)<br/>
+</pre><p>Check whether the character is part of BraillePatterns UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsBuhid"/>xmlUCSIsBuhid ()</h3><pre class="programlisting">int xmlUCSIsBuhid (int code)<br/>
+</pre><p>Check whether the character is part of Buhid UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsByzantineMusicalSymbols"/>xmlUCSIsByzantineMusicalSymbols ()</h3><pre class="programlisting">int xmlUCSIsByzantineMusicalSymbols (int code)<br/>
+</pre><p>Check whether the character is part of ByzantineMusicalSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKCompatibility"/>xmlUCSIsCJKCompatibility ()</h3><pre class="programlisting">int xmlUCSIsCJKCompatibility (int code)<br/>
+</pre><p>Check whether the character is part of CJKCompatibility UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKCompatibilityForms"/>xmlUCSIsCJKCompatibilityForms ()</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityForms (int code)<br/>
+</pre><p>Check whether the character is part of CJKCompatibilityForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKCompatibilityIdeographs"/>xmlUCSIsCJKCompatibilityIdeographs ()</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityIdeographs (int code)<br/>
+</pre><p>Check whether the character is part of CJKCompatibilityIdeographs UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKCompatibilityIdeographsSupplement"/>xmlUCSIsCJKCompatibilityIdeographsSupplement ()</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code)<br/>
+</pre><p>Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKRadicalsSupplement"/>xmlUCSIsCJKRadicalsSupplement ()</h3><pre class="programlisting">int xmlUCSIsCJKRadicalsSupplement (int code)<br/>
+</pre><p>Check whether the character is part of CJKRadicalsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKSymbolsandPunctuation"/>xmlUCSIsCJKSymbolsandPunctuation ()</h3><pre class="programlisting">int xmlUCSIsCJKSymbolsandPunctuation (int code)<br/>
+</pre><p>Check whether the character is part of CJKSymbolsandPunctuation UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKUnifiedIdeographs"/>xmlUCSIsCJKUnifiedIdeographs ()</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographs (int code)<br/>
+</pre><p>Check whether the character is part of CJKUnifiedIdeographs UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKUnifiedIdeographsExtensionA"/>xmlUCSIsCJKUnifiedIdeographsExtensionA ()</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code)<br/>
+</pre><p>Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCJKUnifiedIdeographsExtensionB"/>xmlUCSIsCJKUnifiedIdeographsExtensionB ()</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code)<br/>
+</pre><p>Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCat"/>xmlUCSIsCat ()</h3><pre class="programlisting">int xmlUCSIsCat (int code, <br/> const char * cat)<br/>
+</pre><p>Check whether the character is part of the UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>cat</tt></i>:</span></td><td>UCS Category name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 on unknown category</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatC"/>xmlUCSIsCatC ()</h3><pre class="programlisting">int xmlUCSIsCatC (int code)<br/>
+</pre><p>Check whether the character is part of C UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatCc"/>xmlUCSIsCatCc ()</h3><pre class="programlisting">int xmlUCSIsCatCc (int code)<br/>
+</pre><p>Check whether the character is part of Cc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatCf"/>xmlUCSIsCatCf ()</h3><pre class="programlisting">int xmlUCSIsCatCf (int code)<br/>
+</pre><p>Check whether the character is part of Cf UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatCo"/>xmlUCSIsCatCo ()</h3><pre class="programlisting">int xmlUCSIsCatCo (int code)<br/>
+</pre><p>Check whether the character is part of Co UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatCs"/>xmlUCSIsCatCs ()</h3><pre class="programlisting">int xmlUCSIsCatCs (int code)<br/>
+</pre><p>Check whether the character is part of Cs UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatL"/>xmlUCSIsCatL ()</h3><pre class="programlisting">int xmlUCSIsCatL (int code)<br/>
+</pre><p>Check whether the character is part of L UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatLl"/>xmlUCSIsCatLl ()</h3><pre class="programlisting">int xmlUCSIsCatLl (int code)<br/>
+</pre><p>Check whether the character is part of Ll UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatLm"/>xmlUCSIsCatLm ()</h3><pre class="programlisting">int xmlUCSIsCatLm (int code)<br/>
+</pre><p>Check whether the character is part of Lm UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatLo"/>xmlUCSIsCatLo ()</h3><pre class="programlisting">int xmlUCSIsCatLo (int code)<br/>
+</pre><p>Check whether the character is part of Lo UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatLt"/>xmlUCSIsCatLt ()</h3><pre class="programlisting">int xmlUCSIsCatLt (int code)<br/>
+</pre><p>Check whether the character is part of Lt UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatLu"/>xmlUCSIsCatLu ()</h3><pre class="programlisting">int xmlUCSIsCatLu (int code)<br/>
+</pre><p>Check whether the character is part of Lu UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatM"/>xmlUCSIsCatM ()</h3><pre class="programlisting">int xmlUCSIsCatM (int code)<br/>
+</pre><p>Check whether the character is part of M UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatMc"/>xmlUCSIsCatMc ()</h3><pre class="programlisting">int xmlUCSIsCatMc (int code)<br/>
+</pre><p>Check whether the character is part of Mc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatMe"/>xmlUCSIsCatMe ()</h3><pre class="programlisting">int xmlUCSIsCatMe (int code)<br/>
+</pre><p>Check whether the character is part of Me UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatMn"/>xmlUCSIsCatMn ()</h3><pre class="programlisting">int xmlUCSIsCatMn (int code)<br/>
+</pre><p>Check whether the character is part of Mn UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatN"/>xmlUCSIsCatN ()</h3><pre class="programlisting">int xmlUCSIsCatN (int code)<br/>
+</pre><p>Check whether the character is part of N UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatNd"/>xmlUCSIsCatNd ()</h3><pre class="programlisting">int xmlUCSIsCatNd (int code)<br/>
+</pre><p>Check whether the character is part of Nd UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatNl"/>xmlUCSIsCatNl ()</h3><pre class="programlisting">int xmlUCSIsCatNl (int code)<br/>
+</pre><p>Check whether the character is part of Nl UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatNo"/>xmlUCSIsCatNo ()</h3><pre class="programlisting">int xmlUCSIsCatNo (int code)<br/>
+</pre><p>Check whether the character is part of No UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatP"/>xmlUCSIsCatP ()</h3><pre class="programlisting">int xmlUCSIsCatP (int code)<br/>
+</pre><p>Check whether the character is part of P UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPc"/>xmlUCSIsCatPc ()</h3><pre class="programlisting">int xmlUCSIsCatPc (int code)<br/>
+</pre><p>Check whether the character is part of Pc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPd"/>xmlUCSIsCatPd ()</h3><pre class="programlisting">int xmlUCSIsCatPd (int code)<br/>
+</pre><p>Check whether the character is part of Pd UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPe"/>xmlUCSIsCatPe ()</h3><pre class="programlisting">int xmlUCSIsCatPe (int code)<br/>
+</pre><p>Check whether the character is part of Pe UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPf"/>xmlUCSIsCatPf ()</h3><pre class="programlisting">int xmlUCSIsCatPf (int code)<br/>
+</pre><p>Check whether the character is part of Pf UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPi"/>xmlUCSIsCatPi ()</h3><pre class="programlisting">int xmlUCSIsCatPi (int code)<br/>
+</pre><p>Check whether the character is part of Pi UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPo"/>xmlUCSIsCatPo ()</h3><pre class="programlisting">int xmlUCSIsCatPo (int code)<br/>
+</pre><p>Check whether the character is part of Po UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatPs"/>xmlUCSIsCatPs ()</h3><pre class="programlisting">int xmlUCSIsCatPs (int code)<br/>
+</pre><p>Check whether the character is part of Ps UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatS"/>xmlUCSIsCatS ()</h3><pre class="programlisting">int xmlUCSIsCatS (int code)<br/>
+</pre><p>Check whether the character is part of S UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatSc"/>xmlUCSIsCatSc ()</h3><pre class="programlisting">int xmlUCSIsCatSc (int code)<br/>
+</pre><p>Check whether the character is part of Sc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatSk"/>xmlUCSIsCatSk ()</h3><pre class="programlisting">int xmlUCSIsCatSk (int code)<br/>
+</pre><p>Check whether the character is part of Sk UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatSm"/>xmlUCSIsCatSm ()</h3><pre class="programlisting">int xmlUCSIsCatSm (int code)<br/>
+</pre><p>Check whether the character is part of Sm UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatSo"/>xmlUCSIsCatSo ()</h3><pre class="programlisting">int xmlUCSIsCatSo (int code)<br/>
+</pre><p>Check whether the character is part of So UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatZ"/>xmlUCSIsCatZ ()</h3><pre class="programlisting">int xmlUCSIsCatZ (int code)<br/>
+</pre><p>Check whether the character is part of Z UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatZl"/>xmlUCSIsCatZl ()</h3><pre class="programlisting">int xmlUCSIsCatZl (int code)<br/>
+</pre><p>Check whether the character is part of Zl UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatZp"/>xmlUCSIsCatZp ()</h3><pre class="programlisting">int xmlUCSIsCatZp (int code)<br/>
+</pre><p>Check whether the character is part of Zp UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCatZs"/>xmlUCSIsCatZs ()</h3><pre class="programlisting">int xmlUCSIsCatZs (int code)<br/>
+</pre><p>Check whether the character is part of Zs UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCherokee"/>xmlUCSIsCherokee ()</h3><pre class="programlisting">int xmlUCSIsCherokee (int code)<br/>
+</pre><p>Check whether the character is part of Cherokee UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCombiningDiacriticalMarks"/>xmlUCSIsCombiningDiacriticalMarks ()</h3><pre class="programlisting">int xmlUCSIsCombiningDiacriticalMarks (int code)<br/>
+</pre><p>Check whether the character is part of CombiningDiacriticalMarks UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCombiningDiacriticalMarksforSymbols"/>xmlUCSIsCombiningDiacriticalMarksforSymbols ()</h3><pre class="programlisting">int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code)<br/>
+</pre><p>Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCombiningHalfMarks"/>xmlUCSIsCombiningHalfMarks ()</h3><pre class="programlisting">int xmlUCSIsCombiningHalfMarks (int code)<br/>
+</pre><p>Check whether the character is part of CombiningHalfMarks UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCombiningMarksforSymbols"/>xmlUCSIsCombiningMarksforSymbols ()</h3><pre class="programlisting">int xmlUCSIsCombiningMarksforSymbols (int code)<br/>
+</pre><p>Check whether the character is part of CombiningMarksforSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsControlPictures"/>xmlUCSIsControlPictures ()</h3><pre class="programlisting">int xmlUCSIsControlPictures (int code)<br/>
+</pre><p>Check whether the character is part of ControlPictures UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCurrencySymbols"/>xmlUCSIsCurrencySymbols ()</h3><pre class="programlisting">int xmlUCSIsCurrencySymbols (int code)<br/>
+</pre><p>Check whether the character is part of CurrencySymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCypriotSyllabary"/>xmlUCSIsCypriotSyllabary ()</h3><pre class="programlisting">int xmlUCSIsCypriotSyllabary (int code)<br/>
+</pre><p>Check whether the character is part of CypriotSyllabary UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCyrillic"/>xmlUCSIsCyrillic ()</h3><pre class="programlisting">int xmlUCSIsCyrillic (int code)<br/>
+</pre><p>Check whether the character is part of Cyrillic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsCyrillicSupplement"/>xmlUCSIsCyrillicSupplement ()</h3><pre class="programlisting">int xmlUCSIsCyrillicSupplement (int code)<br/>
+</pre><p>Check whether the character is part of CyrillicSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsDeseret"/>xmlUCSIsDeseret ()</h3><pre class="programlisting">int xmlUCSIsDeseret (int code)<br/>
+</pre><p>Check whether the character is part of Deseret UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsDevanagari"/>xmlUCSIsDevanagari ()</h3><pre class="programlisting">int xmlUCSIsDevanagari (int code)<br/>
+</pre><p>Check whether the character is part of Devanagari UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsDingbats"/>xmlUCSIsDingbats ()</h3><pre class="programlisting">int xmlUCSIsDingbats (int code)<br/>
+</pre><p>Check whether the character is part of Dingbats UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsEnclosedAlphanumerics"/>xmlUCSIsEnclosedAlphanumerics ()</h3><pre class="programlisting">int xmlUCSIsEnclosedAlphanumerics (int code)<br/>
+</pre><p>Check whether the character is part of EnclosedAlphanumerics UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsEnclosedCJKLettersandMonths"/>xmlUCSIsEnclosedCJKLettersandMonths ()</h3><pre class="programlisting">int xmlUCSIsEnclosedCJKLettersandMonths (int code)<br/>
+</pre><p>Check whether the character is part of EnclosedCJKLettersandMonths UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsEthiopic"/>xmlUCSIsEthiopic ()</h3><pre class="programlisting">int xmlUCSIsEthiopic (int code)<br/>
+</pre><p>Check whether the character is part of Ethiopic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGeneralPunctuation"/>xmlUCSIsGeneralPunctuation ()</h3><pre class="programlisting">int xmlUCSIsGeneralPunctuation (int code)<br/>
+</pre><p>Check whether the character is part of GeneralPunctuation UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGeometricShapes"/>xmlUCSIsGeometricShapes ()</h3><pre class="programlisting">int xmlUCSIsGeometricShapes (int code)<br/>
+</pre><p>Check whether the character is part of GeometricShapes UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGeorgian"/>xmlUCSIsGeorgian ()</h3><pre class="programlisting">int xmlUCSIsGeorgian (int code)<br/>
+</pre><p>Check whether the character is part of Georgian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGothic"/>xmlUCSIsGothic ()</h3><pre class="programlisting">int xmlUCSIsGothic (int code)<br/>
+</pre><p>Check whether the character is part of Gothic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGreek"/>xmlUCSIsGreek ()</h3><pre class="programlisting">int xmlUCSIsGreek (int code)<br/>
+</pre><p>Check whether the character is part of Greek UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGreekExtended"/>xmlUCSIsGreekExtended ()</h3><pre class="programlisting">int xmlUCSIsGreekExtended (int code)<br/>
+</pre><p>Check whether the character is part of GreekExtended UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGreekandCoptic"/>xmlUCSIsGreekandCoptic ()</h3><pre class="programlisting">int xmlUCSIsGreekandCoptic (int code)<br/>
+</pre><p>Check whether the character is part of GreekandCoptic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGujarati"/>xmlUCSIsGujarati ()</h3><pre class="programlisting">int xmlUCSIsGujarati (int code)<br/>
+</pre><p>Check whether the character is part of Gujarati UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsGurmukhi"/>xmlUCSIsGurmukhi ()</h3><pre class="programlisting">int xmlUCSIsGurmukhi (int code)<br/>
+</pre><p>Check whether the character is part of Gurmukhi UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHalfwidthandFullwidthForms"/>xmlUCSIsHalfwidthandFullwidthForms ()</h3><pre class="programlisting">int xmlUCSIsHalfwidthandFullwidthForms (int code)<br/>
+</pre><p>Check whether the character is part of HalfwidthandFullwidthForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHangulCompatibilityJamo"/>xmlUCSIsHangulCompatibilityJamo ()</h3><pre class="programlisting">int xmlUCSIsHangulCompatibilityJamo (int code)<br/>
+</pre><p>Check whether the character is part of HangulCompatibilityJamo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHangulJamo"/>xmlUCSIsHangulJamo ()</h3><pre class="programlisting">int xmlUCSIsHangulJamo (int code)<br/>
+</pre><p>Check whether the character is part of HangulJamo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHangulSyllables"/>xmlUCSIsHangulSyllables ()</h3><pre class="programlisting">int xmlUCSIsHangulSyllables (int code)<br/>
+</pre><p>Check whether the character is part of HangulSyllables UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHanunoo"/>xmlUCSIsHanunoo ()</h3><pre class="programlisting">int xmlUCSIsHanunoo (int code)<br/>
+</pre><p>Check whether the character is part of Hanunoo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHebrew"/>xmlUCSIsHebrew ()</h3><pre class="programlisting">int xmlUCSIsHebrew (int code)<br/>
+</pre><p>Check whether the character is part of Hebrew UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHighPrivateUseSurrogates"/>xmlUCSIsHighPrivateUseSurrogates ()</h3><pre class="programlisting">int xmlUCSIsHighPrivateUseSurrogates (int code)<br/>
+</pre><p>Check whether the character is part of HighPrivateUseSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHighSurrogates"/>xmlUCSIsHighSurrogates ()</h3><pre class="programlisting">int xmlUCSIsHighSurrogates (int code)<br/>
+</pre><p>Check whether the character is part of HighSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsHiragana"/>xmlUCSIsHiragana ()</h3><pre class="programlisting">int xmlUCSIsHiragana (int code)<br/>
+</pre><p>Check whether the character is part of Hiragana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsIPAExtensions"/>xmlUCSIsIPAExtensions ()</h3><pre class="programlisting">int xmlUCSIsIPAExtensions (int code)<br/>
+</pre><p>Check whether the character is part of IPAExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsIdeographicDescriptionCharacters"/>xmlUCSIsIdeographicDescriptionCharacters ()</h3><pre class="programlisting">int xmlUCSIsIdeographicDescriptionCharacters (int code)<br/>
+</pre><p>Check whether the character is part of IdeographicDescriptionCharacters UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKanbun"/>xmlUCSIsKanbun ()</h3><pre class="programlisting">int xmlUCSIsKanbun (int code)<br/>
+</pre><p>Check whether the character is part of Kanbun UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKangxiRadicals"/>xmlUCSIsKangxiRadicals ()</h3><pre class="programlisting">int xmlUCSIsKangxiRadicals (int code)<br/>
+</pre><p>Check whether the character is part of KangxiRadicals UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKannada"/>xmlUCSIsKannada ()</h3><pre class="programlisting">int xmlUCSIsKannada (int code)<br/>
+</pre><p>Check whether the character is part of Kannada UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKatakana"/>xmlUCSIsKatakana ()</h3><pre class="programlisting">int xmlUCSIsKatakana (int code)<br/>
+</pre><p>Check whether the character is part of Katakana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKatakanaPhoneticExtensions"/>xmlUCSIsKatakanaPhoneticExtensions ()</h3><pre class="programlisting">int xmlUCSIsKatakanaPhoneticExtensions (int code)<br/>
+</pre><p>Check whether the character is part of KatakanaPhoneticExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKhmer"/>xmlUCSIsKhmer ()</h3><pre class="programlisting">int xmlUCSIsKhmer (int code)<br/>
+</pre><p>Check whether the character is part of Khmer UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsKhmerSymbols"/>xmlUCSIsKhmerSymbols ()</h3><pre class="programlisting">int xmlUCSIsKhmerSymbols (int code)<br/>
+</pre><p>Check whether the character is part of KhmerSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLao"/>xmlUCSIsLao ()</h3><pre class="programlisting">int xmlUCSIsLao (int code)<br/>
+</pre><p>Check whether the character is part of Lao UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLatin1Supplement"/>xmlUCSIsLatin1Supplement ()</h3><pre class="programlisting">int xmlUCSIsLatin1Supplement (int code)<br/>
+</pre><p>Check whether the character is part of Latin-1Supplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLatinExtendedA"/>xmlUCSIsLatinExtendedA ()</h3><pre class="programlisting">int xmlUCSIsLatinExtendedA (int code)<br/>
+</pre><p>Check whether the character is part of LatinExtended-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLatinExtendedAdditional"/>xmlUCSIsLatinExtendedAdditional ()</h3><pre class="programlisting">int xmlUCSIsLatinExtendedAdditional (int code)<br/>
+</pre><p>Check whether the character is part of LatinExtendedAdditional UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLatinExtendedB"/>xmlUCSIsLatinExtendedB ()</h3><pre class="programlisting">int xmlUCSIsLatinExtendedB (int code)<br/>
+</pre><p>Check whether the character is part of LatinExtended-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLetterlikeSymbols"/>xmlUCSIsLetterlikeSymbols ()</h3><pre class="programlisting">int xmlUCSIsLetterlikeSymbols (int code)<br/>
+</pre><p>Check whether the character is part of LetterlikeSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLimbu"/>xmlUCSIsLimbu ()</h3><pre class="programlisting">int xmlUCSIsLimbu (int code)<br/>
+</pre><p>Check whether the character is part of Limbu UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLinearBIdeograms"/>xmlUCSIsLinearBIdeograms ()</h3><pre class="programlisting">int xmlUCSIsLinearBIdeograms (int code)<br/>
+</pre><p>Check whether the character is part of LinearBIdeograms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLinearBSyllabary"/>xmlUCSIsLinearBSyllabary ()</h3><pre class="programlisting">int xmlUCSIsLinearBSyllabary (int code)<br/>
+</pre><p>Check whether the character is part of LinearBSyllabary UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsLowSurrogates"/>xmlUCSIsLowSurrogates ()</h3><pre class="programlisting">int xmlUCSIsLowSurrogates (int code)<br/>
+</pre><p>Check whether the character is part of LowSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMalayalam"/>xmlUCSIsMalayalam ()</h3><pre class="programlisting">int xmlUCSIsMalayalam (int code)<br/>
+</pre><p>Check whether the character is part of Malayalam UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMathematicalAlphanumericSymbols"/>xmlUCSIsMathematicalAlphanumericSymbols ()</h3><pre class="programlisting">int xmlUCSIsMathematicalAlphanumericSymbols (int code)<br/>
+</pre><p>Check whether the character is part of MathematicalAlphanumericSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMathematicalOperators"/>xmlUCSIsMathematicalOperators ()</h3><pre class="programlisting">int xmlUCSIsMathematicalOperators (int code)<br/>
+</pre><p>Check whether the character is part of MathematicalOperators UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMiscellaneousMathematicalSymbolsA"/>xmlUCSIsMiscellaneousMathematicalSymbolsA ()</h3><pre class="programlisting">int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code)<br/>
+</pre><p>Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMiscellaneousMathematicalSymbolsB"/>xmlUCSIsMiscellaneousMathematicalSymbolsB ()</h3><pre class="programlisting">int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code)<br/>
+</pre><p>Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMiscellaneousSymbols"/>xmlUCSIsMiscellaneousSymbols ()</h3><pre class="programlisting">int xmlUCSIsMiscellaneousSymbols (int code)<br/>
+</pre><p>Check whether the character is part of MiscellaneousSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMiscellaneousSymbolsandArrows"/>xmlUCSIsMiscellaneousSymbolsandArrows ()</h3><pre class="programlisting">int xmlUCSIsMiscellaneousSymbolsandArrows (int code)<br/>
+</pre><p>Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMiscellaneousTechnical"/>xmlUCSIsMiscellaneousTechnical ()</h3><pre class="programlisting">int xmlUCSIsMiscellaneousTechnical (int code)<br/>
+</pre><p>Check whether the character is part of MiscellaneousTechnical UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMongolian"/>xmlUCSIsMongolian ()</h3><pre class="programlisting">int xmlUCSIsMongolian (int code)<br/>
+</pre><p>Check whether the character is part of Mongolian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMusicalSymbols"/>xmlUCSIsMusicalSymbols ()</h3><pre class="programlisting">int xmlUCSIsMusicalSymbols (int code)<br/>
+</pre><p>Check whether the character is part of MusicalSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsMyanmar"/>xmlUCSIsMyanmar ()</h3><pre class="programlisting">int xmlUCSIsMyanmar (int code)<br/>
+</pre><p>Check whether the character is part of Myanmar UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsNumberForms"/>xmlUCSIsNumberForms ()</h3><pre class="programlisting">int xmlUCSIsNumberForms (int code)<br/>
+</pre><p>Check whether the character is part of NumberForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsOgham"/>xmlUCSIsOgham ()</h3><pre class="programlisting">int xmlUCSIsOgham (int code)<br/>
+</pre><p>Check whether the character is part of Ogham UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsOldItalic"/>xmlUCSIsOldItalic ()</h3><pre class="programlisting">int xmlUCSIsOldItalic (int code)<br/>
+</pre><p>Check whether the character is part of OldItalic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsOpticalCharacterRecognition"/>xmlUCSIsOpticalCharacterRecognition ()</h3><pre class="programlisting">int xmlUCSIsOpticalCharacterRecognition (int code)<br/>
+</pre><p>Check whether the character is part of OpticalCharacterRecognition UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsOriya"/>xmlUCSIsOriya ()</h3><pre class="programlisting">int xmlUCSIsOriya (int code)<br/>
+</pre><p>Check whether the character is part of Oriya UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsOsmanya"/>xmlUCSIsOsmanya ()</h3><pre class="programlisting">int xmlUCSIsOsmanya (int code)<br/>
+</pre><p>Check whether the character is part of Osmanya UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsPhoneticExtensions"/>xmlUCSIsPhoneticExtensions ()</h3><pre class="programlisting">int xmlUCSIsPhoneticExtensions (int code)<br/>
+</pre><p>Check whether the character is part of PhoneticExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsPrivateUse"/>xmlUCSIsPrivateUse ()</h3><pre class="programlisting">int xmlUCSIsPrivateUse (int code)<br/>
+</pre><p>Check whether the character is part of PrivateUse UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsPrivateUseArea"/>xmlUCSIsPrivateUseArea ()</h3><pre class="programlisting">int xmlUCSIsPrivateUseArea (int code)<br/>
+</pre><p>Check whether the character is part of PrivateUseArea UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsRunic"/>xmlUCSIsRunic ()</h3><pre class="programlisting">int xmlUCSIsRunic (int code)<br/>
+</pre><p>Check whether the character is part of Runic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsShavian"/>xmlUCSIsShavian ()</h3><pre class="programlisting">int xmlUCSIsShavian (int code)<br/>
+</pre><p>Check whether the character is part of Shavian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSinhala"/>xmlUCSIsSinhala ()</h3><pre class="programlisting">int xmlUCSIsSinhala (int code)<br/>
+</pre><p>Check whether the character is part of Sinhala UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSmallFormVariants"/>xmlUCSIsSmallFormVariants ()</h3><pre class="programlisting">int xmlUCSIsSmallFormVariants (int code)<br/>
+</pre><p>Check whether the character is part of SmallFormVariants UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSpacingModifierLetters"/>xmlUCSIsSpacingModifierLetters ()</h3><pre class="programlisting">int xmlUCSIsSpacingModifierLetters (int code)<br/>
+</pre><p>Check whether the character is part of SpacingModifierLetters UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSpecials"/>xmlUCSIsSpecials ()</h3><pre class="programlisting">int xmlUCSIsSpecials (int code)<br/>
+</pre><p>Check whether the character is part of Specials UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSuperscriptsandSubscripts"/>xmlUCSIsSuperscriptsandSubscripts ()</h3><pre class="programlisting">int xmlUCSIsSuperscriptsandSubscripts (int code)<br/>
+</pre><p>Check whether the character is part of SuperscriptsandSubscripts UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSupplementalArrowsA"/>xmlUCSIsSupplementalArrowsA ()</h3><pre class="programlisting">int xmlUCSIsSupplementalArrowsA (int code)<br/>
+</pre><p>Check whether the character is part of SupplementalArrows-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSupplementalArrowsB"/>xmlUCSIsSupplementalArrowsB ()</h3><pre class="programlisting">int xmlUCSIsSupplementalArrowsB (int code)<br/>
+</pre><p>Check whether the character is part of SupplementalArrows-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSupplementalMathematicalOperators"/>xmlUCSIsSupplementalMathematicalOperators ()</h3><pre class="programlisting">int xmlUCSIsSupplementalMathematicalOperators (int code)<br/>
+</pre><p>Check whether the character is part of SupplementalMathematicalOperators UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSupplementaryPrivateUseAreaA"/>xmlUCSIsSupplementaryPrivateUseAreaA ()</h3><pre class="programlisting">int xmlUCSIsSupplementaryPrivateUseAreaA (int code)<br/>
+</pre><p>Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSupplementaryPrivateUseAreaB"/>xmlUCSIsSupplementaryPrivateUseAreaB ()</h3><pre class="programlisting">int xmlUCSIsSupplementaryPrivateUseAreaB (int code)<br/>
+</pre><p>Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsSyriac"/>xmlUCSIsSyriac ()</h3><pre class="programlisting">int xmlUCSIsSyriac (int code)<br/>
+</pre><p>Check whether the character is part of Syriac UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTagalog"/>xmlUCSIsTagalog ()</h3><pre class="programlisting">int xmlUCSIsTagalog (int code)<br/>
+</pre><p>Check whether the character is part of Tagalog UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTagbanwa"/>xmlUCSIsTagbanwa ()</h3><pre class="programlisting">int xmlUCSIsTagbanwa (int code)<br/>
+</pre><p>Check whether the character is part of Tagbanwa UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTags"/>xmlUCSIsTags ()</h3><pre class="programlisting">int xmlUCSIsTags (int code)<br/>
+</pre><p>Check whether the character is part of Tags UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTaiLe"/>xmlUCSIsTaiLe ()</h3><pre class="programlisting">int xmlUCSIsTaiLe (int code)<br/>
+</pre><p>Check whether the character is part of TaiLe UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTaiXuanJingSymbols"/>xmlUCSIsTaiXuanJingSymbols ()</h3><pre class="programlisting">int xmlUCSIsTaiXuanJingSymbols (int code)<br/>
+</pre><p>Check whether the character is part of TaiXuanJingSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTamil"/>xmlUCSIsTamil ()</h3><pre class="programlisting">int xmlUCSIsTamil (int code)<br/>
+</pre><p>Check whether the character is part of Tamil UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTelugu"/>xmlUCSIsTelugu ()</h3><pre class="programlisting">int xmlUCSIsTelugu (int code)<br/>
+</pre><p>Check whether the character is part of Telugu UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsThaana"/>xmlUCSIsThaana ()</h3><pre class="programlisting">int xmlUCSIsThaana (int code)<br/>
+</pre><p>Check whether the character is part of Thaana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsThai"/>xmlUCSIsThai ()</h3><pre class="programlisting">int xmlUCSIsThai (int code)<br/>
+</pre><p>Check whether the character is part of Thai UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsTibetan"/>xmlUCSIsTibetan ()</h3><pre class="programlisting">int xmlUCSIsTibetan (int code)<br/>
+</pre><p>Check whether the character is part of Tibetan UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsUgaritic"/>xmlUCSIsUgaritic ()</h3><pre class="programlisting">int xmlUCSIsUgaritic (int code)<br/>
+</pre><p>Check whether the character is part of Ugaritic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsUnifiedCanadianAboriginalSyllabics"/>xmlUCSIsUnifiedCanadianAboriginalSyllabics ()</h3><pre class="programlisting">int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code)<br/>
+</pre><p>Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsVariationSelectors"/>xmlUCSIsVariationSelectors ()</h3><pre class="programlisting">int xmlUCSIsVariationSelectors (int code)<br/>
+</pre><p>Check whether the character is part of VariationSelectors UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsVariationSelectorsSupplement"/>xmlUCSIsVariationSelectorsSupplement ()</h3><pre class="programlisting">int xmlUCSIsVariationSelectorsSupplement (int code)<br/>
+</pre><p>Check whether the character is part of VariationSelectorsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsYiRadicals"/>xmlUCSIsYiRadicals ()</h3><pre class="programlisting">int xmlUCSIsYiRadicals (int code)<br/>
+</pre><p>Check whether the character is part of YiRadicals UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsYiSyllables"/>xmlUCSIsYiSyllables ()</h3><pre class="programlisting">int xmlUCSIsYiSyllables (int code)<br/>
+</pre><p>Check whether the character is part of YiSyllables UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlUCSIsYijingHexagramSymbols"/>xmlUCSIsYijingHexagramSymbols ()</h3><pre class="programlisting">int xmlUCSIsYijingHexagramSymbols (int code)<br/>
+</pre><p>Check whether the character is part of YijingHexagramSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlversion.html b/doc/devhelp/libxml2-xmlversion.html
new file mode 100644
index 0000000..8178614
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlversion.html
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlversion: compile-time version informations</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlunicode.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xmlwriter.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlversion</span>
+ </h2>
+ <p>xmlversion - compile-time version informations</p>
+ <p>compile-time version informations for the XML library </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a>;
+#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a>;
+#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a>;
+#define <a href="#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a>;
+#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a>;
+#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a>;
+#define <a href="#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a>;
+#define <a href="#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a>;
+#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a>;
+#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a>;
+#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a>;
+#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a>;
+#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a>;
+#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a>;
+#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a>;
+#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a>;
+#define <a href="#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a>;
+#define <a href="#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a>;
+#define <a href="#WITH_TRIO">WITH_TRIO</a>;
+#define <a href="#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a>;
+#define <a href="#LIBXML_VERSION">LIBXML_VERSION</a>;
+#define <a href="#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a>;
+#define <a href="#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a>;
+#define <a href="#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a>;
+#define <a href="#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a>;
+#define <a href="#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a>;
+#define <a href="#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a>;
+#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a>;
+#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a>;
+#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a>;
+#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a>;
+#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a>;
+#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a>;
+#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a>;
+#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a>;
+#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a>;
+#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a>;
+#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a>;
+#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a>;
+#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a>;
+#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a>;
+#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a>;
+#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a>;
+#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a>;
+#define <a href="#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a>;
+#define <a href="#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a>;
+void <a href="#xmlCheckVersion">xmlCheckVersion</a> (int version);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="ATTRIBUTE_UNUSED">Macro </a>ATTRIBUTE_UNUSED</h3><pre class="programlisting">#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a>;
+</pre><p>Macro used to signal to GCC unused function parameters</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="DEBUG_MEMORY_LOCATION">Macro </a>DEBUG_MEMORY_LOCATION</h3><pre class="programlisting">#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a>;
+</pre><p>Whether the memory debugging is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ATTR_ALLOC_SIZE">Macro </a>LIBXML_ATTR_ALLOC_SIZE</h3><pre class="programlisting">#define <a href="#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a>;
+</pre><p>Macro used to indicate to GCC this is an allocator function</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ATTR_FORMAT">Macro </a>LIBXML_ATTR_FORMAT</h3><pre class="programlisting">#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a>;
+</pre><p>Macro used to indicate to GCC the parameter are printf like</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_AUTOMATA_ENABLED">Macro </a>LIBXML_AUTOMATA_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a>;
+</pre><p>Whether the automata interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_C14N_ENABLED">Macro </a>LIBXML_C14N_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a>;
+</pre><p>Whether the Canonicalization support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_CATALOG_ENABLED">Macro </a>LIBXML_CATALOG_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a>;
+</pre><p>Whether the Catalog support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_DEBUG_ENABLED">Macro </a>LIBXML_DEBUG_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a>;
+</pre><p>Whether Debugging module is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_DEBUG_RUNTIME">Macro </a>LIBXML_DEBUG_RUNTIME</h3><pre class="programlisting">#define <a href="#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a>;
+</pre><p>Whether the runtime debugging is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_DOCB_ENABLED">Macro </a>LIBXML_DOCB_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a>;
+</pre><p>Whether the SGML Docbook support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_DOTTED_VERSION">Macro </a>LIBXML_DOTTED_VERSION</h3><pre class="programlisting">#define <a href="#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a>;
+</pre><p>the version string like "1.2.3"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_EXPR_ENABLED">Macro </a>LIBXML_EXPR_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a>;
+</pre><p>Whether the formal expressions interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_FTP_ENABLED">Macro </a>LIBXML_FTP_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a>;
+</pre><p>Whether the FTP support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_HTML_ENABLED">Macro </a>LIBXML_HTML_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a>;
+</pre><p>Whether the HTML support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_HTTP_ENABLED">Macro </a>LIBXML_HTTP_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a>;
+</pre><p>Whether the HTTP support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ICONV_ENABLED">Macro </a>LIBXML_ICONV_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a>;
+</pre><p>Whether iconv support is available</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ICU_ENABLED">Macro </a>LIBXML_ICU_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a>;
+</pre><p>Whether icu support is available</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ISO8859X_ENABLED">Macro </a>LIBXML_ISO8859X_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a>;
+</pre><p>Whether ISO-8859-* support is made available in case iconv is not</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_LEGACY_ENABLED">Macro </a>LIBXML_LEGACY_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a>;
+</pre><p>Whether the deprecated APIs are compiled in for compatibility</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_LZMA_ENABLED">Macro </a>LIBXML_LZMA_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a>;
+</pre><p>Whether the Lzma support is compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_MODULES_ENABLED">Macro </a>LIBXML_MODULES_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a>;
+</pre><p>Whether the module interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_MODULE_EXTENSION">Macro </a>LIBXML_MODULE_EXTENSION</h3><pre class="programlisting">#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a>;
+</pre><p>the string suffix used by dynamic modules (usually shared libraries)</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_OUTPUT_ENABLED">Macro </a>LIBXML_OUTPUT_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a>;
+</pre><p>Whether the serialization/saving support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_PATTERN_ENABLED">Macro </a>LIBXML_PATTERN_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a>;
+</pre><p>Whether the <a href="libxml2-pattern.html#xmlPattern">xmlPattern</a> node selection interface is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_PUSH_ENABLED">Macro </a>LIBXML_PUSH_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a>;
+</pre><p>Whether the push parsing interfaces are configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_READER_ENABLED">Macro </a>LIBXML_READER_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a>;
+</pre><p>Whether the xmlReader parsing interface is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_REGEXP_ENABLED">Macro </a>LIBXML_REGEXP_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a>;
+</pre><p>Whether the regular expressions interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_SAX1_ENABLED">Macro </a>LIBXML_SAX1_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a>;
+</pre><p>Whether the older SAX1 interface is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_SCHEMAS_ENABLED">Macro </a>LIBXML_SCHEMAS_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a>;
+</pre><p>Whether the Schemas validation interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_SCHEMATRON_ENABLED">Macro </a>LIBXML_SCHEMATRON_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a>;
+</pre><p>Whether the Schematron validation interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_TEST_VERSION">Macro </a>LIBXML_TEST_VERSION</h3><pre class="programlisting">#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a>;
+</pre><p>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_THREAD_ALLOC_ENABLED">Macro </a>LIBXML_THREAD_ALLOC_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a>;
+</pre><p>Whether the allocation hooks are per-thread</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_THREAD_ENABLED">Macro </a>LIBXML_THREAD_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a>;
+</pre><p>Whether the thread support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_TREE_ENABLED">Macro </a>LIBXML_TREE_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a>;
+</pre><p>Whether the DOM like tree manipulation API support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_UNICODE_ENABLED">Macro </a>LIBXML_UNICODE_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a>;
+</pre><p>Whether the Unicode related interfaces are compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_VALID_ENABLED">Macro </a>LIBXML_VALID_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a>;
+</pre><p>Whether the DTD validation support is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_VERSION">Macro </a>LIBXML_VERSION</h3><pre class="programlisting">#define <a href="#LIBXML_VERSION">LIBXML_VERSION</a>;
+</pre><p>the version number: 1.2.3 value is 10203</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_VERSION_EXTRA">Macro </a>LIBXML_VERSION_EXTRA</h3><pre class="programlisting">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a>;
+</pre><p>extra version information, used to show a CVS compilation</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_VERSION_STRING">Macro </a>LIBXML_VERSION_STRING</h3><pre class="programlisting">#define <a href="#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a>;
+</pre><p>the version number string, 1.2.3 value is "10203"</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_WRITER_ENABLED">Macro </a>LIBXML_WRITER_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a>;
+</pre><p>Whether the xmlWriter saving interface is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_XINCLUDE_ENABLED">Macro </a>LIBXML_XINCLUDE_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a>;
+</pre><p>Whether XInclude is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_XPATH_ENABLED">Macro </a>LIBXML_XPATH_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a>;
+</pre><p>Whether XPath is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_XPTR_ENABLED">Macro </a>LIBXML_XPTR_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a>;
+</pre><p>Whether XPointer is configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="LIBXML_ZLIB_ENABLED">Macro </a>LIBXML_ZLIB_ENABLED</h3><pre class="programlisting">#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a>;
+</pre><p>Whether the Zlib support is compiled in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="WITHOUT_TRIO">Macro </a>WITHOUT_TRIO</h3><pre class="programlisting">#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a>;
+</pre><p>defined if the trio support should not be configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="WITH_TRIO">Macro </a>WITH_TRIO</h3><pre class="programlisting">#define <a href="#WITH_TRIO">WITH_TRIO</a>;
+</pre><p>defined if the trio support need to be configured in</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlCheckVersion"/>xmlCheckVersion ()</h3><pre class="programlisting">void xmlCheckVersion (int version)<br/>
+</pre><p>check the compiled lib version against the include one. This can warn or immediately kill the application</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the include version number</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xmlwriter.html b/doc/devhelp/libxml2-xmlwriter.html
new file mode 100644
index 0000000..7c2be92
--- /dev/null
+++ b/doc/devhelp/libxml2-xmlwriter.html
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xmlwriter: text writing API for XML</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlversion.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xpath.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xmlwriter</span>
+ </h2>
+ <p>xmlwriter - text writing API for XML</p>
+ <p>text writing API for XML </p>
+ <p>Author(s): Alfred Mickautsch &lt;alfred@mickautsch.de&gt; </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a>;
+#define <a href="#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a>;
+typedef struct _xmlTextWriter <a href="#xmlTextWriter">xmlTextWriter</a>;
+typedef <a href="libxml2-xmlwriter.html#xmlTextWriter">xmlTextWriter</a> * <a href="#xmlTextWriterPtr">xmlTextWriterPtr</a>;
+int <a href="#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * version, <br/> const char * encoding, <br/> const char * standalone);
+int <a href="#xmlTextWriterEndPI">xmlTextWriterEndPI</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * data, <br/> int start, <br/> int len);
+int <a href="#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+int <a href="#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextWriterEndComment">xmlTextWriterEndComment</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len);
+int <a href="#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid);
+int <a href="#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a> (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int compression);
+int <a href="#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * data, <br/> int start, <br/> int len);
+int <a href="#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int indent);
+int <a href="#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterStartComment">xmlTextWriterStartComment</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI);
+int <a href="#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriter">xmlNewTextWriter</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out);
+void <a href="#xmlFreeTextWriter">xmlFreeTextWriter</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterStartPI">xmlTextWriterStartPI</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target);
+int <a href="#xmlTextWriterStartElement">xmlTextWriterStartElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid);
+int <a href="#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterEndElement">xmlTextWriterEndElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a> (const char * uri, <br/> int compression);
+int <a href="#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWritePI">xmlTextWriterWritePI</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid);
+int <a href="#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> quotechar);
+int <a href="#xmlTextWriterWriteString">xmlTextWriterWriteString</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterFlush">xmlTextWriterFlush</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+int <a href="#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid);
+int <a href="#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> * doc, <br/> int compression);
+int <a href="#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterTree">xmlNewTextWriterTree</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int compression);
+<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> int compression);
+int <a href="#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
+int <a href="#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * subset);
+int <a href="#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...);
+int <a href="#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr);
+int <a href="#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+int <a href="#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a> (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> ... ...);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDocType">Macro </a>xmlTextWriterWriteDocType</h3><pre class="programlisting">#define <a href="#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a>;
+</pre><p>this macro maps to <a href="libxml2-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteProcessingInstruction">Macro </a>xmlTextWriterWriteProcessingInstruction</h3><pre class="programlisting">#define <a href="#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a>;
+</pre><p>This macro maps to <a href="libxml2-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a></p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriter">Structure </a>xmlTextWriter</h3><pre class="programlisting">struct _xmlTextWriter {
+The content of this structure is not made public by the API.
+} xmlTextWriter;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterPtr">Typedef </a>xmlTextWriterPtr</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriter">xmlTextWriter</a> * xmlTextWriterPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlFreeTextWriter"/>xmlFreeTextWriter ()</h3><pre class="programlisting">void xmlFreeTextWriter (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>Deallocate all the resources associated to the writer</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriter"/>xmlNewTextWriter ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriter (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure using an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> NOTE: the @out parameter will be deallocated when the writer is closed (if the call succeed.)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriterDoc"/>xmlNewTextWriterDoc ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> * doc, <br/> int compression)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @*doc as output</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>address of a <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> to hold the new XML document tree</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriterFilename"/>xmlNewTextWriterFilename ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterFilename (const char * uri, <br/> int compression)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @uri as output</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>the URI of the resource for the output</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriterMemory"/>xmlNewTextWriterMemory ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterMemory (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br/> int compression)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @buf as output TODO: handle compression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriterPushParser"/>xmlNewTextWriterPushParser ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterPushParser (<a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br/> int compression)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @ctxt as output NOTE: the @ctxt context will be freed with the resulting writer (if the call succeeds). TODO: handle compression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td><a href="libxml2-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> to hold the new XML document tree</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNewTextWriterTree"/>xmlNewTextWriterTree ()</h3><pre class="programlisting"><a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterTree (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> int compression)<br/>
+</pre><p>Create a new <a href="libxml2-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @doc as output starting at @node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a></td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL for doc-&gt;children</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndAttribute"/>xmlTextWriterEndAttribute ()</h3><pre class="programlisting">int xmlTextWriterEndAttribute (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End the current xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndCDATA"/>xmlTextWriterEndCDATA ()</h3><pre class="programlisting">int xmlTextWriterEndCDATA (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml CDATA section.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndComment"/>xmlTextWriterEndComment ()</h3><pre class="programlisting">int xmlTextWriterEndComment (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End the current xml coment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndDTD"/>xmlTextWriterEndDTD ()</h3><pre class="programlisting">int xmlTextWriterEndDTD (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml DTD.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndDTDAttlist"/>xmlTextWriterEndDTDAttlist ()</h3><pre class="programlisting">int xmlTextWriterEndDTDAttlist (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml DTD <a href="libxml2-SAX.html#attribute">attribute</a> list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndDTDElement"/>xmlTextWriterEndDTDElement ()</h3><pre class="programlisting">int xmlTextWriterEndDTDElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndDTDEntity"/>xmlTextWriterEndDTDEntity ()</h3><pre class="programlisting">int xmlTextWriterEndDTDEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndDocument"/>xmlTextWriterEndDocument ()</h3><pre class="programlisting">int xmlTextWriterEndDocument (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End an xml document. All open elements are closed, and the content is flushed to the output.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndElement"/>xmlTextWriterEndElement ()</h3><pre class="programlisting">int xmlTextWriterEndElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End the current xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterEndPI"/>xmlTextWriterEndPI ()</h3><pre class="programlisting">int xmlTextWriterEndPI (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End the current xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterFlush"/>xmlTextWriterFlush ()</h3><pre class="programlisting">int xmlTextWriterFlush (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>Flush the output buffer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterFullEndElement"/>xmlTextWriterFullEndElement ()</h3><pre class="programlisting">int xmlTextWriterFullEndElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>End the current xml element. Writes an end tag even if the element is empty</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterSetIndent"/>xmlTextWriterSetIndent ()</h3><pre class="programlisting">int xmlTextWriterSetIndent (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int indent)<br/>
+</pre><p>Set indentation output. indent = 0 do not indentation. indent &gt; 0 do indentation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>indent</tt></i>:</span></td><td>do indentation?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterSetIndentString"/>xmlTextWriterSetIndentString ()</h3><pre class="programlisting">int xmlTextWriterSetIndentString (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Set string indentation.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterSetQuoteChar"/>xmlTextWriterSetQuoteChar ()</h3><pre class="programlisting">int xmlTextWriterSetQuoteChar (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> quotechar)<br/>
+</pre><p>Set the character used for quoting attributes.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>quotechar</tt></i>:</span></td><td>the quote character</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartAttribute"/>xmlTextWriterStartAttribute ()</h3><pre class="programlisting">int xmlTextWriterStartAttribute (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Start an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartAttributeNS"/>xmlTextWriterStartAttributeNS ()</h3><pre class="programlisting">int xmlTextWriterStartAttributeNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br/>
+</pre><p>Start an xml <a href="libxml2-SAX.html#attribute">attribute</a> with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartCDATA"/>xmlTextWriterStartCDATA ()</h3><pre class="programlisting">int xmlTextWriterStartCDATA (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>Start an xml CDATA section.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartComment"/>xmlTextWriterStartComment ()</h3><pre class="programlisting">int xmlTextWriterStartComment (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br/>
+</pre><p>Start an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartDTD"/>xmlTextWriterStartDTD ()</h3><pre class="programlisting">int xmlTextWriterStartDTD (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid)<br/>
+</pre><p>Start an xml DTD.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartDTDAttlist"/>xmlTextWriterStartDTDAttlist ()</h3><pre class="programlisting">int xmlTextWriterStartDTDAttlist (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Start an xml DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartDTDElement"/>xmlTextWriterStartDTDElement ()</h3><pre class="programlisting">int xmlTextWriterStartDTDElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Start an xml DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartDTDEntity"/>xmlTextWriterStartDTDEntity ()</h3><pre class="programlisting">int xmlTextWriterStartDTDEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Start an xml DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartDocument"/>xmlTextWriterStartDocument ()</h3><pre class="programlisting">int xmlTextWriterStartDocument (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * version, <br/> const char * encoding, <br/> const char * standalone)<br/>
+</pre><p>Start a new xml document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the xml version ("1.0") or NULL for default ("1.0")</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding or NULL for default</td></tr><tr><td><span class="term"><i><tt>standalone</tt></i>:</span></td><td>"yes" or "no" or NULL for default</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartElement"/>xmlTextWriterStartElement ()</h3><pre class="programlisting">int xmlTextWriterStartElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Start an xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartElementNS"/>xmlTextWriterStartElementNS ()</h3><pre class="programlisting">int xmlTextWriterStartElementNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br/>
+</pre><p>Start an xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterStartPI"/>xmlTextWriterStartPI ()</h3><pre class="programlisting">int xmlTextWriterStartPI (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target)<br/>
+</pre><p>Start an xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteAttribute"/>xmlTextWriterWriteAttribute ()</h3><pre class="programlisting">int xmlTextWriterWriteAttribute (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteAttributeNS"/>xmlTextWriterWriteAttributeNS ()</h3><pre class="programlisting">int xmlTextWriterWriteAttributeNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteBase64"/>xmlTextWriterWriteBase64 ()</h3><pre class="programlisting">int xmlTextWriterWriteBase64 (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * data, <br/> int start, <br/> int len)<br/>
+</pre><p>Write an base64 encoded xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>binary data</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the position within the data of the first byte to encode</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of bytes to encode</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteBinHex"/>xmlTextWriterWriteBinHex ()</h3><pre class="programlisting">int xmlTextWriterWriteBinHex (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * data, <br/> int start, <br/> int len)<br/>
+</pre><p>Write a BinHex encoded xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>binary data</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the position within the data of the first byte to encode</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of bytes to encode</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteCDATA"/>xmlTextWriterWriteCDATA ()</h3><pre class="programlisting">int xmlTextWriterWriteCDATA (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>CDATA content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteComment"/>xmlTextWriterWriteComment ()</h3><pre class="programlisting">int xmlTextWriterWriteComment (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml2-SAX.html#comment">comment</a> string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTD"/>xmlTextWriterWriteDTD ()</h3><pre class="programlisting">int xmlTextWriterWriteDTD (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * subset)<br/>
+</pre><p>Write a DTD.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>subset</tt></i>:</span></td><td>string content of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDAttlist"/>xmlTextWriterWriteDTDAttlist ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDAttlist (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write a DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDElement"/>xmlTextWriterWriteDTDElement ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write a DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDEntity"/>xmlTextWriterWriteDTDEntity ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write a DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDExternalEntity"/>xmlTextWriterWriteDTDExternalEntity ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDExternalEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid)<br/>
+</pre><p>Write a DTD external entity. The entity must have been started with <a href="libxml2-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDExternalEntityContents"/>xmlTextWriterWriteDTDExternalEntityContents ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDExternalEntityContents (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ndataid)<br/>
+</pre><p>Write the contents of a DTD external entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDInternalEntity"/>xmlTextWriterWriteDTDInternalEntity ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDInternalEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write a DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteDTDNotation"/>xmlTextWriterWriteDTDNotation ()</h3><pre class="programlisting">int xmlTextWriterWriteDTDNotation (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid)<br/>
+</pre><p>Write a DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the xml notation</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteElement"/>xmlTextWriterWriteElement ()</h3><pre class="programlisting">int xmlTextWriterWriteElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>element content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteElementNS"/>xmlTextWriterWriteElementNS ()</h3><pre class="programlisting">int xmlTextWriterWriteElementNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>element content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatAttribute"/>xmlTextWriterWriteFormatAttribute ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatAttribute (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatAttributeNS"/>xmlTextWriterWriteFormatAttributeNS ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatAttributeNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml attribute.with namespace support</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatCDATA"/>xmlTextWriterWriteFormatCDATA ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatCDATA (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatComment"/>xmlTextWriterWriteFormatComment ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatComment (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatDTD"/>xmlTextWriterWriteFormatDTD ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTD (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a DTD with a formatted markup declarations part.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatDTDAttlist"/>xmlTextWriterWriteFormatDTDAttlist ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDAttlist (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatDTDElement"/>xmlTextWriterWriteFormatDTDElement ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatDTDInternalEntity"/>xmlTextWriterWriteFormatDTDInternalEntity ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDInternalEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatElement"/>xmlTextWriterWriteFormatElement ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatElementNS"/>xmlTextWriterWriteFormatElementNS ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatElementNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatPI"/>xmlTextWriterWriteFormatPI ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatPI (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted PI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatRaw"/>xmlTextWriterWriteFormatRaw ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatRaw (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteFormatString"/>xmlTextWriterWriteFormatString ()</h3><pre class="programlisting">int xmlTextWriterWriteFormatString (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> ... ...)<br/>
+</pre><p>Write a formatted xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWritePI"/>xmlTextWriterWritePI ()</h3><pre class="programlisting">int xmlTextWriterWritePI (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteRaw"/>xmlTextWriterWriteRaw ()</h3><pre class="programlisting">int xmlTextWriterWriteRaw (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write a raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteRawLen"/>xmlTextWriterWriteRawLen ()</h3><pre class="programlisting">int xmlTextWriterWriteRawLen (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br/> int len)<br/>
+</pre><p>Write an xml text. TODO: what about entities and special chars??</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>length of the text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteString"/>xmlTextWriterWriteString ()</h3><pre class="programlisting">int xmlTextWriterWriteString (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br/>
+</pre><p>Write an xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatAttribute"/>xmlTextWriterWriteVFormatAttribute ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatAttribute (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatAttributeNS"/>xmlTextWriterWriteVFormatAttributeNS ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatAttributeNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml attribute.with namespace support</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml2-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatCDATA"/>xmlTextWriterWriteVFormatCDATA ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatCDATA (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatComment"/>xmlTextWriterWriteVFormatComment ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatComment (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatDTD"/>xmlTextWriterWriteVFormatDTD ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTD (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a DTD with a formatted markup declarations part.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatDTDAttlist"/>xmlTextWriterWriteVFormatDTDAttlist ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDAttlist (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatDTDElement"/>xmlTextWriterWriteVFormatDTDElement ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatDTDInternalEntity"/>xmlTextWriterWriteVFormatDTDInternalEntity ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDInternalEntity (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> int pe, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatElement"/>xmlTextWriterWriteVFormatElement ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatElement (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml element.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatElementNS"/>xmlTextWriterWriteVFormatElementNS ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatElementNS (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatPI"/>xmlTextWriterWriteVFormatPI ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatPI (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * target, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatRaw"/>xmlTextWriterWriteVFormatRaw ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatRaw (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlTextWriterWriteVFormatString"/>xmlTextWriterWriteVFormatString ()</h3><pre class="programlisting">int xmlTextWriterWriteVFormatString (<a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br/> const char * format, <br/> va_list argptr)<br/>
+</pre><p>Write a formatted xml text.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml2-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xpath.html b/doc/devhelp/libxml2-xpath.html
new file mode 100644
index 0000000..640c715
--- /dev/null
+++ b/doc/devhelp/libxml2-xpath.html
@@ -0,0 +1,542 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xpath: XML Path Language implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xmlwriter.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xpathInternals.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xpath</span>
+ </h2>
+ <p>xpath - XML Path Language implementation</p>
+ <p>API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a>(ns);
+#define <a href="#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a>;
+#define <a href="#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a>;
+#define <a href="#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a>(ns, index);
+#define <a href="#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a>(ns);
+typedef enum <a href="#xmlXPathObjectType">xmlXPathObjectType</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathVariable">xmlXPathVariable</a> * <a href="#xmlXPathVariablePtr">xmlXPathVariablePtr</a>;
+typedef struct _xmlXPathContext <a href="#xmlXPathContext">xmlXPathContext</a>;
+typedef enum <a href="#xmlXPathError">xmlXPathError</a>;
+typedef struct _xmlXPathFunct <a href="#xmlXPathFunct">xmlXPathFunct</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathType">xmlXPathType</a> * <a href="#xmlXPathTypePtr">xmlXPathTypePtr</a>;
+typedef struct _xmlXPathType <a href="#xmlXPathType">xmlXPathType</a>;
+typedef <a href="libxml2-xpath.html#xmlNodeSet">xmlNodeSet</a> * <a href="#xmlNodeSetPtr">xmlNodeSetPtr</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathFunct">xmlXPathFunct</a> * <a href="#xmlXPathFuncPtr">xmlXPathFuncPtr</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a> * <a href="#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a>;
+typedef struct _xmlXPathObject <a href="#xmlXPathObject">xmlXPathObject</a>;
+typedef struct _xmlXPathCompExpr <a href="#xmlXPathCompExpr">xmlXPathCompExpr</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> * <a href="#xmlXPathContextPtr">xmlXPathContextPtr</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> * <a href="#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a>;
+typedef struct _xmlNodeSet <a href="#xmlNodeSet">xmlNodeSet</a>;
+typedef struct _xmlXPathVariable <a href="#xmlXPathVariable">xmlXPathVariable</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathObject">xmlXPathObject</a> * <a href="#xmlXPathObjectPtr">xmlXPathObjectPtr</a>;
+typedef struct _xmlXPathAxis <a href="#xmlXPathAxis">xmlXPathAxis</a>;
+typedef <a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * <a href="#xmlXPathAxisPtr">xmlXPathAxisPtr</a>;
+typedef struct _xmlXPathParserContext <a href="#xmlXPathParserContext">xmlXPathParserContext</a>;
+int <a href="#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
+typedef <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNodeEval">xmlXPathNodeEval</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlXPathIsNaN">xmlXPathIsNaN</a> (double val);
+int <a href="#xmlXPathContextSetCache">xmlXPathContextSetCache</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertString">xmlXPathConvertString</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+int <a href="#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+int <a href="#xmlXPathIsInf">xmlXPathIsInf</a> (double val);
+long <a href="#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+double <a href="#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a> (int val);
+double <a href="#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+double <a href="#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+typedef <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathAxisFunc">xmlXPathAxisFunc</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur);
+double <a href="#xmlXPathCastToNumber">xmlXPathCastToNumber</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+int <a href="#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a> (double val);
+typedef <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+void <a href="#xmlXPathFreeObject">xmlXPathFreeObject</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);
+int <a href="#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res);
+void <a href="#xmlXPathFreeContext">xmlXPathFreeContext</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathObjectCopy">xmlXPathObjectCopy</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+void <a href="#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEval">xmlXPathEval</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathCompiledEval">xmlXPathCompiledEval</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEvalExpression">xmlXPathEvalExpression</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+void <a href="#xmlXPathInit">xmlXPathInit</a> (void);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+typedef int <a href="#xmlXPathConvertFunc">xmlXPathConvertFunc</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type);
+typedef void <a href="#xmlXPathFunction">xmlXPathFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+int <a href="#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastToString">xmlXPathCastToString</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+typedef void <a href="#xmlXPathEvalFunc">xmlXPathEvalFunc</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a> (int val);
+int <a href="#xmlXPathSetContextNode">xmlXPathSetContextNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
+int <a href="#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a> (double val);
+void <a href="#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj);
+void <a href="#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a> (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp);
+<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPathNewContext">xmlXPathNewContext</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertNumber">xmlXPathConvertNumber</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCompile">xmlXPathCompile</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+double <a href="#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns);
+int <a href="#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="XML_XPATH_CHECKNS">Macro </a>XML_XPATH_CHECKNS</h3><pre class="programlisting">#define <a href="#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a>;
+</pre><p>check namespaces at compilation</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XML_XPATH_NOVAR">Macro </a>XML_XPATH_NOVAR</h3><pre class="programlisting">#define <a href="#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a>;
+</pre><p>forbid variables in expression</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetGetLength">Macro </a>xmlXPathNodeSetGetLength</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a>(ns);
+</pre><p>Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetIsEmpty">Macro </a>xmlXPathNodeSetIsEmpty</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a>(ns);
+</pre><p>Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetItem">Macro </a>xmlXPathNodeSetItem</h3><pre class="programlisting">#define <a href="#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a>(ns, index);
+</pre><p>Implements a functionality similar to the DOM NodeList.item(). Returns the <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> at the given @index in @ns or NULL if @index is out of range (0 to length-1)</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>index</tt></i>:</span></td><td>index of a node in the set</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSet">Structure </a>xmlNodeSet</h3><pre class="programlisting">struct _xmlNodeSet {
+ int nodeNr : number of nodes in the set
+ int nodeMax : size of the array as allocated
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes in no particular order @@ with_ns to check wether name
+} xmlNodeSet;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlNodeSetPtr">Typedef </a>xmlNodeSetPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSet">xmlNodeSet</a> * xmlNodeSetPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathAxis">Structure </a>xmlXPathAxis</h3><pre class="programlisting">struct _xmlXPathAxis {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the axis name
+ <a href="libxml2-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a> func : the search function
+} xmlXPathAxis;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathAxisPtr">Typedef </a>xmlXPathAxisPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * xmlXPathAxisPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompExpr">Structure </a>xmlXPathCompExpr</h3><pre class="programlisting">struct _xmlXPathCompExpr {
+The content of this structure is not made public by the API.
+} xmlXPathCompExpr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompExprPtr">Typedef </a>xmlXPathCompExprPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a> * xmlXPathCompExprPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathContext">Structure </a>xmlXPathContext</h3><pre class="programlisting">struct _xmlXPathContext {
+ <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc : The current document
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : The current node
+ int nb_variables_unused : unused (hash table)
+ int max_variables_unused : unused (hash table)
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> varHash : Hash table of defined variables
+ int nb_types : number of defined types
+ int max_types : max number of types
+ <a href="libxml2-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a> types : Array of defined types
+ int nb_funcs_unused : unused (hash table)
+ int max_funcs_unused : unused (hash table)
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> funcHash : Hash table of defined funcs
+ int nb_axis : number of defined axis
+ int max_axis : max number of axis
+ <a href="libxml2-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a> axis : Array of defined axis the namespace nodes of the context node
+ <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * namespaces : Array of namespaces
+ int nsNr : number of namespace in scope
+ void * user : function to free extra variables
+ int contextSize : the context size
+ int proximityPosition : the proximity position extra stuff for XPointer
+ int xptr : is this an XPointer context?
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> here : for here()
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> origin : for origin() the set of namespace declarations in scope for the expre
+ <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> nsHash : The namespaces hash table
+ <a href="libxml2-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> varLookupFunc : variable lookup func
+ void * varLookupData : variable lookup data Possibility to link in an extra item
+ void * extra : needed for XSLT The function name and URI when calling a function
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * function
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * functionURI : function lookup function and data
+ <a href="libxml2-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> funcLookupFunc : function lookup func
+ void * funcLookupData : function lookup data temporary namespace lists kept for walking the n
+ <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * tmpNsList : Array of namespaces
+ int tmpNsNr : number of namespaces in scope error reporting mechanism
+ void * userData : user specific data block
+ <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> error : the callback in case of errors
+ <a href="libxml2-xmlerror.html#xmlError">xmlError</a> lastError : the last error
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> debugNode : the source node XSLT dictionary
+ <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionary if any
+ int flags : flags to control compilation Cache for reusal of XPath objects
+ void * cache
+} xmlXPathContext;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathContextPtr">Typedef </a>xmlXPathContextPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> * xmlXPathContextPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathError">Enum </a>xmlXPathError</h3><pre class="programlisting">enum <a href="#xmlXPathError">xmlXPathError</a> {
+ <a name="XPATH_EXPRESSION_OK">XPATH_EXPRESSION_OK</a> = 0
+ <a name="XPATH_NUMBER_ERROR">XPATH_NUMBER_ERROR</a> = 1
+ <a name="XPATH_UNFINISHED_LITERAL_ERROR">XPATH_UNFINISHED_LITERAL_ERROR</a> = 2
+ <a name="XPATH_START_LITERAL_ERROR">XPATH_START_LITERAL_ERROR</a> = 3
+ <a name="XPATH_VARIABLE_REF_ERROR">XPATH_VARIABLE_REF_ERROR</a> = 4
+ <a name="XPATH_UNDEF_VARIABLE_ERROR">XPATH_UNDEF_VARIABLE_ERROR</a> = 5
+ <a name="XPATH_INVALID_PREDICATE_ERROR">XPATH_INVALID_PREDICATE_ERROR</a> = 6
+ <a name="XPATH_EXPR_ERROR">XPATH_EXPR_ERROR</a> = 7
+ <a name="XPATH_UNCLOSED_ERROR">XPATH_UNCLOSED_ERROR</a> = 8
+ <a name="XPATH_UNKNOWN_FUNC_ERROR">XPATH_UNKNOWN_FUNC_ERROR</a> = 9
+ <a name="XPATH_INVALID_OPERAND">XPATH_INVALID_OPERAND</a> = 10
+ <a name="XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a> = 11
+ <a name="XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a> = 12
+ <a name="XPATH_INVALID_CTXT_SIZE">XPATH_INVALID_CTXT_SIZE</a> = 13
+ <a name="XPATH_INVALID_CTXT_POSITION">XPATH_INVALID_CTXT_POSITION</a> = 14
+ <a name="XPATH_MEMORY_ERROR">XPATH_MEMORY_ERROR</a> = 15
+ <a name="XPTR_SYNTAX_ERROR">XPTR_SYNTAX_ERROR</a> = 16
+ <a name="XPTR_RESOURCE_ERROR">XPTR_RESOURCE_ERROR</a> = 17
+ <a name="XPTR_SUB_RESOURCE_ERROR">XPTR_SUB_RESOURCE_ERROR</a> = 18
+ <a name="XPATH_UNDEF_PREFIX_ERROR">XPATH_UNDEF_PREFIX_ERROR</a> = 19
+ <a name="XPATH_ENCODING_ERROR">XPATH_ENCODING_ERROR</a> = 20
+ <a name="XPATH_INVALID_CHAR_ERROR">XPATH_INVALID_CHAR_ERROR</a> = 21
+ <a name="XPATH_INVALID_CTXT">XPATH_INVALID_CTXT</a> = 22
+ <a name="XPATH_STACK_ERROR">XPATH_STACK_ERROR</a> = 23
+ <a name="XPATH_FORBID_VARIABLE_ERROR">XPATH_FORBID_VARIABLE_ERROR</a> = 24
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFuncPtr">Typedef </a>xmlXPathFuncPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunct">xmlXPathFunct</a> * xmlXPathFuncPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFunct">Structure </a>xmlXPathFunct</h3><pre class="programlisting">struct _xmlXPathFunct {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the function name
+ <a href="libxml2-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a> func : the evaluation function
+} xmlXPathFunct;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathObject">Structure </a>xmlXPathObject</h3><pre class="programlisting">struct _xmlXPathObject {
+ <a href="libxml2-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a> type
+ <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodesetval
+ int boolval
+ double floatval
+ <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * stringval
+ void * user
+ int index
+ void * user2
+ int index2
+} xmlXPathObject;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectPtr">Typedef </a>xmlXPathObjectPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObject">xmlXPathObject</a> * xmlXPathObjectPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectType">Enum </a>xmlXPathObjectType</h3><pre class="programlisting">enum <a href="#xmlXPathObjectType">xmlXPathObjectType</a> {
+ <a name="XPATH_UNDEFINED">XPATH_UNDEFINED</a> = 0
+ <a name="XPATH_NODESET">XPATH_NODESET</a> = 1
+ <a name="XPATH_BOOLEAN">XPATH_BOOLEAN</a> = 2
+ <a name="XPATH_NUMBER">XPATH_NUMBER</a> = 3
+ <a name="XPATH_STRING">XPATH_STRING</a> = 4
+ <a name="XPATH_POINT">XPATH_POINT</a> = 5
+ <a name="XPATH_RANGE">XPATH_RANGE</a> = 6
+ <a name="XPATH_LOCATIONSET">XPATH_LOCATIONSET</a> = 7
+ <a name="XPATH_USERS">XPATH_USERS</a> = 8
+ <a name="XPATH_XSLT_TREE">XPATH_XSLT_TREE</a> = 9 /* An XSLT value tree, non modifiable */
+};
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathParserContext">Structure </a>xmlXPathParserContext</h3><pre class="programlisting">struct _xmlXPathParserContext {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur : the current char being parsed
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : the full expression
+ int error : error code
+ <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> context : the evaluation context
+ <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the current value
+ int valueNr : number of values stacked
+ int valueMax : max number of values stacked
+ <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> * valueTab : stack of values
+ <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp : the precompiled expression
+ int xptr : it this an XPointer expression
+ <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> ancestor : used for walking preceding axis
+ int valueFrame : used to limit Pop on the stack
+} xmlXPathParserContext;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathParserContextPtr">Typedef </a>xmlXPathParserContextPtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> * xmlXPathParserContextPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathType">Structure </a>xmlXPathType</h3><pre class="programlisting">struct _xmlXPathType {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the type name
+ <a href="libxml2-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a> func : the conversion function
+} xmlXPathType;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathTypePtr">Typedef </a>xmlXPathTypePtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathType">xmlXPathType</a> * xmlXPathTypePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathVariable">Structure </a>xmlXPathVariable</h3><pre class="programlisting">struct _xmlXPathVariable {
+ const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the variable name
+ <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the value
+} xmlXPathVariable;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathVariablePtr">Typedef </a>xmlXPathVariablePtr</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathVariable">xmlXPathVariable</a> * xmlXPathVariablePtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathAxisFunc"/>Function type xmlXPathAxisFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathAxisFunc (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur)<br/>
+</pre><p>An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interpreter context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the previous node being explored on that axis</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next node in that axis or NULL if at the end of the axis.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertFunc"/>Function type xmlXPathConvertFunc</h3><pre class="programlisting">int xmlXPathConvertFunc (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type)<br/>
+</pre><p>A conversion function is associated to a type and used to cast the new type to primitive values.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the number of the target type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalFunc"/>Function type xmlXPathEvalFunc</h3><pre class="programlisting">void xmlXPathEvalFunc (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>An XPath evaluation function, the parameters are on the XPath context stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments passed to the function</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFuncLookupFunc"/>Function type xmlXPathFuncLookupFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFuncLookupFunc (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
+</pre><p>Prototype for callbacks used to plug function lookup in the XPath engine.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the function</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath function or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFunction"/>Function type xmlXPathFunction</h3><pre class="programlisting">void xmlXPathFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interprestation context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathVariableLookupFunc"/>Function type xmlXPathVariableLookupFunc</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupFunc (void * ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
+</pre><p>Prototype for callbacks used to plug variable lookup in the XPath engine.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the variable</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this variable</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object value or NULL if not found.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNAN">Variable </a>xmlXPathNAN</h3><pre class="programlisting">double xmlXPathNAN;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNINF">Variable </a>xmlXPathNINF</h3><pre class="programlisting">double xmlXPathNINF;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPINF">Variable </a>xmlXPathPINF</h3><pre class="programlisting">double xmlXPathPINF;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToNumber"/>xmlXPathCastBooleanToNumber ()</h3><pre class="programlisting">double xmlXPathCastBooleanToNumber (int val)<br/>
+</pre><p>Converts a boolean to its number value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastBooleanToString"/>xmlXPathCastBooleanToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastBooleanToString (int val)<br/>
+</pre><p>Converts a boolean to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToBoolean"/>xmlXPathCastNodeSetToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNodeSetToBoolean (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
+</pre><p>Converts a node-set to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToNumber"/>xmlXPathCastNodeSetToNumber ()</h3><pre class="programlisting">double xmlXPathCastNodeSetToNumber (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
+</pre><p>Converts a node-set to its number value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeSetToString"/>xmlXPathCastNodeSetToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeSetToString (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br/>
+</pre><p>Converts a node-set to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToNumber"/>xmlXPathCastNodeToNumber ()</h3><pre class="programlisting">double xmlXPathCastNodeToNumber (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Converts a node to its number value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNodeToString"/>xmlXPathCastNodeToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeToString (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Converts a node to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToBoolean"/>xmlXPathCastNumberToBoolean ()</h3><pre class="programlisting">int xmlXPathCastNumberToBoolean (double val)<br/>
+</pre><p>Converts a number to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastNumberToString"/>xmlXPathCastNumberToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNumberToString (double val)<br/>
+</pre><p>Converts a number to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToBoolean"/>xmlXPathCastStringToBoolean ()</h3><pre class="programlisting">int xmlXPathCastStringToBoolean (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>Converts a string to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastStringToNumber"/>xmlXPathCastStringToNumber ()</h3><pre class="programlisting">double xmlXPathCastStringToNumber (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>Converts a string to its number value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToBoolean"/>xmlXPathCastToBoolean ()</h3><pre class="programlisting">int xmlXPathCastToBoolean (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an XPath object to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToNumber"/>xmlXPathCastToNumber ()</h3><pre class="programlisting">double xmlXPathCastToNumber (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an XPath object to its number value</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCastToString"/>xmlXPathCastToString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastToString (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an existing object to its string() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCmpNodes"/>xmlXPathCmpNodes ()</h3><pre class="programlisting">int xmlXPathCmpNodes (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br/>
+</pre><p>Compare two nodes w.r.t document order</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node1</tt></i>:</span></td><td>the first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>the second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 in case of error 1 if first point &lt; second point, 0 if it's the same node, -1 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompile"/>xmlXPathCompile ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCompile (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Compile an XPath expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompiledEval"/>xmlXPathCompiledEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathCompiledEval (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Evaluate the Precompiled XPath expression in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompiledEvalToBoolean"/>xmlXPathCompiledEvalToBoolean ()</h3><pre class="programlisting">int xmlXPathCompiledEvalToBoolean (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Applies the XPath boolean() function on the result of the given compiled expression.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathContextSetCache"/>xmlXPathContextSetCache ()</h3><pre class="programlisting">int xmlXPathContextSetCache (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options)<br/>
+</pre><p>Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use &lt;0 for the default number (100). Other values for @options have currently no effect.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>active</tt></i>:</span></td><td>enables/disables (creates/frees) the cache</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value with semantics dependant on @options</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (currently only the value 0 is used)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the setting succeeded, and -1 on API or internal errors.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertBoolean"/>xmlXPathConvertBoolean ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertBoolean (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an existing object to its boolean() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertNumber"/>xmlXPathConvertNumber ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertNumber (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an existing object to its number() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathConvertString"/>xmlXPathConvertString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertString (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Converts an existing object to its string() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCtxtCompile"/>xmlXPathCtxtCompile ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCtxtCompile (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>Compile an XPath expression</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEval"/>xmlXPathEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEval (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Evaluate the XPath Location Path in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalExpression"/>xmlXPathEvalExpression ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEvalExpression (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Evaluate the XPath expression in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalPredicate"/>xmlXPathEvalPredicate ()</h3><pre class="programlisting">int xmlXPathEvalPredicate (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)<br/>
+</pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeCompExpr"/>xmlXPathFreeCompExpr ()</h3><pre class="programlisting">void xmlXPathFreeCompExpr (<a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp)<br/>
+</pre><p>Free up the memory allocated by @comp</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XPATH comp</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeContext"/>xmlXPathFreeContext ()</h3><pre class="programlisting">void xmlXPathFreeContext (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Free up an <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSet"/>xmlXPathFreeNodeSet ()</h3><pre class="programlisting">void xmlXPathFreeNodeSet (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj)<br/>
+</pre><p>Free the NodeSet compound (not the actual nodes !).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeNodeSetList"/>xmlXPathFreeNodeSetList ()</h3><pre class="programlisting">void xmlXPathFreeNodeSetList (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br/>
+</pre><p>Free up the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an existing NodeSetList object</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeObject"/>xmlXPathFreeObject ()</h3><pre class="programlisting">void xmlXPathFreeObject (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br/>
+</pre><p>Free up an <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> object.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the object to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathInit"/>xmlXPathInit ()</h3><pre class="programlisting">void xmlXPathInit (void)<br/>
+</pre><p>Initialize the XPath environment</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathIsInf"/>xmlXPathIsInf ()</h3><pre class="programlisting">int xmlXPathIsInf (double val)<br/>
+</pre><p>Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathIsNaN"/>xmlXPathIsNaN ()</h3><pre class="programlisting">int xmlXPathIsNaN (double val)<br/>
+</pre><p>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the value is a NaN, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewContext"/>xmlXPathNewContext ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPathNewContext (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeEval"/>xmlXPathNodeEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNodeEval (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetCreate"/>xmlXPathNodeSetCreate ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathObjectCopy"/>xmlXPathObjectCopy ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathObjectCopy (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>allocate a new copy of a given object</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the original object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathOrderDocElems"/>xmlXPathOrderDocElems ()</h3><pre class="programlisting">long xmlXPathOrderDocElems (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br/>
+</pre><p>Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element-&gt;content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSetContextNode"/>xmlXPathSetContextNode ()</h3><pre class="programlisting">int xmlXPathSetContextNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Sets 'node' as the context node. The node must be in the same document as that associated with the context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or 0 if successful</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xpathInternals.html b/doc/devhelp/libxml2-xpathInternals.html
new file mode 100644
index 0000000..0597343
--- /dev/null
+++ b/doc/devhelp/libxml2-xpathInternals.html
@@ -0,0 +1,787 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xpathInternals: internal interfaces for XML Path Language implementation</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xpath.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="n" href="libxml2-xpointer.html">
+ <img src="right.png" width="24" height="24" border="0" alt="Next"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xpathInternals</span>
+ </h2>
+ <p>xpathInternals - internal interfaces for XML Path Language implementation</p>
+ <p>internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT </p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">#define <a href="#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a>(ctxt);
+#define <a href="#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a>(ctxt);
+#define <a href="#XP_ERROR0">XP_ERROR0</a>(X);
+#define <a href="#xmlXPathSetTypeError">xmlXPathSetTypeError</a>(ctxt);
+#define <a href="#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a>(ctxt);
+#define <a href="#xmlXPathReturnTrue">xmlXPathReturnTrue</a>(ctxt);
+#define <a href="#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a>(ctxt, val);
+#define <a href="#xmlXPathGetContextNode">xmlXPathGetContextNode</a>(ctxt);
+#define <a href="#CAST_TO_NUMBER">CAST_TO_NUMBER</a>;
+#define <a href="#CHECK_ARITY">CHECK_ARITY</a>(x);
+#define <a href="#CHECK_TYPE0">CHECK_TYPE0</a>(typeval);
+#define <a href="#CAST_TO_STRING">CAST_TO_STRING</a>;
+#define <a href="#xmlXPathReturnExternal">xmlXPathReturnExternal</a>(ctxt, val);
+#define <a href="#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a>(ctxt);
+#define <a href="#xmlXPathCheckError">xmlXPathCheckError</a>(ctxt);
+#define <a href="#xmlXPathSetError">xmlXPathSetError</a>(ctxt, err);
+#define <a href="#CHECK_ERROR">CHECK_ERROR</a>;
+#define <a href="#xmlXPathReturnString">xmlXPathReturnString</a>(ctxt, str);
+#define <a href="#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a>;
+#define <a href="#xmlXPathSetArityError">xmlXPathSetArityError</a>(ctxt);
+#define <a href="#CHECK_TYPE">CHECK_TYPE</a>(typeval);
+#define <a href="#xmlXPathReturnFalse">xmlXPathReturnFalse</a>(ctxt);
+#define <a href="#xmlXPathReturnNumber">xmlXPathReturnNumber</a>(ctxt, val);
+#define <a href="#CHECK_ERROR0">CHECK_ERROR0</a>;
+#define <a href="#xmlXPathGetDocument">xmlXPathGetDocument</a>(ctxt);
+#define <a href="#xmlXPathGetError">xmlXPathGetError</a>(ctxt);
+#define <a href="#XP_ERROR">XP_ERROR</a>(X);
+#define <a href="#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a>(ns);
+#define <a href="#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a>(ctxt, ns);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val2);
+void <a href="#xmlXPathNumberFunction">xmlXPathNumberFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathNsLookup">xmlXPathNsLookup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> int val);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val);
+int <a href="#xmlXPathPopBoolean">xmlXPathPopBoolean</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewString">xmlXPathNewString</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextChild">xmlXPathNextChild</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathPopString">xmlXPathPopString</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+int <a href="#xmlXPathCompareValues">xmlXPathCompareValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int inf, <br/> int strict);
+void <a href="#xmlXPathConcatFunction">xmlXPathConcatFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+int <a href="#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+void <a href="#xmlXPatherror">xmlXPatherror</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> const char * file, <br/> int line, <br/> int no);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAncestor">xmlXPathNextAncestor</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathRoot">xmlXPathRoot</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+int <a href="#xmlXPathIsNodeType">xmlXPathIsNodeType</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextFollowing">xmlXPathNextFollowing</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathAddValues">xmlXPathAddValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+int <a href="#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#valuePop">valuePop</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathIntersection">xmlXPathIntersection</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+void <a href="#xmlXPathContainsFunction">xmlXPathContainsFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set);
+void <a href="#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeLeading">xmlXPathNodeLeading</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+void <a href="#xmlXPathSumFunction">xmlXPathSumFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+int <a href="#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+int <a href="#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res);
+void <a href="#xmlXPathErr">xmlXPathErr</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int error);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextPreceding">xmlXPathNextPreceding</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+void <a href="#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+void <a href="#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlXPathPositionFunction">xmlXPathPositionFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewFloat">xmlXPathNewFloat</a> (double val);
+int <a href="#xmlXPathRegisterNs">xmlXPathRegisterNs</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextParent">xmlXPathNextParent</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns);
+int <a href="#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes);
+int <a href="#valuePush">valuePush</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value);
+void <a href="#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathStringFunction">xmlXPathStringFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathFloorFunction">xmlXPathFloorFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathIdFunction">xmlXPathIdFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathLastFunction">xmlXPathLastFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextSelf">xmlXPathNextSelf</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a> (FILE * output, <br/> <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> int depth);
+void <a href="#xmlXPathFalseFunction">xmlXPathFalseFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> f, <br/> void * funcCtxt);
+double <a href="#xmlXPathPopNumber">xmlXPathPopNumber</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathRoundFunction">xmlXPathRoundFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathCountFunction">xmlXPathCountFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathParseNCName">xmlXPathParseNCName</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathTrueFunction">xmlXPathTrueFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewBoolean">xmlXPathNewBoolean</a> (int val);
+void <a href="#xmlXPathSubValues">xmlXPathSubValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+int <a href="#xmlXPathEqualValues">xmlXPathEqualValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+void <a href="#xmlXPathMultValues">xmlXPathMultValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathModValues">xmlXPathModValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> <a href="#xmlXPathNewParserContext">xmlXPathNewParserContext</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapString">xmlXPathWrapString</a> (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
+void <a href="#xmlXPathLangFunction">xmlXPathLangFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+int <a href="#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br/> <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f);
+int <a href="#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns);
+void <a href="#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDifference">xmlXPathDifference</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void * <a href="#xmlXPathPopExternal">xmlXPathPopExternal</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+void <a href="#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> f, <br/> void * data);
+void <a href="#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewCString">xmlXPathNewCString</a> (const char * val);
+int <a href="#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f);
+void <a href="#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextDescendant">xmlXPathNextDescendant</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextNamespace">xmlXPathNextNamespace</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapCString">xmlXPathWrapCString</a> (char * val);
+void <a href="#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node);
+int <a href="#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+int <a href="#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewValueTree">xmlXPathNewValueTree</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDistinct">xmlXPathDistinct</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookup">xmlXPathVariableLookup</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
+void <a href="#xmlXPathNotFunction">xmlXPathNotFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+double <a href="#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapExternal">xmlXPathWrapExternal</a> (void * val);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAttribute">xmlXPathNextAttribute</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
+void <a href="#xmlXPathDivValues">xmlXPathDivValues</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri);
+int <a href="#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a> (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathTrailing">xmlXPathTrailing</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+void <a href="#xmlXPathEvalExpr">xmlXPathEvalExpr</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+void <a href="#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a> (FILE * output, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur, <br/> int depth);
+<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathLeading">xmlXPathLeading</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2);
+<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathParseName">xmlXPathParseName</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="CAST_TO_BOOLEAN">Macro </a>CAST_TO_BOOLEAN</h3><pre class="programlisting">#define <a href="#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a>;
+</pre><p>Macro to try to cast the value on the top of the XPath stack to a boolean.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CAST_TO_NUMBER">Macro </a>CAST_TO_NUMBER</h3><pre class="programlisting">#define <a href="#CAST_TO_NUMBER">CAST_TO_NUMBER</a>;
+</pre><p>Macro to try to cast the value on the top of the XPath stack to a number.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CAST_TO_STRING">Macro </a>CAST_TO_STRING</h3><pre class="programlisting">#define <a href="#CAST_TO_STRING">CAST_TO_STRING</a>;
+</pre><p>Macro to try to cast the value on the top of the XPath stack to a string.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CHECK_ARITY">Macro </a>CHECK_ARITY</h3><pre class="programlisting">#define <a href="#CHECK_ARITY">CHECK_ARITY</a>(x);
+</pre><p>Macro to check that the number of args passed to an XPath function matches.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>the number of expected args</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CHECK_ERROR">Macro </a>CHECK_ERROR</h3><pre class="programlisting">#define <a href="#CHECK_ERROR">CHECK_ERROR</a>;
+</pre><p>Macro to return from the function if an XPath error was detected.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CHECK_ERROR0">Macro </a>CHECK_ERROR0</h3><pre class="programlisting">#define <a href="#CHECK_ERROR0">CHECK_ERROR0</a>;
+</pre><p>Macro to return 0 from the function if an XPath error was detected.</p>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CHECK_TYPE">Macro </a>CHECK_TYPE</h3><pre class="programlisting">#define <a href="#CHECK_TYPE">CHECK_TYPE</a>(typeval);
+</pre><p>Macro to check that the value on top of the XPath stack is of a given type.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>typeval</tt></i>:</span></td><td>the XPath type</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="CHECK_TYPE0">Macro </a>CHECK_TYPE0</h3><pre class="programlisting">#define <a href="#CHECK_TYPE0">CHECK_TYPE0</a>(typeval);
+</pre><p>Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>typeval</tt></i>:</span></td><td>the XPath type</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XP_ERROR">Macro </a>XP_ERROR</h3><pre class="programlisting">#define <a href="#XP_ERROR">XP_ERROR</a>(X);
+</pre><p>Macro to raise an XPath error and return.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>X</tt></i>:</span></td><td>the error code</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="XP_ERROR0">Macro </a>XP_ERROR0</h3><pre class="programlisting">#define <a href="#XP_ERROR0">XP_ERROR0</a>(X);
+</pre><p>Macro to raise an XPath error and return 0.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>X</tt></i>:</span></td><td>the error code</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCheckError">Macro </a>xmlXPathCheckError</h3><pre class="programlisting">#define <a href="#xmlXPathCheckError">xmlXPathCheckError</a>(ctxt);
+</pre><p>Check if an XPath error was raised. Returns true if an error has been raised, false otherwise.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEmptyNodeSet">Macro </a>xmlXPathEmptyNodeSet</h3><pre class="programlisting">#define <a href="#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a>(ns);
+</pre><p>Empties a node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathGetContextNode">Macro </a>xmlXPathGetContextNode</h3><pre class="programlisting">#define <a href="#xmlXPathGetContextNode">xmlXPathGetContextNode</a>(ctxt);
+</pre><p>Get the context node of an XPath context. Returns the context node.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathGetDocument">Macro </a>xmlXPathGetDocument</h3><pre class="programlisting">#define <a href="#xmlXPathGetDocument">xmlXPathGetDocument</a>(ctxt);
+</pre><p>Get the document of an XPath context. Returns the context document.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathGetError">Macro </a>xmlXPathGetError</h3><pre class="programlisting">#define <a href="#xmlXPathGetError">xmlXPathGetError</a>(ctxt);
+</pre><p>Get the error code of an XPath context. Returns the context error.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnBoolean">Macro </a>xmlXPathReturnBoolean</h3><pre class="programlisting">#define <a href="#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a>(ctxt, val);
+</pre><p>Pushes the boolean @val on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnEmptyNodeSet">Macro </a>xmlXPathReturnEmptyNodeSet</h3><pre class="programlisting">#define <a href="#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a>(ctxt);
+</pre><p>Pushes an empty node-set on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnEmptyString">Macro </a>xmlXPathReturnEmptyString</h3><pre class="programlisting">#define <a href="#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a>(ctxt);
+</pre><p>Pushes an empty string on the stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnExternal">Macro </a>xmlXPathReturnExternal</h3><pre class="programlisting">#define <a href="#xmlXPathReturnExternal">xmlXPathReturnExternal</a>(ctxt, val);
+</pre><p>Pushes user data on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>user data</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnFalse">Macro </a>xmlXPathReturnFalse</h3><pre class="programlisting">#define <a href="#xmlXPathReturnFalse">xmlXPathReturnFalse</a>(ctxt);
+</pre><p>Pushes false on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnNodeSet">Macro </a>xmlXPathReturnNodeSet</h3><pre class="programlisting">#define <a href="#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a>(ctxt, ns);
+</pre><p>Pushes the node-set @ns on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnNumber">Macro </a>xmlXPathReturnNumber</h3><pre class="programlisting">#define <a href="#xmlXPathReturnNumber">xmlXPathReturnNumber</a>(ctxt, val);
+</pre><p>Pushes the double @val on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnString">Macro </a>xmlXPathReturnString</h3><pre class="programlisting">#define <a href="#xmlXPathReturnString">xmlXPathReturnString</a>(ctxt, str);
+</pre><p>Pushes the string @str on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a string</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathReturnTrue">Macro </a>xmlXPathReturnTrue</h3><pre class="programlisting">#define <a href="#xmlXPathReturnTrue">xmlXPathReturnTrue</a>(ctxt);
+</pre><p>Pushes true on the context stack.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSetArityError">Macro </a>xmlXPathSetArityError</h3><pre class="programlisting">#define <a href="#xmlXPathSetArityError">xmlXPathSetArityError</a>(ctxt);
+</pre><p>Raises an <a href="libxml2-xpath.html#XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a> error.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSetError">Macro </a>xmlXPathSetError</h3><pre class="programlisting">#define <a href="#xmlXPathSetError">xmlXPathSetError</a>(ctxt, err);
+</pre><p>Raises an error.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>an <a href="libxml2-xpath.html#xmlXPathError">xmlXPathError</a> code</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSetTypeError">Macro </a>xmlXPathSetTypeError</h3><pre class="programlisting">#define <a href="#xmlXPathSetTypeError">xmlXPathSetTypeError</a>(ctxt);
+</pre><p>Raises an <a href="libxml2-xpath.html#XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a> error.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStackIsExternal">Macro </a>xmlXPathStackIsExternal</h3><pre class="programlisting">#define <a href="#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a>(ctxt);
+</pre><p>Checks if the current value on the XPath stack is an external object. Returns true if the current object on the stack is an external object.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStackIsNodeSet">Macro </a>xmlXPathStackIsNodeSet</h3><pre class="programlisting">#define <a href="#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a>(ctxt);
+</pre><p>Check if the current value on the XPath stack is a node set or an XSLT value tree. Returns true if the current object on the stack is a node-set.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr></tbody></table></div>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="valuePop"/>valuePop ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> valuePop (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops the top XPath object from the value stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath evaluation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object just removed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="valuePush"/>valuePush ()</h3><pre class="programlisting">int valuePush (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br/>
+</pre><p>Pushes a new XPath object on top of the value stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath evaluation context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of items on the value stack</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathAddValues"/>xmlXPathAddValues ()</h3><pre class="programlisting">void xmlXPathAddValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathBooleanFunction"/>xmlXPathBooleanFunction ()</h3><pre class="programlisting">void xmlXPathBooleanFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the boolean() XPath function boolean boolean(object) The boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCeilingFunction"/>xmlXPathCeilingFunction ()</h3><pre class="programlisting">void xmlXPathCeilingFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCompareValues"/>xmlXPathCompareValues ()</h3><pre class="programlisting">int xmlXPathCompareValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int inf, <br/> int strict)<br/>
+</pre><p>Implement the compare operation on XPath objects: @arg1 &lt; @arg2 (1, 1, ... @arg1 &lt;= @arg2 (1, 0, ... @arg1 &gt; @arg2 (0, 1, ... @arg1 &gt;= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is &lt;=, &lt;, &gt;=, &gt;, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The &lt; comparison will be true if and only if the first number is less than the second number. The &lt;= comparison will be true if and only if the first number is less than or equal to the second number. The &gt; comparison will be true if and only if the first number is greater than the second number. The &gt;= comparison will be true if and only if the first number is greater than or equal to the second number.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>inf</tt></i>:</span></td><td>less than (1) or greater than (0)</td></tr><tr><td><span class="term"><i><tt>strict</tt></i>:</span></td><td>is the comparison strict</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the comparison succeeded, 0 if it failed</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathConcatFunction"/>xmlXPathConcatFunction ()</h3><pre class="programlisting">void xmlXPathConcatFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathContainsFunction"/>xmlXPathContainsFunction ()</h3><pre class="programlisting">void xmlXPathContainsFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathCountFunction"/>xmlXPathCountFunction ()</h3><pre class="programlisting">void xmlXPathCountFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the count() XPath function number count(node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDebugDumpCompExpr"/>xmlXPathDebugDumpCompExpr ()</h3><pre class="programlisting">void xmlXPathDebugDumpCompExpr (FILE * output, <br/> <a href="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br/> int depth)<br/>
+</pre><p>Dumps the tree of the compiled XPath expression.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled XPath expression</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDebugDumpObject"/>xmlXPathDebugDumpObject ()</h3><pre class="programlisting">void xmlXPathDebugDumpObject (FILE * output, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur, <br/> int depth)<br/>
+</pre><p>Dump the content of the object for debugging purposes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * to dump the output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the object to inspect</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>indentation level</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDifference"/>xmlXPathDifference ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDifference (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the difference between the two node sets, or nodes1 if nodes2 is empty</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDistinct"/>xmlXPathDistinct ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDistinct (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)<br/>
+</pre><p>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a subset of the nodes contained in @nodes, or @nodes if it is empty</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDistinctSorted"/>xmlXPathDistinctSorted ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDistinctSorted (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)<br/>
+</pre><p>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a subset of the nodes contained in @nodes, or @nodes if it is empty</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathDivValues"/>xmlXPathDivValues ()</h3><pre class="programlisting">void xmlXPathDivValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the div operation on XPath objects @arg1 / @arg2: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEqualValues"/>xmlXPathEqualValues ()</h3><pre class="programlisting">int xmlXPathEqualValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the equal operation on XPath objects content: @arg1 == @arg2</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the results of the test.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathErr"/>xmlXPathErr ()</h3><pre class="programlisting">void xmlXPathErr (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int error)<br/>
+</pre><p>Handle an XPath error</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XPath parser context</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error code</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEvalExpr"/>xmlXPathEvalExpr ()</h3><pre class="programlisting">void xmlXPathEvalExpr (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Parse and evaluate an XPath expression in the given context, then push the result on the context stack</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathEvaluatePredicateResult"/>xmlXPathEvaluatePredicateResult ()</h3><pre class="programlisting">int xmlXPathEvaluatePredicateResult (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)<br/>
+</pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFalseFunction"/>xmlXPathFalseFunction ()</h3><pre class="programlisting">void xmlXPathFalseFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the false() XPath function boolean false()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFloorFunction"/>xmlXPathFloorFunction ()</h3><pre class="programlisting">void xmlXPathFloorFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFreeParserContext"/>xmlXPathFreeParserContext ()</h3><pre class="programlisting">void xmlXPathFreeParserContext (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Free up an <a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFunctionLookup"/>xmlXPathFunctionLookup ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFunctionLookup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search in the Function array of the context for the given function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathFunctionLookupNS"/>xmlXPathFunctionLookupNS ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFunctionLookupNS (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
+</pre><p>Search in the Function array of the context for the given function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the function namespace URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathHasSameNodes"/>xmlXPathHasSameNodes ()</h3><pre class="programlisting">int xmlXPathHasSameNodes (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true (1) if @nodes1 shares any node with @nodes2, false (0) otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathIdFunction"/>xmlXPathIdFunction ()</h3><pre class="programlisting">void xmlXPathIdFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of <a href="libxml2-SAX.html#characters">characters</a> matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathIntersection"/>xmlXPathIntersection ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathIntersection (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node set comprising the nodes that are within both the node sets passed as arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathIsNodeType"/>xmlXPathIsNodeType ()</h3><pre class="programlisting">int xmlXPathIsNodeType (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Is the name given a NodeType one. [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>a name string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathLangFunction"/>xmlXPathLangFunction ()</h3><pre class="programlisting">void xmlXPathLangFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a> on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a> on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathLastFunction"/>xmlXPathLastFunction ()</h3><pre class="programlisting">void xmlXPathLastFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the last() XPath function number last() The last function returns the number of nodes in the context node list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathLeading"/>xmlXPathLeading ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathLeading (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathLeadingSorted"/>xmlXPathLeadingSorted ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathLeadingSorted (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathLocalNameFunction"/>xmlXPathLocalNameFunction ()</h3><pre class="programlisting">void xmlXPathLocalNameFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathModValues"/>xmlXPathModValues ()</h3><pre class="programlisting">void xmlXPathModValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the mod operation on XPath objects: @arg1 / @arg2 The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathMultValues"/>xmlXPathMultValues ()</h3><pre class="programlisting">void xmlXPathMultValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNamespaceURIFunction"/>xmlXPathNamespaceURIFunction ()</h3><pre class="programlisting">void xmlXPathNamespaceURIFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewBoolean"/>xmlXPathNewBoolean ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewBoolean (int val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type boolean and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the boolean value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewCString"/>xmlXPathNewCString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewCString (const char * val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type string and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewFloat"/>xmlXPathNewFloat ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewFloat (double val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewNodeSet"/>xmlXPathNewNodeSet ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewNodeSet (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type NodeSet and initialize it with the single Node @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewNodeSetList"/>xmlXPathNewNodeSetList ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewNodeSetList (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type NodeSet and initialize it with the Nodeset @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an existing NodeSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewParserContext"/>xmlXPathNewParserContext ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> xmlXPathNewParserContext (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> just allocated.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewString"/>xmlXPathNewString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewString (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type string and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNewValueTree"/>xmlXPathNewValueTree ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewValueTree (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type Value Tree (XSLT) and initialize it with the tree root @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextAncestor"/>xmlXPathNextAncestor ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAncestor (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextAncestorOrSelf"/>xmlXPathNextAncestorOrSelf ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAncestorOrSelf (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextAttribute"/>xmlXPathNextAttribute ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAttribute (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "attribute" direction TODO: support DTD inherited default attributes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current <a href="libxml2-SAX.html#attribute">attribute</a> in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextChild"/>xmlXPathNextChild ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextChild (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "child" direction The child axis contains the children of the context node in document order.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextDescendant"/>xmlXPathNextDescendant ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextDescendant (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextDescendantOrSelf"/>xmlXPathNextDescendantOrSelf ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextDescendantOrSelf (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextFollowing"/>xmlXPathNextFollowing ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextFollowing (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding <a href="libxml2-SAX.html#attribute">attribute</a> nodes and namespace nodes; the nodes are ordered in document order</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextFollowingSibling"/>xmlXPathNextFollowingSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextFollowingSibling (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextNamespace"/>xmlXPathNextNamespace ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextNamespace (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current <a href="libxml2-SAX.html#attribute">attribute</a> in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextParent"/>xmlXPathNextParent ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextParent (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextPreceding"/>xmlXPathNextPreceding ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextPreceding (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding <a href="libxml2-SAX.html#attribute">attribute</a> nodes and namespace nodes; the nodes are ordered in reverse document order</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextPrecedingSibling"/>xmlXPathNextPrecedingSibling ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextPrecedingSibling (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNextSelf"/>xmlXPathNextSelf ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextSelf (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br/>
+</pre><p>Traversal function for the "self" direction The self axis contains just the context node itself</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeLeading"/>xmlXPathNodeLeading ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeLeading (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeLeadingSorted"/>xmlXPathNodeLeadingSorted ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeLeadingSorted (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetAdd"/>xmlXPathNodeSetAdd ()</h3><pre class="programlisting">int xmlXPathNodeSetAdd (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>add a new <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> to an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetAddNs"/>xmlXPathNodeSetAddNs ()</h3><pre class="programlisting">int xmlXPathNodeSetAddNs (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br/>
+</pre><p>add a new namespace node to an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the hosting node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a the namespace node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetAddUnique"/>xmlXPathNodeSetAddUnique ()</h3><pre class="programlisting">int xmlXPathNodeSetAddUnique (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>add a new <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> to an existing NodeSet, optimized version when we are sure the node is not already in the set.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetContains"/>xmlXPathNodeSetContains ()</h3><pre class="programlisting">int xmlXPathNodeSetContains (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>checks whether @cur contains @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node-set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true (1) if @cur contains @val, false (0) otherwise</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetDel"/>xmlXPathNodeSetDel ()</h3><pre class="programlisting">void xmlXPathNodeSetDel (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br/>
+</pre><p>Removes an <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> from an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetFreeNs"/>xmlXPathNodeSetFreeNs ()</h3><pre class="programlisting">void xmlXPathNodeSetFreeNs (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br/>
+</pre><p>Namespace nodes in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the XPath namespace node found in a nodeset.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetMerge"/>xmlXPathNodeSetMerge ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetMerge (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val2)<br/>
+</pre><p>Merges two nodesets, all nodes from @val2 are added to @val1 if @val1 is NULL, a new set is created and copied from @val2</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val1</tt></i>:</span></td><td>the first NodeSet or NULL</td></tr><tr><td><span class="term"><i><tt>val2</tt></i>:</span></td><td>the second NodeSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>@val1 once extended or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetRemove"/>xmlXPathNodeSetRemove ()</h3><pre class="programlisting">void xmlXPathNodeSetRemove (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br/> int val)<br/>
+</pre><p>Removes an entry from an existing NodeSet list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the index to remove</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeSetSort"/>xmlXPathNodeSetSort ()</h3><pre class="programlisting">void xmlXPathNodeSetSort (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)<br/>
+</pre><p>Sort the node set in document order</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>set</tt></i>:</span></td><td>the node set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeTrailing"/>xmlXPathNodeTrailing ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeTrailing (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNodeTrailingSorted"/>xmlXPathNodeTrailingSorted ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeTrailingSorted (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNormalizeFunction"/>xmlXPathNormalizeFunction ()</h3><pre class="programlisting">void xmlXPathNormalizeFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace <a href="libxml2-SAX.html#characters">characters</a> by a single space. Whitespace <a href="libxml2-SAX.html#characters">characters</a> are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNotEqualValues"/>xmlXPathNotEqualValues ()</h3><pre class="programlisting">int xmlXPathNotEqualValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the equal operation on XPath objects content: @arg1 == @arg2</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the results of the test.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNotFunction"/>xmlXPathNotFunction ()</h3><pre class="programlisting">void xmlXPathNotFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNsLookup"/>xmlXPathNsLookup ()</h3><pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathNsLookup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br/>
+</pre><p>Search in the namespace declaration array of the context for the given namespace name associated to the given prefix</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathNumberFunction"/>xmlXPathNumberFunction ()</h3><pre class="programlisting">void xmlXPathNumberFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the number() XPath function number number(object?)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathParseNCName"/>xmlXPathParseNCName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathParseNCName (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathParseName"/>xmlXPathParseName ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathParseName (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>parse an XML name [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)*</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPopBoolean"/>xmlXPathPopBoolean ()</h3><pre class="programlisting">int xmlXPathPopBoolean (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPopExternal"/>xmlXPathPopExternal ()</h3><pre class="programlisting">void * xmlXPathPopExternal (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops an external object from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the object</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPopNodeSet"/>xmlXPathPopNodeSet ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathPopNodeSet (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node-set</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPopNumber"/>xmlXPathPopNumber ()</h3><pre class="programlisting">double xmlXPathPopNumber (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPopString"/>xmlXPathPopString ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathPopString (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Pops a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathPositionFunction"/>xmlXPathPositionFunction ()</h3><pre class="programlisting">void xmlXPathPositionFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last position will be equal to last().</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterAllFunctions"/>xmlXPathRegisterAllFunctions ()</h3><pre class="programlisting">void xmlXPathRegisterAllFunctions (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Registers all default XPath functions in this context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterFunc"/>xmlXPathRegisterFunc ()</h3><pre class="programlisting">int xmlXPathRegisterFunc (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)<br/>
+</pre><p>Register a new function. If @f is NULL it unregisters the function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the function implementation or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterFuncLookup"/>xmlXPathRegisterFuncLookup ()</h3><pre class="programlisting">void xmlXPathRegisterFuncLookup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> f, <br/> void * funcCtxt)<br/>
+</pre><p>Registers an external mechanism to do function lookup.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the lookup function</td></tr><tr><td><span class="term"><i><tt>funcCtxt</tt></i>:</span></td><td>the lookup data</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterFuncNS"/>xmlXPathRegisterFuncNS ()</h3><pre class="programlisting">int xmlXPathRegisterFuncNS (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br/> <a href="libxml2-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)<br/>
+</pre><p>Register a new function. If @f is NULL it unregisters the function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the function namespace URI</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the function implementation or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterNs"/>xmlXPathRegisterNs ()</h3><pre class="programlisting">int xmlXPathRegisterNs (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
+</pre><p>Register a new namespace. If @ns_uri is NULL it unregisters the namespace</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix cannot be NULL or empty string</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterVariable"/>xmlXPathRegisterVariable ()</h3><pre class="programlisting">int xmlXPathRegisterVariable (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br/>
+</pre><p>Register a new variable value. If @value is NULL it unregisters the variable</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the variable value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterVariableLookup"/>xmlXPathRegisterVariableLookup ()</h3><pre class="programlisting">void xmlXPathRegisterVariableLookup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> <a href="libxml2-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> f, <br/> void * data)<br/>
+</pre><p>register an external mechanism to do variable lookup</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the lookup function</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the lookup data</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisterVariableNS"/>xmlXPathRegisterVariableNS ()</h3><pre class="programlisting">int xmlXPathRegisterVariableNS (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br/>
+</pre><p>Register a new variable value. If @value is NULL it unregisters the variable</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the variable namespace URI</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the variable value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisteredFuncsCleanup"/>xmlXPathRegisteredFuncsCleanup ()</h3><pre class="programlisting">void xmlXPathRegisteredFuncsCleanup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Cleanup the XPath context data associated to registered functions</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisteredNsCleanup"/>xmlXPathRegisteredNsCleanup ()</h3><pre class="programlisting">void xmlXPathRegisteredNsCleanup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Cleanup the XPath context data associated to registered variables</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRegisteredVariablesCleanup"/>xmlXPathRegisteredVariablesCleanup ()</h3><pre class="programlisting">void xmlXPathRegisteredVariablesCleanup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br/>
+</pre><p>Cleanup the XPath context data associated to registered variables</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRoot"/>xmlXPathRoot ()</h3><pre class="programlisting">void xmlXPathRoot (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Initialize the context to the root of the document</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathRoundFunction"/>xmlXPathRoundFunction ()</h3><pre class="programlisting">void xmlXPathRoundFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is even is returned.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStartsWithFunction"/>xmlXPathStartsWithFunction ()</h3><pre class="programlisting">void xmlXPathStartsWithFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStringEvalNumber"/>xmlXPathStringEvalNumber ()</h3><pre class="programlisting">double xmlXPathStringEvalNumber (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br/>
+</pre><p>[30a] Float ::= Number ('e' Digits?)? [30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>A string to scan</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the double value.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStringFunction"/>xmlXPathStringFunction ()</h3><pre class="programlisting">void xmlXPathStringFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the string() XPath function string string(object?) The string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathStringLengthFunction"/>xmlXPathStringLengthFunction ()</h3><pre class="programlisting">void xmlXPathStringLengthFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the string-length() XPath function number string-length(string?) The string-length returns the number of <a href="libxml2-SAX.html#characters">characters</a> in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSubValues"/>xmlXPathSubValues ()</h3><pre class="programlisting">void xmlXPathSubValues (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSubstringAfterFunction"/>xmlXPathSubstringAfterFunction ()</h3><pre class="programlisting">void xmlXPathSubstringAfterFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSubstringBeforeFunction"/>xmlXPathSubstringBeforeFunction ()</h3><pre class="programlisting">void xmlXPathSubstringBeforeFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before("1999/04/01","/") returns 1999.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSubstringFunction"/>xmlXPathSubstringFunction ()</h3><pre class="programlisting">void xmlXPathSubstringFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those <a href="libxml2-SAX.html#characters">characters</a> for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns ""</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathSumFunction"/>xmlXPathSumFunction ()</h3><pre class="programlisting">void xmlXPathSumFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathTrailing"/>xmlXPathTrailing ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathTrailing (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathTrailingSorted"/>xmlXPathTrailingSorted ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathTrailingSorted (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br/> <a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br/>
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathTranslateFunction"/>xmlXPathTranslateFunction ()</h3><pre class="programlisting">void xmlXPathTranslateFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of <a href="libxml2-SAX.html#characters">characters</a> in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate("--aaa--","abc-","ABC")</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathTrueFunction"/>xmlXPathTrueFunction ()</h3><pre class="programlisting">void xmlXPathTrueFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the true() XPath function boolean true()</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathValueFlipSign"/>xmlXPathValueFlipSign ()</h3><pre class="programlisting">void xmlXPathValueFlipSign (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathVariableLookup"/>xmlXPathVariableLookup ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookup (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>
+</pre><p>Search in the Variable array of the context for the given variable value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the value or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathVariableLookupNS"/>xmlXPathVariableLookupNS ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupNS (<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br/>
+</pre><p>Search in the Variable array of the context for the given variable value.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the variable namespace URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a copy of the value or NULL if not found</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathWrapCString"/>xmlXPathWrapCString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapCString (char * val)<br/>
+</pre><p>Wraps a string into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathWrapExternal"/>xmlXPathWrapExternal ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapExternal (void * val)<br/>
+</pre><p>Wraps the @val data into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the user data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathWrapNodeSet"/>xmlXPathWrapNodeSet ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapNodeSet (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)<br/>
+</pre><p>Wrap the Nodeset @val in a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPathWrapString"/>xmlXPathWrapString ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapString (<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br/>
+</pre><p>Wraps the @val string into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPatherror"/>xmlXPatherror ()</h3><pre class="programlisting">void xmlXPatherror (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> const char * file, <br/> int line, <br/> int no)<br/>
+</pre><p>Formats an error message.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the error number</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2-xpointer.html b/doc/devhelp/libxml2-xpointer.html
new file mode 100644
index 0000000..807eed7
--- /dev/null
+++ b/doc/devhelp/libxml2-xpointer.html
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>xpointer: API to handle XML Pointers</title>
+ <meta name="generator" content="Libxml2 devhelp stylesheet"/>
+ <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
+ <link rel="up" href="general.html" title="API"/>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="chapter" href="general.html" title="API"/>
+ </head>
+ <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+ <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <td>
+ <a accesskey="p" href="libxml2-xpathInternals.html">
+ <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="u" href="general.html">
+ <img src="up.png" width="24" height="24" border="0" alt="Up"/>
+ </a>
+ </td>
+ <td>
+ <a accesskey="h" href="index.html">
+ <img src="home.png" width="24" height="24" border="0" alt="Home"/>
+ </a>
+ </td>
+ <th width="100%" align="center">libxml2 Reference Manual</th>
+ </tr>
+ </table>
+ <h2>
+ <span class="refentrytitle">xpointer</span>
+ </h2>
+ <p>xpointer - API to handle XML Pointers</p>
+ <p>API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000</p>
+ <p>Author(s): Daniel Veillard </p>
+ <div class="refsynopsisdiv">
+ <h2>Synopsis</h2>
+ <pre class="synopsis">typedef struct _xmlLocationSet <a href="#xmlLocationSet">xmlLocationSet</a>;
+typedef <a href="libxml2-xpointer.html#xmlLocationSet">xmlLocationSet</a> * <a href="#xmlLocationSetPtr">xmlLocationSetPtr</a>;
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRange">xmlXPtrNewRange</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> int startindex, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end, <br/> int endindex);
+void <a href="#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> obj);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val);
+<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrEval">xmlXPtrEval</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end);
+void <a href="#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+void <a href="#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a> (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end);
+<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> <a href="#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a> (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end);
+<a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPtrNewContext">xmlXPtrNewContext</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> here, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> origin);
+void <a href="#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> int val);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end);
+void <a href="#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val);
+<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> <a href="#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a> (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val1, <br/> <a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val2);
+void <a href="#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a> (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt);
+<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end);
+</pre>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Description</h2>
+ </div>
+ <div class="refsect1" lang="en">
+ <h2>Details</h2>
+ <div class="refsect2" lang="en">
+ <div class="refsect2" lang="en"><h3><a name="xmlLocationSet">Structure </a>xmlLocationSet</h3><pre class="programlisting">struct _xmlLocationSet {
+ int locNr : number of locations in the set
+ int locMax : size of the array as allocated
+ <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> * locTab : array of locations
+} xmlLocationSet;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlLocationSetPtr">Typedef </a>xmlLocationSetPtr</h3><pre class="programlisting"><a href="libxml2-xpointer.html#xmlLocationSet">xmlLocationSet</a> * xmlLocationSetPtr;
+</pre><p/>
+</div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrBuildNodeList"/>xmlXPtrBuildNodeList ()</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPtrBuildNodeList (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br/>
+</pre><p>Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the XPointer result from the evaluation.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list or NULL. the caller has to free the node tree.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrEval"/>xmlXPtrEval ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrEval (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br/> <a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br/>
+</pre><p>Evaluate the XPath Location Path in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPointer expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPointer context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrEvalRangePredicate"/>xmlXPtrEvalRangePredicate ()</h3><pre class="programlisting">void xmlXPtrEvalRangePredicate (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br/>
+</pre><p>[8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPointer Parser context</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrFreeLocationSet"/>xmlXPtrFreeLocationSet ()</h3><pre class="programlisting">void xmlXPtrFreeLocationSet (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> obj)<br/>
+</pre><p>Free the LocationSet compound (not the actual ranges !).</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the <a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> to free</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrLocationSetAdd"/>xmlXPtrLocationSetAdd ()</h3><pre class="programlisting">void xmlXPtrLocationSetAdd (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>add a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> to an existing LocationSet If the location already exist in the set @val is freed.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrLocationSetCreate"/>xmlXPtrLocationSetCreate ()</h3><pre class="programlisting"><a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> xmlXPtrLocationSetCreate (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Create a new <a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlXPathObjectPtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrLocationSetDel"/>xmlXPtrLocationSetDel ()</h3><pre class="programlisting">void xmlXPtrLocationSetDel (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br/>
+</pre><p>Removes an <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from an existing LocationSet</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrLocationSetMerge"/>xmlXPtrLocationSetMerge ()</h3><pre class="programlisting"><a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> xmlXPtrLocationSetMerge (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val1, <br/> <a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val2)<br/>
+</pre><p>Merges two rangesets, all ranges from @val2 are added to @val1</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val1</tt></i>:</span></td><td>the first LocationSet</td></tr><tr><td><span class="term"><i><tt>val2</tt></i>:</span></td><td>the second LocationSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>val1 once extended or NULL in case of error.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrLocationSetRemove"/>xmlXPtrLocationSetRemove ()</h3><pre class="programlisting">void xmlXPtrLocationSetRemove (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br/> int val)<br/>
+</pre><p>Removes an entry from an existing LocationSet list.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the index to remove</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewCollapsedRange"/>xmlXPtrNewCollapsedRange ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewCollapsedRange (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using a single nodes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting and ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewContext"/>xmlXPtrNewContext ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPtrNewContext (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> here, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> origin)<br/>
+</pre><p>Create a new XPointer context</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>here</tt></i>:</span></td><td>the node that directly contains the XPointer being evaluated or NULL</td></tr><tr><td><span class="term"><i><tt>origin</tt></i>:</span></td><td>the element from which a user or program initiated traversal of the link, or NULL.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewLocationSetNodeSet"/>xmlXPtrNewLocationSetNodeSet ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewLocationSetNodeSet (<a href="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type LocationSet and initialize it with all the nodes from @set</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>set</tt></i>:</span></td><td>a node set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewLocationSetNodes"/>xmlXPtrNewLocationSetNodes ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewLocationSetNodes (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type LocationSet and initialize it with the single range made of the two nodes @start and @end</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the start NodePtr value</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the end NodePtr value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRange"/>xmlXPtrNewRange ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRange (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> int startindex, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end, <br/> int endindex)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>startindex</tt></i>:</span></td><td>the start index</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>endindex</tt></i>:</span></td><td>the ending index</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRangeNodeObject"/>xmlXPtrNewRangeNodeObject ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodeObject (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a not to an object</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRangeNodePoint"/>xmlXPtrNewRangeNodePoint ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodePoint (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a node to a point</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRangeNodes"/>xmlXPtrNewRangeNodes ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodes (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using 2 nodes</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRangePointNode"/>xmlXPtrNewRangePointNode ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangePointNode (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a point to a node</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting point</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrNewRangePoints"/>xmlXPtrNewRangePoints ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangePoints (<a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br/> <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br/>
+</pre><p>Create a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using 2 Points</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting point</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrRangeToFunction"/>xmlXPtrRangeToFunction ()</h3><pre class="programlisting">void xmlXPtrRangeToFunction (<a href="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
+</pre><p>Implement the range-to() XPointer function</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPointer Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of args</td></tr></tbody></table></div></div>
+ <hr/>
+ <div class="refsect2" lang="en"><h3><a name="xmlXPtrWrapLocationSet"/>xmlXPtrWrapLocationSet ()</h3><pre class="programlisting"><a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrWrapLocationSet (<a href="libxml2-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val)<br/>
+</pre><p>Wrap the LocationSet @val in a new <a href="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the LocationSet value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
+ <hr/>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp
new file mode 100644
index 0000000..282546a
--- /dev/null
+++ b/doc/devhelp/libxml2.devhelp
@@ -0,0 +1,3573 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<book xmlns="http://www.devhelp.net/book" title="libxml2 Reference Manual" link="index.html" author="" name="libxml2">
+ <chapters>
+ <sub name="API" link="general.html">
+ <sub name="DOCBparser" link="libxml2-DOCBparser.html"/>
+ <sub name="HTMLparser" link="libxml2-HTMLparser.html"/>
+ <sub name="HTMLtree" link="libxml2-HTMLtree.html"/>
+ <sub name="SAX" link="libxml2-SAX.html"/>
+ <sub name="SAX2" link="libxml2-SAX2.html"/>
+ <sub name="c14n" link="libxml2-c14n.html"/>
+ <sub name="catalog" link="libxml2-catalog.html"/>
+ <sub name="chvalid" link="libxml2-chvalid.html"/>
+ <sub name="debugXML" link="libxml2-debugXML.html"/>
+ <sub name="dict" link="libxml2-dict.html"/>
+ <sub name="encoding" link="libxml2-encoding.html"/>
+ <sub name="entities" link="libxml2-entities.html"/>
+ <sub name="globals" link="libxml2-globals.html"/>
+ <sub name="hash" link="libxml2-hash.html"/>
+ <sub name="list" link="libxml2-list.html"/>
+ <sub name="nanoftp" link="libxml2-nanoftp.html"/>
+ <sub name="nanohttp" link="libxml2-nanohttp.html"/>
+ <sub name="parser" link="libxml2-parser.html"/>
+ <sub name="parserInternals" link="libxml2-parserInternals.html"/>
+ <sub name="pattern" link="libxml2-pattern.html"/>
+ <sub name="relaxng" link="libxml2-relaxng.html"/>
+ <sub name="schemasInternals" link="libxml2-schemasInternals.html"/>
+ <sub name="schematron" link="libxml2-schematron.html"/>
+ <sub name="threads" link="libxml2-threads.html"/>
+ <sub name="tree" link="libxml2-tree.html"/>
+ <sub name="uri" link="libxml2-uri.html"/>
+ <sub name="valid" link="libxml2-valid.html"/>
+ <sub name="xinclude" link="libxml2-xinclude.html"/>
+ <sub name="xlink" link="libxml2-xlink.html"/>
+ <sub name="xmlIO" link="libxml2-xmlIO.html"/>
+ <sub name="xmlautomata" link="libxml2-xmlautomata.html"/>
+ <sub name="xmlerror" link="libxml2-xmlerror.html"/>
+ <sub name="xmlexports" link="libxml2-xmlexports.html"/>
+ <sub name="xmlmemory" link="libxml2-xmlmemory.html"/>
+ <sub name="xmlmodule" link="libxml2-xmlmodule.html"/>
+ <sub name="xmlreader" link="libxml2-xmlreader.html"/>
+ <sub name="xmlregexp" link="libxml2-xmlregexp.html"/>
+ <sub name="xmlsave" link="libxml2-xmlsave.html"/>
+ <sub name="xmlschemas" link="libxml2-xmlschemas.html"/>
+ <sub name="xmlschemastypes" link="libxml2-xmlschemastypes.html"/>
+ <sub name="xmlstring" link="libxml2-xmlstring.html"/>
+ <sub name="xmlunicode" link="libxml2-xmlunicode.html"/>
+ <sub name="xmlversion" link="libxml2-xmlversion.html"/>
+ <sub name="xmlwriter" link="libxml2-xmlwriter.html"/>
+ <sub name="xpath" link="libxml2-xpath.html"/>
+ <sub name="xpathInternals" link="libxml2-xpathInternals.html"/>
+ <sub name="xpointer" link="libxml2-xpointer.html"/>
+ </sub>
+ </chapters>
+ <functions>
+ <function name="ATTRIBUTE_UNUSED" link="libxml2-xmlversion.html#ATTRIBUTE_UNUSED"/>
+ <function name="BAD_CAST" link="libxml2-xmlstring.html#BAD_CAST"/>
+ <function name="BASE_BUFFER_SIZE" link="libxml2-tree.html#BASE_BUFFER_SIZE"/>
+ <function name="CAST_TO_BOOLEAN" link="libxml2-xpathInternals.html#CAST_TO_BOOLEAN"/>
+ <function name="CAST_TO_NUMBER" link="libxml2-xpathInternals.html#CAST_TO_NUMBER"/>
+ <function name="CAST_TO_STRING" link="libxml2-xpathInternals.html#CAST_TO_STRING"/>
+ <function name="CHECK_ARITY" link="libxml2-xpathInternals.html#CHECK_ARITY"/>
+ <function name="CHECK_ERROR" link="libxml2-xpathInternals.html#CHECK_ERROR"/>
+ <function name="CHECK_ERROR0" link="libxml2-xpathInternals.html#CHECK_ERROR0"/>
+ <function name="CHECK_TYPE" link="libxml2-xpathInternals.html#CHECK_TYPE"/>
+ <function name="CHECK_TYPE0" link="libxml2-xpathInternals.html#CHECK_TYPE0"/>
+ <function name="DEBUG_MEMORY" link="libxml2-xmlmemory.html#DEBUG_MEMORY"/>
+ <function name="DEBUG_MEMORY_LOCATION" link="libxml2-xmlversion.html#DEBUG_MEMORY_LOCATION"/>
+ <function name="HTML_COMMENT_NODE" link="libxml2-HTMLtree.html#HTML_COMMENT_NODE"/>
+ <function name="HTML_ENTITY_REF_NODE" link="libxml2-HTMLtree.html#HTML_ENTITY_REF_NODE"/>
+ <function name="HTML_PI_NODE" link="libxml2-HTMLtree.html#HTML_PI_NODE"/>
+ <function name="HTML_PRESERVE_NODE" link="libxml2-HTMLtree.html#HTML_PRESERVE_NODE"/>
+ <function name="HTML_TEXT_NODE" link="libxml2-HTMLtree.html#HTML_TEXT_NODE"/>
+ <function name="INPUT_CHUNK" link="libxml2-parserInternals.html#INPUT_CHUNK"/>
+ <function name="INVALID_SOCKET" link="libxml2-nanoftp.html#INVALID_SOCKET"/>
+ <function name="IS_ASCII_DIGIT" link="libxml2-parserInternals.html#IS_ASCII_DIGIT"/>
+ <function name="IS_ASCII_LETTER" link="libxml2-parserInternals.html#IS_ASCII_LETTER"/>
+ <function name="IS_BASECHAR" link="libxml2-parserInternals.html#IS_BASECHAR"/>
+ <function name="IS_BLANK" link="libxml2-parserInternals.html#IS_BLANK"/>
+ <function name="IS_BLANK_CH" link="libxml2-parserInternals.html#IS_BLANK_CH"/>
+ <function name="IS_BYTE_CHAR" link="libxml2-parserInternals.html#IS_BYTE_CHAR"/>
+ <function name="IS_CHAR" link="libxml2-parserInternals.html#IS_CHAR"/>
+ <function name="IS_CHAR_CH" link="libxml2-parserInternals.html#IS_CHAR_CH"/>
+ <function name="IS_COMBINING" link="libxml2-parserInternals.html#IS_COMBINING"/>
+ <function name="IS_COMBINING_CH" link="libxml2-parserInternals.html#IS_COMBINING_CH"/>
+ <function name="IS_DIGIT" link="libxml2-parserInternals.html#IS_DIGIT"/>
+ <function name="IS_DIGIT_CH" link="libxml2-parserInternals.html#IS_DIGIT_CH"/>
+ <function name="IS_EXTENDER" link="libxml2-parserInternals.html#IS_EXTENDER"/>
+ <function name="IS_EXTENDER_CH" link="libxml2-parserInternals.html#IS_EXTENDER_CH"/>
+ <function name="IS_IDEOGRAPHIC" link="libxml2-parserInternals.html#IS_IDEOGRAPHIC"/>
+ <function name="IS_LETTER" link="libxml2-parserInternals.html#IS_LETTER"/>
+ <function name="IS_LETTER_CH" link="libxml2-parserInternals.html#IS_LETTER_CH"/>
+ <function name="IS_PUBIDCHAR" link="libxml2-parserInternals.html#IS_PUBIDCHAR"/>
+ <function name="IS_PUBIDCHAR_CH" link="libxml2-parserInternals.html#IS_PUBIDCHAR_CH"/>
+ <function name="LIBXML2_NEW_BUFFER" link="libxml2-tree.html#LIBXML2_NEW_BUFFER"/>
+ <function name="LIBXML_ATTR_ALLOC_SIZE" link="libxml2-xmlversion.html#LIBXML_ATTR_ALLOC_SIZE"/>
+ <function name="LIBXML_ATTR_FORMAT" link="libxml2-xmlversion.html#LIBXML_ATTR_FORMAT"/>
+ <function name="LIBXML_AUTOMATA_ENABLED" link="libxml2-xmlversion.html#LIBXML_AUTOMATA_ENABLED"/>
+ <function name="LIBXML_C14N_ENABLED" link="libxml2-xmlversion.html#LIBXML_C14N_ENABLED"/>
+ <function name="LIBXML_CATALOG_ENABLED" link="libxml2-xmlversion.html#LIBXML_CATALOG_ENABLED"/>
+ <function name="LIBXML_DEBUG_ENABLED" link="libxml2-xmlversion.html#LIBXML_DEBUG_ENABLED"/>
+ <function name="LIBXML_DEBUG_RUNTIME" link="libxml2-xmlversion.html#LIBXML_DEBUG_RUNTIME"/>
+ <function name="LIBXML_DLL_IMPORT" link="libxml2-xmlexports.html#LIBXML_DLL_IMPORT"/>
+ <function name="LIBXML_DOCB_ENABLED" link="libxml2-xmlversion.html#LIBXML_DOCB_ENABLED"/>
+ <function name="LIBXML_DOTTED_VERSION" link="libxml2-xmlversion.html#LIBXML_DOTTED_VERSION"/>
+ <function name="LIBXML_EXPR_ENABLED" link="libxml2-xmlversion.html#LIBXML_EXPR_ENABLED"/>
+ <function name="LIBXML_FTP_ENABLED" link="libxml2-xmlversion.html#LIBXML_FTP_ENABLED"/>
+ <function name="LIBXML_HTML_ENABLED" link="libxml2-xmlversion.html#LIBXML_HTML_ENABLED"/>
+ <function name="LIBXML_HTTP_ENABLED" link="libxml2-xmlversion.html#LIBXML_HTTP_ENABLED"/>
+ <function name="LIBXML_ICONV_ENABLED" link="libxml2-xmlversion.html#LIBXML_ICONV_ENABLED"/>
+ <function name="LIBXML_ICU_ENABLED" link="libxml2-xmlversion.html#LIBXML_ICU_ENABLED"/>
+ <function name="LIBXML_ISO8859X_ENABLED" link="libxml2-xmlversion.html#LIBXML_ISO8859X_ENABLED"/>
+ <function name="LIBXML_LEGACY_ENABLED" link="libxml2-xmlversion.html#LIBXML_LEGACY_ENABLED"/>
+ <function name="LIBXML_LZMA_ENABLED" link="libxml2-xmlversion.html#LIBXML_LZMA_ENABLED"/>
+ <function name="LIBXML_MODULES_ENABLED" link="libxml2-xmlversion.html#LIBXML_MODULES_ENABLED"/>
+ <function name="LIBXML_MODULE_EXTENSION" link="libxml2-xmlversion.html#LIBXML_MODULE_EXTENSION"/>
+ <function name="LIBXML_OUTPUT_ENABLED" link="libxml2-xmlversion.html#LIBXML_OUTPUT_ENABLED"/>
+ <function name="LIBXML_PATTERN_ENABLED" link="libxml2-xmlversion.html#LIBXML_PATTERN_ENABLED"/>
+ <function name="LIBXML_PUSH_ENABLED" link="libxml2-xmlversion.html#LIBXML_PUSH_ENABLED"/>
+ <function name="LIBXML_READER_ENABLED" link="libxml2-xmlversion.html#LIBXML_READER_ENABLED"/>
+ <function name="LIBXML_REGEXP_ENABLED" link="libxml2-xmlversion.html#LIBXML_REGEXP_ENABLED"/>
+ <function name="LIBXML_SAX1_ENABLED" link="libxml2-xmlversion.html#LIBXML_SAX1_ENABLED"/>
+ <function name="LIBXML_SCHEMAS_ENABLED" link="libxml2-xmlversion.html#LIBXML_SCHEMAS_ENABLED"/>
+ <function name="LIBXML_SCHEMATRON_ENABLED" link="libxml2-xmlversion.html#LIBXML_SCHEMATRON_ENABLED"/>
+ <function name="LIBXML_TEST_VERSION" link="libxml2-xmlversion.html#LIBXML_TEST_VERSION"/>
+ <function name="LIBXML_THREAD_ALLOC_ENABLED" link="libxml2-xmlversion.html#LIBXML_THREAD_ALLOC_ENABLED"/>
+ <function name="LIBXML_THREAD_ENABLED" link="libxml2-xmlversion.html#LIBXML_THREAD_ENABLED"/>
+ <function name="LIBXML_TREE_ENABLED" link="libxml2-xmlversion.html#LIBXML_TREE_ENABLED"/>
+ <function name="LIBXML_UNICODE_ENABLED" link="libxml2-xmlversion.html#LIBXML_UNICODE_ENABLED"/>
+ <function name="LIBXML_VALID_ENABLED" link="libxml2-xmlversion.html#LIBXML_VALID_ENABLED"/>
+ <function name="LIBXML_VERSION" link="libxml2-xmlversion.html#LIBXML_VERSION"/>
+ <function name="LIBXML_VERSION_EXTRA" link="libxml2-xmlversion.html#LIBXML_VERSION_EXTRA"/>
+ <function name="LIBXML_VERSION_STRING" link="libxml2-xmlversion.html#LIBXML_VERSION_STRING"/>
+ <function name="LIBXML_WRITER_ENABLED" link="libxml2-xmlversion.html#LIBXML_WRITER_ENABLED"/>
+ <function name="LIBXML_XINCLUDE_ENABLED" link="libxml2-xmlversion.html#LIBXML_XINCLUDE_ENABLED"/>
+ <function name="LIBXML_XPATH_ENABLED" link="libxml2-xmlversion.html#LIBXML_XPATH_ENABLED"/>
+ <function name="LIBXML_XPTR_ENABLED" link="libxml2-xmlversion.html#LIBXML_XPTR_ENABLED"/>
+ <function name="LIBXML_ZLIB_ENABLED" link="libxml2-xmlversion.html#LIBXML_ZLIB_ENABLED"/>
+ <function name="MOVETO_ENDTAG" link="libxml2-parserInternals.html#MOVETO_ENDTAG"/>
+ <function name="MOVETO_STARTTAG" link="libxml2-parserInternals.html#MOVETO_STARTTAG"/>
+ <function name="SKIP_EOL" link="libxml2-parserInternals.html#SKIP_EOL"/>
+ <function name="SOCKET" link="libxml2-nanoftp.html#SOCKET"/>
+ <function name="WITHOUT_TRIO" link="libxml2-xmlversion.html#WITHOUT_TRIO"/>
+ <function name="WITH_TRIO" link="libxml2-xmlversion.html#WITH_TRIO"/>
+ <function name="XINCLUDE_FALLBACK" link="libxml2-xinclude.html#XINCLUDE_FALLBACK"/>
+ <function name="XINCLUDE_HREF" link="libxml2-xinclude.html#XINCLUDE_HREF"/>
+ <function name="XINCLUDE_NODE" link="libxml2-xinclude.html#XINCLUDE_NODE"/>
+ <function name="XINCLUDE_NS" link="libxml2-xinclude.html#XINCLUDE_NS"/>
+ <function name="XINCLUDE_OLD_NS" link="libxml2-xinclude.html#XINCLUDE_OLD_NS"/>
+ <function name="XINCLUDE_PARSE" link="libxml2-xinclude.html#XINCLUDE_PARSE"/>
+ <function name="XINCLUDE_PARSE_ENCODING" link="libxml2-xinclude.html#XINCLUDE_PARSE_ENCODING"/>
+ <function name="XINCLUDE_PARSE_TEXT" link="libxml2-xinclude.html#XINCLUDE_PARSE_TEXT"/>
+ <function name="XINCLUDE_PARSE_XML" link="libxml2-xinclude.html#XINCLUDE_PARSE_XML"/>
+ <function name="XINCLUDE_PARSE_XPOINTER" link="libxml2-xinclude.html#XINCLUDE_PARSE_XPOINTER"/>
+ <function name="XMLCALL" link="libxml2-xmlexports.html#XMLCALL"/>
+ <function name="XMLCDECL" link="libxml2-xmlexports.html#XMLCDECL"/>
+ <function name="XMLPUBFUN" link="libxml2-xmlexports.html#XMLPUBFUN"/>
+ <function name="XMLPUBVAR" link="libxml2-xmlexports.html#XMLPUBVAR"/>
+ <function name="XML_CAST_FPTR" link="libxml2-hash.html#XML_CAST_FPTR"/>
+ <function name="XML_CATALOGS_NAMESPACE" link="libxml2-catalog.html#XML_CATALOGS_NAMESPACE"/>
+ <function name="XML_CATALOG_PI" link="libxml2-catalog.html#XML_CATALOG_PI"/>
+ <function name="XML_COMPLETE_ATTRS" link="libxml2-parser.html#XML_COMPLETE_ATTRS"/>
+ <function name="XML_CTXT_FINISH_DTD_0" link="libxml2-valid.html#XML_CTXT_FINISH_DTD_0"/>
+ <function name="XML_CTXT_FINISH_DTD_1" link="libxml2-valid.html#XML_CTXT_FINISH_DTD_1"/>
+ <function name="XML_DEFAULT_VERSION" link="libxml2-parser.html#XML_DEFAULT_VERSION"/>
+ <function name="XML_DETECT_IDS" link="libxml2-parser.html#XML_DETECT_IDS"/>
+ <function name="XML_GET_CONTENT" link="libxml2-tree.html#XML_GET_CONTENT"/>
+ <function name="XML_GET_LINE" link="libxml2-tree.html#XML_GET_LINE"/>
+ <function name="XML_LOCAL_NAMESPACE" link="libxml2-tree.html#XML_LOCAL_NAMESPACE"/>
+ <function name="XML_MAX_DICTIONARY_LIMIT" link="libxml2-parserInternals.html#XML_MAX_DICTIONARY_LIMIT"/>
+ <function name="XML_MAX_LOOKUP_LIMIT" link="libxml2-parserInternals.html#XML_MAX_LOOKUP_LIMIT"/>
+ <function name="XML_MAX_NAMELEN" link="libxml2-parserInternals.html#XML_MAX_NAMELEN"/>
+ <function name="XML_MAX_NAME_LENGTH" link="libxml2-parserInternals.html#XML_MAX_NAME_LENGTH"/>
+ <function name="XML_MAX_TEXT_LENGTH" link="libxml2-parserInternals.html#XML_MAX_TEXT_LENGTH"/>
+ <function name="XML_SAX2_MAGIC" link="libxml2-parser.html#XML_SAX2_MAGIC"/>
+ <function name="XML_SCHEMAS_ANYATTR_LAX" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYATTR_LAX"/>
+ <function name="XML_SCHEMAS_ANYATTR_SKIP" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYATTR_SKIP"/>
+ <function name="XML_SCHEMAS_ANYATTR_STRICT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYATTR_STRICT"/>
+ <function name="XML_SCHEMAS_ANY_LAX" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_LAX"/>
+ <function name="XML_SCHEMAS_ANY_SKIP" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_SKIP"/>
+ <function name="XML_SCHEMAS_ANY_STRICT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANY_STRICT"/>
+ <function name="XML_SCHEMAS_ATTRGROUP_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_GLOBAL"/>
+ <function name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_HAS_REFS"/>
+ <function name="XML_SCHEMAS_ATTRGROUP_MARKED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_MARKED"/>
+ <function name="XML_SCHEMAS_ATTRGROUP_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_REDEFINED"/>
+ <function name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"/>
+ <function name="XML_SCHEMAS_ATTR_FIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_FIXED"/>
+ <function name="XML_SCHEMAS_ATTR_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_GLOBAL"/>
+ <function name="XML_SCHEMAS_ATTR_INTERNAL_RESOLVED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED"/>
+ <function name="XML_SCHEMAS_ATTR_NSDEFAULT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_NSDEFAULT"/>
+ <function name="XML_SCHEMAS_ATTR_USE_OPTIONAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_USE_OPTIONAL"/>
+ <function name="XML_SCHEMAS_ATTR_USE_PROHIBITED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_USE_PROHIBITED"/>
+ <function name="XML_SCHEMAS_ATTR_USE_REQUIRED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ATTR_USE_REQUIRED"/>
+ <function name="XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION"/>
+ <function name="XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION"/>
+ <function name="XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION"/>
+ <function name="XML_SCHEMAS_ELEM_ABSTRACT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_ABSTRACT"/>
+ <function name="XML_SCHEMAS_ELEM_BLOCK_ABSENT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_ABSENT"/>
+ <function name="XML_SCHEMAS_ELEM_BLOCK_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_EXTENSION"/>
+ <function name="XML_SCHEMAS_ELEM_BLOCK_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION"/>
+ <function name="XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION"/>
+ <function name="XML_SCHEMAS_ELEM_CIRCULAR" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_CIRCULAR"/>
+ <function name="XML_SCHEMAS_ELEM_DEFAULT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_DEFAULT"/>
+ <function name="XML_SCHEMAS_ELEM_FINAL_ABSENT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_ABSENT"/>
+ <function name="XML_SCHEMAS_ELEM_FINAL_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_EXTENSION"/>
+ <function name="XML_SCHEMAS_ELEM_FINAL_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_FINAL_RESTRICTION"/>
+ <function name="XML_SCHEMAS_ELEM_FIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_FIXED"/>
+ <function name="XML_SCHEMAS_ELEM_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL"/>
+ <function name="XML_SCHEMAS_ELEM_INTERNAL_CHECKED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_CHECKED"/>
+ <function name="XML_SCHEMAS_ELEM_INTERNAL_RESOLVED" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED"/>
+ <function name="XML_SCHEMAS_ELEM_NILLABLE" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_NILLABLE"/>
+ <function name="XML_SCHEMAS_ELEM_NSDEFAULT" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_NSDEFAULT"/>
+ <function name="XML_SCHEMAS_ELEM_REF" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_REF"/>
+ <function name="XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD"/>
+ <function name="XML_SCHEMAS_ELEM_TOPLEVEL" link="libxml2-schemasInternals.html#XML_SCHEMAS_ELEM_TOPLEVEL"/>
+ <function name="XML_SCHEMAS_FACET_COLLAPSE" link="libxml2-schemasInternals.html#XML_SCHEMAS_FACET_COLLAPSE"/>
+ <function name="XML_SCHEMAS_FACET_PRESERVE" link="libxml2-schemasInternals.html#XML_SCHEMAS_FACET_PRESERVE"/>
+ <function name="XML_SCHEMAS_FACET_REPLACE" link="libxml2-schemasInternals.html#XML_SCHEMAS_FACET_REPLACE"/>
+ <function name="XML_SCHEMAS_FACET_UNKNOWN" link="libxml2-schemasInternals.html#XML_SCHEMAS_FACET_UNKNOWN"/>
+ <function name="XML_SCHEMAS_FINAL_DEFAULT_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION"/>
+ <function name="XML_SCHEMAS_FINAL_DEFAULT_LIST" link="libxml2-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_LIST"/>
+ <function name="XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION"/>
+ <function name="XML_SCHEMAS_FINAL_DEFAULT_UNION" link="libxml2-schemasInternals.html#XML_SCHEMAS_FINAL_DEFAULT_UNION"/>
+ <function name="XML_SCHEMAS_INCLUDING_CONVERT_NS" link="libxml2-schemasInternals.html#XML_SCHEMAS_INCLUDING_CONVERT_NS"/>
+ <function name="XML_SCHEMAS_QUALIF_ATTR" link="libxml2-schemasInternals.html#XML_SCHEMAS_QUALIF_ATTR"/>
+ <function name="XML_SCHEMAS_QUALIF_ELEM" link="libxml2-schemasInternals.html#XML_SCHEMAS_QUALIF_ELEM"/>
+ <function name="XML_SCHEMAS_TYPE_ABSTRACT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_ABSTRACT"/>
+ <function name="XML_SCHEMAS_TYPE_BLOCK_DEFAULT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_DEFAULT"/>
+ <function name="XML_SCHEMAS_TYPE_BLOCK_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_EXTENSION"/>
+ <function name="XML_SCHEMAS_TYPE_BLOCK_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION"/>
+ <function name="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE"/>
+ <function name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION"/>
+ <function name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION"/>
+ <function name="XML_SCHEMAS_TYPE_FACETSNEEDVALUE" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FACETSNEEDVALUE"/>
+ <function name="XML_SCHEMAS_TYPE_FINAL_DEFAULT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_DEFAULT"/>
+ <function name="XML_SCHEMAS_TYPE_FINAL_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_EXTENSION"/>
+ <function name="XML_SCHEMAS_TYPE_FINAL_LIST" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_LIST"/>
+ <function name="XML_SCHEMAS_TYPE_FINAL_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_RESTRICTION"/>
+ <function name="XML_SCHEMAS_TYPE_FINAL_UNION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FINAL_UNION"/>
+ <function name="XML_SCHEMAS_TYPE_FIXUP_1" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_FIXUP_1"/>
+ <function name="XML_SCHEMAS_TYPE_GLOBAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_GLOBAL"/>
+ <function name="XML_SCHEMAS_TYPE_HAS_FACETS" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_HAS_FACETS"/>
+ <function name="XML_SCHEMAS_TYPE_INTERNAL_INVALID" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_INVALID"/>
+ <function name="XML_SCHEMAS_TYPE_INTERNAL_RESOLVED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED"/>
+ <function name="XML_SCHEMAS_TYPE_MARKED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_MARKED"/>
+ <function name="XML_SCHEMAS_TYPE_MIXED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_MIXED"/>
+ <function name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_NORMVALUENEEDED"/>
+ <function name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"/>
+ <function name="XML_SCHEMAS_TYPE_REDEFINED" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_REDEFINED"/>
+ <function name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ABSENT"/>
+ <function name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_ATOMIC"/>
+ <function name="XML_SCHEMAS_TYPE_VARIETY_LIST" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_LIST"/>
+ <function name="XML_SCHEMAS_TYPE_VARIETY_UNION" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_VARIETY_UNION"/>
+ <function name="XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE"/>
+ <function name="XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE"/>
+ <function name="XML_SCHEMAS_TYPE_WHITESPACE_REPLACE" link="libxml2-schemasInternals.html#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE"/>
+ <function name="XML_SCHEMAS_WILDCARD_COMPLETE" link="libxml2-schemasInternals.html#XML_SCHEMAS_WILDCARD_COMPLETE"/>
+ <function name="XML_SKIP_IDS" link="libxml2-parser.html#XML_SKIP_IDS"/>
+ <function name="XML_SUBSTITUTE_BOTH" link="libxml2-parserInternals.html#XML_SUBSTITUTE_BOTH"/>
+ <function name="XML_SUBSTITUTE_NONE" link="libxml2-parserInternals.html#XML_SUBSTITUTE_NONE"/>
+ <function name="XML_SUBSTITUTE_PEREF" link="libxml2-parserInternals.html#XML_SUBSTITUTE_PEREF"/>
+ <function name="XML_SUBSTITUTE_REF" link="libxml2-parserInternals.html#XML_SUBSTITUTE_REF"/>
+ <function name="XML_XML_ID" link="libxml2-tree.html#XML_XML_ID"/>
+ <function name="XML_XML_NAMESPACE" link="libxml2-tree.html#XML_XML_NAMESPACE"/>
+ <function name="XML_XPATH_CHECKNS" link="libxml2-xpath.html#XML_XPATH_CHECKNS"/>
+ <function name="XML_XPATH_NOVAR" link="libxml2-xpath.html#XML_XPATH_NOVAR"/>
+ <function name="XP_ERROR" link="libxml2-xpathInternals.html#XP_ERROR"/>
+ <function name="XP_ERROR0" link="libxml2-xpathInternals.html#XP_ERROR0"/>
+ <function name="_REENTRANT" link="libxml2-xmlexports.html#_REENTRANT"/>
+ <function name="htmlDefaultSubelement" link="libxml2-HTMLparser.html#htmlDefaultSubelement"/>
+ <function name="htmlElementAllowedHereDesc" link="libxml2-HTMLparser.html#htmlElementAllowedHereDesc"/>
+ <function name="htmlRequiredAttrs" link="libxml2-HTMLparser.html#htmlRequiredAttrs"/>
+ <function name="xmlChildrenNode" link="libxml2-tree.html#xmlChildrenNode"/>
+ <function name="xmlIsBaseCharQ" link="libxml2-chvalid.html#xmlIsBaseCharQ"/>
+ <function name="xmlIsBaseChar_ch" link="libxml2-chvalid.html#xmlIsBaseChar_ch"/>
+ <function name="xmlIsBlankQ" link="libxml2-chvalid.html#xmlIsBlankQ"/>
+ <function name="xmlIsBlank_ch" link="libxml2-chvalid.html#xmlIsBlank_ch"/>
+ <function name="xmlIsCharQ" link="libxml2-chvalid.html#xmlIsCharQ"/>
+ <function name="xmlIsChar_ch" link="libxml2-chvalid.html#xmlIsChar_ch"/>
+ <function name="xmlIsCombiningQ" link="libxml2-chvalid.html#xmlIsCombiningQ"/>
+ <function name="xmlIsDigitQ" link="libxml2-chvalid.html#xmlIsDigitQ"/>
+ <function name="xmlIsDigit_ch" link="libxml2-chvalid.html#xmlIsDigit_ch"/>
+ <function name="xmlIsExtenderQ" link="libxml2-chvalid.html#xmlIsExtenderQ"/>
+ <function name="xmlIsExtender_ch" link="libxml2-chvalid.html#xmlIsExtender_ch"/>
+ <function name="xmlIsIdeographicQ" link="libxml2-chvalid.html#xmlIsIdeographicQ"/>
+ <function name="xmlIsPubidCharQ" link="libxml2-chvalid.html#xmlIsPubidCharQ"/>
+ <function name="xmlIsPubidChar_ch" link="libxml2-chvalid.html#xmlIsPubidChar_ch"/>
+ <function name="xmlRootNode" link="libxml2-tree.html#xmlRootNode"/>
+ <function name="xmlTextWriterWriteDocType" link="libxml2-xmlwriter.html#xmlTextWriterWriteDocType"/>
+ <function name="xmlTextWriterWriteProcessingInstruction" link="libxml2-xmlwriter.html#xmlTextWriterWriteProcessingInstruction"/>
+ <function name="xmlXPathCheckError" link="libxml2-xpathInternals.html#xmlXPathCheckError"/>
+ <function name="xmlXPathEmptyNodeSet" link="libxml2-xpathInternals.html#xmlXPathEmptyNodeSet"/>
+ <function name="xmlXPathGetContextNode" link="libxml2-xpathInternals.html#xmlXPathGetContextNode"/>
+ <function name="xmlXPathGetDocument" link="libxml2-xpathInternals.html#xmlXPathGetDocument"/>
+ <function name="xmlXPathGetError" link="libxml2-xpathInternals.html#xmlXPathGetError"/>
+ <function name="xmlXPathNodeSetGetLength" link="libxml2-xpath.html#xmlXPathNodeSetGetLength"/>
+ <function name="xmlXPathNodeSetIsEmpty" link="libxml2-xpath.html#xmlXPathNodeSetIsEmpty"/>
+ <function name="xmlXPathNodeSetItem" link="libxml2-xpath.html#xmlXPathNodeSetItem"/>
+ <function name="xmlXPathReturnBoolean" link="libxml2-xpathInternals.html#xmlXPathReturnBoolean"/>
+ <function name="xmlXPathReturnEmptyNodeSet" link="libxml2-xpathInternals.html#xmlXPathReturnEmptyNodeSet"/>
+ <function name="xmlXPathReturnEmptyString" link="libxml2-xpathInternals.html#xmlXPathReturnEmptyString"/>
+ <function name="xmlXPathReturnExternal" link="libxml2-xpathInternals.html#xmlXPathReturnExternal"/>
+ <function name="xmlXPathReturnFalse" link="libxml2-xpathInternals.html#xmlXPathReturnFalse"/>
+ <function name="xmlXPathReturnNodeSet" link="libxml2-xpathInternals.html#xmlXPathReturnNodeSet"/>
+ <function name="xmlXPathReturnNumber" link="libxml2-xpathInternals.html#xmlXPathReturnNumber"/>
+ <function name="xmlXPathReturnString" link="libxml2-xpathInternals.html#xmlXPathReturnString"/>
+ <function name="xmlXPathReturnTrue" link="libxml2-xpathInternals.html#xmlXPathReturnTrue"/>
+ <function name="xmlXPathSetArityError" link="libxml2-xpathInternals.html#xmlXPathSetArityError"/>
+ <function name="xmlXPathSetError" link="libxml2-xpathInternals.html#xmlXPathSetError"/>
+ <function name="xmlXPathSetTypeError" link="libxml2-xpathInternals.html#xmlXPathSetTypeError"/>
+ <function name="xmlXPathStackIsExternal" link="libxml2-xpathInternals.html#xmlXPathStackIsExternal"/>
+ <function name="xmlXPathStackIsNodeSet" link="libxml2-xpathInternals.html#xmlXPathStackIsNodeSet"/>
+ <function name="HTML_DEPRECATED" link="libxml2-HTMLparser.html#HTML_DEPRECATED"/>
+ <function name="HTML_INVALID" link="libxml2-HTMLparser.html#HTML_INVALID"/>
+ <function name="HTML_NA" link="libxml2-HTMLparser.html#HTML_NA"/>
+ <function name="HTML_PARSE_COMPACT" link="libxml2-HTMLparser.html#HTML_PARSE_COMPACT"/>
+ <function name="HTML_PARSE_IGNORE_ENC" link="libxml2-HTMLparser.html#HTML_PARSE_IGNORE_ENC"/>
+ <function name="HTML_PARSE_NOBLANKS" link="libxml2-HTMLparser.html#HTML_PARSE_NOBLANKS"/>
+ <function name="HTML_PARSE_NODEFDTD" link="libxml2-HTMLparser.html#HTML_PARSE_NODEFDTD"/>
+ <function name="HTML_PARSE_NOERROR" link="libxml2-HTMLparser.html#HTML_PARSE_NOERROR"/>
+ <function name="HTML_PARSE_NOIMPLIED" link="libxml2-HTMLparser.html#HTML_PARSE_NOIMPLIED"/>
+ <function name="HTML_PARSE_NONET" link="libxml2-HTMLparser.html#HTML_PARSE_NONET"/>
+ <function name="HTML_PARSE_NOWARNING" link="libxml2-HTMLparser.html#HTML_PARSE_NOWARNING"/>
+ <function name="HTML_PARSE_PEDANTIC" link="libxml2-HTMLparser.html#HTML_PARSE_PEDANTIC"/>
+ <function name="HTML_PARSE_RECOVER" link="libxml2-HTMLparser.html#HTML_PARSE_RECOVER"/>
+ <function name="HTML_REQUIRED" link="libxml2-HTMLparser.html#HTML_REQUIRED"/>
+ <function name="HTML_VALID" link="libxml2-HTMLparser.html#HTML_VALID"/>
+ <function name="XLINK_ACTUATE_AUTO" link="libxml2-xlink.html#XLINK_ACTUATE_AUTO"/>
+ <function name="XLINK_ACTUATE_NONE" link="libxml2-xlink.html#XLINK_ACTUATE_NONE"/>
+ <function name="XLINK_ACTUATE_ONREQUEST" link="libxml2-xlink.html#XLINK_ACTUATE_ONREQUEST"/>
+ <function name="XLINK_SHOW_EMBED" link="libxml2-xlink.html#XLINK_SHOW_EMBED"/>
+ <function name="XLINK_SHOW_NEW" link="libxml2-xlink.html#XLINK_SHOW_NEW"/>
+ <function name="XLINK_SHOW_NONE" link="libxml2-xlink.html#XLINK_SHOW_NONE"/>
+ <function name="XLINK_SHOW_REPLACE" link="libxml2-xlink.html#XLINK_SHOW_REPLACE"/>
+ <function name="XLINK_TYPE_EXTENDED" link="libxml2-xlink.html#XLINK_TYPE_EXTENDED"/>
+ <function name="XLINK_TYPE_EXTENDED_SET" link="libxml2-xlink.html#XLINK_TYPE_EXTENDED_SET"/>
+ <function name="XLINK_TYPE_NONE" link="libxml2-xlink.html#XLINK_TYPE_NONE"/>
+ <function name="XLINK_TYPE_SIMPLE" link="libxml2-xlink.html#XLINK_TYPE_SIMPLE"/>
+ <function name="XML_ATTRIBUTE_CDATA" link="libxml2-tree.html#XML_ATTRIBUTE_CDATA"/>
+ <function name="XML_ATTRIBUTE_DECL" link="libxml2-tree.html#XML_ATTRIBUTE_DECL"/>
+ <function name="XML_ATTRIBUTE_ENTITIES" link="libxml2-tree.html#XML_ATTRIBUTE_ENTITIES"/>
+ <function name="XML_ATTRIBUTE_ENTITY" link="libxml2-tree.html#XML_ATTRIBUTE_ENTITY"/>
+ <function name="XML_ATTRIBUTE_ENUMERATION" link="libxml2-tree.html#XML_ATTRIBUTE_ENUMERATION"/>
+ <function name="XML_ATTRIBUTE_FIXED" link="libxml2-tree.html#XML_ATTRIBUTE_FIXED"/>
+ <function name="XML_ATTRIBUTE_ID" link="libxml2-tree.html#XML_ATTRIBUTE_ID"/>
+ <function name="XML_ATTRIBUTE_IDREF" link="libxml2-tree.html#XML_ATTRIBUTE_IDREF"/>
+ <function name="XML_ATTRIBUTE_IDREFS" link="libxml2-tree.html#XML_ATTRIBUTE_IDREFS"/>
+ <function name="XML_ATTRIBUTE_IMPLIED" link="libxml2-tree.html#XML_ATTRIBUTE_IMPLIED"/>
+ <function name="XML_ATTRIBUTE_NMTOKEN" link="libxml2-tree.html#XML_ATTRIBUTE_NMTOKEN"/>
+ <function name="XML_ATTRIBUTE_NMTOKENS" link="libxml2-tree.html#XML_ATTRIBUTE_NMTOKENS"/>
+ <function name="XML_ATTRIBUTE_NODE" link="libxml2-tree.html#XML_ATTRIBUTE_NODE"/>
+ <function name="XML_ATTRIBUTE_NONE" link="libxml2-tree.html#XML_ATTRIBUTE_NONE"/>
+ <function name="XML_ATTRIBUTE_NOTATION" link="libxml2-tree.html#XML_ATTRIBUTE_NOTATION"/>
+ <function name="XML_ATTRIBUTE_REQUIRED" link="libxml2-tree.html#XML_ATTRIBUTE_REQUIRED"/>
+ <function name="XML_BUFFER_ALLOC_DOUBLEIT" link="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT"/>
+ <function name="XML_BUFFER_ALLOC_EXACT" link="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT"/>
+ <function name="XML_BUFFER_ALLOC_HYBRID" link="libxml2-tree.html#XML_BUFFER_ALLOC_HYBRID"/>
+ <function name="XML_BUFFER_ALLOC_IMMUTABLE" link="libxml2-tree.html#XML_BUFFER_ALLOC_IMMUTABLE"/>
+ <function name="XML_BUFFER_ALLOC_IO" link="libxml2-tree.html#XML_BUFFER_ALLOC_IO"/>
+ <function name="XML_BUF_OVERFLOW" link="libxml2-xmlerror.html#XML_BUF_OVERFLOW"/>
+ <function name="XML_C14N_1_0" link="libxml2-c14n.html#XML_C14N_1_0"/>
+ <function name="XML_C14N_1_1" link="libxml2-c14n.html#XML_C14N_1_1"/>
+ <function name="XML_C14N_CREATE_CTXT" link="libxml2-xmlerror.html#XML_C14N_CREATE_CTXT"/>
+ <function name="XML_C14N_CREATE_STACK" link="libxml2-xmlerror.html#XML_C14N_CREATE_STACK"/>
+ <function name="XML_C14N_EXCLUSIVE_1_0" link="libxml2-c14n.html#XML_C14N_EXCLUSIVE_1_0"/>
+ <function name="XML_C14N_INVALID_NODE" link="libxml2-xmlerror.html#XML_C14N_INVALID_NODE"/>
+ <function name="XML_C14N_RELATIVE_NAMESPACE" link="libxml2-xmlerror.html#XML_C14N_RELATIVE_NAMESPACE"/>
+ <function name="XML_C14N_REQUIRES_UTF8" link="libxml2-xmlerror.html#XML_C14N_REQUIRES_UTF8"/>
+ <function name="XML_C14N_UNKNOW_NODE" link="libxml2-xmlerror.html#XML_C14N_UNKNOW_NODE"/>
+ <function name="XML_CATALOG_ENTRY_BROKEN" link="libxml2-xmlerror.html#XML_CATALOG_ENTRY_BROKEN"/>
+ <function name="XML_CATALOG_MISSING_ATTR" link="libxml2-xmlerror.html#XML_CATALOG_MISSING_ATTR"/>
+ <function name="XML_CATALOG_NOT_CATALOG" link="libxml2-xmlerror.html#XML_CATALOG_NOT_CATALOG"/>
+ <function name="XML_CATALOG_PREFER_VALUE" link="libxml2-xmlerror.html#XML_CATALOG_PREFER_VALUE"/>
+ <function name="XML_CATALOG_RECURSION" link="libxml2-xmlerror.html#XML_CATALOG_RECURSION"/>
+ <function name="XML_CATA_ALLOW_ALL" link="libxml2-catalog.html#XML_CATA_ALLOW_ALL"/>
+ <function name="XML_CATA_ALLOW_DOCUMENT" link="libxml2-catalog.html#XML_CATA_ALLOW_DOCUMENT"/>
+ <function name="XML_CATA_ALLOW_GLOBAL" link="libxml2-catalog.html#XML_CATA_ALLOW_GLOBAL"/>
+ <function name="XML_CATA_ALLOW_NONE" link="libxml2-catalog.html#XML_CATA_ALLOW_NONE"/>
+ <function name="XML_CATA_PREFER_NONE" link="libxml2-catalog.html#XML_CATA_PREFER_NONE"/>
+ <function name="XML_CATA_PREFER_PUBLIC" link="libxml2-catalog.html#XML_CATA_PREFER_PUBLIC"/>
+ <function name="XML_CATA_PREFER_SYSTEM" link="libxml2-catalog.html#XML_CATA_PREFER_SYSTEM"/>
+ <function name="XML_CDATA_SECTION_NODE" link="libxml2-tree.html#XML_CDATA_SECTION_NODE"/>
+ <function name="XML_CHAR_ENCODING_2022_JP" link="libxml2-encoding.html#XML_CHAR_ENCODING_2022_JP"/>
+ <function name="XML_CHAR_ENCODING_8859_1" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_1"/>
+ <function name="XML_CHAR_ENCODING_8859_2" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_2"/>
+ <function name="XML_CHAR_ENCODING_8859_3" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_3"/>
+ <function name="XML_CHAR_ENCODING_8859_4" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_4"/>
+ <function name="XML_CHAR_ENCODING_8859_5" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_5"/>
+ <function name="XML_CHAR_ENCODING_8859_6" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_6"/>
+ <function name="XML_CHAR_ENCODING_8859_7" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_7"/>
+ <function name="XML_CHAR_ENCODING_8859_8" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_8"/>
+ <function name="XML_CHAR_ENCODING_8859_9" link="libxml2-encoding.html#XML_CHAR_ENCODING_8859_9"/>
+ <function name="XML_CHAR_ENCODING_ASCII" link="libxml2-encoding.html#XML_CHAR_ENCODING_ASCII"/>
+ <function name="XML_CHAR_ENCODING_EBCDIC" link="libxml2-encoding.html#XML_CHAR_ENCODING_EBCDIC"/>
+ <function name="XML_CHAR_ENCODING_ERROR" link="libxml2-encoding.html#XML_CHAR_ENCODING_ERROR"/>
+ <function name="XML_CHAR_ENCODING_EUC_JP" link="libxml2-encoding.html#XML_CHAR_ENCODING_EUC_JP"/>
+ <function name="XML_CHAR_ENCODING_NONE" link="libxml2-encoding.html#XML_CHAR_ENCODING_NONE"/>
+ <function name="XML_CHAR_ENCODING_SHIFT_JIS" link="libxml2-encoding.html#XML_CHAR_ENCODING_SHIFT_JIS"/>
+ <function name="XML_CHAR_ENCODING_UCS2" link="libxml2-encoding.html#XML_CHAR_ENCODING_UCS2"/>
+ <function name="XML_CHAR_ENCODING_UCS4BE" link="libxml2-encoding.html#XML_CHAR_ENCODING_UCS4BE"/>
+ <function name="XML_CHAR_ENCODING_UCS4LE" link="libxml2-encoding.html#XML_CHAR_ENCODING_UCS4LE"/>
+ <function name="XML_CHAR_ENCODING_UCS4_2143" link="libxml2-encoding.html#XML_CHAR_ENCODING_UCS4_2143"/>
+ <function name="XML_CHAR_ENCODING_UCS4_3412" link="libxml2-encoding.html#XML_CHAR_ENCODING_UCS4_3412"/>
+ <function name="XML_CHAR_ENCODING_UTF16BE" link="libxml2-encoding.html#XML_CHAR_ENCODING_UTF16BE"/>
+ <function name="XML_CHAR_ENCODING_UTF16LE" link="libxml2-encoding.html#XML_CHAR_ENCODING_UTF16LE"/>
+ <function name="XML_CHAR_ENCODING_UTF8" link="libxml2-encoding.html#XML_CHAR_ENCODING_UTF8"/>
+ <function name="XML_CHECK_ENTITY_TYPE" link="libxml2-xmlerror.html#XML_CHECK_ENTITY_TYPE"/>
+ <function name="XML_CHECK_FOUND_ATTRIBUTE" link="libxml2-xmlerror.html#XML_CHECK_FOUND_ATTRIBUTE"/>
+ <function name="XML_CHECK_FOUND_CDATA" link="libxml2-xmlerror.html#XML_CHECK_FOUND_CDATA"/>
+ <function name="XML_CHECK_FOUND_COMMENT" link="libxml2-xmlerror.html#XML_CHECK_FOUND_COMMENT"/>
+ <function name="XML_CHECK_FOUND_DOCTYPE" link="libxml2-xmlerror.html#XML_CHECK_FOUND_DOCTYPE"/>
+ <function name="XML_CHECK_FOUND_ELEMENT" link="libxml2-xmlerror.html#XML_CHECK_FOUND_ELEMENT"/>
+ <function name="XML_CHECK_FOUND_ENTITY" link="libxml2-xmlerror.html#XML_CHECK_FOUND_ENTITY"/>
+ <function name="XML_CHECK_FOUND_ENTITYREF" link="libxml2-xmlerror.html#XML_CHECK_FOUND_ENTITYREF"/>
+ <function name="XML_CHECK_FOUND_FRAGMENT" link="libxml2-xmlerror.html#XML_CHECK_FOUND_FRAGMENT"/>
+ <function name="XML_CHECK_FOUND_NOTATION" link="libxml2-xmlerror.html#XML_CHECK_FOUND_NOTATION"/>
+ <function name="XML_CHECK_FOUND_PI" link="libxml2-xmlerror.html#XML_CHECK_FOUND_PI"/>
+ <function name="XML_CHECK_FOUND_TEXT" link="libxml2-xmlerror.html#XML_CHECK_FOUND_TEXT"/>
+ <function name="XML_CHECK_NAME_NOT_NULL" link="libxml2-xmlerror.html#XML_CHECK_NAME_NOT_NULL"/>
+ <function name="XML_CHECK_NOT_ATTR" link="libxml2-xmlerror.html#XML_CHECK_NOT_ATTR"/>
+ <function name="XML_CHECK_NOT_ATTR_DECL" link="libxml2-xmlerror.html#XML_CHECK_NOT_ATTR_DECL"/>
+ <function name="XML_CHECK_NOT_DTD" link="libxml2-xmlerror.html#XML_CHECK_NOT_DTD"/>
+ <function name="XML_CHECK_NOT_ELEM_DECL" link="libxml2-xmlerror.html#XML_CHECK_NOT_ELEM_DECL"/>
+ <function name="XML_CHECK_NOT_ENTITY_DECL" link="libxml2-xmlerror.html#XML_CHECK_NOT_ENTITY_DECL"/>
+ <function name="XML_CHECK_NOT_NCNAME" link="libxml2-xmlerror.html#XML_CHECK_NOT_NCNAME"/>
+ <function name="XML_CHECK_NOT_NS_DECL" link="libxml2-xmlerror.html#XML_CHECK_NOT_NS_DECL"/>
+ <function name="XML_CHECK_NOT_UTF8" link="libxml2-xmlerror.html#XML_CHECK_NOT_UTF8"/>
+ <function name="XML_CHECK_NO_DICT" link="libxml2-xmlerror.html#XML_CHECK_NO_DICT"/>
+ <function name="XML_CHECK_NO_DOC" link="libxml2-xmlerror.html#XML_CHECK_NO_DOC"/>
+ <function name="XML_CHECK_NO_ELEM" link="libxml2-xmlerror.html#XML_CHECK_NO_ELEM"/>
+ <function name="XML_CHECK_NO_HREF" link="libxml2-xmlerror.html#XML_CHECK_NO_HREF"/>
+ <function name="XML_CHECK_NO_NAME" link="libxml2-xmlerror.html#XML_CHECK_NO_NAME"/>
+ <function name="XML_CHECK_NO_NEXT" link="libxml2-xmlerror.html#XML_CHECK_NO_NEXT"/>
+ <function name="XML_CHECK_NO_PARENT" link="libxml2-xmlerror.html#XML_CHECK_NO_PARENT"/>
+ <function name="XML_CHECK_NO_PREV" link="libxml2-xmlerror.html#XML_CHECK_NO_PREV"/>
+ <function name="XML_CHECK_NS_ANCESTOR" link="libxml2-xmlerror.html#XML_CHECK_NS_ANCESTOR"/>
+ <function name="XML_CHECK_NS_SCOPE" link="libxml2-xmlerror.html#XML_CHECK_NS_SCOPE"/>
+ <function name="XML_CHECK_OUTSIDE_DICT" link="libxml2-xmlerror.html#XML_CHECK_OUTSIDE_DICT"/>
+ <function name="XML_CHECK_UNKNOWN_NODE" link="libxml2-xmlerror.html#XML_CHECK_UNKNOWN_NODE"/>
+ <function name="XML_CHECK_WRONG_DOC" link="libxml2-xmlerror.html#XML_CHECK_WRONG_DOC"/>
+ <function name="XML_CHECK_WRONG_NAME" link="libxml2-xmlerror.html#XML_CHECK_WRONG_NAME"/>
+ <function name="XML_CHECK_WRONG_NEXT" link="libxml2-xmlerror.html#XML_CHECK_WRONG_NEXT"/>
+ <function name="XML_CHECK_WRONG_PARENT" link="libxml2-xmlerror.html#XML_CHECK_WRONG_PARENT"/>
+ <function name="XML_CHECK_WRONG_PREV" link="libxml2-xmlerror.html#XML_CHECK_WRONG_PREV"/>
+ <function name="XML_COMMENT_NODE" link="libxml2-tree.html#XML_COMMENT_NODE"/>
+ <function name="XML_DOCB_DOCUMENT_NODE" link="libxml2-tree.html#XML_DOCB_DOCUMENT_NODE"/>
+ <function name="XML_DOCUMENT_FRAG_NODE" link="libxml2-tree.html#XML_DOCUMENT_FRAG_NODE"/>
+ <function name="XML_DOCUMENT_NODE" link="libxml2-tree.html#XML_DOCUMENT_NODE"/>
+ <function name="XML_DOCUMENT_TYPE_NODE" link="libxml2-tree.html#XML_DOCUMENT_TYPE_NODE"/>
+ <function name="XML_DOC_DTDVALID" link="libxml2-tree.html#XML_DOC_DTDVALID"/>
+ <function name="XML_DOC_HTML" link="libxml2-tree.html#XML_DOC_HTML"/>
+ <function name="XML_DOC_INTERNAL" link="libxml2-tree.html#XML_DOC_INTERNAL"/>
+ <function name="XML_DOC_NSVALID" link="libxml2-tree.html#XML_DOC_NSVALID"/>
+ <function name="XML_DOC_OLD10" link="libxml2-tree.html#XML_DOC_OLD10"/>
+ <function name="XML_DOC_USERBUILT" link="libxml2-tree.html#XML_DOC_USERBUILT"/>
+ <function name="XML_DOC_WELLFORMED" link="libxml2-tree.html#XML_DOC_WELLFORMED"/>
+ <function name="XML_DOC_XINCLUDE" link="libxml2-tree.html#XML_DOC_XINCLUDE"/>
+ <function name="XML_DTD_ATTRIBUTE_DEFAULT" link="libxml2-xmlerror.html#XML_DTD_ATTRIBUTE_DEFAULT"/>
+ <function name="XML_DTD_ATTRIBUTE_REDEFINED" link="libxml2-xmlerror.html#XML_DTD_ATTRIBUTE_REDEFINED"/>
+ <function name="XML_DTD_ATTRIBUTE_VALUE" link="libxml2-xmlerror.html#XML_DTD_ATTRIBUTE_VALUE"/>
+ <function name="XML_DTD_CONTENT_ERROR" link="libxml2-xmlerror.html#XML_DTD_CONTENT_ERROR"/>
+ <function name="XML_DTD_CONTENT_MODEL" link="libxml2-xmlerror.html#XML_DTD_CONTENT_MODEL"/>
+ <function name="XML_DTD_CONTENT_NOT_DETERMINIST" link="libxml2-xmlerror.html#XML_DTD_CONTENT_NOT_DETERMINIST"/>
+ <function name="XML_DTD_DIFFERENT_PREFIX" link="libxml2-xmlerror.html#XML_DTD_DIFFERENT_PREFIX"/>
+ <function name="XML_DTD_DUP_TOKEN" link="libxml2-xmlerror.html#XML_DTD_DUP_TOKEN"/>
+ <function name="XML_DTD_ELEM_DEFAULT_NAMESPACE" link="libxml2-xmlerror.html#XML_DTD_ELEM_DEFAULT_NAMESPACE"/>
+ <function name="XML_DTD_ELEM_NAMESPACE" link="libxml2-xmlerror.html#XML_DTD_ELEM_NAMESPACE"/>
+ <function name="XML_DTD_ELEM_REDEFINED" link="libxml2-xmlerror.html#XML_DTD_ELEM_REDEFINED"/>
+ <function name="XML_DTD_EMPTY_NOTATION" link="libxml2-xmlerror.html#XML_DTD_EMPTY_NOTATION"/>
+ <function name="XML_DTD_ENTITY_TYPE" link="libxml2-xmlerror.html#XML_DTD_ENTITY_TYPE"/>
+ <function name="XML_DTD_ID_FIXED" link="libxml2-xmlerror.html#XML_DTD_ID_FIXED"/>
+ <function name="XML_DTD_ID_REDEFINED" link="libxml2-xmlerror.html#XML_DTD_ID_REDEFINED"/>
+ <function name="XML_DTD_ID_SUBSET" link="libxml2-xmlerror.html#XML_DTD_ID_SUBSET"/>
+ <function name="XML_DTD_INVALID_CHILD" link="libxml2-xmlerror.html#XML_DTD_INVALID_CHILD"/>
+ <function name="XML_DTD_INVALID_DEFAULT" link="libxml2-xmlerror.html#XML_DTD_INVALID_DEFAULT"/>
+ <function name="XML_DTD_LOAD_ERROR" link="libxml2-xmlerror.html#XML_DTD_LOAD_ERROR"/>
+ <function name="XML_DTD_MISSING_ATTRIBUTE" link="libxml2-xmlerror.html#XML_DTD_MISSING_ATTRIBUTE"/>
+ <function name="XML_DTD_MIXED_CORRUPT" link="libxml2-xmlerror.html#XML_DTD_MIXED_CORRUPT"/>
+ <function name="XML_DTD_MULTIPLE_ID" link="libxml2-xmlerror.html#XML_DTD_MULTIPLE_ID"/>
+ <function name="XML_DTD_NODE" link="libxml2-tree.html#XML_DTD_NODE"/>
+ <function name="XML_DTD_NOTATION_REDEFINED" link="libxml2-xmlerror.html#XML_DTD_NOTATION_REDEFINED"/>
+ <function name="XML_DTD_NOTATION_VALUE" link="libxml2-xmlerror.html#XML_DTD_NOTATION_VALUE"/>
+ <function name="XML_DTD_NOT_EMPTY" link="libxml2-xmlerror.html#XML_DTD_NOT_EMPTY"/>
+ <function name="XML_DTD_NOT_PCDATA" link="libxml2-xmlerror.html#XML_DTD_NOT_PCDATA"/>
+ <function name="XML_DTD_NOT_STANDALONE" link="libxml2-xmlerror.html#XML_DTD_NOT_STANDALONE"/>
+ <function name="XML_DTD_NO_DOC" link="libxml2-xmlerror.html#XML_DTD_NO_DOC"/>
+ <function name="XML_DTD_NO_DTD" link="libxml2-xmlerror.html#XML_DTD_NO_DTD"/>
+ <function name="XML_DTD_NO_ELEM_NAME" link="libxml2-xmlerror.html#XML_DTD_NO_ELEM_NAME"/>
+ <function name="XML_DTD_NO_PREFIX" link="libxml2-xmlerror.html#XML_DTD_NO_PREFIX"/>
+ <function name="XML_DTD_NO_ROOT" link="libxml2-xmlerror.html#XML_DTD_NO_ROOT"/>
+ <function name="XML_DTD_ROOT_NAME" link="libxml2-xmlerror.html#XML_DTD_ROOT_NAME"/>
+ <function name="XML_DTD_STANDALONE_DEFAULTED" link="libxml2-xmlerror.html#XML_DTD_STANDALONE_DEFAULTED"/>
+ <function name="XML_DTD_STANDALONE_WHITE_SPACE" link="libxml2-xmlerror.html#XML_DTD_STANDALONE_WHITE_SPACE"/>
+ <function name="XML_DTD_UNKNOWN_ATTRIBUTE" link="libxml2-xmlerror.html#XML_DTD_UNKNOWN_ATTRIBUTE"/>
+ <function name="XML_DTD_UNKNOWN_ELEM" link="libxml2-xmlerror.html#XML_DTD_UNKNOWN_ELEM"/>
+ <function name="XML_DTD_UNKNOWN_ENTITY" link="libxml2-xmlerror.html#XML_DTD_UNKNOWN_ENTITY"/>
+ <function name="XML_DTD_UNKNOWN_ID" link="libxml2-xmlerror.html#XML_DTD_UNKNOWN_ID"/>
+ <function name="XML_DTD_UNKNOWN_NOTATION" link="libxml2-xmlerror.html#XML_DTD_UNKNOWN_NOTATION"/>
+ <function name="XML_DTD_XMLID_TYPE" link="libxml2-xmlerror.html#XML_DTD_XMLID_TYPE"/>
+ <function name="XML_DTD_XMLID_VALUE" link="libxml2-xmlerror.html#XML_DTD_XMLID_VALUE"/>
+ <function name="XML_ELEMENT_CONTENT_ELEMENT" link="libxml2-tree.html#XML_ELEMENT_CONTENT_ELEMENT"/>
+ <function name="XML_ELEMENT_CONTENT_MULT" link="libxml2-tree.html#XML_ELEMENT_CONTENT_MULT"/>
+ <function name="XML_ELEMENT_CONTENT_ONCE" link="libxml2-tree.html#XML_ELEMENT_CONTENT_ONCE"/>
+ <function name="XML_ELEMENT_CONTENT_OPT" link="libxml2-tree.html#XML_ELEMENT_CONTENT_OPT"/>
+ <function name="XML_ELEMENT_CONTENT_OR" link="libxml2-tree.html#XML_ELEMENT_CONTENT_OR"/>
+ <function name="XML_ELEMENT_CONTENT_PCDATA" link="libxml2-tree.html#XML_ELEMENT_CONTENT_PCDATA"/>
+ <function name="XML_ELEMENT_CONTENT_PLUS" link="libxml2-tree.html#XML_ELEMENT_CONTENT_PLUS"/>
+ <function name="XML_ELEMENT_CONTENT_SEQ" link="libxml2-tree.html#XML_ELEMENT_CONTENT_SEQ"/>
+ <function name="XML_ELEMENT_DECL" link="libxml2-tree.html#XML_ELEMENT_DECL"/>
+ <function name="XML_ELEMENT_NODE" link="libxml2-tree.html#XML_ELEMENT_NODE"/>
+ <function name="XML_ELEMENT_TYPE_ANY" link="libxml2-tree.html#XML_ELEMENT_TYPE_ANY"/>
+ <function name="XML_ELEMENT_TYPE_ELEMENT" link="libxml2-tree.html#XML_ELEMENT_TYPE_ELEMENT"/>
+ <function name="XML_ELEMENT_TYPE_EMPTY" link="libxml2-tree.html#XML_ELEMENT_TYPE_EMPTY"/>
+ <function name="XML_ELEMENT_TYPE_MIXED" link="libxml2-tree.html#XML_ELEMENT_TYPE_MIXED"/>
+ <function name="XML_ELEMENT_TYPE_UNDEFINED" link="libxml2-tree.html#XML_ELEMENT_TYPE_UNDEFINED"/>
+ <function name="XML_ENTITY_DECL" link="libxml2-tree.html#XML_ENTITY_DECL"/>
+ <function name="XML_ENTITY_NODE" link="libxml2-tree.html#XML_ENTITY_NODE"/>
+ <function name="XML_ENTITY_REF_NODE" link="libxml2-tree.html#XML_ENTITY_REF_NODE"/>
+ <function name="XML_ERR_ATTLIST_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_ATTLIST_NOT_FINISHED"/>
+ <function name="XML_ERR_ATTLIST_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_ATTLIST_NOT_STARTED"/>
+ <function name="XML_ERR_ATTRIBUTE_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_FINISHED"/>
+ <function name="XML_ERR_ATTRIBUTE_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_ATTRIBUTE_NOT_STARTED"/>
+ <function name="XML_ERR_ATTRIBUTE_REDEFINED" link="libxml2-xmlerror.html#XML_ERR_ATTRIBUTE_REDEFINED"/>
+ <function name="XML_ERR_ATTRIBUTE_WITHOUT_VALUE" link="libxml2-xmlerror.html#XML_ERR_ATTRIBUTE_WITHOUT_VALUE"/>
+ <function name="XML_ERR_CDATA_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_CDATA_NOT_FINISHED"/>
+ <function name="XML_ERR_CHARREF_AT_EOF" link="libxml2-xmlerror.html#XML_ERR_CHARREF_AT_EOF"/>
+ <function name="XML_ERR_CHARREF_IN_DTD" link="libxml2-xmlerror.html#XML_ERR_CHARREF_IN_DTD"/>
+ <function name="XML_ERR_CHARREF_IN_EPILOG" link="libxml2-xmlerror.html#XML_ERR_CHARREF_IN_EPILOG"/>
+ <function name="XML_ERR_CHARREF_IN_PROLOG" link="libxml2-xmlerror.html#XML_ERR_CHARREF_IN_PROLOG"/>
+ <function name="XML_ERR_COMMENT_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_COMMENT_NOT_FINISHED"/>
+ <function name="XML_ERR_CONDSEC_INVALID" link="libxml2-xmlerror.html#XML_ERR_CONDSEC_INVALID"/>
+ <function name="XML_ERR_CONDSEC_INVALID_KEYWORD" link="libxml2-xmlerror.html#XML_ERR_CONDSEC_INVALID_KEYWORD"/>
+ <function name="XML_ERR_CONDSEC_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_CONDSEC_NOT_FINISHED"/>
+ <function name="XML_ERR_CONDSEC_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_CONDSEC_NOT_STARTED"/>
+ <function name="XML_ERR_DOCTYPE_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_DOCTYPE_NOT_FINISHED"/>
+ <function name="XML_ERR_DOCUMENT_EMPTY" link="libxml2-xmlerror.html#XML_ERR_DOCUMENT_EMPTY"/>
+ <function name="XML_ERR_DOCUMENT_END" link="libxml2-xmlerror.html#XML_ERR_DOCUMENT_END"/>
+ <function name="XML_ERR_DOCUMENT_START" link="libxml2-xmlerror.html#XML_ERR_DOCUMENT_START"/>
+ <function name="XML_ERR_ELEMCONTENT_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_FINISHED"/>
+ <function name="XML_ERR_ELEMCONTENT_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_ELEMCONTENT_NOT_STARTED"/>
+ <function name="XML_ERR_ENCODING_NAME" link="libxml2-xmlerror.html#XML_ERR_ENCODING_NAME"/>
+ <function name="XML_ERR_ENTITYREF_AT_EOF" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_AT_EOF"/>
+ <function name="XML_ERR_ENTITYREF_IN_DTD" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_IN_DTD"/>
+ <function name="XML_ERR_ENTITYREF_IN_EPILOG" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_IN_EPILOG"/>
+ <function name="XML_ERR_ENTITYREF_IN_PROLOG" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_IN_PROLOG"/>
+ <function name="XML_ERR_ENTITYREF_NO_NAME" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_NO_NAME"/>
+ <function name="XML_ERR_ENTITYREF_SEMICOL_MISSING" link="libxml2-xmlerror.html#XML_ERR_ENTITYREF_SEMICOL_MISSING"/>
+ <function name="XML_ERR_ENTITY_BOUNDARY" link="libxml2-xmlerror.html#XML_ERR_ENTITY_BOUNDARY"/>
+ <function name="XML_ERR_ENTITY_CHAR_ERROR" link="libxml2-xmlerror.html#XML_ERR_ENTITY_CHAR_ERROR"/>
+ <function name="XML_ERR_ENTITY_IS_EXTERNAL" link="libxml2-xmlerror.html#XML_ERR_ENTITY_IS_EXTERNAL"/>
+ <function name="XML_ERR_ENTITY_IS_PARAMETER" link="libxml2-xmlerror.html#XML_ERR_ENTITY_IS_PARAMETER"/>
+ <function name="XML_ERR_ENTITY_LOOP" link="libxml2-xmlerror.html#XML_ERR_ENTITY_LOOP"/>
+ <function name="XML_ERR_ENTITY_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_ENTITY_NOT_FINISHED"/>
+ <function name="XML_ERR_ENTITY_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_ENTITY_NOT_STARTED"/>
+ <function name="XML_ERR_ENTITY_PE_INTERNAL" link="libxml2-xmlerror.html#XML_ERR_ENTITY_PE_INTERNAL"/>
+ <function name="XML_ERR_ENTITY_PROCESSING" link="libxml2-xmlerror.html#XML_ERR_ENTITY_PROCESSING"/>
+ <function name="XML_ERR_EQUAL_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_EQUAL_REQUIRED"/>
+ <function name="XML_ERR_ERROR" link="libxml2-xmlerror.html#XML_ERR_ERROR"/>
+ <function name="XML_ERR_EXTRA_CONTENT" link="libxml2-xmlerror.html#XML_ERR_EXTRA_CONTENT"/>
+ <function name="XML_ERR_EXT_ENTITY_STANDALONE" link="libxml2-xmlerror.html#XML_ERR_EXT_ENTITY_STANDALONE"/>
+ <function name="XML_ERR_EXT_SUBSET_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_EXT_SUBSET_NOT_FINISHED"/>
+ <function name="XML_ERR_FATAL" link="libxml2-xmlerror.html#XML_ERR_FATAL"/>
+ <function name="XML_ERR_GT_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_GT_REQUIRED"/>
+ <function name="XML_ERR_HYPHEN_IN_COMMENT" link="libxml2-xmlerror.html#XML_ERR_HYPHEN_IN_COMMENT"/>
+ <function name="XML_ERR_INTERNAL_ERROR" link="libxml2-xmlerror.html#XML_ERR_INTERNAL_ERROR"/>
+ <function name="XML_ERR_INVALID_CHAR" link="libxml2-xmlerror.html#XML_ERR_INVALID_CHAR"/>
+ <function name="XML_ERR_INVALID_CHARREF" link="libxml2-xmlerror.html#XML_ERR_INVALID_CHARREF"/>
+ <function name="XML_ERR_INVALID_DEC_CHARREF" link="libxml2-xmlerror.html#XML_ERR_INVALID_DEC_CHARREF"/>
+ <function name="XML_ERR_INVALID_ENCODING" link="libxml2-xmlerror.html#XML_ERR_INVALID_ENCODING"/>
+ <function name="XML_ERR_INVALID_HEX_CHARREF" link="libxml2-xmlerror.html#XML_ERR_INVALID_HEX_CHARREF"/>
+ <function name="XML_ERR_INVALID_URI" link="libxml2-xmlerror.html#XML_ERR_INVALID_URI"/>
+ <function name="XML_ERR_LITERAL_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_LITERAL_NOT_FINISHED"/>
+ <function name="XML_ERR_LITERAL_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_LITERAL_NOT_STARTED"/>
+ <function name="XML_ERR_LTSLASH_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_LTSLASH_REQUIRED"/>
+ <function name="XML_ERR_LT_IN_ATTRIBUTE" link="libxml2-xmlerror.html#XML_ERR_LT_IN_ATTRIBUTE"/>
+ <function name="XML_ERR_LT_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_LT_REQUIRED"/>
+ <function name="XML_ERR_MISPLACED_CDATA_END" link="libxml2-xmlerror.html#XML_ERR_MISPLACED_CDATA_END"/>
+ <function name="XML_ERR_MISSING_ENCODING" link="libxml2-xmlerror.html#XML_ERR_MISSING_ENCODING"/>
+ <function name="XML_ERR_MIXED_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_MIXED_NOT_FINISHED"/>
+ <function name="XML_ERR_MIXED_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_MIXED_NOT_STARTED"/>
+ <function name="XML_ERR_NAME_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_NAME_REQUIRED"/>
+ <function name="XML_ERR_NAME_TOO_LONG" link="libxml2-xmlerror.html#XML_ERR_NAME_TOO_LONG"/>
+ <function name="XML_ERR_NMTOKEN_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_NMTOKEN_REQUIRED"/>
+ <function name="XML_ERR_NONE" link="libxml2-xmlerror.html#XML_ERR_NONE"/>
+ <function name="XML_ERR_NOTATION_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_NOTATION_NOT_FINISHED"/>
+ <function name="XML_ERR_NOTATION_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_NOTATION_NOT_STARTED"/>
+ <function name="XML_ERR_NOTATION_PROCESSING" link="libxml2-xmlerror.html#XML_ERR_NOTATION_PROCESSING"/>
+ <function name="XML_ERR_NOT_STANDALONE" link="libxml2-xmlerror.html#XML_ERR_NOT_STANDALONE"/>
+ <function name="XML_ERR_NOT_WELL_BALANCED" link="libxml2-xmlerror.html#XML_ERR_NOT_WELL_BALANCED"/>
+ <function name="XML_ERR_NO_DTD" link="libxml2-xmlerror.html#XML_ERR_NO_DTD"/>
+ <function name="XML_ERR_NO_MEMORY" link="libxml2-xmlerror.html#XML_ERR_NO_MEMORY"/>
+ <function name="XML_ERR_NS_DECL_ERROR" link="libxml2-xmlerror.html#XML_ERR_NS_DECL_ERROR"/>
+ <function name="XML_ERR_OK" link="libxml2-xmlerror.html#XML_ERR_OK"/>
+ <function name="XML_ERR_PCDATA_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_PCDATA_REQUIRED"/>
+ <function name="XML_ERR_PEREF_AT_EOF" link="libxml2-xmlerror.html#XML_ERR_PEREF_AT_EOF"/>
+ <function name="XML_ERR_PEREF_IN_EPILOG" link="libxml2-xmlerror.html#XML_ERR_PEREF_IN_EPILOG"/>
+ <function name="XML_ERR_PEREF_IN_INT_SUBSET" link="libxml2-xmlerror.html#XML_ERR_PEREF_IN_INT_SUBSET"/>
+ <function name="XML_ERR_PEREF_IN_PROLOG" link="libxml2-xmlerror.html#XML_ERR_PEREF_IN_PROLOG"/>
+ <function name="XML_ERR_PEREF_NO_NAME" link="libxml2-xmlerror.html#XML_ERR_PEREF_NO_NAME"/>
+ <function name="XML_ERR_PEREF_SEMICOL_MISSING" link="libxml2-xmlerror.html#XML_ERR_PEREF_SEMICOL_MISSING"/>
+ <function name="XML_ERR_PI_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_PI_NOT_FINISHED"/>
+ <function name="XML_ERR_PI_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_PI_NOT_STARTED"/>
+ <function name="XML_ERR_PUBID_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_PUBID_REQUIRED"/>
+ <function name="XML_ERR_RESERVED_XML_NAME" link="libxml2-xmlerror.html#XML_ERR_RESERVED_XML_NAME"/>
+ <function name="XML_ERR_SEPARATOR_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_SEPARATOR_REQUIRED"/>
+ <function name="XML_ERR_SPACE_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_SPACE_REQUIRED"/>
+ <function name="XML_ERR_STANDALONE_VALUE" link="libxml2-xmlerror.html#XML_ERR_STANDALONE_VALUE"/>
+ <function name="XML_ERR_STRING_NOT_CLOSED" link="libxml2-xmlerror.html#XML_ERR_STRING_NOT_CLOSED"/>
+ <function name="XML_ERR_STRING_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_STRING_NOT_STARTED"/>
+ <function name="XML_ERR_TAG_NAME_MISMATCH" link="libxml2-xmlerror.html#XML_ERR_TAG_NAME_MISMATCH"/>
+ <function name="XML_ERR_TAG_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_TAG_NOT_FINISHED"/>
+ <function name="XML_ERR_UNDECLARED_ENTITY" link="libxml2-xmlerror.html#XML_ERR_UNDECLARED_ENTITY"/>
+ <function name="XML_ERR_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_ERR_UNKNOWN_ENCODING"/>
+ <function name="XML_ERR_UNKNOWN_VERSION" link="libxml2-xmlerror.html#XML_ERR_UNKNOWN_VERSION"/>
+ <function name="XML_ERR_UNPARSED_ENTITY" link="libxml2-xmlerror.html#XML_ERR_UNPARSED_ENTITY"/>
+ <function name="XML_ERR_UNSUPPORTED_ENCODING" link="libxml2-xmlerror.html#XML_ERR_UNSUPPORTED_ENCODING"/>
+ <function name="XML_ERR_URI_FRAGMENT" link="libxml2-xmlerror.html#XML_ERR_URI_FRAGMENT"/>
+ <function name="XML_ERR_URI_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_URI_REQUIRED"/>
+ <function name="XML_ERR_USER_STOP" link="libxml2-xmlerror.html#XML_ERR_USER_STOP"/>
+ <function name="XML_ERR_VALUE_REQUIRED" link="libxml2-xmlerror.html#XML_ERR_VALUE_REQUIRED"/>
+ <function name="XML_ERR_VERSION_MISMATCH" link="libxml2-xmlerror.html#XML_ERR_VERSION_MISMATCH"/>
+ <function name="XML_ERR_VERSION_MISSING" link="libxml2-xmlerror.html#XML_ERR_VERSION_MISSING"/>
+ <function name="XML_ERR_WARNING" link="libxml2-xmlerror.html#XML_ERR_WARNING"/>
+ <function name="XML_ERR_XMLDECL_NOT_FINISHED" link="libxml2-xmlerror.html#XML_ERR_XMLDECL_NOT_FINISHED"/>
+ <function name="XML_ERR_XMLDECL_NOT_STARTED" link="libxml2-xmlerror.html#XML_ERR_XMLDECL_NOT_STARTED"/>
+ <function name="XML_EXP_ATOM" link="libxml2-xmlregexp.html#XML_EXP_ATOM"/>
+ <function name="XML_EXP_COUNT" link="libxml2-xmlregexp.html#XML_EXP_COUNT"/>
+ <function name="XML_EXP_EMPTY" link="libxml2-xmlregexp.html#XML_EXP_EMPTY"/>
+ <function name="XML_EXP_FORBID" link="libxml2-xmlregexp.html#XML_EXP_FORBID"/>
+ <function name="XML_EXP_OR" link="libxml2-xmlregexp.html#XML_EXP_OR"/>
+ <function name="XML_EXP_SEQ" link="libxml2-xmlregexp.html#XML_EXP_SEQ"/>
+ <function name="XML_EXTERNAL_GENERAL_PARSED_ENTITY" link="libxml2-entities.html#XML_EXTERNAL_GENERAL_PARSED_ENTITY"/>
+ <function name="XML_EXTERNAL_GENERAL_UNPARSED_ENTITY" link="libxml2-entities.html#XML_EXTERNAL_GENERAL_UNPARSED_ENTITY"/>
+ <function name="XML_EXTERNAL_PARAMETER_ENTITY" link="libxml2-entities.html#XML_EXTERNAL_PARAMETER_ENTITY"/>
+ <function name="XML_FROM_BUFFER" link="libxml2-xmlerror.html#XML_FROM_BUFFER"/>
+ <function name="XML_FROM_C14N" link="libxml2-xmlerror.html#XML_FROM_C14N"/>
+ <function name="XML_FROM_CATALOG" link="libxml2-xmlerror.html#XML_FROM_CATALOG"/>
+ <function name="XML_FROM_CHECK" link="libxml2-xmlerror.html#XML_FROM_CHECK"/>
+ <function name="XML_FROM_DATATYPE" link="libxml2-xmlerror.html#XML_FROM_DATATYPE"/>
+ <function name="XML_FROM_DTD" link="libxml2-xmlerror.html#XML_FROM_DTD"/>
+ <function name="XML_FROM_FTP" link="libxml2-xmlerror.html#XML_FROM_FTP"/>
+ <function name="XML_FROM_HTML" link="libxml2-xmlerror.html#XML_FROM_HTML"/>
+ <function name="XML_FROM_HTTP" link="libxml2-xmlerror.html#XML_FROM_HTTP"/>
+ <function name="XML_FROM_I18N" link="libxml2-xmlerror.html#XML_FROM_I18N"/>
+ <function name="XML_FROM_IO" link="libxml2-xmlerror.html#XML_FROM_IO"/>
+ <function name="XML_FROM_MEMORY" link="libxml2-xmlerror.html#XML_FROM_MEMORY"/>
+ <function name="XML_FROM_MODULE" link="libxml2-xmlerror.html#XML_FROM_MODULE"/>
+ <function name="XML_FROM_NAMESPACE" link="libxml2-xmlerror.html#XML_FROM_NAMESPACE"/>
+ <function name="XML_FROM_NONE" link="libxml2-xmlerror.html#XML_FROM_NONE"/>
+ <function name="XML_FROM_OUTPUT" link="libxml2-xmlerror.html#XML_FROM_OUTPUT"/>
+ <function name="XML_FROM_PARSER" link="libxml2-xmlerror.html#XML_FROM_PARSER"/>
+ <function name="XML_FROM_REGEXP" link="libxml2-xmlerror.html#XML_FROM_REGEXP"/>
+ <function name="XML_FROM_RELAXNGP" link="libxml2-xmlerror.html#XML_FROM_RELAXNGP"/>
+ <function name="XML_FROM_RELAXNGV" link="libxml2-xmlerror.html#XML_FROM_RELAXNGV"/>
+ <function name="XML_FROM_SCHEMASP" link="libxml2-xmlerror.html#XML_FROM_SCHEMASP"/>
+ <function name="XML_FROM_SCHEMASV" link="libxml2-xmlerror.html#XML_FROM_SCHEMASV"/>
+ <function name="XML_FROM_SCHEMATRONV" link="libxml2-xmlerror.html#XML_FROM_SCHEMATRONV"/>
+ <function name="XML_FROM_TREE" link="libxml2-xmlerror.html#XML_FROM_TREE"/>
+ <function name="XML_FROM_URI" link="libxml2-xmlerror.html#XML_FROM_URI"/>
+ <function name="XML_FROM_VALID" link="libxml2-xmlerror.html#XML_FROM_VALID"/>
+ <function name="XML_FROM_WRITER" link="libxml2-xmlerror.html#XML_FROM_WRITER"/>
+ <function name="XML_FROM_XINCLUDE" link="libxml2-xmlerror.html#XML_FROM_XINCLUDE"/>
+ <function name="XML_FROM_XPATH" link="libxml2-xmlerror.html#XML_FROM_XPATH"/>
+ <function name="XML_FROM_XPOINTER" link="libxml2-xmlerror.html#XML_FROM_XPOINTER"/>
+ <function name="XML_FROM_XSLT" link="libxml2-xmlerror.html#XML_FROM_XSLT"/>
+ <function name="XML_FTP_ACCNT" link="libxml2-xmlerror.html#XML_FTP_ACCNT"/>
+ <function name="XML_FTP_EPSV_ANSWER" link="libxml2-xmlerror.html#XML_FTP_EPSV_ANSWER"/>
+ <function name="XML_FTP_PASV_ANSWER" link="libxml2-xmlerror.html#XML_FTP_PASV_ANSWER"/>
+ <function name="XML_FTP_URL_SYNTAX" link="libxml2-xmlerror.html#XML_FTP_URL_SYNTAX"/>
+ <function name="XML_HTML_DOCUMENT_NODE" link="libxml2-tree.html#XML_HTML_DOCUMENT_NODE"/>
+ <function name="XML_HTML_STRUCURE_ERROR" link="libxml2-xmlerror.html#XML_HTML_STRUCURE_ERROR"/>
+ <function name="XML_HTML_UNKNOWN_TAG" link="libxml2-xmlerror.html#XML_HTML_UNKNOWN_TAG"/>
+ <function name="XML_HTTP_UNKNOWN_HOST" link="libxml2-xmlerror.html#XML_HTTP_UNKNOWN_HOST"/>
+ <function name="XML_HTTP_URL_SYNTAX" link="libxml2-xmlerror.html#XML_HTTP_URL_SYNTAX"/>
+ <function name="XML_HTTP_USE_IP" link="libxml2-xmlerror.html#XML_HTTP_USE_IP"/>
+ <function name="XML_I18N_CONV_FAILED" link="libxml2-xmlerror.html#XML_I18N_CONV_FAILED"/>
+ <function name="XML_I18N_EXCESS_HANDLER" link="libxml2-xmlerror.html#XML_I18N_EXCESS_HANDLER"/>
+ <function name="XML_I18N_NO_HANDLER" link="libxml2-xmlerror.html#XML_I18N_NO_HANDLER"/>
+ <function name="XML_I18N_NO_NAME" link="libxml2-xmlerror.html#XML_I18N_NO_NAME"/>
+ <function name="XML_I18N_NO_OUTPUT" link="libxml2-xmlerror.html#XML_I18N_NO_OUTPUT"/>
+ <function name="XML_INTERNAL_GENERAL_ENTITY" link="libxml2-entities.html#XML_INTERNAL_GENERAL_ENTITY"/>
+ <function name="XML_INTERNAL_PARAMETER_ENTITY" link="libxml2-entities.html#XML_INTERNAL_PARAMETER_ENTITY"/>
+ <function name="XML_INTERNAL_PREDEFINED_ENTITY" link="libxml2-entities.html#XML_INTERNAL_PREDEFINED_ENTITY"/>
+ <function name="XML_IO_BUFFER_FULL" link="libxml2-xmlerror.html#XML_IO_BUFFER_FULL"/>
+ <function name="XML_IO_EACCES" link="libxml2-xmlerror.html#XML_IO_EACCES"/>
+ <function name="XML_IO_EADDRINUSE" link="libxml2-xmlerror.html#XML_IO_EADDRINUSE"/>
+ <function name="XML_IO_EAFNOSUPPORT" link="libxml2-xmlerror.html#XML_IO_EAFNOSUPPORT"/>
+ <function name="XML_IO_EAGAIN" link="libxml2-xmlerror.html#XML_IO_EAGAIN"/>
+ <function name="XML_IO_EALREADY" link="libxml2-xmlerror.html#XML_IO_EALREADY"/>
+ <function name="XML_IO_EBADF" link="libxml2-xmlerror.html#XML_IO_EBADF"/>
+ <function name="XML_IO_EBADMSG" link="libxml2-xmlerror.html#XML_IO_EBADMSG"/>
+ <function name="XML_IO_EBUSY" link="libxml2-xmlerror.html#XML_IO_EBUSY"/>
+ <function name="XML_IO_ECANCELED" link="libxml2-xmlerror.html#XML_IO_ECANCELED"/>
+ <function name="XML_IO_ECHILD" link="libxml2-xmlerror.html#XML_IO_ECHILD"/>
+ <function name="XML_IO_ECONNREFUSED" link="libxml2-xmlerror.html#XML_IO_ECONNREFUSED"/>
+ <function name="XML_IO_EDEADLK" link="libxml2-xmlerror.html#XML_IO_EDEADLK"/>
+ <function name="XML_IO_EDOM" link="libxml2-xmlerror.html#XML_IO_EDOM"/>
+ <function name="XML_IO_EEXIST" link="libxml2-xmlerror.html#XML_IO_EEXIST"/>
+ <function name="XML_IO_EFAULT" link="libxml2-xmlerror.html#XML_IO_EFAULT"/>
+ <function name="XML_IO_EFBIG" link="libxml2-xmlerror.html#XML_IO_EFBIG"/>
+ <function name="XML_IO_EINPROGRESS" link="libxml2-xmlerror.html#XML_IO_EINPROGRESS"/>
+ <function name="XML_IO_EINTR" link="libxml2-xmlerror.html#XML_IO_EINTR"/>
+ <function name="XML_IO_EINVAL" link="libxml2-xmlerror.html#XML_IO_EINVAL"/>
+ <function name="XML_IO_EIO" link="libxml2-xmlerror.html#XML_IO_EIO"/>
+ <function name="XML_IO_EISCONN" link="libxml2-xmlerror.html#XML_IO_EISCONN"/>
+ <function name="XML_IO_EISDIR" link="libxml2-xmlerror.html#XML_IO_EISDIR"/>
+ <function name="XML_IO_EMFILE" link="libxml2-xmlerror.html#XML_IO_EMFILE"/>
+ <function name="XML_IO_EMLINK" link="libxml2-xmlerror.html#XML_IO_EMLINK"/>
+ <function name="XML_IO_EMSGSIZE" link="libxml2-xmlerror.html#XML_IO_EMSGSIZE"/>
+ <function name="XML_IO_ENAMETOOLONG" link="libxml2-xmlerror.html#XML_IO_ENAMETOOLONG"/>
+ <function name="XML_IO_ENCODER" link="libxml2-xmlerror.html#XML_IO_ENCODER"/>
+ <function name="XML_IO_ENETUNREACH" link="libxml2-xmlerror.html#XML_IO_ENETUNREACH"/>
+ <function name="XML_IO_ENFILE" link="libxml2-xmlerror.html#XML_IO_ENFILE"/>
+ <function name="XML_IO_ENODEV" link="libxml2-xmlerror.html#XML_IO_ENODEV"/>
+ <function name="XML_IO_ENOENT" link="libxml2-xmlerror.html#XML_IO_ENOENT"/>
+ <function name="XML_IO_ENOEXEC" link="libxml2-xmlerror.html#XML_IO_ENOEXEC"/>
+ <function name="XML_IO_ENOLCK" link="libxml2-xmlerror.html#XML_IO_ENOLCK"/>
+ <function name="XML_IO_ENOMEM" link="libxml2-xmlerror.html#XML_IO_ENOMEM"/>
+ <function name="XML_IO_ENOSPC" link="libxml2-xmlerror.html#XML_IO_ENOSPC"/>
+ <function name="XML_IO_ENOSYS" link="libxml2-xmlerror.html#XML_IO_ENOSYS"/>
+ <function name="XML_IO_ENOTDIR" link="libxml2-xmlerror.html#XML_IO_ENOTDIR"/>
+ <function name="XML_IO_ENOTEMPTY" link="libxml2-xmlerror.html#XML_IO_ENOTEMPTY"/>
+ <function name="XML_IO_ENOTSOCK" link="libxml2-xmlerror.html#XML_IO_ENOTSOCK"/>
+ <function name="XML_IO_ENOTSUP" link="libxml2-xmlerror.html#XML_IO_ENOTSUP"/>
+ <function name="XML_IO_ENOTTY" link="libxml2-xmlerror.html#XML_IO_ENOTTY"/>
+ <function name="XML_IO_ENXIO" link="libxml2-xmlerror.html#XML_IO_ENXIO"/>
+ <function name="XML_IO_EPERM" link="libxml2-xmlerror.html#XML_IO_EPERM"/>
+ <function name="XML_IO_EPIPE" link="libxml2-xmlerror.html#XML_IO_EPIPE"/>
+ <function name="XML_IO_ERANGE" link="libxml2-xmlerror.html#XML_IO_ERANGE"/>
+ <function name="XML_IO_EROFS" link="libxml2-xmlerror.html#XML_IO_EROFS"/>
+ <function name="XML_IO_ESPIPE" link="libxml2-xmlerror.html#XML_IO_ESPIPE"/>
+ <function name="XML_IO_ESRCH" link="libxml2-xmlerror.html#XML_IO_ESRCH"/>
+ <function name="XML_IO_ETIMEDOUT" link="libxml2-xmlerror.html#XML_IO_ETIMEDOUT"/>
+ <function name="XML_IO_EXDEV" link="libxml2-xmlerror.html#XML_IO_EXDEV"/>
+ <function name="XML_IO_FLUSH" link="libxml2-xmlerror.html#XML_IO_FLUSH"/>
+ <function name="XML_IO_LOAD_ERROR" link="libxml2-xmlerror.html#XML_IO_LOAD_ERROR"/>
+ <function name="XML_IO_NETWORK_ATTEMPT" link="libxml2-xmlerror.html#XML_IO_NETWORK_ATTEMPT"/>
+ <function name="XML_IO_NO_INPUT" link="libxml2-xmlerror.html#XML_IO_NO_INPUT"/>
+ <function name="XML_IO_UNKNOWN" link="libxml2-xmlerror.html#XML_IO_UNKNOWN"/>
+ <function name="XML_IO_WRITE" link="libxml2-xmlerror.html#XML_IO_WRITE"/>
+ <function name="XML_MODULE_CLOSE" link="libxml2-xmlerror.html#XML_MODULE_CLOSE"/>
+ <function name="XML_MODULE_LAZY" link="libxml2-xmlmodule.html#XML_MODULE_LAZY"/>
+ <function name="XML_MODULE_LOCAL" link="libxml2-xmlmodule.html#XML_MODULE_LOCAL"/>
+ <function name="XML_MODULE_OPEN" link="libxml2-xmlerror.html#XML_MODULE_OPEN"/>
+ <function name="XML_NAMESPACE_DECL" link="libxml2-tree.html#XML_NAMESPACE_DECL"/>
+ <function name="XML_NOTATION_NODE" link="libxml2-tree.html#XML_NOTATION_NODE"/>
+ <function name="XML_NS_ERR_ATTRIBUTE_REDEFINED" link="libxml2-xmlerror.html#XML_NS_ERR_ATTRIBUTE_REDEFINED"/>
+ <function name="XML_NS_ERR_COLON" link="libxml2-xmlerror.html#XML_NS_ERR_COLON"/>
+ <function name="XML_NS_ERR_EMPTY" link="libxml2-xmlerror.html#XML_NS_ERR_EMPTY"/>
+ <function name="XML_NS_ERR_QNAME" link="libxml2-xmlerror.html#XML_NS_ERR_QNAME"/>
+ <function name="XML_NS_ERR_UNDEFINED_NAMESPACE" link="libxml2-xmlerror.html#XML_NS_ERR_UNDEFINED_NAMESPACE"/>
+ <function name="XML_NS_ERR_XML_NAMESPACE" link="libxml2-xmlerror.html#XML_NS_ERR_XML_NAMESPACE"/>
+ <function name="XML_PARSER_ATTRIBUTE_VALUE" link="libxml2-parser.html#XML_PARSER_ATTRIBUTE_VALUE"/>
+ <function name="XML_PARSER_CDATA_SECTION" link="libxml2-parser.html#XML_PARSER_CDATA_SECTION"/>
+ <function name="XML_PARSER_COMMENT" link="libxml2-parser.html#XML_PARSER_COMMENT"/>
+ <function name="XML_PARSER_CONTENT" link="libxml2-parser.html#XML_PARSER_CONTENT"/>
+ <function name="XML_PARSER_DEFAULTATTRS" link="libxml2-xmlreader.html#XML_PARSER_DEFAULTATTRS"/>
+ <function name="XML_PARSER_DTD" link="libxml2-parser.html#XML_PARSER_DTD"/>
+ <function name="XML_PARSER_END_TAG" link="libxml2-parser.html#XML_PARSER_END_TAG"/>
+ <function name="XML_PARSER_ENTITY_DECL" link="libxml2-parser.html#XML_PARSER_ENTITY_DECL"/>
+ <function name="XML_PARSER_ENTITY_VALUE" link="libxml2-parser.html#XML_PARSER_ENTITY_VALUE"/>
+ <function name="XML_PARSER_EOF" link="libxml2-parser.html#XML_PARSER_EOF"/>
+ <function name="XML_PARSER_EPILOG" link="libxml2-parser.html#XML_PARSER_EPILOG"/>
+ <function name="XML_PARSER_IGNORE" link="libxml2-parser.html#XML_PARSER_IGNORE"/>
+ <function name="XML_PARSER_LOADDTD" link="libxml2-xmlreader.html#XML_PARSER_LOADDTD"/>
+ <function name="XML_PARSER_MISC" link="libxml2-parser.html#XML_PARSER_MISC"/>
+ <function name="XML_PARSER_PI" link="libxml2-parser.html#XML_PARSER_PI"/>
+ <function name="XML_PARSER_PROLOG" link="libxml2-parser.html#XML_PARSER_PROLOG"/>
+ <function name="XML_PARSER_PUBLIC_LITERAL" link="libxml2-parser.html#XML_PARSER_PUBLIC_LITERAL"/>
+ <function name="XML_PARSER_SEVERITY_ERROR" link="libxml2-xmlreader.html#XML_PARSER_SEVERITY_ERROR"/>
+ <function name="XML_PARSER_SEVERITY_VALIDITY_ERROR" link="libxml2-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_ERROR"/>
+ <function name="XML_PARSER_SEVERITY_VALIDITY_WARNING" link="libxml2-xmlreader.html#XML_PARSER_SEVERITY_VALIDITY_WARNING"/>
+ <function name="XML_PARSER_SEVERITY_WARNING" link="libxml2-xmlreader.html#XML_PARSER_SEVERITY_WARNING"/>
+ <function name="XML_PARSER_START" link="libxml2-parser.html#XML_PARSER_START"/>
+ <function name="XML_PARSER_START_TAG" link="libxml2-parser.html#XML_PARSER_START_TAG"/>
+ <function name="XML_PARSER_SUBST_ENTITIES" link="libxml2-xmlreader.html#XML_PARSER_SUBST_ENTITIES"/>
+ <function name="XML_PARSER_SYSTEM_LITERAL" link="libxml2-parser.html#XML_PARSER_SYSTEM_LITERAL"/>
+ <function name="XML_PARSER_VALIDATE" link="libxml2-xmlreader.html#XML_PARSER_VALIDATE"/>
+ <function name="XML_PARSE_BIG_LINES" link="libxml2-parser.html#XML_PARSE_BIG_LINES"/>
+ <function name="XML_PARSE_COMPACT" link="libxml2-parser.html#XML_PARSE_COMPACT"/>
+ <function name="XML_PARSE_DOM" link="libxml2-parser.html#XML_PARSE_DOM"/>
+ <function name="XML_PARSE_DTDATTR" link="libxml2-parser.html#XML_PARSE_DTDATTR"/>
+ <function name="XML_PARSE_DTDLOAD" link="libxml2-parser.html#XML_PARSE_DTDLOAD"/>
+ <function name="XML_PARSE_DTDVALID" link="libxml2-parser.html#XML_PARSE_DTDVALID"/>
+ <function name="XML_PARSE_HUGE" link="libxml2-parser.html#XML_PARSE_HUGE"/>
+ <function name="XML_PARSE_IGNORE_ENC" link="libxml2-parser.html#XML_PARSE_IGNORE_ENC"/>
+ <function name="XML_PARSE_NOBASEFIX" link="libxml2-parser.html#XML_PARSE_NOBASEFIX"/>
+ <function name="XML_PARSE_NOBLANKS" link="libxml2-parser.html#XML_PARSE_NOBLANKS"/>
+ <function name="XML_PARSE_NOCDATA" link="libxml2-parser.html#XML_PARSE_NOCDATA"/>
+ <function name="XML_PARSE_NODICT" link="libxml2-parser.html#XML_PARSE_NODICT"/>
+ <function name="XML_PARSE_NOENT" link="libxml2-parser.html#XML_PARSE_NOENT"/>
+ <function name="XML_PARSE_NOERROR" link="libxml2-parser.html#XML_PARSE_NOERROR"/>
+ <function name="XML_PARSE_NONET" link="libxml2-parser.html#XML_PARSE_NONET"/>
+ <function name="XML_PARSE_NOWARNING" link="libxml2-parser.html#XML_PARSE_NOWARNING"/>
+ <function name="XML_PARSE_NOXINCNODE" link="libxml2-parser.html#XML_PARSE_NOXINCNODE"/>
+ <function name="XML_PARSE_NSCLEAN" link="libxml2-parser.html#XML_PARSE_NSCLEAN"/>
+ <function name="XML_PARSE_OLD10" link="libxml2-parser.html#XML_PARSE_OLD10"/>
+ <function name="XML_PARSE_OLDSAX" link="libxml2-parser.html#XML_PARSE_OLDSAX"/>
+ <function name="XML_PARSE_PEDANTIC" link="libxml2-parser.html#XML_PARSE_PEDANTIC"/>
+ <function name="XML_PARSE_PUSH_DOM" link="libxml2-parser.html#XML_PARSE_PUSH_DOM"/>
+ <function name="XML_PARSE_PUSH_SAX" link="libxml2-parser.html#XML_PARSE_PUSH_SAX"/>
+ <function name="XML_PARSE_READER" link="libxml2-parser.html#XML_PARSE_READER"/>
+ <function name="XML_PARSE_RECOVER" link="libxml2-parser.html#XML_PARSE_RECOVER"/>
+ <function name="XML_PARSE_SAX" link="libxml2-parser.html#XML_PARSE_SAX"/>
+ <function name="XML_PARSE_SAX1" link="libxml2-parser.html#XML_PARSE_SAX1"/>
+ <function name="XML_PARSE_UNKNOWN" link="libxml2-parser.html#XML_PARSE_UNKNOWN"/>
+ <function name="XML_PARSE_XINCLUDE" link="libxml2-parser.html#XML_PARSE_XINCLUDE"/>
+ <function name="XML_PATTERN_DEFAULT" link="libxml2-pattern.html#XML_PATTERN_DEFAULT"/>
+ <function name="XML_PATTERN_XPATH" link="libxml2-pattern.html#XML_PATTERN_XPATH"/>
+ <function name="XML_PATTERN_XSFIELD" link="libxml2-pattern.html#XML_PATTERN_XSFIELD"/>
+ <function name="XML_PATTERN_XSSEL" link="libxml2-pattern.html#XML_PATTERN_XSSEL"/>
+ <function name="XML_PI_NODE" link="libxml2-tree.html#XML_PI_NODE"/>
+ <function name="XML_READER_TYPE_ATTRIBUTE" link="libxml2-xmlreader.html#XML_READER_TYPE_ATTRIBUTE"/>
+ <function name="XML_READER_TYPE_CDATA" link="libxml2-xmlreader.html#XML_READER_TYPE_CDATA"/>
+ <function name="XML_READER_TYPE_COMMENT" link="libxml2-xmlreader.html#XML_READER_TYPE_COMMENT"/>
+ <function name="XML_READER_TYPE_DOCUMENT" link="libxml2-xmlreader.html#XML_READER_TYPE_DOCUMENT"/>
+ <function name="XML_READER_TYPE_DOCUMENT_FRAGMENT" link="libxml2-xmlreader.html#XML_READER_TYPE_DOCUMENT_FRAGMENT"/>
+ <function name="XML_READER_TYPE_DOCUMENT_TYPE" link="libxml2-xmlreader.html#XML_READER_TYPE_DOCUMENT_TYPE"/>
+ <function name="XML_READER_TYPE_ELEMENT" link="libxml2-xmlreader.html#XML_READER_TYPE_ELEMENT"/>
+ <function name="XML_READER_TYPE_END_ELEMENT" link="libxml2-xmlreader.html#XML_READER_TYPE_END_ELEMENT"/>
+ <function name="XML_READER_TYPE_END_ENTITY" link="libxml2-xmlreader.html#XML_READER_TYPE_END_ENTITY"/>
+ <function name="XML_READER_TYPE_ENTITY" link="libxml2-xmlreader.html#XML_READER_TYPE_ENTITY"/>
+ <function name="XML_READER_TYPE_ENTITY_REFERENCE" link="libxml2-xmlreader.html#XML_READER_TYPE_ENTITY_REFERENCE"/>
+ <function name="XML_READER_TYPE_NONE" link="libxml2-xmlreader.html#XML_READER_TYPE_NONE"/>
+ <function name="XML_READER_TYPE_NOTATION" link="libxml2-xmlreader.html#XML_READER_TYPE_NOTATION"/>
+ <function name="XML_READER_TYPE_PROCESSING_INSTRUCTION" link="libxml2-xmlreader.html#XML_READER_TYPE_PROCESSING_INSTRUCTION"/>
+ <function name="XML_READER_TYPE_SIGNIFICANT_WHITESPACE" link="libxml2-xmlreader.html#XML_READER_TYPE_SIGNIFICANT_WHITESPACE"/>
+ <function name="XML_READER_TYPE_TEXT" link="libxml2-xmlreader.html#XML_READER_TYPE_TEXT"/>
+ <function name="XML_READER_TYPE_WHITESPACE" link="libxml2-xmlreader.html#XML_READER_TYPE_WHITESPACE"/>
+ <function name="XML_READER_TYPE_XML_DECLARATION" link="libxml2-xmlreader.html#XML_READER_TYPE_XML_DECLARATION"/>
+ <function name="XML_REGEXP_COMPILE_ERROR" link="libxml2-xmlerror.html#XML_REGEXP_COMPILE_ERROR"/>
+ <function name="XML_RELAXNGP_CRNG" link="libxml2-relaxng.html#XML_RELAXNGP_CRNG"/>
+ <function name="XML_RELAXNGP_FREE_DOC" link="libxml2-relaxng.html#XML_RELAXNGP_FREE_DOC"/>
+ <function name="XML_RELAXNGP_NONE" link="libxml2-relaxng.html#XML_RELAXNGP_NONE"/>
+ <function name="XML_RELAXNG_ERR_ATTREXTRANS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ATTREXTRANS"/>
+ <function name="XML_RELAXNG_ERR_ATTRNAME" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ATTRNAME"/>
+ <function name="XML_RELAXNG_ERR_ATTRNONS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ATTRNONS"/>
+ <function name="XML_RELAXNG_ERR_ATTRVALID" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ATTRVALID"/>
+ <function name="XML_RELAXNG_ERR_ATTRWRONGNS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ATTRWRONGNS"/>
+ <function name="XML_RELAXNG_ERR_CONTENTVALID" link="libxml2-relaxng.html#XML_RELAXNG_ERR_CONTENTVALID"/>
+ <function name="XML_RELAXNG_ERR_DATAELEM" link="libxml2-relaxng.html#XML_RELAXNG_ERR_DATAELEM"/>
+ <function name="XML_RELAXNG_ERR_DATATYPE" link="libxml2-relaxng.html#XML_RELAXNG_ERR_DATATYPE"/>
+ <function name="XML_RELAXNG_ERR_DUPID" link="libxml2-relaxng.html#XML_RELAXNG_ERR_DUPID"/>
+ <function name="XML_RELAXNG_ERR_ELEMEXTRANS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMEXTRANS"/>
+ <function name="XML_RELAXNG_ERR_ELEMNAME" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMNAME"/>
+ <function name="XML_RELAXNG_ERR_ELEMNONS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMNONS"/>
+ <function name="XML_RELAXNG_ERR_ELEMNOTEMPTY" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMNOTEMPTY"/>
+ <function name="XML_RELAXNG_ERR_ELEMWRONG" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMWRONG"/>
+ <function name="XML_RELAXNG_ERR_ELEMWRONGNS" link="libxml2-relaxng.html#XML_RELAXNG_ERR_ELEMWRONGNS"/>
+ <function name="XML_RELAXNG_ERR_EXTRACONTENT" link="libxml2-relaxng.html#XML_RELAXNG_ERR_EXTRACONTENT"/>
+ <function name="XML_RELAXNG_ERR_EXTRADATA" link="libxml2-relaxng.html#XML_RELAXNG_ERR_EXTRADATA"/>
+ <function name="XML_RELAXNG_ERR_INTEREXTRA" link="libxml2-relaxng.html#XML_RELAXNG_ERR_INTEREXTRA"/>
+ <function name="XML_RELAXNG_ERR_INTERNAL" link="libxml2-relaxng.html#XML_RELAXNG_ERR_INTERNAL"/>
+ <function name="XML_RELAXNG_ERR_INTERNODATA" link="libxml2-relaxng.html#XML_RELAXNG_ERR_INTERNODATA"/>
+ <function name="XML_RELAXNG_ERR_INTERSEQ" link="libxml2-relaxng.html#XML_RELAXNG_ERR_INTERSEQ"/>
+ <function name="XML_RELAXNG_ERR_INVALIDATTR" link="libxml2-relaxng.html#XML_RELAXNG_ERR_INVALIDATTR"/>
+ <function name="XML_RELAXNG_ERR_LACKDATA" link="libxml2-relaxng.html#XML_RELAXNG_ERR_LACKDATA"/>
+ <function name="XML_RELAXNG_ERR_LIST" link="libxml2-relaxng.html#XML_RELAXNG_ERR_LIST"/>
+ <function name="XML_RELAXNG_ERR_LISTELEM" link="libxml2-relaxng.html#XML_RELAXNG_ERR_LISTELEM"/>
+ <function name="XML_RELAXNG_ERR_LISTEMPTY" link="libxml2-relaxng.html#XML_RELAXNG_ERR_LISTEMPTY"/>
+ <function name="XML_RELAXNG_ERR_LISTEXTRA" link="libxml2-relaxng.html#XML_RELAXNG_ERR_LISTEXTRA"/>
+ <function name="XML_RELAXNG_ERR_MEMORY" link="libxml2-relaxng.html#XML_RELAXNG_ERR_MEMORY"/>
+ <function name="XML_RELAXNG_ERR_NODEFINE" link="libxml2-relaxng.html#XML_RELAXNG_ERR_NODEFINE"/>
+ <function name="XML_RELAXNG_ERR_NOELEM" link="libxml2-relaxng.html#XML_RELAXNG_ERR_NOELEM"/>
+ <function name="XML_RELAXNG_ERR_NOGRAMMAR" link="libxml2-relaxng.html#XML_RELAXNG_ERR_NOGRAMMAR"/>
+ <function name="XML_RELAXNG_ERR_NOSTATE" link="libxml2-relaxng.html#XML_RELAXNG_ERR_NOSTATE"/>
+ <function name="XML_RELAXNG_ERR_NOTELEM" link="libxml2-relaxng.html#XML_RELAXNG_ERR_NOTELEM"/>
+ <function name="XML_RELAXNG_ERR_TEXTWRONG" link="libxml2-relaxng.html#XML_RELAXNG_ERR_TEXTWRONG"/>
+ <function name="XML_RELAXNG_ERR_TYPE" link="libxml2-relaxng.html#XML_RELAXNG_ERR_TYPE"/>
+ <function name="XML_RELAXNG_ERR_TYPECMP" link="libxml2-relaxng.html#XML_RELAXNG_ERR_TYPECMP"/>
+ <function name="XML_RELAXNG_ERR_TYPEVAL" link="libxml2-relaxng.html#XML_RELAXNG_ERR_TYPEVAL"/>
+ <function name="XML_RELAXNG_ERR_VALELEM" link="libxml2-relaxng.html#XML_RELAXNG_ERR_VALELEM"/>
+ <function name="XML_RELAXNG_ERR_VALUE" link="libxml2-relaxng.html#XML_RELAXNG_ERR_VALUE"/>
+ <function name="XML_RELAXNG_OK" link="libxml2-relaxng.html#XML_RELAXNG_OK"/>
+ <function name="XML_RNGP_ANYNAME_ATTR_ANCESTOR" link="libxml2-xmlerror.html#XML_RNGP_ANYNAME_ATTR_ANCESTOR"/>
+ <function name="XML_RNGP_ATTRIBUTE_CHILDREN" link="libxml2-xmlerror.html#XML_RNGP_ATTRIBUTE_CHILDREN"/>
+ <function name="XML_RNGP_ATTRIBUTE_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_ATTRIBUTE_CONTENT"/>
+ <function name="XML_RNGP_ATTRIBUTE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_ATTRIBUTE_EMPTY"/>
+ <function name="XML_RNGP_ATTRIBUTE_NOOP" link="libxml2-xmlerror.html#XML_RNGP_ATTRIBUTE_NOOP"/>
+ <function name="XML_RNGP_ATTR_CONFLICT" link="libxml2-xmlerror.html#XML_RNGP_ATTR_CONFLICT"/>
+ <function name="XML_RNGP_CHOICE_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_CHOICE_CONTENT"/>
+ <function name="XML_RNGP_CHOICE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_CHOICE_EMPTY"/>
+ <function name="XML_RNGP_CREATE_FAILURE" link="libxml2-xmlerror.html#XML_RNGP_CREATE_FAILURE"/>
+ <function name="XML_RNGP_DATA_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_DATA_CONTENT"/>
+ <function name="XML_RNGP_DEFINE_CREATE_FAILED" link="libxml2-xmlerror.html#XML_RNGP_DEFINE_CREATE_FAILED"/>
+ <function name="XML_RNGP_DEFINE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_DEFINE_EMPTY"/>
+ <function name="XML_RNGP_DEFINE_MISSING" link="libxml2-xmlerror.html#XML_RNGP_DEFINE_MISSING"/>
+ <function name="XML_RNGP_DEFINE_NAME_MISSING" link="libxml2-xmlerror.html#XML_RNGP_DEFINE_NAME_MISSING"/>
+ <function name="XML_RNGP_DEF_CHOICE_AND_INTERLEAVE" link="libxml2-xmlerror.html#XML_RNGP_DEF_CHOICE_AND_INTERLEAVE"/>
+ <function name="XML_RNGP_ELEMENT_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_ELEMENT_CONTENT"/>
+ <function name="XML_RNGP_ELEMENT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_ELEMENT_EMPTY"/>
+ <function name="XML_RNGP_ELEMENT_NAME" link="libxml2-xmlerror.html#XML_RNGP_ELEMENT_NAME"/>
+ <function name="XML_RNGP_ELEMENT_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_ELEMENT_NO_CONTENT"/>
+ <function name="XML_RNGP_ELEM_CONTENT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_ELEM_CONTENT_EMPTY"/>
+ <function name="XML_RNGP_ELEM_CONTENT_ERROR" link="libxml2-xmlerror.html#XML_RNGP_ELEM_CONTENT_ERROR"/>
+ <function name="XML_RNGP_ELEM_TEXT_CONFLICT" link="libxml2-xmlerror.html#XML_RNGP_ELEM_TEXT_CONFLICT"/>
+ <function name="XML_RNGP_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_EMPTY"/>
+ <function name="XML_RNGP_EMPTY_CONSTRUCT" link="libxml2-xmlerror.html#XML_RNGP_EMPTY_CONSTRUCT"/>
+ <function name="XML_RNGP_EMPTY_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_EMPTY_CONTENT"/>
+ <function name="XML_RNGP_EMPTY_NOT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_EMPTY_NOT_EMPTY"/>
+ <function name="XML_RNGP_ERROR_TYPE_LIB" link="libxml2-xmlerror.html#XML_RNGP_ERROR_TYPE_LIB"/>
+ <function name="XML_RNGP_EXCEPT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_EXCEPT_EMPTY"/>
+ <function name="XML_RNGP_EXCEPT_MISSING" link="libxml2-xmlerror.html#XML_RNGP_EXCEPT_MISSING"/>
+ <function name="XML_RNGP_EXCEPT_MULTIPLE" link="libxml2-xmlerror.html#XML_RNGP_EXCEPT_MULTIPLE"/>
+ <function name="XML_RNGP_EXCEPT_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_EXCEPT_NO_CONTENT"/>
+ <function name="XML_RNGP_EXTERNALREF_EMTPY" link="libxml2-xmlerror.html#XML_RNGP_EXTERNALREF_EMTPY"/>
+ <function name="XML_RNGP_EXTERNALREF_RECURSE" link="libxml2-xmlerror.html#XML_RNGP_EXTERNALREF_RECURSE"/>
+ <function name="XML_RNGP_EXTERNAL_REF_FAILURE" link="libxml2-xmlerror.html#XML_RNGP_EXTERNAL_REF_FAILURE"/>
+ <function name="XML_RNGP_FORBIDDEN_ATTRIBUTE" link="libxml2-xmlerror.html#XML_RNGP_FORBIDDEN_ATTRIBUTE"/>
+ <function name="XML_RNGP_FOREIGN_ELEMENT" link="libxml2-xmlerror.html#XML_RNGP_FOREIGN_ELEMENT"/>
+ <function name="XML_RNGP_GRAMMAR_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_GRAMMAR_CONTENT"/>
+ <function name="XML_RNGP_GRAMMAR_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_GRAMMAR_EMPTY"/>
+ <function name="XML_RNGP_GRAMMAR_MISSING" link="libxml2-xmlerror.html#XML_RNGP_GRAMMAR_MISSING"/>
+ <function name="XML_RNGP_GRAMMAR_NO_START" link="libxml2-xmlerror.html#XML_RNGP_GRAMMAR_NO_START"/>
+ <function name="XML_RNGP_GROUP_ATTR_CONFLICT" link="libxml2-xmlerror.html#XML_RNGP_GROUP_ATTR_CONFLICT"/>
+ <function name="XML_RNGP_HREF_ERROR" link="libxml2-xmlerror.html#XML_RNGP_HREF_ERROR"/>
+ <function name="XML_RNGP_INCLUDE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_INCLUDE_EMPTY"/>
+ <function name="XML_RNGP_INCLUDE_FAILURE" link="libxml2-xmlerror.html#XML_RNGP_INCLUDE_FAILURE"/>
+ <function name="XML_RNGP_INCLUDE_RECURSE" link="libxml2-xmlerror.html#XML_RNGP_INCLUDE_RECURSE"/>
+ <function name="XML_RNGP_INTERLEAVE_ADD" link="libxml2-xmlerror.html#XML_RNGP_INTERLEAVE_ADD"/>
+ <function name="XML_RNGP_INTERLEAVE_CREATE_FAILED" link="libxml2-xmlerror.html#XML_RNGP_INTERLEAVE_CREATE_FAILED"/>
+ <function name="XML_RNGP_INTERLEAVE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_INTERLEAVE_EMPTY"/>
+ <function name="XML_RNGP_INTERLEAVE_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_INTERLEAVE_NO_CONTENT"/>
+ <function name="XML_RNGP_INVALID_DEFINE_NAME" link="libxml2-xmlerror.html#XML_RNGP_INVALID_DEFINE_NAME"/>
+ <function name="XML_RNGP_INVALID_URI" link="libxml2-xmlerror.html#XML_RNGP_INVALID_URI"/>
+ <function name="XML_RNGP_INVALID_VALUE" link="libxml2-xmlerror.html#XML_RNGP_INVALID_VALUE"/>
+ <function name="XML_RNGP_MISSING_HREF" link="libxml2-xmlerror.html#XML_RNGP_MISSING_HREF"/>
+ <function name="XML_RNGP_NAME_MISSING" link="libxml2-xmlerror.html#XML_RNGP_NAME_MISSING"/>
+ <function name="XML_RNGP_NEED_COMBINE" link="libxml2-xmlerror.html#XML_RNGP_NEED_COMBINE"/>
+ <function name="XML_RNGP_NOTALLOWED_NOT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_NOTALLOWED_NOT_EMPTY"/>
+ <function name="XML_RNGP_NSNAME_ATTR_ANCESTOR" link="libxml2-xmlerror.html#XML_RNGP_NSNAME_ATTR_ANCESTOR"/>
+ <function name="XML_RNGP_NSNAME_NO_NS" link="libxml2-xmlerror.html#XML_RNGP_NSNAME_NO_NS"/>
+ <function name="XML_RNGP_PARAM_FORBIDDEN" link="libxml2-xmlerror.html#XML_RNGP_PARAM_FORBIDDEN"/>
+ <function name="XML_RNGP_PARAM_NAME_MISSING" link="libxml2-xmlerror.html#XML_RNGP_PARAM_NAME_MISSING"/>
+ <function name="XML_RNGP_PARENTREF_CREATE_FAILED" link="libxml2-xmlerror.html#XML_RNGP_PARENTREF_CREATE_FAILED"/>
+ <function name="XML_RNGP_PARENTREF_NAME_INVALID" link="libxml2-xmlerror.html#XML_RNGP_PARENTREF_NAME_INVALID"/>
+ <function name="XML_RNGP_PARENTREF_NOT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_PARENTREF_NOT_EMPTY"/>
+ <function name="XML_RNGP_PARENTREF_NO_NAME" link="libxml2-xmlerror.html#XML_RNGP_PARENTREF_NO_NAME"/>
+ <function name="XML_RNGP_PARENTREF_NO_PARENT" link="libxml2-xmlerror.html#XML_RNGP_PARENTREF_NO_PARENT"/>
+ <function name="XML_RNGP_PARSE_ERROR" link="libxml2-xmlerror.html#XML_RNGP_PARSE_ERROR"/>
+ <function name="XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME" link="libxml2-xmlerror.html#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME"/>
+ <function name="XML_RNGP_PAT_ATTR_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_ATTR_ATTR"/>
+ <function name="XML_RNGP_PAT_ATTR_ELEM" link="libxml2-xmlerror.html#XML_RNGP_PAT_ATTR_ELEM"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ATTR"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_ELEM" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ELEM"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_EMPTY"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_GROUP" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_GROUP"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_LIST" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_LIST"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_ONEMORE" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_ONEMORE"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_REF" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_REF"/>
+ <function name="XML_RNGP_PAT_DATA_EXCEPT_TEXT" link="libxml2-xmlerror.html#XML_RNGP_PAT_DATA_EXCEPT_TEXT"/>
+ <function name="XML_RNGP_PAT_LIST_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_ATTR"/>
+ <function name="XML_RNGP_PAT_LIST_ELEM" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_ELEM"/>
+ <function name="XML_RNGP_PAT_LIST_INTERLEAVE" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_INTERLEAVE"/>
+ <function name="XML_RNGP_PAT_LIST_LIST" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_LIST"/>
+ <function name="XML_RNGP_PAT_LIST_REF" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_REF"/>
+ <function name="XML_RNGP_PAT_LIST_TEXT" link="libxml2-xmlerror.html#XML_RNGP_PAT_LIST_TEXT"/>
+ <function name="XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME" link="libxml2-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME"/>
+ <function name="XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME" link="libxml2-xmlerror.html#XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME"/>
+ <function name="XML_RNGP_PAT_ONEMORE_GROUP_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_ONEMORE_GROUP_ATTR"/>
+ <function name="XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR"/>
+ <function name="XML_RNGP_PAT_START_ATTR" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_ATTR"/>
+ <function name="XML_RNGP_PAT_START_DATA" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_DATA"/>
+ <function name="XML_RNGP_PAT_START_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_EMPTY"/>
+ <function name="XML_RNGP_PAT_START_GROUP" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_GROUP"/>
+ <function name="XML_RNGP_PAT_START_INTERLEAVE" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_INTERLEAVE"/>
+ <function name="XML_RNGP_PAT_START_LIST" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_LIST"/>
+ <function name="XML_RNGP_PAT_START_ONEMORE" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_ONEMORE"/>
+ <function name="XML_RNGP_PAT_START_TEXT" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_TEXT"/>
+ <function name="XML_RNGP_PAT_START_VALUE" link="libxml2-xmlerror.html#XML_RNGP_PAT_START_VALUE"/>
+ <function name="XML_RNGP_PREFIX_UNDEFINED" link="libxml2-xmlerror.html#XML_RNGP_PREFIX_UNDEFINED"/>
+ <function name="XML_RNGP_REF_CREATE_FAILED" link="libxml2-xmlerror.html#XML_RNGP_REF_CREATE_FAILED"/>
+ <function name="XML_RNGP_REF_CYCLE" link="libxml2-xmlerror.html#XML_RNGP_REF_CYCLE"/>
+ <function name="XML_RNGP_REF_NAME_INVALID" link="libxml2-xmlerror.html#XML_RNGP_REF_NAME_INVALID"/>
+ <function name="XML_RNGP_REF_NOT_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_REF_NOT_EMPTY"/>
+ <function name="XML_RNGP_REF_NO_DEF" link="libxml2-xmlerror.html#XML_RNGP_REF_NO_DEF"/>
+ <function name="XML_RNGP_REF_NO_NAME" link="libxml2-xmlerror.html#XML_RNGP_REF_NO_NAME"/>
+ <function name="XML_RNGP_START_CHOICE_AND_INTERLEAVE" link="libxml2-xmlerror.html#XML_RNGP_START_CHOICE_AND_INTERLEAVE"/>
+ <function name="XML_RNGP_START_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_START_CONTENT"/>
+ <function name="XML_RNGP_START_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_START_EMPTY"/>
+ <function name="XML_RNGP_START_MISSING" link="libxml2-xmlerror.html#XML_RNGP_START_MISSING"/>
+ <function name="XML_RNGP_TEXT_EXPECTED" link="libxml2-xmlerror.html#XML_RNGP_TEXT_EXPECTED"/>
+ <function name="XML_RNGP_TEXT_HAS_CHILD" link="libxml2-xmlerror.html#XML_RNGP_TEXT_HAS_CHILD"/>
+ <function name="XML_RNGP_TYPE_MISSING" link="libxml2-xmlerror.html#XML_RNGP_TYPE_MISSING"/>
+ <function name="XML_RNGP_TYPE_NOT_FOUND" link="libxml2-xmlerror.html#XML_RNGP_TYPE_NOT_FOUND"/>
+ <function name="XML_RNGP_TYPE_VALUE" link="libxml2-xmlerror.html#XML_RNGP_TYPE_VALUE"/>
+ <function name="XML_RNGP_UNKNOWN_ATTRIBUTE" link="libxml2-xmlerror.html#XML_RNGP_UNKNOWN_ATTRIBUTE"/>
+ <function name="XML_RNGP_UNKNOWN_COMBINE" link="libxml2-xmlerror.html#XML_RNGP_UNKNOWN_COMBINE"/>
+ <function name="XML_RNGP_UNKNOWN_CONSTRUCT" link="libxml2-xmlerror.html#XML_RNGP_UNKNOWN_CONSTRUCT"/>
+ <function name="XML_RNGP_UNKNOWN_TYPE_LIB" link="libxml2-xmlerror.html#XML_RNGP_UNKNOWN_TYPE_LIB"/>
+ <function name="XML_RNGP_URI_FRAGMENT" link="libxml2-xmlerror.html#XML_RNGP_URI_FRAGMENT"/>
+ <function name="XML_RNGP_URI_NOT_ABSOLUTE" link="libxml2-xmlerror.html#XML_RNGP_URI_NOT_ABSOLUTE"/>
+ <function name="XML_RNGP_VALUE_EMPTY" link="libxml2-xmlerror.html#XML_RNGP_VALUE_EMPTY"/>
+ <function name="XML_RNGP_VALUE_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT"/>
+ <function name="XML_RNGP_XMLNS_NAME" link="libxml2-xmlerror.html#XML_RNGP_XMLNS_NAME"/>
+ <function name="XML_RNGP_XML_NS" link="libxml2-xmlerror.html#XML_RNGP_XML_NS"/>
+ <function name="XML_SAVE_AS_HTML" link="libxml2-xmlsave.html#XML_SAVE_AS_HTML"/>
+ <function name="XML_SAVE_AS_XML" link="libxml2-xmlsave.html#XML_SAVE_AS_XML"/>
+ <function name="XML_SAVE_CHAR_INVALID" link="libxml2-xmlerror.html#XML_SAVE_CHAR_INVALID"/>
+ <function name="XML_SAVE_FORMAT" link="libxml2-xmlsave.html#XML_SAVE_FORMAT"/>
+ <function name="XML_SAVE_NOT_UTF8" link="libxml2-xmlerror.html#XML_SAVE_NOT_UTF8"/>
+ <function name="XML_SAVE_NO_DECL" link="libxml2-xmlsave.html#XML_SAVE_NO_DECL"/>
+ <function name="XML_SAVE_NO_DOCTYPE" link="libxml2-xmlerror.html#XML_SAVE_NO_DOCTYPE"/>
+ <function name="XML_SAVE_NO_EMPTY" link="libxml2-xmlsave.html#XML_SAVE_NO_EMPTY"/>
+ <function name="XML_SAVE_NO_XHTML" link="libxml2-xmlsave.html#XML_SAVE_NO_XHTML"/>
+ <function name="XML_SAVE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING"/>
+ <function name="XML_SAVE_WSNONSIG" link="libxml2-xmlsave.html#XML_SAVE_WSNONSIG"/>
+ <function name="XML_SAVE_XHTML" link="libxml2-xmlsave.html#XML_SAVE_XHTML"/>
+ <function name="XML_SCHEMAP_AG_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT"/>
+ <function name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE"/>
+ <function name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_ATTR_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTR_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_AU_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT"/>
+ <function name="XML_SCHEMAP_AU_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_AU_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_A_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_A_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_A_PROPS_CORRECT_3"/>
+ <function name="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_COS_ALL_LIMITED" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ALL_LIMITED"/>
+ <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_1"/>
+ <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_2"/>
+ <function name="XML_SCHEMAP_COS_CT_EXTENDS_1_3" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_CT_EXTENDS_1_3"/>
+ <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_1"/>
+ <function name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_DERIVED_OK_2_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4"/>
+ <function name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5"/>
+ <function name="XML_SCHEMAP_COS_VALID_DEFAULT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_1"/>
+ <function name="XML_SCHEMAP_COS_VALID_DEFAULT_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_1"/>
+ <function name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1"/>
+ <function name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2"/>
+ <function name="XML_SCHEMAP_CT_PROPS_CORRECT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_1"/>
+ <function name="XML_SCHEMAP_CT_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_CT_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_3"/>
+ <function name="XML_SCHEMAP_CT_PROPS_CORRECT_4" link="libxml2-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_4"/>
+ <function name="XML_SCHEMAP_CT_PROPS_CORRECT_5" link="libxml2-xmlerror.html#XML_SCHEMAP_CT_PROPS_CORRECT_5"/>
+ <function name="XML_SCHEMAP_CVC_SIMPLE_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_CVC_SIMPLE_TYPE"/>
+ <function name="XML_SCHEMAP_C_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_C_PROPS_CORRECT"/>
+ <function name="XML_SCHEMAP_DEF_AND_PREFIX" link="libxml2-xmlerror.html#XML_SCHEMAP_DEF_AND_PREFIX"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2"/>
+ <function name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3" link="libxml2-xmlerror.html#XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3"/>
+ <function name="XML_SCHEMAP_ELEMFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ELEMFORMDEFAULT_VALUE"/>
+ <function name="XML_SCHEMAP_ELEM_DEFAULT_FIXED" link="libxml2-xmlerror.html#XML_SCHEMAP_ELEM_DEFAULT_FIXED"/>
+ <function name="XML_SCHEMAP_ELEM_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ELEM_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_EXTENSION_NO_BASE" link="libxml2-xmlerror.html#XML_SCHEMAP_EXTENSION_NO_BASE"/>
+ <function name="XML_SCHEMAP_E_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_E_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_3"/>
+ <function name="XML_SCHEMAP_E_PROPS_CORRECT_4" link="libxml2-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_4"/>
+ <function name="XML_SCHEMAP_E_PROPS_CORRECT_5" link="libxml2-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_5"/>
+ <function name="XML_SCHEMAP_E_PROPS_CORRECT_6" link="libxml2-xmlerror.html#XML_SCHEMAP_E_PROPS_CORRECT_6"/>
+ <function name="XML_SCHEMAP_FACET_NO_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_FACET_NO_VALUE"/>
+ <function name="XML_SCHEMAP_FAILED_BUILD_IMPORT" link="libxml2-xmlerror.html#XML_SCHEMAP_FAILED_BUILD_IMPORT"/>
+ <function name="XML_SCHEMAP_FAILED_LOAD" link="libxml2-xmlerror.html#XML_SCHEMAP_FAILED_LOAD"/>
+ <function name="XML_SCHEMAP_FAILED_PARSE" link="libxml2-xmlerror.html#XML_SCHEMAP_FAILED_PARSE"/>
+ <function name="XML_SCHEMAP_GROUP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_GROUP_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI" link="libxml2-xmlerror.html#XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI"/>
+ <function name="XML_SCHEMAP_IMPORT_REDEFINE_NSNAME" link="libxml2-xmlerror.html#XML_SCHEMAP_IMPORT_REDEFINE_NSNAME"/>
+ <function name="XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI" link="libxml2-xmlerror.html#XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI"/>
+ <function name="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI" link="libxml2-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI"/>
+ <function name="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI" link="libxml2-xmlerror.html#XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI"/>
+ <function name="XML_SCHEMAP_INTERNAL" link="libxml2-xmlerror.html#XML_SCHEMAP_INTERNAL"/>
+ <function name="XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE" link="libxml2-xmlerror.html#XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE"/>
+ <function name="XML_SCHEMAP_INVALID_ATTR_COMBINATION" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_COMBINATION"/>
+ <function name="XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION"/>
+ <function name="XML_SCHEMAP_INVALID_ATTR_NAME" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_NAME"/>
+ <function name="XML_SCHEMAP_INVALID_ATTR_USE" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_ATTR_USE"/>
+ <function name="XML_SCHEMAP_INVALID_BOOLEAN" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_BOOLEAN"/>
+ <function name="XML_SCHEMAP_INVALID_ENUM" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_ENUM"/>
+ <function name="XML_SCHEMAP_INVALID_FACET" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_FACET"/>
+ <function name="XML_SCHEMAP_INVALID_FACET_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_FACET_VALUE"/>
+ <function name="XML_SCHEMAP_INVALID_MAXOCCURS" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_MAXOCCURS"/>
+ <function name="XML_SCHEMAP_INVALID_MINOCCURS" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_MINOCCURS"/>
+ <function name="XML_SCHEMAP_INVALID_REF_AND_SUBTYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_REF_AND_SUBTYPE"/>
+ <function name="XML_SCHEMAP_INVALID_WHITE_SPACE" link="libxml2-xmlerror.html#XML_SCHEMAP_INVALID_WHITE_SPACE"/>
+ <function name="XML_SCHEMAP_MG_PROPS_CORRECT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_1"/>
+ <function name="XML_SCHEMAP_MG_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_MG_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD"/>
+ <function name="XML_SCHEMAP_NOATTR_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_NOATTR_NOREF"/>
+ <function name="XML_SCHEMAP_NOROOT" link="libxml2-xmlerror.html#XML_SCHEMAP_NOROOT"/>
+ <function name="XML_SCHEMAP_NOTATION_NO_NAME" link="libxml2-xmlerror.html#XML_SCHEMAP_NOTATION_NO_NAME"/>
+ <function name="XML_SCHEMAP_NOTHING_TO_PARSE" link="libxml2-xmlerror.html#XML_SCHEMAP_NOTHING_TO_PARSE"/>
+ <function name="XML_SCHEMAP_NOTYPE_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_NOTYPE_NOREF"/>
+ <function name="XML_SCHEMAP_NOT_DETERMINISTIC" link="libxml2-xmlerror.html#XML_SCHEMAP_NOT_DETERMINISTIC"/>
+ <function name="XML_SCHEMAP_NOT_SCHEMA" link="libxml2-xmlerror.html#XML_SCHEMAP_NOT_SCHEMA"/>
+ <function name="XML_SCHEMAP_NO_XMLNS" link="libxml2-xmlerror.html#XML_SCHEMAP_NO_XMLNS"/>
+ <function name="XML_SCHEMAP_NO_XSI" link="libxml2-xmlerror.html#XML_SCHEMAP_NO_XSI"/>
+ <function name="XML_SCHEMAP_PREFIX_UNDEFINED" link="libxml2-xmlerror.html#XML_SCHEMAP_PREFIX_UNDEFINED"/>
+ <function name="XML_SCHEMAP_P_PROPS_CORRECT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_1"/>
+ <function name="XML_SCHEMAP_P_PROPS_CORRECT_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_1"/>
+ <function name="XML_SCHEMAP_P_PROPS_CORRECT_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_P_PROPS_CORRECT_2_2"/>
+ <function name="XML_SCHEMAP_RECURSIVE" link="libxml2-xmlerror.html#XML_SCHEMAP_RECURSIVE"/>
+ <function name="XML_SCHEMAP_REDEFINED_ATTR" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTR"/>
+ <function name="XML_SCHEMAP_REDEFINED_ATTRGROUP" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_ATTRGROUP"/>
+ <function name="XML_SCHEMAP_REDEFINED_ELEMENT" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_ELEMENT"/>
+ <function name="XML_SCHEMAP_REDEFINED_GROUP" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_GROUP"/>
+ <function name="XML_SCHEMAP_REDEFINED_NOTATION" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_NOTATION"/>
+ <function name="XML_SCHEMAP_REDEFINED_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_REDEFINED_TYPE"/>
+ <function name="XML_SCHEMAP_REF_AND_CONTENT" link="libxml2-xmlerror.html#XML_SCHEMAP_REF_AND_CONTENT"/>
+ <function name="XML_SCHEMAP_REF_AND_SUBTYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_REF_AND_SUBTYPE"/>
+ <function name="XML_SCHEMAP_REGEXP_INVALID" link="libxml2-xmlerror.html#XML_SCHEMAP_REGEXP_INVALID"/>
+ <function name="XML_SCHEMAP_RESTRICTION_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_RESTRICTION_NONAME_NOREF"/>
+ <function name="XML_SCHEMAP_S4S_ATTR_INVALID_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_S4S_ATTR_INVALID_VALUE"/>
+ <function name="XML_SCHEMAP_S4S_ATTR_MISSING" link="libxml2-xmlerror.html#XML_SCHEMAP_S4S_ATTR_MISSING"/>
+ <function name="XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED" link="libxml2-xmlerror.html#XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED"/>
+ <function name="XML_SCHEMAP_S4S_ELEM_MISSING" link="libxml2-xmlerror.html#XML_SCHEMAP_S4S_ELEM_MISSING"/>
+ <function name="XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED" link="libxml2-xmlerror.html#XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED"/>
+ <function name="XML_SCHEMAP_SIMPLETYPE_NONAME" link="libxml2-xmlerror.html#XML_SCHEMAP_SIMPLETYPE_NONAME"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_1"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_2"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_3_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_1"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_3_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_3_2"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_4" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_4"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2"/>
+ <function name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3"/>
+ <function name="XML_SCHEMAP_SRC_CT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_CT_1"/>
+ <function name="XML_SCHEMAP_SRC_ELEMENT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_1"/>
+ <function name="XML_SCHEMAP_SRC_ELEMENT_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_1"/>
+ <function name="XML_SCHEMAP_SRC_ELEMENT_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_2_2"/>
+ <function name="XML_SCHEMAP_SRC_ELEMENT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_ELEMENT_3"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_1_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_1"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_1_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_1_2"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_2_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_1"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_2_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_2_2"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_3_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_1"/>
+ <function name="XML_SCHEMAP_SRC_IMPORT_3_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_IMPORT_3_2"/>
+ <function name="XML_SCHEMAP_SRC_INCLUDE" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_INCLUDE"/>
+ <function name="XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE"/>
+ <function name="XML_SCHEMAP_SRC_REDEFINE" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_REDEFINE"/>
+ <function name="XML_SCHEMAP_SRC_RESOLVE" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_RESOLVE"/>
+ <function name="XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE"/>
+ <function name="XML_SCHEMAP_SRC_SIMPLE_TYPE_1" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_1"/>
+ <function name="XML_SCHEMAP_SRC_SIMPLE_TYPE_2" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_2"/>
+ <function name="XML_SCHEMAP_SRC_SIMPLE_TYPE_3" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_3"/>
+ <function name="XML_SCHEMAP_SRC_SIMPLE_TYPE_4" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_SIMPLE_TYPE_4"/>
+ <function name="XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES" link="libxml2-xmlerror.html#XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES"/>
+ <function name="XML_SCHEMAP_ST_PROPS_CORRECT_1" link="libxml2-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_1"/>
+ <function name="XML_SCHEMAP_ST_PROPS_CORRECT_2" link="libxml2-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_2"/>
+ <function name="XML_SCHEMAP_ST_PROPS_CORRECT_3" link="libxml2-xmlerror.html#XML_SCHEMAP_ST_PROPS_CORRECT_3"/>
+ <function name="XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE"/>
+ <function name="XML_SCHEMAP_TYPE_AND_SUBTYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_TYPE_AND_SUBTYPE"/>
+ <function name="XML_SCHEMAP_UNION_NOT_EXPRESSIBLE" link="libxml2-xmlerror.html#XML_SCHEMAP_UNION_NOT_EXPRESSIBLE"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ALL_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ALL_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ATTR_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ATTR_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_BASE_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_BASE_TYPE"/>
+ <function name="XML_SCHEMAP_UNKNOWN_CHOICE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_CHOICE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_ELEM_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_ELEM_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_FACET_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_FACET_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_FACET_TYPE"/>
+ <function name="XML_SCHEMAP_UNKNOWN_GROUP_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_GROUP_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_IMPORT_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_IMPORT_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_LIST_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_LIST_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_MEMBER_TYPE"/>
+ <function name="XML_SCHEMAP_UNKNOWN_NOTATION_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_NOTATION_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_PREFIX" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_PREFIX"/>
+ <function name="XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_REF" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_REF"/>
+ <function name="XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD"/>
+ <function name="XML_SCHEMAP_UNKNOWN_TYPE" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_TYPE"/>
+ <function name="XML_SCHEMAP_UNKNOWN_UNION_CHILD" link="libxml2-xmlerror.html#XML_SCHEMAP_UNKNOWN_UNION_CHILD"/>
+ <function name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH" link="libxml2-xmlerror.html#XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH"/>
+ <function name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH" link="libxml2-xmlerror.html#XML_SCHEMAP_WARN_ATTR_REDECL_PROH"/>
+ <function name="XML_SCHEMAP_WARN_SKIP_SCHEMA" link="libxml2-xmlerror.html#XML_SCHEMAP_WARN_SKIP_SCHEMA"/>
+ <function name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA" link="libxml2-xmlerror.html#XML_SCHEMAP_WARN_UNLOCATED_SCHEMA"/>
+ <function name="XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER" link="libxml2-xmlerror.html#XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER"/>
+ <function name="XML_SCHEMAS_ANYSIMPLETYPE" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYSIMPLETYPE"/>
+ <function name="XML_SCHEMAS_ANYTYPE" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYTYPE"/>
+ <function name="XML_SCHEMAS_ANYURI" link="libxml2-schemasInternals.html#XML_SCHEMAS_ANYURI"/>
+ <function name="XML_SCHEMAS_BASE64BINARY" link="libxml2-schemasInternals.html#XML_SCHEMAS_BASE64BINARY"/>
+ <function name="XML_SCHEMAS_BOOLEAN" link="libxml2-schemasInternals.html#XML_SCHEMAS_BOOLEAN"/>
+ <function name="XML_SCHEMAS_BYTE" link="libxml2-schemasInternals.html#XML_SCHEMAS_BYTE"/>
+ <function name="XML_SCHEMAS_DATE" link="libxml2-schemasInternals.html#XML_SCHEMAS_DATE"/>
+ <function name="XML_SCHEMAS_DATETIME" link="libxml2-schemasInternals.html#XML_SCHEMAS_DATETIME"/>
+ <function name="XML_SCHEMAS_DECIMAL" link="libxml2-schemasInternals.html#XML_SCHEMAS_DECIMAL"/>
+ <function name="XML_SCHEMAS_DOUBLE" link="libxml2-schemasInternals.html#XML_SCHEMAS_DOUBLE"/>
+ <function name="XML_SCHEMAS_DURATION" link="libxml2-schemasInternals.html#XML_SCHEMAS_DURATION"/>
+ <function name="XML_SCHEMAS_ENTITIES" link="libxml2-schemasInternals.html#XML_SCHEMAS_ENTITIES"/>
+ <function name="XML_SCHEMAS_ENTITY" link="libxml2-schemasInternals.html#XML_SCHEMAS_ENTITY"/>
+ <function name="XML_SCHEMAS_ERR_" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_"/>
+ <function name="XML_SCHEMAS_ERR_ATTRINVALID" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_ATTRINVALID"/>
+ <function name="XML_SCHEMAS_ERR_ATTRUNKNOWN" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_ATTRUNKNOWN"/>
+ <function name="XML_SCHEMAS_ERR_CONSTRUCT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_CONSTRUCT"/>
+ <function name="XML_SCHEMAS_ERR_ELEMCONT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_ELEMCONT"/>
+ <function name="XML_SCHEMAS_ERR_EXTRACONTENT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_EXTRACONTENT"/>
+ <function name="XML_SCHEMAS_ERR_FACET" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_FACET"/>
+ <function name="XML_SCHEMAS_ERR_HAVEDEFAULT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_HAVEDEFAULT"/>
+ <function name="XML_SCHEMAS_ERR_INTERNAL" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_INTERNAL"/>
+ <function name="XML_SCHEMAS_ERR_INVALIDATTR" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDATTR"/>
+ <function name="XML_SCHEMAS_ERR_INVALIDELEM" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_INVALIDELEM"/>
+ <function name="XML_SCHEMAS_ERR_ISABSTRACT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_ISABSTRACT"/>
+ <function name="XML_SCHEMAS_ERR_MISSING" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_MISSING"/>
+ <function name="XML_SCHEMAS_ERR_NOROLLBACK" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOROLLBACK"/>
+ <function name="XML_SCHEMAS_ERR_NOROOT" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOROOT"/>
+ <function name="XML_SCHEMAS_ERR_NOTDETERMINIST" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTDETERMINIST"/>
+ <function name="XML_SCHEMAS_ERR_NOTEMPTY" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTEMPTY"/>
+ <function name="XML_SCHEMAS_ERR_NOTNILLABLE" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTNILLABLE"/>
+ <function name="XML_SCHEMAS_ERR_NOTSIMPLE" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTSIMPLE"/>
+ <function name="XML_SCHEMAS_ERR_NOTTOPLEVEL" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTTOPLEVEL"/>
+ <function name="XML_SCHEMAS_ERR_NOTYPE" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_NOTYPE"/>
+ <function name="XML_SCHEMAS_ERR_OK" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_OK"/>
+ <function name="XML_SCHEMAS_ERR_UNDECLAREDELEM" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_UNDECLAREDELEM"/>
+ <function name="XML_SCHEMAS_ERR_VALUE" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_VALUE"/>
+ <function name="XML_SCHEMAS_ERR_WRONGELEM" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_WRONGELEM"/>
+ <function name="XML_SCHEMAS_ERR_XXX" link="libxml2-xmlschemas.html#XML_SCHEMAS_ERR_XXX"/>
+ <function name="XML_SCHEMAS_FLOAT" link="libxml2-schemasInternals.html#XML_SCHEMAS_FLOAT"/>
+ <function name="XML_SCHEMAS_GDAY" link="libxml2-schemasInternals.html#XML_SCHEMAS_GDAY"/>
+ <function name="XML_SCHEMAS_GMONTH" link="libxml2-schemasInternals.html#XML_SCHEMAS_GMONTH"/>
+ <function name="XML_SCHEMAS_GMONTHDAY" link="libxml2-schemasInternals.html#XML_SCHEMAS_GMONTHDAY"/>
+ <function name="XML_SCHEMAS_GYEAR" link="libxml2-schemasInternals.html#XML_SCHEMAS_GYEAR"/>
+ <function name="XML_SCHEMAS_GYEARMONTH" link="libxml2-schemasInternals.html#XML_SCHEMAS_GYEARMONTH"/>
+ <function name="XML_SCHEMAS_HEXBINARY" link="libxml2-schemasInternals.html#XML_SCHEMAS_HEXBINARY"/>
+ <function name="XML_SCHEMAS_ID" link="libxml2-schemasInternals.html#XML_SCHEMAS_ID"/>
+ <function name="XML_SCHEMAS_IDREF" link="libxml2-schemasInternals.html#XML_SCHEMAS_IDREF"/>
+ <function name="XML_SCHEMAS_IDREFS" link="libxml2-schemasInternals.html#XML_SCHEMAS_IDREFS"/>
+ <function name="XML_SCHEMAS_INT" link="libxml2-schemasInternals.html#XML_SCHEMAS_INT"/>
+ <function name="XML_SCHEMAS_INTEGER" link="libxml2-schemasInternals.html#XML_SCHEMAS_INTEGER"/>
+ <function name="XML_SCHEMAS_LANGUAGE" link="libxml2-schemasInternals.html#XML_SCHEMAS_LANGUAGE"/>
+ <function name="XML_SCHEMAS_LONG" link="libxml2-schemasInternals.html#XML_SCHEMAS_LONG"/>
+ <function name="XML_SCHEMAS_NAME" link="libxml2-schemasInternals.html#XML_SCHEMAS_NAME"/>
+ <function name="XML_SCHEMAS_NCNAME" link="libxml2-schemasInternals.html#XML_SCHEMAS_NCNAME"/>
+ <function name="XML_SCHEMAS_NINTEGER" link="libxml2-schemasInternals.html#XML_SCHEMAS_NINTEGER"/>
+ <function name="XML_SCHEMAS_NMTOKEN" link="libxml2-schemasInternals.html#XML_SCHEMAS_NMTOKEN"/>
+ <function name="XML_SCHEMAS_NMTOKENS" link="libxml2-schemasInternals.html#XML_SCHEMAS_NMTOKENS"/>
+ <function name="XML_SCHEMAS_NNINTEGER" link="libxml2-schemasInternals.html#XML_SCHEMAS_NNINTEGER"/>
+ <function name="XML_SCHEMAS_NORMSTRING" link="libxml2-schemasInternals.html#XML_SCHEMAS_NORMSTRING"/>
+ <function name="XML_SCHEMAS_NOTATION" link="libxml2-schemasInternals.html#XML_SCHEMAS_NOTATION"/>
+ <function name="XML_SCHEMAS_NPINTEGER" link="libxml2-schemasInternals.html#XML_SCHEMAS_NPINTEGER"/>
+ <function name="XML_SCHEMAS_PINTEGER" link="libxml2-schemasInternals.html#XML_SCHEMAS_PINTEGER"/>
+ <function name="XML_SCHEMAS_QNAME" link="libxml2-schemasInternals.html#XML_SCHEMAS_QNAME"/>
+ <function name="XML_SCHEMAS_SHORT" link="libxml2-schemasInternals.html#XML_SCHEMAS_SHORT"/>
+ <function name="XML_SCHEMAS_STRING" link="libxml2-schemasInternals.html#XML_SCHEMAS_STRING"/>
+ <function name="XML_SCHEMAS_TIME" link="libxml2-schemasInternals.html#XML_SCHEMAS_TIME"/>
+ <function name="XML_SCHEMAS_TOKEN" link="libxml2-schemasInternals.html#XML_SCHEMAS_TOKEN"/>
+ <function name="XML_SCHEMAS_UBYTE" link="libxml2-schemasInternals.html#XML_SCHEMAS_UBYTE"/>
+ <function name="XML_SCHEMAS_UINT" link="libxml2-schemasInternals.html#XML_SCHEMAS_UINT"/>
+ <function name="XML_SCHEMAS_ULONG" link="libxml2-schemasInternals.html#XML_SCHEMAS_ULONG"/>
+ <function name="XML_SCHEMAS_UNKNOWN" link="libxml2-schemasInternals.html#XML_SCHEMAS_UNKNOWN"/>
+ <function name="XML_SCHEMAS_USHORT" link="libxml2-schemasInternals.html#XML_SCHEMAS_USHORT"/>
+ <function name="XML_SCHEMATRONV_ASSERT" link="libxml2-xmlerror.html#XML_SCHEMATRONV_ASSERT"/>
+ <function name="XML_SCHEMATRONV_REPORT" link="libxml2-xmlerror.html#XML_SCHEMATRONV_REPORT"/>
+ <function name="XML_SCHEMATRON_OUT_BUFFER" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_BUFFER"/>
+ <function name="XML_SCHEMATRON_OUT_ERROR" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_ERROR"/>
+ <function name="XML_SCHEMATRON_OUT_FILE" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_FILE"/>
+ <function name="XML_SCHEMATRON_OUT_IO" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_IO"/>
+ <function name="XML_SCHEMATRON_OUT_QUIET" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_QUIET"/>
+ <function name="XML_SCHEMATRON_OUT_TEXT" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_TEXT"/>
+ <function name="XML_SCHEMATRON_OUT_XML" link="libxml2-schematron.html#XML_SCHEMATRON_OUT_XML"/>
+ <function name="XML_SCHEMAV_ATTRINVALID" link="libxml2-xmlerror.html#XML_SCHEMAV_ATTRINVALID"/>
+ <function name="XML_SCHEMAV_ATTRUNKNOWN" link="libxml2-xmlerror.html#XML_SCHEMAV_ATTRUNKNOWN"/>
+ <function name="XML_SCHEMAV_CONSTRUCT" link="libxml2-xmlerror.html#XML_SCHEMAV_CONSTRUCT"/>
+ <function name="XML_SCHEMAV_CVC_ATTRIBUTE_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_1"/>
+ <function name="XML_SCHEMAV_CVC_ATTRIBUTE_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_2"/>
+ <function name="XML_SCHEMAV_CVC_ATTRIBUTE_3" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_3"/>
+ <function name="XML_SCHEMAV_CVC_ATTRIBUTE_4" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ATTRIBUTE_4"/>
+ <function name="XML_SCHEMAV_CVC_AU" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_AU"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_1"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_4" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_4"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1"/>
+ <function name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2"/>
+ <function name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1"/>
+ <function name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2"/>
+ <function name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3"/>
+ <function name="XML_SCHEMAV_CVC_ELT_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_2"/>
+ <function name="XML_SCHEMAV_CVC_ELT_3_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_3_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_3_2_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_3_2_2"/>
+ <function name="XML_SCHEMAV_CVC_ELT_4_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_4_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_2"/>
+ <function name="XML_SCHEMAV_CVC_ELT_4_3" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_4_3"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_1_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_1_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_1_2"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_2_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_2_2_2_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_1"/>
+ <function name="XML_SCHEMAV_CVC_ELT_5_2_2_2_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_5_2_2_2_2"/>
+ <function name="XML_SCHEMAV_CVC_ELT_6" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_6"/>
+ <function name="XML_SCHEMAV_CVC_ELT_7" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ELT_7"/>
+ <function name="XML_SCHEMAV_CVC_ENUMERATION_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_ENUMERATION_VALID"/>
+ <function name="XML_SCHEMAV_CVC_FACET_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_FACET_VALID"/>
+ <function name="XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID"/>
+ <function name="XML_SCHEMAV_CVC_IDC" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_IDC"/>
+ <function name="XML_SCHEMAV_CVC_LENGTH_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_LENGTH_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MAXLENGTH_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MAXLENGTH_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MININCLUSIVE_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MININCLUSIVE_VALID"/>
+ <function name="XML_SCHEMAV_CVC_MINLENGTH_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_MINLENGTH_VALID"/>
+ <function name="XML_SCHEMAV_CVC_PATTERN_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_PATTERN_VALID"/>
+ <function name="XML_SCHEMAV_CVC_TOTALDIGITS_VALID" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_TOTALDIGITS_VALID"/>
+ <function name="XML_SCHEMAV_CVC_TYPE_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_TYPE_1"/>
+ <function name="XML_SCHEMAV_CVC_TYPE_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_TYPE_2"/>
+ <function name="XML_SCHEMAV_CVC_TYPE_3_1_1" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_1"/>
+ <function name="XML_SCHEMAV_CVC_TYPE_3_1_2" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_TYPE_3_1_2"/>
+ <function name="XML_SCHEMAV_CVC_WILDCARD" link="libxml2-xmlerror.html#XML_SCHEMAV_CVC_WILDCARD"/>
+ <function name="XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING" link="libxml2-xmlerror.html#XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING"/>
+ <function name="XML_SCHEMAV_ELEMCONT" link="libxml2-xmlerror.html#XML_SCHEMAV_ELEMCONT"/>
+ <function name="XML_SCHEMAV_ELEMENT_CONTENT" link="libxml2-xmlerror.html#XML_SCHEMAV_ELEMENT_CONTENT"/>
+ <function name="XML_SCHEMAV_EXTRACONTENT" link="libxml2-xmlerror.html#XML_SCHEMAV_EXTRACONTENT"/>
+ <function name="XML_SCHEMAV_FACET" link="libxml2-xmlerror.html#XML_SCHEMAV_FACET"/>
+ <function name="XML_SCHEMAV_HAVEDEFAULT" link="libxml2-xmlerror.html#XML_SCHEMAV_HAVEDEFAULT"/>
+ <function name="XML_SCHEMAV_INTERNAL" link="libxml2-xmlerror.html#XML_SCHEMAV_INTERNAL"/>
+ <function name="XML_SCHEMAV_INVALIDATTR" link="libxml2-xmlerror.html#XML_SCHEMAV_INVALIDATTR"/>
+ <function name="XML_SCHEMAV_INVALIDELEM" link="libxml2-xmlerror.html#XML_SCHEMAV_INVALIDELEM"/>
+ <function name="XML_SCHEMAV_ISABSTRACT" link="libxml2-xmlerror.html#XML_SCHEMAV_ISABSTRACT"/>
+ <function name="XML_SCHEMAV_MISC" link="libxml2-xmlerror.html#XML_SCHEMAV_MISC"/>
+ <function name="XML_SCHEMAV_MISSING" link="libxml2-xmlerror.html#XML_SCHEMAV_MISSING"/>
+ <function name="XML_SCHEMAV_NOROLLBACK" link="libxml2-xmlerror.html#XML_SCHEMAV_NOROLLBACK"/>
+ <function name="XML_SCHEMAV_NOROOT" link="libxml2-xmlerror.html#XML_SCHEMAV_NOROOT"/>
+ <function name="XML_SCHEMAV_NOTDETERMINIST" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTDETERMINIST"/>
+ <function name="XML_SCHEMAV_NOTEMPTY" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTEMPTY"/>
+ <function name="XML_SCHEMAV_NOTNILLABLE" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTNILLABLE"/>
+ <function name="XML_SCHEMAV_NOTSIMPLE" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTSIMPLE"/>
+ <function name="XML_SCHEMAV_NOTTOPLEVEL" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTTOPLEVEL"/>
+ <function name="XML_SCHEMAV_NOTYPE" link="libxml2-xmlerror.html#XML_SCHEMAV_NOTYPE"/>
+ <function name="XML_SCHEMAV_UNDECLAREDELEM" link="libxml2-xmlerror.html#XML_SCHEMAV_UNDECLAREDELEM"/>
+ <function name="XML_SCHEMAV_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAV_VALUE"/>
+ <function name="XML_SCHEMAV_WRONGELEM" link="libxml2-xmlerror.html#XML_SCHEMAV_WRONGELEM"/>
+ <function name="XML_SCHEMA_CONTENT_ANY" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_ANY"/>
+ <function name="XML_SCHEMA_CONTENT_BASIC" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_BASIC"/>
+ <function name="XML_SCHEMA_CONTENT_ELEMENTS" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_ELEMENTS"/>
+ <function name="XML_SCHEMA_CONTENT_EMPTY" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_EMPTY"/>
+ <function name="XML_SCHEMA_CONTENT_MIXED" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED"/>
+ <function name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS"/>
+ <function name="XML_SCHEMA_CONTENT_SIMPLE" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_SIMPLE"/>
+ <function name="XML_SCHEMA_CONTENT_UNKNOWN" link="libxml2-schemasInternals.html#XML_SCHEMA_CONTENT_UNKNOWN"/>
+ <function name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_ATTR_USE_PROHIB"/>
+ <function name="XML_SCHEMA_EXTRA_QNAMEREF" link="libxml2-schemasInternals.html#XML_SCHEMA_EXTRA_QNAMEREF"/>
+ <function name="XML_SCHEMA_FACET_ENUMERATION" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_ENUMERATION"/>
+ <function name="XML_SCHEMA_FACET_FRACTIONDIGITS" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_FRACTIONDIGITS"/>
+ <function name="XML_SCHEMA_FACET_LENGTH" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_LENGTH"/>
+ <function name="XML_SCHEMA_FACET_MAXEXCLUSIVE" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MAXEXCLUSIVE"/>
+ <function name="XML_SCHEMA_FACET_MAXINCLUSIVE" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MAXINCLUSIVE"/>
+ <function name="XML_SCHEMA_FACET_MAXLENGTH" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MAXLENGTH"/>
+ <function name="XML_SCHEMA_FACET_MINEXCLUSIVE" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MINEXCLUSIVE"/>
+ <function name="XML_SCHEMA_FACET_MININCLUSIVE" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MININCLUSIVE"/>
+ <function name="XML_SCHEMA_FACET_MINLENGTH" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_MINLENGTH"/>
+ <function name="XML_SCHEMA_FACET_PATTERN" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_PATTERN"/>
+ <function name="XML_SCHEMA_FACET_TOTALDIGITS" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_TOTALDIGITS"/>
+ <function name="XML_SCHEMA_FACET_WHITESPACE" link="libxml2-schemasInternals.html#XML_SCHEMA_FACET_WHITESPACE"/>
+ <function name="XML_SCHEMA_TYPE_ALL" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ALL"/>
+ <function name="XML_SCHEMA_TYPE_ANY" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ANY"/>
+ <function name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ANY_ATTRIBUTE"/>
+ <function name="XML_SCHEMA_TYPE_ATTRIBUTE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE"/>
+ <function name="XML_SCHEMA_TYPE_ATTRIBUTEGROUP" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTEGROUP"/>
+ <function name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ATTRIBUTE_USE"/>
+ <function name="XML_SCHEMA_TYPE_BASIC" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_BASIC"/>
+ <function name="XML_SCHEMA_TYPE_CHOICE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_CHOICE"/>
+ <function name="XML_SCHEMA_TYPE_COMPLEX" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX"/>
+ <function name="XML_SCHEMA_TYPE_COMPLEX_CONTENT" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_COMPLEX_CONTENT"/>
+ <function name="XML_SCHEMA_TYPE_ELEMENT" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_ELEMENT"/>
+ <function name="XML_SCHEMA_TYPE_EXTENSION" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_EXTENSION"/>
+ <function name="XML_SCHEMA_TYPE_FACET" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_FACET"/>
+ <function name="XML_SCHEMA_TYPE_GROUP" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_GROUP"/>
+ <function name="XML_SCHEMA_TYPE_IDC_KEY" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEY"/>
+ <function name="XML_SCHEMA_TYPE_IDC_KEYREF" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_IDC_KEYREF"/>
+ <function name="XML_SCHEMA_TYPE_IDC_UNIQUE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_IDC_UNIQUE"/>
+ <function name="XML_SCHEMA_TYPE_LIST" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_LIST"/>
+ <function name="XML_SCHEMA_TYPE_NOTATION" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_NOTATION"/>
+ <function name="XML_SCHEMA_TYPE_PARTICLE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_PARTICLE"/>
+ <function name="XML_SCHEMA_TYPE_RESTRICTION" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_RESTRICTION"/>
+ <function name="XML_SCHEMA_TYPE_SEQUENCE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_SEQUENCE"/>
+ <function name="XML_SCHEMA_TYPE_SIMPLE" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE"/>
+ <function name="XML_SCHEMA_TYPE_SIMPLE_CONTENT" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_SIMPLE_CONTENT"/>
+ <function name="XML_SCHEMA_TYPE_UNION" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_UNION"/>
+ <function name="XML_SCHEMA_TYPE_UR" link="libxml2-schemasInternals.html#XML_SCHEMA_TYPE_UR"/>
+ <function name="XML_SCHEMA_VAL_VC_I_CREATE" link="libxml2-xmlschemas.html#XML_SCHEMA_VAL_VC_I_CREATE"/>
+ <function name="XML_SCHEMA_WHITESPACE_COLLAPSE" link="libxml2-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_COLLAPSE"/>
+ <function name="XML_SCHEMA_WHITESPACE_PRESERVE" link="libxml2-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_PRESERVE"/>
+ <function name="XML_SCHEMA_WHITESPACE_REPLACE" link="libxml2-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_REPLACE"/>
+ <function name="XML_SCHEMA_WHITESPACE_UNKNOWN" link="libxml2-xmlschemastypes.html#XML_SCHEMA_WHITESPACE_UNKNOWN"/>
+ <function name="XML_TEXTREADER_MODE_CLOSED" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_CLOSED"/>
+ <function name="XML_TEXTREADER_MODE_EOF" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_EOF"/>
+ <function name="XML_TEXTREADER_MODE_ERROR" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_ERROR"/>
+ <function name="XML_TEXTREADER_MODE_INITIAL" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_INITIAL"/>
+ <function name="XML_TEXTREADER_MODE_INTERACTIVE" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_INTERACTIVE"/>
+ <function name="XML_TEXTREADER_MODE_READING" link="libxml2-xmlreader.html#XML_TEXTREADER_MODE_READING"/>
+ <function name="XML_TEXT_NODE" link="libxml2-tree.html#XML_TEXT_NODE"/>
+ <function name="XML_TREE_INVALID_DEC" link="libxml2-xmlerror.html#XML_TREE_INVALID_DEC"/>
+ <function name="XML_TREE_INVALID_HEX" link="libxml2-xmlerror.html#XML_TREE_INVALID_HEX"/>
+ <function name="XML_TREE_NOT_UTF8" link="libxml2-xmlerror.html#XML_TREE_NOT_UTF8"/>
+ <function name="XML_TREE_UNTERMINATED_ENTITY" link="libxml2-xmlerror.html#XML_TREE_UNTERMINATED_ENTITY"/>
+ <function name="XML_WAR_CATALOG_PI" link="libxml2-xmlerror.html#XML_WAR_CATALOG_PI"/>
+ <function name="XML_WAR_ENTITY_REDEFINED" link="libxml2-xmlerror.html#XML_WAR_ENTITY_REDEFINED"/>
+ <function name="XML_WAR_LANG_VALUE" link="libxml2-xmlerror.html#XML_WAR_LANG_VALUE"/>
+ <function name="XML_WAR_NS_COLUMN" link="libxml2-xmlerror.html#XML_WAR_NS_COLUMN"/>
+ <function name="XML_WAR_NS_URI" link="libxml2-xmlerror.html#XML_WAR_NS_URI"/>
+ <function name="XML_WAR_NS_URI_RELATIVE" link="libxml2-xmlerror.html#XML_WAR_NS_URI_RELATIVE"/>
+ <function name="XML_WAR_SPACE_VALUE" link="libxml2-xmlerror.html#XML_WAR_SPACE_VALUE"/>
+ <function name="XML_WAR_UNDECLARED_ENTITY" link="libxml2-xmlerror.html#XML_WAR_UNDECLARED_ENTITY"/>
+ <function name="XML_WAR_UNKNOWN_VERSION" link="libxml2-xmlerror.html#XML_WAR_UNKNOWN_VERSION"/>
+ <function name="XML_WITH_AUTOMATA" link="libxml2-parser.html#XML_WITH_AUTOMATA"/>
+ <function name="XML_WITH_C14N" link="libxml2-parser.html#XML_WITH_C14N"/>
+ <function name="XML_WITH_CATALOG" link="libxml2-parser.html#XML_WITH_CATALOG"/>
+ <function name="XML_WITH_DEBUG" link="libxml2-parser.html#XML_WITH_DEBUG"/>
+ <function name="XML_WITH_DEBUG_MEM" link="libxml2-parser.html#XML_WITH_DEBUG_MEM"/>
+ <function name="XML_WITH_DEBUG_RUN" link="libxml2-parser.html#XML_WITH_DEBUG_RUN"/>
+ <function name="XML_WITH_EXPR" link="libxml2-parser.html#XML_WITH_EXPR"/>
+ <function name="XML_WITH_FTP" link="libxml2-parser.html#XML_WITH_FTP"/>
+ <function name="XML_WITH_HTML" link="libxml2-parser.html#XML_WITH_HTML"/>
+ <function name="XML_WITH_HTTP" link="libxml2-parser.html#XML_WITH_HTTP"/>
+ <function name="XML_WITH_ICONV" link="libxml2-parser.html#XML_WITH_ICONV"/>
+ <function name="XML_WITH_ICU" link="libxml2-parser.html#XML_WITH_ICU"/>
+ <function name="XML_WITH_ISO8859X" link="libxml2-parser.html#XML_WITH_ISO8859X"/>
+ <function name="XML_WITH_LEGACY" link="libxml2-parser.html#XML_WITH_LEGACY"/>
+ <function name="XML_WITH_LZMA" link="libxml2-parser.html#XML_WITH_LZMA"/>
+ <function name="XML_WITH_MODULES" link="libxml2-parser.html#XML_WITH_MODULES"/>
+ <function name="XML_WITH_NONE" link="libxml2-parser.html#XML_WITH_NONE"/>
+ <function name="XML_WITH_OUTPUT" link="libxml2-parser.html#XML_WITH_OUTPUT"/>
+ <function name="XML_WITH_PATTERN" link="libxml2-parser.html#XML_WITH_PATTERN"/>
+ <function name="XML_WITH_PUSH" link="libxml2-parser.html#XML_WITH_PUSH"/>
+ <function name="XML_WITH_READER" link="libxml2-parser.html#XML_WITH_READER"/>
+ <function name="XML_WITH_REGEXP" link="libxml2-parser.html#XML_WITH_REGEXP"/>
+ <function name="XML_WITH_SAX1" link="libxml2-parser.html#XML_WITH_SAX1"/>
+ <function name="XML_WITH_SCHEMAS" link="libxml2-parser.html#XML_WITH_SCHEMAS"/>
+ <function name="XML_WITH_SCHEMATRON" link="libxml2-parser.html#XML_WITH_SCHEMATRON"/>
+ <function name="XML_WITH_THREAD" link="libxml2-parser.html#XML_WITH_THREAD"/>
+ <function name="XML_WITH_TREE" link="libxml2-parser.html#XML_WITH_TREE"/>
+ <function name="XML_WITH_UNICODE" link="libxml2-parser.html#XML_WITH_UNICODE"/>
+ <function name="XML_WITH_VALID" link="libxml2-parser.html#XML_WITH_VALID"/>
+ <function name="XML_WITH_WRITER" link="libxml2-parser.html#XML_WITH_WRITER"/>
+ <function name="XML_WITH_XINCLUDE" link="libxml2-parser.html#XML_WITH_XINCLUDE"/>
+ <function name="XML_WITH_XPATH" link="libxml2-parser.html#XML_WITH_XPATH"/>
+ <function name="XML_WITH_XPTR" link="libxml2-parser.html#XML_WITH_XPTR"/>
+ <function name="XML_WITH_ZLIB" link="libxml2-parser.html#XML_WITH_ZLIB"/>
+ <function name="XML_XINCLUDE_BUILD_FAILED" link="libxml2-xmlerror.html#XML_XINCLUDE_BUILD_FAILED"/>
+ <function name="XML_XINCLUDE_DEPRECATED_NS" link="libxml2-xmlerror.html#XML_XINCLUDE_DEPRECATED_NS"/>
+ <function name="XML_XINCLUDE_END" link="libxml2-tree.html#XML_XINCLUDE_END"/>
+ <function name="XML_XINCLUDE_ENTITY_DEF_MISMATCH" link="libxml2-xmlerror.html#XML_XINCLUDE_ENTITY_DEF_MISMATCH"/>
+ <function name="XML_XINCLUDE_FALLBACKS_IN_INCLUDE" link="libxml2-xmlerror.html#XML_XINCLUDE_FALLBACKS_IN_INCLUDE"/>
+ <function name="XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE" link="libxml2-xmlerror.html#XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE"/>
+ <function name="XML_XINCLUDE_FRAGMENT_ID" link="libxml2-xmlerror.html#XML_XINCLUDE_FRAGMENT_ID"/>
+ <function name="XML_XINCLUDE_HREF_URI" link="libxml2-xmlerror.html#XML_XINCLUDE_HREF_URI"/>
+ <function name="XML_XINCLUDE_INCLUDE_IN_INCLUDE" link="libxml2-xmlerror.html#XML_XINCLUDE_INCLUDE_IN_INCLUDE"/>
+ <function name="XML_XINCLUDE_INVALID_CHAR" link="libxml2-xmlerror.html#XML_XINCLUDE_INVALID_CHAR"/>
+ <function name="XML_XINCLUDE_MULTIPLE_ROOT" link="libxml2-xmlerror.html#XML_XINCLUDE_MULTIPLE_ROOT"/>
+ <function name="XML_XINCLUDE_NO_FALLBACK" link="libxml2-xmlerror.html#XML_XINCLUDE_NO_FALLBACK"/>
+ <function name="XML_XINCLUDE_NO_HREF" link="libxml2-xmlerror.html#XML_XINCLUDE_NO_HREF"/>
+ <function name="XML_XINCLUDE_PARSE_VALUE" link="libxml2-xmlerror.html#XML_XINCLUDE_PARSE_VALUE"/>
+ <function name="XML_XINCLUDE_RECURSION" link="libxml2-xmlerror.html#XML_XINCLUDE_RECURSION"/>
+ <function name="XML_XINCLUDE_START" link="libxml2-tree.html#XML_XINCLUDE_START"/>
+ <function name="XML_XINCLUDE_TEXT_DOCUMENT" link="libxml2-xmlerror.html#XML_XINCLUDE_TEXT_DOCUMENT"/>
+ <function name="XML_XINCLUDE_TEXT_FRAGMENT" link="libxml2-xmlerror.html#XML_XINCLUDE_TEXT_FRAGMENT"/>
+ <function name="XML_XINCLUDE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_XINCLUDE_UNKNOWN_ENCODING"/>
+ <function name="XML_XINCLUDE_XPTR_FAILED" link="libxml2-xmlerror.html#XML_XINCLUDE_XPTR_FAILED"/>
+ <function name="XML_XINCLUDE_XPTR_RESULT" link="libxml2-xmlerror.html#XML_XINCLUDE_XPTR_RESULT"/>
+ <function name="XML_XPATH_ENCODING_ERROR" link="libxml2-xmlerror.html#XML_XPATH_ENCODING_ERROR"/>
+ <function name="XML_XPATH_EXPRESSION_OK" link="libxml2-xmlerror.html#XML_XPATH_EXPRESSION_OK"/>
+ <function name="XML_XPATH_EXPR_ERROR" link="libxml2-xmlerror.html#XML_XPATH_EXPR_ERROR"/>
+ <function name="XML_XPATH_INVALID_ARITY" link="libxml2-xmlerror.html#XML_XPATH_INVALID_ARITY"/>
+ <function name="XML_XPATH_INVALID_CHAR_ERROR" link="libxml2-xmlerror.html#XML_XPATH_INVALID_CHAR_ERROR"/>
+ <function name="XML_XPATH_INVALID_CTXT_POSITION" link="libxml2-xmlerror.html#XML_XPATH_INVALID_CTXT_POSITION"/>
+ <function name="XML_XPATH_INVALID_CTXT_SIZE" link="libxml2-xmlerror.html#XML_XPATH_INVALID_CTXT_SIZE"/>
+ <function name="XML_XPATH_INVALID_OPERAND" link="libxml2-xmlerror.html#XML_XPATH_INVALID_OPERAND"/>
+ <function name="XML_XPATH_INVALID_PREDICATE_ERROR" link="libxml2-xmlerror.html#XML_XPATH_INVALID_PREDICATE_ERROR"/>
+ <function name="XML_XPATH_INVALID_TYPE" link="libxml2-xmlerror.html#XML_XPATH_INVALID_TYPE"/>
+ <function name="XML_XPATH_MEMORY_ERROR" link="libxml2-xmlerror.html#XML_XPATH_MEMORY_ERROR"/>
+ <function name="XML_XPATH_NUMBER_ERROR" link="libxml2-xmlerror.html#XML_XPATH_NUMBER_ERROR"/>
+ <function name="XML_XPATH_START_LITERAL_ERROR" link="libxml2-xmlerror.html#XML_XPATH_START_LITERAL_ERROR"/>
+ <function name="XML_XPATH_UNCLOSED_ERROR" link="libxml2-xmlerror.html#XML_XPATH_UNCLOSED_ERROR"/>
+ <function name="XML_XPATH_UNDEF_PREFIX_ERROR" link="libxml2-xmlerror.html#XML_XPATH_UNDEF_PREFIX_ERROR"/>
+ <function name="XML_XPATH_UNDEF_VARIABLE_ERROR" link="libxml2-xmlerror.html#XML_XPATH_UNDEF_VARIABLE_ERROR"/>
+ <function name="XML_XPATH_UNFINISHED_LITERAL_ERROR" link="libxml2-xmlerror.html#XML_XPATH_UNFINISHED_LITERAL_ERROR"/>
+ <function name="XML_XPATH_UNKNOWN_FUNC_ERROR" link="libxml2-xmlerror.html#XML_XPATH_UNKNOWN_FUNC_ERROR"/>
+ <function name="XML_XPATH_VARIABLE_REF_ERROR" link="libxml2-xmlerror.html#XML_XPATH_VARIABLE_REF_ERROR"/>
+ <function name="XML_XPTR_CHILDSEQ_START" link="libxml2-xmlerror.html#XML_XPTR_CHILDSEQ_START"/>
+ <function name="XML_XPTR_EVAL_FAILED" link="libxml2-xmlerror.html#XML_XPTR_EVAL_FAILED"/>
+ <function name="XML_XPTR_EXTRA_OBJECTS" link="libxml2-xmlerror.html#XML_XPTR_EXTRA_OBJECTS"/>
+ <function name="XML_XPTR_RESOURCE_ERROR" link="libxml2-xmlerror.html#XML_XPTR_RESOURCE_ERROR"/>
+ <function name="XML_XPTR_SUB_RESOURCE_ERROR" link="libxml2-xmlerror.html#XML_XPTR_SUB_RESOURCE_ERROR"/>
+ <function name="XML_XPTR_SYNTAX_ERROR" link="libxml2-xmlerror.html#XML_XPTR_SYNTAX_ERROR"/>
+ <function name="XML_XPTR_UNKNOWN_SCHEME" link="libxml2-xmlerror.html#XML_XPTR_UNKNOWN_SCHEME"/>
+ <function name="XPATH_BOOLEAN" link="libxml2-xpath.html#XPATH_BOOLEAN"/>
+ <function name="XPATH_ENCODING_ERROR" link="libxml2-xpath.html#XPATH_ENCODING_ERROR"/>
+ <function name="XPATH_EXPRESSION_OK" link="libxml2-xpath.html#XPATH_EXPRESSION_OK"/>
+ <function name="XPATH_EXPR_ERROR" link="libxml2-xpath.html#XPATH_EXPR_ERROR"/>
+ <function name="XPATH_FORBID_VARIABLE_ERROR" link="libxml2-xpath.html#XPATH_FORBID_VARIABLE_ERROR"/>
+ <function name="XPATH_INVALID_ARITY" link="libxml2-xpath.html#XPATH_INVALID_ARITY"/>
+ <function name="XPATH_INVALID_CHAR_ERROR" link="libxml2-xpath.html#XPATH_INVALID_CHAR_ERROR"/>
+ <function name="XPATH_INVALID_CTXT" link="libxml2-xpath.html#XPATH_INVALID_CTXT"/>
+ <function name="XPATH_INVALID_CTXT_POSITION" link="libxml2-xpath.html#XPATH_INVALID_CTXT_POSITION"/>
+ <function name="XPATH_INVALID_CTXT_SIZE" link="libxml2-xpath.html#XPATH_INVALID_CTXT_SIZE"/>
+ <function name="XPATH_INVALID_OPERAND" link="libxml2-xpath.html#XPATH_INVALID_OPERAND"/>
+ <function name="XPATH_INVALID_PREDICATE_ERROR" link="libxml2-xpath.html#XPATH_INVALID_PREDICATE_ERROR"/>
+ <function name="XPATH_INVALID_TYPE" link="libxml2-xpath.html#XPATH_INVALID_TYPE"/>
+ <function name="XPATH_LOCATIONSET" link="libxml2-xpath.html#XPATH_LOCATIONSET"/>
+ <function name="XPATH_MEMORY_ERROR" link="libxml2-xpath.html#XPATH_MEMORY_ERROR"/>
+ <function name="XPATH_NODESET" link="libxml2-xpath.html#XPATH_NODESET"/>
+ <function name="XPATH_NUMBER" link="libxml2-xpath.html#XPATH_NUMBER"/>
+ <function name="XPATH_NUMBER_ERROR" link="libxml2-xpath.html#XPATH_NUMBER_ERROR"/>
+ <function name="XPATH_POINT" link="libxml2-xpath.html#XPATH_POINT"/>
+ <function name="XPATH_RANGE" link="libxml2-xpath.html#XPATH_RANGE"/>
+ <function name="XPATH_STACK_ERROR" link="libxml2-xpath.html#XPATH_STACK_ERROR"/>
+ <function name="XPATH_START_LITERAL_ERROR" link="libxml2-xpath.html#XPATH_START_LITERAL_ERROR"/>
+ <function name="XPATH_STRING" link="libxml2-xpath.html#XPATH_STRING"/>
+ <function name="XPATH_UNCLOSED_ERROR" link="libxml2-xpath.html#XPATH_UNCLOSED_ERROR"/>
+ <function name="XPATH_UNDEFINED" link="libxml2-xpath.html#XPATH_UNDEFINED"/>
+ <function name="XPATH_UNDEF_PREFIX_ERROR" link="libxml2-xpath.html#XPATH_UNDEF_PREFIX_ERROR"/>
+ <function name="XPATH_UNDEF_VARIABLE_ERROR" link="libxml2-xpath.html#XPATH_UNDEF_VARIABLE_ERROR"/>
+ <function name="XPATH_UNFINISHED_LITERAL_ERROR" link="libxml2-xpath.html#XPATH_UNFINISHED_LITERAL_ERROR"/>
+ <function name="XPATH_UNKNOWN_FUNC_ERROR" link="libxml2-xpath.html#XPATH_UNKNOWN_FUNC_ERROR"/>
+ <function name="XPATH_USERS" link="libxml2-xpath.html#XPATH_USERS"/>
+ <function name="XPATH_VARIABLE_REF_ERROR" link="libxml2-xpath.html#XPATH_VARIABLE_REF_ERROR"/>
+ <function name="XPATH_XSLT_TREE" link="libxml2-xpath.html#XPATH_XSLT_TREE"/>
+ <function name="XPTR_RESOURCE_ERROR" link="libxml2-xpath.html#XPTR_RESOURCE_ERROR"/>
+ <function name="XPTR_SUB_RESOURCE_ERROR" link="libxml2-xpath.html#XPTR_SUB_RESOURCE_ERROR"/>
+ <function name="XPTR_SYNTAX_ERROR" link="libxml2-xpath.html#XPTR_SYNTAX_ERROR"/>
+ <function name="docbDocPtr" link="libxml2-DOCBparser.html#docbDocPtr"/>
+ <function name="docbParserCtxt" link="libxml2-DOCBparser.html#docbParserCtxt"/>
+ <function name="docbParserCtxtPtr" link="libxml2-DOCBparser.html#docbParserCtxtPtr"/>
+ <function name="docbParserInput" link="libxml2-DOCBparser.html#docbParserInput"/>
+ <function name="docbParserInputPtr" link="libxml2-DOCBparser.html#docbParserInputPtr"/>
+ <function name="docbSAXHandler" link="libxml2-DOCBparser.html#docbSAXHandler"/>
+ <function name="docbSAXHandlerPtr" link="libxml2-DOCBparser.html#docbSAXHandlerPtr"/>
+ <function name="htmlDocPtr" link="libxml2-HTMLparser.html#htmlDocPtr"/>
+ <function name="htmlElemDescPtr" link="libxml2-HTMLparser.html#htmlElemDescPtr"/>
+ <function name="htmlEntityDescPtr" link="libxml2-HTMLparser.html#htmlEntityDescPtr"/>
+ <function name="htmlNodePtr" link="libxml2-HTMLparser.html#htmlNodePtr"/>
+ <function name="htmlParserCtxt" link="libxml2-HTMLparser.html#htmlParserCtxt"/>
+ <function name="htmlParserCtxtPtr" link="libxml2-HTMLparser.html#htmlParserCtxtPtr"/>
+ <function name="htmlParserInput" link="libxml2-HTMLparser.html#htmlParserInput"/>
+ <function name="htmlParserInputPtr" link="libxml2-HTMLparser.html#htmlParserInputPtr"/>
+ <function name="htmlParserNodeInfo" link="libxml2-HTMLparser.html#htmlParserNodeInfo"/>
+ <function name="htmlParserOption" link="libxml2-HTMLparser.html#htmlParserOption"/>
+ <function name="htmlSAXHandler" link="libxml2-HTMLparser.html#htmlSAXHandler"/>
+ <function name="htmlSAXHandlerPtr" link="libxml2-HTMLparser.html#htmlSAXHandlerPtr"/>
+ <function name="htmlStatus" link="libxml2-HTMLparser.html#htmlStatus"/>
+ <function name="xlinkActuate" link="libxml2-xlink.html#xlinkActuate"/>
+ <function name="xlinkHRef" link="libxml2-xlink.html#xlinkHRef"/>
+ <function name="xlinkHandlerPtr" link="libxml2-xlink.html#xlinkHandlerPtr"/>
+ <function name="xlinkRole" link="libxml2-xlink.html#xlinkRole"/>
+ <function name="xlinkShow" link="libxml2-xlink.html#xlinkShow"/>
+ <function name="xlinkTitle" link="libxml2-xlink.html#xlinkTitle"/>
+ <function name="xlinkType" link="libxml2-xlink.html#xlinkType"/>
+ <function name="xmlAttrPtr" link="libxml2-tree.html#xmlAttrPtr"/>
+ <function name="xmlAttributeDefault" link="libxml2-tree.html#xmlAttributeDefault"/>
+ <function name="xmlAttributePtr" link="libxml2-tree.html#xmlAttributePtr"/>
+ <function name="xmlAttributeTablePtr" link="libxml2-valid.html#xmlAttributeTablePtr"/>
+ <function name="xmlAttributeType" link="libxml2-tree.html#xmlAttributeType"/>
+ <function name="xmlAutomataPtr" link="libxml2-xmlautomata.html#xmlAutomataPtr"/>
+ <function name="xmlAutomataStatePtr" link="libxml2-xmlautomata.html#xmlAutomataStatePtr"/>
+ <function name="xmlBufPtr" link="libxml2-tree.html#xmlBufPtr"/>
+ <function name="xmlBufferAllocationScheme" link="libxml2-tree.html#xmlBufferAllocationScheme"/>
+ <function name="xmlBufferPtr" link="libxml2-tree.html#xmlBufferPtr"/>
+ <function name="xmlC14NMode" link="libxml2-c14n.html#xmlC14NMode"/>
+ <function name="xmlCatalogAllow" link="libxml2-catalog.html#xmlCatalogAllow"/>
+ <function name="xmlCatalogPrefer" link="libxml2-catalog.html#xmlCatalogPrefer"/>
+ <function name="xmlCatalogPtr" link="libxml2-catalog.html#xmlCatalogPtr"/>
+ <function name="xmlChLRangePtr" link="libxml2-chvalid.html#xmlChLRangePtr"/>
+ <function name="xmlChRangeGroupPtr" link="libxml2-chvalid.html#xmlChRangeGroupPtr"/>
+ <function name="xmlChSRangePtr" link="libxml2-chvalid.html#xmlChSRangePtr"/>
+ <function name="xmlChar" link="libxml2-xmlstring.html#xmlChar"/>
+ <function name="xmlCharEncoding" link="libxml2-encoding.html#xmlCharEncoding"/>
+ <function name="xmlCharEncodingHandlerPtr" link="libxml2-encoding.html#xmlCharEncodingHandlerPtr"/>
+ <function name="xmlDOMWrapCtxtPtr" link="libxml2-tree.html#xmlDOMWrapCtxtPtr"/>
+ <function name="xmlDictPtr" link="libxml2-dict.html#xmlDictPtr"/>
+ <function name="xmlDocProperties" link="libxml2-tree.html#xmlDocProperties"/>
+ <function name="xmlDocPtr" link="libxml2-tree.html#xmlDocPtr"/>
+ <function name="xmlDtdPtr" link="libxml2-tree.html#xmlDtdPtr"/>
+ <function name="xmlElementContentOccur" link="libxml2-tree.html#xmlElementContentOccur"/>
+ <function name="xmlElementContentPtr" link="libxml2-tree.html#xmlElementContentPtr"/>
+ <function name="xmlElementContentType" link="libxml2-tree.html#xmlElementContentType"/>
+ <function name="xmlElementPtr" link="libxml2-tree.html#xmlElementPtr"/>
+ <function name="xmlElementTablePtr" link="libxml2-valid.html#xmlElementTablePtr"/>
+ <function name="xmlElementType" link="libxml2-tree.html#xmlElementType"/>
+ <function name="xmlElementTypeVal" link="libxml2-tree.html#xmlElementTypeVal"/>
+ <function name="xmlEntitiesTablePtr" link="libxml2-entities.html#xmlEntitiesTablePtr"/>
+ <function name="xmlEntityPtr" link="libxml2-tree.html#xmlEntityPtr"/>
+ <function name="xmlEntityType" link="libxml2-entities.html#xmlEntityType"/>
+ <function name="xmlEnumerationPtr" link="libxml2-tree.html#xmlEnumerationPtr"/>
+ <function name="xmlErrorDomain" link="libxml2-xmlerror.html#xmlErrorDomain"/>
+ <function name="xmlErrorLevel" link="libxml2-xmlerror.html#xmlErrorLevel"/>
+ <function name="xmlErrorPtr" link="libxml2-xmlerror.html#xmlErrorPtr"/>
+ <function name="xmlExpCtxtPtr" link="libxml2-xmlregexp.html#xmlExpCtxtPtr"/>
+ <function name="xmlExpNodePtr" link="libxml2-xmlregexp.html#xmlExpNodePtr"/>
+ <function name="xmlExpNodeType" link="libxml2-xmlregexp.html#xmlExpNodeType"/>
+ <function name="xmlFeature" link="libxml2-parser.html#xmlFeature"/>
+ <function name="xmlGlobalStatePtr" link="libxml2-globals.html#xmlGlobalStatePtr"/>
+ <function name="xmlHashTablePtr" link="libxml2-hash.html#xmlHashTablePtr"/>
+ <function name="xmlIDPtr" link="libxml2-tree.html#xmlIDPtr"/>
+ <function name="xmlIDTablePtr" link="libxml2-valid.html#xmlIDTablePtr"/>
+ <function name="xmlLinkPtr" link="libxml2-list.html#xmlLinkPtr"/>
+ <function name="xmlListPtr" link="libxml2-list.html#xmlListPtr"/>
+ <function name="xmlLocationSetPtr" link="libxml2-xpointer.html#xmlLocationSetPtr"/>
+ <function name="xmlModuleOption" link="libxml2-xmlmodule.html#xmlModuleOption"/>
+ <function name="xmlModulePtr" link="libxml2-xmlmodule.html#xmlModulePtr"/>
+ <function name="xmlMutexPtr" link="libxml2-threads.html#xmlMutexPtr"/>
+ <function name="xmlNodePtr" link="libxml2-tree.html#xmlNodePtr"/>
+ <function name="xmlNodeSetPtr" link="libxml2-xpath.html#xmlNodeSetPtr"/>
+ <function name="xmlNotationPtr" link="libxml2-tree.html#xmlNotationPtr"/>
+ <function name="xmlNotationTablePtr" link="libxml2-valid.html#xmlNotationTablePtr"/>
+ <function name="xmlNsPtr" link="libxml2-tree.html#xmlNsPtr"/>
+ <function name="xmlNsType" link="libxml2-tree.html#xmlNsType"/>
+ <function name="xmlOutputBufferPtr" link="libxml2-tree.html#xmlOutputBufferPtr"/>
+ <function name="xmlParserCtxtPtr" link="libxml2-tree.html#xmlParserCtxtPtr"/>
+ <function name="xmlParserErrors" link="libxml2-xmlerror.html#xmlParserErrors"/>
+ <function name="xmlParserInputBufferPtr" link="libxml2-tree.html#xmlParserInputBufferPtr"/>
+ <function name="xmlParserInputPtr" link="libxml2-tree.html#xmlParserInputPtr"/>
+ <function name="xmlParserInputState" link="libxml2-parser.html#xmlParserInputState"/>
+ <function name="xmlParserMode" link="libxml2-parser.html#xmlParserMode"/>
+ <function name="xmlParserNodeInfoPtr" link="libxml2-parser.html#xmlParserNodeInfoPtr"/>
+ <function name="xmlParserNodeInfoSeqPtr" link="libxml2-parser.html#xmlParserNodeInfoSeqPtr"/>
+ <function name="xmlParserOption" link="libxml2-parser.html#xmlParserOption"/>
+ <function name="xmlParserProperties" link="libxml2-xmlreader.html#xmlParserProperties"/>
+ <function name="xmlParserSeverities" link="libxml2-xmlreader.html#xmlParserSeverities"/>
+ <function name="xmlPatternFlags" link="libxml2-pattern.html#xmlPatternFlags"/>
+ <function name="xmlPatternPtr" link="libxml2-pattern.html#xmlPatternPtr"/>
+ <function name="xmlRMutexPtr" link="libxml2-threads.html#xmlRMutexPtr"/>
+ <function name="xmlReaderTypes" link="libxml2-xmlreader.html#xmlReaderTypes"/>
+ <function name="xmlRefPtr" link="libxml2-tree.html#xmlRefPtr"/>
+ <function name="xmlRefTablePtr" link="libxml2-valid.html#xmlRefTablePtr"/>
+ <function name="xmlRegExecCtxtPtr" link="libxml2-xmlregexp.html#xmlRegExecCtxtPtr"/>
+ <function name="xmlRegexpPtr" link="libxml2-xmlregexp.html#xmlRegexpPtr"/>
+ <function name="xmlRelaxNGParserCtxtPtr" link="libxml2-relaxng.html#xmlRelaxNGParserCtxtPtr"/>
+ <function name="xmlRelaxNGParserFlag" link="libxml2-relaxng.html#xmlRelaxNGParserFlag"/>
+ <function name="xmlRelaxNGPtr" link="libxml2-relaxng.html#xmlRelaxNGPtr"/>
+ <function name="xmlRelaxNGValidCtxtPtr" link="libxml2-relaxng.html#xmlRelaxNGValidCtxtPtr"/>
+ <function name="xmlRelaxNGValidErr" link="libxml2-relaxng.html#xmlRelaxNGValidErr"/>
+ <function name="xmlSAXHandlerPtr" link="libxml2-tree.html#xmlSAXHandlerPtr"/>
+ <function name="xmlSAXHandlerV1Ptr" link="libxml2-parser.html#xmlSAXHandlerV1Ptr"/>
+ <function name="xmlSAXLocatorPtr" link="libxml2-tree.html#xmlSAXLocatorPtr"/>
+ <function name="xmlSaveCtxtPtr" link="libxml2-xmlsave.html#xmlSaveCtxtPtr"/>
+ <function name="xmlSaveOption" link="libxml2-xmlsave.html#xmlSaveOption"/>
+ <function name="xmlSchemaAnnotPtr" link="libxml2-schemasInternals.html#xmlSchemaAnnotPtr"/>
+ <function name="xmlSchemaAttributeGroupPtr" link="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr"/>
+ <function name="xmlSchemaAttributeLinkPtr" link="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr"/>
+ <function name="xmlSchemaAttributePtr" link="libxml2-schemasInternals.html#xmlSchemaAttributePtr"/>
+ <function name="xmlSchemaContentType" link="libxml2-schemasInternals.html#xmlSchemaContentType"/>
+ <function name="xmlSchemaElementPtr" link="libxml2-schemasInternals.html#xmlSchemaElementPtr"/>
+ <function name="xmlSchemaFacetLinkPtr" link="libxml2-schemasInternals.html#xmlSchemaFacetLinkPtr"/>
+ <function name="xmlSchemaFacetPtr" link="libxml2-schemasInternals.html#xmlSchemaFacetPtr"/>
+ <function name="xmlSchemaNotationPtr" link="libxml2-schemasInternals.html#xmlSchemaNotationPtr"/>
+ <function name="xmlSchemaParserCtxtPtr" link="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr"/>
+ <function name="xmlSchemaPtr" link="libxml2-xmlschemas.html#xmlSchemaPtr"/>
+ <function name="xmlSchemaSAXPlugPtr" link="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr"/>
+ <function name="xmlSchemaTypeLinkPtr" link="libxml2-schemasInternals.html#xmlSchemaTypeLinkPtr"/>
+ <function name="xmlSchemaTypePtr" link="libxml2-schemasInternals.html#xmlSchemaTypePtr"/>
+ <function name="xmlSchemaTypeType" link="libxml2-schemasInternals.html#xmlSchemaTypeType"/>
+ <function name="xmlSchemaValPtr" link="libxml2-schemasInternals.html#xmlSchemaValPtr"/>
+ <function name="xmlSchemaValType" link="libxml2-schemasInternals.html#xmlSchemaValType"/>
+ <function name="xmlSchemaValidCtxtPtr" link="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr"/>
+ <function name="xmlSchemaValidError" link="libxml2-xmlschemas.html#xmlSchemaValidError"/>
+ <function name="xmlSchemaValidOption" link="libxml2-xmlschemas.html#xmlSchemaValidOption"/>
+ <function name="xmlSchemaWhitespaceValueType" link="libxml2-xmlschemastypes.html#xmlSchemaWhitespaceValueType"/>
+ <function name="xmlSchemaWildcardNsPtr" link="libxml2-schemasInternals.html#xmlSchemaWildcardNsPtr"/>
+ <function name="xmlSchemaWildcardPtr" link="libxml2-schemasInternals.html#xmlSchemaWildcardPtr"/>
+ <function name="xmlSchematronParserCtxtPtr" link="libxml2-schematron.html#xmlSchematronParserCtxtPtr"/>
+ <function name="xmlSchematronPtr" link="libxml2-schematron.html#xmlSchematronPtr"/>
+ <function name="xmlSchematronValidCtxtPtr" link="libxml2-schematron.html#xmlSchematronValidCtxtPtr"/>
+ <function name="xmlSchematronValidOptions" link="libxml2-schematron.html#xmlSchematronValidOptions"/>
+ <function name="xmlShellCtxtPtr" link="libxml2-debugXML.html#xmlShellCtxtPtr"/>
+ <function name="xmlStreamCtxtPtr" link="libxml2-pattern.html#xmlStreamCtxtPtr"/>
+ <function name="xmlTextReaderLocatorPtr" link="libxml2-xmlreader.html#xmlTextReaderLocatorPtr"/>
+ <function name="xmlTextReaderMode" link="libxml2-xmlreader.html#xmlTextReaderMode"/>
+ <function name="xmlTextReaderPtr" link="libxml2-xmlreader.html#xmlTextReaderPtr"/>
+ <function name="xmlTextWriterPtr" link="libxml2-xmlwriter.html#xmlTextWriterPtr"/>
+ <function name="xmlURIPtr" link="libxml2-uri.html#xmlURIPtr"/>
+ <function name="xmlValidCtxtPtr" link="libxml2-valid.html#xmlValidCtxtPtr"/>
+ <function name="xmlValidStatePtr" link="libxml2-valid.html#xmlValidStatePtr"/>
+ <function name="xmlXIncludeCtxtPtr" link="libxml2-xinclude.html#xmlXIncludeCtxtPtr"/>
+ <function name="xmlXPathAxisPtr" link="libxml2-xpath.html#xmlXPathAxisPtr"/>
+ <function name="xmlXPathCompExprPtr" link="libxml2-xpath.html#xmlXPathCompExprPtr"/>
+ <function name="xmlXPathContextPtr" link="libxml2-xpath.html#xmlXPathContextPtr"/>
+ <function name="xmlXPathError" link="libxml2-xpath.html#xmlXPathError"/>
+ <function name="xmlXPathFuncPtr" link="libxml2-xpath.html#xmlXPathFuncPtr"/>
+ <function name="xmlXPathObjectPtr" link="libxml2-xpath.html#xmlXPathObjectPtr"/>
+ <function name="xmlXPathObjectType" link="libxml2-xpath.html#xmlXPathObjectType"/>
+ <function name="xmlXPathParserContextPtr" link="libxml2-xpath.html#xmlXPathParserContextPtr"/>
+ <function name="xmlXPathTypePtr" link="libxml2-xpath.html#xmlXPathTypePtr"/>
+ <function name="xmlXPathVariablePtr" link="libxml2-xpath.html#xmlXPathVariablePtr"/>
+ <function name="htmlElemDesc" link="libxml2-HTMLparser.html#htmlElemDesc"/>
+ <function name="htmlEntityDesc" link="libxml2-HTMLparser.html#htmlEntityDesc"/>
+ <function name="uconv_t" link="libxml2-encoding.html#uconv_t"/>
+ <function name="xlinkHandler" link="libxml2-xlink.html#xlinkHandler"/>
+ <function name="xmlAttr" link="libxml2-tree.html#xmlAttr"/>
+ <function name="xmlAttribute" link="libxml2-tree.html#xmlAttribute"/>
+ <function name="xmlAttributeTable" link="libxml2-valid.html#xmlAttributeTable"/>
+ <function name="xmlAutomata" link="libxml2-xmlautomata.html#xmlAutomata"/>
+ <function name="xmlAutomataState" link="libxml2-xmlautomata.html#xmlAutomataState"/>
+ <function name="xmlBuf" link="libxml2-tree.html#xmlBuf"/>
+ <function name="xmlBuffer" link="libxml2-tree.html#xmlBuffer"/>
+ <function name="xmlCatalog" link="libxml2-catalog.html#xmlCatalog"/>
+ <function name="xmlChLRange" link="libxml2-chvalid.html#xmlChLRange"/>
+ <function name="xmlChRangeGroup" link="libxml2-chvalid.html#xmlChRangeGroup"/>
+ <function name="xmlChSRange" link="libxml2-chvalid.html#xmlChSRange"/>
+ <function name="xmlCharEncodingHandler" link="libxml2-encoding.html#xmlCharEncodingHandler"/>
+ <function name="xmlDOMWrapCtxt" link="libxml2-tree.html#xmlDOMWrapCtxt"/>
+ <function name="xmlDict" link="libxml2-dict.html#xmlDict"/>
+ <function name="xmlDoc" link="libxml2-tree.html#xmlDoc"/>
+ <function name="xmlDtd" link="libxml2-tree.html#xmlDtd"/>
+ <function name="xmlElement" link="libxml2-tree.html#xmlElement"/>
+ <function name="xmlElementContent" link="libxml2-tree.html#xmlElementContent"/>
+ <function name="xmlElementTable" link="libxml2-valid.html#xmlElementTable"/>
+ <function name="xmlEntitiesTable" link="libxml2-entities.html#xmlEntitiesTable"/>
+ <function name="xmlEntity" link="libxml2-tree.html#xmlEntity"/>
+ <function name="xmlEnumeration" link="libxml2-tree.html#xmlEnumeration"/>
+ <function name="xmlError" link="libxml2-xmlerror.html#xmlError"/>
+ <function name="xmlExpCtxt" link="libxml2-xmlregexp.html#xmlExpCtxt"/>
+ <function name="xmlExpNode" link="libxml2-xmlregexp.html#xmlExpNode"/>
+ <function name="xmlGlobalState" link="libxml2-globals.html#xmlGlobalState"/>
+ <function name="xmlHashTable" link="libxml2-hash.html#xmlHashTable"/>
+ <function name="xmlID" link="libxml2-tree.html#xmlID"/>
+ <function name="xmlIDTable" link="libxml2-valid.html#xmlIDTable"/>
+ <function name="xmlLink" link="libxml2-list.html#xmlLink"/>
+ <function name="xmlList" link="libxml2-list.html#xmlList"/>
+ <function name="xmlLocationSet" link="libxml2-xpointer.html#xmlLocationSet"/>
+ <function name="xmlModule" link="libxml2-xmlmodule.html#xmlModule"/>
+ <function name="xmlMutex" link="libxml2-threads.html#xmlMutex"/>
+ <function name="xmlNode" link="libxml2-tree.html#xmlNode"/>
+ <function name="xmlNodeSet" link="libxml2-xpath.html#xmlNodeSet"/>
+ <function name="xmlNotation" link="libxml2-tree.html#xmlNotation"/>
+ <function name="xmlNotationTable" link="libxml2-valid.html#xmlNotationTable"/>
+ <function name="xmlNs" link="libxml2-tree.html#xmlNs"/>
+ <function name="xmlOutputBuffer" link="libxml2-tree.html#xmlOutputBuffer"/>
+ <function name="xmlParserCtxt" link="libxml2-tree.html#xmlParserCtxt"/>
+ <function name="xmlParserInput" link="libxml2-tree.html#xmlParserInput"/>
+ <function name="xmlParserInputBuffer" link="libxml2-tree.html#xmlParserInputBuffer"/>
+ <function name="xmlParserNodeInfo" link="libxml2-parser.html#xmlParserNodeInfo"/>
+ <function name="xmlParserNodeInfoSeq" link="libxml2-parser.html#xmlParserNodeInfoSeq"/>
+ <function name="xmlPattern" link="libxml2-pattern.html#xmlPattern"/>
+ <function name="xmlRMutex" link="libxml2-threads.html#xmlRMutex"/>
+ <function name="xmlRef" link="libxml2-tree.html#xmlRef"/>
+ <function name="xmlRefTable" link="libxml2-valid.html#xmlRefTable"/>
+ <function name="xmlRegExecCtxt" link="libxml2-xmlregexp.html#xmlRegExecCtxt"/>
+ <function name="xmlRegexp" link="libxml2-xmlregexp.html#xmlRegexp"/>
+ <function name="xmlRelaxNG" link="libxml2-relaxng.html#xmlRelaxNG"/>
+ <function name="xmlRelaxNGParserCtxt" link="libxml2-relaxng.html#xmlRelaxNGParserCtxt"/>
+ <function name="xmlRelaxNGValidCtxt" link="libxml2-relaxng.html#xmlRelaxNGValidCtxt"/>
+ <function name="xmlSAXHandler" link="libxml2-tree.html#xmlSAXHandler"/>
+ <function name="xmlSAXHandlerV1" link="libxml2-parser.html#xmlSAXHandlerV1"/>
+ <function name="xmlSAXLocator" link="libxml2-tree.html#xmlSAXLocator"/>
+ <function name="xmlSaveCtxt" link="libxml2-xmlsave.html#xmlSaveCtxt"/>
+ <function name="xmlSchema" link="libxml2-xmlschemas.html#xmlSchema"/>
+ <function name="xmlSchemaAnnot" link="libxml2-schemasInternals.html#xmlSchemaAnnot"/>
+ <function name="xmlSchemaAttribute" link="libxml2-schemasInternals.html#xmlSchemaAttribute"/>
+ <function name="xmlSchemaAttributeGroup" link="libxml2-schemasInternals.html#xmlSchemaAttributeGroup"/>
+ <function name="xmlSchemaAttributeLink" link="libxml2-schemasInternals.html#xmlSchemaAttributeLink"/>
+ <function name="xmlSchemaElement" link="libxml2-schemasInternals.html#xmlSchemaElement"/>
+ <function name="xmlSchemaFacet" link="libxml2-schemasInternals.html#xmlSchemaFacet"/>
+ <function name="xmlSchemaFacetLink" link="libxml2-schemasInternals.html#xmlSchemaFacetLink"/>
+ <function name="xmlSchemaNotation" link="libxml2-schemasInternals.html#xmlSchemaNotation"/>
+ <function name="xmlSchemaParserCtxt" link="libxml2-xmlschemas.html#xmlSchemaParserCtxt"/>
+ <function name="xmlSchemaSAXPlugStruct" link="libxml2-xmlschemas.html#xmlSchemaSAXPlugStruct"/>
+ <function name="xmlSchemaType" link="libxml2-schemasInternals.html#xmlSchemaType"/>
+ <function name="xmlSchemaTypeLink" link="libxml2-schemasInternals.html#xmlSchemaTypeLink"/>
+ <function name="xmlSchemaVal" link="libxml2-schemasInternals.html#xmlSchemaVal"/>
+ <function name="xmlSchemaValidCtxt" link="libxml2-xmlschemas.html#xmlSchemaValidCtxt"/>
+ <function name="xmlSchemaWildcard" link="libxml2-schemasInternals.html#xmlSchemaWildcard"/>
+ <function name="xmlSchemaWildcardNs" link="libxml2-schemasInternals.html#xmlSchemaWildcardNs"/>
+ <function name="xmlSchematron" link="libxml2-schematron.html#xmlSchematron"/>
+ <function name="xmlSchematronParserCtxt" link="libxml2-schematron.html#xmlSchematronParserCtxt"/>
+ <function name="xmlSchematronValidCtxt" link="libxml2-schematron.html#xmlSchematronValidCtxt"/>
+ <function name="xmlShellCtxt" link="libxml2-debugXML.html#xmlShellCtxt"/>
+ <function name="xmlStreamCtxt" link="libxml2-pattern.html#xmlStreamCtxt"/>
+ <function name="xmlTextReader" link="libxml2-xmlreader.html#xmlTextReader"/>
+ <function name="xmlTextWriter" link="libxml2-xmlwriter.html#xmlTextWriter"/>
+ <function name="xmlURI" link="libxml2-uri.html#xmlURI"/>
+ <function name="xmlValidCtxt" link="libxml2-valid.html#xmlValidCtxt"/>
+ <function name="xmlValidState" link="libxml2-valid.html#xmlValidState"/>
+ <function name="xmlXIncludeCtxt" link="libxml2-xinclude.html#xmlXIncludeCtxt"/>
+ <function name="xmlXPathAxis" link="libxml2-xpath.html#xmlXPathAxis"/>
+ <function name="xmlXPathCompExpr" link="libxml2-xpath.html#xmlXPathCompExpr"/>
+ <function name="xmlXPathContext" link="libxml2-xpath.html#xmlXPathContext"/>
+ <function name="xmlXPathFunct" link="libxml2-xpath.html#xmlXPathFunct"/>
+ <function name="xmlXPathObject" link="libxml2-xpath.html#xmlXPathObject"/>
+ <function name="xmlXPathParserContext" link="libxml2-xpath.html#xmlXPathParserContext"/>
+ <function name="xmlXPathType" link="libxml2-xpath.html#xmlXPathType"/>
+ <function name="xmlXPathVariable" link="libxml2-xpath.html#xmlXPathVariable"/>
+ <function name="attributeDeclSAXFunc" link="libxml2-parser.html#attributeDeclSAXFunc"/>
+ <function name="attributeSAXFunc" link="libxml2-parser.html#attributeSAXFunc"/>
+ <function name="cdataBlockSAXFunc" link="libxml2-parser.html#cdataBlockSAXFunc"/>
+ <function name="charactersSAXFunc" link="libxml2-parser.html#charactersSAXFunc"/>
+ <function name="commentSAXFunc" link="libxml2-parser.html#commentSAXFunc"/>
+ <function name="elementDeclSAXFunc" link="libxml2-parser.html#elementDeclSAXFunc"/>
+ <function name="endDocumentSAXFunc" link="libxml2-parser.html#endDocumentSAXFunc"/>
+ <function name="endElementNsSAX2Func" link="libxml2-parser.html#endElementNsSAX2Func"/>
+ <function name="endElementSAXFunc" link="libxml2-parser.html#endElementSAXFunc"/>
+ <function name="entityDeclSAXFunc" link="libxml2-parser.html#entityDeclSAXFunc"/>
+ <function name="errorSAXFunc" link="libxml2-parser.html#errorSAXFunc"/>
+ <function name="externalSubsetSAXFunc" link="libxml2-parser.html#externalSubsetSAXFunc"/>
+ <function name="fatalErrorSAXFunc" link="libxml2-parser.html#fatalErrorSAXFunc"/>
+ <function name="ftpDataCallback" link="libxml2-nanoftp.html#ftpDataCallback"/>
+ <function name="ftpListCallback" link="libxml2-nanoftp.html#ftpListCallback"/>
+ <function name="getEntitySAXFunc" link="libxml2-parser.html#getEntitySAXFunc"/>
+ <function name="getParameterEntitySAXFunc" link="libxml2-parser.html#getParameterEntitySAXFunc"/>
+ <function name="hasExternalSubsetSAXFunc" link="libxml2-parser.html#hasExternalSubsetSAXFunc"/>
+ <function name="hasInternalSubsetSAXFunc" link="libxml2-parser.html#hasInternalSubsetSAXFunc"/>
+ <function name="ignorableWhitespaceSAXFunc" link="libxml2-parser.html#ignorableWhitespaceSAXFunc"/>
+ <function name="internalSubsetSAXFunc" link="libxml2-parser.html#internalSubsetSAXFunc"/>
+ <function name="isStandaloneSAXFunc" link="libxml2-parser.html#isStandaloneSAXFunc"/>
+ <function name="notationDeclSAXFunc" link="libxml2-parser.html#notationDeclSAXFunc"/>
+ <function name="processingInstructionSAXFunc" link="libxml2-parser.html#processingInstructionSAXFunc"/>
+ <function name="referenceSAXFunc" link="libxml2-parser.html#referenceSAXFunc"/>
+ <function name="resolveEntitySAXFunc" link="libxml2-parser.html#resolveEntitySAXFunc"/>
+ <function name="setDocumentLocatorSAXFunc" link="libxml2-parser.html#setDocumentLocatorSAXFunc"/>
+ <function name="startDocumentSAXFunc" link="libxml2-parser.html#startDocumentSAXFunc"/>
+ <function name="startElementNsSAX2Func" link="libxml2-parser.html#startElementNsSAX2Func"/>
+ <function name="startElementSAXFunc" link="libxml2-parser.html#startElementSAXFunc"/>
+ <function name="unparsedEntityDeclSAXFunc" link="libxml2-parser.html#unparsedEntityDeclSAXFunc"/>
+ <function name="warningSAXFunc" link="libxml2-parser.html#warningSAXFunc"/>
+ <function name="xlinkExtendedLinkFunk" link="libxml2-xlink.html#xlinkExtendedLinkFunk"/>
+ <function name="xlinkExtendedLinkSetFunk" link="libxml2-xlink.html#xlinkExtendedLinkSetFunk"/>
+ <function name="xlinkNodeDetectFunc" link="libxml2-xlink.html#xlinkNodeDetectFunc"/>
+ <function name="xlinkSimpleLinkFunk" link="libxml2-xlink.html#xlinkSimpleLinkFunk"/>
+ <function name="xmlC14NIsVisibleCallback" link="libxml2-c14n.html#xmlC14NIsVisibleCallback"/>
+ <function name="xmlCharEncodingInputFunc" link="libxml2-encoding.html#xmlCharEncodingInputFunc"/>
+ <function name="xmlCharEncodingOutputFunc" link="libxml2-encoding.html#xmlCharEncodingOutputFunc"/>
+ <function name="xmlDOMWrapAcquireNsFunction" link="libxml2-tree.html#xmlDOMWrapAcquireNsFunction"/>
+ <function name="xmlDeregisterNodeFunc" link="libxml2-globals.html#xmlDeregisterNodeFunc"/>
+ <function name="xmlEntityReferenceFunc" link="libxml2-parserInternals.html#xmlEntityReferenceFunc"/>
+ <function name="xmlExternalEntityLoader" link="libxml2-parser.html#xmlExternalEntityLoader"/>
+ <function name="xmlFreeFunc" link="libxml2-xmlmemory.html#xmlFreeFunc"/>
+ <function name="xmlGenericErrorFunc" link="libxml2-xmlerror.html#xmlGenericErrorFunc"/>
+ <function name="xmlHashCopier" link="libxml2-hash.html#xmlHashCopier"/>
+ <function name="xmlHashDeallocator" link="libxml2-hash.html#xmlHashDeallocator"/>
+ <function name="xmlHashScanner" link="libxml2-hash.html#xmlHashScanner"/>
+ <function name="xmlHashScannerFull" link="libxml2-hash.html#xmlHashScannerFull"/>
+ <function name="xmlInputCloseCallback" link="libxml2-xmlIO.html#xmlInputCloseCallback"/>
+ <function name="xmlInputMatchCallback" link="libxml2-xmlIO.html#xmlInputMatchCallback"/>
+ <function name="xmlInputOpenCallback" link="libxml2-xmlIO.html#xmlInputOpenCallback"/>
+ <function name="xmlInputReadCallback" link="libxml2-xmlIO.html#xmlInputReadCallback"/>
+ <function name="xmlListDataCompare" link="libxml2-list.html#xmlListDataCompare"/>
+ <function name="xmlListDeallocator" link="libxml2-list.html#xmlListDeallocator"/>
+ <function name="xmlListWalker" link="libxml2-list.html#xmlListWalker"/>
+ <function name="xmlMallocFunc" link="libxml2-xmlmemory.html#xmlMallocFunc"/>
+ <function name="xmlOutputBufferCreateFilenameFunc" link="libxml2-globals.html#xmlOutputBufferCreateFilenameFunc"/>
+ <function name="xmlOutputCloseCallback" link="libxml2-xmlIO.html#xmlOutputCloseCallback"/>
+ <function name="xmlOutputMatchCallback" link="libxml2-xmlIO.html#xmlOutputMatchCallback"/>
+ <function name="xmlOutputOpenCallback" link="libxml2-xmlIO.html#xmlOutputOpenCallback"/>
+ <function name="xmlOutputWriteCallback" link="libxml2-xmlIO.html#xmlOutputWriteCallback"/>
+ <function name="xmlParserInputBufferCreateFilenameFunc" link="libxml2-globals.html#xmlParserInputBufferCreateFilenameFunc"/>
+ <function name="xmlParserInputDeallocate" link="libxml2-parser.html#xmlParserInputDeallocate"/>
+ <function name="xmlReallocFunc" link="libxml2-xmlmemory.html#xmlReallocFunc"/>
+ <function name="xmlRegExecCallbacks" link="libxml2-xmlregexp.html#xmlRegExecCallbacks"/>
+ <function name="xmlRegisterNodeFunc" link="libxml2-globals.html#xmlRegisterNodeFunc"/>
+ <function name="xmlRelaxNGValidityErrorFunc" link="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc"/>
+ <function name="xmlRelaxNGValidityWarningFunc" link="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc"/>
+ <function name="xmlSchemaValidityErrorFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc"/>
+ <function name="xmlSchemaValidityLocatorFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc"/>
+ <function name="xmlSchemaValidityWarningFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc"/>
+ <function name="xmlSchematronValidityErrorFunc" link="libxml2-schematron.html#xmlSchematronValidityErrorFunc"/>
+ <function name="xmlSchematronValidityWarningFunc" link="libxml2-schematron.html#xmlSchematronValidityWarningFunc"/>
+ <function name="xmlShellCmd" link="libxml2-debugXML.html#xmlShellCmd"/>
+ <function name="xmlShellReadlineFunc" link="libxml2-debugXML.html#xmlShellReadlineFunc"/>
+ <function name="xmlStrdupFunc" link="libxml2-xmlmemory.html#xmlStrdupFunc"/>
+ <function name="xmlStructuredErrorFunc" link="libxml2-xmlerror.html#xmlStructuredErrorFunc"/>
+ <function name="xmlTextReaderErrorFunc" link="libxml2-xmlreader.html#xmlTextReaderErrorFunc"/>
+ <function name="xmlValidityErrorFunc" link="libxml2-valid.html#xmlValidityErrorFunc"/>
+ <function name="xmlValidityWarningFunc" link="libxml2-valid.html#xmlValidityWarningFunc"/>
+ <function name="xmlXPathAxisFunc" link="libxml2-xpath.html#xmlXPathAxisFunc"/>
+ <function name="xmlXPathConvertFunc" link="libxml2-xpath.html#xmlXPathConvertFunc"/>
+ <function name="xmlXPathEvalFunc" link="libxml2-xpath.html#xmlXPathEvalFunc"/>
+ <function name="xmlXPathFuncLookupFunc" link="libxml2-xpath.html#xmlXPathFuncLookupFunc"/>
+ <function name="xmlXPathFunction" link="libxml2-xpath.html#xmlXPathFunction"/>
+ <function name="xmlXPathVariableLookupFunc" link="libxml2-xpath.html#xmlXPathVariableLookupFunc"/>
+ <function name="docbDefaultSAXHandler" link="libxml2-globals.html#docbDefaultSAXHandler"/>
+ <function name="emptyExp" link="libxml2-xmlregexp.html#emptyExp"/>
+ <function name="forbiddenExp" link="libxml2-xmlregexp.html#forbiddenExp"/>
+ <function name="htmlDefaultSAXHandler" link="libxml2-globals.html#htmlDefaultSAXHandler"/>
+ <function name="oldXMLWDcompatibility" link="libxml2-globals.html#oldXMLWDcompatibility"/>
+ <function name="xmlBufferAllocScheme" link="libxml2-globals.html#xmlBufferAllocScheme"/>
+ <function name="xmlDefaultBufferSize" link="libxml2-globals.html#xmlDefaultBufferSize"/>
+ <function name="xmlDefaultSAXHandler" link="libxml2-globals.html#xmlDefaultSAXHandler"/>
+ <function name="xmlDefaultSAXLocator" link="libxml2-globals.html#xmlDefaultSAXLocator"/>
+ <function name="xmlDeregisterNodeDefaultValue" link="libxml2-globals.html#xmlDeregisterNodeDefaultValue"/>
+ <function name="xmlDoValidityCheckingDefaultValue" link="libxml2-globals.html#xmlDoValidityCheckingDefaultValue"/>
+ <function name="xmlFree" link="libxml2-globals.html#xmlFree"/>
+ <function name="xmlGenericError" link="libxml2-globals.html#xmlGenericError"/>
+ <function name="xmlGenericErrorContext" link="libxml2-globals.html#xmlGenericErrorContext"/>
+ <function name="xmlGetWarningsDefaultValue" link="libxml2-globals.html#xmlGetWarningsDefaultValue"/>
+ <function name="xmlIndentTreeOutput" link="libxml2-globals.html#xmlIndentTreeOutput"/>
+ <function name="xmlIsBaseCharGroup" link="libxml2-chvalid.html#xmlIsBaseCharGroup"/>
+ <function name="xmlIsCharGroup" link="libxml2-chvalid.html#xmlIsCharGroup"/>
+ <function name="xmlIsCombiningGroup" link="libxml2-chvalid.html#xmlIsCombiningGroup"/>
+ <function name="xmlIsDigitGroup" link="libxml2-chvalid.html#xmlIsDigitGroup"/>
+ <function name="xmlIsExtenderGroup" link="libxml2-chvalid.html#xmlIsExtenderGroup"/>
+ <function name="xmlIsIdeographicGroup" link="libxml2-chvalid.html#xmlIsIdeographicGroup"/>
+ <function name="xmlIsPubidChar_tab" link="libxml2-chvalid.html#xmlIsPubidChar_tab"/>
+ <function name="xmlKeepBlanksDefaultValue" link="libxml2-globals.html#xmlKeepBlanksDefaultValue"/>
+ <function name="xmlLastError" link="libxml2-globals.html#xmlLastError"/>
+ <function name="xmlLineNumbersDefaultValue" link="libxml2-globals.html#xmlLineNumbersDefaultValue"/>
+ <function name="xmlLoadExtDtdDefaultValue" link="libxml2-globals.html#xmlLoadExtDtdDefaultValue"/>
+ <function name="xmlMalloc" link="libxml2-globals.html#xmlMalloc"/>
+ <function name="xmlMallocAtomic" link="libxml2-globals.html#xmlMallocAtomic"/>
+ <function name="xmlMemStrdup" link="libxml2-globals.html#xmlMemStrdup"/>
+ <function name="xmlOutputBufferCreateFilenameValue" link="libxml2-globals.html#xmlOutputBufferCreateFilenameValue"/>
+ <function name="xmlParserDebugEntities" link="libxml2-globals.html#xmlParserDebugEntities"/>
+ <function name="xmlParserInputBufferCreateFilenameValue" link="libxml2-globals.html#xmlParserInputBufferCreateFilenameValue"/>
+ <function name="xmlParserMaxDepth" link="libxml2-parserInternals.html#xmlParserMaxDepth"/>
+ <function name="xmlParserVersion" link="libxml2-globals.html#xmlParserVersion"/>
+ <function name="xmlPedanticParserDefaultValue" link="libxml2-globals.html#xmlPedanticParserDefaultValue"/>
+ <function name="xmlRealloc" link="libxml2-globals.html#xmlRealloc"/>
+ <function name="xmlRegisterNodeDefaultValue" link="libxml2-globals.html#xmlRegisterNodeDefaultValue"/>
+ <function name="xmlSaveNoEmptyTags" link="libxml2-globals.html#xmlSaveNoEmptyTags"/>
+ <function name="xmlStringComment" link="libxml2-parserInternals.html#xmlStringComment"/>
+ <function name="xmlStringText" link="libxml2-parserInternals.html#xmlStringText"/>
+ <function name="xmlStringTextNoenc" link="libxml2-parserInternals.html#xmlStringTextNoenc"/>
+ <function name="xmlStructuredError" link="libxml2-globals.html#xmlStructuredError"/>
+ <function name="xmlStructuredErrorContext" link="libxml2-globals.html#xmlStructuredErrorContext"/>
+ <function name="xmlSubstituteEntitiesDefaultValue" link="libxml2-globals.html#xmlSubstituteEntitiesDefaultValue"/>
+ <function name="xmlTreeIndentString" link="libxml2-globals.html#xmlTreeIndentString"/>
+ <function name="xmlXPathNAN" link="libxml2-xpath.html#xmlXPathNAN"/>
+ <function name="xmlXPathNINF" link="libxml2-xpath.html#xmlXPathNINF"/>
+ <function name="xmlXPathPINF" link="libxml2-xpath.html#xmlXPathPINF"/>
+ <function name="UTF8ToHtml ()" link="libxml2-HTMLparser.html#UTF8ToHtml"/>
+ <function name="UTF8Toisolat1 ()" link="libxml2-encoding.html#UTF8Toisolat1"/>
+ <function name="attribute ()" link="libxml2-SAX.html#attribute"/>
+ <function name="attributeDecl ()" link="libxml2-SAX.html#attributeDecl"/>
+ <function name="cdataBlock ()" link="libxml2-SAX.html#cdataBlock"/>
+ <function name="characters ()" link="libxml2-SAX.html#characters"/>
+ <function name="checkNamespace ()" link="libxml2-SAX.html#checkNamespace"/>
+ <function name="comment ()" link="libxml2-SAX.html#comment"/>
+ <function name="docbCreateFileParserCtxt ()" link="libxml2-DOCBparser.html#docbCreateFileParserCtxt"/>
+ <function name="docbCreatePushParserCtxt ()" link="libxml2-DOCBparser.html#docbCreatePushParserCtxt"/>
+ <function name="docbDefaultSAXHandlerInit ()" link="libxml2-SAX2.html#docbDefaultSAXHandlerInit"/>
+ <function name="docbEncodeEntities ()" link="libxml2-DOCBparser.html#docbEncodeEntities"/>
+ <function name="docbFreeParserCtxt ()" link="libxml2-DOCBparser.html#docbFreeParserCtxt"/>
+ <function name="docbParseChunk ()" link="libxml2-DOCBparser.html#docbParseChunk"/>
+ <function name="docbParseDoc ()" link="libxml2-DOCBparser.html#docbParseDoc"/>
+ <function name="docbParseDocument ()" link="libxml2-DOCBparser.html#docbParseDocument"/>
+ <function name="docbParseFile ()" link="libxml2-DOCBparser.html#docbParseFile"/>
+ <function name="docbSAXParseDoc ()" link="libxml2-DOCBparser.html#docbSAXParseDoc"/>
+ <function name="docbSAXParseFile ()" link="libxml2-DOCBparser.html#docbSAXParseFile"/>
+ <function name="elementDecl ()" link="libxml2-SAX.html#elementDecl"/>
+ <function name="endDocument ()" link="libxml2-SAX.html#endDocument"/>
+ <function name="endElement ()" link="libxml2-SAX.html#endElement"/>
+ <function name="entityDecl ()" link="libxml2-SAX.html#entityDecl"/>
+ <function name="externalSubset ()" link="libxml2-SAX.html#externalSubset"/>
+ <function name="getColumnNumber ()" link="libxml2-SAX.html#getColumnNumber"/>
+ <function name="getEntity ()" link="libxml2-SAX.html#getEntity"/>
+ <function name="getLineNumber ()" link="libxml2-SAX.html#getLineNumber"/>
+ <function name="getNamespace ()" link="libxml2-SAX.html#getNamespace"/>
+ <function name="getParameterEntity ()" link="libxml2-SAX.html#getParameterEntity"/>
+ <function name="getPublicId ()" link="libxml2-SAX.html#getPublicId"/>
+ <function name="getSystemId ()" link="libxml2-SAX.html#getSystemId"/>
+ <function name="globalNamespace ()" link="libxml2-SAX.html#globalNamespace"/>
+ <function name="hasExternalSubset ()" link="libxml2-SAX.html#hasExternalSubset"/>
+ <function name="hasInternalSubset ()" link="libxml2-SAX.html#hasInternalSubset"/>
+ <function name="htmlAttrAllowed ()" link="libxml2-HTMLparser.html#htmlAttrAllowed"/>
+ <function name="htmlAutoCloseTag ()" link="libxml2-HTMLparser.html#htmlAutoCloseTag"/>
+ <function name="htmlCreateFileParserCtxt ()" link="libxml2-parserInternals.html#htmlCreateFileParserCtxt"/>
+ <function name="htmlCreateMemoryParserCtxt ()" link="libxml2-HTMLparser.html#htmlCreateMemoryParserCtxt"/>
+ <function name="htmlCreatePushParserCtxt ()" link="libxml2-HTMLparser.html#htmlCreatePushParserCtxt"/>
+ <function name="htmlCtxtReadDoc ()" link="libxml2-HTMLparser.html#htmlCtxtReadDoc"/>
+ <function name="htmlCtxtReadFd ()" link="libxml2-HTMLparser.html#htmlCtxtReadFd"/>
+ <function name="htmlCtxtReadFile ()" link="libxml2-HTMLparser.html#htmlCtxtReadFile"/>
+ <function name="htmlCtxtReadIO ()" link="libxml2-HTMLparser.html#htmlCtxtReadIO"/>
+ <function name="htmlCtxtReadMemory ()" link="libxml2-HTMLparser.html#htmlCtxtReadMemory"/>
+ <function name="htmlCtxtReset ()" link="libxml2-HTMLparser.html#htmlCtxtReset"/>
+ <function name="htmlCtxtUseOptions ()" link="libxml2-HTMLparser.html#htmlCtxtUseOptions"/>
+ <function name="htmlDefaultSAXHandlerInit ()" link="libxml2-SAX2.html#htmlDefaultSAXHandlerInit"/>
+ <function name="htmlDocContentDumpFormatOutput ()" link="libxml2-HTMLtree.html#htmlDocContentDumpFormatOutput"/>
+ <function name="htmlDocContentDumpOutput ()" link="libxml2-HTMLtree.html#htmlDocContentDumpOutput"/>
+ <function name="htmlDocDump ()" link="libxml2-HTMLtree.html#htmlDocDump"/>
+ <function name="htmlDocDumpMemory ()" link="libxml2-HTMLtree.html#htmlDocDumpMemory"/>
+ <function name="htmlDocDumpMemoryFormat ()" link="libxml2-HTMLtree.html#htmlDocDumpMemoryFormat"/>
+ <function name="htmlElementAllowedHere ()" link="libxml2-HTMLparser.html#htmlElementAllowedHere"/>
+ <function name="htmlElementStatusHere ()" link="libxml2-HTMLparser.html#htmlElementStatusHere"/>
+ <function name="htmlEncodeEntities ()" link="libxml2-HTMLparser.html#htmlEncodeEntities"/>
+ <function name="htmlEntityLookup ()" link="libxml2-HTMLparser.html#htmlEntityLookup"/>
+ <function name="htmlEntityValueLookup ()" link="libxml2-HTMLparser.html#htmlEntityValueLookup"/>
+ <function name="htmlFreeParserCtxt ()" link="libxml2-HTMLparser.html#htmlFreeParserCtxt"/>
+ <function name="htmlGetMetaEncoding ()" link="libxml2-HTMLtree.html#htmlGetMetaEncoding"/>
+ <function name="htmlHandleOmittedElem ()" link="libxml2-HTMLparser.html#htmlHandleOmittedElem"/>
+ <function name="htmlInitAutoClose ()" link="libxml2-parserInternals.html#htmlInitAutoClose"/>
+ <function name="htmlIsAutoClosed ()" link="libxml2-HTMLparser.html#htmlIsAutoClosed"/>
+ <function name="htmlIsBooleanAttr ()" link="libxml2-HTMLtree.html#htmlIsBooleanAttr"/>
+ <function name="htmlIsScriptAttribute ()" link="libxml2-HTMLparser.html#htmlIsScriptAttribute"/>
+ <function name="htmlNewDoc ()" link="libxml2-HTMLtree.html#htmlNewDoc"/>
+ <function name="htmlNewDocNoDtD ()" link="libxml2-HTMLtree.html#htmlNewDocNoDtD"/>
+ <function name="htmlNewParserCtxt ()" link="libxml2-HTMLparser.html#htmlNewParserCtxt"/>
+ <function name="htmlNodeDump ()" link="libxml2-HTMLtree.html#htmlNodeDump"/>
+ <function name="htmlNodeDumpFile ()" link="libxml2-HTMLtree.html#htmlNodeDumpFile"/>
+ <function name="htmlNodeDumpFileFormat ()" link="libxml2-HTMLtree.html#htmlNodeDumpFileFormat"/>
+ <function name="htmlNodeDumpFormatOutput ()" link="libxml2-HTMLtree.html#htmlNodeDumpFormatOutput"/>
+ <function name="htmlNodeDumpOutput ()" link="libxml2-HTMLtree.html#htmlNodeDumpOutput"/>
+ <function name="htmlNodeStatus ()" link="libxml2-HTMLparser.html#htmlNodeStatus"/>
+ <function name="htmlParseCharRef ()" link="libxml2-HTMLparser.html#htmlParseCharRef"/>
+ <function name="htmlParseChunk ()" link="libxml2-HTMLparser.html#htmlParseChunk"/>
+ <function name="htmlParseDoc ()" link="libxml2-HTMLparser.html#htmlParseDoc"/>
+ <function name="htmlParseDocument ()" link="libxml2-HTMLparser.html#htmlParseDocument"/>
+ <function name="htmlParseElement ()" link="libxml2-HTMLparser.html#htmlParseElement"/>
+ <function name="htmlParseEntityRef ()" link="libxml2-HTMLparser.html#htmlParseEntityRef"/>
+ <function name="htmlParseFile ()" link="libxml2-HTMLparser.html#htmlParseFile"/>
+ <function name="htmlReadDoc ()" link="libxml2-HTMLparser.html#htmlReadDoc"/>
+ <function name="htmlReadFd ()" link="libxml2-HTMLparser.html#htmlReadFd"/>
+ <function name="htmlReadFile ()" link="libxml2-HTMLparser.html#htmlReadFile"/>
+ <function name="htmlReadIO ()" link="libxml2-HTMLparser.html#htmlReadIO"/>
+ <function name="htmlReadMemory ()" link="libxml2-HTMLparser.html#htmlReadMemory"/>
+ <function name="htmlSAXParseDoc ()" link="libxml2-HTMLparser.html#htmlSAXParseDoc"/>
+ <function name="htmlSAXParseFile ()" link="libxml2-HTMLparser.html#htmlSAXParseFile"/>
+ <function name="htmlSaveFile ()" link="libxml2-HTMLtree.html#htmlSaveFile"/>
+ <function name="htmlSaveFileEnc ()" link="libxml2-HTMLtree.html#htmlSaveFileEnc"/>
+ <function name="htmlSaveFileFormat ()" link="libxml2-HTMLtree.html#htmlSaveFileFormat"/>
+ <function name="htmlSetMetaEncoding ()" link="libxml2-HTMLtree.html#htmlSetMetaEncoding"/>
+ <function name="htmlTagLookup ()" link="libxml2-HTMLparser.html#htmlTagLookup"/>
+ <function name="ignorableWhitespace ()" link="libxml2-SAX.html#ignorableWhitespace"/>
+ <function name="initGenericErrorDefaultFunc ()" link="libxml2-xmlerror.html#initGenericErrorDefaultFunc"/>
+ <function name="initdocbDefaultSAXHandler ()" link="libxml2-SAX.html#initdocbDefaultSAXHandler"/>
+ <function name="inithtmlDefaultSAXHandler ()" link="libxml2-SAX.html#inithtmlDefaultSAXHandler"/>
+ <function name="initxmlDefaultSAXHandler ()" link="libxml2-SAX.html#initxmlDefaultSAXHandler"/>
+ <function name="inputPop ()" link="libxml2-parserInternals.html#inputPop"/>
+ <function name="inputPush ()" link="libxml2-parserInternals.html#inputPush"/>
+ <function name="internalSubset ()" link="libxml2-SAX.html#internalSubset"/>
+ <function name="isStandalone ()" link="libxml2-SAX.html#isStandalone"/>
+ <function name="isolat1ToUTF8 ()" link="libxml2-encoding.html#isolat1ToUTF8"/>
+ <function name="namePop ()" link="libxml2-parserInternals.html#namePop"/>
+ <function name="namePush ()" link="libxml2-parserInternals.html#namePush"/>
+ <function name="namespaceDecl ()" link="libxml2-SAX.html#namespaceDecl"/>
+ <function name="nodePop ()" link="libxml2-parserInternals.html#nodePop"/>
+ <function name="nodePush ()" link="libxml2-parserInternals.html#nodePush"/>
+ <function name="notationDecl ()" link="libxml2-SAX.html#notationDecl"/>
+ <function name="processingInstruction ()" link="libxml2-SAX.html#processingInstruction"/>
+ <function name="reference ()" link="libxml2-SAX.html#reference"/>
+ <function name="resolveEntity ()" link="libxml2-SAX.html#resolveEntity"/>
+ <function name="setDocumentLocator ()" link="libxml2-SAX.html#setDocumentLocator"/>
+ <function name="setNamespace ()" link="libxml2-SAX.html#setNamespace"/>
+ <function name="startDocument ()" link="libxml2-SAX.html#startDocument"/>
+ <function name="startElement ()" link="libxml2-SAX.html#startElement"/>
+ <function name="unparsedEntityDecl ()" link="libxml2-SAX.html#unparsedEntityDecl"/>
+ <function name="valuePop ()" link="libxml2-xpathInternals.html#valuePop"/>
+ <function name="valuePush ()" link="libxml2-xpathInternals.html#valuePush"/>
+ <function name="xlinkGetDefaultDetect ()" link="libxml2-xlink.html#xlinkGetDefaultDetect"/>
+ <function name="xlinkGetDefaultHandler ()" link="libxml2-xlink.html#xlinkGetDefaultHandler"/>
+ <function name="xlinkIsLink ()" link="libxml2-xlink.html#xlinkIsLink"/>
+ <function name="xlinkSetDefaultDetect ()" link="libxml2-xlink.html#xlinkSetDefaultDetect"/>
+ <function name="xlinkSetDefaultHandler ()" link="libxml2-xlink.html#xlinkSetDefaultHandler"/>
+ <function name="xmlACatalogAdd ()" link="libxml2-catalog.html#xmlACatalogAdd"/>
+ <function name="xmlACatalogDump ()" link="libxml2-catalog.html#xmlACatalogDump"/>
+ <function name="xmlACatalogRemove ()" link="libxml2-catalog.html#xmlACatalogRemove"/>
+ <function name="xmlACatalogResolve ()" link="libxml2-catalog.html#xmlACatalogResolve"/>
+ <function name="xmlACatalogResolvePublic ()" link="libxml2-catalog.html#xmlACatalogResolvePublic"/>
+ <function name="xmlACatalogResolveSystem ()" link="libxml2-catalog.html#xmlACatalogResolveSystem"/>
+ <function name="xmlACatalogResolveURI ()" link="libxml2-catalog.html#xmlACatalogResolveURI"/>
+ <function name="xmlAddAttributeDecl ()" link="libxml2-valid.html#xmlAddAttributeDecl"/>
+ <function name="xmlAddChild ()" link="libxml2-tree.html#xmlAddChild"/>
+ <function name="xmlAddChildList ()" link="libxml2-tree.html#xmlAddChildList"/>
+ <function name="xmlAddDocEntity ()" link="libxml2-entities.html#xmlAddDocEntity"/>
+ <function name="xmlAddDtdEntity ()" link="libxml2-entities.html#xmlAddDtdEntity"/>
+ <function name="xmlAddElementDecl ()" link="libxml2-valid.html#xmlAddElementDecl"/>
+ <function name="xmlAddEncodingAlias ()" link="libxml2-encoding.html#xmlAddEncodingAlias"/>
+ <function name="xmlAddID ()" link="libxml2-valid.html#xmlAddID"/>
+ <function name="xmlAddNextSibling ()" link="libxml2-tree.html#xmlAddNextSibling"/>
+ <function name="xmlAddNotationDecl ()" link="libxml2-valid.html#xmlAddNotationDecl"/>
+ <function name="xmlAddPrevSibling ()" link="libxml2-tree.html#xmlAddPrevSibling"/>
+ <function name="xmlAddRef ()" link="libxml2-valid.html#xmlAddRef"/>
+ <function name="xmlAddSibling ()" link="libxml2-tree.html#xmlAddSibling"/>
+ <function name="xmlAllocOutputBuffer ()" link="libxml2-xmlIO.html#xmlAllocOutputBuffer"/>
+ <function name="xmlAllocParserInputBuffer ()" link="libxml2-xmlIO.html#xmlAllocParserInputBuffer"/>
+ <function name="xmlAttrSerializeTxtContent ()" link="libxml2-tree.html#xmlAttrSerializeTxtContent"/>
+ <function name="xmlAutomataCompile ()" link="libxml2-xmlautomata.html#xmlAutomataCompile"/>
+ <function name="xmlAutomataGetInitState ()" link="libxml2-xmlautomata.html#xmlAutomataGetInitState"/>
+ <function name="xmlAutomataIsDeterminist ()" link="libxml2-xmlautomata.html#xmlAutomataIsDeterminist"/>
+ <function name="xmlAutomataNewAllTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewAllTrans"/>
+ <function name="xmlAutomataNewCountTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewCountTrans"/>
+ <function name="xmlAutomataNewCountTrans2 ()" link="libxml2-xmlautomata.html#xmlAutomataNewCountTrans2"/>
+ <function name="xmlAutomataNewCountedTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewCountedTrans"/>
+ <function name="xmlAutomataNewCounter ()" link="libxml2-xmlautomata.html#xmlAutomataNewCounter"/>
+ <function name="xmlAutomataNewCounterTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewCounterTrans"/>
+ <function name="xmlAutomataNewEpsilon ()" link="libxml2-xmlautomata.html#xmlAutomataNewEpsilon"/>
+ <function name="xmlAutomataNewNegTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewNegTrans"/>
+ <function name="xmlAutomataNewOnceTrans ()" link="libxml2-xmlautomata.html#xmlAutomataNewOnceTrans"/>
+ <function name="xmlAutomataNewOnceTrans2 ()" link="libxml2-xmlautomata.html#xmlAutomataNewOnceTrans2"/>
+ <function name="xmlAutomataNewState ()" link="libxml2-xmlautomata.html#xmlAutomataNewState"/>
+ <function name="xmlAutomataNewTransition ()" link="libxml2-xmlautomata.html#xmlAutomataNewTransition"/>
+ <function name="xmlAutomataNewTransition2 ()" link="libxml2-xmlautomata.html#xmlAutomataNewTransition2"/>
+ <function name="xmlAutomataSetFinalState ()" link="libxml2-xmlautomata.html#xmlAutomataSetFinalState"/>
+ <function name="xmlBoolToText ()" link="libxml2-debugXML.html#xmlBoolToText"/>
+ <function name="xmlBufContent ()" link="libxml2-tree.html#xmlBufContent"/>
+ <function name="xmlBufEnd ()" link="libxml2-tree.html#xmlBufEnd"/>
+ <function name="xmlBufGetNodeContent ()" link="libxml2-tree.html#xmlBufGetNodeContent"/>
+ <function name="xmlBufNodeDump ()" link="libxml2-tree.html#xmlBufNodeDump"/>
+ <function name="xmlBufShrink ()" link="libxml2-tree.html#xmlBufShrink"/>
+ <function name="xmlBufUse ()" link="libxml2-tree.html#xmlBufUse"/>
+ <function name="xmlBufferAdd ()" link="libxml2-tree.html#xmlBufferAdd"/>
+ <function name="xmlBufferAddHead ()" link="libxml2-tree.html#xmlBufferAddHead"/>
+ <function name="xmlBufferCCat ()" link="libxml2-tree.html#xmlBufferCCat"/>
+ <function name="xmlBufferCat ()" link="libxml2-tree.html#xmlBufferCat"/>
+ <function name="xmlBufferContent ()" link="libxml2-tree.html#xmlBufferContent"/>
+ <function name="xmlBufferCreate ()" link="libxml2-tree.html#xmlBufferCreate"/>
+ <function name="xmlBufferCreateSize ()" link="libxml2-tree.html#xmlBufferCreateSize"/>
+ <function name="xmlBufferCreateStatic ()" link="libxml2-tree.html#xmlBufferCreateStatic"/>
+ <function name="xmlBufferDetach ()" link="libxml2-tree.html#xmlBufferDetach"/>
+ <function name="xmlBufferDump ()" link="libxml2-tree.html#xmlBufferDump"/>
+ <function name="xmlBufferEmpty ()" link="libxml2-tree.html#xmlBufferEmpty"/>
+ <function name="xmlBufferFree ()" link="libxml2-tree.html#xmlBufferFree"/>
+ <function name="xmlBufferGrow ()" link="libxml2-tree.html#xmlBufferGrow"/>
+ <function name="xmlBufferLength ()" link="libxml2-tree.html#xmlBufferLength"/>
+ <function name="xmlBufferResize ()" link="libxml2-tree.html#xmlBufferResize"/>
+ <function name="xmlBufferSetAllocationScheme ()" link="libxml2-tree.html#xmlBufferSetAllocationScheme"/>
+ <function name="xmlBufferShrink ()" link="libxml2-tree.html#xmlBufferShrink"/>
+ <function name="xmlBufferWriteCHAR ()" link="libxml2-tree.html#xmlBufferWriteCHAR"/>
+ <function name="xmlBufferWriteChar ()" link="libxml2-tree.html#xmlBufferWriteChar"/>
+ <function name="xmlBufferWriteQuotedString ()" link="libxml2-tree.html#xmlBufferWriteQuotedString"/>
+ <function name="xmlBuildQName ()" link="libxml2-tree.html#xmlBuildQName"/>
+ <function name="xmlBuildRelativeURI ()" link="libxml2-uri.html#xmlBuildRelativeURI"/>
+ <function name="xmlBuildURI ()" link="libxml2-uri.html#xmlBuildURI"/>
+ <function name="xmlByteConsumed ()" link="libxml2-parser.html#xmlByteConsumed"/>
+ <function name="xmlC14NDocDumpMemory ()" link="libxml2-c14n.html#xmlC14NDocDumpMemory"/>
+ <function name="xmlC14NDocSave ()" link="libxml2-c14n.html#xmlC14NDocSave"/>
+ <function name="xmlC14NDocSaveTo ()" link="libxml2-c14n.html#xmlC14NDocSaveTo"/>
+ <function name="xmlC14NExecute ()" link="libxml2-c14n.html#xmlC14NExecute"/>
+ <function name="xmlCanonicPath ()" link="libxml2-uri.html#xmlCanonicPath"/>
+ <function name="xmlCatalogAdd ()" link="libxml2-catalog.html#xmlCatalogAdd"/>
+ <function name="xmlCatalogAddLocal ()" link="libxml2-catalog.html#xmlCatalogAddLocal"/>
+ <function name="xmlCatalogCleanup ()" link="libxml2-catalog.html#xmlCatalogCleanup"/>
+ <function name="xmlCatalogConvert ()" link="libxml2-catalog.html#xmlCatalogConvert"/>
+ <function name="xmlCatalogDump ()" link="libxml2-catalog.html#xmlCatalogDump"/>
+ <function name="xmlCatalogFreeLocal ()" link="libxml2-catalog.html#xmlCatalogFreeLocal"/>
+ <function name="xmlCatalogGetDefaults ()" link="libxml2-catalog.html#xmlCatalogGetDefaults"/>
+ <function name="xmlCatalogGetPublic ()" link="libxml2-catalog.html#xmlCatalogGetPublic"/>
+ <function name="xmlCatalogGetSystem ()" link="libxml2-catalog.html#xmlCatalogGetSystem"/>
+ <function name="xmlCatalogIsEmpty ()" link="libxml2-catalog.html#xmlCatalogIsEmpty"/>
+ <function name="xmlCatalogLocalResolve ()" link="libxml2-catalog.html#xmlCatalogLocalResolve"/>
+ <function name="xmlCatalogLocalResolveURI ()" link="libxml2-catalog.html#xmlCatalogLocalResolveURI"/>
+ <function name="xmlCatalogRemove ()" link="libxml2-catalog.html#xmlCatalogRemove"/>
+ <function name="xmlCatalogResolve ()" link="libxml2-catalog.html#xmlCatalogResolve"/>
+ <function name="xmlCatalogResolvePublic ()" link="libxml2-catalog.html#xmlCatalogResolvePublic"/>
+ <function name="xmlCatalogResolveSystem ()" link="libxml2-catalog.html#xmlCatalogResolveSystem"/>
+ <function name="xmlCatalogResolveURI ()" link="libxml2-catalog.html#xmlCatalogResolveURI"/>
+ <function name="xmlCatalogSetDebug ()" link="libxml2-catalog.html#xmlCatalogSetDebug"/>
+ <function name="xmlCatalogSetDefaultPrefer ()" link="libxml2-catalog.html#xmlCatalogSetDefaultPrefer"/>
+ <function name="xmlCatalogSetDefaults ()" link="libxml2-catalog.html#xmlCatalogSetDefaults"/>
+ <function name="xmlCharEncCloseFunc ()" link="libxml2-encoding.html#xmlCharEncCloseFunc"/>
+ <function name="xmlCharEncFirstLine ()" link="libxml2-encoding.html#xmlCharEncFirstLine"/>
+ <function name="xmlCharEncInFunc ()" link="libxml2-encoding.html#xmlCharEncInFunc"/>
+ <function name="xmlCharEncOutFunc ()" link="libxml2-encoding.html#xmlCharEncOutFunc"/>
+ <function name="xmlCharInRange ()" link="libxml2-chvalid.html#xmlCharInRange"/>
+ <function name="xmlCharStrdup ()" link="libxml2-xmlstring.html#xmlCharStrdup"/>
+ <function name="xmlCharStrndup ()" link="libxml2-xmlstring.html#xmlCharStrndup"/>
+ <function name="xmlCheckFilename ()" link="libxml2-xmlIO.html#xmlCheckFilename"/>
+ <function name="xmlCheckHTTPInput ()" link="libxml2-xmlIO.html#xmlCheckHTTPInput"/>
+ <function name="xmlCheckLanguageID ()" link="libxml2-parserInternals.html#xmlCheckLanguageID"/>
+ <function name="xmlCheckUTF8 ()" link="libxml2-xmlstring.html#xmlCheckUTF8"/>
+ <function name="xmlCheckVersion ()" link="libxml2-xmlversion.html#xmlCheckVersion"/>
+ <function name="xmlChildElementCount ()" link="libxml2-tree.html#xmlChildElementCount"/>
+ <function name="xmlCleanupCharEncodingHandlers ()" link="libxml2-encoding.html#xmlCleanupCharEncodingHandlers"/>
+ <function name="xmlCleanupEncodingAliases ()" link="libxml2-encoding.html#xmlCleanupEncodingAliases"/>
+ <function name="xmlCleanupGlobals ()" link="libxml2-globals.html#xmlCleanupGlobals"/>
+ <function name="xmlCleanupInputCallbacks ()" link="libxml2-xmlIO.html#xmlCleanupInputCallbacks"/>
+ <function name="xmlCleanupMemory ()" link="libxml2-xmlmemory.html#xmlCleanupMemory"/>
+ <function name="xmlCleanupOutputCallbacks ()" link="libxml2-xmlIO.html#xmlCleanupOutputCallbacks"/>
+ <function name="xmlCleanupParser ()" link="libxml2-parser.html#xmlCleanupParser"/>
+ <function name="xmlCleanupPredefinedEntities ()" link="libxml2-entities.html#xmlCleanupPredefinedEntities"/>
+ <function name="xmlCleanupThreads ()" link="libxml2-threads.html#xmlCleanupThreads"/>
+ <function name="xmlClearNodeInfoSeq ()" link="libxml2-parser.html#xmlClearNodeInfoSeq"/>
+ <function name="xmlClearParserCtxt ()" link="libxml2-parser.html#xmlClearParserCtxt"/>
+ <function name="xmlConvertSGMLCatalog ()" link="libxml2-catalog.html#xmlConvertSGMLCatalog"/>
+ <function name="xmlCopyAttributeTable ()" link="libxml2-valid.html#xmlCopyAttributeTable"/>
+ <function name="xmlCopyChar ()" link="libxml2-parserInternals.html#xmlCopyChar"/>
+ <function name="xmlCopyCharMultiByte ()" link="libxml2-parserInternals.html#xmlCopyCharMultiByte"/>
+ <function name="xmlCopyDoc ()" link="libxml2-tree.html#xmlCopyDoc"/>
+ <function name="xmlCopyDocElementContent ()" link="libxml2-valid.html#xmlCopyDocElementContent"/>
+ <function name="xmlCopyDtd ()" link="libxml2-tree.html#xmlCopyDtd"/>
+ <function name="xmlCopyElementContent ()" link="libxml2-valid.html#xmlCopyElementContent"/>
+ <function name="xmlCopyElementTable ()" link="libxml2-valid.html#xmlCopyElementTable"/>
+ <function name="xmlCopyEntitiesTable ()" link="libxml2-entities.html#xmlCopyEntitiesTable"/>
+ <function name="xmlCopyEnumeration ()" link="libxml2-valid.html#xmlCopyEnumeration"/>
+ <function name="xmlCopyError ()" link="libxml2-xmlerror.html#xmlCopyError"/>
+ <function name="xmlCopyNamespace ()" link="libxml2-tree.html#xmlCopyNamespace"/>
+ <function name="xmlCopyNamespaceList ()" link="libxml2-tree.html#xmlCopyNamespaceList"/>
+ <function name="xmlCopyNode ()" link="libxml2-tree.html#xmlCopyNode"/>
+ <function name="xmlCopyNodeList ()" link="libxml2-tree.html#xmlCopyNodeList"/>
+ <function name="xmlCopyNotationTable ()" link="libxml2-valid.html#xmlCopyNotationTable"/>
+ <function name="xmlCopyProp ()" link="libxml2-tree.html#xmlCopyProp"/>
+ <function name="xmlCopyPropList ()" link="libxml2-tree.html#xmlCopyPropList"/>
+ <function name="xmlCreateDocParserCtxt ()" link="libxml2-parser.html#xmlCreateDocParserCtxt"/>
+ <function name="xmlCreateEntitiesTable ()" link="libxml2-entities.html#xmlCreateEntitiesTable"/>
+ <function name="xmlCreateEntityParserCtxt ()" link="libxml2-parserInternals.html#xmlCreateEntityParserCtxt"/>
+ <function name="xmlCreateEnumeration ()" link="libxml2-valid.html#xmlCreateEnumeration"/>
+ <function name="xmlCreateFileParserCtxt ()" link="libxml2-parserInternals.html#xmlCreateFileParserCtxt"/>
+ <function name="xmlCreateIOParserCtxt ()" link="libxml2-parser.html#xmlCreateIOParserCtxt"/>
+ <function name="xmlCreateIntSubset ()" link="libxml2-tree.html#xmlCreateIntSubset"/>
+ <function name="xmlCreateMemoryParserCtxt ()" link="libxml2-parserInternals.html#xmlCreateMemoryParserCtxt"/>
+ <function name="xmlCreatePushParserCtxt ()" link="libxml2-parser.html#xmlCreatePushParserCtxt"/>
+ <function name="xmlCreateURI ()" link="libxml2-uri.html#xmlCreateURI"/>
+ <function name="xmlCreateURLParserCtxt ()" link="libxml2-parserInternals.html#xmlCreateURLParserCtxt"/>
+ <function name="xmlCtxtGetLastError ()" link="libxml2-xmlerror.html#xmlCtxtGetLastError"/>
+ <function name="xmlCtxtReadDoc ()" link="libxml2-parser.html#xmlCtxtReadDoc"/>
+ <function name="xmlCtxtReadFd ()" link="libxml2-parser.html#xmlCtxtReadFd"/>
+ <function name="xmlCtxtReadFile ()" link="libxml2-parser.html#xmlCtxtReadFile"/>
+ <function name="xmlCtxtReadIO ()" link="libxml2-parser.html#xmlCtxtReadIO"/>
+ <function name="xmlCtxtReadMemory ()" link="libxml2-parser.html#xmlCtxtReadMemory"/>
+ <function name="xmlCtxtReset ()" link="libxml2-parser.html#xmlCtxtReset"/>
+ <function name="xmlCtxtResetLastError ()" link="libxml2-xmlerror.html#xmlCtxtResetLastError"/>
+ <function name="xmlCtxtResetPush ()" link="libxml2-parser.html#xmlCtxtResetPush"/>
+ <function name="xmlCtxtUseOptions ()" link="libxml2-parser.html#xmlCtxtUseOptions"/>
+ <function name="xmlCurrentChar ()" link="libxml2-parserInternals.html#xmlCurrentChar"/>
+ <function name="xmlDOMWrapAdoptNode ()" link="libxml2-tree.html#xmlDOMWrapAdoptNode"/>
+ <function name="xmlDOMWrapCloneNode ()" link="libxml2-tree.html#xmlDOMWrapCloneNode"/>
+ <function name="xmlDOMWrapFreeCtxt ()" link="libxml2-tree.html#xmlDOMWrapFreeCtxt"/>
+ <function name="xmlDOMWrapNewCtxt ()" link="libxml2-tree.html#xmlDOMWrapNewCtxt"/>
+ <function name="xmlDOMWrapReconcileNamespaces ()" link="libxml2-tree.html#xmlDOMWrapReconcileNamespaces"/>
+ <function name="xmlDOMWrapRemoveNode ()" link="libxml2-tree.html#xmlDOMWrapRemoveNode"/>
+ <function name="xmlDebugCheckDocument ()" link="libxml2-debugXML.html#xmlDebugCheckDocument"/>
+ <function name="xmlDebugDumpAttr ()" link="libxml2-debugXML.html#xmlDebugDumpAttr"/>
+ <function name="xmlDebugDumpAttrList ()" link="libxml2-debugXML.html#xmlDebugDumpAttrList"/>
+ <function name="xmlDebugDumpDTD ()" link="libxml2-debugXML.html#xmlDebugDumpDTD"/>
+ <function name="xmlDebugDumpDocument ()" link="libxml2-debugXML.html#xmlDebugDumpDocument"/>
+ <function name="xmlDebugDumpDocumentHead ()" link="libxml2-debugXML.html#xmlDebugDumpDocumentHead"/>
+ <function name="xmlDebugDumpEntities ()" link="libxml2-debugXML.html#xmlDebugDumpEntities"/>
+ <function name="xmlDebugDumpNode ()" link="libxml2-debugXML.html#xmlDebugDumpNode"/>
+ <function name="xmlDebugDumpNodeList ()" link="libxml2-debugXML.html#xmlDebugDumpNodeList"/>
+ <function name="xmlDebugDumpOneNode ()" link="libxml2-debugXML.html#xmlDebugDumpOneNode"/>
+ <function name="xmlDebugDumpString ()" link="libxml2-debugXML.html#xmlDebugDumpString"/>
+ <function name="xmlDecodeEntities ()" link="libxml2-parserInternals.html#xmlDecodeEntities"/>
+ <function name="xmlDefaultSAXHandlerInit ()" link="libxml2-SAX2.html#xmlDefaultSAXHandlerInit"/>
+ <function name="xmlDelEncodingAlias ()" link="libxml2-encoding.html#xmlDelEncodingAlias"/>
+ <function name="xmlDeregisterNodeDefault ()" link="libxml2-globals.html#xmlDeregisterNodeDefault"/>
+ <function name="xmlDetectCharEncoding ()" link="libxml2-encoding.html#xmlDetectCharEncoding"/>
+ <function name="xmlDictCleanup ()" link="libxml2-dict.html#xmlDictCleanup"/>
+ <function name="xmlDictCreate ()" link="libxml2-dict.html#xmlDictCreate"/>
+ <function name="xmlDictCreateSub ()" link="libxml2-dict.html#xmlDictCreateSub"/>
+ <function name="xmlDictExists ()" link="libxml2-dict.html#xmlDictExists"/>
+ <function name="xmlDictFree ()" link="libxml2-dict.html#xmlDictFree"/>
+ <function name="xmlDictGetUsage ()" link="libxml2-dict.html#xmlDictGetUsage"/>
+ <function name="xmlDictLookup ()" link="libxml2-dict.html#xmlDictLookup"/>
+ <function name="xmlDictOwns ()" link="libxml2-dict.html#xmlDictOwns"/>
+ <function name="xmlDictQLookup ()" link="libxml2-dict.html#xmlDictQLookup"/>
+ <function name="xmlDictReference ()" link="libxml2-dict.html#xmlDictReference"/>
+ <function name="xmlDictSetLimit ()" link="libxml2-dict.html#xmlDictSetLimit"/>
+ <function name="xmlDictSize ()" link="libxml2-dict.html#xmlDictSize"/>
+ <function name="xmlDllMain ()" link="libxml2-threads.html#xmlDllMain"/>
+ <function name="xmlDocCopyNode ()" link="libxml2-tree.html#xmlDocCopyNode"/>
+ <function name="xmlDocCopyNodeList ()" link="libxml2-tree.html#xmlDocCopyNodeList"/>
+ <function name="xmlDocDump ()" link="libxml2-tree.html#xmlDocDump"/>
+ <function name="xmlDocDumpFormatMemory ()" link="libxml2-tree.html#xmlDocDumpFormatMemory"/>
+ <function name="xmlDocDumpFormatMemoryEnc ()" link="libxml2-tree.html#xmlDocDumpFormatMemoryEnc"/>
+ <function name="xmlDocDumpMemory ()" link="libxml2-tree.html#xmlDocDumpMemory"/>
+ <function name="xmlDocDumpMemoryEnc ()" link="libxml2-tree.html#xmlDocDumpMemoryEnc"/>
+ <function name="xmlDocFormatDump ()" link="libxml2-tree.html#xmlDocFormatDump"/>
+ <function name="xmlDocGetRootElement ()" link="libxml2-tree.html#xmlDocGetRootElement"/>
+ <function name="xmlDocSetRootElement ()" link="libxml2-tree.html#xmlDocSetRootElement"/>
+ <function name="xmlDumpAttributeDecl ()" link="libxml2-valid.html#xmlDumpAttributeDecl"/>
+ <function name="xmlDumpAttributeTable ()" link="libxml2-valid.html#xmlDumpAttributeTable"/>
+ <function name="xmlDumpElementDecl ()" link="libxml2-valid.html#xmlDumpElementDecl"/>
+ <function name="xmlDumpElementTable ()" link="libxml2-valid.html#xmlDumpElementTable"/>
+ <function name="xmlDumpEntitiesTable ()" link="libxml2-entities.html#xmlDumpEntitiesTable"/>
+ <function name="xmlDumpEntityDecl ()" link="libxml2-entities.html#xmlDumpEntityDecl"/>
+ <function name="xmlDumpNotationDecl ()" link="libxml2-valid.html#xmlDumpNotationDecl"/>
+ <function name="xmlDumpNotationTable ()" link="libxml2-valid.html#xmlDumpNotationTable"/>
+ <function name="xmlElemDump ()" link="libxml2-tree.html#xmlElemDump"/>
+ <function name="xmlEncodeEntities ()" link="libxml2-entities.html#xmlEncodeEntities"/>
+ <function name="xmlEncodeEntitiesReentrant ()" link="libxml2-entities.html#xmlEncodeEntitiesReentrant"/>
+ <function name="xmlEncodeSpecialChars ()" link="libxml2-entities.html#xmlEncodeSpecialChars"/>
+ <function name="xmlErrMemory ()" link="libxml2-parserInternals.html#xmlErrMemory"/>
+ <function name="xmlExpCtxtNbCons ()" link="libxml2-xmlregexp.html#xmlExpCtxtNbCons"/>
+ <function name="xmlExpCtxtNbNodes ()" link="libxml2-xmlregexp.html#xmlExpCtxtNbNodes"/>
+ <function name="xmlExpDump ()" link="libxml2-xmlregexp.html#xmlExpDump"/>
+ <function name="xmlExpExpDerive ()" link="libxml2-xmlregexp.html#xmlExpExpDerive"/>
+ <function name="xmlExpFree ()" link="libxml2-xmlregexp.html#xmlExpFree"/>
+ <function name="xmlExpFreeCtxt ()" link="libxml2-xmlregexp.html#xmlExpFreeCtxt"/>
+ <function name="xmlExpGetLanguage ()" link="libxml2-xmlregexp.html#xmlExpGetLanguage"/>
+ <function name="xmlExpGetStart ()" link="libxml2-xmlregexp.html#xmlExpGetStart"/>
+ <function name="xmlExpIsNillable ()" link="libxml2-xmlregexp.html#xmlExpIsNillable"/>
+ <function name="xmlExpMaxToken ()" link="libxml2-xmlregexp.html#xmlExpMaxToken"/>
+ <function name="xmlExpNewAtom ()" link="libxml2-xmlregexp.html#xmlExpNewAtom"/>
+ <function name="xmlExpNewCtxt ()" link="libxml2-xmlregexp.html#xmlExpNewCtxt"/>
+ <function name="xmlExpNewOr ()" link="libxml2-xmlregexp.html#xmlExpNewOr"/>
+ <function name="xmlExpNewRange ()" link="libxml2-xmlregexp.html#xmlExpNewRange"/>
+ <function name="xmlExpNewSeq ()" link="libxml2-xmlregexp.html#xmlExpNewSeq"/>
+ <function name="xmlExpParse ()" link="libxml2-xmlregexp.html#xmlExpParse"/>
+ <function name="xmlExpRef ()" link="libxml2-xmlregexp.html#xmlExpRef"/>
+ <function name="xmlExpStringDerive ()" link="libxml2-xmlregexp.html#xmlExpStringDerive"/>
+ <function name="xmlExpSubsume ()" link="libxml2-xmlregexp.html#xmlExpSubsume"/>
+ <function name="xmlFileClose ()" link="libxml2-xmlIO.html#xmlFileClose"/>
+ <function name="xmlFileMatch ()" link="libxml2-xmlIO.html#xmlFileMatch"/>
+ <function name="xmlFileOpen ()" link="libxml2-xmlIO.html#xmlFileOpen"/>
+ <function name="xmlFileRead ()" link="libxml2-xmlIO.html#xmlFileRead"/>
+ <function name="xmlFindCharEncodingHandler ()" link="libxml2-encoding.html#xmlFindCharEncodingHandler"/>
+ <function name="xmlFirstElementChild ()" link="libxml2-tree.html#xmlFirstElementChild"/>
+ <function name="xmlFreeAttributeTable ()" link="libxml2-valid.html#xmlFreeAttributeTable"/>
+ <function name="xmlFreeAutomata ()" link="libxml2-xmlautomata.html#xmlFreeAutomata"/>
+ <function name="xmlFreeCatalog ()" link="libxml2-catalog.html#xmlFreeCatalog"/>
+ <function name="xmlFreeDoc ()" link="libxml2-tree.html#xmlFreeDoc"/>
+ <function name="xmlFreeDocElementContent ()" link="libxml2-valid.html#xmlFreeDocElementContent"/>
+ <function name="xmlFreeDtd ()" link="libxml2-tree.html#xmlFreeDtd"/>
+ <function name="xmlFreeElementContent ()" link="libxml2-valid.html#xmlFreeElementContent"/>
+ <function name="xmlFreeElementTable ()" link="libxml2-valid.html#xmlFreeElementTable"/>
+ <function name="xmlFreeEntitiesTable ()" link="libxml2-entities.html#xmlFreeEntitiesTable"/>
+ <function name="xmlFreeEnumeration ()" link="libxml2-valid.html#xmlFreeEnumeration"/>
+ <function name="xmlFreeIDTable ()" link="libxml2-valid.html#xmlFreeIDTable"/>
+ <function name="xmlFreeInputStream ()" link="libxml2-parserInternals.html#xmlFreeInputStream"/>
+ <function name="xmlFreeMutex ()" link="libxml2-threads.html#xmlFreeMutex"/>
+ <function name="xmlFreeNode ()" link="libxml2-tree.html#xmlFreeNode"/>
+ <function name="xmlFreeNodeList ()" link="libxml2-tree.html#xmlFreeNodeList"/>
+ <function name="xmlFreeNotationTable ()" link="libxml2-valid.html#xmlFreeNotationTable"/>
+ <function name="xmlFreeNs ()" link="libxml2-tree.html#xmlFreeNs"/>
+ <function name="xmlFreeNsList ()" link="libxml2-tree.html#xmlFreeNsList"/>
+ <function name="xmlFreeParserCtxt ()" link="libxml2-parser.html#xmlFreeParserCtxt"/>
+ <function name="xmlFreeParserInputBuffer ()" link="libxml2-xmlIO.html#xmlFreeParserInputBuffer"/>
+ <function name="xmlFreePattern ()" link="libxml2-pattern.html#xmlFreePattern"/>
+ <function name="xmlFreePatternList ()" link="libxml2-pattern.html#xmlFreePatternList"/>
+ <function name="xmlFreeProp ()" link="libxml2-tree.html#xmlFreeProp"/>
+ <function name="xmlFreePropList ()" link="libxml2-tree.html#xmlFreePropList"/>
+ <function name="xmlFreeRMutex ()" link="libxml2-threads.html#xmlFreeRMutex"/>
+ <function name="xmlFreeRefTable ()" link="libxml2-valid.html#xmlFreeRefTable"/>
+ <function name="xmlFreeStreamCtxt ()" link="libxml2-pattern.html#xmlFreeStreamCtxt"/>
+ <function name="xmlFreeTextReader ()" link="libxml2-xmlreader.html#xmlFreeTextReader"/>
+ <function name="xmlFreeTextWriter ()" link="libxml2-xmlwriter.html#xmlFreeTextWriter"/>
+ <function name="xmlFreeURI ()" link="libxml2-uri.html#xmlFreeURI"/>
+ <function name="xmlFreeValidCtxt ()" link="libxml2-valid.html#xmlFreeValidCtxt"/>
+ <function name="xmlGcMemGet ()" link="libxml2-xmlmemory.html#xmlGcMemGet"/>
+ <function name="xmlGcMemSetup ()" link="libxml2-xmlmemory.html#xmlGcMemSetup"/>
+ <function name="xmlGetBufferAllocationScheme ()" link="libxml2-tree.html#xmlGetBufferAllocationScheme"/>
+ <function name="xmlGetCharEncodingHandler ()" link="libxml2-encoding.html#xmlGetCharEncodingHandler"/>
+ <function name="xmlGetCharEncodingName ()" link="libxml2-encoding.html#xmlGetCharEncodingName"/>
+ <function name="xmlGetCompressMode ()" link="libxml2-tree.html#xmlGetCompressMode"/>
+ <function name="xmlGetDocCompressMode ()" link="libxml2-tree.html#xmlGetDocCompressMode"/>
+ <function name="xmlGetDocEntity ()" link="libxml2-entities.html#xmlGetDocEntity"/>
+ <function name="xmlGetDtdAttrDesc ()" link="libxml2-valid.html#xmlGetDtdAttrDesc"/>
+ <function name="xmlGetDtdElementDesc ()" link="libxml2-valid.html#xmlGetDtdElementDesc"/>
+ <function name="xmlGetDtdEntity ()" link="libxml2-entities.html#xmlGetDtdEntity"/>
+ <function name="xmlGetDtdNotationDesc ()" link="libxml2-valid.html#xmlGetDtdNotationDesc"/>
+ <function name="xmlGetDtdQAttrDesc ()" link="libxml2-valid.html#xmlGetDtdQAttrDesc"/>
+ <function name="xmlGetDtdQElementDesc ()" link="libxml2-valid.html#xmlGetDtdQElementDesc"/>
+ <function name="xmlGetEncodingAlias ()" link="libxml2-encoding.html#xmlGetEncodingAlias"/>
+ <function name="xmlGetExternalEntityLoader ()" link="libxml2-parser.html#xmlGetExternalEntityLoader"/>
+ <function name="xmlGetFeature ()" link="libxml2-parser.html#xmlGetFeature"/>
+ <function name="xmlGetFeaturesList ()" link="libxml2-parser.html#xmlGetFeaturesList"/>
+ <function name="xmlGetGlobalState ()" link="libxml2-threads.html#xmlGetGlobalState"/>
+ <function name="xmlGetID ()" link="libxml2-valid.html#xmlGetID"/>
+ <function name="xmlGetIntSubset ()" link="libxml2-tree.html#xmlGetIntSubset"/>
+ <function name="xmlGetLastChild ()" link="libxml2-tree.html#xmlGetLastChild"/>
+ <function name="xmlGetLastError ()" link="libxml2-xmlerror.html#xmlGetLastError"/>
+ <function name="xmlGetLineNo ()" link="libxml2-tree.html#xmlGetLineNo"/>
+ <function name="xmlGetNoNsProp ()" link="libxml2-tree.html#xmlGetNoNsProp"/>
+ <function name="xmlGetNodePath ()" link="libxml2-tree.html#xmlGetNodePath"/>
+ <function name="xmlGetNsList ()" link="libxml2-tree.html#xmlGetNsList"/>
+ <function name="xmlGetNsProp ()" link="libxml2-tree.html#xmlGetNsProp"/>
+ <function name="xmlGetParameterEntity ()" link="libxml2-entities.html#xmlGetParameterEntity"/>
+ <function name="xmlGetPredefinedEntity ()" link="libxml2-entities.html#xmlGetPredefinedEntity"/>
+ <function name="xmlGetProp ()" link="libxml2-tree.html#xmlGetProp"/>
+ <function name="xmlGetRefs ()" link="libxml2-valid.html#xmlGetRefs"/>
+ <function name="xmlGetThreadId ()" link="libxml2-threads.html#xmlGetThreadId"/>
+ <function name="xmlGetUTF8Char ()" link="libxml2-xmlstring.html#xmlGetUTF8Char"/>
+ <function name="xmlHandleEntity ()" link="libxml2-parserInternals.html#xmlHandleEntity"/>
+ <function name="xmlHasFeature ()" link="libxml2-parser.html#xmlHasFeature"/>
+ <function name="xmlHasNsProp ()" link="libxml2-tree.html#xmlHasNsProp"/>
+ <function name="xmlHasProp ()" link="libxml2-tree.html#xmlHasProp"/>
+ <function name="xmlHashAddEntry ()" link="libxml2-hash.html#xmlHashAddEntry"/>
+ <function name="xmlHashAddEntry2 ()" link="libxml2-hash.html#xmlHashAddEntry2"/>
+ <function name="xmlHashAddEntry3 ()" link="libxml2-hash.html#xmlHashAddEntry3"/>
+ <function name="xmlHashCopy ()" link="libxml2-hash.html#xmlHashCopy"/>
+ <function name="xmlHashCreate ()" link="libxml2-hash.html#xmlHashCreate"/>
+ <function name="xmlHashCreateDict ()" link="libxml2-hash.html#xmlHashCreateDict"/>
+ <function name="xmlHashFree ()" link="libxml2-hash.html#xmlHashFree"/>
+ <function name="xmlHashLookup ()" link="libxml2-hash.html#xmlHashLookup"/>
+ <function name="xmlHashLookup2 ()" link="libxml2-hash.html#xmlHashLookup2"/>
+ <function name="xmlHashLookup3 ()" link="libxml2-hash.html#xmlHashLookup3"/>
+ <function name="xmlHashQLookup ()" link="libxml2-hash.html#xmlHashQLookup"/>
+ <function name="xmlHashQLookup2 ()" link="libxml2-hash.html#xmlHashQLookup2"/>
+ <function name="xmlHashQLookup3 ()" link="libxml2-hash.html#xmlHashQLookup3"/>
+ <function name="xmlHashRemoveEntry ()" link="libxml2-hash.html#xmlHashRemoveEntry"/>
+ <function name="xmlHashRemoveEntry2 ()" link="libxml2-hash.html#xmlHashRemoveEntry2"/>
+ <function name="xmlHashRemoveEntry3 ()" link="libxml2-hash.html#xmlHashRemoveEntry3"/>
+ <function name="xmlHashScan ()" link="libxml2-hash.html#xmlHashScan"/>
+ <function name="xmlHashScan3 ()" link="libxml2-hash.html#xmlHashScan3"/>
+ <function name="xmlHashScanFull ()" link="libxml2-hash.html#xmlHashScanFull"/>
+ <function name="xmlHashScanFull3 ()" link="libxml2-hash.html#xmlHashScanFull3"/>
+ <function name="xmlHashSize ()" link="libxml2-hash.html#xmlHashSize"/>
+ <function name="xmlHashUpdateEntry ()" link="libxml2-hash.html#xmlHashUpdateEntry"/>
+ <function name="xmlHashUpdateEntry2 ()" link="libxml2-hash.html#xmlHashUpdateEntry2"/>
+ <function name="xmlHashUpdateEntry3 ()" link="libxml2-hash.html#xmlHashUpdateEntry3"/>
+ <function name="xmlIOFTPClose ()" link="libxml2-xmlIO.html#xmlIOFTPClose"/>
+ <function name="xmlIOFTPMatch ()" link="libxml2-xmlIO.html#xmlIOFTPMatch"/>
+ <function name="xmlIOFTPOpen ()" link="libxml2-xmlIO.html#xmlIOFTPOpen"/>
+ <function name="xmlIOFTPRead ()" link="libxml2-xmlIO.html#xmlIOFTPRead"/>
+ <function name="xmlIOHTTPClose ()" link="libxml2-xmlIO.html#xmlIOHTTPClose"/>
+ <function name="xmlIOHTTPMatch ()" link="libxml2-xmlIO.html#xmlIOHTTPMatch"/>
+ <function name="xmlIOHTTPOpen ()" link="libxml2-xmlIO.html#xmlIOHTTPOpen"/>
+ <function name="xmlIOHTTPOpenW ()" link="libxml2-xmlIO.html#xmlIOHTTPOpenW"/>
+ <function name="xmlIOHTTPRead ()" link="libxml2-xmlIO.html#xmlIOHTTPRead"/>
+ <function name="xmlIOParseDTD ()" link="libxml2-parser.html#xmlIOParseDTD"/>
+ <function name="xmlInitCharEncodingHandlers ()" link="libxml2-encoding.html#xmlInitCharEncodingHandlers"/>
+ <function name="xmlInitGlobals ()" link="libxml2-globals.html#xmlInitGlobals"/>
+ <function name="xmlInitMemory ()" link="libxml2-xmlmemory.html#xmlInitMemory"/>
+ <function name="xmlInitNodeInfoSeq ()" link="libxml2-parser.html#xmlInitNodeInfoSeq"/>
+ <function name="xmlInitParser ()" link="libxml2-parser.html#xmlInitParser"/>
+ <function name="xmlInitParserCtxt ()" link="libxml2-parser.html#xmlInitParserCtxt"/>
+ <function name="xmlInitThreads ()" link="libxml2-threads.html#xmlInitThreads"/>
+ <function name="xmlInitializeCatalog ()" link="libxml2-catalog.html#xmlInitializeCatalog"/>
+ <function name="xmlInitializeDict ()" link="libxml2-dict.html#xmlInitializeDict"/>
+ <function name="xmlInitializeGlobalState ()" link="libxml2-globals.html#xmlInitializeGlobalState"/>
+ <function name="xmlInitializePredefinedEntities ()" link="libxml2-entities.html#xmlInitializePredefinedEntities"/>
+ <function name="xmlIsBaseChar ()" link="libxml2-chvalid.html#xmlIsBaseChar"/>
+ <function name="xmlIsBlank ()" link="libxml2-chvalid.html#xmlIsBlank"/>
+ <function name="xmlIsBlankNode ()" link="libxml2-tree.html#xmlIsBlankNode"/>
+ <function name="xmlIsChar ()" link="libxml2-chvalid.html#xmlIsChar"/>
+ <function name="xmlIsCombining ()" link="libxml2-chvalid.html#xmlIsCombining"/>
+ <function name="xmlIsDigit ()" link="libxml2-chvalid.html#xmlIsDigit"/>
+ <function name="xmlIsExtender ()" link="libxml2-chvalid.html#xmlIsExtender"/>
+ <function name="xmlIsID ()" link="libxml2-valid.html#xmlIsID"/>
+ <function name="xmlIsIdeographic ()" link="libxml2-chvalid.html#xmlIsIdeographic"/>
+ <function name="xmlIsLetter ()" link="libxml2-parserInternals.html#xmlIsLetter"/>
+ <function name="xmlIsMainThread ()" link="libxml2-threads.html#xmlIsMainThread"/>
+ <function name="xmlIsMixedElement ()" link="libxml2-valid.html#xmlIsMixedElement"/>
+ <function name="xmlIsPubidChar ()" link="libxml2-chvalid.html#xmlIsPubidChar"/>
+ <function name="xmlIsRef ()" link="libxml2-valid.html#xmlIsRef"/>
+ <function name="xmlIsXHTML ()" link="libxml2-tree.html#xmlIsXHTML"/>
+ <function name="xmlKeepBlanksDefault ()" link="libxml2-parser.html#xmlKeepBlanksDefault"/>
+ <function name="xmlLastElementChild ()" link="libxml2-tree.html#xmlLastElementChild"/>
+ <function name="xmlLineNumbersDefault ()" link="libxml2-parser.html#xmlLineNumbersDefault"/>
+ <function name="xmlLinkGetData ()" link="libxml2-list.html#xmlLinkGetData"/>
+ <function name="xmlListAppend ()" link="libxml2-list.html#xmlListAppend"/>
+ <function name="xmlListClear ()" link="libxml2-list.html#xmlListClear"/>
+ <function name="xmlListCopy ()" link="libxml2-list.html#xmlListCopy"/>
+ <function name="xmlListCreate ()" link="libxml2-list.html#xmlListCreate"/>
+ <function name="xmlListDelete ()" link="libxml2-list.html#xmlListDelete"/>
+ <function name="xmlListDup ()" link="libxml2-list.html#xmlListDup"/>
+ <function name="xmlListEmpty ()" link="libxml2-list.html#xmlListEmpty"/>
+ <function name="xmlListEnd ()" link="libxml2-list.html#xmlListEnd"/>
+ <function name="xmlListFront ()" link="libxml2-list.html#xmlListFront"/>
+ <function name="xmlListInsert ()" link="libxml2-list.html#xmlListInsert"/>
+ <function name="xmlListMerge ()" link="libxml2-list.html#xmlListMerge"/>
+ <function name="xmlListPopBack ()" link="libxml2-list.html#xmlListPopBack"/>
+ <function name="xmlListPopFront ()" link="libxml2-list.html#xmlListPopFront"/>
+ <function name="xmlListPushBack ()" link="libxml2-list.html#xmlListPushBack"/>
+ <function name="xmlListPushFront ()" link="libxml2-list.html#xmlListPushFront"/>
+ <function name="xmlListRemoveAll ()" link="libxml2-list.html#xmlListRemoveAll"/>
+ <function name="xmlListRemoveFirst ()" link="libxml2-list.html#xmlListRemoveFirst"/>
+ <function name="xmlListRemoveLast ()" link="libxml2-list.html#xmlListRemoveLast"/>
+ <function name="xmlListReverse ()" link="libxml2-list.html#xmlListReverse"/>
+ <function name="xmlListReverseSearch ()" link="libxml2-list.html#xmlListReverseSearch"/>
+ <function name="xmlListReverseWalk ()" link="libxml2-list.html#xmlListReverseWalk"/>
+ <function name="xmlListSearch ()" link="libxml2-list.html#xmlListSearch"/>
+ <function name="xmlListSize ()" link="libxml2-list.html#xmlListSize"/>
+ <function name="xmlListSort ()" link="libxml2-list.html#xmlListSort"/>
+ <function name="xmlListWalk ()" link="libxml2-list.html#xmlListWalk"/>
+ <function name="xmlLoadACatalog ()" link="libxml2-catalog.html#xmlLoadACatalog"/>
+ <function name="xmlLoadCatalog ()" link="libxml2-catalog.html#xmlLoadCatalog"/>
+ <function name="xmlLoadCatalogs ()" link="libxml2-catalog.html#xmlLoadCatalogs"/>
+ <function name="xmlLoadExternalEntity ()" link="libxml2-parser.html#xmlLoadExternalEntity"/>
+ <function name="xmlLoadSGMLSuperCatalog ()" link="libxml2-catalog.html#xmlLoadSGMLSuperCatalog"/>
+ <function name="xmlLockLibrary ()" link="libxml2-threads.html#xmlLockLibrary"/>
+ <function name="xmlLsCountNode ()" link="libxml2-debugXML.html#xmlLsCountNode"/>
+ <function name="xmlLsOneNode ()" link="libxml2-debugXML.html#xmlLsOneNode"/>
+ <function name="xmlMallocAtomicLoc ()" link="libxml2-xmlmemory.html#xmlMallocAtomicLoc"/>
+ <function name="xmlMallocLoc ()" link="libxml2-xmlmemory.html#xmlMallocLoc"/>
+ <function name="xmlMemBlocks ()" link="libxml2-xmlmemory.html#xmlMemBlocks"/>
+ <function name="xmlMemDisplay ()" link="libxml2-xmlmemory.html#xmlMemDisplay"/>
+ <function name="xmlMemDisplayLast ()" link="libxml2-xmlmemory.html#xmlMemDisplayLast"/>
+ <function name="xmlMemFree ()" link="libxml2-xmlmemory.html#xmlMemFree"/>
+ <function name="xmlMemGet ()" link="libxml2-xmlmemory.html#xmlMemGet"/>
+ <function name="xmlMemMalloc ()" link="libxml2-xmlmemory.html#xmlMemMalloc"/>
+ <function name="xmlMemRealloc ()" link="libxml2-xmlmemory.html#xmlMemRealloc"/>
+ <function name="xmlMemSetup ()" link="libxml2-xmlmemory.html#xmlMemSetup"/>
+ <function name="xmlMemShow ()" link="libxml2-xmlmemory.html#xmlMemShow"/>
+ <function name="xmlMemStrdupLoc ()" link="libxml2-xmlmemory.html#xmlMemStrdupLoc"/>
+ <function name="xmlMemUsed ()" link="libxml2-xmlmemory.html#xmlMemUsed"/>
+ <function name="xmlMemoryDump ()" link="libxml2-xmlmemory.html#xmlMemoryDump"/>
+ <function name="xmlMemoryStrdup ()" link="libxml2-xmlmemory.html#xmlMemoryStrdup"/>
+ <function name="xmlModuleClose ()" link="libxml2-xmlmodule.html#xmlModuleClose"/>
+ <function name="xmlModuleFree ()" link="libxml2-xmlmodule.html#xmlModuleFree"/>
+ <function name="xmlModuleOpen ()" link="libxml2-xmlmodule.html#xmlModuleOpen"/>
+ <function name="xmlModuleSymbol ()" link="libxml2-xmlmodule.html#xmlModuleSymbol"/>
+ <function name="xmlMutexLock ()" link="libxml2-threads.html#xmlMutexLock"/>
+ <function name="xmlMutexUnlock ()" link="libxml2-threads.html#xmlMutexUnlock"/>
+ <function name="xmlNamespaceParseNCName ()" link="libxml2-parserInternals.html#xmlNamespaceParseNCName"/>
+ <function name="xmlNamespaceParseNSDef ()" link="libxml2-parserInternals.html#xmlNamespaceParseNSDef"/>
+ <function name="xmlNamespaceParseQName ()" link="libxml2-parserInternals.html#xmlNamespaceParseQName"/>
+ <function name="xmlNanoFTPCheckResponse ()" link="libxml2-nanoftp.html#xmlNanoFTPCheckResponse"/>
+ <function name="xmlNanoFTPCleanup ()" link="libxml2-nanoftp.html#xmlNanoFTPCleanup"/>
+ <function name="xmlNanoFTPClose ()" link="libxml2-nanoftp.html#xmlNanoFTPClose"/>
+ <function name="xmlNanoFTPCloseConnection ()" link="libxml2-nanoftp.html#xmlNanoFTPCloseConnection"/>
+ <function name="xmlNanoFTPConnect ()" link="libxml2-nanoftp.html#xmlNanoFTPConnect"/>
+ <function name="xmlNanoFTPConnectTo ()" link="libxml2-nanoftp.html#xmlNanoFTPConnectTo"/>
+ <function name="xmlNanoFTPCwd ()" link="libxml2-nanoftp.html#xmlNanoFTPCwd"/>
+ <function name="xmlNanoFTPDele ()" link="libxml2-nanoftp.html#xmlNanoFTPDele"/>
+ <function name="xmlNanoFTPFreeCtxt ()" link="libxml2-nanoftp.html#xmlNanoFTPFreeCtxt"/>
+ <function name="xmlNanoFTPGet ()" link="libxml2-nanoftp.html#xmlNanoFTPGet"/>
+ <function name="xmlNanoFTPGetConnection ()" link="libxml2-nanoftp.html#xmlNanoFTPGetConnection"/>
+ <function name="xmlNanoFTPGetResponse ()" link="libxml2-nanoftp.html#xmlNanoFTPGetResponse"/>
+ <function name="xmlNanoFTPGetSocket ()" link="libxml2-nanoftp.html#xmlNanoFTPGetSocket"/>
+ <function name="xmlNanoFTPInit ()" link="libxml2-nanoftp.html#xmlNanoFTPInit"/>
+ <function name="xmlNanoFTPList ()" link="libxml2-nanoftp.html#xmlNanoFTPList"/>
+ <function name="xmlNanoFTPNewCtxt ()" link="libxml2-nanoftp.html#xmlNanoFTPNewCtxt"/>
+ <function name="xmlNanoFTPOpen ()" link="libxml2-nanoftp.html#xmlNanoFTPOpen"/>
+ <function name="xmlNanoFTPProxy ()" link="libxml2-nanoftp.html#xmlNanoFTPProxy"/>
+ <function name="xmlNanoFTPQuit ()" link="libxml2-nanoftp.html#xmlNanoFTPQuit"/>
+ <function name="xmlNanoFTPRead ()" link="libxml2-nanoftp.html#xmlNanoFTPRead"/>
+ <function name="xmlNanoFTPScanProxy ()" link="libxml2-nanoftp.html#xmlNanoFTPScanProxy"/>
+ <function name="xmlNanoFTPUpdateURL ()" link="libxml2-nanoftp.html#xmlNanoFTPUpdateURL"/>
+ <function name="xmlNanoHTTPAuthHeader ()" link="libxml2-nanohttp.html#xmlNanoHTTPAuthHeader"/>
+ <function name="xmlNanoHTTPCleanup ()" link="libxml2-nanohttp.html#xmlNanoHTTPCleanup"/>
+ <function name="xmlNanoHTTPClose ()" link="libxml2-nanohttp.html#xmlNanoHTTPClose"/>
+ <function name="xmlNanoHTTPContentLength ()" link="libxml2-nanohttp.html#xmlNanoHTTPContentLength"/>
+ <function name="xmlNanoHTTPEncoding ()" link="libxml2-nanohttp.html#xmlNanoHTTPEncoding"/>
+ <function name="xmlNanoHTTPFetch ()" link="libxml2-nanohttp.html#xmlNanoHTTPFetch"/>
+ <function name="xmlNanoHTTPInit ()" link="libxml2-nanohttp.html#xmlNanoHTTPInit"/>
+ <function name="xmlNanoHTTPMethod ()" link="libxml2-nanohttp.html#xmlNanoHTTPMethod"/>
+ <function name="xmlNanoHTTPMethodRedir ()" link="libxml2-nanohttp.html#xmlNanoHTTPMethodRedir"/>
+ <function name="xmlNanoHTTPMimeType ()" link="libxml2-nanohttp.html#xmlNanoHTTPMimeType"/>
+ <function name="xmlNanoHTTPOpen ()" link="libxml2-nanohttp.html#xmlNanoHTTPOpen"/>
+ <function name="xmlNanoHTTPOpenRedir ()" link="libxml2-nanohttp.html#xmlNanoHTTPOpenRedir"/>
+ <function name="xmlNanoHTTPRead ()" link="libxml2-nanohttp.html#xmlNanoHTTPRead"/>
+ <function name="xmlNanoHTTPRedir ()" link="libxml2-nanohttp.html#xmlNanoHTTPRedir"/>
+ <function name="xmlNanoHTTPReturnCode ()" link="libxml2-nanohttp.html#xmlNanoHTTPReturnCode"/>
+ <function name="xmlNanoHTTPSave ()" link="libxml2-nanohttp.html#xmlNanoHTTPSave"/>
+ <function name="xmlNanoHTTPScanProxy ()" link="libxml2-nanohttp.html#xmlNanoHTTPScanProxy"/>
+ <function name="xmlNewAutomata ()" link="libxml2-xmlautomata.html#xmlNewAutomata"/>
+ <function name="xmlNewCDataBlock ()" link="libxml2-tree.html#xmlNewCDataBlock"/>
+ <function name="xmlNewCatalog ()" link="libxml2-catalog.html#xmlNewCatalog"/>
+ <function name="xmlNewCharEncodingHandler ()" link="libxml2-encoding.html#xmlNewCharEncodingHandler"/>
+ <function name="xmlNewCharRef ()" link="libxml2-tree.html#xmlNewCharRef"/>
+ <function name="xmlNewChild ()" link="libxml2-tree.html#xmlNewChild"/>
+ <function name="xmlNewComment ()" link="libxml2-tree.html#xmlNewComment"/>
+ <function name="xmlNewDoc ()" link="libxml2-tree.html#xmlNewDoc"/>
+ <function name="xmlNewDocComment ()" link="libxml2-tree.html#xmlNewDocComment"/>
+ <function name="xmlNewDocElementContent ()" link="libxml2-valid.html#xmlNewDocElementContent"/>
+ <function name="xmlNewDocFragment ()" link="libxml2-tree.html#xmlNewDocFragment"/>
+ <function name="xmlNewDocNode ()" link="libxml2-tree.html#xmlNewDocNode"/>
+ <function name="xmlNewDocNodeEatName ()" link="libxml2-tree.html#xmlNewDocNodeEatName"/>
+ <function name="xmlNewDocPI ()" link="libxml2-tree.html#xmlNewDocPI"/>
+ <function name="xmlNewDocProp ()" link="libxml2-tree.html#xmlNewDocProp"/>
+ <function name="xmlNewDocRawNode ()" link="libxml2-tree.html#xmlNewDocRawNode"/>
+ <function name="xmlNewDocText ()" link="libxml2-tree.html#xmlNewDocText"/>
+ <function name="xmlNewDocTextLen ()" link="libxml2-tree.html#xmlNewDocTextLen"/>
+ <function name="xmlNewDtd ()" link="libxml2-tree.html#xmlNewDtd"/>
+ <function name="xmlNewElementContent ()" link="libxml2-valid.html#xmlNewElementContent"/>
+ <function name="xmlNewEntity ()" link="libxml2-entities.html#xmlNewEntity"/>
+ <function name="xmlNewEntityInputStream ()" link="libxml2-parserInternals.html#xmlNewEntityInputStream"/>
+ <function name="xmlNewGlobalNs ()" link="libxml2-tree.html#xmlNewGlobalNs"/>
+ <function name="xmlNewIOInputStream ()" link="libxml2-parser.html#xmlNewIOInputStream"/>
+ <function name="xmlNewInputFromFile ()" link="libxml2-parserInternals.html#xmlNewInputFromFile"/>
+ <function name="xmlNewInputStream ()" link="libxml2-parserInternals.html#xmlNewInputStream"/>
+ <function name="xmlNewMutex ()" link="libxml2-threads.html#xmlNewMutex"/>
+ <function name="xmlNewNode ()" link="libxml2-tree.html#xmlNewNode"/>
+ <function name="xmlNewNodeEatName ()" link="libxml2-tree.html#xmlNewNodeEatName"/>
+ <function name="xmlNewNs ()" link="libxml2-tree.html#xmlNewNs"/>
+ <function name="xmlNewNsProp ()" link="libxml2-tree.html#xmlNewNsProp"/>
+ <function name="xmlNewNsPropEatName ()" link="libxml2-tree.html#xmlNewNsPropEatName"/>
+ <function name="xmlNewPI ()" link="libxml2-tree.html#xmlNewPI"/>
+ <function name="xmlNewParserCtxt ()" link="libxml2-parser.html#xmlNewParserCtxt"/>
+ <function name="xmlNewProp ()" link="libxml2-tree.html#xmlNewProp"/>
+ <function name="xmlNewRMutex ()" link="libxml2-threads.html#xmlNewRMutex"/>
+ <function name="xmlNewReference ()" link="libxml2-tree.html#xmlNewReference"/>
+ <function name="xmlNewStringInputStream ()" link="libxml2-parserInternals.html#xmlNewStringInputStream"/>
+ <function name="xmlNewText ()" link="libxml2-tree.html#xmlNewText"/>
+ <function name="xmlNewTextChild ()" link="libxml2-tree.html#xmlNewTextChild"/>
+ <function name="xmlNewTextLen ()" link="libxml2-tree.html#xmlNewTextLen"/>
+ <function name="xmlNewTextReader ()" link="libxml2-xmlreader.html#xmlNewTextReader"/>
+ <function name="xmlNewTextReaderFilename ()" link="libxml2-xmlreader.html#xmlNewTextReaderFilename"/>
+ <function name="xmlNewTextWriter ()" link="libxml2-xmlwriter.html#xmlNewTextWriter"/>
+ <function name="xmlNewTextWriterDoc ()" link="libxml2-xmlwriter.html#xmlNewTextWriterDoc"/>
+ <function name="xmlNewTextWriterFilename ()" link="libxml2-xmlwriter.html#xmlNewTextWriterFilename"/>
+ <function name="xmlNewTextWriterMemory ()" link="libxml2-xmlwriter.html#xmlNewTextWriterMemory"/>
+ <function name="xmlNewTextWriterPushParser ()" link="libxml2-xmlwriter.html#xmlNewTextWriterPushParser"/>
+ <function name="xmlNewTextWriterTree ()" link="libxml2-xmlwriter.html#xmlNewTextWriterTree"/>
+ <function name="xmlNewValidCtxt ()" link="libxml2-valid.html#xmlNewValidCtxt"/>
+ <function name="xmlNextChar ()" link="libxml2-parserInternals.html#xmlNextChar"/>
+ <function name="xmlNextElementSibling ()" link="libxml2-tree.html#xmlNextElementSibling"/>
+ <function name="xmlNoNetExternalEntityLoader ()" link="libxml2-xmlIO.html#xmlNoNetExternalEntityLoader"/>
+ <function name="xmlNodeAddContent ()" link="libxml2-tree.html#xmlNodeAddContent"/>
+ <function name="xmlNodeAddContentLen ()" link="libxml2-tree.html#xmlNodeAddContentLen"/>
+ <function name="xmlNodeBufGetContent ()" link="libxml2-tree.html#xmlNodeBufGetContent"/>
+ <function name="xmlNodeDump ()" link="libxml2-tree.html#xmlNodeDump"/>
+ <function name="xmlNodeDumpOutput ()" link="libxml2-tree.html#xmlNodeDumpOutput"/>
+ <function name="xmlNodeGetBase ()" link="libxml2-tree.html#xmlNodeGetBase"/>
+ <function name="xmlNodeGetContent ()" link="libxml2-tree.html#xmlNodeGetContent"/>
+ <function name="xmlNodeGetLang ()" link="libxml2-tree.html#xmlNodeGetLang"/>
+ <function name="xmlNodeGetSpacePreserve ()" link="libxml2-tree.html#xmlNodeGetSpacePreserve"/>
+ <function name="xmlNodeIsText ()" link="libxml2-tree.html#xmlNodeIsText"/>
+ <function name="xmlNodeListGetRawString ()" link="libxml2-tree.html#xmlNodeListGetRawString"/>
+ <function name="xmlNodeListGetString ()" link="libxml2-tree.html#xmlNodeListGetString"/>
+ <function name="xmlNodeSetBase ()" link="libxml2-tree.html#xmlNodeSetBase"/>
+ <function name="xmlNodeSetContent ()" link="libxml2-tree.html#xmlNodeSetContent"/>
+ <function name="xmlNodeSetContentLen ()" link="libxml2-tree.html#xmlNodeSetContentLen"/>
+ <function name="xmlNodeSetLang ()" link="libxml2-tree.html#xmlNodeSetLang"/>
+ <function name="xmlNodeSetName ()" link="libxml2-tree.html#xmlNodeSetName"/>
+ <function name="xmlNodeSetSpacePreserve ()" link="libxml2-tree.html#xmlNodeSetSpacePreserve"/>
+ <function name="xmlNormalizeURIPath ()" link="libxml2-uri.html#xmlNormalizeURIPath"/>
+ <function name="xmlNormalizeWindowsPath ()" link="libxml2-xmlIO.html#xmlNormalizeWindowsPath"/>
+ <function name="xmlOutputBufferClose ()" link="libxml2-xmlIO.html#xmlOutputBufferClose"/>
+ <function name="xmlOutputBufferCreateBuffer ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateBuffer"/>
+ <function name="xmlOutputBufferCreateFd ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFd"/>
+ <function name="xmlOutputBufferCreateFile ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFile"/>
+ <function name="xmlOutputBufferCreateFilename ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateFilename"/>
+ <function name="xmlOutputBufferCreateFilenameDefault ()" link="libxml2-globals.html#xmlOutputBufferCreateFilenameDefault"/>
+ <function name="xmlOutputBufferCreateIO ()" link="libxml2-xmlIO.html#xmlOutputBufferCreateIO"/>
+ <function name="xmlOutputBufferFlush ()" link="libxml2-xmlIO.html#xmlOutputBufferFlush"/>
+ <function name="xmlOutputBufferGetContent ()" link="libxml2-xmlIO.html#xmlOutputBufferGetContent"/>
+ <function name="xmlOutputBufferGetSize ()" link="libxml2-xmlIO.html#xmlOutputBufferGetSize"/>
+ <function name="xmlOutputBufferWrite ()" link="libxml2-xmlIO.html#xmlOutputBufferWrite"/>
+ <function name="xmlOutputBufferWriteEscape ()" link="libxml2-xmlIO.html#xmlOutputBufferWriteEscape"/>
+ <function name="xmlOutputBufferWriteString ()" link="libxml2-xmlIO.html#xmlOutputBufferWriteString"/>
+ <function name="xmlParseAttValue ()" link="libxml2-parserInternals.html#xmlParseAttValue"/>
+ <function name="xmlParseAttribute ()" link="libxml2-parserInternals.html#xmlParseAttribute"/>
+ <function name="xmlParseAttributeListDecl ()" link="libxml2-parserInternals.html#xmlParseAttributeListDecl"/>
+ <function name="xmlParseAttributeType ()" link="libxml2-parserInternals.html#xmlParseAttributeType"/>
+ <function name="xmlParseBalancedChunkMemory ()" link="libxml2-parser.html#xmlParseBalancedChunkMemory"/>
+ <function name="xmlParseBalancedChunkMemoryRecover ()" link="libxml2-parser.html#xmlParseBalancedChunkMemoryRecover"/>
+ <function name="xmlParseCDSect ()" link="libxml2-parserInternals.html#xmlParseCDSect"/>
+ <function name="xmlParseCatalogFile ()" link="libxml2-catalog.html#xmlParseCatalogFile"/>
+ <function name="xmlParseCharData ()" link="libxml2-parserInternals.html#xmlParseCharData"/>
+ <function name="xmlParseCharEncoding ()" link="libxml2-encoding.html#xmlParseCharEncoding"/>
+ <function name="xmlParseCharRef ()" link="libxml2-parserInternals.html#xmlParseCharRef"/>
+ <function name="xmlParseChunk ()" link="libxml2-parser.html#xmlParseChunk"/>
+ <function name="xmlParseComment ()" link="libxml2-parserInternals.html#xmlParseComment"/>
+ <function name="xmlParseContent ()" link="libxml2-parserInternals.html#xmlParseContent"/>
+ <function name="xmlParseCtxtExternalEntity ()" link="libxml2-parser.html#xmlParseCtxtExternalEntity"/>
+ <function name="xmlParseDTD ()" link="libxml2-parser.html#xmlParseDTD"/>
+ <function name="xmlParseDefaultDecl ()" link="libxml2-parserInternals.html#xmlParseDefaultDecl"/>
+ <function name="xmlParseDoc ()" link="libxml2-parser.html#xmlParseDoc"/>
+ <function name="xmlParseDocTypeDecl ()" link="libxml2-parserInternals.html#xmlParseDocTypeDecl"/>
+ <function name="xmlParseDocument ()" link="libxml2-parser.html#xmlParseDocument"/>
+ <function name="xmlParseElement ()" link="libxml2-parserInternals.html#xmlParseElement"/>
+ <function name="xmlParseElementChildrenContentDecl ()" link="libxml2-parserInternals.html#xmlParseElementChildrenContentDecl"/>
+ <function name="xmlParseElementContentDecl ()" link="libxml2-parserInternals.html#xmlParseElementContentDecl"/>
+ <function name="xmlParseElementDecl ()" link="libxml2-parserInternals.html#xmlParseElementDecl"/>
+ <function name="xmlParseElementMixedContentDecl ()" link="libxml2-parserInternals.html#xmlParseElementMixedContentDecl"/>
+ <function name="xmlParseEncName ()" link="libxml2-parserInternals.html#xmlParseEncName"/>
+ <function name="xmlParseEncodingDecl ()" link="libxml2-parserInternals.html#xmlParseEncodingDecl"/>
+ <function name="xmlParseEndTag ()" link="libxml2-parserInternals.html#xmlParseEndTag"/>
+ <function name="xmlParseEntity ()" link="libxml2-parser.html#xmlParseEntity"/>
+ <function name="xmlParseEntityDecl ()" link="libxml2-parserInternals.html#xmlParseEntityDecl"/>
+ <function name="xmlParseEntityRef ()" link="libxml2-parserInternals.html#xmlParseEntityRef"/>
+ <function name="xmlParseEntityValue ()" link="libxml2-parserInternals.html#xmlParseEntityValue"/>
+ <function name="xmlParseEnumeratedType ()" link="libxml2-parserInternals.html#xmlParseEnumeratedType"/>
+ <function name="xmlParseEnumerationType ()" link="libxml2-parserInternals.html#xmlParseEnumerationType"/>
+ <function name="xmlParseExtParsedEnt ()" link="libxml2-parser.html#xmlParseExtParsedEnt"/>
+ <function name="xmlParseExternalEntity ()" link="libxml2-parser.html#xmlParseExternalEntity"/>
+ <function name="xmlParseExternalID ()" link="libxml2-parserInternals.html#xmlParseExternalID"/>
+ <function name="xmlParseExternalSubset ()" link="libxml2-parserInternals.html#xmlParseExternalSubset"/>
+ <function name="xmlParseFile ()" link="libxml2-parser.html#xmlParseFile"/>
+ <function name="xmlParseInNodeContext ()" link="libxml2-parser.html#xmlParseInNodeContext"/>
+ <function name="xmlParseMarkupDecl ()" link="libxml2-parserInternals.html#xmlParseMarkupDecl"/>
+ <function name="xmlParseMemory ()" link="libxml2-parser.html#xmlParseMemory"/>
+ <function name="xmlParseMisc ()" link="libxml2-parserInternals.html#xmlParseMisc"/>
+ <function name="xmlParseName ()" link="libxml2-parserInternals.html#xmlParseName"/>
+ <function name="xmlParseNamespace ()" link="libxml2-parserInternals.html#xmlParseNamespace"/>
+ <function name="xmlParseNmtoken ()" link="libxml2-parserInternals.html#xmlParseNmtoken"/>
+ <function name="xmlParseNotationDecl ()" link="libxml2-parserInternals.html#xmlParseNotationDecl"/>
+ <function name="xmlParseNotationType ()" link="libxml2-parserInternals.html#xmlParseNotationType"/>
+ <function name="xmlParsePEReference ()" link="libxml2-parserInternals.html#xmlParsePEReference"/>
+ <function name="xmlParsePI ()" link="libxml2-parserInternals.html#xmlParsePI"/>
+ <function name="xmlParsePITarget ()" link="libxml2-parserInternals.html#xmlParsePITarget"/>
+ <function name="xmlParsePubidLiteral ()" link="libxml2-parserInternals.html#xmlParsePubidLiteral"/>
+ <function name="xmlParseQuotedString ()" link="libxml2-parserInternals.html#xmlParseQuotedString"/>
+ <function name="xmlParseReference ()" link="libxml2-parserInternals.html#xmlParseReference"/>
+ <function name="xmlParseSDDecl ()" link="libxml2-parserInternals.html#xmlParseSDDecl"/>
+ <function name="xmlParseStartTag ()" link="libxml2-parserInternals.html#xmlParseStartTag"/>
+ <function name="xmlParseSystemLiteral ()" link="libxml2-parserInternals.html#xmlParseSystemLiteral"/>
+ <function name="xmlParseTextDecl ()" link="libxml2-parserInternals.html#xmlParseTextDecl"/>
+ <function name="xmlParseURI ()" link="libxml2-uri.html#xmlParseURI"/>
+ <function name="xmlParseURIRaw ()" link="libxml2-uri.html#xmlParseURIRaw"/>
+ <function name="xmlParseURIReference ()" link="libxml2-uri.html#xmlParseURIReference"/>
+ <function name="xmlParseVersionInfo ()" link="libxml2-parserInternals.html#xmlParseVersionInfo"/>
+ <function name="xmlParseVersionNum ()" link="libxml2-parserInternals.html#xmlParseVersionNum"/>
+ <function name="xmlParseXMLDecl ()" link="libxml2-parserInternals.html#xmlParseXMLDecl"/>
+ <function name="xmlParserAddNodeInfo ()" link="libxml2-parser.html#xmlParserAddNodeInfo"/>
+ <function name="xmlParserError ()" link="libxml2-xmlerror.html#xmlParserError"/>
+ <function name="xmlParserFindNodeInfo ()" link="libxml2-parser.html#xmlParserFindNodeInfo"/>
+ <function name="xmlParserFindNodeInfoIndex ()" link="libxml2-parser.html#xmlParserFindNodeInfoIndex"/>
+ <function name="xmlParserGetDirectory ()" link="libxml2-xmlIO.html#xmlParserGetDirectory"/>
+ <function name="xmlParserHandlePEReference ()" link="libxml2-parserInternals.html#xmlParserHandlePEReference"/>
+ <function name="xmlParserHandleReference ()" link="libxml2-parserInternals.html#xmlParserHandleReference"/>
+ <function name="xmlParserInputBufferCreateFd ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateFd"/>
+ <function name="xmlParserInputBufferCreateFile ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateFile"/>
+ <function name="xmlParserInputBufferCreateFilename ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateFilename"/>
+ <function name="xmlParserInputBufferCreateFilenameDefault ()" link="libxml2-globals.html#xmlParserInputBufferCreateFilenameDefault"/>
+ <function name="xmlParserInputBufferCreateIO ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateIO"/>
+ <function name="xmlParserInputBufferCreateMem ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateMem"/>
+ <function name="xmlParserInputBufferCreateStatic ()" link="libxml2-xmlIO.html#xmlParserInputBufferCreateStatic"/>
+ <function name="xmlParserInputBufferGrow ()" link="libxml2-xmlIO.html#xmlParserInputBufferGrow"/>
+ <function name="xmlParserInputBufferPush ()" link="libxml2-xmlIO.html#xmlParserInputBufferPush"/>
+ <function name="xmlParserInputBufferRead ()" link="libxml2-xmlIO.html#xmlParserInputBufferRead"/>
+ <function name="xmlParserInputGrow ()" link="libxml2-parser.html#xmlParserInputGrow"/>
+ <function name="xmlParserInputRead ()" link="libxml2-parser.html#xmlParserInputRead"/>
+ <function name="xmlParserInputShrink ()" link="libxml2-parserInternals.html#xmlParserInputShrink"/>
+ <function name="xmlParserPrintFileContext ()" link="libxml2-xmlerror.html#xmlParserPrintFileContext"/>
+ <function name="xmlParserPrintFileInfo ()" link="libxml2-xmlerror.html#xmlParserPrintFileInfo"/>
+ <function name="xmlParserValidityError ()" link="libxml2-xmlerror.html#xmlParserValidityError"/>
+ <function name="xmlParserValidityWarning ()" link="libxml2-xmlerror.html#xmlParserValidityWarning"/>
+ <function name="xmlParserWarning ()" link="libxml2-xmlerror.html#xmlParserWarning"/>
+ <function name="xmlPathToURI ()" link="libxml2-uri.html#xmlPathToURI"/>
+ <function name="xmlPatternFromRoot ()" link="libxml2-pattern.html#xmlPatternFromRoot"/>
+ <function name="xmlPatternGetStreamCtxt ()" link="libxml2-pattern.html#xmlPatternGetStreamCtxt"/>
+ <function name="xmlPatternMatch ()" link="libxml2-pattern.html#xmlPatternMatch"/>
+ <function name="xmlPatternMaxDepth ()" link="libxml2-pattern.html#xmlPatternMaxDepth"/>
+ <function name="xmlPatternMinDepth ()" link="libxml2-pattern.html#xmlPatternMinDepth"/>
+ <function name="xmlPatternStreamable ()" link="libxml2-pattern.html#xmlPatternStreamable"/>
+ <function name="xmlPatterncompile ()" link="libxml2-pattern.html#xmlPatterncompile"/>
+ <function name="xmlPedanticParserDefault ()" link="libxml2-parser.html#xmlPedanticParserDefault"/>
+ <function name="xmlPopInput ()" link="libxml2-parserInternals.html#xmlPopInput"/>
+ <function name="xmlPopInputCallbacks ()" link="libxml2-xmlIO.html#xmlPopInputCallbacks"/>
+ <function name="xmlPreviousElementSibling ()" link="libxml2-tree.html#xmlPreviousElementSibling"/>
+ <function name="xmlPrintURI ()" link="libxml2-uri.html#xmlPrintURI"/>
+ <function name="xmlPushInput ()" link="libxml2-parserInternals.html#xmlPushInput"/>
+ <function name="xmlRMutexLock ()" link="libxml2-threads.html#xmlRMutexLock"/>
+ <function name="xmlRMutexUnlock ()" link="libxml2-threads.html#xmlRMutexUnlock"/>
+ <function name="xmlReadDoc ()" link="libxml2-parser.html#xmlReadDoc"/>
+ <function name="xmlReadFd ()" link="libxml2-parser.html#xmlReadFd"/>
+ <function name="xmlReadFile ()" link="libxml2-parser.html#xmlReadFile"/>
+ <function name="xmlReadIO ()" link="libxml2-parser.html#xmlReadIO"/>
+ <function name="xmlReadMemory ()" link="libxml2-parser.html#xmlReadMemory"/>
+ <function name="xmlReaderForDoc ()" link="libxml2-xmlreader.html#xmlReaderForDoc"/>
+ <function name="xmlReaderForFd ()" link="libxml2-xmlreader.html#xmlReaderForFd"/>
+ <function name="xmlReaderForFile ()" link="libxml2-xmlreader.html#xmlReaderForFile"/>
+ <function name="xmlReaderForIO ()" link="libxml2-xmlreader.html#xmlReaderForIO"/>
+ <function name="xmlReaderForMemory ()" link="libxml2-xmlreader.html#xmlReaderForMemory"/>
+ <function name="xmlReaderNewDoc ()" link="libxml2-xmlreader.html#xmlReaderNewDoc"/>
+ <function name="xmlReaderNewFd ()" link="libxml2-xmlreader.html#xmlReaderNewFd"/>
+ <function name="xmlReaderNewFile ()" link="libxml2-xmlreader.html#xmlReaderNewFile"/>
+ <function name="xmlReaderNewIO ()" link="libxml2-xmlreader.html#xmlReaderNewIO"/>
+ <function name="xmlReaderNewMemory ()" link="libxml2-xmlreader.html#xmlReaderNewMemory"/>
+ <function name="xmlReaderNewWalker ()" link="libxml2-xmlreader.html#xmlReaderNewWalker"/>
+ <function name="xmlReaderWalker ()" link="libxml2-xmlreader.html#xmlReaderWalker"/>
+ <function name="xmlReallocLoc ()" link="libxml2-xmlmemory.html#xmlReallocLoc"/>
+ <function name="xmlReconciliateNs ()" link="libxml2-tree.html#xmlReconciliateNs"/>
+ <function name="xmlRecoverDoc ()" link="libxml2-parser.html#xmlRecoverDoc"/>
+ <function name="xmlRecoverFile ()" link="libxml2-parser.html#xmlRecoverFile"/>
+ <function name="xmlRecoverMemory ()" link="libxml2-parser.html#xmlRecoverMemory"/>
+ <function name="xmlRegExecErrInfo ()" link="libxml2-xmlregexp.html#xmlRegExecErrInfo"/>
+ <function name="xmlRegExecNextValues ()" link="libxml2-xmlregexp.html#xmlRegExecNextValues"/>
+ <function name="xmlRegExecPushString ()" link="libxml2-xmlregexp.html#xmlRegExecPushString"/>
+ <function name="xmlRegExecPushString2 ()" link="libxml2-xmlregexp.html#xmlRegExecPushString2"/>
+ <function name="xmlRegFreeExecCtxt ()" link="libxml2-xmlregexp.html#xmlRegFreeExecCtxt"/>
+ <function name="xmlRegFreeRegexp ()" link="libxml2-xmlregexp.html#xmlRegFreeRegexp"/>
+ <function name="xmlRegNewExecCtxt ()" link="libxml2-xmlregexp.html#xmlRegNewExecCtxt"/>
+ <function name="xmlRegexpCompile ()" link="libxml2-xmlregexp.html#xmlRegexpCompile"/>
+ <function name="xmlRegexpExec ()" link="libxml2-xmlregexp.html#xmlRegexpExec"/>
+ <function name="xmlRegexpIsDeterminist ()" link="libxml2-xmlregexp.html#xmlRegexpIsDeterminist"/>
+ <function name="xmlRegexpPrint ()" link="libxml2-xmlregexp.html#xmlRegexpPrint"/>
+ <function name="xmlRegisterCharEncodingHandler ()" link="libxml2-encoding.html#xmlRegisterCharEncodingHandler"/>
+ <function name="xmlRegisterDefaultInputCallbacks ()" link="libxml2-xmlIO.html#xmlRegisterDefaultInputCallbacks"/>
+ <function name="xmlRegisterDefaultOutputCallbacks ()" link="libxml2-xmlIO.html#xmlRegisterDefaultOutputCallbacks"/>
+ <function name="xmlRegisterHTTPPostCallbacks ()" link="libxml2-xmlIO.html#xmlRegisterHTTPPostCallbacks"/>
+ <function name="xmlRegisterInputCallbacks ()" link="libxml2-xmlIO.html#xmlRegisterInputCallbacks"/>
+ <function name="xmlRegisterNodeDefault ()" link="libxml2-globals.html#xmlRegisterNodeDefault"/>
+ <function name="xmlRegisterOutputCallbacks ()" link="libxml2-xmlIO.html#xmlRegisterOutputCallbacks"/>
+ <function name="xmlRelaxNGCleanupTypes ()" link="libxml2-relaxng.html#xmlRelaxNGCleanupTypes"/>
+ <function name="xmlRelaxNGDump ()" link="libxml2-relaxng.html#xmlRelaxNGDump"/>
+ <function name="xmlRelaxNGDumpTree ()" link="libxml2-relaxng.html#xmlRelaxNGDumpTree"/>
+ <function name="xmlRelaxNGFree ()" link="libxml2-relaxng.html#xmlRelaxNGFree"/>
+ <function name="xmlRelaxNGFreeParserCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGFreeParserCtxt"/>
+ <function name="xmlRelaxNGFreeValidCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGFreeValidCtxt"/>
+ <function name="xmlRelaxNGGetParserErrors ()" link="libxml2-relaxng.html#xmlRelaxNGGetParserErrors"/>
+ <function name="xmlRelaxNGGetValidErrors ()" link="libxml2-relaxng.html#xmlRelaxNGGetValidErrors"/>
+ <function name="xmlRelaxNGInitTypes ()" link="libxml2-relaxng.html#xmlRelaxNGInitTypes"/>
+ <function name="xmlRelaxNGNewDocParserCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGNewDocParserCtxt"/>
+ <function name="xmlRelaxNGNewMemParserCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGNewMemParserCtxt"/>
+ <function name="xmlRelaxNGNewParserCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGNewParserCtxt"/>
+ <function name="xmlRelaxNGNewValidCtxt ()" link="libxml2-relaxng.html#xmlRelaxNGNewValidCtxt"/>
+ <function name="xmlRelaxNGParse ()" link="libxml2-relaxng.html#xmlRelaxNGParse"/>
+ <function name="xmlRelaxNGSetParserErrors ()" link="libxml2-relaxng.html#xmlRelaxNGSetParserErrors"/>
+ <function name="xmlRelaxNGSetParserStructuredErrors ()" link="libxml2-relaxng.html#xmlRelaxNGSetParserStructuredErrors"/>
+ <function name="xmlRelaxNGSetValidErrors ()" link="libxml2-relaxng.html#xmlRelaxNGSetValidErrors"/>
+ <function name="xmlRelaxNGSetValidStructuredErrors ()" link="libxml2-relaxng.html#xmlRelaxNGSetValidStructuredErrors"/>
+ <function name="xmlRelaxNGValidateDoc ()" link="libxml2-relaxng.html#xmlRelaxNGValidateDoc"/>
+ <function name="xmlRelaxNGValidateFullElement ()" link="libxml2-relaxng.html#xmlRelaxNGValidateFullElement"/>
+ <function name="xmlRelaxNGValidatePopElement ()" link="libxml2-relaxng.html#xmlRelaxNGValidatePopElement"/>
+ <function name="xmlRelaxNGValidatePushCData ()" link="libxml2-relaxng.html#xmlRelaxNGValidatePushCData"/>
+ <function name="xmlRelaxNGValidatePushElement ()" link="libxml2-relaxng.html#xmlRelaxNGValidatePushElement"/>
+ <function name="xmlRelaxParserSetFlag ()" link="libxml2-relaxng.html#xmlRelaxParserSetFlag"/>
+ <function name="xmlRemoveID ()" link="libxml2-valid.html#xmlRemoveID"/>
+ <function name="xmlRemoveProp ()" link="libxml2-tree.html#xmlRemoveProp"/>
+ <function name="xmlRemoveRef ()" link="libxml2-valid.html#xmlRemoveRef"/>
+ <function name="xmlReplaceNode ()" link="libxml2-tree.html#xmlReplaceNode"/>
+ <function name="xmlResetError ()" link="libxml2-xmlerror.html#xmlResetError"/>
+ <function name="xmlResetLastError ()" link="libxml2-xmlerror.html#xmlResetLastError"/>
+ <function name="xmlSAX2AttributeDecl ()" link="libxml2-SAX2.html#xmlSAX2AttributeDecl"/>
+ <function name="xmlSAX2CDataBlock ()" link="libxml2-SAX2.html#xmlSAX2CDataBlock"/>
+ <function name="xmlSAX2Characters ()" link="libxml2-SAX2.html#xmlSAX2Characters"/>
+ <function name="xmlSAX2Comment ()" link="libxml2-SAX2.html#xmlSAX2Comment"/>
+ <function name="xmlSAX2ElementDecl ()" link="libxml2-SAX2.html#xmlSAX2ElementDecl"/>
+ <function name="xmlSAX2EndDocument ()" link="libxml2-SAX2.html#xmlSAX2EndDocument"/>
+ <function name="xmlSAX2EndElement ()" link="libxml2-SAX2.html#xmlSAX2EndElement"/>
+ <function name="xmlSAX2EndElementNs ()" link="libxml2-SAX2.html#xmlSAX2EndElementNs"/>
+ <function name="xmlSAX2EntityDecl ()" link="libxml2-SAX2.html#xmlSAX2EntityDecl"/>
+ <function name="xmlSAX2ExternalSubset ()" link="libxml2-SAX2.html#xmlSAX2ExternalSubset"/>
+ <function name="xmlSAX2GetColumnNumber ()" link="libxml2-SAX2.html#xmlSAX2GetColumnNumber"/>
+ <function name="xmlSAX2GetEntity ()" link="libxml2-SAX2.html#xmlSAX2GetEntity"/>
+ <function name="xmlSAX2GetLineNumber ()" link="libxml2-SAX2.html#xmlSAX2GetLineNumber"/>
+ <function name="xmlSAX2GetParameterEntity ()" link="libxml2-SAX2.html#xmlSAX2GetParameterEntity"/>
+ <function name="xmlSAX2GetPublicId ()" link="libxml2-SAX2.html#xmlSAX2GetPublicId"/>
+ <function name="xmlSAX2GetSystemId ()" link="libxml2-SAX2.html#xmlSAX2GetSystemId"/>
+ <function name="xmlSAX2HasExternalSubset ()" link="libxml2-SAX2.html#xmlSAX2HasExternalSubset"/>
+ <function name="xmlSAX2HasInternalSubset ()" link="libxml2-SAX2.html#xmlSAX2HasInternalSubset"/>
+ <function name="xmlSAX2IgnorableWhitespace ()" link="libxml2-SAX2.html#xmlSAX2IgnorableWhitespace"/>
+ <function name="xmlSAX2InitDefaultSAXHandler ()" link="libxml2-SAX2.html#xmlSAX2InitDefaultSAXHandler"/>
+ <function name="xmlSAX2InitDocbDefaultSAXHandler ()" link="libxml2-SAX2.html#xmlSAX2InitDocbDefaultSAXHandler"/>
+ <function name="xmlSAX2InitHtmlDefaultSAXHandler ()" link="libxml2-SAX2.html#xmlSAX2InitHtmlDefaultSAXHandler"/>
+ <function name="xmlSAX2InternalSubset ()" link="libxml2-SAX2.html#xmlSAX2InternalSubset"/>
+ <function name="xmlSAX2IsStandalone ()" link="libxml2-SAX2.html#xmlSAX2IsStandalone"/>
+ <function name="xmlSAX2NotationDecl ()" link="libxml2-SAX2.html#xmlSAX2NotationDecl"/>
+ <function name="xmlSAX2ProcessingInstruction ()" link="libxml2-SAX2.html#xmlSAX2ProcessingInstruction"/>
+ <function name="xmlSAX2Reference ()" link="libxml2-SAX2.html#xmlSAX2Reference"/>
+ <function name="xmlSAX2ResolveEntity ()" link="libxml2-SAX2.html#xmlSAX2ResolveEntity"/>
+ <function name="xmlSAX2SetDocumentLocator ()" link="libxml2-SAX2.html#xmlSAX2SetDocumentLocator"/>
+ <function name="xmlSAX2StartDocument ()" link="libxml2-SAX2.html#xmlSAX2StartDocument"/>
+ <function name="xmlSAX2StartElement ()" link="libxml2-SAX2.html#xmlSAX2StartElement"/>
+ <function name="xmlSAX2StartElementNs ()" link="libxml2-SAX2.html#xmlSAX2StartElementNs"/>
+ <function name="xmlSAX2UnparsedEntityDecl ()" link="libxml2-SAX2.html#xmlSAX2UnparsedEntityDecl"/>
+ <function name="xmlSAXDefaultVersion ()" link="libxml2-SAX2.html#xmlSAXDefaultVersion"/>
+ <function name="xmlSAXParseDTD ()" link="libxml2-parser.html#xmlSAXParseDTD"/>
+ <function name="xmlSAXParseDoc ()" link="libxml2-parser.html#xmlSAXParseDoc"/>
+ <function name="xmlSAXParseEntity ()" link="libxml2-parser.html#xmlSAXParseEntity"/>
+ <function name="xmlSAXParseFile ()" link="libxml2-parser.html#xmlSAXParseFile"/>
+ <function name="xmlSAXParseFileWithData ()" link="libxml2-parser.html#xmlSAXParseFileWithData"/>
+ <function name="xmlSAXParseMemory ()" link="libxml2-parser.html#xmlSAXParseMemory"/>
+ <function name="xmlSAXParseMemoryWithData ()" link="libxml2-parser.html#xmlSAXParseMemoryWithData"/>
+ <function name="xmlSAXUserParseFile ()" link="libxml2-parser.html#xmlSAXUserParseFile"/>
+ <function name="xmlSAXUserParseMemory ()" link="libxml2-parser.html#xmlSAXUserParseMemory"/>
+ <function name="xmlSAXVersion ()" link="libxml2-SAX2.html#xmlSAXVersion"/>
+ <function name="xmlSaveClose ()" link="libxml2-xmlsave.html#xmlSaveClose"/>
+ <function name="xmlSaveDoc ()" link="libxml2-xmlsave.html#xmlSaveDoc"/>
+ <function name="xmlSaveFile ()" link="libxml2-tree.html#xmlSaveFile"/>
+ <function name="xmlSaveFileEnc ()" link="libxml2-tree.html#xmlSaveFileEnc"/>
+ <function name="xmlSaveFileTo ()" link="libxml2-tree.html#xmlSaveFileTo"/>
+ <function name="xmlSaveFlush ()" link="libxml2-xmlsave.html#xmlSaveFlush"/>
+ <function name="xmlSaveFormatFile ()" link="libxml2-tree.html#xmlSaveFormatFile"/>
+ <function name="xmlSaveFormatFileEnc ()" link="libxml2-tree.html#xmlSaveFormatFileEnc"/>
+ <function name="xmlSaveFormatFileTo ()" link="libxml2-tree.html#xmlSaveFormatFileTo"/>
+ <function name="xmlSaveSetAttrEscape ()" link="libxml2-xmlsave.html#xmlSaveSetAttrEscape"/>
+ <function name="xmlSaveSetEscape ()" link="libxml2-xmlsave.html#xmlSaveSetEscape"/>
+ <function name="xmlSaveToBuffer ()" link="libxml2-xmlsave.html#xmlSaveToBuffer"/>
+ <function name="xmlSaveToFd ()" link="libxml2-xmlsave.html#xmlSaveToFd"/>
+ <function name="xmlSaveToFilename ()" link="libxml2-xmlsave.html#xmlSaveToFilename"/>
+ <function name="xmlSaveToIO ()" link="libxml2-xmlsave.html#xmlSaveToIO"/>
+ <function name="xmlSaveTree ()" link="libxml2-xmlsave.html#xmlSaveTree"/>
+ <function name="xmlSaveUri ()" link="libxml2-uri.html#xmlSaveUri"/>
+ <function name="xmlScanName ()" link="libxml2-parserInternals.html#xmlScanName"/>
+ <function name="xmlSchemaCheckFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaCheckFacet"/>
+ <function name="xmlSchemaCleanupTypes ()" link="libxml2-xmlschemastypes.html#xmlSchemaCleanupTypes"/>
+ <function name="xmlSchemaCollapseString ()" link="libxml2-xmlschemastypes.html#xmlSchemaCollapseString"/>
+ <function name="xmlSchemaCompareValues ()" link="libxml2-xmlschemastypes.html#xmlSchemaCompareValues"/>
+ <function name="xmlSchemaCompareValuesWhtsp ()" link="libxml2-xmlschemastypes.html#xmlSchemaCompareValuesWhtsp"/>
+ <function name="xmlSchemaCopyValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaCopyValue"/>
+ <function name="xmlSchemaDump ()" link="libxml2-xmlschemas.html#xmlSchemaDump"/>
+ <function name="xmlSchemaFree ()" link="libxml2-xmlschemas.html#xmlSchemaFree"/>
+ <function name="xmlSchemaFreeFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaFreeFacet"/>
+ <function name="xmlSchemaFreeParserCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaFreeParserCtxt"/>
+ <function name="xmlSchemaFreeType ()" link="libxml2-schemasInternals.html#xmlSchemaFreeType"/>
+ <function name="xmlSchemaFreeValidCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaFreeValidCtxt"/>
+ <function name="xmlSchemaFreeValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaFreeValue"/>
+ <function name="xmlSchemaFreeWildcard ()" link="libxml2-schemasInternals.html#xmlSchemaFreeWildcard"/>
+ <function name="xmlSchemaGetBuiltInListSimpleTypeItemType ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetBuiltInListSimpleTypeItemType"/>
+ <function name="xmlSchemaGetBuiltInType ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetBuiltInType"/>
+ <function name="xmlSchemaGetCanonValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetCanonValue"/>
+ <function name="xmlSchemaGetCanonValueWhtsp ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetCanonValueWhtsp"/>
+ <function name="xmlSchemaGetFacetValueAsULong ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetFacetValueAsULong"/>
+ <function name="xmlSchemaGetParserErrors ()" link="libxml2-xmlschemas.html#xmlSchemaGetParserErrors"/>
+ <function name="xmlSchemaGetPredefinedType ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetPredefinedType"/>
+ <function name="xmlSchemaGetValType ()" link="libxml2-xmlschemastypes.html#xmlSchemaGetValType"/>
+ <function name="xmlSchemaGetValidErrors ()" link="libxml2-xmlschemas.html#xmlSchemaGetValidErrors"/>
+ <function name="xmlSchemaInitTypes ()" link="libxml2-xmlschemastypes.html#xmlSchemaInitTypes"/>
+ <function name="xmlSchemaIsBuiltInTypeFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaIsBuiltInTypeFacet"/>
+ <function name="xmlSchemaIsValid ()" link="libxml2-xmlschemas.html#xmlSchemaIsValid"/>
+ <function name="xmlSchemaNewDocParserCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaNewDocParserCtxt"/>
+ <function name="xmlSchemaNewFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaNewFacet"/>
+ <function name="xmlSchemaNewMemParserCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaNewMemParserCtxt"/>
+ <function name="xmlSchemaNewNOTATIONValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaNewNOTATIONValue"/>
+ <function name="xmlSchemaNewParserCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaNewParserCtxt"/>
+ <function name="xmlSchemaNewQNameValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaNewQNameValue"/>
+ <function name="xmlSchemaNewStringValue ()" link="libxml2-xmlschemastypes.html#xmlSchemaNewStringValue"/>
+ <function name="xmlSchemaNewValidCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaNewValidCtxt"/>
+ <function name="xmlSchemaParse ()" link="libxml2-xmlschemas.html#xmlSchemaParse"/>
+ <function name="xmlSchemaSAXPlug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXPlug"/>
+ <function name="xmlSchemaSAXUnplug ()" link="libxml2-xmlschemas.html#xmlSchemaSAXUnplug"/>
+ <function name="xmlSchemaSetParserErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserErrors"/>
+ <function name="xmlSchemaSetParserStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetParserStructuredErrors"/>
+ <function name="xmlSchemaSetValidErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidErrors"/>
+ <function name="xmlSchemaSetValidOptions ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidOptions"/>
+ <function name="xmlSchemaSetValidStructuredErrors ()" link="libxml2-xmlschemas.html#xmlSchemaSetValidStructuredErrors"/>
+ <function name="xmlSchemaValPredefTypeNode ()" link="libxml2-xmlschemastypes.html#xmlSchemaValPredefTypeNode"/>
+ <function name="xmlSchemaValPredefTypeNodeNoNorm ()" link="libxml2-xmlschemastypes.html#xmlSchemaValPredefTypeNodeNoNorm"/>
+ <function name="xmlSchemaValidCtxtGetOptions ()" link="libxml2-xmlschemas.html#xmlSchemaValidCtxtGetOptions"/>
+ <function name="xmlSchemaValidCtxtGetParserCtxt ()" link="libxml2-xmlschemas.html#xmlSchemaValidCtxtGetParserCtxt"/>
+ <function name="xmlSchemaValidateDoc ()" link="libxml2-xmlschemas.html#xmlSchemaValidateDoc"/>
+ <function name="xmlSchemaValidateFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateFacet"/>
+ <function name="xmlSchemaValidateFacetWhtsp ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateFacetWhtsp"/>
+ <function name="xmlSchemaValidateFile ()" link="libxml2-xmlschemas.html#xmlSchemaValidateFile"/>
+ <function name="xmlSchemaValidateLengthFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateLengthFacet"/>
+ <function name="xmlSchemaValidateLengthFacetWhtsp ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateLengthFacetWhtsp"/>
+ <function name="xmlSchemaValidateListSimpleTypeFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet"/>
+ <function name="xmlSchemaValidateOneElement ()" link="libxml2-xmlschemas.html#xmlSchemaValidateOneElement"/>
+ <function name="xmlSchemaValidatePredefinedType ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidatePredefinedType"/>
+ <function name="xmlSchemaValidateSetFilename ()" link="libxml2-xmlschemas.html#xmlSchemaValidateSetFilename"/>
+ <function name="xmlSchemaValidateSetLocator ()" link="libxml2-xmlschemas.html#xmlSchemaValidateSetLocator"/>
+ <function name="xmlSchemaValidateStream ()" link="libxml2-xmlschemas.html#xmlSchemaValidateStream"/>
+ <function name="xmlSchemaValueAppend ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueAppend"/>
+ <function name="xmlSchemaValueGetAsBoolean ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueGetAsBoolean"/>
+ <function name="xmlSchemaValueGetAsString ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueGetAsString"/>
+ <function name="xmlSchemaValueGetNext ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueGetNext"/>
+ <function name="xmlSchemaWhiteSpaceReplace ()" link="libxml2-xmlschemastypes.html#xmlSchemaWhiteSpaceReplace"/>
+ <function name="xmlSchematronFree ()" link="libxml2-schematron.html#xmlSchematronFree"/>
+ <function name="xmlSchematronFreeParserCtxt ()" link="libxml2-schematron.html#xmlSchematronFreeParserCtxt"/>
+ <function name="xmlSchematronFreeValidCtxt ()" link="libxml2-schematron.html#xmlSchematronFreeValidCtxt"/>
+ <function name="xmlSchematronNewDocParserCtxt ()" link="libxml2-schematron.html#xmlSchematronNewDocParserCtxt"/>
+ <function name="xmlSchematronNewMemParserCtxt ()" link="libxml2-schematron.html#xmlSchematronNewMemParserCtxt"/>
+ <function name="xmlSchematronNewParserCtxt ()" link="libxml2-schematron.html#xmlSchematronNewParserCtxt"/>
+ <function name="xmlSchematronNewValidCtxt ()" link="libxml2-schematron.html#xmlSchematronNewValidCtxt"/>
+ <function name="xmlSchematronParse ()" link="libxml2-schematron.html#xmlSchematronParse"/>
+ <function name="xmlSchematronSetValidStructuredErrors ()" link="libxml2-schematron.html#xmlSchematronSetValidStructuredErrors"/>
+ <function name="xmlSchematronValidateDoc ()" link="libxml2-schematron.html#xmlSchematronValidateDoc"/>
+ <function name="xmlSearchNs ()" link="libxml2-tree.html#xmlSearchNs"/>
+ <function name="xmlSearchNsByHref ()" link="libxml2-tree.html#xmlSearchNsByHref"/>
+ <function name="xmlSetBufferAllocationScheme ()" link="libxml2-tree.html#xmlSetBufferAllocationScheme"/>
+ <function name="xmlSetCompressMode ()" link="libxml2-tree.html#xmlSetCompressMode"/>
+ <function name="xmlSetDocCompressMode ()" link="libxml2-tree.html#xmlSetDocCompressMode"/>
+ <function name="xmlSetEntityReferenceFunc ()" link="libxml2-parserInternals.html#xmlSetEntityReferenceFunc"/>
+ <function name="xmlSetExternalEntityLoader ()" link="libxml2-parser.html#xmlSetExternalEntityLoader"/>
+ <function name="xmlSetFeature ()" link="libxml2-parser.html#xmlSetFeature"/>
+ <function name="xmlSetGenericErrorFunc ()" link="libxml2-xmlerror.html#xmlSetGenericErrorFunc"/>
+ <function name="xmlSetListDoc ()" link="libxml2-tree.html#xmlSetListDoc"/>
+ <function name="xmlSetNs ()" link="libxml2-tree.html#xmlSetNs"/>
+ <function name="xmlSetNsProp ()" link="libxml2-tree.html#xmlSetNsProp"/>
+ <function name="xmlSetProp ()" link="libxml2-tree.html#xmlSetProp"/>
+ <function name="xmlSetStructuredErrorFunc ()" link="libxml2-xmlerror.html#xmlSetStructuredErrorFunc"/>
+ <function name="xmlSetTreeDoc ()" link="libxml2-tree.html#xmlSetTreeDoc"/>
+ <function name="xmlSetupParserForBuffer ()" link="libxml2-parser.html#xmlSetupParserForBuffer"/>
+ <function name="xmlShell ()" link="libxml2-debugXML.html#xmlShell"/>
+ <function name="xmlShellBase ()" link="libxml2-debugXML.html#xmlShellBase"/>
+ <function name="xmlShellCat ()" link="libxml2-debugXML.html#xmlShellCat"/>
+ <function name="xmlShellDir ()" link="libxml2-debugXML.html#xmlShellDir"/>
+ <function name="xmlShellDu ()" link="libxml2-debugXML.html#xmlShellDu"/>
+ <function name="xmlShellList ()" link="libxml2-debugXML.html#xmlShellList"/>
+ <function name="xmlShellLoad ()" link="libxml2-debugXML.html#xmlShellLoad"/>
+ <function name="xmlShellPrintNode ()" link="libxml2-debugXML.html#xmlShellPrintNode"/>
+ <function name="xmlShellPrintXPathError ()" link="libxml2-debugXML.html#xmlShellPrintXPathError"/>
+ <function name="xmlShellPrintXPathResult ()" link="libxml2-debugXML.html#xmlShellPrintXPathResult"/>
+ <function name="xmlShellPwd ()" link="libxml2-debugXML.html#xmlShellPwd"/>
+ <function name="xmlShellSave ()" link="libxml2-debugXML.html#xmlShellSave"/>
+ <function name="xmlShellValidate ()" link="libxml2-debugXML.html#xmlShellValidate"/>
+ <function name="xmlShellWrite ()" link="libxml2-debugXML.html#xmlShellWrite"/>
+ <function name="xmlSkipBlankChars ()" link="libxml2-parserInternals.html#xmlSkipBlankChars"/>
+ <function name="xmlSnprintfElementContent ()" link="libxml2-valid.html#xmlSnprintfElementContent"/>
+ <function name="xmlSplitQName ()" link="libxml2-parserInternals.html#xmlSplitQName"/>
+ <function name="xmlSplitQName2 ()" link="libxml2-tree.html#xmlSplitQName2"/>
+ <function name="xmlSplitQName3 ()" link="libxml2-tree.html#xmlSplitQName3"/>
+ <function name="xmlSprintfElementContent ()" link="libxml2-valid.html#xmlSprintfElementContent"/>
+ <function name="xmlStopParser ()" link="libxml2-parser.html#xmlStopParser"/>
+ <function name="xmlStrEqual ()" link="libxml2-xmlstring.html#xmlStrEqual"/>
+ <function name="xmlStrPrintf ()" link="libxml2-xmlstring.html#xmlStrPrintf"/>
+ <function name="xmlStrQEqual ()" link="libxml2-xmlstring.html#xmlStrQEqual"/>
+ <function name="xmlStrVPrintf ()" link="libxml2-xmlstring.html#xmlStrVPrintf"/>
+ <function name="xmlStrcasecmp ()" link="libxml2-xmlstring.html#xmlStrcasecmp"/>
+ <function name="xmlStrcasestr ()" link="libxml2-xmlstring.html#xmlStrcasestr"/>
+ <function name="xmlStrcat ()" link="libxml2-xmlstring.html#xmlStrcat"/>
+ <function name="xmlStrchr ()" link="libxml2-xmlstring.html#xmlStrchr"/>
+ <function name="xmlStrcmp ()" link="libxml2-xmlstring.html#xmlStrcmp"/>
+ <function name="xmlStrdup ()" link="libxml2-xmlstring.html#xmlStrdup"/>
+ <function name="xmlStreamPop ()" link="libxml2-pattern.html#xmlStreamPop"/>
+ <function name="xmlStreamPush ()" link="libxml2-pattern.html#xmlStreamPush"/>
+ <function name="xmlStreamPushAttr ()" link="libxml2-pattern.html#xmlStreamPushAttr"/>
+ <function name="xmlStreamPushNode ()" link="libxml2-pattern.html#xmlStreamPushNode"/>
+ <function name="xmlStreamWantsAnyNode ()" link="libxml2-pattern.html#xmlStreamWantsAnyNode"/>
+ <function name="xmlStringCurrentChar ()" link="libxml2-parserInternals.html#xmlStringCurrentChar"/>
+ <function name="xmlStringDecodeEntities ()" link="libxml2-parserInternals.html#xmlStringDecodeEntities"/>
+ <function name="xmlStringGetNodeList ()" link="libxml2-tree.html#xmlStringGetNodeList"/>
+ <function name="xmlStringLenDecodeEntities ()" link="libxml2-parserInternals.html#xmlStringLenDecodeEntities"/>
+ <function name="xmlStringLenGetNodeList ()" link="libxml2-tree.html#xmlStringLenGetNodeList"/>
+ <function name="xmlStrlen ()" link="libxml2-xmlstring.html#xmlStrlen"/>
+ <function name="xmlStrncasecmp ()" link="libxml2-xmlstring.html#xmlStrncasecmp"/>
+ <function name="xmlStrncat ()" link="libxml2-xmlstring.html#xmlStrncat"/>
+ <function name="xmlStrncatNew ()" link="libxml2-xmlstring.html#xmlStrncatNew"/>
+ <function name="xmlStrncmp ()" link="libxml2-xmlstring.html#xmlStrncmp"/>
+ <function name="xmlStrndup ()" link="libxml2-xmlstring.html#xmlStrndup"/>
+ <function name="xmlStrstr ()" link="libxml2-xmlstring.html#xmlStrstr"/>
+ <function name="xmlStrsub ()" link="libxml2-xmlstring.html#xmlStrsub"/>
+ <function name="xmlSubstituteEntitiesDefault ()" link="libxml2-parser.html#xmlSubstituteEntitiesDefault"/>
+ <function name="xmlSwitchEncoding ()" link="libxml2-parserInternals.html#xmlSwitchEncoding"/>
+ <function name="xmlSwitchInputEncoding ()" link="libxml2-parserInternals.html#xmlSwitchInputEncoding"/>
+ <function name="xmlSwitchToEncoding ()" link="libxml2-parserInternals.html#xmlSwitchToEncoding"/>
+ <function name="xmlTextConcat ()" link="libxml2-tree.html#xmlTextConcat"/>
+ <function name="xmlTextMerge ()" link="libxml2-tree.html#xmlTextMerge"/>
+ <function name="xmlTextReaderAttributeCount ()" link="libxml2-xmlreader.html#xmlTextReaderAttributeCount"/>
+ <function name="xmlTextReaderBaseUri ()" link="libxml2-xmlreader.html#xmlTextReaderBaseUri"/>
+ <function name="xmlTextReaderByteConsumed ()" link="libxml2-xmlreader.html#xmlTextReaderByteConsumed"/>
+ <function name="xmlTextReaderClose ()" link="libxml2-xmlreader.html#xmlTextReaderClose"/>
+ <function name="xmlTextReaderConstBaseUri ()" link="libxml2-xmlreader.html#xmlTextReaderConstBaseUri"/>
+ <function name="xmlTextReaderConstEncoding ()" link="libxml2-xmlreader.html#xmlTextReaderConstEncoding"/>
+ <function name="xmlTextReaderConstLocalName ()" link="libxml2-xmlreader.html#xmlTextReaderConstLocalName"/>
+ <function name="xmlTextReaderConstName ()" link="libxml2-xmlreader.html#xmlTextReaderConstName"/>
+ <function name="xmlTextReaderConstNamespaceUri ()" link="libxml2-xmlreader.html#xmlTextReaderConstNamespaceUri"/>
+ <function name="xmlTextReaderConstPrefix ()" link="libxml2-xmlreader.html#xmlTextReaderConstPrefix"/>
+ <function name="xmlTextReaderConstString ()" link="libxml2-xmlreader.html#xmlTextReaderConstString"/>
+ <function name="xmlTextReaderConstValue ()" link="libxml2-xmlreader.html#xmlTextReaderConstValue"/>
+ <function name="xmlTextReaderConstXmlLang ()" link="libxml2-xmlreader.html#xmlTextReaderConstXmlLang"/>
+ <function name="xmlTextReaderConstXmlVersion ()" link="libxml2-xmlreader.html#xmlTextReaderConstXmlVersion"/>
+ <function name="xmlTextReaderCurrentDoc ()" link="libxml2-xmlreader.html#xmlTextReaderCurrentDoc"/>
+ <function name="xmlTextReaderCurrentNode ()" link="libxml2-xmlreader.html#xmlTextReaderCurrentNode"/>
+ <function name="xmlTextReaderDepth ()" link="libxml2-xmlreader.html#xmlTextReaderDepth"/>
+ <function name="xmlTextReaderExpand ()" link="libxml2-xmlreader.html#xmlTextReaderExpand"/>
+ <function name="xmlTextReaderGetAttribute ()" link="libxml2-xmlreader.html#xmlTextReaderGetAttribute"/>
+ <function name="xmlTextReaderGetAttributeNo ()" link="libxml2-xmlreader.html#xmlTextReaderGetAttributeNo"/>
+ <function name="xmlTextReaderGetAttributeNs ()" link="libxml2-xmlreader.html#xmlTextReaderGetAttributeNs"/>
+ <function name="xmlTextReaderGetErrorHandler ()" link="libxml2-xmlreader.html#xmlTextReaderGetErrorHandler"/>
+ <function name="xmlTextReaderGetParserColumnNumber ()" link="libxml2-xmlreader.html#xmlTextReaderGetParserColumnNumber"/>
+ <function name="xmlTextReaderGetParserLineNumber ()" link="libxml2-xmlreader.html#xmlTextReaderGetParserLineNumber"/>
+ <function name="xmlTextReaderGetParserProp ()" link="libxml2-xmlreader.html#xmlTextReaderGetParserProp"/>
+ <function name="xmlTextReaderGetRemainder ()" link="libxml2-xmlreader.html#xmlTextReaderGetRemainder"/>
+ <function name="xmlTextReaderHasAttributes ()" link="libxml2-xmlreader.html#xmlTextReaderHasAttributes"/>
+ <function name="xmlTextReaderHasValue ()" link="libxml2-xmlreader.html#xmlTextReaderHasValue"/>
+ <function name="xmlTextReaderIsDefault ()" link="libxml2-xmlreader.html#xmlTextReaderIsDefault"/>
+ <function name="xmlTextReaderIsEmptyElement ()" link="libxml2-xmlreader.html#xmlTextReaderIsEmptyElement"/>
+ <function name="xmlTextReaderIsNamespaceDecl ()" link="libxml2-xmlreader.html#xmlTextReaderIsNamespaceDecl"/>
+ <function name="xmlTextReaderIsValid ()" link="libxml2-xmlreader.html#xmlTextReaderIsValid"/>
+ <function name="xmlTextReaderLocalName ()" link="libxml2-xmlreader.html#xmlTextReaderLocalName"/>
+ <function name="xmlTextReaderLocatorBaseURI ()" link="libxml2-xmlreader.html#xmlTextReaderLocatorBaseURI"/>
+ <function name="xmlTextReaderLocatorLineNumber ()" link="libxml2-xmlreader.html#xmlTextReaderLocatorLineNumber"/>
+ <function name="xmlTextReaderLookupNamespace ()" link="libxml2-xmlreader.html#xmlTextReaderLookupNamespace"/>
+ <function name="xmlTextReaderMoveToAttribute ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToAttribute"/>
+ <function name="xmlTextReaderMoveToAttributeNo ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToAttributeNo"/>
+ <function name="xmlTextReaderMoveToAttributeNs ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToAttributeNs"/>
+ <function name="xmlTextReaderMoveToElement ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToElement"/>
+ <function name="xmlTextReaderMoveToFirstAttribute ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToFirstAttribute"/>
+ <function name="xmlTextReaderMoveToNextAttribute ()" link="libxml2-xmlreader.html#xmlTextReaderMoveToNextAttribute"/>
+ <function name="xmlTextReaderName ()" link="libxml2-xmlreader.html#xmlTextReaderName"/>
+ <function name="xmlTextReaderNamespaceUri ()" link="libxml2-xmlreader.html#xmlTextReaderNamespaceUri"/>
+ <function name="xmlTextReaderNext ()" link="libxml2-xmlreader.html#xmlTextReaderNext"/>
+ <function name="xmlTextReaderNextSibling ()" link="libxml2-xmlreader.html#xmlTextReaderNextSibling"/>
+ <function name="xmlTextReaderNodeType ()" link="libxml2-xmlreader.html#xmlTextReaderNodeType"/>
+ <function name="xmlTextReaderNormalization ()" link="libxml2-xmlreader.html#xmlTextReaderNormalization"/>
+ <function name="xmlTextReaderPrefix ()" link="libxml2-xmlreader.html#xmlTextReaderPrefix"/>
+ <function name="xmlTextReaderPreserve ()" link="libxml2-xmlreader.html#xmlTextReaderPreserve"/>
+ <function name="xmlTextReaderPreservePattern ()" link="libxml2-xmlreader.html#xmlTextReaderPreservePattern"/>
+ <function name="xmlTextReaderQuoteChar ()" link="libxml2-xmlreader.html#xmlTextReaderQuoteChar"/>
+ <function name="xmlTextReaderRead ()" link="libxml2-xmlreader.html#xmlTextReaderRead"/>
+ <function name="xmlTextReaderReadAttributeValue ()" link="libxml2-xmlreader.html#xmlTextReaderReadAttributeValue"/>
+ <function name="xmlTextReaderReadInnerXml ()" link="libxml2-xmlreader.html#xmlTextReaderReadInnerXml"/>
+ <function name="xmlTextReaderReadOuterXml ()" link="libxml2-xmlreader.html#xmlTextReaderReadOuterXml"/>
+ <function name="xmlTextReaderReadState ()" link="libxml2-xmlreader.html#xmlTextReaderReadState"/>
+ <function name="xmlTextReaderReadString ()" link="libxml2-xmlreader.html#xmlTextReaderReadString"/>
+ <function name="xmlTextReaderRelaxNGSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGSetSchema"/>
+ <function name="xmlTextReaderRelaxNGValidate ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGValidate"/>
+ <function name="xmlTextReaderRelaxNGValidateCtxt ()" link="libxml2-xmlreader.html#xmlTextReaderRelaxNGValidateCtxt"/>
+ <function name="xmlTextReaderSchemaValidate ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidate"/>
+ <function name="xmlTextReaderSchemaValidateCtxt ()" link="libxml2-xmlreader.html#xmlTextReaderSchemaValidateCtxt"/>
+ <function name="xmlTextReaderSetErrorHandler ()" link="libxml2-xmlreader.html#xmlTextReaderSetErrorHandler"/>
+ <function name="xmlTextReaderSetParserProp ()" link="libxml2-xmlreader.html#xmlTextReaderSetParserProp"/>
+ <function name="xmlTextReaderSetSchema ()" link="libxml2-xmlreader.html#xmlTextReaderSetSchema"/>
+ <function name="xmlTextReaderSetStructuredErrorHandler ()" link="libxml2-xmlreader.html#xmlTextReaderSetStructuredErrorHandler"/>
+ <function name="xmlTextReaderSetup ()" link="libxml2-xmlreader.html#xmlTextReaderSetup"/>
+ <function name="xmlTextReaderStandalone ()" link="libxml2-xmlreader.html#xmlTextReaderStandalone"/>
+ <function name="xmlTextReaderValue ()" link="libxml2-xmlreader.html#xmlTextReaderValue"/>
+ <function name="xmlTextReaderXmlLang ()" link="libxml2-xmlreader.html#xmlTextReaderXmlLang"/>
+ <function name="xmlTextWriterEndAttribute ()" link="libxml2-xmlwriter.html#xmlTextWriterEndAttribute"/>
+ <function name="xmlTextWriterEndCDATA ()" link="libxml2-xmlwriter.html#xmlTextWriterEndCDATA"/>
+ <function name="xmlTextWriterEndComment ()" link="libxml2-xmlwriter.html#xmlTextWriterEndComment"/>
+ <function name="xmlTextWriterEndDTD ()" link="libxml2-xmlwriter.html#xmlTextWriterEndDTD"/>
+ <function name="xmlTextWriterEndDTDAttlist ()" link="libxml2-xmlwriter.html#xmlTextWriterEndDTDAttlist"/>
+ <function name="xmlTextWriterEndDTDElement ()" link="libxml2-xmlwriter.html#xmlTextWriterEndDTDElement"/>
+ <function name="xmlTextWriterEndDTDEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterEndDTDEntity"/>
+ <function name="xmlTextWriterEndDocument ()" link="libxml2-xmlwriter.html#xmlTextWriterEndDocument"/>
+ <function name="xmlTextWriterEndElement ()" link="libxml2-xmlwriter.html#xmlTextWriterEndElement"/>
+ <function name="xmlTextWriterEndPI ()" link="libxml2-xmlwriter.html#xmlTextWriterEndPI"/>
+ <function name="xmlTextWriterFlush ()" link="libxml2-xmlwriter.html#xmlTextWriterFlush"/>
+ <function name="xmlTextWriterFullEndElement ()" link="libxml2-xmlwriter.html#xmlTextWriterFullEndElement"/>
+ <function name="xmlTextWriterSetIndent ()" link="libxml2-xmlwriter.html#xmlTextWriterSetIndent"/>
+ <function name="xmlTextWriterSetIndentString ()" link="libxml2-xmlwriter.html#xmlTextWriterSetIndentString"/>
+ <function name="xmlTextWriterSetQuoteChar ()" link="libxml2-xmlwriter.html#xmlTextWriterSetQuoteChar"/>
+ <function name="xmlTextWriterStartAttribute ()" link="libxml2-xmlwriter.html#xmlTextWriterStartAttribute"/>
+ <function name="xmlTextWriterStartAttributeNS ()" link="libxml2-xmlwriter.html#xmlTextWriterStartAttributeNS"/>
+ <function name="xmlTextWriterStartCDATA ()" link="libxml2-xmlwriter.html#xmlTextWriterStartCDATA"/>
+ <function name="xmlTextWriterStartComment ()" link="libxml2-xmlwriter.html#xmlTextWriterStartComment"/>
+ <function name="xmlTextWriterStartDTD ()" link="libxml2-xmlwriter.html#xmlTextWriterStartDTD"/>
+ <function name="xmlTextWriterStartDTDAttlist ()" link="libxml2-xmlwriter.html#xmlTextWriterStartDTDAttlist"/>
+ <function name="xmlTextWriterStartDTDElement ()" link="libxml2-xmlwriter.html#xmlTextWriterStartDTDElement"/>
+ <function name="xmlTextWriterStartDTDEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterStartDTDEntity"/>
+ <function name="xmlTextWriterStartDocument ()" link="libxml2-xmlwriter.html#xmlTextWriterStartDocument"/>
+ <function name="xmlTextWriterStartElement ()" link="libxml2-xmlwriter.html#xmlTextWriterStartElement"/>
+ <function name="xmlTextWriterStartElementNS ()" link="libxml2-xmlwriter.html#xmlTextWriterStartElementNS"/>
+ <function name="xmlTextWriterStartPI ()" link="libxml2-xmlwriter.html#xmlTextWriterStartPI"/>
+ <function name="xmlTextWriterWriteAttribute ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteAttribute"/>
+ <function name="xmlTextWriterWriteAttributeNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteAttributeNS"/>
+ <function name="xmlTextWriterWriteBase64 ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteBase64"/>
+ <function name="xmlTextWriterWriteBinHex ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteBinHex"/>
+ <function name="xmlTextWriterWriteCDATA ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteCDATA"/>
+ <function name="xmlTextWriterWriteComment ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteComment"/>
+ <function name="xmlTextWriterWriteDTD ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTD"/>
+ <function name="xmlTextWriterWriteDTDAttlist ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDAttlist"/>
+ <function name="xmlTextWriterWriteDTDElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDElement"/>
+ <function name="xmlTextWriterWriteDTDEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDEntity"/>
+ <function name="xmlTextWriterWriteDTDExternalEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDExternalEntity"/>
+ <function name="xmlTextWriterWriteDTDExternalEntityContents ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDExternalEntityContents"/>
+ <function name="xmlTextWriterWriteDTDInternalEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDInternalEntity"/>
+ <function name="xmlTextWriterWriteDTDNotation ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteDTDNotation"/>
+ <function name="xmlTextWriterWriteElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteElement"/>
+ <function name="xmlTextWriterWriteElementNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteElementNS"/>
+ <function name="xmlTextWriterWriteFormatAttribute ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatAttribute"/>
+ <function name="xmlTextWriterWriteFormatAttributeNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatAttributeNS"/>
+ <function name="xmlTextWriterWriteFormatCDATA ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatCDATA"/>
+ <function name="xmlTextWriterWriteFormatComment ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatComment"/>
+ <function name="xmlTextWriterWriteFormatDTD ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatDTD"/>
+ <function name="xmlTextWriterWriteFormatDTDAttlist ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatDTDAttlist"/>
+ <function name="xmlTextWriterWriteFormatDTDElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatDTDElement"/>
+ <function name="xmlTextWriterWriteFormatDTDInternalEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatDTDInternalEntity"/>
+ <function name="xmlTextWriterWriteFormatElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatElement"/>
+ <function name="xmlTextWriterWriteFormatElementNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatElementNS"/>
+ <function name="xmlTextWriterWriteFormatPI ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatPI"/>
+ <function name="xmlTextWriterWriteFormatRaw ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatRaw"/>
+ <function name="xmlTextWriterWriteFormatString ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteFormatString"/>
+ <function name="xmlTextWriterWritePI ()" link="libxml2-xmlwriter.html#xmlTextWriterWritePI"/>
+ <function name="xmlTextWriterWriteRaw ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteRaw"/>
+ <function name="xmlTextWriterWriteRawLen ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteRawLen"/>
+ <function name="xmlTextWriterWriteString ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteString"/>
+ <function name="xmlTextWriterWriteVFormatAttribute ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatAttribute"/>
+ <function name="xmlTextWriterWriteVFormatAttributeNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatAttributeNS"/>
+ <function name="xmlTextWriterWriteVFormatCDATA ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatCDATA"/>
+ <function name="xmlTextWriterWriteVFormatComment ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatComment"/>
+ <function name="xmlTextWriterWriteVFormatDTD ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatDTD"/>
+ <function name="xmlTextWriterWriteVFormatDTDAttlist ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatDTDAttlist"/>
+ <function name="xmlTextWriterWriteVFormatDTDElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatDTDElement"/>
+ <function name="xmlTextWriterWriteVFormatDTDInternalEntity ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatDTDInternalEntity"/>
+ <function name="xmlTextWriterWriteVFormatElement ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatElement"/>
+ <function name="xmlTextWriterWriteVFormatElementNS ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatElementNS"/>
+ <function name="xmlTextWriterWriteVFormatPI ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatPI"/>
+ <function name="xmlTextWriterWriteVFormatRaw ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatRaw"/>
+ <function name="xmlTextWriterWriteVFormatString ()" link="libxml2-xmlwriter.html#xmlTextWriterWriteVFormatString"/>
+ <function name="xmlThrDefBufferAllocScheme ()" link="libxml2-globals.html#xmlThrDefBufferAllocScheme"/>
+ <function name="xmlThrDefDefaultBufferSize ()" link="libxml2-globals.html#xmlThrDefDefaultBufferSize"/>
+ <function name="xmlThrDefDeregisterNodeDefault ()" link="libxml2-globals.html#xmlThrDefDeregisterNodeDefault"/>
+ <function name="xmlThrDefDoValidityCheckingDefaultValue ()" link="libxml2-globals.html#xmlThrDefDoValidityCheckingDefaultValue"/>
+ <function name="xmlThrDefGetWarningsDefaultValue ()" link="libxml2-globals.html#xmlThrDefGetWarningsDefaultValue"/>
+ <function name="xmlThrDefIndentTreeOutput ()" link="libxml2-globals.html#xmlThrDefIndentTreeOutput"/>
+ <function name="xmlThrDefKeepBlanksDefaultValue ()" link="libxml2-globals.html#xmlThrDefKeepBlanksDefaultValue"/>
+ <function name="xmlThrDefLineNumbersDefaultValue ()" link="libxml2-globals.html#xmlThrDefLineNumbersDefaultValue"/>
+ <function name="xmlThrDefLoadExtDtdDefaultValue ()" link="libxml2-globals.html#xmlThrDefLoadExtDtdDefaultValue"/>
+ <function name="xmlThrDefOutputBufferCreateFilenameDefault ()" link="libxml2-globals.html#xmlThrDefOutputBufferCreateFilenameDefault"/>
+ <function name="xmlThrDefParserDebugEntities ()" link="libxml2-globals.html#xmlThrDefParserDebugEntities"/>
+ <function name="xmlThrDefParserInputBufferCreateFilenameDefault ()" link="libxml2-globals.html#xmlThrDefParserInputBufferCreateFilenameDefault"/>
+ <function name="xmlThrDefPedanticParserDefaultValue ()" link="libxml2-globals.html#xmlThrDefPedanticParserDefaultValue"/>
+ <function name="xmlThrDefRegisterNodeDefault ()" link="libxml2-globals.html#xmlThrDefRegisterNodeDefault"/>
+ <function name="xmlThrDefSaveNoEmptyTags ()" link="libxml2-globals.html#xmlThrDefSaveNoEmptyTags"/>
+ <function name="xmlThrDefSetGenericErrorFunc ()" link="libxml2-globals.html#xmlThrDefSetGenericErrorFunc"/>
+ <function name="xmlThrDefSetStructuredErrorFunc ()" link="libxml2-globals.html#xmlThrDefSetStructuredErrorFunc"/>
+ <function name="xmlThrDefSubstituteEntitiesDefaultValue ()" link="libxml2-globals.html#xmlThrDefSubstituteEntitiesDefaultValue"/>
+ <function name="xmlThrDefTreeIndentString ()" link="libxml2-globals.html#xmlThrDefTreeIndentString"/>
+ <function name="xmlUCSIsAegeanNumbers ()" link="libxml2-xmlunicode.html#xmlUCSIsAegeanNumbers"/>
+ <function name="xmlUCSIsAlphabeticPresentationForms ()" link="libxml2-xmlunicode.html#xmlUCSIsAlphabeticPresentationForms"/>
+ <function name="xmlUCSIsArabic ()" link="libxml2-xmlunicode.html#xmlUCSIsArabic"/>
+ <function name="xmlUCSIsArabicPresentationFormsA ()" link="libxml2-xmlunicode.html#xmlUCSIsArabicPresentationFormsA"/>
+ <function name="xmlUCSIsArabicPresentationFormsB ()" link="libxml2-xmlunicode.html#xmlUCSIsArabicPresentationFormsB"/>
+ <function name="xmlUCSIsArmenian ()" link="libxml2-xmlunicode.html#xmlUCSIsArmenian"/>
+ <function name="xmlUCSIsArrows ()" link="libxml2-xmlunicode.html#xmlUCSIsArrows"/>
+ <function name="xmlUCSIsBasicLatin ()" link="libxml2-xmlunicode.html#xmlUCSIsBasicLatin"/>
+ <function name="xmlUCSIsBengali ()" link="libxml2-xmlunicode.html#xmlUCSIsBengali"/>
+ <function name="xmlUCSIsBlock ()" link="libxml2-xmlunicode.html#xmlUCSIsBlock"/>
+ <function name="xmlUCSIsBlockElements ()" link="libxml2-xmlunicode.html#xmlUCSIsBlockElements"/>
+ <function name="xmlUCSIsBopomofo ()" link="libxml2-xmlunicode.html#xmlUCSIsBopomofo"/>
+ <function name="xmlUCSIsBopomofoExtended ()" link="libxml2-xmlunicode.html#xmlUCSIsBopomofoExtended"/>
+ <function name="xmlUCSIsBoxDrawing ()" link="libxml2-xmlunicode.html#xmlUCSIsBoxDrawing"/>
+ <function name="xmlUCSIsBraillePatterns ()" link="libxml2-xmlunicode.html#xmlUCSIsBraillePatterns"/>
+ <function name="xmlUCSIsBuhid ()" link="libxml2-xmlunicode.html#xmlUCSIsBuhid"/>
+ <function name="xmlUCSIsByzantineMusicalSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsByzantineMusicalSymbols"/>
+ <function name="xmlUCSIsCJKCompatibility ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKCompatibility"/>
+ <function name="xmlUCSIsCJKCompatibilityForms ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKCompatibilityForms"/>
+ <function name="xmlUCSIsCJKCompatibilityIdeographs ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographs"/>
+ <function name="xmlUCSIsCJKCompatibilityIdeographsSupplement ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKCompatibilityIdeographsSupplement"/>
+ <function name="xmlUCSIsCJKRadicalsSupplement ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKRadicalsSupplement"/>
+ <function name="xmlUCSIsCJKSymbolsandPunctuation ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKSymbolsandPunctuation"/>
+ <function name="xmlUCSIsCJKUnifiedIdeographs ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographs"/>
+ <function name="xmlUCSIsCJKUnifiedIdeographsExtensionA ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionA"/>
+ <function name="xmlUCSIsCJKUnifiedIdeographsExtensionB ()" link="libxml2-xmlunicode.html#xmlUCSIsCJKUnifiedIdeographsExtensionB"/>
+ <function name="xmlUCSIsCat ()" link="libxml2-xmlunicode.html#xmlUCSIsCat"/>
+ <function name="xmlUCSIsCatC ()" link="libxml2-xmlunicode.html#xmlUCSIsCatC"/>
+ <function name="xmlUCSIsCatCc ()" link="libxml2-xmlunicode.html#xmlUCSIsCatCc"/>
+ <function name="xmlUCSIsCatCf ()" link="libxml2-xmlunicode.html#xmlUCSIsCatCf"/>
+ <function name="xmlUCSIsCatCo ()" link="libxml2-xmlunicode.html#xmlUCSIsCatCo"/>
+ <function name="xmlUCSIsCatCs ()" link="libxml2-xmlunicode.html#xmlUCSIsCatCs"/>
+ <function name="xmlUCSIsCatL ()" link="libxml2-xmlunicode.html#xmlUCSIsCatL"/>
+ <function name="xmlUCSIsCatLl ()" link="libxml2-xmlunicode.html#xmlUCSIsCatLl"/>
+ <function name="xmlUCSIsCatLm ()" link="libxml2-xmlunicode.html#xmlUCSIsCatLm"/>
+ <function name="xmlUCSIsCatLo ()" link="libxml2-xmlunicode.html#xmlUCSIsCatLo"/>
+ <function name="xmlUCSIsCatLt ()" link="libxml2-xmlunicode.html#xmlUCSIsCatLt"/>
+ <function name="xmlUCSIsCatLu ()" link="libxml2-xmlunicode.html#xmlUCSIsCatLu"/>
+ <function name="xmlUCSIsCatM ()" link="libxml2-xmlunicode.html#xmlUCSIsCatM"/>
+ <function name="xmlUCSIsCatMc ()" link="libxml2-xmlunicode.html#xmlUCSIsCatMc"/>
+ <function name="xmlUCSIsCatMe ()" link="libxml2-xmlunicode.html#xmlUCSIsCatMe"/>
+ <function name="xmlUCSIsCatMn ()" link="libxml2-xmlunicode.html#xmlUCSIsCatMn"/>
+ <function name="xmlUCSIsCatN ()" link="libxml2-xmlunicode.html#xmlUCSIsCatN"/>
+ <function name="xmlUCSIsCatNd ()" link="libxml2-xmlunicode.html#xmlUCSIsCatNd"/>
+ <function name="xmlUCSIsCatNl ()" link="libxml2-xmlunicode.html#xmlUCSIsCatNl"/>
+ <function name="xmlUCSIsCatNo ()" link="libxml2-xmlunicode.html#xmlUCSIsCatNo"/>
+ <function name="xmlUCSIsCatP ()" link="libxml2-xmlunicode.html#xmlUCSIsCatP"/>
+ <function name="xmlUCSIsCatPc ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPc"/>
+ <function name="xmlUCSIsCatPd ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPd"/>
+ <function name="xmlUCSIsCatPe ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPe"/>
+ <function name="xmlUCSIsCatPf ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPf"/>
+ <function name="xmlUCSIsCatPi ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPi"/>
+ <function name="xmlUCSIsCatPo ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPo"/>
+ <function name="xmlUCSIsCatPs ()" link="libxml2-xmlunicode.html#xmlUCSIsCatPs"/>
+ <function name="xmlUCSIsCatS ()" link="libxml2-xmlunicode.html#xmlUCSIsCatS"/>
+ <function name="xmlUCSIsCatSc ()" link="libxml2-xmlunicode.html#xmlUCSIsCatSc"/>
+ <function name="xmlUCSIsCatSk ()" link="libxml2-xmlunicode.html#xmlUCSIsCatSk"/>
+ <function name="xmlUCSIsCatSm ()" link="libxml2-xmlunicode.html#xmlUCSIsCatSm"/>
+ <function name="xmlUCSIsCatSo ()" link="libxml2-xmlunicode.html#xmlUCSIsCatSo"/>
+ <function name="xmlUCSIsCatZ ()" link="libxml2-xmlunicode.html#xmlUCSIsCatZ"/>
+ <function name="xmlUCSIsCatZl ()" link="libxml2-xmlunicode.html#xmlUCSIsCatZl"/>
+ <function name="xmlUCSIsCatZp ()" link="libxml2-xmlunicode.html#xmlUCSIsCatZp"/>
+ <function name="xmlUCSIsCatZs ()" link="libxml2-xmlunicode.html#xmlUCSIsCatZs"/>
+ <function name="xmlUCSIsCherokee ()" link="libxml2-xmlunicode.html#xmlUCSIsCherokee"/>
+ <function name="xmlUCSIsCombiningDiacriticalMarks ()" link="libxml2-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarks"/>
+ <function name="xmlUCSIsCombiningDiacriticalMarksforSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsCombiningDiacriticalMarksforSymbols"/>
+ <function name="xmlUCSIsCombiningHalfMarks ()" link="libxml2-xmlunicode.html#xmlUCSIsCombiningHalfMarks"/>
+ <function name="xmlUCSIsCombiningMarksforSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsCombiningMarksforSymbols"/>
+ <function name="xmlUCSIsControlPictures ()" link="libxml2-xmlunicode.html#xmlUCSIsControlPictures"/>
+ <function name="xmlUCSIsCurrencySymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsCurrencySymbols"/>
+ <function name="xmlUCSIsCypriotSyllabary ()" link="libxml2-xmlunicode.html#xmlUCSIsCypriotSyllabary"/>
+ <function name="xmlUCSIsCyrillic ()" link="libxml2-xmlunicode.html#xmlUCSIsCyrillic"/>
+ <function name="xmlUCSIsCyrillicSupplement ()" link="libxml2-xmlunicode.html#xmlUCSIsCyrillicSupplement"/>
+ <function name="xmlUCSIsDeseret ()" link="libxml2-xmlunicode.html#xmlUCSIsDeseret"/>
+ <function name="xmlUCSIsDevanagari ()" link="libxml2-xmlunicode.html#xmlUCSIsDevanagari"/>
+ <function name="xmlUCSIsDingbats ()" link="libxml2-xmlunicode.html#xmlUCSIsDingbats"/>
+ <function name="xmlUCSIsEnclosedAlphanumerics ()" link="libxml2-xmlunicode.html#xmlUCSIsEnclosedAlphanumerics"/>
+ <function name="xmlUCSIsEnclosedCJKLettersandMonths ()" link="libxml2-xmlunicode.html#xmlUCSIsEnclosedCJKLettersandMonths"/>
+ <function name="xmlUCSIsEthiopic ()" link="libxml2-xmlunicode.html#xmlUCSIsEthiopic"/>
+ <function name="xmlUCSIsGeneralPunctuation ()" link="libxml2-xmlunicode.html#xmlUCSIsGeneralPunctuation"/>
+ <function name="xmlUCSIsGeometricShapes ()" link="libxml2-xmlunicode.html#xmlUCSIsGeometricShapes"/>
+ <function name="xmlUCSIsGeorgian ()" link="libxml2-xmlunicode.html#xmlUCSIsGeorgian"/>
+ <function name="xmlUCSIsGothic ()" link="libxml2-xmlunicode.html#xmlUCSIsGothic"/>
+ <function name="xmlUCSIsGreek ()" link="libxml2-xmlunicode.html#xmlUCSIsGreek"/>
+ <function name="xmlUCSIsGreekExtended ()" link="libxml2-xmlunicode.html#xmlUCSIsGreekExtended"/>
+ <function name="xmlUCSIsGreekandCoptic ()" link="libxml2-xmlunicode.html#xmlUCSIsGreekandCoptic"/>
+ <function name="xmlUCSIsGujarati ()" link="libxml2-xmlunicode.html#xmlUCSIsGujarati"/>
+ <function name="xmlUCSIsGurmukhi ()" link="libxml2-xmlunicode.html#xmlUCSIsGurmukhi"/>
+ <function name="xmlUCSIsHalfwidthandFullwidthForms ()" link="libxml2-xmlunicode.html#xmlUCSIsHalfwidthandFullwidthForms"/>
+ <function name="xmlUCSIsHangulCompatibilityJamo ()" link="libxml2-xmlunicode.html#xmlUCSIsHangulCompatibilityJamo"/>
+ <function name="xmlUCSIsHangulJamo ()" link="libxml2-xmlunicode.html#xmlUCSIsHangulJamo"/>
+ <function name="xmlUCSIsHangulSyllables ()" link="libxml2-xmlunicode.html#xmlUCSIsHangulSyllables"/>
+ <function name="xmlUCSIsHanunoo ()" link="libxml2-xmlunicode.html#xmlUCSIsHanunoo"/>
+ <function name="xmlUCSIsHebrew ()" link="libxml2-xmlunicode.html#xmlUCSIsHebrew"/>
+ <function name="xmlUCSIsHighPrivateUseSurrogates ()" link="libxml2-xmlunicode.html#xmlUCSIsHighPrivateUseSurrogates"/>
+ <function name="xmlUCSIsHighSurrogates ()" link="libxml2-xmlunicode.html#xmlUCSIsHighSurrogates"/>
+ <function name="xmlUCSIsHiragana ()" link="libxml2-xmlunicode.html#xmlUCSIsHiragana"/>
+ <function name="xmlUCSIsIPAExtensions ()" link="libxml2-xmlunicode.html#xmlUCSIsIPAExtensions"/>
+ <function name="xmlUCSIsIdeographicDescriptionCharacters ()" link="libxml2-xmlunicode.html#xmlUCSIsIdeographicDescriptionCharacters"/>
+ <function name="xmlUCSIsKanbun ()" link="libxml2-xmlunicode.html#xmlUCSIsKanbun"/>
+ <function name="xmlUCSIsKangxiRadicals ()" link="libxml2-xmlunicode.html#xmlUCSIsKangxiRadicals"/>
+ <function name="xmlUCSIsKannada ()" link="libxml2-xmlunicode.html#xmlUCSIsKannada"/>
+ <function name="xmlUCSIsKatakana ()" link="libxml2-xmlunicode.html#xmlUCSIsKatakana"/>
+ <function name="xmlUCSIsKatakanaPhoneticExtensions ()" link="libxml2-xmlunicode.html#xmlUCSIsKatakanaPhoneticExtensions"/>
+ <function name="xmlUCSIsKhmer ()" link="libxml2-xmlunicode.html#xmlUCSIsKhmer"/>
+ <function name="xmlUCSIsKhmerSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsKhmerSymbols"/>
+ <function name="xmlUCSIsLao ()" link="libxml2-xmlunicode.html#xmlUCSIsLao"/>
+ <function name="xmlUCSIsLatin1Supplement ()" link="libxml2-xmlunicode.html#xmlUCSIsLatin1Supplement"/>
+ <function name="xmlUCSIsLatinExtendedA ()" link="libxml2-xmlunicode.html#xmlUCSIsLatinExtendedA"/>
+ <function name="xmlUCSIsLatinExtendedAdditional ()" link="libxml2-xmlunicode.html#xmlUCSIsLatinExtendedAdditional"/>
+ <function name="xmlUCSIsLatinExtendedB ()" link="libxml2-xmlunicode.html#xmlUCSIsLatinExtendedB"/>
+ <function name="xmlUCSIsLetterlikeSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsLetterlikeSymbols"/>
+ <function name="xmlUCSIsLimbu ()" link="libxml2-xmlunicode.html#xmlUCSIsLimbu"/>
+ <function name="xmlUCSIsLinearBIdeograms ()" link="libxml2-xmlunicode.html#xmlUCSIsLinearBIdeograms"/>
+ <function name="xmlUCSIsLinearBSyllabary ()" link="libxml2-xmlunicode.html#xmlUCSIsLinearBSyllabary"/>
+ <function name="xmlUCSIsLowSurrogates ()" link="libxml2-xmlunicode.html#xmlUCSIsLowSurrogates"/>
+ <function name="xmlUCSIsMalayalam ()" link="libxml2-xmlunicode.html#xmlUCSIsMalayalam"/>
+ <function name="xmlUCSIsMathematicalAlphanumericSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsMathematicalAlphanumericSymbols"/>
+ <function name="xmlUCSIsMathematicalOperators ()" link="libxml2-xmlunicode.html#xmlUCSIsMathematicalOperators"/>
+ <function name="xmlUCSIsMiscellaneousMathematicalSymbolsA ()" link="libxml2-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsA"/>
+ <function name="xmlUCSIsMiscellaneousMathematicalSymbolsB ()" link="libxml2-xmlunicode.html#xmlUCSIsMiscellaneousMathematicalSymbolsB"/>
+ <function name="xmlUCSIsMiscellaneousSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsMiscellaneousSymbols"/>
+ <function name="xmlUCSIsMiscellaneousSymbolsandArrows ()" link="libxml2-xmlunicode.html#xmlUCSIsMiscellaneousSymbolsandArrows"/>
+ <function name="xmlUCSIsMiscellaneousTechnical ()" link="libxml2-xmlunicode.html#xmlUCSIsMiscellaneousTechnical"/>
+ <function name="xmlUCSIsMongolian ()" link="libxml2-xmlunicode.html#xmlUCSIsMongolian"/>
+ <function name="xmlUCSIsMusicalSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsMusicalSymbols"/>
+ <function name="xmlUCSIsMyanmar ()" link="libxml2-xmlunicode.html#xmlUCSIsMyanmar"/>
+ <function name="xmlUCSIsNumberForms ()" link="libxml2-xmlunicode.html#xmlUCSIsNumberForms"/>
+ <function name="xmlUCSIsOgham ()" link="libxml2-xmlunicode.html#xmlUCSIsOgham"/>
+ <function name="xmlUCSIsOldItalic ()" link="libxml2-xmlunicode.html#xmlUCSIsOldItalic"/>
+ <function name="xmlUCSIsOpticalCharacterRecognition ()" link="libxml2-xmlunicode.html#xmlUCSIsOpticalCharacterRecognition"/>
+ <function name="xmlUCSIsOriya ()" link="libxml2-xmlunicode.html#xmlUCSIsOriya"/>
+ <function name="xmlUCSIsOsmanya ()" link="libxml2-xmlunicode.html#xmlUCSIsOsmanya"/>
+ <function name="xmlUCSIsPhoneticExtensions ()" link="libxml2-xmlunicode.html#xmlUCSIsPhoneticExtensions"/>
+ <function name="xmlUCSIsPrivateUse ()" link="libxml2-xmlunicode.html#xmlUCSIsPrivateUse"/>
+ <function name="xmlUCSIsPrivateUseArea ()" link="libxml2-xmlunicode.html#xmlUCSIsPrivateUseArea"/>
+ <function name="xmlUCSIsRunic ()" link="libxml2-xmlunicode.html#xmlUCSIsRunic"/>
+ <function name="xmlUCSIsShavian ()" link="libxml2-xmlunicode.html#xmlUCSIsShavian"/>
+ <function name="xmlUCSIsSinhala ()" link="libxml2-xmlunicode.html#xmlUCSIsSinhala"/>
+ <function name="xmlUCSIsSmallFormVariants ()" link="libxml2-xmlunicode.html#xmlUCSIsSmallFormVariants"/>
+ <function name="xmlUCSIsSpacingModifierLetters ()" link="libxml2-xmlunicode.html#xmlUCSIsSpacingModifierLetters"/>
+ <function name="xmlUCSIsSpecials ()" link="libxml2-xmlunicode.html#xmlUCSIsSpecials"/>
+ <function name="xmlUCSIsSuperscriptsandSubscripts ()" link="libxml2-xmlunicode.html#xmlUCSIsSuperscriptsandSubscripts"/>
+ <function name="xmlUCSIsSupplementalArrowsA ()" link="libxml2-xmlunicode.html#xmlUCSIsSupplementalArrowsA"/>
+ <function name="xmlUCSIsSupplementalArrowsB ()" link="libxml2-xmlunicode.html#xmlUCSIsSupplementalArrowsB"/>
+ <function name="xmlUCSIsSupplementalMathematicalOperators ()" link="libxml2-xmlunicode.html#xmlUCSIsSupplementalMathematicalOperators"/>
+ <function name="xmlUCSIsSupplementaryPrivateUseAreaA ()" link="libxml2-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaA"/>
+ <function name="xmlUCSIsSupplementaryPrivateUseAreaB ()" link="libxml2-xmlunicode.html#xmlUCSIsSupplementaryPrivateUseAreaB"/>
+ <function name="xmlUCSIsSyriac ()" link="libxml2-xmlunicode.html#xmlUCSIsSyriac"/>
+ <function name="xmlUCSIsTagalog ()" link="libxml2-xmlunicode.html#xmlUCSIsTagalog"/>
+ <function name="xmlUCSIsTagbanwa ()" link="libxml2-xmlunicode.html#xmlUCSIsTagbanwa"/>
+ <function name="xmlUCSIsTags ()" link="libxml2-xmlunicode.html#xmlUCSIsTags"/>
+ <function name="xmlUCSIsTaiLe ()" link="libxml2-xmlunicode.html#xmlUCSIsTaiLe"/>
+ <function name="xmlUCSIsTaiXuanJingSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsTaiXuanJingSymbols"/>
+ <function name="xmlUCSIsTamil ()" link="libxml2-xmlunicode.html#xmlUCSIsTamil"/>
+ <function name="xmlUCSIsTelugu ()" link="libxml2-xmlunicode.html#xmlUCSIsTelugu"/>
+ <function name="xmlUCSIsThaana ()" link="libxml2-xmlunicode.html#xmlUCSIsThaana"/>
+ <function name="xmlUCSIsThai ()" link="libxml2-xmlunicode.html#xmlUCSIsThai"/>
+ <function name="xmlUCSIsTibetan ()" link="libxml2-xmlunicode.html#xmlUCSIsTibetan"/>
+ <function name="xmlUCSIsUgaritic ()" link="libxml2-xmlunicode.html#xmlUCSIsUgaritic"/>
+ <function name="xmlUCSIsUnifiedCanadianAboriginalSyllabics ()" link="libxml2-xmlunicode.html#xmlUCSIsUnifiedCanadianAboriginalSyllabics"/>
+ <function name="xmlUCSIsVariationSelectors ()" link="libxml2-xmlunicode.html#xmlUCSIsVariationSelectors"/>
+ <function name="xmlUCSIsVariationSelectorsSupplement ()" link="libxml2-xmlunicode.html#xmlUCSIsVariationSelectorsSupplement"/>
+ <function name="xmlUCSIsYiRadicals ()" link="libxml2-xmlunicode.html#xmlUCSIsYiRadicals"/>
+ <function name="xmlUCSIsYiSyllables ()" link="libxml2-xmlunicode.html#xmlUCSIsYiSyllables"/>
+ <function name="xmlUCSIsYijingHexagramSymbols ()" link="libxml2-xmlunicode.html#xmlUCSIsYijingHexagramSymbols"/>
+ <function name="xmlURIEscape ()" link="libxml2-uri.html#xmlURIEscape"/>
+ <function name="xmlURIEscapeStr ()" link="libxml2-uri.html#xmlURIEscapeStr"/>
+ <function name="xmlURIUnescapeString ()" link="libxml2-uri.html#xmlURIUnescapeString"/>
+ <function name="xmlUTF8Charcmp ()" link="libxml2-xmlstring.html#xmlUTF8Charcmp"/>
+ <function name="xmlUTF8Size ()" link="libxml2-xmlstring.html#xmlUTF8Size"/>
+ <function name="xmlUTF8Strlen ()" link="libxml2-xmlstring.html#xmlUTF8Strlen"/>
+ <function name="xmlUTF8Strloc ()" link="libxml2-xmlstring.html#xmlUTF8Strloc"/>
+ <function name="xmlUTF8Strndup ()" link="libxml2-xmlstring.html#xmlUTF8Strndup"/>
+ <function name="xmlUTF8Strpos ()" link="libxml2-xmlstring.html#xmlUTF8Strpos"/>
+ <function name="xmlUTF8Strsize ()" link="libxml2-xmlstring.html#xmlUTF8Strsize"/>
+ <function name="xmlUTF8Strsub ()" link="libxml2-xmlstring.html#xmlUTF8Strsub"/>
+ <function name="xmlUnlinkNode ()" link="libxml2-tree.html#xmlUnlinkNode"/>
+ <function name="xmlUnlockLibrary ()" link="libxml2-threads.html#xmlUnlockLibrary"/>
+ <function name="xmlUnsetNsProp ()" link="libxml2-tree.html#xmlUnsetNsProp"/>
+ <function name="xmlUnsetProp ()" link="libxml2-tree.html#xmlUnsetProp"/>
+ <function name="xmlValidBuildContentModel ()" link="libxml2-valid.html#xmlValidBuildContentModel"/>
+ <function name="xmlValidCtxtNormalizeAttributeValue ()" link="libxml2-valid.html#xmlValidCtxtNormalizeAttributeValue"/>
+ <function name="xmlValidGetPotentialChildren ()" link="libxml2-valid.html#xmlValidGetPotentialChildren"/>
+ <function name="xmlValidGetValidElements ()" link="libxml2-valid.html#xmlValidGetValidElements"/>
+ <function name="xmlValidNormalizeAttributeValue ()" link="libxml2-valid.html#xmlValidNormalizeAttributeValue"/>
+ <function name="xmlValidateAttributeDecl ()" link="libxml2-valid.html#xmlValidateAttributeDecl"/>
+ <function name="xmlValidateAttributeValue ()" link="libxml2-valid.html#xmlValidateAttributeValue"/>
+ <function name="xmlValidateDocument ()" link="libxml2-valid.html#xmlValidateDocument"/>
+ <function name="xmlValidateDocumentFinal ()" link="libxml2-valid.html#xmlValidateDocumentFinal"/>
+ <function name="xmlValidateDtd ()" link="libxml2-valid.html#xmlValidateDtd"/>
+ <function name="xmlValidateDtdFinal ()" link="libxml2-valid.html#xmlValidateDtdFinal"/>
+ <function name="xmlValidateElement ()" link="libxml2-valid.html#xmlValidateElement"/>
+ <function name="xmlValidateElementDecl ()" link="libxml2-valid.html#xmlValidateElementDecl"/>
+ <function name="xmlValidateNCName ()" link="libxml2-tree.html#xmlValidateNCName"/>
+ <function name="xmlValidateNMToken ()" link="libxml2-tree.html#xmlValidateNMToken"/>
+ <function name="xmlValidateName ()" link="libxml2-tree.html#xmlValidateName"/>
+ <function name="xmlValidateNameValue ()" link="libxml2-valid.html#xmlValidateNameValue"/>
+ <function name="xmlValidateNamesValue ()" link="libxml2-valid.html#xmlValidateNamesValue"/>
+ <function name="xmlValidateNmtokenValue ()" link="libxml2-valid.html#xmlValidateNmtokenValue"/>
+ <function name="xmlValidateNmtokensValue ()" link="libxml2-valid.html#xmlValidateNmtokensValue"/>
+ <function name="xmlValidateNotationDecl ()" link="libxml2-valid.html#xmlValidateNotationDecl"/>
+ <function name="xmlValidateNotationUse ()" link="libxml2-valid.html#xmlValidateNotationUse"/>
+ <function name="xmlValidateOneAttribute ()" link="libxml2-valid.html#xmlValidateOneAttribute"/>
+ <function name="xmlValidateOneElement ()" link="libxml2-valid.html#xmlValidateOneElement"/>
+ <function name="xmlValidateOneNamespace ()" link="libxml2-valid.html#xmlValidateOneNamespace"/>
+ <function name="xmlValidatePopElement ()" link="libxml2-valid.html#xmlValidatePopElement"/>
+ <function name="xmlValidatePushCData ()" link="libxml2-valid.html#xmlValidatePushCData"/>
+ <function name="xmlValidatePushElement ()" link="libxml2-valid.html#xmlValidatePushElement"/>
+ <function name="xmlValidateQName ()" link="libxml2-tree.html#xmlValidateQName"/>
+ <function name="xmlValidateRoot ()" link="libxml2-valid.html#xmlValidateRoot"/>
+ <function name="xmlXIncludeFreeContext ()" link="libxml2-xinclude.html#xmlXIncludeFreeContext"/>
+ <function name="xmlXIncludeNewContext ()" link="libxml2-xinclude.html#xmlXIncludeNewContext"/>
+ <function name="xmlXIncludeProcess ()" link="libxml2-xinclude.html#xmlXIncludeProcess"/>
+ <function name="xmlXIncludeProcessFlags ()" link="libxml2-xinclude.html#xmlXIncludeProcessFlags"/>
+ <function name="xmlXIncludeProcessFlagsData ()" link="libxml2-xinclude.html#xmlXIncludeProcessFlagsData"/>
+ <function name="xmlXIncludeProcessNode ()" link="libxml2-xinclude.html#xmlXIncludeProcessNode"/>
+ <function name="xmlXIncludeProcessTree ()" link="libxml2-xinclude.html#xmlXIncludeProcessTree"/>
+ <function name="xmlXIncludeProcessTreeFlags ()" link="libxml2-xinclude.html#xmlXIncludeProcessTreeFlags"/>
+ <function name="xmlXIncludeProcessTreeFlagsData ()" link="libxml2-xinclude.html#xmlXIncludeProcessTreeFlagsData"/>
+ <function name="xmlXIncludeSetFlags ()" link="libxml2-xinclude.html#xmlXIncludeSetFlags"/>
+ <function name="xmlXPathAddValues ()" link="libxml2-xpathInternals.html#xmlXPathAddValues"/>
+ <function name="xmlXPathBooleanFunction ()" link="libxml2-xpathInternals.html#xmlXPathBooleanFunction"/>
+ <function name="xmlXPathCastBooleanToNumber ()" link="libxml2-xpath.html#xmlXPathCastBooleanToNumber"/>
+ <function name="xmlXPathCastBooleanToString ()" link="libxml2-xpath.html#xmlXPathCastBooleanToString"/>
+ <function name="xmlXPathCastNodeSetToBoolean ()" link="libxml2-xpath.html#xmlXPathCastNodeSetToBoolean"/>
+ <function name="xmlXPathCastNodeSetToNumber ()" link="libxml2-xpath.html#xmlXPathCastNodeSetToNumber"/>
+ <function name="xmlXPathCastNodeSetToString ()" link="libxml2-xpath.html#xmlXPathCastNodeSetToString"/>
+ <function name="xmlXPathCastNodeToNumber ()" link="libxml2-xpath.html#xmlXPathCastNodeToNumber"/>
+ <function name="xmlXPathCastNodeToString ()" link="libxml2-xpath.html#xmlXPathCastNodeToString"/>
+ <function name="xmlXPathCastNumberToBoolean ()" link="libxml2-xpath.html#xmlXPathCastNumberToBoolean"/>
+ <function name="xmlXPathCastNumberToString ()" link="libxml2-xpath.html#xmlXPathCastNumberToString"/>
+ <function name="xmlXPathCastStringToBoolean ()" link="libxml2-xpath.html#xmlXPathCastStringToBoolean"/>
+ <function name="xmlXPathCastStringToNumber ()" link="libxml2-xpath.html#xmlXPathCastStringToNumber"/>
+ <function name="xmlXPathCastToBoolean ()" link="libxml2-xpath.html#xmlXPathCastToBoolean"/>
+ <function name="xmlXPathCastToNumber ()" link="libxml2-xpath.html#xmlXPathCastToNumber"/>
+ <function name="xmlXPathCastToString ()" link="libxml2-xpath.html#xmlXPathCastToString"/>
+ <function name="xmlXPathCeilingFunction ()" link="libxml2-xpathInternals.html#xmlXPathCeilingFunction"/>
+ <function name="xmlXPathCmpNodes ()" link="libxml2-xpath.html#xmlXPathCmpNodes"/>
+ <function name="xmlXPathCompareValues ()" link="libxml2-xpathInternals.html#xmlXPathCompareValues"/>
+ <function name="xmlXPathCompile ()" link="libxml2-xpath.html#xmlXPathCompile"/>
+ <function name="xmlXPathCompiledEval ()" link="libxml2-xpath.html#xmlXPathCompiledEval"/>
+ <function name="xmlXPathCompiledEvalToBoolean ()" link="libxml2-xpath.html#xmlXPathCompiledEvalToBoolean"/>
+ <function name="xmlXPathConcatFunction ()" link="libxml2-xpathInternals.html#xmlXPathConcatFunction"/>
+ <function name="xmlXPathContainsFunction ()" link="libxml2-xpathInternals.html#xmlXPathContainsFunction"/>
+ <function name="xmlXPathContextSetCache ()" link="libxml2-xpath.html#xmlXPathContextSetCache"/>
+ <function name="xmlXPathConvertBoolean ()" link="libxml2-xpath.html#xmlXPathConvertBoolean"/>
+ <function name="xmlXPathConvertNumber ()" link="libxml2-xpath.html#xmlXPathConvertNumber"/>
+ <function name="xmlXPathConvertString ()" link="libxml2-xpath.html#xmlXPathConvertString"/>
+ <function name="xmlXPathCountFunction ()" link="libxml2-xpathInternals.html#xmlXPathCountFunction"/>
+ <function name="xmlXPathCtxtCompile ()" link="libxml2-xpath.html#xmlXPathCtxtCompile"/>
+ <function name="xmlXPathDebugDumpCompExpr ()" link="libxml2-xpathInternals.html#xmlXPathDebugDumpCompExpr"/>
+ <function name="xmlXPathDebugDumpObject ()" link="libxml2-xpathInternals.html#xmlXPathDebugDumpObject"/>
+ <function name="xmlXPathDifference ()" link="libxml2-xpathInternals.html#xmlXPathDifference"/>
+ <function name="xmlXPathDistinct ()" link="libxml2-xpathInternals.html#xmlXPathDistinct"/>
+ <function name="xmlXPathDistinctSorted ()" link="libxml2-xpathInternals.html#xmlXPathDistinctSorted"/>
+ <function name="xmlXPathDivValues ()" link="libxml2-xpathInternals.html#xmlXPathDivValues"/>
+ <function name="xmlXPathEqualValues ()" link="libxml2-xpathInternals.html#xmlXPathEqualValues"/>
+ <function name="xmlXPathErr ()" link="libxml2-xpathInternals.html#xmlXPathErr"/>
+ <function name="xmlXPathEval ()" link="libxml2-xpath.html#xmlXPathEval"/>
+ <function name="xmlXPathEvalExpr ()" link="libxml2-xpathInternals.html#xmlXPathEvalExpr"/>
+ <function name="xmlXPathEvalExpression ()" link="libxml2-xpath.html#xmlXPathEvalExpression"/>
+ <function name="xmlXPathEvalPredicate ()" link="libxml2-xpath.html#xmlXPathEvalPredicate"/>
+ <function name="xmlXPathEvaluatePredicateResult ()" link="libxml2-xpathInternals.html#xmlXPathEvaluatePredicateResult"/>
+ <function name="xmlXPathFalseFunction ()" link="libxml2-xpathInternals.html#xmlXPathFalseFunction"/>
+ <function name="xmlXPathFloorFunction ()" link="libxml2-xpathInternals.html#xmlXPathFloorFunction"/>
+ <function name="xmlXPathFreeCompExpr ()" link="libxml2-xpath.html#xmlXPathFreeCompExpr"/>
+ <function name="xmlXPathFreeContext ()" link="libxml2-xpath.html#xmlXPathFreeContext"/>
+ <function name="xmlXPathFreeNodeSet ()" link="libxml2-xpath.html#xmlXPathFreeNodeSet"/>
+ <function name="xmlXPathFreeNodeSetList ()" link="libxml2-xpath.html#xmlXPathFreeNodeSetList"/>
+ <function name="xmlXPathFreeObject ()" link="libxml2-xpath.html#xmlXPathFreeObject"/>
+ <function name="xmlXPathFreeParserContext ()" link="libxml2-xpathInternals.html#xmlXPathFreeParserContext"/>
+ <function name="xmlXPathFunctionLookup ()" link="libxml2-xpathInternals.html#xmlXPathFunctionLookup"/>
+ <function name="xmlXPathFunctionLookupNS ()" link="libxml2-xpathInternals.html#xmlXPathFunctionLookupNS"/>
+ <function name="xmlXPathHasSameNodes ()" link="libxml2-xpathInternals.html#xmlXPathHasSameNodes"/>
+ <function name="xmlXPathIdFunction ()" link="libxml2-xpathInternals.html#xmlXPathIdFunction"/>
+ <function name="xmlXPathInit ()" link="libxml2-xpath.html#xmlXPathInit"/>
+ <function name="xmlXPathIntersection ()" link="libxml2-xpathInternals.html#xmlXPathIntersection"/>
+ <function name="xmlXPathIsInf ()" link="libxml2-xpath.html#xmlXPathIsInf"/>
+ <function name="xmlXPathIsNaN ()" link="libxml2-xpath.html#xmlXPathIsNaN"/>
+ <function name="xmlXPathIsNodeType ()" link="libxml2-xpathInternals.html#xmlXPathIsNodeType"/>
+ <function name="xmlXPathLangFunction ()" link="libxml2-xpathInternals.html#xmlXPathLangFunction"/>
+ <function name="xmlXPathLastFunction ()" link="libxml2-xpathInternals.html#xmlXPathLastFunction"/>
+ <function name="xmlXPathLeading ()" link="libxml2-xpathInternals.html#xmlXPathLeading"/>
+ <function name="xmlXPathLeadingSorted ()" link="libxml2-xpathInternals.html#xmlXPathLeadingSorted"/>
+ <function name="xmlXPathLocalNameFunction ()" link="libxml2-xpathInternals.html#xmlXPathLocalNameFunction"/>
+ <function name="xmlXPathModValues ()" link="libxml2-xpathInternals.html#xmlXPathModValues"/>
+ <function name="xmlXPathMultValues ()" link="libxml2-xpathInternals.html#xmlXPathMultValues"/>
+ <function name="xmlXPathNamespaceURIFunction ()" link="libxml2-xpathInternals.html#xmlXPathNamespaceURIFunction"/>
+ <function name="xmlXPathNewBoolean ()" link="libxml2-xpathInternals.html#xmlXPathNewBoolean"/>
+ <function name="xmlXPathNewCString ()" link="libxml2-xpathInternals.html#xmlXPathNewCString"/>
+ <function name="xmlXPathNewContext ()" link="libxml2-xpath.html#xmlXPathNewContext"/>
+ <function name="xmlXPathNewFloat ()" link="libxml2-xpathInternals.html#xmlXPathNewFloat"/>
+ <function name="xmlXPathNewNodeSet ()" link="libxml2-xpathInternals.html#xmlXPathNewNodeSet"/>
+ <function name="xmlXPathNewNodeSetList ()" link="libxml2-xpathInternals.html#xmlXPathNewNodeSetList"/>
+ <function name="xmlXPathNewParserContext ()" link="libxml2-xpathInternals.html#xmlXPathNewParserContext"/>
+ <function name="xmlXPathNewString ()" link="libxml2-xpathInternals.html#xmlXPathNewString"/>
+ <function name="xmlXPathNewValueTree ()" link="libxml2-xpathInternals.html#xmlXPathNewValueTree"/>
+ <function name="xmlXPathNextAncestor ()" link="libxml2-xpathInternals.html#xmlXPathNextAncestor"/>
+ <function name="xmlXPathNextAncestorOrSelf ()" link="libxml2-xpathInternals.html#xmlXPathNextAncestorOrSelf"/>
+ <function name="xmlXPathNextAttribute ()" link="libxml2-xpathInternals.html#xmlXPathNextAttribute"/>
+ <function name="xmlXPathNextChild ()" link="libxml2-xpathInternals.html#xmlXPathNextChild"/>
+ <function name="xmlXPathNextDescendant ()" link="libxml2-xpathInternals.html#xmlXPathNextDescendant"/>
+ <function name="xmlXPathNextDescendantOrSelf ()" link="libxml2-xpathInternals.html#xmlXPathNextDescendantOrSelf"/>
+ <function name="xmlXPathNextFollowing ()" link="libxml2-xpathInternals.html#xmlXPathNextFollowing"/>
+ <function name="xmlXPathNextFollowingSibling ()" link="libxml2-xpathInternals.html#xmlXPathNextFollowingSibling"/>
+ <function name="xmlXPathNextNamespace ()" link="libxml2-xpathInternals.html#xmlXPathNextNamespace"/>
+ <function name="xmlXPathNextParent ()" link="libxml2-xpathInternals.html#xmlXPathNextParent"/>
+ <function name="xmlXPathNextPreceding ()" link="libxml2-xpathInternals.html#xmlXPathNextPreceding"/>
+ <function name="xmlXPathNextPrecedingSibling ()" link="libxml2-xpathInternals.html#xmlXPathNextPrecedingSibling"/>
+ <function name="xmlXPathNextSelf ()" link="libxml2-xpathInternals.html#xmlXPathNextSelf"/>
+ <function name="xmlXPathNodeEval ()" link="libxml2-xpath.html#xmlXPathNodeEval"/>
+ <function name="xmlXPathNodeLeading ()" link="libxml2-xpathInternals.html#xmlXPathNodeLeading"/>
+ <function name="xmlXPathNodeLeadingSorted ()" link="libxml2-xpathInternals.html#xmlXPathNodeLeadingSorted"/>
+ <function name="xmlXPathNodeSetAdd ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetAdd"/>
+ <function name="xmlXPathNodeSetAddNs ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetAddNs"/>
+ <function name="xmlXPathNodeSetAddUnique ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetAddUnique"/>
+ <function name="xmlXPathNodeSetContains ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetContains"/>
+ <function name="xmlXPathNodeSetCreate ()" link="libxml2-xpath.html#xmlXPathNodeSetCreate"/>
+ <function name="xmlXPathNodeSetDel ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetDel"/>
+ <function name="xmlXPathNodeSetFreeNs ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetFreeNs"/>
+ <function name="xmlXPathNodeSetMerge ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetMerge"/>
+ <function name="xmlXPathNodeSetRemove ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetRemove"/>
+ <function name="xmlXPathNodeSetSort ()" link="libxml2-xpathInternals.html#xmlXPathNodeSetSort"/>
+ <function name="xmlXPathNodeTrailing ()" link="libxml2-xpathInternals.html#xmlXPathNodeTrailing"/>
+ <function name="xmlXPathNodeTrailingSorted ()" link="libxml2-xpathInternals.html#xmlXPathNodeTrailingSorted"/>
+ <function name="xmlXPathNormalizeFunction ()" link="libxml2-xpathInternals.html#xmlXPathNormalizeFunction"/>
+ <function name="xmlXPathNotEqualValues ()" link="libxml2-xpathInternals.html#xmlXPathNotEqualValues"/>
+ <function name="xmlXPathNotFunction ()" link="libxml2-xpathInternals.html#xmlXPathNotFunction"/>
+ <function name="xmlXPathNsLookup ()" link="libxml2-xpathInternals.html#xmlXPathNsLookup"/>
+ <function name="xmlXPathNumberFunction ()" link="libxml2-xpathInternals.html#xmlXPathNumberFunction"/>
+ <function name="xmlXPathObjectCopy ()" link="libxml2-xpath.html#xmlXPathObjectCopy"/>
+ <function name="xmlXPathOrderDocElems ()" link="libxml2-xpath.html#xmlXPathOrderDocElems"/>
+ <function name="xmlXPathParseNCName ()" link="libxml2-xpathInternals.html#xmlXPathParseNCName"/>
+ <function name="xmlXPathParseName ()" link="libxml2-xpathInternals.html#xmlXPathParseName"/>
+ <function name="xmlXPathPopBoolean ()" link="libxml2-xpathInternals.html#xmlXPathPopBoolean"/>
+ <function name="xmlXPathPopExternal ()" link="libxml2-xpathInternals.html#xmlXPathPopExternal"/>
+ <function name="xmlXPathPopNodeSet ()" link="libxml2-xpathInternals.html#xmlXPathPopNodeSet"/>
+ <function name="xmlXPathPopNumber ()" link="libxml2-xpathInternals.html#xmlXPathPopNumber"/>
+ <function name="xmlXPathPopString ()" link="libxml2-xpathInternals.html#xmlXPathPopString"/>
+ <function name="xmlXPathPositionFunction ()" link="libxml2-xpathInternals.html#xmlXPathPositionFunction"/>
+ <function name="xmlXPathRegisterAllFunctions ()" link="libxml2-xpathInternals.html#xmlXPathRegisterAllFunctions"/>
+ <function name="xmlXPathRegisterFunc ()" link="libxml2-xpathInternals.html#xmlXPathRegisterFunc"/>
+ <function name="xmlXPathRegisterFuncLookup ()" link="libxml2-xpathInternals.html#xmlXPathRegisterFuncLookup"/>
+ <function name="xmlXPathRegisterFuncNS ()" link="libxml2-xpathInternals.html#xmlXPathRegisterFuncNS"/>
+ <function name="xmlXPathRegisterNs ()" link="libxml2-xpathInternals.html#xmlXPathRegisterNs"/>
+ <function name="xmlXPathRegisterVariable ()" link="libxml2-xpathInternals.html#xmlXPathRegisterVariable"/>
+ <function name="xmlXPathRegisterVariableLookup ()" link="libxml2-xpathInternals.html#xmlXPathRegisterVariableLookup"/>
+ <function name="xmlXPathRegisterVariableNS ()" link="libxml2-xpathInternals.html#xmlXPathRegisterVariableNS"/>
+ <function name="xmlXPathRegisteredFuncsCleanup ()" link="libxml2-xpathInternals.html#xmlXPathRegisteredFuncsCleanup"/>
+ <function name="xmlXPathRegisteredNsCleanup ()" link="libxml2-xpathInternals.html#xmlXPathRegisteredNsCleanup"/>
+ <function name="xmlXPathRegisteredVariablesCleanup ()" link="libxml2-xpathInternals.html#xmlXPathRegisteredVariablesCleanup"/>
+ <function name="xmlXPathRoot ()" link="libxml2-xpathInternals.html#xmlXPathRoot"/>
+ <function name="xmlXPathRoundFunction ()" link="libxml2-xpathInternals.html#xmlXPathRoundFunction"/>
+ <function name="xmlXPathSetContextNode ()" link="libxml2-xpath.html#xmlXPathSetContextNode"/>
+ <function name="xmlXPathStartsWithFunction ()" link="libxml2-xpathInternals.html#xmlXPathStartsWithFunction"/>
+ <function name="xmlXPathStringEvalNumber ()" link="libxml2-xpathInternals.html#xmlXPathStringEvalNumber"/>
+ <function name="xmlXPathStringFunction ()" link="libxml2-xpathInternals.html#xmlXPathStringFunction"/>
+ <function name="xmlXPathStringLengthFunction ()" link="libxml2-xpathInternals.html#xmlXPathStringLengthFunction"/>
+ <function name="xmlXPathSubValues ()" link="libxml2-xpathInternals.html#xmlXPathSubValues"/>
+ <function name="xmlXPathSubstringAfterFunction ()" link="libxml2-xpathInternals.html#xmlXPathSubstringAfterFunction"/>
+ <function name="xmlXPathSubstringBeforeFunction ()" link="libxml2-xpathInternals.html#xmlXPathSubstringBeforeFunction"/>
+ <function name="xmlXPathSubstringFunction ()" link="libxml2-xpathInternals.html#xmlXPathSubstringFunction"/>
+ <function name="xmlXPathSumFunction ()" link="libxml2-xpathInternals.html#xmlXPathSumFunction"/>
+ <function name="xmlXPathTrailing ()" link="libxml2-xpathInternals.html#xmlXPathTrailing"/>
+ <function name="xmlXPathTrailingSorted ()" link="libxml2-xpathInternals.html#xmlXPathTrailingSorted"/>
+ <function name="xmlXPathTranslateFunction ()" link="libxml2-xpathInternals.html#xmlXPathTranslateFunction"/>
+ <function name="xmlXPathTrueFunction ()" link="libxml2-xpathInternals.html#xmlXPathTrueFunction"/>
+ <function name="xmlXPathValueFlipSign ()" link="libxml2-xpathInternals.html#xmlXPathValueFlipSign"/>
+ <function name="xmlXPathVariableLookup ()" link="libxml2-xpathInternals.html#xmlXPathVariableLookup"/>
+ <function name="xmlXPathVariableLookupNS ()" link="libxml2-xpathInternals.html#xmlXPathVariableLookupNS"/>
+ <function name="xmlXPathWrapCString ()" link="libxml2-xpathInternals.html#xmlXPathWrapCString"/>
+ <function name="xmlXPathWrapExternal ()" link="libxml2-xpathInternals.html#xmlXPathWrapExternal"/>
+ <function name="xmlXPathWrapNodeSet ()" link="libxml2-xpathInternals.html#xmlXPathWrapNodeSet"/>
+ <function name="xmlXPathWrapString ()" link="libxml2-xpathInternals.html#xmlXPathWrapString"/>
+ <function name="xmlXPatherror ()" link="libxml2-xpathInternals.html#xmlXPatherror"/>
+ <function name="xmlXPtrBuildNodeList ()" link="libxml2-xpointer.html#xmlXPtrBuildNodeList"/>
+ <function name="xmlXPtrEval ()" link="libxml2-xpointer.html#xmlXPtrEval"/>
+ <function name="xmlXPtrEvalRangePredicate ()" link="libxml2-xpointer.html#xmlXPtrEvalRangePredicate"/>
+ <function name="xmlXPtrFreeLocationSet ()" link="libxml2-xpointer.html#xmlXPtrFreeLocationSet"/>
+ <function name="xmlXPtrLocationSetAdd ()" link="libxml2-xpointer.html#xmlXPtrLocationSetAdd"/>
+ <function name="xmlXPtrLocationSetCreate ()" link="libxml2-xpointer.html#xmlXPtrLocationSetCreate"/>
+ <function name="xmlXPtrLocationSetDel ()" link="libxml2-xpointer.html#xmlXPtrLocationSetDel"/>
+ <function name="xmlXPtrLocationSetMerge ()" link="libxml2-xpointer.html#xmlXPtrLocationSetMerge"/>
+ <function name="xmlXPtrLocationSetRemove ()" link="libxml2-xpointer.html#xmlXPtrLocationSetRemove"/>
+ <function name="xmlXPtrNewCollapsedRange ()" link="libxml2-xpointer.html#xmlXPtrNewCollapsedRange"/>
+ <function name="xmlXPtrNewContext ()" link="libxml2-xpointer.html#xmlXPtrNewContext"/>
+ <function name="xmlXPtrNewLocationSetNodeSet ()" link="libxml2-xpointer.html#xmlXPtrNewLocationSetNodeSet"/>
+ <function name="xmlXPtrNewLocationSetNodes ()" link="libxml2-xpointer.html#xmlXPtrNewLocationSetNodes"/>
+ <function name="xmlXPtrNewRange ()" link="libxml2-xpointer.html#xmlXPtrNewRange"/>
+ <function name="xmlXPtrNewRangeNodeObject ()" link="libxml2-xpointer.html#xmlXPtrNewRangeNodeObject"/>
+ <function name="xmlXPtrNewRangeNodePoint ()" link="libxml2-xpointer.html#xmlXPtrNewRangeNodePoint"/>
+ <function name="xmlXPtrNewRangeNodes ()" link="libxml2-xpointer.html#xmlXPtrNewRangeNodes"/>
+ <function name="xmlXPtrNewRangePointNode ()" link="libxml2-xpointer.html#xmlXPtrNewRangePointNode"/>
+ <function name="xmlXPtrNewRangePoints ()" link="libxml2-xpointer.html#xmlXPtrNewRangePoints"/>
+ <function name="xmlXPtrRangeToFunction ()" link="libxml2-xpointer.html#xmlXPtrRangeToFunction"/>
+ <function name="xmlXPtrWrapLocationSet ()" link="libxml2-xpointer.html#xmlXPtrWrapLocationSet"/>
+ </functions>
+</book>
diff --git a/doc/devhelp/right.png b/doc/devhelp/right.png
new file mode 100644
index 0000000..92832e3
--- /dev/null
+++ b/doc/devhelp/right.png
Binary files differ
diff --git a/doc/devhelp/style.css b/doc/devhelp/style.css
new file mode 100644
index 0000000..c9cabe7
--- /dev/null
+++ b/doc/devhelp/style.css
@@ -0,0 +1,66 @@
+.synopsis, .classsynopsis
+{
+ background: #eeeeee;
+ border: solid 1px #aaaaaa;
+ padding: 0.5em;
+}
+.programlisting
+{
+ background: #eeeeff;
+ border: solid 1px #aaaaff;
+ padding: 0.5em;
+}
+.variablelist
+{
+ padding: 4px;
+ margin-left: 3em;
+}
+.variablelist td:first-child
+{
+ vertical-align: top;
+}
+table.navigation
+{
+ background: #ffeeee;
+ border: solid 1px #ffaaaa;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+.navigation a
+{
+ color: #770000;
+}
+.navigation a:visited
+{
+ color: #550000;
+}
+.navigation .title
+{
+ font-size: 200%;
+}
+div.refnamediv
+{
+ margin-top: 2em;
+}
+div.gallery-float
+{
+ float: left;
+ padding: 10px;
+}
+div.gallery-float img
+{
+ border-style: none;
+}
+div.gallery-spacer
+{
+ clear: both;
+}
+a
+{
+ text-decoration: none;
+}
+a:hover
+{
+ text-decoration: underline;
+ color: #FF0000;
+}
diff --git a/doc/devhelp/up.png b/doc/devhelp/up.png
new file mode 100644
index 0000000..85b3e2a
--- /dev/null
+++ b/doc/devhelp/up.png
Binary files differ
diff --git a/doc/docs.html b/doc/docs.html
new file mode 100644
index 0000000..dd59a37
--- /dev/null
+++ b/doc/docs.html
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Developer Menu</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Developer Menu</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>There are several on-line resources related to using libxml:</p><ol>
+ <li>Use the <a href="search.php">search engine</a> to look up
+ information.</li>
+ <li>Check the <a href="FAQ.html">FAQ.</a></li>
+ <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
+ documentation</a> automatically extracted from code comments.</li>
+ <li>Look at the documentation about <a href="encoding.html">libxml
+ internationalization support</a>.</li>
+ <li>This page provides a global overview and <a href="example.html">some
+ examples</a> on how to use libxml.</li>
+ <li><a href="examples/index.html">Code examples</a></li>
+ <li>John Fleck's libxml2 tutorial: <a href="tutorial/index.html">html</a>
+ or <a href="tutorial/xmltutorial.pdf">pdf</a>.</li>
+ <li>If you need to parse large files, check the <a href="xmlreader.html">xmlReader</a> API tutorial</li>
+ <li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">some nice
+ documentation</a> explaining how to use the libxml SAX interface.</li>
+ <li>George Lebl wrote <a href="http://www-106.ibm.com/developerworks/library/l-gnome3/">an article
+ for IBM developerWorks</a> about using libxml.</li>
+ <li>Check <a href="http://svn.gnome.org/viewvc/libxml2/trunk/TODO?view=markup">the TODO
+ file</a>.</li>
+ <li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a>
+ description. If you are starting a new project using libxml you should
+ really use the 2.x version.</li>
+ <li>And don't forget to look at the <a href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li>
+</ol><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/downloads.html b/doc/downloads.html
new file mode 100644
index 0000000..20f9e57
--- /dev/null
+++ b/doc/downloads.html
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libxml2 can be found on the <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> server ( <a href="ftp://xmlsoft.org/libxml2/">FTP</a> and rsync are available), there are also
+mirrors (<a href="ftp://fr.rpmfind.net/pub/libxml/">France</a> and
+Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
+mirror in Austria</a>). (NOTE that you need both the <a href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
+packages installed to compile applications using libxml if using RPMs.)</p><p>You can find all the history of libxml(2) and libxslt releases in the <a href="http://xmlsoft.org/sources/old/">old</a> directory. The precompiled
+Windows binaries made by Igor Zlatovic are available in the <a href="http://xmlsoft.org/sources/win32/">win32</a> directory.</p><p>Binary ports:</p><ul>
+ <li>RPMs for x86_64 are available directly on <a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>, the source RPM will compile on
+ any architecture supported.</li>
+ <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the
+ maintainer of the Windows port, <a href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
+ binaries</a>.</li>
+ <li>OpenCSW provides <a href="http://opencsw.org/packages/libxml2">Solaris
+ binaries</a>.</li>
+ <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> provides <a href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X
+ binaries</a>.</li>
+ <li>The HP-UX porting center provides <a href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li>
+ <li>Bull provides precompiled <a href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as
+ patr of their GNOME packages</li>
+</ul><p>If you know other supported binary ports, please <a href="http://veillard.com/">contact me</a>.</p><p><a name="Snapshot" id="Snapshot">Snapshot:</a></p><ul>
+ <li>Code from the GNOME GIT base libxml2 module, updated hourly <a href="ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz">libxml2-git-snapshot.tar.gz</a>.</li>
+ <li>Docs, content of the web site, the list archive included <a href="ftp://xmlsoft.org/libxml2/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
+</ul><p><a name="Contribs" id="Contribs">Contributions:</a></p><p>I do accept external contributions, especially if compiling on another
+platform, get in touch with the list to upload the package, wrappers for
+various languages have been provided, and can be found in the <a href="python.html">bindings section</a></p><p>Libxml2 is also available from GIT:</p><ul>
+ <li><p>See <a href="http://git.gnome.org/browse/libxml2/">libxml2 Git web</a>.
+ To checkout a local tree use:</p>
+ <pre>git clone git://git.gnome.org/libxml2</pre>
+ </li>
+ <li>The <strong>libxslt</strong> module is also present
+ <a href="http://git.gnome.org/browse/libxslt/">there</a>.</li>
+</ul><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/elfgcchack.xsl b/doc/elfgcchack.xsl
new file mode 100644
index 0000000..9b1a9bc
--- /dev/null
+++ b/doc/elfgcchack.xsl
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ version="1.0">
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:template match="/">
+ <xsl:text>/*
+ * elfgcchack.h: hack by Arjan van de Ven &lt;arjanv@redhat.com&gt; to speed
+ * up the code when using gcc for call within the library.
+ *
+ * Based on the analysis http://people.redhat.com/drepper/dsohowto.pdf
+ * from Ulrich drepper. Rewritten to be generated from the XML description
+ * file for libxml2 API
+ * autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
+ */
+
+#ifdef IN_LIBXML
+#ifdef __GNUC__
+#ifdef PIC
+#ifdef linux
+#if (__GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+
+#include "libxml/c14n.h"
+#include "libxml/catalog.h"
+#include "libxml/chvalid.h"
+#include "libxml/debugXML.h"
+#include "libxml/dict.h"
+#include "libxml/DOCBparser.h"
+#include "libxml/encoding.h"
+#include "libxml/entities.h"
+#include "libxml/globals.h"
+#include "libxml/hash.h"
+#include "libxml/HTMLparser.h"
+#include "libxml/HTMLtree.h"
+#include "libxml/list.h"
+#include "libxml/nanoftp.h"
+#include "libxml/nanohttp.h"
+#include "libxml/parser.h"
+#include "libxml/parserInternals.h"
+#include "libxml/pattern.h"
+#include "libxml/relaxng.h"
+#include "libxml/SAX2.h"
+#include "libxml/SAX.h"
+#include "libxml/schemasInternals.h"
+#include "libxml/schematron.h"
+#include "libxml/threads.h"
+#include "libxml/tree.h"
+#include "libxml/uri.h"
+#include "libxml/valid.h"
+#include "libxml/xinclude.h"
+#include "libxml/xlink.h"
+#include "libxml/xmlautomata.h"
+#include "libxml/xmlerror.h"
+#include "libxml/xmlexports.h"
+#include "libxml/xmlIO.h"
+#include "libxml/xmlmemory.h"
+#include "libxml/xmlreader.h"
+#include "libxml/xmlregexp.h"
+#include "libxml/xmlsave.h"
+#include "libxml/xmlschemas.h"
+#include "libxml/xmlschemastypes.h"
+#include "libxml/xmlstring.h"
+#include "libxml/xmlunicode.h"
+#include "libxml/xmlversion.h"
+#include "libxml/xmlwriter.h"
+#include "libxml/xpath.h"
+#include "libxml/xpathInternals.h"
+#include "libxml/xpointer.h"
+#include "libxml/xmlmodule.h"
+
+/* special hot spot not exported ones */
+
+#ifdef bottom_globals
+#undef __xmlGenericError
+extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
+#else
+#ifndef __xmlGenericError
+extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
+#define __xmlGenericError __xmlGenericError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef __xmlGenericErrorContext
+extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
+#else
+#ifndef __xmlGenericErrorContext
+extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
+#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
+#endif
+#endif
+
+/* list generated from libxml2-api.xml */
+</xsl:text>
+ <xsl:apply-templates select="/api/symbols/function"/>
+ <xsl:text>
+#endif
+#endif
+#endif
+#endif
+#endif
+
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="function">
+ <xsl:variable name="str" select="string(@name)"/>
+ <xsl:if test="(starts-with(@name, 'xml') or starts-with(@name, 'html') or contains(@name, 'Push') or contains(@name, 'Pop')) and (not(contains(@name, 'xmlDllMain')))">
+ <xsl:variable name="alias" select="concat($str, '__internal_alias')"/>
+ <xsl:apply-templates select="cond"/>
+ <xsl:text>#ifdef bottom_</xsl:text>
+ <xsl:value-of select="string(@module)"/>
+ <xsl:text>
+#undef </xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text>
+extern __typeof (</xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text>) </xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text> __attribute((alias("</xsl:text>
+ <xsl:value-of select="$alias"/>
+ <xsl:text>")));
+#else
+#ifndef </xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text>
+</xsl:text>
+ <xsl:text>extern __typeof (</xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text>) </xsl:text>
+ <xsl:value-of select="$alias"/>
+ <xsl:text> __attribute((visibility("hidden")));
+</xsl:text>
+ <xsl:text>#define </xsl:text>
+ <xsl:value-of select="$str"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$alias"/>
+ <xsl:text>
+#endif
+#endif
+</xsl:text>
+ <xsl:apply-templates select="cond" mode="end"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template match="cond">
+ <xsl:text>#if </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="cond" mode="end">
+ <xsl:text>#endif
+</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/doc/encoding.html b/doc/encoding.html
new file mode 100644
index 0000000..7c7953f
--- /dev/null
+++ b/doc/encoding.html
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Encodings support</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Encodings support</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>If you are not really familiar with Internationalization (usual shortcut
+is I18N) , Unicode, characters and glyphs, I suggest you read a <a href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a>
+by Tim Bray on Unicode and why you should care about it.</p><p>If you don't understand why <b>it does not make sense to have a string
+without knowing what encoding it uses</b>, then as Joel Spolsky said <a href="http://www.joelonsoftware.com/articles/Unicode.html">please do not
+write another line of code until you finish reading that article.</a>. It is
+a prerequisite to understand this page, and avoid a lot of problems with
+libxml2, XML or text processing in general.</p><p>Table of Content:</p><ol>
+ <li><a href="encoding.html#What">What does internationalization support
+ mean ?</a></li>
+ <li><a href="encoding.html#internal">The internal encoding, how and
+ why</a></li>
+ <li><a href="encoding.html#implemente">How is it implemented ?</a></li>
+ <li><a href="encoding.html#Default">Default supported encodings</a></li>
+ <li><a href="encoding.html#extend">How to extend the existing
+ support</a></li>
+</ol><h3><a name="What" id="What">What does internationalization support mean ?</a></h3><p>XML was designed from the start to allow the support of any character set
+by using Unicode. Any conformant XML parser has to support the UTF-8 and
+UTF-16 default encodings which can both express the full unicode ranges. UTF8
+is a variable length encoding whose greatest points are to reuse the same
+encoding for ASCII and to save space for Western encodings, but it is a bit
+more complex to handle in practice. UTF-16 use 2 bytes per character (and
+sometimes combines two pairs), it makes implementation easier, but looks a
+bit overkill for Western languages encoding. Moreover the XML specification
+allows the document to be encoded in other encodings at the condition that
+they are clearly labeled as such. For example the following is a wellformed
+XML document encoded in ISO-8859-1 and using accentuated letters that we
+French like for both markup and content:</p><pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
+&lt;très&gt;là &lt;/très&gt;</pre><p>Having internationalization support in libxml2 means the following:</p><ul>
+ <li>the document is properly parsed</li>
+ <li>information about it's encoding is saved</li>
+ <li>it can be modified</li>
+ <li>it can be saved in its original encoding</li>
+ <li>it can also be saved in another encoding supported by libxml2 (for
+ example straight UTF8 or even an ASCII form)</li>
+</ul><p>Another very important point is that the whole libxml2 API, with the
+exception of a few routines to read with a specific encoding or save to a
+specific encoding, is completely agnostic about the original encoding of the
+document.</p><p>It should be noted too that the HTML parser embedded in libxml2 now obey
+the same rules too, the following document will be (as of 2.2.2) handled in
+an internationalized fashion by libxml2 too:</p><pre>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd"&gt;
+&lt;html lang="fr"&gt;
+&lt;head&gt;
+ &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;W3C crée des standards pour le Web.&lt;/body&gt;
+&lt;/html&gt;</pre><h3><a name="internal" id="internal">The internal encoding, how and why</a></h3><p>One of the core decisions was to force all documents to be converted to a
+default internal encoding, and that encoding to be UTF-8, here are the
+rationales for those choices:</p><ul>
+ <li>keeping the native encoding in the internal form would force the libxml
+ users (or the code associated) to be fully aware of the encoding of the
+ original document, for examples when adding a text node to a document,
+ the content would have to be provided in the document encoding, i.e. the
+ client code would have to check it before hand, make sure it's conformant
+ to the encoding, etc ... Very hard in practice, though in some specific
+ cases this may make sense.</li>
+ <li>the second decision was which encoding. From the XML spec only UTF8 and
+ UTF16 really makes sense as being the two only encodings for which there
+ is mandatory support. UCS-4 (32 bits fixed size encoding) could be
+ considered an intelligent choice too since it's a direct Unicode mapping
+ support. I selected UTF-8 on the basis of efficiency and compatibility
+ with surrounding software:
+ <ul>
+ <li>UTF-8 while a bit more complex to convert from/to (i.e. slightly
+ more costly to import and export CPU wise) is also far more compact
+ than UTF-16 (and UCS-4) for a majority of the documents I see it used
+ for right now (RPM RDF catalogs, advogato data, various configuration
+ file formats, etc.) and the key point for today's computer
+ architecture is efficient uses of caches. If one nearly double the
+ memory requirement to store the same amount of data, this will trash
+ caches (main memory/external caches/internal caches) and my take is
+ that this harms the system far more than the CPU requirements needed
+ for the conversion to UTF-8</li>
+ <li>Most of libxml2 version 1 users were using it with straight ASCII
+ most of the time, doing the conversion with an internal encoding
+ requiring all their code to be rewritten was a serious show-stopper
+ for using UTF-16 or UCS-4.</li>
+ <li>UTF-8 is being used as the de-facto internal encoding standard for
+ related code like the <a href="http://www.pango.org/">pango</a>
+ upcoming Gnome text widget, and a lot of Unix code (yet another place
+ where Unix programmer base takes a different approach from Microsoft
+ - they are using UTF-16)</li>
+ </ul>
+ </li>
+</ul><p>What does this mean in practice for the libxml2 user:</p><ul>
+ <li>xmlChar, the libxml2 data type is a byte, those bytes must be assembled
+ as UTF-8 valid strings. The proper way to terminate an xmlChar * string
+ is simply to append 0 byte, as usual.</li>
+ <li>One just need to make sure that when using chars outside the ASCII set,
+ the values has been properly converted to UTF-8</li>
+</ul><h3><a name="implemente" id="implemente">How is it implemented ?</a></h3><p>Let's describe how all this works within libxml, basically the I18N
+(internationalization) support get triggered only during I/O operation, i.e.
+when reading a document or saving one. Let's look first at the reading
+sequence:</p><ol>
+ <li>when a document is processed, we usually don't know the encoding, a
+ simple heuristic allows to detect UTF-16 and UCS-4 from encodings where
+ the ASCII range (0-0x7F) maps with ASCII</li>
+ <li>the xml declaration if available is parsed, including the encoding
+ declaration. At that point, if the autodetected encoding is different
+ from the one declared a call to xmlSwitchEncoding() is issued.</li>
+ <li>If there is no encoding declaration, then the input has to be in either
+ UTF-8 or UTF-16, if it is not then at some point when processing the
+ input, the converter/checker of UTF-8 form will raise an encoding error.
+ You may end-up with a garbled document, or no document at all ! Example:
+ <pre>~/XML -&gt; ./xmllint err.xml
+err.xml:1: error: Input is not proper UTF-8, indicate encoding !
+&lt;très&gt;là &lt;/très&gt;
+ ^
+err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
+&lt;très&gt;là &lt;/très&gt;
+ ^</pre>
+ </li>
+ <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and
+ then search the default registered encoding converters for that encoding.
+ If it's not within the default set and iconv() support has been compiled
+ it, it will ask iconv for such an encoder. If this fails then the parser
+ will report an error and stops processing:
+ <pre>~/XML -&gt; ./xmllint err2.xml
+err2.xml:1: error: Unsupported encoding UnsupportedEnc
+&lt;?xml version="1.0" encoding="UnsupportedEnc"?&gt;
+ ^</pre>
+ </li>
+ <li>From that point the encoder processes progressively the input (it is
+ plugged as a front-end to the I/O module) for that entity. It captures
+ and converts on-the-fly the document to be parsed to UTF-8. The parser
+ itself just does UTF-8 checking of this input and process it
+ transparently. The only difference is that the encoding information has
+ been added to the parsing context (more precisely to the input
+ corresponding to this entity).</li>
+ <li>The result (when using DOM) is an internal form completely in UTF-8
+ with just an encoding information on the document node.</li>
+</ol><p>Ok then what happens when saving the document (assuming you
+collected/built an xmlDoc DOM like structure) ? It depends on the function
+called, xmlSaveFile() will just try to save in the original encoding, while
+xmlSaveFileTo() and xmlSaveFileEnc() can optionally save to a given
+encoding:</p><ol>
+ <li>if no encoding is given, libxml2 will look for an encoding value
+ associated to the document and if it exists will try to save to that
+ encoding,
+ <p>otherwise everything is written in the internal form, i.e. UTF-8</p>
+ </li>
+ <li>so if an encoding was specified, either at the API level or on the
+ document, libxml2 will again canonicalize the encoding name, lookup for a
+ converter in the registered set or through iconv. If not found the
+ function will return an error code</li>
+ <li>the converter is placed before the I/O buffer layer, as another kind of
+ buffer, then libxml2 will simply push the UTF-8 serialization to through
+ that buffer, which will then progressively be converted and pushed onto
+ the I/O layer.</li>
+ <li>It is possible that the converter code fails on some input, for example
+ trying to push an UTF-8 encoded Chinese character through the UTF-8 to
+ ISO-8859-1 converter won't work. Since the encoders are progressive they
+ will just report the error and the number of bytes converted, at that
+ point libxml2 will decode the offending character, remove it from the
+ buffer and replace it with the associated charRef encoding &amp;#123; and
+ resume the conversion. This guarantees that any document will be saved
+ without losses (except for markup names where this is not legal, this is
+ a problem in the current version, in practice avoid using non-ascii
+ characters for tag or attribute names). A special "ascii" encoding name
+ is used to save documents to a pure ascii form can be used when
+ portability is really crucial</li>
+</ol><p>Here are a few examples based on the same test document and assumin a
+terminal using ISO-8859-1 as the text encoding:</p><pre>~/XML -&gt; ./xmllint isolat1
+&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
+&lt;très&gt;là&lt;/très&gt;
+~/XML -&gt; ./xmllint --encode UTF-8 isolat1
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;très&gt;là  &lt;/très&gt;
+~/XML -&gt; </pre><p>The same processing is applied (and reuse most of the code) for HTML I18N
+processing. Looking up and modifying the content encoding is a bit more
+difficult since it is located in a &lt;meta&gt; tag under the &lt;head&gt;,
+so a couple of functions htmlGetMetaEncoding() and htmlSetMetaEncoding() have
+been provided. The parser also attempts to switch encoding on the fly when
+detecting such a tag on input. Except for that the processing is the same
+(and again reuses the same code).</p><h3><a name="Default" id="Default">Default supported encodings</a></h3><p>libxml2 has a set of default converters for the following encodings
+(located in encoding.c):</p><ol>
+ <li>UTF-8 is supported by default (null handlers)</li>
+ <li>UTF-16, both little and big endian</li>
+ <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li>
+ <li>ASCII, useful mostly for saving</li>
+ <li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML
+ predefined entities like &amp;copy; for the Copyright sign.</li>
+</ol><p>More over when compiled on an Unix platform with iconv support the full
+set of encodings supported by iconv can be instantly be used by libxml. On a
+linux machine with glibc-2.1 the list of supported encodings and aliases fill
+3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the
+various Japanese ones.</p><p>To convert from the UTF-8 values returned from the API to another encoding
+then it is possible to use the function provided from <a href="html/libxml-encoding.html">the encoding module</a> like <a href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the
+POSIX <a href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a>
+API directly.</p><h4>Encoding aliases</h4><p>From 2.2.3, libxml2 has support to register encoding names aliases. The
+goal is to be able to parse document whose encoding is supported but where
+the name differs (for example from the default set of names accepted by
+iconv). The following functions allow to register and handle new aliases for
+existing encodings. Once registered libxml2 will automatically lookup the
+aliases when handling a document:</p><ul>
+ <li>int xmlAddEncodingAlias(const char *name, const char *alias);</li>
+ <li>int xmlDelEncodingAlias(const char *alias);</li>
+ <li>const char * xmlGetEncodingAlias(const char *alias);</li>
+ <li>void xmlCleanupEncodingAliases(void);</li>
+</ul><h3><a name="extend" id="extend">How to extend the existing support</a></h3><p>Well adding support for new encoding, or overriding one of the encoders
+(assuming it is buggy) should not be hard, just write input and output
+conversion routines to/from UTF-8, and register them using
+xmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they will be
+called automatically if the parser(s) encounter such an encoding name
+(register it uppercase, this will help). The description of the encoders,
+their arguments and expected return values are described in the encoding.h
+header.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/entities.html b/doc/entities.html
new file mode 100644
index 0000000..f9bcc4e
--- /dev/null
+++ b/doc/entities.html
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Entities or no entities</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Entities or no entities</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Entities in principle are similar to simple C macros. An entity defines an
+abbreviation for a given string that you can reuse many times throughout the
+content of your document. Entities are especially useful when a given string
+may occur frequently within a document, or to confine the change needed to a
+document to a restricted area in the internal subset of the document (at the
+beginning). Example:</p><pre>1 &lt;?xml version="1.0"?&gt;
+2 &lt;!DOCTYPE EXAMPLE SYSTEM "example.dtd" [
+3 &lt;!ENTITY xml "Extensible Markup Language"&gt;
+4 ]&gt;
+5 &lt;EXAMPLE&gt;
+6 &amp;xml;
+7 &lt;/EXAMPLE&gt;</pre><p>Line 3 declares the xml entity. Line 6 uses the xml entity, by prefixing
+its name with '&amp;' and following it by ';' without any spaces added. There
+are 5 predefined entities in libxml2 allowing you to escape characters with
+predefined meaning in some parts of the xml document content:
+<strong>&amp;lt;</strong> for the character '&lt;', <strong>&amp;gt;</strong>
+for the character '&gt;', <strong>&amp;apos;</strong> for the character ''',
+<strong>&amp;quot;</strong> for the character '"', and
+<strong>&amp;amp;</strong> for the character '&amp;'.</p><p>One of the problems related to entities is that you may want the parser to
+substitute an entity's content so that you can see the replacement text in
+your application. Or you may prefer to keep entity references as such in the
+content to be able to save the document back without losing this usually
+precious information (if the user went through the pain of explicitly
+defining entities, he may have a a rather negative attitude if you blindly
+substitute them as saving time). The <a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault()</a>
+function allows you to check and change the behaviour, which is to not
+substitute entities by default.</p><p>Here is the DOM tree built by libxml2 for the previous document in the
+default case:</p><pre>/gnome/src/gnome-xml -&gt; ./xmllint --debug test/ent1
+DOCUMENT
+version=1.0
+ ELEMENT EXAMPLE
+ TEXT
+ content=
+ ENTITY_REF
+ INTERNAL_GENERAL_ENTITY xml
+ content=Extensible Markup Language
+ TEXT
+ content=</pre><p>And here is the result when substituting entities:</p><pre>/gnome/src/gnome-xml -&gt; ./tester --debug --noent test/ent1
+DOCUMENT
+version=1.0
+ ELEMENT EXAMPLE
+ TEXT
+ content= Extensible Markup Language</pre><p>So, entities or no entities? Basically, it depends on your use case. I
+suggest that you keep the non-substituting default behaviour and avoid using
+entities in your XML document or data if you are not willing to handle the
+entity references elements in the DOM tree.</p><p>Note that at save time libxml2 enforces the conversion of the predefined
+entities where necessary to prevent well-formedness problems, and will also
+transparently replace those with chars (i.e. it will not generate entity
+reference elements in the DOM tree or call the reference() SAX callback when
+finding them in the input).</p><p><span style="background-color: #FF0000">WARNING</span>: handling entities
+on top of the libxml2 SAX interface is difficult!!! If you plan to use
+non-predefined entities in your documents, then the learning curve to handle
+then using the SAX API may be long. If you plan to use complex documents, I
+strongly suggest you consider using the DOM interface instead and let libxml
+deal with the complexity rather than trying to do it yourself.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/example.html b/doc/example.html
new file mode 100644
index 0000000..50668bf
--- /dev/null
+++ b/doc/example.html
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>A real example</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>A real example</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Here is a real size example, where the actual content of the application
+data is not kept in the DOM tree but uses internal structures. It is based on
+a proposal to keep a database of jobs related to Gnome, with an XML based
+storage structure. Here is an <a href="gjobs.xml">XML encoded jobs
+base</a>:</p><pre>&lt;?xml version="1.0"?&gt;
+&lt;gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"&gt;
+ &lt;gjob:Jobs&gt;
+
+ &lt;gjob:Job&gt;
+ &lt;gjob:Project ID="3"/&gt;
+ &lt;gjob:Application&gt;GBackup&lt;/gjob:Application&gt;
+ &lt;gjob:Category&gt;Development&lt;/gjob:Category&gt;
+
+ &lt;gjob:Update&gt;
+ &lt;gjob:Status&gt;Open&lt;/gjob:Status&gt;
+ &lt;gjob:Modified&gt;Mon, 07 Jun 1999 20:27:45 -0400 MET DST&lt;/gjob:Modified&gt;
+ &lt;gjob:Salary&gt;USD 0.00&lt;/gjob:Salary&gt;
+ &lt;/gjob:Update&gt;
+
+ &lt;gjob:Developers&gt;
+ &lt;gjob:Developer&gt;
+ &lt;/gjob:Developer&gt;
+ &lt;/gjob:Developers&gt;
+
+ &lt;gjob:Contact&gt;
+ &lt;gjob:Person&gt;Nathan Clemons&lt;/gjob:Person&gt;
+ &lt;gjob:Email&gt;nathan@windsofstorm.net&lt;/gjob:Email&gt;
+ &lt;gjob:Company&gt;
+ &lt;/gjob:Company&gt;
+ &lt;gjob:Organisation&gt;
+ &lt;/gjob:Organisation&gt;
+ &lt;gjob:Webpage&gt;
+ &lt;/gjob:Webpage&gt;
+ &lt;gjob:Snailmail&gt;
+ &lt;/gjob:Snailmail&gt;
+ &lt;gjob:Phone&gt;
+ &lt;/gjob:Phone&gt;
+ &lt;/gjob:Contact&gt;
+
+ &lt;gjob:Requirements&gt;
+ The program should be released as free software, under the GPL.
+ &lt;/gjob:Requirements&gt;
+
+ &lt;gjob:Skills&gt;
+ &lt;/gjob:Skills&gt;
+
+ &lt;gjob:Details&gt;
+ A GNOME based system that will allow a superuser to configure
+ compressed and uncompressed files and/or file systems to be backed
+ up with a supported media in the system. This should be able to
+ perform via find commands generating a list of files that are passed
+ to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine
+ or via operations performed on the filesystem itself. Email
+ notification and GUI status display very important.
+ &lt;/gjob:Details&gt;
+
+ &lt;/gjob:Job&gt;
+
+ &lt;/gjob:Jobs&gt;
+&lt;/gjob:Helping&gt;</pre><p>While loading the XML file into an internal DOM tree is a matter of
+calling only a couple of functions, browsing the tree to gather the data and
+generate the internal structures is harder, and more error prone.</p><p>The suggested principle is to be tolerant with respect to the input
+structure. For example, the ordering of the attributes is not significant,
+the XML specification is clear about it. It's also usually a good idea not to
+depend on the order of the children of a given node, unless it really makes
+things harder. Here is some code to parse the information for a person:</p><pre>/*
+ * A person record
+ */
+typedef struct person {
+ char *name;
+ char *email;
+ char *company;
+ char *organisation;
+ char *smail;
+ char *webPage;
+ char *phone;
+} person, *personPtr;
+
+/*
+ * And the code needed to parse it
+ */
+personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ personPtr ret = NULL;
+
+DEBUG("parsePerson\n");
+ /*
+ * allocate the struct
+ */
+ ret = (personPtr) malloc(sizeof(person));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(person));
+
+ /* We don't care what the top level element name is */
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!strcmp(cur-&gt;name, "Person")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;name = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Email")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;email = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ cur = cur-&gt;next;
+ }
+
+ return(ret);
+}</pre><p>Here are a couple of things to notice:</p><ul>
+ <li>Usually a recursive parsing style is the more convenient one: XML data
+ is by nature subject to repetitive constructs and usually exhibits highly
+ structured patterns.</li>
+ <li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>,
+ i.e. the pointer to the global XML document and the namespace reserved to
+ the application. Document wide information are needed for example to
+ decode entities and it's a good coding practice to define a namespace for
+ your application set of data and test that the element and attributes
+ you're analyzing actually pertains to your application space. This is
+ done by a simple equality test (cur-&gt;ns == ns).</li>
+ <li>To retrieve text and attributes value, you can use the function
+ <em>xmlNodeListGetString</em> to gather all the text and entity reference
+ nodes generated by the DOM output and produce an single text string.</li>
+</ul><p>Here is another piece of code used to parse another level of the
+structure:</p><pre>#include &lt;libxml/tree.h&gt;
+/*
+ * a Description for a Job
+ */
+typedef struct job {
+ char *projectID;
+ char *application;
+ char *category;
+ personPtr contact;
+ int nbDevelopers;
+ personPtr developers[100]; /* using dynamic alloc is left as an exercise */
+} job, *jobPtr;
+
+/*
+ * And the code needed to parse it
+ */
+jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ jobPtr ret = NULL;
+
+DEBUG("parseJob\n");
+ /*
+ * allocate the struct
+ */
+ ret = (jobPtr) malloc(sizeof(job));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(job));
+
+ /* We don't care what the top level element name is */
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+
+ if ((!strcmp(cur-&gt;name, "Project")) &amp;&amp; (cur-&gt;ns == ns)) {
+ ret-&gt;projectID = xmlGetProp(cur, "ID");
+ if (ret-&gt;projectID == NULL) {
+ fprintf(stderr, "Project has no ID\n");
+ }
+ }
+ if ((!strcmp(cur-&gt;name, "Application")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;application = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Category")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;category = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Contact")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;contact = parsePerson(doc, ns, cur);
+ cur = cur-&gt;next;
+ }
+
+ return(ret);
+}</pre><p>Once you are used to it, writing this kind of code is quite simple, but
+boring. Ultimately, it could be possible to write stubbers taking either C
+data structure definitions, a set of XML examples or an XML DTD and produce
+the code needed to import and export the content between C data and XML
+storage. This is left as an exercise to the reader :-)</p><p>Feel free to use <a href="example/gjobread.c">the code for the full C
+parsing example</a> as a template, it is also available with Makefile in the
+Gnome SVN base under libxml2/example</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
new file mode 100644
index 0000000..57af9c2
--- /dev/null
+++ b/doc/examples/Makefile.am
@@ -0,0 +1,135 @@
+##
+## This file is auto-generated by index.py
+## DO NOT EDIT !!!
+##
+
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
+LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD)
+
+CLEANFILES = *.tmp
+
+if REBUILD_DOCS
+rebuild: examples.xml index.html
+.PHONY: rebuild
+
+examples.xml: index.py $(noinst_PROGRAMS:=.c)
+ cd $(srcdir) && $(PYTHON) index.py
+ $(MAKE) Makefile
+
+index.html: examples.xml examples.xsl
+ cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page"
+ -cd $(srcdir) && xmllint --valid --noout index.html
+endif
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+
+clean-local:
+ test -f Makefile.am || rm -f test?.xml
+
+EXTRA_DIST = \
+ examples.xml \
+ examples.xsl \
+ index.html \
+ index.py \
+ io1.res \
+ io2.res \
+ reader1.res \
+ reader3.res \
+ reader4.res \
+ test1.xml \
+ test2.xml \
+ test3.xml \
+ tree1.res \
+ tree2.res \
+ tst.xml \
+ writer.xml \
+ xpath1.res \
+ xpath2.res
+
+noinst_PROGRAMS = \
+ io1 \
+ io2 \
+ parse1 \
+ parse2 \
+ parse3 \
+ parse4 \
+ reader1 \
+ reader2 \
+ reader3 \
+ reader4 \
+ testWriter \
+ tree1 \
+ tree2 \
+ xpath1 \
+ xpath2
+
+io1_SOURCES = io1.c
+
+io2_SOURCES = io2.c
+
+parse1_SOURCES = parse1.c
+
+parse2_SOURCES = parse2.c
+
+parse3_SOURCES = parse3.c
+
+parse4_SOURCES = parse4.c
+
+reader1_SOURCES = reader1.c
+
+reader2_SOURCES = reader2.c
+
+reader3_SOURCES = reader3.c
+
+reader4_SOURCES = reader4.c
+
+testWriter_SOURCES = testWriter.c
+
+tree1_SOURCES = tree1.c
+
+tree2_SOURCES = tree2.c
+
+xpath1_SOURCES = xpath1.c
+
+xpath2_SOURCES = xpath2.c
+
+valgrind:
+ $(MAKE) CHECKER='valgrind' tests
+
+tests: $(noinst_PROGRAMS)
+ test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .
+ @(echo '## examples regression tests')
+ @(echo > .memdump)
+ $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse1 test1.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse2 test2.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse3
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse4 test3.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
new file mode 100644
index 0000000..7b66627
--- /dev/null
+++ b/doc/examples/Makefile.in
@@ -0,0 +1,964 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = io1$(EXEEXT) io2$(EXEEXT) parse1$(EXEEXT) \
+ parse2$(EXEEXT) parse3$(EXEEXT) parse4$(EXEEXT) \
+ reader1$(EXEEXT) reader2$(EXEEXT) reader3$(EXEEXT) \
+ reader4$(EXEEXT) testWriter$(EXEEXT) tree1$(EXEEXT) \
+ tree2$(EXEEXT) xpath1$(EXEEXT) xpath2$(EXEEXT)
+subdir = doc/examples
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_io1_OBJECTS = io1.$(OBJEXT)
+io1_OBJECTS = $(am_io1_OBJECTS)
+io1_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+io1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_io2_OBJECTS = io2.$(OBJEXT)
+io2_OBJECTS = $(am_io2_OBJECTS)
+io2_LDADD = $(LDADD)
+io2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_parse1_OBJECTS = parse1.$(OBJEXT)
+parse1_OBJECTS = $(am_parse1_OBJECTS)
+parse1_LDADD = $(LDADD)
+parse1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_parse2_OBJECTS = parse2.$(OBJEXT)
+parse2_OBJECTS = $(am_parse2_OBJECTS)
+parse2_LDADD = $(LDADD)
+parse2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_parse3_OBJECTS = parse3.$(OBJEXT)
+parse3_OBJECTS = $(am_parse3_OBJECTS)
+parse3_LDADD = $(LDADD)
+parse3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_parse4_OBJECTS = parse4.$(OBJEXT)
+parse4_OBJECTS = $(am_parse4_OBJECTS)
+parse4_LDADD = $(LDADD)
+parse4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_reader1_OBJECTS = reader1.$(OBJEXT)
+reader1_OBJECTS = $(am_reader1_OBJECTS)
+reader1_LDADD = $(LDADD)
+reader1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_reader2_OBJECTS = reader2.$(OBJEXT)
+reader2_OBJECTS = $(am_reader2_OBJECTS)
+reader2_LDADD = $(LDADD)
+reader2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_reader3_OBJECTS = reader3.$(OBJEXT)
+reader3_OBJECTS = $(am_reader3_OBJECTS)
+reader3_LDADD = $(LDADD)
+reader3_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_reader4_OBJECTS = reader4.$(OBJEXT)
+reader4_OBJECTS = $(am_reader4_OBJECTS)
+reader4_LDADD = $(LDADD)
+reader4_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_testWriter_OBJECTS = testWriter.$(OBJEXT)
+testWriter_OBJECTS = $(am_testWriter_OBJECTS)
+testWriter_LDADD = $(LDADD)
+testWriter_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_tree1_OBJECTS = tree1.$(OBJEXT)
+tree1_OBJECTS = $(am_tree1_OBJECTS)
+tree1_LDADD = $(LDADD)
+tree1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_tree2_OBJECTS = tree2.$(OBJEXT)
+tree2_OBJECTS = $(am_tree2_OBJECTS)
+tree2_LDADD = $(LDADD)
+tree2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_xpath1_OBJECTS = xpath1.$(OBJEXT)
+xpath1_OBJECTS = $(am_xpath1_OBJECTS)
+xpath1_LDADD = $(LDADD)
+xpath1_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+am_xpath2_OBJECTS = xpath2.$(OBJEXT)
+xpath2_OBJECTS = $(am_xpath2_OBJECTS)
+xpath2_LDADD = $(LDADD)
+xpath2_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \
+ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \
+ $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \
+ $(reader4_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) \
+ $(tree2_SOURCES) $(xpath1_SOURCES) $(xpath2_SOURCES)
+DIST_SOURCES = $(io1_SOURCES) $(io2_SOURCES) $(parse1_SOURCES) \
+ $(parse2_SOURCES) $(parse3_SOURCES) $(parse4_SOURCES) \
+ $(reader1_SOURCES) $(reader2_SOURCES) $(reader3_SOURCES) \
+ $(reader4_SOURCES) $(testWriter_SOURCES) $(tree1_SOURCES) \
+ $(tree2_SOURCES) $(xpath1_SOURCES) $(xpath2_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
+LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD)
+CLEANFILES = *.tmp
+EXTRA_DIST = \
+ examples.xml \
+ examples.xsl \
+ index.html \
+ index.py \
+ io1.res \
+ io2.res \
+ reader1.res \
+ reader3.res \
+ reader4.res \
+ test1.xml \
+ test2.xml \
+ test3.xml \
+ tree1.res \
+ tree2.res \
+ tst.xml \
+ writer.xml \
+ xpath1.res \
+ xpath2.res
+
+io1_SOURCES = io1.c
+io2_SOURCES = io2.c
+parse1_SOURCES = parse1.c
+parse2_SOURCES = parse2.c
+parse3_SOURCES = parse3.c
+parse4_SOURCES = parse4.c
+reader1_SOURCES = reader1.c
+reader2_SOURCES = reader2.c
+reader3_SOURCES = reader3.c
+reader4_SOURCES = reader4.c
+testWriter_SOURCES = testWriter.c
+tree1_SOURCES = tree1.c
+tree2_SOURCES = tree2.c
+xpath1_SOURCES = xpath1.c
+xpath2_SOURCES = xpath2.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+io1$(EXEEXT): $(io1_OBJECTS) $(io1_DEPENDENCIES) $(EXTRA_io1_DEPENDENCIES)
+ @rm -f io1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(io1_OBJECTS) $(io1_LDADD) $(LIBS)
+
+io2$(EXEEXT): $(io2_OBJECTS) $(io2_DEPENDENCIES) $(EXTRA_io2_DEPENDENCIES)
+ @rm -f io2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(io2_OBJECTS) $(io2_LDADD) $(LIBS)
+
+parse1$(EXEEXT): $(parse1_OBJECTS) $(parse1_DEPENDENCIES) $(EXTRA_parse1_DEPENDENCIES)
+ @rm -f parse1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(parse1_OBJECTS) $(parse1_LDADD) $(LIBS)
+
+parse2$(EXEEXT): $(parse2_OBJECTS) $(parse2_DEPENDENCIES) $(EXTRA_parse2_DEPENDENCIES)
+ @rm -f parse2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(parse2_OBJECTS) $(parse2_LDADD) $(LIBS)
+
+parse3$(EXEEXT): $(parse3_OBJECTS) $(parse3_DEPENDENCIES) $(EXTRA_parse3_DEPENDENCIES)
+ @rm -f parse3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(parse3_OBJECTS) $(parse3_LDADD) $(LIBS)
+
+parse4$(EXEEXT): $(parse4_OBJECTS) $(parse4_DEPENDENCIES) $(EXTRA_parse4_DEPENDENCIES)
+ @rm -f parse4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(parse4_OBJECTS) $(parse4_LDADD) $(LIBS)
+
+reader1$(EXEEXT): $(reader1_OBJECTS) $(reader1_DEPENDENCIES) $(EXTRA_reader1_DEPENDENCIES)
+ @rm -f reader1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(reader1_OBJECTS) $(reader1_LDADD) $(LIBS)
+
+reader2$(EXEEXT): $(reader2_OBJECTS) $(reader2_DEPENDENCIES) $(EXTRA_reader2_DEPENDENCIES)
+ @rm -f reader2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(reader2_OBJECTS) $(reader2_LDADD) $(LIBS)
+
+reader3$(EXEEXT): $(reader3_OBJECTS) $(reader3_DEPENDENCIES) $(EXTRA_reader3_DEPENDENCIES)
+ @rm -f reader3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(reader3_OBJECTS) $(reader3_LDADD) $(LIBS)
+
+reader4$(EXEEXT): $(reader4_OBJECTS) $(reader4_DEPENDENCIES) $(EXTRA_reader4_DEPENDENCIES)
+ @rm -f reader4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(reader4_OBJECTS) $(reader4_LDADD) $(LIBS)
+
+testWriter$(EXEEXT): $(testWriter_OBJECTS) $(testWriter_DEPENDENCIES) $(EXTRA_testWriter_DEPENDENCIES)
+ @rm -f testWriter$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(testWriter_OBJECTS) $(testWriter_LDADD) $(LIBS)
+
+tree1$(EXEEXT): $(tree1_OBJECTS) $(tree1_DEPENDENCIES) $(EXTRA_tree1_DEPENDENCIES)
+ @rm -f tree1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(tree1_OBJECTS) $(tree1_LDADD) $(LIBS)
+
+tree2$(EXEEXT): $(tree2_OBJECTS) $(tree2_DEPENDENCIES) $(EXTRA_tree2_DEPENDENCIES)
+ @rm -f tree2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(tree2_OBJECTS) $(tree2_LDADD) $(LIBS)
+
+xpath1$(EXEEXT): $(xpath1_OBJECTS) $(xpath1_DEPENDENCIES) $(EXTRA_xpath1_DEPENDENCIES)
+ @rm -f xpath1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(xpath1_OBJECTS) $(xpath1_LDADD) $(LIBS)
+
+xpath2$(EXEEXT): $(xpath2_OBJECTS) $(xpath2_DEPENDENCIES) $(EXTRA_xpath2_DEPENDENCIES)
+ @rm -f xpath2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(xpath2_OBJECTS) $(xpath2_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reader4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testWriter.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpath2.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-local clean-noinstPROGRAMS cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+
+@REBUILD_DOCS_TRUE@rebuild: examples.xml index.html
+@REBUILD_DOCS_TRUE@.PHONY: rebuild
+
+@REBUILD_DOCS_TRUE@examples.xml: index.py $(noinst_PROGRAMS:=.c)
+@REBUILD_DOCS_TRUE@ cd $(srcdir) && $(PYTHON) index.py
+@REBUILD_DOCS_TRUE@ $(MAKE) Makefile
+
+@REBUILD_DOCS_TRUE@index.html: examples.xml examples.xsl
+@REBUILD_DOCS_TRUE@ cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page"
+@REBUILD_DOCS_TRUE@ -cd $(srcdir) && xmllint --valid --noout index.html
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+
+clean-local:
+ test -f Makefile.am || rm -f test?.xml
+
+valgrind:
+ $(MAKE) CHECKER='valgrind' tests
+
+tests: $(noinst_PROGRAMS)
+ test -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .
+ @(echo '## examples regression tests')
+ @(echo > .memdump)
+ $(CHECKER) ./io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse1 test1.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse2 test2.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse3
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./parse4 test3.xml
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+ $(CHECKER) ./xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res
+ @grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/examples/examples.xml b/doc/examples/examples.xml
new file mode 100644
index 0000000..28929cc
--- /dev/null
+++ b/doc/examples/examples.xml
@@ -0,0 +1,751 @@
+<examples>
+ <example filename='xpath1.c'>
+ <synopsis>Evaluate XPath expression and prints result node set.</synopsis>
+ <purpose>Shows how to evaluate XPath expression and register known namespaces in XPath context.</purpose>
+ <usage>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</usage>
+ <test>xpath1 test3.xml &apos;//child2&apos; &gt; xpath1.tmp &amp;&amp; diff xpath1.tmp $(srcdir)/xpath1.res</test>
+ <author>Aleksey Sanin</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>XPath</section>
+ <includes>
+ <include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xpath.h&gt;</include>
+ <include>&lt;libxml/xpathInternals.h&gt;</include>
+ <include>&lt;libxml/tree.h&gt;</include>
+ </includes>
+ <uses>
+ <enum line='229' file='tree' name='XML_ELEMENT_NODE'/>
+ <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='54' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='117' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='94' file='parser' name='xmlParseFile'/>
+ <function line='186' file='xpathInternals' name='xmlXPathRegisterNs'/>
+ <function line='129' file='xpath' name='xmlXPathFreeObject'/>
+ <variable line='193' file='globals' name='xmlFree'/>
+ <typedef line='218' file='tree' name='xmlNsPtr'/>
+ <function line='101' file='xpath' name='xmlXPathNewContext'/>
+ <function line='49' file='parser' name='xmlCleanupParser'/>
+ <macro line='43' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='130' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='39' file='parser' name='xmlInitParser'/>
+ <function line='156' file='xmlstring' name='xmlStrdup'/>
+ <function line='131' file='tree' name='xmlFreeDoc'/>
+ <function line='180' file='xmlstring' name='xmlStrchr'/>
+ <typedef line='206' file='tree' name='xmlNodePtr'/>
+ <typedef line='86' file='tree' name='xmlDocPtr'/>
+ <enum line='217' file='tree' name='XML_NAMESPACE_DECL'/>
+ </uses>
+ </example>
+ <example filename='parse3.c'>
+ <synopsis>Parse an XML document in memory to a tree and free it</synopsis>
+ <purpose>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+ <usage>parse3</usage>
+ <test>parse3</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='33' file='parser' name='xmlReadMemory'/>
+ <function line='58' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='54' file='parser' name='xmlCleanupParser'/>
+ <macro line='49' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='38' file='tree' name='xmlFreeDoc'/>
+ <typedef line='27' file='tree' name='xmlDocPtr'/>
+ </uses>
+ </example>
+ <example filename='reader2.c'>
+ <synopsis>Parse and validate an XML file with an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader2 &lt;valid_xml_filename&gt;</usage>
+ <test>reader2 test2.xml &gt; reader1.tmp &amp;&amp; diff reader1.tmp $(srcdir)/reader1.res</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='45' file='xmlstring' name='xmlStrlen'/>
+ <function line='109' file='parser' name='xmlCleanupParser'/>
+ <function line='38' file='xmlreader' name='xmlTextReaderNodeType'/>
+ <typedef line='60' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='113' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='34' file='xmlreader' name='xmlTextReaderConstValue'/>
+ <enum line='70' file='parser' name='XML_PARSE_NOENT'/>
+ <function line='37' file='xmlreader' name='xmlTextReaderDepth'/>
+ <enum line='71' file='parser' name='XML_PARSE_DTDVALID'/>
+ <enum line='69' file='parser' name='XML_PARSE_DTDATTR'/>
+ <function line='84' file='xmlreader' name='xmlFreeTextReader'/>
+ <macro line='104' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='30' file='xmlreader' name='xmlTextReaderConstName'/>
+ <function line='41' file='xmlreader' name='xmlTextReaderHasValue'/>
+ <function line='76' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='40' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
+ <function line='68' file='xmlreader' name='xmlReaderForFile'/>
+ <function line='81' file='xmlreader' name='xmlTextReaderIsValid'/>
+ </uses>
+ </example>
+ <example filename='tree2.c'>
+ <synopsis>Creates a tree</synopsis>
+ <purpose>Shows how to create document, nodes and dump it to stdout or file.</purpose>
+ <usage>tree2 &lt;filename&gt; -Default output: stdout</usage>
+ <test>tree2 &gt; tree2.tmp &amp;&amp; diff tree2.tmp $(srcdir)/tree2.res</test>
+ <author>Lucas Brasilino &lt;brasilino@recife.pe.gov.br&gt;</author>
+ <copy>see Copyright for the status of this software </copy>
+ <section>Tree</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='75' file='tree' name='xmlNewText'/>
+ <function line='110' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='96' file='tree' name='xmlSaveFormatFileEnc'/>
+ <function line='78' file='tree' name='xmlAddChild'/>
+ <function line='41' file='tree' name='xmlDocSetRootElement'/>
+ <function line='105' file='parser' name='xmlCleanupParser'/>
+ <macro line='34' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='89' file='tree' name='xmlNewProp'/>
+ <function line='88' file='tree' name='xmlNewChild'/>
+ <function line='74' file='tree' name='xmlNewNode'/>
+ <function line='46' file='tree' name='xmlCreateIntSubset'/>
+ <function line='99' file='tree' name='xmlFreeDoc'/>
+ <function line='39' file='tree' name='xmlNewDoc'/>
+ </uses>
+ </example>
+ <example filename='io1.c'>
+ <synopsis>Example of custom Input/Output</synopsis>
+ <purpose>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</purpose>
+ <usage>io1</usage>
+ <test>io1 &gt; io1.tmp &amp;&amp; diff io1.tmp $(srcdir)/io1.res</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>InputOutput</section>
+ <includes>
+ <include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xmlIO.h&gt;</include>
+ <include>&lt;libxml/xinclude.h&gt;</include>
+ <include>&lt;libxml/tree.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='143' file='tree' name='xmlDocDump'/>
+ <function line='158' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='149' file='tree' name='xmlFreeDoc'/>
+ <function line='154' file='parser' name='xmlCleanupParser'/>
+ <macro line='117' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <function line='134' file='xinclude' name='xmlXIncludeProcess'/>
+ <function line='117' file='xmlIO' name='xmlRegisterInputCallbacks'/>
+ <function line='124' file='parser' name='xmlReadMemory'/>
+ <typedef line='105' file='tree' name='xmlDocPtr'/>
+ </uses>
+ </example>
+ <example filename='parse4.c'>
+ <synopsis>Parse an XML document chunk by chunk to a tree and free it</synopsis>
+ <purpose>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+ <usage>parse4 test3.xml</usage>
+ <test>parse4 test3.xml</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='94' file='parser' name='xmlFreeParserCtxt'/>
+ <function line='86' file='parser' name='xmlParseChunk'/>
+ <function line='103' file='tree' name='xmlFreeDoc'/>
+ <function line='135' file='xmlmemory' name='xmlMemoryDump'/>
+ <function line='67' file='parser' name='xmlCreatePushParserCtxt'/>
+ <function line='131' file='parser' name='xmlCleanupParser'/>
+ <macro line='120' file='xmlversion' name='LIBXML_TEST_VERSION'/>
+ <typedef line='45' file='tree' name='xmlParserCtxtPtr'/>
+ <typedef line='47' file='tree' name='xmlDocPtr'/>
+ </uses>
+ </example>
+ <example filename='xpath2.c'>
+ <synopsis>Load a document, locate subelements with XPath, modify said elements and save the resulting document.</synopsis>
+ <purpose>Shows how to make a full round-trip from a load/edit/save</purpose>
+ <usage>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</usage>
+ <test>xpath2 test3.xml &apos;//discarded&apos; discarded &gt; xpath2.tmp &amp;&amp; diff xpath2.tmp $(srcdir)/xpath2.res</test>
+ <author>Aleksey Sanin and Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>XPath</section>
+ <includes>
+ <include>&lt;libxml/parser.h&gt;</include>
+ <include>&lt;libxml/xpath.h&gt;</include>
+ <include>&lt;libxml/xpathInternals.h&gt;</include>
+ <include>&lt;libxml/tree.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='162' file='tree' name='xmlNodeSetContent'/>
+ <function line='127' file='tree' name='xmlDocDump'/>
+ <typedef line='88' file='xpath' name='xmlXPathObjectPtr'/>
+ <function line='110' file='xpath' name='xmlXPathEvalExpression'/>
+ <function line='95' file='parser' name='xmlParseFile'/>
+ <function line='123' file='xpath' name='xmlXPathFreeObject'/>
+ <function line='102' file='xpath' name='xmlXPathNewContext'/>
+ <typedef line='87' file='xpath' name='xmlXPathContextPtr'/>
+ <function line='124' file='xpath' name='xmlXPathFreeContext'/>
+ <function line='41' file='parser' name='xmlInitParser'/>
+ <function line='131' file='tree' name='xmlFreeDoc'/>
+ <enum line='180' file='tree' name='XML_NAMESPACE_DECL'/>
+ <typedef line='86' file='tree' name='xmlDocPtr'/>
+ </uses>
+ </example>
+ <example filename='io2.c'>
+ <synopsis>Output to char buffer</synopsis>
+ <purpose>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</purpose>
+ <usage>io2</usage>
+ <test>io2 &gt; io2.tmp &amp;&amp; diff io2.tmp $(srcdir)/io2.res</test>
+ <author>John Fleck</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>InputOutput</section>
+ <includes>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='29' file='tree' name='xmlNodeSetContent'/>
+ <function line='36' file='tree' name='xmlDocDumpFormatMemory'/>
+ <variable line='42' file='globals' name='xmlFree'/>
+ <function line='30' file='tree' name='xmlDocSetRootElement'/>
+ <typedef line='20' file='tree' name='xmlDocPtr'/>
+ <typedef line='19' file='tree' name='xmlNodePtr'/>
+ <function line='27' file='tree' name='xmlNewDoc'/>
+ <function line='28' file='tree' name='xmlNewNode'/>
+ </uses>
+ </example>
+ <example filename='reader1.c'>
+ <synopsis>Parse an XML file with an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader1 &lt;filename&gt;</usage>
+ <test>reader1 test2.xml &gt; reader1.tmp &amp;&amp; diff reader1.tmp $(srcdir)/reader1.res</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='44' file='xmlstring' name='xmlStrlen'/>
+ <function line='37' file='xmlreader' name='xmlTextReaderNodeType'/>
+ <typedef line='59' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='33' file='xmlreader' name='xmlTextReaderConstValue'/>
+ <function line='36' file='xmlreader' name='xmlTextReaderDepth'/>
+ <function line='69' file='xmlreader' name='xmlFreeTextReader'/>
+ <function line='29' file='xmlreader' name='xmlTextReaderConstName'/>
+ <function line='40' file='xmlreader' name='xmlTextReaderHasValue'/>
+ <function line='67' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='39' file='xmlreader' name='xmlTextReaderIsEmptyElement'/>
+ <function line='62' file='xmlreader' name='xmlReaderForFile'/>
+ </uses>
+ </example>
+ <example filename='tree1.c'>
+ <synopsis>Navigates a tree to print element names</synopsis>
+ <purpose>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</purpose>
+ <usage>tree1 filename_or_URL</usage>
+ <test>tree1 test2.xml &gt; tree1.tmp &amp;&amp; diff tree1.tmp $(srcdir)/tree1.res</test>
+ <author>Dodji Seketeli</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Tree</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <enum line='36' file='tree' name='XML_ELEMENT_NODE'/>
+ <function line='74' file='tree' name='xmlDocGetRootElement'/>
+ <function line='67' file='parser' name='xmlReadFile'/>
+ </uses>
+ </example>
+ <example filename='reader3.c'>
+ <synopsis>Show how to extract subdocuments with xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader3</usage>
+ <test>reader3 &gt; reader3.tmp &amp;&amp; diff reader3.tmp $(srcdir)/reader3.res</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <typedef line='32' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='66' file='xmlreader' name='xmlFreeTextReader'/>
+ <function line='96' file='tree' name='xmlDocDump'/>
+ <function line='52' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='62' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
+ <function line='43' file='xmlreader' name='xmlTextReaderPreservePattern'/>
+ <function line='38' file='xmlreader' name='xmlReaderForFile'/>
+ </uses>
+ </example>
+ <example filename='parse2.c'>
+ <synopsis>Parse and validate an XML file to a tree and free the result</synopsis>
+ <purpose>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</purpose>
+ <usage>parse2 test2.xml</usage>
+ <test>parse2 test2.xml</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='47' file='parser' name='xmlFreeParserCtxt'/>
+ <enum line='35' file='parser' name='XML_PARSE_DTDVALID'/>
+ <function line='29' file='parser' name='xmlNewParserCtxt'/>
+ <typedef line='25' file='tree' name='xmlParserCtxtPtr'/>
+ <function line='35' file='parser' name='xmlCtxtReadFile'/>
+ </uses>
+ </example>
+ <example filename='parse1.c'>
+ <synopsis>Parse an XML file to a tree and free it</synopsis>
+ <purpose>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</purpose>
+ <usage>parse1 test1.xml</usage>
+ <test>parse1 test1.xml</test>
+ <author>Daniel Veillard</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>Parsing</section>
+ <includes>
+ <include>&lt;libxml/tree.h&gt;</include>
+ <include>&lt;libxml/parser.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='26' file='parser' name='xmlReadFile'/>
+ </uses>
+ </example>
+ <example filename='reader4.c'>
+ <synopsis>Parse multiple XML files reusing an xmlReader</synopsis>
+ <purpose>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)</purpose>
+ <usage>reader4 &lt;filename&gt; [ filename ... ]</usage>
+ <test>reader4 test1.xml test2.xml test3.xml &gt; reader4.tmp &amp;&amp; diff reader4.tmp $(srcdir)/reader4.res</test>
+ <author>Graham Bennett</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlReader</section>
+ <includes>
+ <include>&lt;libxml/xmlreader.h&gt;</include>
+ </includes>
+ <uses>
+ <typedef line='54' file='xmlreader' name='xmlTextReaderPtr'/>
+ <function line='83' file='xmlreader' name='xmlReaderNewFile'/>
+ <function line='104' file='xmlreader' name='xmlFreeTextReader'/>
+ <function line='26' file='xmlreader' name='xmlTextReaderRead'/>
+ <function line='97' file='xmlreader' name='xmlTextReaderCurrentDoc'/>
+ <function line='72' file='xmlreader' name='xmlReaderForFile'/>
+ </uses>
+ </example>
+ <example filename='testWriter.c'>
+ <synopsis>use various APIs for the xmlWriter</synopsis>
+ <purpose>tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.</purpose>
+ <usage>testWriter</usage>
+ <test>testWriter &amp;&amp; for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done</test>
+ <author>Alfred Mickautsch</author>
+ <copy>see Copyright for the status of this software. </copy>
+ <section>xmlWriter</section>
+ <includes>
+ <include>&lt;libxml/encoding.h&gt;</include>
+ <include>&lt;libxml/xmlwriter.h&gt;</include>
+ </includes>
+ <uses>
+ <function line='913' file='xmlwriter' name='xmlTextWriterStartDocument'/>
+ <function line='1121' file='xmlwriter' name='xmlTextWriterEndDocument'/>
+ <variable line='1183' file='globals' name='xmlRealloc'/>
+ <function line='925' file='xmlwriter' name='xmlTextWriterWriteComment'/>
+ <function line='1156' file='encoding' name='xmlFindCharEncodingHandler'/>
+ <variable line='1166' file='globals' name='xmlMalloc'/>
+ <typedef line='341' file='tree' name='xmlBufferPtr'/>
+ <macro line='885' file='parser' name='XML_DEFAULT_VERSION'/>
+ <function line='901' file='tree' name='xmlDocSetRootElement'/>
+ <function line='1127' file='xmlwriter' name='xmlFreeTextWriter'/>
+ <function line='1096' file='xmlwriter' name='xmlTextWriterStartElement'/>
+ <function line='347' file='tree' name='xmlBufferCreate'/>
+ <function line='1111' file='xmlwriter' name='xmlTextWriterEndElement'/>
+ <function line='76' file='xmlwriter' name='xmlNewTextWriterFilename'/>
+ <function line='959' file='xmlwriter' name='xmlTextWriterWriteFormatComment'/>
+ <function line='1073' file='xmlwriter' name='xmlTextWriterWriteFormatElement'/>
+ <typedef line='1151' file='encoding' name='xmlCharEncodingHandlerPtr'/>
+ <typedef line='880' file='tree' name='xmlNodePtr'/>
+ <function line='949' file='xmlwriter' name='xmlTextWriterWriteAttribute'/>
+ <function line='632' file='xmlwriter' name='xmlNewTextWriterDoc'/>
+ <function line='894' file='tree' name='xmlNewDocNode'/>
+ <function line='1129' file='tree' name='xmlSaveFileEnc'/>
+ <function line='904' file='xmlwriter' name='xmlNewTextWriterTree'/>
+ <function line='355' file='xmlwriter' name='xmlNewTextWriterMemory'/>
+ <variable line='1180' file='globals' name='xmlFree'/>
+ <function line='613' file='tree' name='xmlBufferFree'/>
+ <typedef line='878' file='xmlwriter' name='xmlTextWriterPtr'/>
+ <function line='1103' file='xmlwriter' name='xmlTextWriterWriteElement'/>
+ <function line='885' file='tree' name='xmlNewDoc'/>
+ </uses>
+ </example>
+ <symbols>
+ <symbol name='LIBXML_TEST_VERSION'>
+ <ref filename='xpath1.c'/>
+ <ref filename='parse3.c'/>
+ <ref filename='reader2.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='io1.c'/>
+ <ref filename='parse4.c'/>
+ </symbol>
+ <symbol name='XML_DEFAULT_VERSION'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='XML_ELEMENT_NODE'>
+ <ref filename='xpath1.c'/>
+ <ref filename='tree1.c'/>
+ </symbol>
+ <symbol name='XML_NAMESPACE_DECL'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='XML_PARSE_DTDATTR'>
+ <ref filename='reader2.c'/>
+ </symbol>
+ <symbol name='XML_PARSE_DTDVALID'>
+ <ref filename='reader2.c'/>
+ <ref filename='parse2.c'/>
+ </symbol>
+ <symbol name='XML_PARSE_NOENT'>
+ <ref filename='reader2.c'/>
+ </symbol>
+ <symbol name='xmlAddChild'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlBufferCreate'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlBufferFree'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlBufferPtr'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlCharEncodingHandlerPtr'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlCleanupParser'>
+ <ref filename='xpath1.c'/>
+ <ref filename='parse3.c'/>
+ <ref filename='reader2.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='io1.c'/>
+ <ref filename='parse4.c'/>
+ </symbol>
+ <symbol name='xmlCreateIntSubset'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlCreatePushParserCtxt'>
+ <ref filename='parse4.c'/>
+ </symbol>
+ <symbol name='xmlCtxtReadFile'>
+ <ref filename='parse2.c'/>
+ </symbol>
+ <symbol name='xmlDocDump'>
+ <ref filename='io1.c'/>
+ <ref filename='xpath2.c'/>
+ <ref filename='reader3.c'/>
+ </symbol>
+ <symbol name='xmlDocDumpFormatMemory'>
+ <ref filename='io2.c'/>
+ </symbol>
+ <symbol name='xmlDocGetRootElement'>
+ <ref filename='tree1.c'/>
+ </symbol>
+ <symbol name='xmlDocPtr'>
+ <ref filename='xpath1.c'/>
+ <ref filename='parse3.c'/>
+ <ref filename='io1.c'/>
+ <ref filename='parse4.c'/>
+ <ref filename='xpath2.c'/>
+ <ref filename='io2.c'/>
+ </symbol>
+ <symbol name='xmlDocSetRootElement'>
+ <ref filename='tree2.c'/>
+ <ref filename='io2.c'/>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlFindCharEncodingHandler'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlFree'>
+ <ref filename='xpath1.c'/>
+ <ref filename='io2.c'/>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlFreeDoc'>
+ <ref filename='xpath1.c'/>
+ <ref filename='parse3.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='io1.c'/>
+ <ref filename='parse4.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlFreeParserCtxt'>
+ <ref filename='parse4.c'/>
+ <ref filename='parse2.c'/>
+ </symbol>
+ <symbol name='xmlFreeTextReader'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ <ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlFreeTextWriter'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlInitParser'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlMalloc'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlMemoryDump'>
+ <ref filename='xpath1.c'/>
+ <ref filename='parse3.c'/>
+ <ref filename='reader2.c'/>
+ <ref filename='tree2.c'/>
+ <ref filename='io1.c'/>
+ <ref filename='parse4.c'/>
+ </symbol>
+ <symbol name='xmlNewChild'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlNewDoc'>
+ <ref filename='tree2.c'/>
+ <ref filename='io2.c'/>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNewDocNode'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNewNode'>
+ <ref filename='tree2.c'/>
+ <ref filename='io2.c'/>
+ </symbol>
+ <symbol name='xmlNewParserCtxt'>
+ <ref filename='parse2.c'/>
+ </symbol>
+ <symbol name='xmlNewProp'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlNewText'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlNewTextWriterDoc'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNewTextWriterFilename'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNewTextWriterMemory'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNewTextWriterTree'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNodePtr'>
+ <ref filename='xpath1.c'/>
+ <ref filename='io2.c'/>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlNodeSetContent'>
+ <ref filename='xpath2.c'/>
+ <ref filename='io2.c'/>
+ </symbol>
+ <symbol name='xmlNsPtr'>
+ <ref filename='xpath1.c'/>
+ </symbol>
+ <symbol name='xmlParseChunk'>
+ <ref filename='parse4.c'/>
+ </symbol>
+ <symbol name='xmlParseFile'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlParserCtxtPtr'>
+ <ref filename='parse4.c'/>
+ <ref filename='parse2.c'/>
+ </symbol>
+ <symbol name='xmlReadFile'>
+ <ref filename='tree1.c'/>
+ <ref filename='parse1.c'/>
+ </symbol>
+ <symbol name='xmlReadMemory'>
+ <ref filename='parse3.c'/>
+ <ref filename='io1.c'/>
+ </symbol>
+ <symbol name='xmlReaderForFile'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ <ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlReaderNewFile'>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlRealloc'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlRegisterInputCallbacks'>
+ <ref filename='io1.c'/>
+ </symbol>
+ <symbol name='xmlSaveFileEnc'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlSaveFormatFileEnc'>
+ <ref filename='tree2.c'/>
+ </symbol>
+ <symbol name='xmlStrchr'>
+ <ref filename='xpath1.c'/>
+ </symbol>
+ <symbol name='xmlStrdup'>
+ <ref filename='xpath1.c'/>
+ </symbol>
+ <symbol name='xmlStrlen'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderConstName'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderConstValue'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderCurrentDoc'>
+ <ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderDepth'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderHasValue'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderIsEmptyElement'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderIsValid'>
+ <ref filename='reader2.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderNodeType'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderPreservePattern'>
+ <ref filename='reader3.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderPtr'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ <ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlTextReaderRead'>
+ <ref filename='reader2.c'/>
+ <ref filename='reader1.c'/>
+ <ref filename='reader3.c'/>
+ <ref filename='reader4.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterEndDocument'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterEndElement'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterPtr'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterStartDocument'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterStartElement'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterWriteAttribute'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterWriteComment'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterWriteElement'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterWriteFormatComment'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlTextWriterWriteFormatElement'>
+ <ref filename='testWriter.c'/>
+ </symbol>
+ <symbol name='xmlXIncludeProcess'>
+ <ref filename='io1.c'/>
+ </symbol>
+ <symbol name='xmlXPathContextPtr'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathEvalExpression'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathFreeContext'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathFreeObject'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathNewContext'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathObjectPtr'>
+ <ref filename='xpath1.c'/>
+ <ref filename='xpath2.c'/>
+ </symbol>
+ <symbol name='xmlXPathRegisterNs'>
+ <ref filename='xpath1.c'/>
+ </symbol>
+ </symbols>
+ <sections>
+ <section name='InputOutput'>
+ <example filename='io1.c'/>
+ <example filename='io2.c'/>
+ </section>
+ <section name='Parsing'>
+ <example filename='parse3.c'/>
+ <example filename='parse4.c'/>
+ <example filename='parse2.c'/>
+ <example filename='parse1.c'/>
+ </section>
+ <section name='Tree'>
+ <example filename='tree2.c'/>
+ <example filename='tree1.c'/>
+ </section>
+ <section name='XPath'>
+ <example filename='xpath1.c'/>
+ <example filename='xpath2.c'/>
+ </section>
+ <section name='xmlReader'>
+ <example filename='reader2.c'/>
+ <example filename='reader1.c'/>
+ <example filename='reader3.c'/>
+ <example filename='reader4.c'/>
+ </section>
+ <section name='xmlWriter'>
+ <example filename='testWriter.c'/>
+ </section>
+ </sections>
+</examples>
diff --git a/doc/examples/examples.xsl b/doc/examples/examples.xsl
new file mode 100644
index 0000000..74aaaa2
--- /dev/null
+++ b/doc/examples/examples.xsl
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ exclude-result-prefixes="exsl">
+
+ <xsl:import href="../site.xsl"/>
+
+ <xsl:variable name="href_base">../</xsl:variable>
+ <xsl:variable name="menu_name">Examples Menu</xsl:variable>
+
+ <xsl:variable name="toc">
+ <form action="../search.php"
+ enctype="application/x-www-form-urlencoded" method="get">
+ <input name="query" type="text" size="20" value=""/>
+ <input name="submit" type="submit" value="Search ..."/>
+ </form>
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a href="{$href_base}index.html">Home</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}docs.html">Developer Menu</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}html/index.html">API Menu</a></li>
+ <xsl:for-each select="/examples/sections/section">
+ <li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>
+ </xsl:for-each>
+ <li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
+ </ul>
+ </xsl:variable>
+
+ <xsl:template match="include">
+ <xsl:variable name="header" select="substring-before(substring-after(., '/'), '&gt;')"/>
+ <xsl:variable name="doc" select="concat('../html/libxml-', $header, 'tml')"/>
+ <li><a href="{$doc}"><xsl:value-of select="."/></a></li>
+ </xsl:template>
+
+ <xsl:template match="typedef">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="header" select="concat(@file, '.h')"/>
+ <xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
+ <li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
+ </xsl:template>
+
+ <xsl:template match="function">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="header" select="concat(@file, '.h')"/>
+ <xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
+ <li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
+ </xsl:template>
+
+ <xsl:template match="macro">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="header" select="concat(@file, '.h')"/>
+ <xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
+ <li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
+ </xsl:template>
+
+ <xsl:template match="example">
+ <xsl:variable name="filename" select="string(@filename)"/>
+ <h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3>
+ <p><xsl:value-of select="purpose"/></p>
+ <p>Includes:</p>
+ <ul>
+ <xsl:for-each select="includes/include">
+ <xsl:apply-templates select='.'/>
+ </xsl:for-each>
+ </ul>
+ <p>Uses:</p>
+ <ul>
+ <xsl:for-each select="uses/*">
+ <xsl:sort select="@line" data-type="number"/>
+ <xsl:apply-templates select='.'/>
+ </xsl:for-each>
+ </ul>
+ <p>Usage:</p>
+ <p><xsl:value-of select="usage"/></p>
+ <p>Author: <xsl:value-of select="author"/></p>
+ </xsl:template>
+
+ <xsl:template match="section">
+ <li><p> <a href="#{@name}"><xsl:value-of select="@name"/></a> :</p>
+ <ul>
+ <xsl:for-each select="example">
+ <xsl:sort select='.'/>
+ <xsl:variable name="filename" select="@filename"/>
+ <li> <a href="#{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="/examples/example[@filename = $filename]/synopsis"/></li>
+ </xsl:for-each>
+ </ul>
+ </li>
+ </xsl:template>
+
+ <xsl:template match="sections">
+ <p> The examples are stored per section depending on the main focus
+ of the example:</p>
+ <ul>
+ <xsl:for-each select="section">
+ <xsl:sort select='.'/>
+ <xsl:apply-templates select='.'/>
+ </xsl:for-each>
+ </ul>
+ <p> Getting the compilation options and libraries dependancies needed
+to generate binaries from the examples is best done on Linux/Unix by using
+the xml2-config script which should have been installed as part of <i>make
+install</i> step or when installing the libxml2 development package:</p>
+<pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre>
+ </xsl:template>
+
+ <xsl:template name="sections-list">
+ <xsl:for-each select="sections/section">
+ <xsl:variable name="section" select="@name"/>
+ <h2> <a name="{$section}"></a><xsl:value-of select="$section"/> Examples</h2>
+ <xsl:apply-templates select='/examples/example[section = $section]'/>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="examples">
+ <xsl:variable name="title">Libxml2 set of examples</xsl:variable>
+ <xsl:document href="index.html" method="xml" encoding="ISO-8859-1"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="toc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates select="sections"/>
+ <xsl:call-template name="sections-list"/>
+ <p><a href="../bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/examples/index.html b/doc/examples/index.html
new file mode 100644
index 0000000..c9314a3
--- /dev/null
+++ b/doc/examples/index.html
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Libxml2 set of examples</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Libxml2 set of examples</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Examples Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="#InputOutput">InputOutput Examples</a></li><li><a href="#Parsing">Parsing Examples</a></li><li><a href="#Tree">Tree Examples</a></li><li><a href="#XPath">XPath Examples</a></li><li><a href="#xmlReader">xmlReader Examples</a></li><li><a href="#xmlWriter">xmlWriter Examples</a></li><li><a href="../guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p> The examples are stored per section depending on the main focus
+ of the example:</p><ul><li><p><a href="#xmlWriter">xmlWriter</a> :</p><ul><li><a href="#testWriter.c">testWriter.c</a>: use various APIs for the xmlWriter</li></ul></li><li><p><a href="#InputOutput">InputOutput</a> :</p><ul><li><a href="#io1.c">io1.c</a>: Example of custom Input/Output</li><li><a href="#io2.c">io2.c</a>: Output to char buffer</li></ul></li><li><p><a href="#Tree">Tree</a> :</p><ul><li><a href="#tree2.c">tree2.c</a>: Creates a tree</li><li><a href="#tree1.c">tree1.c</a>: Navigates a tree to print element names</li></ul></li><li><p><a href="#XPath">XPath</a> :</p><ul><li><a href="#xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints result node set.</li><li><a href="#xpath2.c">xpath2.c</a>: Load a document, locate subelements with XPath, modify said elements and save the resulting document.</li></ul></li><li><p><a href="#Parsing">Parsing</a> :</p><ul><li><a href="#parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</li><li><a href="#parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free it</li><li><a href="#parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free the result</li><li><a href="#parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</li></ul></li><li><p><a href="#xmlReader">xmlReader</a> :</p><ul><li><a href="#reader2.c">reader2.c</a>: Parse and validate an XML file with an xmlReader</li><li><a href="#reader1.c">reader1.c</a>: Parse an XML file with an xmlReader</li><li><a href="#reader3.c">reader3.c</a>: Show how to extract subdocuments with xmlReader</li><li><a href="#reader4.c">reader4.c</a>: Parse multiple XML files reusing an xmlReader</li></ul></li></ul><p> Getting the compilation options and libraries dependancies needed
+to generate binaries from the examples is best done on Linux/Unix by using
+the xml2-config script which should have been installed as part of <i>make
+install</i> step or when installing the libxml2 development package:</p><pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre><h2><a name="InputOutput" id="InputOutput"></a>InputOutput Examples</h2><h3><a name="io1.c" href="io1.c" id="io1.c">io1.c</a>: Example of custom Input/Output</h3><p>Demonstrate the use of xmlRegisterInputCallbacks to build a custom I/O layer, this is used in an XInclude method context to show how dynamic document can be built in a clean way.</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a href="../html/libxml-xmlIO.html">&lt;libxml/xmlIO.h&gt;</a></li><li><a href="../html/libxml-xinclude.html">&lt;libxml/xinclude.h&gt;</a></li><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 105: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 117: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 117: Function <a href="../html/libxml-xmlIO.html#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> from xmlIO.h</li><li> line 124: Function <a href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from parser.h</li><li> line 134: Function <a href="../html/libxml-xinclude.html#xmlXIncludeProcess">xmlXIncludeProcess</a> from xinclude.h</li><li> line 143: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li><li> line 149: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 154: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 158: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li></ul><p>Usage:</p><p>io1</p><p>Author: Daniel Veillard</p><h3><a name="io2.c" href="io2.c" id="io2.c">io2.c</a>: Output to char buffer</h3><p>Demonstrate the use of xmlDocDumpMemory to output document to a character buffer</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 19: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from tree.h</li><li> line 20: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 27: Function <a href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 28: Function <a href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 29: Function <a href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> from tree.h</li><li> line 30: Function <a href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 36: Function <a href="../html/libxml-tree.html#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> from tree.h</li></ul><p>Usage:</p><p>io2</p><p>Author: John Fleck</p><h2><a name="Parsing" id="Parsing"></a>Parsing Examples</h2><h3><a name="parse3.c" href="parse3.c" id="parse3.c">parse3.c</a>: Parse an XML document in memory to a tree and free it</h3><p>Demonstrate the use of xmlReadMemory() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 27: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 33: Function <a href="../html/libxml-parser.html#xmlReadMemory">xmlReadMemory</a> from parser.h</li><li> line 38: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 49: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 54: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 58: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li></ul><p>Usage:</p><p>parse3</p><p>Author: Daniel Veillard</p><h3><a name="parse4.c" href="parse4.c" id="parse4.c">parse4.c</a>: Parse an XML document chunk by chunk to a tree and free it</h3><p>Demonstrate the use of xmlCreatePushParserCtxt() and xmlParseChunk() to read an XML file progressively into a tree and and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 45: Type <a href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 47: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 67: Function <a href="../html/libxml-parser.html#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a> from parser.h</li><li> line 86: Function <a href="../html/libxml-parser.html#xmlParseChunk">xmlParseChunk</a> from parser.h</li><li> line 94: Function <a href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from parser.h</li><li> line 103: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 120: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 131: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 135: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li></ul><p>Usage:</p><p>parse4 test3.xml</p><p>Author: Daniel Veillard</p><h3><a name="parse2.c" href="parse2.c" id="parse2.c">parse2.c</a>: Parse and validate an XML file to a tree and free the result</h3><p>Create a parser context for an XML file, then parse and validate the file, creating a tree, check the validation result and xmlFreeDoc() to free the resulting tree.</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 25: Type <a href="../html/libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> from tree.h</li><li> line 29: Function <a href="../html/libxml-parser.html#xmlNewParserCtxt">xmlNewParserCtxt</a> from parser.h</li><li> line 35: Function <a href="../html/libxml-parser.html#xmlCtxtReadFile">xmlCtxtReadFile</a> from parser.h</li><li> line 47: Function <a href="../html/libxml-parser.html#xmlFreeParserCtxt">xmlFreeParserCtxt</a> from parser.h</li></ul><p>Usage:</p><p>parse2 test2.xml</p><p>Author: Daniel Veillard</p><h3><a name="parse1.c" href="parse1.c" id="parse1.c">parse1.c</a>: Parse an XML file to a tree and free it</h3><p>Demonstrate the use of xmlReadFile() to read an XML file into a tree and and xmlFreeDoc() to free the resulting tree</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: Function <a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from parser.h</li></ul><p>Usage:</p><p>parse1 test1.xml</p><p>Author: Daniel Veillard</p><h2><a name="Tree" id="Tree"></a>Tree Examples</h2><h3><a name="tree2.c" href="tree2.c" id="tree2.c">tree2.c</a>: Creates a tree</h3><p>Shows how to create document, nodes and dump it to stdout or file.</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 34: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 39: Function <a href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 41: Function <a href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 46: Function <a href="../html/libxml-tree.html#xmlCreateIntSubset">xmlCreateIntSubset</a> from tree.h</li><li> line 74: Function <a href="../html/libxml-tree.html#xmlNewNode">xmlNewNode</a> from tree.h</li><li> line 75: Function <a href="../html/libxml-tree.html#xmlNewText">xmlNewText</a> from tree.h</li><li> line 78: Function <a href="../html/libxml-tree.html#xmlAddChild">xmlAddChild</a> from tree.h</li><li> line 88: Function <a href="../html/libxml-tree.html#xmlNewChild">xmlNewChild</a> from tree.h</li><li> line 89: Function <a href="../html/libxml-tree.html#xmlNewProp">xmlNewProp</a> from tree.h</li><li> line 96: Function <a href="../html/libxml-tree.html#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> from tree.h</li><li> line 99: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 105: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 110: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li></ul><p>Usage:</p><p>tree2 &lt;filename&gt; -Default output: stdout</p><p>Author: Lucas Brasilino &lt;brasilino@recife.pe.gov.br&gt;</p><h3><a name="tree1.c" href="tree1.c" id="tree1.c">tree1.c</a>: Navigates a tree to print element names</h3><p>Parse a file to a tree, use xmlDocGetRootElement() to get the root element, then walk the document and print all the element name in document order.</p><p>Includes:</p><ul><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 67: Function <a href="../html/libxml-parser.html#xmlReadFile">xmlReadFile</a> from parser.h</li><li> line 74: Function <a href="../html/libxml-tree.html#xmlDocGetRootElement">xmlDocGetRootElement</a> from tree.h</li></ul><p>Usage:</p><p>tree1 filename_or_URL</p><p>Author: Dodji Seketeli</p><h2><a name="XPath" id="XPath"></a>XPath Examples</h2><h3><a name="xpath1.c" href="xpath1.c" id="xpath1.c">xpath1.c</a>: Evaluate XPath expression and prints result node set.</h3><p>Shows how to evaluate XPath expression and register known namespaces in XPath context.</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 39: Function <a href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 43: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 49: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 54: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li><li> line 86: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type <a href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 94: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> from parser.h</li><li> line 101: Function <a href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from xpath.h</li><li> line 117: Function <a href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from xpath.h</li><li> line 129: Function <a href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from xpath.h</li><li> line 130: Function <a href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from xpath.h</li><li> line 131: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 156: Function <a href="../html/libxml-xmlstring.html#xmlStrdup">xmlStrdup</a> from xmlstring.h</li><li> line 180: Function <a href="../html/libxml-xmlstring.html#xmlStrchr">xmlStrchr</a> from xmlstring.h</li><li> line 186: Function <a href="../html/libxml-xpathInternals.html#xmlXPathRegisterNs">xmlXPathRegisterNs</a> from xpathInternals.h</li><li> line 206: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from tree.h</li><li> line 218: Type <a href="../html/libxml-tree.html#xmlNsPtr">xmlNsPtr</a> from tree.h</li></ul><p>Usage:</p><p>xpath1 &lt;xml-file&gt; &lt;xpath-expr&gt; [&lt;known-ns-list&gt;]</p><p>Author: Aleksey Sanin</p><h3><a name="xpath2.c" href="xpath2.c" id="xpath2.c">xpath2.c</a>: Load a document, locate subelements with XPath, modify said elements and save the resulting document.</h3><p>Shows how to make a full round-trip from a load/edit/save</p><p>Includes:</p><ul><li><a href="../html/libxml-parser.html">&lt;libxml/parser.h&gt;</a></li><li><a href="../html/libxml-xpath.html">&lt;libxml/xpath.h&gt;</a></li><li><a href="../html/libxml-xpathInternals.html">&lt;libxml/xpathInternals.h&gt;</a></li><li><a href="../html/libxml-tree.html">&lt;libxml/tree.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 41: Function <a href="../html/libxml-parser.html#xmlInitParser">xmlInitParser</a> from parser.h</li><li> line 86: Type <a href="../html/libxml-tree.html#xmlDocPtr">xmlDocPtr</a> from tree.h</li><li> line 87: Type <a href="../html/libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> from xpath.h</li><li> line 88: Type <a href="../html/libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from xpath.h</li><li> line 95: Function <a href="../html/libxml-parser.html#xmlParseFile">xmlParseFile</a> from parser.h</li><li> line 102: Function <a href="../html/libxml-xpath.html#xmlXPathNewContext">xmlXPathNewContext</a> from xpath.h</li><li> line 110: Function <a href="../html/libxml-xpath.html#xmlXPathEvalExpression">xmlXPathEvalExpression</a> from xpath.h</li><li> line 123: Function <a href="../html/libxml-xpath.html#xmlXPathFreeObject">xmlXPathFreeObject</a> from xpath.h</li><li> line 124: Function <a href="../html/libxml-xpath.html#xmlXPathFreeContext">xmlXPathFreeContext</a> from xpath.h</li><li> line 127: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li><li> line 131: Function <a href="../html/libxml-tree.html#xmlFreeDoc">xmlFreeDoc</a> from tree.h</li><li> line 162: Function <a href="../html/libxml-tree.html#xmlNodeSetContent">xmlNodeSetContent</a> from tree.h</li></ul><p>Usage:</p><p>xpath2 &lt;xml-file&gt; &lt;xpath-expr&gt; &lt;new-value&gt;</p><p>Author: Aleksey Sanin and Daniel Veillard</p><h2><a name="xmlReader" id="xmlReader"></a>xmlReader Examples</h2><h3><a name="reader2.c" href="reader2.c" id="reader2.c">reader2.c</a>: Parse and validate an XML file with an xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file validating the content in the process and activating options like entities substitution, and DTD attributes defaulting. (Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 30: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a> from xmlreader.h</li><li> line 34: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from xmlreader.h</li><li> line 37: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 38: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a> from xmlreader.h</li><li> line 40: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from xmlreader.h</li><li> line 41: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from xmlreader.h</li><li> line 45: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from xmlstring.h</li><li> line 60: Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 68: Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 76: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 81: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderIsValid">xmlTextReaderIsValid</a> from xmlreader.h</li><li> line 84: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li><li> line 104: Macro <a href="../html/libxml-xmlversion.html#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a> from xmlversion.h</li><li> line 109: Function <a href="../html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a> from parser.h</li><li> line 113: Function <a href="../html/libxml-xmlmemory.html#xmlMemoryDump">xmlMemoryDump</a> from xmlmemory.h</li></ul><p>Usage:</p><p>reader2 &lt;valid_xml_filename&gt;</p><p>Author: Daniel Veillard</p><h3><a name="reader1.c" href="reader1.c" id="reader1.c">reader1.c</a>: Parse an XML file with an xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() to parse an XML file and dump the informations about the nodes found in the process. (Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 29: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstName">xmlTextReaderConstName</a> from xmlreader.h</li><li> line 33: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderConstValue">xmlTextReaderConstValue</a> from xmlreader.h</li><li> line 36: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderDepth">xmlTextReaderDepth</a> from xmlreader.h</li><li> line 37: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderNodeType">xmlTextReaderNodeType</a> from xmlreader.h</li><li> line 39: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> from xmlreader.h</li><li> line 40: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderHasValue">xmlTextReaderHasValue</a> from xmlreader.h</li><li> line 44: Function <a href="../html/libxml-xmlstring.html#xmlStrlen">xmlStrlen</a> from xmlstring.h</li><li> line 59: Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 62: Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 67: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 69: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li></ul><p>Usage:</p><p>reader1 &lt;filename&gt;</p><p>Author: Daniel Veillard</p><h3><a name="reader3.c" href="reader3.c" id="reader3.c">reader3.c</a>: Show how to extract subdocuments with xmlReader</h3><p>Demonstrate the use of xmlTextReaderPreservePattern() to parse an XML file with the xmlReader while collecting only some subparts of the document. (Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 32: Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 38: Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 43: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a> from xmlreader.h</li><li> line 52: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 62: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from xmlreader.h</li><li> line 66: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li><li> line 96: Function <a href="../html/libxml-tree.html#xmlDocDump">xmlDocDump</a> from tree.h</li></ul><p>Usage:</p><p>reader3</p><p>Author: Daniel Veillard</p><h3><a name="reader4.c" href="reader4.c" id="reader4.c">reader4.c</a>: Parse multiple XML files reusing an xmlReader</h3><p>Demonstrate the use of xmlReaderForFile() and xmlReaderNewFile to parse XML files while reusing the reader object and parser context. (Note that the XMLReader functions require libxml2 version later than 2.6.)</p><p>Includes:</p><ul><li><a href="../html/libxml-xmlreader.html">&lt;libxml/xmlreader.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 26: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderRead">xmlTextReaderRead</a> from xmlreader.h</li><li> line 54: Type <a href="../html/libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> from xmlreader.h</li><li> line 72: Function <a href="../html/libxml-xmlreader.html#xmlReaderForFile">xmlReaderForFile</a> from xmlreader.h</li><li> line 83: Function <a href="../html/libxml-xmlreader.html#xmlReaderNewFile">xmlReaderNewFile</a> from xmlreader.h</li><li> line 97: Function <a href="../html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> from xmlreader.h</li><li> line 104: Function <a href="../html/libxml-xmlreader.html#xmlFreeTextReader">xmlFreeTextReader</a> from xmlreader.h</li></ul><p>Usage:</p><p>reader4 &lt;filename&gt; [ filename ... ]</p><p>Author: Graham Bennett</p><h2><a name="xmlWriter" id="xmlWriter"></a>xmlWriter Examples</h2><h3><a name="testWriter.c" href="testWriter.c" id="testWriter.c">testWriter.c</a>: use various APIs for the xmlWriter</h3><p>tests a number of APIs for the xmlWriter, especially the various methods to write to a filename, to a memory buffer, to a new document, or to a subtree. It shows how to do encoding string conversions too. The resulting documents are then serialized.</p><p>Includes:</p><ul><li><a href="../html/libxml-encoding.html">&lt;libxml/encoding.h&gt;</a></li><li><a href="../html/libxml-xmlwriter.html">&lt;libxml/xmlwriter.h&gt;</a></li></ul><p>Uses:</p><ul><li> line 76: Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a> from xmlwriter.h</li><li> line 341: Type <a href="../html/libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> from tree.h</li><li> line 347: Function <a href="../html/libxml-tree.html#xmlBufferCreate">xmlBufferCreate</a> from tree.h</li><li> line 355: Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a> from xmlwriter.h</li><li> line 613: Function <a href="../html/libxml-tree.html#xmlBufferFree">xmlBufferFree</a> from tree.h</li><li> line 632: Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a> from xmlwriter.h</li><li> line 878: Type <a href="../html/libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> from xmlwriter.h</li><li> line 880: Type <a href="../html/libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from tree.h</li><li> line 885: Macro <a href="../html/libxml-parser.html#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a> from parser.h</li><li> line 885: Function <a href="../html/libxml-tree.html#xmlNewDoc">xmlNewDoc</a> from tree.h</li><li> line 894: Function <a href="../html/libxml-tree.html#xmlNewDocNode">xmlNewDocNode</a> from tree.h</li><li> line 901: Function <a href="../html/libxml-tree.html#xmlDocSetRootElement">xmlDocSetRootElement</a> from tree.h</li><li> line 904: Function <a href="../html/libxml-xmlwriter.html#xmlNewTextWriterTree">xmlNewTextWriterTree</a> from xmlwriter.h</li><li> line 913: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a> from xmlwriter.h</li><li> line 925: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a> from xmlwriter.h</li><li> line 949: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a> from xmlwriter.h</li><li> line 959: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a> from xmlwriter.h</li><li> line 1073: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a> from xmlwriter.h</li><li> line 1096: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterStartElement">xmlTextWriterStartElement</a> from xmlwriter.h</li><li> line 1103: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a> from xmlwriter.h</li><li> line 1111: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterEndElement">xmlTextWriterEndElement</a> from xmlwriter.h</li><li> line 1121: Function <a href="../html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a> from xmlwriter.h</li><li> line 1127: Function <a href="../html/libxml-xmlwriter.html#xmlFreeTextWriter">xmlFreeTextWriter</a> from xmlwriter.h</li><li> line 1129: Function <a href="../html/libxml-tree.html#xmlSaveFileEnc">xmlSaveFileEnc</a> from tree.h</li><li> line 1151: Type <a href="../html/libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> from encoding.h</li><li> line 1156: Function <a href="../html/libxml-encoding.html#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a> from encoding.h</li></ul><p>Usage:</p><p>testWriter</p><p>Author: Alfred Mickautsch</p><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/examples/index.py b/doc/examples/index.py
new file mode 100755
index 0000000..7e0efaa
--- /dev/null
+++ b/doc/examples/index.py
@@ -0,0 +1,314 @@
+#!/usr/bin/python -u
+#
+# Indexes the examples and build an XML description
+#
+import string
+import glob
+import sys
+try:
+ import libxml2
+except:
+ sys.exit(1)
+sys.path.insert(0, "..")
+from apibuild import CParser, escape
+
+examples = []
+extras = ['examples.xsl', 'index.html', 'index.py']
+tests = []
+sections = {}
+symbols = {}
+api_dict = None
+api_doc = None
+
+def load_api():
+ global api_dict
+ global api_doc
+
+ if api_dict != None:
+ return
+ api_dict = {}
+ try:
+ print "loading ../libxml2-api.xml"
+ api_doc = libxml2.parseFile("../libxml2-api.xml")
+ except:
+ print "failed to parse ../libxml2-api.xml"
+ sys.exit(1)
+
+def find_symbol(name):
+ global api_dict
+ global api_doc
+
+ if api_doc == None:
+ load_api()
+
+ if name == None:
+ return
+ if api_dict.has_key(name):
+ return api_dict[name]
+ ctxt = api_doc.xpathNewContext()
+ res = ctxt.xpathEval("/api/symbols/*[@name = '%s']" % (name))
+ if type(res) == type([]) and len(res) >= 1:
+ if len(res) > 1:
+ print "Found %d references to %s in the API" % (len(res), name)
+ node = res[0]
+ typ = node.name
+ file = node.xpathEval("string(@file)")
+ info = node.xpathEval("string(info)")
+ else:
+ print "Reference %s not found in the API" % (name)
+ return None
+ ret = (typ, file, info)
+ api_dict[name] = ret
+ return ret
+
+def parse_top_comment(filename, comment):
+ res = {}
+ lines = string.split(comment, "\n")
+ item = None
+ for line in lines:
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ while line != "" and line[0] == '*':
+ line = line[1:]
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ try:
+ (it, line) = string.split(line, ":", 1)
+ item = it
+ while line != "" and (line[0] == ' ' or line[0] == '\t'):
+ line = line[1:]
+ if res.has_key(item):
+ res[item] = res[item] + " " + line
+ else:
+ res[item] = line
+ except:
+ if item != None:
+ if res.has_key(item):
+ res[item] = res[item] + " " + line
+ else:
+ res[item] = line
+ return res
+
+def parse(filename, output):
+ global symbols
+ global sections
+
+ parser = CParser(filename)
+ parser.collect_references()
+ idx = parser.parse()
+ info = parse_top_comment(filename, parser.top_comment)
+ output.write(" <example filename='%s'>\n" % filename)
+ try:
+ synopsis = info['synopsis']
+ output.write(" <synopsis>%s</synopsis>\n" % escape(synopsis));
+ except:
+ print "Example %s lacks a synopsis description" % (filename)
+ try:
+ purpose = info['purpose']
+ output.write(" <purpose>%s</purpose>\n" % escape(purpose));
+ except:
+ print "Example %s lacks a purpose description" % (filename)
+ try:
+ usage = info['usage']
+ output.write(" <usage>%s</usage>\n" % escape(usage));
+ except:
+ print "Example %s lacks an usage description" % (filename)
+ try:
+ test = info['test']
+ output.write(" <test>%s</test>\n" % escape(test));
+ progname=filename[0:-2]
+ command=string.replace(test, progname, './' + progname, 1)
+ tests.append(command)
+ except:
+ pass
+ try:
+ author = info['author']
+ output.write(" <author>%s</author>\n" % escape(author));
+ except:
+ print "Example %s lacks an author description" % (filename)
+ try:
+ copy = info['copy']
+ output.write(" <copy>%s</copy>\n" % escape(copy));
+ except:
+ print "Example %s lacks a copyright description" % (filename)
+ try:
+ section = info['section']
+ output.write(" <section>%s</section>\n" % escape(section));
+ if sections.has_key(section):
+ sections[section].append(filename)
+ else:
+ sections[section] = [filename]
+ except:
+ print "Example %s lacks a section description" % (filename)
+ for topic in info.keys():
+ if topic != "purpose" and topic != "usage" and \
+ topic != "author" and topic != "copy" and \
+ topic != "section" and topic != "synopsis" and topic != "test":
+ str = info[topic]
+ output.write(" <extra topic='%s'>%s</extra>\n" % (
+ escape(topic), escape(str)))
+ output.write(" <includes>\n")
+ for include in idx.includes.keys():
+ if include.find("libxml") != -1:
+ output.write(" <include>%s</include>\n" % (escape(include)))
+ output.write(" </includes>\n")
+ output.write(" <uses>\n")
+ for ref in idx.references.keys():
+ id = idx.references[ref]
+ name = id.get_name()
+ line = id.get_lineno()
+ if symbols.has_key(name):
+ sinfo = symbols[name]
+ refs = sinfo[0]
+ # gather at most 5 references per symbols
+ if refs > 5:
+ continue
+ sinfo.append(filename)
+ sinfo[0] = refs + 1
+ else:
+ symbols[name] = [1, filename]
+ info = find_symbol(name)
+ if info != None:
+ type = info[0]
+ file = info[1]
+ output.write(" <%s line='%d' file='%s' name='%s'/>\n" % (type,
+ line, file, name))
+ else:
+ type = id.get_type()
+ output.write(" <%s line='%d' name='%s'/>\n" % (type,
+ line, name))
+
+ output.write(" </uses>\n")
+ output.write(" </example>\n")
+
+ return idx
+
+def dump_symbols(output):
+ global symbols
+
+ output.write(" <symbols>\n")
+ keys = symbols.keys()
+ keys.sort()
+ for symbol in keys:
+ output.write(" <symbol name='%s'>\n" % (symbol))
+ info = symbols[symbol]
+ i = 1
+ while i < len(info):
+ output.write(" <ref filename='%s'/>\n" % (info[i]))
+ i = i + 1
+ output.write(" </symbol>\n")
+ output.write(" </symbols>\n")
+
+def dump_sections(output):
+ global sections
+
+ output.write(" <sections>\n")
+ keys = sections.keys()
+ keys.sort()
+ for section in keys:
+ output.write(" <section name='%s'>\n" % (section))
+ info = sections[section]
+ i = 0
+ while i < len(info):
+ output.write(" <example filename='%s'/>\n" % (info[i]))
+ i = i + 1
+ output.write(" </section>\n")
+ output.write(" </sections>\n")
+
+def dump_Makefile():
+ for file in glob.glob('*.xml'):
+ extras.append(file)
+ for file in glob.glob('*.res'):
+ extras.append(file)
+ Makefile="""##
+## This file is auto-generated by index.py
+## DO NOT EDIT !!!
+##
+
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
+LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD)
+
+CLEANFILES = *.tmp
+
+if REBUILD_DOCS
+rebuild: examples.xml index.html
+.PHONY: rebuild
+
+examples.xml: index.py $(noinst_PROGRAMS:=.c)
+ cd $(srcdir) && $(PYTHON) index.py
+ $(MAKE) Makefile
+
+index.html: examples.xml examples.xsl
+ cd $(srcdir) && xsltproc examples.xsl examples.xml && echo "Rebuilt web page"
+ -cd $(srcdir) && xmllint --valid --noout index.html
+endif
+
+install-data-local:
+ $(MKDIR_P) $(DESTDIR)$(HTML_DIR)
+ -$(INSTALL) -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
+
+clean-local:
+ test -f Makefile.am || rm -f test?.xml
+
+"""
+ examples.sort()
+ extras.sort()
+ tests.sort()
+ EXTRA_DIST=""
+ for extra in extras:
+ EXTRA_DIST = EXTRA_DIST + " \\\n\t" + extra
+ Makefile = Makefile + "EXTRA_DIST =%s\n\n" % (EXTRA_DIST)
+ noinst_PROGRAMS=""
+ for example in examples:
+ noinst_PROGRAMS = noinst_PROGRAMS + " \\\n\t" + example
+ Makefile = Makefile + "noinst_PROGRAMS =%s\n\n" % (noinst_PROGRAMS)
+ for example in examples:
+ Makefile = Makefile + "%s_SOURCES = %s.c\n\n" % (example, example)
+ Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n"
+ Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n"
+ Makefile = Makefile + "\ttest -f Makefile.am || test -f test1.xml || $(LN_S) $(srcdir)/test?.xml .\n"
+ Makefile = Makefile + "\t@(echo '## examples regression tests')\n"
+ Makefile = Makefile + "\t@(echo > .memdump)\n"
+ for test in tests:
+ Makefile = Makefile + "\t$(CHECKER) %s\n" % (test)
+ Makefile = Makefile + '\t@grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0\n'
+ try:
+ old = open("Makefile.am", "r").read()
+ if old != Makefile:
+ n = open("Makefile.am", "w").write(Makefile)
+ print "Updated Makefile.am"
+ except:
+ print "Failed to read or save Makefile.am"
+# #
+# # Autogenerate the .cvsignore too ... DEPRECATED
+# #
+# ignore = """.memdump
+#Makefile.in
+#Makefile
+#"""
+# for example in examples:
+# ignore = ignore + "%s\n" % (example)
+# try:
+# old = open(".cvsignore", "r").read()
+# if old != ignore:
+# n = open(".cvsignore", "w").write(ignore)
+# print "Updated .cvsignore"
+# except:
+# print "Failed to read or save .cvsignore"
+
+if __name__ == "__main__":
+ load_api()
+ output = open("examples.xml", "w")
+ output.write("<examples>\n")
+
+ for file in glob.glob('*.c'):
+ parse(file, output)
+ examples.append(file[:-2])
+
+ dump_symbols(output)
+ dump_sections(output)
+ output.write("</examples>\n")
+ output.close()
+ dump_Makefile()
+
diff --git a/doc/examples/io1.c b/doc/examples/io1.c
new file mode 100644
index 0000000..d077cd8
--- /dev/null
+++ b/doc/examples/io1.c
@@ -0,0 +1,166 @@
+/**
+ * section: InputOutput
+ * synopsis: Example of custom Input/Output
+ * purpose: Demonstrate the use of xmlRegisterInputCallbacks
+ * to build a custom I/O layer, this is used in an
+ * XInclude method context to show how dynamic document can
+ * be built in a clean way.
+ * usage: io1
+ * test: io1 > io1.tmp && diff io1.tmp $(srcdir)/io1.res
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xinclude.h>
+#include <libxml/xmlIO.h>
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+static const char *result = "<list><people>a</people><people>b</people></list>";
+static const char *cur = NULL;
+static int rlen;
+
+/**
+ * sqlMatch:
+ * @URI: an URI to test
+ *
+ * Check for an sql: query
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+static int
+sqlMatch(const char * URI) {
+ if ((URI != NULL) && (!strncmp(URI, "sql:", 4)))
+ return(1);
+ return(0);
+}
+
+/**
+ * sqlOpen:
+ * @URI: an URI to test
+ *
+ * Return a pointer to the sql: query handler, in this example simply
+ * the current pointer...
+ *
+ * Returns an Input context or NULL in case or error
+ */
+static void *
+sqlOpen(const char * URI) {
+ if ((URI == NULL) || (strncmp(URI, "sql:", 4)))
+ return(NULL);
+ cur = result;
+ rlen = strlen(result);
+ return((void *) cur);
+}
+
+/**
+ * sqlClose:
+ * @context: the read context
+ *
+ * Close the sql: query handler
+ *
+ * Returns 0 or -1 in case of error
+ */
+static int
+sqlClose(void * context) {
+ if (context == NULL) return(-1);
+ cur = NULL;
+ rlen = 0;
+ return(0);
+}
+
+/**
+ * sqlRead:
+ * @context: the read context
+ * @buffer: where to store data
+ * @len: number of bytes to read
+ *
+ * Implement an sql: query read.
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+static int
+sqlRead(void * context, char * buffer, int len) {
+ const char *ptr = (const char *) context;
+
+ if ((context == NULL) || (buffer == NULL) || (len < 0))
+ return(-1);
+
+ if (len > rlen) len = rlen;
+ memcpy(buffer, ptr, len);
+ rlen -= len;
+ return(len);
+}
+
+const char *include = "<?xml version='1.0'?>\n\
+<document xmlns:xi=\"http://www.w3.org/2003/XInclude\">\n\
+ <p>List of people:</p>\n\
+ <xi:include href=\"sql:select_name_from_people\"/>\n\
+</document>\n";
+
+int main(void) {
+ xmlDocPtr doc;
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*
+ * register the new I/O handlers
+ */
+ if (xmlRegisterInputCallbacks(sqlMatch, sqlOpen, sqlRead, sqlClose) < 0) {
+ fprintf(stderr, "failed to register SQL handler\n");
+ exit(1);
+ }
+ /*
+ * parse include into a document
+ */
+ doc = xmlReadMemory(include, strlen(include), "include.xml", NULL, 0);
+ if (doc == NULL) {
+ fprintf(stderr, "failed to parse the including file\n");
+ exit(1);
+ }
+
+ /*
+ * apply the XInclude process, this should trigger the I/O just
+ * registered.
+ */
+ if (xmlXIncludeProcess(doc) <= 0) {
+ fprintf(stderr, "XInclude processing failed\n");
+ exit(1);
+ }
+
+#ifdef LIBXML_OUTPUT_ENABLED
+ /*
+ * save the output for checking to stdout
+ */
+ xmlDocDump(stdout, doc);
+#endif
+
+ /*
+ * Free the document
+ */
+ xmlFreeDoc(doc);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+#else
+int main(void) {
+ fprintf(stderr, "XInclude support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/io1.res b/doc/examples/io1.res
new file mode 100644
index 0000000..adf65c7
--- /dev/null
+++ b/doc/examples/io1.res
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<document xmlns:xi="http://www.w3.org/2003/XInclude">
+ <p>List of people:</p>
+ <list xml:base="sql://select_name_from_people"><people>a</people><people>b</people></list>
+</document>
diff --git a/doc/examples/io2.c b/doc/examples/io2.c
new file mode 100644
index 0000000..4676f4a
--- /dev/null
+++ b/doc/examples/io2.c
@@ -0,0 +1,58 @@
+/**
+ * section: InputOutput
+ * synopsis: Output to char buffer
+ * purpose: Demonstrate the use of xmlDocDumpMemory
+ * to output document to a character buffer
+ * usage: io2
+ * test: io2 > io2.tmp && diff io2.tmp $(srcdir)/io2.res
+ * author: John Fleck
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <libxml/parser.h>
+
+#if defined(LIBXML_TREE_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+int
+main(void)
+{
+
+ xmlNodePtr n;
+ xmlDocPtr doc;
+ xmlChar *xmlbuff;
+ int buffersize;
+
+ /*
+ * Create the document.
+ */
+ doc = xmlNewDoc(BAD_CAST "1.0");
+ n = xmlNewNode(NULL, BAD_CAST "root");
+ xmlNodeSetContent(n, BAD_CAST "content");
+ xmlDocSetRootElement(doc, n);
+
+ /*
+ * Dump the document to a buffer and print it
+ * for demonstration purposes.
+ */
+ xmlDocDumpFormatMemory(doc, &xmlbuff, &buffersize, 1);
+ printf("%s", (char *) xmlbuff);
+
+ /*
+ * Free associated memory.
+ */
+ xmlFree(xmlbuff);
+ xmlFreeDoc(doc);
+
+ return (0);
+
+}
+#else
+#include <stdio.h>
+
+int
+main(void)
+{
+ fprintf(stderr,
+ "library not configured with tree and output support\n");
+ return (1);
+}
+#endif
diff --git a/doc/examples/io2.res b/doc/examples/io2.res
new file mode 100644
index 0000000..8737b87
--- /dev/null
+++ b/doc/examples/io2.res
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<root>content</root>
diff --git a/doc/examples/parse1.c b/doc/examples/parse1.c
new file mode 100644
index 0000000..b44b03b
--- /dev/null
+++ b/doc/examples/parse1.c
@@ -0,0 +1,56 @@
+/**
+ * section: Parsing
+ * synopsis: Parse an XML file to a tree and free it
+ * purpose: Demonstrate the use of xmlReadFile() to read an XML file
+ * into a tree and and xmlFreeDoc() to free the resulting tree
+ * usage: parse1 test1.xml
+ * test: parse1 test1.xml
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+/**
+ * example1Func:
+ * @filename: a filename or an URL
+ *
+ * Parse the resource and free the resulting tree
+ */
+static void
+example1Func(const char *filename) {
+ xmlDocPtr doc; /* the resulting document tree */
+
+ doc = xmlReadFile(filename, NULL, 0);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return;
+ }
+ xmlFreeDoc(doc);
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ example1Func(argv[1]);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/doc/examples/parse2.c b/doc/examples/parse2.c
new file mode 100644
index 0000000..aed7676
--- /dev/null
+++ b/doc/examples/parse2.c
@@ -0,0 +1,72 @@
+/**
+ * section: Parsing
+ * synopsis: Parse and validate an XML file to a tree and free the result
+ * purpose: Create a parser context for an XML file, then parse and validate
+ * the file, creating a tree, check the validation result
+ * and xmlFreeDoc() to free the resulting tree.
+ * usage: parse2 test2.xml
+ * test: parse2 test2.xml
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+/**
+ * exampleFunc:
+ * @filename: a filename or an URL
+ *
+ * Parse and validate the resource and free the resulting tree
+ */
+static void
+exampleFunc(const char *filename) {
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ xmlDocPtr doc; /* the resulting document tree */
+
+ /* create a parser context */
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to allocate parser context\n");
+ return;
+ }
+ /* parse the file, activating the DTD validation option */
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, XML_PARSE_DTDVALID);
+ /* check if parsing suceeded */
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ } else {
+ /* check if validation suceeded */
+ if (ctxt->valid == 0)
+ fprintf(stderr, "Failed to validate %s\n", filename);
+ /* free up the resulting document */
+ xmlFreeDoc(doc);
+ }
+ /* free up the parser context */
+ xmlFreeParserCtxt(ctxt);
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ exampleFunc(argv[1]);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/doc/examples/parse3.c b/doc/examples/parse3.c
new file mode 100644
index 0000000..a2d3a40
--- /dev/null
+++ b/doc/examples/parse3.c
@@ -0,0 +1,60 @@
+/**
+ * section: Parsing
+ * synopsis: Parse an XML document in memory to a tree and free it
+ * purpose: Demonstrate the use of xmlReadMemory() to read an XML file
+ * into a tree and and xmlFreeDoc() to free the resulting tree
+ * usage: parse3
+ * test: parse3
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+static const char *document = "<doc/>";
+
+/**
+ * example3Func:
+ * @content: the content of the document
+ * @length: the length in bytes
+ *
+ * Parse the in memory document and free the resulting tree
+ */
+static void
+example3Func(const char *content, int length) {
+ xmlDocPtr doc; /* the resulting document tree */
+
+ /*
+ * The document being in memory, it have no base per RFC 2396,
+ * and the "noname.xml" argument will serve as its base.
+ */
+ doc = xmlReadMemory(content, length, "noname.xml", NULL, 0);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse document\n");
+ return;
+ }
+ xmlFreeDoc(doc);
+}
+
+int main(void) {
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ example3Func(document, 6);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/doc/examples/parse4.c b/doc/examples/parse4.c
new file mode 100644
index 0000000..3e28056
--- /dev/null
+++ b/doc/examples/parse4.c
@@ -0,0 +1,143 @@
+/**
+ * section: Parsing
+ * synopsis: Parse an XML document chunk by chunk to a tree and free it
+ * purpose: Demonstrate the use of xmlCreatePushParserCtxt() and
+ * xmlParseChunk() to read an XML file progressively
+ * into a tree and and xmlFreeDoc() to free the resulting tree
+ * usage: parse4 test3.xml
+ * test: parse4 test3.xml
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_PUSH_ENABLED
+static FILE *desc;
+
+/**
+ * readPacket:
+ * @mem: array to store the packet
+ * @size: the packet size
+ *
+ * read at most @size bytes from the document and store it in @mem
+ *
+ * Returns the number of bytes read
+ */
+static int
+readPacket(char *mem, int size) {
+ int res;
+
+ res = fread(mem, 1, size, desc);
+ return(res);
+}
+
+/**
+ * example4Func:
+ * @filename: a filename or an URL
+ *
+ * Parse the resource and free the resulting tree
+ */
+static void
+example4Func(const char *filename) {
+ xmlParserCtxtPtr ctxt;
+ char chars[4];
+ xmlDocPtr doc; /* the resulting document tree */
+ int res;
+
+ /*
+ * Read a few first byte to check the input used for the
+ * encoding detection at the parser level.
+ */
+ res = readPacket(chars, 4);
+ if (res <= 0) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return;
+ }
+
+ /*
+ * Create a progressive parsing context, the 2 first arguments
+ * are not used since we want to build a tree and not use a SAX
+ * parsing interface. We also pass the first bytes of the document
+ * to allow encoding detection when creating the parser but this
+ * is optional.
+ */
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename);
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to create parser context !\n");
+ return;
+ }
+
+ /*
+ * loop on the input getting the document data, of course 4 bytes
+ * at a time is not realistic but allows to verify testing on small
+ * documents.
+ */
+ while ((res = readPacket(chars, 4)) > 0) {
+ xmlParseChunk(ctxt, chars, res, 0);
+ }
+
+ /*
+ * there is no more input, indicate the parsing is finished.
+ */
+ xmlParseChunk(ctxt, chars, 0, 1);
+
+ /*
+ * collect the document back and if it was wellformed
+ * and destroy the parser context.
+ */
+ doc = ctxt->myDoc;
+ res = ctxt->wellFormed;
+ xmlFreeParserCtxt(ctxt);
+
+ if (!res) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ }
+
+ /*
+ * since we don't use the document, destroy it now.
+ */
+ xmlFreeDoc(doc);
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*
+ * simulate a progressive parsing using the input file.
+ */
+ desc = fopen(argv[1], "rb");
+ if (desc != NULL) {
+ example4Func(argv[1]);
+ fclose(desc);
+ } else {
+ fprintf(stderr, "Failed to parse %s\n", argv[1]);
+ }
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+#else /* ! LIBXML_PUSH_ENABLED */
+int main(int argc, char **argv) {
+ fprintf(stderr, "Library not compiled with push parser support\n");
+ return(1);
+}
+#endif
diff --git a/doc/examples/reader1.c b/doc/examples/reader1.c
new file mode 100644
index 0000000..e8a005a
--- /dev/null
+++ b/doc/examples/reader1.c
@@ -0,0 +1,107 @@
+/**
+ * section: xmlReader
+ * synopsis: Parse an XML file with an xmlReader
+ * purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file
+ * and dump the informations about the nodes found in the process.
+ * (Note that the XMLReader functions require libxml2 version later
+ * than 2.6.)
+ * usage: reader1 <filename>
+ * test: reader1 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/xmlreader.h>
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * processNode:
+ * @reader: the xmlReader
+ *
+ * Dump information about the current node
+ */
+static void
+processNode(xmlTextReaderPtr reader) {
+ const xmlChar *name, *value;
+
+ name = xmlTextReaderConstName(reader);
+ if (name == NULL)
+ name = BAD_CAST "--";
+
+ value = xmlTextReaderConstValue(reader);
+
+ printf("%d %d %s %d %d",
+ xmlTextReaderDepth(reader),
+ xmlTextReaderNodeType(reader),
+ name,
+ xmlTextReaderIsEmptyElement(reader),
+ xmlTextReaderHasValue(reader));
+ if (value == NULL)
+ printf("\n");
+ else {
+ if (xmlStrlen(value) > 40)
+ printf(" %.40s...\n", value);
+ else
+ printf(" %s\n", value);
+ }
+}
+
+/**
+ * streamFile:
+ * @filename: the file name to parse
+ *
+ * Parse and print information about an XML file.
+ */
+static void
+streamFile(const char *filename) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+ reader = xmlReaderForFile(filename, NULL, 0);
+ if (reader != NULL) {
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ fprintf(stderr, "%s : failed to parse\n", filename);
+ }
+ } else {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ streamFile(argv[1]);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "XInclude support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/reader1.res b/doc/examples/reader1.res
new file mode 100644
index 0000000..eb48d85
--- /dev/null
+++ b/doc/examples/reader1.res
@@ -0,0 +1,14 @@
+0 10 doc 0 0
+0 1 doc 0 0
+1 14 #text 0 1
+
+1 1 src 1 0
+1 14 #text 0 1
+
+1 1 dest 1 0
+1 14 #text 0 1
+
+1 1 src 1 0
+1 14 #text 0 1
+
+0 15 doc 0 0
diff --git a/doc/examples/reader2.c b/doc/examples/reader2.c
new file mode 100644
index 0000000..043b137
--- /dev/null
+++ b/doc/examples/reader2.c
@@ -0,0 +1,122 @@
+/**
+ * section: xmlReader
+ * synopsis: Parse and validate an XML file with an xmlReader
+ * purpose: Demonstrate the use of xmlReaderForFile() to parse an XML file
+ * validating the content in the process and activating options
+ * like entities substitution, and DTD attributes defaulting.
+ * (Note that the XMLReader functions require libxml2 version later
+ * than 2.6.)
+ * usage: reader2 <valid_xml_filename>
+ * test: reader2 test2.xml > reader1.tmp && diff reader1.tmp $(srcdir)/reader1.res
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/xmlreader.h>
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * processNode:
+ * @reader: the xmlReader
+ *
+ * Dump information about the current node
+ */
+static void
+processNode(xmlTextReaderPtr reader) {
+ const xmlChar *name, *value;
+
+ name = xmlTextReaderConstName(reader);
+ if (name == NULL)
+ name = BAD_CAST "--";
+
+ value = xmlTextReaderConstValue(reader);
+
+ printf("%d %d %s %d %d",
+ xmlTextReaderDepth(reader),
+ xmlTextReaderNodeType(reader),
+ name,
+ xmlTextReaderIsEmptyElement(reader),
+ xmlTextReaderHasValue(reader));
+ if (value == NULL)
+ printf("\n");
+ else {
+ if (xmlStrlen(value) > 40)
+ printf(" %.40s...\n", value);
+ else
+ printf(" %s\n", value);
+ }
+}
+
+/**
+ * streamFile:
+ * @filename: the file name to parse
+ *
+ * Parse, validate and print information about an XML file.
+ */
+static void
+streamFile(const char *filename) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+
+ /*
+ * Pass some special parsing options to activate DTD attribute defaulting,
+ * entities substitution and DTD validation
+ */
+ reader = xmlReaderForFile(filename, NULL,
+ XML_PARSE_DTDATTR | /* default DTD attributes */
+ XML_PARSE_NOENT | /* substitute entities */
+ XML_PARSE_DTDVALID); /* validate with the DTD */
+ if (reader != NULL) {
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ /*
+ * Once the document has been fully parsed check the validation results
+ */
+ if (xmlTextReaderIsValid(reader) != 1) {
+ fprintf(stderr, "Document %s does not validate\n", filename);
+ }
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ fprintf(stderr, "%s : failed to parse\n", filename);
+ }
+ } else {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ streamFile(argv[1]);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "XInclude support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/reader3.c b/doc/examples/reader3.c
new file mode 100644
index 0000000..3eeb61f
--- /dev/null
+++ b/doc/examples/reader3.c
@@ -0,0 +1,120 @@
+/**
+ * section: xmlReader
+ * synopsis: Show how to extract subdocuments with xmlReader
+ * purpose: Demonstrate the use of xmlTextReaderPreservePattern()
+ * to parse an XML file with the xmlReader while collecting
+ * only some subparts of the document.
+ * (Note that the XMLReader functions require libxml2 version later
+ * than 2.6.)
+ * usage: reader3
+ * test: reader3 > reader3.tmp && diff reader3.tmp $(srcdir)/reader3.res
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/xmlreader.h>
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+
+
+/**
+ * streamFile:
+ * @filename: the file name to parse
+ *
+ * Parse and print information about an XML file.
+ *
+ * Returns the resulting doc with just the elements preserved.
+ */
+static xmlDocPtr
+extractFile(const char *filename, const xmlChar *pattern) {
+ xmlDocPtr doc;
+ xmlTextReaderPtr reader;
+ int ret;
+
+ /*
+ * build an xmlReader for that file
+ */
+ reader = xmlReaderForFile(filename, NULL, 0);
+ if (reader != NULL) {
+ /*
+ * add the pattern to preserve
+ */
+ if (xmlTextReaderPreservePattern(reader, pattern, NULL) < 0) {
+ fprintf(stderr, "%s : failed add preserve pattern %s\n",
+ filename, (const char *) pattern);
+ }
+ /*
+ * Parse and traverse the tree, collecting the nodes in the process
+ */
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ ret = xmlTextReaderRead(reader);
+ }
+ if (ret != 0) {
+ fprintf(stderr, "%s : failed to parse\n", filename);
+ xmlFreeTextReader(reader);
+ return(NULL);
+ }
+ /*
+ * get the resulting nodes
+ */
+ doc = xmlTextReaderCurrentDoc(reader);
+ /*
+ * Free up the reader
+ */
+ xmlFreeTextReader(reader);
+ } else {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ return(NULL);
+ }
+ return(doc);
+}
+
+int main(int argc, char **argv) {
+ const char *filename = "test3.xml";
+ const char *pattern = "preserved";
+ xmlDocPtr doc;
+
+ if (argc == 3) {
+ filename = argv[1];
+ pattern = argv[2];
+ }
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ doc = extractFile(filename, (const xmlChar *) pattern);
+ if (doc != NULL) {
+ /*
+ * ouptut the result.
+ */
+ xmlDocDump(stdout, doc);
+ /*
+ * don't forget to free up the doc
+ */
+ xmlFreeDoc(doc);
+ }
+
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "Reader, Pattern or output support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/reader3.res b/doc/examples/reader3.res
new file mode 100644
index 0000000..20e2e82
--- /dev/null
+++ b/doc/examples/reader3.res
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<doc><parent><preserved/><preserved>
+ content1
+ <child1/>
+ <child2>content2</child2>
+ <preserved>too</preserved>
+ <child2>content3</child2>
+ <preserved/>
+ <child2>content4</child2>
+ <preserved/>
+ <child2>content5</child2>
+ content6
+ </preserved><preserved/><preserved/></parent></doc>
diff --git a/doc/examples/reader4.c b/doc/examples/reader4.c
new file mode 100644
index 0000000..1289d0d
--- /dev/null
+++ b/doc/examples/reader4.c
@@ -0,0 +1,122 @@
+/**
+ * section: xmlReader
+ * synopsis: Parse multiple XML files reusing an xmlReader
+ * purpose: Demonstrate the use of xmlReaderForFile() and
+ * xmlReaderNewFile to parse XML files while reusing the reader object
+ * and parser context. (Note that the XMLReader functions require
+ * libxml2 version later than 2.6.)
+ * usage: reader4 <filename> [ filename ... ]
+ * test: reader4 test1.xml test2.xml test3.xml > reader4.tmp && diff reader4.tmp $(srcdir)/reader4.res
+ * author: Graham Bennett
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <libxml/xmlreader.h>
+
+#ifdef LIBXML_READER_ENABLED
+
+static void processDoc(xmlTextReaderPtr readerPtr) {
+ int ret;
+ xmlDocPtr docPtr;
+ const xmlChar *URL;
+
+ ret = xmlTextReaderRead(readerPtr);
+ while (ret == 1) {
+ ret = xmlTextReaderRead(readerPtr);
+ }
+
+ /*
+ * One can obtain the document pointer to get insteresting
+ * information about the document like the URL, but one must also
+ * be sure to clean it up at the end (see below).
+ */
+ docPtr = xmlTextReaderCurrentDoc(readerPtr);
+ if (NULL == docPtr) {
+ fprintf(stderr, "failed to obtain document\n");
+ return;
+ }
+
+ URL = docPtr->URL;
+ if (NULL == URL) {
+ fprintf(stderr, "Failed to obtain URL\n");
+ }
+
+ if (ret != 0) {
+ fprintf(stderr, "%s: Failed to parse\n", URL);
+ return;
+ }
+
+ printf("%s: Processed ok\n", (const char *)URL);
+}
+
+int main(int argc, char **argv) {
+ xmlTextReaderPtr readerPtr;
+ int i;
+ xmlDocPtr docPtr;
+
+ if (argc < 2)
+ return(1);
+
+ /*
+ * this initialises the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*
+ * Create a new reader for the first file and process the
+ * document.
+ */
+ readerPtr = xmlReaderForFile(argv[1], NULL, 0);
+ if (NULL == readerPtr) {
+ fprintf(stderr, "%s: failed to create reader\n", argv[1]);
+ return(1);
+ }
+ processDoc(readerPtr);
+
+ /*
+ * The reader can be reused for subsequent files.
+ */
+ for (i=2; i < argc; ++i) {
+ xmlReaderNewFile(readerPtr, argv[i], NULL, 0);
+ if (NULL == readerPtr) {
+ fprintf(stderr, "%s: failed to create reader\n", argv[i]);
+ return(1);
+ }
+ processDoc(readerPtr);
+ }
+
+ /*
+ * Since we've called xmlTextReaderCurrentDoc, we now have to
+ * clean up after ourselves. We only have to do this the last
+ * time, because xmlReaderNewFile calls xmlCtxtReset which takes
+ * care of it.
+ */
+ docPtr = xmlTextReaderCurrentDoc(readerPtr);
+ if (docPtr != NULL)
+ xmlFreeDoc(docPtr);
+
+ /*
+ * Clean up the reader.
+ */
+ xmlFreeTextReader(readerPtr);
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "xmlReader support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/reader4.res b/doc/examples/reader4.res
new file mode 100644
index 0000000..b793f82
--- /dev/null
+++ b/doc/examples/reader4.res
@@ -0,0 +1,3 @@
+test1.xml: Processed ok
+test2.xml: Processed ok
+test3.xml: Processed ok
diff --git a/doc/examples/test1.xml b/doc/examples/test1.xml
new file mode 100644
index 0000000..69d62f2
--- /dev/null
+++ b/doc/examples/test1.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/doc/examples/test2.xml b/doc/examples/test2.xml
new file mode 100644
index 0000000..7390f5e
--- /dev/null
+++ b/doc/examples/test2.xml
@@ -0,0 +1,13 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (src | dest)*>
+<!ELEMENT src EMPTY>
+<!ELEMENT dest EMPTY>
+<!ATTLIST src ref IDREF #IMPLIED>
+<!ATTLIST dest id ID #IMPLIED>
+]>
+<doc>
+ <src ref="foo"/>
+ <dest id="foo"/>
+ <src ref="foo"/>
+</doc>
+
diff --git a/doc/examples/test3.xml b/doc/examples/test3.xml
new file mode 100644
index 0000000..4d0828f
--- /dev/null
+++ b/doc/examples/test3.xml
@@ -0,0 +1,39 @@
+<doc>
+ <parent>
+ <discarded>
+ <discarded/>
+ </discarded>
+ <preserved/>
+ This text node must be discarded
+ <discarded>
+ <discarded/>
+ </discarded>
+ <preserved>
+ content1
+ <child1></child1>
+ <child2>content2</child2>
+ <preserved>too</preserved>
+ <child2>content3</child2>
+ <preserved></preserved>
+ <child2>content4</child2>
+ <preserved/>
+ <child2>content5</child2>
+ content6
+ </preserved>
+ This text node must be discarded
+ <discarded>
+ <discarded/>
+ </discarded>
+ This text node must be discarded
+ <preserved></preserved>
+ This text node must be discarded
+ <preserved/>
+ This text node must be discarded
+ <discarded>
+ <discarded/>
+ </discarded>
+ This text node must be discarded
+ </parent>
+</doc>
+
+
diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c
new file mode 100644
index 0000000..f662f76
--- /dev/null
+++ b/doc/examples/testWriter.c
@@ -0,0 +1,1198 @@
+/**
+ * section: xmlWriter
+ * synopsis: use various APIs for the xmlWriter
+ * purpose: tests a number of APIs for the xmlWriter, especially
+ * the various methods to write to a filename, to a memory
+ * buffer, to a new document, or to a subtree. It shows how to
+ * do encoding string conversions too. The resulting
+ * documents are then serialized.
+ * usage: testWriter
+ * test: testWriter && for i in 1 2 3 4 ; do diff $(srcdir)/writer.xml writer$$i.tmp || break ; done
+ * author: Alfred Mickautsch
+ * copy: see Copyright for the status of this software.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlwriter.h>
+
+#if defined(LIBXML_WRITER_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+
+#define MY_ENCODING "ISO-8859-1"
+
+void testXmlwriterFilename(const char *uri);
+void testXmlwriterMemory(const char *file);
+void testXmlwriterDoc(const char *file);
+void testXmlwriterTree(const char *file);
+xmlChar *ConvertInput(const char *in, const char *encoding);
+
+int
+main(void)
+{
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /* first, the file version */
+ testXmlwriterFilename("writer1.tmp");
+
+ /* next, the memory version */
+ testXmlwriterMemory("writer2.tmp");
+
+ /* next, the DOM version */
+ testXmlwriterDoc("writer3.tmp");
+
+ /* next, the tree version */
+ testXmlwriterTree("writer4.tmp");
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return 0;
+}
+
+/**
+ * testXmlwriterFilename:
+ * @uri: the output URI
+ *
+ * test the xmlWriter interface when writing to a new file
+ */
+void
+testXmlwriterFilename(const char *uri)
+{
+ int rc;
+ xmlTextWriterPtr writer;
+ xmlChar *tmp;
+
+ /* Create a new XmlWriter for uri, with no compression. */
+ writer = xmlNewTextWriterFilename(uri, 0);
+ if (writer == NULL) {
+ printf("testXmlwriterFilename: Error creating the xml writer\n");
+ return;
+ }
+
+ /* Start the document with the xml default for the version,
+ * encoding ISO 8859-1 and the default for the standalone
+ * declaration. */
+ rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartDocument\n");
+ return;
+ }
+
+ /* Start an element named "EXAMPLE". Since thist is the first
+ * element, this will be the root element of the document. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write a comment as child of EXAMPLE.
+ * Please observe, that the input to the xmlTextWriter functions
+ * HAS to be in UTF-8, even if the output XML is encoded
+ * in iso-8859-1 */
+ tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ MY_ENCODING);
+ rc = xmlTextWriterWriteComment(writer, tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "ORDER" as child of EXAMPLE. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Add an attribute with name "version" and value "1.0" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",
+ BAD_CAST "1.0");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Add an attribute with name "xml:lang" and value "de" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST "de");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Write a comment as child of ORDER */
+ tmp = ConvertInput("<äöü>", MY_ENCODING);
+ rc = xmlTextWriterWriteFormatComment(writer,
+ "This is another comment with special chars: %s",
+ tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "HEADER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "HEADER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "X_ORDER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID",
+ "%010d", 53535);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "CUSTOMER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CUSTOMER_ID",
+ "%d", 1010);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "NAME_1" as child of HEADER. */
+ tmp = ConvertInput("Müller", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Write an element named "NAME_2" as child of HEADER. */
+ tmp = ConvertInput("Jörg", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Close the element named HEADER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRIES" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRIES");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test>");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 10);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test 2>");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 20);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRIES. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "FOOTER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "FOOTER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "TEXT" as child of FOOTER. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "TEXT",
+ BAD_CAST "This is a text.");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Close the element named FOOTER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Here we could close the elements ORDER and EXAMPLE using the
+ * function xmlTextWriterEndElement, but since we do not want to
+ * write any other elements, we simply call xmlTextWriterEndDocument,
+ * which will do all the work. */
+ rc = xmlTextWriterEndDocument(writer);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterFilename: Error at xmlTextWriterEndDocument\n");
+ return;
+ }
+
+ xmlFreeTextWriter(writer);
+}
+
+/**
+ * testXmlwriterMemory:
+ * @file: the output file
+ *
+ * test the xmlWriter interface when writing to memory
+ */
+void
+testXmlwriterMemory(const char *file)
+{
+ int rc;
+ xmlTextWriterPtr writer;
+ xmlBufferPtr buf;
+ xmlChar *tmp;
+ FILE *fp;
+
+ /* Create a new XML buffer, to which the XML document will be
+ * written */
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ printf("testXmlwriterMemory: Error creating the xml buffer\n");
+ return;
+ }
+
+ /* Create a new XmlWriter for memory, with no compression.
+ * Remark: there is no compression for this kind of xmlTextWriter */
+ writer = xmlNewTextWriterMemory(buf, 0);
+ if (writer == NULL) {
+ printf("testXmlwriterMemory: Error creating the xml writer\n");
+ return;
+ }
+
+ /* Start the document with the xml default for the version,
+ * encoding ISO 8859-1 and the default for the standalone
+ * declaration. */
+ rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartDocument\n");
+ return;
+ }
+
+ /* Start an element named "EXAMPLE". Since thist is the first
+ * element, this will be the root element of the document. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write a comment as child of EXAMPLE.
+ * Please observe, that the input to the xmlTextWriter functions
+ * HAS to be in UTF-8, even if the output XML is encoded
+ * in iso-8859-1 */
+ tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ MY_ENCODING);
+ rc = xmlTextWriterWriteComment(writer, tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "ORDER" as child of EXAMPLE. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Add an attribute with name "version" and value "1.0" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",
+ BAD_CAST "1.0");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Add an attribute with name "xml:lang" and value "de" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST "de");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Write a comment as child of ORDER */
+ tmp = ConvertInput("<äöü>", MY_ENCODING);
+ rc = xmlTextWriterWriteFormatComment(writer,
+ "This is another comment with special chars: %s",
+ tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "HEADER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "HEADER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "X_ORDER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID",
+ "%010d", 53535);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "CUSTOMER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CUSTOMER_ID",
+ "%d", 1010);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "NAME_1" as child of HEADER. */
+ tmp = ConvertInput("Müller", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Write an element named "NAME_2" as child of HEADER. */
+ tmp = ConvertInput("Jörg", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
+
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Close the element named HEADER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRIES" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRIES");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test>");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 10);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test 2>");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 20);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRIES. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "FOOTER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "FOOTER");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "TEXT" as child of FOOTER. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "TEXT",
+ BAD_CAST "This is a text.");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterMemory: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Close the element named FOOTER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Here we could close the elements ORDER and EXAMPLE using the
+ * function xmlTextWriterEndElement, but since we do not want to
+ * write any other elements, we simply call xmlTextWriterEndDocument,
+ * which will do all the work. */
+ rc = xmlTextWriterEndDocument(writer);
+ if (rc < 0) {
+ printf("testXmlwriterMemory: Error at xmlTextWriterEndDocument\n");
+ return;
+ }
+
+ xmlFreeTextWriter(writer);
+
+ fp = fopen(file, "w");
+ if (fp == NULL) {
+ printf("testXmlwriterMemory: Error at fopen\n");
+ return;
+ }
+
+ fprintf(fp, "%s", (const char *) buf->content);
+
+ fclose(fp);
+
+ xmlBufferFree(buf);
+}
+
+/**
+ * testXmlwriterDoc:
+ * @file: the output file
+ *
+ * test the xmlWriter interface when creating a new document
+ */
+void
+testXmlwriterDoc(const char *file)
+{
+ int rc;
+ xmlTextWriterPtr writer;
+ xmlChar *tmp;
+ xmlDocPtr doc;
+
+
+ /* Create a new XmlWriter for DOM, with no compression. */
+ writer = xmlNewTextWriterDoc(&doc, 0);
+ if (writer == NULL) {
+ printf("testXmlwriterDoc: Error creating the xml writer\n");
+ return;
+ }
+
+ /* Start the document with the xml default for the version,
+ * encoding ISO 8859-1 and the default for the standalone
+ * declaration. */
+ rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartDocument\n");
+ return;
+ }
+
+ /* Start an element named "EXAMPLE". Since thist is the first
+ * element, this will be the root element of the document. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write a comment as child of EXAMPLE.
+ * Please observe, that the input to the xmlTextWriter functions
+ * HAS to be in UTF-8, even if the output XML is encoded
+ * in iso-8859-1 */
+ tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ MY_ENCODING);
+ rc = xmlTextWriterWriteComment(writer, tmp);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "ORDER" as child of EXAMPLE. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Add an attribute with name "version" and value "1.0" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",
+ BAD_CAST "1.0");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Add an attribute with name "xml:lang" and value "de" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST "de");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Write a comment as child of ORDER */
+ tmp = ConvertInput("<äöü>", MY_ENCODING);
+ rc = xmlTextWriterWriteFormatComment(writer,
+ "This is another comment with special chars: %s",
+ tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "HEADER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "HEADER");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "X_ORDER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID",
+ "%010d", 53535);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "CUSTOMER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CUSTOMER_ID",
+ "%d", 1010);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "NAME_1" as child of HEADER. */
+ tmp = ConvertInput("Müller", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Write an element named "NAME_2" as child of HEADER. */
+ tmp = ConvertInput("Jörg", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Close the element named HEADER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRIES" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRIES");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test>");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 10);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test 2>");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 20);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterDoc: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRIES. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "FOOTER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "FOOTER");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "TEXT" as child of FOOTER. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "TEXT",
+ BAD_CAST "This is a text.");
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Close the element named FOOTER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Here we could close the elements ORDER and EXAMPLE using the
+ * function xmlTextWriterEndElement, but since we do not want to
+ * write any other elements, we simply call xmlTextWriterEndDocument,
+ * which will do all the work. */
+ rc = xmlTextWriterEndDocument(writer);
+ if (rc < 0) {
+ printf("testXmlwriterDoc: Error at xmlTextWriterEndDocument\n");
+ return;
+ }
+
+ xmlFreeTextWriter(writer);
+
+ xmlSaveFileEnc(file, doc, MY_ENCODING);
+
+ xmlFreeDoc(doc);
+}
+
+/**
+ * testXmlwriterTree:
+ * @file: the output file
+ *
+ * test the xmlWriter interface when writing to a subtree
+ */
+void
+testXmlwriterTree(const char *file)
+{
+ int rc;
+ xmlTextWriterPtr writer;
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ xmlChar *tmp;
+
+ /* Create a new XML DOM tree, to which the XML document will be
+ * written */
+ doc = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION);
+ if (doc == NULL) {
+ printf
+ ("testXmlwriterTree: Error creating the xml document tree\n");
+ return;
+ }
+
+ /* Create a new XML node, to which the XML document will be
+ * appended */
+ node = xmlNewDocNode(doc, NULL, BAD_CAST "EXAMPLE", NULL);
+ if (node == NULL) {
+ printf("testXmlwriterTree: Error creating the xml node\n");
+ return;
+ }
+
+ /* Make ELEMENT the root node of the tree */
+ xmlDocSetRootElement(doc, node);
+
+ /* Create a new XmlWriter for DOM tree, with no compression. */
+ writer = xmlNewTextWriterTree(doc, node, 0);
+ if (writer == NULL) {
+ printf("testXmlwriterTree: Error creating the xml writer\n");
+ return;
+ }
+
+ /* Start the document with the xml default for the version,
+ * encoding ISO 8859-1 and the default for the standalone
+ * declaration. */
+ rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartDocument\n");
+ return;
+ }
+
+ /* Write a comment as child of EXAMPLE.
+ * Please observe, that the input to the xmlTextWriter functions
+ * HAS to be in UTF-8, even if the output XML is encoded
+ * in iso-8859-1 */
+ tmp = ConvertInput("This is a comment with special chars: <äöü>",
+ MY_ENCODING);
+ rc = xmlTextWriterWriteComment(writer, tmp);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "ORDER" as child of EXAMPLE. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Add an attribute with name "version" and value "1.0" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",
+ BAD_CAST "1.0");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Add an attribute with name "xml:lang" and value "de" to ORDER. */
+ rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST "de");
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteAttribute\n");
+ return;
+ }
+
+ /* Write a comment as child of ORDER */
+ tmp = ConvertInput("<äöü>", MY_ENCODING);
+ rc = xmlTextWriterWriteFormatComment(writer,
+ "This is another comment with special chars: %s",
+ tmp);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteFormatComment\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Start an element named "HEADER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "HEADER");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "X_ORDER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID",
+ "%010d", 53535);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "CUSTOMER_ID" as child of HEADER. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CUSTOMER_ID",
+ "%d", 1010);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Write an element named "NAME_1" as child of HEADER. */
+ tmp = ConvertInput("Müller", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Write an element named "NAME_2" as child of HEADER. */
+ tmp = ConvertInput("Jörg", MY_ENCODING);
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+ if (tmp != NULL) xmlFree(tmp);
+
+ /* Close the element named HEADER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRIES" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRIES");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test>");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 10);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "ENTRY" as child of ENTRIES. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "ARTICLE" as child of ENTRY. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",
+ BAD_CAST "<Test 2>");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Write an element named "ENTRY_NO" as child of ENTRY. */
+ rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",
+ 20);
+ if (rc < 0) {
+ printf
+ ("testXmlwriterTree: Error at xmlTextWriterWriteFormatElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRY. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Close the element named ENTRIES. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Start an element named "FOOTER" as child of ORDER. */
+ rc = xmlTextWriterStartElement(writer, BAD_CAST "FOOTER");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterStartElement\n");
+ return;
+ }
+
+ /* Write an element named "TEXT" as child of FOOTER. */
+ rc = xmlTextWriterWriteElement(writer, BAD_CAST "TEXT",
+ BAD_CAST "This is a text.");
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterWriteElement\n");
+ return;
+ }
+
+ /* Close the element named FOOTER. */
+ rc = xmlTextWriterEndElement(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndElement\n");
+ return;
+ }
+
+ /* Here we could close the elements ORDER and EXAMPLE using the
+ * function xmlTextWriterEndElement, but since we do not want to
+ * write any other elements, we simply call xmlTextWriterEndDocument,
+ * which will do all the work. */
+ rc = xmlTextWriterEndDocument(writer);
+ if (rc < 0) {
+ printf("testXmlwriterTree: Error at xmlTextWriterEndDocument\n");
+ return;
+ }
+
+ xmlFreeTextWriter(writer);
+
+ xmlSaveFileEnc(file, doc, MY_ENCODING);
+
+ xmlFreeDoc(doc);
+}
+
+/**
+ * ConvertInput:
+ * @in: string in a given encoding
+ * @encoding: the encoding used
+ *
+ * Converts @in into UTF-8 for processing with libxml2 APIs
+ *
+ * Returns the converted UTF-8 string, or NULL in case of error.
+ */
+xmlChar *
+ConvertInput(const char *in, const char *encoding)
+{
+ xmlChar *out;
+ int ret;
+ int size;
+ int out_size;
+ int temp;
+ xmlCharEncodingHandlerPtr handler;
+
+ if (in == 0)
+ return 0;
+
+ handler = xmlFindCharEncodingHandler(encoding);
+
+ if (!handler) {
+ printf("ConvertInput: no encoding handler found for '%s'\n",
+ encoding ? encoding : "");
+ return 0;
+ }
+
+ size = (int) strlen(in) + 1;
+ out_size = size * 2 - 1;
+ out = (unsigned char *) xmlMalloc((size_t) out_size);
+
+ if (out != 0) {
+ temp = size - 1;
+ ret = handler->input(out, &out_size, (const xmlChar *) in, &temp);
+ if ((ret < 0) || (temp - size + 1)) {
+ if (ret < 0) {
+ printf("ConvertInput: conversion wasn't successful.\n");
+ } else {
+ printf
+ ("ConvertInput: conversion wasn't successful. converted: %i octets.\n",
+ temp);
+ }
+
+ xmlFree(out);
+ out = 0;
+ } else {
+ out = (unsigned char *) xmlRealloc(out, out_size + 1);
+ out[out_size] = 0; /*null terminating out */
+ }
+ } else {
+ printf("ConvertInput: no mem\n");
+ }
+
+ return out;
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "Writer or output support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/tree1.c b/doc/examples/tree1.c
new file mode 100644
index 0000000..e6faefc
--- /dev/null
+++ b/doc/examples/tree1.c
@@ -0,0 +1,94 @@
+/**
+ * section: Tree
+ * synopsis: Navigates a tree to print element names
+ * purpose: Parse a file to a tree, use xmlDocGetRootElement() to
+ * get the root element, then walk the document and print
+ * all the element name in document order.
+ * usage: tree1 filename_or_URL
+ * test: tree1 test2.xml > tree1.tmp && diff tree1.tmp $(srcdir)/tree1.res
+ * author: Dodji Seketeli
+ * copy: see Copyright for the status of this software.
+ */
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_TREE_ENABLED
+
+/*
+ *To compile this file using gcc you can type
+ *gcc `xml2-config --cflags --libs` -o xmlexample libxml2-example.c
+ */
+
+/**
+ * print_element_names:
+ * @a_node: the initial xml node to consider.
+ *
+ * Prints the names of the all the xml elements
+ * that are siblings or children of a given xml node.
+ */
+static void
+print_element_names(xmlNode * a_node)
+{
+ xmlNode *cur_node = NULL;
+
+ for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
+ if (cur_node->type == XML_ELEMENT_NODE) {
+ printf("node type: Element, name: %s\n", cur_node->name);
+ }
+
+ print_element_names(cur_node->children);
+ }
+}
+
+
+/**
+ * Simple example to parse a file called "file.xml",
+ * walk down the DOM, and print the name of the
+ * xml elements nodes.
+ */
+int
+main(int argc, char **argv)
+{
+ xmlDoc *doc = NULL;
+ xmlNode *root_element = NULL;
+
+ if (argc != 2)
+ return(1);
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*parse the file and get the DOM */
+ doc = xmlReadFile(argv[1], NULL, 0);
+
+ if (doc == NULL) {
+ printf("error: could not parse file %s\n", argv[1]);
+ }
+
+ /*Get the root element node */
+ root_element = xmlDocGetRootElement(doc);
+
+ print_element_names(root_element);
+
+ /*free the document */
+ xmlFreeDoc(doc);
+
+ /*
+ *Free the global variables that may
+ *have been allocated by the parser.
+ */
+ xmlCleanupParser();
+
+ return 0;
+}
+#else
+int main(void) {
+ fprintf(stderr, "Tree support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/tree1.res b/doc/examples/tree1.res
new file mode 100644
index 0000000..7b14ad0
--- /dev/null
+++ b/doc/examples/tree1.res
@@ -0,0 +1,4 @@
+node type: Element, name: doc
+node type: Element, name: src
+node type: Element, name: dest
+node type: Element, name: src
diff --git a/doc/examples/tree2.c b/doc/examples/tree2.c
new file mode 100644
index 0000000..1cd1abe
--- /dev/null
+++ b/doc/examples/tree2.c
@@ -0,0 +1,118 @@
+/*
+ * section: Tree
+ * synopsis: Creates a tree
+ * purpose: Shows how to create document, nodes and dump it to stdout or file.
+ * usage: tree2 <filename> -Default output: stdout
+ * test: tree2 > tree2.tmp && diff tree2.tmp $(srcdir)/tree2.res
+ * author: Lucas Brasilino <brasilino@recife.pe.gov.br>
+ * copy: see Copyright for the status of this software
+ */
+
+#include <stdio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+#if defined(LIBXML_TREE_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+
+/*
+ *To compile this file using gcc you can type
+ *gcc `xml2-config --cflags --libs` -o tree2 tree2.c
+ */
+
+/* A simple example how to create DOM. Libxml2 automagically
+ * allocates the necessary amount of memory to it.
+*/
+int
+main(int argc, char **argv)
+{
+ xmlDocPtr doc = NULL; /* document pointer */
+ xmlNodePtr root_node = NULL, node = NULL, node1 = NULL;/* node pointers */
+ xmlDtdPtr dtd = NULL; /* DTD pointer */
+ char buff[256];
+ int i, j;
+
+ LIBXML_TEST_VERSION;
+
+ /*
+ * Creates a new document, a node and set it as a root node
+ */
+ doc = xmlNewDoc(BAD_CAST "1.0");
+ root_node = xmlNewNode(NULL, BAD_CAST "root");
+ xmlDocSetRootElement(doc, root_node);
+
+ /*
+ * Creates a DTD declaration. Isn't mandatory.
+ */
+ dtd = xmlCreateIntSubset(doc, BAD_CAST "root", NULL, BAD_CAST "tree2.dtd");
+
+ /*
+ * xmlNewChild() creates a new node, which is "attached" as child node
+ * of root_node node.
+ */
+ xmlNewChild(root_node, NULL, BAD_CAST "node1",
+ BAD_CAST "content of node 1");
+ /*
+ * The same as above, but the new child node doesn't have a content
+ */
+ xmlNewChild(root_node, NULL, BAD_CAST "node2", NULL);
+
+ /*
+ * xmlNewProp() creates attributes, which is "attached" to an node.
+ * It returns xmlAttrPtr, which isn't used here.
+ */
+ node =
+ xmlNewChild(root_node, NULL, BAD_CAST "node3",
+ BAD_CAST "this node has attributes");
+ xmlNewProp(node, BAD_CAST "attribute", BAD_CAST "yes");
+ xmlNewProp(node, BAD_CAST "foo", BAD_CAST "bar");
+
+ /*
+ * Here goes another way to create nodes. xmlNewNode() and xmlNewText
+ * creates a node and a text node separately. They are "attached"
+ * by xmlAddChild()
+ */
+ node = xmlNewNode(NULL, BAD_CAST "node4");
+ node1 = xmlNewText(BAD_CAST
+ "other way to create content (which is also a node)");
+ xmlAddChild(node, node1);
+ xmlAddChild(root_node, node);
+
+ /*
+ * A simple loop that "automates" nodes creation
+ */
+ for (i = 5; i < 7; i++) {
+ sprintf(buff, "node%d", i);
+ node = xmlNewChild(root_node, NULL, BAD_CAST buff, NULL);
+ for (j = 1; j < 4; j++) {
+ sprintf(buff, "node%d%d", i, j);
+ node1 = xmlNewChild(node, NULL, BAD_CAST buff, NULL);
+ xmlNewProp(node1, BAD_CAST "odd", BAD_CAST((j % 2) ? "no" : "yes"));
+ }
+ }
+
+ /*
+ * Dumping document to stdio or file
+ */
+ xmlSaveFormatFileEnc(argc > 1 ? argv[1] : "-", doc, "UTF-8", 1);
+
+ /*free the document */
+ xmlFreeDoc(doc);
+
+ /*
+ *Free the global variables that may
+ *have been allocated by the parser.
+ */
+ xmlCleanupParser();
+
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
+#else
+int main(void) {
+ fprintf(stderr, "tree support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/tree2.res b/doc/examples/tree2.res
new file mode 100644
index 0000000..ed00195
--- /dev/null
+++ b/doc/examples/tree2.res
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE root SYSTEM "tree2.dtd">
+<root>
+ <node1>content of node 1</node1>
+ <node2/>
+ <node3 attribute="yes" foo="bar">this node has attributes</node3>
+ <node4>other way to create content (which is also a node)</node4>
+ <node5>
+ <node51 odd="no"/>
+ <node52 odd="yes"/>
+ <node53 odd="no"/>
+ </node5>
+ <node6>
+ <node61 odd="no"/>
+ <node62 odd="yes"/>
+ <node63 odd="no"/>
+ </node6>
+</root>
diff --git a/doc/examples/tst.xml b/doc/examples/tst.xml
new file mode 100644
index 0000000..1cc6c95
--- /dev/null
+++ b/doc/examples/tst.xml
@@ -0,0 +1,7 @@
+<thing>
+ <thing1>hello</thing1>
+</thing>
+<thing>
+ <thing2>goodbye</thing2>
+</thing>
+
diff --git a/doc/examples/writer.xml b/doc/examples/writer.xml
new file mode 100644
index 0000000..6ab05fd
--- /dev/null
+++ b/doc/examples/writer.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<EXAMPLE><!--This is a comment with special chars: <äöü>--><ORDER version="1.0" xml:lang="de"><!--This is another comment with special chars: <äöü>--><HEADER><X_ORDER_ID>0000053535</X_ORDER_ID><CUSTOMER_ID>1010</CUSTOMER_ID><NAME_1>Müller</NAME_1><NAME_2>Jörg</NAME_2></HEADER><ENTRIES><ENTRY><ARTICLE>&lt;Test&gt;</ARTICLE><ENTRY_NO>10</ENTRY_NO></ENTRY><ENTRY><ARTICLE>&lt;Test 2&gt;</ARTICLE><ENTRY_NO>20</ENTRY_NO></ENTRY></ENTRIES><FOOTER><TEXT>This is a text.</TEXT></FOOTER></ORDER></EXAMPLE>
diff --git a/doc/examples/xpath1.c b/doc/examples/xpath1.c
new file mode 100644
index 0000000..0a31650
--- /dev/null
+++ b/doc/examples/xpath1.c
@@ -0,0 +1,250 @@
+/**
+ * section: XPath
+ * synopsis: Evaluate XPath expression and prints result node set.
+ * purpose: Shows how to evaluate XPath expression and register
+ * known namespaces in XPath context.
+ * usage: xpath1 <xml-file> <xpath-expr> [<known-ns-list>]
+ * test: xpath1 test3.xml '//child2' > xpath1.tmp && diff xpath1.tmp $(srcdir)/xpath1.res
+ * author: Aleksey Sanin
+ * copy: see Copyright for the status of this software.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_SAX1_ENABLED)
+
+
+static void usage(const char *name);
+int execute_xpath_expression(const char* filename, const xmlChar* xpathExpr, const xmlChar* nsList);
+int register_namespaces(xmlXPathContextPtr xpathCtx, const xmlChar* nsList);
+void print_xpath_nodes(xmlNodeSetPtr nodes, FILE* output);
+
+int
+main(int argc, char **argv) {
+ /* Parse command line and process file */
+ if((argc < 3) || (argc > 4)) {
+ fprintf(stderr, "Error: wrong number of arguments.\n");
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Init libxml */
+ xmlInitParser();
+ LIBXML_TEST_VERSION
+
+ /* Do the main job */
+ if(execute_xpath_expression(argv[1], BAD_CAST argv[2], (argc > 3) ? BAD_CAST argv[3] : NULL) < 0) {
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Shutdown libxml */
+ xmlCleanupParser();
+
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return 0;
+}
+
+/**
+ * usage:
+ * @name: the program name.
+ *
+ * Prints usage information.
+ */
+static void
+usage(const char *name) {
+ assert(name);
+
+ fprintf(stderr, "Usage: %s <xml-file> <xpath-expr> [<known-ns-list>]\n", name);
+ fprintf(stderr, "where <known-ns-list> is a list of known namespaces\n");
+ fprintf(stderr, "in \"<prefix1>=<href1> <prefix2>=href2> ...\" format\n");
+}
+
+/**
+ * execute_xpath_expression:
+ * @filename: the input XML filename.
+ * @xpathExpr: the xpath expression for evaluation.
+ * @nsList: the optional list of known namespaces in
+ * "<prefix1>=<href1> <prefix2>=href2> ..." format.
+ *
+ * Parses input XML file, evaluates XPath expression and prints results.
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+int
+execute_xpath_expression(const char* filename, const xmlChar* xpathExpr, const xmlChar* nsList) {
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpathCtx;
+ xmlXPathObjectPtr xpathObj;
+
+ assert(filename);
+ assert(xpathExpr);
+
+ /* Load XML document */
+ doc = xmlParseFile(filename);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
+ return(-1);
+ }
+
+ /* Create xpath evaluation context */
+ xpathCtx = xmlXPathNewContext(doc);
+ if(xpathCtx == NULL) {
+ fprintf(stderr,"Error: unable to create new XPath context\n");
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* Register namespaces from list (if any) */
+ if((nsList != NULL) && (register_namespaces(xpathCtx, nsList) < 0)) {
+ fprintf(stderr,"Error: failed to register namespaces list \"%s\"\n", nsList);
+ xmlXPathFreeContext(xpathCtx);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* Evaluate xpath expression */
+ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);
+ if(xpathObj == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpathExpr);
+ xmlXPathFreeContext(xpathCtx);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* Print results */
+ print_xpath_nodes(xpathObj->nodesetval, stdout);
+
+ /* Cleanup */
+ xmlXPathFreeObject(xpathObj);
+ xmlXPathFreeContext(xpathCtx);
+ xmlFreeDoc(doc);
+
+ return(0);
+}
+
+/**
+ * register_namespaces:
+ * @xpathCtx: the pointer to an XPath context.
+ * @nsList: the list of known namespaces in
+ * "<prefix1>=<href1> <prefix2>=href2> ..." format.
+ *
+ * Registers namespaces from @nsList in @xpathCtx.
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+int
+register_namespaces(xmlXPathContextPtr xpathCtx, const xmlChar* nsList) {
+ xmlChar* nsListDup;
+ xmlChar* prefix;
+ xmlChar* href;
+ xmlChar* next;
+
+ assert(xpathCtx);
+ assert(nsList);
+
+ nsListDup = xmlStrdup(nsList);
+ if(nsListDup == NULL) {
+ fprintf(stderr, "Error: unable to strdup namespaces list\n");
+ return(-1);
+ }
+
+ next = nsListDup;
+ while(next != NULL) {
+ /* skip spaces */
+ while((*next) == ' ') next++;
+ if((*next) == '\0') break;
+
+ /* find prefix */
+ prefix = next;
+ next = (xmlChar*)xmlStrchr(next, '=');
+ if(next == NULL) {
+ fprintf(stderr,"Error: invalid namespaces list format\n");
+ xmlFree(nsListDup);
+ return(-1);
+ }
+ *(next++) = '\0';
+
+ /* find href */
+ href = next;
+ next = (xmlChar*)xmlStrchr(next, ' ');
+ if(next != NULL) {
+ *(next++) = '\0';
+ }
+
+ /* do register namespace */
+ if(xmlXPathRegisterNs(xpathCtx, prefix, href) != 0) {
+ fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", prefix, href);
+ xmlFree(nsListDup);
+ return(-1);
+ }
+ }
+
+ xmlFree(nsListDup);
+ return(0);
+}
+
+/**
+ * print_xpath_nodes:
+ * @nodes: the nodes set.
+ * @output: the output file handle.
+ *
+ * Prints the @nodes content to @output.
+ */
+void
+print_xpath_nodes(xmlNodeSetPtr nodes, FILE* output) {
+ xmlNodePtr cur;
+ int size;
+ int i;
+
+ assert(output);
+ size = (nodes) ? nodes->nodeNr : 0;
+
+ fprintf(output, "Result (%d nodes):\n", size);
+ for(i = 0; i < size; ++i) {
+ assert(nodes->nodeTab[i]);
+
+ if(nodes->nodeTab[i]->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns;
+
+ ns = (xmlNsPtr)nodes->nodeTab[i];
+ cur = (xmlNodePtr)ns->next;
+ if(cur->ns) {
+ fprintf(output, "= namespace \"%s\"=\"%s\" for node %s:%s\n",
+ ns->prefix, ns->href, cur->ns->href, cur->name);
+ } else {
+ fprintf(output, "= namespace \"%s\"=\"%s\" for node %s\n",
+ ns->prefix, ns->href, cur->name);
+ }
+ } else if(nodes->nodeTab[i]->type == XML_ELEMENT_NODE) {
+ cur = nodes->nodeTab[i];
+ if(cur->ns) {
+ fprintf(output, "= element node \"%s:%s\"\n",
+ cur->ns->href, cur->name);
+ } else {
+ fprintf(output, "= element node \"%s\"\n",
+ cur->name);
+ }
+ } else {
+ cur = nodes->nodeTab[i];
+ fprintf(output, "= node \"%s\": type %d\n", cur->name, cur->type);
+ }
+ }
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "XPath support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/xpath1.res b/doc/examples/xpath1.res
new file mode 100644
index 0000000..76af3a9
--- /dev/null
+++ b/doc/examples/xpath1.res
@@ -0,0 +1,5 @@
+Result (4 nodes):
+= element node "child2"
+= element node "child2"
+= element node "child2"
+= element node "child2"
diff --git a/doc/examples/xpath2.c b/doc/examples/xpath2.c
new file mode 100644
index 0000000..f604114
--- /dev/null
+++ b/doc/examples/xpath2.c
@@ -0,0 +1,190 @@
+/**
+ * section: XPath
+ * synopsis: Load a document, locate subelements with XPath, modify
+ * said elements and save the resulting document.
+ * purpose: Shows how to make a full round-trip from a load/edit/save
+ * usage: xpath2 <xml-file> <xpath-expr> <new-value>
+ * test: xpath2 test3.xml '//discarded' discarded > xpath2.tmp && diff xpath2.tmp $(srcdir)/xpath2.res
+ * author: Aleksey Sanin and Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_SAX1_ENABLED) && \
+ defined(LIBXML_OUTPUT_ENABLED)
+
+
+static void usage(const char *name);
+static int example4(const char *filename, const xmlChar * xpathExpr,
+ const xmlChar * value);
+static void update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar * value);
+
+
+int
+main(int argc, char **argv) {
+ /* Parse command line and process file */
+ if (argc != 4) {
+ fprintf(stderr, "Error: wrong number of arguments.\n");
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Init libxml */
+ xmlInitParser();
+ LIBXML_TEST_VERSION
+
+ /* Do the main job */
+ if (example4(argv[1], BAD_CAST argv[2], BAD_CAST argv[3])) {
+ usage(argv[0]);
+ return(-1);
+ }
+
+ /* Shutdown libxml */
+ xmlCleanupParser();
+
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return 0;
+}
+
+/**
+ * usage:
+ * @name: the program name.
+ *
+ * Prints usage information.
+ */
+static void
+usage(const char *name) {
+ assert(name);
+
+ fprintf(stderr, "Usage: %s <xml-file> <xpath-expr> <value>\n", name);
+}
+
+/**
+ * example4:
+ * @filename: the input XML filename.
+ * @xpathExpr: the xpath expression for evaluation.
+ * @value: the new node content.
+ *
+ * Parses input XML file, evaluates XPath expression and update the nodes
+ * then print the result.
+ *
+ * Returns 0 on success and a negative value otherwise.
+ */
+static int
+example4(const char* filename, const xmlChar* xpathExpr, const xmlChar* value) {
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpathCtx;
+ xmlXPathObjectPtr xpathObj;
+
+ assert(filename);
+ assert(xpathExpr);
+ assert(value);
+
+ /* Load XML document */
+ doc = xmlParseFile(filename);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
+ return(-1);
+ }
+
+ /* Create xpath evaluation context */
+ xpathCtx = xmlXPathNewContext(doc);
+ if(xpathCtx == NULL) {
+ fprintf(stderr,"Error: unable to create new XPath context\n");
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* Evaluate xpath expression */
+ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);
+ if(xpathObj == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression \"%s\"\n", xpathExpr);
+ xmlXPathFreeContext(xpathCtx);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /* update selected nodes */
+ update_xpath_nodes(xpathObj->nodesetval, value);
+
+
+ /* Cleanup of XPath data */
+ xmlXPathFreeObject(xpathObj);
+ xmlXPathFreeContext(xpathCtx);
+
+ /* dump the resulting document */
+ xmlDocDump(stdout, doc);
+
+
+ /* free the document */
+ xmlFreeDoc(doc);
+
+ return(0);
+}
+
+/**
+ * update_xpath_nodes:
+ * @nodes: the nodes set.
+ * @value: the new value for the node(s)
+ *
+ * Prints the @nodes content to @output.
+ */
+static void
+update_xpath_nodes(xmlNodeSetPtr nodes, const xmlChar* value) {
+ int size;
+ int i;
+
+ assert(value);
+ size = (nodes) ? nodes->nodeNr : 0;
+
+ /*
+ * NOTE: the nodes are processed in reverse order, i.e. reverse document
+ * order because xmlNodeSetContent can actually free up descendant
+ * of the node and such nodes may have been selected too ! Handling
+ * in reverse order ensure that descendant are accessed first, before
+ * they get removed. Mixing XPath and modifications on a tree must be
+ * done carefully !
+ */
+ for(i = size - 1; i >= 0; i--) {
+ assert(nodes->nodeTab[i]);
+
+ xmlNodeSetContent(nodes->nodeTab[i], value);
+ /*
+ * All the elements returned by an XPath query are pointers to
+ * elements from the tree *except* namespace nodes where the XPath
+ * semantic is different from the implementation in libxml2 tree.
+ * As a result when a returned node set is freed when
+ * xmlXPathFreeObject() is called, that routine must check the
+ * element type. But node from the returned set may have been removed
+ * by xmlNodeSetContent() resulting in access to freed data.
+ * This can be exercised by running
+ * valgrind xpath2 test3.xml '//discarded' discarded
+ * There is 2 ways around it:
+ * - make a copy of the pointers to the nodes from the result set
+ * then call xmlXPathFreeObject() and then modify the nodes
+ * or
+ * - remove the reference to the modified nodes from the node set
+ * as they are processed, if they are not namespace nodes.
+ */
+ if (nodes->nodeTab[i]->type != XML_NAMESPACE_DECL)
+ nodes->nodeTab[i] = NULL;
+ }
+}
+
+#else
+int main(void) {
+ fprintf(stderr, "XPath support not compiled in\n");
+ exit(1);
+}
+#endif
diff --git a/doc/examples/xpath2.res b/doc/examples/xpath2.res
new file mode 100644
index 0000000..4e89699
--- /dev/null
+++ b/doc/examples/xpath2.res
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<doc>
+ <parent>
+ <discarded>discarded</discarded>
+ <preserved/>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ <preserved>
+ content1
+ <child1/>
+ <child2>content2</child2>
+ <preserved>too</preserved>
+ <child2>content3</child2>
+ <preserved/>
+ <child2>content4</child2>
+ <preserved/>
+ <child2>content5</child2>
+ content6
+ </preserved>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ This text node must be discarded
+ <preserved/>
+ This text node must be discarded
+ <preserved/>
+ This text node must be discarded
+ <discarded>discarded</discarded>
+ This text node must be discarded
+ </parent>
+</doc>
diff --git a/doc/guidelines.html b/doc/guidelines.html
new file mode 100644
index 0000000..af4a7b3
--- /dev/null
+++ b/doc/guidelines.html
@@ -0,0 +1,374 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html">
+ <style type="text/css"></style>
+<!--
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+ </style>
+-->
+ <title>XML resources publication guidelines</title>
+</head>
+
+<body bgcolor="#fffacd" text="#000000">
+<h1 align="center">XML resources publication guidelines</h1>
+
+<p></p>
+
+<p>The goal of this document is to provide a set of guidelines and tips
+helping the publication and deployment of <a
+href="http://www.w3.org/XML/">XML</a> resources for the <a
+href="http://www.gnome.org/">GNOME project</a>. However it is not tied to
+GNOME and might be helpful more generally. I welcome <a
+href="mailto:veillard@redhat.com">feedback</a> on this document.</p>
+
+<p>The intended audience is the software developers who started using XML
+for some of the resources of their project, as a storage format, for data
+exchange, checking or transformations. There have been an increasing number
+of new XML formats defined, but not all steps have been taken, possibly because of
+lack of documentation, to truly gain all the benefits of the use of XML.
+These guidelines hope to improve the matter and provide a better overview of
+the overall XML processing and associated steps needed to deploy it
+successfully:</p>
+
+<p>Table of contents:</p>
+<ol>
+ <li><a href="#Design">Design guidelines</a></li>
+ <li><a href="#Canonical">Canonical URL</a></li>
+ <li><a href="#Catalog">Catalog setup</a></li>
+ <li><a href="#Package">Package integration</a></li>
+</ol>
+
+<h2><a name="Design">Design guidelines</a></h2>
+
+<p>This part intends to focus on the format itself of XML. It may arrive
+a bit too late since the structure of the document may already be cast in
+existing and deployed code. Still, here are a few rules which might be helpful
+when designing a new XML vocabulary or making the revision of an existing
+format:</p>
+
+<h3>Reuse existing formats:</h3>
+
+<p>This may sounds a bit simplistic, but before designing your own format,
+try to lookup existing XML vocabularies on similar data. Ideally this allows
+you to reuse them, in which case a lot of the existing tools like DTD, schemas
+and stylesheets may already be available. If you are looking at a
+documentation format, <a href="http://www.docbook.org/">DocBook</a> should
+handle your needs. If reuse is not possible because some semantic or use case
+aspects are too different this will be helpful avoiding design errors like
+targeting the vocabulary to the wrong abstraction level. In this format
+design phase try to be synthetic and be sure to express the real content of
+your data and use the XML structure to express the semantic and context of
+those data.</p>
+
+<h3>DTD rules:</h3>
+
+<p>Building a DTD (Document Type Definition) or a Schema describing the
+structure allowed by instances is the core of the design process of the
+vocabulary. Here are a few tips:</p>
+<ul>
+ <li>use significant words for the element and attributes names.</li>
+ <li>do not use attributes for general textual content, attributes
+ will be modified by the parser before reaching the application,
+ spaces and line informations will be modified.</li>
+ <li>use single elements for every string that might be subject to
+ localization. The canonical way to localize XML content is to use
+ siblings element carrying different xml:lang attributes like in the
+ following:
+ <pre>&lt;welcome&gt;
+ &lt;msg xml:lang="en"&gt;hello&lt;/msg&gt;
+ &lt;msg xml:lang="fr"&gt;bonjour&lt;/msg&gt;
+&lt;/welcome&gt;</pre>
+ </li>
+ <li>use attributes to refine the content of an element but avoid them for
+ more complex tasks, attribute parsing is not cheaper than an element and
+ it is far easier to make an element content more complex while attribute
+ will have to remain very simple.</li>
+</ul>
+
+<h3>Versioning:</h3>
+
+<p>As part of the design, make sure the structure you define will be usable
+for future extension that you may not consider for the current version. There
+are two parts to this:</p>
+<ul>
+ <li>Make sure the instance contains a version number which will allow to
+ make backward compatibility easy. Something as simple as having a
+ <code>version="1.0"</code> on the root document of the instance is
+ sufficient.</li>
+ <li>While designing the code doing the analysis of the data provided by the
+ XML parser, make sure you can work with unknown versions, generate a UI
+ warning and process only the tags recognized by your version but keep in
+ mind that you should not break on unknown elements if the version
+ attribute was not in the recognized set.</li>
+</ul>
+
+<h3>Other design parts:</h3>
+
+<p>While defining you vocabulary, try to think in term of other usage of your
+data, for example how using XSLT stylesheets could be used to make an HTML
+view of your data, or to convert it into a different format. Checking XML
+Schemas and looking at defining an XML Schema with a more complete
+validation and datatyping of your data structures is important, this helps
+avoiding some mistakes in the design phase.</p>
+
+<h3>Namespace:</h3>
+
+<p>If you expect your XML vocabulary to be used or recognized outside of your
+application (for example binding a specific processing from a graphic shell
+like Nautilus to an instance of your data) then you should really define an <a
+href="http://www.w3.org/TR/REC-xml-names/">XML namespace</a> for your
+vocabulary. A namespace name is an URL (absolute URI more precisely). It is
+generally recommended to anchor it as an HTTP resource to a server associated
+with the software project. See the next section about this. In practice this
+will mean that XML parsers will not handle your element names as-is but as a
+couple based on the namespace name and the element name. This allows it to
+recognize and disambiguate processing. Unicity of the namespace name can be
+for the most part guaranteed by the use of the DNS registry. Namespace can
+also be used to carry versioning information like:</p>
+
+<p><code>"http://www.gnome.org/project/projectname/1.0/"</code></p>
+
+<p>An easy way to use them is to make them the default namespace on the
+root element of the XML instance like:</p>
+<pre>&lt;structure xmlns="http://www.gnome.org/project/projectname/1.0/"&gt;
+ &lt;data&gt;
+ ...
+ &lt;/data&gt;
+&lt;/structure&gt;</pre>
+
+<p>In that document, structure and all descendant elements like data are in
+the given namespace.</p>
+
+<h2><a name="Canonical">Canonical URL</a></h2>
+
+<p>As seen in the previous namespace section, while XML processing is not
+tied to the Web there is a natural synergy between both. XML was designed to
+be available on the Web, and keeping the infrastructure that way helps
+deploying the XML resources. The core of this issue is the notion of
+"Canonical URL" of an XML resource. The resource can be an XML document, a
+DTD, a stylesheet, a schema, or even non-XML data associated with an XML
+resource, the canonical URL is the URL where the "master" copy of that
+resource is expected to be present on the Web. Usually when processing XML a
+copy of the resource will be present on the local disk, maybe in
+/usr/share/xml or /usr/share/sgml maybe in /opt or even on C:\projectname\
+(horror !). The key point is that the way to name that resource should be
+independent of the actual place where it resides on disk if it is available,
+and the fact that the processing will still work if there is no local copy
+(and that the machine where the processing is connected to the Internet).</p>
+
+<p>What this really means is that one should never use the local name of a
+resource to reference it but always use the canonical URL. For example in a
+DocBook instance the following should not be used:</p>
+<pre>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"<br>
+
+
+ "/usr/share/xml/docbook/4.2/docbookx.dtd"&gt;</pre>
+
+<p>But always reference the canonical URL for the DTD:</p>
+<pre>&lt;!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"<br>
+
+
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt; </pre>
+
+<p>Similarly, the document instance may reference the <a
+href="http://www.w3.org/TR/xslt">XSLT</a> stylesheets needed to process it to
+generate HTML, and the canonical URL should be used:</p>
+<pre>&lt;?xml-stylesheet
+ href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"
+ type="text/xsl"?&gt;</pre>
+
+<p>Defining the canonical URL for the resources needed should obey a few
+simple rules similar to those used to design namespace names:</p>
+<ul>
+ <li>use a DNS name you know is associated to the project and will be
+ available on the long term</li>
+ <li>within that server space, reserve the right to the subtree where you
+ intend to keep those data</li>
+ <li>version the URL so that multiple concurrent versions of the resources
+ can be hosted simultaneously</li>
+</ul>
+
+<h2><a name="Catalog">Catalog setup</a></h2>
+
+<h3>How catalogs work:</h3>
+
+<p>The catalogs are the technical mechanism which allow the XML processing
+tools to use a local copy of the resources if it is available even if the
+instance document references the canonical URL. <a
+href="http://www.oasis-open.org/committees/entity/">XML Catalogs</a> are
+anchored in the root catalog (usually <code>/etc/xml/catalog</code> or
+defined by the user). They are a tree of XML documents defining the mappings
+between the canonical naming space and the local installed ones, this can be
+seen as a static cache structure.</p>
+
+<p>When the XML processor is asked to process a resource it will
+automatically test for a locally available version in the catalog, starting
+from the root catalog, and possibly fetching sub-catalog resources until it
+finds that the catalog has that resource or not. If not the default
+processing of fetching the resource from the Web is done, allowing in most
+case to recover from a catalog miss. The key point is that the document
+instances are totally independent of the availability of a catalog or from
+the actual place where the local resource they reference may be installed.
+This greatly improves the management of the documents in the long run, making
+them independent of the platform or toolchain used to process them. The
+figure below tries to express that mechanism:<img src="catalog.gif"
+alt="Picture describing the catalog "></p>
+
+<h3>Usual catalog setup:</h3>
+
+<p>Usually catalogs for a project are setup as a 2 level hierarchical cache,
+the root catalog containing only "delegates" indicating a separate subcatalog
+dedicated to the project. The goal is to keep the root catalog clean and
+simplify the maintenance of the catalog by using separate catalogs per
+project. For example when creating a catalog for the <a
+href="http://www.w3.org/TR/xhtml1">XHTML1</a> DTDs, only 3 items are added to
+the root catalog:</p>
+<pre> &lt;delegatePublic publicIdStartString="-//W3C//DTD XHTML 1.0"
+ catalog="file:///usr/share/sgml/xhtml1/xmlcatalog"/&gt;
+ &lt;delegateSystem systemIdStartString="http://www.w3.org/TR/xhtml1/DTD"
+ catalog="file:///usr/share/sgml/xhtml1/xmlcatalog"/&gt;
+ &lt;delegateURI uriStartString="http://www.w3.org/TR/xhtml1/DTD"
+ catalog="file:///usr/share/sgml/xhtml1/xmlcatalog"/&gt;</pre>
+
+<p>They are all "delegates" meaning that if the catalog system is asked to
+resolve a reference corresponding to them, it has to lookup a sub catalog.
+Here the subcatalog was installed as
+<code>/usr/share/sgml/xhtml1/xmlcatalog</code> in the local tree. That
+decision is left to the sysadmin or the packager for that system and may
+obey different rules, but the actual place on the filesystem (or on a
+resource cache on the local network) will not influence the processing as
+long as it is available. The first rule indicate that if the reference uses a
+PUBLIC identifier beginning with the</p>
+
+<p><code>"-//W3C//DTD XHTML 1.0"</code></p>
+
+<p>substring, then the catalog lookup should be limited to the specific given
+lookup catalog. Similarly the second and third entries indicate those
+delegation rules for SYSTEM, DOCTYPE or normal URI references when the URL
+starts with the <code>"http://www.w3.org/TR/xhtml1/DTD"</code> substring
+which indicates the location on the W3C server where the XHTML1 resources are
+stored. Those are the beginning of all Canonical URLs for XHTML1 resources.
+Those three rules are sufficient in practice to capture all references to XHTML1
+resources and direct the processing tools to the right subcatalog.</p>
+
+<h3>A subcatalog example:</h3>
+
+<p>Here is the complete subcatalog used for XHTML1:</p>
+<pre>&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
+ &lt;public publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
+ uri="xhtml1-20020801/DTD/xhtml1-strict.dtd"/&gt;
+ &lt;public publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ uri="xhtml1-20020801/DTD/xhtml1-transitional.dtd"/&gt;
+ &lt;public publicId="-//W3C//DTD XHTML 1.0 Frameset//EN"
+ uri="xhtml1-20020801/DTD/xhtml1-frameset.dtd"/&gt;
+ &lt;rewriteSystem systemIdStartString="http://www.w3.org/TR/xhtml1/DTD"
+ rewritePrefix="xhtml1-20020801/DTD"/&gt;
+ &lt;rewriteURI uriStartString="http://www.w3.org/TR/xhtml1/DTD"
+ rewritePrefix="xhtml1-20020801/DTD"/&gt;
+&lt;/catalog&gt;</pre>
+
+<p>There are a few things to notice:</p>
+<ul>
+ <li>this is an XML resource, it points to the DTD using Canonical URLs, the
+ root element defines a namespace (but based on an URN not an HTTP
+ URL).</li>
+ <li>it contains 5 rules, the 3 first ones are direct mapping for the 3
+ PUBLIC identifiers defined by the XHTML1 specification and associating
+ them with the local resource containing the DTD, the 2 last ones are
+ rewrite rules allowing to build the local filename for any URL based on
+ "http://www.w3.org/TR/xhtml1/DTD", the local cache simplifies the rules by
+ keeping the same structure as the on-line server at the Canonical URL</li>
+ <li>the local resources are designated using URI references (the uri or
+ rewritePrefix attributes), the base being the containing sub-catalog URL,
+ which means that in practice the copy of the XHTML1 strict DTD is stored
+ locally in
+ <code>/usr/share/sgml/xhtml1/xmlcatalog/xhtml1-20020801/DTD/xhtml1-strict.dtd</code></li>
+</ul>
+
+<p>Those 5 rules are sufficient to cover all references to the resources held
+at the Canonical URL for the XHTML1 DTDs.</p>
+
+<h2><a name="Package">Package integration</a></h2>
+
+<p>Creating and removing catalogs should be handled as part of the process of
+(un)installing the local copy of the resources. The catalog files being XML
+resources should be processed with XML based tools to avoid problems with the
+generated files, the xmlcatalog command coming with libxml2 allows you to create
+catalogs, and add or remove rules at that time. Here is a complete example
+coming from the RPM for the XHTML1 DTDs post install script. While this example
+is platform and packaging specific, this can be useful as a an example in
+other contexts:</p>
+<pre>%post
+CATALOG=/usr/share/sgml/xhtml1/xmlcatalog
+#
+# Register it in the super catalog with the appropriate delegates
+#
+ROOTCATALOG=/etc/xml/catalog
+
+if [ ! -r $ROOTCATALOG ]
+then
+ /usr/bin/xmlcatalog --noout --create $ROOTCATALOG
+fi
+
+if [ -w $ROOTCATALOG ]
+then
+ /usr/bin/xmlcatalog --noout --add "delegatePublic" \
+ "-//W3C//DTD XHTML 1.0" \
+ "file://$CATALOG" $ROOTCATALOG
+ /usr/bin/xmlcatalog --noout --add "delegateSystem" \
+ "http://www.w3.org/TR/xhtml1/DTD" \
+ "file://$CATALOG" $ROOTCATALOG
+ /usr/bin/xmlcatalog --noout --add "delegateURI" \
+ "http://www.w3.org/TR/xhtml1/DTD" \
+ "file://$CATALOG" $ROOTCATALOG
+fi</pre>
+
+<p>The XHTML1 subcatalog is not created on-the-fly in that case, it is
+installed as part of the files of the packages. So the only work needed is to
+make sure the root catalog exists and register the delegate rules.</p>
+
+<p>Similarly, the script for the post-uninstall just remove the rules from the
+catalog:</p>
+<pre>%postun
+#
+# On removal, unregister the xmlcatalog from the supercatalog
+#
+if [ "$1" = 0 ]; then
+ CATALOG=/usr/share/sgml/xhtml1/xmlcatalog
+ ROOTCATALOG=/etc/xml/catalog
+
+ if [ -w $ROOTCATALOG ]
+ then
+ /usr/bin/xmlcatalog --noout --del \
+ "-//W3C//DTD XHTML 1.0" $ROOTCATALOG
+ /usr/bin/xmlcatalog --noout --del \
+ "http://www.w3.org/TR/xhtml1/DTD" $ROOTCATALOG
+ /usr/bin/xmlcatalog --noout --del \
+ "http://www.w3.org/TR/xhtml1/DTD" $ROOTCATALOG
+ fi
+fi</pre>
+
+<p>Note the test against $1, this is needed to not remove the delegate rules
+in case of upgrade of the package.</p>
+
+<p>Following the set of guidelines and tips provided in this document should
+help deploy the XML resources in the GNOME framework without much pain and
+ensure a smooth evolution of the resource and instances.</p>
+
+<p><a href="mailto:veillard@redhat.com">Daniel Veillard</a></p>
+
+<p>$Id$</p>
+
+<p></p>
+</body>
+</html>
diff --git a/doc/help.html b/doc/help.html
new file mode 100644
index 0000000..1f1df2a
--- /dev/null
+++ b/doc/help.html
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>How to help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>How to help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>You can help the project in various ways, the best thing to do first is to
+subscribe to the mailing-list as explained before, check the <a href="http://mail.gnome.org/archives/xml/">archives </a>and the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug
+database</a>:</p><ol>
+ <li>Provide patches when you find problems.</li>
+ <li>Provide the diffs when you port libxml2 to a new platform. They may not
+ be integrated in all cases but help pinpointing portability problems
+ and</li>
+ <li>Provide documentation fixes (either as patches to the code comments or
+ as HTML diffs).</li>
+ <li>Provide new documentations pieces (translations, examples, etc
+ ...).</li>
+ <li>Check the TODO file and try to close one of the items.</li>
+ <li>Take one of the points raised in the archive or the bug database and
+ provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me
+ </a>before to avoid synchronization problems and check that the suggested
+ fix will fit in nicely :-)</li>
+</ol><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/book1.html b/doc/html/book1.html
new file mode 100644
index 0000000..1a58210
--- /dev/null
+++ b/doc/html/book1.html
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/home.png b/doc/html/home.png
new file mode 100644
index 0000000..1700361
--- /dev/null
+++ b/doc/html/home.png
Binary files differ
diff --git a/doc/html/index.html b/doc/html/index.html
new file mode 100644
index 0000000..1a58210
--- /dev/null
+++ b/doc/html/index.html
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/left.png b/doc/html/left.png
new file mode 100644
index 0000000..2d05b3d
--- /dev/null
+++ b/doc/html/left.png
Binary files differ
diff --git a/doc/html/libxml-DOCBparser.html b/doc/html/libxml-DOCBparser.html
new file mode 100644
index 0000000..b00dad4
--- /dev/null
+++ b/doc/html/libxml-DOCBparser.html
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module DOCBparser from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module DOCBparser from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-HTMLparser.html">HTMLparser</a></th><td><a accesskey="n" href="libxml-HTMLparser.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2><p>interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore. </p><div class="deprecated"><h2>Table of Contents</h2><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a name="docbParserInputPtr" id="docbParserInputPtr">docbParserInputPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a name="docbParserCtxt" id="docbParserCtxt">docbParserCtxt</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a name="docbParserCtxtPtr" id="docbParserCtxtPtr">docbParserCtxtPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInput">xmlParserInput</a> <a name="docbParserInput" id="docbParserInput">docbParserInput</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a name="docbDocPtr" id="docbDocPtr">docbDocPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a name="docbSAXHandler" id="docbSAXHandler">docbSAXHandler</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a name="docbSAXHandlerPtr" id="docbSAXHandlerPtr">docbSAXHandlerPtr</a>
+</pre><pre class="programlisting">void <a href="#docbFreeParserCtxt">docbFreeParserCtxt</a> (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseDoc">docbParseDoc</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreateFileParserCtxt">docbCreateFileParserCtxt</a> (const char * filename, <br /> const char * encoding)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseFile">docbSAXParseFile</a> (const char * filename, <br /> const char * encoding, <br /> <a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * userData)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbSAXParseDoc">docbSAXParseDoc</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding, <br /> <a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * userData)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> <a href="#docbCreatePushParserCtxt">docbCreatePushParserCtxt</a> (<a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">int <a href="#docbEncodeEntities">docbEncodeEntities</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen, <br /> int quoteChar)</pre>
+<pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> <a href="#docbParseFile">docbParseFile</a> (const char * filename, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#docbParseDocument">docbParseDocument</a> (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#docbParseChunk">docbParseChunk</a> (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)</pre>
+<h2>Description</h2>
+<h3><a name="docbFreeParserCtxt" id="docbFreeParserCtxt"></a>Function: docbFreeParserCtxt</h3><pre class="programlisting">void docbFreeParserCtxt (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr></tbody></table></div><h3><a name="docbParseDoc" id="docbParseDoc"></a>Function: docbParseDoc</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseDoc (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding)<br />
+</pre><p>parse an SGML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="docbCreateFileParserCtxt" id="docbCreateFileParserCtxt"></a>Function: docbCreateFileParserCtxt</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreateFileParserCtxt (const char * filename, <br /> const char * encoding)<br />
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="docbSAXParseFile" id="docbSAXParseFile"></a>Function: docbSAXParseFile</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseFile (const char * filename, <br /> const char * encoding, <br /> <a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * userData)<br />
+</pre><p>parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="docbSAXParseDoc" id="docbSAXParseDoc"></a>Function: docbSAXParseDoc</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbSAXParseDoc (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding, <br /> <a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * userData)<br />
+</pre><p>parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the SGML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="docbCreatePushParserCtxt" id="docbCreatePushParserCtxt"></a>Function: docbCreatePushParserCtxt</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> docbCreatePushParserCtxt (<a href="libxml-DOCBparser.html#docbSAXHandlerPtr">docbSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="docbEncodeEntities" id="docbEncodeEntities"></a>Function: docbEncodeEntities</h3><pre class="programlisting">int docbEncodeEntities (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen, <br /> int quoteChar)<br />
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="docbParseFile" id="docbParseFile"></a>Function: docbParseFile</h3><pre class="programlisting"><a href="libxml-DOCBparser.html#docbDocPtr">docbDocPtr</a> docbParseFile (const char * filename, <br /> const char * encoding)<br />
+</pre><p>parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="docbParseDocument" id="docbParseDocument"></a>Function: docbParseDocument</h3><pre class="programlisting">int docbParseDocument (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an SGML document (and build a tree if using the standard SAX interface).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an SGML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div><h3><a name="docbParseChunk" id="docbParseChunk"></a>Function: docbParseChunk</h3><pre class="programlisting">int docbParseChunk (<a href="libxml-DOCBparser.html#docbParserCtxtPtr">docbParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)<br />
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-HTMLparser.html b/doc/html/libxml-HTMLparser.html
new file mode 100644
index 0000000..f5f77af
--- /dev/null
+++ b/doc/html/libxml-HTMLparser.html
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module HTMLparser from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module HTMLparser from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-DOCBparser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-DOCBparser.html">DOCBparser</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-HTMLtree.html">HTMLtree</a></th><td><a accesskey="n" href="libxml-HTMLtree.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#htmlDefaultSubelement">htmlDefaultSubelement</a></pre><pre class="programlisting">#define <a href="#htmlElementAllowedHereDesc">htmlElementAllowedHereDesc</a></pre><pre class="programlisting">#define <a href="#htmlRequiredAttrs">htmlRequiredAttrs</a></pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a name="htmlDocPtr" id="htmlDocPtr">htmlDocPtr</a>
+</pre><pre class="programlisting">Structure <a href="#htmlElemDesc">htmlElemDesc</a><br />struct _htmlElemDesc
+</pre><pre class="programlisting">Typedef <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a name="htmlElemDescPtr" id="htmlElemDescPtr">htmlElemDescPtr</a>
+</pre><pre class="programlisting">Structure <a href="#htmlEntityDesc">htmlEntityDesc</a><br />struct _htmlEntityDesc
+</pre><pre class="programlisting">Typedef <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a name="htmlEntityDescPtr" id="htmlEntityDescPtr">htmlEntityDescPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a name="htmlNodePtr" id="htmlNodePtr">htmlNodePtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a> <a name="htmlParserCtxt" id="htmlParserCtxt">htmlParserCtxt</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a name="htmlParserCtxtPtr" id="htmlParserCtxtPtr">htmlParserCtxtPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInput">xmlParserInput</a> <a name="htmlParserInput" id="htmlParserInput">htmlParserInput</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a name="htmlParserInputPtr" id="htmlParserInputPtr">htmlParserInputPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> <a name="htmlParserNodeInfo" id="htmlParserNodeInfo">htmlParserNodeInfo</a>
+</pre><pre class="programlisting">Enum <a href="#htmlParserOption">htmlParserOption</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> <a name="htmlSAXHandler" id="htmlSAXHandler">htmlSAXHandler</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> <a name="htmlSAXHandlerPtr" id="htmlSAXHandlerPtr">htmlSAXHandlerPtr</a>
+</pre><pre class="programlisting">Enum <a href="#htmlStatus">htmlStatus</a>
+</pre><pre class="programlisting">int <a href="#UTF8ToHtml">UTF8ToHtml</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlAttrAllowed">htmlAttrAllowed</a> (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * attr, <br /> int legacy)</pre>
+<pre class="programlisting">int <a href="#htmlAutoCloseTag">htmlAutoCloseTag</a> (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateMemoryParserCtxt">htmlCreateMemoryParserCtxt</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreatePushParserCtxt">htmlCreatePushParserCtxt</a> (<a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadDoc">htmlCtxtReadDoc</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFd">htmlCtxtReadFd</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadFile">htmlCtxtReadFile</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadIO">htmlCtxtReadIO</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlCtxtReadMemory">htmlCtxtReadMemory</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">void <a href="#htmlCtxtReset">htmlCtxtReset</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#htmlCtxtUseOptions">htmlCtxtUseOptions</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#htmlElementAllowedHere">htmlElementAllowedHere</a> (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elt)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlElementStatusHere">htmlElementStatusHere</a> (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br /> const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt)</pre>
+<pre class="programlisting">int <a href="#htmlEncodeEntities">htmlEncodeEntities</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen, <br /> int quoteChar)</pre>
+<pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityLookup">htmlEntityLookup</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlEntityValueLookup">htmlEntityValueLookup</a> (unsigned int value)</pre>
+<pre class="programlisting">void <a href="#htmlFreeParserCtxt">htmlFreeParserCtxt</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#htmlHandleOmittedElem">htmlHandleOmittedElem</a> (int val)</pre>
+<pre class="programlisting">int <a href="#htmlIsAutoClosed">htmlIsAutoClosed</a> (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#htmlIsScriptAttribute">htmlIsScriptAttribute</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlNewParserCtxt">htmlNewParserCtxt</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> <a href="#htmlNodeStatus">htmlNodeStatus</a> (const <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br /> int legacy)</pre>
+<pre class="programlisting">int <a href="#htmlParseCharRef">htmlParseCharRef</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#htmlParseChunk">htmlParseChunk</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseDoc">htmlParseDoc</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#htmlParseDocument">htmlParseDocument</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#htmlParseElement">htmlParseElement</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * <a href="#htmlParseEntityRef">htmlParseEntityRef</a> (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** str)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlParseFile">htmlParseFile</a> (const char * filename, <br /> const char * encoding)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadDoc">htmlReadDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFd">htmlReadFd</a> (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadFile">htmlReadFile</a> (const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadIO">htmlReadIO</a> (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlReadMemory">htmlReadMemory</a> (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseDoc">htmlSAXParseDoc</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding, <br /> <a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * userData)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlSAXParseFile">htmlSAXParseFile</a> (const char * filename, <br /> const char * encoding, <br /> <a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * userData)</pre>
+<pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * <a href="#htmlTagLookup">htmlTagLookup</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * tag)</pre>
+<h2>Description</h2>
+<h3><a name="htmlDefaultSubelement" id="htmlDefaultSubelement"></a>Macro: htmlDefaultSubelement</h3><pre>#define htmlDefaultSubelement</pre><p>Returns the default subelement for this element</p>
+<h3><a name="htmlElementAllowedHereDesc" id="htmlElementAllowedHereDesc"></a>Macro: htmlElementAllowedHereDesc</h3><pre>#define htmlElementAllowedHereDesc</pre><p>Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.</p>
+<h3><a name="htmlRequiredAttrs" id="htmlRequiredAttrs"></a>Macro: htmlRequiredAttrs</h3><pre>#define htmlRequiredAttrs</pre><p>Returns the attributes required for the specified element.</p>
+<h3><a name="htmlElemDesc" id="htmlElemDesc">Structure htmlElemDesc</a></h3><pre class="programlisting">Structure htmlElemDesc<br />struct _htmlElemDesc {
+ const char * name : The tag name
+ char startTag : Whether the start tag can be implied
+ char endTag : Whether the end tag can be implied
+ char saveEndTag : Whether the end tag should be saved
+ char empty : Is this an empty element ?
+ char depr : Is this a deprecated element ?
+ char dtd : 1: only in Loose DTD, 2: only Frameset
+ char isinline : is this a block 0 or inline 1 element
+ const char * desc : the description NRK Jan.2003 * New fiel
+ const char ** subelts : allowed sub-elements of this element
+ const char * defaultsubelt : subelement for suggested auto-repair if
+ const char ** attrs_opt : Optional Attributes
+ const char ** attrs_depr : Additional deprecated attributes
+ const char ** attrs_req : Required attributes
+}</pre><h3><a name="htmlEntityDesc" id="htmlEntityDesc">Structure htmlEntityDesc</a></h3><pre class="programlisting">Structure htmlEntityDesc<br />struct _htmlEntityDesc {
+ unsigned int value : the UNICODE value for the character
+ const char * name : The entity name
+ const char * desc : the description
+}</pre><h3>Enum <a name="htmlParserOption" id="htmlParserOption">htmlParserOption</a></h3><pre class="programlisting">Enum htmlParserOption {
+ <a name="HTML_PARSE_RECOVER" id="HTML_PARSE_RECOVER">HTML_PARSE_RECOVER</a> = 1 : Relaxed parsing
+ <a name="HTML_PARSE_NODEFDTD" id="HTML_PARSE_NODEFDTD">HTML_PARSE_NODEFDTD</a> = 4 : do not default a doctype if not found
+ <a name="HTML_PARSE_NOERROR" id="HTML_PARSE_NOERROR">HTML_PARSE_NOERROR</a> = 32 : suppress error reports
+ <a name="HTML_PARSE_NOWARNING" id="HTML_PARSE_NOWARNING">HTML_PARSE_NOWARNING</a> = 64 : suppress warning reports
+ <a name="HTML_PARSE_PEDANTIC" id="HTML_PARSE_PEDANTIC">HTML_PARSE_PEDANTIC</a> = 128 : pedantic error reporting
+ <a name="HTML_PARSE_NOBLANKS" id="HTML_PARSE_NOBLANKS">HTML_PARSE_NOBLANKS</a> = 256 : remove blank nodes
+ <a name="HTML_PARSE_NONET" id="HTML_PARSE_NONET">HTML_PARSE_NONET</a> = 2048 : Forbid network access
+ <a name="HTML_PARSE_NOIMPLIED" id="HTML_PARSE_NOIMPLIED">HTML_PARSE_NOIMPLIED</a> = 8192 : Do not add implied html/body... elements
+ <a name="HTML_PARSE_COMPACT" id="HTML_PARSE_COMPACT">HTML_PARSE_COMPACT</a> = 65536 : compact small text nodes
+ <a name="HTML_PARSE_IGNORE_ENC" id="HTML_PARSE_IGNORE_ENC">HTML_PARSE_IGNORE_ENC</a> = 2097152 : ignore internal document encoding hint
+}
+</pre><h3>Enum <a name="htmlStatus" id="htmlStatus">htmlStatus</a></h3><pre class="programlisting">Enum htmlStatus {
+ <a name="HTML_NA" id="HTML_NA">HTML_NA</a> = 0 : something we don't check at all
+ <a name="HTML_INVALID" id="HTML_INVALID">HTML_INVALID</a> = 1
+ <a name="HTML_DEPRECATED" id="HTML_DEPRECATED">HTML_DEPRECATED</a> = 2
+ <a name="HTML_VALID" id="HTML_VALID">HTML_VALID</a> = 4
+ <a name="HTML_REQUIRED" id="HTML_REQUIRED">HTML_REQUIRED</a> = 12 : VALID bit set so ( &amp; <a href="libxml-HTMLparser.html#HTML_VALID">HTML_VALID</a> ) is TRUE
+}
+</pre><h3><a name="UTF8ToHtml" id="UTF8ToHtml"></a>Function: UTF8ToHtml</h3><pre class="programlisting">int UTF8ToHtml (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br />
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="htmlAttrAllowed" id="htmlAttrAllowed"></a>Function: htmlAttrAllowed</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> htmlAttrAllowed (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * attr, <br /> int legacy)<br />
+</pre><p>Checks whether an <a href="libxml-SAX.html#attribute">attribute</a> is valid for an element Has full knowledge of Required and Deprecated attributes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>HTML <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated attributes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, <a href="libxml-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div><h3><a name="htmlAutoCloseTag" id="htmlAutoCloseTag"></a>Function: htmlAutoCloseTag</h3><pre class="programlisting">int htmlAutoCloseTag (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br />
+</pre><p>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The tag name</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclose, 0 otherwise</td></tr></tbody></table></div><h3><a name="htmlCreateMemoryParserCtxt" id="htmlCreateMemoryParserCtxt"></a>Function: htmlCreateMemoryParserCtxt</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateMemoryParserCtxt (const char * buffer, <br /> int size)<br />
+</pre><p>Create a parser context for an HTML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="htmlCreatePushParserCtxt" id="htmlCreatePushParserCtxt"></a>Function: htmlCreatePushParserCtxt</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreatePushParserCtxt (<a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a parser context for using the HTML parser in push mode The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="htmlCtxtReadDoc" id="htmlCtxtReadDoc"></a>Function: htmlCtxtReadDoc</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadDoc (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlCtxtReadFd" id="htmlCtxtReadFd"></a>Function: htmlCtxtReadFd</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFd (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlCtxtReadFile" id="htmlCtxtReadFile"></a>Function: htmlCtxtReadFile</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadFile (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlCtxtReadIO" id="htmlCtxtReadIO"></a>Function: htmlCtxtReadIO</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadIO (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlCtxtReadMemory" id="htmlCtxtReadMemory"></a>Function: htmlCtxtReadMemory</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlCtxtReadMemory (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlCtxtReset" id="htmlCtxtReset"></a>Function: htmlCtxtReset</h3><pre class="programlisting">void htmlCtxtReset (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Reset a parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div><h3><a name="htmlCtxtUseOptions" id="htmlCtxtUseOptions"></a>Function: htmlCtxtUseOptions</h3><pre class="programlisting">int htmlCtxtUseOptions (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> int options)<br />
+</pre><p>Applies the options to the parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, the set of unknown or unimplemented options in case of error.</td></tr></tbody></table></div><h3><a name="htmlElementAllowedHere" id="htmlElementAllowedHere"></a>Function: htmlElementAllowedHere</h3><pre class="programlisting">int htmlElementAllowedHere (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elt)<br />
+</pre><p>Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if allowed; 0 otherwise.</td></tr></tbody></table></div><h3><a name="htmlElementStatusHere" id="htmlElementStatusHere"></a>Function: htmlElementStatusHere</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> htmlElementStatusHere (const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * parent, <br /> const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * elt)<br />
+</pre><p>Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>HTML parent element</td></tr><tr><td><span class="term"><i><tt>elt</tt></i>:</span></td><td>HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of HTML_VALID, HTML_DEPRECATED, <a href="libxml-HTMLparser.html#HTML_INVALID">HTML_INVALID</a></td></tr></tbody></table></div><h3><a name="htmlEncodeEntities" id="htmlEncodeEntities"></a>Function: htmlEncodeEntities</h3><pre class="programlisting">int htmlEncodeEntities (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen, <br /> int quoteChar)<br />
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>quoteChar</tt></i>:</span></td><td>the quote character to escape (' or ") or zero.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="htmlEntityLookup" id="htmlEntityLookup"></a>Function: htmlEntityLookup</h3><pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityLookup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="htmlEntityValueLookup" id="htmlEntityValueLookup"></a>Function: htmlEntityValueLookup</h3><pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlEntityValueLookup (unsigned int value)<br />
+</pre><p>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the entity's unicode value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="htmlFreeParserCtxt" id="htmlFreeParserCtxt"></a>Function: htmlFreeParserCtxt</h3><pre class="programlisting">void htmlFreeParserCtxt (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div><h3><a name="htmlHandleOmittedElem" id="htmlHandleOmittedElem"></a>Function: htmlHandleOmittedElem</h3><pre class="programlisting">int htmlHandleOmittedElem (int val)<br />
+</pre><p>Set and return the previous value for handling HTML omitted tags.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no handling, 1 for auto insertion.</td></tr></tbody></table></div><h3><a name="htmlIsAutoClosed" id="htmlIsAutoClosed"></a>Function: htmlIsAutoClosed</h3><pre class="programlisting">int htmlIsAutoClosed (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> elem)<br />
+</pre><p>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the HTML document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the HTML element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if autoclosed, 0 otherwise</td></tr></tbody></table></div><h3><a name="htmlIsScriptAttribute" id="htmlIsScriptAttribute"></a>Function: htmlIsScriptAttribute</h3><pre class="programlisting">int htmlIsScriptAttribute (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Check if an <a href="libxml-SAX.html#attribute">attribute</a> is of content type Script</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 is the <a href="libxml-SAX.html#attribute">attribute</a> is a script 0 otherwise</td></tr></tbody></table></div><h3><a name="htmlNewParserCtxt" id="htmlNewParserCtxt"></a>Function: htmlNewParserCtxt</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlNewParserCtxt (void)<br />
+</pre><p>Allocate and initialize a new parser context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> or NULL in case of allocation error</td></tr></tbody></table></div><h3><a name="htmlNodeStatus" id="htmlNodeStatus"></a>Function: htmlNodeStatus</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlStatus">htmlStatus</a> htmlNodeStatus (const <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> node, <br /> int legacy)<br />
+</pre><p>Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an <a href="libxml-HTMLparser.html#htmlNodePtr">htmlNodePtr</a> in a tree</td></tr><tr><td><span class="term"><i><tt>legacy</tt></i>:</span></td><td>whether to allow deprecated elements (YES is faster here for Element nodes)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>for Element nodes, a return from <a href="libxml-HTMLparser.html#htmlElementAllowedHere">htmlElementAllowedHere</a> (if legacy allowed) or <a href="libxml-HTMLparser.html#htmlElementStatusHere">htmlElementStatusHere</a> (otherwise). for Attribute nodes, a return from <a href="libxml-HTMLparser.html#htmlAttrAllowed">htmlAttrAllowed</a> for other nodes, <a href="libxml-HTMLparser.html#HTML_NA">HTML_NA</a> (no checks performed)</td></tr></tbody></table></div><h3><a name="htmlParseCharRef" id="htmlParseCharRef"></a>Function: htmlParseCharRef</h3><pre class="programlisting">int htmlParseCharRef (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse Reference declarations [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value parsed (as an int)</td></tr></tbody></table></div><h3><a name="htmlParseChunk" id="htmlParseChunk"></a>Function: htmlParseChunk</h3><pre class="programlisting">int htmlParseChunk (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)<br />
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div><h3><a name="htmlParseDoc" id="htmlParseDoc"></a>Function: htmlParseDoc</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseDoc (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding)<br />
+</pre><p>parse an HTML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlParseDocument" id="htmlParseDocument"></a>Function: htmlParseDocument</h3><pre class="programlisting">int htmlParseDocument (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an HTML document (and build a tree if using the standard SAX interface).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div><h3><a name="htmlParseElement" id="htmlParseElement"></a>Function: htmlParseElement</h3><pre class="programlisting">void htmlParseElement (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an HTML element, this is highly recursive this is kept for compatibility with previous code versions [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr></tbody></table></div><h3><a name="htmlParseEntityRef" id="htmlParseEntityRef"></a>Function: htmlParseEntityRef</h3><pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlEntityDesc">htmlEntityDesc</a> * htmlParseEntityRef (<a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** str)<br />
+</pre><p>parse an HTML ENTITY references [68] EntityRef ::= '&amp;' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an HTML parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>location to store the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the associated <a href="libxml-HTMLparser.html#htmlEntityDescPtr">htmlEntityDescPtr</a> if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.</td></tr></tbody></table></div><h3><a name="htmlParseFile" id="htmlParseFile"></a>Function: htmlParseFile</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlParseFile (const char * filename, <br /> const char * encoding)<br />
+</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlReadDoc" id="htmlReadDoc"></a>Function: htmlReadDoc</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlReadFd" id="htmlReadFd"></a>Function: htmlReadFd</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFd (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML from a file descriptor and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlReadFile" id="htmlReadFile"></a>Function: htmlReadFile</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadFile (const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlReadIO" id="htmlReadIO"></a>Function: htmlReadIO</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadIO (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an HTML document from I/O functions and source and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlReadMemory" id="htmlReadMemory"></a>Function: htmlReadMemory</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlReadMemory (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of htmlParserOption(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="htmlSAXParseDoc" id="htmlSAXParseDoc"></a>Function: htmlSAXParseDoc</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseDoc (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * encoding, <br /> <a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * userData)<br />
+</pre><p>Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div><h3><a name="htmlSAXParseFile" id="htmlSAXParseFile"></a>Function: htmlSAXParseFile</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlSAXParseFile (const char * filename, <br /> const char * encoding, <br /> <a href="libxml-HTMLparser.html#htmlSAXHandlerPtr">htmlSAXHandlerPtr</a> sax, <br /> void * userData)<br />
+</pre><p>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>if using SAX, this pointer will be provided on callbacks.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree unless SAX is NULL or the document is not well formed.</td></tr></tbody></table></div><h3><a name="htmlTagLookup" id="htmlTagLookup"></a>Function: htmlTagLookup</h3><pre class="programlisting">const <a href="libxml-HTMLparser.html#htmlElemDesc">htmlElemDesc</a> * htmlTagLookup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * tag)<br />
+</pre><p>Lookup the HTML tag in the ElementTable</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tag</tt></i>:</span></td><td>The tag name in lowercase</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the related <a href="libxml-HTMLparser.html#htmlElemDescPtr">htmlElemDescPtr</a> or NULL if not found.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-HTMLtree.html b/doc/html/libxml-HTMLtree.html
new file mode 100644
index 0000000..0c89727
--- /dev/null
+++ b/doc/html/libxml-HTMLtree.html
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module HTMLtree from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module HTMLtree from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-HTMLparser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-HTMLparser.html">HTMLparser</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-SAX.html">SAX</a></th><td><a accesskey="n" href="libxml-SAX.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module implements a few function needed to process tree in an HTML specific way. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#HTML_COMMENT_NODE">HTML_COMMENT_NODE</a></pre><pre class="programlisting">#define <a href="#HTML_ENTITY_REF_NODE">HTML_ENTITY_REF_NODE</a></pre><pre class="programlisting">#define <a href="#HTML_PI_NODE">HTML_PI_NODE</a></pre><pre class="programlisting">#define <a href="#HTML_PRESERVE_NODE">HTML_PRESERVE_NODE</a></pre><pre class="programlisting">#define <a href="#HTML_TEXT_NODE">HTML_TEXT_NODE</a></pre><pre class="programlisting">void <a href="#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#htmlDocDump">htmlDocDump</a> (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#htmlDocDumpMemory">htmlDocDumpMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)</pre>
+<pre class="programlisting">void <a href="#htmlDocDumpMemoryFormat">htmlDocDumpMemoryFormat</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#htmlGetMetaEncoding">htmlGetMetaEncoding</a> (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#htmlIsBooleanAttr">htmlIsBooleanAttr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDoc">htmlNewDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)</pre>
+<pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> <a href="#htmlNewDocNoDtD">htmlNewDocNoDtD</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)</pre>
+<pre class="programlisting">int <a href="#htmlNodeDump">htmlNodeDump</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#htmlNodeDumpFile">htmlNodeDumpFile</a> (FILE * out, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a> (FILE * out, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#htmlNodeDumpOutput">htmlNodeDumpOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#htmlSaveFile">htmlSaveFile</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#htmlSaveFileEnc">htmlSaveFileEnc</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#htmlSaveFileFormat">htmlSaveFileFormat</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting">int <a href="#htmlSetMetaEncoding">htmlSetMetaEncoding</a> (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * encoding)</pre>
+<h2>Description</h2>
+<h3><a name="HTML_COMMENT_NODE" id="HTML_COMMENT_NODE"></a>Macro: HTML_COMMENT_NODE</h3><pre>#define HTML_COMMENT_NODE</pre><p>Macro. A <a href="libxml-SAX.html#comment">comment</a> in a HTML document is really implemented the same way as a <a href="libxml-SAX.html#comment">comment</a> in an XML document.</p>
+<h3><a name="HTML_ENTITY_REF_NODE" id="HTML_ENTITY_REF_NODE"></a>Macro: HTML_ENTITY_REF_NODE</h3><pre>#define HTML_ENTITY_REF_NODE</pre><p>Macro. An entity <a href="libxml-SAX.html#reference">reference</a> in a HTML document is really implemented the same way as an entity <a href="libxml-SAX.html#reference">reference</a> in an XML document.</p>
+<h3><a name="HTML_PI_NODE" id="HTML_PI_NODE"></a>Macro: HTML_PI_NODE</h3><pre>#define HTML_PI_NODE</pre><p>Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.</p>
+<h3><a name="HTML_PRESERVE_NODE" id="HTML_PRESERVE_NODE"></a>Macro: HTML_PRESERVE_NODE</h3><pre>#define HTML_PRESERVE_NODE</pre><p>Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.</p>
+<h3><a name="HTML_TEXT_NODE" id="HTML_TEXT_NODE"></a>Macro: HTML_TEXT_NODE</h3><pre>#define HTML_TEXT_NODE</pre><p>Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.</p>
+<h3><a name="htmlDocContentDumpFormatOutput" id="htmlDocContentDumpFormatOutput"></a>Function: htmlDocContentDumpFormatOutput</h3><pre class="programlisting">void htmlDocContentDumpFormatOutput (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an HTML document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="htmlDocContentDumpOutput" id="htmlDocContentDumpOutput"></a>Function: htmlDocContentDumpOutput</h3><pre class="programlisting">void htmlDocContentDumpOutput (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
+</pre><p>Dump an HTML document. Formating return/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr></tbody></table></div><h3><a name="htmlDocDump" id="htmlDocDump"></a>Function: htmlDocDump</h3><pre class="programlisting">int htmlDocDump (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br />
+</pre><p>Dump an HTML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemory" id="htmlDocDumpMemory"></a>Function: htmlDocDumpMemory</h3><pre class="programlisting">void htmlDocDumpMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)<br />
+</pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="htmlDocDumpMemoryFormat" id="htmlDocDumpMemoryFormat"></a>Function: htmlDocDumpMemoryFormat</h3><pre class="programlisting">void htmlDocDumpMemoryFormat (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)<br />
+</pre><p>Dump an HTML document in memory and return the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * and it's size. It's up to the caller to free the memory.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="htmlGetMetaEncoding" id="htmlGetMetaEncoding"></a>Function: htmlGetMetaEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * htmlGetMetaEncoding (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc)<br />
+</pre><p>Encoding definition lookup in the Meta tags</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current encoding as flagged in the HTML source</td></tr></tbody></table></div><h3><a name="htmlIsBooleanAttr" id="htmlIsBooleanAttr"></a>Function: htmlIsBooleanAttr</h3><pre class="programlisting">int htmlIsBooleanAttr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Determine if a given <a href="libxml-SAX.html#attribute">attribute</a> is a boolean attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml-SAX.html#attribute">attribute</a> to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>false if the <a href="libxml-SAX.html#attribute">attribute</a> is not boolean, true otherwise.</td></tr></tbody></table></div><h3><a name="htmlNewDoc" id="htmlNewDoc"></a>Function: htmlNewDoc</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br />
+</pre><p>Creates a new HTML document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div><h3><a name="htmlNewDocNoDtD" id="htmlNewDocNoDtD"></a>Function: htmlNewDocNoDtD</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> htmlNewDocNoDtD (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID)<br />
+</pre><p>Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>URI for the dtd, or NULL</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID of the DTD, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document, do not initialize the DTD if not provided</td></tr></tbody></table></div><h3><a name="htmlNodeDump" id="htmlNodeDump"></a>Function: htmlNodeDump</h3><pre class="programlisting">int htmlNodeDump (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div><h3><a name="htmlNodeDumpFile" id="htmlNodeDumpFile"></a>Function: htmlNodeDumpFile</h3><pre class="programlisting">void htmlNodeDumpFile (FILE * out, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div><h3><a name="htmlNodeDumpFileFormat" id="htmlNodeDumpFileFormat"></a>Function: htmlNodeDumpFileFormat</h3><pre class="programlisting">int htmlNodeDumpFileFormat (FILE * out, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the FILE pointer</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlNodeDumpFormatOutput" id="htmlNodeDumpFormatOutput"></a>Function: htmlNodeDumpFormatOutput</h3><pre class="programlisting">void htmlNodeDumpFormatOutput (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="htmlNodeDumpOutput" id="htmlNodeDumpOutput"></a>Function: htmlNodeDumpOutput</h3><pre class="programlisting">void htmlNodeDumpOutput (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const char * encoding)<br />
+</pre><p>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the HTML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr></tbody></table></div><h3><a name="htmlSaveFile" id="htmlSaveFile"></a>Function: htmlSaveFile</h3><pre class="programlisting">int htmlSaveFile (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br />
+</pre><p>Dump an HTML document to a file. If @filename is "-" the stdout file is used.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlSaveFileEnc" id="htmlSaveFileEnc"></a>Function: htmlSaveFileEnc</h3><pre class="programlisting">int htmlSaveFileEnc (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
+</pre><p>Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlSaveFileFormat" id="htmlSaveFileFormat"></a>Function: htmlSaveFileFormat</h3><pre class="programlisting">int htmlSaveFileFormat (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an HTML document to a file using a given encoding.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="htmlSetMetaEncoding" id="htmlSetMetaEncoding"></a>Function: htmlSetMetaEncoding</h3><pre class="programlisting">int htmlSetMetaEncoding (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * encoding)<br />
+</pre><p>Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-SAX.html b/doc/html/libxml-SAX.html
new file mode 100644
index 0000000..f77a9df
--- /dev/null
+++ b/doc/html/libxml-SAX.html
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module SAX from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module SAX from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-HTMLtree.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-HTMLtree.html">HTMLtree</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-SAX2.html">SAX2</a></th><td><a accesskey="n" href="libxml-SAX2.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2><p>DEPRECATED set of SAX version 1 interfaces used to build the DOM tree. </p><div class="deprecated"><h2>Table of Contents</h2><pre class="programlisting">void <a href="#comment">comment</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#checkNamespace">checkNamespace</a> (void * ctx, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespace)</pre>
+<pre class="programlisting">int <a href="#getColumnNumber">getColumnNumber</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#entityDecl">entityDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">void <a href="#attribute">attribute</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#getNamespace">getNamespace</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#setDocumentLocator">setDocumentLocator</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)</pre>
+<pre class="programlisting">void <a href="#initxmlDefaultSAXHandler">initxmlDefaultSAXHandler</a> (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br /> int warning)</pre>
+<pre class="programlisting">void <a href="#ignorableWhitespace">ignorableWhitespace</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#hasExternalSubset">hasExternalSubset</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#unparsedEntityDecl">unparsedEntityDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)</pre>
+<pre class="programlisting">void <a href="#globalNamespace">globalNamespace</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting">int <a href="#hasInternalSubset">hasInternalSubset</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#reference">reference</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#notationDecl">notationDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getSystemId">getSystemId</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#externalSubset">externalSubset</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#resolveEntity">resolveEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)</pre>
+<pre class="programlisting">void <a href="#startDocument">startDocument</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#setNamespace">setNamespace</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#cdataBlock">cdataBlock</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#getPublicId">getPublicId</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#inithtmlDefaultSAXHandler">inithtmlDefaultSAXHandler</a> (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)</pre>
+<pre class="programlisting">void <a href="#processingInstruction">processingInstruction</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)</pre>
+<pre class="programlisting">void <a href="#endElement">endElement</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#namespaceDecl">namespaceDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting">void <a href="#initdocbDefaultSAXHandler">initdocbDefaultSAXHandler</a> (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getEntity">getEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#characters">characters</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#elementDecl">elementDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)</pre>
+<pre class="programlisting">void <a href="#startElement">startElement</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getParameterEntity">getParameterEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#attributeDecl">attributeDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)</pre>
+<pre class="programlisting">int <a href="#isStandalone">isStandalone</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#internalSubset">internalSubset</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting">void <a href="#endDocument">endDocument</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#getLineNumber">getLineNumber</a> (void * ctx)</pre>
+<h2>Description</h2>
+<h3><a name="comment" id="comment"></a>Function: comment</h3><pre class="programlisting">void comment (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>A <a href="libxml-SAX.html#comment">comment</a> has been parsed. DEPRECATED: use xmlSAX2Comment()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#comment">comment</a> content</td></tr></tbody></table></div><h3><a name="checkNamespace" id="checkNamespace"></a>Function: checkNamespace</h3><pre class="programlisting">int checkNamespace (void * ctx, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespace)<br />
+</pre><p>Check that the current element namespace is the same as the one read upon parsing. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>namespace</tt></i>:</span></td><td>the namespace to check against</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="getColumnNumber" id="getColumnNumber"></a>Function: getColumnNumber</h3><pre class="programlisting">int getColumnNumber (void * ctx)<br />
+</pre><p>Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div><h3><a name="entityDecl" id="entityDecl"></a>Function: entityDecl</h3><pre class="programlisting">void entityDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div><h3><a name="attribute" id="attribute"></a>Function: attribute</h3><pre class="programlisting">void attribute (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Handle an <a href="libxml-SAX.html#attribute">attribute</a> that has been read by the parser. The default handling is to convert the <a href="libxml-SAX.html#attribute">attribute</a> into an DOM subtree and past it in a new <a href="libxml-tree.html#xmlAttr">xmlAttr</a> element added to the element. DEPRECATED: use xmlSAX2Attribute()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The <a href="libxml-SAX.html#attribute">attribute</a> name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr></tbody></table></div><h3><a name="getNamespace" id="getNamespace"></a>Function: getNamespace</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> getNamespace (void * ctx)<br />
+</pre><p>Get the current element namespace. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL if none</td></tr></tbody></table></div><h3><a name="setDocumentLocator" id="setDocumentLocator"></a>Function: setDocumentLocator</h3><pre class="programlisting">void setDocumentLocator (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br />
+</pre><p>Receive the document locator at startup, actually <a href="libxml-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div><h3><a name="initxmlDefaultSAXHandler" id="initxmlDefaultSAXHandler"></a>Function: initxmlDefaultSAXHandler</h3><pre class="programlisting">void initxmlDefaultSAXHandler (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr, <br /> int warning)<br />
+</pre><p>Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div><h3><a name="ignorableWhitespace" id="ignorableWhitespace"></a>Function: ignorableWhitespace</h3><pre class="programlisting">void ignorableWhitespace (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)<br />
+</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml-SAX.html#characters">characters</a> DEPRECATED: use xmlSAX2IgnorableWhitespace()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><h3><a name="hasExternalSubset" id="hasExternalSubset"></a>Function: hasExternalSubset</h3><pre class="programlisting">int hasExternalSubset (void * ctx)<br />
+</pre><p>Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="unparsedEntityDecl" id="unparsedEntityDecl"></a>Function: unparsedEntityDecl</h3><pre class="programlisting">void unparsedEntityDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br />
+</pre><p>What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div><h3><a name="globalNamespace" id="globalNamespace"></a>Function: globalNamespace</h3><pre class="programlisting">void globalNamespace (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>An old global namespace has been parsed. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div><h3><a name="hasInternalSubset" id="hasInternalSubset"></a>Function: hasInternalSubset</h3><pre class="programlisting">int hasInternalSubset (void * ctx)<br />
+</pre><p>Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="reference" id="reference"></a>Function: reference</h3><pre class="programlisting">void reference (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>called when an entity <a href="libxml-SAX.html#reference">reference</a> is detected. DEPRECATED: use xmlSAX2Reference()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div><h3><a name="notationDecl" id="notationDecl"></a>Function: notationDecl</h3><pre class="programlisting">void notationDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br />
+</pre><p>What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div><h3><a name="getSystemId" id="getSystemId"></a>Function: getSystemId</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * getSystemId (void * ctx)<br />
+</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div><h3><a name="externalSubset" id="externalSubset"></a>Function: externalSubset</h3><pre class="programlisting">void externalSubset (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><h3><a name="resolveEntity" id="resolveEntity"></a>Function: resolveEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> resolveEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br />
+</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine DEPRECATED: use xmlSAX2ResolveEntity()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div><h3><a name="startDocument" id="startDocument"></a>Function: startDocument</h3><pre class="programlisting">void startDocument (void * ctx)<br />
+</pre><p>called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><h3><a name="setNamespace" id="setNamespace"></a>Function: setNamespace</h3><pre class="programlisting">void setNamespace (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Set the current element namespace. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div><h3><a name="cdataBlock" id="cdataBlock"></a>Function: cdataBlock</h3><pre class="programlisting">void cdataBlock (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)<br />
+</pre><p>called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div><h3><a name="getPublicId" id="getPublicId"></a>Function: getPublicId</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * getPublicId (void * ctx)<br />
+</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" DEPRECATED: use xmlSAX2GetPublicId()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div><h3><a name="inithtmlDefaultSAXHandler" id="inithtmlDefaultSAXHandler"></a>Function: inithtmlDefaultSAXHandler</h3><pre class="programlisting">void inithtmlDefaultSAXHandler (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br />
+</pre><p>Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div><h3><a name="processingInstruction" id="processingInstruction"></a>Function: processingInstruction</h3><pre class="programlisting">void processingInstruction (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)<br />
+</pre><p>A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div><h3><a name="endElement" id="endElement"></a>Function: endElement</h3><pre class="programlisting">void endElement (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div><h3><a name="namespaceDecl" id="namespaceDecl"></a>Function: namespaceDecl</h3><pre class="programlisting">void namespaceDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>A namespace has been parsed. DEPRECATED</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace associated URN</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr></tbody></table></div><h3><a name="initdocbDefaultSAXHandler" id="initdocbDefaultSAXHandler"></a>Function: initdocbDefaultSAXHandler</h3><pre class="programlisting">void initdocbDefaultSAXHandler (<a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * hdlr)<br />
+</pre><p>Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div><h3><a name="getEntity" id="getEntity"></a>Function: getEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> getEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Get an entity by name DEPRECATED: use xmlSAX2GetEntity()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><h3><a name="characters" id="characters"></a>Function: characters</h3><pre class="programlisting">void characters (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)<br />
+</pre><p>receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><h3><a name="elementDecl" id="elementDecl"></a>Function: elementDecl</h3><pre class="programlisting">void elementDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br />
+</pre><p>An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div><h3><a name="startElement" id="startElement"></a>Function: startElement</h3><pre class="programlisting">void startElement (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br />
+</pre><p>called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div><h3><a name="getParameterEntity" id="getParameterEntity"></a>Function: getParameterEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> getParameterEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><h3><a name="attributeDecl" id="attributeDecl"></a>Function: attributeDecl</h3><pre class="programlisting">void attributeDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br />
+</pre><p>An <a href="libxml-SAX.html#attribute">attribute</a> definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div><h3><a name="isStandalone" id="isStandalone"></a>Function: isStandalone</h3><pre class="programlisting">int isStandalone (void * ctx)<br />
+</pre><p>Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="internalSubset" id="internalSubset"></a>Function: internalSubset</h3><pre class="programlisting">void internalSubset (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><h3><a name="endDocument" id="endDocument"></a>Function: endDocument</h3><pre class="programlisting">void endDocument (void * ctx)<br />
+</pre><p>called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><h3><a name="getLineNumber" id="getLineNumber"></a>Function: getLineNumber</h3><pre class="programlisting">int getLineNumber (void * ctx)<br />
+</pre><p>Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-SAX2.html b/doc/html/libxml-SAX2.html
new file mode 100644
index 0000000..5447450
--- /dev/null
+++ b/doc/html/libxml-SAX2.html
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module SAX2 from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module SAX2 from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-SAX.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-SAX.html">SAX</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-c14n.html">c14n</a></th><td><a accesskey="n" href="libxml-c14n.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>those are the default SAX2 interfaces used by the library when building DOM tree. </p><h2>Table of Contents</h2><pre class="programlisting">void <a href="#docbDefaultSAXHandlerInit">docbDefaultSAXHandlerInit</a> (void)</pre>
+<pre class="programlisting">void <a href="#htmlDefaultSAXHandlerInit">htmlDefaultSAXHandlerInit</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlDefaultSAXHandlerInit">xmlDefaultSAXHandlerInit</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2AttributeDecl">xmlSAX2AttributeDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2CDataBlock">xmlSAX2CDataBlock</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2Characters">xmlSAX2Characters</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2Comment">xmlSAX2Comment</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2ElementDecl">xmlSAX2ElementDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2EndDocument">xmlSAX2EndDocument</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2EndElement">xmlSAX2EndElement</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2EndElementNs">xmlSAX2EndElementNs</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2EntityDecl">xmlSAX2EntityDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2ExternalSubset">xmlSAX2ExternalSubset</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting">int <a href="#xmlSAX2GetColumnNumber">xmlSAX2GetColumnNumber</a> (void * ctx)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetEntity">xmlSAX2GetEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlSAX2GetLineNumber">xmlSAX2GetLineNumber</a> (void * ctx)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlSAX2GetParameterEntity">xmlSAX2GetParameterEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetPublicId">xmlSAX2GetPublicId</a> (void * ctx)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSAX2GetSystemId">xmlSAX2GetSystemId</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSAX2HasExternalSubset">xmlSAX2HasExternalSubset</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSAX2HasInternalSubset">xmlSAX2HasInternalSubset</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2IgnorableWhitespace">xmlSAX2IgnorableWhitespace</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2InitDefaultSAXHandler">xmlSAX2InitDefaultSAXHandler</a> (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br /> int warning)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2InitDocbDefaultSAXHandler">xmlSAX2InitDocbDefaultSAXHandler</a> (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2InitHtmlDefaultSAXHandler">xmlSAX2InitHtmlDefaultSAXHandler</a> (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2InternalSubset">xmlSAX2InternalSubset</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting">int <a href="#xmlSAX2IsStandalone">xmlSAX2IsStandalone</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2NotationDecl">xmlSAX2NotationDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2ProcessingInstruction">xmlSAX2ProcessingInstruction</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2Reference">xmlSAX2Reference</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlSAX2ResolveEntity">xmlSAX2ResolveEntity</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2SetDocumentLocator">xmlSAX2SetDocumentLocator</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2StartDocument">xmlSAX2StartDocument</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2StartElement">xmlSAX2StartElement</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2StartElementNs">xmlSAX2StartElementNs</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> int nb_namespaces, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br /> int nb_attributes, <br /> int nb_defaulted, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** attributes)</pre>
+<pre class="programlisting">void <a href="#xmlSAX2UnparsedEntityDecl">xmlSAX2UnparsedEntityDecl</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)</pre>
+<pre class="programlisting">int <a href="#xmlSAXDefaultVersion">xmlSAXDefaultVersion</a> (int version)</pre>
+<pre class="programlisting">int <a href="#xmlSAXVersion">xmlSAXVersion</a> (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br /> int version)</pre>
+<h2>Description</h2>
+<h3><a name="docbDefaultSAXHandlerInit" id="docbDefaultSAXHandlerInit"></a>Function: docbDefaultSAXHandlerInit</h3><pre class="programlisting">void docbDefaultSAXHandlerInit (void)<br />
+</pre><p>Initialize the default SAX handler</p>
+<h3><a name="htmlDefaultSAXHandlerInit" id="htmlDefaultSAXHandlerInit"></a>Function: htmlDefaultSAXHandlerInit</h3><pre class="programlisting">void htmlDefaultSAXHandlerInit (void)<br />
+</pre><p>Initialize the default SAX handler</p>
+<h3><a name="xmlDefaultSAXHandlerInit" id="xmlDefaultSAXHandlerInit"></a>Function: xmlDefaultSAXHandlerInit</h3><pre class="programlisting">void xmlDefaultSAXHandlerInit (void)<br />
+</pre><p>Initialize the default SAX2 handler</p>
+<h3><a name="xmlSAX2AttributeDecl" id="xmlSAX2AttributeDecl"></a>Function: xmlSAX2AttributeDecl</h3><pre class="programlisting">void xmlSAX2AttributeDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br />
+</pre><p>An <a href="libxml-SAX.html#attribute">attribute</a> definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div><h3><a name="xmlSAX2CDataBlock" id="xmlSAX2CDataBlock"></a>Function: xmlSAX2CDataBlock</h3><pre class="programlisting">void xmlSAX2CDataBlock (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)<br />
+</pre><p>called when a pcdata block has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div><h3><a name="xmlSAX2Characters" id="xmlSAX2Characters"></a>Function: xmlSAX2Characters</h3><pre class="programlisting">void xmlSAX2Characters (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)<br />
+</pre><p>receiving some chars from the parser.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><h3><a name="xmlSAX2Comment" id="xmlSAX2Comment"></a>Function: xmlSAX2Comment</h3><pre class="programlisting">void xmlSAX2Comment (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>A <a href="libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX2.html#xmlSAX2Comment">xmlSAX2Comment</a> content</td></tr></tbody></table></div><h3><a name="xmlSAX2ElementDecl" id="xmlSAX2ElementDecl"></a>Function: xmlSAX2ElementDecl</h3><pre class="programlisting">void xmlSAX2ElementDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br />
+</pre><p>An element definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div><h3><a name="xmlSAX2EndDocument" id="xmlSAX2EndDocument"></a>Function: xmlSAX2EndDocument</h3><pre class="programlisting">void xmlSAX2EndDocument (void * ctx)<br />
+</pre><p>called when the document end has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><h3><a name="xmlSAX2EndElement" id="xmlSAX2EndElement"></a>Function: xmlSAX2EndElement</h3><pre class="programlisting">void xmlSAX2EndElement (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>called when the end of an element has been detected.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div><h3><a name="xmlSAX2EndElementNs" id="xmlSAX2EndElementNs"></a>Function: xmlSAX2EndElementNs</h3><pre class="programlisting">void xmlSAX2EndElementNs (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)<br />
+</pre><p>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr></tbody></table></div><h3><a name="xmlSAX2EntityDecl" id="xmlSAX2EntityDecl"></a>Function: xmlSAX2EntityDecl</h3><pre class="programlisting">void xmlSAX2EntityDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>An entity definition has been parsed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div><h3><a name="xmlSAX2ExternalSubset" id="xmlSAX2ExternalSubset"></a>Function: xmlSAX2ExternalSubset</h3><pre class="programlisting">void xmlSAX2ExternalSubset (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Callback on external subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><h3><a name="xmlSAX2GetColumnNumber" id="xmlSAX2GetColumnNumber"></a>Function: xmlSAX2GetColumnNumber</h3><pre class="programlisting">int xmlSAX2GetColumnNumber (void * ctx)<br />
+</pre><p>Provide the column number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div><h3><a name="xmlSAX2GetEntity" id="xmlSAX2GetEntity"></a>Function: xmlSAX2GetEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Get an entity by name</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><h3><a name="xmlSAX2GetLineNumber" id="xmlSAX2GetLineNumber"></a>Function: xmlSAX2GetLineNumber</h3><pre class="programlisting">int xmlSAX2GetLineNumber (void * ctx)<br />
+</pre><p>Provide the line number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int</td></tr></tbody></table></div><h3><a name="xmlSAX2GetParameterEntity" id="xmlSAX2GetParameterEntity"></a>Function: xmlSAX2GetParameterEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlSAX2GetParameterEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Get a parameter entity by name</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><h3><a name="xmlSAX2GetPublicId" id="xmlSAX2GetPublicId"></a>Function: xmlSAX2GetPublicId</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetPublicId (void * ctx)<br />
+</pre><p>Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div><h3><a name="xmlSAX2GetSystemId" id="xmlSAX2GetSystemId"></a>Function: xmlSAX2GetSystemId</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSAX2GetSystemId (void * ctx)<br />
+</pre><p>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr></tbody></table></div><h3><a name="xmlSAX2HasExternalSubset" id="xmlSAX2HasExternalSubset"></a>Function: xmlSAX2HasExternalSubset</h3><pre class="programlisting">int xmlSAX2HasExternalSubset (void * ctx)<br />
+</pre><p>Does this document has an external subset</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="xmlSAX2HasInternalSubset" id="xmlSAX2HasInternalSubset"></a>Function: xmlSAX2HasInternalSubset</h3><pre class="programlisting">int xmlSAX2HasInternalSubset (void * ctx)<br />
+</pre><p>Does this document has an internal subset</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="xmlSAX2IgnorableWhitespace" id="xmlSAX2IgnorableWhitespace"></a>Function: xmlSAX2IgnorableWhitespace</h3><pre class="programlisting">void xmlSAX2IgnorableWhitespace (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)<br />
+</pre><p>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use <a href="libxml-SAX2.html#xmlSAX2Characters">xmlSAX2Characters</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><h3><a name="xmlSAX2InitDefaultSAXHandler" id="xmlSAX2InitDefaultSAXHandler"></a>Function: xmlSAX2InitDefaultSAXHandler</h3><pre class="programlisting">void xmlSAX2InitDefaultSAXHandler (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br /> int warning)<br />
+</pre><p>Initialize the default XML SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>warning</tt></i>:</span></td><td>flag if non-zero sets the handler warning procedure</td></tr></tbody></table></div><h3><a name="xmlSAX2InitDocbDefaultSAXHandler" id="xmlSAX2InitDocbDefaultSAXHandler"></a>Function: xmlSAX2InitDocbDefaultSAXHandler</h3><pre class="programlisting">void xmlSAX2InitDocbDefaultSAXHandler (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br />
+</pre><p>Initialize the default DocBook SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div><h3><a name="xmlSAX2InitHtmlDefaultSAXHandler" id="xmlSAX2InitHtmlDefaultSAXHandler"></a>Function: xmlSAX2InitHtmlDefaultSAXHandler</h3><pre class="programlisting">void xmlSAX2InitHtmlDefaultSAXHandler (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr)<br />
+</pre><p>Initialize the default HTML SAX2 handler</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr></tbody></table></div><h3><a name="xmlSAX2InternalSubset" id="xmlSAX2InternalSubset"></a>Function: xmlSAX2InternalSubset</h3><pre class="programlisting">void xmlSAX2InternalSubset (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Callback on internal subset declaration.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><h3><a name="xmlSAX2IsStandalone" id="xmlSAX2IsStandalone"></a>Function: xmlSAX2IsStandalone</h3><pre class="programlisting">int xmlSAX2IsStandalone (void * ctx)<br />
+</pre><p>Is this document tagged standalone ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><h3><a name="xmlSAX2NotationDecl" id="xmlSAX2NotationDecl"></a>Function: xmlSAX2NotationDecl</h3><pre class="programlisting">void xmlSAX2NotationDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br />
+</pre><p>What to do when a notation declaration has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div><h3><a name="xmlSAX2ProcessingInstruction" id="xmlSAX2ProcessingInstruction"></a>Function: xmlSAX2ProcessingInstruction</h3><pre class="programlisting">void xmlSAX2ProcessingInstruction (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)<br />
+</pre><p>A processing instruction has been parsed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div><h3><a name="xmlSAX2Reference" id="xmlSAX2Reference"></a>Function: xmlSAX2Reference</h3><pre class="programlisting">void xmlSAX2Reference (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>called when an entity <a href="libxml-SAX2.html#xmlSAX2Reference">xmlSAX2Reference</a> is detected.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div><h3><a name="xmlSAX2ResolveEntity" id="xmlSAX2ResolveEntity"></a>Function: xmlSAX2ResolveEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlSAX2ResolveEntity (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)<br />
+</pre><p>The entity loader, to control the loading of external entities, the application can either: - override this xmlSAX2ResolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div><h3><a name="xmlSAX2SetDocumentLocator" id="xmlSAX2SetDocumentLocator"></a>Function: xmlSAX2SetDocumentLocator</h3><pre class="programlisting">void xmlSAX2SetDocumentLocator (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)<br />
+</pre><p>Receive the document locator at startup, actually <a href="libxml-globals.html#xmlDefaultSAXLocator">xmlDefaultSAXLocator</a> Everything is available on the context, so this is useless in our case.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div><h3><a name="xmlSAX2StartDocument" id="xmlSAX2StartDocument"></a>Function: xmlSAX2StartDocument</h3><pre class="programlisting">void xmlSAX2StartDocument (void * ctx)<br />
+</pre><p>called when the document start being processed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><h3><a name="xmlSAX2StartElement" id="xmlSAX2StartElement"></a>Function: xmlSAX2StartElement</h3><pre class="programlisting">void xmlSAX2StartElement (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)<br />
+</pre><p>called when an opening tag has been processed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div><h3><a name="xmlSAX2StartElementNs" id="xmlSAX2StartElementNs"></a>Function: xmlSAX2StartElementNs</h3><pre class="programlisting">void xmlSAX2StartElementNs (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> int nb_namespaces, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br /> int nb_attributes, <br /> int nb_defaulted, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** attributes)<br />
+</pre><p>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr><tr><td><span class="term"><i><tt>nb_namespaces</tt></i>:</span></td><td>number of namespace definitions on that node</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>pointer to the array of prefix/URI pairs namespace definitions</td></tr><tr><td><span class="term"><i><tt>nb_attributes</tt></i>:</span></td><td>the number of attributes on that node</td></tr><tr><td><span class="term"><i><tt>nb_defaulted</tt></i>:</span></td><td>the number of defaulted attributes.</td></tr><tr><td><span class="term"><i><tt>attributes</tt></i>:</span></td><td>pointer to the array of (localname/prefix/URI/value/end) <a href="libxml-SAX.html#attribute">attribute</a> values.</td></tr></tbody></table></div><h3><a name="xmlSAX2UnparsedEntityDecl" id="xmlSAX2UnparsedEntityDecl"></a>Function: xmlSAX2UnparsedEntityDecl</h3><pre class="programlisting">void xmlSAX2UnparsedEntityDecl (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br />
+</pre><p>What to do when an unparsed entity declaration is parsed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div><h3><a name="xmlSAXDefaultVersion" id="xmlSAXDefaultVersion"></a>Function: xmlSAXDefaultVersion</h3><pre class="programlisting">int xmlSAXDefaultVersion (int version)<br />
+</pre><p>Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSAXVersion" id="xmlSAXVersion"></a>Function: xmlSAXVersion</h3><pre class="programlisting">int xmlSAXVersion (<a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * hdlr, <br /> int version)<br />
+</pre><p>Initialize the default XML SAX handler according to the version</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hdlr</tt></i>:</span></td><td>the SAX handler</td></tr><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the version, 1 or 2</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-c14n.html b/doc/html/libxml-c14n.html
new file mode 100644
index 0000000..2e61a98
--- /dev/null
+++ b/doc/html/libxml-c14n.html
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module c14n from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module c14n from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-SAX2.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-SAX2.html">SAX2</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-catalog.html">catalog</a></th><td><a accesskey="n" href="libxml-catalog.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>the c14n modules provides a "Canonical XML" implementation</p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xmlC14NMode">xmlC14NMode</a>
+</pre><pre class="programlisting">int <a href="#xmlC14NDocDumpMemory">xmlC14NDocDumpMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr)</pre>
+<pre class="programlisting">int <a href="#xmlC14NDocSave">xmlC14NDocSave</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> const char * filename, <br /> int compression)</pre>
+<pre class="programlisting">int <a href="#xmlC14NDocSaveTo">xmlC14NDocSaveTo</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)</pre>
+<pre class="programlisting">int <a href="#xmlC14NExecute">xmlC14NExecute</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br /> void * user_data, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)</pre>
+<pre class="programlisting">Function type: <a href="#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a>
+int <a href="#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> (void * user_data, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)
+</pre>
+<h2>Description</h2>
+<h3>Enum <a name="xmlC14NMode" id="xmlC14NMode">xmlC14NMode</a></h3><pre class="programlisting">Enum xmlC14NMode {
+ <a name="XML_C14N_1_0" id="XML_C14N_1_0">XML_C14N_1_0</a> = 0 : Origianal C14N 1.0 spec
+ <a name="XML_C14N_EXCLUSIVE_1_0" id="XML_C14N_EXCLUSIVE_1_0">XML_C14N_EXCLUSIVE_1_0</a> = 1 : Exclusive C14N 1.0 spec
+ <a name="XML_C14N_1_1" id="XML_C14N_1_1">XML_C14N_1_1</a> = 2 : C14N 1.1 spec
+}
+</pre><h3><a name="xmlC14NDocDumpMemory" id="xmlC14NDocDumpMemory"></a>Function: xmlC14NDocDumpMemory</h3><pre class="programlisting">int xmlC14NDocDumpMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr)<br />
+</pre><p>Dumps the canonized image of given XML document into memory. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written on success or a negative value on fail</td></tr></tbody></table></div><h3><a name="xmlC14NDocSave" id="xmlC14NDocSave"></a>Function: xmlC14NDocSave</h3><pre class="programlisting">int xmlC14NDocSave (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> const char * filename, <br /> int compression)<br />
+</pre><p>Dumps the canonized image of given XML document into the file. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename to store canonical XML image</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, &gt;0 - compression level</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written success or a negative value on fail</td></tr></tbody></table></div><h3><a name="xmlC14NDocSaveTo" id="xmlC14NDocSaveTo"></a>Function: xmlC14NDocSaveTo</h3><pre class="programlisting">int xmlC14NDocSaveTo (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br />
+</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>the nodes set to be included in the canonized image or NULL if all document nodes should be included</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div><h3><a name="xmlC14NExecute" id="xmlC14NExecute"></a>Function: xmlC14NExecute</h3><pre class="programlisting">int xmlC14NExecute (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-c14n.html#xmlC14NIsVisibleCallback">xmlC14NIsVisibleCallback</a> is_visible_callback, <br /> void * user_data, <br /> int mode, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** inclusive_ns_prefixes, <br /> int with_comments, <br /> <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf)<br />
+</pre><p>Dumps the canonized image of given XML document into the provided buffer. For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document for canonization</td></tr><tr><td><span class="term"><i><tt>is_visible_callback</tt></i>:</span></td><td>the function to use to determine is node visible or not</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the first parameter for @is_visible_callback function (in most cases, it is nodes set)</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the c14n mode (see @xmlC14NMode)</td></tr><tr><td><span class="term"><i><tt>inclusive_ns_prefixes</tt></i>:</span></td><td>the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)</td></tr><tr><td><span class="term"><i><tt>with_comments</tt></i>:</span></td><td>include comments in the result (!=0) or not (==0)</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>non-negative value on success or a negative value on fail</td></tr></tbody></table></div><h3><a name="xmlC14NIsVisibleCallback" id="xmlC14NIsVisibleCallback"></a>Function type: xmlC14NIsVisibleCallback</h3><pre class="programlisting">Function type: xmlC14NIsVisibleCallback
+int xmlC14NIsVisibleCallback (void * user_data, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)
+</pre><p>Signature for a C14N callback on visible nodes</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>user data</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the curent node</td></tr><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node should be included</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-catalog.html b/doc/html/libxml-catalog.html
new file mode 100644
index 0000000..d6d28f8
--- /dev/null
+++ b/doc/html/libxml-catalog.html
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module catalog from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module catalog from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-c14n.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-c14n.html">c14n</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-chvalid.html">chvalid</a></th><td><a accesskey="n" href="libxml-chvalid.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>the catalog module implements the support for XML Catalogs and SGML catalogs </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_CATALOGS_NAMESPACE">XML_CATALOGS_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#XML_CATALOG_PI">XML_CATALOG_PI</a></pre><pre class="programlisting">Structure <a href="#xmlCatalog">xmlCatalog</a><br />struct _xmlCatalog
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Enum <a href="#xmlCatalogAllow">xmlCatalogAllow</a>
+</pre><pre class="programlisting">Enum <a href="#xmlCatalogPrefer">xmlCatalogPrefer</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-catalog.html#xmlCatalog">xmlCatalog</a> * <a name="xmlCatalogPtr" id="xmlCatalogPtr">xmlCatalogPtr</a>
+</pre><pre class="programlisting">int <a href="#xmlACatalogAdd">xmlACatalogAdd</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * replace)</pre>
+<pre class="programlisting">void <a href="#xmlACatalogDump">xmlACatalogDump</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> FILE * out)</pre>
+<pre class="programlisting">int <a href="#xmlACatalogRemove">xmlACatalogRemove</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolve">xmlACatalogResolve</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolvePublic">xmlACatalogResolvePublic</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveSystem">xmlACatalogResolveSystem</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlACatalogResolveURI">xmlACatalogResolveURI</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)</pre>
+<pre class="programlisting">int <a href="#xmlCatalogAdd">xmlCatalogAdd</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * replace)</pre>
+<pre class="programlisting">void * <a href="#xmlCatalogAddLocal">xmlCatalogAddLocal</a> (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL)</pre>
+<pre class="programlisting">void <a href="#xmlCatalogCleanup">xmlCatalogCleanup</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlCatalogConvert">xmlCatalogConvert</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlCatalogDump">xmlCatalogDump</a> (FILE * out)</pre>
+<pre class="programlisting">void <a href="#xmlCatalogFreeLocal">xmlCatalogFreeLocal</a> (void * catalogs)</pre>
+<pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> <a href="#xmlCatalogGetDefaults">xmlCatalogGetDefaults</a> (void)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetPublic">xmlCatalogGetPublic</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogGetSystem">xmlCatalogGetSystem</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting">int <a href="#xmlCatalogIsEmpty">xmlCatalogIsEmpty</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolve">xmlCatalogLocalResolve</a> (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogLocalResolveURI">xmlCatalogLocalResolveURI</a> (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)</pre>
+<pre class="programlisting">int <a href="#xmlCatalogRemove">xmlCatalogRemove</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolve">xmlCatalogResolve</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolvePublic">xmlCatalogResolvePublic</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveSystem">xmlCatalogResolveSystem</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCatalogResolveURI">xmlCatalogResolveURI</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)</pre>
+<pre class="programlisting">int <a href="#xmlCatalogSetDebug">xmlCatalogSetDebug</a> (int level)</pre>
+<pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> <a href="#xmlCatalogSetDefaultPrefer">xmlCatalogSetDefaultPrefer</a> (<a href="libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer)</pre>
+<pre class="programlisting">void <a href="#xmlCatalogSetDefaults">xmlCatalogSetDefaults</a> (<a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow)</pre>
+<pre class="programlisting">int <a href="#xmlConvertSGMLCatalog">xmlConvertSGMLCatalog</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)</pre>
+<pre class="programlisting">void <a href="#xmlFreeCatalog">xmlFreeCatalog</a> (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)</pre>
+<pre class="programlisting">void <a href="#xmlInitializeCatalog">xmlInitializeCatalog</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadACatalog">xmlLoadACatalog</a> (const char * filename)</pre>
+<pre class="programlisting">int <a href="#xmlLoadCatalog">xmlLoadCatalog</a> (const char * filename)</pre>
+<pre class="programlisting">void <a href="#xmlLoadCatalogs">xmlLoadCatalogs</a> (const char * pathss)</pre>
+<pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlLoadSGMLSuperCatalog">xmlLoadSGMLSuperCatalog</a> (const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> <a href="#xmlNewCatalog">xmlNewCatalog</a> (int sgml)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseCatalogFile">xmlParseCatalogFile</a> (const char * filename)</pre>
+<h2>Description</h2>
+<h3><a name="XML_CATALOGS_NAMESPACE" id="XML_CATALOGS_NAMESPACE"></a>Macro: XML_CATALOGS_NAMESPACE</h3><pre>#define XML_CATALOGS_NAMESPACE</pre><p>The namespace for the XML Catalogs elements.</p>
+<h3><a name="XML_CATALOG_PI" id="XML_CATALOG_PI"></a>Macro: XML_CATALOG_PI</h3><pre>#define XML_CATALOG_PI</pre><p>The specific XML Catalog Processing Instuction name.</p>
+<h3><a name="xmlCatalog" id="xmlCatalog">Structure xmlCatalog</a></h3><pre class="programlisting">Structure xmlCatalog<br />struct _xmlCatalog {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlCatalogAllow" id="xmlCatalogAllow">xmlCatalogAllow</a></h3><pre class="programlisting">Enum xmlCatalogAllow {
+ <a name="XML_CATA_ALLOW_NONE" id="XML_CATA_ALLOW_NONE">XML_CATA_ALLOW_NONE</a> = 0
+ <a name="XML_CATA_ALLOW_GLOBAL" id="XML_CATA_ALLOW_GLOBAL">XML_CATA_ALLOW_GLOBAL</a> = 1
+ <a name="XML_CATA_ALLOW_DOCUMENT" id="XML_CATA_ALLOW_DOCUMENT">XML_CATA_ALLOW_DOCUMENT</a> = 2
+ <a name="XML_CATA_ALLOW_ALL" id="XML_CATA_ALLOW_ALL">XML_CATA_ALLOW_ALL</a> = 3
+}
+</pre><h3>Enum <a name="xmlCatalogPrefer" id="xmlCatalogPrefer">xmlCatalogPrefer</a></h3><pre class="programlisting">Enum xmlCatalogPrefer {
+ <a name="XML_CATA_PREFER_NONE" id="XML_CATA_PREFER_NONE">XML_CATA_PREFER_NONE</a> = 0
+ <a name="XML_CATA_PREFER_PUBLIC" id="XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> = 1
+ <a name="XML_CATA_PREFER_SYSTEM" id="XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a> = 2
+}
+</pre><h3><a name="xmlACatalogAdd" id="xmlACatalogAdd"></a>Function: xmlACatalogAdd</h3><pre class="programlisting">int xmlACatalogAdd (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * replace)<br />
+</pre><p>Add an entry in the catalog, it may overwrite existing but different entries.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlACatalogDump" id="xmlACatalogDump"></a>Function: xmlACatalogDump</h3><pre class="programlisting">void xmlACatalogDump (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> FILE * out)<br />
+</pre><p>Dump the given catalog to the given file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div><h3><a name="xmlACatalogRemove" id="xmlACatalogRemove"></a>Function: xmlACatalogRemove</h3><pre class="programlisting">int xmlACatalogRemove (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Remove an entry from the catalog</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlACatalogResolve" id="xmlACatalogResolve"></a>Function: xmlACatalogResolve</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolve (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Do a complete resolution lookup of an External Identifier</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlACatalogResolvePublic" id="xmlACatalogResolvePublic"></a>Function: xmlACatalogResolvePublic</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolvePublic (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br />
+</pre><p>Try to lookup the catalog local <a href="libxml-SAX.html#reference">reference</a> associated to a public ID in that catalog</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlACatalogResolveSystem" id="xmlACatalogResolveSystem"></a>Function: xmlACatalogResolveSystem</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveSystem (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Try to lookup the catalog resource for a system ID</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlACatalogResolveURI" id="xmlACatalogResolveURI"></a>Function: xmlACatalogResolveURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlACatalogResolveURI (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)<br />
+</pre><p>Do a complete resolution lookup of an URI</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogAdd" id="xmlCatalogAdd"></a>Function: xmlCatalogAdd</h3><pre class="programlisting">int xmlCatalogAdd (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * replace)<br />
+</pre><p>Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of record to add to the catalog</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>the system, public or prefix to match</td></tr><tr><td><span class="term"><i><tt>replace</tt></i>:</span></td><td>the replacement value for the match</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlCatalogAddLocal" id="xmlCatalogAddLocal"></a>Function: xmlCatalogAddLocal</h3><pre class="programlisting">void * xmlCatalogAddLocal (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL)<br />
+</pre><p>Add the new entry to the catalog list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to a new local catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the updated list</td></tr></tbody></table></div><h3><a name="xmlCatalogCleanup" id="xmlCatalogCleanup"></a>Function: xmlCatalogCleanup</h3><pre class="programlisting">void xmlCatalogCleanup (void)<br />
+</pre><p>Free up all the memory associated with catalogs</p>
+<h3><a name="xmlCatalogConvert" id="xmlCatalogConvert"></a>Function: xmlCatalogConvert</h3><pre class="programlisting">int xmlCatalogConvert (void)<br />
+</pre><p>Convert all the SGML catalog entries as XML ones</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlCatalogDump" id="xmlCatalogDump"></a>Function: xmlCatalogDump</h3><pre class="programlisting">void xmlCatalogDump (FILE * out)<br />
+</pre><p>Dump all the global catalog content to the given file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>the file.</td></tr></tbody></table></div><h3><a name="xmlCatalogFreeLocal" id="xmlCatalogFreeLocal"></a>Function: xmlCatalogFreeLocal</h3><pre class="programlisting">void xmlCatalogFreeLocal (void * catalogs)<br />
+</pre><p>Free up the memory associated to the catalog list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr></tbody></table></div><h3><a name="xmlCatalogGetDefaults" id="xmlCatalogGetDefaults"></a>Function: xmlCatalogGetDefaults</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> xmlCatalogGetDefaults (void)<br />
+</pre><p>Used to get the user preference w.r.t. to what catalogs should be accepted</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> value</td></tr></tbody></table></div><h3><a name="xmlCatalogGetPublic" id="xmlCatalogGetPublic"></a>Function: xmlCatalogGetPublic</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetPublic (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br />
+</pre><p>Try to lookup the catalog <a href="libxml-SAX.html#reference">reference</a> associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlCatalogGetSystem" id="xmlCatalogGetSystem"></a>Function: xmlCatalogGetSystem</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogGetSystem (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Try to lookup the catalog <a href="libxml-SAX.html#reference">reference</a> associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlCatalogIsEmpty" id="xmlCatalogIsEmpty"></a>Function: xmlCatalogIsEmpty</h3><pre class="programlisting">int xmlCatalogIsEmpty (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br />
+</pre><p>Check is a catalog is empty</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the catalog is empty, 0 if not, amd -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlCatalogLocalResolve" id="xmlCatalogLocalResolve"></a>Function: xmlCatalogLocalResolve</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolve (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Do a complete resolution lookup of an External Identifier using a document's private catalog list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogLocalResolveURI" id="xmlCatalogLocalResolveURI"></a>Function: xmlCatalogLocalResolveURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogLocalResolveURI (void * catalogs, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)<br />
+</pre><p>Do a complete resolution lookup of an URI using a document's private catalog list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catalogs</tt></i>:</span></td><td>a document's list of catalogs</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogRemove" id="xmlCatalogRemove"></a>Function: xmlCatalogRemove</h3><pre class="programlisting">int xmlCatalogRemove (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Remove an entry from the catalog</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries removed if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlCatalogResolve" id="xmlCatalogResolve"></a>Function: xmlCatalogResolve</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolve (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Do a complete resolution lookup of an External Identifier</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogResolvePublic" id="xmlCatalogResolvePublic"></a>Function: xmlCatalogResolvePublic</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolvePublic (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubID)<br />
+</pre><p>Try to lookup the catalog <a href="libxml-SAX.html#reference">reference</a> associated to a public ID</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pubID</tt></i>:</span></td><td>the public ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogResolveSystem" id="xmlCatalogResolveSystem"></a>Function: xmlCatalogResolveSystem</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveSystem (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysID)<br />
+</pre><p>Try to lookup the catalog resource for a system ID</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sysID</tt></i>:</span></td><td>the system ID string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resource if found or NULL otherwise, the value returned must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogResolveURI" id="xmlCatalogResolveURI"></a>Function: xmlCatalogResolveURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCatalogResolveURI (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)<br />
+</pre><p>Do a complete resolution lookup of an URI</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI of the resource or NULL if not found, it must be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlCatalogSetDebug" id="xmlCatalogSetDebug"></a>Function: xmlCatalogSetDebug</h3><pre class="programlisting">int xmlCatalogSetDebug (int level)<br />
+</pre><p>Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the debug level of catalogs required</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the catalog debugging level</td></tr></tbody></table></div><h3><a name="xmlCatalogSetDefaultPrefer" id="xmlCatalogSetDefaultPrefer"></a>Function: xmlCatalogSetDefaultPrefer</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> xmlCatalogSetDefaultPrefer (<a href="libxml-catalog.html#xmlCatalogPrefer">xmlCatalogPrefer</a> prefer)<br />
+</pre><p>Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are <a href="libxml-catalog.html#XML_CATA_PREFER_PUBLIC">XML_CATA_PREFER_PUBLIC</a> or <a href="libxml-catalog.html#XML_CATA_PREFER_SYSTEM">XML_CATA_PREFER_SYSTEM</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prefer</tt></i>:</span></td><td>the default preference for delegation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the default preference for delegation</td></tr></tbody></table></div><h3><a name="xmlCatalogSetDefaults" id="xmlCatalogSetDefaults"></a>Function: xmlCatalogSetDefaults</h3><pre class="programlisting">void xmlCatalogSetDefaults (<a href="libxml-catalog.html#xmlCatalogAllow">xmlCatalogAllow</a> allow)<br />
+</pre><p>Used to set the user preference w.r.t. to what catalogs should be accepted</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>allow</tt></i>:</span></td><td>what catalogs should be accepted</td></tr></tbody></table></div><h3><a name="xmlConvertSGMLCatalog" id="xmlConvertSGMLCatalog"></a>Function: xmlConvertSGMLCatalog</h3><pre class="programlisting">int xmlConvertSGMLCatalog (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br />
+</pre><p>Convert all the SGML catalog entries as XML ones</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>the catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries converted if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlFreeCatalog" id="xmlFreeCatalog"></a>Function: xmlFreeCatalog</h3><pre class="programlisting">void xmlFreeCatalog (<a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> catal)<br />
+</pre><p>Free the memory allocated to a Catalog</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>catal</tt></i>:</span></td><td>a Catalog</td></tr></tbody></table></div><h3><a name="xmlInitializeCatalog" id="xmlInitializeCatalog"></a>Function: xmlInitializeCatalog</h3><pre class="programlisting">void xmlInitializeCatalog (void)<br />
+</pre><p>Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+<h3><a name="xmlLoadACatalog" id="xmlLoadACatalog"></a>Function: xmlLoadACatalog</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadACatalog (const char * filename)<br />
+</pre><p>Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlLoadCatalog" id="xmlLoadCatalog"></a>Function: xmlLoadCatalog</h3><pre class="programlisting">int xmlLoadCatalog (const char * filename)<br />
+</pre><p>Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlLoadCatalogs" id="xmlLoadCatalogs"></a>Function: xmlLoadCatalogs</h3><pre class="programlisting">void xmlLoadCatalogs (const char * pathss)<br />
+</pre><p>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pathss</tt></i>:</span></td><td>a list of directories separated by a colon or a space.</td></tr></tbody></table></div><h3><a name="xmlLoadSGMLSuperCatalog" id="xmlLoadSGMLSuperCatalog"></a>Function: xmlLoadSGMLSuperCatalog</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlLoadSGMLSuperCatalog (const char * filename)<br />
+</pre><p>Load an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the catalog parsed or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewCatalog" id="xmlNewCatalog"></a>Function: xmlNewCatalog</h3><pre class="programlisting"><a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> xmlNewCatalog (int sgml)<br />
+</pre><p>create a new Catalog.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sgml</tt></i>:</span></td><td>should this create an SGML catalog</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-catalog.html#xmlCatalogPtr">xmlCatalogPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlParseCatalogFile" id="xmlParseCatalogFile"></a>Function: xmlParseCatalogFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseCatalogFile (const char * filename)<br />
+</pre><p>parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-chvalid.html b/doc/html/libxml-chvalid.html
new file mode 100644
index 0000000..177e9f6
--- /dev/null
+++ b/doc/html/libxml-chvalid.html
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module chvalid from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module chvalid from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-catalog.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-catalog.html">catalog</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-debugXML.html">debugXML</a></th><td><a accesskey="n" href="libxml-debugXML.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#xmlIsBaseCharQ">xmlIsBaseCharQ</a></pre><pre class="programlisting">#define <a href="#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a></pre><pre class="programlisting">#define <a href="#xmlIsBlankQ">xmlIsBlankQ</a></pre><pre class="programlisting">#define <a href="#xmlIsBlank_ch">xmlIsBlank_ch</a></pre><pre class="programlisting">#define <a href="#xmlIsCharQ">xmlIsCharQ</a></pre><pre class="programlisting">#define <a href="#xmlIsChar_ch">xmlIsChar_ch</a></pre><pre class="programlisting">#define <a href="#xmlIsCombiningQ">xmlIsCombiningQ</a></pre><pre class="programlisting">#define <a href="#xmlIsDigitQ">xmlIsDigitQ</a></pre><pre class="programlisting">#define <a href="#xmlIsDigit_ch">xmlIsDigit_ch</a></pre><pre class="programlisting">#define <a href="#xmlIsExtenderQ">xmlIsExtenderQ</a></pre><pre class="programlisting">#define <a href="#xmlIsExtender_ch">xmlIsExtender_ch</a></pre><pre class="programlisting">#define <a href="#xmlIsIdeographicQ">xmlIsIdeographicQ</a></pre><pre class="programlisting">#define <a href="#xmlIsPubidCharQ">xmlIsPubidCharQ</a></pre><pre class="programlisting">#define <a href="#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a></pre><pre class="programlisting">Structure <a href="#xmlChLRange">xmlChLRange</a><br />struct _xmlChLRange
+</pre><pre class="programlisting">Typedef <a href="libxml-chvalid.html#xmlChLRange">xmlChLRange</a> * <a name="xmlChLRangePtr" id="xmlChLRangePtr">xmlChLRangePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlChRangeGroup">xmlChRangeGroup</a><br />struct _xmlChRangeGroup
+</pre><pre class="programlisting">Typedef <a href="libxml-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * <a name="xmlChRangeGroupPtr" id="xmlChRangeGroupPtr">xmlChRangeGroupPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlChSRange">xmlChSRange</a><br />struct _xmlChSRange
+</pre><pre class="programlisting">Typedef <a href="libxml-chvalid.html#xmlChSRange">xmlChSRange</a> * <a name="xmlChSRangePtr" id="xmlChSRangePtr">xmlChSRangePtr</a>
+</pre><pre class="programlisting">int <a href="#xmlCharInRange">xmlCharInRange</a> (unsigned int val, <br /> const <a href="libxml-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr)</pre>
+<pre class="programlisting">int <a href="#xmlIsBaseChar">xmlIsBaseChar</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsBlank">xmlIsBlank</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsChar">xmlIsChar</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsCombining">xmlIsCombining</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsDigit">xmlIsDigit</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsExtender">xmlIsExtender</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsIdeographic">xmlIsIdeographic</a> (unsigned int ch)</pre>
+<pre class="programlisting">int <a href="#xmlIsPubidChar">xmlIsPubidChar</a> (unsigned int ch)</pre>
+<h2>Description</h2>
+<h3><a name="xmlIsBaseCharQ" id="xmlIsBaseCharQ"></a>Macro: xmlIsBaseCharQ</h3><pre>#define xmlIsBaseCharQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsBaseChar_ch" id="xmlIsBaseChar_ch"></a>Macro: xmlIsBaseChar_ch</h3><pre>#define xmlIsBaseChar_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsBlankQ" id="xmlIsBlankQ"></a>Macro: xmlIsBlankQ</h3><pre>#define xmlIsBlankQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsBlank_ch" id="xmlIsBlank_ch"></a>Macro: xmlIsBlank_ch</h3><pre>#define xmlIsBlank_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsCharQ" id="xmlIsCharQ"></a>Macro: xmlIsCharQ</h3><pre>#define xmlIsCharQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsChar_ch" id="xmlIsChar_ch"></a>Macro: xmlIsChar_ch</h3><pre>#define xmlIsChar_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsCombiningQ" id="xmlIsCombiningQ"></a>Macro: xmlIsCombiningQ</h3><pre>#define xmlIsCombiningQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsDigitQ" id="xmlIsDigitQ"></a>Macro: xmlIsDigitQ</h3><pre>#define xmlIsDigitQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsDigit_ch" id="xmlIsDigit_ch"></a>Macro: xmlIsDigit_ch</h3><pre>#define xmlIsDigit_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsExtenderQ" id="xmlIsExtenderQ"></a>Macro: xmlIsExtenderQ</h3><pre>#define xmlIsExtenderQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsExtender_ch" id="xmlIsExtender_ch"></a>Macro: xmlIsExtender_ch</h3><pre>#define xmlIsExtender_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsIdeographicQ" id="xmlIsIdeographicQ"></a>Macro: xmlIsIdeographicQ</h3><pre>#define xmlIsIdeographicQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsPubidCharQ" id="xmlIsPubidCharQ"></a>Macro: xmlIsPubidCharQ</h3><pre>#define xmlIsPubidCharQ</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlIsPubidChar_ch" id="xmlIsPubidChar_ch"></a>Macro: xmlIsPubidChar_ch</h3><pre>#define xmlIsPubidChar_ch</pre><p>Automatically generated by genChRanges.py</p>
+<h3><a name="xmlChLRange" id="xmlChLRange">Structure xmlChLRange</a></h3><pre class="programlisting">Structure xmlChLRange<br />struct _xmlChLRange {
+ unsigned int low
+ unsigned int high
+}</pre><h3><a name="xmlChRangeGroup" id="xmlChRangeGroup">Structure xmlChRangeGroup</a></h3><pre class="programlisting">Structure xmlChRangeGroup<br />struct _xmlChRangeGroup {
+ int nbShortRange
+ int nbLongRange
+ const <a href="libxml-chvalid.html#xmlChSRange">xmlChSRange</a> * shortRange : points to an array of ranges
+ const <a href="libxml-chvalid.html#xmlChLRange">xmlChLRange</a> * longRange
+}</pre><h3><a name="xmlChSRange" id="xmlChSRange">Structure xmlChSRange</a></h3><pre class="programlisting">Structure xmlChSRange<br />struct _xmlChSRange {
+ unsigned short low
+ unsigned short high
+}</pre><h3><a name="xmlCharInRange" id="xmlCharInRange"></a>Function: xmlCharInRange</h3><pre class="programlisting">int xmlCharInRange (unsigned int val, <br /> const <a href="libxml-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr)<br />
+</pre><p>Does a binary search of the range table to determine if char is valid</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>character to be validated</td></tr><tr><td><span class="term"><i><tt>rptr</tt></i>:</span></td><td>pointer to range to be used to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if character valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsBaseChar" id="xmlIsBaseChar"></a>Function: xmlIsBaseChar</h3><pre class="programlisting">int xmlIsBaseChar (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a> or <a href="libxml-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsBlank" id="xmlIsBlank"></a>Function: xmlIsBlank</h3><pre class="programlisting">int xmlIsBlank (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a> or <a href="libxml-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsChar" id="xmlIsChar"></a>Function: xmlIsChar</h3><pre class="programlisting">int xmlIsChar (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a> or <a href="libxml-chvalid.html#xmlIsCharQ">xmlIsCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsCombining" id="xmlIsCombining"></a>Function: xmlIsCombining</h3><pre class="programlisting">int xmlIsCombining (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsDigit" id="xmlIsDigit"></a>Function: xmlIsDigit</h3><pre class="programlisting">int xmlIsDigit (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a> or <a href="libxml-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsExtender" id="xmlIsExtender"></a>Function: xmlIsExtender</h3><pre class="programlisting">int xmlIsExtender (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a> or <a href="libxml-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsIdeographic" id="xmlIsIdeographic"></a>Function: xmlIsIdeographic</h3><pre class="programlisting">int xmlIsIdeographic (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><h3><a name="xmlIsPubidChar" id="xmlIsPubidChar"></a>Function: xmlIsPubidChar</h3><pre class="programlisting">int xmlIsPubidChar (unsigned int ch)<br />
+</pre><p>This function is DEPRECATED. Use <a href="libxml-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a> or <a href="libxml-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-debugXML.html b/doc/html/libxml-debugXML.html
new file mode 100644
index 0000000..3426e14
--- /dev/null
+++ b/doc/html/libxml-debugXML.html
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module debugXML from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module debugXML from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-chvalid.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-chvalid.html">chvalid</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-dict.html">dict</a></th><td><a accesskey="n" href="libxml-dict.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>Interfaces to a set of routines used for debugging the tree produced by the XML parser. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlShellCtxt">xmlShellCtxt</a><br />struct _xmlShellCtxt
+</pre><pre class="programlisting">Typedef <a href="libxml-debugXML.html#xmlShellCtxt">xmlShellCtxt</a> * <a name="xmlShellCtxtPtr" id="xmlShellCtxtPtr">xmlShellCtxtPtr</a>
+</pre><pre class="programlisting">const char * <a href="#xmlBoolToText">xmlBoolToText</a> (int boolval)</pre>
+<pre class="programlisting">int <a href="#xmlDebugCheckDocument">xmlDebugCheckDocument</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpAttr">xmlDebugDumpAttr</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpAttrList">xmlDebugDumpAttrList</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpDTD">xmlDebugDumpDTD</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpDocument">xmlDebugDumpDocument</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpDocumentHead">xmlDebugDumpDocumentHead</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpEntities">xmlDebugDumpEntities</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpNode">xmlDebugDumpNode</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpNodeList">xmlDebugDumpNodeList</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpOneNode">xmlDebugDumpOneNode</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlDebugDumpString">xmlDebugDumpString</a> (FILE * output, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">int <a href="#xmlLsCountNode">xmlLsCountNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">void <a href="#xmlLsOneNode">xmlLsOneNode</a> (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">void <a href="#xmlShell">xmlShell</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> char * filename, <br /> <a href="libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br /> FILE * output)</pre>
+<pre class="programlisting">int <a href="#xmlShellBase">xmlShellBase</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellCat">xmlShellCat</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">Function type: <a href="#xmlShellCmd">xmlShellCmd</a>
+int <a href="#xmlShellCmd">xmlShellCmd</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)
+</pre>
+<pre class="programlisting">int <a href="#xmlShellDir">xmlShellDir</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellDu">xmlShellDu</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellList">xmlShellList</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellLoad">xmlShellLoad</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">void <a href="#xmlShellPrintNode">xmlShellPrintNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">void <a href="#xmlShellPrintXPathError">xmlShellPrintXPathError</a> (int errorType, <br /> const char * arg)</pre>
+<pre class="programlisting">void <a href="#xmlShellPrintXPathResult">xmlShellPrintXPathResult</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list)</pre>
+<pre class="programlisting">int <a href="#xmlShellPwd">xmlShellPwd</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * buffer, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">Function type: <a href="#xmlShellReadlineFunc">xmlShellReadlineFunc</a>
+char * <a href="#xmlShellReadlineFunc">xmlShellReadlineFunc</a> (char * prompt)
+</pre>
+<pre class="programlisting">int <a href="#xmlShellSave">xmlShellSave</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellValidate">xmlShellValidate</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * dtd, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting">int <a href="#xmlShellWrite">xmlShellWrite</a> (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<h2>Description</h2>
+<h3><a name="xmlShellCtxt" id="xmlShellCtxt">Structure xmlShellCtxt</a></h3><pre class="programlisting">Structure xmlShellCtxt<br />struct _xmlShellCtxt {
+ char * filename
+ <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> pctxt
+ int loaded
+ FILE * output
+ <a href="libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input
+}</pre><h3><a name="xmlBoolToText" id="xmlBoolToText"></a>Function: xmlBoolToText</h3><pre class="programlisting">const char * xmlBoolToText (int boolval)<br />
+</pre><p>Convenient way to turn bool into text</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>boolval</tt></i>:</span></td><td>a bool to turn into text</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to either "True" or "False"</td></tr></tbody></table></div><h3><a name="xmlDebugCheckDocument" id="xmlDebugCheckDocument"></a>Function: xmlDebugCheckDocument</h3><pre class="programlisting">int xmlDebugCheckDocument (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Check the document for potential content problems, and output the errors to @output</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of errors found</td></tr></tbody></table></div><h3><a name="xmlDebugDumpAttr" id="xmlDebugDumpAttr"></a>Function: xmlDebugDumpAttr</h3><pre class="programlisting">void xmlDebugDumpAttr (FILE * output, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> int depth)<br />
+</pre><p>Dumps debug information for the <a href="libxml-SAX.html#attribute">attribute</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlDebugDumpAttrList" id="xmlDebugDumpAttrList"></a>Function: xmlDebugDumpAttrList</h3><pre class="programlisting">void xmlDebugDumpAttrList (FILE * output, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> int depth)<br />
+</pre><p>Dumps debug information for the <a href="libxml-SAX.html#attribute">attribute</a> list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlDebugDumpDTD" id="xmlDebugDumpDTD"></a>Function: xmlDebugDumpDTD</h3><pre class="programlisting">void xmlDebugDumpDTD (FILE * output, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br />
+</pre><p>Dumps debug information for the DTD</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD</td></tr></tbody></table></div><h3><a name="xmlDebugDumpDocument" id="xmlDebugDumpDocument"></a>Function: xmlDebugDumpDocument</h3><pre class="programlisting">void xmlDebugDumpDocument (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Dumps debug information for the document, it's recursive</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div><h3><a name="xmlDebugDumpDocumentHead" id="xmlDebugDumpDocumentHead"></a>Function: xmlDebugDumpDocumentHead</h3><pre class="programlisting">void xmlDebugDumpDocumentHead (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Dumps debug information cncerning the document, not recursive</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div><h3><a name="xmlDebugDumpEntities" id="xmlDebugDumpEntities"></a>Function: xmlDebugDumpEntities</h3><pre class="programlisting">void xmlDebugDumpEntities (FILE * output, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Dumps debug information for all the entities in use by the document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div><h3><a name="xmlDebugDumpNode" id="xmlDebugDumpNode"></a>Function: xmlDebugDumpNode</h3><pre class="programlisting">void xmlDebugDumpNode (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)<br />
+</pre><p>Dumps debug information for the element node, it is recursive</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlDebugDumpNodeList" id="xmlDebugDumpNodeList"></a>Function: xmlDebugDumpNodeList</h3><pre class="programlisting">void xmlDebugDumpNodeList (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)<br />
+</pre><p>Dumps debug information for the list of element node, it is recursive</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node list</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlDebugDumpOneNode" id="xmlDebugDumpOneNode"></a>Function: xmlDebugDumpOneNode</h3><pre class="programlisting">void xmlDebugDumpOneNode (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int depth)<br />
+</pre><p>Dumps debug information for the element node, it is not recursive</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlDebugDumpString" id="xmlDebugDumpString"></a>Function: xmlDebugDumpString</h3><pre class="programlisting">void xmlDebugDumpString (FILE * output, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Dumps informations about the string, shorten it if necessary</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr></tbody></table></div><h3><a name="xmlLsCountNode" id="xmlLsCountNode"></a>Function: xmlLsCountNode</h3><pre class="programlisting">int xmlLsCountNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Count the children of @node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to count</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of children of @node.</td></tr></tbody></table></div><h3><a name="xmlLsOneNode" id="xmlLsOneNode"></a>Function: xmlLsOneNode</h3><pre class="programlisting">void xmlLsOneNode (FILE * output, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Dump to @output the type and name of @node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to dump</td></tr></tbody></table></div><h3><a name="xmlShell" id="xmlShell"></a>Function: xmlShell</h3><pre class="programlisting">void xmlShell (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> char * filename, <br /> <a href="libxml-debugXML.html#xmlShellReadlineFunc">xmlShellReadlineFunc</a> input, <br /> FILE * output)<br />
+</pre><p>Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the initial document</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the line reading function</td></tr><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the output FILE*, defaults to stdout if NULL</td></tr></tbody></table></div><h3><a name="xmlShellBase" id="xmlShellBase"></a>Function: xmlShellBase</h3><pre class="programlisting">int xmlShellBase (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "base" dumps the current XML base of the node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlShellCat" id="xmlShellCat"></a>Function: xmlShellCat</h3><pre class="programlisting">int xmlShellCat (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "cat" dumps the serialization node content (XML or HTML).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlShellCmd" id="xmlShellCmd"></a>Function type: xmlShellCmd</h3><pre class="programlisting">Function type: xmlShellCmd
+int xmlShellCmd (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)
+</pre><p>This is a generic signature for the XML shell functions.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a string argument</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>a second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int, negative returns indicating errors.</td></tr></tbody></table></div><br />
+<h3><a name="xmlShellDir" id="xmlShellDir"></a>Function: xmlShellDir</h3><pre class="programlisting">int xmlShellDir (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "dir" dumps informations about the node (namespace, attributes, content).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlShellDu" id="xmlShellDu"></a>Function: xmlShellDu</h3><pre class="programlisting">int xmlShellDu (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "du" show the structure of the subtree under node @tree If @tree is null, the command works on the current node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining a subtree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlShellList" id="xmlShellList"></a>Function: xmlShellList</h3><pre class="programlisting">int xmlShellList (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * arg, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "ls" Does an Unix like listing of the given node (like a directory)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlShellLoad" id="xmlShellLoad"></a>Function: xmlShellLoad</h3><pre class="programlisting">int xmlShellLoad (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "load" loads a new document specified by the filename</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 if loading failed</td></tr></tbody></table></div><h3><a name="xmlShellPrintNode" id="xmlShellPrintNode"></a>Function: xmlShellPrintNode</h3><pre class="programlisting">void xmlShellPrintNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Print node to the output FILE</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a non-null node to print to the output FILE</td></tr></tbody></table></div><h3><a name="xmlShellPrintXPathError" id="xmlShellPrintXPathError"></a>Function: xmlShellPrintXPathError</h3><pre class="programlisting">void xmlShellPrintXPathError (int errorType, <br /> const char * arg)<br />
+</pre><p>Print the xpath error to libxml default error channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>errorType</tt></i>:</span></td><td>valid xpath error id</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>the argument that cause xpath to fail</td></tr></tbody></table></div><h3><a name="xmlShellPrintXPathResult" id="xmlShellPrintXPathResult"></a>Function: xmlShellPrintXPathResult</h3><pre class="programlisting">void xmlShellPrintXPathResult (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> list)<br />
+</pre><p>Prints result to the output FILE</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a valid result generated by an xpath evaluation</td></tr></tbody></table></div><h3><a name="xmlShellPwd" id="xmlShellPwd"></a>Function: xmlShellPwd</h3><pre class="programlisting">int xmlShellPwd (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * buffer, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "pwd" Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the output buffer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlShellReadlineFunc" id="xmlShellReadlineFunc"></a>Function type: xmlShellReadlineFunc</h3><pre class="programlisting">Function type: xmlShellReadlineFunc
+char * xmlShellReadlineFunc (char * prompt)
+</pre><p>This is a generic signature for the XML shell input function.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prompt</tt></i>:</span></td><td>a string prompt</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string which will be freed by the Shell.</td></tr></tbody></table></div><br />
+<h3><a name="xmlShellSave" id="xmlShellSave"></a>Function: xmlShellSave</h3><pre class="programlisting">int xmlShellSave (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "save" Write the current document to the filename, or it's original name</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlShellValidate" id="xmlShellValidate"></a>Function: xmlShellValidate</h3><pre class="programlisting">int xmlShellValidate (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * dtd, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "validate" Validate the document, if a DTD path is provided, then the validation is done against the given DTD.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the DTD URI (optional)</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlShellWrite" id="xmlShellWrite"></a>Function: xmlShellWrite</h3><pre class="programlisting">int xmlShellWrite (<a href="libxml-debugXML.html#xmlShellCtxtPtr">xmlShellCtxtPtr</a> ctxt, <br /> char * filename, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Implements the XML shell function "write" Write the current node to the filename, it saves the serialization of the subtree under the @node specified</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the shell context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the tree</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-dict.html b/doc/html/libxml-dict.html
new file mode 100644
index 0000000..bdd21f4
--- /dev/null
+++ b/doc/html/libxml-dict.html
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module dict from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module dict from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-debugXML.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-debugXML.html">debugXML</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-encoding.html">encoding</a></th><td><a accesskey="n" href="libxml-encoding.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>dictionary of reusable strings, just used to avoid allocation and freeing operations. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlDict">xmlDict</a><br />struct _xmlDict
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-dict.html#xmlDict">xmlDict</a> * <a name="xmlDictPtr" id="xmlDictPtr">xmlDictPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlDictCleanup">xmlDictCleanup</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreate">xmlDictCreate</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> <a href="#xmlDictCreateSub">xmlDictCreateSub</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictExists">xmlDictExists</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlDictFree">xmlDictFree</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting">size_t <a href="#xmlDictGetUsage">xmlDictGetUsage</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictLookup">xmlDictLookup</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlDictOwns">xmlDictOwns</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDictQLookup">xmlDictQLookup</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlDictReference">xmlDictReference</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting">size_t <a href="#xmlDictSetLimit">xmlDictSetLimit</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> size_t limit)</pre>
+<pre class="programlisting">int <a href="#xmlDictSize">xmlDictSize</a> (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting">int <a href="#xmlInitializeDict">xmlInitializeDict</a> (void)</pre>
+<h2>Description</h2>
+<h3><a name="xmlDict" id="xmlDict">Structure xmlDict</a></h3><pre class="programlisting">Structure xmlDict<br />struct _xmlDict {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlDictCleanup" id="xmlDictCleanup"></a>Function: xmlDictCleanup</h3><pre class="programlisting">void xmlDictCleanup (void)<br />
+</pre><p>Free the dictionary mutex. Do not call unless sure the library is not in use anymore !</p>
+<h3><a name="xmlDictCreate" id="xmlDictCreate"></a>Function: xmlDictCreate</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreate (void)<br />
+</pre><p>Create a new dictionary</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictCreateSub" id="xmlDictCreateSub"></a>Function: xmlDictCreateSub</h3><pre class="programlisting"><a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> xmlDictCreateSub (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> sub)<br />
+</pre><p>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>an existing dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created dictionnary, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlDictExists" id="xmlDictExists"></a>Function: xmlDictExists</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlDictExists (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)<br />
+</pre><p>Check if the @name exists in the dictionnary @dict.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlDictFree" id="xmlDictFree"></a>Function: xmlDictFree</h3><pre class="programlisting">void xmlDictFree (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr></tbody></table></div><h3><a name="xmlDictGetUsage" id="xmlDictGetUsage"></a>Function: xmlDictGetUsage</h3><pre class="programlisting">size_t xmlDictGetUsage (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Get how much memory is used by a dictionary for strings Added in 2.9.0</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of strings allocated</td></tr></tbody></table></div><h3><a name="xmlDictLookup" id="xmlDictLookup"></a>Function: xmlDictLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlDictLookup (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)<br />
+</pre><p>Add the @name to the dictionnary @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the name, if -1 it is recomputed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the name or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictOwns" id="xmlDictOwns"></a>Function: xmlDictOwns</h3><pre class="programlisting">int xmlDictOwns (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>check if a string is owned by the disctionary</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictQLookup" id="xmlDictQLookup"></a>Function: xmlDictQLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlDictQLookup (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Add the QName @prefix:@name to the hash @dict if not present.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal copy of the QName or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlDictReference" id="xmlDictReference"></a>Function: xmlDictReference</h3><pre class="programlisting">int xmlDictReference (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Increment the <a href="libxml-SAX.html#reference">reference</a> counter of a dictionary</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDictSetLimit" id="xmlDictSetLimit"></a>Function: xmlDictSetLimit</h3><pre class="programlisting">size_t xmlDictSetLimit (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict, <br /> size_t limit)<br />
+</pre><p>Set a size limit for the dictionary Added in 2.9.0</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>limit</tt></i>:</span></td><td>the limit in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous limit of the dictionary or 0</td></tr></tbody></table></div><h3><a name="xmlDictSize" id="xmlDictSize"></a>Function: xmlDictSize</h3><pre class="programlisting">int xmlDictSize (<a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Query the number of elements installed in the hash @dict.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>the dictionnary</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the dictionnary or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlInitializeDict" id="xmlInitializeDict"></a>Function: xmlInitializeDict</h3><pre class="programlisting">int xmlInitializeDict (void)<br />
+</pre><p>Do the dictionary mutex initialization. this function is deprecated</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if initialization was already done, and 1 if that call led to the initialization</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-encoding.html b/doc/html/libxml-encoding.html
new file mode 100644
index 0000000..70f56f8
--- /dev/null
+++ b/doc/html/libxml-encoding.html
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module encoding from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module encoding from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-dict.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-dict.html">dict</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-entities.html">entities</a></th><td><a accesskey="n" href="libxml-entities.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, "The Unicode Standard -- Worldwide Character Encoding -- Version 1.0", Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#uconv_t">uconv_t</a><br />struct _uconv_t
+</pre><pre class="programlisting">Enum <a href="#xmlCharEncoding">xmlCharEncoding</a>
+</pre><pre class="programlisting">Structure <a href="#xmlCharEncodingHandler">xmlCharEncodingHandler</a><br />struct _xmlCharEncodingHandler
+</pre><pre class="programlisting">Typedef <a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * <a name="xmlCharEncodingHandlerPtr" id="xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a>
+</pre><pre class="programlisting">int <a href="#UTF8Toisolat1">UTF8Toisolat1</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)</pre>
+<pre class="programlisting">int <a href="#isolat1ToUTF8">isolat1ToUTF8</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)</pre>
+<pre class="programlisting">int <a href="#xmlAddEncodingAlias">xmlAddEncodingAlias</a> (const char * name, <br /> const char * alias)</pre>
+<pre class="programlisting">int <a href="#xmlCharEncCloseFunc">xmlCharEncCloseFunc</a> (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler)</pre>
+<pre class="programlisting">int <a href="#xmlCharEncFirstLine">xmlCharEncFirstLine</a> (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)</pre>
+<pre class="programlisting">int <a href="#xmlCharEncInFunc">xmlCharEncInFunc</a> (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)</pre>
+<pre class="programlisting">int <a href="#xmlCharEncOutFunc">xmlCharEncOutFunc</a> (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)</pre>
+<pre class="programlisting">Function type: <a href="#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a>
+int <a href="#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a>
+int <a href="#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)
+</pre>
+<pre class="programlisting">void <a href="#xmlCleanupCharEncodingHandlers">xmlCleanupCharEncodingHandlers</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlCleanupEncodingAliases">xmlCleanupEncodingAliases</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlDelEncodingAlias">xmlDelEncodingAlias</a> (const char * alias)</pre>
+<pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> <a href="#xmlDetectCharEncoding">xmlDetectCharEncoding</a> (const unsigned char * in, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlFindCharEncodingHandler">xmlFindCharEncodingHandler</a> (const char * name)</pre>
+<pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlGetCharEncodingHandler">xmlGetCharEncodingHandler</a> (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">const char * <a href="#xmlGetCharEncodingName">xmlGetCharEncodingName</a> (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">const char * <a href="#xmlGetEncodingAlias">xmlGetEncodingAlias</a> (const char * alias)</pre>
+<pre class="programlisting">void <a href="#xmlInitCharEncodingHandlers">xmlInitCharEncodingHandlers</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> <a href="#xmlNewCharEncodingHandler">xmlNewCharEncodingHandler</a> (const char * name, <br /> <a href="libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output)</pre>
+<pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> <a href="#xmlParseCharEncoding">xmlParseCharEncoding</a> (const char * name)</pre>
+<pre class="programlisting">void <a href="#xmlRegisterCharEncodingHandler">xmlRegisterCharEncodingHandler</a> (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)</pre>
+<h2>Description</h2>
+<h3><a name="uconv_t" id="uconv_t">Structure uconv_t</a></h3><pre class="programlisting">Structure uconv_t<br />struct _uconv_t {
+ UConverter * uconv : for conversion between an encoding and
+ UConverter * utf8 : for conversion between UTF-8 and UTF-16
+}</pre><h3>Enum <a name="xmlCharEncoding" id="xmlCharEncoding">xmlCharEncoding</a></h3><pre class="programlisting">Enum xmlCharEncoding {
+ <a name="XML_CHAR_ENCODING_ERROR" id="XML_CHAR_ENCODING_ERROR">XML_CHAR_ENCODING_ERROR</a> = -1 : No char encoding detected
+ <a name="XML_CHAR_ENCODING_NONE" id="XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a> = 0 : No char encoding detected
+ <a name="XML_CHAR_ENCODING_UTF8" id="XML_CHAR_ENCODING_UTF8">XML_CHAR_ENCODING_UTF8</a> = 1 : UTF-8
+ <a name="XML_CHAR_ENCODING_UTF16LE" id="XML_CHAR_ENCODING_UTF16LE">XML_CHAR_ENCODING_UTF16LE</a> = 2 : UTF-16 little endian
+ <a name="XML_CHAR_ENCODING_UTF16BE" id="XML_CHAR_ENCODING_UTF16BE">XML_CHAR_ENCODING_UTF16BE</a> = 3 : UTF-16 big endian
+ <a name="XML_CHAR_ENCODING_UCS4LE" id="XML_CHAR_ENCODING_UCS4LE">XML_CHAR_ENCODING_UCS4LE</a> = 4 : UCS-4 little endian
+ <a name="XML_CHAR_ENCODING_UCS4BE" id="XML_CHAR_ENCODING_UCS4BE">XML_CHAR_ENCODING_UCS4BE</a> = 5 : UCS-4 big endian
+ <a name="XML_CHAR_ENCODING_EBCDIC" id="XML_CHAR_ENCODING_EBCDIC">XML_CHAR_ENCODING_EBCDIC</a> = 6 : EBCDIC uh!
+ <a name="XML_CHAR_ENCODING_UCS4_2143" id="XML_CHAR_ENCODING_UCS4_2143">XML_CHAR_ENCODING_UCS4_2143</a> = 7 : UCS-4 unusual ordering
+ <a name="XML_CHAR_ENCODING_UCS4_3412" id="XML_CHAR_ENCODING_UCS4_3412">XML_CHAR_ENCODING_UCS4_3412</a> = 8 : UCS-4 unusual ordering
+ <a name="XML_CHAR_ENCODING_UCS2" id="XML_CHAR_ENCODING_UCS2">XML_CHAR_ENCODING_UCS2</a> = 9 : UCS-2
+ <a name="XML_CHAR_ENCODING_8859_1" id="XML_CHAR_ENCODING_8859_1">XML_CHAR_ENCODING_8859_1</a> = 10 : ISO-8859-1 ISO Latin 1
+ <a name="XML_CHAR_ENCODING_8859_2" id="XML_CHAR_ENCODING_8859_2">XML_CHAR_ENCODING_8859_2</a> = 11 : ISO-8859-2 ISO Latin 2
+ <a name="XML_CHAR_ENCODING_8859_3" id="XML_CHAR_ENCODING_8859_3">XML_CHAR_ENCODING_8859_3</a> = 12 : ISO-8859-3
+ <a name="XML_CHAR_ENCODING_8859_4" id="XML_CHAR_ENCODING_8859_4">XML_CHAR_ENCODING_8859_4</a> = 13 : ISO-8859-4
+ <a name="XML_CHAR_ENCODING_8859_5" id="XML_CHAR_ENCODING_8859_5">XML_CHAR_ENCODING_8859_5</a> = 14 : ISO-8859-5
+ <a name="XML_CHAR_ENCODING_8859_6" id="XML_CHAR_ENCODING_8859_6">XML_CHAR_ENCODING_8859_6</a> = 15 : ISO-8859-6
+ <a name="XML_CHAR_ENCODING_8859_7" id="XML_CHAR_ENCODING_8859_7">XML_CHAR_ENCODING_8859_7</a> = 16 : ISO-8859-7
+ <a name="XML_CHAR_ENCODING_8859_8" id="XML_CHAR_ENCODING_8859_8">XML_CHAR_ENCODING_8859_8</a> = 17 : ISO-8859-8
+ <a name="XML_CHAR_ENCODING_8859_9" id="XML_CHAR_ENCODING_8859_9">XML_CHAR_ENCODING_8859_9</a> = 18 : ISO-8859-9
+ <a name="XML_CHAR_ENCODING_2022_JP" id="XML_CHAR_ENCODING_2022_JP">XML_CHAR_ENCODING_2022_JP</a> = 19 : ISO-2022-JP
+ <a name="XML_CHAR_ENCODING_SHIFT_JIS" id="XML_CHAR_ENCODING_SHIFT_JIS">XML_CHAR_ENCODING_SHIFT_JIS</a> = 20 : Shift_JIS
+ <a name="XML_CHAR_ENCODING_EUC_JP" id="XML_CHAR_ENCODING_EUC_JP">XML_CHAR_ENCODING_EUC_JP</a> = 21 : EUC-JP
+ <a name="XML_CHAR_ENCODING_ASCII" id="XML_CHAR_ENCODING_ASCII">XML_CHAR_ENCODING_ASCII</a> = 22 : pure ASCII
+}
+</pre><h3><a name="xmlCharEncodingHandler" id="xmlCharEncodingHandler">Structure xmlCharEncodingHandler</a></h3><pre class="programlisting">Structure xmlCharEncodingHandler<br />struct _xmlCharEncodingHandler {
+ char * name
+ <a href="libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input
+ <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output
+ iconv_t iconv_in
+ iconv_t iconv_out
+ <a href="libxml-encoding.html#uconv_t">uconv_t</a> * uconv_in
+ <a href="libxml-encoding.html#uconv_t">uconv_t</a> * uconv_out
+}</pre><h3><a name="UTF8Toisolat1" id="UTF8Toisolat1"></a>Function: UTF8Toisolat1</h3><pre class="programlisting">int UTF8Toisolat1 (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br />
+</pre><p>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="isolat1ToUTF8" id="isolat1ToUTF8"></a>Function: isolat1ToUTF8</h3><pre class="programlisting">int isolat1ToUTF8 (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)<br />
+</pre><p>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of ISO Latin 1 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><h3><a name="xmlAddEncodingAlias" id="xmlAddEncodingAlias"></a>Function: xmlAddEncodingAlias</h3><pre class="programlisting">int xmlAddEncodingAlias (const char * name, <br /> const char * alias)<br />
+</pre><p>Registers an alias @alias for an encoding named @name. Existing alias will be overwritten.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlCharEncCloseFunc" id="xmlCharEncCloseFunc"></a>Function: xmlCharEncCloseFunc</h3><pre class="programlisting">int xmlCharEncCloseFunc (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler)<br />
+</pre><p>Generic front-end for encoding handler close function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlCharEncFirstLine" id="xmlCharEncFirstLine"></a>Function: xmlCharEncFirstLine</h3><pre class="programlisting">int xmlCharEncFirstLine (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br />
+</pre><p>Front-end for the encoding handler input function, but handle only the very first line, i.e. limit itself to 45 chars.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div><h3><a name="xmlCharEncInFunc" id="xmlCharEncInFunc"></a>Function: xmlCharEncInFunc</h3><pre class="programlisting">int xmlCharEncInFunc (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br />
+</pre><p>Generic front-end for the encoding handler input function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char encoding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div><h3><a name="xmlCharEncOutFunc" id="xmlCharEncOutFunc"></a>Function: xmlCharEncOutFunc</h3><pre class="programlisting">int xmlCharEncOutFunc (<a href="libxml-encoding.html#xmlCharEncodingHandler">xmlCharEncodingHandler</a> * handler, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> out, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> in)<br />
+</pre><p>Generic front-end for the encoding handler output function a first call with @in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>char enconding transformation data structure</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the output.</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> for the input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can't fit into the encoding we want), or</td></tr></tbody></table></div><h3><a name="xmlCharEncodingInputFunc" id="xmlCharEncodingInputFunc"></a>Function type: xmlCharEncodingInputFunc</h3><pre class="programlisting">Function type: xmlCharEncodingInputFunc
+int xmlCharEncodingInputFunc (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)
+</pre><p>Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the UTF-8 result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of chars in the original encoding</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets consumed.</td></tr></tbody></table></div><br />
+<h3><a name="xmlCharEncodingOutputFunc" id="xmlCharEncodingOutputFunc"></a>Function type: xmlCharEncodingOutputFunc</h3><pre class="programlisting">Function type: xmlCharEncodingOutputFunc
+int xmlCharEncodingOutputFunc (unsigned char * out, <br /> int * outlen, <br /> const unsigned char * in, <br /> int * inlen)
+</pre><p>Take a block of UTF-8 chars in and try to convert it to another encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a pointer to an array of bytes to store the result</td></tr><tr><td><span class="term"><i><tt>outlen</tt></i>:</span></td><td>the length of @out</td></tr><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to an array of UTF-8 chars</td></tr><tr><td><span class="term"><i><tt>inlen</tt></i>:</span></td><td>the length of @in</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets produced.</td></tr></tbody></table></div><br />
+<h3><a name="xmlCleanupCharEncodingHandlers" id="xmlCleanupCharEncodingHandlers"></a>Function: xmlCleanupCharEncodingHandlers</h3><pre class="programlisting">void xmlCleanupCharEncodingHandlers (void)<br />
+</pre><p>Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases.</p>
+<h3><a name="xmlCleanupEncodingAliases" id="xmlCleanupEncodingAliases"></a>Function: xmlCleanupEncodingAliases</h3><pre class="programlisting">void xmlCleanupEncodingAliases (void)<br />
+</pre><p>Unregisters all aliases</p>
+<h3><a name="xmlDelEncodingAlias" id="xmlDelEncodingAlias"></a>Function: xmlDelEncodingAlias</h3><pre class="programlisting">int xmlDelEncodingAlias (const char * alias)<br />
+</pre><p>Unregisters an encoding alias @alias</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlDetectCharEncoding" id="xmlDetectCharEncoding"></a>Function: xmlDetectCharEncoding</h3><pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> xmlDetectCharEncoding (const unsigned char * in, <br /> int len)<br />
+</pre><p>Guess the encoding of the entity using the first bytes of the entity content according to the non-normative appendix F of the XML-1.0 recommendation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant).</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of the XML_CHAR_ENCODING_... values.</td></tr></tbody></table></div><h3><a name="xmlFindCharEncodingHandler" id="xmlFindCharEncodingHandler"></a>Function: xmlFindCharEncodingHandler</h3><pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlFindCharEncodingHandler (const char * name)<br />
+</pre><p>Search in the registered set the handler able to read/write that encoding.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>a string describing the char encoding.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the handler or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlGetCharEncodingHandler" id="xmlGetCharEncodingHandler"></a>Function: xmlGetCharEncodingHandler</h3><pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlGetCharEncodingHandler (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Search in the registered set the handler able to read/write that encoding.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> value.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the handler or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlGetCharEncodingName" id="xmlGetCharEncodingName"></a>Function: xmlGetCharEncodingName</h3><pre class="programlisting">const char * xmlGetCharEncodingName (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>The "canonical" name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the canonical name for the given encoding</td></tr></tbody></table></div><h3><a name="xmlGetEncodingAlias" id="xmlGetEncodingAlias"></a>Function: xmlGetEncodingAlias</h3><pre class="programlisting">const char * xmlGetEncodingAlias (const char * alias)<br />
+</pre><p>Lookup an encoding name for the given alias.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>alias</tt></i>:</span></td><td>the alias name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise the original name</td></tr></tbody></table></div><h3><a name="xmlInitCharEncodingHandlers" id="xmlInitCharEncodingHandlers"></a>Function: xmlInitCharEncodingHandlers</h3><pre class="programlisting">void xmlInitCharEncodingHandlers (void)<br />
+</pre><p>Initialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn't need to be called in normal processing.</p>
+<h3><a name="xmlNewCharEncodingHandler" id="xmlNewCharEncodingHandler"></a>Function: xmlNewCharEncodingHandler</h3><pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> xmlNewCharEncodingHandler (const char * name, <br /> <a href="libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> output)<br />
+</pre><p>Create and registers an xmlCharEncodingHandler.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the <a href="libxml-encoding.html#xmlCharEncodingInputFunc">xmlCharEncodingInputFunc</a> to read that encoding</td></tr><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> to write that encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> created (or NULL in case of error).</td></tr></tbody></table></div><h3><a name="xmlParseCharEncoding" id="xmlParseCharEncoding"></a>Function: xmlParseCharEncoding</h3><pre class="programlisting"><a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> xmlParseCharEncoding (const char * name)<br />
+</pre><p>Compare the string to the encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the encoding name as parsed, in UTF-8 format (ASCII actually)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>one of the XML_CHAR_ENCODING_... values or <a href="libxml-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a> if not recognized.</td></tr></tbody></table></div><h3><a name="xmlRegisterCharEncodingHandler" id="xmlRegisterCharEncodingHandler"></a>Function: xmlRegisterCharEncodingHandler</h3><pre class="programlisting">void xmlRegisterCharEncodingHandler (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br />
+</pre><p>Register the char encoding handler, surprising, isn't it ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler block</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-entities.html b/doc/html/libxml-entities.html
new file mode 100644
index 0000000..b7d1455
--- /dev/null
+++ b/doc/html/libxml-entities.html
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module entities from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module entities from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-encoding.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-encoding.html">encoding</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-globals.html">globals</a></th><td><a accesskey="n" href="libxml-globals.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module provides some of the entity API needed for the parser and applications. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlEntitiesTable">xmlEntitiesTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-entities.html#xmlEntitiesTable">xmlEntitiesTable</a> * <a name="xmlEntitiesTablePtr" id="xmlEntitiesTablePtr">xmlEntitiesTablePtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlEntityType">xmlEntityType</a>
+</pre><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlAddDocEntity">xmlAddDocEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlAddDtdEntity">xmlAddDtdEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">void <a href="#xmlCleanupPredefinedEntities">xmlCleanupPredefinedEntities</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="#xmlCopyEntitiesTable">xmlCopyEntitiesTable</a> (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)</pre>
+<pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> <a href="#xmlCreateEntitiesTable">xmlCreateEntitiesTable</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlDumpEntitiesTable">xmlDumpEntitiesTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlDumpEntityDecl">xmlDumpEntityDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeEntities">xmlEncodeEntities</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)</pre>
+<pre class="programlisting">void <a href="#xmlFreeEntitiesTable">xmlFreeEntitiesTable</a> (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetDocEntity">xmlGetDocEntity</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetDtdEntity">xmlGetDtdEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetParameterEntity">xmlGetParameterEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlGetPredefinedEntity">xmlGetPredefinedEntity</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlInitializePredefinedEntities">xmlInitializePredefinedEntities</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlNewEntity">xmlNewEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<h2>Description</h2>
+<h3><a name="xmlEntitiesTable" id="xmlEntitiesTable">Structure xmlEntitiesTable</a></h3><pre class="programlisting">Structure xmlEntitiesTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlEntityType" id="xmlEntityType">xmlEntityType</a></h3><pre class="programlisting">Enum xmlEntityType {
+ <a name="XML_INTERNAL_GENERAL_ENTITY" id="XML_INTERNAL_GENERAL_ENTITY">XML_INTERNAL_GENERAL_ENTITY</a> = 1
+ <a name="XML_EXTERNAL_GENERAL_PARSED_ENTITY" id="XML_EXTERNAL_GENERAL_PARSED_ENTITY">XML_EXTERNAL_GENERAL_PARSED_ENTITY</a> = 2
+ <a name="XML_EXTERNAL_GENERAL_UNPARSED_ENTITY" id="XML_EXTERNAL_GENERAL_UNPARSED_ENTITY">XML_EXTERNAL_GENERAL_UNPARSED_ENTITY</a> = 3
+ <a name="XML_INTERNAL_PARAMETER_ENTITY" id="XML_INTERNAL_PARAMETER_ENTITY">XML_INTERNAL_PARAMETER_ENTITY</a> = 4
+ <a name="XML_EXTERNAL_PARAMETER_ENTITY" id="XML_EXTERNAL_PARAMETER_ENTITY">XML_EXTERNAL_PARAMETER_ENTITY</a> = 5
+ <a name="XML_INTERNAL_PREDEFINED_ENTITY" id="XML_INTERNAL_PREDEFINED_ENTITY">XML_INTERNAL_PREDEFINED_ENTITY</a> = 6
+}
+</pre><h3><a name="xmlAddDocEntity" id="xmlAddDocEntity"></a>Function: xmlAddDocEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDocEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Register a new entity for this document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAddDtdEntity" id="xmlAddDtdEntity"></a>Function: xmlAddDtdEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlAddDtdEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Register a new entity for this document DTD external subset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlCleanupPredefinedEntities" id="xmlCleanupPredefinedEntities"></a>Function: xmlCleanupPredefinedEntities</h3><pre class="programlisting">void xmlCleanupPredefinedEntities (void)<br />
+</pre><p>Cleanup up the predefined entities table. Deprecated call</p>
+<h3><a name="xmlCopyEntitiesTable" id="xmlCopyEntitiesTable"></a>Function: xmlCopyEntitiesTable</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCopyEntitiesTable (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br />
+</pre><p>Build a copy of an entity table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCreateEntitiesTable" id="xmlCreateEntitiesTable"></a>Function: xmlCreateEntitiesTable</h3><pre class="programlisting"><a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> xmlCreateEntitiesTable (void)<br />
+</pre><p>create and initialize an empty entities hash table. This really doesn't make sense and should be deprecated</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> just created or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDumpEntitiesTable" id="xmlDumpEntitiesTable"></a>Function: xmlDumpEntitiesTable</h3><pre class="programlisting">void xmlDumpEntitiesTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br />
+</pre><p>This will dump the content of the entity table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>An XML buffer.</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div><h3><a name="xmlDumpEntityDecl" id="xmlDumpEntityDecl"></a>Function: xmlDumpEntityDecl</h3><pre class="programlisting">void xmlDumpEntityDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent)<br />
+</pre><p>This will dump the content of the entity table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>An XML buffer.</td></tr><tr><td><span class="term"><i><tt>ent</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div><h3><a name="xmlEncodeEntities" id="xmlEncodeEntities"></a>Function: xmlEncodeEntities</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeEntities (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)<br />
+</pre><p>TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to <a href="libxml-entities.html#xmlEncodeEntitiesReentrant">xmlEncodeEntitiesReentrant</a> ! This routine will issue a warning when encountered.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL</td></tr></tbody></table></div><h3><a name="xmlEncodeEntitiesReentrant" id="xmlEncodeEntitiesReentrant"></a>Function: xmlEncodeEntitiesReentrant</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeEntitiesReentrant (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)<br />
+</pre><p>Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done.</td></tr></tbody></table></div><h3><a name="xmlEncodeSpecialChars" id="xmlEncodeSpecialChars"></a>Function: xmlEncodeSpecialChars</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlEncodeSpecialChars (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * input)<br />
+</pre><p>Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the string</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>A string to convert to XML.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done.</td></tr></tbody></table></div><h3><a name="xmlFreeEntitiesTable" id="xmlFreeEntitiesTable"></a>Function: xmlFreeEntitiesTable</h3><pre class="programlisting">void xmlFreeEntitiesTable (<a href="libxml-entities.html#xmlEntitiesTablePtr">xmlEntitiesTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An entity table</td></tr></tbody></table></div><h3><a name="xmlGetDocEntity" id="xmlGetDocEntity"></a>Function: xmlGetDocEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDocEntity (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Do an entity lookup in the document entity hash table and</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding entity, otherwise a lookup is done in the predefined entities too. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlGetDtdEntity" id="xmlGetDtdEntity"></a>Function: xmlGetDtdEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetDtdEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Do an entity lookup in the DTD entity hash table and</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlGetParameterEntity" id="xmlGetParameterEntity"></a>Function: xmlGetParameterEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetParameterEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Do an entity lookup in the internal and external subsets and</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document referencing the entity</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the corresponding parameter entity, if found. Returns A pointer to the entity structure or NULL if not found.</td></tr></tbody></table></div><h3><a name="xmlGetPredefinedEntity" id="xmlGetPredefinedEntity"></a>Function: xmlGetPredefinedEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlGetPredefinedEntity (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Check whether this name is an predefined entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div><h3><a name="xmlInitializePredefinedEntities" id="xmlInitializePredefinedEntities"></a>Function: xmlInitializePredefinedEntities</h3><pre class="programlisting">void xmlInitializePredefinedEntities (void)<br />
+</pre><p>Set up the predefined entities. Deprecated call</p>
+<h3><a name="xmlNewEntity" id="xmlNewEntity"></a>Function: xmlNewEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlNewEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type XML_xxx_yyy_ENTITY</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the entity external ID if available</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the entity system ID if available</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the entity or NULL in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-globals.html b/doc/html/libxml-globals.html
new file mode 100644
index 0000000..04986ef
--- /dev/null
+++ b/doc/html/libxml-globals.html
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module globals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module globals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-entities.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-entities.html">entities</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-hash.html">hash</a></th><td><a accesskey="n" href="libxml-hash.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlGlobalState">xmlGlobalState</a><br />struct _xmlGlobalState
+</pre><pre class="programlisting">Typedef <a href="libxml-globals.html#xmlGlobalState">xmlGlobalState</a> * <a name="xmlGlobalStatePtr" id="xmlGlobalStatePtr">xmlGlobalStatePtr</a>
+</pre><pre class="programlisting">void <a href="#xmlCleanupGlobals">xmlCleanupGlobals</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a> (<a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)</pre>
+<pre class="programlisting">Function type: <a href="#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a>
+void <a href="#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre>
+<pre class="programlisting">void <a href="#xmlInitGlobals">xmlInitGlobals</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlInitializeGlobalState">xmlInitializeGlobalState</a> (<a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> gs)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> <a href="#xmlOutputBufferCreateFilenameDefault">xmlOutputBufferCreateFilenameDefault</a> (<a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)</pre>
+<pre class="programlisting">Function type: <a href="#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a>
+<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br /> int compression)
+</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> <a href="#xmlParserInputBufferCreateFilenameDefault">xmlParserInputBufferCreateFilenameDefault</a> (<a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)</pre>
+<pre class="programlisting">Function type: <a href="#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a>
+<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)
+</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a> (<a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)</pre>
+<pre class="programlisting">Function type: <a href="#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a>
+void <a href="#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a> (<a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefDefaultBufferSize">xmlThrDefDefaultBufferSize</a> (int v)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a> (<a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefDoValidityCheckingDefaultValue">xmlThrDefDoValidityCheckingDefaultValue</a> (int v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefGetWarningsDefaultValue">xmlThrDefGetWarningsDefaultValue</a> (int v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefIndentTreeOutput">xmlThrDefIndentTreeOutput</a> (int v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefKeepBlanksDefaultValue">xmlThrDefKeepBlanksDefaultValue</a> (int v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefLineNumbersDefaultValue">xmlThrDefLineNumbersDefaultValue</a> (int v)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefLoadExtDtdDefaultValue">xmlThrDefLoadExtDtdDefaultValue</a> (int v)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> <a href="#xmlThrDefOutputBufferCreateFilenameDefault">xmlThrDefOutputBufferCreateFilenameDefault</a> (<a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefParserDebugEntities">xmlThrDefParserDebugEntities</a> (int v)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> <a href="#xmlThrDefParserInputBufferCreateFilenameDefault">xmlThrDefParserInputBufferCreateFilenameDefault</a> (<a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefPedanticParserDefaultValue">xmlThrDefPedanticParserDefaultValue</a> (int v)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a> (<a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefSaveNoEmptyTags">xmlThrDefSaveNoEmptyTags</a> (int v)</pre>
+<pre class="programlisting">void <a href="#xmlThrDefSetGenericErrorFunc">xmlThrDefSetGenericErrorFunc</a> (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)</pre>
+<pre class="programlisting">void <a href="#xmlThrDefSetStructuredErrorFunc">xmlThrDefSetStructuredErrorFunc</a> (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)</pre>
+<pre class="programlisting">int <a href="#xmlThrDefSubstituteEntitiesDefaultValue">xmlThrDefSubstituteEntitiesDefaultValue</a> (int v)</pre>
+<pre class="programlisting">const char * <a href="#xmlThrDefTreeIndentString">xmlThrDefTreeIndentString</a> (const char * v)</pre>
+<h2>Description</h2>
+<h3><a name="xmlGlobalState" id="xmlGlobalState">Structure xmlGlobalState</a></h3><pre class="programlisting">Structure xmlGlobalState<br />struct _xmlGlobalState {
+ const char * xmlParserVersion
+ <a href="libxml-tree.html#xmlSAXLocator">xmlSAXLocator</a> xmlDefaultSAXLocator
+ <a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> xmlDefaultSAXHandler
+ <a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> docbDefaultSAXHandler
+ <a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> htmlDefaultSAXHandler
+ <a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> xmlFree
+ <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMalloc
+ <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> xmlMemStrdup
+ <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> xmlRealloc
+ <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> xmlGenericError
+ <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> xmlStructuredError
+ void * xmlGenericErrorContext
+ int oldXMLWDcompatibility
+ <a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlBufferAllocScheme
+ int xmlDefaultBufferSize
+ int xmlSubstituteEntitiesDefaultValue
+ int xmlDoValidityCheckingDefaultValue
+ int xmlGetWarningsDefaultValue
+ int xmlKeepBlanksDefaultValue
+ int xmlLineNumbersDefaultValue
+ int xmlLoadExtDtdDefaultValue
+ int xmlParserDebugEntities
+ int xmlPedanticParserDefaultValue
+ int xmlSaveNoEmptyTags
+ int xmlIndentTreeOutput
+ const char * xmlTreeIndentString
+ <a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefaultValue
+ <a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefaultValue
+ <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> xmlMallocAtomic
+ <a href="libxml-xmlerror.html#xmlError">xmlError</a> xmlLastError
+ <a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlParserInputBufferCreateFilenameValue
+ <a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlOutputBufferCreateFilenameValue
+ void * xmlStructuredErrorContext
+}</pre><h3><a name="xmlCleanupGlobals" id="xmlCleanupGlobals"></a>Function: xmlCleanupGlobals</h3><pre class="programlisting">void xmlCleanupGlobals (void)<br />
+</pre><p>Additional cleanup for multi-threading</p>
+<h3><a name="xmlDeregisterNodeDefault" id="xmlDeregisterNodeDefault"></a>Function: xmlDeregisterNodeDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefault (<a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br />
+</pre><p>Registers a callback for node destruction</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new DeregisterNodeFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous value of the deregistration function</td></tr></tbody></table></div><h3><a name="xmlDeregisterNodeFunc" id="xmlDeregisterNodeFunc"></a>Function type: xmlDeregisterNodeFunc</h3><pre class="programlisting">Function type: xmlDeregisterNodeFunc
+void xmlDeregisterNodeFunc (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre><p>Signature for the deregistration callback of a discarded node</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div><br />
+<h3><a name="xmlInitGlobals" id="xmlInitGlobals"></a>Function: xmlInitGlobals</h3><pre class="programlisting">void xmlInitGlobals (void)<br />
+</pre><p>Additional initialisation for multi-threading</p>
+<h3><a name="xmlInitializeGlobalState" id="xmlInitializeGlobalState"></a>Function: xmlInitializeGlobalState</h3><pre class="programlisting">void xmlInitializeGlobalState (<a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> gs)<br />
+</pre><p>xmlInitializeGlobalState() initialize a global state with all the default values of the library.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>gs</tt></i>:</span></td><td>a pointer to a newly allocated global state</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFilenameDefault" id="xmlOutputBufferCreateFilenameDefault"></a>Function: xmlOutputBufferCreateFilenameDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlOutputBufferCreateFilenameDefault (<a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)<br />
+</pre><p>Registers a callback for URI output file handling</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new OutputBufferCreateFilenameFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFilenameFunc" id="xmlOutputBufferCreateFilenameFunc"></a>Function type: xmlOutputBufferCreateFilenameFunc</h3><pre class="programlisting">Function type: xmlOutputBufferCreateFilenameFunc
+<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilenameFunc (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br /> int compression)
+</pre><p>Signature for the function doing the lookup for a suitable output method corresponding to an URI.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI to write to</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> in case of success or NULL if no method was found.</td></tr></tbody></table></div><br />
+<h3><a name="xmlParserInputBufferCreateFilenameDefault" id="xmlParserInputBufferCreateFilenameDefault"></a>Function: xmlParserInputBufferCreateFilenameDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlParserInputBufferCreateFilenameDefault (<a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)<br />
+</pre><p>Registers a callback for URI input file handling</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new ParserInputBufferCreateFilenameFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateFilenameFunc" id="xmlParserInputBufferCreateFilenameFunc"></a>Function type: xmlParserInputBufferCreateFilenameFunc</h3><pre class="programlisting">Function type: xmlParserInputBufferCreateFilenameFunc
+<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilenameFunc (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)
+</pre><p>Signature for the function doing the lookup for a suitable input method corresponding to an URI.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI to read from</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the requested source encoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in case of success or NULL if no method was found.</td></tr></tbody></table></div><br />
+<h3><a name="xmlRegisterNodeDefault" id="xmlRegisterNodeDefault"></a>Function: xmlRegisterNodeDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefault (<a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br />
+</pre><p>Registers a callback for node creation</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>function pointer to the new RegisterNodeFunc</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old value of the registration function</td></tr></tbody></table></div><h3><a name="xmlRegisterNodeFunc" id="xmlRegisterNodeFunc"></a>Function type: xmlRegisterNodeFunc</h3><pre class="programlisting">Function type: xmlRegisterNodeFunc
+void xmlRegisterNodeFunc (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre><p>Signature for the registration callback of a created node</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div><br />
+<h3><a name="xmlThrDefBufferAllocScheme" id="xmlThrDefBufferAllocScheme"></a>Function: xmlThrDefBufferAllocScheme</h3><pre class="programlisting"><a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlThrDefBufferAllocScheme (<a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefDefaultBufferSize" id="xmlThrDefDefaultBufferSize"></a>Function: xmlThrDefDefaultBufferSize</h3><pre class="programlisting">int xmlThrDefDefaultBufferSize (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefDeregisterNodeDefault" id="xmlThrDefDeregisterNodeDefault"></a>Function: xmlThrDefDeregisterNodeDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlThrDefDeregisterNodeDefault (<a href="libxml-globals.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefDoValidityCheckingDefaultValue" id="xmlThrDefDoValidityCheckingDefaultValue"></a>Function: xmlThrDefDoValidityCheckingDefaultValue</h3><pre class="programlisting">int xmlThrDefDoValidityCheckingDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefGetWarningsDefaultValue" id="xmlThrDefGetWarningsDefaultValue"></a>Function: xmlThrDefGetWarningsDefaultValue</h3><pre class="programlisting">int xmlThrDefGetWarningsDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefIndentTreeOutput" id="xmlThrDefIndentTreeOutput"></a>Function: xmlThrDefIndentTreeOutput</h3><pre class="programlisting">int xmlThrDefIndentTreeOutput (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefKeepBlanksDefaultValue" id="xmlThrDefKeepBlanksDefaultValue"></a>Function: xmlThrDefKeepBlanksDefaultValue</h3><pre class="programlisting">int xmlThrDefKeepBlanksDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefLineNumbersDefaultValue" id="xmlThrDefLineNumbersDefaultValue"></a>Function: xmlThrDefLineNumbersDefaultValue</h3><pre class="programlisting">int xmlThrDefLineNumbersDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefLoadExtDtdDefaultValue" id="xmlThrDefLoadExtDtdDefaultValue"></a>Function: xmlThrDefLoadExtDtdDefaultValue</h3><pre class="programlisting">int xmlThrDefLoadExtDtdDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefOutputBufferCreateFilenameDefault" id="xmlThrDefOutputBufferCreateFilenameDefault"></a>Function: xmlThrDefOutputBufferCreateFilenameDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> xmlThrDefOutputBufferCreateFilenameDefault (<a href="libxml-globals.html#xmlOutputBufferCreateFilenameFunc">xmlOutputBufferCreateFilenameFunc</a> func)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefParserDebugEntities" id="xmlThrDefParserDebugEntities"></a>Function: xmlThrDefParserDebugEntities</h3><pre class="programlisting">int xmlThrDefParserDebugEntities (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefParserInputBufferCreateFilenameDefault" id="xmlThrDefParserInputBufferCreateFilenameDefault"></a>Function: xmlThrDefParserInputBufferCreateFilenameDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> xmlThrDefParserInputBufferCreateFilenameDefault (<a href="libxml-globals.html#xmlParserInputBufferCreateFilenameFunc">xmlParserInputBufferCreateFilenameFunc</a> func)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefPedanticParserDefaultValue" id="xmlThrDefPedanticParserDefaultValue"></a>Function: xmlThrDefPedanticParserDefaultValue</h3><pre class="programlisting">int xmlThrDefPedanticParserDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefRegisterNodeDefault" id="xmlThrDefRegisterNodeDefault"></a>Function: xmlThrDefRegisterNodeDefault</h3><pre class="programlisting"><a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlThrDefRegisterNodeDefault (<a href="libxml-globals.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefSaveNoEmptyTags" id="xmlThrDefSaveNoEmptyTags"></a>Function: xmlThrDefSaveNoEmptyTags</h3><pre class="programlisting">int xmlThrDefSaveNoEmptyTags (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefSetGenericErrorFunc" id="xmlThrDefSetGenericErrorFunc"></a>Function: xmlThrDefSetGenericErrorFunc</h3><pre class="programlisting">void xmlThrDefSetGenericErrorFunc (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefSetStructuredErrorFunc" id="xmlThrDefSetStructuredErrorFunc"></a>Function: xmlThrDefSetStructuredErrorFunc</h3><pre class="programlisting">void xmlThrDefSetStructuredErrorFunc (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefSubstituteEntitiesDefaultValue" id="xmlThrDefSubstituteEntitiesDefaultValue"></a>Function: xmlThrDefSubstituteEntitiesDefaultValue</h3><pre class="programlisting">int xmlThrDefSubstituteEntitiesDefaultValue (int v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlThrDefTreeIndentString" id="xmlThrDefTreeIndentString"></a>Function: xmlThrDefTreeIndentString</h3><pre class="programlisting">const char * xmlThrDefTreeIndentString (const char * v)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>v</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-hash.html b/doc/html/libxml-hash.html
new file mode 100644
index 0000000..922e3f1
--- /dev/null
+++ b/doc/html/libxml-hash.html
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module hash from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module hash from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-globals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-globals.html">globals</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-list.html">list</a></th><td><a accesskey="n" href="libxml-list.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>This module implements the hash table support used in various places in the library. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_CAST_FPTR">XML_CAST_FPTR</a></pre><pre class="programlisting">Structure <a href="#xmlHashTable">xmlHashTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-hash.html#xmlHashTable">xmlHashTable</a> * <a name="xmlHashTablePtr" id="xmlHashTablePtr">xmlHashTablePtr</a>
+</pre><pre class="programlisting">int <a href="#xmlHashAddEntry">xmlHashAddEntry</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> void * userdata)</pre>
+<pre class="programlisting">int <a href="#xmlHashAddEntry2">xmlHashAddEntry2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> void * userdata)</pre>
+<pre class="programlisting">int <a href="#xmlHashAddEntry3">xmlHashAddEntry3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> void * userdata)</pre>
+<pre class="programlisting">Function type: <a href="#xmlHashCopier">xmlHashCopier</a>
+void * <a href="#xmlHashCopier">xmlHashCopier</a> (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCopy">xmlHashCopy</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashCopier">xmlHashCopier</a> f)</pre>
+<pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreate">xmlHashCreate</a> (int size)</pre>
+<pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> <a href="#xmlHashCreateDict">xmlHashCreateDict</a> (int size, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting">Function type: <a href="#xmlHashDeallocator">xmlHashDeallocator</a>
+void <a href="#xmlHashDeallocator">xmlHashDeallocator</a> (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">void <a href="#xmlHashFree">xmlHashFree</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">void * <a href="#xmlHashLookup">xmlHashLookup</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void * <a href="#xmlHashLookup2">xmlHashLookup2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2)</pre>
+<pre class="programlisting">void * <a href="#xmlHashLookup3">xmlHashLookup3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)</pre>
+<pre class="programlisting">void * <a href="#xmlHashQLookup">xmlHashQLookup</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void * <a href="#xmlHashQLookup2">xmlHashQLookup2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2)</pre>
+<pre class="programlisting">void * <a href="#xmlHashQLookup3">xmlHashQLookup3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix3, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)</pre>
+<pre class="programlisting">int <a href="#xmlHashRemoveEntry">xmlHashRemoveEntry</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlHashRemoveEntry2">xmlHashRemoveEntry2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlHashRemoveEntry3">xmlHashRemoveEntry3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">void <a href="#xmlHashScan">xmlHashScan</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlHashScan3">xmlHashScan3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlHashScanFull">xmlHashScanFull</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlHashScanFull3">xmlHashScanFull3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br /> void * data)</pre>
+<pre class="programlisting">Function type: <a href="#xmlHashScanner">xmlHashScanner</a>
+void <a href="#xmlHashScanner">xmlHashScanner</a> (void * payload, <br /> void * data, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlHashScannerFull">xmlHashScannerFull</a>
+void <a href="#xmlHashScannerFull">xmlHashScannerFull</a> (void * payload, <br /> void * data, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)
+</pre>
+<pre class="programlisting">int <a href="#xmlHashSize">xmlHashSize</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table)</pre>
+<pre class="programlisting">int <a href="#xmlHashUpdateEntry">xmlHashUpdateEntry</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlHashUpdateEntry2">xmlHashUpdateEntry2</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlHashUpdateEntry3">xmlHashUpdateEntry3</a> (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)</pre>
+<h2>Description</h2>
+<h3><a name="XML_CAST_FPTR" id="XML_CAST_FPTR"></a>Macro: XML_CAST_FPTR</h3><pre>#define XML_CAST_FPTR</pre><p>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&amp;fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now</p>
+<h3><a name="xmlHashTable" id="xmlHashTable">Structure xmlHashTable</a></h3><pre class="programlisting">Structure xmlHashTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlHashAddEntry" id="xmlHashAddEntry"></a>Function: xmlHashAddEntry</h3><pre class="programlisting">int xmlHashAddEntry (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> void * userdata)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashAddEntry2" id="xmlHashAddEntry2"></a>Function: xmlHashAddEntry2</h3><pre class="programlisting">int xmlHashAddEntry2 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> void * userdata)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashAddEntry3" id="xmlHashAddEntry3"></a>Function: xmlHashAddEntry3</h3><pre class="programlisting">int xmlHashAddEntry3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> void * userdata)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashCopier" id="xmlHashCopier"></a>Function type: xmlHashCopier</h3><pre class="programlisting">Function type: xmlHashCopier
+void * xmlHashCopier (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Callback to copy data from a hash.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the data or NULL in case of error.</td></tr></tbody></table></div><br />
+<h3><a name="xmlHashCopy" id="xmlHashCopy"></a>Function: xmlHashCopy</h3><pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCopy (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashCopier">xmlHashCopier</a> f)<br />
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the copier function for items in the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new table or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashCreate" id="xmlHashCreate"></a>Function: xmlHashCreate</h3><pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreate (int size)<br />
+</pre><p>Create a new xmlHashTablePtr.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlHashCreateDict" id="xmlHashCreateDict"></a>Function: xmlHashCreateDict</h3><pre class="programlisting"><a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> xmlHashCreateDict (int size, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Create a new <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> which will use @dict as the internal dictionary</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the hash table</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>a dictionary to use for the hash</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object, or NULL if an error occured.</td></tr></tbody></table></div><h3><a name="xmlHashDeallocator" id="xmlHashDeallocator"></a>Function type: xmlHashDeallocator</h3><pre class="programlisting">Function type: xmlHashDeallocator
+void xmlHashDeallocator (void * payload, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Callback to free data from a hash.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr></tbody></table></div><br />
+<h3><a name="xmlHashFree" id="xmlHashFree"></a>Function: xmlHashFree</h3><pre class="programlisting">void xmlHashFree (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Free the hash @table and its contents. The userdata is deallocated with @f if provided.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for items in the hash</td></tr></tbody></table></div><h3><a name="xmlHashLookup" id="xmlHashLookup"></a>Function: xmlHashLookup</h3><pre class="programlisting">void * xmlHashLookup (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Find the userdata specified by the @name.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashLookup2" id="xmlHashLookup2"></a>Function: xmlHashLookup2</h3><pre class="programlisting">void * xmlHashLookup2 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2)<br />
+</pre><p>Find the userdata specified by the (@name, @name2) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashLookup3" id="xmlHashLookup3"></a>Function: xmlHashLookup3</h3><pre class="programlisting">void * xmlHashLookup3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)<br />
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashQLookup" id="xmlHashQLookup"></a>Function: xmlHashQLookup</h3><pre class="programlisting">void * xmlHashQLookup (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Find the userdata specified by the QName @prefix:@name/@name.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashQLookup2" id="xmlHashQLookup2"></a>Function: xmlHashQLookup2</h3><pre class="programlisting">void * xmlHashQLookup2 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2)<br />
+</pre><p>Find the userdata specified by the QNames tuple</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix2</tt></i>:</span></td><td>the second prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashQLookup3" id="xmlHashQLookup3"></a>Function: xmlHashQLookup3</h3><pre class="programlisting">void * xmlHashQLookup3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix3, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)<br />
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix2</tt></i>:</span></td><td>the second prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>prefix3</tt></i>:</span></td><td>the third prefix of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a pointer to the userdata</td></tr></tbody></table></div><h3><a name="xmlHashRemoveEntry" id="xmlHashRemoveEntry"></a>Function: xmlHashRemoveEntry</h3><pre class="programlisting">int xmlHashRemoveEntry (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div><h3><a name="xmlHashRemoveEntry2" id="xmlHashRemoveEntry2"></a>Function: xmlHashRemoveEntry2</h3><pre class="programlisting">int xmlHashRemoveEntry2 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div><h3><a name="xmlHashRemoveEntry3" id="xmlHashRemoveEntry3"></a>Function: xmlHashRemoveEntry3</h3><pre class="programlisting">int xmlHashRemoveEntry3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for removed item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the removal succeeded and -1 in case of error or not found.</td></tr></tbody></table></div><h3><a name="xmlHashScan" id="xmlHashScan"></a>Function: xmlHashScan</h3><pre class="programlisting">void xmlHashScan (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br /> void * data)<br />
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div><h3><a name="xmlHashScan3" id="xmlHashScan3"></a>Function: xmlHashScan3</h3><pre class="programlisting">void xmlHashScan3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashScanner">xmlHashScanner</a> f, <br /> void * data)<br />
+</pre><p>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div><h3><a name="xmlHashScanFull" id="xmlHashScanFull"></a>Function: xmlHashScanFull</h3><pre class="programlisting">void xmlHashScanFull (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> <a href="libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br /> void * data)<br />
+</pre><p>Scan the hash @table and applied @f to each value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div><h3><a name="xmlHashScanFull3" id="xmlHashScanFull3"></a>Function: xmlHashScanFull3</h3><pre class="programlisting">void xmlHashScanFull3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> <a href="libxml-hash.html#xmlHashScannerFull">xmlHashScannerFull</a> f, <br /> void * data)<br />
+</pre><p>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata or NULL</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the scanner function for items in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra data passed to f</td></tr></tbody></table></div><h3><a name="xmlHashScanner" id="xmlHashScanner"></a>Function type: xmlHashScanner</h3><pre class="programlisting">Function type: xmlHashScanner
+void xmlHashScanner (void * payload, <br /> void * data, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Callback when scanning data in a hash with the simple scanner.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra scannner data</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr></tbody></table></div><br />
+<h3><a name="xmlHashScannerFull" id="xmlHashScannerFull"></a>Function type: xmlHashScannerFull</h3><pre class="programlisting">Function type: xmlHashScannerFull
+void xmlHashScannerFull (void * payload, <br /> void * data, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3)
+</pre><p>Callback when scanning data in a hash with the full scanner.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>payload</tt></i>:</span></td><td>the data in the hash</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>extra scannner data</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name associated</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>the second name associated</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>the third name associated</td></tr></tbody></table></div><br />
+<h3><a name="xmlHashSize" id="xmlHashSize"></a>Function: xmlHashSize</h3><pre class="programlisting">int xmlHashSize (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table)<br />
+</pre><p>Query the number of elements installed in the hash @table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the hash table or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlHashUpdateEntry" id="xmlHashUpdateEntry"></a>Function: xmlHashUpdateEntry</h3><pre class="programlisting">int xmlHashUpdateEntry (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashUpdateEntry2" id="xmlHashUpdateEntry2"></a>Function: xmlHashUpdateEntry2</h3><pre class="programlisting">int xmlHashUpdateEntry2 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlHashUpdateEntry3" id="xmlHashUpdateEntry3"></a>Function: xmlHashUpdateEntry3</h3><pre class="programlisting">int xmlHashUpdateEntry3 (<a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> table, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name2, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name3, <br /> void * userdata, <br /> <a href="libxml-hash.html#xmlHashDeallocator">xmlHashDeallocator</a> f)<br />
+</pre><p>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>the hash table</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the userdata</td></tr><tr><td><span class="term"><i><tt>name2</tt></i>:</span></td><td>a second name of the userdata</td></tr><tr><td><span class="term"><i><tt>name3</tt></i>:</span></td><td>a third name of the userdata</td></tr><tr><td><span class="term"><i><tt>userdata</tt></i>:</span></td><td>a pointer to the userdata</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the deallocator function for replaced item (if any)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 the addition succeeded and -1 in case of error.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-lib.html b/doc/html/libxml-lib.html
new file mode 100644
index 0000000..1a58210
--- /dev/null
+++ b/doc/html/libxml-lib.html
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Reference Manual for libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libxml-DOCBparser.html">DOCBparser</a>: old DocBook SGML parser</li><li><a href="libxml-HTMLparser.html">HTMLparser</a>: interface for an HTML 4.0 non-verifying parser</li><li><a href="libxml-HTMLtree.html">HTMLtree</a>: specific APIs to process HTML tree, especially serialization</li><li><a href="libxml-SAX.html">SAX</a>: Old SAX version 1 handler, deprecated</li><li><a href="libxml-SAX2.html">SAX2</a>: SAX2 parser interface used to build the DOM tree</li><li><a href="libxml-c14n.html">c14n</a>: Provide Canonical XML and Exclusive XML Canonicalization</li><li><a href="libxml-catalog.html">catalog</a>: interfaces to the Catalog handling system</li><li><a href="libxml-chvalid.html">chvalid</a>: Unicode character range checking</li><li><a href="libxml-debugXML.html">debugXML</a>: Tree debugging APIs</li><li><a href="libxml-dict.html">dict</a>: string dictionnary</li><li><a href="libxml-encoding.html">encoding</a>: interface for the encoding conversion functions</li><li><a href="libxml-entities.html">entities</a>: interface for the XML entities handling</li><li><a href="libxml-globals.html">globals</a>: interface for all global variables of the library</li><li><a href="libxml-hash.html">hash</a>: Chained hash tables</li><li><a href="libxml-list.html">list</a>: lists interfaces</li><li><a href="libxml-nanoftp.html">nanoftp</a>: minimal FTP implementation</li><li><a href="libxml-nanohttp.html">nanohttp</a>: minimal HTTP implementation</li><li><a href="libxml-parser.html">parser</a>: the core parser module</li><li><a href="libxml-parserInternals.html">parserInternals</a>: internals routines and limits exported by the parser.</li><li><a href="libxml-pattern.html">pattern</a>: pattern expression handling</li><li><a href="libxml-relaxng.html">relaxng</a>: implementation of the Relax-NG validation</li><li><a href="libxml-schemasInternals.html">schemasInternals</a>: internal interfaces for XML Schemas</li><li><a href="libxml-schematron.html">schematron</a>: XML Schemastron implementation</li><li><a href="libxml-threads.html">threads</a>: interfaces for thread handling</li><li><a href="libxml-tree.html">tree</a>: interfaces for tree manipulation</li><li><a href="libxml-uri.html">uri</a>: library of generic URI related routines</li><li><a href="libxml-valid.html">valid</a>: The DTD validation</li><li><a href="libxml-xinclude.html">xinclude</a>: implementation of XInclude</li><li><a href="libxml-xlink.html">xlink</a>: unfinished XLink detection module</li><li><a href="libxml-xmlIO.html">xmlIO</a>: interface for the I/O interfaces used by the parser</li><li><a href="libxml-xmlautomata.html">xmlautomata</a>: API to build regexp automata</li><li><a href="libxml-xmlerror.html">xmlerror</a>: error handling</li><li><a href="libxml-xmlexports.html">xmlexports</a>: macros for marking symbols as exportable/importable.</li><li><a href="libxml-xmlmemory.html">xmlmemory</a>: interface for the memory allocator</li><li><a href="libxml-xmlmodule.html">xmlmodule</a>: dynamic module loading</li><li><a href="libxml-xmlreader.html">xmlreader</a>: the XMLReader implementation</li><li><a href="libxml-xmlregexp.html">xmlregexp</a>: regular expressions handling</li><li><a href="libxml-xmlsave.html">xmlsave</a>: the XML document serializer</li><li><a href="libxml-xmlschemas.html">xmlschemas</a>: incomplete XML Schemas structure implementation</li><li><a href="libxml-xmlschemastypes.html">xmlschemastypes</a>: implementation of XML Schema Datatypes</li><li><a href="libxml-xmlstring.html">xmlstring</a>: set of routines to process strings</li><li><a href="libxml-xmlunicode.html">xmlunicode</a>: Unicode character APIs</li><li><a href="libxml-xmlversion.html">xmlversion</a>: compile-time version informations</li><li><a href="libxml-xmlwriter.html">xmlwriter</a>: text writing API for XML</li><li><a href="libxml-xpath.html">xpath</a>: XML Path Language implementation</li><li><a href="libxml-xpathInternals.html">xpathInternals</a>: internal interfaces for XML Path Language implementation</li><li><a href="libxml-xpointer.html">xpointer</a>: API to handle XML Pointers</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-list.html b/doc/html/libxml-list.html
new file mode 100644
index 0000000..33e60d1
--- /dev/null
+++ b/doc/html/libxml-list.html
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module list from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module list from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-hash.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-hash.html">hash</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-nanoftp.html">nanoftp</a></th><td><a accesskey="n" href="libxml-nanoftp.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module implement the list support used in various place in the library. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlLink">xmlLink</a><br />struct _xmlLink
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-list.html#xmlLink">xmlLink</a> * <a name="xmlLinkPtr" id="xmlLinkPtr">xmlLinkPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlList">xmlList</a><br />struct _xmlList
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-list.html#xmlList">xmlList</a> * <a name="xmlListPtr" id="xmlListPtr">xmlListPtr</a>
+</pre><pre class="programlisting">void * <a href="#xmlLinkGetData">xmlLinkGetData</a> (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)</pre>
+<pre class="programlisting">int <a href="#xmlListAppend">xmlListAppend</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlListClear">xmlListClear</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">int <a href="#xmlListCopy">xmlListCopy</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> cur, <br /> const <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> old)</pre>
+<pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlListCreate">xmlListCreate</a> (<a href="libxml-list.html#xmlListDeallocator">xmlListDeallocator</a> deallocator, <br /> <a href="libxml-list.html#xmlListDataCompare">xmlListDataCompare</a> compare)</pre>
+<pre class="programlisting">Function type: <a href="#xmlListDataCompare">xmlListDataCompare</a>
+int <a href="#xmlListDataCompare">xmlListDataCompare</a> (const void * data0, <br /> const void * data1)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlListDeallocator">xmlListDeallocator</a>
+void <a href="#xmlListDeallocator">xmlListDeallocator</a> (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)
+</pre>
+<pre class="programlisting">void <a href="#xmlListDelete">xmlListDelete</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlListDup">xmlListDup</a> (const <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> old)</pre>
+<pre class="programlisting">int <a href="#xmlListEmpty">xmlListEmpty</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> <a href="#xmlListEnd">xmlListEnd</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> <a href="#xmlListFront">xmlListFront</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">int <a href="#xmlListInsert">xmlListInsert</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlListMerge">xmlListMerge</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l1, <br /> <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l2)</pre>
+<pre class="programlisting">void <a href="#xmlListPopBack">xmlListPopBack</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">void <a href="#xmlListPopFront">xmlListPopFront</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">int <a href="#xmlListPushBack">xmlListPushBack</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlListPushFront">xmlListPushFront</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlListRemoveAll">xmlListRemoveAll</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlListRemoveFirst">xmlListRemoveFirst</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlListRemoveLast">xmlListRemoveLast</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlListReverse">xmlListReverse</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">void * <a href="#xmlListReverseSearch">xmlListReverseSearch</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlListReverseWalk">xmlListReverseWalk</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> <a href="libxml-list.html#xmlListWalker">xmlListWalker</a> walker, <br /> const void * user)</pre>
+<pre class="programlisting">void * <a href="#xmlListSearch">xmlListSearch</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlListSize">xmlListSize</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">void <a href="#xmlListSort">xmlListSort</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)</pre>
+<pre class="programlisting">void <a href="#xmlListWalk">xmlListWalk</a> (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> <a href="libxml-list.html#xmlListWalker">xmlListWalker</a> walker, <br /> const void * user)</pre>
+<pre class="programlisting">Function type: <a href="#xmlListWalker">xmlListWalker</a>
+int <a href="#xmlListWalker">xmlListWalker</a> (const void * data, <br /> const void * user)
+</pre>
+<h2>Description</h2>
+<h3><a name="xmlLink" id="xmlLink">Structure xmlLink</a></h3><pre class="programlisting">Structure xmlLink<br />struct _xmlLink {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlList" id="xmlList">Structure xmlList</a></h3><pre class="programlisting">Structure xmlList<br />struct _xmlList {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlLinkGetData" id="xmlLinkGetData"></a>Function: xmlLinkGetData</h3><pre class="programlisting">void * xmlLinkGetData (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)<br />
+</pre><p>See Returns.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>lk</tt></i>:</span></td><td>a link</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the data referenced from this link</td></tr></tbody></table></div><h3><a name="xmlListAppend" id="xmlListAppend"></a>Function: xmlListAppend</h3><pre class="programlisting">int xmlListAppend (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Insert data in the ordered list at the end for this value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, 1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlListClear" id="xmlListClear"></a>Function: xmlListClear</h3><pre class="programlisting">void xmlListClear (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Remove the all data in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListCopy" id="xmlListCopy"></a>Function: xmlListCopy</h3><pre class="programlisting">int xmlListCopy (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> cur, <br /> const <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> old)<br />
+</pre><p>Move all the element from the old list in the new list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the new list</td></tr><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the old list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success 1 in case of error</td></tr></tbody></table></div><h3><a name="xmlListCreate" id="xmlListCreate"></a>Function: xmlListCreate</h3><pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> xmlListCreate (<a href="libxml-list.html#xmlListDeallocator">xmlListDeallocator</a> deallocator, <br /> <a href="libxml-list.html#xmlListDataCompare">xmlListDataCompare</a> compare)<br />
+</pre><p>Create a new list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>deallocator</tt></i>:</span></td><td>an optional deallocator function</td></tr><tr><td><span class="term"><i><tt>compare</tt></i>:</span></td><td>an optional comparison function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new list or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListDataCompare" id="xmlListDataCompare"></a>Function type: xmlListDataCompare</h3><pre class="programlisting">Function type: xmlListDataCompare
+int xmlListDataCompare (const void * data0, <br /> const void * data1)
+</pre><p>Callback function used to compare 2 data.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>data0</tt></i>:</span></td><td>the first data</td></tr><tr><td><span class="term"><i><tt>data1</tt></i>:</span></td><td>the second data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 is equality, -1 or 1 otherwise depending on the ordering.</td></tr></tbody></table></div><br />
+<h3><a name="xmlListDeallocator" id="xmlListDeallocator"></a>Function type: xmlListDeallocator</h3><pre class="programlisting">Function type: xmlListDeallocator
+void xmlListDeallocator (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> lk)
+</pre><p>Callback function used to free data from a list.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>lk</tt></i>:</span></td><td>the data to deallocate</td></tr></tbody></table></div><br />
+<h3><a name="xmlListDelete" id="xmlListDelete"></a>Function: xmlListDelete</h3><pre class="programlisting">void xmlListDelete (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Deletes the list and its associated data</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListDup" id="xmlListDup"></a>Function: xmlListDup</h3><pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> xmlListDup (const <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> old)<br />
+</pre><p>Duplicate the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new copy of the list or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListEmpty" id="xmlListEmpty"></a>Function: xmlListEmpty</h3><pre class="programlisting">int xmlListEmpty (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Is the list empty ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the list is empty, 0 if not empty and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlListEnd" id="xmlListEnd"></a>Function: xmlListEnd</h3><pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListEnd (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Get the last element in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element in the list, or NULL</td></tr></tbody></table></div><h3><a name="xmlListFront" id="xmlListFront"></a>Function: xmlListFront</h3><pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListFront (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Get the first element in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first element in the list, or NULL</td></tr></tbody></table></div><h3><a name="xmlListInsert" id="xmlListInsert"></a>Function: xmlListInsert</h3><pre class="programlisting">int xmlListInsert (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Insert data in the ordered list at the beginning for this value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, 1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlListMerge" id="xmlListMerge"></a>Function: xmlListMerge</h3><pre class="programlisting">void xmlListMerge (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l1, <br /> <a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l2)<br />
+</pre><p>include all the elements of the second list in the first one and clear the second list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l1</tt></i>:</span></td><td>the original list</td></tr><tr><td><span class="term"><i><tt>l2</tt></i>:</span></td><td>the new list</td></tr></tbody></table></div><h3><a name="xmlListPopBack" id="xmlListPopBack"></a>Function: xmlListPopBack</h3><pre class="programlisting">void xmlListPopBack (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Removes the last element in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListPopFront" id="xmlListPopFront"></a>Function: xmlListPopFront</h3><pre class="programlisting">void xmlListPopFront (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Removes the first element in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListPushBack" id="xmlListPushBack"></a>Function: xmlListPushBack</h3><pre class="programlisting">int xmlListPushBack (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>add the new data at the end of the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>new data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if successful, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlListPushFront" id="xmlListPushFront"></a>Function: xmlListPushFront</h3><pre class="programlisting">int xmlListPushFront (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>add the new data at the beginning of the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>new data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if successful, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlListRemoveAll" id="xmlListRemoveAll"></a>Function: xmlListRemoveAll</h3><pre class="programlisting">int xmlListRemoveAll (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Remove the all instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of deallocation, or 0 if not found</td></tr></tbody></table></div><h3><a name="xmlListRemoveFirst" id="xmlListRemoveFirst"></a>Function: xmlListRemoveFirst</h3><pre class="programlisting">int xmlListRemoveFirst (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Remove the first instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if a deallocation occured, or 0 if not found</td></tr></tbody></table></div><h3><a name="xmlListRemoveLast" id="xmlListRemoveLast"></a>Function: xmlListRemoveLast</h3><pre class="programlisting">int xmlListRemoveLast (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Remove the last instance associated to data in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>list data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if a deallocation occured, or 0 if not found</td></tr></tbody></table></div><h3><a name="xmlListReverse" id="xmlListReverse"></a>Function: xmlListReverse</h3><pre class="programlisting">void xmlListReverse (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Reverse the order of the elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListReverseSearch" id="xmlListReverseSearch"></a>Function: xmlListReverseSearch</h3><pre class="programlisting">void * xmlListReverseSearch (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Search the list in reverse order for an existing value of @data</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>a search value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value associated to @data or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListReverseWalk" id="xmlListReverseWalk"></a>Function: xmlListReverseWalk</h3><pre class="programlisting">void xmlListReverseWalk (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> <a href="libxml-list.html#xmlListWalker">xmlListWalker</a> walker, <br /> const void * user)<br />
+</pre><p>Walk all the element of the list in reverse order and apply the walker function to it</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>walker</tt></i>:</span></td><td>a processing function</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>a user parameter passed to the walker function</td></tr></tbody></table></div><h3><a name="xmlListSearch" id="xmlListSearch"></a>Function: xmlListSearch</h3><pre class="programlisting">void * xmlListSearch (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> void * data)<br />
+</pre><p>Search the list for an existing value of @data</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>a search value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value associated to @data or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListSize" id="xmlListSize"></a>Function: xmlListSize</h3><pre class="programlisting">int xmlListSize (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Get the number of elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the list or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlListSort" id="xmlListSort"></a>Function: xmlListSort</h3><pre class="programlisting">void xmlListSort (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
+</pre><p>Sort all the elements in the list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListWalk" id="xmlListWalk"></a>Function: xmlListWalk</h3><pre class="programlisting">void xmlListWalk (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> <a href="libxml-list.html#xmlListWalker">xmlListWalker</a> walker, <br /> const void * user)<br />
+</pre><p>Walk all the element of the first from first to last and apply the walker function to it</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>walker</tt></i>:</span></td><td>a processing function</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>a user parameter passed to the walker function</td></tr></tbody></table></div><h3><a name="xmlListWalker" id="xmlListWalker"></a>Function type: xmlListWalker</h3><pre class="programlisting">Function type: xmlListWalker
+int xmlListWalker (const void * data, <br /> const void * user)
+</pre><p>Callback function used when walking a list with xmlListWalk().</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data found in the list</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>extra user provided data to the walker</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 to stop walking the list, 1 otherwise.</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-nanoftp.html b/doc/html/libxml-nanoftp.html
new file mode 100644
index 0000000..9f70ea6
--- /dev/null
+++ b/doc/html/libxml-nanoftp.html
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module nanoftp from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module nanoftp from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-list.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-list.html">list</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-nanohttp.html">nanohttp</a></th><td><a accesskey="n" href="libxml-nanohttp.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>minimal FTP implementation allowing to fetch resources like external subset. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#INVALID_SOCKET">INVALID_SOCKET</a></pre><pre class="programlisting">#define <a href="#SOCKET">SOCKET</a></pre><pre class="programlisting">Function type: <a href="#ftpDataCallback">ftpDataCallback</a>
+void <a href="#ftpDataCallback">ftpDataCallback</a> (void * userData, <br /> const char * data, <br /> int len)
+</pre>
+<pre class="programlisting">Function type: <a href="#ftpListCallback">ftpListCallback</a>
+void <a href="#ftpListCallback">ftpListCallback</a> (void * userData, <br /> const char * filename, <br /> const char * attrib, <br /> const char * owner, <br /> const char * group, <br /> unsigned long size, <br /> int links, <br /> int year, <br /> const char * month, <br /> int day, <br /> int hour, <br /> int minute)
+</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPCheckResponse">xmlNanoFTPCheckResponse</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlNanoFTPCleanup">xmlNanoFTPCleanup</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPClose">xmlNanoFTPClose</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPConnect">xmlNanoFTPConnect</a> (void * ctx)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a> (const char * server, <br /> int port)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void * ctx, <br /> const char * directory)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPDele">xmlNanoFTPDele</a> (void * ctx, <br /> const char * file)</pre>
+<pre class="programlisting">void <a href="#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPGet">xmlNanoFTPGet</a> (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br /> void * userData, <br /> const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a> (void * ctx)</pre>
+<pre class="programlisting"><a href="libxml-nanoftp.html#SOCKET">SOCKET</a> <a href="#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a> (void * ctx, <br /> const char * filename)</pre>
+<pre class="programlisting">void <a href="#xmlNanoFTPInit">xmlNanoFTPInit</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPList">xmlNanoFTPList</a> (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> const char * filename)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a> (const char * URL)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoFTPOpen">xmlNanoFTPOpen</a> (const char * URL)</pre>
+<pre class="programlisting">void <a href="#xmlNanoFTPProxy">xmlNanoFTPProxy</a> (const char * host, <br /> int port, <br /> const char * user, <br /> const char * passwd, <br /> int type)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPQuit">xmlNanoFTPQuit</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPRead">xmlNanoFTPRead</a> (void * ctx, <br /> void * dest, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlNanoFTPScanProxy">xmlNanoFTPScanProxy</a> (const char * URL)</pre>
+<pre class="programlisting">int <a href="#xmlNanoFTPUpdateURL">xmlNanoFTPUpdateURL</a> (void * ctx, <br /> const char * URL)</pre>
+<h2>Description</h2>
+<h3><a name="INVALID_SOCKET" id="INVALID_SOCKET"></a>Macro: INVALID_SOCKET</h3><pre>#define INVALID_SOCKET</pre><p>macro used to provide portability of code to windows sockets the value to be used when the socket is not valid</p>
+<h3><a name="SOCKET" id="SOCKET"></a>Macro: SOCKET</h3><pre>#define SOCKET</pre><p>macro used to provide portability of code to windows sockets</p>
+<h3><a name="ftpDataCallback" id="ftpDataCallback"></a>Function type: ftpDataCallback</h3><pre class="programlisting">Function type: ftpDataCallback
+void ftpDataCallback (void * userData, <br /> const char * data, <br /> int len)
+</pre><p>A callback for the <a href="libxml-nanoftp.html#xmlNanoFTPGet">xmlNanoFTPGet</a> command.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user provided context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the data received</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>its size in bytes</td></tr></tbody></table></div><br />
+<h3><a name="ftpListCallback" id="ftpListCallback"></a>Function type: ftpListCallback</h3><pre class="programlisting">Function type: ftpListCallback
+void ftpListCallback (void * userData, <br /> const char * filename, <br /> const char * attrib, <br /> const char * owner, <br /> const char * group, <br /> unsigned long size, <br /> int links, <br /> int year, <br /> const char * month, <br /> int day, <br /> int hour, <br /> int minute)
+</pre><p>A callback for the <a href="libxml-nanoftp.html#xmlNanoFTPList">xmlNanoFTPList</a> command. Note that only one of year and day:minute are specified.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the callback</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name (including "-&gt;" when links are shown)</td></tr><tr><td><span class="term"><i><tt>attrib</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> string</td></tr><tr><td><span class="term"><i><tt>owner</tt></i>:</span></td><td>the owner string</td></tr><tr><td><span class="term"><i><tt>group</tt></i>:</span></td><td>the group string</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the file size</td></tr><tr><td><span class="term"><i><tt>links</tt></i>:</span></td><td>the link count</td></tr><tr><td><span class="term"><i><tt>year</tt></i>:</span></td><td>the year</td></tr><tr><td><span class="term"><i><tt>month</tt></i>:</span></td><td>the month</td></tr><tr><td><span class="term"><i><tt>day</tt></i>:</span></td><td>the day</td></tr><tr><td><span class="term"><i><tt>hour</tt></i>:</span></td><td>the hour</td></tr><tr><td><span class="term"><i><tt>minute</tt></i>:</span></td><td>the minute</td></tr></tbody></table></div><br />
+<h3><a name="xmlNanoFTPCheckResponse" id="xmlNanoFTPCheckResponse"></a>Function: xmlNanoFTPCheckResponse</h3><pre class="programlisting">int xmlNanoFTPCheckResponse (void * ctx)<br />
+</pre><p>Check if there is a response from the FTP server after a command.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the code number, or 0</td></tr></tbody></table></div><h3><a name="xmlNanoFTPCleanup" id="xmlNanoFTPCleanup"></a>Function: xmlNanoFTPCleanup</h3><pre class="programlisting">void xmlNanoFTPCleanup (void)<br />
+</pre><p>Cleanup the FTP protocol layer. This cleanup proxy informations.</p>
+<h3><a name="xmlNanoFTPClose" id="xmlNanoFTPClose"></a>Function: xmlNanoFTPClose</h3><pre class="programlisting">int xmlNanoFTPClose (void * ctx)<br />
+</pre><p>Close the connection and both control and transport</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPCloseConnection" id="xmlNanoFTPCloseConnection"></a>Function: xmlNanoFTPCloseConnection</h3><pre class="programlisting">int xmlNanoFTPCloseConnection (void * ctx)<br />
+</pre><p>Close the data connection from the server</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPConnect" id="xmlNanoFTPConnect"></a>Function: xmlNanoFTPConnect</h3><pre class="programlisting">int xmlNanoFTPConnect (void * ctx)<br />
+</pre><p>Tries to open a control connection</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPConnectTo" id="xmlNanoFTPConnectTo"></a>Function: xmlNanoFTPConnectTo</h3><pre class="programlisting">void * xmlNanoFTPConnectTo (const char * server, <br /> int port)<br />
+</pre><p>Tries to open a control connection to the given server/port</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>server</tt></i>:</span></td><td>an FTP server name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the port (use 21 if 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an fTP context or NULL if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPCwd" id="xmlNanoFTPCwd"></a>Function: xmlNanoFTPCwd</h3><pre class="programlisting">int xmlNanoFTPCwd (void * ctx, <br /> const char * directory)<br />
+</pre><p>Tries to change the remote directory</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>directory</tt></i>:</span></td><td>a directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if CWD worked, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPDele" id="xmlNanoFTPDele"></a>Function: xmlNanoFTPDele</h3><pre class="programlisting">int xmlNanoFTPDele (void * ctx, <br /> const char * file)<br />
+</pre><p>Tries to delete an item (file or directory) from server</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a file or directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if DELE worked, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPFreeCtxt" id="xmlNanoFTPFreeCtxt"></a>Function: xmlNanoFTPFreeCtxt</h3><pre class="programlisting">void xmlNanoFTPFreeCtxt (void * ctx)<br />
+</pre><p>Frees the context after closing the connection.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr></tbody></table></div><h3><a name="xmlNanoFTPGet" id="xmlNanoFTPGet"></a>Function: xmlNanoFTPGet</h3><pre class="programlisting">int xmlNanoFTPGet (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br /> void * userData, <br /> const char * filename)<br />
+</pre><p>Fetch the given file from the server. All data are passed back in the callbacks. The last callback has a size of 0 block.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>the user callback</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user callback data</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file to retrieve</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPGetConnection" id="xmlNanoFTPGetConnection"></a>Function: xmlNanoFTPGetConnection</h3><pre class="programlisting"><a href="libxml-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetConnection (void * ctx)<br />
+</pre><p>Try to open a data connection to the server. Currently only passive mode is supported.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPGetResponse" id="xmlNanoFTPGetResponse"></a>Function: xmlNanoFTPGetResponse</h3><pre class="programlisting">int xmlNanoFTPGetResponse (void * ctx)<br />
+</pre><p>Get the response from the FTP server after a command.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the code number</td></tr></tbody></table></div><h3><a name="xmlNanoFTPGetSocket" id="xmlNanoFTPGetSocket"></a>Function: xmlNanoFTPGetSocket</h3><pre class="programlisting"><a href="libxml-nanoftp.html#SOCKET">SOCKET</a> xmlNanoFTPGetSocket (void * ctx, <br /> const char * filename)<br />
+</pre><p>Initiate fetch of the given file from the server.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file to retrieve (or NULL if path is in context).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the socket for the data connection, or &lt;0 in case of error</td></tr></tbody></table></div><h3><a name="xmlNanoFTPInit" id="xmlNanoFTPInit"></a>Function: xmlNanoFTPInit</h3><pre class="programlisting">void xmlNanoFTPInit (void)<br />
+</pre><p>Initialize the FTP protocol layer. Currently it just checks for proxy informations, and get the hostname</p>
+<h3><a name="xmlNanoFTPList" id="xmlNanoFTPList"></a>Function: xmlNanoFTPList</h3><pre class="programlisting">int xmlNanoFTPList (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> const char * filename)<br />
+</pre><p>Do a listing on the server. All files info are passed back in the callbacks.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>the user callback</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user callback data</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>optional files to list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPNewCtxt" id="xmlNanoFTPNewCtxt"></a>Function: xmlNanoFTPNewCtxt</h3><pre class="programlisting">void * xmlNanoFTPNewCtxt (const char * URL)<br />
+</pre><p>Allocate and initialize a new FTP context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL used to initialize the context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an FTP context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlNanoFTPOpen" id="xmlNanoFTPOpen"></a>Function: xmlNanoFTPOpen</h3><pre class="programlisting">void * xmlNanoFTPOpen (const char * URL)<br />
+</pre><p>Start to fetch the given ftp:// resource</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL to the resource</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an FTP context, or NULL</td></tr></tbody></table></div><h3><a name="xmlNanoFTPProxy" id="xmlNanoFTPProxy"></a>Function: xmlNanoFTPProxy</h3><pre class="programlisting">void xmlNanoFTPProxy (const char * host, <br /> int port, <br /> const char * user, <br /> const char * passwd, <br /> int type)<br />
+</pre><p>Setup the FTP proxy informations. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>host</tt></i>:</span></td><td>the proxy host name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the proxy port</td></tr><tr><td><span class="term"><i><tt>user</tt></i>:</span></td><td>the proxy user name</td></tr><tr><td><span class="term"><i><tt>passwd</tt></i>:</span></td><td>the proxy password</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of proxy 1 for using SITE, 2 for USER a@b</td></tr></tbody></table></div><h3><a name="xmlNanoFTPQuit" id="xmlNanoFTPQuit"></a>Function: xmlNanoFTPQuit</h3><pre class="programlisting">int xmlNanoFTPQuit (void * ctx)<br />
+</pre><p>Send a QUIT command to the server</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPRead" id="xmlNanoFTPRead"></a>Function: xmlNanoFTPRead</h3><pre class="programlisting">int xmlNanoFTPRead (void * ctx, <br /> void * dest, <br /> int len)<br />
+</pre><p>This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the FTP context</td></tr><tr><td><span class="term"><i><tt>dest</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the buffer length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.</td></tr></tbody></table></div><h3><a name="xmlNanoFTPScanProxy" id="xmlNanoFTPScanProxy"></a>Function: xmlNanoFTPScanProxy</h3><pre class="programlisting">void xmlNanoFTPScanProxy (const char * URL)<br />
+</pre><p>(Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A NULL URL cleans up proxy informations.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The proxy URL used to initialize the proxy context</td></tr></tbody></table></div><h3><a name="xmlNanoFTPUpdateURL" id="xmlNanoFTPUpdateURL"></a>Function: xmlNanoFTPUpdateURL</h3><pre class="programlisting">int xmlNanoFTPUpdateURL (void * ctx, <br /> const char * URL)<br />
+</pre><p>Update an FTP context by parsing the URL and finding new path it indicates. If there is an error in the protocol, hostname, port or other information, the error is raised. It indicates a new connection has to be established.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL used to update the context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if Ok, -1 in case of error (other host).</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-nanohttp.html b/doc/html/libxml-nanohttp.html
new file mode 100644
index 0000000..5bbcbaf
--- /dev/null
+++ b/doc/html/libxml-nanohttp.html
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module nanohttp from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module nanohttp from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-nanoftp.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-nanoftp.html">nanoftp</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-parser.html">parser</a></th><td><a accesskey="n" href="libxml-parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>minimal HTTP implementation allowing to fetch resources like external subset. </p><h2>Table of Contents</h2><pre class="programlisting">const char * <a href="#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlNanoHTTPCleanup">xmlNanoHTTPCleanup</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlNanoHTTPClose">xmlNanoHTTPClose</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoHTTPContentLength">xmlNanoHTTPContentLength</a> (void * ctx)</pre>
+<pre class="programlisting">const char * <a href="#xmlNanoHTTPEncoding">xmlNanoHTTPEncoding</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoHTTPFetch">xmlNanoHTTPFetch</a> (const char * URL, <br /> const char * filename, <br /> char ** contentType)</pre>
+<pre class="programlisting">void <a href="#xmlNanoHTTPInit">xmlNanoHTTPInit</a> (void)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoHTTPMethod">xmlNanoHTTPMethod</a> (const char * URL, <br /> const char * method, <br /> const char * input, <br /> char ** contentType, <br /> const char * headers, <br /> int ilen)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoHTTPMethodRedir">xmlNanoHTTPMethodRedir</a> (const char * URL, <br /> const char * method, <br /> const char * input, <br /> char ** contentType, <br /> char ** redir, <br /> const char * headers, <br /> int ilen)</pre>
+<pre class="programlisting">const char * <a href="#xmlNanoHTTPMimeType">xmlNanoHTTPMimeType</a> (void * ctx)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoHTTPOpen">xmlNanoHTTPOpen</a> (const char * URL, <br /> char ** contentType)</pre>
+<pre class="programlisting">void * <a href="#xmlNanoHTTPOpenRedir">xmlNanoHTTPOpenRedir</a> (const char * URL, <br /> char ** contentType, <br /> char ** redir)</pre>
+<pre class="programlisting">int <a href="#xmlNanoHTTPRead">xmlNanoHTTPRead</a> (void * ctx, <br /> void * dest, <br /> int len)</pre>
+<pre class="programlisting">const char * <a href="#xmlNanoHTTPRedir">xmlNanoHTTPRedir</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoHTTPReturnCode">xmlNanoHTTPReturnCode</a> (void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlNanoHTTPSave">xmlNanoHTTPSave</a> (void * ctxt, <br /> const char * filename)</pre>
+<pre class="programlisting">void <a href="#xmlNanoHTTPScanProxy">xmlNanoHTTPScanProxy</a> (const char * URL)</pre>
+<h2>Description</h2>
+<h3><a name="xmlNanoHTTPAuthHeader" id="xmlNanoHTTPAuthHeader"></a>Function: xmlNanoHTTPAuthHeader</h3><pre class="programlisting">const char * xmlNanoHTTPAuthHeader (void * ctx)<br />
+</pre><p>Get the authentication header of an HTTP context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the stashed value of the WWW-Authenticate or Proxy-Authenticate header.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPCleanup" id="xmlNanoHTTPCleanup"></a>Function: xmlNanoHTTPCleanup</h3><pre class="programlisting">void xmlNanoHTTPCleanup (void)<br />
+</pre><p>Cleanup the HTTP protocol layer.</p>
+<h3><a name="xmlNanoHTTPClose" id="xmlNanoHTTPClose"></a>Function: xmlNanoHTTPClose</h3><pre class="programlisting">void xmlNanoHTTPClose (void * ctx)<br />
+</pre><p>This function closes an HTTP context, it ends up the connection and free all data related to it.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPContentLength" id="xmlNanoHTTPContentLength"></a>Function: xmlNanoHTTPContentLength</h3><pre class="programlisting">int xmlNanoHTTPContentLength (void * ctx)<br />
+</pre><p>Provides the specified content length from the HTTP header.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified content length from the HTTP header. Note that a value of -1 indicates that the content length element was not included in the response header.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPEncoding" id="xmlNanoHTTPEncoding"></a>Function: xmlNanoHTTPEncoding</h3><pre class="programlisting">const char * xmlNanoHTTPEncoding (void * ctx)<br />
+</pre><p>Provides the specified encoding if specified in the HTTP headers.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified encoding or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPFetch" id="xmlNanoHTTPFetch"></a>Function: xmlNanoHTTPFetch</h3><pre class="programlisting">int xmlNanoHTTPFetch (const char * URL, <br /> const char * filename, <br /> char ** contentType)<br />
+</pre><p>This function try to fetch the indicated resource via HTTP GET and save it's content in the file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename where the content should be saved</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 incase of success. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPInit" id="xmlNanoHTTPInit"></a>Function: xmlNanoHTTPInit</h3><pre class="programlisting">void xmlNanoHTTPInit (void)<br />
+</pre><p>Initialize the HTTP protocol layer. Currently it just checks for proxy informations</p>
+<h3><a name="xmlNanoHTTPMethod" id="xmlNanoHTTPMethod"></a>Function: xmlNanoHTTPMethod</h3><pre class="programlisting">void * xmlNanoHTTPMethod (const char * URL, <br /> const char * method, <br /> const char * input, <br /> char ** contentType, <br /> const char * headers, <br /> int ilen)<br />
+</pre><p>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>method</tt></i>:</span></td><td>the HTTP method to use</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input string if any</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>the Content-Type information IN and OUT</td></tr><tr><td><span class="term"><i><tt>headers</tt></i>:</span></td><td>the extra headers</td></tr><tr><td><span class="term"><i><tt>ilen</tt></i>:</span></td><td>input length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPMethodRedir" id="xmlNanoHTTPMethodRedir"></a>Function: xmlNanoHTTPMethodRedir</h3><pre class="programlisting">void * xmlNanoHTTPMethodRedir (const char * URL, <br /> const char * method, <br /> const char * input, <br /> char ** contentType, <br /> char ** redir, <br /> const char * headers, <br /> int ilen)<br />
+</pre><p>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>method</tt></i>:</span></td><td>the HTTP method to use</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input string if any</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>the Content-Type information IN and OUT</td></tr><tr><td><span class="term"><i><tt>redir</tt></i>:</span></td><td>the redirected URL OUT</td></tr><tr><td><span class="term"><i><tt>headers</tt></i>:</span></td><td>the extra headers</td></tr><tr><td><span class="term"><i><tt>ilen</tt></i>:</span></td><td>input length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, or redir, if provided must be freed by the caller</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPMimeType" id="xmlNanoHTTPMimeType"></a>Function: xmlNanoHTTPMimeType</h3><pre class="programlisting">const char * xmlNanoHTTPMimeType (void * ctx)<br />
+</pre><p>Provides the specified Mime-Type if specified in the HTTP headers.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified Mime-Type or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPOpen" id="xmlNanoHTTPOpen"></a>Function: xmlNanoHTTPOpen</h3><pre class="programlisting">void * xmlNanoHTTPOpen (const char * URL, <br /> char ** contentType)<br />
+</pre><p>This function try to open a connection to the indicated resource via HTTP GET.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPOpenRedir" id="xmlNanoHTTPOpenRedir"></a>Function: xmlNanoHTTPOpenRedir</h3><pre class="programlisting">void * xmlNanoHTTPOpenRedir (const char * URL, <br /> char ** contentType, <br /> char ** redir)<br />
+</pre><p>This function try to open a connection to the indicated resource via HTTP GET.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The URL to load</td></tr><tr><td><span class="term"><i><tt>contentType</tt></i>:</span></td><td>if available the Content-Type information will be returned at that location</td></tr><tr><td><span class="term"><i><tt>redir</tt></i>:</span></td><td>if available the redirected URL will be returned</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPRead" id="xmlNanoHTTPRead"></a>Function: xmlNanoHTTPRead</h3><pre class="programlisting">int xmlNanoHTTPRead (void * ctx, <br /> void * dest, <br /> int len)<br />
+</pre><p>This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>dest</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the buffer length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPRedir" id="xmlNanoHTTPRedir"></a>Function: xmlNanoHTTPRedir</h3><pre class="programlisting">const char * xmlNanoHTTPRedir (void * ctx)<br />
+</pre><p>Provides the specified redirection URL if available from the HTTP header.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the specified redirection URL or NULL if not redirected.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPReturnCode" id="xmlNanoHTTPReturnCode"></a>Function: xmlNanoHTTPReturnCode</h3><pre class="programlisting">int xmlNanoHTTPReturnCode (void * ctx)<br />
+</pre><p>Get the latest HTTP return code received</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the HTTP return code for the request.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPSave" id="xmlNanoHTTPSave"></a>Function: xmlNanoHTTPSave</h3><pre class="programlisting">int xmlNanoHTTPSave (void * ctxt, <br /> const char * filename)<br />
+</pre><p>This function saves the output of the HTTP transaction to a file It closes and free the context at the end</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the HTTP context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename where the content should be saved</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 incase of success.</td></tr></tbody></table></div><h3><a name="xmlNanoHTTPScanProxy" id="xmlNanoHTTPScanProxy"></a>Function: xmlNanoHTTPScanProxy</h3><pre class="programlisting">void xmlNanoHTTPScanProxy (const char * URL)<br />
+</pre><p>(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy informations.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The proxy URL used to initialize the proxy context</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-parser.html b/doc/html/libxml-parser.html
new file mode 100644
index 0000000..98123f7
--- /dev/null
+++ b/doc/html/libxml-parser.html
@@ -0,0 +1,559 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module parser from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module parser from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-nanohttp.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-nanohttp.html">nanohttp</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-parserInternals.html">parserInternals</a></th><td><a accesskey="n" href="libxml-parserInternals.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>Interfaces, constants and types related to the XML parser </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_COMPLETE_ATTRS">XML_COMPLETE_ATTRS</a></pre><pre class="programlisting">#define <a href="#XML_DEFAULT_VERSION">XML_DEFAULT_VERSION</a></pre><pre class="programlisting">#define <a href="#XML_DETECT_IDS">XML_DETECT_IDS</a></pre><pre class="programlisting">#define <a href="#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a></pre><pre class="programlisting">#define <a href="#XML_SKIP_IDS">XML_SKIP_IDS</a></pre><pre class="programlisting">Enum <a href="#xmlFeature">xmlFeature</a>
+</pre><pre class="programlisting">Enum <a href="#xmlParserInputState">xmlParserInputState</a>
+</pre><pre class="programlisting">Enum <a href="#xmlParserMode">xmlParserMode</a>
+</pre><pre class="programlisting">Structure <a href="#xmlParserNodeInfo">xmlParserNodeInfo</a><br />struct _xmlParserNodeInfo
+</pre><pre class="programlisting">Typedef <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * <a name="xmlParserNodeInfoPtr" id="xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a><br />struct _xmlParserNodeInfoSeq
+</pre><pre class="programlisting">Typedef <a href="libxml-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> * <a name="xmlParserNodeInfoSeqPtr" id="xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlParserOption">xmlParserOption</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSAXHandlerV1">xmlSAXHandlerV1</a><br />struct _xmlSAXHandlerV1
+</pre><pre class="programlisting">Typedef <a href="libxml-parser.html#xmlSAXHandlerV1">xmlSAXHandlerV1</a> * <a name="xmlSAXHandlerV1Ptr" id="xmlSAXHandlerV1Ptr">xmlSAXHandlerV1Ptr</a>
+</pre><pre class="programlisting">Function type: <a href="#attributeDeclSAXFunc">attributeDeclSAXFunc</a>
+void <a href="#attributeDeclSAXFunc">attributeDeclSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)
+</pre>
+<pre class="programlisting">Function type: <a href="#attributeSAXFunc">attributeSAXFunc</a>
+void <a href="#attributeSAXFunc">attributeSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)
+</pre>
+<pre class="programlisting">Function type: <a href="#cdataBlockSAXFunc">cdataBlockSAXFunc</a>
+void <a href="#cdataBlockSAXFunc">cdataBlockSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)
+</pre>
+<pre class="programlisting">Function type: <a href="#charactersSAXFunc">charactersSAXFunc</a>
+void <a href="#charactersSAXFunc">charactersSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)
+</pre>
+<pre class="programlisting">Function type: <a href="#commentSAXFunc">commentSAXFunc</a>
+void <a href="#commentSAXFunc">commentSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)
+</pre>
+<pre class="programlisting">Function type: <a href="#elementDeclSAXFunc">elementDeclSAXFunc</a>
+void <a href="#elementDeclSAXFunc">elementDeclSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)
+</pre>
+<pre class="programlisting">Function type: <a href="#endDocumentSAXFunc">endDocumentSAXFunc</a>
+void <a href="#endDocumentSAXFunc">endDocumentSAXFunc</a> (void * ctx)
+</pre>
+<pre class="programlisting">Function type: <a href="#endElementNsSAX2Func">endElementNsSAX2Func</a>
+void <a href="#endElementNsSAX2Func">endElementNsSAX2Func</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)
+</pre>
+<pre class="programlisting">Function type: <a href="#endElementSAXFunc">endElementSAXFunc</a>
+void <a href="#endElementSAXFunc">endElementSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">Function type: <a href="#entityDeclSAXFunc">entityDeclSAXFunc</a>
+void <a href="#entityDeclSAXFunc">entityDeclSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)
+</pre>
+<pre class="programlisting">Function type: <a href="#errorSAXFunc">errorSAXFunc</a>
+void <a href="#errorSAXFunc">errorSAXFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#externalSubsetSAXFunc">externalSubsetSAXFunc</a>
+void <a href="#externalSubsetSAXFunc">externalSubsetSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)
+</pre>
+<pre class="programlisting">Function type: <a href="#fatalErrorSAXFunc">fatalErrorSAXFunc</a>
+void <a href="#fatalErrorSAXFunc">fatalErrorSAXFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#getEntitySAXFunc">getEntitySAXFunc</a>
+<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getEntitySAXFunc">getEntitySAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">Function type: <a href="#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a>
+<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">Function type: <a href="#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a>
+int <a href="#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> (void * ctx)
+</pre>
+<pre class="programlisting">Function type: <a href="#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a>
+int <a href="#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> (void * ctx)
+</pre>
+<pre class="programlisting">Function type: <a href="#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a>
+void <a href="#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)
+</pre>
+<pre class="programlisting">Function type: <a href="#internalSubsetSAXFunc">internalSubsetSAXFunc</a>
+void <a href="#internalSubsetSAXFunc">internalSubsetSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)
+</pre>
+<pre class="programlisting">Function type: <a href="#isStandaloneSAXFunc">isStandaloneSAXFunc</a>
+int <a href="#isStandaloneSAXFunc">isStandaloneSAXFunc</a> (void * ctx)
+</pre>
+<pre class="programlisting">Function type: <a href="#notationDeclSAXFunc">notationDeclSAXFunc</a>
+void <a href="#notationDeclSAXFunc">notationDeclSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)
+</pre>
+<pre class="programlisting">Function type: <a href="#processingInstructionSAXFunc">processingInstructionSAXFunc</a>
+void <a href="#processingInstructionSAXFunc">processingInstructionSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)
+</pre>
+<pre class="programlisting">Function type: <a href="#referenceSAXFunc">referenceSAXFunc</a>
+void <a href="#referenceSAXFunc">referenceSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre>
+<pre class="programlisting">Function type: <a href="#resolveEntitySAXFunc">resolveEntitySAXFunc</a>
+<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#resolveEntitySAXFunc">resolveEntitySAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)
+</pre>
+<pre class="programlisting">Function type: <a href="#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a>
+void <a href="#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)
+</pre>
+<pre class="programlisting">Function type: <a href="#startDocumentSAXFunc">startDocumentSAXFunc</a>
+void <a href="#startDocumentSAXFunc">startDocumentSAXFunc</a> (void * ctx)
+</pre>
+<pre class="programlisting">Function type: <a href="#startElementNsSAX2Func">startElementNsSAX2Func</a>
+void <a href="#startElementNsSAX2Func">startElementNsSAX2Func</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> int nb_namespaces, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br /> int nb_attributes, <br /> int nb_defaulted, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** attributes)
+</pre>
+<pre class="programlisting">Function type: <a href="#startElementSAXFunc">startElementSAXFunc</a>
+void <a href="#startElementSAXFunc">startElementSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)
+</pre>
+<pre class="programlisting">Function type: <a href="#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a>
+void <a href="#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)
+</pre>
+<pre class="programlisting">Function type: <a href="#warningSAXFunc">warningSAXFunc</a>
+void <a href="#warningSAXFunc">warningSAXFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">long <a href="#xmlByteConsumed">xmlByteConsumed</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlCleanupParser">xmlCleanupParser</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlClearNodeInfoSeq">xmlClearNodeInfoSeq</a> (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)</pre>
+<pre class="programlisting">void <a href="#xmlClearParserCtxt">xmlClearParserCtxt</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateDocParserCtxt">xmlCreateDocParserCtxt</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateIOParserCtxt">xmlCreateIOParserCtxt</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreatePushParserCtxt">xmlCreatePushParserCtxt</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadDoc">xmlCtxtReadDoc</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadFd">xmlCtxtReadFd</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadFile">xmlCtxtReadFile</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadIO">xmlCtxtReadIO</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCtxtReadMemory">xmlCtxtReadMemory</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">void <a href="#xmlCtxtReset">xmlCtxtReset</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlCtxtResetPush">xmlCtxtResetPush</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#xmlCtxtUseOptions">xmlCtxtUseOptions</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int options)</pre>
+<pre class="programlisting">Function type: <a href="#xmlExternalEntityLoader">xmlExternalEntityLoader</a>
+<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlExternalEntityLoader">xmlExternalEntityLoader</a> (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context)
+</pre>
+<pre class="programlisting">void <a href="#xmlFreeParserCtxt">xmlFreeParserCtxt</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> <a href="#xmlGetExternalEntityLoader">xmlGetExternalEntityLoader</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlGetFeature">xmlGetFeature</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * name, <br /> void * result)</pre>
+<pre class="programlisting">int <a href="#xmlGetFeaturesList">xmlGetFeaturesList</a> (int * len, <br /> const char ** result)</pre>
+<pre class="programlisting">int <a href="#xmlHasFeature">xmlHasFeature</a> (<a href="libxml-parser.html#xmlFeature">xmlFeature</a> feature)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlIOParseDTD">xmlIOParseDTD</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">void <a href="#xmlInitNodeInfoSeq">xmlInitNodeInfoSeq</a> (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)</pre>
+<pre class="programlisting">void <a href="#xmlInitParser">xmlInitParser</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlInitParserCtxt">xmlInitParserCtxt</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlKeepBlanksDefault">xmlKeepBlanksDefault</a> (int val)</pre>
+<pre class="programlisting">int <a href="#xmlLineNumbersDefault">xmlLineNumbersDefault</a> (int val)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlLoadExternalEntity">xmlLoadExternalEntity</a> (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewIOInputStream">xmlNewIOInputStream</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlNewParserCtxt">xmlNewParserCtxt</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)</pre>
+<pre class="programlisting">int <a href="#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst, <br /> int recover)</pre>
+<pre class="programlisting">int <a href="#xmlParseChunk">xmlParseChunk</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)</pre>
+<pre class="programlisting">int <a href="#xmlParseCtxtExternalEntity">xmlParseCtxtExternalEntity</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlParseDTD">xmlParseDTD</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseDoc">xmlParseDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)</pre>
+<pre class="programlisting">int <a href="#xmlParseDocument">xmlParseDocument</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseEntity">xmlParseEntity</a> (const char * filename)</pre>
+<pre class="programlisting">int <a href="#xmlParseExtParsedEnt">xmlParseExtParsedEnt</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlParseExternalEntity">xmlParseExternalEntity</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseFile">xmlParseFile</a> (const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a> <a href="#xmlParseInNodeContext">xmlParseInNodeContext</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const char * data, <br /> int datalen, <br /> int options, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlParseMemory">xmlParseMemory</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting">void <a href="#xmlParserAddNodeInfo">xmlParserAddNodeInfo</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info)</pre>
+<pre class="programlisting">const <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * <a href="#xmlParserFindNodeInfo">xmlParserFindNodeInfo</a> (const <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br /> const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">unsigned long <a href="#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a> (const <a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq, <br /> const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">Function type: <a href="#xmlParserInputDeallocate">xmlParserInputDeallocate</a>
+void <a href="#xmlParserInputDeallocate">xmlParserInputDeallocate</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)
+</pre>
+<pre class="programlisting">int <a href="#xmlParserInputGrow">xmlParserInputGrow</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlParserInputRead">xmlParserInputRead</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlPedanticParserDefault">xmlPedanticParserDefault</a> (int val)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadDoc">xmlReadDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadFd">xmlReadFd</a> (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadFile">xmlReadFile</a> (const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadIO">xmlReadIO</a> (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlReadMemory">xmlReadMemory</a> (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverDoc">xmlRecoverDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverFile">xmlRecoverFile</a> (const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlRecoverMemory">xmlRecoverMemory</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlSAXParseDTD">xmlSAXParseDTD</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseDoc">xmlSAXParseDoc</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int recovery)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseEntity">xmlSAXParseEntity</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseFile">xmlSAXParseFile</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename, <br /> int recovery)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseFileWithData">xmlSAXParseFileWithData</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename, <br /> int recovery, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseMemory">xmlSAXParseMemory</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * buffer, <br /> int size, <br /> int recovery)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlSAXParseMemoryWithData">xmlSAXParseMemoryWithData</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * buffer, <br /> int size, <br /> int recovery, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlSAXUserParseFile">xmlSAXUserParseFile</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * filename)</pre>
+<pre class="programlisting">int <a href="#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a> (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * buffer, <br /> int size)</pre>
+<pre class="programlisting">void <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a> (<a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlSetFeature">xmlSetFeature</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * name, <br /> void * value)</pre>
+<pre class="programlisting">void <a href="#xmlSetupParserForBuffer">xmlSetupParserForBuffer</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buffer, <br /> const char * filename)</pre>
+<pre class="programlisting">void <a href="#xmlStopParser">xmlStopParser</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a> (int val)</pre>
+<h2>Description</h2>
+<h3><a name="XML_COMPLETE_ATTRS" id="XML_COMPLETE_ATTRS"></a>Macro: XML_COMPLETE_ATTRS</h3><pre>#define XML_COMPLETE_ATTRS</pre><p>Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue.</p>
+<h3><a name="XML_DEFAULT_VERSION" id="XML_DEFAULT_VERSION"></a>Macro: XML_DEFAULT_VERSION</h3><pre>#define XML_DEFAULT_VERSION</pre><p>The default version of XML used: 1.0</p>
+<h3><a name="XML_DETECT_IDS" id="XML_DETECT_IDS"></a>Macro: XML_DETECT_IDS</h3><pre>#define XML_DETECT_IDS</pre><p>Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue.</p>
+<h3><a name="XML_SAX2_MAGIC" id="XML_SAX2_MAGIC"></a>Macro: XML_SAX2_MAGIC</h3><pre>#define XML_SAX2_MAGIC</pre><p>Special constant found in SAX2 blocks initialized fields</p>
+<h3><a name="XML_SKIP_IDS" id="XML_SKIP_IDS"></a>Macro: XML_SKIP_IDS</h3><pre>#define XML_SKIP_IDS</pre><p>Bit in the loadsubset context field to tell to not do ID/REFs registration. Used to initialize <a href="libxml-globals.html#xmlLoadExtDtdDefaultValue">xmlLoadExtDtdDefaultValue</a> in some special cases.</p>
+<h3>Enum <a name="xmlFeature" id="xmlFeature">xmlFeature</a></h3><pre class="programlisting">Enum xmlFeature {
+ <a name="XML_WITH_THREAD" id="XML_WITH_THREAD">XML_WITH_THREAD</a> = 1
+ <a name="XML_WITH_TREE" id="XML_WITH_TREE">XML_WITH_TREE</a> = 2
+ <a name="XML_WITH_OUTPUT" id="XML_WITH_OUTPUT">XML_WITH_OUTPUT</a> = 3
+ <a name="XML_WITH_PUSH" id="XML_WITH_PUSH">XML_WITH_PUSH</a> = 4
+ <a name="XML_WITH_READER" id="XML_WITH_READER">XML_WITH_READER</a> = 5
+ <a name="XML_WITH_PATTERN" id="XML_WITH_PATTERN">XML_WITH_PATTERN</a> = 6
+ <a name="XML_WITH_WRITER" id="XML_WITH_WRITER">XML_WITH_WRITER</a> = 7
+ <a name="XML_WITH_SAX1" id="XML_WITH_SAX1">XML_WITH_SAX1</a> = 8
+ <a name="XML_WITH_FTP" id="XML_WITH_FTP">XML_WITH_FTP</a> = 9
+ <a name="XML_WITH_HTTP" id="XML_WITH_HTTP">XML_WITH_HTTP</a> = 10
+ <a name="XML_WITH_VALID" id="XML_WITH_VALID">XML_WITH_VALID</a> = 11
+ <a name="XML_WITH_HTML" id="XML_WITH_HTML">XML_WITH_HTML</a> = 12
+ <a name="XML_WITH_LEGACY" id="XML_WITH_LEGACY">XML_WITH_LEGACY</a> = 13
+ <a name="XML_WITH_C14N" id="XML_WITH_C14N">XML_WITH_C14N</a> = 14
+ <a name="XML_WITH_CATALOG" id="XML_WITH_CATALOG">XML_WITH_CATALOG</a> = 15
+ <a name="XML_WITH_XPATH" id="XML_WITH_XPATH">XML_WITH_XPATH</a> = 16
+ <a name="XML_WITH_XPTR" id="XML_WITH_XPTR">XML_WITH_XPTR</a> = 17
+ <a name="XML_WITH_XINCLUDE" id="XML_WITH_XINCLUDE">XML_WITH_XINCLUDE</a> = 18
+ <a name="XML_WITH_ICONV" id="XML_WITH_ICONV">XML_WITH_ICONV</a> = 19
+ <a name="XML_WITH_ISO8859X" id="XML_WITH_ISO8859X">XML_WITH_ISO8859X</a> = 20
+ <a name="XML_WITH_UNICODE" id="XML_WITH_UNICODE">XML_WITH_UNICODE</a> = 21
+ <a name="XML_WITH_REGEXP" id="XML_WITH_REGEXP">XML_WITH_REGEXP</a> = 22
+ <a name="XML_WITH_AUTOMATA" id="XML_WITH_AUTOMATA">XML_WITH_AUTOMATA</a> = 23
+ <a name="XML_WITH_EXPR" id="XML_WITH_EXPR">XML_WITH_EXPR</a> = 24
+ <a name="XML_WITH_SCHEMAS" id="XML_WITH_SCHEMAS">XML_WITH_SCHEMAS</a> = 25
+ <a name="XML_WITH_SCHEMATRON" id="XML_WITH_SCHEMATRON">XML_WITH_SCHEMATRON</a> = 26
+ <a name="XML_WITH_MODULES" id="XML_WITH_MODULES">XML_WITH_MODULES</a> = 27
+ <a name="XML_WITH_DEBUG" id="XML_WITH_DEBUG">XML_WITH_DEBUG</a> = 28
+ <a name="XML_WITH_DEBUG_MEM" id="XML_WITH_DEBUG_MEM">XML_WITH_DEBUG_MEM</a> = 29
+ <a name="XML_WITH_DEBUG_RUN" id="XML_WITH_DEBUG_RUN">XML_WITH_DEBUG_RUN</a> = 30
+ <a name="XML_WITH_ZLIB" id="XML_WITH_ZLIB">XML_WITH_ZLIB</a> = 31
+ <a name="XML_WITH_ICU" id="XML_WITH_ICU">XML_WITH_ICU</a> = 32
+ <a name="XML_WITH_LZMA" id="XML_WITH_LZMA">XML_WITH_LZMA</a> = 33
+ <a name="XML_WITH_NONE" id="XML_WITH_NONE">XML_WITH_NONE</a> = 99999 : just to be sure of allocation size
+}
+</pre><h3>Enum <a name="xmlParserInputState" id="xmlParserInputState">xmlParserInputState</a></h3><pre class="programlisting">Enum xmlParserInputState {
+ <a name="XML_PARSER_EOF" id="XML_PARSER_EOF">XML_PARSER_EOF</a> = -1 : nothing is to be parsed
+ <a name="XML_PARSER_START" id="XML_PARSER_START">XML_PARSER_START</a> = 0 : nothing has been parsed
+ <a name="XML_PARSER_MISC" id="XML_PARSER_MISC">XML_PARSER_MISC</a> = 1 : Misc* before int subset
+ <a name="XML_PARSER_PI" id="XML_PARSER_PI">XML_PARSER_PI</a> = 2 : Within a processing instruction
+ <a name="XML_PARSER_DTD" id="XML_PARSER_DTD">XML_PARSER_DTD</a> = 3 : within some DTD content
+ <a name="XML_PARSER_PROLOG" id="XML_PARSER_PROLOG">XML_PARSER_PROLOG</a> = 4 : Misc* after internal subset
+ <a name="XML_PARSER_COMMENT" id="XML_PARSER_COMMENT">XML_PARSER_COMMENT</a> = 5 : within a <a href="libxml-SAX.html#comment">comment</a>
+ <a name="XML_PARSER_START_TAG" id="XML_PARSER_START_TAG">XML_PARSER_START_TAG</a> = 6 : within a start tag
+ <a name="XML_PARSER_CONTENT" id="XML_PARSER_CONTENT">XML_PARSER_CONTENT</a> = 7 : within the content
+ <a name="XML_PARSER_CDATA_SECTION" id="XML_PARSER_CDATA_SECTION">XML_PARSER_CDATA_SECTION</a> = 8 : within a CDATA section
+ <a name="XML_PARSER_END_TAG" id="XML_PARSER_END_TAG">XML_PARSER_END_TAG</a> = 9 : within a closing tag
+ <a name="XML_PARSER_ENTITY_DECL" id="XML_PARSER_ENTITY_DECL">XML_PARSER_ENTITY_DECL</a> = 10 : within an entity declaration
+ <a name="XML_PARSER_ENTITY_VALUE" id="XML_PARSER_ENTITY_VALUE">XML_PARSER_ENTITY_VALUE</a> = 11 : within an entity value in a decl
+ <a name="XML_PARSER_ATTRIBUTE_VALUE" id="XML_PARSER_ATTRIBUTE_VALUE">XML_PARSER_ATTRIBUTE_VALUE</a> = 12 : within an <a href="libxml-SAX.html#attribute">attribute</a> value
+ <a name="XML_PARSER_SYSTEM_LITERAL" id="XML_PARSER_SYSTEM_LITERAL">XML_PARSER_SYSTEM_LITERAL</a> = 13 : within a SYSTEM value
+ <a name="XML_PARSER_EPILOG" id="XML_PARSER_EPILOG">XML_PARSER_EPILOG</a> = 14 : the Misc* after the last end tag
+ <a name="XML_PARSER_IGNORE" id="XML_PARSER_IGNORE">XML_PARSER_IGNORE</a> = 15 : within an IGNORED section
+ <a name="XML_PARSER_PUBLIC_LITERAL" id="XML_PARSER_PUBLIC_LITERAL">XML_PARSER_PUBLIC_LITERAL</a> = 16 : within a PUBLIC value
+}
+</pre><h3>Enum <a name="xmlParserMode" id="xmlParserMode">xmlParserMode</a></h3><pre class="programlisting">Enum xmlParserMode {
+ <a name="XML_PARSE_UNKNOWN" id="XML_PARSE_UNKNOWN">XML_PARSE_UNKNOWN</a> = 0
+ <a name="XML_PARSE_DOM" id="XML_PARSE_DOM">XML_PARSE_DOM</a> = 1
+ <a name="XML_PARSE_SAX" id="XML_PARSE_SAX">XML_PARSE_SAX</a> = 2
+ <a name="XML_PARSE_PUSH_DOM" id="XML_PARSE_PUSH_DOM">XML_PARSE_PUSH_DOM</a> = 3
+ <a name="XML_PARSE_PUSH_SAX" id="XML_PARSE_PUSH_SAX">XML_PARSE_PUSH_SAX</a> = 4
+ <a name="XML_PARSE_READER" id="XML_PARSE_READER">XML_PARSE_READER</a> = 5
+}
+</pre><h3><a name="xmlParserNodeInfo" id="xmlParserNodeInfo">Structure xmlParserNodeInfo</a></h3><pre class="programlisting">Structure xmlParserNodeInfo<br />struct _xmlParserNodeInfo {
+ const struct _xmlNode * node : Position &amp; line # that text that create
+ unsigned long begin_pos
+ unsigned long begin_line
+ unsigned long end_pos
+ unsigned long end_line
+}</pre><h3><a name="xmlParserNodeInfoSeq" id="xmlParserNodeInfoSeq">Structure xmlParserNodeInfoSeq</a></h3><pre class="programlisting">Structure xmlParserNodeInfoSeq<br />struct _xmlParserNodeInfoSeq {
+ unsigned long maximum
+ unsigned long length
+ <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * buffer
+}</pre><h3>Enum <a name="xmlParserOption" id="xmlParserOption">xmlParserOption</a></h3><pre class="programlisting">Enum xmlParserOption {
+ <a name="XML_PARSE_RECOVER" id="XML_PARSE_RECOVER">XML_PARSE_RECOVER</a> = 1 : recover on errors
+ <a name="XML_PARSE_NOENT" id="XML_PARSE_NOENT">XML_PARSE_NOENT</a> = 2 : substitute entities
+ <a name="XML_PARSE_DTDLOAD" id="XML_PARSE_DTDLOAD">XML_PARSE_DTDLOAD</a> = 4 : load the external subset
+ <a name="XML_PARSE_DTDATTR" id="XML_PARSE_DTDATTR">XML_PARSE_DTDATTR</a> = 8 : default DTD attributes
+ <a name="XML_PARSE_DTDVALID" id="XML_PARSE_DTDVALID">XML_PARSE_DTDVALID</a> = 16 : validate with the DTD
+ <a name="XML_PARSE_NOERROR" id="XML_PARSE_NOERROR">XML_PARSE_NOERROR</a> = 32 : suppress error reports
+ <a name="XML_PARSE_NOWARNING" id="XML_PARSE_NOWARNING">XML_PARSE_NOWARNING</a> = 64 : suppress warning reports
+ <a name="XML_PARSE_PEDANTIC" id="XML_PARSE_PEDANTIC">XML_PARSE_PEDANTIC</a> = 128 : pedantic error reporting
+ <a name="XML_PARSE_NOBLANKS" id="XML_PARSE_NOBLANKS">XML_PARSE_NOBLANKS</a> = 256 : remove blank nodes
+ <a name="XML_PARSE_SAX1" id="XML_PARSE_SAX1">XML_PARSE_SAX1</a> = 512 : use the SAX1 interface internally
+ <a name="XML_PARSE_XINCLUDE" id="XML_PARSE_XINCLUDE">XML_PARSE_XINCLUDE</a> = 1024 : Implement XInclude substitition
+ <a name="XML_PARSE_NONET" id="XML_PARSE_NONET">XML_PARSE_NONET</a> = 2048 : Forbid network access
+ <a name="XML_PARSE_NODICT" id="XML_PARSE_NODICT">XML_PARSE_NODICT</a> = 4096 : Do not reuse the context dictionnary
+ <a name="XML_PARSE_NSCLEAN" id="XML_PARSE_NSCLEAN">XML_PARSE_NSCLEAN</a> = 8192 : remove redundant namespaces declarations
+ <a name="XML_PARSE_NOCDATA" id="XML_PARSE_NOCDATA">XML_PARSE_NOCDATA</a> = 16384 : merge CDATA as text nodes
+ <a name="XML_PARSE_NOXINCNODE" id="XML_PARSE_NOXINCNODE">XML_PARSE_NOXINCNODE</a> = 32768 : do not generate XINCLUDE START/END nodes
+ <a name="XML_PARSE_COMPACT" id="XML_PARSE_COMPACT">XML_PARSE_COMPACT</a> = 65536 : compact small text nodes; no modification of the tree allowed afterwards (will possibly crash if you try to modify the tree)
+ <a name="XML_PARSE_OLD10" id="XML_PARSE_OLD10">XML_PARSE_OLD10</a> = 131072 : parse using XML-1.0 before update 5
+ <a name="XML_PARSE_NOBASEFIX" id="XML_PARSE_NOBASEFIX">XML_PARSE_NOBASEFIX</a> = 262144 : do not fixup XINCLUDE xml:base uris
+ <a name="XML_PARSE_HUGE" id="XML_PARSE_HUGE">XML_PARSE_HUGE</a> = 524288 : relax any hardcoded limit from the parser
+ <a name="XML_PARSE_OLDSAX" id="XML_PARSE_OLDSAX">XML_PARSE_OLDSAX</a> = 1048576 : parse using SAX2 interface before 2.7.0
+ <a name="XML_PARSE_IGNORE_ENC" id="XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a> = 2097152 : ignore internal document encoding hint
+ <a name="XML_PARSE_BIG_LINES" id="XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> = 4194304 : Store big lines numbers in text PSVI field
+}
+</pre><h3><a name="xmlSAXHandlerV1" id="xmlSAXHandlerV1">Structure xmlSAXHandlerV1</a></h3><pre class="programlisting">Structure xmlSAXHandlerV1<br />struct _xmlSAXHandlerV1 {
+ <a href="libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset
+ <a href="libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone
+ <a href="libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset
+ <a href="libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset
+ <a href="libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity
+ <a href="libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity
+ <a href="libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl
+ <a href="libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl
+ <a href="libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl
+ <a href="libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl
+ <a href="libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl
+ <a href="libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator
+ <a href="libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument
+ <a href="libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument
+ <a href="libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement
+ <a href="libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement
+ <a href="libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference
+ <a href="libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters
+ <a href="libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace
+ <a href="libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction
+ <a href="libxml-parser.html#commentSAXFunc">commentSAXFunc</a> comment
+ <a href="libxml-parser.html#warningSAXFunc">warningSAXFunc</a> warning
+ <a href="libxml-parser.html#errorSAXFunc">errorSAXFunc</a> error
+ <a href="libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors
+ <a href="libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity
+ <a href="libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock
+ <a href="libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset
+ unsigned int initialized
+}</pre><h3><a name="attributeDeclSAXFunc" id="attributeDeclSAXFunc"></a>Function type: attributeDeclSAXFunc</h3><pre class="programlisting">Function type: attributeDeclSAXFunc
+void attributeDeclSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * fullname, <br /> int type, <br /> int def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)
+</pre><p>An <a href="libxml-SAX.html#attribute">attribute</a> definition has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the name of the element</td></tr><tr><td><span class="term"><i><tt>fullname</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the type of default value</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the tree of enumerated value set</td></tr></tbody></table></div><br />
+<h3><a name="attributeSAXFunc" id="attributeSAXFunc"></a>Function type: attributeSAXFunc</h3><pre class="programlisting">Function type: attributeSAXFunc
+void attributeSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)
+</pre><p>Handle an <a href="libxml-SAX.html#attribute">attribute</a> that has been read by the parser. The default handling is to convert the <a href="libxml-SAX.html#attribute">attribute</a> into an DOM subtree and past it in a new <a href="libxml-tree.html#xmlAttr">xmlAttr</a> element added to the element.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The <a href="libxml-SAX.html#attribute">attribute</a> name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr></tbody></table></div><br />
+<h3><a name="cdataBlockSAXFunc" id="cdataBlockSAXFunc"></a>Function type: cdataBlockSAXFunc</h3><pre class="programlisting">Function type: cdataBlockSAXFunc
+void cdataBlockSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)
+</pre><p>Called when a pcdata block has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>The pcdata content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the block length</td></tr></tbody></table></div><br />
+<h3><a name="charactersSAXFunc" id="charactersSAXFunc"></a>Function type: charactersSAXFunc</h3><pre class="programlisting">Function type: charactersSAXFunc
+void charactersSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)
+</pre><p>Receiving some chars from the parser.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><br />
+<h3><a name="commentSAXFunc" id="commentSAXFunc"></a>Function type: commentSAXFunc</h3><pre class="programlisting">Function type: commentSAXFunc
+void commentSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)
+</pre><p>A <a href="libxml-SAX.html#comment">comment</a> has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#comment">comment</a> content</td></tr></tbody></table></div><br />
+<h3><a name="elementDeclSAXFunc" id="elementDeclSAXFunc"></a>Function type: elementDeclSAXFunc</h3><pre class="programlisting">Function type: elementDeclSAXFunc
+void elementDeclSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)
+</pre><p>An element definition has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element value tree</td></tr></tbody></table></div><br />
+<h3><a name="endDocumentSAXFunc" id="endDocumentSAXFunc"></a>Function type: endDocumentSAXFunc</h3><pre class="programlisting">Function type: endDocumentSAXFunc
+void endDocumentSAXFunc (void * ctx)
+</pre><p>Called when the document end has been detected.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><br />
+<h3><a name="endElementNsSAX2Func" id="endElementNsSAX2Func"></a>Function type: endElementNsSAX2Func</h3><pre class="programlisting">Function type: endElementNsSAX2Func
+void endElementNsSAX2Func (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI)
+</pre><p>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr></tbody></table></div><br />
+<h3><a name="endElementSAXFunc" id="endElementSAXFunc"></a>Function type: endElementSAXFunc</h3><pre class="programlisting">Function type: endElementSAXFunc
+void endElementSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Called when the end of an element has been detected.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name</td></tr></tbody></table></div><br />
+<h3><a name="entityDeclSAXFunc" id="entityDeclSAXFunc"></a>Function type: entityDeclSAXFunc</h3><pre class="programlisting">Function type: entityDeclSAXFunc
+void entityDeclSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)
+</pre><p>An entity definition has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the entity type</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the entity value (without processing).</td></tr></tbody></table></div><br />
+<h3><a name="errorSAXFunc" id="errorSAXFunc"></a>Function type: errorSAXFunc</h3><pre class="programlisting">Function type: errorSAXFunc
+void errorSAXFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Display and format an error messages, callback.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><br />
+<h3><a name="externalSubsetSAXFunc" id="externalSubsetSAXFunc"></a>Function type: externalSubsetSAXFunc</h3><pre class="programlisting">Function type: externalSubsetSAXFunc
+void externalSubsetSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)
+</pre><p>Callback on external subset declaration.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><br />
+<h3><a name="fatalErrorSAXFunc" id="fatalErrorSAXFunc"></a>Function type: fatalErrorSAXFunc</h3><pre class="programlisting">Function type: fatalErrorSAXFunc
+void fatalErrorSAXFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><br />
+<h3><a name="getEntitySAXFunc" id="getEntitySAXFunc"></a>Function type: getEntitySAXFunc</h3><pre class="programlisting">Function type: getEntitySAXFunc
+<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> getEntitySAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Get an entity by name.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><br />
+<h3><a name="getParameterEntitySAXFunc" id="getParameterEntitySAXFunc"></a>Function type: getParameterEntitySAXFunc</h3><pre class="programlisting">Function type: getParameterEntitySAXFunc
+<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> getParameterEntitySAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Get a parameter entity by name.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found.</td></tr></tbody></table></div><br />
+<h3><a name="hasExternalSubsetSAXFunc" id="hasExternalSubsetSAXFunc"></a>Function type: hasExternalSubsetSAXFunc</h3><pre class="programlisting">Function type: hasExternalSubsetSAXFunc
+int hasExternalSubsetSAXFunc (void * ctx)
+</pre><p>Does this document has an external subset?</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><br />
+<h3><a name="hasInternalSubsetSAXFunc" id="hasInternalSubsetSAXFunc"></a>Function type: hasInternalSubsetSAXFunc</h3><pre class="programlisting">Function type: hasInternalSubsetSAXFunc
+int hasInternalSubsetSAXFunc (void * ctx)
+</pre><p>Does this document has an internal subset.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><br />
+<h3><a name="ignorableWhitespaceSAXFunc" id="ignorableWhitespaceSAXFunc"></a>Function type: ignorableWhitespaceSAXFunc</h3><pre class="programlisting">Function type: ignorableWhitespaceSAXFunc
+void ignorableWhitespaceSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ch, <br /> int len)
+</pre><p>Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr></tbody></table></div><br />
+<h3><a name="internalSubsetSAXFunc" id="internalSubsetSAXFunc"></a>Function type: internalSubsetSAXFunc</h3><pre class="programlisting">Function type: internalSubsetSAXFunc
+void internalSubsetSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)
+</pre><p>Callback on internal subset declaration.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the root element name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the SYSTEM ID (e.g. filename or URL)</td></tr></tbody></table></div><br />
+<h3><a name="isStandaloneSAXFunc" id="isStandaloneSAXFunc"></a>Function type: isStandaloneSAXFunc</h3><pre class="programlisting">Function type: isStandaloneSAXFunc
+int isStandaloneSAXFunc (void * ctx)
+</pre><p>Is this document tagged standalone?</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true</td></tr></tbody></table></div><br />
+<h3><a name="notationDeclSAXFunc" id="notationDeclSAXFunc"></a>Function type: notationDeclSAXFunc</h3><pre class="programlisting">Function type: notationDeclSAXFunc
+void notationDeclSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)
+</pre><p>What to do when a notation declaration has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the notation</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr></tbody></table></div><br />
+<h3><a name="processingInstructionSAXFunc" id="processingInstructionSAXFunc"></a>Function type: processingInstructionSAXFunc</h3><pre class="programlisting">Function type: processingInstructionSAXFunc
+void processingInstructionSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data)
+</pre><p>A processing instruction has been parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the target name</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the PI data's</td></tr></tbody></table></div><br />
+<h3><a name="referenceSAXFunc" id="referenceSAXFunc"></a>Function type: referenceSAXFunc</h3><pre class="programlisting">Function type: referenceSAXFunc
+void referenceSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)
+</pre><p>Called when an entity <a href="libxml-SAX.html#reference">reference</a> is detected.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The entity name</td></tr></tbody></table></div><br />
+<h3><a name="resolveEntitySAXFunc" id="resolveEntitySAXFunc"></a>Function type: resolveEntitySAXFunc</h3><pre class="programlisting">Function type: resolveEntitySAXFunc
+<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> resolveEntitySAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId)
+</pre><p>Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> if inlined or NULL for DOM behaviour.</td></tr></tbody></table></div><br />
+<h3><a name="setDocumentLocatorSAXFunc" id="setDocumentLocatorSAXFunc"></a>Function type: setDocumentLocatorSAXFunc</h3><pre class="programlisting">Function type: setDocumentLocatorSAXFunc
+void setDocumentLocatorSAXFunc (void * ctx, <br /> <a href="libxml-tree.html#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a> loc)
+</pre><p>Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>loc</tt></i>:</span></td><td>A SAX Locator</td></tr></tbody></table></div><br />
+<h3><a name="startDocumentSAXFunc" id="startDocumentSAXFunc"></a>Function type: startDocumentSAXFunc</h3><pre class="programlisting">Function type: startDocumentSAXFunc
+void startDocumentSAXFunc (void * ctx)
+</pre><p>Called when the document start being processed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr></tbody></table></div><br />
+<h3><a name="startElementNsSAX2Func" id="startElementNsSAX2Func"></a>Function type: startElementNsSAX2Func</h3><pre class="programlisting">Function type: startElementNsSAX2Func
+void startElementNsSAX2Func (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> int nb_namespaces, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces, <br /> int nb_attributes, <br /> int nb_defaulted, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** attributes)
+</pre><p>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>localname</tt></i>:</span></td><td>the local name of the element</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix if available</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the element namespace name if available</td></tr><tr><td><span class="term"><i><tt>nb_namespaces</tt></i>:</span></td><td>number of namespace definitions on that node</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>pointer to the array of prefix/URI pairs namespace definitions</td></tr><tr><td><span class="term"><i><tt>nb_attributes</tt></i>:</span></td><td>the number of attributes on that node</td></tr><tr><td><span class="term"><i><tt>nb_defaulted</tt></i>:</span></td><td>the number of defaulted attributes. The defaulted ones are at the end of the array</td></tr><tr><td><span class="term"><i><tt>attributes</tt></i>:</span></td><td>pointer to the array of (localname/prefix/URI/value/end) <a href="libxml-SAX.html#attribute">attribute</a> values.</td></tr></tbody></table></div><br />
+<h3><a name="startElementSAXFunc" id="startElementSAXFunc"></a>Function type: startElementSAXFunc</h3><pre class="programlisting">Function type: startElementSAXFunc
+void startElementSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** atts)
+</pre><p>Called when an opening tag has been processed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The element name, including namespace prefix</td></tr><tr><td><span class="term"><i><tt>atts</tt></i>:</span></td><td>An array of name/value attributes pairs, NULL terminated</td></tr></tbody></table></div><br />
+<h3><a name="unparsedEntityDeclSAXFunc" id="unparsedEntityDeclSAXFunc"></a>Function type: unparsedEntityDeclSAXFunc</h3><pre class="programlisting">Function type: unparsedEntityDeclSAXFunc
+void unparsedEntityDeclSAXFunc (void * ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemId, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)
+</pre><p>What to do when an unparsed entity declaration is parsed.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the user data (XML parser context)</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>The name of the entity</td></tr><tr><td><span class="term"><i><tt>publicId</tt></i>:</span></td><td>The public ID of the entity</td></tr><tr><td><span class="term"><i><tt>systemId</tt></i>:</span></td><td>The system ID of the entity</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the name of the notation</td></tr></tbody></table></div><br />
+<h3><a name="warningSAXFunc" id="warningSAXFunc"></a>Function type: warningSAXFunc</h3><pre class="programlisting">Function type: warningSAXFunc
+void warningSAXFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Display and format a warning messages, callback.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><br />
+<h3><a name="xmlByteConsumed" id="xmlByteConsumed"></a>Function: xmlByteConsumed</h3><pre class="programlisting">long xmlByteConsumed (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the index in bytes from the beginning of the entity or -1 in case the index could not be computed.</td></tr></tbody></table></div><h3><a name="xmlCleanupParser" id="xmlCleanupParser"></a>Function: xmlCleanupParser</h3><pre class="programlisting">void xmlCleanupParser (void)<br />
+</pre><p>This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</p>
+<h3><a name="xmlClearNodeInfoSeq" id="xmlClearNodeInfoSeq"></a>Function: xmlClearNodeInfoSeq</h3><pre class="programlisting">void xmlClearNodeInfoSeq (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)<br />
+</pre><p>-- Clear (release memory and reinitialize) node info sequence</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div><h3><a name="xmlClearParserCtxt" id="xmlClearParserCtxt"></a>Function: xmlClearParserCtxt</h3><pre class="programlisting">void xmlClearParserCtxt (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Clear (release owned resources) and reinitialize a parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlCreateDocParserCtxt" id="xmlCreateDocParserCtxt"></a>Function: xmlCreateDocParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateDocParserCtxt (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)<br />
+</pre><p>Creates a parser context for an XML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCreateIOParserCtxt" id="xmlCreateIOParserCtxt"></a>Function: xmlCreateIOParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateIOParserCtxt (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a parser context for using the XML parser with an existing I/O stream</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCreatePushParserCtxt" id="xmlCreatePushParserCtxt"></a>Function: xmlCreatePushParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreatePushParserCtxt (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * chunk, <br /> int size, <br /> const char * filename)<br />
+</pre><p>Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining <a href="libxml-SAX.html#characters">characters</a> will be parsed so they don't need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCtxtReadDoc" id="xmlCtxtReadDoc"></a>Function: xmlCtxtReadDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadDoc (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlCtxtReadFd" id="xmlCtxtReadFd"></a>Function: xmlCtxtReadFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadFd (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlCtxtReadFile" id="xmlCtxtReadFile"></a>Function: xmlCtxtReadFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadFile (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlCtxtReadIO" id="xmlCtxtReadIO"></a>Function: xmlCtxtReadIO</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadIO (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlCtxtReadMemory" id="xmlCtxtReadMemory"></a>Function: xmlCtxtReadMemory</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCtxtReadMemory (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlCtxtReset" id="xmlCtxtReset"></a>Function: xmlCtxtReset</h3><pre class="programlisting">void xmlCtxtReset (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Reset a parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlCtxtResetPush" id="xmlCtxtResetPush"></a>Function: xmlCtxtResetPush</h3><pre class="programlisting">int xmlCtxtResetPush (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> const char * filename, <br /> const char * encoding)<br />
+</pre><p>Reset a push parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>a pointer to an array of chars</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>number of chars in the array</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>an optional file name or URI</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and 1 in case of error</td></tr></tbody></table></div><h3><a name="xmlCtxtUseOptions" id="xmlCtxtUseOptions"></a>Function: xmlCtxtUseOptions</h3><pre class="programlisting">int xmlCtxtUseOptions (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int options)<br />
+</pre><p>Applies the options to the parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, the set of unknown or unimplemented options in case of error.</td></tr></tbody></table></div><h3><a name="xmlExternalEntityLoader" id="xmlExternalEntityLoader"></a>Function type: xmlExternalEntityLoader</h3><pre class="programlisting">Function type: xmlExternalEntityLoader
+<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlExternalEntityLoader (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> context)
+</pre><p>External entity loaders types.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>The System ID of the resource requested</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>The Public ID of the resource requested</td></tr><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the entity input parser.</td></tr></tbody></table></div><br />
+<h3><a name="xmlFreeParserCtxt" id="xmlFreeParserCtxt"></a>Function: xmlFreeParserCtxt</h3><pre class="programlisting">void xmlFreeParserCtxt (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlGetExternalEntityLoader" id="xmlGetExternalEntityLoader"></a>Function: xmlGetExternalEntityLoader</h3><pre class="programlisting"><a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> xmlGetExternalEntityLoader (void)<br />
+</pre><p>Get the default external entity resolver function for the application</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> function pointer</td></tr></tbody></table></div><h3><a name="xmlGetFeature" id="xmlGetFeature"></a>Function: xmlGetFeature</h3><pre class="programlisting">int xmlGetFeature (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * name, <br /> void * result)<br />
+</pre><p>Read the current value of one feature of this parser instance</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML/HTML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the feature name</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>location to store the result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlGetFeaturesList" id="xmlGetFeaturesList"></a>Function: xmlGetFeaturesList</h3><pre class="programlisting">int xmlGetFeaturesList (int * len, <br /> const char ** result)<br />
+</pre><p>Copy at most *@len feature names into the @result array</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the features name array (input/output)</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>an array of string to be filled with the features name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, or the total number of features, len is updated with the number of strings copied, strings must not be deallocated</td></tr></tbody></table></div><h3><a name="xmlHasFeature" id="xmlHasFeature"></a>Function: xmlHasFeature</h3><pre class="programlisting">int xmlHasFeature (<a href="libxml-parser.html#xmlFeature">xmlFeature</a> feature)<br />
+</pre><p>Examines if the library has been compiled with a given feature.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>feature</tt></i>:</span></td><td>the feature to be examined</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise.</td></tr></tbody></table></div><h3><a name="xmlIOParseDTD" id="xmlIOParseDTD"></a>Function: xmlIOParseDTD</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlIOParseDTD (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Load and parse a DTD</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block or NULL</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an Input Buffer</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error. @input will be freed by the function in any case.</td></tr></tbody></table></div><h3><a name="xmlInitNodeInfoSeq" id="xmlInitNodeInfoSeq"></a>Function: xmlInitNodeInfoSeq</h3><pre class="programlisting">void xmlInitNodeInfoSeq (<a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq)<br />
+</pre><p>-- Initialize (set to initial state) node info sequence</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div><h3><a name="xmlInitParser" id="xmlInitParser"></a>Function: xmlInitParser</h3><pre class="programlisting">void xmlInitParser (void)<br />
+</pre><p>Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs.</p>
+<h3><a name="xmlInitParserCtxt" id="xmlInitParserCtxt"></a>Function: xmlInitParserCtxt</h3><pre class="programlisting">int xmlInitParserCtxt (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Initialize a parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlKeepBlanksDefault" id="xmlKeepBlanksDefault"></a>Function: xmlKeepBlanksDefault</h3><pre class="programlisting">int xmlKeepBlanksDefault (int val)<br />
+</pre><p>Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div><h3><a name="xmlLineNumbersDefault" id="xmlLineNumbersDefault"></a>Function: xmlLineNumbersDefault</h3><pre class="programlisting">int xmlLineNumbersDefault (int val)<br />
+</pre><p>Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div><h3><a name="xmlLoadExternalEntity" id="xmlLoadExternalEntity"></a>Function: xmlLoadExternalEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlLoadExternalEntity (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Load an external entity, note that the use of this function for unparsed entities may generate problems</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the Public ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context in which the entity is called or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> or NULL</td></tr></tbody></table></div><h3><a name="xmlNewIOInputStream" id="xmlNewIOInputStream"></a>Function: xmlNewIOInputStream</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewIOInputStream (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a new input stream structure encapsulating the @input into a stream suitable for the parser.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an I/O Input</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div><h3><a name="xmlNewParserCtxt" id="xmlNewParserCtxt"></a>Function: xmlNewParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlNewParserCtxt (void)<br />
+</pre><p>Allocate and initialize a new parser context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> or NULL</td></tr></tbody></table></div><h3><a name="xmlParseBalancedChunkMemory" id="xmlParseBalancedChunkMemory"></a>Function: xmlParseBalancedChunkMemory</h3><pre class="programlisting">int xmlParseBalancedChunkMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br />
+</pre><p>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the input string in UTF8 or ISO-Latin (zero terminated)</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div><h3><a name="xmlParseBalancedChunkMemoryRecover" id="xmlParseBalancedChunkMemoryRecover"></a>Function: xmlParseBalancedChunkMemoryRecover</h3><pre class="programlisting">int xmlParseBalancedChunkMemoryRecover (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst, <br /> int recover)<br />
+</pre><p>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the input string in UTF8 or ISO-Latin (zero terminated)</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>recover</tt></i>:</span></td><td>return nodes even if the data is broken (use 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent.</td></tr></tbody></table></div><h3><a name="xmlParseChunk" id="xmlParseChunk"></a>Function: xmlParseChunk</h3><pre class="programlisting">int xmlParseChunk (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * chunk, <br /> int size, <br /> int terminate)<br />
+</pre><p>Parse a Chunk of memory</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>chunk</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte of the chunk</td></tr><tr><td><span class="term"><i><tt>terminate</tt></i>:</span></td><td>last chunk indicator</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>zero if no error, the <a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a> otherwise.</td></tr></tbody></table></div><h3><a name="xmlParseCtxtExternalEntity" id="xmlParseCtxtExternalEntity"></a>Function: xmlParseCtxtExternalEntity</h3><pre class="programlisting">int xmlParseCtxtExternalEntity (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br />
+</pre><p>Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the existing parsing context</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div><h3><a name="xmlParseDTD" id="xmlParseDTD"></a>Function: xmlParseDTD</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlParseDTD (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Load and parse an external subset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>a NAME* containing the External ID of the DTD</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>a NAME* containing the URL to the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlParseDoc" id="xmlParseDoc"></a>Function: xmlParseDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)<br />
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlParseDocument" id="xmlParseDocument"></a>Function: xmlParseDocument</h3><pre class="programlisting">int xmlParseDocument (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div><h3><a name="xmlParseEntity" id="xmlParseEntity"></a>Function: xmlParseEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseEntity (const char * filename)<br />
+</pre><p>parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlParseExtParsedEnt" id="xmlParseExtParsedEnt"></a>Function: xmlParseExtParsedEnt</h3><pre class="programlisting">int xmlParseExtParsedEnt (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0, -1 in case of error. the parser context is augmented as a result of the parsing.</td></tr></tbody></table></div><h3><a name="xmlParseExternalEntity" id="xmlParseExternalEntity"></a>Function: xmlParseExternalEntity</h3><pre class="programlisting">int xmlParseExternalEntity (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> int depth, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br />
+</pre><p>Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the chunk pertains to</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler bloc (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks (possibly NULL)</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>Used for loop detection, use 0</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise</td></tr></tbody></table></div><h3><a name="xmlParseFile" id="xmlParseFile"></a>Function: xmlParseFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseFile (const char * filename)<br />
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree if the file was wellformed, NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlParseInNodeContext" id="xmlParseInNodeContext"></a>Function: xmlParseInNodeContext</h3><pre class="programlisting"><a href="libxml-xmlerror.html#xmlParserErrors">xmlParserErrors</a> xmlParseInNodeContext (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const char * data, <br /> int datalen, <br /> int options, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * lst)<br />
+</pre><p>Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node. The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the context node</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>datalen</tt></i>:</span></td><td>the input string length in bytes</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>lst</tt></i>:</span></td><td>the return value for the set of parsed nodes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td><a href="libxml-xmlerror.html#XML_ERR_OK">XML_ERR_OK</a> if the chunk is well balanced, and the parser error code otherwise</td></tr></tbody></table></div><h3><a name="xmlParseMemory" id="xmlParseMemory"></a>Function: xmlParseMemory</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlParseMemory (const char * buffer, <br /> int size)<br />
+</pre><p>parse an XML in-memory block and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlParserAddNodeInfo" id="xmlParserAddNodeInfo"></a>Function: xmlParserAddNodeInfo</h3><pre class="programlisting">void xmlParserAddNodeInfo (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-parser.html#xmlParserNodeInfoPtr">xmlParserNodeInfoPtr</a> info)<br />
+</pre><p>Insert node info record into the sorted sequence</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>a node info sequence pointer</td></tr></tbody></table></div><h3><a name="xmlParserFindNodeInfo" id="xmlParserFindNodeInfo"></a>Function: xmlParserFindNodeInfo</h3><pre class="programlisting">const <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * xmlParserFindNodeInfo (const <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctx, <br /> const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Find the parser node info struct for a given node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an XML node within the tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> block pointer or NULL</td></tr></tbody></table></div><h3><a name="xmlParserFindNodeInfoIndex" id="xmlParserFindNodeInfoIndex"></a>Function: xmlParserFindNodeInfoIndex</h3><pre class="programlisting">unsigned long xmlParserFindNodeInfoIndex (const <a href="libxml-parser.html#xmlParserNodeInfoSeqPtr">xmlParserNodeInfoSeqPtr</a> seq, <br /> const <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p><a href="libxml-parser.html#xmlParserFindNodeInfoIndex">xmlParserFindNodeInfoIndex</a> : Find the index that the info record for the given node is or should be at in a sorted sequence</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>seq</tt></i>:</span></td><td>a node info sequence pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>an XML node pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a long indicating the position of the record</td></tr></tbody></table></div><h3><a name="xmlParserInputDeallocate" id="xmlParserInputDeallocate"></a>Function type: xmlParserInputDeallocate</h3><pre class="programlisting">Function type: xmlParserInputDeallocate
+void xmlParserInputDeallocate (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)
+</pre><p>Callback for freeing some parser input allocations.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to deallocate</td></tr></tbody></table></div><br />
+<h3><a name="xmlParserInputGrow" id="xmlParserInputGrow"></a>Function: xmlParserInputGrow</h3><pre class="programlisting">int xmlParserInputGrow (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br /> int len)<br />
+</pre><p>This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an indicative size for the lookahead</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the amount of char read, or -1 in case of error, 0 indicate the end of this entity</td></tr></tbody></table></div><h3><a name="xmlParserInputRead" id="xmlParserInputRead"></a>Function: xmlParserInputRead</h3><pre class="programlisting">int xmlParserInputRead (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in, <br /> int len)<br />
+</pre><p>This function was internal and is deprecated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an indicative size for the lookahead</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 as this is an error to use it.</td></tr></tbody></table></div><h3><a name="xmlPedanticParserDefault" id="xmlPedanticParserDefault"></a>Function: xmlPedanticParserDefault</h3><pre class="programlisting">int xmlPedanticParserDefault (int val)<br />
+</pre><p>Set and return the previous value for enabling pedantic warnings.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div><h3><a name="xmlReadDoc" id="xmlReadDoc"></a>Function: xmlReadDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlReadFd" id="xmlReadFd"></a>Function: xmlReadFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadFd (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlReadFile" id="xmlReadFile"></a>Function: xmlReadFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadFile (const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlReadIO" id="xmlReadIO"></a>Function: xmlReadIO</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadIO (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML document from I/O functions and source and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlReadMemory" id="xmlReadMemory"></a>Function: xmlReadMemory</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlReadMemory (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML in-memory document and build a tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlRecoverDoc" id="xmlRecoverDoc"></a>Function: xmlRecoverDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)<br />
+</pre><p>parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of failure</td></tr></tbody></table></div><h3><a name="xmlRecoverFile" id="xmlRecoverFile"></a>Function: xmlRecoverFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverFile (const char * filename)<br />
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of failure</td></tr></tbody></table></div><h3><a name="xmlRecoverMemory" id="xmlRecoverMemory"></a>Function: xmlRecoverMemory</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlRecoverMemory (const char * buffer, <br /> int size)<br />
+</pre><p>parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSAXParseDTD" id="xmlSAXParseDTD"></a>Function: xmlSAXParseDTD</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlSAXParseDTD (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Load and parse an external subset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>a NAME* containing the External ID of the DTD</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>a NAME* containing the URL to the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSAXParseDoc" id="xmlSAXParseDoc"></a>Function: xmlSAXParseDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseDoc (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int recovery)<br />
+</pre><p>parse an XML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXParseEntity" id="xmlSAXParseEntity"></a>Function: xmlSAXParseEntity</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseEntity (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename)<br />
+</pre><p>parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXParseFile" id="xmlSAXParseFile"></a>Function: xmlSAXParseFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseFile (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename, <br /> int recovery)<br />
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXParseFileWithData" id="xmlSAXParseFileWithData"></a>Function: xmlSAXParseFileWithData</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseFileWithData (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * filename, <br /> int recovery, <br /> void * data)<br />
+</pre><p>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXParseMemory" id="xmlSAXParseMemory"></a>Function: xmlSAXParseMemory</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseMemory (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * buffer, <br /> int size, <br /> int recovery)<br />
+</pre><p>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read not Well Formed documents</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXParseMemoryWithData" id="xmlSAXParseMemoryWithData"></a>Function: xmlSAXParseMemoryWithData</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlSAXParseMemoryWithData (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> const char * buffer, <br /> int size, <br /> int recovery, <br /> void * data)<br />
+</pre><p>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context's _private member, so it is available nearly everywhere in libxml</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>the SAX handler block</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>recovery</tt></i>:</span></td><td>work in recovery mode, i.e. tries to read no Well Formed documents</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the userdata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting document tree</td></tr></tbody></table></div><h3><a name="xmlSAXUserParseFile" id="xmlSAXUserParseFile"></a>Function: xmlSAXUserParseFile</h3><pre class="programlisting">int xmlSAXUserParseFile (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * filename)<br />
+</pre><p>parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or a error number otherwise</td></tr></tbody></table></div><h3><a name="xmlSAXUserParseMemory" id="xmlSAXUserParseMemory"></a>Function: xmlSAXUserParseMemory</h3><pre class="programlisting">int xmlSAXUserParseMemory (<a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data, <br /> const char * buffer, <br /> int size)<br />
+</pre><p>A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>The user data returned on SAX callbacks</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an in-memory XML document input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the XML document in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or a error number otherwise</td></tr></tbody></table></div><h3><a name="xmlSetExternalEntityLoader" id="xmlSetExternalEntityLoader"></a>Function: xmlSetExternalEntityLoader</h3><pre class="programlisting">void xmlSetExternalEntityLoader (<a href="libxml-parser.html#xmlExternalEntityLoader">xmlExternalEntityLoader</a> f)<br />
+</pre><p>Changes the defaultexternal entity resolver function for the application</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the new entity resolver function</td></tr></tbody></table></div><h3><a name="xmlSetFeature" id="xmlSetFeature"></a>Function: xmlSetFeature</h3><pre class="programlisting">int xmlSetFeature (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * name, <br /> void * value)<br />
+</pre><p>Change the current value of one feature of this parser instance</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML/HTML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the feature name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>pointer to the location of the new value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case or error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSetupParserForBuffer" id="xmlSetupParserForBuffer"></a>Function: xmlSetupParserForBuffer</h3><pre class="programlisting">void xmlSetupParserForBuffer (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buffer, <br /> const char * filename)<br />
+</pre><p>Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buffer</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name</td></tr></tbody></table></div><h3><a name="xmlStopParser" id="xmlStopParser"></a>Function: xmlStopParser</h3><pre class="programlisting">void xmlStopParser (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Blocks further parser processing</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlSubstituteEntitiesDefault" id="xmlSubstituteEntitiesDefault"></a>Function: xmlSubstituteEntitiesDefault</h3><pre class="programlisting">int xmlSubstituteEntitiesDefault (int val)<br />
+</pre><p>Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>int 0 or 1</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last value for 0 for no substitution, 1 for substitution.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-parserInternals.html b/doc/html/libxml-parserInternals.html
new file mode 100644
index 0000000..4d1292b
--- /dev/null
+++ b/doc/html/libxml-parserInternals.html
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module parserInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module parserInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-parser.html">parser</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-pattern.html">pattern</a></th><td><a accesskey="n" href="libxml-pattern.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#INPUT_CHUNK">INPUT_CHUNK</a></pre><pre class="programlisting">#define <a href="#IS_ASCII_DIGIT">IS_ASCII_DIGIT</a></pre><pre class="programlisting">#define <a href="#IS_ASCII_LETTER">IS_ASCII_LETTER</a></pre><pre class="programlisting">#define <a href="#IS_BASECHAR">IS_BASECHAR</a></pre><pre class="programlisting">#define <a href="#IS_BLANK">IS_BLANK</a></pre><pre class="programlisting">#define <a href="#IS_BLANK_CH">IS_BLANK_CH</a></pre><pre class="programlisting">#define <a href="#IS_BYTE_CHAR">IS_BYTE_CHAR</a></pre><pre class="programlisting">#define <a href="#IS_CHAR">IS_CHAR</a></pre><pre class="programlisting">#define <a href="#IS_CHAR_CH">IS_CHAR_CH</a></pre><pre class="programlisting">#define <a href="#IS_COMBINING">IS_COMBINING</a></pre><pre class="programlisting">#define <a href="#IS_COMBINING_CH">IS_COMBINING_CH</a></pre><pre class="programlisting">#define <a href="#IS_DIGIT">IS_DIGIT</a></pre><pre class="programlisting">#define <a href="#IS_DIGIT_CH">IS_DIGIT_CH</a></pre><pre class="programlisting">#define <a href="#IS_EXTENDER">IS_EXTENDER</a></pre><pre class="programlisting">#define <a href="#IS_EXTENDER_CH">IS_EXTENDER_CH</a></pre><pre class="programlisting">#define <a href="#IS_IDEOGRAPHIC">IS_IDEOGRAPHIC</a></pre><pre class="programlisting">#define <a href="#IS_LETTER">IS_LETTER</a></pre><pre class="programlisting">#define <a href="#IS_LETTER_CH">IS_LETTER_CH</a></pre><pre class="programlisting">#define <a href="#IS_PUBIDCHAR">IS_PUBIDCHAR</a></pre><pre class="programlisting">#define <a href="#IS_PUBIDCHAR_CH">IS_PUBIDCHAR_CH</a></pre><pre class="programlisting">#define <a href="#MOVETO_ENDTAG">MOVETO_ENDTAG</a></pre><pre class="programlisting">#define <a href="#MOVETO_STARTTAG">MOVETO_STARTTAG</a></pre><pre class="programlisting">#define <a href="#SKIP_EOL">SKIP_EOL</a></pre><pre class="programlisting">#define <a href="#XML_MAX_DICTIONARY_LIMIT">XML_MAX_DICTIONARY_LIMIT</a></pre><pre class="programlisting">#define <a href="#XML_MAX_LOOKUP_LIMIT">XML_MAX_LOOKUP_LIMIT</a></pre><pre class="programlisting">#define <a href="#XML_MAX_NAMELEN">XML_MAX_NAMELEN</a></pre><pre class="programlisting">#define <a href="#XML_MAX_NAME_LENGTH">XML_MAX_NAME_LENGTH</a></pre><pre class="programlisting">#define <a href="#XML_MAX_TEXT_LENGTH">XML_MAX_TEXT_LENGTH</a></pre><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_BOTH">XML_SUBSTITUTE_BOTH</a></pre><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_NONE">XML_SUBSTITUTE_NONE</a></pre><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></pre><pre class="programlisting">#define <a href="#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a></pre><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> <a href="#htmlCreateFileParserCtxt">htmlCreateFileParserCtxt</a> (const char * filename, <br /> const char * encoding)</pre>
+<pre class="programlisting">void <a href="#htmlInitAutoClose">htmlInitAutoClose</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#inputPop">inputPop</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#inputPush">inputPush</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> value)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#namePop">namePop</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#namePush">namePush</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#nodePop">nodePop</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#nodePush">nodePush</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> value)</pre>
+<pre class="programlisting">int <a href="#xmlCheckLanguageID">xmlCheckLanguageID</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * lang)</pre>
+<pre class="programlisting">int <a href="#xmlCopyChar">xmlCopyChar</a> (int len, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * out, <br /> int val)</pre>
+<pre class="programlisting">int <a href="#xmlCopyCharMultiByte">xmlCopyCharMultiByte</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * out, <br /> int val)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateEntityParserCtxt">xmlCreateEntityParserCtxt</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateFileParserCtxt">xmlCreateFileParserCtxt</a> (const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateMemoryParserCtxt">xmlCreateMemoryParserCtxt</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlCreateURLParserCtxt">xmlCreateURLParserCtxt</a> (const char * filename, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlCurrentChar">xmlCurrentChar</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int * len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlDecodeEntities">xmlDecodeEntities</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int len, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)</pre>
+<pre class="programlisting">Function type: <a href="#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a>
+void <a href="#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> (<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> firstNode, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> lastNode)
+</pre>
+<pre class="programlisting">void <a href="#xmlErrMemory">xmlErrMemory</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * extra)</pre>
+<pre class="programlisting">void <a href="#xmlFreeInputStream">xmlFreeInputStream</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)</pre>
+<pre class="programlisting">void <a href="#xmlHandleEntity">xmlHandleEntity</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)</pre>
+<pre class="programlisting">int <a href="#xmlIsLetter">xmlIsLetter</a> (int c)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseNCName">xmlNamespaceParseNCName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNamespaceParseQName">xmlNamespaceParseQName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewEntityInputStream">xmlNewEntityInputStream</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewInputFromFile">xmlNewInputFromFile</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewInputStream">xmlNewInputStream</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNewStringInputStream">xmlNewStringInputStream</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buffer)</pre>
+<pre class="programlisting">void <a href="#xmlNextChar">xmlNextChar</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseAttValue">xmlParseAttValue</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseAttribute">xmlParseAttribute</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** value)</pre>
+<pre class="programlisting">void <a href="#xmlParseAttributeListDecl">xmlParseAttributeListDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlParseAttributeType">xmlParseAttributeType</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)</pre>
+<pre class="programlisting">void <a href="#xmlParseCDSect">xmlParseCDSect</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseCharData">xmlParseCharData</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int cdata)</pre>
+<pre class="programlisting">int <a href="#xmlParseCharRef">xmlParseCharRef</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseComment">xmlParseComment</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseContent">xmlParseContent</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlParseDefaultDecl">xmlParseDefaultDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** value)</pre>
+<pre class="programlisting">void <a href="#xmlParseDocTypeDecl">xmlParseDocTypeDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseElement">xmlParseElement</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlParseElementChildrenContentDecl">xmlParseElementChildrenContentDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int inputchk)</pre>
+<pre class="programlisting">int <a href="#xmlParseElementContentDecl">xmlParseElementContentDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> * result)</pre>
+<pre class="programlisting">int <a href="#xmlParseElementDecl">xmlParseElementDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlParseElementMixedContentDecl">xmlParseElementMixedContentDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int inputchk)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEncName">xmlParseEncName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEncodingDecl">xmlParseEncodingDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseEndTag">xmlParseEndTag</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseEntityDecl">xmlParseEntityDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> <a href="#xmlParseEntityRef">xmlParseEntityRef</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseEntityValue">xmlParseEntityValue</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** orig)</pre>
+<pre class="programlisting">int <a href="#xmlParseEnumeratedType">xmlParseEnumeratedType</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlParseEnumerationType">xmlParseEnumerationType</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseExternalID">xmlParseExternalID</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** publicID, <br /> int strict)</pre>
+<pre class="programlisting">void <a href="#xmlParseExternalSubset">xmlParseExternalSubset</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting">void <a href="#xmlParseMarkupDecl">xmlParseMarkupDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseMisc">xmlParseMisc</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseName">xmlParseName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseNamespace">xmlParseNamespace</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseNmtoken">xmlParseNmtoken</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseNotationDecl">xmlParseNotationDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlParseNotationType">xmlParseNotationType</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParsePEReference">xmlParsePEReference</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParsePI">xmlParsePI</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParsePITarget">xmlParsePITarget</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParsePubidLiteral">xmlParsePubidLiteral</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseQuotedString">xmlParseQuotedString</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseReference">xmlParseReference</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlParseSDDecl">xmlParseSDDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseStartTag">xmlParseStartTag</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseSystemLiteral">xmlParseSystemLiteral</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseTextDecl">xmlParseTextDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseVersionInfo">xmlParseVersionInfo</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlParseVersionNum">xmlParseVersionNum</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParseXMLDecl">xmlParseXMLDecl</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParserHandlePEReference">xmlParserHandlePEReference</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParserHandleReference">xmlParserHandleReference</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlParserInputShrink">xmlParserInputShrink</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> <a href="#xmlPopInput">xmlPopInput</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlPushInput">xmlPushInput</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlScanName">xmlScanName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a> (<a href="libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> func)</pre>
+<pre class="programlisting">int <a href="#xmlSkipBlankChars">xmlSkipBlankChars</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName">xmlSplitQName</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)</pre>
+<pre class="programlisting">int <a href="#xmlStringCurrentChar">xmlStringCurrentChar</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int * len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStringDecodeEntities">xmlStringDecodeEntities</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStringLenDecodeEntities">xmlStringLenDecodeEntities</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)</pre>
+<pre class="programlisting">int <a href="#xmlSwitchEncoding">xmlSwitchEncoding</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">int <a href="#xmlSwitchInputEncoding">xmlSwitchInputEncoding</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)</pre>
+<pre class="programlisting">int <a href="#xmlSwitchToEncoding">xmlSwitchToEncoding</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)</pre>
+<h2>Description</h2>
+<h3><a name="INPUT_CHUNK" id="INPUT_CHUNK"></a>Macro: INPUT_CHUNK</h3><pre>#define INPUT_CHUNK</pre><p>The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.</p>
+<h3><a name="IS_ASCII_DIGIT" id="IS_ASCII_DIGIT"></a>Macro: IS_ASCII_DIGIT</h3><pre>#define IS_ASCII_DIGIT</pre><p>Macro to check [0-9]</p>
+<h3><a name="IS_ASCII_LETTER" id="IS_ASCII_LETTER"></a>Macro: IS_ASCII_LETTER</h3><pre>#define IS_ASCII_LETTER</pre><p>Macro to check [a-zA-Z]</p>
+<h3><a name="IS_BASECHAR" id="IS_BASECHAR"></a>Macro: IS_BASECHAR</h3><pre>#define IS_BASECHAR</pre><p>Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ...</p>
+<h3><a name="IS_BLANK" id="IS_BLANK"></a>Macro: IS_BLANK</h3><pre>#define IS_BLANK</pre><p>Macro to check the following production in the XML spec: [3] S ::= (#x20 | #x9 | #xD | #xA)+</p>
+<h3><a name="IS_BLANK_CH" id="IS_BLANK_CH"></a>Macro: IS_BLANK_CH</h3><pre>#define IS_BLANK_CH</pre><p>Behaviour same as <a href="libxml-parserInternals.html#IS_BLANK">IS_BLANK</a></p>
+<h3><a name="IS_BYTE_CHAR" id="IS_BYTE_CHAR"></a>Macro: IS_BYTE_CHAR</h3><pre>#define IS_BYTE_CHAR</pre><p>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range</p>
+<h3><a name="IS_CHAR" id="IS_CHAR"></a>Macro: IS_CHAR</h3><pre>#define IS_CHAR</pre><p>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.</p>
+<h3><a name="IS_CHAR_CH" id="IS_CHAR_CH"></a>Macro: IS_CHAR_CH</h3><pre>#define IS_CHAR_CH</pre><p>Behaves like <a href="libxml-parserInternals.html#IS_CHAR">IS_CHAR</a> on single-byte value</p>
+<h3><a name="IS_COMBINING" id="IS_COMBINING"></a>Macro: IS_COMBINING</h3><pre>#define IS_COMBINING</pre><p>Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ...</p>
+<h3><a name="IS_COMBINING_CH" id="IS_COMBINING_CH"></a>Macro: IS_COMBINING_CH</h3><pre>#define IS_COMBINING_CH</pre><p>Always false (all combining chars &gt; 0xff)</p>
+<h3><a name="IS_DIGIT" id="IS_DIGIT"></a>Macro: IS_DIGIT</h3><pre>#define IS_DIGIT</pre><p>Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ...</p>
+<h3><a name="IS_DIGIT_CH" id="IS_DIGIT_CH"></a>Macro: IS_DIGIT_CH</h3><pre>#define IS_DIGIT_CH</pre><p>Behaves like <a href="libxml-parserInternals.html#IS_DIGIT">IS_DIGIT</a> but with a single byte argument</p>
+<h3><a name="IS_EXTENDER" id="IS_EXTENDER"></a>Macro: IS_EXTENDER</h3><pre>#define IS_EXTENDER</pre><p>Macro to check the following production in the XML spec: [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]</p>
+<h3><a name="IS_EXTENDER_CH" id="IS_EXTENDER_CH"></a>Macro: IS_EXTENDER_CH</h3><pre>#define IS_EXTENDER_CH</pre><p>Behaves like <a href="libxml-parserInternals.html#IS_EXTENDER">IS_EXTENDER</a> but with a single-byte argument</p>
+<h3><a name="IS_IDEOGRAPHIC" id="IS_IDEOGRAPHIC"></a>Macro: IS_IDEOGRAPHIC</h3><pre>#define IS_IDEOGRAPHIC</pre><p>Macro to check the following production in the XML spec: [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]</p>
+<h3><a name="IS_LETTER" id="IS_LETTER"></a>Macro: IS_LETTER</h3><pre>#define IS_LETTER</pre><p>Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic</p>
+<h3><a name="IS_LETTER_CH" id="IS_LETTER_CH"></a>Macro: IS_LETTER_CH</h3><pre>#define IS_LETTER_CH</pre><p>Macro behaves like IS_LETTER, but only check base chars</p>
+<h3><a name="IS_PUBIDCHAR" id="IS_PUBIDCHAR"></a>Macro: IS_PUBIDCHAR</h3><pre>#define IS_PUBIDCHAR</pre><p>Macro to check the following production in the XML spec: [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]</p>
+<h3><a name="IS_PUBIDCHAR_CH" id="IS_PUBIDCHAR_CH"></a>Macro: IS_PUBIDCHAR_CH</h3><pre>#define IS_PUBIDCHAR_CH</pre><p>Same as <a href="libxml-parserInternals.html#IS_PUBIDCHAR">IS_PUBIDCHAR</a> but for single-byte value</p>
+<h3><a name="MOVETO_ENDTAG" id="MOVETO_ENDTAG"></a>Macro: MOVETO_ENDTAG</h3><pre>#define MOVETO_ENDTAG</pre><p>Skips to the next '&gt;' char.</p>
+<h3><a name="MOVETO_STARTTAG" id="MOVETO_STARTTAG"></a>Macro: MOVETO_STARTTAG</h3><pre>#define MOVETO_STARTTAG</pre><p>Skips to the next '&lt;' char.</p>
+<h3><a name="SKIP_EOL" id="SKIP_EOL"></a>Macro: SKIP_EOL</h3><pre>#define SKIP_EOL</pre><p>Skips the end of line chars.</p>
+<h3><a name="XML_MAX_DICTIONARY_LIMIT" id="XML_MAX_DICTIONARY_LIMIT"></a>Macro: XML_MAX_DICTIONARY_LIMIT</h3><pre>#define XML_MAX_DICTIONARY_LIMIT</pre><p>Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use <a href="libxml-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Introduced in 2.9.0</p>
+<h3><a name="XML_MAX_LOOKUP_LIMIT" id="XML_MAX_LOOKUP_LIMIT"></a>Macro: XML_MAX_LOOKUP_LIMIT</h3><pre>#define XML_MAX_LOOKUP_LIMIT</pre><p>Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on "unfriendly' content Introduced in 2.9.0</p>
+<h3><a name="XML_MAX_NAMELEN" id="XML_MAX_NAMELEN"></a>Macro: XML_MAX_NAMELEN</h3><pre>#define XML_MAX_NAMELEN</pre><p>Identifiers can be longer, but this will be more costly at runtime.</p>
+<h3><a name="XML_MAX_NAME_LENGTH" id="XML_MAX_NAME_LENGTH"></a>Macro: XML_MAX_NAME_LENGTH</h3><pre>#define XML_MAX_NAME_LENGTH</pre><p>Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use <a href="libxml-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of "unfriendly' content Introduced in 2.9.0</p>
+<h3><a name="XML_MAX_TEXT_LENGTH" id="XML_MAX_TEXT_LENGTH"></a>Macro: XML_MAX_TEXT_LENGTH</h3><pre>#define XML_MAX_TEXT_LENGTH</pre><p>Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use <a href="libxml-parser.html#XML_PARSE_HUGE">XML_PARSE_HUGE</a> option to override it. Introduced in 2.9.0</p>
+<h3><a name="XML_SUBSTITUTE_BOTH" id="XML_SUBSTITUTE_BOTH"></a>Macro: XML_SUBSTITUTE_BOTH</h3><pre>#define XML_SUBSTITUTE_BOTH</pre><p>Both general and parameter entities need to be substituted.</p>
+<h3><a name="XML_SUBSTITUTE_NONE" id="XML_SUBSTITUTE_NONE"></a>Macro: XML_SUBSTITUTE_NONE</h3><pre>#define XML_SUBSTITUTE_NONE</pre><p>If no entities need to be substituted.</p>
+<h3><a name="XML_SUBSTITUTE_PEREF" id="XML_SUBSTITUTE_PEREF"></a>Macro: XML_SUBSTITUTE_PEREF</h3><pre>#define XML_SUBSTITUTE_PEREF</pre><p>Whether parameter entities need to be substituted.</p>
+<h3><a name="XML_SUBSTITUTE_REF" id="XML_SUBSTITUTE_REF"></a>Macro: XML_SUBSTITUTE_REF</h3><pre>#define XML_SUBSTITUTE_REF</pre><p>Whether general entities need to be substituted.</p>
+<h3><a name="htmlCreateFileParserCtxt" id="htmlCreateFileParserCtxt"></a>Function: htmlCreateFileParserCtxt</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlParserCtxtPtr">htmlParserCtxtPtr</a> htmlCreateFileParserCtxt (const char * filename, <br /> const char * encoding)<br />
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>a free form C string describing the HTML document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="htmlInitAutoClose" id="htmlInitAutoClose"></a>Function: htmlInitAutoClose</h3><pre class="programlisting">void htmlInitAutoClose (void)<br />
+</pre><p>Initialize the htmlStartCloseIndex for fast lookup of closing tags names. This is not reentrant. Call xmlInitParser() once before processing in case of use in multithreaded programs.</p>
+<h3><a name="inputPop" id="inputPop"></a>Function: inputPop</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> inputPop (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Pops the top parser input from the input stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the input just removed</td></tr></tbody></table></div><h3><a name="inputPush" id="inputPush"></a>Function: inputPush</h3><pre class="programlisting">int inputPush (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> value)<br />
+</pre><p>Pushes a new parser input on top of the input stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the parser input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div><h3><a name="namePop" id="namePop"></a>Function: namePop</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namePop (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Pops the top element name from the name stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the name just removed</td></tr></tbody></table></div><h3><a name="namePush" id="namePush"></a>Function: namePush</h3><pre class="programlisting">int namePush (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Pushes a new element name on top of the name stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div><h3><a name="nodePop" id="nodePop"></a>Function: nodePop</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> nodePop (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Pops the top element node from the node stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node just removed</td></tr></tbody></table></div><h3><a name="nodePush" id="nodePush"></a>Function: nodePush</h3><pre class="programlisting">int nodePush (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> value)<br />
+</pre><p>Pushes a new element node on top of the node stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, the index in the stack otherwise</td></tr></tbody></table></div><h3><a name="xmlCheckLanguageID" id="xmlCheckLanguageID"></a>Function: xmlCheckLanguageID</h3><pre class="programlisting">int xmlCheckLanguageID (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * lang)<br />
+</pre><p>Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The current REC <a href="libxml-SAX.html#reference">reference</a> the sucessors of RFC 1766, currently 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO 15924 code region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum) extension = singleton 1*("-" (2*8alphanum)) ; Single alphanumerics ; "x" reserved for private use singleton = DIGIT ; 0 - 9 / %x41-57 ; A - W / %x59-5A ; Y - Z / %x61-77 ; a - w / %x79-7A ; y - z it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn't try to cope with extension or privateuse that could be added but that's not interoperable anyway</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>lang</tt></i>:</span></td><td>pointer to the string value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if correct 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlCopyChar" id="xmlCopyChar"></a>Function: xmlCopyChar</h3><pre class="programlisting">int xmlCopyChar (int len, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * out, <br /> int val)<br />
+</pre><p>append the char value in the array</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>Ignored, compatibility</td></tr><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> written</td></tr></tbody></table></div><h3><a name="xmlCopyCharMultiByte" id="xmlCopyCharMultiByte"></a>Function: xmlCopyCharMultiByte</h3><pre class="programlisting">int xmlCopyCharMultiByte (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * out, <br /> int val)<br />
+</pre><p>append the char value in the array</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>pointer to an array of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a></td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> written</td></tr></tbody></table></div><h3><a name="xmlCreateEntityParserCtxt" id="xmlCreateEntityParserCtxt"></a>Function: xmlCreateEntityParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateEntityParserCtxt (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)<br />
+</pre><p>Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the entity URL</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the entity PUBLIC ID</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>a possible base for the target URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCreateFileParserCtxt" id="xmlCreateFileParserCtxt"></a>Function: xmlCreateFileParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateFileParserCtxt (const char * filename)<br />
+</pre><p>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCreateMemoryParserCtxt" id="xmlCreateMemoryParserCtxt"></a>Function: xmlCreateMemoryParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateMemoryParserCtxt (const char * buffer, <br /> int size)<br />
+</pre><p>Create a parser context for an XML in-memory document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCreateURLParserCtxt" id="xmlCreateURLParserCtxt"></a>Function: xmlCreateURLParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlCreateURLParserCtxt (const char * filename, <br /> int options)<br />
+</pre><p>Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser context or NULL</td></tr></tbody></table></div><h3><a name="xmlCurrentChar" id="xmlCurrentChar"></a>Function: xmlCurrentChar</h3><pre class="programlisting">int xmlCurrentChar (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int * len)<br />
+</pre><p>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence "#xD#xA" or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the char read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current char value and its length</td></tr></tbody></table></div><h3><a name="xmlDecodeEntities" id="xmlDecodeEntities"></a>Function: xmlDecodeEntities</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlDecodeEntities (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int len, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)<br />
+</pre><p>This function is deprecated, we now always process entities content through <a href="libxml-parserInternals.html#xmlStringDecodeEntities">xmlStringDecodeEntities</a> TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len to decode (in bytes !), -1 for no size limit</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div><h3><a name="xmlEntityReferenceFunc" id="xmlEntityReferenceFunc"></a>Function type: xmlEntityReferenceFunc</h3><pre class="programlisting">Function type: xmlEntityReferenceFunc
+void xmlEntityReferenceFunc (<a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> ent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> firstNode, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> lastNode)
+</pre><p>Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ent</tt></i>:</span></td><td>the entity</td></tr><tr><td><span class="term"><i><tt>firstNode</tt></i>:</span></td><td>the fist node in the chunk</td></tr><tr><td><span class="term"><i><tt>lastNode</tt></i>:</span></td><td>the last nod in the chunk</td></tr></tbody></table></div><br />
+<h3><a name="xmlErrMemory" id="xmlErrMemory"></a>Function: xmlErrMemory</h3><pre class="programlisting">void xmlErrMemory (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * extra)<br />
+</pre><p>Handle a redefinition of <a href="libxml-SAX.html#attribute">attribute</a> error</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>extra</tt></i>:</span></td><td>extra informations</td></tr></tbody></table></div><h3><a name="xmlFreeInputStream" id="xmlFreeInputStream"></a>Function: xmlFreeInputStream</h3><pre class="programlisting">void xmlFreeInputStream (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br />
+</pre><p>Free up an input stream.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a></td></tr></tbody></table></div><h3><a name="xmlHandleEntity" id="xmlHandleEntity"></a>Function: xmlHandleEntity</h3><pre class="programlisting">void xmlHandleEntity (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)<br />
+</pre><p>Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>entity</tt></i>:</span></td><td>an XML entity pointer.</td></tr></tbody></table></div><h3><a name="xmlIsLetter" id="xmlIsLetter"></a>Function: xmlIsLetter</h3><pre class="programlisting">int xmlIsLetter (int c)<br />
+</pre><p>Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>an unicode character (int)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if not, non-zero otherwise</td></tr></tbody></table></div><h3><a name="xmlNamespaceParseNCName" id="xmlNamespaceParseNCName"></a>Function: xmlNamespaceParseNCName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseNCName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div><h3><a name="xmlNamespaceParseNSDef" id="xmlNamespaceParseNSDef"></a>Function: xmlNamespaceParseNSDef</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseNSDef (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name</td></tr></tbody></table></div><h3><a name="xmlNamespaceParseQName" id="xmlNamespaceParseQName"></a>Function: xmlNamespaceParseQName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNamespaceParseQName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br />
+</pre><p>TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div><h3><a name="xmlNewEntityInputStream" id="xmlNewEntityInputStream"></a>Function: xmlNewEntityInputStream</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewEntityInputStream (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity)<br />
+</pre><p>Create a new input stream based on an <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>entity</tt></i>:</span></td><td>an Entity pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div><h3><a name="xmlNewInputFromFile" id="xmlNewInputFromFile"></a>Function: xmlNewInputFromFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewInputFromFile (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const char * filename)<br />
+</pre><p>Create a new input stream based on a file or an URL.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename to use as entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewInputStream" id="xmlNewInputStream"></a>Function: xmlNewInputStream</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewInputStream (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Create a new input stream structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream or NULL</td></tr></tbody></table></div><h3><a name="xmlNewStringInputStream" id="xmlNewStringInputStream"></a>Function: xmlNewStringInputStream</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNewStringInputStream (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buffer)<br />
+</pre><p>Create a new input stream based on a memory buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>an memory buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new input stream</td></tr></tbody></table></div><h3><a name="xmlNextChar" id="xmlNextChar"></a>Function: xmlNextChar</h3><pre class="programlisting">void xmlNextChar (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Skip to the next char input char.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseAttValue" id="xmlParseAttValue"></a>Function: xmlParseAttValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseAttValue (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a value for an <a href="libxml-SAX.html#attribute">attribute</a> Note: the parser won't do substitution of entities here, this will be handled later in <a href="libxml-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a> [10] AttValue ::= '"' ([^&lt;&amp;"] | Reference)* '"' | "'" ([^&lt;&amp;'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an <a href="libxml-SAX.html#attribute">attribute</a> is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character <a href="libxml-SAX.html#reference">reference</a> is processed by appending the referenced character to the <a href="libxml-SAX.html#attribute">attribute</a> value - an entity <a href="libxml-SAX.html#reference">reference</a> is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other <a href="libxml-SAX.html#characters">characters</a> are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the AttValue parsed or NULL. The value has to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlParseAttribute" id="xmlParseAttribute"></a>Function: xmlParseAttribute</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseAttribute (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** value)<br />
+</pre><p>parse an <a href="libxml-SAX.html#attribute">attribute</a> [41] Attribute ::= Name Eq AttValue [ WFC: No External Entity References ] Attribute values cannot contain direct or indirect entity references to external entities. [ WFC: No &lt; in Attribute Values ] The replacement text of any entity referred to directly or indirectly in an <a href="libxml-SAX.html#attribute">attribute</a> value (other than "&amp;lt;") must not contain a &lt;. [ VC: Attribute Value Type ] The <a href="libxml-SAX.html#attribute">attribute</a> must have been declared; the value must be of the type declared for it. [25] Eq ::= S? '=' S? With namespace: [NS 11] Attribute ::= QName Eq AttValue Also the case QName == xmlns:??? is handled independently as a namespace definition.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** used to store the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name, and the value in *value.</td></tr></tbody></table></div><h3><a name="xmlParseAttributeListDecl" id="xmlParseAttributeListDecl"></a>Function: xmlParseAttributeListDecl</h3><pre class="programlisting">void xmlParseAttributeListDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>: parse the Attribute list def for an element [52] AttlistDecl ::= '&lt;!ATTLIST' S Name AttDef* S? '&gt;' [53] AttDef ::= S Name S AttType S DefaultDecl</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseAttributeType" id="xmlParseAttributeType"></a>Function: xmlParseAttributeType</h3><pre class="programlisting">int xmlParseAttributeType (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)<br />
+</pre><p>parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS' Validity constraints for <a href="libxml-SAX.html#attribute">attribute</a> values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID <a href="libxml-SAX.html#attribute">attribute</a> specified. [ VC: ID Attribute Default ] An ID <a href="libxml-SAX.html#attribute">attribute</a> must have a declared default of #IMPLIED or #REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID <a href="libxml-SAX.html#attribute">attribute</a> on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the enumeration tree built while parsing</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr></tbody></table></div><h3><a name="xmlParseCDSect" id="xmlParseCDSect"></a>Function: xmlParseCDSect</h3><pre class="programlisting">void xmlParseCDSect (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '&lt;![CDATA[' [20] Data ::= (Char* - (Char* ']]&gt;' Char*)) [21] CDEnd ::= ']]&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseCharData" id="xmlParseCharData"></a>Function: xmlParseCharData</h3><pre class="programlisting">void xmlParseCharData (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int cdata)<br />
+</pre><p>parse a CharData section. if we are within a CDATA section ']]&gt;' marks an end of section. The right angle bracket (&gt;) may be represented using the string "&amp;gt;", and must, for compatibility, be escaped using "&amp;gt;" or a character <a href="libxml-SAX.html#reference">reference</a> when it appears in the string "]]&gt;" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>cdata</tt></i>:</span></td><td>int indicating whether we are within a CDATA section</td></tr></tbody></table></div><h3><a name="xmlParseCharRef" id="xmlParseCharRef"></a>Function: xmlParseCharRef</h3><pre class="programlisting">int xmlParseCharRef (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse Reference declarations [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value parsed (as an int), 0 in case of error</td></tr></tbody></table></div><h3><a name="xmlParseComment" id="xmlParseComment"></a>Function: xmlParseComment</h3><pre class="programlisting">void xmlParseComment (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Skip an XML (SGML) <a href="libxml-SAX.html#comment">comment</a> &lt;!-- .... --&gt; The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '&lt;!--' ((Char - '-') | ('-' (Char - '-')))* '--&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseContent" id="xmlParseContent"></a>Function: xmlParseContent</h3><pre class="programlisting">void xmlParseContent (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Parse a content: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseDefaultDecl" id="xmlParseDefaultDecl"></a>Function: xmlParseDefaultDecl</h3><pre class="programlisting">int xmlParseDefaultDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** value)<br />
+</pre><p>Parse an <a href="libxml-SAX.html#attribute">attribute</a> default declaration [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the <a href="libxml-SAX.html#attribute">attribute</a> must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared <a href="libxml-SAX.html#attribute">attribute</a> type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an <a href="libxml-SAX.html#attribute">attribute</a> has a default value declared with the #FIXED keyword, instances of that <a href="libxml-SAX.html#attribute">attribute</a> must match the default value. [ WFC: No &lt; in Attribute Values ] handled in xmlParseAttValue()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>Receive a possible fixed default value for the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, <a href="libxml-tree.html#XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> or XML_ATTRIBUTE_FIXED.</td></tr></tbody></table></div><h3><a name="xmlParseDocTypeDecl" id="xmlParseDocTypeDecl"></a>Function: xmlParseDocTypeDecl</h3><pre class="programlisting">void xmlParseDocTypeDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a DOCTYPE declaration [28] doctypedecl ::= '&lt;!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl | PEReference | S)* ']' S?)? '&gt;' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseElement" id="xmlParseElement"></a>Function: xmlParseElement</h3><pre class="programlisting">void xmlParseElement (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseElementChildrenContentDecl" id="xmlParseElementChildrenContentDecl"></a>Function: xmlParseElementChildrenContentDecl</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlParseElementChildrenContentDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int inputchk)<br />
+</pre><p>parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in <a href="libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a> [47] children ::= (choice | seq) ('?' | '*' | '+')? [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')? [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')' [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity <a href="libxml-SAX.html#reference">reference</a> appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>inputchk</tt></i>:</span></td><td>the input used for the current entity, needed for boundary checks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the tree of <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> describing the element hierarchy.</td></tr></tbody></table></div><h3><a name="xmlParseElementContentDecl" id="xmlParseElementContentDecl"></a>Function: xmlParseElementContentDecl</h3><pre class="programlisting">int xmlParseElementContentDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> * result)<br />
+</pre><p>parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in <a href="libxml-parserInternals.html#xmlParseElementDecl">xmlParseElementDecl</a> [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the element being defined.</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>the Element Content pointer will be stored here if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type of element content XML_ELEMENT_TYPE_xxx</td></tr></tbody></table></div><h3><a name="xmlParseElementDecl" id="xmlParseElementDecl"></a>Function: xmlParseElementDecl</h3><pre class="programlisting">int xmlParseElementDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an Element declaration. [45] elementdecl ::= '&lt;!ELEMENT' S Name S contentspec S? '&gt;' [ VC: Unique Element Type Declaration ] No element type may be declared more than once</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type of the element, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlParseElementMixedContentDecl" id="xmlParseElementMixedContentDecl"></a>Function: xmlParseElementMixedContentDecl</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlParseElementMixedContentDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int inputchk)<br />
+</pre><p>parse the declaration for a Mixed Element content The leading '(' and spaces have been skipped in <a href="libxml-parserInternals.html#xmlParseElementContentDecl">xmlParseElementContentDecl</a> [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')' [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>inputchk</tt></i>:</span></td><td>the input used for the current entity, needed for boundary checks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the list of the <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> describing the element choices</td></tr></tbody></table></div><h3><a name="xmlParseEncName" id="xmlParseEncName"></a>Function: xmlParseEncName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEncName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the encoding name value or NULL</td></tr></tbody></table></div><h3><a name="xmlParseEncodingDecl" id="xmlParseEncodingDecl"></a>Function: xmlParseEncodingDecl</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEncodingDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the encoding value or NULL</td></tr></tbody></table></div><h3><a name="xmlParseEndTag" id="xmlParseEndTag"></a>Function: xmlParseEndTag</h3><pre class="programlisting">void xmlParseEndTag (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an end of tag [42] ETag ::= '&lt;/' Name S? '&gt;' With namespace [NS 9] ETag ::= '&lt;/' QName S? '&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseEntityDecl" id="xmlParseEntityDecl"></a>Function: xmlParseEntityDecl</h3><pre class="programlisting">void xmlParseEntityDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse &lt;!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= '&lt;!ENTITY' S Name S EntityDef S? '&gt;' [72] PEDecl ::= '&lt;!ENTITY' S '%' S Name S PEDef S? '&gt;' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseEntityRef" id="xmlParseEntityRef"></a>Function: xmlParseEntityRef</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> xmlParseEntityRef (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse ENTITY references declarations [68] EntityRef ::= '&amp;' Name ';' [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity <a href="libxml-SAX.html#reference">reference</a> must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it. Similarly, the declaration of a general entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'. [ WFC: Parsed Entity ] An entity <a href="libxml-SAX.html#reference">reference</a> must not contain the name of an unparsed entity</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEntityPtr">xmlEntityPtr</a> if found, or NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlParseEntityValue" id="xmlParseEntityValue"></a>Function: xmlParseEntityValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseEntityValue (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** orig)<br />
+</pre><p>parse a value for ENTITY declarations [9] EntityValue ::= '"' ([^%&amp;"] | PEReference | Reference)* '"' | "'" ([^%&amp;'] | PEReference | Reference)* "'"</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>orig</tt></i>:</span></td><td>if non-NULL store a copy of the original entity value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the EntityValue parsed with <a href="libxml-SAX.html#reference">reference</a> substituted or NULL</td></tr></tbody></table></div><h3><a name="xmlParseEnumeratedType" id="xmlParseEnumeratedType"></a>Function: xmlParseEnumeratedType</h3><pre class="programlisting">int xmlParseEnumeratedType (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> * tree)<br />
+</pre><p>parse an Enumerated <a href="libxml-SAX.html#attribute">attribute</a> type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the enumeration tree built while parsing</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td><a href="libxml-tree.html#XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> or <a href="libxml-tree.html#XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a></td></tr></tbody></table></div><h3><a name="xmlParseEnumerationType" id="xmlParseEnumerationType"></a>Function: xmlParseEnumerationType</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlParseEnumerationType (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an Enumeration <a href="libxml-SAX.html#attribute">attribute</a> type. [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the enumeration <a href="libxml-SAX.html#attribute">attribute</a> tree built while parsing</td></tr></tbody></table></div><h3><a name="xmlParseExternalID" id="xmlParseExternalID"></a>Function: xmlParseExternalID</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseExternalID (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** publicID, <br /> int strict)<br />
+</pre><p>Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral [75] ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral [83] PublicID ::= 'PUBLIC' S PubidLiteral</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>publicID</tt></i>:</span></td><td>a xmlChar** receiving PubidLiteral</td></tr><tr><td><span class="term"><i><tt>strict</tt></i>:</span></td><td>indicate whether we should restrict parsing to only production [75], see NOTE below</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.</td></tr></tbody></table></div><h3><a name="xmlParseExternalSubset" id="xmlParseExternalSubset"></a>Function: xmlParseExternalSubset</h3><pre class="programlisting">void xmlParseExternalSubset (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external identifier</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system identifier (or URL)</td></tr></tbody></table></div><h3><a name="xmlParseMarkupDecl" id="xmlParseMarkupDecl"></a>Function: xmlParseMarkupDecl</h3><pre class="programlisting">void xmlParseMarkupDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseMisc" id="xmlParseMisc"></a>Function: xmlParseMisc</h3><pre class="programlisting">void xmlParseMisc (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseName" id="xmlParseName"></a>Function: xmlParseName</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20 Name)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Name parsed or NULL</td></tr></tbody></table></div><h3><a name="xmlParseNamespace" id="xmlParseNamespace"></a>Function: xmlParseNamespace</h3><pre class="programlisting">void xmlParseNamespace (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>xmlParseNamespace: parse specific PI '&lt;?namespace ...' constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseNmtoken" id="xmlParseNmtoken"></a>Function: xmlParseNmtoken</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseNmtoken (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Nmtoken parsed or NULL</td></tr></tbody></table></div><h3><a name="xmlParseNotationDecl" id="xmlParseNotationDecl"></a>Function: xmlParseNotationDecl</h3><pre class="programlisting">void xmlParseNotationDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a notation declaration [82] NotationDecl ::= '&lt;!NOTATION' S Name S (ExternalID | PublicID) S? '&gt;' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseNotationType" id="xmlParseNotationType"></a>Function: xmlParseNotationType</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlParseNotationType (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an Notation <a href="libxml-SAX.html#attribute">attribute</a> type. Note: the leading 'NOTATION' S part has already being parsed... [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the notation <a href="libxml-SAX.html#attribute">attribute</a> tree built while parsing</td></tr></tbody></table></div><h3><a name="xmlParsePEReference" id="xmlParsePEReference"></a>Function: xmlParsePEReference</h3><pre class="programlisting">void xmlParsePEReference (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse PEReference declarations The entity content is handled directly by pushing it's content as a new input stream. [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive <a href="libxml-SAX.html#reference">reference</a> to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParsePI" id="xmlParsePI"></a>Function: xmlParsePI</h3><pre class="programlisting">void xmlParsePI (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML Processing Instruction. [16] PI ::= '&lt;?' PITarget (S (Char* - (Char* '?&gt;' Char*)))? '?&gt;' The processing is transfered to SAX once parsed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParsePITarget" id="xmlParsePITarget"></a>Function: xmlParsePITarget</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParsePITarget (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the PITarget name or NULL</td></tr></tbody></table></div><h3><a name="xmlParsePubidLiteral" id="xmlParsePubidLiteral"></a>Function: xmlParsePubidLiteral</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParsePubidLiteral (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the PubidLiteral parsed or NULL.</td></tr></tbody></table></div><h3><a name="xmlParseQuotedString" id="xmlParseQuotedString"></a>Function: xmlParseQuotedString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseQuotedString (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string parser or NULL.</td></tr></tbody></table></div><h3><a name="xmlParseReference" id="xmlParseReference"></a>Function: xmlParseReference</h3><pre class="programlisting">void xmlParseReference (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseSDDecl" id="xmlParseSDDecl"></a>Function: xmlParseSDDecl</h3><pre class="programlisting">int xmlParseSDDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the <a href="libxml-SAX.html#attribute">attribute</a> appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if standalone="yes" 0 if standalone="no" -2 if standalone <a href="libxml-SAX.html#attribute">attribute</a> is missing or invalid (A standalone value of -2 means that the XML declaration was found, but no value was specified for the standalone attribute).</td></tr></tbody></table></div><h3><a name="xmlParseStartTag" id="xmlParseStartTag"></a>Function: xmlParseStartTag</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseStartTag (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [40] STag ::= '&lt;' Name (S Attribute)* S? '&gt;' [ WFC: Unique Att Spec ] No <a href="libxml-SAX.html#attribute">attribute</a> name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '&lt;' Name (S Attribute)* S? '/&gt;' [ WFC: Unique Att Spec ] No <a href="libxml-SAX.html#attribute">attribute</a> name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '&lt;' QName (S Attribute)* S? '&gt;' [NS 10] EmptyElement ::= '&lt;' QName (S Attribute)* S? '/&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the element name parsed</td></tr></tbody></table></div><h3><a name="xmlParseSystemLiteral" id="xmlParseSystemLiteral"></a>Function: xmlParseSystemLiteral</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseSystemLiteral (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the SystemLiteral parsed or NULL</td></tr></tbody></table></div><h3><a name="xmlParseTextDecl" id="xmlParseTextDecl"></a>Function: xmlParseTextDecl</h3><pre class="programlisting">void xmlParseTextDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML declaration header for external entities [77] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParseVersionInfo" id="xmlParseVersionInfo"></a>Function: xmlParseVersionInfo</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseVersionInfo (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the version string, e.g. "1.0"</td></tr></tbody></table></div><h3><a name="xmlParseVersionNum" id="xmlParseVersionNum"></a>Function: xmlParseVersionNum</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlParseVersionNum (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string giving the XML version number, or NULL</td></tr></tbody></table></div><h3><a name="xmlParseXMLDecl" id="xmlParseXMLDecl"></a>Function: xmlParseXMLDecl</h3><pre class="programlisting">void xmlParseXMLDecl (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse an XML declaration header [23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?&gt;'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlParserHandlePEReference" id="xmlParserHandlePEReference"></a>Function: xmlParserHandlePEReference</h3><pre class="programlisting">void xmlParserHandlePEReference (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive <a href="libxml-SAX.html#reference">reference</a> to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any <a href="libxml-SAX.html#reference">reference</a> to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity <a href="libxml-SAX.html#reference">reference</a> within DTDs</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr></tbody></table></div><h3><a name="xmlParserHandleReference" id="xmlParserHandleReference"></a>Function: xmlParserHandleReference</h3><pre class="programlisting">void xmlParserHandleReference (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&amp;' Name ';' [ WFC: Entity Declared ] the Name given in the entity <a href="libxml-SAX.html#reference">reference</a> must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. [ WFC: Parsed Entity ] An entity <a href="libxml-SAX.html#reference">reference</a> must not contain the name of an unparsed entity [66] CharRef ::= '&amp;#' [0-9]+ ';' | '&amp;#x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr></tbody></table></div><h3><a name="xmlParserInputShrink" id="xmlParserInputShrink"></a>Function: xmlParserInputShrink</h3><pre class="programlisting">void xmlParserInputShrink (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> in)<br />
+</pre><p>This function removes used input for the parser.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>an XML parser input</td></tr></tbody></table></div><h3><a name="xmlPopInput" id="xmlPopInput"></a>Function: xmlPopInput</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> xmlPopInput (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>xmlPopInput: the current input pointed by ctxt-&gt;input came to an end pop it and return the next char.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> in the parser context</td></tr></tbody></table></div><h3><a name="xmlPushInput" id="xmlPushInput"></a>Function: xmlPushInput</h3><pre class="programlisting">int xmlPushInput (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br />
+</pre><p>xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an XML parser input fragment (entity, XML fragment ...).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or the index in the input stack</td></tr></tbody></table></div><h3><a name="xmlScanName" id="xmlScanName"></a>Function: xmlScanName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlScanName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>Trickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of <a href="libxml-parserInternals.html#xmlParserHandleReference">xmlParserHandleReference</a> [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the Name parsed or NULL</td></tr></tbody></table></div><h3><a name="xmlSetEntityReferenceFunc" id="xmlSetEntityReferenceFunc"></a>Function: xmlSetEntityReferenceFunc</h3><pre class="programlisting">void xmlSetEntityReferenceFunc (<a href="libxml-parserInternals.html#xmlEntityReferenceFunc">xmlEntityReferenceFunc</a> func)<br />
+</pre><p>Set the function to call call back when a xml <a href="libxml-SAX.html#reference">reference</a> has been made</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>A valid function</td></tr></tbody></table></div><h3><a name="xmlSkipBlankChars" id="xmlSkipBlankChars"></a>Function: xmlSkipBlankChars</h3><pre class="programlisting">int xmlSkipBlankChars (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of space chars skipped</td></tr></tbody></table></div><h3><a name="xmlSplitQName" id="xmlSplitQName"></a>Function: xmlSplitQName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br />
+</pre><p>parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div><h3><a name="xmlStringCurrentChar" id="xmlStringCurrentChar"></a>Function: xmlStringCurrentChar</h3><pre class="programlisting">int xmlStringCurrentChar (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int * len)<br />
+</pre><p>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>pointer to the beginning of the char</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the length of the char read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current char value and its length</td></tr></tbody></table></div><h3><a name="xmlStringDecodeEntities" id="xmlStringDecodeEntities"></a>Function: xmlStringDecodeEntities</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStringDecodeEntities (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)<br />
+</pre><p>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div><h3><a name="xmlStringLenDecodeEntities" id="xmlStringLenDecodeEntities"></a>Function: xmlStringLenDecodeEntities</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStringLenDecodeEntities (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len, <br /> int what, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end2, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> end3)<br />
+</pre><p>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the input string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the string length</td></tr><tr><td><span class="term"><i><tt>what</tt></i>:</span></td><td>combination of <a href="libxml-parserInternals.html#XML_SUBSTITUTE_REF">XML_SUBSTITUTE_REF</a> and <a href="libxml-parserInternals.html#XML_SUBSTITUTE_PEREF">XML_SUBSTITUTE_PEREF</a></td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end2</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>end3</tt></i>:</span></td><td>an end marker xmlChar, 0 if none</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>A newly allocated string with the substitution done. The caller must deallocate it !</td></tr></tbody></table></div><h3><a name="xmlSwitchEncoding" id="xmlSwitchEncoding"></a>Function: xmlSwitchEncoding</h3><pre class="programlisting">int xmlSwitchEncoding (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the encoding value (number)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlSwitchInputEncoding" id="xmlSwitchInputEncoding"></a>Function: xmlSwitchInputEncoding</h3><pre class="programlisting">int xmlSwitchInputEncoding (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br />
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input stream</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the encoding handler</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlSwitchToEncoding" id="xmlSwitchToEncoding"></a>Function: xmlSwitchToEncoding</h3><pre class="programlisting">int xmlSwitchToEncoding (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> handler)<br />
+</pre><p>change the input functions when discovering the character encoding of a given entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the parser context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the encoding handler</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 otherwise</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-pattern.html b/doc/html/libxml-pattern.html
new file mode 100644
index 0000000..cd2789b
--- /dev/null
+++ b/doc/html/libxml-pattern.html
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module pattern from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module pattern from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-parserInternals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-parserInternals.html">parserInternals</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="n" href="libxml-relaxng.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>allows to compile and test pattern expressions for nodes either in a tree or based on a parser state. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlPattern">xmlPattern</a><br />struct _xmlPattern
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Enum <a href="#xmlPatternFlags">xmlPatternFlags</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-pattern.html#xmlPattern">xmlPattern</a> * <a name="xmlPatternPtr" id="xmlPatternPtr">xmlPatternPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlStreamCtxt">xmlStreamCtxt</a><br />struct _xmlStreamCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-pattern.html#xmlStreamCtxt">xmlStreamCtxt</a> * <a name="xmlStreamCtxtPtr" id="xmlStreamCtxtPtr">xmlStreamCtxtPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlFreePattern">xmlFreePattern</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting">void <a href="#xmlFreePatternList">xmlFreePatternList</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting">void <a href="#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre>
+<pre class="programlisting">int <a href="#xmlPatternFromRoot">xmlPatternFromRoot</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting"><a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> <a href="#xmlPatternGetStreamCtxt">xmlPatternGetStreamCtxt</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting">int <a href="#xmlPatternMatch">xmlPatternMatch</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlPatternMaxDepth">xmlPatternMaxDepth</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting">int <a href="#xmlPatternMinDepth">xmlPatternMinDepth</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting">int <a href="#xmlPatternStreamable">xmlPatternStreamable</a> (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)</pre>
+<pre class="programlisting"><a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> <a href="#xmlPatterncompile">xmlPatterncompile</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> <a href="libxml-dict.html#xmlDict">xmlDict</a> * dict, <br /> int flags, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)</pre>
+<pre class="programlisting">int <a href="#xmlStreamPop">xmlStreamPop</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)</pre>
+<pre class="programlisting">int <a href="#xmlStreamPush">xmlStreamPush</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
+<pre class="programlisting">int <a href="#xmlStreamPushAttr">xmlStreamPushAttr</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
+<pre class="programlisting">int <a href="#xmlStreamPushNode">xmlStreamPushNode</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> int nodeType)</pre>
+<pre class="programlisting">int <a href="#xmlStreamWantsAnyNode">xmlStreamWantsAnyNode</a> (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)</pre>
+<h2>Description</h2>
+<h3><a name="xmlPattern" id="xmlPattern">Structure xmlPattern</a></h3><pre class="programlisting">Structure xmlPattern<br />struct _xmlPattern {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlPatternFlags" id="xmlPatternFlags">xmlPatternFlags</a></h3><pre class="programlisting">Enum xmlPatternFlags {
+ <a name="XML_PATTERN_DEFAULT" id="XML_PATTERN_DEFAULT">XML_PATTERN_DEFAULT</a> = 0 : simple pattern match
+ <a name="XML_PATTERN_XPATH" id="XML_PATTERN_XPATH">XML_PATTERN_XPATH</a> = 1 : standard XPath pattern
+ <a name="XML_PATTERN_XSSEL" id="XML_PATTERN_XSSEL">XML_PATTERN_XSSEL</a> = 2 : XPath subset for schema selector
+ <a name="XML_PATTERN_XSFIELD" id="XML_PATTERN_XSFIELD">XML_PATTERN_XSFIELD</a> = 4 : XPath subset for schema field
+}
+</pre><h3><a name="xmlStreamCtxt" id="xmlStreamCtxt">Structure xmlStreamCtxt</a></h3><pre class="programlisting">Structure xmlStreamCtxt<br />struct _xmlStreamCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlFreePattern" id="xmlFreePattern"></a>Function: xmlFreePattern</h3><pre class="programlisting">void xmlFreePattern (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Free up the memory allocated by @comp</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp</td></tr></tbody></table></div><h3><a name="xmlFreePatternList" id="xmlFreePatternList"></a>Function: xmlFreePatternList</h3><pre class="programlisting">void xmlFreePatternList (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Free up the memory allocated by all the elements of @comp</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XSLT comp list</td></tr></tbody></table></div><h3><a name="xmlFreeStreamCtxt" id="xmlFreeStreamCtxt"></a>Function: xmlFreeStreamCtxt</h3><pre class="programlisting">void xmlFreeStreamCtxt (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br />
+</pre><p>Free the stream context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr></tbody></table></div><h3><a name="xmlPatternFromRoot" id="xmlPatternFromRoot"></a>Function: xmlPatternFromRoot</h3><pre class="programlisting">int xmlPatternFromRoot (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Check if the pattern must be looked at from the root.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlPatternGetStreamCtxt" id="xmlPatternGetStreamCtxt"></a>Function: xmlPatternGetStreamCtxt</h3><pre class="programlisting"><a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> xmlPatternGetStreamCtxt (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Get a streaming context for that pattern Use <a href="libxml-pattern.html#xmlFreeStreamCtxt">xmlFreeStreamCtxt</a> to free the context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the context or NULL in case of failure</td></tr></tbody></table></div><h3><a name="xmlPatternMatch" id="xmlPatternMatch"></a>Function: xmlPatternMatch</h3><pre class="programlisting">int xmlPatternMatch (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Test whether the node matches the pattern</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if it doesn't and -1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlPatternMaxDepth" id="xmlPatternMaxDepth"></a>Function: xmlPatternMaxDepth</h3><pre class="programlisting">int xmlPatternMaxDepth (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Check the maximum depth reachable by a pattern</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 if no limit (using //), otherwise the depth, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlPatternMinDepth" id="xmlPatternMinDepth"></a>Function: xmlPatternMinDepth</h3><pre class="programlisting">int xmlPatternMinDepth (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Check the minimum depth reachable by a pattern, 0 mean the / or . are part of the set.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error otherwise the depth,</td></tr></tbody></table></div><h3><a name="xmlPatternStreamable" id="xmlPatternStreamable"></a>Function: xmlPatternStreamable</h3><pre class="programlisting">int xmlPatternStreamable (<a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> comp)<br />
+</pre><p>Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled pattern</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if streamable, 0 if not and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlPatterncompile" id="xmlPatterncompile"></a>Function: xmlPatterncompile</h3><pre class="programlisting"><a href="libxml-pattern.html#xmlPatternPtr">xmlPatternPtr</a> xmlPatterncompile (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> <a href="libxml-dict.html#xmlDict">xmlDict</a> * dict, <br /> int flags, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br />
+</pre><p>Compile a pattern.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>the pattern to compile</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>an optional dictionary for interned strings</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>compilation flags, see <a href="libxml-pattern.html#xmlPatternFlags">xmlPatternFlags</a></td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled form of the pattern or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlStreamPop" id="xmlStreamPop"></a>Function: xmlStreamPop</h3><pre class="programlisting">int xmlStreamPop (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream)<br />
+</pre><p>push one level from the stream.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPush" id="xmlStreamPush"></a>Function: xmlStreamPush</h3><pre class="programlisting">int xmlStreamPush (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushAttr" id="xmlStreamPushAttr"></a>Function: xmlStreamPushAttr</h3><pre class="programlisting">int xmlStreamPushAttr (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
+</pre><p>Push new <a href="libxml-SAX.html#attribute">attribute</a> data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamPushNode" id="xmlStreamPushNode"></a>Function: xmlStreamPushNode</h3><pre class="programlisting">int xmlStreamPushNode (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> stream, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> int nodeType)<br />
+</pre><p>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the current name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>nodeType</tt></i>:</span></td><td>the type of the node being pushed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlStreamWantsAnyNode" id="xmlStreamWantsAnyNode"></a>Function: xmlStreamWantsAnyNode</h3><pre class="programlisting">int xmlStreamWantsAnyNode (<a href="libxml-pattern.html#xmlStreamCtxtPtr">xmlStreamCtxtPtr</a> streamCtxt)<br />
+</pre><p>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>streamCtxt</tt></i>:</span></td><td>the stream context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-relaxng.html b/doc/html/libxml-relaxng.html
new file mode 100644
index 0000000..1ec3192
--- /dev/null
+++ b/doc/html/libxml-relaxng.html
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module relaxng from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module relaxng from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-pattern.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-pattern.html">pattern</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schemasInternals.html">schemasInternals</a></th><td><a accesskey="n" href="libxml-schemasInternals.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>implementation of the Relax-NG validation </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlRelaxNG">xmlRelaxNG</a><br />struct _xmlRelaxNG
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Structure <a href="#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a><br />struct _xmlRelaxNGParserCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-relaxng.html#xmlRelaxNGParserCtxt">xmlRelaxNGParserCtxt</a> * <a name="xmlRelaxNGParserCtxtPtr" id="xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-relaxng.html#xmlRelaxNG">xmlRelaxNG</a> * <a name="xmlRelaxNGPtr" id="xmlRelaxNGPtr">xmlRelaxNGPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a><br />struct _xmlRelaxNGValidCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-relaxng.html#xmlRelaxNGValidCtxt">xmlRelaxNGValidCtxt</a> * <a name="xmlRelaxNGValidCtxtPtr" id="xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlRelaxNGValidErr">xmlRelaxNGValidErr</a>
+</pre><pre class="programlisting">void <a href="#xmlRelaxNGCleanupTypes">xmlRelaxNGCleanupTypes</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGDump">xmlRelaxNGDump</a> (FILE * output, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGDumpTree">xmlRelaxNGDumpTree</a> (FILE * output, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGFree">xmlRelaxNGFree</a> (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGFreeParserCtxt">xmlRelaxNGFreeParserCtxt</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a> (const char * URL)</pre>
+<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> <a href="#xmlRelaxNGNewValidCtxt">xmlRelaxNGNewValidCtxt</a> (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
+<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> <a href="#xmlRelaxNGParse">xmlRelaxNGParse</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGSetParserErrors">xmlRelaxNGSetParserErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGSetParserStructuredErrors">xmlRelaxNGSetParserStructuredErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGSetValidErrors">xmlRelaxNGSetValidErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlRelaxNGSetValidStructuredErrors">xmlRelaxNGSetValidStructuredErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGValidateDoc">xmlRelaxNGValidateDoc</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGValidateFullElement">xmlRelaxNGValidateFullElement</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGValidatePopElement">xmlRelaxNGValidatePopElement</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGValidatePushCData">xmlRelaxNGValidatePushCData</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlRelaxNGValidatePushElement">xmlRelaxNGValidatePushElement</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">Function type: <a href="#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a>
+void <a href="#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a>
+void <a href="#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">int <a href="#xmlRelaxParserSetFlag">xmlRelaxParserSetFlag</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> int flags)</pre>
+<h2>Description</h2>
+<h3><a name="xmlRelaxNG" id="xmlRelaxNG">Structure xmlRelaxNG</a></h3><pre class="programlisting">Structure xmlRelaxNG<br />struct _xmlRelaxNG {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlRelaxNGParserCtxt" id="xmlRelaxNGParserCtxt">Structure xmlRelaxNGParserCtxt</a></h3><pre class="programlisting">Structure xmlRelaxNGParserCtxt<br />struct _xmlRelaxNGParserCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlRelaxNGParserFlag" id="xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a></h3><pre class="programlisting">Enum xmlRelaxNGParserFlag {
+ <a name="XML_RELAXNGP_NONE" id="XML_RELAXNGP_NONE">XML_RELAXNGP_NONE</a> = 0
+ <a name="XML_RELAXNGP_FREE_DOC" id="XML_RELAXNGP_FREE_DOC">XML_RELAXNGP_FREE_DOC</a> = 1
+ <a name="XML_RELAXNGP_CRNG" id="XML_RELAXNGP_CRNG">XML_RELAXNGP_CRNG</a> = 2
+}
+</pre><h3><a name="xmlRelaxNGValidCtxt" id="xmlRelaxNGValidCtxt">Structure xmlRelaxNGValidCtxt</a></h3><pre class="programlisting">Structure xmlRelaxNGValidCtxt<br />struct _xmlRelaxNGValidCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlRelaxNGValidErr" id="xmlRelaxNGValidErr">xmlRelaxNGValidErr</a></h3><pre class="programlisting">Enum xmlRelaxNGValidErr {
+ <a name="XML_RELAXNG_OK" id="XML_RELAXNG_OK">XML_RELAXNG_OK</a> = 0
+ <a name="XML_RELAXNG_ERR_MEMORY" id="XML_RELAXNG_ERR_MEMORY">XML_RELAXNG_ERR_MEMORY</a> = 1
+ <a name="XML_RELAXNG_ERR_TYPE" id="XML_RELAXNG_ERR_TYPE">XML_RELAXNG_ERR_TYPE</a> = 2
+ <a name="XML_RELAXNG_ERR_TYPEVAL" id="XML_RELAXNG_ERR_TYPEVAL">XML_RELAXNG_ERR_TYPEVAL</a> = 3
+ <a name="XML_RELAXNG_ERR_DUPID" id="XML_RELAXNG_ERR_DUPID">XML_RELAXNG_ERR_DUPID</a> = 4
+ <a name="XML_RELAXNG_ERR_TYPECMP" id="XML_RELAXNG_ERR_TYPECMP">XML_RELAXNG_ERR_TYPECMP</a> = 5
+ <a name="XML_RELAXNG_ERR_NOSTATE" id="XML_RELAXNG_ERR_NOSTATE">XML_RELAXNG_ERR_NOSTATE</a> = 6
+ <a name="XML_RELAXNG_ERR_NODEFINE" id="XML_RELAXNG_ERR_NODEFINE">XML_RELAXNG_ERR_NODEFINE</a> = 7
+ <a name="XML_RELAXNG_ERR_LISTEXTRA" id="XML_RELAXNG_ERR_LISTEXTRA">XML_RELAXNG_ERR_LISTEXTRA</a> = 8
+ <a name="XML_RELAXNG_ERR_LISTEMPTY" id="XML_RELAXNG_ERR_LISTEMPTY">XML_RELAXNG_ERR_LISTEMPTY</a> = 9
+ <a name="XML_RELAXNG_ERR_INTERNODATA" id="XML_RELAXNG_ERR_INTERNODATA">XML_RELAXNG_ERR_INTERNODATA</a> = 10
+ <a name="XML_RELAXNG_ERR_INTERSEQ" id="XML_RELAXNG_ERR_INTERSEQ">XML_RELAXNG_ERR_INTERSEQ</a> = 11
+ <a name="XML_RELAXNG_ERR_INTEREXTRA" id="XML_RELAXNG_ERR_INTEREXTRA">XML_RELAXNG_ERR_INTEREXTRA</a> = 12
+ <a name="XML_RELAXNG_ERR_ELEMNAME" id="XML_RELAXNG_ERR_ELEMNAME">XML_RELAXNG_ERR_ELEMNAME</a> = 13
+ <a name="XML_RELAXNG_ERR_ATTRNAME" id="XML_RELAXNG_ERR_ATTRNAME">XML_RELAXNG_ERR_ATTRNAME</a> = 14
+ <a name="XML_RELAXNG_ERR_ELEMNONS" id="XML_RELAXNG_ERR_ELEMNONS">XML_RELAXNG_ERR_ELEMNONS</a> = 15
+ <a name="XML_RELAXNG_ERR_ATTRNONS" id="XML_RELAXNG_ERR_ATTRNONS">XML_RELAXNG_ERR_ATTRNONS</a> = 16
+ <a name="XML_RELAXNG_ERR_ELEMWRONGNS" id="XML_RELAXNG_ERR_ELEMWRONGNS">XML_RELAXNG_ERR_ELEMWRONGNS</a> = 17
+ <a name="XML_RELAXNG_ERR_ATTRWRONGNS" id="XML_RELAXNG_ERR_ATTRWRONGNS">XML_RELAXNG_ERR_ATTRWRONGNS</a> = 18
+ <a name="XML_RELAXNG_ERR_ELEMEXTRANS" id="XML_RELAXNG_ERR_ELEMEXTRANS">XML_RELAXNG_ERR_ELEMEXTRANS</a> = 19
+ <a name="XML_RELAXNG_ERR_ATTREXTRANS" id="XML_RELAXNG_ERR_ATTREXTRANS">XML_RELAXNG_ERR_ATTREXTRANS</a> = 20
+ <a name="XML_RELAXNG_ERR_ELEMNOTEMPTY" id="XML_RELAXNG_ERR_ELEMNOTEMPTY">XML_RELAXNG_ERR_ELEMNOTEMPTY</a> = 21
+ <a name="XML_RELAXNG_ERR_NOELEM" id="XML_RELAXNG_ERR_NOELEM">XML_RELAXNG_ERR_NOELEM</a> = 22
+ <a name="XML_RELAXNG_ERR_NOTELEM" id="XML_RELAXNG_ERR_NOTELEM">XML_RELAXNG_ERR_NOTELEM</a> = 23
+ <a name="XML_RELAXNG_ERR_ATTRVALID" id="XML_RELAXNG_ERR_ATTRVALID">XML_RELAXNG_ERR_ATTRVALID</a> = 24
+ <a name="XML_RELAXNG_ERR_CONTENTVALID" id="XML_RELAXNG_ERR_CONTENTVALID">XML_RELAXNG_ERR_CONTENTVALID</a> = 25
+ <a name="XML_RELAXNG_ERR_EXTRACONTENT" id="XML_RELAXNG_ERR_EXTRACONTENT">XML_RELAXNG_ERR_EXTRACONTENT</a> = 26
+ <a name="XML_RELAXNG_ERR_INVALIDATTR" id="XML_RELAXNG_ERR_INVALIDATTR">XML_RELAXNG_ERR_INVALIDATTR</a> = 27
+ <a name="XML_RELAXNG_ERR_DATAELEM" id="XML_RELAXNG_ERR_DATAELEM">XML_RELAXNG_ERR_DATAELEM</a> = 28
+ <a name="XML_RELAXNG_ERR_VALELEM" id="XML_RELAXNG_ERR_VALELEM">XML_RELAXNG_ERR_VALELEM</a> = 29
+ <a name="XML_RELAXNG_ERR_LISTELEM" id="XML_RELAXNG_ERR_LISTELEM">XML_RELAXNG_ERR_LISTELEM</a> = 30
+ <a name="XML_RELAXNG_ERR_DATATYPE" id="XML_RELAXNG_ERR_DATATYPE">XML_RELAXNG_ERR_DATATYPE</a> = 31
+ <a name="XML_RELAXNG_ERR_VALUE" id="XML_RELAXNG_ERR_VALUE">XML_RELAXNG_ERR_VALUE</a> = 32
+ <a name="XML_RELAXNG_ERR_LIST" id="XML_RELAXNG_ERR_LIST">XML_RELAXNG_ERR_LIST</a> = 33
+ <a name="XML_RELAXNG_ERR_NOGRAMMAR" id="XML_RELAXNG_ERR_NOGRAMMAR">XML_RELAXNG_ERR_NOGRAMMAR</a> = 34
+ <a name="XML_RELAXNG_ERR_EXTRADATA" id="XML_RELAXNG_ERR_EXTRADATA">XML_RELAXNG_ERR_EXTRADATA</a> = 35
+ <a name="XML_RELAXNG_ERR_LACKDATA" id="XML_RELAXNG_ERR_LACKDATA">XML_RELAXNG_ERR_LACKDATA</a> = 36
+ <a name="XML_RELAXNG_ERR_INTERNAL" id="XML_RELAXNG_ERR_INTERNAL">XML_RELAXNG_ERR_INTERNAL</a> = 37
+ <a name="XML_RELAXNG_ERR_ELEMWRONG" id="XML_RELAXNG_ERR_ELEMWRONG">XML_RELAXNG_ERR_ELEMWRONG</a> = 38
+ <a name="XML_RELAXNG_ERR_TEXTWRONG" id="XML_RELAXNG_ERR_TEXTWRONG">XML_RELAXNG_ERR_TEXTWRONG</a> = 39
+}
+</pre><h3><a name="xmlRelaxNGCleanupTypes" id="xmlRelaxNGCleanupTypes"></a>Function: xmlRelaxNGCleanupTypes</h3><pre class="programlisting">void xmlRelaxNGCleanupTypes (void)<br />
+</pre><p>Cleanup the default Schemas type library associated to RelaxNG</p>
+<h3><a name="xmlRelaxNGDump" id="xmlRelaxNGDump"></a>Function: xmlRelaxNGDump</h3><pre class="programlisting">void xmlRelaxNGDump (FILE * output, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
+</pre><p>Dump a RelaxNG structure back</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlRelaxNGDumpTree" id="xmlRelaxNGDumpTree"></a>Function: xmlRelaxNGDumpTree</h3><pre class="programlisting">void xmlRelaxNGDumpTree (FILE * output, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
+</pre><p>Dump the transformed RelaxNG tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlRelaxNGFree" id="xmlRelaxNGFree"></a>Function: xmlRelaxNGFree</h3><pre class="programlisting">void xmlRelaxNGFree (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
+</pre><p>Deallocate a RelaxNG structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlRelaxNGFreeParserCtxt" id="xmlRelaxNGFreeParserCtxt"></a>Function: xmlRelaxNGFreeParserCtxt</h3><pre class="programlisting">void xmlRelaxNGFreeParserCtxt (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div><h3><a name="xmlRelaxNGFreeValidCtxt" id="xmlRelaxNGFreeValidCtxt"></a>Function: xmlRelaxNGFreeValidCtxt</h3><pre class="programlisting">void xmlRelaxNGFreeValidCtxt (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div><h3><a name="xmlRelaxNGGetParserErrors" id="xmlRelaxNGGetParserErrors"></a>Function: xmlRelaxNGGetParserErrors</h3><pre class="programlisting">int xmlRelaxNGGetParserErrors (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)<br />
+</pre><p>Get the callback information used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGGetValidErrors" id="xmlRelaxNGGetValidErrors"></a>Function: xmlRelaxNGGetValidErrors</h3><pre class="programlisting">int xmlRelaxNGGetValidErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)<br />
+</pre><p>Get the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGInitTypes" id="xmlRelaxNGInitTypes"></a>Function: xmlRelaxNGInitTypes</h3><pre class="programlisting">int xmlRelaxNGInitTypes (void)<br />
+</pre><p>Initilize the default type libraries.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewDocParserCtxt" id="xmlRelaxNGNewDocParserCtxt"></a>Function: xmlRelaxNGNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewMemParserCtxt" id="xmlRelaxNGNewMemParserCtxt"></a>Function: xmlRelaxNGNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt (const char * buffer, <br /> int size)<br />
+</pre><p>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewParserCtxt" id="xmlRelaxNGNewParserCtxt"></a>Function: xmlRelaxNGNewParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewParserCtxt (const char * URL)<br />
+</pre><p>Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewValidCtxt" id="xmlRelaxNGNewValidCtxt"></a>Function: xmlRelaxNGNewValidCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> xmlRelaxNGNewValidCtxt (<a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
+</pre><p>Create an XML RelaxNGs validation context based on the given schema</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML RelaxNGs</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGParse" id="xmlRelaxNGParse"></a>Function: xmlRelaxNGParse</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> xmlRelaxNGParse (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML RelaxNG structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetParserErrors" id="xmlRelaxNGSetParserErrors"></a>Function: xmlRelaxNGSetParserErrors</h3><pre class="programlisting">void xmlRelaxNGSetParserErrors (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)<br />
+</pre><p>Set the callback functions used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetParserStructuredErrors" id="xmlRelaxNGSetParserStructuredErrors"></a>Function: xmlRelaxNGSetParserStructuredErrors</h3><pre class="programlisting">void xmlRelaxNGSetParserStructuredErrors (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
+</pre><p>Set the callback functions used to handle errors for a parsing context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetValidErrors" id="xmlRelaxNGSetValidErrors"></a>Function: xmlRelaxNGSetValidErrors</h3><pre class="programlisting">void xmlRelaxNGSetValidErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> warn, <br /> void * ctx)<br />
+</pre><p>Set the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlRelaxNGSetValidStructuredErrors" id="xmlRelaxNGSetValidStructuredErrors"></a>Function: xmlRelaxNGSetValidStructuredErrors</h3><pre class="programlisting">void xmlRelaxNGSetValidStructuredErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidateDoc" id="xmlRelaxNGValidateDoc"></a>Function: xmlRelaxNGValidateDoc</h3><pre class="programlisting">int xmlRelaxNGValidateDoc (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Validate a document tree in memory.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidateFullElement" id="xmlRelaxNGValidateFullElement"></a>Function: xmlRelaxNGValidateFullElement</h3><pre class="programlisting">int xmlRelaxNGValidateFullElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePopElement" id="xmlRelaxNGValidatePopElement"></a>Function: xmlRelaxNGValidatePopElement</h3><pre class="programlisting">int xmlRelaxNGValidatePopElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Pop the element end from the RelaxNG validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePushCData" id="xmlRelaxNGValidatePushCData"></a>Function: xmlRelaxNGValidatePushCData</h3><pre class="programlisting">int xmlRelaxNGValidatePushCData (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)<br />
+</pre><p>check the CData parsed for validation in the current stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidatePushElement" id="xmlRelaxNGValidatePushElement"></a>Function: xmlRelaxNGValidatePushElement</h3><pre class="programlisting">int xmlRelaxNGValidatePushElement (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Push a new element start on the RelaxNG validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGValidityErrorFunc" id="xmlRelaxNGValidityErrorFunc"></a>Function type: xmlRelaxNGValidityErrorFunc</h3><pre class="programlisting">Function type: xmlRelaxNGValidityErrorFunc
+void xmlRelaxNGValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of an error callback from a Relax-NG validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<h3><a name="xmlRelaxNGValidityWarningFunc" id="xmlRelaxNGValidityWarningFunc"></a>Function type: xmlRelaxNGValidityWarningFunc</h3><pre class="programlisting">Function type: xmlRelaxNGValidityWarningFunc
+void xmlRelaxNGValidityWarningFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of a warning callback from a Relax-NG validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<h3><a name="xmlRelaxParserSetFlag" id="xmlRelaxParserSetFlag"></a>Function: xmlRelaxParserSetFlag</h3><pre class="programlisting">int xmlRelaxParserSetFlag (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> int flags)<br />
+</pre><p>Semi private function used to pass informations to a parser context which are a combination of <a href="libxml-relaxng.html#xmlRelaxNGParserFlag">xmlRelaxNGParserFlag</a> .</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a RelaxNG parser context</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of flags values</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-schemasInternals.html b/doc/html/libxml-schemasInternals.html
new file mode 100644
index 0000000..db4a5a1
--- /dev/null
+++ b/doc/html/libxml-schemasInternals.html
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module schemasInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schemasInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-relaxng.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-relaxng.html">relaxng</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="n" href="libxml-schematron.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_LAX">XML_SCHEMAS_ANYATTR_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_SKIP">XML_SCHEMAS_ANYATTR_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANYATTR_STRICT">XML_SCHEMAS_ANYATTR_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_LAX">XML_SCHEMAS_ANY_LAX</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_SKIP">XML_SCHEMAS_ANY_SKIP</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ANY_STRICT">XML_SCHEMAS_ANY_STRICT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_GLOBAL">XML_SCHEMAS_ATTRGROUP_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_HAS_REFS">XML_SCHEMAS_ATTRGROUP_HAS_REFS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_MARKED">XML_SCHEMAS_ATTRGROUP_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_REDEFINED">XML_SCHEMAS_ATTRGROUP_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED">XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_FIXED">XML_SCHEMAS_ATTR_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_GLOBAL">XML_SCHEMAS_ATTR_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_INTERNAL_RESOLVED">XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_NSDEFAULT">XML_SCHEMAS_ATTR_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_OPTIONAL">XML_SCHEMAS_ATTR_USE_OPTIONAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_PROHIBITED">XML_SCHEMAS_ATTR_USE_PROHIBITED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ATTR_USE_REQUIRED">XML_SCHEMAS_ATTR_USE_REQUIRED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION">XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION">XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION">XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_ABSTRACT">XML_SCHEMAS_ELEM_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_ABSENT">XML_SCHEMAS_ELEM_BLOCK_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_EXTENSION">XML_SCHEMAS_ELEM_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_RESTRICTION">XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION">XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_CIRCULAR">XML_SCHEMAS_ELEM_CIRCULAR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_DEFAULT">XML_SCHEMAS_ELEM_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_ABSENT">XML_SCHEMAS_ELEM_FINAL_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_EXTENSION">XML_SCHEMAS_ELEM_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FINAL_RESTRICTION">XML_SCHEMAS_ELEM_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_FIXED">XML_SCHEMAS_ELEM_FIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_CHECKED">XML_SCHEMAS_ELEM_INTERNAL_CHECKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_INTERNAL_RESOLVED">XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NILLABLE">XML_SCHEMAS_ELEM_NILLABLE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_NSDEFAULT">XML_SCHEMAS_ELEM_NSDEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_REF">XML_SCHEMAS_ELEM_REF</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD">XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_ELEM_TOPLEVEL">XML_SCHEMAS_ELEM_TOPLEVEL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_COLLAPSE">XML_SCHEMAS_FACET_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_PRESERVE">XML_SCHEMAS_FACET_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_REPLACE">XML_SCHEMAS_FACET_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FACET_UNKNOWN">XML_SCHEMAS_FACET_UNKNOWN</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_EXTENSION">XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_LIST">XML_SCHEMAS_FINAL_DEFAULT_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION">XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_FINAL_DEFAULT_UNION">XML_SCHEMAS_FINAL_DEFAULT_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_INCLUDING_CONVERT_NS">XML_SCHEMAS_INCLUDING_CONVERT_NS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ATTR">XML_SCHEMAS_QUALIF_ATTR</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_QUALIF_ELEM">XML_SCHEMAS_QUALIF_ELEM</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_ABSTRACT">XML_SCHEMAS_TYPE_ABSTRACT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_DEFAULT">XML_SCHEMAS_TYPE_BLOCK_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_EXTENSION">XML_SCHEMAS_TYPE_BLOCK_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BLOCK_RESTRICTION">XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE">XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION">XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FACETSNEEDVALUE">XML_SCHEMAS_TYPE_FACETSNEEDVALUE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_DEFAULT">XML_SCHEMAS_TYPE_FINAL_DEFAULT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_EXTENSION">XML_SCHEMAS_TYPE_FINAL_EXTENSION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_LIST">XML_SCHEMAS_TYPE_FINAL_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_RESTRICTION">XML_SCHEMAS_TYPE_FINAL_RESTRICTION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FINAL_UNION">XML_SCHEMAS_TYPE_FINAL_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_FIXUP_1">XML_SCHEMAS_TYPE_FIXUP_1</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_GLOBAL">XML_SCHEMAS_TYPE_GLOBAL</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_HAS_FACETS">XML_SCHEMAS_TYPE_HAS_FACETS</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_INVALID">XML_SCHEMAS_TYPE_INTERNAL_INVALID</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_INTERNAL_RESOLVED">XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MARKED">XML_SCHEMAS_TYPE_MARKED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_MIXED">XML_SCHEMAS_TYPE_MIXED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_NORMVALUENEEDED">XML_SCHEMAS_TYPE_NORMVALUENEEDED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD">XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_REDEFINED">XML_SCHEMAS_TYPE_REDEFINED</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ABSENT">XML_SCHEMAS_TYPE_VARIETY_ABSENT</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_ATOMIC">XML_SCHEMAS_TYPE_VARIETY_ATOMIC</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_LIST">XML_SCHEMAS_TYPE_VARIETY_LIST</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_VARIETY_UNION">XML_SCHEMAS_TYPE_VARIETY_UNION</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE">XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE">XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_TYPE_WHITESPACE_REPLACE">XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</a></pre><pre class="programlisting">#define <a href="#XML_SCHEMAS_WILDCARD_COMPLETE">XML_SCHEMAS_WILDCARD_COMPLETE</a></pre><pre class="programlisting">Structure <a href="#xmlSchemaAnnot">xmlSchemaAnnot</a><br />struct _xmlSchemaAnnot
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAnnot">xmlSchemaAnnot</a> * <a name="xmlSchemaAnnotPtr" id="xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaAttribute">xmlSchemaAttribute</a><br />struct _xmlSchemaAttribute
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a><br />struct _xmlSchemaAttributeGroup
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroup">xmlSchemaAttributeGroup</a> * <a name="xmlSchemaAttributeGroupPtr" id="xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a><br />struct _xmlSchemaAttributeLink
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAttributeLink">xmlSchemaAttributeLink</a> * <a name="xmlSchemaAttributeLinkPtr" id="xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaAttribute">xmlSchemaAttribute</a> * <a name="xmlSchemaAttributePtr" id="xmlSchemaAttributePtr">xmlSchemaAttributePtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchemaContentType">xmlSchemaContentType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaElement">xmlSchemaElement</a><br />struct _xmlSchemaElement
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaElement">xmlSchemaElement</a> * <a name="xmlSchemaElementPtr" id="xmlSchemaElementPtr">xmlSchemaElementPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaFacet">xmlSchemaFacet</a><br />struct _xmlSchemaFacet
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaFacetLink">xmlSchemaFacetLink</a><br />struct _xmlSchemaFacetLink
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaFacetLink">xmlSchemaFacetLink</a> * <a name="xmlSchemaFacetLinkPtr" id="xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaFacet">xmlSchemaFacet</a> * <a name="xmlSchemaFacetPtr" id="xmlSchemaFacetPtr">xmlSchemaFacetPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaNotation">xmlSchemaNotation</a><br />struct _xmlSchemaNotation
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaNotation">xmlSchemaNotation</a> * <a name="xmlSchemaNotationPtr" id="xmlSchemaNotationPtr">xmlSchemaNotationPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaType">xmlSchemaType</a><br />struct _xmlSchemaType
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaTypeLink">xmlSchemaTypeLink</a><br />struct _xmlSchemaTypeLink
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaTypeLink">xmlSchemaTypeLink</a> * <a name="xmlSchemaTypeLinkPtr" id="xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaType">xmlSchemaType</a> * <a name="xmlSchemaTypePtr" id="xmlSchemaTypePtr">xmlSchemaTypePtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchemaTypeType">xmlSchemaTypeType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaVal">xmlSchemaVal</a><br />struct _xmlSchemaVal
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaVal">xmlSchemaVal</a> * <a name="xmlSchemaValPtr" id="xmlSchemaValPtr">xmlSchemaValPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchemaValType">xmlSchemaValType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaWildcard">xmlSchemaWildcard</a><br />struct _xmlSchemaWildcard
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a><br />struct _xmlSchemaWildcardNs
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaWildcardNs">xmlSchemaWildcardNs</a> * <a name="xmlSchemaWildcardNsPtr" id="xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-schemasInternals.html#xmlSchemaWildcard">xmlSchemaWildcard</a> * <a name="xmlSchemaWildcardPtr" id="xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlSchemaFreeType">xmlSchemaFreeType</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFreeWildcard">xmlSchemaFreeWildcard</a> (<a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> wildcard)</pre>
+<h2>Description</h2>
+<h3><a name="XML_SCHEMAS_ANYATTR_LAX" id="XML_SCHEMAS_ANYATTR_LAX"></a>Macro: XML_SCHEMAS_ANYATTR_LAX</h3><pre>#define XML_SCHEMAS_ANYATTR_LAX</pre><p>Ignore validation non definition on attributes Obsolete, not used anymore.</p>
+<h3><a name="XML_SCHEMAS_ANYATTR_SKIP" id="XML_SCHEMAS_ANYATTR_SKIP"></a>Macro: XML_SCHEMAS_ANYATTR_SKIP</h3><pre>#define XML_SCHEMAS_ANYATTR_SKIP</pre><p>Skip unknown <a href="libxml-SAX.html#attribute">attribute</a> from validation Obsolete, not used anymore.</p>
+<h3><a name="XML_SCHEMAS_ANYATTR_STRICT" id="XML_SCHEMAS_ANYATTR_STRICT"></a>Macro: XML_SCHEMAS_ANYATTR_STRICT</h3><pre>#define XML_SCHEMAS_ANYATTR_STRICT</pre><p>Apply strict validation rules on attributes Obsolete, not used anymore.</p>
+<h3><a name="XML_SCHEMAS_ANY_LAX" id="XML_SCHEMAS_ANY_LAX"></a>Macro: XML_SCHEMAS_ANY_LAX</h3><pre>#define XML_SCHEMAS_ANY_LAX</pre><p>Used by wildcards. Validate if type found, don't worry if not found</p>
+<h3><a name="XML_SCHEMAS_ANY_SKIP" id="XML_SCHEMAS_ANY_SKIP"></a>Macro: XML_SCHEMAS_ANY_SKIP</h3><pre>#define XML_SCHEMAS_ANY_SKIP</pre><p>Skip unknown <a href="libxml-SAX.html#attribute">attribute</a> from validation</p>
+<h3><a name="XML_SCHEMAS_ANY_STRICT" id="XML_SCHEMAS_ANY_STRICT"></a>Macro: XML_SCHEMAS_ANY_STRICT</h3><pre>#define XML_SCHEMAS_ANY_STRICT</pre><p>Used by wildcards. Apply strict validation rules</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_GLOBAL" id="XML_SCHEMAS_ATTRGROUP_GLOBAL"></a>Macro: XML_SCHEMAS_ATTRGROUP_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTRGROUP_GLOBAL</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_HAS_REFS" id="XML_SCHEMAS_ATTRGROUP_HAS_REFS"></a>Macro: XML_SCHEMAS_ATTRGROUP_HAS_REFS</h3><pre>#define XML_SCHEMAS_ATTRGROUP_HAS_REFS</pre><p>Whether this attr. group contains attr. group references.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_MARKED" id="XML_SCHEMAS_ATTRGROUP_MARKED"></a>Macro: XML_SCHEMAS_ATTRGROUP_MARKED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_MARKED</pre><p>Marks the attr group as marked; used for circular checks.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_REDEFINED" id="XML_SCHEMAS_ATTRGROUP_REDEFINED"></a>Macro: XML_SCHEMAS_ATTRGROUP_REDEFINED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_REDEFINED</pre><p>The attr group was redefined.</p>
+<h3><a name="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED" id="XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED"></a>Macro: XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</h3><pre>#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> wildcard has been already builded.</p>
+<h3><a name="XML_SCHEMAS_ATTR_FIXED" id="XML_SCHEMAS_ATTR_FIXED"></a>Macro: XML_SCHEMAS_ATTR_FIXED</h3><pre>#define XML_SCHEMAS_ATTR_FIXED</pre><p>the <a href="libxml-SAX.html#attribute">attribute</a> has a fixed value</p>
+<h3><a name="XML_SCHEMAS_ATTR_GLOBAL" id="XML_SCHEMAS_ATTR_GLOBAL"></a>Macro: XML_SCHEMAS_ATTR_GLOBAL</h3><pre>#define XML_SCHEMAS_ATTR_GLOBAL</pre><p>allow elements in no namespace</p>
+<h3><a name="XML_SCHEMAS_ATTR_INTERNAL_RESOLVED" id="XML_SCHEMAS_ATTR_INTERNAL_RESOLVED"></a>Macro: XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</h3><pre>#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED</pre><p>this is set when the "type" and "ref" references have been resolved.</p>
+<h3><a name="XML_SCHEMAS_ATTR_NSDEFAULT" id="XML_SCHEMAS_ATTR_NSDEFAULT"></a>Macro: XML_SCHEMAS_ATTR_NSDEFAULT</h3><pre>#define XML_SCHEMAS_ATTR_NSDEFAULT</pre><p>allow elements in no namespace</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_OPTIONAL" id="XML_SCHEMAS_ATTR_USE_OPTIONAL"></a>Macro: XML_SCHEMAS_ATTR_USE_OPTIONAL</h3><pre>#define XML_SCHEMAS_ATTR_USE_OPTIONAL</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> is optional.</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_PROHIBITED" id="XML_SCHEMAS_ATTR_USE_PROHIBITED"></a>Macro: XML_SCHEMAS_ATTR_USE_PROHIBITED</h3><pre>#define XML_SCHEMAS_ATTR_USE_PROHIBITED</pre><p>Used by wildcards. The <a href="libxml-SAX.html#attribute">attribute</a> is prohibited.</p>
+<h3><a name="XML_SCHEMAS_ATTR_USE_REQUIRED" id="XML_SCHEMAS_ATTR_USE_REQUIRED"></a>Macro: XML_SCHEMAS_ATTR_USE_REQUIRED</h3><pre>#define XML_SCHEMAS_ATTR_USE_REQUIRED</pre><p>The <a href="libxml-SAX.html#attribute">attribute</a> is required.</p>
+<h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION" id="XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION"></a>Macro: XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</h3><pre>#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION</pre><p>the schema has "extension" in the set of blockDefault.</p>
+<h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION" id="XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION"></a>Macro: XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</h3><pre>#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION</pre><p>the schema has "restriction" in the set of blockDefault.</p>
+<h3><a name="XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION" id="XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION"></a>Macro: XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</h3><pre>#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION</pre><p>the schema has "substitution" in the set of blockDefault.</p>
+<h3><a name="XML_SCHEMAS_ELEM_ABSTRACT" id="XML_SCHEMAS_ELEM_ABSTRACT"></a>Macro: XML_SCHEMAS_ELEM_ABSTRACT</h3><pre>#define XML_SCHEMAS_ELEM_ABSTRACT</pre><p>the element is abstract</p>
+<h3><a name="XML_SCHEMAS_ELEM_BLOCK_ABSENT" id="XML_SCHEMAS_ELEM_BLOCK_ABSENT"></a>Macro: XML_SCHEMAS_ELEM_BLOCK_ABSENT</h3><pre>#define XML_SCHEMAS_ELEM_BLOCK_ABSENT</pre><p>the "block" <a href="libxml-SAX.html#attribute">attribute</a> is absent</p>
+<h3><a name="XML_SCHEMAS_ELEM_BLOCK_EXTENSION" id="XML_SCHEMAS_ELEM_BLOCK_EXTENSION"></a>Macro: XML_SCHEMAS_ELEM_BLOCK_EXTENSION</h3><pre>#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION</pre><p>disallowed substitutions are absent</p>
+<h3><a name="XML_SCHEMAS_ELEM_BLOCK_RESTRICTION" id="XML_SCHEMAS_ELEM_BLOCK_RESTRICTION"></a>Macro: XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</h3><pre>#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION</pre><p>disallowed substitutions: "restriction"</p>
+<h3><a name="XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION" id="XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION"></a>Macro: XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</h3><pre>#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION</pre><p>disallowed substitutions: "substituion"</p>
+<h3><a name="XML_SCHEMAS_ELEM_CIRCULAR" id="XML_SCHEMAS_ELEM_CIRCULAR"></a>Macro: XML_SCHEMAS_ELEM_CIRCULAR</h3><pre>#define XML_SCHEMAS_ELEM_CIRCULAR</pre><p>a helper flag for the search of circular references.</p>
+<h3><a name="XML_SCHEMAS_ELEM_DEFAULT" id="XML_SCHEMAS_ELEM_DEFAULT"></a>Macro: XML_SCHEMAS_ELEM_DEFAULT</h3><pre>#define XML_SCHEMAS_ELEM_DEFAULT</pre><p>the element has a default value</p>
+<h3><a name="XML_SCHEMAS_ELEM_FINAL_ABSENT" id="XML_SCHEMAS_ELEM_FINAL_ABSENT"></a>Macro: XML_SCHEMAS_ELEM_FINAL_ABSENT</h3><pre>#define XML_SCHEMAS_ELEM_FINAL_ABSENT</pre><p>substitution group exclusions are absent</p>
+<h3><a name="XML_SCHEMAS_ELEM_FINAL_EXTENSION" id="XML_SCHEMAS_ELEM_FINAL_EXTENSION"></a>Macro: XML_SCHEMAS_ELEM_FINAL_EXTENSION</h3><pre>#define XML_SCHEMAS_ELEM_FINAL_EXTENSION</pre><p>substitution group exclusions: "extension"</p>
+<h3><a name="XML_SCHEMAS_ELEM_FINAL_RESTRICTION" id="XML_SCHEMAS_ELEM_FINAL_RESTRICTION"></a>Macro: XML_SCHEMAS_ELEM_FINAL_RESTRICTION</h3><pre>#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION</pre><p>substitution group exclusions: "restriction"</p>
+<h3><a name="XML_SCHEMAS_ELEM_FIXED" id="XML_SCHEMAS_ELEM_FIXED"></a>Macro: XML_SCHEMAS_ELEM_FIXED</h3><pre>#define XML_SCHEMAS_ELEM_FIXED</pre><p>the element has a fixed value</p>
+<h3><a name="XML_SCHEMAS_ELEM_GLOBAL" id="XML_SCHEMAS_ELEM_GLOBAL"></a>Macro: XML_SCHEMAS_ELEM_GLOBAL</h3><pre>#define XML_SCHEMAS_ELEM_GLOBAL</pre><p>the element is global</p>
+<h3><a name="XML_SCHEMAS_ELEM_INTERNAL_CHECKED" id="XML_SCHEMAS_ELEM_INTERNAL_CHECKED"></a>Macro: XML_SCHEMAS_ELEM_INTERNAL_CHECKED</h3><pre>#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED</pre><p>this is set when the elem decl has been checked against all constraints</p>
+<h3><a name="XML_SCHEMAS_ELEM_INTERNAL_RESOLVED" id="XML_SCHEMAS_ELEM_INTERNAL_RESOLVED"></a>Macro: XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</h3><pre>#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED</pre><p>this is set when "type", "ref", "substitutionGroup" references have been resolved.</p>
+<h3><a name="XML_SCHEMAS_ELEM_NILLABLE" id="XML_SCHEMAS_ELEM_NILLABLE"></a>Macro: XML_SCHEMAS_ELEM_NILLABLE</h3><pre>#define XML_SCHEMAS_ELEM_NILLABLE</pre><p>the element is nillable</p>
+<h3><a name="XML_SCHEMAS_ELEM_NSDEFAULT" id="XML_SCHEMAS_ELEM_NSDEFAULT"></a>Macro: XML_SCHEMAS_ELEM_NSDEFAULT</h3><pre>#define XML_SCHEMAS_ELEM_NSDEFAULT</pre><p>allow elements in no namespace Obsolete, not used anymore.</p>
+<h3><a name="XML_SCHEMAS_ELEM_REF" id="XML_SCHEMAS_ELEM_REF"></a>Macro: XML_SCHEMAS_ELEM_REF</h3><pre>#define XML_SCHEMAS_ELEM_REF</pre><p>the element is a <a href="libxml-SAX.html#reference">reference</a> to a type</p>
+<h3><a name="XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD" id="XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD"></a>Macro: XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</h3><pre>#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD</pre><p>the declaration is a substitution group head</p>
+<h3><a name="XML_SCHEMAS_ELEM_TOPLEVEL" id="XML_SCHEMAS_ELEM_TOPLEVEL"></a>Macro: XML_SCHEMAS_ELEM_TOPLEVEL</h3><pre>#define XML_SCHEMAS_ELEM_TOPLEVEL</pre><p>the element is top level obsolete: use <a href="libxml-schemasInternals.html#XML_SCHEMAS_ELEM_GLOBAL">XML_SCHEMAS_ELEM_GLOBAL</a> instead</p>
+<h3><a name="XML_SCHEMAS_FACET_COLLAPSE" id="XML_SCHEMAS_FACET_COLLAPSE"></a>Macro: XML_SCHEMAS_FACET_COLLAPSE</h3><pre>#define XML_SCHEMAS_FACET_COLLAPSE</pre><p>collapse the types of the facet</p>
+<h3><a name="XML_SCHEMAS_FACET_PRESERVE" id="XML_SCHEMAS_FACET_PRESERVE"></a>Macro: XML_SCHEMAS_FACET_PRESERVE</h3><pre>#define XML_SCHEMAS_FACET_PRESERVE</pre><p>preserve the type of the facet</p>
+<h3><a name="XML_SCHEMAS_FACET_REPLACE" id="XML_SCHEMAS_FACET_REPLACE"></a>Macro: XML_SCHEMAS_FACET_REPLACE</h3><pre>#define XML_SCHEMAS_FACET_REPLACE</pre><p>replace the type of the facet</p>
+<h3><a name="XML_SCHEMAS_FACET_UNKNOWN" id="XML_SCHEMAS_FACET_UNKNOWN"></a>Macro: XML_SCHEMAS_FACET_UNKNOWN</h3><pre>#define XML_SCHEMAS_FACET_UNKNOWN</pre><p>unknown facet handling</p>
+<h3><a name="XML_SCHEMAS_FINAL_DEFAULT_EXTENSION" id="XML_SCHEMAS_FINAL_DEFAULT_EXTENSION"></a>Macro: XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</h3><pre>#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION</pre><p>the schema has "extension" in the set of finalDefault.</p>
+<h3><a name="XML_SCHEMAS_FINAL_DEFAULT_LIST" id="XML_SCHEMAS_FINAL_DEFAULT_LIST"></a>Macro: XML_SCHEMAS_FINAL_DEFAULT_LIST</h3><pre>#define XML_SCHEMAS_FINAL_DEFAULT_LIST</pre><p>the cshema has "list" in the set of finalDefault.</p>
+<h3><a name="XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION" id="XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION"></a>Macro: XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</h3><pre>#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION</pre><p>the schema has "restriction" in the set of finalDefault.</p>
+<h3><a name="XML_SCHEMAS_FINAL_DEFAULT_UNION" id="XML_SCHEMAS_FINAL_DEFAULT_UNION"></a>Macro: XML_SCHEMAS_FINAL_DEFAULT_UNION</h3><pre>#define XML_SCHEMAS_FINAL_DEFAULT_UNION</pre><p>the schema has "union" in the set of finalDefault.</p>
+<h3><a name="XML_SCHEMAS_INCLUDING_CONVERT_NS" id="XML_SCHEMAS_INCLUDING_CONVERT_NS"></a>Macro: XML_SCHEMAS_INCLUDING_CONVERT_NS</h3><pre>#define XML_SCHEMAS_INCLUDING_CONVERT_NS</pre><p>the schema is currently including an other schema with no target namespace.</p>
+<h3><a name="XML_SCHEMAS_QUALIF_ATTR" id="XML_SCHEMAS_QUALIF_ATTR"></a>Macro: XML_SCHEMAS_QUALIF_ATTR</h3><pre>#define XML_SCHEMAS_QUALIF_ATTR</pre><p>Reflects attributeFormDefault == qualified in an XML schema document.</p>
+<h3><a name="XML_SCHEMAS_QUALIF_ELEM" id="XML_SCHEMAS_QUALIF_ELEM"></a>Macro: XML_SCHEMAS_QUALIF_ELEM</h3><pre>#define XML_SCHEMAS_QUALIF_ELEM</pre><p>Reflects elementFormDefault == qualified in an XML schema document.</p>
+<h3><a name="XML_SCHEMAS_TYPE_ABSTRACT" id="XML_SCHEMAS_TYPE_ABSTRACT"></a>Macro: XML_SCHEMAS_TYPE_ABSTRACT</h3><pre>#define XML_SCHEMAS_TYPE_ABSTRACT</pre><p>the simple/complexType is abstract.</p>
+<h3><a name="XML_SCHEMAS_TYPE_BLOCK_DEFAULT" id="XML_SCHEMAS_TYPE_BLOCK_DEFAULT"></a>Macro: XML_SCHEMAS_TYPE_BLOCK_DEFAULT</h3><pre>#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT</pre><p>the complexType did not specify 'block' so use the default of the &lt;schema&gt; item.</p>
+<h3><a name="XML_SCHEMAS_TYPE_BLOCK_EXTENSION" id="XML_SCHEMAS_TYPE_BLOCK_EXTENSION"></a>Macro: XML_SCHEMAS_TYPE_BLOCK_EXTENSION</h3><pre>#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION</pre><p>the complexType has a 'block' of "extension".</p>
+<h3><a name="XML_SCHEMAS_TYPE_BLOCK_RESTRICTION" id="XML_SCHEMAS_TYPE_BLOCK_RESTRICTION"></a>Macro: XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</h3><pre>#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION</pre><p>the complexType has a 'block' of "restriction".</p>
+<h3><a name="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE" id="XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE"></a>Macro: XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</h3><pre>#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE</pre><p>Marks the item as a builtin primitive.</p>
+<h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION" id="XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION"></a>Macro: XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</h3><pre>#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION</pre><p>the simple or complex type has a derivation method of "extension".</p>
+<h3><a name="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION" id="XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION"></a>Macro: XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</h3><pre>#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION</pre><p>the simple or complex type has a derivation method of "restriction".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FACETSNEEDVALUE" id="XML_SCHEMAS_TYPE_FACETSNEEDVALUE"></a>Macro: XML_SCHEMAS_TYPE_FACETSNEEDVALUE</h3><pre>#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE</pre><p>indicates if the facets need a computed value</p>
+<h3><a name="XML_SCHEMAS_TYPE_FINAL_DEFAULT" id="XML_SCHEMAS_TYPE_FINAL_DEFAULT"></a>Macro: XML_SCHEMAS_TYPE_FINAL_DEFAULT</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_DEFAULT</pre><p>the simpleType has a final of "default".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FINAL_EXTENSION" id="XML_SCHEMAS_TYPE_FINAL_EXTENSION"></a>Macro: XML_SCHEMAS_TYPE_FINAL_EXTENSION</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_EXTENSION</pre><p>the complexType has a final of "extension".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FINAL_LIST" id="XML_SCHEMAS_TYPE_FINAL_LIST"></a>Macro: XML_SCHEMAS_TYPE_FINAL_LIST</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_LIST</pre><p>the simpleType has a final of "list".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FINAL_RESTRICTION" id="XML_SCHEMAS_TYPE_FINAL_RESTRICTION"></a>Macro: XML_SCHEMAS_TYPE_FINAL_RESTRICTION</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION</pre><p>the simpleType/complexType has a final of "restriction".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FINAL_UNION" id="XML_SCHEMAS_TYPE_FINAL_UNION"></a>Macro: XML_SCHEMAS_TYPE_FINAL_UNION</h3><pre>#define XML_SCHEMAS_TYPE_FINAL_UNION</pre><p>the simpleType has a final of "union".</p>
+<h3><a name="XML_SCHEMAS_TYPE_FIXUP_1" id="XML_SCHEMAS_TYPE_FIXUP_1"></a>Macro: XML_SCHEMAS_TYPE_FIXUP_1</h3><pre>#define XML_SCHEMAS_TYPE_FIXUP_1</pre><p>First stage of fixup was done.</p>
+<h3><a name="XML_SCHEMAS_TYPE_GLOBAL" id="XML_SCHEMAS_TYPE_GLOBAL"></a>Macro: XML_SCHEMAS_TYPE_GLOBAL</h3><pre>#define XML_SCHEMAS_TYPE_GLOBAL</pre><p>the type is global</p>
+<h3><a name="XML_SCHEMAS_TYPE_HAS_FACETS" id="XML_SCHEMAS_TYPE_HAS_FACETS"></a>Macro: XML_SCHEMAS_TYPE_HAS_FACETS</h3><pre>#define XML_SCHEMAS_TYPE_HAS_FACETS</pre><p>has facets</p>
+<h3><a name="XML_SCHEMAS_TYPE_INTERNAL_INVALID" id="XML_SCHEMAS_TYPE_INTERNAL_INVALID"></a>Macro: XML_SCHEMAS_TYPE_INTERNAL_INVALID</h3><pre>#define XML_SCHEMAS_TYPE_INTERNAL_INVALID</pre><p>indicates that the type is invalid</p>
+<h3><a name="XML_SCHEMAS_TYPE_INTERNAL_RESOLVED" id="XML_SCHEMAS_TYPE_INTERNAL_RESOLVED"></a>Macro: XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</h3><pre>#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED</pre><p>indicates that the type was typefixed</p>
+<h3><a name="XML_SCHEMAS_TYPE_MARKED" id="XML_SCHEMAS_TYPE_MARKED"></a>Macro: XML_SCHEMAS_TYPE_MARKED</h3><pre>#define XML_SCHEMAS_TYPE_MARKED</pre><p>Marks the item as marked; used for circular checks.</p>
+<h3><a name="XML_SCHEMAS_TYPE_MIXED" id="XML_SCHEMAS_TYPE_MIXED"></a>Macro: XML_SCHEMAS_TYPE_MIXED</h3><pre>#define XML_SCHEMAS_TYPE_MIXED</pre><p>the element content type is mixed</p>
+<h3><a name="XML_SCHEMAS_TYPE_NORMVALUENEEDED" id="XML_SCHEMAS_TYPE_NORMVALUENEEDED"></a>Macro: XML_SCHEMAS_TYPE_NORMVALUENEEDED</h3><pre>#define XML_SCHEMAS_TYPE_NORMVALUENEEDED</pre><p>indicates if the facets (pattern) need a normalized value</p>
+<h3><a name="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD" id="XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD"></a>Macro: XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</h3><pre>#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD</pre><p>the complexType owns an <a href="libxml-SAX.html#attribute">attribute</a> wildcard, i.e. it can be freed by the complexType</p>
+<h3><a name="XML_SCHEMAS_TYPE_REDEFINED" id="XML_SCHEMAS_TYPE_REDEFINED"></a>Macro: XML_SCHEMAS_TYPE_REDEFINED</h3><pre>#define XML_SCHEMAS_TYPE_REDEFINED</pre><p>The type was redefined.</p>
+<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ABSENT" id="XML_SCHEMAS_TYPE_VARIETY_ABSENT"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ABSENT</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ABSENT</pre><p>the simpleType has a variety of "absent". TODO: Actually not necessary :-/, since if none of the variety flags occur then it's automatically absent.</p>
+<h3><a name="XML_SCHEMAS_TYPE_VARIETY_ATOMIC" id="XML_SCHEMAS_TYPE_VARIETY_ATOMIC"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_ATOMIC</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC</pre><p>the simpleType has a variety of "union".</p>
+<h3><a name="XML_SCHEMAS_TYPE_VARIETY_LIST" id="XML_SCHEMAS_TYPE_VARIETY_LIST"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_LIST</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_LIST</pre><p>the simpleType has a variety of "list".</p>
+<h3><a name="XML_SCHEMAS_TYPE_VARIETY_UNION" id="XML_SCHEMAS_TYPE_VARIETY_UNION"></a>Macro: XML_SCHEMAS_TYPE_VARIETY_UNION</h3><pre>#define XML_SCHEMAS_TYPE_VARIETY_UNION</pre><p>the simpleType has a variety of "union".</p>
+<h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE" id="XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE"></a>Macro: XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</h3><pre>#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE</pre><p>a whitespace-facet value of "collapse"</p>
+<h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE" id="XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE"></a>Macro: XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</h3><pre>#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE</pre><p>a whitespace-facet value of "preserve"</p>
+<h3><a name="XML_SCHEMAS_TYPE_WHITESPACE_REPLACE" id="XML_SCHEMAS_TYPE_WHITESPACE_REPLACE"></a>Macro: XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</h3><pre>#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE</pre><p>a whitespace-facet value of "replace"</p>
+<h3><a name="XML_SCHEMAS_WILDCARD_COMPLETE" id="XML_SCHEMAS_WILDCARD_COMPLETE"></a>Macro: XML_SCHEMAS_WILDCARD_COMPLETE</h3><pre>#define XML_SCHEMAS_WILDCARD_COMPLETE</pre><p>If the wildcard is complete.</p>
+<h3><a name="xmlSchemaAnnot" id="xmlSchemaAnnot">Structure xmlSchemaAnnot</a></h3><pre class="programlisting">Structure xmlSchemaAnnot<br />struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot * next
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> content : the annotation
+}</pre><h3><a name="xmlSchemaAttribute" id="xmlSchemaAttribute">Structure xmlSchemaAttribute</a></h3><pre class="programlisting">Structure xmlSchemaAttribute<br />struct _xmlSchemaAttribute {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type
+ struct _xmlSchemaAttribute * next : the next <a href="libxml-SAX.html#attribute">attribute</a> (not used?)
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the declaration
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * typeName : the local name of the type definition
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * typeNs : the ns URI of the type definition
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base : Deprecated; not used
+ int occurs : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defValue : The initial value of the value constrai
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ int flags
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value constraint
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> refDecl : Deprecated; not used
+}</pre><h3><a name="xmlSchemaAttributeGroup" id="xmlSchemaAttributeGroup">Structure xmlSchemaAttributeGroup</a></h3><pre class="programlisting">Structure xmlSchemaAttributeGroup<br />struct _xmlSchemaAttributeGroup {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaAttribute * next : the next <a href="libxml-SAX.html#attribute">attribute</a> if in a group ...
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int flags
+ <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributeGroupPtr">xmlSchemaAttributeGroupPtr</a> refItem : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ void * attrUses
+}</pre><h3><a name="xmlSchemaAttributeLink" id="xmlSchemaAttributeLink">Structure xmlSchemaAttributeLink</a></h3><pre class="programlisting">Structure xmlSchemaAttributeLink<br />struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink * next : the next <a href="libxml-SAX.html#attribute">attribute</a> link ...
+ struct _xmlSchemaAttribute * attr : the linked <a href="libxml-SAX.html#attribute">attribute</a>
+}</pre><h3>Enum <a name="xmlSchemaContentType" id="xmlSchemaContentType">xmlSchemaContentType</a></h3><pre class="programlisting">Enum xmlSchemaContentType {
+ <a name="XML_SCHEMA_CONTENT_UNKNOWN" id="XML_SCHEMA_CONTENT_UNKNOWN">XML_SCHEMA_CONTENT_UNKNOWN</a> = 0
+ <a name="XML_SCHEMA_CONTENT_EMPTY" id="XML_SCHEMA_CONTENT_EMPTY">XML_SCHEMA_CONTENT_EMPTY</a> = 1
+ <a name="XML_SCHEMA_CONTENT_ELEMENTS" id="XML_SCHEMA_CONTENT_ELEMENTS">XML_SCHEMA_CONTENT_ELEMENTS</a> = 2
+ <a name="XML_SCHEMA_CONTENT_MIXED" id="XML_SCHEMA_CONTENT_MIXED">XML_SCHEMA_CONTENT_MIXED</a> = 3
+ <a name="XML_SCHEMA_CONTENT_SIMPLE" id="XML_SCHEMA_CONTENT_SIMPLE">XML_SCHEMA_CONTENT_SIMPLE</a> = 4
+ <a name="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS" id="XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS">XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS</a> = 5 : Obsolete
+ <a name="XML_SCHEMA_CONTENT_BASIC" id="XML_SCHEMA_CONTENT_BASIC">XML_SCHEMA_CONTENT_BASIC</a> = 6
+ <a name="XML_SCHEMA_CONTENT_ANY" id="XML_SCHEMA_CONTENT_ANY">XML_SCHEMA_CONTENT_ANY</a> = 7
+}
+</pre><h3><a name="xmlSchemaElement" id="xmlSchemaElement">Structure xmlSchemaElement</a></h3><pre class="programlisting">Structure xmlSchemaElement<br />struct _xmlSchemaElement {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaType * next : Not used?
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes : the type definition
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int flags
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namedType
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namedTypeNs
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * substGroup
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * substGroupNs
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * scope
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The original value of the value constra
+ struct _xmlSchemaElement * refDecl : This will now be used for the substitut
+ <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Obsolete for WXS, maybe used for RelaxN
+ <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> defVal : The compiled value contraint.
+ void * idcs : The identity-constraint defs
+}</pre><h3><a name="xmlSchemaFacet" id="xmlSchemaFacet">Structure xmlSchemaFacet</a></h3><pre class="programlisting">Structure xmlSchemaFacet<br />struct _xmlSchemaFacet {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaFacet * next : the next type if in a sequence ...
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The original value
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int fixed : XML_SCHEMAS_FACET_PRESERVE, etc.
+ int whitespace
+ <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val : The compiled value
+ <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp : The regex for patterns
+}</pre><h3><a name="xmlSchemaFacetLink" id="xmlSchemaFacetLink">Structure xmlSchemaFacetLink</a></h3><pre class="programlisting">Structure xmlSchemaFacetLink<br />struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink * next : the next facet link ...
+ <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet : the linked facet
+}</pre><h3><a name="xmlSchemaNotation" id="xmlSchemaNotation">Structure xmlSchemaNotation</a></h3><pre class="programlisting">Structure xmlSchemaNotation<br />struct _xmlSchemaNotation {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * identifier
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+}</pre><h3><a name="xmlSchemaType" id="xmlSchemaType">Structure xmlSchemaType</a></h3><pre class="programlisting">Structure xmlSchemaType<br />struct _xmlSchemaType {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ struct _xmlSchemaType * next : the next type if in a sequence ...
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ref : Deprecated; not used
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refNs : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> subtypes
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributePtr">xmlSchemaAttributePtr</a> attributes : Deprecated; not used
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int flags
+ <a href="libxml-schemasInternals.html#xmlSchemaContentType">xmlSchemaContentType</a> contentType
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base : Base type's local name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * baseNs : Base type's target namespace
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> baseType : The base type component
+ <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facets : Local facets
+ struct _xmlSchemaType * redef : Deprecated; not used
+ int recurse : Obsolete
+ <a href="libxml-schemasInternals.html#xmlSchemaAttributeLinkPtr">xmlSchemaAttributeLinkPtr</a> * attributeUses : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> attributeWildcard
+ int builtInType : Type of built-in types.
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeLinkPtr">xmlSchemaTypeLinkPtr</a> memberTypes : member-types if a union type.
+ <a href="libxml-schemasInternals.html#xmlSchemaFacetLinkPtr">xmlSchemaFacetLinkPtr</a> facetSet : All facets (incl. inherited)
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * refPrefix : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> contentTypeDef : Used for the simple content of complex
+ <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : Holds the automaton of the content mode
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace
+ void * attrUses
+}</pre><h3><a name="xmlSchemaTypeLink" id="xmlSchemaTypeLink">Structure xmlSchemaTypeLink</a></h3><pre class="programlisting">Structure xmlSchemaTypeLink<br />struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink * next : the next type link ...
+ <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type : the linked type
+}</pre><h3>Enum <a name="xmlSchemaTypeType" id="xmlSchemaTypeType">xmlSchemaTypeType</a></h3><pre class="programlisting">Enum xmlSchemaTypeType {
+ <a name="XML_SCHEMA_TYPE_BASIC" id="XML_SCHEMA_TYPE_BASIC">XML_SCHEMA_TYPE_BASIC</a> = 1 : A built-in datatype
+ <a name="XML_SCHEMA_TYPE_ANY" id="XML_SCHEMA_TYPE_ANY">XML_SCHEMA_TYPE_ANY</a> = 2
+ <a name="XML_SCHEMA_TYPE_FACET" id="XML_SCHEMA_TYPE_FACET">XML_SCHEMA_TYPE_FACET</a> = 3
+ <a name="XML_SCHEMA_TYPE_SIMPLE" id="XML_SCHEMA_TYPE_SIMPLE">XML_SCHEMA_TYPE_SIMPLE</a> = 4
+ <a name="XML_SCHEMA_TYPE_COMPLEX" id="XML_SCHEMA_TYPE_COMPLEX">XML_SCHEMA_TYPE_COMPLEX</a> = 5
+ <a name="XML_SCHEMA_TYPE_SEQUENCE" id="XML_SCHEMA_TYPE_SEQUENCE">XML_SCHEMA_TYPE_SEQUENCE</a> = 6
+ <a name="XML_SCHEMA_TYPE_CHOICE" id="XML_SCHEMA_TYPE_CHOICE">XML_SCHEMA_TYPE_CHOICE</a> = 7
+ <a name="XML_SCHEMA_TYPE_ALL" id="XML_SCHEMA_TYPE_ALL">XML_SCHEMA_TYPE_ALL</a> = 8
+ <a name="XML_SCHEMA_TYPE_SIMPLE_CONTENT" id="XML_SCHEMA_TYPE_SIMPLE_CONTENT">XML_SCHEMA_TYPE_SIMPLE_CONTENT</a> = 9
+ <a name="XML_SCHEMA_TYPE_COMPLEX_CONTENT" id="XML_SCHEMA_TYPE_COMPLEX_CONTENT">XML_SCHEMA_TYPE_COMPLEX_CONTENT</a> = 10
+ <a name="XML_SCHEMA_TYPE_UR" id="XML_SCHEMA_TYPE_UR">XML_SCHEMA_TYPE_UR</a> = 11
+ <a name="XML_SCHEMA_TYPE_RESTRICTION" id="XML_SCHEMA_TYPE_RESTRICTION">XML_SCHEMA_TYPE_RESTRICTION</a> = 12
+ <a name="XML_SCHEMA_TYPE_EXTENSION" id="XML_SCHEMA_TYPE_EXTENSION">XML_SCHEMA_TYPE_EXTENSION</a> = 13
+ <a name="XML_SCHEMA_TYPE_ELEMENT" id="XML_SCHEMA_TYPE_ELEMENT">XML_SCHEMA_TYPE_ELEMENT</a> = 14
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTE" id="XML_SCHEMA_TYPE_ATTRIBUTE">XML_SCHEMA_TYPE_ATTRIBUTE</a> = 15
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTEGROUP" id="XML_SCHEMA_TYPE_ATTRIBUTEGROUP">XML_SCHEMA_TYPE_ATTRIBUTEGROUP</a> = 16
+ <a name="XML_SCHEMA_TYPE_GROUP" id="XML_SCHEMA_TYPE_GROUP">XML_SCHEMA_TYPE_GROUP</a> = 17
+ <a name="XML_SCHEMA_TYPE_NOTATION" id="XML_SCHEMA_TYPE_NOTATION">XML_SCHEMA_TYPE_NOTATION</a> = 18
+ <a name="XML_SCHEMA_TYPE_LIST" id="XML_SCHEMA_TYPE_LIST">XML_SCHEMA_TYPE_LIST</a> = 19
+ <a name="XML_SCHEMA_TYPE_UNION" id="XML_SCHEMA_TYPE_UNION">XML_SCHEMA_TYPE_UNION</a> = 20
+ <a name="XML_SCHEMA_TYPE_ANY_ATTRIBUTE" id="XML_SCHEMA_TYPE_ANY_ATTRIBUTE">XML_SCHEMA_TYPE_ANY_ATTRIBUTE</a> = 21
+ <a name="XML_SCHEMA_TYPE_IDC_UNIQUE" id="XML_SCHEMA_TYPE_IDC_UNIQUE">XML_SCHEMA_TYPE_IDC_UNIQUE</a> = 22
+ <a name="XML_SCHEMA_TYPE_IDC_KEY" id="XML_SCHEMA_TYPE_IDC_KEY">XML_SCHEMA_TYPE_IDC_KEY</a> = 23
+ <a name="XML_SCHEMA_TYPE_IDC_KEYREF" id="XML_SCHEMA_TYPE_IDC_KEYREF">XML_SCHEMA_TYPE_IDC_KEYREF</a> = 24
+ <a name="XML_SCHEMA_TYPE_PARTICLE" id="XML_SCHEMA_TYPE_PARTICLE">XML_SCHEMA_TYPE_PARTICLE</a> = 25
+ <a name="XML_SCHEMA_TYPE_ATTRIBUTE_USE" id="XML_SCHEMA_TYPE_ATTRIBUTE_USE">XML_SCHEMA_TYPE_ATTRIBUTE_USE</a> = 26
+ <a name="XML_SCHEMA_FACET_MININCLUSIVE" id="XML_SCHEMA_FACET_MININCLUSIVE">XML_SCHEMA_FACET_MININCLUSIVE</a> = 1000
+ <a name="XML_SCHEMA_FACET_MINEXCLUSIVE" id="XML_SCHEMA_FACET_MINEXCLUSIVE">XML_SCHEMA_FACET_MINEXCLUSIVE</a> = 1001
+ <a name="XML_SCHEMA_FACET_MAXINCLUSIVE" id="XML_SCHEMA_FACET_MAXINCLUSIVE">XML_SCHEMA_FACET_MAXINCLUSIVE</a> = 1002
+ <a name="XML_SCHEMA_FACET_MAXEXCLUSIVE" id="XML_SCHEMA_FACET_MAXEXCLUSIVE">XML_SCHEMA_FACET_MAXEXCLUSIVE</a> = 1003
+ <a name="XML_SCHEMA_FACET_TOTALDIGITS" id="XML_SCHEMA_FACET_TOTALDIGITS">XML_SCHEMA_FACET_TOTALDIGITS</a> = 1004
+ <a name="XML_SCHEMA_FACET_FRACTIONDIGITS" id="XML_SCHEMA_FACET_FRACTIONDIGITS">XML_SCHEMA_FACET_FRACTIONDIGITS</a> = 1005
+ <a name="XML_SCHEMA_FACET_PATTERN" id="XML_SCHEMA_FACET_PATTERN">XML_SCHEMA_FACET_PATTERN</a> = 1006
+ <a name="XML_SCHEMA_FACET_ENUMERATION" id="XML_SCHEMA_FACET_ENUMERATION">XML_SCHEMA_FACET_ENUMERATION</a> = 1007
+ <a name="XML_SCHEMA_FACET_WHITESPACE" id="XML_SCHEMA_FACET_WHITESPACE">XML_SCHEMA_FACET_WHITESPACE</a> = 1008
+ <a name="XML_SCHEMA_FACET_LENGTH" id="XML_SCHEMA_FACET_LENGTH">XML_SCHEMA_FACET_LENGTH</a> = 1009
+ <a name="XML_SCHEMA_FACET_MAXLENGTH" id="XML_SCHEMA_FACET_MAXLENGTH">XML_SCHEMA_FACET_MAXLENGTH</a> = 1010
+ <a name="XML_SCHEMA_FACET_MINLENGTH" id="XML_SCHEMA_FACET_MINLENGTH">XML_SCHEMA_FACET_MINLENGTH</a> = 1011
+ <a name="XML_SCHEMA_EXTRA_QNAMEREF" id="XML_SCHEMA_EXTRA_QNAMEREF">XML_SCHEMA_EXTRA_QNAMEREF</a> = 2000
+ <a name="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB" id="XML_SCHEMA_EXTRA_ATTR_USE_PROHIB">XML_SCHEMA_EXTRA_ATTR_USE_PROHIB</a> = 2001
+}
+</pre><h3><a name="xmlSchemaVal" id="xmlSchemaVal">Structure xmlSchemaVal</a></h3><pre class="programlisting">Structure xmlSchemaVal<br />struct _xmlSchemaVal {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlSchemaValType" id="xmlSchemaValType">xmlSchemaValType</a></h3><pre class="programlisting">Enum xmlSchemaValType {
+ <a name="XML_SCHEMAS_UNKNOWN" id="XML_SCHEMAS_UNKNOWN">XML_SCHEMAS_UNKNOWN</a> = 0
+ <a name="XML_SCHEMAS_STRING" id="XML_SCHEMAS_STRING">XML_SCHEMAS_STRING</a> = 1
+ <a name="XML_SCHEMAS_NORMSTRING" id="XML_SCHEMAS_NORMSTRING">XML_SCHEMAS_NORMSTRING</a> = 2
+ <a name="XML_SCHEMAS_DECIMAL" id="XML_SCHEMAS_DECIMAL">XML_SCHEMAS_DECIMAL</a> = 3
+ <a name="XML_SCHEMAS_TIME" id="XML_SCHEMAS_TIME">XML_SCHEMAS_TIME</a> = 4
+ <a name="XML_SCHEMAS_GDAY" id="XML_SCHEMAS_GDAY">XML_SCHEMAS_GDAY</a> = 5
+ <a name="XML_SCHEMAS_GMONTH" id="XML_SCHEMAS_GMONTH">XML_SCHEMAS_GMONTH</a> = 6
+ <a name="XML_SCHEMAS_GMONTHDAY" id="XML_SCHEMAS_GMONTHDAY">XML_SCHEMAS_GMONTHDAY</a> = 7
+ <a name="XML_SCHEMAS_GYEAR" id="XML_SCHEMAS_GYEAR">XML_SCHEMAS_GYEAR</a> = 8
+ <a name="XML_SCHEMAS_GYEARMONTH" id="XML_SCHEMAS_GYEARMONTH">XML_SCHEMAS_GYEARMONTH</a> = 9
+ <a name="XML_SCHEMAS_DATE" id="XML_SCHEMAS_DATE">XML_SCHEMAS_DATE</a> = 10
+ <a name="XML_SCHEMAS_DATETIME" id="XML_SCHEMAS_DATETIME">XML_SCHEMAS_DATETIME</a> = 11
+ <a name="XML_SCHEMAS_DURATION" id="XML_SCHEMAS_DURATION">XML_SCHEMAS_DURATION</a> = 12
+ <a name="XML_SCHEMAS_FLOAT" id="XML_SCHEMAS_FLOAT">XML_SCHEMAS_FLOAT</a> = 13
+ <a name="XML_SCHEMAS_DOUBLE" id="XML_SCHEMAS_DOUBLE">XML_SCHEMAS_DOUBLE</a> = 14
+ <a name="XML_SCHEMAS_BOOLEAN" id="XML_SCHEMAS_BOOLEAN">XML_SCHEMAS_BOOLEAN</a> = 15
+ <a name="XML_SCHEMAS_TOKEN" id="XML_SCHEMAS_TOKEN">XML_SCHEMAS_TOKEN</a> = 16
+ <a name="XML_SCHEMAS_LANGUAGE" id="XML_SCHEMAS_LANGUAGE">XML_SCHEMAS_LANGUAGE</a> = 17
+ <a name="XML_SCHEMAS_NMTOKEN" id="XML_SCHEMAS_NMTOKEN">XML_SCHEMAS_NMTOKEN</a> = 18
+ <a name="XML_SCHEMAS_NMTOKENS" id="XML_SCHEMAS_NMTOKENS">XML_SCHEMAS_NMTOKENS</a> = 19
+ <a name="XML_SCHEMAS_NAME" id="XML_SCHEMAS_NAME">XML_SCHEMAS_NAME</a> = 20
+ <a name="XML_SCHEMAS_QNAME" id="XML_SCHEMAS_QNAME">XML_SCHEMAS_QNAME</a> = 21
+ <a name="XML_SCHEMAS_NCNAME" id="XML_SCHEMAS_NCNAME">XML_SCHEMAS_NCNAME</a> = 22
+ <a name="XML_SCHEMAS_ID" id="XML_SCHEMAS_ID">XML_SCHEMAS_ID</a> = 23
+ <a name="XML_SCHEMAS_IDREF" id="XML_SCHEMAS_IDREF">XML_SCHEMAS_IDREF</a> = 24
+ <a name="XML_SCHEMAS_IDREFS" id="XML_SCHEMAS_IDREFS">XML_SCHEMAS_IDREFS</a> = 25
+ <a name="XML_SCHEMAS_ENTITY" id="XML_SCHEMAS_ENTITY">XML_SCHEMAS_ENTITY</a> = 26
+ <a name="XML_SCHEMAS_ENTITIES" id="XML_SCHEMAS_ENTITIES">XML_SCHEMAS_ENTITIES</a> = 27
+ <a name="XML_SCHEMAS_NOTATION" id="XML_SCHEMAS_NOTATION">XML_SCHEMAS_NOTATION</a> = 28
+ <a name="XML_SCHEMAS_ANYURI" id="XML_SCHEMAS_ANYURI">XML_SCHEMAS_ANYURI</a> = 29
+ <a name="XML_SCHEMAS_INTEGER" id="XML_SCHEMAS_INTEGER">XML_SCHEMAS_INTEGER</a> = 30
+ <a name="XML_SCHEMAS_NPINTEGER" id="XML_SCHEMAS_NPINTEGER">XML_SCHEMAS_NPINTEGER</a> = 31
+ <a name="XML_SCHEMAS_NINTEGER" id="XML_SCHEMAS_NINTEGER">XML_SCHEMAS_NINTEGER</a> = 32
+ <a name="XML_SCHEMAS_NNINTEGER" id="XML_SCHEMAS_NNINTEGER">XML_SCHEMAS_NNINTEGER</a> = 33
+ <a name="XML_SCHEMAS_PINTEGER" id="XML_SCHEMAS_PINTEGER">XML_SCHEMAS_PINTEGER</a> = 34
+ <a name="XML_SCHEMAS_INT" id="XML_SCHEMAS_INT">XML_SCHEMAS_INT</a> = 35
+ <a name="XML_SCHEMAS_UINT" id="XML_SCHEMAS_UINT">XML_SCHEMAS_UINT</a> = 36
+ <a name="XML_SCHEMAS_LONG" id="XML_SCHEMAS_LONG">XML_SCHEMAS_LONG</a> = 37
+ <a name="XML_SCHEMAS_ULONG" id="XML_SCHEMAS_ULONG">XML_SCHEMAS_ULONG</a> = 38
+ <a name="XML_SCHEMAS_SHORT" id="XML_SCHEMAS_SHORT">XML_SCHEMAS_SHORT</a> = 39
+ <a name="XML_SCHEMAS_USHORT" id="XML_SCHEMAS_USHORT">XML_SCHEMAS_USHORT</a> = 40
+ <a name="XML_SCHEMAS_BYTE" id="XML_SCHEMAS_BYTE">XML_SCHEMAS_BYTE</a> = 41
+ <a name="XML_SCHEMAS_UBYTE" id="XML_SCHEMAS_UBYTE">XML_SCHEMAS_UBYTE</a> = 42
+ <a name="XML_SCHEMAS_HEXBINARY" id="XML_SCHEMAS_HEXBINARY">XML_SCHEMAS_HEXBINARY</a> = 43
+ <a name="XML_SCHEMAS_BASE64BINARY" id="XML_SCHEMAS_BASE64BINARY">XML_SCHEMAS_BASE64BINARY</a> = 44
+ <a name="XML_SCHEMAS_ANYTYPE" id="XML_SCHEMAS_ANYTYPE">XML_SCHEMAS_ANYTYPE</a> = 45
+ <a name="XML_SCHEMAS_ANYSIMPLETYPE" id="XML_SCHEMAS_ANYSIMPLETYPE">XML_SCHEMAS_ANYSIMPLETYPE</a> = 46
+}
+</pre><h3><a name="xmlSchemaWildcard" id="xmlSchemaWildcard">Structure xmlSchemaWildcard</a></h3><pre class="programlisting">Structure xmlSchemaWildcard<br />struct _xmlSchemaWildcard {
+ <a href="libxml-schemasInternals.html#xmlSchemaTypeType">xmlSchemaTypeType</a> type : The kind of type
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Deprecated; not used
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node
+ int minOccurs : Deprecated; not used
+ int maxOccurs : Deprecated; not used
+ int processContents
+ int any : Indicates if the ns constraint is of ##
+ <a href="libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> nsSet : The list of allowed namespaces
+ <a href="libxml-schemasInternals.html#xmlSchemaWildcardNsPtr">xmlSchemaWildcardNsPtr</a> negNsSet : The negated namespace
+ int flags
+}</pre><h3><a name="xmlSchemaWildcardNs" id="xmlSchemaWildcardNs">Structure xmlSchemaWildcardNs</a></h3><pre class="programlisting">Structure xmlSchemaWildcardNs<br />struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs * next : the next constraint link ...
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : the value
+}</pre><h3><a name="xmlSchemaFreeType" id="xmlSchemaFreeType"></a>Function: xmlSchemaFreeType</h3><pre class="programlisting">void xmlSchemaFreeType (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br />
+</pre><p>Deallocate a Schema Type structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>a schema type structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeWildcard" id="xmlSchemaFreeWildcard"></a>Function: xmlSchemaFreeWildcard</h3><pre class="programlisting">void xmlSchemaFreeWildcard (<a href="libxml-schemasInternals.html#xmlSchemaWildcardPtr">xmlSchemaWildcardPtr</a> wildcard)<br />
+</pre><p>Deallocates a wildcard structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>wildcard</tt></i>:</span></td><td>a wildcard structure</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-schematron.html b/doc/html/libxml-schematron.html
new file mode 100644
index 0000000..1620fa7
--- /dev/null
+++ b/doc/html/libxml-schematron.html
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module schematron from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module schematron from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-schemasInternals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-schemasInternals.html">schemasInternals</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-threads.html">threads</a></th><td><a accesskey="n" href="libxml-threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>interface to the XML Schematron validity checking. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlSchematron">xmlSchematron</a><br />struct _xmlSchematron
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Structure <a href="#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a><br />struct _xmlSchematronParserCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-schematron.html#xmlSchematronParserCtxt">xmlSchematronParserCtxt</a> * <a name="xmlSchematronParserCtxtPtr" id="xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-schematron.html#xmlSchematron">xmlSchematron</a> * <a name="xmlSchematronPtr" id="xmlSchematronPtr">xmlSchematronPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a><br />struct _xmlSchematronValidCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-schematron.html#xmlSchematronValidCtxt">xmlSchematronValidCtxt</a> * <a name="xmlSchematronValidCtxtPtr" id="xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchematronValidOptions">xmlSchematronValidOptions</a>
+</pre><pre class="programlisting">void <a href="#xmlSchematronFree">xmlSchematronFree</a> (<a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlSchematronFreeParserCtxt">xmlSchematronFreeParserCtxt</a> (<a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlSchematronFreeValidCtxt">xmlSchematronFreeValidCtxt</a> (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewDocParserCtxt">xmlSchematronNewDocParserCtxt</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewMemParserCtxt">xmlSchematronNewMemParserCtxt</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> <a href="#xmlSchematronNewParserCtxt">xmlSchematronNewParserCtxt</a> (const char * URL)</pre>
+<pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> <a href="#xmlSchematronNewValidCtxt">xmlSchematronNewValidCtxt</a> (<a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> <a href="#xmlSchematronParse">xmlSchematronParse</a> (<a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlSchematronSetValidStructuredErrors">xmlSchematronSetValidStructuredErrors</a> (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSchematronValidateDoc">xmlSchematronValidateDoc</a> (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)</pre>
+<pre class="programlisting">Function type: <a href="#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a>
+void <a href="#xmlSchematronValidityErrorFunc">xmlSchematronValidityErrorFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a>
+void <a href="#xmlSchematronValidityWarningFunc">xmlSchematronValidityWarningFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<h2>Description</h2>
+<h3><a name="xmlSchematron" id="xmlSchematron">Structure xmlSchematron</a></h3><pre class="programlisting">Structure xmlSchematron<br />struct _xmlSchematron {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlSchematronParserCtxt" id="xmlSchematronParserCtxt">Structure xmlSchematronParserCtxt</a></h3><pre class="programlisting">Structure xmlSchematronParserCtxt<br />struct _xmlSchematronParserCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlSchematronValidCtxt" id="xmlSchematronValidCtxt">Structure xmlSchematronValidCtxt</a></h3><pre class="programlisting">Structure xmlSchematronValidCtxt<br />struct _xmlSchematronValidCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlSchematronValidOptions" id="xmlSchematronValidOptions">xmlSchematronValidOptions</a></h3><pre class="programlisting">Enum xmlSchematronValidOptions {
+ <a name="XML_SCHEMATRON_OUT_QUIET" id="XML_SCHEMATRON_OUT_QUIET">XML_SCHEMATRON_OUT_QUIET</a> = 1 : quiet no report
+ <a name="XML_SCHEMATRON_OUT_TEXT" id="XML_SCHEMATRON_OUT_TEXT">XML_SCHEMATRON_OUT_TEXT</a> = 2 : build a textual report
+ <a name="XML_SCHEMATRON_OUT_XML" id="XML_SCHEMATRON_OUT_XML">XML_SCHEMATRON_OUT_XML</a> = 4 : output SVRL
+ <a name="XML_SCHEMATRON_OUT_ERROR" id="XML_SCHEMATRON_OUT_ERROR">XML_SCHEMATRON_OUT_ERROR</a> = 8 : output via <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a>
+ <a name="XML_SCHEMATRON_OUT_FILE" id="XML_SCHEMATRON_OUT_FILE">XML_SCHEMATRON_OUT_FILE</a> = 256 : output to a file descriptor
+ <a name="XML_SCHEMATRON_OUT_BUFFER" id="XML_SCHEMATRON_OUT_BUFFER">XML_SCHEMATRON_OUT_BUFFER</a> = 512 : output to a buffer
+ <a name="XML_SCHEMATRON_OUT_IO" id="XML_SCHEMATRON_OUT_IO">XML_SCHEMATRON_OUT_IO</a> = 1024 : output to I/O mechanism
+}
+</pre><h3><a name="xmlSchematronFree" id="xmlSchematronFree"></a>Function: xmlSchematronFree</h3><pre class="programlisting">void xmlSchematronFree (<a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema)<br />
+</pre><p>Deallocate a Schematron structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlSchematronFreeParserCtxt" id="xmlSchematronFreeParserCtxt"></a>Function: xmlSchematronFreeParserCtxt</h3><pre class="programlisting">void xmlSchematronFreeParserCtxt (<a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div><h3><a name="xmlSchematronFreeValidCtxt" id="xmlSchematronFreeValidCtxt"></a>Function: xmlSchematronFreeValidCtxt</h3><pre class="programlisting">void xmlSchematronFreeValidCtxt (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div><h3><a name="xmlSchematronNewDocParserCtxt" id="xmlSchematronNewDocParserCtxt"></a>Function: xmlSchematronNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchematronNewMemParserCtxt" id="xmlSchematronNewMemParserCtxt"></a>Function: xmlSchematronNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewMemParserCtxt (const char * buffer, <br /> int size)<br />
+</pre><p>Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchematronNewParserCtxt" id="xmlSchematronNewParserCtxt"></a>Function: xmlSchematronNewParserCtxt</h3><pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> xmlSchematronNewParserCtxt (const char * URL)<br />
+</pre><p>Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchematronNewValidCtxt" id="xmlSchematronNewValidCtxt"></a>Function: xmlSchematronNewValidCtxt</h3><pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> xmlSchematronNewValidCtxt (<a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> schema, <br /> int options)<br />
+</pre><p>Create an XML Schematrons validation context based on the given schema.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schematrons</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml-schematron.html#xmlSchematronValidOptions">xmlSchematronValidOptions</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchematronParse" id="xmlSchematronParse"></a>Function: xmlSchematronParse</h3><pre class="programlisting"><a href="libxml-schematron.html#xmlSchematronPtr">xmlSchematronPtr</a> xmlSchematronParse (<a href="libxml-schematron.html#xmlSchematronParserCtxtPtr">xmlSchematronParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schematron structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchematronSetValidStructuredErrors" id="xmlSchematronSetValidStructuredErrors"></a>Function: xmlSchematronSetValidStructuredErrors</h3><pre class="programlisting">void xmlSchematronSetValidStructuredErrors (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Schematron validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchematronValidateDoc" id="xmlSchematronValidateDoc"></a>Function: xmlSchematronValidateDoc</h3><pre class="programlisting">int xmlSchematronValidateDoc (<a href="libxml-schematron.html#xmlSchematronValidCtxtPtr">xmlSchematronValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> instance)<br />
+</pre><p>Validate a tree instance against the schematron</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>instance</tt></i>:</span></td><td>the document instace tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of internal error and an error count otherwise.</td></tr></tbody></table></div><h3><a name="xmlSchematronValidityErrorFunc" id="xmlSchematronValidityErrorFunc"></a>Function type: xmlSchematronValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchematronValidityErrorFunc
+void xmlSchematronValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of an error callback from a Schematron validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<h3><a name="xmlSchematronValidityWarningFunc" id="xmlSchematronValidityWarningFunc"></a>Function type: xmlSchematronValidityWarningFunc</h3><pre class="programlisting">Function type: xmlSchematronValidityWarningFunc
+void xmlSchematronValidityWarningFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of a warning callback from a Schematron validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-threads.html b/doc/html/libxml-threads.html
new file mode 100644
index 0000000..3c1d1ec
--- /dev/null
+++ b/doc/html/libxml-threads.html
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module threads from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module threads from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-schematron.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-schematron.html">schematron</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-tree.html">tree</a></th><td><a accesskey="n" href="libxml-tree.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>set of generic threading related routines should work with pthreads, Windows native or TLS threads </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlMutex">xmlMutex</a><br />struct _xmlMutex
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-threads.html#xmlMutex">xmlMutex</a> * <a name="xmlMutexPtr" id="xmlMutexPtr">xmlMutexPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRMutex">xmlRMutex</a><br />struct _xmlRMutex
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-threads.html#xmlRMutex">xmlRMutex</a> * <a name="xmlRMutexPtr" id="xmlRMutexPtr">xmlRMutexPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlCleanupThreads">xmlCleanupThreads</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlDllMain">xmlDllMain</a> (void * hinstDLL, <br /> unsigned long fdwReason, <br /> void * lpvReserved)</pre>
+<pre class="programlisting">void <a href="#xmlFreeMutex">xmlFreeMutex</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre>
+<pre class="programlisting">void <a href="#xmlFreeRMutex">xmlFreeRMutex</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)</pre>
+<pre class="programlisting"><a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> <a href="#xmlGetGlobalState">xmlGetGlobalState</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlGetThreadId">xmlGetThreadId</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlInitThreads">xmlInitThreads</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlIsMainThread">xmlIsMainThread</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlLockLibrary">xmlLockLibrary</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlMutexLock">xmlMutexLock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre>
+<pre class="programlisting">void <a href="#xmlMutexUnlock">xmlMutexUnlock</a> (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)</pre>
+<pre class="programlisting"><a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> <a href="#xmlNewMutex">xmlNewMutex</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> <a href="#xmlNewRMutex">xmlNewRMutex</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlRMutexLock">xmlRMutexLock</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)</pre>
+<pre class="programlisting">void <a href="#xmlRMutexUnlock">xmlRMutexUnlock</a> (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)</pre>
+<pre class="programlisting">void <a href="#xmlUnlockLibrary">xmlUnlockLibrary</a> (void)</pre>
+<h2>Description</h2>
+<h3><a name="xmlMutex" id="xmlMutex">Structure xmlMutex</a></h3><pre class="programlisting">Structure xmlMutex<br />struct _xmlMutex {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlRMutex" id="xmlRMutex">Structure xmlRMutex</a></h3><pre class="programlisting">Structure xmlRMutex<br />struct _xmlRMutex {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlCleanupThreads" id="xmlCleanupThreads"></a>Function: xmlCleanupThreads</h3><pre class="programlisting">void xmlCleanupThreads (void)<br />
+</pre><p>xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</p>
+<h3><a name="xmlDllMain" id="xmlDllMain"></a>Function: xmlDllMain</h3><pre class="programlisting">int xmlDllMain (void * hinstDLL, <br /> unsigned long fdwReason, <br /> void * lpvReserved)<br />
+</pre><p></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>hinstDLL</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>fdwReason</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>lpvReserved</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="xmlFreeMutex" id="xmlFreeMutex"></a>Function: xmlFreeMutex</h3><pre class="programlisting">void xmlFreeMutex (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br />
+</pre><p>xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div><h3><a name="xmlFreeRMutex" id="xmlFreeRMutex"></a>Function: xmlFreeRMutex</h3><pre class="programlisting">void xmlFreeRMutex (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br />
+</pre><p>xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div><h3><a name="xmlGetGlobalState" id="xmlGetGlobalState"></a>Function: xmlGetGlobalState</h3><pre class="programlisting"><a href="libxml-globals.html#xmlGlobalStatePtr">xmlGlobalStatePtr</a> xmlGetGlobalState (void)<br />
+</pre><p>xmlGetGlobalState() is called to retrieve the global state for a thread.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the thread global state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlGetThreadId" id="xmlGetThreadId"></a>Function: xmlGetThreadId</h3><pre class="programlisting">int xmlGetThreadId (void)<br />
+</pre><p>xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current thread ID number</td></tr></tbody></table></div><h3><a name="xmlInitThreads" id="xmlInitThreads"></a>Function: xmlInitThreads</h3><pre class="programlisting">void xmlInitThreads (void)<br />
+</pre><p>xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.</p>
+<h3><a name="xmlIsMainThread" id="xmlIsMainThread"></a>Function: xmlIsMainThread</h3><pre class="programlisting">int xmlIsMainThread (void)<br />
+</pre><p>xmlIsMainThread() check whether the current thread is the main thread.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current thread is the main thread, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlLockLibrary" id="xmlLockLibrary"></a>Function: xmlLockLibrary</h3><pre class="programlisting">void xmlLockLibrary (void)<br />
+</pre><p>xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.</p>
+<h3><a name="xmlMutexLock" id="xmlMutexLock"></a>Function: xmlMutexLock</h3><pre class="programlisting">void xmlMutexLock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br />
+</pre><p>xmlMutexLock() is used to lock a libxml2 token.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div><h3><a name="xmlMutexUnlock" id="xmlMutexUnlock"></a>Function: xmlMutexUnlock</h3><pre class="programlisting">void xmlMutexUnlock (<a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> tok)<br />
+</pre><p>xmlMutexUnlock() is used to unlock a libxml2 token.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the simple mutex</td></tr></tbody></table></div><h3><a name="xmlNewMutex" id="xmlNewMutex"></a>Function: xmlNewMutex</h3><pre class="programlisting"><a href="libxml-threads.html#xmlMutexPtr">xmlMutexPtr</a> xmlNewMutex (void)<br />
+</pre><p>xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new simple mutex pointer or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewRMutex" id="xmlNewRMutex"></a>Function: xmlNewRMutex</h3><pre class="programlisting"><a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> xmlNewRMutex (void)<br />
+</pre><p>xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reentrant mutex pointer or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRMutexLock" id="xmlRMutexLock"></a>Function: xmlRMutexLock</h3><pre class="programlisting">void xmlRMutexLock (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br />
+</pre><p>xmlRMutexLock() is used to lock a libxml2 token_r.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div><h3><a name="xmlRMutexUnlock" id="xmlRMutexUnlock"></a>Function: xmlRMutexUnlock</h3><pre class="programlisting">void xmlRMutexUnlock (<a href="libxml-threads.html#xmlRMutexPtr">xmlRMutexPtr</a> tok)<br />
+</pre><p>xmlRMutexUnlock() is used to unlock a libxml2 token_r.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tok</tt></i>:</span></td><td>the reentrant mutex</td></tr></tbody></table></div><h3><a name="xmlUnlockLibrary" id="xmlUnlockLibrary"></a>Function: xmlUnlockLibrary</h3><pre class="programlisting">void xmlUnlockLibrary (void)<br />
+</pre><p>xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.</p>
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-tree.html b/doc/html/libxml-tree.html
new file mode 100644
index 0000000..e2081cc
--- /dev/null
+++ b/doc/html/libxml-tree.html
@@ -0,0 +1,990 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module tree from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module tree from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-threads.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-threads.html">threads</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-uri.html">uri</a></th><td><a accesskey="n" href="libxml-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a></pre><pre class="programlisting">#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a></pre><pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a></pre><pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a></pre><pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#XML_XML_ID">XML_XML_ID</a></pre><pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a></pre><pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a></pre><pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a></pre><pre class="programlisting">Structure <a href="#xmlAttr">xmlAttr</a><br />struct _xmlAttr
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlAttr">xmlAttr</a> * <a name="xmlAttrPtr" id="xmlAttrPtr">xmlAttrPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlAttribute">xmlAttribute</a><br />struct _xmlAttribute
+</pre><pre class="programlisting">Enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlAttribute">xmlAttribute</a> * <a name="xmlAttributePtr" id="xmlAttributePtr">xmlAttributePtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlAttributeType">xmlAttributeType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlBuf">xmlBuf</a><br />struct _xmlBuf
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlBuf">xmlBuf</a> * <a name="xmlBufPtr" id="xmlBufPtr">xmlBufPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlBuffer">xmlBuffer</a><br />struct _xmlBuffer
+</pre><pre class="programlisting">Enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> * <a name="xmlBufferPtr" id="xmlBufferPtr">xmlBufferPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a><br />struct _xmlDOMWrapCtxt
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * <a name="xmlDOMWrapCtxtPtr" id="xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlDoc">xmlDoc</a><br />struct _xmlDoc
+</pre><pre class="programlisting">Enum <a href="#xmlDocProperties">xmlDocProperties</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * <a name="xmlDocPtr" id="xmlDocPtr">xmlDocPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlDtd">xmlDtd</a><br />struct _xmlDtd
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlDtd">xmlDtd</a> * <a name="xmlDtdPtr" id="xmlDtdPtr">xmlDtdPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlElement">xmlElement</a><br />struct _xmlElement
+</pre><pre class="programlisting">Structure <a href="#xmlElementContent">xmlElementContent</a><br />struct _xmlElementContent
+</pre><pre class="programlisting">Enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * <a name="xmlElementContentPtr" id="xmlElementContentPtr">xmlElementContentPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlElementContentType">xmlElementContentType</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlElement">xmlElement</a> * <a name="xmlElementPtr" id="xmlElementPtr">xmlElementPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlElementType">xmlElementType</a>
+</pre><pre class="programlisting">Enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a>
+</pre><pre class="programlisting">Structure <a href="#xmlEntity">xmlEntity</a><br />struct _xmlEntity
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlEntity">xmlEntity</a> * <a name="xmlEntityPtr" id="xmlEntityPtr">xmlEntityPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlEnumeration">xmlEnumeration</a><br />struct _xmlEnumeration
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlEnumeration">xmlEnumeration</a> * <a name="xmlEnumerationPtr" id="xmlEnumerationPtr">xmlEnumerationPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlID">xmlID</a><br />struct _xmlID
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlID">xmlID</a> * <a name="xmlIDPtr" id="xmlIDPtr">xmlIDPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlNode">xmlNode</a><br />struct _xmlNode
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlNode">xmlNode</a> * <a name="xmlNodePtr" id="xmlNodePtr">xmlNodePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlNotation">xmlNotation</a><br />struct _xmlNotation
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlNotation">xmlNotation</a> * <a name="xmlNotationPtr" id="xmlNotationPtr">xmlNotationPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlNs">xmlNs</a><br />struct _xmlNs
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlNs">xmlNs</a> * <a name="xmlNsPtr" id="xmlNsPtr">xmlNsPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlElementType">xmlElementType</a> <a name="xmlNsType" id="xmlNsType">xmlNsType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlOutputBuffer">xmlOutputBuffer</a><br />struct _xmlOutputBuffer
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * <a name="xmlOutputBufferPtr" id="xmlOutputBufferPtr">xmlOutputBufferPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlParserCtxt">xmlParserCtxt</a><br />struct _xmlParserCtxt
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a> * <a name="xmlParserCtxtPtr" id="xmlParserCtxtPtr">xmlParserCtxtPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlParserInput">xmlParserInput</a><br />struct _xmlParserInput
+</pre><pre class="programlisting">Structure <a href="#xmlParserInputBuffer">xmlParserInputBuffer</a><br />struct _xmlParserInputBuffer
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * <a name="xmlParserInputBufferPtr" id="xmlParserInputBufferPtr">xmlParserInputBufferPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlParserInput">xmlParserInput</a> * <a name="xmlParserInputPtr" id="xmlParserInputPtr">xmlParserInputPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRef">xmlRef</a><br />struct _xmlRef
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlRef">xmlRef</a> * <a name="xmlRefPtr" id="xmlRefPtr">xmlRefPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSAXHandler">xmlSAXHandler</a><br />struct _xmlSAXHandler
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXHandler">xmlSAXHandler</a> * <a name="xmlSAXHandlerPtr" id="xmlSAXHandlerPtr">xmlSAXHandlerPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSAXLocator">xmlSAXLocator</a><br />struct _xmlSAXLocator
+</pre><pre class="programlisting">Typedef <a href="libxml-tree.html#xmlSAXLocator">xmlSAXLocator</a> * <a name="xmlSAXLocatorPtr" id="xmlSAXLocatorPtr">xmlSAXLocatorPtr</a>
+</pre><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChild">xmlAddChild</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChildList">xmlAddChildList</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddNextSibling">xmlAddNextSibling</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddPrevSibling">xmlAddPrevSibling</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddSibling">xmlAddSibling</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">void <a href="#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufContent">xmlBufContent</a> (const <a href="libxml-tree.html#xmlBuf">xmlBuf</a> * buf)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufEnd">xmlBufEnd</a> (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf)</pre>
+<pre class="programlisting">int <a href="#xmlBufGetNodeContent">xmlBufGetNodeContent</a> (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting">size_t <a href="#xmlBufNodeDump">xmlBufNodeDump</a> (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format)</pre>
+<pre class="programlisting">size_t <a href="#xmlBufShrink">xmlBufShrink</a> (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> size_t len)</pre>
+<pre class="programlisting">size_t <a href="#xmlBufUse">xmlBufUse</a> (const <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf)</pre>
+<pre class="programlisting">int <a href="#xmlBufferAdd">xmlBufferAdd</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlBufferAddHead">xmlBufferAddHead</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlBufferCCat">xmlBufferCCat</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const char * str)</pre>
+<pre class="programlisting">int <a href="#xmlBufferCat">xmlBufferCat</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferContent">xmlBufferContent</a> (const <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> * buf)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreate">xmlBufferCreate</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateSize">xmlBufferCreateSize</a> (size_t size)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateStatic">xmlBufferCreateStatic</a> (void * mem, <br /> size_t size)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferDetach">xmlBufferDetach</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)</pre>
+<pre class="programlisting">int <a href="#xmlBufferDump">xmlBufferDump</a> (FILE * file, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)</pre>
+<pre class="programlisting">void <a href="#xmlBufferEmpty">xmlBufferEmpty</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)</pre>
+<pre class="programlisting">void <a href="#xmlBufferFree">xmlBufferFree</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)</pre>
+<pre class="programlisting">int <a href="#xmlBufferGrow">xmlBufferGrow</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int len)</pre>
+<pre class="programlisting">int <a href="#xmlBufferLength">xmlBufferLength</a> (const <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> * buf)</pre>
+<pre class="programlisting">int <a href="#xmlBufferResize">xmlBufferResize</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int size)</pre>
+<pre class="programlisting">void <a href="#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)</pre>
+<pre class="programlisting">int <a href="#xmlBufferShrink">xmlBufferShrink</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int len)</pre>
+<pre class="programlisting">void <a href="#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)</pre>
+<pre class="programlisting">void <a href="#xmlBufferWriteChar">xmlBufferWriteChar</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const char * string)</pre>
+<pre class="programlisting">void <a href="#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildQName">xmlBuildQName</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * memory, <br /> int len)</pre>
+<pre class="programlisting">unsigned long <a href="#xmlChildElementCount">xmlChildElementCount</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCopyDoc">xmlCopyDoc</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int recursive)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCopyDtd">xmlCopyDtd</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespace">xmlCopyNamespace</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespaceList">xmlCopyNamespaceList</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNode">xmlCopyNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int extended)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNodeList">xmlCopyNodeList</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyProp">xmlCopyProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyPropList">xmlCopyPropList</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCreateIntSubset">xmlCreateIntSubset</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting">Function type: <a href="#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a>
+<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix)
+</pre>
+<pre class="programlisting">int <a href="#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br /> int deep, <br /> int options)</pre>
+<pre class="programlisting">void <a href="#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> <a href="#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a> (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNode">xmlDocCopyNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int extended)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNodeList">xmlDocCopyNodeList</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlDocDump">xmlDocDump</a> (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> const char * txt_encoding, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#xmlDocDumpMemory">xmlDocDumpMemory</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)</pre>
+<pre class="programlisting">void <a href="#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> const char * txt_encoding)</pre>
+<pre class="programlisting">int <a href="#xmlDocFormatDump">xmlDocFormatDump</a> (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> int format)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocGetRootElement">xmlDocGetRootElement</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocSetRootElement">xmlDocSetRootElement</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> root)</pre>
+<pre class="programlisting">void <a href="#xmlElemDump">xmlElemDump</a> (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlFirstElementChild">xmlFirstElementChild</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)</pre>
+<pre class="programlisting">void <a href="#xmlFreeDoc">xmlFreeDoc</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeDtd">xmlFreeDtd</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeNode">xmlFreeNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeNodeList">xmlFreeNodeList</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeNs">xmlFreeNs</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeNsList">xmlFreeNsList</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeProp">xmlFreeProp</a> (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreePropList">xmlFreePropList</a> (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlGetCompressMode">xmlGetCompressMode</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlGetDocCompressMode">xmlGetDocCompressMode</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlGetIntSubset">xmlGetIntSubset</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlGetLastChild">xmlGetLastChild</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * parent)</pre>
+<pre class="programlisting">long <a href="#xmlGetLineNo">xmlGetLineNo</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNoNsProp">xmlGetNoNsProp</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNodePath">xmlGetNodePath</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> * <a href="#xmlGetNsList">xmlGetNsList</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNsProp">xmlGetNsProp</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetProp">xmlGetProp</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasNsProp">xmlHasNsProp</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasProp">xmlHasProp</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlIsBlankNode">xmlIsBlankNode</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)</pre>
+<pre class="programlisting">int <a href="#xmlIsXHTML">xmlIsXHTML</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlLastElementChild">xmlLastElementChild</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCDataBlock">xmlNewCDataBlock</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCharRef">xmlNewCharRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewChild">xmlNewChild</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewComment">xmlNewComment</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlNewDoc">xmlNewDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocComment">xmlNewDocComment</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocFragment">xmlNewDocFragment</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNode">xmlNewDocNode</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocPI">xmlNewDocPI</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewDocProp">xmlNewDocProp</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocRawNode">xmlNewDocRawNode</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocText">xmlNewDocText</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocTextLen">xmlNewDocTextLen</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlNewDtd">xmlNewDtd</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewGlobalNs">xmlNewGlobalNs</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNode">xmlNewNode</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNodeEatName">xmlNewNodeEatName</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewNs">xmlNewNs</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsProp">xmlNewNsProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsPropEatName">xmlNewNsPropEatName</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewPI">xmlNewPI</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewProp">xmlNewProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewReference">xmlNewReference</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewText">xmlNewText</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextChild">xmlNewTextChild</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextLen">xmlNewTextLen</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNextElementSibling">xmlNextElementSibling</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">void <a href="#xmlNodeAddContent">xmlNodeAddContent</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">void <a href="#xmlNodeAddContentLen">xmlNodeAddContentLen</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlNodeBufGetContent">xmlNodeBufGetContent</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting">int <a href="#xmlNodeDump">xmlNodeDump</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format)</pre>
+<pre class="programlisting">void <a href="#xmlNodeDumpOutput">xmlNodeDumpOutput</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format, <br /> const char * encoding)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetBase">xmlNodeGetBase</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetContent">xmlNodeGetContent</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetLang">xmlNodeGetLang</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting">int <a href="#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)</pre>
+<pre class="programlisting">int <a href="#xmlNodeIsText">xmlNodeIsText</a> (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetRawString">xmlNodeListGetRawString</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * list, <br /> int inLine)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetString">xmlNodeListGetString</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * list, <br /> int inLine)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetBase">xmlNodeSetBase</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * uri)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetContent">xmlNodeSetContent</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetContentLen">xmlNodeSetContentLen</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetLang">xmlNodeSetLang</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * lang)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetName">xmlNodeSetName</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int val)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlPreviousElementSibling">xmlPreviousElementSibling</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlReconciliateNs">xmlReconciliateNs</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree)</pre>
+<pre class="programlisting">int <a href="#xmlRemoveProp">xmlRemoveProp</a> (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlReplaceNode">xmlReplaceNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFile">xmlSaveFile</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFileEnc">xmlSaveFileEnc</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFileTo">xmlSaveFileTo</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFormatFile">xmlSaveFormatFile</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> int format)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNs">xmlSearchNs</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNsByHref">xmlSearchNsByHref</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href)</pre>
+<pre class="programlisting">void <a href="#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a> (<a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)</pre>
+<pre class="programlisting">void <a href="#xmlSetCompressMode">xmlSetCompressMode</a> (int mode)</pre>
+<pre class="programlisting">void <a href="#xmlSetDocCompressMode">xmlSetDocCompressMode</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int mode)</pre>
+<pre class="programlisting">void <a href="#xmlSetListDoc">xmlSetListDoc</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">void <a href="#xmlSetNs">xmlSetNs</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetNsProp">xmlSetNsProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetProp">xmlSetProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">void <a href="#xmlSetTreeDoc">xmlSetTreeDoc</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName2">xmlSplitQName2</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName3">xmlSplitQName3</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int * len)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringGetNodeList">xmlStringGetNodeList</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a> (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlTextConcat">xmlTextConcat</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextMerge">xmlTextMerge</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> second)</pre>
+<pre class="programlisting">void <a href="#xmlUnlinkNode">xmlUnlinkNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#xmlUnsetNsProp">xmlUnsetNsProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlUnsetProp">xmlUnsetProp</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNCName">xmlValidateNCName</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNMToken">xmlValidateNMToken</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)</pre>
+<pre class="programlisting">int <a href="#xmlValidateName">xmlValidateName</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)</pre>
+<pre class="programlisting">int <a href="#xmlValidateQName">xmlValidateQName</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)</pre>
+<h2>Description</h2>
+<h3><a name="BASE_BUFFER_SIZE" id="BASE_BUFFER_SIZE"></a>Macro: BASE_BUFFER_SIZE</h3><pre>#define BASE_BUFFER_SIZE</pre><p>default buffer size 4000.</p>
+<h3><a name="LIBXML2_NEW_BUFFER" id="LIBXML2_NEW_BUFFER"></a>Macro: LIBXML2_NEW_BUFFER</h3><pre>#define LIBXML2_NEW_BUFFER</pre><p>Macro used to express that the API use the new buffers for <a href="libxml-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> and xmlOutputBuffer. The change was introduced in 2.9.0.</p>
+<h3><a name="XML_GET_CONTENT" id="XML_GET_CONTENT"></a>Macro: XML_GET_CONTENT</h3><pre>#define XML_GET_CONTENT</pre><p>Macro to extract the content pointer of a node.</p>
+<h3><a name="XML_GET_LINE" id="XML_GET_LINE"></a>Macro: XML_GET_LINE</h3><pre>#define XML_GET_LINE</pre><p>Macro to extract the line number of an element node.</p>
+<h3><a name="XML_LOCAL_NAMESPACE" id="XML_LOCAL_NAMESPACE"></a>Macro: XML_LOCAL_NAMESPACE</h3><pre>#define XML_LOCAL_NAMESPACE</pre><p>A namespace declaration node.</p>
+<h3><a name="XML_XML_ID" id="XML_XML_ID"></a>Macro: XML_XML_ID</h3><pre>#define XML_XML_ID</pre><p>This is the name for the special xml:id <a href="libxml-SAX.html#attribute">attribute</a></p>
+<h3><a name="XML_XML_NAMESPACE" id="XML_XML_NAMESPACE"></a>Macro: XML_XML_NAMESPACE</h3><pre>#define XML_XML_NAMESPACE</pre><p>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</p>
+<h3><a name="xmlChildrenNode" id="xmlChildrenNode"></a>Macro: xmlChildrenNode</h3><pre>#define xmlChildrenNode</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children."</p>
+<h3><a name="xmlRootNode" id="xmlRootNode"></a>Macro: xmlRootNode</h3><pre>#define xmlRootNode</pre><p>Macro for compatibility naming layer with libxml1. Maps to "children".</p>
+<h3><a name="xmlAttr" id="xmlAttr">Structure xmlAttr</a></h3><pre class="programlisting">Structure xmlAttr<br />struct _xmlAttr {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_NODE, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the property
+ struct _xmlNode * children : the value of the property
+ struct _xmlNode * last : NULL
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlAttr * next : next sibling link
+ struct _xmlAttr * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
+ <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> atype : the <a href="libxml-SAX.html#attribute">attribute</a> type if validating
+ void * psvi : for type/PSVI informations
+}</pre><h3><a name="xmlAttribute" id="xmlAttribute">Structure xmlAttribute</a></h3><pre class="programlisting">Structure xmlAttribute<br />struct _xmlAttribute {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_DECL, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Attribute name
+ struct _xmlNode * children : NULL
+ struct _xmlNode * last : NULL
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ struct _xmlAttribute * nexth : next in hash table
+ <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> atype : The <a href="libxml-SAX.html#attribute">attribute</a> type
+ <a href="libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def : the default
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue : or the default value
+ <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree : or the enumeration tree if any
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem : Element holding the <a href="libxml-SAX.html#attribute">attribute</a>
+}</pre><h3>Enum <a name="xmlAttributeDefault" id="xmlAttributeDefault">xmlAttributeDefault</a></h3><pre class="programlisting">Enum xmlAttributeDefault {
+ <a name="XML_ATTRIBUTE_NONE" id="XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a> = 1
+ <a name="XML_ATTRIBUTE_REQUIRED" id="XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a> = 2
+ <a name="XML_ATTRIBUTE_IMPLIED" id="XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> = 3
+ <a name="XML_ATTRIBUTE_FIXED" id="XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a> = 4
+}
+</pre><h3>Enum <a name="xmlAttributeType" id="xmlAttributeType">xmlAttributeType</a></h3><pre class="programlisting">Enum xmlAttributeType {
+ <a name="XML_ATTRIBUTE_CDATA" id="XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a> = 1
+ <a name="XML_ATTRIBUTE_ID" id="XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a> = 2
+ <a name="XML_ATTRIBUTE_IDREF" id="XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a> = 3
+ <a name="XML_ATTRIBUTE_IDREFS" id="XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a> = 4
+ <a name="XML_ATTRIBUTE_ENTITY" id="XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a> = 5
+ <a name="XML_ATTRIBUTE_ENTITIES" id="XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a> = 6
+ <a name="XML_ATTRIBUTE_NMTOKEN" id="XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a> = 7
+ <a name="XML_ATTRIBUTE_NMTOKENS" id="XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a> = 8
+ <a name="XML_ATTRIBUTE_ENUMERATION" id="XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> = 9
+ <a name="XML_ATTRIBUTE_NOTATION" id="XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a> = 10
+}
+</pre><h3><a name="xmlBuf" id="xmlBuf">Structure xmlBuf</a></h3><pre class="programlisting">Structure xmlBuf<br />struct _xmlBuf {
+The content of this structure is not made public by the API.
+}</pre>
+ A pointer to a buffer structure, the actual structure internals are not public
+ <h3><a name="xmlBuffer" id="xmlBuffer">Structure xmlBuffer</a></h3><pre class="programlisting">Structure xmlBuffer<br />struct _xmlBuffer {
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content : The buffer content UTF8
+ unsigned int use : The buffer size used
+ unsigned int size : The buffer size
+ <a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> alloc : The realloc method
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * contentIO : in IO mode we may have a different base
+}</pre><h3>Enum <a name="xmlBufferAllocationScheme" id="xmlBufferAllocationScheme">xmlBufferAllocationScheme</a></h3><pre class="programlisting">Enum xmlBufferAllocationScheme {
+ <a name="XML_BUFFER_ALLOC_DOUBLEIT" id="XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> = 1 : double each time one need to grow
+ <a name="XML_BUFFER_ALLOC_EXACT" id="XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> = 2 : grow only to the minimal size
+ <a name="XML_BUFFER_ALLOC_IMMUTABLE" id="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 : immutable buffer
+ <a name="XML_BUFFER_ALLOC_IO" id="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 : special allocation scheme used for I/O
+ <a name="XML_BUFFER_ALLOC_HYBRID" id="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 : exact up to a threshold, and doubleit thereafter
+}
+</pre><h3><a name="xmlDOMWrapCtxt" id="xmlDOMWrapCtxt">Structure xmlDOMWrapCtxt</a></h3><pre class="programlisting">Structure xmlDOMWrapCtxt<br />struct _xmlDOMWrapCtxt {
+ void * _private : * The type of this context, just in case
+ int type : * Internal namespace map used for variou
+ void * namespaceMap : * Use this one to acquire an <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> in
+ <a href="libxml-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> getNsForNodeFunc
+}</pre><h3><a name="xmlDoc" id="xmlDoc">Structure xmlDoc</a></h3><pre class="programlisting">Structure xmlDoc<br />struct _xmlDoc {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_DOCUMENT_NODE, must be second !
+ char * name : name/filename/URI of the document
+ struct _xmlNode * children : the document tree
+ struct _xmlNode * last : last child link
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : autoreference to itself End of common p
+ int compression : level of zlib compression
+ int standalone : standalone document (no external refs)
+ struct _xmlDtd * intSubset : the document internal subset
+ struct _xmlDtd * extSubset : the document external subset
+ struct _xmlNs * oldNs : Global namespace, the old way
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * encoding : external initial encoding, if any
+ void * ids : Hash table for ID attributes if any
+ void * refs : Hash table for IDREFs attributes if any
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URL : The URI for that document
+ int charset : encoding of the in-memory content actua
+ struct _xmlDict * dict : dict used to allocate names or NULL
+ void * psvi : for type/PSVI informations
+ int parseFlags : set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used to parse th
+ int properties : set of <a href="libxml-tree.html#xmlDocProperties">xmlDocProperties</a> for this docume
+}</pre><h3>Enum <a name="xmlDocProperties" id="xmlDocProperties">xmlDocProperties</a></h3><pre class="programlisting">Enum xmlDocProperties {
+ <a name="XML_DOC_WELLFORMED" id="XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a> = 1 : document is XML well formed
+ <a name="XML_DOC_NSVALID" id="XML_DOC_NSVALID">XML_DOC_NSVALID</a> = 2 : document is Namespace valid
+ <a name="XML_DOC_OLD10" id="XML_DOC_OLD10">XML_DOC_OLD10</a> = 4 : parsed with old XML-1.0 parser
+ <a name="XML_DOC_DTDVALID" id="XML_DOC_DTDVALID">XML_DOC_DTDVALID</a> = 8 : DTD validation was successful
+ <a name="XML_DOC_XINCLUDE" id="XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a> = 16 : XInclude substitution was done
+ <a name="XML_DOC_USERBUILT" id="XML_DOC_USERBUILT">XML_DOC_USERBUILT</a> = 32 : Document was built using the API and not by parsing an instance
+ <a name="XML_DOC_INTERNAL" id="XML_DOC_INTERNAL">XML_DOC_INTERNAL</a> = 64 : built for internal processing
+ <a name="XML_DOC_HTML" id="XML_DOC_HTML">XML_DOC_HTML</a> = 128 : parsed or built HTML document
+}
+</pre><h3><a name="xmlDtd" id="xmlDtd">Structure xmlDtd</a></h3><pre class="programlisting">Structure xmlDtd<br />struct _xmlDtd {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_DTD_NODE, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Name of the DTD
+ struct _xmlNode * children : the value of the property link
+ struct _xmlNode * last : last child link
+ struct _xmlDoc * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document End of common p
+ void * notations : Hash table for notations if any
+ void * elements : Hash table for elements if any
+ void * attributes : Hash table for attributes if any
+ void * entities : Hash table for entities if any
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC DTD
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC DTD
+ void * pentities : Hash table for param entities if any
+}</pre><h3><a name="xmlElement" id="xmlElement">Structure xmlElement</a></h3><pre class="programlisting">Structure xmlElement<br />struct _xmlElement {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_ELEMENT_DECL, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
+ struct _xmlNode * children : NULL
+ struct _xmlNode * last : NULL
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> etype : The type
+ <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content : the allowed element content
+ <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attributes : List of the declared attributes
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any
+ <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : the validating regexp
+ void * contModel
+}</pre><h3><a name="xmlElementContent" id="xmlElementContent">Structure xmlElementContent</a></h3><pre class="programlisting">Structure xmlElementContent<br />struct _xmlElementContent {
+ <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type : PCDATA, ELEMENT, SEQ or OR
+ <a href="libxml-tree.html#xmlElementContentOccur">xmlElementContentOccur</a> ocur : ONCE, OPT, MULT or PLUS
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Element name
+ struct _xmlElementContent * c1 : first child
+ struct _xmlElementContent * c2 : second child
+ struct _xmlElementContent * parent : parent
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix : Namespace prefix
+}</pre><h3>Enum <a name="xmlElementContentOccur" id="xmlElementContentOccur">xmlElementContentOccur</a></h3><pre class="programlisting">Enum xmlElementContentOccur {
+ <a name="XML_ELEMENT_CONTENT_ONCE" id="XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a> = 1
+ <a name="XML_ELEMENT_CONTENT_OPT" id="XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a> = 2
+ <a name="XML_ELEMENT_CONTENT_MULT" id="XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a> = 3
+ <a name="XML_ELEMENT_CONTENT_PLUS" id="XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a> = 4
+}
+</pre><h3>Enum <a name="xmlElementContentType" id="xmlElementContentType">xmlElementContentType</a></h3><pre class="programlisting">Enum xmlElementContentType {
+ <a name="XML_ELEMENT_CONTENT_PCDATA" id="XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a> = 1
+ <a name="XML_ELEMENT_CONTENT_ELEMENT" id="XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a> = 2
+ <a name="XML_ELEMENT_CONTENT_SEQ" id="XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a> = 3
+ <a name="XML_ELEMENT_CONTENT_OR" id="XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a> = 4
+}
+</pre><h3>Enum <a name="xmlElementType" id="xmlElementType">xmlElementType</a></h3><pre class="programlisting">Enum xmlElementType {
+ <a name="XML_ELEMENT_NODE" id="XML_ELEMENT_NODE">XML_ELEMENT_NODE</a> = 1
+ <a name="XML_ATTRIBUTE_NODE" id="XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a> = 2
+ <a name="XML_TEXT_NODE" id="XML_TEXT_NODE">XML_TEXT_NODE</a> = 3
+ <a name="XML_CDATA_SECTION_NODE" id="XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a> = 4
+ <a name="XML_ENTITY_REF_NODE" id="XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a> = 5
+ <a name="XML_ENTITY_NODE" id="XML_ENTITY_NODE">XML_ENTITY_NODE</a> = 6
+ <a name="XML_PI_NODE" id="XML_PI_NODE">XML_PI_NODE</a> = 7
+ <a name="XML_COMMENT_NODE" id="XML_COMMENT_NODE">XML_COMMENT_NODE</a> = 8
+ <a name="XML_DOCUMENT_NODE" id="XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a> = 9
+ <a name="XML_DOCUMENT_TYPE_NODE" id="XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a> = 10
+ <a name="XML_DOCUMENT_FRAG_NODE" id="XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a> = 11
+ <a name="XML_NOTATION_NODE" id="XML_NOTATION_NODE">XML_NOTATION_NODE</a> = 12
+ <a name="XML_HTML_DOCUMENT_NODE" id="XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a> = 13
+ <a name="XML_DTD_NODE" id="XML_DTD_NODE">XML_DTD_NODE</a> = 14
+ <a name="XML_ELEMENT_DECL" id="XML_ELEMENT_DECL">XML_ELEMENT_DECL</a> = 15
+ <a name="XML_ATTRIBUTE_DECL" id="XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a> = 16
+ <a name="XML_ENTITY_DECL" id="XML_ENTITY_DECL">XML_ENTITY_DECL</a> = 17
+ <a name="XML_NAMESPACE_DECL" id="XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a> = 18
+ <a name="XML_XINCLUDE_START" id="XML_XINCLUDE_START">XML_XINCLUDE_START</a> = 19
+ <a name="XML_XINCLUDE_END" id="XML_XINCLUDE_END">XML_XINCLUDE_END</a> = 20
+ <a name="XML_DOCB_DOCUMENT_NODE" id="XML_DOCB_DOCUMENT_NODE">XML_DOCB_DOCUMENT_NODE</a> = 21
+}
+</pre><h3>Enum <a name="xmlElementTypeVal" id="xmlElementTypeVal">xmlElementTypeVal</a></h3><pre class="programlisting">Enum xmlElementTypeVal {
+ <a name="XML_ELEMENT_TYPE_UNDEFINED" id="XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a> = 0
+ <a name="XML_ELEMENT_TYPE_EMPTY" id="XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a> = 1
+ <a name="XML_ELEMENT_TYPE_ANY" id="XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a> = 2
+ <a name="XML_ELEMENT_TYPE_MIXED" id="XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a> = 3
+ <a name="XML_ELEMENT_TYPE_ELEMENT" id="XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a> = 4
+}
+</pre><h3><a name="xmlEntity" id="xmlEntity">Structure xmlEntity</a></h3><pre class="programlisting">Structure xmlEntity<br />struct _xmlEntity {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : XML_ENTITY_DECL, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Entity name
+ struct _xmlNode * children : First child link
+ struct _xmlNode * last : Last child link
+ struct _xmlDtd * parent : -&gt; DTD
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * orig : content without ref substitution
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content : content or ndata if unparsed
+ int length : the content length
+ <a href="libxml-entities.html#xmlEntityType">xmlEntityType</a> etype : The entity type
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC Entity
+ struct _xmlEntity * nexte : unused
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI : the full URI as computed
+ int owner : does the entity own the childrens
+ int checked : was the entity content checked this is
+}</pre><h3><a name="xmlEnumeration" id="xmlEnumeration">Structure xmlEnumeration</a></h3><pre class="programlisting">Structure xmlEnumeration<br />struct _xmlEnumeration {
+ struct _xmlEnumeration * next : next one
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Enumeration name
+}</pre><h3><a name="xmlID" id="xmlID">Structure xmlID</a></h3><pre class="programlisting">Structure xmlID<br />struct _xmlID {
+ struct _xmlID * next : next ID
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The ID name
+ <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml-SAX.html#attribute">attribute</a> holding it
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml-SAX.html#attribute">attribute</a> if attr is not available
+ int lineno : The line number if attr is not availabl
+ struct _xmlDoc * doc : The document holding the ID
+}</pre><h3><a name="xmlNode" id="xmlNode">Structure xmlNode</a></h3><pre class="programlisting">Structure xmlNode<br />struct _xmlNode {
+ void * _private : application data
+ <a href="libxml-tree.html#xmlElementType">xmlElementType</a> type : type number, must be second !
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the node, or the entity
+ struct _xmlNode * children : parent-&gt;childs link
+ struct _xmlNode * last : last child link
+ struct _xmlNode * parent : child-&gt;parent link
+ struct _xmlNode * next : next sibling link
+ struct _xmlNode * prev : previous sibling link
+ struct _xmlDoc * doc : the containing document End of common p
+ <a href="libxml-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content : the content
+ struct _xmlAttr * properties : properties list
+ <a href="libxml-tree.html#xmlNs">xmlNs</a> * nsDef : namespace definitions on this node
+ void * psvi : for type/PSVI informations
+ unsigned short line : line number
+ unsigned short extra : extra data for XPath/XSLT
+}</pre><h3><a name="xmlNotation" id="xmlNotation">Structure xmlNotation</a></h3><pre class="programlisting">Structure xmlNotation<br />struct _xmlNotation {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Notation name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * PublicID : Public identifier, if any
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID : System identifier, if any
+}</pre><h3><a name="xmlNs" id="xmlNs">Structure xmlNs</a></h3><pre class="programlisting">Structure xmlNs<br />struct _xmlNs {
+ struct _xmlNs * next : next Ns link for this node
+ <a href="libxml-tree.html#xmlNsType">xmlNsType</a> type : global or local
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href : URL for the namespace
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix : prefix for the namespace
+ void * _private : application data
+ struct _xmlDoc * context : normally an <a href="libxml-tree.html#xmlDoc">xmlDoc</a>
+}</pre><h3><a name="xmlOutputBuffer" id="xmlOutputBuffer">Structure xmlOutputBuffer</a></h3><pre class="programlisting">Structure xmlOutputBuffer<br />struct _xmlOutputBuffer {
+ void * context
+ <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writecallback
+ <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closecallback
+ <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
+ <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8 or ISOLat
+ <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> conv : if encoder != NULL buffer for output
+ int written : total number of byte written
+ int error
+}</pre><h3><a name="xmlParserCtxt" id="xmlParserCtxt">Structure xmlParserCtxt</a></h3><pre class="programlisting">Structure xmlParserCtxt<br />struct _xmlParserCtxt {
+ struct _xmlSAXHandler * sax : The SAX handler
+ void * userData : For SAX interface only, used by DOM bui
+ <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> myDoc : the document being built
+ int wellFormed : is the document well formed
+ int replaceEntities : shall we replace entities ?
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * encoding : the declared encoding, if any
+ int standalone : standalone document
+ int html : an HTML(1)/Docbook(2) document * 3 is H
+ <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input : Current input stream
+ int inputNr : Number of current input streams
+ int inputMax : Max number of input streams
+ <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> * inputTab : stack of inputs Node analysis stack onl
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node
+ int nodeNr : Depth of the parsing stack
+ int nodeMax : Max depth of the parsing stack
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes
+ int record_info : Whether node info should be kept
+ <a href="libxml-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> node_seq : info about each node parsed
+ int errNo : error code
+ int hasExternalSubset : <a href="libxml-SAX.html#reference">reference</a> and external subset
+ int hasPErefs : the internal subset has PE refs
+ int external : are we parsing an external entity
+ int valid : is the document valid
+ int validate : shall we try to validate ?
+ <a href="libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a> vctxt : The validity context
+ <a href="libxml-parser.html#xmlParserInputState">xmlParserInputState</a> instate : current type of input
+ int token : next char look-ahead
+ char * directory : the data directory Node name stack
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : Current parsed Node
+ int nameNr : Depth of the parsing stack
+ int nameMax : Max depth of the parsing stack
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * * nameTab : array of nodes
+ long nbChars : number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> processed
+ long checkIndex : used by progressive parsing lookup
+ int keepBlanks : ugly but ...
+ int disableSAX : SAX callbacks are disabled
+ int inSubset : Parsing is in int 1/ext 2 subset
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * intSubName : name of subset
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * extSubURI : URI of external subset
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * extSubSystem : SYSTEM ID of external subset xml:space
+ int * space : Should the parser preserve spaces
+ int spaceNr : Depth of the parsing stack
+ int spaceMax : Max depth of the parsing stack
+ int * spaceTab : array of space infos
+ int depth : to prevent entity substitution loops
+ <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> entity : used to check entities boundaries
+ int charset : encoding of the in-memory content actua
+ int nodelen : Those two fields are there to
+ int nodemem : Speed up large node parsing
+ int pedantic : signal pedantic warnings
+ void * _private : For user data, libxml won't touch it
+ int loadsubset : should the external subset be loaded
+ int linenumbers : set line number in element content
+ void * catalogs : document's own catalog
+ int recovery : run in recovery mode
+ int progressive : is this a progressive parsing
+ <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionnary for the parser
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * * atts : array for the attributes callbacks
+ int maxatts : the size of the array
+ int docdict : * pre-interned strings *
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str_xml
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str_xmlns
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str_xml_ns : * Everything below is used only by the n
+ int sax2 : operating in the new SAX mode
+ int nsNr : the number of inherited namespaces
+ int nsMax : the size of the arrays
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * * nsTab : the array of prefix/namespace name
+ int * attallocs : which <a href="libxml-SAX.html#attribute">attribute</a> were allocated
+ void * * pushTab : array of data for push
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsDefault : defaulted attributes if any
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsSpecial : non-CDATA attributes if any
+ int nsWellFormed : is the document XML Nanespace okay
+ int options : * Those fields are needed only for tream
+ int dictNames : Use dictionary names for the tree
+ int freeElemsNr : number of freed element nodes
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> freeElems : List of freed element nodes
+ int freeAttrsNr : number of freed attributes nodes
+ <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> freeAttrs : * the complete error informations for th
+ <a href="libxml-xmlerror.html#xmlError">xmlError</a> lastError
+ <a href="libxml-parser.html#xmlParserMode">xmlParserMode</a> parseMode : the parser mode
+ unsigned long nbentities : number of entities references
+ unsigned long sizeentities : size of parsed entities for use by HTML
+ <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfo : Current NodeInfo
+ int nodeInfoNr : Depth of the parsing stack
+ int nodeInfoMax : Max depth of the parsing stack
+ <a href="libxml-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos
+ int input_id : we need to label inputs
+ unsigned long sizeentcopy : volume of entity copy
+}</pre><h3><a name="xmlParserInput" id="xmlParserInput">Structure xmlParserInput</a></h3><pre class="programlisting">Structure xmlParserInput<br />struct _xmlParserInput {
+ <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> buf : UTF-8 encoded buffer
+ const char * filename : The file analyzed, if any
+ const char * directory : the directory/base of the file
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base : Base of the array to parse
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur : Current char being parsed
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * end : end of the array to parse
+ int length : length if known
+ int line : Current line
+ int col : * NOTE: consumed is only tested for equa
+ unsigned long consumed : How many xmlChars already consumed
+ <a href="libxml-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a> free : function to deallocate the base
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * encoding : the encoding string for entity
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version : the version string for entity
+ int standalone : Was that entity marked standalone
+ int id : an unique identifier for the entity
+}</pre><h3><a name="xmlParserInputBuffer" id="xmlParserInputBuffer">Structure xmlParserInputBuffer</a></h3><pre class="programlisting">Structure xmlParserInputBuffer<br />struct _xmlParserInputBuffer {
+ void * context
+ <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readcallback
+ <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closecallback
+ <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8
+ <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8
+ <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> raw : if encoder != NULL buffer for raw input
+ int compressed : -1=unknown, 0=not compressed, 1=compres
+ int error
+ unsigned long rawconsumed : amount consumed from raw
+}</pre><h3><a name="xmlRef" id="xmlRef">Structure xmlRef</a></h3><pre class="programlisting">Structure xmlRef<br />struct _xmlRef {
+ struct _xmlRef * next : next Ref
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value : The Ref name
+ <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml-SAX.html#attribute">attribute</a> holding it
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml-SAX.html#attribute">attribute</a> if attr is not available
+ int lineno : The line number if attr is not availabl
+}</pre><h3><a name="xmlSAXHandler" id="xmlSAXHandler">Structure xmlSAXHandler</a></h3><pre class="programlisting">Structure xmlSAXHandler<br />struct _xmlSAXHandler {
+ <a href="libxml-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset
+ <a href="libxml-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone
+ <a href="libxml-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset
+ <a href="libxml-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset
+ <a href="libxml-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity
+ <a href="libxml-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity
+ <a href="libxml-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl
+ <a href="libxml-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl
+ <a href="libxml-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl
+ <a href="libxml-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl
+ <a href="libxml-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl
+ <a href="libxml-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator
+ <a href="libxml-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument
+ <a href="libxml-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument
+ <a href="libxml-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement
+ <a href="libxml-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement
+ <a href="libxml-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference
+ <a href="libxml-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters
+ <a href="libxml-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace
+ <a href="libxml-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction
+ <a href="libxml-parser.html#commentSAXFunc">commentSAXFunc</a> comment
+ <a href="libxml-parser.html#warningSAXFunc">warningSAXFunc</a> warning
+ <a href="libxml-parser.html#errorSAXFunc">errorSAXFunc</a> error
+ <a href="libxml-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors
+ <a href="libxml-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity
+ <a href="libxml-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock
+ <a href="libxml-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset
+ unsigned int initialized : The following fields are extensions ava
+ void * _private
+ <a href="libxml-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a> startElementNs
+ <a href="libxml-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a> endElementNs
+ <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror
+}</pre><h3><a name="xmlSAXLocator" id="xmlSAXLocator">Structure xmlSAXLocator</a></h3><pre class="programlisting">Structure xmlSAXLocator<br />struct _xmlSAXLocator {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *(*getPublicId) getPublicId
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *(*getSystemId) getSystemId
+ int(*getLineNumber) getLineNumber
+ int(*getColumnNumber) getColumnNumber
+}</pre><h3><a name="xmlAddChild" id="xmlAddChild"></a>Function: xmlAddChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChild (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the child or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlAddChildList" id="xmlAddChildList"></a>Function: xmlAddChildList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChildList (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlAddNextSibling" id="xmlAddNextSibling"></a>Function: xmlAddNextSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddNextSibling (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlAddPrevSibling" id="xmlAddPrevSibling"></a>Function: xmlAddPrevSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddPrevSibling (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an <a href="libxml-SAX.html#attribute">attribute</a> with equal name, it is first destroyed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new node or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlAddSibling" id="xmlAddSibling"></a>Function: xmlAddSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddSibling (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the child node</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the new node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new element or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlAttrSerializeTxtContent" id="xmlAttrSerializeTxtContent"></a>Function: xmlAttrSerializeTxtContent</h3><pre class="programlisting">void xmlAttrSerializeTxtContent (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)<br />
+</pre><p>Serialize text <a href="libxml-SAX.html#attribute">attribute</a> values to an xml simple buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> node</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the text content</td></tr></tbody></table></div><h3><a name="xmlBufContent" id="xmlBufContent"></a>Function: xmlBufContent</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBufContent (const <a href="libxml-tree.html#xmlBuf">xmlBuf</a> * buf)<br />
+</pre><p>Function to extract the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div><h3><a name="xmlBufEnd" id="xmlBufEnd"></a>Function: xmlBufEnd</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBufEnd (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br />
+</pre><p>Function to extract the end of the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the end of the internal content or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlBufGetNodeContent" id="xmlBufGetNodeContent"></a>Function: xmlBufGetNodeContent</h3><pre class="programlisting">int xmlBufGetNodeContent (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buf with this value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a></td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlBufNodeDump" id="xmlBufNodeDump"></a>Function: xmlBufNodeDump</h3><pre class="programlisting">size_t xmlBufNodeDump (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format)<br />
+</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error</td></tr></tbody></table></div><h3><a name="xmlBufShrink" id="xmlBufShrink"></a>Function: xmlBufShrink</h3><pre class="programlisting">size_t xmlBufShrink (<a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br /> size_t len)<br />
+</pre><p>Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte removed or 0 in case of failure</td></tr></tbody></table></div><h3><a name="xmlBufUse" id="xmlBufUse"></a>Function: xmlBufUse</h3><pre class="programlisting">size_t xmlBufUse (const <a href="libxml-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br />
+</pre><p>Function to get the length of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div><h3><a name="xmlBufferAdd" id="xmlBufferAdd"></a>Function: xmlBufferAdd</h3><pre class="programlisting">int xmlBufferAdd (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)<br />
+</pre><p>Add a string range to an XML buffer. if len == -1, the length of str is recomputed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlBufferAddHead" id="xmlBufferAddHead"></a>Function: xmlBufferAddHead</h3><pre class="programlisting">int xmlBufferAddHead (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)<br />
+</pre><p>Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of #xmlChar to add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlBufferCCat" id="xmlBufferCCat"></a>Function: xmlBufferCCat</h3><pre class="programlisting">int xmlBufferCCat (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const char * str)<br />
+</pre><p>Append a zero terminated C string to an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the C char string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlBufferCat" id="xmlBufferCat"></a>Function: xmlBufferCat</h3><pre class="programlisting">int xmlBufferCat (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Append a zero terminated string to an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to add to</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the #xmlChar string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlBufferContent" id="xmlBufferContent"></a>Function: xmlBufferContent</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferContent (const <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br />
+</pre><p>Function to extract the content of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal content</td></tr></tbody></table></div><h3><a name="xmlBufferCreate" id="xmlBufferCreate"></a>Function: xmlBufferCreate</h3><pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreate (void)<br />
+</pre><p>routine to create an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div><h3><a name="xmlBufferCreateSize" id="xmlBufferCreateSize"></a>Function: xmlBufferCreateSize</h3><pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateSize (size_t size)<br />
+</pre><p>routine to create an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>initial size of buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div><h3><a name="xmlBufferCreateStatic" id="xmlBufferCreateStatic"></a>Function: xmlBufferCreateStatic</h3><pre class="programlisting"><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateStatic (void * mem, <br /> size_t size)<br />
+</pre><p>routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory area</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure.</td></tr></tbody></table></div><h3><a name="xmlBufferDetach" id="xmlBufferDetach"></a>Function: xmlBufferDetach</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferDetach (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br />
+</pre><p>Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous string contained by the buffer.</td></tr></tbody></table></div><h3><a name="xmlBufferDump" id="xmlBufferDump"></a>Function: xmlBufferDump</h3><pre class="programlisting">int xmlBufferDump (FILE * file, <br /> <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br />
+</pre><p>Dumps an XML buffer to a FILE *.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar written</td></tr></tbody></table></div><h3><a name="xmlBufferEmpty" id="xmlBufferEmpty"></a>Function: xmlBufferEmpty</h3><pre class="programlisting">void xmlBufferEmpty (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br />
+</pre><p>empty a buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr></tbody></table></div><h3><a name="xmlBufferFree" id="xmlBufferFree"></a>Function: xmlBufferFree</h3><pre class="programlisting">void xmlBufferFree (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br />
+</pre><p>Frees an XML buffer. It frees both the content and the structure which encapsulate it.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to free</td></tr></tbody></table></div><h3><a name="xmlBufferGrow" id="xmlBufferGrow"></a>Function: xmlBufferGrow</h3><pre class="programlisting">int xmlBufferGrow (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int len)<br />
+</pre><p>Grow the available space of an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the minimum free size to allocate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new available space or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlBufferLength" id="xmlBufferLength"></a>Function: xmlBufferLength</h3><pre class="programlisting">int xmlBufferLength (const <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br />
+</pre><p>Function to get the length of a buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the length of data in the internal content</td></tr></tbody></table></div><h3><a name="xmlBufferResize" id="xmlBufferResize"></a>Function: xmlBufferResize</h3><pre class="programlisting">int xmlBufferResize (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int size)<br />
+</pre><p>Resize a buffer to accommodate minimum size of @size.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to resize</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the desired size</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of problems, 1 otherwise</td></tr></tbody></table></div><h3><a name="xmlBufferSetAllocationScheme" id="xmlBufferSetAllocationScheme"></a>Function: xmlBufferSetAllocationScheme</h3><pre class="programlisting">void xmlBufferSetAllocationScheme (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br />
+</pre><p>Sets the allocation scheme for this buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to tune</td></tr><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation scheme to use</td></tr></tbody></table></div><h3><a name="xmlBufferShrink" id="xmlBufferShrink"></a>Function: xmlBufferShrink</h3><pre class="programlisting">int xmlBufferShrink (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> unsigned int len)<br />
+</pre><p>Remove the beginning of an XML buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of #xmlChar removed, or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlBufferWriteCHAR" id="xmlBufferWriteCHAR"></a>Function: xmlBufferWriteCHAR</h3><pre class="programlisting">void xmlBufferWriteCHAR (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)<br />
+</pre><p>routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div><h3><a name="xmlBufferWriteChar" id="xmlBufferWriteChar"></a>Function: xmlBufferWriteChar</h3><pre class="programlisting">void xmlBufferWriteChar (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const char * string)<br />
+</pre><p>routine which manage and grows an output buffer. This one add C chars at the end of the array.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div><h3><a name="xmlBufferWriteQuotedString" id="xmlBufferWriteQuotedString"></a>Function: xmlBufferWriteQuotedString</h3><pre class="programlisting">void xmlBufferWriteQuotedString (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * string)<br />
+</pre><p>routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>the string to add</td></tr></tbody></table></div><h3><a name="xmlBuildQName" id="xmlBuildQName"></a>Function: xmlBuildQName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildQName (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * memory, <br /> int len)<br />
+</pre><p>Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ncname</tt></i>:</span></td><td>the Name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>preallocated memory</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>preallocated memory length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlChildElementCount" id="xmlChildElementCount"></a>Function: xmlChildElementCount</h3><pre class="programlisting">unsigned long xmlChildElementCount (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br />
+</pre><p>Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the count of element child or 0 if not available</td></tr></tbody></table></div><h3><a name="xmlCopyDoc" id="xmlCopyDoc"></a>Function: xmlCopyDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCopyDoc (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int recursive)<br />
+</pre><p>Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>recursive</tt></i>:</span></td><td>if not zero do a recursive copy.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDocPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyDtd" id="xmlCopyDtd"></a>Function: xmlCopyDtd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCopyDtd (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br />
+</pre><p>Do a copy of the dtd.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>the dtd</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlDtdPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyNamespace" id="xmlCopyNamespace"></a>Function: xmlCopyNamespace</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespace (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br />
+</pre><p>Do a copy of the namespace.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyNamespaceList" id="xmlCopyNamespaceList"></a>Function: xmlCopyNamespaceList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespaceList (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br />
+</pre><p>Do a copy of an namespace list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNsPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyNode" id="xmlCopyNode"></a>Function: xmlCopyNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int extended)<br />
+</pre><p>Do a copy of the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyNodeList" id="xmlCopyNodeList"></a>Function: xmlCopyNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNodeList (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyProp" id="xmlCopyProp"></a>Function: xmlCopyProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br />
+</pre><p>Do a copy of the attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the <a href="libxml-SAX.html#attribute">attribute</a> will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyPropList" id="xmlCopyPropList"></a>Function: xmlCopyPropList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyPropList (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br />
+</pre><p>Do a copy of an <a href="libxml-SAX.html#attribute">attribute</a> list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>the element where the attributes will be grafted</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlAttrPtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCreateIntSubset" id="xmlCreateIntSubset"></a>Function: xmlCreateIntSubset</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCreateIntSubset (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Create the internal subset of a document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external (PUBLIC) ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div><h3><a name="xmlDOMWrapAcquireNsFunction" id="xmlDOMWrapAcquireNsFunction"></a>Function type: xmlDOMWrapAcquireNsFunction</h3><pre class="programlisting">Function type: xmlDOMWrapAcquireNsFunction
+<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlDOMWrapAcquireNsFunction (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix)
+</pre><p>A function called to acquire namespaces (xmlNs) from the wrapper.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the context node (element or attribute)</td></tr><tr><td><span class="term"><i><tt>nsName</tt></i>:</span></td><td>the requested namespace name</td></tr><tr><td><span class="term"><i><tt>nsPrefix</tt></i>:</span></td><td>the requested namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL in case of an error.</td></tr></tbody></table></div><br />
+<h3><a name="xmlDOMWrapAdoptNode" id="xmlDOMWrapAdoptNode"></a>Function: xmlDOMWrapAdoptNode</h3><pre class="programlisting">int xmlDOMWrapAdoptNode (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br /> int options)<br />
+</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used This is the case when you have an unlinked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapCloneNode" id="xmlDOMWrapCloneNode"></a>Function: xmlDOMWrapCloneNode</h3><pre class="programlisting">int xmlDOMWrapCloneNode (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br /> int deep, <br /> int options)<br />
+</pre><p>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml-SAX.html#attribute">attribute</a> values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the optional context for custom processing</td></tr><tr><td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td><td>the optional sourceDoc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to start with</td></tr><tr><td><span class="term"><i><tt>resNode</tt></i>:</span></td><td>the clone of the given @node</td></tr><tr><td><span class="term"><i><tt>destDoc</tt></i>:</span></td><td>the destination doc</td></tr><tr><td><span class="term"><i><tt>destParent</tt></i>:</span></td><td>the optional new parent of @node in @destDoc</td></tr><tr><td><span class="term"><i><tt>deep</tt></i>:</span></td><td>descend into child if set</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapFreeCtxt" id="xmlDOMWrapFreeCtxt"></a>Function: xmlDOMWrapFreeCtxt</h3><pre class="programlisting">void xmlDOMWrapFreeCtxt (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt)<br />
+</pre><p>Frees the DOM-wrapper context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the DOM-wrapper context</td></tr></tbody></table></div><h3><a name="xmlDOMWrapNewCtxt" id="xmlDOMWrapNewCtxt"></a>Function: xmlDOMWrapNewCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> xmlDOMWrapNewCtxt (void)<br />
+</pre><p>Allocates and initializes a new DOM-wrapper context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> or NULL in case of an internal error.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapReconcileNamespaces" id="xmlDOMWrapReconcileNamespaces"></a>Function: xmlDOMWrapReconcileNamespaces</h3><pre class="programlisting">int xmlDOMWrapReconcileNamespaces (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> int options)<br />
+</pre><p>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in <a href="libxml-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>DOM wrapper context, unused at the moment</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element-node</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>option flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded, -1 otherwise and on API/internal errors.</td></tr></tbody></table></div><h3><a name="xmlDOMWrapRemoveNode" id="xmlDOMWrapRemoveNode"></a>Function: xmlDOMWrapRemoveNode</h3><pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int options)<br />
+</pre><p>Unlinks the given node from its owner. This will substitute ns-references to node-&gt;nsDef for ns-references to doc-&gt;oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a DOM wrapper context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the doc</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to be removed.</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>set of options, unused at the moment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td></tr></tbody></table></div><h3><a name="xmlDocCopyNode" id="xmlDocCopyNode"></a>Function: xmlDocCopyNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int extended)<br />
+</pre><p>Do a copy of the node to a given document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>extended</tt></i>:</span></td><td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDocCopyNodeList" id="xmlDocCopyNodeList"></a>Function: xmlDocCopyNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNodeList (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Do a recursive copy of the node list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the first node in the list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlNodePtr, or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDocDump" id="xmlDocDump"></a>Function: xmlDocDump</h3><pre class="programlisting">int xmlDocDump (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br />
+</pre><p>Dump an XML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlDocDumpFormatMemory" id="xmlDocDumpFormatMemory"></a>Function: xmlDocDumpFormatMemory</h3><pre class="programlisting">void xmlDocDumpFormatMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size, <br /> int format)<br />
+</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="xmlDocDumpFormatMemoryEnc" id="xmlDocDumpFormatMemoryEnc"></a>Function: xmlDocDumpFormatMemoryEnc</h3><pre class="programlisting">void xmlDocDumpFormatMemoryEnc (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> const char * txt_encoding, <br /> int format)<br />
+</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr></tbody></table></div><h3><a name="xmlDocDumpMemory" id="xmlDocDumpMemory"></a>Function: xmlDocDumpMemory</h3><pre class="programlisting">void xmlDocDumpMemory (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br /> int * size)<br />
+</pre><p>Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>OUT: the memory pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>OUT: the memory length</td></tr></tbody></table></div><h3><a name="xmlDocDumpMemoryEnc" id="xmlDocDumpMemoryEnc"></a>Function: xmlDocDumpMemoryEnc</h3><pre class="programlisting">void xmlDocDumpMemoryEnc (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> const char * txt_encoding)<br />
+</pre><p>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out_doc</tt></i>:</span></td><td>Document to generate XML text from</td></tr><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td><td>Character encoding to use when generating XML text</td></tr></tbody></table></div><h3><a name="xmlDocFormatDump" id="xmlDocFormatDump"></a>Function: xmlDocFormatDump</h3><pre class="programlisting">int xmlDocFormatDump (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> int format)<br />
+</pre><p>Dump an XML document to an open FILE.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE*</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div><h3><a name="xmlDocGetRootElement" id="xmlDocGetRootElement"></a>Function: xmlDocGetRootElement</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocGetRootElement (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)<br />
+</pre><p>Get the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the #xmlNodePtr for the root or NULL</td></tr></tbody></table></div><h3><a name="xmlDocSetRootElement" id="xmlDocSetRootElement"></a>Function: xmlDocSetRootElement</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocSetRootElement (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> root)<br />
+</pre><p>Set the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>root</tt></i>:</span></td><td>the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the old root element if any was found, NULL if root was NULL</td></tr></tbody></table></div><h3><a name="xmlElemDump" id="xmlElemDump"></a>Function: xmlElemDump</h3><pre class="programlisting">void xmlElemDump (FILE * f, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Dump an XML/HTML node, recursive behaviour, children are printed too.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr></tbody></table></div><h3><a name="xmlFirstElementChild" id="xmlFirstElementChild"></a>Function: xmlFirstElementChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlFirstElementChild (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br />
+</pre><p>Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first element child or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlFreeDoc" id="xmlFreeDoc"></a>Function: xmlFreeDoc</h3><pre class="programlisting">void xmlFreeDoc (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br />
+</pre><p>Free up all the structures used by a document, tree included.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>pointer to the document</td></tr></tbody></table></div><h3><a name="xmlFreeDtd" id="xmlFreeDtd"></a>Function: xmlFreeDtd</h3><pre class="programlisting">void xmlFreeDtd (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur)<br />
+</pre><p>Free a DTD structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the DTD structure to free up</td></tr></tbody></table></div><h3><a name="xmlFreeNode" id="xmlFreeNode"></a>Function: xmlFreeNode</h3><pre class="programlisting">void xmlFreeNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div><h3><a name="xmlFreeNodeList" id="xmlFreeNodeList"></a>Function: xmlFreeNodeList</h3><pre class="programlisting">void xmlFreeNodeList (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first node in the list</td></tr></tbody></table></div><h3><a name="xmlFreeNs" id="xmlFreeNs"></a>Function: xmlFreeNs</h3><pre class="programlisting">void xmlFreeNs (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br />
+</pre><p>Free up the structures associated to a namespace</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the namespace pointer</td></tr></tbody></table></div><h3><a name="xmlFreeNsList" id="xmlFreeNsList"></a>Function: xmlFreeNsList</h3><pre class="programlisting">void xmlFreeNsList (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br />
+</pre><p>Free up all the structures associated to the chained namespaces.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first namespace pointer</td></tr></tbody></table></div><h3><a name="xmlFreeProp" id="xmlFreeProp"></a>Function: xmlFreeProp</h3><pre class="programlisting">void xmlFreeProp (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br />
+</pre><p>Free one attribute, all the content is freed too</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a></td></tr></tbody></table></div><h3><a name="xmlFreePropList" id="xmlFreePropList"></a>Function: xmlFreePropList</h3><pre class="programlisting">void xmlFreePropList (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br />
+</pre><p>Free a property and all its siblings, all the children are freed too.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the first property in the list</td></tr></tbody></table></div><h3><a name="xmlGetBufferAllocationScheme" id="xmlGetBufferAllocationScheme"></a>Function: xmlGetBufferAllocationScheme</h3><pre class="programlisting"><a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlGetBufferAllocationScheme (void)<br />
+</pre><p>Types are <a href="libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance <a href="libxml-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current allocation scheme</td></tr></tbody></table></div><h3><a name="xmlGetCompressMode" id="xmlGetCompressMode"></a>Function: xmlGetCompressMode</h3><pre class="programlisting">int xmlGetCompressMode (void)<br />
+</pre><p>get the default compression mode used, ZLIB based.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div><h3><a name="xmlGetDocCompressMode" id="xmlGetDocCompressMode"></a>Function: xmlGetDocCompressMode</h3><pre class="programlisting">int xmlGetDocCompressMode (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)<br />
+</pre><p>get the compression ratio for a document, ZLIB based</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 (uncompressed) to 9 (max compression)</td></tr></tbody></table></div><h3><a name="xmlGetIntSubset" id="xmlGetIntSubset"></a>Function: xmlGetIntSubset</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlGetIntSubset (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc)<br />
+</pre><p>Get the internal subset of a document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the DTD structure or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlGetLastChild" id="xmlGetLastChild"></a>Function: xmlGetLastChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlGetLastChild (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * parent)<br />
+</pre><p>Search the last child of a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL if none.</td></tr></tbody></table></div><h3><a name="xmlGetLineNo" id="xmlGetLineNo"></a>Function: xmlGetLineNo</h3><pre class="programlisting">long xmlGetLineNo (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)<br />
+</pre><p>Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if <a href="libxml-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> parser option was used</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>valid node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number if successful, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlGetNoNsProp" id="xmlGetNoNsProp"></a>Function: xmlGetNoNsProp</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNoNsProp (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search and get the value of an <a href="libxml-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to <a href="libxml-tree.html#xmlGetProp">xmlGetProp</a> except it will accept only an <a href="libxml-SAX.html#attribute">attribute</a> in no namespace.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlGetNodePath" id="xmlGetNodePath"></a>Function: xmlGetNodePath</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNodePath (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)<br />
+</pre><p>Build a structure based Path for the given node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new path or NULL in case of error. The caller must free the returned string</td></tr></tbody></table></div><h3><a name="xmlGetNsList" id="xmlGetNsList"></a>Function: xmlGetNsList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> * xmlGetNsList (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)<br />
+</pre><p>Search all the namespace applying to a given element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined</td></tr></tbody></table></div><h3><a name="xmlGetNsProp" id="xmlGetNsProp"></a>Function: xmlGetNsProp</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNsProp (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br />
+</pre><p>Search and get the value of an <a href="libxml-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlGetProp" id="xmlGetProp"></a>Function: xmlGetProp</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlGetProp (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search and get the value of an <a href="libxml-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value or NULL if not found. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlHasNsProp" id="xmlHasNsProp"></a>Function: xmlHasNsProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasNsProp (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br />
+</pre><p>Search for an <a href="libxml-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> or the <a href="libxml-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div><h3><a name="xmlHasProp" id="xmlHasProp"></a>Function: xmlHasProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasProp (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search an <a href="libxml-SAX.html#attribute">attribute</a> associated to a node This function also looks in DTD <a href="libxml-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> or the <a href="libxml-SAX.html#attribute">attribute</a> declaration or NULL if neither was found.</td></tr></tbody></table></div><h3><a name="xmlIsBlankNode" id="xmlIsBlankNode"></a>Function: xmlIsBlankNode</h3><pre class="programlisting">int xmlIsBlankNode (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)<br />
+</pre><p>Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div><h3><a name="xmlIsXHTML" id="xmlIsXHTML"></a>Function: xmlIsXHTML</h3><pre class="programlisting">int xmlIsXHTML (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * publicID)<br />
+</pre><p>Try to find if the document correspond to an XHTML DTD</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>systemID</tt></i>:</span></td><td>the system identifier</td></tr><tr><td><span class="term"><i><tt>publicID</tt></i>:</span></td><td>the public identifier</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlLastElementChild" id="xmlLastElementChild"></a>Function: xmlLastElementChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlLastElementChild (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br />
+</pre><p>Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element child or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlNewCDataBlock" id="xmlNewCDataBlock"></a>Function: xmlNewCDataBlock</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCDataBlock (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Creation of a new node containing a CDATA block.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the CDATA block content content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the block</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewCharRef" id="xmlNewCharRef"></a>Function: xmlNewCharRef</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCharRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Creation of a new character <a href="libxml-SAX.html#reference">reference</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the char ref string, starting with # or "&amp;# ... ;"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewChild" id="xmlNewChild"></a>Function: xmlNewChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewChild (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewComment" id="xmlNewComment"></a>Function: xmlNewComment</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewComment (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new node containing a comment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDoc" id="xmlNewDoc"></a>Function: xmlNewDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlNewDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version)<br />
+</pre><p>Creates a new XML document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string giving the version of XML "1.0"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new document</td></tr></tbody></table></div><h3><a name="xmlNewDocComment" id="xmlNewDocComment"></a>Function: xmlNewDocComment</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocComment (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new node containing a <a href="libxml-SAX.html#comment">comment</a> within a document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the <a href="libxml-SAX.html#comment">comment</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocFragment" id="xmlNewDocFragment"></a>Function: xmlNewDocFragment</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocFragment (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Creation of a new Fragment node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the fragment</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocNode" id="xmlNewDocNode"></a>Function: xmlNewDocNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNode (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocNodeEatName" id="xmlNewDocNodeEatName"></a>Function: xmlNewDocNodeEatName</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNodeEatName (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the XML text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocPI" id="xmlNewDocPI"></a>Function: xmlNewDocPI</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocPI (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a processing instruction element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the target document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocProp" id="xmlNewDocProp"></a>Function: xmlNewDocProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewDocProp (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Create a new property carried by a document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml-SAX.html#attribute">attribute</a></td></tr></tbody></table></div><h3><a name="xmlNewDocRawNode" id="xmlNewDocRawNode"></a>Function: xmlNewDocRawNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocRawNode (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new node element within a document. @ns and @content are optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content if any</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocText" id="xmlNewDocText"></a>Function: xmlNewDocText</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocText (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new text node within a document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDocTextLen" id="xmlNewDocTextLen"></a>Function: xmlNewDocTextLen</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocTextLen (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Creation of a new text node with an extra content length parameter. The text node pertain to a given document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewDtd" id="xmlNewDtd"></a>Function: xmlNewDtd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlNewDtd (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document pointer</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the DTD name</td></tr><tr><td><span class="term"><i><tt>ExternalID</tt></i>:</span></td><td>the external ID</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new DTD structure</td></tr></tbody></table></div><h3><a name="xmlNewGlobalNs" id="xmlNewGlobalNs"></a>Function: xmlNewGlobalNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL this functionality had been removed</td></tr></tbody></table></div><h3><a name="xmlNewNode" id="xmlNewNode"></a>Function: xmlNewNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object. Uses xmlStrdup() to make copy of @name.</td></tr></tbody></table></div><h3><a name="xmlNewNodeEatName" id="xmlNewNodeEatName"></a>Function: xmlNewNodeEatName</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNodeEatName (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Creation of a new node element. @ns is optional (NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the node name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object, with pointer @name as new node's name. Use xmlNewNode() if a copy of @name string is is needed as new node's name.</td></tr></tbody></table></div><h3><a name="xmlNewNs" id="xmlNewNs"></a>Function: xmlNewNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewNs (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, @prefix should be NULL. We use href==NULL in the case of an element creation where the namespace was not defined.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the element carrying the namespace</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the URI associated</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix for the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new namespace pointer or NULL</td></tr></tbody></table></div><h3><a name="xmlNewNsProp" id="xmlNewNsProp"></a>Function: xmlNewNsProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml-SAX.html#attribute">attribute</a></td></tr></tbody></table></div><h3><a name="xmlNewNsPropEatName" id="xmlNewNsPropEatName"></a>Function: xmlNewNsPropEatName</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsPropEatName (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Create a new property tagged with a namespace and carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml-SAX.html#attribute">attribute</a></td></tr></tbody></table></div><h3><a name="xmlNewPI" id="xmlNewPI"></a>Function: xmlNewPI</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewPI (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a processing instruction element. Use xmlDocNewPI preferably to get string interning</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the processing instruction name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewProp" id="xmlNewProp"></a>Function: xmlNewProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Create a new property carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the holding node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the <a href="libxml-SAX.html#attribute">attribute</a></td></tr></tbody></table></div><h3><a name="xmlNewReference" id="xmlNewReference"></a>Function: xmlNewReference</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewReference (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Creation of a new <a href="libxml-SAX.html#reference">reference</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#reference">reference</a> name, or the <a href="libxml-SAX.html#reference">reference</a> string with &amp; and ;</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewText" id="xmlNewText"></a>Function: xmlNewText</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewText (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new text node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewTextChild" id="xmlNewTextChild"></a>Function: xmlNewTextChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextChild (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace if any</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the child</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content of the child if any.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNewTextLen" id="xmlNewTextLen"></a>Function: xmlNewTextLen</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextLen (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Creation of a new text node with an extra parameter for the content's length</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the text content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the text len.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new node object.</td></tr></tbody></table></div><h3><a name="xmlNextElementSibling" id="xmlNextElementSibling"></a>Function: xmlNextElementSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNextElementSibling (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element sibling or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlNodeAddContent" id="xmlNodeAddContent"></a>Function: xmlNodeAddContent</h3><pre class="programlisting">void xmlNodeAddContent (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr></tbody></table></div><h3><a name="xmlNodeAddContentLen" id="xmlNodeAddContentLen"></a>Function: xmlNodeAddContentLen</h3><pre class="programlisting">void xmlNodeAddContentLen (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>extra content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div><h3><a name="xmlNodeBufGetContent" id="xmlNodeBufGetContent"></a>Function: xmlNodeBufGetContent</h3><pre class="programlisting">int xmlNodeBufGetContent (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlNodeDump" id="xmlNodeDump"></a>Function: xmlNodeDump</h3><pre class="programlisting">int xmlNodeDump (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format)<br />
+</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called Since this is using <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a> structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlNodeDumpOutput" id="xmlNodeDumpOutput"></a>Function: xmlNodeDumpOutput</h3><pre class="programlisting">void xmlNodeDumpOutput (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int level, <br /> int format, <br /> const char * encoding)<br />
+</pre><p>Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>an optional encoding string</td></tr></tbody></table></div><h3><a name="xmlNodeGetBase" id="xmlNodeGetBase"></a>Function: xmlNodeGetBase</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetBase (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc-&gt;URL in this case</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document the node pertains to</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlNodeGetContent" id="xmlNodeGetContent"></a>Function: xmlNodeGetContent</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetContent (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlNodeGetLang" id="xmlNodeGetLang"></a>Function: xmlNodeGetLang</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetLang (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Searches the language of a node, i.e. the values of the xml:lang <a href="libxml-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlNodeGetSpacePreserve" id="xmlNodeGetSpacePreserve"></a>Function: xmlNodeGetSpacePreserve</h3><pre class="programlisting">int xmlNodeGetSpacePreserve (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * cur)<br />
+</pre><p>Searches the space preserving behaviour of a node, i.e. the values of the xml:space <a href="libxml-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being checked</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if xml:space is not inherited, 0 if "default", 1 if "preserve"</td></tr></tbody></table></div><h3><a name="xmlNodeIsText" id="xmlNodeIsText"></a>Function: xmlNodeIsText</h3><pre class="programlisting">int xmlNodeIsText (const <a href="libxml-tree.html#xmlNode">xmlNode</a> * node)<br />
+</pre><p>Is this node a Text node ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 yes, 0 no</td></tr></tbody></table></div><h3><a name="xmlNodeListGetRawString" id="xmlNodeListGetRawString"></a>Function: xmlNodeListGetRawString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetRawString (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * list, <br /> int inLine)<br />
+</pre><p>Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlNodeListGetString" id="xmlNodeListGetString"></a>Function: xmlNodeListGetString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetString (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-tree.html#xmlNode">xmlNode</a> * list, <br /> int inLine)<br />
+</pre><p>Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>a Node list</td></tr><tr><td><span class="term"><i><tt>inLine</tt></i>:</span></td><td>should we replace entity contents or show their external form</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the string copy, the caller must free it with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlNodeSetBase" id="xmlNodeSetBase"></a>Function: xmlNodeSetBase</h3><pre class="programlisting">void xmlNodeSetBase (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * uri)<br />
+</pre><p>Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>the new base URI</td></tr></tbody></table></div><h3><a name="xmlNodeSetContent" id="xmlNodeSetContent"></a>Function: xmlNodeSetContent</h3><pre class="programlisting">void xmlNodeSetContent (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr></tbody></table></div><h3><a name="xmlNodeSetContentLen" id="xmlNodeSetContentLen"></a>Function: xmlNodeSetContentLen</h3><pre class="programlisting">void xmlNodeSetContentLen (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being modified</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the new value of the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size of @content</td></tr></tbody></table></div><h3><a name="xmlNodeSetLang" id="xmlNodeSetLang"></a>Function: xmlNodeSetLang</h3><pre class="programlisting">void xmlNodeSetLang (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * lang)<br />
+</pre><p>Set the language of a node, i.e. the values of the xml:lang attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>lang</tt></i>:</span></td><td>the language description</td></tr></tbody></table></div><h3><a name="xmlNodeSetName" id="xmlNodeSetName"></a>Function: xmlNodeSetName</h3><pre class="programlisting">void xmlNodeSetName (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Set (or reset) the name of a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the new tag name</td></tr></tbody></table></div><h3><a name="xmlNodeSetSpacePreserve" id="xmlNodeSetSpacePreserve"></a>Function: xmlNodeSetSpacePreserve</h3><pre class="programlisting">void xmlNodeSetSpacePreserve (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br /> int val)<br />
+</pre><p>Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node being changed</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the xml:space value ("0": default, 1: "preserve")</td></tr></tbody></table></div><h3><a name="xmlPreviousElementSibling" id="xmlPreviousElementSibling"></a>Function: xmlPreviousElementSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlPreviousElementSibling (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back <a href="libxml-SAX.html#reference">reference</a> from entities content to entities references.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous element sibling or NULL if not available</td></tr></tbody></table></div><h3><a name="xmlReconciliateNs" id="xmlReconciliateNs"></a>Function: xmlReconciliateNs</h3><pre class="programlisting">int xmlReconciliateNs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br />
+</pre><p>This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node defining the subtree to reconciliate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of namespace declarations created or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRemoveProp" id="xmlRemoveProp"></a>Function: xmlRemoveProp</h3><pre class="programlisting">int xmlRemoveProp (<a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br />
+</pre><p>Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlReplaceNode" id="xmlReplaceNode"></a>Function: xmlReplaceNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlReplaceNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the old node</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the @old node</td></tr></tbody></table></div><h3><a name="xmlSaveFile" id="xmlSaveFile"></a>Function: xmlSaveFile</h3><pre class="programlisting">int xmlSaveFile (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br />
+</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFileEnc" id="xmlSaveFileEnc"></a>Function: xmlSaveFileEnc</h3><pre class="programlisting">int xmlSaveFileEnc (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
+</pre><p>Dump an XML document, converting it to the given encoding</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of an encoding (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFileTo" id="xmlSaveFileTo"></a>Function: xmlSaveFileTo</h3><pre class="programlisting">int xmlSaveFileTo (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
+</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFile" id="xmlSaveFormatFile"></a>Function: xmlSaveFormatFile</h3><pre class="programlisting">int xmlSaveFormatFile (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> int format)<br />
+</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFileEnc" id="xmlSaveFormatFileEnc"></a>Function: xmlSaveFormatFileEnc</h3><pre class="programlisting">int xmlSaveFormatFileEnc (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an XML document to a file or an URL.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL to output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document being saved</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of the encoding to use or NULL.</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces be added.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFileTo" id="xmlSaveFormatFileTo"></a>Function: xmlSaveFormatFileTo</h3><pre class="programlisting">int xmlSaveFormatFileTo (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
+</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSearchNs" id="xmlSearchNs"></a>Function: xmlSearchNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br />
+</pre><p>Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div><h3><a name="xmlSearchNsByHref" id="xmlSearchNsByHref"></a>Function: xmlSearchNsByHref</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNsByHref (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href)<br />
+</pre><p>Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the namespace value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div><h3><a name="xmlSetBufferAllocationScheme" id="xmlSetBufferAllocationScheme"></a>Function: xmlSetBufferAllocationScheme</h3><pre class="programlisting">void xmlSetBufferAllocationScheme (<a href="libxml-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br />
+</pre><p>Set the buffer allocation method. Types are <a href="libxml-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>scheme</tt></i>:</span></td><td>allocation method to use</td></tr></tbody></table></div><h3><a name="xmlSetCompressMode" id="xmlSetCompressMode"></a>Function: xmlSetCompressMode</h3><pre class="programlisting">void xmlSetCompressMode (int mode)<br />
+</pre><p>set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div><h3><a name="xmlSetDocCompressMode" id="xmlSetDocCompressMode"></a>Function: xmlSetDocCompressMode</h3><pre class="programlisting">void xmlSetDocCompressMode (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int mode)<br />
+</pre><p>set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>mode</tt></i>:</span></td><td>the compression ratio</td></tr></tbody></table></div><h3><a name="xmlSetListDoc" id="xmlSetListDoc"></a>Function: xmlSetListDoc</h3><pre class="programlisting">void xmlSetListDoc (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>update all nodes in the list to point to the right document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>the first element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div><h3><a name="xmlSetNs" id="xmlSetNs"></a>Function: xmlSetNs</h3><pre class="programlisting">void xmlSetNs (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br />
+</pre><p>Associate a namespace to a node, a posteriori.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in the document</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a namespace pointer</td></tr></tbody></table></div><h3><a name="xmlSetNsProp" id="xmlSetNsProp"></a>Function: xmlSetNsProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetNsProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Set (or reset) an <a href="libxml-SAX.html#attribute">attribute</a> carried by a node. The ns structure must be in scope, this is not checked</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div><h3><a name="xmlSetProp" id="xmlSetProp"></a>Function: xmlSetProp</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Set (or reset) an <a href="libxml-SAX.html#attribute">attribute</a> carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name (a QName)</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> pointer.</td></tr></tbody></table></div><h3><a name="xmlSetTreeDoc" id="xmlSetTreeDoc"></a>Function: xmlSetTreeDoc</h3><pre class="programlisting">void xmlSetTreeDoc (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>update all nodes under the tree to point to the right document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>the top element</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr></tbody></table></div><h3><a name="xmlSplitQName2" id="xmlSplitQName2"></a>Function: xmlSplitQName2</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName2 (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br />
+</pre><p>parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>a <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> **</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.</td></tr></tbody></table></div><h3><a name="xmlSplitQName3" id="xmlSplitQName3"></a>Function: xmlSplitQName3</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int * len)<br />
+</pre><p>parse an XML qualified name string,i</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the full QName</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>an int *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix</td></tr></tbody></table></div><h3><a name="xmlStringGetNodeList" id="xmlStringGetNodeList"></a>Function: xmlStringGetNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div><h3><a name="xmlStringLenGetNodeList" id="xmlStringLenGetNodeList"></a>Function: xmlStringLenGetNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringLenGetNodeList (const <a href="libxml-tree.html#xmlDoc">xmlDoc</a> * doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int len)<br />
+</pre><p>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value of the text</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the string value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the first child</td></tr></tbody></table></div><h3><a name="xmlTextConcat" id="xmlTextConcat"></a>Function: xmlTextConcat</h3><pre class="programlisting">int xmlTextConcat (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Concat the given string at the end of the existing node content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the content</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>@content length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlTextMerge" id="xmlTextMerge"></a>Function: xmlTextMerge</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextMerge (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> second)<br />
+</pre><p>Merge two text nodes into one</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>first</tt></i>:</span></td><td>the first text node</td></tr><tr><td><span class="term"><i><tt>second</tt></i>:</span></td><td>the second text node being merged</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the first text node augmented</td></tr></tbody></table></div><h3><a name="xmlUnlinkNode" id="xmlUnlinkNode"></a>Function: xmlUnlinkNode</h3><pre class="programlisting">void xmlUnlinkNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node</td></tr></tbody></table></div><h3><a name="xmlUnsetNsProp" id="xmlUnsetNsProp"></a>Function: xmlUnsetNsProp</h3><pre class="programlisting">int xmlUnsetNsProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Remove an <a href="libxml-SAX.html#attribute">attribute</a> carried by a node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the namespace definition</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div><h3><a name="xmlUnsetProp" id="xmlUnsetProp"></a>Function: xmlUnsetProp</h3><pre class="programlisting">int xmlUnsetProp (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Remove an <a href="libxml-SAX.html#attribute">attribute</a> carried by a node. This handles only attributes in no namespace.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful, -1 if not found</td></tr></tbody></table></div><h3><a name="xmlValidateNCName" id="xmlValidateNCName"></a>Function: xmlValidateNCName</h3><pre class="programlisting">int xmlValidateNCName (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)<br />
+</pre><p>Check that a value conforms to the lexical space of NCName</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlValidateNMToken" id="xmlValidateNMToken"></a>Function: xmlValidateNMToken</h3><pre class="programlisting">int xmlValidateNMToken (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)<br />
+</pre><p>Check that a value conforms to the lexical space of NMToken</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlValidateName" id="xmlValidateName"></a>Function: xmlValidateName</h3><pre class="programlisting">int xmlValidateName (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)<br />
+</pre><p>Check that a value conforms to the lexical space of Name</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlValidateQName" id="xmlValidateQName"></a>Function: xmlValidateQName</h3><pre class="programlisting">int xmlValidateQName (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> int space)<br />
+</pre><p>Check that a value conforms to the lexical space of QName</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>space</tt></i>:</span></td><td>allow spaces in front and end of the string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-uri.html b/doc/html/libxml-uri.html
new file mode 100644
index 0000000..6ced67a
--- /dev/null
+++ b/doc/html/libxml-uri.html
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module uri from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module uri from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-tree.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-tree.html">tree</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-valid.html">valid</a></th><td><a accesskey="n" href="libxml-valid.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>library of generic URI related routines Implements RFC 2396 </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlURI">xmlURI</a><br />struct _xmlURI
+</pre><pre class="programlisting">Typedef <a href="libxml-uri.html#xmlURI">xmlURI</a> * <a name="xmlURIPtr" id="xmlURIPtr">xmlURIPtr</a>
+</pre><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildRelativeURI">xmlBuildRelativeURI</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildURI">xmlBuildURI</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCanonicPath">xmlCanonicPath</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)</pre>
+<pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlCreateURI">xmlCreateURI</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlFreeURI">xmlFreeURI</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)</pre>
+<pre class="programlisting">int <a href="#xmlNormalizeURIPath">xmlNormalizeURIPath</a> (char * path)</pre>
+<pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlParseURI">xmlParseURI</a> (const char * str)</pre>
+<pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> <a href="#xmlParseURIRaw">xmlParseURIRaw</a> (const char * str, <br /> int raw)</pre>
+<pre class="programlisting">int <a href="#xmlParseURIReference">xmlParseURIReference</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br /> const char * str)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlPathToURI">xmlPathToURI</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)</pre>
+<pre class="programlisting">void <a href="#xmlPrintURI">xmlPrintURI</a> (FILE * stream, <br /> <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSaveUri">xmlSaveUri</a> (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscape">xmlURIEscape</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlURIEscapeStr">xmlURIEscapeStr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * list)</pre>
+<pre class="programlisting">char * <a href="#xmlURIUnescapeString">xmlURIUnescapeString</a> (const char * str, <br /> int len, <br /> char * target)</pre>
+<h2>Description</h2>
+<h3><a name="xmlURI" id="xmlURI">Structure xmlURI</a></h3><pre class="programlisting">Structure xmlURI<br />struct _xmlURI {
+ char * scheme : the URI scheme
+ char * opaque : opaque part
+ char * authority : the authority part
+ char * server : the server part
+ char * user : the user part
+ int port : the port number
+ char * path : the path string
+ char * query : the query string (deprecated - use with
+ char * fragment : the fragment identifier
+ int cleanup : parsing potentially unclean URI
+ char * query_raw : the query string (as it appears in the
+}</pre><h3><a name="xmlBuildRelativeURI" id="xmlBuildRelativeURI"></a>Function: xmlBuildRelativeURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildRelativeURI (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)<br />
+</pre><p>Expresses the URI of the <a href="libxml-SAX.html#reference">reference</a> in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI <a href="libxml-SAX.html#reference">reference</a> is really wierd or complicated, it may be worthwhile to first convert it into a "nice" one by calling <a href="libxml-uri.html#xmlBuildURI">xmlBuildURI</a> (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI <a href="libxml-SAX.html#reference">reference</a> under consideration</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI string (to be freed by the caller) or NULL in case error.</td></tr></tbody></table></div><h3><a name="xmlBuildURI" id="xmlBuildURI"></a>Function: xmlBuildURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildURI (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * URI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base)<br />
+</pre><p>Computes he final URI of the <a href="libxml-SAX.html#reference">reference</a> done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI instance found in the document</td></tr><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI string (to be freed by the caller) or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCanonicPath" id="xmlCanonicPath"></a>Function: xmlCanonicPath</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCanonicPath (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)<br />
+</pre><p>Constructs a canonic path from the specified path.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the resource locator in a filesystem notation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.</td></tr></tbody></table></div><h3><a name="xmlCreateURI" id="xmlCreateURI"></a>Function: xmlCreateURI</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlCreateURI (void)<br />
+</pre><p>Simply creates an empty <a href="libxml-uri.html#xmlURI">xmlURI</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new structure or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlFreeURI" id="xmlFreeURI"></a>Function: xmlFreeURI</h3><pre class="programlisting">void xmlFreeURI (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
+</pre><p>Free up the <a href="libxml-uri.html#xmlURI">xmlURI</a> struct</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div><h3><a name="xmlNormalizeURIPath" id="xmlNormalizeURIPath"></a>Function: xmlNormalizeURIPath</h3><pre class="programlisting">int xmlNormalizeURIPath (char * path)<br />
+</pre><p>Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>pointer to the path string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or an error code</td></tr></tbody></table></div><h3><a name="xmlParseURI" id="xmlParseURI"></a>Function: xmlParseURI</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURI (const char * str)<br />
+</pre><p>Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the URI string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly built <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlParseURIRaw" id="xmlParseURIRaw"></a>Function: xmlParseURIRaw</h3><pre class="programlisting"><a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> xmlParseURIRaw (const char * str, <br /> int raw)<br />
+</pre><p>Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the URI string to analyze</td></tr><tr><td><span class="term"><i><tt>raw</tt></i>:</span></td><td>if 1 unescaping of URI pieces are disabled</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly built <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlParseURIReference" id="xmlParseURIReference"></a>Function: xmlParseURIReference</h3><pre class="programlisting">int xmlParseURIReference (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri, <br /> const char * str)<br />
+</pre><p>Parse an URI <a href="libxml-SAX.html#reference">reference</a> string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an URI structure</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to analyze</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or the error code</td></tr></tbody></table></div><h3><a name="xmlPathToURI" id="xmlPathToURI"></a>Function: xmlPathToURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlPathToURI (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)<br />
+</pre><p>Constructs an URI expressing the existing path</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the resource locator in a filesystem notation</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.</td></tr></tbody></table></div><h3><a name="xmlPrintURI" id="xmlPrintURI"></a>Function: xmlPrintURI</h3><pre class="programlisting">void xmlPrintURI (FILE * stream, <br /> <a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
+</pre><p>Prints the URI in the stream @stream.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>stream</tt></i>:</span></td><td>a FILE* for the output</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr></tbody></table></div><h3><a name="xmlSaveUri" id="xmlSaveUri"></a>Function: xmlSaveUri</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSaveUri (<a href="libxml-uri.html#xmlURIPtr">xmlURIPtr</a> uri)<br />
+</pre><p>Save the URI as an escaped string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>pointer to an <a href="libxml-uri.html#xmlURI">xmlURI</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new string (to be deallocated by caller)</td></tr></tbody></table></div><h3><a name="xmlURIEscape" id="xmlURIEscape"></a>Function: xmlURIEscape</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlURIEscape (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string of the URI to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an copy of the string, but escaped 25 May 2001 Uses <a href="libxml-uri.html#xmlParseURI">xmlParseURI</a> and <a href="libxml-uri.html#xmlURIEscapeStr">xmlURIEscapeStr</a> to try to escape correctly according to RFC2396. - Carl Douglas</td></tr></tbody></table></div><h3><a name="xmlURIEscapeStr" id="xmlURIEscapeStr"></a>Function: xmlURIEscapeStr</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlURIEscapeStr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * list)<br />
+</pre><p>This routine escapes a string to hex, ignoring reserved <a href="libxml-SAX.html#characters">characters</a> (a-z) and the <a href="libxml-SAX.html#characters">characters</a> in the exception list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>string to escape</td></tr><tr><td><span class="term"><i><tt>list</tt></i>:</span></td><td>exception list string of chars not to escape</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new escaped string or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlURIUnescapeString" id="xmlURIUnescapeString"></a>Function: xmlURIUnescapeString</h3><pre class="programlisting">char * xmlURIUnescapeString (const char * str, <br /> int len, <br /> char * target)<br />
+</pre><p>Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to unescape</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length in bytes to unescape (or &lt;= 0 to indicate full string)</td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>optional destination buffer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the string, but unescaped, will return NULL only in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-valid.html b/doc/html/libxml-valid.html
new file mode 100644
index 0000000..94df436
--- /dev/null
+++ b/doc/html/libxml-valid.html
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module valid from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module valid from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-uri.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-uri.html">uri</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xinclude.html">xinclude</a></th><td><a accesskey="n" href="libxml-xinclude.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API for the DTD handling and the validity checking </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_CTXT_FINISH_DTD_0">XML_CTXT_FINISH_DTD_0</a></pre><pre class="programlisting">#define <a href="#XML_CTXT_FINISH_DTD_1">XML_CTXT_FINISH_DTD_1</a></pre><pre class="programlisting">Structure <a href="#xmlAttributeTable">xmlAttributeTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlAttributeTable">xmlAttributeTable</a> * <a name="xmlAttributeTablePtr" id="xmlAttributeTablePtr">xmlAttributeTablePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlElementTable">xmlElementTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlElementTable">xmlElementTable</a> * <a name="xmlElementTablePtr" id="xmlElementTablePtr">xmlElementTablePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlIDTable">xmlIDTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlIDTable">xmlIDTable</a> * <a name="xmlIDTablePtr" id="xmlIDTablePtr">xmlIDTablePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlNotationTable">xmlNotationTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlNotationTable">xmlNotationTable</a> * <a name="xmlNotationTablePtr" id="xmlNotationTablePtr">xmlNotationTablePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRefTable">xmlRefTable</a><br />struct _xmlHashTable
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlRefTable">xmlRefTable</a> * <a name="xmlRefTablePtr" id="xmlRefTablePtr">xmlRefTablePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlValidCtxt">xmlValidCtxt</a><br />struct _xmlValidCtxt
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlValidCtxt">xmlValidCtxt</a> * <a name="xmlValidCtxtPtr" id="xmlValidCtxtPtr">xmlValidCtxtPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlValidState">xmlValidState</a><br />struct _xmlValidState
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-valid.html#xmlValidState">xmlValidState</a> * <a name="xmlValidStatePtr" id="xmlValidStatePtr">xmlValidStatePtr</a>
+</pre><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlAddAttributeDecl">xmlAddAttributeDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br /> <a href="libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlAddElementDecl">xmlAddElementDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="#xmlAddID">xmlAddID</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlAddNotationDecl">xmlAddNotationDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a> <a href="#xmlAddRef">xmlAddRef</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting"><a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> <a href="#xmlCopyAttributeTable">xmlCopyAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyElementContent">xmlCopyElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> <a href="#xmlCopyElementTable">xmlCopyElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> <a href="#xmlCopyNotationTable">xmlCopyNotationTable</a> (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCreateEnumeration">xmlCreateEnumeration</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlDumpAttributeDecl">xmlDumpAttributeDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)</pre>
+<pre class="programlisting">void <a href="#xmlDumpAttributeTable">xmlDumpAttributeTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlDumpElementDecl">xmlDumpElementDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)</pre>
+<pre class="programlisting">void <a href="#xmlDumpElementTable">xmlDumpElementTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlDumpNotationDecl">xmlDumpNotationDecl</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)</pre>
+<pre class="programlisting">void <a href="#xmlDumpNotationTable">xmlDumpNotationTable</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeAttributeTable">xmlFreeAttributeTable</a> (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeDocElementContent">xmlFreeDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeElementContent">xmlFreeElementContent</a> (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)</pre>
+<pre class="programlisting">void <a href="#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeNotationTable">xmlFreeNotationTable</a> (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table)</pre>
+<pre class="programlisting">void <a href="#xmlFreeValidCtxt">xmlFreeValidCtxt</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlGetDtdElementDesc">xmlGetDtdElementDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> <a href="#xmlGetDtdNotationDesc">xmlGetDtdNotationDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdQAttrDesc">xmlGetDtdQAttrDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> <a href="#xmlGetDtdQElementDesc">xmlGetDtdQElementDesc</a> (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlGetID">xmlGetID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID)</pre>
+<pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> <a href="#xmlGetRefs">xmlGetRefs</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID)</pre>
+<pre class="programlisting">int <a href="#xmlIsID">xmlIsID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting">int <a href="#xmlIsMixedElement">xmlIsMixedElement</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlIsRef">xmlIsRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewDocElementContent">xmlNewDocElementContent</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlNewElementContent">xmlNewElementContent</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)</pre>
+<pre class="programlisting"><a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> <a href="#xmlNewValidCtxt">xmlNewValidCtxt</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting">int <a href="#xmlRemoveRef">xmlRemoveRef</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)</pre>
+<pre class="programlisting">void <a href="#xmlSnprintfElementContent">xmlSnprintfElementContent</a> (char * buf, <br /> int size, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br /> int englob)</pre>
+<pre class="programlisting">void <a href="#xmlSprintfElementContent">xmlSprintfElementContent</a> (char * buf, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br /> int englob)</pre>
+<pre class="programlisting">int <a href="#xmlValidBuildContentModel">xmlValidBuildContentModel</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidCtxtNormalizeAttributeValue">xmlValidCtxtNormalizeAttributeValue</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidGetPotentialChildren">xmlValidGetPotentialChildren</a> (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int * len, <br /> int max)</pre>
+<pre class="programlisting">int <a href="#xmlValidGetValidElements">xmlValidGetValidElements</a> (<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br /> <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int max)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlValidNormalizeAttributeValue">xmlValidNormalizeAttributeValue</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateAttributeDecl">xmlValidateAttributeDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)</pre>
+<pre class="programlisting">int <a href="#xmlValidateAttributeValue">xmlValidateAttributeValue</a> (<a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateDocument">xmlValidateDocument</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlValidateDocumentFinal">xmlValidateDocumentFinal</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)</pre>
+<pre class="programlisting">int <a href="#xmlValidateDtdFinal">xmlValidateDtdFinal</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlValidateElement">xmlValidateElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#xmlValidateElementDecl">xmlValidateElementDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNameValue">xmlValidateNameValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNmtokenValue">xmlValidateNmtokenValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNmtokensValue">xmlValidateNmtokensValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNotationDecl">xmlValidateNotationDecl</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)</pre>
+<pre class="programlisting">int <a href="#xmlValidateNotationUse">xmlValidateNotationUse</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)</pre>
+<pre class="programlisting">int <a href="#xmlValidateOneAttribute">xmlValidateOneAttribute</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidateOneElement">xmlValidateOneElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">int <a href="#xmlValidateOneNamespace">xmlValidateOneNamespace</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)</pre>
+<pre class="programlisting">int <a href="#xmlValidatePushCData">xmlValidatePushCData</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlValidatePushElement">xmlValidatePushElement</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)</pre>
+<pre class="programlisting">int <a href="#xmlValidateRoot">xmlValidateRoot</a> (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">Function type: <a href="#xmlValidityErrorFunc">xmlValidityErrorFunc</a>
+void <a href="#xmlValidityErrorFunc">xmlValidityErrorFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a>
+void <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<h2>Description</h2>
+<h3><a name="XML_CTXT_FINISH_DTD_0" id="XML_CTXT_FINISH_DTD_0"></a>Macro: XML_CTXT_FINISH_DTD_0</h3><pre>#define XML_CTXT_FINISH_DTD_0</pre><p>Special value for finishDtd field when embedded in an <a href="libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a></p>
+<h3><a name="XML_CTXT_FINISH_DTD_1" id="XML_CTXT_FINISH_DTD_1"></a>Macro: XML_CTXT_FINISH_DTD_1</h3><pre>#define XML_CTXT_FINISH_DTD_1</pre><p>Special value for finishDtd field when embedded in an <a href="libxml-tree.html#xmlParserCtxt">xmlParserCtxt</a></p>
+<h3><a name="xmlAttributeTable" id="xmlAttributeTable">Structure xmlAttributeTable</a></h3><pre class="programlisting">Structure xmlAttributeTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlElementTable" id="xmlElementTable">Structure xmlElementTable</a></h3><pre class="programlisting">Structure xmlElementTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlIDTable" id="xmlIDTable">Structure xmlIDTable</a></h3><pre class="programlisting">Structure xmlIDTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlNotationTable" id="xmlNotationTable">Structure xmlNotationTable</a></h3><pre class="programlisting">Structure xmlNotationTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlRefTable" id="xmlRefTable">Structure xmlRefTable</a></h3><pre class="programlisting">Structure xmlRefTable<br />struct _xmlHashTable {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlValidCtxt" id="xmlValidCtxt">Structure xmlValidCtxt</a></h3><pre class="programlisting">Structure xmlValidCtxt<br />struct _xmlValidCtxt {
+ void * userData : user specific data block
+ <a href="libxml-valid.html#xmlValidityErrorFunc">xmlValidityErrorFunc</a> error : the callback in case of errors
+ <a href="libxml-valid.html#xmlValidityWarningFunc">xmlValidityWarningFunc</a> warning : the callback in case of warning Node an
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node
+ int nodeNr : Depth of the parsing stack
+ int nodeMax : Max depth of the parsing stack
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes
+ unsigned int finishDtd : finished validating the Dtd ?
+ <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc : the document
+ int valid : temporary validity check result state s
+ <a href="libxml-valid.html#xmlValidState">xmlValidState</a> * vstate : current state
+ int vstateNr : Depth of the validation stack
+ int vstateMax : Max depth of the validation stack
+ <a href="libxml-valid.html#xmlValidState">xmlValidState</a> * vstateTab : array of validation states
+ <a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am : the automata
+ <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state : used to build the automata
+ void * am
+ void * state
+}</pre><h3><a name="xmlValidState" id="xmlValidState">Structure xmlValidState</a></h3><pre class="programlisting">Structure xmlValidState<br />struct _xmlValidState {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlAddAttributeDecl" id="xmlAddAttributeDecl"></a>Function: xmlAddAttributeDecl</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlAddAttributeDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns, <br /> <a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br /> <a href="libxml-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * defaultValue, <br /> <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree)<br />
+</pre><p>Register a new <a href="libxml-SAX.html#attribute">attribute</a> declaration Note that @tree becomes the ownership of the DTD</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> namespace prefix</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>def</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> default type</td></tr><tr><td><span class="term"><i><tt>defaultValue</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> default value</td></tr><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>if it's an enumeration, the associated list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not new, otherwise the <a href="libxml-SAX.html#attribute">attribute</a> decl</td></tr></tbody></table></div><h3><a name="xmlAddElementDecl" id="xmlAddElementDecl"></a>Function: xmlAddElementDecl</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlAddElementDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> type, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content)<br />
+</pre><p>Register a new element declaration</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the element type</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the element content tree or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div><h3><a name="xmlAddID" id="xmlAddID"></a>Function: xmlAddID</h3><pre class="programlisting"><a href="libxml-tree.html#xmlIDPtr">xmlIDPtr</a> xmlAddID (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Register a new id declaration</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value name</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> holding the ID</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new <a href="libxml-tree.html#xmlIDPtr">xmlIDPtr</a></td></tr></tbody></table></div><h3><a name="xmlAddNotationDecl" id="xmlAddNotationDecl"></a>Function: xmlAddNotationDecl</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlAddNotationDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * PublicID, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br />
+</pre><p>Register a new notation declaration</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>pointer to the DTD</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the entity name</td></tr><tr><td><span class="term"><i><tt>PublicID</tt></i>:</span></td><td>the public identifier or NULL</td></tr><tr><td><span class="term"><i><tt>SystemID</tt></i>:</span></td><td>the system identifier or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the entity</td></tr></tbody></table></div><h3><a name="xmlAddRef" id="xmlAddRef"></a>Function: xmlAddRef</h3><pre class="programlisting"><a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a> xmlAddRef (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Register a new ref declaration</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value name</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> holding the Ref</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new <a href="libxml-tree.html#xmlRefPtr">xmlRefPtr</a></td></tr></tbody></table></div><h3><a name="xmlCopyAttributeTable" id="xmlCopyAttributeTable"></a>Function: xmlCopyAttributeTable</h3><pre class="programlisting"><a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> xmlCopyAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br />
+</pre><p>Build a copy of an <a href="libxml-SAX.html#attribute">attribute</a> table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyDocElementContent" id="xmlCopyDocElementContent"></a>Function: xmlCopyDocElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br />
+</pre><p>Build a copy of an element content description.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyElementContent" id="xmlCopyElementContent"></a>Function: xmlCopyElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlCopyElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br />
+</pre><p>Build a copy of an element content description. Deprecated, use <a href="libxml-valid.html#xmlCopyDocElementContent">xmlCopyDocElementContent</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>An element content pointer.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyElementTable" id="xmlCopyElementTable"></a>Function: xmlCopyElementTable</h3><pre class="programlisting"><a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> xmlCopyElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br />
+</pre><p>Build a copy of an element table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyEnumeration" id="xmlCopyEnumeration"></a>Function: xmlCopyEnumeration</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCopyEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br />
+</pre><p>Copy an enumeration <a href="libxml-SAX.html#attribute">attribute</a> node (recursive).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the tree to copy.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> just created or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCopyNotationTable" id="xmlCopyNotationTable"></a>Function: xmlCopyNotationTable</h3><pre class="programlisting"><a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> xmlCopyNotationTable (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br />
+</pre><p>Build a copy of a notation table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>A notation table</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlCreateEnumeration" id="xmlCreateEnumeration"></a>Function: xmlCreateEnumeration</h3><pre class="programlisting"><a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> xmlCreateEnumeration (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>create and initialize an enumeration <a href="libxml-SAX.html#attribute">attribute</a> node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the enumeration name or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> just created or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlDumpAttributeDecl" id="xmlDumpAttributeDecl"></a>Function: xmlDumpAttributeDecl</h3><pre class="programlisting">void xmlDumpAttributeDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)<br />
+</pre><p>This will dump the content of the <a href="libxml-SAX.html#attribute">attribute</a> declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> declaration</td></tr></tbody></table></div><h3><a name="xmlDumpAttributeTable" id="xmlDumpAttributeTable"></a>Function: xmlDumpAttributeTable</h3><pre class="programlisting">void xmlDumpAttributeTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br />
+</pre><p>This will dump the content of the <a href="libxml-SAX.html#attribute">attribute</a> table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div><h3><a name="xmlDumpElementDecl" id="xmlDumpElementDecl"></a>Function: xmlDumpElementDecl</h3><pre class="programlisting">void xmlDumpElementDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br />
+</pre><p>This will dump the content of the element declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div><h3><a name="xmlDumpElementTable" id="xmlDumpElementTable"></a>Function: xmlDumpElementTable</h3><pre class="programlisting">void xmlDumpElementTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br />
+</pre><p>This will dump the content of the element table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div><h3><a name="xmlDumpNotationDecl" id="xmlDumpNotationDecl"></a>Function: xmlDumpNotationDecl</h3><pre class="programlisting">void xmlDumpNotationDecl (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)<br />
+</pre><p>This will dump the content the notation declaration as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>nota</tt></i>:</span></td><td>A notation declaration</td></tr></tbody></table></div><h3><a name="xmlDumpNotationTable" id="xmlDumpNotationTable"></a>Function: xmlDumpNotationTable</h3><pre class="programlisting">void xmlDumpNotationTable (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br />
+</pre><p>This will dump the content of the notation table as an XML DTD definition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>A notation table</td></tr></tbody></table></div><h3><a name="xmlFreeAttributeTable" id="xmlFreeAttributeTable"></a>Function: xmlFreeAttributeTable</h3><pre class="programlisting">void xmlFreeAttributeTable (<a href="libxml-valid.html#xmlAttributeTablePtr">xmlAttributeTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An <a href="libxml-SAX.html#attribute">attribute</a> table</td></tr></tbody></table></div><h3><a name="xmlFreeDocElementContent" id="xmlFreeDocElementContent"></a>Function: xmlFreeDocElementContent</h3><pre class="programlisting">void xmlFreeDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br />
+</pre><p>Free an element content structure. The whole subtree is removed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document owning the element declaration</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div><h3><a name="xmlFreeElementContent" id="xmlFreeElementContent"></a>Function: xmlFreeElementContent</h3><pre class="programlisting">void xmlFreeElementContent (<a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur)<br />
+</pre><p>Free an element content structure. The whole subtree is removed. Deprecated, use <a href="libxml-valid.html#xmlFreeDocElementContent">xmlFreeDocElementContent</a> instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the element content tree to free</td></tr></tbody></table></div><h3><a name="xmlFreeElementTable" id="xmlFreeElementTable"></a>Function: xmlFreeElementTable</h3><pre class="programlisting">void xmlFreeElementTable (<a href="libxml-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an element hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An element table</td></tr></tbody></table></div><h3><a name="xmlFreeEnumeration" id="xmlFreeEnumeration"></a>Function: xmlFreeEnumeration</h3><pre class="programlisting">void xmlFreeEnumeration (<a href="libxml-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur)<br />
+</pre><p>free an enumeration <a href="libxml-SAX.html#attribute">attribute</a> node (recursive).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the tree to free.</td></tr></tbody></table></div><h3><a name="xmlFreeIDTable" id="xmlFreeIDTable"></a>Function: xmlFreeIDTable</h3><pre class="programlisting">void xmlFreeIDTable (<a href="libxml-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an ID hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An id table</td></tr></tbody></table></div><h3><a name="xmlFreeNotationTable" id="xmlFreeNotationTable"></a>Function: xmlFreeNotationTable</h3><pre class="programlisting">void xmlFreeNotationTable (<a href="libxml-valid.html#xmlNotationTablePtr">xmlNotationTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an entities hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An notation table</td></tr></tbody></table></div><h3><a name="xmlFreeRefTable" id="xmlFreeRefTable"></a>Function: xmlFreeRefTable</h3><pre class="programlisting">void xmlFreeRefTable (<a href="libxml-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table)<br />
+</pre><p>Deallocate the memory used by an Ref hash table.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>table</tt></i>:</span></td><td>An ref table</td></tr></tbody></table></div><h3><a name="xmlFreeValidCtxt" id="xmlFreeValidCtxt"></a>Function: xmlFreeValidCtxt</h3><pre class="programlisting">void xmlFreeValidCtxt (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> cur)<br />
+</pre><p>Free a validation context structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the validation context to free</td></tr></tbody></table></div><h3><a name="xmlGetDtdAttrDesc" id="xmlGetDtdAttrDesc"></a>Function: xmlGetDtdAttrDesc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdAttrDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search the DTD for the description of this <a href="libxml-SAX.html#attribute">attribute</a> on this element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> if found or NULL</td></tr></tbody></table></div><h3><a name="xmlGetDtdElementDesc" id="xmlGetDtdElementDesc"></a>Function: xmlGetDtdElementDesc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdElementDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search the DTD for the description of this element</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> if found or NULL</td></tr></tbody></table></div><h3><a name="xmlGetDtdNotationDesc" id="xmlGetDtdNotationDesc"></a>Function: xmlGetDtdNotationDesc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> xmlGetDtdNotationDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search the DTD for the description of this notation</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the notation name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> if found or NULL</td></tr></tbody></table></div><h3><a name="xmlGetDtdQAttrDesc" id="xmlGetDtdQAttrDesc"></a>Function: xmlGetDtdQAttrDesc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> xmlGetDtdQAttrDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Search the DTD for the description of this qualified <a href="libxml-SAX.html#attribute">attribute</a> on this element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> if found or NULL</td></tr></tbody></table></div><h3><a name="xmlGetDtdQElementDesc" id="xmlGetDtdQElementDesc"></a>Function: xmlGetDtdQElementDesc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> xmlGetDtdQElementDesc (<a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Search the DTD for the description of this element</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a pointer to the DtD to search</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the element namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> if found or NULL</td></tr></tbody></table></div><h3><a name="xmlGetID" id="xmlGetID"></a>Function: xmlGetID</h3><pre class="programlisting"><a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlGetID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID)<br />
+</pre><p>Search the <a href="libxml-SAX.html#attribute">attribute</a> declaring the given ID</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the ID value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise the <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> defining the ID</td></tr></tbody></table></div><h3><a name="xmlGetRefs" id="xmlGetRefs"></a>Function: xmlGetRefs</h3><pre class="programlisting"><a href="libxml-list.html#xmlListPtr">xmlListPtr</a> xmlGetRefs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ID)<br />
+</pre><p>Find the set of references for the supplied ID.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>pointer to the document</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the ID value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not found, otherwise node set for the ID.</td></tr></tbody></table></div><h3><a name="xmlIsID" id="xmlIsID"></a>Function: xmlIsID</h3><pre class="programlisting">int xmlIsID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Determine whether an <a href="libxml-SAX.html#attribute">attribute</a> is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div><h3><a name="xmlIsMixedElement" id="xmlIsMixedElement"></a>Function: xmlIsMixedElement</h3><pre class="programlisting">int xmlIsMixedElement (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no, 1 if yes, and -1 if no element description is available</td></tr></tbody></table></div><h3><a name="xmlIsRef" id="xmlIsRef"></a>Function: xmlIsRef</h3><pre class="programlisting">int xmlIsRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Determine whether an <a href="libxml-SAX.html#attribute">attribute</a> is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the element carrying the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the lookup result</td></tr></tbody></table></div><h3><a name="xmlNewDocElementContent" id="xmlNewDocElementContent"></a>Function: xmlNewDocElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewDocElementContent (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br />
+</pre><p>Allocate an element content structure for the document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div><h3><a name="xmlNewElementContent" id="xmlNewElementContent"></a>Function: xmlNewElementContent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> xmlNewElementContent (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-tree.html#xmlElementContentType">xmlElementContentType</a> type)<br />
+</pre><p>Allocate an element content structure. Deprecated in favor of <a href="libxml-valid.html#xmlNewDocElementContent">xmlNewDocElementContent</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the subelement name or NULL</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of element content decl</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new element content structure</td></tr></tbody></table></div><h3><a name="xmlNewValidCtxt" id="xmlNewValidCtxt"></a>Function: xmlNewValidCtxt</h3><pre class="programlisting"><a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> xmlNewValidCtxt (void)<br />
+</pre><p>Allocate a validation context structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if not, otherwise the new validation context structure</td></tr></tbody></table></div><h3><a name="xmlRemoveID" id="xmlRemoveID"></a>Function: xmlRemoveID</h3><pre class="programlisting">int xmlRemoveID (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Remove the given <a href="libxml-SAX.html#attribute">attribute</a> from the ID table maintained internally.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if the lookup failed and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRemoveRef" id="xmlRemoveRef"></a>Function: xmlRemoveRef</h3><pre class="programlisting">int xmlRemoveRef (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr)<br />
+</pre><p>Remove the given <a href="libxml-SAX.html#attribute">attribute</a> from the Ref table maintained internally.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if the lookup failed and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSnprintfElementContent" id="xmlSnprintfElementContent"></a>Function: xmlSnprintfElementContent</h3><pre class="programlisting">void xmlSnprintfElementContent (char * buf, <br /> int size, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br /> int englob)<br />
+</pre><p>This will dump the content of the element content definition Intended just for the debug routine</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output buffer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the buffer size</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>englob</tt></i>:</span></td><td>1 if one must print the englobing parenthesis, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSprintfElementContent" id="xmlSprintfElementContent"></a>Function: xmlSprintfElementContent</h3><pre class="programlisting">void xmlSprintfElementContent (char * buf, <br /> <a href="libxml-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content, <br /> int englob)<br />
+</pre><p>Deprecated, unsafe, use <a href="libxml-valid.html#xmlSnprintfElementContent">xmlSnprintfElementContent</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output buffer</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>An element table</td></tr><tr><td><span class="term"><i><tt>englob</tt></i>:</span></td><td>1 if one must print the englobing parenthesis, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidBuildContentModel" id="xmlValidBuildContentModel"></a>Function: xmlValidBuildContentModel</h3><pre class="programlisting">int xmlValidBuildContentModel (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br />
+</pre><p>(Re)Build the automata associated to the content model of this element</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element declaration node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 in case of error</td></tr></tbody></table></div><h3><a name="xmlValidCtxtNormalizeAttributeValue" id="xmlValidCtxtNormalizeAttributeValue"></a>Function: xmlValidCtxtNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlValidCtxtNormalizeAttributeValue (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt-&gt;valid accordingly</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context or NULL</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidGetPotentialChildren" id="xmlValidGetPotentialChildren"></a>Function: xmlValidGetPotentialChildren</h3><pre class="programlisting">int xmlValidGetPotentialChildren (<a href="libxml-tree.html#xmlElementContent">xmlElementContent</a> * ctree, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int * len, <br /> int max)<br />
+</pre><p>Build/extend a list of potential children allowed by the content tree</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctree</tt></i>:</span></td><td>an element content tree</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the number of element in the list</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlValidGetValidElements" id="xmlValidGetValidElements"></a>Function: xmlValidGetValidElements</h3><pre class="programlisting">int xmlValidGetValidElements (<a href="libxml-tree.html#xmlNode">xmlNode</a> * prev, <br /> <a href="libxml-tree.html#xmlNode">xmlNode</a> * next, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** names, <br /> int max)<br />
+</pre><p>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before 'node': xmlValidGetValidElements(node-&gt;prev, node, ... to insert next 'node': xmlValidGetValidElements(node, node-&gt;next, ... to replace 'node': xmlValidGetValidElements(node-&gt;prev, node-&gt;next, ... to prepend a child to 'node': xmlValidGetValidElements(NULL, node-&gt;childs, to append a child to 'node': xmlValidGetValidElements(node-&gt;last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>an element to insert after</td></tr><tr><td><span class="term"><i><tt>next</tt></i>:</span></td><td>an element to insert next</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>an array to store the list of child names</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.</td></tr></tbody></table></div><h3><a name="xmlValidNormalizeAttributeValue" id="xmlValidNormalizeAttributeValue"></a>Function: xmlValidNormalizeAttributeValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlValidNormalizeAttributeValue (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Does the validation related extra step of the normalization of <a href="libxml-SAX.html#attribute">attribute</a> values: If the declared value is not CDATA, then the XML processor must further process the normalized <a href="libxml-SAX.html#attribute">attribute</a> value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) <a href="libxml-SAX.html#characters">characters</a> by single space (#x20) character.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>the parent</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.</td></tr></tbody></table></div><h3><a name="xmlValidateAttributeDecl" id="xmlValidateAttributeDecl"></a>Function: xmlValidateAttributeDecl</h3><pre class="programlisting">int xmlValidateAttributeDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlAttributePtr">xmlAttributePtr</a> attr)<br />
+</pre><p>Try to validate a single <a href="libxml-SAX.html#attribute">attribute</a> definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Default Legal ] - [ VC: Enumeration ] - [ VC: ID Attribute Default ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a> definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateAttributeValue" id="xmlValidateAttributeValue"></a>Function: xmlValidateAttributeValue</h3><pre class="programlisting">int xmlValidateAttributeValue (<a href="libxml-tree.html#xmlAttributeType">xmlAttributeType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Validate that the given <a href="libxml-SAX.html#attribute">attribute</a> value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a> type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a> value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateDocument" id="xmlValidateDocument"></a>Function: xmlValidateDocument</h3><pre class="programlisting">int xmlValidateDocument (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateDocumentFinal" id="xmlValidateDocumentFinal"></a>Function: xmlValidateDocumentFinal</h3><pre class="programlisting">int xmlValidateDocumentFinal (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateDtd" id="xmlValidateDtd"></a>Function: xmlValidateDtd</h3><pre class="programlisting">int xmlValidateDtd (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br />
+</pre><p>Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>dtd</tt></i>:</span></td><td>a dtd instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateDtdFinal" id="xmlValidateDtdFinal"></a>Function: xmlValidateDtdFinal</h3><pre class="programlisting">int xmlValidateDtdFinal (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 if invalid and -1 if not well-formed</td></tr></tbody></table></div><h3><a name="xmlValidateElement" id="xmlValidateElement"></a>Function: xmlValidateElement</h3><pre class="programlisting">int xmlValidateElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Try to validate the subtree under an element</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateElementDecl" id="xmlValidateElementDecl"></a>Function: xmlValidateElementDecl</h3><pre class="programlisting">int xmlValidateElementDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlElementPtr">xmlElementPtr</a> elem)<br />
+</pre><p>Try to validate a single element definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: One ID per Element Type ] - [ VC: No Duplicate Types ] - [ VC: Unique Element Type Declaration ]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNameValue" id="xmlValidateNameValue"></a>Function: xmlValidateNameValue</h3><pre class="programlisting">int xmlValidateNameValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Validate that the given value match Name production</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Name value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNamesValue" id="xmlValidateNamesValue"></a>Function: xmlValidateNamesValue</h3><pre class="programlisting">int xmlValidateNamesValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Validate that the given value match Names production</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Names value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNmtokenValue" id="xmlValidateNmtokenValue"></a>Function: xmlValidateNmtokenValue</h3><pre class="programlisting">int xmlValidateNmtokenValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Validate that the given value match Nmtoken production [ VC: Name Token ]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Nmtoken value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNmtokensValue" id="xmlValidateNmtokensValue"></a>Function: xmlValidateNmtokensValue</h3><pre class="programlisting">int xmlValidateNmtokensValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Validate that the given value match Nmtokens production [ VC: Name Token ]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>an Nmtokens value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNotationDecl" id="xmlValidateNotationDecl"></a>Function: xmlValidateNotationDecl</h3><pre class="programlisting">int xmlValidateNotationDecl (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNotationPtr">xmlNotationPtr</a> nota)<br />
+</pre><p>Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: - it seems that no validity constraint exists on notation declarations But this function get called anyway ...</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>nota</tt></i>:</span></td><td>a notation definition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateNotationUse" id="xmlValidateNotationUse"></a>Function: xmlValidateNotationUse</h3><pre class="programlisting">int xmlValidateNotationUse (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * notationName)<br />
+</pre><p>Validate that the given name match a notation declaration. - [ VC: Notation Declared ]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>notationName</tt></i>:</span></td><td>the notation name to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateOneAttribute" id="xmlValidateOneAttribute"></a>Function: xmlValidateOneAttribute</h3><pre class="programlisting">int xmlValidateOneAttribute (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> <a href="libxml-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Try to validate a single <a href="libxml-SAX.html#attribute">attribute</a> for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>attr</tt></i>:</span></td><td>an <a href="libxml-SAX.html#attribute">attribute</a> instance</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value (without entities processing)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateOneElement" id="xmlValidateOneElement"></a>Function: xmlValidateOneElement</h3><pre class="programlisting">int xmlValidateOneElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each <a href="libxml-SAX.html#attribute">attribute</a> present. The ID/IDREF checkings are done separately</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateOneNamespace" id="xmlValidateOneNamespace"></a>Function: xmlValidateOneNamespace</h3><pre class="programlisting">int xmlValidateOneNamespace (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>an namespace declaration instance</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the <a href="libxml-SAX.html#attribute">attribute</a> value (without entities processing)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePopElement" id="xmlValidatePopElement"></a>Function: xmlValidatePopElement</h3><pre class="programlisting">int xmlValidatePopElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)<br />
+</pre><p>Pop the element end from the validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePushCData" id="xmlValidatePushCData"></a>Function: xmlValidatePushCData</h3><pre class="programlisting">int xmlValidatePushCData (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * data, <br /> int len)<br />
+</pre><p>check the CData parsed for validation in the current stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>some character data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidatePushElement" id="xmlValidatePushElement"></a>Function: xmlValidatePushElement</h3><pre class="programlisting">int xmlValidatePushElement (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * qname)<br />
+</pre><p>Push a new element start on the validation stack.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element instance</td></tr><tr><td><span class="term"><i><tt>qname</tt></i>:</span></td><td>the qualified name as appearing in the serialization</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if no validation problem was found or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidateRoot" id="xmlValidateRoot"></a>Function: xmlValidateRoot</h3><pre class="programlisting">int xmlValidateRoot (<a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document instance</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid or 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlValidityErrorFunc" id="xmlValidityErrorFunc"></a>Function type: xmlValidityErrorFunc</h3><pre class="programlisting">Function type: xmlValidityErrorFunc
+void xmlValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Callback called when a validity error is found. This is a message oriented function similar to an *printf function.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>usually an <a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the string to format *printf like vararg</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>remaining arguments to the format</td></tr></tbody></table></div><br />
+<h3><a name="xmlValidityWarningFunc" id="xmlValidityWarningFunc"></a>Function type: xmlValidityWarningFunc</h3><pre class="programlisting">Function type: xmlValidityWarningFunc
+void xmlValidityWarningFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>usually an <a href="libxml-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the string to format *printf like vararg</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>remaining arguments to the format</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xinclude.html b/doc/html/libxml-xinclude.html
new file mode 100644
index 0000000..c799f10
--- /dev/null
+++ b/doc/html/libxml-xinclude.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xinclude from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xinclude from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-valid.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-valid.html">valid</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xlink.html">xlink</a></th><td><a accesskey="n" href="libxml-xlink.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003</p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XINCLUDE_FALLBACK">XINCLUDE_FALLBACK</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_HREF">XINCLUDE_HREF</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_NODE">XINCLUDE_NODE</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_NS">XINCLUDE_NS</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_OLD_NS">XINCLUDE_OLD_NS</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_PARSE">XINCLUDE_PARSE</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_ENCODING">XINCLUDE_PARSE_ENCODING</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_TEXT">XINCLUDE_PARSE_TEXT</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XML">XINCLUDE_PARSE_XML</a></pre><pre class="programlisting">#define <a href="#XINCLUDE_PARSE_XPOINTER">XINCLUDE_PARSE_XPOINTER</a></pre><pre class="programlisting">Structure <a href="#xmlXIncludeCtxt">xmlXIncludeCtxt</a><br />struct _xmlXIncludeCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xinclude.html#xmlXIncludeCtxt">xmlXIncludeCtxt</a> * <a name="xmlXIncludeCtxtPtr" id="xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlXIncludeFreeContext">xmlXIncludeFreeContext</a> (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> <a href="#xmlXIncludeNewContext">xmlXIncludeNewContext</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcess">xmlXIncludeProcess</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessFlags">xmlXIncludeProcessFlags</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int flags)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessFlagsData">xmlXIncludeProcessFlagsData</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int flags, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessNode">xmlXIncludeProcessNode</a> (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessTree">xmlXIncludeProcessTree</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessTreeFlags">xmlXIncludeProcessTreeFlags</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> int flags)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeProcessTreeFlagsData">xmlXIncludeProcessTreeFlagsData</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> int flags, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlXIncludeSetFlags">xmlXIncludeSetFlags</a> (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br /> int flags)</pre>
+<h2>Description</h2>
+<h3><a name="XINCLUDE_FALLBACK" id="XINCLUDE_FALLBACK"></a>Macro: XINCLUDE_FALLBACK</h3><pre>#define XINCLUDE_FALLBACK</pre><p>Macro defining "fallback"</p>
+<h3><a name="XINCLUDE_HREF" id="XINCLUDE_HREF"></a>Macro: XINCLUDE_HREF</h3><pre>#define XINCLUDE_HREF</pre><p>Macro defining "href"</p>
+<h3><a name="XINCLUDE_NODE" id="XINCLUDE_NODE"></a>Macro: XINCLUDE_NODE</h3><pre>#define XINCLUDE_NODE</pre><p>Macro defining "include"</p>
+<h3><a name="XINCLUDE_NS" id="XINCLUDE_NS"></a>Macro: XINCLUDE_NS</h3><pre>#define XINCLUDE_NS</pre><p>Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude</p>
+<h3><a name="XINCLUDE_OLD_NS" id="XINCLUDE_OLD_NS"></a>Macro: XINCLUDE_OLD_NS</h3><pre>#define XINCLUDE_OLD_NS</pre><p>Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude</p>
+<h3><a name="XINCLUDE_PARSE" id="XINCLUDE_PARSE"></a>Macro: XINCLUDE_PARSE</h3><pre>#define XINCLUDE_PARSE</pre><p>Macro defining "parse"</p>
+<h3><a name="XINCLUDE_PARSE_ENCODING" id="XINCLUDE_PARSE_ENCODING"></a>Macro: XINCLUDE_PARSE_ENCODING</h3><pre>#define XINCLUDE_PARSE_ENCODING</pre><p>Macro defining "encoding"</p>
+<h3><a name="XINCLUDE_PARSE_TEXT" id="XINCLUDE_PARSE_TEXT"></a>Macro: XINCLUDE_PARSE_TEXT</h3><pre>#define XINCLUDE_PARSE_TEXT</pre><p>Macro defining "text"</p>
+<h3><a name="XINCLUDE_PARSE_XML" id="XINCLUDE_PARSE_XML"></a>Macro: XINCLUDE_PARSE_XML</h3><pre>#define XINCLUDE_PARSE_XML</pre><p>Macro defining "xml"</p>
+<h3><a name="XINCLUDE_PARSE_XPOINTER" id="XINCLUDE_PARSE_XPOINTER"></a>Macro: XINCLUDE_PARSE_XPOINTER</h3><pre>#define XINCLUDE_PARSE_XPOINTER</pre><p>Macro defining "xpointer"</p>
+<h3><a name="xmlXIncludeCtxt" id="xmlXIncludeCtxt">Structure xmlXIncludeCtxt</a></h3><pre class="programlisting">Structure xmlXIncludeCtxt<br />struct _xmlXIncludeCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlXIncludeFreeContext" id="xmlXIncludeFreeContext"></a>Function: xmlXIncludeFreeContext</h3><pre class="programlisting">void xmlXIncludeFreeContext (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt)<br />
+</pre><p>Free an XInclude context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XInclude context</td></tr></tbody></table></div><h3><a name="xmlXIncludeNewContext" id="xmlXIncludeNewContext"></a>Function: xmlXIncludeNewContext</h3><pre class="programlisting"><a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> xmlXIncludeNewContext (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Creates a new XInclude context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML Document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new set</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcess" id="xmlXIncludeProcess"></a>Function: xmlXIncludeProcess</h3><pre class="programlisting">int xmlXIncludeProcess (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessFlags" id="xmlXIncludeProcessFlags"></a>Function: xmlXIncludeProcessFlags</h3><pre class="programlisting">int xmlXIncludeProcessFlags (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int flags)<br />
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessFlagsData" id="xmlXIncludeProcessFlagsData"></a>Function: xmlXIncludeProcessFlagsData</h3><pre class="programlisting">int xmlXIncludeProcessFlagsData (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> int flags, <br /> void * data)<br />
+</pre><p>Implement the XInclude substitution on the XML document @doc</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>application data that will be passed to the parser context in the _private field of the parser context(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessNode" id="xmlXIncludeProcessNode"></a>Function: xmlXIncludeProcessNode</h3><pre class="programlisting">int xmlXIncludeProcessNode (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an existing XInclude context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessTree" id="xmlXIncludeProcessTree"></a>Function: xmlXIncludeProcessTree</h3><pre class="programlisting">int xmlXIncludeProcessTree (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br />
+</pre><p>Implement the XInclude substitution for the given subtree</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessTreeFlags" id="xmlXIncludeProcessTreeFlags"></a>Function: xmlXIncludeProcessTreeFlags</h3><pre class="programlisting">int xmlXIncludeProcessTreeFlags (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> int flags)<br />
+</pre><p>Implement the XInclude substitution for the given subtree</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>a node in an XML document</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeProcessTreeFlagsData" id="xmlXIncludeProcessTreeFlagsData"></a>Function: xmlXIncludeProcessTreeFlagsData</h3><pre class="programlisting">int xmlXIncludeProcessTreeFlagsData (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br /> int flags, <br /> void * data)<br />
+</pre><p>Implement the XInclude substitution on the XML node @tree</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>tree</tt></i>:</span></td><td>an XML node</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>application data that will be passed to the parser context in the _private field of the parser context(s)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.</td></tr></tbody></table></div><h3><a name="xmlXIncludeSetFlags" id="xmlXIncludeSetFlags"></a>Function: xmlXIncludeSetFlags</h3><pre class="programlisting">int xmlXIncludeSetFlags (<a href="libxml-xinclude.html#xmlXIncludeCtxtPtr">xmlXIncludeCtxtPtr</a> ctxt, <br /> int flags)<br />
+</pre><p>Set the flags used for further processing of XML resources.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XInclude processing context</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>a set of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a> used for parsing XML includes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xlink.html b/doc/html/libxml-xlink.html
new file mode 100644
index 0000000..5e94b98
--- /dev/null
+++ b/doc/html/libxml-xlink.html
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xlink from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xlink from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xinclude.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xinclude.html">xinclude</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlIO.html">xmlIO</a></th><td><a accesskey="n" href="libxml-xmlIO.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>unfinished XLink detection module </p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xlinkActuate">xlinkActuate</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a name="xlinkHRef" id="xlinkHRef">xlinkHRef</a>
+</pre><pre class="programlisting">Structure <a href="#xlinkHandler">xlinkHandler</a><br />struct _xlinkHandler
+</pre><pre class="programlisting">Typedef <a href="libxml-xlink.html#xlinkHandler">xlinkHandler</a> * <a name="xlinkHandlerPtr" id="xlinkHandlerPtr">xlinkHandlerPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a name="xlinkRole" id="xlinkRole">xlinkRole</a>
+</pre><pre class="programlisting">Enum <a href="#xlinkShow">xlinkShow</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a name="xlinkTitle" id="xlinkTitle">xlinkTitle</a>
+</pre><pre class="programlisting">Enum <a href="#xlinkType">xlinkType</a>
+</pre><pre class="programlisting">Function type: <a href="#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a>
+void <a href="#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int nbLocators, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * roles, <br /> int nbArcs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * from, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * to, <br /> <a href="libxml-xlink.html#xlinkShow">xlinkShow</a> * show, <br /> <a href="libxml-xlink.html#xlinkActuate">xlinkActuate</a> * actuate, <br /> int nbTitles, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langs)
+</pre>
+<pre class="programlisting">Function type: <a href="#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a>
+void <a href="#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int nbLocators, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * roles, <br /> int nbTitles, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langs)
+</pre>
+<pre class="programlisting"><a href="libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> <a href="#xlinkGetDefaultDetect">xlinkGetDefaultDetect</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> <a href="#xlinkGetDefaultHandler">xlinkGetDefaultHandler</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-xlink.html#xlinkType">xlinkType</a> <a href="#xlinkIsLink">xlinkIsLink</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">Function type: <a href="#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a>
+void <a href="#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre>
+<pre class="programlisting">void <a href="#xlinkSetDefaultDetect">xlinkSetDefaultDetect</a> (<a href="libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> func)</pre>
+<pre class="programlisting">void <a href="#xlinkSetDefaultHandler">xlinkSetDefaultHandler</a> (<a href="libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> handler)</pre>
+<pre class="programlisting">Function type: <a href="#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a>
+void <a href="#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a> (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> href, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> role, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> title)
+</pre>
+<h2>Description</h2>
+<h3>Enum <a name="xlinkActuate" id="xlinkActuate">xlinkActuate</a></h3><pre class="programlisting">Enum xlinkActuate {
+ <a name="XLINK_ACTUATE_NONE" id="XLINK_ACTUATE_NONE">XLINK_ACTUATE_NONE</a> = 0
+ <a name="XLINK_ACTUATE_AUTO" id="XLINK_ACTUATE_AUTO">XLINK_ACTUATE_AUTO</a> = 1
+ <a name="XLINK_ACTUATE_ONREQUEST" id="XLINK_ACTUATE_ONREQUEST">XLINK_ACTUATE_ONREQUEST</a> = 2
+}
+</pre><h3><a name="xlinkHandler" id="xlinkHandler">Structure xlinkHandler</a></h3><pre class="programlisting">Structure xlinkHandler<br />struct _xlinkHandler {
+ <a href="libxml-xlink.html#xlinkSimpleLinkFunk">xlinkSimpleLinkFunk</a> simple
+ <a href="libxml-xlink.html#xlinkExtendedLinkFunk">xlinkExtendedLinkFunk</a> extended
+ <a href="libxml-xlink.html#xlinkExtendedLinkSetFunk">xlinkExtendedLinkSetFunk</a> set
+}</pre><h3>Enum <a name="xlinkShow" id="xlinkShow">xlinkShow</a></h3><pre class="programlisting">Enum xlinkShow {
+ <a name="XLINK_SHOW_NONE" id="XLINK_SHOW_NONE">XLINK_SHOW_NONE</a> = 0
+ <a name="XLINK_SHOW_NEW" id="XLINK_SHOW_NEW">XLINK_SHOW_NEW</a> = 1
+ <a name="XLINK_SHOW_EMBED" id="XLINK_SHOW_EMBED">XLINK_SHOW_EMBED</a> = 2
+ <a name="XLINK_SHOW_REPLACE" id="XLINK_SHOW_REPLACE">XLINK_SHOW_REPLACE</a> = 3
+}
+</pre><h3>Enum <a name="xlinkType" id="xlinkType">xlinkType</a></h3><pre class="programlisting">Enum xlinkType {
+ <a name="XLINK_TYPE_NONE" id="XLINK_TYPE_NONE">XLINK_TYPE_NONE</a> = 0
+ <a name="XLINK_TYPE_SIMPLE" id="XLINK_TYPE_SIMPLE">XLINK_TYPE_SIMPLE</a> = 1
+ <a name="XLINK_TYPE_EXTENDED" id="XLINK_TYPE_EXTENDED">XLINK_TYPE_EXTENDED</a> = 2
+ <a name="XLINK_TYPE_EXTENDED_SET" id="XLINK_TYPE_EXTENDED_SET">XLINK_TYPE_EXTENDED_SET</a> = 3
+}
+</pre><h3><a name="xlinkExtendedLinkFunk" id="xlinkExtendedLinkFunk"></a>Function type: xlinkExtendedLinkFunk</h3><pre class="programlisting">Function type: xlinkExtendedLinkFunk
+void xlinkExtendedLinkFunk (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int nbLocators, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * roles, <br /> int nbArcs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * from, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * to, <br /> <a href="libxml-xlink.html#xlinkShow">xlinkShow</a> * show, <br /> <a href="libxml-xlink.html#xlinkActuate">xlinkActuate</a> * actuate, <br /> int nbTitles, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langs)
+</pre><p>This is the prototype for a extended link detection callback.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>nbLocators</tt></i>:</span></td><td>the number of locators detected on the link</td></tr><tr><td><span class="term"><i><tt>hrefs</tt></i>:</span></td><td>pointer to the array of locator hrefs</td></tr><tr><td><span class="term"><i><tt>roles</tt></i>:</span></td><td>pointer to the array of locator roles</td></tr><tr><td><span class="term"><i><tt>nbArcs</tt></i>:</span></td><td>the number of arcs detected on the link</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>pointer to the array of source roles found on the arcs</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>pointer to the array of target roles found on the arcs</td></tr><tr><td><span class="term"><i><tt>show</tt></i>:</span></td><td>array of values for the show attributes found on the arcs</td></tr><tr><td><span class="term"><i><tt>actuate</tt></i>:</span></td><td>array of values for the actuate attributes found on the arcs</td></tr><tr><td><span class="term"><i><tt>nbTitles</tt></i>:</span></td><td>the number of titles detected on the link</td></tr><tr><td><span class="term"><i><tt>titles</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>langs</tt></i>:</span></td><td>array of xml:lang values for the titles</td></tr></tbody></table></div><br />
+<h3><a name="xlinkExtendedLinkSetFunk" id="xlinkExtendedLinkSetFunk"></a>Function type: xlinkExtendedLinkSetFunk</h3><pre class="programlisting">Function type: xlinkExtendedLinkSetFunk
+void xlinkExtendedLinkSetFunk (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int nbLocators, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> * hrefs, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> * roles, <br /> int nbTitles, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> * titles, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langs)
+</pre><p>This is the prototype for a extended link set detection callback.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>nbLocators</tt></i>:</span></td><td>the number of locators detected on the link</td></tr><tr><td><span class="term"><i><tt>hrefs</tt></i>:</span></td><td>pointer to the array of locator hrefs</td></tr><tr><td><span class="term"><i><tt>roles</tt></i>:</span></td><td>pointer to the array of locator roles</td></tr><tr><td><span class="term"><i><tt>nbTitles</tt></i>:</span></td><td>the number of titles detected on the link</td></tr><tr><td><span class="term"><i><tt>titles</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>langs</tt></i>:</span></td><td>array of xml:lang values for the titles</td></tr></tbody></table></div><br />
+<h3><a name="xlinkGetDefaultDetect" id="xlinkGetDefaultDetect"></a>Function: xlinkGetDefaultDetect</h3><pre class="programlisting"><a href="libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> xlinkGetDefaultDetect (void)<br />
+</pre><p>Get the default xlink detection routine</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current function or NULL;</td></tr></tbody></table></div><h3><a name="xlinkGetDefaultHandler" id="xlinkGetDefaultHandler"></a>Function: xlinkGetDefaultHandler</h3><pre class="programlisting"><a href="libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> xlinkGetDefaultHandler (void)<br />
+</pre><p>Get the default xlink handler.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the current <a href="libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> value.</td></tr></tbody></table></div><h3><a name="xlinkIsLink" id="xlinkIsLink"></a>Function: xlinkIsLink</h3><pre class="programlisting"><a href="libxml-xlink.html#xlinkType">xlinkType</a> xlinkIsLink (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don't try to do full checking of the link validity but tries to detect and return the appropriate link type.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document containing the node</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node pointer itself</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xlink.html#xlinkType">xlinkType</a> of the node (XLINK_TYPE_NONE if there is no link detected.</td></tr></tbody></table></div><h3><a name="xlinkNodeDetectFunc" id="xlinkNodeDetectFunc"></a>Function type: xlinkNodeDetectFunc</h3><pre class="programlisting">Function type: xlinkNodeDetectFunc
+void xlinkNodeDetectFunc (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)
+</pre><p>This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to check</td></tr></tbody></table></div><br />
+<h3><a name="xlinkSetDefaultDetect" id="xlinkSetDefaultDetect"></a>Function: xlinkSetDefaultDetect</h3><pre class="programlisting">void xlinkSetDefaultDetect (<a href="libxml-xlink.html#xlinkNodeDetectFunc">xlinkNodeDetectFunc</a> func)<br />
+</pre><p>Set the default xlink detection routine</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>func</tt></i>:</span></td><td>pointer to the new detection routine.</td></tr></tbody></table></div><h3><a name="xlinkSetDefaultHandler" id="xlinkSetDefaultHandler"></a>Function: xlinkSetDefaultHandler</h3><pre class="programlisting">void xlinkSetDefaultHandler (<a href="libxml-xlink.html#xlinkHandlerPtr">xlinkHandlerPtr</a> handler)<br />
+</pre><p>Set the default xlink handlers</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new value for the xlink handler block</td></tr></tbody></table></div><h3><a name="xlinkSimpleLinkFunk" id="xlinkSimpleLinkFunk"></a>Function type: xlinkSimpleLinkFunk</h3><pre class="programlisting">Function type: xlinkSimpleLinkFunk
+void xlinkSimpleLinkFunk (void * ctx, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xlink.html#xlinkHRef">xlinkHRef</a> href, <br /> const <a href="libxml-xlink.html#xlinkRole">xlinkRole</a> role, <br /> const <a href="libxml-xlink.html#xlinkTitle">xlinkTitle</a> title)
+</pre><p>This is the prototype for a simple link detection callback.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user data pointer</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node carrying the link</td></tr><tr><td><span class="term"><i><tt>href</tt></i>:</span></td><td>the target of the link</td></tr><tr><td><span class="term"><i><tt>role</tt></i>:</span></td><td>the role string</td></tr><tr><td><span class="term"><i><tt>title</tt></i>:</span></td><td>the link title</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlIO.html b/doc/html/libxml-xmlIO.html
new file mode 100644
index 0000000..2d2724c
--- /dev/null
+++ b/doc/html/libxml-xmlIO.html
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlIO from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlIO from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xlink.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xlink.html">xlink</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlautomata.html">xmlautomata</a></th><td><a accesskey="n" href="libxml-xmlautomata.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>interface for the I/O interfaces used by the parser </p><h2>Table of Contents</h2><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a> (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a> (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">int <a href="#xmlCheckFilename">xmlCheckFilename</a> (const char * path)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlCheckHTTPInput">xmlCheckHTTPInput</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret)</pre>
+<pre class="programlisting">void <a href="#xmlCleanupInputCallbacks">xmlCleanupInputCallbacks</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlCleanupOutputCallbacks">xmlCleanupOutputCallbacks</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlFileClose">xmlFileClose</a> (void * context)</pre>
+<pre class="programlisting">int <a href="#xmlFileMatch">xmlFileMatch</a> (const char * filename)</pre>
+<pre class="programlisting">void * <a href="#xmlFileOpen">xmlFileOpen</a> (const char * filename)</pre>
+<pre class="programlisting">int <a href="#xmlFileRead">xmlFileRead</a> (void * context, <br /> char * buffer, <br /> int len)</pre>
+<pre class="programlisting">void <a href="#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in)</pre>
+<pre class="programlisting">int <a href="#xmlIOFTPClose">xmlIOFTPClose</a> (void * context)</pre>
+<pre class="programlisting">int <a href="#xmlIOFTPMatch">xmlIOFTPMatch</a> (const char * filename)</pre>
+<pre class="programlisting">void * <a href="#xmlIOFTPOpen">xmlIOFTPOpen</a> (const char * filename)</pre>
+<pre class="programlisting">int <a href="#xmlIOFTPRead">xmlIOFTPRead</a> (void * context, <br /> char * buffer, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlIOHTTPClose">xmlIOHTTPClose</a> (void * context)</pre>
+<pre class="programlisting">int <a href="#xmlIOHTTPMatch">xmlIOHTTPMatch</a> (const char * filename)</pre>
+<pre class="programlisting">void * <a href="#xmlIOHTTPOpen">xmlIOHTTPOpen</a> (const char * filename)</pre>
+<pre class="programlisting">void * <a href="#xmlIOHTTPOpenW">xmlIOHTTPOpenW</a> (const char * post_uri, <br /> int compression)</pre>
+<pre class="programlisting">int <a href="#xmlIOHTTPRead">xmlIOHTTPRead</a> (void * context, <br /> char * buffer, <br /> int len)</pre>
+<pre class="programlisting">Function type: <a href="#xmlInputCloseCallback">xmlInputCloseCallback</a>
+int <a href="#xmlInputCloseCallback">xmlInputCloseCallback</a> (void * context)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlInputMatchCallback">xmlInputMatchCallback</a>
+int <a href="#xmlInputMatchCallback">xmlInputMatchCallback</a> (char const * filename)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlInputOpenCallback">xmlInputOpenCallback</a>
+void * <a href="#xmlInputOpenCallback">xmlInputOpenCallback</a> (char const * filename)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlInputReadCallback">xmlInputReadCallback</a>
+int <a href="#xmlInputReadCallback">xmlInputReadCallback</a> (void * context, <br /> char * buffer, <br /> int len)
+</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> <a href="#xmlNoNetExternalEntityLoader">xmlNoNetExternalEntityLoader</a> (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNormalizeWindowsPath">xmlNormalizeWindowsPath</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)</pre>
+<pre class="programlisting">int <a href="#xmlOutputBufferClose">xmlOutputBufferClose</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateBuffer">xmlOutputBufferCreateBuffer</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFd">xmlOutputBufferCreateFd</a> (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFile">xmlOutputBufferCreateFile</a> (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateFilename">xmlOutputBufferCreateFilename</a> (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br /> int compression)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> <a href="#xmlOutputBufferCreateIO">xmlOutputBufferCreateIO</a> (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)</pre>
+<pre class="programlisting">int <a href="#xmlOutputBufferFlush">xmlOutputBufferFlush</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlOutputBufferGetContent">xmlOutputBufferGetContent</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting">size_t <a href="#xmlOutputBufferGetSize">xmlOutputBufferGetSize</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting">int <a href="#xmlOutputBufferWrite">xmlOutputBufferWrite</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> int len, <br /> const char * buf)</pre>
+<pre class="programlisting">int <a href="#xmlOutputBufferWriteEscape">xmlOutputBufferWriteEscape</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping)</pre>
+<pre class="programlisting">int <a href="#xmlOutputBufferWriteString">xmlOutputBufferWriteString</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> const char * str)</pre>
+<pre class="programlisting">Function type: <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a>
+int <a href="#xmlOutputCloseCallback">xmlOutputCloseCallback</a> (void * context)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlOutputMatchCallback">xmlOutputMatchCallback</a>
+int <a href="#xmlOutputMatchCallback">xmlOutputMatchCallback</a> (char const * filename)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlOutputOpenCallback">xmlOutputOpenCallback</a>
+void * <a href="#xmlOutputOpenCallback">xmlOutputOpenCallback</a> (char const * filename)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlOutputWriteCallback">xmlOutputWriteCallback</a>
+int <a href="#xmlOutputWriteCallback">xmlOutputWriteCallback</a> (void * context, <br /> const char * buffer, <br /> int len)
+</pre>
+<pre class="programlisting">char * <a href="#xmlParserGetDirectory">xmlParserGetDirectory</a> (const char * filename)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFd">xmlParserInputBufferCreateFd</a> (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFile">xmlParserInputBufferCreateFile</a> (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateFilename">xmlParserInputBufferCreateFilename</a> (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateIO">xmlParserInputBufferCreateIO</a> (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateMem">xmlParserInputBufferCreateMem</a> (const char * mem, <br /> int size, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlParserInputBufferCreateStatic">xmlParserInputBufferCreateStatic</a> (const char * mem, <br /> int size, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)</pre>
+<pre class="programlisting">int <a href="#xmlParserInputBufferGrow">xmlParserInputBufferGrow</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlParserInputBufferPush">xmlParserInputBufferPush</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len, <br /> const char * buf)</pre>
+<pre class="programlisting">int <a href="#xmlParserInputBufferRead">xmlParserInputBufferRead</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlPopInputCallbacks">xmlPopInputCallbacks</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlRegisterDefaultInputCallbacks">xmlRegisterDefaultInputCallbacks</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlRegisterDefaultOutputCallbacks">xmlRegisterDefaultOutputCallbacks</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlRegisterHTTPPostCallbacks">xmlRegisterHTTPPostCallbacks</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlRegisterInputCallbacks">xmlRegisterInputCallbacks</a> (<a href="libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br /> <a href="libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc)</pre>
+<pre class="programlisting">int <a href="#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a> (<a href="libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc)</pre>
+<h2>Description</h2>
+<h3><a name="xmlAllocOutputBuffer" id="xmlAllocOutputBuffer"></a>Function: xmlAllocOutputBuffer</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlAllocOutputBuffer (<a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered parser output</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlAllocParserInputBuffer" id="xmlAllocParserInputBuffer"></a>Function: xmlAllocParserInputBuffer</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlAllocParserInputBuffer (<a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for progressive parsing</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlCheckFilename" id="xmlCheckFilename"></a>Function: xmlCheckFilename</h3><pre class="programlisting">int xmlCheckFilename (const char * path)<br />
+</pre><p>function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the path to check</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1. if stat fails, returns 0 (if calling stat on the filename fails, it can't be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.</td></tr></tbody></table></div><h3><a name="xmlCheckHTTPInput" id="xmlCheckHTTPInput"></a>Function: xmlCheckHTTPInput</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlCheckHTTPInput (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> ret)<br />
+</pre><p>Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>ret</tt></i>:</span></td><td>an XML parser input</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the input or NULL in case of HTTP error.</td></tr></tbody></table></div><h3><a name="xmlCleanupInputCallbacks" id="xmlCleanupInputCallbacks"></a>Function: xmlCleanupInputCallbacks</h3><pre class="programlisting">void xmlCleanupInputCallbacks (void)<br />
+</pre><p>clears the entire input callback table. this includes the compiled-in I/O.</p>
+<h3><a name="xmlCleanupOutputCallbacks" id="xmlCleanupOutputCallbacks"></a>Function: xmlCleanupOutputCallbacks</h3><pre class="programlisting">void xmlCleanupOutputCallbacks (void)<br />
+</pre><p>clears the entire output callback table. this includes the compiled-in I/O callbacks.</p>
+<h3><a name="xmlFileClose" id="xmlFileClose"></a>Function: xmlFileClose</h3><pre class="programlisting">int xmlFileClose (void * context)<br />
+</pre><p>Close an I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlFileMatch" id="xmlFileMatch"></a>Function: xmlFileMatch</h3><pre class="programlisting">int xmlFileMatch (const char * filename)<br />
+</pre><p>input from FILE *</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlFileOpen" id="xmlFileOpen"></a>Function: xmlFileOpen</h3><pre class="programlisting">void * xmlFileOpen (const char * filename)<br />
+</pre><p>Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handler or NULL in case or failure</td></tr></tbody></table></div><h3><a name="xmlFileRead" id="xmlFileRead"></a>Function: xmlFileRead</h3><pre class="programlisting">int xmlFileRead (void * context, <br /> char * buffer, <br /> int len)<br />
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or &lt; 0 in case of failure</td></tr></tbody></table></div><h3><a name="xmlFreeParserInputBuffer" id="xmlFreeParserInputBuffer"></a>Function: xmlFreeParserInputBuffer</h3><pre class="programlisting">void xmlFreeParserInputBuffer (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in)<br />
+</pre><p>Free up the memory used by a buffered parser input</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr></tbody></table></div><h3><a name="xmlIOFTPClose" id="xmlIOFTPClose"></a>Function: xmlIOFTPClose</h3><pre class="programlisting">int xmlIOFTPClose (void * context)<br />
+</pre><p>Close an FTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlIOFTPMatch" id="xmlIOFTPMatch"></a>Function: xmlIOFTPMatch</h3><pre class="programlisting">int xmlIOFTPMatch (const char * filename)<br />
+</pre><p>check if the URI matches an FTP one</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlIOFTPOpen" id="xmlIOFTPOpen"></a>Function: xmlIOFTPOpen</h3><pre class="programlisting">void * xmlIOFTPOpen (const char * filename)<br />
+</pre><p>open an FTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlIOFTPRead" id="xmlIOFTPRead"></a>Function: xmlIOFTPRead</h3><pre class="programlisting">int xmlIOFTPRead (void * context, <br /> char * buffer, <br /> int len)<br />
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div><h3><a name="xmlIOHTTPClose" id="xmlIOHTTPClose"></a>Function: xmlIOHTTPClose</h3><pre class="programlisting">int xmlIOHTTPClose (void * context)<br />
+</pre><p>Close an HTTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0</td></tr></tbody></table></div><h3><a name="xmlIOHTTPMatch" id="xmlIOHTTPMatch"></a>Function: xmlIOHTTPMatch</h3><pre class="programlisting">int xmlIOHTTPMatch (const char * filename)<br />
+</pre><p>check if the URI matches an HTTP one</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if matches, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlIOHTTPOpen" id="xmlIOHTTPOpen"></a>Function: xmlIOHTTPOpen</h3><pre class="programlisting">void * xmlIOHTTPOpen (const char * filename)<br />
+</pre><p>open an HTTP I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI for matching</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlIOHTTPOpenW" id="xmlIOHTTPOpenW"></a>Function: xmlIOHTTPOpenW</h3><pre class="programlisting">void * xmlIOHTTPOpenW (const char * post_uri, <br /> int compression)<br />
+</pre><p>Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>post_uri</tt></i>:</span></td><td>The destination URI for the document</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>The compression desired for the document.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an I/O context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlIOHTTPRead" id="xmlIOHTTPRead"></a>Function: xmlIOHTTPRead</h3><pre class="programlisting">int xmlIOHTTPRead (void * context, <br /> char * buffer, <br /> int len)<br />
+</pre><p>Read @len bytes to @buffer from the I/O channel.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>the I/O context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>where to drop data</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>number of bytes to write</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written</td></tr></tbody></table></div><h3><a name="xmlInputCloseCallback" id="xmlInputCloseCallback"></a>Function type: xmlInputCloseCallback</h3><pre class="programlisting">Function type: xmlInputCloseCallback
+int xmlInputCloseCallback (void * context)
+</pre><p>Callback used in the I/O Input API to close the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><br />
+<h3><a name="xmlInputMatchCallback" id="xmlInputMatchCallback"></a>Function type: xmlInputMatchCallback</h3><pre class="programlisting">Function type: xmlInputMatchCallback
+int xmlInputMatchCallback (char const * filename)
+</pre><p>Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Input module should be used</td></tr></tbody></table></div><br />
+<h3><a name="xmlInputOpenCallback" id="xmlInputOpenCallback"></a>Function type: xmlInputOpenCallback</h3><pre class="programlisting">Function type: xmlInputOpenCallback
+void * xmlInputOpenCallback (char const * filename)
+</pre><p>Callback used in the I/O Input API to open the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Input context or NULL in case or error</td></tr></tbody></table></div><br />
+<h3><a name="xmlInputReadCallback" id="xmlInputReadCallback"></a>Function type: xmlInputReadCallback</h3><pre class="programlisting">Function type: xmlInputReadCallback
+int xmlInputReadCallback (void * context, <br /> char * buffer, <br /> int len)
+</pre><p>Callback used in the I/O Input API to read the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Input context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer to store data read</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes read or -1 in case of error</td></tr></tbody></table></div><br />
+<h3><a name="xmlNoNetExternalEntityLoader" id="xmlNoNetExternalEntityLoader"></a>Function: xmlNoNetExternalEntityLoader</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> xmlNoNetExternalEntityLoader (const char * URL, <br /> const char * ID, <br /> <a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt)<br />
+</pre><p>A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the URL for the entity to load</td></tr><tr><td><span class="term"><i><tt>ID</tt></i>:</span></td><td>the System ID for the entity to load</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context in which the entity is called or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated xmlParserInputPtr, or NULL.</td></tr></tbody></table></div><h3><a name="xmlNormalizeWindowsPath" id="xmlNormalizeWindowsPath"></a>Function: xmlNormalizeWindowsPath</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlNormalizeWindowsPath (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * path)<br />
+</pre><p>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>the input file path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a canonicalized version of the path</td></tr></tbody></table></div><h3><a name="xmlOutputBufferClose" id="xmlOutputBufferClose"></a>Function: xmlOutputBufferClose</h3><pre class="programlisting">int xmlOutputBufferClose (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
+</pre><p>flushes and close the output I/O channel and free up all the associated resources</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateBuffer" id="xmlOutputBufferCreateBuffer"></a>Function: xmlOutputBufferCreateBuffer</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateBuffer (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered output for the progressive saving to a <a href="libxml-tree.html#xmlBuffer">xmlBuffer</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a <a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFd" id="xmlOutputBufferCreateFd"></a>Function: xmlOutputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFd (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered output for the progressive saving to a file descriptor</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFile" id="xmlOutputBufferCreateFile"></a>Function: xmlOutputBufferCreateFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFile (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered output for the progressive saving to a FILE * buffered C I/O</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateFilename" id="xmlOutputBufferCreateFilename"></a>Function: xmlOutputBufferCreateFilename</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateFilename (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder, <br /> int compression)<br />
+</pre><p>Create a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the encoding converter or NULL</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression ration (0 none, 9 max).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferCreateIO" id="xmlOutputBufferCreateIO"></a>Function: xmlOutputBufferCreateIO</h3><pre class="programlisting"><a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> xmlOutputBufferCreateIO (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder)<br />
+</pre><p>Create a buffered output for the progressive saving to an I/O handler</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>encoder</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser output or NULL</td></tr></tbody></table></div><h3><a name="xmlOutputBufferFlush" id="xmlOutputBufferFlush"></a>Function: xmlOutputBufferFlush</h3><pre class="programlisting">int xmlOutputBufferFlush (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
+</pre><p>flushes the output I/O channel</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered output</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferGetContent" id="xmlOutputBufferGetContent"></a>Function: xmlOutputBufferGetContent</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlOutputBufferGetContent (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
+</pre><p>Gives a pointer to the data currently held in the output buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the data or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlOutputBufferGetSize" id="xmlOutputBufferGetSize"></a>Function: xmlOutputBufferGetSize</h3><pre class="programlisting">size_t xmlOutputBufferGetSize (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
+</pre><p>Gives the length of the data currently held in the output buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case or error or no data is held, the size otherwise</td></tr></tbody></table></div><h3><a name="xmlOutputBufferWrite" id="xmlOutputBufferWrite"></a>Function: xmlOutputBufferWrite</h3><pre class="programlisting">int xmlOutputBufferWrite (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> int len, <br /> const char * buf)<br />
+</pre><p>Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferWriteEscape" id="xmlOutputBufferWriteEscape"></a>Function: xmlOutputBufferWriteEscape</h3><pre class="programlisting">int xmlOutputBufferWriteEscape (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escaping)<br />
+</pre><p>Write the content of the string in the output I/O buffer This routine escapes the caracters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated UTF-8 string</td></tr><tr><td><span class="term"><i><tt>escaping</tt></i>:</span></td><td>an optional escaping function (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputBufferWriteString" id="xmlOutputBufferWriteString"></a>Function: xmlOutputBufferWriteString</h3><pre class="programlisting">int xmlOutputBufferWriteString (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out, <br /> const char * str)<br />
+</pre><p>Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>a buffered parser output</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated C string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars immediately written, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlOutputCloseCallback" id="xmlOutputCloseCallback"></a>Function type: xmlOutputCloseCallback</h3><pre class="programlisting">Function type: xmlOutputCloseCallback
+int xmlOutputCloseCallback (void * context)
+</pre><p>Callback used in the I/O Output API to close the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><br />
+<h3><a name="xmlOutputMatchCallback" id="xmlOutputMatchCallback"></a>Function type: xmlOutputMatchCallback</h3><pre class="programlisting">Function type: xmlOutputMatchCallback
+int xmlOutputMatchCallback (char const * filename)
+</pre><p>Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if yes and 0 if another Output module should be used</td></tr></tbody></table></div><br />
+<h3><a name="xmlOutputOpenCallback" id="xmlOutputOpenCallback"></a>Function type: xmlOutputOpenCallback</h3><pre class="programlisting">Function type: xmlOutputOpenCallback
+void * xmlOutputOpenCallback (char const * filename)
+</pre><p>Callback used in the I/O Output API to open the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an Output context or NULL in case or error</td></tr></tbody></table></div><br />
+<h3><a name="xmlOutputWriteCallback" id="xmlOutputWriteCallback"></a>Function type: xmlOutputWriteCallback</h3><pre class="programlisting">Function type: xmlOutputWriteCallback
+int xmlOutputWriteCallback (void * context, <br /> const char * buffer, <br /> int len)
+</pre><p>Callback used in the I/O Output API to write to the resource</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>context</tt></i>:</span></td><td>an Output context</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>the buffer of data to write</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the buffer in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error</td></tr></tbody></table></div><br />
+<h3><a name="xmlParserGetDirectory" id="xmlParserGetDirectory"></a>Function: xmlParserGetDirectory</h3><pre class="programlisting">char * xmlParserGetDirectory (const char * filename)<br />
+</pre><p>lookup the directory for that file</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to a file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new allocated string containing the directory, or NULL.</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateFd" id="xmlParserInputBufferCreateFd"></a>Function: xmlParserInputBufferCreateFd</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFd (int fd, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing for the input from a file descriptor</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateFile" id="xmlParserInputBufferCreateFile"></a>Function: xmlParserInputBufferCreateFile</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFile (FILE * file, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a FILE*</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateFilename" id="xmlParserInputBufferCreateFilename"></a>Function: xmlParserInputBufferCreateFilename</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateFilename (const char * URI, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing of a file If filename is "-' then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == <a href="libxml-encoding.html#XML_CHAR_ENCODING_NONE">XML_CHAR_ENCODING_NONE</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>a C string containing the URI or filename</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateIO" id="xmlParserInputBufferCreateIO"></a>Function: xmlParserInputBufferCreateIO</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateIO (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing for the input from an I/O handler</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateMem" id="xmlParserInputBufferCreateMem"></a>Function: xmlParserInputBufferCreateMem</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateMem (const char * mem, <br /> int size, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing for the input from a memory area.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferCreateStatic" id="xmlParserInputBufferCreateStatic"></a>Function: xmlParserInputBufferCreateStatic</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlParserInputBufferCreateStatic (const char * mem, <br /> int size, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc)<br />
+</pre><p>Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap'ed file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>the memory input</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the length of the memory block</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>the charset encoding if known</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new parser input or NULL</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferGrow" id="xmlParserInputBufferGrow"></a>Function: xmlParserInputBufferGrow</h3><pre class="programlisting">int xmlParserInputBufferGrow (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len)<br />
+</pre><p>Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in-&gt;buffer or in-&gt;raw</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferPush" id="xmlParserInputBufferPush"></a>Function: xmlParserInputBufferPush</h3><pre class="programlisting">int xmlParserInputBufferPush (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len, <br /> const char * buf)<br />
+</pre><p>Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the size in bytes of the array.</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an char array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlParserInputBufferRead" id="xmlParserInputBufferRead"></a>Function: xmlParserInputBufferRead</h3><pre class="programlisting">int xmlParserInputBufferRead (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> in, <br /> int len)<br />
+</pre><p>Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>in</tt></i>:</span></td><td>a buffered parser input</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>indicative value of the amount of chars to read</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of chars read and stored in the buffer, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlPopInputCallbacks" id="xmlPopInputCallbacks"></a>Function: xmlPopInputCallbacks</h3><pre class="programlisting">int xmlPopInputCallbacks (void)<br />
+</pre><p>Clear the top input callback from the input stack. this includes the compiled-in I/O.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of input callback registered or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRegisterDefaultInputCallbacks" id="xmlRegisterDefaultInputCallbacks"></a>Function: xmlRegisterDefaultInputCallbacks</h3><pre class="programlisting">void xmlRegisterDefaultInputCallbacks (void)<br />
+</pre><p>Registers the default compiled-in I/O handlers.</p>
+<h3><a name="xmlRegisterDefaultOutputCallbacks" id="xmlRegisterDefaultOutputCallbacks"></a>Function: xmlRegisterDefaultOutputCallbacks</h3><pre class="programlisting">void xmlRegisterDefaultOutputCallbacks (void)<br />
+</pre><p>Registers the default compiled-in I/O handlers.</p>
+<h3><a name="xmlRegisterHTTPPostCallbacks" id="xmlRegisterHTTPPostCallbacks"></a>Function: xmlRegisterHTTPPostCallbacks</h3><pre class="programlisting">void xmlRegisterHTTPPostCallbacks (void)<br />
+</pre><p>By default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead.</p>
+<h3><a name="xmlRegisterInputCallbacks" id="xmlRegisterInputCallbacks"></a>Function: xmlRegisterInputCallbacks</h3><pre class="programlisting">int xmlRegisterInputCallbacks (<a href="libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a> matchFunc, <br /> <a href="libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a> openFunc, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readFunc, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closeFunc)<br />
+</pre><p>Register a new set of I/O callback for handling parser input.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlInputMatchCallback">xmlInputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlInputOpenCallback">xmlInputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>readFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlRegisterOutputCallbacks" id="xmlRegisterOutputCallbacks"></a>Function: xmlRegisterOutputCallbacks</h3><pre class="programlisting">int xmlRegisterOutputCallbacks (<a href="libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a> matchFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a> openFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writeFunc, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closeFunc)<br />
+</pre><p>Register a new set of I/O callback for handling output.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>matchFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlOutputMatchCallback">xmlOutputMatchCallback</a></td></tr><tr><td><span class="term"><i><tt>openFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlOutputOpenCallback">xmlOutputOpenCallback</a></td></tr><tr><td><span class="term"><i><tt>writeFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a></td></tr><tr><td><span class="term"><i><tt>closeFunc</tt></i>:</span></td><td>the <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the registered handler number or -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlautomata.html b/doc/html/libxml-xmlautomata.html
new file mode 100644
index 0000000..a07f7c0
--- /dev/null
+++ b/doc/html/libxml-xmlautomata.html
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlautomata from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlautomata from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlIO.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlIO.html">xmlIO</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlerror.html">xmlerror</a></th><td><a accesskey="n" href="libxml-xmlerror.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>the API to build regexp automata </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlAutomata">xmlAutomata</a><br />struct _xmlAutomata
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlautomata.html#xmlAutomata">xmlAutomata</a> * <a name="xmlAutomataPtr" id="xmlAutomataPtr">xmlAutomataPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlAutomataState">xmlAutomataState</a><br />struct _xmlAutomataState
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlautomata.html#xmlAutomataState">xmlAutomataState</a> * <a name="xmlAutomataStatePtr" id="xmlAutomataStatePtr">xmlAutomataStatePtr</a>
+</pre><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlAutomataCompile">xmlAutomataCompile</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataGetInitState">xmlAutomataGetInitState</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)</pre>
+<pre class="programlisting">int <a href="#xmlAutomataIsDeterminist">xmlAutomataIsDeterminist</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewAllTrans">xmlAutomataNewAllTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int lax)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans">xmlAutomataNewCountTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> int min, <br /> int max, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountTrans2">xmlAutomataNewCountTrans2</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> int min, <br /> int max, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCountedTrans">xmlAutomataNewCountedTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int counter)</pre>
+<pre class="programlisting">int <a href="#xmlAutomataNewCounter">xmlAutomataNewCounter</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> int min, <br /> int max)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewCounterTrans">xmlAutomataNewCounterTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int counter)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewEpsilon">xmlAutomataNewEpsilon</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewNegTrans">xmlAutomataNewNegTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans">xmlAutomataNewOnceTrans</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> int min, <br /> int max, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewOnceTrans2">xmlAutomataNewOnceTrans2</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> int min, <br /> int max, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewState">xmlAutomataNewState</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition">xmlAutomataNewTransition</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> <a href="#xmlAutomataNewTransition2">xmlAutomataNewTransition2</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlAutomataSetFinalState">xmlAutomataSetFinalState</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state)</pre>
+<pre class="programlisting">void <a href="#xmlFreeAutomata">xmlFreeAutomata</a> (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)</pre>
+<pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> <a href="#xmlNewAutomata">xmlNewAutomata</a> (void)</pre>
+<h2>Description</h2>
+<h3><a name="xmlAutomata" id="xmlAutomata">Structure xmlAutomata</a></h3><pre class="programlisting">Structure xmlAutomata<br />struct _xmlAutomata {
+The content of this structure is not made public by the API.
+}</pre>
+ A libxml automata description, It can be compiled into a regexp
+ <h3><a name="xmlAutomataState" id="xmlAutomataState">Structure xmlAutomataState</a></h3><pre class="programlisting">Structure xmlAutomataState<br />struct _xmlAutomataState {
+The content of this structure is not made public by the API.
+}</pre>
+ A state int the automata description,
+ <h3><a name="xmlAutomataCompile" id="xmlAutomataCompile"></a>Function: xmlAutomataCompile</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlAutomataCompile (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br />
+</pre><p>Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled regexp or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataGetInitState" id="xmlAutomataGetInitState"></a>Function: xmlAutomataGetInitState</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataGetInitState (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br />
+</pre><p>Initial state lookup</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the initial state of the automata</td></tr></tbody></table></div><h3><a name="xmlAutomataIsDeterminist" id="xmlAutomataIsDeterminist"></a>Function: xmlAutomataIsDeterminist</h3><pre class="programlisting">int xmlAutomataIsDeterminist (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br />
+</pre><p>Checks if an automata is determinist.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if not, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewAllTrans" id="xmlAutomataNewAllTrans"></a>Function: xmlAutomataNewAllTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewAllTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int lax)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>lax</tt></i>:</span></td><td>allow to transition if not all all transitions have been activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewCountTrans" id="xmlAutomataNewCountTrans"></a>Function: xmlAutomataNewCountTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> int min, <br /> int max, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewCountTrans2" id="xmlAutomataNewCountTrans2"></a>Function: xmlAutomataNewCountTrans2</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountTrans2 (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> int min, <br /> int max, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewCountedTrans" id="xmlAutomataNewCountedTrans"></a>Function: xmlAutomataNewCountedTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCountedTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int counter)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>counter</tt></i>:</span></td><td>the counter associated to that transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewCounter" id="xmlAutomataNewCounter"></a>Function: xmlAutomataNewCounter</h3><pre class="programlisting">int xmlAutomataNewCounter (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> int min, <br /> int max)<br />
+</pre><p>Create a new counter</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimal value on the counter</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximal value on the counter</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the counter number or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewCounterTrans" id="xmlAutomataNewCounterTrans"></a>Function: xmlAutomataNewCounterTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewCounterTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> int counter)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>counter</tt></i>:</span></td><td>the counter associated to that transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewEpsilon" id="xmlAutomataNewEpsilon"></a>Function: xmlAutomataNewEpsilon</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewEpsilon (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewNegTrans" id="xmlAutomataNewNegTrans"></a>Function: xmlAutomataNewNegTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewNegTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won't match to follow # the semantic of XSD ##other</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the first input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewOnceTrans" id="xmlAutomataNewOnceTrans"></a>Function: xmlAutomataNewOnceTrans</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> int min, <br /> int max, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewOnceTrans2" id="xmlAutomataNewOnceTrans2"></a>Function: xmlAutomataNewOnceTrans2</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewOnceTrans2 (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> int min, <br /> int max, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the minimum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the maximum successive occurences of token</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the transition</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewState" id="xmlAutomataNewState"></a>Function: xmlAutomataNewState</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewState (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br />
+</pre><p>Create a new disconnected state in the automata</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewTransition" id="xmlAutomataNewTransition"></a>Function: xmlAutomataNewTransition</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataNewTransition2" id="xmlAutomataNewTransition2"></a>Function: xmlAutomataNewTransition2</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> xmlAutomataNewTransition2 (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> from, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> to, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token2, <br /> void * data)<br />
+</pre><p>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>the starting point of the transition</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>the target point of the transition or NULL</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the first input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>token2</tt></i>:</span></td><td>the second input string associated to that transition</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data passed to the callback function if the transition is activated</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the target state or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlAutomataSetFinalState" id="xmlAutomataSetFinalState"></a>Function: xmlAutomataSetFinalState</h3><pre class="programlisting">int xmlAutomataSetFinalState (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am, <br /> <a href="libxml-xmlautomata.html#xmlAutomataStatePtr">xmlAutomataStatePtr</a> state)<br />
+</pre><p>Makes that state a final state</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr><tr><td><span class="term"><i><tt>state</tt></i>:</span></td><td>a state in this automata</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlFreeAutomata" id="xmlFreeAutomata"></a>Function: xmlFreeAutomata</h3><pre class="programlisting">void xmlFreeAutomata (<a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> am)<br />
+</pre><p>Free an automata</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>am</tt></i>:</span></td><td>an automata</td></tr></tbody></table></div><h3><a name="xmlNewAutomata" id="xmlNewAutomata"></a>Function: xmlNewAutomata</h3><pre class="programlisting"><a href="libxml-xmlautomata.html#xmlAutomataPtr">xmlAutomataPtr</a> xmlNewAutomata (void)<br />
+</pre><p>Create a new automata</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object or NULL in case of failure</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlerror.html b/doc/html/libxml-xmlerror.html
new file mode 100644
index 0000000..5c3a104
--- /dev/null
+++ b/doc/html/libxml-xmlerror.html
@@ -0,0 +1,865 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlerror from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlerror from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlautomata.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlautomata.html">xmlautomata</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlexports.html">xmlexports</a></th><td><a accesskey="n" href="libxml-xmlexports.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>the API used to report errors </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlError">xmlError</a><br />struct _xmlError
+</pre><pre class="programlisting">Enum <a href="#xmlErrorDomain">xmlErrorDomain</a>
+</pre><pre class="programlisting">Enum <a href="#xmlErrorLevel">xmlErrorLevel</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlerror.html#xmlError">xmlError</a> * <a name="xmlErrorPtr" id="xmlErrorPtr">xmlErrorPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlParserErrors">xmlParserErrors</a>
+</pre><pre class="programlisting">void <a href="#initGenericErrorDefaultFunc">initGenericErrorDefaultFunc</a> (<a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> * handler)</pre>
+<pre class="programlisting">int <a href="#xmlCopyError">xmlCopyError</a> (<a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> from, <br /> <a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> to)</pre>
+<pre class="programlisting"><a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> <a href="#xmlCtxtGetLastError">xmlCtxtGetLastError</a> (void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlCtxtResetLastError">xmlCtxtResetLastError</a> (void * ctx)</pre>
+<pre class="programlisting">Function type: <a href="#xmlGenericErrorFunc">xmlGenericErrorFunc</a>
+void <a href="#xmlGenericErrorFunc">xmlGenericErrorFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting"><a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> <a href="#xmlGetLastError">xmlGetLastError</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlParserError">xmlParserError</a> (void * ctx, <br /> const char * msg, <br /> ... ...)</pre>
+<pre class="programlisting">void <a href="#xmlParserPrintFileContext">xmlParserPrintFileContext</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)</pre>
+<pre class="programlisting">void <a href="#xmlParserPrintFileInfo">xmlParserPrintFileInfo</a> (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)</pre>
+<pre class="programlisting">void <a href="#xmlParserValidityError">xmlParserValidityError</a> (void * ctx, <br /> const char * msg, <br /> ... ...)</pre>
+<pre class="programlisting">void <a href="#xmlParserValidityWarning">xmlParserValidityWarning</a> (void * ctx, <br /> const char * msg, <br /> ... ...)</pre>
+<pre class="programlisting">void <a href="#xmlParserWarning">xmlParserWarning</a> (void * ctx, <br /> const char * msg, <br /> ... ...)</pre>
+<pre class="programlisting">void <a href="#xmlResetError">xmlResetError</a> (<a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> err)</pre>
+<pre class="programlisting">void <a href="#xmlResetLastError">xmlResetLastError</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlSetGenericErrorFunc">xmlSetGenericErrorFunc</a> (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)</pre>
+<pre class="programlisting">void <a href="#xmlSetStructuredErrorFunc">xmlSetStructuredErrorFunc</a> (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)</pre>
+<pre class="programlisting">Function type: <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a>
+void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userData, <br /> <a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> error)
+</pre>
+<h2>Description</h2>
+<h3><a name="xmlError" id="xmlError">Structure xmlError</a></h3><pre class="programlisting">Structure xmlError<br />struct _xmlError {
+ int domain : What part of the library raised this er
+ int code : The error code, e.g. an <a href="libxml-xmlerror.html#xmlParserError">xmlParserError</a>
+ char * message : human-readable informative error messag
+ <a href="libxml-xmlerror.html#xmlErrorLevel">xmlErrorLevel</a> level : how consequent is the error
+ char * file : the filename
+ int line : the line number if available
+ char * str1 : extra string information
+ char * str2 : extra string information
+ char * str3 : extra string information
+ int int1 : extra number information
+ int int2 : error column # or 0 if N/A (todo: renam
+ void * ctxt : the parser context if available
+ void * node : the node in the tree
+}</pre><h3>Enum <a name="xmlErrorDomain" id="xmlErrorDomain">xmlErrorDomain</a></h3><pre class="programlisting">Enum xmlErrorDomain {
+ <a name="XML_FROM_NONE" id="XML_FROM_NONE">XML_FROM_NONE</a> = 0
+ <a name="XML_FROM_PARSER" id="XML_FROM_PARSER">XML_FROM_PARSER</a> = 1 : The XML parser
+ <a name="XML_FROM_TREE" id="XML_FROM_TREE">XML_FROM_TREE</a> = 2 : The tree module
+ <a name="XML_FROM_NAMESPACE" id="XML_FROM_NAMESPACE">XML_FROM_NAMESPACE</a> = 3 : The XML Namespace module
+ <a name="XML_FROM_DTD" id="XML_FROM_DTD">XML_FROM_DTD</a> = 4 : The XML DTD validation with parser contex
+ <a name="XML_FROM_HTML" id="XML_FROM_HTML">XML_FROM_HTML</a> = 5 : The HTML parser
+ <a name="XML_FROM_MEMORY" id="XML_FROM_MEMORY">XML_FROM_MEMORY</a> = 6 : The memory allocator
+ <a name="XML_FROM_OUTPUT" id="XML_FROM_OUTPUT">XML_FROM_OUTPUT</a> = 7 : The serialization code
+ <a name="XML_FROM_IO" id="XML_FROM_IO">XML_FROM_IO</a> = 8 : The Input/Output stack
+ <a name="XML_FROM_FTP" id="XML_FROM_FTP">XML_FROM_FTP</a> = 9 : The FTP module
+ <a name="XML_FROM_HTTP" id="XML_FROM_HTTP">XML_FROM_HTTP</a> = 10 : The HTTP module
+ <a name="XML_FROM_XINCLUDE" id="XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a> = 11 : The XInclude processing
+ <a name="XML_FROM_XPATH" id="XML_FROM_XPATH">XML_FROM_XPATH</a> = 12 : The XPath module
+ <a name="XML_FROM_XPOINTER" id="XML_FROM_XPOINTER">XML_FROM_XPOINTER</a> = 13 : The XPointer module
+ <a name="XML_FROM_REGEXP" id="XML_FROM_REGEXP">XML_FROM_REGEXP</a> = 14 : The regular expressions module
+ <a name="XML_FROM_DATATYPE" id="XML_FROM_DATATYPE">XML_FROM_DATATYPE</a> = 15 : The W3C XML Schemas Datatype module
+ <a name="XML_FROM_SCHEMASP" id="XML_FROM_SCHEMASP">XML_FROM_SCHEMASP</a> = 16 : The W3C XML Schemas parser module
+ <a name="XML_FROM_SCHEMASV" id="XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a> = 17 : The W3C XML Schemas validation module
+ <a name="XML_FROM_RELAXNGP" id="XML_FROM_RELAXNGP">XML_FROM_RELAXNGP</a> = 18 : The Relax-NG parser module
+ <a name="XML_FROM_RELAXNGV" id="XML_FROM_RELAXNGV">XML_FROM_RELAXNGV</a> = 19 : The Relax-NG validator module
+ <a name="XML_FROM_CATALOG" id="XML_FROM_CATALOG">XML_FROM_CATALOG</a> = 20 : The Catalog module
+ <a name="XML_FROM_C14N" id="XML_FROM_C14N">XML_FROM_C14N</a> = 21 : The Canonicalization module
+ <a name="XML_FROM_XSLT" id="XML_FROM_XSLT">XML_FROM_XSLT</a> = 22 : The XSLT engine from libxslt
+ <a name="XML_FROM_VALID" id="XML_FROM_VALID">XML_FROM_VALID</a> = 23 : The XML DTD validation with valid context
+ <a name="XML_FROM_CHECK" id="XML_FROM_CHECK">XML_FROM_CHECK</a> = 24 : The error checking module
+ <a name="XML_FROM_WRITER" id="XML_FROM_WRITER">XML_FROM_WRITER</a> = 25 : The xmlwriter module
+ <a name="XML_FROM_MODULE" id="XML_FROM_MODULE">XML_FROM_MODULE</a> = 26 : The dynamically loaded module modul
+ <a name="XML_FROM_I18N" id="XML_FROM_I18N">XML_FROM_I18N</a> = 27 : The module handling character conversion
+ <a name="XML_FROM_SCHEMATRONV" id="XML_FROM_SCHEMATRONV">XML_FROM_SCHEMATRONV</a> = 28 : The Schematron validator module
+ <a name="XML_FROM_BUFFER" id="XML_FROM_BUFFER">XML_FROM_BUFFER</a> = 29 : The buffers module
+ <a name="XML_FROM_URI" id="XML_FROM_URI">XML_FROM_URI</a> = 30 : The URI module
+}
+</pre><h3>Enum <a name="xmlErrorLevel" id="xmlErrorLevel">xmlErrorLevel</a></h3><pre class="programlisting">Enum xmlErrorLevel {
+ <a name="XML_ERR_NONE" id="XML_ERR_NONE">XML_ERR_NONE</a> = 0
+ <a name="XML_ERR_WARNING" id="XML_ERR_WARNING">XML_ERR_WARNING</a> = 1 : A simple warning
+ <a name="XML_ERR_ERROR" id="XML_ERR_ERROR">XML_ERR_ERROR</a> = 2 : A recoverable error
+ <a name="XML_ERR_FATAL" id="XML_ERR_FATAL">XML_ERR_FATAL</a> = 3 : A fatal error
+}
+</pre><h3>Enum <a name="xmlParserErrors" id="xmlParserErrors">xmlParserErrors</a></h3><pre class="programlisting">Enum xmlParserErrors {
+ <a name="XML_ERR_OK" id="XML_ERR_OK">XML_ERR_OK</a> = 0
+ <a name="XML_ERR_INTERNAL_ERROR" id="XML_ERR_INTERNAL_ERROR">XML_ERR_INTERNAL_ERROR</a> = 1 : 1
+ <a name="XML_ERR_NO_MEMORY" id="XML_ERR_NO_MEMORY">XML_ERR_NO_MEMORY</a> = 2 : 2
+ <a name="XML_ERR_DOCUMENT_START" id="XML_ERR_DOCUMENT_START">XML_ERR_DOCUMENT_START</a> = 3 : 3
+ <a name="XML_ERR_DOCUMENT_EMPTY" id="XML_ERR_DOCUMENT_EMPTY">XML_ERR_DOCUMENT_EMPTY</a> = 4 : 4
+ <a name="XML_ERR_DOCUMENT_END" id="XML_ERR_DOCUMENT_END">XML_ERR_DOCUMENT_END</a> = 5 : 5
+ <a name="XML_ERR_INVALID_HEX_CHARREF" id="XML_ERR_INVALID_HEX_CHARREF">XML_ERR_INVALID_HEX_CHARREF</a> = 6 : 6
+ <a name="XML_ERR_INVALID_DEC_CHARREF" id="XML_ERR_INVALID_DEC_CHARREF">XML_ERR_INVALID_DEC_CHARREF</a> = 7 : 7
+ <a name="XML_ERR_INVALID_CHARREF" id="XML_ERR_INVALID_CHARREF">XML_ERR_INVALID_CHARREF</a> = 8 : 8
+ <a name="XML_ERR_INVALID_CHAR" id="XML_ERR_INVALID_CHAR">XML_ERR_INVALID_CHAR</a> = 9 : 9
+ <a name="XML_ERR_CHARREF_AT_EOF" id="XML_ERR_CHARREF_AT_EOF">XML_ERR_CHARREF_AT_EOF</a> = 10 : 10
+ <a name="XML_ERR_CHARREF_IN_PROLOG" id="XML_ERR_CHARREF_IN_PROLOG">XML_ERR_CHARREF_IN_PROLOG</a> = 11 : 11
+ <a name="XML_ERR_CHARREF_IN_EPILOG" id="XML_ERR_CHARREF_IN_EPILOG">XML_ERR_CHARREF_IN_EPILOG</a> = 12 : 12
+ <a name="XML_ERR_CHARREF_IN_DTD" id="XML_ERR_CHARREF_IN_DTD">XML_ERR_CHARREF_IN_DTD</a> = 13 : 13
+ <a name="XML_ERR_ENTITYREF_AT_EOF" id="XML_ERR_ENTITYREF_AT_EOF">XML_ERR_ENTITYREF_AT_EOF</a> = 14 : 14
+ <a name="XML_ERR_ENTITYREF_IN_PROLOG" id="XML_ERR_ENTITYREF_IN_PROLOG">XML_ERR_ENTITYREF_IN_PROLOG</a> = 15 : 15
+ <a name="XML_ERR_ENTITYREF_IN_EPILOG" id="XML_ERR_ENTITYREF_IN_EPILOG">XML_ERR_ENTITYREF_IN_EPILOG</a> = 16 : 16
+ <a name="XML_ERR_ENTITYREF_IN_DTD" id="XML_ERR_ENTITYREF_IN_DTD">XML_ERR_ENTITYREF_IN_DTD</a> = 17 : 17
+ <a name="XML_ERR_PEREF_AT_EOF" id="XML_ERR_PEREF_AT_EOF">XML_ERR_PEREF_AT_EOF</a> = 18 : 18
+ <a name="XML_ERR_PEREF_IN_PROLOG" id="XML_ERR_PEREF_IN_PROLOG">XML_ERR_PEREF_IN_PROLOG</a> = 19 : 19
+ <a name="XML_ERR_PEREF_IN_EPILOG" id="XML_ERR_PEREF_IN_EPILOG">XML_ERR_PEREF_IN_EPILOG</a> = 20 : 20
+ <a name="XML_ERR_PEREF_IN_INT_SUBSET" id="XML_ERR_PEREF_IN_INT_SUBSET">XML_ERR_PEREF_IN_INT_SUBSET</a> = 21 : 21
+ <a name="XML_ERR_ENTITYREF_NO_NAME" id="XML_ERR_ENTITYREF_NO_NAME">XML_ERR_ENTITYREF_NO_NAME</a> = 22 : 22
+ <a name="XML_ERR_ENTITYREF_SEMICOL_MISSING" id="XML_ERR_ENTITYREF_SEMICOL_MISSING">XML_ERR_ENTITYREF_SEMICOL_MISSING</a> = 23 : 23
+ <a name="XML_ERR_PEREF_NO_NAME" id="XML_ERR_PEREF_NO_NAME">XML_ERR_PEREF_NO_NAME</a> = 24 : 24
+ <a name="XML_ERR_PEREF_SEMICOL_MISSING" id="XML_ERR_PEREF_SEMICOL_MISSING">XML_ERR_PEREF_SEMICOL_MISSING</a> = 25 : 25
+ <a name="XML_ERR_UNDECLARED_ENTITY" id="XML_ERR_UNDECLARED_ENTITY">XML_ERR_UNDECLARED_ENTITY</a> = 26 : 26
+ <a name="XML_WAR_UNDECLARED_ENTITY" id="XML_WAR_UNDECLARED_ENTITY">XML_WAR_UNDECLARED_ENTITY</a> = 27 : 27
+ <a name="XML_ERR_UNPARSED_ENTITY" id="XML_ERR_UNPARSED_ENTITY">XML_ERR_UNPARSED_ENTITY</a> = 28 : 28
+ <a name="XML_ERR_ENTITY_IS_EXTERNAL" id="XML_ERR_ENTITY_IS_EXTERNAL">XML_ERR_ENTITY_IS_EXTERNAL</a> = 29 : 29
+ <a name="XML_ERR_ENTITY_IS_PARAMETER" id="XML_ERR_ENTITY_IS_PARAMETER">XML_ERR_ENTITY_IS_PARAMETER</a> = 30 : 30
+ <a name="XML_ERR_UNKNOWN_ENCODING" id="XML_ERR_UNKNOWN_ENCODING">XML_ERR_UNKNOWN_ENCODING</a> = 31 : 31
+ <a name="XML_ERR_UNSUPPORTED_ENCODING" id="XML_ERR_UNSUPPORTED_ENCODING">XML_ERR_UNSUPPORTED_ENCODING</a> = 32 : 32
+ <a name="XML_ERR_STRING_NOT_STARTED" id="XML_ERR_STRING_NOT_STARTED">XML_ERR_STRING_NOT_STARTED</a> = 33 : 33
+ <a name="XML_ERR_STRING_NOT_CLOSED" id="XML_ERR_STRING_NOT_CLOSED">XML_ERR_STRING_NOT_CLOSED</a> = 34 : 34
+ <a name="XML_ERR_NS_DECL_ERROR" id="XML_ERR_NS_DECL_ERROR">XML_ERR_NS_DECL_ERROR</a> = 35 : 35
+ <a name="XML_ERR_ENTITY_NOT_STARTED" id="XML_ERR_ENTITY_NOT_STARTED">XML_ERR_ENTITY_NOT_STARTED</a> = 36 : 36
+ <a name="XML_ERR_ENTITY_NOT_FINISHED" id="XML_ERR_ENTITY_NOT_FINISHED">XML_ERR_ENTITY_NOT_FINISHED</a> = 37 : 37
+ <a name="XML_ERR_LT_IN_ATTRIBUTE" id="XML_ERR_LT_IN_ATTRIBUTE">XML_ERR_LT_IN_ATTRIBUTE</a> = 38 : 38
+ <a name="XML_ERR_ATTRIBUTE_NOT_STARTED" id="XML_ERR_ATTRIBUTE_NOT_STARTED">XML_ERR_ATTRIBUTE_NOT_STARTED</a> = 39 : 39
+ <a name="XML_ERR_ATTRIBUTE_NOT_FINISHED" id="XML_ERR_ATTRIBUTE_NOT_FINISHED">XML_ERR_ATTRIBUTE_NOT_FINISHED</a> = 40 : 40
+ <a name="XML_ERR_ATTRIBUTE_WITHOUT_VALUE" id="XML_ERR_ATTRIBUTE_WITHOUT_VALUE">XML_ERR_ATTRIBUTE_WITHOUT_VALUE</a> = 41 : 41
+ <a name="XML_ERR_ATTRIBUTE_REDEFINED" id="XML_ERR_ATTRIBUTE_REDEFINED">XML_ERR_ATTRIBUTE_REDEFINED</a> = 42 : 42
+ <a name="XML_ERR_LITERAL_NOT_STARTED" id="XML_ERR_LITERAL_NOT_STARTED">XML_ERR_LITERAL_NOT_STARTED</a> = 43 : 43
+ <a name="XML_ERR_LITERAL_NOT_FINISHED" id="XML_ERR_LITERAL_NOT_FINISHED">XML_ERR_LITERAL_NOT_FINISHED</a> = 44 : 44
+ <a name="XML_ERR_COMMENT_NOT_FINISHED" id="XML_ERR_COMMENT_NOT_FINISHED">XML_ERR_COMMENT_NOT_FINISHED</a> = 45 : 45
+ <a name="XML_ERR_PI_NOT_STARTED" id="XML_ERR_PI_NOT_STARTED">XML_ERR_PI_NOT_STARTED</a> = 46 : 46
+ <a name="XML_ERR_PI_NOT_FINISHED" id="XML_ERR_PI_NOT_FINISHED">XML_ERR_PI_NOT_FINISHED</a> = 47 : 47
+ <a name="XML_ERR_NOTATION_NOT_STARTED" id="XML_ERR_NOTATION_NOT_STARTED">XML_ERR_NOTATION_NOT_STARTED</a> = 48 : 48
+ <a name="XML_ERR_NOTATION_NOT_FINISHED" id="XML_ERR_NOTATION_NOT_FINISHED">XML_ERR_NOTATION_NOT_FINISHED</a> = 49 : 49
+ <a name="XML_ERR_ATTLIST_NOT_STARTED" id="XML_ERR_ATTLIST_NOT_STARTED">XML_ERR_ATTLIST_NOT_STARTED</a> = 50 : 50
+ <a name="XML_ERR_ATTLIST_NOT_FINISHED" id="XML_ERR_ATTLIST_NOT_FINISHED">XML_ERR_ATTLIST_NOT_FINISHED</a> = 51 : 51
+ <a name="XML_ERR_MIXED_NOT_STARTED" id="XML_ERR_MIXED_NOT_STARTED">XML_ERR_MIXED_NOT_STARTED</a> = 52 : 52
+ <a name="XML_ERR_MIXED_NOT_FINISHED" id="XML_ERR_MIXED_NOT_FINISHED">XML_ERR_MIXED_NOT_FINISHED</a> = 53 : 53
+ <a name="XML_ERR_ELEMCONTENT_NOT_STARTED" id="XML_ERR_ELEMCONTENT_NOT_STARTED">XML_ERR_ELEMCONTENT_NOT_STARTED</a> = 54 : 54
+ <a name="XML_ERR_ELEMCONTENT_NOT_FINISHED" id="XML_ERR_ELEMCONTENT_NOT_FINISHED">XML_ERR_ELEMCONTENT_NOT_FINISHED</a> = 55 : 55
+ <a name="XML_ERR_XMLDECL_NOT_STARTED" id="XML_ERR_XMLDECL_NOT_STARTED">XML_ERR_XMLDECL_NOT_STARTED</a> = 56 : 56
+ <a name="XML_ERR_XMLDECL_NOT_FINISHED" id="XML_ERR_XMLDECL_NOT_FINISHED">XML_ERR_XMLDECL_NOT_FINISHED</a> = 57 : 57
+ <a name="XML_ERR_CONDSEC_NOT_STARTED" id="XML_ERR_CONDSEC_NOT_STARTED">XML_ERR_CONDSEC_NOT_STARTED</a> = 58 : 58
+ <a name="XML_ERR_CONDSEC_NOT_FINISHED" id="XML_ERR_CONDSEC_NOT_FINISHED">XML_ERR_CONDSEC_NOT_FINISHED</a> = 59 : 59
+ <a name="XML_ERR_EXT_SUBSET_NOT_FINISHED" id="XML_ERR_EXT_SUBSET_NOT_FINISHED">XML_ERR_EXT_SUBSET_NOT_FINISHED</a> = 60 : 60
+ <a name="XML_ERR_DOCTYPE_NOT_FINISHED" id="XML_ERR_DOCTYPE_NOT_FINISHED">XML_ERR_DOCTYPE_NOT_FINISHED</a> = 61 : 61
+ <a name="XML_ERR_MISPLACED_CDATA_END" id="XML_ERR_MISPLACED_CDATA_END">XML_ERR_MISPLACED_CDATA_END</a> = 62 : 62
+ <a name="XML_ERR_CDATA_NOT_FINISHED" id="XML_ERR_CDATA_NOT_FINISHED">XML_ERR_CDATA_NOT_FINISHED</a> = 63 : 63
+ <a name="XML_ERR_RESERVED_XML_NAME" id="XML_ERR_RESERVED_XML_NAME">XML_ERR_RESERVED_XML_NAME</a> = 64 : 64
+ <a name="XML_ERR_SPACE_REQUIRED" id="XML_ERR_SPACE_REQUIRED">XML_ERR_SPACE_REQUIRED</a> = 65 : 65
+ <a name="XML_ERR_SEPARATOR_REQUIRED" id="XML_ERR_SEPARATOR_REQUIRED">XML_ERR_SEPARATOR_REQUIRED</a> = 66 : 66
+ <a name="XML_ERR_NMTOKEN_REQUIRED" id="XML_ERR_NMTOKEN_REQUIRED">XML_ERR_NMTOKEN_REQUIRED</a> = 67 : 67
+ <a name="XML_ERR_NAME_REQUIRED" id="XML_ERR_NAME_REQUIRED">XML_ERR_NAME_REQUIRED</a> = 68 : 68
+ <a name="XML_ERR_PCDATA_REQUIRED" id="XML_ERR_PCDATA_REQUIRED">XML_ERR_PCDATA_REQUIRED</a> = 69 : 69
+ <a name="XML_ERR_URI_REQUIRED" id="XML_ERR_URI_REQUIRED">XML_ERR_URI_REQUIRED</a> = 70 : 70
+ <a name="XML_ERR_PUBID_REQUIRED" id="XML_ERR_PUBID_REQUIRED">XML_ERR_PUBID_REQUIRED</a> = 71 : 71
+ <a name="XML_ERR_LT_REQUIRED" id="XML_ERR_LT_REQUIRED">XML_ERR_LT_REQUIRED</a> = 72 : 72
+ <a name="XML_ERR_GT_REQUIRED" id="XML_ERR_GT_REQUIRED">XML_ERR_GT_REQUIRED</a> = 73 : 73
+ <a name="XML_ERR_LTSLASH_REQUIRED" id="XML_ERR_LTSLASH_REQUIRED">XML_ERR_LTSLASH_REQUIRED</a> = 74 : 74
+ <a name="XML_ERR_EQUAL_REQUIRED" id="XML_ERR_EQUAL_REQUIRED">XML_ERR_EQUAL_REQUIRED</a> = 75 : 75
+ <a name="XML_ERR_TAG_NAME_MISMATCH" id="XML_ERR_TAG_NAME_MISMATCH">XML_ERR_TAG_NAME_MISMATCH</a> = 76 : 76
+ <a name="XML_ERR_TAG_NOT_FINISHED" id="XML_ERR_TAG_NOT_FINISHED">XML_ERR_TAG_NOT_FINISHED</a> = 77 : 77
+ <a name="XML_ERR_STANDALONE_VALUE" id="XML_ERR_STANDALONE_VALUE">XML_ERR_STANDALONE_VALUE</a> = 78 : 78
+ <a name="XML_ERR_ENCODING_NAME" id="XML_ERR_ENCODING_NAME">XML_ERR_ENCODING_NAME</a> = 79 : 79
+ <a name="XML_ERR_HYPHEN_IN_COMMENT" id="XML_ERR_HYPHEN_IN_COMMENT">XML_ERR_HYPHEN_IN_COMMENT</a> = 80 : 80
+ <a name="XML_ERR_INVALID_ENCODING" id="XML_ERR_INVALID_ENCODING">XML_ERR_INVALID_ENCODING</a> = 81 : 81
+ <a name="XML_ERR_EXT_ENTITY_STANDALONE" id="XML_ERR_EXT_ENTITY_STANDALONE">XML_ERR_EXT_ENTITY_STANDALONE</a> = 82 : 82
+ <a name="XML_ERR_CONDSEC_INVALID" id="XML_ERR_CONDSEC_INVALID">XML_ERR_CONDSEC_INVALID</a> = 83 : 83
+ <a name="XML_ERR_VALUE_REQUIRED" id="XML_ERR_VALUE_REQUIRED">XML_ERR_VALUE_REQUIRED</a> = 84 : 84
+ <a name="XML_ERR_NOT_WELL_BALANCED" id="XML_ERR_NOT_WELL_BALANCED">XML_ERR_NOT_WELL_BALANCED</a> = 85 : 85
+ <a name="XML_ERR_EXTRA_CONTENT" id="XML_ERR_EXTRA_CONTENT">XML_ERR_EXTRA_CONTENT</a> = 86 : 86
+ <a name="XML_ERR_ENTITY_CHAR_ERROR" id="XML_ERR_ENTITY_CHAR_ERROR">XML_ERR_ENTITY_CHAR_ERROR</a> = 87 : 87
+ <a name="XML_ERR_ENTITY_PE_INTERNAL" id="XML_ERR_ENTITY_PE_INTERNAL">XML_ERR_ENTITY_PE_INTERNAL</a> = 88 : 88
+ <a name="XML_ERR_ENTITY_LOOP" id="XML_ERR_ENTITY_LOOP">XML_ERR_ENTITY_LOOP</a> = 89 : 89
+ <a name="XML_ERR_ENTITY_BOUNDARY" id="XML_ERR_ENTITY_BOUNDARY">XML_ERR_ENTITY_BOUNDARY</a> = 90 : 90
+ <a name="XML_ERR_INVALID_URI" id="XML_ERR_INVALID_URI">XML_ERR_INVALID_URI</a> = 91 : 91
+ <a name="XML_ERR_URI_FRAGMENT" id="XML_ERR_URI_FRAGMENT">XML_ERR_URI_FRAGMENT</a> = 92 : 92
+ <a name="XML_WAR_CATALOG_PI" id="XML_WAR_CATALOG_PI">XML_WAR_CATALOG_PI</a> = 93 : 93
+ <a name="XML_ERR_NO_DTD" id="XML_ERR_NO_DTD">XML_ERR_NO_DTD</a> = 94 : 94
+ <a name="XML_ERR_CONDSEC_INVALID_KEYWORD" id="XML_ERR_CONDSEC_INVALID_KEYWORD">XML_ERR_CONDSEC_INVALID_KEYWORD</a> = 95 : 95
+ <a name="XML_ERR_VERSION_MISSING" id="XML_ERR_VERSION_MISSING">XML_ERR_VERSION_MISSING</a> = 96 : 96
+ <a name="XML_WAR_UNKNOWN_VERSION" id="XML_WAR_UNKNOWN_VERSION">XML_WAR_UNKNOWN_VERSION</a> = 97 : 97
+ <a name="XML_WAR_LANG_VALUE" id="XML_WAR_LANG_VALUE">XML_WAR_LANG_VALUE</a> = 98 : 98
+ <a name="XML_WAR_NS_URI" id="XML_WAR_NS_URI">XML_WAR_NS_URI</a> = 99 : 99
+ <a name="XML_WAR_NS_URI_RELATIVE" id="XML_WAR_NS_URI_RELATIVE">XML_WAR_NS_URI_RELATIVE</a> = 100 : 100
+ <a name="XML_ERR_MISSING_ENCODING" id="XML_ERR_MISSING_ENCODING">XML_ERR_MISSING_ENCODING</a> = 101 : 101
+ <a name="XML_WAR_SPACE_VALUE" id="XML_WAR_SPACE_VALUE">XML_WAR_SPACE_VALUE</a> = 102 : 102
+ <a name="XML_ERR_NOT_STANDALONE" id="XML_ERR_NOT_STANDALONE">XML_ERR_NOT_STANDALONE</a> = 103 : 103
+ <a name="XML_ERR_ENTITY_PROCESSING" id="XML_ERR_ENTITY_PROCESSING">XML_ERR_ENTITY_PROCESSING</a> = 104 : 104
+ <a name="XML_ERR_NOTATION_PROCESSING" id="XML_ERR_NOTATION_PROCESSING">XML_ERR_NOTATION_PROCESSING</a> = 105 : 105
+ <a name="XML_WAR_NS_COLUMN" id="XML_WAR_NS_COLUMN">XML_WAR_NS_COLUMN</a> = 106 : 106
+ <a name="XML_WAR_ENTITY_REDEFINED" id="XML_WAR_ENTITY_REDEFINED">XML_WAR_ENTITY_REDEFINED</a> = 107 : 107
+ <a name="XML_ERR_UNKNOWN_VERSION" id="XML_ERR_UNKNOWN_VERSION">XML_ERR_UNKNOWN_VERSION</a> = 108 : 108
+ <a name="XML_ERR_VERSION_MISMATCH" id="XML_ERR_VERSION_MISMATCH">XML_ERR_VERSION_MISMATCH</a> = 109 : 109
+ <a name="XML_ERR_NAME_TOO_LONG" id="XML_ERR_NAME_TOO_LONG">XML_ERR_NAME_TOO_LONG</a> = 110 : 110
+ <a name="XML_ERR_USER_STOP" id="XML_ERR_USER_STOP">XML_ERR_USER_STOP</a> = 111 : 111
+ <a name="XML_NS_ERR_XML_NAMESPACE" id="XML_NS_ERR_XML_NAMESPACE">XML_NS_ERR_XML_NAMESPACE</a> = 200
+ <a name="XML_NS_ERR_UNDEFINED_NAMESPACE" id="XML_NS_ERR_UNDEFINED_NAMESPACE">XML_NS_ERR_UNDEFINED_NAMESPACE</a> = 201 : 201
+ <a name="XML_NS_ERR_QNAME" id="XML_NS_ERR_QNAME">XML_NS_ERR_QNAME</a> = 202 : 202
+ <a name="XML_NS_ERR_ATTRIBUTE_REDEFINED" id="XML_NS_ERR_ATTRIBUTE_REDEFINED">XML_NS_ERR_ATTRIBUTE_REDEFINED</a> = 203 : 203
+ <a name="XML_NS_ERR_EMPTY" id="XML_NS_ERR_EMPTY">XML_NS_ERR_EMPTY</a> = 204 : 204
+ <a name="XML_NS_ERR_COLON" id="XML_NS_ERR_COLON">XML_NS_ERR_COLON</a> = 205 : 205
+ <a name="XML_DTD_ATTRIBUTE_DEFAULT" id="XML_DTD_ATTRIBUTE_DEFAULT">XML_DTD_ATTRIBUTE_DEFAULT</a> = 500
+ <a name="XML_DTD_ATTRIBUTE_REDEFINED" id="XML_DTD_ATTRIBUTE_REDEFINED">XML_DTD_ATTRIBUTE_REDEFINED</a> = 501 : 501
+ <a name="XML_DTD_ATTRIBUTE_VALUE" id="XML_DTD_ATTRIBUTE_VALUE">XML_DTD_ATTRIBUTE_VALUE</a> = 502 : 502
+ <a name="XML_DTD_CONTENT_ERROR" id="XML_DTD_CONTENT_ERROR">XML_DTD_CONTENT_ERROR</a> = 503 : 503
+ <a name="XML_DTD_CONTENT_MODEL" id="XML_DTD_CONTENT_MODEL">XML_DTD_CONTENT_MODEL</a> = 504 : 504
+ <a name="XML_DTD_CONTENT_NOT_DETERMINIST" id="XML_DTD_CONTENT_NOT_DETERMINIST">XML_DTD_CONTENT_NOT_DETERMINIST</a> = 505 : 505
+ <a name="XML_DTD_DIFFERENT_PREFIX" id="XML_DTD_DIFFERENT_PREFIX">XML_DTD_DIFFERENT_PREFIX</a> = 506 : 506
+ <a name="XML_DTD_ELEM_DEFAULT_NAMESPACE" id="XML_DTD_ELEM_DEFAULT_NAMESPACE">XML_DTD_ELEM_DEFAULT_NAMESPACE</a> = 507 : 507
+ <a name="XML_DTD_ELEM_NAMESPACE" id="XML_DTD_ELEM_NAMESPACE">XML_DTD_ELEM_NAMESPACE</a> = 508 : 508
+ <a name="XML_DTD_ELEM_REDEFINED" id="XML_DTD_ELEM_REDEFINED">XML_DTD_ELEM_REDEFINED</a> = 509 : 509
+ <a name="XML_DTD_EMPTY_NOTATION" id="XML_DTD_EMPTY_NOTATION">XML_DTD_EMPTY_NOTATION</a> = 510 : 510
+ <a name="XML_DTD_ENTITY_TYPE" id="XML_DTD_ENTITY_TYPE">XML_DTD_ENTITY_TYPE</a> = 511 : 511
+ <a name="XML_DTD_ID_FIXED" id="XML_DTD_ID_FIXED">XML_DTD_ID_FIXED</a> = 512 : 512
+ <a name="XML_DTD_ID_REDEFINED" id="XML_DTD_ID_REDEFINED">XML_DTD_ID_REDEFINED</a> = 513 : 513
+ <a name="XML_DTD_ID_SUBSET" id="XML_DTD_ID_SUBSET">XML_DTD_ID_SUBSET</a> = 514 : 514
+ <a name="XML_DTD_INVALID_CHILD" id="XML_DTD_INVALID_CHILD">XML_DTD_INVALID_CHILD</a> = 515 : 515
+ <a name="XML_DTD_INVALID_DEFAULT" id="XML_DTD_INVALID_DEFAULT">XML_DTD_INVALID_DEFAULT</a> = 516 : 516
+ <a name="XML_DTD_LOAD_ERROR" id="XML_DTD_LOAD_ERROR">XML_DTD_LOAD_ERROR</a> = 517 : 517
+ <a name="XML_DTD_MISSING_ATTRIBUTE" id="XML_DTD_MISSING_ATTRIBUTE">XML_DTD_MISSING_ATTRIBUTE</a> = 518 : 518
+ <a name="XML_DTD_MIXED_CORRUPT" id="XML_DTD_MIXED_CORRUPT">XML_DTD_MIXED_CORRUPT</a> = 519 : 519
+ <a name="XML_DTD_MULTIPLE_ID" id="XML_DTD_MULTIPLE_ID">XML_DTD_MULTIPLE_ID</a> = 520 : 520
+ <a name="XML_DTD_NO_DOC" id="XML_DTD_NO_DOC">XML_DTD_NO_DOC</a> = 521 : 521
+ <a name="XML_DTD_NO_DTD" id="XML_DTD_NO_DTD">XML_DTD_NO_DTD</a> = 522 : 522
+ <a name="XML_DTD_NO_ELEM_NAME" id="XML_DTD_NO_ELEM_NAME">XML_DTD_NO_ELEM_NAME</a> = 523 : 523
+ <a name="XML_DTD_NO_PREFIX" id="XML_DTD_NO_PREFIX">XML_DTD_NO_PREFIX</a> = 524 : 524
+ <a name="XML_DTD_NO_ROOT" id="XML_DTD_NO_ROOT">XML_DTD_NO_ROOT</a> = 525 : 525
+ <a name="XML_DTD_NOTATION_REDEFINED" id="XML_DTD_NOTATION_REDEFINED">XML_DTD_NOTATION_REDEFINED</a> = 526 : 526
+ <a name="XML_DTD_NOTATION_VALUE" id="XML_DTD_NOTATION_VALUE">XML_DTD_NOTATION_VALUE</a> = 527 : 527
+ <a name="XML_DTD_NOT_EMPTY" id="XML_DTD_NOT_EMPTY">XML_DTD_NOT_EMPTY</a> = 528 : 528
+ <a name="XML_DTD_NOT_PCDATA" id="XML_DTD_NOT_PCDATA">XML_DTD_NOT_PCDATA</a> = 529 : 529
+ <a name="XML_DTD_NOT_STANDALONE" id="XML_DTD_NOT_STANDALONE">XML_DTD_NOT_STANDALONE</a> = 530 : 530
+ <a name="XML_DTD_ROOT_NAME" id="XML_DTD_ROOT_NAME">XML_DTD_ROOT_NAME</a> = 531 : 531
+ <a name="XML_DTD_STANDALONE_WHITE_SPACE" id="XML_DTD_STANDALONE_WHITE_SPACE">XML_DTD_STANDALONE_WHITE_SPACE</a> = 532 : 532
+ <a name="XML_DTD_UNKNOWN_ATTRIBUTE" id="XML_DTD_UNKNOWN_ATTRIBUTE">XML_DTD_UNKNOWN_ATTRIBUTE</a> = 533 : 533
+ <a name="XML_DTD_UNKNOWN_ELEM" id="XML_DTD_UNKNOWN_ELEM">XML_DTD_UNKNOWN_ELEM</a> = 534 : 534
+ <a name="XML_DTD_UNKNOWN_ENTITY" id="XML_DTD_UNKNOWN_ENTITY">XML_DTD_UNKNOWN_ENTITY</a> = 535 : 535
+ <a name="XML_DTD_UNKNOWN_ID" id="XML_DTD_UNKNOWN_ID">XML_DTD_UNKNOWN_ID</a> = 536 : 536
+ <a name="XML_DTD_UNKNOWN_NOTATION" id="XML_DTD_UNKNOWN_NOTATION">XML_DTD_UNKNOWN_NOTATION</a> = 537 : 537
+ <a name="XML_DTD_STANDALONE_DEFAULTED" id="XML_DTD_STANDALONE_DEFAULTED">XML_DTD_STANDALONE_DEFAULTED</a> = 538 : 538
+ <a name="XML_DTD_XMLID_VALUE" id="XML_DTD_XMLID_VALUE">XML_DTD_XMLID_VALUE</a> = 539 : 539
+ <a name="XML_DTD_XMLID_TYPE" id="XML_DTD_XMLID_TYPE">XML_DTD_XMLID_TYPE</a> = 540 : 540
+ <a name="XML_DTD_DUP_TOKEN" id="XML_DTD_DUP_TOKEN">XML_DTD_DUP_TOKEN</a> = 541 : 541
+ <a name="XML_HTML_STRUCURE_ERROR" id="XML_HTML_STRUCURE_ERROR">XML_HTML_STRUCURE_ERROR</a> = 800
+ <a name="XML_HTML_UNKNOWN_TAG" id="XML_HTML_UNKNOWN_TAG">XML_HTML_UNKNOWN_TAG</a> = 801 : 801
+ <a name="XML_RNGP_ANYNAME_ATTR_ANCESTOR" id="XML_RNGP_ANYNAME_ATTR_ANCESTOR">XML_RNGP_ANYNAME_ATTR_ANCESTOR</a> = 1000
+ <a name="XML_RNGP_ATTR_CONFLICT" id="XML_RNGP_ATTR_CONFLICT">XML_RNGP_ATTR_CONFLICT</a> = 1001 : 1001
+ <a name="XML_RNGP_ATTRIBUTE_CHILDREN" id="XML_RNGP_ATTRIBUTE_CHILDREN">XML_RNGP_ATTRIBUTE_CHILDREN</a> = 1002 : 1002
+ <a name="XML_RNGP_ATTRIBUTE_CONTENT" id="XML_RNGP_ATTRIBUTE_CONTENT">XML_RNGP_ATTRIBUTE_CONTENT</a> = 1003 : 1003
+ <a name="XML_RNGP_ATTRIBUTE_EMPTY" id="XML_RNGP_ATTRIBUTE_EMPTY">XML_RNGP_ATTRIBUTE_EMPTY</a> = 1004 : 1004
+ <a name="XML_RNGP_ATTRIBUTE_NOOP" id="XML_RNGP_ATTRIBUTE_NOOP">XML_RNGP_ATTRIBUTE_NOOP</a> = 1005 : 1005
+ <a name="XML_RNGP_CHOICE_CONTENT" id="XML_RNGP_CHOICE_CONTENT">XML_RNGP_CHOICE_CONTENT</a> = 1006 : 1006
+ <a name="XML_RNGP_CHOICE_EMPTY" id="XML_RNGP_CHOICE_EMPTY">XML_RNGP_CHOICE_EMPTY</a> = 1007 : 1007
+ <a name="XML_RNGP_CREATE_FAILURE" id="XML_RNGP_CREATE_FAILURE">XML_RNGP_CREATE_FAILURE</a> = 1008 : 1008
+ <a name="XML_RNGP_DATA_CONTENT" id="XML_RNGP_DATA_CONTENT">XML_RNGP_DATA_CONTENT</a> = 1009 : 1009
+ <a name="XML_RNGP_DEF_CHOICE_AND_INTERLEAVE" id="XML_RNGP_DEF_CHOICE_AND_INTERLEAVE">XML_RNGP_DEF_CHOICE_AND_INTERLEAVE</a> = 1010 : 1010
+ <a name="XML_RNGP_DEFINE_CREATE_FAILED" id="XML_RNGP_DEFINE_CREATE_FAILED">XML_RNGP_DEFINE_CREATE_FAILED</a> = 1011 : 1011
+ <a name="XML_RNGP_DEFINE_EMPTY" id="XML_RNGP_DEFINE_EMPTY">XML_RNGP_DEFINE_EMPTY</a> = 1012 : 1012
+ <a name="XML_RNGP_DEFINE_MISSING" id="XML_RNGP_DEFINE_MISSING">XML_RNGP_DEFINE_MISSING</a> = 1013 : 1013
+ <a name="XML_RNGP_DEFINE_NAME_MISSING" id="XML_RNGP_DEFINE_NAME_MISSING">XML_RNGP_DEFINE_NAME_MISSING</a> = 1014 : 1014
+ <a name="XML_RNGP_ELEM_CONTENT_EMPTY" id="XML_RNGP_ELEM_CONTENT_EMPTY">XML_RNGP_ELEM_CONTENT_EMPTY</a> = 1015 : 1015
+ <a name="XML_RNGP_ELEM_CONTENT_ERROR" id="XML_RNGP_ELEM_CONTENT_ERROR">XML_RNGP_ELEM_CONTENT_ERROR</a> = 1016 : 1016
+ <a name="XML_RNGP_ELEMENT_EMPTY" id="XML_RNGP_ELEMENT_EMPTY">XML_RNGP_ELEMENT_EMPTY</a> = 1017 : 1017
+ <a name="XML_RNGP_ELEMENT_CONTENT" id="XML_RNGP_ELEMENT_CONTENT">XML_RNGP_ELEMENT_CONTENT</a> = 1018 : 1018
+ <a name="XML_RNGP_ELEMENT_NAME" id="XML_RNGP_ELEMENT_NAME">XML_RNGP_ELEMENT_NAME</a> = 1019 : 1019
+ <a name="XML_RNGP_ELEMENT_NO_CONTENT" id="XML_RNGP_ELEMENT_NO_CONTENT">XML_RNGP_ELEMENT_NO_CONTENT</a> = 1020 : 1020
+ <a name="XML_RNGP_ELEM_TEXT_CONFLICT" id="XML_RNGP_ELEM_TEXT_CONFLICT">XML_RNGP_ELEM_TEXT_CONFLICT</a> = 1021 : 1021
+ <a name="XML_RNGP_EMPTY" id="XML_RNGP_EMPTY">XML_RNGP_EMPTY</a> = 1022 : 1022
+ <a name="XML_RNGP_EMPTY_CONSTRUCT" id="XML_RNGP_EMPTY_CONSTRUCT">XML_RNGP_EMPTY_CONSTRUCT</a> = 1023 : 1023
+ <a name="XML_RNGP_EMPTY_CONTENT" id="XML_RNGP_EMPTY_CONTENT">XML_RNGP_EMPTY_CONTENT</a> = 1024 : 1024
+ <a name="XML_RNGP_EMPTY_NOT_EMPTY" id="XML_RNGP_EMPTY_NOT_EMPTY">XML_RNGP_EMPTY_NOT_EMPTY</a> = 1025 : 1025
+ <a name="XML_RNGP_ERROR_TYPE_LIB" id="XML_RNGP_ERROR_TYPE_LIB">XML_RNGP_ERROR_TYPE_LIB</a> = 1026 : 1026
+ <a name="XML_RNGP_EXCEPT_EMPTY" id="XML_RNGP_EXCEPT_EMPTY">XML_RNGP_EXCEPT_EMPTY</a> = 1027 : 1027
+ <a name="XML_RNGP_EXCEPT_MISSING" id="XML_RNGP_EXCEPT_MISSING">XML_RNGP_EXCEPT_MISSING</a> = 1028 : 1028
+ <a name="XML_RNGP_EXCEPT_MULTIPLE" id="XML_RNGP_EXCEPT_MULTIPLE">XML_RNGP_EXCEPT_MULTIPLE</a> = 1029 : 1029
+ <a name="XML_RNGP_EXCEPT_NO_CONTENT" id="XML_RNGP_EXCEPT_NO_CONTENT">XML_RNGP_EXCEPT_NO_CONTENT</a> = 1030 : 1030
+ <a name="XML_RNGP_EXTERNALREF_EMTPY" id="XML_RNGP_EXTERNALREF_EMTPY">XML_RNGP_EXTERNALREF_EMTPY</a> = 1031 : 1031
+ <a name="XML_RNGP_EXTERNAL_REF_FAILURE" id="XML_RNGP_EXTERNAL_REF_FAILURE">XML_RNGP_EXTERNAL_REF_FAILURE</a> = 1032 : 1032
+ <a name="XML_RNGP_EXTERNALREF_RECURSE" id="XML_RNGP_EXTERNALREF_RECURSE">XML_RNGP_EXTERNALREF_RECURSE</a> = 1033 : 1033
+ <a name="XML_RNGP_FORBIDDEN_ATTRIBUTE" id="XML_RNGP_FORBIDDEN_ATTRIBUTE">XML_RNGP_FORBIDDEN_ATTRIBUTE</a> = 1034 : 1034
+ <a name="XML_RNGP_FOREIGN_ELEMENT" id="XML_RNGP_FOREIGN_ELEMENT">XML_RNGP_FOREIGN_ELEMENT</a> = 1035 : 1035
+ <a name="XML_RNGP_GRAMMAR_CONTENT" id="XML_RNGP_GRAMMAR_CONTENT">XML_RNGP_GRAMMAR_CONTENT</a> = 1036 : 1036
+ <a name="XML_RNGP_GRAMMAR_EMPTY" id="XML_RNGP_GRAMMAR_EMPTY">XML_RNGP_GRAMMAR_EMPTY</a> = 1037 : 1037
+ <a name="XML_RNGP_GRAMMAR_MISSING" id="XML_RNGP_GRAMMAR_MISSING">XML_RNGP_GRAMMAR_MISSING</a> = 1038 : 1038
+ <a name="XML_RNGP_GRAMMAR_NO_START" id="XML_RNGP_GRAMMAR_NO_START">XML_RNGP_GRAMMAR_NO_START</a> = 1039 : 1039
+ <a name="XML_RNGP_GROUP_ATTR_CONFLICT" id="XML_RNGP_GROUP_ATTR_CONFLICT">XML_RNGP_GROUP_ATTR_CONFLICT</a> = 1040 : 1040
+ <a name="XML_RNGP_HREF_ERROR" id="XML_RNGP_HREF_ERROR">XML_RNGP_HREF_ERROR</a> = 1041 : 1041
+ <a name="XML_RNGP_INCLUDE_EMPTY" id="XML_RNGP_INCLUDE_EMPTY">XML_RNGP_INCLUDE_EMPTY</a> = 1042 : 1042
+ <a name="XML_RNGP_INCLUDE_FAILURE" id="XML_RNGP_INCLUDE_FAILURE">XML_RNGP_INCLUDE_FAILURE</a> = 1043 : 1043
+ <a name="XML_RNGP_INCLUDE_RECURSE" id="XML_RNGP_INCLUDE_RECURSE">XML_RNGP_INCLUDE_RECURSE</a> = 1044 : 1044
+ <a name="XML_RNGP_INTERLEAVE_ADD" id="XML_RNGP_INTERLEAVE_ADD">XML_RNGP_INTERLEAVE_ADD</a> = 1045 : 1045
+ <a name="XML_RNGP_INTERLEAVE_CREATE_FAILED" id="XML_RNGP_INTERLEAVE_CREATE_FAILED">XML_RNGP_INTERLEAVE_CREATE_FAILED</a> = 1046 : 1046
+ <a name="XML_RNGP_INTERLEAVE_EMPTY" id="XML_RNGP_INTERLEAVE_EMPTY">XML_RNGP_INTERLEAVE_EMPTY</a> = 1047 : 1047
+ <a name="XML_RNGP_INTERLEAVE_NO_CONTENT" id="XML_RNGP_INTERLEAVE_NO_CONTENT">XML_RNGP_INTERLEAVE_NO_CONTENT</a> = 1048 : 1048
+ <a name="XML_RNGP_INVALID_DEFINE_NAME" id="XML_RNGP_INVALID_DEFINE_NAME">XML_RNGP_INVALID_DEFINE_NAME</a> = 1049 : 1049
+ <a name="XML_RNGP_INVALID_URI" id="XML_RNGP_INVALID_URI">XML_RNGP_INVALID_URI</a> = 1050 : 1050
+ <a name="XML_RNGP_INVALID_VALUE" id="XML_RNGP_INVALID_VALUE">XML_RNGP_INVALID_VALUE</a> = 1051 : 1051
+ <a name="XML_RNGP_MISSING_HREF" id="XML_RNGP_MISSING_HREF">XML_RNGP_MISSING_HREF</a> = 1052 : 1052
+ <a name="XML_RNGP_NAME_MISSING" id="XML_RNGP_NAME_MISSING">XML_RNGP_NAME_MISSING</a> = 1053 : 1053
+ <a name="XML_RNGP_NEED_COMBINE" id="XML_RNGP_NEED_COMBINE">XML_RNGP_NEED_COMBINE</a> = 1054 : 1054
+ <a name="XML_RNGP_NOTALLOWED_NOT_EMPTY" id="XML_RNGP_NOTALLOWED_NOT_EMPTY">XML_RNGP_NOTALLOWED_NOT_EMPTY</a> = 1055 : 1055
+ <a name="XML_RNGP_NSNAME_ATTR_ANCESTOR" id="XML_RNGP_NSNAME_ATTR_ANCESTOR">XML_RNGP_NSNAME_ATTR_ANCESTOR</a> = 1056 : 1056
+ <a name="XML_RNGP_NSNAME_NO_NS" id="XML_RNGP_NSNAME_NO_NS">XML_RNGP_NSNAME_NO_NS</a> = 1057 : 1057
+ <a name="XML_RNGP_PARAM_FORBIDDEN" id="XML_RNGP_PARAM_FORBIDDEN">XML_RNGP_PARAM_FORBIDDEN</a> = 1058 : 1058
+ <a name="XML_RNGP_PARAM_NAME_MISSING" id="XML_RNGP_PARAM_NAME_MISSING">XML_RNGP_PARAM_NAME_MISSING</a> = 1059 : 1059
+ <a name="XML_RNGP_PARENTREF_CREATE_FAILED" id="XML_RNGP_PARENTREF_CREATE_FAILED">XML_RNGP_PARENTREF_CREATE_FAILED</a> = 1060 : 1060
+ <a name="XML_RNGP_PARENTREF_NAME_INVALID" id="XML_RNGP_PARENTREF_NAME_INVALID">XML_RNGP_PARENTREF_NAME_INVALID</a> = 1061 : 1061
+ <a name="XML_RNGP_PARENTREF_NO_NAME" id="XML_RNGP_PARENTREF_NO_NAME">XML_RNGP_PARENTREF_NO_NAME</a> = 1062 : 1062
+ <a name="XML_RNGP_PARENTREF_NO_PARENT" id="XML_RNGP_PARENTREF_NO_PARENT">XML_RNGP_PARENTREF_NO_PARENT</a> = 1063 : 1063
+ <a name="XML_RNGP_PARENTREF_NOT_EMPTY" id="XML_RNGP_PARENTREF_NOT_EMPTY">XML_RNGP_PARENTREF_NOT_EMPTY</a> = 1064 : 1064
+ <a name="XML_RNGP_PARSE_ERROR" id="XML_RNGP_PARSE_ERROR">XML_RNGP_PARSE_ERROR</a> = 1065 : 1065
+ <a name="XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME" id="XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME</a> = 1066 : 1066
+ <a name="XML_RNGP_PAT_ATTR_ATTR" id="XML_RNGP_PAT_ATTR_ATTR">XML_RNGP_PAT_ATTR_ATTR</a> = 1067 : 1067
+ <a name="XML_RNGP_PAT_ATTR_ELEM" id="XML_RNGP_PAT_ATTR_ELEM">XML_RNGP_PAT_ATTR_ELEM</a> = 1068 : 1068
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ATTR" id="XML_RNGP_PAT_DATA_EXCEPT_ATTR">XML_RNGP_PAT_DATA_EXCEPT_ATTR</a> = 1069 : 1069
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ELEM" id="XML_RNGP_PAT_DATA_EXCEPT_ELEM">XML_RNGP_PAT_DATA_EXCEPT_ELEM</a> = 1070 : 1070
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_EMPTY" id="XML_RNGP_PAT_DATA_EXCEPT_EMPTY">XML_RNGP_PAT_DATA_EXCEPT_EMPTY</a> = 1071 : 1071
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_GROUP" id="XML_RNGP_PAT_DATA_EXCEPT_GROUP">XML_RNGP_PAT_DATA_EXCEPT_GROUP</a> = 1072 : 1072
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE" id="XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE">XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE</a> = 1073 : 1073
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_LIST" id="XML_RNGP_PAT_DATA_EXCEPT_LIST">XML_RNGP_PAT_DATA_EXCEPT_LIST</a> = 1074 : 1074
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_ONEMORE" id="XML_RNGP_PAT_DATA_EXCEPT_ONEMORE">XML_RNGP_PAT_DATA_EXCEPT_ONEMORE</a> = 1075 : 1075
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_REF" id="XML_RNGP_PAT_DATA_EXCEPT_REF">XML_RNGP_PAT_DATA_EXCEPT_REF</a> = 1076 : 1076
+ <a name="XML_RNGP_PAT_DATA_EXCEPT_TEXT" id="XML_RNGP_PAT_DATA_EXCEPT_TEXT">XML_RNGP_PAT_DATA_EXCEPT_TEXT</a> = 1077 : 1077
+ <a name="XML_RNGP_PAT_LIST_ATTR" id="XML_RNGP_PAT_LIST_ATTR">XML_RNGP_PAT_LIST_ATTR</a> = 1078 : 1078
+ <a name="XML_RNGP_PAT_LIST_ELEM" id="XML_RNGP_PAT_LIST_ELEM">XML_RNGP_PAT_LIST_ELEM</a> = 1079 : 1079
+ <a name="XML_RNGP_PAT_LIST_INTERLEAVE" id="XML_RNGP_PAT_LIST_INTERLEAVE">XML_RNGP_PAT_LIST_INTERLEAVE</a> = 1080 : 1080
+ <a name="XML_RNGP_PAT_LIST_LIST" id="XML_RNGP_PAT_LIST_LIST">XML_RNGP_PAT_LIST_LIST</a> = 1081 : 1081
+ <a name="XML_RNGP_PAT_LIST_REF" id="XML_RNGP_PAT_LIST_REF">XML_RNGP_PAT_LIST_REF</a> = 1082 : 1082
+ <a name="XML_RNGP_PAT_LIST_TEXT" id="XML_RNGP_PAT_LIST_TEXT">XML_RNGP_PAT_LIST_TEXT</a> = 1083 : 1083
+ <a name="XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME" id="XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME">XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME</a> = 1084 : 1084
+ <a name="XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME" id="XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME">XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME</a> = 1085 : 1085
+ <a name="XML_RNGP_PAT_ONEMORE_GROUP_ATTR" id="XML_RNGP_PAT_ONEMORE_GROUP_ATTR">XML_RNGP_PAT_ONEMORE_GROUP_ATTR</a> = 1086 : 1086
+ <a name="XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR" id="XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR">XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR</a> = 1087 : 1087
+ <a name="XML_RNGP_PAT_START_ATTR" id="XML_RNGP_PAT_START_ATTR">XML_RNGP_PAT_START_ATTR</a> = 1088 : 1088
+ <a name="XML_RNGP_PAT_START_DATA" id="XML_RNGP_PAT_START_DATA">XML_RNGP_PAT_START_DATA</a> = 1089 : 1089
+ <a name="XML_RNGP_PAT_START_EMPTY" id="XML_RNGP_PAT_START_EMPTY">XML_RNGP_PAT_START_EMPTY</a> = 1090 : 1090
+ <a name="XML_RNGP_PAT_START_GROUP" id="XML_RNGP_PAT_START_GROUP">XML_RNGP_PAT_START_GROUP</a> = 1091 : 1091
+ <a name="XML_RNGP_PAT_START_INTERLEAVE" id="XML_RNGP_PAT_START_INTERLEAVE">XML_RNGP_PAT_START_INTERLEAVE</a> = 1092 : 1092
+ <a name="XML_RNGP_PAT_START_LIST" id="XML_RNGP_PAT_START_LIST">XML_RNGP_PAT_START_LIST</a> = 1093 : 1093
+ <a name="XML_RNGP_PAT_START_ONEMORE" id="XML_RNGP_PAT_START_ONEMORE">XML_RNGP_PAT_START_ONEMORE</a> = 1094 : 1094
+ <a name="XML_RNGP_PAT_START_TEXT" id="XML_RNGP_PAT_START_TEXT">XML_RNGP_PAT_START_TEXT</a> = 1095 : 1095
+ <a name="XML_RNGP_PAT_START_VALUE" id="XML_RNGP_PAT_START_VALUE">XML_RNGP_PAT_START_VALUE</a> = 1096 : 1096
+ <a name="XML_RNGP_PREFIX_UNDEFINED" id="XML_RNGP_PREFIX_UNDEFINED">XML_RNGP_PREFIX_UNDEFINED</a> = 1097 : 1097
+ <a name="XML_RNGP_REF_CREATE_FAILED" id="XML_RNGP_REF_CREATE_FAILED">XML_RNGP_REF_CREATE_FAILED</a> = 1098 : 1098
+ <a name="XML_RNGP_REF_CYCLE" id="XML_RNGP_REF_CYCLE">XML_RNGP_REF_CYCLE</a> = 1099 : 1099
+ <a name="XML_RNGP_REF_NAME_INVALID" id="XML_RNGP_REF_NAME_INVALID">XML_RNGP_REF_NAME_INVALID</a> = 1100 : 1100
+ <a name="XML_RNGP_REF_NO_DEF" id="XML_RNGP_REF_NO_DEF">XML_RNGP_REF_NO_DEF</a> = 1101 : 1101
+ <a name="XML_RNGP_REF_NO_NAME" id="XML_RNGP_REF_NO_NAME">XML_RNGP_REF_NO_NAME</a> = 1102 : 1102
+ <a name="XML_RNGP_REF_NOT_EMPTY" id="XML_RNGP_REF_NOT_EMPTY">XML_RNGP_REF_NOT_EMPTY</a> = 1103 : 1103
+ <a name="XML_RNGP_START_CHOICE_AND_INTERLEAVE" id="XML_RNGP_START_CHOICE_AND_INTERLEAVE">XML_RNGP_START_CHOICE_AND_INTERLEAVE</a> = 1104 : 1104
+ <a name="XML_RNGP_START_CONTENT" id="XML_RNGP_START_CONTENT">XML_RNGP_START_CONTENT</a> = 1105 : 1105
+ <a name="XML_RNGP_START_EMPTY" id="XML_RNGP_START_EMPTY">XML_RNGP_START_EMPTY</a> = 1106 : 1106
+ <a name="XML_RNGP_START_MISSING" id="XML_RNGP_START_MISSING">XML_RNGP_START_MISSING</a> = 1107 : 1107
+ <a name="XML_RNGP_TEXT_EXPECTED" id="XML_RNGP_TEXT_EXPECTED">XML_RNGP_TEXT_EXPECTED</a> = 1108 : 1108
+ <a name="XML_RNGP_TEXT_HAS_CHILD" id="XML_RNGP_TEXT_HAS_CHILD">XML_RNGP_TEXT_HAS_CHILD</a> = 1109 : 1109
+ <a name="XML_RNGP_TYPE_MISSING" id="XML_RNGP_TYPE_MISSING">XML_RNGP_TYPE_MISSING</a> = 1110 : 1110
+ <a name="XML_RNGP_TYPE_NOT_FOUND" id="XML_RNGP_TYPE_NOT_FOUND">XML_RNGP_TYPE_NOT_FOUND</a> = 1111 : 1111
+ <a name="XML_RNGP_TYPE_VALUE" id="XML_RNGP_TYPE_VALUE">XML_RNGP_TYPE_VALUE</a> = 1112 : 1112
+ <a name="XML_RNGP_UNKNOWN_ATTRIBUTE" id="XML_RNGP_UNKNOWN_ATTRIBUTE">XML_RNGP_UNKNOWN_ATTRIBUTE</a> = 1113 : 1113
+ <a name="XML_RNGP_UNKNOWN_COMBINE" id="XML_RNGP_UNKNOWN_COMBINE">XML_RNGP_UNKNOWN_COMBINE</a> = 1114 : 1114
+ <a name="XML_RNGP_UNKNOWN_CONSTRUCT" id="XML_RNGP_UNKNOWN_CONSTRUCT">XML_RNGP_UNKNOWN_CONSTRUCT</a> = 1115 : 1115
+ <a name="XML_RNGP_UNKNOWN_TYPE_LIB" id="XML_RNGP_UNKNOWN_TYPE_LIB">XML_RNGP_UNKNOWN_TYPE_LIB</a> = 1116 : 1116
+ <a name="XML_RNGP_URI_FRAGMENT" id="XML_RNGP_URI_FRAGMENT">XML_RNGP_URI_FRAGMENT</a> = 1117 : 1117
+ <a name="XML_RNGP_URI_NOT_ABSOLUTE" id="XML_RNGP_URI_NOT_ABSOLUTE">XML_RNGP_URI_NOT_ABSOLUTE</a> = 1118 : 1118
+ <a name="XML_RNGP_VALUE_EMPTY" id="XML_RNGP_VALUE_EMPTY">XML_RNGP_VALUE_EMPTY</a> = 1119 : 1119
+ <a name="XML_RNGP_VALUE_NO_CONTENT" id="XML_RNGP_VALUE_NO_CONTENT">XML_RNGP_VALUE_NO_CONTENT</a> = 1120 : 1120
+ <a name="XML_RNGP_XMLNS_NAME" id="XML_RNGP_XMLNS_NAME">XML_RNGP_XMLNS_NAME</a> = 1121 : 1121
+ <a name="XML_RNGP_XML_NS" id="XML_RNGP_XML_NS">XML_RNGP_XML_NS</a> = 1122 : 1122
+ <a name="XML_XPATH_EXPRESSION_OK" id="XML_XPATH_EXPRESSION_OK">XML_XPATH_EXPRESSION_OK</a> = 1200
+ <a name="XML_XPATH_NUMBER_ERROR" id="XML_XPATH_NUMBER_ERROR">XML_XPATH_NUMBER_ERROR</a> = 1201 : 1201
+ <a name="XML_XPATH_UNFINISHED_LITERAL_ERROR" id="XML_XPATH_UNFINISHED_LITERAL_ERROR">XML_XPATH_UNFINISHED_LITERAL_ERROR</a> = 1202 : 1202
+ <a name="XML_XPATH_START_LITERAL_ERROR" id="XML_XPATH_START_LITERAL_ERROR">XML_XPATH_START_LITERAL_ERROR</a> = 1203 : 1203
+ <a name="XML_XPATH_VARIABLE_REF_ERROR" id="XML_XPATH_VARIABLE_REF_ERROR">XML_XPATH_VARIABLE_REF_ERROR</a> = 1204 : 1204
+ <a name="XML_XPATH_UNDEF_VARIABLE_ERROR" id="XML_XPATH_UNDEF_VARIABLE_ERROR">XML_XPATH_UNDEF_VARIABLE_ERROR</a> = 1205 : 1205
+ <a name="XML_XPATH_INVALID_PREDICATE_ERROR" id="XML_XPATH_INVALID_PREDICATE_ERROR">XML_XPATH_INVALID_PREDICATE_ERROR</a> = 1206 : 1206
+ <a name="XML_XPATH_EXPR_ERROR" id="XML_XPATH_EXPR_ERROR">XML_XPATH_EXPR_ERROR</a> = 1207 : 1207
+ <a name="XML_XPATH_UNCLOSED_ERROR" id="XML_XPATH_UNCLOSED_ERROR">XML_XPATH_UNCLOSED_ERROR</a> = 1208 : 1208
+ <a name="XML_XPATH_UNKNOWN_FUNC_ERROR" id="XML_XPATH_UNKNOWN_FUNC_ERROR">XML_XPATH_UNKNOWN_FUNC_ERROR</a> = 1209 : 1209
+ <a name="XML_XPATH_INVALID_OPERAND" id="XML_XPATH_INVALID_OPERAND">XML_XPATH_INVALID_OPERAND</a> = 1210 : 1210
+ <a name="XML_XPATH_INVALID_TYPE" id="XML_XPATH_INVALID_TYPE">XML_XPATH_INVALID_TYPE</a> = 1211 : 1211
+ <a name="XML_XPATH_INVALID_ARITY" id="XML_XPATH_INVALID_ARITY">XML_XPATH_INVALID_ARITY</a> = 1212 : 1212
+ <a name="XML_XPATH_INVALID_CTXT_SIZE" id="XML_XPATH_INVALID_CTXT_SIZE">XML_XPATH_INVALID_CTXT_SIZE</a> = 1213 : 1213
+ <a name="XML_XPATH_INVALID_CTXT_POSITION" id="XML_XPATH_INVALID_CTXT_POSITION">XML_XPATH_INVALID_CTXT_POSITION</a> = 1214 : 1214
+ <a name="XML_XPATH_MEMORY_ERROR" id="XML_XPATH_MEMORY_ERROR">XML_XPATH_MEMORY_ERROR</a> = 1215 : 1215
+ <a name="XML_XPTR_SYNTAX_ERROR" id="XML_XPTR_SYNTAX_ERROR">XML_XPTR_SYNTAX_ERROR</a> = 1216 : 1216
+ <a name="XML_XPTR_RESOURCE_ERROR" id="XML_XPTR_RESOURCE_ERROR">XML_XPTR_RESOURCE_ERROR</a> = 1217 : 1217
+ <a name="XML_XPTR_SUB_RESOURCE_ERROR" id="XML_XPTR_SUB_RESOURCE_ERROR">XML_XPTR_SUB_RESOURCE_ERROR</a> = 1218 : 1218
+ <a name="XML_XPATH_UNDEF_PREFIX_ERROR" id="XML_XPATH_UNDEF_PREFIX_ERROR">XML_XPATH_UNDEF_PREFIX_ERROR</a> = 1219 : 1219
+ <a name="XML_XPATH_ENCODING_ERROR" id="XML_XPATH_ENCODING_ERROR">XML_XPATH_ENCODING_ERROR</a> = 1220 : 1220
+ <a name="XML_XPATH_INVALID_CHAR_ERROR" id="XML_XPATH_INVALID_CHAR_ERROR">XML_XPATH_INVALID_CHAR_ERROR</a> = 1221 : 1221
+ <a name="XML_TREE_INVALID_HEX" id="XML_TREE_INVALID_HEX">XML_TREE_INVALID_HEX</a> = 1300
+ <a name="XML_TREE_INVALID_DEC" id="XML_TREE_INVALID_DEC">XML_TREE_INVALID_DEC</a> = 1301 : 1301
+ <a name="XML_TREE_UNTERMINATED_ENTITY" id="XML_TREE_UNTERMINATED_ENTITY">XML_TREE_UNTERMINATED_ENTITY</a> = 1302 : 1302
+ <a name="XML_TREE_NOT_UTF8" id="XML_TREE_NOT_UTF8">XML_TREE_NOT_UTF8</a> = 1303 : 1303
+ <a name="XML_SAVE_NOT_UTF8" id="XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a> = 1400
+ <a name="XML_SAVE_CHAR_INVALID" id="XML_SAVE_CHAR_INVALID">XML_SAVE_CHAR_INVALID</a> = 1401 : 1401
+ <a name="XML_SAVE_NO_DOCTYPE" id="XML_SAVE_NO_DOCTYPE">XML_SAVE_NO_DOCTYPE</a> = 1402 : 1402
+ <a name="XML_SAVE_UNKNOWN_ENCODING" id="XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a> = 1403 : 1403
+ <a name="XML_REGEXP_COMPILE_ERROR" id="XML_REGEXP_COMPILE_ERROR">XML_REGEXP_COMPILE_ERROR</a> = 1450
+ <a name="XML_IO_UNKNOWN" id="XML_IO_UNKNOWN">XML_IO_UNKNOWN</a> = 1500
+ <a name="XML_IO_EACCES" id="XML_IO_EACCES">XML_IO_EACCES</a> = 1501 : 1501
+ <a name="XML_IO_EAGAIN" id="XML_IO_EAGAIN">XML_IO_EAGAIN</a> = 1502 : 1502
+ <a name="XML_IO_EBADF" id="XML_IO_EBADF">XML_IO_EBADF</a> = 1503 : 1503
+ <a name="XML_IO_EBADMSG" id="XML_IO_EBADMSG">XML_IO_EBADMSG</a> = 1504 : 1504
+ <a name="XML_IO_EBUSY" id="XML_IO_EBUSY">XML_IO_EBUSY</a> = 1505 : 1505
+ <a name="XML_IO_ECANCELED" id="XML_IO_ECANCELED">XML_IO_ECANCELED</a> = 1506 : 1506
+ <a name="XML_IO_ECHILD" id="XML_IO_ECHILD">XML_IO_ECHILD</a> = 1507 : 1507
+ <a name="XML_IO_EDEADLK" id="XML_IO_EDEADLK">XML_IO_EDEADLK</a> = 1508 : 1508
+ <a name="XML_IO_EDOM" id="XML_IO_EDOM">XML_IO_EDOM</a> = 1509 : 1509
+ <a name="XML_IO_EEXIST" id="XML_IO_EEXIST">XML_IO_EEXIST</a> = 1510 : 1510
+ <a name="XML_IO_EFAULT" id="XML_IO_EFAULT">XML_IO_EFAULT</a> = 1511 : 1511
+ <a name="XML_IO_EFBIG" id="XML_IO_EFBIG">XML_IO_EFBIG</a> = 1512 : 1512
+ <a name="XML_IO_EINPROGRESS" id="XML_IO_EINPROGRESS">XML_IO_EINPROGRESS</a> = 1513 : 1513
+ <a name="XML_IO_EINTR" id="XML_IO_EINTR">XML_IO_EINTR</a> = 1514 : 1514
+ <a name="XML_IO_EINVAL" id="XML_IO_EINVAL">XML_IO_EINVAL</a> = 1515 : 1515
+ <a name="XML_IO_EIO" id="XML_IO_EIO">XML_IO_EIO</a> = 1516 : 1516
+ <a name="XML_IO_EISDIR" id="XML_IO_EISDIR">XML_IO_EISDIR</a> = 1517 : 1517
+ <a name="XML_IO_EMFILE" id="XML_IO_EMFILE">XML_IO_EMFILE</a> = 1518 : 1518
+ <a name="XML_IO_EMLINK" id="XML_IO_EMLINK">XML_IO_EMLINK</a> = 1519 : 1519
+ <a name="XML_IO_EMSGSIZE" id="XML_IO_EMSGSIZE">XML_IO_EMSGSIZE</a> = 1520 : 1520
+ <a name="XML_IO_ENAMETOOLONG" id="XML_IO_ENAMETOOLONG">XML_IO_ENAMETOOLONG</a> = 1521 : 1521
+ <a name="XML_IO_ENFILE" id="XML_IO_ENFILE">XML_IO_ENFILE</a> = 1522 : 1522
+ <a name="XML_IO_ENODEV" id="XML_IO_ENODEV">XML_IO_ENODEV</a> = 1523 : 1523
+ <a name="XML_IO_ENOENT" id="XML_IO_ENOENT">XML_IO_ENOENT</a> = 1524 : 1524
+ <a name="XML_IO_ENOEXEC" id="XML_IO_ENOEXEC">XML_IO_ENOEXEC</a> = 1525 : 1525
+ <a name="XML_IO_ENOLCK" id="XML_IO_ENOLCK">XML_IO_ENOLCK</a> = 1526 : 1526
+ <a name="XML_IO_ENOMEM" id="XML_IO_ENOMEM">XML_IO_ENOMEM</a> = 1527 : 1527
+ <a name="XML_IO_ENOSPC" id="XML_IO_ENOSPC">XML_IO_ENOSPC</a> = 1528 : 1528
+ <a name="XML_IO_ENOSYS" id="XML_IO_ENOSYS">XML_IO_ENOSYS</a> = 1529 : 1529
+ <a name="XML_IO_ENOTDIR" id="XML_IO_ENOTDIR">XML_IO_ENOTDIR</a> = 1530 : 1530
+ <a name="XML_IO_ENOTEMPTY" id="XML_IO_ENOTEMPTY">XML_IO_ENOTEMPTY</a> = 1531 : 1531
+ <a name="XML_IO_ENOTSUP" id="XML_IO_ENOTSUP">XML_IO_ENOTSUP</a> = 1532 : 1532
+ <a name="XML_IO_ENOTTY" id="XML_IO_ENOTTY">XML_IO_ENOTTY</a> = 1533 : 1533
+ <a name="XML_IO_ENXIO" id="XML_IO_ENXIO">XML_IO_ENXIO</a> = 1534 : 1534
+ <a name="XML_IO_EPERM" id="XML_IO_EPERM">XML_IO_EPERM</a> = 1535 : 1535
+ <a name="XML_IO_EPIPE" id="XML_IO_EPIPE">XML_IO_EPIPE</a> = 1536 : 1536
+ <a name="XML_IO_ERANGE" id="XML_IO_ERANGE">XML_IO_ERANGE</a> = 1537 : 1537
+ <a name="XML_IO_EROFS" id="XML_IO_EROFS">XML_IO_EROFS</a> = 1538 : 1538
+ <a name="XML_IO_ESPIPE" id="XML_IO_ESPIPE">XML_IO_ESPIPE</a> = 1539 : 1539
+ <a name="XML_IO_ESRCH" id="XML_IO_ESRCH">XML_IO_ESRCH</a> = 1540 : 1540
+ <a name="XML_IO_ETIMEDOUT" id="XML_IO_ETIMEDOUT">XML_IO_ETIMEDOUT</a> = 1541 : 1541
+ <a name="XML_IO_EXDEV" id="XML_IO_EXDEV">XML_IO_EXDEV</a> = 1542 : 1542
+ <a name="XML_IO_NETWORK_ATTEMPT" id="XML_IO_NETWORK_ATTEMPT">XML_IO_NETWORK_ATTEMPT</a> = 1543 : 1543
+ <a name="XML_IO_ENCODER" id="XML_IO_ENCODER">XML_IO_ENCODER</a> = 1544 : 1544
+ <a name="XML_IO_FLUSH" id="XML_IO_FLUSH">XML_IO_FLUSH</a> = 1545 : 1545
+ <a name="XML_IO_WRITE" id="XML_IO_WRITE">XML_IO_WRITE</a> = 1546 : 1546
+ <a name="XML_IO_NO_INPUT" id="XML_IO_NO_INPUT">XML_IO_NO_INPUT</a> = 1547 : 1547
+ <a name="XML_IO_BUFFER_FULL" id="XML_IO_BUFFER_FULL">XML_IO_BUFFER_FULL</a> = 1548 : 1548
+ <a name="XML_IO_LOAD_ERROR" id="XML_IO_LOAD_ERROR">XML_IO_LOAD_ERROR</a> = 1549 : 1549
+ <a name="XML_IO_ENOTSOCK" id="XML_IO_ENOTSOCK">XML_IO_ENOTSOCK</a> = 1550 : 1550
+ <a name="XML_IO_EISCONN" id="XML_IO_EISCONN">XML_IO_EISCONN</a> = 1551 : 1551
+ <a name="XML_IO_ECONNREFUSED" id="XML_IO_ECONNREFUSED">XML_IO_ECONNREFUSED</a> = 1552 : 1552
+ <a name="XML_IO_ENETUNREACH" id="XML_IO_ENETUNREACH">XML_IO_ENETUNREACH</a> = 1553 : 1553
+ <a name="XML_IO_EADDRINUSE" id="XML_IO_EADDRINUSE">XML_IO_EADDRINUSE</a> = 1554 : 1554
+ <a name="XML_IO_EALREADY" id="XML_IO_EALREADY">XML_IO_EALREADY</a> = 1555 : 1555
+ <a name="XML_IO_EAFNOSUPPORT" id="XML_IO_EAFNOSUPPORT">XML_IO_EAFNOSUPPORT</a> = 1556 : 1556
+ <a name="XML_XINCLUDE_RECURSION" id="XML_XINCLUDE_RECURSION">XML_XINCLUDE_RECURSION</a> = 1600
+ <a name="XML_XINCLUDE_PARSE_VALUE" id="XML_XINCLUDE_PARSE_VALUE">XML_XINCLUDE_PARSE_VALUE</a> = 1601 : 1601
+ <a name="XML_XINCLUDE_ENTITY_DEF_MISMATCH" id="XML_XINCLUDE_ENTITY_DEF_MISMATCH">XML_XINCLUDE_ENTITY_DEF_MISMATCH</a> = 1602 : 1602
+ <a name="XML_XINCLUDE_NO_HREF" id="XML_XINCLUDE_NO_HREF">XML_XINCLUDE_NO_HREF</a> = 1603 : 1603
+ <a name="XML_XINCLUDE_NO_FALLBACK" id="XML_XINCLUDE_NO_FALLBACK">XML_XINCLUDE_NO_FALLBACK</a> = 1604 : 1604
+ <a name="XML_XINCLUDE_HREF_URI" id="XML_XINCLUDE_HREF_URI">XML_XINCLUDE_HREF_URI</a> = 1605 : 1605
+ <a name="XML_XINCLUDE_TEXT_FRAGMENT" id="XML_XINCLUDE_TEXT_FRAGMENT">XML_XINCLUDE_TEXT_FRAGMENT</a> = 1606 : 1606
+ <a name="XML_XINCLUDE_TEXT_DOCUMENT" id="XML_XINCLUDE_TEXT_DOCUMENT">XML_XINCLUDE_TEXT_DOCUMENT</a> = 1607 : 1607
+ <a name="XML_XINCLUDE_INVALID_CHAR" id="XML_XINCLUDE_INVALID_CHAR">XML_XINCLUDE_INVALID_CHAR</a> = 1608 : 1608
+ <a name="XML_XINCLUDE_BUILD_FAILED" id="XML_XINCLUDE_BUILD_FAILED">XML_XINCLUDE_BUILD_FAILED</a> = 1609 : 1609
+ <a name="XML_XINCLUDE_UNKNOWN_ENCODING" id="XML_XINCLUDE_UNKNOWN_ENCODING">XML_XINCLUDE_UNKNOWN_ENCODING</a> = 1610 : 1610
+ <a name="XML_XINCLUDE_MULTIPLE_ROOT" id="XML_XINCLUDE_MULTIPLE_ROOT">XML_XINCLUDE_MULTIPLE_ROOT</a> = 1611 : 1611
+ <a name="XML_XINCLUDE_XPTR_FAILED" id="XML_XINCLUDE_XPTR_FAILED">XML_XINCLUDE_XPTR_FAILED</a> = 1612 : 1612
+ <a name="XML_XINCLUDE_XPTR_RESULT" id="XML_XINCLUDE_XPTR_RESULT">XML_XINCLUDE_XPTR_RESULT</a> = 1613 : 1613
+ <a name="XML_XINCLUDE_INCLUDE_IN_INCLUDE" id="XML_XINCLUDE_INCLUDE_IN_INCLUDE">XML_XINCLUDE_INCLUDE_IN_INCLUDE</a> = 1614 : 1614
+ <a name="XML_XINCLUDE_FALLBACKS_IN_INCLUDE" id="XML_XINCLUDE_FALLBACKS_IN_INCLUDE">XML_XINCLUDE_FALLBACKS_IN_INCLUDE</a> = 1615 : 1615
+ <a name="XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE" id="XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE">XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE</a> = 1616 : 1616
+ <a name="XML_XINCLUDE_DEPRECATED_NS" id="XML_XINCLUDE_DEPRECATED_NS">XML_XINCLUDE_DEPRECATED_NS</a> = 1617 : 1617
+ <a name="XML_XINCLUDE_FRAGMENT_ID" id="XML_XINCLUDE_FRAGMENT_ID">XML_XINCLUDE_FRAGMENT_ID</a> = 1618 : 1618
+ <a name="XML_CATALOG_MISSING_ATTR" id="XML_CATALOG_MISSING_ATTR">XML_CATALOG_MISSING_ATTR</a> = 1650
+ <a name="XML_CATALOG_ENTRY_BROKEN" id="XML_CATALOG_ENTRY_BROKEN">XML_CATALOG_ENTRY_BROKEN</a> = 1651 : 1651
+ <a name="XML_CATALOG_PREFER_VALUE" id="XML_CATALOG_PREFER_VALUE">XML_CATALOG_PREFER_VALUE</a> = 1652 : 1652
+ <a name="XML_CATALOG_NOT_CATALOG" id="XML_CATALOG_NOT_CATALOG">XML_CATALOG_NOT_CATALOG</a> = 1653 : 1653
+ <a name="XML_CATALOG_RECURSION" id="XML_CATALOG_RECURSION">XML_CATALOG_RECURSION</a> = 1654 : 1654
+ <a name="XML_SCHEMAP_PREFIX_UNDEFINED" id="XML_SCHEMAP_PREFIX_UNDEFINED">XML_SCHEMAP_PREFIX_UNDEFINED</a> = 1700
+ <a name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" id="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a> = 1701 : 1701
+ <a name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" id="XML_SCHEMAP_ATTRGRP_NONAME_NOREF">XML_SCHEMAP_ATTRGRP_NONAME_NOREF</a> = 1702 : 1702
+ <a name="XML_SCHEMAP_ATTR_NONAME_NOREF" id="XML_SCHEMAP_ATTR_NONAME_NOREF">XML_SCHEMAP_ATTR_NONAME_NOREF</a> = 1703 : 1703
+ <a name="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF" id="XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF">XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF</a> = 1704 : 1704
+ <a name="XML_SCHEMAP_ELEMFORMDEFAULT_VALUE" id="XML_SCHEMAP_ELEMFORMDEFAULT_VALUE">XML_SCHEMAP_ELEMFORMDEFAULT_VALUE</a> = 1705 : 1705
+ <a name="XML_SCHEMAP_ELEM_NONAME_NOREF" id="XML_SCHEMAP_ELEM_NONAME_NOREF">XML_SCHEMAP_ELEM_NONAME_NOREF</a> = 1706 : 1706
+ <a name="XML_SCHEMAP_EXTENSION_NO_BASE" id="XML_SCHEMAP_EXTENSION_NO_BASE">XML_SCHEMAP_EXTENSION_NO_BASE</a> = 1707 : 1707
+ <a name="XML_SCHEMAP_FACET_NO_VALUE" id="XML_SCHEMAP_FACET_NO_VALUE">XML_SCHEMAP_FACET_NO_VALUE</a> = 1708 : 1708
+ <a name="XML_SCHEMAP_FAILED_BUILD_IMPORT" id="XML_SCHEMAP_FAILED_BUILD_IMPORT">XML_SCHEMAP_FAILED_BUILD_IMPORT</a> = 1709 : 1709
+ <a name="XML_SCHEMAP_GROUP_NONAME_NOREF" id="XML_SCHEMAP_GROUP_NONAME_NOREF">XML_SCHEMAP_GROUP_NONAME_NOREF</a> = 1710 : 1710
+ <a name="XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI" id="XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI">XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI</a> = 1711 : 1711
+ <a name="XML_SCHEMAP_IMPORT_REDEFINE_NSNAME" id="XML_SCHEMAP_IMPORT_REDEFINE_NSNAME">XML_SCHEMAP_IMPORT_REDEFINE_NSNAME</a> = 1712 : 1712
+ <a name="XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI" id="XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI">XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI</a> = 1713 : 1713
+ <a name="XML_SCHEMAP_INVALID_BOOLEAN" id="XML_SCHEMAP_INVALID_BOOLEAN">XML_SCHEMAP_INVALID_BOOLEAN</a> = 1714 : 1714
+ <a name="XML_SCHEMAP_INVALID_ENUM" id="XML_SCHEMAP_INVALID_ENUM">XML_SCHEMAP_INVALID_ENUM</a> = 1715 : 1715
+ <a name="XML_SCHEMAP_INVALID_FACET" id="XML_SCHEMAP_INVALID_FACET">XML_SCHEMAP_INVALID_FACET</a> = 1716 : 1716
+ <a name="XML_SCHEMAP_INVALID_FACET_VALUE" id="XML_SCHEMAP_INVALID_FACET_VALUE">XML_SCHEMAP_INVALID_FACET_VALUE</a> = 1717 : 1717
+ <a name="XML_SCHEMAP_INVALID_MAXOCCURS" id="XML_SCHEMAP_INVALID_MAXOCCURS">XML_SCHEMAP_INVALID_MAXOCCURS</a> = 1718 : 1718
+ <a name="XML_SCHEMAP_INVALID_MINOCCURS" id="XML_SCHEMAP_INVALID_MINOCCURS">XML_SCHEMAP_INVALID_MINOCCURS</a> = 1719 : 1719
+ <a name="XML_SCHEMAP_INVALID_REF_AND_SUBTYPE" id="XML_SCHEMAP_INVALID_REF_AND_SUBTYPE">XML_SCHEMAP_INVALID_REF_AND_SUBTYPE</a> = 1720 : 1720
+ <a name="XML_SCHEMAP_INVALID_WHITE_SPACE" id="XML_SCHEMAP_INVALID_WHITE_SPACE">XML_SCHEMAP_INVALID_WHITE_SPACE</a> = 1721 : 1721
+ <a name="XML_SCHEMAP_NOATTR_NOREF" id="XML_SCHEMAP_NOATTR_NOREF">XML_SCHEMAP_NOATTR_NOREF</a> = 1722 : 1722
+ <a name="XML_SCHEMAP_NOTATION_NO_NAME" id="XML_SCHEMAP_NOTATION_NO_NAME">XML_SCHEMAP_NOTATION_NO_NAME</a> = 1723 : 1723
+ <a name="XML_SCHEMAP_NOTYPE_NOREF" id="XML_SCHEMAP_NOTYPE_NOREF">XML_SCHEMAP_NOTYPE_NOREF</a> = 1724 : 1724
+ <a name="XML_SCHEMAP_REF_AND_SUBTYPE" id="XML_SCHEMAP_REF_AND_SUBTYPE">XML_SCHEMAP_REF_AND_SUBTYPE</a> = 1725 : 1725
+ <a name="XML_SCHEMAP_RESTRICTION_NONAME_NOREF" id="XML_SCHEMAP_RESTRICTION_NONAME_NOREF">XML_SCHEMAP_RESTRICTION_NONAME_NOREF</a> = 1726 : 1726
+ <a name="XML_SCHEMAP_SIMPLETYPE_NONAME" id="XML_SCHEMAP_SIMPLETYPE_NONAME">XML_SCHEMAP_SIMPLETYPE_NONAME</a> = 1727 : 1727
+ <a name="XML_SCHEMAP_TYPE_AND_SUBTYPE" id="XML_SCHEMAP_TYPE_AND_SUBTYPE">XML_SCHEMAP_TYPE_AND_SUBTYPE</a> = 1728 : 1728
+ <a name="XML_SCHEMAP_UNKNOWN_ALL_CHILD" id="XML_SCHEMAP_UNKNOWN_ALL_CHILD">XML_SCHEMAP_UNKNOWN_ALL_CHILD</a> = 1729 : 1729
+ <a name="XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD" id="XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD">XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD</a> = 1730 : 1730
+ <a name="XML_SCHEMAP_UNKNOWN_ATTR_CHILD" id="XML_SCHEMAP_UNKNOWN_ATTR_CHILD">XML_SCHEMAP_UNKNOWN_ATTR_CHILD</a> = 1731 : 1731
+ <a name="XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD" id="XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD">XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD</a> = 1732 : 1732
+ <a name="XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP" id="XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP">XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP</a> = 1733 : 1733
+ <a name="XML_SCHEMAP_UNKNOWN_BASE_TYPE" id="XML_SCHEMAP_UNKNOWN_BASE_TYPE">XML_SCHEMAP_UNKNOWN_BASE_TYPE</a> = 1734 : 1734
+ <a name="XML_SCHEMAP_UNKNOWN_CHOICE_CHILD" id="XML_SCHEMAP_UNKNOWN_CHOICE_CHILD">XML_SCHEMAP_UNKNOWN_CHOICE_CHILD</a> = 1735 : 1735
+ <a name="XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD" id="XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD</a> = 1736 : 1736
+ <a name="XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD" id="XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD">XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD</a> = 1737 : 1737
+ <a name="XML_SCHEMAP_UNKNOWN_ELEM_CHILD" id="XML_SCHEMAP_UNKNOWN_ELEM_CHILD">XML_SCHEMAP_UNKNOWN_ELEM_CHILD</a> = 1738 : 1738
+ <a name="XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD" id="XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD">XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD</a> = 1739 : 1739
+ <a name="XML_SCHEMAP_UNKNOWN_FACET_CHILD" id="XML_SCHEMAP_UNKNOWN_FACET_CHILD">XML_SCHEMAP_UNKNOWN_FACET_CHILD</a> = 1740 : 1740
+ <a name="XML_SCHEMAP_UNKNOWN_FACET_TYPE" id="XML_SCHEMAP_UNKNOWN_FACET_TYPE">XML_SCHEMAP_UNKNOWN_FACET_TYPE</a> = 1741 : 1741
+ <a name="XML_SCHEMAP_UNKNOWN_GROUP_CHILD" id="XML_SCHEMAP_UNKNOWN_GROUP_CHILD">XML_SCHEMAP_UNKNOWN_GROUP_CHILD</a> = 1742 : 1742
+ <a name="XML_SCHEMAP_UNKNOWN_IMPORT_CHILD" id="XML_SCHEMAP_UNKNOWN_IMPORT_CHILD">XML_SCHEMAP_UNKNOWN_IMPORT_CHILD</a> = 1743 : 1743
+ <a name="XML_SCHEMAP_UNKNOWN_LIST_CHILD" id="XML_SCHEMAP_UNKNOWN_LIST_CHILD">XML_SCHEMAP_UNKNOWN_LIST_CHILD</a> = 1744 : 1744
+ <a name="XML_SCHEMAP_UNKNOWN_NOTATION_CHILD" id="XML_SCHEMAP_UNKNOWN_NOTATION_CHILD">XML_SCHEMAP_UNKNOWN_NOTATION_CHILD</a> = 1745 : 1745
+ <a name="XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD" id="XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD">XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD</a> = 1746 : 1746
+ <a name="XML_SCHEMAP_UNKNOWN_REF" id="XML_SCHEMAP_UNKNOWN_REF">XML_SCHEMAP_UNKNOWN_REF</a> = 1747 : 1747
+ <a name="XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD" id="XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD">XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD</a> = 1748 : 1748
+ <a name="XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD" id="XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD">XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD</a> = 1749 : 1749
+ <a name="XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD" id="XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD">XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD</a> = 1750 : 1750
+ <a name="XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD" id="XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD</a> = 1751 : 1751
+ <a name="XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD" id="XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD">XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD</a> = 1752 : 1752
+ <a name="XML_SCHEMAP_UNKNOWN_TYPE" id="XML_SCHEMAP_UNKNOWN_TYPE">XML_SCHEMAP_UNKNOWN_TYPE</a> = 1753 : 1753
+ <a name="XML_SCHEMAP_UNKNOWN_UNION_CHILD" id="XML_SCHEMAP_UNKNOWN_UNION_CHILD">XML_SCHEMAP_UNKNOWN_UNION_CHILD</a> = 1754 : 1754
+ <a name="XML_SCHEMAP_ELEM_DEFAULT_FIXED" id="XML_SCHEMAP_ELEM_DEFAULT_FIXED">XML_SCHEMAP_ELEM_DEFAULT_FIXED</a> = 1755 : 1755
+ <a name="XML_SCHEMAP_REGEXP_INVALID" id="XML_SCHEMAP_REGEXP_INVALID">XML_SCHEMAP_REGEXP_INVALID</a> = 1756 : 1756
+ <a name="XML_SCHEMAP_FAILED_LOAD" id="XML_SCHEMAP_FAILED_LOAD">XML_SCHEMAP_FAILED_LOAD</a> = 1757 : 1757
+ <a name="XML_SCHEMAP_NOTHING_TO_PARSE" id="XML_SCHEMAP_NOTHING_TO_PARSE">XML_SCHEMAP_NOTHING_TO_PARSE</a> = 1758 : 1758
+ <a name="XML_SCHEMAP_NOROOT" id="XML_SCHEMAP_NOROOT">XML_SCHEMAP_NOROOT</a> = 1759 : 1759
+ <a name="XML_SCHEMAP_REDEFINED_GROUP" id="XML_SCHEMAP_REDEFINED_GROUP">XML_SCHEMAP_REDEFINED_GROUP</a> = 1760 : 1760
+ <a name="XML_SCHEMAP_REDEFINED_TYPE" id="XML_SCHEMAP_REDEFINED_TYPE">XML_SCHEMAP_REDEFINED_TYPE</a> = 1761 : 1761
+ <a name="XML_SCHEMAP_REDEFINED_ELEMENT" id="XML_SCHEMAP_REDEFINED_ELEMENT">XML_SCHEMAP_REDEFINED_ELEMENT</a> = 1762 : 1762
+ <a name="XML_SCHEMAP_REDEFINED_ATTRGROUP" id="XML_SCHEMAP_REDEFINED_ATTRGROUP">XML_SCHEMAP_REDEFINED_ATTRGROUP</a> = 1763 : 1763
+ <a name="XML_SCHEMAP_REDEFINED_ATTR" id="XML_SCHEMAP_REDEFINED_ATTR">XML_SCHEMAP_REDEFINED_ATTR</a> = 1764 : 1764
+ <a name="XML_SCHEMAP_REDEFINED_NOTATION" id="XML_SCHEMAP_REDEFINED_NOTATION">XML_SCHEMAP_REDEFINED_NOTATION</a> = 1765 : 1765
+ <a name="XML_SCHEMAP_FAILED_PARSE" id="XML_SCHEMAP_FAILED_PARSE">XML_SCHEMAP_FAILED_PARSE</a> = 1766 : 1766
+ <a name="XML_SCHEMAP_UNKNOWN_PREFIX" id="XML_SCHEMAP_UNKNOWN_PREFIX">XML_SCHEMAP_UNKNOWN_PREFIX</a> = 1767 : 1767
+ <a name="XML_SCHEMAP_DEF_AND_PREFIX" id="XML_SCHEMAP_DEF_AND_PREFIX">XML_SCHEMAP_DEF_AND_PREFIX</a> = 1768 : 1768
+ <a name="XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD" id="XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD">XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD</a> = 1769 : 1769
+ <a name="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI" id="XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI</a> = 1770 : 1770
+ <a name="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI" id="XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI">XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI</a> = 1771 : 1771
+ <a name="XML_SCHEMAP_NOT_SCHEMA" id="XML_SCHEMAP_NOT_SCHEMA">XML_SCHEMAP_NOT_SCHEMA</a> = 1772 : 1772
+ <a name="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE" id="XML_SCHEMAP_UNKNOWN_MEMBER_TYPE">XML_SCHEMAP_UNKNOWN_MEMBER_TYPE</a> = 1773 : 1773
+ <a name="XML_SCHEMAP_INVALID_ATTR_USE" id="XML_SCHEMAP_INVALID_ATTR_USE">XML_SCHEMAP_INVALID_ATTR_USE</a> = 1774 : 1774
+ <a name="XML_SCHEMAP_RECURSIVE" id="XML_SCHEMAP_RECURSIVE">XML_SCHEMAP_RECURSIVE</a> = 1775 : 1775
+ <a name="XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE" id="XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE">XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE</a> = 1776 : 1776
+ <a name="XML_SCHEMAP_INVALID_ATTR_COMBINATION" id="XML_SCHEMAP_INVALID_ATTR_COMBINATION">XML_SCHEMAP_INVALID_ATTR_COMBINATION</a> = 1777 : 1777
+ <a name="XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION" id="XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION">XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION</a> = 1778 : 1778
+ <a name="XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD" id="XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD">XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD</a> = 1779 : 1779
+ <a name="XML_SCHEMAP_INVALID_ATTR_NAME" id="XML_SCHEMAP_INVALID_ATTR_NAME">XML_SCHEMAP_INVALID_ATTR_NAME</a> = 1780 : 1780
+ <a name="XML_SCHEMAP_REF_AND_CONTENT" id="XML_SCHEMAP_REF_AND_CONTENT">XML_SCHEMAP_REF_AND_CONTENT</a> = 1781 : 1781
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_1" id="XML_SCHEMAP_CT_PROPS_CORRECT_1">XML_SCHEMAP_CT_PROPS_CORRECT_1</a> = 1782 : 1782
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_2" id="XML_SCHEMAP_CT_PROPS_CORRECT_2">XML_SCHEMAP_CT_PROPS_CORRECT_2</a> = 1783 : 1783
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_3" id="XML_SCHEMAP_CT_PROPS_CORRECT_3">XML_SCHEMAP_CT_PROPS_CORRECT_3</a> = 1784 : 1784
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_4" id="XML_SCHEMAP_CT_PROPS_CORRECT_4">XML_SCHEMAP_CT_PROPS_CORRECT_4</a> = 1785 : 1785
+ <a name="XML_SCHEMAP_CT_PROPS_CORRECT_5" id="XML_SCHEMAP_CT_PROPS_CORRECT_5">XML_SCHEMAP_CT_PROPS_CORRECT_5</a> = 1786 : 1786
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1</a> = 1787 : 1787
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1</a> = 1788 : 1788
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2</a> = 1789 : 1789
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2</a> = 1790 : 1790
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3</a> = 1791 : 1791
+ <a name="XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER" id="XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER">XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER</a> = 1792 : 1792
+ <a name="XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE" id="XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE">XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE</a> = 1793 : 1793
+ <a name="XML_SCHEMAP_UNION_NOT_EXPRESSIBLE" id="XML_SCHEMAP_UNION_NOT_EXPRESSIBLE">XML_SCHEMAP_UNION_NOT_EXPRESSIBLE</a> = 1794 : 1794
+ <a name="XML_SCHEMAP_SRC_IMPORT_3_1" id="XML_SCHEMAP_SRC_IMPORT_3_1">XML_SCHEMAP_SRC_IMPORT_3_1</a> = 1795 : 1795
+ <a name="XML_SCHEMAP_SRC_IMPORT_3_2" id="XML_SCHEMAP_SRC_IMPORT_3_2">XML_SCHEMAP_SRC_IMPORT_3_2</a> = 1796 : 1796
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1</a> = 1797 : 1797
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2</a> = 1798 : 1798
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3</a> = 1799 : 1799
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_3" id="XML_SCHEMAP_COS_CT_EXTENDS_1_3">XML_SCHEMAP_COS_CT_EXTENDS_1_3</a> = 1800 : 1800
+ <a name="XML_SCHEMAV_NOROOT" id="XML_SCHEMAV_NOROOT">XML_SCHEMAV_NOROOT</a> = 1801
+ <a name="XML_SCHEMAV_UNDECLAREDELEM" id="XML_SCHEMAV_UNDECLAREDELEM">XML_SCHEMAV_UNDECLAREDELEM</a> = 1802 : 1802
+ <a name="XML_SCHEMAV_NOTTOPLEVEL" id="XML_SCHEMAV_NOTTOPLEVEL">XML_SCHEMAV_NOTTOPLEVEL</a> = 1803 : 1803
+ <a name="XML_SCHEMAV_MISSING" id="XML_SCHEMAV_MISSING">XML_SCHEMAV_MISSING</a> = 1804 : 1804
+ <a name="XML_SCHEMAV_WRONGELEM" id="XML_SCHEMAV_WRONGELEM">XML_SCHEMAV_WRONGELEM</a> = 1805 : 1805
+ <a name="XML_SCHEMAV_NOTYPE" id="XML_SCHEMAV_NOTYPE">XML_SCHEMAV_NOTYPE</a> = 1806 : 1806
+ <a name="XML_SCHEMAV_NOROLLBACK" id="XML_SCHEMAV_NOROLLBACK">XML_SCHEMAV_NOROLLBACK</a> = 1807 : 1807
+ <a name="XML_SCHEMAV_ISABSTRACT" id="XML_SCHEMAV_ISABSTRACT">XML_SCHEMAV_ISABSTRACT</a> = 1808 : 1808
+ <a name="XML_SCHEMAV_NOTEMPTY" id="XML_SCHEMAV_NOTEMPTY">XML_SCHEMAV_NOTEMPTY</a> = 1809 : 1809
+ <a name="XML_SCHEMAV_ELEMCONT" id="XML_SCHEMAV_ELEMCONT">XML_SCHEMAV_ELEMCONT</a> = 1810 : 1810
+ <a name="XML_SCHEMAV_HAVEDEFAULT" id="XML_SCHEMAV_HAVEDEFAULT">XML_SCHEMAV_HAVEDEFAULT</a> = 1811 : 1811
+ <a name="XML_SCHEMAV_NOTNILLABLE" id="XML_SCHEMAV_NOTNILLABLE">XML_SCHEMAV_NOTNILLABLE</a> = 1812 : 1812
+ <a name="XML_SCHEMAV_EXTRACONTENT" id="XML_SCHEMAV_EXTRACONTENT">XML_SCHEMAV_EXTRACONTENT</a> = 1813 : 1813
+ <a name="XML_SCHEMAV_INVALIDATTR" id="XML_SCHEMAV_INVALIDATTR">XML_SCHEMAV_INVALIDATTR</a> = 1814 : 1814
+ <a name="XML_SCHEMAV_INVALIDELEM" id="XML_SCHEMAV_INVALIDELEM">XML_SCHEMAV_INVALIDELEM</a> = 1815 : 1815
+ <a name="XML_SCHEMAV_NOTDETERMINIST" id="XML_SCHEMAV_NOTDETERMINIST">XML_SCHEMAV_NOTDETERMINIST</a> = 1816 : 1816
+ <a name="XML_SCHEMAV_CONSTRUCT" id="XML_SCHEMAV_CONSTRUCT">XML_SCHEMAV_CONSTRUCT</a> = 1817 : 1817
+ <a name="XML_SCHEMAV_INTERNAL" id="XML_SCHEMAV_INTERNAL">XML_SCHEMAV_INTERNAL</a> = 1818 : 1818
+ <a name="XML_SCHEMAV_NOTSIMPLE" id="XML_SCHEMAV_NOTSIMPLE">XML_SCHEMAV_NOTSIMPLE</a> = 1819 : 1819
+ <a name="XML_SCHEMAV_ATTRUNKNOWN" id="XML_SCHEMAV_ATTRUNKNOWN">XML_SCHEMAV_ATTRUNKNOWN</a> = 1820 : 1820
+ <a name="XML_SCHEMAV_ATTRINVALID" id="XML_SCHEMAV_ATTRINVALID">XML_SCHEMAV_ATTRINVALID</a> = 1821 : 1821
+ <a name="XML_SCHEMAV_VALUE" id="XML_SCHEMAV_VALUE">XML_SCHEMAV_VALUE</a> = 1822 : 1822
+ <a name="XML_SCHEMAV_FACET" id="XML_SCHEMAV_FACET">XML_SCHEMAV_FACET</a> = 1823 : 1823
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1" id="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1</a> = 1824 : 1824
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2" id="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2</a> = 1825 : 1825
+ <a name="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3" id="XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3">XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3</a> = 1826 : 1826
+ <a name="XML_SCHEMAV_CVC_TYPE_3_1_1" id="XML_SCHEMAV_CVC_TYPE_3_1_1">XML_SCHEMAV_CVC_TYPE_3_1_1</a> = 1827 : 1827
+ <a name="XML_SCHEMAV_CVC_TYPE_3_1_2" id="XML_SCHEMAV_CVC_TYPE_3_1_2">XML_SCHEMAV_CVC_TYPE_3_1_2</a> = 1828 : 1828
+ <a name="XML_SCHEMAV_CVC_FACET_VALID" id="XML_SCHEMAV_CVC_FACET_VALID">XML_SCHEMAV_CVC_FACET_VALID</a> = 1829 : 1829
+ <a name="XML_SCHEMAV_CVC_LENGTH_VALID" id="XML_SCHEMAV_CVC_LENGTH_VALID">XML_SCHEMAV_CVC_LENGTH_VALID</a> = 1830 : 1830
+ <a name="XML_SCHEMAV_CVC_MINLENGTH_VALID" id="XML_SCHEMAV_CVC_MINLENGTH_VALID">XML_SCHEMAV_CVC_MINLENGTH_VALID</a> = 1831 : 1831
+ <a name="XML_SCHEMAV_CVC_MAXLENGTH_VALID" id="XML_SCHEMAV_CVC_MAXLENGTH_VALID">XML_SCHEMAV_CVC_MAXLENGTH_VALID</a> = 1832 : 1832
+ <a name="XML_SCHEMAV_CVC_MININCLUSIVE_VALID" id="XML_SCHEMAV_CVC_MININCLUSIVE_VALID">XML_SCHEMAV_CVC_MININCLUSIVE_VALID</a> = 1833 : 1833
+ <a name="XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID" id="XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID</a> = 1834 : 1834
+ <a name="XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID" id="XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID</a> = 1835 : 1835
+ <a name="XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID" id="XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID">XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID</a> = 1836 : 1836
+ <a name="XML_SCHEMAV_CVC_TOTALDIGITS_VALID" id="XML_SCHEMAV_CVC_TOTALDIGITS_VALID">XML_SCHEMAV_CVC_TOTALDIGITS_VALID</a> = 1837 : 1837
+ <a name="XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID" id="XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID">XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID</a> = 1838 : 1838
+ <a name="XML_SCHEMAV_CVC_PATTERN_VALID" id="XML_SCHEMAV_CVC_PATTERN_VALID">XML_SCHEMAV_CVC_PATTERN_VALID</a> = 1839 : 1839
+ <a name="XML_SCHEMAV_CVC_ENUMERATION_VALID" id="XML_SCHEMAV_CVC_ENUMERATION_VALID">XML_SCHEMAV_CVC_ENUMERATION_VALID</a> = 1840 : 1840
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1</a> = 1841 : 1841
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2</a> = 1842 : 1842
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3</a> = 1843 : 1843
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4</a> = 1844 : 1844
+ <a name="XML_SCHEMAV_CVC_ELT_1" id="XML_SCHEMAV_CVC_ELT_1">XML_SCHEMAV_CVC_ELT_1</a> = 1845 : 1845
+ <a name="XML_SCHEMAV_CVC_ELT_2" id="XML_SCHEMAV_CVC_ELT_2">XML_SCHEMAV_CVC_ELT_2</a> = 1846 : 1846
+ <a name="XML_SCHEMAV_CVC_ELT_3_1" id="XML_SCHEMAV_CVC_ELT_3_1">XML_SCHEMAV_CVC_ELT_3_1</a> = 1847 : 1847
+ <a name="XML_SCHEMAV_CVC_ELT_3_2_1" id="XML_SCHEMAV_CVC_ELT_3_2_1">XML_SCHEMAV_CVC_ELT_3_2_1</a> = 1848 : 1848
+ <a name="XML_SCHEMAV_CVC_ELT_3_2_2" id="XML_SCHEMAV_CVC_ELT_3_2_2">XML_SCHEMAV_CVC_ELT_3_2_2</a> = 1849 : 1849
+ <a name="XML_SCHEMAV_CVC_ELT_4_1" id="XML_SCHEMAV_CVC_ELT_4_1">XML_SCHEMAV_CVC_ELT_4_1</a> = 1850 : 1850
+ <a name="XML_SCHEMAV_CVC_ELT_4_2" id="XML_SCHEMAV_CVC_ELT_4_2">XML_SCHEMAV_CVC_ELT_4_2</a> = 1851 : 1851
+ <a name="XML_SCHEMAV_CVC_ELT_4_3" id="XML_SCHEMAV_CVC_ELT_4_3">XML_SCHEMAV_CVC_ELT_4_3</a> = 1852 : 1852
+ <a name="XML_SCHEMAV_CVC_ELT_5_1_1" id="XML_SCHEMAV_CVC_ELT_5_1_1">XML_SCHEMAV_CVC_ELT_5_1_1</a> = 1853 : 1853
+ <a name="XML_SCHEMAV_CVC_ELT_5_1_2" id="XML_SCHEMAV_CVC_ELT_5_1_2">XML_SCHEMAV_CVC_ELT_5_1_2</a> = 1854 : 1854
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_1" id="XML_SCHEMAV_CVC_ELT_5_2_1">XML_SCHEMAV_CVC_ELT_5_2_1</a> = 1855 : 1855
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_1" id="XML_SCHEMAV_CVC_ELT_5_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_1</a> = 1856 : 1856
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_2_1" id="XML_SCHEMAV_CVC_ELT_5_2_2_2_1">XML_SCHEMAV_CVC_ELT_5_2_2_2_1</a> = 1857 : 1857
+ <a name="XML_SCHEMAV_CVC_ELT_5_2_2_2_2" id="XML_SCHEMAV_CVC_ELT_5_2_2_2_2">XML_SCHEMAV_CVC_ELT_5_2_2_2_2</a> = 1858 : 1858
+ <a name="XML_SCHEMAV_CVC_ELT_6" id="XML_SCHEMAV_CVC_ELT_6">XML_SCHEMAV_CVC_ELT_6</a> = 1859 : 1859
+ <a name="XML_SCHEMAV_CVC_ELT_7" id="XML_SCHEMAV_CVC_ELT_7">XML_SCHEMAV_CVC_ELT_7</a> = 1860 : 1860
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_1" id="XML_SCHEMAV_CVC_ATTRIBUTE_1">XML_SCHEMAV_CVC_ATTRIBUTE_1</a> = 1861 : 1861
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_2" id="XML_SCHEMAV_CVC_ATTRIBUTE_2">XML_SCHEMAV_CVC_ATTRIBUTE_2</a> = 1862 : 1862
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_3" id="XML_SCHEMAV_CVC_ATTRIBUTE_3">XML_SCHEMAV_CVC_ATTRIBUTE_3</a> = 1863 : 1863
+ <a name="XML_SCHEMAV_CVC_ATTRIBUTE_4" id="XML_SCHEMAV_CVC_ATTRIBUTE_4">XML_SCHEMAV_CVC_ATTRIBUTE_4</a> = 1864 : 1864
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1</a> = 1865 : 1865
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1</a> = 1866 : 1866
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2</a> = 1867 : 1867
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_4" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_4">XML_SCHEMAV_CVC_COMPLEX_TYPE_4</a> = 1868 : 1868
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1</a> = 1869 : 1869
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2">XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2</a> = 1870 : 1870
+ <a name="XML_SCHEMAV_ELEMENT_CONTENT" id="XML_SCHEMAV_ELEMENT_CONTENT">XML_SCHEMAV_ELEMENT_CONTENT</a> = 1871 : 1871
+ <a name="XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING" id="XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING">XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING</a> = 1872 : 1872
+ <a name="XML_SCHEMAV_CVC_COMPLEX_TYPE_1" id="XML_SCHEMAV_CVC_COMPLEX_TYPE_1">XML_SCHEMAV_CVC_COMPLEX_TYPE_1</a> = 1873 : 1873
+ <a name="XML_SCHEMAV_CVC_AU" id="XML_SCHEMAV_CVC_AU">XML_SCHEMAV_CVC_AU</a> = 1874 : 1874
+ <a name="XML_SCHEMAV_CVC_TYPE_1" id="XML_SCHEMAV_CVC_TYPE_1">XML_SCHEMAV_CVC_TYPE_1</a> = 1875 : 1875
+ <a name="XML_SCHEMAV_CVC_TYPE_2" id="XML_SCHEMAV_CVC_TYPE_2">XML_SCHEMAV_CVC_TYPE_2</a> = 1876 : 1876
+ <a name="XML_SCHEMAV_CVC_IDC" id="XML_SCHEMAV_CVC_IDC">XML_SCHEMAV_CVC_IDC</a> = 1877 : 1877
+ <a name="XML_SCHEMAV_CVC_WILDCARD" id="XML_SCHEMAV_CVC_WILDCARD">XML_SCHEMAV_CVC_WILDCARD</a> = 1878 : 1878
+ <a name="XML_SCHEMAV_MISC" id="XML_SCHEMAV_MISC">XML_SCHEMAV_MISC</a> = 1879 : 1879
+ <a name="XML_XPTR_UNKNOWN_SCHEME" id="XML_XPTR_UNKNOWN_SCHEME">XML_XPTR_UNKNOWN_SCHEME</a> = 1900
+ <a name="XML_XPTR_CHILDSEQ_START" id="XML_XPTR_CHILDSEQ_START">XML_XPTR_CHILDSEQ_START</a> = 1901 : 1901
+ <a name="XML_XPTR_EVAL_FAILED" id="XML_XPTR_EVAL_FAILED">XML_XPTR_EVAL_FAILED</a> = 1902 : 1902
+ <a name="XML_XPTR_EXTRA_OBJECTS" id="XML_XPTR_EXTRA_OBJECTS">XML_XPTR_EXTRA_OBJECTS</a> = 1903 : 1903
+ <a name="XML_C14N_CREATE_CTXT" id="XML_C14N_CREATE_CTXT">XML_C14N_CREATE_CTXT</a> = 1950
+ <a name="XML_C14N_REQUIRES_UTF8" id="XML_C14N_REQUIRES_UTF8">XML_C14N_REQUIRES_UTF8</a> = 1951 : 1951
+ <a name="XML_C14N_CREATE_STACK" id="XML_C14N_CREATE_STACK">XML_C14N_CREATE_STACK</a> = 1952 : 1952
+ <a name="XML_C14N_INVALID_NODE" id="XML_C14N_INVALID_NODE">XML_C14N_INVALID_NODE</a> = 1953 : 1953
+ <a name="XML_C14N_UNKNOW_NODE" id="XML_C14N_UNKNOW_NODE">XML_C14N_UNKNOW_NODE</a> = 1954 : 1954
+ <a name="XML_C14N_RELATIVE_NAMESPACE" id="XML_C14N_RELATIVE_NAMESPACE">XML_C14N_RELATIVE_NAMESPACE</a> = 1955 : 1955
+ <a name="XML_FTP_PASV_ANSWER" id="XML_FTP_PASV_ANSWER">XML_FTP_PASV_ANSWER</a> = 2000
+ <a name="XML_FTP_EPSV_ANSWER" id="XML_FTP_EPSV_ANSWER">XML_FTP_EPSV_ANSWER</a> = 2001 : 2001
+ <a name="XML_FTP_ACCNT" id="XML_FTP_ACCNT">XML_FTP_ACCNT</a> = 2002 : 2002
+ <a name="XML_FTP_URL_SYNTAX" id="XML_FTP_URL_SYNTAX">XML_FTP_URL_SYNTAX</a> = 2003 : 2003
+ <a name="XML_HTTP_URL_SYNTAX" id="XML_HTTP_URL_SYNTAX">XML_HTTP_URL_SYNTAX</a> = 2020
+ <a name="XML_HTTP_USE_IP" id="XML_HTTP_USE_IP">XML_HTTP_USE_IP</a> = 2021 : 2021
+ <a name="XML_HTTP_UNKNOWN_HOST" id="XML_HTTP_UNKNOWN_HOST">XML_HTTP_UNKNOWN_HOST</a> = 2022 : 2022
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_1" id="XML_SCHEMAP_SRC_SIMPLE_TYPE_1">XML_SCHEMAP_SRC_SIMPLE_TYPE_1</a> = 3000
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_2" id="XML_SCHEMAP_SRC_SIMPLE_TYPE_2">XML_SCHEMAP_SRC_SIMPLE_TYPE_2</a> = 3001 : 3001
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_3" id="XML_SCHEMAP_SRC_SIMPLE_TYPE_3">XML_SCHEMAP_SRC_SIMPLE_TYPE_3</a> = 3002 : 3002
+ <a name="XML_SCHEMAP_SRC_SIMPLE_TYPE_4" id="XML_SCHEMAP_SRC_SIMPLE_TYPE_4">XML_SCHEMAP_SRC_SIMPLE_TYPE_4</a> = 3003 : 3003
+ <a name="XML_SCHEMAP_SRC_RESOLVE" id="XML_SCHEMAP_SRC_RESOLVE">XML_SCHEMAP_SRC_RESOLVE</a> = 3004 : 3004
+ <a name="XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE" id="XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE</a> = 3005 : 3005
+ <a name="XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE" id="XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE">XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE</a> = 3006 : 3006
+ <a name="XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES" id="XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES">XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES</a> = 3007 : 3007
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_1" id="XML_SCHEMAP_ST_PROPS_CORRECT_1">XML_SCHEMAP_ST_PROPS_CORRECT_1</a> = 3008 : 3008
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_2" id="XML_SCHEMAP_ST_PROPS_CORRECT_2">XML_SCHEMAP_ST_PROPS_CORRECT_2</a> = 3009 : 3009
+ <a name="XML_SCHEMAP_ST_PROPS_CORRECT_3" id="XML_SCHEMAP_ST_PROPS_CORRECT_3">XML_SCHEMAP_ST_PROPS_CORRECT_3</a> = 3010 : 3010
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_1</a> = 3011 : 3011
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_2</a> = 3012 : 3012
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1</a> = 3013 : 3013
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2">XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2</a> = 3014 : 3014
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_1</a> = 3015 : 3015
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1</a> = 3016 : 3016
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2</a> = 3017 : 3017
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1</a> = 3018 : 3018
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2</a> = 3019 : 3019
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3</a> = 3020 : 3020
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4</a> = 3021 : 3021
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5" id="XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5</a> = 3022 : 3022
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_1</a> = 3023 : 3023
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1</a> = 3024 : 3024
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2</a> = 3025 : 3025
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2</a> = 3026 : 3026
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1</a> = 3027 : 3027
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3</a> = 3028 : 3028
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4</a> = 3029 : 3029
+ <a name="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5" id="XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5">XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5</a> = 3030 : 3030
+ <a name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1" id="XML_SCHEMAP_COS_ST_DERIVED_OK_2_1">XML_SCHEMAP_COS_ST_DERIVED_OK_2_1</a> = 3031 : 3031
+ <a name="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2" id="XML_SCHEMAP_COS_ST_DERIVED_OK_2_2">XML_SCHEMAP_COS_ST_DERIVED_OK_2_2</a> = 3032 : 3032
+ <a name="XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED" id="XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED">XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED</a> = 3033 : 3033
+ <a name="XML_SCHEMAP_S4S_ELEM_MISSING" id="XML_SCHEMAP_S4S_ELEM_MISSING">XML_SCHEMAP_S4S_ELEM_MISSING</a> = 3034 : 3034
+ <a name="XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED" id="XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED">XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED</a> = 3035 : 3035
+ <a name="XML_SCHEMAP_S4S_ATTR_MISSING" id="XML_SCHEMAP_S4S_ATTR_MISSING">XML_SCHEMAP_S4S_ATTR_MISSING</a> = 3036 : 3036
+ <a name="XML_SCHEMAP_S4S_ATTR_INVALID_VALUE" id="XML_SCHEMAP_S4S_ATTR_INVALID_VALUE">XML_SCHEMAP_S4S_ATTR_INVALID_VALUE</a> = 3037 : 3037
+ <a name="XML_SCHEMAP_SRC_ELEMENT_1" id="XML_SCHEMAP_SRC_ELEMENT_1">XML_SCHEMAP_SRC_ELEMENT_1</a> = 3038 : 3038
+ <a name="XML_SCHEMAP_SRC_ELEMENT_2_1" id="XML_SCHEMAP_SRC_ELEMENT_2_1">XML_SCHEMAP_SRC_ELEMENT_2_1</a> = 3039 : 3039
+ <a name="XML_SCHEMAP_SRC_ELEMENT_2_2" id="XML_SCHEMAP_SRC_ELEMENT_2_2">XML_SCHEMAP_SRC_ELEMENT_2_2</a> = 3040 : 3040
+ <a name="XML_SCHEMAP_SRC_ELEMENT_3" id="XML_SCHEMAP_SRC_ELEMENT_3">XML_SCHEMAP_SRC_ELEMENT_3</a> = 3041 : 3041
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_1" id="XML_SCHEMAP_P_PROPS_CORRECT_1">XML_SCHEMAP_P_PROPS_CORRECT_1</a> = 3042 : 3042
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_2_1" id="XML_SCHEMAP_P_PROPS_CORRECT_2_1">XML_SCHEMAP_P_PROPS_CORRECT_2_1</a> = 3043 : 3043
+ <a name="XML_SCHEMAP_P_PROPS_CORRECT_2_2" id="XML_SCHEMAP_P_PROPS_CORRECT_2_2">XML_SCHEMAP_P_PROPS_CORRECT_2_2</a> = 3044 : 3044
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_2" id="XML_SCHEMAP_E_PROPS_CORRECT_2">XML_SCHEMAP_E_PROPS_CORRECT_2</a> = 3045 : 3045
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_3" id="XML_SCHEMAP_E_PROPS_CORRECT_3">XML_SCHEMAP_E_PROPS_CORRECT_3</a> = 3046 : 3046
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_4" id="XML_SCHEMAP_E_PROPS_CORRECT_4">XML_SCHEMAP_E_PROPS_CORRECT_4</a> = 3047 : 3047
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_5" id="XML_SCHEMAP_E_PROPS_CORRECT_5">XML_SCHEMAP_E_PROPS_CORRECT_5</a> = 3048 : 3048
+ <a name="XML_SCHEMAP_E_PROPS_CORRECT_6" id="XML_SCHEMAP_E_PROPS_CORRECT_6">XML_SCHEMAP_E_PROPS_CORRECT_6</a> = 3049 : 3049
+ <a name="XML_SCHEMAP_SRC_INCLUDE" id="XML_SCHEMAP_SRC_INCLUDE">XML_SCHEMAP_SRC_INCLUDE</a> = 3050 : 3050
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_1" id="XML_SCHEMAP_SRC_ATTRIBUTE_1">XML_SCHEMAP_SRC_ATTRIBUTE_1</a> = 3051 : 3051
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_2" id="XML_SCHEMAP_SRC_ATTRIBUTE_2">XML_SCHEMAP_SRC_ATTRIBUTE_2</a> = 3052 : 3052
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_3_1" id="XML_SCHEMAP_SRC_ATTRIBUTE_3_1">XML_SCHEMAP_SRC_ATTRIBUTE_3_1</a> = 3053 : 3053
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_3_2" id="XML_SCHEMAP_SRC_ATTRIBUTE_3_2">XML_SCHEMAP_SRC_ATTRIBUTE_3_2</a> = 3054 : 3054
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_4" id="XML_SCHEMAP_SRC_ATTRIBUTE_4">XML_SCHEMAP_SRC_ATTRIBUTE_4</a> = 3055 : 3055
+ <a name="XML_SCHEMAP_NO_XMLNS" id="XML_SCHEMAP_NO_XMLNS">XML_SCHEMAP_NO_XMLNS</a> = 3056 : 3056
+ <a name="XML_SCHEMAP_NO_XSI" id="XML_SCHEMAP_NO_XSI">XML_SCHEMAP_NO_XSI</a> = 3057 : 3057
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_1" id="XML_SCHEMAP_COS_VALID_DEFAULT_1">XML_SCHEMAP_COS_VALID_DEFAULT_1</a> = 3058 : 3058
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_1" id="XML_SCHEMAP_COS_VALID_DEFAULT_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_1</a> = 3059 : 3059
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1" id="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1</a> = 3060 : 3060
+ <a name="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2" id="XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2">XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2</a> = 3061 : 3061
+ <a name="XML_SCHEMAP_CVC_SIMPLE_TYPE" id="XML_SCHEMAP_CVC_SIMPLE_TYPE">XML_SCHEMAP_CVC_SIMPLE_TYPE</a> = 3062 : 3062
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_1" id="XML_SCHEMAP_COS_CT_EXTENDS_1_1">XML_SCHEMAP_COS_CT_EXTENDS_1_1</a> = 3063 : 3063
+ <a name="XML_SCHEMAP_SRC_IMPORT_1_1" id="XML_SCHEMAP_SRC_IMPORT_1_1">XML_SCHEMAP_SRC_IMPORT_1_1</a> = 3064 : 3064
+ <a name="XML_SCHEMAP_SRC_IMPORT_1_2" id="XML_SCHEMAP_SRC_IMPORT_1_2">XML_SCHEMAP_SRC_IMPORT_1_2</a> = 3065 : 3065
+ <a name="XML_SCHEMAP_SRC_IMPORT_2" id="XML_SCHEMAP_SRC_IMPORT_2">XML_SCHEMAP_SRC_IMPORT_2</a> = 3066 : 3066
+ <a name="XML_SCHEMAP_SRC_IMPORT_2_1" id="XML_SCHEMAP_SRC_IMPORT_2_1">XML_SCHEMAP_SRC_IMPORT_2_1</a> = 3067 : 3067
+ <a name="XML_SCHEMAP_SRC_IMPORT_2_2" id="XML_SCHEMAP_SRC_IMPORT_2_2">XML_SCHEMAP_SRC_IMPORT_2_2</a> = 3068 : 3068
+ <a name="XML_SCHEMAP_INTERNAL" id="XML_SCHEMAP_INTERNAL">XML_SCHEMAP_INTERNAL</a> = 3069 : 3069 non-W3C
+ <a name="XML_SCHEMAP_NOT_DETERMINISTIC" id="XML_SCHEMAP_NOT_DETERMINISTIC">XML_SCHEMAP_NOT_DETERMINISTIC</a> = 3070 : 3070 non-W3C
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1" id="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1</a> = 3071 : 3071
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2" id="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2</a> = 3072 : 3072
+ <a name="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3" id="XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3">XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3</a> = 3073 : 3073
+ <a name="XML_SCHEMAP_MG_PROPS_CORRECT_1" id="XML_SCHEMAP_MG_PROPS_CORRECT_1">XML_SCHEMAP_MG_PROPS_CORRECT_1</a> = 3074 : 3074
+ <a name="XML_SCHEMAP_MG_PROPS_CORRECT_2" id="XML_SCHEMAP_MG_PROPS_CORRECT_2">XML_SCHEMAP_MG_PROPS_CORRECT_2</a> = 3075 : 3075
+ <a name="XML_SCHEMAP_SRC_CT_1" id="XML_SCHEMAP_SRC_CT_1">XML_SCHEMAP_SRC_CT_1</a> = 3076 : 3076
+ <a name="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3" id="XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3">XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3</a> = 3077 : 3077
+ <a name="XML_SCHEMAP_AU_PROPS_CORRECT_2" id="XML_SCHEMAP_AU_PROPS_CORRECT_2">XML_SCHEMAP_AU_PROPS_CORRECT_2</a> = 3078 : 3078
+ <a name="XML_SCHEMAP_A_PROPS_CORRECT_2" id="XML_SCHEMAP_A_PROPS_CORRECT_2">XML_SCHEMAP_A_PROPS_CORRECT_2</a> = 3079 : 3079
+ <a name="XML_SCHEMAP_C_PROPS_CORRECT" id="XML_SCHEMAP_C_PROPS_CORRECT">XML_SCHEMAP_C_PROPS_CORRECT</a> = 3080 : 3080
+ <a name="XML_SCHEMAP_SRC_REDEFINE" id="XML_SCHEMAP_SRC_REDEFINE">XML_SCHEMAP_SRC_REDEFINE</a> = 3081 : 3081
+ <a name="XML_SCHEMAP_SRC_IMPORT" id="XML_SCHEMAP_SRC_IMPORT">XML_SCHEMAP_SRC_IMPORT</a> = 3082 : 3082
+ <a name="XML_SCHEMAP_WARN_SKIP_SCHEMA" id="XML_SCHEMAP_WARN_SKIP_SCHEMA">XML_SCHEMAP_WARN_SKIP_SCHEMA</a> = 3083 : 3083
+ <a name="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA" id="XML_SCHEMAP_WARN_UNLOCATED_SCHEMA">XML_SCHEMAP_WARN_UNLOCATED_SCHEMA</a> = 3084 : 3084
+ <a name="XML_SCHEMAP_WARN_ATTR_REDECL_PROH" id="XML_SCHEMAP_WARN_ATTR_REDECL_PROH">XML_SCHEMAP_WARN_ATTR_REDECL_PROH</a> = 3085 : 3085
+ <a name="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH" id="XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH">XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH</a> = 3086 : 3085
+ <a name="XML_SCHEMAP_AG_PROPS_CORRECT" id="XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a> = 3087 : 3086
+ <a name="XML_SCHEMAP_COS_CT_EXTENDS_1_2" id="XML_SCHEMAP_COS_CT_EXTENDS_1_2">XML_SCHEMAP_COS_CT_EXTENDS_1_2</a> = 3088 : 3087
+ <a name="XML_SCHEMAP_AU_PROPS_CORRECT" id="XML_SCHEMAP_AU_PROPS_CORRECT">XML_SCHEMAP_AU_PROPS_CORRECT</a> = 3089 : 3088
+ <a name="XML_SCHEMAP_A_PROPS_CORRECT_3" id="XML_SCHEMAP_A_PROPS_CORRECT_3">XML_SCHEMAP_A_PROPS_CORRECT_3</a> = 3090 : 3089
+ <a name="XML_SCHEMAP_COS_ALL_LIMITED" id="XML_SCHEMAP_COS_ALL_LIMITED">XML_SCHEMAP_COS_ALL_LIMITED</a> = 3091 : 3090
+ <a name="XML_SCHEMATRONV_ASSERT" id="XML_SCHEMATRONV_ASSERT">XML_SCHEMATRONV_ASSERT</a> = 4000 : 4000
+ <a name="XML_SCHEMATRONV_REPORT" id="XML_SCHEMATRONV_REPORT">XML_SCHEMATRONV_REPORT</a> = 4001
+ <a name="XML_MODULE_OPEN" id="XML_MODULE_OPEN">XML_MODULE_OPEN</a> = 4900 : 4900
+ <a name="XML_MODULE_CLOSE" id="XML_MODULE_CLOSE">XML_MODULE_CLOSE</a> = 4901 : 4901
+ <a name="XML_CHECK_FOUND_ELEMENT" id="XML_CHECK_FOUND_ELEMENT">XML_CHECK_FOUND_ELEMENT</a> = 5000
+ <a name="XML_CHECK_FOUND_ATTRIBUTE" id="XML_CHECK_FOUND_ATTRIBUTE">XML_CHECK_FOUND_ATTRIBUTE</a> = 5001 : 5001
+ <a name="XML_CHECK_FOUND_TEXT" id="XML_CHECK_FOUND_TEXT">XML_CHECK_FOUND_TEXT</a> = 5002 : 5002
+ <a name="XML_CHECK_FOUND_CDATA" id="XML_CHECK_FOUND_CDATA">XML_CHECK_FOUND_CDATA</a> = 5003 : 5003
+ <a name="XML_CHECK_FOUND_ENTITYREF" id="XML_CHECK_FOUND_ENTITYREF">XML_CHECK_FOUND_ENTITYREF</a> = 5004 : 5004
+ <a name="XML_CHECK_FOUND_ENTITY" id="XML_CHECK_FOUND_ENTITY">XML_CHECK_FOUND_ENTITY</a> = 5005 : 5005
+ <a name="XML_CHECK_FOUND_PI" id="XML_CHECK_FOUND_PI">XML_CHECK_FOUND_PI</a> = 5006 : 5006
+ <a name="XML_CHECK_FOUND_COMMENT" id="XML_CHECK_FOUND_COMMENT">XML_CHECK_FOUND_COMMENT</a> = 5007 : 5007
+ <a name="XML_CHECK_FOUND_DOCTYPE" id="XML_CHECK_FOUND_DOCTYPE">XML_CHECK_FOUND_DOCTYPE</a> = 5008 : 5008
+ <a name="XML_CHECK_FOUND_FRAGMENT" id="XML_CHECK_FOUND_FRAGMENT">XML_CHECK_FOUND_FRAGMENT</a> = 5009 : 5009
+ <a name="XML_CHECK_FOUND_NOTATION" id="XML_CHECK_FOUND_NOTATION">XML_CHECK_FOUND_NOTATION</a> = 5010 : 5010
+ <a name="XML_CHECK_UNKNOWN_NODE" id="XML_CHECK_UNKNOWN_NODE">XML_CHECK_UNKNOWN_NODE</a> = 5011 : 5011
+ <a name="XML_CHECK_ENTITY_TYPE" id="XML_CHECK_ENTITY_TYPE">XML_CHECK_ENTITY_TYPE</a> = 5012 : 5012
+ <a name="XML_CHECK_NO_PARENT" id="XML_CHECK_NO_PARENT">XML_CHECK_NO_PARENT</a> = 5013 : 5013
+ <a name="XML_CHECK_NO_DOC" id="XML_CHECK_NO_DOC">XML_CHECK_NO_DOC</a> = 5014 : 5014
+ <a name="XML_CHECK_NO_NAME" id="XML_CHECK_NO_NAME">XML_CHECK_NO_NAME</a> = 5015 : 5015
+ <a name="XML_CHECK_NO_ELEM" id="XML_CHECK_NO_ELEM">XML_CHECK_NO_ELEM</a> = 5016 : 5016
+ <a name="XML_CHECK_WRONG_DOC" id="XML_CHECK_WRONG_DOC">XML_CHECK_WRONG_DOC</a> = 5017 : 5017
+ <a name="XML_CHECK_NO_PREV" id="XML_CHECK_NO_PREV">XML_CHECK_NO_PREV</a> = 5018 : 5018
+ <a name="XML_CHECK_WRONG_PREV" id="XML_CHECK_WRONG_PREV">XML_CHECK_WRONG_PREV</a> = 5019 : 5019
+ <a name="XML_CHECK_NO_NEXT" id="XML_CHECK_NO_NEXT">XML_CHECK_NO_NEXT</a> = 5020 : 5020
+ <a name="XML_CHECK_WRONG_NEXT" id="XML_CHECK_WRONG_NEXT">XML_CHECK_WRONG_NEXT</a> = 5021 : 5021
+ <a name="XML_CHECK_NOT_DTD" id="XML_CHECK_NOT_DTD">XML_CHECK_NOT_DTD</a> = 5022 : 5022
+ <a name="XML_CHECK_NOT_ATTR" id="XML_CHECK_NOT_ATTR">XML_CHECK_NOT_ATTR</a> = 5023 : 5023
+ <a name="XML_CHECK_NOT_ATTR_DECL" id="XML_CHECK_NOT_ATTR_DECL">XML_CHECK_NOT_ATTR_DECL</a> = 5024 : 5024
+ <a name="XML_CHECK_NOT_ELEM_DECL" id="XML_CHECK_NOT_ELEM_DECL">XML_CHECK_NOT_ELEM_DECL</a> = 5025 : 5025
+ <a name="XML_CHECK_NOT_ENTITY_DECL" id="XML_CHECK_NOT_ENTITY_DECL">XML_CHECK_NOT_ENTITY_DECL</a> = 5026 : 5026
+ <a name="XML_CHECK_NOT_NS_DECL" id="XML_CHECK_NOT_NS_DECL">XML_CHECK_NOT_NS_DECL</a> = 5027 : 5027
+ <a name="XML_CHECK_NO_HREF" id="XML_CHECK_NO_HREF">XML_CHECK_NO_HREF</a> = 5028 : 5028
+ <a name="XML_CHECK_WRONG_PARENT" id="XML_CHECK_WRONG_PARENT">XML_CHECK_WRONG_PARENT</a> = 5029 : 5029
+ <a name="XML_CHECK_NS_SCOPE" id="XML_CHECK_NS_SCOPE">XML_CHECK_NS_SCOPE</a> = 5030 : 5030
+ <a name="XML_CHECK_NS_ANCESTOR" id="XML_CHECK_NS_ANCESTOR">XML_CHECK_NS_ANCESTOR</a> = 5031 : 5031
+ <a name="XML_CHECK_NOT_UTF8" id="XML_CHECK_NOT_UTF8">XML_CHECK_NOT_UTF8</a> = 5032 : 5032
+ <a name="XML_CHECK_NO_DICT" id="XML_CHECK_NO_DICT">XML_CHECK_NO_DICT</a> = 5033 : 5033
+ <a name="XML_CHECK_NOT_NCNAME" id="XML_CHECK_NOT_NCNAME">XML_CHECK_NOT_NCNAME</a> = 5034 : 5034
+ <a name="XML_CHECK_OUTSIDE_DICT" id="XML_CHECK_OUTSIDE_DICT">XML_CHECK_OUTSIDE_DICT</a> = 5035 : 5035
+ <a name="XML_CHECK_WRONG_NAME" id="XML_CHECK_WRONG_NAME">XML_CHECK_WRONG_NAME</a> = 5036 : 5036
+ <a name="XML_CHECK_NAME_NOT_NULL" id="XML_CHECK_NAME_NOT_NULL">XML_CHECK_NAME_NOT_NULL</a> = 5037 : 5037
+ <a name="XML_I18N_NO_NAME" id="XML_I18N_NO_NAME">XML_I18N_NO_NAME</a> = 6000
+ <a name="XML_I18N_NO_HANDLER" id="XML_I18N_NO_HANDLER">XML_I18N_NO_HANDLER</a> = 6001 : 6001
+ <a name="XML_I18N_EXCESS_HANDLER" id="XML_I18N_EXCESS_HANDLER">XML_I18N_EXCESS_HANDLER</a> = 6002 : 6002
+ <a name="XML_I18N_CONV_FAILED" id="XML_I18N_CONV_FAILED">XML_I18N_CONV_FAILED</a> = 6003 : 6003
+ <a name="XML_I18N_NO_OUTPUT" id="XML_I18N_NO_OUTPUT">XML_I18N_NO_OUTPUT</a> = 6004 : 6004
+ <a name="XML_BUF_OVERFLOW" id="XML_BUF_OVERFLOW">XML_BUF_OVERFLOW</a> = 7000
+}
+</pre><h3><a name="initGenericErrorDefaultFunc" id="initGenericErrorDefaultFunc"></a>Function: initGenericErrorDefaultFunc</h3><pre class="programlisting">void initGenericErrorDefaultFunc (<a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> * handler)<br />
+</pre><p>Set or reset (if NULL) the default handler for generic errors to the builtin error function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the handler</td></tr></tbody></table></div><h3><a name="xmlCopyError" id="xmlCopyError"></a>Function: xmlCopyError</h3><pre class="programlisting">int xmlCopyError (<a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> from, <br /> <a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> to)<br />
+</pre><p>Save the original error to the new place.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>a source error</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>a target error</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlCtxtGetLastError" id="xmlCtxtGetLastError"></a>Function: xmlCtxtGetLastError</h3><pre class="programlisting"><a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> xmlCtxtGetLastError (void * ctx)<br />
+</pre><p>Get the last parsing error registered.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if no error occured or a pointer to the error</td></tr></tbody></table></div><h3><a name="xmlCtxtResetLastError" id="xmlCtxtResetLastError"></a>Function: xmlCtxtResetLastError</h3><pre class="programlisting">void xmlCtxtResetLastError (void * ctx)<br />
+</pre><p>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr></tbody></table></div><h3><a name="xmlGenericErrorFunc" id="xmlGenericErrorFunc"></a>Function type: xmlGenericErrorFunc</h3><pre class="programlisting">Function type: xmlGenericErrorFunc
+void xmlGenericErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of the function to use when there is an error and no parsing or validity context available .</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>a parsing context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>the extra arguments of the varags to format the message</td></tr></tbody></table></div><br />
+<h3><a name="xmlGetLastError" id="xmlGetLastError"></a>Function: xmlGetLastError</h3><pre class="programlisting"><a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> xmlGetLastError (void)<br />
+</pre><p>Get the last global error registered. This is per thread if compiled with thread support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL if no error occured or a pointer to the error</td></tr></tbody></table></div><h3><a name="xmlParserError" id="xmlParserError"></a>Function: xmlParserError</h3><pre class="programlisting">void xmlParserError (void * ctx, <br /> const char * msg, <br /> ... ...)<br />
+</pre><p>Display and format an error messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><h3><a name="xmlParserPrintFileContext" id="xmlParserPrintFileContext"></a>Function: xmlParserPrintFileContext</h3><pre class="programlisting">void xmlParserPrintFileContext (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br />
+</pre><p>Displays current context within the input content for error tracking</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input</td></tr></tbody></table></div><h3><a name="xmlParserPrintFileInfo" id="xmlParserPrintFileInfo"></a>Function: xmlParserPrintFileInfo</h3><pre class="programlisting">void xmlParserPrintFileInfo (<a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input)<br />
+</pre><p>Displays the associated file and line informations for the current input</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input</td></tr></tbody></table></div><h3><a name="xmlParserValidityError" id="xmlParserValidityError"></a>Function: xmlParserValidityError</h3><pre class="programlisting">void xmlParserValidityError (void * ctx, <br /> const char * msg, <br /> ... ...)<br />
+</pre><p>Display and format an validity error messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><h3><a name="xmlParserValidityWarning" id="xmlParserValidityWarning"></a>Function: xmlParserValidityWarning</h3><pre class="programlisting">void xmlParserValidityWarning (void * ctx, <br /> const char * msg, <br /> ... ...)<br />
+</pre><p>Display and format a validity warning messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><h3><a name="xmlParserWarning" id="xmlParserWarning"></a>Function: xmlParserWarning</h3><pre class="programlisting">void xmlParserWarning (void * ctx, <br /> const char * msg, <br /> ... ...)<br />
+</pre><p>Display and format a warning messages, gives file, line, position and extra parameters.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an XML parser context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message to display/transmit</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message display</td></tr></tbody></table></div><h3><a name="xmlResetError" id="xmlResetError"></a>Function: xmlResetError</h3><pre class="programlisting">void xmlResetError (<a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> err)<br />
+</pre><p>Cleanup the error.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div><h3><a name="xmlResetLastError" id="xmlResetLastError"></a>Function: xmlResetLastError</h3><pre class="programlisting">void xmlResetLastError (void)<br />
+</pre><p>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</p>
+<h3><a name="xmlSetGenericErrorFunc" id="xmlSetGenericErrorFunc"></a>Function: xmlSetGenericErrorFunc</h3><pre class="programlisting">void xmlSetGenericErrorFunc (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlGenericErrorFunc">xmlGenericErrorFunc</a> handler)<br />
+</pre><p>Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. For multi-threaded applications, this must be set separately for each thread.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the new error handling context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new handler function</td></tr></tbody></table></div><h3><a name="xmlSetStructuredErrorFunc" id="xmlSetStructuredErrorFunc"></a>Function: xmlSetStructuredErrorFunc</h3><pre class="programlisting">void xmlSetStructuredErrorFunc (void * ctx, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> handler)<br />
+</pre><p>Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the new error handling context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new handler function</td></tr></tbody></table></div><h3><a name="xmlStructuredErrorFunc" id="xmlStructuredErrorFunc"></a>Function type: xmlStructuredErrorFunc</h3><pre class="programlisting">Function type: xmlStructuredErrorFunc
+void xmlStructuredErrorFunc (void * userData, <br /> <a href="libxml-xmlerror.html#xmlErrorPtr">xmlErrorPtr</a> error)
+</pre><p>Signature of the function to use when there is an error and the module handles the new error reporting mechanism.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlexports.html b/doc/html/libxml-xmlexports.html
new file mode 100644
index 0000000..152995a
--- /dev/null
+++ b/doc/html/libxml-xmlexports.html
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlexports from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlexports from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlerror.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlerror.html">xmlerror</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlmemory.html">xmlmemory</a></th><td><a accesskey="n" href="libxml-xmlmemory.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>macros for marking symbols as exportable/importable. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBXML_DLL_IMPORT">LIBXML_DLL_IMPORT</a></pre><pre class="programlisting">#define <a href="#XMLCALL">XMLCALL</a></pre><pre class="programlisting">#define <a href="#XMLCDECL">XMLCDECL</a></pre><pre class="programlisting">#define <a href="#XMLPUBFUN">XMLPUBFUN</a></pre><pre class="programlisting">#define <a href="#XMLPUBVAR">XMLPUBVAR</a></pre><pre class="programlisting">#define <a href="#_REENTRANT">_REENTRANT</a></pre><h2>Description</h2>
+<h3><a name="LIBXML_DLL_IMPORT" id="LIBXML_DLL_IMPORT"></a>Macro: LIBXML_DLL_IMPORT</h3><pre>#define LIBXML_DLL_IMPORT</pre><p></p>
+<h3><a name="XMLCALL" id="XMLCALL"></a>Macro: XMLCALL</h3><pre>#define XMLCALL</pre><p></p>
+<h3><a name="XMLCDECL" id="XMLCDECL"></a>Macro: XMLCDECL</h3><pre>#define XMLCDECL</pre><p></p>
+<h3><a name="XMLPUBFUN" id="XMLPUBFUN"></a>Macro: XMLPUBFUN</h3><pre>#define XMLPUBFUN</pre><p></p>
+<h3><a name="XMLPUBVAR" id="XMLPUBVAR"></a>Macro: XMLPUBVAR</h3><pre>#define XMLPUBVAR</pre><p></p>
+<h3><a name="_REENTRANT" id="_REENTRANT"></a>Macro: _REENTRANT</h3><pre>#define _REENTRANT</pre><p></p>
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlmemory.html b/doc/html/libxml-xmlmemory.html
new file mode 100644
index 0000000..d653775
--- /dev/null
+++ b/doc/html/libxml-xmlmemory.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlmemory from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlmemory from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlexports.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlexports.html">xmlexports</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlmodule.html">xmlmodule</a></th><td><a accesskey="n" href="libxml-xmlmodule.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>provides interfaces for the memory allocator, including debugging capabilities. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#DEBUG_MEMORY">DEBUG_MEMORY</a></pre><pre class="programlisting">Variable <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> <a name="xmlMalloc" id="xmlMalloc"></a>xmlMalloc
+
+</pre><pre class="programlisting">Variable <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> <a name="xmlMallocAtomic" id="xmlMallocAtomic"></a>xmlMallocAtomic
+
+</pre><pre class="programlisting">Variable <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> <a name="xmlMemStrdup" id="xmlMemStrdup"></a>xmlMemStrdup
+
+</pre><pre class="programlisting">Variable <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> <a name="xmlRealloc" id="xmlRealloc"></a>xmlRealloc
+
+</pre><pre class="programlisting">void <a href="#xmlCleanupMemory">xmlCleanupMemory</a> (void)</pre>
+<pre class="programlisting">Function type: <a href="#xmlFreeFunc">xmlFreeFunc</a>
+void <a href="#xmlFreeFunc">xmlFreeFunc</a> (void * mem)
+</pre>
+<pre class="programlisting">int <a href="#xmlGcMemGet">xmlGcMemGet</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)</pre>
+<pre class="programlisting">int <a href="#xmlGcMemSetup">xmlGcMemSetup</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)</pre>
+<pre class="programlisting">int <a href="#xmlInitMemory">xmlInitMemory</a> (void)</pre>
+<pre class="programlisting">void * <a href="#xmlMallocAtomicLoc">xmlMallocAtomicLoc</a> (size_t size, <br /> const char * file, <br /> int line)</pre>
+<pre class="programlisting">Function type: <a href="#xmlMallocFunc">xmlMallocFunc</a>
+void * <a href="#xmlMallocFunc">xmlMallocFunc</a> (size_t size)
+</pre>
+<pre class="programlisting">void * <a href="#xmlMallocLoc">xmlMallocLoc</a> (size_t size, <br /> const char * file, <br /> int line)</pre>
+<pre class="programlisting">int <a href="#xmlMemBlocks">xmlMemBlocks</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlMemDisplay">xmlMemDisplay</a> (FILE * fp)</pre>
+<pre class="programlisting">void <a href="#xmlMemDisplayLast">xmlMemDisplayLast</a> (FILE * fp, <br /> long nbBytes)</pre>
+<pre class="programlisting">void <a href="#xmlMemFree">xmlMemFree</a> (void * ptr)</pre>
+<pre class="programlisting">int <a href="#xmlMemGet">xmlMemGet</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)</pre>
+<pre class="programlisting">void * <a href="#xmlMemMalloc">xmlMemMalloc</a> (size_t size)</pre>
+<pre class="programlisting">void * <a href="#xmlMemRealloc">xmlMemRealloc</a> (void * ptr, <br /> size_t size)</pre>
+<pre class="programlisting">int <a href="#xmlMemSetup">xmlMemSetup</a> (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)</pre>
+<pre class="programlisting">void <a href="#xmlMemShow">xmlMemShow</a> (FILE * fp, <br /> int nr)</pre>
+<pre class="programlisting">char * <a href="#xmlMemStrdupLoc">xmlMemStrdupLoc</a> (const char * str, <br /> const char * file, <br /> int line)</pre>
+<pre class="programlisting">int <a href="#xmlMemUsed">xmlMemUsed</a> (void)</pre>
+<pre class="programlisting">void <a href="#xmlMemoryDump">xmlMemoryDump</a> (void)</pre>
+<pre class="programlisting">char * <a href="#xmlMemoryStrdup">xmlMemoryStrdup</a> (const char * str)</pre>
+<pre class="programlisting">Function type: <a href="#xmlReallocFunc">xmlReallocFunc</a>
+void * <a href="#xmlReallocFunc">xmlReallocFunc</a> (void * mem, <br /> size_t size)
+</pre>
+<pre class="programlisting">void * <a href="#xmlReallocLoc">xmlReallocLoc</a> (void * ptr, <br /> size_t size, <br /> const char * file, <br /> int line)</pre>
+<pre class="programlisting">Function type: <a href="#xmlStrdupFunc">xmlStrdupFunc</a>
+char * <a href="#xmlStrdupFunc">xmlStrdupFunc</a> (const char * str)
+</pre>
+<h2>Description</h2>
+<h3><a name="DEBUG_MEMORY" id="DEBUG_MEMORY"></a>Macro: DEBUG_MEMORY</h3><pre>#define DEBUG_MEMORY</pre><p><a href="libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> replaces the allocator with a collect and debug shell to the libc allocator. <a href="libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a> should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define <a href="libxml-xmlversion.html#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></p>
+<h3><a name="xmlCleanupMemory" id="xmlCleanupMemory"></a>Function: xmlCleanupMemory</h3><pre class="programlisting">void xmlCleanupMemory (void)<br />
+</pre><p>Free up all the memory allocated by the library for its own use. This should not be called by user level code.</p>
+<h3><a name="xmlFreeFunc" id="xmlFreeFunc"></a>Function type: xmlFreeFunc</h3><pre class="programlisting">Function type: xmlFreeFunc
+void xmlFreeFunc (void * mem)
+</pre><p>Signature for a free() implementation.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr></tbody></table></div><br />
+<h3><a name="xmlGcMemGet" id="xmlGcMemGet"></a>Function: xmlGcMemGet</h3><pre class="programlisting">int xmlGcMemGet (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocAtomicFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br />
+</pre><p>Provides the memory access functions set currently in use The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>place to save the atomic malloc() function in use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlGcMemSetup" id="xmlGcMemSetup"></a>Function: xmlGcMemSetup</h3><pre class="programlisting">int xmlGcMemSetup (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocAtomicFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br />
+</pre><p>Override the default memory access functions with a new set This has to be called before any other libxml routines ! The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators Should this be blocked if there was already some allocations done ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><span class="term"><i><tt>mallocAtomicFunc</tt></i>:</span></td><td>the malloc() function to use for atomic allocations</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlInitMemory" id="xmlInitMemory"></a>Function: xmlInitMemory</h3><pre class="programlisting">int xmlInitMemory (void)<br />
+</pre><p>Initialize the memory layer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlMallocAtomicLoc" id="xmlMallocAtomicLoc"></a>Function: xmlMallocAtomicLoc</h3><pre class="programlisting">void * xmlMallocAtomicLoc (size_t size, <br /> const char * file, <br /> int line)<br />
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMallocFunc" id="xmlMallocFunc"></a>Function type: xmlMallocFunc</h3><pre class="programlisting">Function type: xmlMallocFunc
+void * xmlMallocFunc (size_t size)
+</pre><p>Signature for a malloc() implementation.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size requested in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly allocated block or NULL in case of error.</td></tr></tbody></table></div><br />
+<h3><a name="xmlMallocLoc" id="xmlMallocLoc"></a>Function: xmlMallocLoc</h3><pre class="programlisting">void * xmlMallocLoc (size_t size, <br /> const char * file, <br /> int line)<br />
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMemBlocks" id="xmlMemBlocks"></a>Function: xmlMemBlocks</h3><pre class="programlisting">int xmlMemBlocks (void)<br />
+</pre><p>Provides the number of memory areas currently allocated</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the number of blocks</td></tr></tbody></table></div><h3><a name="xmlMemDisplay" id="xmlMemDisplay"></a>Function: xmlMemDisplay</h3><pre class="programlisting">void xmlMemDisplay (FILE * fp)<br />
+</pre><p>show in-extenso the memory blocks allocated</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr></tbody></table></div><h3><a name="xmlMemDisplayLast" id="xmlMemDisplayLast"></a>Function: xmlMemDisplayLast</h3><pre class="programlisting">void xmlMemDisplayLast (FILE * fp, <br /> long nbBytes)<br />
+</pre><p>the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist</td></tr><tr><td><span class="term"><i><tt>nbBytes</tt></i>:</span></td><td>the amount of memory to dump</td></tr></tbody></table></div><h3><a name="xmlMemFree" id="xmlMemFree"></a>Function: xmlMemFree</h3><pre class="programlisting">void xmlMemFree (void * ptr)<br />
+</pre><p>a free() equivalent, with error checking.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the memory block pointer</td></tr></tbody></table></div><h3><a name="xmlMemGet" id="xmlMemGet"></a>Function: xmlMemGet</h3><pre class="programlisting">int xmlMemGet (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> * freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> * mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> * reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> * strdupFunc)<br />
+</pre><p>Provides the memory access functions set currently in use</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>place to save the free() function in use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>place to save the malloc() function in use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>place to save the realloc() function in use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>place to save the strdup() function in use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlMemMalloc" id="xmlMemMalloc"></a>Function: xmlMemMalloc</h3><pre class="programlisting">void * xmlMemMalloc (size_t size)<br />
+</pre><p>a malloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMemRealloc" id="xmlMemRealloc"></a>Function: xmlMemRealloc</h3><pre class="programlisting">void * xmlMemRealloc (void * ptr, <br /> size_t size)<br />
+</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlMemSetup" id="xmlMemSetup"></a>Function: xmlMemSetup</h3><pre class="programlisting">int xmlMemSetup (<a href="libxml-xmlmemory.html#xmlFreeFunc">xmlFreeFunc</a> freeFunc, <br /> <a href="libxml-xmlmemory.html#xmlMallocFunc">xmlMallocFunc</a> mallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlReallocFunc">xmlReallocFunc</a> reallocFunc, <br /> <a href="libxml-xmlmemory.html#xmlStrdupFunc">xmlStrdupFunc</a> strdupFunc)<br />
+</pre><p>Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ?</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>freeFunc</tt></i>:</span></td><td>the free() function to use</td></tr><tr><td><span class="term"><i><tt>mallocFunc</tt></i>:</span></td><td>the malloc() function to use</td></tr><tr><td><span class="term"><i><tt>reallocFunc</tt></i>:</span></td><td>the realloc() function to use</td></tr><tr><td><span class="term"><i><tt>strdupFunc</tt></i>:</span></td><td>the strdup() function to use</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success</td></tr></tbody></table></div><h3><a name="xmlMemShow" id="xmlMemShow"></a>Function: xmlMemShow</h3><pre class="programlisting">void xmlMemShow (FILE * fp, <br /> int nr)<br />
+</pre><p>show a show display of the memory allocated, and dump the @nr last allocated areas which were not freed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fp</tt></i>:</span></td><td>a FILE descriptor used as the output file</td></tr><tr><td><span class="term"><i><tt>nr</tt></i>:</span></td><td>number of entries to dump</td></tr></tbody></table></div><h3><a name="xmlMemStrdupLoc" id="xmlMemStrdupLoc"></a>Function: xmlMemStrdupLoc</h3><pre class="programlisting">char * xmlMemStrdupLoc (const char * str, <br /> const char * file, <br /> int line)<br />
+</pre><p>a strdup() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div><h3><a name="xmlMemUsed" id="xmlMemUsed"></a>Function: xmlMemUsed</h3><pre class="programlisting">int xmlMemUsed (void)<br />
+</pre><p>Provides the amount of memory currently allocated</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int representing the amount of memory allocated.</td></tr></tbody></table></div><h3><a name="xmlMemoryDump" id="xmlMemoryDump"></a>Function: xmlMemoryDump</h3><pre class="programlisting">void xmlMemoryDump (void)<br />
+</pre><p>Dump in-extenso the memory blocks allocated to the file .memorylist</p>
+<h3><a name="xmlMemoryStrdup" id="xmlMemoryStrdup"></a>Function: xmlMemoryStrdup</h3><pre class="programlisting">char * xmlMemoryStrdup (const char * str)<br />
+</pre><p>a strdup() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the initial string pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new string or NULL if allocation error occurred.</td></tr></tbody></table></div><h3><a name="xmlReallocFunc" id="xmlReallocFunc"></a>Function type: xmlReallocFunc</h3><pre class="programlisting">Function type: xmlReallocFunc
+void * xmlReallocFunc (void * mem, <br /> size_t size)
+</pre><p>Signature for a realloc() implementation.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>mem</tt></i>:</span></td><td>an already allocated block of memory</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the new size requested in bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the newly reallocated block or NULL in case of error.</td></tr></tbody></table></div><br />
+<h3><a name="xmlReallocLoc" id="xmlReallocLoc"></a>Function: xmlReallocLoc</h3><pre class="programlisting">void * xmlReallocLoc (void * ptr, <br /> size_t size, <br /> const char * file, <br /> int line)<br />
+</pre><p>a realloc() equivalent, with logging of the allocation info.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ptr</tt></i>:</span></td><td>the initial memory block pointer</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>an int specifying the size in byte to allocate.</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name or NULL</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the allocated area or NULL in case of lack of memory.</td></tr></tbody></table></div><h3><a name="xmlStrdupFunc" id="xmlStrdupFunc"></a>Function type: xmlStrdupFunc</h3><pre class="programlisting">Function type: xmlStrdupFunc
+char * xmlStrdupFunc (const char * str)
+</pre><p>Signature for an strdup() implementation.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>a zero terminated string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy of the string or NULL in case of error.</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlmodule.html b/doc/html/libxml-xmlmodule.html
new file mode 100644
index 0000000..1e25a92
--- /dev/null
+++ b/doc/html/libxml-xmlmodule.html
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlmodule from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlmodule from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlmemory.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlmemory.html">xmlmemory</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlreader.html">xmlreader</a></th><td><a accesskey="n" href="libxml-xmlreader.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>basic API for dynamic module loading, used by libexslt added in 2.6.17 </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlModule">xmlModule</a><br />struct _xmlModule
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Enum <a href="#xmlModuleOption">xmlModuleOption</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlmodule.html#xmlModule">xmlModule</a> * <a name="xmlModulePtr" id="xmlModulePtr">xmlModulePtr</a>
+</pre><pre class="programlisting">int <a href="#xmlModuleClose">xmlModuleClose</a> (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)</pre>
+<pre class="programlisting">int <a href="#xmlModuleFree">xmlModuleFree</a> (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)</pre>
+<pre class="programlisting"><a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> <a href="#xmlModuleOpen">xmlModuleOpen</a> (const char * name, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlModuleSymbol">xmlModuleSymbol</a> (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br /> const char * name, <br /> void ** symbol)</pre>
+<h2>Description</h2>
+<h3><a name="xmlModule" id="xmlModule">Structure xmlModule</a></h3><pre class="programlisting">Structure xmlModule<br />struct _xmlModule {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlModuleOption" id="xmlModuleOption">xmlModuleOption</a></h3><pre class="programlisting">Enum xmlModuleOption {
+ <a name="XML_MODULE_LAZY" id="XML_MODULE_LAZY">XML_MODULE_LAZY</a> = 1 : lazy binding
+ <a name="XML_MODULE_LOCAL" id="XML_MODULE_LOCAL">XML_MODULE_LOCAL</a> = 2 : local binding
+}
+</pre>
+ A handle to a dynamically loaded module
+ <h3><a name="xmlModuleClose" id="xmlModuleClose"></a>Function: xmlModuleClose</h3><pre class="programlisting">int xmlModuleClose (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br />
+</pre><p>The close operations unload the associated module and free the data associated to the module.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.</td></tr></tbody></table></div><h3><a name="xmlModuleFree" id="xmlModuleFree"></a>Function: xmlModuleFree</h3><pre class="programlisting">int xmlModuleFree (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br />
+</pre><p>The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error</td></tr></tbody></table></div><h3><a name="xmlModuleOpen" id="xmlModuleOpen"></a>Function: xmlModuleOpen</h3><pre class="programlisting"><a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> xmlModuleOpen (const char * name, <br /> int options)<br />
+</pre><p>Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * . TODO: options are not yet implemented.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the module name</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml-xmlmodule.html#xmlModuleOption">xmlModuleOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handle for the module or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlModuleSymbol" id="xmlModuleSymbol"></a>Function: xmlModuleSymbol</h3><pre class="programlisting">int xmlModuleSymbol (<a href="libxml-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br /> const char * name, <br /> void ** symbol)<br />
+</pre><p>Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * .</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the symbol</td></tr><tr><td><span class="term"><i><tt>symbol</tt></i>:</span></td><td>the resulting symbol address</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the symbol was found, or -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlreader.html b/doc/html/libxml-xmlreader.html
new file mode 100644
index 0000000..f7e00fb
--- /dev/null
+++ b/doc/html/libxml-xmlreader.html
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlreader from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlreader from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlmodule.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlmodule.html">xmlmodule</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlregexp.html">xmlregexp</a></th><td><a accesskey="n" href="libxml-xmlregexp.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API of the XML streaming API based on C# interfaces. </p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xmlParserProperties">xmlParserProperties</a>
+</pre><pre class="programlisting">Enum <a href="#xmlParserSeverities">xmlParserSeverities</a>
+</pre><pre class="programlisting">Enum <a href="#xmlReaderTypes">xmlReaderTypes</a>
+</pre><pre class="programlisting">Structure <a href="#xmlTextReader">xmlTextReader</a><br />struct _xmlTextReader
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef void * <a name="xmlTextReaderLocatorPtr" id="xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlTextReaderMode">xmlTextReaderMode</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlreader.html#xmlTextReader">xmlTextReader</a> * <a name="xmlTextReaderPtr" id="xmlTextReaderPtr">xmlTextReaderPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlFreeTextReader">xmlFreeTextReader</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlNewTextReader">xmlNewTextReader</a> (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> const char * URI)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlNewTextReaderFilename">xmlNewTextReaderFilename</a> (const char * URI)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForDoc">xmlReaderForDoc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForFd">xmlReaderForFd</a> (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForFile">xmlReaderForFile</a> (const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForIO">xmlReaderForIO</a> (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderForMemory">xmlReaderForMemory</a> (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewDoc">xmlReaderNewDoc</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewFd">xmlReaderNewFd</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewFile">xmlReaderNewFile</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewIO">xmlReaderNewIO</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewMemory">xmlReaderNewMemory</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlReaderNewWalker">xmlReaderNewWalker</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> <a href="#xmlReaderWalker">xmlReaderWalker</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderAttributeCount">xmlTextReaderAttributeCount</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderBaseUri">xmlTextReaderBaseUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">long <a href="#xmlTextReaderByteConsumed">xmlTextReaderByteConsumed</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderClose">xmlTextReaderClose</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstBaseUri">xmlTextReaderConstBaseUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstEncoding">xmlTextReaderConstEncoding</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstLocalName">xmlTextReaderConstLocalName</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstName">xmlTextReaderConstName</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstNamespaceUri">xmlTextReaderConstNamespaceUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstPrefix">xmlTextReaderConstPrefix</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstString">xmlTextReaderConstString</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstValue">xmlTextReaderConstValue</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstXmlLang">xmlTextReaderConstXmlLang</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderConstXmlVersion">xmlTextReaderConstXmlVersion</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderCurrentNode">xmlTextReaderCurrentNode</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderDepth">xmlTextReaderDepth</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">Function type: <a href="#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a>
+void <a href="#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> (void * arg, <br /> const char * msg, <br /> <a href="libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity, <br /> <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)
+</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderExpand">xmlTextReaderExpand</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttribute">xmlTextReaderGetAttribute</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttributeNo">xmlTextReaderGetAttributeNo</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int no)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderGetAttributeNs">xmlTextReaderGetAttributeNs</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)</pre>
+<pre class="programlisting">void <a href="#xmlTextReaderGetErrorHandler">xmlTextReaderGetErrorHandler</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> * f, <br /> void ** arg)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderGetParserColumnNumber">xmlTextReaderGetParserColumnNumber</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderGetParserLineNumber">xmlTextReaderGetParserLineNumber</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderGetParserProp">xmlTextReaderGetParserProp</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> <a href="#xmlTextReaderGetRemainder">xmlTextReaderGetRemainder</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderHasAttributes">xmlTextReaderHasAttributes</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderHasValue">xmlTextReaderHasValue</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderIsDefault">xmlTextReaderIsDefault</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderIsEmptyElement">xmlTextReaderIsEmptyElement</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderIsNamespaceDecl">xmlTextReaderIsNamespaceDecl</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderIsValid">xmlTextReaderIsValid</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLocalName">xmlTextReaderLocalName</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLocatorBaseURI">xmlTextReaderLocatorBaseURI</a> (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderLocatorLineNumber">xmlTextReaderLocatorLineNumber</a> (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderLookupNamespace">xmlTextReaderLookupNamespace</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToAttribute">xmlTextReaderMoveToAttribute</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToAttributeNo">xmlTextReaderMoveToAttributeNo</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int no)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToAttributeNs">xmlTextReaderMoveToAttributeNs</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToElement">xmlTextReaderMoveToElement</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToFirstAttribute">xmlTextReaderMoveToFirstAttribute</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderMoveToNextAttribute">xmlTextReaderMoveToNextAttribute</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderName">xmlTextReaderName</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderNamespaceUri">xmlTextReaderNamespaceUri</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderNext">xmlTextReaderNext</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderNextSibling">xmlTextReaderNextSibling</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderNodeType">xmlTextReaderNodeType</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderNormalization">xmlTextReaderNormalization</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderPrefix">xmlTextReaderPrefix</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextReaderPreserve">xmlTextReaderPreserve</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderPreservePattern">xmlTextReaderPreservePattern</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderQuoteChar">xmlTextReaderQuoteChar</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderRead">xmlTextReaderRead</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderReadAttributeValue">xmlTextReaderReadAttributeValue</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadInnerXml">xmlTextReaderReadInnerXml</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadOuterXml">xmlTextReaderReadOuterXml</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderReadState">xmlTextReaderReadState</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderReadString">xmlTextReaderReadString</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderRelaxNGSetSchema">xmlTextReaderRelaxNGSetSchema</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderRelaxNGValidate">xmlTextReaderRelaxNGValidate</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * rng)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderRelaxNGValidateCtxt">xmlTextReaderRelaxNGValidateCtxt</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderSchemaValidate">xmlTextReaderSchemaValidate</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * xsd)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderSchemaValidateCtxt">xmlTextReaderSchemaValidateCtxt</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)</pre>
+<pre class="programlisting">void <a href="#xmlTextReaderSetErrorHandler">xmlTextReaderSetErrorHandler</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br /> void * arg)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderSetParserProp">xmlTextReaderSetParserProp</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop, <br /> int value)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderSetSchema">xmlTextReaderSetSchema</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlTextReaderSetStructuredErrorHandler">xmlTextReaderSetStructuredErrorHandler</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> f, <br /> void * arg)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderSetup">xmlTextReaderSetup</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> const char * URL, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlTextReaderStandalone">xmlTextReaderStandalone</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderValue">xmlTextReaderValue</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlTextReaderXmlLang">xmlTextReaderXmlLang</a> (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)</pre>
+<h2>Description</h2>
+<h3>Enum <a name="xmlParserProperties" id="xmlParserProperties">xmlParserProperties</a></h3><pre class="programlisting">Enum xmlParserProperties {
+ <a name="XML_PARSER_LOADDTD" id="XML_PARSER_LOADDTD">XML_PARSER_LOADDTD</a> = 1
+ <a name="XML_PARSER_DEFAULTATTRS" id="XML_PARSER_DEFAULTATTRS">XML_PARSER_DEFAULTATTRS</a> = 2
+ <a name="XML_PARSER_VALIDATE" id="XML_PARSER_VALIDATE">XML_PARSER_VALIDATE</a> = 3
+ <a name="XML_PARSER_SUBST_ENTITIES" id="XML_PARSER_SUBST_ENTITIES">XML_PARSER_SUBST_ENTITIES</a> = 4
+}
+</pre><h3>Enum <a name="xmlParserSeverities" id="xmlParserSeverities">xmlParserSeverities</a></h3><pre class="programlisting">Enum xmlParserSeverities {
+ <a name="XML_PARSER_SEVERITY_VALIDITY_WARNING" id="XML_PARSER_SEVERITY_VALIDITY_WARNING">XML_PARSER_SEVERITY_VALIDITY_WARNING</a> = 1
+ <a name="XML_PARSER_SEVERITY_VALIDITY_ERROR" id="XML_PARSER_SEVERITY_VALIDITY_ERROR">XML_PARSER_SEVERITY_VALIDITY_ERROR</a> = 2
+ <a name="XML_PARSER_SEVERITY_WARNING" id="XML_PARSER_SEVERITY_WARNING">XML_PARSER_SEVERITY_WARNING</a> = 3
+ <a name="XML_PARSER_SEVERITY_ERROR" id="XML_PARSER_SEVERITY_ERROR">XML_PARSER_SEVERITY_ERROR</a> = 4
+}
+</pre><h3>Enum <a name="xmlReaderTypes" id="xmlReaderTypes">xmlReaderTypes</a></h3><pre class="programlisting">Enum xmlReaderTypes {
+ <a name="XML_READER_TYPE_NONE" id="XML_READER_TYPE_NONE">XML_READER_TYPE_NONE</a> = 0
+ <a name="XML_READER_TYPE_ELEMENT" id="XML_READER_TYPE_ELEMENT">XML_READER_TYPE_ELEMENT</a> = 1
+ <a name="XML_READER_TYPE_ATTRIBUTE" id="XML_READER_TYPE_ATTRIBUTE">XML_READER_TYPE_ATTRIBUTE</a> = 2
+ <a name="XML_READER_TYPE_TEXT" id="XML_READER_TYPE_TEXT">XML_READER_TYPE_TEXT</a> = 3
+ <a name="XML_READER_TYPE_CDATA" id="XML_READER_TYPE_CDATA">XML_READER_TYPE_CDATA</a> = 4
+ <a name="XML_READER_TYPE_ENTITY_REFERENCE" id="XML_READER_TYPE_ENTITY_REFERENCE">XML_READER_TYPE_ENTITY_REFERENCE</a> = 5
+ <a name="XML_READER_TYPE_ENTITY" id="XML_READER_TYPE_ENTITY">XML_READER_TYPE_ENTITY</a> = 6
+ <a name="XML_READER_TYPE_PROCESSING_INSTRUCTION" id="XML_READER_TYPE_PROCESSING_INSTRUCTION">XML_READER_TYPE_PROCESSING_INSTRUCTION</a> = 7
+ <a name="XML_READER_TYPE_COMMENT" id="XML_READER_TYPE_COMMENT">XML_READER_TYPE_COMMENT</a> = 8
+ <a name="XML_READER_TYPE_DOCUMENT" id="XML_READER_TYPE_DOCUMENT">XML_READER_TYPE_DOCUMENT</a> = 9
+ <a name="XML_READER_TYPE_DOCUMENT_TYPE" id="XML_READER_TYPE_DOCUMENT_TYPE">XML_READER_TYPE_DOCUMENT_TYPE</a> = 10
+ <a name="XML_READER_TYPE_DOCUMENT_FRAGMENT" id="XML_READER_TYPE_DOCUMENT_FRAGMENT">XML_READER_TYPE_DOCUMENT_FRAGMENT</a> = 11
+ <a name="XML_READER_TYPE_NOTATION" id="XML_READER_TYPE_NOTATION">XML_READER_TYPE_NOTATION</a> = 12
+ <a name="XML_READER_TYPE_WHITESPACE" id="XML_READER_TYPE_WHITESPACE">XML_READER_TYPE_WHITESPACE</a> = 13
+ <a name="XML_READER_TYPE_SIGNIFICANT_WHITESPACE" id="XML_READER_TYPE_SIGNIFICANT_WHITESPACE">XML_READER_TYPE_SIGNIFICANT_WHITESPACE</a> = 14
+ <a name="XML_READER_TYPE_END_ELEMENT" id="XML_READER_TYPE_END_ELEMENT">XML_READER_TYPE_END_ELEMENT</a> = 15
+ <a name="XML_READER_TYPE_END_ENTITY" id="XML_READER_TYPE_END_ENTITY">XML_READER_TYPE_END_ENTITY</a> = 16
+ <a name="XML_READER_TYPE_XML_DECLARATION" id="XML_READER_TYPE_XML_DECLARATION">XML_READER_TYPE_XML_DECLARATION</a> = 17
+}
+</pre><h3><a name="xmlTextReader" id="xmlTextReader">Structure xmlTextReader</a></h3><pre class="programlisting">Structure xmlTextReader<br />struct _xmlTextReader {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlTextReaderMode" id="xmlTextReaderMode">xmlTextReaderMode</a></h3><pre class="programlisting">Enum xmlTextReaderMode {
+ <a name="XML_TEXTREADER_MODE_INITIAL" id="XML_TEXTREADER_MODE_INITIAL">XML_TEXTREADER_MODE_INITIAL</a> = 0
+ <a name="XML_TEXTREADER_MODE_INTERACTIVE" id="XML_TEXTREADER_MODE_INTERACTIVE">XML_TEXTREADER_MODE_INTERACTIVE</a> = 1
+ <a name="XML_TEXTREADER_MODE_ERROR" id="XML_TEXTREADER_MODE_ERROR">XML_TEXTREADER_MODE_ERROR</a> = 2
+ <a name="XML_TEXTREADER_MODE_EOF" id="XML_TEXTREADER_MODE_EOF">XML_TEXTREADER_MODE_EOF</a> = 3
+ <a name="XML_TEXTREADER_MODE_CLOSED" id="XML_TEXTREADER_MODE_CLOSED">XML_TEXTREADER_MODE_CLOSED</a> = 4
+ <a name="XML_TEXTREADER_MODE_READING" id="XML_TEXTREADER_MODE_READING">XML_TEXTREADER_MODE_READING</a> = 5
+}
+</pre>
+ Pointer to an xmlReader context.
+ <h3><a name="xmlFreeTextReader" id="xmlFreeTextReader"></a>Function: xmlFreeTextReader</h3><pre class="programlisting">void xmlFreeTextReader (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Deallocate all the resources associated to the reader</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a></td></tr></tbody></table></div><h3><a name="xmlNewTextReader" id="xmlNewTextReader"></a>Function: xmlNewTextReader</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReader (<a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> const char * URI)<br />
+</pre><p>Create an <a href="libxml-xmlreader.html#xmlTextReader">xmlTextReader</a> structure fed with @input</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> used to read data</td></tr><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI information for the source if available</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextReaderFilename" id="xmlNewTextReaderFilename"></a>Function: xmlNewTextReaderFilename</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlNewTextReaderFilename (const char * URI)<br />
+</pre><p>Create an <a href="libxml-xmlreader.html#xmlTextReader">xmlTextReader</a> structure fed with the resource at @URI</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URI</tt></i>:</span></td><td>the URI of the resource to process</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderForDoc" id="xmlReaderForDoc"></a>Function: xmlReaderForDoc</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForDoc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlReaderForFd" id="xmlReaderForFd"></a>Function: xmlReaderForFd</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForFd (int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlReaderForFile" id="xmlReaderForFile"></a>Function: xmlReaderForFile</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForFile (const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlReaderForIO" id="xmlReaderForIO"></a>Function: xmlReaderForIO</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForIO (<a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlReaderForMemory" id="xmlReaderForMemory"></a>Function: xmlReaderForMemory</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderForMemory (const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlReaderNewDoc" id="xmlReaderNewDoc"></a>Function: xmlReaderNewDoc</h3><pre class="programlisting">int xmlReaderNewDoc (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>a pointer to a zero terminated string</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderNewFd" id="xmlReaderNewFd"></a>Function: xmlReaderNewFd</h3><pre class="programlisting">int xmlReaderNewFd (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int fd, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>an open file descriptor</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderNewFile" id="xmlReaderNewFile"></a>Function: xmlReaderNewFile</h3><pre class="programlisting">int xmlReaderNewFile (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file or URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderNewIO" id="xmlReaderNewIO"></a>Function: xmlReaderNewIO</h3><pre class="programlisting">int xmlReaderNewIO (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> ioread, <br /> <a href="libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Setup an xmltextReader to parse an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>ioread</tt></i>:</span></td><td>an I/O read function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderNewMemory" id="xmlReaderNewMemory"></a>Function: xmlReaderNewMemory</h3><pre class="programlisting">int xmlReaderNewMemory (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * buffer, <br /> int size, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderNewWalker" id="xmlReaderNewWalker"></a>Function: xmlReaderNewWalker</h3><pre class="programlisting">int xmlReaderNewWalker (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlReaderWalker" id="xmlReaderWalker"></a>Function: xmlReaderWalker</h3><pre class="programlisting"><a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> xmlReaderWalker (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Create an xmltextReader for a preparsed document.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new reader or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderAttributeCount" id="xmlTextReaderAttributeCount"></a>Function: xmlTextReaderAttributeCount</h3><pre class="programlisting">int xmlTextReaderAttributeCount (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Provides the number of attributes of the current node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 i no attributes, -1 in case of error or the <a href="libxml-SAX.html#attribute">attribute</a> count</td></tr></tbody></table></div><h3><a name="xmlTextReaderBaseUri" id="xmlTextReaderBaseUri"></a>Function: xmlTextReaderBaseUri</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderBaseUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The base URI of the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderByteConsumed" id="xmlTextReaderByteConsumed"></a>Function: xmlTextReaderByteConsumed</h3><pre class="programlisting">long xmlTextReaderByteConsumed (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the index in bytes from the beginning of the entity or -1 in case the index could not be computed.</td></tr></tbody></table></div><h3><a name="xmlTextReaderClose" id="xmlTextReaderClose"></a>Function: xmlTextReaderClose</h3><pre class="programlisting">int xmlTextReaderClose (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstBaseUri" id="xmlTextReaderConstBaseUri"></a>Function: xmlTextReaderConstBaseUri</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstBaseUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The base URI of the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL if not available, the string will be deallocated with the reader</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstEncoding" id="xmlTextReaderConstEncoding"></a>Function: xmlTextReaderConstEncoding</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstEncoding (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Determine the encoding of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstLocalName" id="xmlTextReaderConstLocalName"></a>Function: xmlTextReaderConstLocalName</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstLocalName (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The local name of the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, the string will be deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstName" id="xmlTextReaderConstName"></a>Function: xmlTextReaderConstName</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstName (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The qualified name of the node, equal to Prefix :LocalName.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, the string is deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstNamespaceUri" id="xmlTextReaderConstNamespaceUri"></a>Function: xmlTextReaderConstNamespaceUri</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstNamespaceUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The URI defining the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace URI or NULL if not available, the string will be deallocated with the reader</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstPrefix" id="xmlTextReaderConstPrefix"></a>Function: xmlTextReaderConstPrefix</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstPrefix (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>A shorthand <a href="libxml-SAX.html#reference">reference</a> to the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the prefix or NULL if not available, the string is deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstString" id="xmlTextReaderConstString"></a>Function: xmlTextReaderConstString</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstString (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Get an interned string from the reader, allows for example to speedup string name comparisons</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string to intern.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an interned copy of the string or NULL in case of error. The string will be deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstValue" id="xmlTextReaderConstValue"></a>Function: xmlTextReaderConstValue</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Provides the text value of the node if present</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string or NULL if not available. The result will be deallocated on the next Read() operation.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstXmlLang" id="xmlTextReaderConstXmlLang"></a>Function: xmlTextReaderConstXmlLang</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstXmlLang (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The xml:lang scope within which the node resides.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xml:lang value or NULL if none exists.</td></tr></tbody></table></div><h3><a name="xmlTextReaderConstXmlVersion" id="xmlTextReaderConstXmlVersion"></a>Function: xmlTextReaderConstXmlVersion</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderConstXmlVersion (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Determine the XML version of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader.</td></tr></tbody></table></div><h3><a name="xmlTextReaderCurrentDoc" id="xmlTextReaderCurrentDoc"></a>Function: xmlTextReaderCurrentDoc</h3><pre class="programlisting"><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> xmlTextReaderCurrentDoc (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Hacking interface allowing to get the <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> correponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderCurrentNode" id="xmlTextReaderCurrentNode"></a>Function: xmlTextReaderCurrentNode</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderCurrentNode (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Hacking interface allowing to get the <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderDepth" id="xmlTextReaderDepth"></a>Function: xmlTextReaderDepth</h3><pre class="programlisting">int xmlTextReaderDepth (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The depth of the node in the tree.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the depth or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderErrorFunc" id="xmlTextReaderErrorFunc"></a>Function type: xmlTextReaderErrorFunc</h3><pre class="programlisting">Function type: xmlTextReaderErrorFunc
+void xmlTextReaderErrorFunc (void * arg, <br /> const char * msg, <br /> <a href="libxml-xmlreader.html#xmlParserSeverities">xmlParserSeverities</a> severity, <br /> <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)
+</pre><p>Signature of an error callback from a reader parser</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>the user argument</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>severity</tt></i>:</span></td><td>the severity of the error</td></tr><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>a locator indicating where the error occured</td></tr></tbody></table></div><br />
+<h3><a name="xmlTextReaderExpand" id="xmlTextReaderExpand"></a>Function: xmlTextReaderExpand</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderExpand (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetAttribute" id="xmlTextReaderGetAttribute"></a>Function: xmlTextReaderGetAttribute</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttribute (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Provides the value of the <a href="libxml-SAX.html#attribute">attribute</a> with the specified qualified name.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the qualified name of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetAttributeNo" id="xmlTextReaderGetAttributeNo"></a>Function: xmlTextReaderGetAttributeNo</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttributeNo (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int no)<br />
+</pre><p>Provides the value of the <a href="libxml-SAX.html#attribute">attribute</a> with the specified index relative to the containing element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the zero-based index of the <a href="libxml-SAX.html#attribute">attribute</a> relative to the containing element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetAttributeNs" id="xmlTextReaderGetAttributeNs"></a>Function: xmlTextReaderGetAttributeNs</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderGetAttributeNs (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br />
+</pre><p>Provides the value of the specified <a href="libxml-SAX.html#attribute">attribute</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name of the attribute.</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>the namespace URI of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetErrorHandler" id="xmlTextReaderGetErrorHandler"></a>Function: xmlTextReaderGetErrorHandler</h3><pre class="programlisting">void xmlTextReaderGetErrorHandler (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> * f, <br /> void ** arg)<br />
+</pre><p>Retrieve the error callback function and user argument.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function or NULL is no callback has been registered</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetParserColumnNumber" id="xmlTextReaderGetParserColumnNumber"></a>Function: xmlTextReaderGetParserColumnNumber</h3><pre class="programlisting">int xmlTextReaderGetParserColumnNumber (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Provide the column number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the user data (XML reader context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int or 0 if not available</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetParserLineNumber" id="xmlTextReaderGetParserLineNumber"></a>Function: xmlTextReaderGetParserLineNumber</h3><pre class="programlisting">int xmlTextReaderGetParserLineNumber (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Provide the line number of the current parsing point.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the user data (XML reader context)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an int or 0 if not available</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetParserProp" id="xmlTextReaderGetParserProp"></a>Function: xmlTextReaderGetParserProp</h3><pre class="programlisting">int xmlTextReaderGetParserProp (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop)<br />
+</pre><p>Read the parser internal property.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prop</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a> to get</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value, usually 0 or 1, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderGetRemainder" id="xmlTextReaderGetRemainder"></a>Function: xmlTextReaderGetRemainder</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> xmlTextReaderGetRemainder (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what's left in reader-&gt;input, and there is an allocation problem. Best would be to rewrite it differently.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> attached to the XML or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderHasAttributes" id="xmlTextReaderHasAttributes"></a>Function: xmlTextReaderHasAttributes</h3><pre class="programlisting">int xmlTextReaderHasAttributes (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Whether the node has attributes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false, and -1 in case or error</td></tr></tbody></table></div><h3><a name="xmlTextReaderHasValue" id="xmlTextReaderHasValue"></a>Function: xmlTextReaderHasValue</h3><pre class="programlisting">int xmlTextReaderHasValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Whether the node can have a text value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false, and -1 in case or error</td></tr></tbody></table></div><h3><a name="xmlTextReaderIsDefault" id="xmlTextReaderIsDefault"></a>Function: xmlTextReaderIsDefault</h3><pre class="programlisting">int xmlTextReaderIsDefault (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Whether an Attribute node was generated from the default value defined in the DTD or schema.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if not defaulted, 1 if defaulted, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderIsEmptyElement" id="xmlTextReaderIsEmptyElement"></a>Function: xmlTextReaderIsEmptyElement</h3><pre class="programlisting">int xmlTextReaderIsEmptyElement (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Check if the current node is empty</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if empty, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderIsNamespaceDecl" id="xmlTextReaderIsNamespaceDecl"></a>Function: xmlTextReaderIsNamespaceDecl</h3><pre class="programlisting">int xmlTextReaderIsNamespaceDecl (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Determine whether the current node is a namespace declaration rather than a regular attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the current node is a namespace declaration, 0 if it is a regular <a href="libxml-SAX.html#attribute">attribute</a> or other type of node, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderIsValid" id="xmlTextReaderIsValid"></a>Function: xmlTextReaderIsValid</h3><pre class="programlisting">int xmlTextReaderIsValid (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Retrieve the validity status from the parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the flag value 1 if valid, 0 if no, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderLocalName" id="xmlTextReaderLocalName"></a>Function: xmlTextReaderLocalName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLocalName (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The local name of the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderLocatorBaseURI" id="xmlTextReaderLocatorBaseURI"></a>Function: xmlTextReaderLocatorBaseURI</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLocatorBaseURI (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)<br />
+</pre><p>Obtain the base URI for the given locator.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the base URI or NULL in case of error, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderLocatorLineNumber" id="xmlTextReaderLocatorLineNumber"></a>Function: xmlTextReaderLocatorLineNumber</h3><pre class="programlisting">int xmlTextReaderLocatorLineNumber (<a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> locator)<br />
+</pre><p>Obtain the line number for the given locator.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>locator</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderLocatorPtr">xmlTextReaderLocatorPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderLookupNamespace" id="xmlTextReaderLookupNamespace"></a>Function: xmlTextReaderLookupNamespace</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderLookupNamespace (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Resolves a namespace prefix in the scope of the current element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the namespace URI to which the prefix maps or NULL in case of error. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToAttribute" id="xmlTextReaderMoveToAttribute"></a>Function: xmlTextReaderMoveToAttribute</h3><pre class="programlisting">int xmlTextReaderMoveToAttribute (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Moves the position of the current instance to the <a href="libxml-SAX.html#attribute">attribute</a> with the specified qualified name.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the qualified name of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToAttributeNo" id="xmlTextReaderMoveToAttributeNo"></a>Function: xmlTextReaderMoveToAttributeNo</h3><pre class="programlisting">int xmlTextReaderMoveToAttributeNo (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int no)<br />
+</pre><p>Moves the position of the current instance to the <a href="libxml-SAX.html#attribute">attribute</a> with the specified index relative to the containing element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the zero-based index of the <a href="libxml-SAX.html#attribute">attribute</a> relative to the containing element.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToAttributeNs" id="xmlTextReaderMoveToAttributeNs"></a>Function: xmlTextReaderMoveToAttributeNs</h3><pre class="programlisting">int xmlTextReaderMoveToAttributeNs (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br />
+</pre><p>Moves the position of the current instance to the <a href="libxml-SAX.html#attribute">attribute</a> with the specified local name and namespace URI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name of the attribute.</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>the namespace URI of the attribute.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToElement" id="xmlTextReaderMoveToElement"></a>Function: xmlTextReaderMoveToElement</h3><pre class="programlisting">int xmlTextReaderMoveToElement (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Moves the position of the current instance to the node that contains the current Attribute node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not moved</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToFirstAttribute" id="xmlTextReaderMoveToFirstAttribute"></a>Function: xmlTextReaderMoveToFirstAttribute</h3><pre class="programlisting">int xmlTextReaderMoveToFirstAttribute (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Moves the position of the current instance to the first <a href="libxml-SAX.html#attribute">attribute</a> associated with the current node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div><h3><a name="xmlTextReaderMoveToNextAttribute" id="xmlTextReaderMoveToNextAttribute"></a>Function: xmlTextReaderMoveToNextAttribute</h3><pre class="programlisting">int xmlTextReaderMoveToNextAttribute (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Moves the position of the current instance to the next <a href="libxml-SAX.html#attribute">attribute</a> associated with the current node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, -1 in case of error, 0 if not found</td></tr></tbody></table></div><h3><a name="xmlTextReaderName" id="xmlTextReaderName"></a>Function: xmlTextReaderName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderName (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The qualified name of the node, equal to Prefix :LocalName.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the local name or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderNamespaceUri" id="xmlTextReaderNamespaceUri"></a>Function: xmlTextReaderNamespaceUri</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderNamespaceUri (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The URI defining the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderNext" id="xmlTextReaderNext"></a>Function: xmlTextReaderNext</h3><pre class="programlisting">int xmlTextReaderNext (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Skip to the node following the current one in document order while avoiding the subtree if any.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderNextSibling" id="xmlTextReaderNextSibling"></a>Function: xmlTextReaderNextSibling</h3><pre class="programlisting">int xmlTextReaderNextSibling (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderNodeType" id="xmlTextReaderNodeType"></a>Function: xmlTextReaderNodeType</h3><pre class="programlisting">int xmlTextReaderNodeType (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xmlNodeType of the current node or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderNormalization" id="xmlTextReaderNormalization"></a>Function: xmlTextReaderNormalization</h3><pre class="programlisting">int xmlTextReaderNormalization (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The value indicating whether to normalize white space and <a href="libxml-SAX.html#attribute">attribute</a> values. Since <a href="libxml-SAX.html#attribute">attribute</a> value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like &amp;#0; is of course not supported either.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderPrefix" id="xmlTextReaderPrefix"></a>Function: xmlTextReaderPrefix</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderPrefix (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>A shorthand <a href="libxml-SAX.html#reference">reference</a> to the namespace associated with the node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the prefix or NULL if not available, if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderPreserve" id="xmlTextReaderPreserve"></a>Function: xmlTextReaderPreserve</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextReaderPreserve (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderPreservePattern" id="xmlTextReaderPreservePattern"></a>Function: xmlTextReaderPreservePattern</h3><pre class="programlisting">int xmlTextReaderPreservePattern (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pattern, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** namespaces)<br />
+</pre><p>This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>pattern</tt></i>:</span></td><td>an XPath subset pattern</td></tr><tr><td><span class="term"><i><tt>namespaces</tt></i>:</span></td><td>the prefix definitions, array of [URI, prefix] or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a positive number in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderQuoteChar" id="xmlTextReaderQuoteChar"></a>Function: xmlTextReaderQuoteChar</h3><pre class="programlisting">int xmlTextReaderQuoteChar (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The quotation mark character used to enclose the value of an attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>" or ' and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderRead" id="xmlTextReaderRead"></a>Function: xmlTextReaderRead</h3><pre class="programlisting">int xmlTextReaderRead (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Moves the position of the current instance to the next node in the stream, exposing its properties.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderReadAttributeValue" id="xmlTextReaderReadAttributeValue"></a>Function: xmlTextReaderReadAttributeValue</h3><pre class="programlisting">int xmlTextReaderReadAttributeValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Parses an <a href="libxml-SAX.html#attribute">attribute</a> value into one or more Text and EntityReference nodes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 in case of success, 0 if the reader was not positionned on an ttribute node or all the <a href="libxml-SAX.html#attribute">attribute</a> values have been read, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderReadInnerXml" id="xmlTextReaderReadInnerXml"></a>Function: xmlTextReaderReadInnerXml</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadInnerXml (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Reads the contents of the current node, including child nodes and markup.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderReadOuterXml" id="xmlTextReaderReadOuterXml"></a>Function: xmlTextReaderReadOuterXml</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadOuterXml (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Reads the contents of the current node, including child nodes and markup.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the node and any XML content, or NULL if the current node cannot be serialized. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderReadState" id="xmlTextReaderReadState"></a>Function: xmlTextReaderReadState</h3><pre class="programlisting">int xmlTextReaderReadState (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Gets the read state of the reader.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the state value, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderReadString" id="xmlTextReaderReadString"></a>Function: xmlTextReaderReadString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderReadString (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Reads the contents of an element or a text node as a string.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string containing the contents of the Element or Text node, or NULL if the reader is positioned on any other type of node. The string must be deallocated by the caller.</td></tr></tbody></table></div><h3><a name="xmlTextReaderRelaxNGSetSchema" id="xmlTextReaderRelaxNGSetSchema"></a>Function: xmlTextReaderRelaxNGSetSchema</h3><pre class="programlisting">int xmlTextReaderRelaxNGSetSchema (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-relaxng.html#xmlRelaxNGPtr">xmlRelaxNGPtr</a> schema)<br />
+</pre><p>Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then RelaxNG validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled RelaxNG schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the RelaxNG validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderRelaxNGValidate" id="xmlTextReaderRelaxNGValidate"></a>Function: xmlTextReaderRelaxNGValidate</h3><pre class="programlisting">int xmlTextReaderRelaxNGValidate (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * rng)<br />
+</pre><p>Use RelaxNG schema to validate the document as it is processed. Activation is only possible before the first Read(). If @rng is NULL, then RelaxNG schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>rng</tt></i>:</span></td><td>the path to a RelaxNG schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderRelaxNGValidateCtxt" id="xmlTextReaderRelaxNGValidateCtxt"></a>Function: xmlTextReaderRelaxNGValidateCtxt</h3><pre class="programlisting">int xmlTextReaderRelaxNGValidateCtxt (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> int options)<br />
+</pre><p>Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then RelaxNG schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the RelaxNG schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidate" id="xmlTextReaderSchemaValidate"></a>Function: xmlTextReaderSchemaValidate</h3><pre class="programlisting">int xmlTextReaderSchemaValidate (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> const char * xsd)<br />
+</pre><p>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>xsd</tt></i>:</span></td><td>the path to a W3C XSD schema or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSchemaValidateCtxt" id="xmlTextReaderSchemaValidateCtxt"></a>Function: xmlTextReaderSchemaValidateCtxt</h3><pre class="programlisting">int xmlTextReaderSchemaValidateCtxt (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br />
+</pre><p>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XML Schema validation context or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (not used yet)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the schemas validation could be (de)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetErrorHandler" id="xmlTextReaderSetErrorHandler"></a>Function: xmlTextReaderSetErrorHandler</h3><pre class="programlisting">void xmlTextReaderSetErrorHandler (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlreader.html#xmlTextReaderErrorFunc">xmlTextReaderErrorFunc</a> f, <br /> void * arg)<br />
+</pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function to call on error and warnings</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument to pass to the callback function</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetParserProp" id="xmlTextReaderSetParserProp"></a>Function: xmlTextReaderSetParserProp</h3><pre class="programlisting">int xmlTextReaderSetParserProp (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> int prop, <br /> int value)<br />
+</pre><p>Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>prop</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlParserProperties">xmlParserProperties</a> to set</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>usually 0 or 1 to (de)activate it</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the call was successful, or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetSchema" id="xmlTextReaderSetSchema"></a>Function: xmlTextReaderSetSchema</h3><pre class="programlisting">int xmlTextReaderSetSchema (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
+</pre><p>Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then Schema validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled Schema schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case the Schema validation could be (des)activated and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetStructuredErrorHandler" id="xmlTextReaderSetStructuredErrorHandler"></a>Function: xmlTextReaderSetStructuredErrorHandler</h3><pre class="programlisting">void xmlTextReaderSetStructuredErrorHandler (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> f, <br /> void * arg)<br />
+</pre><p>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the callback function to call on error and warnings</td></tr><tr><td><span class="term"><i><tt>arg</tt></i>:</span></td><td>a user argument to pass to the callback function</td></tr></tbody></table></div><h3><a name="xmlTextReaderSetup" id="xmlTextReaderSetup"></a>Function: xmlTextReaderSetup</h3><pre class="programlisting">int xmlTextReaderSetup (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> const char * URL, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Setup an XML reader with new options</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>an XML reader</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td><a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> used to feed the reader, will be destroyed with it.</td></tr><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the base URL to use for the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the document encoding, or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-parser.html#xmlParserOption">xmlParserOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderStandalone" id="xmlTextReaderStandalone"></a>Function: xmlTextReaderStandalone</h3><pre class="programlisting">int xmlTextReaderStandalone (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Determine the standalone status of the document being read.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the document was declared to be standalone, 0 if it was declared to be not standalone, or -1 if the document did not specify its standalone status or in case of error.</td></tr></tbody></table></div><h3><a name="xmlTextReaderValue" id="xmlTextReaderValue"></a>Function: xmlTextReaderValue</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderValue (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>Provides the text value of the node if present</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string or NULL if not available. The result must be deallocated with xmlFree()</td></tr></tbody></table></div><h3><a name="xmlTextReaderXmlLang" id="xmlTextReaderXmlLang"></a>Function: xmlTextReaderXmlLang</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlTextReaderXmlLang (<a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> reader)<br />
+</pre><p>The xml:lang scope within which the node resides.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>reader</tt></i>:</span></td><td>the <a href="libxml-xmlreader.html#xmlTextReaderPtr">xmlTextReaderPtr</a> used</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlregexp.html b/doc/html/libxml-xmlregexp.html
new file mode 100644
index 0000000..8dda699
--- /dev/null
+++ b/doc/html/libxml-xmlregexp.html
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlregexp from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlregexp from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlreader.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlreader.html">xmlreader</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlsave.html">xmlsave</a></th><td><a accesskey="n" href="libxml-xmlsave.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>basic API for libxml regular expressions handling used for XML Schemas and validation. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlExpCtxt">xmlExpCtxt</a><br />struct _xmlExpCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlregexp.html#xmlExpCtxt">xmlExpCtxt</a> * <a name="xmlExpCtxtPtr" id="xmlExpCtxtPtr">xmlExpCtxtPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlExpNode">xmlExpNode</a><br />struct _xmlExpNode
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlregexp.html#xmlExpNode">xmlExpNode</a> * <a name="xmlExpNodePtr" id="xmlExpNodePtr">xmlExpNodePtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlExpNodeType">xmlExpNodeType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRegExecCtxt">xmlRegExecCtxt</a><br />struct _xmlRegExecCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlregexp.html#xmlRegExecCtxt">xmlRegExecCtxt</a> * <a name="xmlRegExecCtxtPtr" id="xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlRegexp">xmlRegexp</a><br />struct _xmlRegexp
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlregexp.html#xmlRegexp">xmlRegexp</a> * <a name="xmlRegexpPtr" id="xmlRegexpPtr">xmlRegexpPtr</a>
+</pre><pre class="programlisting">int <a href="#xmlExpCtxtNbCons">xmlExpCtxtNbCons</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlExpCtxtNbNodes">xmlExpCtxtNbNodes</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlExpDump">xmlExpDump</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpExpDerive">xmlExpExpDerive</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)</pre>
+<pre class="programlisting">void <a href="#xmlExpFree">xmlExpFree</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre>
+<pre class="programlisting">void <a href="#xmlExpFreeCtxt">xmlExpFreeCtxt</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlExpGetLanguage">xmlExpGetLanguage</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlExpGetStart">xmlExpGetStart</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlExpIsNillable">xmlExpIsNillable</a> (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre>
+<pre class="programlisting">int <a href="#xmlExpMaxToken">xmlExpMaxToken</a> (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewAtom">xmlExpNewAtom</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> <a href="#xmlExpNewCtxt">xmlExpNewCtxt</a> (int maxNodes, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewOr">xmlExpNewOr</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewRange">xmlExpNewRange</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> subset, <br /> int min, <br /> int max)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpNewSeq">xmlExpNewSeq</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpParse">xmlExpParse</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const char * expr)</pre>
+<pre class="programlisting">void <a href="#xmlExpRef">xmlExpRef</a> (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> <a href="#xmlExpStringDerive">xmlExpStringDerive</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlExpSubsume">xmlExpSubsume</a> (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)</pre>
+<pre class="programlisting">Function type: <a href="#xmlRegExecCallbacks">xmlRegExecCallbacks</a>
+void <a href="#xmlRegExecCallbacks">xmlRegExecCallbacks</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> void * transdata, <br /> void * inputdata)
+</pre>
+<pre class="programlisting">int <a href="#xmlRegExecErrInfo">xmlRegExecErrInfo</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** string, <br /> int * nbval, <br /> int * nbneg, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** values, <br /> int * terminal)</pre>
+<pre class="programlisting">int <a href="#xmlRegExecNextValues">xmlRegExecNextValues</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> int * nbval, <br /> int * nbneg, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** values, <br /> int * terminal)</pre>
+<pre class="programlisting">int <a href="#xmlRegExecPushString">xmlRegExecPushString</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlRegExecPushString2">xmlRegExecPushString2</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value2, <br /> void * data)</pre>
+<pre class="programlisting">void <a href="#xmlRegFreeExecCtxt">xmlRegFreeExecCtxt</a> (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec)</pre>
+<pre class="programlisting">void <a href="#xmlRegFreeRegexp">xmlRegFreeRegexp</a> (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> <a href="#xmlRegNewExecCtxt">xmlRegNewExecCtxt</a> (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br /> <a href="libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a> callback, <br /> void * data)</pre>
+<pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> <a href="#xmlRegexpCompile">xmlRegexpCompile</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * regexp)</pre>
+<pre class="programlisting">int <a href="#xmlRegexpExec">xmlRegexpExec</a> (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a> (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp)</pre>
+<pre class="programlisting">void <a href="#xmlRegexpPrint">xmlRegexpPrint</a> (FILE * output, <br /> <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)</pre>
+<h2>Description</h2>
+<h3><a name="xmlExpCtxt" id="xmlExpCtxt">Structure xmlExpCtxt</a></h3><pre class="programlisting">Structure xmlExpCtxt<br />struct _xmlExpCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlExpNode" id="xmlExpNode">Structure xmlExpNode</a></h3><pre class="programlisting">Structure xmlExpNode<br />struct _xmlExpNode {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlExpNodeType" id="xmlExpNodeType">xmlExpNodeType</a></h3><pre class="programlisting">Enum xmlExpNodeType {
+ <a name="XML_EXP_EMPTY" id="XML_EXP_EMPTY">XML_EXP_EMPTY</a> = 0
+ <a name="XML_EXP_FORBID" id="XML_EXP_FORBID">XML_EXP_FORBID</a> = 1
+ <a name="XML_EXP_ATOM" id="XML_EXP_ATOM">XML_EXP_ATOM</a> = 2
+ <a name="XML_EXP_SEQ" id="XML_EXP_SEQ">XML_EXP_SEQ</a> = 3
+ <a name="XML_EXP_OR" id="XML_EXP_OR">XML_EXP_OR</a> = 4
+ <a name="XML_EXP_COUNT" id="XML_EXP_COUNT">XML_EXP_COUNT</a> = 5
+}
+</pre><h3><a name="xmlRegExecCtxt" id="xmlRegExecCtxt">Structure xmlRegExecCtxt</a></h3><pre class="programlisting">Structure xmlRegExecCtxt<br />struct _xmlRegExecCtxt {
+The content of this structure is not made public by the API.
+}</pre>
+ A libxml progressive regular expression evaluation context
+ <h3><a name="xmlRegexp" id="xmlRegexp">Structure xmlRegexp</a></h3><pre class="programlisting">Structure xmlRegexp<br />struct _xmlRegexp {
+The content of this structure is not made public by the API.
+}</pre>
+ A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.
+ <h3><a name="xmlExpCtxtNbCons" id="xmlExpCtxtNbCons"></a>Function: xmlExpCtxtNbCons</h3><pre class="programlisting">int xmlExpCtxtNbCons (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br />
+</pre><p>Debugging facility provides the number of allocated nodes over lifetime</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes ever allocated or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpCtxtNbNodes" id="xmlExpCtxtNbNodes"></a>Function: xmlExpCtxtNbNodes</h3><pre class="programlisting">int xmlExpCtxtNbNodes (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br />
+</pre><p>Debugging facility provides the number of allocated nodes at a that point</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of nodes in use or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpDump" id="xmlExpDump"></a>Function: xmlExpDump</h3><pre class="programlisting">void xmlExpDump (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br />
+</pre><p>Serialize the expression as compiled to the buffer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>a buffer to receive the output</td></tr><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>the compiled expression</td></tr></tbody></table></div><h3><a name="xmlExpExpDerive" id="xmlExpExpDerive"></a>Function: xmlExpExpDerive</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpExpDerive (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)<br />
+</pre><p>Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the englobing expression</td></tr><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>the subexpression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting expression or NULL in case of internal error, the result must be freed</td></tr></tbody></table></div><h3><a name="xmlExpFree" id="xmlExpFree"></a>Function: xmlExpFree</h3><pre class="programlisting">void xmlExpFree (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
+</pre><p>Dereference the expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div><h3><a name="xmlExpFreeCtxt" id="xmlExpFreeCtxt"></a>Function: xmlExpFreeCtxt</h3><pre class="programlisting">void xmlExpFreeCtxt (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt)<br />
+</pre><p>Free an expression context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an expression context</td></tr></tbody></table></div><h3><a name="xmlExpGetLanguage" id="xmlExpGetLanguage"></a>Function: xmlExpGetLanguage</h3><pre class="programlisting">int xmlExpGetLanguage (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** langList, <br /> int len)<br />
+</pre><p>Find all the strings used in @exp and store them in @list</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>langList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpGetStart" id="xmlExpGetStart"></a>Function: xmlExpGetStart</h3><pre class="programlisting">int xmlExpGetStart (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** tokList, <br /> int len)<br />
+</pre><p>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>tokList</tt></i>:</span></td><td>where to store the tokens</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the allocated length of @list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings</td></tr></tbody></table></div><h3><a name="xmlExpIsNillable" id="xmlExpIsNillable"></a>Function: xmlExpIsNillable</h3><pre class="programlisting">int xmlExpIsNillable (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
+</pre><p>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if nillable, 0 if not and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpMaxToken" id="xmlExpMaxToken"></a>Function: xmlExpMaxToken</h3><pre class="programlisting">int xmlExpMaxToken (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> expr)<br />
+</pre><p>Indicate the maximum number of input a expression can accept</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>a compiled expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum length or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewAtom" id="xmlExpNewAtom"></a>Function: xmlExpNewAtom</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewAtom (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> int len)<br />
+</pre><p>Get the atom associated to this name from that context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the atom name</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the atom name length in byte (or -1);</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewCtxt" id="xmlExpNewCtxt"></a>Function: xmlExpNewCtxt</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> xmlExpNewCtxt (int maxNodes, <br /> <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict)<br />
+</pre><p>Creates a new context for manipulating expressions</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>maxNodes</tt></i>:</span></td><td>the maximum number of nodes</td></tr><tr><td><span class="term"><i><tt>dict</tt></i>:</span></td><td>optional dictionnary to use internally</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewOr" id="xmlExpNewOr"></a>Function: xmlExpNewOr</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewOr (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br />
+</pre><p>Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>left</tt></i>:</span></td><td>left expression</td></tr><tr><td><span class="term"><i><tt>right</tt></i>:</span></td><td>right expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewRange" id="xmlExpNewRange"></a>Function: xmlExpNewRange</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewRange (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> subset, <br /> int min, <br /> int max)<br />
+</pre><p>Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>subset</tt></i>:</span></td><td>the expression to be repeated</td></tr><tr><td><span class="term"><i><tt>min</tt></i>:</span></td><td>the lower bound for the repetition</td></tr><tr><td><span class="term"><i><tt>max</tt></i>:</span></td><td>the upper bound for the repetition, -1 means infinite</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpNewSeq" id="xmlExpNewSeq"></a>Function: xmlExpNewSeq</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpNewSeq (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> left, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> right)<br />
+</pre><p>Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>left</tt></i>:</span></td><td>left expression</td></tr><tr><td><span class="term"><i><tt>right</tt></i>:</span></td><td>right expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlExpParse" id="xmlExpParse"></a>Function: xmlExpParse</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpParse (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> const char * expr)<br />
+</pre><p>Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>expr</tt></i>:</span></td><td>the 0 terminated string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new expression or NULL in case of failure</td></tr></tbody></table></div><h3><a name="xmlExpRef" id="xmlExpRef"></a>Function: xmlExpRef</h3><pre class="programlisting">void xmlExpRef (<a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp)<br />
+</pre><p>Increase the <a href="libxml-SAX.html#reference">reference</a> count of the expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr></tbody></table></div><h3><a name="xmlExpStringDerive" id="xmlExpStringDerive"></a>Function: xmlExpStringDerive</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> xmlExpStringDerive (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int len)<br />
+</pre><p>Do one step of Brzozowski derivation of the expression @exp with respect to the input string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expression context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the expression</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the string len in bytes if available</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the resulting expression or NULL in case of internal error</td></tr></tbody></table></div><h3><a name="xmlExpSubsume" id="xmlExpSubsume"></a>Function: xmlExpSubsume</h3><pre class="programlisting">int xmlExpSubsume (<a href="libxml-xmlregexp.html#xmlExpCtxtPtr">xmlExpCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> exp, <br /> <a href="libxml-xmlregexp.html#xmlExpNodePtr">xmlExpNodePtr</a> sub)<br />
+</pre><p>Check whether @exp accepts all the languages accexpted by @sub the input being a subexpression.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the expressions context</td></tr><tr><td><span class="term"><i><tt>exp</tt></i>:</span></td><td>the englobing expression</td></tr><tr><td><span class="term"><i><tt>sub</tt></i>:</span></td><td>the subexpression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 if false and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlRegExecCallbacks" id="xmlRegExecCallbacks"></a>Function type: xmlRegExecCallbacks</h3><pre class="programlisting">Function type: xmlRegExecCallbacks
+void xmlRegExecCallbacks (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * token, <br /> void * transdata, <br /> void * inputdata)
+</pre><p>Callback function when doing a transition in the automata</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>the regular expression context</td></tr><tr><td><span class="term"><i><tt>token</tt></i>:</span></td><td>the current token string</td></tr><tr><td><span class="term"><i><tt>transdata</tt></i>:</span></td><td>transition data</td></tr><tr><td><span class="term"><i><tt>inputdata</tt></i>:</span></td><td>input data</td></tr></tbody></table></div><br />
+<h3><a name="xmlRegExecErrInfo" id="xmlRegExecErrInfo"></a>Function: xmlRegExecErrInfo</h3><pre class="programlisting">int xmlRegExecErrInfo (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** string, <br /> int * nbval, <br /> int * nbneg, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** values, <br /> int * terminal)<br />
+</pre><p>Extract error informations from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context generating an error</td></tr><tr><td><span class="term"><i><tt>string</tt></i>:</span></td><td>return value for the error string</td></tr><tr><td><span class="term"><i><tt>nbval</tt></i>:</span></td><td>pointer to the number of accepted values IN/OUT</td></tr><tr><td><span class="term"><i><tt>nbneg</tt></i>:</span></td><td>return number of negative transitions</td></tr><tr><td><span class="term"><i><tt>values</tt></i>:</span></td><td>pointer to the array of acceptable values</td></tr><tr><td><span class="term"><i><tt>terminal</tt></i>:</span></td><td>return value if this was a terminal state</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRegExecNextValues" id="xmlRegExecNextValues"></a>Function: xmlRegExecNextValues</h3><pre class="programlisting">int xmlRegExecNextValues (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> int * nbval, <br /> int * nbneg, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** values, <br /> int * terminal)<br />
+</pre><p>Extract informations from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context</td></tr><tr><td><span class="term"><i><tt>nbval</tt></i>:</span></td><td>pointer to the number of accepted values IN/OUT</td></tr><tr><td><span class="term"><i><tt>nbneg</tt></i>:</span></td><td>return number of negative transitions</td></tr><tr><td><span class="term"><i><tt>values</tt></i>:</span></td><td>pointer to the array of acceptable values</td></tr><tr><td><span class="term"><i><tt>terminal</tt></i>:</span></td><td>return value if this was a terminal state</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>will be freed with the @exec context and don't need to be deallocated. Returns: 0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRegExecPushString" id="xmlRegExecPushString"></a>Function: xmlRegExecPushString</h3><pre class="programlisting">int xmlRegExecPushString (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> void * data)<br />
+</pre><p>Push one input token in the execution context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context or NULL to indicate the end</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a string token input</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the token to reuse in callbacks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.</td></tr></tbody></table></div><h3><a name="xmlRegExecPushString2" id="xmlRegExecPushString2"></a>Function: xmlRegExecPushString2</h3><pre class="programlisting">int xmlRegExecPushString2 (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value2, <br /> void * data)<br />
+</pre><p>Push one input token in the execution context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regexp execution context or NULL to indicate the end</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the first string token input</td></tr><tr><td><span class="term"><i><tt>value2</tt></i>:</span></td><td>the second string token input</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>data associated to the token to reuse in callbacks</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.</td></tr></tbody></table></div><h3><a name="xmlRegFreeExecCtxt" id="xmlRegFreeExecCtxt"></a>Function: xmlRegFreeExecCtxt</h3><pre class="programlisting">void xmlRegFreeExecCtxt (<a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> exec)<br />
+</pre><p>Free the structures associated to a regular expression evaulation context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>exec</tt></i>:</span></td><td>a regular expression evaulation context</td></tr></tbody></table></div><h3><a name="xmlRegFreeRegexp" id="xmlRegFreeRegexp"></a>Function: xmlRegFreeRegexp</h3><pre class="programlisting">void xmlRegFreeRegexp (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)<br />
+</pre><p>Free a regexp</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>the regexp</td></tr></tbody></table></div><h3><a name="xmlRegNewExecCtxt" id="xmlRegNewExecCtxt"></a>Function: xmlRegNewExecCtxt</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegExecCtxtPtr">xmlRegExecCtxtPtr</a> xmlRegNewExecCtxt (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br /> <a href="libxml-xmlregexp.html#xmlRegExecCallbacks">xmlRegExecCallbacks</a> callback, <br /> void * data)<br />
+</pre><p>Build a context used for progressive evaluation of a regexp.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>a precompiled regular expression</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>a callback function used for handling progresses in the automata matching phase</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the context data associated to the callback in this context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new context</td></tr></tbody></table></div><h3><a name="xmlRegexpCompile" id="xmlRegexpCompile"></a>Function: xmlRegexpCompile</h3><pre class="programlisting"><a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> xmlRegexpCompile (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * regexp)<br />
+</pre><p>Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>a regular expression string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the compiled expression or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRegexpExec" id="xmlRegexpExec"></a>Function: xmlRegexpExec</h3><pre class="programlisting">int xmlRegexpExec (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Check if the regular expression generates the value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled regular expression</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>the value to check against the regular expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it matches, 0 if not and a negative value in case of error</td></tr></tbody></table></div><h3><a name="xmlRegexpIsDeterminist" id="xmlRegexpIsDeterminist"></a>Function: xmlRegexpIsDeterminist</h3><pre class="programlisting">int xmlRegexpIsDeterminist (<a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> comp)<br />
+</pre><p>Check if the regular expression is determinist</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled regular expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if it yes, 0 if not and a negative value in case of error</td></tr></tbody></table></div><h3><a name="xmlRegexpPrint" id="xmlRegexpPrint"></a>Function: xmlRegexpPrint</h3><pre class="programlisting">void xmlRegexpPrint (FILE * output, <br /> <a href="libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> regexp)<br />
+</pre><p>Print the content of the compiled regular expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file for the output debug</td></tr><tr><td><span class="term"><i><tt>regexp</tt></i>:</span></td><td>the compiled regexp</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html
new file mode 100644
index 0000000..a27e6dc
--- /dev/null
+++ b/doc/html/libxml-xmlsave.html
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlsave from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlsave from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlregexp.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlregexp.html">xmlregexp</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlschemas.html">xmlschemas</a></th><td><a accesskey="n" href="libxml-xmlschemas.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API to save document or subtree of document </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlSaveCtxt">xmlSaveCtxt</a><br />struct _xmlSaveCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a> * <a name="xmlSaveCtxtPtr" id="xmlSaveCtxtPtr">xmlSaveCtxtPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSaveOption">xmlSaveOption</a>
+</pre><pre class="programlisting">int <a href="#xmlSaveClose">xmlSaveClose</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">long <a href="#xmlSaveDoc">xmlSaveDoc</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlSaveFlush">xmlSaveFlush</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlSaveSetAttrEscape">xmlSaveSetAttrEscape</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre>
+<pre class="programlisting">int <a href="#xmlSaveSetEscape">xmlSaveSetEscape</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)</pre>
+<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToBuffer">xmlSaveToBuffer</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFd">xmlSaveToFd</a> (int fd, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToFilename">xmlSaveToFilename</a> (const char * filename, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> <a href="#xmlSaveToIO">xmlSaveToIO</a> (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * encoding, <br /> int options)</pre>
+<pre class="programlisting">long <a href="#xmlSaveTree">xmlSaveTree</a> (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<h2>Description</h2>
+<h3><a name="xmlSaveCtxt" id="xmlSaveCtxt">Structure xmlSaveCtxt</a></h3><pre class="programlisting">Structure xmlSaveCtxt<br />struct _xmlSaveCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlSaveOption" id="xmlSaveOption">xmlSaveOption</a></h3><pre class="programlisting">Enum xmlSaveOption {
+ <a name="XML_SAVE_FORMAT" id="XML_SAVE_FORMAT">XML_SAVE_FORMAT</a> = 1 : format save output
+ <a name="XML_SAVE_NO_DECL" id="XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a> = 2 : drop the xml declaration
+ <a name="XML_SAVE_NO_EMPTY" id="XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a> = 4 : no empty tags
+ <a name="XML_SAVE_NO_XHTML" id="XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a> = 8 : disable XHTML1 specific rules
+ <a name="XML_SAVE_XHTML" id="XML_SAVE_XHTML">XML_SAVE_XHTML</a> = 16 : force XHTML1 specific rules
+ <a name="XML_SAVE_AS_XML" id="XML_SAVE_AS_XML">XML_SAVE_AS_XML</a> = 32 : force XML serialization on HTML doc
+ <a name="XML_SAVE_AS_HTML" id="XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a> = 64 : force HTML serialization on XML doc
+ <a name="XML_SAVE_WSNONSIG" id="XML_SAVE_WSNONSIG">XML_SAVE_WSNONSIG</a> = 128 : format with non-significant whitespace
+}
+</pre><h3><a name="xmlSaveClose" id="xmlSaveClose"></a>Function: xmlSaveClose</h3><pre class="programlisting">int xmlSaveClose (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br />
+</pre><p>Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveDoc" id="xmlSaveDoc"></a>Function: xmlSaveDoc</h3><pre class="programlisting">long xmlSaveDoc (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlSaveFlush" id="xmlSaveFlush"></a>Function: xmlSaveFlush</h3><pre class="programlisting">int xmlSaveFlush (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br />
+</pre><p>Flush a document saving context, i.e. make sure that all bytes have been output.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveSetAttrEscape" id="xmlSaveSetAttrEscape"></a>Function: xmlSaveSetAttrEscape</h3><pre class="programlisting">int xmlSaveSetAttrEscape (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br />
+</pre><p>Set a custom escaping function to be used for text in <a href="libxml-SAX.html#attribute">attribute</a> content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveSetEscape" id="xmlSaveSetEscape"></a>Function: xmlSaveSetEscape</h3><pre class="programlisting">int xmlSaveSetEscape (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-encoding.html#xmlCharEncodingOutputFunc">xmlCharEncodingOutputFunc</a> escape)<br />
+</pre><p>Set a custom escaping function to be used for text in element content</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>escape</tt></i>:</span></td><td>the escaping function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if successful or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToBuffer" id="xmlSaveToBuffer"></a>Function: xmlSaveToBuffer</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToBuffer (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create a document saving context serializing to a buffer with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a buffer</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFd" id="xmlSaveToFd"></a>Function: xmlSaveToFd</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFd (int fd, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>a file descriptor number</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToFilename" id="xmlSaveToFilename"></a>Function: xmlSaveToFilename</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToFilename (const char * filename, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>a file name or an URL</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveToIO" id="xmlSaveToIO"></a>Function: xmlSaveToIO</h3><pre class="programlisting"><a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> xmlSaveToIO (<a href="libxml-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> iowrite, <br /> <a href="libxml-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> ioclose, <br /> void * ioctx, <br /> const char * encoding, <br /> int options)<br />
+</pre><p>Create a document saving context serializing to a file descriptor with the encoding and the options given</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iowrite</tt></i>:</span></td><td>an I/O write function</td></tr><tr><td><span class="term"><i><tt>ioclose</tt></i>:</span></td><td>an I/O close function</td></tr><tr><td><span class="term"><i><tt>ioctx</tt></i>:</span></td><td>an I/O handler</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding name to use or NULL</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of xmlSaveOptions</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new serialization context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSaveTree" id="xmlSaveTree"></a>Function: xmlSaveTree</h3><pre class="programlisting">long xmlSaveTree (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a document saving context</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the top node of the subtree to save</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlschemas.html b/doc/html/libxml-xmlschemas.html
new file mode 100644
index 0000000..8cb42a1
--- /dev/null
+++ b/doc/html/libxml-xmlschemas.html
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlschemas from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlschemas from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlsave.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlsave.html">xmlsave</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlschemastypes.html">xmlschemastypes</a></th><td><a accesskey="n" href="libxml-xmlschemastypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>interface to the XML Schemas handling and schema validity checking, it is incomplete right now. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlSchema">xmlSchema</a><br />struct _xmlSchema
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a><br />struct _xmlSchemaParserCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchemaParserCtxt">xmlSchemaParserCtxt</a> * <a name="xmlSchemaParserCtxtPtr" id="xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchema">xmlSchema</a> * <a name="xmlSchemaPtr" id="xmlSchemaPtr">xmlSchemaPtr</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a> * <a name="xmlSchemaSAXPlugPtr" id="xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaSAXPlugStruct">xmlSchemaSAXPlugStruct</a><br />struct _xmlSchemaSAXPlug
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Structure <a href="#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a><br />struct _xmlSchemaValidCtxt
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlschemas.html#xmlSchemaValidCtxt">xmlSchemaValidCtxt</a> * <a name="xmlSchemaValidCtxtPtr" id="xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchemaValidError">xmlSchemaValidError</a>
+</pre><pre class="programlisting">Enum <a href="#xmlSchemaValidOption">xmlSchemaValidOption</a>
+</pre><pre class="programlisting">void <a href="#xmlSchemaDump">xmlSchemaDump</a> (FILE * output, <br /> <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFreeValidCtxt">xmlSchemaFreeValidCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaIsValid">xmlSchemaIsValid</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewDocParserCtxt">xmlSchemaNewDocParserCtxt</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> (const char * buffer, <br /> int size)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a> (const char * URL)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> <a href="#xmlSchemaNewValidCtxt">xmlSchemaNewValidCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> <a href="#xmlSchemaParse">xmlSchemaParse</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> <a href="#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br /> void ** user_data)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a> (<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaSetParserStructuredErrors">xmlSchemaSetParserStructuredErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidCtxtGetOptions">xmlSchemaValidCtxtGetOptions</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> <a href="#xmlSchemaValidCtxtGetParserCtxt">xmlSchemaValidCtxtGetParserCtxt</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br /> const char * filename)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br /> void * ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data)</pre>
+<pre class="programlisting">Function type: <a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a>
+void <a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a>
+int <a href="#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> (void * ctx, <br /> const char ** file, <br /> unsigned long * line)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a>
+void <a href="#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre>
+<h2>Description</h2>
+<h3><a name="xmlSchema" id="xmlSchema">Structure xmlSchema</a></h3><pre class="programlisting">Structure xmlSchema<br />struct _xmlSchema {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : schema name
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * targetNamespace : the target namespace
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * version
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * id : Obsolete
+ <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc
+ <a href="libxml-schemasInternals.html#xmlSchemaAnnotPtr">xmlSchemaAnnotPtr</a> annot
+ int flags
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> typeDecl
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attrDecl
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attrgrpDecl
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> elemDecl
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> notaDecl
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> schemasImports
+ void * _private : unused by the library for users or bind
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> groupDecl
+ <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict
+ void * includes : the includes, this is opaque for now
+ int preserve : whether to free the document
+ int counter : used to give ononymous components uniqu
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> idcDef : All identity-constraint defs.
+ void * volatiles : Obsolete
+}</pre><h3><a name="xmlSchemaParserCtxt" id="xmlSchemaParserCtxt">Structure xmlSchemaParserCtxt</a></h3><pre class="programlisting">Structure xmlSchemaParserCtxt<br />struct _xmlSchemaParserCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlSchemaSAXPlugStruct" id="xmlSchemaSAXPlugStruct">Structure xmlSchemaSAXPlugStruct</a></h3><pre class="programlisting">Structure xmlSchemaSAXPlugStruct<br />struct _xmlSchemaSAXPlug {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlSchemaValidCtxt" id="xmlSchemaValidCtxt">Structure xmlSchemaValidCtxt</a></h3><pre class="programlisting">Structure xmlSchemaValidCtxt<br />struct _xmlSchemaValidCtxt {
+The content of this structure is not made public by the API.
+}</pre><h3>Enum <a name="xmlSchemaValidError" id="xmlSchemaValidError">xmlSchemaValidError</a></h3><pre class="programlisting">Enum xmlSchemaValidError {
+ <a name="XML_SCHEMAS_ERR_OK" id="XML_SCHEMAS_ERR_OK">XML_SCHEMAS_ERR_OK</a> = 0
+ <a name="XML_SCHEMAS_ERR_NOROOT" id="XML_SCHEMAS_ERR_NOROOT">XML_SCHEMAS_ERR_NOROOT</a> = 1
+ <a name="XML_SCHEMAS_ERR_UNDECLAREDELEM" id="XML_SCHEMAS_ERR_UNDECLAREDELEM">XML_SCHEMAS_ERR_UNDECLAREDELEM</a> = 2
+ <a name="XML_SCHEMAS_ERR_NOTTOPLEVEL" id="XML_SCHEMAS_ERR_NOTTOPLEVEL">XML_SCHEMAS_ERR_NOTTOPLEVEL</a> = 3
+ <a name="XML_SCHEMAS_ERR_MISSING" id="XML_SCHEMAS_ERR_MISSING">XML_SCHEMAS_ERR_MISSING</a> = 4
+ <a name="XML_SCHEMAS_ERR_WRONGELEM" id="XML_SCHEMAS_ERR_WRONGELEM">XML_SCHEMAS_ERR_WRONGELEM</a> = 5
+ <a name="XML_SCHEMAS_ERR_NOTYPE" id="XML_SCHEMAS_ERR_NOTYPE">XML_SCHEMAS_ERR_NOTYPE</a> = 6
+ <a name="XML_SCHEMAS_ERR_NOROLLBACK" id="XML_SCHEMAS_ERR_NOROLLBACK">XML_SCHEMAS_ERR_NOROLLBACK</a> = 7
+ <a name="XML_SCHEMAS_ERR_ISABSTRACT" id="XML_SCHEMAS_ERR_ISABSTRACT">XML_SCHEMAS_ERR_ISABSTRACT</a> = 8
+ <a name="XML_SCHEMAS_ERR_NOTEMPTY" id="XML_SCHEMAS_ERR_NOTEMPTY">XML_SCHEMAS_ERR_NOTEMPTY</a> = 9
+ <a name="XML_SCHEMAS_ERR_ELEMCONT" id="XML_SCHEMAS_ERR_ELEMCONT">XML_SCHEMAS_ERR_ELEMCONT</a> = 10
+ <a name="XML_SCHEMAS_ERR_HAVEDEFAULT" id="XML_SCHEMAS_ERR_HAVEDEFAULT">XML_SCHEMAS_ERR_HAVEDEFAULT</a> = 11
+ <a name="XML_SCHEMAS_ERR_NOTNILLABLE" id="XML_SCHEMAS_ERR_NOTNILLABLE">XML_SCHEMAS_ERR_NOTNILLABLE</a> = 12
+ <a name="XML_SCHEMAS_ERR_EXTRACONTENT" id="XML_SCHEMAS_ERR_EXTRACONTENT">XML_SCHEMAS_ERR_EXTRACONTENT</a> = 13
+ <a name="XML_SCHEMAS_ERR_INVALIDATTR" id="XML_SCHEMAS_ERR_INVALIDATTR">XML_SCHEMAS_ERR_INVALIDATTR</a> = 14
+ <a name="XML_SCHEMAS_ERR_INVALIDELEM" id="XML_SCHEMAS_ERR_INVALIDELEM">XML_SCHEMAS_ERR_INVALIDELEM</a> = 15
+ <a name="XML_SCHEMAS_ERR_NOTDETERMINIST" id="XML_SCHEMAS_ERR_NOTDETERMINIST">XML_SCHEMAS_ERR_NOTDETERMINIST</a> = 16
+ <a name="XML_SCHEMAS_ERR_CONSTRUCT" id="XML_SCHEMAS_ERR_CONSTRUCT">XML_SCHEMAS_ERR_CONSTRUCT</a> = 17
+ <a name="XML_SCHEMAS_ERR_INTERNAL" id="XML_SCHEMAS_ERR_INTERNAL">XML_SCHEMAS_ERR_INTERNAL</a> = 18
+ <a name="XML_SCHEMAS_ERR_NOTSIMPLE" id="XML_SCHEMAS_ERR_NOTSIMPLE">XML_SCHEMAS_ERR_NOTSIMPLE</a> = 19
+ <a name="XML_SCHEMAS_ERR_ATTRUNKNOWN" id="XML_SCHEMAS_ERR_ATTRUNKNOWN">XML_SCHEMAS_ERR_ATTRUNKNOWN</a> = 20
+ <a name="XML_SCHEMAS_ERR_ATTRINVALID" id="XML_SCHEMAS_ERR_ATTRINVALID">XML_SCHEMAS_ERR_ATTRINVALID</a> = 21
+ <a name="XML_SCHEMAS_ERR_VALUE" id="XML_SCHEMAS_ERR_VALUE">XML_SCHEMAS_ERR_VALUE</a> = 22
+ <a name="XML_SCHEMAS_ERR_FACET" id="XML_SCHEMAS_ERR_FACET">XML_SCHEMAS_ERR_FACET</a> = 23
+ <a name="XML_SCHEMAS_ERR_" id="XML_SCHEMAS_ERR_">XML_SCHEMAS_ERR_</a> = 24
+ <a name="XML_SCHEMAS_ERR_XXX" id="XML_SCHEMAS_ERR_XXX">XML_SCHEMAS_ERR_XXX</a> = 25
+}
+</pre><h3>Enum <a name="xmlSchemaValidOption" id="xmlSchemaValidOption">xmlSchemaValidOption</a></h3><pre class="programlisting">Enum xmlSchemaValidOption {
+ <a name="XML_SCHEMA_VAL_VC_I_CREATE" id="XML_SCHEMA_VAL_VC_I_CREATE">XML_SCHEMA_VAL_VC_I_CREATE</a> = 1 : Default/fixed: create an <a href="libxml-SAX.html#attribute">attribute</a> node * or an element's text node on the instance. *
+}
+</pre><h3><a name="xmlSchemaDump" id="xmlSchemaDump"></a>Function: xmlSchemaDump</h3><pre class="programlisting">void xmlSchemaDump (FILE * output, <br /> <a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
+</pre><p>Dump a Schema structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the file output</td></tr><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFree" id="xmlSchemaFree"></a>Function: xmlSchemaFree</h3><pre class="programlisting">void xmlSchemaFree (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
+</pre><p>Deallocate a Schema structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a schema structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeParserCtxt" id="xmlSchemaFreeParserCtxt"></a>Function: xmlSchemaFreeParserCtxt</h3><pre class="programlisting">void xmlSchemaFreeParserCtxt (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema parser context</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeValidCtxt" id="xmlSchemaFreeValidCtxt"></a>Function: xmlSchemaFreeValidCtxt</h3><pre class="programlisting">void xmlSchemaFreeValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p>Free the resources associated to the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr></tbody></table></div><h3><a name="xmlSchemaGetParserErrors" id="xmlSchemaGetParserErrors"></a>Function: xmlSchemaGetParserErrors</h3><pre class="programlisting">int xmlSchemaGetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)<br />
+</pre><p>Get the callback information used to handle errors for a parser context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XMl-Schema parser context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaGetValidErrors" id="xmlSchemaGetValidErrors"></a>Function: xmlSchemaGetValidErrors</h3><pre class="programlisting">int xmlSchemaGetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br /> void ** ctx)<br />
+</pre><p>Get the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XML-Schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaIsValid" id="xmlSchemaIsValid"></a>Function: xmlSchemaIsValid</h3><pre class="programlisting">int xmlSchemaIsValid (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p>Check if any error was detected during validation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if valid so far, 0 if errors were detected, and -1 in case of internal error.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewDocParserCtxt" id="xmlSchemaNewDocParserCtxt"></a>Function: xmlSchemaNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewMemParserCtxt" id="xmlSchemaNewMemParserCtxt"></a>Function: xmlSchemaNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewMemParserCtxt (const char * buffer, <br /> int size)<br />
+</pre><p>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>a pointer to a char array containing the schemas</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>the size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewParserCtxt" id="xmlSchemaNewParserCtxt"></a>Function: xmlSchemaNewParserCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> xmlSchemaNewParserCtxt (const char * URL)<br />
+</pre><p>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>the location of the schema</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewValidCtxt" id="xmlSchemaNewValidCtxt"></a>Function: xmlSchemaNewValidCtxt</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> xmlSchemaNewValidCtxt (<a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema)<br />
+</pre><p>Create an XML Schemas validation context based on the given schema.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>schema</tt></i>:</span></td><td>a precompiled XML Schemas</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the validation context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaParse" id="xmlSchemaParse"></a>Function: xmlSchemaParse</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> xmlSchemaParse (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt)<br />
+</pre><p>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the internal XML Schema structure built from the resource or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXPlug" id="xmlSchemaSAXPlug"></a>Function: xmlSchemaSAXPlug</h3><pre class="programlisting"><a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> xmlSchemaSAXPlug (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br /> void ** user_data)<br />
+</pre><p>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a pointer to the original <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a></td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>a pointer to the original SAX user data pointer</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaSAXUnplug" id="xmlSchemaSAXUnplug"></a>Function: xmlSchemaSAXUnplug</h3><pre class="programlisting">int xmlSchemaSAXUnplug (<a href="libxml-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug)<br />
+</pre><p>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>plug</tt></i>:</span></td><td>a data structure returned by <a href="libxml-xmlschemas.html#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserErrors" id="xmlSchemaSetParserErrors"></a>Function: xmlSchemaSetParserErrors</h3><pre class="programlisting">void xmlSchemaSetParserErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br />
+</pre><p>Set the callback functions used to handle errors for a validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks</td></tr></tbody></table></div><h3><a name="xmlSchemaSetParserStructuredErrors" id="xmlSchemaSetParserStructuredErrors"></a>Function: xmlSchemaSetParserStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetParserStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema parser context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidErrors" id="xmlSchemaSetValidErrors"></a>Function: xmlSchemaSetValidErrors</h3><pre class="programlisting">void xmlSchemaSetValidErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br /> void * ctx)<br />
+</pre><p>Set the error and warning callback informations</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidOptions" id="xmlSchemaSetValidOptions"></a>Function: xmlSchemaSetValidOptions</h3><pre class="programlisting">int xmlSchemaSetValidOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> int options)<br />
+</pre><p>Sets the options to be used during the validation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of <a href="libxml-xmlschemas.html#xmlSchemaValidOption">xmlSchemaValidOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of an API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaSetValidStructuredErrors" id="xmlSchemaSetValidStructuredErrors"></a>Function: xmlSchemaSetValidStructuredErrors</h3><pre class="programlisting">void xmlSchemaSetValidStructuredErrors (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br /> void * ctx)<br />
+</pre><p>Set the structured error callback</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>serror</tt></i>:</span></td><td>the structured error function</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context</td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetOptions" id="xmlSchemaValidCtxtGetOptions"></a>Function: xmlSchemaValidCtxtGetOptions</h3><pre class="programlisting">int xmlSchemaValidCtxtGetOptions (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p>Get the validation context options.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the option combination or -1 on error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidCtxtGetParserCtxt" id="xmlSchemaValidCtxtGetParserCtxt"></a>Function: xmlSchemaValidCtxtGetParserCtxt</h3><pre class="programlisting"><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> xmlSchemaValidCtxtGetParserCtxt (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt)<br />
+</pre><p>allow access to the parser context of the schema validation context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context of the schema validation context or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateDoc" id="xmlSchemaValidateDoc"></a>Function: xmlSchemaValidateDoc</h3><pre class="programlisting">int xmlSchemaValidateDoc (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Validate a document tree in memory.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a parsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFile" id="xmlSchemaValidateFile"></a>Function: xmlSchemaValidateFile</h3><pre class="programlisting">int xmlSchemaValidateFile (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> const char * filename, <br /> int options)<br />
+</pre><p>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the URI of the instance</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a future set of options, currently unused</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateOneElement" id="xmlSchemaValidateOneElement"></a>Function: xmlSchemaValidateOneElement</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br />
+</pre><p>Validate a branch of a tree, starting with the given @elem.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateSetFilename" id="xmlSchemaValidateSetFilename"></a>Function: xmlSchemaValidateSetFilename</h3><pre class="programlisting">void xmlSchemaValidateSetFilename (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br /> const char * filename)<br />
+</pre><p>Workaround to provide file error reporting information when this is not provided by current APIs</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateSetLocator" id="xmlSchemaValidateSetLocator"></a>Function: xmlSchemaValidateSetLocator</h3><pre class="programlisting">void xmlSchemaValidateSetLocator (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br /> <a href="libxml-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br /> void * ctxt)<br />
+</pre><p>Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the locator function pointer</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the locator context</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateStream" id="xmlSchemaValidateStream"></a>Function: xmlSchemaValidateStream</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br /> <a href="libxml-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br /> <a href="libxml-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br /> void * user_data)<br />
+</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>input</tt></i>:</span></td><td>the input to use for reading the data</td></tr><tr><td><span class="term"><i><tt>enc</tt></i>:</span></td><td>an optional encoding information</td></tr><tr><td><span class="term"><i><tt>sax</tt></i>:</span></td><td>a SAX handler for the resulting events</td></tr><tr><td><span class="term"><i><tt>user_data</tt></i>:</span></td><td>the context to provide to the SAX handler.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidityErrorFunc" id="xmlSchemaValidityErrorFunc"></a>Function type: xmlSchemaValidityErrorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityErrorFunc
+void xmlSchemaValidityErrorFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of an error callback from an XSD validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<h3><a name="xmlSchemaValidityLocatorFunc" id="xmlSchemaValidityLocatorFunc"></a>Function type: xmlSchemaValidityLocatorFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityLocatorFunc
+int xmlSchemaValidityLocatorFunc (void * ctx, <br /> const char ** file, <br /> unsigned long * line)
+</pre><p>A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user provided context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>returned file information</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>returned line information</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><br />
+<h3><a name="xmlSchemaValidityWarningFunc" id="xmlSchemaValidityWarningFunc"></a>Function type: xmlSchemaValidityWarningFunc</h3><pre class="programlisting">Function type: xmlSchemaValidityWarningFunc
+void xmlSchemaValidityWarningFunc (void * ctx, <br /> const char * msg, <br /> ... ...)
+</pre><p>Signature of a warning callback from an XSD validation</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlschemastypes.html b/doc/html/libxml-xmlschemastypes.html
new file mode 100644
index 0000000..6925cfa
--- /dev/null
+++ b/doc/html/libxml-xmlschemastypes.html
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlschemastypes from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlschemastypes from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlschemas.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlschemas.html">xmlschemas</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlstring.html">xmlstring</a></th><td><a accesskey="n" href="libxml-xmlstring.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>module providing the XML Schema Datatypes implementation both definition and validity checking </p><h2>Table of Contents</h2><pre class="programlisting">Enum <a href="#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a>
+</pre><pre class="programlisting">int <a href="#xmlSchemaCheckFacet">xmlSchemaCheckFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaCleanupTypes">xmlSchemaCleanupTypes</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaCollapseString">xmlSchemaCollapseString</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaCompareValues">xmlSchemaCompareValues</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaCompareValuesWhtsp">xmlSchemaCompareValuesWhtsp</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaCopyValue">xmlSchemaCopyValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFreeFacet">xmlSchemaFreeFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaFreeValue">xmlSchemaFreeValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInListSimpleTypeItemType">xmlSchemaGetBuiltInListSimpleTypeItemType</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetBuiltInType">xmlSchemaGetBuiltInType</a> (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaGetCanonValue">xmlSchemaGetCanonValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaGetCanonValueWhtsp">xmlSchemaGetCanonValueWhtsp</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)</pre>
+<pre class="programlisting">unsigned long <a href="#xmlSchemaGetFacetValueAsULong">xmlSchemaGetFacetValueAsULong</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> <a href="#xmlSchemaGetPredefinedType">xmlSchemaGetPredefinedType</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> <a href="#xmlSchemaGetValType">xmlSchemaGetValType</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre>
+<pre class="programlisting">void <a href="#xmlSchemaInitTypes">xmlSchemaInitTypes</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaIsBuiltInTypeFacet">xmlSchemaIsBuiltInTypeFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> int facetType)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> <a href="#xmlSchemaNewFacet">xmlSchemaNewFacet</a> (void)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewNOTATIONValue">xmlSchemaNewNOTATIONValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewQNameValue">xmlSchemaNewQNameValue</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaNewStringValue">xmlSchemaNewStringValue</a> (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValPredefTypeNode">xmlSchemaValPredefTypeNode</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValPredefTypeNodeNoNorm">xmlSchemaValPredefTypeNodeNoNorm</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateFacet">xmlSchemaValidateFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br /> <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateFacetWhtsp">xmlSchemaValidateFacetWhtsp</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateLengthFacet">xmlSchemaValidateLengthFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> unsigned long * length)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateLengthFacetWhtsp">xmlSchemaValidateLengthFacetWhtsp</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> unsigned long * length, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidateListSimpleTypeFacet">xmlSchemaValidateListSimpleTypeFacet</a> (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> unsigned long actualLen, <br /> unsigned long * expectedLen)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValidatePredefinedType">xmlSchemaValidatePredefinedType</a> (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValueAppend">xmlSchemaValueAppend</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)</pre>
+<pre class="programlisting">int <a href="#xmlSchemaValueGetAsBoolean">xmlSchemaValueGetAsBoolean</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaValueGetAsString">xmlSchemaValueGetAsString</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> <a href="#xmlSchemaValueGetNext">xmlSchemaValueGetNext</a> (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSchemaWhiteSpaceReplace">xmlSchemaWhiteSpaceReplace</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)</pre>
+<h2>Description</h2>
+<h3>Enum <a name="xmlSchemaWhitespaceValueType" id="xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a></h3><pre class="programlisting">Enum xmlSchemaWhitespaceValueType {
+ <a name="XML_SCHEMA_WHITESPACE_UNKNOWN" id="XML_SCHEMA_WHITESPACE_UNKNOWN">XML_SCHEMA_WHITESPACE_UNKNOWN</a> = 0
+ <a name="XML_SCHEMA_WHITESPACE_PRESERVE" id="XML_SCHEMA_WHITESPACE_PRESERVE">XML_SCHEMA_WHITESPACE_PRESERVE</a> = 1
+ <a name="XML_SCHEMA_WHITESPACE_REPLACE" id="XML_SCHEMA_WHITESPACE_REPLACE">XML_SCHEMA_WHITESPACE_REPLACE</a> = 2
+ <a name="XML_SCHEMA_WHITESPACE_COLLAPSE" id="XML_SCHEMA_WHITESPACE_COLLAPSE">XML_SCHEMA_WHITESPACE_COLLAPSE</a> = 3
+}
+</pre><h3><a name="xmlSchemaCheckFacet" id="xmlSchemaCheckFacet"></a>Function: xmlSchemaCheckFacet</h3><pre class="programlisting">int xmlSchemaCheckFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> typeDecl, <br /> <a href="libxml-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> pctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Checks and computes the values of facets.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet</td></tr><tr><td><span class="term"><i><tt>typeDecl</tt></i>:</span></td><td>the schema type definition</td></tr><tr><td><span class="term"><i><tt>pctxt</tt></i>:</span></td><td>the schema parser context or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the optional name of the type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if valid, a positive error code if not valid and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaCleanupTypes" id="xmlSchemaCleanupTypes"></a>Function: xmlSchemaCleanupTypes</h3><pre class="programlisting">void xmlSchemaCleanupTypes (void)<br />
+</pre><p>Cleanup the default XML Schemas type library</p>
+<h3><a name="xmlSchemaCollapseString" id="xmlSchemaCollapseString"></a>Function: xmlSchemaCollapseString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaCollapseString (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Removes and normalize white spaces in the string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div><h3><a name="xmlSchemaCompareValues" id="xmlSchemaCompareValues"></a>Function: xmlSchemaCompareValues</h3><pre class="programlisting">int xmlSchemaCompareValues (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y)<br />
+</pre><p>Compare 2 values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaCompareValuesWhtsp" id="xmlSchemaCompareValuesWhtsp"></a>Function: xmlSchemaCompareValuesWhtsp</h3><pre class="programlisting">int xmlSchemaCompareValuesWhtsp (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> x, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> xws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> y, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> yws)<br />
+</pre><p>Compare 2 values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>x</tt></i>:</span></td><td>a first value</td></tr><tr><td><span class="term"><i><tt>xws</tt></i>:</span></td><td>the whitespace value of x</td></tr><tr><td><span class="term"><i><tt>y</tt></i>:</span></td><td>a second value</td></tr><tr><td><span class="term"><i><tt>yws</tt></i>:</span></td><td>the whitespace value of y</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaCopyValue" id="xmlSchemaCopyValue"></a>Function: xmlSchemaCopyValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaCopyValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br />
+</pre><p>Copies the precomputed value. This duplicates any string within.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value to be copied</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the copy or NULL if a copy for a data-type is not implemented.</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeFacet" id="xmlSchemaFreeFacet"></a>Function: xmlSchemaFreeFacet</h3><pre class="programlisting">void xmlSchemaFreeFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br />
+</pre><p>Deallocate a Schema Facet structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>a schema facet structure</td></tr></tbody></table></div><h3><a name="xmlSchemaFreeValue" id="xmlSchemaFreeValue"></a>Function: xmlSchemaFreeValue</h3><pre class="programlisting">void xmlSchemaFreeValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> value)<br />
+</pre><p>Cleanup the default XML Schemas type library</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to free</td></tr></tbody></table></div><h3><a name="xmlSchemaGetBuiltInListSimpleTypeItemType" id="xmlSchemaGetBuiltInListSimpleTypeItemType"></a>Function: xmlSchemaGetBuiltInListSimpleTypeItemType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInListSimpleTypeItemType (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type)<br />
+</pre><p>Lookup function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in simple type.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetBuiltInType" id="xmlSchemaGetBuiltInType"></a>Function: xmlSchemaGetBuiltInType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetBuiltInType (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type)<br />
+</pre><p>Gives you the type struct for a built-in type by its type id.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of the built in type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetCanonValue" id="xmlSchemaGetCanonValue"></a>Function: xmlSchemaGetCanonValue</h3><pre class="programlisting">int xmlSchemaGetCanonValue (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue)<br />
+</pre><p>Get the canonical lexical representation of the value. The caller has to FREE the returned retValue. WARNING: Some value types are not supported yet, resulting in a @retValue of "???". TODO: XML Schema 1.0 does not define canonical representations for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay, anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetCanonValueWhtsp" id="xmlSchemaGetCanonValueWhtsp"></a>Function: xmlSchemaGetCanonValueWhtsp</h3><pre class="programlisting">int xmlSchemaGetCanonValueWhtsp (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> ** retValue, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br />
+</pre><p>Get the canonical representation of the value. The caller has to free the returned @retValue.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>retValue</tt></i>:</span></td><td>the returned value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaGetFacetValueAsULong" id="xmlSchemaGetFacetValueAsULong"></a>Function: xmlSchemaGetFacetValueAsULong</h3><pre class="programlisting">unsigned long xmlSchemaGetFacetValueAsULong (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet)<br />
+</pre><p>Extract the value of a facet</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>an schemas type facet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value as a long</td></tr></tbody></table></div><h3><a name="xmlSchemaGetPredefinedType" id="xmlSchemaGetPredefinedType"></a>Function: xmlSchemaGetPredefinedType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> xmlSchemaGetPredefinedType (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
+</pre><p>Lookup a type in the default XML Schemas type library</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the type name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the type if found, NULL otherwise</td></tr></tbody></table></div><h3><a name="xmlSchemaGetValType" id="xmlSchemaGetValType"></a>Function: xmlSchemaGetValType</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> xmlSchemaGetValType (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br />
+</pre><p>Accessor for the type of a value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a schemas value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> of the value</td></tr></tbody></table></div><h3><a name="xmlSchemaInitTypes" id="xmlSchemaInitTypes"></a>Function: xmlSchemaInitTypes</h3><pre class="programlisting">void xmlSchemaInitTypes (void)<br />
+</pre><p>Initialize the default XML Schemas type library</p>
+<h3><a name="xmlSchemaIsBuiltInTypeFacet" id="xmlSchemaIsBuiltInTypeFacet"></a>Function: xmlSchemaIsBuiltInTypeFacet</h3><pre class="programlisting">int xmlSchemaIsBuiltInTypeFacet (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> int facetType)<br />
+</pre><p>Evaluates if a specific facet can be used in conjunction with a type.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>facetType</tt></i>:</span></td><td>the facet type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewFacet" id="xmlSchemaNewFacet"></a>Function: xmlSchemaNewFacet</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> xmlSchemaNewFacet (void)<br />
+</pre><p>Allocate a new Facet structure.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly allocated structure or NULL in case or error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewNOTATIONValue" id="xmlSchemaNewNOTATIONValue"></a>Function: xmlSchemaNewNOTATIONValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewNOTATIONValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns)<br />
+</pre><p>Allocate a new NOTATION value. The given values are consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the notation name</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the notation namespace name or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaNewQNameValue" id="xmlSchemaNewQNameValue"></a>Function: xmlSchemaNewQNameValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewQNameValue (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceName, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * localName)<br />
+</pre><p>Allocate a new QName value. The given values are consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>namespaceName</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>localName</tt></i>:</span></td><td>the local name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of an error.</td></tr></tbody></table></div><h3><a name="xmlSchemaNewStringValue" id="xmlSchemaNewStringValue"></a>Function: xmlSchemaNewStringValue</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaNewStringValue (<a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well. The given value is consumed and freed with the struct.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the value type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the new value or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlSchemaValPredefTypeNode" id="xmlSchemaValPredefTypeNode"></a>Function: xmlSchemaValPredefTypeNode</h3><pre class="programlisting">int xmlSchemaValPredefTypeNode (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node containing the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValPredefTypeNodeNoNorm" id="xmlSchemaValPredefTypeNodeNoNorm"></a>Function: xmlSchemaValPredefTypeNodeNoNorm</h3><pre class="programlisting">int xmlSchemaValPredefTypeNodeNoNorm (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node containing the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFacet" id="xmlSchemaValidateFacet"></a>Function: xmlSchemaValidateFacet</h3><pre class="programlisting">int xmlSchemaValidateFacet (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> base, <br /> <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br />
+</pre><p>Check a value against a facet condition</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>base</tt></i>:</span></td><td>the base type</td></tr><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateFacetWhtsp" id="xmlSchemaValidateFacetWhtsp"></a>Function: xmlSchemaValidateFacetWhtsp</h3><pre class="programlisting">int xmlSchemaValidateFacetWhtsp (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> fws, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br />
+</pre><p>Check a value against a facet condition. This takes value normalization according to the specified whitespace types into account. Note that @value needs to be the *normalized* value if the facet is of type "pattern".</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>fws</tt></i>:</span></td><td>the whitespace type of the facet's value</td></tr><tr><td><span class="term"><i><tt>valType</tt></i>:</span></td><td>the built-in type of the value</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical (or normalized for pattern) repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateLengthFacet" id="xmlSchemaValidateLengthFacet"></a>Function: xmlSchemaValidateLengthFacet</h3><pre class="programlisting">int xmlSchemaValidateLengthFacet (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> <a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> unsigned long * length)<br />
+</pre><p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr. of the value to be validated</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>length</tt></i>:</span></td><td>the actual length of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateLengthFacetWhtsp" id="xmlSchemaValidateLengthFacetWhtsp"></a>Function: xmlSchemaValidateLengthFacetWhtsp</h3><pre class="programlisting">int xmlSchemaValidateLengthFacetWhtsp (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValType">xmlSchemaValType</a> valType, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val, <br /> unsigned long * length, <br /> <a href="libxml-xmlschemastypes.html#xmlSchemaWhitespaceValueType">xmlSchemaWhitespaceValueType</a> ws)<br />
+</pre><p>Checka a value against a "length", "minLength" and "maxLength" facet; sets @length to the computed length of @value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>valType</tt></i>:</span></td><td>the built-in type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr. of the value to be validated</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the precomputed value</td></tr><tr><td><span class="term"><i><tt>length</tt></i>:</span></td><td>the actual length of the value</td></tr><tr><td><span class="term"><i><tt>ws</tt></i>:</span></td><td>the whitespace type of the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidateListSimpleTypeFacet" id="xmlSchemaValidateListSimpleTypeFacet"></a>Function: xmlSchemaValidateListSimpleTypeFacet</h3><pre class="programlisting">int xmlSchemaValidateListSimpleTypeFacet (<a href="libxml-schemasInternals.html#xmlSchemaFacetPtr">xmlSchemaFacetPtr</a> facet, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> unsigned long actualLen, <br /> unsigned long * expectedLen)<br />
+</pre><p>Checks the value of a list simple type against a facet.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>facet</tt></i>:</span></td><td>the facet to check</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the lexical repr of the value to validate</td></tr><tr><td><span class="term"><i><tt>actualLen</tt></i>:</span></td><td>the number of list items</td></tr><tr><td><span class="term"><i><tt>expectedLen</tt></i>:</span></td><td>the resulting expected number of list items</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValidatePredefinedType" id="xmlSchemaValidatePredefinedType"></a>Function: xmlSchemaValidatePredefinedType</h3><pre class="programlisting">int xmlSchemaValidatePredefinedType (<a href="libxml-schemasInternals.html#xmlSchemaTypePtr">xmlSchemaTypePtr</a> type, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> * val)<br />
+</pre><p>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the predefined type</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the value to check</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the return computed value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td></tr></tbody></table></div><h3><a name="xmlSchemaValueAppend" id="xmlSchemaValueAppend"></a>Function: xmlSchemaValueAppend</h3><pre class="programlisting">int xmlSchemaValueAppend (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> prev, <br /> <a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br />
+</pre><p>Appends a next sibling to a list of computed values.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>prev</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the value to be appended</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if succeeded and -1 on API errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaValueGetAsBoolean" id="xmlSchemaValueGetAsBoolean"></a>Function: xmlSchemaValueGetAsBoolean</h3><pre class="programlisting">int xmlSchemaValueGetAsBoolean (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br />
+</pre><p>Accessor for the boolean value of a computed value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true and 0 if false, or in case of an error. Hmm.</td></tr></tbody></table></div><h3><a name="xmlSchemaValueGetAsString" id="xmlSchemaValueGetAsString"></a>Function: xmlSchemaValueGetAsString</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaValueGetAsString (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> val)<br />
+</pre><p>Accessor for the string value of a computed value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string value or NULL if there was none, or on API errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaValueGetNext" id="xmlSchemaValueGetNext"></a>Function: xmlSchemaValueGetNext</h3><pre class="programlisting"><a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> xmlSchemaValueGetNext (<a href="libxml-schemasInternals.html#xmlSchemaValPtr">xmlSchemaValPtr</a> cur)<br />
+</pre><p>Accessor for the next sibling of a list of computed values.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next value or NULL if there was none, or on API errors.</td></tr></tbody></table></div><h3><a name="xmlSchemaWhiteSpaceReplace" id="xmlSchemaWhiteSpaceReplace"></a>Function: xmlSchemaWhiteSpaceReplace</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlSchemaWhiteSpaceReplace (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value)<br />
+</pre><p>Replaces 0xd, 0x9 and 0xa with a space.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL if no change was required.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlstring.html b/doc/html/libxml-xmlstring.html
new file mode 100644
index 0000000..4f12cc7
--- /dev/null
+++ b/doc/html/libxml-xmlstring.html
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlstring from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlstring from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlschemastypes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlschemastypes.html">xmlschemastypes</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlunicode.html">xmlunicode</a></th><td><a accesskey="n" href="libxml-xmlunicode.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>type and interfaces needed for the internal string handling of the library, especially UTF8 processing. </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#BAD_CAST">BAD_CAST</a></pre><pre class="programlisting">Typedef unsigned char <a name="xmlChar" id="xmlChar">xmlChar</a>
+</pre><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCharStrdup">xmlCharStrdup</a> (const char * cur)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlCharStrndup">xmlCharStrndup</a> (const char * cur, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlCheckUTF8">xmlCheckUTF8</a> (const unsigned char * utf)</pre>
+<pre class="programlisting">int <a href="#xmlGetUTF8Char">xmlGetUTF8Char</a> (const unsigned char * utf, <br /> int * len)</pre>
+<pre class="programlisting">int <a href="#xmlStrEqual">xmlStrEqual</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)</pre>
+<pre class="programlisting">int <a href="#xmlStrPrintf">xmlStrPrintf</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br /> int len, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlStrQEqual">xmlStrQEqual</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">int <a href="#xmlStrVPrintf">xmlStrVPrintf</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br /> int len, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br /> va_list ap)</pre>
+<pre class="programlisting">int <a href="#xmlStrcasecmp">xmlStrcasecmp</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrcasestr">xmlStrcasestr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrcat">xmlStrcat</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrchr">xmlStrchr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> val)</pre>
+<pre class="programlisting">int <a href="#xmlStrcmp">xmlStrcmp</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrdup">xmlStrdup</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)</pre>
+<pre class="programlisting">int <a href="#xmlStrlen">xmlStrlen</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">int <a href="#xmlStrncasecmp">xmlStrncasecmp</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrncat">xmlStrncat</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrncatNew">xmlStrncatNew</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlStrncmp">xmlStrncmp</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrndup">xmlStrndup</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int len)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrstr">xmlStrstr</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlStrsub">xmlStrsub</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int start, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlUTF8Charcmp">xmlUTF8Charcmp</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf2)</pre>
+<pre class="programlisting">int <a href="#xmlUTF8Size">xmlUTF8Size</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf)</pre>
+<pre class="programlisting">int <a href="#xmlUTF8Strlen">xmlUTF8Strlen</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf)</pre>
+<pre class="programlisting">int <a href="#xmlUTF8Strloc">xmlUTF8Strloc</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utfchar)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strndup">xmlUTF8Strndup</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int len)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strpos">xmlUTF8Strpos</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int pos)</pre>
+<pre class="programlisting">int <a href="#xmlUTF8Strsize">xmlUTF8Strsize</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int len)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlUTF8Strsub">xmlUTF8Strsub</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int start, <br /> int len)</pre>
+<h2>Description</h2>
+<h3><a name="BAD_CAST" id="BAD_CAST"></a>Macro: BAD_CAST</h3><pre>#define BAD_CAST</pre><p>Macro to cast a string to an <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * when one know its safe.</p>
+
+ This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).
+ <h3><a name="xmlCharStrdup" id="xmlCharStrdup"></a>Function: xmlCharStrdup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCharStrdup (const char * cur)<br />
+</pre><p>a strdup for char's to xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input char *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlCharStrndup" id="xmlCharStrndup"></a>Function: xmlCharStrndup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlCharStrndup (const char * cur, <br /> int len)<br />
+</pre><p>a strndup for char's to xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input char *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @cur</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlCheckUTF8" id="xmlCheckUTF8"></a>Function: xmlCheckUTF8</h3><pre class="programlisting">int xmlCheckUTF8 (const unsigned char * utf)<br />
+</pre><p>Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>Pointer to putative UTF-8 encoded string.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>value: true if @utf is valid.</td></tr></tbody></table></div><h3><a name="xmlGetUTF8Char" id="xmlGetUTF8Char"></a>Function: xmlGetUTF8Char</h3><pre class="programlisting">int xmlGetUTF8Char (const unsigned char * utf, <br /> int * len)<br />
+</pre><p>Read the first UTF8 character from @utf</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td></tr></tbody></table></div><h3><a name="xmlStrEqual" id="xmlStrEqual"></a>Function: xmlStrEqual</h3><pre class="programlisting">int xmlStrEqual (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
+</pre><p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrPrintf" id="xmlStrPrintf"></a>Function: xmlStrPrintf</h3><pre class="programlisting">int xmlStrPrintf (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br /> int len, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br /> ... ...)<br />
+</pre><p>Formats @msg and places result into @buf.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrQEqual" id="xmlStrQEqual"></a>Function: xmlStrQEqual</h3><pre class="programlisting">int xmlStrQEqual (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pref, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Check if a QName is Equal to a given string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pref</tt></i>:</span></td><td>the prefix of the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the localname of the QName</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if they are equal, 0 if they are different</td></tr></tbody></table></div><h3><a name="xmlStrVPrintf" id="xmlStrVPrintf"></a>Function: xmlStrVPrintf</h3><pre class="programlisting">int xmlStrVPrintf (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * buf, <br /> int len, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * msg, <br /> va_list ap)<br />
+</pre><p>Formats @msg and places result into @buf.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the result buffer.</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the result buffer length.</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message with printf formatting.</td></tr><tr><td><span class="term"><i><tt>ap</tt></i>:</span></td><td>extra parameters for the message.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td></tr></tbody></table></div><h3><a name="xmlStrcasecmp" id="xmlStrcasecmp"></a>Function: xmlStrcasecmp</h3><pre class="programlisting">int xmlStrcasecmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
+</pre><p>a strcasecmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrcasestr" id="xmlStrcasestr"></a>Function: xmlStrcasestr</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrcasestr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>a case-ignoring strstr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div><h3><a name="xmlStrcat" id="xmlStrcat"></a>Function: xmlStrcat</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrcat (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add)<br />
+</pre><p>a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * containing the concatenated string.</td></tr></tbody></table></div><h3><a name="xmlStrchr" id="xmlStrchr"></a>Function: xmlStrchr</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrchr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> val)<br />
+</pre><p>a strchr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> to search</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div><h3><a name="xmlStrcmp" id="xmlStrcmp"></a>Function: xmlStrcmp</h3><pre class="programlisting">int xmlStrcmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2)<br />
+</pre><p>a strcmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrdup" id="xmlStrdup"></a>Function: xmlStrdup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrdup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur)<br />
+</pre><p>a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrlen" id="xmlStrlen"></a>Function: xmlStrlen</h3><pre class="programlisting">int xmlStrlen (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>length of a xmlChar's string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> contained in the ARRAY.</td></tr></tbody></table></div><h3><a name="xmlStrncasecmp" id="xmlStrncasecmp"></a>Function: xmlStrncasecmp</h3><pre class="programlisting">int xmlStrncasecmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br />
+</pre><p>a strncasecmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrncat" id="xmlStrncat"></a>Function: xmlStrncat</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncat (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * add, <br /> int len)<br />
+</pre><p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the original <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array</td></tr><tr><td><span class="term"><i><tt>add</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array added</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of @add</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated if needed and should not be freed</td></tr></tbody></table></div><h3><a name="xmlStrncatNew" id="xmlStrncatNew"></a>Function: xmlStrncatNew</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrncatNew (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br />
+</pre><p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @str2 or &lt; 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrncmp" id="xmlStrncmp"></a>Function: xmlStrncmp</h3><pre class="programlisting">int xmlStrncmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str2, <br /> int len)<br />
+</pre><p>a strncmp for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str1</tt></i>:</span></td><td>the first <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>str2</tt></i>:</span></td><td>the second <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the max comparison length</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the integer result of the comparison</td></tr></tbody></table></div><h3><a name="xmlStrndup" id="xmlStrndup"></a>Function: xmlStrndup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrndup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur, <br /> int len)<br />
+</pre><p>a strndup for array of xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the input <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @cur</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td></tr></tbody></table></div><h3><a name="xmlStrstr" id="xmlStrstr"></a>Function: xmlStrstr</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrstr (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>a strstr for xmlChar's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div><h3><a name="xmlStrsub" id="xmlStrsub"></a>Function: xmlStrsub</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlStrsub (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> int start, <br /> int len)<br />
+</pre><p>Extract a substring of a given string</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the index of the first char (zero based)</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the length of the substring</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td></tr></tbody></table></div><h3><a name="xmlUTF8Charcmp" id="xmlUTF8Charcmp"></a>Function: xmlUTF8Charcmp</h3><pre class="programlisting">int xmlUTF8Charcmp (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf2)<br />
+</pre><p>compares the two UCS4 values</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf1</tt></i>:</span></td><td>pointer to first UTF8 char</td></tr><tr><td><span class="term"><i><tt>utf2</tt></i>:</span></td><td>pointer to second UTF8 char</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>result of the compare as with <a href="libxml-xmlstring.html#xmlStrncmp">xmlStrncmp</a></td></tr></tbody></table></div><h3><a name="xmlUTF8Size" id="xmlUTF8Size"></a>Function: xmlUTF8Size</h3><pre class="programlisting">int xmlUTF8Size (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf)<br />
+</pre><p>calculates the internal size of a UTF8 character</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>pointer to the UTF8 character</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the numbers of bytes in the character, -1 on format error</td></tr></tbody></table></div><h3><a name="xmlUTF8Strlen" id="xmlUTF8Strlen"></a>Function: xmlUTF8Strlen</h3><pre class="programlisting">int xmlUTF8Strlen (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf)<br />
+</pre><p>compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> in the string or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlUTF8Strloc" id="xmlUTF8Strloc"></a>Function: xmlUTF8Strloc</h3><pre class="programlisting">int xmlUTF8Strloc (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utfchar)<br />
+</pre><p>a function to provide the relative location of a UTF8 char</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>utfchar</tt></i>:</span></td><td>the UTF8 character to be found</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the relative character position of the desired char or -1 if not found</td></tr></tbody></table></div><h3><a name="xmlUTF8Strndup" id="xmlUTF8Strndup"></a>Function: xmlUTF8Strndup</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strndup (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int len)<br />
+</pre><p>a strndup for array of UTF8's</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the len of @utf (in chars)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new UTF8 * or NULL</td></tr></tbody></table></div><h3><a name="xmlUTF8Strpos" id="xmlUTF8Strpos"></a>Function: xmlUTF8Strpos</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strpos (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int pos)<br />
+</pre><p>a function to provide the equivalent of fetching a character from a string array</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>the input UTF8 *</td></tr><tr><td><span class="term"><i><tt>pos</tt></i>:</span></td><td>the position of the desired UTF8 char (in chars)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the UTF8 character or NULL</td></tr></tbody></table></div><h3><a name="xmlUTF8Strsize" id="xmlUTF8Strsize"></a>Function: xmlUTF8Strsize</h3><pre class="programlisting">int xmlUTF8Strsize (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int len)<br />
+</pre><p>storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml-SAX.html#characters">characters</a> in the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage size of the first 'len' <a href="libxml-SAX.html#characters">characters</a> of ARRAY</td></tr></tbody></table></div><h3><a name="xmlUTF8Strsub" id="xmlUTF8Strsub"></a>Function: xmlUTF8Strsub</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlUTF8Strsub (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * utf, <br /> int start, <br /> int len)<br />
+</pre><p>Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>utf</tt></i>:</span></td><td>a sequence of UTF-8 encoded bytes</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>relative pos of first char</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>total number to copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to a newly created string or NULL if any problem</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlunicode.html b/doc/html/libxml-xmlunicode.html
new file mode 100644
index 0000000..87094ee
--- /dev/null
+++ b/doc/html/libxml-xmlunicode.html
@@ -0,0 +1,512 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlunicode from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlunicode from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlstring.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlstring.html">xmlstring</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlversion.html">xmlversion</a></th><td><a accesskey="n" href="libxml-xmlversion.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database</p><h2>Table of Contents</h2><pre class="programlisting">int <a href="#xmlUCSIsAegeanNumbers">xmlUCSIsAegeanNumbers</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsAlphabeticPresentationForms">xmlUCSIsAlphabeticPresentationForms</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsArabic">xmlUCSIsArabic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsArabicPresentationFormsA">xmlUCSIsArabicPresentationFormsA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsArabicPresentationFormsB">xmlUCSIsArabicPresentationFormsB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsArmenian">xmlUCSIsArmenian</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsArrows">xmlUCSIsArrows</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBasicLatin">xmlUCSIsBasicLatin</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBengali">xmlUCSIsBengali</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBlock">xmlUCSIsBlock</a> (int code, <br /> const char * block)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBlockElements">xmlUCSIsBlockElements</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBopomofo">xmlUCSIsBopomofo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBopomofoExtended">xmlUCSIsBopomofoExtended</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBoxDrawing">xmlUCSIsBoxDrawing</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBraillePatterns">xmlUCSIsBraillePatterns</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsBuhid">xmlUCSIsBuhid</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsByzantineMusicalSymbols">xmlUCSIsByzantineMusicalSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKCompatibility">xmlUCSIsCJKCompatibility</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKCompatibilityForms">xmlUCSIsCJKCompatibilityForms</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKCompatibilityIdeographs">xmlUCSIsCJKCompatibilityIdeographs</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKCompatibilityIdeographsSupplement">xmlUCSIsCJKCompatibilityIdeographsSupplement</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKRadicalsSupplement">xmlUCSIsCJKRadicalsSupplement</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKSymbolsandPunctuation">xmlUCSIsCJKSymbolsandPunctuation</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKUnifiedIdeographs">xmlUCSIsCJKUnifiedIdeographs</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKUnifiedIdeographsExtensionA">xmlUCSIsCJKUnifiedIdeographsExtensionA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCJKUnifiedIdeographsExtensionB">xmlUCSIsCJKUnifiedIdeographsExtensionB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCat">xmlUCSIsCat</a> (int code, <br /> const char * cat)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatC">xmlUCSIsCatC</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatCc">xmlUCSIsCatCc</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatCf">xmlUCSIsCatCf</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatCo">xmlUCSIsCatCo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatCs">xmlUCSIsCatCs</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatL">xmlUCSIsCatL</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatLl">xmlUCSIsCatLl</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatLm">xmlUCSIsCatLm</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatLo">xmlUCSIsCatLo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatLt">xmlUCSIsCatLt</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatLu">xmlUCSIsCatLu</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatM">xmlUCSIsCatM</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatMc">xmlUCSIsCatMc</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatMe">xmlUCSIsCatMe</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatMn">xmlUCSIsCatMn</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatN">xmlUCSIsCatN</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatNd">xmlUCSIsCatNd</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatNl">xmlUCSIsCatNl</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatNo">xmlUCSIsCatNo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatP">xmlUCSIsCatP</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPc">xmlUCSIsCatPc</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPd">xmlUCSIsCatPd</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPe">xmlUCSIsCatPe</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPf">xmlUCSIsCatPf</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPi">xmlUCSIsCatPi</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPo">xmlUCSIsCatPo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatPs">xmlUCSIsCatPs</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatS">xmlUCSIsCatS</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatSc">xmlUCSIsCatSc</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatSk">xmlUCSIsCatSk</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatSm">xmlUCSIsCatSm</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatSo">xmlUCSIsCatSo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatZ">xmlUCSIsCatZ</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatZl">xmlUCSIsCatZl</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatZp">xmlUCSIsCatZp</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCatZs">xmlUCSIsCatZs</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCherokee">xmlUCSIsCherokee</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCombiningDiacriticalMarks">xmlUCSIsCombiningDiacriticalMarks</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCombiningDiacriticalMarksforSymbols">xmlUCSIsCombiningDiacriticalMarksforSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCombiningHalfMarks">xmlUCSIsCombiningHalfMarks</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCombiningMarksforSymbols">xmlUCSIsCombiningMarksforSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsControlPictures">xmlUCSIsControlPictures</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCurrencySymbols">xmlUCSIsCurrencySymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCypriotSyllabary">xmlUCSIsCypriotSyllabary</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCyrillic">xmlUCSIsCyrillic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsCyrillicSupplement">xmlUCSIsCyrillicSupplement</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsDeseret">xmlUCSIsDeseret</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsDevanagari">xmlUCSIsDevanagari</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsDingbats">xmlUCSIsDingbats</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsEnclosedAlphanumerics">xmlUCSIsEnclosedAlphanumerics</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsEnclosedCJKLettersandMonths">xmlUCSIsEnclosedCJKLettersandMonths</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsEthiopic">xmlUCSIsEthiopic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGeneralPunctuation">xmlUCSIsGeneralPunctuation</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGeometricShapes">xmlUCSIsGeometricShapes</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGeorgian">xmlUCSIsGeorgian</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGothic">xmlUCSIsGothic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGreek">xmlUCSIsGreek</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGreekExtended">xmlUCSIsGreekExtended</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGreekandCoptic">xmlUCSIsGreekandCoptic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGujarati">xmlUCSIsGujarati</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsGurmukhi">xmlUCSIsGurmukhi</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHalfwidthandFullwidthForms">xmlUCSIsHalfwidthandFullwidthForms</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHangulCompatibilityJamo">xmlUCSIsHangulCompatibilityJamo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHangulJamo">xmlUCSIsHangulJamo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHangulSyllables">xmlUCSIsHangulSyllables</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHanunoo">xmlUCSIsHanunoo</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHebrew">xmlUCSIsHebrew</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHighPrivateUseSurrogates">xmlUCSIsHighPrivateUseSurrogates</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHighSurrogates">xmlUCSIsHighSurrogates</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsHiragana">xmlUCSIsHiragana</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsIPAExtensions">xmlUCSIsIPAExtensions</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsIdeographicDescriptionCharacters">xmlUCSIsIdeographicDescriptionCharacters</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKanbun">xmlUCSIsKanbun</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKangxiRadicals">xmlUCSIsKangxiRadicals</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKannada">xmlUCSIsKannada</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKatakana">xmlUCSIsKatakana</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKatakanaPhoneticExtensions">xmlUCSIsKatakanaPhoneticExtensions</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKhmer">xmlUCSIsKhmer</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsKhmerSymbols">xmlUCSIsKhmerSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLao">xmlUCSIsLao</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLatin1Supplement">xmlUCSIsLatin1Supplement</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLatinExtendedA">xmlUCSIsLatinExtendedA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLatinExtendedAdditional">xmlUCSIsLatinExtendedAdditional</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLatinExtendedB">xmlUCSIsLatinExtendedB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLetterlikeSymbols">xmlUCSIsLetterlikeSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLimbu">xmlUCSIsLimbu</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLinearBIdeograms">xmlUCSIsLinearBIdeograms</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLinearBSyllabary">xmlUCSIsLinearBSyllabary</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsLowSurrogates">xmlUCSIsLowSurrogates</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMalayalam">xmlUCSIsMalayalam</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMathematicalAlphanumericSymbols">xmlUCSIsMathematicalAlphanumericSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMathematicalOperators">xmlUCSIsMathematicalOperators</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMiscellaneousMathematicalSymbolsA">xmlUCSIsMiscellaneousMathematicalSymbolsA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMiscellaneousMathematicalSymbolsB">xmlUCSIsMiscellaneousMathematicalSymbolsB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMiscellaneousSymbols">xmlUCSIsMiscellaneousSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMiscellaneousSymbolsandArrows">xmlUCSIsMiscellaneousSymbolsandArrows</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMiscellaneousTechnical">xmlUCSIsMiscellaneousTechnical</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMongolian">xmlUCSIsMongolian</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMusicalSymbols">xmlUCSIsMusicalSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsMyanmar">xmlUCSIsMyanmar</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsNumberForms">xmlUCSIsNumberForms</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsOgham">xmlUCSIsOgham</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsOldItalic">xmlUCSIsOldItalic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsOpticalCharacterRecognition">xmlUCSIsOpticalCharacterRecognition</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsOriya">xmlUCSIsOriya</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsOsmanya">xmlUCSIsOsmanya</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsPhoneticExtensions">xmlUCSIsPhoneticExtensions</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsPrivateUse">xmlUCSIsPrivateUse</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsPrivateUseArea">xmlUCSIsPrivateUseArea</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsRunic">xmlUCSIsRunic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsShavian">xmlUCSIsShavian</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSinhala">xmlUCSIsSinhala</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSmallFormVariants">xmlUCSIsSmallFormVariants</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSpacingModifierLetters">xmlUCSIsSpacingModifierLetters</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSpecials">xmlUCSIsSpecials</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSuperscriptsandSubscripts">xmlUCSIsSuperscriptsandSubscripts</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSupplementalArrowsA">xmlUCSIsSupplementalArrowsA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSupplementalArrowsB">xmlUCSIsSupplementalArrowsB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSupplementalMathematicalOperators">xmlUCSIsSupplementalMathematicalOperators</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSupplementaryPrivateUseAreaA">xmlUCSIsSupplementaryPrivateUseAreaA</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSupplementaryPrivateUseAreaB">xmlUCSIsSupplementaryPrivateUseAreaB</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsSyriac">xmlUCSIsSyriac</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTagalog">xmlUCSIsTagalog</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTagbanwa">xmlUCSIsTagbanwa</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTags">xmlUCSIsTags</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTaiLe">xmlUCSIsTaiLe</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTaiXuanJingSymbols">xmlUCSIsTaiXuanJingSymbols</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTamil">xmlUCSIsTamil</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTelugu">xmlUCSIsTelugu</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsThaana">xmlUCSIsThaana</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsThai">xmlUCSIsThai</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsTibetan">xmlUCSIsTibetan</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsUgaritic">xmlUCSIsUgaritic</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsUnifiedCanadianAboriginalSyllabics">xmlUCSIsUnifiedCanadianAboriginalSyllabics</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsVariationSelectors">xmlUCSIsVariationSelectors</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsVariationSelectorsSupplement">xmlUCSIsVariationSelectorsSupplement</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsYiRadicals">xmlUCSIsYiRadicals</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsYiSyllables">xmlUCSIsYiSyllables</a> (int code)</pre>
+<pre class="programlisting">int <a href="#xmlUCSIsYijingHexagramSymbols">xmlUCSIsYijingHexagramSymbols</a> (int code)</pre>
+<h2>Description</h2>
+<h3><a name="xmlUCSIsAegeanNumbers" id="xmlUCSIsAegeanNumbers"></a>Function: xmlUCSIsAegeanNumbers</h3><pre class="programlisting">int xmlUCSIsAegeanNumbers (int code)<br />
+</pre><p>Check whether the character is part of AegeanNumbers UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsAlphabeticPresentationForms" id="xmlUCSIsAlphabeticPresentationForms"></a>Function: xmlUCSIsAlphabeticPresentationForms</h3><pre class="programlisting">int xmlUCSIsAlphabeticPresentationForms (int code)<br />
+</pre><p>Check whether the character is part of AlphabeticPresentationForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsArabic" id="xmlUCSIsArabic"></a>Function: xmlUCSIsArabic</h3><pre class="programlisting">int xmlUCSIsArabic (int code)<br />
+</pre><p>Check whether the character is part of Arabic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsArabicPresentationFormsA" id="xmlUCSIsArabicPresentationFormsA"></a>Function: xmlUCSIsArabicPresentationFormsA</h3><pre class="programlisting">int xmlUCSIsArabicPresentationFormsA (int code)<br />
+</pre><p>Check whether the character is part of ArabicPresentationForms-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsArabicPresentationFormsB" id="xmlUCSIsArabicPresentationFormsB"></a>Function: xmlUCSIsArabicPresentationFormsB</h3><pre class="programlisting">int xmlUCSIsArabicPresentationFormsB (int code)<br />
+</pre><p>Check whether the character is part of ArabicPresentationForms-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsArmenian" id="xmlUCSIsArmenian"></a>Function: xmlUCSIsArmenian</h3><pre class="programlisting">int xmlUCSIsArmenian (int code)<br />
+</pre><p>Check whether the character is part of Armenian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsArrows" id="xmlUCSIsArrows"></a>Function: xmlUCSIsArrows</h3><pre class="programlisting">int xmlUCSIsArrows (int code)<br />
+</pre><p>Check whether the character is part of Arrows UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBasicLatin" id="xmlUCSIsBasicLatin"></a>Function: xmlUCSIsBasicLatin</h3><pre class="programlisting">int xmlUCSIsBasicLatin (int code)<br />
+</pre><p>Check whether the character is part of BasicLatin UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBengali" id="xmlUCSIsBengali"></a>Function: xmlUCSIsBengali</h3><pre class="programlisting">int xmlUCSIsBengali (int code)<br />
+</pre><p>Check whether the character is part of Bengali UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBlock" id="xmlUCSIsBlock"></a>Function: xmlUCSIsBlock</h3><pre class="programlisting">int xmlUCSIsBlock (int code, <br /> const char * block)<br />
+</pre><p>Check whether the character is part of the UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>block</tt></i>:</span></td><td>UCS block name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 on unknown block</td></tr></tbody></table></div><h3><a name="xmlUCSIsBlockElements" id="xmlUCSIsBlockElements"></a>Function: xmlUCSIsBlockElements</h3><pre class="programlisting">int xmlUCSIsBlockElements (int code)<br />
+</pre><p>Check whether the character is part of BlockElements UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBopomofo" id="xmlUCSIsBopomofo"></a>Function: xmlUCSIsBopomofo</h3><pre class="programlisting">int xmlUCSIsBopomofo (int code)<br />
+</pre><p>Check whether the character is part of Bopomofo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBopomofoExtended" id="xmlUCSIsBopomofoExtended"></a>Function: xmlUCSIsBopomofoExtended</h3><pre class="programlisting">int xmlUCSIsBopomofoExtended (int code)<br />
+</pre><p>Check whether the character is part of BopomofoExtended UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBoxDrawing" id="xmlUCSIsBoxDrawing"></a>Function: xmlUCSIsBoxDrawing</h3><pre class="programlisting">int xmlUCSIsBoxDrawing (int code)<br />
+</pre><p>Check whether the character is part of BoxDrawing UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBraillePatterns" id="xmlUCSIsBraillePatterns"></a>Function: xmlUCSIsBraillePatterns</h3><pre class="programlisting">int xmlUCSIsBraillePatterns (int code)<br />
+</pre><p>Check whether the character is part of BraillePatterns UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsBuhid" id="xmlUCSIsBuhid"></a>Function: xmlUCSIsBuhid</h3><pre class="programlisting">int xmlUCSIsBuhid (int code)<br />
+</pre><p>Check whether the character is part of Buhid UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsByzantineMusicalSymbols" id="xmlUCSIsByzantineMusicalSymbols"></a>Function: xmlUCSIsByzantineMusicalSymbols</h3><pre class="programlisting">int xmlUCSIsByzantineMusicalSymbols (int code)<br />
+</pre><p>Check whether the character is part of ByzantineMusicalSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKCompatibility" id="xmlUCSIsCJKCompatibility"></a>Function: xmlUCSIsCJKCompatibility</h3><pre class="programlisting">int xmlUCSIsCJKCompatibility (int code)<br />
+</pre><p>Check whether the character is part of CJKCompatibility UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKCompatibilityForms" id="xmlUCSIsCJKCompatibilityForms"></a>Function: xmlUCSIsCJKCompatibilityForms</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityForms (int code)<br />
+</pre><p>Check whether the character is part of CJKCompatibilityForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKCompatibilityIdeographs" id="xmlUCSIsCJKCompatibilityIdeographs"></a>Function: xmlUCSIsCJKCompatibilityIdeographs</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityIdeographs (int code)<br />
+</pre><p>Check whether the character is part of CJKCompatibilityIdeographs UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKCompatibilityIdeographsSupplement" id="xmlUCSIsCJKCompatibilityIdeographsSupplement"></a>Function: xmlUCSIsCJKCompatibilityIdeographsSupplement</h3><pre class="programlisting">int xmlUCSIsCJKCompatibilityIdeographsSupplement (int code)<br />
+</pre><p>Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKRadicalsSupplement" id="xmlUCSIsCJKRadicalsSupplement"></a>Function: xmlUCSIsCJKRadicalsSupplement</h3><pre class="programlisting">int xmlUCSIsCJKRadicalsSupplement (int code)<br />
+</pre><p>Check whether the character is part of CJKRadicalsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKSymbolsandPunctuation" id="xmlUCSIsCJKSymbolsandPunctuation"></a>Function: xmlUCSIsCJKSymbolsandPunctuation</h3><pre class="programlisting">int xmlUCSIsCJKSymbolsandPunctuation (int code)<br />
+</pre><p>Check whether the character is part of CJKSymbolsandPunctuation UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKUnifiedIdeographs" id="xmlUCSIsCJKUnifiedIdeographs"></a>Function: xmlUCSIsCJKUnifiedIdeographs</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographs (int code)<br />
+</pre><p>Check whether the character is part of CJKUnifiedIdeographs UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKUnifiedIdeographsExtensionA" id="xmlUCSIsCJKUnifiedIdeographsExtensionA"></a>Function: xmlUCSIsCJKUnifiedIdeographsExtensionA</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographsExtensionA (int code)<br />
+</pre><p>Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCJKUnifiedIdeographsExtensionB" id="xmlUCSIsCJKUnifiedIdeographsExtensionB"></a>Function: xmlUCSIsCJKUnifiedIdeographsExtensionB</h3><pre class="programlisting">int xmlUCSIsCJKUnifiedIdeographsExtensionB (int code)<br />
+</pre><p>Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCat" id="xmlUCSIsCat"></a>Function: xmlUCSIsCat</h3><pre class="programlisting">int xmlUCSIsCat (int code, <br /> const char * cat)<br />
+</pre><p>Check whether the character is part of the UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>cat</tt></i>:</span></td><td>UCS Category name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true, 0 if false and -1 on unknown category</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatC" id="xmlUCSIsCatC"></a>Function: xmlUCSIsCatC</h3><pre class="programlisting">int xmlUCSIsCatC (int code)<br />
+</pre><p>Check whether the character is part of C UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatCc" id="xmlUCSIsCatCc"></a>Function: xmlUCSIsCatCc</h3><pre class="programlisting">int xmlUCSIsCatCc (int code)<br />
+</pre><p>Check whether the character is part of Cc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatCf" id="xmlUCSIsCatCf"></a>Function: xmlUCSIsCatCf</h3><pre class="programlisting">int xmlUCSIsCatCf (int code)<br />
+</pre><p>Check whether the character is part of Cf UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatCo" id="xmlUCSIsCatCo"></a>Function: xmlUCSIsCatCo</h3><pre class="programlisting">int xmlUCSIsCatCo (int code)<br />
+</pre><p>Check whether the character is part of Co UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatCs" id="xmlUCSIsCatCs"></a>Function: xmlUCSIsCatCs</h3><pre class="programlisting">int xmlUCSIsCatCs (int code)<br />
+</pre><p>Check whether the character is part of Cs UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatL" id="xmlUCSIsCatL"></a>Function: xmlUCSIsCatL</h3><pre class="programlisting">int xmlUCSIsCatL (int code)<br />
+</pre><p>Check whether the character is part of L UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatLl" id="xmlUCSIsCatLl"></a>Function: xmlUCSIsCatLl</h3><pre class="programlisting">int xmlUCSIsCatLl (int code)<br />
+</pre><p>Check whether the character is part of Ll UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatLm" id="xmlUCSIsCatLm"></a>Function: xmlUCSIsCatLm</h3><pre class="programlisting">int xmlUCSIsCatLm (int code)<br />
+</pre><p>Check whether the character is part of Lm UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatLo" id="xmlUCSIsCatLo"></a>Function: xmlUCSIsCatLo</h3><pre class="programlisting">int xmlUCSIsCatLo (int code)<br />
+</pre><p>Check whether the character is part of Lo UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatLt" id="xmlUCSIsCatLt"></a>Function: xmlUCSIsCatLt</h3><pre class="programlisting">int xmlUCSIsCatLt (int code)<br />
+</pre><p>Check whether the character is part of Lt UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatLu" id="xmlUCSIsCatLu"></a>Function: xmlUCSIsCatLu</h3><pre class="programlisting">int xmlUCSIsCatLu (int code)<br />
+</pre><p>Check whether the character is part of Lu UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatM" id="xmlUCSIsCatM"></a>Function: xmlUCSIsCatM</h3><pre class="programlisting">int xmlUCSIsCatM (int code)<br />
+</pre><p>Check whether the character is part of M UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatMc" id="xmlUCSIsCatMc"></a>Function: xmlUCSIsCatMc</h3><pre class="programlisting">int xmlUCSIsCatMc (int code)<br />
+</pre><p>Check whether the character is part of Mc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatMe" id="xmlUCSIsCatMe"></a>Function: xmlUCSIsCatMe</h3><pre class="programlisting">int xmlUCSIsCatMe (int code)<br />
+</pre><p>Check whether the character is part of Me UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatMn" id="xmlUCSIsCatMn"></a>Function: xmlUCSIsCatMn</h3><pre class="programlisting">int xmlUCSIsCatMn (int code)<br />
+</pre><p>Check whether the character is part of Mn UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatN" id="xmlUCSIsCatN"></a>Function: xmlUCSIsCatN</h3><pre class="programlisting">int xmlUCSIsCatN (int code)<br />
+</pre><p>Check whether the character is part of N UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatNd" id="xmlUCSIsCatNd"></a>Function: xmlUCSIsCatNd</h3><pre class="programlisting">int xmlUCSIsCatNd (int code)<br />
+</pre><p>Check whether the character is part of Nd UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatNl" id="xmlUCSIsCatNl"></a>Function: xmlUCSIsCatNl</h3><pre class="programlisting">int xmlUCSIsCatNl (int code)<br />
+</pre><p>Check whether the character is part of Nl UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatNo" id="xmlUCSIsCatNo"></a>Function: xmlUCSIsCatNo</h3><pre class="programlisting">int xmlUCSIsCatNo (int code)<br />
+</pre><p>Check whether the character is part of No UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatP" id="xmlUCSIsCatP"></a>Function: xmlUCSIsCatP</h3><pre class="programlisting">int xmlUCSIsCatP (int code)<br />
+</pre><p>Check whether the character is part of P UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPc" id="xmlUCSIsCatPc"></a>Function: xmlUCSIsCatPc</h3><pre class="programlisting">int xmlUCSIsCatPc (int code)<br />
+</pre><p>Check whether the character is part of Pc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPd" id="xmlUCSIsCatPd"></a>Function: xmlUCSIsCatPd</h3><pre class="programlisting">int xmlUCSIsCatPd (int code)<br />
+</pre><p>Check whether the character is part of Pd UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPe" id="xmlUCSIsCatPe"></a>Function: xmlUCSIsCatPe</h3><pre class="programlisting">int xmlUCSIsCatPe (int code)<br />
+</pre><p>Check whether the character is part of Pe UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPf" id="xmlUCSIsCatPf"></a>Function: xmlUCSIsCatPf</h3><pre class="programlisting">int xmlUCSIsCatPf (int code)<br />
+</pre><p>Check whether the character is part of Pf UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPi" id="xmlUCSIsCatPi"></a>Function: xmlUCSIsCatPi</h3><pre class="programlisting">int xmlUCSIsCatPi (int code)<br />
+</pre><p>Check whether the character is part of Pi UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPo" id="xmlUCSIsCatPo"></a>Function: xmlUCSIsCatPo</h3><pre class="programlisting">int xmlUCSIsCatPo (int code)<br />
+</pre><p>Check whether the character is part of Po UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatPs" id="xmlUCSIsCatPs"></a>Function: xmlUCSIsCatPs</h3><pre class="programlisting">int xmlUCSIsCatPs (int code)<br />
+</pre><p>Check whether the character is part of Ps UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatS" id="xmlUCSIsCatS"></a>Function: xmlUCSIsCatS</h3><pre class="programlisting">int xmlUCSIsCatS (int code)<br />
+</pre><p>Check whether the character is part of S UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatSc" id="xmlUCSIsCatSc"></a>Function: xmlUCSIsCatSc</h3><pre class="programlisting">int xmlUCSIsCatSc (int code)<br />
+</pre><p>Check whether the character is part of Sc UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatSk" id="xmlUCSIsCatSk"></a>Function: xmlUCSIsCatSk</h3><pre class="programlisting">int xmlUCSIsCatSk (int code)<br />
+</pre><p>Check whether the character is part of Sk UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatSm" id="xmlUCSIsCatSm"></a>Function: xmlUCSIsCatSm</h3><pre class="programlisting">int xmlUCSIsCatSm (int code)<br />
+</pre><p>Check whether the character is part of Sm UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatSo" id="xmlUCSIsCatSo"></a>Function: xmlUCSIsCatSo</h3><pre class="programlisting">int xmlUCSIsCatSo (int code)<br />
+</pre><p>Check whether the character is part of So UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatZ" id="xmlUCSIsCatZ"></a>Function: xmlUCSIsCatZ</h3><pre class="programlisting">int xmlUCSIsCatZ (int code)<br />
+</pre><p>Check whether the character is part of Z UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatZl" id="xmlUCSIsCatZl"></a>Function: xmlUCSIsCatZl</h3><pre class="programlisting">int xmlUCSIsCatZl (int code)<br />
+</pre><p>Check whether the character is part of Zl UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatZp" id="xmlUCSIsCatZp"></a>Function: xmlUCSIsCatZp</h3><pre class="programlisting">int xmlUCSIsCatZp (int code)<br />
+</pre><p>Check whether the character is part of Zp UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCatZs" id="xmlUCSIsCatZs"></a>Function: xmlUCSIsCatZs</h3><pre class="programlisting">int xmlUCSIsCatZs (int code)<br />
+</pre><p>Check whether the character is part of Zs UCS Category</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCherokee" id="xmlUCSIsCherokee"></a>Function: xmlUCSIsCherokee</h3><pre class="programlisting">int xmlUCSIsCherokee (int code)<br />
+</pre><p>Check whether the character is part of Cherokee UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCombiningDiacriticalMarks" id="xmlUCSIsCombiningDiacriticalMarks"></a>Function: xmlUCSIsCombiningDiacriticalMarks</h3><pre class="programlisting">int xmlUCSIsCombiningDiacriticalMarks (int code)<br />
+</pre><p>Check whether the character is part of CombiningDiacriticalMarks UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCombiningDiacriticalMarksforSymbols" id="xmlUCSIsCombiningDiacriticalMarksforSymbols"></a>Function: xmlUCSIsCombiningDiacriticalMarksforSymbols</h3><pre class="programlisting">int xmlUCSIsCombiningDiacriticalMarksforSymbols (int code)<br />
+</pre><p>Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCombiningHalfMarks" id="xmlUCSIsCombiningHalfMarks"></a>Function: xmlUCSIsCombiningHalfMarks</h3><pre class="programlisting">int xmlUCSIsCombiningHalfMarks (int code)<br />
+</pre><p>Check whether the character is part of CombiningHalfMarks UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCombiningMarksforSymbols" id="xmlUCSIsCombiningMarksforSymbols"></a>Function: xmlUCSIsCombiningMarksforSymbols</h3><pre class="programlisting">int xmlUCSIsCombiningMarksforSymbols (int code)<br />
+</pre><p>Check whether the character is part of CombiningMarksforSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsControlPictures" id="xmlUCSIsControlPictures"></a>Function: xmlUCSIsControlPictures</h3><pre class="programlisting">int xmlUCSIsControlPictures (int code)<br />
+</pre><p>Check whether the character is part of ControlPictures UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCurrencySymbols" id="xmlUCSIsCurrencySymbols"></a>Function: xmlUCSIsCurrencySymbols</h3><pre class="programlisting">int xmlUCSIsCurrencySymbols (int code)<br />
+</pre><p>Check whether the character is part of CurrencySymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCypriotSyllabary" id="xmlUCSIsCypriotSyllabary"></a>Function: xmlUCSIsCypriotSyllabary</h3><pre class="programlisting">int xmlUCSIsCypriotSyllabary (int code)<br />
+</pre><p>Check whether the character is part of CypriotSyllabary UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCyrillic" id="xmlUCSIsCyrillic"></a>Function: xmlUCSIsCyrillic</h3><pre class="programlisting">int xmlUCSIsCyrillic (int code)<br />
+</pre><p>Check whether the character is part of Cyrillic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsCyrillicSupplement" id="xmlUCSIsCyrillicSupplement"></a>Function: xmlUCSIsCyrillicSupplement</h3><pre class="programlisting">int xmlUCSIsCyrillicSupplement (int code)<br />
+</pre><p>Check whether the character is part of CyrillicSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsDeseret" id="xmlUCSIsDeseret"></a>Function: xmlUCSIsDeseret</h3><pre class="programlisting">int xmlUCSIsDeseret (int code)<br />
+</pre><p>Check whether the character is part of Deseret UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsDevanagari" id="xmlUCSIsDevanagari"></a>Function: xmlUCSIsDevanagari</h3><pre class="programlisting">int xmlUCSIsDevanagari (int code)<br />
+</pre><p>Check whether the character is part of Devanagari UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsDingbats" id="xmlUCSIsDingbats"></a>Function: xmlUCSIsDingbats</h3><pre class="programlisting">int xmlUCSIsDingbats (int code)<br />
+</pre><p>Check whether the character is part of Dingbats UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsEnclosedAlphanumerics" id="xmlUCSIsEnclosedAlphanumerics"></a>Function: xmlUCSIsEnclosedAlphanumerics</h3><pre class="programlisting">int xmlUCSIsEnclosedAlphanumerics (int code)<br />
+</pre><p>Check whether the character is part of EnclosedAlphanumerics UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsEnclosedCJKLettersandMonths" id="xmlUCSIsEnclosedCJKLettersandMonths"></a>Function: xmlUCSIsEnclosedCJKLettersandMonths</h3><pre class="programlisting">int xmlUCSIsEnclosedCJKLettersandMonths (int code)<br />
+</pre><p>Check whether the character is part of EnclosedCJKLettersandMonths UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsEthiopic" id="xmlUCSIsEthiopic"></a>Function: xmlUCSIsEthiopic</h3><pre class="programlisting">int xmlUCSIsEthiopic (int code)<br />
+</pre><p>Check whether the character is part of Ethiopic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGeneralPunctuation" id="xmlUCSIsGeneralPunctuation"></a>Function: xmlUCSIsGeneralPunctuation</h3><pre class="programlisting">int xmlUCSIsGeneralPunctuation (int code)<br />
+</pre><p>Check whether the character is part of GeneralPunctuation UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGeometricShapes" id="xmlUCSIsGeometricShapes"></a>Function: xmlUCSIsGeometricShapes</h3><pre class="programlisting">int xmlUCSIsGeometricShapes (int code)<br />
+</pre><p>Check whether the character is part of GeometricShapes UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGeorgian" id="xmlUCSIsGeorgian"></a>Function: xmlUCSIsGeorgian</h3><pre class="programlisting">int xmlUCSIsGeorgian (int code)<br />
+</pre><p>Check whether the character is part of Georgian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGothic" id="xmlUCSIsGothic"></a>Function: xmlUCSIsGothic</h3><pre class="programlisting">int xmlUCSIsGothic (int code)<br />
+</pre><p>Check whether the character is part of Gothic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGreek" id="xmlUCSIsGreek"></a>Function: xmlUCSIsGreek</h3><pre class="programlisting">int xmlUCSIsGreek (int code)<br />
+</pre><p>Check whether the character is part of Greek UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGreekExtended" id="xmlUCSIsGreekExtended"></a>Function: xmlUCSIsGreekExtended</h3><pre class="programlisting">int xmlUCSIsGreekExtended (int code)<br />
+</pre><p>Check whether the character is part of GreekExtended UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGreekandCoptic" id="xmlUCSIsGreekandCoptic"></a>Function: xmlUCSIsGreekandCoptic</h3><pre class="programlisting">int xmlUCSIsGreekandCoptic (int code)<br />
+</pre><p>Check whether the character is part of GreekandCoptic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGujarati" id="xmlUCSIsGujarati"></a>Function: xmlUCSIsGujarati</h3><pre class="programlisting">int xmlUCSIsGujarati (int code)<br />
+</pre><p>Check whether the character is part of Gujarati UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsGurmukhi" id="xmlUCSIsGurmukhi"></a>Function: xmlUCSIsGurmukhi</h3><pre class="programlisting">int xmlUCSIsGurmukhi (int code)<br />
+</pre><p>Check whether the character is part of Gurmukhi UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHalfwidthandFullwidthForms" id="xmlUCSIsHalfwidthandFullwidthForms"></a>Function: xmlUCSIsHalfwidthandFullwidthForms</h3><pre class="programlisting">int xmlUCSIsHalfwidthandFullwidthForms (int code)<br />
+</pre><p>Check whether the character is part of HalfwidthandFullwidthForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHangulCompatibilityJamo" id="xmlUCSIsHangulCompatibilityJamo"></a>Function: xmlUCSIsHangulCompatibilityJamo</h3><pre class="programlisting">int xmlUCSIsHangulCompatibilityJamo (int code)<br />
+</pre><p>Check whether the character is part of HangulCompatibilityJamo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHangulJamo" id="xmlUCSIsHangulJamo"></a>Function: xmlUCSIsHangulJamo</h3><pre class="programlisting">int xmlUCSIsHangulJamo (int code)<br />
+</pre><p>Check whether the character is part of HangulJamo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHangulSyllables" id="xmlUCSIsHangulSyllables"></a>Function: xmlUCSIsHangulSyllables</h3><pre class="programlisting">int xmlUCSIsHangulSyllables (int code)<br />
+</pre><p>Check whether the character is part of HangulSyllables UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHanunoo" id="xmlUCSIsHanunoo"></a>Function: xmlUCSIsHanunoo</h3><pre class="programlisting">int xmlUCSIsHanunoo (int code)<br />
+</pre><p>Check whether the character is part of Hanunoo UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHebrew" id="xmlUCSIsHebrew"></a>Function: xmlUCSIsHebrew</h3><pre class="programlisting">int xmlUCSIsHebrew (int code)<br />
+</pre><p>Check whether the character is part of Hebrew UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHighPrivateUseSurrogates" id="xmlUCSIsHighPrivateUseSurrogates"></a>Function: xmlUCSIsHighPrivateUseSurrogates</h3><pre class="programlisting">int xmlUCSIsHighPrivateUseSurrogates (int code)<br />
+</pre><p>Check whether the character is part of HighPrivateUseSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHighSurrogates" id="xmlUCSIsHighSurrogates"></a>Function: xmlUCSIsHighSurrogates</h3><pre class="programlisting">int xmlUCSIsHighSurrogates (int code)<br />
+</pre><p>Check whether the character is part of HighSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsHiragana" id="xmlUCSIsHiragana"></a>Function: xmlUCSIsHiragana</h3><pre class="programlisting">int xmlUCSIsHiragana (int code)<br />
+</pre><p>Check whether the character is part of Hiragana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsIPAExtensions" id="xmlUCSIsIPAExtensions"></a>Function: xmlUCSIsIPAExtensions</h3><pre class="programlisting">int xmlUCSIsIPAExtensions (int code)<br />
+</pre><p>Check whether the character is part of IPAExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsIdeographicDescriptionCharacters" id="xmlUCSIsIdeographicDescriptionCharacters"></a>Function: xmlUCSIsIdeographicDescriptionCharacters</h3><pre class="programlisting">int xmlUCSIsIdeographicDescriptionCharacters (int code)<br />
+</pre><p>Check whether the character is part of IdeographicDescriptionCharacters UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKanbun" id="xmlUCSIsKanbun"></a>Function: xmlUCSIsKanbun</h3><pre class="programlisting">int xmlUCSIsKanbun (int code)<br />
+</pre><p>Check whether the character is part of Kanbun UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKangxiRadicals" id="xmlUCSIsKangxiRadicals"></a>Function: xmlUCSIsKangxiRadicals</h3><pre class="programlisting">int xmlUCSIsKangxiRadicals (int code)<br />
+</pre><p>Check whether the character is part of KangxiRadicals UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKannada" id="xmlUCSIsKannada"></a>Function: xmlUCSIsKannada</h3><pre class="programlisting">int xmlUCSIsKannada (int code)<br />
+</pre><p>Check whether the character is part of Kannada UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKatakana" id="xmlUCSIsKatakana"></a>Function: xmlUCSIsKatakana</h3><pre class="programlisting">int xmlUCSIsKatakana (int code)<br />
+</pre><p>Check whether the character is part of Katakana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKatakanaPhoneticExtensions" id="xmlUCSIsKatakanaPhoneticExtensions"></a>Function: xmlUCSIsKatakanaPhoneticExtensions</h3><pre class="programlisting">int xmlUCSIsKatakanaPhoneticExtensions (int code)<br />
+</pre><p>Check whether the character is part of KatakanaPhoneticExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKhmer" id="xmlUCSIsKhmer"></a>Function: xmlUCSIsKhmer</h3><pre class="programlisting">int xmlUCSIsKhmer (int code)<br />
+</pre><p>Check whether the character is part of Khmer UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsKhmerSymbols" id="xmlUCSIsKhmerSymbols"></a>Function: xmlUCSIsKhmerSymbols</h3><pre class="programlisting">int xmlUCSIsKhmerSymbols (int code)<br />
+</pre><p>Check whether the character is part of KhmerSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLao" id="xmlUCSIsLao"></a>Function: xmlUCSIsLao</h3><pre class="programlisting">int xmlUCSIsLao (int code)<br />
+</pre><p>Check whether the character is part of Lao UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLatin1Supplement" id="xmlUCSIsLatin1Supplement"></a>Function: xmlUCSIsLatin1Supplement</h3><pre class="programlisting">int xmlUCSIsLatin1Supplement (int code)<br />
+</pre><p>Check whether the character is part of Latin-1Supplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLatinExtendedA" id="xmlUCSIsLatinExtendedA"></a>Function: xmlUCSIsLatinExtendedA</h3><pre class="programlisting">int xmlUCSIsLatinExtendedA (int code)<br />
+</pre><p>Check whether the character is part of LatinExtended-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLatinExtendedAdditional" id="xmlUCSIsLatinExtendedAdditional"></a>Function: xmlUCSIsLatinExtendedAdditional</h3><pre class="programlisting">int xmlUCSIsLatinExtendedAdditional (int code)<br />
+</pre><p>Check whether the character is part of LatinExtendedAdditional UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLatinExtendedB" id="xmlUCSIsLatinExtendedB"></a>Function: xmlUCSIsLatinExtendedB</h3><pre class="programlisting">int xmlUCSIsLatinExtendedB (int code)<br />
+</pre><p>Check whether the character is part of LatinExtended-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLetterlikeSymbols" id="xmlUCSIsLetterlikeSymbols"></a>Function: xmlUCSIsLetterlikeSymbols</h3><pre class="programlisting">int xmlUCSIsLetterlikeSymbols (int code)<br />
+</pre><p>Check whether the character is part of LetterlikeSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLimbu" id="xmlUCSIsLimbu"></a>Function: xmlUCSIsLimbu</h3><pre class="programlisting">int xmlUCSIsLimbu (int code)<br />
+</pre><p>Check whether the character is part of Limbu UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLinearBIdeograms" id="xmlUCSIsLinearBIdeograms"></a>Function: xmlUCSIsLinearBIdeograms</h3><pre class="programlisting">int xmlUCSIsLinearBIdeograms (int code)<br />
+</pre><p>Check whether the character is part of LinearBIdeograms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLinearBSyllabary" id="xmlUCSIsLinearBSyllabary"></a>Function: xmlUCSIsLinearBSyllabary</h3><pre class="programlisting">int xmlUCSIsLinearBSyllabary (int code)<br />
+</pre><p>Check whether the character is part of LinearBSyllabary UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsLowSurrogates" id="xmlUCSIsLowSurrogates"></a>Function: xmlUCSIsLowSurrogates</h3><pre class="programlisting">int xmlUCSIsLowSurrogates (int code)<br />
+</pre><p>Check whether the character is part of LowSurrogates UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMalayalam" id="xmlUCSIsMalayalam"></a>Function: xmlUCSIsMalayalam</h3><pre class="programlisting">int xmlUCSIsMalayalam (int code)<br />
+</pre><p>Check whether the character is part of Malayalam UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMathematicalAlphanumericSymbols" id="xmlUCSIsMathematicalAlphanumericSymbols"></a>Function: xmlUCSIsMathematicalAlphanumericSymbols</h3><pre class="programlisting">int xmlUCSIsMathematicalAlphanumericSymbols (int code)<br />
+</pre><p>Check whether the character is part of MathematicalAlphanumericSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMathematicalOperators" id="xmlUCSIsMathematicalOperators"></a>Function: xmlUCSIsMathematicalOperators</h3><pre class="programlisting">int xmlUCSIsMathematicalOperators (int code)<br />
+</pre><p>Check whether the character is part of MathematicalOperators UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMiscellaneousMathematicalSymbolsA" id="xmlUCSIsMiscellaneousMathematicalSymbolsA"></a>Function: xmlUCSIsMiscellaneousMathematicalSymbolsA</h3><pre class="programlisting">int xmlUCSIsMiscellaneousMathematicalSymbolsA (int code)<br />
+</pre><p>Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMiscellaneousMathematicalSymbolsB" id="xmlUCSIsMiscellaneousMathematicalSymbolsB"></a>Function: xmlUCSIsMiscellaneousMathematicalSymbolsB</h3><pre class="programlisting">int xmlUCSIsMiscellaneousMathematicalSymbolsB (int code)<br />
+</pre><p>Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMiscellaneousSymbols" id="xmlUCSIsMiscellaneousSymbols"></a>Function: xmlUCSIsMiscellaneousSymbols</h3><pre class="programlisting">int xmlUCSIsMiscellaneousSymbols (int code)<br />
+</pre><p>Check whether the character is part of MiscellaneousSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMiscellaneousSymbolsandArrows" id="xmlUCSIsMiscellaneousSymbolsandArrows"></a>Function: xmlUCSIsMiscellaneousSymbolsandArrows</h3><pre class="programlisting">int xmlUCSIsMiscellaneousSymbolsandArrows (int code)<br />
+</pre><p>Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMiscellaneousTechnical" id="xmlUCSIsMiscellaneousTechnical"></a>Function: xmlUCSIsMiscellaneousTechnical</h3><pre class="programlisting">int xmlUCSIsMiscellaneousTechnical (int code)<br />
+</pre><p>Check whether the character is part of MiscellaneousTechnical UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMongolian" id="xmlUCSIsMongolian"></a>Function: xmlUCSIsMongolian</h3><pre class="programlisting">int xmlUCSIsMongolian (int code)<br />
+</pre><p>Check whether the character is part of Mongolian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMusicalSymbols" id="xmlUCSIsMusicalSymbols"></a>Function: xmlUCSIsMusicalSymbols</h3><pre class="programlisting">int xmlUCSIsMusicalSymbols (int code)<br />
+</pre><p>Check whether the character is part of MusicalSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsMyanmar" id="xmlUCSIsMyanmar"></a>Function: xmlUCSIsMyanmar</h3><pre class="programlisting">int xmlUCSIsMyanmar (int code)<br />
+</pre><p>Check whether the character is part of Myanmar UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsNumberForms" id="xmlUCSIsNumberForms"></a>Function: xmlUCSIsNumberForms</h3><pre class="programlisting">int xmlUCSIsNumberForms (int code)<br />
+</pre><p>Check whether the character is part of NumberForms UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsOgham" id="xmlUCSIsOgham"></a>Function: xmlUCSIsOgham</h3><pre class="programlisting">int xmlUCSIsOgham (int code)<br />
+</pre><p>Check whether the character is part of Ogham UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsOldItalic" id="xmlUCSIsOldItalic"></a>Function: xmlUCSIsOldItalic</h3><pre class="programlisting">int xmlUCSIsOldItalic (int code)<br />
+</pre><p>Check whether the character is part of OldItalic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsOpticalCharacterRecognition" id="xmlUCSIsOpticalCharacterRecognition"></a>Function: xmlUCSIsOpticalCharacterRecognition</h3><pre class="programlisting">int xmlUCSIsOpticalCharacterRecognition (int code)<br />
+</pre><p>Check whether the character is part of OpticalCharacterRecognition UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsOriya" id="xmlUCSIsOriya"></a>Function: xmlUCSIsOriya</h3><pre class="programlisting">int xmlUCSIsOriya (int code)<br />
+</pre><p>Check whether the character is part of Oriya UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsOsmanya" id="xmlUCSIsOsmanya"></a>Function: xmlUCSIsOsmanya</h3><pre class="programlisting">int xmlUCSIsOsmanya (int code)<br />
+</pre><p>Check whether the character is part of Osmanya UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsPhoneticExtensions" id="xmlUCSIsPhoneticExtensions"></a>Function: xmlUCSIsPhoneticExtensions</h3><pre class="programlisting">int xmlUCSIsPhoneticExtensions (int code)<br />
+</pre><p>Check whether the character is part of PhoneticExtensions UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsPrivateUse" id="xmlUCSIsPrivateUse"></a>Function: xmlUCSIsPrivateUse</h3><pre class="programlisting">int xmlUCSIsPrivateUse (int code)<br />
+</pre><p>Check whether the character is part of PrivateUse UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsPrivateUseArea" id="xmlUCSIsPrivateUseArea"></a>Function: xmlUCSIsPrivateUseArea</h3><pre class="programlisting">int xmlUCSIsPrivateUseArea (int code)<br />
+</pre><p>Check whether the character is part of PrivateUseArea UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsRunic" id="xmlUCSIsRunic"></a>Function: xmlUCSIsRunic</h3><pre class="programlisting">int xmlUCSIsRunic (int code)<br />
+</pre><p>Check whether the character is part of Runic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsShavian" id="xmlUCSIsShavian"></a>Function: xmlUCSIsShavian</h3><pre class="programlisting">int xmlUCSIsShavian (int code)<br />
+</pre><p>Check whether the character is part of Shavian UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSinhala" id="xmlUCSIsSinhala"></a>Function: xmlUCSIsSinhala</h3><pre class="programlisting">int xmlUCSIsSinhala (int code)<br />
+</pre><p>Check whether the character is part of Sinhala UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSmallFormVariants" id="xmlUCSIsSmallFormVariants"></a>Function: xmlUCSIsSmallFormVariants</h3><pre class="programlisting">int xmlUCSIsSmallFormVariants (int code)<br />
+</pre><p>Check whether the character is part of SmallFormVariants UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSpacingModifierLetters" id="xmlUCSIsSpacingModifierLetters"></a>Function: xmlUCSIsSpacingModifierLetters</h3><pre class="programlisting">int xmlUCSIsSpacingModifierLetters (int code)<br />
+</pre><p>Check whether the character is part of SpacingModifierLetters UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSpecials" id="xmlUCSIsSpecials"></a>Function: xmlUCSIsSpecials</h3><pre class="programlisting">int xmlUCSIsSpecials (int code)<br />
+</pre><p>Check whether the character is part of Specials UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSuperscriptsandSubscripts" id="xmlUCSIsSuperscriptsandSubscripts"></a>Function: xmlUCSIsSuperscriptsandSubscripts</h3><pre class="programlisting">int xmlUCSIsSuperscriptsandSubscripts (int code)<br />
+</pre><p>Check whether the character is part of SuperscriptsandSubscripts UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSupplementalArrowsA" id="xmlUCSIsSupplementalArrowsA"></a>Function: xmlUCSIsSupplementalArrowsA</h3><pre class="programlisting">int xmlUCSIsSupplementalArrowsA (int code)<br />
+</pre><p>Check whether the character is part of SupplementalArrows-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSupplementalArrowsB" id="xmlUCSIsSupplementalArrowsB"></a>Function: xmlUCSIsSupplementalArrowsB</h3><pre class="programlisting">int xmlUCSIsSupplementalArrowsB (int code)<br />
+</pre><p>Check whether the character is part of SupplementalArrows-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSupplementalMathematicalOperators" id="xmlUCSIsSupplementalMathematicalOperators"></a>Function: xmlUCSIsSupplementalMathematicalOperators</h3><pre class="programlisting">int xmlUCSIsSupplementalMathematicalOperators (int code)<br />
+</pre><p>Check whether the character is part of SupplementalMathematicalOperators UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSupplementaryPrivateUseAreaA" id="xmlUCSIsSupplementaryPrivateUseAreaA"></a>Function: xmlUCSIsSupplementaryPrivateUseAreaA</h3><pre class="programlisting">int xmlUCSIsSupplementaryPrivateUseAreaA (int code)<br />
+</pre><p>Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSupplementaryPrivateUseAreaB" id="xmlUCSIsSupplementaryPrivateUseAreaB"></a>Function: xmlUCSIsSupplementaryPrivateUseAreaB</h3><pre class="programlisting">int xmlUCSIsSupplementaryPrivateUseAreaB (int code)<br />
+</pre><p>Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsSyriac" id="xmlUCSIsSyriac"></a>Function: xmlUCSIsSyriac</h3><pre class="programlisting">int xmlUCSIsSyriac (int code)<br />
+</pre><p>Check whether the character is part of Syriac UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTagalog" id="xmlUCSIsTagalog"></a>Function: xmlUCSIsTagalog</h3><pre class="programlisting">int xmlUCSIsTagalog (int code)<br />
+</pre><p>Check whether the character is part of Tagalog UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTagbanwa" id="xmlUCSIsTagbanwa"></a>Function: xmlUCSIsTagbanwa</h3><pre class="programlisting">int xmlUCSIsTagbanwa (int code)<br />
+</pre><p>Check whether the character is part of Tagbanwa UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTags" id="xmlUCSIsTags"></a>Function: xmlUCSIsTags</h3><pre class="programlisting">int xmlUCSIsTags (int code)<br />
+</pre><p>Check whether the character is part of Tags UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTaiLe" id="xmlUCSIsTaiLe"></a>Function: xmlUCSIsTaiLe</h3><pre class="programlisting">int xmlUCSIsTaiLe (int code)<br />
+</pre><p>Check whether the character is part of TaiLe UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTaiXuanJingSymbols" id="xmlUCSIsTaiXuanJingSymbols"></a>Function: xmlUCSIsTaiXuanJingSymbols</h3><pre class="programlisting">int xmlUCSIsTaiXuanJingSymbols (int code)<br />
+</pre><p>Check whether the character is part of TaiXuanJingSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTamil" id="xmlUCSIsTamil"></a>Function: xmlUCSIsTamil</h3><pre class="programlisting">int xmlUCSIsTamil (int code)<br />
+</pre><p>Check whether the character is part of Tamil UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTelugu" id="xmlUCSIsTelugu"></a>Function: xmlUCSIsTelugu</h3><pre class="programlisting">int xmlUCSIsTelugu (int code)<br />
+</pre><p>Check whether the character is part of Telugu UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsThaana" id="xmlUCSIsThaana"></a>Function: xmlUCSIsThaana</h3><pre class="programlisting">int xmlUCSIsThaana (int code)<br />
+</pre><p>Check whether the character is part of Thaana UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsThai" id="xmlUCSIsThai"></a>Function: xmlUCSIsThai</h3><pre class="programlisting">int xmlUCSIsThai (int code)<br />
+</pre><p>Check whether the character is part of Thai UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsTibetan" id="xmlUCSIsTibetan"></a>Function: xmlUCSIsTibetan</h3><pre class="programlisting">int xmlUCSIsTibetan (int code)<br />
+</pre><p>Check whether the character is part of Tibetan UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsUgaritic" id="xmlUCSIsUgaritic"></a>Function: xmlUCSIsUgaritic</h3><pre class="programlisting">int xmlUCSIsUgaritic (int code)<br />
+</pre><p>Check whether the character is part of Ugaritic UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsUnifiedCanadianAboriginalSyllabics" id="xmlUCSIsUnifiedCanadianAboriginalSyllabics"></a>Function: xmlUCSIsUnifiedCanadianAboriginalSyllabics</h3><pre class="programlisting">int xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code)<br />
+</pre><p>Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsVariationSelectors" id="xmlUCSIsVariationSelectors"></a>Function: xmlUCSIsVariationSelectors</h3><pre class="programlisting">int xmlUCSIsVariationSelectors (int code)<br />
+</pre><p>Check whether the character is part of VariationSelectors UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsVariationSelectorsSupplement" id="xmlUCSIsVariationSelectorsSupplement"></a>Function: xmlUCSIsVariationSelectorsSupplement</h3><pre class="programlisting">int xmlUCSIsVariationSelectorsSupplement (int code)<br />
+</pre><p>Check whether the character is part of VariationSelectorsSupplement UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsYiRadicals" id="xmlUCSIsYiRadicals"></a>Function: xmlUCSIsYiRadicals</h3><pre class="programlisting">int xmlUCSIsYiRadicals (int code)<br />
+</pre><p>Check whether the character is part of YiRadicals UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsYiSyllables" id="xmlUCSIsYiSyllables"></a>Function: xmlUCSIsYiSyllables</h3><pre class="programlisting">int xmlUCSIsYiSyllables (int code)<br />
+</pre><p>Check whether the character is part of YiSyllables UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlUCSIsYijingHexagramSymbols" id="xmlUCSIsYijingHexagramSymbols"></a>Function: xmlUCSIsYijingHexagramSymbols</h3><pre class="programlisting">int xmlUCSIsYijingHexagramSymbols (int code)<br />
+</pre><p>Check whether the character is part of YijingHexagramSymbols UCS Block</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>code</tt></i>:</span></td><td>UCS code point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlversion.html b/doc/html/libxml-xmlversion.html
new file mode 100644
index 0000000..30e9f0e
--- /dev/null
+++ b/doc/html/libxml-xmlversion.html
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlversion from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlversion from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlunicode.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlunicode.html">xmlunicode</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xmlwriter.html">xmlwriter</a></th><td><a accesskey="n" href="libxml-xmlwriter.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>compile-time version informations for the XML library </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#ATTRIBUTE_UNUSED">ATTRIBUTE_UNUSED</a></pre><pre class="programlisting">#define <a href="#DEBUG_MEMORY_LOCATION">DEBUG_MEMORY_LOCATION</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_ALLOC_SIZE">LIBXML_ATTR_ALLOC_SIZE</a></pre><pre class="programlisting">#define <a href="#LIBXML_ATTR_FORMAT">LIBXML_ATTR_FORMAT</a></pre><pre class="programlisting">#define <a href="#LIBXML_AUTOMATA_ENABLED">LIBXML_AUTOMATA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_C14N_ENABLED">LIBXML_C14N_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_CATALOG_ENABLED">LIBXML_CATALOG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_ENABLED">LIBXML_DEBUG_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DEBUG_RUNTIME">LIBXML_DEBUG_RUNTIME</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOCB_ENABLED">LIBXML_DOCB_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_DOTTED_VERSION">LIBXML_DOTTED_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_EXPR_ENABLED">LIBXML_EXPR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_FTP_ENABLED">LIBXML_FTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTML_ENABLED">LIBXML_HTML_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_HTTP_ENABLED">LIBXML_HTTP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICONV_ENABLED">LIBXML_ICONV_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ICU_ENABLED">LIBXML_ICU_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ISO8859X_ENABLED">LIBXML_ISO8859X_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LEGACY_ENABLED">LIBXML_LEGACY_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_LZMA_ENABLED">LIBXML_LZMA_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULES_ENABLED">LIBXML_MODULES_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_MODULE_EXTENSION">LIBXML_MODULE_EXTENSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_OUTPUT_ENABLED">LIBXML_OUTPUT_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PATTERN_ENABLED">LIBXML_PATTERN_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_PUSH_ENABLED">LIBXML_PUSH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_READER_ENABLED">LIBXML_READER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_REGEXP_ENABLED">LIBXML_REGEXP_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SAX1_ENABLED">LIBXML_SAX1_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMAS_ENABLED">LIBXML_SCHEMAS_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_SCHEMATRON_ENABLED">LIBXML_SCHEMATRON_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TEST_VERSION">LIBXML_TEST_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_THREAD_ALLOC_ENABLED">LIBXML_THREAD_ALLOC_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_THREAD_ENABLED">LIBXML_THREAD_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_TREE_ENABLED">LIBXML_TREE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_UNICODE_ENABLED">LIBXML_UNICODE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VALID_ENABLED">LIBXML_VALID_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION">LIBXML_VERSION</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_EXTRA">LIBXML_VERSION_EXTRA</a></pre><pre class="programlisting">#define <a href="#LIBXML_VERSION_STRING">LIBXML_VERSION_STRING</a></pre><pre class="programlisting">#define <a href="#LIBXML_WRITER_ENABLED">LIBXML_WRITER_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XINCLUDE_ENABLED">LIBXML_XINCLUDE_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPATH_ENABLED">LIBXML_XPATH_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_XPTR_ENABLED">LIBXML_XPTR_ENABLED</a></pre><pre class="programlisting">#define <a href="#LIBXML_ZLIB_ENABLED">LIBXML_ZLIB_ENABLED</a></pre><pre class="programlisting">#define <a href="#WITHOUT_TRIO">WITHOUT_TRIO</a></pre><pre class="programlisting">#define <a href="#WITH_TRIO">WITH_TRIO</a></pre><pre class="programlisting">void <a href="#xmlCheckVersion">xmlCheckVersion</a> (int version)</pre>
+<h2>Description</h2>
+<h3><a name="ATTRIBUTE_UNUSED" id="ATTRIBUTE_UNUSED"></a>Macro: ATTRIBUTE_UNUSED</h3><pre>#define ATTRIBUTE_UNUSED</pre><p>Macro used to signal to GCC unused function parameters</p>
+<h3><a name="DEBUG_MEMORY_LOCATION" id="DEBUG_MEMORY_LOCATION"></a>Macro: DEBUG_MEMORY_LOCATION</h3><pre>#define DEBUG_MEMORY_LOCATION</pre><p>Whether the memory debugging is configured in</p>
+<h3><a name="LIBXML_ATTR_ALLOC_SIZE" id="LIBXML_ATTR_ALLOC_SIZE"></a>Macro: LIBXML_ATTR_ALLOC_SIZE</h3><pre>#define LIBXML_ATTR_ALLOC_SIZE</pre><p>Macro used to indicate to GCC this is an allocator function</p>
+<h3><a name="LIBXML_ATTR_FORMAT" id="LIBXML_ATTR_FORMAT"></a>Macro: LIBXML_ATTR_FORMAT</h3><pre>#define LIBXML_ATTR_FORMAT</pre><p>Macro used to indicate to GCC the parameter are printf like</p>
+<h3><a name="LIBXML_AUTOMATA_ENABLED" id="LIBXML_AUTOMATA_ENABLED"></a>Macro: LIBXML_AUTOMATA_ENABLED</h3><pre>#define LIBXML_AUTOMATA_ENABLED</pre><p>Whether the automata interfaces are compiled in</p>
+<h3><a name="LIBXML_C14N_ENABLED" id="LIBXML_C14N_ENABLED"></a>Macro: LIBXML_C14N_ENABLED</h3><pre>#define LIBXML_C14N_ENABLED</pre><p>Whether the Canonicalization support is configured in</p>
+<h3><a name="LIBXML_CATALOG_ENABLED" id="LIBXML_CATALOG_ENABLED"></a>Macro: LIBXML_CATALOG_ENABLED</h3><pre>#define LIBXML_CATALOG_ENABLED</pre><p>Whether the Catalog support is configured in</p>
+<h3><a name="LIBXML_DEBUG_ENABLED" id="LIBXML_DEBUG_ENABLED"></a>Macro: LIBXML_DEBUG_ENABLED</h3><pre>#define LIBXML_DEBUG_ENABLED</pre><p>Whether Debugging module is configured in</p>
+<h3><a name="LIBXML_DEBUG_RUNTIME" id="LIBXML_DEBUG_RUNTIME"></a>Macro: LIBXML_DEBUG_RUNTIME</h3><pre>#define LIBXML_DEBUG_RUNTIME</pre><p>Whether the runtime debugging is configured in</p>
+<h3><a name="LIBXML_DOCB_ENABLED" id="LIBXML_DOCB_ENABLED"></a>Macro: LIBXML_DOCB_ENABLED</h3><pre>#define LIBXML_DOCB_ENABLED</pre><p>Whether the SGML Docbook support is configured in</p>
+<h3><a name="LIBXML_DOTTED_VERSION" id="LIBXML_DOTTED_VERSION"></a>Macro: LIBXML_DOTTED_VERSION</h3><pre>#define LIBXML_DOTTED_VERSION</pre><p>the version string like "1.2.3"</p>
+<h3><a name="LIBXML_EXPR_ENABLED" id="LIBXML_EXPR_ENABLED"></a>Macro: LIBXML_EXPR_ENABLED</h3><pre>#define LIBXML_EXPR_ENABLED</pre><p>Whether the formal expressions interfaces are compiled in</p>
+<h3><a name="LIBXML_FTP_ENABLED" id="LIBXML_FTP_ENABLED"></a>Macro: LIBXML_FTP_ENABLED</h3><pre>#define LIBXML_FTP_ENABLED</pre><p>Whether the FTP support is configured in</p>
+<h3><a name="LIBXML_HTML_ENABLED" id="LIBXML_HTML_ENABLED"></a>Macro: LIBXML_HTML_ENABLED</h3><pre>#define LIBXML_HTML_ENABLED</pre><p>Whether the HTML support is configured in</p>
+<h3><a name="LIBXML_HTTP_ENABLED" id="LIBXML_HTTP_ENABLED"></a>Macro: LIBXML_HTTP_ENABLED</h3><pre>#define LIBXML_HTTP_ENABLED</pre><p>Whether the HTTP support is configured in</p>
+<h3><a name="LIBXML_ICONV_ENABLED" id="LIBXML_ICONV_ENABLED"></a>Macro: LIBXML_ICONV_ENABLED</h3><pre>#define LIBXML_ICONV_ENABLED</pre><p>Whether iconv support is available</p>
+<h3><a name="LIBXML_ICU_ENABLED" id="LIBXML_ICU_ENABLED"></a>Macro: LIBXML_ICU_ENABLED</h3><pre>#define LIBXML_ICU_ENABLED</pre><p>Whether icu support is available</p>
+<h3><a name="LIBXML_ISO8859X_ENABLED" id="LIBXML_ISO8859X_ENABLED"></a>Macro: LIBXML_ISO8859X_ENABLED</h3><pre>#define LIBXML_ISO8859X_ENABLED</pre><p>Whether ISO-8859-* support is made available in case iconv is not</p>
+<h3><a name="LIBXML_LEGACY_ENABLED" id="LIBXML_LEGACY_ENABLED"></a>Macro: LIBXML_LEGACY_ENABLED</h3><pre>#define LIBXML_LEGACY_ENABLED</pre><p>Whether the deprecated APIs are compiled in for compatibility</p>
+<h3><a name="LIBXML_LZMA_ENABLED" id="LIBXML_LZMA_ENABLED"></a>Macro: LIBXML_LZMA_ENABLED</h3><pre>#define LIBXML_LZMA_ENABLED</pre><p>Whether the Lzma support is compiled in</p>
+<h3><a name="LIBXML_MODULES_ENABLED" id="LIBXML_MODULES_ENABLED"></a>Macro: LIBXML_MODULES_ENABLED</h3><pre>#define LIBXML_MODULES_ENABLED</pre><p>Whether the module interfaces are compiled in</p>
+<h3><a name="LIBXML_MODULE_EXTENSION" id="LIBXML_MODULE_EXTENSION"></a>Macro: LIBXML_MODULE_EXTENSION</h3><pre>#define LIBXML_MODULE_EXTENSION</pre><p>the string suffix used by dynamic modules (usually shared libraries)</p>
+<h3><a name="LIBXML_OUTPUT_ENABLED" id="LIBXML_OUTPUT_ENABLED"></a>Macro: LIBXML_OUTPUT_ENABLED</h3><pre>#define LIBXML_OUTPUT_ENABLED</pre><p>Whether the serialization/saving support is configured in</p>
+<h3><a name="LIBXML_PATTERN_ENABLED" id="LIBXML_PATTERN_ENABLED"></a>Macro: LIBXML_PATTERN_ENABLED</h3><pre>#define LIBXML_PATTERN_ENABLED</pre><p>Whether the <a href="libxml-pattern.html#xmlPattern">xmlPattern</a> node selection interface is configured in</p>
+<h3><a name="LIBXML_PUSH_ENABLED" id="LIBXML_PUSH_ENABLED"></a>Macro: LIBXML_PUSH_ENABLED</h3><pre>#define LIBXML_PUSH_ENABLED</pre><p>Whether the push parsing interfaces are configured in</p>
+<h3><a name="LIBXML_READER_ENABLED" id="LIBXML_READER_ENABLED"></a>Macro: LIBXML_READER_ENABLED</h3><pre>#define LIBXML_READER_ENABLED</pre><p>Whether the xmlReader parsing interface is configured in</p>
+<h3><a name="LIBXML_REGEXP_ENABLED" id="LIBXML_REGEXP_ENABLED"></a>Macro: LIBXML_REGEXP_ENABLED</h3><pre>#define LIBXML_REGEXP_ENABLED</pre><p>Whether the regular expressions interfaces are compiled in</p>
+<h3><a name="LIBXML_SAX1_ENABLED" id="LIBXML_SAX1_ENABLED"></a>Macro: LIBXML_SAX1_ENABLED</h3><pre>#define LIBXML_SAX1_ENABLED</pre><p>Whether the older SAX1 interface is configured in</p>
+<h3><a name="LIBXML_SCHEMAS_ENABLED" id="LIBXML_SCHEMAS_ENABLED"></a>Macro: LIBXML_SCHEMAS_ENABLED</h3><pre>#define LIBXML_SCHEMAS_ENABLED</pre><p>Whether the Schemas validation interfaces are compiled in</p>
+<h3><a name="LIBXML_SCHEMATRON_ENABLED" id="LIBXML_SCHEMATRON_ENABLED"></a>Macro: LIBXML_SCHEMATRON_ENABLED</h3><pre>#define LIBXML_SCHEMATRON_ENABLED</pre><p>Whether the Schematron validation interfaces are compiled in</p>
+<h3><a name="LIBXML_TEST_VERSION" id="LIBXML_TEST_VERSION"></a>Macro: LIBXML_TEST_VERSION</h3><pre>#define LIBXML_TEST_VERSION</pre><p>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</p>
+<h3><a name="LIBXML_THREAD_ALLOC_ENABLED" id="LIBXML_THREAD_ALLOC_ENABLED"></a>Macro: LIBXML_THREAD_ALLOC_ENABLED</h3><pre>#define LIBXML_THREAD_ALLOC_ENABLED</pre><p>Whether the allocation hooks are per-thread</p>
+<h3><a name="LIBXML_THREAD_ENABLED" id="LIBXML_THREAD_ENABLED"></a>Macro: LIBXML_THREAD_ENABLED</h3><pre>#define LIBXML_THREAD_ENABLED</pre><p>Whether the thread support is configured in</p>
+<h3><a name="LIBXML_TREE_ENABLED" id="LIBXML_TREE_ENABLED"></a>Macro: LIBXML_TREE_ENABLED</h3><pre>#define LIBXML_TREE_ENABLED</pre><p>Whether the DOM like tree manipulation API support is configured in</p>
+<h3><a name="LIBXML_UNICODE_ENABLED" id="LIBXML_UNICODE_ENABLED"></a>Macro: LIBXML_UNICODE_ENABLED</h3><pre>#define LIBXML_UNICODE_ENABLED</pre><p>Whether the Unicode related interfaces are compiled in</p>
+<h3><a name="LIBXML_VALID_ENABLED" id="LIBXML_VALID_ENABLED"></a>Macro: LIBXML_VALID_ENABLED</h3><pre>#define LIBXML_VALID_ENABLED</pre><p>Whether the DTD validation support is configured in</p>
+<h3><a name="LIBXML_VERSION" id="LIBXML_VERSION"></a>Macro: LIBXML_VERSION</h3><pre>#define LIBXML_VERSION</pre><p>the version number: 1.2.3 value is 10203</p>
+<h3><a name="LIBXML_VERSION_EXTRA" id="LIBXML_VERSION_EXTRA"></a>Macro: LIBXML_VERSION_EXTRA</h3><pre>#define LIBXML_VERSION_EXTRA</pre><p>extra version information, used to show a CVS compilation</p>
+<h3><a name="LIBXML_VERSION_STRING" id="LIBXML_VERSION_STRING"></a>Macro: LIBXML_VERSION_STRING</h3><pre>#define LIBXML_VERSION_STRING</pre><p>the version number string, 1.2.3 value is "10203"</p>
+<h3><a name="LIBXML_WRITER_ENABLED" id="LIBXML_WRITER_ENABLED"></a>Macro: LIBXML_WRITER_ENABLED</h3><pre>#define LIBXML_WRITER_ENABLED</pre><p>Whether the xmlWriter saving interface is configured in</p>
+<h3><a name="LIBXML_XINCLUDE_ENABLED" id="LIBXML_XINCLUDE_ENABLED"></a>Macro: LIBXML_XINCLUDE_ENABLED</h3><pre>#define LIBXML_XINCLUDE_ENABLED</pre><p>Whether XInclude is configured in</p>
+<h3><a name="LIBXML_XPATH_ENABLED" id="LIBXML_XPATH_ENABLED"></a>Macro: LIBXML_XPATH_ENABLED</h3><pre>#define LIBXML_XPATH_ENABLED</pre><p>Whether XPath is configured in</p>
+<h3><a name="LIBXML_XPTR_ENABLED" id="LIBXML_XPTR_ENABLED"></a>Macro: LIBXML_XPTR_ENABLED</h3><pre>#define LIBXML_XPTR_ENABLED</pre><p>Whether XPointer is configured in</p>
+<h3><a name="LIBXML_ZLIB_ENABLED" id="LIBXML_ZLIB_ENABLED"></a>Macro: LIBXML_ZLIB_ENABLED</h3><pre>#define LIBXML_ZLIB_ENABLED</pre><p>Whether the Zlib support is compiled in</p>
+<h3><a name="WITHOUT_TRIO" id="WITHOUT_TRIO"></a>Macro: WITHOUT_TRIO</h3><pre>#define WITHOUT_TRIO</pre><p>defined if the trio support should not be configured in</p>
+<h3><a name="WITH_TRIO" id="WITH_TRIO"></a>Macro: WITH_TRIO</h3><pre>#define WITH_TRIO</pre><p>defined if the trio support need to be configured in</p>
+<h3><a name="xmlCheckVersion" id="xmlCheckVersion"></a>Function: xmlCheckVersion</h3><pre class="programlisting">void xmlCheckVersion (int version)<br />
+</pre><p>check the compiled lib version against the include one. This can warn or immediately kill the application</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the include version number</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xmlwriter.html b/doc/html/libxml-xmlwriter.html
new file mode 100644
index 0000000..e09ff59
--- /dev/null
+++ b/doc/html/libxml-xmlwriter.html
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xmlwriter from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xmlwriter from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlversion.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlversion.html">xmlversion</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xpath.html">xpath</a></th><td><a accesskey="n" href="libxml-xpath.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>text writing API for XML </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#xmlTextWriterWriteDocType">xmlTextWriterWriteDocType</a></pre><pre class="programlisting">#define <a href="#xmlTextWriterWriteProcessingInstruction">xmlTextWriterWriteProcessingInstruction</a></pre><pre class="programlisting">Structure <a href="#xmlTextWriter">xmlTextWriter</a><br />struct _xmlTextWriter
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xmlwriter.html#xmlTextWriter">xmlTextWriter</a> * <a name="xmlTextWriterPtr" id="xmlTextWriterPtr">xmlTextWriterPtr</a>
+</pre><pre class="programlisting">void <a href="#xmlFreeTextWriter">xmlFreeTextWriter</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriter">xmlNewTextWriter</a> (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterDoc">xmlNewTextWriterDoc</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> * doc, <br /> int compression)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterFilename">xmlNewTextWriterFilename</a> (const char * uri, <br /> int compression)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterMemory">xmlNewTextWriterMemory</a> (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> int compression)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterPushParser">xmlNewTextWriterPushParser</a> (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int compression)</pre>
+<pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> <a href="#xmlNewTextWriterTree">xmlNewTextWriterTree</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int compression)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndAttribute">xmlTextWriterEndAttribute</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndCDATA">xmlTextWriterEndCDATA</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndComment">xmlTextWriterEndComment</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndDTD">xmlTextWriterEndDTD</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndDTDAttlist">xmlTextWriterEndDTDAttlist</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndDTDElement">xmlTextWriterEndDTDElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndDTDEntity">xmlTextWriterEndDTDEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndElement">xmlTextWriterEndElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterEndPI">xmlTextWriterEndPI</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterFlush">xmlTextWriterFlush</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterFullEndElement">xmlTextWriterFullEndElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterSetIndent">xmlTextWriterSetIndent</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int indent)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterSetIndentString">xmlTextWriterSetIndentString</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterSetQuoteChar">xmlTextWriterSetQuoteChar</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> quotechar)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartAttribute">xmlTextWriterStartAttribute</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartAttributeNS">xmlTextWriterStartAttributeNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartCDATA">xmlTextWriterStartCDATA</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartComment">xmlTextWriterStartComment</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartDTD">xmlTextWriterStartDTD</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartDTDAttlist">xmlTextWriterStartDTDAttlist</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartDTDElement">xmlTextWriterStartDTDElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartDocument">xmlTextWriterStartDocument</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * version, <br /> const char * encoding, <br /> const char * standalone)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartElement">xmlTextWriterStartElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartElementNS">xmlTextWriterStartElementNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterStartPI">xmlTextWriterStartPI</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteAttribute">xmlTextWriterWriteAttribute</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteAttributeNS">xmlTextWriterWriteAttributeNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteBase64">xmlTextWriterWriteBase64</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * data, <br /> int start, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteBinHex">xmlTextWriterWriteBinHex</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * data, <br /> int start, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteCDATA">xmlTextWriterWriteCDATA</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteComment">xmlTextWriterWriteComment</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * subset)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDAttlist">xmlTextWriterWriteDTDAttlist</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDElement">xmlTextWriterWriteDTDElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDEntity">xmlTextWriterWriteDTDEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDExternalEntity">xmlTextWriterWriteDTDExternalEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDExternalEntityContents">xmlTextWriterWriteDTDExternalEntityContents</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDInternalEntity">xmlTextWriterWriteDTDInternalEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteDTDNotation">xmlTextWriterWriteDTDNotation</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteElement">xmlTextWriterWriteElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteElementNS">xmlTextWriterWriteElementNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatAttribute">xmlTextWriterWriteFormatAttribute</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatAttributeNS">xmlTextWriterWriteFormatAttributeNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatCDATA">xmlTextWriterWriteFormatCDATA</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatComment">xmlTextWriterWriteFormatComment</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatDTD">xmlTextWriterWriteFormatDTD</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatDTDAttlist">xmlTextWriterWriteFormatDTDAttlist</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatDTDElement">xmlTextWriterWriteFormatDTDElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatDTDInternalEntity">xmlTextWriterWriteFormatDTDInternalEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatElement">xmlTextWriterWriteFormatElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatElementNS">xmlTextWriterWriteFormatElementNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatPI">xmlTextWriterWriteFormatPI</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatRaw">xmlTextWriterWriteFormatRaw</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteFormatString">xmlTextWriterWriteFormatString</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWritePI">xmlTextWriterWritePI</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteRaw">xmlTextWriterWriteRaw</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteRawLen">xmlTextWriterWriteRawLen</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteString">xmlTextWriterWriteString</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatAttribute">xmlTextWriterWriteVFormatAttribute</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatAttributeNS">xmlTextWriterWriteVFormatAttributeNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatCDATA">xmlTextWriterWriteVFormatCDATA</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatComment">xmlTextWriterWriteVFormatComment</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatDTD">xmlTextWriterWriteVFormatDTD</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatDTDAttlist">xmlTextWriterWriteVFormatDTDAttlist</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatDTDElement">xmlTextWriterWriteVFormatDTDElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatDTDInternalEntity">xmlTextWriterWriteVFormatDTDInternalEntity</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatElement">xmlTextWriterWriteVFormatElement</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatElementNS">xmlTextWriterWriteVFormatElementNS</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatPI">xmlTextWriterWriteVFormatPI</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatRaw">xmlTextWriterWriteVFormatRaw</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)</pre>
+<pre class="programlisting">int <a href="#xmlTextWriterWriteVFormatString">xmlTextWriterWriteVFormatString</a> (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)</pre>
+<h2>Description</h2>
+<h3><a name="xmlTextWriterWriteDocType" id="xmlTextWriterWriteDocType"></a>Macro: xmlTextWriterWriteDocType</h3><pre>#define xmlTextWriterWriteDocType</pre><p>this macro maps to <a href="libxml-xmlwriter.html#xmlTextWriterWriteDTD">xmlTextWriterWriteDTD</a></p>
+<h3><a name="xmlTextWriterWriteProcessingInstruction" id="xmlTextWriterWriteProcessingInstruction"></a>Macro: xmlTextWriterWriteProcessingInstruction</h3><pre>#define xmlTextWriterWriteProcessingInstruction</pre><p>This macro maps to <a href="libxml-xmlwriter.html#xmlTextWriterWritePI">xmlTextWriterWritePI</a></p>
+<h3><a name="xmlTextWriter" id="xmlTextWriter">Structure xmlTextWriter</a></h3><pre class="programlisting">Structure xmlTextWriter<br />struct _xmlTextWriter {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlFreeTextWriter" id="xmlFreeTextWriter"></a>Function: xmlFreeTextWriter</h3><pre class="programlisting">void xmlFreeTextWriter (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>Deallocate all the resources associated to the writer</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr></tbody></table></div><h3><a name="xmlNewTextWriter" id="xmlNewTextWriter"></a>Function: xmlNewTextWriter</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriter (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> out)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure using an <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> NOTE: the @out parameter will be deallocated when the writer is closed (if the call succeed.)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>out</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextWriterDoc" id="xmlNewTextWriterDoc"></a>Function: xmlNewTextWriterDoc</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterDoc (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> * doc, <br /> int compression)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @*doc as output</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>address of a <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> to hold the new XML document tree</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextWriterFilename" id="xmlNewTextWriterFilename"></a>Function: xmlNewTextWriterFilename</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterFilename (const char * uri, <br /> int compression)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @uri as output</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>the URI of the resource for the output</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextWriterMemory" id="xmlNewTextWriterMemory"></a>Function: xmlNewTextWriterMemory</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterMemory (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br /> int compression)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @buf as output TODO: handle compression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td><a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a></td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextWriterPushParser" id="xmlNewTextWriterPushParser"></a>Function: xmlNewTextWriterPushParser</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterPushParser (<a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> ctxt, <br /> int compression)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @ctxt as output NOTE: the @ctxt context will be freed with the resulting writer (if the call succeeds). TODO: handle compression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td><a href="libxml-tree.html#xmlParserCtxtPtr">xmlParserCtxtPtr</a> to hold the new XML document tree</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlNewTextWriterTree" id="xmlNewTextWriterTree"></a>Function: xmlNewTextWriterTree</h3><pre class="programlisting"><a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> xmlNewTextWriterTree (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> int compression)<br />
+</pre><p>Create a new <a href="libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a> structure with @doc as output starting at @node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td><a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a></td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> or NULL for doc-&gt;children</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>compress the output?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndAttribute" id="xmlTextWriterEndAttribute"></a>Function: xmlTextWriterEndAttribute</h3><pre class="programlisting">int xmlTextWriterEndAttribute (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End the current xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndCDATA" id="xmlTextWriterEndCDATA"></a>Function: xmlTextWriterEndCDATA</h3><pre class="programlisting">int xmlTextWriterEndCDATA (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml CDATA section.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndComment" id="xmlTextWriterEndComment"></a>Function: xmlTextWriterEndComment</h3><pre class="programlisting">int xmlTextWriterEndComment (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End the current xml coment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndDTD" id="xmlTextWriterEndDTD"></a>Function: xmlTextWriterEndDTD</h3><pre class="programlisting">int xmlTextWriterEndDTD (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml DTD.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndDTDAttlist" id="xmlTextWriterEndDTDAttlist"></a>Function: xmlTextWriterEndDTDAttlist</h3><pre class="programlisting">int xmlTextWriterEndDTDAttlist (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml DTD <a href="libxml-SAX.html#attribute">attribute</a> list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndDTDElement" id="xmlTextWriterEndDTDElement"></a>Function: xmlTextWriterEndDTDElement</h3><pre class="programlisting">int xmlTextWriterEndDTDElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndDTDEntity" id="xmlTextWriterEndDTDEntity"></a>Function: xmlTextWriterEndDTDEntity</h3><pre class="programlisting">int xmlTextWriterEndDTDEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndDocument" id="xmlTextWriterEndDocument"></a>Function: xmlTextWriterEndDocument</h3><pre class="programlisting">int xmlTextWriterEndDocument (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End an xml document. All open elements are closed, and the content is flushed to the output.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndElement" id="xmlTextWriterEndElement"></a>Function: xmlTextWriterEndElement</h3><pre class="programlisting">int xmlTextWriterEndElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End the current xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterEndPI" id="xmlTextWriterEndPI"></a>Function: xmlTextWriterEndPI</h3><pre class="programlisting">int xmlTextWriterEndPI (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End the current xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterFlush" id="xmlTextWriterFlush"></a>Function: xmlTextWriterFlush</h3><pre class="programlisting">int xmlTextWriterFlush (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>Flush the output buffer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterFullEndElement" id="xmlTextWriterFullEndElement"></a>Function: xmlTextWriterFullEndElement</h3><pre class="programlisting">int xmlTextWriterFullEndElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>End the current xml element. Writes an end tag even if the element is empty</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterSetIndent" id="xmlTextWriterSetIndent"></a>Function: xmlTextWriterSetIndent</h3><pre class="programlisting">int xmlTextWriterSetIndent (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int indent)<br />
+</pre><p>Set indentation output. indent = 0 do not indentation. indent &gt; 0 do indentation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>indent</tt></i>:</span></td><td>do indentation?</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlTextWriterSetIndentString" id="xmlTextWriterSetIndentString"></a>Function: xmlTextWriterSetIndentString</h3><pre class="programlisting">int xmlTextWriterSetIndentString (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Set string indentation.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlTextWriterSetQuoteChar" id="xmlTextWriterSetQuoteChar"></a>Function: xmlTextWriterSetQuoteChar</h3><pre class="programlisting">int xmlTextWriterSetQuoteChar (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> quotechar)<br />
+</pre><p>Set the character used for quoting attributes.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>quotechar</tt></i>:</span></td><td>the quote character</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 on error or 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartAttribute" id="xmlTextWriterStartAttribute"></a>Function: xmlTextWriterStartAttribute</h3><pre class="programlisting">int xmlTextWriterStartAttribute (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Start an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartAttributeNS" id="xmlTextWriterStartAttributeNS"></a>Function: xmlTextWriterStartAttributeNS</h3><pre class="programlisting">int xmlTextWriterStartAttributeNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br />
+</pre><p>Start an xml <a href="libxml-SAX.html#attribute">attribute</a> with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartCDATA" id="xmlTextWriterStartCDATA"></a>Function: xmlTextWriterStartCDATA</h3><pre class="programlisting">int xmlTextWriterStartCDATA (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>Start an xml CDATA section.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartComment" id="xmlTextWriterStartComment"></a>Function: xmlTextWriterStartComment</h3><pre class="programlisting">int xmlTextWriterStartComment (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer)<br />
+</pre><p>Start an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartDTD" id="xmlTextWriterStartDTD"></a>Function: xmlTextWriterStartDTD</h3><pre class="programlisting">int xmlTextWriterStartDTD (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid)<br />
+</pre><p>Start an xml DTD.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartDTDAttlist" id="xmlTextWriterStartDTDAttlist"></a>Function: xmlTextWriterStartDTDAttlist</h3><pre class="programlisting">int xmlTextWriterStartDTDAttlist (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Start an xml DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartDTDElement" id="xmlTextWriterStartDTDElement"></a>Function: xmlTextWriterStartDTDElement</h3><pre class="programlisting">int xmlTextWriterStartDTDElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Start an xml DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartDTDEntity" id="xmlTextWriterStartDTDEntity"></a>Function: xmlTextWriterStartDTDEntity</h3><pre class="programlisting">int xmlTextWriterStartDTDEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Start an xml DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartDocument" id="xmlTextWriterStartDocument"></a>Function: xmlTextWriterStartDocument</h3><pre class="programlisting">int xmlTextWriterStartDocument (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * version, <br /> const char * encoding, <br /> const char * standalone)<br />
+</pre><p>Start a new xml document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>version</tt></i>:</span></td><td>the xml version ("1.0") or NULL for default ("1.0")</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding or NULL for default</td></tr><tr><td><span class="term"><i><tt>standalone</tt></i>:</span></td><td>"yes" or "no" or NULL for default</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartElement" id="xmlTextWriterStartElement"></a>Function: xmlTextWriterStartElement</h3><pre class="programlisting">int xmlTextWriterStartElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Start an xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartElementNS" id="xmlTextWriterStartElementNS"></a>Function: xmlTextWriterStartElementNS</h3><pre class="programlisting">int xmlTextWriterStartElementNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI)<br />
+</pre><p>Start an xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix or NULL</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterStartPI" id="xmlTextWriterStartPI"></a>Function: xmlTextWriterStartPI</h3><pre class="programlisting">int xmlTextWriterStartPI (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target)<br />
+</pre><p>Start an xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteAttribute" id="xmlTextWriterWriteAttribute"></a>Function: xmlTextWriterWriteAttribute</h3><pre class="programlisting">int xmlTextWriterWriteAttribute (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteAttributeNS" id="xmlTextWriterWriteAttributeNS"></a>Function: xmlTextWriterWriteAttributeNS</h3><pre class="programlisting">int xmlTextWriterWriteAttributeNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteBase64" id="xmlTextWriterWriteBase64"></a>Function: xmlTextWriterWriteBase64</h3><pre class="programlisting">int xmlTextWriterWriteBase64 (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * data, <br /> int start, <br /> int len)<br />
+</pre><p>Write an base64 encoded xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>binary data</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the position within the data of the first byte to encode</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of bytes to encode</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteBinHex" id="xmlTextWriterWriteBinHex"></a>Function: xmlTextWriterWriteBinHex</h3><pre class="programlisting">int xmlTextWriterWriteBinHex (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * data, <br /> int start, <br /> int len)<br />
+</pre><p>Write a BinHex encoded xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>binary data</td></tr><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the position within the data of the first byte to encode</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of bytes to encode</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteCDATA" id="xmlTextWriterWriteCDATA"></a>Function: xmlTextWriterWriteCDATA</h3><pre class="programlisting">int xmlTextWriterWriteCDATA (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>CDATA content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteComment" id="xmlTextWriterWriteComment"></a>Function: xmlTextWriterWriteComment</h3><pre class="programlisting">int xmlTextWriterWriteComment (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td><a href="libxml-SAX.html#comment">comment</a> string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTD" id="xmlTextWriterWriteDTD"></a>Function: xmlTextWriterWriteDTD</h3><pre class="programlisting">int xmlTextWriterWriteDTD (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * subset)<br />
+</pre><p>Write a DTD.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>subset</tt></i>:</span></td><td>string content of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDAttlist" id="xmlTextWriterWriteDTDAttlist"></a>Function: xmlTextWriterWriteDTDAttlist</h3><pre class="programlisting">int xmlTextWriterWriteDTDAttlist (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write a DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the ATTLIST</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDElement" id="xmlTextWriterWriteDTDElement"></a>Function: xmlTextWriterWriteDTDElement</h3><pre class="programlisting">int xmlTextWriterWriteDTDElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write a DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDEntity" id="xmlTextWriterWriteDTDEntity"></a>Function: xmlTextWriterWriteDTDEntity</h3><pre class="programlisting">int xmlTextWriterWriteDTDEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write a DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDExternalEntity" id="xmlTextWriterWriteDTDExternalEntity"></a>Function: xmlTextWriterWriteDTDExternalEntity</h3><pre class="programlisting">int xmlTextWriterWriteDTDExternalEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid)<br />
+</pre><p>Write a DTD external entity. The entity must have been started with <a href="libxml-xmlwriter.html#xmlTextWriterStartDTDEntity">xmlTextWriterStartDTDEntity</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDExternalEntityContents" id="xmlTextWriterWriteDTDExternalEntityContents"></a>Function: xmlTextWriterWriteDTDExternalEntityContents</h3><pre class="programlisting">int xmlTextWriterWriteDTDExternalEntityContents (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ndataid)<br />
+</pre><p>Write the contents of a DTD external entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>ndataid</tt></i>:</span></td><td>the xml notation name.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDInternalEntity" id="xmlTextWriterWriteDTDInternalEntity"></a>Function: xmlTextWriterWriteDTDInternalEntity</h3><pre class="programlisting">int xmlTextWriterWriteDTDInternalEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write a DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>content of the entity</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteDTDNotation" id="xmlTextWriterWriteDTDNotation"></a>Function: xmlTextWriterWriteDTDNotation</h3><pre class="programlisting">int xmlTextWriterWriteDTDNotation (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid)<br />
+</pre><p>Write a DTD entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the xml notation</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteElement" id="xmlTextWriterWriteElement"></a>Function: xmlTextWriterWriteElement</h3><pre class="programlisting">int xmlTextWriterWriteElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>element content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteElementNS" id="xmlTextWriterWriteElementNS"></a>Function: xmlTextWriterWriteElementNS</h3><pre class="programlisting">int xmlTextWriterWriteElementNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>element content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatAttribute" id="xmlTextWriterWriteFormatAttribute"></a>Function: xmlTextWriterWriteFormatAttribute</h3><pre class="programlisting">int xmlTextWriterWriteFormatAttribute (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatAttributeNS" id="xmlTextWriterWriteFormatAttributeNS"></a>Function: xmlTextWriterWriteFormatAttributeNS</h3><pre class="programlisting">int xmlTextWriterWriteFormatAttributeNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml attribute.with namespace support</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatCDATA" id="xmlTextWriterWriteFormatCDATA"></a>Function: xmlTextWriterWriteFormatCDATA</h3><pre class="programlisting">int xmlTextWriterWriteFormatCDATA (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatComment" id="xmlTextWriterWriteFormatComment"></a>Function: xmlTextWriterWriteFormatComment</h3><pre class="programlisting">int xmlTextWriterWriteFormatComment (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatDTD" id="xmlTextWriterWriteFormatDTD"></a>Function: xmlTextWriterWriteFormatDTD</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTD (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a DTD with a formatted markup declarations part.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatDTDAttlist" id="xmlTextWriterWriteFormatDTDAttlist"></a>Function: xmlTextWriterWriteFormatDTDAttlist</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDAttlist (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatDTDElement" id="xmlTextWriterWriteFormatDTDElement"></a>Function: xmlTextWriterWriteFormatDTDElement</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatDTDInternalEntity" id="xmlTextWriterWriteFormatDTDInternalEntity"></a>Function: xmlTextWriterWriteFormatDTDInternalEntity</h3><pre class="programlisting">int xmlTextWriterWriteFormatDTDInternalEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatElement" id="xmlTextWriterWriteFormatElement"></a>Function: xmlTextWriterWriteFormatElement</h3><pre class="programlisting">int xmlTextWriterWriteFormatElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatElementNS" id="xmlTextWriterWriteFormatElementNS"></a>Function: xmlTextWriterWriteFormatElementNS</h3><pre class="programlisting">int xmlTextWriterWriteFormatElementNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatPI" id="xmlTextWriterWriteFormatPI"></a>Function: xmlTextWriterWriteFormatPI</h3><pre class="programlisting">int xmlTextWriterWriteFormatPI (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted PI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatRaw" id="xmlTextWriterWriteFormatRaw"></a>Function: xmlTextWriterWriteFormatRaw</h3><pre class="programlisting">int xmlTextWriterWriteFormatRaw (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteFormatString" id="xmlTextWriterWriteFormatString"></a>Function: xmlTextWriterWriteFormatString</h3><pre class="programlisting">int xmlTextWriterWriteFormatString (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> ... ...)<br />
+</pre><p>Write a formatted xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra parameters for the format</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWritePI" id="xmlTextWriterWritePI"></a>Function: xmlTextWriterWritePI</h3><pre class="programlisting">int xmlTextWriterWritePI (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>PI content</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteRaw" id="xmlTextWriterWriteRaw"></a>Function: xmlTextWriterWriteRaw</h3><pre class="programlisting">int xmlTextWriterWriteRaw (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write a raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteRawLen" id="xmlTextWriterWriteRawLen"></a>Function: xmlTextWriterWriteRawLen</h3><pre class="programlisting">int xmlTextWriterWriteRawLen (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content, <br /> int len)<br />
+</pre><p>Write an xml text. TODO: what about entities and special chars??</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>length of the text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteString" id="xmlTextWriterWriteString"></a>Function: xmlTextWriterWriteString</h3><pre class="programlisting">int xmlTextWriterWriteString (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * content)<br />
+</pre><p>Write an xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>content</tt></i>:</span></td><td>text string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatAttribute" id="xmlTextWriterWriteVFormatAttribute"></a>Function: xmlTextWriterWriteVFormatAttribute</h3><pre class="programlisting">int xmlTextWriterWriteVFormatAttribute (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml attribute.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatAttributeNS" id="xmlTextWriterWriteVFormatAttributeNS"></a>Function: xmlTextWriterWriteVFormatAttributeNS</h3><pre class="programlisting">int xmlTextWriterWriteVFormatAttributeNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml attribute.with namespace support</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td><a href="libxml-SAX.html#attribute">attribute</a> local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatCDATA" id="xmlTextWriterWriteVFormatCDATA"></a>Function: xmlTextWriterWriteVFormatCDATA</h3><pre class="programlisting">int xmlTextWriterWriteVFormatCDATA (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml CDATA.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatComment" id="xmlTextWriterWriteVFormatComment"></a>Function: xmlTextWriterWriteVFormatComment</h3><pre class="programlisting">int xmlTextWriterWriteVFormatComment (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write an xml comment.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatDTD" id="xmlTextWriterWriteVFormatDTD"></a>Function: xmlTextWriterWriteVFormatDTD</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTD (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * pubid, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * sysid, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a DTD with a formatted markup declarations part.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD</td></tr><tr><td><span class="term"><i><tt>pubid</tt></i>:</span></td><td>the public identifier, which is an alternative to the system identifier</td></tr><tr><td><span class="term"><i><tt>sysid</tt></i>:</span></td><td>the system identifier, which is the URI of the DTD</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatDTDAttlist" id="xmlTextWriterWriteVFormatDTDAttlist"></a>Function: xmlTextWriterWriteVFormatDTDAttlist</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDAttlist (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted DTD ATTLIST.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD ATTLIST</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatDTDElement" id="xmlTextWriterWriteVFormatDTDElement"></a>Function: xmlTextWriterWriteVFormatDTDElement</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted DTD element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD element</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatDTDInternalEntity" id="xmlTextWriterWriteVFormatDTDInternalEntity"></a>Function: xmlTextWriterWriteVFormatDTDInternalEntity</h3><pre class="programlisting">int xmlTextWriterWriteVFormatDTDInternalEntity (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> int pe, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted DTD internal entity.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>pe</tt></i>:</span></td><td>TRUE if this is a parameter entity, FALSE if not</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the DTD entity</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatElement" id="xmlTextWriterWriteVFormatElement"></a>Function: xmlTextWriterWriteVFormatElement</h3><pre class="programlisting">int xmlTextWriterWriteVFormatElement (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml element.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element name</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatElementNS" id="xmlTextWriterWriteVFormatElementNS"></a>Function: xmlTextWriterWriteVFormatElementNS</h3><pre class="programlisting">int xmlTextWriterWriteVFormatElementNS (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * namespaceURI, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml element with namespace support.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>namespace prefix</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>element local name</td></tr><tr><td><span class="term"><i><tt>namespaceURI</tt></i>:</span></td><td>namespace URI</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatPI" id="xmlTextWriterWriteVFormatPI"></a>Function: xmlTextWriterWriteVFormatPI</h3><pre class="programlisting">int xmlTextWriterWriteVFormatPI (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * target, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml PI.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>target</tt></i>:</span></td><td>PI target</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatRaw" id="xmlTextWriterWriteVFormatRaw"></a>Function: xmlTextWriterWriteVFormatRaw</h3><pre class="programlisting">int xmlTextWriterWriteVFormatRaw (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted raw xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlTextWriterWriteVFormatString" id="xmlTextWriterWriteVFormatString"></a>Function: xmlTextWriterWriteVFormatString</h3><pre class="programlisting">int xmlTextWriterWriteVFormatString (<a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a> writer, <br /> const char * format, <br /> va_list argptr)<br />
+</pre><p>Write a formatted xml text.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>writer</tt></i>:</span></td><td>the <a href="libxml-xmlwriter.html#xmlTextWriterPtr">xmlTextWriterPtr</a></td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>format string (see printf)</td></tr><tr><td><span class="term"><i><tt>argptr</tt></i>:</span></td><td>pointer to the first member of the variable argument list.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the bytes written (may be 0 because of buffering) or -1 in case of error</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xpath.html b/doc/html/libxml-xpath.html
new file mode 100644
index 0000000..e47e600
--- /dev/null
+++ b/doc/html/libxml-xpath.html
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xpath from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xpath from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xmlwriter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xmlwriter.html">xmlwriter</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xpathInternals.html">xpathInternals</a></th><td><a accesskey="n" href="libxml-xpathInternals.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer</p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#XML_XPATH_CHECKNS">XML_XPATH_CHECKNS</a></pre><pre class="programlisting">#define <a href="#XML_XPATH_NOVAR">XML_XPATH_NOVAR</a></pre><pre class="programlisting">#define <a href="#xmlXPathNodeSetGetLength">xmlXPathNodeSetGetLength</a></pre><pre class="programlisting">#define <a href="#xmlXPathNodeSetIsEmpty">xmlXPathNodeSetIsEmpty</a></pre><pre class="programlisting">#define <a href="#xmlXPathNodeSetItem">xmlXPathNodeSetItem</a></pre><pre class="programlisting">Structure <a href="#xmlNodeSet">xmlNodeSet</a><br />struct _xmlNodeSet
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlNodeSet">xmlNodeSet</a> * <a name="xmlNodeSetPtr" id="xmlNodeSetPtr">xmlNodeSetPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathAxis">xmlXPathAxis</a><br />struct _xmlXPathAxis
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathAxis">xmlXPathAxis</a> * <a name="xmlXPathAxisPtr" id="xmlXPathAxisPtr">xmlXPathAxisPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathCompExpr">xmlXPathCompExpr</a><br />struct _xmlXPathCompExpr
+The content of this structure is not made public by the API.
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathCompExpr">xmlXPathCompExpr</a> * <a name="xmlXPathCompExprPtr" id="xmlXPathCompExprPtr">xmlXPathCompExprPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathContext">xmlXPathContext</a><br />struct _xmlXPathContext
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a> * <a name="xmlXPathContextPtr" id="xmlXPathContextPtr">xmlXPathContextPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlXPathError">xmlXPathError</a>
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathFunct">xmlXPathFunct</a> * <a name="xmlXPathFuncPtr" id="xmlXPathFuncPtr">xmlXPathFuncPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathFunct">xmlXPathFunct</a><br />struct _xmlXPathFunct
+</pre><pre class="programlisting">Structure <a href="#xmlXPathObject">xmlXPathObject</a><br />struct _xmlXPathObject
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathObject">xmlXPathObject</a> * <a name="xmlXPathObjectPtr" id="xmlXPathObjectPtr">xmlXPathObjectPtr</a>
+</pre><pre class="programlisting">Enum <a href="#xmlXPathObjectType">xmlXPathObjectType</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathParserContext">xmlXPathParserContext</a><br />struct _xmlXPathParserContext
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> * <a name="xmlXPathParserContextPtr" id="xmlXPathParserContextPtr">xmlXPathParserContextPtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathType">xmlXPathType</a><br />struct _xmlXPathType
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathType">xmlXPathType</a> * <a name="xmlXPathTypePtr" id="xmlXPathTypePtr">xmlXPathTypePtr</a>
+</pre><pre class="programlisting">Structure <a href="#xmlXPathVariable">xmlXPathVariable</a><br />struct _xmlXPathVariable
+</pre><pre class="programlisting">Typedef <a href="libxml-xpath.html#xmlXPathVariable">xmlXPathVariable</a> * <a name="xmlXPathVariablePtr" id="xmlXPathVariablePtr">xmlXPathVariablePtr</a>
+</pre><pre class="programlisting">Function type: <a href="#xmlXPathAxisFunc">xmlXPathAxisFunc</a>
+<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathAxisFunc">xmlXPathAxisFunc</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur)
+</pre>
+<pre class="programlisting">double <a href="#xmlXPathCastBooleanToNumber">xmlXPathCastBooleanToNumber</a> (int val)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastBooleanToString">xmlXPathCastBooleanToString</a> (int val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCastNodeSetToBoolean">xmlXPathCastNodeSetToBoolean</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)</pre>
+<pre class="programlisting">double <a href="#xmlXPathCastNodeSetToNumber">xmlXPathCastNodeSetToNumber</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeSetToString">xmlXPathCastNodeSetToString</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)</pre>
+<pre class="programlisting">double <a href="#xmlXPathCastNodeToNumber">xmlXPathCastNodeToNumber</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNodeToString">xmlXPathCastNodeToString</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCastNumberToBoolean">xmlXPathCastNumberToBoolean</a> (double val)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastNumberToString">xmlXPathCastNumberToString</a> (double val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCastStringToBoolean">xmlXPathCastStringToBoolean</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting">double <a href="#xmlXPathCastStringToNumber">xmlXPathCastStringToNumber</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCastToBoolean">xmlXPathCastToBoolean</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting">double <a href="#xmlXPathCastToNumber">xmlXPathCastToNumber</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathCastToString">xmlXPathCastToString</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCompile">xmlXPathCompile</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathCompiledEval">xmlXPathCompiledEval</a> (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCompiledEvalToBoolean">xmlXPathCompiledEvalToBoolean</a> (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathContextSetCache">xmlXPathContextSetCache</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> int active, <br /> int value, <br /> int options)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertBoolean">xmlXPathConvertBoolean</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting">Function type: <a href="#xmlXPathConvertFunc">xmlXPathConvertFunc</a>
+int <a href="#xmlXPathConvertFunc">xmlXPathConvertFunc</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br /> int type)
+</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertNumber">xmlXPathConvertNumber</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathConvertString">xmlXPathConvertString</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> <a href="#xmlXPathCtxtCompile">xmlXPathCtxtCompile</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEval">xmlXPathEval</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathEvalExpression">xmlXPathEvalExpression</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">Function type: <a href="#xmlXPathEvalFunc">xmlXPathEvalFunc</a>
+void <a href="#xmlXPathEvalFunc">xmlXPathEvalFunc</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)
+</pre>
+<pre class="programlisting">int <a href="#xmlXPathEvalPredicate">xmlXPathEvalPredicate</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeCompExpr">xmlXPathFreeCompExpr</a> (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeContext">xmlXPathFreeContext</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeNodeSet">xmlXPathFreeNodeSet</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeNodeSetList">xmlXPathFreeNodeSetList</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeObject">xmlXPathFreeObject</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)</pre>
+<pre class="programlisting">Function type: <a href="#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a>
+<a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
+</pre>
+<pre class="programlisting">Function type: <a href="#xmlXPathFunction">xmlXPathFunction</a>
+void <a href="#xmlXPathFunction">xmlXPathFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)
+</pre>
+<pre class="programlisting">void <a href="#xmlXPathInit">xmlXPathInit</a> (void)</pre>
+<pre class="programlisting">int <a href="#xmlXPathIsInf">xmlXPathIsInf</a> (double val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathIsNaN">xmlXPathIsNaN</a> (double val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPathNewContext">xmlXPathNewContext</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNodeEval">xmlXPathNodeEval</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetCreate">xmlXPathNodeSetCreate</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathObjectCopy">xmlXPathObjectCopy</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting">long <a href="#xmlXPathOrderDocElems">xmlXPathOrderDocElems</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
+<pre class="programlisting">int <a href="#xmlXPathSetContextNode">xmlXPathSetContextNode</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
+<pre class="programlisting">Function type: <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a>
+<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
+</pre>
+<h2>Description</h2>
+<h3><a name="XML_XPATH_CHECKNS" id="XML_XPATH_CHECKNS"></a>Macro: XML_XPATH_CHECKNS</h3><pre>#define XML_XPATH_CHECKNS</pre><p>check namespaces at compilation</p>
+<h3><a name="XML_XPATH_NOVAR" id="XML_XPATH_NOVAR"></a>Macro: XML_XPATH_NOVAR</h3><pre>#define XML_XPATH_NOVAR</pre><p>forbid variables in expression</p>
+<h3><a name="xmlXPathNodeSetGetLength" id="xmlXPathNodeSetGetLength"></a>Macro: xmlXPathNodeSetGetLength</h3><pre>#define xmlXPathNodeSetGetLength</pre><p>Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.</p>
+<h3><a name="xmlXPathNodeSetIsEmpty" id="xmlXPathNodeSetIsEmpty"></a>Macro: xmlXPathNodeSetIsEmpty</h3><pre>#define xmlXPathNodeSetIsEmpty</pre><p>Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.</p>
+<h3><a name="xmlXPathNodeSetItem" id="xmlXPathNodeSetItem"></a>Macro: xmlXPathNodeSetItem</h3><pre>#define xmlXPathNodeSetItem</pre><p>Implements a functionality similar to the DOM NodeList.item(). Returns the <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> at the given @index in @ns or NULL if @index is out of range (0 to length-1)</p>
+<h3><a name="xmlNodeSet" id="xmlNodeSet">Structure xmlNodeSet</a></h3><pre class="programlisting">Structure xmlNodeSet<br />struct _xmlNodeSet {
+ int nodeNr : number of nodes in the set
+ int nodeMax : size of the array as allocated
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes in no particular order @
+}</pre><h3><a name="xmlXPathAxis" id="xmlXPathAxis">Structure xmlXPathAxis</a></h3><pre class="programlisting">Structure xmlXPathAxis<br />struct _xmlXPathAxis {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the axis name
+ <a href="libxml-xpath.html#xmlXPathAxisFunc">xmlXPathAxisFunc</a> func : the search function
+}</pre><h3><a name="xmlXPathCompExpr" id="xmlXPathCompExpr">Structure xmlXPathCompExpr</a></h3><pre class="programlisting">Structure xmlXPathCompExpr<br />struct _xmlXPathCompExpr {
+The content of this structure is not made public by the API.
+}</pre><h3><a name="xmlXPathContext" id="xmlXPathContext">Structure xmlXPathContext</a></h3><pre class="programlisting">Structure xmlXPathContext<br />struct _xmlXPathContext {
+ <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc : The current document
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node : The current node
+ int nb_variables_unused : unused (hash table)
+ int max_variables_unused : unused (hash table)
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> varHash : Hash table of defined variables
+ int nb_types : number of defined types
+ int max_types : max number of types
+ <a href="libxml-xpath.html#xmlXPathTypePtr">xmlXPathTypePtr</a> types : Array of defined types
+ int nb_funcs_unused : unused (hash table)
+ int max_funcs_unused : unused (hash table)
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> funcHash : Hash table of defined funcs
+ int nb_axis : number of defined axis
+ int max_axis : max number of axis
+ <a href="libxml-xpath.html#xmlXPathAxisPtr">xmlXPathAxisPtr</a> axis : Array of defined axis the namespace nod
+ <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> * namespaces : Array of namespaces
+ int nsNr : number of namespace in scope
+ void * user : function to free extra variables
+ int contextSize : the context size
+ int proximityPosition : the proximity position extra stuff for
+ int xptr : is this an XPointer context?
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> here : for here()
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> origin : for origin() the set of namespace decla
+ <a href="libxml-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> nsHash : The namespaces hash table
+ <a href="libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> varLookupFunc : variable lookup func
+ void * varLookupData : variable lookup data Possibility to lin
+ void * extra : needed for XSLT The function name and U
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * function
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * functionURI : function lookup function and data
+ <a href="libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> funcLookupFunc : function lookup func
+ void * funcLookupData : function lookup data temporary namespac
+ <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> * tmpNsList : Array of namespaces
+ int tmpNsNr : number of namespaces in scope error rep
+ void * userData : user specific data block
+ <a href="libxml-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> error : the callback in case of errors
+ <a href="libxml-xmlerror.html#xmlError">xmlError</a> lastError : the last error
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> debugNode : the source node XSLT dictionary
+ <a href="libxml-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionary if any
+ int flags : flags to control compilation Cache for
+ void * cache
+}</pre><h3>Enum <a name="xmlXPathError" id="xmlXPathError">xmlXPathError</a></h3><pre class="programlisting">Enum xmlXPathError {
+ <a name="XPATH_EXPRESSION_OK" id="XPATH_EXPRESSION_OK">XPATH_EXPRESSION_OK</a> = 0
+ <a name="XPATH_NUMBER_ERROR" id="XPATH_NUMBER_ERROR">XPATH_NUMBER_ERROR</a> = 1
+ <a name="XPATH_UNFINISHED_LITERAL_ERROR" id="XPATH_UNFINISHED_LITERAL_ERROR">XPATH_UNFINISHED_LITERAL_ERROR</a> = 2
+ <a name="XPATH_START_LITERAL_ERROR" id="XPATH_START_LITERAL_ERROR">XPATH_START_LITERAL_ERROR</a> = 3
+ <a name="XPATH_VARIABLE_REF_ERROR" id="XPATH_VARIABLE_REF_ERROR">XPATH_VARIABLE_REF_ERROR</a> = 4
+ <a name="XPATH_UNDEF_VARIABLE_ERROR" id="XPATH_UNDEF_VARIABLE_ERROR">XPATH_UNDEF_VARIABLE_ERROR</a> = 5
+ <a name="XPATH_INVALID_PREDICATE_ERROR" id="XPATH_INVALID_PREDICATE_ERROR">XPATH_INVALID_PREDICATE_ERROR</a> = 6
+ <a name="XPATH_EXPR_ERROR" id="XPATH_EXPR_ERROR">XPATH_EXPR_ERROR</a> = 7
+ <a name="XPATH_UNCLOSED_ERROR" id="XPATH_UNCLOSED_ERROR">XPATH_UNCLOSED_ERROR</a> = 8
+ <a name="XPATH_UNKNOWN_FUNC_ERROR" id="XPATH_UNKNOWN_FUNC_ERROR">XPATH_UNKNOWN_FUNC_ERROR</a> = 9
+ <a name="XPATH_INVALID_OPERAND" id="XPATH_INVALID_OPERAND">XPATH_INVALID_OPERAND</a> = 10
+ <a name="XPATH_INVALID_TYPE" id="XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a> = 11
+ <a name="XPATH_INVALID_ARITY" id="XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a> = 12
+ <a name="XPATH_INVALID_CTXT_SIZE" id="XPATH_INVALID_CTXT_SIZE">XPATH_INVALID_CTXT_SIZE</a> = 13
+ <a name="XPATH_INVALID_CTXT_POSITION" id="XPATH_INVALID_CTXT_POSITION">XPATH_INVALID_CTXT_POSITION</a> = 14
+ <a name="XPATH_MEMORY_ERROR" id="XPATH_MEMORY_ERROR">XPATH_MEMORY_ERROR</a> = 15
+ <a name="XPTR_SYNTAX_ERROR" id="XPTR_SYNTAX_ERROR">XPTR_SYNTAX_ERROR</a> = 16
+ <a name="XPTR_RESOURCE_ERROR" id="XPTR_RESOURCE_ERROR">XPTR_RESOURCE_ERROR</a> = 17
+ <a name="XPTR_SUB_RESOURCE_ERROR" id="XPTR_SUB_RESOURCE_ERROR">XPTR_SUB_RESOURCE_ERROR</a> = 18
+ <a name="XPATH_UNDEF_PREFIX_ERROR" id="XPATH_UNDEF_PREFIX_ERROR">XPATH_UNDEF_PREFIX_ERROR</a> = 19
+ <a name="XPATH_ENCODING_ERROR" id="XPATH_ENCODING_ERROR">XPATH_ENCODING_ERROR</a> = 20
+ <a name="XPATH_INVALID_CHAR_ERROR" id="XPATH_INVALID_CHAR_ERROR">XPATH_INVALID_CHAR_ERROR</a> = 21
+ <a name="XPATH_INVALID_CTXT" id="XPATH_INVALID_CTXT">XPATH_INVALID_CTXT</a> = 22
+ <a name="XPATH_STACK_ERROR" id="XPATH_STACK_ERROR">XPATH_STACK_ERROR</a> = 23
+ <a name="XPATH_FORBID_VARIABLE_ERROR" id="XPATH_FORBID_VARIABLE_ERROR">XPATH_FORBID_VARIABLE_ERROR</a> = 24
+}
+</pre><h3><a name="xmlXPathFunct" id="xmlXPathFunct">Structure xmlXPathFunct</a></h3><pre class="programlisting">Structure xmlXPathFunct<br />struct _xmlXPathFunct {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the function name
+ <a href="libxml-xpath.html#xmlXPathEvalFunc">xmlXPathEvalFunc</a> func : the evaluation function
+}</pre><h3><a name="xmlXPathObject" id="xmlXPathObject">Structure xmlXPathObject</a></h3><pre class="programlisting">Structure xmlXPathObject<br />struct _xmlXPathObject {
+ <a href="libxml-xpath.html#xmlXPathObjectType">xmlXPathObjectType</a> type
+ <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodesetval
+ int boolval
+ double floatval
+ <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * stringval
+ void * user
+ int index
+ void * user2
+ int index2
+}</pre><h3>Enum <a name="xmlXPathObjectType" id="xmlXPathObjectType">xmlXPathObjectType</a></h3><pre class="programlisting">Enum xmlXPathObjectType {
+ <a name="XPATH_UNDEFINED" id="XPATH_UNDEFINED">XPATH_UNDEFINED</a> = 0
+ <a name="XPATH_NODESET" id="XPATH_NODESET">XPATH_NODESET</a> = 1
+ <a name="XPATH_BOOLEAN" id="XPATH_BOOLEAN">XPATH_BOOLEAN</a> = 2
+ <a name="XPATH_NUMBER" id="XPATH_NUMBER">XPATH_NUMBER</a> = 3
+ <a name="XPATH_STRING" id="XPATH_STRING">XPATH_STRING</a> = 4
+ <a name="XPATH_POINT" id="XPATH_POINT">XPATH_POINT</a> = 5
+ <a name="XPATH_RANGE" id="XPATH_RANGE">XPATH_RANGE</a> = 6
+ <a name="XPATH_LOCATIONSET" id="XPATH_LOCATIONSET">XPATH_LOCATIONSET</a> = 7
+ <a name="XPATH_USERS" id="XPATH_USERS">XPATH_USERS</a> = 8
+ <a name="XPATH_XSLT_TREE" id="XPATH_XSLT_TREE">XPATH_XSLT_TREE</a> = 9 : An XSLT value tree, non modifiable
+}
+</pre><h3><a name="xmlXPathParserContext" id="xmlXPathParserContext">Structure xmlXPathParserContext</a></h3><pre class="programlisting">Structure xmlXPathParserContext<br />struct _xmlXPathParserContext {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * cur : the current char being parsed
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * base : the full expression
+ int error : error code
+ <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> context : the evaluation context
+ <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the current value
+ int valueNr : number of values stacked
+ int valueMax : max number of values stacked
+ <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> * valueTab : stack of values
+ <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp : the precompiled expression
+ int xptr : it this an XPointer expression
+ <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> ancestor : used for walking preceding axis
+ int valueFrame : used to limit Pop on the stack
+}</pre><h3><a name="xmlXPathType" id="xmlXPathType">Structure xmlXPathType</a></h3><pre class="programlisting">Structure xmlXPathType<br />struct _xmlXPathType {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the type name
+ <a href="libxml-xpath.html#xmlXPathConvertFunc">xmlXPathConvertFunc</a> func : the conversion function
+}</pre><h3><a name="xmlXPathVariable" id="xmlXPathVariable">Structure xmlXPathVariable</a></h3><pre class="programlisting">Structure xmlXPathVariable<br />struct _xmlXPathVariable {
+ const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name : the variable name
+ <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value : the value
+}</pre><h3><a name="xmlXPathAxisFunc" id="xmlXPathAxisFunc"></a>Function type: xmlXPathAxisFunc</h3><pre class="programlisting">Function type: xmlXPathAxisFunc
+<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathAxisFunc (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur)
+</pre><p>An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interpreter context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the previous node being explored on that axis</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next node in that axis or NULL if at the end of the axis.</td></tr></tbody></table></div><br />
+<h3><a name="xmlXPathCastBooleanToNumber" id="xmlXPathCastBooleanToNumber"></a>Function: xmlXPathCastBooleanToNumber</h3><pre class="programlisting">double xmlXPathCastBooleanToNumber (int val)<br />
+</pre><p>Converts a boolean to its number value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div><h3><a name="xmlXPathCastBooleanToString" id="xmlXPathCastBooleanToString"></a>Function: xmlXPathCastBooleanToString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastBooleanToString (int val)<br />
+</pre><p>Converts a boolean to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div><h3><a name="xmlXPathCastNodeSetToBoolean" id="xmlXPathCastNodeSetToBoolean"></a>Function: xmlXPathCastNodeSetToBoolean</h3><pre class="programlisting">int xmlXPathCastNodeSetToBoolean (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br />
+</pre><p>Converts a node-set to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div><h3><a name="xmlXPathCastNodeSetToNumber" id="xmlXPathCastNodeSetToNumber"></a>Function: xmlXPathCastNodeSetToNumber</h3><pre class="programlisting">double xmlXPathCastNodeSetToNumber (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br />
+</pre><p>Converts a node-set to its number value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div><h3><a name="xmlXPathCastNodeSetToString" id="xmlXPathCastNodeSetToString"></a>Function: xmlXPathCastNodeSetToString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeSetToString (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> ns)<br />
+</pre><p>Converts a node-set to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div><h3><a name="xmlXPathCastNodeToNumber" id="xmlXPathCastNodeToNumber"></a>Function: xmlXPathCastNodeToNumber</h3><pre class="programlisting">double xmlXPathCastNodeToNumber (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Converts a node to its number value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div><h3><a name="xmlXPathCastNodeToString" id="xmlXPathCastNodeToString"></a>Function: xmlXPathCastNodeToString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNodeToString (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Converts a node to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div><h3><a name="xmlXPathCastNumberToBoolean" id="xmlXPathCastNumberToBoolean"></a>Function: xmlXPathCastNumberToBoolean</h3><pre class="programlisting">int xmlXPathCastNumberToBoolean (double val)<br />
+</pre><p>Converts a number to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div><h3><a name="xmlXPathCastNumberToString" id="xmlXPathCastNumberToString"></a>Function: xmlXPathCastNumberToString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastNumberToString (double val)<br />
+</pre><p>Converts a number to its string value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a newly allocated string.</td></tr></tbody></table></div><h3><a name="xmlXPathCastStringToBoolean" id="xmlXPathCastStringToBoolean"></a>Function: xmlXPathCastStringToBoolean</h3><pre class="programlisting">int xmlXPathCastStringToBoolean (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>Converts a string to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div><h3><a name="xmlXPathCastStringToNumber" id="xmlXPathCastStringToNumber"></a>Function: xmlXPathCastStringToNumber</h3><pre class="programlisting">double xmlXPathCastStringToNumber (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>Converts a string to its number value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div><h3><a name="xmlXPathCastToBoolean" id="xmlXPathCastToBoolean"></a>Function: xmlXPathCastToBoolean</h3><pre class="programlisting">int xmlXPathCastToBoolean (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an XPath object to its boolean value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean value</td></tr></tbody></table></div><h3><a name="xmlXPathCastToNumber" id="xmlXPathCastToNumber"></a>Function: xmlXPathCastToNumber</h3><pre class="programlisting">double xmlXPathCastToNumber (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an XPath object to its number value</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div><h3><a name="xmlXPathCastToString" id="xmlXPathCastToString"></a>Function: xmlXPathCastToString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathCastToString (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an existing object to its string() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().</td></tr></tbody></table></div><h3><a name="xmlXPathCmpNodes" id="xmlXPathCmpNodes"></a>Function: xmlXPathCmpNodes</h3><pre class="programlisting">int xmlXPathCmpNodes (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node2)<br />
+</pre><p>Compare two nodes w.r.t document order</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node1</tt></i>:</span></td><td>the first node</td></tr><tr><td><span class="term"><i><tt>node2</tt></i>:</span></td><td>the second node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-2 in case of error 1 if first point &lt; second point, 0 if it's the same node, -1 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathCompile" id="xmlXPathCompile"></a>Function: xmlXPathCompile</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCompile (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Compile an XPath expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathCompiledEval" id="xmlXPathCompiledEval"></a>Function: xmlXPathCompiledEval</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathCompiledEval (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Evaluate the Precompiled XPath expression in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathCompiledEvalToBoolean" id="xmlXPathCompiledEvalToBoolean"></a>Function: xmlXPathCompiledEvalToBoolean</h3><pre class="programlisting">int xmlXPathCompiledEvalToBoolean (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Applies the XPath boolean() function on the result of the given compiled expression.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.</td></tr></tbody></table></div><h3><a name="xmlXPathContextSetCache" id="xmlXPathContextSetCache"></a>Function: xmlXPathContextSetCache</h3><pre class="programlisting">int xmlXPathContextSetCache (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> int active, <br /> int value, <br /> int options)<br />
+</pre><p>Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use &lt;0 for the default number (100). Other values for @options have currently no effect.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>active</tt></i>:</span></td><td>enables/disables (creates/frees) the cache</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>a value with semantics dependant on @options</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>options (currently only the value 0 is used)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the setting succeeded, and -1 on API or internal errors.</td></tr></tbody></table></div><h3><a name="xmlXPathConvertBoolean" id="xmlXPathConvertBoolean"></a>Function: xmlXPathConvertBoolean</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertBoolean (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an existing object to its boolean() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div><h3><a name="xmlXPathConvertFunc" id="xmlXPathConvertFunc"></a>Function type: xmlXPathConvertFunc</h3><pre class="programlisting">Function type: xmlXPathConvertFunc
+int xmlXPathConvertFunc (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br /> int type)
+</pre><p>A conversion function is associated to a type and used to cast the new type to primitive values.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the number of the target type</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div><br />
+<h3><a name="xmlXPathConvertNumber" id="xmlXPathConvertNumber"></a>Function: xmlXPathConvertNumber</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertNumber (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an existing object to its number() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div><h3><a name="xmlXPathConvertString" id="xmlXPathConvertString"></a>Function: xmlXPathConvertString</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathConvertString (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Converts an existing object to its string() equivalent</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div><h3><a name="xmlXPathCtxtCompile" id="xmlXPathCtxtCompile"></a>Function: xmlXPathCtxtCompile</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> xmlXPathCtxtCompile (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>Compile an XPath expression</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathEval" id="xmlXPathEval"></a>Function: xmlXPathEval</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEval (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Evaluate the XPath Location Path in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathEvalExpression" id="xmlXPathEvalExpression"></a>Function: xmlXPathEvalExpression</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathEvalExpression (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Evaluate the XPath expression in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathEvalFunc" id="xmlXPathEvalFunc"></a>Function type: xmlXPathEvalFunc</h3><pre class="programlisting">Function type: xmlXPathEvalFunc
+void xmlXPathEvalFunc (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)
+</pre><p>An XPath evaluation function, the parameters are on the XPath context stack.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments passed to the function</td></tr></tbody></table></div><br />
+<h3><a name="xmlXPathEvalPredicate" id="xmlXPathEvalPredicate"></a>Function: xmlXPathEvalPredicate</h3><pre class="programlisting">int xmlXPathEvalPredicate (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)<br />
+</pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathFreeCompExpr" id="xmlXPathFreeCompExpr"></a>Function: xmlXPathFreeCompExpr</h3><pre class="programlisting">void xmlXPathFreeCompExpr (<a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp)<br />
+</pre><p>Free up the memory allocated by @comp</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>an XPATH comp</td></tr></tbody></table></div><h3><a name="xmlXPathFreeContext" id="xmlXPathFreeContext"></a>Function: xmlXPathFreeContext</h3><pre class="programlisting">void xmlXPathFreeContext (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Free up an <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div><h3><a name="xmlXPathFreeNodeSet" id="xmlXPathFreeNodeSet"></a>Function: xmlXPathFreeNodeSet</h3><pre class="programlisting">void xmlXPathFreeNodeSet (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> obj)<br />
+</pre><p>Free the NodeSet compound (not the actual nodes !).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> to free</td></tr></tbody></table></div><h3><a name="xmlXPathFreeNodeSetList" id="xmlXPathFreeNodeSetList"></a>Function: xmlXPathFreeNodeSetList</h3><pre class="programlisting">void xmlXPathFreeNodeSetList (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br />
+</pre><p>Free up the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>an existing NodeSetList object</td></tr></tbody></table></div><h3><a name="xmlXPathFreeObject" id="xmlXPathFreeObject"></a>Function: xmlXPathFreeObject</h3><pre class="programlisting">void xmlXPathFreeObject (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br />
+</pre><p>Free up an <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> object.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the object to free</td></tr></tbody></table></div><h3><a name="xmlXPathFuncLookupFunc" id="xmlXPathFuncLookupFunc"></a>Function type: xmlXPathFuncLookupFunc</h3><pre class="programlisting">Function type: xmlXPathFuncLookupFunc
+<a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFuncLookupFunc (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
+</pre><p>Prototype for callbacks used to plug function lookup in the XPath engine.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the function</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this function</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath function or NULL if not found.</td></tr></tbody></table></div><br />
+<h3><a name="xmlXPathFunction" id="xmlXPathFunction"></a>Function type: xmlXPathFunction</h3><pre class="programlisting">Function type: xmlXPathFunction
+void xmlXPathFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)
+</pre><p>An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interprestation context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><br />
+<h3><a name="xmlXPathInit" id="xmlXPathInit"></a>Function: xmlXPathInit</h3><pre class="programlisting">void xmlXPathInit (void)<br />
+</pre><p>Initialize the XPath environment</p>
+<h3><a name="xmlXPathIsInf" id="xmlXPathIsInf"></a>Function: xmlXPathIsInf</h3><pre class="programlisting">int xmlXPathIsInf (double val)<br />
+</pre><p>Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathIsNaN" id="xmlXPathIsNaN"></a>Function: xmlXPathIsNaN</h3><pre class="programlisting">int xmlXPathIsNaN (double val)<br />
+</pre><p>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the value is a NaN, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathNewContext" id="xmlXPathNewContext"></a>Function: xmlXPathNewContext</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPathNewContext (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeEval" id="xmlXPathNodeEval"></a>Function: xmlXPathNodeEval</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNodeEval (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Evaluate the XPath Location Path in the given context. The node 'node' is set as the context node. The context node is not restored.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetCreate" id="xmlXPathNodeSetCreate"></a>Function: xmlXPathNodeSetCreate</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetCreate (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathObjectCopy" id="xmlXPathObjectCopy"></a>Function: xmlXPathObjectCopy</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathObjectCopy (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>allocate a new copy of a given object</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the original object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathOrderDocElems" id="xmlXPathOrderDocElems"></a>Function: xmlXPathOrderDocElems</h3><pre class="programlisting">long xmlXPathOrderDocElems (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
+</pre><p>Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element-&gt;content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlXPathSetContextNode" id="xmlXPathSetContextNode"></a>Function: xmlXPathSetContextNode</h3><pre class="programlisting">int xmlXPathSetContextNode (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Sets 'node' as the context node. The node must be in the same document as that associated with the context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node to to use as the context node</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error or 0 if successful</td></tr></tbody></table></div><h3><a name="xmlXPathVariableLookupFunc" id="xmlXPathVariableLookupFunc"></a>Function type: xmlXPathVariableLookupFunc</h3><pre class="programlisting">Function type: xmlXPathVariableLookupFunc
+<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupFunc (void * ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)
+</pre><p>Prototype for callbacks used to plug variable lookup in the XPath engine.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of the variable</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this variable</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object value or NULL if not found.</td></tr></tbody></table></div><br />
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xpathInternals.html b/doc/html/libxml-xpathInternals.html
new file mode 100644
index 0000000..f12d808
--- /dev/null
+++ b/doc/html/libxml-xpathInternals.html
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xpathInternals from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xpathInternals from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xpath.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xpath.html">xpath</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th><th align="right"><a href="libxml-xpointer.html">xpointer</a></th><td><a accesskey="n" href="libxml-xpointer.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#CAST_TO_BOOLEAN">CAST_TO_BOOLEAN</a></pre><pre class="programlisting">#define <a href="#CAST_TO_NUMBER">CAST_TO_NUMBER</a></pre><pre class="programlisting">#define <a href="#CAST_TO_STRING">CAST_TO_STRING</a></pre><pre class="programlisting">#define <a href="#CHECK_ARITY">CHECK_ARITY</a></pre><pre class="programlisting">#define <a href="#CHECK_ERROR">CHECK_ERROR</a></pre><pre class="programlisting">#define <a href="#CHECK_ERROR0">CHECK_ERROR0</a></pre><pre class="programlisting">#define <a href="#CHECK_TYPE">CHECK_TYPE</a></pre><pre class="programlisting">#define <a href="#CHECK_TYPE0">CHECK_TYPE0</a></pre><pre class="programlisting">#define <a href="#XP_ERROR">XP_ERROR</a></pre><pre class="programlisting">#define <a href="#XP_ERROR0">XP_ERROR0</a></pre><pre class="programlisting">#define <a href="#xmlXPathCheckError">xmlXPathCheckError</a></pre><pre class="programlisting">#define <a href="#xmlXPathEmptyNodeSet">xmlXPathEmptyNodeSet</a></pre><pre class="programlisting">#define <a href="#xmlXPathGetContextNode">xmlXPathGetContextNode</a></pre><pre class="programlisting">#define <a href="#xmlXPathGetDocument">xmlXPathGetDocument</a></pre><pre class="programlisting">#define <a href="#xmlXPathGetError">xmlXPathGetError</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnBoolean">xmlXPathReturnBoolean</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnEmptyNodeSet">xmlXPathReturnEmptyNodeSet</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnEmptyString">xmlXPathReturnEmptyString</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnExternal">xmlXPathReturnExternal</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnFalse">xmlXPathReturnFalse</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnNodeSet">xmlXPathReturnNodeSet</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnNumber">xmlXPathReturnNumber</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnString">xmlXPathReturnString</a></pre><pre class="programlisting">#define <a href="#xmlXPathReturnTrue">xmlXPathReturnTrue</a></pre><pre class="programlisting">#define <a href="#xmlXPathSetArityError">xmlXPathSetArityError</a></pre><pre class="programlisting">#define <a href="#xmlXPathSetError">xmlXPathSetError</a></pre><pre class="programlisting">#define <a href="#xmlXPathSetTypeError">xmlXPathSetTypeError</a></pre><pre class="programlisting">#define <a href="#xmlXPathStackIsExternal">xmlXPathStackIsExternal</a></pre><pre class="programlisting">#define <a href="#xmlXPathStackIsNodeSet">xmlXPathStackIsNodeSet</a></pre><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#valuePop">valuePop</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#valuePush">valuePush</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)</pre>
+<pre class="programlisting">void <a href="#xmlXPathAddValues">xmlXPathAddValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathBooleanFunction">xmlXPathBooleanFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathCeilingFunction">xmlXPathCeilingFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">int <a href="#xmlXPathCompareValues">xmlXPathCompareValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int inf, <br /> int strict)</pre>
+<pre class="programlisting">void <a href="#xmlXPathConcatFunction">xmlXPathConcatFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathContainsFunction">xmlXPathContainsFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathCountFunction">xmlXPathCountFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathDebugDumpCompExpr">xmlXPathDebugDumpCompExpr</a> (FILE * output, <br /> <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> int depth)</pre>
+<pre class="programlisting">void <a href="#xmlXPathDebugDumpObject">xmlXPathDebugDumpObject</a> (FILE * output, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur, <br /> int depth)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDifference">xmlXPathDifference</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDistinct">xmlXPathDistinct</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathDistinctSorted">xmlXPathDistinctSorted</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)</pre>
+<pre class="programlisting">void <a href="#xmlXPathDivValues">xmlXPathDivValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathEqualValues">xmlXPathEqualValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathErr">xmlXPathErr</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int error)</pre>
+<pre class="programlisting">void <a href="#xmlXPathEvalExpr">xmlXPathEvalExpr</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathEvaluatePredicateResult">xmlXPathEvaluatePredicateResult</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFalseFunction">xmlXPathFalseFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFloorFunction">xmlXPathFloorFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathFreeParserContext">xmlXPathFreeParserContext</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFunctionLookup">xmlXPathFunctionLookup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> <a href="#xmlXPathFunctionLookupNS">xmlXPathFunctionLookupNS</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)</pre>
+<pre class="programlisting">int <a href="#xmlXPathHasSameNodes">xmlXPathHasSameNodes</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting">void <a href="#xmlXPathIdFunction">xmlXPathIdFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathIntersection">xmlXPathIntersection</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting">int <a href="#xmlXPathIsNodeType">xmlXPathIsNodeType</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting">void <a href="#xmlXPathLangFunction">xmlXPathLangFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathLastFunction">xmlXPathLastFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathLeading">xmlXPathLeading</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathLeadingSorted">xmlXPathLeadingSorted</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting">void <a href="#xmlXPathLocalNameFunction">xmlXPathLocalNameFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathModValues">xmlXPathModValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathMultValues">xmlXPathMultValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNamespaceURIFunction">xmlXPathNamespaceURIFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewBoolean">xmlXPathNewBoolean</a> (int val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewCString">xmlXPathNewCString</a> (const char * val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewFloat">xmlXPathNewFloat</a> (double val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewNodeSet">xmlXPathNewNodeSet</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewNodeSetList">xmlXPathNewNodeSetList</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> <a href="#xmlXPathNewParserContext">xmlXPathNewParserContext</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewString">xmlXPathNewString</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathNewValueTree">xmlXPathNewValueTree</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAncestor">xmlXPathNextAncestor</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAncestorOrSelf">xmlXPathNextAncestorOrSelf</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextAttribute">xmlXPathNextAttribute</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextChild">xmlXPathNextChild</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextDescendant">xmlXPathNextDescendant</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextDescendantOrSelf">xmlXPathNextDescendantOrSelf</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextFollowing">xmlXPathNextFollowing</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextFollowingSibling">xmlXPathNextFollowingSibling</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextNamespace">xmlXPathNextNamespace</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextParent">xmlXPathNextParent</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextPreceding">xmlXPathNextPreceding</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextPrecedingSibling">xmlXPathNextPrecedingSibling</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPathNextSelf">xmlXPathNextSelf</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeLeading">xmlXPathNodeLeading</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeLeadingSorted">xmlXPathNodeLeadingSorted</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">int <a href="#xmlXPathNodeSetAdd">xmlXPathNodeSetAdd</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathNodeSetAddNs">xmlXPathNodeSetAddNs</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)</pre>
+<pre class="programlisting">int <a href="#xmlXPathNodeSetAddUnique">xmlXPathNodeSetAddUnique</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting">int <a href="#xmlXPathNodeSetContains">xmlXPathNodeSetContains</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNodeSetDel">xmlXPathNodeSetDel</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNodeSetFreeNs">xmlXPathNodeSetFreeNs</a> (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeSetMerge">xmlXPathNodeSetMerge</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val2)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNodeSetRemove">xmlXPathNodeSetRemove</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> int val)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNodeSetSort">xmlXPathNodeSetSort</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeTrailing">xmlXPathNodeTrailing</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathNodeTrailingSorted">xmlXPathNodeTrailingSorted</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNormalizeFunction">xmlXPathNormalizeFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">int <a href="#xmlXPathNotEqualValues">xmlXPathNotEqualValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNotFunction">xmlXPathNotFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathNsLookup">xmlXPathNsLookup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)</pre>
+<pre class="programlisting">void <a href="#xmlXPathNumberFunction">xmlXPathNumberFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathParseNCName">xmlXPathParseNCName</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathParseName">xmlXPathParseName</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathPopBoolean">xmlXPathPopBoolean</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void * <a href="#xmlXPathPopExternal">xmlXPathPopExternal</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathPopNodeSet">xmlXPathPopNodeSet</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">double <a href="#xmlXPathPopNumber">xmlXPathPopNumber</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlXPathPopString">xmlXPathPopString</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathPositionFunction">xmlXPathPositionFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisterAllFunctions">xmlXPathRegisterAllFunctions</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathRegisterFunc">xmlXPathRegisterFunc</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisterFuncLookup">xmlXPathRegisterFuncLookup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> f, <br /> void * funcCtxt)</pre>
+<pre class="programlisting">int <a href="#xmlXPathRegisterFuncNS">xmlXPathRegisterFuncNS</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br /> <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)</pre>
+<pre class="programlisting">int <a href="#xmlXPathRegisterNs">xmlXPathRegisterNs</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)</pre>
+<pre class="programlisting">int <a href="#xmlXPathRegisterVariable">xmlXPathRegisterVariable</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisterVariableLookup">xmlXPathRegisterVariableLookup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> f, <br /> void * data)</pre>
+<pre class="programlisting">int <a href="#xmlXPathRegisterVariableNS">xmlXPathRegisterVariableNS</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisteredFuncsCleanup">xmlXPathRegisteredFuncsCleanup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisteredNsCleanup">xmlXPathRegisteredNsCleanup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRegisteredVariablesCleanup">xmlXPathRegisteredVariablesCleanup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRoot">xmlXPathRoot</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathRoundFunction">xmlXPathRoundFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathStartsWithFunction">xmlXPathStartsWithFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">double <a href="#xmlXPathStringEvalNumber">xmlXPathStringEvalNumber</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)</pre>
+<pre class="programlisting">void <a href="#xmlXPathStringFunction">xmlXPathStringFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathStringLengthFunction">xmlXPathStringLengthFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathSubValues">xmlXPathSubValues</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPathSubstringAfterFunction">xmlXPathSubstringAfterFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathSubstringBeforeFunction">xmlXPathSubstringBeforeFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathSubstringFunction">xmlXPathSubstringFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathSumFunction">xmlXPathSumFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathTrailing">xmlXPathTrailing</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> <a href="#xmlXPathTrailingSorted">xmlXPathTrailingSorted</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)</pre>
+<pre class="programlisting">void <a href="#xmlXPathTranslateFunction">xmlXPathTranslateFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathTrueFunction">xmlXPathTrueFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting">void <a href="#xmlXPathValueFlipSign">xmlXPathValueFlipSign</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookup">xmlXPathVariableLookup</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathVariableLookupNS">xmlXPathVariableLookupNS</a> (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapCString">xmlXPathWrapCString</a> (char * val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapExternal">xmlXPathWrapExternal</a> (void * val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapNodeSet">xmlXPathWrapNodeSet</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPathWrapString">xmlXPathWrapString</a> (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)</pre>
+<pre class="programlisting">void <a href="#xmlXPatherror">xmlXPatherror</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> const char * file, <br /> int line, <br /> int no)</pre>
+<h2>Description</h2>
+<h3><a name="CAST_TO_BOOLEAN" id="CAST_TO_BOOLEAN"></a>Macro: CAST_TO_BOOLEAN</h3><pre>#define CAST_TO_BOOLEAN</pre><p>Macro to try to cast the value on the top of the XPath stack to a boolean.</p>
+<h3><a name="CAST_TO_NUMBER" id="CAST_TO_NUMBER"></a>Macro: CAST_TO_NUMBER</h3><pre>#define CAST_TO_NUMBER</pre><p>Macro to try to cast the value on the top of the XPath stack to a number.</p>
+<h3><a name="CAST_TO_STRING" id="CAST_TO_STRING"></a>Macro: CAST_TO_STRING</h3><pre>#define CAST_TO_STRING</pre><p>Macro to try to cast the value on the top of the XPath stack to a string.</p>
+<h3><a name="CHECK_ARITY" id="CHECK_ARITY"></a>Macro: CHECK_ARITY</h3><pre>#define CHECK_ARITY</pre><p>Macro to check that the number of args passed to an XPath function matches.</p>
+<h3><a name="CHECK_ERROR" id="CHECK_ERROR"></a>Macro: CHECK_ERROR</h3><pre>#define CHECK_ERROR</pre><p>Macro to return from the function if an XPath error was detected.</p>
+<h3><a name="CHECK_ERROR0" id="CHECK_ERROR0"></a>Macro: CHECK_ERROR0</h3><pre>#define CHECK_ERROR0</pre><p>Macro to return 0 from the function if an XPath error was detected.</p>
+<h3><a name="CHECK_TYPE" id="CHECK_TYPE"></a>Macro: CHECK_TYPE</h3><pre>#define CHECK_TYPE</pre><p>Macro to check that the value on top of the XPath stack is of a given type.</p>
+<h3><a name="CHECK_TYPE0" id="CHECK_TYPE0"></a>Macro: CHECK_TYPE0</h3><pre>#define CHECK_TYPE0</pre><p>Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure</p>
+<h3><a name="XP_ERROR" id="XP_ERROR"></a>Macro: XP_ERROR</h3><pre>#define XP_ERROR</pre><p>Macro to raise an XPath error and return.</p>
+<h3><a name="XP_ERROR0" id="XP_ERROR0"></a>Macro: XP_ERROR0</h3><pre>#define XP_ERROR0</pre><p>Macro to raise an XPath error and return 0.</p>
+<h3><a name="xmlXPathCheckError" id="xmlXPathCheckError"></a>Macro: xmlXPathCheckError</h3><pre>#define xmlXPathCheckError</pre><p>Check if an XPath error was raised. Returns true if an error has been raised, false otherwise.</p>
+<h3><a name="xmlXPathEmptyNodeSet" id="xmlXPathEmptyNodeSet"></a>Macro: xmlXPathEmptyNodeSet</h3><pre>#define xmlXPathEmptyNodeSet</pre><p>Empties a node-set.</p>
+<h3><a name="xmlXPathGetContextNode" id="xmlXPathGetContextNode"></a>Macro: xmlXPathGetContextNode</h3><pre>#define xmlXPathGetContextNode</pre><p>Get the context node of an XPath context. Returns the context node.</p>
+<h3><a name="xmlXPathGetDocument" id="xmlXPathGetDocument"></a>Macro: xmlXPathGetDocument</h3><pre>#define xmlXPathGetDocument</pre><p>Get the document of an XPath context. Returns the context document.</p>
+<h3><a name="xmlXPathGetError" id="xmlXPathGetError"></a>Macro: xmlXPathGetError</h3><pre>#define xmlXPathGetError</pre><p>Get the error code of an XPath context. Returns the context error.</p>
+<h3><a name="xmlXPathReturnBoolean" id="xmlXPathReturnBoolean"></a>Macro: xmlXPathReturnBoolean</h3><pre>#define xmlXPathReturnBoolean</pre><p>Pushes the boolean @val on the context stack.</p>
+<h3><a name="xmlXPathReturnEmptyNodeSet" id="xmlXPathReturnEmptyNodeSet"></a>Macro: xmlXPathReturnEmptyNodeSet</h3><pre>#define xmlXPathReturnEmptyNodeSet</pre><p>Pushes an empty node-set on the context stack.</p>
+<h3><a name="xmlXPathReturnEmptyString" id="xmlXPathReturnEmptyString"></a>Macro: xmlXPathReturnEmptyString</h3><pre>#define xmlXPathReturnEmptyString</pre><p>Pushes an empty string on the stack.</p>
+<h3><a name="xmlXPathReturnExternal" id="xmlXPathReturnExternal"></a>Macro: xmlXPathReturnExternal</h3><pre>#define xmlXPathReturnExternal</pre><p>Pushes user data on the context stack.</p>
+<h3><a name="xmlXPathReturnFalse" id="xmlXPathReturnFalse"></a>Macro: xmlXPathReturnFalse</h3><pre>#define xmlXPathReturnFalse</pre><p>Pushes false on the context stack.</p>
+<h3><a name="xmlXPathReturnNodeSet" id="xmlXPathReturnNodeSet"></a>Macro: xmlXPathReturnNodeSet</h3><pre>#define xmlXPathReturnNodeSet</pre><p>Pushes the node-set @ns on the context stack.</p>
+<h3><a name="xmlXPathReturnNumber" id="xmlXPathReturnNumber"></a>Macro: xmlXPathReturnNumber</h3><pre>#define xmlXPathReturnNumber</pre><p>Pushes the double @val on the context stack.</p>
+<h3><a name="xmlXPathReturnString" id="xmlXPathReturnString"></a>Macro: xmlXPathReturnString</h3><pre>#define xmlXPathReturnString</pre><p>Pushes the string @str on the context stack.</p>
+<h3><a name="xmlXPathReturnTrue" id="xmlXPathReturnTrue"></a>Macro: xmlXPathReturnTrue</h3><pre>#define xmlXPathReturnTrue</pre><p>Pushes true on the context stack.</p>
+<h3><a name="xmlXPathSetArityError" id="xmlXPathSetArityError"></a>Macro: xmlXPathSetArityError</h3><pre>#define xmlXPathSetArityError</pre><p>Raises an <a href="libxml-xpath.html#XPATH_INVALID_ARITY">XPATH_INVALID_ARITY</a> error.</p>
+<h3><a name="xmlXPathSetError" id="xmlXPathSetError"></a>Macro: xmlXPathSetError</h3><pre>#define xmlXPathSetError</pre><p>Raises an error.</p>
+<h3><a name="xmlXPathSetTypeError" id="xmlXPathSetTypeError"></a>Macro: xmlXPathSetTypeError</h3><pre>#define xmlXPathSetTypeError</pre><p>Raises an <a href="libxml-xpath.html#XPATH_INVALID_TYPE">XPATH_INVALID_TYPE</a> error.</p>
+<h3><a name="xmlXPathStackIsExternal" id="xmlXPathStackIsExternal"></a>Macro: xmlXPathStackIsExternal</h3><pre>#define xmlXPathStackIsExternal</pre><p>Checks if the current value on the XPath stack is an external object. Returns true if the current object on the stack is an external object.</p>
+<h3><a name="xmlXPathStackIsNodeSet" id="xmlXPathStackIsNodeSet"></a>Macro: xmlXPathStackIsNodeSet</h3><pre>#define xmlXPathStackIsNodeSet</pre><p>Check if the current value on the XPath stack is a node set or an XSLT value tree. Returns true if the current object on the stack is a node-set.</p>
+<h3><a name="valuePop" id="valuePop"></a>Function: valuePop</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> valuePop (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops the top XPath object from the value stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath evaluation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object just removed</td></tr></tbody></table></div><h3><a name="valuePush" id="valuePush"></a>Function: valuePush</h3><pre class="programlisting">int valuePush (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br />
+</pre><p>Pushes a new XPath object on top of the value stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath evaluation context</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the XPath object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of items on the value stack</td></tr></tbody></table></div><h3><a name="xmlXPathAddValues" id="xmlXPathAddValues"></a>Function: xmlXPathAddValues</h3><pre class="programlisting">void xmlXPathAddValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathBooleanFunction" id="xmlXPathBooleanFunction"></a>Function: xmlXPathBooleanFunction</h3><pre class="programlisting">void xmlXPathBooleanFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the boolean() XPath function boolean boolean(object) The boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathCeilingFunction" id="xmlXPathCeilingFunction"></a>Function: xmlXPathCeilingFunction</h3><pre class="programlisting">void xmlXPathCeilingFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathCompareValues" id="xmlXPathCompareValues"></a>Function: xmlXPathCompareValues</h3><pre class="programlisting">int xmlXPathCompareValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int inf, <br /> int strict)<br />
+</pre><p>Implement the compare operation on XPath objects: @arg1 &lt; @arg2 (1, 1, ... @arg1 &lt;= @arg2 (1, 0, ... @arg1 &gt; @arg2 (0, 1, ... @arg1 &gt;= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is &lt;=, &lt;, &gt;=, &gt;, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The &lt; comparison will be true if and only if the first number is less than the second number. The &lt;= comparison will be true if and only if the first number is less than or equal to the second number. The &gt; comparison will be true if and only if the first number is greater than the second number. The &gt;= comparison will be true if and only if the first number is greater than or equal to the second number.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>inf</tt></i>:</span></td><td>less than (1) or greater than (0)</td></tr><tr><td><span class="term"><i><tt>strict</tt></i>:</span></td><td>is the comparison strict</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the comparison succeeded, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlXPathConcatFunction" id="xmlXPathConcatFunction"></a>Function: xmlXPathConcatFunction</h3><pre class="programlisting">void xmlXPathConcatFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathContainsFunction" id="xmlXPathContainsFunction"></a>Function: xmlXPathContainsFunction</h3><pre class="programlisting">void xmlXPathContainsFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathCountFunction" id="xmlXPathCountFunction"></a>Function: xmlXPathCountFunction</h3><pre class="programlisting">void xmlXPathCountFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the count() XPath function number count(node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathDebugDumpCompExpr" id="xmlXPathDebugDumpCompExpr"></a>Function: xmlXPathDebugDumpCompExpr</h3><pre class="programlisting">void xmlXPathDebugDumpCompExpr (FILE * output, <br /> <a href="libxml-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> comp, <br /> int depth)<br />
+</pre><p>Dumps the tree of the compiled XPath expression.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * for the output</td></tr><tr><td><span class="term"><i><tt>comp</tt></i>:</span></td><td>the precompiled XPath expression</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>the indentation level.</td></tr></tbody></table></div><h3><a name="xmlXPathDebugDumpObject" id="xmlXPathDebugDumpObject"></a>Function: xmlXPathDebugDumpObject</h3><pre class="programlisting">void xmlXPathDebugDumpObject (FILE * output, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur, <br /> int depth)<br />
+</pre><p>Dump the content of the object for debugging purposes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>output</tt></i>:</span></td><td>the FILE * to dump the output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the object to inspect</td></tr><tr><td><span class="term"><i><tt>depth</tt></i>:</span></td><td>indentation level</td></tr></tbody></table></div><h3><a name="xmlXPathDifference" id="xmlXPathDifference"></a>Function: xmlXPathDifference</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDifference (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the difference between the two node sets, or nodes1 if nodes2 is empty</td></tr></tbody></table></div><h3><a name="xmlXPathDistinct" id="xmlXPathDistinct"></a>Function: xmlXPathDistinct</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDistinct (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)<br />
+</pre><p>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a subset of the nodes contained in @nodes, or @nodes if it is empty</td></tr></tbody></table></div><h3><a name="xmlXPathDistinctSorted" id="xmlXPathDistinctSorted"></a>Function: xmlXPathDistinctSorted</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathDistinctSorted (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes)<br />
+</pre><p>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a subset of the nodes contained in @nodes, or @nodes if it is empty</td></tr></tbody></table></div><h3><a name="xmlXPathDivValues" id="xmlXPathDivValues"></a>Function: xmlXPathDivValues</h3><pre class="programlisting">void xmlXPathDivValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the div operation on XPath objects @arg1 / @arg2: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathEqualValues" id="xmlXPathEqualValues"></a>Function: xmlXPathEqualValues</h3><pre class="programlisting">int xmlXPathEqualValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the equal operation on XPath objects content: @arg1 == @arg2</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the results of the test.</td></tr></tbody></table></div><h3><a name="xmlXPathErr" id="xmlXPathErr"></a>Function: xmlXPathErr</h3><pre class="programlisting">void xmlXPathErr (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int error)<br />
+</pre><p>Handle an XPath error</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XPath parser context</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error code</td></tr></tbody></table></div><h3><a name="xmlXPathEvalExpr" id="xmlXPathEvalExpr"></a>Function: xmlXPathEvalExpr</h3><pre class="programlisting">void xmlXPathEvalExpr (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Parse and evaluate an XPath expression in the given context, then push the result on the context stack</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathEvaluatePredicateResult" id="xmlXPathEvaluatePredicateResult"></a>Function: xmlXPathEvaluatePredicateResult</h3><pre class="programlisting">int xmlXPathEvaluatePredicateResult (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> res)<br />
+</pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathFalseFunction" id="xmlXPathFalseFunction"></a>Function: xmlXPathFalseFunction</h3><pre class="programlisting">void xmlXPathFalseFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the false() XPath function boolean false()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathFloorFunction" id="xmlXPathFloorFunction"></a>Function: xmlXPathFloorFunction</h3><pre class="programlisting">void xmlXPathFloorFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathFreeParserContext" id="xmlXPathFreeParserContext"></a>Function: xmlXPathFreeParserContext</h3><pre class="programlisting">void xmlXPathFreeParserContext (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Free up an <a href="libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div><h3><a name="xmlXPathFunctionLookup" id="xmlXPathFunctionLookup"></a>Function: xmlXPathFunctionLookup</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFunctionLookup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search in the Function array of the context for the given function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlXPathFunctionLookupNS" id="xmlXPathFunctionLookupNS"></a>Function: xmlXPathFunctionLookupNS</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> xmlXPathFunctionLookupNS (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br />
+</pre><p>Search in the Function array of the context for the given function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the function namespace URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlXPathHasSameNodes" id="xmlXPathHasSameNodes"></a>Function: xmlXPathHasSameNodes</h3><pre class="programlisting">int xmlXPathHasSameNodes (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true (1) if @nodes1 shares any node with @nodes2, false (0) otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathIdFunction" id="xmlXPathIdFunction"></a>Function: xmlXPathIdFunction</h3><pre class="programlisting">void xmlXPathIdFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of <a href="libxml-SAX.html#characters">characters</a> matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathIntersection" id="xmlXPathIntersection"></a>Function: xmlXPathIntersection</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathIntersection (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a node set comprising the nodes that are within both the node sets passed as arguments</td></tr></tbody></table></div><h3><a name="xmlXPathIsNodeType" id="xmlXPathIsNodeType"></a>Function: xmlXPathIsNodeType</h3><pre class="programlisting">int xmlXPathIsNodeType (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Is the name given a NodeType one. [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>a name string</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if true 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathLangFunction" id="xmlXPathLangFunction"></a>Function: xmlXPathLangFunction</h3><pre class="programlisting">void xmlXPathLangFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang <a href="libxml-SAX.html#attribute">attribute</a> on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang <a href="libxml-SAX.html#attribute">attribute</a> on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathLastFunction" id="xmlXPathLastFunction"></a>Function: xmlXPathLastFunction</h3><pre class="programlisting">void xmlXPathLastFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the last() XPath function number last() The last function returns the number of nodes in the context node list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathLeading" id="xmlXPathLeading"></a>Function: xmlXPathLeading</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathLeading (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div><h3><a name="xmlXPathLeadingSorted" id="xmlXPathLeadingSorted"></a>Function: xmlXPathLeadingSorted</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathLeadingSorted (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div><h3><a name="xmlXPathLocalNameFunction" id="xmlXPathLocalNameFunction"></a>Function: xmlXPathLocalNameFunction</h3><pre class="programlisting">void xmlXPathLocalNameFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathModValues" id="xmlXPathModValues"></a>Function: xmlXPathModValues</h3><pre class="programlisting">void xmlXPathModValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the mod operation on XPath objects: @arg1 / @arg2 The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathMultValues" id="xmlXPathMultValues"></a>Function: xmlXPathMultValues</h3><pre class="programlisting">void xmlXPathMultValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathNamespaceURIFunction" id="xmlXPathNamespaceURIFunction"></a>Function: xmlXPathNamespaceURIFunction</h3><pre class="programlisting">void xmlXPathNamespaceURIFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathNewBoolean" id="xmlXPathNewBoolean"></a>Function: xmlXPathNewBoolean</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewBoolean (int val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type boolean and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the boolean value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewCString" id="xmlXPathNewCString"></a>Function: xmlXPathNewCString</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewCString (const char * val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type string and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewFloat" id="xmlXPathNewFloat"></a>Function: xmlXPathNewFloat</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewFloat (double val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the double value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewNodeSet" id="xmlXPathNewNodeSet"></a>Function: xmlXPathNewNodeSet</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewNodeSet (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type NodeSet and initialize it with the single Node @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewNodeSetList" id="xmlXPathNewNodeSetList"></a>Function: xmlXPathNewNodeSetList</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewNodeSetList (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type NodeSet and initialize it with the Nodeset @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an existing NodeSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewParserContext" id="xmlXPathNewParserContext"></a>Function: xmlXPathNewParserContext</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> xmlXPathNewParserContext (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathParserContext">xmlXPathParserContext</a> just allocated.</td></tr></tbody></table></div><h3><a name="xmlXPathNewString" id="xmlXPathNewString"></a>Function: xmlXPathNewString</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewString (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type string and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNewValueTree" id="xmlXPathNewValueTree"></a>Function: xmlXPathNewValueTree</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathNewValueTree (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type Value Tree (XSLT) and initialize it with the tree root @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathNextAncestor" id="xmlXPathNextAncestor"></a>Function: xmlXPathNextAncestor</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAncestor (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextAncestorOrSelf" id="xmlXPathNextAncestorOrSelf"></a>Function: xmlXPathNextAncestorOrSelf</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAncestorOrSelf (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextAttribute" id="xmlXPathNextAttribute"></a>Function: xmlXPathNextAttribute</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextAttribute (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "attribute" direction TODO: support DTD inherited default attributes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current <a href="libxml-SAX.html#attribute">attribute</a> in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextChild" id="xmlXPathNextChild"></a>Function: xmlXPathNextChild</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextChild (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "child" direction The child axis contains the children of the context node in document order.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextDescendant" id="xmlXPathNextDescendant"></a>Function: xmlXPathNextDescendant</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextDescendant (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextDescendantOrSelf" id="xmlXPathNextDescendantOrSelf"></a>Function: xmlXPathNextDescendantOrSelf</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextDescendantOrSelf (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextFollowing" id="xmlXPathNextFollowing"></a>Function: xmlXPathNextFollowing</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextFollowing (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding <a href="libxml-SAX.html#attribute">attribute</a> nodes and namespace nodes; the nodes are ordered in document order</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextFollowingSibling" id="xmlXPathNextFollowingSibling"></a>Function: xmlXPathNextFollowingSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextFollowingSibling (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextNamespace" id="xmlXPathNextNamespace"></a>Function: xmlXPathNextNamespace</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextNamespace (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current <a href="libxml-SAX.html#attribute">attribute</a> in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextParent" id="xmlXPathNextParent"></a>Function: xmlXPathNextParent</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextParent (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextPreceding" id="xmlXPathNextPreceding"></a>Function: xmlXPathNextPreceding</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextPreceding (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding <a href="libxml-SAX.html#attribute">attribute</a> nodes and namespace nodes; the nodes are ordered in reverse document order</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextPrecedingSibling" id="xmlXPathNextPrecedingSibling"></a>Function: xmlXPathNextPrecedingSibling</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextPrecedingSibling (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNextSelf" id="xmlXPathNextSelf"></a>Function: xmlXPathNextSelf</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPathNextSelf (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br />
+</pre><p>Traversal function for the "self" direction The self axis contains just the context node itself</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node in the traversal</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the next element following that axis</td></tr></tbody></table></div><h3><a name="xmlXPathNodeLeading" id="xmlXPathNodeLeading"></a>Function: xmlXPathNodeLeading</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeLeading (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div><h3><a name="xmlXPathNodeLeadingSorted" id="xmlXPathNodeLeadingSorted"></a>Function: xmlXPathNodeLeadingSorted</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeLeadingSorted (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetAdd" id="xmlXPathNodeSetAdd"></a>Function: xmlXPathNodeSetAdd</h3><pre class="programlisting">int xmlXPathNodeSetAdd (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>add a new <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> to an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetAddNs" id="xmlXPathNodeSetAddNs"></a>Function: xmlXPathNodeSetAddNs</h3><pre class="programlisting">int xmlXPathNodeSetAddNs (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> <a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br />
+</pre><p>add a new namespace node to an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the hosting node</td></tr><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>a the namespace node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetAddUnique" id="xmlXPathNodeSetAddUnique"></a>Function: xmlXPathNodeSetAddUnique</h3><pre class="programlisting">int xmlXPathNodeSetAddUnique (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>add a new <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> to an existing NodeSet, optimized version when we are sure the node is not already in the set.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetContains" id="xmlXPathNodeSetContains"></a>Function: xmlXPathNodeSetContains</h3><pre class="programlisting">int xmlXPathNodeSetContains (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>checks whether @cur contains @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the node-set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true (1) if @cur contains @val, false (0) otherwise</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetDel" id="xmlXPathNodeSetDel"></a>Function: xmlXPathNodeSetDel</h3><pre class="programlisting">void xmlXPathNodeSetDel (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> val)<br />
+</pre><p>Removes an <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> from an existing NodeSet</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a></td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetFreeNs" id="xmlXPathNodeSetFreeNs"></a>Function: xmlXPathNodeSetFreeNs</h3><pre class="programlisting">void xmlXPathNodeSetFreeNs (<a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br />
+</pre><p>Namespace nodes in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ns</tt></i>:</span></td><td>the XPath namespace node found in a nodeset.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetMerge" id="xmlXPathNodeSetMerge"></a>Function: xmlXPathNodeSetMerge</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeSetMerge (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val2)<br />
+</pre><p>Merges two nodesets, all nodes from @val2 are added to @val1 if @val1 is NULL, a new set is created and copied from @val2</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val1</tt></i>:</span></td><td>the first NodeSet or NULL</td></tr><tr><td><span class="term"><i><tt>val2</tt></i>:</span></td><td>the second NodeSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>@val1 once extended or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetRemove" id="xmlXPathNodeSetRemove"></a>Function: xmlXPathNodeSetRemove</h3><pre class="programlisting">void xmlXPathNodeSetRemove (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> cur, <br /> int val)<br />
+</pre><p>Removes an entry from an existing NodeSet list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial node set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the index to remove</td></tr></tbody></table></div><h3><a name="xmlXPathNodeSetSort" id="xmlXPathNodeSetSort"></a>Function: xmlXPathNodeSetSort</h3><pre class="programlisting">void xmlXPathNodeSetSort (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)<br />
+</pre><p>Sort the node set in document order</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>set</tt></i>:</span></td><td>the node set</td></tr></tbody></table></div><h3><a name="xmlXPathNodeTrailing" id="xmlXPathNodeTrailing"></a>Function: xmlXPathNodeTrailing</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeTrailing (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div><h3><a name="xmlXPathNodeTrailingSorted" id="xmlXPathNodeTrailingSorted"></a>Function: xmlXPathNodeTrailingSorted</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathNodeTrailingSorted (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br />
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn't contain @node</td></tr></tbody></table></div><h3><a name="xmlXPathNormalizeFunction" id="xmlXPathNormalizeFunction"></a>Function: xmlXPathNormalizeFunction</h3><pre class="programlisting">void xmlXPathNormalizeFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace <a href="libxml-SAX.html#characters">characters</a> by a single space. Whitespace <a href="libxml-SAX.html#characters">characters</a> are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathNotEqualValues" id="xmlXPathNotEqualValues"></a>Function: xmlXPathNotEqualValues</h3><pre class="programlisting">int xmlXPathNotEqualValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the equal operation on XPath objects content: @arg1 == @arg2</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 or 1 depending on the results of the test.</td></tr></tbody></table></div><h3><a name="xmlXPathNotFunction" id="xmlXPathNotFunction"></a>Function: xmlXPathNotFunction</h3><pre class="programlisting">void xmlXPathNotFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathNsLookup" id="xmlXPathNsLookup"></a>Function: xmlXPathNsLookup</h3><pre class="programlisting">const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathNsLookup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br />
+</pre><p>Search in the namespace declaration array of the context for the given namespace name associated to the given prefix</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlXPathNumberFunction" id="xmlXPathNumberFunction"></a>Function: xmlXPathNumberFunction</h3><pre class="programlisting">void xmlXPathNumberFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the number() XPath function number number(object?)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathParseNCName" id="xmlXPathParseNCName"></a>Function: xmlXPathParseNCName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathParseNCName (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div><h3><a name="xmlXPathParseName" id="xmlXPathParseName"></a>Function: xmlXPathParseName</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathParseName (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>parse an XML name [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)*</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace name or NULL</td></tr></tbody></table></div><h3><a name="xmlXPathPopBoolean" id="xmlXPathPopBoolean"></a>Function: xmlXPathPopBoolean</h3><pre class="programlisting">int xmlXPathPopBoolean (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the boolean</td></tr></tbody></table></div><h3><a name="xmlXPathPopExternal" id="xmlXPathPopExternal"></a>Function: xmlXPathPopExternal</h3><pre class="programlisting">void * xmlXPathPopExternal (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops an external object from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the object</td></tr></tbody></table></div><h3><a name="xmlXPathPopNodeSet" id="xmlXPathPopNodeSet"></a>Function: xmlXPathPopNodeSet</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathPopNodeSet (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the node-set</td></tr></tbody></table></div><h3><a name="xmlXPathPopNumber" id="xmlXPathPopNumber"></a>Function: xmlXPathPopNumber</h3><pre class="programlisting">double xmlXPathPopNumber (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number</td></tr></tbody></table></div><h3><a name="xmlXPathPopString" id="xmlXPathPopString"></a>Function: xmlXPathPopString</h3><pre class="programlisting"><a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * xmlXPathPopString (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Pops a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the string</td></tr></tbody></table></div><h3><a name="xmlXPathPositionFunction" id="xmlXPathPositionFunction"></a>Function: xmlXPathPositionFunction</h3><pre class="programlisting">void xmlXPathPositionFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last position will be equal to last().</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterAllFunctions" id="xmlXPathRegisterAllFunctions"></a>Function: xmlXPathRegisterAllFunctions</h3><pre class="programlisting">void xmlXPathRegisterAllFunctions (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Registers all default XPath functions in this context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterFunc" id="xmlXPathRegisterFunc"></a>Function: xmlXPathRegisterFunc</h3><pre class="programlisting">int xmlXPathRegisterFunc (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)<br />
+</pre><p>Register a new function. If @f is NULL it unregisters the function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the function implementation or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterFuncLookup" id="xmlXPathRegisterFuncLookup"></a>Function: xmlXPathRegisterFuncLookup</h3><pre class="programlisting">void xmlXPathRegisterFuncLookup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathFuncLookupFunc">xmlXPathFuncLookupFunc</a> f, <br /> void * funcCtxt)<br />
+</pre><p>Registers an external mechanism to do function lookup.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the lookup function</td></tr><tr><td><span class="term"><i><tt>funcCtxt</tt></i>:</span></td><td>the lookup data</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterFuncNS" id="xmlXPathRegisterFuncNS"></a>Function: xmlXPathRegisterFuncNS</h3><pre class="programlisting">int xmlXPathRegisterFuncNS (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br /> <a href="libxml-xpath.html#xmlXPathFunction">xmlXPathFunction</a> f)<br />
+</pre><p>Register a new function. If @f is NULL it unregisters the function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the function name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the function namespace URI</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the function implementation or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterNs" id="xmlXPathRegisterNs"></a>Function: xmlXPathRegisterNs</h3><pre class="programlisting">int xmlXPathRegisterNs (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br />
+</pre><p>Register a new namespace. If @ns_uri is NULL it unregisters the namespace</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>prefix</tt></i>:</span></td><td>the namespace prefix cannot be NULL or empty string</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterVariable" id="xmlXPathRegisterVariable"></a>Function: xmlXPathRegisterVariable</h3><pre class="programlisting">int xmlXPathRegisterVariable (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br />
+</pre><p>Register a new variable value. If @value is NULL it unregisters the variable</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the variable value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterVariableLookup" id="xmlXPathRegisterVariableLookup"></a>Function: xmlXPathRegisterVariableLookup</h3><pre class="programlisting">void xmlXPathRegisterVariableLookup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> <a href="libxml-xpath.html#xmlXPathVariableLookupFunc">xmlXPathVariableLookupFunc</a> f, <br /> void * data)<br />
+</pre><p>register an external mechanism to do variable lookup</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the lookup function</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>the lookup data</td></tr></tbody></table></div><h3><a name="xmlXPathRegisterVariableNS" id="xmlXPathRegisterVariableNS"></a>Function: xmlXPathRegisterVariableNS</h3><pre class="programlisting">int xmlXPathRegisterVariableNS (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> value)<br />
+</pre><p>Register a new variable value. If @value is NULL it unregisters the variable</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the variable namespace URI</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>the variable value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlXPathRegisteredFuncsCleanup" id="xmlXPathRegisteredFuncsCleanup"></a>Function: xmlXPathRegisteredFuncsCleanup</h3><pre class="programlisting">void xmlXPathRegisteredFuncsCleanup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Cleanup the XPath context data associated to registered functions</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div><h3><a name="xmlXPathRegisteredNsCleanup" id="xmlXPathRegisteredNsCleanup"></a>Function: xmlXPathRegisteredNsCleanup</h3><pre class="programlisting">void xmlXPathRegisteredNsCleanup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Cleanup the XPath context data associated to registered variables</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div><h3><a name="xmlXPathRegisteredVariablesCleanup" id="xmlXPathRegisteredVariablesCleanup"></a>Function: xmlXPathRegisteredVariablesCleanup</h3><pre class="programlisting">void xmlXPathRegisteredVariablesCleanup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt)<br />
+</pre><p>Cleanup the XPath context data associated to registered variables</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr></tbody></table></div><h3><a name="xmlXPathRoot" id="xmlXPathRoot"></a>Function: xmlXPathRoot</h3><pre class="programlisting">void xmlXPathRoot (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Initialize the context to the root of the document</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathRoundFunction" id="xmlXPathRoundFunction"></a>Function: xmlXPathRoundFunction</h3><pre class="programlisting">void xmlXPathRoundFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is even is returned.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathStartsWithFunction" id="xmlXPathStartsWithFunction"></a>Function: xmlXPathStartsWithFunction</h3><pre class="programlisting">void xmlXPathStartsWithFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathStringEvalNumber" id="xmlXPathStringEvalNumber"></a>Function: xmlXPathStringEvalNumber</h3><pre class="programlisting">double xmlXPathStringEvalNumber (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str)<br />
+</pre><p>[30a] Float ::= Number ('e' Digits?)? [30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>A string to scan</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the double value.</td></tr></tbody></table></div><h3><a name="xmlXPathStringFunction" id="xmlXPathStringFunction"></a>Function: xmlXPathStringFunction</h3><pre class="programlisting">void xmlXPathStringFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the string() XPath function string string(object?) The string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathStringLengthFunction" id="xmlXPathStringLengthFunction"></a>Function: xmlXPathStringLengthFunction</h3><pre class="programlisting">void xmlXPathStringLengthFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the string-length() XPath function number string-length(string?) The string-length returns the number of <a href="libxml-SAX.html#characters">characters</a> in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathSubValues" id="xmlXPathSubValues"></a>Function: xmlXPathSubValues</h3><pre class="programlisting">void xmlXPathSubValues (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathSubstringAfterFunction" id="xmlXPathSubstringAfterFunction"></a>Function: xmlXPathSubstringAfterFunction</h3><pre class="programlisting">void xmlXPathSubstringAfterFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathSubstringBeforeFunction" id="xmlXPathSubstringBeforeFunction"></a>Function: xmlXPathSubstringBeforeFunction</h3><pre class="programlisting">void xmlXPathSubstringBeforeFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before("1999/04/01","/") returns 1999.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathSubstringFunction" id="xmlXPathSubstringFunction"></a>Function: xmlXPathSubstringFunction</h3><pre class="programlisting">void xmlXPathSubstringFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those <a href="libxml-SAX.html#characters">characters</a> for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns ""</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathSumFunction" id="xmlXPathSumFunction"></a>Function: xmlXPathSumFunction</h3><pre class="programlisting">void xmlXPathSumFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathTrailing" id="xmlXPathTrailing"></a>Function: xmlXPathTrailing</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathTrailing (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div><h3><a name="xmlXPathTrailingSorted" id="xmlXPathTrailingSorted"></a>Function: xmlXPathTrailingSorted</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> xmlXPathTrailingSorted (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes1, <br /> <a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> nodes2)<br />
+</pre><p>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>nodes1</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>nodes2</tt></i>:</span></td><td>a node-set, sorted by document order</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn't contain @nodes2</td></tr></tbody></table></div><h3><a name="xmlXPathTranslateFunction" id="xmlXPathTranslateFunction"></a>Function: xmlXPathTranslateFunction</h3><pre class="programlisting">void xmlXPathTranslateFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of <a href="libxml-SAX.html#characters">characters</a> in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate("--aaa--","abc-","ABC")</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathTrueFunction" id="xmlXPathTrueFunction"></a>Function: xmlXPathTrueFunction</h3><pre class="programlisting">void xmlXPathTrueFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the true() XPath function boolean true()</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div><h3><a name="xmlXPathValueFlipSign" id="xmlXPathValueFlipSign"></a>Function: xmlXPathValueFlipSign</h3><pre class="programlisting">void xmlXPathValueFlipSign (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr></tbody></table></div><h3><a name="xmlXPathVariableLookup" id="xmlXPathVariableLookup"></a>Function: xmlXPathVariableLookup</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookup (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name)<br />
+</pre><p>Search in the Variable array of the context for the given variable value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a copy of the value or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlXPathVariableLookupNS" id="xmlXPathVariableLookupNS"></a>Function: xmlXPathVariableLookupNS</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathVariableLookupNS (<a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * name, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * ns_uri)<br />
+</pre><p>Search in the Variable array of the context for the given variable value.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the variable name</td></tr><tr><td><span class="term"><i><tt>ns_uri</tt></i>:</span></td><td>the variable namespace URI</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the a copy of the value or NULL if not found</td></tr></tbody></table></div><h3><a name="xmlXPathWrapCString" id="xmlXPathWrapCString"></a>Function: xmlXPathWrapCString</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapCString (char * val)<br />
+</pre><p>Wraps a string into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the char * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathWrapExternal" id="xmlXPathWrapExternal"></a>Function: xmlXPathWrapExternal</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapExternal (void * val)<br />
+</pre><p>Wraps the @val data into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the user data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathWrapNodeSet" id="xmlXPathWrapNodeSet"></a>Function: xmlXPathWrapNodeSet</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapNodeSet (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> val)<br />
+</pre><p>Wrap the Nodeset @val in a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the NodePtr value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPathWrapString" id="xmlXPathWrapString"></a>Function: xmlXPathWrapString</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathWrapString (<a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * val)<br />
+</pre><p>Wraps the @val string into an XPath object.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPatherror" id="xmlXPatherror"></a>Function: xmlXPatherror</h3><pre class="programlisting">void xmlXPatherror (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> const char * file, <br /> int line, <br /> int no)<br />
+</pre><p>Formats an error message.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath Parser context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>the file name</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>the line number</td></tr><tr><td><span class="term"><i><tt>no</tt></i>:</span></td><td>the error number</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xpointer.html b/doc/html/libxml-xpointer.html
new file mode 100644
index 0000000..45526de
--- /dev/null
+++ b/doc/html/libxml-xpointer.html
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xpointer from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xpointer from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xpathInternals.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xpathInternals.html">xpathInternals</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th></tr></table><p>API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000</p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#xmlLocationSet">xmlLocationSet</a><br />struct _xmlLocationSet
+</pre><pre class="programlisting">Typedef <a href="libxml-xpointer.html#xmlLocationSet">xmlLocationSet</a> * <a name="xmlLocationSetPtr" id="xmlLocationSetPtr">xmlLocationSetPtr</a>
+</pre><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlXPtrBuildNodeList">xmlXPtrBuildNodeList</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrEval">xmlXPtrEval</a> (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrEvalRangePredicate">xmlXPtrEvalRangePredicate</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrFreeLocationSet">xmlXPtrFreeLocationSet</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> obj)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrLocationSetAdd">xmlXPtrLocationSetAdd</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> <a href="#xmlXPtrLocationSetCreate">xmlXPtrLocationSetCreate</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrLocationSetDel">xmlXPtrLocationSetDel</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)</pre>
+<pre class="programlisting"><a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> <a href="#xmlXPtrLocationSetMerge">xmlXPtrLocationSetMerge</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val1, <br /> <a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val2)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrLocationSetRemove">xmlXPtrLocationSetRemove</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> int val)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewCollapsedRange">xmlXPtrNewCollapsedRange</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> <a href="#xmlXPtrNewContext">xmlXPtrNewContext</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> here, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> origin)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewLocationSetNodeSet">xmlXPtrNewLocationSetNodeSet</a> (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewLocationSetNodes">xmlXPtrNewLocationSetNodes</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRange">xmlXPtrNewRange</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> int startindex, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end, <br /> int endindex)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodeObject">xmlXPtrNewRangeNodeObject</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodePoint">xmlXPtrNewRangeNodePoint</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangeNodes">xmlXPtrNewRangeNodes</a> (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangePointNode">xmlXPtrNewRangePointNode</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrNewRangePoints">xmlXPtrNewRangePoints</a> (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)</pre>
+<pre class="programlisting">void <a href="#xmlXPtrRangeToFunction">xmlXPtrRangeToFunction</a> (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)</pre>
+<pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> <a href="#xmlXPtrWrapLocationSet">xmlXPtrWrapLocationSet</a> (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val)</pre>
+<h2>Description</h2>
+<h3><a name="xmlLocationSet" id="xmlLocationSet">Structure xmlLocationSet</a></h3><pre class="programlisting">Structure xmlLocationSet<br />struct _xmlLocationSet {
+ int locNr : number of locations in the set
+ int locMax : size of the array as allocated
+ <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> * locTab : array of locations
+}</pre><h3><a name="xmlXPtrBuildNodeList" id="xmlXPtrBuildNodeList"></a>Function: xmlXPtrBuildNodeList</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> xmlXPtrBuildNodeList (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj)<br />
+</pre><p>Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the XPointer result from the evaluation.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> list or NULL. the caller has to free the node tree.</td></tr></tbody></table></div><h3><a name="xmlXPtrEval" id="xmlXPtrEval"></a>Function: xmlXPtrEval</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrEval (const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * str, <br /> <a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctx)<br />
+</pre><p>Evaluate the XPath Location Path in the given context.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>str</tt></i>:</span></td><td>the XPointer expression</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the XPointer context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div><h3><a name="xmlXPtrEvalRangePredicate" id="xmlXPtrEvalRangePredicate"></a>Function: xmlXPtrEvalRangePredicate</h3><pre class="programlisting">void xmlXPtrEvalRangePredicate (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt)<br />
+</pre><p>[8] Predicate ::= '[' PredicateExpr ']' [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPointer Parser context</td></tr></tbody></table></div><h3><a name="xmlXPtrFreeLocationSet" id="xmlXPtrFreeLocationSet"></a>Function: xmlXPtrFreeLocationSet</h3><pre class="programlisting">void xmlXPtrFreeLocationSet (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> obj)<br />
+</pre><p>Free the LocationSet compound (not the actual ranges !).</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>obj</tt></i>:</span></td><td>the <a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> to free</td></tr></tbody></table></div><h3><a name="xmlXPtrLocationSetAdd" id="xmlXPtrLocationSetAdd"></a>Function: xmlXPtrLocationSetAdd</h3><pre class="programlisting">void xmlXPtrLocationSetAdd (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>add a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> to an existing LocationSet If the location already exist in the set @val is freed.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></td></tr></tbody></table></div><h3><a name="xmlXPtrLocationSetCreate" id="xmlXPtrLocationSetCreate"></a>Function: xmlXPtrLocationSetCreate</h3><pre class="programlisting"><a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> xmlXPtrLocationSetCreate (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Create a new <a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> of type double and of value @val</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlXPathObjectPtr, or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrLocationSetDel" id="xmlXPtrLocationSetDel"></a>Function: xmlXPtrLocationSetDel</h3><pre class="programlisting">void xmlXPtrLocationSetDel (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> val)<br />
+</pre><p>Removes an <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> from an existing LocationSet</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>an <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></td></tr></tbody></table></div><h3><a name="xmlXPtrLocationSetMerge" id="xmlXPtrLocationSetMerge"></a>Function: xmlXPtrLocationSetMerge</h3><pre class="programlisting"><a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> xmlXPtrLocationSetMerge (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val1, <br /> <a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val2)<br />
+</pre><p>Merges two rangesets, all ranges from @val2 are added to @val1</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val1</tt></i>:</span></td><td>the first LocationSet</td></tr><tr><td><span class="term"><i><tt>val2</tt></i>:</span></td><td>the second LocationSet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>val1 once extended or NULL in case of error.</td></tr></tbody></table></div><h3><a name="xmlXPtrLocationSetRemove" id="xmlXPtrLocationSetRemove"></a>Function: xmlXPtrLocationSetRemove</h3><pre class="programlisting">void xmlXPtrLocationSetRemove (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> cur, <br /> int val)<br />
+</pre><p>Removes an entry from an existing LocationSet list.</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the initial range set</td></tr><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the index to remove</td></tr></tbody></table></div><h3><a name="xmlXPtrNewCollapsedRange" id="xmlXPtrNewCollapsedRange"></a>Function: xmlXPtrNewCollapsedRange</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewCollapsedRange (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using a single nodes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting and ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewContext" id="xmlXPtrNewContext"></a>Function: xmlXPtrNewContext</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> xmlXPtrNewContext (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> here, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> origin)<br />
+</pre><p>Create a new XPointer context</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><span class="term"><i><tt>here</tt></i>:</span></td><td>the node that directly contains the XPointer being evaluated or NULL</td></tr><tr><td><span class="term"><i><tt>origin</tt></i>:</span></td><td>the element from which a user or program initiated traversal of the link, or NULL.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libxml-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewLocationSetNodeSet" id="xmlXPtrNewLocationSetNodeSet"></a>Function: xmlXPtrNewLocationSetNodeSet</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewLocationSetNodeSet (<a href="libxml-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> set)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type LocationSet and initialize it with all the nodes from @set</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>set</tt></i>:</span></td><td>a node set</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewLocationSetNodes" id="xmlXPtrNewLocationSetNodes"></a>Function: xmlXPtrNewLocationSetNodes</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewLocationSetNodes (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type LocationSet and initialize it with the single range made of the two nodes @start and @end</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the start NodePtr value</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the end NodePtr value or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRange" id="xmlXPtrNewRange"></a>Function: xmlXPtrNewRange</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRange (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> int startindex, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end, <br /> int endindex)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>startindex</tt></i>:</span></td><td>the start index</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>endindex</tt></i>:</span></td><td>the ending index</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRangeNodeObject" id="xmlXPtrNewRangeNodeObject"></a>Function: xmlXPtrNewRangeNodeObject</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodeObject (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a not to an object</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRangeNodePoint" id="xmlXPtrNewRangeNodePoint"></a>Function: xmlXPtrNewRangeNodePoint</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodePoint (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a node to a point</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRangeNodes" id="xmlXPtrNewRangeNodes"></a>Function: xmlXPtrNewRangeNodes</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangeNodes (<a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using 2 nodes</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting node</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRangePointNode" id="xmlXPtrNewRangePointNode"></a>Function: xmlXPtrNewRangePointNode</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangePointNode (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range from a point to a node</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting point</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrNewRangePoints" id="xmlXPtrNewRangePoints"></a>Function: xmlXPtrNewRangePoints</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrNewRangePoints (<a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> start, <br /> <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> end)<br />
+</pre><p>Create a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> of type range using 2 Points</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>start</tt></i>:</span></td><td>the starting point</td></tr><tr><td><span class="term"><i><tt>end</tt></i>:</span></td><td>the ending point</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><h3><a name="xmlXPtrRangeToFunction" id="xmlXPtrRangeToFunction"></a>Function: xmlXPtrRangeToFunction</h3><pre class="programlisting">void xmlXPtrRangeToFunction (<a href="libxml-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br /> int nargs)<br />
+</pre><p>Implement the range-to() XPointer function</p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPointer Parser context</td></tr><tr><td><span class="term"><i><tt>nargs</tt></i>:</span></td><td>the number of args</td></tr></tbody></table></div><h3><a name="xmlXPtrWrapLocationSet" id="xmlXPtrWrapLocationSet"></a>Function: xmlXPtrWrapLocationSet</h3><pre class="programlisting"><a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPtrWrapLocationSet (<a href="libxml-xpointer.html#xmlLocationSetPtr">xmlLocationSetPtr</a> val)<br />
+</pre><p>Wrap the LocationSet @val in a new <a href="libxml-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a></p>
+<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>the LocationSet value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/libxml-xzlib.html b/doc/html/libxml-xzlib.html
new file mode 100644
index 0000000..c4dfdc3
--- /dev/null
+++ b/doc/html/libxml-xzlib.html
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style><title>Module xzlib from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="../epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="../gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="../w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module xzlib from libxml2</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="../docs.html">Developer Menu</a></li><li><a style="font-weight:bold" href="../examples/index.html">Code Examples</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="libxml-parser.html">Parser API</a></li><li><a href="libxml-tree.html">Tree API</a></li><li><a href="libxml-xmlreader.html">Reader API</a></li><li><a href="../guidelines.html">XML Guidelines</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-xpointer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libxml-xpointer.html">xpointer</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th></tr></table><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBXML2_XZLIB_H">LIBXML2_XZLIB_H</a></pre><pre class="programlisting">Typedef void * <a name="xzFile" id="xzFile">xzFile</a>
+</pre><h2>Description</h2>
+<h3><a name="LIBXML2_XZLIB_H" id="LIBXML2_XZLIB_H"></a>Macro: LIBXML2_XZLIB_H</h3><pre>#define LIBXML2_XZLIB_H</pre><p></p>
+<p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/html/right.png b/doc/html/right.png
new file mode 100644
index 0000000..92832e3
--- /dev/null
+++ b/doc/html/right.png
Binary files differ
diff --git a/doc/html/up.png b/doc/html/up.png
new file mode 100644
index 0000000..85b3e2a
--- /dev/null
+++ b/doc/html/up.png
Binary files differ
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..803b795
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style>
+ <title>The XML C parser and toolkit of Gnome</title>
+
+</head>
+<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>libxml</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p></p><p style="text-align: right; font-style: italic; font-size: 10pt">"Programming
+with libxml2 is like the thrilling embrace of an exotic stranger." <a href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
+Pilgrim</a></p><p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
+(but usable outside of the Gnome platform), it is free software available
+under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License</a>. XML itself is a metalanguage to design markup languages, i.e.
+text language where semantic and structure are added to the content using
+extra "markup" information enclosed between angle brackets. HTML is the most
+well-known markup language. Though the library is written in C <a href="python.html">a variety of language bindings</a> make it available in
+other environments.</p><p>Libxml2 is known to be very portable, the library should build and work
+without serious troubles on a variety of systems (Linux, Unix, Windows,
+CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)</p><p>Libxml2 implements a number of existing standards related to markup
+languages:</p><ul>
+ <li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
+ <li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
+ <li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
+ Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
+ <li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
+ <li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
+ <li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
+ <li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
+ <li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
+ and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
+ [UTF-16] Unicode encodings, and more if using iconv support</li>
+ <li>part of SGML Open Technical Resolution TR9401:1997</li>
+ <li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
+ <li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
+ and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
+ <li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
+ <li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+ 2001</a></li>
+ <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+ April 2004</li>
+</ul><p>In most cases libxml2 tries to implement the specifications in a
+relatively strictly compliant way. As of release 2.4.16, libxml2 passed all
+1800+ tests from the <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
+Suite</a>.</p><p>To some extent libxml2 provides support for the following additional
+specifications but doesn't claim to implement them completely:</p><ul>
+ <li>Document Object Model (DOM) <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
+ the document model, but it doesn't implement the API itself, gdome2 does
+ this on top of libxml2</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
+ libxml2 implements a basic FTP client code</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
+ HTTP/1.0, again a basic HTTP client code</li>
+ <li>SAX: a SAX2 like interface and a minimal SAX1 implementation compatible
+ with early expat versions</li>
+</ul><p>A partial implementation of <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
+1: Structure</a> is being worked on but it would be far too early to make any
+conformance statement about it at the moment.</p><p>Separate documents:</p><ul>
+ <li><a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an
+ implementation of XSLT 1.0 and common extensions like EXSLT for
+ libxml2</li>
+ <li><a href="http://gdome2.cs.unibo.it/">the gdome2 page</a>
+ : a standard DOM2 implementation for libxml2</li>
+ <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an
+ implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
+ Digital Signature</a> for libxml2</li>
+ <li>also check the related links section for more related and active
+ projects.</li>
+</ul><p> Hosting sponsored by <a href="http://www.aoemedia.de/opensource-cms.html">Open Source CMS services</a> from AOE media.</p><p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body>
+</html>
diff --git a/doc/index.py b/doc/index.py
new file mode 100755
index 0000000..578f288
--- /dev/null
+++ b/doc/index.py
@@ -0,0 +1,1258 @@
+#!/usr/bin/python -u
+#
+# imports the API description and fills up a database with
+# name relevance to modules, functions or web pages
+#
+# Operation needed:
+# =================
+#
+# install mysqld, the python wrappers for mysql and libxml2, start mysqld
+# Change the root passwd of mysql:
+# mysqladmin -u root password new_password
+# Create the new database xmlsoft
+# mysqladmin -p create xmlsoft
+# Create a database user 'veillard' and give him passord access
+# change veillard and abcde with the right user name and passwd
+# mysql -p
+# password:
+# mysql> GRANT ALL PRIVILEGES ON xmlsoft TO veillard@localhost
+# IDENTIFIED BY 'abcde' WITH GRANT OPTION;
+#
+# As the user check the access:
+# mysql -p xmlsoft
+# Enter password:
+# Welcome to the MySQL monitor....
+# mysql> use xmlsoft
+# Database changed
+# mysql> quit
+# Bye
+#
+# Then run the script in the doc subdir, it will create the symbols and
+# word tables and populate them with informations extracted from
+# the libxml2-api.xml API description, and make then accessible read-only
+# by nobody@loaclhost the user expected to be Apache's one
+#
+# On the Apache configuration, make sure you have php support enabled
+#
+
+import MySQLdb
+import libxml2
+import sys
+import string
+import os
+
+#
+# We are not interested in parsing errors here
+#
+def callback(ctx, str):
+ return
+libxml2.registerErrorHandler(callback, None)
+
+#
+# The dictionnary of tables required and the SQL command needed
+# to create them
+#
+TABLES={
+ "symbols" : """CREATE TABLE symbols (
+ name varchar(255) BINARY NOT NULL,
+ module varchar(255) BINARY NOT NULL,
+ type varchar(25) NOT NULL,
+ descr varchar(255),
+ UNIQUE KEY name (name),
+ KEY module (module))""",
+ "words" : """CREATE TABLE words (
+ name varchar(50) BINARY NOT NULL,
+ symbol varchar(255) BINARY NOT NULL,
+ relevance int,
+ KEY name (name),
+ KEY symbol (symbol),
+ UNIQUE KEY ID (name, symbol))""",
+ "wordsHTML" : """CREATE TABLE wordsHTML (
+ name varchar(50) BINARY NOT NULL,
+ resource varchar(255) BINARY NOT NULL,
+ section varchar(255),
+ id varchar(50),
+ relevance int,
+ KEY name (name),
+ KEY resource (resource),
+ UNIQUE KEY ref (name, resource))""",
+ "wordsArchive" : """CREATE TABLE wordsArchive (
+ name varchar(50) BINARY NOT NULL,
+ ID int(11) NOT NULL,
+ relevance int,
+ KEY name (name),
+ UNIQUE KEY ref (name, ID))""",
+ "pages" : """CREATE TABLE pages (
+ resource varchar(255) BINARY NOT NULL,
+ title varchar(255) BINARY NOT NULL,
+ UNIQUE KEY name (resource))""",
+ "archives" : """CREATE TABLE archives (
+ ID int(11) NOT NULL auto_increment,
+ resource varchar(255) BINARY NOT NULL,
+ title varchar(255) BINARY NOT NULL,
+ UNIQUE KEY id (ID,resource(255)),
+ INDEX (ID),
+ INDEX (resource))""",
+ "Queries" : """CREATE TABLE Queries (
+ ID int(11) NOT NULL auto_increment,
+ Value varchar(50) NOT NULL,
+ Count int(11) NOT NULL,
+ UNIQUE KEY id (ID,Value(35)),
+ INDEX (ID))""",
+ "AllQueries" : """CREATE TABLE AllQueries (
+ ID int(11) NOT NULL auto_increment,
+ Value varchar(50) NOT NULL,
+ Count int(11) NOT NULL,
+ UNIQUE KEY id (ID,Value(35)),
+ INDEX (ID))""",
+}
+
+#
+# The XML API description file to parse
+#
+API="libxml2-api.xml"
+DB=None
+
+#########################################################################
+# #
+# MySQL database interfaces #
+# #
+#########################################################################
+def createTable(db, name):
+ global TABLES
+
+ if db == None:
+ return -1
+ if name == None:
+ return -1
+ c = db.cursor()
+
+ ret = c.execute("DROP TABLE IF EXISTS %s" % (name))
+ if ret == 1:
+ print "Removed table %s" % (name)
+ print "Creating table %s" % (name)
+ try:
+ ret = c.execute(TABLES[name])
+ except:
+ print "Failed to create table %s" % (name)
+ return -1
+ return ret
+
+def checkTables(db, verbose = 1):
+ global TABLES
+
+ if db == None:
+ return -1
+ c = db.cursor()
+ nbtables = c.execute("show tables")
+ if verbose:
+ print "Found %d tables" % (nbtables)
+ tables = {}
+ i = 0
+ while i < nbtables:
+ l = c.fetchone()
+ name = l[0]
+ tables[name] = {}
+ i = i + 1
+
+ for table in TABLES.keys():
+ if not tables.has_key(table):
+ print "table %s missing" % (table)
+ createTable(db, table)
+ try:
+ ret = c.execute("SELECT count(*) from %s" % table);
+ row = c.fetchone()
+ if verbose:
+ print "Table %s contains %d records" % (table, row[0])
+ except:
+ print "Troubles with table %s : repairing" % (table)
+ ret = c.execute("repair table %s" % table);
+ print "repairing returned %d" % (ret)
+ ret = c.execute("SELECT count(*) from %s" % table);
+ row = c.fetchone()
+ print "Table %s contains %d records" % (table, row[0])
+ if verbose:
+ print "checkTables finished"
+
+ # make sure apache can access the tables read-only
+ try:
+ ret = c.execute("GRANT SELECT ON xmlsoft.* TO nobody@localhost")
+ ret = c.execute("GRANT INSERT,SELECT,UPDATE ON xmlsoft.Queries TO nobody@localhost")
+ except:
+ pass
+ return 0
+
+def openMySQL(db="xmlsoft", passwd=None, verbose = 1):
+ global DB
+
+ if passwd == None:
+ try:
+ passwd = os.environ["MySQL_PASS"]
+ except:
+ print "No password available, set environment MySQL_PASS"
+ sys.exit(1)
+
+ DB = MySQLdb.connect(passwd=passwd, db=db)
+ if DB == None:
+ return -1
+ ret = checkTables(DB, verbose)
+ return ret
+
+def updateWord(name, symbol, relevance):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if name == None:
+ return -1
+ if symbol == None:
+ return -1
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+"""INSERT INTO words (name, symbol, relevance) VALUES ('%s','%s', %d)""" %
+ (name, symbol, relevance))
+ except:
+ try:
+ ret = c.execute(
+ """UPDATE words SET relevance = %d where name = '%s' and symbol = '%s'""" %
+ (relevance, name, symbol))
+ except:
+ print "Update word (%s, %s, %s) failed command" % (name, symbol, relevance)
+ print "UPDATE words SET relevance = %d where name = '%s' and symbol = '%s'" % (relevance, name, symbol)
+ print sys.exc_type, sys.exc_value
+ return -1
+
+ return ret
+
+def updateSymbol(name, module, type, desc):
+ global DB
+
+ updateWord(name, name, 50)
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if name == None:
+ return -1
+ if module == None:
+ return -1
+ if type == None:
+ return -1
+
+ try:
+ desc = string.replace(desc, "'", " ")
+ l = string.split(desc, ".")
+ desc = l[0]
+ desc = desc[0:99]
+ except:
+ desc = ""
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+"""INSERT INTO symbols (name, module, type, descr) VALUES ('%s','%s', '%s', '%s')""" %
+ (name, module, type, desc))
+ except:
+ try:
+ ret = c.execute(
+"""UPDATE symbols SET module='%s', type='%s', descr='%s' where name='%s'""" %
+ (module, type, desc, name))
+ except:
+ print "Update symbol (%s, %s, %s) failed command" % (name, module, type)
+ print """UPDATE symbols SET module='%s', type='%s', descr='%s' where name='%s'""" % (module, type, desc, name)
+ print sys.exc_type, sys.exc_value
+ return -1
+
+ return ret
+
+def addFunction(name, module, desc = ""):
+ return updateSymbol(name, module, 'function', desc)
+
+def addMacro(name, module, desc = ""):
+ return updateSymbol(name, module, 'macro', desc)
+
+def addEnum(name, module, desc = ""):
+ return updateSymbol(name, module, 'enum', desc)
+
+def addStruct(name, module, desc = ""):
+ return updateSymbol(name, module, 'struct', desc)
+
+def addConst(name, module, desc = ""):
+ return updateSymbol(name, module, 'const', desc)
+
+def addType(name, module, desc = ""):
+ return updateSymbol(name, module, 'type', desc)
+
+def addFunctype(name, module, desc = ""):
+ return updateSymbol(name, module, 'functype', desc)
+
+def addPage(resource, title):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if resource == None:
+ return -1
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+ """INSERT INTO pages (resource, title) VALUES ('%s','%s')""" %
+ (resource, title))
+ except:
+ try:
+ ret = c.execute(
+ """UPDATE pages SET title='%s' WHERE resource='%s'""" %
+ (title, resource))
+ except:
+ print "Update symbol (%s, %s, %s) failed command" % (name, module, type)
+ print """UPDATE pages SET title='%s' WHERE resource='%s'""" % (title, resource)
+ print sys.exc_type, sys.exc_value
+ return -1
+
+ return ret
+
+def updateWordHTML(name, resource, desc, id, relevance):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if name == None:
+ return -1
+ if resource == None:
+ return -1
+ if id == None:
+ id = ""
+ if desc == None:
+ desc = ""
+ else:
+ try:
+ desc = string.replace(desc, "'", " ")
+ desc = desc[0:99]
+ except:
+ desc = ""
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+"""INSERT INTO wordsHTML (name, resource, section, id, relevance) VALUES ('%s','%s', '%s', '%s', '%d')""" %
+ (name, resource, desc, id, relevance))
+ except:
+ try:
+ ret = c.execute(
+"""UPDATE wordsHTML SET section='%s', id='%s', relevance='%d' where name='%s' and resource='%s'""" %
+ (desc, id, relevance, name, resource))
+ except:
+ print "Update symbol (%s, %s, %d) failed command" % (name, resource, relevance)
+ print """UPDATE wordsHTML SET section='%s', id='%s', relevance='%d' where name='%s' and resource='%s'""" % (desc, id, relevance, name, resource)
+ print sys.exc_type, sys.exc_value
+ return -1
+
+ return ret
+
+def checkXMLMsgArchive(url):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if url == None:
+ return -1
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+ """SELECT ID FROM archives WHERE resource='%s'""" % (url))
+ row = c.fetchone()
+ if row == None:
+ return -1
+ except:
+ return -1
+
+ return row[0]
+
+def addXMLMsgArchive(url, title):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if url == None:
+ return -1
+ if title == None:
+ title = ""
+ else:
+ title = string.replace(title, "'", " ")
+ title = title[0:99]
+
+ c = DB.cursor()
+ try:
+ cmd = """INSERT INTO archives (resource, title) VALUES ('%s','%s')""" % (url, title)
+ ret = c.execute(cmd)
+ cmd = """SELECT ID FROM archives WHERE resource='%s'""" % (url)
+ ret = c.execute(cmd)
+ row = c.fetchone()
+ if row == None:
+ print "addXMLMsgArchive failed to get the ID: %s" % (url)
+ return -1
+ except:
+ print "addXMLMsgArchive failed command: %s" % (cmd)
+ return -1
+
+ return((int)(row[0]))
+
+def updateWordArchive(name, id, relevance):
+ global DB
+
+ if DB == None:
+ openMySQL()
+ if DB == None:
+ return -1
+ if name == None:
+ return -1
+ if id == None:
+ return -1
+
+ c = DB.cursor()
+ try:
+ ret = c.execute(
+"""INSERT INTO wordsArchive (name, id, relevance) VALUES ('%s', '%d', '%d')""" %
+ (name, id, relevance))
+ except:
+ try:
+ ret = c.execute(
+"""UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" %
+ (relevance, name, id))
+ except:
+ print "Update word archive (%s, %d, %d) failed command" % (name, id, relevance)
+ print """UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" % (relevance, name, id)
+ print sys.exc_type, sys.exc_value
+ return -1
+
+ return ret
+
+#########################################################################
+# #
+# Word dictionnary and analysis routines #
+# #
+#########################################################################
+
+#
+# top 100 english word without the one len < 3 + own set
+#
+dropWords = {
+ 'the':0, 'this':0, 'can':0, 'man':0, 'had':0, 'him':0, 'only':0,
+ 'and':0, 'not':0, 'been':0, 'other':0, 'even':0, 'are':0, 'was':0,
+ 'new':0, 'most':0, 'but':0, 'when':0, 'some':0, 'made':0, 'from':0,
+ 'who':0, 'could':0, 'after':0, 'that':0, 'will':0, 'time':0, 'also':0,
+ 'have':0, 'more':0, 'these':0, 'did':0, 'was':0, 'two':0, 'many':0,
+ 'they':0, 'may':0, 'before':0, 'for':0, 'which':0, 'out':0, 'then':0,
+ 'must':0, 'one':0, 'through':0, 'with':0, 'you':0, 'said':0,
+ 'first':0, 'back':0, 'were':0, 'what':0, 'any':0, 'years':0, 'his':0,
+ 'her':0, 'where':0, 'all':0, 'its':0, 'now':0, 'much':0, 'she':0,
+ 'about':0, 'such':0, 'your':0, 'there':0, 'into':0, 'like':0, 'may':0,
+ 'would':0, 'than':0, 'our':0, 'well':0, 'their':0, 'them':0, 'over':0,
+ 'down':0,
+ 'net':0, 'www':0, 'bad':0, 'Okay':0, 'bin':0, 'cur':0,
+}
+
+wordsDict = {}
+wordsDictHTML = {}
+wordsDictArchive = {}
+
+def cleanupWordsString(str):
+ str = string.replace(str, ".", " ")
+ str = string.replace(str, "!", " ")
+ str = string.replace(str, "?", " ")
+ str = string.replace(str, ",", " ")
+ str = string.replace(str, "'", " ")
+ str = string.replace(str, '"', " ")
+ str = string.replace(str, ";", " ")
+ str = string.replace(str, "(", " ")
+ str = string.replace(str, ")", " ")
+ str = string.replace(str, "{", " ")
+ str = string.replace(str, "}", " ")
+ str = string.replace(str, "<", " ")
+ str = string.replace(str, ">", " ")
+ str = string.replace(str, "=", " ")
+ str = string.replace(str, "/", " ")
+ str = string.replace(str, "*", " ")
+ str = string.replace(str, ":", " ")
+ str = string.replace(str, "#", " ")
+ str = string.replace(str, "\\", " ")
+ str = string.replace(str, "\n", " ")
+ str = string.replace(str, "\r", " ")
+ str = string.replace(str, "\xc2", " ")
+ str = string.replace(str, "\xa0", " ")
+ return str
+
+def cleanupDescrString(str):
+ str = string.replace(str, "'", " ")
+ str = string.replace(str, "\n", " ")
+ str = string.replace(str, "\r", " ")
+ str = string.replace(str, "\xc2", " ")
+ str = string.replace(str, "\xa0", " ")
+ l = string.split(str)
+ str = string.join(str)
+ return str
+
+def splitIdentifier(str):
+ ret = []
+ while str != "":
+ cur = string.lower(str[0])
+ str = str[1:]
+ if ((cur < 'a') or (cur > 'z')):
+ continue
+ while (str != "") and (str[0] >= 'A') and (str[0] <= 'Z'):
+ cur = cur + string.lower(str[0])
+ str = str[1:]
+ while (str != "") and (str[0] >= 'a') and (str[0] <= 'z'):
+ cur = cur + str[0]
+ str = str[1:]
+ while (str != "") and (str[0] >= '0') and (str[0] <= '9'):
+ str = str[1:]
+ ret.append(cur)
+ return ret
+
+def addWord(word, module, symbol, relevance):
+ global wordsDict
+
+ if word == None or len(word) < 3:
+ return -1
+ if module == None or symbol == None:
+ return -1
+ if dropWords.has_key(word):
+ return 0
+ if ord(word[0]) > 0x80:
+ return 0
+
+ if wordsDict.has_key(word):
+ d = wordsDict[word]
+ if d == None:
+ return 0
+ if len(d) > 500:
+ wordsDict[word] = None
+ return 0
+ try:
+ relevance = relevance + d[(module, symbol)]
+ except:
+ pass
+ else:
+ wordsDict[word] = {}
+ wordsDict[word][(module, symbol)] = relevance
+ return relevance
+
+def addString(str, module, symbol, relevance):
+ if str == None or len(str) < 3:
+ return -1
+ ret = 0
+ str = cleanupWordsString(str)
+ l = string.split(str)
+ for word in l:
+ if len(word) > 2:
+ ret = ret + addWord(word, module, symbol, 5)
+
+ return ret
+
+def addWordHTML(word, resource, id, section, relevance):
+ global wordsDictHTML
+
+ if word == None or len(word) < 3:
+ return -1
+ if resource == None or section == None:
+ return -1
+ if dropWords.has_key(word):
+ return 0
+ if ord(word[0]) > 0x80:
+ return 0
+
+ section = cleanupDescrString(section)
+
+ if wordsDictHTML.has_key(word):
+ d = wordsDictHTML[word]
+ if d == None:
+ print "skipped %s" % (word)
+ return 0
+ try:
+ (r,i,s) = d[resource]
+ if i != None:
+ id = i
+ if s != None:
+ section = s
+ relevance = relevance + r
+ except:
+ pass
+ else:
+ wordsDictHTML[word] = {}
+ d = wordsDictHTML[word];
+ d[resource] = (relevance, id, section)
+ return relevance
+
+def addStringHTML(str, resource, id, section, relevance):
+ if str == None or len(str) < 3:
+ return -1
+ ret = 0
+ str = cleanupWordsString(str)
+ l = string.split(str)
+ for word in l:
+ if len(word) > 2:
+ try:
+ r = addWordHTML(word, resource, id, section, relevance)
+ if r < 0:
+ print "addWordHTML failed: %s %s" % (word, resource)
+ ret = ret + r
+ except:
+ print "addWordHTML failed: %s %s %d" % (word, resource, relevance)
+ print sys.exc_type, sys.exc_value
+
+ return ret
+
+def addWordArchive(word, id, relevance):
+ global wordsDictArchive
+
+ if word == None or len(word) < 3:
+ return -1
+ if id == None or id == -1:
+ return -1
+ if dropWords.has_key(word):
+ return 0
+ if ord(word[0]) > 0x80:
+ return 0
+
+ if wordsDictArchive.has_key(word):
+ d = wordsDictArchive[word]
+ if d == None:
+ print "skipped %s" % (word)
+ return 0
+ try:
+ r = d[id]
+ relevance = relevance + r
+ except:
+ pass
+ else:
+ wordsDictArchive[word] = {}
+ d = wordsDictArchive[word];
+ d[id] = relevance
+ return relevance
+
+def addStringArchive(str, id, relevance):
+ if str == None or len(str) < 3:
+ return -1
+ ret = 0
+ str = cleanupWordsString(str)
+ l = string.split(str)
+ for word in l:
+ i = len(word)
+ if i > 2:
+ try:
+ r = addWordArchive(word, id, relevance)
+ if r < 0:
+ print "addWordArchive failed: %s %s" % (word, id)
+ else:
+ ret = ret + r
+ except:
+ print "addWordArchive failed: %s %s %d" % (word, id, relevance)
+ print sys.exc_type, sys.exc_value
+ return ret
+
+#########################################################################
+# #
+# XML API description analysis #
+# #
+#########################################################################
+
+def loadAPI(filename):
+ doc = libxml2.parseFile(filename)
+ print "loaded %s" % (filename)
+ return doc
+
+def foundExport(file, symbol):
+ if file == None:
+ return 0
+ if symbol == None:
+ return 0
+ addFunction(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+ return 1
+
+def analyzeAPIFile(top):
+ count = 0
+ name = top.prop("name")
+ cur = top.children
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "exports":
+ count = count + foundExport(name, cur.prop("symbol"))
+ else:
+ print "unexpected element %s in API doc <file name='%s'>" % (name)
+ cur = cur.next
+ return count
+
+def analyzeAPIFiles(top):
+ count = 0
+ cur = top.children
+
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "file":
+ count = count + analyzeAPIFile(cur)
+ else:
+ print "unexpected element %s in API doc <files>" % (cur.name)
+ cur = cur.next
+ return count
+
+def analyzeAPIEnum(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ addEnum(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+
+ return 1
+
+def analyzeAPIConst(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ addConst(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+
+ return 1
+
+def analyzeAPIType(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ addType(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+ return 1
+
+def analyzeAPIFunctype(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ addFunctype(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+ return 1
+
+def analyzeAPIStruct(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ addStruct(symbol, file)
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+
+ info = top.prop("info")
+ if info != None:
+ info = string.replace(info, "'", " ")
+ info = string.strip(info)
+ l = string.split(info)
+ for word in l:
+ if len(word) > 2:
+ addWord(word, file, symbol, 5)
+ return 1
+
+def analyzeAPIMacro(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+ symbol = string.replace(symbol, "'", " ")
+ symbol = string.strip(symbol)
+
+ info = None
+ cur = top.children
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "info":
+ info = cur.content
+ break
+ cur = cur.next
+
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+
+ if info == None:
+ addMacro(symbol, file)
+ print "Macro %s description has no <info>" % (symbol)
+ return 0
+
+ info = string.replace(info, "'", " ")
+ info = string.strip(info)
+ addMacro(symbol, file, info)
+ l = string.split(info)
+ for word in l:
+ if len(word) > 2:
+ addWord(word, file, symbol, 5)
+ return 1
+
+def analyzeAPIFunction(top):
+ file = top.prop("file")
+ if file == None:
+ return 0
+ symbol = top.prop("name")
+ if symbol == None:
+ return 0
+
+ symbol = string.replace(symbol, "'", " ")
+ symbol = string.strip(symbol)
+ info = None
+ cur = top.children
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "info":
+ info = cur.content
+ elif cur.name == "return":
+ rinfo = cur.prop("info")
+ if rinfo != None:
+ rinfo = string.replace(rinfo, "'", " ")
+ rinfo = string.strip(rinfo)
+ addString(rinfo, file, symbol, 7)
+ elif cur.name == "arg":
+ ainfo = cur.prop("info")
+ if ainfo != None:
+ ainfo = string.replace(ainfo, "'", " ")
+ ainfo = string.strip(ainfo)
+ addString(ainfo, file, symbol, 5)
+ name = cur.prop("name")
+ if name != None:
+ name = string.replace(name, "'", " ")
+ name = string.strip(name)
+ addWord(name, file, symbol, 7)
+ cur = cur.next
+ if info == None:
+ print "Function %s description has no <info>" % (symbol)
+ addFunction(symbol, file, "")
+ else:
+ info = string.replace(info, "'", " ")
+ info = string.strip(info)
+ addFunction(symbol, file, info)
+ addString(info, file, symbol, 5)
+
+ l = splitIdentifier(symbol)
+ for word in l:
+ addWord(word, file, symbol, 10)
+
+ return 1
+
+def analyzeAPISymbols(top):
+ count = 0
+ cur = top.children
+
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "macro":
+ count = count + analyzeAPIMacro(cur)
+ elif cur.name == "function":
+ count = count + analyzeAPIFunction(cur)
+ elif cur.name == "const":
+ count = count + analyzeAPIConst(cur)
+ elif cur.name == "typedef":
+ count = count + analyzeAPIType(cur)
+ elif cur.name == "struct":
+ count = count + analyzeAPIStruct(cur)
+ elif cur.name == "enum":
+ count = count + analyzeAPIEnum(cur)
+ elif cur.name == "functype":
+ count = count + analyzeAPIFunctype(cur)
+ else:
+ print "unexpected element %s in API doc <files>" % (cur.name)
+ cur = cur.next
+ return count
+
+def analyzeAPI(doc):
+ count = 0
+ if doc == None:
+ return -1
+ root = doc.getRootElement()
+ if root.name != "api":
+ print "Unexpected root name"
+ return -1
+ cur = root.children
+ while cur != None:
+ if cur.type == 'text':
+ cur = cur.next
+ continue
+ if cur.name == "files":
+ pass
+# count = count + analyzeAPIFiles(cur)
+ elif cur.name == "symbols":
+ count = count + analyzeAPISymbols(cur)
+ else:
+ print "unexpected element %s in API doc" % (cur.name)
+ cur = cur.next
+ return count
+
+#########################################################################
+# #
+# Web pages parsing and analysis #
+# #
+#########################################################################
+
+import glob
+
+def analyzeHTMLText(doc, resource, p, section, id):
+ words = 0
+ try:
+ content = p.content
+ words = words + addStringHTML(content, resource, id, section, 5)
+ except:
+ return -1
+ return words
+
+def analyzeHTMLPara(doc, resource, p, section, id):
+ words = 0
+ try:
+ content = p.content
+ words = words + addStringHTML(content, resource, id, section, 5)
+ except:
+ return -1
+ return words
+
+def analyzeHTMLPre(doc, resource, p, section, id):
+ words = 0
+ try:
+ content = p.content
+ words = words + addStringHTML(content, resource, id, section, 5)
+ except:
+ return -1
+ return words
+
+def analyzeHTML(doc, resource, p, section, id):
+ words = 0
+ try:
+ content = p.content
+ words = words + addStringHTML(content, resource, id, section, 5)
+ except:
+ return -1
+ return words
+
+def analyzeHTML(doc, resource):
+ para = 0;
+ ctxt = doc.xpathNewContext()
+ try:
+ res = ctxt.xpathEval("//head/title")
+ title = res[0].content
+ except:
+ title = "Page %s" % (resource)
+ addPage(resource, title)
+ try:
+ items = ctxt.xpathEval("//h1 | //h2 | //h3 | //text()")
+ section = title
+ id = ""
+ for item in items:
+ if item.name == 'h1' or item.name == 'h2' or item.name == 'h3':
+ section = item.content
+ if item.prop("id"):
+ id = item.prop("id")
+ elif item.prop("name"):
+ id = item.prop("name")
+ elif item.type == 'text':
+ analyzeHTMLText(doc, resource, item, section, id)
+ para = para + 1
+ elif item.name == 'p':
+ analyzeHTMLPara(doc, resource, item, section, id)
+ para = para + 1
+ elif item.name == 'pre':
+ analyzeHTMLPre(doc, resource, item, section, id)
+ para = para + 1
+ else:
+ print "Page %s, unexpected %s element" % (resource, item.name)
+ except:
+ print "Page %s: problem analyzing" % (resource)
+ print sys.exc_type, sys.exc_value
+
+ return para
+
+def analyzeHTMLPages():
+ ret = 0
+ HTMLfiles = glob.glob("*.html") + glob.glob("tutorial/*.html")
+ for html in HTMLfiles:
+ if html[0:3] == "API":
+ continue
+ if html == "xml.html":
+ continue
+ try:
+ doc = libxml2.parseFile(html)
+ except:
+ doc = libxml2.htmlParseFile(html, None)
+ try:
+ res = analyzeHTML(doc, html)
+ print "Parsed %s : %d paragraphs" % (html, res)
+ ret = ret + 1
+ except:
+ print "could not parse %s" % (html)
+ return ret
+
+#########################################################################
+# #
+# Mail archives parsing and analysis #
+# #
+#########################################################################
+
+import time
+
+def getXMLDateArchive(t = None):
+ if t == None:
+ t = time.time()
+ T = time.gmtime(t)
+ month = time.strftime("%B", T)
+ year = T[0]
+ url = "http://mail.gnome.org/archives/xml/%d-%s/date.html" % (year, month)
+ return url
+
+def scanXMLMsgArchive(url, title, force = 0):
+ if url == None or title == None:
+ return 0
+
+ ID = checkXMLMsgArchive(url)
+ if force == 0 and ID != -1:
+ return 0
+
+ if ID == -1:
+ ID = addXMLMsgArchive(url, title)
+ if ID == -1:
+ return 0
+
+ try:
+ print "Loading %s" % (url)
+ doc = libxml2.htmlParseFile(url, None);
+ except:
+ doc = None
+ if doc == None:
+ print "Failed to parse %s" % (url)
+ return 0
+
+ addStringArchive(title, ID, 20)
+ ctxt = doc.xpathNewContext()
+ texts = ctxt.xpathEval("//pre//text()")
+ for text in texts:
+ addStringArchive(text.content, ID, 5)
+
+ return 1
+
+def scanXMLDateArchive(t = None, force = 0):
+ global wordsDictArchive
+
+ wordsDictArchive = {}
+
+ url = getXMLDateArchive(t)
+ print "loading %s" % (url)
+ try:
+ doc = libxml2.htmlParseFile(url, None);
+ except:
+ doc = None
+ if doc == None:
+ print "Failed to parse %s" % (url)
+ return -1
+ ctxt = doc.xpathNewContext()
+ anchors = ctxt.xpathEval("//a[@href]")
+ links = 0
+ newmsg = 0
+ for anchor in anchors:
+ href = anchor.prop("href")
+ if href == None or href[0:3] != "msg":
+ continue
+ try:
+ links = links + 1
+
+ msg = libxml2.buildURI(href, url)
+ title = anchor.content
+ if title != None and title[0:4] == 'Re: ':
+ title = title[4:]
+ if title != None and title[0:6] == '[xml] ':
+ title = title[6:]
+ newmsg = newmsg + scanXMLMsgArchive(msg, title, force)
+
+ except:
+ pass
+
+ return newmsg
+
+
+#########################################################################
+# #
+# Main code: open the DB, the API XML and analyze it #
+# #
+#########################################################################
+def analyzeArchives(t = None, force = 0):
+ global wordsDictArchive
+
+ ret = scanXMLDateArchive(t, force)
+ print "Indexed %d words in %d archive pages" % (len(wordsDictArchive), ret)
+
+ i = 0
+ skipped = 0
+ for word in wordsDictArchive.keys():
+ refs = wordsDictArchive[word]
+ if refs == None:
+ skipped = skipped + 1
+ continue;
+ for id in refs.keys():
+ relevance = refs[id]
+ updateWordArchive(word, id, relevance)
+ i = i + 1
+
+ print "Found %d associations in HTML pages" % (i)
+
+def analyzeHTMLTop():
+ global wordsDictHTML
+
+ ret = analyzeHTMLPages()
+ print "Indexed %d words in %d HTML pages" % (len(wordsDictHTML), ret)
+
+ i = 0
+ skipped = 0
+ for word in wordsDictHTML.keys():
+ refs = wordsDictHTML[word]
+ if refs == None:
+ skipped = skipped + 1
+ continue;
+ for resource in refs.keys():
+ (relevance, id, section) = refs[resource]
+ updateWordHTML(word, resource, section, id, relevance)
+ i = i + 1
+
+ print "Found %d associations in HTML pages" % (i)
+
+def analyzeAPITop():
+ global wordsDict
+ global API
+
+ try:
+ doc = loadAPI(API)
+ ret = analyzeAPI(doc)
+ print "Analyzed %d blocs" % (ret)
+ doc.freeDoc()
+ except:
+ print "Failed to parse and analyze %s" % (API)
+ print sys.exc_type, sys.exc_value
+ sys.exit(1)
+
+ print "Indexed %d words" % (len(wordsDict))
+ i = 0
+ skipped = 0
+ for word in wordsDict.keys():
+ refs = wordsDict[word]
+ if refs == None:
+ skipped = skipped + 1
+ continue;
+ for (module, symbol) in refs.keys():
+ updateWord(word, symbol, refs[(module, symbol)])
+ i = i + 1
+
+ print "Found %d associations, skipped %d words" % (i, skipped)
+
+def usage():
+ print "Usage index.py [--force] [--archive] [--archive-year year] [--archive-month month] [--API] [--docs]"
+ sys.exit(1)
+
+def main():
+ try:
+ openMySQL()
+ except:
+ print "Failed to open the database"
+ print sys.exc_type, sys.exc_value
+ sys.exit(1)
+
+ args = sys.argv[1:]
+ force = 0
+ if args:
+ i = 0
+ while i < len(args):
+ if args[i] == '--force':
+ force = 1
+ elif args[i] == '--archive':
+ analyzeArchives(None, force)
+ elif args[i] == '--archive-year':
+ i = i + 1;
+ year = args[i]
+ months = ["January" , "February", "March", "April", "May",
+ "June", "July", "August", "September", "October",
+ "November", "December"];
+ for month in months:
+ try:
+ str = "%s-%s" % (year, month)
+ T = time.strptime(str, "%Y-%B")
+ t = time.mktime(T) + 3600 * 24 * 10;
+ analyzeArchives(t, force)
+ except:
+ print "Failed to index month archive:"
+ print sys.exc_type, sys.exc_value
+ elif args[i] == '--archive-month':
+ i = i + 1;
+ month = args[i]
+ try:
+ T = time.strptime(month, "%Y-%B")
+ t = time.mktime(T) + 3600 * 24 * 10;
+ analyzeArchives(t, force)
+ except:
+ print "Failed to index month archive:"
+ print sys.exc_type, sys.exc_value
+ elif args[i] == '--API':
+ analyzeAPITop()
+ elif args[i] == '--docs':
+ analyzeHTMLTop()
+ else:
+ usage()
+ i = i + 1
+ else:
+ usage()
+
+if __name__ == "__main__":
+ main()
diff --git a/doc/interface.html b/doc/interface.html
new file mode 100644
index 0000000..ce1caf3
--- /dev/null
+++ b/doc/interface.html
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>The SAX interface</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>The SAX interface</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Sometimes the DOM tree output is just too large to fit reasonably into
+memory. In that case (and if you don't expect to save back the XML document
+loaded using libxml), it's better to use the SAX interface of libxml. SAX is
+a <strong>callback-based interface</strong> to the parser. Before parsing,
+the application layer registers a customized set of callbacks which are
+called by the library as it progresses through the XML input.</p><p>To get more detailed step-by-step guidance on using the SAX interface of
+libxml, see the <a href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">nice
+documentation</a>.written by <a href="mailto:james@daa.com.au">James
+Henstridge</a>.</p><p>You can debug the SAX behaviour by using the <strong>testSAX</strong>
+program located in the gnome-xml module (it's usually not shipped in the
+binary packages of libxml, but you can find it in the tar source
+distribution). Here is the sequence of callbacks that would be reported by
+testSAX when parsing the example XML document shown earlier:</p><pre>SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.getEntity(amp)
+SAX.startElement(EXAMPLE, prop1='gnome is great', prop2='&amp;amp; linux too')
+SAX.characters( , 3)
+SAX.startElement(head)
+SAX.characters( , 4)
+SAX.startElement(title)
+SAX.characters(Welcome to Gnome, 16)
+SAX.endElement(title)
+SAX.characters( , 3)
+SAX.endElement(head)
+SAX.characters( , 3)
+SAX.startElement(chapter)
+SAX.characters( , 4)
+SAX.startElement(title)
+SAX.characters(The Linux adventure, 19)
+SAX.endElement(title)
+SAX.characters( , 4)
+SAX.startElement(p)
+SAX.characters(bla bla bla ..., 15)
+SAX.endElement(p)
+SAX.characters( , 4)
+SAX.startElement(image, href='linus.gif')
+SAX.endElement(image)
+SAX.characters( , 4)
+SAX.startElement(p)
+SAX.characters(..., 3)
+SAX.endElement(p)
+SAX.characters( , 3)
+SAX.endElement(chapter)
+SAX.characters( , 1)
+SAX.endElement(EXAMPLE)
+SAX.endDocument()</pre><p>Most of the other interfaces of libxml2 are based on the DOM tree-building
+facility, so nearly everything up to the end of this document presupposes the
+use of the standard DOM tree build. Note that the DOM tree itself is built by
+a set of registered default callbacks, without internal specific
+interface.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/intro.html b/doc/intro.html
new file mode 100644
index 0000000..551bea4
--- /dev/null
+++ b/doc/intro.html
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This document describes libxml, the <a href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the
+<a href="http://www.gnome.org/">Gnome</a> project. <a href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based
+structured documents/data.</p><p>Here are some key points about libxml:</p><ul>
+ <li>Libxml2 exports Push (progressive) and Pull (blocking) type parser
+ interfaces for both XML and HTML.</li>
+ <li>Libxml2 can do DTD validation at parse time, using a parsed document
+ instance, or with an arbitrary DTD.</li>
+ <li>Libxml2 includes complete <a href="http://www.w3.org/TR/xpath">XPath</a>, <a href="http://www.w3.org/TR/xptr">XPointer</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a> implementations.</li>
+ <li>It is written in plain C, making as few assumptions as possible, and
+ sticking closely to ANSI C/POSIX for easy embedding. Works on
+ Linux/Unix/Windows, ported to a number of other platforms.</li>
+ <li>Basic support for HTTP and FTP client allowing applications to fetch
+ remote resources.</li>
+ <li>The design is modular, most of the extensions can be compiled out.</li>
+ <li>The internal document representation is as close as possible to the <a href="http://www.w3.org/DOM/">DOM</a> interfaces.</li>
+ <li>Libxml2 also has a <a href="http://www.megginson.com/SAX/index.html">SAX like interface</a>;
+ the interface is designed to be compatible with <a href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
+ <li>This library is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a>. See the Copyright file in the distribution for the precise
+ wording.</li>
+</ul><p>Warning: unless you are forced to because your application links with a
+Gnome-1.X library requiring it, <strong><span style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use
+libxml2</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/library.html b/doc/library.html
new file mode 100644
index 0000000..e51139a
--- /dev/null
+++ b/doc/library.html
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>The parser interfaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>The parser interfaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>This section is directly intended to help programmers getting bootstrapped
+using the XML tollkit from the C language. It is not intended to be
+extensive. I hope the automatically generated documents will provide the
+completeness required, but as a separate set of documents. The interfaces of
+the XML parser are by principle low level, Those interested in a higher level
+API should <a href="#DOM">look at DOM</a>.</p><p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are
+separated from the <a href="html/libxml-htmlparser.html">HTML parser
+interfaces</a>. Let's have a look at how the XML parser can be called:</p><h3><a name="Invoking" id="Invoking">Invoking the parser : the pull method</a></h3><p>Usually, the first thing to do is to read an XML input. The parser accepts
+documents either from in-memory strings or from files. The functions are
+defined in "parser.h":</p><dl>
+ <dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
+ <dd><p>Parse a null-terminated string containing the document.</p>
+ </dd>
+</dl><dl>
+ <dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt>
+ <dd><p>Parse an XML document contained in a (possibly compressed)
+ file.</p>
+ </dd>
+</dl><p>The parser returns a pointer to the document structure (or NULL in case of
+failure).</p><h3 id="Invoking1">Invoking the parser: the push method</h3><p>In order for the application to keep the control when the document is
+being fetched (which is common for GUI based programs) libxml2 provides a
+push interface, too, as of version 1.8.3. Here are the interface
+functions:</p><pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+int xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);</pre><p>and here is a simple example showing how to use the interface:</p><pre> FILE *f;
+
+ f = fopen(filename, "r");
+ if (f != NULL) {
+ int res, size = 1024;
+ char chars[1024];
+ xmlParserCtxtPtr ctxt;
+
+ res = fread(chars, 1, 4, f);
+ if (res &gt; 0) {
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename);
+ while ((res = fread(chars, 1, size, f)) &gt; 0) {
+ xmlParseChunk(ctxt, chars, res, 0);
+ }
+ xmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt-&gt;myDoc;
+ xmlFreeParserCtxt(ctxt);
+ }
+ }</pre><p>The HTML parser embedded into libxml2 also has a push interface; the
+functions are just prefixed by "html" rather than "xml".</p><h3 id="Invoking2">Invoking the parser: the SAX interface</h3><p>The tree-building interface makes the parser memory-hungry, first loading
+the document in memory and then building the tree itself. Reading a document
+without building the tree is possible using the SAX interfaces (see SAX.h and
+<a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James
+Henstridge's documentation</a>). Note also that the push interface can be
+limited to SAX: just use the two first arguments of
+<code>xmlCreatePushParserCtxt()</code>.</p><h3><a name="Building" id="Building">Building a tree from scratch</a></h3><p>The other way to get an XML tree in memory is by building it. Basically
+there is a set of functions dedicated to building new elements. (These are
+also described in &lt;libxml/tree.h&gt;.) For example, here is a piece of
+code that produces the XML document used in the previous examples:</p><pre> #include &lt;libxml/tree.h&gt;
+ xmlDocPtr doc;
+ xmlNodePtr tree, subtree;
+
+ doc = xmlNewDoc("1.0");
+ doc-&gt;children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
+ xmlSetProp(doc-&gt;children, "prop1", "gnome is great");
+ xmlSetProp(doc-&gt;children, "prop2", "&amp; linux too");
+ tree = xmlNewChild(doc-&gt;children, NULL, "head", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome");
+ tree = xmlNewChild(doc-&gt;children, NULL, "chapter", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure");
+ subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ...");
+ subtree = xmlNewChild(tree, NULL, "image", NULL);
+ xmlSetProp(subtree, "href", "linus.gif");</pre><p>Not really rocket science ...</p><h3><a name="Traversing" id="Traversing">Traversing the tree</a></h3><p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your
+code has access to the internal structure of all the elements of the tree.
+The names should be somewhat simple like <strong>parent</strong>,
+<strong>children</strong>, <strong>next</strong>, <strong>prev</strong>,
+<strong>properties</strong>, etc... For example, still with the previous
+example:</p><pre><code>doc-&gt;children-&gt;children-&gt;children</code></pre><p>points to the title element,</p><pre>doc-&gt;children-&gt;children-&gt;next-&gt;children-&gt;children</pre><p>points to the text node containing the chapter title "The Linux
+adventure".</p><p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be
+present before the document root, so <code>doc-&gt;children</code> may point
+to an element which is not the document Root Element; a function
+<code>xmlDocGetRootElement()</code> was added for this purpose.</p><h3><a name="Modifying" id="Modifying">Modifying the tree</a></h3><p>Functions are provided for reading and writing the document content. Here
+is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p><dl>
+ <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
+ xmlChar *value);</code></dt>
+ <dd><p>This sets (or changes) an attribute carried by an ELEMENT node.
+ The value can be NULL.</p>
+ </dd>
+</dl><dl>
+ <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar
+ *name);</code></dt>
+ <dd><p>This function returns a pointer to new copy of the property
+ content. Note that the user must deallocate the result.</p>
+ </dd>
+</dl><p>Two functions are provided for reading and writing the text associated
+with elements:</p><dl>
+ <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
+ *value);</code></dt>
+ <dd><p>This function takes an "external" string and converts it to one
+ text node or possibly to a list of entity and text nodes. All
+ non-predefined entity references like &amp;Gnome; will be stored
+ internally as entity nodes, hence the result of the function may not be
+ a single node.</p>
+ </dd>
+</dl><dl>
+ <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int
+ inLine);</code></dt>
+ <dd><p>This function is the inverse of
+ <code>xmlStringGetNodeList()</code>. It generates a new string
+ containing the content of the text and entity nodes. Note the extra
+ argument inLine. If this argument is set to 1, the function will expand
+ entity references. For example, instead of returning the &amp;Gnome;
+ XML encoding in the string, it will substitute it with its value (say,
+ "GNU Network Object Model Environment").</p>
+ </dd>
+</dl><h3><a name="Saving" id="Saving">Saving a tree</a></h3><p>Basically 3 options are possible:</p><dl>
+ <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int
+ *size);</code></dt>
+ <dd><p>Returns a buffer into which the document has been saved.</p>
+ </dd>
+</dl><dl>
+ <dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt>
+ <dd><p>Dumps a document to an open file descriptor.</p>
+ </dd>
+</dl><dl>
+ <dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt>
+ <dd><p>Saves the document to a file. In this case, the compression
+ interface is triggered if it has been turned on.</p>
+ </dd>
+</dl><h3><a name="Compressio" id="Compressio">Compression</a></h3><p>The library transparently handles compression when doing file-based
+accesses. The level of compression on saves can be turned on either globally
+or individually for one file:</p><dl>
+ <dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt>
+ <dd><p>Gets the document compression ratio (0-9).</p>
+ </dd>
+</dl><dl>
+ <dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt>
+ <dd><p>Sets the document compression ratio.</p>
+ </dd>
+</dl><dl>
+ <dt><code>int xmlGetCompressMode(void);</code></dt>
+ <dd><p>Gets the default compression ratio.</p>
+ </dd>
+</dl><dl>
+ <dt><code>void xmlSetCompressMode(int mode);</code></dt>
+ <dd><p>Sets the default compression ratio.</p>
+ </dd>
+</dl><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/libxml.gif b/doc/libxml.gif
new file mode 100644
index 0000000..e24adf8
--- /dev/null
+++ b/doc/libxml.gif
Binary files differ
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
new file mode 100644
index 0000000..f83d14f
--- /dev/null
+++ b/doc/libxml2-api.xml
@@ -0,0 +1,18508 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<api name='libxml2'>
+ <files>
+ <file name='DOCBparser'>
+ <summary>old DocBook SGML parser</summary>
+ <description>interface for a DocBook SGML non-verifying parser This code is DEPRECATED, and should not be used anymore. </description>
+ <author>Daniel Veillard </author>
+ <deprecated/>
+ <exports symbol='docbParserInputPtr' type='typedef'/>
+ <exports symbol='docbParserCtxt' type='typedef'/>
+ <exports symbol='docbParserCtxtPtr' type='typedef'/>
+ <exports symbol='docbParserInput' type='typedef'/>
+ <exports symbol='docbDocPtr' type='typedef'/>
+ <exports symbol='docbSAXHandler' type='typedef'/>
+ <exports symbol='docbSAXHandlerPtr' type='typedef'/>
+ <exports symbol='docbFreeParserCtxt' type='function'/>
+ <exports symbol='docbParseDoc' type='function'/>
+ <exports symbol='docbCreateFileParserCtxt' type='function'/>
+ <exports symbol='docbSAXParseFile' type='function'/>
+ <exports symbol='docbSAXParseDoc' type='function'/>
+ <exports symbol='docbCreatePushParserCtxt' type='function'/>
+ <exports symbol='docbEncodeEntities' type='function'/>
+ <exports symbol='docbParseFile' type='function'/>
+ <exports symbol='docbParseDocument' type='function'/>
+ <exports symbol='docbParseChunk' type='function'/>
+ </file>
+ <file name='HTMLparser'>
+ <summary>interface for an HTML 4.0 non-verifying parser</summary>
+ <description>this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse &quot;real world&quot; HTML, even if severely broken from a specification point of view. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='htmlDefaultSubelement' type='macro'/>
+ <exports symbol='htmlElementAllowedHereDesc' type='macro'/>
+ <exports symbol='htmlRequiredAttrs' type='macro'/>
+ <exports symbol='HTML_REQUIRED' type='enum'/>
+ <exports symbol='HTML_INVALID' type='enum'/>
+ <exports symbol='HTML_PARSE_NONET' type='enum'/>
+ <exports symbol='HTML_NA' type='enum'/>
+ <exports symbol='HTML_PARSE_COMPACT' type='enum'/>
+ <exports symbol='HTML_VALID' type='enum'/>
+ <exports symbol='HTML_PARSE_NOBLANKS' type='enum'/>
+ <exports symbol='HTML_PARSE_NODEFDTD' type='enum'/>
+ <exports symbol='HTML_PARSE_RECOVER' type='enum'/>
+ <exports symbol='HTML_DEPRECATED' type='enum'/>
+ <exports symbol='HTML_PARSE_NOERROR' type='enum'/>
+ <exports symbol='HTML_PARSE_PEDANTIC' type='enum'/>
+ <exports symbol='HTML_PARSE_IGNORE_ENC' type='enum'/>
+ <exports symbol='HTML_PARSE_NOIMPLIED' type='enum'/>
+ <exports symbol='HTML_PARSE_NOWARNING' type='enum'/>
+ <exports symbol='htmlParserNodeInfo' type='typedef'/>
+ <exports symbol='htmlParserInput' type='typedef'/>
+ <exports symbol='htmlParserCtxtPtr' type='typedef'/>
+ <exports symbol='htmlEntityDesc' type='typedef'/>
+ <exports symbol='htmlDocPtr' type='typedef'/>
+ <exports symbol='htmlSAXHandlerPtr' type='typedef'/>
+ <exports symbol='htmlStatus' type='typedef'/>
+ <exports symbol='htmlNodePtr' type='typedef'/>
+ <exports symbol='htmlElemDescPtr' type='typedef'/>
+ <exports symbol='htmlElemDesc' type='typedef'/>
+ <exports symbol='htmlSAXHandler' type='typedef'/>
+ <exports symbol='htmlParserInputPtr' type='typedef'/>
+ <exports symbol='htmlParserOption' type='typedef'/>
+ <exports symbol='htmlEntityDescPtr' type='typedef'/>
+ <exports symbol='htmlParserCtxt' type='typedef'/>
+ <exports symbol='_htmlEntityDesc' type='struct'/>
+ <exports symbol='_htmlElemDesc' type='struct'/>
+ <exports symbol='htmlIsScriptAttribute' type='function'/>
+ <exports symbol='htmlHandleOmittedElem' type='function'/>
+ <exports symbol='htmlReadFd' type='function'/>
+ <exports symbol='htmlReadIO' type='function'/>
+ <exports symbol='htmlParseFile' type='function'/>
+ <exports symbol='htmlCtxtReadDoc' type='function'/>
+ <exports symbol='htmlAutoCloseTag' type='function'/>
+ <exports symbol='htmlParseChunk' type='function'/>
+ <exports symbol='htmlTagLookup' type='function'/>
+ <exports symbol='htmlCreateMemoryParserCtxt' type='function'/>
+ <exports symbol='htmlCtxtReset' type='function'/>
+ <exports symbol='htmlElementAllowedHere' type='function'/>
+ <exports symbol='htmlCtxtReadIO' type='function'/>
+ <exports symbol='htmlCreatePushParserCtxt' type='function'/>
+ <exports symbol='htmlReadMemory' type='function'/>
+ <exports symbol='htmlIsAutoClosed' type='function'/>
+ <exports symbol='htmlParseCharRef' type='function'/>
+ <exports symbol='htmlReadDoc' type='function'/>
+ <exports symbol='htmlEncodeEntities' type='function'/>
+ <exports symbol='htmlNodeStatus' type='function'/>
+ <exports symbol='htmlAttrAllowed' type='function'/>
+ <exports symbol='htmlSAXParseFile' type='function'/>
+ <exports symbol='htmlParseEntityRef' type='function'/>
+ <exports symbol='htmlElementStatusHere' type='function'/>
+ <exports symbol='htmlEntityValueLookup' type='function'/>
+ <exports symbol='htmlParseElement' type='function'/>
+ <exports symbol='UTF8ToHtml' type='function'/>
+ <exports symbol='htmlEntityLookup' type='function'/>
+ <exports symbol='htmlFreeParserCtxt' type='function'/>
+ <exports symbol='htmlCtxtReadMemory' type='function'/>
+ <exports symbol='htmlCtxtReadFd' type='function'/>
+ <exports symbol='htmlReadFile' type='function'/>
+ <exports symbol='htmlCtxtReadFile' type='function'/>
+ <exports symbol='htmlParseDocument' type='function'/>
+ <exports symbol='htmlNewParserCtxt' type='function'/>
+ <exports symbol='htmlSAXParseDoc' type='function'/>
+ <exports symbol='htmlCtxtUseOptions' type='function'/>
+ <exports symbol='htmlParseDoc' type='function'/>
+ </file>
+ <file name='HTMLtree'>
+ <summary>specific APIs to process HTML tree, especially serialization</summary>
+ <description>this module implements a few function needed to process tree in an HTML specific way. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='HTML_ENTITY_REF_NODE' type='macro'/>
+ <exports symbol='HTML_COMMENT_NODE' type='macro'/>
+ <exports symbol='HTML_PRESERVE_NODE' type='macro'/>
+ <exports symbol='HTML_TEXT_NODE' type='macro'/>
+ <exports symbol='HTML_PI_NODE' type='macro'/>
+ <exports symbol='htmlNodeDumpFileFormat' type='function'/>
+ <exports symbol='htmlDocDumpMemory' type='function'/>
+ <exports symbol='htmlSaveFile' type='function'/>
+ <exports symbol='htmlDocDump' type='function'/>
+ <exports symbol='htmlDocDumpMemoryFormat' type='function'/>
+ <exports symbol='htmlIsBooleanAttr' type='function'/>
+ <exports symbol='htmlSaveFileFormat' type='function'/>
+ <exports symbol='htmlNodeDumpFormatOutput' type='function'/>
+ <exports symbol='htmlSetMetaEncoding' type='function'/>
+ <exports symbol='htmlSaveFileEnc' type='function'/>
+ <exports symbol='htmlNodeDumpOutput' type='function'/>
+ <exports symbol='htmlNodeDump' type='function'/>
+ <exports symbol='htmlNewDoc' type='function'/>
+ <exports symbol='htmlGetMetaEncoding' type='function'/>
+ <exports symbol='htmlNodeDumpFile' type='function'/>
+ <exports symbol='htmlDocContentDumpFormatOutput' type='function'/>
+ <exports symbol='htmlNewDocNoDtD' type='function'/>
+ <exports symbol='htmlDocContentDumpOutput' type='function'/>
+ </file>
+ <file name='SAX'>
+ <summary>Old SAX version 1 handler, deprecated</summary>
+ <description>DEPRECATED set of SAX version 1 interfaces used to build the DOM tree. </description>
+ <author>Daniel Veillard </author>
+ <deprecated/>
+ <exports symbol='comment' type='function'/>
+ <exports symbol='checkNamespace' type='function'/>
+ <exports symbol='getColumnNumber' type='function'/>
+ <exports symbol='entityDecl' type='function'/>
+ <exports symbol='attribute' type='function'/>
+ <exports symbol='getNamespace' type='function'/>
+ <exports symbol='setDocumentLocator' type='function'/>
+ <exports symbol='initxmlDefaultSAXHandler' type='function'/>
+ <exports symbol='ignorableWhitespace' type='function'/>
+ <exports symbol='hasExternalSubset' type='function'/>
+ <exports symbol='unparsedEntityDecl' type='function'/>
+ <exports symbol='globalNamespace' type='function'/>
+ <exports symbol='hasInternalSubset' type='function'/>
+ <exports symbol='reference' type='function'/>
+ <exports symbol='notationDecl' type='function'/>
+ <exports symbol='getSystemId' type='function'/>
+ <exports symbol='externalSubset' type='function'/>
+ <exports symbol='resolveEntity' type='function'/>
+ <exports symbol='startDocument' type='function'/>
+ <exports symbol='setNamespace' type='function'/>
+ <exports symbol='cdataBlock' type='function'/>
+ <exports symbol='getPublicId' type='function'/>
+ <exports symbol='inithtmlDefaultSAXHandler' type='function'/>
+ <exports symbol='processingInstruction' type='function'/>
+ <exports symbol='endElement' type='function'/>
+ <exports symbol='namespaceDecl' type='function'/>
+ <exports symbol='initdocbDefaultSAXHandler' type='function'/>
+ <exports symbol='getEntity' type='function'/>
+ <exports symbol='characters' type='function'/>
+ <exports symbol='elementDecl' type='function'/>
+ <exports symbol='startElement' type='function'/>
+ <exports symbol='getParameterEntity' type='function'/>
+ <exports symbol='attributeDecl' type='function'/>
+ <exports symbol='isStandalone' type='function'/>
+ <exports symbol='internalSubset' type='function'/>
+ <exports symbol='endDocument' type='function'/>
+ <exports symbol='getLineNumber' type='function'/>
+ </file>
+ <file name='SAX2'>
+ <summary>SAX2 parser interface used to build the DOM tree</summary>
+ <description>those are the default SAX2 interfaces used by the library when building DOM tree. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlSAX2EndElementNs' type='function'/>
+ <exports symbol='xmlSAX2Reference' type='function'/>
+ <exports symbol='xmlSAX2ElementDecl' type='function'/>
+ <exports symbol='xmlSAX2AttributeDecl' type='function'/>
+ <exports symbol='xmlSAX2Comment' type='function'/>
+ <exports symbol='xmlSAX2GetColumnNumber' type='function'/>
+ <exports symbol='xmlSAX2GetEntity' type='function'/>
+ <exports symbol='xmlSAX2UnparsedEntityDecl' type='function'/>
+ <exports symbol='xmlSAX2InitDocbDefaultSAXHandler' type='function'/>
+ <exports symbol='xmlSAXVersion' type='function'/>
+ <exports symbol='xmlSAX2IgnorableWhitespace' type='function'/>
+ <exports symbol='xmlSAX2NotationDecl' type='function'/>
+ <exports symbol='xmlSAX2StartDocument' type='function'/>
+ <exports symbol='xmlSAX2EndElement' type='function'/>
+ <exports symbol='xmlSAX2ResolveEntity' type='function'/>
+ <exports symbol='xmlSAX2ExternalSubset' type='function'/>
+ <exports symbol='xmlSAX2GetPublicId' type='function'/>
+ <exports symbol='xmlSAX2IsStandalone' type='function'/>
+ <exports symbol='xmlSAX2EndDocument' type='function'/>
+ <exports symbol='xmlSAX2ProcessingInstruction' type='function'/>
+ <exports symbol='xmlSAX2InternalSubset' type='function'/>
+ <exports symbol='xmlSAX2Characters' type='function'/>
+ <exports symbol='xmlSAXDefaultVersion' type='function'/>
+ <exports symbol='xmlSAX2StartElement' type='function'/>
+ <exports symbol='xmlSAX2SetDocumentLocator' type='function'/>
+ <exports symbol='xmlSAX2CDataBlock' type='function'/>
+ <exports symbol='xmlSAX2StartElementNs' type='function'/>
+ <exports symbol='xmlSAX2HasExternalSubset' type='function'/>
+ <exports symbol='htmlDefaultSAXHandlerInit' type='function'/>
+ <exports symbol='xmlSAX2GetLineNumber' type='function'/>
+ <exports symbol='xmlSAX2HasInternalSubset' type='function'/>
+ <exports symbol='xmlSAX2InitHtmlDefaultSAXHandler' type='function'/>
+ <exports symbol='docbDefaultSAXHandlerInit' type='function'/>
+ <exports symbol='xmlDefaultSAXHandlerInit' type='function'/>
+ <exports symbol='xmlSAX2InitDefaultSAXHandler' type='function'/>
+ <exports symbol='xmlSAX2GetParameterEntity' type='function'/>
+ <exports symbol='xmlSAX2GetSystemId' type='function'/>
+ <exports symbol='xmlSAX2EntityDecl' type='function'/>
+ </file>
+ <file name='c14n'>
+ <summary>Provide Canonical XML and Exclusive XML Canonicalization</summary>
+ <description>the c14n modules provides a &quot;Canonical XML&quot; implementation</description>
+ <author>Aleksey Sanin &lt;aleksey@aleksey.com&gt; </author>
+ <exports symbol='XML_C14N_1_1' type='enum'/>
+ <exports symbol='XML_C14N_1_0' type='enum'/>
+ <exports symbol='XML_C14N_EXCLUSIVE_1_0' type='enum'/>
+ <exports symbol='xmlC14NMode' type='typedef'/>
+ <exports symbol='xmlC14NExecute' type='function'/>
+ <exports symbol='xmlC14NDocSaveTo' type='function'/>
+ <exports symbol='xmlC14NIsVisibleCallback' type='function'/>
+ <exports symbol='xmlC14NDocSave' type='function'/>
+ <exports symbol='xmlC14NDocDumpMemory' type='function'/>
+ </file>
+ <file name='catalog'>
+ <summary>interfaces to the Catalog handling system</summary>
+ <description>the catalog module implements the support for XML Catalogs and SGML catalogs </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_CATALOG_PI' type='macro'/>
+ <exports symbol='XML_CATALOGS_NAMESPACE' type='macro'/>
+ <exports symbol='XML_CATA_ALLOW_NONE' type='enum'/>
+ <exports symbol='XML_CATA_PREFER_NONE' type='enum'/>
+ <exports symbol='XML_CATA_ALLOW_GLOBAL' type='enum'/>
+ <exports symbol='XML_CATA_PREFER_PUBLIC' type='enum'/>
+ <exports symbol='XML_CATA_ALLOW_DOCUMENT' type='enum'/>
+ <exports symbol='XML_CATA_ALLOW_ALL' type='enum'/>
+ <exports symbol='XML_CATA_PREFER_SYSTEM' type='enum'/>
+ <exports symbol='xmlCatalogAllow' type='typedef'/>
+ <exports symbol='xmlCatalogPrefer' type='typedef'/>
+ <exports symbol='xmlCatalog' type='typedef'/>
+ <exports symbol='xmlCatalogPtr' type='typedef'/>
+ <exports symbol='xmlFreeCatalog' type='function'/>
+ <exports symbol='xmlLoadCatalogs' type='function'/>
+ <exports symbol='xmlCatalogLocalResolve' type='function'/>
+ <exports symbol='xmlACatalogAdd' type='function'/>
+ <exports symbol='xmlACatalogResolvePublic' type='function'/>
+ <exports symbol='xmlCatalogGetDefaults' type='function'/>
+ <exports symbol='xmlACatalogRemove' type='function'/>
+ <exports symbol='xmlCatalogSetDefaultPrefer' type='function'/>
+ <exports symbol='xmlACatalogResolveURI' type='function'/>
+ <exports symbol='xmlCatalogAdd' type='function'/>
+ <exports symbol='xmlCatalogResolvePublic' type='function'/>
+ <exports symbol='xmlCatalogGetSystem' type='function'/>
+ <exports symbol='xmlInitializeCatalog' type='function'/>
+ <exports symbol='xmlLoadCatalog' type='function'/>
+ <exports symbol='xmlCatalogRemove' type='function'/>
+ <exports symbol='xmlCatalogIsEmpty' type='function'/>
+ <exports symbol='xmlACatalogDump' type='function'/>
+ <exports symbol='xmlCatalogFreeLocal' type='function'/>
+ <exports symbol='xmlACatalogResolve' type='function'/>
+ <exports symbol='xmlCatalogResolveSystem' type='function'/>
+ <exports symbol='xmlLoadSGMLSuperCatalog' type='function'/>
+ <exports symbol='xmlCatalogConvert' type='function'/>
+ <exports symbol='xmlCatalogGetPublic' type='function'/>
+ <exports symbol='xmlLoadACatalog' type='function'/>
+ <exports symbol='xmlACatalogResolveSystem' type='function'/>
+ <exports symbol='xmlCatalogLocalResolveURI' type='function'/>
+ <exports symbol='xmlConvertSGMLCatalog' type='function'/>
+ <exports symbol='xmlCatalogAddLocal' type='function'/>
+ <exports symbol='xmlNewCatalog' type='function'/>
+ <exports symbol='xmlParseCatalogFile' type='function'/>
+ <exports symbol='xmlCatalogSetDebug' type='function'/>
+ <exports symbol='xmlCatalogResolve' type='function'/>
+ <exports symbol='xmlCatalogSetDefaults' type='function'/>
+ <exports symbol='xmlCatalogDump' type='function'/>
+ <exports symbol='xmlCatalogCleanup' type='function'/>
+ <exports symbol='xmlCatalogResolveURI' type='function'/>
+ </file>
+ <file name='chvalid'>
+ <summary>Unicode character range checking</summary>
+ <description>this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script </description>
+ <author>William Brack &lt;wbrack@mmm.com.hk&gt; </author>
+ <exports symbol='xmlIsExtender_ch' type='macro'/>
+ <exports symbol='xmlIsPubidCharQ' type='macro'/>
+ <exports symbol='xmlIsPubidChar_ch' type='macro'/>
+ <exports symbol='xmlIsIdeographicQ' type='macro'/>
+ <exports symbol='xmlIsExtenderQ' type='macro'/>
+ <exports symbol='xmlIsChar_ch' type='macro'/>
+ <exports symbol='xmlIsDigitQ' type='macro'/>
+ <exports symbol='xmlIsDigit_ch' type='macro'/>
+ <exports symbol='xmlIsBaseChar_ch' type='macro'/>
+ <exports symbol='xmlIsCombiningQ' type='macro'/>
+ <exports symbol='xmlIsBlankQ' type='macro'/>
+ <exports symbol='xmlIsCharQ' type='macro'/>
+ <exports symbol='xmlIsBaseCharQ' type='macro'/>
+ <exports symbol='xmlIsBlank_ch' type='macro'/>
+ <exports symbol='xmlChLRange' type='typedef'/>
+ <exports symbol='xmlChSRangePtr' type='typedef'/>
+ <exports symbol='xmlChLRangePtr' type='typedef'/>
+ <exports symbol='xmlChRangeGroupPtr' type='typedef'/>
+ <exports symbol='xmlChSRange' type='typedef'/>
+ <exports symbol='xmlChRangeGroup' type='typedef'/>
+ <exports symbol='_xmlChSRange' type='struct'/>
+ <exports symbol='_xmlChLRange' type='struct'/>
+ <exports symbol='_xmlChRangeGroup' type='struct'/>
+ <exports symbol='xmlIsBaseCharGroup' type='variable'/>
+ <exports symbol='xmlIsIdeographicGroup' type='variable'/>
+ <exports symbol='xmlIsDigitGroup' type='variable'/>
+ <exports symbol='xmlIsExtenderGroup' type='variable'/>
+ <exports symbol='xmlIsPubidChar_tab' type='variable'/>
+ <exports symbol='xmlIsCharGroup' type='variable'/>
+ <exports symbol='xmlIsCombiningGroup' type='variable'/>
+ <exports symbol='xmlIsChar' type='function'/>
+ <exports symbol='xmlIsDigit' type='function'/>
+ <exports symbol='xmlIsBlank' type='function'/>
+ <exports symbol='xmlIsIdeographic' type='function'/>
+ <exports symbol='xmlCharInRange' type='function'/>
+ <exports symbol='xmlIsPubidChar' type='function'/>
+ <exports symbol='xmlIsCombining' type='function'/>
+ <exports symbol='xmlIsBaseChar' type='function'/>
+ <exports symbol='xmlIsExtender' type='function'/>
+ </file>
+ <file name='debugXML'>
+ <summary>Tree debugging APIs</summary>
+ <description>Interfaces to a set of routines used for debugging the tree produced by the XML parser. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlShellCtxt' type='typedef'/>
+ <exports symbol='xmlShellCtxtPtr' type='typedef'/>
+ <exports symbol='_xmlShellCtxt' type='struct'/>
+ <exports symbol='xmlDebugDumpAttrList' type='function'/>
+ <exports symbol='xmlLsOneNode' type='function'/>
+ <exports symbol='xmlShellReadlineFunc' type='function'/>
+ <exports symbol='xmlShellSave' type='function'/>
+ <exports symbol='xmlBoolToText' type='function'/>
+ <exports symbol='xmlShellWrite' type='function'/>
+ <exports symbol='xmlShellDu' type='function'/>
+ <exports symbol='xmlShellValidate' type='function'/>
+ <exports symbol='xmlDebugCheckDocument' type='function'/>
+ <exports symbol='xmlShellPrintXPathResult' type='function'/>
+ <exports symbol='xmlShellCmd' type='function'/>
+ <exports symbol='xmlShellLoad' type='function'/>
+ <exports symbol='xmlDebugDumpString' type='function'/>
+ <exports symbol='xmlShellBase' type='function'/>
+ <exports symbol='xmlShellCat' type='function'/>
+ <exports symbol='xmlDebugDumpDTD' type='function'/>
+ <exports symbol='xmlDebugDumpNode' type='function'/>
+ <exports symbol='xmlDebugDumpEntities' type='function'/>
+ <exports symbol='xmlShellPrintNode' type='function'/>
+ <exports symbol='xmlShellPwd' type='function'/>
+ <exports symbol='xmlDebugDumpNodeList' type='function'/>
+ <exports symbol='xmlDebugDumpAttr' type='function'/>
+ <exports symbol='xmlDebugDumpDocument' type='function'/>
+ <exports symbol='xmlLsCountNode' type='function'/>
+ <exports symbol='xmlShellPrintXPathError' type='function'/>
+ <exports symbol='xmlShellDir' type='function'/>
+ <exports symbol='xmlDebugDumpOneNode' type='function'/>
+ <exports symbol='xmlShellList' type='function'/>
+ <exports symbol='xmlDebugDumpDocumentHead' type='function'/>
+ <exports symbol='xmlShell' type='function'/>
+ </file>
+ <file name='dict'>
+ <summary>string dictionnary</summary>
+ <description>dictionary of reusable strings, just used to avoid allocation and freeing operations. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlDict' type='typedef'/>
+ <exports symbol='xmlDictPtr' type='typedef'/>
+ <exports symbol='xmlDictGetUsage' type='function'/>
+ <exports symbol='xmlDictReference' type='function'/>
+ <exports symbol='xmlDictCleanup' type='function'/>
+ <exports symbol='xmlDictSize' type='function'/>
+ <exports symbol='xmlDictExists' type='function'/>
+ <exports symbol='xmlDictSetLimit' type='function'/>
+ <exports symbol='xmlDictOwns' type='function'/>
+ <exports symbol='xmlDictQLookup' type='function'/>
+ <exports symbol='xmlInitializeDict' type='function'/>
+ <exports symbol='xmlDictCreateSub' type='function'/>
+ <exports symbol='xmlDictFree' type='function'/>
+ <exports symbol='xmlDictLookup' type='function'/>
+ <exports symbol='xmlDictCreate' type='function'/>
+ </file>
+ <file name='encoding'>
+ <summary>interface for the encoding conversion functions</summary>
+ <description>interface for the encoding conversion functions needed for XML basic encoding and iconv() support. Related specs are rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies [ISO-10646] UTF-8 and UTF-16 in Annexes [ISO-8859-1] ISO Latin-1 characters codes. [UNICODE] The Unicode Consortium, &quot;The Unicode Standard -- Worldwide Character Encoding -- Version 1.0&quot;, Addison- Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is described in Unicode Technical Report #4. [US-ASCII] Coded Character Set--7-bit American Standard Code for Information Interchange, ANSI X3.4-1986. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_CHAR_ENCODING_UCS4LE' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_ERROR' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_5' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_EBCDIC' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_ASCII' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UCS4_2143' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_NONE' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UTF16BE' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_2022_JP' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_SHIFT_JIS' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UCS4BE' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UTF16LE' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UCS4_3412' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_8' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_9' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_6' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_7' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_4' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_EUC_JP' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_2' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_3' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_8859_1' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UTF8' type='enum'/>
+ <exports symbol='XML_CHAR_ENCODING_UCS2' type='enum'/>
+ <exports symbol='uconv_t' type='typedef'/>
+ <exports symbol='xmlCharEncoding' type='typedef'/>
+ <exports symbol='xmlCharEncodingHandler' type='typedef'/>
+ <exports symbol='xmlCharEncodingHandlerPtr' type='typedef'/>
+ <exports symbol='_xmlCharEncodingHandler' type='struct'/>
+ <exports symbol='_uconv_t' type='struct'/>
+ <exports symbol='xmlDelEncodingAlias' type='function'/>
+ <exports symbol='xmlGetEncodingAlias' type='function'/>
+ <exports symbol='xmlRegisterCharEncodingHandler' type='function'/>
+ <exports symbol='UTF8Toisolat1' type='function'/>
+ <exports symbol='xmlInitCharEncodingHandlers' type='function'/>
+ <exports symbol='xmlAddEncodingAlias' type='function'/>
+ <exports symbol='xmlCleanupEncodingAliases' type='function'/>
+ <exports symbol='xmlCharEncOutFunc' type='function'/>
+ <exports symbol='xmlParseCharEncoding' type='function'/>
+ <exports symbol='xmlCharEncodingInputFunc' type='function'/>
+ <exports symbol='xmlCleanupCharEncodingHandlers' type='function'/>
+ <exports symbol='xmlNewCharEncodingHandler' type='function'/>
+ <exports symbol='xmlCharEncodingOutputFunc' type='function'/>
+ <exports symbol='isolat1ToUTF8' type='function'/>
+ <exports symbol='xmlFindCharEncodingHandler' type='function'/>
+ <exports symbol='xmlCharEncInFunc' type='function'/>
+ <exports symbol='xmlGetCharEncodingHandler' type='function'/>
+ <exports symbol='xmlCharEncFirstLine' type='function'/>
+ <exports symbol='xmlDetectCharEncoding' type='function'/>
+ <exports symbol='xmlCharEncCloseFunc' type='function'/>
+ <exports symbol='xmlGetCharEncodingName' type='function'/>
+ </file>
+ <file name='entities'>
+ <summary>interface for the XML entities handling</summary>
+ <description>this module provides some of the entity API needed for the parser and applications. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_EXTERNAL_GENERAL_PARSED_ENTITY' type='enum'/>
+ <exports symbol='XML_EXTERNAL_GENERAL_UNPARSED_ENTITY' type='enum'/>
+ <exports symbol='XML_INTERNAL_PREDEFINED_ENTITY' type='enum'/>
+ <exports symbol='XML_EXTERNAL_PARAMETER_ENTITY' type='enum'/>
+ <exports symbol='XML_INTERNAL_PARAMETER_ENTITY' type='enum'/>
+ <exports symbol='XML_INTERNAL_GENERAL_ENTITY' type='enum'/>
+ <exports symbol='xmlEntityType' type='typedef'/>
+ <exports symbol='xmlEntitiesTable' type='typedef'/>
+ <exports symbol='xmlEntitiesTablePtr' type='typedef'/>
+ <exports symbol='_xmlEntity' type='struct'/>
+ <exports symbol='xmlAddDocEntity' type='function'/>
+ <exports symbol='xmlNewEntity' type='function'/>
+ <exports symbol='xmlEncodeEntitiesReentrant' type='function'/>
+ <exports symbol='xmlGetDocEntity' type='function'/>
+ <exports symbol='xmlGetDtdEntity' type='function'/>
+ <exports symbol='xmlAddDtdEntity' type='function'/>
+ <exports symbol='xmlCopyEntitiesTable' type='function'/>
+ <exports symbol='xmlFreeEntitiesTable' type='function'/>
+ <exports symbol='xmlGetParameterEntity' type='function'/>
+ <exports symbol='xmlDumpEntitiesTable' type='function'/>
+ <exports symbol='xmlDumpEntityDecl' type='function'/>
+ <exports symbol='xmlCleanupPredefinedEntities' type='function'/>
+ <exports symbol='xmlCreateEntitiesTable' type='function'/>
+ <exports symbol='xmlEncodeEntities' type='function'/>
+ <exports symbol='xmlEncodeSpecialChars' type='function'/>
+ <exports symbol='xmlGetPredefinedEntity' type='function'/>
+ <exports symbol='xmlInitializePredefinedEntities' type='function'/>
+ </file>
+ <file name='globals'>
+ <summary>interface for all global variables of the library</summary>
+ <description>all the global variables and thread handling for those variables is handled by this module. The bottom of this file is automatically generated by build_glob.py based on the description file global.data </description>
+ <author>Gary Pennington &lt;Gary.Pennington@uk.sun.com&gt;, Daniel Veillard </author>
+ <exports symbol='xmlGlobalStatePtr' type='typedef'/>
+ <exports symbol='xmlGlobalState' type='typedef'/>
+ <exports symbol='_xmlGlobalState' type='struct'/>
+ <exports symbol='xmlTreeIndentString' type='variable'/>
+ <exports symbol='xmlIndentTreeOutput' type='variable'/>
+ <exports symbol='xmlDefaultBufferSize' type='variable'/>
+ <exports symbol='xmlRegisterNodeDefaultValue' type='variable'/>
+ <exports symbol='xmlGetWarningsDefaultValue' type='variable'/>
+ <exports symbol='docbDefaultSAXHandler' type='variable'/>
+ <exports symbol='xmlGenericErrorContext' type='variable'/>
+ <exports symbol='xmlDeregisterNodeDefaultValue' type='variable'/>
+ <exports symbol='xmlGenericError' type='variable'/>
+ <exports symbol='xmlMalloc' type='variable'/>
+ <exports symbol='xmlParserVersion' type='variable'/>
+ <exports symbol='xmlStructuredError' type='variable'/>
+ <exports symbol='xmlStructuredErrorContext' type='variable'/>
+ <exports symbol='xmlDoValidityCheckingDefaultValue' type='variable'/>
+ <exports symbol='xmlOutputBufferCreateFilenameValue' type='variable'/>
+ <exports symbol='xmlPedanticParserDefaultValue' type='variable'/>
+ <exports symbol='oldXMLWDcompatibility' type='variable'/>
+ <exports symbol='xmlRealloc' type='variable'/>
+ <exports symbol='xmlMemStrdup' type='variable'/>
+ <exports symbol='htmlDefaultSAXHandler' type='variable'/>
+ <exports symbol='xmlSaveNoEmptyTags' type='variable'/>
+ <exports symbol='xmlParserInputBufferCreateFilenameValue' type='variable'/>
+ <exports symbol='xmlKeepBlanksDefaultValue' type='variable'/>
+ <exports symbol='xmlSubstituteEntitiesDefaultValue' type='variable'/>
+ <exports symbol='xmlMallocAtomic' type='variable'/>
+ <exports symbol='xmlBufferAllocScheme' type='variable'/>
+ <exports symbol='xmlParserDebugEntities' type='variable'/>
+ <exports symbol='xmlFree' type='variable'/>
+ <exports symbol='xmlLoadExtDtdDefaultValue' type='variable'/>
+ <exports symbol='xmlLastError' type='variable'/>
+ <exports symbol='xmlLineNumbersDefaultValue' type='variable'/>
+ <exports symbol='xmlDefaultSAXHandler' type='variable'/>
+ <exports symbol='xmlDefaultSAXLocator' type='variable'/>
+ <exports symbol='xmlThrDefSetStructuredErrorFunc' type='function'/>
+ <exports symbol='xmlInitializeGlobalState' type='function'/>
+ <exports symbol='xmlThrDefBufferAllocScheme' type='function'/>
+ <exports symbol='xmlThrDefPedanticParserDefaultValue' type='function'/>
+ <exports symbol='xmlRegisterNodeDefault' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateFilenameFunc' type='function'/>
+ <exports symbol='xmlThrDefOutputBufferCreateFilenameDefault' type='function'/>
+ <exports symbol='xmlDeregisterNodeDefault' type='function'/>
+ <exports symbol='xmlThrDefDefaultBufferSize' type='function'/>
+ <exports symbol='xmlOutputBufferCreateFilenameDefault' type='function'/>
+ <exports symbol='xmlThrDefLoadExtDtdDefaultValue' type='function'/>
+ <exports symbol='xmlThrDefRegisterNodeDefault' type='function'/>
+ <exports symbol='xmlThrDefKeepBlanksDefaultValue' type='function'/>
+ <exports symbol='xmlDeregisterNodeFunc' type='function'/>
+ <exports symbol='xmlThrDefParserDebugEntities' type='function'/>
+ <exports symbol='xmlThrDefParserInputBufferCreateFilenameDefault' type='function'/>
+ <exports symbol='xmlThrDefSetGenericErrorFunc' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateFilenameDefault' type='function'/>
+ <exports symbol='xmlThrDefDoValidityCheckingDefaultValue' type='function'/>
+ <exports symbol='xmlCleanupGlobals' type='function'/>
+ <exports symbol='xmlThrDefGetWarningsDefaultValue' type='function'/>
+ <exports symbol='xmlThrDefDeregisterNodeDefault' type='function'/>
+ <exports symbol='xmlThrDefSubstituteEntitiesDefaultValue' type='function'/>
+ <exports symbol='xmlRegisterNodeFunc' type='function'/>
+ <exports symbol='xmlThrDefSaveNoEmptyTags' type='function'/>
+ <exports symbol='xmlThrDefIndentTreeOutput' type='function'/>
+ <exports symbol='xmlOutputBufferCreateFilenameFunc' type='function'/>
+ <exports symbol='xmlInitGlobals' type='function'/>
+ <exports symbol='xmlThrDefLineNumbersDefaultValue' type='function'/>
+ <exports symbol='xmlThrDefTreeIndentString' type='function'/>
+ </file>
+ <file name='hash'>
+ <summary>Chained hash tables</summary>
+ <description>This module implements the hash table support used in various places in the library. </description>
+ <author>Bjorn Reese &lt;bjorn.reese@systematic.dk&gt; </author>
+ <exports symbol='XML_CAST_FPTR' type='macro'/>
+ <exports symbol='xmlHashTable' type='typedef'/>
+ <exports symbol='xmlHashTablePtr' type='typedef'/>
+ <exports symbol='xmlHashScanFull' type='function'/>
+ <exports symbol='xmlHashScan' type='function'/>
+ <exports symbol='xmlHashScannerFull' type='function'/>
+ <exports symbol='xmlHashCreateDict' type='function'/>
+ <exports symbol='xmlHashAddEntry' type='function'/>
+ <exports symbol='xmlHashUpdateEntry' type='function'/>
+ <exports symbol='xmlHashQLookup3' type='function'/>
+ <exports symbol='xmlHashQLookup2' type='function'/>
+ <exports symbol='xmlHashScan3' type='function'/>
+ <exports symbol='xmlHashScanner' type='function'/>
+ <exports symbol='xmlHashDeallocator' type='function'/>
+ <exports symbol='xmlHashCreate' type='function'/>
+ <exports symbol='xmlHashFree' type='function'/>
+ <exports symbol='xmlHashLookup' type='function'/>
+ <exports symbol='xmlHashQLookup' type='function'/>
+ <exports symbol='xmlHashUpdateEntry2' type='function'/>
+ <exports symbol='xmlHashRemoveEntry2' type='function'/>
+ <exports symbol='xmlHashRemoveEntry3' type='function'/>
+ <exports symbol='xmlHashCopy' type='function'/>
+ <exports symbol='xmlHashScanFull3' type='function'/>
+ <exports symbol='xmlHashUpdateEntry3' type='function'/>
+ <exports symbol='xmlHashLookup3' type='function'/>
+ <exports symbol='xmlHashLookup2' type='function'/>
+ <exports symbol='xmlHashRemoveEntry' type='function'/>
+ <exports symbol='xmlHashCopier' type='function'/>
+ <exports symbol='xmlHashAddEntry2' type='function'/>
+ <exports symbol='xmlHashAddEntry3' type='function'/>
+ <exports symbol='xmlHashSize' type='function'/>
+ </file>
+ <file name='list'>
+ <summary>lists interfaces</summary>
+ <description>this module implement the list support used in various place in the library. </description>
+ <author>Gary Pennington &lt;Gary.Pennington@uk.sun.com&gt; </author>
+ <exports symbol='xmlLink' type='typedef'/>
+ <exports symbol='xmlLinkPtr' type='typedef'/>
+ <exports symbol='xmlList' type='typedef'/>
+ <exports symbol='xmlListPtr' type='typedef'/>
+ <exports symbol='xmlListInsert' type='function'/>
+ <exports symbol='xmlListEmpty' type='function'/>
+ <exports symbol='xmlListSort' type='function'/>
+ <exports symbol='xmlListDeallocator' type='function'/>
+ <exports symbol='xmlListMerge' type='function'/>
+ <exports symbol='xmlListCreate' type='function'/>
+ <exports symbol='xmlListDup' type='function'/>
+ <exports symbol='xmlListRemoveLast' type='function'/>
+ <exports symbol='xmlListWalk' type='function'/>
+ <exports symbol='xmlListRemoveAll' type='function'/>
+ <exports symbol='xmlListCopy' type='function'/>
+ <exports symbol='xmlListPopFront' type='function'/>
+ <exports symbol='xmlListSearch' type='function'/>
+ <exports symbol='xmlListWalker' type='function'/>
+ <exports symbol='xmlListRemoveFirst' type='function'/>
+ <exports symbol='xmlListReverseWalk' type='function'/>
+ <exports symbol='xmlLinkGetData' type='function'/>
+ <exports symbol='xmlListClear' type='function'/>
+ <exports symbol='xmlListAppend' type='function'/>
+ <exports symbol='xmlListReverse' type='function'/>
+ <exports symbol='xmlListDataCompare' type='function'/>
+ <exports symbol='xmlListSize' type='function'/>
+ <exports symbol='xmlListPushFront' type='function'/>
+ <exports symbol='xmlListEnd' type='function'/>
+ <exports symbol='xmlListPopBack' type='function'/>
+ <exports symbol='xmlListReverseSearch' type='function'/>
+ <exports symbol='xmlListPushBack' type='function'/>
+ <exports symbol='xmlListFront' type='function'/>
+ <exports symbol='xmlListDelete' type='function'/>
+ </file>
+ <file name='nanoftp'>
+ <summary>minimal FTP implementation</summary>
+ <description>minimal FTP implementation allowing to fetch resources like external subset. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='INVALID_SOCKET' type='macro'/>
+ <exports symbol='SOCKET' type='macro'/>
+ <exports symbol='xmlNanoFTPQuit' type='function'/>
+ <exports symbol='xmlNanoFTPClose' type='function'/>
+ <exports symbol='ftpListCallback' type='function'/>
+ <exports symbol='xmlNanoFTPCloseConnection' type='function'/>
+ <exports symbol='xmlNanoFTPProxy' type='function'/>
+ <exports symbol='xmlNanoFTPUpdateURL' type='function'/>
+ <exports symbol='xmlNanoFTPGetConnection' type='function'/>
+ <exports symbol='xmlNanoFTPDele' type='function'/>
+ <exports symbol='xmlNanoFTPNewCtxt' type='function'/>
+ <exports symbol='xmlNanoFTPCheckResponse' type='function'/>
+ <exports symbol='xmlNanoFTPScanProxy' type='function'/>
+ <exports symbol='ftpDataCallback' type='function'/>
+ <exports symbol='xmlNanoFTPGetResponse' type='function'/>
+ <exports symbol='xmlNanoFTPCwd' type='function'/>
+ <exports symbol='xmlNanoFTPInit' type='function'/>
+ <exports symbol='xmlNanoFTPConnectTo' type='function'/>
+ <exports symbol='xmlNanoFTPList' type='function'/>
+ <exports symbol='xmlNanoFTPOpen' type='function'/>
+ <exports symbol='xmlNanoFTPConnect' type='function'/>
+ <exports symbol='xmlNanoFTPGetSocket' type='function'/>
+ <exports symbol='xmlNanoFTPGet' type='function'/>
+ <exports symbol='xmlNanoFTPRead' type='function'/>
+ <exports symbol='xmlNanoFTPFreeCtxt' type='function'/>
+ <exports symbol='xmlNanoFTPCleanup' type='function'/>
+ </file>
+ <file name='nanohttp'>
+ <summary>minimal HTTP implementation</summary>
+ <description>minimal HTTP implementation allowing to fetch resources like external subset. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlNanoHTTPRead' type='function'/>
+ <exports symbol='xmlNanoHTTPSave' type='function'/>
+ <exports symbol='xmlNanoHTTPRedir' type='function'/>
+ <exports symbol='xmlNanoHTTPAuthHeader' type='function'/>
+ <exports symbol='xmlNanoHTTPFetch' type='function'/>
+ <exports symbol='xmlNanoHTTPContentLength' type='function'/>
+ <exports symbol='xmlNanoHTTPMimeType' type='function'/>
+ <exports symbol='xmlNanoHTTPClose' type='function'/>
+ <exports symbol='xmlNanoHTTPCleanup' type='function'/>
+ <exports symbol='xmlNanoHTTPMethod' type='function'/>
+ <exports symbol='xmlNanoHTTPInit' type='function'/>
+ <exports symbol='xmlNanoHTTPOpen' type='function'/>
+ <exports symbol='xmlNanoHTTPOpenRedir' type='function'/>
+ <exports symbol='xmlNanoHTTPMethodRedir' type='function'/>
+ <exports symbol='xmlNanoHTTPScanProxy' type='function'/>
+ <exports symbol='xmlNanoHTTPEncoding' type='function'/>
+ <exports symbol='xmlNanoHTTPReturnCode' type='function'/>
+ </file>
+ <file name='parser'>
+ <summary>the core parser module</summary>
+ <description>Interfaces, constants and types related to the XML parser </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_COMPLETE_ATTRS' type='macro'/>
+ <exports symbol='XML_SKIP_IDS' type='macro'/>
+ <exports symbol='XML_SAX2_MAGIC' type='macro'/>
+ <exports symbol='XML_DETECT_IDS' type='macro'/>
+ <exports symbol='XML_DEFAULT_VERSION' type='macro'/>
+ <exports symbol='XML_WITH_NONE' type='enum'/>
+ <exports symbol='XML_WITH_SCHEMATRON' type='enum'/>
+ <exports symbol='XML_PARSER_ENTITY_DECL' type='enum'/>
+ <exports symbol='XML_PARSER_CONTENT' type='enum'/>
+ <exports symbol='XML_PARSE_NOBLANKS' type='enum'/>
+ <exports symbol='XML_WITH_PATTERN' type='enum'/>
+ <exports symbol='XML_PARSE_NODICT' type='enum'/>
+ <exports symbol='XML_PARSER_SYSTEM_LITERAL' type='enum'/>
+ <exports symbol='XML_WITH_REGEXP' type='enum'/>
+ <exports symbol='XML_PARSER_PI' type='enum'/>
+ <exports symbol='XML_PARSE_UNKNOWN' type='enum'/>
+ <exports symbol='XML_WITH_XPATH' type='enum'/>
+ <exports symbol='XML_WITH_HTML' type='enum'/>
+ <exports symbol='XML_PARSE_OLDSAX' type='enum'/>
+ <exports symbol='XML_WITH_LZMA' type='enum'/>
+ <exports symbol='XML_WITH_ICU' type='enum'/>
+ <exports symbol='XML_WITH_C14N' type='enum'/>
+ <exports symbol='XML_PARSE_PUSH_DOM' type='enum'/>
+ <exports symbol='XML_PARSER_PROLOG' type='enum'/>
+ <exports symbol='XML_PARSE_NONET' type='enum'/>
+ <exports symbol='XML_WITH_HTTP' type='enum'/>
+ <exports symbol='XML_PARSER_EPILOG' type='enum'/>
+ <exports symbol='XML_PARSER_END_TAG' type='enum'/>
+ <exports symbol='XML_WITH_DEBUG' type='enum'/>
+ <exports symbol='XML_WITH_READER' type='enum'/>
+ <exports symbol='XML_PARSE_DTDVALID' type='enum'/>
+ <exports symbol='XML_PARSE_DOM' type='enum'/>
+ <exports symbol='XML_PARSER_ATTRIBUTE_VALUE' type='enum'/>
+ <exports symbol='XML_PARSE_PUSH_SAX' type='enum'/>
+ <exports symbol='XML_WITH_TREE' type='enum'/>
+ <exports symbol='XML_PARSE_RECOVER' type='enum'/>
+ <exports symbol='XML_WITH_SCHEMAS' type='enum'/>
+ <exports symbol='XML_PARSE_PEDANTIC' type='enum'/>
+ <exports symbol='XML_PARSER_EOF' type='enum'/>
+ <exports symbol='XML_PARSER_CDATA_SECTION' type='enum'/>
+ <exports symbol='XML_WITH_LEGACY' type='enum'/>
+ <exports symbol='XML_WITH_OUTPUT' type='enum'/>
+ <exports symbol='XML_PARSE_XINCLUDE' type='enum'/>
+ <exports symbol='XML_PARSE_NOCDATA' type='enum'/>
+ <exports symbol='XML_PARSE_NOBASEFIX' type='enum'/>
+ <exports symbol='XML_PARSE_BIG_LINES' type='enum'/>
+ <exports symbol='XML_WITH_XINCLUDE' type='enum'/>
+ <exports symbol='XML_WITH_PUSH' type='enum'/>
+ <exports symbol='XML_PARSE_READER' type='enum'/>
+ <exports symbol='XML_WITH_THREAD' type='enum'/>
+ <exports symbol='XML_PARSE_SAX' type='enum'/>
+ <exports symbol='XML_PARSE_NOENT' type='enum'/>
+ <exports symbol='XML_PARSER_ENTITY_VALUE' type='enum'/>
+ <exports symbol='XML_PARSE_DTDLOAD' type='enum'/>
+ <exports symbol='XML_PARSE_DTDATTR' type='enum'/>
+ <exports symbol='XML_PARSE_NOWARNING' type='enum'/>
+ <exports symbol='XML_PARSE_OLD10' type='enum'/>
+ <exports symbol='XML_PARSE_NOERROR' type='enum'/>
+ <exports symbol='XML_WITH_ISO8859X' type='enum'/>
+ <exports symbol='XML_WITH_EXPR' type='enum'/>
+ <exports symbol='XML_PARSE_NSCLEAN' type='enum'/>
+ <exports symbol='XML_WITH_UNICODE' type='enum'/>
+ <exports symbol='XML_WITH_CATALOG' type='enum'/>
+ <exports symbol='XML_WITH_MODULES' type='enum'/>
+ <exports symbol='XML_WITH_XPTR' type='enum'/>
+ <exports symbol='XML_PARSE_IGNORE_ENC' type='enum'/>
+ <exports symbol='XML_PARSE_COMPACT' type='enum'/>
+ <exports symbol='XML_PARSE_SAX1' type='enum'/>
+ <exports symbol='XML_WITH_ZLIB' type='enum'/>
+ <exports symbol='XML_PARSE_NOXINCNODE' type='enum'/>
+ <exports symbol='XML_PARSER_DTD' type='enum'/>
+ <exports symbol='XML_PARSER_MISC' type='enum'/>
+ <exports symbol='XML_PARSER_START' type='enum'/>
+ <exports symbol='XML_WITH_DEBUG_MEM' type='enum'/>
+ <exports symbol='XML_PARSE_HUGE' type='enum'/>
+ <exports symbol='XML_WITH_FTP' type='enum'/>
+ <exports symbol='XML_PARSER_START_TAG' type='enum'/>
+ <exports symbol='XML_PARSER_IGNORE' type='enum'/>
+ <exports symbol='XML_PARSER_COMMENT' type='enum'/>
+ <exports symbol='XML_PARSER_PUBLIC_LITERAL' type='enum'/>
+ <exports symbol='XML_WITH_ICONV' type='enum'/>
+ <exports symbol='XML_WITH_WRITER' type='enum'/>
+ <exports symbol='XML_WITH_AUTOMATA' type='enum'/>
+ <exports symbol='XML_WITH_DEBUG_RUN' type='enum'/>
+ <exports symbol='XML_WITH_SAX1' type='enum'/>
+ <exports symbol='XML_WITH_VALID' type='enum'/>
+ <exports symbol='xmlParserNodeInfoSeqPtr' type='typedef'/>
+ <exports symbol='xmlSAXHandlerV1' type='typedef'/>
+ <exports symbol='xmlParserInputState' type='typedef'/>
+ <exports symbol='xmlParserNodeInfoPtr' type='typedef'/>
+ <exports symbol='xmlParserNodeInfoSeq' type='typedef'/>
+ <exports symbol='xmlFeature' type='typedef'/>
+ <exports symbol='xmlParserMode' type='typedef'/>
+ <exports symbol='xmlParserOption' type='typedef'/>
+ <exports symbol='xmlSAXHandlerV1Ptr' type='typedef'/>
+ <exports symbol='xmlParserNodeInfo' type='typedef'/>
+ <exports symbol='_xmlParserNodeInfo' type='struct'/>
+ <exports symbol='_xmlParserCtxt' type='struct'/>
+ <exports symbol='_xmlSAXHandlerV1' type='struct'/>
+ <exports symbol='_xmlParserInput' type='struct'/>
+ <exports symbol='_xmlSAXHandler' type='struct'/>
+ <exports symbol='_xmlParserNodeInfoSeq' type='struct'/>
+ <exports symbol='_xmlSAXLocator' type='struct'/>
+ <exports symbol='xmlSetupParserForBuffer' type='function'/>
+ <exports symbol='xmlCtxtReadFile' type='function'/>
+ <exports symbol='xmlParseCtxtExternalEntity' type='function'/>
+ <exports symbol='attributeDeclSAXFunc' type='function'/>
+ <exports symbol='getEntitySAXFunc' type='function'/>
+ <exports symbol='startElementSAXFunc' type='function'/>
+ <exports symbol='charactersSAXFunc' type='function'/>
+ <exports symbol='xmlClearNodeInfoSeq' type='function'/>
+ <exports symbol='xmlParseChunk' type='function'/>
+ <exports symbol='xmlParseEntity' type='function'/>
+ <exports symbol='xmlRecoverFile' type='function'/>
+ <exports symbol='xmlCtxtReadDoc' type='function'/>
+ <exports symbol='startElementNsSAX2Func' type='function'/>
+ <exports symbol='xmlCreateIOParserCtxt' type='function'/>
+ <exports symbol='xmlParseInNodeContext' type='function'/>
+ <exports symbol='referenceSAXFunc' type='function'/>
+ <exports symbol='hasExternalSubsetSAXFunc' type='function'/>
+ <exports symbol='xmlSAXParseDoc' type='function'/>
+ <exports symbol='xmlReadMemory' type='function'/>
+ <exports symbol='xmlParseMemory' type='function'/>
+ <exports symbol='xmlNewIOInputStream' type='function'/>
+ <exports symbol='processingInstructionSAXFunc' type='function'/>
+ <exports symbol='xmlParseBalancedChunkMemoryRecover' type='function'/>
+ <exports symbol='xmlInitParser' type='function'/>
+ <exports symbol='xmlCreateDocParserCtxt' type='function'/>
+ <exports symbol='errorSAXFunc' type='function'/>
+ <exports symbol='xmlSAXParseMemory' type='function'/>
+ <exports symbol='xmlRecoverMemory' type='function'/>
+ <exports symbol='xmlExternalEntityLoader' type='function'/>
+ <exports symbol='hasInternalSubsetSAXFunc' type='function'/>
+ <exports symbol='cdataBlockSAXFunc' type='function'/>
+ <exports symbol='xmlSAXParseFile' type='function'/>
+ <exports symbol='xmlParserInputDeallocate' type='function'/>
+ <exports symbol='xmlCtxtReadIO' type='function'/>
+ <exports symbol='xmlSAXParseMemoryWithData' type='function'/>
+ <exports symbol='xmlGetFeature' type='function'/>
+ <exports symbol='xmlIOParseDTD' type='function'/>
+ <exports symbol='xmlFreeParserCtxt' type='function'/>
+ <exports symbol='xmlParseDTD' type='function'/>
+ <exports symbol='xmlRecoverDoc' type='function'/>
+ <exports symbol='commentSAXFunc' type='function'/>
+ <exports symbol='xmlInitParserCtxt' type='function'/>
+ <exports symbol='attributeSAXFunc' type='function'/>
+ <exports symbol='xmlParserInputGrow' type='function'/>
+ <exports symbol='xmlCtxtReadMemory' type='function'/>
+ <exports symbol='externalSubsetSAXFunc' type='function'/>
+ <exports symbol='resolveEntitySAXFunc' type='function'/>
+ <exports symbol='xmlPedanticParserDefault' type='function'/>
+ <exports symbol='xmlSAXParseEntity' type='function'/>
+ <exports symbol='xmlParseDoc' type='function'/>
+ <exports symbol='xmlSAXParseFileWithData' type='function'/>
+ <exports symbol='xmlLineNumbersDefault' type='function'/>
+ <exports symbol='xmlGetExternalEntityLoader' type='function'/>
+ <exports symbol='elementDeclSAXFunc' type='function'/>
+ <exports symbol='xmlCtxtUseOptions' type='function'/>
+ <exports symbol='xmlCreatePushParserCtxt' type='function'/>
+ <exports symbol='xmlParserAddNodeInfo' type='function'/>
+ <exports symbol='xmlCtxtReadFd' type='function'/>
+ <exports symbol='internalSubsetSAXFunc' type='function'/>
+ <exports symbol='xmlNewParserCtxt' type='function'/>
+ <exports symbol='endDocumentSAXFunc' type='function'/>
+ <exports symbol='xmlParseFile' type='function'/>
+ <exports symbol='xmlParseDocument' type='function'/>
+ <exports symbol='setDocumentLocatorSAXFunc' type='function'/>
+ <exports symbol='getParameterEntitySAXFunc' type='function'/>
+ <exports symbol='ignorableWhitespaceSAXFunc' type='function'/>
+ <exports symbol='xmlInitNodeInfoSeq' type='function'/>
+ <exports symbol='xmlSubstituteEntitiesDefault' type='function'/>
+ <exports symbol='endElementSAXFunc' type='function'/>
+ <exports symbol='xmlParserFindNodeInfoIndex' type='function'/>
+ <exports symbol='xmlByteConsumed' type='function'/>
+ <exports symbol='xmlCtxtReset' type='function'/>
+ <exports symbol='xmlSetFeature' type='function'/>
+ <exports symbol='xmlKeepBlanksDefault' type='function'/>
+ <exports symbol='xmlParserInputRead' type='function'/>
+ <exports symbol='xmlReadFile' type='function'/>
+ <exports symbol='xmlGetFeaturesList' type='function'/>
+ <exports symbol='xmlHasFeature' type='function'/>
+ <exports symbol='unparsedEntityDeclSAXFunc' type='function'/>
+ <exports symbol='xmlSAXUserParseFile' type='function'/>
+ <exports symbol='fatalErrorSAXFunc' type='function'/>
+ <exports symbol='xmlSAXParseDTD' type='function'/>
+ <exports symbol='xmlParserFindNodeInfo' type='function'/>
+ <exports symbol='entityDeclSAXFunc' type='function'/>
+ <exports symbol='xmlLoadExternalEntity' type='function'/>
+ <exports symbol='xmlStopParser' type='function'/>
+ <exports symbol='xmlReadFd' type='function'/>
+ <exports symbol='xmlParseExtParsedEnt' type='function'/>
+ <exports symbol='xmlReadIO' type='function'/>
+ <exports symbol='xmlReadDoc' type='function'/>
+ <exports symbol='xmlSAXUserParseMemory' type='function'/>
+ <exports symbol='xmlParseBalancedChunkMemory' type='function'/>
+ <exports symbol='endElementNsSAX2Func' type='function'/>
+ <exports symbol='xmlCleanupParser' type='function'/>
+ <exports symbol='xmlCtxtResetPush' type='function'/>
+ <exports symbol='isStandaloneSAXFunc' type='function'/>
+ <exports symbol='startDocumentSAXFunc' type='function'/>
+ <exports symbol='xmlClearParserCtxt' type='function'/>
+ <exports symbol='xmlParseExternalEntity' type='function'/>
+ <exports symbol='notationDeclSAXFunc' type='function'/>
+ <exports symbol='warningSAXFunc' type='function'/>
+ <exports symbol='xmlSetExternalEntityLoader' type='function'/>
+ </file>
+ <file name='parserInternals'>
+ <summary>internals routines and limits exported by the parser.</summary>
+ <description>this module exports a number of internal parsing routines they are not really all intended for applications but can prove useful doing low level processing. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SUBSTITUTE_REF' type='macro'/>
+ <exports symbol='IS_BLANK' type='macro'/>
+ <exports symbol='IS_BYTE_CHAR' type='macro'/>
+ <exports symbol='IS_PUBIDCHAR' type='macro'/>
+ <exports symbol='IS_DIGIT_CH' type='macro'/>
+ <exports symbol='IS_EXTENDER' type='macro'/>
+ <exports symbol='IS_ASCII_DIGIT' type='macro'/>
+ <exports symbol='IS_COMBINING_CH' type='macro'/>
+ <exports symbol='IS_CHAR' type='macro'/>
+ <exports symbol='IS_LETTER' type='macro'/>
+ <exports symbol='IS_IDEOGRAPHIC' type='macro'/>
+ <exports symbol='MOVETO_STARTTAG' type='macro'/>
+ <exports symbol='XML_MAX_NAME_LENGTH' type='macro'/>
+ <exports symbol='IS_ASCII_LETTER' type='macro'/>
+ <exports symbol='IS_DIGIT' type='macro'/>
+ <exports symbol='XML_MAX_DICTIONARY_LIMIT' type='macro'/>
+ <exports symbol='XML_SUBSTITUTE_PEREF' type='macro'/>
+ <exports symbol='MOVETO_ENDTAG' type='macro'/>
+ <exports symbol='SKIP_EOL' type='macro'/>
+ <exports symbol='IS_EXTENDER_CH' type='macro'/>
+ <exports symbol='IS_BLANK_CH' type='macro'/>
+ <exports symbol='IS_LETTER_CH' type='macro'/>
+ <exports symbol='XML_MAX_LOOKUP_LIMIT' type='macro'/>
+ <exports symbol='XML_MAX_TEXT_LENGTH' type='macro'/>
+ <exports symbol='XML_SUBSTITUTE_NONE' type='macro'/>
+ <exports symbol='IS_COMBINING' type='macro'/>
+ <exports symbol='XML_MAX_NAMELEN' type='macro'/>
+ <exports symbol='IS_BASECHAR' type='macro'/>
+ <exports symbol='INPUT_CHUNK' type='macro'/>
+ <exports symbol='IS_PUBIDCHAR_CH' type='macro'/>
+ <exports symbol='IS_CHAR_CH' type='macro'/>
+ <exports symbol='XML_SUBSTITUTE_BOTH' type='macro'/>
+ <exports symbol='xmlStringTextNoenc' type='variable'/>
+ <exports symbol='xmlStringComment' type='variable'/>
+ <exports symbol='xmlStringText' type='variable'/>
+ <exports symbol='xmlParserMaxDepth' type='variable'/>
+ <exports symbol='nodePop' type='function'/>
+ <exports symbol='xmlParseNotationDecl' type='function'/>
+ <exports symbol='xmlParseExternalSubset' type='function'/>
+ <exports symbol='xmlParseMisc' type='function'/>
+ <exports symbol='xmlSwitchInputEncoding' type='function'/>
+ <exports symbol='xmlNewStringInputStream' type='function'/>
+ <exports symbol='xmlParseExternalID' type='function'/>
+ <exports symbol='xmlScanName' type='function'/>
+ <exports symbol='xmlParseElementDecl' type='function'/>
+ <exports symbol='xmlParseMarkupDecl' type='function'/>
+ <exports symbol='htmlCreateFileParserCtxt' type='function'/>
+ <exports symbol='inputPush' type='function'/>
+ <exports symbol='xmlStringLenDecodeEntities' type='function'/>
+ <exports symbol='namePop' type='function'/>
+ <exports symbol='xmlParseContent' type='function'/>
+ <exports symbol='xmlNewInputStream' type='function'/>
+ <exports symbol='xmlNamespaceParseQName' type='function'/>
+ <exports symbol='xmlNewInputFromFile' type='function'/>
+ <exports symbol='xmlParserHandlePEReference' type='function'/>
+ <exports symbol='xmlStringDecodeEntities' type='function'/>
+ <exports symbol='xmlCreateFileParserCtxt' type='function'/>
+ <exports symbol='xmlParseCharRef' type='function'/>
+ <exports symbol='xmlParseElement' type='function'/>
+ <exports symbol='xmlParseTextDecl' type='function'/>
+ <exports symbol='xmlNewEntityInputStream' type='function'/>
+ <exports symbol='xmlCopyCharMultiByte' type='function'/>
+ <exports symbol='xmlParseElementChildrenContentDecl' type='function'/>
+ <exports symbol='xmlParseCharData' type='function'/>
+ <exports symbol='xmlParseVersionInfo' type='function'/>
+ <exports symbol='xmlParseSDDecl' type='function'/>
+ <exports symbol='xmlParseEnumeratedType' type='function'/>
+ <exports symbol='xmlHandleEntity' type='function'/>
+ <exports symbol='xmlCurrentChar' type='function'/>
+ <exports symbol='xmlSkipBlankChars' type='function'/>
+ <exports symbol='xmlParseNotationType' type='function'/>
+ <exports symbol='xmlParserInputShrink' type='function'/>
+ <exports symbol='xmlSetEntityReferenceFunc' type='function'/>
+ <exports symbol='xmlFreeInputStream' type='function'/>
+ <exports symbol='xmlParsePEReference' type='function'/>
+ <exports symbol='xmlCreateURLParserCtxt' type='function'/>
+ <exports symbol='xmlIsLetter' type='function'/>
+ <exports symbol='xmlCheckLanguageID' type='function'/>
+ <exports symbol='xmlNextChar' type='function'/>
+ <exports symbol='xmlParseEnumerationType' type='function'/>
+ <exports symbol='xmlParseAttributeType' type='function'/>
+ <exports symbol='xmlParseDefaultDecl' type='function'/>
+ <exports symbol='xmlParseSystemLiteral' type='function'/>
+ <exports symbol='xmlParseAttValue' type='function'/>
+ <exports symbol='xmlCreateMemoryParserCtxt' type='function'/>
+ <exports symbol='xmlParseAttributeListDecl' type='function'/>
+ <exports symbol='xmlParseName' type='function'/>
+ <exports symbol='xmlParseEncName' type='function'/>
+ <exports symbol='nodePush' type='function'/>
+ <exports symbol='xmlSwitchEncoding' type='function'/>
+ <exports symbol='xmlSwitchToEncoding' type='function'/>
+ <exports symbol='xmlParseEntityRef' type='function'/>
+ <exports symbol='xmlParseAttribute' type='function'/>
+ <exports symbol='xmlParseEndTag' type='function'/>
+ <exports symbol='xmlParseEncodingDecl' type='function'/>
+ <exports symbol='htmlInitAutoClose' type='function'/>
+ <exports symbol='xmlCreateEntityParserCtxt' type='function'/>
+ <exports symbol='xmlSplitQName' type='function'/>
+ <exports symbol='xmlParserHandleReference' type='function'/>
+ <exports symbol='xmlParsePITarget' type='function'/>
+ <exports symbol='xmlParseElementContentDecl' type='function'/>
+ <exports symbol='inputPop' type='function'/>
+ <exports symbol='xmlPopInput' type='function'/>
+ <exports symbol='xmlParsePubidLiteral' type='function'/>
+ <exports symbol='xmlPushInput' type='function'/>
+ <exports symbol='xmlParseEntityValue' type='function'/>
+ <exports symbol='xmlDecodeEntities' type='function'/>
+ <exports symbol='xmlParseVersionNum' type='function'/>
+ <exports symbol='xmlParseXMLDecl' type='function'/>
+ <exports symbol='xmlEntityReferenceFunc' type='function'/>
+ <exports symbol='xmlParseElementMixedContentDecl' type='function'/>
+ <exports symbol='xmlParseQuotedString' type='function'/>
+ <exports symbol='xmlNamespaceParseNSDef' type='function'/>
+ <exports symbol='xmlParseCDSect' type='function'/>
+ <exports symbol='xmlStringCurrentChar' type='function'/>
+ <exports symbol='xmlParseComment' type='function'/>
+ <exports symbol='xmlErrMemory' type='function'/>
+ <exports symbol='xmlNamespaceParseNCName' type='function'/>
+ <exports symbol='xmlParseNmtoken' type='function'/>
+ <exports symbol='xmlParseReference' type='function'/>
+ <exports symbol='namePush' type='function'/>
+ <exports symbol='xmlParseNamespace' type='function'/>
+ <exports symbol='xmlCopyChar' type='function'/>
+ <exports symbol='xmlParsePI' type='function'/>
+ <exports symbol='xmlParseDocTypeDecl' type='function'/>
+ <exports symbol='xmlParseStartTag' type='function'/>
+ <exports symbol='xmlParseEntityDecl' type='function'/>
+ </file>
+ <file name='pattern'>
+ <summary>pattern expression handling</summary>
+ <description>allows to compile and test pattern expressions for nodes either in a tree or based on a parser state. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_PATTERN_DEFAULT' type='enum'/>
+ <exports symbol='XML_PATTERN_XSFIELD' type='enum'/>
+ <exports symbol='XML_PATTERN_XSSEL' type='enum'/>
+ <exports symbol='XML_PATTERN_XPATH' type='enum'/>
+ <exports symbol='xmlStreamCtxtPtr' type='typedef'/>
+ <exports symbol='xmlPatternFlags' type='typedef'/>
+ <exports symbol='xmlStreamCtxt' type='typedef'/>
+ <exports symbol='xmlPattern' type='typedef'/>
+ <exports symbol='xmlPatternPtr' type='typedef'/>
+ <exports symbol='xmlPatternMinDepth' type='function'/>
+ <exports symbol='xmlPatternGetStreamCtxt' type='function'/>
+ <exports symbol='xmlPatternFromRoot' type='function'/>
+ <exports symbol='xmlFreePatternList' type='function'/>
+ <exports symbol='xmlPatternStreamable' type='function'/>
+ <exports symbol='xmlStreamPushAttr' type='function'/>
+ <exports symbol='xmlPatternMatch' type='function'/>
+ <exports symbol='xmlStreamWantsAnyNode' type='function'/>
+ <exports symbol='xmlStreamPop' type='function'/>
+ <exports symbol='xmlFreePattern' type='function'/>
+ <exports symbol='xmlStreamPush' type='function'/>
+ <exports symbol='xmlPatternMaxDepth' type='function'/>
+ <exports symbol='xmlPatterncompile' type='function'/>
+ <exports symbol='xmlStreamPushNode' type='function'/>
+ <exports symbol='xmlFreeStreamCtxt' type='function'/>
+ </file>
+ <file name='relaxng'>
+ <summary>implementation of the Relax-NG validation</summary>
+ <description>implementation of the Relax-NG validation </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_RELAXNG_ERR_DUPID' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_VALELEM' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ATTRVALID' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_LISTELEM' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_LISTEXTRA' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ATTRNONS' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_EXTRADATA' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMNONS' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMEXTRANS' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_DATATYPE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_TYPECMP' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_VALUE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_NOGRAMMAR' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_INTERSEQ' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_LACKDATA' type='enum'/>
+ <exports symbol='XML_RELAXNGP_FREE_DOC' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ATTRNAME' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMNOTEMPTY' type='enum'/>
+ <exports symbol='XML_RELAXNG_OK' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_INTERNODATA' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ATTRWRONGNS' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_EXTRACONTENT' type='enum'/>
+ <exports symbol='XML_RELAXNGP_NONE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMWRONG' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_LISTEMPTY' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ATTREXTRANS' type='enum'/>
+ <exports symbol='XML_RELAXNGP_CRNG' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_TEXTWRONG' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_INVALIDATTR' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMWRONGNS' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_CONTENTVALID' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_TYPEVAL' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_LIST' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_TYPE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_NOELEM' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_MEMORY' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_ELEMNAME' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_DATAELEM' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_NODEFINE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_NOSTATE' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_INTEREXTRA' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_INTERNAL' type='enum'/>
+ <exports symbol='XML_RELAXNG_ERR_NOTELEM' type='enum'/>
+ <exports symbol='xmlRelaxNG' type='typedef'/>
+ <exports symbol='xmlRelaxNGPtr' type='typedef'/>
+ <exports symbol='xmlRelaxNGValidErr' type='typedef'/>
+ <exports symbol='xmlRelaxNGParserCtxt' type='typedef'/>
+ <exports symbol='xmlRelaxNGParserCtxtPtr' type='typedef'/>
+ <exports symbol='xmlRelaxNGParserFlag' type='typedef'/>
+ <exports symbol='xmlRelaxNGValidCtxt' type='typedef'/>
+ <exports symbol='xmlRelaxNGValidCtxtPtr' type='typedef'/>
+ <exports symbol='xmlRelaxNGFreeValidCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGNewDocParserCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGSetValidErrors' type='function'/>
+ <exports symbol='xmlRelaxNGNewParserCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGGetParserErrors' type='function'/>
+ <exports symbol='xmlRelaxNGValidatePopElement' type='function'/>
+ <exports symbol='xmlRelaxNGNewValidCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGNewMemParserCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGDump' type='function'/>
+ <exports symbol='xmlRelaxNGSetParserErrors' type='function'/>
+ <exports symbol='xmlRelaxNGParse' type='function'/>
+ <exports symbol='xmlRelaxNGSetParserStructuredErrors' type='function'/>
+ <exports symbol='xmlRelaxNGValidateFullElement' type='function'/>
+ <exports symbol='xmlRelaxNGValidityErrorFunc' type='function'/>
+ <exports symbol='xmlRelaxNGValidatePushElement' type='function'/>
+ <exports symbol='xmlRelaxNGFree' type='function'/>
+ <exports symbol='xmlRelaxNGValidateDoc' type='function'/>
+ <exports symbol='xmlRelaxNGSetValidStructuredErrors' type='function'/>
+ <exports symbol='xmlRelaxNGFreeParserCtxt' type='function'/>
+ <exports symbol='xmlRelaxNGGetValidErrors' type='function'/>
+ <exports symbol='xmlRelaxNGInitTypes' type='function'/>
+ <exports symbol='xmlRelaxNGDumpTree' type='function'/>
+ <exports symbol='xmlRelaxNGCleanupTypes' type='function'/>
+ <exports symbol='xmlRelaxNGValidatePushCData' type='function'/>
+ <exports symbol='xmlRelaxParserSetFlag' type='function'/>
+ <exports symbol='xmlRelaxNGValidityWarningFunc' type='function'/>
+ </file>
+ <file name='schemasInternals'>
+ <summary>internal interfaces for XML Schemas</summary>
+ <description>internal interfaces for the XML Schemas handling and schema validity checking The Schemas development is a Work In Progress. Some of those interfaces are not garanteed to be API or ABI stable ! </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FIXUP_1' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_CIRCULAR' type='macro'/>
+ <exports symbol='XML_SCHEMAS_QUALIF_ATTR' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_REQUIRED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_COLLAPSE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_VARIETY_UNION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANY_STRICT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_INTERNAL_RESOLVED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_QUALIF_ELEM' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_VARIETY_LIST' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_CHECKED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_INCLUDING_CONVERT_NS' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_INTERNAL_RESOLVED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_PROHIBITED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_NILLABLE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTRGROUP_REDEFINED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_BLOCK_DEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FINAL_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_REDEFINED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_FIXED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FINAL_LIST' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_USE_OPTIONAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_NSDEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_WHITESPACE_REPLACE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_BLOCK_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANYATTR_STRICT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_UNKNOWN' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTRGROUP_MARKED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_PRESERVE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_BLOCK_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_GLOBAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANYATTR_SKIP' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANYATTR_LAX' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_GLOBAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_ABSTRACT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_MIXED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTR_FIXED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANY_SKIP' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_LIST' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_VARIETY_ABSENT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_FINAL_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_WILDCARD_COMPLETE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_NSDEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_GLOBAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_TOPLEVEL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ANY_LAX' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FINAL_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_HAS_FACETS' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_FINAL_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_NORMVALUENEEDED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_FINAL_ABSENT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_BLOCK_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_INTERNAL_INVALID' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTRGROUP_HAS_REFS' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_ABSTRACT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FINAL_UNION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FINAL_DEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_FACETSNEEDVALUE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FINAL_DEFAULT_UNION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_BLOCK_RESTRICTION' type='macro'/>
+ <exports symbol='XML_SCHEMAS_FACET_REPLACE' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_DEFAULT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_TYPE_MARKED' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_BLOCK_ABSENT' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ATTRGROUP_GLOBAL' type='macro'/>
+ <exports symbol='XML_SCHEMAS_ELEM_REF' type='macro'/>
+ <exports symbol='XML_SCHEMA_EXTRA_QNAMEREF' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_EXTENSION' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NMTOKEN' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ID' type='enum'/>
+ <exports symbol='XML_SCHEMAS_TIME' type='enum'/>
+ <exports symbol='XML_SCHEMAS_UBYTE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_DATETIME' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NNINTEGER' type='enum'/>
+ <exports symbol='XML_SCHEMAS_HEXBINARY' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_UNION' type='enum'/>
+ <exports symbol='XML_SCHEMAS_UNKNOWN' type='enum'/>
+ <exports symbol='XML_SCHEMAS_UINT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NPINTEGER' type='enum'/>
+ <exports symbol='XML_SCHEMAS_GMONTHDAY' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MAXEXCLUSIVE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ULONG' type='enum'/>
+ <exports symbol='XML_SCHEMAS_PINTEGER' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_CHOICE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_DECIMAL' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_UR' type='enum'/>
+ <exports symbol='XML_SCHEMAS_DOUBLE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NINTEGER' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NORMSTRING' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_PARTICLE' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NCNAME' type='enum'/>
+ <exports symbol='XML_SCHEMAS_LONG' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_BOOLEAN' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ENTITY' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/>
+ <exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/>
+ <exports symbol='XML_SCHEMAS_BASE64BINARY' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_WHITESPACE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_IDREF' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_TOTALDIGITS' type='enum'/>
+ <exports symbol='XML_SCHEMAS_QNAME' type='enum'/>
+ <exports symbol='XML_SCHEMAS_TOKEN' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_BASIC' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_ENUMERATION' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_UNKNOWN' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MININCLUSIVE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_GMONTH' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_ELEMENTS' type='enum'/>
+ <exports symbol='XML_SCHEMAS_GYEAR' type='enum'/>
+ <exports symbol='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' type='enum'/>
+ <exports symbol='XML_SCHEMAS_BYTE' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ALL' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_IDC_KEYREF' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NOTATION' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MAXINCLUSIVE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NAME' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_LIST' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE_USE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_GDAY' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ANY' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ANYURI' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_COMPLEX' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ATTRIBUTEGROUP' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_BASIC' type='enum'/>
+ <exports symbol='XML_SCHEMAS_IDREFS' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_IDC_UNIQUE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_LENGTH' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_SIMPLE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_PATTERN' type='enum'/>
+ <exports symbol='XML_SCHEMAS_SHORT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_LANGUAGE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ANYSIMPLETYPE' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_MIXED' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ANYTYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_DURATION' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_FACET' type='enum'/>
+ <exports symbol='XML_SCHEMAS_NMTOKENS' type='enum'/>
+ <exports symbol='XML_SCHEMAS_USHORT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_INTEGER' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_COMPLEX_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MINEXCLUSIVE' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_IDC_KEY' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_SIMPLE_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_FLOAT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ENTITIES' type='enum'/>
+ <exports symbol='XML_SCHEMAS_DATE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_STRING' type='enum'/>
+ <exports symbol='XML_SCHEMAS_INT' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_NOTATION' type='enum'/>
+ <exports symbol='XML_SCHEMA_CONTENT_ANY' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MINLENGTH' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_RESTRICTION' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_SEQUENCE' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ELEMENT' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_MAXLENGTH' type='enum'/>
+ <exports symbol='xmlSchemaAttributeGroupPtr' type='typedef'/>
+ <exports symbol='xmlSchemaElementPtr' type='typedef'/>
+ <exports symbol='xmlSchemaFacetLinkPtr' type='typedef'/>
+ <exports symbol='xmlSchemaVal' type='typedef'/>
+ <exports symbol='xmlSchemaAttributeLinkPtr' type='typedef'/>
+ <exports symbol='xmlSchemaType' type='typedef'/>
+ <exports symbol='xmlSchemaAnnot' type='typedef'/>
+ <exports symbol='xmlSchemaAnnotPtr' type='typedef'/>
+ <exports symbol='xmlSchemaElement' type='typedef'/>
+ <exports symbol='xmlSchemaWildcard' type='typedef'/>
+ <exports symbol='xmlSchemaWildcardPtr' type='typedef'/>
+ <exports symbol='xmlSchemaFacetPtr' type='typedef'/>
+ <exports symbol='xmlSchemaTypeLink' type='typedef'/>
+ <exports symbol='xmlSchemaAttributeLink' type='typedef'/>
+ <exports symbol='xmlSchemaValPtr' type='typedef'/>
+ <exports symbol='xmlSchemaFacetLink' type='typedef'/>
+ <exports symbol='xmlSchemaWildcardNsPtr' type='typedef'/>
+ <exports symbol='xmlSchemaAttributeGroup' type='typedef'/>
+ <exports symbol='xmlSchemaTypeLinkPtr' type='typedef'/>
+ <exports symbol='xmlSchemaWildcardNs' type='typedef'/>
+ <exports symbol='xmlSchemaAttributePtr' type='typedef'/>
+ <exports symbol='xmlSchemaNotationPtr' type='typedef'/>
+ <exports symbol='xmlSchemaValType' type='typedef'/>
+ <exports symbol='xmlSchemaTypePtr' type='typedef'/>
+ <exports symbol='xmlSchemaNotation' type='typedef'/>
+ <exports symbol='xmlSchemaFacet' type='typedef'/>
+ <exports symbol='xmlSchemaContentType' type='typedef'/>
+ <exports symbol='xmlSchemaTypeType' type='typedef'/>
+ <exports symbol='xmlSchemaAttribute' type='typedef'/>
+ <exports symbol='_xmlSchemaWildcardNs' type='struct'/>
+ <exports symbol='_xmlSchemaNotation' type='struct'/>
+ <exports symbol='_xmlSchemaAttribute' type='struct'/>
+ <exports symbol='_xmlSchemaType' type='struct'/>
+ <exports symbol='_xmlSchemaAttributeGroup' type='struct'/>
+ <exports symbol='_xmlSchemaFacetLink' type='struct'/>
+ <exports symbol='_xmlSchemaElement' type='struct'/>
+ <exports symbol='_xmlSchema' type='struct'/>
+ <exports symbol='_xmlSchemaAttributeLink' type='struct'/>
+ <exports symbol='_xmlSchemaFacet' type='struct'/>
+ <exports symbol='_xmlSchemaWildcard' type='struct'/>
+ <exports symbol='_xmlSchemaTypeLink' type='struct'/>
+ <exports symbol='_xmlSchemaAnnot' type='struct'/>
+ <exports symbol='xmlSchemaFreeType' type='function'/>
+ <exports symbol='xmlSchemaFreeWildcard' type='function'/>
+ </file>
+ <file name='schematron'>
+ <summary>XML Schemastron implementation</summary>
+ <description>interface to the XML Schematron validity checking. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SCHEMATRON_OUT_IO' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_BUFFER' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_FILE' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_XML' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_TEXT' type='enum'/>
+ <exports symbol='XML_SCHEMATRON_OUT_QUIET' type='enum'/>
+ <exports symbol='xmlSchematronValidCtxt' type='typedef'/>
+ <exports symbol='xmlSchematronValidOptions' type='typedef'/>
+ <exports symbol='xmlSchematronPtr' type='typedef'/>
+ <exports symbol='xmlSchematronParserCtxt' type='typedef'/>
+ <exports symbol='xmlSchematron' type='typedef'/>
+ <exports symbol='xmlSchematronValidCtxtPtr' type='typedef'/>
+ <exports symbol='xmlSchematronParserCtxtPtr' type='typedef'/>
+ <exports symbol='xmlSchematronValidateDoc' type='function'/>
+ <exports symbol='xmlSchematronFreeParserCtxt' type='function'/>
+ <exports symbol='xmlSchematronNewMemParserCtxt' type='function'/>
+ <exports symbol='xmlSchematronValidityErrorFunc' type='function'/>
+ <exports symbol='xmlSchematronNewParserCtxt' type='function'/>
+ <exports symbol='xmlSchematronValidityWarningFunc' type='function'/>
+ <exports symbol='xmlSchematronFree' type='function'/>
+ <exports symbol='xmlSchematronSetValidStructuredErrors' type='function'/>
+ <exports symbol='xmlSchematronFreeValidCtxt' type='function'/>
+ <exports symbol='xmlSchematronParse' type='function'/>
+ <exports symbol='xmlSchematronNewDocParserCtxt' type='function'/>
+ <exports symbol='xmlSchematronNewValidCtxt' type='function'/>
+ </file>
+ <file name='threads'>
+ <summary>interfaces for thread handling</summary>
+ <description>set of generic threading related routines should work with pthreads, Windows native or TLS threads </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlMutex' type='typedef'/>
+ <exports symbol='xmlRMutex' type='typedef'/>
+ <exports symbol='xmlRMutexPtr' type='typedef'/>
+ <exports symbol='xmlMutexPtr' type='typedef'/>
+ <exports symbol='xmlFreeRMutex' type='function'/>
+ <exports symbol='xmlGetThreadId' type='function'/>
+ <exports symbol='xmlMutexUnlock' type='function'/>
+ <exports symbol='xmlCleanupThreads' type='function'/>
+ <exports symbol='xmlLockLibrary' type='function'/>
+ <exports symbol='xmlNewRMutex' type='function'/>
+ <exports symbol='xmlMutexLock' type='function'/>
+ <exports symbol='xmlIsMainThread' type='function'/>
+ <exports symbol='xmlRMutexUnlock' type='function'/>
+ <exports symbol='xmlGetGlobalState' type='function'/>
+ <exports symbol='xmlNewMutex' type='function'/>
+ <exports symbol='xmlDllMain' type='function'/>
+ <exports symbol='xmlFreeMutex' type='function'/>
+ <exports symbol='xmlUnlockLibrary' type='function'/>
+ <exports symbol='xmlInitThreads' type='function'/>
+ <exports symbol='xmlRMutexLock' type='function'/>
+ </file>
+ <file name='tree'>
+ <summary>interfaces for tree manipulation</summary>
+ <description>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_LOCAL_NAMESPACE' type='macro'/>
+ <exports symbol='BASE_BUFFER_SIZE' type='macro'/>
+ <exports symbol='XML_XML_ID' type='macro'/>
+ <exports symbol='xmlRootNode' type='macro'/>
+ <exports symbol='XML_GET_LINE' type='macro'/>
+ <exports symbol='XML_GET_CONTENT' type='macro'/>
+ <exports symbol='xmlChildrenNode' type='macro'/>
+ <exports symbol='XML_XML_NAMESPACE' type='macro'/>
+ <exports symbol='LIBXML2_NEW_BUFFER' type='macro'/>
+ <exports symbol='XML_ATTRIBUTE_IMPLIED' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_ELEMENT' type='enum'/>
+ <exports symbol='XML_ENTITY_REF_NODE' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_IDREFS' type='enum'/>
+ <exports symbol='XML_BUFFER_ALLOC_DOUBLEIT' type='enum'/>
+ <exports symbol='XML_XINCLUDE_END' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_NODE' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_NMTOKENS' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_IDREF' type='enum'/>
+ <exports symbol='XML_ELEMENT_TYPE_ELEMENT' type='enum'/>
+ <exports symbol='XML_TEXT_NODE' type='enum'/>
+ <exports symbol='XML_CDATA_SECTION_NODE' type='enum'/>
+ <exports symbol='XML_ELEMENT_NODE' type='enum'/>
+ <exports symbol='XML_ELEMENT_DECL' type='enum'/>
+ <exports symbol='XML_DOC_USERBUILT' type='enum'/>
+ <exports symbol='XML_DOC_INTERNAL' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_REQUIRED' type='enum'/>
+ <exports symbol='XML_DOCUMENT_FRAG_NODE' type='enum'/>
+ <exports symbol='XML_DOC_DTDVALID' type='enum'/>
+ <exports symbol='XML_ELEMENT_TYPE_ANY' type='enum'/>
+ <exports symbol='XML_DOC_NSVALID' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_ONCE' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_PCDATA' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_FIXED' type='enum'/>
+ <exports symbol='XML_DOCUMENT_TYPE_NODE' type='enum'/>
+ <exports symbol='XML_DOC_HTML' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_OPT' type='enum'/>
+ <exports symbol='XML_NAMESPACE_DECL' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_NOTATION' type='enum'/>
+ <exports symbol='XML_ELEMENT_TYPE_MIXED' type='enum'/>
+ <exports symbol='XML_XINCLUDE_START' type='enum'/>
+ <exports symbol='XML_BUFFER_ALLOC_HYBRID' type='enum'/>
+ <exports symbol='XML_DOC_XINCLUDE' type='enum'/>
+ <exports symbol='XML_BUFFER_ALLOC_EXACT' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_ENTITIES' type='enum'/>
+ <exports symbol='XML_BUFFER_ALLOC_IMMUTABLE' type='enum'/>
+ <exports symbol='XML_NOTATION_NODE' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_SEQ' type='enum'/>
+ <exports symbol='XML_ELEMENT_TYPE_EMPTY' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_ENUMERATION' type='enum'/>
+ <exports symbol='XML_DOC_OLD10' type='enum'/>
+ <exports symbol='XML_HTML_DOCUMENT_NODE' type='enum'/>
+ <exports symbol='XML_ELEMENT_TYPE_UNDEFINED' type='enum'/>
+ <exports symbol='XML_DOCUMENT_NODE' type='enum'/>
+ <exports symbol='XML_DOCB_DOCUMENT_NODE' type='enum'/>
+ <exports symbol='XML_COMMENT_NODE' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_NONE' type='enum'/>
+ <exports symbol='XML_DTD_NODE' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_OR' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_NMTOKEN' type='enum'/>
+ <exports symbol='XML_PI_NODE' type='enum'/>
+ <exports symbol='XML_BUFFER_ALLOC_IO' type='enum'/>
+ <exports symbol='XML_ENTITY_NODE' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_ENTITY' type='enum'/>
+ <exports symbol='XML_DOC_WELLFORMED' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_DECL' type='enum'/>
+ <exports symbol='XML_ENTITY_DECL' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_ID' type='enum'/>
+ <exports symbol='XML_ATTRIBUTE_CDATA' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_MULT' type='enum'/>
+ <exports symbol='XML_ELEMENT_CONTENT_PLUS' type='enum'/>
+ <exports symbol='xmlNs' type='typedef'/>
+ <exports symbol='xmlElementContent' type='typedef'/>
+ <exports symbol='xmlEnumerationPtr' type='typedef'/>
+ <exports symbol='xmlBuffer' type='typedef'/>
+ <exports symbol='xmlParserInputPtr' type='typedef'/>
+ <exports symbol='xmlSAXLocatorPtr' type='typedef'/>
+ <exports symbol='xmlParserInput' type='typedef'/>
+ <exports symbol='xmlElement' type='typedef'/>
+ <exports symbol='xmlNsType' type='typedef'/>
+ <exports symbol='xmlBufferAllocationScheme' type='typedef'/>
+ <exports symbol='xmlNode' type='typedef'/>
+ <exports symbol='xmlDocPtr' type='typedef'/>
+ <exports symbol='xmlBufferPtr' type='typedef'/>
+ <exports symbol='xmlDOMWrapCtxtPtr' type='typedef'/>
+ <exports symbol='xmlRefPtr' type='typedef'/>
+ <exports symbol='xmlParserInputBuffer' type='typedef'/>
+ <exports symbol='xmlRef' type='typedef'/>
+ <exports symbol='xmlDOMWrapCtxt' type='typedef'/>
+ <exports symbol='xmlNodePtr' type='typedef'/>
+ <exports symbol='xmlParserCtxt' type='typedef'/>
+ <exports symbol='xmlDtdPtr' type='typedef'/>
+ <exports symbol='xmlAttributeDefault' type='typedef'/>
+ <exports symbol='xmlBuf' type='typedef'/>
+ <exports symbol='xmlNotation' type='typedef'/>
+ <exports symbol='xmlElementType' type='typedef'/>
+ <exports symbol='xmlEntity' type='typedef'/>
+ <exports symbol='xmlAttr' type='typedef'/>
+ <exports symbol='xmlAttributePtr' type='typedef'/>
+ <exports symbol='xmlElementTypeVal' type='typedef'/>
+ <exports symbol='xmlNotationPtr' type='typedef'/>
+ <exports symbol='xmlElementPtr' type='typedef'/>
+ <exports symbol='xmlBufPtr' type='typedef'/>
+ <exports symbol='xmlElementContentOccur' type='typedef'/>
+ <exports symbol='xmlAttrPtr' type='typedef'/>
+ <exports symbol='xmlDoc' type='typedef'/>
+ <exports symbol='xmlID' type='typedef'/>
+ <exports symbol='xmlParserCtxtPtr' type='typedef'/>
+ <exports symbol='xmlEntityPtr' type='typedef'/>
+ <exports symbol='xmlEnumeration' type='typedef'/>
+ <exports symbol='xmlAttributeType' type='typedef'/>
+ <exports symbol='xmlNsPtr' type='typedef'/>
+ <exports symbol='xmlParserInputBufferPtr' type='typedef'/>
+ <exports symbol='xmlSAXHandler' type='typedef'/>
+ <exports symbol='xmlOutputBuffer' type='typedef'/>
+ <exports symbol='xmlSAXLocator' type='typedef'/>
+ <exports symbol='xmlElementContentPtr' type='typedef'/>
+ <exports symbol='xmlElementContentType' type='typedef'/>
+ <exports symbol='xmlDocProperties' type='typedef'/>
+ <exports symbol='xmlIDPtr' type='typedef'/>
+ <exports symbol='xmlDtd' type='typedef'/>
+ <exports symbol='xmlAttribute' type='typedef'/>
+ <exports symbol='xmlOutputBufferPtr' type='typedef'/>
+ <exports symbol='xmlSAXHandlerPtr' type='typedef'/>
+ <exports symbol='_xmlBuffer' type='struct'/>
+ <exports symbol='_xmlAttribute' type='struct'/>
+ <exports symbol='_xmlEnumeration' type='struct'/>
+ <exports symbol='_xmlNs' type='struct'/>
+ <exports symbol='_xmlNode' type='struct'/>
+ <exports symbol='_xmlDoc' type='struct'/>
+ <exports symbol='_xmlElement' type='struct'/>
+ <exports symbol='_xmlID' type='struct'/>
+ <exports symbol='_xmlNotation' type='struct'/>
+ <exports symbol='_xmlDtd' type='struct'/>
+ <exports symbol='_xmlRef' type='struct'/>
+ <exports symbol='_xmlAttr' type='struct'/>
+ <exports symbol='_xmlDOMWrapCtxt' type='struct'/>
+ <exports symbol='_xmlElementContent' type='struct'/>
+ <exports symbol='xmlDocCopyNode' type='function'/>
+ <exports symbol='xmlNewDocRawNode' type='function'/>
+ <exports symbol='xmlBufContent' type='function'/>
+ <exports symbol='xmlNewNsPropEatName' type='function'/>
+ <exports symbol='xmlStringGetNodeList' type='function'/>
+ <exports symbol='xmlNewCDataBlock' type='function'/>
+ <exports symbol='xmlBufferWriteCHAR' type='function'/>
+ <exports symbol='xmlNodeGetBase' type='function'/>
+ <exports symbol='xmlBufferEmpty' type='function'/>
+ <exports symbol='xmlBuildQName' type='function'/>
+ <exports symbol='xmlValidateNMToken' type='function'/>
+ <exports symbol='xmlSaveFormatFileEnc' type='function'/>
+ <exports symbol='xmlAddSibling' type='function'/>
+ <exports symbol='xmlBufferCreate' type='function'/>
+ <exports symbol='xmlNewDocFragment' type='function'/>
+ <exports symbol='xmlDocGetRootElement' type='function'/>
+ <exports symbol='xmlGetProp' type='function'/>
+ <exports symbol='xmlValidateName' type='function'/>
+ <exports symbol='xmlBufEnd' type='function'/>
+ <exports symbol='xmlValidateQName' type='function'/>
+ <exports symbol='xmlHasNsProp' type='function'/>
+ <exports symbol='xmlAddPrevSibling' type='function'/>
+ <exports symbol='xmlBufferAddHead' type='function'/>
+ <exports symbol='xmlNewPI' type='function'/>
+ <exports symbol='xmlDocDumpFormatMemoryEnc' type='function'/>
+ <exports symbol='xmlSetProp' type='function'/>
+ <exports symbol='xmlChildElementCount' type='function'/>
+ <exports symbol='xmlElemDump' type='function'/>
+ <exports symbol='xmlSaveFormatFileTo' type='function'/>
+ <exports symbol='xmlGetIntSubset' type='function'/>
+ <exports symbol='xmlNodeBufGetContent' type='function'/>
+ <exports symbol='xmlNextElementSibling' type='function'/>
+ <exports symbol='xmlBufferWriteChar' type='function'/>
+ <exports symbol='xmlBufferFree' type='function'/>
+ <exports symbol='xmlDOMWrapCloneNode' type='function'/>
+ <exports symbol='xmlNewNode' type='function'/>
+ <exports symbol='xmlSaveFileTo' type='function'/>
+ <exports symbol='xmlNewTextLen' type='function'/>
+ <exports symbol='xmlNewTextChild' type='function'/>
+ <exports symbol='xmlNodeSetContent' type='function'/>
+ <exports symbol='xmlBufferAdd' type='function'/>
+ <exports symbol='xmlNodeDumpOutput' type='function'/>
+ <exports symbol='xmlCopyNamespace' type='function'/>
+ <exports symbol='xmlSearchNsByHref' type='function'/>
+ <exports symbol='xmlAddChild' type='function'/>
+ <exports symbol='xmlReconciliateNs' type='function'/>
+ <exports symbol='xmlValidateNCName' type='function'/>
+ <exports symbol='xmlNewDocComment' type='function'/>
+ <exports symbol='xmlGetCompressMode' type='function'/>
+ <exports symbol='xmlNodeDump' type='function'/>
+ <exports symbol='xmlBufferCreateSize' type='function'/>
+ <exports symbol='xmlNodeListGetString' type='function'/>
+ <exports symbol='xmlSetCompressMode' type='function'/>
+ <exports symbol='xmlSetTreeDoc' type='function'/>
+ <exports symbol='xmlDOMWrapAdoptNode' type='function'/>
+ <exports symbol='xmlCopyNodeList' type='function'/>
+ <exports symbol='xmlNewDocNodeEatName' type='function'/>
+ <exports symbol='xmlAddChildList' type='function'/>
+ <exports symbol='xmlGetNodePath' type='function'/>
+ <exports symbol='xmlFreePropList' type='function'/>
+ <exports symbol='xmlNodeAddContent' type='function'/>
+ <exports symbol='xmlUnsetNsProp' type='function'/>
+ <exports symbol='xmlFirstElementChild' type='function'/>
+ <exports symbol='xmlAddNextSibling' type='function'/>
+ <exports symbol='xmlIsBlankNode' type='function'/>
+ <exports symbol='xmlNewGlobalNs' type='function'/>
+ <exports symbol='xmlBufferDump' type='function'/>
+ <exports symbol='xmlNodeGetContent' type='function'/>
+ <exports symbol='xmlCopyDoc' type='function'/>
+ <exports symbol='xmlDOMWrapNewCtxt' type='function'/>
+ <exports symbol='xmlDocDumpMemoryEnc' type='function'/>
+ <exports symbol='xmlBufGetNodeContent' type='function'/>
+ <exports symbol='xmlTextMerge' type='function'/>
+ <exports symbol='xmlDocDumpMemory' type='function'/>
+ <exports symbol='xmlNewDocPI' type='function'/>
+ <exports symbol='xmlFreeNs' type='function'/>
+ <exports symbol='xmlDocDump' type='function'/>
+ <exports symbol='xmlFreeProp' type='function'/>
+ <exports symbol='xmlGetNoNsProp' type='function'/>
+ <exports symbol='xmlSplitQName2' type='function'/>
+ <exports symbol='xmlNewProp' type='function'/>
+ <exports symbol='xmlTextConcat' type='function'/>
+ <exports symbol='xmlNodeGetSpacePreserve' type='function'/>
+ <exports symbol='xmlBufferShrink' type='function'/>
+ <exports symbol='xmlPreviousElementSibling' type='function'/>
+ <exports symbol='xmlNodeSetContentLen' type='function'/>
+ <exports symbol='xmlNodeAddContentLen' type='function'/>
+ <exports symbol='xmlBufferWriteQuotedString' type='function'/>
+ <exports symbol='xmlCopyProp' type='function'/>
+ <exports symbol='xmlReplaceNode' type='function'/>
+ <exports symbol='xmlSetDocCompressMode' type='function'/>
+ <exports symbol='xmlCopyNode' type='function'/>
+ <exports symbol='xmlUnlinkNode' type='function'/>
+ <exports symbol='xmlSplitQName3' type='function'/>
+ <exports symbol='xmlDOMWrapAcquireNsFunction' type='function'/>
+ <exports symbol='xmlBufUse' type='function'/>
+ <exports symbol='xmlDocSetRootElement' type='function'/>
+ <exports symbol='xmlGetLineNo' type='function'/>
+ <exports symbol='xmlBufferContent' type='function'/>
+ <exports symbol='xmlRemoveProp' type='function'/>
+ <exports symbol='xmlLastElementChild' type='function'/>
+ <exports symbol='xmlNodeGetLang' type='function'/>
+ <exports symbol='xmlGetDocCompressMode' type='function'/>
+ <exports symbol='xmlBufNodeDump' type='function'/>
+ <exports symbol='xmlGetNsProp' type='function'/>
+ <exports symbol='xmlNewDocProp' type='function'/>
+ <exports symbol='xmlFreeNode' type='function'/>
+ <exports symbol='xmlNewNsProp' type='function'/>
+ <exports symbol='xmlDOMWrapFreeCtxt' type='function'/>
+ <exports symbol='xmlBufferDetach' type='function'/>
+ <exports symbol='xmlBufferSetAllocationScheme' type='function'/>
+ <exports symbol='xmlNewChild' type='function'/>
+ <exports symbol='xmlSearchNs' type='function'/>
+ <exports symbol='xmlStringLenGetNodeList' type='function'/>
+ <exports symbol='xmlSaveFormatFile' type='function'/>
+ <exports symbol='xmlCopyPropList' type='function'/>
+ <exports symbol='xmlDocFormatDump' type='function'/>
+ <exports symbol='xmlNodeSetSpacePreserve' type='function'/>
+ <exports symbol='xmlHasProp' type='function'/>
+ <exports symbol='xmlBufferCat' type='function'/>
+ <exports symbol='xmlCreateIntSubset' type='function'/>
+ <exports symbol='xmlNewDoc' type='function'/>
+ <exports symbol='xmlNewCharRef' type='function'/>
+ <exports symbol='xmlCopyNamespaceList' type='function'/>
+ <exports symbol='xmlNewNodeEatName' type='function'/>
+ <exports symbol='xmlBufferResize' type='function'/>
+ <exports symbol='xmlNodeSetBase' type='function'/>
+ <exports symbol='xmlNewComment' type='function'/>
+ <exports symbol='xmlBufferLength' type='function'/>
+ <exports symbol='xmlNewText' type='function'/>
+ <exports symbol='xmlUnsetProp' type='function'/>
+ <exports symbol='xmlGetBufferAllocationScheme' type='function'/>
+ <exports symbol='xmlSaveFile' type='function'/>
+ <exports symbol='xmlDocCopyNodeList' type='function'/>
+ <exports symbol='xmlSetNs' type='function'/>
+ <exports symbol='xmlNewNs' type='function'/>
+ <exports symbol='xmlDOMWrapRemoveNode' type='function'/>
+ <exports symbol='xmlAttrSerializeTxtContent' type='function'/>
+ <exports symbol='xmlCopyDtd' type='function'/>
+ <exports symbol='xmlNewDocText' type='function'/>
+ <exports symbol='xmlNodeListGetRawString' type='function'/>
+ <exports symbol='xmlBufferCreateStatic' type='function'/>
+ <exports symbol='xmlNewReference' type='function'/>
+ <exports symbol='xmlDOMWrapReconcileNamespaces' type='function'/>
+ <exports symbol='xmlBufferCCat' type='function'/>
+ <exports symbol='xmlGetNsList' type='function'/>
+ <exports symbol='xmlBufferGrow' type='function'/>
+ <exports symbol='xmlNodeIsText' type='function'/>
+ <exports symbol='xmlSetBufferAllocationScheme' type='function'/>
+ <exports symbol='xmlIsXHTML' type='function'/>
+ <exports symbol='xmlNodeSetLang' type='function'/>
+ <exports symbol='xmlFreeDtd' type='function'/>
+ <exports symbol='xmlFreeNodeList' type='function'/>
+ <exports symbol='xmlFreeDoc' type='function'/>
+ <exports symbol='xmlBufShrink' type='function'/>
+ <exports symbol='xmlNewDocNode' type='function'/>
+ <exports symbol='xmlSaveFileEnc' type='function'/>
+ <exports symbol='xmlSetNsProp' type='function'/>
+ <exports symbol='xmlDocDumpFormatMemory' type='function'/>
+ <exports symbol='xmlSetListDoc' type='function'/>
+ <exports symbol='xmlNodeSetName' type='function'/>
+ <exports symbol='xmlNewDocTextLen' type='function'/>
+ <exports symbol='xmlNewDtd' type='function'/>
+ <exports symbol='xmlFreeNsList' type='function'/>
+ <exports symbol='xmlGetLastChild' type='function'/>
+ </file>
+ <file name='uri'>
+ <summary>library of generic URI related routines</summary>
+ <description>library of generic URI related routines Implements RFC 2396 </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlURI' type='typedef'/>
+ <exports symbol='xmlURIPtr' type='typedef'/>
+ <exports symbol='_xmlURI' type='struct'/>
+ <exports symbol='xmlNormalizeURIPath' type='function'/>
+ <exports symbol='xmlPrintURI' type='function'/>
+ <exports symbol='xmlParseURIRaw' type='function'/>
+ <exports symbol='xmlURIUnescapeString' type='function'/>
+ <exports symbol='xmlParseURI' type='function'/>
+ <exports symbol='xmlCreateURI' type='function'/>
+ <exports symbol='xmlURIEscapeStr' type='function'/>
+ <exports symbol='xmlPathToURI' type='function'/>
+ <exports symbol='xmlCanonicPath' type='function'/>
+ <exports symbol='xmlFreeURI' type='function'/>
+ <exports symbol='xmlParseURIReference' type='function'/>
+ <exports symbol='xmlBuildRelativeURI' type='function'/>
+ <exports symbol='xmlSaveUri' type='function'/>
+ <exports symbol='xmlURIEscape' type='function'/>
+ <exports symbol='xmlBuildURI' type='function'/>
+ </file>
+ <file name='valid'>
+ <summary>The DTD validation</summary>
+ <description>API for the DTD handling and the validity checking </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_CTXT_FINISH_DTD_0' type='macro'/>
+ <exports symbol='XML_CTXT_FINISH_DTD_1' type='macro'/>
+ <exports symbol='xmlElementTable' type='typedef'/>
+ <exports symbol='xmlValidStatePtr' type='typedef'/>
+ <exports symbol='xmlIDTablePtr' type='typedef'/>
+ <exports symbol='xmlNotationTablePtr' type='typedef'/>
+ <exports symbol='xmlValidCtxt' type='typedef'/>
+ <exports symbol='xmlElementTablePtr' type='typedef'/>
+ <exports symbol='xmlRefTablePtr' type='typedef'/>
+ <exports symbol='xmlNotationTable' type='typedef'/>
+ <exports symbol='xmlRefTable' type='typedef'/>
+ <exports symbol='xmlValidState' type='typedef'/>
+ <exports symbol='xmlAttributeTable' type='typedef'/>
+ <exports symbol='xmlAttributeTablePtr' type='typedef'/>
+ <exports symbol='xmlIDTable' type='typedef'/>
+ <exports symbol='xmlValidCtxtPtr' type='typedef'/>
+ <exports symbol='_xmlValidCtxt' type='struct'/>
+ <exports symbol='xmlFreeNotationTable' type='function'/>
+ <exports symbol='xmlValidateNameValue' type='function'/>
+ <exports symbol='xmlSnprintfElementContent' type='function'/>
+ <exports symbol='xmlAddRef' type='function'/>
+ <exports symbol='xmlDumpAttributeDecl' type='function'/>
+ <exports symbol='xmlValidateDocumentFinal' type='function'/>
+ <exports symbol='xmlValidateDtdFinal' type='function'/>
+ <exports symbol='xmlDumpAttributeTable' type='function'/>
+ <exports symbol='xmlCreateEnumeration' type='function'/>
+ <exports symbol='xmlValidateOneAttribute' type='function'/>
+ <exports symbol='xmlValidGetValidElements' type='function'/>
+ <exports symbol='xmlIsMixedElement' type='function'/>
+ <exports symbol='xmlDumpNotationDecl' type='function'/>
+ <exports symbol='xmlIsID' type='function'/>
+ <exports symbol='xmlGetDtdQAttrDesc' type='function'/>
+ <exports symbol='xmlNewDocElementContent' type='function'/>
+ <exports symbol='xmlFreeAttributeTable' type='function'/>
+ <exports symbol='xmlValidityErrorFunc' type='function'/>
+ <exports symbol='xmlValidateAttributeDecl' type='function'/>
+ <exports symbol='xmlGetDtdQElementDesc' type='function'/>
+ <exports symbol='xmlCopyNotationTable' type='function'/>
+ <exports symbol='xmlValidateDocument' type='function'/>
+ <exports symbol='xmlValidGetPotentialChildren' type='function'/>
+ <exports symbol='xmlAddNotationDecl' type='function'/>
+ <exports symbol='xmlValidateElementDecl' type='function'/>
+ <exports symbol='xmlAddAttributeDecl' type='function'/>
+ <exports symbol='xmlGetID' type='function'/>
+ <exports symbol='xmlCopyElementTable' type='function'/>
+ <exports symbol='xmlGetRefs' type='function'/>
+ <exports symbol='xmlSprintfElementContent' type='function'/>
+ <exports symbol='xmlValidateOneElement' type='function'/>
+ <exports symbol='xmlValidateNmtokenValue' type='function'/>
+ <exports symbol='xmlDumpElementTable' type='function'/>
+ <exports symbol='xmlValidCtxtNormalizeAttributeValue' type='function'/>
+ <exports symbol='xmlDumpElementDecl' type='function'/>
+ <exports symbol='xmlFreeElementContent' type='function'/>
+ <exports symbol='xmlValidateOneNamespace' type='function'/>
+ <exports symbol='xmlValidatePushElement' type='function'/>
+ <exports symbol='xmlIsRef' type='function'/>
+ <exports symbol='xmlCopyDocElementContent' type='function'/>
+ <exports symbol='xmlAddID' type='function'/>
+ <exports symbol='xmlFreeRefTable' type='function'/>
+ <exports symbol='xmlValidateNamesValue' type='function'/>
+ <exports symbol='xmlRemoveID' type='function'/>
+ <exports symbol='xmlFreeElementTable' type='function'/>
+ <exports symbol='xmlFreeIDTable' type='function'/>
+ <exports symbol='xmlFreeValidCtxt' type='function'/>
+ <exports symbol='xmlCopyAttributeTable' type='function'/>
+ <exports symbol='xmlCopyElementContent' type='function'/>
+ <exports symbol='xmlValidateAttributeValue' type='function'/>
+ <exports symbol='xmlRemoveRef' type='function'/>
+ <exports symbol='xmlValidityWarningFunc' type='function'/>
+ <exports symbol='xmlValidatePopElement' type='function'/>
+ <exports symbol='xmlFreeEnumeration' type='function'/>
+ <exports symbol='xmlCopyEnumeration' type='function'/>
+ <exports symbol='xmlGetDtdAttrDesc' type='function'/>
+ <exports symbol='xmlValidateDtd' type='function'/>
+ <exports symbol='xmlNewValidCtxt' type='function'/>
+ <exports symbol='xmlDumpNotationTable' type='function'/>
+ <exports symbol='xmlAddElementDecl' type='function'/>
+ <exports symbol='xmlValidNormalizeAttributeValue' type='function'/>
+ <exports symbol='xmlValidBuildContentModel' type='function'/>
+ <exports symbol='xmlValidateElement' type='function'/>
+ <exports symbol='xmlValidateNotationUse' type='function'/>
+ <exports symbol='xmlValidateRoot' type='function'/>
+ <exports symbol='xmlValidateNotationDecl' type='function'/>
+ <exports symbol='xmlNewElementContent' type='function'/>
+ <exports symbol='xmlGetDtdElementDesc' type='function'/>
+ <exports symbol='xmlGetDtdNotationDesc' type='function'/>
+ <exports symbol='xmlValidatePushCData' type='function'/>
+ <exports symbol='xmlValidateNmtokensValue' type='function'/>
+ <exports symbol='xmlFreeDocElementContent' type='function'/>
+ </file>
+ <file name='xinclude'>
+ <summary>implementation of XInclude</summary>
+ <description>API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003</description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XINCLUDE_PARSE_TEXT' type='macro'/>
+ <exports symbol='XINCLUDE_PARSE_XPOINTER' type='macro'/>
+ <exports symbol='XINCLUDE_HREF' type='macro'/>
+ <exports symbol='XINCLUDE_FALLBACK' type='macro'/>
+ <exports symbol='XINCLUDE_NS' type='macro'/>
+ <exports symbol='XINCLUDE_PARSE' type='macro'/>
+ <exports symbol='XINCLUDE_NODE' type='macro'/>
+ <exports symbol='XINCLUDE_PARSE_XML' type='macro'/>
+ <exports symbol='XINCLUDE_PARSE_ENCODING' type='macro'/>
+ <exports symbol='XINCLUDE_OLD_NS' type='macro'/>
+ <exports symbol='xmlXIncludeCtxt' type='typedef'/>
+ <exports symbol='xmlXIncludeCtxtPtr' type='typedef'/>
+ <exports symbol='xmlXIncludeProcessTreeFlagsData' type='function'/>
+ <exports symbol='xmlXIncludeProcessFlagsData' type='function'/>
+ <exports symbol='xmlXIncludeProcessFlags' type='function'/>
+ <exports symbol='xmlXIncludeProcessTree' type='function'/>
+ <exports symbol='xmlXIncludeProcessNode' type='function'/>
+ <exports symbol='xmlXIncludeFreeContext' type='function'/>
+ <exports symbol='xmlXIncludeSetFlags' type='function'/>
+ <exports symbol='xmlXIncludeProcess' type='function'/>
+ <exports symbol='xmlXIncludeNewContext' type='function'/>
+ <exports symbol='xmlXIncludeProcessTreeFlags' type='function'/>
+ </file>
+ <file name='xlink'>
+ <summary>unfinished XLink detection module</summary>
+ <description>unfinished XLink detection module </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XLINK_ACTUATE_NONE' type='enum'/>
+ <exports symbol='XLINK_SHOW_NEW' type='enum'/>
+ <exports symbol='XLINK_ACTUATE_AUTO' type='enum'/>
+ <exports symbol='XLINK_TYPE_NONE' type='enum'/>
+ <exports symbol='XLINK_SHOW_REPLACE' type='enum'/>
+ <exports symbol='XLINK_ACTUATE_ONREQUEST' type='enum'/>
+ <exports symbol='XLINK_TYPE_EXTENDED' type='enum'/>
+ <exports symbol='XLINK_TYPE_EXTENDED_SET' type='enum'/>
+ <exports symbol='XLINK_SHOW_NONE' type='enum'/>
+ <exports symbol='XLINK_SHOW_EMBED' type='enum'/>
+ <exports symbol='XLINK_TYPE_SIMPLE' type='enum'/>
+ <exports symbol='xlinkTitle' type='typedef'/>
+ <exports symbol='xlinkShow' type='typedef'/>
+ <exports symbol='xlinkHRef' type='typedef'/>
+ <exports symbol='xlinkActuate' type='typedef'/>
+ <exports symbol='xlinkHandler' type='typedef'/>
+ <exports symbol='xlinkRole' type='typedef'/>
+ <exports symbol='xlinkHandlerPtr' type='typedef'/>
+ <exports symbol='xlinkType' type='typedef'/>
+ <exports symbol='_xlinkHandler' type='struct'/>
+ <exports symbol='xlinkSetDefaultDetect' type='function'/>
+ <exports symbol='xlinkSetDefaultHandler' type='function'/>
+ <exports symbol='xlinkExtendedLinkFunk' type='function'/>
+ <exports symbol='xlinkExtendedLinkSetFunk' type='function'/>
+ <exports symbol='xlinkSimpleLinkFunk' type='function'/>
+ <exports symbol='xlinkNodeDetectFunc' type='function'/>
+ <exports symbol='xlinkGetDefaultHandler' type='function'/>
+ <exports symbol='xlinkIsLink' type='function'/>
+ <exports symbol='xlinkGetDefaultDetect' type='function'/>
+ </file>
+ <file name='xmlIO'>
+ <summary>interface for the I/O interfaces used by the parser</summary>
+ <description>interface for the I/O interfaces used by the parser </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='_xmlParserInputBuffer' type='struct'/>
+ <exports symbol='_xmlOutputBuffer' type='struct'/>
+ <exports symbol='xmlIOHTTPRead' type='function'/>
+ <exports symbol='xmlInputMatchCallback' type='function'/>
+ <exports symbol='xmlRegisterDefaultOutputCallbacks' type='function'/>
+ <exports symbol='xmlFileClose' type='function'/>
+ <exports symbol='xmlOutputMatchCallback' type='function'/>
+ <exports symbol='xmlParserInputBufferPush' type='function'/>
+ <exports symbol='xmlIOFTPRead' type='function'/>
+ <exports symbol='xmlRegisterHTTPPostCallbacks' type='function'/>
+ <exports symbol='xmlIOFTPOpen' type='function'/>
+ <exports symbol='xmlIOFTPClose' type='function'/>
+ <exports symbol='xmlFileOpen' type='function'/>
+ <exports symbol='xmlOutputBufferCreateFile' type='function'/>
+ <exports symbol='xmlCheckFilename' type='function'/>
+ <exports symbol='xmlOutputOpenCallback' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateFilename' type='function'/>
+ <exports symbol='xmlOutputBufferClose' type='function'/>
+ <exports symbol='xmlAllocParserInputBuffer' type='function'/>
+ <exports symbol='xmlOutputBufferCreateIO' type='function'/>
+ <exports symbol='xmlOutputWriteCallback' type='function'/>
+ <exports symbol='xmlOutputBufferFlush' type='function'/>
+ <exports symbol='xmlCheckHTTPInput' type='function'/>
+ <exports symbol='xmlRegisterOutputCallbacks' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateMem' type='function'/>
+ <exports symbol='xmlIOFTPMatch' type='function'/>
+ <exports symbol='xmlRegisterInputCallbacks' type='function'/>
+ <exports symbol='xmlFreeParserInputBuffer' type='function'/>
+ <exports symbol='xmlRegisterDefaultInputCallbacks' type='function'/>
+ <exports symbol='xmlParserInputBufferGrow' type='function'/>
+ <exports symbol='xmlOutputCloseCallback' type='function'/>
+ <exports symbol='xmlAllocOutputBuffer' type='function'/>
+ <exports symbol='xmlNoNetExternalEntityLoader' type='function'/>
+ <exports symbol='xmlOutputBufferCreateBuffer' type='function'/>
+ <exports symbol='xmlIOHTTPMatch' type='function'/>
+ <exports symbol='xmlIOHTTPOpen' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateIO' type='function'/>
+ <exports symbol='xmlOutputBufferCreateFd' type='function'/>
+ <exports symbol='xmlNormalizeWindowsPath' type='function'/>
+ <exports symbol='xmlInputReadCallback' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateStatic' type='function'/>
+ <exports symbol='xmlOutputBufferGetContent' type='function'/>
+ <exports symbol='xmlIOHTTPClose' type='function'/>
+ <exports symbol='xmlOutputBufferWriteEscape' type='function'/>
+ <exports symbol='xmlOutputBufferCreateFilename' type='function'/>
+ <exports symbol='xmlOutputBufferGetSize' type='function'/>
+ <exports symbol='xmlCleanupOutputCallbacks' type='function'/>
+ <exports symbol='xmlInputOpenCallback' type='function'/>
+ <exports symbol='xmlParserInputBufferRead' type='function'/>
+ <exports symbol='xmlOutputBufferWriteString' type='function'/>
+ <exports symbol='xmlFileMatch' type='function'/>
+ <exports symbol='xmlPopInputCallbacks' type='function'/>
+ <exports symbol='xmlFileRead' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateFile' type='function'/>
+ <exports symbol='xmlParserGetDirectory' type='function'/>
+ <exports symbol='xmlOutputBufferWrite' type='function'/>
+ <exports symbol='xmlCleanupInputCallbacks' type='function'/>
+ <exports symbol='xmlInputCloseCallback' type='function'/>
+ <exports symbol='xmlIOHTTPOpenW' type='function'/>
+ <exports symbol='xmlParserInputBufferCreateFd' type='function'/>
+ </file>
+ <file name='xmlautomata'>
+ <summary>API to build regexp automata</summary>
+ <description>the API to build regexp automata </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlAutomataStatePtr' type='typedef'/>
+ <exports symbol='xmlAutomata' type='typedef'/>
+ <exports symbol='xmlAutomataPtr' type='typedef'/>
+ <exports symbol='xmlAutomataState' type='typedef'/>
+ <exports symbol='xmlFreeAutomata' type='function'/>
+ <exports symbol='xmlAutomataNewCounter' type='function'/>
+ <exports symbol='xmlAutomataGetInitState' type='function'/>
+ <exports symbol='xmlAutomataNewTransition2' type='function'/>
+ <exports symbol='xmlAutomataNewState' type='function'/>
+ <exports symbol='xmlAutomataNewCountTrans' type='function'/>
+ <exports symbol='xmlAutomataNewOnceTrans2' type='function'/>
+ <exports symbol='xmlAutomataNewAllTrans' type='function'/>
+ <exports symbol='xmlAutomataNewCountedTrans' type='function'/>
+ <exports symbol='xmlAutomataNewCounterTrans' type='function'/>
+ <exports symbol='xmlAutomataCompile' type='function'/>
+ <exports symbol='xmlAutomataNewNegTrans' type='function'/>
+ <exports symbol='xmlAutomataNewEpsilon' type='function'/>
+ <exports symbol='xmlAutomataNewCountTrans2' type='function'/>
+ <exports symbol='xmlNewAutomata' type='function'/>
+ <exports symbol='xmlAutomataSetFinalState' type='function'/>
+ <exports symbol='xmlAutomataNewOnceTrans' type='function'/>
+ <exports symbol='xmlAutomataNewTransition' type='function'/>
+ <exports symbol='xmlAutomataIsDeterminist' type='function'/>
+ </file>
+ <file name='xmlerror'>
+ <summary>error handling</summary>
+ <description>the API used to report errors </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_DTD_ATTRIBUTE_VALUE' type='enum'/>
+ <exports symbol='XML_RNGP_PARAM_NAME_MISSING' type='enum'/>
+ <exports symbol='XML_RNGP_PARENTREF_NO_PARENT' type='enum'/>
+ <exports symbol='XML_IO_EISCONN' type='enum'/>
+ <exports symbol='XML_RNGP_VALUE_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ELEM_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_DTD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_S4S_ATTR_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_VALUE' type='enum'/>
+ <exports symbol='XML_XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_DOCUMENT_START' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_TEXT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_AG_PROPS_CORRECT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_1' type='enum'/>
+ <exports symbol='XML_DTD_NOT_STANDALONE' type='enum'/>
+ <exports symbol='XML_HTTP_USE_IP' type='enum'/>
+ <exports symbol='XML_ERR_XMLDECL_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAV_ELEMENT_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD' type='enum'/>
+ <exports symbol='XML_ERR_LT_IN_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_XINCLUDE_ENTITY_DEF_MISMATCH' type='enum'/>
+ <exports symbol='XML_SAVE_NOT_UTF8' type='enum'/>
+ <exports symbol='XML_ERR_GT_REQUIRED' type='enum'/>
+ <exports symbol='XML_XPTR_EXTRA_OBJECTS' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ATTR_USE' type='enum'/>
+ <exports symbol='XML_IO_UNKNOWN' type='enum'/>
+ <exports symbol='XML_RNGP_INTERLEAVE_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION' type='enum'/>
+ <exports symbol='XML_IO_ECHILD' type='enum'/>
+ <exports symbol='XML_RNGP_NAME_MISSING' type='enum'/>
+ <exports symbol='XML_ERR_CONDSEC_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_SIMPLE_TYPE_2' type='enum'/>
+ <exports symbol='XML_IO_EINTR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_SIMPLE_TYPE_1' type='enum'/>
+ <exports symbol='XML_RNGP_XMLNS_NAME' type='enum'/>
+ <exports symbol='XML_RNGP_ATTRIBUTE_NOOP' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_GROUP' type='enum'/>
+ <exports symbol='XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI' type='enum'/>
+ <exports symbol='XML_ERR_CHARREF_IN_EPILOG' type='enum'/>
+ <exports symbol='XML_DTD_ID_SUBSET' type='enum'/>
+ <exports symbol='XML_SCHEMAP_FAILED_BUILD_IMPORT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD' type='enum'/>
+ <exports symbol='XML_XPTR_CHILDSEQ_START' type='enum'/>
+ <exports symbol='XML_ERR_EXT_SUBSET_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_FROM_DTD' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_ATTR' type='enum'/>
+ <exports symbol='XML_DTD_ATTRIBUTE_DEFAULT' type='enum'/>
+ <exports symbol='XML_FROM_MODULE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_EXTRACONTENT' type='enum'/>
+ <exports symbol='XML_RNGP_ELEM_CONTENT_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_WARN_UNLOCATED_SCHEMA' type='enum'/>
+ <exports symbol='XML_IO_EMLINK' type='enum'/>
+ <exports symbol='XML_ERR_NMTOKEN_REQUIRED' type='enum'/>
+ <exports symbol='XML_RNGP_ANYNAME_ATTR_ANCESTOR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_3_1' type='enum'/>
+ <exports symbol='XML_ERR_PI_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_RNGP_START_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_3_2' type='enum'/>
+ <exports symbol='XML_RNGP_GROUP_ATTR_CONFLICT' type='enum'/>
+ <exports symbol='XML_RNGP_EMPTY' type='enum'/>
+ <exports symbol='XML_ERR_DOCUMENT_EMPTY' type='enum'/>
+ <exports symbol='XML_XINCLUDE_RECURSION' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_RESOLVE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_FACET_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAP_RESTRICTION_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_I18N_NO_OUTPUT' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_ERR_STANDALONE_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_ATTR' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_LOOP' type='enum'/>
+ <exports symbol='XML_IO_EINPROGRESS' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_NOTATION' type='enum'/>
+ <exports symbol='XML_HTML_STRUCURE_ERROR' type='enum'/>
+ <exports symbol='XML_DTD_INVALID_DEFAULT' type='enum'/>
+ <exports symbol='XML_FROM_SCHEMATRONV' type='enum'/>
+ <exports symbol='XML_DTD_EMPTY_NOTATION' type='enum'/>
+ <exports symbol='XML_RNGP_ELEMENT_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI' type='enum'/>
+ <exports symbol='XML_RNGP_INVALID_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_1_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_AT_EOF' type='enum'/>
+ <exports symbol='XML_DTD_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_LIST' type='enum'/>
+ <exports symbol='XML_ERR_LT_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_AU_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_ERR_ATTLIST_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_ERR_PCDATA_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_INTERNAL' type='enum'/>
+ <exports symbol='XML_ERR_STRING_NOT_CLOSED' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_IN_DTD' type='enum'/>
+ <exports symbol='XML_XPATH_VARIABLE_REF_ERROR' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME' type='enum'/>
+ <exports symbol='XML_IO_ECANCELED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTSIMPLE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID' type='enum'/>
+ <exports symbol='XML_IO_EADDRINUSE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_LIST_CHILD' type='enum'/>
+ <exports symbol='XML_DTD_UNKNOWN_ID' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1' type='enum'/>
+ <exports symbol='XML_IO_EDOM' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_ELEM_DECL' type='enum'/>
+ <exports symbol='XML_RNGP_DEFINE_CREATE_FAILED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ELEMENT_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ELEMENT_2_1' type='enum'/>
+ <exports symbol='XML_RNGP_INVALID_URI' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_LIST' type='enum'/>
+ <exports symbol='XML_RNGP_EXCEPT_NO_CONTENT' type='enum'/>
+ <exports symbol='XML_RNGP_EXTERNALREF_EMTPY' type='enum'/>
+ <exports symbol='XML_ERR_SPACE_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MAXLENGTH_VALID' type='enum'/>
+ <exports symbol='XML_DTD_DIFFERENT_PREFIX' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTDETERMINIST' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAV_MISSING' type='enum'/>
+ <exports symbol='XML_IO_EFAULT' type='enum'/>
+ <exports symbol='XML_XINCLUDE_XPTR_FAILED' type='enum'/>
+ <exports symbol='XML_FROM_FTP' type='enum'/>
+ <exports symbol='XML_RNGP_PARENTREF_CREATE_FAILED' type='enum'/>
+ <exports symbol='XML_ERR_RESERVED_XML_NAME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_3_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_3_1' type='enum'/>
+ <exports symbol='XML_IO_EBADMSG' type='enum'/>
+ <exports symbol='XML_XPTR_RESOURCE_ERROR' type='enum'/>
+ <exports symbol='XML_RNGP_ATTR_CONFLICT' type='enum'/>
+ <exports symbol='XML_DTD_ELEM_REDEFINED' type='enum'/>
+ <exports symbol='XML_XINCLUDE_UNKNOWN_ENCODING' type='enum'/>
+ <exports symbol='XML_CATALOG_PREFER_VALUE' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_SEMICOL_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_1_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_TYPE_AND_SUBTYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NO_XMLNS' type='enum'/>
+ <exports symbol='XML_IO_ENOTDIR' type='enum'/>
+ <exports symbol='XML_SAVE_CHAR_INVALID' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_NO_NAME' type='enum'/>
+ <exports symbol='XML_DTD_ID_FIXED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_A_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_WAR_NS_COLUMN' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_2_1' type='enum'/>
+ <exports symbol='XML_ERR_EXTRA_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_GROUP' type='enum'/>
+ <exports symbol='XML_ERR_LITERAL_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_REF_AND_SUBTYPE' type='enum'/>
+ <exports symbol='XML_RNGP_ELEM_TEXT_CONFLICT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_TYPE_1' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_CHAR_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3' type='enum'/>
+ <exports symbol='XML_CHECK_NO_DICT' type='enum'/>
+ <exports symbol='XML_XINCLUDE_XPTR_RESULT' type='enum'/>
+ <exports symbol='XML_IO_ENXIO' type='enum'/>
+ <exports symbol='XML_XINCLUDE_FRAGMENT_ID' type='enum'/>
+ <exports symbol='XML_FROM_HTTP' type='enum'/>
+ <exports symbol='XML_DTD_NOTATION_REDEFINED' type='enum'/>
+ <exports symbol='XML_WAR_LANG_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_AU_PROPS_CORRECT' type='enum'/>
+ <exports symbol='XML_ERR_SEPARATOR_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED' type='enum'/>
+ <exports symbol='XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE' type='enum'/>
+ <exports symbol='XML_RNGP_ATTRIBUTE_CONTENT' type='enum'/>
+ <exports symbol='XML_DTD_XMLID_TYPE' type='enum'/>
+ <exports symbol='XML_RNGP_INTERLEAVE_ADD' type='enum'/>
+ <exports symbol='XML_DTD_ATTRIBUTE_REDEFINED' type='enum'/>
+ <exports symbol='XML_RNGP_UNKNOWN_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_ERR_UNDECLARED_ENTITY' type='enum'/>
+ <exports symbol='XML_ERR_PUBID_REQUIRED' type='enum'/>
+ <exports symbol='XML_IO_ENOTSOCK' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_GROUP' type='enum'/>
+ <exports symbol='XML_RNGP_NOTALLOWED_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ATTRIBUTE_4' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ATTRIBUTE_3' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ATTRIBUTE_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ATTRIBUTE_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_PREFIX_UNDEFINED' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_ATTR_ELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_4_3' type='enum'/>
+ <exports symbol='XML_FTP_ACCNT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_4_1' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_DATA' type='enum'/>
+ <exports symbol='XML_IO_ENOENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2' type='enum'/>
+ <exports symbol='XML_FROM_C14N' type='enum'/>
+ <exports symbol='XML_IO_EIO' type='enum'/>
+ <exports symbol='XML_DTD_NOT_PCDATA' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ATTR_COMBINATION' type='enum'/>
+ <exports symbol='XML_RNGP_PARAM_FORBIDDEN' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' type='enum'/>
+ <exports symbol='XML_FROM_WRITER' type='enum'/>
+ <exports symbol='XML_ERR_UNSUPPORTED_ENCODING' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_IN_PROLOG' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_IDC' type='enum'/>
+ <exports symbol='XML_IO_ENOTTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_WARN_SKIP_SCHEMA' type='enum'/>
+ <exports symbol='XML_DTD_UNKNOWN_NOTATION' type='enum'/>
+ <exports symbol='XML_FROM_DATATYPE' type='enum'/>
+ <exports symbol='XML_ERR_WARNING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' type='enum'/>
+ <exports symbol='XML_IO_EISDIR' type='enum'/>
+ <exports symbol='XML_XINCLUDE_MULTIPLE_ROOT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_UNION_CHILD' type='enum'/>
+ <exports symbol='XML_XPATH_MEMORY_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOROOT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_WARN_ATTR_REDECL_PROH' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_3_2_1' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_3_2_2' type='enum'/>
+ <exports symbol='XML_XPATH_UNCLOSED_ERROR' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_NOTATION' type='enum'/>
+ <exports symbol='XML_CHECK_NO_NEXT' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_ATTR_DECL' type='enum'/>
+ <exports symbol='XML_CHECK_NO_PARENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_TOTALDIGITS_VALID' type='enum'/>
+ <exports symbol='XML_IO_ENOLCK' type='enum'/>
+ <exports symbol='XML_XINCLUDE_DEPRECATED_NS' type='enum'/>
+ <exports symbol='XML_RNGP_CHOICE_EMPTY' type='enum'/>
+ <exports symbol='XML_ERR_LITERAL_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_SEMICOL_MISSING' type='enum'/>
+ <exports symbol='XML_DTD_MULTIPLE_ID' type='enum'/>
+ <exports symbol='XML_FROM_XPATH' type='enum'/>
+ <exports symbol='XML_TREE_INVALID_DEC' type='enum'/>
+ <exports symbol='XML_SCHEMAP_EXTENSION_NO_BASE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_E_PROPS_CORRECT_5' type='enum'/>
+ <exports symbol='XML_SCHEMAP_E_PROPS_CORRECT_4' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_DOCTYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_E_PROPS_CORRECT_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_E_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NO_XSI' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_SIMPLE_TYPE_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_1' type='enum'/>
+ <exports symbol='XML_CHECK_NO_NAME' type='enum'/>
+ <exports symbol='XML_ERR_CONDSEC_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_PI' type='enum'/>
+ <exports symbol='XML_ERR_EQUAL_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_WHITE_SPACE' type='enum'/>
+ <exports symbol='XML_DTD_UNKNOWN_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_1_2' type='enum'/>
+ <exports symbol='XML_RNGP_INTERLEAVE_CREATE_FAILED' type='enum'/>
+ <exports symbol='XML_IO_EAGAIN' type='enum'/>
+ <exports symbol='XML_ERR_NOTATION_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_DTD_ENTITY_TYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_SIMPLE_TYPE_4' type='enum'/>
+ <exports symbol='XML_RNGP_GRAMMAR_CONTENT' type='enum'/>
+ <exports symbol='XML_FTP_URL_SYNTAX' type='enum'/>
+ <exports symbol='XML_ERR_NONE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD' type='enum'/>
+ <exports symbol='XML_XPATH_NUMBER_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_FACET_TYPE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_ONEMORE' type='enum'/>
+ <exports symbol='XML_ERR_CONDSEC_INVALID' type='enum'/>
+ <exports symbol='XML_XINCLUDE_INCLUDE_IN_INCLUDE' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_IN_EPILOG' type='enum'/>
+ <exports symbol='XML_RNGP_GRAMMAR_MISSING' type='enum'/>
+ <exports symbol='XML_RNGP_GRAMMAR_NO_START' type='enum'/>
+ <exports symbol='XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_INTERLEAVE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ELEMENT_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_REF' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_EMPTY' type='enum'/>
+ <exports symbol='XML_FROM_I18N' type='enum'/>
+ <exports symbol='XML_DTD_MISSING_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_IO_EMFILE' type='enum'/>
+ <exports symbol='XML_RNGP_EMPTY_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_ERR_VERSION_MISSING' type='enum'/>
+ <exports symbol='XML_IO_NO_INPUT' type='enum'/>
+ <exports symbol='XML_NS_ERR_UNDEFINED_NAMESPACE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MINLENGTH_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_WILDCARD' type='enum'/>
+ <exports symbol='XML_IO_WRITE' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_PE_INTERNAL' type='enum'/>
+ <exports symbol='XML_DTD_XMLID_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_DERIVED_OK_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_DERIVED_OK_2_1' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_NS_DECL' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_ELEM' type='enum'/>
+ <exports symbol='XML_IO_NETWORK_ATTEMPT' type='enum'/>
+ <exports symbol='XML_MODULE_CLOSE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_EMPTY' type='enum'/>
+ <exports symbol='XML_ERR_ATTLIST_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_XINCLUDE_TEXT_FRAGMENT' type='enum'/>
+ <exports symbol='XML_C14N_RELATIVE_NAMESPACE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_FAILED_LOAD' type='enum'/>
+ <exports symbol='XML_ERR_ATTRIBUTE_WITHOUT_VALUE' type='enum'/>
+ <exports symbol='XML_ERR_NAME_TOO_LONG' type='enum'/>
+ <exports symbol='XML_XPTR_SYNTAX_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_TYPE' type='enum'/>
+ <exports symbol='XML_CHECK_WRONG_DOC' type='enum'/>
+ <exports symbol='XML_NS_ERR_XML_NAMESPACE' type='enum'/>
+ <exports symbol='XML_ERR_DOCTYPE_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_XINCLUDE_PARSE_VALUE' type='enum'/>
+ <exports symbol='XML_RNGP_NSNAME_NO_NS' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_IMPORT_2_2' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_ELEMENT' type='enum'/>
+ <exports symbol='XML_RNGP_PARENTREF_NAME_INVALID' type='enum'/>
+ <exports symbol='XML_NS_ERR_QNAME' type='enum'/>
+ <exports symbol='XML_DTD_NOTATION_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ST_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ST_PROPS_CORRECT_3' type='enum'/>
+ <exports symbol='XML_I18N_NO_NAME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ST_PROPS_CORRECT_1' type='enum'/>
+ <exports symbol='XML_RNGP_EXCEPT_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_CT_EXTENDS_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ALL_CHILD' type='enum'/>
+ <exports symbol='XML_DTD_MIXED_CORRUPT' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_BOUNDARY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ELEMFORMDEFAULT_VALUE' type='enum'/>
+ <exports symbol='XML_I18N_EXCESS_HANDLER' type='enum'/>
+ <exports symbol='XML_RNGP_DATA_CONTENT' type='enum'/>
+ <exports symbol='XML_ERR_STRING_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_RNGP_EXCEPT_MULTIPLE' type='enum'/>
+ <exports symbol='XML_IO_EDEADLK' type='enum'/>
+ <exports symbol='XML_ERR_ATTRIBUTE_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE' type='enum'/>
+ <exports symbol='XML_IO_EINVAL' type='enum'/>
+ <exports symbol='XML_IO_ENAMETOOLONG' type='enum'/>
+ <exports symbol='XML_RNGP_EXTERNAL_REF_FAILURE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_TEXT' type='enum'/>
+ <exports symbol='XML_CHECK_NO_DOC' type='enum'/>
+ <exports symbol='XML_DTD_INVALID_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_PATTERN_VALID' type='enum'/>
+ <exports symbol='XML_RNGP_TYPE_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1' type='enum'/>
+ <exports symbol='XML_ERR_TAG_NAME_MISMATCH' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3' type='enum'/>
+ <exports symbol='XML_ERR_ENCODING_NAME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5' type='enum'/>
+ <exports symbol='XML_SCHEMAV_MISC' type='enum'/>
+ <exports symbol='XML_IO_ECONNREFUSED' type='enum'/>
+ <exports symbol='XML_ERR_XMLDECL_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_P_PROPS_CORRECT_1' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_ENTITYREF' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_2_2_1' type='enum'/>
+ <exports symbol='XML_XINCLUDE_BUILD_FAILED' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_NO_NAME' type='enum'/>
+ <exports symbol='XML_ERR_ENTITYREF_AT_EOF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOATTR_NOREF' type='enum'/>
+ <exports symbol='XML_RNGP_ATTRIBUTE_CHILDREN' type='enum'/>
+ <exports symbol='XML_XPATH_UNDEF_PREFIX_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_1' type='enum'/>
+ <exports symbol='XML_SAVE_NO_DOCTYPE' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_IN_EPILOG' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_4' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CT_PROPS_CORRECT_4' type='enum'/>
+ <exports symbol='XML_ERR_URI_FRAGMENT' type='enum'/>
+ <exports symbol='XML_IO_ESPIPE' type='enum'/>
+ <exports symbol='XML_DTD_NO_DOC' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CT_PROPS_CORRECT_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOT_SCHEMA' type='enum'/>
+ <exports symbol='XML_FROM_SCHEMASV' type='enum'/>
+ <exports symbol='XML_FROM_SCHEMASP' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_3_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_1' type='enum'/>
+ <exports symbol='XML_ERR_MIXED_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_DTD_STANDALONE_WHITE_SPACE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_FACET' type='enum'/>
+ <exports symbol='XML_IO_ENOTEMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAV_WRONGELEM' type='enum'/>
+ <exports symbol='XML_RNGP_TYPE_NOT_FOUND' type='enum'/>
+ <exports symbol='XML_IO_BUFFER_FULL' type='enum'/>
+ <exports symbol='XML_SCHEMAP_E_PROPS_CORRECT_6' type='enum'/>
+ <exports symbol='XML_DTD_CONTENT_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_MEMBER_TYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOROOT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_6' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_TYPE' type='enum'/>
+ <exports symbol='XML_ERR_CDATA_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_TYPE_3_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_TYPE_3_1_1' type='enum'/>
+ <exports symbol='XML_CHECK_NS_ANCESTOR' type='enum'/>
+ <exports symbol='XML_ERR_DOCUMENT_END' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ENUMERATION_VALID' type='enum'/>
+ <exports symbol='XML_ERR_CHARREF_IN_PROLOG' type='enum'/>
+ <exports symbol='XML_RNGP_INVALID_DEFINE_NAME' type='enum'/>
+ <exports symbol='XML_SAVE_UNKNOWN_ENCODING' type='enum'/>
+ <exports symbol='XML_ERR_CONDSEC_INVALID_KEYWORD' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_7' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTYPE' type='enum'/>
+ <exports symbol='XML_ERR_NO_MEMORY' type='enum'/>
+ <exports symbol='XML_FROM_IO' type='enum'/>
+ <exports symbol='XML_HTML_UNKNOWN_TAG' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ATTR_NAME' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_ATTR' type='enum'/>
+ <exports symbol='XML_CHECK_WRONG_NAME' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTEMPTY' type='enum'/>
+ <exports symbol='XML_IO_EROFS' type='enum'/>
+ <exports symbol='XML_IO_EXDEV' type='enum'/>
+ <exports symbol='XML_XINCLUDE_NO_FALLBACK' type='enum'/>
+ <exports symbol='XML_RNGP_URI_FRAGMENT' type='enum'/>
+ <exports symbol='XML_FROM_MEMORY' type='enum'/>
+ <exports symbol='XML_ERR_MISSING_ENCODING' type='enum'/>
+ <exports symbol='XML_RNGP_ELEMENT_CONTENT' type='enum'/>
+ <exports symbol='XML_RNGP_UNKNOWN_TYPE_LIB' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOT_DETERMINISTIC' type='enum'/>
+ <exports symbol='XML_XPATH_EXPRESSION_OK' type='enum'/>
+ <exports symbol='XML_HTTP_UNKNOWN_HOST' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_DTD_NO_DTD' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_ONEMORE_GROUP_ATTR' type='enum'/>
+ <exports symbol='XML_ERR_VALUE_REQUIRED' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_TEXT' type='enum'/>
+ <exports symbol='XML_RNGP_URI_NOT_ABSOLUTE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_ATTR' type='enum'/>
+ <exports symbol='XML_FTP_PASV_ANSWER' type='enum'/>
+ <exports symbol='XML_ERR_VERSION_MISMATCH' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_BOOLEAN' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_4_2' type='enum'/>
+ <exports symbol='XML_DTD_ELEM_DEFAULT_NAMESPACE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_4' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REGEXP_INVALID' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_1' type='enum'/>
+ <exports symbol='XML_C14N_CREATE_STACK' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_2_1' type='enum'/>
+ <exports symbol='XML_FROM_RELAXNGV' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME' type='enum'/>
+ <exports symbol='XML_CHECK_ENTITY_TYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CONSTRUCT' type='enum'/>
+ <exports symbol='XML_RNGP_EXTERNALREF_RECURSE' type='enum'/>
+ <exports symbol='XML_RNGP_CHOICE_CONTENT' type='enum'/>
+ <exports symbol='XML_RNGP_UNKNOWN_COMBINE' type='enum'/>
+ <exports symbol='XML_RNGP_START_EMPTY' type='enum'/>
+ <exports symbol='XML_IO_ENCODER' type='enum'/>
+ <exports symbol='XML_WAR_NS_URI' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ATTRGRP_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_IS_EXTERNAL' type='enum'/>
+ <exports symbol='XML_WAR_UNDECLARED_ENTITY' type='enum'/>
+ <exports symbol='XML_SCHEMAV_ATTRUNKNOWN' type='enum'/>
+ <exports symbol='XML_IO_ENODEV' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_REF' type='enum'/>
+ <exports symbol='XML_FROM_PARSER' type='enum'/>
+ <exports symbol='XML_C14N_CREATE_CTXT' type='enum'/>
+ <exports symbol='XML_XINCLUDE_TEXT_DOCUMENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_PREFIX' type='enum'/>
+ <exports symbol='XML_XINCLUDE_FALLBACKS_IN_INCLUDE' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_TYPE' type='enum'/>
+ <exports symbol='XML_CHECK_NS_SCOPE' type='enum'/>
+ <exports symbol='XML_IO_FLUSH' type='enum'/>
+ <exports symbol='XML_CATALOG_ENTRY_BROKEN' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_CTXT_POSITION' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_LENGTH_VALID' type='enum'/>
+ <exports symbol='XML_DTD_STANDALONE_DEFAULTED' type='enum'/>
+ <exports symbol='XML_DTD_UNKNOWN_ELEM' type='enum'/>
+ <exports symbol='XML_WAR_SPACE_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_FACET_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOTATION_NO_NAME' type='enum'/>
+ <exports symbol='XML_XPATH_START_LITERAL_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_ELEMCONTENT_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_RNGP_INCLUDE_FAILURE' type='enum'/>
+ <exports symbol='XML_ERR_COMMENT_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2' type='enum'/>
+ <exports symbol='XML_BUF_OVERFLOW' type='enum'/>
+ <exports symbol='XML_IO_EMSGSIZE' type='enum'/>
+ <exports symbol='XML_FROM_CATALOG' type='enum'/>
+ <exports symbol='XML_SCHEMAV_ATTRINVALID' type='enum'/>
+ <exports symbol='XML_NS_ERR_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_2' type='enum'/>
+ <exports symbol='XML_FROM_HTML' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_MAXOCCURS' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD' type='enum'/>
+ <exports symbol='XML_RNGP_ELEMENT_NAME' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_VALUE' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_ARITY' type='enum'/>
+ <exports symbol='XML_RNGP_ERROR_TYPE_LIB' type='enum'/>
+ <exports symbol='XML_XPTR_EVAL_FAILED' type='enum'/>
+ <exports symbol='XML_DTD_NO_ROOT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_IMPORT_REDEFINE_NSNAME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ATTR_CHILD' type='enum'/>
+ <exports symbol='XML_ERR_UNKNOWN_ENCODING' type='enum'/>
+ <exports symbol='XML_RNGP_REF_NO_NAME' type='enum'/>
+ <exports symbol='XML_C14N_UNKNOW_NODE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REF_AND_SUBTYPE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR' type='enum'/>
+ <exports symbol='XML_C14N_INVALID_NODE' type='enum'/>
+ <exports symbol='XML_RNGP_TEXT_EXPECTED' type='enum'/>
+ <exports symbol='XML_XPATH_UNDEF_VARIABLE_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOROLLBACK' type='enum'/>
+ <exports symbol='XML_SCHEMAV_FACET' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_DEC_CHARREF' type='enum'/>
+ <exports symbol='XML_RNGP_NEED_COMBINE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTTOPLEVEL' type='enum'/>
+ <exports symbol='XML_CATALOG_MISSING_ATTR' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_LIST' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_TYPE_2' type='enum'/>
+ <exports symbol='XML_RNGP_EXCEPT_EMPTY' type='enum'/>
+ <exports symbol='XML_XPATH_UNFINISHED_LITERAL_ERROR' type='enum'/>
+ <exports symbol='XML_RNGP_INTERLEAVE_NO_CONTENT' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_HEX_CHARREF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_ERR_CHARREF_IN_DTD' type='enum'/>
+ <exports symbol='XML_IO_ENFILE' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_IS_PARAMETER' type='enum'/>
+ <exports symbol='XML_I18N_CONV_FAILED' type='enum'/>
+ <exports symbol='XML_CHECK_WRONG_PARENT' type='enum'/>
+ <exports symbol='XML_RNGP_PARENTREF_NO_NAME' type='enum'/>
+ <exports symbol='XML_IO_EPERM' type='enum'/>
+ <exports symbol='XML_IO_ENETUNREACH' type='enum'/>
+ <exports symbol='XML_ERR_CHARREF_AT_EOF' type='enum'/>
+ <exports symbol='XML_IO_ENOMEM' type='enum'/>
+ <exports symbol='XML_IO_ENOSPC' type='enum'/>
+ <exports symbol='XML_FROM_NONE' type='enum'/>
+ <exports symbol='XML_RNGP_TYPE_VALUE' type='enum'/>
+ <exports symbol='XML_FROM_REGEXP' type='enum'/>
+ <exports symbol='XML_RNGP_DEF_CHOICE_AND_INTERLEAVE' type='enum'/>
+ <exports symbol='XML_TREE_UNTERMINATED_ENTITY' type='enum'/>
+ <exports symbol='XML_ERR_URI_REQUIRED' type='enum'/>
+ <exports symbol='XML_FROM_TREE' type='enum'/>
+ <exports symbol='XML_ERR_EXT_ENTITY_STANDALONE' type='enum'/>
+ <exports symbol='XML_TREE_INVALID_HEX' type='enum'/>
+ <exports symbol='XML_C14N_REQUIRES_UTF8' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_PROCESSING' type='enum'/>
+ <exports symbol='XML_FROM_XINCLUDE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CVC_SIMPLE_TYPE' type='enum'/>
+ <exports symbol='XML_RNGP_GRAMMAR_EMPTY' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_NCNAME' type='enum'/>
+ <exports symbol='XML_RNGP_ELEMENT_NO_CONTENT' type='enum'/>
+ <exports symbol='XML_XINCLUDE_NO_HREF' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_OPERAND' type='enum'/>
+ <exports symbol='XML_IO_ENOEXEC' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_REF' type='enum'/>
+ <exports symbol='XML_XINCLUDE_HREF_URI' type='enum'/>
+ <exports symbol='XML_SCHEMAP_FAILED_PARSE' type='enum'/>
+ <exports symbol='XML_RNGP_HREF_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_ATTRIBUTE_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ATTR_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_ELEMENT_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE' type='enum'/>
+ <exports symbol='XML_MODULE_OPEN' type='enum'/>
+ <exports symbol='XML_ERR_ENTITY_CHAR_ERROR' type='enum'/>
+ <exports symbol='XML_DTD_UNKNOWN_ENTITY' type='enum'/>
+ <exports symbol='XML_RNGP_PARSE_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_NOTATION_PROCESSING' type='enum'/>
+ <exports symbol='XML_RNGP_XML_NS' type='enum'/>
+ <exports symbol='XML_ERR_MISPLACED_CDATA_END' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_ONEMORE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_CT_EXTENDS_1_1' type='enum'/>
+ <exports symbol='XML_RNGP_REF_CREATE_FAILED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_CT_EXTENDS_1_3' type='enum'/>
+ <exports symbol='XML_DTD_ROOT_NAME' type='enum'/>
+ <exports symbol='XML_RNGP_REF_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_CHECK_NO_HREF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_CHOICE_CHILD' type='enum'/>
+ <exports symbol='XML_RNGP_ELEM_CONTENT_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAV_HAVEDEFAULT' type='enum'/>
+ <exports symbol='XML_I18N_NO_HANDLER' type='enum'/>
+ <exports symbol='XML_RNGP_MISSING_HREF' type='enum'/>
+ <exports symbol='XML_ERR_PI_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_ERR_UNKNOWN_VERSION' type='enum'/>
+ <exports symbol='XML_FROM_RELAXNGP' type='enum'/>
+ <exports symbol='XML_FROM_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAP_S4S_ATTR_INVALID_VALUE' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_TEXT' type='enum'/>
+ <exports symbol='XML_ERR_NO_DTD' type='enum'/>
+ <exports symbol='XML_RNGP_START_CHOICE_AND_INTERLEAVE' type='enum'/>
+ <exports symbol='XML_FROM_XSLT' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_ATTR' type='enum'/>
+ <exports symbol='XML_IO_EACCES' type='enum'/>
+ <exports symbol='XML_ERR_NOTATION_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_SCHEMATRONV_ASSERT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_INVALIDATTR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_RECURSIVE' type='enum'/>
+ <exports symbol='XML_HTTP_URL_SYNTAX' type='enum'/>
+ <exports symbol='XML_SCHEMAP_GROUP_NONAME_NOREF' type='enum'/>
+ <exports symbol='XML_DTD_DUP_TOKEN' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4' type='enum'/>
+ <exports symbol='XML_SCHEMAP_S4S_ELEM_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_1_1' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_FRAGMENT' type='enum'/>
+ <exports symbol='XML_DTD_LOAD_ERROR' type='enum'/>
+ <exports symbol='XML_CHECK_UNKNOWN_NODE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_NOTATION_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_C_PROPS_CORRECT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_CT_1' type='enum'/>
+ <exports symbol='XML_RNGP_EMPTY_CONTENT' type='enum'/>
+ <exports symbol='XML_IO_EALREADY' type='enum'/>
+ <exports symbol='XML_IO_ERANGE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1' type='enum'/>
+ <exports symbol='XML_IO_ENOSYS' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOTHING_TO_PARSE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_CTXT_SIZE' type='enum'/>
+ <exports symbol='XML_CHECK_NO_ELEM' type='enum'/>
+ <exports symbol='XML_XPATH_EXPR_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI' type='enum'/>
+ <exports symbol='XML_RNGP_DEFINE_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_ENTITY' type='enum'/>
+ <exports symbol='XML_CHECK_NAME_NOT_NULL' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_MINOCCURS' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ALL_LIMITED' type='enum'/>
+ <exports symbol='XML_SCHEMATRONV_REPORT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID' type='enum'/>
+ <exports symbol='XML_IO_EPIPE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_NOTYPE_NOREF' type='enum'/>
+ <exports symbol='XML_RNGP_ATTRIBUTE_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3' type='enum'/>
+ <exports symbol='XML_IO_LOAD_ERROR' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_ENTITY_DECL' type='enum'/>
+ <exports symbol='XML_RNGP_CREATE_FAILURE' type='enum'/>
+ <exports symbol='XML_IO_EBADF' type='enum'/>
+ <exports symbol='XML_RNGP_PREFIX_UNDEFINED' type='enum'/>
+ <exports symbol='XML_ERR_HYPHEN_IN_COMMENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE' type='enum'/>
+ <exports symbol='XML_RNGP_INCLUDE_EMPTY' type='enum'/>
+ <exports symbol='XML_RNGP_PARENTREF_NOT_EMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_FACET_NO_VALUE' type='enum'/>
+ <exports symbol='XML_XPTR_SUB_RESOURCE_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_NOT_STANDALONE' type='enum'/>
+ <exports symbol='XML_RNGP_START_MISSING' type='enum'/>
+ <exports symbol='XML_DTD_NO_PREFIX' type='enum'/>
+ <exports symbol='XML_CATALOG_RECURSION' type='enum'/>
+ <exports symbol='XML_RNGP_UNKNOWN_CONSTRUCT' type='enum'/>
+ <exports symbol='XML_ERR_UNPARSED_ENTITY' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_IMPORT_CHILD' type='enum'/>
+ <exports symbol='XML_FTP_EPSV_ANSWER' type='enum'/>
+ <exports symbol='XML_CHECK_NOT_UTF8' type='enum'/>
+ <exports symbol='XML_ERR_FATAL' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_1' type='enum'/>
+ <exports symbol='XML_DTD_ID_REDEFINED' type='enum'/>
+ <exports symbol='XML_XPATH_ENCODING_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_INCLUDE' type='enum'/>
+ <exports symbol='XML_RNGP_NSNAME_ATTR_ANCESTOR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SRC_REDEFINE' type='enum'/>
+ <exports symbol='XML_RNGP_REF_CYCLE' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_ATTR_ATTR' type='enum'/>
+ <exports symbol='XML_XPTR_UNKNOWN_SCHEME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_FACET_VALUE' type='enum'/>
+ <exports symbol='XML_FROM_CHECK' type='enum'/>
+ <exports symbol='XML_SCHEMAV_ELEMCONT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REF_AND_CONTENT' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_START_INTERLEAVE' type='enum'/>
+ <exports symbol='XML_DTD_CONTENT_NOT_DETERMINIST' type='enum'/>
+ <exports symbol='XML_DTD_NO_ELEM_NAME' type='enum'/>
+ <exports symbol='XML_CHECK_NO_PREV' type='enum'/>
+ <exports symbol='XML_RNGP_VALUE_NO_CONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD' type='enum'/>
+ <exports symbol='XML_TREE_NOT_UTF8' type='enum'/>
+ <exports symbol='XML_IO_EAFNOSUPPORT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1' type='enum'/>
+ <exports symbol='XML_CATALOG_NOT_CATALOG' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4' type='enum'/>
+ <exports symbol='XML_IO_EFBIG' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_COMMENT' type='enum'/>
+ <exports symbol='XML_RNGP_REF_NAME_INVALID' type='enum'/>
+ <exports symbol='XML_ERR_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1' type='enum'/>
+ <exports symbol='XML_DTD_ELEM_NAMESPACE' type='enum'/>
+ <exports symbol='XML_CHECK_OUTSIDE_DICT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_P_PROPS_CORRECT_2_1' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_2_2_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_ELT_5_2_2_2_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_P_PROPS_CORRECT_2_2' type='enum'/>
+ <exports symbol='XML_WAR_CATALOG_PI' type='enum'/>
+ <exports symbol='XML_REGEXP_COMPILE_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_MININCLUSIVE_VALID' type='enum'/>
+ <exports symbol='XML_SCHEMAV_ISABSTRACT' type='enum'/>
+ <exports symbol='XML_RNGP_DEFINE_MISSING' type='enum'/>
+ <exports symbol='XML_ERR_NS_DECL_ERROR' type='enum'/>
+ <exports symbol='XML_ERR_INTERNAL_ERROR' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1' type='enum'/>
+ <exports symbol='XML_ERR_ELEMCONTENT_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_FROM_NAMESPACE' type='enum'/>
+ <exports symbol='XML_IO_EBUSY' type='enum'/>
+ <exports symbol='XML_RNGP_INCLUDE_RECURSE' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_URI' type='enum'/>
+ <exports symbol='XML_IO_ESRCH' type='enum'/>
+ <exports symbol='XML_FROM_XPOINTER' type='enum'/>
+ <exports symbol='XML_FROM_BUFFER' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_IN_PROLOG' type='enum'/>
+ <exports symbol='XML_RNGP_TEXT_HAS_CHILD' type='enum'/>
+ <exports symbol='XML_SCHEMAV_NOTNILLABLE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_ELEM_DEFAULT_FIXED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_ELEMENT' type='enum'/>
+ <exports symbol='XML_RNGP_REF_NO_DEF' type='enum'/>
+ <exports symbol='XML_ERR_NOT_WELL_BALANCED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CT_PROPS_CORRECT_5' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_CHARREF' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CT_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_CHAR' type='enum'/>
+ <exports symbol='XML_RNGP_FOREIGN_ELEMENT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DEF_AND_PREFIX' type='enum'/>
+ <exports symbol='XML_ERR_MIXED_NOT_STARTED' type='enum'/>
+ <exports symbol='XML_ERR_USER_STOP' type='enum'/>
+ <exports symbol='XML_CHECK_FOUND_CDATA' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INTERNAL' type='enum'/>
+ <exports symbol='XML_SCHEMAV_INVALIDELEM' type='enum'/>
+ <exports symbol='XML_ERR_INVALID_ENCODING' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_AU' type='enum'/>
+ <exports symbol='XML_CHECK_WRONG_NEXT' type='enum'/>
+ <exports symbol='XML_ERR_TAG_NOT_FINISHED' type='enum'/>
+ <exports symbol='XML_ERR_LTSLASH_REQUIRED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_REDEFINED_ATTRGROUP' type='enum'/>
+ <exports symbol='XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH' type='enum'/>
+ <exports symbol='XML_ERR_PEREF_IN_INT_SUBSET' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_BASE_TYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_ELEM_CHILD' type='enum'/>
+ <exports symbol='XML_WAR_UNKNOWN_VERSION' type='enum'/>
+ <exports symbol='XML_DTD_CONTENT_MODEL' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1' type='enum'/>
+ <exports symbol='XML_ERR_OK' type='enum'/>
+ <exports symbol='XML_NS_ERR_COLON' type='enum'/>
+ <exports symbol='XML_WAR_ENTITY_REDEFINED' type='enum'/>
+ <exports symbol='XML_ERR_ATTRIBUTE_REDEFINED' type='enum'/>
+ <exports symbol='XML_SCHEMAP_SIMPLETYPE_NONAME' type='enum'/>
+ <exports symbol='XML_SCHEMAP_UNKNOWN_GROUP_CHILD' type='enum'/>
+ <exports symbol='XML_IO_ENOTSUP' type='enum'/>
+ <exports symbol='XML_WAR_NS_URI_RELATIVE' type='enum'/>
+ <exports symbol='XML_NS_ERR_ATTRIBUTE_REDEFINED' type='enum'/>
+ <exports symbol='XML_ERR_NAME_REQUIRED' type='enum'/>
+ <exports symbol='XML_IO_ETIMEDOUT' type='enum'/>
+ <exports symbol='XML_SCHEMAP_INVALID_ENUM' type='enum'/>
+ <exports symbol='XML_RNGP_DEFINE_NAME_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2' type='enum'/>
+ <exports symbol='XML_RNGP_EMPTY_CONSTRUCT' type='enum'/>
+ <exports symbol='XML_RNGP_FORBIDDEN_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_FROM_OUTPUT' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1' type='enum'/>
+ <exports symbol='XML_CHECK_WRONG_PREV' type='enum'/>
+ <exports symbol='XML_IO_EEXIST' type='enum'/>
+ <exports symbol='XML_SCHEMAP_MG_PROPS_CORRECT_2' type='enum'/>
+ <exports symbol='XML_SCHEMAP_MG_PROPS_CORRECT_1' type='enum'/>
+ <exports symbol='XML_FROM_URI' type='enum'/>
+ <exports symbol='XML_RNGP_PAT_LIST_ELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAV_UNDECLAREDELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3' type='enum'/>
+ <exports symbol='XML_SCHEMAP_CT_PROPS_CORRECT_3' type='enum'/>
+ <exports symbol='XML_XINCLUDE_INVALID_CHAR' type='enum'/>
+ <exports symbol='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4' type='enum'/>
+ <exports symbol='XML_XPATH_INVALID_PREDICATE_ERROR' type='enum'/>
+ <exports symbol='xmlErrorPtr' type='typedef'/>
+ <exports symbol='xmlErrorLevel' type='typedef'/>
+ <exports symbol='xmlParserErrors' type='typedef'/>
+ <exports symbol='xmlErrorDomain' type='typedef'/>
+ <exports symbol='xmlError' type='typedef'/>
+ <exports symbol='_xmlError' type='struct'/>
+ <exports symbol='xmlParserValidityError' type='function'/>
+ <exports symbol='xmlGenericErrorFunc' type='function'/>
+ <exports symbol='xmlSetGenericErrorFunc' type='function'/>
+ <exports symbol='xmlParserPrintFileInfo' type='function'/>
+ <exports symbol='xmlCtxtResetLastError' type='function'/>
+ <exports symbol='xmlResetLastError' type='function'/>
+ <exports symbol='initGenericErrorDefaultFunc' type='function'/>
+ <exports symbol='xmlCopyError' type='function'/>
+ <exports symbol='xmlParserValidityWarning' type='function'/>
+ <exports symbol='xmlParserPrintFileContext' type='function'/>
+ <exports symbol='xmlParserError' type='function'/>
+ <exports symbol='xmlParserWarning' type='function'/>
+ <exports symbol='xmlStructuredErrorFunc' type='function'/>
+ <exports symbol='xmlSetStructuredErrorFunc' type='function'/>
+ <exports symbol='xmlResetError' type='function'/>
+ <exports symbol='xmlGetLastError' type='function'/>
+ <exports symbol='xmlCtxtGetLastError' type='function'/>
+ </file>
+ <file name='xmlexports'>
+ <summary>macros for marking symbols as exportable/importable.</summary>
+ <description>macros for marking symbols as exportable/importable. </description>
+ <author>Igor Zlatovic &lt;igor@zlatkovic.com&gt; </author>
+ <exports symbol='_REENTRANT' type='macro'/>
+ <exports symbol='XMLCDECL' type='macro'/>
+ <exports symbol='XMLPUBVAR' type='macro'/>
+ <exports symbol='LIBXML_DLL_IMPORT' type='macro'/>
+ <exports symbol='XMLCALL' type='macro'/>
+ <exports symbol='XMLPUBFUN' type='macro'/>
+ </file>
+ <file name='xmlmemory'>
+ <summary>interface for the memory allocator</summary>
+ <description>provides interfaces for the memory allocator, including debugging capabilities. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlRealloc' type='macro'/>
+ <exports symbol='xmlMalloc' type='macro'/>
+ <exports symbol='xmlMallocAtomic' type='macro'/>
+ <exports symbol='DEBUG_MEMORY' type='macro'/>
+ <exports symbol='xmlMemStrdup' type='macro'/>
+ <exports symbol='xmlMemRealloc' type='function'/>
+ <exports symbol='xmlInitMemory' type='function'/>
+ <exports symbol='xmlMemFree' type='function'/>
+ <exports symbol='xmlMemMalloc' type='function'/>
+ <exports symbol='xmlMemDisplayLast' type='function'/>
+ <exports symbol='xmlMemGet' type='function'/>
+ <exports symbol='xmlMemoryDump' type='function'/>
+ <exports symbol='xmlMallocLoc' type='function'/>
+ <exports symbol='xmlMemDisplay' type='function'/>
+ <exports symbol='xmlMemBlocks' type='function'/>
+ <exports symbol='xmlGcMemGet' type='function'/>
+ <exports symbol='xmlStrdupFunc' type='function'/>
+ <exports symbol='xmlFreeFunc' type='function'/>
+ <exports symbol='xmlMemShow' type='function'/>
+ <exports symbol='xmlMallocAtomicLoc' type='function'/>
+ <exports symbol='xmlReallocLoc' type='function'/>
+ <exports symbol='xmlCleanupMemory' type='function'/>
+ <exports symbol='xmlMemUsed' type='function'/>
+ <exports symbol='xmlMemSetup' type='function'/>
+ <exports symbol='xmlReallocFunc' type='function'/>
+ <exports symbol='xmlMallocFunc' type='function'/>
+ <exports symbol='xmlGcMemSetup' type='function'/>
+ <exports symbol='xmlMemoryStrdup' type='function'/>
+ <exports symbol='xmlMemStrdupLoc' type='function'/>
+ </file>
+ <file name='xmlmodule'>
+ <summary>dynamic module loading</summary>
+ <description>basic API for dynamic module loading, used by libexslt added in 2.6.17 </description>
+ <author>Joel W. Reed </author>
+ <exports symbol='XML_MODULE_LAZY' type='enum'/>
+ <exports symbol='XML_MODULE_LOCAL' type='enum'/>
+ <exports symbol='xmlModule' type='typedef'/>
+ <exports symbol='xmlModulePtr' type='typedef'/>
+ <exports symbol='xmlModuleOption' type='typedef'/>
+ <exports symbol='xmlModuleFree' type='function'/>
+ <exports symbol='xmlModuleSymbol' type='function'/>
+ <exports symbol='xmlModuleOpen' type='function'/>
+ <exports symbol='xmlModuleClose' type='function'/>
+ </file>
+ <file name='xmlreader'>
+ <summary>the XMLReader implementation</summary>
+ <description>API of the XML streaming API based on C# interfaces. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_READER_TYPE_DOCUMENT_FRAGMENT' type='enum'/>
+ <exports symbol='XML_PARSER_SEVERITY_ERROR' type='enum'/>
+ <exports symbol='XML_READER_TYPE_ELEMENT' type='enum'/>
+ <exports symbol='XML_READER_TYPE_TEXT' type='enum'/>
+ <exports symbol='XML_READER_TYPE_XML_DECLARATION' type='enum'/>
+ <exports symbol='XML_READER_TYPE_NONE' type='enum'/>
+ <exports symbol='XML_PARSER_SEVERITY_VALIDITY_ERROR' type='enum'/>
+ <exports symbol='XML_READER_TYPE_PROCESSING_INSTRUCTION' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_ERROR' type='enum'/>
+ <exports symbol='XML_READER_TYPE_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_PARSER_SEVERITY_WARNING' type='enum'/>
+ <exports symbol='XML_READER_TYPE_DOCUMENT' type='enum'/>
+ <exports symbol='XML_READER_TYPE_DOCUMENT_TYPE' type='enum'/>
+ <exports symbol='XML_READER_TYPE_END_ELEMENT' type='enum'/>
+ <exports symbol='XML_READER_TYPE_WHITESPACE' type='enum'/>
+ <exports symbol='XML_READER_TYPE_NOTATION' type='enum'/>
+ <exports symbol='XML_PARSER_SUBST_ENTITIES' type='enum'/>
+ <exports symbol='XML_READER_TYPE_ENTITY_REFERENCE' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_INITIAL' type='enum'/>
+ <exports symbol='XML_READER_TYPE_COMMENT' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_CLOSED' type='enum'/>
+ <exports symbol='XML_PARSER_DEFAULTATTRS' type='enum'/>
+ <exports symbol='XML_READER_TYPE_ENTITY' type='enum'/>
+ <exports symbol='XML_READER_TYPE_SIGNIFICANT_WHITESPACE' type='enum'/>
+ <exports symbol='XML_READER_TYPE_END_ENTITY' type='enum'/>
+ <exports symbol='XML_PARSER_VALIDATE' type='enum'/>
+ <exports symbol='XML_PARSER_SEVERITY_VALIDITY_WARNING' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_READING' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_EOF' type='enum'/>
+ <exports symbol='XML_READER_TYPE_CDATA' type='enum'/>
+ <exports symbol='XML_PARSER_LOADDTD' type='enum'/>
+ <exports symbol='XML_TEXTREADER_MODE_INTERACTIVE' type='enum'/>
+ <exports symbol='xmlTextReaderPtr' type='typedef'/>
+ <exports symbol='xmlParserSeverities' type='typedef'/>
+ <exports symbol='xmlParserProperties' type='typedef'/>
+ <exports symbol='xmlTextReaderMode' type='typedef'/>
+ <exports symbol='xmlTextReader' type='typedef'/>
+ <exports symbol='xmlTextReaderLocatorPtr' type='typedef'/>
+ <exports symbol='xmlReaderTypes' type='typedef'/>
+ <exports symbol='xmlNewTextReaderFilename' type='function'/>
+ <exports symbol='xmlTextReaderHasAttributes' type='function'/>
+ <exports symbol='xmlTextReaderReadState' type='function'/>
+ <exports symbol='xmlReaderForFile' type='function'/>
+ <exports symbol='xmlTextReaderConstNamespaceUri' type='function'/>
+ <exports symbol='xmlTextReaderCurrentDoc' type='function'/>
+ <exports symbol='xmlTextReaderGetParserLineNumber' type='function'/>
+ <exports symbol='xmlTextReaderExpand' type='function'/>
+ <exports symbol='xmlTextReaderXmlLang' type='function'/>
+ <exports symbol='xmlReaderForDoc' type='function'/>
+ <exports symbol='xmlReaderNewIO' type='function'/>
+ <exports symbol='xmlTextReaderClose' type='function'/>
+ <exports symbol='xmlTextReaderReadInnerXml' type='function'/>
+ <exports symbol='xmlTextReaderConstEncoding' type='function'/>
+ <exports symbol='xmlTextReaderNormalization' type='function'/>
+ <exports symbol='xmlTextReaderGetParserProp' type='function'/>
+ <exports symbol='xmlTextReaderMoveToAttribute' type='function'/>
+ <exports symbol='xmlTextReaderQuoteChar' type='function'/>
+ <exports symbol='xmlTextReaderSetSchema' type='function'/>
+ <exports symbol='xmlTextReaderValue' type='function'/>
+ <exports symbol='xmlTextReaderIsValid' type='function'/>
+ <exports symbol='xmlTextReaderMoveToFirstAttribute' type='function'/>
+ <exports symbol='xmlTextReaderGetParserColumnNumber' type='function'/>
+ <exports symbol='xmlTextReaderConstValue' type='function'/>
+ <exports symbol='xmlNewTextReader' type='function'/>
+ <exports symbol='xmlTextReaderGetAttributeNo' type='function'/>
+ <exports symbol='xmlTextReaderGetAttributeNs' type='function'/>
+ <exports symbol='xmlTextReaderConstName' type='function'/>
+ <exports symbol='xmlTextReaderConstString' type='function'/>
+ <exports symbol='xmlTextReaderConstXmlVersion' type='function'/>
+ <exports symbol='xmlTextReaderDepth' type='function'/>
+ <exports symbol='xmlTextReaderReadString' type='function'/>
+ <exports symbol='xmlTextReaderIsDefault' type='function'/>
+ <exports symbol='xmlTextReaderMoveToNextAttribute' type='function'/>
+ <exports symbol='xmlReaderNewWalker' type='function'/>
+ <exports symbol='xmlTextReaderConstPrefix' type='function'/>
+ <exports symbol='xmlReaderWalker' type='function'/>
+ <exports symbol='xmlTextReaderConstLocalName' type='function'/>
+ <exports symbol='xmlTextReaderNodeType' type='function'/>
+ <exports symbol='xmlFreeTextReader' type='function'/>
+ <exports symbol='xmlTextReaderName' type='function'/>
+ <exports symbol='xmlTextReaderRead' type='function'/>
+ <exports symbol='xmlTextReaderIsEmptyElement' type='function'/>
+ <exports symbol='xmlReaderNewMemory' type='function'/>
+ <exports symbol='xmlTextReaderSchemaValidateCtxt' type='function'/>
+ <exports symbol='xmlTextReaderHasValue' type='function'/>
+ <exports symbol='xmlTextReaderConstBaseUri' type='function'/>
+ <exports symbol='xmlTextReaderBaseUri' type='function'/>
+ <exports symbol='xmlTextReaderMoveToAttributeNo' type='function'/>
+ <exports symbol='xmlTextReaderLocatorLineNumber' type='function'/>
+ <exports symbol='xmlTextReaderMoveToAttributeNs' type='function'/>
+ <exports symbol='xmlTextReaderNext' type='function'/>
+ <exports symbol='xmlTextReaderAttributeCount' type='function'/>
+ <exports symbol='xmlTextReaderLookupNamespace' type='function'/>
+ <exports symbol='xmlTextReaderMoveToElement' type='function'/>
+ <exports symbol='xmlReaderForIO' type='function'/>
+ <exports symbol='xmlTextReaderReadOuterXml' type='function'/>
+ <exports symbol='xmlTextReaderRelaxNGValidateCtxt' type='function'/>
+ <exports symbol='xmlTextReaderPrefix' type='function'/>
+ <exports symbol='xmlTextReaderReadAttributeValue' type='function'/>
+ <exports symbol='xmlTextReaderNextSibling' type='function'/>
+ <exports symbol='xmlTextReaderErrorFunc' type='function'/>
+ <exports symbol='xmlReaderForFd' type='function'/>
+ <exports symbol='xmlTextReaderGetAttribute' type='function'/>
+ <exports symbol='xmlTextReaderLocalName' type='function'/>
+ <exports symbol='xmlTextReaderPreserve' type='function'/>
+ <exports symbol='xmlTextReaderCurrentNode' type='function'/>
+ <exports symbol='xmlTextReaderSetParserProp' type='function'/>
+ <exports symbol='xmlTextReaderGetRemainder' type='function'/>
+ <exports symbol='xmlTextReaderSetErrorHandler' type='function'/>
+ <exports symbol='xmlTextReaderIsNamespaceDecl' type='function'/>
+ <exports symbol='xmlReaderNewDoc' type='function'/>
+ <exports symbol='xmlTextReaderPreservePattern' type='function'/>
+ <exports symbol='xmlTextReaderConstXmlLang' type='function'/>
+ <exports symbol='xmlTextReaderGetErrorHandler' type='function'/>
+ <exports symbol='xmlTextReaderSetStructuredErrorHandler' type='function'/>
+ <exports symbol='xmlReaderNewFile' type='function'/>
+ <exports symbol='xmlTextReaderRelaxNGSetSchema' type='function'/>
+ <exports symbol='xmlReaderNewFd' type='function'/>
+ <exports symbol='xmlTextReaderRelaxNGValidate' type='function'/>
+ <exports symbol='xmlReaderForMemory' type='function'/>
+ <exports symbol='xmlTextReaderSetup' type='function'/>
+ <exports symbol='xmlTextReaderByteConsumed' type='function'/>
+ <exports symbol='xmlTextReaderLocatorBaseURI' type='function'/>
+ <exports symbol='xmlTextReaderNamespaceUri' type='function'/>
+ <exports symbol='xmlTextReaderSchemaValidate' type='function'/>
+ <exports symbol='xmlTextReaderStandalone' type='function'/>
+ </file>
+ <file name='xmlregexp'>
+ <summary>regular expressions handling</summary>
+ <description>basic API for libxml regular expressions handling used for XML Schemas and validation. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_EXP_COUNT' type='enum'/>
+ <exports symbol='XML_EXP_EMPTY' type='enum'/>
+ <exports symbol='XML_EXP_SEQ' type='enum'/>
+ <exports symbol='XML_EXP_ATOM' type='enum'/>
+ <exports symbol='XML_EXP_OR' type='enum'/>
+ <exports symbol='XML_EXP_FORBID' type='enum'/>
+ <exports symbol='xmlRegExecCtxtPtr' type='typedef'/>
+ <exports symbol='xmlExpCtxt' type='typedef'/>
+ <exports symbol='xmlExpNodePtr' type='typedef'/>
+ <exports symbol='xmlExpCtxtPtr' type='typedef'/>
+ <exports symbol='xmlExpNodeType' type='typedef'/>
+ <exports symbol='xmlRegExecCtxt' type='typedef'/>
+ <exports symbol='xmlExpNode' type='typedef'/>
+ <exports symbol='xmlRegexp' type='typedef'/>
+ <exports symbol='xmlRegexpPtr' type='typedef'/>
+ <exports symbol='forbiddenExp' type='variable'/>
+ <exports symbol='emptyExp' type='variable'/>
+ <exports symbol='xmlRegExecCallbacks' type='function'/>
+ <exports symbol='xmlRegNewExecCtxt' type='function'/>
+ <exports symbol='xmlExpNewOr' type='function'/>
+ <exports symbol='xmlRegFreeRegexp' type='function'/>
+ <exports symbol='xmlExpRef' type='function'/>
+ <exports symbol='xmlRegexpIsDeterminist' type='function'/>
+ <exports symbol='xmlRegExecErrInfo' type='function'/>
+ <exports symbol='xmlRegFreeExecCtxt' type='function'/>
+ <exports symbol='xmlExpCtxtNbCons' type='function'/>
+ <exports symbol='xmlExpSubsume' type='function'/>
+ <exports symbol='xmlRegExecPushString2' type='function'/>
+ <exports symbol='xmlRegExecNextValues' type='function'/>
+ <exports symbol='xmlExpExpDerive' type='function'/>
+ <exports symbol='xmlExpIsNillable' type='function'/>
+ <exports symbol='xmlExpFreeCtxt' type='function'/>
+ <exports symbol='xmlExpDump' type='function'/>
+ <exports symbol='xmlExpNewSeq' type='function'/>
+ <exports symbol='xmlExpFree' type='function'/>
+ <exports symbol='xmlExpNewRange' type='function'/>
+ <exports symbol='xmlRegexpCompile' type='function'/>
+ <exports symbol='xmlExpNewAtom' type='function'/>
+ <exports symbol='xmlRegexpExec' type='function'/>
+ <exports symbol='xmlRegExecPushString' type='function'/>
+ <exports symbol='xmlExpGetStart' type='function'/>
+ <exports symbol='xmlExpParse' type='function'/>
+ <exports symbol='xmlExpNewCtxt' type='function'/>
+ <exports symbol='xmlExpGetLanguage' type='function'/>
+ <exports symbol='xmlExpStringDerive' type='function'/>
+ <exports symbol='xmlExpCtxtNbNodes' type='function'/>
+ <exports symbol='xmlExpMaxToken' type='function'/>
+ <exports symbol='xmlRegexpPrint' type='function'/>
+ </file>
+ <file name='xmlsave'>
+ <summary>the XML document serializer</summary>
+ <description>API to save document or subtree of document </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SAVE_XHTML' type='enum'/>
+ <exports symbol='XML_SAVE_AS_XML' type='enum'/>
+ <exports symbol='XML_SAVE_NO_EMPTY' type='enum'/>
+ <exports symbol='XML_SAVE_NO_XHTML' type='enum'/>
+ <exports symbol='XML_SAVE_NO_DECL' type='enum'/>
+ <exports symbol='XML_SAVE_AS_HTML' type='enum'/>
+ <exports symbol='XML_SAVE_FORMAT' type='enum'/>
+ <exports symbol='XML_SAVE_WSNONSIG' type='enum'/>
+ <exports symbol='xmlSaveOption' type='typedef'/>
+ <exports symbol='xmlSaveCtxt' type='typedef'/>
+ <exports symbol='xmlSaveCtxtPtr' type='typedef'/>
+ <exports symbol='xmlSaveToIO' type='function'/>
+ <exports symbol='xmlSaveToFd' type='function'/>
+ <exports symbol='xmlSaveClose' type='function'/>
+ <exports symbol='xmlSaveSetAttrEscape' type='function'/>
+ <exports symbol='xmlSaveToBuffer' type='function'/>
+ <exports symbol='xmlSaveToFilename' type='function'/>
+ <exports symbol='xmlSaveFlush' type='function'/>
+ <exports symbol='xmlSaveDoc' type='function'/>
+ <exports symbol='xmlSaveSetEscape' type='function'/>
+ <exports symbol='xmlSaveTree' type='function'/>
+ </file>
+ <file name='xmlschemas'>
+ <summary>incomplete XML Schemas structure implementation</summary>
+ <description>interface to the XML Schemas handling and schema validity checking, it is incomplete right now. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SCHEMAS_ERR_NOTNILLABLE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_OK' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOROOT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_XXX' type='enum'/>
+ <exports symbol='XML_SCHEMA_VAL_VC_I_CREATE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_ISABSTRACT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_ATTRUNKNOWN' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_WRONGELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOTDETERMINIST' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_INTERNAL' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_MISSING' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_INVALIDATTR' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_CONSTRUCT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_FACET' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOTYPE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_VALUE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOROLLBACK' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOTTOPLEVEL' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOTEMPTY' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_INVALIDELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_ATTRINVALID' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_EXTRACONTENT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_NOTSIMPLE' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_UNDECLAREDELEM' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_HAVEDEFAULT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_ELEMCONT' type='enum'/>
+ <exports symbol='XML_SCHEMAS_ERR_' type='enum'/>
+ <exports symbol='xmlSchemaPtr' type='typedef'/>
+ <exports symbol='xmlSchemaParserCtxt' type='typedef'/>
+ <exports symbol='xmlSchemaValidOption' type='typedef'/>
+ <exports symbol='xmlSchemaSAXPlugPtr' type='typedef'/>
+ <exports symbol='xmlSchemaSAXPlugStruct' type='typedef'/>
+ <exports symbol='xmlSchemaValidCtxtPtr' type='typedef'/>
+ <exports symbol='xmlSchemaParserCtxtPtr' type='typedef'/>
+ <exports symbol='xmlSchema' type='typedef'/>
+ <exports symbol='xmlSchemaValidError' type='typedef'/>
+ <exports symbol='xmlSchemaValidCtxt' type='typedef'/>
+ <exports symbol='xmlSchemaNewDocParserCtxt' type='function'/>
+ <exports symbol='xmlSchemaSAXUnplug' type='function'/>
+ <exports symbol='xmlSchemaParse' type='function'/>
+ <exports symbol='xmlSchemaFreeParserCtxt' type='function'/>
+ <exports symbol='xmlSchemaValidateSetFilename' type='function'/>
+ <exports symbol='xmlSchemaNewParserCtxt' type='function'/>
+ <exports symbol='xmlSchemaIsValid' type='function'/>
+ <exports symbol='xmlSchemaValidityErrorFunc' type='function'/>
+ <exports symbol='xmlSchemaSAXPlug' type='function'/>
+ <exports symbol='xmlSchemaValidateStream' type='function'/>
+ <exports symbol='xmlSchemaGetParserErrors' type='function'/>
+ <exports symbol='xmlSchemaValidateSetLocator' type='function'/>
+ <exports symbol='xmlSchemaValidateOneElement' type='function'/>
+ <exports symbol='xmlSchemaSetValidStructuredErrors' type='function'/>
+ <exports symbol='xmlSchemaSetValidErrors' type='function'/>
+ <exports symbol='xmlSchemaValidCtxtGetOptions' type='function'/>
+ <exports symbol='xmlSchemaValidateFile' type='function'/>
+ <exports symbol='xmlSchemaValidateDoc' type='function'/>
+ <exports symbol='xmlSchemaFree' type='function'/>
+ <exports symbol='xmlSchemaNewMemParserCtxt' type='function'/>
+ <exports symbol='xmlSchemaValidityLocatorFunc' type='function'/>
+ <exports symbol='xmlSchemaGetValidErrors' type='function'/>
+ <exports symbol='xmlSchemaSetValidOptions' type='function'/>
+ <exports symbol='xmlSchemaSetParserErrors' type='function'/>
+ <exports symbol='xmlSchemaValidityWarningFunc' type='function'/>
+ <exports symbol='xmlSchemaDump' type='function'/>
+ <exports symbol='xmlSchemaFreeValidCtxt' type='function'/>
+ <exports symbol='xmlSchemaValidCtxtGetParserCtxt' type='function'/>
+ <exports symbol='xmlSchemaSetParserStructuredErrors' type='function'/>
+ <exports symbol='xmlSchemaNewValidCtxt' type='function'/>
+ </file>
+ <file name='xmlschemastypes'>
+ <summary>implementation of XML Schema Datatypes</summary>
+ <description>module providing the XML Schema Datatypes implementation both definition and validity checking </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='XML_SCHEMA_WHITESPACE_UNKNOWN' type='enum'/>
+ <exports symbol='XML_SCHEMA_WHITESPACE_COLLAPSE' type='enum'/>
+ <exports symbol='XML_SCHEMA_WHITESPACE_REPLACE' type='enum'/>
+ <exports symbol='XML_SCHEMA_WHITESPACE_PRESERVE' type='enum'/>
+ <exports symbol='xmlSchemaWhitespaceValueType' type='typedef'/>
+ <exports symbol='xmlSchemaValPredefTypeNode' type='function'/>
+ <exports symbol='xmlSchemaGetCanonValueWhtsp' type='function'/>
+ <exports symbol='xmlSchemaValidateLengthFacetWhtsp' type='function'/>
+ <exports symbol='xmlSchemaIsBuiltInTypeFacet' type='function'/>
+ <exports symbol='xmlSchemaGetCanonValue' type='function'/>
+ <exports symbol='xmlSchemaGetBuiltInListSimpleTypeItemType' type='function'/>
+ <exports symbol='xmlSchemaCompareValuesWhtsp' type='function'/>
+ <exports symbol='xmlSchemaValueGetAsBoolean' type='function'/>
+ <exports symbol='xmlSchemaCollapseString' type='function'/>
+ <exports symbol='xmlSchemaValPredefTypeNodeNoNorm' type='function'/>
+ <exports symbol='xmlSchemaValidateFacet' type='function'/>
+ <exports symbol='xmlSchemaNewFacet' type='function'/>
+ <exports symbol='xmlSchemaValueAppend' type='function'/>
+ <exports symbol='xmlSchemaCompareValues' type='function'/>
+ <exports symbol='xmlSchemaValidateLengthFacet' type='function'/>
+ <exports symbol='xmlSchemaGetValType' type='function'/>
+ <exports symbol='xmlSchemaGetPredefinedType' type='function'/>
+ <exports symbol='xmlSchemaValidatePredefinedType' type='function'/>
+ <exports symbol='xmlSchemaFreeFacet' type='function'/>
+ <exports symbol='xmlSchemaValidateListSimpleTypeFacet' type='function'/>
+ <exports symbol='xmlSchemaGetFacetValueAsULong' type='function'/>
+ <exports symbol='xmlSchemaFreeValue' type='function'/>
+ <exports symbol='xmlSchemaValueGetNext' type='function'/>
+ <exports symbol='xmlSchemaValueGetAsString' type='function'/>
+ <exports symbol='xmlSchemaCopyValue' type='function'/>
+ <exports symbol='xmlSchemaNewNOTATIONValue' type='function'/>
+ <exports symbol='xmlSchemaNewQNameValue' type='function'/>
+ <exports symbol='xmlSchemaCleanupTypes' type='function'/>
+ <exports symbol='xmlSchemaWhiteSpaceReplace' type='function'/>
+ <exports symbol='xmlSchemaNewStringValue' type='function'/>
+ <exports symbol='xmlSchemaGetBuiltInType' type='function'/>
+ <exports symbol='xmlSchemaInitTypes' type='function'/>
+ <exports symbol='xmlSchemaValidateFacetWhtsp' type='function'/>
+ <exports symbol='xmlSchemaCheckFacet' type='function'/>
+ </file>
+ <file name='xmlstring'>
+ <summary>set of routines to process strings</summary>
+ <description>type and interfaces needed for the internal string handling of the library, especially UTF8 processing. </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='BAD_CAST' type='macro'/>
+ <exports symbol='xmlChar' type='typedef'/>
+ <exports symbol='xmlStrcmp' type='function'/>
+ <exports symbol='xmlCharStrndup' type='function'/>
+ <exports symbol='xmlStrcasestr' type='function'/>
+ <exports symbol='xmlStrcat' type='function'/>
+ <exports symbol='xmlStrPrintf' type='function'/>
+ <exports symbol='xmlStrstr' type='function'/>
+ <exports symbol='xmlUTF8Size' type='function'/>
+ <exports symbol='xmlStrQEqual' type='function'/>
+ <exports symbol='xmlStrncatNew' type='function'/>
+ <exports symbol='xmlUTF8Strpos' type='function'/>
+ <exports symbol='xmlStrdup' type='function'/>
+ <exports symbol='xmlCharStrdup' type='function'/>
+ <exports symbol='xmlStrchr' type='function'/>
+ <exports symbol='xmlStrlen' type='function'/>
+ <exports symbol='xmlStrncmp' type='function'/>
+ <exports symbol='xmlStrsub' type='function'/>
+ <exports symbol='xmlStrncat' type='function'/>
+ <exports symbol='xmlGetUTF8Char' type='function'/>
+ <exports symbol='xmlStrcasecmp' type='function'/>
+ <exports symbol='xmlStrndup' type='function'/>
+ <exports symbol='xmlStrVPrintf' type='function'/>
+ <exports symbol='xmlUTF8Strsize' type='function'/>
+ <exports symbol='xmlCheckUTF8' type='function'/>
+ <exports symbol='xmlStrncasecmp' type='function'/>
+ <exports symbol='xmlUTF8Strlen' type='function'/>
+ <exports symbol='xmlUTF8Strsub' type='function'/>
+ <exports symbol='xmlStrEqual' type='function'/>
+ <exports symbol='xmlUTF8Charcmp' type='function'/>
+ <exports symbol='xmlUTF8Strndup' type='function'/>
+ <exports symbol='xmlUTF8Strloc' type='function'/>
+ </file>
+ <file name='xmlunicode'>
+ <summary>Unicode character APIs</summary>
+ <description>API for the Unicode character APIs This file is automatically generated from the UCS description files of the Unicode Character Database</description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlUCSIsBlockElements' type='function'/>
+ <exports symbol='xmlUCSIsBopomofo' type='function'/>
+ <exports symbol='xmlUCSIsDingbats' type='function'/>
+ <exports symbol='xmlUCSIsSuperscriptsandSubscripts' type='function'/>
+ <exports symbol='xmlUCSIsCombiningHalfMarks' type='function'/>
+ <exports symbol='xmlUCSIsTibetan' type='function'/>
+ <exports symbol='xmlUCSIsYiRadicals' type='function'/>
+ <exports symbol='xmlUCSIsCombiningMarksforSymbols' type='function'/>
+ <exports symbol='xmlUCSIsHangulSyllables' type='function'/>
+ <exports symbol='xmlUCSIsBasicLatin' type='function'/>
+ <exports symbol='xmlUCSIsCatSc' type='function'/>
+ <exports symbol='xmlUCSIsCatSo' type='function'/>
+ <exports symbol='xmlUCSIsLimbu' type='function'/>
+ <exports symbol='xmlUCSIsCatSm' type='function'/>
+ <exports symbol='xmlUCSIsCatSk' type='function'/>
+ <exports symbol='xmlUCSIsKhmerSymbols' type='function'/>
+ <exports symbol='xmlUCSIsMongolian' type='function'/>
+ <exports symbol='xmlUCSIsMalayalam' type='function'/>
+ <exports symbol='xmlUCSIsMathematicalAlphanumericSymbols' type='function'/>
+ <exports symbol='xmlUCSIsThaana' type='function'/>
+ <exports symbol='xmlUCSIsMyanmar' type='function'/>
+ <exports symbol='xmlUCSIsTags' type='function'/>
+ <exports symbol='xmlUCSIsCJKCompatibilityIdeographs' type='function'/>
+ <exports symbol='xmlUCSIsTelugu' type='function'/>
+ <exports symbol='xmlUCSIsLowSurrogates' type='function'/>
+ <exports symbol='xmlUCSIsOsmanya' type='function'/>
+ <exports symbol='xmlUCSIsSyriac' type='function'/>
+ <exports symbol='xmlUCSIsEthiopic' type='function'/>
+ <exports symbol='xmlUCSIsBoxDrawing' type='function'/>
+ <exports symbol='xmlUCSIsGreekExtended' type='function'/>
+ <exports symbol='xmlUCSIsGreekandCoptic' type='function'/>
+ <exports symbol='xmlUCSIsKannada' type='function'/>
+ <exports symbol='xmlUCSIsByzantineMusicalSymbols' type='function'/>
+ <exports symbol='xmlUCSIsEnclosedCJKLettersandMonths' type='function'/>
+ <exports symbol='xmlUCSIsCJKCompatibilityForms' type='function'/>
+ <exports symbol='xmlUCSIsCatCs' type='function'/>
+ <exports symbol='xmlUCSIsCJKRadicalsSupplement' type='function'/>
+ <exports symbol='xmlUCSIsCatCf' type='function'/>
+ <exports symbol='xmlUCSIsSmallFormVariants' type='function'/>
+ <exports symbol='xmlUCSIsHangulCompatibilityJamo' type='function'/>
+ <exports symbol='xmlUCSIsCatCc' type='function'/>
+ <exports symbol='xmlUCSIsCatCo' type='function'/>
+ <exports symbol='xmlUCSIsCherokee' type='function'/>
+ <exports symbol='xmlUCSIsGothic' type='function'/>
+ <exports symbol='xmlUCSIsKhmer' type='function'/>
+ <exports symbol='xmlUCSIsCombiningDiacriticalMarksforSymbols' type='function'/>
+ <exports symbol='xmlUCSIsOgham' type='function'/>
+ <exports symbol='xmlUCSIsOriya' type='function'/>
+ <exports symbol='xmlUCSIsLinearBIdeograms' type='function'/>
+ <exports symbol='xmlUCSIsBlock' type='function'/>
+ <exports symbol='xmlUCSIsBopomofoExtended' type='function'/>
+ <exports symbol='xmlUCSIsHangulJamo' type='function'/>
+ <exports symbol='xmlUCSIsTagbanwa' type='function'/>
+ <exports symbol='xmlUCSIsGeneralPunctuation' type='function'/>
+ <exports symbol='xmlUCSIsCyrillic' type='function'/>
+ <exports symbol='xmlUCSIsArrows' type='function'/>
+ <exports symbol='xmlUCSIsControlPictures' type='function'/>
+ <exports symbol='xmlUCSIsCJKUnifiedIdeographs' type='function'/>
+ <exports symbol='xmlUCSIsCatNl' type='function'/>
+ <exports symbol='xmlUCSIsCatNo' type='function'/>
+ <exports symbol='xmlUCSIsYijingHexagramSymbols' type='function'/>
+ <exports symbol='xmlUCSIsVariationSelectorsSupplement' type='function'/>
+ <exports symbol='xmlUCSIsBengali' type='function'/>
+ <exports symbol='xmlUCSIsPrivateUse' type='function'/>
+ <exports symbol='xmlUCSIsMusicalSymbols' type='function'/>
+ <exports symbol='xmlUCSIsMiscellaneousSymbols' type='function'/>
+ <exports symbol='xmlUCSIsCJKCompatibility' type='function'/>
+ <exports symbol='xmlUCSIsAegeanNumbers' type='function'/>
+ <exports symbol='xmlUCSIsDevanagari' type='function'/>
+ <exports symbol='xmlUCSIsSupplementalArrowsA' type='function'/>
+ <exports symbol='xmlUCSIsSupplementalArrowsB' type='function'/>
+ <exports symbol='xmlUCSIsNumberForms' type='function'/>
+ <exports symbol='xmlUCSIsSpacingModifierLetters' type='function'/>
+ <exports symbol='xmlUCSIsOpticalCharacterRecognition' type='function'/>
+ <exports symbol='xmlUCSIsCatPc' type='function'/>
+ <exports symbol='xmlUCSIsCatPf' type='function'/>
+ <exports symbol='xmlUCSIsCyrillicSupplement' type='function'/>
+ <exports symbol='xmlUCSIsCatPd' type='function'/>
+ <exports symbol='xmlUCSIsCatPi' type='function'/>
+ <exports symbol='xmlUCSIsCatPo' type='function'/>
+ <exports symbol='xmlUCSIsHighPrivateUseSurrogates' type='function'/>
+ <exports symbol='xmlUCSIsLatinExtendedAdditional' type='function'/>
+ <exports symbol='xmlUCSIsCatPs' type='function'/>
+ <exports symbol='xmlUCSIsHighSurrogates' type='function'/>
+ <exports symbol='xmlUCSIsLao' type='function'/>
+ <exports symbol='xmlUCSIsBraillePatterns' type='function'/>
+ <exports symbol='xmlUCSIsDeseret' type='function'/>
+ <exports symbol='xmlUCSIsEnclosedAlphanumerics' type='function'/>
+ <exports symbol='xmlUCSIsCombiningDiacriticalMarks' type='function'/>
+ <exports symbol='xmlUCSIsIdeographicDescriptionCharacters' type='function'/>
+ <exports symbol='xmlUCSIsPrivateUseArea' type='function'/>
+ <exports symbol='xmlUCSIsCat' type='function'/>
+ <exports symbol='xmlUCSIsCatLu' type='function'/>
+ <exports symbol='xmlUCSIsCatLt' type='function'/>
+ <exports symbol='xmlUCSIsYiSyllables' type='function'/>
+ <exports symbol='xmlUCSIsShavian' type='function'/>
+ <exports symbol='xmlUCSIsCatLo' type='function'/>
+ <exports symbol='xmlUCSIsCatLm' type='function'/>
+ <exports symbol='xmlUCSIsCatLl' type='function'/>
+ <exports symbol='xmlUCSIsMiscellaneousTechnical' type='function'/>
+ <exports symbol='xmlUCSIsUgaritic' type='function'/>
+ <exports symbol='xmlUCSIsCJKCompatibilityIdeographsSupplement' type='function'/>
+ <exports symbol='xmlUCSIsCypriotSyllabary' type='function'/>
+ <exports symbol='xmlUCSIsTamil' type='function'/>
+ <exports symbol='xmlUCSIsCatC' type='function'/>
+ <exports symbol='xmlUCSIsCatN' type='function'/>
+ <exports symbol='xmlUCSIsCatL' type='function'/>
+ <exports symbol='xmlUCSIsCatM' type='function'/>
+ <exports symbol='xmlUCSIsUnifiedCanadianAboriginalSyllabics' type='function'/>
+ <exports symbol='xmlUCSIsCatS' type='function'/>
+ <exports symbol='xmlUCSIsCatP' type='function'/>
+ <exports symbol='xmlUCSIsSinhala' type='function'/>
+ <exports symbol='xmlUCSIsGeorgian' type='function'/>
+ <exports symbol='xmlUCSIsCatZ' type='function'/>
+ <exports symbol='xmlUCSIsIPAExtensions' type='function'/>
+ <exports symbol='xmlUCSIsKangxiRadicals' type='function'/>
+ <exports symbol='xmlUCSIsGreek' type='function'/>
+ <exports symbol='xmlUCSIsCatPe' type='function'/>
+ <exports symbol='xmlUCSIsHanunoo' type='function'/>
+ <exports symbol='xmlUCSIsArmenian' type='function'/>
+ <exports symbol='xmlUCSIsSupplementaryPrivateUseAreaB' type='function'/>
+ <exports symbol='xmlUCSIsSupplementaryPrivateUseAreaA' type='function'/>
+ <exports symbol='xmlUCSIsKatakanaPhoneticExtensions' type='function'/>
+ <exports symbol='xmlUCSIsLetterlikeSymbols' type='function'/>
+ <exports symbol='xmlUCSIsPhoneticExtensions' type='function'/>
+ <exports symbol='xmlUCSIsArabic' type='function'/>
+ <exports symbol='xmlUCSIsHebrew' type='function'/>
+ <exports symbol='xmlUCSIsOldItalic' type='function'/>
+ <exports symbol='xmlUCSIsArabicPresentationFormsA' type='function'/>
+ <exports symbol='xmlUCSIsCatZp' type='function'/>
+ <exports symbol='xmlUCSIsCatZs' type='function'/>
+ <exports symbol='xmlUCSIsArabicPresentationFormsB' type='function'/>
+ <exports symbol='xmlUCSIsGeometricShapes' type='function'/>
+ <exports symbol='xmlUCSIsCatZl' type='function'/>
+ <exports symbol='xmlUCSIsTagalog' type='function'/>
+ <exports symbol='xmlUCSIsSpecials' type='function'/>
+ <exports symbol='xmlUCSIsGujarati' type='function'/>
+ <exports symbol='xmlUCSIsKatakana' type='function'/>
+ <exports symbol='xmlUCSIsHalfwidthandFullwidthForms' type='function'/>
+ <exports symbol='xmlUCSIsLatinExtendedB' type='function'/>
+ <exports symbol='xmlUCSIsLatinExtendedA' type='function'/>
+ <exports symbol='xmlUCSIsBuhid' type='function'/>
+ <exports symbol='xmlUCSIsMiscellaneousSymbolsandArrows' type='function'/>
+ <exports symbol='xmlUCSIsTaiLe' type='function'/>
+ <exports symbol='xmlUCSIsCJKSymbolsandPunctuation' type='function'/>
+ <exports symbol='xmlUCSIsTaiXuanJingSymbols' type='function'/>
+ <exports symbol='xmlUCSIsGurmukhi' type='function'/>
+ <exports symbol='xmlUCSIsMathematicalOperators' type='function'/>
+ <exports symbol='xmlUCSIsAlphabeticPresentationForms' type='function'/>
+ <exports symbol='xmlUCSIsCurrencySymbols' type='function'/>
+ <exports symbol='xmlUCSIsSupplementalMathematicalOperators' type='function'/>
+ <exports symbol='xmlUCSIsCJKUnifiedIdeographsExtensionA' type='function'/>
+ <exports symbol='xmlUCSIsKanbun' type='function'/>
+ <exports symbol='xmlUCSIsCJKUnifiedIdeographsExtensionB' type='function'/>
+ <exports symbol='xmlUCSIsThai' type='function'/>
+ <exports symbol='xmlUCSIsRunic' type='function'/>
+ <exports symbol='xmlUCSIsCatNd' type='function'/>
+ <exports symbol='xmlUCSIsLatin1Supplement' type='function'/>
+ <exports symbol='xmlUCSIsLinearBSyllabary' type='function'/>
+ <exports symbol='xmlUCSIsHiragana' type='function'/>
+ <exports symbol='xmlUCSIsMiscellaneousMathematicalSymbolsB' type='function'/>
+ <exports symbol='xmlUCSIsMiscellaneousMathematicalSymbolsA' type='function'/>
+ <exports symbol='xmlUCSIsCatMn' type='function'/>
+ <exports symbol='xmlUCSIsVariationSelectors' type='function'/>
+ <exports symbol='xmlUCSIsCatMc' type='function'/>
+ <exports symbol='xmlUCSIsCatMe' type='function'/>
+ </file>
+ <file name='xmlversion'>
+ <summary>compile-time version informations</summary>
+ <description>compile-time version informations for the XML library </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='LIBXML_VERSION_EXTRA' type='macro'/>
+ <exports symbol='LIBXML_MODULES_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_LEGACY_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_LZMA_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_READER_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_THREAD_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_DOTTED_VERSION' type='macro'/>
+ <exports symbol='LIBXML_ISO8859X_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_DEBUG_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_XINCLUDE_ENABLED' type='macro'/>
+ <exports symbol='ATTRIBUTE_UNUSED' type='macro'/>
+ <exports symbol='LIBXML_DOCB_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_PUSH_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_SAX1_ENABLED' type='macro'/>
+ <exports symbol='WITHOUT_TRIO' type='macro'/>
+ <exports symbol='LIBXML_SCHEMATRON_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_HTTP_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_OUTPUT_ENABLED' type='macro'/>
+ <exports symbol='WITH_TRIO' type='macro'/>
+ <exports symbol='LIBXML_DEBUG_RUNTIME' type='macro'/>
+ <exports symbol='LIBXML_VERSION' type='macro'/>
+ <exports symbol='LIBXML_XPTR_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_VERSION_STRING' type='macro'/>
+ <exports symbol='LIBXML_CATALOG_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_ATTR_ALLOC_SIZE' type='macro'/>
+ <exports symbol='LIBXML_REGEXP_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_ICU_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_MODULE_EXTENSION' type='macro'/>
+ <exports symbol='LIBXML_ICONV_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_HTML_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_UNICODE_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_FTP_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_AUTOMATA_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_ZLIB_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_WRITER_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_C14N_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_SCHEMAS_ENABLED' type='macro'/>
+ <exports symbol='DEBUG_MEMORY_LOCATION' type='macro'/>
+ <exports symbol='LIBXML_ATTR_FORMAT' type='macro'/>
+ <exports symbol='LIBXML_TEST_VERSION' type='macro'/>
+ <exports symbol='LIBXML_THREAD_ALLOC_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_XPATH_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_PATTERN_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_VALID_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_TREE_ENABLED' type='macro'/>
+ <exports symbol='LIBXML_EXPR_ENABLED' type='macro'/>
+ <exports symbol='xmlCheckVersion' type='function'/>
+ </file>
+ <file name='xmlwriter'>
+ <summary>text writing API for XML</summary>
+ <description>text writing API for XML </description>
+ <author>Alfred Mickautsch &lt;alfred@mickautsch.de&gt; </author>
+ <exports symbol='xmlTextWriterWriteProcessingInstruction' type='macro'/>
+ <exports symbol='xmlTextWriterWriteDocType' type='macro'/>
+ <exports symbol='xmlTextWriter' type='typedef'/>
+ <exports symbol='xmlTextWriterPtr' type='typedef'/>
+ <exports symbol='xmlTextWriterStartDocument' type='function'/>
+ <exports symbol='xmlTextWriterEndPI' type='function'/>
+ <exports symbol='xmlTextWriterWriteBase64' type='function'/>
+ <exports symbol='xmlTextWriterSetIndentString' type='function'/>
+ <exports symbol='xmlTextWriterStartAttribute' type='function'/>
+ <exports symbol='xmlTextWriterEndComment' type='function'/>
+ <exports symbol='xmlTextWriterWriteRawLen' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDExternalEntityContents' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatCDATA' type='function'/>
+ <exports symbol='xmlTextWriterStartAttributeNS' type='function'/>
+ <exports symbol='xmlNewTextWriterPushParser' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatAttributeNS' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatPI' type='function'/>
+ <exports symbol='xmlTextWriterWriteBinHex' type='function'/>
+ <exports symbol='xmlTextWriterEndAttribute' type='function'/>
+ <exports symbol='xmlTextWriterSetIndent' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatPI' type='function'/>
+ <exports symbol='xmlTextWriterEndDocument' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDAttlist' type='function'/>
+ <exports symbol='xmlTextWriterStartComment' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatDTD' type='function'/>
+ <exports symbol='xmlTextWriterEndCDATA' type='function'/>
+ <exports symbol='xmlTextWriterStartElementNS' type='function'/>
+ <exports symbol='xmlTextWriterEndDTDEntity' type='function'/>
+ <exports symbol='xmlNewTextWriter' type='function'/>
+ <exports symbol='xmlFreeTextWriter' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatDTDAttlist' type='function'/>
+ <exports symbol='xmlTextWriterStartPI' type='function'/>
+ <exports symbol='xmlTextWriterStartElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDExternalEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatRaw' type='function'/>
+ <exports symbol='xmlTextWriterWriteCDATA' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatDTDInternalEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatAttribute' type='function'/>
+ <exports symbol='xmlTextWriterEndDTDElement' type='function'/>
+ <exports symbol='xmlTextWriterEndDTD' type='function'/>
+ <exports symbol='xmlTextWriterWriteElement' type='function'/>
+ <exports symbol='xmlTextWriterEndElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatComment' type='function'/>
+ <exports symbol='xmlTextWriterStartCDATA' type='function'/>
+ <exports symbol='xmlNewTextWriterFilename' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatComment' type='function'/>
+ <exports symbol='xmlTextWriterWriteAttributeNS' type='function'/>
+ <exports symbol='xmlTextWriterWritePI' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatDTDInternalEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatString' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDInternalEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatElementNS' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDNotation' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatElement' type='function'/>
+ <exports symbol='xmlTextWriterSetQuoteChar' type='function'/>
+ <exports symbol='xmlTextWriterWriteString' type='function'/>
+ <exports symbol='xmlTextWriterWriteElementNS' type='function'/>
+ <exports symbol='xmlTextWriterFullEndElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatAttributeNS' type='function'/>
+ <exports symbol='xmlTextWriterFlush' type='function'/>
+ <exports symbol='xmlTextWriterStartDTD' type='function'/>
+ <exports symbol='xmlTextWriterWriteAttribute' type='function'/>
+ <exports symbol='xmlNewTextWriterDoc' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatDTDElement' type='function'/>
+ <exports symbol='xmlTextWriterEndDTDAttlist' type='function'/>
+ <exports symbol='xmlNewTextWriterTree' type='function'/>
+ <exports symbol='xmlNewTextWriterMemory' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatCDATA' type='function'/>
+ <exports symbol='xmlTextWriterStartDTDAttlist' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatString' type='function'/>
+ <exports symbol='xmlTextWriterWriteComment' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatRaw' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatDTD' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatDTDAttlist' type='function'/>
+ <exports symbol='xmlTextWriterWriteRaw' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTDElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteDTD' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatAttribute' type='function'/>
+ <exports symbol='xmlTextWriterStartDTDEntity' type='function'/>
+ <exports symbol='xmlTextWriterWriteVFormatDTDElement' type='function'/>
+ <exports symbol='xmlTextWriterStartDTDElement' type='function'/>
+ <exports symbol='xmlTextWriterWriteFormatElementNS' type='function'/>
+ </file>
+ <file name='xpath'>
+ <summary>XML Path Language implementation</summary>
+ <description>API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer</description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlXPathNodeSetGetLength' type='macro'/>
+ <exports symbol='XML_XPATH_CHECKNS' type='macro'/>
+ <exports symbol='XML_XPATH_NOVAR' type='macro'/>
+ <exports symbol='xmlXPathNodeSetItem' type='macro'/>
+ <exports symbol='xmlXPathNodeSetIsEmpty' type='macro'/>
+ <exports symbol='XPATH_NUMBER_ERROR' type='enum'/>
+ <exports symbol='XPATH_BOOLEAN' type='enum'/>
+ <exports symbol='XPATH_START_LITERAL_ERROR' type='enum'/>
+ <exports symbol='XPATH_UNCLOSED_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_CHAR_ERROR' type='enum'/>
+ <exports symbol='XPATH_UNDEF_VARIABLE_ERROR' type='enum'/>
+ <exports symbol='XPATH_EXPRESSION_OK' type='enum'/>
+ <exports symbol='XPATH_NODESET' type='enum'/>
+ <exports symbol='XPTR_SUB_RESOURCE_ERROR' type='enum'/>
+ <exports symbol='XPATH_VARIABLE_REF_ERROR' type='enum'/>
+ <exports symbol='XPATH_ENCODING_ERROR' type='enum'/>
+ <exports symbol='XPTR_RESOURCE_ERROR' type='enum'/>
+ <exports symbol='XPATH_NUMBER' type='enum'/>
+ <exports symbol='XPATH_POINT' type='enum'/>
+ <exports symbol='XPATH_USERS' type='enum'/>
+ <exports symbol='XPATH_UNDEF_PREFIX_ERROR' type='enum'/>
+ <exports symbol='XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
+ <exports symbol='XPATH_RANGE' type='enum'/>
+ <exports symbol='XPTR_SYNTAX_ERROR' type='enum'/>
+ <exports symbol='XPATH_LOCATIONSET' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT' type='enum'/>
+ <exports symbol='XPATH_INVALID_ARITY' type='enum'/>
+ <exports symbol='XPATH_STRING' type='enum'/>
+ <exports symbol='XPATH_INVALID_PREDICATE_ERROR' type='enum'/>
+ <exports symbol='XPATH_XSLT_TREE' type='enum'/>
+ <exports symbol='XPATH_EXPR_ERROR' type='enum'/>
+ <exports symbol='XPATH_FORBID_VARIABLE_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_TYPE' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT_POSITION' type='enum'/>
+ <exports symbol='XPATH_UNDEFINED' type='enum'/>
+ <exports symbol='XPATH_MEMORY_ERROR' type='enum'/>
+ <exports symbol='XPATH_UNFINISHED_LITERAL_ERROR' type='enum'/>
+ <exports symbol='XPATH_STACK_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_OPERAND' type='enum'/>
+ <exports symbol='xmlXPathObjectType' type='typedef'/>
+ <exports symbol='xmlXPathVariablePtr' type='typedef'/>
+ <exports symbol='xmlXPathContext' type='typedef'/>
+ <exports symbol='xmlXPathError' type='typedef'/>
+ <exports symbol='xmlXPathFunct' type='typedef'/>
+ <exports symbol='xmlXPathTypePtr' type='typedef'/>
+ <exports symbol='xmlXPathType' type='typedef'/>
+ <exports symbol='xmlNodeSetPtr' type='typedef'/>
+ <exports symbol='xmlXPathFuncPtr' type='typedef'/>
+ <exports symbol='xmlXPathCompExprPtr' type='typedef'/>
+ <exports symbol='xmlXPathObject' type='typedef'/>
+ <exports symbol='xmlXPathCompExpr' type='typedef'/>
+ <exports symbol='xmlXPathContextPtr' type='typedef'/>
+ <exports symbol='xmlXPathParserContextPtr' type='typedef'/>
+ <exports symbol='xmlNodeSet' type='typedef'/>
+ <exports symbol='xmlXPathVariable' type='typedef'/>
+ <exports symbol='xmlXPathObjectPtr' type='typedef'/>
+ <exports symbol='xmlXPathAxis' type='typedef'/>
+ <exports symbol='xmlXPathAxisPtr' type='typedef'/>
+ <exports symbol='xmlXPathParserContext' type='typedef'/>
+ <exports symbol='_xmlXPathFunct' type='struct'/>
+ <exports symbol='_xmlXPathVariable' type='struct'/>
+ <exports symbol='_xmlXPathParserContext' type='struct'/>
+ <exports symbol='_xmlXPathType' type='struct'/>
+ <exports symbol='_xmlXPathObject' type='struct'/>
+ <exports symbol='_xmlXPathContext' type='struct'/>
+ <exports symbol='_xmlXPathAxis' type='struct'/>
+ <exports symbol='_xmlNodeSet' type='struct'/>
+ <exports symbol='xmlXPathNAN' type='variable'/>
+ <exports symbol='xmlXPathPINF' type='variable'/>
+ <exports symbol='xmlXPathNINF' type='variable'/>
+ <exports symbol='xmlXPathCastNodeSetToBoolean' type='function'/>
+ <exports symbol='xmlXPathFuncLookupFunc' type='function'/>
+ <exports symbol='xmlXPathNodeEval' type='function'/>
+ <exports symbol='xmlXPathCastNodeToString' type='function'/>
+ <exports symbol='xmlXPathIsNaN' type='function'/>
+ <exports symbol='xmlXPathContextSetCache' type='function'/>
+ <exports symbol='xmlXPathConvertString' type='function'/>
+ <exports symbol='xmlXPathCompiledEvalToBoolean' type='function'/>
+ <exports symbol='xmlXPathIsInf' type='function'/>
+ <exports symbol='xmlXPathOrderDocElems' type='function'/>
+ <exports symbol='xmlXPathNodeSetCreate' type='function'/>
+ <exports symbol='xmlXPathCastBooleanToNumber' type='function'/>
+ <exports symbol='xmlXPathCastNodeToNumber' type='function'/>
+ <exports symbol='xmlXPathCastStringToNumber' type='function'/>
+ <exports symbol='xmlXPathAxisFunc' type='function'/>
+ <exports symbol='xmlXPathCastToNumber' type='function'/>
+ <exports symbol='xmlXPathCastStringToBoolean' type='function'/>
+ <exports symbol='xmlXPathCastNumberToString' type='function'/>
+ <exports symbol='xmlXPathVariableLookupFunc' type='function'/>
+ <exports symbol='xmlXPathFreeObject' type='function'/>
+ <exports symbol='xmlXPathEvalPredicate' type='function'/>
+ <exports symbol='xmlXPathFreeContext' type='function'/>
+ <exports symbol='xmlXPathObjectCopy' type='function'/>
+ <exports symbol='xmlXPathFreeNodeSetList' type='function'/>
+ <exports symbol='xmlXPathEval' type='function'/>
+ <exports symbol='xmlXPathCastNodeSetToString' type='function'/>
+ <exports symbol='xmlXPathCompiledEval' type='function'/>
+ <exports symbol='xmlXPathEvalExpression' type='function'/>
+ <exports symbol='xmlXPathInit' type='function'/>
+ <exports symbol='xmlXPathConvertBoolean' type='function'/>
+ <exports symbol='xmlXPathConvertFunc' type='function'/>
+ <exports symbol='xmlXPathFunction' type='function'/>
+ <exports symbol='xmlXPathCmpNodes' type='function'/>
+ <exports symbol='xmlXPathCastToString' type='function'/>
+ <exports symbol='xmlXPathCtxtCompile' type='function'/>
+ <exports symbol='xmlXPathEvalFunc' type='function'/>
+ <exports symbol='xmlXPathCastBooleanToString' type='function'/>
+ <exports symbol='xmlXPathSetContextNode' type='function'/>
+ <exports symbol='xmlXPathCastNumberToBoolean' type='function'/>
+ <exports symbol='xmlXPathFreeNodeSet' type='function'/>
+ <exports symbol='xmlXPathFreeCompExpr' type='function'/>
+ <exports symbol='xmlXPathNewContext' type='function'/>
+ <exports symbol='xmlXPathConvertNumber' type='function'/>
+ <exports symbol='xmlXPathCompile' type='function'/>
+ <exports symbol='xmlXPathCastNodeSetToNumber' type='function'/>
+ <exports symbol='xmlXPathCastToBoolean' type='function'/>
+ </file>
+ <file name='xpathInternals'>
+ <summary>internal interfaces for XML Path Language implementation</summary>
+ <description>internal interfaces for XML Path Language implementation used to build new modules on top of XPath like XPointer and XSLT </description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlXPathStackIsExternal' type='macro'/>
+ <exports symbol='xmlXPathReturnEmptyString' type='macro'/>
+ <exports symbol='XP_ERROR0' type='macro'/>
+ <exports symbol='xmlXPathSetTypeError' type='macro'/>
+ <exports symbol='xmlXPathReturnEmptyNodeSet' type='macro'/>
+ <exports symbol='xmlXPathReturnTrue' type='macro'/>
+ <exports symbol='xmlXPathReturnBoolean' type='macro'/>
+ <exports symbol='xmlXPathGetContextNode' type='macro'/>
+ <exports symbol='CAST_TO_NUMBER' type='macro'/>
+ <exports symbol='CHECK_ARITY' type='macro'/>
+ <exports symbol='CHECK_TYPE0' type='macro'/>
+ <exports symbol='CAST_TO_STRING' type='macro'/>
+ <exports symbol='xmlXPathReturnExternal' type='macro'/>
+ <exports symbol='xmlXPathStackIsNodeSet' type='macro'/>
+ <exports symbol='xmlXPathCheckError' type='macro'/>
+ <exports symbol='xmlXPathSetError' type='macro'/>
+ <exports symbol='CHECK_ERROR' type='macro'/>
+ <exports symbol='xmlXPathReturnString' type='macro'/>
+ <exports symbol='CAST_TO_BOOLEAN' type='macro'/>
+ <exports symbol='xmlXPathSetArityError' type='macro'/>
+ <exports symbol='CHECK_TYPE' type='macro'/>
+ <exports symbol='xmlXPathReturnFalse' type='macro'/>
+ <exports symbol='xmlXPathReturnNumber' type='macro'/>
+ <exports symbol='CHECK_ERROR0' type='macro'/>
+ <exports symbol='xmlXPathGetDocument' type='macro'/>
+ <exports symbol='xmlXPathGetError' type='macro'/>
+ <exports symbol='XP_ERROR' type='macro'/>
+ <exports symbol='xmlXPathEmptyNodeSet' type='macro'/>
+ <exports symbol='xmlXPathReturnNodeSet' type='macro'/>
+ <exports symbol='xmlXPathNodeSetMerge' type='function'/>
+ <exports symbol='xmlXPathNumberFunction' type='function'/>
+ <exports symbol='xmlXPathNsLookup' type='function'/>
+ <exports symbol='xmlXPathNewNodeSet' type='function'/>
+ <exports symbol='xmlXPathNextAncestorOrSelf' type='function'/>
+ <exports symbol='xmlXPathNodeSetRemove' type='function'/>
+ <exports symbol='xmlXPathNewNodeSetList' type='function'/>
+ <exports symbol='xmlXPathPopBoolean' type='function'/>
+ <exports symbol='xmlXPathNewString' type='function'/>
+ <exports symbol='xmlXPathNodeLeadingSorted' type='function'/>
+ <exports symbol='xmlXPathNextChild' type='function'/>
+ <exports symbol='xmlXPathNextFollowingSibling' type='function'/>
+ <exports symbol='xmlXPathPopString' type='function'/>
+ <exports symbol='xmlXPathNamespaceURIFunction' type='function'/>
+ <exports symbol='xmlXPathCompareValues' type='function'/>
+ <exports symbol='xmlXPathConcatFunction' type='function'/>
+ <exports symbol='xmlXPathNodeSetContains' type='function'/>
+ <exports symbol='xmlXPatherror' type='function'/>
+ <exports symbol='xmlXPathNextAncestor' type='function'/>
+ <exports symbol='xmlXPathBooleanFunction' type='function'/>
+ <exports symbol='xmlXPathRoot' type='function'/>
+ <exports symbol='xmlXPathRegisteredNsCleanup' type='function'/>
+ <exports symbol='xmlXPathIsNodeType' type='function'/>
+ <exports symbol='xmlXPathNextFollowing' type='function'/>
+ <exports symbol='xmlXPathAddValues' type='function'/>
+ <exports symbol='xmlXPathRegisterVariable' type='function'/>
+ <exports symbol='valuePop' type='function'/>
+ <exports symbol='xmlXPathCeilingFunction' type='function'/>
+ <exports symbol='xmlXPathIntersection' type='function'/>
+ <exports symbol='xmlXPathContainsFunction' type='function'/>
+ <exports symbol='xmlXPathNodeSetSort' type='function'/>
+ <exports symbol='xmlXPathStartsWithFunction' type='function'/>
+ <exports symbol='xmlXPathNodeLeading' type='function'/>
+ <exports symbol='xmlXPathSumFunction' type='function'/>
+ <exports symbol='xmlXPathNotEqualValues' type='function'/>
+ <exports symbol='xmlXPathEvaluatePredicateResult' type='function'/>
+ <exports symbol='xmlXPathErr' type='function'/>
+ <exports symbol='xmlXPathNextPreceding' type='function'/>
+ <exports symbol='xmlXPathFunctionLookupNS' type='function'/>
+ <exports symbol='xmlXPathRegisteredFuncsCleanup' type='function'/>
+ <exports symbol='xmlXPathRegisterAllFunctions' type='function'/>
+ <exports symbol='xmlXPathFunctionLookup' type='function'/>
+ <exports symbol='xmlXPathPositionFunction' type='function'/>
+ <exports symbol='xmlXPathSubstringBeforeFunction' type='function'/>
+ <exports symbol='xmlXPathRegisteredVariablesCleanup' type='function'/>
+ <exports symbol='xmlXPathNewFloat' type='function'/>
+ <exports symbol='xmlXPathRegisterNs' type='function'/>
+ <exports symbol='xmlXPathNextParent' type='function'/>
+ <exports symbol='xmlXPathNodeSetFreeNs' type='function'/>
+ <exports symbol='xmlXPathHasSameNodes' type='function'/>
+ <exports symbol='xmlXPathDistinctSorted' type='function'/>
+ <exports symbol='valuePush' type='function'/>
+ <exports symbol='xmlXPathSubstringFunction' type='function'/>
+ <exports symbol='xmlXPathStringFunction' type='function'/>
+ <exports symbol='xmlXPathFloorFunction' type='function'/>
+ <exports symbol='xmlXPathIdFunction' type='function'/>
+ <exports symbol='xmlXPathLastFunction' type='function'/>
+ <exports symbol='xmlXPathStringLengthFunction' type='function'/>
+ <exports symbol='xmlXPathNextSelf' type='function'/>
+ <exports symbol='xmlXPathDebugDumpCompExpr' type='function'/>
+ <exports symbol='xmlXPathFalseFunction' type='function'/>
+ <exports symbol='xmlXPathValueFlipSign' type='function'/>
+ <exports symbol='xmlXPathTranslateFunction' type='function'/>
+ <exports symbol='xmlXPathRegisterFuncLookup' type='function'/>
+ <exports symbol='xmlXPathPopNumber' type='function'/>
+ <exports symbol='xmlXPathRoundFunction' type='function'/>
+ <exports symbol='xmlXPathPopNodeSet' type='function'/>
+ <exports symbol='xmlXPathCountFunction' type='function'/>
+ <exports symbol='xmlXPathParseNCName' type='function'/>
+ <exports symbol='xmlXPathTrueFunction' type='function'/>
+ <exports symbol='xmlXPathNewBoolean' type='function'/>
+ <exports symbol='xmlXPathSubValues' type='function'/>
+ <exports symbol='xmlXPathEqualValues' type='function'/>
+ <exports symbol='xmlXPathTrailingSorted' type='function'/>
+ <exports symbol='xmlXPathMultValues' type='function'/>
+ <exports symbol='xmlXPathModValues' type='function'/>
+ <exports symbol='xmlXPathNewParserContext' type='function'/>
+ <exports symbol='xmlXPathWrapNodeSet' type='function'/>
+ <exports symbol='xmlXPathWrapString' type='function'/>
+ <exports symbol='xmlXPathLangFunction' type='function'/>
+ <exports symbol='xmlXPathRegisterFuncNS' type='function'/>
+ <exports symbol='xmlXPathNodeSetAddNs' type='function'/>
+ <exports symbol='xmlXPathLocalNameFunction' type='function'/>
+ <exports symbol='xmlXPathDifference' type='function'/>
+ <exports symbol='xmlXPathLeadingSorted' type='function'/>
+ <exports symbol='xmlXPathNextPrecedingSibling' type='function'/>
+ <exports symbol='xmlXPathPopExternal' type='function'/>
+ <exports symbol='xmlXPathNormalizeFunction' type='function'/>
+ <exports symbol='xmlXPathRegisterVariableLookup' type='function'/>
+ <exports symbol='xmlXPathNodeSetDel' type='function'/>
+ <exports symbol='xmlXPathNodeTrailingSorted' type='function'/>
+ <exports symbol='xmlXPathNewCString' type='function'/>
+ <exports symbol='xmlXPathRegisterFunc' type='function'/>
+ <exports symbol='xmlXPathSubstringAfterFunction' type='function'/>
+ <exports symbol='xmlXPathNextDescendant' type='function'/>
+ <exports symbol='xmlXPathNextNamespace' type='function'/>
+ <exports symbol='xmlXPathWrapCString' type='function'/>
+ <exports symbol='xmlXPathFreeParserContext' type='function'/>
+ <exports symbol='xmlXPathNodeTrailing' type='function'/>
+ <exports symbol='xmlXPathNodeSetAdd' type='function'/>
+ <exports symbol='xmlXPathNodeSetAddUnique' type='function'/>
+ <exports symbol='xmlXPathNewValueTree' type='function'/>
+ <exports symbol='xmlXPathDistinct' type='function'/>
+ <exports symbol='xmlXPathVariableLookup' type='function'/>
+ <exports symbol='xmlXPathNotFunction' type='function'/>
+ <exports symbol='xmlXPathStringEvalNumber' type='function'/>
+ <exports symbol='xmlXPathNextDescendantOrSelf' type='function'/>
+ <exports symbol='xmlXPathWrapExternal' type='function'/>
+ <exports symbol='xmlXPathNextAttribute' type='function'/>
+ <exports symbol='xmlXPathDivValues' type='function'/>
+ <exports symbol='xmlXPathVariableLookupNS' type='function'/>
+ <exports symbol='xmlXPathRegisterVariableNS' type='function'/>
+ <exports symbol='xmlXPathTrailing' type='function'/>
+ <exports symbol='xmlXPathEvalExpr' type='function'/>
+ <exports symbol='xmlXPathDebugDumpObject' type='function'/>
+ <exports symbol='xmlXPathLeading' type='function'/>
+ <exports symbol='xmlXPathParseName' type='function'/>
+ </file>
+ <file name='xpointer'>
+ <summary>API to handle XML Pointers</summary>
+ <description>API to handle XML Pointers Base implementation was made accordingly to W3C Candidate Recommendation 7 June 2000</description>
+ <author>Daniel Veillard </author>
+ <exports symbol='xmlLocationSet' type='typedef'/>
+ <exports symbol='xmlLocationSetPtr' type='typedef'/>
+ <exports symbol='_xmlLocationSet' type='struct'/>
+ <exports symbol='xmlXPtrNewRange' type='function'/>
+ <exports symbol='xmlXPtrFreeLocationSet' type='function'/>
+ <exports symbol='xmlXPtrWrapLocationSet' type='function'/>
+ <exports symbol='xmlXPtrBuildNodeList' type='function'/>
+ <exports symbol='xmlXPtrEval' type='function'/>
+ <exports symbol='xmlXPtrNewRangeNodes' type='function'/>
+ <exports symbol='xmlXPtrLocationSetAdd' type='function'/>
+ <exports symbol='xmlXPtrRangeToFunction' type='function'/>
+ <exports symbol='xmlXPtrNewCollapsedRange' type='function'/>
+ <exports symbol='xmlXPtrNewRangePoints' type='function'/>
+ <exports symbol='xmlXPtrNewLocationSetNodeSet' type='function'/>
+ <exports symbol='xmlXPtrNewRangePointNode' type='function'/>
+ <exports symbol='xmlXPtrLocationSetCreate' type='function'/>
+ <exports symbol='xmlXPtrNewRangeNodeObject' type='function'/>
+ <exports symbol='xmlXPtrNewContext' type='function'/>
+ <exports symbol='xmlXPtrLocationSetRemove' type='function'/>
+ <exports symbol='xmlXPtrNewRangeNodePoint' type='function'/>
+ <exports symbol='xmlXPtrLocationSetDel' type='function'/>
+ <exports symbol='xmlXPtrLocationSetMerge' type='function'/>
+ <exports symbol='xmlXPtrEvalRangePredicate' type='function'/>
+ <exports symbol='xmlXPtrNewLocationSetNodes' type='function'/>
+ </file>
+ </files>
+ <symbols>
+ <macro name='ATTRIBUTE_UNUSED' file='xmlversion'>
+ <info>Macro used to signal to GCC unused function parameters</info>
+ </macro>
+ <macro name='BAD_CAST' file='xmlstring'>
+ <info>Macro to cast a string to an xmlChar * when one know its safe.</info>
+ </macro>
+ <macro name='BASE_BUFFER_SIZE' file='tree'>
+ <info>default buffer size 4000.</info>
+ </macro>
+ <macro name='CAST_TO_BOOLEAN' file='xpathInternals'>
+ <info>Macro to try to cast the value on the top of the XPath stack to a boolean.</info>
+ </macro>
+ <macro name='CAST_TO_NUMBER' file='xpathInternals'>
+ <info>Macro to try to cast the value on the top of the XPath stack to a number.</info>
+ </macro>
+ <macro name='CAST_TO_STRING' file='xpathInternals'>
+ <info>Macro to try to cast the value on the top of the XPath stack to a string.</info>
+ </macro>
+ <macro name='CHECK_ARITY' file='xpathInternals'>
+ <info>Macro to check that the number of args passed to an XPath function matches.</info>
+ <arg name='x' info='the number of expected args'/>
+ </macro>
+ <macro name='CHECK_ERROR' file='xpathInternals'>
+ <info>Macro to return from the function if an XPath error was detected.</info>
+ </macro>
+ <macro name='CHECK_ERROR0' file='xpathInternals'>
+ <info>Macro to return 0 from the function if an XPath error was detected.</info>
+ </macro>
+ <macro name='CHECK_TYPE' file='xpathInternals'>
+ <info>Macro to check that the value on top of the XPath stack is of a given type.</info>
+ <arg name='typeval' info='the XPath type'/>
+ </macro>
+ <macro name='CHECK_TYPE0' file='xpathInternals'>
+ <info>Macro to check that the value on top of the XPath stack is of a given type. Return(0) in case of failure</info>
+ <arg name='typeval' info='the XPath type'/>
+ </macro>
+ <macro name='DEBUG_MEMORY' file='xmlmemory'>
+ <info>DEBUG_MEMORY replaces the allocator with a collect and debug shell to the libc allocator. DEBUG_MEMORY should only be activated when debugging libxml i.e. if libxml has been configured with --with-debug-mem too. #define DEBUG_MEMORY_FREED #define DEBUG_MEMORY_LOCATION</info>
+ </macro>
+ <macro name='DEBUG_MEMORY_LOCATION' file='xmlversion'>
+ <info>Whether the memory debugging is configured in</info>
+ </macro>
+ <macro name='HTML_COMMENT_NODE' file='HTMLtree'>
+ <info>Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document.</info>
+ </macro>
+ <macro name='HTML_ENTITY_REF_NODE' file='HTMLtree'>
+ <info>Macro. An entity reference in a HTML document is really implemented the same way as an entity reference in an XML document.</info>
+ </macro>
+ <macro name='HTML_PI_NODE' file='HTMLtree'>
+ <info>Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.</info>
+ </macro>
+ <macro name='HTML_PRESERVE_NODE' file='HTMLtree'>
+ <info>Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.</info>
+ </macro>
+ <macro name='HTML_TEXT_NODE' file='HTMLtree'>
+ <info>Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.</info>
+ </macro>
+ <macro name='INPUT_CHUNK' file='parserInternals'>
+ <info>The parser tries to always have that amount of input ready. One of the point is providing context when reporting errors.</info>
+ </macro>
+ <macro name='INVALID_SOCKET' file='nanoftp'>
+ <info>macro used to provide portability of code to windows sockets the value to be used when the socket is not valid</info>
+ </macro>
+ <macro name='IS_ASCII_DIGIT' file='parserInternals'>
+ <info>Macro to check [0-9]</info>
+ <arg name='c' info='an xmlChar value'/>
+ </macro>
+ <macro name='IS_ASCII_LETTER' file='parserInternals'>
+ <info>Macro to check [a-zA-Z]</info>
+ <arg name='c' info='an xmlChar value'/>
+ </macro>
+ <macro name='IS_BASECHAR' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [85] BaseChar ::= ... long list see REC ...</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_BLANK' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [3] S ::= (#x20 | #x9 | #xD | #xA)+</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_BLANK_CH' file='parserInternals'>
+ <info>Behaviour same as IS_BLANK</info>
+ <arg name='c' info='an xmlChar value (normally unsigned char)'/>
+ </macro>
+ <macro name='IS_BYTE_CHAR' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20...] any byte character in the accepted range</info>
+ <arg name='c' info='an byte value (int)'/>
+ </macro>
+ <macro name='IS_CHAR' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_CHAR_CH' file='parserInternals'>
+ <info>Behaves like IS_CHAR on single-byte value</info>
+ <arg name='c' info='an xmlChar (usually an unsigned char)'/>
+ </macro>
+ <macro name='IS_COMBINING' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [87] CombiningChar ::= ... long list see REC ...</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_COMBINING_CH' file='parserInternals'>
+ <info>Always false (all combining chars &gt; 0xff)</info>
+ <arg name='c' info='an xmlChar (usually an unsigned char)'/>
+ </macro>
+ <macro name='IS_DIGIT' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [88] Digit ::= ... long list see REC ...</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_DIGIT_CH' file='parserInternals'>
+ <info>Behaves like IS_DIGIT but with a single byte argument</info>
+ <arg name='c' info='an xmlChar value (usually an unsigned char)'/>
+ </macro>
+ <macro name='IS_EXTENDER' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_EXTENDER_CH' file='parserInternals'>
+ <info>Behaves like IS_EXTENDER but with a single-byte argument</info>
+ <arg name='c' info='an xmlChar value (usually an unsigned char)'/>
+ </macro>
+ <macro name='IS_IDEOGRAPHIC' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_LETTER' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [84] Letter ::= BaseChar | Ideographic</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_LETTER_CH' file='parserInternals'>
+ <info>Macro behaves like IS_LETTER, but only check base chars</info>
+ <arg name='c' info='an xmlChar value (normally unsigned char)'/>
+ </macro>
+ <macro name='IS_PUBIDCHAR' file='parserInternals'>
+ <info>Macro to check the following production in the XML spec: [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-&apos;()+,./:=?;!*#@$_%]</info>
+ <arg name='c' info='an UNICODE value (int)'/>
+ </macro>
+ <macro name='IS_PUBIDCHAR_CH' file='parserInternals'>
+ <info>Same as IS_PUBIDCHAR but for single-byte value</info>
+ <arg name='c' info='an xmlChar value (normally unsigned char)'/>
+ </macro>
+ <macro name='LIBXML2_NEW_BUFFER' file='tree'>
+ <info>Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.</info>
+ </macro>
+ <macro name='LIBXML_ATTR_ALLOC_SIZE' file='xmlversion'>
+ <info>Macro used to indicate to GCC this is an allocator function</info>
+ </macro>
+ <macro name='LIBXML_ATTR_FORMAT' file='xmlversion'>
+ <info>Macro used to indicate to GCC the parameter are printf like</info>
+ </macro>
+ <macro name='LIBXML_AUTOMATA_ENABLED' file='xmlversion'>
+ <info>Whether the automata interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_C14N_ENABLED' file='xmlversion'>
+ <info>Whether the Canonicalization support is configured in</info>
+ </macro>
+ <macro name='LIBXML_CATALOG_ENABLED' file='xmlversion'>
+ <info>Whether the Catalog support is configured in</info>
+ </macro>
+ <macro name='LIBXML_DEBUG_ENABLED' file='xmlversion'>
+ <info>Whether Debugging module is configured in</info>
+ </macro>
+ <macro name='LIBXML_DEBUG_RUNTIME' file='xmlversion'>
+ <info>Whether the runtime debugging is configured in</info>
+ </macro>
+ <macro name='LIBXML_DLL_IMPORT' file='xmlexports'>
+ </macro>
+ <macro name='LIBXML_DOCB_ENABLED' file='xmlversion'>
+ <info>Whether the SGML Docbook support is configured in</info>
+ </macro>
+ <macro name='LIBXML_DOTTED_VERSION' file='xmlversion'>
+ <info>the version string like &quot;1.2.3&quot;</info>
+ </macro>
+ <macro name='LIBXML_EXPR_ENABLED' file='xmlversion'>
+ <info>Whether the formal expressions interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_FTP_ENABLED' file='xmlversion'>
+ <info>Whether the FTP support is configured in</info>
+ </macro>
+ <macro name='LIBXML_HTML_ENABLED' file='xmlversion'>
+ <info>Whether the HTML support is configured in</info>
+ </macro>
+ <macro name='LIBXML_HTTP_ENABLED' file='xmlversion'>
+ <info>Whether the HTTP support is configured in</info>
+ </macro>
+ <macro name='LIBXML_ICONV_ENABLED' file='xmlversion'>
+ <info>Whether iconv support is available</info>
+ </macro>
+ <macro name='LIBXML_ICU_ENABLED' file='xmlversion'>
+ <info>Whether icu support is available</info>
+ </macro>
+ <macro name='LIBXML_ISO8859X_ENABLED' file='xmlversion'>
+ <info>Whether ISO-8859-* support is made available in case iconv is not</info>
+ </macro>
+ <macro name='LIBXML_LEGACY_ENABLED' file='xmlversion'>
+ <info>Whether the deprecated APIs are compiled in for compatibility</info>
+ </macro>
+ <macro name='LIBXML_LZMA_ENABLED' file='xmlversion'>
+ <info>Whether the Lzma support is compiled in</info>
+ </macro>
+ <macro name='LIBXML_MODULES_ENABLED' file='xmlversion'>
+ <info>Whether the module interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_MODULE_EXTENSION' file='xmlversion'>
+ <info>the string suffix used by dynamic modules (usually shared libraries)</info>
+ </macro>
+ <macro name='LIBXML_OUTPUT_ENABLED' file='xmlversion'>
+ <info>Whether the serialization/saving support is configured in</info>
+ </macro>
+ <macro name='LIBXML_PATTERN_ENABLED' file='xmlversion'>
+ <info>Whether the xmlPattern node selection interface is configured in</info>
+ </macro>
+ <macro name='LIBXML_PUSH_ENABLED' file='xmlversion'>
+ <info>Whether the push parsing interfaces are configured in</info>
+ </macro>
+ <macro name='LIBXML_READER_ENABLED' file='xmlversion'>
+ <info>Whether the xmlReader parsing interface is configured in</info>
+ </macro>
+ <macro name='LIBXML_REGEXP_ENABLED' file='xmlversion'>
+ <info>Whether the regular expressions interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_SAX1_ENABLED' file='xmlversion'>
+ <info>Whether the older SAX1 interface is configured in</info>
+ </macro>
+ <macro name='LIBXML_SCHEMAS_ENABLED' file='xmlversion'>
+ <info>Whether the Schemas validation interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_SCHEMATRON_ENABLED' file='xmlversion'>
+ <info>Whether the Schematron validation interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_TEST_VERSION' file='xmlversion'>
+ <info>Macro to check that the libxml version in use is compatible with the version the software has been compiled against</info>
+ </macro>
+ <macro name='LIBXML_THREAD_ALLOC_ENABLED' file='xmlversion'>
+ <info>Whether the allocation hooks are per-thread</info>
+ </macro>
+ <macro name='LIBXML_THREAD_ENABLED' file='xmlversion'>
+ <info>Whether the thread support is configured in</info>
+ </macro>
+ <macro name='LIBXML_TREE_ENABLED' file='xmlversion'>
+ <info>Whether the DOM like tree manipulation API support is configured in</info>
+ </macro>
+ <macro name='LIBXML_UNICODE_ENABLED' file='xmlversion'>
+ <info>Whether the Unicode related interfaces are compiled in</info>
+ </macro>
+ <macro name='LIBXML_VALID_ENABLED' file='xmlversion'>
+ <info>Whether the DTD validation support is configured in</info>
+ </macro>
+ <macro name='LIBXML_VERSION' file='xmlversion'>
+ <info>the version number: 1.2.3 value is 10203</info>
+ </macro>
+ <macro name='LIBXML_VERSION_EXTRA' file='xmlversion'>
+ <info>extra version information, used to show a CVS compilation</info>
+ </macro>
+ <macro name='LIBXML_VERSION_STRING' file='xmlversion'>
+ <info>the version number string, 1.2.3 value is &quot;10203&quot;</info>
+ </macro>
+ <macro name='LIBXML_WRITER_ENABLED' file='xmlversion'>
+ <info>Whether the xmlWriter saving interface is configured in</info>
+ </macro>
+ <macro name='LIBXML_XINCLUDE_ENABLED' file='xmlversion'>
+ <info>Whether XInclude is configured in</info>
+ </macro>
+ <macro name='LIBXML_XPATH_ENABLED' file='xmlversion'>
+ <info>Whether XPath is configured in</info>
+ </macro>
+ <macro name='LIBXML_XPTR_ENABLED' file='xmlversion'>
+ <info>Whether XPointer is configured in</info>
+ </macro>
+ <macro name='LIBXML_ZLIB_ENABLED' file='xmlversion'>
+ <info>Whether the Zlib support is compiled in</info>
+ </macro>
+ <macro name='MOVETO_ENDTAG' file='parserInternals'>
+ <info>Skips to the next &apos;&gt;&apos; char.</info>
+ <arg name='p' info='and UTF8 string pointer'/>
+ </macro>
+ <macro name='MOVETO_STARTTAG' file='parserInternals'>
+ <info>Skips to the next &apos;&lt;&apos; char.</info>
+ <arg name='p' info='and UTF8 string pointer'/>
+ </macro>
+ <macro name='SKIP_EOL' file='parserInternals'>
+ <info>Skips the end of line chars.</info>
+ <arg name='p' info='and UTF8 string pointer'/>
+ </macro>
+ <macro name='SOCKET' file='nanoftp'>
+ <info>macro used to provide portability of code to windows sockets</info>
+ </macro>
+ <macro name='WITHOUT_TRIO' file='xmlversion'>
+ <info>defined if the trio support should not be configured in</info>
+ </macro>
+ <macro name='WITH_TRIO' file='xmlversion'>
+ <info>defined if the trio support need to be configured in</info>
+ </macro>
+ <macro name='XINCLUDE_FALLBACK' file='xinclude'>
+ <info>Macro defining &quot;fallback&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_HREF' file='xinclude'>
+ <info>Macro defining &quot;href&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_NODE' file='xinclude'>
+ <info>Macro defining &quot;include&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_NS' file='xinclude'>
+ <info>Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude</info>
+ </macro>
+ <macro name='XINCLUDE_OLD_NS' file='xinclude'>
+ <info>Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude</info>
+ </macro>
+ <macro name='XINCLUDE_PARSE' file='xinclude'>
+ <info>Macro defining &quot;parse&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_PARSE_ENCODING' file='xinclude'>
+ <info>Macro defining &quot;encoding&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_PARSE_TEXT' file='xinclude'>
+ <info>Macro defining &quot;text&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_PARSE_XML' file='xinclude'>
+ <info>Macro defining &quot;xml&quot;</info>
+ </macro>
+ <macro name='XINCLUDE_PARSE_XPOINTER' file='xinclude'>
+ <info>Macro defining &quot;xpointer&quot;</info>
+ </macro>
+ <macro name='XMLCALL' file='xmlexports'>
+ </macro>
+ <macro name='XMLCDECL' file='xmlexports'>
+ </macro>
+ <macro name='XMLPUBFUN' file='xmlexports'>
+ </macro>
+ <macro name='XMLPUBVAR' file='xmlexports'>
+ </macro>
+ <macro name='XML_CAST_FPTR' file='hash'>
+ <info>Macro to do a casting from an object pointer to a function pointer without encountering a warning from gcc #define XML_CAST_FPTR(fptr) (*(void **)(&amp;fptr)) This macro violated ISO C aliasing rules (gcc4 on s390 broke) so it is disabled now</info>
+ <arg name='fptr' info='pointer to a function'/>
+ </macro>
+ <macro name='XML_CATALOGS_NAMESPACE' file='catalog'>
+ <info>The namespace for the XML Catalogs elements.</info>
+ </macro>
+ <macro name='XML_CATALOG_PI' file='catalog'>
+ <info>The specific XML Catalog Processing Instuction name.</info>
+ </macro>
+ <macro name='XML_COMPLETE_ATTRS' file='parser'>
+ <info>Bit in the loadsubset context field to tell to do complete the elements attributes lists with the ones defaulted from the DTDs. Use it to initialize xmlLoadExtDtdDefaultValue.</info>
+ </macro>
+ <macro name='XML_CTXT_FINISH_DTD_0' file='valid'>
+ <info>Special value for finishDtd field when embedded in an xmlParserCtxt</info>
+ </macro>
+ <macro name='XML_CTXT_FINISH_DTD_1' file='valid'>
+ <info>Special value for finishDtd field when embedded in an xmlParserCtxt</info>
+ </macro>
+ <macro name='XML_DEFAULT_VERSION' file='parser'>
+ <info>The default version of XML used: 1.0</info>
+ </macro>
+ <macro name='XML_DETECT_IDS' file='parser'>
+ <info>Bit in the loadsubset context field to tell to do ID/REFs lookups. Use it to initialize xmlLoadExtDtdDefaultValue.</info>
+ </macro>
+ <macro name='XML_GET_CONTENT' file='tree'>
+ <info>Macro to extract the content pointer of a node.</info>
+ </macro>
+ <macro name='XML_GET_LINE' file='tree'>
+ <info>Macro to extract the line number of an element node.</info>
+ </macro>
+ <macro name='XML_LOCAL_NAMESPACE' file='tree'>
+ <info>A namespace declaration node.</info>
+ </macro>
+ <macro name='XML_MAX_DICTIONARY_LIMIT' file='parserInternals'>
+ <info>Maximum size allowed by the parser for a dictionary by default This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0</info>
+ </macro>
+ <macro name='XML_MAX_LOOKUP_LIMIT' file='parserInternals'>
+ <info>Maximum size allowed by the parser for ahead lookup This is an upper boundary enforced by the parser to avoid bad behaviour on &quot;unfriendly&apos; content Introduced in 2.9.0</info>
+ </macro>
+ <macro name='XML_MAX_NAMELEN' file='parserInternals'>
+ <info>Identifiers can be longer, but this will be more costly at runtime.</info>
+ </macro>
+ <macro name='XML_MAX_NAME_LENGTH' file='parserInternals'>
+ <info>Maximum size allowed for a markup identitier This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Note that with the use of parsing dictionaries overriding the limit may result in more runtime memory usage in face of &quot;unfriendly&apos; content Introduced in 2.9.0</info>
+ </macro>
+ <macro name='XML_MAX_TEXT_LENGTH' file='parserInternals'>
+ <info>Maximum size allowed for a single text node when building a tree. This is not a limitation of the parser but a safety boundary feature, use XML_PARSE_HUGE option to override it. Introduced in 2.9.0</info>
+ </macro>
+ <macro name='XML_SAX2_MAGIC' file='parser'>
+ <info>Special constant found in SAX2 blocks initialized fields</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANYATTR_LAX' file='schemasInternals'>
+ <info>Ignore validation non definition on attributes Obsolete, not used anymore.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANYATTR_SKIP' file='schemasInternals'>
+ <info>Skip unknown attribute from validation Obsolete, not used anymore.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANYATTR_STRICT' file='schemasInternals'>
+ <info>Apply strict validation rules on attributes Obsolete, not used anymore.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANY_LAX' file='schemasInternals'>
+ <info>Used by wildcards. Validate if type found, don&apos;t worry if not found</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANY_SKIP' file='schemasInternals'>
+ <info>Skip unknown attribute from validation</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ANY_STRICT' file='schemasInternals'>
+ <info>Used by wildcards. Apply strict validation rules</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTRGROUP_GLOBAL' file='schemasInternals'>
+ <info>The attribute wildcard has been already builded.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTRGROUP_HAS_REFS' file='schemasInternals'>
+ <info>Whether this attr. group contains attr. group references.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTRGROUP_MARKED' file='schemasInternals'>
+ <info>Marks the attr group as marked; used for circular checks.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTRGROUP_REDEFINED' file='schemasInternals'>
+ <info>The attr group was redefined.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED' file='schemasInternals'>
+ <info>The attribute wildcard has been already builded.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_FIXED' file='schemasInternals'>
+ <info>the attribute has a fixed value</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_GLOBAL' file='schemasInternals'>
+ <info>allow elements in no namespace</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_INTERNAL_RESOLVED' file='schemasInternals'>
+ <info>this is set when the &quot;type&quot; and &quot;ref&quot; references have been resolved.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_NSDEFAULT' file='schemasInternals'>
+ <info>allow elements in no namespace</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_OPTIONAL' file='schemasInternals'>
+ <info>The attribute is optional.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_PROHIBITED' file='schemasInternals'>
+ <info>Used by wildcards. The attribute is prohibited.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ATTR_USE_REQUIRED' file='schemasInternals'>
+ <info>The attribute is required.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION' file='schemasInternals'>
+ <info>the schema has &quot;extension&quot; in the set of blockDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION' file='schemasInternals'>
+ <info>the schema has &quot;restriction&quot; in the set of blockDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION' file='schemasInternals'>
+ <info>the schema has &quot;substitution&quot; in the set of blockDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_ABSTRACT' file='schemasInternals'>
+ <info>the element is abstract</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_BLOCK_ABSENT' file='schemasInternals'>
+ <info>the &quot;block&quot; attribute is absent</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_BLOCK_EXTENSION' file='schemasInternals'>
+ <info>disallowed substitutions are absent</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_BLOCK_RESTRICTION' file='schemasInternals'>
+ <info>disallowed substitutions: &quot;restriction&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION' file='schemasInternals'>
+ <info>disallowed substitutions: &quot;substituion&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_CIRCULAR' file='schemasInternals'>
+ <info>a helper flag for the search of circular references.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_DEFAULT' file='schemasInternals'>
+ <info>the element has a default value</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_FINAL_ABSENT' file='schemasInternals'>
+ <info>substitution group exclusions are absent</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_FINAL_EXTENSION' file='schemasInternals'>
+ <info>substitution group exclusions: &quot;extension&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_FINAL_RESTRICTION' file='schemasInternals'>
+ <info>substitution group exclusions: &quot;restriction&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_FIXED' file='schemasInternals'>
+ <info>the element has a fixed value</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_GLOBAL' file='schemasInternals'>
+ <info>the element is global</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_INTERNAL_CHECKED' file='schemasInternals'>
+ <info>this is set when the elem decl has been checked against all constraints</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_INTERNAL_RESOLVED' file='schemasInternals'>
+ <info>this is set when &quot;type&quot;, &quot;ref&quot;, &quot;substitutionGroup&quot; references have been resolved.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_NILLABLE' file='schemasInternals'>
+ <info>the element is nillable</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_NSDEFAULT' file='schemasInternals'>
+ <info>allow elements in no namespace Obsolete, not used anymore.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_REF' file='schemasInternals'>
+ <info>the element is a reference to a type</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD' file='schemasInternals'>
+ <info>the declaration is a substitution group head</info>
+ </macro>
+ <macro name='XML_SCHEMAS_ELEM_TOPLEVEL' file='schemasInternals'>
+ <info>the element is top level obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FACET_COLLAPSE' file='schemasInternals'>
+ <info>collapse the types of the facet</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FACET_PRESERVE' file='schemasInternals'>
+ <info>preserve the type of the facet</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FACET_REPLACE' file='schemasInternals'>
+ <info>replace the type of the facet</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FACET_UNKNOWN' file='schemasInternals'>
+ <info>unknown facet handling</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FINAL_DEFAULT_EXTENSION' file='schemasInternals'>
+ <info>the schema has &quot;extension&quot; in the set of finalDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FINAL_DEFAULT_LIST' file='schemasInternals'>
+ <info>the cshema has &quot;list&quot; in the set of finalDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION' file='schemasInternals'>
+ <info>the schema has &quot;restriction&quot; in the set of finalDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_FINAL_DEFAULT_UNION' file='schemasInternals'>
+ <info>the schema has &quot;union&quot; in the set of finalDefault.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_INCLUDING_CONVERT_NS' file='schemasInternals'>
+ <info>the schema is currently including an other schema with no target namespace.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_QUALIF_ATTR' file='schemasInternals'>
+ <info>Reflects attributeFormDefault == qualified in an XML schema document.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_QUALIF_ELEM' file='schemasInternals'>
+ <info>Reflects elementFormDefault == qualified in an XML schema document.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_ABSTRACT' file='schemasInternals'>
+ <info>the simple/complexType is abstract.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_BLOCK_DEFAULT' file='schemasInternals'>
+ <info>the complexType did not specify &apos;block&apos; so use the default of the &lt;schema&gt; item.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_BLOCK_EXTENSION' file='schemasInternals'>
+ <info>the complexType has a &apos;block&apos; of &quot;extension&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_BLOCK_RESTRICTION' file='schemasInternals'>
+ <info>the complexType has a &apos;block&apos; of &quot;restriction&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE' file='schemasInternals'>
+ <info>Marks the item as a builtin primitive.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION' file='schemasInternals'>
+ <info>the simple or complex type has a derivation method of &quot;extension&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION' file='schemasInternals'>
+ <info>the simple or complex type has a derivation method of &quot;restriction&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FACETSNEEDVALUE' file='schemasInternals'>
+ <info>indicates if the facets need a computed value</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FINAL_DEFAULT' file='schemasInternals'>
+ <info>the simpleType has a final of &quot;default&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FINAL_EXTENSION' file='schemasInternals'>
+ <info>the complexType has a final of &quot;extension&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FINAL_LIST' file='schemasInternals'>
+ <info>the simpleType has a final of &quot;list&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FINAL_RESTRICTION' file='schemasInternals'>
+ <info>the simpleType/complexType has a final of &quot;restriction&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FINAL_UNION' file='schemasInternals'>
+ <info>the simpleType has a final of &quot;union&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_FIXUP_1' file='schemasInternals'>
+ <info>First stage of fixup was done.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_GLOBAL' file='schemasInternals'>
+ <info>the type is global</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_HAS_FACETS' file='schemasInternals'>
+ <info>has facets</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_INTERNAL_INVALID' file='schemasInternals'>
+ <info>indicates that the type is invalid</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_INTERNAL_RESOLVED' file='schemasInternals'>
+ <info>indicates that the type was typefixed</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_MARKED' file='schemasInternals'>
+ <info>Marks the item as marked; used for circular checks.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_MIXED' file='schemasInternals'>
+ <info>the element content type is mixed</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_NORMVALUENEEDED' file='schemasInternals'>
+ <info>indicates if the facets (pattern) need a normalized value</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD' file='schemasInternals'>
+ <info>the complexType owns an attribute wildcard, i.e. it can be freed by the complexType</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_REDEFINED' file='schemasInternals'>
+ <info>The type was redefined.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_VARIETY_ABSENT' file='schemasInternals'>
+ <info>the simpleType has a variety of &quot;absent&quot;. TODO: Actually not necessary :-/, since if none of the variety flags occur then it&apos;s automatically absent.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_VARIETY_ATOMIC' file='schemasInternals'>
+ <info>the simpleType has a variety of &quot;union&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_VARIETY_LIST' file='schemasInternals'>
+ <info>the simpleType has a variety of &quot;list&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_VARIETY_UNION' file='schemasInternals'>
+ <info>the simpleType has a variety of &quot;union&quot;.</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE' file='schemasInternals'>
+ <info>a whitespace-facet value of &quot;collapse&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE' file='schemasInternals'>
+ <info>a whitespace-facet value of &quot;preserve&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_TYPE_WHITESPACE_REPLACE' file='schemasInternals'>
+ <info>a whitespace-facet value of &quot;replace&quot;</info>
+ </macro>
+ <macro name='XML_SCHEMAS_WILDCARD_COMPLETE' file='schemasInternals'>
+ <info>If the wildcard is complete.</info>
+ </macro>
+ <macro name='XML_SKIP_IDS' file='parser'>
+ <info>Bit in the loadsubset context field to tell to not do ID/REFs registration. Used to initialize xmlLoadExtDtdDefaultValue in some special cases.</info>
+ </macro>
+ <macro name='XML_SUBSTITUTE_BOTH' file='parserInternals'>
+ <info>Both general and parameter entities need to be substituted.</info>
+ </macro>
+ <macro name='XML_SUBSTITUTE_NONE' file='parserInternals'>
+ <info>If no entities need to be substituted.</info>
+ </macro>
+ <macro name='XML_SUBSTITUTE_PEREF' file='parserInternals'>
+ <info>Whether parameter entities need to be substituted.</info>
+ </macro>
+ <macro name='XML_SUBSTITUTE_REF' file='parserInternals'>
+ <info>Whether general entities need to be substituted.</info>
+ </macro>
+ <macro name='XML_XML_ID' file='tree'>
+ <info>This is the name for the special xml:id attribute</info>
+ </macro>
+ <macro name='XML_XML_NAMESPACE' file='tree'>
+ <info>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</info>
+ </macro>
+ <macro name='XML_XPATH_CHECKNS' file='xpath'>
+ <info>check namespaces at compilation</info>
+ </macro>
+ <macro name='XML_XPATH_NOVAR' file='xpath'>
+ <info>forbid variables in expression</info>
+ </macro>
+ <macro name='XP_ERROR' file='xpathInternals'>
+ <info>Macro to raise an XPath error and return.</info>
+ <arg name='X' info='the error code'/>
+ </macro>
+ <macro name='XP_ERROR0' file='xpathInternals'>
+ <info>Macro to raise an XPath error and return 0.</info>
+ <arg name='X' info='the error code'/>
+ </macro>
+ <macro name='_REENTRANT' file='xmlexports'>
+ </macro>
+ <macro name='htmlDefaultSubelement' file='HTMLparser'>
+ <info>Returns the default subelement for this element</info>
+ <arg name='elt' info='HTML element'/>
+ </macro>
+ <macro name='htmlElementAllowedHereDesc' file='HTMLparser'>
+ <info>Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.</info>
+ <arg name='parent' info='HTML parent element'/>
+ <arg name='elt' info='HTML element'/>
+ </macro>
+ <macro name='htmlRequiredAttrs' file='HTMLparser'>
+ <info>Returns the attributes required for the specified element.</info>
+ <arg name='elt' info='HTML element'/>
+ </macro>
+ <macro name='xmlChildrenNode' file='tree'>
+ <info>Macro for compatibility naming layer with libxml1. Maps to &quot;children.&quot;</info>
+ </macro>
+ <macro name='xmlIsBaseCharQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsBaseChar_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsBlankQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsBlank_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsCharQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsChar_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsCombiningQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsDigitQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsDigit_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsExtenderQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsExtender_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsIdeographicQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsPubidCharQ' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlIsPubidChar_ch' file='chvalid'>
+ <info>Automatically generated by genChRanges.py</info>
+ <arg name='c' info='char to validate'/>
+ </macro>
+ <macro name='xmlRootNode' file='tree'>
+ <info>Macro for compatibility naming layer with libxml1. Maps to &quot;children&quot;.</info>
+ </macro>
+ <macro name='xmlTextWriterWriteDocType' file='xmlwriter'>
+ <info>this macro maps to xmlTextWriterWriteDTD</info>
+ </macro>
+ <macro name='xmlTextWriterWriteProcessingInstruction' file='xmlwriter'>
+ <info>This macro maps to xmlTextWriterWritePI</info>
+ </macro>
+ <macro name='xmlXPathCheckError' file='xpathInternals'>
+ <info>Check if an XPath error was raised. Returns true if an error has been raised, false otherwise.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathEmptyNodeSet' file='xpathInternals'>
+ <info>Empties a node-set.</info>
+ <arg name='ns' info='a node-set'/>
+ </macro>
+ <macro name='xmlXPathGetContextNode' file='xpathInternals'>
+ <info>Get the context node of an XPath context. Returns the context node.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathGetDocument' file='xpathInternals'>
+ <info>Get the document of an XPath context. Returns the context document.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathGetError' file='xpathInternals'>
+ <info>Get the error code of an XPath context. Returns the context error.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathNodeSetGetLength' file='xpath'>
+ <info>Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.</info>
+ <arg name='ns' info='a node-set'/>
+ </macro>
+ <macro name='xmlXPathNodeSetIsEmpty' file='xpath'>
+ <info>Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.</info>
+ <arg name='ns' info='a node-set'/>
+ </macro>
+ <macro name='xmlXPathNodeSetItem' file='xpath'>
+ <info>Implements a functionality similar to the DOM NodeList.item(). Returns the xmlNodePtr at the given @index in @ns or NULL if @index is out of range (0 to length-1)</info>
+ <arg name='ns' info='a node-set'/>
+ <arg name='index' info='index of a node in the set'/>
+ </macro>
+ <macro name='xmlXPathReturnBoolean' file='xpathInternals'>
+ <info>Pushes the boolean @val on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='val' info='a boolean'/>
+ </macro>
+ <macro name='xmlXPathReturnEmptyNodeSet' file='xpathInternals'>
+ <info>Pushes an empty node-set on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathReturnEmptyString' file='xpathInternals'>
+ <info>Pushes an empty string on the stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathReturnExternal' file='xpathInternals'>
+ <info>Pushes user data on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='val' info='user data'/>
+ </macro>
+ <macro name='xmlXPathReturnFalse' file='xpathInternals'>
+ <info>Pushes false on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathReturnNodeSet' file='xpathInternals'>
+ <info>Pushes the node-set @ns on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='ns' info='a node-set'/>
+ </macro>
+ <macro name='xmlXPathReturnNumber' file='xpathInternals'>
+ <info>Pushes the double @val on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='val' info='a double'/>
+ </macro>
+ <macro name='xmlXPathReturnString' file='xpathInternals'>
+ <info>Pushes the string @str on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='str' info='a string'/>
+ </macro>
+ <macro name='xmlXPathReturnTrue' file='xpathInternals'>
+ <info>Pushes true on the context stack.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathSetArityError' file='xpathInternals'>
+ <info>Raises an XPATH_INVALID_ARITY error.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathSetError' file='xpathInternals'>
+ <info>Raises an error.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ <arg name='err' info='an xmlXPathError code'/>
+ </macro>
+ <macro name='xmlXPathSetTypeError' file='xpathInternals'>
+ <info>Raises an XPATH_INVALID_TYPE error.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathStackIsExternal' file='xpathInternals'>
+ <info>Checks if the current value on the XPath stack is an external object. Returns true if the current object on the stack is an external object.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <macro name='xmlXPathStackIsNodeSet' file='xpathInternals'>
+ <info>Check if the current value on the XPath stack is a node set or an XSLT value tree. Returns true if the current object on the stack is a node-set.</info>
+ <arg name='ctxt' info='an XPath parser context'/>
+ </macro>
+ <enum name='HTML_DEPRECATED' file='HTMLparser' value='2' type='htmlStatus'/>
+ <enum name='HTML_INVALID' file='HTMLparser' value='1' type='htmlStatus'/>
+ <enum name='HTML_NA' file='HTMLparser' value='0' type='htmlStatus' info='something we don&apos;t check at all'/>
+ <enum name='HTML_PARSE_COMPACT' file='HTMLparser' value='65536' type='htmlParserOption' info='compact small text nodes'/>
+ <enum name='HTML_PARSE_IGNORE_ENC' file='HTMLparser' value='2097152' type='htmlParserOption' info=' ignore internal document encoding hint'/>
+ <enum name='HTML_PARSE_NOBLANKS' file='HTMLparser' value='256' type='htmlParserOption' info='remove blank nodes'/>
+ <enum name='HTML_PARSE_NODEFDTD' file='HTMLparser' value='4' type='htmlParserOption' info='do not default a doctype if not found'/>
+ <enum name='HTML_PARSE_NOERROR' file='HTMLparser' value='32' type='htmlParserOption' info='suppress error reports'/>
+ <enum name='HTML_PARSE_NOIMPLIED' file='HTMLparser' value='8192' type='htmlParserOption' info='Do not add implied html/body... elements'/>
+ <enum name='HTML_PARSE_NONET' file='HTMLparser' value='2048' type='htmlParserOption' info='Forbid network access'/>
+ <enum name='HTML_PARSE_NOWARNING' file='HTMLparser' value='64' type='htmlParserOption' info='suppress warning reports'/>
+ <enum name='HTML_PARSE_PEDANTIC' file='HTMLparser' value='128' type='htmlParserOption' info='pedantic error reporting'/>
+ <enum name='HTML_PARSE_RECOVER' file='HTMLparser' value='1' type='htmlParserOption' info='Relaxed parsing'/>
+ <enum name='HTML_REQUIRED' file='HTMLparser' value='12' type='htmlStatus' info=' VALID bit set so ( &amp; HTML_VALID ) is TRUE'/>
+ <enum name='HTML_VALID' file='HTMLparser' value='4' type='htmlStatus'/>
+ <enum name='XLINK_ACTUATE_AUTO' file='xlink' value='1' type='xlinkActuate'/>
+ <enum name='XLINK_ACTUATE_NONE' file='xlink' value='0' type='xlinkActuate'/>
+ <enum name='XLINK_ACTUATE_ONREQUEST' file='xlink' value='2' type='xlinkActuate'/>
+ <enum name='XLINK_SHOW_EMBED' file='xlink' value='2' type='xlinkShow'/>
+ <enum name='XLINK_SHOW_NEW' file='xlink' value='1' type='xlinkShow'/>
+ <enum name='XLINK_SHOW_NONE' file='xlink' value='0' type='xlinkShow'/>
+ <enum name='XLINK_SHOW_REPLACE' file='xlink' value='3' type='xlinkShow'/>
+ <enum name='XLINK_TYPE_EXTENDED' file='xlink' value='2' type='xlinkType'/>
+ <enum name='XLINK_TYPE_EXTENDED_SET' file='xlink' value='3' type='xlinkType'/>
+ <enum name='XLINK_TYPE_NONE' file='xlink' value='0' type='xlinkType'/>
+ <enum name='XLINK_TYPE_SIMPLE' file='xlink' value='1' type='xlinkType'/>
+ <enum name='XML_ATTRIBUTE_CDATA' file='tree' value='1' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_DECL' file='tree' value='16' type='xmlElementType'/>
+ <enum name='XML_ATTRIBUTE_ENTITIES' file='tree' value='6' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_ENTITY' file='tree' value='5' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_ENUMERATION' file='tree' value='9' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_FIXED' file='tree' value='4' type='xmlAttributeDefault'/>
+ <enum name='XML_ATTRIBUTE_ID' file='tree' value='2' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_IDREF' file='tree' value='3' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_IDREFS' file='tree' value='4' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_IMPLIED' file='tree' value='3' type='xmlAttributeDefault'/>
+ <enum name='XML_ATTRIBUTE_NMTOKEN' file='tree' value='7' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_NMTOKENS' file='tree' value='8' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_NODE' file='tree' value='2' type='xmlElementType'/>
+ <enum name='XML_ATTRIBUTE_NONE' file='tree' value='1' type='xmlAttributeDefault'/>
+ <enum name='XML_ATTRIBUTE_NOTATION' file='tree' value='10' type='xmlAttributeType'/>
+ <enum name='XML_ATTRIBUTE_REQUIRED' file='tree' value='2' type='xmlAttributeDefault'/>
+ <enum name='XML_BUFFER_ALLOC_DOUBLEIT' file='tree' value='1' type='xmlBufferAllocationScheme' info='double each time one need to grow'/>
+ <enum name='XML_BUFFER_ALLOC_EXACT' file='tree' value='2' type='xmlBufferAllocationScheme' info='grow only to the minimal size'/>
+ <enum name='XML_BUFFER_ALLOC_HYBRID' file='tree' value='5' type='xmlBufferAllocationScheme' info=' exact up to a threshold, and doubleit thereafter'/>
+ <enum name='XML_BUFFER_ALLOC_IMMUTABLE' file='tree' value='3' type='xmlBufferAllocationScheme' info='immutable buffer'/>
+ <enum name='XML_BUFFER_ALLOC_IO' file='tree' value='4' type='xmlBufferAllocationScheme' info='special allocation scheme used for I/O'/>
+ <enum name='XML_BUF_OVERFLOW' file='xmlerror' value='7000' type='xmlParserErrors'/>
+ <enum name='XML_C14N_1_0' file='c14n' value='0' type='xmlC14NMode' info='Origianal C14N 1.0 spec'/>
+ <enum name='XML_C14N_1_1' file='c14n' value='2' type='xmlC14NMode' info=' C14N 1.1 spec'/>
+ <enum name='XML_C14N_CREATE_CTXT' file='xmlerror' value='1950' type='xmlParserErrors'/>
+ <enum name='XML_C14N_CREATE_STACK' file='xmlerror' value='1952' type='xmlParserErrors' info='1952'/>
+ <enum name='XML_C14N_EXCLUSIVE_1_0' file='c14n' value='1' type='xmlC14NMode' info='Exclusive C14N 1.0 spec'/>
+ <enum name='XML_C14N_INVALID_NODE' file='xmlerror' value='1953' type='xmlParserErrors' info='1953'/>
+ <enum name='XML_C14N_RELATIVE_NAMESPACE' file='xmlerror' value='1955' type='xmlParserErrors' info='1955'/>
+ <enum name='XML_C14N_REQUIRES_UTF8' file='xmlerror' value='1951' type='xmlParserErrors' info='1951'/>
+ <enum name='XML_C14N_UNKNOW_NODE' file='xmlerror' value='1954' type='xmlParserErrors' info='1954'/>
+ <enum name='XML_CATALOG_ENTRY_BROKEN' file='xmlerror' value='1651' type='xmlParserErrors' info='1651'/>
+ <enum name='XML_CATALOG_MISSING_ATTR' file='xmlerror' value='1650' type='xmlParserErrors'/>
+ <enum name='XML_CATALOG_NOT_CATALOG' file='xmlerror' value='1653' type='xmlParserErrors' info='1653'/>
+ <enum name='XML_CATALOG_PREFER_VALUE' file='xmlerror' value='1652' type='xmlParserErrors' info='1652'/>
+ <enum name='XML_CATALOG_RECURSION' file='xmlerror' value='1654' type='xmlParserErrors' info='1654'/>
+ <enum name='XML_CATA_ALLOW_ALL' file='catalog' value='3' type='xmlCatalogAllow'/>
+ <enum name='XML_CATA_ALLOW_DOCUMENT' file='catalog' value='2' type='xmlCatalogAllow'/>
+ <enum name='XML_CATA_ALLOW_GLOBAL' file='catalog' value='1' type='xmlCatalogAllow'/>
+ <enum name='XML_CATA_ALLOW_NONE' file='catalog' value='0' type='xmlCatalogAllow'/>
+ <enum name='XML_CATA_PREFER_NONE' file='catalog' value='0' type='xmlCatalogPrefer'/>
+ <enum name='XML_CATA_PREFER_PUBLIC' file='catalog' value='1' type='xmlCatalogPrefer'/>
+ <enum name='XML_CATA_PREFER_SYSTEM' file='catalog' value='2' type='xmlCatalogPrefer'/>
+ <enum name='XML_CDATA_SECTION_NODE' file='tree' value='4' type='xmlElementType'/>
+ <enum name='XML_CHAR_ENCODING_2022_JP' file='encoding' value='19' type='xmlCharEncoding' info='ISO-2022-JP'/>
+ <enum name='XML_CHAR_ENCODING_8859_1' file='encoding' value='10' type='xmlCharEncoding' info='ISO-8859-1 ISO Latin 1'/>
+ <enum name='XML_CHAR_ENCODING_8859_2' file='encoding' value='11' type='xmlCharEncoding' info='ISO-8859-2 ISO Latin 2'/>
+ <enum name='XML_CHAR_ENCODING_8859_3' file='encoding' value='12' type='xmlCharEncoding' info='ISO-8859-3'/>
+ <enum name='XML_CHAR_ENCODING_8859_4' file='encoding' value='13' type='xmlCharEncoding' info='ISO-8859-4'/>
+ <enum name='XML_CHAR_ENCODING_8859_5' file='encoding' value='14' type='xmlCharEncoding' info='ISO-8859-5'/>
+ <enum name='XML_CHAR_ENCODING_8859_6' file='encoding' value='15' type='xmlCharEncoding' info='ISO-8859-6'/>
+ <enum name='XML_CHAR_ENCODING_8859_7' file='encoding' value='16' type='xmlCharEncoding' info='ISO-8859-7'/>
+ <enum name='XML_CHAR_ENCODING_8859_8' file='encoding' value='17' type='xmlCharEncoding' info='ISO-8859-8'/>
+ <enum name='XML_CHAR_ENCODING_8859_9' file='encoding' value='18' type='xmlCharEncoding' info='ISO-8859-9'/>
+ <enum name='XML_CHAR_ENCODING_ASCII' file='encoding' value='22' type='xmlCharEncoding' info=' pure ASCII'/>
+ <enum name='XML_CHAR_ENCODING_EBCDIC' file='encoding' value='6' type='xmlCharEncoding' info='EBCDIC uh!'/>
+ <enum name='XML_CHAR_ENCODING_ERROR' file='encoding' value='-1' type='xmlCharEncoding' info='No char encoding detected'/>
+ <enum name='XML_CHAR_ENCODING_EUC_JP' file='encoding' value='21' type='xmlCharEncoding' info='EUC-JP'/>
+ <enum name='XML_CHAR_ENCODING_NONE' file='encoding' value='0' type='xmlCharEncoding' info='No char encoding detected'/>
+ <enum name='XML_CHAR_ENCODING_SHIFT_JIS' file='encoding' value='20' type='xmlCharEncoding' info='Shift_JIS'/>
+ <enum name='XML_CHAR_ENCODING_UCS2' file='encoding' value='9' type='xmlCharEncoding' info='UCS-2'/>
+ <enum name='XML_CHAR_ENCODING_UCS4BE' file='encoding' value='5' type='xmlCharEncoding' info='UCS-4 big endian'/>
+ <enum name='XML_CHAR_ENCODING_UCS4LE' file='encoding' value='4' type='xmlCharEncoding' info='UCS-4 little endian'/>
+ <enum name='XML_CHAR_ENCODING_UCS4_2143' file='encoding' value='7' type='xmlCharEncoding' info='UCS-4 unusual ordering'/>
+ <enum name='XML_CHAR_ENCODING_UCS4_3412' file='encoding' value='8' type='xmlCharEncoding' info='UCS-4 unusual ordering'/>
+ <enum name='XML_CHAR_ENCODING_UTF16BE' file='encoding' value='3' type='xmlCharEncoding' info='UTF-16 big endian'/>
+ <enum name='XML_CHAR_ENCODING_UTF16LE' file='encoding' value='2' type='xmlCharEncoding' info='UTF-16 little endian'/>
+ <enum name='XML_CHAR_ENCODING_UTF8' file='encoding' value='1' type='xmlCharEncoding' info='UTF-8'/>
+ <enum name='XML_CHECK_ENTITY_TYPE' file='xmlerror' value='5012' type='xmlParserErrors' info='5012'/>
+ <enum name='XML_CHECK_FOUND_ATTRIBUTE' file='xmlerror' value='5001' type='xmlParserErrors' info='5001'/>
+ <enum name='XML_CHECK_FOUND_CDATA' file='xmlerror' value='5003' type='xmlParserErrors' info='5003'/>
+ <enum name='XML_CHECK_FOUND_COMMENT' file='xmlerror' value='5007' type='xmlParserErrors' info='5007'/>
+ <enum name='XML_CHECK_FOUND_DOCTYPE' file='xmlerror' value='5008' type='xmlParserErrors' info='5008'/>
+ <enum name='XML_CHECK_FOUND_ELEMENT' file='xmlerror' value='5000' type='xmlParserErrors'/>
+ <enum name='XML_CHECK_FOUND_ENTITY' file='xmlerror' value='5005' type='xmlParserErrors' info='5005'/>
+ <enum name='XML_CHECK_FOUND_ENTITYREF' file='xmlerror' value='5004' type='xmlParserErrors' info='5004'/>
+ <enum name='XML_CHECK_FOUND_FRAGMENT' file='xmlerror' value='5009' type='xmlParserErrors' info='5009'/>
+ <enum name='XML_CHECK_FOUND_NOTATION' file='xmlerror' value='5010' type='xmlParserErrors' info='5010'/>
+ <enum name='XML_CHECK_FOUND_PI' file='xmlerror' value='5006' type='xmlParserErrors' info='5006'/>
+ <enum name='XML_CHECK_FOUND_TEXT' file='xmlerror' value='5002' type='xmlParserErrors' info='5002'/>
+ <enum name='XML_CHECK_NAME_NOT_NULL' file='xmlerror' value='5037' type='xmlParserErrors' info='5037'/>
+ <enum name='XML_CHECK_NOT_ATTR' file='xmlerror' value='5023' type='xmlParserErrors' info='5023'/>
+ <enum name='XML_CHECK_NOT_ATTR_DECL' file='xmlerror' value='5024' type='xmlParserErrors' info='5024'/>
+ <enum name='XML_CHECK_NOT_DTD' file='xmlerror' value='5022' type='xmlParserErrors' info='5022'/>
+ <enum name='XML_CHECK_NOT_ELEM_DECL' file='xmlerror' value='5025' type='xmlParserErrors' info='5025'/>
+ <enum name='XML_CHECK_NOT_ENTITY_DECL' file='xmlerror' value='5026' type='xmlParserErrors' info='5026'/>
+ <enum name='XML_CHECK_NOT_NCNAME' file='xmlerror' value='5034' type='xmlParserErrors' info='5034'/>
+ <enum name='XML_CHECK_NOT_NS_DECL' file='xmlerror' value='5027' type='xmlParserErrors' info='5027'/>
+ <enum name='XML_CHECK_NOT_UTF8' file='xmlerror' value='5032' type='xmlParserErrors' info='5032'/>
+ <enum name='XML_CHECK_NO_DICT' file='xmlerror' value='5033' type='xmlParserErrors' info='5033'/>
+ <enum name='XML_CHECK_NO_DOC' file='xmlerror' value='5014' type='xmlParserErrors' info='5014'/>
+ <enum name='XML_CHECK_NO_ELEM' file='xmlerror' value='5016' type='xmlParserErrors' info='5016'/>
+ <enum name='XML_CHECK_NO_HREF' file='xmlerror' value='5028' type='xmlParserErrors' info='5028'/>
+ <enum name='XML_CHECK_NO_NAME' file='xmlerror' value='5015' type='xmlParserErrors' info='5015'/>
+ <enum name='XML_CHECK_NO_NEXT' file='xmlerror' value='5020' type='xmlParserErrors' info='5020'/>
+ <enum name='XML_CHECK_NO_PARENT' file='xmlerror' value='5013' type='xmlParserErrors' info='5013'/>
+ <enum name='XML_CHECK_NO_PREV' file='xmlerror' value='5018' type='xmlParserErrors' info='5018'/>
+ <enum name='XML_CHECK_NS_ANCESTOR' file='xmlerror' value='5031' type='xmlParserErrors' info='5031'/>
+ <enum name='XML_CHECK_NS_SCOPE' file='xmlerror' value='5030' type='xmlParserErrors' info='5030'/>
+ <enum name='XML_CHECK_OUTSIDE_DICT' file='xmlerror' value='5035' type='xmlParserErrors' info='5035'/>
+ <enum name='XML_CHECK_UNKNOWN_NODE' file='xmlerror' value='5011' type='xmlParserErrors' info='5011'/>
+ <enum name='XML_CHECK_WRONG_DOC' file='xmlerror' value='5017' type='xmlParserErrors' info='5017'/>
+ <enum name='XML_CHECK_WRONG_NAME' file='xmlerror' value='5036' type='xmlParserErrors' info='5036'/>
+ <enum name='XML_CHECK_WRONG_NEXT' file='xmlerror' value='5021' type='xmlParserErrors' info='5021'/>
+ <enum name='XML_CHECK_WRONG_PARENT' file='xmlerror' value='5029' type='xmlParserErrors' info='5029'/>
+ <enum name='XML_CHECK_WRONG_PREV' file='xmlerror' value='5019' type='xmlParserErrors' info='5019'/>
+ <enum name='XML_COMMENT_NODE' file='tree' value='8' type='xmlElementType'/>
+ <enum name='XML_DOCB_DOCUMENT_NODE' file='tree' value='21' type='xmlElementType'/>
+ <enum name='XML_DOCUMENT_FRAG_NODE' file='tree' value='11' type='xmlElementType'/>
+ <enum name='XML_DOCUMENT_NODE' file='tree' value='9' type='xmlElementType'/>
+ <enum name='XML_DOCUMENT_TYPE_NODE' file='tree' value='10' type='xmlElementType'/>
+ <enum name='XML_DOC_DTDVALID' file='tree' value='8' type='xmlDocProperties' info='DTD validation was successful'/>
+ <enum name='XML_DOC_HTML' file='tree' value='128' type='xmlDocProperties' info=' parsed or built HTML document'/>
+ <enum name='XML_DOC_INTERNAL' file='tree' value='64' type='xmlDocProperties' info='built for internal processing'/>
+ <enum name='XML_DOC_NSVALID' file='tree' value='2' type='xmlDocProperties' info='document is Namespace valid'/>
+ <enum name='XML_DOC_OLD10' file='tree' value='4' type='xmlDocProperties' info='parsed with old XML-1.0 parser'/>
+ <enum name='XML_DOC_USERBUILT' file='tree' value='32' type='xmlDocProperties' info='Document was built using the API
+and not by parsing an instance'/>
+ <enum name='XML_DOC_WELLFORMED' file='tree' value='1' type='xmlDocProperties' info='document is XML well formed'/>
+ <enum name='XML_DOC_XINCLUDE' file='tree' value='16' type='xmlDocProperties' info='XInclude substitution was done'/>
+ <enum name='XML_DTD_ATTRIBUTE_DEFAULT' file='xmlerror' value='500' type='xmlParserErrors'/>
+ <enum name='XML_DTD_ATTRIBUTE_REDEFINED' file='xmlerror' value='501' type='xmlParserErrors' info='501'/>
+ <enum name='XML_DTD_ATTRIBUTE_VALUE' file='xmlerror' value='502' type='xmlParserErrors' info='502'/>
+ <enum name='XML_DTD_CONTENT_ERROR' file='xmlerror' value='503' type='xmlParserErrors' info='503'/>
+ <enum name='XML_DTD_CONTENT_MODEL' file='xmlerror' value='504' type='xmlParserErrors' info='504'/>
+ <enum name='XML_DTD_CONTENT_NOT_DETERMINIST' file='xmlerror' value='505' type='xmlParserErrors' info='505'/>
+ <enum name='XML_DTD_DIFFERENT_PREFIX' file='xmlerror' value='506' type='xmlParserErrors' info='506'/>
+ <enum name='XML_DTD_DUP_TOKEN' file='xmlerror' value='541' type='xmlParserErrors' info='541'/>
+ <enum name='XML_DTD_ELEM_DEFAULT_NAMESPACE' file='xmlerror' value='507' type='xmlParserErrors' info='507'/>
+ <enum name='XML_DTD_ELEM_NAMESPACE' file='xmlerror' value='508' type='xmlParserErrors' info='508'/>
+ <enum name='XML_DTD_ELEM_REDEFINED' file='xmlerror' value='509' type='xmlParserErrors' info='509'/>
+ <enum name='XML_DTD_EMPTY_NOTATION' file='xmlerror' value='510' type='xmlParserErrors' info='510'/>
+ <enum name='XML_DTD_ENTITY_TYPE' file='xmlerror' value='511' type='xmlParserErrors' info='511'/>
+ <enum name='XML_DTD_ID_FIXED' file='xmlerror' value='512' type='xmlParserErrors' info='512'/>
+ <enum name='XML_DTD_ID_REDEFINED' file='xmlerror' value='513' type='xmlParserErrors' info='513'/>
+ <enum name='XML_DTD_ID_SUBSET' file='xmlerror' value='514' type='xmlParserErrors' info='514'/>
+ <enum name='XML_DTD_INVALID_CHILD' file='xmlerror' value='515' type='xmlParserErrors' info='515'/>
+ <enum name='XML_DTD_INVALID_DEFAULT' file='xmlerror' value='516' type='xmlParserErrors' info='516'/>
+ <enum name='XML_DTD_LOAD_ERROR' file='xmlerror' value='517' type='xmlParserErrors' info='517'/>
+ <enum name='XML_DTD_MISSING_ATTRIBUTE' file='xmlerror' value='518' type='xmlParserErrors' info='518'/>
+ <enum name='XML_DTD_MIXED_CORRUPT' file='xmlerror' value='519' type='xmlParserErrors' info='519'/>
+ <enum name='XML_DTD_MULTIPLE_ID' file='xmlerror' value='520' type='xmlParserErrors' info='520'/>
+ <enum name='XML_DTD_NODE' file='tree' value='14' type='xmlElementType'/>
+ <enum name='XML_DTD_NOTATION_REDEFINED' file='xmlerror' value='526' type='xmlParserErrors' info='526'/>
+ <enum name='XML_DTD_NOTATION_VALUE' file='xmlerror' value='527' type='xmlParserErrors' info='527'/>
+ <enum name='XML_DTD_NOT_EMPTY' file='xmlerror' value='528' type='xmlParserErrors' info='528'/>
+ <enum name='XML_DTD_NOT_PCDATA' file='xmlerror' value='529' type='xmlParserErrors' info='529'/>
+ <enum name='XML_DTD_NOT_STANDALONE' file='xmlerror' value='530' type='xmlParserErrors' info='530'/>
+ <enum name='XML_DTD_NO_DOC' file='xmlerror' value='521' type='xmlParserErrors' info='521'/>
+ <enum name='XML_DTD_NO_DTD' file='xmlerror' value='522' type='xmlParserErrors' info='522'/>
+ <enum name='XML_DTD_NO_ELEM_NAME' file='xmlerror' value='523' type='xmlParserErrors' info='523'/>
+ <enum name='XML_DTD_NO_PREFIX' file='xmlerror' value='524' type='xmlParserErrors' info='524'/>
+ <enum name='XML_DTD_NO_ROOT' file='xmlerror' value='525' type='xmlParserErrors' info='525'/>
+ <enum name='XML_DTD_ROOT_NAME' file='xmlerror' value='531' type='xmlParserErrors' info='531'/>
+ <enum name='XML_DTD_STANDALONE_DEFAULTED' file='xmlerror' value='538' type='xmlParserErrors' info='538'/>
+ <enum name='XML_DTD_STANDALONE_WHITE_SPACE' file='xmlerror' value='532' type='xmlParserErrors' info='532'/>
+ <enum name='XML_DTD_UNKNOWN_ATTRIBUTE' file='xmlerror' value='533' type='xmlParserErrors' info='533'/>
+ <enum name='XML_DTD_UNKNOWN_ELEM' file='xmlerror' value='534' type='xmlParserErrors' info='534'/>
+ <enum name='XML_DTD_UNKNOWN_ENTITY' file='xmlerror' value='535' type='xmlParserErrors' info='535'/>
+ <enum name='XML_DTD_UNKNOWN_ID' file='xmlerror' value='536' type='xmlParserErrors' info='536'/>
+ <enum name='XML_DTD_UNKNOWN_NOTATION' file='xmlerror' value='537' type='xmlParserErrors' info='537'/>
+ <enum name='XML_DTD_XMLID_TYPE' file='xmlerror' value='540' type='xmlParserErrors' info='540'/>
+ <enum name='XML_DTD_XMLID_VALUE' file='xmlerror' value='539' type='xmlParserErrors' info='539'/>
+ <enum name='XML_ELEMENT_CONTENT_ELEMENT' file='tree' value='2' type='xmlElementContentType'/>
+ <enum name='XML_ELEMENT_CONTENT_MULT' file='tree' value='3' type='xmlElementContentOccur'/>
+ <enum name='XML_ELEMENT_CONTENT_ONCE' file='tree' value='1' type='xmlElementContentOccur'/>
+ <enum name='XML_ELEMENT_CONTENT_OPT' file='tree' value='2' type='xmlElementContentOccur'/>
+ <enum name='XML_ELEMENT_CONTENT_OR' file='tree' value='4' type='xmlElementContentType'/>
+ <enum name='XML_ELEMENT_CONTENT_PCDATA' file='tree' value='1' type='xmlElementContentType'/>
+ <enum name='XML_ELEMENT_CONTENT_PLUS' file='tree' value='4' type='xmlElementContentOccur'/>
+ <enum name='XML_ELEMENT_CONTENT_SEQ' file='tree' value='3' type='xmlElementContentType'/>
+ <enum name='XML_ELEMENT_DECL' file='tree' value='15' type='xmlElementType'/>
+ <enum name='XML_ELEMENT_NODE' file='tree' value='1' type='xmlElementType'/>
+ <enum name='XML_ELEMENT_TYPE_ANY' file='tree' value='2' type='xmlElementTypeVal'/>
+ <enum name='XML_ELEMENT_TYPE_ELEMENT' file='tree' value='4' type='xmlElementTypeVal'/>
+ <enum name='XML_ELEMENT_TYPE_EMPTY' file='tree' value='1' type='xmlElementTypeVal'/>
+ <enum name='XML_ELEMENT_TYPE_MIXED' file='tree' value='3' type='xmlElementTypeVal'/>
+ <enum name='XML_ELEMENT_TYPE_UNDEFINED' file='tree' value='0' type='xmlElementTypeVal'/>
+ <enum name='XML_ENTITY_DECL' file='tree' value='17' type='xmlElementType'/>
+ <enum name='XML_ENTITY_NODE' file='tree' value='6' type='xmlElementType'/>
+ <enum name='XML_ENTITY_REF_NODE' file='tree' value='5' type='xmlElementType'/>
+ <enum name='XML_ERR_ATTLIST_NOT_FINISHED' file='xmlerror' value='51' type='xmlParserErrors' info='51'/>
+ <enum name='XML_ERR_ATTLIST_NOT_STARTED' file='xmlerror' value='50' type='xmlParserErrors' info='50'/>
+ <enum name='XML_ERR_ATTRIBUTE_NOT_FINISHED' file='xmlerror' value='40' type='xmlParserErrors' info='40'/>
+ <enum name='XML_ERR_ATTRIBUTE_NOT_STARTED' file='xmlerror' value='39' type='xmlParserErrors' info='39'/>
+ <enum name='XML_ERR_ATTRIBUTE_REDEFINED' file='xmlerror' value='42' type='xmlParserErrors' info='42'/>
+ <enum name='XML_ERR_ATTRIBUTE_WITHOUT_VALUE' file='xmlerror' value='41' type='xmlParserErrors' info='41'/>
+ <enum name='XML_ERR_CDATA_NOT_FINISHED' file='xmlerror' value='63' type='xmlParserErrors' info='63'/>
+ <enum name='XML_ERR_CHARREF_AT_EOF' file='xmlerror' value='10' type='xmlParserErrors' info='10'/>
+ <enum name='XML_ERR_CHARREF_IN_DTD' file='xmlerror' value='13' type='xmlParserErrors' info='13'/>
+ <enum name='XML_ERR_CHARREF_IN_EPILOG' file='xmlerror' value='12' type='xmlParserErrors' info='12'/>
+ <enum name='XML_ERR_CHARREF_IN_PROLOG' file='xmlerror' value='11' type='xmlParserErrors' info='11'/>
+ <enum name='XML_ERR_COMMENT_NOT_FINISHED' file='xmlerror' value='45' type='xmlParserErrors' info='45'/>
+ <enum name='XML_ERR_CONDSEC_INVALID' file='xmlerror' value='83' type='xmlParserErrors' info='83'/>
+ <enum name='XML_ERR_CONDSEC_INVALID_KEYWORD' file='xmlerror' value='95' type='xmlParserErrors' info='95'/>
+ <enum name='XML_ERR_CONDSEC_NOT_FINISHED' file='xmlerror' value='59' type='xmlParserErrors' info='59'/>
+ <enum name='XML_ERR_CONDSEC_NOT_STARTED' file='xmlerror' value='58' type='xmlParserErrors' info='58'/>
+ <enum name='XML_ERR_DOCTYPE_NOT_FINISHED' file='xmlerror' value='61' type='xmlParserErrors' info='61'/>
+ <enum name='XML_ERR_DOCUMENT_EMPTY' file='xmlerror' value='4' type='xmlParserErrors' info='4'/>
+ <enum name='XML_ERR_DOCUMENT_END' file='xmlerror' value='5' type='xmlParserErrors' info='5'/>
+ <enum name='XML_ERR_DOCUMENT_START' file='xmlerror' value='3' type='xmlParserErrors' info='3'/>
+ <enum name='XML_ERR_ELEMCONTENT_NOT_FINISHED' file='xmlerror' value='55' type='xmlParserErrors' info='55'/>
+ <enum name='XML_ERR_ELEMCONTENT_NOT_STARTED' file='xmlerror' value='54' type='xmlParserErrors' info='54'/>
+ <enum name='XML_ERR_ENCODING_NAME' file='xmlerror' value='79' type='xmlParserErrors' info='79'/>
+ <enum name='XML_ERR_ENTITYREF_AT_EOF' file='xmlerror' value='14' type='xmlParserErrors' info='14'/>
+ <enum name='XML_ERR_ENTITYREF_IN_DTD' file='xmlerror' value='17' type='xmlParserErrors' info='17'/>
+ <enum name='XML_ERR_ENTITYREF_IN_EPILOG' file='xmlerror' value='16' type='xmlParserErrors' info='16'/>
+ <enum name='XML_ERR_ENTITYREF_IN_PROLOG' file='xmlerror' value='15' type='xmlParserErrors' info='15'/>
+ <enum name='XML_ERR_ENTITYREF_NO_NAME' file='xmlerror' value='22' type='xmlParserErrors' info='22'/>
+ <enum name='XML_ERR_ENTITYREF_SEMICOL_MISSING' file='xmlerror' value='23' type='xmlParserErrors' info='23'/>
+ <enum name='XML_ERR_ENTITY_BOUNDARY' file='xmlerror' value='90' type='xmlParserErrors' info='90'/>
+ <enum name='XML_ERR_ENTITY_CHAR_ERROR' file='xmlerror' value='87' type='xmlParserErrors' info='87'/>
+ <enum name='XML_ERR_ENTITY_IS_EXTERNAL' file='xmlerror' value='29' type='xmlParserErrors' info='29'/>
+ <enum name='XML_ERR_ENTITY_IS_PARAMETER' file='xmlerror' value='30' type='xmlParserErrors' info='30'/>
+ <enum name='XML_ERR_ENTITY_LOOP' file='xmlerror' value='89' type='xmlParserErrors' info='89'/>
+ <enum name='XML_ERR_ENTITY_NOT_FINISHED' file='xmlerror' value='37' type='xmlParserErrors' info='37'/>
+ <enum name='XML_ERR_ENTITY_NOT_STARTED' file='xmlerror' value='36' type='xmlParserErrors' info='36'/>
+ <enum name='XML_ERR_ENTITY_PE_INTERNAL' file='xmlerror' value='88' type='xmlParserErrors' info='88'/>
+ <enum name='XML_ERR_ENTITY_PROCESSING' file='xmlerror' value='104' type='xmlParserErrors' info='104'/>
+ <enum name='XML_ERR_EQUAL_REQUIRED' file='xmlerror' value='75' type='xmlParserErrors' info='75'/>
+ <enum name='XML_ERR_ERROR' file='xmlerror' value='2' type='xmlErrorLevel' info='A recoverable error'/>
+ <enum name='XML_ERR_EXTRA_CONTENT' file='xmlerror' value='86' type='xmlParserErrors' info='86'/>
+ <enum name='XML_ERR_EXT_ENTITY_STANDALONE' file='xmlerror' value='82' type='xmlParserErrors' info='82'/>
+ <enum name='XML_ERR_EXT_SUBSET_NOT_FINISHED' file='xmlerror' value='60' type='xmlParserErrors' info='60'/>
+ <enum name='XML_ERR_FATAL' file='xmlerror' value='3' type='xmlErrorLevel' info=' A fatal error'/>
+ <enum name='XML_ERR_GT_REQUIRED' file='xmlerror' value='73' type='xmlParserErrors' info='73'/>
+ <enum name='XML_ERR_HYPHEN_IN_COMMENT' file='xmlerror' value='80' type='xmlParserErrors' info='80'/>
+ <enum name='XML_ERR_INTERNAL_ERROR' file='xmlerror' value='1' type='xmlParserErrors' info='1'/>
+ <enum name='XML_ERR_INVALID_CHAR' file='xmlerror' value='9' type='xmlParserErrors' info='9'/>
+ <enum name='XML_ERR_INVALID_CHARREF' file='xmlerror' value='8' type='xmlParserErrors' info='8'/>
+ <enum name='XML_ERR_INVALID_DEC_CHARREF' file='xmlerror' value='7' type='xmlParserErrors' info='7'/>
+ <enum name='XML_ERR_INVALID_ENCODING' file='xmlerror' value='81' type='xmlParserErrors' info='81'/>
+ <enum name='XML_ERR_INVALID_HEX_CHARREF' file='xmlerror' value='6' type='xmlParserErrors' info='6'/>
+ <enum name='XML_ERR_INVALID_URI' file='xmlerror' value='91' type='xmlParserErrors' info='91'/>
+ <enum name='XML_ERR_LITERAL_NOT_FINISHED' file='xmlerror' value='44' type='xmlParserErrors' info='44'/>
+ <enum name='XML_ERR_LITERAL_NOT_STARTED' file='xmlerror' value='43' type='xmlParserErrors' info='43'/>
+ <enum name='XML_ERR_LTSLASH_REQUIRED' file='xmlerror' value='74' type='xmlParserErrors' info='74'/>
+ <enum name='XML_ERR_LT_IN_ATTRIBUTE' file='xmlerror' value='38' type='xmlParserErrors' info='38'/>
+ <enum name='XML_ERR_LT_REQUIRED' file='xmlerror' value='72' type='xmlParserErrors' info='72'/>
+ <enum name='XML_ERR_MISPLACED_CDATA_END' file='xmlerror' value='62' type='xmlParserErrors' info='62'/>
+ <enum name='XML_ERR_MISSING_ENCODING' file='xmlerror' value='101' type='xmlParserErrors' info='101'/>
+ <enum name='XML_ERR_MIXED_NOT_FINISHED' file='xmlerror' value='53' type='xmlParserErrors' info='53'/>
+ <enum name='XML_ERR_MIXED_NOT_STARTED' file='xmlerror' value='52' type='xmlParserErrors' info='52'/>
+ <enum name='XML_ERR_NAME_REQUIRED' file='xmlerror' value='68' type='xmlParserErrors' info='68'/>
+ <enum name='XML_ERR_NAME_TOO_LONG' file='xmlerror' value='110' type='xmlParserErrors' info='110'/>
+ <enum name='XML_ERR_NMTOKEN_REQUIRED' file='xmlerror' value='67' type='xmlParserErrors' info='67'/>
+ <enum name='XML_ERR_NONE' file='xmlerror' value='0' type='xmlErrorLevel'/>
+ <enum name='XML_ERR_NOTATION_NOT_FINISHED' file='xmlerror' value='49' type='xmlParserErrors' info='49'/>
+ <enum name='XML_ERR_NOTATION_NOT_STARTED' file='xmlerror' value='48' type='xmlParserErrors' info='48'/>
+ <enum name='XML_ERR_NOTATION_PROCESSING' file='xmlerror' value='105' type='xmlParserErrors' info='105'/>
+ <enum name='XML_ERR_NOT_STANDALONE' file='xmlerror' value='103' type='xmlParserErrors' info='103'/>
+ <enum name='XML_ERR_NOT_WELL_BALANCED' file='xmlerror' value='85' type='xmlParserErrors' info='85'/>
+ <enum name='XML_ERR_NO_DTD' file='xmlerror' value='94' type='xmlParserErrors' info='94'/>
+ <enum name='XML_ERR_NO_MEMORY' file='xmlerror' value='2' type='xmlParserErrors' info='2'/>
+ <enum name='XML_ERR_NS_DECL_ERROR' file='xmlerror' value='35' type='xmlParserErrors' info='35'/>
+ <enum name='XML_ERR_OK' file='xmlerror' value='0' type='xmlParserErrors'/>
+ <enum name='XML_ERR_PCDATA_REQUIRED' file='xmlerror' value='69' type='xmlParserErrors' info='69'/>
+ <enum name='XML_ERR_PEREF_AT_EOF' file='xmlerror' value='18' type='xmlParserErrors' info='18'/>
+ <enum name='XML_ERR_PEREF_IN_EPILOG' file='xmlerror' value='20' type='xmlParserErrors' info='20'/>
+ <enum name='XML_ERR_PEREF_IN_INT_SUBSET' file='xmlerror' value='21' type='xmlParserErrors' info='21'/>
+ <enum name='XML_ERR_PEREF_IN_PROLOG' file='xmlerror' value='19' type='xmlParserErrors' info='19'/>
+ <enum name='XML_ERR_PEREF_NO_NAME' file='xmlerror' value='24' type='xmlParserErrors' info='24'/>
+ <enum name='XML_ERR_PEREF_SEMICOL_MISSING' file='xmlerror' value='25' type='xmlParserErrors' info='25'/>
+ <enum name='XML_ERR_PI_NOT_FINISHED' file='xmlerror' value='47' type='xmlParserErrors' info='47'/>
+ <enum name='XML_ERR_PI_NOT_STARTED' file='xmlerror' value='46' type='xmlParserErrors' info='46'/>
+ <enum name='XML_ERR_PUBID_REQUIRED' file='xmlerror' value='71' type='xmlParserErrors' info='71'/>
+ <enum name='XML_ERR_RESERVED_XML_NAME' file='xmlerror' value='64' type='xmlParserErrors' info='64'/>
+ <enum name='XML_ERR_SEPARATOR_REQUIRED' file='xmlerror' value='66' type='xmlParserErrors' info='66'/>
+ <enum name='XML_ERR_SPACE_REQUIRED' file='xmlerror' value='65' type='xmlParserErrors' info='65'/>
+ <enum name='XML_ERR_STANDALONE_VALUE' file='xmlerror' value='78' type='xmlParserErrors' info='78'/>
+ <enum name='XML_ERR_STRING_NOT_CLOSED' file='xmlerror' value='34' type='xmlParserErrors' info='34'/>
+ <enum name='XML_ERR_STRING_NOT_STARTED' file='xmlerror' value='33' type='xmlParserErrors' info='33'/>
+ <enum name='XML_ERR_TAG_NAME_MISMATCH' file='xmlerror' value='76' type='xmlParserErrors' info='76'/>
+ <enum name='XML_ERR_TAG_NOT_FINISHED' file='xmlerror' value='77' type='xmlParserErrors' info='77'/>
+ <enum name='XML_ERR_UNDECLARED_ENTITY' file='xmlerror' value='26' type='xmlParserErrors' info='26'/>
+ <enum name='XML_ERR_UNKNOWN_ENCODING' file='xmlerror' value='31' type='xmlParserErrors' info='31'/>
+ <enum name='XML_ERR_UNKNOWN_VERSION' file='xmlerror' value='108' type='xmlParserErrors' info='108'/>
+ <enum name='XML_ERR_UNPARSED_ENTITY' file='xmlerror' value='28' type='xmlParserErrors' info='28'/>
+ <enum name='XML_ERR_UNSUPPORTED_ENCODING' file='xmlerror' value='32' type='xmlParserErrors' info='32'/>
+ <enum name='XML_ERR_URI_FRAGMENT' file='xmlerror' value='92' type='xmlParserErrors' info='92'/>
+ <enum name='XML_ERR_URI_REQUIRED' file='xmlerror' value='70' type='xmlParserErrors' info='70'/>
+ <enum name='XML_ERR_USER_STOP' file='xmlerror' value='111' type='xmlParserErrors' info='111'/>
+ <enum name='XML_ERR_VALUE_REQUIRED' file='xmlerror' value='84' type='xmlParserErrors' info='84'/>
+ <enum name='XML_ERR_VERSION_MISMATCH' file='xmlerror' value='109' type='xmlParserErrors' info='109'/>
+ <enum name='XML_ERR_VERSION_MISSING' file='xmlerror' value='96' type='xmlParserErrors' info='96'/>
+ <enum name='XML_ERR_WARNING' file='xmlerror' value='1' type='xmlErrorLevel' info='A simple warning'/>
+ <enum name='XML_ERR_XMLDECL_NOT_FINISHED' file='xmlerror' value='57' type='xmlParserErrors' info='57'/>
+ <enum name='XML_ERR_XMLDECL_NOT_STARTED' file='xmlerror' value='56' type='xmlParserErrors' info='56'/>
+ <enum name='XML_EXP_ATOM' file='xmlregexp' value='2' type='xmlExpNodeType'/>
+ <enum name='XML_EXP_COUNT' file='xmlregexp' value='5' type='xmlExpNodeType'/>
+ <enum name='XML_EXP_EMPTY' file='xmlregexp' value='0' type='xmlExpNodeType'/>
+ <enum name='XML_EXP_FORBID' file='xmlregexp' value='1' type='xmlExpNodeType'/>
+ <enum name='XML_EXP_OR' file='xmlregexp' value='4' type='xmlExpNodeType'/>
+ <enum name='XML_EXP_SEQ' file='xmlregexp' value='3' type='xmlExpNodeType'/>
+ <enum name='XML_EXTERNAL_GENERAL_PARSED_ENTITY' file='entities' value='2' type='xmlEntityType'/>
+ <enum name='XML_EXTERNAL_GENERAL_UNPARSED_ENTITY' file='entities' value='3' type='xmlEntityType'/>
+ <enum name='XML_EXTERNAL_PARAMETER_ENTITY' file='entities' value='5' type='xmlEntityType'/>
+ <enum name='XML_FROM_BUFFER' file='xmlerror' value='29' type='xmlErrorDomain' info='The buffers module'/>
+ <enum name='XML_FROM_C14N' file='xmlerror' value='21' type='xmlErrorDomain' info='The Canonicalization module'/>
+ <enum name='XML_FROM_CATALOG' file='xmlerror' value='20' type='xmlErrorDomain' info='The Catalog module'/>
+ <enum name='XML_FROM_CHECK' file='xmlerror' value='24' type='xmlErrorDomain' info='The error checking module'/>
+ <enum name='XML_FROM_DATATYPE' file='xmlerror' value='15' type='xmlErrorDomain' info='The W3C XML Schemas Datatype module'/>
+ <enum name='XML_FROM_DTD' file='xmlerror' value='4' type='xmlErrorDomain' info='The XML DTD validation with parser contex'/>
+ <enum name='XML_FROM_FTP' file='xmlerror' value='9' type='xmlErrorDomain' info='The FTP module'/>
+ <enum name='XML_FROM_HTML' file='xmlerror' value='5' type='xmlErrorDomain' info='The HTML parser'/>
+ <enum name='XML_FROM_HTTP' file='xmlerror' value='10' type='xmlErrorDomain' info='The HTTP module'/>
+ <enum name='XML_FROM_I18N' file='xmlerror' value='27' type='xmlErrorDomain' info='The module handling character conversion'/>
+ <enum name='XML_FROM_IO' file='xmlerror' value='8' type='xmlErrorDomain' info='The Input/Output stack'/>
+ <enum name='XML_FROM_MEMORY' file='xmlerror' value='6' type='xmlErrorDomain' info='The memory allocator'/>
+ <enum name='XML_FROM_MODULE' file='xmlerror' value='26' type='xmlErrorDomain' info='The dynamically loaded module modul'/>
+ <enum name='XML_FROM_NAMESPACE' file='xmlerror' value='3' type='xmlErrorDomain' info='The XML Namespace module'/>
+ <enum name='XML_FROM_NONE' file='xmlerror' value='0' type='xmlErrorDomain'/>
+ <enum name='XML_FROM_OUTPUT' file='xmlerror' value='7' type='xmlErrorDomain' info='The serialization code'/>
+ <enum name='XML_FROM_PARSER' file='xmlerror' value='1' type='xmlErrorDomain' info='The XML parser'/>
+ <enum name='XML_FROM_REGEXP' file='xmlerror' value='14' type='xmlErrorDomain' info='The regular expressions module'/>
+ <enum name='XML_FROM_RELAXNGP' file='xmlerror' value='18' type='xmlErrorDomain' info='The Relax-NG parser module'/>
+ <enum name='XML_FROM_RELAXNGV' file='xmlerror' value='19' type='xmlErrorDomain' info='The Relax-NG validator module'/>
+ <enum name='XML_FROM_SCHEMASP' file='xmlerror' value='16' type='xmlErrorDomain' info='The W3C XML Schemas parser module'/>
+ <enum name='XML_FROM_SCHEMASV' file='xmlerror' value='17' type='xmlErrorDomain' info='The W3C XML Schemas validation module'/>
+ <enum name='XML_FROM_SCHEMATRONV' file='xmlerror' value='28' type='xmlErrorDomain' info='The Schematron validator module'/>
+ <enum name='XML_FROM_TREE' file='xmlerror' value='2' type='xmlErrorDomain' info='The tree module'/>
+ <enum name='XML_FROM_URI' file='xmlerror' value='30' type='xmlErrorDomain' info=' The URI module'/>
+ <enum name='XML_FROM_VALID' file='xmlerror' value='23' type='xmlErrorDomain' info='The XML DTD validation with valid context'/>
+ <enum name='XML_FROM_WRITER' file='xmlerror' value='25' type='xmlErrorDomain' info='The xmlwriter module'/>
+ <enum name='XML_FROM_XINCLUDE' file='xmlerror' value='11' type='xmlErrorDomain' info='The XInclude processing'/>
+ <enum name='XML_FROM_XPATH' file='xmlerror' value='12' type='xmlErrorDomain' info='The XPath module'/>
+ <enum name='XML_FROM_XPOINTER' file='xmlerror' value='13' type='xmlErrorDomain' info='The XPointer module'/>
+ <enum name='XML_FROM_XSLT' file='xmlerror' value='22' type='xmlErrorDomain' info='The XSLT engine from libxslt'/>
+ <enum name='XML_FTP_ACCNT' file='xmlerror' value='2002' type='xmlParserErrors' info='2002'/>
+ <enum name='XML_FTP_EPSV_ANSWER' file='xmlerror' value='2001' type='xmlParserErrors' info='2001'/>
+ <enum name='XML_FTP_PASV_ANSWER' file='xmlerror' value='2000' type='xmlParserErrors'/>
+ <enum name='XML_FTP_URL_SYNTAX' file='xmlerror' value='2003' type='xmlParserErrors' info='2003'/>
+ <enum name='XML_HTML_DOCUMENT_NODE' file='tree' value='13' type='xmlElementType'/>
+ <enum name='XML_HTML_STRUCURE_ERROR' file='xmlerror' value='800' type='xmlParserErrors'/>
+ <enum name='XML_HTML_UNKNOWN_TAG' file='xmlerror' value='801' type='xmlParserErrors' info='801'/>
+ <enum name='XML_HTTP_UNKNOWN_HOST' file='xmlerror' value='2022' type='xmlParserErrors' info='2022'/>
+ <enum name='XML_HTTP_URL_SYNTAX' file='xmlerror' value='2020' type='xmlParserErrors'/>
+ <enum name='XML_HTTP_USE_IP' file='xmlerror' value='2021' type='xmlParserErrors' info='2021'/>
+ <enum name='XML_I18N_CONV_FAILED' file='xmlerror' value='6003' type='xmlParserErrors' info='6003'/>
+ <enum name='XML_I18N_EXCESS_HANDLER' file='xmlerror' value='6002' type='xmlParserErrors' info='6002'/>
+ <enum name='XML_I18N_NO_HANDLER' file='xmlerror' value='6001' type='xmlParserErrors' info='6001'/>
+ <enum name='XML_I18N_NO_NAME' file='xmlerror' value='6000' type='xmlParserErrors'/>
+ <enum name='XML_I18N_NO_OUTPUT' file='xmlerror' value='6004' type='xmlParserErrors' info='6004'/>
+ <enum name='XML_INTERNAL_GENERAL_ENTITY' file='entities' value='1' type='xmlEntityType'/>
+ <enum name='XML_INTERNAL_PARAMETER_ENTITY' file='entities' value='4' type='xmlEntityType'/>
+ <enum name='XML_INTERNAL_PREDEFINED_ENTITY' file='entities' value='6' type='xmlEntityType'/>
+ <enum name='XML_IO_BUFFER_FULL' file='xmlerror' value='1548' type='xmlParserErrors' info='1548'/>
+ <enum name='XML_IO_EACCES' file='xmlerror' value='1501' type='xmlParserErrors' info='1501'/>
+ <enum name='XML_IO_EADDRINUSE' file='xmlerror' value='1554' type='xmlParserErrors' info='1554'/>
+ <enum name='XML_IO_EAFNOSUPPORT' file='xmlerror' value='1556' type='xmlParserErrors' info='1556'/>
+ <enum name='XML_IO_EAGAIN' file='xmlerror' value='1502' type='xmlParserErrors' info='1502'/>
+ <enum name='XML_IO_EALREADY' file='xmlerror' value='1555' type='xmlParserErrors' info='1555'/>
+ <enum name='XML_IO_EBADF' file='xmlerror' value='1503' type='xmlParserErrors' info='1503'/>
+ <enum name='XML_IO_EBADMSG' file='xmlerror' value='1504' type='xmlParserErrors' info='1504'/>
+ <enum name='XML_IO_EBUSY' file='xmlerror' value='1505' type='xmlParserErrors' info='1505'/>
+ <enum name='XML_IO_ECANCELED' file='xmlerror' value='1506' type='xmlParserErrors' info='1506'/>
+ <enum name='XML_IO_ECHILD' file='xmlerror' value='1507' type='xmlParserErrors' info='1507'/>
+ <enum name='XML_IO_ECONNREFUSED' file='xmlerror' value='1552' type='xmlParserErrors' info='1552'/>
+ <enum name='XML_IO_EDEADLK' file='xmlerror' value='1508' type='xmlParserErrors' info='1508'/>
+ <enum name='XML_IO_EDOM' file='xmlerror' value='1509' type='xmlParserErrors' info='1509'/>
+ <enum name='XML_IO_EEXIST' file='xmlerror' value='1510' type='xmlParserErrors' info='1510'/>
+ <enum name='XML_IO_EFAULT' file='xmlerror' value='1511' type='xmlParserErrors' info='1511'/>
+ <enum name='XML_IO_EFBIG' file='xmlerror' value='1512' type='xmlParserErrors' info='1512'/>
+ <enum name='XML_IO_EINPROGRESS' file='xmlerror' value='1513' type='xmlParserErrors' info='1513'/>
+ <enum name='XML_IO_EINTR' file='xmlerror' value='1514' type='xmlParserErrors' info='1514'/>
+ <enum name='XML_IO_EINVAL' file='xmlerror' value='1515' type='xmlParserErrors' info='1515'/>
+ <enum name='XML_IO_EIO' file='xmlerror' value='1516' type='xmlParserErrors' info='1516'/>
+ <enum name='XML_IO_EISCONN' file='xmlerror' value='1551' type='xmlParserErrors' info='1551'/>
+ <enum name='XML_IO_EISDIR' file='xmlerror' value='1517' type='xmlParserErrors' info='1517'/>
+ <enum name='XML_IO_EMFILE' file='xmlerror' value='1518' type='xmlParserErrors' info='1518'/>
+ <enum name='XML_IO_EMLINK' file='xmlerror' value='1519' type='xmlParserErrors' info='1519'/>
+ <enum name='XML_IO_EMSGSIZE' file='xmlerror' value='1520' type='xmlParserErrors' info='1520'/>
+ <enum name='XML_IO_ENAMETOOLONG' file='xmlerror' value='1521' type='xmlParserErrors' info='1521'/>
+ <enum name='XML_IO_ENCODER' file='xmlerror' value='1544' type='xmlParserErrors' info='1544'/>
+ <enum name='XML_IO_ENETUNREACH' file='xmlerror' value='1553' type='xmlParserErrors' info='1553'/>
+ <enum name='XML_IO_ENFILE' file='xmlerror' value='1522' type='xmlParserErrors' info='1522'/>
+ <enum name='XML_IO_ENODEV' file='xmlerror' value='1523' type='xmlParserErrors' info='1523'/>
+ <enum name='XML_IO_ENOENT' file='xmlerror' value='1524' type='xmlParserErrors' info='1524'/>
+ <enum name='XML_IO_ENOEXEC' file='xmlerror' value='1525' type='xmlParserErrors' info='1525'/>
+ <enum name='XML_IO_ENOLCK' file='xmlerror' value='1526' type='xmlParserErrors' info='1526'/>
+ <enum name='XML_IO_ENOMEM' file='xmlerror' value='1527' type='xmlParserErrors' info='1527'/>
+ <enum name='XML_IO_ENOSPC' file='xmlerror' value='1528' type='xmlParserErrors' info='1528'/>
+ <enum name='XML_IO_ENOSYS' file='xmlerror' value='1529' type='xmlParserErrors' info='1529'/>
+ <enum name='XML_IO_ENOTDIR' file='xmlerror' value='1530' type='xmlParserErrors' info='1530'/>
+ <enum name='XML_IO_ENOTEMPTY' file='xmlerror' value='1531' type='xmlParserErrors' info='1531'/>
+ <enum name='XML_IO_ENOTSOCK' file='xmlerror' value='1550' type='xmlParserErrors' info='1550'/>
+ <enum name='XML_IO_ENOTSUP' file='xmlerror' value='1532' type='xmlParserErrors' info='1532'/>
+ <enum name='XML_IO_ENOTTY' file='xmlerror' value='1533' type='xmlParserErrors' info='1533'/>
+ <enum name='XML_IO_ENXIO' file='xmlerror' value='1534' type='xmlParserErrors' info='1534'/>
+ <enum name='XML_IO_EPERM' file='xmlerror' value='1535' type='xmlParserErrors' info='1535'/>
+ <enum name='XML_IO_EPIPE' file='xmlerror' value='1536' type='xmlParserErrors' info='1536'/>
+ <enum name='XML_IO_ERANGE' file='xmlerror' value='1537' type='xmlParserErrors' info='1537'/>
+ <enum name='XML_IO_EROFS' file='xmlerror' value='1538' type='xmlParserErrors' info='1538'/>
+ <enum name='XML_IO_ESPIPE' file='xmlerror' value='1539' type='xmlParserErrors' info='1539'/>
+ <enum name='XML_IO_ESRCH' file='xmlerror' value='1540' type='xmlParserErrors' info='1540'/>
+ <enum name='XML_IO_ETIMEDOUT' file='xmlerror' value='1541' type='xmlParserErrors' info='1541'/>
+ <enum name='XML_IO_EXDEV' file='xmlerror' value='1542' type='xmlParserErrors' info='1542'/>
+ <enum name='XML_IO_FLUSH' file='xmlerror' value='1545' type='xmlParserErrors' info='1545'/>
+ <enum name='XML_IO_LOAD_ERROR' file='xmlerror' value='1549' type='xmlParserErrors' info='1549'/>
+ <enum name='XML_IO_NETWORK_ATTEMPT' file='xmlerror' value='1543' type='xmlParserErrors' info='1543'/>
+ <enum name='XML_IO_NO_INPUT' file='xmlerror' value='1547' type='xmlParserErrors' info='1547'/>
+ <enum name='XML_IO_UNKNOWN' file='xmlerror' value='1500' type='xmlParserErrors'/>
+ <enum name='XML_IO_WRITE' file='xmlerror' value='1546' type='xmlParserErrors' info='1546'/>
+ <enum name='XML_MODULE_CLOSE' file='xmlerror' value='4901' type='xmlParserErrors' info='4901'/>
+ <enum name='XML_MODULE_LAZY' file='xmlmodule' value='1' type='xmlModuleOption' info='lazy binding'/>
+ <enum name='XML_MODULE_LOCAL' file='xmlmodule' value='2' type='xmlModuleOption' info=' local binding'/>
+ <enum name='XML_MODULE_OPEN' file='xmlerror' value='4900' type='xmlParserErrors' info='4900'/>
+ <enum name='XML_NAMESPACE_DECL' file='tree' value='18' type='xmlElementType'/>
+ <enum name='XML_NOTATION_NODE' file='tree' value='12' type='xmlElementType'/>
+ <enum name='XML_NS_ERR_ATTRIBUTE_REDEFINED' file='xmlerror' value='203' type='xmlParserErrors' info='203'/>
+ <enum name='XML_NS_ERR_COLON' file='xmlerror' value='205' type='xmlParserErrors' info='205'/>
+ <enum name='XML_NS_ERR_EMPTY' file='xmlerror' value='204' type='xmlParserErrors' info='204'/>
+ <enum name='XML_NS_ERR_QNAME' file='xmlerror' value='202' type='xmlParserErrors' info='202'/>
+ <enum name='XML_NS_ERR_UNDEFINED_NAMESPACE' file='xmlerror' value='201' type='xmlParserErrors' info='201'/>
+ <enum name='XML_NS_ERR_XML_NAMESPACE' file='xmlerror' value='200' type='xmlParserErrors'/>
+ <enum name='XML_PARSER_ATTRIBUTE_VALUE' file='parser' value='12' type='xmlParserInputState' info='within an attribute value'/>
+ <enum name='XML_PARSER_CDATA_SECTION' file='parser' value='8' type='xmlParserInputState' info='within a CDATA section'/>
+ <enum name='XML_PARSER_COMMENT' file='parser' value='5' type='xmlParserInputState' info='within a comment'/>
+ <enum name='XML_PARSER_CONTENT' file='parser' value='7' type='xmlParserInputState' info='within the content'/>
+ <enum name='XML_PARSER_DEFAULTATTRS' file='xmlreader' value='2' type='xmlParserProperties'/>
+ <enum name='XML_PARSER_DTD' file='parser' value='3' type='xmlParserInputState' info='within some DTD content'/>
+ <enum name='XML_PARSER_END_TAG' file='parser' value='9' type='xmlParserInputState' info='within a closing tag'/>
+ <enum name='XML_PARSER_ENTITY_DECL' file='parser' value='10' type='xmlParserInputState' info='within an entity declaration'/>
+ <enum name='XML_PARSER_ENTITY_VALUE' file='parser' value='11' type='xmlParserInputState' info='within an entity value in a decl'/>
+ <enum name='XML_PARSER_EOF' file='parser' value='-1' type='xmlParserInputState' info='nothing is to be parsed'/>
+ <enum name='XML_PARSER_EPILOG' file='parser' value='14' type='xmlParserInputState' info='the Misc* after the last end tag'/>
+ <enum name='XML_PARSER_IGNORE' file='parser' value='15' type='xmlParserInputState' info='within an IGNORED section'/>
+ <enum name='XML_PARSER_LOADDTD' file='xmlreader' value='1' type='xmlParserProperties'/>
+ <enum name='XML_PARSER_MISC' file='parser' value='1' type='xmlParserInputState' info='Misc* before int subset'/>
+ <enum name='XML_PARSER_PI' file='parser' value='2' type='xmlParserInputState' info='Within a processing instruction'/>
+ <enum name='XML_PARSER_PROLOG' file='parser' value='4' type='xmlParserInputState' info='Misc* after internal subset'/>
+ <enum name='XML_PARSER_PUBLIC_LITERAL' file='parser' value='16' type='xmlParserInputState' info=' within a PUBLIC value'/>
+ <enum name='XML_PARSER_SEVERITY_ERROR' file='xmlreader' value='4' type='xmlParserSeverities'/>
+ <enum name='XML_PARSER_SEVERITY_VALIDITY_ERROR' file='xmlreader' value='2' type='xmlParserSeverities'/>
+ <enum name='XML_PARSER_SEVERITY_VALIDITY_WARNING' file='xmlreader' value='1' type='xmlParserSeverities'/>
+ <enum name='XML_PARSER_SEVERITY_WARNING' file='xmlreader' value='3' type='xmlParserSeverities'/>
+ <enum name='XML_PARSER_START' file='parser' value='0' type='xmlParserInputState' info='nothing has been parsed'/>
+ <enum name='XML_PARSER_START_TAG' file='parser' value='6' type='xmlParserInputState' info='within a start tag'/>
+ <enum name='XML_PARSER_SUBST_ENTITIES' file='xmlreader' value='4' type='xmlParserProperties'/>
+ <enum name='XML_PARSER_SYSTEM_LITERAL' file='parser' value='13' type='xmlParserInputState' info='within a SYSTEM value'/>
+ <enum name='XML_PARSER_VALIDATE' file='xmlreader' value='3' type='xmlParserProperties'/>
+ <enum name='XML_PARSE_BIG_LINES' file='parser' value='4194304' type='xmlParserOption' info=' Store big lines numbers in text PSVI field'/>
+ <enum name='XML_PARSE_COMPACT' file='parser' value='65536' type='xmlParserOption' info='compact small text nodes; no modification of
+the tree allowed afterwards (will possibly
+crash if you try to modify the tree)'/>
+ <enum name='XML_PARSE_DOM' file='parser' value='1' type='xmlParserMode'/>
+ <enum name='XML_PARSE_DTDATTR' file='parser' value='8' type='xmlParserOption' info='default DTD attributes'/>
+ <enum name='XML_PARSE_DTDLOAD' file='parser' value='4' type='xmlParserOption' info='load the external subset'/>
+ <enum name='XML_PARSE_DTDVALID' file='parser' value='16' type='xmlParserOption' info='validate with the DTD'/>
+ <enum name='XML_PARSE_HUGE' file='parser' value='524288' type='xmlParserOption' info='relax any hardcoded limit from the parser'/>
+ <enum name='XML_PARSE_IGNORE_ENC' file='parser' value='2097152' type='xmlParserOption' info='ignore internal document encoding hint'/>
+ <enum name='XML_PARSE_NOBASEFIX' file='parser' value='262144' type='xmlParserOption' info='do not fixup XINCLUDE xml:base uris'/>
+ <enum name='XML_PARSE_NOBLANKS' file='parser' value='256' type='xmlParserOption' info='remove blank nodes'/>
+ <enum name='XML_PARSE_NOCDATA' file='parser' value='16384' type='xmlParserOption' info='merge CDATA as text nodes'/>
+ <enum name='XML_PARSE_NODICT' file='parser' value='4096' type='xmlParserOption' info='Do not reuse the context dictionnary'/>
+ <enum name='XML_PARSE_NOENT' file='parser' value='2' type='xmlParserOption' info='substitute entities'/>
+ <enum name='XML_PARSE_NOERROR' file='parser' value='32' type='xmlParserOption' info='suppress error reports'/>
+ <enum name='XML_PARSE_NONET' file='parser' value='2048' type='xmlParserOption' info='Forbid network access'/>
+ <enum name='XML_PARSE_NOWARNING' file='parser' value='64' type='xmlParserOption' info='suppress warning reports'/>
+ <enum name='XML_PARSE_NOXINCNODE' file='parser' value='32768' type='xmlParserOption' info='do not generate XINCLUDE START/END nodes'/>
+ <enum name='XML_PARSE_NSCLEAN' file='parser' value='8192' type='xmlParserOption' info='remove redundant namespaces declarations'/>
+ <enum name='XML_PARSE_OLD10' file='parser' value='131072' type='xmlParserOption' info='parse using XML-1.0 before update 5'/>
+ <enum name='XML_PARSE_OLDSAX' file='parser' value='1048576' type='xmlParserOption' info='parse using SAX2 interface before 2.7.0'/>
+ <enum name='XML_PARSE_PEDANTIC' file='parser' value='128' type='xmlParserOption' info='pedantic error reporting'/>
+ <enum name='XML_PARSE_PUSH_DOM' file='parser' value='3' type='xmlParserMode'/>
+ <enum name='XML_PARSE_PUSH_SAX' file='parser' value='4' type='xmlParserMode'/>
+ <enum name='XML_PARSE_READER' file='parser' value='5' type='xmlParserMode'/>
+ <enum name='XML_PARSE_RECOVER' file='parser' value='1' type='xmlParserOption' info='recover on errors'/>
+ <enum name='XML_PARSE_SAX' file='parser' value='2' type='xmlParserMode'/>
+ <enum name='XML_PARSE_SAX1' file='parser' value='512' type='xmlParserOption' info='use the SAX1 interface internally'/>
+ <enum name='XML_PARSE_UNKNOWN' file='parser' value='0' type='xmlParserMode'/>
+ <enum name='XML_PARSE_XINCLUDE' file='parser' value='1024' type='xmlParserOption' info='Implement XInclude substitition'/>
+ <enum name='XML_PATTERN_DEFAULT' file='pattern' value='0' type='xmlPatternFlags' info='simple pattern match'/>
+ <enum name='XML_PATTERN_XPATH' file='pattern' value='1' type='xmlPatternFlags' info='standard XPath pattern'/>
+ <enum name='XML_PATTERN_XSFIELD' file='pattern' value='4' type='xmlPatternFlags' info=' XPath subset for schema field'/>
+ <enum name='XML_PATTERN_XSSEL' file='pattern' value='2' type='xmlPatternFlags' info='XPath subset for schema selector'/>
+ <enum name='XML_PI_NODE' file='tree' value='7' type='xmlElementType'/>
+ <enum name='XML_READER_TYPE_ATTRIBUTE' file='xmlreader' value='2' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_CDATA' file='xmlreader' value='4' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_COMMENT' file='xmlreader' value='8' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_DOCUMENT' file='xmlreader' value='9' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_DOCUMENT_FRAGMENT' file='xmlreader' value='11' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_DOCUMENT_TYPE' file='xmlreader' value='10' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_ELEMENT' file='xmlreader' value='1' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_END_ELEMENT' file='xmlreader' value='15' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_END_ENTITY' file='xmlreader' value='16' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_ENTITY' file='xmlreader' value='6' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_ENTITY_REFERENCE' file='xmlreader' value='5' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_NONE' file='xmlreader' value='0' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_NOTATION' file='xmlreader' value='12' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_PROCESSING_INSTRUCTION' file='xmlreader' value='7' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_SIGNIFICANT_WHITESPACE' file='xmlreader' value='14' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_TEXT' file='xmlreader' value='3' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_WHITESPACE' file='xmlreader' value='13' type='xmlReaderTypes'/>
+ <enum name='XML_READER_TYPE_XML_DECLARATION' file='xmlreader' value='17' type='xmlReaderTypes'/>
+ <enum name='XML_REGEXP_COMPILE_ERROR' file='xmlerror' value='1450' type='xmlParserErrors'/>
+ <enum name='XML_RELAXNGP_CRNG' file='relaxng' value='2' type='xmlRelaxNGParserFlag'/>
+ <enum name='XML_RELAXNGP_FREE_DOC' file='relaxng' value='1' type='xmlRelaxNGParserFlag'/>
+ <enum name='XML_RELAXNGP_NONE' file='relaxng' value='0' type='xmlRelaxNGParserFlag'/>
+ <enum name='XML_RELAXNG_ERR_ATTREXTRANS' file='relaxng' value='20' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ATTRNAME' file='relaxng' value='14' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ATTRNONS' file='relaxng' value='16' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ATTRVALID' file='relaxng' value='24' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ATTRWRONGNS' file='relaxng' value='18' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_CONTENTVALID' file='relaxng' value='25' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_DATAELEM' file='relaxng' value='28' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_DATATYPE' file='relaxng' value='31' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_DUPID' file='relaxng' value='4' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMEXTRANS' file='relaxng' value='19' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMNAME' file='relaxng' value='13' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMNONS' file='relaxng' value='15' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMNOTEMPTY' file='relaxng' value='21' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMWRONG' file='relaxng' value='38' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_ELEMWRONGNS' file='relaxng' value='17' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_EXTRACONTENT' file='relaxng' value='26' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_EXTRADATA' file='relaxng' value='35' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_INTEREXTRA' file='relaxng' value='12' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_INTERNAL' file='relaxng' value='37' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_INTERNODATA' file='relaxng' value='10' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_INTERSEQ' file='relaxng' value='11' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_INVALIDATTR' file='relaxng' value='27' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_LACKDATA' file='relaxng' value='36' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_LIST' file='relaxng' value='33' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_LISTELEM' file='relaxng' value='30' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_LISTEMPTY' file='relaxng' value='9' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_LISTEXTRA' file='relaxng' value='8' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_MEMORY' file='relaxng' value='1' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_NODEFINE' file='relaxng' value='7' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_NOELEM' file='relaxng' value='22' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_NOGRAMMAR' file='relaxng' value='34' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_NOSTATE' file='relaxng' value='6' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_NOTELEM' file='relaxng' value='23' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_TEXTWRONG' file='relaxng' value='39' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_TYPE' file='relaxng' value='2' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_TYPECMP' file='relaxng' value='5' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_TYPEVAL' file='relaxng' value='3' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_VALELEM' file='relaxng' value='29' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_ERR_VALUE' file='relaxng' value='32' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RELAXNG_OK' file='relaxng' value='0' type='xmlRelaxNGValidErr'/>
+ <enum name='XML_RNGP_ANYNAME_ATTR_ANCESTOR' file='xmlerror' value='1000' type='xmlParserErrors'/>
+ <enum name='XML_RNGP_ATTRIBUTE_CHILDREN' file='xmlerror' value='1002' type='xmlParserErrors' info='1002'/>
+ <enum name='XML_RNGP_ATTRIBUTE_CONTENT' file='xmlerror' value='1003' type='xmlParserErrors' info='1003'/>
+ <enum name='XML_RNGP_ATTRIBUTE_EMPTY' file='xmlerror' value='1004' type='xmlParserErrors' info='1004'/>
+ <enum name='XML_RNGP_ATTRIBUTE_NOOP' file='xmlerror' value='1005' type='xmlParserErrors' info='1005'/>
+ <enum name='XML_RNGP_ATTR_CONFLICT' file='xmlerror' value='1001' type='xmlParserErrors' info='1001'/>
+ <enum name='XML_RNGP_CHOICE_CONTENT' file='xmlerror' value='1006' type='xmlParserErrors' info='1006'/>
+ <enum name='XML_RNGP_CHOICE_EMPTY' file='xmlerror' value='1007' type='xmlParserErrors' info='1007'/>
+ <enum name='XML_RNGP_CREATE_FAILURE' file='xmlerror' value='1008' type='xmlParserErrors' info='1008'/>
+ <enum name='XML_RNGP_DATA_CONTENT' file='xmlerror' value='1009' type='xmlParserErrors' info='1009'/>
+ <enum name='XML_RNGP_DEFINE_CREATE_FAILED' file='xmlerror' value='1011' type='xmlParserErrors' info='1011'/>
+ <enum name='XML_RNGP_DEFINE_EMPTY' file='xmlerror' value='1012' type='xmlParserErrors' info='1012'/>
+ <enum name='XML_RNGP_DEFINE_MISSING' file='xmlerror' value='1013' type='xmlParserErrors' info='1013'/>
+ <enum name='XML_RNGP_DEFINE_NAME_MISSING' file='xmlerror' value='1014' type='xmlParserErrors' info='1014'/>
+ <enum name='XML_RNGP_DEF_CHOICE_AND_INTERLEAVE' file='xmlerror' value='1010' type='xmlParserErrors' info='1010'/>
+ <enum name='XML_RNGP_ELEMENT_CONTENT' file='xmlerror' value='1018' type='xmlParserErrors' info='1018'/>
+ <enum name='XML_RNGP_ELEMENT_EMPTY' file='xmlerror' value='1017' type='xmlParserErrors' info='1017'/>
+ <enum name='XML_RNGP_ELEMENT_NAME' file='xmlerror' value='1019' type='xmlParserErrors' info='1019'/>
+ <enum name='XML_RNGP_ELEMENT_NO_CONTENT' file='xmlerror' value='1020' type='xmlParserErrors' info='1020'/>
+ <enum name='XML_RNGP_ELEM_CONTENT_EMPTY' file='xmlerror' value='1015' type='xmlParserErrors' info='1015'/>
+ <enum name='XML_RNGP_ELEM_CONTENT_ERROR' file='xmlerror' value='1016' type='xmlParserErrors' info='1016'/>
+ <enum name='XML_RNGP_ELEM_TEXT_CONFLICT' file='xmlerror' value='1021' type='xmlParserErrors' info='1021'/>
+ <enum name='XML_RNGP_EMPTY' file='xmlerror' value='1022' type='xmlParserErrors' info='1022'/>
+ <enum name='XML_RNGP_EMPTY_CONSTRUCT' file='xmlerror' value='1023' type='xmlParserErrors' info='1023'/>
+ <enum name='XML_RNGP_EMPTY_CONTENT' file='xmlerror' value='1024' type='xmlParserErrors' info='1024'/>
+ <enum name='XML_RNGP_EMPTY_NOT_EMPTY' file='xmlerror' value='1025' type='xmlParserErrors' info='1025'/>
+ <enum name='XML_RNGP_ERROR_TYPE_LIB' file='xmlerror' value='1026' type='xmlParserErrors' info='1026'/>
+ <enum name='XML_RNGP_EXCEPT_EMPTY' file='xmlerror' value='1027' type='xmlParserErrors' info='1027'/>
+ <enum name='XML_RNGP_EXCEPT_MISSING' file='xmlerror' value='1028' type='xmlParserErrors' info='1028'/>
+ <enum name='XML_RNGP_EXCEPT_MULTIPLE' file='xmlerror' value='1029' type='xmlParserErrors' info='1029'/>
+ <enum name='XML_RNGP_EXCEPT_NO_CONTENT' file='xmlerror' value='1030' type='xmlParserErrors' info='1030'/>
+ <enum name='XML_RNGP_EXTERNALREF_EMTPY' file='xmlerror' value='1031' type='xmlParserErrors' info='1031'/>
+ <enum name='XML_RNGP_EXTERNALREF_RECURSE' file='xmlerror' value='1033' type='xmlParserErrors' info='1033'/>
+ <enum name='XML_RNGP_EXTERNAL_REF_FAILURE' file='xmlerror' value='1032' type='xmlParserErrors' info='1032'/>
+ <enum name='XML_RNGP_FORBIDDEN_ATTRIBUTE' file='xmlerror' value='1034' type='xmlParserErrors' info='1034'/>
+ <enum name='XML_RNGP_FOREIGN_ELEMENT' file='xmlerror' value='1035' type='xmlParserErrors' info='1035'/>
+ <enum name='XML_RNGP_GRAMMAR_CONTENT' file='xmlerror' value='1036' type='xmlParserErrors' info='1036'/>
+ <enum name='XML_RNGP_GRAMMAR_EMPTY' file='xmlerror' value='1037' type='xmlParserErrors' info='1037'/>
+ <enum name='XML_RNGP_GRAMMAR_MISSING' file='xmlerror' value='1038' type='xmlParserErrors' info='1038'/>
+ <enum name='XML_RNGP_GRAMMAR_NO_START' file='xmlerror' value='1039' type='xmlParserErrors' info='1039'/>
+ <enum name='XML_RNGP_GROUP_ATTR_CONFLICT' file='xmlerror' value='1040' type='xmlParserErrors' info='1040'/>
+ <enum name='XML_RNGP_HREF_ERROR' file='xmlerror' value='1041' type='xmlParserErrors' info='1041'/>
+ <enum name='XML_RNGP_INCLUDE_EMPTY' file='xmlerror' value='1042' type='xmlParserErrors' info='1042'/>
+ <enum name='XML_RNGP_INCLUDE_FAILURE' file='xmlerror' value='1043' type='xmlParserErrors' info='1043'/>
+ <enum name='XML_RNGP_INCLUDE_RECURSE' file='xmlerror' value='1044' type='xmlParserErrors' info='1044'/>
+ <enum name='XML_RNGP_INTERLEAVE_ADD' file='xmlerror' value='1045' type='xmlParserErrors' info='1045'/>
+ <enum name='XML_RNGP_INTERLEAVE_CREATE_FAILED' file='xmlerror' value='1046' type='xmlParserErrors' info='1046'/>
+ <enum name='XML_RNGP_INTERLEAVE_EMPTY' file='xmlerror' value='1047' type='xmlParserErrors' info='1047'/>
+ <enum name='XML_RNGP_INTERLEAVE_NO_CONTENT' file='xmlerror' value='1048' type='xmlParserErrors' info='1048'/>
+ <enum name='XML_RNGP_INVALID_DEFINE_NAME' file='xmlerror' value='1049' type='xmlParserErrors' info='1049'/>
+ <enum name='XML_RNGP_INVALID_URI' file='xmlerror' value='1050' type='xmlParserErrors' info='1050'/>
+ <enum name='XML_RNGP_INVALID_VALUE' file='xmlerror' value='1051' type='xmlParserErrors' info='1051'/>
+ <enum name='XML_RNGP_MISSING_HREF' file='xmlerror' value='1052' type='xmlParserErrors' info='1052'/>
+ <enum name='XML_RNGP_NAME_MISSING' file='xmlerror' value='1053' type='xmlParserErrors' info='1053'/>
+ <enum name='XML_RNGP_NEED_COMBINE' file='xmlerror' value='1054' type='xmlParserErrors' info='1054'/>
+ <enum name='XML_RNGP_NOTALLOWED_NOT_EMPTY' file='xmlerror' value='1055' type='xmlParserErrors' info='1055'/>
+ <enum name='XML_RNGP_NSNAME_ATTR_ANCESTOR' file='xmlerror' value='1056' type='xmlParserErrors' info='1056'/>
+ <enum name='XML_RNGP_NSNAME_NO_NS' file='xmlerror' value='1057' type='xmlParserErrors' info='1057'/>
+ <enum name='XML_RNGP_PARAM_FORBIDDEN' file='xmlerror' value='1058' type='xmlParserErrors' info='1058'/>
+ <enum name='XML_RNGP_PARAM_NAME_MISSING' file='xmlerror' value='1059' type='xmlParserErrors' info='1059'/>
+ <enum name='XML_RNGP_PARENTREF_CREATE_FAILED' file='xmlerror' value='1060' type='xmlParserErrors' info='1060'/>
+ <enum name='XML_RNGP_PARENTREF_NAME_INVALID' file='xmlerror' value='1061' type='xmlParserErrors' info='1061'/>
+ <enum name='XML_RNGP_PARENTREF_NOT_EMPTY' file='xmlerror' value='1064' type='xmlParserErrors' info='1064'/>
+ <enum name='XML_RNGP_PARENTREF_NO_NAME' file='xmlerror' value='1062' type='xmlParserErrors' info='1062'/>
+ <enum name='XML_RNGP_PARENTREF_NO_PARENT' file='xmlerror' value='1063' type='xmlParserErrors' info='1063'/>
+ <enum name='XML_RNGP_PARSE_ERROR' file='xmlerror' value='1065' type='xmlParserErrors' info='1065'/>
+ <enum name='XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME' file='xmlerror' value='1066' type='xmlParserErrors' info='1066'/>
+ <enum name='XML_RNGP_PAT_ATTR_ATTR' file='xmlerror' value='1067' type='xmlParserErrors' info='1067'/>
+ <enum name='XML_RNGP_PAT_ATTR_ELEM' file='xmlerror' value='1068' type='xmlParserErrors' info='1068'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_ATTR' file='xmlerror' value='1069' type='xmlParserErrors' info='1069'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_ELEM' file='xmlerror' value='1070' type='xmlParserErrors' info='1070'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_EMPTY' file='xmlerror' value='1071' type='xmlParserErrors' info='1071'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_GROUP' file='xmlerror' value='1072' type='xmlParserErrors' info='1072'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE' file='xmlerror' value='1073' type='xmlParserErrors' info='1073'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_LIST' file='xmlerror' value='1074' type='xmlParserErrors' info='1074'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_ONEMORE' file='xmlerror' value='1075' type='xmlParserErrors' info='1075'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_REF' file='xmlerror' value='1076' type='xmlParserErrors' info='1076'/>
+ <enum name='XML_RNGP_PAT_DATA_EXCEPT_TEXT' file='xmlerror' value='1077' type='xmlParserErrors' info='1077'/>
+ <enum name='XML_RNGP_PAT_LIST_ATTR' file='xmlerror' value='1078' type='xmlParserErrors' info='1078'/>
+ <enum name='XML_RNGP_PAT_LIST_ELEM' file='xmlerror' value='1079' type='xmlParserErrors' info='1079'/>
+ <enum name='XML_RNGP_PAT_LIST_INTERLEAVE' file='xmlerror' value='1080' type='xmlParserErrors' info='1080'/>
+ <enum name='XML_RNGP_PAT_LIST_LIST' file='xmlerror' value='1081' type='xmlParserErrors' info='1081'/>
+ <enum name='XML_RNGP_PAT_LIST_REF' file='xmlerror' value='1082' type='xmlParserErrors' info='1082'/>
+ <enum name='XML_RNGP_PAT_LIST_TEXT' file='xmlerror' value='1083' type='xmlParserErrors' info='1083'/>
+ <enum name='XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME' file='xmlerror' value='1084' type='xmlParserErrors' info='1084'/>
+ <enum name='XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME' file='xmlerror' value='1085' type='xmlParserErrors' info='1085'/>
+ <enum name='XML_RNGP_PAT_ONEMORE_GROUP_ATTR' file='xmlerror' value='1086' type='xmlParserErrors' info='1086'/>
+ <enum name='XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR' file='xmlerror' value='1087' type='xmlParserErrors' info='1087'/>
+ <enum name='XML_RNGP_PAT_START_ATTR' file='xmlerror' value='1088' type='xmlParserErrors' info='1088'/>
+ <enum name='XML_RNGP_PAT_START_DATA' file='xmlerror' value='1089' type='xmlParserErrors' info='1089'/>
+ <enum name='XML_RNGP_PAT_START_EMPTY' file='xmlerror' value='1090' type='xmlParserErrors' info='1090'/>
+ <enum name='XML_RNGP_PAT_START_GROUP' file='xmlerror' value='1091' type='xmlParserErrors' info='1091'/>
+ <enum name='XML_RNGP_PAT_START_INTERLEAVE' file='xmlerror' value='1092' type='xmlParserErrors' info='1092'/>
+ <enum name='XML_RNGP_PAT_START_LIST' file='xmlerror' value='1093' type='xmlParserErrors' info='1093'/>
+ <enum name='XML_RNGP_PAT_START_ONEMORE' file='xmlerror' value='1094' type='xmlParserErrors' info='1094'/>
+ <enum name='XML_RNGP_PAT_START_TEXT' file='xmlerror' value='1095' type='xmlParserErrors' info='1095'/>
+ <enum name='XML_RNGP_PAT_START_VALUE' file='xmlerror' value='1096' type='xmlParserErrors' info='1096'/>
+ <enum name='XML_RNGP_PREFIX_UNDEFINED' file='xmlerror' value='1097' type='xmlParserErrors' info='1097'/>
+ <enum name='XML_RNGP_REF_CREATE_FAILED' file='xmlerror' value='1098' type='xmlParserErrors' info='1098'/>
+ <enum name='XML_RNGP_REF_CYCLE' file='xmlerror' value='1099' type='xmlParserErrors' info='1099'/>
+ <enum name='XML_RNGP_REF_NAME_INVALID' file='xmlerror' value='1100' type='xmlParserErrors' info='1100'/>
+ <enum name='XML_RNGP_REF_NOT_EMPTY' file='xmlerror' value='1103' type='xmlParserErrors' info='1103'/>
+ <enum name='XML_RNGP_REF_NO_DEF' file='xmlerror' value='1101' type='xmlParserErrors' info='1101'/>
+ <enum name='XML_RNGP_REF_NO_NAME' file='xmlerror' value='1102' type='xmlParserErrors' info='1102'/>
+ <enum name='XML_RNGP_START_CHOICE_AND_INTERLEAVE' file='xmlerror' value='1104' type='xmlParserErrors' info='1104'/>
+ <enum name='XML_RNGP_START_CONTENT' file='xmlerror' value='1105' type='xmlParserErrors' info='1105'/>
+ <enum name='XML_RNGP_START_EMPTY' file='xmlerror' value='1106' type='xmlParserErrors' info='1106'/>
+ <enum name='XML_RNGP_START_MISSING' file='xmlerror' value='1107' type='xmlParserErrors' info='1107'/>
+ <enum name='XML_RNGP_TEXT_EXPECTED' file='xmlerror' value='1108' type='xmlParserErrors' info='1108'/>
+ <enum name='XML_RNGP_TEXT_HAS_CHILD' file='xmlerror' value='1109' type='xmlParserErrors' info='1109'/>
+ <enum name='XML_RNGP_TYPE_MISSING' file='xmlerror' value='1110' type='xmlParserErrors' info='1110'/>
+ <enum name='XML_RNGP_TYPE_NOT_FOUND' file='xmlerror' value='1111' type='xmlParserErrors' info='1111'/>
+ <enum name='XML_RNGP_TYPE_VALUE' file='xmlerror' value='1112' type='xmlParserErrors' info='1112'/>
+ <enum name='XML_RNGP_UNKNOWN_ATTRIBUTE' file='xmlerror' value='1113' type='xmlParserErrors' info='1113'/>
+ <enum name='XML_RNGP_UNKNOWN_COMBINE' file='xmlerror' value='1114' type='xmlParserErrors' info='1114'/>
+ <enum name='XML_RNGP_UNKNOWN_CONSTRUCT' file='xmlerror' value='1115' type='xmlParserErrors' info='1115'/>
+ <enum name='XML_RNGP_UNKNOWN_TYPE_LIB' file='xmlerror' value='1116' type='xmlParserErrors' info='1116'/>
+ <enum name='XML_RNGP_URI_FRAGMENT' file='xmlerror' value='1117' type='xmlParserErrors' info='1117'/>
+ <enum name='XML_RNGP_URI_NOT_ABSOLUTE' file='xmlerror' value='1118' type='xmlParserErrors' info='1118'/>
+ <enum name='XML_RNGP_VALUE_EMPTY' file='xmlerror' value='1119' type='xmlParserErrors' info='1119'/>
+ <enum name='XML_RNGP_VALUE_NO_CONTENT' file='xmlerror' value='1120' type='xmlParserErrors' info='1120'/>
+ <enum name='XML_RNGP_XMLNS_NAME' file='xmlerror' value='1121' type='xmlParserErrors' info='1121'/>
+ <enum name='XML_RNGP_XML_NS' file='xmlerror' value='1122' type='xmlParserErrors' info='1122'/>
+ <enum name='XML_SAVE_AS_HTML' file='xmlsave' value='64' type='xmlSaveOption' info='force HTML serialization on XML doc'/>
+ <enum name='XML_SAVE_AS_XML' file='xmlsave' value='32' type='xmlSaveOption' info='force XML serialization on HTML doc'/>
+ <enum name='XML_SAVE_CHAR_INVALID' file='xmlerror' value='1401' type='xmlParserErrors' info='1401'/>
+ <enum name='XML_SAVE_FORMAT' file='xmlsave' value='1' type='xmlSaveOption' info='format save output'/>
+ <enum name='XML_SAVE_NOT_UTF8' file='xmlerror' value='1400' type='xmlParserErrors'/>
+ <enum name='XML_SAVE_NO_DECL' file='xmlsave' value='2' type='xmlSaveOption' info='drop the xml declaration'/>
+ <enum name='XML_SAVE_NO_DOCTYPE' file='xmlerror' value='1402' type='xmlParserErrors' info='1402'/>
+ <enum name='XML_SAVE_NO_EMPTY' file='xmlsave' value='4' type='xmlSaveOption' info='no empty tags'/>
+ <enum name='XML_SAVE_NO_XHTML' file='xmlsave' value='8' type='xmlSaveOption' info='disable XHTML1 specific rules'/>
+ <enum name='XML_SAVE_UNKNOWN_ENCODING' file='xmlerror' value='1403' type='xmlParserErrors' info='1403'/>
+ <enum name='XML_SAVE_WSNONSIG' file='xmlsave' value='128' type='xmlSaveOption' info=' format with non-significant whitespace'/>
+ <enum name='XML_SAVE_XHTML' file='xmlsave' value='16' type='xmlSaveOption' info='force XHTML1 specific rules'/>
+ <enum name='XML_SCHEMAP_AG_PROPS_CORRECT' file='xmlerror' value='3087' type='xmlParserErrors' info='3086'/>
+ <enum name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' file='xmlerror' value='1701' type='xmlParserErrors' info='1701'/>
+ <enum name='XML_SCHEMAP_ATTRGRP_NONAME_NOREF' file='xmlerror' value='1702' type='xmlParserErrors' info='1702'/>
+ <enum name='XML_SCHEMAP_ATTR_NONAME_NOREF' file='xmlerror' value='1703' type='xmlParserErrors' info='1703'/>
+ <enum name='XML_SCHEMAP_AU_PROPS_CORRECT' file='xmlerror' value='3089' type='xmlParserErrors' info='3088'/>
+ <enum name='XML_SCHEMAP_AU_PROPS_CORRECT_2' file='xmlerror' value='3078' type='xmlParserErrors' info='3078'/>
+ <enum name='XML_SCHEMAP_A_PROPS_CORRECT_2' file='xmlerror' value='3079' type='xmlParserErrors' info='3079'/>
+ <enum name='XML_SCHEMAP_A_PROPS_CORRECT_3' file='xmlerror' value='3090' type='xmlParserErrors' info='3089'/>
+ <enum name='XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF' file='xmlerror' value='1704' type='xmlParserErrors' info='1704'/>
+ <enum name='XML_SCHEMAP_COS_ALL_LIMITED' file='xmlerror' value='3091' type='xmlParserErrors' info='3090'/>
+ <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_1' file='xmlerror' value='3063' type='xmlParserErrors' info='3063'/>
+ <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_2' file='xmlerror' value='3088' type='xmlParserErrors' info='3087'/>
+ <enum name='XML_SCHEMAP_COS_CT_EXTENDS_1_3' file='xmlerror' value='1800' type='xmlParserErrors' info='1800'/>
+ <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_1' file='xmlerror' value='3031' type='xmlParserErrors' info='3031'/>
+ <enum name='XML_SCHEMAP_COS_ST_DERIVED_OK_2_2' file='xmlerror' value='3032' type='xmlParserErrors' info='3032'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_1_1' file='xmlerror' value='3011' type='xmlParserErrors' info='3011'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_1_2' file='xmlerror' value='3012' type='xmlParserErrors' info='3012'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1' file='xmlerror' value='3013' type='xmlParserErrors' info='3013'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2' file='xmlerror' value='3014' type='xmlParserErrors' info='3014'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_1' file='xmlerror' value='3015' type='xmlParserErrors' info='3015'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1' file='xmlerror' value='3016' type='xmlParserErrors' info='3016'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2' file='xmlerror' value='3017' type='xmlParserErrors' info='3017'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1' file='xmlerror' value='3018' type='xmlParserErrors' info='3018'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2' file='xmlerror' value='3019' type='xmlParserErrors' info='3019'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3' file='xmlerror' value='3020' type='xmlParserErrors' info='3020'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4' file='xmlerror' value='3021' type='xmlParserErrors' info='3021'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5' file='xmlerror' value='3022' type='xmlParserErrors' info='3022'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_1' file='xmlerror' value='3023' type='xmlParserErrors' info='3023'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1' file='xmlerror' value='3024' type='xmlParserErrors' info='3024'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2' file='xmlerror' value='3025' type='xmlParserErrors' info='3025'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1' file='xmlerror' value='3027' type='xmlParserErrors' info='3027'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2' file='xmlerror' value='3026' type='xmlParserErrors' info='3026'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3' file='xmlerror' value='3028' type='xmlParserErrors' info='3028'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4' file='xmlerror' value='3029' type='xmlParserErrors' info='3029'/>
+ <enum name='XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5' file='xmlerror' value='3030' type='xmlParserErrors' info='3030'/>
+ <enum name='XML_SCHEMAP_COS_VALID_DEFAULT_1' file='xmlerror' value='3058' type='xmlParserErrors' info='3058'/>
+ <enum name='XML_SCHEMAP_COS_VALID_DEFAULT_2_1' file='xmlerror' value='3059' type='xmlParserErrors' info='3059'/>
+ <enum name='XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1' file='xmlerror' value='3060' type='xmlParserErrors' info='3060'/>
+ <enum name='XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2' file='xmlerror' value='3061' type='xmlParserErrors' info='3061'/>
+ <enum name='XML_SCHEMAP_CT_PROPS_CORRECT_1' file='xmlerror' value='1782' type='xmlParserErrors' info='1782'/>
+ <enum name='XML_SCHEMAP_CT_PROPS_CORRECT_2' file='xmlerror' value='1783' type='xmlParserErrors' info='1783'/>
+ <enum name='XML_SCHEMAP_CT_PROPS_CORRECT_3' file='xmlerror' value='1784' type='xmlParserErrors' info='1784'/>
+ <enum name='XML_SCHEMAP_CT_PROPS_CORRECT_4' file='xmlerror' value='1785' type='xmlParserErrors' info='1785'/>
+ <enum name='XML_SCHEMAP_CT_PROPS_CORRECT_5' file='xmlerror' value='1786' type='xmlParserErrors' info='1786'/>
+ <enum name='XML_SCHEMAP_CVC_SIMPLE_TYPE' file='xmlerror' value='3062' type='xmlParserErrors' info='3062'/>
+ <enum name='XML_SCHEMAP_C_PROPS_CORRECT' file='xmlerror' value='3080' type='xmlParserErrors' info='3080'/>
+ <enum name='XML_SCHEMAP_DEF_AND_PREFIX' file='xmlerror' value='1768' type='xmlParserErrors' info='1768'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1' file='xmlerror' value='1787' type='xmlParserErrors' info='1787'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1' file='xmlerror' value='1788' type='xmlParserErrors' info='1788'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2' file='xmlerror' value='1789' type='xmlParserErrors' info='1789'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3' file='xmlerror' value='3077' type='xmlParserErrors' info='3077'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2' file='xmlerror' value='1790' type='xmlParserErrors' info='1790'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3' file='xmlerror' value='1791' type='xmlParserErrors' info='1791'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1' file='xmlerror' value='1797' type='xmlParserErrors' info='1797'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2' file='xmlerror' value='1798' type='xmlParserErrors' info='1798'/>
+ <enum name='XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3' file='xmlerror' value='1799' type='xmlParserErrors' info='1799'/>
+ <enum name='XML_SCHEMAP_ELEMFORMDEFAULT_VALUE' file='xmlerror' value='1705' type='xmlParserErrors' info='1705'/>
+ <enum name='XML_SCHEMAP_ELEM_DEFAULT_FIXED' file='xmlerror' value='1755' type='xmlParserErrors' info='1755'/>
+ <enum name='XML_SCHEMAP_ELEM_NONAME_NOREF' file='xmlerror' value='1706' type='xmlParserErrors' info='1706'/>
+ <enum name='XML_SCHEMAP_EXTENSION_NO_BASE' file='xmlerror' value='1707' type='xmlParserErrors' info='1707'/>
+ <enum name='XML_SCHEMAP_E_PROPS_CORRECT_2' file='xmlerror' value='3045' type='xmlParserErrors' info='3045'/>
+ <enum name='XML_SCHEMAP_E_PROPS_CORRECT_3' file='xmlerror' value='3046' type='xmlParserErrors' info='3046'/>
+ <enum name='XML_SCHEMAP_E_PROPS_CORRECT_4' file='xmlerror' value='3047' type='xmlParserErrors' info='3047'/>
+ <enum name='XML_SCHEMAP_E_PROPS_CORRECT_5' file='xmlerror' value='3048' type='xmlParserErrors' info='3048'/>
+ <enum name='XML_SCHEMAP_E_PROPS_CORRECT_6' file='xmlerror' value='3049' type='xmlParserErrors' info='3049'/>
+ <enum name='XML_SCHEMAP_FACET_NO_VALUE' file='xmlerror' value='1708' type='xmlParserErrors' info='1708'/>
+ <enum name='XML_SCHEMAP_FAILED_BUILD_IMPORT' file='xmlerror' value='1709' type='xmlParserErrors' info='1709'/>
+ <enum name='XML_SCHEMAP_FAILED_LOAD' file='xmlerror' value='1757' type='xmlParserErrors' info='1757'/>
+ <enum name='XML_SCHEMAP_FAILED_PARSE' file='xmlerror' value='1766' type='xmlParserErrors' info='1766'/>
+ <enum name='XML_SCHEMAP_GROUP_NONAME_NOREF' file='xmlerror' value='1710' type='xmlParserErrors' info='1710'/>
+ <enum name='XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI' file='xmlerror' value='1711' type='xmlParserErrors' info='1711'/>
+ <enum name='XML_SCHEMAP_IMPORT_REDEFINE_NSNAME' file='xmlerror' value='1712' type='xmlParserErrors' info='1712'/>
+ <enum name='XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI' file='xmlerror' value='1713' type='xmlParserErrors' info='1713'/>
+ <enum name='XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI' file='xmlerror' value='1770' type='xmlParserErrors' info='1770'/>
+ <enum name='XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI' file='xmlerror' value='1771' type='xmlParserErrors' info='1771'/>
+ <enum name='XML_SCHEMAP_INTERNAL' file='xmlerror' value='3069' type='xmlParserErrors' info='3069 non-W3C'/>
+ <enum name='XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE' file='xmlerror' value='1793' type='xmlParserErrors' info='1793'/>
+ <enum name='XML_SCHEMAP_INVALID_ATTR_COMBINATION' file='xmlerror' value='1777' type='xmlParserErrors' info='1777'/>
+ <enum name='XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION' file='xmlerror' value='1778' type='xmlParserErrors' info='1778'/>
+ <enum name='XML_SCHEMAP_INVALID_ATTR_NAME' file='xmlerror' value='1780' type='xmlParserErrors' info='1780'/>
+ <enum name='XML_SCHEMAP_INVALID_ATTR_USE' file='xmlerror' value='1774' type='xmlParserErrors' info='1774'/>
+ <enum name='XML_SCHEMAP_INVALID_BOOLEAN' file='xmlerror' value='1714' type='xmlParserErrors' info='1714'/>
+ <enum name='XML_SCHEMAP_INVALID_ENUM' file='xmlerror' value='1715' type='xmlParserErrors' info='1715'/>
+ <enum name='XML_SCHEMAP_INVALID_FACET' file='xmlerror' value='1716' type='xmlParserErrors' info='1716'/>
+ <enum name='XML_SCHEMAP_INVALID_FACET_VALUE' file='xmlerror' value='1717' type='xmlParserErrors' info='1717'/>
+ <enum name='XML_SCHEMAP_INVALID_MAXOCCURS' file='xmlerror' value='1718' type='xmlParserErrors' info='1718'/>
+ <enum name='XML_SCHEMAP_INVALID_MINOCCURS' file='xmlerror' value='1719' type='xmlParserErrors' info='1719'/>
+ <enum name='XML_SCHEMAP_INVALID_REF_AND_SUBTYPE' file='xmlerror' value='1720' type='xmlParserErrors' info='1720'/>
+ <enum name='XML_SCHEMAP_INVALID_WHITE_SPACE' file='xmlerror' value='1721' type='xmlParserErrors' info='1721'/>
+ <enum name='XML_SCHEMAP_MG_PROPS_CORRECT_1' file='xmlerror' value='3074' type='xmlParserErrors' info='3074'/>
+ <enum name='XML_SCHEMAP_MG_PROPS_CORRECT_2' file='xmlerror' value='3075' type='xmlParserErrors' info='3075'/>
+ <enum name='XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD' file='xmlerror' value='1779' type='xmlParserErrors' info='1779'/>
+ <enum name='XML_SCHEMAP_NOATTR_NOREF' file='xmlerror' value='1722' type='xmlParserErrors' info='1722'/>
+ <enum name='XML_SCHEMAP_NOROOT' file='xmlerror' value='1759' type='xmlParserErrors' info='1759'/>
+ <enum name='XML_SCHEMAP_NOTATION_NO_NAME' file='xmlerror' value='1723' type='xmlParserErrors' info='1723'/>
+ <enum name='XML_SCHEMAP_NOTHING_TO_PARSE' file='xmlerror' value='1758' type='xmlParserErrors' info='1758'/>
+ <enum name='XML_SCHEMAP_NOTYPE_NOREF' file='xmlerror' value='1724' type='xmlParserErrors' info='1724'/>
+ <enum name='XML_SCHEMAP_NOT_DETERMINISTIC' file='xmlerror' value='3070' type='xmlParserErrors' info='3070 non-W3C'/>
+ <enum name='XML_SCHEMAP_NOT_SCHEMA' file='xmlerror' value='1772' type='xmlParserErrors' info='1772'/>
+ <enum name='XML_SCHEMAP_NO_XMLNS' file='xmlerror' value='3056' type='xmlParserErrors' info='3056'/>
+ <enum name='XML_SCHEMAP_NO_XSI' file='xmlerror' value='3057' type='xmlParserErrors' info='3057'/>
+ <enum name='XML_SCHEMAP_PREFIX_UNDEFINED' file='xmlerror' value='1700' type='xmlParserErrors'/>
+ <enum name='XML_SCHEMAP_P_PROPS_CORRECT_1' file='xmlerror' value='3042' type='xmlParserErrors' info='3042'/>
+ <enum name='XML_SCHEMAP_P_PROPS_CORRECT_2_1' file='xmlerror' value='3043' type='xmlParserErrors' info='3043'/>
+ <enum name='XML_SCHEMAP_P_PROPS_CORRECT_2_2' file='xmlerror' value='3044' type='xmlParserErrors' info='3044'/>
+ <enum name='XML_SCHEMAP_RECURSIVE' file='xmlerror' value='1775' type='xmlParserErrors' info='1775'/>
+ <enum name='XML_SCHEMAP_REDEFINED_ATTR' file='xmlerror' value='1764' type='xmlParserErrors' info='1764'/>
+ <enum name='XML_SCHEMAP_REDEFINED_ATTRGROUP' file='xmlerror' value='1763' type='xmlParserErrors' info='1763'/>
+ <enum name='XML_SCHEMAP_REDEFINED_ELEMENT' file='xmlerror' value='1762' type='xmlParserErrors' info='1762'/>
+ <enum name='XML_SCHEMAP_REDEFINED_GROUP' file='xmlerror' value='1760' type='xmlParserErrors' info='1760'/>
+ <enum name='XML_SCHEMAP_REDEFINED_NOTATION' file='xmlerror' value='1765' type='xmlParserErrors' info='1765'/>
+ <enum name='XML_SCHEMAP_REDEFINED_TYPE' file='xmlerror' value='1761' type='xmlParserErrors' info='1761'/>
+ <enum name='XML_SCHEMAP_REF_AND_CONTENT' file='xmlerror' value='1781' type='xmlParserErrors' info='1781'/>
+ <enum name='XML_SCHEMAP_REF_AND_SUBTYPE' file='xmlerror' value='1725' type='xmlParserErrors' info='1725'/>
+ <enum name='XML_SCHEMAP_REGEXP_INVALID' file='xmlerror' value='1756' type='xmlParserErrors' info='1756'/>
+ <enum name='XML_SCHEMAP_RESTRICTION_NONAME_NOREF' file='xmlerror' value='1726' type='xmlParserErrors' info='1726'/>
+ <enum name='XML_SCHEMAP_S4S_ATTR_INVALID_VALUE' file='xmlerror' value='3037' type='xmlParserErrors' info='3037'/>
+ <enum name='XML_SCHEMAP_S4S_ATTR_MISSING' file='xmlerror' value='3036' type='xmlParserErrors' info='3036'/>
+ <enum name='XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED' file='xmlerror' value='3035' type='xmlParserErrors' info='3035'/>
+ <enum name='XML_SCHEMAP_S4S_ELEM_MISSING' file='xmlerror' value='3034' type='xmlParserErrors' info='3034'/>
+ <enum name='XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED' file='xmlerror' value='3033' type='xmlParserErrors' info='3033'/>
+ <enum name='XML_SCHEMAP_SIMPLETYPE_NONAME' file='xmlerror' value='1727' type='xmlParserErrors' info='1727'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_1' file='xmlerror' value='3051' type='xmlParserErrors' info='3051'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_2' file='xmlerror' value='3052' type='xmlParserErrors' info='3052'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_3_1' file='xmlerror' value='3053' type='xmlParserErrors' info='3053'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_3_2' file='xmlerror' value='3054' type='xmlParserErrors' info='3054'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_4' file='xmlerror' value='3055' type='xmlParserErrors' info='3055'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1' file='xmlerror' value='3071' type='xmlParserErrors' info='3071'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2' file='xmlerror' value='3072' type='xmlParserErrors' info='3072'/>
+ <enum name='XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3' file='xmlerror' value='3073' type='xmlParserErrors' info='3073'/>
+ <enum name='XML_SCHEMAP_SRC_CT_1' file='xmlerror' value='3076' type='xmlParserErrors' info='3076'/>
+ <enum name='XML_SCHEMAP_SRC_ELEMENT_1' file='xmlerror' value='3038' type='xmlParserErrors' info='3038'/>
+ <enum name='XML_SCHEMAP_SRC_ELEMENT_2_1' file='xmlerror' value='3039' type='xmlParserErrors' info='3039'/>
+ <enum name='XML_SCHEMAP_SRC_ELEMENT_2_2' file='xmlerror' value='3040' type='xmlParserErrors' info='3040'/>
+ <enum name='XML_SCHEMAP_SRC_ELEMENT_3' file='xmlerror' value='3041' type='xmlParserErrors' info='3041'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT' file='xmlerror' value='3082' type='xmlParserErrors' info='3082'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_1_1' file='xmlerror' value='3064' type='xmlParserErrors' info='3064'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_1_2' file='xmlerror' value='3065' type='xmlParserErrors' info='3065'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_2' file='xmlerror' value='3066' type='xmlParserErrors' info='3066'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_2_1' file='xmlerror' value='3067' type='xmlParserErrors' info='3067'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_2_2' file='xmlerror' value='3068' type='xmlParserErrors' info='3068'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_3_1' file='xmlerror' value='1795' type='xmlParserErrors' info='1795'/>
+ <enum name='XML_SCHEMAP_SRC_IMPORT_3_2' file='xmlerror' value='1796' type='xmlParserErrors' info='1796'/>
+ <enum name='XML_SCHEMAP_SRC_INCLUDE' file='xmlerror' value='3050' type='xmlParserErrors' info='3050'/>
+ <enum name='XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE' file='xmlerror' value='3006' type='xmlParserErrors' info='3006'/>
+ <enum name='XML_SCHEMAP_SRC_REDEFINE' file='xmlerror' value='3081' type='xmlParserErrors' info='3081'/>
+ <enum name='XML_SCHEMAP_SRC_RESOLVE' file='xmlerror' value='3004' type='xmlParserErrors' info='3004'/>
+ <enum name='XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE' file='xmlerror' value='3005' type='xmlParserErrors' info='3005'/>
+ <enum name='XML_SCHEMAP_SRC_SIMPLE_TYPE_1' file='xmlerror' value='3000' type='xmlParserErrors'/>
+ <enum name='XML_SCHEMAP_SRC_SIMPLE_TYPE_2' file='xmlerror' value='3001' type='xmlParserErrors' info='3001'/>
+ <enum name='XML_SCHEMAP_SRC_SIMPLE_TYPE_3' file='xmlerror' value='3002' type='xmlParserErrors' info='3002'/>
+ <enum name='XML_SCHEMAP_SRC_SIMPLE_TYPE_4' file='xmlerror' value='3003' type='xmlParserErrors' info='3003'/>
+ <enum name='XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES' file='xmlerror' value='3007' type='xmlParserErrors' info='3007'/>
+ <enum name='XML_SCHEMAP_ST_PROPS_CORRECT_1' file='xmlerror' value='3008' type='xmlParserErrors' info='3008'/>
+ <enum name='XML_SCHEMAP_ST_PROPS_CORRECT_2' file='xmlerror' value='3009' type='xmlParserErrors' info='3009'/>
+ <enum name='XML_SCHEMAP_ST_PROPS_CORRECT_3' file='xmlerror' value='3010' type='xmlParserErrors' info='3010'/>
+ <enum name='XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE' file='xmlerror' value='1776' type='xmlParserErrors' info='1776'/>
+ <enum name='XML_SCHEMAP_TYPE_AND_SUBTYPE' file='xmlerror' value='1728' type='xmlParserErrors' info='1728'/>
+ <enum name='XML_SCHEMAP_UNION_NOT_EXPRESSIBLE' file='xmlerror' value='1794' type='xmlParserErrors' info='1794'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ALL_CHILD' file='xmlerror' value='1729' type='xmlParserErrors' info='1729'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD' file='xmlerror' value='1730' type='xmlParserErrors' info='1730'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD' file='xmlerror' value='1732' type='xmlParserErrors' info='1732'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP' file='xmlerror' value='1733' type='xmlParserErrors' info='1733'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ATTR_CHILD' file='xmlerror' value='1731' type='xmlParserErrors' info='1731'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_BASE_TYPE' file='xmlerror' value='1734' type='xmlParserErrors' info='1734'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_CHOICE_CHILD' file='xmlerror' value='1735' type='xmlParserErrors' info='1735'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD' file='xmlerror' value='1736' type='xmlParserErrors' info='1736'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD' file='xmlerror' value='1737' type='xmlParserErrors' info='1737'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_ELEM_CHILD' file='xmlerror' value='1738' type='xmlParserErrors' info='1738'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD' file='xmlerror' value='1739' type='xmlParserErrors' info='1739'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_FACET_CHILD' file='xmlerror' value='1740' type='xmlParserErrors' info='1740'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_FACET_TYPE' file='xmlerror' value='1741' type='xmlParserErrors' info='1741'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_GROUP_CHILD' file='xmlerror' value='1742' type='xmlParserErrors' info='1742'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_IMPORT_CHILD' file='xmlerror' value='1743' type='xmlParserErrors' info='1743'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD' file='xmlerror' value='1769' type='xmlParserErrors' info='1769'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_LIST_CHILD' file='xmlerror' value='1744' type='xmlParserErrors' info='1744'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_MEMBER_TYPE' file='xmlerror' value='1773' type='xmlParserErrors' info='1773'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_NOTATION_CHILD' file='xmlerror' value='1745' type='xmlParserErrors' info='1745'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_PREFIX' file='xmlerror' value='1767' type='xmlParserErrors' info='1767'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' file='xmlerror' value='1746' type='xmlParserErrors' info='1746'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_REF' file='xmlerror' value='1747' type='xmlParserErrors' info='1747'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD' file='xmlerror' value='1748' type='xmlParserErrors' info='1748'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD' file='xmlerror' value='1749' type='xmlParserErrors' info='1749'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD' file='xmlerror' value='1750' type='xmlParserErrors' info='1750'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD' file='xmlerror' value='1751' type='xmlParserErrors' info='1751'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD' file='xmlerror' value='1752' type='xmlParserErrors' info='1752'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_TYPE' file='xmlerror' value='1753' type='xmlParserErrors' info='1753'/>
+ <enum name='XML_SCHEMAP_UNKNOWN_UNION_CHILD' file='xmlerror' value='1754' type='xmlParserErrors' info='1754'/>
+ <enum name='XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH' file='xmlerror' value='3086' type='xmlParserErrors' info='3085'/>
+ <enum name='XML_SCHEMAP_WARN_ATTR_REDECL_PROH' file='xmlerror' value='3085' type='xmlParserErrors' info='3085'/>
+ <enum name='XML_SCHEMAP_WARN_SKIP_SCHEMA' file='xmlerror' value='3083' type='xmlParserErrors' info='3083'/>
+ <enum name='XML_SCHEMAP_WARN_UNLOCATED_SCHEMA' file='xmlerror' value='3084' type='xmlParserErrors' info='3084'/>
+ <enum name='XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER' file='xmlerror' value='1792' type='xmlParserErrors' info='1792'/>
+ <enum name='XML_SCHEMAS_ANYSIMPLETYPE' file='schemasInternals' value='46' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ANYTYPE' file='schemasInternals' value='45' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ANYURI' file='schemasInternals' value='29' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_BASE64BINARY' file='schemasInternals' value='44' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_BOOLEAN' file='schemasInternals' value='15' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_BYTE' file='schemasInternals' value='41' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_DATE' file='schemasInternals' value='10' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_DATETIME' file='schemasInternals' value='11' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_DECIMAL' file='schemasInternals' value='3' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_DOUBLE' file='schemasInternals' value='14' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_DURATION' file='schemasInternals' value='12' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ENTITIES' file='schemasInternals' value='27' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ENTITY' file='schemasInternals' value='26' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ERR_' file='xmlschemas' value='24' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_ATTRINVALID' file='xmlschemas' value='21' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_ATTRUNKNOWN' file='xmlschemas' value='20' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_CONSTRUCT' file='xmlschemas' value='17' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_ELEMCONT' file='xmlschemas' value='10' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_EXTRACONTENT' file='xmlschemas' value='13' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_FACET' file='xmlschemas' value='23' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_HAVEDEFAULT' file='xmlschemas' value='11' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_INTERNAL' file='xmlschemas' value='18' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_INVALIDATTR' file='xmlschemas' value='14' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_INVALIDELEM' file='xmlschemas' value='15' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_ISABSTRACT' file='xmlschemas' value='8' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_MISSING' file='xmlschemas' value='4' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOROLLBACK' file='xmlschemas' value='7' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOROOT' file='xmlschemas' value='1' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTDETERMINIST' file='xmlschemas' value='16' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTEMPTY' file='xmlschemas' value='9' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTNILLABLE' file='xmlschemas' value='12' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTSIMPLE' file='xmlschemas' value='19' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTTOPLEVEL' file='xmlschemas' value='3' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_NOTYPE' file='xmlschemas' value='6' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_OK' file='xmlschemas' value='0' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_UNDECLAREDELEM' file='xmlschemas' value='2' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_VALUE' file='xmlschemas' value='22' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_WRONGELEM' file='xmlschemas' value='5' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_ERR_XXX' file='xmlschemas' value='25' type='xmlSchemaValidError'/>
+ <enum name='XML_SCHEMAS_FLOAT' file='schemasInternals' value='13' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_GDAY' file='schemasInternals' value='5' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_GMONTH' file='schemasInternals' value='6' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_GMONTHDAY' file='schemasInternals' value='7' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_GYEAR' file='schemasInternals' value='8' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_GYEARMONTH' file='schemasInternals' value='9' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_HEXBINARY' file='schemasInternals' value='43' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ID' file='schemasInternals' value='23' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_IDREF' file='schemasInternals' value='24' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_IDREFS' file='schemasInternals' value='25' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_INT' file='schemasInternals' value='35' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_INTEGER' file='schemasInternals' value='30' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_LANGUAGE' file='schemasInternals' value='17' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_LONG' file='schemasInternals' value='37' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NAME' file='schemasInternals' value='20' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NCNAME' file='schemasInternals' value='22' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NINTEGER' file='schemasInternals' value='32' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NMTOKEN' file='schemasInternals' value='18' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NMTOKENS' file='schemasInternals' value='19' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NNINTEGER' file='schemasInternals' value='33' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NORMSTRING' file='schemasInternals' value='2' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NOTATION' file='schemasInternals' value='28' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_NPINTEGER' file='schemasInternals' value='31' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_PINTEGER' file='schemasInternals' value='34' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_QNAME' file='schemasInternals' value='21' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_SHORT' file='schemasInternals' value='39' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_STRING' file='schemasInternals' value='1' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_TIME' file='schemasInternals' value='4' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_TOKEN' file='schemasInternals' value='16' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_UBYTE' file='schemasInternals' value='42' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_UINT' file='schemasInternals' value='36' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_ULONG' file='schemasInternals' value='38' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_UNKNOWN' file='schemasInternals' value='0' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMAS_USHORT' file='schemasInternals' value='40' type='xmlSchemaValType'/>
+ <enum name='XML_SCHEMATRONV_ASSERT' file='xmlerror' value='4000' type='xmlParserErrors' info='4000'/>
+ <enum name='XML_SCHEMATRONV_REPORT' file='xmlerror' value='4001' type='xmlParserErrors'/>
+ <enum name='XML_SCHEMATRON_OUT_BUFFER' file='schematron' value='512' type='xmlSchematronValidOptions' info='output to a buffer'/>
+ <enum name='XML_SCHEMATRON_OUT_ERROR' file='schematron' value='8' type='xmlSchematronValidOptions' info='output via xmlStructuredErrorFunc'/>
+ <enum name='XML_SCHEMATRON_OUT_FILE' file='schematron' value='256' type='xmlSchematronValidOptions' info='output to a file descriptor'/>
+ <enum name='XML_SCHEMATRON_OUT_IO' file='schematron' value='1024' type='xmlSchematronValidOptions' info=' output to I/O mechanism'/>
+ <enum name='XML_SCHEMATRON_OUT_QUIET' file='schematron' value='1' type='xmlSchematronValidOptions' info='quiet no report'/>
+ <enum name='XML_SCHEMATRON_OUT_TEXT' file='schematron' value='2' type='xmlSchematronValidOptions' info='build a textual report'/>
+ <enum name='XML_SCHEMATRON_OUT_XML' file='schematron' value='4' type='xmlSchematronValidOptions' info='output SVRL'/>
+ <enum name='XML_SCHEMAV_ATTRINVALID' file='xmlerror' value='1821' type='xmlParserErrors' info='1821'/>
+ <enum name='XML_SCHEMAV_ATTRUNKNOWN' file='xmlerror' value='1820' type='xmlParserErrors' info='1820'/>
+ <enum name='XML_SCHEMAV_CONSTRUCT' file='xmlerror' value='1817' type='xmlParserErrors' info='1817'/>
+ <enum name='XML_SCHEMAV_CVC_ATTRIBUTE_1' file='xmlerror' value='1861' type='xmlParserErrors' info='1861'/>
+ <enum name='XML_SCHEMAV_CVC_ATTRIBUTE_2' file='xmlerror' value='1862' type='xmlParserErrors' info='1862'/>
+ <enum name='XML_SCHEMAV_CVC_ATTRIBUTE_3' file='xmlerror' value='1863' type='xmlParserErrors' info='1863'/>
+ <enum name='XML_SCHEMAV_CVC_ATTRIBUTE_4' file='xmlerror' value='1864' type='xmlParserErrors' info='1864'/>
+ <enum name='XML_SCHEMAV_CVC_AU' file='xmlerror' value='1874' type='xmlParserErrors' info='1874'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_1' file='xmlerror' value='1873' type='xmlParserErrors' info='1873'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1' file='xmlerror' value='1841' type='xmlParserErrors' info='1841'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2' file='xmlerror' value='1842' type='xmlParserErrors' info='1842'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3' file='xmlerror' value='1843' type='xmlParserErrors' info='1843'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4' file='xmlerror' value='1844' type='xmlParserErrors' info='1844'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1' file='xmlerror' value='1865' type='xmlParserErrors' info='1865'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1' file='xmlerror' value='1866' type='xmlParserErrors' info='1866'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2' file='xmlerror' value='1867' type='xmlParserErrors' info='1867'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_4' file='xmlerror' value='1868' type='xmlParserErrors' info='1868'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1' file='xmlerror' value='1869' type='xmlParserErrors' info='1869'/>
+ <enum name='XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2' file='xmlerror' value='1870' type='xmlParserErrors' info='1870'/>
+ <enum name='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1' file='xmlerror' value='1824' type='xmlParserErrors' info='1824'/>
+ <enum name='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2' file='xmlerror' value='1825' type='xmlParserErrors' info='1825'/>
+ <enum name='XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3' file='xmlerror' value='1826' type='xmlParserErrors' info='1826'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_1' file='xmlerror' value='1845' type='xmlParserErrors' info='1845'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_2' file='xmlerror' value='1846' type='xmlParserErrors' info='1846'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_3_1' file='xmlerror' value='1847' type='xmlParserErrors' info='1847'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_3_2_1' file='xmlerror' value='1848' type='xmlParserErrors' info='1848'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_3_2_2' file='xmlerror' value='1849' type='xmlParserErrors' info='1849'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_4_1' file='xmlerror' value='1850' type='xmlParserErrors' info='1850'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_4_2' file='xmlerror' value='1851' type='xmlParserErrors' info='1851'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_4_3' file='xmlerror' value='1852' type='xmlParserErrors' info='1852'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_1_1' file='xmlerror' value='1853' type='xmlParserErrors' info='1853'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_1_2' file='xmlerror' value='1854' type='xmlParserErrors' info='1854'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_2_1' file='xmlerror' value='1855' type='xmlParserErrors' info='1855'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_2_2_1' file='xmlerror' value='1856' type='xmlParserErrors' info='1856'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_2_2_2_1' file='xmlerror' value='1857' type='xmlParserErrors' info='1857'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_5_2_2_2_2' file='xmlerror' value='1858' type='xmlParserErrors' info='1858'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_6' file='xmlerror' value='1859' type='xmlParserErrors' info='1859'/>
+ <enum name='XML_SCHEMAV_CVC_ELT_7' file='xmlerror' value='1860' type='xmlParserErrors' info='1860'/>
+ <enum name='XML_SCHEMAV_CVC_ENUMERATION_VALID' file='xmlerror' value='1840' type='xmlParserErrors' info='1840'/>
+ <enum name='XML_SCHEMAV_CVC_FACET_VALID' file='xmlerror' value='1829' type='xmlParserErrors' info='1829'/>
+ <enum name='XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID' file='xmlerror' value='1838' type='xmlParserErrors' info='1838'/>
+ <enum name='XML_SCHEMAV_CVC_IDC' file='xmlerror' value='1877' type='xmlParserErrors' info='1877'/>
+ <enum name='XML_SCHEMAV_CVC_LENGTH_VALID' file='xmlerror' value='1830' type='xmlParserErrors' info='1830'/>
+ <enum name='XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID' file='xmlerror' value='1836' type='xmlParserErrors' info='1836'/>
+ <enum name='XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID' file='xmlerror' value='1834' type='xmlParserErrors' info='1834'/>
+ <enum name='XML_SCHEMAV_CVC_MAXLENGTH_VALID' file='xmlerror' value='1832' type='xmlParserErrors' info='1832'/>
+ <enum name='XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID' file='xmlerror' value='1835' type='xmlParserErrors' info='1835'/>
+ <enum name='XML_SCHEMAV_CVC_MININCLUSIVE_VALID' file='xmlerror' value='1833' type='xmlParserErrors' info='1833'/>
+ <enum name='XML_SCHEMAV_CVC_MINLENGTH_VALID' file='xmlerror' value='1831' type='xmlParserErrors' info='1831'/>
+ <enum name='XML_SCHEMAV_CVC_PATTERN_VALID' file='xmlerror' value='1839' type='xmlParserErrors' info='1839'/>
+ <enum name='XML_SCHEMAV_CVC_TOTALDIGITS_VALID' file='xmlerror' value='1837' type='xmlParserErrors' info='1837'/>
+ <enum name='XML_SCHEMAV_CVC_TYPE_1' file='xmlerror' value='1875' type='xmlParserErrors' info='1875'/>
+ <enum name='XML_SCHEMAV_CVC_TYPE_2' file='xmlerror' value='1876' type='xmlParserErrors' info='1876'/>
+ <enum name='XML_SCHEMAV_CVC_TYPE_3_1_1' file='xmlerror' value='1827' type='xmlParserErrors' info='1827'/>
+ <enum name='XML_SCHEMAV_CVC_TYPE_3_1_2' file='xmlerror' value='1828' type='xmlParserErrors' info='1828'/>
+ <enum name='XML_SCHEMAV_CVC_WILDCARD' file='xmlerror' value='1878' type='xmlParserErrors' info='1878'/>
+ <enum name='XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING' file='xmlerror' value='1872' type='xmlParserErrors' info='1872'/>
+ <enum name='XML_SCHEMAV_ELEMCONT' file='xmlerror' value='1810' type='xmlParserErrors' info='1810'/>
+ <enum name='XML_SCHEMAV_ELEMENT_CONTENT' file='xmlerror' value='1871' type='xmlParserErrors' info='1871'/>
+ <enum name='XML_SCHEMAV_EXTRACONTENT' file='xmlerror' value='1813' type='xmlParserErrors' info='1813'/>
+ <enum name='XML_SCHEMAV_FACET' file='xmlerror' value='1823' type='xmlParserErrors' info='1823'/>
+ <enum name='XML_SCHEMAV_HAVEDEFAULT' file='xmlerror' value='1811' type='xmlParserErrors' info='1811'/>
+ <enum name='XML_SCHEMAV_INTERNAL' file='xmlerror' value='1818' type='xmlParserErrors' info='1818'/>
+ <enum name='XML_SCHEMAV_INVALIDATTR' file='xmlerror' value='1814' type='xmlParserErrors' info='1814'/>
+ <enum name='XML_SCHEMAV_INVALIDELEM' file='xmlerror' value='1815' type='xmlParserErrors' info='1815'/>
+ <enum name='XML_SCHEMAV_ISABSTRACT' file='xmlerror' value='1808' type='xmlParserErrors' info='1808'/>
+ <enum name='XML_SCHEMAV_MISC' file='xmlerror' value='1879' type='xmlParserErrors' info='1879'/>
+ <enum name='XML_SCHEMAV_MISSING' file='xmlerror' value='1804' type='xmlParserErrors' info='1804'/>
+ <enum name='XML_SCHEMAV_NOROLLBACK' file='xmlerror' value='1807' type='xmlParserErrors' info='1807'/>
+ <enum name='XML_SCHEMAV_NOROOT' file='xmlerror' value='1801' type='xmlParserErrors'/>
+ <enum name='XML_SCHEMAV_NOTDETERMINIST' file='xmlerror' value='1816' type='xmlParserErrors' info='1816'/>
+ <enum name='XML_SCHEMAV_NOTEMPTY' file='xmlerror' value='1809' type='xmlParserErrors' info='1809'/>
+ <enum name='XML_SCHEMAV_NOTNILLABLE' file='xmlerror' value='1812' type='xmlParserErrors' info='1812'/>
+ <enum name='XML_SCHEMAV_NOTSIMPLE' file='xmlerror' value='1819' type='xmlParserErrors' info='1819'/>
+ <enum name='XML_SCHEMAV_NOTTOPLEVEL' file='xmlerror' value='1803' type='xmlParserErrors' info='1803'/>
+ <enum name='XML_SCHEMAV_NOTYPE' file='xmlerror' value='1806' type='xmlParserErrors' info='1806'/>
+ <enum name='XML_SCHEMAV_UNDECLAREDELEM' file='xmlerror' value='1802' type='xmlParserErrors' info='1802'/>
+ <enum name='XML_SCHEMAV_VALUE' file='xmlerror' value='1822' type='xmlParserErrors' info='1822'/>
+ <enum name='XML_SCHEMAV_WRONGELEM' file='xmlerror' value='1805' type='xmlParserErrors' info='1805'/>
+ <enum name='XML_SCHEMA_CONTENT_ANY' file='schemasInternals' value='7' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_BASIC' file='schemasInternals' value='6' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_ELEMENTS' file='schemasInternals' value='2' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_EMPTY' file='schemasInternals' value='1' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_MIXED' file='schemasInternals' value='3' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS' file='schemasInternals' value='5' type='xmlSchemaContentType' info='Obsolete'/>
+ <enum name='XML_SCHEMA_CONTENT_SIMPLE' file='schemasInternals' value='4' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_CONTENT_UNKNOWN' file='schemasInternals' value='0' type='xmlSchemaContentType'/>
+ <enum name='XML_SCHEMA_EXTRA_ATTR_USE_PROHIB' file='schemasInternals' value='2001' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_EXTRA_QNAMEREF' file='schemasInternals' value='2000' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_ENUMERATION' file='schemasInternals' value='1007' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_FRACTIONDIGITS' file='schemasInternals' value='1005' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_LENGTH' file='schemasInternals' value='1009' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MAXEXCLUSIVE' file='schemasInternals' value='1003' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MAXINCLUSIVE' file='schemasInternals' value='1002' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MAXLENGTH' file='schemasInternals' value='1010' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MINEXCLUSIVE' file='schemasInternals' value='1001' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MININCLUSIVE' file='schemasInternals' value='1000' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_MINLENGTH' file='schemasInternals' value='1011' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_PATTERN' file='schemasInternals' value='1006' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_TOTALDIGITS' file='schemasInternals' value='1004' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_FACET_WHITESPACE' file='schemasInternals' value='1008' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ALL' file='schemasInternals' value='8' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ANY' file='schemasInternals' value='2' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' file='schemasInternals' value='21' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ATTRIBUTE' file='schemasInternals' value='15' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ATTRIBUTEGROUP' file='schemasInternals' value='16' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ATTRIBUTE_USE' file='schemasInternals' value='26' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_BASIC' file='schemasInternals' value='1' type='xmlSchemaTypeType' info='A built-in datatype'/>
+ <enum name='XML_SCHEMA_TYPE_CHOICE' file='schemasInternals' value='7' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_COMPLEX' file='schemasInternals' value='5' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_COMPLEX_CONTENT' file='schemasInternals' value='10' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_ELEMENT' file='schemasInternals' value='14' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_EXTENSION' file='schemasInternals' value='13' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_FACET' file='schemasInternals' value='3' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_GROUP' file='schemasInternals' value='17' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_IDC_KEY' file='schemasInternals' value='23' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_IDC_KEYREF' file='schemasInternals' value='24' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_IDC_UNIQUE' file='schemasInternals' value='22' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_LIST' file='schemasInternals' value='19' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_NOTATION' file='schemasInternals' value='18' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_PARTICLE' file='schemasInternals' value='25' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_RESTRICTION' file='schemasInternals' value='12' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_SEQUENCE' file='schemasInternals' value='6' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_SIMPLE' file='schemasInternals' value='4' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_SIMPLE_CONTENT' file='schemasInternals' value='9' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_UNION' file='schemasInternals' value='20' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_TYPE_UR' file='schemasInternals' value='11' type='xmlSchemaTypeType'/>
+ <enum name='XML_SCHEMA_VAL_VC_I_CREATE' file='xmlschemas' value='1' type='xmlSchemaValidOption' info=' Default/fixed: create an attribute node
+* or an element&apos;s text node on the instance.
+*'/>
+ <enum name='XML_SCHEMA_WHITESPACE_COLLAPSE' file='xmlschemastypes' value='3' type='xmlSchemaWhitespaceValueType'/>
+ <enum name='XML_SCHEMA_WHITESPACE_PRESERVE' file='xmlschemastypes' value='1' type='xmlSchemaWhitespaceValueType'/>
+ <enum name='XML_SCHEMA_WHITESPACE_REPLACE' file='xmlschemastypes' value='2' type='xmlSchemaWhitespaceValueType'/>
+ <enum name='XML_SCHEMA_WHITESPACE_UNKNOWN' file='xmlschemastypes' value='0' type='xmlSchemaWhitespaceValueType'/>
+ <enum name='XML_TEXTREADER_MODE_CLOSED' file='xmlreader' value='4' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXTREADER_MODE_EOF' file='xmlreader' value='3' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXTREADER_MODE_ERROR' file='xmlreader' value='2' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXTREADER_MODE_INITIAL' file='xmlreader' value='0' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXTREADER_MODE_INTERACTIVE' file='xmlreader' value='1' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXTREADER_MODE_READING' file='xmlreader' value='5' type='xmlTextReaderMode'/>
+ <enum name='XML_TEXT_NODE' file='tree' value='3' type='xmlElementType'/>
+ <enum name='XML_TREE_INVALID_DEC' file='xmlerror' value='1301' type='xmlParserErrors' info='1301'/>
+ <enum name='XML_TREE_INVALID_HEX' file='xmlerror' value='1300' type='xmlParserErrors'/>
+ <enum name='XML_TREE_NOT_UTF8' file='xmlerror' value='1303' type='xmlParserErrors' info='1303'/>
+ <enum name='XML_TREE_UNTERMINATED_ENTITY' file='xmlerror' value='1302' type='xmlParserErrors' info='1302'/>
+ <enum name='XML_WAR_CATALOG_PI' file='xmlerror' value='93' type='xmlParserErrors' info='93'/>
+ <enum name='XML_WAR_ENTITY_REDEFINED' file='xmlerror' value='107' type='xmlParserErrors' info='107'/>
+ <enum name='XML_WAR_LANG_VALUE' file='xmlerror' value='98' type='xmlParserErrors' info='98'/>
+ <enum name='XML_WAR_NS_COLUMN' file='xmlerror' value='106' type='xmlParserErrors' info='106'/>
+ <enum name='XML_WAR_NS_URI' file='xmlerror' value='99' type='xmlParserErrors' info='99'/>
+ <enum name='XML_WAR_NS_URI_RELATIVE' file='xmlerror' value='100' type='xmlParserErrors' info='100'/>
+ <enum name='XML_WAR_SPACE_VALUE' file='xmlerror' value='102' type='xmlParserErrors' info='102'/>
+ <enum name='XML_WAR_UNDECLARED_ENTITY' file='xmlerror' value='27' type='xmlParserErrors' info='27'/>
+ <enum name='XML_WAR_UNKNOWN_VERSION' file='xmlerror' value='97' type='xmlParserErrors' info='97'/>
+ <enum name='XML_WITH_AUTOMATA' file='parser' value='23' type='xmlFeature'/>
+ <enum name='XML_WITH_C14N' file='parser' value='14' type='xmlFeature'/>
+ <enum name='XML_WITH_CATALOG' file='parser' value='15' type='xmlFeature'/>
+ <enum name='XML_WITH_DEBUG' file='parser' value='28' type='xmlFeature'/>
+ <enum name='XML_WITH_DEBUG_MEM' file='parser' value='29' type='xmlFeature'/>
+ <enum name='XML_WITH_DEBUG_RUN' file='parser' value='30' type='xmlFeature'/>
+ <enum name='XML_WITH_EXPR' file='parser' value='24' type='xmlFeature'/>
+ <enum name='XML_WITH_FTP' file='parser' value='9' type='xmlFeature'/>
+ <enum name='XML_WITH_HTML' file='parser' value='12' type='xmlFeature'/>
+ <enum name='XML_WITH_HTTP' file='parser' value='10' type='xmlFeature'/>
+ <enum name='XML_WITH_ICONV' file='parser' value='19' type='xmlFeature'/>
+ <enum name='XML_WITH_ICU' file='parser' value='32' type='xmlFeature'/>
+ <enum name='XML_WITH_ISO8859X' file='parser' value='20' type='xmlFeature'/>
+ <enum name='XML_WITH_LEGACY' file='parser' value='13' type='xmlFeature'/>
+ <enum name='XML_WITH_LZMA' file='parser' value='33' type='xmlFeature'/>
+ <enum name='XML_WITH_MODULES' file='parser' value='27' type='xmlFeature'/>
+ <enum name='XML_WITH_NONE' file='parser' value='99999' type='xmlFeature' info=' just to be sure of allocation size'/>
+ <enum name='XML_WITH_OUTPUT' file='parser' value='3' type='xmlFeature'/>
+ <enum name='XML_WITH_PATTERN' file='parser' value='6' type='xmlFeature'/>
+ <enum name='XML_WITH_PUSH' file='parser' value='4' type='xmlFeature'/>
+ <enum name='XML_WITH_READER' file='parser' value='5' type='xmlFeature'/>
+ <enum name='XML_WITH_REGEXP' file='parser' value='22' type='xmlFeature'/>
+ <enum name='XML_WITH_SAX1' file='parser' value='8' type='xmlFeature'/>
+ <enum name='XML_WITH_SCHEMAS' file='parser' value='25' type='xmlFeature'/>
+ <enum name='XML_WITH_SCHEMATRON' file='parser' value='26' type='xmlFeature'/>
+ <enum name='XML_WITH_THREAD' file='parser' value='1' type='xmlFeature'/>
+ <enum name='XML_WITH_TREE' file='parser' value='2' type='xmlFeature'/>
+ <enum name='XML_WITH_UNICODE' file='parser' value='21' type='xmlFeature'/>
+ <enum name='XML_WITH_VALID' file='parser' value='11' type='xmlFeature'/>
+ <enum name='XML_WITH_WRITER' file='parser' value='7' type='xmlFeature'/>
+ <enum name='XML_WITH_XINCLUDE' file='parser' value='18' type='xmlFeature'/>
+ <enum name='XML_WITH_XPATH' file='parser' value='16' type='xmlFeature'/>
+ <enum name='XML_WITH_XPTR' file='parser' value='17' type='xmlFeature'/>
+ <enum name='XML_WITH_ZLIB' file='parser' value='31' type='xmlFeature'/>
+ <enum name='XML_XINCLUDE_BUILD_FAILED' file='xmlerror' value='1609' type='xmlParserErrors' info='1609'/>
+ <enum name='XML_XINCLUDE_DEPRECATED_NS' file='xmlerror' value='1617' type='xmlParserErrors' info='1617'/>
+ <enum name='XML_XINCLUDE_END' file='tree' value='20' type='xmlElementType'/>
+ <enum name='XML_XINCLUDE_ENTITY_DEF_MISMATCH' file='xmlerror' value='1602' type='xmlParserErrors' info='1602'/>
+ <enum name='XML_XINCLUDE_FALLBACKS_IN_INCLUDE' file='xmlerror' value='1615' type='xmlParserErrors' info='1615'/>
+ <enum name='XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE' file='xmlerror' value='1616' type='xmlParserErrors' info='1616'/>
+ <enum name='XML_XINCLUDE_FRAGMENT_ID' file='xmlerror' value='1618' type='xmlParserErrors' info='1618'/>
+ <enum name='XML_XINCLUDE_HREF_URI' file='xmlerror' value='1605' type='xmlParserErrors' info='1605'/>
+ <enum name='XML_XINCLUDE_INCLUDE_IN_INCLUDE' file='xmlerror' value='1614' type='xmlParserErrors' info='1614'/>
+ <enum name='XML_XINCLUDE_INVALID_CHAR' file='xmlerror' value='1608' type='xmlParserErrors' info='1608'/>
+ <enum name='XML_XINCLUDE_MULTIPLE_ROOT' file='xmlerror' value='1611' type='xmlParserErrors' info='1611'/>
+ <enum name='XML_XINCLUDE_NO_FALLBACK' file='xmlerror' value='1604' type='xmlParserErrors' info='1604'/>
+ <enum name='XML_XINCLUDE_NO_HREF' file='xmlerror' value='1603' type='xmlParserErrors' info='1603'/>
+ <enum name='XML_XINCLUDE_PARSE_VALUE' file='xmlerror' value='1601' type='xmlParserErrors' info='1601'/>
+ <enum name='XML_XINCLUDE_RECURSION' file='xmlerror' value='1600' type='xmlParserErrors'/>
+ <enum name='XML_XINCLUDE_START' file='tree' value='19' type='xmlElementType'/>
+ <enum name='XML_XINCLUDE_TEXT_DOCUMENT' file='xmlerror' value='1607' type='xmlParserErrors' info='1607'/>
+ <enum name='XML_XINCLUDE_TEXT_FRAGMENT' file='xmlerror' value='1606' type='xmlParserErrors' info='1606'/>
+ <enum name='XML_XINCLUDE_UNKNOWN_ENCODING' file='xmlerror' value='1610' type='xmlParserErrors' info='1610'/>
+ <enum name='XML_XINCLUDE_XPTR_FAILED' file='xmlerror' value='1612' type='xmlParserErrors' info='1612'/>
+ <enum name='XML_XINCLUDE_XPTR_RESULT' file='xmlerror' value='1613' type='xmlParserErrors' info='1613'/>
+ <enum name='XML_XPATH_ENCODING_ERROR' file='xmlerror' value='1220' type='xmlParserErrors' info='1220'/>
+ <enum name='XML_XPATH_EXPRESSION_OK' file='xmlerror' value='1200' type='xmlParserErrors'/>
+ <enum name='XML_XPATH_EXPR_ERROR' file='xmlerror' value='1207' type='xmlParserErrors' info='1207'/>
+ <enum name='XML_XPATH_INVALID_ARITY' file='xmlerror' value='1212' type='xmlParserErrors' info='1212'/>
+ <enum name='XML_XPATH_INVALID_CHAR_ERROR' file='xmlerror' value='1221' type='xmlParserErrors' info='1221'/>
+ <enum name='XML_XPATH_INVALID_CTXT_POSITION' file='xmlerror' value='1214' type='xmlParserErrors' info='1214'/>
+ <enum name='XML_XPATH_INVALID_CTXT_SIZE' file='xmlerror' value='1213' type='xmlParserErrors' info='1213'/>
+ <enum name='XML_XPATH_INVALID_OPERAND' file='xmlerror' value='1210' type='xmlParserErrors' info='1210'/>
+ <enum name='XML_XPATH_INVALID_PREDICATE_ERROR' file='xmlerror' value='1206' type='xmlParserErrors' info='1206'/>
+ <enum name='XML_XPATH_INVALID_TYPE' file='xmlerror' value='1211' type='xmlParserErrors' info='1211'/>
+ <enum name='XML_XPATH_MEMORY_ERROR' file='xmlerror' value='1215' type='xmlParserErrors' info='1215'/>
+ <enum name='XML_XPATH_NUMBER_ERROR' file='xmlerror' value='1201' type='xmlParserErrors' info='1201'/>
+ <enum name='XML_XPATH_START_LITERAL_ERROR' file='xmlerror' value='1203' type='xmlParserErrors' info='1203'/>
+ <enum name='XML_XPATH_UNCLOSED_ERROR' file='xmlerror' value='1208' type='xmlParserErrors' info='1208'/>
+ <enum name='XML_XPATH_UNDEF_PREFIX_ERROR' file='xmlerror' value='1219' type='xmlParserErrors' info='1219'/>
+ <enum name='XML_XPATH_UNDEF_VARIABLE_ERROR' file='xmlerror' value='1205' type='xmlParserErrors' info='1205'/>
+ <enum name='XML_XPATH_UNFINISHED_LITERAL_ERROR' file='xmlerror' value='1202' type='xmlParserErrors' info='1202'/>
+ <enum name='XML_XPATH_UNKNOWN_FUNC_ERROR' file='xmlerror' value='1209' type='xmlParserErrors' info='1209'/>
+ <enum name='XML_XPATH_VARIABLE_REF_ERROR' file='xmlerror' value='1204' type='xmlParserErrors' info='1204'/>
+ <enum name='XML_XPTR_CHILDSEQ_START' file='xmlerror' value='1901' type='xmlParserErrors' info='1901'/>
+ <enum name='XML_XPTR_EVAL_FAILED' file='xmlerror' value='1902' type='xmlParserErrors' info='1902'/>
+ <enum name='XML_XPTR_EXTRA_OBJECTS' file='xmlerror' value='1903' type='xmlParserErrors' info='1903'/>
+ <enum name='XML_XPTR_RESOURCE_ERROR' file='xmlerror' value='1217' type='xmlParserErrors' info='1217'/>
+ <enum name='XML_XPTR_SUB_RESOURCE_ERROR' file='xmlerror' value='1218' type='xmlParserErrors' info='1218'/>
+ <enum name='XML_XPTR_SYNTAX_ERROR' file='xmlerror' value='1216' type='xmlParserErrors' info='1216'/>
+ <enum name='XML_XPTR_UNKNOWN_SCHEME' file='xmlerror' value='1900' type='xmlParserErrors'/>
+ <enum name='XPATH_BOOLEAN' file='xpath' value='2' type='xmlXPathObjectType'/>
+ <enum name='XPATH_ENCODING_ERROR' file='xpath' value='20' type='xmlXPathError'/>
+ <enum name='XPATH_EXPRESSION_OK' file='xpath' value='0' type='xmlXPathError'/>
+ <enum name='XPATH_EXPR_ERROR' file='xpath' value='7' type='xmlXPathError'/>
+ <enum name='XPATH_FORBID_VARIABLE_ERROR' file='xpath' value='24' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_ARITY' file='xpath' value='12' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_CHAR_ERROR' file='xpath' value='21' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_CTXT' file='xpath' value='22' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_CTXT_POSITION' file='xpath' value='14' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_CTXT_SIZE' file='xpath' value='13' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_OPERAND' file='xpath' value='10' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_PREDICATE_ERROR' file='xpath' value='6' type='xmlXPathError'/>
+ <enum name='XPATH_INVALID_TYPE' file='xpath' value='11' type='xmlXPathError'/>
+ <enum name='XPATH_LOCATIONSET' file='xpath' value='7' type='xmlXPathObjectType'/>
+ <enum name='XPATH_MEMORY_ERROR' file='xpath' value='15' type='xmlXPathError'/>
+ <enum name='XPATH_NODESET' file='xpath' value='1' type='xmlXPathObjectType'/>
+ <enum name='XPATH_NUMBER' file='xpath' value='3' type='xmlXPathObjectType'/>
+ <enum name='XPATH_NUMBER_ERROR' file='xpath' value='1' type='xmlXPathError'/>
+ <enum name='XPATH_POINT' file='xpath' value='5' type='xmlXPathObjectType'/>
+ <enum name='XPATH_RANGE' file='xpath' value='6' type='xmlXPathObjectType'/>
+ <enum name='XPATH_STACK_ERROR' file='xpath' value='23' type='xmlXPathError'/>
+ <enum name='XPATH_START_LITERAL_ERROR' file='xpath' value='3' type='xmlXPathError'/>
+ <enum name='XPATH_STRING' file='xpath' value='4' type='xmlXPathObjectType'/>
+ <enum name='XPATH_UNCLOSED_ERROR' file='xpath' value='8' type='xmlXPathError'/>
+ <enum name='XPATH_UNDEFINED' file='xpath' value='0' type='xmlXPathObjectType'/>
+ <enum name='XPATH_UNDEF_PREFIX_ERROR' file='xpath' value='19' type='xmlXPathError'/>
+ <enum name='XPATH_UNDEF_VARIABLE_ERROR' file='xpath' value='5' type='xmlXPathError'/>
+ <enum name='XPATH_UNFINISHED_LITERAL_ERROR' file='xpath' value='2' type='xmlXPathError'/>
+ <enum name='XPATH_UNKNOWN_FUNC_ERROR' file='xpath' value='9' type='xmlXPathError'/>
+ <enum name='XPATH_USERS' file='xpath' value='8' type='xmlXPathObjectType'/>
+ <enum name='XPATH_VARIABLE_REF_ERROR' file='xpath' value='4' type='xmlXPathError'/>
+ <enum name='XPATH_XSLT_TREE' file='xpath' value='9' type='xmlXPathObjectType' info=' An XSLT value tree, non modifiable'/>
+ <enum name='XPTR_RESOURCE_ERROR' file='xpath' value='17' type='xmlXPathError'/>
+ <enum name='XPTR_SUB_RESOURCE_ERROR' file='xpath' value='18' type='xmlXPathError'/>
+ <enum name='XPTR_SYNTAX_ERROR' file='xpath' value='16' type='xmlXPathError'/>
+ <typedef name='docbDocPtr' file='DOCBparser' type='xmlDocPtr'/>
+ <typedef name='docbParserCtxt' file='DOCBparser' type='xmlParserCtxt'/>
+ <typedef name='docbParserCtxtPtr' file='DOCBparser' type='xmlParserCtxtPtr'/>
+ <typedef name='docbParserInput' file='DOCBparser' type='xmlParserInput'/>
+ <typedef name='docbParserInputPtr' file='DOCBparser' type='xmlParserInputPtr'/>
+ <typedef name='docbSAXHandler' file='DOCBparser' type='xmlSAXHandler'/>
+ <typedef name='docbSAXHandlerPtr' file='DOCBparser' type='xmlSAXHandlerPtr'/>
+ <typedef name='htmlDocPtr' file='HTMLparser' type='xmlDocPtr'/>
+ <struct name='htmlElemDesc' file='HTMLparser' type='struct _htmlElemDesc'>
+ <field name='name' type='const char *' info=' The tag name'/>
+ <field name='startTag' type='char' info=' Whether the start tag can be implied'/>
+ <field name='endTag' type='char' info=' Whether the end tag can be implied'/>
+ <field name='saveEndTag' type='char' info=' Whether the end tag should be saved'/>
+ <field name='empty' type='char' info=' Is this an empty element ?'/>
+ <field name='depr' type='char' info=' Is this a deprecated element ?'/>
+ <field name='dtd' type='char' info=' 1: only in Loose DTD, 2: only Frameset one'/>
+ <field name='isinline' type='char' info=' is this a block 0 or inline 1 element'/>
+ <field name='desc' type='const char *' info=' the description NRK Jan.2003
+* New fields encapsulating HTML structure
+*
+* Bugs:
+* This is a very limited representation. It fails to tell us when
+* an element *requires* subelements (we only have whether they&apos;re
+* allowed or not), and it doesn&apos;t tell us where CDATA and PCDATA
+* are allowed. Some element relationships are not fully represented:
+* these are flagged with the word MODIFIER
+*'/>
+ <field name='subelts' type='const char **' info=' allowed sub-elements of this element'/>
+ <field name='defaultsubelt' type='const char *' info=' subelement for suggested auto-repair
+if necessary or NULL'/>
+ <field name='attrs_opt' type='const char **' info=' Optional Attributes'/>
+ <field name='attrs_depr' type='const char **' info=' Additional deprecated attributes'/>
+ <field name='attrs_req' type='const char **' info=' Required attributes'/>
+ </struct>
+ <typedef name='htmlElemDescPtr' file='HTMLparser' type='htmlElemDesc *'/>
+ <struct name='htmlEntityDesc' file='HTMLparser' type='struct _htmlEntityDesc'>
+ <field name='value' type='unsigned int' info=' the UNICODE value for the character'/>
+ <field name='name' type='const char *' info=' The entity name'/>
+ <field name='desc' type='const char *' info=' the description'/>
+ </struct>
+ <typedef name='htmlEntityDescPtr' file='HTMLparser' type='htmlEntityDesc *'/>
+ <typedef name='htmlNodePtr' file='HTMLparser' type='xmlNodePtr'/>
+ <typedef name='htmlParserCtxt' file='HTMLparser' type='xmlParserCtxt'/>
+ <typedef name='htmlParserCtxtPtr' file='HTMLparser' type='xmlParserCtxtPtr'/>
+ <typedef name='htmlParserInput' file='HTMLparser' type='xmlParserInput'/>
+ <typedef name='htmlParserInputPtr' file='HTMLparser' type='xmlParserInputPtr'/>
+ <typedef name='htmlParserNodeInfo' file='HTMLparser' type='xmlParserNodeInfo'/>
+ <typedef name='htmlParserOption' file='HTMLparser' type='enum'/>
+ <typedef name='htmlSAXHandler' file='HTMLparser' type='xmlSAXHandler'/>
+ <typedef name='htmlSAXHandlerPtr' file='HTMLparser' type='xmlSAXHandlerPtr'/>
+ <typedef name='htmlStatus' file='HTMLparser' type='enum'/>
+ <struct name='uconv_t' file='encoding' type='struct _uconv_t'>
+ <field name='uconv' type='UConverter *' info=' for conversion between an encoding and UTF-16'/>
+ <field name='utf8' type='UConverter *' info=' for conversion between UTF-8 and UTF-16'/>
+ </struct>
+ <typedef name='xlinkActuate' file='xlink' type='enum'/>
+ <typedef name='xlinkHRef' file='xlink' type='xmlChar *'/>
+ <struct name='xlinkHandler' file='xlink' type='struct _xlinkHandler'>
+ <field name='simple' type='xlinkSimpleLinkFunk' info=''/>
+ <field name='extended' type='xlinkExtendedLinkFunk' info=''/>
+ <field name='set' type='xlinkExtendedLinkSetFunk' info=''/>
+ </struct>
+ <typedef name='xlinkHandlerPtr' file='xlink' type='xlinkHandler *'/>
+ <typedef name='xlinkRole' file='xlink' type='xmlChar *'/>
+ <typedef name='xlinkShow' file='xlink' type='enum'/>
+ <typedef name='xlinkTitle' file='xlink' type='xmlChar *'/>
+ <typedef name='xlinkType' file='xlink' type='enum'/>
+ <struct name='xmlAttr' file='tree' type='struct _xmlAttr'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_ATTRIBUTE_NODE, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' the name of the property'/>
+ <field name='children' type='struct _xmlNode *' info=' the value of the property'/>
+ <field name='last' type='struct _xmlNode *' info=' NULL'/>
+ <field name='parent' type='struct _xmlNode *' info=' child-&gt;parent link'/>
+ <field name='next' type='struct _xmlAttr *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlAttr *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document'/>
+ <field name='ns' type='xmlNs *' info=' pointer to the associated namespace'/>
+ <field name='atype' type='xmlAttributeType' info=' the attribute type if validating'/>
+ <field name='psvi' type='void *' info=' for type/PSVI informations'/>
+ </struct>
+ <typedef name='xmlAttrPtr' file='tree' type='xmlAttr *'/>
+ <struct name='xmlAttribute' file='tree' type='struct _xmlAttribute'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_ATTRIBUTE_DECL, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' Attribute name'/>
+ <field name='children' type='struct _xmlNode *' info=' NULL'/>
+ <field name='last' type='struct _xmlNode *' info=' NULL'/>
+ <field name='parent' type='struct _xmlDtd *' info=' -&gt; DTD'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document'/>
+ <field name='nexth' type='struct _xmlAttribute *' info=' next in hash table'/>
+ <field name='atype' type='xmlAttributeType' info=' The attribute type'/>
+ <field name='def' type='xmlAttributeDefault' info=' the default'/>
+ <field name='defaultValue' type='const xmlChar *' info=' or the default value'/>
+ <field name='tree' type='xmlEnumerationPtr' info=' or the enumeration tree if any'/>
+ <field name='prefix' type='const xmlChar *' info=' the namespace prefix if any'/>
+ <field name='elem' type='const xmlChar *' info=' Element holding the attribute'/>
+ </struct>
+ <typedef name='xmlAttributeDefault' file='tree' type='enum'/>
+ <typedef name='xmlAttributePtr' file='tree' type='xmlAttribute *'/>
+ <struct name='xmlAttributeTable' file='valid' type='struct _xmlHashTable'/>
+ <typedef name='xmlAttributeTablePtr' file='valid' type='xmlAttributeTable *'/>
+ <typedef name='xmlAttributeType' file='tree' type='enum'/>
+ <struct name='xmlAutomata' file='xmlautomata' type='struct _xmlAutomata'/>
+ <typedef name='xmlAutomataPtr' file='xmlautomata' type='xmlAutomata *'>
+ <info>A libxml automata description, It can be compiled into a regexp</info>
+ </typedef>
+ <struct name='xmlAutomataState' file='xmlautomata' type='struct _xmlAutomataState'/>
+ <typedef name='xmlAutomataStatePtr' file='xmlautomata' type='xmlAutomataState *'>
+ <info>A state int the automata description,</info>
+ </typedef>
+ <struct name='xmlBuf' file='tree' type='struct _xmlBuf'/>
+ <typedef name='xmlBufPtr' file='tree' type='xmlBuf *'>
+ <info>A pointer to a buffer structure, the actual structure internals are not public</info>
+ </typedef>
+ <struct name='xmlBuffer' file='tree' type='struct _xmlBuffer'>
+ <field name='content' type='xmlChar *' info=' The buffer content UTF8'/>
+ <field name='use' type='unsigned int' info=' The buffer size used'/>
+ <field name='size' type='unsigned int' info=' The buffer size'/>
+ <field name='alloc' type='xmlBufferAllocationScheme' info=' The realloc method'/>
+ <field name='contentIO' type='xmlChar *' info=' in IO mode we may have a different base'/>
+ </struct>
+ <typedef name='xmlBufferAllocationScheme' file='tree' type='enum'/>
+ <typedef name='xmlBufferPtr' file='tree' type='xmlBuffer *'/>
+ <typedef name='xmlC14NMode' file='c14n' type='enum'/>
+ <struct name='xmlCatalog' file='catalog' type='struct _xmlCatalog'/>
+ <typedef name='xmlCatalogAllow' file='catalog' type='enum'/>
+ <typedef name='xmlCatalogPrefer' file='catalog' type='enum'/>
+ <typedef name='xmlCatalogPtr' file='catalog' type='xmlCatalog *'/>
+ <struct name='xmlChLRange' file='chvalid' type='struct _xmlChLRange'>
+ <field name='low' type='unsigned int' info=''/>
+ <field name='high' type='unsigned int' info=''/>
+ </struct>
+ <typedef name='xmlChLRangePtr' file='chvalid' type='xmlChLRange *'/>
+ <struct name='xmlChRangeGroup' file='chvalid' type='struct _xmlChRangeGroup'>
+ <field name='nbShortRange' type='int' info=''/>
+ <field name='nbLongRange' type='int' info=''/>
+ <field name='shortRange' type='const xmlChSRange *' info=' points to an array of ranges'/>
+ <field name='longRange' type='const xmlChLRange *' info=''/>
+ </struct>
+ <typedef name='xmlChRangeGroupPtr' file='chvalid' type='xmlChRangeGroup *'/>
+ <struct name='xmlChSRange' file='chvalid' type='struct _xmlChSRange'>
+ <field name='low' type='unsigned short' info=''/>
+ <field name='high' type='unsigned short' info=''/>
+ </struct>
+ <typedef name='xmlChSRangePtr' file='chvalid' type='xmlChSRange *'/>
+ <typedef name='xmlChar' file='xmlstring' type='unsigned char'>
+ <info>This is a basic byte in an UTF-8 encoded string. It&apos;s unsigned allowing to pinpoint case where char * are assigned to xmlChar * (possibly making serialization back impossible).</info>
+ </typedef>
+ <typedef name='xmlCharEncoding' file='encoding' type='enum'/>
+ <struct name='xmlCharEncodingHandler' file='encoding' type='struct _xmlCharEncodingHandler'>
+ <field name='name' type='char *' info=''/>
+ <field name='input' type='xmlCharEncodingInputFunc' info=''/>
+ <field name='output' type='xmlCharEncodingOutputFunc' info=''/>
+ <field name='iconv_in' type='iconv_t' info=''/>
+ <field name='iconv_out' type='iconv_t' info=''/>
+ <field name='uconv_in' type='uconv_t *' info=''/>
+ <field name='uconv_out' type='uconv_t *' info=''/>
+ </struct>
+ <typedef name='xmlCharEncodingHandlerPtr' file='encoding' type='xmlCharEncodingHandler *'/>
+ <struct name='xmlDOMWrapCtxt' file='tree' type='struct _xmlDOMWrapCtxt'>
+ <field name='_private' type='void *' info='* The type of this context, just in case we need specialized
+* contexts in the future.
+*'/>
+ <field name='type' type='int' info='* Internal namespace map used for various operations.
+*'/>
+ <field name='namespaceMap' type='void *' info='* Use this one to acquire an xmlNsPtr intended for node-&gt;ns.
+* (Note that this is not intended for elem-&gt;nsDef).
+*'/>
+ <field name='getNsForNodeFunc' type='xmlDOMWrapAcquireNsFunction' info=''/>
+ </struct>
+ <typedef name='xmlDOMWrapCtxtPtr' file='tree' type='xmlDOMWrapCtxt *'/>
+ <struct name='xmlDict' file='dict' type='struct _xmlDict'/>
+ <typedef name='xmlDictPtr' file='dict' type='xmlDict *'/>
+ <struct name='xmlDoc' file='tree' type='struct _xmlDoc'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_DOCUMENT_NODE, must be second !'/>
+ <field name='name' type='char *' info=' name/filename/URI of the document'/>
+ <field name='children' type='struct _xmlNode *' info=' the document tree'/>
+ <field name='last' type='struct _xmlNode *' info=' last child link'/>
+ <field name='parent' type='struct _xmlNode *' info=' child-&gt;parent link'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' autoreference to itself End of common part'/>
+ <field name='compression' type='int' info=' level of zlib compression'/>
+ <field name='standalone' type='int' info=' standalone document (no external refs)
+1 if standalone=&quot;yes&quot;
+0 if standalone=&quot;no&quot;
+-1 if there is no XML declaration
+-2 if there is an XML declaration, but no
+standalone attribute was specified'/>
+ <field name='intSubset' type='struct _xmlDtd *' info=' the document internal subset'/>
+ <field name='extSubset' type='struct _xmlDtd *' info=' the document external subset'/>
+ <field name='oldNs' type='struct _xmlNs *' info=' Global namespace, the old way'/>
+ <field name='version' type='const xmlChar *' info=' the XML version string'/>
+ <field name='encoding' type='const xmlChar *' info=' external initial encoding, if any'/>
+ <field name='ids' type='void *' info=' Hash table for ID attributes if any'/>
+ <field name='refs' type='void *' info=' Hash table for IDREFs attributes if any'/>
+ <field name='URL' type='const xmlChar *' info=' The URI for that document'/>
+ <field name='charset' type='int' info=' encoding of the in-memory content
+actually an xmlCharEncoding'/>
+ <field name='dict' type='struct _xmlDict *' info=' dict used to allocate names or NULL'/>
+ <field name='psvi' type='void *' info=' for type/PSVI informations'/>
+ <field name='parseFlags' type='int' info=' set of xmlParserOption used to parse the
+document'/>
+ <field name='properties' type='int' info=' set of xmlDocProperties for this document
+set at the end of parsing'/>
+ </struct>
+ <typedef name='xmlDocProperties' file='tree' type='enum'/>
+ <typedef name='xmlDocPtr' file='tree' type='xmlDoc *'/>
+ <struct name='xmlDtd' file='tree' type='struct _xmlDtd'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_DTD_NODE, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' Name of the DTD'/>
+ <field name='children' type='struct _xmlNode *' info=' the value of the property link'/>
+ <field name='last' type='struct _xmlNode *' info=' last child link'/>
+ <field name='parent' type='struct _xmlDoc *' info=' child-&gt;parent link'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document End of common part'/>
+ <field name='notations' type='void *' info=' Hash table for notations if any'/>
+ <field name='elements' type='void *' info=' Hash table for elements if any'/>
+ <field name='attributes' type='void *' info=' Hash table for attributes if any'/>
+ <field name='entities' type='void *' info=' Hash table for entities if any'/>
+ <field name='ExternalID' type='const xmlChar *' info=' External identifier for PUBLIC DTD'/>
+ <field name='SystemID' type='const xmlChar *' info=' URI for a SYSTEM or PUBLIC DTD'/>
+ <field name='pentities' type='void *' info=' Hash table for param entities if any'/>
+ </struct>
+ <typedef name='xmlDtdPtr' file='tree' type='xmlDtd *'/>
+ <struct name='xmlElement' file='tree' type='struct _xmlElement'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_ELEMENT_DECL, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' Element name'/>
+ <field name='children' type='struct _xmlNode *' info=' NULL'/>
+ <field name='last' type='struct _xmlNode *' info=' NULL'/>
+ <field name='parent' type='struct _xmlDtd *' info=' -&gt; DTD'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document'/>
+ <field name='etype' type='xmlElementTypeVal' info=' The type'/>
+ <field name='content' type='xmlElementContentPtr' info=' the allowed element content'/>
+ <field name='attributes' type='xmlAttributePtr' info=' List of the declared attributes'/>
+ <field name='prefix' type='const xmlChar *' info=' the namespace prefix if any'/>
+ <field name='contModel' type='xmlRegexpPtr' info=' the validating regexp'/>
+ <field name='contModel' type='void *' info=''/>
+ </struct>
+ <struct name='xmlElementContent' file='tree' type='struct _xmlElementContent'>
+ <field name='type' type='xmlElementContentType' info=' PCDATA, ELEMENT, SEQ or OR'/>
+ <field name='ocur' type='xmlElementContentOccur' info=' ONCE, OPT, MULT or PLUS'/>
+ <field name='name' type='const xmlChar *' info=' Element name'/>
+ <field name='c1' type='struct _xmlElementContent *' info=' first child'/>
+ <field name='c2' type='struct _xmlElementContent *' info=' second child'/>
+ <field name='parent' type='struct _xmlElementContent *' info=' parent'/>
+ <field name='prefix' type='const xmlChar *' info=' Namespace prefix'/>
+ </struct>
+ <typedef name='xmlElementContentOccur' file='tree' type='enum'/>
+ <typedef name='xmlElementContentPtr' file='tree' type='xmlElementContent *'/>
+ <typedef name='xmlElementContentType' file='tree' type='enum'/>
+ <typedef name='xmlElementPtr' file='tree' type='xmlElement *'/>
+ <struct name='xmlElementTable' file='valid' type='struct _xmlHashTable'/>
+ <typedef name='xmlElementTablePtr' file='valid' type='xmlElementTable *'/>
+ <typedef name='xmlElementType' file='tree' type='enum'/>
+ <typedef name='xmlElementTypeVal' file='tree' type='enum'/>
+ <struct name='xmlEntitiesTable' file='entities' type='struct _xmlHashTable'/>
+ <typedef name='xmlEntitiesTablePtr' file='entities' type='xmlEntitiesTable *'/>
+ <struct name='xmlEntity' file='tree' type='struct _xmlEntity'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' XML_ENTITY_DECL, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' Entity name'/>
+ <field name='children' type='struct _xmlNode *' info=' First child link'/>
+ <field name='last' type='struct _xmlNode *' info=' Last child link'/>
+ <field name='parent' type='struct _xmlDtd *' info=' -&gt; DTD'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document'/>
+ <field name='orig' type='xmlChar *' info=' content without ref substitution'/>
+ <field name='content' type='xmlChar *' info=' content or ndata if unparsed'/>
+ <field name='length' type='int' info=' the content length'/>
+ <field name='etype' type='xmlEntityType' info=' The entity type'/>
+ <field name='ExternalID' type='const xmlChar *' info=' External identifier for PUBLIC'/>
+ <field name='SystemID' type='const xmlChar *' info=' URI for a SYSTEM or PUBLIC Entity'/>
+ <field name='nexte' type='struct _xmlEntity *' info=' unused'/>
+ <field name='URI' type='const xmlChar *' info=' the full URI as computed'/>
+ <field name='owner' type='int' info=' does the entity own the childrens'/>
+ <field name='checked' type='int' info=' was the entity content checked this is also used to count entities
+* references done from that entity
+* and if it contains &apos;&lt;&apos;'/>
+ </struct>
+ <typedef name='xmlEntityPtr' file='tree' type='xmlEntity *'/>
+ <typedef name='xmlEntityType' file='entities' type='enum'/>
+ <struct name='xmlEnumeration' file='tree' type='struct _xmlEnumeration'>
+ <field name='next' type='struct _xmlEnumeration *' info=' next one'/>
+ <field name='name' type='const xmlChar *' info=' Enumeration name'/>
+ </struct>
+ <typedef name='xmlEnumerationPtr' file='tree' type='xmlEnumeration *'/>
+ <struct name='xmlError' file='xmlerror' type='struct _xmlError'>
+ <field name='domain' type='int' info=' What part of the library raised this error'/>
+ <field name='code' type='int' info=' The error code, e.g. an xmlParserError'/>
+ <field name='message' type='char *' info=' human-readable informative error message'/>
+ <field name='level' type='xmlErrorLevel' info=' how consequent is the error'/>
+ <field name='file' type='char *' info=' the filename'/>
+ <field name='line' type='int' info=' the line number if available'/>
+ <field name='str1' type='char *' info=' extra string information'/>
+ <field name='str2' type='char *' info=' extra string information'/>
+ <field name='str3' type='char *' info=' extra string information'/>
+ <field name='int1' type='int' info=' extra number information'/>
+ <field name='int2' type='int' info=' error column # or 0 if N/A (todo: rename field when we would brk ABI)'/>
+ <field name='ctxt' type='void *' info=' the parser context if available'/>
+ <field name='node' type='void *' info=' the node in the tree'/>
+ </struct>
+ <typedef name='xmlErrorDomain' file='xmlerror' type='enum'/>
+ <typedef name='xmlErrorLevel' file='xmlerror' type='enum'/>
+ <typedef name='xmlErrorPtr' file='xmlerror' type='xmlError *'/>
+ <struct name='xmlExpCtxt' file='xmlregexp' type='struct _xmlExpCtxt'/>
+ <typedef name='xmlExpCtxtPtr' file='xmlregexp' type='xmlExpCtxt *'/>
+ <struct name='xmlExpNode' file='xmlregexp' type='struct _xmlExpNode'/>
+ <typedef name='xmlExpNodePtr' file='xmlregexp' type='xmlExpNode *'/>
+ <typedef name='xmlExpNodeType' file='xmlregexp' type='enum'/>
+ <typedef name='xmlFeature' file='parser' type='enum'/>
+ <struct name='xmlGlobalState' file='globals' type='struct _xmlGlobalState'>
+ <field name='xmlParserVersion' type='const char *' info=''/>
+ <field name='xmlDefaultSAXLocator' type='xmlSAXLocator' info=''/>
+ <field name='xmlDefaultSAXHandler' type='xmlSAXHandlerV1' info=''/>
+ <field name='docbDefaultSAXHandler' type='xmlSAXHandlerV1' info=''/>
+ <field name='htmlDefaultSAXHandler' type='xmlSAXHandlerV1' info=''/>
+ <field name='xmlFree' type='xmlFreeFunc' info=''/>
+ <field name='xmlMalloc' type='xmlMallocFunc' info=''/>
+ <field name='xmlMemStrdup' type='xmlStrdupFunc' info=''/>
+ <field name='xmlRealloc' type='xmlReallocFunc' info=''/>
+ <field name='xmlGenericError' type='xmlGenericErrorFunc' info=''/>
+ <field name='xmlStructuredError' type='xmlStructuredErrorFunc' info=''/>
+ <field name='xmlGenericErrorContext' type='void *' info=''/>
+ <field name='oldXMLWDcompatibility' type='int' info=''/>
+ <field name='xmlBufferAllocScheme' type='xmlBufferAllocationScheme' info=''/>
+ <field name='xmlDefaultBufferSize' type='int' info=''/>
+ <field name='xmlSubstituteEntitiesDefaultValue' type='int' info=''/>
+ <field name='xmlDoValidityCheckingDefaultValue' type='int' info=''/>
+ <field name='xmlGetWarningsDefaultValue' type='int' info=''/>
+ <field name='xmlKeepBlanksDefaultValue' type='int' info=''/>
+ <field name='xmlLineNumbersDefaultValue' type='int' info=''/>
+ <field name='xmlLoadExtDtdDefaultValue' type='int' info=''/>
+ <field name='xmlParserDebugEntities' type='int' info=''/>
+ <field name='xmlPedanticParserDefaultValue' type='int' info=''/>
+ <field name='xmlSaveNoEmptyTags' type='int' info=''/>
+ <field name='xmlIndentTreeOutput' type='int' info=''/>
+ <field name='xmlTreeIndentString' type='const char *' info=''/>
+ <field name='xmlRegisterNodeDefaultValue' type='xmlRegisterNodeFunc' info=''/>
+ <field name='xmlDeregisterNodeDefaultValue' type='xmlDeregisterNodeFunc' info=''/>
+ <field name='xmlMallocAtomic' type='xmlMallocFunc' info=''/>
+ <field name='xmlLastError' type='xmlError' info=''/>
+ <field name='xmlParserInputBufferCreateFilenameValue' type='xmlParserInputBufferCreateFilenameFunc' info=''/>
+ <field name='xmlOutputBufferCreateFilenameValue' type='xmlOutputBufferCreateFilenameFunc' info=''/>
+ <field name='xmlStructuredErrorContext' type='void *' info=''/>
+ </struct>
+ <typedef name='xmlGlobalStatePtr' file='globals' type='xmlGlobalState *'/>
+ <struct name='xmlHashTable' file='hash' type='struct _xmlHashTable'/>
+ <typedef name='xmlHashTablePtr' file='hash' type='xmlHashTable *'/>
+ <struct name='xmlID' file='tree' type='struct _xmlID'>
+ <field name='next' type='struct _xmlID *' info=' next ID'/>
+ <field name='value' type='const xmlChar *' info=' The ID name'/>
+ <field name='attr' type='xmlAttrPtr' info=' The attribute holding it'/>
+ <field name='name' type='const xmlChar *' info=' The attribute if attr is not available'/>
+ <field name='lineno' type='int' info=' The line number if attr is not available'/>
+ <field name='doc' type='struct _xmlDoc *' info=' The document holding the ID'/>
+ </struct>
+ <typedef name='xmlIDPtr' file='tree' type='xmlID *'/>
+ <struct name='xmlIDTable' file='valid' type='struct _xmlHashTable'/>
+ <typedef name='xmlIDTablePtr' file='valid' type='xmlIDTable *'/>
+ <struct name='xmlLink' file='list' type='struct _xmlLink'/>
+ <typedef name='xmlLinkPtr' file='list' type='xmlLink *'/>
+ <struct name='xmlList' file='list' type='struct _xmlList'/>
+ <typedef name='xmlListPtr' file='list' type='xmlList *'/>
+ <struct name='xmlLocationSet' file='xpointer' type='struct _xmlLocationSet'>
+ <field name='locNr' type='int' info=' number of locations in the set'/>
+ <field name='locMax' type='int' info=' size of the array as allocated'/>
+ <field name='locTab' type='xmlXPathObjectPtr *' info=' array of locations'/>
+ </struct>
+ <typedef name='xmlLocationSetPtr' file='xpointer' type='xmlLocationSet *'/>
+ <struct name='xmlModule' file='xmlmodule' type='struct _xmlModule'/>
+ <typedef name='xmlModuleOption' file='xmlmodule' type='enum'/>
+ <typedef name='xmlModulePtr' file='xmlmodule' type='xmlModule *'>
+ <info>A handle to a dynamically loaded module</info>
+ </typedef>
+ <struct name='xmlMutex' file='threads' type='struct _xmlMutex'/>
+ <typedef name='xmlMutexPtr' file='threads' type='xmlMutex *'/>
+ <struct name='xmlNode' file='tree' type='struct _xmlNode'>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='type' type='xmlElementType' info=' type number, must be second !'/>
+ <field name='name' type='const xmlChar *' info=' the name of the node, or the entity'/>
+ <field name='children' type='struct _xmlNode *' info=' parent-&gt;childs link'/>
+ <field name='last' type='struct _xmlNode *' info=' last child link'/>
+ <field name='parent' type='struct _xmlNode *' info=' child-&gt;parent link'/>
+ <field name='next' type='struct _xmlNode *' info=' next sibling link '/>
+ <field name='prev' type='struct _xmlNode *' info=' previous sibling link '/>
+ <field name='doc' type='struct _xmlDoc *' info=' the containing document End of common part'/>
+ <field name='ns' type='xmlNs *' info=' pointer to the associated namespace'/>
+ <field name='content' type='xmlChar *' info=' the content'/>
+ <field name='properties' type='struct _xmlAttr *' info=' properties list'/>
+ <field name='nsDef' type='xmlNs *' info=' namespace definitions on this node'/>
+ <field name='psvi' type='void *' info=' for type/PSVI informations'/>
+ <field name='line' type='unsigned short' info=' line number'/>
+ <field name='extra' type='unsigned short' info=' extra data for XPath/XSLT'/>
+ </struct>
+ <typedef name='xmlNodePtr' file='tree' type='xmlNode *'/>
+ <struct name='xmlNodeSet' file='xpath' type='struct _xmlNodeSet'>
+ <field name='nodeNr' type='int' info=' number of nodes in the set'/>
+ <field name='nodeMax' type='int' info=' size of the array as allocated'/>
+ <field name='nodeTab' type='xmlNodePtr *' info=' array of nodes in no particular order @@ with_ns to check wether namespace nodes should be looked at @@'/>
+ </struct>
+ <typedef name='xmlNodeSetPtr' file='xpath' type='xmlNodeSet *'/>
+ <struct name='xmlNotation' file='tree' type='struct _xmlNotation'>
+ <field name='name' type='const xmlChar *' info=' Notation name'/>
+ <field name='PublicID' type='const xmlChar *' info=' Public identifier, if any'/>
+ <field name='SystemID' type='const xmlChar *' info=' System identifier, if any'/>
+ </struct>
+ <typedef name='xmlNotationPtr' file='tree' type='xmlNotation *'/>
+ <struct name='xmlNotationTable' file='valid' type='struct _xmlHashTable'/>
+ <typedef name='xmlNotationTablePtr' file='valid' type='xmlNotationTable *'/>
+ <struct name='xmlNs' file='tree' type='struct _xmlNs'>
+ <field name='next' type='struct _xmlNs *' info=' next Ns link for this node '/>
+ <field name='type' type='xmlNsType' info=' global or local'/>
+ <field name='href' type='const xmlChar *' info=' URL for the namespace'/>
+ <field name='prefix' type='const xmlChar *' info=' prefix for the namespace'/>
+ <field name='_private' type='void *' info=' application data'/>
+ <field name='context' type='struct _xmlDoc *' info=' normally an xmlDoc'/>
+ </struct>
+ <typedef name='xmlNsPtr' file='tree' type='xmlNs *'/>
+ <typedef name='xmlNsType' file='tree' type='xmlElementType'/>
+ <struct name='xmlOutputBuffer' file='tree' type='struct _xmlOutputBuffer'>
+ <field name='context' type='void *' info=''/>
+ <field name='writecallback' type='xmlOutputWriteCallback' info=''/>
+ <field name='closecallback' type='xmlOutputCloseCallback' info=''/>
+ <field name='encoder' type='xmlCharEncodingHandlerPtr' info=' I18N conversions to UTF-8'/>
+ <field name='buffer' type='xmlBufPtr' info=' Local buffer encoded in UTF-8 or ISOLatin'/>
+ <field name='conv' type='xmlBufPtr' info=' if encoder != NULL buffer for output'/>
+ <field name='written' type='int' info=' total number of byte written'/>
+ <field name='error' type='int' info=''/>
+ </struct>
+ <typedef name='xmlOutputBufferPtr' file='tree' type='xmlOutputBuffer *'/>
+ <struct name='xmlParserCtxt' file='tree' type='struct _xmlParserCtxt'>
+ <field name='sax' type='struct _xmlSAXHandler *' info=' The SAX handler'/>
+ <field name='userData' type='void *' info=' For SAX interface only, used by DOM build'/>
+ <field name='myDoc' type='xmlDocPtr' info=' the document being built'/>
+ <field name='wellFormed' type='int' info=' is the document well formed'/>
+ <field name='replaceEntities' type='int' info=' shall we replace entities ?'/>
+ <field name='version' type='const xmlChar *' info=' the XML version string'/>
+ <field name='encoding' type='const xmlChar *' info=' the declared encoding, if any'/>
+ <field name='standalone' type='int' info=' standalone document'/>
+ <field name='html' type='int' info=' an HTML(1)/Docbook(2) document
+* 3 is HTML after &lt;head&gt;
+* 10 is HTML after &lt;body&gt;
+* Input stream stack'/>
+ <field name='input' type='xmlParserInputPtr' info=' Current input stream'/>
+ <field name='inputNr' type='int' info=' Number of current input streams'/>
+ <field name='inputMax' type='int' info=' Max number of input streams'/>
+ <field name='inputTab' type='xmlParserInputPtr *' info=' stack of inputs Node analysis stack only used for DOM building'/>
+ <field name='node' type='xmlNodePtr' info=' Current parsed Node'/>
+ <field name='nodeNr' type='int' info=' Depth of the parsing stack'/>
+ <field name='nodeMax' type='int' info=' Max depth of the parsing stack'/>
+ <field name='nodeTab' type='xmlNodePtr *' info=' array of nodes'/>
+ <field name='record_info' type='int' info=' Whether node info should be kept'/>
+ <field name='node_seq' type='xmlParserNodeInfoSeq' info=' info about each node parsed'/>
+ <field name='errNo' type='int' info=' error code'/>
+ <field name='hasExternalSubset' type='int' info=' reference and external subset'/>
+ <field name='hasPErefs' type='int' info=' the internal subset has PE refs'/>
+ <field name='external' type='int' info=' are we parsing an external entity'/>
+ <field name='valid' type='int' info=' is the document valid'/>
+ <field name='validate' type='int' info=' shall we try to validate ?'/>
+ <field name='vctxt' type='xmlValidCtxt' info=' The validity context'/>
+ <field name='instate' type='xmlParserInputState' info=' current type of input'/>
+ <field name='token' type='int' info=' next char look-ahead'/>
+ <field name='directory' type='char *' info=' the data directory Node name stack'/>
+ <field name='name' type='const xmlChar *' info=' Current parsed Node'/>
+ <field name='nameNr' type='int' info=' Depth of the parsing stack'/>
+ <field name='nameMax' type='int' info=' Max depth of the parsing stack'/>
+ <field name='nameTab' type='const xmlChar * *' info=' array of nodes'/>
+ <field name='nbChars' type='long' info=' number of xmlChar processed'/>
+ <field name='checkIndex' type='long' info=' used by progressive parsing lookup'/>
+ <field name='keepBlanks' type='int' info=' ugly but ...'/>
+ <field name='disableSAX' type='int' info=' SAX callbacks are disabled'/>
+ <field name='inSubset' type='int' info=' Parsing is in int 1/ext 2 subset'/>
+ <field name='intSubName' type='const xmlChar *' info=' name of subset'/>
+ <field name='extSubURI' type='xmlChar *' info=' URI of external subset'/>
+ <field name='extSubSystem' type='xmlChar *' info=' SYSTEM ID of external subset xml:space values'/>
+ <field name='space' type='int *' info=' Should the parser preserve spaces'/>
+ <field name='spaceNr' type='int' info=' Depth of the parsing stack'/>
+ <field name='spaceMax' type='int' info=' Max depth of the parsing stack'/>
+ <field name='spaceTab' type='int *' info=' array of space infos'/>
+ <field name='depth' type='int' info=' to prevent entity substitution loops'/>
+ <field name='entity' type='xmlParserInputPtr' info=' used to check entities boundaries'/>
+ <field name='charset' type='int' info=' encoding of the in-memory content
+actually an xmlCharEncoding'/>
+ <field name='nodelen' type='int' info=' Those two fields are there to'/>
+ <field name='nodemem' type='int' info=' Speed up large node parsing'/>
+ <field name='pedantic' type='int' info=' signal pedantic warnings'/>
+ <field name='_private' type='void *' info=' For user data, libxml won&apos;t touch it'/>
+ <field name='loadsubset' type='int' info=' should the external subset be loaded'/>
+ <field name='linenumbers' type='int' info=' set line number in element content'/>
+ <field name='catalogs' type='void *' info=' document&apos;s own catalog'/>
+ <field name='recovery' type='int' info=' run in recovery mode'/>
+ <field name='progressive' type='int' info=' is this a progressive parsing'/>
+ <field name='dict' type='xmlDictPtr' info=' dictionnary for the parser'/>
+ <field name='atts' type='const xmlChar * *' info=' array for the attributes callbacks'/>
+ <field name='maxatts' type='int' info=' the size of the array'/>
+ <field name='docdict' type='int' info='* pre-interned strings
+*'/>
+ <field name='str_xml' type='const xmlChar *' info=''/>
+ <field name='str_xmlns' type='const xmlChar *' info=''/>
+ <field name='str_xml_ns' type='const xmlChar *' info='* Everything below is used only by the new SAX mode
+*'/>
+ <field name='sax2' type='int' info=' operating in the new SAX mode'/>
+ <field name='nsNr' type='int' info=' the number of inherited namespaces'/>
+ <field name='nsMax' type='int' info=' the size of the arrays'/>
+ <field name='nsTab' type='const xmlChar * *' info=' the array of prefix/namespace name'/>
+ <field name='attallocs' type='int *' info=' which attribute were allocated'/>
+ <field name='pushTab' type='void * *' info=' array of data for push'/>
+ <field name='attsDefault' type='xmlHashTablePtr' info=' defaulted attributes if any'/>
+ <field name='attsSpecial' type='xmlHashTablePtr' info=' non-CDATA attributes if any'/>
+ <field name='nsWellFormed' type='int' info=' is the document XML Nanespace okay'/>
+ <field name='options' type='int' info='* Those fields are needed only for treaming parsing so far
+*'/>
+ <field name='dictNames' type='int' info=' Use dictionary names for the tree'/>
+ <field name='freeElemsNr' type='int' info=' number of freed element nodes'/>
+ <field name='freeElems' type='xmlNodePtr' info=' List of freed element nodes'/>
+ <field name='freeAttrsNr' type='int' info=' number of freed attributes nodes'/>
+ <field name='freeAttrs' type='xmlAttrPtr' info='* the complete error informations for the last error.
+*'/>
+ <field name='lastError' type='xmlError' info=''/>
+ <field name='parseMode' type='xmlParserMode' info=' the parser mode'/>
+ <field name='nbentities' type='unsigned long' info=' number of entities references'/>
+ <field name='sizeentities' type='unsigned long' info=' size of parsed entities for use by HTML non-recursive parser'/>
+ <field name='nodeInfo' type='xmlParserNodeInfo *' info=' Current NodeInfo'/>
+ <field name='nodeInfoNr' type='int' info=' Depth of the parsing stack'/>
+ <field name='nodeInfoMax' type='int' info=' Max depth of the parsing stack'/>
+ <field name='nodeInfoTab' type='xmlParserNodeInfo *' info=' array of nodeInfos'/>
+ <field name='input_id' type='int' info=' we need to label inputs'/>
+ <field name='sizeentcopy' type='unsigned long' info=' volume of entity copy'/>
+ </struct>
+ <typedef name='xmlParserCtxtPtr' file='tree' type='xmlParserCtxt *'/>
+ <typedef name='xmlParserErrors' file='xmlerror' type='enum'/>
+ <struct name='xmlParserInput' file='tree' type='struct _xmlParserInput'>
+ <field name='buf' type='xmlParserInputBufferPtr' info=' UTF-8 encoded buffer'/>
+ <field name='filename' type='const char *' info=' The file analyzed, if any'/>
+ <field name='directory' type='const char *' info=' the directory/base of the file'/>
+ <field name='base' type='const xmlChar *' info=' Base of the array to parse'/>
+ <field name='cur' type='const xmlChar *' info=' Current char being parsed'/>
+ <field name='end' type='const xmlChar *' info=' end of the array to parse'/>
+ <field name='length' type='int' info=' length if known'/>
+ <field name='line' type='int' info=' Current line'/>
+ <field name='col' type='int' info='* NOTE: consumed is only tested for equality in the parser code,
+* so even if there is an overflow this should not give troubles
+* for parsing very large instances.
+*'/>
+ <field name='consumed' type='unsigned long' info=' How many xmlChars already consumed'/>
+ <field name='free' type='xmlParserInputDeallocate' info=' function to deallocate the base'/>
+ <field name='encoding' type='const xmlChar *' info=' the encoding string for entity'/>
+ <field name='version' type='const xmlChar *' info=' the version string for entity'/>
+ <field name='standalone' type='int' info=' Was that entity marked standalone'/>
+ <field name='id' type='int' info=' an unique identifier for the entity'/>
+ </struct>
+ <struct name='xmlParserInputBuffer' file='tree' type='struct _xmlParserInputBuffer'>
+ <field name='context' type='void *' info=''/>
+ <field name='readcallback' type='xmlInputReadCallback' info=''/>
+ <field name='closecallback' type='xmlInputCloseCallback' info=''/>
+ <field name='encoder' type='xmlCharEncodingHandlerPtr' info=' I18N conversions to UTF-8'/>
+ <field name='buffer' type='xmlBufPtr' info=' Local buffer encoded in UTF-8'/>
+ <field name='raw' type='xmlBufPtr' info=' if encoder != NULL buffer for raw input'/>
+ <field name='compressed' type='int' info=' -1=unknown, 0=not compressed, 1=compressed'/>
+ <field name='error' type='int' info=''/>
+ <field name='rawconsumed' type='unsigned long' info=' amount consumed from raw'/>
+ </struct>
+ <typedef name='xmlParserInputBufferPtr' file='tree' type='xmlParserInputBuffer *'/>
+ <typedef name='xmlParserInputPtr' file='tree' type='xmlParserInput *'/>
+ <typedef name='xmlParserInputState' file='parser' type='enum'/>
+ <typedef name='xmlParserMode' file='parser' type='enum'/>
+ <struct name='xmlParserNodeInfo' file='parser' type='struct _xmlParserNodeInfo'>
+ <field name='node' type='const struct _xmlNode *' info=' Position &amp; line # that text that created the node begins &amp; ends on'/>
+ <field name='begin_pos' type='unsigned long' info=''/>
+ <field name='begin_line' type='unsigned long' info=''/>
+ <field name='end_pos' type='unsigned long' info=''/>
+ <field name='end_line' type='unsigned long' info=''/>
+ </struct>
+ <typedef name='xmlParserNodeInfoPtr' file='parser' type='xmlParserNodeInfo *'/>
+ <struct name='xmlParserNodeInfoSeq' file='parser' type='struct _xmlParserNodeInfoSeq'>
+ <field name='maximum' type='unsigned long' info=''/>
+ <field name='length' type='unsigned long' info=''/>
+ <field name='buffer' type='xmlParserNodeInfo *' info=''/>
+ </struct>
+ <typedef name='xmlParserNodeInfoSeqPtr' file='parser' type='xmlParserNodeInfoSeq *'/>
+ <typedef name='xmlParserOption' file='parser' type='enum'/>
+ <typedef name='xmlParserProperties' file='xmlreader' type='enum'/>
+ <typedef name='xmlParserSeverities' file='xmlreader' type='enum'/>
+ <struct name='xmlPattern' file='pattern' type='struct _xmlPattern'/>
+ <typedef name='xmlPatternFlags' file='pattern' type='enum'/>
+ <typedef name='xmlPatternPtr' file='pattern' type='xmlPattern *'/>
+ <struct name='xmlRMutex' file='threads' type='struct _xmlRMutex'/>
+ <typedef name='xmlRMutexPtr' file='threads' type='xmlRMutex *'/>
+ <typedef name='xmlReaderTypes' file='xmlreader' type='enum'/>
+ <struct name='xmlRef' file='tree' type='struct _xmlRef'>
+ <field name='next' type='struct _xmlRef *' info=' next Ref'/>
+ <field name='value' type='const xmlChar *' info=' The Ref name'/>
+ <field name='attr' type='xmlAttrPtr' info=' The attribute holding it'/>
+ <field name='name' type='const xmlChar *' info=' The attribute if attr is not available'/>
+ <field name='lineno' type='int' info=' The line number if attr is not available'/>
+ </struct>
+ <typedef name='xmlRefPtr' file='tree' type='xmlRef *'/>
+ <struct name='xmlRefTable' file='valid' type='struct _xmlHashTable'/>
+ <typedef name='xmlRefTablePtr' file='valid' type='xmlRefTable *'/>
+ <struct name='xmlRegExecCtxt' file='xmlregexp' type='struct _xmlRegExecCtxt'/>
+ <typedef name='xmlRegExecCtxtPtr' file='xmlregexp' type='xmlRegExecCtxt *'>
+ <info>A libxml progressive regular expression evaluation context</info>
+ </typedef>
+ <struct name='xmlRegexp' file='xmlregexp' type='struct _xmlRegexp'/>
+ <typedef name='xmlRegexpPtr' file='xmlregexp' type='xmlRegexp *'>
+ <info>A libxml regular expression, they can actually be far more complex thank the POSIX regex expressions.</info>
+ </typedef>
+ <struct name='xmlRelaxNG' file='relaxng' type='struct _xmlRelaxNG'/>
+ <struct name='xmlRelaxNGParserCtxt' file='relaxng' type='struct _xmlRelaxNGParserCtxt'/>
+ <typedef name='xmlRelaxNGParserCtxtPtr' file='relaxng' type='xmlRelaxNGParserCtxt *'/>
+ <typedef name='xmlRelaxNGParserFlag' file='relaxng' type='enum'/>
+ <typedef name='xmlRelaxNGPtr' file='relaxng' type='xmlRelaxNG *'/>
+ <struct name='xmlRelaxNGValidCtxt' file='relaxng' type='struct _xmlRelaxNGValidCtxt'/>
+ <typedef name='xmlRelaxNGValidCtxtPtr' file='relaxng' type='xmlRelaxNGValidCtxt *'/>
+ <typedef name='xmlRelaxNGValidErr' file='relaxng' type='enum'/>
+ <struct name='xmlSAXHandler' file='tree' type='struct _xmlSAXHandler'>
+ <field name='internalSubset' type='internalSubsetSAXFunc' info=''/>
+ <field name='isStandalone' type='isStandaloneSAXFunc' info=''/>
+ <field name='hasInternalSubset' type='hasInternalSubsetSAXFunc' info=''/>
+ <field name='hasExternalSubset' type='hasExternalSubsetSAXFunc' info=''/>
+ <field name='resolveEntity' type='resolveEntitySAXFunc' info=''/>
+ <field name='getEntity' type='getEntitySAXFunc' info=''/>
+ <field name='entityDecl' type='entityDeclSAXFunc' info=''/>
+ <field name='notationDecl' type='notationDeclSAXFunc' info=''/>
+ <field name='attributeDecl' type='attributeDeclSAXFunc' info=''/>
+ <field name='elementDecl' type='elementDeclSAXFunc' info=''/>
+ <field name='unparsedEntityDecl' type='unparsedEntityDeclSAXFunc' info=''/>
+ <field name='setDocumentLocator' type='setDocumentLocatorSAXFunc' info=''/>
+ <field name='startDocument' type='startDocumentSAXFunc' info=''/>
+ <field name='endDocument' type='endDocumentSAXFunc' info=''/>
+ <field name='startElement' type='startElementSAXFunc' info=''/>
+ <field name='endElement' type='endElementSAXFunc' info=''/>
+ <field name='reference' type='referenceSAXFunc' info=''/>
+ <field name='characters' type='charactersSAXFunc' info=''/>
+ <field name='ignorableWhitespace' type='ignorableWhitespaceSAXFunc' info=''/>
+ <field name='processingInstruction' type='processingInstructionSAXFunc' info=''/>
+ <field name='comment' type='commentSAXFunc' info=''/>
+ <field name='warning' type='warningSAXFunc' info=''/>
+ <field name='error' type='errorSAXFunc' info=''/>
+ <field name='fatalError' type='fatalErrorSAXFunc' info=' unused error() get all the errors'/>
+ <field name='getParameterEntity' type='getParameterEntitySAXFunc' info=''/>
+ <field name='cdataBlock' type='cdataBlockSAXFunc' info=''/>
+ <field name='externalSubset' type='externalSubsetSAXFunc' info=''/>
+ <field name='initialized' type='unsigned int' info=' The following fields are extensions available only on version 2'/>
+ <field name='_private' type='void *' info=''/>
+ <field name='startElementNs' type='startElementNsSAX2Func' info=''/>
+ <field name='endElementNs' type='endElementNsSAX2Func' info=''/>
+ <field name='serror' type='xmlStructuredErrorFunc' info=''/>
+ </struct>
+ <typedef name='xmlSAXHandlerPtr' file='tree' type='xmlSAXHandler *'/>
+ <struct name='xmlSAXHandlerV1' file='parser' type='struct _xmlSAXHandlerV1'>
+ <field name='internalSubset' type='internalSubsetSAXFunc' info=''/>
+ <field name='isStandalone' type='isStandaloneSAXFunc' info=''/>
+ <field name='hasInternalSubset' type='hasInternalSubsetSAXFunc' info=''/>
+ <field name='hasExternalSubset' type='hasExternalSubsetSAXFunc' info=''/>
+ <field name='resolveEntity' type='resolveEntitySAXFunc' info=''/>
+ <field name='getEntity' type='getEntitySAXFunc' info=''/>
+ <field name='entityDecl' type='entityDeclSAXFunc' info=''/>
+ <field name='notationDecl' type='notationDeclSAXFunc' info=''/>
+ <field name='attributeDecl' type='attributeDeclSAXFunc' info=''/>
+ <field name='elementDecl' type='elementDeclSAXFunc' info=''/>
+ <field name='unparsedEntityDecl' type='unparsedEntityDeclSAXFunc' info=''/>
+ <field name='setDocumentLocator' type='setDocumentLocatorSAXFunc' info=''/>
+ <field name='startDocument' type='startDocumentSAXFunc' info=''/>
+ <field name='endDocument' type='endDocumentSAXFunc' info=''/>
+ <field name='startElement' type='startElementSAXFunc' info=''/>
+ <field name='endElement' type='endElementSAXFunc' info=''/>
+ <field name='reference' type='referenceSAXFunc' info=''/>
+ <field name='characters' type='charactersSAXFunc' info=''/>
+ <field name='ignorableWhitespace' type='ignorableWhitespaceSAXFunc' info=''/>
+ <field name='processingInstruction' type='processingInstructionSAXFunc' info=''/>
+ <field name='comment' type='commentSAXFunc' info=''/>
+ <field name='warning' type='warningSAXFunc' info=''/>
+ <field name='error' type='errorSAXFunc' info=''/>
+ <field name='fatalError' type='fatalErrorSAXFunc' info=' unused error() get all the errors'/>
+ <field name='getParameterEntity' type='getParameterEntitySAXFunc' info=''/>
+ <field name='cdataBlock' type='cdataBlockSAXFunc' info=''/>
+ <field name='externalSubset' type='externalSubsetSAXFunc' info=''/>
+ <field name='initialized' type='unsigned int' info=''/>
+ </struct>
+ <typedef name='xmlSAXHandlerV1Ptr' file='parser' type='xmlSAXHandlerV1 *'/>
+ <struct name='xmlSAXLocator' file='tree' type='struct _xmlSAXLocator'>
+ <field name='getPublicId' type='const xmlChar *(*getPublicId)' info=''/>
+ <field name='getSystemId' type='const xmlChar *(*getSystemId)' info=''/>
+ <field name='getLineNumber' type='int(*getLineNumber)' info=''/>
+ <field name='getColumnNumber' type='int(*getColumnNumber)' info=''/>
+ </struct>
+ <typedef name='xmlSAXLocatorPtr' file='tree' type='xmlSAXLocator *'/>
+ <struct name='xmlSaveCtxt' file='xmlsave' type='struct _xmlSaveCtxt'/>
+ <typedef name='xmlSaveCtxtPtr' file='xmlsave' type='xmlSaveCtxt *'/>
+ <typedef name='xmlSaveOption' file='xmlsave' type='enum'/>
+ <struct name='xmlSchema' file='xmlschemas' type='struct _xmlSchema'>
+ <field name='name' type='const xmlChar *' info=' schema name'/>
+ <field name='targetNamespace' type='const xmlChar *' info=' the target namespace'/>
+ <field name='version' type='const xmlChar *' info=''/>
+ <field name='id' type='const xmlChar *' info=' Obsolete'/>
+ <field name='doc' type='xmlDocPtr' info=''/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='flags' type='int' info=''/>
+ <field name='typeDecl' type='xmlHashTablePtr' info=''/>
+ <field name='attrDecl' type='xmlHashTablePtr' info=''/>
+ <field name='attrgrpDecl' type='xmlHashTablePtr' info=''/>
+ <field name='elemDecl' type='xmlHashTablePtr' info=''/>
+ <field name='notaDecl' type='xmlHashTablePtr' info=''/>
+ <field name='schemasImports' type='xmlHashTablePtr' info=''/>
+ <field name='_private' type='void *' info=' unused by the library for users or bindings'/>
+ <field name='groupDecl' type='xmlHashTablePtr' info=''/>
+ <field name='dict' type='xmlDictPtr' info=''/>
+ <field name='includes' type='void *' info=' the includes, this is opaque for now'/>
+ <field name='preserve' type='int' info=' whether to free the document'/>
+ <field name='counter' type='int' info=' used to give ononymous components unique names'/>
+ <field name='idcDef' type='xmlHashTablePtr' info=' All identity-constraint defs.'/>
+ <field name='volatiles' type='void *' info=' Obsolete'/>
+ </struct>
+ <struct name='xmlSchemaAnnot' file='schemasInternals' type='struct _xmlSchemaAnnot'>
+ <field name='next' type='struct _xmlSchemaAnnot *' info=''/>
+ <field name='content' type='xmlNodePtr' info=' the annotation'/>
+ </struct>
+ <typedef name='xmlSchemaAnnotPtr' file='schemasInternals' type='xmlSchemaAnnot *'/>
+ <struct name='xmlSchemaAttribute' file='schemasInternals' type='struct _xmlSchemaAttribute'>
+ <field name='type' type='xmlSchemaTypeType' info=''/>
+ <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute (not used?)'/>
+ <field name='name' type='const xmlChar *' info=' the name of the declaration'/>
+ <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='typeName' type='const xmlChar *' info=' the local name of the type definition'/>
+ <field name='typeNs' type='const xmlChar *' info=' the ns URI of the type definition'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='base' type='xmlSchemaTypePtr' info=' Deprecated; not used'/>
+ <field name='occurs' type='int' info=' Deprecated; not used'/>
+ <field name='defValue' type='const xmlChar *' info=' The initial value of the value constraint'/>
+ <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='targetNamespace' type='const xmlChar *' info=''/>
+ <field name='flags' type='int' info=''/>
+ <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value constraint'/>
+ <field name='refDecl' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
+ </struct>
+ <struct name='xmlSchemaAttributeGroup' file='schemasInternals' type='struct _xmlSchemaAttributeGroup'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='next' type='struct _xmlSchemaAttribute *' info=' the next attribute if in a group ...'/>
+ <field name='name' type='const xmlChar *' info=''/>
+ <field name='id' type='const xmlChar *' info=''/>
+ <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='flags' type='int' info=''/>
+ <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/>
+ <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='refItem' type='xmlSchemaAttributeGroupPtr' info=' Deprecated; not used'/>
+ <field name='targetNamespace' type='const xmlChar *' info=''/>
+ <field name='attrUses' type='void *' info=''/>
+ </struct>
+ <typedef name='xmlSchemaAttributeGroupPtr' file='schemasInternals' type='xmlSchemaAttributeGroup *'/>
+ <struct name='xmlSchemaAttributeLink' file='schemasInternals' type='struct _xmlSchemaAttributeLink'>
+ <field name='next' type='struct _xmlSchemaAttributeLink *' info=' the next attribute link ...'/>
+ <field name='attr' type='struct _xmlSchemaAttribute *' info=' the linked attribute'/>
+ </struct>
+ <typedef name='xmlSchemaAttributeLinkPtr' file='schemasInternals' type='xmlSchemaAttributeLink *'/>
+ <typedef name='xmlSchemaAttributePtr' file='schemasInternals' type='xmlSchemaAttribute *'/>
+ <typedef name='xmlSchemaContentType' file='schemasInternals' type='enum'/>
+ <struct name='xmlSchemaElement' file='schemasInternals' type='struct _xmlSchemaElement'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='next' type='struct _xmlSchemaType *' info=' Not used?'/>
+ <field name='name' type='const xmlChar *' info=''/>
+ <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='subtypes' type='xmlSchemaTypePtr' info=' the type definition'/>
+ <field name='attributes' type='xmlSchemaAttributePtr' info=''/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='flags' type='int' info=''/>
+ <field name='targetNamespace' type='const xmlChar *' info=''/>
+ <field name='namedType' type='const xmlChar *' info=''/>
+ <field name='namedTypeNs' type='const xmlChar *' info=''/>
+ <field name='substGroup' type='const xmlChar *' info=''/>
+ <field name='substGroupNs' type='const xmlChar *' info=''/>
+ <field name='scope' type='const xmlChar *' info=''/>
+ <field name='value' type='const xmlChar *' info=' The original value of the value constraint.'/>
+ <field name='refDecl' type='struct _xmlSchemaElement *' info=' This will now be used for the
+substitution group affiliation'/>
+ <field name='contModel' type='xmlRegexpPtr' info=' Obsolete for WXS, maybe used for RelaxNG'/>
+ <field name='contentType' type='xmlSchemaContentType' info=''/>
+ <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='defVal' type='xmlSchemaValPtr' info=' The compiled value contraint.'/>
+ <field name='idcs' type='void *' info=' The identity-constraint defs'/>
+ </struct>
+ <typedef name='xmlSchemaElementPtr' file='schemasInternals' type='xmlSchemaElement *'/>
+ <struct name='xmlSchemaFacet' file='schemasInternals' type='struct _xmlSchemaFacet'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='next' type='struct _xmlSchemaFacet *' info=' the next type if in a sequence ...'/>
+ <field name='value' type='const xmlChar *' info=' The original value'/>
+ <field name='id' type='const xmlChar *' info=' Obsolete'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='fixed' type='int' info=' XML_SCHEMAS_FACET_PRESERVE, etc.'/>
+ <field name='whitespace' type='int' info=''/>
+ <field name='val' type='xmlSchemaValPtr' info=' The compiled value'/>
+ <field name='regexp' type='xmlRegexpPtr' info=' The regex for patterns'/>
+ </struct>
+ <struct name='xmlSchemaFacetLink' file='schemasInternals' type='struct _xmlSchemaFacetLink'>
+ <field name='next' type='struct _xmlSchemaFacetLink *' info=' the next facet link ...'/>
+ <field name='facet' type='xmlSchemaFacetPtr' info=' the linked facet'/>
+ </struct>
+ <typedef name='xmlSchemaFacetLinkPtr' file='schemasInternals' type='xmlSchemaFacetLink *'/>
+ <typedef name='xmlSchemaFacetPtr' file='schemasInternals' type='xmlSchemaFacet *'/>
+ <struct name='xmlSchemaNotation' file='schemasInternals' type='struct _xmlSchemaNotation'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='name' type='const xmlChar *' info=''/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='identifier' type='const xmlChar *' info=''/>
+ <field name='targetNamespace' type='const xmlChar *' info=''/>
+ </struct>
+ <typedef name='xmlSchemaNotationPtr' file='schemasInternals' type='xmlSchemaNotation *'/>
+ <struct name='xmlSchemaParserCtxt' file='xmlschemas' type='struct _xmlSchemaParserCtxt'/>
+ <typedef name='xmlSchemaParserCtxtPtr' file='xmlschemas' type='xmlSchemaParserCtxt *'/>
+ <typedef name='xmlSchemaPtr' file='xmlschemas' type='xmlSchema *'/>
+ <typedef name='xmlSchemaSAXPlugPtr' file='xmlschemas' type='xmlSchemaSAXPlugStruct *'/>
+ <struct name='xmlSchemaSAXPlugStruct' file='xmlschemas' type='struct _xmlSchemaSAXPlug'/>
+ <struct name='xmlSchemaType' file='schemasInternals' type='struct _xmlSchemaType'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='next' type='struct _xmlSchemaType *' info=' the next type if in a sequence ...'/>
+ <field name='name' type='const xmlChar *' info=''/>
+ <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='ref' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='refNs' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='subtypes' type='xmlSchemaTypePtr' info=''/>
+ <field name='attributes' type='xmlSchemaAttributePtr' info=' Deprecated; not used'/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='flags' type='int' info=''/>
+ <field name='contentType' type='xmlSchemaContentType' info=''/>
+ <field name='base' type='const xmlChar *' info=' Base type&apos;s local name'/>
+ <field name='baseNs' type='const xmlChar *' info=' Base type&apos;s target namespace'/>
+ <field name='baseType' type='xmlSchemaTypePtr' info=' The base type component'/>
+ <field name='facets' type='xmlSchemaFacetPtr' info=' Local facets'/>
+ <field name='redef' type='struct _xmlSchemaType *' info=' Deprecated; not used'/>
+ <field name='recurse' type='int' info=' Obsolete'/>
+ <field name='attributeUses' type='xmlSchemaAttributeLinkPtr *' info=' Deprecated; not used'/>
+ <field name='attributeWildcard' type='xmlSchemaWildcardPtr' info=''/>
+ <field name='builtInType' type='int' info=' Type of built-in types.'/>
+ <field name='memberTypes' type='xmlSchemaTypeLinkPtr' info=' member-types if a union type.'/>
+ <field name='facetSet' type='xmlSchemaFacetLinkPtr' info=' All facets (incl. inherited)'/>
+ <field name='refPrefix' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='contentTypeDef' type='xmlSchemaTypePtr' info=' Used for the simple content of complex types.
+Could we use @subtypes for this?'/>
+ <field name='contModel' type='xmlRegexpPtr' info=' Holds the automaton of the content model'/>
+ <field name='targetNamespace' type='const xmlChar *' info=''/>
+ <field name='attrUses' type='void *' info=''/>
+ </struct>
+ <struct name='xmlSchemaTypeLink' file='schemasInternals' type='struct _xmlSchemaTypeLink'>
+ <field name='next' type='struct _xmlSchemaTypeLink *' info=' the next type link ...'/>
+ <field name='type' type='xmlSchemaTypePtr' info=' the linked type'/>
+ </struct>
+ <typedef name='xmlSchemaTypeLinkPtr' file='schemasInternals' type='xmlSchemaTypeLink *'/>
+ <typedef name='xmlSchemaTypePtr' file='schemasInternals' type='xmlSchemaType *'/>
+ <typedef name='xmlSchemaTypeType' file='schemasInternals' type='enum'/>
+ <struct name='xmlSchemaVal' file='schemasInternals' type='struct _xmlSchemaVal'/>
+ <typedef name='xmlSchemaValPtr' file='schemasInternals' type='xmlSchemaVal *'/>
+ <typedef name='xmlSchemaValType' file='schemasInternals' type='enum'/>
+ <struct name='xmlSchemaValidCtxt' file='xmlschemas' type='struct _xmlSchemaValidCtxt'/>
+ <typedef name='xmlSchemaValidCtxtPtr' file='xmlschemas' type='xmlSchemaValidCtxt *'/>
+ <typedef name='xmlSchemaValidError' file='xmlschemas' type='enum'/>
+ <typedef name='xmlSchemaValidOption' file='xmlschemas' type='enum'/>
+ <typedef name='xmlSchemaWhitespaceValueType' file='xmlschemastypes' type='enum'/>
+ <struct name='xmlSchemaWildcard' file='schemasInternals' type='struct _xmlSchemaWildcard'>
+ <field name='type' type='xmlSchemaTypeType' info=' The kind of type'/>
+ <field name='id' type='const xmlChar *' info=' Deprecated; not used'/>
+ <field name='annot' type='xmlSchemaAnnotPtr' info=''/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='minOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='maxOccurs' type='int' info=' Deprecated; not used'/>
+ <field name='processContents' type='int' info=''/>
+ <field name='any' type='int' info=' Indicates if the ns constraint is of ##any'/>
+ <field name='nsSet' type='xmlSchemaWildcardNsPtr' info=' The list of allowed namespaces'/>
+ <field name='negNsSet' type='xmlSchemaWildcardNsPtr' info=' The negated namespace'/>
+ <field name='flags' type='int' info=''/>
+ </struct>
+ <struct name='xmlSchemaWildcardNs' file='schemasInternals' type='struct _xmlSchemaWildcardNs'>
+ <field name='next' type='struct _xmlSchemaWildcardNs *' info=' the next constraint link ...'/>
+ <field name='value' type='const xmlChar *' info=' the value'/>
+ </struct>
+ <typedef name='xmlSchemaWildcardNsPtr' file='schemasInternals' type='xmlSchemaWildcardNs *'/>
+ <typedef name='xmlSchemaWildcardPtr' file='schemasInternals' type='xmlSchemaWildcard *'/>
+ <struct name='xmlSchematron' file='schematron' type='struct _xmlSchematron'/>
+ <struct name='xmlSchematronParserCtxt' file='schematron' type='struct _xmlSchematronParserCtxt'/>
+ <typedef name='xmlSchematronParserCtxtPtr' file='schematron' type='xmlSchematronParserCtxt *'/>
+ <typedef name='xmlSchematronPtr' file='schematron' type='xmlSchematron *'/>
+ <struct name='xmlSchematronValidCtxt' file='schematron' type='struct _xmlSchematronValidCtxt'/>
+ <typedef name='xmlSchematronValidCtxtPtr' file='schematron' type='xmlSchematronValidCtxt *'/>
+ <typedef name='xmlSchematronValidOptions' file='schematron' type='enum'/>
+ <struct name='xmlShellCtxt' file='debugXML' type='struct _xmlShellCtxt'>
+ <field name='filename' type='char *' info=''/>
+ <field name='doc' type='xmlDocPtr' info=''/>
+ <field name='node' type='xmlNodePtr' info=''/>
+ <field name='pctxt' type='xmlXPathContextPtr' info=''/>
+ <field name='loaded' type='int' info=''/>
+ <field name='output' type='FILE *' info=''/>
+ <field name='input' type='xmlShellReadlineFunc' info=''/>
+ </struct>
+ <typedef name='xmlShellCtxtPtr' file='debugXML' type='xmlShellCtxt *'/>
+ <struct name='xmlStreamCtxt' file='pattern' type='struct _xmlStreamCtxt'/>
+ <typedef name='xmlStreamCtxtPtr' file='pattern' type='xmlStreamCtxt *'/>
+ <struct name='xmlTextReader' file='xmlreader' type='struct _xmlTextReader'/>
+ <typedef name='xmlTextReaderLocatorPtr' file='xmlreader' type='void *'/>
+ <typedef name='xmlTextReaderMode' file='xmlreader' type='enum'/>
+ <typedef name='xmlTextReaderPtr' file='xmlreader' type='xmlTextReader *'>
+ <info>Pointer to an xmlReader context.</info>
+ </typedef>
+ <struct name='xmlTextWriter' file='xmlwriter' type='struct _xmlTextWriter'/>
+ <typedef name='xmlTextWriterPtr' file='xmlwriter' type='xmlTextWriter *'/>
+ <struct name='xmlURI' file='uri' type='struct _xmlURI'>
+ <field name='scheme' type='char *' info=' the URI scheme'/>
+ <field name='opaque' type='char *' info=' opaque part'/>
+ <field name='authority' type='char *' info=' the authority part'/>
+ <field name='server' type='char *' info=' the server part'/>
+ <field name='user' type='char *' info=' the user part'/>
+ <field name='port' type='int' info=' the port number'/>
+ <field name='path' type='char *' info=' the path string'/>
+ <field name='query' type='char *' info=' the query string (deprecated - use with caution)'/>
+ <field name='fragment' type='char *' info=' the fragment identifier'/>
+ <field name='cleanup' type='int' info=' parsing potentially unclean URI'/>
+ <field name='query_raw' type='char *' info=' the query string (as it appears in the URI)'/>
+ </struct>
+ <typedef name='xmlURIPtr' file='uri' type='xmlURI *'/>
+ <struct name='xmlValidCtxt' file='valid' type='struct _xmlValidCtxt'>
+ <field name='userData' type='void *' info=' user specific data block'/>
+ <field name='error' type='xmlValidityErrorFunc' info=' the callback in case of errors'/>
+ <field name='warning' type='xmlValidityWarningFunc' info=' the callback in case of warning Node analysis stack used when validating within entities'/>
+ <field name='node' type='xmlNodePtr' info=' Current parsed Node'/>
+ <field name='nodeNr' type='int' info=' Depth of the parsing stack'/>
+ <field name='nodeMax' type='int' info=' Max depth of the parsing stack'/>
+ <field name='nodeTab' type='xmlNodePtr *' info=' array of nodes'/>
+ <field name='finishDtd' type='unsigned int' info=' finished validating the Dtd ?'/>
+ <field name='doc' type='xmlDocPtr' info=' the document'/>
+ <field name='valid' type='int' info=' temporary validity check result state state used for non-determinist content validation'/>
+ <field name='vstate' type='xmlValidState *' info=' current state'/>
+ <field name='vstateNr' type='int' info=' Depth of the validation stack'/>
+ <field name='vstateMax' type='int' info=' Max depth of the validation stack'/>
+ <field name='vstateTab' type='xmlValidState *' info=' array of validation states'/>
+ <field name='am' type='xmlAutomataPtr' info=' the automata'/>
+ <field name='state' type='xmlAutomataStatePtr' info=' used to build the automata'/>
+ <field name='am' type='void *' info=''/>
+ <field name='state' type='void *' info=''/>
+ </struct>
+ <typedef name='xmlValidCtxtPtr' file='valid' type='xmlValidCtxt *'/>
+ <struct name='xmlValidState' file='valid' type='struct _xmlValidState'/>
+ <typedef name='xmlValidStatePtr' file='valid' type='xmlValidState *'/>
+ <struct name='xmlXIncludeCtxt' file='xinclude' type='struct _xmlXIncludeCtxt'/>
+ <typedef name='xmlXIncludeCtxtPtr' file='xinclude' type='xmlXIncludeCtxt *'/>
+ <struct name='xmlXPathAxis' file='xpath' type='struct _xmlXPathAxis'>
+ <field name='name' type='const xmlChar *' info=' the axis name'/>
+ <field name='func' type='xmlXPathAxisFunc' info=' the search function'/>
+ </struct>
+ <typedef name='xmlXPathAxisPtr' file='xpath' type='xmlXPathAxis *'/>
+ <struct name='xmlXPathCompExpr' file='xpath' type='struct _xmlXPathCompExpr'/>
+ <typedef name='xmlXPathCompExprPtr' file='xpath' type='xmlXPathCompExpr *'/>
+ <struct name='xmlXPathContext' file='xpath' type='struct _xmlXPathContext'>
+ <field name='doc' type='xmlDocPtr' info=' The current document'/>
+ <field name='node' type='xmlNodePtr' info=' The current node'/>
+ <field name='nb_variables_unused' type='int' info=' unused (hash table)'/>
+ <field name='max_variables_unused' type='int' info=' unused (hash table)'/>
+ <field name='varHash' type='xmlHashTablePtr' info=' Hash table of defined variables'/>
+ <field name='nb_types' type='int' info=' number of defined types'/>
+ <field name='max_types' type='int' info=' max number of types'/>
+ <field name='types' type='xmlXPathTypePtr' info=' Array of defined types'/>
+ <field name='nb_funcs_unused' type='int' info=' unused (hash table)'/>
+ <field name='max_funcs_unused' type='int' info=' unused (hash table)'/>
+ <field name='funcHash' type='xmlHashTablePtr' info=' Hash table of defined funcs'/>
+ <field name='nb_axis' type='int' info=' number of defined axis'/>
+ <field name='max_axis' type='int' info=' max number of axis'/>
+ <field name='axis' type='xmlXPathAxisPtr' info=' Array of defined axis the namespace nodes of the context node'/>
+ <field name='namespaces' type='xmlNsPtr *' info=' Array of namespaces'/>
+ <field name='nsNr' type='int' info=' number of namespace in scope'/>
+ <field name='user' type='void *' info=' function to free extra variables'/>
+ <field name='contextSize' type='int' info=' the context size'/>
+ <field name='proximityPosition' type='int' info=' the proximity position extra stuff for XPointer'/>
+ <field name='xptr' type='int' info=' is this an XPointer context?'/>
+ <field name='here' type='xmlNodePtr' info=' for here()'/>
+ <field name='origin' type='xmlNodePtr' info=' for origin() the set of namespace declarations in scope for the expression'/>
+ <field name='nsHash' type='xmlHashTablePtr' info=' The namespaces hash table'/>
+ <field name='varLookupFunc' type='xmlXPathVariableLookupFunc' info=' variable lookup func'/>
+ <field name='varLookupData' type='void *' info=' variable lookup data Possibility to link in an extra item'/>
+ <field name='extra' type='void *' info=' needed for XSLT The function name and URI when calling a function'/>
+ <field name='function' type='const xmlChar *' info=''/>
+ <field name='functionURI' type='const xmlChar *' info=' function lookup function and data'/>
+ <field name='funcLookupFunc' type='xmlXPathFuncLookupFunc' info=' function lookup func'/>
+ <field name='funcLookupData' type='void *' info=' function lookup data temporary namespace lists kept for walking the namespace axis'/>
+ <field name='tmpNsList' type='xmlNsPtr *' info=' Array of namespaces'/>
+ <field name='tmpNsNr' type='int' info=' number of namespaces in scope error reporting mechanism'/>
+ <field name='userData' type='void *' info=' user specific data block'/>
+ <field name='error' type='xmlStructuredErrorFunc' info=' the callback in case of errors'/>
+ <field name='lastError' type='xmlError' info=' the last error'/>
+ <field name='debugNode' type='xmlNodePtr' info=' the source node XSLT dictionary'/>
+ <field name='dict' type='xmlDictPtr' info=' dictionary if any'/>
+ <field name='flags' type='int' info=' flags to control compilation Cache for reusal of XPath objects'/>
+ <field name='cache' type='void *' info=''/>
+ </struct>
+ <typedef name='xmlXPathContextPtr' file='xpath' type='xmlXPathContext *'/>
+ <typedef name='xmlXPathError' file='xpath' type='enum'/>
+ <typedef name='xmlXPathFuncPtr' file='xpath' type='xmlXPathFunct *'/>
+ <struct name='xmlXPathFunct' file='xpath' type='struct _xmlXPathFunct'>
+ <field name='name' type='const xmlChar *' info=' the function name'/>
+ <field name='func' type='xmlXPathEvalFunc' info=' the evaluation function'/>
+ </struct>
+ <struct name='xmlXPathObject' file='xpath' type='struct _xmlXPathObject'>
+ <field name='type' type='xmlXPathObjectType' info=''/>
+ <field name='nodesetval' type='xmlNodeSetPtr' info=''/>
+ <field name='boolval' type='int' info=''/>
+ <field name='floatval' type='double' info=''/>
+ <field name='stringval' type='xmlChar *' info=''/>
+ <field name='user' type='void *' info=''/>
+ <field name='index' type='int' info=''/>
+ <field name='user2' type='void *' info=''/>
+ <field name='index2' type='int' info=''/>
+ </struct>
+ <typedef name='xmlXPathObjectPtr' file='xpath' type='xmlXPathObject *'/>
+ <typedef name='xmlXPathObjectType' file='xpath' type='enum'/>
+ <struct name='xmlXPathParserContext' file='xpath' type='struct _xmlXPathParserContext'>
+ <field name='cur' type='const xmlChar *' info=' the current char being parsed'/>
+ <field name='base' type='const xmlChar *' info=' the full expression'/>
+ <field name='error' type='int' info=' error code'/>
+ <field name='context' type='xmlXPathContextPtr' info=' the evaluation context'/>
+ <field name='value' type='xmlXPathObjectPtr' info=' the current value'/>
+ <field name='valueNr' type='int' info=' number of values stacked'/>
+ <field name='valueMax' type='int' info=' max number of values stacked'/>
+ <field name='valueTab' type='xmlXPathObjectPtr *' info=' stack of values'/>
+ <field name='comp' type='xmlXPathCompExprPtr' info=' the precompiled expression'/>
+ <field name='xptr' type='int' info=' it this an XPointer expression'/>
+ <field name='ancestor' type='xmlNodePtr' info=' used for walking preceding axis'/>
+ <field name='valueFrame' type='int' info=' used to limit Pop on the stack'/>
+ </struct>
+ <typedef name='xmlXPathParserContextPtr' file='xpath' type='xmlXPathParserContext *'/>
+ <struct name='xmlXPathType' file='xpath' type='struct _xmlXPathType'>
+ <field name='name' type='const xmlChar *' info=' the type name'/>
+ <field name='func' type='xmlXPathConvertFunc' info=' the conversion function'/>
+ </struct>
+ <typedef name='xmlXPathTypePtr' file='xpath' type='xmlXPathType *'/>
+ <struct name='xmlXPathVariable' file='xpath' type='struct _xmlXPathVariable'>
+ <field name='name' type='const xmlChar *' info=' the variable name'/>
+ <field name='value' type='xmlXPathObjectPtr' info=' the value'/>
+ </struct>
+ <typedef name='xmlXPathVariablePtr' file='xpath' type='xmlXPathVariable *'/>
+ <variable name='docbDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'/>
+ <variable name='emptyExp' file='xmlregexp' type='xmlExpNodePtr'/>
+ <variable name='forbiddenExp' file='xmlregexp' type='xmlExpNodePtr'/>
+ <variable name='htmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'/>
+ <variable name='oldXMLWDcompatibility' file='globals' type='int'/>
+ <variable name='xmlBufferAllocScheme' file='globals' type='xmlBufferAllocationScheme'/>
+ <variable name='xmlDefaultBufferSize' file='globals' type='int'/>
+ <variable name='xmlDefaultSAXHandler' file='globals' type='xmlSAXHandlerV1'/>
+ <variable name='xmlDefaultSAXLocator' file='globals' type='xmlSAXLocator'/>
+ <variable name='xmlDeregisterNodeDefaultValue' file='globals' type='xmlDeregisterNodeFunc'/>
+ <variable name='xmlDoValidityCheckingDefaultValue' file='globals' type='int'/>
+ <variable name='xmlFree' file='globals' type='xmlFreeFunc'/>
+ <variable name='xmlGenericError' file='globals' type='xmlGenericErrorFunc'/>
+ <variable name='xmlGenericErrorContext' file='globals' type='void *'/>
+ <variable name='xmlGetWarningsDefaultValue' file='globals' type='int'/>
+ <variable name='xmlIndentTreeOutput' file='globals' type='int'/>
+ <variable name='xmlIsBaseCharGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsCharGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsCombiningGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsDigitGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsExtenderGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsIdeographicGroup' file='chvalid' type='const xmlChRangeGroup'/>
+ <variable name='xmlIsPubidChar_tab' file='chvalid' type='const unsigned charxmlIsPubidChar_tab[256]'/>
+ <variable name='xmlKeepBlanksDefaultValue' file='globals' type='int'/>
+ <variable name='xmlLastError' file='globals' type='xmlError'/>
+ <variable name='xmlLineNumbersDefaultValue' file='globals' type='int'/>
+ <variable name='xmlLoadExtDtdDefaultValue' file='globals' type='int'/>
+ <variable name='xmlMalloc' file='globals' type='xmlMallocFunc'/>
+ <variable name='xmlMallocAtomic' file='globals' type='xmlMallocFunc'/>
+ <variable name='xmlMemStrdup' file='globals' type='xmlStrdupFunc'/>
+ <variable name='xmlOutputBufferCreateFilenameValue' file='globals' type='xmlOutputBufferCreateFilenameFunc'/>
+ <variable name='xmlParserDebugEntities' file='globals' type='int'/>
+ <variable name='xmlParserInputBufferCreateFilenameValue' file='globals' type='xmlParserInputBufferCreateFilenameFunc'/>
+ <variable name='xmlParserMaxDepth' file='parserInternals' type='unsigned int'/>
+ <variable name='xmlParserVersion' file='globals' type='const char *'/>
+ <variable name='xmlPedanticParserDefaultValue' file='globals' type='int'/>
+ <variable name='xmlRealloc' file='globals' type='xmlReallocFunc'/>
+ <variable name='xmlRegisterNodeDefaultValue' file='globals' type='xmlRegisterNodeFunc'/>
+ <variable name='xmlSaveNoEmptyTags' file='globals' type='int'/>
+ <variable name='xmlStringComment' file='parserInternals' type='const xmlCharxmlStringComment[]'/>
+ <variable name='xmlStringText' file='parserInternals' type='const xmlCharxmlStringText[]'/>
+ <variable name='xmlStringTextNoenc' file='parserInternals' type='const xmlCharxmlStringTextNoenc[]'/>
+ <variable name='xmlStructuredError' file='globals' type='xmlStructuredErrorFunc'/>
+ <variable name='xmlStructuredErrorContext' file='globals' type='void *'/>
+ <variable name='xmlSubstituteEntitiesDefaultValue' file='globals' type='int'/>
+ <variable name='xmlTreeIndentString' file='globals' type='const char *'/>
+ <variable name='xmlXPathNAN' file='xpath' type='double'/>
+ <variable name='xmlXPathNINF' file='xpath' type='double'/>
+ <variable name='xmlXPathPINF' file='xpath' type='double'/>
+ <function name='UTF8ToHtml' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</info>
+ <return type='int' info='0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ </function>
+ <function name='UTF8Toisolat1' file='encoding' module='encoding'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1 block of chars out.</info>
+ <return type='int' info='the number of bytes written if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ </function>
+ <function name='attribute' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. DEPRECATED: use xmlSAX2Attribute()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='fullname' type='const xmlChar *' info='The attribute name, including namespace prefix'/>
+ <arg name='value' type='const xmlChar *' info='The attribute value'/>
+ </function>
+ <function name='attributeDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>An attribute definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='elem' type='const xmlChar *' info='the name of the element'/>
+ <arg name='fullname' type='const xmlChar *' info='the attribute name'/>
+ <arg name='type' type='int' info='the attribute type'/>
+ <arg name='def' type='int' info='the type of default value'/>
+ <arg name='defaultValue' type='const xmlChar *' info='the attribute default value'/>
+ <arg name='tree' type='xmlEnumerationPtr' info='the tree of enumerated value set'/>
+ </function>
+ <functype name='attributeDeclSAXFunc' file='parser' module='parser'>
+ <info>An attribute definition has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='elem' type='const xmlChar *' info='the name of the element'/>
+ <arg name='fullname' type='const xmlChar *' info='the attribute name'/>
+ <arg name='type' type='int' info='the attribute type'/>
+ <arg name='def' type='int' info='the type of default value'/>
+ <arg name='defaultValue' type='const xmlChar *' info='the attribute default value'/>
+ <arg name='tree' type='xmlEnumerationPtr' info='the tree of enumerated value set'/>
+ </functype>
+ <functype name='attributeSAXFunc' file='parser' module='parser'>
+ <info>Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The attribute name, including namespace prefix'/>
+ <arg name='value' type='const xmlChar *' info='The attribute value'/>
+ </functype>
+ <function name='cdataBlock' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='The pcdata content'/>
+ <arg name='len' type='int' info='the block length'/>
+ </function>
+ <functype name='cdataBlockSAXFunc' file='parser' module='parser'>
+ <info>Called when a pcdata block has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='The pcdata content'/>
+ <arg name='len' type='int' info='the block length'/>
+ </functype>
+ <function name='characters' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </function>
+ <functype name='charactersSAXFunc' file='parser' module='parser'>
+ <info>Receiving some chars from the parser.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </functype>
+ <function name='checkNamespace' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Check that the current element namespace is the same as the one read upon parsing. DEPRECATED</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='namespace' type='xmlChar *' info='the namespace to check against'/>
+ </function>
+ <function name='comment' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>A comment has been parsed. DEPRECATED: use xmlSAX2Comment()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='the comment content'/>
+ </function>
+ <functype name='commentSAXFunc' file='parser' module='parser'>
+ <info>A comment has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='the comment content'/>
+ </functype>
+ <function name='docbCreateFileParserCtxt' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='docbParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='the SGML document encoding, or NULL'/>
+ </function>
+ <function name='docbCreatePushParserCtxt' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Create a parser context for using the DocBook SGML parser in push mode To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</info>
+ <return type='docbParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='sax' type='docbSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='chunk' type='const char *' info='a pointer to an array of chars'/>
+ <arg name='size' type='int' info='number of chars in the array'/>
+ <arg name='filename' type='const char *' info='an optional file name or URI'/>
+ <arg name='enc' type='xmlCharEncoding' info='an optional encoding'/>
+ </function>
+ <function name='docbDefaultSAXHandlerInit' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Initialize the default SAX handler</info>
+ <return type='void'/>
+ </function>
+ <function name='docbEncodeEntities' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Take a block of UTF-8 chars in and try to convert it to an ASCII plus SGML entities block of chars out.</info>
+ <return type='int' info='0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ <arg name='quoteChar' type='int' info='the quote character to escape (&apos; or &quot;) or zero.'/>
+ </function>
+ <function name='docbFreeParserCtxt' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='docbParserCtxtPtr' info='an SGML parser context'/>
+ </function>
+ <function name='docbParseChunk' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Parse a Chunk of memory</info>
+ <return type='int' info='zero if no error, the xmlParserErrors otherwise.'/>
+ <arg name='ctxt' type='docbParserCtxtPtr' info='an XML parser context'/>
+ <arg name='chunk' type='const char *' info='an char array'/>
+ <arg name='size' type='int' info='the size in byte of the chunk'/>
+ <arg name='terminate' type='int' info='last chunk indicator'/>
+ </function>
+ <function name='docbParseDoc' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>parse an SGML in-memory document and build a tree.</info>
+ <return type='docbDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='xmlChar *' info='a pointer to an array of xmlChar'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the SGML document encoding, or NULL'/>
+ </function>
+ <function name='docbParseDocument' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>parse an SGML document (and build a tree if using the standard SAX interface).</info>
+ <return type='int' info='0, -1 in case of error. the parser context is augmented as a result of the parsing.'/>
+ <arg name='ctxt' type='docbParserCtxtPtr' info='an SGML parser context'/>
+ </function>
+ <function name='docbParseFile' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>parse a Docbook SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='docbDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing document encoding, or NULL'/>
+ </function>
+ <function name='docbSAXParseDoc' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>parse an SGML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='docbDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='xmlChar *' info='a pointer to an array of xmlChar'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the SGML document encoding, or NULL'/>
+ <arg name='sax' type='docbSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='userData' type='void *' info='if using SAX, this pointer will be provided on callbacks.'/>
+ </function>
+ <function name='docbSAXParseFile' file='DOCBparser' module='DOCBparser'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>parse an SGML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='docbDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the SGML document encoding, or NULL'/>
+ <arg name='sax' type='docbSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='userData' type='void *' info='if using SAX, this pointer will be provided on callbacks.'/>
+ </function>
+ <function name='elementDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ <arg name='type' type='int' info='the element type'/>
+ <arg name='content' type='xmlElementContentPtr' info='the element value tree'/>
+ </function>
+ <functype name='elementDeclSAXFunc' file='parser' module='parser'>
+ <info>An element definition has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ <arg name='type' type='int' info='the element type'/>
+ <arg name='content' type='xmlElementContentPtr' info='the element value tree'/>
+ </functype>
+ <function name='endDocument' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <functype name='endDocumentSAXFunc' file='parser' module='parser'>
+ <info>Called when the document end has been detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </functype>
+ <function name='endElement' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The element name'/>
+ </function>
+ <functype name='endElementNsSAX2Func' file='parser' module='parser'>
+ <info>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='localname' type='const xmlChar *' info='the local name of the element'/>
+ <arg name='prefix' type='const xmlChar *' info='the element namespace prefix if available'/>
+ <arg name='URI' type='const xmlChar *' info='the element namespace name if available'/>
+ </functype>
+ <functype name='endElementSAXFunc' file='parser' module='parser'>
+ <info>Called when the end of an element has been detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The element name'/>
+ </functype>
+ <function name='entityDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='content' type='xmlChar *' info='the entity value (without processing).'/>
+ </function>
+ <functype name='entityDeclSAXFunc' file='parser' module='parser'>
+ <info>An entity definition has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='content' type='xmlChar *' info='the entity value (without processing).'/>
+ </functype>
+ <functype name='errorSAXFunc' file='parser' module='parser'>
+ <info>Display and format an error messages, callback.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </functype>
+ <function name='externalSubset' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </function>
+ <functype name='externalSubsetSAXFunc' file='parser' module='parser'>
+ <info>Callback on external subset declaration.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </functype>
+ <functype name='fatalErrorSAXFunc' file='parser' module='parser'>
+ <info>Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </functype>
+ <functype name='ftpDataCallback' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>A callback for the xmlNanoFTPGet command.</info>
+ <return type='void'/>
+ <arg name='userData' type='void *' info='the user provided context'/>
+ <arg name='data' type='const char *' info='the data received'/>
+ <arg name='len' type='int' info='its size in bytes'/>
+ </functype>
+ <functype name='ftpListCallback' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>A callback for the xmlNanoFTPList command. Note that only one of year and day:minute are specified.</info>
+ <return type='void'/>
+ <arg name='userData' type='void *' info='user provided data for the callback'/>
+ <arg name='filename' type='const char *' info='the file name (including &quot;-&gt;&quot; when links are shown)'/>
+ <arg name='attrib' type='const char *' info='the attribute string'/>
+ <arg name='owner' type='const char *' info='the owner string'/>
+ <arg name='group' type='const char *' info='the group string'/>
+ <arg name='size' type='unsigned long' info='the file size'/>
+ <arg name='links' type='int' info='the link count'/>
+ <arg name='year' type='int' info='the year'/>
+ <arg name='month' type='const char *' info='the month'/>
+ <arg name='day' type='int' info='the day'/>
+ <arg name='hour' type='int' info='the hour'/>
+ <arg name='minute' type='int' info='the minute'/>
+ </functype>
+ <function name='getColumnNumber' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()</info>
+ <return type='int' info='an int'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='getEntity' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Get an entity by name DEPRECATED: use xmlSAX2GetEntity()</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <functype name='getEntitySAXFunc' file='parser' module='parser'>
+ <info>Get an entity by name.</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </functype>
+ <function name='getLineNumber' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()</info>
+ <return type='int' info='an int'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='getNamespace' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Get the current element namespace. DEPRECATED</info>
+ <return type='xmlNsPtr' info='the xmlNsPtr or NULL if none'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='getParameterEntity' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <functype name='getParameterEntitySAXFunc' file='parser' module='parser'>
+ <info>Get a parameter entity by name.</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </functype>
+ <function name='getPublicId' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Provides the public ID e.g. &quot;-//SGMLSOURCE//DTD DEMO//EN&quot; DEPRECATED: use xmlSAX2GetPublicId()</info>
+ <return type='const xmlChar *' info='a xmlChar *'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='getSystemId' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()</info>
+ <return type='const xmlChar *' info='a xmlChar *'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='globalNamespace' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>An old global namespace has been parsed. DEPRECATED</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='href' type='const xmlChar *' info='the namespace associated URN'/>
+ <arg name='prefix' type='const xmlChar *' info='the namespace prefix'/>
+ </function>
+ <function name='hasExternalSubset' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <functype name='hasExternalSubsetSAXFunc' file='parser' module='parser'>
+ <info>Does this document has an external subset?</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </functype>
+ <function name='hasInternalSubset' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <functype name='hasInternalSubsetSAXFunc' file='parser' module='parser'>
+ <info>Does this document has an internal subset.</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </functype>
+ <function name='htmlAttrAllowed' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Checks whether an attribute is valid for an element Has full knowledge of Required and Deprecated attributes</info>
+ <return type='htmlStatus' info='one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, HTML_INVALID'/>
+ <arg name='elt' type='const htmlElemDesc *' info='HTML element'/>
+ <arg name='attr' type='const xmlChar *' info='HTML attribute'/>
+ <arg name='legacy' type='int' info='whether to allow deprecated attributes'/>
+ </function>
+ <function name='htmlAutoCloseTag' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it&apos;s children would autoclose the given tag.</info>
+ <return type='int' info='1 if autoclose, 0 otherwise'/>
+ <arg name='doc' type='htmlDocPtr' info='the HTML document'/>
+ <arg name='name' type='const xmlChar *' info='The tag name'/>
+ <arg name='elem' type='htmlNodePtr' info='the HTML element'/>
+ </function>
+ <function name='htmlCreateFileParserCtxt' file='parserInternals' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='htmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the HTML document encoding, or NULL'/>
+ </function>
+ <function name='htmlCreateMemoryParserCtxt' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Create a parser context for an HTML in-memory document.</info>
+ <return type='htmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='htmlCreatePushParserCtxt' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_PUSH_ENABLED)</cond>
+ <info>Create a parser context for using the HTML parser in push mode The value of @filename is used for fetching external entities and error/warning reports.</info>
+ <return type='htmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='sax' type='htmlSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='chunk' type='const char *' info='a pointer to an array of chars'/>
+ <arg name='size' type='int' info='number of chars in the array'/>
+ <arg name='filename' type='const char *' info='an optional file name or URI'/>
+ <arg name='enc' type='xmlCharEncoding' info='an optional encoding'/>
+ </function>
+ <function name='htmlCtxtReadDoc' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlCtxtReadFd' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlCtxtReadFile' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlCtxtReadIO' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlCtxtReadMemory' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlCtxtReset' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Reset a parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ </function>
+ <function name='htmlCtxtUseOptions' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Applies the options to the parser context</info>
+ <return type='int' info='0 in case of success, the set of unknown or unimplemented options in case of error.'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlDefaultSAXHandlerInit' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Initialize the default SAX handler</info>
+ <return type='void'/>
+ </function>
+ <function name='htmlDocContentDumpFormatOutput' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the HTML buffer output'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the encoding string'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='htmlDocContentDumpOutput' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document. Formating return/spaces are added.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the HTML buffer output'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the encoding string'/>
+ </function>
+ <function name='htmlDocDump' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document to an open FILE.</info>
+ <return type='int' info='the number of byte written or -1 in case of failure.'/>
+ <arg name='f' type='FILE *' info='the FILE*'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='htmlDocDumpMemory' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document in memory and return the xmlChar * and it&apos;s size. It&apos;s up to the caller to free the memory.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
+ <arg name='size' type='int *' info='OUT: the memory length'/>
+ </function>
+ <function name='htmlDocDumpMemoryFormat' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document in memory and return the xmlChar * and it&apos;s size. It&apos;s up to the caller to free the memory.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
+ <arg name='size' type='int *' info='OUT: the memory length'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='htmlElementAllowedHere' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Checks whether an HTML element may be a direct child of a parent element. Note - doesn&apos;t check for deprecated elements</info>
+ <return type='int' info='1 if allowed; 0 otherwise.'/>
+ <arg name='parent' type='const htmlElemDesc *' info='HTML parent element'/>
+ <arg name='elt' type='const xmlChar *' info='HTML element'/>
+ </function>
+ <function name='htmlElementStatusHere' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.</info>
+ <return type='htmlStatus' info='one of HTML_VALID, HTML_DEPRECATED, HTML_INVALID'/>
+ <arg name='parent' type='const htmlElemDesc *' info='HTML parent element'/>
+ <arg name='elt' type='const htmlElemDesc *' info='HTML element'/>
+ </function>
+ <function name='htmlEncodeEntities' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.</info>
+ <return type='int' info='0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ <arg name='quoteChar' type='int' info='the quote character to escape (&apos; or &quot;) or zero.'/>
+ </function>
+ <function name='htmlEntityLookup' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</info>
+ <return type='const htmlEntityDesc *' info='the associated htmlEntityDescPtr if found, NULL otherwise.'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ </function>
+ <function name='htmlEntityValueLookup' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.</info>
+ <return type='const htmlEntityDesc *' info='the associated htmlEntityDescPtr if found, NULL otherwise.'/>
+ <arg name='value' type='unsigned int' info='the entity&apos;s unicode value'/>
+ </function>
+ <function name='htmlFreeParserCtxt' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ </function>
+ <function name='htmlGetMetaEncoding' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Encoding definition lookup in the Meta tags</info>
+ <return type='const xmlChar *' info='the current encoding as flagged in the HTML source'/>
+ <arg name='doc' type='htmlDocPtr' info='the document'/>
+ </function>
+ <function name='htmlHandleOmittedElem' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Set and return the previous value for handling HTML omitted tags.</info>
+ <return type='int' info='the last value for 0 for no handling, 1 for auto insertion.'/>
+ <arg name='val' type='int' info='int 0 or 1'/>
+ </function>
+ <function name='htmlInitAutoClose' file='parserInternals' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Initialize the htmlStartCloseIndex for fast lookup of closing tags names. This is not reentrant. Call xmlInitParser() once before processing in case of use in multithreaded programs.</info>
+ <return type='void'/>
+ </function>
+ <function name='htmlIsAutoClosed' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it&apos;s child</info>
+ <return type='int' info='1 if autoclosed, 0 otherwise'/>
+ <arg name='doc' type='htmlDocPtr' info='the HTML document'/>
+ <arg name='elem' type='htmlNodePtr' info='the HTML element'/>
+ </function>
+ <function name='htmlIsBooleanAttr' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Determine if a given attribute is a boolean attribute.</info>
+ <return type='int' info='false if the attribute is not boolean, true otherwise.'/>
+ <arg name='name' type='const xmlChar *' info='the name of the attribute to check'/>
+ </function>
+ <function name='htmlIsScriptAttribute' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Check if an attribute is of content type Script</info>
+ <return type='int' info='1 is the attribute is a script 0 otherwise'/>
+ <arg name='name' type='const xmlChar *' info='an attribute name'/>
+ </function>
+ <function name='htmlNewDoc' file='HTMLtree' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Creates a new HTML document</info>
+ <return type='htmlDocPtr' info='a new document'/>
+ <arg name='URI' type='const xmlChar *' info='URI for the dtd, or NULL'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID of the DTD, or NULL'/>
+ </function>
+ <function name='htmlNewDocNoDtD' file='HTMLtree' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Creates a new HTML document without a DTD node if @URI and @ExternalID are NULL</info>
+ <return type='htmlDocPtr' info='a new document, do not initialize the DTD if not provided'/>
+ <arg name='URI' type='const xmlChar *' info='URI for the dtd, or NULL'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID of the DTD, or NULL'/>
+ </function>
+ <function name='htmlNewParserCtxt' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Allocate and initialize a new parser context.</info>
+ <return type='htmlParserCtxtPtr' info='the htmlParserCtxtPtr or NULL in case of allocation error'/>
+ </function>
+ <function name='htmlNodeDump' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</info>
+ <return type='int' info='the number of byte written or -1 in case of error'/>
+ <arg name='buf' type='xmlBufferPtr' info='the HTML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ </function>
+ <function name='htmlNodeDumpFile' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.</info>
+ <return type='void'/>
+ <arg name='out' type='FILE *' info='the FILE pointer'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ </function>
+ <function name='htmlNodeDumpFileFormat' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == NULL try to save in the doc encoding</info>
+ <return type='int' info='the number of byte written or -1 in case of failure.'/>
+ <arg name='out' type='FILE *' info='the FILE pointer'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='encoding' type='const char *' info='the document encoding'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='htmlNodeDumpFormatOutput' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML node, recursive behaviour,children are printed too.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the HTML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='encoding' type='const char *' info='the encoding string'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='htmlNodeDumpOutput' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the HTML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='encoding' type='const char *' info='the encoding string'/>
+ </function>
+ <function name='htmlNodeStatus' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)</info>
+ <return type='htmlStatus' info='for Element nodes, a return from htmlElementAllowedHere (if legacy allowed) or htmlElementStatusHere (otherwise). for Attribute nodes, a return from htmlAttrAllowed for other nodes, HTML_NA (no checks performed)'/>
+ <arg name='node' type='const htmlNodePtr' info='an htmlNodePtr in a tree'/>
+ <arg name='legacy' type='int' info='whether to allow deprecated elements (YES is faster here for Element nodes)'/>
+ </function>
+ <function name='htmlParseCharRef' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse Reference declarations [66] CharRef ::= &apos;&amp;#&apos; [0-9]+ &apos;;&apos; | &apos;&amp;#x&apos; [0-9a-fA-F]+ &apos;;&apos;</info>
+ <return type='int' info='the value parsed (as an int)'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ </function>
+ <function name='htmlParseChunk' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_PUSH_ENABLED)</cond>
+ <info>Parse a Chunk of memory</info>
+ <return type='int' info='zero if no error, the xmlParserErrors otherwise.'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='chunk' type='const char *' info='an char array'/>
+ <arg name='size' type='int' info='the size in byte of the chunk'/>
+ <arg name='terminate' type='int' info='last chunk indicator'/>
+ </function>
+ <function name='htmlParseDoc' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML in-memory document and build a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='xmlChar *' info='a pointer to an array of xmlChar'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the HTML document encoding, or NULL'/>
+ </function>
+ <function name='htmlParseDocument' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML document (and build a tree if using the standard SAX interface).</info>
+ <return type='int' info='0, -1 in case of error. the parser context is augmented as a result of the parsing.'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ </function>
+ <function name='htmlParseElement' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML element, this is highly recursive this is kept for compatibility with previous code versions [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue</info>
+ <return type='void'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ </function>
+ <function name='htmlParseEntityRef' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML ENTITY references [68] EntityRef ::= &apos;&amp;&apos; Name &apos;;&apos;</info>
+ <return type='const htmlEntityDesc *' info='the associated htmlEntityDescPtr if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.'/>
+ <arg name='ctxt' type='htmlParserCtxtPtr' info='an HTML parser context'/>
+ <arg name='str' type='const xmlChar **' info='location to store the entity name'/>
+ </function>
+ <function name='htmlParseFile' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the HTML document encoding, or NULL'/>
+ </function>
+ <function name='htmlReadDoc' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlReadFd' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML from a file descriptor and build a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlReadFile' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML file from the filesystem or the network.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlReadIO' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML document from I/O functions and source and build a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlReadMemory' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of htmlParserOption(s)'/>
+ </function>
+ <function name='htmlSAXParseDoc' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree.</info>
+ <return type='htmlDocPtr' info='the resulting document tree unless SAX is NULL or the document is not well formed.'/>
+ <arg name='cur' type='xmlChar *' info='a pointer to an array of xmlChar'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the HTML document encoding, or NULL'/>
+ <arg name='sax' type='htmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='userData' type='void *' info='if using SAX, this pointer will be provided on callbacks.'/>
+ </function>
+ <function name='htmlSAXParseFile' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='htmlDocPtr' info='the resulting document tree unless SAX is NULL or the document is not well formed.'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='encoding' type='const char *' info='a free form C string describing the HTML document encoding, or NULL'/>
+ <arg name='sax' type='htmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='userData' type='void *' info='if using SAX, this pointer will be provided on callbacks.'/>
+ </function>
+ <function name='htmlSaveFile' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document to a file. If @filename is &quot;-&quot; the stdout file is used.</info>
+ <return type='int' info='the number of byte written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename (or URL)'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='htmlSaveFileEnc' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.</info>
+ <return type='int' info='the number of byte written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding'/>
+ </function>
+ <function name='htmlSaveFileFormat' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an HTML document to a file using a given encoding.</info>
+ <return type='int' info='the number of byte written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='htmlSetMetaEncoding' file='HTMLtree' module='HTMLtree'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='doc' type='htmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const xmlChar *' info='the encoding string'/>
+ </function>
+ <function name='htmlTagLookup' file='HTMLparser' module='HTMLparser'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Lookup the HTML tag in the ElementTable</info>
+ <return type='const htmlElemDesc *' info='the related htmlElemDescPtr or NULL if not found.'/>
+ <arg name='tag' type='const xmlChar *' info='The tag name in lowercase'/>
+ </function>
+ <function name='ignorableWhitespace' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters DEPRECATED: use xmlSAX2IgnorableWhitespace()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </function>
+ <functype name='ignorableWhitespaceSAXFunc' file='parser' module='parser'>
+ <info>Receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </functype>
+ <function name='initGenericErrorDefaultFunc' file='xmlerror' module='error'>
+ <info>Set or reset (if NULL) the default handler for generic errors to the builtin error function.</info>
+ <return type='void'/>
+ <arg name='handler' type='xmlGenericErrorFunc *' info='the handler'/>
+ </function>
+ <function name='initdocbDefaultSAXHandler' file='SAX' module='SAX'>
+ <cond>defined(LIBXML_LEGACY_ENABLED) &amp;&amp; defined(LIBXML_SAX1_ENABLED) &amp;&amp; defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandlerV1 *' info='the SAX handler'/>
+ </function>
+ <function name='inithtmlDefaultSAXHandler' file='SAX' module='SAX'>
+ <cond>defined(LIBXML_LEGACY_ENABLED) &amp;&amp; defined(LIBXML_SAX1_ENABLED) &amp;&amp; defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandlerV1 *' info='the SAX handler'/>
+ </function>
+ <function name='initxmlDefaultSAXHandler' file='SAX' module='SAX'>
+ <cond>defined(LIBXML_LEGACY_ENABLED) &amp;&amp; defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandlerV1 *' info='the SAX handler'/>
+ <arg name='warning' type='int' info='flag if non-zero sets the handler warning procedure'/>
+ </function>
+ <function name='inputPop' file='parserInternals' module='parser'>
+ <info>Pops the top parser input from the input stack</info>
+ <return type='xmlParserInputPtr' info='the input just removed'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='inputPush' file='parserInternals' module='parser'>
+ <info>Pushes a new parser input on top of the input stack</info>
+ <return type='int' info='-1 in case of error, the index in the stack otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='value' type='xmlParserInputPtr' info='the parser input'/>
+ </function>
+ <function name='internalSubset' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </function>
+ <functype name='internalSubsetSAXFunc' file='parser' module='parser'>
+ <info>Callback on internal subset declaration.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </functype>
+ <function name='isStandalone' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <functype name='isStandaloneSAXFunc' file='parser' module='parser'>
+ <info>Is this document tagged standalone?</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </functype>
+ <function name='isolat1ToUTF8' file='encoding' module='encoding'>
+ <info>Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8 block of chars out.</info>
+ <return type='int' info='the number of bytes written if success, or -1 otherwise The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of ISO Latin 1 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ </function>
+ <function name='namePop' file='parserInternals' module='parser'>
+ <info>Pops the top element name from the name stack</info>
+ <return type='const xmlChar *' info='the name just removed'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='namePush' file='parserInternals' module='parser'>
+ <info>Pushes a new element name on top of the name stack</info>
+ <return type='int' info='-1 in case of error, the index in the stack otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='value' type='const xmlChar *' info='the element name'/>
+ </function>
+ <function name='namespaceDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>A namespace has been parsed. DEPRECATED</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='href' type='const xmlChar *' info='the namespace associated URN'/>
+ <arg name='prefix' type='const xmlChar *' info='the namespace prefix'/>
+ </function>
+ <function name='nodePop' file='parserInternals' module='parser'>
+ <info>Pops the top element node from the node stack</info>
+ <return type='xmlNodePtr' info='the node just removed'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='nodePush' file='parserInternals' module='parser'>
+ <info>Pushes a new element node on top of the node stack</info>
+ <return type='int' info='-1 in case of error, the index in the stack otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='value' type='xmlNodePtr' info='the element node'/>
+ </function>
+ <function name='notationDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the notation'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </function>
+ <functype name='notationDeclSAXFunc' file='parser' module='parser'>
+ <info>What to do when a notation declaration has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the notation'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </functype>
+ <function name='processingInstruction' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='target' type='const xmlChar *' info='the target name'/>
+ <arg name='data' type='const xmlChar *' info='the PI data&apos;s'/>
+ </function>
+ <functype name='processingInstructionSAXFunc' file='parser' module='parser'>
+ <info>A processing instruction has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='target' type='const xmlChar *' info='the target name'/>
+ <arg name='data' type='const xmlChar *' info='the PI data&apos;s'/>
+ </functype>
+ <function name='reference' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when an entity reference is detected. DEPRECATED: use xmlSAX2Reference()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <functype name='referenceSAXFunc' file='parser' module='parser'>
+ <info>Called when an entity reference is detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </functype>
+ <function name='resolveEntity' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it&apos;s own entity resolution routine DEPRECATED: use xmlSAX2ResolveEntity()</info>
+ <return type='xmlParserInputPtr' info='the xmlParserInputPtr if inlined or NULL for DOM behaviour.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </function>
+ <functype name='resolveEntitySAXFunc' file='parser' module='parser'>
+ <info>Callback: The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it&apos;s own entity resolution routine</info>
+ <return type='xmlParserInputPtr' info='the xmlParserInputPtr if inlined or NULL for DOM behaviour.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </functype>
+ <function name='setDocumentLocator' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case. DEPRECATED</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='loc' type='xmlSAXLocatorPtr' info='A SAX Locator'/>
+ </function>
+ <functype name='setDocumentLocatorSAXFunc' file='parser' module='parser'>
+ <info>Receive the document locator at startup, actually xmlDefaultSAXLocator. Everything is available on the context, so this is useless in our case.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='loc' type='xmlSAXLocatorPtr' info='A SAX Locator'/>
+ </functype>
+ <function name='setNamespace' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Set the current element namespace. DEPRECATED</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the namespace prefix'/>
+ </function>
+ <function name='startDocument' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <functype name='startDocumentSAXFunc' file='parser' module='parser'>
+ <info>Called when the document start being processed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </functype>
+ <function name='startElement' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='fullname' type='const xmlChar *' info='The element name, including namespace prefix'/>
+ <arg name='atts' type='const xmlChar **' info='An array of name/value attributes pairs, NULL terminated'/>
+ </function>
+ <functype name='startElementNsSAX2Func' file='parser' module='parser'>
+ <info>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='localname' type='const xmlChar *' info='the local name of the element'/>
+ <arg name='prefix' type='const xmlChar *' info='the element namespace prefix if available'/>
+ <arg name='URI' type='const xmlChar *' info='the element namespace name if available'/>
+ <arg name='nb_namespaces' type='int' info='number of namespace definitions on that node'/>
+ <arg name='namespaces' type='const xmlChar **' info='pointer to the array of prefix/URI pairs namespace definitions'/>
+ <arg name='nb_attributes' type='int' info='the number of attributes on that node'/>
+ <arg name='nb_defaulted' type='int' info='the number of defaulted attributes. The defaulted ones are at the end of the array'/>
+ <arg name='attributes' type='const xmlChar **' info='pointer to the array of (localname/prefix/URI/value/end) attribute values.'/>
+ </functype>
+ <functype name='startElementSAXFunc' file='parser' module='parser'>
+ <info>Called when an opening tag has been processed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The element name, including namespace prefix'/>
+ <arg name='atts' type='const xmlChar **' info='An array of name/value attributes pairs, NULL terminated'/>
+ </functype>
+ <function name='unparsedEntityDecl' file='SAX' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the entity'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='notationName' type='const xmlChar *' info='the name of the notation'/>
+ </function>
+ <functype name='unparsedEntityDeclSAXFunc' file='parser' module='parser'>
+ <info>What to do when an unparsed entity declaration is parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the entity'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='notationName' type='const xmlChar *' info='the name of the notation'/>
+ </functype>
+ <function name='valuePop' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops the top XPath object from the value stack</info>
+ <return type='xmlXPathObjectPtr' info='the XPath object just removed'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath evaluation context'/>
+ </function>
+ <function name='valuePush' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pushes a new XPath object on top of the value stack</info>
+ <return type='int' info='the number of items on the value stack'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath evaluation context'/>
+ <arg name='value' type='xmlXPathObjectPtr' info='the XPath object'/>
+ </function>
+ <functype name='warningSAXFunc' file='parser' module='parser'>
+ <info>Display and format a warning messages, callback.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </functype>
+ <functype name='xlinkExtendedLinkFunk' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>This is the prototype for a extended link detection callback.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='user data pointer'/>
+ <arg name='node' type='xmlNodePtr' info='the node carrying the link'/>
+ <arg name='nbLocators' type='int' info='the number of locators detected on the link'/>
+ <arg name='hrefs' type='const xlinkHRef *' info='pointer to the array of locator hrefs'/>
+ <arg name='roles' type='const xlinkRole *' info='pointer to the array of locator roles'/>
+ <arg name='nbArcs' type='int' info='the number of arcs detected on the link'/>
+ <arg name='from' type='const xlinkRole *' info='pointer to the array of source roles found on the arcs'/>
+ <arg name='to' type='const xlinkRole *' info='pointer to the array of target roles found on the arcs'/>
+ <arg name='show' type='xlinkShow *' info='array of values for the show attributes found on the arcs'/>
+ <arg name='actuate' type='xlinkActuate *' info='array of values for the actuate attributes found on the arcs'/>
+ <arg name='nbTitles' type='int' info='the number of titles detected on the link'/>
+ <arg name='titles' type='const xlinkTitle *' info=''/>
+ <arg name='langs' type='const xmlChar **' info='array of xml:lang values for the titles'/>
+ </functype>
+ <functype name='xlinkExtendedLinkSetFunk' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>This is the prototype for a extended link set detection callback.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='user data pointer'/>
+ <arg name='node' type='xmlNodePtr' info='the node carrying the link'/>
+ <arg name='nbLocators' type='int' info='the number of locators detected on the link'/>
+ <arg name='hrefs' type='const xlinkHRef *' info='pointer to the array of locator hrefs'/>
+ <arg name='roles' type='const xlinkRole *' info='pointer to the array of locator roles'/>
+ <arg name='nbTitles' type='int' info='the number of titles detected on the link'/>
+ <arg name='titles' type='const xlinkTitle *' info=''/>
+ <arg name='langs' type='const xmlChar **' info='array of xml:lang values for the titles'/>
+ </functype>
+ <function name='xlinkGetDefaultDetect' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Get the default xlink detection routine</info>
+ <return type='xlinkNodeDetectFunc' info='the current function or NULL;'/>
+ </function>
+ <function name='xlinkGetDefaultHandler' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Get the default xlink handler.</info>
+ <return type='xlinkHandlerPtr' info='the current xlinkHandlerPtr value.'/>
+ </function>
+ <function name='xlinkIsLink' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Check whether the given node carries the attributes needed to be a link element (or is one of the linking elements issued from the (X)HTML DtDs). This routine don&apos;t try to do full checking of the link validity but tries to detect and return the appropriate link type.</info>
+ <return type='xlinkType' info='the xlinkType of the node (XLINK_TYPE_NONE if there is no link detected.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document containing the node'/>
+ <arg name='node' type='xmlNodePtr' info='the node pointer itself'/>
+ </function>
+ <functype name='xlinkNodeDetectFunc' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>This is the prototype for the link detection routine. It calls the default link detection callbacks upon link detection.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='user data pointer'/>
+ <arg name='node' type='xmlNodePtr' info='the node to check'/>
+ </functype>
+ <function name='xlinkSetDefaultDetect' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Set the default xlink detection routine</info>
+ <return type='void'/>
+ <arg name='func' type='xlinkNodeDetectFunc' info='pointer to the new detection routine.'/>
+ </function>
+ <function name='xlinkSetDefaultHandler' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Set the default xlink handlers</info>
+ <return type='void'/>
+ <arg name='handler' type='xlinkHandlerPtr' info='the new value for the xlink handler block'/>
+ </function>
+ <functype name='xlinkSimpleLinkFunk' file='xlink' module='xlink'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>This is the prototype for a simple link detection callback.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='user data pointer'/>
+ <arg name='node' type='xmlNodePtr' info='the node carrying the link'/>
+ <arg name='href' type='const xlinkHRef' info='the target of the link'/>
+ <arg name='role' type='const xlinkRole' info='the role string'/>
+ <arg name='title' type='const xlinkTitle' info='the link title'/>
+ </functype>
+ <function name='xmlACatalogAdd' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Add an entry in the catalog, it may overwrite existing but different entries.</info>
+ <return type='int' info='0 if successful, -1 otherwise'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='type' type='const xmlChar *' info='the type of record to add to the catalog'/>
+ <arg name='orig' type='const xmlChar *' info='the system, public or prefix to match'/>
+ <arg name='replace' type='const xmlChar *' info='the replacement value for the match'/>
+ </function>
+ <function name='xmlACatalogDump' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump the given catalog to the given file.</info>
+ <return type='void'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='out' type='FILE *' info='the file.'/>
+ </function>
+ <function name='xmlACatalogRemove' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Remove an entry from the catalog</info>
+ <return type='int' info='the number of entries removed if successful, -1 otherwise'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='value' type='const xmlChar *' info='the value to remove'/>
+ </function>
+ <function name='xmlACatalogResolve' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an External Identifier</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlACatalogResolvePublic' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog local reference associated to a public ID in that catalog</info>
+ <return type='xmlChar *' info='the local resource if found or NULL otherwise, the value returned must be freed by the caller.'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ </function>
+ <function name='xmlACatalogResolveSystem' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog resource for a system ID</info>
+ <return type='xmlChar *' info='the resource if found or NULL otherwise, the value returned must be freed by the caller.'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlACatalogResolveURI' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an URI</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ <arg name='URI' type='const xmlChar *' info='the URI'/>
+ </function>
+ <function name='xmlAddAttributeDecl' file='valid' module='valid'>
+ <info>Register a new attribute declaration Note that @tree becomes the ownership of the DTD</info>
+ <return type='xmlAttributePtr' info='NULL if not new, otherwise the attribute decl'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='dtd' type='xmlDtdPtr' info='pointer to the DTD'/>
+ <arg name='elem' type='const xmlChar *' info='the element name'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='ns' type='const xmlChar *' info='the attribute namespace prefix'/>
+ <arg name='type' type='xmlAttributeType' info='the attribute type'/>
+ <arg name='def' type='xmlAttributeDefault' info='the attribute default type'/>
+ <arg name='defaultValue' type='const xmlChar *' info='the attribute default value'/>
+ <arg name='tree' type='xmlEnumerationPtr' info='if it&apos;s an enumeration, the associated list'/>
+ </function>
+ <function name='xmlAddChild' file='tree' module='tree'>
+ <info>Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.</info>
+ <return type='xmlNodePtr' info='the child or NULL in case of error.'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ <arg name='cur' type='xmlNodePtr' info='the child node'/>
+ </function>
+ <function name='xmlAddChildList' file='tree' module='tree'>
+ <info>Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)</info>
+ <return type='xmlNodePtr' info='the last child or NULL in case of error.'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ <arg name='cur' type='xmlNodePtr' info='the first node in the list'/>
+ </function>
+ <function name='xmlAddDocEntity' file='entities' module='entities'>
+ <info>Register a new entity for this document.</info>
+ <return type='xmlEntityPtr' info='a pointer to the entity or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type XML_xxx_yyy_ENTITY'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the entity external ID if available'/>
+ <arg name='SystemID' type='const xmlChar *' info='the entity system ID if available'/>
+ <arg name='content' type='const xmlChar *' info='the entity content'/>
+ </function>
+ <function name='xmlAddDtdEntity' file='entities' module='entities'>
+ <info>Register a new entity for this document DTD external subset.</info>
+ <return type='xmlEntityPtr' info='a pointer to the entity or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type XML_xxx_yyy_ENTITY'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the entity external ID if available'/>
+ <arg name='SystemID' type='const xmlChar *' info='the entity system ID if available'/>
+ <arg name='content' type='const xmlChar *' info='the entity content'/>
+ </function>
+ <function name='xmlAddElementDecl' file='valid' module='valid'>
+ <info>Register a new element declaration</info>
+ <return type='xmlElementPtr' info='NULL if not, otherwise the entity'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='dtd' type='xmlDtdPtr' info='pointer to the DTD'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='xmlElementTypeVal' info='the element type'/>
+ <arg name='content' type='xmlElementContentPtr' info='the element content tree or NULL'/>
+ </function>
+ <function name='xmlAddEncodingAlias' file='encoding' module='encoding'>
+ <info>Registers an alias @alias for an encoding named @name. Existing alias will be overwritten.</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='name' type='const char *' info='the encoding name as parsed, in UTF-8 format (ASCII actually)'/>
+ <arg name='alias' type='const char *' info='the alias name as parsed, in UTF-8 format (ASCII actually)'/>
+ </function>
+ <function name='xmlAddID' file='valid' module='valid'>
+ <info>Register a new id declaration</info>
+ <return type='xmlIDPtr' info='NULL if not, otherwise the new xmlIDPtr'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='pointer to the document'/>
+ <arg name='value' type='const xmlChar *' info='the value name'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute holding the ID'/>
+ </function>
+ <function name='xmlAddNextSibling' file='tree' module='tree'>
+ <info>Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.</info>
+ <return type='xmlNodePtr' info='the new node or NULL in case of error.'/>
+ <arg name='cur' type='xmlNodePtr' info='the child node'/>
+ <arg name='elem' type='xmlNodePtr' info='the new node'/>
+ </function>
+ <function name='xmlAddNotationDecl' file='valid' module='valid'>
+ <info>Register a new notation declaration</info>
+ <return type='xmlNotationPtr' info='NULL if not, otherwise the entity'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='dtd' type='xmlDtdPtr' info='pointer to the DTD'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='PublicID' type='const xmlChar *' info='the public identifier or NULL'/>
+ <arg name='SystemID' type='const xmlChar *' info='the system identifier or NULL'/>
+ </function>
+ <function name='xmlAddPrevSibling' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.</info>
+ <return type='xmlNodePtr' info='the new node or NULL in case of error.'/>
+ <arg name='cur' type='xmlNodePtr' info='the child node'/>
+ <arg name='elem' type='xmlNodePtr' info='the new node'/>
+ </function>
+ <function name='xmlAddRef' file='valid' module='valid'>
+ <info>Register a new ref declaration</info>
+ <return type='xmlRefPtr' info='NULL if not, otherwise the new xmlRefPtr'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='pointer to the document'/>
+ <arg name='value' type='const xmlChar *' info='the value name'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute holding the Ref'/>
+ </function>
+ <function name='xmlAddSibling' file='tree' module='tree'>
+ <info>Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.</info>
+ <return type='xmlNodePtr' info='the new element or NULL in case of error.'/>
+ <arg name='cur' type='xmlNodePtr' info='the child node'/>
+ <arg name='elem' type='xmlNodePtr' info='the new node'/>
+ </function>
+ <function name='xmlAllocOutputBuffer' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered parser output</info>
+ <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+ </function>
+ <function name='xmlAllocParserInputBuffer' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for progressive parsing</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlAttrSerializeTxtContent' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Serialize text attribute values to an xml simple buffer</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute node'/>
+ <arg name='string' type='const xmlChar *' info='the text content'/>
+ </function>
+ <function name='xmlAutomataCompile' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.</info>
+ <return type='xmlRegexpPtr' info='the compiled regexp or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ </function>
+ <function name='xmlAutomataGetInitState' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Initial state lookup</info>
+ <return type='xmlAutomataStatePtr' info='the initial state of the automata'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ </function>
+ <function name='xmlAutomataIsDeterminist' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Checks if an automata is determinist.</info>
+ <return type='int' info='1 if true, 0 if not, and -1 in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ </function>
+ <function name='xmlAutomataNewAllTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a an ALL transition from the @from state to the target state. That transition is an epsilon transition allowed only when all transitions from the @from node have been activated.</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='lax' type='int' info='allow to transition if not all all transitions have been activated'/>
+ </function>
+ <function name='xmlAutomataNewCountTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the input string associated to that transition'/>
+ <arg name='min' type='int' info='the minimum successive occurences of token'/>
+ <arg name='max' type='int' info='the maximum successive occurences of token'/>
+ <arg name='data' type='void *' info='data associated to the transition'/>
+ </function>
+ <function name='xmlAutomataNewCountTrans2' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the input string associated to that transition'/>
+ <arg name='token2' type='const xmlChar *' info='the second input string associated to that transition'/>
+ <arg name='min' type='int' info='the minimum successive occurences of token'/>
+ <arg name='max' type='int' info='the maximum successive occurences of token'/>
+ <arg name='data' type='void *' info='data associated to the transition'/>
+ </function>
+ <function name='xmlAutomataNewCountedTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will increment the counter provided</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='counter' type='int' info='the counter associated to that transition'/>
+ </function>
+ <function name='xmlAutomataNewCounter' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Create a new counter</info>
+ <return type='int' info='the counter number or -1 in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='min' type='int' info='the minimal value on the counter'/>
+ <arg name='max' type='int' info='the maximal value on the counter'/>
+ </function>
+ <function name='xmlAutomataNewCounterTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state which will be allowed only if the counter is within the right range.</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='counter' type='int' info='the counter associated to that transition'/>
+ </function>
+ <function name='xmlAutomataNewEpsilon' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds an epsilon transition from the @from state to the target state</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ </function>
+ <function name='xmlAutomataNewNegTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by any value except (@token,@token2) Note that if @token2 is not NULL, then (X, NULL) won&apos;t match to follow # the semantic of XSD ##other</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the first input string associated to that transition'/>
+ <arg name='token2' type='const xmlChar *' info='the second input string associated to that transition'/>
+ <arg name='data' type='void *' info='data passed to the callback function if the transition is activated'/>
+ </function>
+ <function name='xmlAutomataNewOnceTrans' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and whose number is between @min and @max, moreover that transition can only be crossed once.</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the input string associated to that transition'/>
+ <arg name='min' type='int' info='the minimum successive occurences of token'/>
+ <arg name='max' type='int' info='the maximum successive occurences of token'/>
+ <arg name='data' type='void *' info='data associated to the transition'/>
+ </function>
+ <function name='xmlAutomataNewOnceTrans2' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by a succession of input of value @token and @token2 and whose number is between @min and @max, moreover that transition can only be crossed once.</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the input string associated to that transition'/>
+ <arg name='token2' type='const xmlChar *' info='the second input string associated to that transition'/>
+ <arg name='min' type='int' info='the minimum successive occurences of token'/>
+ <arg name='max' type='int' info='the maximum successive occurences of token'/>
+ <arg name='data' type='void *' info='data associated to the transition'/>
+ </function>
+ <function name='xmlAutomataNewState' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Create a new disconnected state in the automata</info>
+ <return type='xmlAutomataStatePtr' info='the new state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ </function>
+ <function name='xmlAutomataNewTransition' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the input string associated to that transition'/>
+ <arg name='data' type='void *' info='data passed to the callback function if the transition is activated'/>
+ </function>
+ <function name='xmlAutomataNewTransition2' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>If @to is NULL, this creates first a new target state in the automata and then adds a transition from the @from state to the target state activated by the value of @token</info>
+ <return type='xmlAutomataStatePtr' info='the target state or NULL in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='from' type='xmlAutomataStatePtr' info='the starting point of the transition'/>
+ <arg name='to' type='xmlAutomataStatePtr' info='the target point of the transition or NULL'/>
+ <arg name='token' type='const xmlChar *' info='the first input string associated to that transition'/>
+ <arg name='token2' type='const xmlChar *' info='the second input string associated to that transition'/>
+ <arg name='data' type='void *' info='data passed to the callback function if the transition is activated'/>
+ </function>
+ <function name='xmlAutomataSetFinalState' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Makes that state a final state</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ <arg name='state' type='xmlAutomataStatePtr' info='a state in this automata'/>
+ </function>
+ <function name='xmlBoolToText' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Convenient way to turn bool into text</info>
+ <return type='const char *' info='a pointer to either &quot;True&quot; or &quot;False&quot;'/>
+ <arg name='boolval' type='int' info='a bool to turn into text'/>
+ </function>
+ <function name='xmlBufContent' file='tree' module='buf'>
+ <info>Function to extract the content of a buffer</info>
+ <return type='xmlChar *' info='the internal content'/>
+ <arg name='buf' type='const xmlBuf *' info='the buffer'/>
+ </function>
+ <function name='xmlBufEnd' file='tree' module='buf'>
+ <info>Function to extract the end of the content of a buffer</info>
+ <return type='xmlChar *' info='the end of the internal content or NULL in case of error'/>
+ <arg name='buf' type='xmlBufPtr' info='the buffer'/>
+ </function>
+ <function name='xmlBufGetNodeContent' file='tree' module='tree'>
+ <info>Read the value of a node @cur, this can be either the text carried directly by this node if it&apos;s a TEXT node or the aggregate string of the values carried by this node child&apos;s (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buf with this value</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='buf' type='xmlBufPtr' info='a buffer xmlBufPtr'/>
+ <arg name='cur' type='const xmlNode *' info='the node being read'/>
+ </function>
+ <function name='xmlBufNodeDump' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called</info>
+ <return type='size_t' info='the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error'/>
+ <arg name='buf' type='xmlBufPtr' info='the XML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='level' type='int' info='the imbrication level for indenting'/>
+ <arg name='format' type='int' info='is formatting allowed'/>
+ </function>
+ <function name='xmlBufShrink' file='tree' module='buf'>
+ <info>Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.</info>
+ <return type='size_t' info='the number of byte removed or 0 in case of failure'/>
+ <arg name='buf' type='xmlBufPtr' info='the buffer to dump'/>
+ <arg name='len' type='size_t' info='the number of xmlChar to remove'/>
+ </function>
+ <function name='xmlBufUse' file='tree' module='buf'>
+ <info>Function to get the length of a buffer</info>
+ <return type='size_t' info='the length of data in the internal content'/>
+ <arg name='buf' type='const xmlBufPtr' info='the buffer'/>
+ </function>
+ <function name='xmlBufferAdd' file='tree' module='tree'>
+ <info>Add a string range to an XML buffer. if len == -1, the length of str is recomputed.</info>
+ <return type='int' info='0 successful, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to dump'/>
+ <arg name='str' type='const xmlChar *' info='the #xmlChar string'/>
+ <arg name='len' type='int' info='the number of #xmlChar to add'/>
+ </function>
+ <function name='xmlBufferAddHead' file='tree' module='tree'>
+ <info>Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.</info>
+ <return type='int' info='0 successful, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer'/>
+ <arg name='str' type='const xmlChar *' info='the #xmlChar string'/>
+ <arg name='len' type='int' info='the number of #xmlChar to add'/>
+ </function>
+ <function name='xmlBufferCCat' file='tree' module='tree'>
+ <info>Append a zero terminated C string to an XML buffer.</info>
+ <return type='int' info='0 successful, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to dump'/>
+ <arg name='str' type='const char *' info='the C char string'/>
+ </function>
+ <function name='xmlBufferCat' file='tree' module='tree'>
+ <info>Append a zero terminated string to an XML buffer.</info>
+ <return type='int' info='0 successful, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to add to'/>
+ <arg name='str' type='const xmlChar *' info='the #xmlChar string'/>
+ </function>
+ <function name='xmlBufferContent' file='tree' module='tree'>
+ <info>Function to extract the content of a buffer</info>
+ <return type='const xmlChar *' info='the internal content'/>
+ <arg name='buf' type='const xmlBuffer *' info='the buffer'/>
+ </function>
+ <function name='xmlBufferCreate' file='tree' module='tree'>
+ <info>routine to create an XML buffer.</info>
+ <return type='xmlBufferPtr' info='the new structure.'/>
+ </function>
+ <function name='xmlBufferCreateSize' file='tree' module='tree'>
+ <info>routine to create an XML buffer.</info>
+ <return type='xmlBufferPtr' info='the new structure.'/>
+ <arg name='size' type='size_t' info='initial size of buffer'/>
+ </function>
+ <function name='xmlBufferCreateStatic' file='tree' module='tree'>
+ <info>routine to create an XML buffer from an immutable memory area. The area won&apos;t be modified nor copied, and is expected to be present until the end of the buffer lifetime.</info>
+ <return type='xmlBufferPtr' info='the new structure.'/>
+ <arg name='mem' type='void *' info='the memory area'/>
+ <arg name='size' type='size_t' info='the size in byte'/>
+ </function>
+ <function name='xmlBufferDetach' file='tree' module='tree'>
+ <info>Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn&apos;t work with immutable buffers as they can&apos;t be reset.</info>
+ <return type='xmlChar *' info='the previous string contained by the buffer.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer'/>
+ </function>
+ <function name='xmlBufferDump' file='tree' module='tree'>
+ <info>Dumps an XML buffer to a FILE *.</info>
+ <return type='int' info='the number of #xmlChar written'/>
+ <arg name='file' type='FILE *' info='the file output'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to dump'/>
+ </function>
+ <function name='xmlBufferEmpty' file='tree' module='tree'>
+ <info>empty a buffer.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer'/>
+ </function>
+ <function name='xmlBufferFree' file='tree' module='tree'>
+ <info>Frees an XML buffer. It frees both the content and the structure which encapsulate it.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to free'/>
+ </function>
+ <function name='xmlBufferGrow' file='tree' module='tree'>
+ <info>Grow the available space of an XML buffer.</info>
+ <return type='int' info='the new available space or -1 in case of error'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer'/>
+ <arg name='len' type='unsigned int' info='the minimum free size to allocate'/>
+ </function>
+ <function name='xmlBufferLength' file='tree' module='tree'>
+ <info>Function to get the length of a buffer</info>
+ <return type='int' info='the length of data in the internal content'/>
+ <arg name='buf' type='const xmlBuffer *' info='the buffer'/>
+ </function>
+ <function name='xmlBufferResize' file='tree' module='tree'>
+ <info>Resize a buffer to accommodate minimum size of @size.</info>
+ <return type='int' info='0 in case of problems, 1 otherwise'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to resize'/>
+ <arg name='size' type='unsigned int' info='the desired size'/>
+ </function>
+ <function name='xmlBufferSetAllocationScheme' file='tree' module='tree'>
+ <info>Sets the allocation scheme for this buffer</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to tune'/>
+ <arg name='scheme' type='xmlBufferAllocationScheme' info='allocation scheme to use'/>
+ </function>
+ <function name='xmlBufferShrink' file='tree' module='tree'>
+ <info>Remove the beginning of an XML buffer.</info>
+ <return type='int' info='the number of #xmlChar removed, or -1 in case of failure.'/>
+ <arg name='buf' type='xmlBufferPtr' info='the buffer to dump'/>
+ <arg name='len' type='unsigned int' info='the number of xmlChar to remove'/>
+ </function>
+ <function name='xmlBufferWriteCHAR' file='tree' module='tree'>
+ <info>routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer'/>
+ <arg name='string' type='const xmlChar *' info='the string to add'/>
+ </function>
+ <function name='xmlBufferWriteChar' file='tree' module='tree'>
+ <info>routine which manage and grows an output buffer. This one add C chars at the end of the array.</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='string' type='const char *' info='the string to add'/>
+ </function>
+ <function name='xmlBufferWriteQuotedString' file='tree' module='tree'>
+ <info>routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='string' type='const xmlChar *' info='the string to add'/>
+ </function>
+ <function name='xmlBuildQName' file='tree' module='tree'>
+ <info>Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.</info>
+ <return type='xmlChar *' info='the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error'/>
+ <arg name='ncname' type='const xmlChar *' info='the Name'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix'/>
+ <arg name='memory' type='xmlChar *' info='preallocated memory'/>
+ <arg name='len' type='int' info='preallocated memory length'/>
+ </function>
+ <function name='xmlBuildRelativeURI' file='uri' module='uri'>
+ <info>Expresses the URI of the reference in terms relative to the base. Some examples of this operation include: base = &quot;http://site1.com/docs/book1.html&quot; URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = &quot;docs/book1.html&quot; URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI reference is really wierd or complicated, it may be worthwhile to first convert it into a &quot;nice&quot; one by calling xmlBuildURI (using &apos;base&apos;) before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.</info>
+ <return type='xmlChar *' info='a new URI string (to be freed by the caller) or NULL in case error.'/>
+ <arg name='URI' type='const xmlChar *' info='the URI reference under consideration'/>
+ <arg name='base' type='const xmlChar *' info='the base value'/>
+ </function>
+ <function name='xmlBuildURI' file='uri' module='uri'>
+ <info>Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form</info>
+ <return type='xmlChar *' info='a new URI string (to be freed by the caller) or NULL in case of error.'/>
+ <arg name='URI' type='const xmlChar *' info='the URI instance found in the document'/>
+ <arg name='base' type='const xmlChar *' info='the base value'/>
+ </function>
+ <function name='xmlByteConsumed' file='parser' module='encoding'>
+ <info>This function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input.</info>
+ <return type='long' info='the index in bytes from the beginning of the entity or -1 in case the index could not be computed.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlC14NDocDumpMemory' file='c14n' module='c14n'>
+ <cond>defined(LIBXML_C14N_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dumps the canonized image of given XML document into memory. For details see &quot;Canonical XML&quot; (http://www.w3.org/TR/xml-c14n) or &quot;Exclusive XML Canonicalization&quot; (http://www.w3.org/TR/xml-exc-c14n)</info>
+ <return type='int' info='the number of bytes written on success or a negative value on fail'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document for canonization'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='the nodes set to be included in the canonized image or NULL if all document nodes should be included'/>
+ <arg name='mode' type='int' info='the c14n mode (see @xmlC14NMode)'/>
+ <arg name='inclusive_ns_prefixes' type='xmlChar **' info='the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)'/>
+ <arg name='with_comments' type='int' info='include comments in the result (!=0) or not (==0)'/>
+ <arg name='doc_txt_ptr' type='xmlChar **' info='the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory'/>
+ </function>
+ <function name='xmlC14NDocSave' file='c14n' module='c14n'>
+ <cond>defined(LIBXML_C14N_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dumps the canonized image of given XML document into the file. For details see &quot;Canonical XML&quot; (http://www.w3.org/TR/xml-c14n) or &quot;Exclusive XML Canonicalization&quot; (http://www.w3.org/TR/xml-exc-c14n)</info>
+ <return type='int' info='the number of bytes written success or a negative value on fail'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document for canonization'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='the nodes set to be included in the canonized image or NULL if all document nodes should be included'/>
+ <arg name='mode' type='int' info='the c14n mode (see @xmlC14NMode)'/>
+ <arg name='inclusive_ns_prefixes' type='xmlChar **' info='the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)'/>
+ <arg name='with_comments' type='int' info='include comments in the result (!=0) or not (==0)'/>
+ <arg name='filename' type='const char *' info='the filename to store canonical XML image'/>
+ <arg name='compression' type='int' info='the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, &gt;0 - compression level'/>
+ </function>
+ <function name='xmlC14NDocSaveTo' file='c14n' module='c14n'>
+ <cond>defined(LIBXML_C14N_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dumps the canonized image of given XML document into the provided buffer. For details see &quot;Canonical XML&quot; (http://www.w3.org/TR/xml-c14n) or &quot;Exclusive XML Canonicalization&quot; (http://www.w3.org/TR/xml-exc-c14n)</info>
+ <return type='int' info='non-negative value on success or a negative value on fail'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document for canonization'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='the nodes set to be included in the canonized image or NULL if all document nodes should be included'/>
+ <arg name='mode' type='int' info='the c14n mode (see @xmlC14NMode)'/>
+ <arg name='inclusive_ns_prefixes' type='xmlChar **' info='the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)'/>
+ <arg name='with_comments' type='int' info='include comments in the result (!=0) or not (==0)'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output'/>
+ </function>
+ <function name='xmlC14NExecute' file='c14n' module='c14n'>
+ <cond>defined(LIBXML_C14N_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dumps the canonized image of given XML document into the provided buffer. For details see &quot;Canonical XML&quot; (http://www.w3.org/TR/xml-c14n) or &quot;Exclusive XML Canonicalization&quot; (http://www.w3.org/TR/xml-exc-c14n)</info>
+ <return type='int' info='non-negative value on success or a negative value on fail'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document for canonization'/>
+ <arg name='is_visible_callback' type='xmlC14NIsVisibleCallback' info='the function to use to determine is node visible or not'/>
+ <arg name='user_data' type='void *' info='the first parameter for @is_visible_callback function (in most cases, it is nodes set)'/>
+ <arg name='mode' type='int' info='the c14n mode (see @xmlC14NMode)'/>
+ <arg name='inclusive_ns_prefixes' type='xmlChar **' info='the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise)'/>
+ <arg name='with_comments' type='int' info='include comments in the result (!=0) or not (==0)'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output'/>
+ </function>
+ <functype name='xmlC14NIsVisibleCallback' file='c14n' module='c14n'>
+ <cond>defined(LIBXML_C14N_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Signature for a C14N callback on visible nodes</info>
+ <return type='int' info='1 if the node should be included'/>
+ <arg name='user_data' type='void *' info='user data'/>
+ <arg name='node' type='xmlNodePtr' info='the curent node'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ </functype>
+ <function name='xmlCanonicPath' file='uri' module='uri'>
+ <info>Constructs a canonic path from the specified path.</info>
+ <return type='xmlChar *' info='a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.'/>
+ <arg name='path' type='const xmlChar *' info='the resource locator in a filesystem notation'/>
+ </function>
+ <function name='xmlCatalogAdd' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();</info>
+ <return type='int' info='0 if successful, -1 otherwise'/>
+ <arg name='type' type='const xmlChar *' info='the type of record to add to the catalog'/>
+ <arg name='orig' type='const xmlChar *' info='the system, public or prefix to match'/>
+ <arg name='replace' type='const xmlChar *' info='the replacement value for the match'/>
+ </function>
+ <function name='xmlCatalogAddLocal' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Add the new entry to the catalog list</info>
+ <return type='void *' info='the updated list'/>
+ <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
+ <arg name='URL' type='const xmlChar *' info='the URL to a new local catalog'/>
+ </function>
+ <function name='xmlCatalogCleanup' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Free up all the memory associated with catalogs</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCatalogConvert' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Convert all the SGML catalog entries as XML ones</info>
+ <return type='int' info='the number of entries converted if successful, -1 otherwise'/>
+ </function>
+ <function name='xmlCatalogDump' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump all the global catalog content to the given file.</info>
+ <return type='void'/>
+ <arg name='out' type='FILE *' info='the file.'/>
+ </function>
+ <function name='xmlCatalogFreeLocal' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Free up the memory associated to the catalog list</info>
+ <return type='void'/>
+ <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
+ </function>
+ <function name='xmlCatalogGetDefaults' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Used to get the user preference w.r.t. to what catalogs should be accepted</info>
+ <return type='xmlCatalogAllow' info='the current xmlCatalogAllow value'/>
+ </function>
+ <function name='xmlCatalogGetPublic' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</info>
+ <return type='const xmlChar *' info='the resource if found or NULL otherwise.'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ </function>
+ <function name='xmlCatalogGetSystem' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem()</info>
+ <return type='const xmlChar *' info='the resource if found or NULL otherwise.'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlCatalogIsEmpty' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Check is a catalog is empty</info>
+ <return type='int' info='1 if the catalog is empty, 0 if not, amd -1 in case of error.'/>
+ <arg name='catal' type='xmlCatalogPtr' info='should this create an SGML catalog'/>
+ </function>
+ <function name='xmlCatalogLocalResolve' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an External Identifier using a document&apos;s private catalog list</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlCatalogLocalResolveURI' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an URI using a document&apos;s private catalog list</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
+ <arg name='URI' type='const xmlChar *' info='the URI'/>
+ </function>
+ <function name='xmlCatalogRemove' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Remove an entry from the catalog</info>
+ <return type='int' info='the number of entries removed if successful, -1 otherwise'/>
+ <arg name='value' type='const xmlChar *' info='the value to remove'/>
+ </function>
+ <function name='xmlCatalogResolve' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an External Identifier</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlCatalogResolvePublic' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog reference associated to a public ID</info>
+ <return type='xmlChar *' info='the resource if found or NULL otherwise, the value returned must be freed by the caller.'/>
+ <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
+ </function>
+ <function name='xmlCatalogResolveSystem' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Try to lookup the catalog resource for a system ID</info>
+ <return type='xmlChar *' info='the resource if found or NULL otherwise, the value returned must be freed by the caller.'/>
+ <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
+ </function>
+ <function name='xmlCatalogResolveURI' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do a complete resolution lookup of an URI</info>
+ <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
+ <arg name='URI' type='const xmlChar *' info='the URI'/>
+ </function>
+ <function name='xmlCatalogSetDebug' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it</info>
+ <return type='int' info='the previous value of the catalog debugging level'/>
+ <arg name='level' type='int' info='the debug level of catalogs required'/>
+ </function>
+ <function name='xmlCatalogSetDefaultPrefer' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Allows to set the preference between public and system for deletion in XML Catalog resolution. C.f. section 4.1.1 of the spec Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM</info>
+ <return type='xmlCatalogPrefer' info='the previous value of the default preference for delegation'/>
+ <arg name='prefer' type='xmlCatalogPrefer' info='the default preference for delegation'/>
+ </function>
+ <function name='xmlCatalogSetDefaults' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Used to set the user preference w.r.t. to what catalogs should be accepted</info>
+ <return type='void'/>
+ <arg name='allow' type='xmlCatalogAllow' info='what catalogs should be accepted'/>
+ </function>
+ <function name='xmlCharEncCloseFunc' file='encoding' module='encoding'>
+ <info>Generic front-end for encoding handler close function</info>
+ <return type='int' info='0 if success, or -1 in case of error'/>
+ <arg name='handler' type='xmlCharEncodingHandler *' info='char enconding transformation data structure'/>
+ </function>
+ <function name='xmlCharEncFirstLine' file='encoding' module='encoding'>
+ <info>Front-end for the encoding handler input function, but handle only the very first line, i.e. limit itself to 45 chars.</info>
+ <return type='int' info='the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can&apos;t fit into the encoding we want), or'/>
+ <arg name='handler' type='xmlCharEncodingHandler *' info='char enconding transformation data structure'/>
+ <arg name='out' type='xmlBufferPtr' info='an xmlBuffer for the output.'/>
+ <arg name='in' type='xmlBufferPtr' info='an xmlBuffer for the input'/>
+ </function>
+ <function name='xmlCharEncInFunc' file='encoding' module='encoding'>
+ <info>Generic front-end for the encoding handler input function</info>
+ <return type='int' info='the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can&apos;t fit into the encoding we want), or'/>
+ <arg name='handler' type='xmlCharEncodingHandler *' info='char encoding transformation data structure'/>
+ <arg name='out' type='xmlBufferPtr' info='an xmlBuffer for the output.'/>
+ <arg name='in' type='xmlBufferPtr' info='an xmlBuffer for the input'/>
+ </function>
+ <function name='xmlCharEncOutFunc' file='encoding' module='encoding'>
+ <info>Generic front-end for the encoding handler output function a first call with @in == NULL has to be made firs to initiate the output in case of non-stateless encoding needing to initiate their state or the output (like the BOM in UTF16). In case of UTF8 sequence conversion errors for the given encoder, the content will be automatically remapped to a CharRef sequence.</info>
+ <return type='int' info='the number of byte written if success, or -1 general error -2 if the transcoding fails (for *in is not valid utf8 string or the result of transformation can&apos;t fit into the encoding we want), or'/>
+ <arg name='handler' type='xmlCharEncodingHandler *' info='char enconding transformation data structure'/>
+ <arg name='out' type='xmlBufferPtr' info='an xmlBuffer for the output.'/>
+ <arg name='in' type='xmlBufferPtr' info='an xmlBuffer for the input'/>
+ </function>
+ <functype name='xmlCharEncodingInputFunc' file='encoding' module='encoding'>
+ <info>Take a block of chars in the original encoding and try to convert it to an UTF-8 block of chars out.</info>
+ <return type='int' info='the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets consumed.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the UTF-8 result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of chars in the original encoding'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ </functype>
+ <functype name='xmlCharEncodingOutputFunc' file='encoding' module='encoding'>
+ <info>Take a block of UTF-8 chars in and try to convert it to another encoding. Note: a first call designed to produce heading info is called with in = NULL. If stateful this should also initialize the encoder state.</info>
+ <return type='int' info='the number of bytes written, -1 if lack of space, or -2 if the transcoding failed. The value of @inlen after return is the number of octets consumed if the return value is positive, else unpredictiable. The value of @outlen after return is the number of octets produced.'/>
+ <arg name='out' type='unsigned char *' info='a pointer to an array of bytes to store the result'/>
+ <arg name='outlen' type='int *' info='the length of @out'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to an array of UTF-8 chars'/>
+ <arg name='inlen' type='int *' info='the length of @in'/>
+ </functype>
+ <function name='xmlCharInRange' file='chvalid' module='chvalid'>
+ <info>Does a binary search of the range table to determine if char is valid</info>
+ <return type='int' info='true if character valid, false otherwise'/>
+ <arg name='val' type='unsigned int' info='character to be validated'/>
+ <arg name='rptr' type='const xmlChRangeGroup *' info='pointer to range to be used to validate'/>
+ </function>
+ <function name='xmlCharStrdup' file='xmlstring' module='xmlstring'>
+ <info>a strdup for char&apos;s to xmlChar&apos;s</info>
+ <return type='xmlChar *' info='a new xmlChar * or NULL'/>
+ <arg name='cur' type='const char *' info='the input char *'/>
+ </function>
+ <function name='xmlCharStrndup' file='xmlstring' module='xmlstring'>
+ <info>a strndup for char&apos;s to xmlChar&apos;s</info>
+ <return type='xmlChar *' info='a new xmlChar * or NULL'/>
+ <arg name='cur' type='const char *' info='the input char *'/>
+ <arg name='len' type='int' info='the len of @cur'/>
+ </function>
+ <function name='xmlCheckFilename' file='xmlIO' module='xmlIO'>
+ <info>function checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine,</info>
+ <return type='int' info='1. if stat fails, returns 0 (if calling stat on the filename fails, it can&apos;t be right). if stat succeeds and the file is a directory, returns 2. otherwise returns 1.'/>
+ <arg name='path' type='const char *' info='the path to check'/>
+ </function>
+ <function name='xmlCheckHTTPInput' file='xmlIO' module='xmlIO'>
+ <info>Check an input in case it was created from an HTTP stream, in that case it will handle encoding and update of the base URL in case of redirection. It also checks for HTTP errors in which case the input is cleanly freed up and an appropriate error is raised in context</info>
+ <return type='xmlParserInputPtr' info='the input or NULL in case of HTTP error.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='ret' type='xmlParserInputPtr' info='an XML parser input'/>
+ </function>
+ <function name='xmlCheckLanguageID' file='parserInternals' module='parser'>
+ <info>Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode (&apos;-&apos; Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= (&apos;i&apos; | &apos;I&apos;) &apos;-&apos; ([a-z] | [A-Z])+ [37] UserCode ::= (&apos;x&apos; | &apos;X&apos;) &apos;-&apos; ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The current REC reference the sucessors of RFC 1766, currently 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language [&quot;-&quot; script] [&quot;-&quot; region] *(&quot;-&quot; variant) *(&quot;-&quot; extension) [&quot;-&quot; privateuse] language = 2*3ALPHA ; shortest ISO 639 code [&quot;-&quot; extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639 codes *2(&quot;-&quot; 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO 15924 code region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum) extension = singleton 1*(&quot;-&quot; (2*8alphanum)) ; Single alphanumerics ; &quot;x&quot; reserved for private use singleton = DIGIT ; 0 - 9 / %x41-57 ; A - W / %x59-5A ; Y - Z / %x61-77 ; a - w / %x79-7A ; y - z it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn&apos;t try to cope with extension or privateuse that could be added but that&apos;s not interoperable anyway</info>
+ <return type='int' info='1 if correct 0 otherwise'/>
+ <arg name='lang' type='const xmlChar *' info='pointer to the string value'/>
+ </function>
+ <function name='xmlCheckUTF8' file='xmlstring' module='xmlstring'>
+ <info>Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.</info>
+ <return type='int' info='value: true if @utf is valid.'/>
+ <arg name='utf' type='const unsigned char *' info='Pointer to putative UTF-8 encoded string.'/>
+ </function>
+ <function name='xmlCheckVersion' file='xmlversion' module='parserInternals'>
+ <info>check the compiled lib version against the include one. This can warn or immediately kill the application</info>
+ <return type='void'/>
+ <arg name='version' type='int' info='the include version number'/>
+ </function>
+ <function name='xmlChildElementCount' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don&apos;t have back reference from entities content to entities references.</info>
+ <return type='unsigned long' info='the count of element child or 0 if not available'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ </function>
+ <function name='xmlCleanupCharEncodingHandlers' file='encoding' module='encoding'>
+ <info>Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupEncodingAliases' file='encoding' module='encoding'>
+ <info>Unregisters all aliases</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupGlobals' file='globals' module='globals'>
+ <info>Additional cleanup for multi-threading</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupInputCallbacks' file='xmlIO' module='xmlIO'>
+ <info>clears the entire input callback table. this includes the compiled-in I/O.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupMemory' file='xmlmemory' module='xmlmemory'>
+ <info>Free up all the memory allocated by the library for its own use. This should not be called by user level code.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupOutputCallbacks' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>clears the entire output callback table. this includes the compiled-in I/O callbacks.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupParser' file='parser' module='parser'>
+ <info>This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn&apos;t deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It&apos;s sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupPredefinedEntities' file='entities' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Cleanup up the predefined entities table. Deprecated call</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlCleanupThreads' file='threads' module='threads'>
+ <info>xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended. WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It&apos;s sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlClearNodeInfoSeq' file='parser' module='parserInternals'>
+ <info>-- Clear (release memory and reinitialize) node info sequence</info>
+ <return type='void'/>
+ <arg name='seq' type='xmlParserNodeInfoSeqPtr' info='a node info sequence pointer'/>
+ </function>
+ <function name='xmlClearParserCtxt' file='parser' module='parserInternals'>
+ <info>Clear (release owned resources) and reinitialize a parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlConvertSGMLCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Convert all the SGML catalog entries as XML ones</info>
+ <return type='int' info='the number of entries converted if successful, -1 otherwise'/>
+ <arg name='catal' type='xmlCatalogPtr' info='the catalog'/>
+ </function>
+ <function name='xmlCopyAttributeTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Build a copy of an attribute table.</info>
+ <return type='xmlAttributeTablePtr' info='the new xmlAttributeTablePtr or NULL in case of error.'/>
+ <arg name='table' type='xmlAttributeTablePtr' info='An attribute table'/>
+ </function>
+ <function name='xmlCopyChar' file='parserInternals' module='parserInternals'>
+ <info>append the char value in the array</info>
+ <return type='int' info='the number of xmlChar written'/>
+ <arg name='len' type='int' info='Ignored, compatibility'/>
+ <arg name='out' type='xmlChar *' info='pointer to an array of xmlChar'/>
+ <arg name='val' type='int' info='the char value'/>
+ </function>
+ <function name='xmlCopyCharMultiByte' file='parserInternals' module='parserInternals'>
+ <info>append the char value in the array</info>
+ <return type='int' info='the number of xmlChar written'/>
+ <arg name='out' type='xmlChar *' info='pointer to an array of xmlChar'/>
+ <arg name='val' type='int' info='the char value'/>
+ </function>
+ <function name='xmlCopyDoc' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.</info>
+ <return type='xmlDocPtr' info='a new #xmlDocPtr, or NULL in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='recursive' type='int' info='if not zero do a recursive copy.'/>
+ </function>
+ <function name='xmlCopyDocElementContent' file='valid' module='valid'>
+ <info>Build a copy of an element content description.</info>
+ <return type='xmlElementContentPtr' info='the new xmlElementContentPtr or NULL in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document owning the element declaration'/>
+ <arg name='cur' type='xmlElementContentPtr' info='An element content pointer.'/>
+ </function>
+ <function name='xmlCopyDtd' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Do a copy of the dtd.</info>
+ <return type='xmlDtdPtr' info='a new #xmlDtdPtr, or NULL in case of error.'/>
+ <arg name='dtd' type='xmlDtdPtr' info='the dtd'/>
+ </function>
+ <function name='xmlCopyElementContent' file='valid' module='valid'>
+ <info>Build a copy of an element content description. Deprecated, use xmlCopyDocElementContent instead</info>
+ <return type='xmlElementContentPtr' info='the new xmlElementContentPtr or NULL in case of error.'/>
+ <arg name='cur' type='xmlElementContentPtr' info='An element content pointer.'/>
+ </function>
+ <function name='xmlCopyElementTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Build a copy of an element table.</info>
+ <return type='xmlElementTablePtr' info='the new xmlElementTablePtr or NULL in case of error.'/>
+ <arg name='table' type='xmlElementTablePtr' info='An element table'/>
+ </function>
+ <function name='xmlCopyEntitiesTable' file='entities' module='entities'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Build a copy of an entity table.</info>
+ <return type='xmlEntitiesTablePtr' info='the new xmlEntitiesTablePtr or NULL in case of error.'/>
+ <arg name='table' type='xmlEntitiesTablePtr' info='An entity table'/>
+ </function>
+ <function name='xmlCopyEnumeration' file='valid' module='valid'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Copy an enumeration attribute node (recursive).</info>
+ <return type='xmlEnumerationPtr' info='the xmlEnumerationPtr just created or NULL in case of error.'/>
+ <arg name='cur' type='xmlEnumerationPtr' info='the tree to copy.'/>
+ </function>
+ <function name='xmlCopyError' file='xmlerror' module='error'>
+ <info>Save the original error to the new place.</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='from' type='xmlErrorPtr' info='a source error'/>
+ <arg name='to' type='xmlErrorPtr' info='a target error'/>
+ </function>
+ <function name='xmlCopyNamespace' file='tree' module='tree'>
+ <info>Do a copy of the namespace.</info>
+ <return type='xmlNsPtr' info='a new #xmlNsPtr, or NULL in case of error.'/>
+ <arg name='cur' type='xmlNsPtr' info='the namespace'/>
+ </function>
+ <function name='xmlCopyNamespaceList' file='tree' module='tree'>
+ <info>Do a copy of an namespace list.</info>
+ <return type='xmlNsPtr' info='a new #xmlNsPtr, or NULL in case of error.'/>
+ <arg name='cur' type='xmlNsPtr' info='the first namespace'/>
+ </function>
+ <function name='xmlCopyNode' file='tree' module='tree'>
+ <info>Do a copy of the node.</info>
+ <return type='xmlNodePtr' info='a new #xmlNodePtr, or NULL in case of error.'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='extended' type='int' info='if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)'/>
+ </function>
+ <function name='xmlCopyNodeList' file='tree' module='tree'>
+ <info>Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.</info>
+ <return type='xmlNodePtr' info='a new #xmlNodePtr, or NULL in case of error.'/>
+ <arg name='node' type='xmlNodePtr' info='the first node in the list.'/>
+ </function>
+ <function name='xmlCopyNotationTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Build a copy of a notation table.</info>
+ <return type='xmlNotationTablePtr' info='the new xmlNotationTablePtr or NULL in case of error.'/>
+ <arg name='table' type='xmlNotationTablePtr' info='A notation table'/>
+ </function>
+ <function name='xmlCopyProp' file='tree' module='tree'>
+ <info>Do a copy of the attribute.</info>
+ <return type='xmlAttrPtr' info='a new #xmlAttrPtr, or NULL in case of error.'/>
+ <arg name='target' type='xmlNodePtr' info='the element where the attribute will be grafted'/>
+ <arg name='cur' type='xmlAttrPtr' info='the attribute'/>
+ </function>
+ <function name='xmlCopyPropList' file='tree' module='tree'>
+ <info>Do a copy of an attribute list.</info>
+ <return type='xmlAttrPtr' info='a new #xmlAttrPtr, or NULL in case of error.'/>
+ <arg name='target' type='xmlNodePtr' info='the element where the attributes will be grafted'/>
+ <arg name='cur' type='xmlAttrPtr' info='the first attribute'/>
+ </function>
+ <function name='xmlCreateDocParserCtxt' file='parser' module='parser'>
+ <info>Creates a parser context for an XML in-memory document.</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to an array of xmlChar'/>
+ </function>
+ <function name='xmlCreateEntitiesTable' file='entities' module='entities'>
+ <info>create and initialize an empty entities hash table. This really doesn&apos;t make sense and should be deprecated</info>
+ <return type='xmlEntitiesTablePtr' info='the xmlEntitiesTablePtr just created or NULL in case of error.'/>
+ </function>
+ <function name='xmlCreateEntityParserCtxt' file='parserInternals' module='parser'>
+ <info>Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='URL' type='const xmlChar *' info='the entity URL'/>
+ <arg name='ID' type='const xmlChar *' info='the entity PUBLIC ID'/>
+ <arg name='base' type='const xmlChar *' info='a possible base for the target URI'/>
+ </function>
+ <function name='xmlCreateEnumeration' file='valid' module='valid'>
+ <info>create and initialize an enumeration attribute node.</info>
+ <return type='xmlEnumerationPtr' info='the xmlEnumerationPtr just created or NULL in case of error.'/>
+ <arg name='name' type='const xmlChar *' info='the enumeration name or NULL'/>
+ </function>
+ <function name='xmlCreateFileParserCtxt' file='parserInternals' module='parser'>
+ <info>Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlCreateIOParserCtxt' file='parser' module='parser'>
+ <info>Create a parser context for using the XML parser with an existing I/O stream</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlCreateIntSubset' file='tree' module='tree'>
+ <info>Create the internal subset of a document</info>
+ <return type='xmlDtdPtr' info='a pointer to the new DTD structure'/>
+ <arg name='doc' type='xmlDocPtr' info='the document pointer'/>
+ <arg name='name' type='const xmlChar *' info='the DTD name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external (PUBLIC) ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the system ID'/>
+ </function>
+ <function name='xmlCreateMemoryParserCtxt' file='parserInternals' module='parser'>
+ <info>Create a parser context for an XML in-memory document.</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlCreatePushParserCtxt' file='parser' module='parser'>
+ <cond>defined(LIBXML_PUSH_ENABLED)</cond>
+ <info>Create a parser context for using the XML parser in push mode. If @buffer and @size are non-NULL, the data is used to detect the encoding. The remaining characters will be parsed so they don&apos;t need to be fed in again through xmlParseChunk. To allow content encoding detection, @size should be &gt;= 4 The value of @filename is used for fetching external entities and error/warning reports.</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='chunk' type='const char *' info='a pointer to an array of chars'/>
+ <arg name='size' type='int' info='number of chars in the array'/>
+ <arg name='filename' type='const char *' info='an optional file name or URI'/>
+ </function>
+ <function name='xmlCreateURI' file='uri' module='uri'>
+ <info>Simply creates an empty xmlURI</info>
+ <return type='xmlURIPtr' info='the new structure or NULL in case of error'/>
+ </function>
+ <function name='xmlCreateURLParserCtxt' file='parserInternals' module='parser'>
+ <info>Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses</info>
+ <return type='xmlParserCtxtPtr' info='the new parser context or NULL'/>
+ <arg name='filename' type='const char *' info='the filename or URL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtGetLastError' file='xmlerror' module='error'>
+ <info>Get the last parsing error registered.</info>
+ <return type='xmlErrorPtr' info='NULL if no error occured or a pointer to the error'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ </function>
+ <function name='xmlCtxtReadDoc' file='parser' module='parser'>
+ <info>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtReadFd' file='parser' module='parser'>
+ <info>parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtReadFile' file='parser' module='parser'>
+ <info>parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtReadIO' file='parser' module='parser'>
+ <info>parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtReadMemory' file='parser' module='parser'>
+ <info>parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCtxtReset' file='parser' module='parser'>
+ <info>Reset a parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlCtxtResetLastError' file='xmlerror' module='error'>
+ <info>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ </function>
+ <function name='xmlCtxtResetPush' file='parser' module='parser'>
+ <info>Reset a push parser context</info>
+ <return type='int' info='0 in case of success and 1 in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='chunk' type='const char *' info='a pointer to an array of chars'/>
+ <arg name='size' type='int' info='number of chars in the array'/>
+ <arg name='filename' type='const char *' info='an optional file name or URI'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ </function>
+ <function name='xmlCtxtUseOptions' file='parser' module='parser'>
+ <info>Applies the options to the parser context</info>
+ <return type='int' info='0 in case of success, the set of unknown or unimplemented options in case of error.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlCurrentChar' file='parserInternals' module='parserInternals'>
+ <info>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value of an internal parsed entity contains either the literal two-character sequence &quot;#xD#xA&quot; or a standalone literal #xD, an XML processor must pass to the application the single character #xA. This behavior can conveniently be produced by normalizing all line breaks to #xA on input, before parsing.)</info>
+ <return type='int' info='the current char value and its length'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the XML parser context'/>
+ <arg name='len' type='int *' info='pointer to the length of the char read'/>
+ </function>
+ <functype name='xmlDOMWrapAcquireNsFunction' file='tree' module='tree'>
+ <info>A function called to acquire namespaces (xmlNs) from the wrapper.</info>
+ <return type='xmlNsPtr' info='an xmlNsPtr or NULL in case of an error.'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='a DOM wrapper context'/>
+ <arg name='node' type='xmlNodePtr' info='the context node (element or attribute)'/>
+ <arg name='nsName' type='const xmlChar *' info='the requested namespace name'/>
+ <arg name='nsPrefix' type='const xmlChar *' info='the requested namespace prefix'/>
+ </functype>
+ <function name='xmlDOMWrapAdoptNode' file='tree' module='tree'>
+ <info>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used This is the case when you have an unlinked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.</info>
+ <return type='int' info='0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='the optional context for custom processing'/>
+ <arg name='sourceDoc' type='xmlDocPtr' info='the optional sourceDoc'/>
+ <arg name='node' type='xmlNodePtr' info='the node to start with'/>
+ <arg name='destDoc' type='xmlDocPtr' info='the destination doc'/>
+ <arg name='destParent' type='xmlNodePtr' info='the optional new parent of @node in @destDoc'/>
+ <arg name='options' type='int' info='option flags'/>
+ </function>
+ <function name='xmlDOMWrapCloneNode' file='tree' module='tree'>
+ <info>References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc-&gt;oldNs entries are used. This is the case when you don&apos;t know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.</info>
+ <return type='int' info='0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='the optional context for custom processing'/>
+ <arg name='sourceDoc' type='xmlDocPtr' info='the optional sourceDoc'/>
+ <arg name='node' type='xmlNodePtr' info='the node to start with'/>
+ <arg name='resNode' type='xmlNodePtr *' info='the clone of the given @node'/>
+ <arg name='destDoc' type='xmlDocPtr' info='the destination doc'/>
+ <arg name='destParent' type='xmlNodePtr' info='the optional new parent of @node in @destDoc'/>
+ <arg name='deep' type='int' info='descend into child if set'/>
+ <arg name='options' type='int' info='option flags'/>
+ </function>
+ <function name='xmlDOMWrapFreeCtxt' file='tree' module='tree'>
+ <info>Frees the DOM-wrapper context.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='the DOM-wrapper context'/>
+ </function>
+ <function name='xmlDOMWrapNewCtxt' file='tree' module='tree'>
+ <info>Allocates and initializes a new DOM-wrapper context.</info>
+ <return type='xmlDOMWrapCtxtPtr' info='the xmlDOMWrapCtxtPtr or NULL in case of an internal error.'/>
+ </function>
+ <function name='xmlDOMWrapReconcileNamespaces' file='tree' module='tree'>
+ <info>Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.</info>
+ <return type='int' info='0 if succeeded, -1 otherwise and on API/internal errors.'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='DOM wrapper context, unused at the moment'/>
+ <arg name='elem' type='xmlNodePtr' info='the element-node'/>
+ <arg name='options' type='int' info='option flags'/>
+ </function>
+ <function name='xmlDOMWrapRemoveNode' file='tree' module='tree'>
+ <info>Unlinks the given node from its owner. This will substitute ns-references to node-&gt;nsDef for ns-references to doc-&gt;oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.</info>
+ <return type='int' info='0 on success, 1 if the node is not supported, -1 on API and internal errors.'/>
+ <arg name='ctxt' type='xmlDOMWrapCtxtPtr' info='a DOM wrapper context'/>
+ <arg name='doc' type='xmlDocPtr' info='the doc'/>
+ <arg name='node' type='xmlNodePtr' info='the node to be removed.'/>
+ <arg name='options' type='int' info='set of options, unused at the moment'/>
+ </function>
+ <function name='xmlDebugCheckDocument' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Check the document for potential content problems, and output the errors to @output</info>
+ <return type='int' info='the number of errors found'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlDebugDumpAttr' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the attribute</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlDebugDumpAttrList' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the attribute list</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute list'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlDebugDumpDTD' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the DTD</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='dtd' type='xmlDtdPtr' info='the DTD'/>
+ </function>
+ <function name='xmlDebugDumpDocument' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the document, it&apos;s recursive</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlDebugDumpDocumentHead' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information cncerning the document, not recursive</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlDebugDumpEntities' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for all the entities in use by the document</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlDebugDumpNode' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the element node, it is recursive</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlDebugDumpNodeList' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the list of element node, it is recursive</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='node' type='xmlNodePtr' info='the node list'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlDebugDumpOneNode' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps debug information for the element node, it is not recursive</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlDebugDumpString' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps informations about the string, shorten it if necessary</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='str' type='const xmlChar *' info='the string'/>
+ </function>
+ <function name='xmlDecodeEntities' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>This function is deprecated, we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= &apos;%&apos; Name &apos;;&apos;</info>
+ <return type='xmlChar *' info='A newly allocated string with the substitution done. The caller must deallocate it !'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='len' type='int' info='the len to decode (in bytes !), -1 for no size limit'/>
+ <arg name='what' type='int' info='combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF'/>
+ <arg name='end' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end2' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end3' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ </function>
+ <function name='xmlDefaultSAXHandlerInit' file='SAX2' module='SAX2'>
+ <info>Initialize the default SAX2 handler</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlDelEncodingAlias' file='encoding' module='encoding'>
+ <info>Unregisters an encoding alias @alias</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='alias' type='const char *' info='the alias name as parsed, in UTF-8 format (ASCII actually)'/>
+ </function>
+ <function name='xmlDeregisterNodeDefault' file='globals' module='globals'>
+ <info>Registers a callback for node destruction</info>
+ <return type='xmlDeregisterNodeFunc' info='the previous value of the deregistration function'/>
+ <arg name='func' type='xmlDeregisterNodeFunc' info='function pointer to the new DeregisterNodeFunc'/>
+ </function>
+ <functype name='xmlDeregisterNodeFunc' file='globals' module='globals'>
+ <info>Signature for the deregistration callback of a discarded node</info>
+ <return type='void'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ </functype>
+ <function name='xmlDetectCharEncoding' file='encoding' module='encoding'>
+ <info>Guess the encoding of the entity using the first bytes of the entity content according to the non-normative appendix F of the XML-1.0 recommendation.</info>
+ <return type='xmlCharEncoding' info='one of the XML_CHAR_ENCODING_... values.'/>
+ <arg name='in' type='const unsigned char *' info='a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant).'/>
+ <arg name='len' type='int' info='pointer to the length of the buffer'/>
+ </function>
+ <function name='xmlDictCleanup' file='dict' module='dict'>
+ <info>Free the dictionary mutex. Do not call unless sure the library is not in use anymore !</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlDictCreate' file='dict' module='dict'>
+ <info>Create a new dictionary</info>
+ <return type='xmlDictPtr' info='the newly created dictionnary, or NULL if an error occured.'/>
+ </function>
+ <function name='xmlDictCreateSub' file='dict' module='dict'>
+ <info>Create a new dictionary, inheriting strings from the read-only dictionnary @sub. On lookup, strings are first searched in the new dictionnary, then in @sub, and if not found are created in the new dictionnary.</info>
+ <return type='xmlDictPtr' info='the newly created dictionnary, or NULL if an error occured.'/>
+ <arg name='sub' type='xmlDictPtr' info='an existing dictionnary'/>
+ </function>
+ <function name='xmlDictExists' file='dict' module='dict'>
+ <info>Check if the @name exists in the dictionnary @dict.</info>
+ <return type='const xmlChar *' info='the internal copy of the name or NULL if not found.'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='len' type='int' info='the length of the name, if -1 it is recomputed'/>
+ </function>
+ <function name='xmlDictFree' file='dict' module='dict'>
+ <info>Free the hash @dict and its contents. The userdata is deallocated with @f if provided.</info>
+ <return type='void'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ </function>
+ <function name='xmlDictGetUsage' file='dict' module='dict'>
+ <info>Get how much memory is used by a dictionary for strings Added in 2.9.0</info>
+ <return type='size_t' info='the amount of strings allocated'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ </function>
+ <function name='xmlDictLookup' file='dict' module='dict'>
+ <info>Add the @name to the dictionnary @dict if not present.</info>
+ <return type='const xmlChar *' info='the internal copy of the name or NULL in case of internal error'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='len' type='int' info='the length of the name, if -1 it is recomputed'/>
+ </function>
+ <function name='xmlDictOwns' file='dict' module='dict'>
+ <info>check if a string is owned by the disctionary</info>
+ <return type='int' info='1 if true, 0 if false and -1 in case of error -1 in case of error'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ <arg name='str' type='const xmlChar *' info='the string'/>
+ </function>
+ <function name='xmlDictQLookup' file='dict' module='dict'>
+ <info>Add the QName @prefix:@name to the hash @dict if not present.</info>
+ <return type='const xmlChar *' info='the internal copy of the QName or NULL in case of internal error'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix'/>
+ <arg name='name' type='const xmlChar *' info='the name'/>
+ </function>
+ <function name='xmlDictReference' file='dict' module='dict'>
+ <info>Increment the reference counter of a dictionary</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ </function>
+ <function name='xmlDictSetLimit' file='dict' module='dict'>
+ <info>Set a size limit for the dictionary Added in 2.9.0</info>
+ <return type='size_t' info='the previous limit of the dictionary or 0'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ <arg name='limit' type='size_t' info='the limit in bytes'/>
+ </function>
+ <function name='xmlDictSize' file='dict' module='dict'>
+ <info>Query the number of elements installed in the hash @dict.</info>
+ <return type='int' info='the number of elements in the dictionnary or -1 in case of error'/>
+ <arg name='dict' type='xmlDictPtr' info='the dictionnary'/>
+ </function>
+ <function name='xmlDllMain' file='threads' module='threads'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='hinstDLL' type='void *' info=''/>
+ <arg name='fdwReason' type='unsigned long' info=''/>
+ <arg name='lpvReserved' type='void *' info=''/>
+ </function>
+ <function name='xmlDocCopyNode' file='tree' module='tree'>
+ <info>Do a copy of the node to a given document.</info>
+ <return type='xmlNodePtr' info='a new #xmlNodePtr, or NULL in case of error.'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='extended' type='int' info='if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)'/>
+ </function>
+ <function name='xmlDocCopyNodeList' file='tree' module='tree'>
+ <info>Do a recursive copy of the node list.</info>
+ <return type='xmlNodePtr' info='a new #xmlNodePtr, or NULL in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='the target document'/>
+ <arg name='node' type='xmlNodePtr' info='the first node in the list.'/>
+ </function>
+ <function name='xmlDocDump' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to an open FILE.</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='f' type='FILE *' info='the FILE*'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlDocDumpFormatMemory' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document in memory and return the #xmlChar * and it&apos;s size. It&apos;s up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
+ <arg name='size' type='int *' info='OUT: the memory length'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='xmlDocDumpFormatMemoryEnc' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called</info>
+ <return type='void'/>
+ <arg name='out_doc' type='xmlDocPtr' info='Document to generate XML text from'/>
+ <arg name='doc_txt_ptr' type='xmlChar **' info='Memory pointer for allocated XML text'/>
+ <arg name='doc_txt_len' type='int *' info='Length of the generated XML text'/>
+ <arg name='txt_encoding' type='const char *' info='Character encoding to use when generating XML text'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='xmlDocDumpMemory' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document in memory and return the #xmlChar * and it&apos;s size in bytes. It&apos;s up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='mem' type='xmlChar **' info='OUT: the memory pointer'/>
+ <arg name='size' type='int *' info='OUT: the memory length'/>
+ </function>
+ <function name='xmlDocDumpMemoryEnc' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().</info>
+ <return type='void'/>
+ <arg name='out_doc' type='xmlDocPtr' info='Document to generate XML text from'/>
+ <arg name='doc_txt_ptr' type='xmlChar **' info='Memory pointer for allocated XML text'/>
+ <arg name='doc_txt_len' type='int *' info='Length of the generated XML text'/>
+ <arg name='txt_encoding' type='const char *' info='Character encoding to use when generating XML text'/>
+ </function>
+ <function name='xmlDocFormatDump' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to an open FILE.</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called'/>
+ <arg name='f' type='FILE *' info='the FILE*'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='xmlDocGetRootElement' file='tree' module='tree'>
+ <info>Get the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</info>
+ <return type='xmlNodePtr' info='the #xmlNodePtr for the root or NULL'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ </function>
+ <function name='xmlDocSetRootElement' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Set the root element of the document (doc-&gt;children is a list containing possibly comments, PIs, etc ...).</info>
+ <return type='xmlNodePtr' info='the old root element if any was found, NULL if root was NULL'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='root' type='xmlNodePtr' info='the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.'/>
+ </function>
+ <function name='xmlDumpAttributeDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the attribute declaration as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='attr' type='xmlAttributePtr' info='An attribute declaration'/>
+ </function>
+ <function name='xmlDumpAttributeTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the attribute table as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='table' type='xmlAttributeTablePtr' info='An attribute table'/>
+ </function>
+ <function name='xmlDumpElementDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the element declaration as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='elem' type='xmlElementPtr' info='An element table'/>
+ </function>
+ <function name='xmlDumpElementTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the element table as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='table' type='xmlElementTablePtr' info='An element table'/>
+ </function>
+ <function name='xmlDumpEntitiesTable' file='entities' module='entities'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the entity table as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='An XML buffer.'/>
+ <arg name='table' type='xmlEntitiesTablePtr' info='An entity table'/>
+ </function>
+ <function name='xmlDumpEntityDecl' file='entities' module='entities'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the entity table as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='An XML buffer.'/>
+ <arg name='ent' type='xmlEntityPtr' info='An entity table'/>
+ </function>
+ <function name='xmlDumpNotationDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content the notation declaration as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='nota' type='xmlNotationPtr' info='A notation declaration'/>
+ </function>
+ <function name='xmlDumpNotationTable' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This will dump the content of the notation table as an XML DTD definition</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='table' type='xmlNotationTablePtr' info='A notation table'/>
+ </function>
+ <function name='xmlElemDump' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML/HTML node, recursive behaviour, children are printed too.</info>
+ <return type='void'/>
+ <arg name='f' type='FILE *' info='the FILE * for the output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ </function>
+ <function name='xmlEncodeEntities' file='entities' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered.</info>
+ <return type='const xmlChar *' info='NULL'/>
+ <arg name='doc' type='xmlDocPtr' info='the document containing the string'/>
+ <arg name='input' type='const xmlChar *' info='A string to convert to XML.'/>
+ </function>
+ <function name='xmlEncodeEntitiesReentrant' file='entities' module='entities'>
+ <info>Do a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated.</info>
+ <return type='xmlChar *' info='A newly allocated string with the substitution done.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document containing the string'/>
+ <arg name='input' type='const xmlChar *' info='A string to convert to XML.'/>
+ </function>
+ <function name='xmlEncodeSpecialChars' file='entities' module='entities'>
+ <info>Do a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated.</info>
+ <return type='xmlChar *' info='A newly allocated string with the substitution done.'/>
+ <arg name='doc' type='const xmlDoc *' info='the document containing the string'/>
+ <arg name='input' type='const xmlChar *' info='A string to convert to XML.'/>
+ </function>
+ <functype name='xmlEntityReferenceFunc' file='parserInternals' module='parserInternals'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Callback function used when one needs to be able to track back the provenance of a chunk of nodes inherited from an entity replacement.</info>
+ <return type='void'/>
+ <arg name='ent' type='xmlEntityPtr' info='the entity'/>
+ <arg name='firstNode' type='xmlNodePtr' info='the fist node in the chunk'/>
+ <arg name='lastNode' type='xmlNodePtr' info='the last nod in the chunk'/>
+ </functype>
+ <function name='xmlErrMemory' file='parserInternals' module='parserInternals'>
+ <info>Handle a redefinition of attribute error</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='extra' type='const char *' info='extra informations'/>
+ </function>
+ <function name='xmlExpCtxtNbCons' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Debugging facility provides the number of allocated nodes over lifetime</info>
+ <return type='int' info='the number of nodes ever allocated or -1 in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='an expression context'/>
+ </function>
+ <function name='xmlExpCtxtNbNodes' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Debugging facility provides the number of allocated nodes at a that point</info>
+ <return type='int' info='the number of nodes in use or -1 in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='an expression context'/>
+ </function>
+ <function name='xmlExpDump' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Serialize the expression as compiled to the buffer</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlBufferPtr' info='a buffer to receive the output'/>
+ <arg name='expr' type='xmlExpNodePtr' info='the compiled expression'/>
+ </function>
+ <function name='xmlExpExpDerive' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Evaluates the expression resulting from @exp consuming a sub expression @sub Based on algebraic derivation and sometimes direct Brzozowski derivation it usually tatkes less than linear time and can handle expressions generating infinite languages.</info>
+ <return type='xmlExpNodePtr' info='the resulting expression or NULL in case of internal error, the result must be freed'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expressions context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the englobing expression'/>
+ <arg name='sub' type='xmlExpNodePtr' info='the subexpression'/>
+ </function>
+ <function name='xmlExpFree' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Dereference the expression</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ </function>
+ <function name='xmlExpFreeCtxt' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Free an expression context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='an expression context'/>
+ </function>
+ <function name='xmlExpGetLanguage' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Find all the strings used in @exp and store them in @list</info>
+ <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ <arg name='langList' type='const xmlChar **' info='where to store the tokens'/>
+ <arg name='len' type='int' info='the allocated length of @list'/>
+ </function>
+ <function name='xmlExpGetStart' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Find all the strings that appears at the start of the languages accepted by @exp and store them in @list. E.g. for (a, b) | c it will return the list [a, c]</info>
+ <return type='int' info='the number of unique strings found, -1 in case of errors and -2 if there is more than @len strings'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ <arg name='tokList' type='const xmlChar **' info='where to store the tokens'/>
+ <arg name='len' type='int' info='the allocated length of @list'/>
+ </function>
+ <function name='xmlExpIsNillable' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Finds if the expression is nillable, i.e. if it accepts the empty sequqnce</info>
+ <return type='int' info='1 if nillable, 0 if not and -1 in case of error'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ </function>
+ <function name='xmlExpMaxToken' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Indicate the maximum number of input a expression can accept</info>
+ <return type='int' info='the maximum length or -1 in case of error'/>
+ <arg name='expr' type='xmlExpNodePtr' info='a compiled expression'/>
+ </function>
+ <function name='xmlExpNewAtom' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Get the atom associated to this name from that context</info>
+ <return type='xmlExpNodePtr' info='the node or NULL in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='name' type='const xmlChar *' info='the atom name'/>
+ <arg name='len' type='int' info='the atom name length in byte (or -1);'/>
+ </function>
+ <function name='xmlExpNewCtxt' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Creates a new context for manipulating expressions</info>
+ <return type='xmlExpCtxtPtr' info='the context or NULL in case of error'/>
+ <arg name='maxNodes' type='int' info='the maximum number of nodes'/>
+ <arg name='dict' type='xmlDictPtr' info='optional dictionnary to use internally'/>
+ </function>
+ <function name='xmlExpNewOr' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Get the atom associated to the choice @left | @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</info>
+ <return type='xmlExpNodePtr' info='the node or NULL in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='left' type='xmlExpNodePtr' info='left expression'/>
+ <arg name='right' type='xmlExpNodePtr' info='right expression'/>
+ </function>
+ <function name='xmlExpNewRange' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Get the atom associated to the range (@subset){@min, @max} Note that @subset is consumed in the operation, to keep an handle on it use xmlExpRef() and use xmlExpFree() to release it, this is true even in case of failure (unless ctxt == NULL).</info>
+ <return type='xmlExpNodePtr' info='the node or NULL in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='subset' type='xmlExpNodePtr' info='the expression to be repeated'/>
+ <arg name='min' type='int' info='the lower bound for the repetition'/>
+ <arg name='max' type='int' info='the upper bound for the repetition, -1 means infinite'/>
+ </function>
+ <function name='xmlExpNewSeq' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Get the atom associated to the sequence @left , @right Note that @left and @right are consumed in the operation, to keep an handle on them use xmlExpRef() and use xmlExpFree() to release them, this is true even in case of failure (unless ctxt == NULL).</info>
+ <return type='xmlExpNodePtr' info='the node or NULL in case of error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='left' type='xmlExpNodePtr' info='left expression'/>
+ <arg name='right' type='xmlExpNodePtr' info='right expression'/>
+ </function>
+ <function name='xmlExpParse' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Minimal parser for regexps, it understand the following constructs - string terminals - choice operator | - sequence operator , - subexpressions (...) - usual cardinality operators + * and ? - finite sequences { min, max } - infinite sequences { min, * } There is minimal checkings made especially no checking on strings values</info>
+ <return type='xmlExpNodePtr' info='a new expression or NULL in case of failure'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expressions context'/>
+ <arg name='expr' type='const char *' info='the 0 terminated string'/>
+ </function>
+ <function name='xmlExpRef' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Increase the reference count of the expression</info>
+ <return type='void'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ </function>
+ <function name='xmlExpStringDerive' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Do one step of Brzozowski derivation of the expression @exp with respect to the input string</info>
+ <return type='xmlExpNodePtr' info='the resulting expression or NULL in case of internal error'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expression context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the expression'/>
+ <arg name='str' type='const xmlChar *' info='the string'/>
+ <arg name='len' type='int' info='the string len in bytes if available'/>
+ </function>
+ <function name='xmlExpSubsume' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_EXPR_ENABLED)</cond>
+ <info>Check whether @exp accepts all the languages accexpted by @sub the input being a subexpression.</info>
+ <return type='int' info='1 if true 0 if false and -1 in case of failure.'/>
+ <arg name='ctxt' type='xmlExpCtxtPtr' info='the expressions context'/>
+ <arg name='exp' type='xmlExpNodePtr' info='the englobing expression'/>
+ <arg name='sub' type='xmlExpNodePtr' info='the subexpression'/>
+ </function>
+ <functype name='xmlExternalEntityLoader' file='parser' module='parser'>
+ <info>External entity loaders types.</info>
+ <return type='xmlParserInputPtr' info='the entity input parser.'/>
+ <arg name='URL' type='const char *' info='The System ID of the resource requested'/>
+ <arg name='ID' type='const char *' info='The Public ID of the resource requested'/>
+ <arg name='context' type='xmlParserCtxtPtr' info='the XML parser context'/>
+ </functype>
+ <function name='xmlFileClose' file='xmlIO' module='xmlIO'>
+ <info>Close an I/O channel</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ </function>
+ <function name='xmlFileMatch' file='xmlIO' module='xmlIO'>
+ <info>input from FILE *</info>
+ <return type='int' info='1 if matches, 0 otherwise'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlFileOpen' file='xmlIO' module='xmlIO'>
+ <info>Wrapper around xmlFileOpen_real that try it with an unescaped version of @filename, if this fails fallback to @filename</info>
+ <return type='void *' info='a handler or NULL in case or failure'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlFileRead' file='xmlIO' module='xmlIO'>
+ <info>Read @len bytes to @buffer from the I/O channel.</info>
+ <return type='int' info='the number of bytes written or &lt; 0 in case of failure'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ <arg name='buffer' type='char *' info='where to drop data'/>
+ <arg name='len' type='int' info='number of bytes to write'/>
+ </function>
+ <function name='xmlFindCharEncodingHandler' file='encoding' module='encoding'>
+ <info>Search in the registered set the handler able to read/write that encoding.</info>
+ <return type='xmlCharEncodingHandlerPtr' info='the handler or NULL if not found'/>
+ <arg name='name' type='const char *' info='a string describing the char encoding.'/>
+ </function>
+ <function name='xmlFirstElementChild' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don&apos;t have back reference from entities content to entities references.</info>
+ <return type='xmlNodePtr' info='the first element child or NULL if not available'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ </function>
+ <function name='xmlFreeAttributeTable' file='valid' module='valid'>
+ <info>Deallocate the memory used by an entities hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlAttributeTablePtr' info='An attribute table'/>
+ </function>
+ <function name='xmlFreeAutomata' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Free an automata</info>
+ <return type='void'/>
+ <arg name='am' type='xmlAutomataPtr' info='an automata'/>
+ </function>
+ <function name='xmlFreeCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Free the memory allocated to a Catalog</info>
+ <return type='void'/>
+ <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
+ </function>
+ <function name='xmlFreeDoc' file='tree' module='tree'>
+ <info>Free up all the structures used by a document, tree included.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDocPtr' info='pointer to the document'/>
+ </function>
+ <function name='xmlFreeDocElementContent' file='valid' module='valid'>
+ <info>Free an element content structure. The whole subtree is removed.</info>
+ <return type='void'/>
+ <arg name='doc' type='xmlDocPtr' info='the document owning the element declaration'/>
+ <arg name='cur' type='xmlElementContentPtr' info='the element content tree to free'/>
+ </function>
+ <function name='xmlFreeDtd' file='tree' module='tree'>
+ <info>Free a DTD structure.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlDtdPtr' info='the DTD structure to free up'/>
+ </function>
+ <function name='xmlFreeElementContent' file='valid' module='valid'>
+ <info>Free an element content structure. The whole subtree is removed. Deprecated, use xmlFreeDocElementContent instead</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlElementContentPtr' info='the element content tree to free'/>
+ </function>
+ <function name='xmlFreeElementTable' file='valid' module='valid'>
+ <info>Deallocate the memory used by an element hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlElementTablePtr' info='An element table'/>
+ </function>
+ <function name='xmlFreeEntitiesTable' file='entities' module='entities'>
+ <info>Deallocate the memory used by an entities hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlEntitiesTablePtr' info='An entity table'/>
+ </function>
+ <function name='xmlFreeEnumeration' file='valid' module='valid'>
+ <info>free an enumeration attribute node (recursive).</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlEnumerationPtr' info='the tree to free.'/>
+ </function>
+ <functype name='xmlFreeFunc' file='xmlmemory' module='xmlmemory'>
+ <info>Signature for a free() implementation.</info>
+ <return type='void'/>
+ <arg name='mem' type='void *' info='an already allocated block of memory'/>
+ </functype>
+ <function name='xmlFreeIDTable' file='valid' module='valid'>
+ <info>Deallocate the memory used by an ID hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlIDTablePtr' info='An id table'/>
+ </function>
+ <function name='xmlFreeInputStream' file='parserInternals' module='parserInternals'>
+ <info>Free up an input stream.</info>
+ <return type='void'/>
+ <arg name='input' type='xmlParserInputPtr' info='an xmlParserInputPtr'/>
+ </function>
+ <function name='xmlFreeMutex' file='threads' module='threads'>
+ <info>xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlMutexPtr' info='the simple mutex'/>
+ </function>
+ <function name='xmlFreeNode' file='tree' module='tree'>
+ <info>Free a node, this is a recursive behaviour, all the children are freed too. This doesn&apos;t unlink the child from the list, use xmlUnlinkNode() first.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlFreeNodeList' file='tree' module='tree'>
+ <info>Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the first node in the list'/>
+ </function>
+ <function name='xmlFreeNotationTable' file='valid' module='valid'>
+ <info>Deallocate the memory used by an entities hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlNotationTablePtr' info='An notation table'/>
+ </function>
+ <function name='xmlFreeNs' file='tree' module='tree'>
+ <info>Free up the structures associated to a namespace</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNsPtr' info='the namespace pointer'/>
+ </function>
+ <function name='xmlFreeNsList' file='tree' module='tree'>
+ <info>Free up all the structures associated to the chained namespaces.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNsPtr' info='the first namespace pointer'/>
+ </function>
+ <function name='xmlFreeParserCtxt' file='parser' module='parserInternals'>
+ <info>Free all the memory used by a parser context. However the parsed document in ctxt-&gt;myDoc is not freed.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlFreeParserInputBuffer' file='xmlIO' module='xmlIO'>
+ <info>Free up the memory used by a buffered parser input</info>
+ <return type='void'/>
+ <arg name='in' type='xmlParserInputBufferPtr' info='a buffered parser input'/>
+ </function>
+ <function name='xmlFreePattern' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Free up the memory allocated by @comp</info>
+ <return type='void'/>
+ <arg name='comp' type='xmlPatternPtr' info='an XSLT comp'/>
+ </function>
+ <function name='xmlFreePatternList' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Free up the memory allocated by all the elements of @comp</info>
+ <return type='void'/>
+ <arg name='comp' type='xmlPatternPtr' info='an XSLT comp list'/>
+ </function>
+ <function name='xmlFreeProp' file='tree' module='tree'>
+ <info>Free one attribute, all the content is freed too</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlAttrPtr' info='an attribute'/>
+ </function>
+ <function name='xmlFreePropList' file='tree' module='tree'>
+ <info>Free a property and all its siblings, all the children are freed too.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlAttrPtr' info='the first property in the list'/>
+ </function>
+ <function name='xmlFreeRMutex' file='threads' module='threads'>
+ <info>xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlRMutexPtr' info='the reentrant mutex'/>
+ </function>
+ <function name='xmlFreeRefTable' file='valid' module='valid'>
+ <info>Deallocate the memory used by an Ref hash table.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlRefTablePtr' info='An ref table'/>
+ </function>
+ <function name='xmlFreeStreamCtxt' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Free the stream context</info>
+ <return type='void'/>
+ <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+ </function>
+ <function name='xmlFreeTextReader' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Deallocate all the resources associated to the reader</info>
+ <return type='void'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr'/>
+ </function>
+ <function name='xmlFreeTextWriter' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Deallocate all the resources associated to the writer</info>
+ <return type='void'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlFreeURI' file='uri' module='uri'>
+ <info>Free up the xmlURI struct</info>
+ <return type='void'/>
+ <arg name='uri' type='xmlURIPtr' info='pointer to an xmlURI'/>
+ </function>
+ <function name='xmlFreeValidCtxt' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Free a validation context structure.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlValidCtxtPtr' info='the validation context to free'/>
+ </function>
+ <function name='xmlGcMemGet' file='xmlmemory' module='xmlmemory'>
+ <info>Provides the memory access functions set currently in use The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators</info>
+ <return type='int' info='0 on success'/>
+ <arg name='freeFunc' type='xmlFreeFunc *' info='place to save the free() function in use'/>
+ <arg name='mallocFunc' type='xmlMallocFunc *' info='place to save the malloc() function in use'/>
+ <arg name='mallocAtomicFunc' type='xmlMallocFunc *' info='place to save the atomic malloc() function in use'/>
+ <arg name='reallocFunc' type='xmlReallocFunc *' info='place to save the realloc() function in use'/>
+ <arg name='strdupFunc' type='xmlStrdupFunc *' info='place to save the strdup() function in use'/>
+ </function>
+ <function name='xmlGcMemSetup' file='xmlmemory' module='xmlmemory'>
+ <info>Override the default memory access functions with a new set This has to be called before any other libxml routines ! The mallocAtomicFunc is specialized for atomic block allocations (i.e. of areas useful for garbage collected memory allocators Should this be blocked if there was already some allocations done ?</info>
+ <return type='int' info='0 on success'/>
+ <arg name='freeFunc' type='xmlFreeFunc' info='the free() function to use'/>
+ <arg name='mallocFunc' type='xmlMallocFunc' info='the malloc() function to use'/>
+ <arg name='mallocAtomicFunc' type='xmlMallocFunc' info='the malloc() function to use for atomic allocations'/>
+ <arg name='reallocFunc' type='xmlReallocFunc' info='the realloc() function to use'/>
+ <arg name='strdupFunc' type='xmlStrdupFunc' info='the strdup() function to use'/>
+ </function>
+ <functype name='xmlGenericErrorFunc' file='xmlerror' module='xmlerror'>
+ <info>Signature of the function to use when there is an error and no parsing or validity context available .</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='a parsing context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='the extra arguments of the varags to format the message'/>
+ </functype>
+ <function name='xmlGetBufferAllocationScheme' file='tree' module='tree'>
+ <info>Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance XML_BUFFER_ALLOC_HYBRID - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.</info>
+ <return type='xmlBufferAllocationScheme' info='the current allocation scheme'/>
+ </function>
+ <function name='xmlGetCharEncodingHandler' file='encoding' module='encoding'>
+ <info>Search in the registered set the handler able to read/write that encoding.</info>
+ <return type='xmlCharEncodingHandlerPtr' info='the handler or NULL if not found'/>
+ <arg name='enc' type='xmlCharEncoding' info='an xmlCharEncoding value.'/>
+ </function>
+ <function name='xmlGetCharEncodingName' file='encoding' module='encoding'>
+ <info>The &quot;canonical&quot; name for XML encoding. C.f. http://www.w3.org/TR/REC-xml#charencoding Section 4.3.3 Character Encoding in Entities</info>
+ <return type='const char *' info='the canonical name for the given encoding'/>
+ <arg name='enc' type='xmlCharEncoding' info='the encoding'/>
+ </function>
+ <function name='xmlGetCompressMode' file='tree' module='tree'>
+ <info>get the default compression mode used, ZLIB based.</info>
+ <return type='int' info='0 (uncompressed) to 9 (max compression)'/>
+ </function>
+ <function name='xmlGetDocCompressMode' file='tree' module='tree'>
+ <info>get the compression ratio for a document, ZLIB based</info>
+ <return type='int' info='0 (uncompressed) to 9 (max compression)'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ </function>
+ <function name='xmlGetDocEntity' file='entities' module='entities'>
+ <info>Do an entity lookup in the document entity hash table and</info>
+ <return type='xmlEntityPtr' info='the corresponding entity, otherwise a lookup is done in the predefined entities too. Returns A pointer to the entity structure or NULL if not found.'/>
+ <arg name='doc' type='const xmlDoc *' info='the document referencing the entity'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ </function>
+ <function name='xmlGetDtdAttrDesc' file='valid' module='valid'>
+ <info>Search the DTD for the description of this attribute on this element.</info>
+ <return type='xmlAttributePtr' info='the xmlAttributePtr if found or NULL'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a pointer to the DtD to search'/>
+ <arg name='elem' type='const xmlChar *' info='the element name'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlGetDtdElementDesc' file='valid' module='valid'>
+ <info>Search the DTD for the description of this element</info>
+ <return type='xmlElementPtr' info='the xmlElementPtr if found or NULL'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a pointer to the DtD to search'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ </function>
+ <function name='xmlGetDtdEntity' file='entities' module='entities'>
+ <info>Do an entity lookup in the DTD entity hash table and</info>
+ <return type='xmlEntityPtr' info='the corresponding entity, if found. Note: the first argument is the document node, not the DTD node. Returns A pointer to the entity structure or NULL if not found.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document referencing the entity'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ </function>
+ <function name='xmlGetDtdNotationDesc' file='valid' module='valid'>
+ <info>Search the DTD for the description of this notation</info>
+ <return type='xmlNotationPtr' info='the xmlNotationPtr if found or NULL'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a pointer to the DtD to search'/>
+ <arg name='name' type='const xmlChar *' info='the notation name'/>
+ </function>
+ <function name='xmlGetDtdQAttrDesc' file='valid' module='valid'>
+ <info>Search the DTD for the description of this qualified attribute on this element.</info>
+ <return type='xmlAttributePtr' info='the xmlAttributePtr if found or NULL'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a pointer to the DtD to search'/>
+ <arg name='elem' type='const xmlChar *' info='the element name'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='prefix' type='const xmlChar *' info='the attribute namespace prefix'/>
+ </function>
+ <function name='xmlGetDtdQElementDesc' file='valid' module='valid'>
+ <info>Search the DTD for the description of this element</info>
+ <return type='xmlElementPtr' info='the xmlElementPtr if found or NULL'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a pointer to the DtD to search'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ <arg name='prefix' type='const xmlChar *' info='the element namespace prefix'/>
+ </function>
+ <function name='xmlGetEncodingAlias' file='encoding' module='encoding'>
+ <info>Lookup an encoding name for the given alias.</info>
+ <return type='const char *' info='NULL if not found, otherwise the original name'/>
+ <arg name='alias' type='const char *' info='the alias name as parsed, in UTF-8 format (ASCII actually)'/>
+ </function>
+ <function name='xmlGetExternalEntityLoader' file='parser' module='xmlIO'>
+ <info>Get the default external entity resolver function for the application</info>
+ <return type='xmlExternalEntityLoader' info='the xmlExternalEntityLoader function pointer'/>
+ </function>
+ <function name='xmlGetFeature' file='parser' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Read the current value of one feature of this parser instance</info>
+ <return type='int' info='-1 in case or error, 0 otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML/HTML parser context'/>
+ <arg name='name' type='const char *' info='the feature name'/>
+ <arg name='result' type='void *' info='location to store the result'/>
+ </function>
+ <function name='xmlGetFeaturesList' file='parser' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Copy at most *@len feature names into the @result array</info>
+ <return type='int' info='-1 in case or error, or the total number of features, len is updated with the number of strings copied, strings must not be deallocated'/>
+ <arg name='len' type='int *' info='the length of the features name array (input/output)'/>
+ <arg name='result' type='const char **' info='an array of string to be filled with the features name.'/>
+ </function>
+ <function name='xmlGetGlobalState' file='threads' module='threads'>
+ <info>xmlGetGlobalState() is called to retrieve the global state for a thread.</info>
+ <return type='xmlGlobalStatePtr' info='the thread global state or NULL in case of error'/>
+ </function>
+ <function name='xmlGetID' file='valid' module='valid'>
+ <info>Search the attribute declaring the given ID</info>
+ <return type='xmlAttrPtr' info='NULL if not found, otherwise the xmlAttrPtr defining the ID'/>
+ <arg name='doc' type='xmlDocPtr' info='pointer to the document'/>
+ <arg name='ID' type='const xmlChar *' info='the ID value'/>
+ </function>
+ <function name='xmlGetIntSubset' file='tree' module='tree'>
+ <info>Get the internal subset of a document</info>
+ <return type='xmlDtdPtr' info='a pointer to the DTD structure or NULL if not found'/>
+ <arg name='doc' type='const xmlDoc *' info='the document pointer'/>
+ </function>
+ <function name='xmlGetLastChild' file='tree' module='tree'>
+ <info>Search the last child of a node.</info>
+ <return type='xmlNodePtr' info='the last child or NULL if none.'/>
+ <arg name='parent' type='const xmlNode *' info='the parent node'/>
+ </function>
+ <function name='xmlGetLastError' file='xmlerror' module='error'>
+ <info>Get the last global error registered. This is per thread if compiled with thread support.</info>
+ <return type='xmlErrorPtr' info='NULL if no error occured or a pointer to the error'/>
+ </function>
+ <function name='xmlGetLineNo' file='tree' module='tree'>
+ <info>Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used</info>
+ <return type='long' info='the line number if successful, -1 otherwise'/>
+ <arg name='node' type='const xmlNode *' info='valid node'/>
+ </function>
+ <function name='xmlGetNoNsProp' file='tree' module='tree'>
+ <info>Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to xmlGetProp except it will accept only an attribute in no namespace.</info>
+ <return type='xmlChar *' info='the attribute value or NULL if not found. It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlGetNodePath' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Build a structure based Path for the given node</info>
+ <return type='xmlChar *' info='the new path or NULL in case of error. The caller must free the returned string'/>
+ <arg name='node' type='const xmlNode *' info='a node'/>
+ </function>
+ <function name='xmlGetNsList' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Search all the namespace applying to a given element.</info>
+ <return type='xmlNsPtr *' info='an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='node' type='const xmlNode *' info='the current node'/>
+ </function>
+ <function name='xmlGetNsProp' file='tree' module='tree'>
+ <info>Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.</info>
+ <return type='xmlChar *' info='the attribute value or NULL if not found. It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='nameSpace' type='const xmlChar *' info='the URI of the namespace'/>
+ </function>
+ <function name='xmlGetParameterEntity' file='entities' module='entities'>
+ <info>Do an entity lookup in the internal and external subsets and</info>
+ <return type='xmlEntityPtr' info='the corresponding parameter entity, if found. Returns A pointer to the entity structure or NULL if not found.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document referencing the entity'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ </function>
+ <function name='xmlGetPredefinedEntity' file='entities' module='entities'>
+ <info>Check whether this name is an predefined entity.</info>
+ <return type='xmlEntityPtr' info='NULL if not, otherwise the entity'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ </function>
+ <function name='xmlGetProp' file='tree' module='tree'>
+ <info>Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.</info>
+ <return type='xmlChar *' info='the attribute value or NULL if not found. It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlGetRefs' file='valid' module='valid'>
+ <info>Find the set of references for the supplied ID.</info>
+ <return type='xmlListPtr' info='NULL if not found, otherwise node set for the ID.'/>
+ <arg name='doc' type='xmlDocPtr' info='pointer to the document'/>
+ <arg name='ID' type='const xmlChar *' info='the ID value'/>
+ </function>
+ <function name='xmlGetThreadId' file='threads' module='threads'>
+ <info>xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn&apos;t mandate pthread_t to be an integer type</info>
+ <return type='int' info='the current thread ID number'/>
+ </function>
+ <function name='xmlGetUTF8Char' file='xmlstring' module='xmlstring'>
+ <info>Read the first UTF8 character from @utf</info>
+ <return type='int' info='the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)'/>
+ <arg name='utf' type='const unsigned char *' info='a sequence of UTF-8 encoded bytes'/>
+ <arg name='len' type='int *' info='a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.'/>
+ </function>
+ <function name='xmlHandleEntity' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Default handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='entity' type='xmlEntityPtr' info='an XML entity pointer.'/>
+ </function>
+ <function name='xmlHasFeature' file='parser' module='parser'>
+ <info>Examines if the library has been compiled with a given feature.</info>
+ <return type='int' info='a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise.'/>
+ <arg name='feature' type='xmlFeature' info='the feature to be examined'/>
+ </function>
+ <function name='xmlHasNsProp' file='tree' module='tree'>
+ <info>Search for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.</info>
+ <return type='xmlAttrPtr' info='the attribute or the attribute declaration or NULL if neither was found.'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='nameSpace' type='const xmlChar *' info='the URI of the namespace'/>
+ </function>
+ <function name='xmlHasProp' file='tree' module='tree'>
+ <info>Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.</info>
+ <return type='xmlAttrPtr' info='the attribute or the attribute declaration or NULL if neither was found.'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlHashAddEntry' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Duplicate names generate errors.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ </function>
+ <function name='xmlHashAddEntry2' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Duplicate tuples generate errors.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ </function>
+ <function name='xmlHashAddEntry3' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Duplicate entries generate errors.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ </function>
+ <functype name='xmlHashCopier' file='hash' module='hash'>
+ <info>Callback to copy data from a hash.</info>
+ <return type='void *' info='a copy of the data or NULL in case of error.'/>
+ <arg name='payload' type='void *' info='the data in the hash'/>
+ <arg name='name' type='xmlChar *' info='the name associated'/>
+ </functype>
+ <function name='xmlHashCopy' file='hash' module='hash'>
+ <info>Scan the hash @table and applied @f to each value.</info>
+ <return type='xmlHashTablePtr' info='the new table or NULL in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='f' type='xmlHashCopier' info='the copier function for items in the hash'/>
+ </function>
+ <function name='xmlHashCreate' file='hash' module='hash'>
+ <info>Create a new xmlHashTablePtr.</info>
+ <return type='xmlHashTablePtr' info='the newly created object, or NULL if an error occured.'/>
+ <arg name='size' type='int' info='the size of the hash table'/>
+ </function>
+ <function name='xmlHashCreateDict' file='hash' module='hash'>
+ <info>Create a new xmlHashTablePtr which will use @dict as the internal dictionary</info>
+ <return type='xmlHashTablePtr' info='the newly created object, or NULL if an error occured.'/>
+ <arg name='size' type='int' info='the size of the hash table'/>
+ <arg name='dict' type='xmlDictPtr' info='a dictionary to use for the hash'/>
+ </function>
+ <functype name='xmlHashDeallocator' file='hash' module='hash'>
+ <info>Callback to free data from a hash.</info>
+ <return type='void'/>
+ <arg name='payload' type='void *' info='the data in the hash'/>
+ <arg name='name' type='xmlChar *' info='the name associated'/>
+ </functype>
+ <function name='xmlHashFree' file='hash' module='hash'>
+ <info>Free the hash @table and its contents. The userdata is deallocated with @f if provided.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for items in the hash'/>
+ </function>
+ <function name='xmlHashLookup' file='hash' module='hash'>
+ <info>Find the userdata specified by the @name.</info>
+ <return type='void *' info='the pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ </function>
+ <function name='xmlHashLookup2' file='hash' module='hash'>
+ <info>Find the userdata specified by the (@name, @name2) tuple.</info>
+ <return type='void *' info='the pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ </function>
+ <function name='xmlHashLookup3' file='hash' module='hash'>
+ <info>Find the userdata specified by the (@name, @name2, @name3) tuple.</info>
+ <return type='void *' info='the a pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata'/>
+ </function>
+ <function name='xmlHashQLookup' file='hash' module='hash'>
+ <info>Find the userdata specified by the QName @prefix:@name/@name.</info>
+ <return type='void *' info='the pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix of the userdata'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ </function>
+ <function name='xmlHashQLookup2' file='hash' module='hash'>
+ <info>Find the userdata specified by the QNames tuple</info>
+ <return type='void *' info='the pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix of the userdata'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='prefix2' type='const xmlChar *' info='the second prefix of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ </function>
+ <function name='xmlHashQLookup3' file='hash' module='hash'>
+ <info>Find the userdata specified by the (@name, @name2, @name3) tuple.</info>
+ <return type='void *' info='the a pointer to the userdata'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix of the userdata'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='prefix2' type='const xmlChar *' info='the second prefix of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='prefix3' type='const xmlChar *' info='the third prefix of the userdata'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata'/>
+ </function>
+ <function name='xmlHashRemoveEntry' file='hash' module='hash'>
+ <info>Find the userdata specified by the @name and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</info>
+ <return type='int' info='0 if the removal succeeded and -1 in case of error or not found.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for removed item (if any)'/>
+ </function>
+ <function name='xmlHashRemoveEntry2' file='hash' module='hash'>
+ <info>Find the userdata specified by the (@name, @name2) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</info>
+ <return type='int' info='0 if the removal succeeded and -1 in case of error or not found.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for removed item (if any)'/>
+ </function>
+ <function name='xmlHashRemoveEntry3' file='hash' module='hash'>
+ <info>Find the userdata specified by the (@name, @name2, @name3) tuple and remove it from the hash @table. Existing userdata for this tuple will be removed and freed with @f.</info>
+ <return type='int' info='0 if the removal succeeded and -1 in case of error or not found.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for removed item (if any)'/>
+ </function>
+ <function name='xmlHashScan' file='hash' module='hash'>
+ <info>Scan the hash @table and applied @f to each value.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='f' type='xmlHashScanner' info='the scanner function for items in the hash'/>
+ <arg name='data' type='void *' info='extra data passed to f'/>
+ </function>
+ <function name='xmlHashScan3' file='hash' module='hash'>
+ <info>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata or NULL'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata or NULL'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata or NULL'/>
+ <arg name='f' type='xmlHashScanner' info='the scanner function for items in the hash'/>
+ <arg name='data' type='void *' info='extra data passed to f'/>
+ </function>
+ <function name='xmlHashScanFull' file='hash' module='hash'>
+ <info>Scan the hash @table and applied @f to each value.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='f' type='xmlHashScannerFull' info='the scanner function for items in the hash'/>
+ <arg name='data' type='void *' info='extra data passed to f'/>
+ </function>
+ <function name='xmlHashScanFull3' file='hash' module='hash'>
+ <info>Scan the hash @table and applied @f to each value matching (@name, @name2, @name3) tuple. If one of the names is null, the comparison is considered to match.</info>
+ <return type='void'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata or NULL'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata or NULL'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata or NULL'/>
+ <arg name='f' type='xmlHashScannerFull' info='the scanner function for items in the hash'/>
+ <arg name='data' type='void *' info='extra data passed to f'/>
+ </function>
+ <functype name='xmlHashScanner' file='hash' module='hash'>
+ <info>Callback when scanning data in a hash with the simple scanner.</info>
+ <return type='void'/>
+ <arg name='payload' type='void *' info='the data in the hash'/>
+ <arg name='data' type='void *' info='extra scannner data'/>
+ <arg name='name' type='xmlChar *' info='the name associated'/>
+ </functype>
+ <functype name='xmlHashScannerFull' file='hash' module='hash'>
+ <info>Callback when scanning data in a hash with the full scanner.</info>
+ <return type='void'/>
+ <arg name='payload' type='void *' info='the data in the hash'/>
+ <arg name='data' type='void *' info='extra scannner data'/>
+ <arg name='name' type='const xmlChar *' info='the name associated'/>
+ <arg name='name2' type='const xmlChar *' info='the second name associated'/>
+ <arg name='name3' type='const xmlChar *' info='the third name associated'/>
+ </functype>
+ <function name='xmlHashSize' file='hash' module='hash'>
+ <info>Query the number of elements installed in the hash @table.</info>
+ <return type='int' info='the number of elements in the hash table or -1 in case of error'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ </function>
+ <function name='xmlHashUpdateEntry' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the @name. Existing entry for this @name will be removed and freed with @f if found.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for replaced item (if any)'/>
+ </function>
+ <function name='xmlHashUpdateEntry2' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the (@name, @name2) tuple. Existing entry for this tuple will be removed and freed with @f if found.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for replaced item (if any)'/>
+ </function>
+ <function name='xmlHashUpdateEntry3' file='hash' module='hash'>
+ <info>Add the @userdata to the hash @table. This can later be retrieved by using the tuple (@name, @name2, @name3). Existing entry for this tuple will be removed and freed with @f if found.</info>
+ <return type='int' info='0 the addition succeeded and -1 in case of error.'/>
+ <arg name='table' type='xmlHashTablePtr' info='the hash table'/>
+ <arg name='name' type='const xmlChar *' info='the name of the userdata'/>
+ <arg name='name2' type='const xmlChar *' info='a second name of the userdata'/>
+ <arg name='name3' type='const xmlChar *' info='a third name of the userdata'/>
+ <arg name='userdata' type='void *' info='a pointer to the userdata'/>
+ <arg name='f' type='xmlHashDeallocator' info='the deallocator function for replaced item (if any)'/>
+ </function>
+ <function name='xmlIOFTPClose' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Close an FTP I/O channel</info>
+ <return type='int' info='0'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ </function>
+ <function name='xmlIOFTPMatch' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>check if the URI matches an FTP one</info>
+ <return type='int' info='1 if matches, 0 otherwise'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlIOFTPOpen' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>open an FTP I/O channel</info>
+ <return type='void *' info='an I/O context or NULL in case of error'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlIOFTPRead' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Read @len bytes to @buffer from the I/O channel.</info>
+ <return type='int' info='the number of bytes written'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ <arg name='buffer' type='char *' info='where to drop data'/>
+ <arg name='len' type='int' info='number of bytes to write'/>
+ </function>
+ <function name='xmlIOHTTPClose' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Close an HTTP I/O channel</info>
+ <return type='int' info='0'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ </function>
+ <function name='xmlIOHTTPMatch' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>check if the URI matches an HTTP one</info>
+ <return type='int' info='1 if matches, 0 otherwise'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlIOHTTPOpen' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>open an HTTP I/O channel</info>
+ <return type='void *' info='an I/O context or NULL in case of error'/>
+ <arg name='filename' type='const char *' info='the URI for matching'/>
+ </function>
+ <function name='xmlIOHTTPOpenW' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_HTTP_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Open a temporary buffer to collect the document for a subsequent HTTP POST request. Non-static as is called from the output buffer creation routine.</info>
+ <return type='void *' info='an I/O context or NULL in case of error.'/>
+ <arg name='post_uri' type='const char *' info='The destination URI for the document'/>
+ <arg name='compression' type='int' info='The compression desired for the document.'/>
+ </function>
+ <function name='xmlIOHTTPRead' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Read @len bytes to @buffer from the I/O channel.</info>
+ <return type='int' info='the number of bytes written'/>
+ <arg name='context' type='void *' info='the I/O context'/>
+ <arg name='buffer' type='char *' info='where to drop data'/>
+ <arg name='len' type='int' info='number of bytes to write'/>
+ </function>
+ <function name='xmlIOParseDTD' file='parser' module='parser'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Load and parse a DTD</info>
+ <return type='xmlDtdPtr' info='the resulting xmlDtdPtr or NULL in case of error. @input will be freed by the function in any case.'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block or NULL'/>
+ <arg name='input' type='xmlParserInputBufferPtr' info='an Input Buffer'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlInitCharEncodingHandlers' file='encoding' module='encoding'>
+ <info>Initialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn&apos;t need to be called in normal processing.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlInitGlobals' file='globals' module='globals'>
+ <info>Additional initialisation for multi-threading</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlInitMemory' file='xmlmemory' module='xmlmemory'>
+ <info>Initialize the memory layer.</info>
+ <return type='int' info='0 on success'/>
+ </function>
+ <function name='xmlInitNodeInfoSeq' file='parser' module='parserInternals'>
+ <info>-- Initialize (set to initial state) node info sequence</info>
+ <return type='void'/>
+ <arg name='seq' type='xmlParserNodeInfoSeqPtr' info='a node info sequence pointer'/>
+ </function>
+ <function name='xmlInitParser' file='parser' module='parser'>
+ <info>Initialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlInitParserCtxt' file='parser' module='parserInternals'>
+ <info>Initialize a parser context</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlInitThreads' file='threads' module='threads'>
+ <info>xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlInitializeCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Do the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlInitializeDict' file='dict' module='dict'>
+ <info>Do the dictionary mutex initialization. this function is deprecated</info>
+ <return type='int' info='0 if initialization was already done, and 1 if that call led to the initialization'/>
+ </function>
+ <function name='xmlInitializeGlobalState' file='globals' module='globals'>
+ <info>xmlInitializeGlobalState() initialize a global state with all the default values of the library.</info>
+ <return type='void'/>
+ <arg name='gs' type='xmlGlobalStatePtr' info='a pointer to a newly allocated global state'/>
+ </function>
+ <function name='xmlInitializePredefinedEntities' file='entities' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Set up the predefined entities. Deprecated call</info>
+ <return type='void'/>
+ </function>
+ <functype name='xmlInputCloseCallback' file='xmlIO' module='xmlIO'>
+ <info>Callback used in the I/O Input API to close the resource</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='context' type='void *' info='an Input context'/>
+ </functype>
+ <functype name='xmlInputMatchCallback' file='xmlIO' module='xmlIO'>
+ <info>Callback used in the I/O Input API to detect if the current handler can provide input fonctionnalities for this resource.</info>
+ <return type='int' info='1 if yes and 0 if another Input module should be used'/>
+ <arg name='filename' type='char const *' info='the filename or URI'/>
+ </functype>
+ <functype name='xmlInputOpenCallback' file='xmlIO' module='xmlIO'>
+ <info>Callback used in the I/O Input API to open the resource</info>
+ <return type='void *' info='an Input context or NULL in case or error'/>
+ <arg name='filename' type='char const *' info='the filename or URI'/>
+ </functype>
+ <functype name='xmlInputReadCallback' file='xmlIO' module='xmlIO'>
+ <info>Callback used in the I/O Input API to read the resource</info>
+ <return type='int' info='the number of bytes read or -1 in case of error'/>
+ <arg name='context' type='void *' info='an Input context'/>
+ <arg name='buffer' type='char *' info='the buffer to store data read'/>
+ <arg name='len' type='int' info='the length of the buffer in bytes'/>
+ </functype>
+ <function name='xmlIsBaseChar' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsBlank' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsBlank_ch or xmlIsBlankQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsBlankNode' file='tree' module='tree'>
+ <info>Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.</info>
+ <return type='int' info='1 yes, 0 no'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ </function>
+ <function name='xmlIsChar' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsCombining' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsCombiningQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsDigit' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsDigit_ch or xmlIsDigitQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsExtender' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsExtender_ch or xmlIsExtenderQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsID' file='valid' module='valid'>
+ <info>Determine whether an attribute is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically.</info>
+ <return type='int' info='0 or 1 depending on the lookup result'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='elem' type='xmlNodePtr' info='the element carrying the attribute'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
+ </function>
+ <function name='xmlIsIdeographic' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsIdeographicQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsLetter' file='parserInternals' module='parserInternals'>
+ <info>Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic</info>
+ <return type='int' info='0 if not, non-zero otherwise'/>
+ <arg name='c' type='int' info='an unicode character (int)'/>
+ </function>
+ <function name='xmlIsMainThread' file='threads' module='threads'>
+ <info>xmlIsMainThread() check whether the current thread is the main thread.</info>
+ <return type='int' info='1 if the current thread is the main thread, 0 otherwise'/>
+ </function>
+ <function name='xmlIsMixedElement' file='valid' module='valid'>
+ <info>Search in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs</info>
+ <return type='int' info='0 if no, 1 if yes, and -1 if no element description is available'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ </function>
+ <function name='xmlIsPubidChar' file='chvalid' module='chvalid'>
+ <info>This function is DEPRECATED. Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead</info>
+ <return type='int' info='true if argument valid, false otherwise'/>
+ <arg name='ch' type='unsigned int' info='character to validate'/>
+ </function>
+ <function name='xmlIsRef' file='valid' module='valid'>
+ <info>Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).</info>
+ <return type='int' info='0 or 1 depending on the lookup result'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='elem' type='xmlNodePtr' info='the element carrying the attribute'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
+ </function>
+ <function name='xmlIsXHTML' file='tree' module='xmlsave'>
+ <info>Try to find if the document correspond to an XHTML DTD</info>
+ <return type='int' info='1 if true, 0 if not and -1 in case of error'/>
+ <arg name='systemID' type='const xmlChar *' info='the system identifier'/>
+ <arg name='publicID' type='const xmlChar *' info='the public identifier'/>
+ </function>
+ <function name='xmlKeepBlanksDefault' file='parser' module='parserInternals'>
+ <info>Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn&apos;t allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the &quot;empty&quot; nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.</info>
+ <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
+ <arg name='val' type='int' info='int 0 or 1'/>
+ </function>
+ <function name='xmlLastElementChild' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don&apos;t have back reference from entities content to entities references.</info>
+ <return type='xmlNodePtr' info='the last element child or NULL if not available'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ </function>
+ <function name='xmlLineNumbersDefault' file='parser' module='parserInternals'>
+ <info>Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.</info>
+ <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
+ <arg name='val' type='int' info='int 0 or 1'/>
+ </function>
+ <function name='xmlLinkGetData' file='list' module='list'>
+ <info>See Returns.</info>
+ <return type='void *' info='a pointer to the data referenced from this link'/>
+ <arg name='lk' type='xmlLinkPtr' info='a link'/>
+ </function>
+ <function name='xmlListAppend' file='list' module='list'>
+ <info>Insert data in the ordered list at the end for this value</info>
+ <return type='int' info='0 in case of success, 1 in case of failure'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='the data'/>
+ </function>
+ <function name='xmlListClear' file='list' module='list'>
+ <info>Remove the all data in the list</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListCopy' file='list' module='list'>
+ <info>Move all the element from the old list in the new list</info>
+ <return type='int' info='0 in case of success 1 in case of error'/>
+ <arg name='cur' type='xmlListPtr' info='the new list'/>
+ <arg name='old' type='const xmlListPtr' info='the old list'/>
+ </function>
+ <function name='xmlListCreate' file='list' module='list'>
+ <info>Create a new list</info>
+ <return type='xmlListPtr' info='the new list or NULL in case of error'/>
+ <arg name='deallocator' type='xmlListDeallocator' info='an optional deallocator function'/>
+ <arg name='compare' type='xmlListDataCompare' info='an optional comparison function'/>
+ </function>
+ <functype name='xmlListDataCompare' file='list' module='list'>
+ <info>Callback function used to compare 2 data.</info>
+ <return type='int' info='0 is equality, -1 or 1 otherwise depending on the ordering.'/>
+ <arg name='data0' type='const void *' info='the first data'/>
+ <arg name='data1' type='const void *' info='the second data'/>
+ </functype>
+ <functype name='xmlListDeallocator' file='list' module='list'>
+ <info>Callback function used to free data from a list.</info>
+ <return type='void'/>
+ <arg name='lk' type='xmlLinkPtr' info='the data to deallocate'/>
+ </functype>
+ <function name='xmlListDelete' file='list' module='list'>
+ <info>Deletes the list and its associated data</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListDup' file='list' module='list'>
+ <info>Duplicate the list</info>
+ <return type='xmlListPtr' info='a new copy of the list or NULL in case of error'/>
+ <arg name='old' type='const xmlListPtr' info='the list'/>
+ </function>
+ <function name='xmlListEmpty' file='list' module='list'>
+ <info>Is the list empty ?</info>
+ <return type='int' info='1 if the list is empty, 0 if not empty and -1 in case of error'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListEnd' file='list' module='list'>
+ <info>Get the last element in the list</info>
+ <return type='xmlLinkPtr' info='the last element in the list, or NULL'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListFront' file='list' module='list'>
+ <info>Get the first element in the list</info>
+ <return type='xmlLinkPtr' info='the first element in the list, or NULL'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListInsert' file='list' module='list'>
+ <info>Insert data in the ordered list at the beginning for this value</info>
+ <return type='int' info='0 in case of success, 1 in case of failure'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='the data'/>
+ </function>
+ <function name='xmlListMerge' file='list' module='list'>
+ <info>include all the elements of the second list in the first one and clear the second list</info>
+ <return type='void'/>
+ <arg name='l1' type='xmlListPtr' info='the original list'/>
+ <arg name='l2' type='xmlListPtr' info='the new list'/>
+ </function>
+ <function name='xmlListPopBack' file='list' module='list'>
+ <info>Removes the last element in the list</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListPopFront' file='list' module='list'>
+ <info>Removes the first element in the list</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListPushBack' file='list' module='list'>
+ <info>add the new data at the end of the list</info>
+ <return type='int' info='1 if successful, 0 otherwise'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='new data'/>
+ </function>
+ <function name='xmlListPushFront' file='list' module='list'>
+ <info>add the new data at the beginning of the list</info>
+ <return type='int' info='1 if successful, 0 otherwise'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='new data'/>
+ </function>
+ <function name='xmlListRemoveAll' file='list' module='list'>
+ <info>Remove the all instance associated to data in the list</info>
+ <return type='int' info='the number of deallocation, or 0 if not found'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='list data'/>
+ </function>
+ <function name='xmlListRemoveFirst' file='list' module='list'>
+ <info>Remove the first instance associated to data in the list</info>
+ <return type='int' info='1 if a deallocation occured, or 0 if not found'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='list data'/>
+ </function>
+ <function name='xmlListRemoveLast' file='list' module='list'>
+ <info>Remove the last instance associated to data in the list</info>
+ <return type='int' info='1 if a deallocation occured, or 0 if not found'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='list data'/>
+ </function>
+ <function name='xmlListReverse' file='list' module='list'>
+ <info>Reverse the order of the elements in the list</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListReverseSearch' file='list' module='list'>
+ <info>Search the list in reverse order for an existing value of @data</info>
+ <return type='void *' info='the value associated to @data or NULL in case of error'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='a search value'/>
+ </function>
+ <function name='xmlListReverseWalk' file='list' module='list'>
+ <info>Walk all the element of the list in reverse order and apply the walker function to it</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='walker' type='xmlListWalker' info='a processing function'/>
+ <arg name='user' type='const void *' info='a user parameter passed to the walker function'/>
+ </function>
+ <function name='xmlListSearch' file='list' module='list'>
+ <info>Search the list for an existing value of @data</info>
+ <return type='void *' info='the value associated to @data or NULL in case of error'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='data' type='void *' info='a search value'/>
+ </function>
+ <function name='xmlListSize' file='list' module='list'>
+ <info>Get the number of elements in the list</info>
+ <return type='int' info='the number of elements in the list or -1 in case of error'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListSort' file='list' module='list'>
+ <info>Sort all the elements in the list</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ </function>
+ <function name='xmlListWalk' file='list' module='list'>
+ <info>Walk all the element of the first from first to last and apply the walker function to it</info>
+ <return type='void'/>
+ <arg name='l' type='xmlListPtr' info='a list'/>
+ <arg name='walker' type='xmlListWalker' info='a processing function'/>
+ <arg name='user' type='const void *' info='a user parameter passed to the walker function'/>
+ </function>
+ <functype name='xmlListWalker' file='list' module='list'>
+ <info>Callback function used when walking a list with xmlListWalk().</info>
+ <return type='int' info='0 to stop walking the list, 1 otherwise.'/>
+ <arg name='data' type='const void *' info='the data found in the list'/>
+ <arg name='user' type='const void *' info='extra user provided data to the walker'/>
+ </functype>
+ <function name='xmlLoadACatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Load the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively.</info>
+ <return type='xmlCatalogPtr' info='the catalog parsed or NULL in case of error'/>
+ <arg name='filename' type='const char *' info='a file path'/>
+ </function>
+ <function name='xmlLoadCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Load the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup</info>
+ <return type='int' info='0 in case of success -1 in case of error'/>
+ <arg name='filename' type='const char *' info='a file path'/>
+ </function>
+ <function name='xmlLoadCatalogs' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</info>
+ <return type='void'/>
+ <arg name='pathss' type='const char *' info='a list of directories separated by a colon or a space.'/>
+ </function>
+ <function name='xmlLoadExternalEntity' file='parser' module='xmlIO'>
+ <info>Load an external entity, note that the use of this function for unparsed entities may generate problems</info>
+ <return type='xmlParserInputPtr' info='the xmlParserInputPtr or NULL'/>
+ <arg name='URL' type='const char *' info='the URL for the entity to load'/>
+ <arg name='ID' type='const char *' info='the Public ID for the entity to load'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the context in which the entity is called or NULL'/>
+ </function>
+ <function name='xmlLoadSGMLSuperCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>Load an SGML super catalog. It won&apos;t expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries.</info>
+ <return type='xmlCatalogPtr' info='the catalog parsed or NULL in case of error'/>
+ <arg name='filename' type='const char *' info='a file path'/>
+ </function>
+ <function name='xmlLockLibrary' file='threads' module='threads'>
+ <info>xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlLsCountNode' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Count the children of @node.</info>
+ <return type='int' info='the number of children of @node.'/>
+ <arg name='node' type='xmlNodePtr' info='the node to count'/>
+ </function>
+ <function name='xmlLsOneNode' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dump to @output the type and name of @node.</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='node' type='xmlNodePtr' info='the node to dump'/>
+ </function>
+ <function name='xmlMallocAtomicLoc' file='xmlmemory' module='xmlmemory'>
+ <info>a malloc() equivalent, with logging of the allocation info.</info>
+ <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
+ <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+ <arg name='file' type='const char *' info='the file name or NULL'/>
+ <arg name='line' type='int' info='the line number'/>
+ </function>
+ <functype name='xmlMallocFunc' file='xmlmemory' module='xmlmemory'>
+ <info>Signature for a malloc() implementation.</info>
+ <return type='void *' info='a pointer to the newly allocated block or NULL in case of error.'/>
+ <arg name='size' type='size_t' info='the size requested in bytes'/>
+ </functype>
+ <function name='xmlMallocLoc' file='xmlmemory' module='xmlmemory'>
+ <info>a malloc() equivalent, with logging of the allocation info.</info>
+ <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
+ <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+ <arg name='file' type='const char *' info='the file name or NULL'/>
+ <arg name='line' type='int' info='the line number'/>
+ </function>
+ <function name='xmlMemBlocks' file='xmlmemory' module='xmlmemory'>
+ <info>Provides the number of memory areas currently allocated</info>
+ <return type='int' info='an int representing the number of blocks'/>
+ </function>
+ <function name='xmlMemDisplay' file='xmlmemory' module='xmlmemory'>
+ <info>show in-extenso the memory blocks allocated</info>
+ <return type='void'/>
+ <arg name='fp' type='FILE *' info='a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist'/>
+ </function>
+ <function name='xmlMemDisplayLast' file='xmlmemory' module='xmlmemory'>
+ <info>the last nbBytes of memory allocated and not freed, useful for dumping the memory left allocated between two places at runtime.</info>
+ <return type='void'/>
+ <arg name='fp' type='FILE *' info='a FILE descriptor used as the output file, if NULL, the result is written to the file .memorylist'/>
+ <arg name='nbBytes' type='long' info='the amount of memory to dump'/>
+ </function>
+ <function name='xmlMemFree' file='xmlmemory' module='xmlmemory'>
+ <info>a free() equivalent, with error checking.</info>
+ <return type='void'/>
+ <arg name='ptr' type='void *' info='the memory block pointer'/>
+ </function>
+ <function name='xmlMemGet' file='xmlmemory' module='xmlmemory'>
+ <info>Provides the memory access functions set currently in use</info>
+ <return type='int' info='0 on success'/>
+ <arg name='freeFunc' type='xmlFreeFunc *' info='place to save the free() function in use'/>
+ <arg name='mallocFunc' type='xmlMallocFunc *' info='place to save the malloc() function in use'/>
+ <arg name='reallocFunc' type='xmlReallocFunc *' info='place to save the realloc() function in use'/>
+ <arg name='strdupFunc' type='xmlStrdupFunc *' info='place to save the strdup() function in use'/>
+ </function>
+ <function name='xmlMemMalloc' file='xmlmemory' module='xmlmemory'>
+ <info>a malloc() equivalent, with logging of the allocation info.</info>
+ <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
+ <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+ </function>
+ <function name='xmlMemRealloc' file='xmlmemory' module='xmlmemory'>
+ <info>a realloc() equivalent, with logging of the allocation info.</info>
+ <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
+ <arg name='ptr' type='void *' info='the initial memory block pointer'/>
+ <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+ </function>
+ <function name='xmlMemSetup' file='xmlmemory' module='xmlmemory'>
+ <info>Override the default memory access functions with a new set This has to be called before any other libxml routines ! Should this be blocked if there was already some allocations done ?</info>
+ <return type='int' info='0 on success'/>
+ <arg name='freeFunc' type='xmlFreeFunc' info='the free() function to use'/>
+ <arg name='mallocFunc' type='xmlMallocFunc' info='the malloc() function to use'/>
+ <arg name='reallocFunc' type='xmlReallocFunc' info='the realloc() function to use'/>
+ <arg name='strdupFunc' type='xmlStrdupFunc' info='the strdup() function to use'/>
+ </function>
+ <function name='xmlMemShow' file='xmlmemory' module='xmlmemory'>
+ <info>show a show display of the memory allocated, and dump the @nr last allocated areas which were not freed</info>
+ <return type='void'/>
+ <arg name='fp' type='FILE *' info='a FILE descriptor used as the output file'/>
+ <arg name='nr' type='int' info='number of entries to dump'/>
+ </function>
+ <function name='xmlMemStrdupLoc' file='xmlmemory' module='xmlmemory'>
+ <info>a strdup() equivalent, with logging of the allocation info.</info>
+ <return type='char *' info='a pointer to the new string or NULL if allocation error occurred.'/>
+ <arg name='str' type='const char *' info='the initial string pointer'/>
+ <arg name='file' type='const char *' info='the file name or NULL'/>
+ <arg name='line' type='int' info='the line number'/>
+ </function>
+ <function name='xmlMemUsed' file='xmlmemory' module='xmlmemory'>
+ <info>Provides the amount of memory currently allocated</info>
+ <return type='int' info='an int representing the amount of memory allocated.'/>
+ </function>
+ <function name='xmlMemoryDump' file='xmlmemory' module='xmlmemory'>
+ <info>Dump in-extenso the memory blocks allocated to the file .memorylist</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlMemoryStrdup' file='xmlmemory' module='xmlmemory'>
+ <info>a strdup() equivalent, with logging of the allocation info.</info>
+ <return type='char *' info='a pointer to the new string or NULL if allocation error occurred.'/>
+ <arg name='str' type='const char *' info='the initial string pointer'/>
+ </function>
+ <function name='xmlModuleClose' file='xmlmodule' module='xmlmodule'>
+ <cond>defined(LIBXML_MODULES_ENABLED)</cond>
+ <info>The close operations unload the associated module and free the data associated to the module.</info>
+ <return type='int' info='0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.'/>
+ <arg name='module' type='xmlModulePtr' info='the module handle'/>
+ </function>
+ <function name='xmlModuleFree' file='xmlmodule' module='xmlmodule'>
+ <cond>defined(LIBXML_MODULES_ENABLED)</cond>
+ <info>The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.</info>
+ <return type='int' info='0 in case of success, -1 in case of argument error'/>
+ <arg name='module' type='xmlModulePtr' info='the module handle'/>
+ </function>
+ <function name='xmlModuleOpen' file='xmlmodule' module='xmlmodule'>
+ <cond>defined(LIBXML_MODULES_ENABLED)</cond>
+ <info>Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * . TODO: options are not yet implemented.</info>
+ <return type='xmlModulePtr' info='a handle for the module or NULL in case of error'/>
+ <arg name='name' type='const char *' info='the module name'/>
+ <arg name='options' type='int' info='a set of xmlModuleOption'/>
+ </function>
+ <function name='xmlModuleSymbol' file='xmlmodule' module='xmlmodule'>
+ <cond>defined(LIBXML_MODULES_ENABLED)</cond>
+ <info>Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const xmlChar * .</info>
+ <return type='int' info='0 if the symbol was found, or -1 in case of error'/>
+ <arg name='module' type='xmlModulePtr' info='the module'/>
+ <arg name='name' type='const char *' info='the name of the symbol'/>
+ <arg name='symbol' type='void **' info='the resulting symbol address'/>
+ </function>
+ <function name='xmlMutexLock' file='threads' module='threads'>
+ <info>xmlMutexLock() is used to lock a libxml2 token.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlMutexPtr' info='the simple mutex'/>
+ </function>
+ <function name='xmlMutexUnlock' file='threads' module='threads'>
+ <info>xmlMutexUnlock() is used to unlock a libxml2 token.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlMutexPtr' info='the simple mutex'/>
+ </function>
+ <function name='xmlNamespaceParseNCName' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>parse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | &apos;_&apos;) (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | &apos;.&apos; | &apos;-&apos; | &apos;_&apos; | CombiningChar | Extender</info>
+ <return type='xmlChar *' info='the namespace name or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlNamespaceParseNSDef' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= &apos;xmlns&apos; (&apos;:&apos; NCName)?</info>
+ <return type='xmlChar *' info='the namespace name'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlNamespaceParseQName' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. parse an XML qualified name [NS 5] QName ::= (Prefix &apos;:&apos;)? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</info>
+ <return type='xmlChar *' info='the local part, and prefix is updated to get the Prefix if any.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='prefix' type='xmlChar **' info='a xmlChar **'/>
+ </function>
+ <function name='xmlNanoFTPCheckResponse' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Check if there is a response from the FTP server after a command.</info>
+ <return type='int' info='the code number, or 0'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPCleanup' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Cleanup the FTP protocol layer. This cleanup proxy informations.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlNanoFTPClose' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Close the connection and both control and transport</info>
+ <return type='int' info='-1 incase of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPCloseConnection' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Close the data connection from the server</info>
+ <return type='int' info='-1 incase of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPConnect' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Tries to open a control connection</info>
+ <return type='int' info='-1 in case of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPConnectTo' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Tries to open a control connection to the given server/port</info>
+ <return type='void *' info='an fTP context or NULL if it failed'/>
+ <arg name='server' type='const char *' info='an FTP server name'/>
+ <arg name='port' type='int' info='the port (use 21 if 0)'/>
+ </function>
+ <function name='xmlNanoFTPCwd' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Tries to change the remote directory</info>
+ <return type='int' info='-1 incase of error, 1 if CWD worked, 0 if it failed'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='directory' type='const char *' info='a directory on the server'/>
+ </function>
+ <function name='xmlNanoFTPDele' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Tries to delete an item (file or directory) from server</info>
+ <return type='int' info='-1 incase of error, 1 if DELE worked, 0 if it failed'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='file' type='const char *' info='a file or directory on the server'/>
+ </function>
+ <function name='xmlNanoFTPFreeCtxt' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Frees the context after closing the connection.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPGet' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Fetch the given file from the server. All data are passed back in the callbacks. The last callback has a size of 0 block.</info>
+ <return type='int' info='-1 incase of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='callback' type='ftpDataCallback' info='the user callback'/>
+ <arg name='userData' type='void *' info='the user callback data'/>
+ <arg name='filename' type='const char *' info='the file to retrieve'/>
+ </function>
+ <function name='xmlNanoFTPGetConnection' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Try to open a data connection to the server. Currently only passive mode is supported.</info>
+ <return type='SOCKET' info='-1 incase of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPGetResponse' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Get the response from the FTP server after a command.</info>
+ <return type='int' info='the code number'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPGetSocket' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Initiate fetch of the given file from the server.</info>
+ <return type='SOCKET' info='the socket for the data connection, or &lt;0 in case of error'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='filename' type='const char *' info='the file to retrieve (or NULL if path is in context).'/>
+ </function>
+ <function name='xmlNanoFTPInit' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Initialize the FTP protocol layer. Currently it just checks for proxy informations, and get the hostname</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlNanoFTPList' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Do a listing on the server. All files info are passed back in the callbacks.</info>
+ <return type='int' info='-1 incase of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='callback' type='ftpListCallback' info='the user callback'/>
+ <arg name='userData' type='void *' info='the user callback data'/>
+ <arg name='filename' type='const char *' info='optional files to list'/>
+ </function>
+ <function name='xmlNanoFTPNewCtxt' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Allocate and initialize a new FTP context.</info>
+ <return type='void *' info='an FTP context or NULL in case of error.'/>
+ <arg name='URL' type='const char *' info='The URL used to initialize the context'/>
+ </function>
+ <function name='xmlNanoFTPOpen' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Start to fetch the given ftp:// resource</info>
+ <return type='void *' info='an FTP context, or NULL'/>
+ <arg name='URL' type='const char *' info='the URL to the resource'/>
+ </function>
+ <function name='xmlNanoFTPProxy' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Setup the FTP proxy informations. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.</info>
+ <return type='void'/>
+ <arg name='host' type='const char *' info='the proxy host name'/>
+ <arg name='port' type='int' info='the proxy port'/>
+ <arg name='user' type='const char *' info='the proxy user name'/>
+ <arg name='passwd' type='const char *' info='the proxy password'/>
+ <arg name='type' type='int' info='the type of proxy 1 for using SITE, 2 for USER a@b'/>
+ </function>
+ <function name='xmlNanoFTPQuit' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Send a QUIT command to the server</info>
+ <return type='int' info='-1 in case of error, 0 otherwise'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ </function>
+ <function name='xmlNanoFTPRead' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>This function tries to read @len bytes from the existing FTP connection and saves them in @dest. This is a blocking call.</info>
+ <return type='int' info='the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.'/>
+ <arg name='ctx' type='void *' info='the FTP context'/>
+ <arg name='dest' type='void *' info='a buffer'/>
+ <arg name='len' type='int' info='the buffer length'/>
+ </function>
+ <function name='xmlNanoFTPScanProxy' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>(Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A NULL URL cleans up proxy informations.</info>
+ <return type='void'/>
+ <arg name='URL' type='const char *' info='The proxy URL used to initialize the proxy context'/>
+ </function>
+ <function name='xmlNanoFTPUpdateURL' file='nanoftp' module='nanoftp'>
+ <cond>defined(LIBXML_FTP_ENABLED)</cond>
+ <info>Update an FTP context by parsing the URL and finding new path it indicates. If there is an error in the protocol, hostname, port or other information, the error is raised. It indicates a new connection has to be established.</info>
+ <return type='int' info='0 if Ok, -1 in case of error (other host).'/>
+ <arg name='ctx' type='void *' info='an FTP context'/>
+ <arg name='URL' type='const char *' info='The URL used to update the context'/>
+ </function>
+ <function name='xmlNanoHTTPAuthHeader' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Get the authentication header of an HTTP context</info>
+ <return type='const char *' info='the stashed value of the WWW-Authenticate or Proxy-Authenticate header.'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPCleanup' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Cleanup the HTTP protocol layer.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlNanoHTTPClose' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function closes an HTTP context, it ends up the connection and free all data related to it.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPContentLength' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Provides the specified content length from the HTTP header.</info>
+ <return type='int' info='the specified content length from the HTTP header. Note that a value of -1 indicates that the content length element was not included in the response header.'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPEncoding' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Provides the specified encoding if specified in the HTTP headers.</info>
+ <return type='const char *' info='the specified encoding or NULL if not available'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPFetch' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function try to fetch the indicated resource via HTTP GET and save it&apos;s content in the file.</info>
+ <return type='int' info='-1 in case of failure, 0 incase of success. The contentType, if provided must be freed by the caller'/>
+ <arg name='URL' type='const char *' info='The URL to load'/>
+ <arg name='filename' type='const char *' info='the filename where the content should be saved'/>
+ <arg name='contentType' type='char **' info='if available the Content-Type information will be returned at that location'/>
+ </function>
+ <function name='xmlNanoHTTPInit' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Initialize the HTTP protocol layer. Currently it just checks for proxy informations</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlNanoHTTPMethod' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</info>
+ <return type='void *' info='NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller'/>
+ <arg name='URL' type='const char *' info='The URL to load'/>
+ <arg name='method' type='const char *' info='the HTTP method to use'/>
+ <arg name='input' type='const char *' info='the input string if any'/>
+ <arg name='contentType' type='char **' info='the Content-Type information IN and OUT'/>
+ <arg name='headers' type='const char *' info='the extra headers'/>
+ <arg name='ilen' type='int' info='input length'/>
+ </function>
+ <function name='xmlNanoHTTPMethodRedir' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function try to open a connection to the indicated resource via HTTP using the given @method, adding the given extra headers and the input buffer for the request content.</info>
+ <return type='void *' info='NULL in case of failure, otherwise a request handler. The contentType, or redir, if provided must be freed by the caller'/>
+ <arg name='URL' type='const char *' info='The URL to load'/>
+ <arg name='method' type='const char *' info='the HTTP method to use'/>
+ <arg name='input' type='const char *' info='the input string if any'/>
+ <arg name='contentType' type='char **' info='the Content-Type information IN and OUT'/>
+ <arg name='redir' type='char **' info='the redirected URL OUT'/>
+ <arg name='headers' type='const char *' info='the extra headers'/>
+ <arg name='ilen' type='int' info='input length'/>
+ </function>
+ <function name='xmlNanoHTTPMimeType' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Provides the specified Mime-Type if specified in the HTTP headers.</info>
+ <return type='const char *' info='the specified Mime-Type or NULL if not available'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPOpen' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function try to open a connection to the indicated resource via HTTP GET.</info>
+ <return type='void *' info='NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller'/>
+ <arg name='URL' type='const char *' info='The URL to load'/>
+ <arg name='contentType' type='char **' info='if available the Content-Type information will be returned at that location'/>
+ </function>
+ <function name='xmlNanoHTTPOpenRedir' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function try to open a connection to the indicated resource via HTTP GET.</info>
+ <return type='void *' info='NULL in case of failure, otherwise a request handler. The contentType, if provided must be freed by the caller'/>
+ <arg name='URL' type='const char *' info='The URL to load'/>
+ <arg name='contentType' type='char **' info='if available the Content-Type information will be returned at that location'/>
+ <arg name='redir' type='char **' info='if available the redirected URL will be returned'/>
+ </function>
+ <function name='xmlNanoHTTPRead' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>This function tries to read @len bytes from the existing HTTP connection and saves them in @dest. This is a blocking call.</info>
+ <return type='int' info='the number of byte read. 0 is an indication of an end of connection. -1 indicates a parameter error.'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ <arg name='dest' type='void *' info='a buffer'/>
+ <arg name='len' type='int' info='the buffer length'/>
+ </function>
+ <function name='xmlNanoHTTPRedir' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Provides the specified redirection URL if available from the HTTP header.</info>
+ <return type='const char *' info='the specified redirection URL or NULL if not redirected.'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPReturnCode' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>Get the latest HTTP return code received</info>
+ <return type='int' info='the HTTP return code for the request.'/>
+ <arg name='ctx' type='void *' info='the HTTP context'/>
+ </function>
+ <function name='xmlNanoHTTPSave' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>This function saves the output of the HTTP transaction to a file It closes and free the context at the end</info>
+ <return type='int' info='-1 in case of failure, 0 incase of success.'/>
+ <arg name='ctxt' type='void *' info='the HTTP context'/>
+ <arg name='filename' type='const char *' info='the filename where the content should be saved'/>
+ </function>
+ <function name='xmlNanoHTTPScanProxy' file='nanohttp' module='nanohttp'>
+ <cond>defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A NULL URL cleans up proxy informations.</info>
+ <return type='void'/>
+ <arg name='URL' type='const char *' info='The proxy URL used to initialize the proxy context'/>
+ </function>
+ <function name='xmlNewAutomata' file='xmlautomata' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED) &amp;&amp; defined(LIBXML_AUTOMATA_ENABLED)</cond>
+ <info>Create a new automata</info>
+ <return type='xmlAutomataPtr' info='the new object or NULL in case of failure'/>
+ </function>
+ <function name='xmlNewCDataBlock' file='tree' module='tree'>
+ <info>Creation of a new node containing a CDATA block.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='content' type='const xmlChar *' info='the CDATA block content content'/>
+ <arg name='len' type='int' info='the length of the block'/>
+ </function>
+ <function name='xmlNewCatalog' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>create a new Catalog.</info>
+ <return type='xmlCatalogPtr' info='the xmlCatalogPtr or NULL in case of error'/>
+ <arg name='sgml' type='int' info='should this create an SGML catalog'/>
+ </function>
+ <function name='xmlNewCharEncodingHandler' file='encoding' module='encoding'>
+ <info>Create and registers an xmlCharEncodingHandler.</info>
+ <return type='xmlCharEncodingHandlerPtr' info='the xmlCharEncodingHandlerPtr created (or NULL in case of error).'/>
+ <arg name='name' type='const char *' info='the encoding name, in UTF-8 format (ASCII actually)'/>
+ <arg name='input' type='xmlCharEncodingInputFunc' info='the xmlCharEncodingInputFunc to read that encoding'/>
+ <arg name='output' type='xmlCharEncodingOutputFunc' info='the xmlCharEncodingOutputFunc to write that encoding'/>
+ </function>
+ <function name='xmlNewCharRef' file='tree' module='tree'>
+ <info>Creation of a new character reference node.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the char ref string, starting with # or &quot;&amp;# ... ;&quot;'/>
+ </function>
+ <function name='xmlNewChild' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ <arg name='ns' type='xmlNsPtr' info='a namespace if any'/>
+ <arg name='name' type='const xmlChar *' info='the name of the child'/>
+ <arg name='content' type='const xmlChar *' info='the XML content of the child if any.'/>
+ </function>
+ <function name='xmlNewComment' file='tree' module='tree'>
+ <info>Creation of a new node containing a comment.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='content' type='const xmlChar *' info='the comment content'/>
+ </function>
+ <function name='xmlNewDoc' file='tree' module='tree'>
+ <info>Creates a new XML document</info>
+ <return type='xmlDocPtr' info='a new document'/>
+ <arg name='version' type='const xmlChar *' info='xmlChar string giving the version of XML &quot;1.0&quot;'/>
+ </function>
+ <function name='xmlNewDocComment' file='tree' module='tree'>
+ <info>Creation of a new node containing a comment within a document.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='content' type='const xmlChar *' info='the comment content'/>
+ </function>
+ <function name='xmlNewDocElementContent' file='valid' module='valid'>
+ <info>Allocate an element content structure for the document.</info>
+ <return type='xmlElementContentPtr' info='NULL if not, otherwise the new element content structure'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the subelement name or NULL'/>
+ <arg name='type' type='xmlElementContentType' info='the type of element content decl'/>
+ </function>
+ <function name='xmlNewDocFragment' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Creation of a new Fragment node.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document owning the fragment'/>
+ </function>
+ <function name='xmlNewDocNode' file='tree' module='tree'>
+ <info>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don&apos;t need entities support.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='ns' type='xmlNsPtr' info='namespace if any'/>
+ <arg name='name' type='const xmlChar *' info='the node name'/>
+ <arg name='content' type='const xmlChar *' info='the XML text content if any'/>
+ </function>
+ <function name='xmlNewDocNodeEatName' file='tree' module='tree'>
+ <info>Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don&apos;t need entities support.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='ns' type='xmlNsPtr' info='namespace if any'/>
+ <arg name='name' type='xmlChar *' info='the node name'/>
+ <arg name='content' type='const xmlChar *' info='the XML text content if any'/>
+ </function>
+ <function name='xmlNewDocPI' file='tree' module='tree'>
+ <info>Creation of a processing instruction element.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the target document'/>
+ <arg name='name' type='const xmlChar *' info='the processing instruction name'/>
+ <arg name='content' type='const xmlChar *' info='the PI content'/>
+ </function>
+ <function name='xmlNewDocProp' file='tree' module='tree'>
+ <info>Create a new property carried by a document.</info>
+ <return type='xmlAttrPtr' info='a pointer to the attribute'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the name of the attribute'/>
+ <arg name='value' type='const xmlChar *' info='the value of the attribute'/>
+ </function>
+ <function name='xmlNewDocRawNode' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Creation of a new node element within a document. @ns and @content are optional (NULL).</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='ns' type='xmlNsPtr' info='namespace if any'/>
+ <arg name='name' type='const xmlChar *' info='the node name'/>
+ <arg name='content' type='const xmlChar *' info='the text content if any'/>
+ </function>
+ <function name='xmlNewDocText' file='tree' module='tree'>
+ <info>Creation of a new text node within a document.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='content' type='const xmlChar *' info='the text content'/>
+ </function>
+ <function name='xmlNewDocTextLen' file='tree' module='tree'>
+ <info>Creation of a new text node with an extra content length parameter. The text node pertain to a given document.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='content' type='const xmlChar *' info='the text content'/>
+ <arg name='len' type='int' info='the text len.'/>
+ </function>
+ <function name='xmlNewDtd' file='tree' module='tree'>
+ <info>Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().</info>
+ <return type='xmlDtdPtr' info='a pointer to the new DTD structure'/>
+ <arg name='doc' type='xmlDocPtr' info='the document pointer'/>
+ <arg name='name' type='const xmlChar *' info='the DTD name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the system ID'/>
+ </function>
+ <function name='xmlNewElementContent' file='valid' module='valid'>
+ <info>Allocate an element content structure. Deprecated in favor of xmlNewDocElementContent</info>
+ <return type='xmlElementContentPtr' info='NULL if not, otherwise the new element content structure'/>
+ <arg name='name' type='const xmlChar *' info='the subelement name or NULL'/>
+ <arg name='type' type='xmlElementContentType' info='the type of element content decl'/>
+ </function>
+ <function name='xmlNewEntity' file='entities' module='entities'>
+ <info>Create a new entity, this differs from xmlAddDocEntity() that if the document is NULL or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsability of the caller to link it to the document later or free it when not needed anymore.</info>
+ <return type='xmlEntityPtr' info='a pointer to the entity or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type XML_xxx_yyy_ENTITY'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the entity external ID if available'/>
+ <arg name='SystemID' type='const xmlChar *' info='the entity system ID if available'/>
+ <arg name='content' type='const xmlChar *' info='the entity content'/>
+ </function>
+ <function name='xmlNewEntityInputStream' file='parserInternals' module='parserInternals'>
+ <info>Create a new input stream based on an xmlEntityPtr</info>
+ <return type='xmlParserInputPtr' info='the new input stream or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='entity' type='xmlEntityPtr' info='an Entity pointer'/>
+ </function>
+ <function name='xmlNewGlobalNs' file='tree' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</info>
+ <return type='xmlNsPtr' info='NULL this functionality had been removed'/>
+ <arg name='doc' type='xmlDocPtr' info='the document carrying the namespace'/>
+ <arg name='href' type='const xmlChar *' info='the URI associated'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix for the namespace'/>
+ </function>
+ <function name='xmlNewIOInputStream' file='parser' module='parserInternals'>
+ <info>Create a new input stream structure encapsulating the @input into a stream suitable for the parser.</info>
+ <return type='xmlParserInputPtr' info='the new input stream or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='input' type='xmlParserInputBufferPtr' info='an I/O Input'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlNewInputFromFile' file='parserInternals' module='parserInternals'>
+ <info>Create a new input stream based on a file or an URL.</info>
+ <return type='xmlParserInputPtr' info='the new input stream or NULL in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='filename' type='const char *' info='the filename to use as entity'/>
+ </function>
+ <function name='xmlNewInputStream' file='parserInternals' module='parserInternals'>
+ <info>Create a new input stream structure.</info>
+ <return type='xmlParserInputPtr' info='the new input stream or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlNewMutex' file='threads' module='threads'>
+ <info>xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.</info>
+ <return type='xmlMutexPtr' info='a new simple mutex pointer or NULL in case of error'/>
+ </function>
+ <function name='xmlNewNode' file='tree' module='tree'>
+ <info>Creation of a new node element. @ns is optional (NULL).</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object. Uses xmlStrdup() to make copy of @name.'/>
+ <arg name='ns' type='xmlNsPtr' info='namespace if any'/>
+ <arg name='name' type='const xmlChar *' info='the node name'/>
+ </function>
+ <function name='xmlNewNodeEatName' file='tree' module='tree'>
+ <info>Creation of a new node element. @ns is optional (NULL).</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object, with pointer @name as new node&apos;s name. Use xmlNewNode() if a copy of @name string is is needed as new node&apos;s name.'/>
+ <arg name='ns' type='xmlNsPtr' info='namespace if any'/>
+ <arg name='name' type='xmlChar *' info='the node name'/>
+ </function>
+ <function name='xmlNewNs' file='tree' module='tree'>
+ <info>Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, @prefix should be NULL. We use href==NULL in the case of an element creation where the namespace was not defined.</info>
+ <return type='xmlNsPtr' info='a new namespace pointer or NULL'/>
+ <arg name='node' type='xmlNodePtr' info='the element carrying the namespace'/>
+ <arg name='href' type='const xmlChar *' info='the URI associated'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix for the namespace'/>
+ </function>
+ <function name='xmlNewNsProp' file='tree' module='tree'>
+ <info>Create a new property tagged with a namespace and carried by a node.</info>
+ <return type='xmlAttrPtr' info='a pointer to the attribute'/>
+ <arg name='node' type='xmlNodePtr' info='the holding node'/>
+ <arg name='ns' type='xmlNsPtr' info='the namespace'/>
+ <arg name='name' type='const xmlChar *' info='the name of the attribute'/>
+ <arg name='value' type='const xmlChar *' info='the value of the attribute'/>
+ </function>
+ <function name='xmlNewNsPropEatName' file='tree' module='tree'>
+ <info>Create a new property tagged with a namespace and carried by a node.</info>
+ <return type='xmlAttrPtr' info='a pointer to the attribute'/>
+ <arg name='node' type='xmlNodePtr' info='the holding node'/>
+ <arg name='ns' type='xmlNsPtr' info='the namespace'/>
+ <arg name='name' type='xmlChar *' info='the name of the attribute'/>
+ <arg name='value' type='const xmlChar *' info='the value of the attribute'/>
+ </function>
+ <function name='xmlNewPI' file='tree' module='tree'>
+ <info>Creation of a processing instruction element. Use xmlDocNewPI preferably to get string interning</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='name' type='const xmlChar *' info='the processing instruction name'/>
+ <arg name='content' type='const xmlChar *' info='the PI content'/>
+ </function>
+ <function name='xmlNewParserCtxt' file='parser' module='parserInternals'>
+ <info>Allocate and initialize a new parser context.</info>
+ <return type='xmlParserCtxtPtr' info='the xmlParserCtxtPtr or NULL'/>
+ </function>
+ <function name='xmlNewProp' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create a new property carried by a node.</info>
+ <return type='xmlAttrPtr' info='a pointer to the attribute'/>
+ <arg name='node' type='xmlNodePtr' info='the holding node'/>
+ <arg name='name' type='const xmlChar *' info='the name of the attribute'/>
+ <arg name='value' type='const xmlChar *' info='the value of the attribute'/>
+ </function>
+ <function name='xmlNewRMutex' file='threads' module='threads'>
+ <info>xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.</info>
+ <return type='xmlRMutexPtr' info='the new reentrant mutex pointer or NULL in case of error'/>
+ </function>
+ <function name='xmlNewReference' file='tree' module='tree'>
+ <info>Creation of a new reference node.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='name' type='const xmlChar *' info='the reference name, or the reference string with &amp; and ;'/>
+ </function>
+ <function name='xmlNewStringInputStream' file='parserInternals' module='parserInternals'>
+ <info>Create a new input stream based on a memory buffer.</info>
+ <return type='xmlParserInputPtr' info='the new input stream'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='buffer' type='const xmlChar *' info='an memory buffer'/>
+ </function>
+ <function name='xmlNewText' file='tree' module='tree'>
+ <info>Creation of a new text node.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='content' type='const xmlChar *' info='the text content'/>
+ </function>
+ <function name='xmlNewTextChild' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='parent' type='xmlNodePtr' info='the parent node'/>
+ <arg name='ns' type='xmlNsPtr' info='a namespace if any'/>
+ <arg name='name' type='const xmlChar *' info='the name of the child'/>
+ <arg name='content' type='const xmlChar *' info='the text content of the child if any.'/>
+ </function>
+ <function name='xmlNewTextLen' file='tree' module='tree'>
+ <info>Creation of a new text node with an extra parameter for the content&apos;s length</info>
+ <return type='xmlNodePtr' info='a pointer to the new node object.'/>
+ <arg name='content' type='const xmlChar *' info='the text content'/>
+ <arg name='len' type='int' info='the text len.'/>
+ </function>
+ <function name='xmlNewTextReader' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmlTextReader structure fed with @input</info>
+ <return type='xmlTextReaderPtr' info='the new xmlTextReaderPtr or NULL in case of error'/>
+ <arg name='input' type='xmlParserInputBufferPtr' info='the xmlParserInputBufferPtr used to read data'/>
+ <arg name='URI' type='const char *' info='the URI information for the source if available'/>
+ </function>
+ <function name='xmlNewTextReaderFilename' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmlTextReader structure fed with the resource at @URI</info>
+ <return type='xmlTextReaderPtr' info='the new xmlTextReaderPtr or NULL in case of error'/>
+ <arg name='URI' type='const char *' info='the URI of the resource to process'/>
+ </function>
+ <function name='xmlNewTextWriter' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure using an xmlOutputBufferPtr NOTE: the @out parameter will be deallocated when the writer is closed (if the call succeed.)</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='an xmlOutputBufferPtr'/>
+ </function>
+ <function name='xmlNewTextWriterDoc' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure with @*doc as output</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr *' info='address of a xmlDocPtr to hold the new XML document tree'/>
+ <arg name='compression' type='int' info='compress the output?'/>
+ </function>
+ <function name='xmlNewTextWriterFilename' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure with @uri as output</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='uri' type='const char *' info='the URI of the resource for the output'/>
+ <arg name='compression' type='int' info='compress the output?'/>
+ </function>
+ <function name='xmlNewTextWriterMemory' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure with @buf as output TODO: handle compression</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='buf' type='xmlBufferPtr' info='xmlBufferPtr'/>
+ <arg name='compression' type='int' info='compress the output?'/>
+ </function>
+ <function name='xmlNewTextWriterPushParser' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure with @ctxt as output NOTE: the @ctxt context will be freed with the resulting writer (if the call succeeds). TODO: handle compression</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='xmlParserCtxtPtr to hold the new XML document tree'/>
+ <arg name='compression' type='int' info='compress the output?'/>
+ </function>
+ <function name='xmlNewTextWriterTree' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Create a new xmlNewTextWriter structure with @doc as output starting at @node</info>
+ <return type='xmlTextWriterPtr' info='the new xmlTextWriterPtr or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='xmlDocPtr'/>
+ <arg name='node' type='xmlNodePtr' info='xmlNodePtr or NULL for doc-&gt;children'/>
+ <arg name='compression' type='int' info='compress the output?'/>
+ </function>
+ <function name='xmlNewValidCtxt' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Allocate a validation context structure.</info>
+ <return type='xmlValidCtxtPtr' info='NULL if not, otherwise the new validation context structure'/>
+ </function>
+ <function name='xmlNextChar' file='parserInternals' module='parserInternals'>
+ <info>Skip to the next char input char.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the XML parser context'/>
+ </function>
+ <function name='xmlNextElementSibling' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don&apos;t have back reference from entities content to entities references.</info>
+ <return type='xmlNodePtr' info='the next element sibling or NULL if not available'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ </function>
+ <function name='xmlNoNetExternalEntityLoader' file='xmlIO' module='xmlIO'>
+ <info>A specific entity loader disabling network accesses, though still allowing local catalog accesses for resolution.</info>
+ <return type='xmlParserInputPtr' info='a new allocated xmlParserInputPtr, or NULL.'/>
+ <arg name='URL' type='const char *' info='the URL for the entity to load'/>
+ <arg name='ID' type='const char *' info='the System ID for the entity to load'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the context in which the entity is called or NULL'/>
+ </function>
+ <function name='xmlNodeAddContent' file='tree' module='tree'>
+ <info>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being modified'/>
+ <arg name='content' type='const xmlChar *' info='extra content'/>
+ </function>
+ <function name='xmlNodeAddContentLen' file='tree' module='tree'>
+ <info>Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being modified'/>
+ <arg name='content' type='const xmlChar *' info='extra content'/>
+ <arg name='len' type='int' info='the size of @content'/>
+ </function>
+ <function name='xmlNodeBufGetContent' file='tree' module='tree'>
+ <info>Read the value of a node @cur, this can be either the text carried directly by this node if it&apos;s a TEXT node or the aggregate string of the values carried by this node child&apos;s (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='buffer' type='xmlBufferPtr' info='a buffer'/>
+ <arg name='cur' type='const xmlNode *' info='the node being read'/>
+ </function>
+ <function name='xmlNodeDump' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.</info>
+ <return type='int' info='the number of bytes written to the buffer or -1 in case of error'/>
+ <arg name='buf' type='xmlBufferPtr' info='the XML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='level' type='int' info='the imbrication level for indenting'/>
+ <arg name='format' type='int' info='is formatting allowed'/>
+ </function>
+ <function name='xmlNodeDumpOutput' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called</info>
+ <return type='void'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='the XML buffer output'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node'/>
+ <arg name='level' type='int' info='the imbrication level for indenting'/>
+ <arg name='format' type='int' info='is formatting allowed'/>
+ <arg name='encoding' type='const char *' info='an optional encoding string'/>
+ </function>
+ <function name='xmlNodeGetBase' file='tree' module='tree'>
+ <info>Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc-&gt;URL in this case</info>
+ <return type='xmlChar *' info='a pointer to the base URL, or NULL if not found It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='doc' type='const xmlDoc *' info='the document the node pertains to'/>
+ <arg name='cur' type='const xmlNode *' info='the node being checked'/>
+ </function>
+ <function name='xmlNodeGetContent' file='tree' module='tree'>
+ <info>Read the value of a node, this can be either the text carried directly by this node if it&apos;s a TEXT node or the aggregate string of the values carried by this node child&apos;s (TEXT and ENTITY_REF). Entity references are substituted.</info>
+ <return type='xmlChar *' info='a new #xmlChar * or NULL if no content is available. It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='cur' type='const xmlNode *' info='the node being read'/>
+ </function>
+ <function name='xmlNodeGetLang' file='tree' module='tree'>
+ <info>Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor.</info>
+ <return type='xmlChar *' info='a pointer to the lang value, or NULL if not found It&apos;s up to the caller to free the memory with xmlFree().'/>
+ <arg name='cur' type='const xmlNode *' info='the node being checked'/>
+ </function>
+ <function name='xmlNodeGetSpacePreserve' file='tree' module='tree'>
+ <info>Searches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor.</info>
+ <return type='int' info='-1 if xml:space is not inherited, 0 if &quot;default&quot;, 1 if &quot;preserve&quot;'/>
+ <arg name='cur' type='const xmlNode *' info='the node being checked'/>
+ </function>
+ <function name='xmlNodeIsText' file='tree' module='tree'>
+ <info>Is this node a Text node ?</info>
+ <return type='int' info='1 yes, 0 no'/>
+ <arg name='node' type='const xmlNode *' info='the node'/>
+ </function>
+ <function name='xmlNodeListGetRawString' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn&apos;t do any character encoding handling.</info>
+ <return type='xmlChar *' info='a pointer to the string copy, the caller must free it with xmlFree().'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='list' type='const xmlNode *' info='a Node list'/>
+ <arg name='inLine' type='int' info='should we replace entity contents or show their external form'/>
+ </function>
+ <function name='xmlNodeListGetString' file='tree' module='tree'>
+ <info>Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs</info>
+ <return type='xmlChar *' info='a pointer to the string copy, the caller must free it with xmlFree().'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='list' type='const xmlNode *' info='a Node list'/>
+ <arg name='inLine' type='int' info='should we replace entity contents or show their external form'/>
+ </function>
+ <function name='xmlNodeSetBase' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being changed'/>
+ <arg name='uri' type='const xmlChar *' info='the new base URI'/>
+ </function>
+ <function name='xmlNodeSetContent' file='tree' module='tree'>
+ <info>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being modified'/>
+ <arg name='content' type='const xmlChar *' info='the new value of the content'/>
+ </function>
+ <function name='xmlNodeSetContentLen' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being modified'/>
+ <arg name='content' type='const xmlChar *' info='the new value of the content'/>
+ <arg name='len' type='int' info='the size of @content'/>
+ </function>
+ <function name='xmlNodeSetLang' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Set the language of a node, i.e. the values of the xml:lang attribute.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being changed'/>
+ <arg name='lang' type='const xmlChar *' info='the language description'/>
+ </function>
+ <function name='xmlNodeSetName' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Set (or reset) the name of a node.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being changed'/>
+ <arg name='name' type='const xmlChar *' info='the new tag name'/>
+ </function>
+ <function name='xmlNodeSetSpacePreserve' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node being changed'/>
+ <arg name='val' type='int' info='the xml:space value (&quot;0&quot;: default, 1: &quot;preserve&quot;)'/>
+ </function>
+ <function name='xmlNormalizeURIPath' file='uri' module='uri'>
+ <info>Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done</info>
+ <return type='int' info='0 or an error code'/>
+ <arg name='path' type='char *' info='pointer to the path string'/>
+ </function>
+ <function name='xmlNormalizeWindowsPath' file='xmlIO' module='xmlIO'>
+ <info>This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution.</info>
+ <return type='xmlChar *' info='a canonicalized version of the path'/>
+ <arg name='path' type='const xmlChar *' info='the input file path'/>
+ </function>
+ <function name='xmlOutputBufferClose' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>flushes and close the output I/O channel and free up all the associated resources</info>
+ <return type='int' info='the number of byte written or -1 in case of error.'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='a buffered output'/>
+ </function>
+ <function name='xmlOutputBufferCreateBuffer' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered output for the progressive saving to a xmlBuffer</info>
+ <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+ <arg name='buffer' type='xmlBufferPtr' info='a xmlBufferPtr'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+ </function>
+ <function name='xmlOutputBufferCreateFd' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered output for the progressive saving to a file descriptor</info>
+ <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+ <arg name='fd' type='int' info='a file descriptor number'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+ </function>
+ <function name='xmlOutputBufferCreateFile' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered output for the progressive saving to a FILE * buffered C I/O</info>
+ <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+ <arg name='file' type='FILE *' info='a FILE*'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+ </function>
+ <function name='xmlOutputBufferCreateFilename' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered output for the progressive saving of a file If filename is &quot;-&apos; then we use stdout as the output. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. TODO: currently if compression is set, the library only support writing to a local file.</info>
+ <return type='xmlOutputBufferPtr' info='the new output or NULL'/>
+ <arg name='URI' type='const char *' info='a C string containing the URI or filename'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the encoding converter or NULL'/>
+ <arg name='compression' type='int' info='the compression ration (0 none, 9 max).'/>
+ </function>
+ <function name='xmlOutputBufferCreateFilenameDefault' file='globals' module='xmlIO'>
+ <info>Registers a callback for URI output file handling</info>
+ <return type='xmlOutputBufferCreateFilenameFunc' info='the old value of the registration function'/>
+ <arg name='func' type='xmlOutputBufferCreateFilenameFunc' info='function pointer to the new OutputBufferCreateFilenameFunc'/>
+ </function>
+ <functype name='xmlOutputBufferCreateFilenameFunc' file='globals' module='globals'>
+ <info>Signature for the function doing the lookup for a suitable output method corresponding to an URI.</info>
+ <return type='xmlOutputBufferPtr' info='the new xmlOutputBufferPtr in case of success or NULL if no method was found.'/>
+ <arg name='URI' type='const char *' info='the URI to write to'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info=''/>
+ <arg name='compression' type='int' info=''/>
+ </functype>
+ <function name='xmlOutputBufferCreateIO' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a buffered output for the progressive saving to an I/O handler</info>
+ <return type='xmlOutputBufferPtr' info='the new parser output or NULL'/>
+ <arg name='iowrite' type='xmlOutputWriteCallback' info='an I/O write function'/>
+ <arg name='ioclose' type='xmlOutputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='encoder' type='xmlCharEncodingHandlerPtr' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlOutputBufferFlush' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>flushes the output I/O channel</info>
+ <return type='int' info='the number of byte written or -1 in case of error.'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='a buffered output'/>
+ </function>
+ <function name='xmlOutputBufferGetContent' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Gives a pointer to the data currently held in the output buffer</info>
+ <return type='const xmlChar *' info='a pointer to the data or NULL in case of error'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='an xmlOutputBufferPtr'/>
+ </function>
+ <function name='xmlOutputBufferGetSize' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Gives the length of the data currently held in the output buffer</info>
+ <return type='size_t' info='0 in case or error or no data is held, the size otherwise'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='an xmlOutputBufferPtr'/>
+ </function>
+ <function name='xmlOutputBufferWrite' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Write the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</info>
+ <return type='int' info='the number of chars immediately written, or -1 in case of error.'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='a buffered parser output'/>
+ <arg name='len' type='int' info='the size in bytes of the array.'/>
+ <arg name='buf' type='const char *' info='an char array'/>
+ </function>
+ <function name='xmlOutputBufferWriteEscape' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Write the content of the string in the output I/O buffer This routine escapes the caracters and then handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</info>
+ <return type='int' info='the number of chars immediately written, or -1 in case of error.'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='a buffered parser output'/>
+ <arg name='str' type='const xmlChar *' info='a zero terminated UTF-8 string'/>
+ <arg name='escaping' type='xmlCharEncodingOutputFunc' info='an optional escaping function (or NULL)'/>
+ </function>
+ <function name='xmlOutputBufferWriteString' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Write the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes.</info>
+ <return type='int' info='the number of chars immediately written, or -1 in case of error.'/>
+ <arg name='out' type='xmlOutputBufferPtr' info='a buffered parser output'/>
+ <arg name='str' type='const char *' info='a zero terminated C string'/>
+ </function>
+ <functype name='xmlOutputCloseCallback' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Callback used in the I/O Output API to close the resource</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='context' type='void *' info='an Output context'/>
+ </functype>
+ <functype name='xmlOutputMatchCallback' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Callback used in the I/O Output API to detect if the current handler can provide output fonctionnalities for this resource.</info>
+ <return type='int' info='1 if yes and 0 if another Output module should be used'/>
+ <arg name='filename' type='char const *' info='the filename or URI'/>
+ </functype>
+ <functype name='xmlOutputOpenCallback' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Callback used in the I/O Output API to open the resource</info>
+ <return type='void *' info='an Output context or NULL in case or error'/>
+ <arg name='filename' type='char const *' info='the filename or URI'/>
+ </functype>
+ <functype name='xmlOutputWriteCallback' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Callback used in the I/O Output API to write to the resource</info>
+ <return type='int' info='the number of bytes written or -1 in case of error'/>
+ <arg name='context' type='void *' info='an Output context'/>
+ <arg name='buffer' type='const char *' info='the buffer of data to write'/>
+ <arg name='len' type='int' info='the length of the buffer in bytes'/>
+ </functype>
+ <function name='xmlParseAttValue' file='parserInternals' module='parser'>
+ <info>parse a value for an attribute Note: the parser won&apos;t do substitution of entities here, this will be handled later in xmlStringGetNodeList [10] AttValue ::= &apos;&quot;&apos; ([^&lt;&amp;&quot;] | Reference)* &apos;&quot;&apos; | &quot;&apos;&quot; ([^&lt;&amp;&apos;] | Reference)* &quot;&apos;&quot; 3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character reference is processed by appending the referenced character to the attribute value - an entity reference is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a &quot;#xD#xA&quot; sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA.</info>
+ <return type='xmlChar *' info='the AttValue parsed or NULL. The value has to be freed by the caller.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseAttribute' file='parserInternals' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an attribute [41] Attribute ::= Name Eq AttValue [ WFC: No External Entity References ] Attribute values cannot contain direct or indirect entity references to external entities. [ WFC: No &lt; in Attribute Values ] The replacement text of any entity referred to directly or indirectly in an attribute value (other than &quot;&amp;lt;&quot;) must not contain a &lt;. [ VC: Attribute Value Type ] The attribute must have been declared; the value must be of the type declared for it. [25] Eq ::= S? &apos;=&apos; S? With namespace: [NS 11] Attribute ::= QName Eq AttValue Also the case QName == xmlns:??? is handled independently as a namespace definition.</info>
+ <return type='const xmlChar *' info='the attribute name, and the value in *value.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='value' type='xmlChar **' info='a xmlChar ** used to store the value of the attribute'/>
+ </function>
+ <function name='xmlParseAttributeListDecl' file='parserInternals' module='parser'>
+ <info>: parse the Attribute list def for an element [52] AttlistDecl ::= &apos;&lt;!ATTLIST&apos; S Name AttDef* S? &apos;&gt;&apos; [53] AttDef ::= S Name S AttType S DefaultDecl</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseAttributeType' file='parserInternals' module='parser'>
+ <info>parse the Attribute list def for an element [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= &apos;CDATA&apos; [56] TokenizedType ::= &apos;ID&apos; | &apos;IDREF&apos; | &apos;IDREFS&apos; | &apos;ENTITY&apos; | &apos;ENTITIES&apos; | &apos;NMTOKEN&apos; | &apos;NMTOKENS&apos; Validity constraints for attribute values syntax are checked in xmlValidateAttributeValue() [ VC: ID ] Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. [ VC: One ID per Element Type ] No element type may have more than one ID attribute specified. [ VC: ID Attribute Default ] An ID attribute must have a declared default of #IMPLIED or #REQUIRED. [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each IDREF Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Entity Name must match the name of an unparsed entity declared in the DTD. [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</info>
+ <return type='int' info='the attribute type'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='tree' type='xmlEnumerationPtr *' info='the enumeration tree built while parsing'/>
+ </function>
+ <function name='xmlParseBalancedChunkMemory' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</info>
+ <return type='int' info='0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise'/>
+ <arg name='doc' type='xmlDocPtr' info='the document the chunk pertains to'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler bloc (possibly NULL)'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks (possibly NULL)'/>
+ <arg name='depth' type='int' info='Used for loop detection, use 0'/>
+ <arg name='string' type='const xmlChar *' info='the input string in UTF8 or ISO-Latin (zero terminated)'/>
+ <arg name='lst' type='xmlNodePtr *' info='the return value for the set of parsed nodes'/>
+ </function>
+ <function name='xmlParseBalancedChunkMemoryRecover' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Parse a well-balanced chunk of an XML document called by the parser The allowed sequence for the Well Balanced Chunk is the one defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</info>
+ <return type='int' info='0 if the chunk is well balanced, -1 in case of args problem and the parser error code otherwise In case recover is set to 1, the nodelist will not be empty even if the parsed chunk is not well balanced, assuming the parsing succeeded to some extent.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document the chunk pertains to'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler bloc (possibly NULL)'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks (possibly NULL)'/>
+ <arg name='depth' type='int' info='Used for loop detection, use 0'/>
+ <arg name='string' type='const xmlChar *' info='the input string in UTF8 or ISO-Latin (zero terminated)'/>
+ <arg name='lst' type='xmlNodePtr *' info='the return value for the set of parsed nodes'/>
+ <arg name='recover' type='int' info='return nodes even if the data is broken (use 0)'/>
+ </function>
+ <function name='xmlParseCDSect' file='parserInternals' module='parser'>
+ <info>Parse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= &apos;&lt;![CDATA[&apos; [20] Data ::= (Char* - (Char* &apos;]]&gt;&apos; Char*)) [21] CDEnd ::= &apos;]]&gt;&apos;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseCatalogFile' file='catalog' module='catalog'>
+ <cond>defined(LIBXML_CATALOG_ENABLED)</cond>
+ <info>parse an XML file and build a tree. It&apos;s like xmlParseFile() except it bypass all catalog lookups.</info>
+ <return type='xmlDocPtr' info='the resulting document tree or NULL in case of error'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlParseCharData' file='parserInternals' module='parser'>
+ <info>parse a CharData section. if we are within a CDATA section &apos;]]&gt;&apos; marks an end of section. The right angle bracket (&gt;) may be represented using the string &quot;&amp;gt;&quot;, and must, for compatibility, be escaped using &quot;&amp;gt;&quot; or a character reference when it appears in the string &quot;]]&gt;&quot; in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^&lt;&amp;]* - ([^&lt;&amp;]* &apos;]]&gt;&apos; [^&lt;&amp;]*)</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='cdata' type='int' info='int indicating whether we are within a CDATA section'/>
+ </function>
+ <function name='xmlParseCharEncoding' file='encoding' module='encoding'>
+ <info>Compare the string to the encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities.</info>
+ <return type='xmlCharEncoding' info='one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE if not recognized.'/>
+ <arg name='name' type='const char *' info='the encoding name as parsed, in UTF-8 format (ASCII actually)'/>
+ </function>
+ <function name='xmlParseCharRef' file='parserInternals' module='parser'>
+ <info>parse Reference declarations [66] CharRef ::= &apos;&amp;#&apos; [0-9]+ &apos;;&apos; | &apos;&amp;#x&apos; [0-9a-fA-F]+ &apos;;&apos; [ WFC: Legal Character ] Characters referred to using character references must match the production for Char.</info>
+ <return type='int' info='the value parsed (as an int), 0 in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseChunk' file='parser' module='parser'>
+ <cond>defined(LIBXML_PUSH_ENABLED)</cond>
+ <info>Parse a Chunk of memory</info>
+ <return type='int' info='zero if no error, the xmlParserErrors otherwise.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='chunk' type='const char *' info='an char array'/>
+ <arg name='size' type='int' info='the size in byte of the chunk'/>
+ <arg name='terminate' type='int' info='last chunk indicator'/>
+ </function>
+ <function name='xmlParseComment' file='parserInternals' module='parser'>
+ <info>Skip an XML (SGML) comment &lt;!-- .... --&gt; The spec says that &quot;For compatibility, the string &quot;--&quot; (double-hyphen) must not occur within comments. &quot; [15] Comment ::= &apos;&lt;!--&apos; ((Char - &apos;-&apos;) | (&apos;-&apos; (Char - &apos;-&apos;)))* &apos;--&gt;&apos;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseContent' file='parserInternals' module='parser'>
+ <info>Parse a content: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseCtxtExternalEntity' file='parser' module='parser'>
+ <info>Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</info>
+ <return type='int' info='0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise'/>
+ <arg name='ctx' type='xmlParserCtxtPtr' info='the existing parsing context'/>
+ <arg name='URL' type='const xmlChar *' info='the URL for the entity to load'/>
+ <arg name='ID' type='const xmlChar *' info='the System ID for the entity to load'/>
+ <arg name='lst' type='xmlNodePtr *' info='the return value for the set of parsed nodes'/>
+ </function>
+ <function name='xmlParseDTD' file='parser' module='parser'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Load and parse an external subset.</info>
+ <return type='xmlDtdPtr' info='the resulting xmlDtdPtr or NULL in case of error.'/>
+ <arg name='ExternalID' type='const xmlChar *' info='a NAME* containing the External ID of the DTD'/>
+ <arg name='SystemID' type='const xmlChar *' info='a NAME* containing the URL to the DTD'/>
+ </function>
+ <function name='xmlParseDefaultDecl' file='parserInternals' module='parser'>
+ <info>Parse an attribute default declaration [60] DefaultDecl ::= &apos;#REQUIRED&apos; | &apos;#IMPLIED&apos; | ((&apos;#FIXED&apos; S)? AttValue) [ VC: Required Attribute ] if the default declaration is the keyword #REQUIRED, then the attribute must be specified for all elements of the type in the attribute-list declaration. [ VC: Attribute Default Legal ] The declared default value must meet the lexical constraints of the declared attribute type c.f. xmlValidateAttributeDecl() [ VC: Fixed Attribute Default ] if an attribute has a default value declared with the #FIXED keyword, instances of that attribute must match the default value. [ WFC: No &lt; in Attribute Values ] handled in xmlParseAttValue()</info>
+ <return type='int' info='XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED or XML_ATTRIBUTE_FIXED.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='value' type='xmlChar **' info='Receive a possible fixed default value for the attribute'/>
+ </function>
+ <function name='xmlParseDoc' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to an array of xmlChar'/>
+ </function>
+ <function name='xmlParseDocTypeDecl' file='parserInternals' module='parser'>
+ <info>parse a DOCTYPE declaration [28] doctypedecl ::= &apos;&lt;!DOCTYPE&apos; S Name (S ExternalID)? S? (&apos;[&apos; (markupdecl | PEReference | S)* &apos;]&apos; S?)? &apos;&gt;&apos; [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseDocument' file='parser' module='parser'>
+ <info>parse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?</info>
+ <return type='int' info='0, -1 in case of error. the parser context is augmented as a result of the parsing.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseElement' file='parserInternals' module='parser'>
+ <info>parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element&apos;s end-tag must match the element type in the start-tag.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseElementChildrenContentDecl' file='parserInternals' module='parser'>
+ <info>parse the declaration for a Mixed Element content The leading &apos;(&apos; and spaces have been skipped in xmlParseElementContentDecl [47] children ::= (choice | seq) (&apos;?&apos; | &apos;*&apos; | &apos;+&apos;)? [48] cp ::= (Name | choice | seq) (&apos;?&apos; | &apos;*&apos; | &apos;+&apos;)? [49] choice ::= &apos;(&apos; S? cp ( S? &apos;|&apos; S? cp )* S? &apos;)&apos; [50] seq ::= &apos;(&apos; S? cp ( S? &apos;,&apos; S? cp )* S? &apos;)&apos; [ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For interoperability, if a parameter-entity reference appears in a choice, seq, or Mixed construct, its replacement text should not be empty, and neither the first nor last non-blank character of the replacement text should be a connector (| or ,).</info>
+ <return type='xmlElementContentPtr' info='the tree of xmlElementContentPtr describing the element hierarchy.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='inputchk' type='int' info='the input used for the current entity, needed for boundary checks'/>
+ </function>
+ <function name='xmlParseElementContentDecl' file='parserInternals' module='parser'>
+ <info>parse the declaration for an Element content either Mixed or Children, the cases EMPTY and ANY are handled directly in xmlParseElementDecl [46] contentspec ::= &apos;EMPTY&apos; | &apos;ANY&apos; | Mixed | children</info>
+ <return type='int' info='the type of element content XML_ELEMENT_TYPE_xxx'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='name' type='const xmlChar *' info='the name of the element being defined.'/>
+ <arg name='result' type='xmlElementContentPtr *' info='the Element Content pointer will be stored here if any'/>
+ </function>
+ <function name='xmlParseElementDecl' file='parserInternals' module='parser'>
+ <info>parse an Element declaration. [45] elementdecl ::= &apos;&lt;!ELEMENT&apos; S Name S contentspec S? &apos;&gt;&apos; [ VC: Unique Element Type Declaration ] No element type may be declared more than once</info>
+ <return type='int' info='the type of the element, or -1 in case of error'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseElementMixedContentDecl' file='parserInternals' module='parser'>
+ <info>parse the declaration for a Mixed Element content The leading &apos;(&apos; and spaces have been skipped in xmlParseElementContentDecl [51] Mixed ::= &apos;(&apos; S? &apos;#PCDATA&apos; (S? &apos;|&apos; S? Name)* S? &apos;)*&apos; | &apos;(&apos; S? &apos;#PCDATA&apos; S? &apos;)&apos; [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49]) [ VC: No Duplicate Types ] The same name must not appear more than once in a single mixed-content declaration.</info>
+ <return type='xmlElementContentPtr' info='the list of the xmlElementContentPtr describing the element choices'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='inputchk' type='int' info='the input used for the current entity, needed for boundary checks'/>
+ </function>
+ <function name='xmlParseEncName' file='parserInternals' module='parser'>
+ <info>parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | &apos;-&apos;)*</info>
+ <return type='xmlChar *' info='the encoding name value or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseEncodingDecl' file='parserInternals' module='parser'>
+ <info>parse the XML encoding declaration [80] EncodingDecl ::= S &apos;encoding&apos; Eq (&apos;&quot;&apos; EncName &apos;&quot;&apos; | &quot;&apos;&quot; EncName &quot;&apos;&quot;) this setups the conversion filters.</info>
+ <return type='const xmlChar *' info='the encoding value or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseEndTag' file='parserInternals' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an end of tag [42] ETag ::= &apos;&lt;/&apos; Name S? &apos;&gt;&apos; With namespace [NS 9] ETag ::= &apos;&lt;/&apos; QName S? &apos;&gt;&apos;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseEntity' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a &quot;Well Balanced&quot; chunk</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlParseEntityDecl' file='parserInternals' module='parser'>
+ <info>parse &lt;!ENTITY declarations [70] EntityDecl ::= GEDecl | PEDecl [71] GEDecl ::= &apos;&lt;!ENTITY&apos; S Name S EntityDef S? &apos;&gt;&apos; [72] PEDecl ::= &apos;&lt;!ENTITY&apos; S &apos;%&apos; S Name S PEDef S? &apos;&gt;&apos; [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S &apos;NDATA&apos; S Name [ VC: Notation Declared ] The Name must match the declared name of a notation.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseEntityRef' file='parserInternals' module='parser'>
+ <info>parse ENTITY references declarations [68] EntityRef ::= &apos;&amp;&apos; Name &apos;;&apos; [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with &quot;standalone=&apos;yes&apos;&quot;, the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone=&apos;yes&apos;. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found, or NULL otherwise.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseEntityValue' file='parserInternals' module='parser'>
+ <info>parse a value for ENTITY declarations [9] EntityValue ::= &apos;&quot;&apos; ([^%&amp;&quot;] | PEReference | Reference)* &apos;&quot;&apos; | &quot;&apos;&quot; ([^%&amp;&apos;] | PEReference | Reference)* &quot;&apos;&quot;</info>
+ <return type='xmlChar *' info='the EntityValue parsed with reference substituted or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='orig' type='xmlChar **' info='if non-NULL store a copy of the original entity value'/>
+ </function>
+ <function name='xmlParseEnumeratedType' file='parserInternals' module='parser'>
+ <info>parse an Enumerated attribute type. [57] EnumeratedType ::= NotationType | Enumeration [58] NotationType ::= &apos;NOTATION&apos; S &apos;(&apos; S? Name (S? &apos;|&apos; S? Name)* S? &apos;)&apos;</info>
+ <return type='int' info='XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='tree' type='xmlEnumerationPtr *' info='the enumeration tree built while parsing'/>
+ </function>
+ <function name='xmlParseEnumerationType' file='parserInternals' module='parser'>
+ <info>parse an Enumeration attribute type. [59] Enumeration ::= &apos;(&apos; S? Nmtoken (S? &apos;|&apos; S? Nmtoken)* S? &apos;)&apos; [ VC: Enumeration ] Values of this type must match one of the Nmtoken tokens in the declaration</info>
+ <return type='xmlEnumerationPtr' info='the enumeration attribute tree built while parsing'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseExtParsedEnt' file='parser' module='parser'>
+ <info>parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</info>
+ <return type='int' info='0, -1 in case of error. the parser context is augmented as a result of the parsing.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseExternalEntity' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Parse an external general entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content</info>
+ <return type='int' info='0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise'/>
+ <arg name='doc' type='xmlDocPtr' info='the document the chunk pertains to'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler bloc (possibly NULL)'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks (possibly NULL)'/>
+ <arg name='depth' type='int' info='Used for loop detection, use 0'/>
+ <arg name='URL' type='const xmlChar *' info='the URL for the entity to load'/>
+ <arg name='ID' type='const xmlChar *' info='the System ID for the entity to load'/>
+ <arg name='lst' type='xmlNodePtr *' info='the return value for the set of parsed nodes'/>
+ </function>
+ <function name='xmlParseExternalID' file='parserInternals' module='parser'>
+ <info>Parse an External ID or a Public ID NOTE: Productions [75] and [83] interact badly since [75] can generate &apos;PUBLIC&apos; S PubidLiteral S SystemLiteral [75] ExternalID ::= &apos;SYSTEM&apos; S SystemLiteral | &apos;PUBLIC&apos; S PubidLiteral S SystemLiteral [83] PublicID ::= &apos;PUBLIC&apos; S PubidLiteral</info>
+ <return type='xmlChar *' info='the function returns SystemLiteral and in the second case publicID receives PubidLiteral, is strict is off it is possible to return NULL and have publicID set.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='publicID' type='xmlChar **' info='a xmlChar** receiving PubidLiteral'/>
+ <arg name='strict' type='int' info='indicate whether we should restrict parsing to only production [75], see NOTE below'/>
+ </function>
+ <function name='xmlParseExternalSubset' file='parserInternals' module='parser'>
+ <info>parse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external identifier'/>
+ <arg name='SystemID' type='const xmlChar *' info='the system identifier (or URL)'/>
+ </function>
+ <function name='xmlParseFile' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.</info>
+ <return type='xmlDocPtr' info='the resulting document tree if the file was wellformed, NULL otherwise.'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlParseInNodeContext' file='parser' module='parser'>
+ <info>Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node. The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar: [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*</info>
+ <return type='xmlParserErrors' info='XML_ERR_OK if the chunk is well balanced, and the parser error code otherwise'/>
+ <arg name='node' type='xmlNodePtr' info='the context node'/>
+ <arg name='data' type='const char *' info='the input string'/>
+ <arg name='datalen' type='int' info='the input string length in bytes'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ <arg name='lst' type='xmlNodePtr *' info='the return value for the set of parsed nodes'/>
+ </function>
+ <function name='xmlParseMarkupDecl' file='parserInternals' module='parser'>
+ <info>parse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.)</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseMemory' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory block and build a tree.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='buffer' type='const char *' info='an pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlParseMisc' file='parserInternals' module='parser'>
+ <info>parse an XML Misc* optional field. [27] Misc ::= Comment | PI | S</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseName' file='parserInternals' module='parser'>
+ <info>parse an XML name. [4] NameChar ::= Letter | Digit | &apos;.&apos; | &apos;-&apos; | &apos;_&apos; | &apos;:&apos; | CombiningChar | Extender [5] Name ::= (Letter | &apos;_&apos; | &apos;:&apos;) (NameChar)* [6] Names ::= Name (#x20 Name)*</info>
+ <return type='const xmlChar *' info='the Name parsed or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseNamespace' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>xmlParseNamespace: parse specific PI &apos;&lt;?namespace ...&apos; constructs. This is what the older xml-name Working Draft specified, a bunch of other stuff may still rely on it, so support is still here as if it was declared on the root of the Tree:-( TODO: remove from library To be removed at next drop of binary compatibility</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseNmtoken' file='parserInternals' module='parser'>
+ <info>parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*</info>
+ <return type='xmlChar *' info='the Nmtoken parsed or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseNotationDecl' file='parserInternals' module='parser'>
+ <info>parse a notation declaration [82] NotationDecl ::= &apos;&lt;!NOTATION&apos; S Name S (ExternalID | PublicID) S? &apos;&gt;&apos; Hence there is actually 3 choices: &apos;PUBLIC&apos; S PubidLiteral &apos;PUBLIC&apos; S PubidLiteral S SystemLiteral and &apos;SYSTEM&apos; S SystemLiteral See the NOTE on xmlParseExternalID().</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseNotationType' file='parserInternals' module='parser'>
+ <info>parse an Notation attribute type. Note: the leading &apos;NOTATION&apos; S part has already being parsed... [58] NotationType ::= &apos;NOTATION&apos; S &apos;(&apos; S? Name (S? &apos;|&apos; S? Name)* S? &apos;)&apos; [ VC: Notation Attributes ] Values of this type must match one of the notation names included in the declaration; all notation names in the declaration must be declared.</info>
+ <return type='xmlEnumerationPtr' info='the notation attribute tree built while parsing'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParsePEReference' file='parserInternals' module='parser'>
+ <info>parse PEReference declarations The entity content is handled directly by pushing it&apos;s content as a new input stream. [69] PEReference ::= &apos;%&apos; Name &apos;;&apos; [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with &quot;standalone=&apos;yes&apos;&quot;, ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with &quot;standalone=&apos;no&apos;&quot;, ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParsePI' file='parserInternals' module='parser'>
+ <info>parse an XML Processing Instruction. [16] PI ::= &apos;&lt;?&apos; PITarget (S (Char* - (Char* &apos;?&gt;&apos; Char*)))? &apos;?&gt;&apos; The processing is transfered to SAX once parsed.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParsePITarget' file='parserInternals' module='parser'>
+ <info>parse the name of a PI [17] PITarget ::= Name - ((&apos;X&apos; | &apos;x&apos;) (&apos;M&apos; | &apos;m&apos;) (&apos;L&apos; | &apos;l&apos;))</info>
+ <return type='const xmlChar *' info='the PITarget name or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParsePubidLiteral' file='parserInternals' module='parser'>
+ <info>parse an XML public literal [12] PubidLiteral ::= &apos;&quot;&apos; PubidChar* &apos;&quot;&apos; | &quot;&apos;&quot; (PubidChar - &quot;&apos;&quot;)* &quot;&apos;&quot;</info>
+ <return type='xmlChar *' info='the PubidLiteral parsed or NULL.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseQuotedString' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Parse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility</info>
+ <return type='xmlChar *' info='the string parser or NULL.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseReference' file='parserInternals' module='parser'>
+ <info>parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. [67] Reference ::= EntityRef | CharRef</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseSDDecl' file='parserInternals' module='parser'>
+ <info>parse the XML standalone declaration [32] SDDecl ::= S &apos;standalone&apos; Eq ((&quot;&apos;&quot; (&apos;yes&apos; | &apos;no&apos;) &quot;&apos;&quot;) | (&apos;&quot;&apos; (&apos;yes&apos; | &apos;no&apos;)&apos;&quot;&apos;)) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value &quot;no&quot; if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types.</info>
+ <return type='int' info='1 if standalone=&quot;yes&quot; 0 if standalone=&quot;no&quot; -2 if standalone attribute is missing or invalid (A standalone value of -2 means that the XML declaration was found, but no value was specified for the standalone attribute).'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseStartTag' file='parserInternals' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse a start of tag either for rule element or EmptyElement. In both case we don&apos;t parse the tag closing chars. [40] STag ::= &apos;&lt;&apos; Name (S Attribute)* S? &apos;&gt;&apos; [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= &apos;&lt;&apos; Name (S Attribute)* S? &apos;/&gt;&apos; [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= &apos;&lt;&apos; QName (S Attribute)* S? &apos;&gt;&apos; [NS 10] EmptyElement ::= &apos;&lt;&apos; QName (S Attribute)* S? &apos;/&gt;&apos;</info>
+ <return type='const xmlChar *' info='the element name parsed'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseSystemLiteral' file='parserInternals' module='parser'>
+ <info>parse an XML Literal [11] SystemLiteral ::= (&apos;&quot;&apos; [^&quot;]* &apos;&quot;&apos;) | (&quot;&apos;&quot; [^&apos;]* &quot;&apos;&quot;)</info>
+ <return type='xmlChar *' info='the SystemLiteral parsed or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseTextDecl' file='parserInternals' module='parser'>
+ <info>parse an XML declaration header for external entities [77] TextDecl ::= &apos;&lt;?xml&apos; VersionInfo? EncodingDecl S? &apos;?&gt;&apos;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseURI' file='uri' module='uri'>
+ <info>Parse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ &quot;#&quot; fragment ]</info>
+ <return type='xmlURIPtr' info='a newly built xmlURIPtr or NULL in case of error'/>
+ <arg name='str' type='const char *' info='the URI string to analyze'/>
+ </function>
+ <function name='xmlParseURIRaw' file='uri' module='uri'>
+ <info>Parse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref</info>
+ <return type='xmlURIPtr' info='a newly built xmlURIPtr or NULL in case of error'/>
+ <arg name='str' type='const char *' info='the URI string to analyze'/>
+ <arg name='raw' type='int' info='if 1 unescaping of URI pieces are disabled'/>
+ </function>
+ <function name='xmlParseURIReference' file='uri' module='uri'>
+ <info>Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the @uri structure URI-reference = URI / relative-ref</info>
+ <return type='int' info='0 or the error code'/>
+ <arg name='uri' type='xmlURIPtr' info='pointer to an URI structure'/>
+ <arg name='str' type='const char *' info='the string to analyze'/>
+ </function>
+ <function name='xmlParseVersionInfo' file='parserInternals' module='parser'>
+ <info>parse the XML version. [24] VersionInfo ::= S &apos;version&apos; Eq (&apos; VersionNum &apos; | &quot; VersionNum &quot;) [25] Eq ::= S? &apos;=&apos; S?</info>
+ <return type='xmlChar *' info='the version string, e.g. &quot;1.0&quot;'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseVersionNum' file='parserInternals' module='parser'>
+ <info>parse the XML version value. [26] VersionNum ::= &apos;1.&apos; [0-9]+ In practice allow [0-9].[0-9]+ at that level</info>
+ <return type='xmlChar *' info='the string giving the XML version number, or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParseXMLDecl' file='parserInternals' module='parser'>
+ <info>parse an XML declaration header [23] XMLDecl ::= &apos;&lt;?xml&apos; VersionInfo EncodingDecl? SDDecl? S? &apos;?&gt;&apos;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlParserAddNodeInfo' file='parser' module='parserInternals'>
+ <info>Insert node info record into the sorted sequence</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='info' type='const xmlParserNodeInfoPtr' info='a node info sequence pointer'/>
+ </function>
+ <function name='xmlParserError' file='xmlerror' module='error'>
+ <info>Display and format an error messages, gives file, line, position and extra parameters.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </function>
+ <function name='xmlParserFindNodeInfo' file='parser' module='parserInternals'>
+ <info>Find the parser node info struct for a given node</info>
+ <return type='const xmlParserNodeInfo *' info='an xmlParserNodeInfo block pointer or NULL'/>
+ <arg name='ctx' type='const xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='node' type='const xmlNodePtr' info='an XML node within the tree'/>
+ </function>
+ <function name='xmlParserFindNodeInfoIndex' file='parser' module='parserInternals'>
+ <info>xmlParserFindNodeInfoIndex : Find the index that the info record for the given node is or should be at in a sorted sequence</info>
+ <return type='unsigned long' info='a long indicating the position of the record'/>
+ <arg name='seq' type='const xmlParserNodeInfoSeqPtr' info='a node info sequence pointer'/>
+ <arg name='node' type='const xmlNodePtr' info='an XML node pointer'/>
+ </function>
+ <function name='xmlParserGetDirectory' file='xmlIO' module='xmlIO'>
+ <info>lookup the directory for that file</info>
+ <return type='char *' info='a new allocated string containing the directory, or NULL.'/>
+ <arg name='filename' type='const char *' info='the path to a file'/>
+ </function>
+ <function name='xmlParserHandlePEReference' file='parserInternals' module='parser'>
+ <info>[69] PEReference ::= &apos;%&apos; Name &apos;;&apos; [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with &quot;standalone=&apos;yes&apos;&quot;, ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with &quot;standalone=&apos;no&apos;&quot;, ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity reference within DTDs</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserHandleReference' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= &apos;&amp;&apos; Name &apos;;&apos; [ WFC: Entity Declared ] the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity [66] CharRef ::= &apos;&amp;#&apos; [0-9]+ &apos;;&apos; | &apos;&amp;#x&apos; [0-9a-fA-F]+ &apos;;&apos; A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserInputBufferCreateFd' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing for the input from a file descriptor</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='fd' type='int' info='a file descriptor number'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferCreateFile' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing of a FILE * buffered C I/O</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='file' type='FILE *' info='a FILE*'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferCreateFilename' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing of a file If filename is &quot;-&apos; then we use stdin as the input. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Do an encoding check if enc == XML_CHAR_ENCODING_NONE</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='URI' type='const char *' info='a C string containing the URI or filename'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferCreateFilenameDefault' file='globals' module='xmlIO'>
+ <info>Registers a callback for URI input file handling</info>
+ <return type='xmlParserInputBufferCreateFilenameFunc' info='the old value of the registration function'/>
+ <arg name='func' type='xmlParserInputBufferCreateFilenameFunc' info='function pointer to the new ParserInputBufferCreateFilenameFunc'/>
+ </function>
+ <functype name='xmlParserInputBufferCreateFilenameFunc' file='globals' module='globals'>
+ <info>Signature for the function doing the lookup for a suitable input method corresponding to an URI.</info>
+ <return type='xmlParserInputBufferPtr' info='the new xmlParserInputBufferPtr in case of success or NULL if no method was found.'/>
+ <arg name='URI' type='const char *' info='the URI to read from'/>
+ <arg name='enc' type='xmlCharEncoding' info='the requested source encoding'/>
+ </functype>
+ <function name='xmlParserInputBufferCreateIO' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing for the input from an I/O handler</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferCreateMem' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing for the input from a memory area.</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='mem' type='const char *' info='the memory input'/>
+ <arg name='size' type='int' info='the length of the memory block'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferCreateStatic' file='xmlIO' module='xmlIO'>
+ <info>Create a buffered parser input for the progressive parsing for the input from an immutable memory area. This will not copy the memory area to the buffer, but the memory is expected to be available until the end of the parsing, this is useful for example when using mmap&apos;ed file.</info>
+ <return type='xmlParserInputBufferPtr' info='the new parser input or NULL'/>
+ <arg name='mem' type='const char *' info='the memory input'/>
+ <arg name='size' type='int' info='the length of the memory block'/>
+ <arg name='enc' type='xmlCharEncoding' info='the charset encoding if known'/>
+ </function>
+ <function name='xmlParserInputBufferGrow' file='xmlIO' module='xmlIO'>
+ <info>Grow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in-&gt;buffer or in-&gt;raw</info>
+ <return type='int' info='the number of chars read and stored in the buffer, or -1 in case of error.'/>
+ <arg name='in' type='xmlParserInputBufferPtr' info='a buffered parser input'/>
+ <arg name='len' type='int' info='indicative value of the amount of chars to read'/>
+ </function>
+ <function name='xmlParserInputBufferPush' file='xmlIO' module='xmlIO'>
+ <info>Push the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode.</info>
+ <return type='int' info='the number of chars read and stored in the buffer, or -1 in case of error.'/>
+ <arg name='in' type='xmlParserInputBufferPtr' info='a buffered parser input'/>
+ <arg name='len' type='int' info='the size in bytes of the array.'/>
+ <arg name='buf' type='const char *' info='an char array'/>
+ </function>
+ <function name='xmlParserInputBufferRead' file='xmlIO' module='xmlIO'>
+ <info>Refresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8</info>
+ <return type='int' info='the number of chars read and stored in the buffer, or -1 in case of error.'/>
+ <arg name='in' type='xmlParserInputBufferPtr' info='a buffered parser input'/>
+ <arg name='len' type='int' info='indicative value of the amount of chars to read'/>
+ </function>
+ <functype name='xmlParserInputDeallocate' file='parser' module='parser'>
+ <info>Callback for freeing some parser input allocations.</info>
+ <return type='void'/>
+ <arg name='str' type='xmlChar *' info='the string to deallocate'/>
+ </functype>
+ <function name='xmlParserInputGrow' file='parser' module='parserInternals'>
+ <info>This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data</info>
+ <return type='int' info='the amount of char read, or -1 in case of error, 0 indicate the end of this entity'/>
+ <arg name='in' type='xmlParserInputPtr' info='an XML parser input'/>
+ <arg name='len' type='int' info='an indicative size for the lookahead'/>
+ </function>
+ <function name='xmlParserInputRead' file='parser' module='parserInternals'>
+ <info>This function was internal and is deprecated.</info>
+ <return type='int' info='-1 as this is an error to use it.'/>
+ <arg name='in' type='xmlParserInputPtr' info='an XML parser input'/>
+ <arg name='len' type='int' info='an indicative size for the lookahead'/>
+ </function>
+ <function name='xmlParserInputShrink' file='parserInternals' module='parserInternals'>
+ <info>This function removes used input for the parser.</info>
+ <return type='void'/>
+ <arg name='in' type='xmlParserInputPtr' info='an XML parser input'/>
+ </function>
+ <function name='xmlParserPrintFileContext' file='xmlerror' module='error'>
+ <info>Displays current context within the input content for error tracking</info>
+ <return type='void'/>
+ <arg name='input' type='xmlParserInputPtr' info='an xmlParserInputPtr input'/>
+ </function>
+ <function name='xmlParserPrintFileInfo' file='xmlerror' module='error'>
+ <info>Displays the associated file and line informations for the current input</info>
+ <return type='void'/>
+ <arg name='input' type='xmlParserInputPtr' info='an xmlParserInputPtr input'/>
+ </function>
+ <function name='xmlParserValidityError' file='xmlerror' module='error'>
+ <info>Display and format an validity error messages, gives file, line, position and extra parameters.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </function>
+ <function name='xmlParserValidityWarning' file='xmlerror' module='error'>
+ <info>Display and format a validity warning messages, gives file, line, position and extra parameters.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </function>
+ <function name='xmlParserWarning' file='xmlerror' module='error'>
+ <info>Display and format a warning messages, gives file, line, position and extra parameters.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='an XML parser context'/>
+ <arg name='msg' type='const char *' info='the message to display/transmit'/>
+ <arg name='...' type='...' info='extra parameters for the message display'/>
+ </function>
+ <function name='xmlPathToURI' file='uri' module='uri'>
+ <info>Constructs an URI expressing the existing path</info>
+ <return type='xmlChar *' info='a new URI, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL.'/>
+ <arg name='path' type='const xmlChar *' info='the resource locator in a filesystem notation'/>
+ </function>
+ <function name='xmlPatternFromRoot' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Check if the pattern must be looked at from the root.</info>
+ <return type='int' info='1 if true, 0 if false and -1 in case of error'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ </function>
+ <function name='xmlPatternGetStreamCtxt' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Get a streaming context for that pattern Use xmlFreeStreamCtxt to free the context.</info>
+ <return type='xmlStreamCtxtPtr' info='a pointer to the context or NULL in case of failure'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ </function>
+ <function name='xmlPatternMatch' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Test whether the node matches the pattern</info>
+ <return type='int' info='1 if it matches, 0 if it doesn&apos;t and -1 in case of failure'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlPatternMaxDepth' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Check the maximum depth reachable by a pattern</info>
+ <return type='int' info='-2 if no limit (using //), otherwise the depth, and -1 in case of error'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ </function>
+ <function name='xmlPatternMinDepth' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Check the minimum depth reachable by a pattern, 0 mean the / or . are part of the set.</info>
+ <return type='int' info='-1 in case of error otherwise the depth,'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ </function>
+ <function name='xmlPatternStreamable' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt() should work.</info>
+ <return type='int' info='1 if streamable, 0 if not and -1 in case of error.'/>
+ <arg name='comp' type='xmlPatternPtr' info='the precompiled pattern'/>
+ </function>
+ <function name='xmlPatterncompile' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Compile a pattern.</info>
+ <return type='xmlPatternPtr' info='the compiled form of the pattern or NULL in case of error'/>
+ <arg name='pattern' type='const xmlChar *' info='the pattern to compile'/>
+ <arg name='dict' type='xmlDict *' info='an optional dictionary for interned strings'/>
+ <arg name='flags' type='int' info='compilation flags, see xmlPatternFlags'/>
+ <arg name='namespaces' type='const xmlChar **' info='the prefix definitions, array of [URI, prefix] or NULL'/>
+ </function>
+ <function name='xmlPedanticParserDefault' file='parser' module='parserInternals'>
+ <info>Set and return the previous value for enabling pedantic warnings.</info>
+ <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
+ <arg name='val' type='int' info='int 0 or 1'/>
+ </function>
+ <function name='xmlPopInput' file='parserInternals' module='parser'>
+ <info>xmlPopInput: the current input pointed by ctxt-&gt;input came to an end pop it and return the next char.</info>
+ <return type='xmlChar' info='the current xmlChar in the parser context'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlPopInputCallbacks' file='xmlIO' module='xmlIO'>
+ <info>Clear the top input callback from the input stack. this includes the compiled-in I/O.</info>
+ <return type='int' info='the number of input callback registered or -1 in case of error.'/>
+ </function>
+ <function name='xmlPreviousElementSibling' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don&apos;t have back reference from entities content to entities references.</info>
+ <return type='xmlNodePtr' info='the previous element sibling or NULL if not available'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ </function>
+ <function name='xmlPrintURI' file='uri' module='uri'>
+ <info>Prints the URI in the stream @stream.</info>
+ <return type='void'/>
+ <arg name='stream' type='FILE *' info='a FILE* for the output'/>
+ <arg name='uri' type='xmlURIPtr' info='pointer to an xmlURI'/>
+ </function>
+ <function name='xmlPushInput' file='parserInternals' module='parser'>
+ <info>xmlPushInput: switch to a new input stream which is stacked on top of the previous one(s).</info>
+ <return type='int' info='-1 in case of error or the index in the input stack'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='input' type='xmlParserInputPtr' info='an XML parser input fragment (entity, XML fragment ...).'/>
+ </function>
+ <function name='xmlRMutexLock' file='threads' module='threads'>
+ <info>xmlRMutexLock() is used to lock a libxml2 token_r.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlRMutexPtr' info='the reentrant mutex'/>
+ </function>
+ <function name='xmlRMutexUnlock' file='threads' module='threads'>
+ <info>xmlRMutexUnlock() is used to unlock a libxml2 token_r.</info>
+ <return type='void'/>
+ <arg name='tok' type='xmlRMutexPtr' info='the reentrant mutex'/>
+ </function>
+ <function name='xmlReadDoc' file='parser' module='parser'>
+ <info>parse an XML in-memory document and build a tree.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReadFd' file='parser' module='parser'>
+ <info>parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReadFile' file='parser' module='parser'>
+ <info>parse an XML file from the filesystem or the network.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReadIO' file='parser' module='parser'>
+ <info>parse an XML document from I/O functions and source and build a tree.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReadMemory' file='parser' module='parser'>
+ <info>parse an XML in-memory document and build a tree.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderForDoc' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderForFd' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderForFile' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderForIO' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderForMemory' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewDoc' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to a zero terminated string'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewFd' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='fd' type='int' info='an open file descriptor'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewFile' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='filename' type='const char *' info='a file or URL'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewIO' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an xmltextReader to parse an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='ioread' type='xmlInputReadCallback' info='an I/O read function'/>
+ <arg name='ioclose' type='xmlInputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewMemory' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlReaderNewWalker' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='doc' type='xmlDocPtr' info='a preparsed document'/>
+ </function>
+ <function name='xmlReaderWalker' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Create an xmltextReader for a preparsed document.</info>
+ <return type='xmlTextReaderPtr' info='the new reader or NULL in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='a preparsed document'/>
+ </function>
+ <functype name='xmlReallocFunc' file='xmlmemory' module='xmlmemory'>
+ <info>Signature for a realloc() implementation.</info>
+ <return type='void *' info='a pointer to the newly reallocated block or NULL in case of error.'/>
+ <arg name='mem' type='void *' info='an already allocated block of memory'/>
+ <arg name='size' type='size_t' info='the new size requested in bytes'/>
+ </functype>
+ <function name='xmlReallocLoc' file='xmlmemory' module='xmlmemory'>
+ <info>a realloc() equivalent, with logging of the allocation info.</info>
+ <return type='void *' info='a pointer to the allocated area or NULL in case of lack of memory.'/>
+ <arg name='ptr' type='void *' info='the initial memory block pointer'/>
+ <arg name='size' type='size_t' info='an int specifying the size in byte to allocate.'/>
+ <arg name='file' type='const char *' info='the file name or NULL'/>
+ <arg name='line' type='int' info='the line number'/>
+ </function>
+ <function name='xmlReconciliateNs' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED)</cond>
+ <info>This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.</info>
+ <return type='int' info='the number of namespace declarations created or -1 in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='tree' type='xmlNodePtr' info='a node defining the subtree to reconciliate'/>
+ </function>
+ <function name='xmlRecoverDoc' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway</info>
+ <return type='xmlDocPtr' info='the resulting document tree or NULL in case of failure'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to an array of xmlChar'/>
+ </function>
+ <function name='xmlRecoverFile' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway</info>
+ <return type='xmlDocPtr' info='the resulting document tree or NULL in case of failure'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlRecoverMemory' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway</info>
+ <return type='xmlDocPtr' info='the resulting document tree or NULL in case of error'/>
+ <arg name='buffer' type='const char *' info='an pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <functype name='xmlRegExecCallbacks' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Callback function when doing a transition in the automata</info>
+ <return type='void'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='the regular expression context'/>
+ <arg name='token' type='const xmlChar *' info='the current token string'/>
+ <arg name='transdata' type='void *' info='transition data'/>
+ <arg name='inputdata' type='void *' info='input data'/>
+ </functype>
+ <function name='xmlRegExecErrInfo' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Extract error informations from the regexp execution, the parameter @string will be updated with the value pushed and not accepted, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</info>
+ <return type='int' info='will be freed with the @exec context and don&apos;t need to be deallocated. Returns: 0 in case of success or -1 in case of error.'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context generating an error'/>
+ <arg name='string' type='const xmlChar **' info='return value for the error string'/>
+ <arg name='nbval' type='int *' info='pointer to the number of accepted values IN/OUT'/>
+ <arg name='nbneg' type='int *' info='return number of negative transitions'/>
+ <arg name='values' type='xmlChar **' info='pointer to the array of acceptable values'/>
+ <arg name='terminal' type='int *' info='return value if this was a terminal state'/>
+ </function>
+ <function name='xmlRegExecNextValues' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Extract informations from the regexp execution, the parameter @values must point to an array of @nbval string pointers on return nbval will contain the number of possible strings in that state and the @values array will be updated with them. The string values</info>
+ <return type='int' info='will be freed with the @exec context and don&apos;t need to be deallocated. Returns: 0 in case of success or -1 in case of error.'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context'/>
+ <arg name='nbval' type='int *' info='pointer to the number of accepted values IN/OUT'/>
+ <arg name='nbneg' type='int *' info='return number of negative transitions'/>
+ <arg name='values' type='xmlChar **' info='pointer to the array of acceptable values'/>
+ <arg name='terminal' type='int *' info='return value if this was a terminal state'/>
+ </function>
+ <function name='xmlRegExecPushString' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Push one input token in the execution context</info>
+ <return type='int' info='1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context or NULL to indicate the end'/>
+ <arg name='value' type='const xmlChar *' info='a string token input'/>
+ <arg name='data' type='void *' info='data associated to the token to reuse in callbacks'/>
+ </function>
+ <function name='xmlRegExecPushString2' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Push one input token in the execution context</info>
+ <return type='int' info='1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context or NULL to indicate the end'/>
+ <arg name='value' type='const xmlChar *' info='the first string token input'/>
+ <arg name='value2' type='const xmlChar *' info='the second string token input'/>
+ <arg name='data' type='void *' info='data associated to the token to reuse in callbacks'/>
+ </function>
+ <function name='xmlRegFreeExecCtxt' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Free the structures associated to a regular expression evaulation context.</info>
+ <return type='void'/>
+ <arg name='exec' type='xmlRegExecCtxtPtr' info='a regular expression evaulation context'/>
+ </function>
+ <function name='xmlRegFreeRegexp' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Free a regexp</info>
+ <return type='void'/>
+ <arg name='regexp' type='xmlRegexpPtr' info='the regexp'/>
+ </function>
+ <function name='xmlRegNewExecCtxt' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Build a context used for progressive evaluation of a regexp.</info>
+ <return type='xmlRegExecCtxtPtr' info='the new context'/>
+ <arg name='comp' type='xmlRegexpPtr' info='a precompiled regular expression'/>
+ <arg name='callback' type='xmlRegExecCallbacks' info='a callback function used for handling progresses in the automata matching phase'/>
+ <arg name='data' type='void *' info='the context data associated to the callback in this context'/>
+ </function>
+ <function name='xmlRegexpCompile' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Parses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression</info>
+ <return type='xmlRegexpPtr' info='the compiled expression or NULL in case of error'/>
+ <arg name='regexp' type='const xmlChar *' info='a regular expression string'/>
+ </function>
+ <function name='xmlRegexpExec' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Check if the regular expression generates the value</info>
+ <return type='int' info='1 if it matches, 0 if not and a negative value in case of error'/>
+ <arg name='comp' type='xmlRegexpPtr' info='the compiled regular expression'/>
+ <arg name='content' type='const xmlChar *' info='the value to check against the regular expression'/>
+ </function>
+ <function name='xmlRegexpIsDeterminist' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Check if the regular expression is determinist</info>
+ <return type='int' info='1 if it yes, 0 if not and a negative value in case of error'/>
+ <arg name='comp' type='xmlRegexpPtr' info='the compiled regular expression'/>
+ </function>
+ <function name='xmlRegexpPrint' file='xmlregexp' module='xmlregexp'>
+ <cond>defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Print the content of the compiled regular expression</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the file for the output debug'/>
+ <arg name='regexp' type='xmlRegexpPtr' info='the compiled regexp'/>
+ </function>
+ <function name='xmlRegisterCharEncodingHandler' file='encoding' module='encoding'>
+ <info>Register the char encoding handler, surprising, isn&apos;t it ?</info>
+ <return type='void'/>
+ <arg name='handler' type='xmlCharEncodingHandlerPtr' info='the xmlCharEncodingHandlerPtr handler block'/>
+ </function>
+ <function name='xmlRegisterDefaultInputCallbacks' file='xmlIO' module='xmlIO'>
+ <info>Registers the default compiled-in I/O handlers.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlRegisterDefaultOutputCallbacks' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Registers the default compiled-in I/O handlers.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlRegisterHTTPPostCallbacks' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED) &amp;&amp; defined(LIBXML_HTTP_ENABLED)</cond>
+ <info>By default, libxml submits HTTP output requests using the &quot;PUT&quot; method. Calling this method changes the HTTP output method to use the &quot;POST&quot; method instead.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlRegisterInputCallbacks' file='xmlIO' module='xmlIO'>
+ <info>Register a new set of I/O callback for handling parser input.</info>
+ <return type='int' info='the registered handler number or -1 in case of error'/>
+ <arg name='matchFunc' type='xmlInputMatchCallback' info='the xmlInputMatchCallback'/>
+ <arg name='openFunc' type='xmlInputOpenCallback' info='the xmlInputOpenCallback'/>
+ <arg name='readFunc' type='xmlInputReadCallback' info='the xmlInputReadCallback'/>
+ <arg name='closeFunc' type='xmlInputCloseCallback' info='the xmlInputCloseCallback'/>
+ </function>
+ <function name='xmlRegisterNodeDefault' file='globals' module='globals'>
+ <info>Registers a callback for node creation</info>
+ <return type='xmlRegisterNodeFunc' info='the old value of the registration function'/>
+ <arg name='func' type='xmlRegisterNodeFunc' info='function pointer to the new RegisterNodeFunc'/>
+ </function>
+ <functype name='xmlRegisterNodeFunc' file='globals' module='globals'>
+ <info>Signature for the registration callback of a created node</info>
+ <return type='void'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ </functype>
+ <function name='xmlRegisterOutputCallbacks' file='xmlIO' module='xmlIO'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Register a new set of I/O callback for handling output.</info>
+ <return type='int' info='the registered handler number or -1 in case of error'/>
+ <arg name='matchFunc' type='xmlOutputMatchCallback' info='the xmlOutputMatchCallback'/>
+ <arg name='openFunc' type='xmlOutputOpenCallback' info='the xmlOutputOpenCallback'/>
+ <arg name='writeFunc' type='xmlOutputWriteCallback' info='the xmlOutputWriteCallback'/>
+ <arg name='closeFunc' type='xmlOutputCloseCallback' info='the xmlOutputCloseCallback'/>
+ </function>
+ <function name='xmlRelaxNGCleanupTypes' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Cleanup the default Schemas type library associated to RelaxNG</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlRelaxNGDump' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump a RelaxNG structure back</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the file output'/>
+ <arg name='schema' type='xmlRelaxNGPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlRelaxNGDumpTree' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump the transformed RelaxNG tree.</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the file output'/>
+ <arg name='schema' type='xmlRelaxNGPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlRelaxNGFree' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Deallocate a RelaxNG structure.</info>
+ <return type='void'/>
+ <arg name='schema' type='xmlRelaxNGPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlRelaxNGFreeParserCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Free the resources associated to the schema parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='the schema parser context'/>
+ </function>
+ <function name='xmlRelaxNGFreeValidCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Free the resources associated to the schema validation context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the schema validation context'/>
+ </function>
+ <function name='xmlRelaxNGGetParserErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the callback information used to handle errors for a validation context</info>
+ <return type='int' info='-1 in case of failure, 0 otherwise.'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='err' type='xmlRelaxNGValidityErrorFunc *' info='the error callback result'/>
+ <arg name='warn' type='xmlRelaxNGValidityWarningFunc *' info='the warning callback result'/>
+ <arg name='ctx' type='void **' info='contextual data for the callbacks result'/>
+ </function>
+ <function name='xmlRelaxNGGetValidErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the error and warning callback informations</info>
+ <return type='int' info='-1 in case of error and 0 otherwise'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='err' type='xmlRelaxNGValidityErrorFunc *' info='the error function result'/>
+ <arg name='warn' type='xmlRelaxNGValidityWarningFunc *' info='the warning function result'/>
+ <arg name='ctx' type='void **' info='the functions context result'/>
+ </function>
+ <function name='xmlRelaxNGInitTypes' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Initilize the default type libraries.</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ </function>
+ <function name='xmlRelaxNGNewDocParserCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</info>
+ <return type='xmlRelaxNGParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='a preparsed document tree'/>
+ </function>
+ <function name='xmlRelaxNGNewMemParserCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</info>
+ <return type='xmlRelaxNGParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array containing the schemas'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlRelaxNGNewParserCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.</info>
+ <return type='xmlRelaxNGParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='URL' type='const char *' info='the location of the schema'/>
+ </function>
+ <function name='xmlRelaxNGNewValidCtxt' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML RelaxNGs validation context based on the given schema</info>
+ <return type='xmlRelaxNGValidCtxtPtr' info='the validation context or NULL in case of error'/>
+ <arg name='schema' type='xmlRelaxNGPtr' info='a precompiled XML RelaxNGs'/>
+ </function>
+ <function name='xmlRelaxNGParse' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info>
+ <return type='xmlRelaxNGPtr' info='the internal XML RelaxNG structure built from the resource or NULL in case of error'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG parser context'/>
+ </function>
+ <function name='xmlRelaxNGSetParserErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the callback functions used to handle errors for a validation context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='err' type='xmlRelaxNGValidityErrorFunc' info='the error callback'/>
+ <arg name='warn' type='xmlRelaxNGValidityWarningFunc' info='the warning callback'/>
+ <arg name='ctx' type='void *' info='contextual data for the callbacks'/>
+ </function>
+ <function name='xmlRelaxNGSetParserStructuredErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the callback functions used to handle errors for a parsing context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a Relax-NG parser context'/>
+ <arg name='serror' type='xmlStructuredErrorFunc' info='the error callback'/>
+ <arg name='ctx' type='void *' info='contextual data for the callbacks'/>
+ </function>
+ <function name='xmlRelaxNGSetValidErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the error and warning callback informations</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='err' type='xmlRelaxNGValidityErrorFunc' info='the error function'/>
+ <arg name='warn' type='xmlRelaxNGValidityWarningFunc' info='the warning function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlRelaxNGSetValidStructuredErrors' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the structured error callback</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlRelaxNGValidateDoc' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate a document tree in memory.</info>
+ <return type='int' info='0 if the document is valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='a Relax-NG validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a parsed document tree'/>
+ </function>
+ <function name='xmlRelaxNGValidateFullElement' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded.</info>
+ <return type='int' info='1 if no validation problem was found or -1 in case of error.'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ </function>
+ <function name='xmlRelaxNGValidatePopElement' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Pop the element end from the RelaxNG validation stack.</info>
+ <return type='int' info='1 if no validation problem was found or 0 otherwise'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the RelaxNG validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ </function>
+ <function name='xmlRelaxNGValidatePushCData' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>check the CData parsed for validation in the current stack</info>
+ <return type='int' info='1 if no validation problem was found or -1 otherwise'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the RelaxNG validation context'/>
+ <arg name='data' type='const xmlChar *' info='some character data read'/>
+ <arg name='len' type='int' info='the length of the data'/>
+ </function>
+ <function name='xmlRelaxNGValidatePushElement' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Push a new element start on the RelaxNG validation stack.</info>
+ <return type='int' info='1 if no validation problem was found or 0 if validating the element requires a full node, and -1 in case of error.'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ </function>
+ <functype name='xmlRelaxNGValidityErrorFunc' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Signature of an error callback from a Relax-NG validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <functype name='xmlRelaxNGValidityWarningFunc' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Signature of a warning callback from a Relax-NG validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <function name='xmlRelaxParserSetFlag' file='relaxng' module='relaxng'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Semi private function used to pass informations to a parser context which are a combination of xmlRelaxNGParserFlag .</info>
+ <return type='int' info='0 if success and -1 in case of error'/>
+ <arg name='ctxt' type='xmlRelaxNGParserCtxtPtr' info='a RelaxNG parser context'/>
+ <arg name='flags' type='int' info='a set of flags values'/>
+ </function>
+ <function name='xmlRemoveID' file='valid' module='valid'>
+ <info>Remove the given attribute from the ID table maintained internally.</info>
+ <return type='int' info='-1 if the lookup failed and 0 otherwise'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
+ </function>
+ <function name='xmlRemoveProp' file='tree' module='tree'>
+ <info>Unlink and free one attribute, all the content is freed too Note this doesn&apos;t work for namespace definition attributes</info>
+ <return type='int' info='0 if success and -1 in case of error.'/>
+ <arg name='cur' type='xmlAttrPtr' info='an attribute'/>
+ </function>
+ <function name='xmlRemoveRef' file='valid' module='valid'>
+ <info>Remove the given attribute from the Ref table maintained internally.</info>
+ <return type='int' info='-1 if the lookup failed and 0 otherwise'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='attr' type='xmlAttrPtr' info='the attribute'/>
+ </function>
+ <function name='xmlReplaceNode' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context.</info>
+ <return type='xmlNodePtr' info='the @old node'/>
+ <arg name='old' type='xmlNodePtr' info='the old node'/>
+ <arg name='cur' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlResetError' file='xmlerror' module='error'>
+ <info>Cleanup the error.</info>
+ <return type='void'/>
+ <arg name='err' type='xmlErrorPtr' info='pointer to the error.'/>
+ </function>
+ <function name='xmlResetLastError' file='xmlerror' module='error'>
+ <info>Cleanup the last global error registered. For parsing error this does not change the well-formedness result.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlSAX2AttributeDecl' file='SAX2' module='SAX2'>
+ <info>An attribute definition has been parsed</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='elem' type='const xmlChar *' info='the name of the element'/>
+ <arg name='fullname' type='const xmlChar *' info='the attribute name'/>
+ <arg name='type' type='int' info='the attribute type'/>
+ <arg name='def' type='int' info='the type of default value'/>
+ <arg name='defaultValue' type='const xmlChar *' info='the attribute default value'/>
+ <arg name='tree' type='xmlEnumerationPtr' info='the tree of enumerated value set'/>
+ </function>
+ <function name='xmlSAX2CDataBlock' file='SAX2' module='SAX2'>
+ <info>called when a pcdata block has been parsed</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='The pcdata content'/>
+ <arg name='len' type='int' info='the block length'/>
+ </function>
+ <function name='xmlSAX2Characters' file='SAX2' module='SAX2'>
+ <info>receiving some chars from the parser.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </function>
+ <function name='xmlSAX2Comment' file='SAX2' module='SAX2'>
+ <info>A xmlSAX2Comment has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='value' type='const xmlChar *' info='the xmlSAX2Comment content'/>
+ </function>
+ <function name='xmlSAX2ElementDecl' file='SAX2' module='SAX2'>
+ <info>An element definition has been parsed</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the element name'/>
+ <arg name='type' type='int' info='the element type'/>
+ <arg name='content' type='xmlElementContentPtr' info='the element value tree'/>
+ </function>
+ <function name='xmlSAX2EndDocument' file='SAX2' module='SAX2'>
+ <info>called when the document end has been detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2EndElement' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when the end of an element has been detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The element name'/>
+ </function>
+ <function name='xmlSAX2EndElementNs' file='SAX2' module='SAX2'>
+ <info>SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='localname' type='const xmlChar *' info='the local name of the element'/>
+ <arg name='prefix' type='const xmlChar *' info='the element namespace prefix if available'/>
+ <arg name='URI' type='const xmlChar *' info='the element namespace name if available'/>
+ </function>
+ <function name='xmlSAX2EntityDecl' file='SAX2' module='SAX2'>
+ <info>An entity definition has been parsed</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the entity name'/>
+ <arg name='type' type='int' info='the entity type'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='content' type='xmlChar *' info='the entity value (without processing).'/>
+ </function>
+ <function name='xmlSAX2ExternalSubset' file='SAX2' module='SAX2'>
+ <info>Callback on external subset declaration.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </function>
+ <function name='xmlSAX2GetColumnNumber' file='SAX2' module='SAX2'>
+ <info>Provide the column number of the current parsing point.</info>
+ <return type='int' info='an int'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2GetEntity' file='SAX2' module='SAX2'>
+ <info>Get an entity by name</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <function name='xmlSAX2GetLineNumber' file='SAX2' module='SAX2'>
+ <info>Provide the line number of the current parsing point.</info>
+ <return type='int' info='an int'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2GetParameterEntity' file='SAX2' module='SAX2'>
+ <info>Get a parameter entity by name</info>
+ <return type='xmlEntityPtr' info='the xmlEntityPtr if found.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <function name='xmlSAX2GetPublicId' file='SAX2' module='SAX2'>
+ <info>Provides the public ID e.g. &quot;-//SGMLSOURCE//DTD DEMO//EN&quot;</info>
+ <return type='const xmlChar *' info='a xmlChar *'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2GetSystemId' file='SAX2' module='SAX2'>
+ <info>Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd</info>
+ <return type='const xmlChar *' info='a xmlChar *'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2HasExternalSubset' file='SAX2' module='SAX2'>
+ <info>Does this document has an external subset</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2HasInternalSubset' file='SAX2' module='SAX2'>
+ <info>Does this document has an internal subset</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2IgnorableWhitespace' file='SAX2' module='SAX2'>
+ <info>receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use xmlSAX2Characters</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='ch' type='const xmlChar *' info='a xmlChar string'/>
+ <arg name='len' type='int' info='the number of xmlChar'/>
+ </function>
+ <function name='xmlSAX2InitDefaultSAXHandler' file='SAX2' module='SAX2'>
+ <info>Initialize the default XML SAX2 handler</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandler *' info='the SAX handler'/>
+ <arg name='warning' type='int' info='flag if non-zero sets the handler warning procedure'/>
+ </function>
+ <function name='xmlSAX2InitDocbDefaultSAXHandler' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_DOCB_ENABLED)</cond>
+ <info>Initialize the default DocBook SAX2 handler</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandler *' info='the SAX handler'/>
+ </function>
+ <function name='xmlSAX2InitHtmlDefaultSAXHandler' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Initialize the default HTML SAX2 handler</info>
+ <return type='void'/>
+ <arg name='hdlr' type='xmlSAXHandler *' info='the SAX handler'/>
+ </function>
+ <function name='xmlSAX2InternalSubset' file='SAX2' module='SAX2'>
+ <info>Callback on internal subset declaration.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='the root element name'/>
+ <arg name='ExternalID' type='const xmlChar *' info='the external ID'/>
+ <arg name='SystemID' type='const xmlChar *' info='the SYSTEM ID (e.g. filename or URL)'/>
+ </function>
+ <function name='xmlSAX2IsStandalone' file='SAX2' module='SAX2'>
+ <info>Is this document tagged standalone ?</info>
+ <return type='int' info='1 if true'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2NotationDecl' file='SAX2' module='SAX2'>
+ <info>What to do when a notation declaration has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the notation'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </function>
+ <function name='xmlSAX2ProcessingInstruction' file='SAX2' module='SAX2'>
+ <info>A processing instruction has been parsed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='target' type='const xmlChar *' info='the target name'/>
+ <arg name='data' type='const xmlChar *' info='the PI data&apos;s'/>
+ </function>
+ <function name='xmlSAX2Reference' file='SAX2' module='SAX2'>
+ <info>called when an entity xmlSAX2Reference is detected.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The entity name'/>
+ </function>
+ <function name='xmlSAX2ResolveEntity' file='SAX2' module='SAX2'>
+ <info>The entity loader, to control the loading of external entities, the application can either: - override this xmlSAX2ResolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it&apos;s own entity resolution routine</info>
+ <return type='xmlParserInputPtr' info='the xmlParserInputPtr if inlined or NULL for DOM behaviour.'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ </function>
+ <function name='xmlSAX2SetDocumentLocator' file='SAX2' module='SAX2'>
+ <info>Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='loc' type='xmlSAXLocatorPtr' info='A SAX Locator'/>
+ </function>
+ <function name='xmlSAX2StartDocument' file='SAX2' module='SAX2'>
+ <info>called when the document start being processed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ </function>
+ <function name='xmlSAX2StartElement' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>called when an opening tag has been processed.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='fullname' type='const xmlChar *' info='The element name, including namespace prefix'/>
+ <arg name='atts' type='const xmlChar **' info='An array of name/value attributes pairs, NULL terminated'/>
+ </function>
+ <function name='xmlSAX2StartElementNs' file='SAX2' module='SAX2'>
+ <info>SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='localname' type='const xmlChar *' info='the local name of the element'/>
+ <arg name='prefix' type='const xmlChar *' info='the element namespace prefix if available'/>
+ <arg name='URI' type='const xmlChar *' info='the element namespace name if available'/>
+ <arg name='nb_namespaces' type='int' info='number of namespace definitions on that node'/>
+ <arg name='namespaces' type='const xmlChar **' info='pointer to the array of prefix/URI pairs namespace definitions'/>
+ <arg name='nb_attributes' type='int' info='the number of attributes on that node'/>
+ <arg name='nb_defaulted' type='int' info='the number of defaulted attributes.'/>
+ <arg name='attributes' type='const xmlChar **' info='pointer to the array of (localname/prefix/URI/value/end) attribute values.'/>
+ </function>
+ <function name='xmlSAX2UnparsedEntityDecl' file='SAX2' module='SAX2'>
+ <info>What to do when an unparsed entity declaration is parsed</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the user data (XML parser context)'/>
+ <arg name='name' type='const xmlChar *' info='The name of the entity'/>
+ <arg name='publicId' type='const xmlChar *' info='The public ID of the entity'/>
+ <arg name='systemId' type='const xmlChar *' info='The system ID of the entity'/>
+ <arg name='notationName' type='const xmlChar *' info='the name of the notation'/>
+ </function>
+ <function name='xmlSAXDefaultVersion' file='SAX2' module='SAX2'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context.</info>
+ <return type='int' info='the previous value in case of success and -1 in case of error.'/>
+ <arg name='version' type='int' info='the version, 1 or 2'/>
+ </function>
+ <function name='xmlSAXParseDTD' file='parser' module='parser'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Load and parse an external subset.</info>
+ <return type='xmlDtdPtr' info='the resulting xmlDtdPtr or NULL in case of error.'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='ExternalID' type='const xmlChar *' info='a NAME* containing the External ID of the DTD'/>
+ <arg name='SystemID' type='const xmlChar *' info='a NAME* containing the URL to the DTD'/>
+ </function>
+ <function name='xmlSAXParseDoc' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory document and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='cur' type='const xmlChar *' info='a pointer to an array of xmlChar'/>
+ <arg name='recovery' type='int' info='work in recovery mode, i.e. tries to read no Well Formed documents'/>
+ </function>
+ <function name='xmlSAXParseEntity' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML external entity out of context and build a tree. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. [78] extParsedEnt ::= TextDecl? content This correspond to a &quot;Well Balanced&quot; chunk</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ </function>
+ <function name='xmlSAXParseFile' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='recovery' type='int' info='work in recovery mode, i.e. tries to read no Well Formed documents'/>
+ </function>
+ <function name='xmlSAXParseFileWithData' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. It use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context&apos;s _private member, so it is available nearly everywhere in libxml</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='filename' type='const char *' info='the filename'/>
+ <arg name='recovery' type='int' info='work in recovery mode, i.e. tries to read no Well Formed documents'/>
+ <arg name='data' type='void *' info='the userdata'/>
+ </function>
+ <function name='xmlSAXParseMemory' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines.</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='buffer' type='const char *' info='an pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='recovery' type='int' info='work in recovery mode, i.e. tries to read not Well Formed documents'/>
+ </function>
+ <function name='xmlSAXParseMemoryWithData' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML in-memory block and use the given SAX function block to handle the parsing callback. If sax is NULL, fallback to the default DOM tree building routines. User data (void *) is stored within the parser context in the context&apos;s _private member, so it is available nearly everywhere in libxml</info>
+ <return type='xmlDocPtr' info='the resulting document tree'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='the SAX handler block'/>
+ <arg name='buffer' type='const char *' info='an pointer to a char array'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ <arg name='recovery' type='int' info='work in recovery mode, i.e. tries to read no Well Formed documents'/>
+ <arg name='data' type='void *' info='the userdata'/>
+ </function>
+ <function name='xmlSAXUserParseFile' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>parse an XML file and call the given SAX handler routines. Automatic support for ZLIB/Compress compressed document is provided</info>
+ <return type='int' info='0 in case of success or a error number otherwise'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='filename' type='const char *' info='a file name'/>
+ </function>
+ <function name='xmlSAXUserParseMemory' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>A better SAX parsing routine. parse an XML in-memory buffer and call the given SAX handler routines.</info>
+ <return type='int' info='0 in case of success or a error number otherwise'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler'/>
+ <arg name='user_data' type='void *' info='The user data returned on SAX callbacks'/>
+ <arg name='buffer' type='const char *' info='an in-memory XML document input'/>
+ <arg name='size' type='int' info='the length of the XML document in bytes'/>
+ </function>
+ <function name='xmlSAXVersion' file='SAX2' module='SAX2'>
+ <info>Initialize the default XML SAX handler according to the version</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='hdlr' type='xmlSAXHandler *' info='the SAX handler'/>
+ <arg name='version' type='int' info='the version, 1 or 2'/>
+ </function>
+ <function name='xmlSaveClose' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.</info>
+ <return type='int' info='the number of byte written or -1 in case of error.'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ </function>
+ <function name='xmlSaveDoc' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</info>
+ <return type='long' info='the number of byte written or -1 in case of error'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document'/>
+ </function>
+ <function name='xmlSaveFile' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is &quot;-&quot; the stdout file is used.</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename (or URL)'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlSaveFileEnc' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document, converting it to the given encoding</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename (or URL)'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the name of an encoding (or NULL)'/>
+ </function>
+ <function name='xmlSaveFileTo' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='an output I/O buffer'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the encoding if any assuming the I/O layer handles the trancoding'/>
+ </function>
+ <function name='xmlSaveFlush' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Flush a document saving context, i.e. make sure that all bytes have been output.</info>
+ <return type='int' info='the number of byte written or -1 in case of error.'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ </function>
+ <function name='xmlSaveFormatFile' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is &quot;-&quot; the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='filename' type='const char *' info='the filename (or URL)'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='xmlSaveFormatFileEnc' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to a file or an URL.</info>
+ <return type='int' info='the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called'/>
+ <arg name='filename' type='const char *' info='the filename or URL to output'/>
+ <arg name='cur' type='xmlDocPtr' info='the document being saved'/>
+ <arg name='encoding' type='const char *' info='the name of the encoding to use or NULL.'/>
+ <arg name='format' type='int' info='should formatting spaces be added.'/>
+ </function>
+ <function name='xmlSaveFormatFileTo' file='tree' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</info>
+ <return type='int' info='the number of bytes written or -1 in case of failure.'/>
+ <arg name='buf' type='xmlOutputBufferPtr' info='an output I/O buffer'/>
+ <arg name='cur' type='xmlDocPtr' info='the document'/>
+ <arg name='encoding' type='const char *' info='the encoding if any assuming the I/O layer handles the trancoding'/>
+ <arg name='format' type='int' info='should formatting spaces been added'/>
+ </function>
+ <function name='xmlSaveSetAttrEscape' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Set a custom escaping function to be used for text in attribute content</info>
+ <return type='int' info='0 if successful or -1 in case of error.'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ <arg name='escape' type='xmlCharEncodingOutputFunc' info='the escaping function'/>
+ </function>
+ <function name='xmlSaveSetEscape' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Set a custom escaping function to be used for text in element content</info>
+ <return type='int' info='0 if successful or -1 in case of error.'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ <arg name='escape' type='xmlCharEncodingOutputFunc' info='the escaping function'/>
+ </function>
+ <function name='xmlSaveToBuffer' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a document saving context serializing to a buffer with the encoding and the options given</info>
+ <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/>
+ <arg name='buffer' type='xmlBufferPtr' info='a buffer'/>
+ <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/>
+ <arg name='options' type='int' info='a set of xmlSaveOptions'/>
+ </function>
+ <function name='xmlSaveToFd' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a document saving context serializing to a file descriptor with the encoding and the options given.</info>
+ <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/>
+ <arg name='fd' type='int' info='a file descriptor number'/>
+ <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/>
+ <arg name='options' type='int' info='a set of xmlSaveOptions'/>
+ </function>
+ <function name='xmlSaveToFilename' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.</info>
+ <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/>
+ <arg name='filename' type='const char *' info='a file name or an URL'/>
+ <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/>
+ <arg name='options' type='int' info='a set of xmlSaveOptions'/>
+ </function>
+ <function name='xmlSaveToIO' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Create a document saving context serializing to a file descriptor with the encoding and the options given</info>
+ <return type='xmlSaveCtxtPtr' info='a new serialization context or NULL in case of error.'/>
+ <arg name='iowrite' type='xmlOutputWriteCallback' info='an I/O write function'/>
+ <arg name='ioclose' type='xmlOutputCloseCallback' info='an I/O close function'/>
+ <arg name='ioctx' type='void *' info='an I/O handler'/>
+ <arg name='encoding' type='const char *' info='the encoding name to use or NULL'/>
+ <arg name='options' type='int' info='a set of xmlSaveOptions'/>
+ </function>
+ <function name='xmlSaveTree' file='xmlsave' module='xmlsave'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead</info>
+ <return type='long' info='the number of byte written or -1 in case of error'/>
+ <arg name='ctxt' type='xmlSaveCtxtPtr' info='a document saving context'/>
+ <arg name='node' type='xmlNodePtr' info='the top node of the subtree to save'/>
+ </function>
+ <function name='xmlSaveUri' file='uri' module='uri'>
+ <info>Save the URI as an escaped string</info>
+ <return type='xmlChar *' info='a new string (to be deallocated by caller)'/>
+ <arg name='uri' type='xmlURIPtr' info='pointer to an xmlURI'/>
+ </function>
+ <function name='xmlScanName' file='parserInternals' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Trickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of xmlParserHandleReference [4] NameChar ::= Letter | Digit | &apos;.&apos; | &apos;-&apos; | &apos;_&apos; | &apos;:&apos; | CombiningChar | Extender [5] Name ::= (Letter | &apos;_&apos; | &apos;:&apos;) (NameChar)* [6] Names ::= Name (S Name)*</info>
+ <return type='xmlChar *' info='the Name parsed or NULL'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlSchemaCheckFacet' file='xmlschemastypes' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Checks and computes the values of facets.</info>
+ <return type='int' info='0 if valid, a positive error code if not valid and -1 in case of an internal or API error.'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet'/>
+ <arg name='typeDecl' type='xmlSchemaTypePtr' info='the schema type definition'/>
+ <arg name='pctxt' type='xmlSchemaParserCtxtPtr' info='the schema parser context or NULL'/>
+ <arg name='name' type='const xmlChar *' info='the optional name of the type'/>
+ </function>
+ <function name='xmlSchemaCleanupTypes' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Cleanup the default XML Schemas type library</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlSchemaCollapseString' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Removes and normalize white spaces in the string</info>
+ <return type='xmlChar *' info='the new string or NULL if no change was required.'/>
+ <arg name='value' type='const xmlChar *' info='a value'/>
+ </function>
+ <function name='xmlSchemaCompareValues' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Compare 2 values</info>
+ <return type='int' info='-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error'/>
+ <arg name='x' type='xmlSchemaValPtr' info='a first value'/>
+ <arg name='y' type='xmlSchemaValPtr' info='a second value'/>
+ </function>
+ <function name='xmlSchemaCompareValuesWhtsp' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Compare 2 values</info>
+ <return type='int' info='-1 if x &lt; y, 0 if x == y, 1 if x &gt; y, 2 if x &lt;&gt; y, and -2 in case of error'/>
+ <arg name='x' type='xmlSchemaValPtr' info='a first value'/>
+ <arg name='xws' type='xmlSchemaWhitespaceValueType' info='the whitespace value of x'/>
+ <arg name='y' type='xmlSchemaValPtr' info='a second value'/>
+ <arg name='yws' type='xmlSchemaWhitespaceValueType' info='the whitespace value of y'/>
+ </function>
+ <function name='xmlSchemaCopyValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Copies the precomputed value. This duplicates any string within.</info>
+ <return type='xmlSchemaValPtr' info='the copy or NULL if a copy for a data-type is not implemented.'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value to be copied'/>
+ </function>
+ <function name='xmlSchemaDump' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Dump a Schema structure.</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the file output'/>
+ <arg name='schema' type='xmlSchemaPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlSchemaFree' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Deallocate a Schema structure.</info>
+ <return type='void'/>
+ <arg name='schema' type='xmlSchemaPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlSchemaFreeFacet' file='xmlschemastypes' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Deallocate a Schema Facet structure.</info>
+ <return type='void'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='a schema facet structure'/>
+ </function>
+ <function name='xmlSchemaFreeParserCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Free the resources associated to the schema parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='the schema parser context'/>
+ </function>
+ <function name='xmlSchemaFreeType' file='schemasInternals' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Deallocate a Schema Type structure.</info>
+ <return type='void'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='a schema type structure'/>
+ </function>
+ <function name='xmlSchemaFreeValidCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Free the resources associated to the schema validation context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/>
+ </function>
+ <function name='xmlSchemaFreeValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Cleanup the default XML Schemas type library</info>
+ <return type='void'/>
+ <arg name='value' type='xmlSchemaValPtr' info='the value to free'/>
+ </function>
+ <function name='xmlSchemaFreeWildcard' file='schemasInternals' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Deallocates a wildcard structure.</info>
+ <return type='void'/>
+ <arg name='wildcard' type='xmlSchemaWildcardPtr' info='a wildcard structure'/>
+ </function>
+ <function name='xmlSchemaGetBuiltInListSimpleTypeItemType' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Lookup function</info>
+ <return type='xmlSchemaTypePtr' info='the item type of @type as defined by the built-in datatype hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the built-in simple type.'/>
+ </function>
+ <function name='xmlSchemaGetBuiltInType' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Gives you the type struct for a built-in type by its type id.</info>
+ <return type='xmlSchemaTypePtr' info='the type if found, NULL otherwise.'/>
+ <arg name='type' type='xmlSchemaValType' info='the type of the built in type'/>
+ </function>
+ <function name='xmlSchemaGetCanonValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the canonical lexical representation of the value. The caller has to FREE the returned retValue. WARNING: Some value types are not supported yet, resulting in a @retValue of &quot;???&quot;. TODO: XML Schema 1.0 does not define canonical representations for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay, anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.</info>
+ <return type='int' info='0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ <arg name='retValue' type='const xmlChar **' info='the returned value'/>
+ </function>
+ <function name='xmlSchemaGetCanonValueWhtsp' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the canonical representation of the value. The caller has to free the returned @retValue.</info>
+ <return type='int' info='0 if the value could be built, 1 if the value type is not supported yet and -1 in case of API errors.'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ <arg name='retValue' type='const xmlChar **' info='the returned value'/>
+ <arg name='ws' type='xmlSchemaWhitespaceValueType' info='the whitespace type of the value'/>
+ </function>
+ <function name='xmlSchemaGetFacetValueAsULong' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Extract the value of a facet</info>
+ <return type='unsigned long' info='the value as a long'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='an schemas type facet'/>
+ </function>
+ <function name='xmlSchemaGetParserErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the callback information used to handle errors for a parser context</info>
+ <return type='int' info='-1 in case of failure, 0 otherwise'/>
+ <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a XMl-Schema parser context'/>
+ <arg name='err' type='xmlSchemaValidityErrorFunc *' info='the error callback result'/>
+ <arg name='warn' type='xmlSchemaValidityWarningFunc *' info='the warning callback result'/>
+ <arg name='ctx' type='void **' info='contextual data for the callbacks result'/>
+ </function>
+ <function name='xmlSchemaGetPredefinedType' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Lookup a type in the default XML Schemas type library</info>
+ <return type='xmlSchemaTypePtr' info='the type if found, NULL otherwise'/>
+ <arg name='name' type='const xmlChar *' info='the type name'/>
+ <arg name='ns' type='const xmlChar *' info='the URI of the namespace usually &quot;http://www.w3.org/2001/XMLSchema&quot;'/>
+ </function>
+ <function name='xmlSchemaGetValType' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Accessor for the type of a value</info>
+ <return type='xmlSchemaValType' info='the xmlSchemaValType of the value'/>
+ <arg name='val' type='xmlSchemaValPtr' info='a schemas value'/>
+ </function>
+ <function name='xmlSchemaGetValidErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the error and warning callback informations</info>
+ <return type='int' info='-1 in case of error and 0 otherwise'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a XML-Schema validation context'/>
+ <arg name='err' type='xmlSchemaValidityErrorFunc *' info='the error function result'/>
+ <arg name='warn' type='xmlSchemaValidityWarningFunc *' info='the warning function result'/>
+ <arg name='ctx' type='void **' info='the functions context result'/>
+ </function>
+ <function name='xmlSchemaInitTypes' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Initialize the default XML Schemas type library</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlSchemaIsBuiltInTypeFacet' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Evaluates if a specific facet can be used in conjunction with a type.</info>
+ <return type='int' info='1 if the facet can be used with the given built-in type, 0 otherwise and -1 in case the type is not a built-in type.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the built-in type'/>
+ <arg name='facetType' type='int' info='the facet type'/>
+ </function>
+ <function name='xmlSchemaIsValid' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check if any error was detected during validation.</info>
+ <return type='int' info='1 if valid so far, 0 if errors were detected, and -1 in case of internal error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/>
+ </function>
+ <function name='xmlSchemaNewDocParserCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML Schemas parse context for that document. NB. The document may be modified during the parsing process.</info>
+ <return type='xmlSchemaParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='a preparsed document tree'/>
+ </function>
+ <function name='xmlSchemaNewFacet' file='xmlschemastypes' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Allocate a new Facet structure.</info>
+ <return type='xmlSchemaFacetPtr' info='the newly allocated structure or NULL in case or error'/>
+ </function>
+ <function name='xmlSchemaNewMemParserCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file.</info>
+ <return type='xmlSchemaParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array containing the schemas'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlSchemaNewNOTATIONValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Allocate a new NOTATION value. The given values are consumed and freed with the struct.</info>
+ <return type='xmlSchemaValPtr' info='a pointer to the new value or NULL in case of error'/>
+ <arg name='name' type='const xmlChar *' info='the notation name'/>
+ <arg name='ns' type='const xmlChar *' info='the notation namespace name or NULL'/>
+ </function>
+ <function name='xmlSchemaNewParserCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML Schemas parse context for that file/resource expected to contain an XML Schemas file.</info>
+ <return type='xmlSchemaParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='URL' type='const char *' info='the location of the schema'/>
+ </function>
+ <function name='xmlSchemaNewQNameValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Allocate a new QName value. The given values are consumed and freed with the struct.</info>
+ <return type='xmlSchemaValPtr' info='a pointer to the new value or NULL in case of an error.'/>
+ <arg name='namespaceName' type='const xmlChar *' info='the namespace name'/>
+ <arg name='localName' type='const xmlChar *' info='the local name'/>
+ </function>
+ <function name='xmlSchemaNewStringValue' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Allocate a new simple type value. The type can be of XML_SCHEMAS_STRING. WARNING: This one is intended to be expanded for other string based types. We need this for anySimpleType as well. The given value is consumed and freed with the struct.</info>
+ <return type='xmlSchemaValPtr' info='a pointer to the new value or NULL in case of error'/>
+ <arg name='type' type='xmlSchemaValType' info='the value type'/>
+ <arg name='value' type='const xmlChar *' info='the value'/>
+ </function>
+ <function name='xmlSchemaNewValidCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Create an XML Schemas validation context based on the given schema.</info>
+ <return type='xmlSchemaValidCtxtPtr' info='the validation context or NULL in case of error'/>
+ <arg name='schema' type='xmlSchemaPtr' info='a precompiled XML Schemas'/>
+ </function>
+ <function name='xmlSchemaParse' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info>
+ <return type='xmlSchemaPtr' info='the internal XML Schema structure built from the resource or NULL in case of error'/>
+ <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema validation context'/>
+ </function>
+ <function name='xmlSchemaSAXPlug' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Plug a SAX based validation layer in a SAX parsing event flow. The original @saxptr and @dataptr data are replaced by new pointers but the calls to the original will be maintained.</info>
+ <return type='xmlSchemaSAXPlugPtr' info='a pointer to a data structure needed to unplug the validation layer or NULL in case of errors.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='sax' type='xmlSAXHandlerPtr *' info='a pointer to the original xmlSAXHandlerPtr'/>
+ <arg name='user_data' type='void **' info='a pointer to the original SAX user data pointer'/>
+ </function>
+ <function name='xmlSchemaSAXUnplug' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Unplug a SAX based validation layer in a SAX parsing event flow. The original pointers used in the call are restored.</info>
+ <return type='int' info='0 in case of success and -1 in case of failure.'/>
+ <arg name='plug' type='xmlSchemaSAXPlugPtr' info='a data structure returned by xmlSchemaSAXPlug'/>
+ </function>
+ <function name='xmlSchemaSetParserErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the callback functions used to handle errors for a validation context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema validation context'/>
+ <arg name='err' type='xmlSchemaValidityErrorFunc' info='the error callback'/>
+ <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning callback'/>
+ <arg name='ctx' type='void *' info='contextual data for the callbacks'/>
+ </function>
+ <function name='xmlSchemaSetParserStructuredErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the structured error callback</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaParserCtxtPtr' info='a schema parser context'/>
+ <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlSchemaSetValidErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the error and warning callback informations</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='err' type='xmlSchemaValidityErrorFunc' info='the error function'/>
+ <arg name='warn' type='xmlSchemaValidityWarningFunc' info='the warning function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlSchemaSetValidOptions' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Sets the options to be used during the validation.</info>
+ <return type='int' info='0 in case of success, -1 in case of an API error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='options' type='int' info='a combination of xmlSchemaValidOption'/>
+ </function>
+ <function name='xmlSchemaSetValidStructuredErrors' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Set the structured error callback</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlSchemaValPredefTypeNode' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the predefined type'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='val' type='xmlSchemaValPtr *' info='the return computed value'/>
+ <arg name='node' type='xmlNodePtr' info='the node containing the value'/>
+ </function>
+ <function name='xmlSchemaValPredefTypeNodeNoNorm' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val. This one does apply any normalization to the value.</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the predefined type'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='val' type='xmlSchemaValPtr *' info='the return computed value'/>
+ <arg name='node' type='xmlNodePtr' info='the node containing the value'/>
+ </function>
+ <function name='xmlSchemaValidCtxtGetOptions' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Get the validation context options.</info>
+ <return type='int' info='the option combination or -1 on error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ </function>
+ <function name='xmlSchemaValidCtxtGetParserCtxt' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>allow access to the parser context of the schema validation context</info>
+ <return type='xmlParserCtxtPtr' info='the parser context of the schema validation context or NULL in case of error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ </function>
+ <function name='xmlSchemaValidateDoc' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate a document tree in memory.</info>
+ <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a parsed document tree'/>
+ </function>
+ <function name='xmlSchemaValidateFacet' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check a value against a facet condition</info>
+ <return type='int' info='0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='base' type='xmlSchemaTypePtr' info='the base type'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet to check'/>
+ <arg name='value' type='const xmlChar *' info='the lexical repr of the value to validate'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ </function>
+ <function name='xmlSchemaValidateFacetWhtsp' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check a value against a facet condition. This takes value normalization according to the specified whitespace types into account. Note that @value needs to be the *normalized* value if the facet is of type &quot;pattern&quot;.</info>
+ <return type='int' info='0 if the element is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet to check'/>
+ <arg name='fws' type='xmlSchemaWhitespaceValueType' info='the whitespace type of the facet&apos;s value'/>
+ <arg name='valType' type='xmlSchemaValType' info='the built-in type of the value'/>
+ <arg name='value' type='const xmlChar *' info='the lexical (or normalized for pattern) repr of the value to validate'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ <arg name='ws' type='xmlSchemaWhitespaceValueType' info='the whitespace type of the value'/>
+ </function>
+ <function name='xmlSchemaValidateFile' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Do a schemas validation of the given resource, it will use the SAX streamable validation internally.</info>
+ <return type='int' info='0 if the document is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='filename' type='const char *' info='the URI of the instance'/>
+ <arg name='options' type='int' info='a future set of options, currently unused'/>
+ </function>
+ <function name='xmlSchemaValidateLengthFacet' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Checka a value against a &quot;length&quot;, &quot;minLength&quot; and &quot;maxLength&quot; facet; sets @length to the computed length of @value.</info>
+ <return type='int' info='0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the built-in type'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet to check'/>
+ <arg name='value' type='const xmlChar *' info='the lexical repr. of the value to be validated'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ <arg name='length' type='unsigned long *' info='the actual length of the value'/>
+ </function>
+ <function name='xmlSchemaValidateLengthFacetWhtsp' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Checka a value against a &quot;length&quot;, &quot;minLength&quot; and &quot;maxLength&quot; facet; sets @length to the computed length of @value.</info>
+ <return type='int' info='0 if the value is valid, a positive error code otherwise and -1 in case of an internal or API error.'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet to check'/>
+ <arg name='valType' type='xmlSchemaValType' info='the built-in type'/>
+ <arg name='value' type='const xmlChar *' info='the lexical repr. of the value to be validated'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the precomputed value'/>
+ <arg name='length' type='unsigned long *' info='the actual length of the value'/>
+ <arg name='ws' type='xmlSchemaWhitespaceValueType' info='the whitespace type of the value'/>
+ </function>
+ <function name='xmlSchemaValidateListSimpleTypeFacet' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Checks the value of a list simple type against a facet.</info>
+ <return type='int' info='0 if the value is valid, a positive error code number otherwise and -1 in case of an internal error.'/>
+ <arg name='facet' type='xmlSchemaFacetPtr' info='the facet to check'/>
+ <arg name='value' type='const xmlChar *' info='the lexical repr of the value to validate'/>
+ <arg name='actualLen' type='unsigned long' info='the number of list items'/>
+ <arg name='expectedLen' type='unsigned long *' info='the resulting expected number of list items'/>
+ </function>
+ <function name='xmlSchemaValidateOneElement' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate a branch of a tree, starting with the given @elem.</info>
+ <return type='int' info='0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='elem' type='xmlNodePtr' info='an element node'/>
+ </function>
+ <function name='xmlSchemaValidatePredefinedType' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of the predefined type. if true a value is computed and returned in @val.</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='type' type='xmlSchemaTypePtr' info='the predefined type'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='val' type='xmlSchemaValPtr *' info='the return computed value'/>
+ </function>
+ <function name='xmlSchemaValidateSetFilename' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Workaround to provide file error reporting information when this is not provided by current APIs</info>
+ <return type='void'/>
+ <arg name='vctxt' type='xmlSchemaValidCtxtPtr' info='the schema validation context'/>
+ <arg name='filename' type='const char *' info='the file name'/>
+ </function>
+ <function name='xmlSchemaValidateSetLocator' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.</info>
+ <return type='void'/>
+ <arg name='vctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='f' type='xmlSchemaValidityLocatorFunc' info='the locator function pointer'/>
+ <arg name='ctxt' type='void *' info='the locator context'/>
+ </function>
+ <function name='xmlSchemaValidateStream' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</info>
+ <return type='int' info='0 if the document is schemas valid, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='a schema validation context'/>
+ <arg name='input' type='xmlParserInputBufferPtr' info='the input to use for reading the data'/>
+ <arg name='enc' type='xmlCharEncoding' info='an optional encoding information'/>
+ <arg name='sax' type='xmlSAXHandlerPtr' info='a SAX handler for the resulting events'/>
+ <arg name='user_data' type='void *' info='the context to provide to the SAX handler.'/>
+ </function>
+ <functype name='xmlSchemaValidityErrorFunc' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Signature of an error callback from an XSD validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <functype name='xmlSchemaValidityLocatorFunc' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='ctx' type='void *' info='user provided context'/>
+ <arg name='file' type='const char **' info='returned file information'/>
+ <arg name='line' type='unsigned long *' info='returned line information'/>
+ </functype>
+ <functype name='xmlSchemaValidityWarningFunc' file='xmlschemas' module='xmlschemas'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Signature of a warning callback from an XSD validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <function name='xmlSchemaValueAppend' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Appends a next sibling to a list of computed values.</info>
+ <return type='int' info='0 if succeeded and -1 on API errors.'/>
+ <arg name='prev' type='xmlSchemaValPtr' info='the value'/>
+ <arg name='cur' type='xmlSchemaValPtr' info='the value to be appended'/>
+ </function>
+ <function name='xmlSchemaValueGetAsBoolean' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Accessor for the boolean value of a computed value.</info>
+ <return type='int' info='1 if true and 0 if false, or in case of an error. Hmm.'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the value'/>
+ </function>
+ <function name='xmlSchemaValueGetAsString' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Accessor for the string value of a computed value.</info>
+ <return type='const xmlChar *' info='the string value or NULL if there was none, or on API errors.'/>
+ <arg name='val' type='xmlSchemaValPtr' info='the value'/>
+ </function>
+ <function name='xmlSchemaValueGetNext' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Accessor for the next sibling of a list of computed values.</info>
+ <return type='xmlSchemaValPtr' info='the next value or NULL if there was none, or on API errors.'/>
+ <arg name='cur' type='xmlSchemaValPtr' info='the value'/>
+ </function>
+ <function name='xmlSchemaWhiteSpaceReplace' file='xmlschemastypes' module='xmlschemastypes'>
+ <cond>defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Replaces 0xd, 0x9 and 0xa with a space.</info>
+ <return type='xmlChar *' info='the new string or NULL if no change was required.'/>
+ <arg name='value' type='const xmlChar *' info='a value'/>
+ </function>
+ <function name='xmlSchematronFree' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Deallocate a Schematron structure.</info>
+ <return type='void'/>
+ <arg name='schema' type='xmlSchematronPtr' info='a schema structure'/>
+ </function>
+ <function name='xmlSchematronFreeParserCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Free the resources associated to the schema parser context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchematronParserCtxtPtr' info='the schema parser context'/>
+ </function>
+ <function name='xmlSchematronFreeValidCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Free the resources associated to the schema validation context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchematronValidCtxtPtr' info='the schema validation context'/>
+ </function>
+ <function name='xmlSchematronNewDocParserCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Create an XML Schematrons parse context for that document. NB. The document may be modified during the parsing process.</info>
+ <return type='xmlSchematronParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='doc' type='xmlDocPtr' info='a preparsed document tree'/>
+ </function>
+ <function name='xmlSchematronNewMemParserCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Create an XML Schematrons parse context for that memory buffer expected to contain an XML Schematrons file.</info>
+ <return type='xmlSchematronParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='buffer' type='const char *' info='a pointer to a char array containing the schemas'/>
+ <arg name='size' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlSchematronNewParserCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Create an XML Schematrons parse context for that file/resource expected to contain an XML Schematrons file.</info>
+ <return type='xmlSchematronParserCtxtPtr' info='the parser context or NULL in case of error'/>
+ <arg name='URL' type='const char *' info='the location of the schema'/>
+ </function>
+ <function name='xmlSchematronNewValidCtxt' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Create an XML Schematrons validation context based on the given schema.</info>
+ <return type='xmlSchematronValidCtxtPtr' info='the validation context or NULL in case of error'/>
+ <arg name='schema' type='xmlSchematronPtr' info='a precompiled XML Schematrons'/>
+ <arg name='options' type='int' info='a set of xmlSchematronValidOptions'/>
+ </function>
+ <function name='xmlSchematronParse' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>parse a schema definition resource and build an internal XML Shema struture which can be used to validate instances.</info>
+ <return type='xmlSchematronPtr' info='the internal XML Schematron structure built from the resource or NULL in case of error'/>
+ <arg name='ctxt' type='xmlSchematronParserCtxtPtr' info='a schema validation context'/>
+ </function>
+ <function name='xmlSchematronSetValidStructuredErrors' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Set the structured error callback</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlSchematronValidCtxtPtr' info='a Schematron validation context'/>
+ <arg name='serror' type='xmlStructuredErrorFunc' info='the structured error function'/>
+ <arg name='ctx' type='void *' info='the functions context'/>
+ </function>
+ <function name='xmlSchematronValidateDoc' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Validate a tree instance against the schematron</info>
+ <return type='int' info='0 in case of success, -1 in case of internal error and an error count otherwise.'/>
+ <arg name='ctxt' type='xmlSchematronValidCtxtPtr' info='the schema validation context'/>
+ <arg name='instance' type='xmlDocPtr' info='the document instace tree'/>
+ </function>
+ <functype name='xmlSchematronValidityErrorFunc' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Signature of an error callback from a Schematron validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <functype name='xmlSchematronValidityWarningFunc' file='schematron' module='schematron'>
+ <cond>defined(LIBXML_SCHEMATRON_ENABLED)</cond>
+ <info>Signature of a warning callback from a Schematron validation</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the validation context'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='...' type='...' info='extra arguments'/>
+ </functype>
+ <function name='xmlSearchNs' file='tree' module='tree'>
+ <info>Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don&apos;t allow to cross entities boundaries. If you don&apos;t declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.</info>
+ <return type='xmlNsPtr' info='the namespace pointer or NULL.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ <arg name='nameSpace' type='const xmlChar *' info='the namespace prefix'/>
+ </function>
+ <function name='xmlSearchNsByHref' file='tree' module='tree'>
+ <info>Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.</info>
+ <return type='xmlNsPtr' info='the namespace pointer or NULL.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='node' type='xmlNodePtr' info='the current node'/>
+ <arg name='href' type='const xmlChar *' info='the namespace value'/>
+ </function>
+ <function name='xmlSetBufferAllocationScheme' file='tree' module='tree'>
+ <info>Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance</info>
+ <return type='void'/>
+ <arg name='scheme' type='xmlBufferAllocationScheme' info='allocation method to use'/>
+ </function>
+ <function name='xmlSetCompressMode' file='tree' module='tree'>
+ <info>set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</info>
+ <return type='void'/>
+ <arg name='mode' type='int' info='the compression ratio'/>
+ </function>
+ <function name='xmlSetDocCompressMode' file='tree' module='tree'>
+ <info>set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</info>
+ <return type='void'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='mode' type='int' info='the compression ratio'/>
+ </function>
+ <function name='xmlSetEntityReferenceFunc' file='parserInternals' module='parser'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Set the function to call call back when a xml reference has been made</info>
+ <return type='void'/>
+ <arg name='func' type='xmlEntityReferenceFunc' info='A valid function'/>
+ </function>
+ <function name='xmlSetExternalEntityLoader' file='parser' module='xmlIO'>
+ <info>Changes the defaultexternal entity resolver function for the application</info>
+ <return type='void'/>
+ <arg name='f' type='xmlExternalEntityLoader' info='the new entity resolver function'/>
+ </function>
+ <function name='xmlSetFeature' file='parser' module='legacy'>
+ <cond>defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Change the current value of one feature of this parser instance</info>
+ <return type='int' info='-1 in case or error, 0 otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML/HTML parser context'/>
+ <arg name='name' type='const char *' info='the feature name'/>
+ <arg name='value' type='void *' info='pointer to the location of the new value'/>
+ </function>
+ <function name='xmlSetGenericErrorFunc' file='xmlerror' module='error'>
+ <info>Function to reset the handler and the error context for out of context error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler One can simply force messages to be emitted to another FILE * than stderr by setting @ctx to this file handle and @handler to NULL. For multi-threaded applications, this must be set separately for each thread.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the new error handling context'/>
+ <arg name='handler' type='xmlGenericErrorFunc' info='the new handler function'/>
+ </function>
+ <function name='xmlSetListDoc' file='tree' module='tree'>
+ <info>update all nodes in the list to point to the right document</info>
+ <return type='void'/>
+ <arg name='list' type='xmlNodePtr' info='the first element'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlSetNs' file='tree' module='tree'>
+ <info>Associate a namespace to a node, a posteriori.</info>
+ <return type='void'/>
+ <arg name='node' type='xmlNodePtr' info='a node in the document'/>
+ <arg name='ns' type='xmlNsPtr' info='a namespace pointer'/>
+ </function>
+ <function name='xmlSetNsProp' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked</info>
+ <return type='xmlAttrPtr' info='the attribute pointer.'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='ns' type='xmlNsPtr' info='the namespace definition'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value'/>
+ </function>
+ <function name='xmlSetProp' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Set (or reset) an attribute carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there&apos;s no such ns-binding for the prefix in scope.</info>
+ <return type='xmlAttrPtr' info='the attribute pointer.'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name (a QName)'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value'/>
+ </function>
+ <function name='xmlSetStructuredErrorFunc' file='xmlerror' module='error'>
+ <info>Function to reset the handler and the error context for out of context structured error messages. This simply means that @handler will be called for subsequent error messages while not parsing nor validating. And @ctx will be passed as first argument to @handler For multi-threaded applications, this must be set separately for each thread.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='the new error handling context'/>
+ <arg name='handler' type='xmlStructuredErrorFunc' info='the new handler function'/>
+ </function>
+ <function name='xmlSetTreeDoc' file='tree' module='tree'>
+ <info>update all nodes under the tree to point to the right document</info>
+ <return type='void'/>
+ <arg name='tree' type='xmlNodePtr' info='the top element'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ </function>
+ <function name='xmlSetupParserForBuffer' file='parser' module='parser'>
+ <cond>defined(LIBXML_SAX1_ENABLED)</cond>
+ <info>Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be NULL, but the filename parameter can be</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='buffer' type='const xmlChar *' info='a xmlChar * buffer'/>
+ <arg name='filename' type='const char *' info='a file name'/>
+ </function>
+ <function name='xmlShell' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell This allow to load, validate, view, modify and save a document using a environment similar to a UNIX commandline.</info>
+ <return type='void'/>
+ <arg name='doc' type='xmlDocPtr' info='the initial document'/>
+ <arg name='filename' type='char *' info='the output buffer'/>
+ <arg name='input' type='xmlShellReadlineFunc' info='the line reading function'/>
+ <arg name='output' type='FILE *' info='the output FILE*, defaults to stdout if NULL'/>
+ </function>
+ <function name='xmlShellBase' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;base&quot; dumps the current XML base of the node</info>
+ <return type='int' info='0'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='arg' type='char *' info='unused'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellCat' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;cat&quot; dumps the serialization node content (XML or HTML).</info>
+ <return type='int' info='0'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='arg' type='char *' info='unused'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <functype name='xmlShellCmd' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>This is a generic signature for the XML shell functions.</info>
+ <return type='int' info='an int, negative returns indicating errors.'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='a shell context'/>
+ <arg name='arg' type='char *' info='a string argument'/>
+ <arg name='node' type='xmlNodePtr' info='a first node'/>
+ <arg name='node2' type='xmlNodePtr' info='a second node'/>
+ </functype>
+ <function name='xmlShellDir' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;dir&quot; dumps informations about the node (namespace, attributes, content).</info>
+ <return type='int' info='0'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='arg' type='char *' info='unused'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellDu' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;du&quot; show the structure of the subtree under node @tree If @tree is null, the command works on the current node.</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='arg' type='char *' info='unused'/>
+ <arg name='tree' type='xmlNodePtr' info='a node defining a subtree'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellList' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;ls&quot; Does an Unix like listing of the given node (like a directory)</info>
+ <return type='int' info='0'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='arg' type='char *' info='unused'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellLoad' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;load&quot; loads a new document specified by the filename</info>
+ <return type='int' info='0 or -1 if loading failed'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='filename' type='char *' info='the file name'/>
+ <arg name='node' type='xmlNodePtr' info='unused'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellPrintNode' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Print node to the output FILE</info>
+ <return type='void'/>
+ <arg name='node' type='xmlNodePtr' info='a non-null node to print to the output FILE'/>
+ </function>
+ <function name='xmlShellPrintXPathError' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Print the xpath error to libxml default error channel</info>
+ <return type='void'/>
+ <arg name='errorType' type='int' info='valid xpath error id'/>
+ <arg name='arg' type='const char *' info='the argument that cause xpath to fail'/>
+ </function>
+ <function name='xmlShellPrintXPathResult' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Prints result to the output FILE</info>
+ <return type='void'/>
+ <arg name='list' type='xmlXPathObjectPtr' info='a valid result generated by an xpath evaluation'/>
+ </function>
+ <function name='xmlShellPwd' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;pwd&quot; Show the full path from the root to the node, if needed building thumblers when similar elements exists at a given ancestor level. The output is compatible with XPath commands.</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='buffer' type='char *' info='the output buffer'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <functype name='xmlShellReadlineFunc' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>This is a generic signature for the XML shell input function.</info>
+ <return type='char *' info='a string which will be freed by the Shell.'/>
+ <arg name='prompt' type='char *' info='a string prompt'/>
+ </functype>
+ <function name='xmlShellSave' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;save&quot; Write the current document to the filename, or it&apos;s original name</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='filename' type='char *' info='the file name (optional)'/>
+ <arg name='node' type='xmlNodePtr' info='unused'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellValidate' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;validate&quot; Validate the document, if a DTD path is provided, then the validation is done against the given DTD.</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='dtd' type='char *' info='the DTD URI (optional)'/>
+ <arg name='node' type='xmlNodePtr' info='unused'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlShellWrite' file='debugXML' module='debugXML'>
+ <cond>defined(LIBXML_DEBUG_ENABLED) &amp;&amp; defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Implements the XML shell function &quot;write&quot; Write the current node to the filename, it saves the serialization of the subtree under the @node specified</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='ctxt' type='xmlShellCtxtPtr' info='the shell context'/>
+ <arg name='filename' type='char *' info='the file name'/>
+ <arg name='node' type='xmlNodePtr' info='a node in the tree'/>
+ <arg name='node2' type='xmlNodePtr' info='unused'/>
+ </function>
+ <function name='xmlSkipBlankChars' file='parserInternals' module='parser'>
+ <info>skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point.</info>
+ <return type='int' info='the number of space chars skipped'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the XML parser context'/>
+ </function>
+ <function name='xmlSnprintfElementContent' file='valid' module='valid'>
+ <info>This will dump the content of the element content definition Intended just for the debug routine</info>
+ <return type='void'/>
+ <arg name='buf' type='char *' info='an output buffer'/>
+ <arg name='size' type='int' info='the buffer size'/>
+ <arg name='content' type='xmlElementContentPtr' info='An element table'/>
+ <arg name='englob' type='int' info='1 if one must print the englobing parenthesis, 0 otherwise'/>
+ </function>
+ <function name='xmlSplitQName' file='parserInternals' module='parser'>
+ <info>parse an UTF8 encoded XML qualified name string [NS 5] QName ::= (Prefix &apos;:&apos;)? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</info>
+ <return type='xmlChar *' info='the local part, and prefix is updated to get the Prefix if any.'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ <arg name='name' type='const xmlChar *' info='an XML parser context'/>
+ <arg name='prefix' type='xmlChar **' info='a xmlChar **'/>
+ </function>
+ <function name='xmlSplitQName2' file='tree' module='tree'>
+ <info>parse an XML qualified name string [NS 5] QName ::= (Prefix &apos;:&apos;)? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName</info>
+ <return type='xmlChar *' info='NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any.'/>
+ <arg name='name' type='const xmlChar *' info='the full QName'/>
+ <arg name='prefix' type='xmlChar **' info='a xmlChar **'/>
+ </function>
+ <function name='xmlSplitQName3' file='tree' module='tree'>
+ <info>parse an XML qualified name string,i</info>
+ <return type='const xmlChar *' info='NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix'/>
+ <arg name='name' type='const xmlChar *' info='the full QName'/>
+ <arg name='len' type='int *' info='an int *'/>
+ </function>
+ <function name='xmlSprintfElementContent' file='valid' module='valid'>
+ <cond>defined(LIBXML_OUTPUT_ENABLED)</cond>
+ <info>Deprecated, unsafe, use xmlSnprintfElementContent</info>
+ <return type='void'/>
+ <arg name='buf' type='char *' info='an output buffer'/>
+ <arg name='content' type='xmlElementContentPtr' info='An element table'/>
+ <arg name='englob' type='int' info='1 if one must print the englobing parenthesis, 0 otherwise'/>
+ </function>
+ <function name='xmlStopParser' file='parser' module='parser'>
+ <info>Blocks further parser processing</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='an XML parser context'/>
+ </function>
+ <function name='xmlStrEqual' file='xmlstring' module='xmlstring'>
+ <info>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</info>
+ <return type='int' info='1 if they are equal, 0 if they are different'/>
+ <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
+ <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
+ </function>
+ <function name='xmlStrPrintf' file='xmlstring' module='xmlstring'>
+ <info>Formats @msg and places result into @buf.</info>
+ <return type='int' info='the number of characters written to @buf or -1 if an error occurs.'/>
+ <arg name='buf' type='xmlChar *' info='the result buffer.'/>
+ <arg name='len' type='int' info='the result buffer length.'/>
+ <arg name='msg' type='const xmlChar *' info='the message with printf formatting.'/>
+ <arg name='...' type='...' info='extra parameters for the message.'/>
+ </function>
+ <function name='xmlStrQEqual' file='xmlstring' module='xmlstring'>
+ <info>Check if a QName is Equal to a given string</info>
+ <return type='int' info='1 if they are equal, 0 if they are different'/>
+ <arg name='pref' type='const xmlChar *' info='the prefix of the QName'/>
+ <arg name='name' type='const xmlChar *' info='the localname of the QName'/>
+ <arg name='str' type='const xmlChar *' info='the second xmlChar *'/>
+ </function>
+ <function name='xmlStrVPrintf' file='xmlstring' module='xmlstring'>
+ <info>Formats @msg and places result into @buf.</info>
+ <return type='int' info='the number of characters written to @buf or -1 if an error occurs.'/>
+ <arg name='buf' type='xmlChar *' info='the result buffer.'/>
+ <arg name='len' type='int' info='the result buffer length.'/>
+ <arg name='msg' type='const xmlChar *' info='the message with printf formatting.'/>
+ <arg name='ap' type='va_list' info='extra parameters for the message.'/>
+ </function>
+ <function name='xmlStrcasecmp' file='xmlstring' module='xmlstring'>
+ <info>a strcasecmp for xmlChar&apos;s</info>
+ <return type='int' info='the integer result of the comparison'/>
+ <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
+ <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
+ </function>
+ <function name='xmlStrcasestr' file='xmlstring' module='xmlstring'>
+ <info>a case-ignoring strstr for xmlChar&apos;s</info>
+ <return type='const xmlChar *' info='the xmlChar * for the first occurrence or NULL.'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar * array (haystack)'/>
+ <arg name='val' type='const xmlChar *' info='the xmlChar to search (needle)'/>
+ </function>
+ <function name='xmlStrcat' file='xmlstring' module='xmlstring'>
+ <info>a strcat for array of xmlChar&apos;s. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of &apos;0&apos;.</info>
+ <return type='xmlChar *' info='a new xmlChar * containing the concatenated string.'/>
+ <arg name='cur' type='xmlChar *' info='the original xmlChar * array'/>
+ <arg name='add' type='const xmlChar *' info='the xmlChar * array added'/>
+ </function>
+ <function name='xmlStrchr' file='xmlstring' module='xmlstring'>
+ <info>a strchr for xmlChar&apos;s</info>
+ <return type='const xmlChar *' info='the xmlChar * for the first occurrence or NULL.'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar * array'/>
+ <arg name='val' type='xmlChar' info='the xmlChar to search'/>
+ </function>
+ <function name='xmlStrcmp' file='xmlstring' module='xmlstring'>
+ <info>a strcmp for xmlChar&apos;s</info>
+ <return type='int' info='the integer result of the comparison'/>
+ <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
+ <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
+ </function>
+ <function name='xmlStrdup' file='xmlstring' module='xmlstring'>
+ <info>a strdup for array of xmlChar&apos;s. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of &apos;0&apos;.</info>
+ <return type='xmlChar *' info='a new xmlChar * or NULL'/>
+ <arg name='cur' type='const xmlChar *' info='the input xmlChar *'/>
+ </function>
+ <functype name='xmlStrdupFunc' file='xmlmemory' module='xmlmemory'>
+ <info>Signature for an strdup() implementation.</info>
+ <return type='char *' info='the copy of the string or NULL in case of error.'/>
+ <arg name='str' type='const char *' info='a zero terminated string'/>
+ </functype>
+ <function name='xmlStreamPop' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>push one level from the stream.</info>
+ <return type='int' info='-1 in case of error, 0 otherwise.'/>
+ <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+ </function>
+ <function name='xmlStreamPush' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an element-node.</info>
+ <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
+ <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+ <arg name='name' type='const xmlChar *' info='the current name'/>
+ <arg name='ns' type='const xmlChar *' info='the namespace name'/>
+ </function>
+ <function name='xmlStreamPushAttr' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Otherwise the function will act as if it has been given an attribute-node.</info>
+ <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
+ <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+ <arg name='name' type='const xmlChar *' info='the current name'/>
+ <arg name='ns' type='const xmlChar *' info='the namespace name'/>
+ </function>
+ <function name='xmlStreamPushNode' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Push new data onto the stream. NOTE: if the call xmlPatterncompile() indicated a dictionary, then strings for name and ns will be expected to come from the dictionary. Both @name and @ns being NULL means the / i.e. the root of the document. This can also act as a reset. Different from xmlStreamPush() this function can be fed with nodes of type: element-, attribute-, text-, cdata-section-, comment- and processing-instruction-node.</info>
+ <return type='int' info='-1 in case of error, 1 if the current state in the stream is a match and 0 otherwise.'/>
+ <arg name='stream' type='xmlStreamCtxtPtr' info='the stream context'/>
+ <arg name='name' type='const xmlChar *' info='the current name'/>
+ <arg name='ns' type='const xmlChar *' info='the namespace name'/>
+ <arg name='nodeType' type='int' info='the type of the node being pushed'/>
+ </function>
+ <function name='xmlStreamWantsAnyNode' file='pattern' module='pattern'>
+ <cond>defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>Query if the streaming pattern additionally needs to be fed with text-, cdata-section-, comment- and processing-instruction-nodes. If the result is 0 then only element-nodes and attribute-nodes need to be pushed.</info>
+ <return type='int' info='1 in case of need of nodes of the above described types, 0 otherwise. -1 on API errors.'/>
+ <arg name='streamCtxt' type='xmlStreamCtxtPtr' info='the stream context'/>
+ </function>
+ <function name='xmlStringCurrentChar' file='parserInternals' module='parserInternals'>
+ <info>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.</info>
+ <return type='int' info='the current char value and its length'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the XML parser context'/>
+ <arg name='cur' type='const xmlChar *' info='pointer to the beginning of the char'/>
+ <arg name='len' type='int *' info='pointer to the length of the char read'/>
+ </function>
+ <function name='xmlStringDecodeEntities' file='parserInternals' module='parser'>
+ <info>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= &apos;%&apos; Name &apos;;&apos;</info>
+ <return type='xmlChar *' info='A newly allocated string with the substitution done. The caller must deallocate it !'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='str' type='const xmlChar *' info='the input string'/>
+ <arg name='what' type='int' info='combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF'/>
+ <arg name='end' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end2' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end3' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ </function>
+ <function name='xmlStringGetNodeList' file='tree' module='tree'>
+ <info>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</info>
+ <return type='xmlNodePtr' info='a pointer to the first child'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='value' type='const xmlChar *' info='the value of the attribute'/>
+ </function>
+ <function name='xmlStringLenDecodeEntities' file='parserInternals' module='parser'>
+ <info>Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= &apos;%&apos; Name &apos;;&apos;</info>
+ <return type='xmlChar *' info='A newly allocated string with the substitution done. The caller must deallocate it !'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='str' type='const xmlChar *' info='the input string'/>
+ <arg name='len' type='int' info='the string length'/>
+ <arg name='what' type='int' info='combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF'/>
+ <arg name='end' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end2' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ <arg name='end3' type='xmlChar' info='an end marker xmlChar, 0 if none'/>
+ </function>
+ <function name='xmlStringLenGetNodeList' file='tree' module='tree'>
+ <info>Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.</info>
+ <return type='xmlNodePtr' info='a pointer to the first child'/>
+ <arg name='doc' type='const xmlDoc *' info='the document'/>
+ <arg name='value' type='const xmlChar *' info='the value of the text'/>
+ <arg name='len' type='int' info='the length of the string value'/>
+ </function>
+ <function name='xmlStrlen' file='xmlstring' module='xmlstring'>
+ <info>length of a xmlChar&apos;s string</info>
+ <return type='int' info='the number of xmlChar contained in the ARRAY.'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar * array'/>
+ </function>
+ <function name='xmlStrncasecmp' file='xmlstring' module='xmlstring'>
+ <info>a strncasecmp for xmlChar&apos;s</info>
+ <return type='int' info='the integer result of the comparison'/>
+ <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
+ <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
+ <arg name='len' type='int' info='the max comparison length'/>
+ </function>
+ <function name='xmlStrncat' file='xmlstring' module='xmlstring'>
+ <info>a strncat for array of xmlChar&apos;s, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</info>
+ <return type='xmlChar *' info='a new xmlChar *, the original @cur is reallocated if needed and should not be freed'/>
+ <arg name='cur' type='xmlChar *' info='the original xmlChar * array'/>
+ <arg name='add' type='const xmlChar *' info='the xmlChar * array added'/>
+ <arg name='len' type='int' info='the length of @add'/>
+ </function>
+ <function name='xmlStrncatNew' file='xmlstring' module='xmlstring'>
+ <info>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</info>
+ <return type='xmlChar *' info='a new xmlChar * or NULL'/>
+ <arg name='str1' type='const xmlChar *' info='first xmlChar string'/>
+ <arg name='str2' type='const xmlChar *' info='second xmlChar string'/>
+ <arg name='len' type='int' info='the len of @str2 or &lt; 0'/>
+ </function>
+ <function name='xmlStrncmp' file='xmlstring' module='xmlstring'>
+ <info>a strncmp for xmlChar&apos;s</info>
+ <return type='int' info='the integer result of the comparison'/>
+ <arg name='str1' type='const xmlChar *' info='the first xmlChar *'/>
+ <arg name='str2' type='const xmlChar *' info='the second xmlChar *'/>
+ <arg name='len' type='int' info='the max comparison length'/>
+ </function>
+ <function name='xmlStrndup' file='xmlstring' module='xmlstring'>
+ <info>a strndup for array of xmlChar&apos;s</info>
+ <return type='xmlChar *' info='a new xmlChar * or NULL'/>
+ <arg name='cur' type='const xmlChar *' info='the input xmlChar *'/>
+ <arg name='len' type='int' info='the len of @cur'/>
+ </function>
+ <function name='xmlStrstr' file='xmlstring' module='xmlstring'>
+ <info>a strstr for xmlChar&apos;s</info>
+ <return type='const xmlChar *' info='the xmlChar * for the first occurrence or NULL.'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar * array (haystack)'/>
+ <arg name='val' type='const xmlChar *' info='the xmlChar to search (needle)'/>
+ </function>
+ <function name='xmlStrsub' file='xmlstring' module='xmlstring'>
+ <info>Extract a substring of a given string</info>
+ <return type='xmlChar *' info='the xmlChar * for the first occurrence or NULL.'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar * array (haystack)'/>
+ <arg name='start' type='int' info='the index of the first char (zero based)'/>
+ <arg name='len' type='int' info='the length of the substring'/>
+ </function>
+ <functype name='xmlStructuredErrorFunc' file='xmlerror' module='xmlerror'>
+ <info>Signature of the function to use when there is an error and the module handles the new error reporting mechanism.</info>
+ <return type='void'/>
+ <arg name='userData' type='void *' info='user provided data for the error callback'/>
+ <arg name='error' type='xmlErrorPtr' info='the error being raised.'/>
+ </functype>
+ <function name='xmlSubstituteEntitiesDefault' file='parser' module='parserInternals'>
+ <info>Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.</info>
+ <return type='int' info='the last value for 0 for no substitution, 1 for substitution.'/>
+ <arg name='val' type='int' info='int 0 or 1'/>
+ </function>
+ <function name='xmlSwitchEncoding' file='parserInternals' module='parserInternals'>
+ <info>change the input functions when discovering the character encoding of a given entity.</info>
+ <return type='int' info='0 in case of success, -1 otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='enc' type='xmlCharEncoding' info='the encoding value (number)'/>
+ </function>
+ <function name='xmlSwitchInputEncoding' file='parserInternals' module='parserInternals'>
+ <info>change the input functions when discovering the character encoding of a given entity.</info>
+ <return type='int' info='0 in case of success, -1 otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='input' type='xmlParserInputPtr' info='the input stream'/>
+ <arg name='handler' type='xmlCharEncodingHandlerPtr' info='the encoding handler'/>
+ </function>
+ <function name='xmlSwitchToEncoding' file='parserInternals' module='parserInternals'>
+ <info>change the input functions when discovering the character encoding of a given entity.</info>
+ <return type='int' info='0 in case of success, -1 otherwise'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='handler' type='xmlCharEncodingHandlerPtr' info='the encoding handler'/>
+ </function>
+ <function name='xmlTextConcat' file='tree' module='tree'>
+ <info>Concat the given string at the end of the existing node content</info>
+ <return type='int' info='-1 in case of error, 0 otherwise'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='content' type='const xmlChar *' info='the content'/>
+ <arg name='len' type='int' info='@content length'/>
+ </function>
+ <function name='xmlTextMerge' file='tree' module='tree'>
+ <info>Merge two text nodes into one</info>
+ <return type='xmlNodePtr' info='the first text node augmented'/>
+ <arg name='first' type='xmlNodePtr' info='the first text node'/>
+ <arg name='second' type='xmlNodePtr' info='the second text node being merged'/>
+ </function>
+ <function name='xmlTextReaderAttributeCount' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the number of attributes of the current node</info>
+ <return type='int' info='0 i no attributes, -1 in case of error or the attribute count'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderBaseUri' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The base URI of the node.</info>
+ <return type='xmlChar *' info='the base URI or NULL if not available, if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderByteConsumed' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.</info>
+ <return type='long' info='the index in bytes from the beginning of the entity or -1 in case the index could not be computed.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ </function>
+ <function name='xmlTextReaderClose' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.</info>
+ <return type='int' info='0 or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstBaseUri' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The base URI of the node.</info>
+ <return type='const xmlChar *' info='the base URI or NULL if not available, the string will be deallocated with the reader'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstEncoding' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Determine the encoding of the document being read.</info>
+ <return type='const xmlChar *' info='a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstLocalName' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The local name of the node.</info>
+ <return type='const xmlChar *' info='the local name or NULL if not available, the string will be deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstName' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The qualified name of the node, equal to Prefix :LocalName.</info>
+ <return type='const xmlChar *' info='the local name or NULL if not available, the string is deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstNamespaceUri' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The URI defining the namespace associated with the node.</info>
+ <return type='const xmlChar *' info='the namespace URI or NULL if not available, the string will be deallocated with the reader'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstPrefix' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>A shorthand reference to the namespace associated with the node.</info>
+ <return type='const xmlChar *' info='the prefix or NULL if not available, the string is deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstString' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Get an interned string from the reader, allows for example to speedup string name comparisons</info>
+ <return type='const xmlChar *' info='an interned copy of the string or NULL in case of error. The string will be deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='str' type='const xmlChar *' info='the string to intern.'/>
+ </function>
+ <function name='xmlTextReaderConstValue' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the text value of the node if present</info>
+ <return type='const xmlChar *' info='the string or NULL if not available. The result will be deallocated on the next Read() operation.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstXmlLang' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The xml:lang scope within which the node resides.</info>
+ <return type='const xmlChar *' info='the xml:lang value or NULL if none exists.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderConstXmlVersion' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Determine the XML version of the document being read.</info>
+ <return type='const xmlChar *' info='a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderCurrentDoc' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished.</info>
+ <return type='xmlDocPtr' info='the xmlDocPtr or NULL in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderCurrentNode' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Hacking interface allowing to get the xmlNodePtr correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.</info>
+ <return type='xmlNodePtr' info='the xmlNodePtr or NULL in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderDepth' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The depth of the node in the tree.</info>
+ <return type='int' info='the depth or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <functype name='xmlTextReaderErrorFunc' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Signature of an error callback from a reader parser</info>
+ <return type='void'/>
+ <arg name='arg' type='void *' info='the user argument'/>
+ <arg name='msg' type='const char *' info='the message'/>
+ <arg name='severity' type='xmlParserSeverities' info='the severity of the error'/>
+ <arg name='locator' type='xmlTextReaderLocatorPtr' info='a locator indicating where the error occured'/>
+ </functype>
+ <function name='xmlTextReaderExpand' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call</info>
+ <return type='xmlNodePtr' info='a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderGetAttribute' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the value of the attribute with the specified qualified name.</info>
+ <return type='xmlChar *' info='a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='name' type='const xmlChar *' info='the qualified name of the attribute.'/>
+ </function>
+ <function name='xmlTextReaderGetAttributeNo' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the value of the attribute with the specified index relative to the containing element.</info>
+ <return type='xmlChar *' info='a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='no' type='int' info='the zero-based index of the attribute relative to the containing element'/>
+ </function>
+ <function name='xmlTextReaderGetAttributeNs' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the value of the specified attribute</info>
+ <return type='xmlChar *' info='a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='localName' type='const xmlChar *' info='the local name of the attribute.'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='the namespace URI of the attribute.'/>
+ </function>
+ <function name='xmlTextReaderGetErrorHandler' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Retrieve the error callback function and user argument.</info>
+ <return type='void'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='f' type='xmlTextReaderErrorFunc *' info='the callback function or NULL is no callback has been registered'/>
+ <arg name='arg' type='void **' info='a user argument'/>
+ </function>
+ <function name='xmlTextReaderGetParserColumnNumber' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provide the column number of the current parsing point.</info>
+ <return type='int' info='an int or 0 if not available'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the user data (XML reader context)'/>
+ </function>
+ <function name='xmlTextReaderGetParserLineNumber' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provide the line number of the current parsing point.</info>
+ <return type='int' info='an int or 0 if not available'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the user data (XML reader context)'/>
+ </function>
+ <function name='xmlTextReaderGetParserProp' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Read the parser internal property.</info>
+ <return type='int' info='the value, usually 0 or 1, or -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='prop' type='int' info='the xmlParserProperties to get'/>
+ </function>
+ <function name='xmlTextReaderGetRemainder' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what&apos;s left in reader-&gt;input, and there is an allocation problem. Best would be to rewrite it differently.</info>
+ <return type='xmlParserInputBufferPtr' info='the xmlParserInputBufferPtr attached to the XML or NULL in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderHasAttributes' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Whether the node has attributes.</info>
+ <return type='int' info='1 if true, 0 if false, and -1 in case or error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderHasValue' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Whether the node can have a text value.</info>
+ <return type='int' info='1 if true, 0 if false, and -1 in case or error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderIsDefault' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Whether an Attribute node was generated from the default value defined in the DTD or schema.</info>
+ <return type='int' info='0 if not defaulted, 1 if defaulted, and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderIsEmptyElement' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Check if the current node is empty</info>
+ <return type='int' info='1 if empty, 0 if not and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderIsNamespaceDecl' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Determine whether the current node is a namespace declaration rather than a regular attribute.</info>
+ <return type='int' info='1 if the current node is a namespace declaration, 0 if it is a regular attribute or other type of node, or -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderIsValid' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Retrieve the validity status from the parser context</info>
+ <return type='int' info='the flag value 1 if valid, 0 if no, and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderLocalName' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The local name of the node.</info>
+ <return type='xmlChar *' info='the local name or NULL if not available, if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderLocatorBaseURI' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Obtain the base URI for the given locator.</info>
+ <return type='xmlChar *' info='the base URI or NULL in case of error, if non NULL it need to be freed by the caller.'/>
+ <arg name='locator' type='xmlTextReaderLocatorPtr' info='the xmlTextReaderLocatorPtr used'/>
+ </function>
+ <function name='xmlTextReaderLocatorLineNumber' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Obtain the line number for the given locator.</info>
+ <return type='int' info='the line number or -1 in case of error.'/>
+ <arg name='locator' type='xmlTextReaderLocatorPtr' info='the xmlTextReaderLocatorPtr used'/>
+ </function>
+ <function name='xmlTextReaderLookupNamespace' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Resolves a namespace prefix in the scope of the current element.</info>
+ <return type='xmlChar *' info='a string containing the namespace URI to which the prefix maps or NULL in case of error. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='prefix' type='const xmlChar *' info='the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL'/>
+ </function>
+ <function name='xmlTextReaderMoveToAttribute' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the attribute with the specified qualified name.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not found'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='name' type='const xmlChar *' info='the qualified name of the attribute.'/>
+ </function>
+ <function name='xmlTextReaderMoveToAttributeNo' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the attribute with the specified index relative to the containing element.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not found'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='no' type='int' info='the zero-based index of the attribute relative to the containing element.'/>
+ </function>
+ <function name='xmlTextReaderMoveToAttributeNs' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the attribute with the specified local name and namespace URI.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not found'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='localName' type='const xmlChar *' info='the local name of the attribute.'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='the namespace URI of the attribute.'/>
+ </function>
+ <function name='xmlTextReaderMoveToElement' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the node that contains the current Attribute node.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not moved'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderMoveToFirstAttribute' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the first attribute associated with the current node.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not found'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderMoveToNextAttribute' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the next attribute associated with the current node.</info>
+ <return type='int' info='1 in case of success, -1 in case of error, 0 if not found'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderName' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The qualified name of the node, equal to Prefix :LocalName.</info>
+ <return type='xmlChar *' info='the local name or NULL if not available, if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderNamespaceUri' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The URI defining the namespace associated with the node.</info>
+ <return type='xmlChar *' info='the namespace URI or NULL if not available, if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderNext' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Skip to the node following the current one in document order while avoiding the subtree if any.</info>
+ <return type='int' info='1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderNextSibling' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document</info>
+ <return type='int' info='1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderNodeType' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html</info>
+ <return type='int' info='the xmlNodeType of the current node or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderNormalization' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The value indicating whether to normalize white space and attribute values. Since attribute value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like &amp;#0; is of course not supported either.</info>
+ <return type='int' info='1 or -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderPrefix' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>A shorthand reference to the namespace associated with the node.</info>
+ <return type='xmlChar *' info='the prefix or NULL if not available, if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderPreserve' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</info>
+ <return type='xmlNodePtr' info='the xmlNodePtr or NULL in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderPreservePattern' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_PATTERN_ENABLED)</cond>
+ <info>This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished</info>
+ <return type='int' info='a positive number in case of success and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='pattern' type='const xmlChar *' info='an XPath subset pattern'/>
+ <arg name='namespaces' type='const xmlChar **' info='the prefix definitions, array of [URI, prefix] or NULL'/>
+ </function>
+ <function name='xmlTextReaderQuoteChar' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The quotation mark character used to enclose the value of an attribute.</info>
+ <return type='int' info='&quot; or &apos; and -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderRead' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Moves the position of the current instance to the next node in the stream, exposing its properties.</info>
+ <return type='int' info='1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadAttributeValue' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Parses an attribute value into one or more Text and EntityReference nodes.</info>
+ <return type='int' info='1 in case of success, 0 if the reader was not positionned on an ttribute node or all the attribute values have been read, or -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadInnerXml' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Reads the contents of the current node, including child nodes and markup.</info>
+ <return type='xmlChar *' info='a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadOuterXml' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Reads the contents of the current node, including child nodes and markup.</info>
+ <return type='xmlChar *' info='a string containing the node and any XML content, or NULL if the current node cannot be serialized. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadState' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Gets the read state of the reader.</info>
+ <return type='int' info='the state value, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadString' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Reads the contents of an element or a text node as a string.</info>
+ <return type='xmlChar *' info='a string containing the contents of the Element or Text node, or NULL if the reader is positioned on any other type of node. The string must be deallocated by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderRelaxNGSetSchema' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then RelaxNG validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</info>
+ <return type='int' info='0 in case the RelaxNG validation could be (des)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='schema' type='xmlRelaxNGPtr' info='a precompiled RelaxNG schema'/>
+ </function>
+ <function name='xmlTextReaderRelaxNGValidate' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use RelaxNG schema to validate the document as it is processed. Activation is only possible before the first Read(). If @rng is NULL, then RelaxNG schema validation is deactivated.</info>
+ <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='rng' type='const char *' info='the path to a RelaxNG schema or NULL'/>
+ </function>
+ <function name='xmlTextReaderRelaxNGValidateCtxt' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then RelaxNG schema validation is deactivated.</info>
+ <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='ctxt' type='xmlRelaxNGValidCtxtPtr' info='the RelaxNG schema validation context or NULL'/>
+ <arg name='options' type='int' info='options (not used yet)'/>
+ </function>
+ <function name='xmlTextReaderSchemaValidate' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.</info>
+ <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='xsd' type='const char *' info='the path to a W3C XSD schema or NULL'/>
+ </function>
+ <function name='xmlTextReaderSchemaValidateCtxt' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.</info>
+ <return type='int' info='0 in case the schemas validation could be (de)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='ctxt' type='xmlSchemaValidCtxtPtr' info='the XML Schema validation context or NULL'/>
+ <arg name='options' type='int' info='options (not used yet)'/>
+ </function>
+ <function name='xmlTextReaderSetErrorHandler' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</info>
+ <return type='void'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='f' type='xmlTextReaderErrorFunc' info='the callback function to call on error and warnings'/>
+ <arg name='arg' type='void *' info='a user argument to pass to the callback function'/>
+ </function>
+ <function name='xmlTextReaderSetParserProp' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.</info>
+ <return type='int' info='0 if the call was successful, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='prop' type='int' info='the xmlParserProperties to set'/>
+ <arg name='value' type='int' info='usually 0 or 1 to (de)activate it'/>
+ </function>
+ <function name='xmlTextReaderSetSchema' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED) &amp;&amp; defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then Schema validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.</info>
+ <return type='int' info='0 in case the Schema validation could be (des)activated and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='schema' type='xmlSchemaPtr' info='a precompiled Schema schema'/>
+ </function>
+ <function name='xmlTextReaderSetStructuredErrorHandler' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.</info>
+ <return type='void'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ <arg name='f' type='xmlStructuredErrorFunc' info='the callback function to call on error and warnings'/>
+ <arg name='arg' type='void *' info='a user argument to pass to the callback function'/>
+ </function>
+ <function name='xmlTextReaderSetup' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Setup an XML reader with new options</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='an XML reader'/>
+ <arg name='input' type='xmlParserInputBufferPtr' info='xmlParserInputBufferPtr used to feed the reader, will be destroyed with it.'/>
+ <arg name='URL' type='const char *' info='the base URL to use for the document'/>
+ <arg name='encoding' type='const char *' info='the document encoding, or NULL'/>
+ <arg name='options' type='int' info='a combination of xmlParserOption'/>
+ </function>
+ <function name='xmlTextReaderStandalone' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Determine the standalone status of the document being read.</info>
+ <return type='int' info='1 if the document was declared to be standalone, 0 if it was declared to be not standalone, or -1 if the document did not specify its standalone status or in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderValue' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>Provides the text value of the node if present</info>
+ <return type='xmlChar *' info='the string or NULL if not available. The result must be deallocated with xmlFree()'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderXmlLang' file='xmlreader' module='xmlreader'>
+ <cond>defined(LIBXML_READER_ENABLED)</cond>
+ <info>The xml:lang scope within which the node resides.</info>
+ <return type='xmlChar *' info='the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextWriterEndAttribute' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End the current xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndCDATA' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml CDATA section.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndComment' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End the current xml coment.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndDTD' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml DTD.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndDTDAttlist' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml DTD attribute list.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndDTDElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml DTD element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndDTDEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml DTD entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndDocument' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End an xml document. All open elements are closed, and the content is flushed to the output.</info>
+ <return type='int' info='the bytes written or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End the current xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterEndPI' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End the current xml PI.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterFlush' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Flush the output buffer.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterFullEndElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>End the current xml element. Writes an end tag even if the element is empty</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterSetIndent' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Set indentation output. indent = 0 do not indentation. indent &gt; 0 do indentation.</info>
+ <return type='int' info='-1 on error or 0 otherwise.'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='indent' type='int' info='do indentation?'/>
+ </function>
+ <function name='xmlTextWriterSetIndentString' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Set string indentation.</info>
+ <return type='int' info='-1 on error or 0 otherwise.'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='str' type='const xmlChar *' info='the xmlChar string'/>
+ </function>
+ <function name='xmlTextWriterSetQuoteChar' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Set the character used for quoting attributes.</info>
+ <return type='int' info='-1 on error or 0 otherwise.'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='quotechar' type='xmlChar' info='the quote character'/>
+ </function>
+ <function name='xmlTextWriterStartAttribute' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml attribute.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='element name'/>
+ </function>
+ <function name='xmlTextWriterStartAttributeNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml attribute with namespace support.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix or NULL'/>
+ <arg name='name' type='const xmlChar *' info='element local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI or NULL'/>
+ </function>
+ <function name='xmlTextWriterStartCDATA' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml CDATA section.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterStartComment' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml comment.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ </function>
+ <function name='xmlTextWriterStartDTD' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml DTD.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ </function>
+ <function name='xmlTextWriterStartDTDAttlist' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml DTD ATTLIST.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD ATTLIST'/>
+ </function>
+ <function name='xmlTextWriterStartDTDElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml DTD element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD element'/>
+ </function>
+ <function name='xmlTextWriterStartDTDEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml DTD ATTLIST.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD ATTLIST'/>
+ </function>
+ <function name='xmlTextWriterStartDocument' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start a new xml document</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='version' type='const char *' info='the xml version (&quot;1.0&quot;) or NULL for default (&quot;1.0&quot;)'/>
+ <arg name='encoding' type='const char *' info='the encoding or NULL for default'/>
+ <arg name='standalone' type='const char *' info='&quot;yes&quot; or &quot;no&quot; or NULL for default'/>
+ </function>
+ <function name='xmlTextWriterStartElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='element name'/>
+ </function>
+ <function name='xmlTextWriterStartElementNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml element with namespace support.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix or NULL'/>
+ <arg name='name' type='const xmlChar *' info='element local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI or NULL'/>
+ </function>
+ <function name='xmlTextWriterStartPI' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Start an xml PI.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='target' type='const xmlChar *' info='PI target'/>
+ </function>
+ <function name='xmlTextWriterWriteAttribute' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml attribute.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='attribute name'/>
+ <arg name='content' type='const xmlChar *' info='attribute content'/>
+ </function>
+ <function name='xmlTextWriterWriteAttributeNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml attribute.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='attribute local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='content' type='const xmlChar *' info='attribute content'/>
+ </function>
+ <function name='xmlTextWriterWriteBase64' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an base64 encoded xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='data' type='const char *' info='binary data'/>
+ <arg name='start' type='int' info='the position within the data of the first byte to encode'/>
+ <arg name='len' type='int' info='the number of bytes to encode'/>
+ </function>
+ <function name='xmlTextWriterWriteBinHex' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a BinHex encoded xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='data' type='const char *' info='binary data'/>
+ <arg name='start' type='int' info='the position within the data of the first byte to encode'/>
+ <arg name='len' type='int' info='the number of bytes to encode'/>
+ </function>
+ <function name='xmlTextWriterWriteCDATA' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml CDATA.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='content' type='const xmlChar *' info='CDATA content'/>
+ </function>
+ <function name='xmlTextWriterWriteComment' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml comment.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='content' type='const xmlChar *' info='comment string'/>
+ </function>
+ <function name='xmlTextWriterWriteDTD' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='subset' type='const xmlChar *' info='string content of the DTD'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDAttlist' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD ATTLIST.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD ATTLIST'/>
+ <arg name='content' type='const xmlChar *' info='content of the ATTLIST'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD element'/>
+ <arg name='content' type='const xmlChar *' info='content of the element'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD entity'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='ndataid' type='const xmlChar *' info='the xml notation name.'/>
+ <arg name='content' type='const xmlChar *' info='content of the entity'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDExternalEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD external entity. The entity must have been started with xmlTextWriterStartDTDEntity</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD entity'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='ndataid' type='const xmlChar *' info='the xml notation name.'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDExternalEntityContents' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write the contents of a DTD external entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='ndataid' type='const xmlChar *' info='the xml notation name.'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDInternalEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD internal entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD entity'/>
+ <arg name='content' type='const xmlChar *' info='content of the entity'/>
+ </function>
+ <function name='xmlTextWriterWriteDTDNotation' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the xml notation'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ </function>
+ <function name='xmlTextWriterWriteElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='element name'/>
+ <arg name='content' type='const xmlChar *' info='element content'/>
+ </function>
+ <function name='xmlTextWriterWriteElementNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml element with namespace support.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='element local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='content' type='const xmlChar *' info='element content'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatAttribute' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml attribute.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='attribute name'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatAttributeNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml attribute.with namespace support</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='attribute local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatCDATA' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml CDATA.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatComment' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml comment.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatDTD' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD with a formatted markup declarations part.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatDTDAttlist' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD ATTLIST.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD ATTLIST'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatDTDElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD element'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatDTDInternalEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD internal entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD entity'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='element name'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatElementNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml element with namespace support.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='element local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatPI' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted PI.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='target' type='const xmlChar *' info='PI target'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatRaw' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted raw xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWriteFormatString' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='...' type='...' info='extra parameters for the format'/>
+ </function>
+ <function name='xmlTextWriterWritePI' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml PI.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='target' type='const xmlChar *' info='PI target'/>
+ <arg name='content' type='const xmlChar *' info='PI content'/>
+ </function>
+ <function name='xmlTextWriterWriteRaw' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a raw xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='content' type='const xmlChar *' info='text string'/>
+ </function>
+ <function name='xmlTextWriterWriteRawLen' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml text. TODO: what about entities and special chars??</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='content' type='const xmlChar *' info='text string'/>
+ <arg name='len' type='int' info='length of the text string'/>
+ </function>
+ <function name='xmlTextWriterWriteString' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='content' type='const xmlChar *' info='text string'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatAttribute' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml attribute.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='attribute name'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatAttributeNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml attribute.with namespace support</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='attribute local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatCDATA' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml CDATA.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatComment' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write an xml comment.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatDTD' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a DTD with a formatted markup declarations part.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD'/>
+ <arg name='pubid' type='const xmlChar *' info='the public identifier, which is an alternative to the system identifier'/>
+ <arg name='sysid' type='const xmlChar *' info='the system identifier, which is the URI of the DTD'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatDTDAttlist' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD ATTLIST.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD ATTLIST'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatDTDElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD element'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatDTDInternalEntity' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted DTD internal entity.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='pe' type='int' info='TRUE if this is a parameter entity, FALSE if not'/>
+ <arg name='name' type='const xmlChar *' info='the name of the DTD entity'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatElement' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml element.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='name' type='const xmlChar *' info='element name'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatElementNS' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml element with namespace support.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='prefix' type='const xmlChar *' info='namespace prefix'/>
+ <arg name='name' type='const xmlChar *' info='element local name'/>
+ <arg name='namespaceURI' type='const xmlChar *' info='namespace URI'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatPI' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml PI.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='target' type='const xmlChar *' info='PI target'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatRaw' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted raw xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlTextWriterWriteVFormatString' file='xmlwriter' module='xmlwriter'>
+ <cond>defined(LIBXML_WRITER_ENABLED)</cond>
+ <info>Write a formatted xml text.</info>
+ <return type='int' info='the bytes written (may be 0 because of buffering) or -1 in case of error'/>
+ <arg name='writer' type='xmlTextWriterPtr' info='the xmlTextWriterPtr'/>
+ <arg name='format' type='const char *' info='format string (see printf)'/>
+ <arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
+ </function>
+ <function name='xmlThrDefBufferAllocScheme' file='globals' module='globals'>
+ <info></info>
+ <return type='xmlBufferAllocationScheme' info=''/>
+ <arg name='v' type='xmlBufferAllocationScheme' info=''/>
+ </function>
+ <function name='xmlThrDefDefaultBufferSize' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefDeregisterNodeDefault' file='globals' module='globals'>
+ <info></info>
+ <return type='xmlDeregisterNodeFunc' info=''/>
+ <arg name='func' type='xmlDeregisterNodeFunc' info=''/>
+ </function>
+ <function name='xmlThrDefDoValidityCheckingDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefGetWarningsDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefIndentTreeOutput' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefKeepBlanksDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefLineNumbersDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefLoadExtDtdDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefOutputBufferCreateFilenameDefault' file='globals' module='globals'>
+ <info></info>
+ <return type='xmlOutputBufferCreateFilenameFunc' info=''/>
+ <arg name='func' type='xmlOutputBufferCreateFilenameFunc' info=''/>
+ </function>
+ <function name='xmlThrDefParserDebugEntities' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefParserInputBufferCreateFilenameDefault' file='globals' module='globals'>
+ <info></info>
+ <return type='xmlParserInputBufferCreateFilenameFunc' info=''/>
+ <arg name='func' type='xmlParserInputBufferCreateFilenameFunc' info=''/>
+ </function>
+ <function name='xmlThrDefPedanticParserDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefRegisterNodeDefault' file='globals' module='globals'>
+ <info></info>
+ <return type='xmlRegisterNodeFunc' info=''/>
+ <arg name='func' type='xmlRegisterNodeFunc' info=''/>
+ </function>
+ <function name='xmlThrDefSaveNoEmptyTags' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefSetGenericErrorFunc' file='globals' module='globals'>
+ <info></info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info=''/>
+ <arg name='handler' type='xmlGenericErrorFunc' info=''/>
+ </function>
+ <function name='xmlThrDefSetStructuredErrorFunc' file='globals' module='globals'>
+ <info></info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info=''/>
+ <arg name='handler' type='xmlStructuredErrorFunc' info=''/>
+ </function>
+ <function name='xmlThrDefSubstituteEntitiesDefaultValue' file='globals' module='globals'>
+ <info></info>
+ <return type='int' info=''/>
+ <arg name='v' type='int' info=''/>
+ </function>
+ <function name='xmlThrDefTreeIndentString' file='globals' module='globals'>
+ <info></info>
+ <return type='const char *' info=''/>
+ <arg name='v' type='const char *' info=''/>
+ </function>
+ <function name='xmlUCSIsAegeanNumbers' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of AegeanNumbers UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsAlphabeticPresentationForms' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of AlphabeticPresentationForms UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsArabic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Arabic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsArabicPresentationFormsA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of ArabicPresentationForms-A UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsArabicPresentationFormsB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of ArabicPresentationForms-B UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsArmenian' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Armenian UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsArrows' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Arrows UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBasicLatin' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of BasicLatin UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBengali' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Bengali UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBlock' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of the UCS Block</info>
+ <return type='int' info='1 if true, 0 if false and -1 on unknown block'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ <arg name='block' type='const char *' info='UCS block name'/>
+ </function>
+ <function name='xmlUCSIsBlockElements' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of BlockElements UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBopomofo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Bopomofo UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBopomofoExtended' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of BopomofoExtended UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBoxDrawing' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of BoxDrawing UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBraillePatterns' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of BraillePatterns UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsBuhid' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Buhid UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsByzantineMusicalSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of ByzantineMusicalSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKCompatibility' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKCompatibility UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKCompatibilityForms' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKCompatibilityForms UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKCompatibilityIdeographs' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKCompatibilityIdeographs UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKCompatibilityIdeographsSupplement' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKRadicalsSupplement' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKRadicalsSupplement UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKSymbolsandPunctuation' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKSymbolsandPunctuation UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKUnifiedIdeographs' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKUnifiedIdeographs UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKUnifiedIdeographsExtensionA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCJKUnifiedIdeographsExtensionB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCat' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of the UCS Category</info>
+ <return type='int' info='1 if true, 0 if false and -1 on unknown category'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ <arg name='cat' type='const char *' info='UCS Category name'/>
+ </function>
+ <function name='xmlUCSIsCatC' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of C UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatCc' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Cc UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatCf' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Cf UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatCo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Co UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatCs' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Cs UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatL' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of L UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatLl' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Ll UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatLm' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Lm UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatLo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Lo UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatLt' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Lt UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatLu' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Lu UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatM' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of M UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatMc' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Mc UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatMe' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Me UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatMn' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Mn UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatN' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of N UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatNd' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Nd UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatNl' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Nl UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatNo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of No UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatP' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of P UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPc' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Pc UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPd' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Pd UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPe' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Pe UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPf' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Pf UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPi' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Pi UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Po UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatPs' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Ps UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatS' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of S UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatSc' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Sc UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatSk' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Sk UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatSm' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Sm UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatSo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of So UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatZ' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Z UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatZl' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Zl UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatZp' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Zp UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCatZs' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Zs UCS Category</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCherokee' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Cherokee UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCombiningDiacriticalMarks' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CombiningDiacriticalMarks UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCombiningDiacriticalMarksforSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCombiningHalfMarks' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CombiningHalfMarks UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCombiningMarksforSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CombiningMarksforSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsControlPictures' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of ControlPictures UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCurrencySymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CurrencySymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCypriotSyllabary' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CypriotSyllabary UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCyrillic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Cyrillic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsCyrillicSupplement' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of CyrillicSupplement UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsDeseret' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Deseret UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsDevanagari' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Devanagari UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsDingbats' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Dingbats UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsEnclosedAlphanumerics' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of EnclosedAlphanumerics UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsEnclosedCJKLettersandMonths' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of EnclosedCJKLettersandMonths UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsEthiopic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Ethiopic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGeneralPunctuation' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of GeneralPunctuation UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGeometricShapes' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of GeometricShapes UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGeorgian' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Georgian UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGothic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Gothic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGreek' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Greek UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGreekExtended' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of GreekExtended UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGreekandCoptic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of GreekandCoptic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGujarati' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Gujarati UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsGurmukhi' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Gurmukhi UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHalfwidthandFullwidthForms' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HalfwidthandFullwidthForms UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHangulCompatibilityJamo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HangulCompatibilityJamo UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHangulJamo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HangulJamo UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHangulSyllables' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HangulSyllables UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHanunoo' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Hanunoo UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHebrew' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Hebrew UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHighPrivateUseSurrogates' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HighPrivateUseSurrogates UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHighSurrogates' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of HighSurrogates UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsHiragana' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Hiragana UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsIPAExtensions' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of IPAExtensions UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsIdeographicDescriptionCharacters' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of IdeographicDescriptionCharacters UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKanbun' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Kanbun UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKangxiRadicals' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of KangxiRadicals UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKannada' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Kannada UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKatakana' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Katakana UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKatakanaPhoneticExtensions' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of KatakanaPhoneticExtensions UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKhmer' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Khmer UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsKhmerSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of KhmerSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLao' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Lao UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLatin1Supplement' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Latin-1Supplement UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLatinExtendedA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LatinExtended-A UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLatinExtendedAdditional' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LatinExtendedAdditional UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLatinExtendedB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LatinExtended-B UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLetterlikeSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LetterlikeSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLimbu' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Limbu UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLinearBIdeograms' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LinearBIdeograms UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLinearBSyllabary' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LinearBSyllabary UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsLowSurrogates' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of LowSurrogates UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMalayalam' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Malayalam UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMathematicalAlphanumericSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MathematicalAlphanumericSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMathematicalOperators' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MathematicalOperators UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMiscellaneousMathematicalSymbolsA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMiscellaneousMathematicalSymbolsB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMiscellaneousSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MiscellaneousSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMiscellaneousSymbolsandArrows' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMiscellaneousTechnical' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MiscellaneousTechnical UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMongolian' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Mongolian UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMusicalSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of MusicalSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsMyanmar' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Myanmar UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsNumberForms' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of NumberForms UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsOgham' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Ogham UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsOldItalic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of OldItalic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsOpticalCharacterRecognition' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of OpticalCharacterRecognition UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsOriya' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Oriya UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsOsmanya' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Osmanya UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsPhoneticExtensions' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of PhoneticExtensions UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsPrivateUse' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of PrivateUse UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsPrivateUseArea' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of PrivateUseArea UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsRunic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Runic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsShavian' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Shavian UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSinhala' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Sinhala UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSmallFormVariants' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SmallFormVariants UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSpacingModifierLetters' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SpacingModifierLetters UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSpecials' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Specials UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSuperscriptsandSubscripts' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SuperscriptsandSubscripts UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSupplementalArrowsA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SupplementalArrows-A UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSupplementalArrowsB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SupplementalArrows-B UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSupplementalMathematicalOperators' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SupplementalMathematicalOperators UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSupplementaryPrivateUseAreaA' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSupplementaryPrivateUseAreaB' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsSyriac' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Syriac UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTagalog' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Tagalog UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTagbanwa' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Tagbanwa UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTags' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Tags UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTaiLe' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of TaiLe UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTaiXuanJingSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of TaiXuanJingSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTamil' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Tamil UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTelugu' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Telugu UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsThaana' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Thaana UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsThai' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Thai UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsTibetan' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Tibetan UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsUgaritic' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of Ugaritic UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsUnifiedCanadianAboriginalSyllabics' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsVariationSelectors' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of VariationSelectors UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsVariationSelectorsSupplement' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of VariationSelectorsSupplement UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsYiRadicals' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of YiRadicals UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsYiSyllables' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of YiSyllables UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlUCSIsYijingHexagramSymbols' file='xmlunicode' module='xmlunicode'>
+ <cond>defined(LIBXML_UNICODE_ENABLED)</cond>
+ <info>Check whether the character is part of YijingHexagramSymbols UCS Block</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='code' type='int' info='UCS code point'/>
+ </function>
+ <function name='xmlURIEscape' file='uri' module='uri'>
+ <info>Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it&apos;s impossible to be sure.</info>
+ <return type='xmlChar *' info='an copy of the string, but escaped 25 May 2001 Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly according to RFC2396. - Carl Douglas'/>
+ <arg name='str' type='const xmlChar *' info='the string of the URI to escape'/>
+ </function>
+ <function name='xmlURIEscapeStr' file='uri' module='uri'>
+ <info>This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list.</info>
+ <return type='xmlChar *' info='a new escaped string or NULL in case of error.'/>
+ <arg name='str' type='const xmlChar *' info='string to escape'/>
+ <arg name='list' type='const xmlChar *' info='exception list string of chars not to escape'/>
+ </function>
+ <function name='xmlURIUnescapeString' file='uri' module='uri'>
+ <info>Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.</info>
+ <return type='char *' info='a copy of the string, but unescaped, will return NULL only in case of error'/>
+ <arg name='str' type='const char *' info='the string to unescape'/>
+ <arg name='len' type='int' info='the length in bytes to unescape (or &lt;= 0 to indicate full string)'/>
+ <arg name='target' type='char *' info='optional destination buffer'/>
+ </function>
+ <function name='xmlUTF8Charcmp' file='xmlstring' module='xmlstring'>
+ <info>compares the two UCS4 values</info>
+ <return type='int' info='result of the compare as with xmlStrncmp'/>
+ <arg name='utf1' type='const xmlChar *' info='pointer to first UTF8 char'/>
+ <arg name='utf2' type='const xmlChar *' info='pointer to second UTF8 char'/>
+ </function>
+ <function name='xmlUTF8Size' file='xmlstring' module='xmlstring'>
+ <info>calculates the internal size of a UTF8 character</info>
+ <return type='int' info='the numbers of bytes in the character, -1 on format error'/>
+ <arg name='utf' type='const xmlChar *' info='pointer to the UTF8 character'/>
+ </function>
+ <function name='xmlUTF8Strlen' file='xmlstring' module='xmlstring'>
+ <info>compute the length of an UTF8 string, it doesn&apos;t do a full UTF8 checking of the content of the string.</info>
+ <return type='int' info='the number of characters in the string or -1 in case of error'/>
+ <arg name='utf' type='const xmlChar *' info='a sequence of UTF-8 encoded bytes'/>
+ </function>
+ <function name='xmlUTF8Strloc' file='xmlstring' module='xmlstring'>
+ <info>a function to provide the relative location of a UTF8 char</info>
+ <return type='int' info='the relative character position of the desired char or -1 if not found'/>
+ <arg name='utf' type='const xmlChar *' info='the input UTF8 *'/>
+ <arg name='utfchar' type='const xmlChar *' info='the UTF8 character to be found'/>
+ </function>
+ <function name='xmlUTF8Strndup' file='xmlstring' module='xmlstring'>
+ <info>a strndup for array of UTF8&apos;s</info>
+ <return type='xmlChar *' info='a new UTF8 * or NULL'/>
+ <arg name='utf' type='const xmlChar *' info='the input UTF8 *'/>
+ <arg name='len' type='int' info='the len of @utf (in chars)'/>
+ </function>
+ <function name='xmlUTF8Strpos' file='xmlstring' module='xmlstring'>
+ <info>a function to provide the equivalent of fetching a character from a string array</info>
+ <return type='const xmlChar *' info='a pointer to the UTF8 character or NULL'/>
+ <arg name='utf' type='const xmlChar *' info='the input UTF8 *'/>
+ <arg name='pos' type='int' info='the position of the desired UTF8 char (in chars)'/>
+ </function>
+ <function name='xmlUTF8Strsize' file='xmlstring' module='xmlstring'>
+ <info>storage size of an UTF8 string the behaviour is not garanteed if the input string is not UTF-8</info>
+ <return type='int' info='the storage size of the first &apos;len&apos; characters of ARRAY'/>
+ <arg name='utf' type='const xmlChar *' info='a sequence of UTF-8 encoded bytes'/>
+ <arg name='len' type='int' info='the number of characters in the array'/>
+ </function>
+ <function name='xmlUTF8Strsub' file='xmlstring' module='xmlstring'>
+ <info>Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars</info>
+ <return type='xmlChar *' info='a pointer to a newly created string or NULL if any problem'/>
+ <arg name='utf' type='const xmlChar *' info='a sequence of UTF-8 encoded bytes'/>
+ <arg name='start' type='int' info='relative pos of first char'/>
+ <arg name='len' type='int' info='total number to copy'/>
+ </function>
+ <function name='xmlUnlinkNode' file='tree' module='tree'>
+ <info>Unlink a node from it&apos;s current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can&apos;t be unlinked as they do not have pointer to their parent.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlUnlockLibrary' file='threads' module='threads'>
+ <info>xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlUnsetNsProp' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Remove an attribute carried by a node.</info>
+ <return type='int' info='0 if successful, -1 if not found'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='ns' type='xmlNsPtr' info='the namespace definition'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlUnsetProp' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Remove an attribute carried by a node. This handles only attributes in no namespace.</info>
+ <return type='int' info='0 if successful, -1 if not found'/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ </function>
+ <function name='xmlValidBuildContentModel' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED) &amp;&amp; defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>(Re)Build the automata associated to the content model of this element</info>
+ <return type='int' info='1 in case of success, 0 in case of error'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='a validation context'/>
+ <arg name='elem' type='xmlElementPtr' info='an element declaration node'/>
+ </function>
+ <function name='xmlValidCtxtNormalizeAttributeValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt-&gt;valid accordingly</info>
+ <return type='xmlChar *' info='a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context or NULL'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='elem' type='xmlNodePtr' info='the parent'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value'/>
+ </function>
+ <function name='xmlValidGetPotentialChildren' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Build/extend a list of potential children allowed by the content tree</info>
+ <return type='int' info='the number of element in the list, or -1 in case of error.'/>
+ <arg name='ctree' type='xmlElementContent *' info='an element content tree'/>
+ <arg name='names' type='const xmlChar **' info='an array to store the list of child names'/>
+ <arg name='len' type='int *' info='a pointer to the number of element in the list'/>
+ <arg name='max' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlValidGetValidElements' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>This function returns the list of authorized children to insert within an existing tree while respecting the validity constraints forced by the Dtd. The insertion point is defined using @prev and @next in the following ways: to insert before &apos;node&apos;: xmlValidGetValidElements(node-&gt;prev, node, ... to insert next &apos;node&apos;: xmlValidGetValidElements(node, node-&gt;next, ... to replace &apos;node&apos;: xmlValidGetValidElements(node-&gt;prev, node-&gt;next, ... to prepend a child to &apos;node&apos;: xmlValidGetValidElements(NULL, node-&gt;childs, to append a child to &apos;node&apos;: xmlValidGetValidElements(node-&gt;last, NULL, ... pointers to the element names are inserted at the beginning of the array and do not need to be freed.</info>
+ <return type='int' info='the number of element in the list, or -1 in case of error. If the function returns the value @max the caller is invited to grow the receiving array and retry.'/>
+ <arg name='prev' type='xmlNode *' info='an element to insert after'/>
+ <arg name='next' type='xmlNode *' info='an element to insert next'/>
+ <arg name='names' type='const xmlChar **' info='an array to store the list of child names'/>
+ <arg name='max' type='int' info='the size of the array'/>
+ </function>
+ <function name='xmlValidNormalizeAttributeValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Does the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character.</info>
+ <return type='xmlChar *' info='a new normalized string if normalization is needed, NULL otherwise the caller must free the returned value.'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='elem' type='xmlNodePtr' info='the parent'/>
+ <arg name='name' type='const xmlChar *' info='the attribute name'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value'/>
+ </function>
+ <function name='xmlValidateAttributeDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single attribute definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Default Legal ] - [ VC: Enumeration ] - [ VC: ID Attribute Default ] The ID/IDREF uniqueness and matching are done separately</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='attr' type='xmlAttributePtr' info='an attribute definition'/>
+ </function>
+ <function name='xmlValidateAttributeValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Validate that the given attribute value match the proper production [ VC: ID ] Values of type ID must match the Name production.... [ VC: IDREF ] Values of type IDREF must match the Name production, and values of type IDREFS must match Names ... [ VC: Entity Name ] Values of type ENTITY must match the Name production, values of type ENTITIES must match Names ... [ VC: Name Token ] Values of type NMTOKEN must match the Nmtoken production; values of type NMTOKENS must match Nmtokens.</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='type' type='xmlAttributeType' info='an attribute type'/>
+ <arg name='value' type='const xmlChar *' info='an attribute value'/>
+ </function>
+ <function name='xmlValidateDocument' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ </function>
+ <function name='xmlValidateDocumentFinal' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Does the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ </function>
+ <function name='xmlValidateDtd' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present.</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='dtd' type='xmlDtdPtr' info='a dtd instance'/>
+ </function>
+ <function name='xmlValidateDtdFinal' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Does the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations.</info>
+ <return type='int' info='1 if valid or 0 if invalid and -1 if not well-formed'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ </function>
+ <function name='xmlValidateElement' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate the subtree under an element</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ </function>
+ <function name='xmlValidateElementDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single element definition basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: One ID per Element Type ] - [ VC: No Duplicate Types ] - [ VC: Unique Element Type Declaration ]</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlElementPtr' info='an element definition'/>
+ </function>
+ <function name='xmlValidateNCName' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of NCName</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='space' type='int' info='allow spaces in front and end of the string'/>
+ </function>
+ <function name='xmlValidateNMToken' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of NMToken</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='space' type='int' info='allow spaces in front and end of the string'/>
+ </function>
+ <function name='xmlValidateName' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of Name</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='space' type='int' info='allow spaces in front and end of the string'/>
+ </function>
+ <function name='xmlValidateNameValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Validate that the given value match Name production</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='value' type='const xmlChar *' info='an Name value'/>
+ </function>
+ <function name='xmlValidateNamesValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Validate that the given value match Names production</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='value' type='const xmlChar *' info='an Names value'/>
+ </function>
+ <function name='xmlValidateNmtokenValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Validate that the given value match Nmtoken production [ VC: Name Token ]</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='value' type='const xmlChar *' info='an Nmtoken value'/>
+ </function>
+ <function name='xmlValidateNmtokensValue' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Validate that the given value match Nmtokens production [ VC: Name Token ]</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='value' type='const xmlChar *' info='an Nmtokens value'/>
+ </function>
+ <function name='xmlValidateNotationDecl' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: - it seems that no validity constraint exists on notation declarations But this function get called anyway ...</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='nota' type='xmlNotationPtr' info='a notation definition'/>
+ </function>
+ <function name='xmlValidateNotationUse' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Validate that the given name match a notation declaration. - [ VC: Notation Declared ]</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='the document'/>
+ <arg name='notationName' type='const xmlChar *' info='the notation name to check'/>
+ </function>
+ <function name='xmlValidateOneAttribute' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ <arg name='attr' type='xmlAttrPtr' info='an attribute instance'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value (without entities processing)'/>
+ </function>
+ <function name='xmlValidateOneElement' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single element and it&apos;s attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ </function>
+ <function name='xmlValidateOneNamespace' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ <arg name='prefix' type='const xmlChar *' info='the namespace prefix'/>
+ <arg name='ns' type='xmlNsPtr' info='an namespace declaration instance'/>
+ <arg name='value' type='const xmlChar *' info='the attribute value (without entities processing)'/>
+ </function>
+ <function name='xmlValidatePopElement' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED) &amp;&amp; defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Pop the element end from the validation stack.</info>
+ <return type='int' info='1 if no validation problem was found or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ <arg name='qname' type='const xmlChar *' info='the qualified name as appearing in the serialization'/>
+ </function>
+ <function name='xmlValidatePushCData' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED) &amp;&amp; defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>check the CData parsed for validation in the current stack</info>
+ <return type='int' info='1 if no validation problem was found or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='data' type='const xmlChar *' info='some character data read'/>
+ <arg name='len' type='int' info='the length of the data'/>
+ </function>
+ <function name='xmlValidatePushElement' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED) &amp;&amp; defined(LIBXML_REGEXP_ENABLED)</cond>
+ <info>Push a new element start on the validation stack.</info>
+ <return type='int' info='1 if no validation problem was found or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ <arg name='elem' type='xmlNodePtr' info='an element instance'/>
+ <arg name='qname' type='const xmlChar *' info='the qualified name as appearing in the serialization'/>
+ </function>
+ <function name='xmlValidateQName' file='tree' module='tree'>
+ <cond>defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Check that a value conforms to the lexical space of QName</info>
+ <return type='int' info='0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.'/>
+ <arg name='value' type='const xmlChar *' info='the value to check'/>
+ <arg name='space' type='int' info='allow spaces in front and end of the string'/>
+ </function>
+ <function name='xmlValidateRoot' file='valid' module='valid'>
+ <cond>defined(LIBXML_VALID_ENABLED)</cond>
+ <info>Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn&apos;t try to recurse or apply other check to the element</info>
+ <return type='int' info='1 if valid or 0 otherwise'/>
+ <arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
+ <arg name='doc' type='xmlDocPtr' info='a document instance'/>
+ </function>
+ <functype name='xmlValidityErrorFunc' file='valid' module='valid'>
+ <info>Callback called when a validity error is found. This is a message oriented function similar to an *printf function.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.'/>
+ <arg name='msg' type='const char *' info='the string to format *printf like vararg'/>
+ <arg name='...' type='...' info='remaining arguments to the format'/>
+ </functype>
+ <functype name='xmlValidityWarningFunc' file='valid' module='valid'>
+ <info>Callback called when a validity warning is found. This is a message oriented function similar to an *printf function.</info>
+ <return type='void'/>
+ <arg name='ctx' type='void *' info='usually an xmlValidCtxtPtr to a validity error context, but comes from ctxt-&gt;userData (which normally contains such a pointer); ctxt-&gt;userData can be changed by the user.'/>
+ <arg name='msg' type='const char *' info='the string to format *printf like vararg'/>
+ <arg name='...' type='...' info='remaining arguments to the format'/>
+ </functype>
+ <function name='xmlXIncludeFreeContext' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Free an XInclude context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXIncludeCtxtPtr' info='the XInclude context'/>
+ </function>
+ <function name='xmlXIncludeNewContext' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Creates a new XInclude context</info>
+ <return type='xmlXIncludeCtxtPtr' info='the new set'/>
+ <arg name='doc' type='xmlDocPtr' info='an XML Document'/>
+ </function>
+ <function name='xmlXIncludeProcess' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution on the XML document @doc</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='doc' type='xmlDocPtr' info='an XML document'/>
+ </function>
+ <function name='xmlXIncludeProcessFlags' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution on the XML document @doc</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='doc' type='xmlDocPtr' info='an XML document'/>
+ <arg name='flags' type='int' info='a set of xmlParserOption used for parsing XML includes'/>
+ </function>
+ <function name='xmlXIncludeProcessFlagsData' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution on the XML document @doc</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='doc' type='xmlDocPtr' info='an XML document'/>
+ <arg name='flags' type='int' info='a set of xmlParserOption used for parsing XML includes'/>
+ <arg name='data' type='void *' info='application data that will be passed to the parser context in the _private field of the parser context(s)'/>
+ </function>
+ <function name='xmlXIncludeProcessNode' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution for the given subtree reusing the informations and data coming from the given context.</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='ctxt' type='xmlXIncludeCtxtPtr' info='an existing XInclude context'/>
+ <arg name='node' type='xmlNodePtr' info='a node in an XML document'/>
+ </function>
+ <function name='xmlXIncludeProcessTree' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution for the given subtree</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='tree' type='xmlNodePtr' info='a node in an XML document'/>
+ </function>
+ <function name='xmlXIncludeProcessTreeFlags' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution for the given subtree</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='tree' type='xmlNodePtr' info='a node in an XML document'/>
+ <arg name='flags' type='int' info='a set of xmlParserOption used for parsing XML includes'/>
+ </function>
+ <function name='xmlXIncludeProcessTreeFlagsData' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Implement the XInclude substitution on the XML node @tree</info>
+ <return type='int' info='0 if no substitution were done, -1 if some processing failed or the number of substitutions done.'/>
+ <arg name='tree' type='xmlNodePtr' info='an XML node'/>
+ <arg name='flags' type='int' info='a set of xmlParserOption used for parsing XML includes'/>
+ <arg name='data' type='void *' info='application data that will be passed to the parser context in the _private field of the parser context(s)'/>
+ </function>
+ <function name='xmlXIncludeSetFlags' file='xinclude' module='xinclude'>
+ <cond>defined(LIBXML_XINCLUDE_ENABLED)</cond>
+ <info>Set the flags used for further processing of XML resources.</info>
+ <return type='int' info='0 in case of success and -1 in case of error.'/>
+ <arg name='ctxt' type='xmlXIncludeCtxtPtr' info='an XInclude processing context'/>
+ <arg name='flags' type='int' info='a set of xmlParserOption used for parsing XML includes'/>
+ </function>
+ <function name='xmlXPathAddValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <functype name='xmlXPathAxisFunc' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.</info>
+ <return type='xmlXPathObjectPtr' info='the next node in that axis or NULL if at the end of the axis.'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath interpreter context'/>
+ <arg name='cur' type='xmlXPathObjectPtr' info='the previous node being explored on that axis'/>
+ </functype>
+ <function name='xmlXPathBooleanFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the boolean() XPath function boolean boolean(object) The boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathCastBooleanToNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a boolean to its number value</info>
+ <return type='double' info='the number value'/>
+ <arg name='val' type='int' info='a boolean'/>
+ </function>
+ <function name='xmlXPathCastBooleanToString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a boolean to its string value.</info>
+ <return type='xmlChar *' info='a newly allocated string.'/>
+ <arg name='val' type='int' info='a boolean'/>
+ </function>
+ <function name='xmlXPathCastNodeSetToBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a node-set to its boolean value</info>
+ <return type='int' info='the boolean value'/>
+ <arg name='ns' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathCastNodeSetToNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a node-set to its number value</info>
+ <return type='double' info='the number value'/>
+ <arg name='ns' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathCastNodeSetToString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a node-set to its string value.</info>
+ <return type='xmlChar *' info='a newly allocated string.'/>
+ <arg name='ns' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathCastNodeToNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a node to its number value</info>
+ <return type='double' info='the number value'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathCastNodeToString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a node to its string value.</info>
+ <return type='xmlChar *' info='a newly allocated string.'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathCastNumberToBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a number to its boolean value</info>
+ <return type='int' info='the boolean value'/>
+ <arg name='val' type='double' info='a number'/>
+ </function>
+ <function name='xmlXPathCastNumberToString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a number to its string value.</info>
+ <return type='xmlChar *' info='a newly allocated string.'/>
+ <arg name='val' type='double' info='a number'/>
+ </function>
+ <function name='xmlXPathCastStringToBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a string to its boolean value</info>
+ <return type='int' info='the boolean value'/>
+ <arg name='val' type='const xmlChar *' info='a string'/>
+ </function>
+ <function name='xmlXPathCastStringToNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts a string to its number value</info>
+ <return type='double' info='the number value'/>
+ <arg name='val' type='const xmlChar *' info='a string'/>
+ </function>
+ <function name='xmlXPathCastToBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an XPath object to its boolean value</info>
+ <return type='int' info='the boolean value'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <function name='xmlXPathCastToNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an XPath object to its number value</info>
+ <return type='double' info='the number value'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <function name='xmlXPathCastToString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an existing object to its string() equivalent</info>
+ <return type='xmlChar *' info='the allocated string value of the object, NULL in case of error. It&apos;s up to the caller to free the string memory with xmlFree().'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <function name='xmlXPathCeilingFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathCmpNodes' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Compare two nodes w.r.t document order</info>
+ <return type='int' info='-2 in case of error 1 if first point &lt; second point, 0 if it&apos;s the same node, -1 otherwise'/>
+ <arg name='node1' type='xmlNodePtr' info='the first node'/>
+ <arg name='node2' type='xmlNodePtr' info='the second node'/>
+ </function>
+ <function name='xmlXPathCompareValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the compare operation on XPath objects: @arg1 &lt; @arg2 (1, 1, ... @arg1 &lt;= @arg2 (1, 0, ... @arg1 &gt; @arg2 (0, 1, ... @arg1 &gt;= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is &lt;=, &lt;, &gt;=, &gt;, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The &lt; comparison will be true if and only if the first number is less than the second number. The &lt;= comparison will be true if and only if the first number is less than or equal to the second number. The &gt; comparison will be true if and only if the first number is greater than the second number. The &gt;= comparison will be true if and only if the first number is greater than or equal to the second number.</info>
+ <return type='int' info='1 if the comparison succeeded, 0 if it failed'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='inf' type='int' info='less than (1) or greater than (0)'/>
+ <arg name='strict' type='int' info='is the comparison strict'/>
+ </function>
+ <function name='xmlXPathCompile' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Compile an XPath expression</info>
+ <return type='xmlXPathCompExprPtr' info='the xmlXPathCompExprPtr resulting from the compilation or NULL. the caller has to free the object.'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ </function>
+ <function name='xmlXPathCompiledEval' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate the Precompiled XPath expression in the given context.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='comp' type='xmlXPathCompExprPtr' info='the compiled XPath expression'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathCompiledEvalToBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Applies the XPath boolean() function on the result of the given compiled expression.</info>
+ <return type='int' info='1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.'/>
+ <arg name='comp' type='xmlXPathCompExprPtr' info='the compiled XPath expression'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathConcatFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathContainsFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathContextSetCache' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use &lt;0 for the default number (100). Other values for @options have currently no effect.</info>
+ <return type='int' info='0 if the setting succeeded, and -1 on API or internal errors.'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='active' type='int' info='enables/disables (creates/frees) the cache'/>
+ <arg name='value' type='int' info='a value with semantics dependant on @options'/>
+ <arg name='options' type='int' info='options (currently only the value 0 is used)'/>
+ </function>
+ <function name='xmlXPathConvertBoolean' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an existing object to its boolean() equivalent</info>
+ <return type='xmlXPathObjectPtr' info='the new object, the old one is freed (or the operation is done directly on @val)'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <functype name='xmlXPathConvertFunc' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>A conversion function is associated to a type and used to cast the new type to primitive values.</info>
+ <return type='int' info='-1 in case of error, 0 otherwise'/>
+ <arg name='obj' type='xmlXPathObjectPtr' info='an XPath object'/>
+ <arg name='type' type='int' info='the number of the target type'/>
+ </functype>
+ <function name='xmlXPathConvertNumber' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an existing object to its number() equivalent</info>
+ <return type='xmlXPathObjectPtr' info='the new object, the old one is freed (or the operation is done directly on @val)'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <function name='xmlXPathConvertString' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Converts an existing object to its string() equivalent</info>
+ <return type='xmlXPathObjectPtr' info='the new object, the old one is freed (or the operation is done directly on @val)'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an XPath object'/>
+ </function>
+ <function name='xmlXPathCountFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the count() XPath function number count(node-set)</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathCtxtCompile' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Compile an XPath expression</info>
+ <return type='xmlXPathCompExprPtr' info='the xmlXPathCompExprPtr resulting from the compilation or NULL. the caller has to free the object.'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='an XPath context'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ </function>
+ <function name='xmlXPathDebugDumpCompExpr' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dumps the tree of the compiled XPath expression.</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * for the output'/>
+ <arg name='comp' type='xmlXPathCompExprPtr' info='the precompiled XPath expression'/>
+ <arg name='depth' type='int' info='the indentation level.'/>
+ </function>
+ <function name='xmlXPathDebugDumpObject' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED) &amp;&amp; defined(LIBXML_DEBUG_ENABLED)</cond>
+ <info>Dump the content of the object for debugging purposes</info>
+ <return type='void'/>
+ <arg name='output' type='FILE *' info='the FILE * to dump the output'/>
+ <arg name='cur' type='xmlXPathObjectPtr' info='the object to inspect'/>
+ <arg name='depth' type='int' info='indentation level'/>
+ </function>
+ <function name='xmlXPathDifference' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='the difference between the two node sets, or nodes1 if nodes2 is empty'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathDistinct' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set</info>
+ <return type='xmlNodeSetPtr' info='a subset of the nodes contained in @nodes, or @nodes if it is empty'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathDistinctSorted' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets distinct() function: node-set set:distinct (node-set)</info>
+ <return type='xmlNodeSetPtr' info='a subset of the nodes contained in @nodes, or @nodes if it is empty'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ </function>
+ <function name='xmlXPathDivValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the div operation on XPath objects @arg1 / @arg2: The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathEqualValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the equal operation on XPath objects content: @arg1 == @arg2</info>
+ <return type='int' info='0 or 1 depending on the results of the test.'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathErr' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Handle an XPath error</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='a XPath parser context'/>
+ <arg name='error' type='int' info='the error code'/>
+ </function>
+ <function name='xmlXPathEval' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate the XPath Location Path in the given context.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathEvalExpr' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Parse and evaluate an XPath expression in the given context, then push the result on the context stack</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathEvalExpression' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate the XPath expression in the given context.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <functype name='xmlXPathEvalFunc' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>An XPath evaluation function, the parameters are on the XPath context stack.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments passed to the function'/>
+ </functype>
+ <function name='xmlXPathEvalPredicate' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</info>
+ <return type='int' info='1 if predicate is true, 0 otherwise'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='res' type='xmlXPathObjectPtr' info='the Predicate Expression evaluation result'/>
+ </function>
+ <function name='xmlXPathEvaluatePredicateResult' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</info>
+ <return type='int' info='1 if predicate is true, 0 otherwise'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='res' type='xmlXPathObjectPtr' info='the Predicate Expression evaluation result'/>
+ </function>
+ <function name='xmlXPathFalseFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the false() XPath function boolean false()</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathFloorFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathFreeCompExpr' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free up the memory allocated by @comp</info>
+ <return type='void'/>
+ <arg name='comp' type='xmlXPathCompExprPtr' info='an XPATH comp'/>
+ </function>
+ <function name='xmlXPathFreeContext' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free up an xmlXPathContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the context to free'/>
+ </function>
+ <function name='xmlXPathFreeNodeSet' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free the NodeSet compound (not the actual nodes !).</info>
+ <return type='void'/>
+ <arg name='obj' type='xmlNodeSetPtr' info='the xmlNodeSetPtr to free'/>
+ </function>
+ <function name='xmlXPathFreeNodeSetList' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free up the xmlXPathObjectPtr @obj but don&apos;t deallocate the objects in the list contrary to xmlXPathFreeObject().</info>
+ <return type='void'/>
+ <arg name='obj' type='xmlXPathObjectPtr' info='an existing NodeSetList object'/>
+ </function>
+ <function name='xmlXPathFreeObject' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free up an xmlXPathObjectPtr object.</info>
+ <return type='void'/>
+ <arg name='obj' type='xmlXPathObjectPtr' info='the object to free'/>
+ </function>
+ <function name='xmlXPathFreeParserContext' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Free up an xmlXPathParserContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the context to free'/>
+ </function>
+ <functype name='xmlXPathFuncLookupFunc' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Prototype for callbacks used to plug function lookup in the XPath engine.</info>
+ <return type='xmlXPathFunction' info='the XPath function or NULL if not found.'/>
+ <arg name='ctxt' type='void *' info='an XPath context'/>
+ <arg name='name' type='const xmlChar *' info='name of the function'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the namespace name hosting this function'/>
+ </functype>
+ <functype name='xmlXPathFunction' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath interprestation context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </functype>
+ <function name='xmlXPathFunctionLookup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Search in the Function array of the context for the given function.</info>
+ <return type='xmlXPathFunction' info='the xmlXPathFunction or NULL if not found'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the function name'/>
+ </function>
+ <function name='xmlXPathFunctionLookupNS' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Search in the Function array of the context for the given function.</info>
+ <return type='xmlXPathFunction' info='the xmlXPathFunction or NULL if not found'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the function name'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the function namespace URI'/>
+ </function>
+ <function name='xmlXPathHasSameNodes' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)</info>
+ <return type='int' info='true (1) if @nodes1 shares any node with @nodes2, false (0) otherwise'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathIdFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of characters matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathInit' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Initialize the XPath environment</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlXPathIntersection' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='a node set comprising the nodes that are within both the node sets passed as arguments'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathIsInf' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/</info>
+ <return type='int' info='1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise'/>
+ <arg name='val' type='double' info='a double value'/>
+ </function>
+ <function name='xmlXPathIsNaN' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)</cond>
+ <info>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</info>
+ <return type='int' info='1 if the value is a NaN, 0 otherwise'/>
+ <arg name='val' type='double' info='a double value'/>
+ </function>
+ <function name='xmlXPathIsNodeType' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Is the name given a NodeType one. [38] NodeType ::= &apos;comment&apos; | &apos;text&apos; | &apos;processing-instruction&apos; | &apos;node&apos;</info>
+ <return type='int' info='1 if true 0 otherwise'/>
+ <arg name='name' type='const xmlChar *' info='a name string'/>
+ </function>
+ <function name='xmlXPathLangFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang attribute on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathLastFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the last() XPath function number last() The last function returns the number of nodes in the context node list.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathLeading' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called.</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn&apos;t contain @nodes2'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathLeadingSorted' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes1 that precede the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn&apos;t contain @nodes2'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ </function>
+ <function name='xmlXPathLocalNameFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathModValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the mod operation on XPath objects: @arg1 / @arg2 The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathMultValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathNamespaceURIFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathNewBoolean' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type boolean and of value @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='int' info='the boolean value'/>
+ </function>
+ <function name='xmlXPathNewCString' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type string and of value @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='const char *' info='the char * value'/>
+ </function>
+ <function name='xmlXPathNewContext' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathContext</info>
+ <return type='xmlXPathContextPtr' info='the xmlXPathContext just allocated. The caller will need to free it.'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document'/>
+ </function>
+ <function name='xmlXPathNewFloat' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type double and of value @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='double' info='the double value'/>
+ </function>
+ <function name='xmlXPathNewNodeSet' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlNodePtr' info='the NodePtr value'/>
+ </function>
+ <function name='xmlXPathNewNodeSetList' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlNodeSetPtr' info='an existing NodeSet'/>
+ </function>
+ <function name='xmlXPathNewParserContext' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathParserContext</info>
+ <return type='xmlXPathParserContextPtr' info='the xmlXPathParserContext just allocated.'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathNewString' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type string and of value @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='const xmlChar *' info='the xmlChar * value'/>
+ </function>
+ <function name='xmlXPathNewValueTree' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root @val</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlNodePtr' info='the NodePtr value'/>
+ </function>
+ <function name='xmlXPathNextAncestor' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;ancestor&quot; direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent&apos;s parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent&apos;s parent is the second node on the axis</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextAncestorOrSelf' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;ancestor-or-self&quot; direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node&apos;s parent the second; parent here is defined the same as with the parent axis.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextAttribute' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;attribute&quot; direction TODO: support DTD inherited default attributes</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current attribute in the traversal'/>
+ </function>
+ <function name='xmlXPathNextChild' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;child&quot; direction The child axis contains the children of the context node in document order.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextDescendant' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;descendant&quot; direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextDescendantOrSelf' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;descendant-or-self&quot; direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextFollowing' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;following&quot; direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes; the nodes are ordered in document order</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextFollowingSibling' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;following-sibling&quot; direction The following-sibling axis contains the following siblings of the context node in document order.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextNamespace' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;namespace&quot; direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current attribute in the traversal'/>
+ </function>
+ <function name='xmlXPathNextParent' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;parent&quot; direction The parent axis contains the parent of the context node, if there is one.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextPreceding' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;preceding&quot; direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes; the nodes are ordered in reverse document order</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextPrecedingSibling' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;preceding-sibling&quot; direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on.</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNextSelf' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Traversal function for the &quot;self&quot; direction The self axis contains just the context node itself</info>
+ <return type='xmlNodePtr' info='the next element following that axis'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='cur' type='xmlNodePtr' info='the current node in the traversal'/>
+ </function>
+ <function name='xmlXPathNodeEval' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Evaluate the XPath Location Path in the given context. The node &apos;node&apos; is set as the context node. The context node is not restored.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='node' type='xmlNodePtr' info='the node to to use as the context node'/>
+ <arg name='str' type='const xmlChar *' info='the XPath expression'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathNodeLeading' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set) @nodes is sorted by document order, then #exslSetsNodeLeadingSorted is called.</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn&apos;t contain @node'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathNodeLeadingSorted' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes that precede @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn&apos;t contain @node'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathNodeSetAdd' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>add a new xmlNodePtr to an existing NodeSet</info>
+ <return type='int' info='0 in case of success, and -1 in case of error'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the initial node set'/>
+ <arg name='val' type='xmlNodePtr' info='a new xmlNodePtr'/>
+ </function>
+ <function name='xmlXPathNodeSetAddNs' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>add a new namespace node to an existing NodeSet</info>
+ <return type='int' info='0 in case of success and -1 in case of error'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the initial node set'/>
+ <arg name='node' type='xmlNodePtr' info='the hosting node'/>
+ <arg name='ns' type='xmlNsPtr' info='a the namespace node'/>
+ </function>
+ <function name='xmlXPathNodeSetAddUnique' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.</info>
+ <return type='int' info='0 in case of success and -1 in case of failure'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the initial node set'/>
+ <arg name='val' type='xmlNodePtr' info='a new xmlNodePtr'/>
+ </function>
+ <function name='xmlXPathNodeSetContains' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>checks whether @cur contains @val</info>
+ <return type='int' info='true (1) if @cur contains @val, false (0) otherwise'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the node-set'/>
+ <arg name='val' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlXPathNodeSetCreate' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Create a new xmlNodeSetPtr of type double and of value @val</info>
+ <return type='xmlNodeSetPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlNodePtr' info='an initial xmlNodePtr, or NULL'/>
+ </function>
+ <function name='xmlXPathNodeSetDel' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Removes an xmlNodePtr from an existing NodeSet</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the initial node set'/>
+ <arg name='val' type='xmlNodePtr' info='an xmlNodePtr'/>
+ </function>
+ <function name='xmlXPathNodeSetFreeNs' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Namespace nodes in libxml don&apos;t match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed</info>
+ <return type='void'/>
+ <arg name='ns' type='xmlNsPtr' info='the XPath namespace node found in a nodeset.'/>
+ </function>
+ <function name='xmlXPathNodeSetMerge' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Merges two nodesets, all nodes from @val2 are added to @val1 if @val1 is NULL, a new set is created and copied from @val2</info>
+ <return type='xmlNodeSetPtr' info='@val1 once extended or NULL in case of error.'/>
+ <arg name='val1' type='xmlNodeSetPtr' info='the first NodeSet or NULL'/>
+ <arg name='val2' type='xmlNodeSetPtr' info='the second NodeSet'/>
+ </function>
+ <function name='xmlXPathNodeSetRemove' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Removes an entry from an existing NodeSet list.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlNodeSetPtr' info='the initial node set'/>
+ <arg name='val' type='int' info='the index to remove'/>
+ </function>
+ <function name='xmlXPathNodeSetSort' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Sort the node set in document order</info>
+ <return type='void'/>
+ <arg name='set' type='xmlNodeSetPtr' info='the node set'/>
+ </function>
+ <function name='xmlXPathNodeTrailing' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted is called.</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn&apos;t contain @node'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathNodeTrailingSorted' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes that follow @node in document order, @nodes if @node is NULL or an empty node-set if @nodes doesn&apos;t contain @node'/>
+ <arg name='nodes' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ <arg name='node' type='xmlNodePtr' info='a node'/>
+ </function>
+ <function name='xmlXPathNormalizeFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathNotEqualValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the equal operation on XPath objects content: @arg1 == @arg2</info>
+ <return type='int' info='0 or 1 depending on the results of the test.'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathNotFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathNsLookup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Search in the namespace declaration array of the context for the given namespace name associated to the given prefix</info>
+ <return type='const xmlChar *' info='the value or NULL if not found'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='prefix' type='const xmlChar *' info='the namespace prefix value'/>
+ </function>
+ <function name='xmlXPathNumberFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the number() XPath function number number(object?)</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathObjectCopy' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>allocate a new copy of a given object</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='the original object'/>
+ </function>
+ <function name='xmlXPathOrderDocElems' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element-&gt;content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</info>
+ <return type='long' info='the number of elements found in the document or -1 in case of error.'/>
+ <arg name='doc' type='xmlDocPtr' info='an input document'/>
+ </function>
+ <function name='xmlXPathParseNCName' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>parse an XML namespace non qualified name. [NS 3] NCName ::= (Letter | &apos;_&apos;) (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | &apos;.&apos; | &apos;-&apos; | &apos;_&apos; | CombiningChar | Extender</info>
+ <return type='xmlChar *' info='the namespace name or NULL'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathParseName' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>parse an XML name [4] NameChar ::= Letter | Digit | &apos;.&apos; | &apos;-&apos; | &apos;_&apos; | &apos;:&apos; | CombiningChar | Extender [5] Name ::= (Letter | &apos;_&apos; | &apos;:&apos;) (NameChar)*</info>
+ <return type='xmlChar *' info='the namespace name or NULL'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathPopBoolean' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</info>
+ <return type='int' info='the boolean'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ </function>
+ <function name='xmlXPathPopExternal' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops an external object from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</info>
+ <return type='void *' info='the object'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ </function>
+ <function name='xmlXPathPopNodeSet' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</info>
+ <return type='xmlNodeSetPtr' info='the node-set'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ </function>
+ <function name='xmlXPathPopNumber' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</info>
+ <return type='double' info='the number'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ </function>
+ <function name='xmlXPathPopString' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Pops a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.</info>
+ <return type='xmlChar *' info='the string'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='an XPath parser context'/>
+ </function>
+ <function name='xmlXPathPositionFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last position will be equal to last().</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathRegisterAllFunctions' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Registers all default XPath functions in this context</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathRegisterFunc' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a new function. If @f is NULL it unregisters the function</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the function name'/>
+ <arg name='f' type='xmlXPathFunction' info='the function implementation or NULL'/>
+ </function>
+ <function name='xmlXPathRegisterFuncLookup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Registers an external mechanism to do function lookup.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='f' type='xmlXPathFuncLookupFunc' info='the lookup function'/>
+ <arg name='funcCtxt' type='void *' info='the lookup data'/>
+ </function>
+ <function name='xmlXPathRegisterFuncNS' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a new function. If @f is NULL it unregisters the function</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the function name'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the function namespace URI'/>
+ <arg name='f' type='xmlXPathFunction' info='the function implementation or NULL'/>
+ </function>
+ <function name='xmlXPathRegisterNs' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a new namespace. If @ns_uri is NULL it unregisters the namespace</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='prefix' type='const xmlChar *' info='the namespace prefix cannot be NULL or empty string'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the namespace name'/>
+ </function>
+ <function name='xmlXPathRegisterVariable' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a new variable value. If @value is NULL it unregisters the variable</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the variable name'/>
+ <arg name='value' type='xmlXPathObjectPtr' info='the variable value or NULL'/>
+ </function>
+ <function name='xmlXPathRegisterVariableLookup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>register an external mechanism to do variable lookup</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='f' type='xmlXPathVariableLookupFunc' info='the lookup function'/>
+ <arg name='data' type='void *' info='the lookup data'/>
+ </function>
+ <function name='xmlXPathRegisterVariableNS' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a new variable value. If @value is NULL it unregisters the variable</info>
+ <return type='int' info='0 in case of success, -1 in case of error'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the variable name'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the variable namespace URI'/>
+ <arg name='value' type='xmlXPathObjectPtr' info='the variable value or NULL'/>
+ </function>
+ <function name='xmlXPathRegisteredFuncsCleanup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Cleanup the XPath context data associated to registered functions</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathRegisteredNsCleanup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Cleanup the XPath context data associated to registered variables</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathRegisteredVariablesCleanup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Cleanup the XPath context data associated to registered variables</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathRoot' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Initialize the context to the root of the document</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathRoundFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is even is returned.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathSetContextNode' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Sets &apos;node&apos; as the context node. The node must be in the same document as that associated with the context.</info>
+ <return type='int' info='-1 in case of error or 0 if successful'/>
+ <arg name='node' type='xmlNodePtr' info='the node to to use as the context node'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathStartsWithFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathStringEvalNumber' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>[30a] Float ::= Number (&apos;e&apos; Digits?)? [30] Number ::= Digits (&apos;.&apos; Digits?)? | &apos;.&apos; Digits [31] Digits ::= [0-9]+ Compile a Number in the string In complement of the Number expression, this function also handles negative values : &apos;-&apos; Number.</info>
+ <return type='double' info='the double value.'/>
+ <arg name='str' type='const xmlChar *' info='A string to scan'/>
+ </function>
+ <function name='xmlXPathStringFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the string() XPath function string string(object?) The string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true. If the argument is omitted, it defaults to a node-set with the context node as its only member.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathStringLengthFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the string-length() XPath function number string-length(string?) The string-length returns the number of characters in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathSubValues' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathSubstringAfterFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after(&quot;1999/04/01&quot;,&quot;/&quot;) returns 04/01, and substring-after(&quot;1999/04/01&quot;,&quot;19&quot;) returns 99/04/01.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathSubstringBeforeFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before(&quot;1999/04/01&quot;,&quot;/&quot;) returns 1999.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathSubstringFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring(&quot;12345&quot;,2,3) returns &quot;234&quot;. If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring(&quot;12345&quot;,2) returns &quot;2345&quot;. More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring(&quot;12345&quot;, 1.5, 2.6) returns &quot;234&quot; - substring(&quot;12345&quot;, 0, 3) returns &quot;12&quot; - substring(&quot;12345&quot;, 0 div 0, 3) returns &quot;&quot; - substring(&quot;12345&quot;, 1, 0 div 0) returns &quot;&quot; - substring(&quot;12345&quot;, -42, 1 div 0) returns &quot;12345&quot; - substring(&quot;12345&quot;, -1 div 0, 1 div 0) returns &quot;&quot;</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathSumFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathTrailing' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called.</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn&apos;t contain @nodes2'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set'/>
+ </function>
+ <function name='xmlXPathTrailingSorted' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implements the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)</info>
+ <return type='xmlNodeSetPtr' info='the nodes in @nodes1 that follow the first node in @nodes2 in document order, @nodes1 if @nodes2 is NULL or empty or an empty node-set if @nodes1 doesn&apos;t contain @nodes2'/>
+ <arg name='nodes1' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ <arg name='nodes2' type='xmlNodeSetPtr' info='a node-set, sorted by document order'/>
+ </function>
+ <function name='xmlXPathTranslateFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate(&quot;bar&quot;,&quot;abc&quot;,&quot;ABC&quot;) returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate(&quot;--aaa--&quot;,&quot;abc-&quot;,&quot;ABC&quot;)</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathTrueFunction' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the true() XPath function boolean true()</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='nargs' type='int' info='the number of arguments'/>
+ </function>
+ <function name='xmlXPathValueFlipSign' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ </function>
+ <function name='xmlXPathVariableLookup' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Search in the Variable array of the context for the given variable value.</info>
+ <return type='xmlXPathObjectPtr' info='a copy of the value or NULL if not found'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the variable name'/>
+ </function>
+ <functype name='xmlXPathVariableLookupFunc' file='xpath' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Prototype for callbacks used to plug variable lookup in the XPath engine.</info>
+ <return type='xmlXPathObjectPtr' info='the XPath object value or NULL if not found.'/>
+ <arg name='ctxt' type='void *' info='an XPath context'/>
+ <arg name='name' type='const xmlChar *' info='name of the variable'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the namespace name hosting this variable'/>
+ </functype>
+ <function name='xmlXPathVariableLookupNS' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Search in the Variable array of the context for the given variable value.</info>
+ <return type='xmlXPathObjectPtr' info='the a copy of the value or NULL if not found'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name='name' type='const xmlChar *' info='the variable name'/>
+ <arg name='ns_uri' type='const xmlChar *' info='the variable namespace URI'/>
+ </function>
+ <function name='xmlXPathWrapCString' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Wraps a string into an XPath object.</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='char *' info='the char * value'/>
+ </function>
+ <function name='xmlXPathWrapExternal' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Wraps the @val data into an XPath object.</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='void *' info='the user data'/>
+ </function>
+ <function name='xmlXPathWrapNodeSet' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Wrap the Nodeset @val in a new xmlXPathObjectPtr</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlNodeSetPtr' info='the NodePtr value'/>
+ </function>
+ <function name='xmlXPathWrapString' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Wraps the @val string into an XPath object.</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlChar *' info='the xmlChar * value'/>
+ </function>
+ <function name='xmlXPatherror' file='xpathInternals' module='xpath'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Formats an error message.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath Parser context'/>
+ <arg name='file' type='const char *' info='the file name'/>
+ <arg name='line' type='int' info='the line number'/>
+ <arg name='no' type='int' info='the error number'/>
+ </function>
+ <function name='xmlXPtrBuildNodeList' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Build a node list tree copy of the XPointer result. This will drop Attributes and Namespace declarations.</info>
+ <return type='xmlNodePtr' info='an xmlNodePtr list or NULL. the caller has to free the node tree.'/>
+ <arg name='obj' type='xmlXPathObjectPtr' info='the XPointer result from the evaluation.'/>
+ </function>
+ <function name='xmlXPtrEval' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Evaluate the XPath Location Path in the given context.</info>
+ <return type='xmlXPathObjectPtr' info='the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.'/>
+ <arg name='str' type='const xmlChar *' info='the XPointer expression'/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the XPointer context'/>
+ </function>
+ <function name='xmlXPtrEvalRangePredicate' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>[8] Predicate ::= &apos;[&apos; PredicateExpr &apos;]&apos; [9] PredicateExpr ::= Expr Evaluate a predicate as in xmlXPathEvalPredicate() but for a Location Set instead of a node set</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPointer Parser context'/>
+ </function>
+ <function name='xmlXPtrFreeLocationSet' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Free the LocationSet compound (not the actual ranges !).</info>
+ <return type='void'/>
+ <arg name='obj' type='xmlLocationSetPtr' info='the xmlLocationSetPtr to free'/>
+ </function>
+ <function name='xmlXPtrLocationSetAdd' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set @val is freed.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlLocationSetPtr' info='the initial range set'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='a new xmlXPathObjectPtr'/>
+ </function>
+ <function name='xmlXPtrLocationSetCreate' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlLocationSetPtr of type double and of value @val</info>
+ <return type='xmlLocationSetPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an initial xmlXPathObjectPtr, or NULL'/>
+ </function>
+ <function name='xmlXPtrLocationSetDel' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Removes an xmlXPathObjectPtr from an existing LocationSet</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlLocationSetPtr' info='the initial range set'/>
+ <arg name='val' type='xmlXPathObjectPtr' info='an xmlXPathObjectPtr'/>
+ </function>
+ <function name='xmlXPtrLocationSetMerge' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Merges two rangesets, all ranges from @val2 are added to @val1</info>
+ <return type='xmlLocationSetPtr' info='val1 once extended or NULL in case of error.'/>
+ <arg name='val1' type='xmlLocationSetPtr' info='the first LocationSet'/>
+ <arg name='val2' type='xmlLocationSetPtr' info='the second LocationSet'/>
+ </function>
+ <function name='xmlXPtrLocationSetRemove' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Removes an entry from an existing LocationSet list.</info>
+ <return type='void'/>
+ <arg name='cur' type='xmlLocationSetPtr' info='the initial range set'/>
+ <arg name='val' type='int' info='the index to remove'/>
+ </function>
+ <function name='xmlXPtrNewCollapsedRange' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range using a single nodes</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the starting and ending node'/>
+ </function>
+ <function name='xmlXPtrNewContext' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new XPointer context</info>
+ <return type='xmlXPathContextPtr' info='the xmlXPathContext just allocated.'/>
+ <arg name='doc' type='xmlDocPtr' info='the XML document'/>
+ <arg name='here' type='xmlNodePtr' info='the node that directly contains the XPointer being evaluated or NULL'/>
+ <arg name='origin' type='xmlNodePtr' info='the element from which a user or program initiated traversal of the link, or NULL.'/>
+ </function>
+ <function name='xmlXPtrNewLocationSetNodeSet' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type LocationSet and initialize it with all the nodes from @set</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='set' type='xmlNodeSetPtr' info='a node set'/>
+ </function>
+ <function name='xmlXPtrNewLocationSetNodes' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes @start and @end</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the start NodePtr value'/>
+ <arg name='end' type='xmlNodePtr' info='the end NodePtr value or NULL'/>
+ </function>
+ <function name='xmlXPtrNewRange' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the starting node'/>
+ <arg name='startindex' type='int' info='the start index'/>
+ <arg name='end' type='xmlNodePtr' info='the ending point'/>
+ <arg name='endindex' type='int' info='the ending index'/>
+ </function>
+ <function name='xmlXPtrNewRangeNodeObject' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range from a not to an object</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the starting node'/>
+ <arg name='end' type='xmlXPathObjectPtr' info='the ending object'/>
+ </function>
+ <function name='xmlXPtrNewRangeNodePoint' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range from a node to a point</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the starting node'/>
+ <arg name='end' type='xmlXPathObjectPtr' info='the ending point'/>
+ </function>
+ <function name='xmlXPtrNewRangeNodes' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range using 2 nodes</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlNodePtr' info='the starting node'/>
+ <arg name='end' type='xmlNodePtr' info='the ending node'/>
+ </function>
+ <function name='xmlXPtrNewRangePointNode' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range from a point to a node</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlXPathObjectPtr' info='the starting point'/>
+ <arg name='end' type='xmlNodePtr' info='the ending node'/>
+ </function>
+ <function name='xmlXPtrNewRangePoints' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Create a new xmlXPathObjectPtr of type range using 2 Points</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='start' type='xmlXPathObjectPtr' info='the starting point'/>
+ <arg name='end' type='xmlXPathObjectPtr' info='the ending point'/>
+ </function>
+ <function name='xmlXPtrRangeToFunction' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Implement the range-to() XPointer function</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPointer Parser context'/>
+ <arg name='nargs' type='int' info='the number of args'/>
+ </function>
+ <function name='xmlXPtrWrapLocationSet' file='xpointer' module='xpointer'>
+ <cond>defined(LIBXML_XPTR_ENABLED)</cond>
+ <info>Wrap the LocationSet @val in a new xmlXPathObjectPtr</info>
+ <return type='xmlXPathObjectPtr' info='the newly created object.'/>
+ <arg name='val' type='xmlLocationSetPtr' info='the LocationSet value'/>
+ </function>
+ </symbols>
+</api>
diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa
new file mode 100644
index 0000000..da61d57
--- /dev/null
+++ b/doc/libxml2.xsa
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsa PUBLIC "-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML" "http://www.garshol.priv.no/download/xsa/xsa.dtd">
+<xsa>
+ <vendor>
+ <name>Daniel Veillard</name>
+ <email>daniel@veillard.com</email>
+ <url>http://veillard.com/</url>
+ </vendor>
+ <product id="libxml2">
+ <name>libxml2</name>
+ <version>2.9.1</version>
+ <last-release> Apr 19 2013</last-release>
+ <info-url>http://xmlsoft.org/</info-url>
+ <changes> - Features:
+ Support for Python3 (Daniel Veillard),
+ Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)
+
+ - Documentation:
+ Add documentation for xmllint --xpath (Daniel Veillard),
+ Fix the URL of the SAX documentation from James (Daniel Veillard),
+ Fix spelling of "length". (Michael Wood)
+
+ - Portability:
+ Fix python bindings with versions older than 2.7 (Daniel Veillard),
+ rebuild docs:Makefile.am (Roumen Petrov),
+ elfgcchack.h after rebuild in doc (Roumen Petrov),
+ elfgcchack for buf module (Roumen Petrov),
+ Fix a uneeded and wrong extra link parameter (Daniel Veillard),
+ Few cleanup patches for Windows (Denis Pauk),
+ Fix rpmbuild --nocheck (Mark Salter),
+ Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),
+ Fix Broken multi-arch support in xml2-config (Daniel Veillard),
+ Fix a portability issue for GCC &lt; 3.4.0 (Daniel Veillard),
+ Windows build fixes (Daniel Richard),
+ Fix a thread portability problem (Friedrich Haubensak),
+ Downgrade autoconf requirement to 2.63 (Daniel Veillard)
+
+ - Bug Fixes:
+ Fix a linking error for python bindings (Daniel Veillard),
+ Fix a couple of return without value (Jüri Aedla),
+ Improve the hashing functions (Daniel Franke),
+ Improve handling of xmlStopParser() (Daniel Veillard),
+ Remove risk of lockup in dictionary initialization (Daniel Veillard),
+ Activate detection of encoding in external subset (Daniel Veillard),
+ Fix an output buffer flushing conversion bug (Mikhail Titov),
+ Fix an old bug in xmlSchemaValidateOneElement (Csaba László),
+ Fix configure cannot remove messages (Gilles Espinasse),
+ fix schema validation in combination with xsi:nil (Daniel Veillard),
+ xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),
+ Fix a few problems with setEntityLoader (Alexey Neyman),
+ Detect excessive entities expansion upon replacement (Daniel Veillard),
+ Fix the flushing out of raw buffers on encoding conversions (Daniel,
+Veillard),
+ Fix some buffer conversion issues (Daniel Veillard),
+ When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,
+Veillard),
+ Fix an error in the progressive DTD parsing code (Dan Winship),
+ xmllint should not load DTD by default when using the reader (Daniel,
+Veillard),
+ Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),
+ Fix potential out of bound access (Daniel Veillard),
+ Fix large parse of file from memory (Daniel Veillard),
+ Fix a bug in the nsclean option of the parser (Daniel Veillard),
+ Fix a regression in 2.9.0 breaking validation while streaming (Daniel,
+Veillard),
+ Remove potential calls to exit() (Daniel Veillard)
+
+ - Improvements:
+ Regenerated API, and testapi, rebuild documentation (Daniel Veillard),
+ Fix tree iterators broken by 2to3 script (Daniel Veillard),
+ update all tests for Python3 and Python2 (Daniel Veillard),
+ A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),
+ Fix compilation on Python3 (Daniel Veillard),
+ Converting apibuild.py to python3 (Daniel Veillard),
+ First pass at starting porting to python3 (Daniel Veillard),
+ updated configure.in for python3 (Daniel Veillard),
+ Add support for xpathRegisterVariable in Python (Shaun McCance),
+ Added a regression tests from bug 694228 data (Daniel Veillard),
+ Cache presence of '&lt;' in entities content (Daniel Veillard),
+ Avoid extra processing on entities (Daniel Veillard),
+ Python binding for xmlRegisterInputCallback (Alexey Neyman),
+ Python bindings: DOM casts everything to xmlNode (Alexey Neyman),
+ Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),
+ Adding streaming validation to runtest checks (Daniel Veillard),
+ Add a --pushsmall option to xmllint (Daniel Veillard)
+
+ - Cleanups:
+ Switched comment in file to UTF-8 encoding (Daniel Veillard),
+ Extend gitignore (Daniel Veillard),
+ Silent the new python test on input (Alexey Neyman),
+ Cleanup of a duplicate test (Daniel Veillard),
+ Cleanup on duplicate test expressions (Daniel Veillard),
+ Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,
+Gansterer),
+ Spec cleanups and a fix for multiarch support (Daniel Veillard),
+ Silence a clang warning (Daniel Veillard),
+ Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),
+ rand_seed should be static in dict.c (Wouter Van Rooy),
+ Fix typos in parser comments (Jan Pokorný)
+
+
+</changes>
+ </product>
+</xsa>
diff --git a/doc/namespaces.html b/doc/namespaces.html
new file mode 100644
index 0000000..878f7fe
--- /dev/null
+++ b/doc/namespaces.html
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Namespaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Namespaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The libxml2 library implements <a href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by
+recognizing namespace constructs in the input, and does namespace lookup
+automatically when building the DOM tree. A namespace declaration is
+associated with an in-memory structure and all elements or attributes within
+that namespace point to it. Hence testing the namespace is a simple and fast
+equality operation at the user level.</p><p>I suggest that people using libxml2 use a namespace, and declare it in the
+root element of their document as the default namespace. Then they don't need
+to use the prefix in the content but we will have a basis for future semantic
+refinement and merging of data from different sources. This doesn't increase
+the size of the XML output significantly, but significantly increases its
+value in the long-term. Example:</p><pre>&lt;mydoc xmlns="http://mydoc.example.org/schemas/"&gt;
+ &lt;elem1&gt;...&lt;/elem1&gt;
+ &lt;elem2&gt;...&lt;/elem2&gt;
+&lt;/mydoc&gt;</pre><p>The namespace value has to be an absolute URL, but the URL doesn't have to
+point to any existing resource on the Web. It will bind all the element and
+attributes with that URL. I suggest to use an URL within a domain you
+control, and that the URL should contain some kind of version information if
+possible. For example, <code>"http://www.gnome.org/gnumeric/1.0/"</code> is a
+good namespace scheme.</p><p>Then when you load a file, make sure that a namespace carrying the
+version-independent prefix is installed on the root element of your document,
+and if the version information don't match something you know, warn the user
+and be liberal in what you accept as the input. Also do *not* try to base
+namespace checking on the prefix value. &lt;foo:text&gt; may be exactly the
+same as &lt;bar:text&gt; in another document. What really matters is the URI
+associated with the element or the attribute, not the prefix string (which is
+just a shortcut for the full URI). In libxml, element and attributes have an
+<code>ns</code> field pointing to an xmlNs structure detailing the namespace
+prefix and its URI.</p><p>@@Interfaces@@</p><pre>xmlNodePtr node;
+if(!strncmp(node-&gt;name,"mytag",5)
+ &amp;&amp; node-&gt;ns
+ &amp;&amp; !strcmp(node-&gt;ns-&gt;href,"http://www.mysite.com/myns/1.0")) {
+ ...
+}</pre><p>Usually people object to using namespaces together with validity checking.
+I will try to make sure that using namespaces won't break validity checking,
+so even if you plan to use or currently are using validation I strongly
+suggest adding namespaces to your document. A default namespace scheme
+<code>xmlns="http://...."</code> should not break validity even on less
+flexible parsers. Using namespaces to mix and differentiate content coming
+from multiple DTDs will certainly break current validation schemes. To check
+such documents one needs to use schema-validation, which is supported in
+libxml2 as well. See <a href="http://www.relaxng.org/">relagx-ng</a> and <a href="http://www.w3c.org/XML/Schema">w3c-schema</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/newapi.xsl b/doc/newapi.xsl
new file mode 100644
index 0000000..b809382
--- /dev/null
+++ b/doc/newapi.xsl
@@ -0,0 +1,766 @@
+<?xml version="1.0"?>
+<!--
+ Stylesheet to generate the HTML documentation from an XML API descriptions:
+ xsltproc newapi.xsl libxml2-api.xml
+
+ Daniel Veillard
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="exsl str"
+ exclude-result-prefixes="exsl str">
+
+ <!-- Import the main part of the site stylesheets -->
+ <xsl:import href="site.xsl"/>
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <!-- Build keys for all symbols -->
+ <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
+
+ <!-- the target directory for the HTML output -->
+ <xsl:variable name="htmldir">html</xsl:variable>
+ <xsl:variable name="href_base">../</xsl:variable>
+
+ <!-- The table of content for the HTML API pages -->
+ <xsl:variable name="menu_name">API Menu</xsl:variable>
+ <xsl:variable name="apitoc">
+ <form action="../search.php"
+ enctype="application/x-www-form-urlencoded" method="get">
+ <input name="query" type="text" size="20" value=""/>
+ <input name="submit" type="submit" value="Search ..."/>
+ </form>
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a style="font-weight:bold"
+ href="{$href_base}index.html">Main Menu</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}docs.html">Developer Menu</a></li>
+ <li><a style="font-weight:bold"
+ href="{$href_base}examples/index.html">Code Examples</a></li>
+ <li><a style="font-weight:bold"
+ href="index.html">API Menu</a></li>
+ <li><a href="libxml-parser.html">Parser API</a></li>
+ <li><a href="libxml-tree.html">Tree API</a></li>
+ <li><a href="libxml-xmlreader.html">Reader API</a></li>
+ <li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
+ <li><a href="{$href_base}ChangeLog.html">ChangeLog</a></li>
+ </ul>
+ </xsl:variable>
+ <xsl:template name="apitoc">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b><xsl:value-of select="$menu_name"/></b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$apitoc"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>API Indexes</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$api"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>Related links</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$related"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template name="docstyle">
+ <style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;background: #EECFA1}
+ </style>
+ </xsl:template>
+ <xsl:template name="navbar">
+ <xsl:variable name="previous" select="preceding-sibling::file[1]"/>
+ <xsl:variable name="next" select="following-sibling::file[1]"/>
+ <table class="navigation" width="100%" summary="Navigation header"
+ cellpadding="2" cellspacing="2">
+ <tr valign="middle">
+ <xsl:if test="$previous">
+ <td><a accesskey="p" href="libxml-{$previous/@name}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td>
+ <th align="left"><a href="libxml-{$previous/@name}.html"><xsl:value-of select="$previous/@name"/></a></th>
+ </xsl:if>
+ <td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
+ <th align="left"><a href="index.html">API documentation</a></th>
+ <td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
+ <th align="center"><a href="../index.html">The XML C parser and toolkit of Gnome</a></th>
+ <xsl:if test="$next">
+ <th align="right"><a href="libxml-{$next/@name}.html"><xsl:value-of select="$next/@name"/></a></th>
+ <td><a accesskey="n" href="libxml-{$next/@name}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td>
+ </xsl:if>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <!-- This is convoluted but needed to force the current document to
+ be the API one and not the result tree from the tokenize() result,
+ because the keys are only defined on the main document -->
+ <xsl:template mode="dumptoken" match='*'>
+ <xsl:param name="token"/>
+ <xsl:variable name="ref" select="key('symbols', $token)"/>
+ <xsl:choose>
+ <xsl:when test="$ref">
+ <a href="libxml-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$token"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- dumps a string, making cross-reference links -->
+ <xsl:template name="dumptext">
+ <xsl:param name="text"/>
+ <xsl:variable name="ctxt" select='.'/>
+ <!-- <xsl:value-of select="$text"/> -->
+ <xsl:for-each select="str:tokenize($text, ' &#9;')">
+ <xsl:apply-templates select="$ctxt" mode='dumptoken'>
+ <xsl:with-param name="token" select="string(.)"/>
+ </xsl:apply-templates>
+ <xsl:if test="position() != last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="macro" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="variable" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>Variable </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="string(@type)"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a name="{@name}"></a>
+ <xsl:value-of select="@name"/>
+ <xsl:text>
+
+</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="typedef" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <pre class="programlisting">
+ <xsl:choose>
+ <xsl:when test="@type = 'enum'">
+ <xsl:text>Enum </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Typedef </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a name="{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="typedef[@type = 'enum']">
+ <xsl:variable name="name" select="string(@name)"/>
+ <h3>Enum <a name="{$name}"><xsl:value-of select="$name"/></a></h3>
+ <pre class="programlisting">
+ <xsl:text>Enum </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text> {
+</xsl:text>
+ <xsl:for-each select="/api/symbols/enum[@type = $name]">
+ <xsl:sort select="@value" data-type="number" order="ascending"/>
+ <xsl:text> </xsl:text>
+ <a name="{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:if test="@info != ''">
+ <xsl:text> : </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>}
+</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="struct" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>Structure </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><br/>
+ <xsl:value-of select="@type"/><xsl:text>
+</xsl:text>
+ <xsl:if test="not(field)">
+ <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+ </xsl:if>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="struct">
+ <h3><a name="{@name}">Structure <xsl:value-of select="@name"/></a></h3>
+ <pre class="programlisting">
+ <xsl:text>Structure </xsl:text><xsl:value-of select="@name"/><br/>
+ <xsl:value-of select="@type"/><xsl:text> {
+</xsl:text>
+ <xsl:if test="not(field)">
+ <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="field">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="@info != ''">
+ <xsl:text>&#9;: </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="substring(@info, 1, 40)"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>}</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="macro">
+ <xsl:variable name="name" select="string(@name)"/>
+ <h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3>
+ <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="function" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <a href="#{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </pre><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="functype" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <pre class="programlisting">
+ <xsl:text>Function type: </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)
+</xsl:text>
+ </pre>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="functype">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <h3>
+ <a name="{$name}"></a>
+ <xsl:text>Function type: </xsl:text>
+ <xsl:value-of select="$name"/>
+ </h3>
+ <pre class="programlisting">
+ <xsl:text>Function type: </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>
+</xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p>
+ <xsl:if test="arg | return">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ <br/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="function">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text><br/>
+ <xsl:text>
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ <xsl:if test="arg | return/@info">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="exports" mode="toc">
+ <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>
+ </xsl:template>
+
+ <xsl:template match="exports">
+ <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>
+ </xsl:template>
+
+ <xsl:template name="description">
+ <xsl:if test="deprecated">
+ <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>
+ </xsl:if>
+ <xsl:if test="description">
+ <p><xsl:value-of select="description"/></p>
+ </xsl:if>
+ </xsl:template>
+
+<!--
+ <xsl:template name="docomponents">
+ <xsl:param name="mode"/>
+ <xsl:apply-templates select="exports[@type='macro']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ </xsl:template>
+-->
+
+ <xsl:template match="file">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
+ <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:call-template name="docstyle"/>
+ <title><xsl:value-of select="$title"/></title>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="apitoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:call-template name="navbar"/>
+ <xsl:call-template name="description"/>
+ <xsl:choose>
+ <xsl:when test="deprecated">
+ <div class="deprecated">
+ <h2>Table of Contents</h2>
+ <xsl:apply-templates select="exports" mode="toc"/>
+ <h2>Description</h2>
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="exports"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>Table of Contents</h2>
+ <xsl:apply-templates select="exports[@type='macro']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <h2>Description</h2>
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="exports[@type='macro']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="file" mode="toc">
+ <xsl:variable name="name" select="@name"/>
+ <li>
+ <a href="libxml-{$name}.html"><xsl:value-of select="$name"/></a>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="summary"/>
+ </li>
+ </xsl:template>
+
+ <xsl:template name="mainpage">
+ <xsl:param name="file" select="concat($htmldir, '/index.html')"/>
+ <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>
+ <xsl:document href="{$file}" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:call-template name="docstyle"/>
+ <title><xsl:value-of select="$title"/></title>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="apitoc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <h2>Table of Contents</h2>
+ <ul>
+ <xsl:apply-templates select="/api/files/file" mode="toc"/>
+ </ul>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <!-- Save the main index.html as well as a couple of copies -->
+ <xsl:call-template name="mainpage"/>
+ <xsl:call-template name="mainpage">
+ <xsl:with-param name="file" select="concat($htmldir, '/book1.html')"/>
+ </xsl:call-template>
+ <xsl:call-template name="mainpage">
+ <xsl:with-param name="file" select="concat($htmldir, '/libxml-lib.html')"/>
+ </xsl:call-template>
+ <!-- now build the file for each of the modules -->
+ <xsl:apply-templates select="/api/files/file"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/news.html b/doc/news.html
new file mode 100644
index 0000000..5c03ba3
--- /dev/null
+++ b/doc/news.html
@@ -0,0 +1,2368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Releases</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Releases</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
+to the <a href="http://git.gnome.org/browse/libxml2/">GIT</a> code base.</p><p>Here is the list of public releases:</p><h3>2.9.2: Oct 16 2014</h3><ul>
+ <li>Security:<br />
+ Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),<br />
+ CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)<br />
+ </li>
+
+ <li>Bug Fixes:<br />
+ fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),<br />
+ xmlmemory: handle realloc properly (Yegor Yefremov),<br />
+ Python generator bug raised by the const change (Daniel Veillard),<br />
+ Windows Critical sections not released correctly (Daniel Veillard),<br />
+ Parser error on repeated recursive entity expansion containing &amp;lt; (Daniel Veillard),<br />
+ xpointer : fixing Null Pointers (Gaurav Gupta),<br />
+ Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),<br />
+ parser bug on misformed namespace attributes (Dennis Filder),<br />
+ Pointer dereferenced before null check (Daniel Veillard),<br />
+ Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),<br />
+ Possible overflow in HTMLParser.c (Daniel Veillard),<br />
+ python/tests/sync.py assumes Python dictionaries are ordered (John Beck),<br />
+ Fix Enum check and missing break (Gaurav Gupta),<br />
+ xmlIO: Handle error returns from dup() (Philip Withnall),<br />
+ Fix a problem properly saving URIs (Daniel Veillard),<br />
+ wrong error column in structured error when parsing attribute values (Juergen Keil),<br />
+ wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),<br />
+ no error column in structured error handler for xml schema validation errors (Juergen Keil),<br />
+ Couple of Missing Null checks (Gaurav Gupta),<br />
+ Add couple of missing Null checks (Daniel Veillard),<br />
+ xmlschemastypes: Fix potential array overflow (Philip Withnall),<br />
+ runtest: Fix a memory leak on parse failure (Philip Withnall),<br />
+ xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),<br />
+ xmlcatalog: Fix a memory leak on quit (Philip Withnall),<br />
+ HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),<br />
+ Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),<br />
+ Avoid Possible Null Pointer in trio.c (Gaurav Gupta),<br />
+ Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),<br />
+ XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),<br />
+ Fix various Missing Null checks (Gaurav Gupta),<br />
+ Fix a potential NULL dereference (Daniel Veillard),<br />
+ Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),<br />
+ Add a missing argument check (Gaurav Gupta),<br />
+ Adding a check in case of allocation error (Gaurav Gupta),<br />
+ xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),<br />
+ Adding some missing NULL checks (Gaurav),<br />
+ Fixes for xmlInitParserCtxt (Daniel Veillard),<br />
+ Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),<br />
+ erroneously ignores a validation error if no error callback set (Daniel Veillard),<br />
+ xmllint was not parsing the --c14n11 flag (Sérgio Batista),<br />
+ Avoid Possible null pointer dereference in memory debug mode (Gaurav),<br />
+ Avoid Double Null Check (Gaurav),<br />
+ Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),<br />
+ Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),<br />
+ Avoid a possible NULL pointer dereference (Gaurav),<br />
+ Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),<br />
+ Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),<br />
+ fixing a ptotential uninitialized access (Daniel Veillard),<br />
+ Fix an fd leak in an error case (Daniel Veillard),<br />
+ Missing initialization for the catalog module (Daniel Veillard),<br />
+ Handling of XPath function arguments in error case (Nick Wellnhofer),<br />
+ Fix a couple of missing NULL checks (Gaurav),<br />
+ Avoid a possibility of dangling encoding handler (Gaurav),<br />
+ Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),<br />
+ Fix a bug loading some compressed files (Mike Alexander),<br />
+ Fix XPath node comparison bug (Gaurav),<br />
+ Type mismatch in xmlschemas.c (Gaurav),<br />
+ Type mismatch in xmlschemastypes.c (Gaurav),<br />
+ Avoid a deadcode in catalog.c (Daniel Veillard),<br />
+ run close socket on Solaris, same as we do on other platforms (Denis Pauk),<br />
+ Fix pointer dereferenced before null check (Gaurav),<br />
+ Fix a potential NULL dereference in tree code (Daniel Veillard),<br />
+ Fix potential NULL pointer dereferences in regexp code (Gaurav),<br />
+ xmllint --pretty crashed without following numeric argument (Tim Galeckas),<br />
+ Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),<br />
+ Fix XPath '//' optimization with predicates (Nick Wellnhofer),<br />
+ Clear up a potential NULL dereference (Daniel Veillard),<br />
+ Fix a possible NULL dereference (Gaurav),<br />
+ Avoid crash if allocation fails (Daniel Veillard),<br />
+ Remove occasional leading space in XPath number formatting (Daniel Veillard),<br />
+ Fix handling of mmap errors (Daniel Veillard),<br />
+ Catch malloc error and exit accordingly (Daniel Veillard),<br />
+ missing else in xlink.c (Ami Fischman),<br />
+ Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),<br />
+ Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),<br />
+ properly quote the namespace uris written out during c14n (Aleksey Sanin),<br />
+ Remove premature XInclude check on URI being relative (Alexey Neyman),<br />
+ Fix missing break on last() function for attributes (dcb),<br />
+ Do not URI escape in server side includes (Romain Bondue),<br />
+ Fix an error in xmlCleanupParser (Alexander Pastukhov)<br />
+ </li>
+
+ <li>Documentation:<br />
+ typo in error messages "colon are forbidden from..." (Daniel Veillard),<br />
+ Fix a link to James SAX documentation old page (Daniel Veillard),<br />
+ Fix typos in relaxng.c (Jan Pokorný),<br />
+ Fix a doc typo (Daniel Veillard),<br />
+ Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),<br />
+ Add limitations about encoding conversion (Daniel Veillard),<br />
+ Fix typos in xmlschemas{,types}.c (Jan Pokorný),<br />
+ Fix incorrect spelling entites-&gt;entities (Jan Pokorný),<br />
+ Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)<br />
+ </li>
+
+ <li>Portability:<br />
+ AC_CONFIG_FILES and executable bit (Roumen Petrov),<br />
+ remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),<br />
+ fix some tabs mixing incompatible with python3 (Roumen Petrov),<br />
+ Visual Studio 14 CTP defines snprintf() (Francis Dupont),<br />
+ OS400: do not try to copy unexisting doc files (Patrick Monnerat),<br />
+ OS400: use either configure.ac or configure.in. (Patrick Monnerat),<br />
+ os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),<br />
+ OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),<br />
+ OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),<br />
+ OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),<br />
+ OS400: include in distribution tarball. (Patrick Monnerat),<br />
+ OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),<br />
+ OS400: Add compilation scripts. (Patrick Monnerat),<br />
+ OS400: ILE RPG language header files. (Patrick Monnerat),<br />
+ OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),<br />
+ OS400: UTF8&lt;--&gt;EBCDIC wrappers for system and external library calls (Patrick Monnerat),<br />
+ OS400: Easy character transcoding support (Patrick Monnerat),<br />
+ OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),<br />
+ OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),<br />
+ Fix building when configuring without xpath and xptr (Daniel Veillard),<br />
+ configure: Add --with-python-install-dir (Jonas Eriksson),<br />
+ Fix compilation with minimum and xinclude. (Nicolas Le Cam),<br />
+ Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),<br />
+ Fix compilation with minimum and schematron. (Nicolas Le Cam),<br />
+ Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),<br />
+ Don't use xmlValidateName() when not available. (Nicolas Le Cam),<br />
+ Fix a portability issue on Windows (Longstreth Jon),<br />
+ Various portability patches for OpenVMS (Jacob (Jouk) Jansen),<br />
+ Use specific macros for portability to OS/400 (Patrick Monnerat),<br />
+ Add macros needed for OS/400 portability (Patrick Monnerat),<br />
+ Portability patch for fopen on OS/400 (Patrick Monnerat),<br />
+ Portability fixes for OS/400 (Patrick Monnerat),<br />
+ Improve va_list portability (Patrick Monnerat),<br />
+ Portability fix (Patrick Monnerat),<br />
+ Portability fix (Patrick Monnerat),<br />
+ Generic portability fix (Patrick Monnerat),<br />
+ Shortening lines in headers (Patrick Monnerat),<br />
+ build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),<br />
+ build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),<br />
+ fix some tabs mixing incompatible with python3 (Daniel Veillard),<br />
+ add additional defines checks for support "./configure --with-minimum" (Denis Pauk),<br />
+ Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),<br />
+ python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),<br />
+ python: Fix compiler warnings when building python3 bindings (Armin K),<br />
+ Fix for compilation with python 2.6.8 (Petr Sumbera)<br />
+ </li>
+
+ <li>Improvements:<br />
+ win32/libxml2.def.src after rebuild in doc (Roumen Petrov),<br />
+ elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),<br />
+ elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),<br />
+ Provide cmake module (Samuel Martin),<br />
+ Fix a couple of issues raised by make dist (Daniel Veillard),<br />
+ Fix and add const qualifiers (Kurt Roeckx),<br />
+ Preparing for upcoming release of 2.9.2 (Daniel Veillard),<br />
+ Fix zlib and lzma libraries check via command line (Dmitriy),<br />
+ wrong error column in structured error when parsing end tag (Juergen Keil),<br />
+ doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),<br />
+ Add methods for python3 iterator (Ron Angeles),<br />
+ Support element node traversal in document fragments. (Kyle VanderBeek),<br />
+ xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),<br />
+ Added macros for argument casts (Eric Zurcher),<br />
+ adding init calls to xml and html Read parsing entry points (Daniel Veillard),<br />
+ Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),<br />
+ Implement choice for name classes on attributes (Shaun McCance),<br />
+ Two small namespace tweaks (Daniel Veillard),<br />
+ xmllint --memory should fail on empty files (Daniel Veillard),<br />
+ Cast encoding name to char pointer to match arg type (Nikolay Sivov)<br />
+ </li>
+
+ <li>Cleanups:<br />
+ Removal of old configure.in (Daniel Veillard),<br />
+ Unreachable code in tree.c (Gaurav Gupta),<br />
+ Remove a couple of dead conditions (Gaurav Gupta),<br />
+ Avoid some dead code and cleanup in relaxng.c (Gaurav),<br />
+ Drop not needed checks (Denis Pauk),<br />
+ Fix a wrong test (Daniel Veillard)<br />
+ </li>
+</ul><h3>2.9.1: Apr 19 2013</h3><ul>
+ <li> Features:<br />
+ Support for Python3 (Daniel Veillard),<br />
+ Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)<br />
+ </li>
+
+ <li> Documentation:<br />
+ Add documentation for xmllint --xpath (Daniel Veillard),<br />
+ Fix the URL of the SAX documentation from James (Daniel Veillard),<br />
+ Fix spelling of "length". (Michael Wood)<br />
+ </li>
+
+ <li> Portability:<br />
+ Fix python bindings with versions older than 2.7 (Daniel Veillard),<br />
+ rebuild docs:Makefile.am (Roumen Petrov),<br />
+ elfgcchack.h after rebuild in doc (Roumen Petrov),<br />
+ elfgcchack for buf module (Roumen Petrov),<br />
+ Fix a uneeded and wrong extra link parameter (Daniel Veillard),<br />
+ Few cleanup patches for Windows (Denis Pauk),<br />
+ Fix rpmbuild --nocheck (Mark Salter),<br />
+ Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),<br />
+ Fix Broken multi-arch support in xml2-config (Daniel Veillard),<br />
+ Fix a portability issue for GCC &lt; 3.4.0 (Daniel Veillard),<br />
+ Windows build fixes (Daniel Richard),<br />
+ Fix a thread portability problem (Friedrich Haubensak),<br />
+ Downgrade autoconf requirement to 2.63 (Daniel Veillard)<br />
+ </li>
+
+ <li> Bug Fixes:<br />
+ Fix a linking error for python bindings (Daniel Veillard),<br />
+ Fix a couple of return without value (Jüri Aedla),<br />
+ Improve the hashing functions (Daniel Franke),<br />
+ Improve handling of xmlStopParser() (Daniel Veillard),<br />
+ Remove risk of lockup in dictionary initialization (Daniel Veillard),<br />
+ Activate detection of encoding in external subset (Daniel Veillard),<br />
+ Fix an output buffer flushing conversion bug (Mikhail Titov),<br />
+ Fix an old bug in xmlSchemaValidateOneElement (Csaba László),<br />
+ Fix configure cannot remove messages (Gilles Espinasse),<br />
+ fix schema validation in combination with xsi:nil (Daniel Veillard),<br />
+ xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),<br />
+ Fix a few problems with setEntityLoader (Alexey Neyman),<br />
+ Detect excessive entities expansion upon replacement (Daniel Veillard),<br />
+ Fix the flushing out of raw buffers on encoding conversions (Daniel,<br />
+Veillard),<br />
+ Fix some buffer conversion issues (Daniel Veillard),<br />
+ When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,<br />
+Veillard),<br />
+ Fix an error in the progressive DTD parsing code (Dan Winship),<br />
+ xmllint should not load DTD by default when using the reader (Daniel,<br />
+Veillard),<br />
+ Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),<br />
+ Fix potential out of bound access (Daniel Veillard),<br />
+ Fix large parse of file from memory (Daniel Veillard),<br />
+ Fix a bug in the nsclean option of the parser (Daniel Veillard),<br />
+ Fix a regression in 2.9.0 breaking validation while streaming (Daniel,<br />
+Veillard),<br />
+ Remove potential calls to exit() (Daniel Veillard)<br />
+ </li>
+
+ <li> Improvements:<br />
+ Regenerated API, and testapi, rebuild documentation (Daniel Veillard),<br />
+ Fix tree iterators broken by 2to3 script (Daniel Veillard),<br />
+ update all tests for Python3 and Python2 (Daniel Veillard),<br />
+ A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),<br />
+ Fix compilation on Python3 (Daniel Veillard),<br />
+ Converting apibuild.py to python3 (Daniel Veillard),<br />
+ First pass at starting porting to python3 (Daniel Veillard),<br />
+ updated configure.in for python3 (Daniel Veillard),<br />
+ Add support for xpathRegisterVariable in Python (Shaun McCance),<br />
+ Added a regression tests from bug 694228 data (Daniel Veillard),<br />
+ Cache presence of '&lt;' in entities content (Daniel Veillard),<br />
+ Avoid extra processing on entities (Daniel Veillard),<br />
+ Python binding for xmlRegisterInputCallback (Alexey Neyman),<br />
+ Python bindings: DOM casts everything to xmlNode (Alexey Neyman),<br />
+ Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),<br />
+ Adding streaming validation to runtest checks (Daniel Veillard),<br />
+ Add a --pushsmall option to xmllint (Daniel Veillard)<br />
+ </li>
+
+ <li> Cleanups:<br />
+ Switched comment in file to UTF-8 encoding (Daniel Veillard),<br />
+ Extend gitignore (Daniel Veillard),<br />
+ Silent the new python test on input (Alexey Neyman),<br />
+ Cleanup of a duplicate test (Daniel Veillard),<br />
+ Cleanup on duplicate test expressions (Daniel Veillard),<br />
+ Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,<br />
+Gansterer),<br />
+ Spec cleanups and a fix for multiarch support (Daniel Veillard),<br />
+ Silence a clang warning (Daniel Veillard),<br />
+ Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),<br />
+ rand_seed should be static in dict.c (Wouter Van Rooy),<br />
+ Fix typos in parser comments (Jan Pokorný)<br />
+ </li>
+</ul><h3>2.9.0: Sep 11 2012</h3><ul>
+ <li> Features:<br />
+ A few new API entry points,<br />
+ More resilient push parser mode,<br />
+ A lot of portability improvement,<br />
+ Faster XPath evaluation<br />
+ </li>
+
+ <li> Documentation:<br />
+ xml2-config.1 markup error (Christian Weisgerber),<br />
+ libxml(3) manpage typo fix (John Bradshaw),<br />
+ More cleanups to the documentation part of libxml2 (Daniel Richard G)<br />
+ </li>
+
+ <li> Portability:<br />
+ Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),<br />
+ fix builds not having stdint.h (Rob Richards),<br />
+ GetProcAddressA is available only on WinCE (Daniel Veillard),<br />
+ More updates and cleanups on autotools and Makefiles (Daniel Richard G),<br />
+ More changes for Win32 compilation (Eric Zurcher),<br />
+ Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),<br />
+ Bundles all generated files for python into the distribution (Daniel Richard G),<br />
+ Fix compiler warnings of wincecompat.c (Patrick Gansterer),<br />
+ Fix non __GNUC__ build (Patrick Gansterer),<br />
+ Fix windows unicode build (Patrick Gansterer),<br />
+ clean redefinition of {v}snprintf in C-source (Roumen Petrov),<br />
+ use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),<br />
+ fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),<br />
+ Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),<br />
+ Various "make distcheck" and portability fixups (Daniel Richard G),<br />
+ Fix compilation on older Visual Studio (Daniel Veillard)<br />
+ </li>
+
+ <li> Bug Fixes:<br />
+ Change the XPath code to percolate allocation errors (Daniel Veillard),<br />
+ Fix reuse of xmlInitParser (Daniel Veillard),<br />
+ Fix potential crash on entities errors (Daniel Veillard),<br />
+ initialize var (Rob Richards),<br />
+ Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),<br />
+ Fix problem with specific and generic error handlers (Pietro Cerutti),<br />
+ Avoid a potential infinite recursion (Daniel Veillard),<br />
+ Fix an XSD error when generating internal automata (Daniel Veillard),<br />
+ Patch for xinclude of text using multibyte characters (Vitaly Ostanin),<br />
+ Fix a segfault on XSD validation on pattern error (Daniel Veillard),<br />
+ Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),<br />
+ Add a missing element check (Daniel Veillard),<br />
+ Adding various checks on node type though the API (Daniel Veillard),<br />
+ Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),<br />
+ Fix make dist to include new private header files (Daniel Veillard),<br />
+ More fixups on the push parser behaviour (Daniel Veillard),<br />
+ Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),<br />
+ Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),<br />
+ Fixup limits parser (Daniel Veillard),<br />
+ Do not fetch external parsed entities (Daniel Veillard),<br />
+ Fix an error in previous commit (Aron Xu),<br />
+ Fix entities local buffers size problems (Daniel Veillard),<br />
+ Fix parser local buffers size problems (Daniel Veillard),<br />
+ Fix a failure to report xmlreader parsing failures (Daniel Veillard)<br />
+ </li>
+
+ <li> Improvements:<br />
+ Keep libxml2.syms when running "make distclean" (Daniel Veillard),<br />
+ Allow to set the quoting character of an xmlWriter (Csaba Raduly),<br />
+ Keep non-significant blanks node in HTML parser (Daniel Veillard),<br />
+ Add a forbidden variable error number and message to XPath (Daniel Veillard),<br />
+ Support long path names on WNT (Michael Stahl),<br />
+ Improve HTML escaping of attribute on output (Daniel Veillard),<br />
+ Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),<br />
+ Switching XPath node sorting to Timsort (Vojtech Fried),<br />
+ Optimizing '//' in XPath expressions (Nick Wellnhofer),<br />
+ Expose xmlBufShrink in the public tree API (Daniel Veillard),<br />
+ Visible HTML elements close the head tag (Conrad Irwin),<br />
+ Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),<br />
+ Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),<br />
+ minimize use of HAVE_CONFIG_H (Roumen Petrov),<br />
+ fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),<br />
+ Add support for big line numbers in error reporting (Daniel Veillard),<br />
+ Avoid using xmlBuffer for serialization (Daniel Veillard),<br />
+ Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),<br />
+ Provide new accessors for xmlOutputBuffer (Daniel Veillard),<br />
+ Improvements for old buffer compatibility (Daniel Veillard),<br />
+ Expand the limit test program (Daniel Veillard),<br />
+ Improve error reporting on parser errors (Daniel Veillard),<br />
+ Implement some default limits in the XPath module (Daniel Veillard),<br />
+ Introduce some default parser limits (Daniel Veillard),<br />
+ Cleanups and new limit APIs for dictionaries (Daniel Veillard),<br />
+ Fixup for buf.c (Daniel Veillard),<br />
+ Cleanup URI module memory allocation code (Daniel Veillard),<br />
+ Extend testlimits (Daniel Veillard),<br />
+ More avoid quadratic behaviour (Daniel Veillard),<br />
+ Impose a reasonable limit on PI size (Daniel Veillard),<br />
+ first version of testlimits new test (Daniel Veillard),<br />
+ Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),<br />
+ Impose a reasonable limit on comment size (Daniel Veillard),<br />
+ Impose a reasonable limit on attribute size (Daniel Veillard),<br />
+ Harden the buffer code and make it more compatible (Daniel Veillard),<br />
+ More cleanups for input/buffers code (Daniel Veillard),<br />
+ Cleanup function xmlBufResetInput(),<br /> to set input from Buffer (Daniel Veillard)
+ Swicth the test program for characters to new input buffers (Daniel Veillard),<br />
+ Convert the HTML tree module to the new buffers (Daniel Veillard),<br />
+ Convert of the HTML parser to new input buffers (Daniel Veillard),<br />
+ Convert the writer to new output buffer and save APIs (Daniel Veillard),<br />
+ Convert XMLReader to the new input buffers (Daniel Veillard),<br />
+ New saving functions using xmlBuf and conversion (Daniel Veillard),<br />
+ Provide new xmlBuf based saving functions (Daniel Veillard),<br />
+ Convert XInclude to the new input buffers (Daniel Veillard),<br />
+ Convert catalog code to the new input buffers (Daniel Veillard),<br />
+ Convert C14N to the new Input buffer (Daniel Veillard),<br />
+ Convert xmlIO.c to the new input and output buffers (Daniel Veillard),<br />
+ Convert XML parser to the new input buffers (Daniel Veillard),<br />
+ Incompatible change to the Input and Output buffers (Daniel Veillard),<br />
+ Adding new encoding function to deal with the new structures (Daniel Veillard),<br />
+ Convert XPath to xmlBuf (Daniel Veillard),<br />
+ Adding a new buf module for buffers (Daniel Veillard),<br />
+ Memory error within SAX2 reuse common framework (Daniel Veillard),<br />
+ Fix xmllint --xpath node initialization (Daniel Veillard)<br />
+ </li>
+
+ <li> Cleanups:<br />
+ Various cleanups to avoid compiler warnings (Daniel Veillard),<br />
+ Big space and tab cleanup (Daniel Veillard),<br />
+ Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),<br />
+ Second round of cleanups for LibXML2 docs/examples (Daniel Richard),<br />
+ Remove all .cvsignore as they are not used anymore (Daniel Veillard),<br />
+ Fix a Timsort function helper comment (Daniel Veillard),<br />
+ Small cleanup for valgrind target (Daniel Veillard),<br />
+ Patch for portability of latin characters in C files (Daniel Veillard),<br />
+ Cleanup some of the parser code (Daniel Veillard),<br />
+ Fix a variable name in comment (Daniel Veillard),<br />
+ Regenerated testapi.c (Daniel Veillard),<br />
+ Regenerating docs and API files (Daniel Veillard),<br />
+ Small cleanup of unused variables in test (Daniel Veillard),<br />
+ Expand .gitignore with more files (Daniel Veillard)<br />
+ </li>
+</ul><h3>2.8.0: May 23 2012</h3><ul>
+ <li>Features:
+ add lzma compression support (Anders F Bjorklund)
+ </li>
+
+ <li>Documentation:
+ xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä),
+ Update README.tests (Daniel Veillard),
+ URI handling code is not OOM resilient (Daniel Veillard),
+ Fix an error in comment (Daniel Veillard),
+ Fixed bug #617016 (Daniel Mustieles),
+ Fixed two typos in the README document (Daniel Neel),
+ add generated html files (Anders F Bjorklund),
+ Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard),
+ Improve documentation a bit (Daniel Veillard),
+ Updated URL for lxml python bindings (Daniel Veillard)
+ </li>
+
+ <li>Portability:
+ Restore code for Windows compilation (Daniel Veillard),
+ Remove git error message during configure (Christian Dywan),
+ xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer),
+ remove a bashism in confgure.in (John Hein),
+ undef ERROR if already defined (Patrick R. Gansterer),
+ Fix library problems with mingw-w64 (Michael Cronenworth),
+ fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards),
+ prefer native threads on win32 (Sam Thursfield),
+ Allow to compile with Visual Studio 2010 (Thomas Lemm),
+ Fix mingw's snprintf configure check (Andoni Morales),
+ fixed a 64bit big endian issue (Marcus Meissner),
+ Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard),
+ Fix windows build from lzma addition (Rob Richards),
+ autogen: Only check for libtoolize (Colin Walters),
+ Fix the Windows build files (Patrick von Reth),
+ 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard),
+ 599241 fix an initialization problem on Win64 (Andrew W. Nosenko),
+ fix win build (Rob Richards)
+ </li>
+
+ <li>Bug fixes:
+ Part for rand_r checking missing (Daniel Veillard),
+ Cleanup on randomization (Daniel Veillard),
+ Fix undefined reference in python module (Pacho Ramos),
+ Fix a race in xmlNewInputStream (Daniel Veillard),
+ Fix weird streaming RelaxNG errors (Noam),
+ Fix various bugs in new code raised by the API checking (Daniel Veillard),
+ Fix various problems with "make dist" (Daniel Veillard),
+ Fix a memory leak in the xzlib code (Daniel Veillard),
+ HTML parser error with &lt;noscript&gt; in the &lt;head&gt; (Denis Pauk),
+ XSD: optional element in complex type extension (Remi Gacogne),
+ Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard),
+ Fix a wrong return value in previous patch (Daniel Veillard),
+ Fix an uninitialized variable use (Daniel Veillard),
+ Fix a compilation problem with --minimum (Brandon Slack),
+ Remove redundant and ungarded include of resolv.h (Daniel Veillard),
+ xinclude with parse="text" does not use the entity loader (Shaun McCance),
+ Allow to parse 1 byte HTML files (Denis Pauk),
+ Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder),
+ Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
+ Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
+ xmlParseNodeInContext problems with an empty document (Tim Elliott),
+ HTML element position is not detected propperly (Pavel Andrejs),
+ Fix an off by one pointer access (Jüri Aedla),
+ Try to fix a problem with entities in SAX mode (Daniel Veillard),
+ Fix a crash with xmllint --path on empty results (Daniel Veillard),
+ Fixed bug #667946 (Daniel Mustieles),
+ Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
+ Fix a wrong enum type use in Schemas Types (Nico Weber),
+ Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard),
+ Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard),
+ fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan),
+ fix a pair of possible out of array char references (Daniel Veillard),
+ Fix an allocation error when copying entities (Daniel Veillard),
+ Make sure the parser returns when getting a Stop order (Chris Evans),
+ Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng),
+ Fix a schema type duration comparison overflow (Daniel Veillard),
+ Fix an unimplemented part in RNG value validation (Daniel Veillard),
+ Fix missing error status in XPath evaluation (Daniel Veillard),
+ Hardening of XPath evaluation (Daniel Veillard),
+ Fix an off by one error in encoding (Daniel Veillard),
+ Fix RELAX NG include bug #655288 (Shaun McCance),
+ Fix XSD validation bug #630130 (Toyoda Eizi),
+ Fix some potential problems on reallocation failures (Chris Evans),
+ __xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin),
+ __xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin),
+ Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards),
+ Small fix for previous commit (Daniel Veillard),
+ Fix a potential freeing error in XPath (Daniel Veillard),
+ Fix a potential memory access error (Daniel Veillard),
+ Reactivate the shared library versionning script (Daniel Veillard)
+ </li>
+
+ <li>Improvements:
+ use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov),
+ New symbols added for the next release (Daniel Veillard),
+ xmlTextReader bails too quickly on error (Andy Lutomirski),
+ Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin),
+ Use buffers when constructing string node lists. (Conrad Irwin),
+ Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
+ wrong message for double hyphen in comment XML error (Bryan Henderson),
+ Fix "make tst" to grab lzma lib too (Daniel Veillard),
+ Add "whereis" command to xmllint shell (Ryan),
+ Improve xmllint shell (Ryan),
+ add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
+ Add --system support to autogen.sh (Daniel Veillard),
+ Add hash randomization to hash and dict structures (Daniel Veillard),
+ included xzlib in dist (Anders F Bjorklund),
+ move xz/lzma helpers to separate included files (Anders F Bjorklund),
+ add generated devhelp files (Anders F Bjorklund),
+ add XML_WITH_LZMA to api (Anders F Bjorklund),
+ autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
+ Improve the error report on undefined REFs (Daniel Veillard),
+ Add exception for new W3C PI xml-model (Daniel Veillard),
+ Add options to ignore the internal encoding (Daniel Veillard),
+ testapi: use the right type for the check (Stefan Kost),
+ various: handle return values of write calls (Stefan Kost),
+ testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost),
+ runxmlconf: update to latest testsuite version (Stefan Kost),
+ configure: add -Wno-long-long to CFLAGS (Stefan Kost),
+ configure: support silent automake rules if possible (Stefan Kost),
+ xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost),
+ __xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin),
+ __xmlRaiseError: do cheap code check early (Dmitry V. Levin)
+ </li>
+
+ <li>Cleanups:
+ Cleanups before 2.8.0-rc2 (Daniel Veillard),
+ Avoid an extra operation (Daniel Veillard),
+ Remove vestigial de-ANSI-fication support. (Javier Jardón),
+ autogen.sh: Fix typo (Javier Jardón),
+ Do not use unsigned but unsigned int (Daniel Veillard),
+ Remove two references to u_short (Daniel Veillard),
+ Fix -Wempty-body warning from clang (Nico Weber),
+ Cleanups of lzma support (Daniel Veillard),
+ Augment the list of ignored files (Daniel Veillard),
+ python: remove unused variable (Stefan Kost),
+ python: flag two unused args (Stefan Kost),
+ configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
+ xpath: remove unused variable (Stefan Kost)
+ </li>
+</ul><h3>2.7.8: Nov 4 2010</h3><ul>
+ <li> Features:
+ 480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
+ Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
+ </li>
+ <li> Documentation:
+ Fix devhelp documentation installation (Mike Hommey),
+ Fix web site encoding problems (Daniel Veillard),
+ Fix a couple of typo in HTML parser error messages (Michael Day),
+ Forgot to update the news page for 0.7.7 (Daniel Veillard)
+ </li>
+ <li> Portability:
+ 607273 Fix python detection on MSys/Windows (LRN),
+ 614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer),
+ Fix compilation with Clang (Koop Mast),
+ Fix Win32 build (Rob Richards)
+ </li>
+ <li> Bug Fixes:
+ 595789 fix a remaining potential Solaris problem (Daniel Veillard),
+ 617468 fix progressive HTML parsing with style using "'" (Denis Pauk),
+ 616478 Fix xmllint shell write command (Gwenn Kahz),
+ 614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile),
+ 627987 Fix XSD IDC errors in imported schemas (Jim Panetta),
+ 629325 XPath rounding errors first cleanup (Phil Shafer),
+ 630140 fix iso995x encoding error (Daniel Veillard),
+ make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard),
+ Fix a change of semantic on XPath preceding and following axis (Daniel Veillard),
+ Fix a potential segfault due to weak symbols on pthreads (Mike Hommey),
+ Fix a leak in XPath compilation (Daniel Veillard),
+ Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard),
+ Avoid a descriptor leak in catalog loading code (Carlo Bramini),
+ Fix a small bug in XPath evaluation code (Marius Wachtler),
+ Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
+ Fix errors in XSD double validation check (Csaba Raduly),
+ Fix handling of apos in URIs (Daniel Veillard),
+ xmlTextReaderReadOuterXml should handle DTD (Rob Richards),
+ Autogen.sh needs to create m4 directory (Rob Richards)
+ </li>
+ <li> Improvements:
+ 606592 update language ID parser to RFC 5646 (Daniel Veillard),
+ Sort python generated stubs (Mike Hommey),
+ Add an HTML parser option to avoid a default doctype (Daniel Veillard)
+ </li>
+ <li> Cleanups:
+ 618831 don't ship generated files in git (Adrian Bunk),
+ Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk),
+ Various cleanups on encoding handling (Daniel Veillard),
+ Fix xmllint to use format=1 for default formatting (Adam Spragg),
+ Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg),
+ Cleanup encoding pointer comparison (Nikolay Sivov),
+ Small code cleanup on previous patch (Daniel Veillard)
+ </li>
+</ul><h3>2.7.7: Mar 15 2010</h3><ul>
+ <li> Improvements:
+ Adding a --xpath option to xmllint (Daniel Veillard),
+ Make HTML parser non-recursive (Eugene Pimenov)
+ </li>
+ <li> Portability:
+ relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton),
+ Fix build failure on Sparc solaris (Roumen Petrov),
+ use autoreconf in autogen.sh (Daniel Veillard),
+ Fix build with mingw (Roumen Petrov),
+ Upgrade some of the configure and autogen (Daniel Veillard),
+ Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards),
+ Fix a const warning in xmlNodeSetBase (Martin Trappel),
+ Fix python generator to not use deprecated xmllib (Daniel Veillard),
+ Update some automake files (Daniel Veillard),
+ 598785 Fix nanohttp on Windows (spadix)
+ </li>
+ <li> Bug Fixes:
+ libxml violates the zlib interface and crashes (Mark Adler),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
+ Fix detection of python linker flags (Daniel Macks),
+ fix build error in libxml2/python (Paul Smith),
+ ChunkParser: Incorrect decoding of small xml files (Raul Hudea),
+ htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
+ Fix a missing #ifdef (Daniel Veillard),
+ Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
+ xmlPreviousElementSibling mistake (François Delyon),
+ 608773 add a missing check in xmlGROW (Daniel Veillard),
+ Fix xmlParseInNodeContext for HTML content (Daniel Veillard),
+ Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards),
+ Fix some missing commas in HTML element lists (Eugene Pimenov),
+ Correct variable type to unsigned (Nikolay Sivov),
+ Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard),
+ Fix memory leak in xmlXPathEvalExpression() (Martin),
+ Fix an init bug in global.c (Kai Henning),
+ Fix xmlNodeSetBase() comment (Daniel Veillard),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Don't give default HTML boolean attribute values in parser (Daniel Veillard),
+ xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
+ </li>
+ <li> Cleanups:
+ Cleanup a couple of weirdness in HTML parser (Eugene Pimenov)
+ </li>
+</ul><h3>2.7.6: Oct 6 2009</h3><ul>
+ <li> Bug Fixes:
+ Restore thread support in default configuration (Andrew W. Nosenko),
+ URI with no path parsing problem (Daniel Veillard),
+ Minor patch for conditional defines in threads.c (Eric Zurcher)
+ </li>
+</ul><h3>2.7.5: Sep 24 2009</h3><ul>
+ <li> Bug Fixes:
+ Restore behavior of --with-threads without argument (Andrew W. Nosenko),
+ Fix memory leak when doc is NULL (Rob Richards),
+ 595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard),
+ Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard),
+ Fix a parsing problem with little data at startup (Daniel Veillard),
+ link python module with python library (Frederic Crozat),
+ 594874 Forgot an fclose in xmllint (Daniel Veillard)
+ </li>
+ <li> Cleanup:
+ Adding symbols.xml to EXTRA_DIST (Daniel Veillard)
+ </li>
+</ul><h3>2.7.4: Sep 10 2009</h3><ul>
+ <li>Improvements:
+ Switch to GIT (GNOME),
+ Add symbol versioning to libxml2 shared libs (Daniel Veillard)
+ </li>
+ <li>Portability:
+ 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard),
+ 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard),
+ Fix Windows build * relaxng.c: fix windows build (Rob Richards),
+ Fix the globals.h to use XMLPUBFUN (Paul Smith),
+ Problem with extern extern in header (Daniel Veillard),
+ Add -lnetwork for compiling on Haiku (Scott McCreary),
+ Runtest portability patch for Solaris (Tim Rice),
+ Small patch to accomodate the Haiku OS (Scott McCreary),
+ 584605 package VxWorks folder in the distribution (Daniel Veillard),
+ 574017 Realloc too expensive on most platform (Daniel Veillard),
+ Fix windows build (Rob Richards),
+ 545579 doesn't compile without schema support (Daniel Veillard),
+ xmllint use xmlGetNodePath when not compiled in (Daniel Veillard),
+ Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard),
+ Allow to select the threading system on Windows (LRN),
+ Fix Solaris binary links, cleanups (Daniel Veillard),
+ Bug 571059 – MSVC doesn't work with the bakefile (Intron),
+ fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey),
+ fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher)
+ </li>
+ <li>Documentation:
+ 544910 typo: "renciliateNs" (Leonid Evdokimov),
+ Add VxWorks to list of OSes (Daniel Veillard),
+ Regenerate the documentation and update for git (Daniel Veillard),
+ 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard),
+ Added sponsoring by AOE media for the server (Daniel Veillard),
+ updated URLs for GNOME (Vincent Lefevre),
+ more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard)
+ </li>
+ <li>Bug fixes:
+ 594514 memory leaks - duplicate initialization (MOD),
+ Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard),
+ 492317 Fix Relax-NG validation problems (Daniel Veillard),
+ 558452 fight with reg test and error report (Daniel Veillard),
+ 558452 RNG compilation of optional multiple child (Daniel Veillard),
+ 579746 XSD validation not correct / nilable groups (Daniel Veillard),
+ 502960 provide namespace stack when parsing entity (Daniel Veillard),
+ 566012 part 2 fix regresion tests and push mode (Daniel Veillard),
+ 566012 autodetected encoding and encoding conflict (Daniel Veillard),
+ 584220 xpointer(/) and xinclude problems (Daniel Veillard),
+ 587663 Incorrect Attribute-Value Normalization (Daniel Veillard),
+ 444994 HTML chunked failure for attribute with &lt;&gt; (Daniel Veillard),
+ Fix end of buffer char being split in XML parser (Daniel Veillard),
+ Non ASCII character may be split at buffer end (Adiel Mittmann),
+ 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel),
+ 572129 speed up parsing of large HTML text nodes (Markus Kull),
+ Fix HTML parsing with 0 character in CDATA (Daniel Veillard),
+ Fix SetGenericErrorFunc and SetStructured clash (Wang Lam),
+ 566012 Incomplete EBCDIC parsing support (Martin Kogler),
+ 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard),
+ 541237 error correcting missing end tags in HTML (Daniel Veillard),
+ 583439 missing line numbers in push mode (Daniel Veillard),
+ 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard),
+ 559501 avoid select and use poll for nanohttp (Raphael Prevost),
+ 559410 - Regexp bug on (...)? constructs (Daniel Veillard),
+ Fix a small problem on previous HTML parser patch (Daniel Veillard),
+ 592430 - HTML parser runs into endless loop (Daniel Veillard),
+ 447899 potential double free in xmlFreeTextReader (Daniel Veillard),
+ 446613 small validation bug mixed content with NS (Daniel Veillard),
+ Fix the problem of revalidating a doc with RNG (Daniel Veillard),
+ Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer),
+ 512131 refs from externalRef part need to be added (Daniel Veillard),
+ 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard),
+ 588441 allow '.' in HTML Names even if invalid (Daniel Veillard),
+ 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard),
+ 579317 Try to find the HTML encoding information (Daniel Veillard),
+ 575875 don't output charset=html (Daniel Veillard),
+ 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard),
+ 570702 fix a bug in regexp determinism checking (Daniel Veillard),
+ 567619 xmlValidateNotationUse missing param test (Daniel Veillard),
+ 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer),
+ Fix a couple of problems in the parser (Daniel Veillard),
+ 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen),
+ 582906 XSD validating multiple imports of the same schema (Jason Childs),
+ Bug 582887 ¿ problems validating complex schemas (Jason Childs),
+ Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos),
+ 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky),
+ Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre),
+ Preserve attributes of include start on tree copy (Petr Pajas),
+ Skip silently unrecognized XPointer schemes (Jakub Wilk),
+ Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard),
+ potential NULL dereference on non-glibc (Jim Meyering),
+ Fix an XSD validation crash (Daniel Veillard),
+ Fix a regression in streaming entities support (Daniel Veillard),
+ Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin),
+ Aleksey Sanin support for c14n 1.1 (Aleksey Sanin),
+ reader bug fix with entities (Daniel Veillard),
+ use options from current parser ctxt for external entities (Rob Richards),
+ 581612 use %s to printf strings (Christian Persch),
+ 584605 change the threading initialization sequence (Igor Novoseltsev),
+ 580705 keep line numbers in HTML parser (Aaron Patterson),
+ 581803 broken HTML table attributes init (Roland Steiner),
+ do not set error code in xmlNsWarn (Rob Richards),
+ 564217 fix structured error handling problems,
+ reuse options from current parser for entities (Rob Richards),
+ xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard),
+ add a missing check in xmlAddSibling (Kris Breuker),
+ avoid leaks on errors (Jinmei Tatuya)
+ </li>
+ <li>Cleanup:
+ Chasing dead assignments reported by clang-scan (Daniel Veillard),
+ A few more safety cleanup raised by scan (Daniel Veillard),
+ Fixing assorted potential problems raised by scan (Daniel Veillard),
+ Potential uninitialized arguments raised by scan (Daniel Veillard),
+ Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard),
+ Remove a pedantic warning (Daniel Veillard),
+ 555833 always use rm -f in uninstall-local (Daniel Veillard),
+ 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard),
+ Autoregenerate libxml2.syms automated checkings (Daniel Veillard),
+ Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard),
+ Both args of xmlStrcasestr are const (Daniel Veillard),
+ hide the nbParse* variables used for debugging (Mike Hommey),
+ 570806 changed include of config.h (William M. Brack),
+ cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya)
+ </li>
+</ul><h3>2.7.3: Jan 18 2009</h3><ul>
+ <li>Build fix: fix build when HTML support is not included.</li>
+ <li>Bug fixes: avoid memory overflow in gigantic text nodes,
+ indentation problem on the writed (Rob Richards),
+ xmlAddChildList pointer problem (Rob Richards and Kevin Milburn),
+ xmlAddChild problem with attribute (Rob Richards and Kris Breuker),
+ avoid a memory leak in an edge case (Daniel Zimmermann),
+ deallocate some pthread data (Alex Ott).</li>
+ <li>Improvements: configure option to avoid rebuilding docs (Adrian Bunk),
+ limit text nodes to 10MB max by default, add element traversal
+ APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards),
+ add gcc malloc checking (Marcus Meissner), add gcc printf like functions
+ parameters checking (Marcus Meissner).</li>
+</ul><h3>2.7.2: Oct 3 2008</h3><ul>
+ <li>Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in</li>
+ <li>Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+ </li><li>Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents</li>
+</ul><h3>2.7.1: Sep 1 2008</h3><ul>
+ <li>Portability fix: Borland C fix (Moritz Both)</li>
+ <li>Bug fixes: python serialization wrappers, XPath QName corner
+ case handking and leaks (Martin)</li>
+ <li>Improvement: extend the xmlSave to handle HTML documents and trees</li>
+ <li>Cleanup: python serialization wrappers</li>
+</ul><h3>2.7.0: Aug 30 2008</h3><ul>
+ <li>Documentation: switch ChangeLog to UTF-8, improve mutithreads and
+ xmlParserCleanup docs</li>
+ <li>Portability fixes: Older Win32 platforms (Rob Richards), MSVC
+ porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg),
+ non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
+ </li>
+ <li>Bug fixes: various realloc problems (Ashwin), potential double-free
+ (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
+ Richards), pattern fix when streaming (William Brack), various XML
+ parsing and validation fixes based on the W3C regression tests, reader
+ tree skipping function fix (Ashwin), Schemas regexps escaping fix
+ (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown
+ when encoder cant serialize characters on output</li>
+ <li>Code cleanup: compilation fix without the reader, without the output
+ (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups,
+ serious cleanup of the entity handling code</li>
+ <li>Improvement: switch parser to XML-1.0 5th edition, add parsing flags
+ for old versions, switch URI parsing to RFC 3986,
+ add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
+ new hashing functions for dictionnaries (based on Stefan Behnel work),
+ improve handling of misplaced html/head/body in HTML parser, better
+ regression test tools and code coverage display, better algorithms
+ to detect various versions of the billion laughts attacks, make
+ arbitrary parser limits avoidable as a parser option</li>
+</ul><h3>2.6.32: Apr 8 2008</h3><ul>
+ <li>Documentation: returning heap memory to kernel (Wolfram Sang),
+ trying to clarify xmlCleanupParser() use, xmlXPathContext improvement
+ (Jack Jansen), improve the *Recover* functions documentation,
+ XmlNodeType doc link fix (Martijn Arts)</li>
+ <li>Bug fixes: internal subset memory leak (Ashwin), avoid problem with
+ paths starting with // (Petr Sumbera), streaming XSD validation callback
+ patches (Ashwin), fix redirection on port other than 80 (William Brack),
+ SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan),
+ regexp bug with '.' (Andrew Tosh), flush the writer at the end of the
+ document (Alfred Mickautsch), output I/O bug fix (William Brack),
+ writer CDATA output after a text node (Alex Khesin), UTF-16 encoding
+ detection (William Brack), fix handling of empty CDATA nodes for Safari
+ team, python binding problem with namespace nodes, improve HTML parsing
+ (Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily
+ Chekalkin), XSD test crash, weird system parameter entity parsing problem,
+ allow save to file:///X:/ windows paths, various attribute normalisation
+ problems, externalSubsetSplit fix (Ashwin), attribute redefinition in
+ the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many
+ out of memory handling fixes (Ashwin), XPath out of memory handling fixes
+ (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding
+ conversion buffer size (Christian Fruth), problems with EatName
+ functions on memory errors, BOM handling in external parsed entities
+ (Mark Rowe)</li>
+ <li>Code cleanup: fix build under VS 2008 (David Wimsey), remove useless
+ mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo
+ Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need
+ a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon),
+ cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build
+ fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards),
+ duplicate code removal (Ashwin), missing malloc test and error reports
+ (Ashwin), VMS makefile fix (Tycho Hilhorst)</li>
+ <li>improvements: better plug of schematron in the normal error handling
+ (Tobias Minich)</li>
+</ul><h3>2.6.31: Jan 11 2008</h3><ul>
+ <li>Security fix: missing of checks in UTF-8 parsing</li>
+ <li>Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+ </li>
+ <li>Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)</li>
+ <li>Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option, </li>
+</ul><h3>2.6.30: Aug 23 2007</h3><ul>
+ <li>Portability: Solaris crash on error handling, windows path fixes
+ (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)</li>
+ <li>Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
+ reusing a writer for a new document (Dodji Seketeli), Schemas
+ xsi:nil handling patch (Frank Gross), relative URI build problem
+ (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
+ detection bug, fix disparity with xmlSAXUserParseMemory, automata
+ generation for complex regexp counts problems, Schemas IDC import
+ problems (Frank Gross), xpath predicate evailation error handling
+ (William Brack)</li>
+</ul><h3>2.6.29: Jun 12 2007</h3><ul>
+ <li>Portability: patches from Andreas Stricke for WinCEi,
+ fix compilation warnings (William Brack), avoid warnings on Apple OS/X
+ (Wendy Doyle and Mark Rowe), Windows compilation and threading
+ improvements (Rob Richards), compilation against old Python versions,
+ new GNU tar changes (Ryan Hill)</li>
+ <li>Documentation: xmlURIUnescapeString comment, </li>
+ <li>Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind'
+ flag fix (Richard Jones), regexp interpretation of \,
+ htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
+ typo (Bjorn Reese), entity content failure, xmlListAppend() fix
+ (Georges-André Silber), XPath number serialization (William Brack),
+ nanohttp gzipped stream fix (William Brack and Alex Cornejo),
+ xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon),
+ XPath string value of PI nodes (William Brack), XPath node set
+ sorting bugs (William Brack), avoid outputting namespace decl
+ dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
+ error handling, recustion on next in catalogs, fix a Relax-NG crash,
+ workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes,
+ invalid character in attribute detection bug, big comments before
+ internal subset streaming bug, HTML parsing of attributes with : in
+ the name, IDness of name in HTML (Dagfinn I. Mannsåker) </li>
+ <li>Improvement: keep URI query parts in raw form (Richard Jones),
+ embed tag support in HTML (Michael Day) </li>
+</ul><h3>2.6.28: Apr 17 2007</h3><ul>
+ <li>Documentation: comment fixes (Markus Keim), xpath comments fixes too
+ (James Dennett)</li>
+ <li>Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage
+ (Usamah Malik), various regexp bug fixes (DV and William), path conversion
+ on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
+ principal node of axis bug, HTML serialization of some codepoint
+ (Steven Rainwater), user data propagation in XInclude (Michael Day),
+ standalone and XML decl detection (Michael Day), Python id ouptut
+ for some id, fix the big python string memory leak, URI parsing fixes
+ (Stéphane Bidoul and William), long comments parsing bug (William),
+ concurrent threads initialization (Ted Phelps), invalid char
+ in text XInclude (William), XPath memory leak (William), tab in
+ python problems (Andreas Hanke), XPath node comparison error
+ (Oleg Paraschenko), cleanup patch for reader (Julien Reichel),
+ XML Schemas attribute group (William), HTML parsing problem (William),
+ fix char 0x2d in regexps (William), regexp quantifier range with
+ min occurs of 0 (William), HTML script/style parsing (Mike Day)</li>
+ <li>Improvement: make xmlTextReaderSetup() public</li>
+ <li>Compilation and postability: fix a missing include problem (William),
+ __ss_familly on AIX again (Björn Wiberg), compilation without zlib
+ (Michael Day), catalog patch for Win32 (Christian Ehrlicher),
+ Windows CE fixes (Andreas Stricke)</li>
+ <li>Various CVS to SVN infrastructure changes</li>
+</ul><h3>2.6.27: Oct 25 2006</h3><ul>
+ <li>Portability fixes: file names on windows (Roland Schwingel,
+ Emelyanov Alexey), windows compile fixup (Rob Richards),
+ AIX iconv() is apparently case sensitive</li>
+ <li>improvements: Python XPath types mapping (Nic Ferrier), XPath optimization
+ (Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node
+ equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest
+ improvememt (Kasimier), expose if library was compiled with zlib
+ support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs
+ (Kasimier), xmlTextConcat should work with comments and PIs (Rob
+ Richards), export htmlNewParserCtxt needed by Michael Day, refactoring
+ of catalog entity loaders (Michael Day), add XPointer support to
+ python bindings (Ross Reedstrom, Brian West and Stefan Anca),
+ try to sort out most file path to URI conversions and xmlPathToUri,
+ add --html --memory case to xmllint</li>
+ <li>building fix: fix --with-minimum (Felipe Contreras), VMS fix,
+ const'ification of HTML parser structures (Matthias Clasen),
+ portability fix (Emelyanov Alexey), wget autodetection (Peter
+ Breitenlohner), remove the build path recorded in the python
+ shared module, separate library flags for shared and static builds
+ (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix
+ --with-minimum --with-schemas builds</li>
+ <li>bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and
+ attribute (Kasimier), crash when using the recover mode,
+ xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier),
+ missing destry in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes
+ (Kasimier), warning on entities processing, XHTML script and style
+ serialization (Kasimier), python generator for long types, bug in
+ xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate
+ allocation bug (Marton Illes), error message end of line (Rob Richards),
+ fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
+ crasher, parser safety patch (Ben Darnell), _private context propagation
+ when parsing entities (with Michael Day), fix entities behaviour when
+ using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity
+ context, arg error in SAX callback (Mike Hommey), fix mixed-content
+ autodetect when using --noblanks, fix xmlIOParseDTD error handling,
+ fix bug in xmlSplitQName on special Names, fix Relax-NG element content
+ validation bug, fix xmlReconciliateNs bug, fix potential attribute
+ XML parsing bug, fix line/column accounting in XML parser, chunking bug
+ in the HTML parser on script, try to detect obviously buggy HTML
+ meta encoding indications, bugs with encoding BOM and xmlSaveDoc,
+ HTML entities in attributes parsing, HTML minimized attribute values,
+ htmlReadDoc and htmlReadIO were broken, error handling bug in
+ xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in
+ htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer),
+ bug on misformed SSD regexps (Christopher Boumenot)
+ </li>
+ <li>documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik),
+ fix xmlXPathCastToString documentation, improve man pages for
+ xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few
+ functions</li>
+</ul><h3>2.6.26: Jun 6 2006</h3><ul>
+ <li>portability fixes: Python detection (Joseph Sacco), compilation
+ error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)</li>
+ <li>bug fixes: encoding buffer problem, mix of code and data in
+ xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik),
+ variousXSD validation fixes (Kasimier), memory leak in pattern (Rob
+ Richards andKasimier), attribute with colon in name (Rob Richards), XPath
+ leak inerror reporting (Aleksey Sanin), XInclude text include of
+ selfdocument.</li>
+ <li>improvements: Xpath optimizations (Kasimier), XPath object
+ cache(Kasimier)</li>
+</ul><h3>2.6.25: Jun 6 2006:</h3><p>Do not use or package 2.6.25</p><h3>2.6.24: Apr 28 2006</h3><ul>
+ <li>Portability fixes: configure on Windows, testapi compile on windows
+ (Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher),
+ HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1
+ cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on
+ Windows (Roland Schwingel).
+ </li>
+ <li>Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier
+ Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.</li>
+ <li>Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext()
+ on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming
+ bug, xmlParseComment (with William Brack), regexp bug fixes (DV &amp;
+ Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier),
+ one Relax-NG interleave bug, xmllint --path and --valid,
+ XSD bugfixes (Kasimier), remove debug
+ left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole),
+ xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large
+ number of cleanups and small fixes based on Coverity reports, bug
+ in character ranges, Unicode tables const (Aivars Kalvans), schemas
+ fix (Stefan Kost), xmlRelaxNGParse error deallocation,
+ xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed
+ code point, ixmllint --nonet to never reach the net (Gary Coady),
+ line break in writer after end PI (Jason Viers). </li>
+ <li>Documentation: man pages updates and cleanups (Daniel Leidert).</li>
+ <li>New features: Relax NG structure error handlers.</li>
+</ul><h3>2.6.23: Jan 5 2006</h3><ul>
+ <li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+ (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+ --with-minimum compilation fixes (William Brack), error case handling fix
+ on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+ Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+ MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick
+ Jones),</li>
+ <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+ (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+ parsing code (Bjorn Reese)</li>
+ <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+ combinatory explosion and performances in regexp code, leak in
+ xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+ Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+ XPath pattern based evaluation bugs (DV &amp; Kasimier),
+ xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+ xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+ vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+ split problem (William), issues with non-namespaced attributes in
+ xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+ HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+ exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+ totalDigits bug (Kasimier Buchcik), error handling when writing to an
+ xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+ Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+ XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+ fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+ (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+ runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+ (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+ compilation and build fixes (Michael Day), removed dependancies on
+ xmlSchemaValidError (Kasimier), bug with &lt;xml:foo/&gt;, more XPath
+ pattern based evaluation fixes (Kasimier)</li>
+ <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier
+ Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+ transition bug in regexps, ctxt-&gt;standalone = -2 to indicate no
+ standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+ (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+ (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+ htmlDocDumpMemoryFormat. (Rob Richards),</li>
+ <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save
+ function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),</li>
+</ul><h3>2.6.22: Sep 12 2005</h3><ul>
+ <li>build fixes: compile without schematron (Stéphane Bidoul)</li>
+ <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
+ CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+ XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+ output formatting for meta element (Rob Richards), script and style
+ XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+ (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li>
+ <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+ XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+ derive (Kasimier Buchcik).</li>
+ <li>documentation: generation of gtk-doc like docs, integration with
+ devhelp.</li>
+</ul><h3>2.6.21: Sep 4 2005</h3><ul>
+ <li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
+ convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+ sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+ on Windows(Marcus Boerger), compilation without SAX1, detection of the
+ Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+ compilation/link with threads and old gcc, compile problem by C370 on
+ Z/OS,</li>
+ <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
+ bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+ htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+ Schemas comparisons NIST passes, automata build error xsd:all,
+ xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+ foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+ Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+ namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+ (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+ xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+ messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+ fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+ Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+ serialization, streaming XPath, Schemas determinism detection problem,
+ XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+ Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+ type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+ xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+ error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+ xml:id and IDness at the treee level fixes, XPath streaming patterns
+ bugs.</li>
+ <li>improvements: structured interfaces for schemas and RNG error reports
+ (Marcus Boerger), optimization of the char data inner loop parsing
+ (thanks to Behdad Esfahbod for the idea), schematron validation though
+ not finished yet, xmlSaveOption to omit XML declaration, keyref match
+ error reports (Kasimier), formal expression handling code not plugged
+ yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+ for text nodes allocation.</li>
+ <li>documentation: xmllint man page had --nonet duplicated</li>
+</ul><h3>2.6.20: Jul 10 2005</h3><ul>
+ <li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+ Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+ andriy@google.com), use gcc weak references to pthread to avoid the
+ pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+ of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+ compilation when disabling parts of the library, standalone test
+ distribution.</li>
+ <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+ HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+ overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+ (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+ (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+ on XInclude (William), pattern fixes (William), attribute bug in
+ exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+ Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+ QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+ (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+ Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+ Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+ areBlanks() heuristic failure, duplicate attributes in DTD bug
+ (William).</li>
+ <li>improvements: lot of work on Schemas by Kasimier Buchcik both on
+ conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+ Matthew Burgess), namespace removal at the python level (Brent
+ Hendricks), Update to new Schemas regression tests from W3C/Nist
+ (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+ xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+ standalone test framework and programs, new DOM import APIs
+ xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+ xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+ Schemas regression tests, xmlStopParser() available in pull mode too,
+ ienhancement to xmllint --shell namespaces support, Windows port of the
+ standalone testing tools (Kasimier and William),
+ xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+ Schemas APIs, Schemas xmlReader support.</li>
+</ul><h3>2.6.19: Apr 02 2005</h3><ul>
+ <li>build fixes: drop .la from RPMs, --with-minimum build fix (William
+ Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+ 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+ Linux/ELF/gcc4</li>
+ <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+ code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+ Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+ segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+ (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+ HTML serialization of name attribute on a elements, Python error handlers
+ leaks and improvement (Brent Hendricks), uninitialized variable in
+ encoding code, Relax-NG validation bug, potential crash if
+ gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+ switched back to assuming UTF-8 in case no encoding is given at
+ serialization time</li>
+ <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets
+ checking and also mixed handling.</li>
+ <li></li>
+</ul><h3>2.6.18: Mar 13 2005</h3><ul>
+ <li>build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+ Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+ some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
+ <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+ xmlreader stopping on non-fatal errors, thread support for dictionnaries
+ reference counting (Gary Coady), internal subset and push problem, URL
+ saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+ fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+ (Mike Hommey), warning should not count as error (William Brack),
+ xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+ FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+ xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+ empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+ (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+ Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+ (Rob Richards), Schemas decimal type fixes (William Brack),
+ xmlByteConsumed static buffer (Ben Maurer).</li>
+ <li>improvement: speedup parsing comments and DTDs, dictionnary support for
+ hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+ subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+ values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+ Stansvik),</li>
+ <li>Documentation: Wiki support (Joel Reed)</li>
+</ul><h3>2.6.17: Jan 16 2005</h3><ul>
+ <li>build fixes: Windows, warnings removal (William Brack),
+ maintainer-clean dependency(William), build in a different directory
+ (William), fixing --with-minimum configure build (William), BeOS build
+ (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+ McNichol)</li>
+ <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
+ to use the catalog(s), loop on output (William Brack), XPath memory leak,
+ ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+ warning not using error callback (William), xmlStopParser bug (William),
+ UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+ push mode (Rob Richards), line and col computations fixups (Aleksey
+ Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+ patterns with too many steps, bug in RNG choice optimization, line number
+ sometimes missing.</li>
+ <li>improvements: XSD Schemas (Kasimier Buchcik), python generator
+ (William), xmlUTF8Strpos speedup (William), unicode Python strings
+ (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+ serialize().</li>
+ <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+ the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+ Reed), error extraction API from regexps, new XMLSave option for format
+ (Phil Shafer)</li>
+ <li>documentation: site improvement (John Fleck), FAQ entries
+ (William).</li>
+</ul><h3>2.6.16: Nov 10 2004</h3><ul>
+ <li>general hardening and bug fixing crossing all the API based on new
+ automated regression testing</li>
+ <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li>
+ <li>bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding
+ conversion functions return values, UTF-8 bug affecting XPath reported by
+ Markus Bertheau, catalog problem with NULL entries (William Brack)</li>
+ <li>documentation: fix to xmllint man page, some API function descritpion
+ were updated.</li>
+ <li>improvements: DTD validation APIs provided at the Python level (Brent
+ Hendricks)</li>
+</ul><h3>2.6.15: Oct 27 2004</h3><ul>
+ <li>security fixes on the nanoftp and nanohttp modules</li>
+ <li>build fixes: xmllint detection bug in configure, building outside the
+ source tree (Thomas Fitzsimmons)</li>
+ <li>bug fixes: HTML parser on broken ASCII chars in names (William), Python
+ paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William),
+ saving to python file objects (Malcolm Tredinnick), DTD lookup fix
+ (Malcolm), save back &lt;group&gt; in catalogs (William), tree build
+ fixes (DV and Rob Richards), Schemas memory bug, structured error handler
+ on Python 64bits, thread local memory deallocation, memory leak reported
+ by Volker Roth, xmlValidateDtd in the presence of an internal subset,
+ entities and _private problem (William), xmlBuildRelativeURI error
+ (William).</li>
+ <li>improvements: better XInclude error reports (William), tree debugging
+ module and tests, convenience functions at the Reader API (Graham
+ Bennett), add support for PI in the HTML parser.</li>
+</ul><h3>2.6.14: Sep 29 2004</h3><ul>
+ <li>build fixes: configure paths for xmllint and xsltproc, compilation
+ without HTML parser, compilation warning cleanups (William Brack &amp;
+ Malcolm Tredinnick), VMS makefile update (Craig Berry),</li>
+ <li>bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier
+ Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
+ transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
+ (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
+ handling of failed realloc(), out of bound array adressing in Schemas
+ date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
+ E20 validation fix (Malcolm),</li>
+ <li>improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
+ xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy
+ (Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm
+ Tredinnick), Schemas support for xsi:schemaLocation,
+ xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)</li>
+</ul><h3>2.6.13: Aug 31 2004</h3><ul>
+ <li>build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc,
+ Solaris compiler warning, fixing RPM BuildRequires,</li>
+ <li>fixes: DTD loading on Windows (Igor), Schemas error reports APIs
+ (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
+ and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
+ problem (William), Schemas hexbinary empty values, encoding error could
+ genrate a serialization loop.</li>
+ <li>Improvements: Schemas validity improvements (Kasimier), added --path
+ and --load-trace options to xmllint</li>
+ <li>documentation: tutorial update (John Fleck)</li>
+</ul><h3>2.6.12: Aug 22 2004</h3><ul>
+ <li>build fixes: fix --with-minimum, elfgcchack.h fixes (Peter
+ Breitenlohner), perl path lookup (William), diff on Solaris (Albert
+ Chin), some 64bits cleanups.</li>
+ <li>Python: avoid a warning with 2.3 (William Brack), tab and space mixes
+ (William), wrapper generator fixes (William), Cygwin support (Gerrit P.
+ Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support
+ (Torkel Lyng)</li>
+ <li>Schemas: a lot of bug fixes and improvements from Kasimier Buchcik</li>
+ <li>fixes: RVT fixes (William), XPath context resets bug (William), memory
+ debug (Steve Hay), catalog white space handling (Peter Breitenlohner),
+ xmlReader state after attribute reading (William), structured error
+ handler (William), XInclude generated xml:base fixup (William), Windows
+ memory reallocation problem (Steve Hay), Out of Memory conditions
+ handling (William and Olivier Andrieu), htmlNewDoc() charset bug,
+ htmlReadMemory init (William), a posteriori validation DTD base
+ (William), notations serialization missing, xmlGetNodePath (Dodji),
+ xmlCheckUTF8 (Diego Tartara), missing line numbers on entity
+ (William)</li>
+ <li>improvements: DocBook catalog build scrip (William), xmlcatalog tool
+ (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey),
+ xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude
+ to not generate start/end nodes, extend xmllint --version to include CVS
+ tag (William)</li>
+ <li>documentation: web pages fixes, validity API docs fixes (William)
+ schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)</li>
+</ul><h3>2.6.11: July 5 2004</h3><ul>
+ <li>Schemas: a lot of changes and improvements by Kasimier Buchcik for
+ attributes, namespaces and simple types.</li>
+ <li>build fixes: --with-minimum (William Brack), some gcc cleanup
+ (William), --with-thread-alloc (William)</li>
+ <li>portability: Windows binary package change (Igor Zlatkovic), Catalog
+ path on Windows</li>
+ <li>documentation: update to the tutorial (John Fleck), xmllint return code
+ (John Fleck), man pages (Ville Skytta),</li>
+ <li>bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX
+ properly initialize the library (William), empty node set in XPath
+ (William), xmlSchemas errors (William), invalid charref problem pointed
+ by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
+ with div processing (William), XPointer and xml:base problem(William),
+ Reader and entities, xmllint return code for schemas (William), reader
+ streaming problem (Steve Ball), DTD serialization problem (William),
+ libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on
+ Python classes, xmlReader buffer bug, Python bindings memory interfaces
+ improvement (with Stéphane Bidoul), Fixed the push parser to be back to
+ synchronous behaviour.</li>
+ <li>improvement: custom per-thread I/O enhancement (Rob Richards), register
+ namespace in debug shell (Stefano Debenedetti), Python based regression
+ test for non-Unix users (William), dynamically increase the number of
+ XPath extension functions in Python and fix a memory leak (Marc-Antoine
+ Parent and William)</li>
+ <li>performance: hack done with Arjan van de Ven to reduce ELF footprint
+ and generated code on Linux, plus use gcc runtime profiling to optimize
+ the code generated in the RPM packages.</li>
+</ul><h3>2.6.10: May 17 2004</h3><ul>
+ <li>Web page generated for ChangeLog</li>
+ <li>build fixes: --without-html problems, make check without make all</li>
+ <li>portability: problem with xpath.c on Windows (MSC and Borland), memcmp
+ vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not
+ use "list" as parameter name, make tests work with Python 1.5 (Ed
+ Davis),</li>
+ <li>improvements: made xmlTextReaderMode public, small buffers resizing
+ (Morten Welinder), add --maxmem option to xmllint, add
+ xmlPopInputCallback() for Matt Sergeant, refactoring of serialization
+ escaping, added escaping customization</li>
+ <li>bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William
+ Brack), xmlReader end of stream problem, node deregistration with reader,
+ URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp
+ transition reduction (William), various XSD Schemas fixes (Kasimier
+ Buchcik), XInclude fallback problem (William), weird problems with DTD
+ (William), structured error handler callback context (William), reverse
+ xmlEncodeSpecialChars() behaviour back to escaping '"'</li>
+</ul><h3>2.6.9: Apr 18 2004</h3><ul>
+ <li>implement xml:id Working Draft, relaxed XPath id() checking</li>
+ <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas</li>
+ <li>improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs</li>
+ <li>documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments,</li>
+ <li>Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)</li>
+</ul><h3>2.6.8: Mar 23 2004</h3><ul>
+ <li>First step of the cleanup of the serialization code and APIs</li>
+ <li>XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam
+ Dickmeiss), anyURI for "" (John Belmonte)</li>
+ <li>Python: Canonicalization C14N support added (Anthony Carrico)</li>
+ <li>xmlDocCopyNode() extension (William)</li>
+ <li>Relax-NG: fix when processing XInclude results (William), external
+ reference in interleave (William), missing error on &lt;choice&gt;
+ failure (William), memory leak in schemas datatype facets.</li>
+ <li>xmlWriter: patch for better DTD support (Alfred Mickautsch)</li>
+ <li>bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William
+ Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to
+ URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
+ XInclude and XPointer fixes for entities (William), XML parser bug
+ reported by Holger Rauch, nanohttp fd leak (William), regexps char
+ groups '-' handling (William), dictionnary reference counting problems,
+ do not close stderr.</li>
+ <li>performance patches from Petr Pajas</li>
+ <li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li>
+ <li>compilation and portability fixes: --without-valid, catalog cleanups
+ (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation
+ to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino
+ Vidal), Windows build (Eric Zurcher)</li>
+</ul><h3>2.6.7: Feb 23 2004</h3><ul>
+ <li>documentation: tutorial updates (John Fleck), benchmark results</li>
+ <li>xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)</li>
+ <li>XPath optimization (Petr Pajas)</li>
+ <li>DTD ID handling optimization</li>
+ <li>bugfixes: xpath number with &gt; 19 fractional (William Brack), push
+ mode with unescaped '&gt;' characters, fix xmllint --stream --timing, fix
+ xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent
+ handling NULL, trying to fix Relax-NG/Perl interface.</li>
+ <li>python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)</li>
+ <li>Added relaxng option to xmllint --shell</li>
+</ul><h3>2.6.6: Feb 12 2004</h3><ul>
+ <li>nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and
+ William) reported by Yuuichi Teranishi</li>
+ <li>bugfixes: make test and path issues, xmlWriter attribute serialization
+ (William Brack), xmlWriter indentation (William), schemas validation
+ (Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
+ Paraschenko), XInclude empty fallback (William), HTML warnings (William),
+ XPointer in XInclude (William), Python namespace serialization,
+ isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
+ entities in internal subset (William), internal subset bug in push mode,
+ &lt;xs:all&gt; fix (Alexey Sarytchev)</li>
+ <li>Build: fix for automake-1.8 (Alexander Winston), warnings removal
+ (Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix
+ --with-minimum configuration.</li>
+ <li>XInclude: allow the 2001 namespace without warning.</li>
+ <li>Documentation: missing example/index.html (John Fleck), version
+ dependancies (John Fleck)</li>
+ <li>reader API: structured error reporting (Steve Ball)</li>
+ <li>Windows compilation: mingw, msys (Mikhail Grushinskiy), function
+ prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
+ patch</li>
+ <li>Parsers: added xmlByteConsumed(ctxt) API to get the byte offest in
+ input.</li>
+</ul><h3>2.6.5: Jan 25 2004</h3><ul>
+ <li>Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
+ (William), xs:all problem (William), a number of XPointer bugfixes
+ (William), xmllint error go to stderr, DTD validation problem with
+ namespace, memory leak (William), SAX1 cleanup and minimal options fixes
+ (Mark Vadoc), parser context reset on error (Shaun McCance), XPath union
+ evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin),
+ XML Schemas double free (Steve Ball), XInclude with no href, argument
+ callbacks order for XPath callbacks (Frederic Peters)</li>
+ <li>Documentation: python scripts (William Brack), xslt stylesheets (John
+ Fleck), doc (Sven Zimmerman), I/O example.</li>
+ <li>Python bindings: fixes (William), enum support (Stéphane Bidoul),
+ structured error reporting (Stéphane Bidoul)</li>
+ <li>XInclude: various fixes for conformance, problem related to dictionnary
+ references (William &amp; me), recursion (William)</li>
+ <li>xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
+ Mickautsch),</li>
+ <li>xmlSchemas: normalizedString datatype (John Belmonte)</li>
+ <li>code cleanup for strings functions (William)</li>
+ <li>Windows: compiler patches (Mark Vakoc)</li>
+ <li>Parser optimizations, a few new XPath and dictionnary APIs for future
+ XSLT optimizations.</li>
+</ul><h3>2.6.4: Dec 24 2003</h3><ul>
+ <li>Windows build fixes (Igor Zlatkovic)</li>
+ <li>Some serious XInclude problems reported by Oleg Paraschenko and</li>
+ <li>Unix and Makefile packaging fixes (me, William Brack,</li>
+ <li>Documentation improvements (John Fleck, William Brack), example fix
+ (Lucas Brasilino)</li>
+ <li>bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of
+ NULL strings (William Brack) , API building reader or parser from
+ filedescriptor should not close it, changed XPath sorting to be stable
+ again (William Brack), xmlGetNodePath() generating '(null)' (William
+ Brack), DTD validation and namespace bug (William Brack), XML Schemas
+ double inclusion behaviour</li>
+</ul><h3>2.6.3: Dec 10 2003</h3><ul>
+ <li>documentation updates and cleanup (DV, William Brack, John Fleck)</li>
+ <li>added a repository of examples, examples from Aleksey Sanin, Dodji
+ Seketeli, Alfred Mickautsch</li>
+ <li>Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw
+ (Kenneth Haley)</li>
+ <li>Unicode range checking (William Brack)</li>
+ <li>code cleanup (William Brack)</li>
+ <li>Python bindings: doc (John Fleck), bug fixes</li>
+ <li>UTF-16 cleanup and BOM issues (William Brack)</li>
+ <li>bug fixes: ID and xmlReader validation, XPath (William Brack),
+ xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser
+ (James Bursa), attribute defaulting and validation, some serialization
+ cleanups, XML_GET_LINE macro, memory debug when using threads (William
+ Brack), serialization of attributes and entities content, xmlWriter
+ (Daniel Schulman)</li>
+ <li>XInclude bugfix, new APIs and update to the last version including the
+ namespace change.</li>
+ <li>XML Schemas improvements: include (Robert Stepanek), import and
+ namespace handling, fixed the regression tests troubles, added examples
+ based on Eric van der Vlist book, regexp fixes</li>
+ <li>preliminary pattern support for streaming (needed for schemas
+ constraints), added xmlTextReaderPreservePattern() to collect subdocument
+ when streaming.</li>
+ <li>various fixes in the structured error handling</li>
+</ul><h3>2.6.2: Nov 4 2003</h3><ul>
+ <li>XPath context unregistration fixes</li>
+ <li>text node coalescing fixes (Mark Lilback)</li>
+ <li>API to screate a W3C Schemas from an existing document (Steve Ball)</li>
+ <li>BeOS patches (Marcin 'Shard' Konicki)</li>
+ <li>xmlStrVPrintf function added (Aleksey Sanin)</li>
+ <li>compilation fixes (Mark Vakoc)</li>
+ <li>stdin parsing fix (William Brack)</li>
+ <li>a posteriori DTD validation fixes</li>
+ <li>xmlReader bug fixes: Walker fixes, python bindings</li>
+ <li>fixed xmlStopParser() to really stop the parser and errors</li>
+ <li>always generate line numbers when using the new xmlReadxxx
+ functions</li>
+ <li>added XInclude support to the xmlReader interface</li>
+ <li>implemented XML_PARSE_NONET parser option</li>
+ <li>DocBook XSLT processing bug fixed</li>
+ <li>HTML serialization for &lt;p&gt; elements (William Brack and me)</li>
+ <li>XPointer failure in XInclude are now handled as resource errors</li>
+ <li>fixed xmllint --html to use the HTML serializer on output (added
+ --xmlout to implement the previous behaviour of saving it using the XML
+ serializer)</li>
+</ul><h3>2.6.1: Oct 28 2003</h3><ul>
+ <li>Mostly bugfixes after the big 2.6.0 changes</li>
+ <li>Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup
+ (William Brack)</li>
+ <li>Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor
+ Zlatkovic)</li>
+ <li>xmlWriter bugfix (Alfred Mickautsch)</li>
+ <li>chvalid.[ch]: couple of fixes from Stephane Bidoul</li>
+ <li>context reset: error state reset, push parser reset (Graham
+ Bennett)</li>
+ <li>context reuse: generate errors if file is not readable</li>
+ <li>defaulted attributes for element coming from internal entities
+ (Stephane Bidoul)</li>
+ <li>Python: tab and spaces mix (William Brack)</li>
+ <li>Error handler could crash in DTD validation in 2.6.0</li>
+ <li>xmlReader: do not use the document or element _private field</li>
+ <li>testSAX.c: avoid a problem with some PIs (Massimo Morara)</li>
+ <li>general bug fixes: mandatory encoding in text decl, serializing
+ Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik),
+ XPath errors not reported, slow HTML parsing of large documents.</li>
+</ul><h3>2.6.0: Oct 20 2003</h3><ul>
+ <li>Major revision release: should be API and ABI compatible but got a lot
+ of change</li>
+ <li>Increased the library modularity, far more options can be stripped out,
+ a --with-minimum configuration will weight around 160KBytes</li>
+ <li>Use per parser and per document dictionnary, allocate names and small
+ text nodes from the dictionnary</li>
+ <li>Switch to a SAX2 like parser rewrote most of the XML parser core,
+ provides namespace resolution and defaulted attributes, minimize memory
+ allocations and copies, namespace checking and specific error handling,
+ immutable buffers, make predefined entities static structures, etc...</li>
+ <li>rewrote all the error handling in the library, all errors can be
+ intercepted at a structured level, with precise information
+ available.</li>
+ <li>New simpler and more generic XML and HTML parser APIs, allowing to
+ easilly modify the parsing options and reuse parser context for multiple
+ consecutive documents.</li>
+ <li>Similar new APIs for the xmlReader, for options and reuse, provided new
+ functions to access content as const strings, use them for Python
+ bindings</li>
+ <li>a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin),
+ Walker i.e. reader on a document tree based on Alfred Mickautsch code,
+ make room in nodes for line numbers, reference counting and future PSVI
+ extensions, generation of character ranges to be checked with faster
+ algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer
+ access</li>
+ <li>New xmlWriter API provided by Alfred Mickautsch</li>
+ <li>Schemas: base64 support by Anthony Carrico</li>
+ <li>Parser&lt;-&gt;HTTP integration fix, proper processing of the Mime-Type
+ and charset information if available.</li>
+ <li>Relax-NG: bug fixes including the one reported by Martijn Faassen and
+ zeroOrMore, better error reporting.</li>
+ <li>Python bindings (Stéphane Bidoul), never use stdout for errors
+ output</li>
+ <li>Portability: all the headers have macros for export and calling
+ convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry),
+ Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor),
+ Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul),
+ warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin
+ 'Shard' Konicki)</li>
+ <li>Documentation fixes and README (William Brack), search fix (William),
+ tutorial updates (John Fleck), namespace docs (Stefan Kost)</li>
+ <li>Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized
+ mutexes, HTML doctype lowercase, SAX/IO (William), compression detection
+ and restore (William), attribute declaration in DTDs (William), namespace
+ on attribute in HTML output (William), input filename (Rob Richards),
+ namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks
+ (Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter
+ Derr), high codepoint charref like &amp;#x10FFFF;, buffer access in push
+ mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug
+ (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
+ error handling.</li>
+ <li>xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
+ testing, --nodict for building without tree dictionnary, --nocdata to
+ replace CDATA by text, --nsclean to remove surperfluous namespace
+ declarations</li>
+ <li>added xml2-config --libtool-libs option from Kevin P. Fleming</li>
+ <li>a lot of profiling and tuning of the code, speedup patch for
+ xmlSearchNs() by Luca Padovani. The xmlReader should do far less
+ allocation and it speed should get closer to SAX. Chris Anderson worked
+ on speeding and cleaning up repetitive checking code.</li>
+ <li>cleanup of "make tests"</li>
+ <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li>
+ <li>deactivated the broken docBook SGML parser code and plugged the XML
+ parser instead.</li>
+</ul><h3>2.5.11: Sep 9 2003</h3><p>A bugfix only release:</p><ul>
+ <li>risk of crash in Relax-NG</li>
+ <li>risk of crash when using multithreaded programs</li>
+</ul><h3>2.5.10: Aug 15 2003</h3><p>A bugfixes only release</p><ul>
+ <li>Windows Makefiles (William Brack)</li>
+ <li>UTF-16 support fixes (Mark Itzcovitz)</li>
+ <li>Makefile and portability (William Brack) automake, Linux alpha, Mingw
+ on Windows (Mikhail Grushinskiy)</li>
+ <li>HTML parser (Oliver Stoeneberg)</li>
+ <li>XInclude performance problem reported by Kevin Ruscoe</li>
+ <li>XML parser performance problem reported by Grant Goodale</li>
+ <li>xmlSAXParseDTD() bug fix from Malcolm Tredinnick</li>
+ <li>and a couple other cleanup</li>
+</ul><h3>2.5.9: Aug 9 2003</h3><ul>
+ <li>bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build
+ (Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading
+ (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli),
+ xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean
+ Griffin), HTML parsing problem (William Brack), DTD validation for mixed
+ content + namespaces, HTML serialization, library initialization,
+ progressive HTML parser</li>
+ <li>better interfaces for Relax-NG error handling (Joachim Bauch, )</li>
+ <li>adding xmlXIncludeProcessTree() for XInclud'ing in a subtree</li>
+ <li>doc fixes and improvements (John Fleck)</li>
+ <li>configure flag for -with-fexceptions when embedding in C++</li>
+ <li>couple of new UTF-8 helper functions (William Brack)</li>
+ <li>general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)</li>
+ <li>xmlTextReader cleanup + enum for node types (Bjorn Reese)</li>
+ <li>general compilation/warning cleanup Solaris/HP-UX/... (William
+ Brack)</li>
+</ul><h3>2.5.8: Jul 6 2003</h3><ul>
+ <li>bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark
+ Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack),
+ PI related memleak, compilation without schemas or without xpath (Joerg
+ Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs,
+ rpm problem on , i86_64, removed a few compilation problems from 2.5.7,
+ xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)</li>
+ <li>portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)</li>
+ <li>William Brack fixed multithreading lock problems</li>
+ <li>IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)</li>
+ <li>Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane
+ Bidoul)</li>
+ <li>A few W3C Schemas Structure improvements</li>
+ <li>W3C Schemas Datatype improvements (Charlie Bozeman)</li>
+ <li>Python bindings for thread globals (Stéphane Bidoul), and method/class
+ generator</li>
+ <li>added --nonet option to xmllint</li>
+ <li>documentation improvements (John Fleck)</li>
+</ul><h3>2.5.7: Apr 25 2003</h3><ul>
+ <li>Relax-NG: Compiling to regexp and streaming validation on top of the
+ xmlReader interface, added to xmllint --stream</li>
+ <li>xmlReader: Expand(), Next() and DOM access glue, bug fixes</li>
+ <li>Support for large files: RGN validated a 4.5GB instance</li>
+ <li>Thread support is now configured in by default</li>
+ <li>Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes
+ (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser
+ and zero bytes handling, some missing Windows file path conversions,
+ behaviour of the parser and validator in the presence of "out of memory"
+ error conditions</li>
+ <li>extended the API to be able to plug a garbage collecting memory
+ allocator, added xmlMallocAtomic() and modified the allocations
+ accordingly.</li>
+ <li>Performances: removed excessive malloc() calls, speedup of the push and
+ xmlReader interfaces, removed excessive thread locking</li>
+ <li>Documentation: man page (John Fleck), xmlReader documentation</li>
+ <li>Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)</li>
+</ul><h3>2.5.6: Apr 1 2003</h3><ul>
+ <li>Fixed W3C XML Schemas datatype, should be compliant now except for
+ binHex and base64 which are not supported yet.</li>
+ <li>bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and
+ XInclude entities handling, encoding detection on external subsets, XML
+ Schemas bugs and memory leaks, HTML parser (James Bursa)</li>
+ <li>portability: python/trio (Albert Chin), Sun compiler warnings</li>
+ <li>documentation: added --relaxng option to xmllint man page (John)</li>
+ <li>improved error reporting: xml:space, start/end tag mismatches, Relax NG
+ errors</li>
+</ul><h3>2.5.5: Mar 24 2003</h3><ul>
+ <li>Lot of fixes on the Relax NG implementation. More testing including
+ DocBook and TEI examples.</li>
+ <li>Increased the support for W3C XML Schemas datatype</li>
+ <li>Several bug fixes in the URI handling layer</li>
+ <li>Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding
+ conversion, line counting in the parser.</li>
+ <li>Added support for $XMLLINT_INDENT environment variable, FTP delete</li>
+ <li>Fixed the RPM spec file name</li>
+</ul><h3>2.5.4: Feb 20 2003</h3><ul>
+ <li>Conformance testing and lot of fixes on Relax NG and XInclude
+ implementation</li>
+ <li>Implementation of XPointer element() scheme</li>
+ <li>Bug fixes: XML parser, XInclude entities merge, validity checking on
+ namespaces,
+ <p>2 serialization bugs, node info generation problems, a DTD regexp
+ generation problem.</p>
+ </li>
+ <li>Portability: windows updates and path canonicalization (Igor)</li>
+ <li>A few typo fixes (Kjartan Maraas)</li>
+ <li>Python bindings generator fixes (Stephane Bidoul)</li>
+</ul><h3>2.5.3: Feb 10 2003</h3><ul>
+ <li>RelaxNG and XML Schemas datatypes improvements, and added a first
+ version of RelaxNG Python bindings</li>
+ <li>Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for
+ serializing namespace nodes, encoding conversion bug, XHTML1
+ serialization</li>
+ <li>Portability fixes: Windows (Igor), AMD 64bits RPM spec file</li>
+</ul><h3>2.5.2: Feb 5 2003</h3><ul>
+ <li>First implementation of RelaxNG, added --relaxng flag to xmllint</li>
+ <li>Schemas support now compiled in by default.</li>
+ <li>Bug fixes: DTD validation, namespace checking, XInclude and entities,
+ delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul),
+ XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory
+ consumption, HTML parser, HTML serialization in the presence of
+ namespaces</li>
+ <li>added an HTML API to check elements and attributes.</li>
+ <li>Documentation improvement, PDF for the tutorial (John Fleck), doc
+ patches (Stefan Kost)</li>
+ <li>Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)</li>
+ <li>Added python bindings for XPointer, contextual error reporting
+ (Stéphane Bidoul)</li>
+ <li>URI/file escaping problems (Stefano Zacchiroli)</li>
+</ul><h3>2.5.1: Jan 8 2003</h3><ul>
+ <li>Fixes a memory leak and configuration/compilation problems in 2.5.0</li>
+ <li>documentation updates (John)</li>
+ <li>a couple of XmlTextReader fixes</li>
+</ul><h3>2.5.0: Jan 6 2003</h3><ul>
+ <li>New <a href="xmlreader.html">XmltextReader interface</a> based on C#
+ API (with help of Stéphane Bidoul)</li>
+ <li>Windows: more exports, including the new API (Igor)</li>
+ <li>XInclude fallback fix</li>
+ <li>Python: bindings for the new API, packaging (Stéphane Bidoul),
+ drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup
+ and iterators for Python-2.2 (Hannu Krosing)</li>
+ <li>Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update
+ (John)</li>
+ <li>Fix an XML parser bug raised by Vyacheslav Pindyura</li>
+ <li>Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)</li>
+ <li>Entities handling fixes</li>
+ <li>new API to optionally track node creation and deletion (Lukas
+ Schroeder)</li>
+ <li>Added documentation for the XmltextReader interface and some <a href="guidelines.html">XML guidelines</a></li>
+</ul><h3>2.4.30: Dec 12 2002</h3><ul>
+ <li>2.4.29 broke the python bindings, rereleasing</li>
+ <li>Improvement/fixes of the XML API generator, and couple of minor code
+ fixes.</li>
+</ul><h3>2.4.29: Dec 11 2002</h3><ul>
+ <li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
+ (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
+ <li>Fix for prev in python bindings (ERDI Gergo)</li>
+ <li>Fix for entities handling (Marcus Clarke)</li>
+ <li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
+ dump</li>
+ <li>Fix for URI parsing when handling URNs with fragment identifiers</li>
+ <li>Fix for HTTP URL escaping problem</li>
+ <li>added an TextXmlReader (C#) like API (work in progress)</li>
+ <li>Rewrote the API in XML generation script, includes a C parser and saves
+ more information needed for C# bindings</li>
+</ul><h3>2.4.28: Nov 22 2002</h3><ul>
+ <li>a couple of python binding fixes</li>
+ <li>2 bug fixes in the XML push parser</li>
+ <li>potential memory leak removed (Martin Stoilov)</li>
+ <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
+ <li>added encoding support for XInclude parse="text"</li>
+ <li>autodetection of XHTML1 and specific serialization rules added</li>
+ <li>nasty threading bug fixed (William Brack)</li>
+</ul><h3>2.4.27: Nov 17 2002</h3><ul>
+ <li>fixes for the Python bindings</li>
+ <li>a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(),
+ HTML parser, Schemas (Charles Bozeman), document fragment support
+ (Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer,
+ xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr
+ Pajas), entities processing</li>
+ <li>added grep to xmllint --shell</li>
+ <li>VMS update patch from Craig A. Berry</li>
+ <li>cleanup of the Windows build with support for more compilers (Igor),
+ better thread support on Windows</li>
+ <li>cleanup of Unix Makefiles and spec file</li>
+ <li>Improvements to the documentation (John Fleck)</li>
+</ul><h3>2.4.26: Oct 18 2002</h3><ul>
+ <li>Patches for Windows CE port, improvements on Windows paths handling</li>
+ <li>Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() ,
+ HTML serialization, Namespace compliance, and a number of small
+ problems</li>
+</ul><h3>2.4.25: Sep 26 2002</h3><ul>
+ <li>A number of bug fixes: XPath, validation, Python bindings, DOM and
+ tree, xmlI/O, Html</li>
+ <li>Serious rewrite of XInclude</li>
+ <li>Made XML Schemas regexp part of the default build and APIs, small fix
+ and improvement of the regexp core</li>
+ <li>Changed the validation code to reuse XML Schemas regexp APIs</li>
+ <li>Better handling of Windows file paths, improvement of Makefiles (Igor,
+ Daniel Gehriger, Mark Vakoc)</li>
+ <li>Improved the python I/O bindings, the tests, added resolver and regexp
+ APIs</li>
+ <li>New logos from Marc Liyanage</li>
+ <li>Tutorial improvements: John Fleck, Christopher Harris</li>
+ <li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe
+ Merlet)</li>
+ <li>removal of all stderr/perror use for error reporting</li>
+ <li>Better error reporting: XPath and DTD validation</li>
+ <li>update of the trio portability layer (Bjorn Reese)</li>
+</ul><p><strong>2.4.24: Aug 22 2002</strong></p><ul>
+ <li>XPath fixes (William), xf:escape-uri() (Wesley Terpstra)</li>
+ <li>Python binding fixes: makefiles (William), generator, rpm build, x86-64
+ (fcrozat)</li>
+ <li>HTML &lt;style&gt; and boolean attributes serializer fixes</li>
+ <li>C14N improvements by Aleksey</li>
+ <li>doc cleanups: Rick Jones</li>
+ <li>Windows compiler makefile updates: Igor and Elizabeth Barham</li>
+ <li>XInclude: implementation of fallback and xml:base fixup added</li>
+</ul><h3>2.4.23: July 6 2002</h3><ul>
+ <li>performances patches: Peter Jacobi</li>
+ <li>c14n fixes, testsuite and performances: Aleksey Sanin</li>
+ <li>added xmlDocFormatDump: Chema Celorio</li>
+ <li>new tutorial: John Fleck</li>
+ <li>new hash functions and performances: Sander Vesik, portability fix from
+ Peter Jacobi</li>
+ <li>a number of bug fixes: XPath (William Brack, Richard Jinks), XML and
+ HTML parsers, ID lookup function</li>
+ <li>removal of all remaining sprintf: Aleksey Sanin</li>
+</ul><h3>2.4.22: May 27 2002</h3><ul>
+ <li>a number of bug fixes: configure scripts, base handling, parser, memory
+ usage, HTML parser, XPath, documentation (Christian Cornelssen),
+ indentation, URI parsing</li>
+ <li>Optimizations for XMLSec, fixing and making public some of the network
+ protocol handlers (Aleksey)</li>
+ <li>performance patch from Gary Pennington</li>
+ <li>Charles Bozeman provided date and time support for XML Schemas
+ datatypes</li>
+</ul><h3>2.4.21: Apr 29 2002</h3><p>This release is both a bug fix release and also contains the early XML
+Schemas <a href="http://www.w3.org/TR/xmlschema-1/">structures</a> and <a href="http://www.w3.org/TR/xmlschema-2/">datatypes</a> code, beware, all
+interfaces are likely to change, there is huge holes, it is clearly a work in
+progress and don't even think of putting this code in a production system,
+it's actually not compiled in by default. The real fixes are:
+</p><ul>
+ <li>a couple of bugs or limitations introduced in 2.4.20</li>
+ <li>patches for Borland C++ and MSC by Igor</li>
+ <li>some fixes on XPath strings and conformance patches by Richard
+ Jinks</li>
+ <li>patch from Aleksey for the ExcC14N specification</li>
+ <li>OSF/1 bug fix by Bjorn</li>
+</ul><h3>2.4.20: Apr 15 2002</h3><ul>
+ <li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li>
+ <li>XPath conformance testing by Richard Jinks</li>
+ <li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings,
+ libxml.m4</li>
+</ul><h3>2.4.19: Mar 25 2002</h3><ul>
+ <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
+ encoder</li>
+ <li>portability fixes in the HTTP code</li>
+ <li>memory allocation checks using valgrind, and profiling tests</li>
+ <li>revamp of the Windows build and Makefiles</li>
+</ul><h3>2.4.18: Mar 18 2002</h3><ul>
+ <li>bug fixes: tree, SAX, canonicalization, validation, portability,
+ XPath</li>
+ <li>removed the --with-buffer option it was becoming unmaintainable</li>
+ <li>serious cleanup of the Python makefiles</li>
+ <li>speedup patch to XPath very effective for DocBook stylesheets</li>
+ <li>Fixes for Windows build, cleanup of the documentation</li>
+</ul><h3>2.4.17: Mar 8 2002</h3><ul>
+ <li>a lot of bug fixes, including "namespace nodes have no parents in
+ XPath"</li>
+ <li>fixed/improved the Python wrappers, added more examples and more
+ regression tests, XPath extension functions can now return node-sets</li>
+ <li>added the XML Canonicalization support from Aleksey Sanin</li>
+</ul><h3>2.4.16: Feb 20 2002</h3><ul>
+ <li>a lot of bug fixes, most of them were triggered by the XML Testsuite
+ from OASIS and W3C. Compliance has been significantly improved.</li>
+ <li>a couple of portability fixes too.</li>
+</ul><h3>2.4.15: Feb 11 2002</h3><ul>
+ <li>Fixed the Makefiles, especially the python module ones</li>
+ <li>A few bug fixes and cleanup</li>
+ <li>Includes cleanup</li>
+</ul><h3>2.4.14: Feb 8 2002</h3><ul>
+ <li>Change of License to the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a> basically for integration in XFree86 codebase, and removing
+ confusion around the previous dual-licensing</li>
+ <li>added Python bindings, beta software but should already be quite
+ complete</li>
+ <li>a large number of fixes and cleanups, especially for all tree
+ manipulations</li>
+ <li>cleanup of the headers, generation of a reference API definition in
+ XML</li>
+</ul><h3>2.4.13: Jan 14 2002</h3><ul>
+ <li>update of the documentation: John Fleck and Charlie Bozeman</li>
+ <li>cleanup of timing code from Justin Fletcher</li>
+ <li>fixes for Windows and initial thread support on Win32: Igor and Serguei
+ Narojnyi</li>
+ <li>Cygwin patch from Robert Collins</li>
+ <li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li>
+</ul><h3>2.4.12: Dec 7 2001</h3><ul>
+ <li>a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman),
+ XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups
+ (robert)</li>
+ <li>Eric Lavigne contributed project files for MacOS</li>
+ <li>some makefiles cleanups</li>
+</ul><h3>2.4.11: Nov 26 2001</h3><ul>
+ <li>fixed a couple of errors in the includes, fixed a few bugs, some code
+ cleanups</li>
+ <li>xmllint man pages improvement by Heiko Rupp</li>
+ <li>updated VMS build instructions from John A Fotheringham</li>
+ <li>Windows Makefiles updates from Igor</li>
+</ul><h3>2.4.10: Nov 10 2001</h3><ul>
+ <li>URI escaping fix (Joel Young)</li>
+ <li>added xmlGetNodePath() (for paths or XPointers generation)</li>
+ <li>Fixes namespace handling problems when using DTD and validation</li>
+ <li>improvements on xmllint: Morus Walter patches for --format and
+ --encode, Stefan Kost and Heiko Rupp improvements on the --shell</li>
+ <li>fixes for xmlcatalog linking pointed by Weiqi Gao</li>
+ <li>fixes to the HTML parser</li>
+</ul><h3>2.4.9: Nov 6 2001</h3><ul>
+ <li>fixes more catalog bugs</li>
+ <li>avoid a compilation problem, improve xmlGetLineNo()</li>
+</ul><h3>2.4.8: Nov 4 2001</h3><ul>
+ <li>fixed SGML catalogs broken in previous release, updated xmlcatalog
+ tool</li>
+ <li>fixed a compile errors and some includes troubles.</li>
+</ul><h3>2.4.7: Oct 30 2001</h3><ul>
+ <li>exported some debugging interfaces</li>
+ <li>serious rewrite of the catalog code</li>
+ <li>integrated Gary Pennington thread safety patch, added configure option
+ and regression tests</li>
+ <li>removed an HTML parser bug</li>
+ <li>fixed a couple of potentially serious validation bugs</li>
+ <li>integrated the SGML DocBook support in xmllint</li>
+ <li>changed the nanoftp anonymous login passwd</li>
+ <li>some I/O cleanup and a couple of interfaces for Perl wrapper</li>
+ <li>general bug fixes</li>
+ <li>updated xmllint man page by John Fleck</li>
+ <li>some VMS and Windows updates</li>
+</ul><h3>2.4.6: Oct 10 2001</h3><ul>
+ <li>added an updated man pages by John Fleck</li>
+ <li>portability and configure fixes</li>
+ <li>an infinite loop on the HTML parser was removed (William)</li>
+ <li>Windows makefile patches from Igor</li>
+ <li>fixed half a dozen bugs reported for libxml or libxslt</li>
+ <li>updated xmlcatalog to be able to modify SGML super catalogs</li>
+</ul><h3>2.4.5: Sep 14 2001</h3><ul>
+ <li>Remove a few annoying bugs in 2.4.4</li>
+ <li>forces the HTML serializer to output decimal charrefs since some
+ version of Netscape can't handle hexadecimal ones</li>
+</ul><h3>1.8.16: Sep 14 2001</h3><ul>
+ <li>maintenance release of the old libxml1 branch, couple of bug and
+ portability fixes</li>
+</ul><h3>2.4.4: Sep 12 2001</h3><ul>
+ <li>added --convert to xmlcatalog, bug fixes and cleanups of XML
+ Catalog</li>
+ <li>a few bug fixes and some portability changes</li>
+ <li>some documentation cleanups</li>
+</ul><h3>2.4.3: Aug 23 2001</h3><ul>
+ <li>XML Catalog support see the doc</li>
+ <li>New NaN/Infinity floating point code</li>
+ <li>A few bug fixes</li>
+</ul><h3>2.4.2: Aug 15 2001</h3><ul>
+ <li>adds xmlLineNumbersDefault() to control line number generation</li>
+ <li>lot of bug fixes</li>
+ <li>the Microsoft MSC projects files should now be up to date</li>
+ <li>inheritance of namespaces from DTD defaulted attributes</li>
+ <li>fixes a serious potential security bug</li>
+ <li>added a --format option to xmllint</li>
+</ul><h3>2.4.1: July 24 2001</h3><ul>
+ <li>possibility to keep line numbers in the tree</li>
+ <li>some computation NaN fixes</li>
+ <li>extension of the XPath API</li>
+ <li>cleanup for alpha and ia64 targets</li>
+ <li>patch to allow saving through HTTP PUT or POST</li>
+</ul><h3>2.4.0: July 10 2001</h3><ul>
+ <li>Fixed a few bugs in XPath, validation, and tree handling.</li>
+ <li>Fixed XML Base implementation, added a couple of examples to the
+ regression tests</li>
+ <li>A bit of cleanup</li>
+</ul><h3>2.3.14: July 5 2001</h3><ul>
+ <li>fixed some entities problems and reduce memory requirement when
+ substituting them</li>
+ <li>lots of improvements in the XPath queries interpreter can be
+ substantially faster</li>
+ <li>Makefiles and configure cleanups</li>
+ <li>Fixes to XPath variable eval, and compare on empty node set</li>
+ <li>HTML tag closing bug fixed</li>
+ <li>Fixed an URI reference computation problem when validating</li>
+</ul><h3>2.3.13: June 28 2001</h3><ul>
+ <li>2.3.12 configure.in was broken as well as the push mode XML parser</li>
+ <li>a few more fixes for compilation on Windows MSC by Yon Derek</li>
+</ul><h3>1.8.14: June 28 2001</h3><ul>
+ <li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li>
+ <li>Small Makefile fix</li>
+</ul><h3>2.3.12: June 26 2001</h3><ul>
+ <li>lots of cleanup</li>
+ <li>a couple of validation fix</li>
+ <li>fixed line number counting</li>
+ <li>fixed serious problems in the XInclude processing</li>
+ <li>added support for UTF8 BOM at beginning of entities</li>
+ <li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
+ miscompile uri.c (William), Thomas Leitner provided a fix for the
+ optimizer on Tru64</li>
+ <li>incorporated Yon Derek and Igor Zlatkovic fixes and improvements for
+ compilation on Windows MSC</li>
+ <li>update of libxml-doc.el (Felix Natter)</li>
+ <li>fixed 2 bugs in URI normalization code</li>
+</ul><h3>2.3.11: June 17 2001</h3><ul>
+ <li>updates to trio, Makefiles and configure should fix some portability
+ problems (alpha)</li>
+ <li>fixed some HTML serialization problems (pre, script, and block/inline
+ handling), added encoding aware APIs, cleanup of this code</li>
+ <li>added xmlHasNsProp()</li>
+ <li>implemented a specific PI for encoding support in the DocBook SGML
+ parser</li>
+ <li>some XPath fixes (-Infinity, / as a function parameter and namespaces
+ node selection)</li>
+ <li>fixed a performance problem and an error in the validation code</li>
+ <li>fixed XInclude routine to implement the recursive behaviour</li>
+ <li>fixed xmlFreeNode problem when libxml is included statically twice</li>
+ <li>added --version to xmllint for bug reports</li>
+</ul><h3>2.3.10: June 1 2001</h3><ul>
+ <li>fixed the SGML catalog support</li>
+ <li>a number of reported bugs got fixed, in XPath, iconv detection,
+ XInclude processing</li>
+ <li>XPath string function should now handle unicode correctly</li>
+</ul><h3>2.3.9: May 19 2001</h3><p>Lots of bugfixes, and added a basic SGML catalog support:
+</p><ul>
+ <li>HTML push bugfix #54891 and another patch from Jonas Borgstrom</li>
+ <li>some serious speed optimization again</li>
+ <li>some documentation cleanups</li>
+ <li>trying to get better linking on Solaris (-R)</li>
+ <li>XPath API cleanup from Thomas Broyer</li>
+ <li>Validation bug fixed #54631, added a patch from Gary Pennington, fixed
+ xmlValidGetValidElements()</li>
+ <li>Added an INSTALL file</li>
+ <li>Attribute removal added to API: #54433</li>
+ <li>added a basic support for SGML catalogs</li>
+ <li>fixed xmlKeepBlanksDefault(0) API</li>
+ <li>bugfix in xmlNodeGetLang()</li>
+ <li>fixed a small configure portability problem</li>
+ <li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li>
+</ul><h3>1.8.13: May 14 2001</h3><ul>
+ <li>bugfixes release of the old libxml1 branch used by Gnome</li>
+</ul><h3>2.3.8: May 3 2001</h3><ul>
+ <li>Integrated an SGML DocBook parser for the Gnome project</li>
+ <li>Fixed a few things in the HTML parser</li>
+ <li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating
+ point portability issue</li>
+ <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for
+ DOM+validation using the XML REC as input and a 700MHz celeron).</li>
+ <li>incorporated more Windows cleanup</li>
+ <li>added xmlSaveFormatFile()</li>
+ <li>fixed problems in copying nodes with entities references (gdome)</li>
+ <li>removed some troubles surrounding the new validation module</li>
+</ul><h3>2.3.7: April 22 2001</h3><ul>
+ <li>lots of small bug fixes, corrected XPointer</li>
+ <li>Non deterministic content model validation support</li>
+ <li>added xmlDocCopyNode for gdome2</li>
+ <li>revamped the way the HTML parser handles end of tags</li>
+ <li>XPath: corrections of namespaces support and number formatting</li>
+ <li>Windows: Igor Zlatkovic patches for MSC compilation</li>
+ <li>HTML output fixes from P C Chow and William M. Brack</li>
+ <li>Improved validation speed sensible for DocBook</li>
+ <li>fixed a big bug with ID declared in external parsed entities</li>
+ <li>portability fixes, update of Trio from Bjorn Reese</li>
+</ul><h3>2.3.6: April 8 2001</h3><ul>
+ <li>Code cleanup using extreme gcc compiler warning options, found and
+ cleared half a dozen potential problem</li>
+ <li>the Eazel team found an XML parser bug</li>
+ <li>cleaned up the user of some of the string formatting function. used the
+ trio library code to provide the one needed when the platform is missing
+ them</li>
+ <li>xpath: removed a memory leak and fixed the predicate evaluation
+ problem, extended the testsuite and cleaned up the result. XPointer seems
+ broken ...</li>
+</ul><h3>2.3.5: Mar 23 2001</h3><ul>
+ <li>Biggest change is separate parsing and evaluation of XPath expressions,
+ there is some new APIs for this too</li>
+ <li>included a number of bug fixes(XML push parser, 51876, notations,
+ 52299)</li>
+ <li>Fixed some portability issues</li>
+</ul><h3>2.3.4: Mar 10 2001</h3><ul>
+ <li>Fixed bugs #51860 and #51861</li>
+ <li>Added a global variable xmlDefaultBufferSize to allow default buffer
+ size to be application tunable.</li>
+ <li>Some cleanup in the validation code, still a bug left and this part
+ should probably be rewritten to support ambiguous content model :-\</li>
+ <li>Fix a couple of serious bugs introduced or raised by changes in 2.3.3
+ parser</li>
+ <li>Fixed another bug in xmlNodeGetContent()</li>
+ <li>Bjorn fixed XPath node collection and Number formatting</li>
+ <li>Fixed a loop reported in the HTML parsing</li>
+ <li>blank space are reported even if the Dtd content model proves that they
+ are formatting spaces, this is for XML conformance</li>
+</ul><h3>2.3.3: Mar 1 2001</h3><ul>
+ <li>small change in XPath for XSLT</li>
+ <li>documentation cleanups</li>
+ <li>fix in validation by Gary Pennington</li>
+ <li>serious parsing performances improvements</li>
+</ul><h3>2.3.2: Feb 24 2001</h3><ul>
+ <li>chasing XPath bugs, found a bunch, completed some TODO</li>
+ <li>fixed a Dtd parsing bug</li>
+ <li>fixed a bug in xmlNodeGetContent</li>
+ <li>ID/IDREF support partly rewritten by Gary Pennington</li>
+</ul><h3>2.3.1: Feb 15 2001</h3><ul>
+ <li>some XPath and HTML bug fixes for XSLT</li>
+ <li>small extension of the hash table interfaces for DOM gdome2
+ implementation</li>
+ <li>A few bug fixes</li>
+</ul><h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3><ul>
+ <li>Lots of XPath bug fixes</li>
+ <li>Add a mode with Dtd lookup but without validation error reporting for
+ XSLT</li>
+ <li>Add support for text node without escaping (XSLT)</li>
+ <li>bug fixes for xmlCheckFilename</li>
+ <li>validation code bug fixes from Gary Pennington</li>
+ <li>Patch from Paul D. Smith correcting URI path normalization</li>
+ <li>Patch to allow simultaneous install of libxml-devel and
+ libxml2-devel</li>
+ <li>the example Makefile is now fixed</li>
+ <li>added HTML to the RPM packages</li>
+ <li>tree copying bugfixes</li>
+ <li>updates to Windows makefiles</li>
+ <li>optimization patch from Bjorn Reese</li>
+</ul><h3>2.2.11: Jan 4 2001</h3><ul>
+ <li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li>
+ <li>added htmlHandleOmittedElem()</li>
+ <li>Applied Bjorn Reese's IPV6 first patch</li>
+ <li>Applied Paul D. Smith patches for validation of XInclude results</li>
+ <li>added XPointer xmlns() new scheme support</li>
+</ul><h3>2.2.10: Nov 25 2000</h3><ul>
+ <li>Fix the Windows problems of 2.2.8</li>
+ <li>integrate OpenVMS patches</li>
+ <li>better handling of some nasty HTML input</li>
+ <li>Improved the XPointer implementation</li>
+ <li>integrate a number of provided patches</li>
+</ul><h3>2.2.9: Nov 25 2000</h3><ul>
+ <li>erroneous release :-(</li>
+</ul><h3>2.2.8: Nov 13 2000</h3><ul>
+ <li>First version of <a href="http://www.w3.org/TR/xinclude">XInclude</a>
+ support</li>
+ <li>Patch in conditional section handling</li>
+ <li>updated MS compiler project</li>
+ <li>fixed some XPath problems</li>
+ <li>added an URI escaping function</li>
+ <li>some other bug fixes</li>
+</ul><h3>2.2.7: Oct 31 2000</h3><ul>
+ <li>added message redirection</li>
+ <li>XPath improvements (thanks TOM !)</li>
+ <li>xmlIOParseDTD() added</li>
+ <li>various small fixes in the HTML, URI, HTTP and XPointer support</li>
+ <li>some cleanup of the Makefile, autoconf and the distribution content</li>
+</ul><h3>2.2.6: Oct 25 2000:</h3><ul>
+ <li>Added an hash table module, migrated a number of internal structure to
+ those</li>
+ <li>Fixed a posteriori validation problems</li>
+ <li>HTTP module cleanups</li>
+ <li>HTML parser improvements (tag errors, script/style handling, attribute
+ normalization)</li>
+ <li>coalescing of adjacent text nodes</li>
+ <li>couple of XPath bug fixes, exported the internal API</li>
+</ul><h3>2.2.5: Oct 15 2000:</h3><ul>
+ <li>XPointer implementation and testsuite</li>
+ <li>Lot of XPath fixes, added variable and functions registration, more
+ tests</li>
+ <li>Portability fixes, lots of enhancements toward an easy Windows build
+ and release</li>
+ <li>Late validation fixes</li>
+ <li>Integrated a lot of contributed patches</li>
+ <li>added memory management docs</li>
+ <li>a performance problem when using large buffer seems fixed</li>
+</ul><h3>2.2.4: Oct 1 2000:</h3><ul>
+ <li>main XPath problem fixed</li>
+ <li>Integrated portability patches for Windows</li>
+ <li>Serious bug fixes on the URI and HTML code</li>
+</ul><h3>2.2.3: Sep 17 2000</h3><ul>
+ <li>bug fixes</li>
+ <li>cleanup of entity handling code</li>
+ <li>overall review of all loops in the parsers, all sprintf usage has been
+ checked too</li>
+ <li>Far better handling of larges Dtd. Validating against DocBook XML Dtd
+ works smoothly now.</li>
+</ul><h3>1.8.10: Sep 6 2000</h3><ul>
+ <li>bug fix release for some Gnome projects</li>
+</ul><h3>2.2.2: August 12 2000</h3><ul>
+ <li>mostly bug fixes</li>
+ <li>started adding routines to access xml parser context options</li>
+</ul><h3>2.2.1: July 21 2000</h3><ul>
+ <li>a purely bug fixes release</li>
+ <li>fixed an encoding support problem when parsing from a memory block</li>
+ <li>fixed a DOCTYPE parsing problem</li>
+ <li>removed a bug in the function allowing to override the memory
+ allocation routines</li>
+</ul><h3>2.2.0: July 14 2000</h3><ul>
+ <li>applied a lot of portability fixes</li>
+ <li>better encoding support/cleanup and saving (content is now always
+ encoded in UTF-8)</li>
+ <li>the HTML parser now correctly handles encodings</li>
+ <li>added xmlHasProp()</li>
+ <li>fixed a serious problem with &amp;#38;</li>
+ <li>propagated the fix to FTP client</li>
+ <li>cleanup, bugfixes, etc ...</li>
+ <li>Added a page about <a href="encoding.html">libxml Internationalization
+ support</a></li>
+</ul><h3>1.8.9: July 9 2000</h3><ul>
+ <li>fixed the spec the RPMs should be better</li>
+ <li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve
+ rpmfind users problem</li>
+</ul><h3>2.1.1: July 1 2000</h3><ul>
+ <li>fixes a couple of bugs in the 2.1.0 packaging</li>
+ <li>improvements on the HTML parser</li>
+</ul><h3>2.1.0 and 1.8.8: June 29 2000</h3><ul>
+ <li>1.8.8 is mostly a commodity package for upgrading to libxml2 according
+ to <a href="upgrade.html">new instructions</a>. It fixes a nasty problem
+ about &amp;#38; charref parsing</li>
+ <li>2.1.0 also ease the upgrade from libxml v1 to the recent version. it
+ also contains numerous fixes and enhancements:
+ <ul>
+ <li>added xmlStopParser() to stop parsing</li>
+ <li>improved a lot parsing speed when there is large CDATA blocs</li>
+ <li>includes XPath patches provided by Picdar Technology</li>
+ <li>tried to fix as much as possible DTD validation and namespace
+ related problems</li>
+ <li>output to a given encoding has been added/tested</li>
+ <li>lot of various fixes</li>
+ </ul>
+ </li>
+</ul><h3>2.0.0: Apr 12 2000</h3><ul>
+ <li>First public release of libxml2. If you are using libxml, it's a good
+ idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially
+ scheduled for Apr 3 the release occurred only on Apr 12 due to massive
+ workload.</li>
+ <li>The include are now located under $prefix/include/libxml (instead of
+ $prefix/include/gnome-xml), they also are referenced by
+ <pre>#include &lt;libxml/xxx.h&gt;</pre>
+ <p>instead of</p>
+ <pre>#include "xxx.h"</pre>
+ </li>
+ <li>a new URI module for parsing URIs and following strictly RFC 2396</li>
+ <li>the memory allocation routines used by libxml can now be overloaded
+ dynamically by using xmlMemSetup()</li>
+ <li>The previously CVS only tool tester has been renamed
+ <strong>xmllint</strong> and is now installed as part of the libxml2
+ package</li>
+ <li>The I/O interface has been revamped. There is now ways to plug in
+ specific I/O modules, either at the URI scheme detection level using
+ xmlRegisterInputCallbacks() or by passing I/O functions when creating a
+ parser context using xmlCreateIOParserCtxt()</li>
+ <li>there is a C preprocessor macro LIBXML_VERSION providing the version
+ number of the libxml module in use</li>
+ <li>a number of optional features of libxml can now be excluded at
+ configure time (FTP/HTTP/HTML/XPath/Debug)</li>
+</ul><h3>2.0.0beta: Mar 14 2000</h3><ul>
+ <li>This is a first Beta release of libxml version 2</li>
+ <li>It's available only from<a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org
+ FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and
+ RPMs</li>
+ <li>This version is now the head in the Gnome CVS base, the old one is
+ available under the tag LIB_XML_1_X</li>
+ <li>This includes a very large set of changes. From a programmatic point
+ of view applications should not have to be modified too much, check the
+ <a href="upgrade.html">upgrade page</a></li>
+ <li>Some interfaces may changes (especially a bit about encoding).</li>
+ <li>the updates includes:
+ <ul>
+ <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
+ handled now</li>
+ <li>Better handling of entities, especially well-formedness checking
+ and proper PEref extensions in external subsets</li>
+ <li>DTD conditional sections</li>
+ <li>Validation now correctly handle entities content</li>
+ <li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change
+ structures to accommodate DOM</a></li>
+ </ul>
+ </li>
+ <li>Serious progress were made toward compliance, <a href="conf/result.html">here are the result of the test</a> against the
+ OASIS testsuite (except the Japanese tests since I don't support that
+ encoding yet). This URL is rebuilt every couple of hours using the CVS
+ head version.</li>
+</ul><h3>1.8.7: Mar 6 2000</h3><ul>
+ <li>This is a bug fix release:</li>
+ <li>It is possible to disable the ignorable blanks heuristic used by
+ libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
+ that for adherence to XML spec, this behaviour will be disabled by
+ default in 2.x . The same function will allow to keep compatibility for
+ old code.</li>
+ <li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore,
+ avoiding heuristic is really the Right Way :-\</li>
+ <li>The unchecked use of snprintf which was breaking libxml-1.8.6
+ compilation on some platforms has been fixed</li>
+ <li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
+ URIs</li>
+</ul><h3>1.8.6: Jan 31 2000</h3><ul>
+ <li>added a nanoFTP transport module, debugged until the new version of <a href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a> can use
+ it without troubles</li>
+</ul><h3>1.8.5: Jan 21 2000</h3><ul>
+ <li>adding APIs to parse a well balanced chunk of XML (production <a href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the
+ XML spec)</li>
+ <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li>
+ <li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying
+ to solve the zlib checks problems</li>
+ <li>The current state in gnome CVS base is expected to ship as 1.8.5 with
+ gnumeric soon</li>
+</ul><h3>1.8.4: Jan 13 2000</h3><ul>
+ <li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li>
+ <li>all exit() call should have been removed from libxml</li>
+ <li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li>
+ <li>added newDocFragment()</li>
+</ul><h3>1.8.3: Jan 5 2000</h3><ul>
+ <li>a Push interface for the XML and HTML parsers</li>
+ <li>a shell-like interface to the document tree (try tester --shell :-)</li>
+ <li>lots of bug fixes and improvement added over XMas holidays</li>
+ <li>fixed the DTD parsing code to work with the xhtml DTD</li>
+ <li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li>
+ <li>Fixed bugs in xmlNewNs()</li>
+ <li>External entity loading code has been revamped, now it uses
+ xmlLoadExternalEntity(), some fix on entities processing were added</li>
+ <li>cleaned up WIN32 includes of socket stuff</li>
+</ul><h3>1.8.2: Dec 21 1999</h3><ul>
+ <li>I got another problem with includes and C++, I hope this issue is fixed
+ for good this time</li>
+ <li>Added a few tree modification functions: xmlReplaceNode,
+ xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and
+ xmlDocSetRootElement</li>
+ <li>Tried to improve the HTML output with help from <a href="mailto:clahey@umich.edu">Chris Lahey</a></li>
+</ul><h3>1.8.1: Dec 18 1999</h3><ul>
+ <li>various patches to avoid troubles when using libxml with C++ compilers
+ the "namespace" keyword and C escaping in include files</li>
+ <li>a problem in one of the core macros IS_CHAR was corrected</li>
+ <li>fixed a bug introduced in 1.8.0 breaking default namespace processing,
+ and more specifically the Dia application</li>
+ <li>fixed a posteriori validation (validation after parsing, or by using a
+ Dtd not specified in the original document)</li>
+ <li>fixed a bug in</li>
+</ul><h3>1.8.0: Dec 12 1999</h3><ul>
+ <li>cleanup, especially memory wise</li>
+ <li>the parser should be more reliable, especially the HTML one, it should
+ not crash, whatever the input !</li>
+ <li>Integrated various patches, especially a speedup improvement for large
+ dataset from <a href="mailto:cnygard@bellatlantic.net">Carl Nygard</a>,
+ configure with --with-buffers to enable them.</li>
+ <li>attribute normalization, oops should have been added long ago !</li>
+ <li>attributes defaulted from DTDs should be available, xmlSetProp() now
+ does entities escaping by default.</li>
+</ul><h3>1.7.4: Oct 25 1999</h3><ul>
+ <li>Lots of HTML improvement</li>
+ <li>Fixed some errors when saving both XML and HTML</li>
+ <li>More examples, the regression tests should now look clean</li>
+ <li>Fixed a bug with contiguous charref</li>
+</ul><h3>1.7.3: Sep 29 1999</h3><ul>
+ <li>portability problems fixed</li>
+ <li>snprintf was used unconditionally, leading to link problems on system
+ were it's not available, fixed</li>
+</ul><h3>1.7.1: Sep 24 1999</h3><ul>
+ <li>The basic type for strings manipulated by libxml has been renamed in
+ 1.7.1 from <strong>CHAR</strong> to <strong>xmlChar</strong>. The reason
+ is that CHAR was conflicting with a predefined type on Windows. However
+ on non WIN32 environment, compatibility is provided by the way of a
+ <strong>#define </strong>.</li>
+ <li>Changed another error : the use of a structure field called errno, and
+ leading to troubles on platforms where it's a macro</li>
+</ul><h3>1.7.0: Sep 23 1999</h3><ul>
+ <li>Added the ability to fetch remote DTD or parsed entities, see the <a href="html/libxml-nanohttp.html">nanohttp</a> module.</li>
+ <li>Added an errno to report errors by another mean than a simple printf
+ like callback</li>
+ <li>Finished ID/IDREF support and checking when validation</li>
+ <li>Serious memory leaks fixed (there is now a <a href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li>
+ <li>Improvement of <a href="http://www.w3.org/TR/xpath">XPath</a>
+ implementation</li>
+ <li>Added an HTML parser front-end</li>
+</ul><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/news.xsl b/doc/news.xsl
new file mode 100644
index 0000000..50089eb
--- /dev/null
+++ b/doc/news.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ version="1.0">
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:template match="/">
+ <xsl:text>
+ NEWS file for libxml2
+
+ Note that this is automatically generated from the news webpage at:
+ http://xmlsoft.org/news.html
+
+</xsl:text>
+ <xsl:apply-templates select="//xhtml:h3[1]/.."/>
+ </xsl:template>
+ <xsl:template match="xhtml:h3">
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>:
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="xhtml:ul">
+ <xsl:apply-templates select=".//xhtml:li"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="xhtml:li">
+ <xsl:text> - </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="xhtml:a">
+ <xsl:value-of select="."/>
+ <xsl:text> at
+</xsl:text>
+ <xsl:value-of select="@href"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/doc/python.html b/doc/python.html
new file mode 100644
index 0000000..bd52649
--- /dev/null
+++ b/doc/python.html
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Python and bindings</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Python and bindings</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>There are a number of language bindings and wrappers available for
+libxml2, the list below is not exhaustive. Please contact the <a href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>
+(<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in
+order to get updates to this list or to discuss the specific topic of libxml2
+or libxslt wrappers or bindings:</p><ul>
+ <li><a href="http://libxmlplusplus.sourceforge.net/">Libxml++</a> seems the
+ most up-to-date C++ bindings for libxml2, check the <a href="http://libxmlplusplus.sourceforge.net/reference/html/hierarchy.html">documentation</a>
+ and the <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libxmlplusplus/libxml%2b%2b/examples/">examples</a>.</li>
+ <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper
+ based on the gdome2 bindings</a> maintained by Tobias Peters.</li>
+ <li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt;
+ <p>Website: <a href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p>
+ </li>
+ <li>XML::LibXML <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl
+ bindings</a> are available on CPAN, as well as XML::LibXSLT
+ <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXSLT">Perl libxslt
+ bindings</a>.</li>
+ <li>If you're interested into scripting XML processing, have a look at <a href="http://xsh.sourceforge.net/">XSH</a> an XML editing shell based on
+ Libxml2 Perl bindings.</li>
+ <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an
+ earlier version of the libxml/libxslt <a href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li>
+ <li>Gopal.V and Peter Minten develop <a href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of
+ C# libxml2 bindings.</li>
+ <li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
+ libxml2</a> with Kylix, Delphi and other Pascal compilers.</li>
+ <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
+ implementation for Kylix2/D5/D6 from Borland.</li>
+ <li>There is <a href="http://libxml.rubyforge.org/">bindings for Ruby</a>
+ and libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
+ maintained by Tobias Peters.</li>
+ <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
+ Tcl</a>.</li>
+ <li>libxml2 and libxslt are the default XML libraries for PHP5.</li>
+ <li><a href="http://savannah.gnu.org/projects/classpathx/">LibxmlJ</a> is
+ an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and
+ libxslt as part of GNU ClasspathX project.</li>
+ <li>Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for
+ <a href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li>
+ <li><a href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a>
+ provides <a href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLib
+ osax</a>. This is an osax for Mac OS X with a set of commands to
+ implement in AppleScript the XML DOM, XPATH and XSLT. Also includes
+ commands for Property-lists (Apple's fast lookup table XML format.)</li>
+ <li>Francesco Montorsi developped <a href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
+ wrappers that interface libxml2, allowing wxWidgets applications to
+ load/save/edit XML instances.</li>
+</ul><p>The distribution includes a set of Python bindings, which are guaranteed
+to be maintained as part of the library in the future, though the Python
+interface have not yet reached the completeness of the C API.</p><p>Note that some of the Python purist dislike the default set of Python
+bindings, rather than complaining I suggest they have a look at <a href="http://lxml.de/">lxml the more pythonic bindings for libxml2
+and libxslt</a> and <a href="http://lxml.de/mailinglist/">check the mailing-list</a>.</p><p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a>
+maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port
+of the Python bindings</a>.</p><p>Note to people interested in building bindings, the API is formalized as
+<a href="libxml2-api.xml">an XML API description file</a> which allows to
+automate a large part of the Python bindings, this includes function
+descriptions, enums, structures, typedefs, etc... The Python script used to
+build the bindings is python/generator.py in the source distribution.</p><p>To install the Python bindings there are 2 options:</p><ul>
+ <li>If you use an RPM based distribution, simply install the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python
+ RPM</a> (and if needed the <a href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python
+ RPM</a>).</li>
+ <li>Otherwise use the <a href="ftp://xmlsoft.org/libxml2/python/">libxml2-python
+ module distribution</a> corresponding to your installed version of
+ libxml2 and libxslt. Note that to install it you will need both libxml2
+ and libxslt installed and run "python setup.py build install" in the
+ module tree.</li>
+</ul><p>The distribution includes a set of examples and regression tests for the
+python bindings in the <code>python/tests</code> directory. Here are some
+excerpts from those tests:</p><h3>tst.py:</h3><p>This is a basic test of the file interface and DOM navigation:</p><pre>import libxml2, sys
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print "doc.name failed"
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print "root.name failed"
+ sys.exit(1)
+child = root.children
+if child.name != "foo":
+ print "child.name failed"
+ sys.exit(1)
+doc.freeDoc()</pre><p>The Python module is called libxml2; parseFile is the equivalent of
+xmlParseFile (most of the bindings are automatically generated, and the xml
+prefix is removed and the casing convention are kept). All node seen at the
+binding level share the same subset of accessors:</p><ul>
+ <li><code>name</code> : returns the node name</li>
+ <li><code>type</code> : returns a string indicating the node type</li>
+ <li><code>content</code> : returns the content of the node, it is based on
+ xmlNodeGetContent() and hence is recursive.</li>
+ <li><code>parent</code> , <code>children</code>, <code>last</code>,
+ <code>next</code>, <code>prev</code>, <code>doc</code>,
+ <code>properties</code>: pointing to the associated element in the tree,
+ those may return None in case no such link exists.</li>
+</ul><p>Also note the need to explicitly deallocate documents with freeDoc() .
+Reference counting for libxml2 trees would need quite a lot of work to
+function properly, and rather than risk memory leaks if not implemented
+correctly it sounds safer to have an explicit function to free a tree. The
+wrapper python objects like doc, root or child are them automatically garbage
+collected.</p><h3>validate.py:</h3><p>This test check the validation interfaces and redirection of error
+messages:</p><pre>import libxml2
+
+#deactivate error messages from the validation
+def noerr(ctx, str):
+ pass
+
+libxml2.registerErrorHandler(noerr, None)
+
+ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+doc.freeDoc()
+if valid != 0:
+ print "validity check failed"</pre><p>The first thing to notice is the call to registerErrorHandler(), it
+defines a new error handler global to the library. It is used to avoid seeing
+the error messages when trying to validate the invalid document.</p><p>The main interest of that test is the creation of a parser context with
+createFileParserCtxt() and how the behaviour can be changed before calling
+parseDocument() . Similarly the information resulting from the parsing phase
+is also available using context methods.</p><p>Contexts like nodes are defined as class and the libxml2 wrappers maps the
+C function interfaces in terms of objects method as much as possible. The
+best to get a complete view of what methods are supported is to look at the
+libxml2.py module containing all the wrappers.</p><h3>push.py:</h3><p>This test show how to activate the push parser interface:</p><pre>import libxml2
+
+ctxt = libxml2.createPushParser(None, "&lt;foo", 4, "test.xml")
+ctxt.parseChunk("/&gt;", 2, 1)
+doc = ctxt.doc()
+
+doc.freeDoc()</pre><p>The context is created with a special call based on the
+xmlCreatePushParser() from the C library. The first argument is an optional
+SAX callback object, then the initial set of data, the length and the name of
+the resource in case URI-References need to be computed by the parser.</p><p>Then the data are pushed using the parseChunk() method, the last call
+setting the third argument terminate to 1.</p><h3>pushSAX.py:</h3><p>this test show the use of the event based parsing interfaces. In this case
+the parser does not build a document, but provides callback information as
+the parser makes progresses analyzing the data being provided:</p><pre>import libxml2
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.createPushParser(handler, "&lt;foo", 4, "test.xml")
+chunk = " url='tst'&gt;b"
+ctxt.parseChunk(chunk, len(chunk), 0)
+chunk = "ar&lt;/foo&gt;"
+ctxt.parseChunk(chunk, len(chunk), 1)
+
+reference = "startDocument:startElement foo {'url': 'tst'}:" + \
+ "characters: bar:endElement foo:endDocument:"
+if log != reference:
+ print "Error got: %s" % log
+ print "Expected: %s" % reference</pre><p>The key object in that test is the handler, it provides a number of entry
+points which can be called by the parser as it makes progresses to indicate
+the information set obtained. The full set of callback is larger than what
+the callback class in that specific example implements (see the SAX
+definition for a complete list). The wrapper will only call those supplied by
+the object when activated. The startElement receives the names of the element
+and a dictionary containing the attributes carried by this element.</p><p>Also note that the reference string generated from the callback shows a
+single character call even though the string "bar" is passed to the parser
+from 2 different call to parseChunk()</p><h3>xpath.py:</h3><p>This is a basic test of XPath wrappers support</p><pre>import libxml2
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print "xpath query: wrong node set size"
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print "xpath query: wrong node set value"
+ sys.exit(1)
+doc.freeDoc()
+ctxt.xpathFreeContext()</pre><p>This test parses a file, then create an XPath context to evaluate XPath
+expression on it. The xpathEval() method execute an XPath query and returns
+the result mapped in a Python way. String and numbers are natively converted,
+and node sets are returned as a tuple of libxml2 Python nodes wrappers. Like
+the document, the XPath context need to be freed explicitly, also not that
+the result of the XPath query may point back to the document tree and hence
+the document must be freed after the result of the query is used.</p><h3>xpathext.py:</h3><p>This test shows how to extend the XPath engine with functions written in
+python:</p><pre>import libxml2
+
+def foo(ctx, x):
+ return x + 1
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+res = ctxt.xpathEval("foo(1)")
+if res != 2:
+ print "xpath extension failure"
+doc.freeDoc()
+ctxt.xpathFreeContext()</pre><p>Note how the extension function is registered with the context (but that
+part is not yet finalized, this may change slightly in the future).</p><h3>tstxpath.py:</h3><p>This test is similar to the previous one but shows how the extension
+function can access the XPath evaluation context:</p><pre>def foo(ctx, x):
+ global called
+
+ #
+ # test that access to the XPath evaluation contexts
+ #
+ pctxt = libxml2.xpathParserContext(_obj=ctx)
+ ctxt = pctxt.context()
+ called = ctxt.function()
+ return x + 1</pre><p>All the interfaces around the XPath parser(or rather evaluation) context
+are not finalized, but it should be sufficient to do contextual work at the
+evaluation point.</p><h3>Memory debugging:</h3><p>last but not least, all tests starts with the following prologue:</p><pre>#memory debug specific
+libxml2.debugMemory(1)</pre><p>and ends with the following epilogue:</p><pre>#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()</pre><p>Those activate the memory debugging interface of libxml2 where all
+allocated block in the library are tracked. The prologue then cleans up the
+library state and checks that all allocated memory has been freed. If not it
+calls dumpMemory() which saves that list in a <code>.memdump</code> file.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/redhat.gif b/doc/redhat.gif
new file mode 100644
index 0000000..eff3d73
--- /dev/null
+++ b/doc/redhat.gif
Binary files differ
diff --git a/doc/search.php b/doc/search.php
new file mode 100644
index 0000000..ce1a25f
--- /dev/null
+++ b/doc/search.php
@@ -0,0 +1,476 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="SHORTCUT ICON" href="/favicon.ico">
+<style type="text/css"><!--
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+--></style>
+<title>Search the documentation on XMLSoft.org</title>
+</head>
+<body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
+<table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr>
+<td width="180">
+<a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo"></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo"></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo"></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"></a></div>
+</td>
+<td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center">
+<h1>The XML C library for Gnome</h1>
+<h2>Search engine</h2>
+</td></tr></table></td></tr></table></td>
+</tr></table>
+<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr>
+<td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td>
+<table width="100%" border="0" cellspacing="1" cellpadding="3">
+<tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr>
+<tr><td bgcolor="#fffacd"><ul>
+<li><a href="index.html">Home</a></li>
+<li><a href="intro.html">Introduction</a></li>
+<li><a href="FAQ.html">FAQ</a></li>
+<li><a href="docs.html">Documentation</a></li>
+<li><a href="bugs.html">Reporting bugs and getting help</a></li>
+<li><a href="help.html">How to help</a></li>
+<li><a href="downloads.html">Downloads</a></li>
+<li><a href="news.html">News</a></li>
+<li><a href="XMLinfo.html">XML</a></li>
+<li><a href="XSLT.html">XSLT</a></li>
+<li><a href="python.html">Python and bindings</a></li>
+<li><a href="architecture.html">libxml architecture</a></li>
+<li><a href="tree.html">The tree output</a></li>
+<li><a href="interface.html">The SAX interface</a></li>
+<li><a href="xmldtd.html">Validation &amp; DTDs</a></li>
+<li><a href="xmlmem.html">Memory Management</a></li>
+<li><a href="encoding.html">Encodings support</a></li>
+<li><a href="xmlio.html">I/O Interfaces</a></li>
+<li><a href="catalog.html">Catalog support</a></li>
+<li><a href="library.html">The parser interfaces</a></li>
+<li><a href="entities.html">Entities or no entities</a></li>
+<li><a href="namespaces.html">Namespaces</a></li>
+<li><a href="upgrade.html">Upgrading 1.x code</a></li>
+<li><a href="threads.html">Thread safety</a></li>
+<li><a href="DOM.html">DOM Principles</a></li>
+<li><a href="example.html">A real example</a></li>
+<li><a href="contribs.html">Contributions</a></li>
+<li><a href="tutorial/index.html">Tutorial</a></li>
+<li>
+<a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a>
+</li>
+</ul></td></tr>
+</table>
+<table width="100%" border="0" cellspacing="1" cellpadding="3">
+<tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr>
+<tr><td bgcolor="#fffacd"><ul>
+<li><a href="APIchunk0.html">Alphabetic</a></li>
+<li><a href="APIconstructors.html">Constructors</a></li>
+<li><a href="APIfunctions.html">Functions/Types</a></li>
+<li><a href="APIfiles.html">Modules</a></li>
+<li><a href="APIsymbols.html">Symbols</a></li>
+</ul></td></tr>
+</table>
+<table width="100%" border="0" cellspacing="1" cellpadding="3">
+<tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr>
+<tr><td bgcolor="#fffacd"><ul>
+<li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
+<li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
+<li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
+<li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
+<li><a href="ftp://xmlsoft.org/">FTP</a></li>
+<li><a href="http://ww.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
+<li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
+<li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li>
+<li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
+<li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml&amp;product=libxml2">Bug Tracker</a></li>
+</ul></td></tr>
+</table>
+</td></tr></table></td>
+<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
+<?php
+ $query = $HTTP_GET_VARS[ "query" ];
+ $scope = $HTTP_GET_VARS[ "scope" ];
+ // We handle only the first argument so far
+ $query = $_GET['query'];
+ $query = ltrim ($query);
+ if (! $query) {
+ echo "<h1 align='center'>Search the documentation on XMLSoft.org</h1>";
+ }
+ if ($scope == NULL)
+ $scope = "any";
+ $scope = ltrim ($scope);
+ if ($scope == "")
+ $scope = "any";
+
+?>
+<p> The search service indexes the libxml2 and libxslt APIs and documentation as well as the xml@gnome.org and xslt@gnome.org mailing-list archives. To use it simply provide a set of keywords:
+<p>
+<form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
+ enctype="application/x-www-form-urlencoded" method="GET">
+ <input name="query" type="TEXT" size="50" value="<?php echo $query?>">
+ <select name="scope">
+ <option value="any">Search All</option>
+ <option value="XML" <?php if ($scope == 'XML') print "selected"?>>XML resources</option>
+ <option value="XSLT" <?php if ($scope == 'XSLT') print "selected"?>>XSLT resources</option>
+ <option value="API" <?php if ($scope == 'API') print "selected"?>>Only the APIs</option>
+ <option value="XMLAPI" <?php if ($scope == 'XMLAPI') print "selected"?>>Only the XML API</option>
+ <option value="XSLTAPI" <?php if ($scope == 'XSLTAPI') print "selected"?>>Only the XSLT API</option>
+ <option value="DOCS" <?php if ($scope == 'DOCS') print "selected"?>>Only the Documentation</option>
+ <option value="XMLDOC" <?php if ($scope == 'XMLDOC') print "selected"?>>Only the XML Documentation</option>
+ <option value="XSLTDOC" <?php if ($scope == 'XSLTDOC') print "selected"?>>Only the XSLT Documentation</option>
+ <option value="LISTS" <?php if ($scope == 'LISTS') print "selected"?>>Only the lists archives</option>
+ <option value="XMLLIST" <?php if ($scope == 'XMLLIST') print "selected"?>>Only the XML list archive</option>
+ <option value="XSLTLIST" <?php if ($scope == 'XSLTLIST') print "selected"?>>Only the XSLT list archive</option>
+ </select>
+ <input name=submit type=submit value="Search ...">
+</form>
+<?php
+ function logQueryWord($word) {
+ $result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
+ if ($result) {
+ $i = mysql_num_rows($result);
+ if ($i == 0) {
+ mysql_free_result($result);
+ mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
+ } else {
+ $id = mysql_result($result, 0, 0);
+ $count = mysql_result($result, 0, 1);
+ $count ++;
+ mysql_query ("UPDATE Queries SET Count=$count WHERE ID=$id");
+ }
+ } else {
+ mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
+ }
+ }
+ function queryWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function queryHTMLWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function queryArchiveWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'xml-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function XSLTqueryWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT XSLTwords.relevance, XSLTsymbols.name, XSLTsymbols.type, XSLTsymbols.module, XSLTsymbols.descr FROM XSLTwords, XSLTsymbols WHERE LCASE(XSLTwords.name) LIKE LCASE('$word') and XSLTwords.symbol = XSLTsymbols.name ORDER BY XSLTwords.relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function XSLTqueryHTMLWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT relevance, name, id, resource, section FROM XSLTwordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function XSLTqueryArchiveWord($word) {
+ $result = NULL;
+ $j = 0;
+ if ($word) {
+ $result = mysql_query ("SELECT XSLTwordsArchive.relevance, XSLTwordsArchive.name, 'xslt-list', archives.resource, archives.title FROM XSLTwordsArchive, archives WHERE LCASE(XSLTwordsArchive.name) LIKE LCASE('$word') and XSLTwordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
+ if ($result) {
+ $j = mysql_num_rows($result);
+ if ($j == 0)
+ mysql_free_result($result);
+ }
+ logQueryWord($word);
+ }
+ return array($result, $j);
+ }
+ function resSort ($a, $b) {
+ list($ra,$ta,$ma,$na,$da) = $a;
+ list($rb,$tb,$mb,$nb,$db) = $b;
+ if ($ra == $rb) return 0;
+ return ($ra > $rb) ? -1 : 1;
+ }
+ if (($query) && (strlen($query) <= 50)) {
+ $link = mysql_connect ("localhost", "nobody");
+ if (!$link) {
+ echo "<p> Could not connect to the database: ", mysql_error();
+ } else {
+ mysql_select_db("xmlsoft", $link);
+ $list = explode (" ", $query);
+ $results = array();
+ $number = 0;
+ for ($number = 0;$number < count($list);$number++) {
+
+ $word = $list[$number];
+ if (($scope == 'any') || ($scope == 'XML') ||
+ ($scope == 'API') || ($scope == 'XMLAPI')) {
+ list($result, $j) = queryWord($word);
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "html/libxml-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XSLT') ||
+ ($scope == 'API') || ($scope == 'XSLTAPI')) {
+ list($result, $j) = XSLTqueryWord($word);
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "XSLT/html/libxslt-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XML') ||
+ ($scope == 'DOCS') || ($scope == 'XMLDOC')) {
+ list($result, $k) = queryHTMLWord($word);
+ if ($k > 0) {
+ for ($i = 0; $i < $k; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $id = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (strncmp($module, "libxml-", 7) == 0)
+ $url = "html/$module";
+ if ($id != "") {
+ $url = $url + "#$id";
+ }
+ $results["$name _html_ $number _ $i"] =
+ array($relevance, "XML docs",
+ $module, $desc, $name, $url);
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XSLT') ||
+ ($scope == 'DOCS') || ($scope == 'XSLTDOC')) {
+ list($result, $k) = XSLTqueryHTMLWord($word);
+ if ($k > 0) {
+ for ($i = 0; $i < $k; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $id = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ $url = "XSLT/$module";
+ if ($id != "") {
+ $url = $url + "#$id";
+ }
+ $results["$name xslthtml $number _ $i "] =
+ array($relevance, "XSLT docs",
+ $module, $desc, $name, $url);
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XML') ||
+ ($scope == 'LISTS') || ($scope == 'XMLLIST')) {
+ list($result, $j) = queryArchiveWord($word);
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $url = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($url, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$url];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $u = str_replace(
+ "http://mail.gnome.org/archives/xml/", "", $url);
+ $results[$url] = array($relevance,$type,
+ $u, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XSLT') ||
+ ($scope == 'LISTS') || ($scope == 'XSLTLIST')) {
+ list($result, $j) = XSLTqueryArchiveWord($word);
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $url = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($url, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$url];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $u = str_replace(
+ "http://mail.gnome.org/archives/xslt/", "", $url);
+ $results[$url] = array($relevance,$type,
+ $u, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ }
+ if ((count($results) == 0) && (count($list) == 1)) {
+ $word = $list[0];
+ if (($scope == 'any') || ($scope == 'XML') ||
+ ($scope == 'API') || ($scope == 'XMLAPI')) {
+ list($result, $j) = queryWord("xml$word");
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "html/libxml-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ if (($scope == 'any') || ($scope == 'XSLT') ||
+ ($scope == 'API') || ($scope == 'XSLTAPI')) {
+ list($result, $j) = XSLTqueryWord("xslt$word");
+ if ($j > 0) {
+ for ($i = 0; $i < $j; $i++) {
+ $relevance = mysql_result($result, $i, 0);
+ $name = mysql_result($result, $i, 1);
+ $type = mysql_result($result, $i, 2);
+ $module = mysql_result($result, $i, 3);
+ $desc = mysql_result($result, $i, 4);
+ if (array_key_exists($name, $results)) {
+ list($r,$t,$m,$d,$w,$u) = $results[$name];
+ $results[$name] = array(($r + $relevance) * 2,
+ $t,$m,$d,$w,$u);
+ } else {
+ $id = $name;
+ $m = strtolower($module);
+ $url = "XSLT/html/libxslt-$module.html#$id";
+ $results[$name] = array($relevance,$type,
+ $module, $desc, $name, $url);
+ }
+ }
+ mysql_free_result($result);
+ }
+ }
+ }
+ mysql_close($link);
+ $nb = count($results);
+ echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
+ usort($results, "resSort");
+
+ if ($nb > 0) {
+ printf("<table><tbody>\n");
+ printf("<tr><td>Quality</td><td>Symbol</td><td>Type</td><td>module</td><td>Description</td></tr>\n");
+ $i = 0;
+ while (list ($name, $val) = each ($results)) {
+ list($r,$t,$m,$d,$s,$u) = $val;
+ $m = str_replace("<", "&lt;", $m);
+ $s = str_replace("<", "&lt;", $s);
+ $d = str_replace("<", "&lt;", $d);
+ echo "<tr><td>$r</td><td><a href='$u'>$s</a></td><td>$t</td><td>$m</td><td>$d</td></tr>";
+ $i = $i + 1;
+ if ($i > 75)
+ break;
+ }
+ printf("</tbody></table>\n");
+ }
+ }
+ }
+?>
+
+</td></tr></table></td></tr></table></td></tr></table></td>
+</tr></table></td></tr></table>
+</body>
+</html>
+
diff --git a/doc/searches.html b/doc/searches.html
new file mode 100644
index 0000000..c22b8d6
--- /dev/null
+++ b/doc/searches.html
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Search statistics for 20040408</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Search statistics for 20040408</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2> weekly statistics: </h2><p>416435 total words,
+ 9875 uniq words.</p><p> Top 50 queries:</p><p><br /><a href="search.php?query=libxml2">libxml2</a> 11812 times.
+ <br /><a href="search.php?query=libxml">libxml</a> 10170 times.
+ <br /><a href="search.php?query=xpath">xpath</a> 6172 times.
+ <br /><a href="search.php?query=schema">schema</a> 5798 times.
+ <br /><a href="search.php?query=xmllint">xmllint</a> 5472 times.
+ <br /><a href="search.php?query=XML">XML</a> 5435 times.
+ <br /><a href="search.php?query=xmlParseFile">xmlParseFile</a> 4219 times.
+ <br /><a href="search.php?query=php">php</a> 3935 times.
+ <br /><a href="search.php?query=DTD">DTD</a> 3270 times.
+ <br /><a href="search.php?query=encoding">encoding</a> 3101 times.
+ <br /><a href="search.php?query=xmlGetProp">xmlGetProp</a> 3084 times.
+ <br /><a href="search.php?query=xsltproc">xsltproc</a> 3074 times.
+ <br /><a href="search.php?query=download">download</a> 2971 times.
+ <br /><a href="search.php?query=xmlNodeListGetString">xmlNodeListGetString</a> 2917 times.
+ <br /><a href="search.php?query=python">python</a> 2789 times.
+ <br /><a href="search.php?query=SAX">SAX</a> 2621 times.
+ <br /><a href="search.php?query=xmlParseMemory">xmlParseMemory</a> 2472 times.
+ <br /><a href="search.php?query=perl">perl</a> 2385 times.
+ <br /><a href="search.php?query=iconv">iconv</a> 2318 times.
+ <br /><a href="search.php?query=error">error</a> 2298 times.
+ <br /><a href="search.php?query=html">html</a> 2255 times.
+ <br /><a href="search.php?query=xmlChar">xmlChar</a> 2136 times.
+ <br /><a href="search.php?query=libxslt">libxslt</a> 2055 times.
+ <br /><a href="search.php?query=c++">c++</a> 2020 times.
+ <br /><a href="search.php?query=xmlNodePtr">xmlNodePtr</a> 1928 times.
+ <br /><a href="search.php?query=windows">windows</a> 1918 times.
+ <br /><a href="search.php?query=to">to</a> 1891 times.
+ <br /><a href="search.php?query=node">node</a> 1860 times.
+ <br /><a href="search.php?query=xmlFree">xmlFree</a> 1854 times.
+ <br /><a href="search.php?query=example">example</a> 1784 times.
+ <br /><a href="search.php?query=install">install</a> 1763 times.
+ <br /><a href="search.php?query=parser">parser</a> 1715 times.
+ <br /><a href="search.php?query=xmlNewDoc">xmlNewDoc</a> 1695 times.
+ <br /><a href="search.php?query=namespace">namespace</a> 1693 times.
+ <br /><a href="search.php?query=xmlStrcmp">xmlStrcmp</a> 1564 times.
+ <br /><a href="search.php?query=xmlnode">xmlnode</a> 1558 times.
+ <br /><a href="search.php?query=parse">parse</a> 1517 times.
+ <br /><a href="search.php?query=memory">memory</a> 1484 times.
+ <br /><a href="search.php?query=dom">dom</a> 1457 times.
+ <br /><a href="search.php?query=XInclude">XInclude</a> 1444 times.
+ <br /><a href="search.php?query=entity">entity</a> 1423 times.
+ <br /><a href="search.php?query=xmlSaveFormatFile">xmlSaveFormatFile</a> 1390 times.
+ <br /><a href="search.php?query=xslt">xslt</a> 1361 times.
+ <br /><a href="search.php?query=attribute">attribute</a> 1360 times.
+ <br /><a href="search.php?query=xmlDocPtr">xmlDocPtr</a> 1350 times.
+ <br /><a href="search.php?query=xsd">xsd</a> 1319 times.
+ <br /><a href="search.php?query=xmlDocGetRootElement">xmlDocGetRootElement</a> 1285 times.
+ <br /><a href="search.php?query=validate">validate</a> 1270 times.
+ <br /><a href="search.php?query=validation">validation</a> 1234 times.
+ <br /><a href="search.php?query=tutorial">tutorial</a> 1140 times.
+ </p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/searches.xsl b/doc/searches.xsl
new file mode 100644
index 0000000..57ff5c8
--- /dev/null
+++ b/doc/searches.xsl
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!-- this stylesheet builds the API*.html , it works based on libxml2-refs.xml
+ -->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ extension-element-prefixes="exsl"
+ exclude-result-prefixes="exsl">
+
+ <!-- Import the rest of the site stylesheets -->
+ <xsl:import href="site.xsl"/>
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <xsl:variable name="href_base" select="''"/>
+
+ <xsl:template name="statistics">
+ <h2> weekly statistics: </h2>
+ <p><xsl:value-of select="@total"/> total words,
+ <xsl:value-of select="@uniq"/> uniq words.</p>
+ <p> Top <xsl:value-of select="@nr"/> queries:</p>
+ </xsl:template>
+
+ <xsl:template match="query">
+ <br/><a href="search.php?query={string(.)}"><xsl:value-of
+ select="string(.)"/></a>
+ <xsl:text> </xsl:text><xsl:value-of select="@count"/> times.
+ </xsl:template>
+
+ <xsl:template match="queries">
+ <xsl:variable name="date" select="@date"/>
+ <xsl:variable name="title">Search statistics for <xsl:value-of select="$date"/></xsl:variable>
+ <xsl:document href="searches.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="toc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:call-template name="statistics"/>
+ <p>
+ <xsl:apply-templates select="query"/>
+ </p>
+ <p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="queries"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/site.xsl b/doc/site.xsl
new file mode 100644
index 0000000..11aaee2
--- /dev/null
+++ b/doc/site.xsl
@@ -0,0 +1,741 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <xsl:variable name="href_base" select="''"/>
+ <xsl:variable name="menu_name">Main Menu</xsl:variable>
+<!--
+ - returns the filename associated to an ID in the original file
+ -->
+ <xsl:template name="tocfilename">
+ <xsl:param name="name" select="string(@href)"/>
+ <xsl:choose>
+ <xsl:when test="$name = '#Introducti'">
+ <xsl:text>intro.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Documentat'">
+ <xsl:text>docs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Reporting'">
+ <xsl:text>bugs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#help'">
+ <xsl:text>help.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Help'">
+ <xsl:text>help.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Downloads'">
+ <xsl:text>downloads.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#News'">
+ <xsl:text>news.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Contributi'">
+ <xsl:text>contribs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#xsltproc'">
+ <xsl:text>xsltproc2.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#API'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XSLT'">
+ <xsl:text>XSLT.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XML'">
+ <xsl:text>XMLinfo.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Validation'">
+ <xsl:text>xmldtd.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#tree'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#library'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#interface'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Example'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Entities'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#architecture'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Namespaces'">
+ <xsl:text>namespaces.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#DOM'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Catalog'">
+ <xsl:text>catalog.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Upgrading'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Encodings'">
+ <xsl:text>encoding.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#IO'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Memory'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Thread'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#FAQ'">
+ <xsl:text>FAQ.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Python'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = ''">
+ <xsl:text>unknown.html</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="docfilename">
+ <xsl:param name="name" select="string(@href)"/>
+ <xsl:choose>
+ <xsl:when test="$name = '#Introducti'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Documentat'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Reporting'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#help'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Help'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Downloads'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#News'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Contributi'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#xsltproc'">
+ <xsl:text>xsltproc2.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#API'">
+ <xsl:text>API.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XSLT'">
+ <xsl:text>XSLT.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XML'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Validation'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#tree'">
+ <xsl:text>tree.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#library'">
+ <xsl:text>library.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#interface'">
+ <xsl:text>interface.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Example'">
+ <xsl:text>example.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Entities'">
+ <xsl:text>entities.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#architecture'">
+ <xsl:text>architecture.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Namespaces'">
+ <xsl:text>namespaces.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#DOM'">
+ <xsl:text>DOM.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Catalog'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Upgrading'">
+ <xsl:text>upgrade.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Encodings'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#IO'">
+ <xsl:text>xmlio.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Memory'">
+ <xsl:text>xmlmem.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Thread'">
+ <xsl:text>threads.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#FAQ'">
+ <xsl:text></xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Python'">
+ <xsl:text>python.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = ''">
+ <xsl:text>unknown.html</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="filename">
+ <xsl:param name="name" select="string(@href)"/>
+ <xsl:choose>
+ <xsl:when test="$name = '#Introducti'">
+ <xsl:text>intro.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Documentat'">
+ <xsl:text>docs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Reporting'">
+ <xsl:text>bugs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#help'">
+ <xsl:text>help.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Help'">
+ <xsl:text>help.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Downloads'">
+ <xsl:text>downloads.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#News'">
+ <xsl:text>news.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Contributi'">
+ <xsl:text>contribs.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#xsltproc'">
+ <xsl:text>xsltproc2.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#API'">
+ <xsl:text>API.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XSLT'">
+ <xsl:text>XSLT.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#XML'">
+ <xsl:text>XMLinfo.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Validation'">
+ <xsl:text>xmldtd.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#tree'">
+ <xsl:text>tree.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#library'">
+ <xsl:text>library.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#interface'">
+ <xsl:text>interface.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Example'">
+ <xsl:text>example.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Entities'">
+ <xsl:text>entities.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#architecture'">
+ <xsl:text>architecture.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Namespaces'">
+ <xsl:text>namespaces.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#DOM'">
+ <xsl:text>DOM.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Catalog'">
+ <xsl:text>catalog.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Upgrading'">
+ <xsl:text>upgrade.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Encodings'">
+ <xsl:text>encoding.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#IO'">
+ <xsl:text>xmlio.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Memory'">
+ <xsl:text>xmlmem.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Thread'">
+ <xsl:text>threads.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#FAQ'">
+ <xsl:text>FAQ.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = '#Python'">
+ <xsl:text>python.html</xsl:text>
+ </xsl:when>
+ <xsl:when test="$name = ''">
+ <xsl:text>unknown.html</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+<!--
+ - The global title
+ -->
+ <xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
+<!--
+ - The table of content
+ -->
+ <xsl:variable name="toc">
+ <form action="search.php"
+ enctype="application/x-www-form-urlencoded" method="get">
+ <input name="query" type="text" size="20" value=""/>
+ <input name="submit" type="submit" value="Search ..."/>
+ </form>
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a href="index.html">Home</a></li>
+ <!--<li><a href="http://xmlsoft.org/wiki">Wiki</a></li> -->
+ <li><a href="html/index.html">Reference Manual</a></li>
+ <xsl:for-each select="/html/body/h2">
+ <xsl:variable name="filename">
+ <xsl:call-template name="tocfilename">
+ <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$filename != ''">
+ <li>
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$filename"/>
+ </xsl:attribute>
+ <xsl:if test="$filename = 'docs.html'">
+ <xsl:attribute name="style">font-weight:bold</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:element>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ <li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li>
+ <li><a href="html/index.html" style="font-weight:bold">API Menu</a></li>
+ <li><a href="guidelines.html">XML Guidelines</a></li>
+ <li><a href="ChangeLog.html">Recent Changes</a></li>
+ </ul>
+ </xsl:variable>
+ <xsl:variable name="develtoc">
+ <form action="search.php"
+ enctype="application/x-www-form-urlencoded" method="get">
+ <input name="query" type="text" size="20" value=""/>
+ <input name="submit" type="submit" value="Search ..."/>
+ </form>
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a href="index.html" style="font-weight:bold">Main Menu</a></li>
+ <li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li>
+ <li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li>
+ <li><a href="guidelines.html">XML Guidelines</a></li>
+ <li><a href="tutorial/index.html">Tutorial</a></li>
+ <li><a href="xmlreader.html">The Reader Interface</a></li>
+ <li><a href="ChangeLog.html">ChangeLog</a></li>
+ <xsl:for-each select="/html/body/h2">
+ <xsl:variable name="filename">
+ <xsl:call-template name="docfilename">
+ <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$filename != ''">
+ <li>
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="$filename"/>
+ </xsl:attribute>
+ <xsl:value-of select="."/>
+ </xsl:element>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ <li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li>
+ </ul>
+ </xsl:variable>
+ <xsl:variable name="api">
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a href="{$href_base}APIchunk0.html">Alphabetic</a></li>
+ <li><a href="{$href_base}APIconstructors.html">Constructors</a></li>
+ <li><a href="{$href_base}APIfunctions.html">Functions/Types</a></li>
+ <li><a href="{$href_base}APIfiles.html">Modules</a></li>
+ <li><a href="{$href_base}APIsymbols.html">Symbols</a></li>
+ </ul>
+ </xsl:variable>
+ <xsl:variable name="related">
+ <ul><!-- style="margin-left: -1em" -->
+ <li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li>
+ <li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li>
+ <li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li>
+ <li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li>
+ <li><a href="ftp://xmlsoft.org/">FTP</a></li>
+ <li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li>
+ <li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li>
+ <li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li>
+ <li><a href="http://lxml.de/">lxml Python bindings</a></li>
+ <li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li>
+ <li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li>
+ <li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li>
+ <li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li>
+ <li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li>
+ <li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li>
+ <li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li>
+ </ul>
+ </xsl:variable>
+ <xsl:template name="toc">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b><xsl:value-of select="$menu_name"/></b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$toc"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>Related links</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$related"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+ <xsl:template name="develtoc">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>Developer Menu</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$develtoc"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>API Indexes</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$api"/>
+ </td>
+ </tr>
+ </table>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3">
+ <tr>
+ <td colspan="1" bgcolor="#eecfa1" align="center">
+ <center>
+ <b>Related links</b>
+ </center>
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:copy-of select="$related"/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+ <xsl:template mode="head" match="title">
+ <title>
+ <xsl:apply-templates/>
+ </title>
+ </xsl:template>
+ <xsl:template mode="head" match="meta">
+</xsl:template>
+<!--
+ - Write the styles in the head
+ -->
+ <xsl:template name="style">
+ <link rel="SHORTCUT ICON" href="/favicon.ico"/>
+ <style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style>
+ </xsl:template>
+<!--
+ - Write the title box on top
+ -->
+ <xsl:template name="titlebox">
+ <xsl:param name="title" select="'Main Page'"/>
+ <table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
+ <tr>
+ <td width="120">
+ <a href="http://swpat.ffii.org/"><img src="{$href_base}epatents.png" alt="Action against software patents"/></a>
+ </td>
+ <td width="180">
+ <a href="http://www.gnome.org/"><img src="{$href_base}gnome2.png" alt="Gnome2 Logo"/></a>
+ <a href="http://www.w3.org/Status"><img src="{$href_base}w3c.png" alt="W3C Logo"/></a>
+ <a href="http://www.redhat.com/"><img src="{$href_base}redhat.gif" alt="Red Hat Logo"/></a>
+ <div align="left">
+ <a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo"/></a>
+ </div>
+ </td>
+ <td>
+ <table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000">
+ <tr>
+ <td>
+ <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
+ <tr>
+ <td align="center">
+ <xsl:element name="h1">
+ <xsl:value-of select="$globaltitle"/>
+ </xsl:element>
+ <xsl:element name="h2">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+<!--
+ - Handling of nodes in the body before the first H2, table of content
+ - Everything is just copied over, except href which may get rewritten
+ - and h1/h2/a at the top level
+ -->
+ <xsl:template priority="2" mode="subcontent" match="a">
+ <xsl:variable name="filename">
+ <xsl:call-template name="filename">
+ <xsl:with-param name="name" select="string(@href)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:copy>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$filename"/>
+ </xsl:attribute>
+ <xsl:apply-templates mode="subcontent" select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template mode="subcontent" match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates mode="subcontent" select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+ <xsl:template mode="content" match="@*|node()">
+ <xsl:if test="name() != 'h1' and name() != 'h2'">
+ <xsl:copy>
+ <xsl:apply-templates mode="subcontent" select="@*|node()"/>
+ </xsl:copy>
+ </xsl:if>
+ </xsl:template>
+<!--
+ - Handling of nodes in the body after an H2
+ - Open a new file and dump all the siblings up to the next H2
+ -->
+ <xsl:template name="subfile">
+ <xsl:param name="header" select="following-sibling::h2[1]"/>
+ <xsl:variable name="filename">
+ <xsl:call-template name="filename">
+ <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="tocfilename">
+ <xsl:call-template name="tocfilename">
+ <xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="title">
+ <xsl:value-of select="$header"/>
+ </xsl:variable>
+ <xsl:document href="{$filename}" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:element name="title">
+ <xsl:value-of select="$title"/>
+ </xsl:element>
+ </head>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="$title"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:choose>
+ <xsl:when test="$filename = 'docs.html'">
+ <xsl:call-template name="develtoc"/>
+ </xsl:when>
+ <xsl:when test="$tocfilename = ''">
+ <xsl:call-template name="develtoc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="toc"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
+ <p><a href="bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:document>
+ </xsl:template>
+ <xsl:template mode="subfile" match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates mode="content" select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+<!--
+ - Handling of the initial body and head HTML document
+ -->
+ <xsl:template match="body">
+ <xsl:variable name="firsth2" select="./h2[1]"/>
+ <xsl:variable name="rest2" select="./h2[position()&gt;1]"/>
+ <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
+ <xsl:call-template name="titlebox">
+ <xsl:with-param name="title" select="'libxml'"/>
+ </xsl:call-template>
+ <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
+ <tr>
+ <td bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr>
+ <td valign="top" width="200" bgcolor="#8b7765">
+ <xsl:call-template name="toc"/>
+ </td>
+ <td valign="top" bgcolor="#8b7765">
+ <table border="0" cellspacing="0" cellpadding="1" width="100%">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td bgcolor="#fffacd">
+ <xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
+ <xsl:for-each select="./h2">
+ <xsl:call-template name="subfile">
+ <xsl:with-param name="header" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <p><a href="bugs.html">Daniel Veillard</a></p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </xsl:template>
+ <xsl:template match="head">
+ <head>
+ <xsl:call-template name="style"/>
+ <xsl:apply-templates mode="head"/>
+ </head>
+ </xsl:template>
+ <xsl:template match="html">
+ <xsl:message>Generating the Web pages</xsl:message>
+ <html>
+ <xsl:apply-templates/>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/doc/smallfootonly.gif b/doc/smallfootonly.gif
new file mode 100644
index 0000000..ddbb9ee
--- /dev/null
+++ b/doc/smallfootonly.gif
Binary files differ
diff --git a/doc/structure.gif b/doc/structure.gif
new file mode 100644
index 0000000..4b9a3e6
--- /dev/null
+++ b/doc/structure.gif
Binary files differ
diff --git a/doc/symbols.xml b/doc/symbols.xml
new file mode 100644
index 0000000..ec275e7
--- /dev/null
+++ b/doc/symbols.xml
@@ -0,0 +1,1768 @@
+<!-- This file describes all the exported entry points from the
+ library, groupped by release with the first release being 2.4.30
+ Add new exported entry points at the end, this will be used to
+ generate libxml2.syms the definition of exported symbols from
+ shared libraries
+ -->
+<symbols>
+ <release version="2.4.30">
+ <symbol file="debugXML">xmlBoolToText</symbol>
+ <symbol file="debugXML">xmlDebugDumpAttr</symbol>
+ <symbol file="debugXML">xmlDebugDumpAttrList</symbol>
+ <symbol file="debugXML">xmlDebugDumpDTD</symbol>
+ <symbol file="debugXML">xmlDebugDumpDocument</symbol>
+ <symbol file="debugXML">xmlDebugDumpDocumentHead</symbol>
+ <symbol file="debugXML">xmlDebugDumpEntities</symbol>
+ <symbol file="debugXML">xmlDebugDumpNode</symbol>
+ <symbol file="debugXML">xmlDebugDumpNodeList</symbol>
+ <symbol file="debugXML">xmlDebugDumpOneNode</symbol>
+ <symbol file="debugXML">xmlDebugDumpString</symbol>
+ <symbol file="debugXML">xmlLsCountNode</symbol>
+ <symbol file="debugXML">xmlLsOneNode</symbol>
+ <symbol file="debugXML">xmlShell</symbol>
+ <symbol file="debugXML">xmlShellBase</symbol>
+ <symbol file="debugXML">xmlShellCat</symbol>
+ <symbol file="debugXML">xmlShellDir</symbol>
+ <symbol file="debugXML">xmlShellDu</symbol>
+ <symbol file="debugXML">xmlShellList</symbol>
+ <symbol file="debugXML">xmlShellLoad</symbol>
+ <symbol file="debugXML">xmlShellPrintNode</symbol>
+ <symbol file="debugXML">xmlShellPrintXPathError</symbol>
+ <symbol file="debugXML">xmlShellPrintXPathResult</symbol>
+ <symbol file="debugXML">xmlShellPwd</symbol>
+ <symbol file="debugXML">xmlShellSave</symbol>
+ <symbol file="debugXML">xmlShellValidate</symbol>
+ <symbol file="debugXML">xmlShellWrite</symbol>
+ <symbol file="xpointer">xmlXPtrBuildNodeList</symbol>
+ <symbol file="xpointer">xmlXPtrEval</symbol>
+ <symbol file="xpointer">xmlXPtrEvalRangePredicate</symbol>
+ <symbol file="xpointer">xmlXPtrFreeLocationSet</symbol>
+ <symbol file="xpointer">xmlXPtrLocationSetAdd</symbol>
+ <symbol file="xpointer">xmlXPtrLocationSetCreate</symbol>
+ <symbol file="xpointer">xmlXPtrLocationSetDel</symbol>
+ <symbol file="xpointer">xmlXPtrLocationSetMerge</symbol>
+ <symbol file="xpointer">xmlXPtrLocationSetRemove</symbol>
+ <symbol file="xpointer">xmlXPtrNewCollapsedRange</symbol>
+ <symbol file="xpointer">xmlXPtrNewContext</symbol>
+ <symbol file="xpointer">xmlXPtrNewLocationSetNodeSet</symbol>
+ <symbol file="xpointer">xmlXPtrNewLocationSetNodes</symbol>
+ <symbol file="xpointer">xmlXPtrNewRange</symbol>
+ <symbol file="xpointer">xmlXPtrNewRangeNodeObject</symbol>
+ <symbol file="xpointer">xmlXPtrNewRangeNodePoint</symbol>
+ <symbol file="xpointer">xmlXPtrNewRangeNodes</symbol>
+ <symbol file="xpointer">xmlXPtrNewRangePointNode</symbol>
+ <symbol file="xpointer">xmlXPtrNewRangePoints</symbol>
+ <symbol file="xpointer">xmlXPtrRangeToFunction</symbol>
+ <symbol file="xpointer">xmlXPtrWrapLocationSet</symbol>
+ <symbol file="SAX">attribute</symbol>
+ <symbol file="SAX">attributeDecl</symbol>
+ <symbol file="SAX">cdataBlock</symbol>
+ <symbol file="SAX">characters</symbol>
+ <symbol file="SAX">checkNamespace</symbol>
+ <symbol file="SAX">comment</symbol>
+ <symbol file="SAX2">docbDefaultSAXHandlerInit</symbol>
+ <symbol file="SAX">elementDecl</symbol>
+ <symbol file="SAX">endDocument</symbol>
+ <symbol file="SAX">endElement</symbol>
+ <symbol file="SAX">entityDecl</symbol>
+ <symbol file="SAX">externalSubset</symbol>
+ <symbol file="SAX">getColumnNumber</symbol>
+ <symbol file="SAX">getEntity</symbol>
+ <symbol file="SAX">getLineNumber</symbol>
+ <symbol file="SAX">getNamespace</symbol>
+ <symbol file="SAX">getParameterEntity</symbol>
+ <symbol file="SAX">getPublicId</symbol>
+ <symbol file="SAX">getSystemId</symbol>
+ <symbol file="SAX">globalNamespace</symbol>
+ <symbol file="SAX">hasExternalSubset</symbol>
+ <symbol file="SAX">hasInternalSubset</symbol>
+ <symbol file="SAX2">htmlDefaultSAXHandlerInit</symbol>
+ <symbol file="SAX">ignorableWhitespace</symbol>
+ <symbol file="SAX">initdocbDefaultSAXHandler</symbol>
+ <symbol file="SAX">inithtmlDefaultSAXHandler</symbol>
+ <symbol file="SAX">initxmlDefaultSAXHandler</symbol>
+ <symbol file="SAX">internalSubset</symbol>
+ <symbol file="SAX">isStandalone</symbol>
+ <symbol file="SAX">namespaceDecl</symbol>
+ <symbol file="SAX">notationDecl</symbol>
+ <symbol file="SAX">processingInstruction</symbol>
+ <symbol file="SAX">reference</symbol>
+ <symbol file="SAX">resolveEntity</symbol>
+ <symbol file="SAX">setDocumentLocator</symbol>
+ <symbol file="SAX">setNamespace</symbol>
+ <symbol file="SAX">startDocument</symbol>
+ <symbol file="SAX">startElement</symbol>
+ <symbol file="SAX">unparsedEntityDecl</symbol>
+ <symbol file="SAX2">xmlDefaultSAXHandlerInit</symbol>
+ <symbol file="parserInternals">htmlCreateFileParserCtxt</symbol>
+ <symbol file="parserInternals">htmlInitAutoClose</symbol>
+ <symbol file="parserInternals">inputPop</symbol>
+ <symbol file="parserInternals">inputPush</symbol>
+ <symbol file="parserInternals">namePop</symbol>
+ <symbol file="parserInternals">namePush</symbol>
+ <symbol file="parserInternals">nodePop</symbol>
+ <symbol file="parserInternals">nodePush</symbol>
+ <symbol file="parserInternals">xmlCheckLanguageID</symbol>
+ <symbol file="parserInternals">xmlCopyChar</symbol>
+ <symbol file="parserInternals">xmlCopyCharMultiByte</symbol>
+ <symbol file="parserInternals">xmlCreateEntityParserCtxt</symbol>
+ <symbol file="parserInternals">xmlCreateFileParserCtxt</symbol>
+ <symbol file="parserInternals">xmlCreateMemoryParserCtxt</symbol>
+ <symbol file="parserInternals">xmlCurrentChar</symbol>
+ <symbol file="parserInternals">xmlDecodeEntities</symbol>
+ <symbol file="parserInternals">xmlFreeInputStream</symbol>
+ <symbol file="parserInternals">xmlHandleEntity</symbol>
+ <symbol file="chvalid">xmlIsBaseChar</symbol>
+ <symbol file="chvalid">xmlIsBlank</symbol>
+ <symbol file="chvalid">xmlIsChar</symbol>
+ <symbol file="chvalid">xmlIsCombining</symbol>
+ <symbol file="chvalid">xmlIsDigit</symbol>
+ <symbol file="chvalid">xmlIsExtender</symbol>
+ <symbol file="chvalid">xmlIsIdeographic</symbol>
+ <symbol file="parserInternals">xmlIsLetter</symbol>
+ <symbol file="chvalid">xmlIsPubidChar</symbol>
+ <symbol file="parserInternals">xmlNamespaceParseNCName</symbol>
+ <symbol file="parserInternals">xmlNamespaceParseNSDef</symbol>
+ <symbol file="parserInternals">xmlNamespaceParseQName</symbol>
+ <symbol file="parserInternals">xmlNewEntityInputStream</symbol>
+ <symbol file="parserInternals">xmlNewInputFromFile</symbol>
+ <symbol file="parserInternals">xmlNewInputStream</symbol>
+ <symbol file="parser">xmlNewParserCtxt</symbol>
+ <symbol file="parserInternals">xmlNewStringInputStream</symbol>
+ <symbol file="parserInternals">xmlNextChar</symbol>
+ <symbol file="parserInternals">xmlParseAttValue</symbol>
+ <symbol file="parserInternals">xmlParseAttribute</symbol>
+ <symbol file="parserInternals">xmlParseAttributeListDecl</symbol>
+ <symbol file="parserInternals">xmlParseAttributeType</symbol>
+ <symbol file="parserInternals">xmlParseCDSect</symbol>
+ <symbol file="parserInternals">xmlParseCharData</symbol>
+ <symbol file="parserInternals">xmlParseCharRef</symbol>
+ <symbol file="parserInternals">xmlParseComment</symbol>
+ <symbol file="parserInternals">xmlParseContent</symbol>
+ <symbol file="parserInternals">xmlParseDefaultDecl</symbol>
+ <symbol file="parserInternals">xmlParseDocTypeDecl</symbol>
+ <symbol file="parserInternals">xmlParseElement</symbol>
+ <symbol file="parserInternals">xmlParseElementChildrenContentDecl</symbol>
+ <symbol file="parserInternals">xmlParseElementContentDecl</symbol>
+ <symbol file="parserInternals">xmlParseElementDecl</symbol>
+ <symbol file="parserInternals">xmlParseElementMixedContentDecl</symbol>
+ <symbol file="parserInternals">xmlParseEncName</symbol>
+ <symbol file="parserInternals">xmlParseEncodingDecl</symbol>
+ <symbol file="parserInternals">xmlParseEndTag</symbol>
+ <symbol file="parserInternals">xmlParseEntityDecl</symbol>
+ <symbol file="parserInternals">xmlParseEntityRef</symbol>
+ <symbol file="parserInternals">xmlParseEntityValue</symbol>
+ <symbol file="parserInternals">xmlParseEnumeratedType</symbol>
+ <symbol file="parserInternals">xmlParseEnumerationType</symbol>
+ <symbol file="parserInternals">xmlParseExternalID</symbol>
+ <symbol file="parserInternals">xmlParseExternalSubset</symbol>
+ <symbol file="parserInternals">xmlParseMarkupDecl</symbol>
+ <symbol file="parserInternals">xmlParseMisc</symbol>
+ <symbol file="parserInternals">xmlParseName</symbol>
+ <symbol file="parserInternals">xmlParseNamespace</symbol>
+ <symbol file="parserInternals">xmlParseNmtoken</symbol>
+ <symbol file="parserInternals">xmlParseNotationDecl</symbol>
+ <symbol file="parserInternals">xmlParseNotationType</symbol>
+ <symbol file="parserInternals">xmlParsePEReference</symbol>
+ <symbol file="parserInternals">xmlParsePI</symbol>
+ <symbol file="parserInternals">xmlParsePITarget</symbol>
+ <symbol file="parserInternals">xmlParsePubidLiteral</symbol>
+ <symbol file="parserInternals">xmlParseQuotedString</symbol>
+ <symbol file="parserInternals">xmlParseReference</symbol>
+ <symbol file="parserInternals">xmlParseSDDecl</symbol>
+ <symbol file="parserInternals">xmlParseStartTag</symbol>
+ <symbol file="parserInternals">xmlParseSystemLiteral</symbol>
+ <symbol file="parserInternals">xmlParseTextDecl</symbol>
+ <symbol file="parserInternals">xmlParseVersionInfo</symbol>
+ <symbol file="parserInternals">xmlParseVersionNum</symbol>
+ <symbol file="parserInternals">xmlParseXMLDecl</symbol>
+ <symbol file="parserInternals">xmlParserHandlePEReference</symbol>
+ <symbol file="parserInternals">xmlParserHandleReference</symbol>
+ <symbol file="parserInternals">xmlParserInputShrink</symbol>
+ <symbol file="parserInternals">xmlPopInput</symbol>
+ <symbol file="parserInternals">xmlPushInput</symbol>
+ <symbol file="parserInternals">xmlScanName</symbol>
+ <symbol file="parserInternals">xmlSetEntityReferenceFunc</symbol>
+ <symbol file="parserInternals">xmlSkipBlankChars</symbol>
+ <symbol file="parserInternals">xmlSplitQName</symbol>
+ <symbol file="parserInternals">xmlStringComment</symbol>
+ <symbol file="parserInternals">xmlStringCurrentChar</symbol>
+ <symbol file="parserInternals">xmlStringDecodeEntities</symbol>
+ <symbol file="parserInternals">xmlStringText</symbol>
+ <symbol file="parserInternals">xmlStringTextNoenc</symbol>
+ <symbol file="parserInternals">xmlSwitchEncoding</symbol>
+ <symbol file="parserInternals">xmlSwitchToEncoding</symbol>
+ <symbol file="c14n">xmlC14NDocDumpMemory</symbol>
+ <symbol file="c14n">xmlC14NDocSave</symbol>
+ <symbol file="c14n">xmlC14NDocSaveTo</symbol>
+ <symbol file="c14n">xmlC14NExecute</symbol>
+ <symbol file="catalog">xmlACatalogAdd</symbol>
+ <symbol file="catalog">xmlACatalogDump</symbol>
+ <symbol file="catalog">xmlACatalogRemove</symbol>
+ <symbol file="catalog">xmlACatalogResolve</symbol>
+ <symbol file="catalog">xmlACatalogResolvePublic</symbol>
+ <symbol file="catalog">xmlACatalogResolveSystem</symbol>
+ <symbol file="catalog">xmlACatalogResolveURI</symbol>
+ <symbol file="catalog">xmlCatalogAdd</symbol>
+ <symbol file="catalog">xmlCatalogAddLocal</symbol>
+ <symbol file="catalog">xmlCatalogCleanup</symbol>
+ <symbol file="catalog">xmlCatalogConvert</symbol>
+ <symbol file="catalog">xmlCatalogDump</symbol>
+ <symbol file="catalog">xmlCatalogFreeLocal</symbol>
+ <symbol file="catalog">xmlCatalogGetDefaults</symbol>
+ <symbol file="catalog">xmlCatalogGetPublic</symbol>
+ <symbol file="catalog">xmlCatalogGetSystem</symbol>
+ <symbol file="catalog">xmlCatalogIsEmpty</symbol>
+ <symbol file="catalog">xmlCatalogLocalResolve</symbol>
+ <symbol file="catalog">xmlCatalogLocalResolveURI</symbol>
+ <symbol file="catalog">xmlCatalogRemove</symbol>
+ <symbol file="catalog">xmlCatalogResolve</symbol>
+ <symbol file="catalog">xmlCatalogResolvePublic</symbol>
+ <symbol file="catalog">xmlCatalogResolveSystem</symbol>
+ <symbol file="catalog">xmlCatalogResolveURI</symbol>
+ <symbol file="catalog">xmlCatalogSetDebug</symbol>
+ <symbol file="catalog">xmlCatalogSetDefaultPrefer</symbol>
+ <symbol file="catalog">xmlCatalogSetDefaults</symbol>
+ <symbol file="catalog">xmlConvertSGMLCatalog</symbol>
+ <symbol file="catalog">xmlFreeCatalog</symbol>
+ <symbol file="catalog">xmlInitializeCatalog</symbol>
+ <symbol file="catalog">xmlLoadACatalog</symbol>
+ <symbol file="catalog">xmlLoadCatalog</symbol>
+ <symbol file="catalog">xmlLoadCatalogs</symbol>
+ <symbol file="catalog">xmlLoadSGMLSuperCatalog</symbol>
+ <symbol file="catalog">xmlNewCatalog</symbol>
+ <symbol file="catalog">xmlParseCatalogFile</symbol>
+ <symbol file="xpathInternals">valuePop</symbol>
+ <symbol file="xpathInternals">valuePush</symbol>
+ <symbol file="xpathInternals">xmlXPathAddValues</symbol>
+ <symbol file="xpathInternals">xmlXPathBooleanFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathCeilingFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathCompareValues</symbol>
+ <symbol file="xpathInternals">xmlXPathConcatFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathContainsFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathCountFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathDebugDumpCompExpr</symbol>
+ <symbol file="xpathInternals">xmlXPathDebugDumpObject</symbol>
+ <symbol file="xpathInternals">xmlXPathDifference</symbol>
+ <symbol file="xpathInternals">xmlXPathDistinct</symbol>
+ <symbol file="xpathInternals">xmlXPathDistinctSorted</symbol>
+ <symbol file="xpathInternals">xmlXPathDivValues</symbol>
+ <symbol file="xpathInternals">xmlXPathEqualValues</symbol>
+ <symbol file="xpathInternals">xmlXPathEvalExpr</symbol>
+ <symbol file="xpathInternals">xmlXPathEvaluatePredicateResult</symbol>
+ <symbol file="xpathInternals">xmlXPathFalseFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathFloorFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathFreeParserContext</symbol>
+ <symbol file="xpathInternals">xmlXPathFunctionLookup</symbol>
+ <symbol file="xpathInternals">xmlXPathFunctionLookupNS</symbol>
+ <symbol file="xpathInternals">xmlXPathHasSameNodes</symbol>
+ <symbol file="xpathInternals">xmlXPathIdFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathIntersection</symbol>
+ <symbol file="xpathInternals">xmlXPathIsNodeType</symbol>
+ <symbol file="xpathInternals">xmlXPathLangFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathLastFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathLeading</symbol>
+ <symbol file="xpathInternals">xmlXPathLeadingSorted</symbol>
+ <symbol file="xpathInternals">xmlXPathLocalNameFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathModValues</symbol>
+ <symbol file="xpathInternals">xmlXPathMultValues</symbol>
+ <symbol file="xpathInternals">xmlXPathNamespaceURIFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathNewBoolean</symbol>
+ <symbol file="xpathInternals">xmlXPathNewCString</symbol>
+ <symbol file="xpathInternals">xmlXPathNewFloat</symbol>
+ <symbol file="xpathInternals">xmlXPathNewNodeSet</symbol>
+ <symbol file="xpathInternals">xmlXPathNewNodeSetList</symbol>
+ <symbol file="xpathInternals">xmlXPathNewParserContext</symbol>
+ <symbol file="xpathInternals">xmlXPathNewString</symbol>
+ <symbol file="xpathInternals">xmlXPathNewValueTree</symbol>
+ <symbol file="xpathInternals">xmlXPathNextAncestor</symbol>
+ <symbol file="xpathInternals">xmlXPathNextAncestorOrSelf</symbol>
+ <symbol file="xpathInternals">xmlXPathNextAttribute</symbol>
+ <symbol file="xpathInternals">xmlXPathNextChild</symbol>
+ <symbol file="xpathInternals">xmlXPathNextDescendant</symbol>
+ <symbol file="xpathInternals">xmlXPathNextDescendantOrSelf</symbol>
+ <symbol file="xpathInternals">xmlXPathNextFollowing</symbol>
+ <symbol file="xpathInternals">xmlXPathNextFollowingSibling</symbol>
+ <symbol file="xpathInternals">xmlXPathNextNamespace</symbol>
+ <symbol file="xpathInternals">xmlXPathNextParent</symbol>
+ <symbol file="xpathInternals">xmlXPathNextPreceding</symbol>
+ <symbol file="xpathInternals">xmlXPathNextPrecedingSibling</symbol>
+ <symbol file="xpathInternals">xmlXPathNextSelf</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeLeading</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeLeadingSorted</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetAdd</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetAddNs</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetAddUnique</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetContains</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetDel</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetFreeNs</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetMerge</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetRemove</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeSetSort</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeTrailing</symbol>
+ <symbol file="xpathInternals">xmlXPathNodeTrailingSorted</symbol>
+ <symbol file="xpathInternals">xmlXPathNormalizeFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathNotEqualValues</symbol>
+ <symbol file="xpathInternals">xmlXPathNotFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathNsLookup</symbol>
+ <symbol file="xpathInternals">xmlXPathNumberFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathParseNCName</symbol>
+ <symbol file="xpathInternals">xmlXPathParseName</symbol>
+ <symbol file="xpathInternals">xmlXPathPopBoolean</symbol>
+ <symbol file="xpathInternals">xmlXPathPopExternal</symbol>
+ <symbol file="xpathInternals">xmlXPathPopNodeSet</symbol>
+ <symbol file="xpathInternals">xmlXPathPopNumber</symbol>
+ <symbol file="xpathInternals">xmlXPathPopString</symbol>
+ <symbol file="xpathInternals">xmlXPathPositionFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterAllFunctions</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterFunc</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterFuncLookup</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterFuncNS</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterNs</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterVariable</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterVariableLookup</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisterVariableNS</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisteredFuncsCleanup</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisteredNsCleanup</symbol>
+ <symbol file="xpathInternals">xmlXPathRegisteredVariablesCleanup</symbol>
+ <symbol file="xpathInternals">xmlXPathRoot</symbol>
+ <symbol file="xpathInternals">xmlXPathRoundFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathStartsWithFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathStringEvalNumber</symbol>
+ <symbol file="xpathInternals">xmlXPathStringFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathStringLengthFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathSubValues</symbol>
+ <symbol file="xpathInternals">xmlXPathSubstringAfterFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathSubstringBeforeFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathSubstringFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathSumFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathTrailing</symbol>
+ <symbol file="xpathInternals">xmlXPathTrailingSorted</symbol>
+ <symbol file="xpathInternals">xmlXPathTranslateFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathTrueFunction</symbol>
+ <symbol file="xpathInternals">xmlXPathValueFlipSign</symbol>
+ <symbol file="xpathInternals">xmlXPathVariableLookup</symbol>
+ <symbol file="xpathInternals">xmlXPathVariableLookupNS</symbol>
+ <symbol file="xpathInternals">xmlXPathWrapCString</symbol>
+ <symbol file="xpathInternals">xmlXPathWrapExternal</symbol>
+ <symbol file="xpathInternals">xmlXPathWrapNodeSet</symbol>
+ <symbol file="xpathInternals">xmlXPathWrapString</symbol>
+ <symbol file="xpathInternals">xmlXPatherror</symbol>
+ <symbol file="xmlautomata">xmlAutomataCompile</symbol>
+ <symbol file="xmlautomata">xmlAutomataGetInitState</symbol>
+ <symbol file="xmlautomata">xmlAutomataIsDeterminist</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewAllTrans</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewCountTrans</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewCountedTrans</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewCounter</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewCounterTrans</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewEpsilon</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewOnceTrans</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewState</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewTransition</symbol>
+ <symbol file="xmlautomata">xmlAutomataSetFinalState</symbol>
+ <symbol file="xmlautomata">xmlFreeAutomata</symbol>
+ <symbol file="xmlautomata">xmlNewAutomata</symbol>
+ <symbol file="HTMLtree">htmlDocContentDumpFormatOutput</symbol>
+ <symbol file="HTMLtree">htmlDocContentDumpOutput</symbol>
+ <symbol file="HTMLtree">htmlDocDump</symbol>
+ <symbol file="HTMLtree">htmlDocDumpMemory</symbol>
+ <symbol file="HTMLtree">htmlGetMetaEncoding</symbol>
+ <symbol file="HTMLtree">htmlIsBooleanAttr</symbol>
+ <symbol file="HTMLtree">htmlNewDoc</symbol>
+ <symbol file="HTMLtree">htmlNewDocNoDtD</symbol>
+ <symbol file="HTMLtree">htmlNodeDump</symbol>
+ <symbol file="HTMLtree">htmlNodeDumpFile</symbol>
+ <symbol file="HTMLtree">htmlNodeDumpFileFormat</symbol>
+ <symbol file="HTMLtree">htmlNodeDumpFormatOutput</symbol>
+ <symbol file="HTMLtree">htmlNodeDumpOutput</symbol>
+ <symbol file="HTMLtree">htmlSaveFile</symbol>
+ <symbol file="HTMLtree">htmlSaveFileEnc</symbol>
+ <symbol file="HTMLtree">htmlSaveFileFormat</symbol>
+ <symbol file="HTMLtree">htmlSetMetaEncoding</symbol>
+ <symbol file="nanoftp">xmlNanoFTPCheckResponse</symbol>
+ <symbol file="nanoftp">xmlNanoFTPCleanup</symbol>
+ <symbol file="nanoftp">xmlNanoFTPClose</symbol>
+ <symbol file="nanoftp">xmlNanoFTPCloseConnection</symbol>
+ <symbol file="nanoftp">xmlNanoFTPConnect</symbol>
+ <symbol file="nanoftp">xmlNanoFTPConnectTo</symbol>
+ <symbol file="nanoftp">xmlNanoFTPCwd</symbol>
+ <symbol file="nanoftp">xmlNanoFTPFreeCtxt</symbol>
+ <symbol file="nanoftp">xmlNanoFTPGet</symbol>
+ <symbol file="nanoftp">xmlNanoFTPGetConnection</symbol>
+ <symbol file="nanoftp">xmlNanoFTPGetResponse</symbol>
+ <symbol file="nanoftp">xmlNanoFTPGetSocket</symbol>
+ <symbol file="nanoftp">xmlNanoFTPInit</symbol>
+ <symbol file="nanoftp">xmlNanoFTPList</symbol>
+ <symbol file="nanoftp">xmlNanoFTPNewCtxt</symbol>
+ <symbol file="nanoftp">xmlNanoFTPOpen</symbol>
+ <symbol file="nanoftp">xmlNanoFTPProxy</symbol>
+ <symbol file="nanoftp">xmlNanoFTPQuit</symbol>
+ <symbol file="nanoftp">xmlNanoFTPRead</symbol>
+ <symbol file="nanoftp">xmlNanoFTPScanProxy</symbol>
+ <symbol file="nanoftp">xmlNanoFTPUpdateURL</symbol>
+ <symbol file="DOCBparser">docbCreateFileParserCtxt</symbol>
+ <symbol file="DOCBparser">docbCreatePushParserCtxt</symbol>
+ <symbol file="DOCBparser">docbEncodeEntities</symbol>
+ <symbol file="DOCBparser">docbFreeParserCtxt</symbol>
+ <symbol file="DOCBparser">docbParseChunk</symbol>
+ <symbol file="DOCBparser">docbParseDoc</symbol>
+ <symbol file="DOCBparser">docbParseDocument</symbol>
+ <symbol file="DOCBparser">docbParseFile</symbol>
+ <symbol file="DOCBparser">docbSAXParseDoc</symbol>
+ <symbol file="DOCBparser">docbSAXParseFile</symbol>
+ <symbol file="xpath">xmlXPathCastBooleanToNumber</symbol>
+ <symbol file="xpath">xmlXPathCastBooleanToString</symbol>
+ <symbol file="xpath">xmlXPathCastNodeSetToBoolean</symbol>
+ <symbol file="xpath">xmlXPathCastNodeSetToNumber</symbol>
+ <symbol file="xpath">xmlXPathCastNodeSetToString</symbol>
+ <symbol file="xpath">xmlXPathCastNodeToNumber</symbol>
+ <symbol file="xpath">xmlXPathCastNodeToString</symbol>
+ <symbol file="xpath">xmlXPathCastNumberToBoolean</symbol>
+ <symbol file="xpath">xmlXPathCastNumberToString</symbol>
+ <symbol file="xpath">xmlXPathCastStringToBoolean</symbol>
+ <symbol file="xpath">xmlXPathCastStringToNumber</symbol>
+ <symbol file="xpath">xmlXPathCastToBoolean</symbol>
+ <symbol file="xpath">xmlXPathCastToNumber</symbol>
+ <symbol file="xpath">xmlXPathCastToString</symbol>
+ <symbol file="xpath">xmlXPathCmpNodes</symbol>
+ <symbol file="xpath">xmlXPathCompile</symbol>
+ <symbol file="xpath">xmlXPathCompiledEval</symbol>
+ <symbol file="xpath">xmlXPathConvertBoolean</symbol>
+ <symbol file="xpath">xmlXPathConvertNumber</symbol>
+ <symbol file="xpath">xmlXPathConvertString</symbol>
+ <symbol file="xpath">xmlXPathEval</symbol>
+ <symbol file="xpath">xmlXPathEvalExpression</symbol>
+ <symbol file="xpath">xmlXPathEvalPredicate</symbol>
+ <symbol file="xpath">xmlXPathFreeCompExpr</symbol>
+ <symbol file="xpath">xmlXPathFreeContext</symbol>
+ <symbol file="xpath">xmlXPathFreeNodeSet</symbol>
+ <symbol file="xpath">xmlXPathFreeNodeSetList</symbol>
+ <symbol file="xpath">xmlXPathFreeObject</symbol>
+ <symbol file="xpath">xmlXPathInit</symbol>
+ <symbol file="xpath">xmlXPathIsInf</symbol>
+ <symbol file="xpath">xmlXPathIsNaN</symbol>
+ <symbol file="xpath">xmlXPathNAN</symbol>
+ <symbol file="xpath">xmlXPathNINF</symbol>
+ <symbol file="xpath">xmlXPathNewContext</symbol>
+ <symbol file="xpath">xmlXPathNodeSetCreate</symbol>
+ <symbol file="xpath">xmlXPathObjectCopy</symbol>
+ <symbol file="xpath">xmlXPathPINF</symbol>
+ <symbol file="xlink">xlinkGetDefaultDetect</symbol>
+ <symbol file="xlink">xlinkGetDefaultHandler</symbol>
+ <symbol file="xlink">xlinkIsLink</symbol>
+ <symbol file="xlink">xlinkSetDefaultDetect</symbol>
+ <symbol file="xlink">xlinkSetDefaultHandler</symbol>
+ <symbol file="entities">xmlAddDocEntity</symbol>
+ <symbol file="entities">xmlAddDtdEntity</symbol>
+ <symbol file="entities">xmlCleanupPredefinedEntities</symbol>
+ <symbol file="entities">xmlCopyEntitiesTable</symbol>
+ <symbol file="entities">xmlCreateEntitiesTable</symbol>
+ <symbol file="entities">xmlDumpEntitiesTable</symbol>
+ <symbol file="entities">xmlDumpEntityDecl</symbol>
+ <symbol file="entities">xmlEncodeEntities</symbol>
+ <symbol file="entities">xmlEncodeEntitiesReentrant</symbol>
+ <symbol file="entities">xmlEncodeSpecialChars</symbol>
+ <symbol file="entities">xmlFreeEntitiesTable</symbol>
+ <symbol file="entities">xmlGetDocEntity</symbol>
+ <symbol file="entities">xmlGetDtdEntity</symbol>
+ <symbol file="entities">xmlGetParameterEntity</symbol>
+ <symbol file="entities">xmlGetPredefinedEntity</symbol>
+ <symbol file="entities">xmlInitializePredefinedEntities</symbol>
+ <symbol file="xinclude">xmlXIncludeProcess</symbol>
+ <symbol file="list">xmlLinkGetData</symbol>
+ <symbol file="list">xmlListAppend</symbol>
+ <symbol file="list">xmlListClear</symbol>
+ <symbol file="list">xmlListCopy</symbol>
+ <symbol file="list">xmlListCreate</symbol>
+ <symbol file="list">xmlListDelete</symbol>
+ <symbol file="list">xmlListDup</symbol>
+ <symbol file="list">xmlListEmpty</symbol>
+ <symbol file="list">xmlListEnd</symbol>
+ <symbol file="list">xmlListFront</symbol>
+ <symbol file="list">xmlListInsert</symbol>
+ <symbol file="list">xmlListMerge</symbol>
+ <symbol file="list">xmlListPopBack</symbol>
+ <symbol file="list">xmlListPopFront</symbol>
+ <symbol file="list">xmlListPushBack</symbol>
+ <symbol file="list">xmlListPushFront</symbol>
+ <symbol file="list">xmlListRemoveAll</symbol>
+ <symbol file="list">xmlListRemoveFirst</symbol>
+ <symbol file="list">xmlListRemoveLast</symbol>
+ <symbol file="list">xmlListReverse</symbol>
+ <symbol file="list">xmlListReverseSearch</symbol>
+ <symbol file="list">xmlListReverseWalk</symbol>
+ <symbol file="list">xmlListSearch</symbol>
+ <symbol file="list">xmlListSize</symbol>
+ <symbol file="list">xmlListSort</symbol>
+ <symbol file="list">xmlListWalk</symbol>
+ <symbol file="xmlmemory">xmlInitMemory</symbol>
+ <symbol file="xmlmemory">xmlMallocLoc</symbol>
+ <symbol file="xmlmemory">xmlMemDisplay</symbol>
+ <symbol file="xmlmemory">xmlMemFree</symbol>
+ <symbol file="xmlmemory">xmlMemGet</symbol>
+ <symbol file="xmlmemory">xmlMemMalloc</symbol>
+ <symbol file="xmlmemory">xmlMemRealloc</symbol>
+ <symbol file="xmlmemory">xmlMemSetup</symbol>
+ <symbol file="xmlmemory">xmlMemShow</symbol>
+ <symbol file="xmlmemory">xmlMemStrdupLoc</symbol>
+ <symbol file="xmlmemory">xmlMemUsed</symbol>
+ <symbol file="xmlmemory">xmlMemoryDump</symbol>
+ <symbol file="xmlmemory">xmlMemoryStrdup</symbol>
+ <symbol file="xmlmemory">xmlReallocLoc</symbol>
+ <symbol file="xmlIO">xmlAllocOutputBuffer</symbol>
+ <symbol file="xmlIO">xmlAllocParserInputBuffer</symbol>
+ <symbol file="xmlIO">xmlCheckFilename</symbol>
+ <symbol file="xmlIO">xmlCleanupInputCallbacks</symbol>
+ <symbol file="xmlIO">xmlCleanupOutputCallbacks</symbol>
+ <symbol file="xmlIO">xmlFileClose</symbol>
+ <symbol file="xmlIO">xmlFileMatch</symbol>
+ <symbol file="xmlIO">xmlFileOpen</symbol>
+ <symbol file="xmlIO">xmlFileRead</symbol>
+ <symbol file="xmlIO">xmlFreeParserInputBuffer</symbol>
+ <symbol file="xmlIO">xmlIOFTPClose</symbol>
+ <symbol file="xmlIO">xmlIOFTPMatch</symbol>
+ <symbol file="xmlIO">xmlIOFTPOpen</symbol>
+ <symbol file="xmlIO">xmlIOFTPRead</symbol>
+ <symbol file="xmlIO">xmlIOHTTPClose</symbol>
+ <symbol file="xmlIO">xmlIOHTTPMatch</symbol>
+ <symbol file="xmlIO">xmlIOHTTPOpen</symbol>
+ <symbol file="xmlIO">xmlIOHTTPOpenW</symbol>
+ <symbol file="xmlIO">xmlIOHTTPRead</symbol>
+ <symbol file="xmlIO">xmlNoNetExternalEntityLoader</symbol>
+ <symbol file="xmlIO">xmlNormalizeWindowsPath</symbol>
+ <symbol file="xmlIO">xmlOutputBufferClose</symbol>
+ <symbol file="xmlIO">xmlOutputBufferCreateFd</symbol>
+ <symbol file="xmlIO">xmlOutputBufferCreateFile</symbol>
+ <symbol file="xmlIO">xmlOutputBufferCreateFilename</symbol>
+ <symbol file="xmlIO">xmlOutputBufferCreateIO</symbol>
+ <symbol file="xmlIO">xmlOutputBufferFlush</symbol>
+ <symbol file="xmlIO">xmlOutputBufferWrite</symbol>
+ <symbol file="xmlIO">xmlOutputBufferWriteString</symbol>
+ <symbol file="xmlIO">xmlParserGetDirectory</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateFd</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateFile</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateFilename</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateIO</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateMem</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferGrow</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferPush</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferRead</symbol>
+ <symbol file="xmlIO">xmlRegisterDefaultInputCallbacks</symbol>
+ <symbol file="xmlIO">xmlRegisterDefaultOutputCallbacks</symbol>
+ <symbol file="xmlIO">xmlRegisterHTTPPostCallbacks</symbol>
+ <symbol file="xmlIO">xmlRegisterInputCallbacks</symbol>
+ <symbol file="xmlIO">xmlRegisterOutputCallbacks</symbol>
+ <symbol file="xmlversion">xmlCheckVersion</symbol>
+ <symbol file="valid">xmlAddAttributeDecl</symbol>
+ <symbol file="valid">xmlAddElementDecl</symbol>
+ <symbol file="valid">xmlAddID</symbol>
+ <symbol file="valid">xmlAddNotationDecl</symbol>
+ <symbol file="valid">xmlAddRef</symbol>
+ <symbol file="valid">xmlCopyAttributeTable</symbol>
+ <symbol file="valid">xmlCopyElementContent</symbol>
+ <symbol file="valid">xmlCopyElementTable</symbol>
+ <symbol file="valid">xmlCopyEnumeration</symbol>
+ <symbol file="valid">xmlCopyNotationTable</symbol>
+ <symbol file="valid">xmlCreateEnumeration</symbol>
+ <symbol file="valid">xmlDumpAttributeDecl</symbol>
+ <symbol file="valid">xmlDumpAttributeTable</symbol>
+ <symbol file="valid">xmlDumpElementDecl</symbol>
+ <symbol file="valid">xmlDumpElementTable</symbol>
+ <symbol file="valid">xmlDumpNotationDecl</symbol>
+ <symbol file="valid">xmlDumpNotationTable</symbol>
+ <symbol file="valid">xmlFreeAttributeTable</symbol>
+ <symbol file="valid">xmlFreeElementContent</symbol>
+ <symbol file="valid">xmlFreeElementTable</symbol>
+ <symbol file="valid">xmlFreeEnumeration</symbol>
+ <symbol file="valid">xmlFreeIDTable</symbol>
+ <symbol file="valid">xmlFreeNotationTable</symbol>
+ <symbol file="valid">xmlFreeRefTable</symbol>
+ <symbol file="valid">xmlGetDtdAttrDesc</symbol>
+ <symbol file="valid">xmlGetDtdElementDesc</symbol>
+ <symbol file="valid">xmlGetDtdNotationDesc</symbol>
+ <symbol file="valid">xmlGetDtdQAttrDesc</symbol>
+ <symbol file="valid">xmlGetDtdQElementDesc</symbol>
+ <symbol file="valid">xmlGetID</symbol>
+ <symbol file="valid">xmlGetRefs</symbol>
+ <symbol file="valid">xmlIsID</symbol>
+ <symbol file="valid">xmlIsMixedElement</symbol>
+ <symbol file="valid">xmlIsRef</symbol>
+ <symbol file="valid">xmlNewElementContent</symbol>
+ <symbol file="valid">xmlRemoveID</symbol>
+ <symbol file="valid">xmlRemoveRef</symbol>
+ <symbol file="valid">xmlSnprintfElementContent</symbol>
+ <symbol file="tree">xmlSplitQName2</symbol>
+ <symbol file="valid">xmlSprintfElementContent</symbol>
+ <symbol file="valid">xmlValidBuildContentModel</symbol>
+ <symbol file="valid">xmlValidCtxtNormalizeAttributeValue</symbol>
+ <symbol file="valid">xmlValidGetPotentialChildren</symbol>
+ <symbol file="valid">xmlValidGetValidElements</symbol>
+ <symbol file="valid">xmlValidNormalizeAttributeValue</symbol>
+ <symbol file="valid">xmlValidateAttributeDecl</symbol>
+ <symbol file="valid">xmlValidateAttributeValue</symbol>
+ <symbol file="valid">xmlValidateDocument</symbol>
+ <symbol file="valid">xmlValidateDocumentFinal</symbol>
+ <symbol file="valid">xmlValidateDtd</symbol>
+ <symbol file="valid">xmlValidateDtdFinal</symbol>
+ <symbol file="valid">xmlValidateElement</symbol>
+ <symbol file="valid">xmlValidateElementDecl</symbol>
+ <symbol file="valid">xmlValidateNameValue</symbol>
+ <symbol file="valid">xmlValidateNamesValue</symbol>
+ <symbol file="valid">xmlValidateNmtokenValue</symbol>
+ <symbol file="valid">xmlValidateNmtokensValue</symbol>
+ <symbol file="valid">xmlValidateNotationDecl</symbol>
+ <symbol file="valid">xmlValidateNotationUse</symbol>
+ <symbol file="valid">xmlValidateOneAttribute</symbol>
+ <symbol file="valid">xmlValidateOneElement</symbol>
+ <symbol file="valid">xmlValidateOneNamespace</symbol>
+ <symbol file="valid">xmlValidateRoot</symbol>
+ <symbol file="HTMLparser">UTF8ToHtml</symbol>
+ <symbol file="HTMLparser">htmlAutoCloseTag</symbol>
+ <symbol file="HTMLparser">htmlCreatePushParserCtxt</symbol>
+ <symbol file="HTMLparser">htmlEncodeEntities</symbol>
+ <symbol file="HTMLparser">htmlEntityLookup</symbol>
+ <symbol file="HTMLparser">htmlEntityValueLookup</symbol>
+ <symbol file="HTMLparser">htmlFreeParserCtxt</symbol>
+ <symbol file="HTMLparser">htmlHandleOmittedElem</symbol>
+ <symbol file="HTMLparser">htmlIsAutoClosed</symbol>
+ <symbol file="HTMLparser">htmlIsScriptAttribute</symbol>
+ <symbol file="HTMLparser">htmlParseCharRef</symbol>
+ <symbol file="HTMLparser">htmlParseChunk</symbol>
+ <symbol file="HTMLparser">htmlParseDoc</symbol>
+ <symbol file="HTMLparser">htmlParseDocument</symbol>
+ <symbol file="HTMLparser">htmlParseElement</symbol>
+ <symbol file="HTMLparser">htmlParseEntityRef</symbol>
+ <symbol file="HTMLparser">htmlParseFile</symbol>
+ <symbol file="HTMLparser">htmlSAXParseDoc</symbol>
+ <symbol file="HTMLparser">htmlSAXParseFile</symbol>
+ <symbol file="HTMLparser">htmlTagLookup</symbol>
+ <symbol file="xmlstring">xmlCharStrdup</symbol>
+ <symbol file="xmlstring">xmlCharStrndup</symbol>
+ <symbol file="parser">xmlCleanupParser</symbol>
+ <symbol file="parser">xmlClearNodeInfoSeq</symbol>
+ <symbol file="parser">xmlClearParserCtxt</symbol>
+ <symbol file="parser">xmlCreateDocParserCtxt</symbol>
+ <symbol file="parser">xmlCreateIOParserCtxt</symbol>
+ <symbol file="parser">xmlCreatePushParserCtxt</symbol>
+ <symbol file="parser">xmlFreeParserCtxt</symbol>
+ <symbol file="parser">xmlGetExternalEntityLoader</symbol>
+ <symbol file="parser">xmlGetFeature</symbol>
+ <symbol file="parser">xmlGetFeaturesList</symbol>
+ <symbol file="globals">xmlGetWarningsDefaultValue</symbol>
+ <symbol file="parser">xmlIOParseDTD</symbol>
+ <symbol file="parser">xmlInitNodeInfoSeq</symbol>
+ <symbol file="parser">xmlInitParser</symbol>
+ <symbol file="parser">xmlInitParserCtxt</symbol>
+ <symbol file="parser">xmlKeepBlanksDefault</symbol>
+ <symbol file="parser">xmlLineNumbersDefault</symbol>
+ <symbol file="parser">xmlLoadExternalEntity</symbol>
+ <symbol file="parser">xmlNewIOInputStream</symbol>
+ <symbol file="parser">xmlParseBalancedChunkMemory</symbol>
+ <symbol file="parser">xmlParseBalancedChunkMemoryRecover</symbol>
+ <symbol file="parser">xmlParseChunk</symbol>
+ <symbol file="parser">xmlParseCtxtExternalEntity</symbol>
+ <symbol file="parser">xmlParseDTD</symbol>
+ <symbol file="parser">xmlParseDoc</symbol>
+ <symbol file="parser">xmlParseDocument</symbol>
+ <symbol file="parser">xmlParseEntity</symbol>
+ <symbol file="parser">xmlParseExtParsedEnt</symbol>
+ <symbol file="parser">xmlParseExternalEntity</symbol>
+ <symbol file="parser">xmlParseFile</symbol>
+ <symbol file="parser">xmlParseMemory</symbol>
+ <symbol file="parser">xmlParserAddNodeInfo</symbol>
+ <symbol file="parser">xmlParserFindNodeInfo</symbol>
+ <symbol file="parser">xmlParserFindNodeInfoIndex</symbol>
+ <symbol file="parser">xmlParserInputGrow</symbol>
+ <symbol file="parser">xmlParserInputRead</symbol>
+ <symbol file="parser">xmlPedanticParserDefault</symbol>
+ <symbol file="parser">xmlRecoverDoc</symbol>
+ <symbol file="parser">xmlRecoverFile</symbol>
+ <symbol file="parser">xmlRecoverMemory</symbol>
+ <symbol file="parser">xmlSAXParseDTD</symbol>
+ <symbol file="parser">xmlSAXParseDoc</symbol>
+ <symbol file="parser">xmlSAXParseEntity</symbol>
+ <symbol file="parser">xmlSAXParseFile</symbol>
+ <symbol file="parser">xmlSAXParseFileWithData</symbol>
+ <symbol file="parser">xmlSAXParseMemory</symbol>
+ <symbol file="parser">xmlSAXParseMemoryWithData</symbol>
+ <symbol file="parser">xmlSAXUserParseFile</symbol>
+ <symbol file="parser">xmlSAXUserParseMemory</symbol>
+ <symbol file="parser">xmlSetExternalEntityLoader</symbol>
+ <symbol file="parser">xmlSetFeature</symbol>
+ <symbol file="parser">xmlSetupParserForBuffer</symbol>
+ <symbol file="parser">xmlStopParser</symbol>
+ <symbol file="xmlstring">xmlStrEqual</symbol>
+ <symbol file="xmlstring">xmlStrcasecmp</symbol>
+ <symbol file="xmlstring">xmlStrcasestr</symbol>
+ <symbol file="xmlstring">xmlStrcat</symbol>
+ <symbol file="xmlstring">xmlStrchr</symbol>
+ <symbol file="xmlstring">xmlStrcmp</symbol>
+ <symbol file="xmlstring">xmlStrdup</symbol>
+ <symbol file="xmlstring">xmlStrlen</symbol>
+ <symbol file="xmlstring">xmlStrncasecmp</symbol>
+ <symbol file="xmlstring">xmlStrncat</symbol>
+ <symbol file="xmlstring">xmlStrncmp</symbol>
+ <symbol file="xmlstring">xmlStrndup</symbol>
+ <symbol file="xmlstring">xmlStrstr</symbol>
+ <symbol file="xmlstring">xmlStrsub</symbol>
+ <symbol file="parser">xmlSubstituteEntitiesDefault</symbol>
+ <symbol file="xmlreader">xmlFreeTextReader</symbol>
+ <symbol file="xmlreader">xmlNewTextReader</symbol>
+ <symbol file="xmlreader">xmlNewTextReaderFilename</symbol>
+ <symbol file="xmlreader">xmlTextReaderAttributeCount</symbol>
+ <symbol file="xmlreader">xmlTextReaderBaseUri</symbol>
+ <symbol file="xmlreader">xmlTextReaderDepth</symbol>
+ <symbol file="xmlreader">xmlTextReaderHasAttributes</symbol>
+ <symbol file="xmlreader">xmlTextReaderHasValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderIsDefault</symbol>
+ <symbol file="xmlreader">xmlTextReaderIsEmptyElement</symbol>
+ <symbol file="xmlreader">xmlTextReaderLocalName</symbol>
+ <symbol file="xmlreader">xmlTextReaderName</symbol>
+ <symbol file="xmlreader">xmlTextReaderNamespaceUri</symbol>
+ <symbol file="xmlreader">xmlTextReaderNodeType</symbol>
+ <symbol file="xmlreader">xmlTextReaderPrefix</symbol>
+ <symbol file="xmlreader">xmlTextReaderQuoteChar</symbol>
+ <symbol file="xmlreader">xmlTextReaderRead</symbol>
+ <symbol file="xmlreader">xmlTextReaderValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderXmlLang</symbol>
+ <symbol file="globals">docbDefaultSAXHandler</symbol>
+ <symbol file="globals">htmlDefaultSAXHandler</symbol>
+ <symbol file="globals">xmlDefaultSAXHandler</symbol>
+ <symbol file="globals">xmlDefaultSAXLocator</symbol>
+ <symbol file="globals">xmlDoValidityCheckingDefaultValue</symbol>
+ <symbol file="globals">xmlFree</symbol>
+ <symbol file="globals">xmlGenericError</symbol>
+ <symbol file="globals">xmlGenericErrorContext</symbol>
+ <symbol file="globals">xmlInitializeGlobalState</symbol>
+ <symbol file="globals">xmlKeepBlanksDefaultValue</symbol>
+ <symbol file="globals">xmlLineNumbersDefaultValue</symbol>
+ <symbol file="globals">xmlLoadExtDtdDefaultValue</symbol>
+ <symbol file="globals">xmlMalloc</symbol>
+ <symbol file="globals">xmlMemStrdup</symbol>
+ <symbol file="globals">xmlParserDebugEntities</symbol>
+ <symbol file="globals">xmlParserVersion</symbol>
+ <symbol file="globals">xmlPedanticParserDefaultValue</symbol>
+ <symbol file="globals">xmlRealloc</symbol>
+ <symbol file="globals">xmlSaveNoEmptyTags</symbol>
+ <symbol file="globals">xmlSubstituteEntitiesDefaultValue</symbol>
+ <symbol file="globals">xmlTreeIndentString</symbol>
+ <symbol file="threads">xmlCleanupThreads</symbol>
+ <symbol file="threads">xmlFreeMutex</symbol>
+ <symbol file="threads">xmlFreeRMutex</symbol>
+ <symbol file="threads">xmlGetGlobalState</symbol>
+ <symbol file="threads">xmlGetThreadId</symbol>
+ <symbol file="threads">xmlInitThreads</symbol>
+ <symbol file="threads">xmlIsMainThread</symbol>
+ <symbol file="threads">xmlLockLibrary</symbol>
+ <symbol file="threads">xmlMutexLock</symbol>
+ <symbol file="threads">xmlMutexUnlock</symbol>
+ <symbol file="threads">xmlNewMutex</symbol>
+ <symbol file="threads">xmlNewRMutex</symbol>
+ <symbol file="threads">xmlRMutexLock</symbol>
+ <symbol file="threads">xmlRMutexUnlock</symbol>
+ <symbol file="threads">xmlUnlockLibrary</symbol>
+ <symbol file="hash">xmlHashAddEntry</symbol>
+ <symbol file="hash">xmlHashAddEntry2</symbol>
+ <symbol file="hash">xmlHashAddEntry3</symbol>
+ <symbol file="hash">xmlHashCopy</symbol>
+ <symbol file="hash">xmlHashCreate</symbol>
+ <symbol file="hash">xmlHashFree</symbol>
+ <symbol file="hash">xmlHashLookup</symbol>
+ <symbol file="hash">xmlHashLookup2</symbol>
+ <symbol file="hash">xmlHashLookup3</symbol>
+ <symbol file="hash">xmlHashRemoveEntry</symbol>
+ <symbol file="hash">xmlHashRemoveEntry2</symbol>
+ <symbol file="hash">xmlHashRemoveEntry3</symbol>
+ <symbol file="hash">xmlHashScan</symbol>
+ <symbol file="hash">xmlHashScan3</symbol>
+ <symbol file="hash">xmlHashScanFull</symbol>
+ <symbol file="hash">xmlHashScanFull3</symbol>
+ <symbol file="hash">xmlHashSize</symbol>
+ <symbol file="hash">xmlHashUpdateEntry</symbol>
+ <symbol file="hash">xmlHashUpdateEntry2</symbol>
+ <symbol file="hash">xmlHashUpdateEntry3</symbol>
+ <symbol file="xmlerror">initGenericErrorDefaultFunc</symbol>
+ <symbol file="xmlerror">xmlParserError</symbol>
+ <symbol file="xmlerror">xmlParserPrintFileContext</symbol>
+ <symbol file="xmlerror">xmlParserPrintFileInfo</symbol>
+ <symbol file="xmlerror">xmlParserValidityError</symbol>
+ <symbol file="xmlerror">xmlParserValidityWarning</symbol>
+ <symbol file="xmlerror">xmlParserWarning</symbol>
+ <symbol file="xmlerror">xmlSetGenericErrorFunc</symbol>
+ <symbol file="globals">oldXMLWDcompatibility</symbol>
+ <symbol file="tree">xmlAddChild</symbol>
+ <symbol file="tree">xmlAddChildList</symbol>
+ <symbol file="tree">xmlAddNextSibling</symbol>
+ <symbol file="tree">xmlAddPrevSibling</symbol>
+ <symbol file="tree">xmlAddSibling</symbol>
+ <symbol file="tree">xmlBufferAdd</symbol>
+ <symbol file="tree">xmlBufferAddHead</symbol>
+ <symbol file="globals">xmlBufferAllocScheme</symbol>
+ <symbol file="tree">xmlBufferCCat</symbol>
+ <symbol file="tree">xmlBufferCat</symbol>
+ <symbol file="tree">xmlBufferContent</symbol>
+ <symbol file="tree">xmlBufferCreate</symbol>
+ <symbol file="tree">xmlBufferCreateSize</symbol>
+ <symbol file="tree">xmlBufferDump</symbol>
+ <symbol file="tree">xmlBufferEmpty</symbol>
+ <symbol file="tree">xmlBufferFree</symbol>
+ <symbol file="tree">xmlBufferGrow</symbol>
+ <symbol file="tree">xmlBufferLength</symbol>
+ <symbol file="tree">xmlBufferResize</symbol>
+ <symbol file="tree">xmlBufferSetAllocationScheme</symbol>
+ <symbol file="tree">xmlBufferShrink</symbol>
+ <symbol file="tree">xmlBufferWriteCHAR</symbol>
+ <symbol file="tree">xmlBufferWriteChar</symbol>
+ <symbol file="tree">xmlBufferWriteQuotedString</symbol>
+ <symbol file="tree">xmlCopyDoc</symbol>
+ <symbol file="tree">xmlCopyDtd</symbol>
+ <symbol file="tree">xmlCopyNamespace</symbol>
+ <symbol file="tree">xmlCopyNamespaceList</symbol>
+ <symbol file="tree">xmlCopyNode</symbol>
+ <symbol file="tree">xmlCopyNodeList</symbol>
+ <symbol file="tree">xmlCopyProp</symbol>
+ <symbol file="tree">xmlCopyPropList</symbol>
+ <symbol file="tree">xmlCreateIntSubset</symbol>
+ <symbol file="globals">xmlDefaultBufferSize</symbol>
+ <symbol file="tree">xmlDocCopyNode</symbol>
+ <symbol file="tree">xmlDocDump</symbol>
+ <symbol file="tree">xmlDocDumpFormatMemory</symbol>
+ <symbol file="tree">xmlDocDumpFormatMemoryEnc</symbol>
+ <symbol file="tree">xmlDocDumpMemory</symbol>
+ <symbol file="tree">xmlDocDumpMemoryEnc</symbol>
+ <symbol file="tree">xmlDocFormatDump</symbol>
+ <symbol file="tree">xmlDocGetRootElement</symbol>
+ <symbol file="tree">xmlDocSetRootElement</symbol>
+ <symbol file="tree">xmlElemDump</symbol>
+ <symbol file="tree">xmlFreeDoc</symbol>
+ <symbol file="tree">xmlFreeDtd</symbol>
+ <symbol file="tree">xmlFreeNode</symbol>
+ <symbol file="tree">xmlFreeNodeList</symbol>
+ <symbol file="tree">xmlFreeNs</symbol>
+ <symbol file="tree">xmlFreeNsList</symbol>
+ <symbol file="tree">xmlFreeProp</symbol>
+ <symbol file="tree">xmlFreePropList</symbol>
+ <symbol file="tree">xmlGetBufferAllocationScheme</symbol>
+ <symbol file="tree">xmlGetCompressMode</symbol>
+ <symbol file="tree">xmlGetDocCompressMode</symbol>
+ <symbol file="tree">xmlGetIntSubset</symbol>
+ <symbol file="tree">xmlGetLastChild</symbol>
+ <symbol file="tree">xmlGetLineNo</symbol>
+ <symbol file="tree">xmlGetNodePath</symbol>
+ <symbol file="tree">xmlGetNsList</symbol>
+ <symbol file="tree">xmlGetNsProp</symbol>
+ <symbol file="tree">xmlGetProp</symbol>
+ <symbol file="tree">xmlHasNsProp</symbol>
+ <symbol file="tree">xmlHasProp</symbol>
+ <symbol file="globals">xmlIndentTreeOutput</symbol>
+ <symbol file="tree">xmlIsBlankNode</symbol>
+ <symbol file="tree">xmlIsXHTML</symbol>
+ <symbol file="tree">xmlNewCDataBlock</symbol>
+ <symbol file="tree">xmlNewCharRef</symbol>
+ <symbol file="tree">xmlNewChild</symbol>
+ <symbol file="tree">xmlNewComment</symbol>
+ <symbol file="tree">xmlNewDoc</symbol>
+ <symbol file="tree">xmlNewDocComment</symbol>
+ <symbol file="tree">xmlNewDocFragment</symbol>
+ <symbol file="tree">xmlNewDocNode</symbol>
+ <symbol file="tree">xmlNewDocNodeEatName</symbol>
+ <symbol file="tree">xmlNewDocProp</symbol>
+ <symbol file="tree">xmlNewDocRawNode</symbol>
+ <symbol file="tree">xmlNewDocText</symbol>
+ <symbol file="tree">xmlNewDocTextLen</symbol>
+ <symbol file="tree">xmlNewDtd</symbol>
+ <symbol file="tree">xmlNewGlobalNs</symbol>
+ <symbol file="tree">xmlNewNode</symbol>
+ <symbol file="tree">xmlNewNodeEatName</symbol>
+ <symbol file="tree">xmlNewNs</symbol>
+ <symbol file="tree">xmlNewNsProp</symbol>
+ <symbol file="tree">xmlNewNsPropEatName</symbol>
+ <symbol file="tree">xmlNewPI</symbol>
+ <symbol file="tree">xmlNewProp</symbol>
+ <symbol file="tree">xmlNewReference</symbol>
+ <symbol file="tree">xmlNewText</symbol>
+ <symbol file="tree">xmlNewTextChild</symbol>
+ <symbol file="tree">xmlNewTextLen</symbol>
+ <symbol file="tree">xmlNodeAddContent</symbol>
+ <symbol file="tree">xmlNodeAddContentLen</symbol>
+ <symbol file="tree">xmlNodeDump</symbol>
+ <symbol file="tree">xmlNodeDumpOutput</symbol>
+ <symbol file="tree">xmlNodeGetBase</symbol>
+ <symbol file="tree">xmlNodeGetContent</symbol>
+ <symbol file="tree">xmlNodeGetLang</symbol>
+ <symbol file="tree">xmlNodeGetSpacePreserve</symbol>
+ <symbol file="tree">xmlNodeIsText</symbol>
+ <symbol file="tree">xmlNodeListGetRawString</symbol>
+ <symbol file="tree">xmlNodeListGetString</symbol>
+ <symbol file="tree">xmlNodeSetBase</symbol>
+ <symbol file="tree">xmlNodeSetContent</symbol>
+ <symbol file="tree">xmlNodeSetContentLen</symbol>
+ <symbol file="tree">xmlNodeSetLang</symbol>
+ <symbol file="tree">xmlNodeSetName</symbol>
+ <symbol file="tree">xmlNodeSetSpacePreserve</symbol>
+ <symbol file="tree">xmlReconciliateNs</symbol>
+ <symbol file="tree">xmlRemoveProp</symbol>
+ <symbol file="tree">xmlReplaceNode</symbol>
+ <symbol file="tree">xmlSaveFile</symbol>
+ <symbol file="tree">xmlSaveFileEnc</symbol>
+ <symbol file="tree">xmlSaveFileTo</symbol>
+ <symbol file="tree">xmlSaveFormatFile</symbol>
+ <symbol file="tree">xmlSaveFormatFileEnc</symbol>
+ <symbol file="tree">xmlSaveFormatFileTo</symbol>
+ <symbol file="tree">xmlSearchNs</symbol>
+ <symbol file="tree">xmlSearchNsByHref</symbol>
+ <symbol file="tree">xmlSetBufferAllocationScheme</symbol>
+ <symbol file="tree">xmlSetCompressMode</symbol>
+ <symbol file="tree">xmlSetDocCompressMode</symbol>
+ <symbol file="tree">xmlSetListDoc</symbol>
+ <symbol file="tree">xmlSetNs</symbol>
+ <symbol file="tree">xmlSetNsProp</symbol>
+ <symbol file="tree">xmlSetProp</symbol>
+ <symbol file="tree">xmlSetTreeDoc</symbol>
+ <symbol file="tree">xmlStringGetNodeList</symbol>
+ <symbol file="tree">xmlStringLenGetNodeList</symbol>
+ <symbol file="tree">xmlTextConcat</symbol>
+ <symbol file="tree">xmlTextMerge</symbol>
+ <symbol file="tree">xmlUnlinkNode</symbol>
+ <symbol file="tree">xmlUnsetNsProp</symbol>
+ <symbol file="tree">xmlUnsetProp</symbol>
+ <symbol file="xmlregexp">xmlRegExecPushString</symbol>
+ <symbol file="xmlregexp">xmlRegFreeExecCtxt</symbol>
+ <symbol file="xmlregexp">xmlRegFreeRegexp</symbol>
+ <symbol file="xmlregexp">xmlRegNewExecCtxt</symbol>
+ <symbol file="xmlregexp">xmlRegexpCompile</symbol>
+ <symbol file="xmlregexp">xmlRegexpExec</symbol>
+ <symbol file="xmlregexp">xmlRegexpIsDeterminist</symbol>
+ <symbol file="xmlregexp">xmlRegexpPrint</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPAuthHeader</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPCleanup</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPClose</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPFetch</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPInit</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPMethod</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPMethodRedir</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPOpen</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPOpenRedir</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPRead</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPReturnCode</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPSave</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPScanProxy</symbol>
+ <symbol file="xmlunicode">xmlUCSIsAlphabeticPresentationForms</symbol>
+ <symbol file="xmlunicode">xmlUCSIsArabic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsArabicPresentationFormsA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsArabicPresentationFormsB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsArmenian</symbol>
+ <symbol file="xmlunicode">xmlUCSIsArrows</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBasicLatin</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBengali</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBlock</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBlockElements</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBopomofo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBopomofoExtended</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBoxDrawing</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBraillePatterns</symbol>
+ <symbol file="xmlunicode">xmlUCSIsByzantineMusicalSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKCompatibility</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKCompatibilityForms</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKCompatibilityIdeographs</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKCompatibilityIdeographsSupplement</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKRadicalsSupplement</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKSymbolsandPunctuation</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKUnifiedIdeographs</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKUnifiedIdeographsExtensionA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCJKUnifiedIdeographsExtensionB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCat</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatC</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatCc</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatCf</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatCo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatCs</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatL</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatLl</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatLm</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatLo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatLt</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatLu</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatM</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatMc</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatMe</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatMn</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatN</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatNd</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatNl</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatNo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatP</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPc</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPd</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPe</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPf</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPi</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatPs</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatS</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatSc</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatSk</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatSm</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatSo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatZ</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatZl</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatZp</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCatZs</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCherokee</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCombiningDiacriticalMarks</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCombiningHalfMarks</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCombiningMarksforSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsControlPictures</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCurrencySymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCyrillic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsDeseret</symbol>
+ <symbol file="xmlunicode">xmlUCSIsDevanagari</symbol>
+ <symbol file="xmlunicode">xmlUCSIsDingbats</symbol>
+ <symbol file="xmlunicode">xmlUCSIsEnclosedAlphanumerics</symbol>
+ <symbol file="xmlunicode">xmlUCSIsEnclosedCJKLettersandMonths</symbol>
+ <symbol file="xmlunicode">xmlUCSIsEthiopic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGeneralPunctuation</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGeometricShapes</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGeorgian</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGothic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGreek</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGreekExtended</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGujarati</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGurmukhi</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHalfwidthandFullwidthForms</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHangulCompatibilityJamo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHangulJamo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHangulSyllables</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHebrew</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHighPrivateUseSurrogates</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHighSurrogates</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHiragana</symbol>
+ <symbol file="xmlunicode">xmlUCSIsIPAExtensions</symbol>
+ <symbol file="xmlunicode">xmlUCSIsIdeographicDescriptionCharacters</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKanbun</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKangxiRadicals</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKannada</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKatakana</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKhmer</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLao</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLatin1Supplement</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLatinExtendedA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLatinExtendedAdditional</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLatinExtendedB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLetterlikeSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLowSurrogates</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMalayalam</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMathematicalAlphanumericSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMathematicalOperators</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMiscellaneousSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMiscellaneousTechnical</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMongolian</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMusicalSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMyanmar</symbol>
+ <symbol file="xmlunicode">xmlUCSIsNumberForms</symbol>
+ <symbol file="xmlunicode">xmlUCSIsOgham</symbol>
+ <symbol file="xmlunicode">xmlUCSIsOldItalic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsOpticalCharacterRecognition</symbol>
+ <symbol file="xmlunicode">xmlUCSIsOriya</symbol>
+ <symbol file="xmlunicode">xmlUCSIsPrivateUse</symbol>
+ <symbol file="xmlunicode">xmlUCSIsRunic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSinhala</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSmallFormVariants</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSpacingModifierLetters</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSpecials</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSuperscriptsandSubscripts</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSyriac</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTags</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTamil</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTelugu</symbol>
+ <symbol file="xmlunicode">xmlUCSIsThaana</symbol>
+ <symbol file="xmlunicode">xmlUCSIsThai</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTibetan</symbol>
+ <symbol file="xmlunicode">xmlUCSIsUnifiedCanadianAboriginalSyllabics</symbol>
+ <symbol file="xmlunicode">xmlUCSIsYiRadicals</symbol>
+ <symbol file="xmlunicode">xmlUCSIsYiSyllables</symbol>
+ <symbol file="uri">xmlBuildURI</symbol>
+ <symbol file="uri">xmlCreateURI</symbol>
+ <symbol file="uri">xmlFreeURI</symbol>
+ <symbol file="uri">xmlNormalizeURIPath</symbol>
+ <symbol file="uri">xmlParseURI</symbol>
+ <symbol file="uri">xmlParseURIReference</symbol>
+ <symbol file="uri">xmlPrintURI</symbol>
+ <symbol file="uri">xmlSaveUri</symbol>
+ <symbol file="uri">xmlURIEscape</symbol>
+ <symbol file="uri">xmlURIEscapeStr</symbol>
+ <symbol file="uri">xmlURIUnescapeString</symbol>
+ <symbol file="encoding">UTF8Toisolat1</symbol>
+ <symbol file="encoding">isolat1ToUTF8</symbol>
+ <symbol file="encoding">xmlAddEncodingAlias</symbol>
+ <symbol file="encoding">xmlCharEncCloseFunc</symbol>
+ <symbol file="encoding">xmlCharEncFirstLine</symbol>
+ <symbol file="encoding">xmlCharEncInFunc</symbol>
+ <symbol file="encoding">xmlCharEncOutFunc</symbol>
+ <symbol file="xmlstring">xmlCheckUTF8</symbol>
+ <symbol file="encoding">xmlCleanupCharEncodingHandlers</symbol>
+ <symbol file="encoding">xmlCleanupEncodingAliases</symbol>
+ <symbol file="encoding">xmlDelEncodingAlias</symbol>
+ <symbol file="encoding">xmlDetectCharEncoding</symbol>
+ <symbol file="encoding">xmlFindCharEncodingHandler</symbol>
+ <symbol file="encoding">xmlGetCharEncodingHandler</symbol>
+ <symbol file="encoding">xmlGetCharEncodingName</symbol>
+ <symbol file="encoding">xmlGetEncodingAlias</symbol>
+ <symbol file="xmlstring">xmlGetUTF8Char</symbol>
+ <symbol file="encoding">xmlInitCharEncodingHandlers</symbol>
+ <symbol file="encoding">xmlNewCharEncodingHandler</symbol>
+ <symbol file="encoding">xmlParseCharEncoding</symbol>
+ <symbol file="encoding">xmlRegisterCharEncodingHandler</symbol>
+ <symbol file="xmlstring">xmlUTF8Strlen</symbol>
+ <symbol file="xmlstring">xmlUTF8Strloc</symbol>
+ <symbol file="xmlstring">xmlUTF8Strndup</symbol>
+ <symbol file="xmlstring">xmlUTF8Strpos</symbol>
+ <symbol file="xmlstring">xmlUTF8Strsize</symbol>
+ <symbol file="xmlstring">xmlUTF8Strsub</symbol>
+ </release>
+ <release version="2.5.0">
+ <symbol file="globals">xmlDeregisterNodeDefault</symbol>
+ <symbol file="globals">xmlDeregisterNodeDefaultValue</symbol>
+ <symbol file="globals">xmlRegisterNodeDefault</symbol>
+ <symbol file="globals">xmlRegisterNodeDefaultValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderClose</symbol>
+ <symbol file="xmlreader">xmlTextReaderCurrentDoc</symbol>
+ <symbol file="xmlreader">xmlTextReaderCurrentNode</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetAttributeNo</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetAttributeNs</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetAttribute</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetParserProp</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetRemainder</symbol>
+ <symbol file="xmlreader">xmlTextReaderLookupNamespace</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToAttributeNo</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToAttributeNs</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToAttribute</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToElement</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToFirstAttribute</symbol>
+ <symbol file="xmlreader">xmlTextReaderMoveToNextAttribute</symbol>
+ <symbol file="xmlreader">xmlTextReaderNormalization</symbol>
+ <symbol file="xmlreader">xmlTextReaderReadAttributeValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderReadInnerXml</symbol>
+ <symbol file="xmlreader">xmlTextReaderReadOuterXml</symbol>
+ <symbol file="xmlreader">xmlTextReaderReadState</symbol>
+ <symbol file="xmlreader">xmlTextReaderReadString</symbol>
+ <symbol file="xmlreader">xmlTextReaderSetParserProp</symbol>
+ <symbol file="valid">xmlValidatePopElement</symbol>
+ <symbol file="valid">xmlValidatePushCData</symbol>
+ <symbol file="valid">xmlValidatePushElement</symbol>
+ </release>
+ <release version="2.5.2">
+ <symbol file="tree">xmlGetNoNsProp</symbol>
+ <symbol file="HTMLparser">htmlAttrAllowed</symbol>
+ <symbol file="HTMLparser">htmlElementAllowedHere</symbol>
+ <symbol file="HTMLparser">htmlElementStatusHere</symbol>
+ <symbol file="HTMLparser">htmlNodeStatus</symbol>
+ <symbol file="relaxng">xmlRelaxNGCleanupTypes</symbol>
+ <symbol file="relaxng">xmlRelaxNGDump</symbol>
+ <symbol file="relaxng">xmlRelaxNGFreeParserCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGFree</symbol>
+ <symbol file="relaxng">xmlRelaxNGFreeValidCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGNewMemParserCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGNewParserCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGNewValidCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGParse</symbol>
+ <symbol file="relaxng">xmlRelaxNGSetParserErrors</symbol>
+ <symbol file="relaxng">xmlRelaxNGSetValidErrors</symbol>
+ <symbol file="relaxng">xmlRelaxNGValidateDoc</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetErrorHandler</symbol>
+ <symbol file="xmlreader">xmlTextReaderLocatorBaseURI</symbol>
+ <symbol file="xmlreader">xmlTextReaderLocatorLineNumber</symbol>
+ <symbol file="xmlreader">xmlTextReaderSetErrorHandler</symbol>
+ <symbol removed="2.5.5" file="relaxng">xmlRelaxNGValidateStream</symbol>
+ </release>
+ <release version="2.5.4">
+ <symbol file="uri">xmlCanonicPath</symbol>
+ <symbol file="relaxng">xmlRelaxNGDumpTree</symbol>
+ <symbol file="tree">xmlValidateName</symbol>
+ <symbol file="tree">xmlValidateNCName</symbol>
+ <symbol file="tree">xmlValidateNMToken</symbol>
+ <symbol file="tree">xmlValidateQName</symbol>
+ </release>
+ <release version="2.5.5">
+ <symbol file="nanoftp">xmlNanoFTPDele</symbol>
+ </release>
+ <release version="2.5.6">
+ <symbol file="xpath">xmlXPathOrderDocElems</symbol>
+ </release>
+ <release version="2.5.7">
+ <symbol file="HTMLparser">htmlCreateMemoryParserCtxt</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewTransition2</symbol>
+ <symbol file="tree">xmlBuildQName</symbol>
+ <symbol file="xmlmemory">xmlGcMemGet</symbol>
+ <symbol file="xmlmemory">xmlGcMemSetup</symbol>
+ <symbol file="globals">xmlMallocAtomic</symbol>
+ <symbol file="xmlregexp">xmlRegExecPushString2</symbol>
+ <symbol file="relaxng">xmlRelaxNGNewDocParserCtxt</symbol>
+ <symbol file="relaxng">xmlRelaxNGValidateFullElement</symbol>
+ <symbol file="relaxng">xmlRelaxNGValidatePopElement</symbol>
+ <symbol file="relaxng">xmlRelaxNGValidatePushCData</symbol>
+ <symbol file="relaxng">xmlRelaxNGValidatePushElement</symbol>
+ <symbol file="xmlreader">xmlTextReaderExpand</symbol>
+ <symbol file="xmlreader">xmlTextReaderIsValid</symbol>
+ <symbol file="xmlreader">xmlTextReaderNext</symbol>
+ <symbol file="xmlreader">xmlTextReaderRelaxNGSetSchema</symbol>
+ <symbol file="xmlreader">xmlTextReaderRelaxNGValidate</symbol>
+ </release>
+ <release version="2.5.8">
+ <symbol file="globals">xmlCleanupGlobals</symbol>
+ <symbol file="globals">xmlInitGlobals</symbol>
+ <symbol file="valid">xmlFreeValidCtxt</symbol>
+ <symbol file="valid">xmlNewValidCtxt</symbol>
+ <symbol file="schemasInternals">xmlSchemaFreeType</symbol>
+ <symbol file="xmlschemas">xmlSchemaDump</symbol>
+ <symbol file="xmlschemas">xmlSchemaFreeParserCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaFreeValidCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaFree</symbol>
+ <symbol file="xmlschemas">xmlSchemaNewMemParserCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaNewParserCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaNewValidCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaParse</symbol>
+ <symbol file="xmlschemas">xmlSchemaSetParserErrors</symbol>
+ <symbol file="xmlschemas">xmlSchemaSetValidErrors</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateDoc</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateStream</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCheckFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCleanupTypes</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCompareValues</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaFreeFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaFreeValue</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetPredefinedType</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaInitTypes</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaNewFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidateFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidatePredefinedType</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValPredefTypeNode</symbol>
+ <symbol file="globals">xmlThrDefBufferAllocScheme</symbol>
+ <symbol file="globals">xmlThrDefDefaultBufferSize</symbol>
+ <symbol file="globals">xmlThrDefDeregisterNodeDefault</symbol>
+ <symbol file="globals">xmlThrDefDoValidityCheckingDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefGetWarningsDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefIndentTreeOutput</symbol>
+ <symbol file="globals">xmlThrDefKeepBlanksDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefLineNumbersDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefLoadExtDtdDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefParserDebugEntities</symbol>
+ <symbol file="globals">xmlThrDefPedanticParserDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefRegisterNodeDefault</symbol>
+ <symbol file="globals">xmlThrDefSaveNoEmptyTags</symbol>
+ <symbol file="globals">xmlThrDefSetGenericErrorFunc</symbol>
+ <symbol file="globals">xmlThrDefSubstituteEntitiesDefaultValue</symbol>
+ <symbol file="globals">xmlThrDefTreeIndentString</symbol>
+ </release>
+ <release version="2.5.9">
+ <symbol file="xmlmemory">xmlMallocAtomicLoc</symbol>
+ <symbol file="relaxng">xmlRelaxNGGetParserErrors</symbol>
+ <symbol file="relaxng">xmlRelaxNGGetValidErrors</symbol>
+ <symbol file="tree">xmlSplitQName3</symbol>
+ <symbol file="xmlstring">xmlUTF8Charcmp</symbol>
+ <symbol file="xmlstring">xmlUTF8Size</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessTree</symbol>
+ </release>
+ <release version="2.6.0">
+ <symbol file="SAX2">xmlSAX2AttributeDecl</symbol>
+ <symbol file="SAX2">xmlSAX2CDataBlock</symbol>
+ <symbol file="SAX2">xmlSAX2Characters</symbol>
+ <symbol file="SAX2">xmlSAX2Comment</symbol>
+ <symbol file="SAX2">xmlSAX2ElementDecl</symbol>
+ <symbol file="SAX2">xmlSAX2EndDocument</symbol>
+ <symbol file="SAX2">xmlSAX2EndElementNs</symbol>
+ <symbol file="SAX2">xmlSAX2EndElement</symbol>
+ <symbol file="SAX2">xmlSAX2EntityDecl</symbol>
+ <symbol file="SAX2">xmlSAX2ExternalSubset</symbol>
+ <symbol file="SAX2">xmlSAX2GetColumnNumber</symbol>
+ <symbol file="SAX2">xmlSAX2GetEntity</symbol>
+ <symbol file="SAX2">xmlSAX2GetLineNumber</symbol>
+ <symbol file="SAX2">xmlSAX2GetParameterEntity</symbol>
+ <symbol file="SAX2">xmlSAX2GetPublicId</symbol>
+ <symbol file="SAX2">xmlSAX2GetSystemId</symbol>
+ <symbol file="SAX2">xmlSAX2HasExternalSubset</symbol>
+ <symbol file="SAX2">xmlSAX2HasInternalSubset</symbol>
+ <symbol file="SAX2">xmlSAX2IgnorableWhitespace</symbol>
+ <symbol file="SAX2">xmlSAX2InitDefaultSAXHandler</symbol>
+ <symbol file="SAX2">xmlSAX2InitDocbDefaultSAXHandler</symbol>
+ <symbol file="SAX2">xmlSAX2InitHtmlDefaultSAXHandler</symbol>
+ <symbol file="SAX2">xmlSAX2InternalSubset</symbol>
+ <symbol file="SAX2">xmlSAX2IsStandalone</symbol>
+ <symbol file="SAX2">xmlSAX2NotationDecl</symbol>
+ <symbol file="SAX2">xmlSAX2ProcessingInstruction</symbol>
+ <symbol file="SAX2">xmlSAX2Reference</symbol>
+ <symbol file="SAX2">xmlSAX2ResolveEntity</symbol>
+ <symbol file="SAX2">xmlSAX2SetDocumentLocator</symbol>
+ <symbol file="SAX2">xmlSAX2StartDocument</symbol>
+ <symbol file="SAX2">xmlSAX2StartElementNs</symbol>
+ <symbol file="SAX2">xmlSAX2StartElement</symbol>
+ <symbol file="SAX2">xmlSAX2UnparsedEntityDecl</symbol>
+ <symbol file="SAX2">xmlSAXDefaultVersion</symbol>
+ <symbol file="SAX2">xmlSAXVersion</symbol>
+ <symbol file="HTMLparser">htmlCtxtReadDoc</symbol>
+ <symbol file="HTMLparser">htmlCtxtReadFd</symbol>
+ <symbol file="HTMLparser">htmlCtxtReadFile</symbol>
+ <symbol file="HTMLparser">htmlCtxtReadIO</symbol>
+ <symbol file="HTMLparser">htmlCtxtReadMemory</symbol>
+ <symbol file="HTMLparser">htmlCtxtReset</symbol>
+ <symbol file="HTMLparser">htmlCtxtUseOptions</symbol>
+ <symbol file="HTMLparser">htmlReadDoc</symbol>
+ <symbol file="HTMLparser">htmlReadFd</symbol>
+ <symbol file="HTMLparser">htmlReadFile</symbol>
+ <symbol file="HTMLparser">htmlReadIO</symbol>
+ <symbol file="HTMLparser">htmlReadMemory</symbol>
+ <symbol file="tree">xmlBufferCreateStatic</symbol>
+ <symbol file="chvalid">xmlCharInRange</symbol>
+ <symbol file="xmlIO">xmlCheckHTTPInput</symbol>
+ <symbol file="xmlerror">xmlCopyError</symbol>
+ <symbol file="xmlerror">xmlCtxtGetLastError</symbol>
+ <symbol file="xmlerror">xmlGetLastError</symbol>
+ <symbol file="xmlerror">xmlResetError</symbol>
+ <symbol file="xmlerror">xmlResetLastError</symbol>
+ <symbol file="xmlerror">xmlSetStructuredErrorFunc</symbol>
+ <symbol file="parser">xmlCtxtReadDoc</symbol>
+ <symbol file="parser">xmlCtxtReadFd</symbol>
+ <symbol file="parser">xmlCtxtReadFile</symbol>
+ <symbol file="parser">xmlCtxtReadIO</symbol>
+ <symbol file="parser">xmlCtxtReadMemory</symbol>
+ <symbol file="xmlerror">xmlCtxtResetLastError</symbol>
+ <symbol file="parser">xmlCtxtReset</symbol>
+ <symbol file="parser">xmlCtxtUseOptions</symbol>
+ <symbol file="parser">xmlReadDoc</symbol>
+ <symbol file="parser">xmlReadFd</symbol>
+ <symbol file="parser">xmlReadFile</symbol>
+ <symbol file="parser">xmlReadIO</symbol>
+ <symbol file="parser">xmlReadMemory</symbol>
+ <symbol file="xmlstring">xmlStrPrintf</symbol>
+ <symbol file="xmlstring">xmlStrQEqual</symbol>
+ <symbol file="dict">xmlDictCreate</symbol>
+ <symbol file="dict">xmlDictFree</symbol>
+ <symbol file="dict">xmlDictLookup</symbol>
+ <symbol file="dict">xmlDictOwns</symbol>
+ <symbol file="dict">xmlDictQLookup</symbol>
+ <symbol file="dict">xmlDictReference</symbol>
+ <symbol file="dict">xmlDictSize</symbol>
+ <symbol file="parserInternals">xmlErrMemory</symbol>
+ <symbol file="parserInternals">xmlParserMaxDepth</symbol>
+ <symbol file="parserInternals">xmlStringLenDecodeEntities</symbol>
+ <symbol file="parserInternals">xmlSwitchInputEncoding</symbol>
+ <symbol file="xmlwriter">xmlFreeTextWriter</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriterFilename</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriterMemory</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriter</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndAttribute</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndCDATA</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndDocument</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndDTD</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndPI</symbol>
+ <symbol file="xmlwriter">xmlTextWriterFlush</symbol>
+ <symbol file="xmlwriter">xmlTextWriterFullEndElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartAttributeNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartAttribute</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartCDATA</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartDocument</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartDTDAttlist</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartDTDElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartDTDEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartDTD</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartElementNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartPI</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteAttributeNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteAttribute</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteBase64</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteBinHex</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteCDATA</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteComment</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDAttlist</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDExternalEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDInternalEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDNotation</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTD</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteElementNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatAttributeNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatAttribute</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatCDATA</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatComment</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatDTDAttlist</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatDTDElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatDTDInternalEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatDTD</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatElementNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatPI</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatRaw</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteFormatString</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWritePI</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteRawLen</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteRaw</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteString</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatAttributeNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatAttribute</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatCDATA</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatComment</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatDTDAttlist</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatDTDElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatDTDInternalEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatDTD</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatElementNS</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatPI</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatRaw</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteVFormatString</symbol>
+ <symbol file="hash">xmlHashQLookup2</symbol>
+ <symbol file="hash">xmlHashQLookup3</symbol>
+ <symbol file="hash">xmlHashQLookup</symbol>
+ <symbol file="chvalid">xmlIsBaseCharGroup</symbol>
+ <symbol file="chvalid">xmlIsCharGroup</symbol>
+ <symbol file="chvalid">xmlIsCombiningGroup</symbol>
+ <symbol file="chvalid">xmlIsDigitGroup</symbol>
+ <symbol file="chvalid">xmlIsExtenderGroup</symbol>
+ <symbol file="chvalid">xmlIsIdeographicGroup</symbol>
+ <symbol file="chvalid">xmlIsPubidChar_tab</symbol>
+ <symbol file="globals">xmlLastError</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPEncoding</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPMimeType</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPRedir</symbol>
+ <symbol file="tree">xmlNodeBufGetContent</symbol>
+ <symbol file="xmlIO">xmlParserInputBufferCreateStatic</symbol>
+ <symbol file="xmlreader">xmlReaderForDoc</symbol>
+ <symbol file="xmlreader">xmlReaderForFd</symbol>
+ <symbol file="xmlreader">xmlReaderForFile</symbol>
+ <symbol file="xmlreader">xmlReaderForIO</symbol>
+ <symbol file="xmlreader">xmlReaderForMemory</symbol>
+ <symbol file="xmlreader">xmlReaderNewDoc</symbol>
+ <symbol file="xmlreader">xmlReaderNewFd</symbol>
+ <symbol file="xmlreader">xmlReaderNewFile</symbol>
+ <symbol file="xmlreader">xmlReaderNewIO</symbol>
+ <symbol file="xmlreader">xmlReaderNewMemory</symbol>
+ <symbol file="xmlreader">xmlReaderNewWalker</symbol>
+ <symbol file="xmlreader">xmlReaderWalker</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstBaseUri</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstLocalName</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstNamespaceUri</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstName</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstPrefix</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstString</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstXmlLang</symbol>
+ <symbol file="xmlreader">xmlTextReaderNextSibling</symbol>
+ <symbol file="xmlreader">xmlTextReaderPreserve</symbol>
+ <symbol file="globals">xmlStructuredError</symbol>
+ <symbol file="globals">xmlThrDefSetStructuredErrorFunc</symbol>
+ <symbol file="xpathInternals">xmlXPathErr</symbol>
+ <symbol removed="2.6.10" file="SAX2">xmlSAX2CheckNamespace</symbol>
+ <symbol removed="2.6.10" file="SAX2">xmlSAX2GetNamespace</symbol>
+ <symbol removed="2.6.10" file="SAX2">xmlSAX2GlobalNamespace</symbol>
+ <symbol removed="2.6.10" file="SAX2">xmlSAX2NamespaceDecl</symbol>
+ <symbol removed="2.6.10" file="SAX2">xmlSAX2SetNamespace</symbol>
+ </release>
+ <release version="2.6.1">
+ <symbol file="parser">xmlCtxtResetPush</symbol>
+ </release>
+ <release version="2.6.2">
+ <symbol file="parserInternals">xmlCreateURLParserCtxt</symbol>
+ <symbol file="xmlschemas">xmlSchemaNewDocParserCtxt</symbol>
+ <symbol file="xmlstring">xmlStrVPrintf</symbol>
+ <symbol file="xinclude">xmlXIncludeFreeContext</symbol>
+ <symbol file="xinclude">xmlXIncludeNewContext</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessNode</symbol>
+ </release>
+ <release version="2.6.3">
+ <symbol file="pattern">xmlFreePatternList</symbol>
+ <symbol file="pattern">xmlFreePattern</symbol>
+ <symbol file="pattern">xmlPatterncompile</symbol>
+ <symbol file="pattern">xmlPatternMatch</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriterDoc</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriterPushParser</symbol>
+ <symbol file="xmlwriter">xmlNewTextWriterTree</symbol>
+ <symbol file="xmlreader">xmlTextReaderPreservePattern</symbol>
+ <symbol file="xmlunicode">xmlUCSIsAegeanNumbers</symbol>
+ <symbol file="xmlunicode">xmlUCSIsBuhid</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCombiningDiacriticalMarksforSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCypriotSyllabary</symbol>
+ <symbol file="xmlunicode">xmlUCSIsCyrillicSupplement</symbol>
+ <symbol file="xmlunicode">xmlUCSIsGreekandCoptic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsHanunoo</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKatakanaPhoneticExtensions</symbol>
+ <symbol file="xmlunicode">xmlUCSIsKhmerSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLimbu</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLinearBIdeograms</symbol>
+ <symbol file="xmlunicode">xmlUCSIsLinearBSyllabary</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMiscellaneousMathematicalSymbolsA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMiscellaneousMathematicalSymbolsB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsMiscellaneousSymbolsandArrows</symbol>
+ <symbol file="xmlunicode">xmlUCSIsOsmanya</symbol>
+ <symbol file="xmlunicode">xmlUCSIsPhoneticExtensions</symbol>
+ <symbol file="xmlunicode">xmlUCSIsPrivateUseArea</symbol>
+ <symbol file="xmlunicode">xmlUCSIsShavian</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSupplementalArrowsA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSupplementalArrowsB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSupplementalMathematicalOperators</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSupplementaryPrivateUseAreaA</symbol>
+ <symbol file="xmlunicode">xmlUCSIsSupplementaryPrivateUseAreaB</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTagalog</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTagbanwa</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTaiLe</symbol>
+ <symbol file="xmlunicode">xmlUCSIsTaiXuanJingSymbols</symbol>
+ <symbol file="xmlunicode">xmlUCSIsUgaritic</symbol>
+ <symbol file="xmlunicode">xmlUCSIsVariationSelectorsSupplement</symbol>
+ <symbol file="xmlunicode">xmlUCSIsVariationSelectors</symbol>
+ <symbol file="xmlunicode">xmlUCSIsYijingHexagramSymbols</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessFlags</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessTreeFlags</symbol>
+ <symbol file="xinclude">xmlXIncludeSetFlags</symbol>
+ </release>
+ <release version="2.6.5">
+ <symbol file="xmlmemory">xmlCleanupMemory</symbol>
+ <symbol file="dict">xmlDictCreateSub</symbol>
+ <symbol file="relaxng">xmlRelaxParserSetFlag</symbol>
+ <symbol file="xmlstring">xmlStrncatNew</symbol>
+ <symbol file="xmlwriter">xmlTextWriterSetIndentString</symbol>
+ <symbol file="xmlwriter">xmlTextWriterSetIndent</symbol>
+ <symbol file="xpath">xmlXPathCtxtCompile</symbol>
+ </release>
+ <release version="2.6.6">
+ <symbol file="tree">xmlAttrSerializeTxtContent</symbol>
+ <symbol file="parser">xmlByteConsumed</symbol>
+ <symbol file="xmlreader">xmlTextReaderSetStructuredErrorHandler</symbol>
+ </release>
+ <release version="2.6.7">
+ <symbol file="xmlwriter">xmlTextWriterEndComment</symbol>
+ <symbol file="xmlwriter">xmlTextWriterStartComment</symbol>
+ </release>
+ <release version="2.6.8">
+ <symbol file="xmlsave">xmlSaveClose</symbol>
+ <symbol file="xmlsave">xmlSaveDoc</symbol>
+ <symbol file="xmlsave">xmlSaveFlush</symbol>
+ <symbol file="xmlsave">xmlSaveToFd</symbol>
+ <symbol file="xmlsave">xmlSaveToFilename</symbol>
+ <symbol file="xmlsave">xmlSaveToIO</symbol>
+ <symbol file="xmlsave">xmlSaveTree</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndDTDAttlist</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndDTDElement</symbol>
+ <symbol file="xmlwriter">xmlTextWriterEndDTDEntity</symbol>
+ <symbol file="xmlwriter">xmlTextWriterWriteDTDExternalEntityContents</symbol>
+ </release>
+ <release version="2.6.10">
+ <symbol file="xmlIO">xmlOutputBufferWriteEscape</symbol>
+ <symbol file="xmlIO">xmlPopInputCallbacks</symbol>
+ <symbol file="xmlsave">xmlSaveSetAttrEscape</symbol>
+ <symbol file="xmlsave">xmlSaveSetEscape</symbol>
+ </release>
+ <release version="2.6.11">
+ <symbol file="uri">xmlBuildRelativeURI</symbol>
+ <symbol file="globals">xmlOutputBufferCreateFilenameDefault</symbol>
+ <symbol file="globals">xmlOutputBufferCreateFilenameValue</symbol>
+ <symbol file="globals">xmlParserInputBufferCreateFilenameDefault</symbol>
+ <symbol file="globals">xmlParserInputBufferCreateFilenameValue</symbol>
+ <symbol file="globals">xmlThrDefOutputBufferCreateFilenameDefault</symbol>
+ <symbol file="globals">xmlThrDefParserInputBufferCreateFilenameDefault</symbol>
+ <symbol file="schemasInternals">xmlSchemaFreeWildcard</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCollapseString</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetBuiltInListSimpleTypeItemType</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetBuiltInType</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaIsBuiltInTypeFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidateListSimpleTypeFacet</symbol>
+ </release>
+ <release version="2.6.12">
+ <symbol file="parser">xmlParseInNodeContext</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetFacetValueAsULong</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidateLengthFacet</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValPredefTypeNodeNoNorm</symbol>
+ <symbol file="xmlschemas">xmlSchemaGetParserErrors</symbol>
+ <symbol file="xmlschemas">xmlSchemaGetValidErrors</symbol>
+ </release>
+ <release version="2.6.14">
+ <symbol file="xmlautomata">xmlAutomataNewCountTrans2</symbol>
+ <symbol file="xmlautomata">xmlAutomataNewOnceTrans2</symbol>
+ <symbol file="nanohttp">xmlNanoHTTPContentLength</symbol>
+ <symbol file="xmlschemas">xmlSchemaSetValidOptions</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateOneElement</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidCtxtGetOptions</symbol>
+ </release>
+ <release version="2.6.15">
+ <symbol file="debugXML">xmlDebugCheckDocument</symbol>
+ <symbol file="tree">xmlDocCopyNodeList</symbol>
+ <symbol file="tree">xmlNewDocPI</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstEncoding</symbol>
+ <symbol file="xmlreader">xmlTextReaderConstXmlVersion</symbol>
+ <symbol file="xmlreader">xmlTextReaderIsNamespaceDecl</symbol>
+ <symbol file="xmlreader">xmlTextReaderStandalone</symbol>
+ </release>
+ <release version="2.6.16">
+ <symbol file="xmlmemory">xmlMemBlocks</symbol>
+ <symbol file="relaxng">xmlRelaxNGInitTypes</symbol>
+ </release>
+ <release version="2.6.17">
+ <symbol file="dict">xmlDictExists</symbol>
+ <symbol file="xmlmodule">xmlModuleClose</symbol>
+ <symbol file="xmlmodule">xmlModuleFree</symbol>
+ <symbol file="xmlmodule">xmlModuleOpen</symbol>
+ <symbol file="xmlmodule">xmlModuleSymbol</symbol>
+ <symbol file="xmlregexp">xmlRegExecErrInfo</symbol>
+ <symbol file="xmlregexp">xmlRegExecNextValues</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaWhiteSpaceReplace</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetParserColumnNumber</symbol>
+ <symbol file="xmlreader">xmlTextReaderGetParserLineNumber</symbol>
+ </release>
+ <release version="2.6.18">
+ <symbol file="valid">xmlCopyDocElementContent</symbol>
+ <symbol file="valid">xmlFreeDocElementContent</symbol>
+ <symbol file="valid">xmlNewDocElementContent</symbol>
+ <symbol file="dict">xmlDictCleanup</symbol>
+ <symbol file="hash">xmlHashCreateDict</symbol>
+ <symbol file="pattern">xmlFreeStreamCtxt</symbol>
+ <symbol file="pattern">xmlPatternFromRoot</symbol>
+ <symbol file="pattern">xmlPatternGetStreamCtxt</symbol>
+ <symbol file="pattern">xmlPatternMaxDepth</symbol>
+ <symbol file="pattern">xmlPatternStreamable</symbol>
+ <symbol file="pattern">xmlStreamPop</symbol>
+ <symbol file="pattern">xmlStreamPushAttr</symbol>
+ <symbol file="pattern">xmlStreamPush</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCompareValuesWhtsp</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaCopyValue</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetCanonValue</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaNewNOTATIONValue</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaNewStringValue</symbol>
+ <symbol file="xmlreader">xmlTextReaderByteConsumed</symbol>
+ </release>
+ <release version="2.6.19">
+ <symbol file="xmlschemastypes">xmlSchemaGetValType</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidateFacetWhtsp</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValidateLengthFacetWhtsp</symbol>
+ </release>
+ <release version="2.6.20">
+ <symbol file="tree">xmlDOMWrapAdoptNode</symbol>
+ <symbol file="tree">xmlDOMWrapFreeCtxt</symbol>
+ <symbol file="tree">xmlDOMWrapNewCtxt</symbol>
+ <symbol file="tree">xmlDOMWrapReconcileNamespaces</symbol>
+ <symbol file="tree">xmlDOMWrapRemoveNode</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaGetCanonValueWhtsp</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaNewQNameValue</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValueAppend</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValueGetAsBoolean</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValueGetAsString</symbol>
+ <symbol file="xmlschemastypes">xmlSchemaValueGetNext</symbol>
+ <symbol file="xmlschemas">xmlSchemaIsValid</symbol>
+ <symbol file="xmlschemas">xmlSchemaSAXPlug</symbol>
+ <symbol file="xmlschemas">xmlSchemaSAXUnplug</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateFile</symbol>
+ <symbol file="xmlreader">xmlTextReaderSchemaValidate</symbol>
+ <symbol file="xmlreader">xmlTextReaderSetSchema</symbol>
+ </release>
+ <release version="2.6.21">
+ <symbol file="xmlautomata">xmlAutomataNewNegTrans</symbol>
+ <symbol file="xmlregexp">emptyExp</symbol>
+ <symbol file="xmlregexp">forbiddenExp</symbol>
+ <symbol file="xmlregexp">xmlExpCtxtNbCons</symbol>
+ <symbol file="xmlregexp">xmlExpCtxtNbNodes</symbol>
+ <symbol file="xmlregexp">xmlExpDump</symbol>
+ <symbol file="xmlregexp">xmlExpExpDerive</symbol>
+ <symbol file="xmlregexp">xmlExpFreeCtxt</symbol>
+ <symbol file="xmlregexp">xmlExpFree</symbol>
+ <symbol file="xmlregexp">xmlExpGetLanguage</symbol>
+ <symbol file="xmlregexp">xmlExpGetStart</symbol>
+ <symbol file="xmlregexp">xmlExpIsNillable</symbol>
+ <symbol file="xmlregexp">xmlExpMaxToken</symbol>
+ <symbol file="xmlregexp">xmlExpNewAtom</symbol>
+ <symbol file="xmlregexp">xmlExpNewCtxt</symbol>
+ <symbol file="xmlregexp">xmlExpNewOr</symbol>
+ <symbol file="xmlregexp">xmlExpNewRange</symbol>
+ <symbol file="xmlregexp">xmlExpNewSeq</symbol>
+ <symbol file="xmlregexp">xmlExpParse</symbol>
+ <symbol file="xmlregexp">xmlExpRef</symbol>
+ <symbol file="xmlregexp">xmlExpStringDerive</symbol>
+ <symbol file="xmlregexp">xmlExpSubsume</symbol>
+ <symbol file="parser">xmlHasFeature</symbol>
+ <symbol file="uri">xmlParseURIRaw</symbol>
+ <symbol file="pattern">xmlPatternMinDepth</symbol>
+ <symbol file="relaxng">xmlRelaxNGSetValidStructuredErrors</symbol>
+ <symbol file="xmlschemas">xmlSchemaSetValidStructuredErrors</symbol>
+ <symbol file="schematron">xmlSchematronFreeParserCtxt</symbol>
+ <symbol file="schematron">xmlSchematronFree</symbol>
+ <symbol file="schematron">xmlSchematronFreeValidCtxt</symbol>
+ <symbol file="schematron">xmlSchematronNewDocParserCtxt</symbol>
+ <symbol file="schematron">xmlSchematronNewMemParserCtxt</symbol>
+ <symbol file="schematron">xmlSchematronNewParserCtxt</symbol>
+ <symbol file="schematron">xmlSchematronNewValidCtxt</symbol>
+ <symbol file="schematron">xmlSchematronParse</symbol>
+ <symbol file="schematron">xmlSchematronValidateDoc</symbol>
+ </release>
+ <release version="2.6.23">
+ <symbol file="HTMLtree">htmlDocDumpMemoryFormat</symbol>
+ <symbol file="xmlIO">xmlOutputBufferCreateBuffer</symbol>
+ <symbol file="xmlsave" comment="suppressed in 2.6.11, readded in 2.6.23">xmlSaveToBuffer</symbol>
+ <symbol file="xmlschemas">xmlSchemaSetParserStructuredErrors</symbol>
+ <symbol file="pattern">xmlStreamPushNode</symbol>
+ <symbol file="pattern">xmlStreamWantsAnyNode</symbol>
+ <symbol file="xmlreader">xmlTextReaderSchemaValidateCtxt</symbol>
+ </release>
+ <release version="2.6.24">
+ <symbol file="tree">xmlDOMWrapCloneNode</symbol>
+ <symbol file="relaxng">xmlRelaxNGSetParserStructuredErrors</symbol>
+ </release>
+ <release version="2.6.25">
+ <symbol file="xpath">xmlXPathContextSetCache</symbol>
+ </release>
+ <release version="2.6.27">
+ <symbol file="HTMLparser">htmlNewParserCtxt</symbol>
+ <symbol file="uri">xmlPathToURI</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessFlagsData</symbol>
+ <symbol file="xpath">xmlXPathCompiledEvalToBoolean</symbol>
+ </release>
+ <release version="2.6.28">
+ <symbol file="xmlreader">xmlTextReaderSetup</symbol>
+ </release>
+ <release version="2.6.29">
+ <symbol file="threads">xmlDllMain</symbol>
+ </release>
+ <release version="2.6.32">
+ <symbol file="schematron">xmlSchematronSetValidStructuredErrors</symbol>
+ </release>
+ <release version="2.7.0">
+ <symbol file="xmlmemory">xmlMemDisplayLast</symbol>
+ <symbol file="entities">xmlNewEntity</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidCtxtGetParserCtxt</symbol>
+ </release>
+ <release version="2.7.3">
+ <symbol file="tree">xmlChildElementCount</symbol>
+ <symbol file="tree">xmlFirstElementChild</symbol>
+ <symbol file="tree">xmlLastElementChild</symbol>
+ <symbol file="tree">xmlNextElementSibling</symbol>
+ <symbol file="tree">xmlPreviousElementSibling</symbol>
+ </release>
+ <release version="2.7.4">
+ <symbol file="globals">xmlStructuredErrorContext</symbol>
+ <symbol file="xinclude">xmlXIncludeProcessTreeFlagsData</symbol>
+ </release>
+ <release version="2.8.0">
+ <symbol file="xmlreader">xmlTextReaderRelaxNGValidateCtxt</symbol>
+ <symbol file="tree">xmlBufferDetach</symbol>
+ <symbol file="dict">xmlInitializeDict</symbol>
+ </release>
+ <release version="2.9.0">
+ <symbol file="tree">xmlBufContent</symbol>
+ <symbol file="tree">xmlBufEnd</symbol>
+ <symbol file="tree">xmlBufGetNodeContent</symbol>
+ <symbol file="tree">xmlBufNodeDump</symbol>
+ <symbol file="tree">xmlBufShrink</symbol>
+ <symbol file="tree">xmlBufUse</symbol>
+ <symbol file="dict">xmlDictGetUsage</symbol>
+ <symbol file="dict">xmlDictSetLimit</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateSetFilename</symbol>
+ <symbol file="xmlschemas">xmlSchemaValidateSetLocator</symbol>
+ <symbol file="xmlIO">xmlOutputBufferGetContent</symbol>
+ <symbol file="xmlIO">xmlOutputBufferGetSize</symbol>
+ <symbol file="xmlwriter">xmlTextWriterSetQuoteChar</symbol>
+ </release>
+ <release version="2.9.1">
+ <symbol file="xpath">xmlXPathNodeEval</symbol>
+ <symbol file="xpath">xmlXPathSetContextNode</symbol>
+ </release>
+</symbols>
diff --git a/doc/syms.xsl b/doc/syms.xsl
new file mode 100644
index 0000000..ebca88f
--- /dev/null
+++ b/doc/syms.xsl
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+ <xsl:output method="text" encoding="UTF-8"/>
+
+ <xsl:variable name="api" select="document('libxml2-api.xml')"/>
+
+ <xsl:template match="/">
+ <xsl:text>#
+# Officially exported symbols, for which header
+# file definitions are installed in /usr/include/libxml2
+#
+# Automatically generated from symbols.xml and syms.xsl
+#
+# Versions here are *fixed* to match the libxml2 version
+# at which the symbol was introduced. This ensures that
+# a new client app requiring symbol foo() can't accidentally
+# run with old libxml2.so not providing foo() - the global
+# soname version info can't enforce this since we never
+# change the soname
+#
+
+</xsl:text>
+ <xsl:apply-templates select="/symbols/release"/>
+ </xsl:template>
+
+ <xsl:template match="release">
+ <xsl:variable name="prev"
+ select="preceding-sibling::release[position()=1]"/>
+ <xsl:text>LIBXML2_</xsl:text>
+ <xsl:value-of select="string(@version)"/>
+ <xsl:text> {
+ global:
+</xsl:text>
+ <xsl:for-each select="symbol">
+ <xsl:if test="string(preceding-sibling::symbol[position()=1]/@file) != string(@file)">
+ <xsl:text>
+# </xsl:text>
+ <xsl:value-of select="@file"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+
+ <xsl:text>} </xsl:text>
+ <xsl:if test="$prev">
+ <xsl:text>LIBXML2_</xsl:text>
+ <xsl:value-of select="$prev/@version"/>
+ </xsl:if>
+ <xsl:text>;
+
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="symbol">
+ <xsl:variable name="name" select="string(.)"/>
+ <xsl:variable name="file" select="string(@file)"/>
+ <xsl:choose>
+ <xsl:when test="@removed">
+ <xsl:text># </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>; removed in </xsl:text>
+ <xsl:value-of select="@removed"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- make sure we can find that symbol exported from the API list -->
+ <xsl:variable name="def"
+ select="$api/api/files/file[@name = $file]/exports[@symbol = $name]"/>
+ <xsl:if test="string($def/@symbol) != $name">
+ <xsl:message terminate="yes">
+ <xsl:text>Failed to find definition in libxml2-api.xml:</xsl:text>
+ <xsl:value-of select="$name"/>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>;</xsl:text>
+ <xsl:if test="$def/@type = 'variable'">
+ <xsl:text> # variable</xsl:text>
+ </xsl:if>
+ <xsl:if test="@comment">
+ <xsl:text># </xsl:text>
+ <xsl:value-of select="@comment"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/doc/threads.html b/doc/threads.html
new file mode 100644
index 0000000..f7ac957
--- /dev/null
+++ b/doc/threads.html
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Thread safety</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Thread safety</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent
+threads can safely work in parallel parsing different documents. There is
+however a couple of things to do to ensure it:</p><ul>
+ <li>configure the library accordingly using the --with-threads options</li>
+ <li>call xmlInitParser() in the "main" thread before using any of the
+ libxml2 API (except possibly selecting a different memory allocator)</li>
+</ul><p>Note that the thread safety cannot be ensured for multiple threads sharing
+the same document, the locking must be done at the application level, libxml
+exports a basic mutex and reentrant mutexes API in &lt;libxml/threads.h&gt;.
+The parts of the library checked for thread safety are:</p><ul>
+ <li>concurrent loading</li>
+ <li>file access resolution</li>
+ <li>catalog access</li>
+ <li>catalog building</li>
+ <li>entities lookup/accesses</li>
+ <li>validation</li>
+ <li>global variables per-thread override</li>
+ <li>memory handling</li>
+</ul><p>XPath has been tested for threaded usage on non-modified document
+ for example when using libxslt, but make 100% sure the documents
+ are accessed read-only !</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/tree.html b/doc/tree.html
new file mode 100644
index 0000000..3d289d8
--- /dev/null
+++ b/doc/tree.html
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>The tree output</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>The tree output</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The parser returns a tree built during the document analysis. The value
+returned is an <strong>xmlDocPtr</strong> (i.e., a pointer to an
+<strong>xmlDoc</strong> structure). This structure contains information such
+as the file name, the document type, and a <strong>children</strong> pointer
+which is the root of the document (or more exactly the first child under the
+root which is the document). The tree is made of <strong>xmlNode</strong>s,
+chained in double-linked lists of siblings and with a children&lt;-&gt;parent
+relationship. An xmlNode can also carry properties (a chain of xmlAttr
+structures). An attribute may have a value which is a list of TEXT or
+ENTITY_REF nodes.</p><p>Here is an example (erroneous with respect to the XML spec since there
+should be only one ELEMENT under the root):</p><p><img src="structure.gif" alt=" structure.gif " /></p><p>In the source package there is a small program (not installed by default)
+called <strong>xmllint</strong> which parses XML files given as argument and
+prints them back as parsed. This is useful for detecting errors both in XML
+code and in the XML parser itself. It has an option <strong>--debug</strong>
+which prints the actual in-memory structure of the document; here is the
+result with the <a href="#example">example</a> given before:</p><pre>DOCUMENT
+version=1.0
+standalone=true
+ ELEMENT EXAMPLE
+ ATTRIBUTE prop1
+ TEXT
+ content=gnome is great
+ ATTRIBUTE prop2
+ ENTITY_REF
+ TEXT
+ content= linux too
+ ELEMENT head
+ ELEMENT title
+ TEXT
+ content=Welcome to Gnome
+ ELEMENT chapter
+ ELEMENT title
+ TEXT
+ content=The Linux adventure
+ ELEMENT p
+ TEXT
+ content=bla bla bla ...
+ ELEMENT image
+ ATTRIBUTE href
+ TEXT
+ content=linus.gif
+ ELEMENT p
+ TEXT
+ content=...</pre><p>This should be useful for learning the internal representation model.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/tutorial/apa.html b/doc/tutorial/apa.html
new file mode 100644
index 0000000..964e15f
--- /dev/null
+++ b/doc/tutorial/apa.html
@@ -0,0 +1,8 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>A. Compilation</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s09.html" title="Encoding Conversion"><link rel="next" href="apb.html" title="B. Sample Document"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">A. Compilation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s09.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apb.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="compilation"></a>A. Compilation</h2></div></div><div></div></div><p><a class="indexterm" name="id2587670"></a>
+ <span class="application">Libxml</span> includes a script,
+ <span class="application">xml2-config</span>, that can be used to generate
+ flags for compilation and linking of programs written with the
+ library. For pre-processor and compiler flags, use <b class="command">xml2-config
+ --cflags</b>. For library linking flags, use <b class="command">xml2-config
+ --libs</b>. Other options are available using <b class="command">xml2-config
+ --help</b>.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Encoding Conversion </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> B. Sample Document</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apb.html b/doc/tutorial/apb.html
new file mode 100644
index 0000000..ef14066
--- /dev/null
+++ b/doc/tutorial/apb.html
@@ -0,0 +1,14 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>B. Sample Document</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apa.html" title="A. Compilation"><link rel="next" href="apc.html" title="C. Code for Keyword Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">B. Sample Document</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apa.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apc.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="sampledoc"></a>B. Sample Document</h2></div></div><div></div></div><pre class="programlisting">
+&lt;?xml version="1.0"?&gt;
+&lt;story&gt;
+ &lt;storyinfo&gt;
+ &lt;author&gt;John Fleck&lt;/author&gt;
+ &lt;datewritten&gt;June 2, 2002&lt;/datewritten&gt;
+ &lt;keyword&gt;example keyword&lt;/keyword&gt;
+ &lt;/storyinfo&gt;
+ &lt;body&gt;
+ &lt;headline&gt;This is the headline&lt;/headline&gt;
+ &lt;para&gt;This is the body text.&lt;/para&gt;
+ &lt;/body&gt;
+&lt;/story&gt;
+</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apa.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">A. Compilation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> C. Code for Keyword Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apc.html b/doc/tutorial/apc.html
new file mode 100644
index 0000000..f8d9911
--- /dev/null
+++ b/doc/tutorial/apc.html
@@ -0,0 +1,82 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>C. Code for Keyword Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apb.html" title="B. Sample Document"><link rel="next" href="apd.html" title="D. Code for XPath Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">C. Code for Keyword Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apd.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="keywordappendix"></a>C. Code for Keyword Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;libxml/xmlmemory.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *key;
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"keyword"))) {
+ key = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ printf("keyword: %s\n", key);
+ xmlFree(key);
+ }
+ cur = cur-&gt;next;
+ }
+ return;
+}
+
+static void
+parseDoc(char *docname) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
+ parseStory (doc, cur);
+ }
+
+ cur = cur-&gt;next;
+ }
+
+ xmlFreeDoc(doc);
+ return;
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+
+ if (argc &lt;= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ parseDoc (docname);
+
+ return (1);
+}
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apd.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">B. Sample Document </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> D. Code for XPath Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apd.html b/doc/tutorial/apd.html
new file mode 100644
index 0000000..8f9618d
--- /dev/null
+++ b/doc/tutorial/apd.html
@@ -0,0 +1,76 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D. Code for XPath Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apc.html" title="C. Code for Keyword Example"><link rel="next" href="ape.html" title="E. Code for Add Keyword Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">D. Code for XPath Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apc.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ape.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="xpathappendix"></a>D. Code for XPath Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;libxml/parser.h&gt;
+#include &lt;libxml/xpath.h&gt;
+
+xmlDocPtr
+getdoc (char *docname) {
+ xmlDocPtr doc;
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return NULL;
+ }
+
+ return doc;
+}
+
+xmlXPathObjectPtr
+getnodeset (xmlDocPtr doc, xmlChar *xpath){
+
+ xmlXPathContextPtr context;
+ xmlXPathObjectPtr result;
+
+ context = xmlXPathNewContext(doc);
+ if (context == NULL) {
+ printf("Error in xmlXPathNewContext\n");
+ return NULL;
+ }
+ result = xmlXPathEvalExpression(xpath, context);
+ xmlXPathFreeContext(context);
+ if (result == NULL) {
+ printf("Error in xmlXPathEvalExpression\n");
+ return NULL;
+ }
+ if(xmlXPathNodeSetIsEmpty(result-&gt;nodesetval)){
+ xmlXPathFreeObject(result);
+ printf("No result\n");
+ return NULL;
+ }
+ return result;
+}
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ xmlDocPtr doc;
+ xmlChar *xpath = (xmlChar*) "//keyword";
+ xmlNodeSetPtr nodeset;
+ xmlXPathObjectPtr result;
+ int i;
+ xmlChar *keyword;
+
+ if (argc &lt;= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ doc = getdoc(docname);
+ result = getnodeset (doc, xpath);
+ if (result) {
+ nodeset = result-&gt;nodesetval;
+ for (i=0; i &lt; nodeset-&gt;nodeNr; i++) {
+ keyword = xmlNodeListGetString(doc, nodeset-&gt;nodeTab[i]-&gt;xmlChildrenNode, 1);
+ printf("keyword: %s\n", keyword);
+ xmlFree(keyword);
+ }
+ xmlXPathFreeObject (result);
+ }
+ xmlFreeDoc(doc);
+ xmlCleanupParser();
+ return (1);
+}
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ape.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">C. Code for Keyword Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> E. Code for Add Keyword Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ape.html b/doc/tutorial/ape.html
new file mode 100644
index 0000000..200319a
--- /dev/null
+++ b/doc/tutorial/ape.html
@@ -0,0 +1,78 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>E. Code for Add Keyword Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apd.html" title="D. Code for XPath Example"><link rel="next" href="apf.html" title="F. Code for Add Attribute Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">E. Code for Add Keyword Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apd.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apf.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="addkeywordappendix"></a>E. Code for Add Keyword Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;libxml/xmlmemory.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {
+
+ xmlNewTextChild (cur, NULL, "keyword", keyword);
+ return;
+}
+
+xmlDocPtr
+parseDoc(char *docname, char *keyword) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return (NULL);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
+ parseStory (doc, cur, keyword);
+ }
+
+ cur = cur-&gt;next;
+ }
+ return(doc);
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ char *keyword;
+ xmlDocPtr doc;
+
+ if (argc &lt;= 2) {
+ printf("Usage: %s docname, keyword\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ keyword = argv[2];
+ doc = parseDoc (docname, keyword);
+ if (doc != NULL) {
+ xmlSaveFormatFile (docname, doc, 0);
+ xmlFreeDoc(doc);
+ }
+
+ return (1);
+}
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apd.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apf.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">D. Code for XPath Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> F. Code for Add Attribute Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apf.html b/doc/tutorial/apf.html
new file mode 100644
index 0000000..4848cdb
--- /dev/null
+++ b/doc/tutorial/apf.html
@@ -0,0 +1,67 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>F. Code for Add Attribute Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ape.html" title="E. Code for Add Keyword Example"><link rel="next" href="apg.html" title="G. Code for Retrieving Attribute Value Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">F. Code for Add Attribute Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ape.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apg.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="addattributeappendix"></a>F. Code for Add Attribute Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;libxml/xmlmemory.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+
+xmlDocPtr
+parseDoc(char *docname, char *uri) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ xmlNodePtr newnode;
+ xmlAttrPtr newattr;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return (NULL);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
+ newattr = xmlNewProp (newnode, "uri", uri);
+ return(doc);
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ char *uri;
+ xmlDocPtr doc;
+
+ if (argc &lt;= 2) {
+ printf("Usage: %s docname, uri\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ uri = argv[2];
+ doc = parseDoc (docname, uri);
+ if (doc != NULL) {
+ xmlSaveFormatFile (docname, doc, 1);
+ xmlFreeDoc(doc);
+ }
+ return (1);
+}
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ape.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apg.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">E. Code for Add Keyword Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> G. Code for Retrieving Attribute Value Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/apg.html b/doc/tutorial/apg.html
new file mode 100644
index 0000000..fffa0ee
--- /dev/null
+++ b/doc/tutorial/apg.html
@@ -0,0 +1,75 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>G. Code for Retrieving Attribute Value Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apf.html" title="F. Code for Add Attribute Example"><link rel="next" href="aph.html" title="H. Code for Encoding Conversion Example"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">G. Code for Retrieving Attribute Value Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apf.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="aph.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="getattributeappendix"></a>G. Code for Retrieving Attribute Value Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;libxml/xmlmemory.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+void
+getReference (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *uri;
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"reference"))) {
+ uri = xmlGetProp(cur, "uri");
+ printf("uri: %s\n", uri);
+ xmlFree(uri);
+ }
+ cur = cur-&gt;next;
+ }
+ return;
+}
+
+
+void
+parseDoc(char *docname) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ getReference (doc, cur);
+ xmlFreeDoc(doc);
+ return;
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+
+ if (argc &lt;= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ parseDoc (docname);
+
+ return (1);
+}
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apf.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="aph.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">F. Code for Add Attribute Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> H. Code for Encoding Conversion Example</td></tr></table></div></body></html>
diff --git a/doc/tutorial/aph.html b/doc/tutorial/aph.html
new file mode 100644
index 0000000..ef46605
--- /dev/null
+++ b/doc/tutorial/aph.html
@@ -0,0 +1,76 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>H. Code for Encoding Conversion Example</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="apg.html" title="G. Code for Retrieving Attribute Value Example"><link rel="next" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">H. Code for Encoding Conversion Example</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="convertappendix"></a>H. Code for Encoding Conversion Example</h2></div></div><div></div></div><p>
+ </p><pre class="programlisting">
+#include &lt;string.h&gt;
+#include &lt;libxml/parser.h&gt;
+
+
+unsigned char*
+convert (unsigned char *in, char *encoding)
+{
+ unsigned char *out;
+ int ret,size,out_size,temp;
+ xmlCharEncodingHandlerPtr handler;
+
+ size = (int)strlen(in)+1;
+ out_size = size*2-1;
+ out = malloc((size_t)out_size);
+
+ if (out) {
+ handler = xmlFindCharEncodingHandler(encoding);
+
+ if (!handler) {
+ free(out);
+ out = NULL;
+ }
+ }
+ if (out) {
+ temp=size-1;
+ ret = handler-&gt;input(out, &amp;out_size, in, &amp;temp);
+ if (ret || temp-size+1) {
+ if (ret) {
+ printf("conversion wasn't successful.\n");
+ } else {
+ printf("conversion wasn't successful. converted: %i octets.\n",temp);
+ }
+ free(out);
+ out = NULL;
+ } else {
+ out = realloc(out,out_size+1);
+ out[out_size]=0; /*null terminating out*/
+
+ }
+ } else {
+ printf("no mem\n");
+ }
+ return (out);
+}
+
+
+int
+main(int argc, char **argv) {
+
+ unsigned char *content, *out;
+ xmlDocPtr doc;
+ xmlNodePtr rootnode;
+ char *encoding = "ISO-8859-1";
+
+
+ if (argc &lt;= 1) {
+ printf("Usage: %s content\n", argv[0]);
+ return(0);
+ }
+
+ content = argv[1];
+
+ out = convert(content, encoding);
+
+ doc = xmlNewDoc ("1.0");
+ rootnode = xmlNewDocNode(doc, NULL, (const xmlChar*)"root", out);
+ xmlDocSetRootElement(doc, rootnode);
+
+ xmlSaveFormatFileEnc("-", doc, encoding, 1);
+ return (1);
+}
+
+</pre><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apg.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">G. Code for Retrieving Attribute Value Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> I. Acknowledgements</td></tr></table></div></body></html>
diff --git a/doc/tutorial/api.html b/doc/tutorial/api.html
new file mode 100644
index 0000000..16e7981
--- /dev/null
+++ b/doc/tutorial/api.html
@@ -0,0 +1,4 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>I. Acknowledgements</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="aph.html" title="H. Code for Encoding Conversion Example"><link rel="next" href="ix01.html" title="Index"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">I. Acknowledgements</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="aph.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ix01.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2588597"></a>I. Acknowledgements</h2></div></div><div></div></div><p>A number of people have generously offered feedback, code and
+ suggested improvements to this tutorial. In no particular order:
+ <span class="simplelist">Daniel Veillard, Marcus Labib Iskander, Christopher R. Harris, Igor Zlatkovic, Niraj Tolia, David Turover</span>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="aph.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ix01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">H. Code for Encoding Conversion Example </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Index</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s02.html b/doc/tutorial/ar01s02.html
new file mode 100644
index 0000000..1e30a98
--- /dev/null
+++ b/doc/tutorial/ar01s02.html
@@ -0,0 +1,14 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Data Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="index.html" title="Libxml Tutorial"><link rel="next" href="ar01s03.html" title="Parsing the file"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Data Types</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s03.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialdatatypes"></a>Data Types</h2></div></div><div></div></div><p><span class="application">Libxml</span> declares a number of data types we
+ will encounter repeatedly, hiding the messy stuff so you do not have to deal
+ with it unless you have some specific need.</p><p>
+ </p><div class="variablelist"><dl><dt><span class="term"><a class="indexterm" name="id2526186"></a>
+<a href="http://xmlsoft.org/html/libxml-tree.html#XMLCHAR" target="_top">xmlChar</a></span></dt><dd><p>A basic replacement for char, a byte in a UTF-8 encoded
+ string. If your data uses another encoding, it must be converted to
+ UTF-8 for use with <span class="application">libxml's</span>
+ functions. More information on encoding is available on the <a href="http://www.xmlsoft.org/encoding.html" target="_top"><span class="application">libxml</span> encoding support web page</a>.</p></dd><dt><span class="term"><a class="indexterm" name="id2526232"></a>
+ <a href="http://xmlsoft.org/html/libxml-tree.html#XMLDOC" target="_top">xmlDoc</a></span></dt><dd><p>A structure containing the tree created by a parsed doc. <a href="http://xmlsoft.org/html/libxml-tree.html#XMLDOCPTR" target="_top">xmlDocPtr</a>
+ is a pointer to the structure.</p></dd><dt><span class="term"><a class="indexterm" name="id2526266"></a>
+<a href="http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR" target="_top">xmlNodePtr</a>
+ and <a href="http://xmlsoft.org/html/libxml-tree.html#XMLNODE" target="_top">xmlNode</a></span></dt><dd><p>A structure containing a single node. <a href="http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR" target="_top">xmlNodePtr</a>
+ is a pointer to the structure, and is used in traversing the document tree.</p></dd></dl></div><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Libxml Tutorial </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Parsing the file</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s03.html b/doc/tutorial/ar01s03.html
new file mode 100644
index 0000000..cd28fff
--- /dev/null
+++ b/doc/tutorial/ar01s03.html
@@ -0,0 +1,47 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Parsing the file</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s02.html" title="Data Types"><link rel="next" href="ar01s04.html" title="Retrieving Element Content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Parsing the file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s04.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialparsing"></a>Parsing the file</h2></div></div><div></div></div><p><a class="indexterm" name="fileparsing"></a>
+Parsing the file requires only the name of the file and a single
+ function call, plus error checking. Full code: <a href="apc.html" title="C. Code for Keyword Example">Appendix C, <i>Code for Keyword Example</i></a></p><p>
+ </p><pre class="programlisting">
+ <a name="declaredoc"></a><img src="images/callouts/1.png" alt="1" border="0"> xmlDocPtr doc;
+ <a name="declarenode"></a><img src="images/callouts/2.png" alt="2" border="0"> xmlNodePtr cur;
+
+ <a name="parsefile"></a><img src="images/callouts/3.png" alt="3" border="0"> doc = xmlParseFile(docname);
+
+ <a name="checkparseerror"></a><img src="images/callouts/4.png" alt="4" border="0"> if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return;
+ }
+
+ <a name="getrootelement"></a><img src="images/callouts/5.png" alt="5" border="0"> cur = xmlDocGetRootElement(doc);
+
+ <a name="checkemptyerror"></a><img src="images/callouts/6.png" alt="6" border="0"> if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ <a name="checkroottype"></a><img src="images/callouts/7.png" alt="7" border="0"> if (xmlStrcmp(cur-&gt;name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#declaredoc"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Declare the pointer that will point to your parsed document.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#declarenode"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Declare a node pointer (you'll need this in order to
+ interact with individual nodes).</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkparseerror"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>Check to see that the document was successfully parsed. If it
+ was not, <span class="application">libxml</span> will at this point
+ register an error and stop.
+ </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p><a class="indexterm" name="id2525337"></a>
+One common example of an error at this point is improper
+ handling of encoding. The <span class="acronym">XML</span> standard requires
+ documents stored with an encoding other than UTF-8 or UTF-16 to
+ contain an explicit declaration of their encoding. If the
+ declaration is there, <span class="application">libxml</span> will
+ automatically perform the necessary conversion to UTF-8 for
+ you. More information on <span class="acronym">XML's</span> encoding
+ requirements is contained in the <a href="http://www.w3.org/TR/REC-xml#charencoding" target="_top">standard</a>.</p></td></tr></table></div><p>
+ </p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#getrootelement"><img src="images/callouts/5.png" alt="5" border="0"></a> </td><td valign="top" align="left"><p>Retrieve the document's root element.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkemptyerror"><img src="images/callouts/6.png" alt="6" border="0"></a> </td><td valign="top" align="left"><p>Check to make sure the document actually contains something.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#checkroottype"><img src="images/callouts/7.png" alt="7" border="0"></a> </td><td valign="top" align="left"><p>In our case, we need to make sure the document is the right
+ type. "story" is the root type of the documents used in this
+ tutorial.</p></td></tr></table></div><p>
+ <a class="indexterm" name="id2525415"></a>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Data Types </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Retrieving Element Content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s04.html b/doc/tutorial/ar01s04.html
new file mode 100644
index 0000000..11492eb
--- /dev/null
+++ b/doc/tutorial/ar01s04.html
@@ -0,0 +1,54 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Retrieving Element Content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s03.html" title="Parsing the file"><link rel="next" href="ar01s05.html" title="Using XPath to Retrieve Element Content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Retrieving Element Content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialgettext"></a>Retrieving Element Content</h2></div></div><div></div></div><p><a class="indexterm" name="id2525439"></a>
+Retrieving the content of an element involves traversing the document
+ tree until you find what you are looking for. In this case, we are looking
+ for an element called "keyword" contained within element called "story". The
+ process to find the node we are interested in involves tediously walking the
+ tree. We assume you already have an xmlDocPtr called <tt class="varname">doc</tt>
+ and an xmlNodPtr called <tt class="varname">cur</tt>.</p><p>
+ </p><pre class="programlisting">
+ <a name="getchildnode"></a><img src="images/callouts/1.png" alt="1" border="0">cur = cur-&gt;xmlChildrenNode;
+ <a name="huntstoryinfo"></a><img src="images/callouts/2.png" alt="2" border="0">while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"storyinfo"))){
+ parseStory (doc, cur);
+ }
+
+ cur = cur-&gt;next;
+ }
+ </pre><p>
+
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#getchildnode"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Get the first child node of <tt class="varname">cur</tt>. At this
+ point, <tt class="varname">cur</tt> points at the document root, which is
+ the element "story".</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#huntstoryinfo"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>This loop iterates through the elements that are children of
+ "story", looking for one called "storyinfo". That
+ is the element that will contain the "keywords" we are
+ looking for. It uses the <span class="application">libxml</span> string
+ comparison
+ function, <tt class="function"><a href="http://xmlsoft.org/html/libxml-parser.html#XMLSTRCMP" target="_top">xmlStrcmp</a></tt>. If there is a match, it calls the function <tt class="function">parseStory</tt>.</p></td></tr></table></div><p>
+ </p><p>
+ </p><pre class="programlisting">
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *key;
+ <a name="anothergetchild"></a><img src="images/callouts/1.png" alt="1" border="0"> cur = cur-&gt;xmlChildrenNode;
+ <a name="findkeyword"></a><img src="images/callouts/2.png" alt="2" border="0"> while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"keyword"))) {
+ <a name="foundkeyword"></a><img src="images/callouts/3.png" alt="3" border="0"> key = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ printf("keyword: %s\n", key);
+ xmlFree(key);
+ }
+ cur = cur-&gt;next;
+ }
+ return;
+}
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#anothergetchild"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>Again we get the first child node.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#findkeyword"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Like the loop above, we then iterate through the nodes, looking
+ for one that matches the element we're interested in, in this case
+ "keyword".</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#foundkeyword"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p>When we find the "keyword" element, we need to print
+ its contents. Remember that in <span class="acronym">XML</span>, the text
+ contained within an element is a child node of that element, so we
+ turn to <tt class="varname">cur-&gt;xmlChildrenNode</tt>. To retrieve it, we
+ use the function <tt class="function"><a href="http://xmlsoft.org/html/libxml-tree.html#XMLNODELISTGETSTRING" target="_top">xmlNodeListGetString</a></tt>, which also takes the <tt class="varname">doc</tt> pointer as an argument. In this case, we just print it out.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>Because <tt class="function">xmlNodeListGetString</tt> allocates
+ memory for the string it returns, you must use
+ <tt class="function">xmlFree</tt> to free it.</p></td></tr></table></div></td></tr></table></div><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Parsing the file </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Using XPath to Retrieve Element Content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s05.html b/doc/tutorial/ar01s05.html
new file mode 100644
index 0000000..1c40925
--- /dev/null
+++ b/doc/tutorial/ar01s05.html
@@ -0,0 +1,55 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Using XPath to Retrieve Element Content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s04.html" title="Retrieving Element Content"><link rel="next" href="ar01s06.html" title="Writing element content"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Using XPath to Retrieve Element Content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialxpath"></a>Using XPath to Retrieve Element Content</h2></div></div><div></div></div><p>In addition to walking the document tree to find an element,
+ <span class="application">Libxml2</span> includes support for
+ use of <span class="application">XPath</span> expressions to retrieve sets of
+ nodes that match a specified criteria. Full documentation of the
+ <span class="application">XPath</span> <span class="acronym">API</span> is <a href="http://xmlsoft.org/html/libxml-xpath.html" target="_top">here</a>.
+ </p><p><span class="application">XPath</span> allows searching through a document
+ for nodes that match specified criteria. In the example below we search
+ through a document for the contents of all <tt class="varname">keyword</tt>
+ elements.
+ </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>A full discussion of <span class="application">XPath</span> is beyond
+ the scope of this document. For details on its use, see the <a href="http://www.w3.org/TR/xpath" target="_top">XPath specification</a>.</p></td></tr></table></div><p>
+ Full code for this example is at <a href="apd.html" title="D. Code for XPath Example">Appendix D, <i>Code for XPath Example</i></a>.
+ </p><p>Using <span class="application">XPath</span> requires setting up an
+ xmlXPathContext and then supplying the <span class="application">XPath</span>
+ expression and the context to the
+ <tt class="function">xmlXPathEvalExpression</tt> function. The function returns
+ an xmlXPathObjectPtr, which includes the set of nodes satisfying the
+ <span class="application">XPath</span> expression.</p><p>
+ </p><pre class="programlisting">
+ xmlXPathObjectPtr
+ getnodeset (xmlDocPtr doc, xmlChar *xpath){
+
+ <a name="cocontext"></a><img src="images/callouts/1.png" alt="1" border="0">xmlXPathContextPtr context;
+ xmlXPathObjectPtr result;
+
+ <a name="cocreatecontext"></a><img src="images/callouts/2.png" alt="2" border="0">context = xmlXPathNewContext(doc);
+ <a name="corunxpath"></a><img src="images/callouts/3.png" alt="3" border="0">result = xmlXPathEvalExpression(xpath, context);
+ <a name="cocheckxpathresult"></a><img src="images/callouts/4.png" alt="4" border="0">if(xmlXPathNodeSetIsEmpty(result-&gt;nodesetval)){
+ xmlXPathFreeObject(result);
+ printf("No result\n");
+ return NULL;
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#cocontext"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>First we declare our variables.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#cocreatecontext"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Initialize the <tt class="varname">context</tt> variable.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#corunxpath"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p>Apply the <span class="application">XPath</span> expression.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#cocheckxpathresult"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>Check the result and free the memory allocated to
+ <tt class="varname">result</tt> if no result is found.</p></td></tr></table></div><p>
+ </p><p>The xmlPathObjectPtr returned by the function contains a set of nodes
+ and other information needed to iterate through the set and act on the
+ results. For this example, our functions returns the
+ <tt class="varname">xmlXPathObjectPtr</tt>. We use it to print the contents of
+ <tt class="varname">keyword</tt> nodes in our document. The node set object
+ includes the number of elements in the set (<tt class="varname">nodeNr</tt>) and
+ an array of nodes (<tt class="varname">nodeTab</tt>):
+ </p><pre class="programlisting">
+ <a name="conodesetcounter"></a><img src="images/callouts/1.png" alt="1" border="0">for (i=0; i &lt; nodeset-&gt;nodeNr; i++) {
+ <a name="coprintkeywords"></a><img src="images/callouts/2.png" alt="2" border="0">keyword = xmlNodeListGetString(doc, nodeset-&gt;nodeTab[i]-&gt;xmlChildrenNode, 1);
+ printf("keyword: %s\n", keyword);
+ xmlFree(keyword);
+ }
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#conodesetcounter"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>The value of <tt class="varname">nodeset-&gt;Nr</tt> holds the number of
+ elements in the node set. Here we use it to iterate through the array.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#coprintkeywords"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>Here we print the contents of each of the nodes returned.
+ </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>Note that we are printing the child node of the node that is
+ returned, because the contents of the <tt class="varname">keyword</tt>
+ element are a child text node.</p></td></tr></table></div><p>
+ </p></td></tr></table></div><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Retrieving Element Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing element content</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s06.html b/doc/tutorial/ar01s06.html
new file mode 100644
index 0000000..c09e6ef
--- /dev/null
+++ b/doc/tutorial/ar01s06.html
@@ -0,0 +1,35 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Writing element content</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s05.html" title="Using XPath to Retrieve Element Content"><link rel="next" href="ar01s07.html" title="Writing Attribute"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing element content</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialwritingcontent"></a>Writing element content</h2></div></div><div></div></div><p><a class="indexterm" name="id2586968"></a>
+ Writing element content uses many of the same steps we used above
+ &#8212; parsing the document and walking the tree. We parse the document,
+ then traverse the tree to find the place we want to insert our element. For
+ this example, we want to again find the "storyinfo" element and
+ this time insert a keyword. Then we'll write the file to disk. Full code:
+ <a href="ape.html" title="E. Code for Add Keyword Example">Appendix E, <i>Code for Add Keyword Example</i></a></p><p>
+ The main difference in this example is in
+ <tt class="function">parseStory</tt>:
+
+ </p><pre class="programlisting">
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {
+
+ <a name="addkeyword"></a><img src="images/callouts/1.png" alt="1" border="0"> xmlNewTextChild (cur, NULL, "keyword", keyword);
+ return;
+}
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#addkeyword"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>The <tt class="function"><a href="http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD" target="_top">xmlNewTextChild</a></tt>
+ function adds a new child element at the
+ current node pointer's location in the
+ tree, specified by <tt class="varname">cur</tt>.</p></td></tr></table></div><p>
+ </p><p>
+ <a class="indexterm" name="id2587052"></a>
+ Once the node has been added, we would like to write the document to
+ file. Is you want the element to have a namespace, you can add it here as
+ well. In our case, the namespace is NULL.
+ </p><pre class="programlisting">
+ xmlSaveFormatFile (docname, doc, 1);
+ </pre><p>
+ The first parameter is the name of the file to be written. You'll notice
+ it is the same as the file we just read. In this case, we just write over
+ the old file. The second parameter is a pointer to the xmlDoc
+ structure. Setting the third parameter equal to one ensures indenting on output.
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Using XPath to Retrieve Element Content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Writing Attribute</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s07.html b/doc/tutorial/ar01s07.html
new file mode 100644
index 0000000..fd5c4dd
--- /dev/null
+++ b/doc/tutorial/ar01s07.html
@@ -0,0 +1,30 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Writing Attribute</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s06.html" title="Writing element content"><link rel="next" href="ar01s08.html" title="Retrieving Attributes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Writing Attribute</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialwritingattribute"></a>Writing Attribute</h2></div></div><div></div></div><p><a class="indexterm" name="id2587093"></a>
+Writing an attribute is similar to writing text to a new element. In
+ this case, we'll add a reference <span class="acronym">URI</span> to our
+ document. Full code:<a href="apf.html" title="F. Code for Add Attribute Example">Appendix F, <i>Code for Add Attribute Example</i></a>.</p><p>
+ A <tt class="sgmltag-element">reference</tt> is a child of the <tt class="sgmltag-element">story</tt>
+ element, so finding the place to put our new element and attribute is
+ simple. As soon as we do the error-checking test in our
+ <tt class="function">parseDoc</tt>, we are in the right spot to add our
+ element. But before we do that, we need to make a declaration using a
+ data type we have not seen yet:
+ </p><pre class="programlisting">
+ xmlAttrPtr newattr;
+ </pre><p>
+ We also need an extra xmlNodePtr:
+ </p><pre class="programlisting">
+ xmlNodePtr newnode;
+ </pre><p>
+ </p><p>
+ The rest of <tt class="function">parseDoc</tt> is the same as before until we
+ check to see if our root element is <tt class="sgmltag-element">story</tt>. If it is,
+ then we know we are at the right spot to add our element:
+
+ </p><pre class="programlisting">
+ <a name="addreferencenode"></a><img src="images/callouts/1.png" alt="1" border="0"> newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
+ <a name="addattributenode"></a><img src="images/callouts/2.png" alt="2" border="0"> newattr = xmlNewProp (newnode, "uri", uri);
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#addreferencenode"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>First we add a new node at the location of the current node
+ pointer, <tt class="varname">cur.</tt> using the <a href="http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD" target="_top">xmlNewTextChild</a> function.</p></td></tr></table></div><p>
+ </p><p>Once the node is added, the file is written to disk just as in the
+ previous example in which we added an element with text content.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s08.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing element content </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Retrieving Attributes</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s08.html b/doc/tutorial/ar01s08.html
new file mode 100644
index 0000000..758f811
--- /dev/null
+++ b/doc/tutorial/ar01s08.html
@@ -0,0 +1,38 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Retrieving Attributes</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s07.html" title="Writing Attribute"><link rel="next" href="ar01s09.html" title="Encoding Conversion"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Retrieving Attributes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s07.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialattribute"></a>Retrieving Attributes</h2></div></div><div></div></div><p><a class="indexterm" name="id2587236"></a>
+Retrieving the value of an attribute is similar to the previous
+ example in which we retrieved a node's text contents. In this case we'll
+ extract the value of the <span class="acronym">URI</span> we added in the previous
+ section. Full code: <a href="apg.html" title="G. Code for Retrieving Attribute Value Example">Appendix G, <i>Code for Retrieving Attribute Value Example</i></a>.</p><p>
+ The initial steps for this example are similar to the previous ones: parse
+ the doc, find the element you are interested in, then enter a function to
+ carry out the specific task required. In this case, we call
+ <tt class="function">getReference</tt>:
+ </p><pre class="programlisting">
+void
+getReference (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *uri;
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur-&gt;name, (const xmlChar *)"reference"))) {
+ <a name="getattributevalue"></a><img src="images/callouts/1.png" alt="1" border="0"> uri = xmlGetProp(cur, "uri");
+ printf("uri: %s\n", uri);
+ xmlFree(uri);
+ }
+ cur = cur-&gt;next;
+ }
+ return;
+}
+ </pre><p>
+
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#getattributevalue"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p>
+ The key function is <tt class="function"><a href="http://xmlsoft.org/html/libxml-tree.html#XMLGETPROP" target="_top">xmlGetProp</a></tt>, which returns an
+ <tt class="varname">xmlChar</tt> containing the attribute's value. In this case,
+ we just print it out.
+ </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td colspan="2" align="left" valign="top"><p>
+ If you are using a <span class="acronym">DTD</span> that declares a fixed or
+ default value for the attribute, this function will retrieve it.
+ </p></td></tr></table></div><p>
+ </p></td></tr></table></div><p>
+
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s07.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ar01s09.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Writing Attribute </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Encoding Conversion</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ar01s09.html b/doc/tutorial/ar01s09.html
new file mode 100644
index 0000000..2987add
--- /dev/null
+++ b/doc/tutorial/ar01s09.html
@@ -0,0 +1,63 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Encoding Conversion</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="ar01s08.html" title="Retrieving Attributes"><link rel="next" href="apa.html" title="A. Compilation"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Encoding Conversion</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s08.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="apa.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="xmltutorialconvert"></a>Encoding Conversion</h2></div></div><div></div></div><p><a class="indexterm" name="id2587348"></a>
+Data encoding compatibility problems are one of the most common
+ difficulties encountered by programmers new to <span class="acronym">XML</span> in
+ general and <span class="application">libxml</span> in particular. Thinking
+ through the design of your application in light of this issue will help
+ avoid difficulties later. Internally, <span class="application">libxml</span>
+ stores and manipulates data in the UTF-8 format. Data used by your program
+ in other formats, such as the commonly used ISO-8859-1 encoding, must be
+ converted to UTF-8 before passing it to <span class="application">libxml</span>
+ functions. If you want your program's output in an encoding other than
+ UTF-8, you also must convert it.</p><p><span class="application">Libxml</span> uses
+ <span class="application">iconv</span> if it is available to convert
+ data. Without <span class="application">iconv</span>, only UTF-8, UTF-16 and
+ ISO-8859-1 can be used as external formats. With
+ <span class="application">iconv</span>, any format can be used provided
+ <span class="application">iconv</span> is able to convert it to and from
+ UTF-8. Currently <span class="application">iconv</span> supports about 150
+ different character formats with ability to convert from any to any. While
+ the actual number of supported formats varies between implementations, every
+ <span class="application">iconv</span> implementation is almost guaranteed to
+ support every format anyone has ever heard of.</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="images/warning.png"></td><th align="left">Warning</th></tr><tr><td colspan="2" align="left" valign="top"><p>A common mistake is to use different formats for the internal data
+ in different parts of one's code. The most common case is an application
+ that assumes ISO-8859-1 to be the internal data format, combined with
+ <span class="application">libxml</span>, which assumes UTF-8 to be the
+ internal data format. The result is an application that treats internal
+ data differently, depending on which code section is executing. The one or
+ the other part of code will then, naturally, misinterpret the data.
+ </p></td></tr></table></div><p>This example constructs a simple document, then adds content provided
+ at the command line to the document's root element and outputs the results
+ to <tt class="filename">stdout</tt> in the proper encoding. For this example, we
+ use ISO-8859-1 encoding. The encoding of the string input at the command
+ line is converted from ISO-8859-1 to UTF-8. Full code: <a href="aph.html" title="H. Code for Encoding Conversion Example">Appendix H, <i>Code for Encoding Conversion Example</i></a></p><p>The conversion, encapsulated in the example code in the
+ <tt class="function">convert</tt> function, uses
+ <span class="application">libxml's</span>
+ <tt class="function">xmlFindCharEncodingHandler</tt> function:
+ </p><pre class="programlisting">
+ <a name="handlerdatatype"></a><img src="images/callouts/1.png" alt="1" border="0">xmlCharEncodingHandlerPtr handler;
+ <a name="calcsize"></a><img src="images/callouts/2.png" alt="2" border="0">size = (int)strlen(in)+1;
+ out_size = size*2-1;
+ out = malloc((size_t)out_size);
+
+&#8230;
+ <a name="findhandlerfunction"></a><img src="images/callouts/3.png" alt="3" border="0">handler = xmlFindCharEncodingHandler(encoding);
+&#8230;
+ <a name="callconversionfunction"></a><img src="images/callouts/4.png" alt="4" border="0">handler-&gt;input(out, &amp;out_size, in, &amp;temp);
+&#8230;
+ <a name="outputencoding"></a><img src="images/callouts/5.png" alt="5" border="0">xmlSaveFormatFileEnc("-", doc, encoding, 1);
+ </pre><p>
+ </p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a href="#handlerdatatype"><img src="images/callouts/1.png" alt="1" border="0"></a> </td><td valign="top" align="left"><p><tt class="varname">handler</tt> is declared as a pointer to an
+ <tt class="function">xmlCharEncodingHandler</tt> function.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#calcsize"><img src="images/callouts/2.png" alt="2" border="0"></a> </td><td valign="top" align="left"><p>The <tt class="function">xmlCharEncodingHandler</tt> function needs
+ to be given the size of the input and output strings, which are
+ calculated here for strings <tt class="varname">in</tt> and
+ <tt class="varname">out</tt>.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#findhandlerfunction"><img src="images/callouts/3.png" alt="3" border="0"></a> </td><td valign="top" align="left"><p><tt class="function">xmlFindCharEncodingHandler</tt> takes as its
+ argument the data's initial encoding and searches
+ <span class="application">libxml's</span> built-in set of conversion
+ handlers, returning a pointer to the function or NULL if none is
+ found.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#callconversionfunction"><img src="images/callouts/4.png" alt="4" border="0"></a> </td><td valign="top" align="left"><p>The conversion function identified by <tt class="varname">handler</tt>
+ requires as its arguments pointers to the input and output strings,
+ along with the length of each. The lengths must be determined
+ separately by the application.</p></td></tr><tr><td width="5%" valign="top" align="left"><a href="#outputencoding"><img src="images/callouts/5.png" alt="5" border="0"></a> </td><td valign="top" align="left"><p>To output in a specified encoding rather than UTF-8, we use
+ <tt class="function">xmlSaveFormatFileEnc</tt>, specifying the
+ encoding.</p></td></tr></table></div><p>
+ </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="apa.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Retrieving Attributes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> A. Compilation</td></tr></table></div></body></html>
diff --git a/doc/tutorial/images/blank.png b/doc/tutorial/images/blank.png
new file mode 100644
index 0000000..764bf4f
--- /dev/null
+++ b/doc/tutorial/images/blank.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/1.png b/doc/tutorial/images/callouts/1.png
new file mode 100644
index 0000000..7d47343
--- /dev/null
+++ b/doc/tutorial/images/callouts/1.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/10.png b/doc/tutorial/images/callouts/10.png
new file mode 100644
index 0000000..997bbc8
--- /dev/null
+++ b/doc/tutorial/images/callouts/10.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/2.png b/doc/tutorial/images/callouts/2.png
new file mode 100644
index 0000000..5d09341
--- /dev/null
+++ b/doc/tutorial/images/callouts/2.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/3.png b/doc/tutorial/images/callouts/3.png
new file mode 100644
index 0000000..ef7b700
--- /dev/null
+++ b/doc/tutorial/images/callouts/3.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/4.png b/doc/tutorial/images/callouts/4.png
new file mode 100644
index 0000000..adb8364
--- /dev/null
+++ b/doc/tutorial/images/callouts/4.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/5.png b/doc/tutorial/images/callouts/5.png
new file mode 100644
index 0000000..4d7eb46
--- /dev/null
+++ b/doc/tutorial/images/callouts/5.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/6.png b/doc/tutorial/images/callouts/6.png
new file mode 100644
index 0000000..0ba694a
--- /dev/null
+++ b/doc/tutorial/images/callouts/6.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/7.png b/doc/tutorial/images/callouts/7.png
new file mode 100644
index 0000000..472e96f
--- /dev/null
+++ b/doc/tutorial/images/callouts/7.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/8.png b/doc/tutorial/images/callouts/8.png
new file mode 100644
index 0000000..5e60973
--- /dev/null
+++ b/doc/tutorial/images/callouts/8.png
Binary files differ
diff --git a/doc/tutorial/images/callouts/9.png b/doc/tutorial/images/callouts/9.png
new file mode 100644
index 0000000..a0676d2
--- /dev/null
+++ b/doc/tutorial/images/callouts/9.png
Binary files differ
diff --git a/doc/tutorial/images/caution.png b/doc/tutorial/images/caution.png
new file mode 100644
index 0000000..5b7809c
--- /dev/null
+++ b/doc/tutorial/images/caution.png
Binary files differ
diff --git a/doc/tutorial/images/draft.png b/doc/tutorial/images/draft.png
new file mode 100644
index 0000000..0084708
--- /dev/null
+++ b/doc/tutorial/images/draft.png
Binary files differ
diff --git a/doc/tutorial/images/home.png b/doc/tutorial/images/home.png
new file mode 100644
index 0000000..cbb711d
--- /dev/null
+++ b/doc/tutorial/images/home.png
Binary files differ
diff --git a/doc/tutorial/images/important.png b/doc/tutorial/images/important.png
new file mode 100644
index 0000000..12c90f6
--- /dev/null
+++ b/doc/tutorial/images/important.png
Binary files differ
diff --git a/doc/tutorial/images/next.png b/doc/tutorial/images/next.png
new file mode 100644
index 0000000..45835bf
--- /dev/null
+++ b/doc/tutorial/images/next.png
Binary files differ
diff --git a/doc/tutorial/images/note.png b/doc/tutorial/images/note.png
new file mode 100644
index 0000000..d0c3c64
--- /dev/null
+++ b/doc/tutorial/images/note.png
Binary files differ
diff --git a/doc/tutorial/images/prev.png b/doc/tutorial/images/prev.png
new file mode 100644
index 0000000..cf24654
--- /dev/null
+++ b/doc/tutorial/images/prev.png
Binary files differ
diff --git a/doc/tutorial/images/tip.png b/doc/tutorial/images/tip.png
new file mode 100644
index 0000000..5c4aab3
--- /dev/null
+++ b/doc/tutorial/images/tip.png
Binary files differ
diff --git a/doc/tutorial/images/toc-blank.png b/doc/tutorial/images/toc-blank.png
new file mode 100644
index 0000000..6ffad17
--- /dev/null
+++ b/doc/tutorial/images/toc-blank.png
Binary files differ
diff --git a/doc/tutorial/images/toc-minus.png b/doc/tutorial/images/toc-minus.png
new file mode 100644
index 0000000..abbb020
--- /dev/null
+++ b/doc/tutorial/images/toc-minus.png
Binary files differ
diff --git a/doc/tutorial/images/toc-plus.png b/doc/tutorial/images/toc-plus.png
new file mode 100644
index 0000000..941312c
--- /dev/null
+++ b/doc/tutorial/images/toc-plus.png
Binary files differ
diff --git a/doc/tutorial/images/up.png b/doc/tutorial/images/up.png
new file mode 100644
index 0000000..07634de
--- /dev/null
+++ b/doc/tutorial/images/up.png
Binary files differ
diff --git a/doc/tutorial/images/warning.png b/doc/tutorial/images/warning.png
new file mode 100644
index 0000000..1c33db8
--- /dev/null
+++ b/doc/tutorial/images/warning.png
Binary files differ
diff --git a/doc/tutorial/includeaddattribute.c b/doc/tutorial/includeaddattribute.c
new file mode 100644
index 0000000..bb6a18b
--- /dev/null
+++ b/doc/tutorial/includeaddattribute.c
@@ -0,0 +1,64 @@
+<![CDATA[
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+
+xmlDocPtr
+parseDoc(char *docname, char *uri) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ xmlNodePtr newnode;
+ xmlAttrPtr newattr;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return (NULL);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ newnode = xmlNewTextChild (cur, NULL, "reference", NULL);
+ newattr = xmlNewProp (newnode, "uri", uri);
+ return(doc);
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ char *uri;
+ xmlDocPtr doc;
+
+ if (argc <= 2) {
+ printf("Usage: %s docname, uri\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ uri = argv[2];
+ doc = parseDoc (docname, uri);
+ if (doc != NULL) {
+ xmlSaveFormatFile (docname, doc, 1);
+ xmlFreeDoc(doc);
+ }
+ return (1);
+}
+]]>
diff --git a/doc/tutorial/includeaddkeyword.c b/doc/tutorial/includeaddkeyword.c
new file mode 100644
index 0000000..975168d
--- /dev/null
+++ b/doc/tutorial/includeaddkeyword.c
@@ -0,0 +1,75 @@
+<![CDATA[
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur, char *keyword) {
+
+ xmlNewTextChild (cur, NULL, "keyword", keyword);
+ return;
+}
+
+xmlDocPtr
+parseDoc(char *docname, char *keyword) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return (NULL);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
+ parseStory (doc, cur, keyword);
+ }
+
+ cur = cur->next;
+ }
+ return(doc);
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ char *keyword;
+ xmlDocPtr doc;
+
+ if (argc <= 2) {
+ printf("Usage: %s docname, keyword\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ keyword = argv[2];
+ doc = parseDoc (docname, keyword);
+ if (doc != NULL) {
+ xmlSaveFormatFile (docname, doc, 0);
+ xmlFreeDoc(doc);
+ }
+
+ return (1);
+}
+]]>
diff --git a/doc/tutorial/includeconvert.c b/doc/tutorial/includeconvert.c
new file mode 100644
index 0000000..482e56f
--- /dev/null
+++ b/doc/tutorial/includeconvert.c
@@ -0,0 +1,73 @@
+<![CDATA[
+#include <string.h>
+#include <libxml/parser.h>
+
+
+unsigned char*
+convert (unsigned char *in, char *encoding)
+{
+ unsigned char *out;
+ int ret,size,out_size,temp;
+ xmlCharEncodingHandlerPtr handler;
+
+ size = (int)strlen(in)+1;
+ out_size = size*2-1;
+ out = malloc((size_t)out_size);
+
+ if (out) {
+ handler = xmlFindCharEncodingHandler(encoding);
+
+ if (!handler) {
+ free(out);
+ out = NULL;
+ }
+ }
+ if (out) {
+ temp=size-1;
+ ret = handler->input(out, &out_size, in, &temp);
+ if (ret || temp-size+1) {
+ if (ret) {
+ printf("conversion wasn't successful.\n");
+ } else {
+ printf("conversion wasn't successful. converted: %i octets.\n",temp);
+ }
+ free(out);
+ out = NULL;
+ } else {
+ out = realloc(out,out_size+1);
+ out[out_size]=0; /*null terminating out*/
+
+ }
+ } else {
+ printf("no mem\n");
+ }
+ return (out);
+}
+
+
+int
+main(int argc, char **argv) {
+
+ unsigned char *content, *out;
+ xmlDocPtr doc;
+ xmlNodePtr rootnode;
+ char *encoding = "ISO-8859-1";
+
+
+ if (argc <= 1) {
+ printf("Usage: %s content\n", argv[0]);
+ return(0);
+ }
+
+ content = argv[1];
+
+ out = convert(content, encoding);
+
+ doc = xmlNewDoc ("1.0");
+ rootnode = xmlNewDocNode(doc, NULL, (const xmlChar*)"root", out);
+ xmlDocSetRootElement(doc, rootnode);
+
+ xmlSaveFormatFileEnc("-", doc, encoding, 1);
+ return (1);
+}
+]]>
diff --git a/doc/tutorial/includegetattribute.c b/doc/tutorial/includegetattribute.c
new file mode 100644
index 0000000..b2b7471
--- /dev/null
+++ b/doc/tutorial/includegetattribute.c
@@ -0,0 +1,72 @@
+<![CDATA[
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+void
+getReference (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *uri;
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"reference"))) {
+ uri = xmlGetProp(cur, "uri");
+ printf("uri: %s\n", uri);
+ xmlFree(uri);
+ }
+ cur = cur->next;
+ }
+ return;
+}
+
+
+void
+parseDoc(char *docname) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ getReference (doc, cur);
+ xmlFreeDoc(doc);
+ return;
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+
+ if (argc <= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ parseDoc (docname);
+
+ return (1);
+}
+]]>
diff --git a/doc/tutorial/includekeyword.c b/doc/tutorial/includekeyword.c
new file mode 100644
index 0000000..e9bb467
--- /dev/null
+++ b/doc/tutorial/includekeyword.c
@@ -0,0 +1,79 @@
+<![CDATA[
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+void
+parseStory (xmlDocPtr doc, xmlNodePtr cur) {
+
+ xmlChar *key;
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"keyword"))) {
+ key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ printf("keyword: %s\n", key);
+ xmlFree(key);
+ }
+ cur = cur->next;
+ }
+ return;
+}
+
+static void
+parseDoc(char *docname) {
+
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return;
+ }
+
+ cur = xmlDocGetRootElement(doc);
+
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ if (xmlStrcmp(cur->name, (const xmlChar *) "story")) {
+ fprintf(stderr,"document of the wrong type, root node != story");
+ xmlFreeDoc(doc);
+ return;
+ }
+
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"storyinfo"))){
+ parseStory (doc, cur);
+ }
+
+ cur = cur->next;
+ }
+
+ xmlFreeDoc(doc);
+ return;
+}
+
+int
+main(int argc, char **argv) {
+
+ char *docname;
+
+ if (argc <= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ parseDoc (docname);
+
+ return (1);
+}
+]]>
diff --git a/doc/tutorial/includexpath.c b/doc/tutorial/includexpath.c
new file mode 100644
index 0000000..6b66e60
--- /dev/null
+++ b/doc/tutorial/includexpath.c
@@ -0,0 +1,74 @@
+<![CDATA[
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+
+xmlDocPtr
+getdoc (char *docname) {
+ xmlDocPtr doc;
+ doc = xmlParseFile(docname);
+
+ if (doc == NULL ) {
+ fprintf(stderr,"Document not parsed successfully. \n");
+ return NULL;
+ }
+
+ return doc;
+}
+
+xmlXPathObjectPtr
+getnodeset (xmlDocPtr doc, xmlChar *xpath){
+
+ xmlXPathContextPtr context;
+ xmlXPathObjectPtr result;
+
+ context = xmlXPathNewContext(doc);
+ if (context == NULL) {
+ printf("Error in xmlXPathNewContext\n");
+ return NULL;
+ }
+ result = xmlXPathEvalExpression(xpath, context);
+ xmlXPathFreeContext(context);
+ if (result == NULL) {
+ printf("Error in xmlXPathEvalExpression\n");
+ return NULL;
+ }
+ if(xmlXPathNodeSetIsEmpty(result->nodesetval)){
+ xmlXPathFreeObject(result);
+ printf("No result\n");
+ return NULL;
+ }
+ return result;
+}
+int
+main(int argc, char **argv) {
+
+ char *docname;
+ xmlDocPtr doc;
+ xmlChar *xpath = (xmlChar*) "//keyword";
+ xmlNodeSetPtr nodeset;
+ xmlXPathObjectPtr result;
+ int i;
+ xmlChar *keyword;
+
+ if (argc <= 1) {
+ printf("Usage: %s docname\n", argv[0]);
+ return(0);
+ }
+
+ docname = argv[1];
+ doc = getdoc(docname);
+ result = getnodeset (doc, xpath);
+ if (result) {
+ nodeset = result->nodesetval;
+ for (i=0; i < nodeset->nodeNr; i++) {
+ keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);
+ printf("keyword: %s\n", keyword);
+ xmlFree(keyword);
+ }
+ xmlXPathFreeObject (result);
+ }
+ xmlFreeDoc(doc);
+ xmlCleanupParser();
+ return (1);
+}
+]]> \ No newline at end of file
diff --git a/doc/tutorial/index.html b/doc/tutorial/index.html
new file mode 100644
index 0000000..51fd481
--- /dev/null
+++ b/doc/tutorial/index.html
@@ -0,0 +1,14 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Libxml Tutorial</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="next" href="ar01s02.html" title="Data Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Libxml Tutorial</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s02.html">Next</a></td></tr></table><hr></div><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2473660"></a>Libxml Tutorial</h1></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="surname">Fleck</span></h3></div></div><div><p class="copyright">Copyright © 2002, 2003 John Fleck</p></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="2"><b>Revision History</b></th></tr><tr><td align="left">Revision 1</td><td align="left">June 4, 2002</td></tr><tr><td align="left" colspan="2">Initial draft</td></tr><tr><td align="left">Revision 2</td><td align="left">June 12, 2002</td></tr><tr><td align="left" colspan="2">retrieving attribute value added</td></tr><tr><td align="left">Revision 3</td><td align="left">Aug. 31, 2002</td></tr><tr><td align="left" colspan="2">freeing memory fix</td></tr><tr><td align="left">Revision 4</td><td align="left">Nov. 10, 2002</td></tr><tr><td align="left" colspan="2">encoding discussion added</td></tr><tr><td align="left">Revision 5</td><td align="left">Dec. 15, 2002</td></tr><tr><td align="left" colspan="2">more memory freeing changes</td></tr><tr><td align="left">Revision 6</td><td align="left">Jan. 26. 2003</td></tr><tr><td align="left" colspan="2">add index</td></tr><tr><td align="left">Revision 7</td><td align="left">April 25, 2003</td></tr><tr><td align="left" colspan="2">add compilation appendix</td></tr><tr><td align="left">Revision 8</td><td align="left">July 24, 2003</td></tr><tr><td align="left" colspan="2">add XPath example</td></tr><tr><td align="left">Revision 9</td><td align="left">Feb. 14, 2004</td></tr><tr><td align="left" colspan="2">Fix bug in XPath example</td></tr><tr><td align="left">Revision 7</td><td align="left">Aug. 24, 2004</td></tr><tr><td align="left" colspan="2">Fix another bug in XPath example</td></tr></table></div></div></div><div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="index.html#introduction">Introduction</a></dt><dt><a href="ar01s02.html">Data Types</a></dt><dt><a href="ar01s03.html">Parsing the file</a></dt><dt><a href="ar01s04.html">Retrieving Element Content</a></dt><dt><a href="ar01s05.html">Using XPath to Retrieve Element Content</a></dt><dt><a href="ar01s06.html">Writing element content</a></dt><dt><a href="ar01s07.html">Writing Attribute</a></dt><dt><a href="ar01s08.html">Retrieving Attributes</a></dt><dt><a href="ar01s09.html">Encoding Conversion</a></dt><dt>A. <a href="apa.html">Compilation</a></dt><dt>B. <a href="apb.html">Sample Document</a></dt><dt>C. <a href="apc.html">Code for Keyword Example</a></dt><dt>D. <a href="apd.html">Code for XPath Example</a></dt><dt>E. <a href="ape.html">Code for Add Keyword Example</a></dt><dt>F. <a href="apf.html">Code for Add Attribute Example</a></dt><dt>G. <a href="apg.html">Code for Retrieving Attribute Value Example</a></dt><dt>H. <a href="aph.html">Code for Encoding Conversion Example</a></dt><dt>I. <a href="api.html">Acknowledgements</a></dt></dl></div><div class="abstract"><p class="title"><b>Abstract</b></p><p>Libxml is a freely licensed C language library for handling
+ <span class="acronym">XML</span>, portable across a large number of platforms. This
+ tutorial provides examples of its basic functions.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div><div></div></div><p>Libxml is a C language library implementing functions for reading,
+ creating and manipulating <span class="acronym">XML</span> data. This tutorial
+ provides example code and explanations of its basic functionality.</p><p>Libxml and more details about its use are available on <a href="http://www.xmlsoft.org/" target="_top">the project home page</a>. Included there is complete <a href="http://xmlsoft.org/html/libxml-lib.html" target="_top">
+ <span class="acronym">API</span> documentation</a>. This tutorial is not meant
+ to substitute for that complete documentation, but to illustrate the
+ functions needed to use the library to perform basic operations.
+
+</p><p>The tutorial is based on a simple <span class="acronym">XML</span> application I
+ use for articles I write. The format includes metadata and the body
+ of the article.</p><p>The example code in this tutorial demonstrates how to:
+ </p><div class="itemizedlist"><ul type="disc"><li><p>Parse the document.</p></li><li><p>Extract the text within a specified element.</p></li><li><p>Add an element and its content.</p></li><li><p>Add an attribute.</p></li><li><p>Extract the value of an attribute.</p></li></ul></div><p>
+ </p><p>Full code for the examples is included in the appendices.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Data Types</td></tr></table></div></body></html>
diff --git a/doc/tutorial/ix01.html b/doc/tutorial/ix01.html
new file mode 100644
index 0000000..fca9d42
--- /dev/null
+++ b/doc/tutorial/ix01.html
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Index</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"><link rel="home" href="index.html" title="Libxml Tutorial"><link rel="up" href="index.html" title="Libxml Tutorial"><link rel="previous" href="api.html" title="I. Acknowledgements"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Index</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="index"><div class="titlepage"><div><div><h2 class="title"><a name="id2588704"></a>Index</h2></div></div><div></div></div><div class="index"><div class="indexdiv"><h3>A</h3><dl><dt>attribute</dt><dd><dl><dt>retrieving value, <a href="ar01s08.html">Retrieving Attributes</a></dt><dt>writing, <a href="ar01s07.html">Writing Attribute</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>compiler flags, <a href="apa.html">Compilation</a></dt></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>element</dt><dd><dl><dt>retrieving content, <a href="ar01s04.html">Retrieving Element Content</a></dt><dt>writing content, <a href="ar01s06.html">Writing element content</a></dt></dl></dd><dt>encoding, <a href="ar01s03.html">Parsing the file</a>, <a href="ar01s09.html">Encoding Conversion</a></dt></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>file</dt><dd><dl><dt>parsing, <a href="ar01s03.html">Parsing the file</a>-<a href="ar01s03.html">Parsing the file</a></dt><dt>saving, <a href="ar01s06.html">Writing element content</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>X</h3><dl><dt>xmlChar, <a href="ar01s02.html">Data Types</a></dt><dt>xmlDoc, <a href="ar01s02.html">Data Types</a></dt><dt>xmlNodePtr, <a href="ar01s02.html">Data Types</a></dt></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="api.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">I. Acknowledgements </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
diff --git a/doc/tutorial/xmltutorial.pdf b/doc/tutorial/xmltutorial.pdf
new file mode 100644
index 0000000..967d445
--- /dev/null
+++ b/doc/tutorial/xmltutorial.pdf
@@ -0,0 +1,1336 @@
+%PDF-1.3
+%ª«¬­
+4 0 obj
+<< /Type /Info
+/Producer (FOP 0.20.5) >>
+endobj
+5 0 obj
+<< /Length 1748 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gb"/*>Edeu'RnB3cso,c'tRV<@2QG"Te1sI,sZ*n#KKlNVMQ<5BA<CZaL=]`*:HduRjm'>q5!'k+!#c"8(NNgbpHe&;a;1aP(M@rJfk-$BS+$?JcRY,(_A6k,SUN`TO7efXhh3i=3:BXHM%E2OW]0H+sk$H[O\XG#u0mW@.r"s`W.g99!tcR*(\/("@>q@BW^Q2G*D>/#n3]_.il=X.o?OD#U^04dS]Ss+,a%^lQgnf/]&ceW@ko*%B0QokTBn:$jairCK+PLS%Cdch@t;kIOGu!8)fQ]DhR/U#>#9%l:;J>aO=nBdX8N?;VToPUM@?BfP;2DbSCG8.#;H:nr:@X[RoUP5#8V!2XYms3+,Pg+L(An4XOouF2iL@.s#m5[\'e,fq`PS,Y"o@$je=#b?gu9;/r=qMt:mb%%G5$FjcsdUbn".i6X#Km]hZSOE(i@A:'C!]#YQVN-&c&_nu&jGD2gg2I,X>Af/QL5%8n)7XSCb0W0Z8*)+\&9B^bTmkJ.5_$RWeH_2p2XZM9@ot$UX[_53q*&3VO&J)5%86Y$AZWkI@N:&FKcs%p6WMQCcUFbh8)(40P\*ZA"bb8R+Uti6J;Fdmlr'!#08-$\rUW.S*`0l$l7lOkfeCu3KUG37:dV;6?`SiLnX<n!4kq*4TfOBpT^m(\"nXUCddT@TZF=,%q),uW\\A[R"4E3]Qn:P;P2sUfK_uU5s2`jJtfm8j`_P0-RRuL2'@glpXN1mQJT-EqHY]=?4Y^:1$"B&ZEASTkKDdS:=NG[qkiHhiY7uX6Re5WhG;&S]OHL=\;B-\F8W6&_3=DhH3NbV#F];7UL+)*hY@q]h'U$@""^j(`qe],MJ;RBq^QtF<scN!-Japj9N?UVJ><g=gs\RDaGkGq,!_YHg5q[/?$QtD7Oo--g8SJKtBFH7:ieXAm!,]<3VO_=2:C,jI_(!EGC3:b-8O%N@VcEs3iRs;fu`m\L$KOn9:ZEq/;R97cpQB+03O$#I/1`g$QYQ=GYbdYjj[2(\]fJXL:PpABMO$+\J4Sm"Ddsjld]8>36m\Ar>kEqpnE4+,0ZZ3>mbtc]/Ye]ERO8`($8oE>X;g2g1^GaWe,."f<Z*X"^Ya?i2%8I6fN9J#r2iKGoom91+Os`\R'=pEQOgA/h`u^U<s$,"p=U^Ksck/%*3sYDJpf-S,B8":bJs5_!krpr44uPMaD:C7&(hPhHQK_IG&[@W\]@:&U2`1u#r9:g`-]8n7b@-u@A9iV6?&#s[;]5e"4UdB6qSXPPL-l/,L"L$5aSa]?LYMN6(@@R"?A<n+G]^6)SF=NJP[6=s^W9lnL6L`-nZBNPTB3?F\8$LUEQ74;&(dRT7AE8hase`F5)b<2_e;\1Wr/aMUVD@N9hgS$\LF(ih:9EQGof$TjN*3M0mi9'Hh;7*B_XM"3,n.tf,m:'pMB[[p%hS0kCZq^%2W]_E6<1X4H)h+#J.A0kOpYtT3`f4"ks8Wg2IK9F/SBsr*be4ce7Bq,]SL214R->\E*6Km3M;^8S1^,jb5M4kL$muHb\#!ZDs2A'bm;94ZWTnMuE=%!9!G)bJEiSMujhEeJoj\[m_?-@s8c*.C1268G+TV1+An"dq!66BOQ/uWk*6"Zr]hpdqsAYX6mH:4q,p%/mN/clgm6_*Vk"=D&P?A)R&GV[-;l5h5dH^[E8!6^<odeltSHSZbE8>O+q)a!Ngs^]Q]QTYaG>BGrFu<d3N?cpcWuA;ji)u%bdDTfKSgY^PE!j~>
+endstream
+endobj
+6 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 5 0 R
+/Annots 7 0 R
+>>
+endobj
+7 0 obj
+[
+8 0 R
+10 0 R
+12 0 R
+14 0 R
+16 0 R
+18 0 R
+20 0 R
+22 0 R
+24 0 R
+26 0 R
+28 0 R
+30 0 R
+32 0 R
+34 0 R
+36 0 R
+38 0 R
+40 0 R
+42 0 R
+]
+endobj
+8 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 336.111 193.44 326.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 9 0 R
+/H /I
+>>
+endobj
+10 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 325.111 189.82 315.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 11 0 R
+/H /I
+>>
+endobj
+12 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 314.111 204.55 304.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 13 0 R
+/H /I
+>>
+endobj
+14 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 303.111 256.22 293.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 15 0 R
+/H /I
+>>
+endobj
+16 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 292.111 312.05 282.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 17 0 R
+/H /I
+>>
+endobj
+18 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 281.111 241.21 271.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 19 0 R
+/H /I
+>>
+endobj
+20 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 270.111 213.72 260.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 21 0 R
+/H /I
+>>
+endobj
+22 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 259.111 228.72 249.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 23 0 R
+/H /I
+>>
+endobj
+24 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 248.111 230.94 238.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 25 0 R
+/H /I
+>>
+endobj
+26 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 237.111 206.23 227.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 27 0 R
+/H /I
+>>
+endobj
+28 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 226.111 229.83 216.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 29 0 R
+/H /I
+>>
+endobj
+30 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 215.111 268.7 205.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 31 0 R
+/H /I
+>>
+endobj
+32 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 204.111 257.04 194.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 33 0 R
+/H /I
+>>
+endobj
+34 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 193.111 287.86 183.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 35 0 R
+/H /I
+>>
+endobj
+36 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 182.111 286.21 172.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 37 0 R
+/H /I
+>>
+endobj
+38 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 171.111 339.25 161.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 39 0 R
+/H /I
+>>
+endobj
+40 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 160.111 318.98 150.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 41 0 R
+/H /I
+>>
+endobj
+42 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 149.111 231.76 139.111 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 43 0 R
+/H /I
+>>
+endobj
+44 0 obj
+<< /Length 1970 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat=,=c_>r%"@)@iO:/L`pnKL/_:&.,f(7`!X7:ABPbqR$=B([4oTk@OWIA+4)'QU(?B+bQUm"&pP5fY2lRStIc)5A=+PRF'mbH1$b\5c1meN1+6MFRp&93T.bTmCC[Xt;`dSL&60,^g0&&(*cX!K=g*;q:et62rBUCjRZ5n?05Ff\bT:/_4"`%09AcElf^08^P=?A?TFKJcGeUf"b7J5C3b<,X-$:\'NQXH>\Y#;"_As:Kf[l:Q."b%M*F!R*3AN'##69g9!fQc."g"2G@I+`7q@&5U'r$"^?k@\d^C1kkf4S(@Gq.OJSaUa\R=EctaF!:u9NfqLs,%M0\b<%#]H])4C,>^$F,<;gtL22]H)KKDnY251JPZj\_eqmgMQE@Du&XI!2GcuSro%=1]VO6g=97Burk(cB>ITR<U_Zd*T?6R<!GG!14Na[=D4:DnhTujblSW=S.%2mBrKj@$j)PNc$9t=sUDe)5*(@uu3':?4pgi>8R9JdtsHgE+k=Y'S]VNL4U<"+-#;V85td%%r\Xj6![NqhME,!+"t90\oA1k+o'>"$rlgTG:gRa:t%=mj>_$I7F/7j+`9b?+Xi^hU:Bh;,1@e9s4!-,?0#(UN<<bVZ?VB%f0pk^)=l/SElH;SC87e+(\+;"Ds;AQ2!c?t(%-IKlbX77mQ&B$*P59F0p:i7e-QS5phm_1WV!1Q>#4[8>'Q@NK56"R\7)dp;4j$:,H[&4!7)rI?Y68=RN#]qkrdkK@JH&pq<B3PBiP6X3e6%\U6Yr6W[p5Th/!enQ=_JMjif1pc6kYUL_+I;i=J%#q2>:D`NOOr+d=Y[c]gWC-oViQH)!;CLs;hDhq)GuRnlk89ZK>+-C0.HtfRmQ5LA[Kn^hXV3ei2*!;C1nA4A`m2C'q29lVD77t>J8P9p3`RP`$hQgfWHkO#_dki3GO?PeZMhFM?]pW-r6Hc`op.:b4a0TfB(JojgKl7A\h!I&P;]dG4)u'c,+fp1G+Abf*8<IB8t6#3LW<h<fJ+gMG"m9af/+RU8DHcPkN]/F:@0PBiu_@JP`e?l\t.'&bNOGqpjk:9@;03NM#N?TrgTm$p+dM$I_u^P%5/m$1q@))C4_c00^u4\(&oq^D]FO]*l_U_8*gD)m[&3\jgri%%t+<C'HHGM:;^O("m[*`S*R?-Y7<a"KN[m:pcon;NuQIbi"T;!Y`G=$U*9AX=7qbP59a+u5nC`CDP"$`GSW/s_l-t@Va`^B(["scNcQ.uo@29\RSG6Ip6L0q-d1$#"&']USCn"RS0H-k%RW!jF7!1,&.):5F(X4Tl\Zd(`'Y#\`qE%T.T5U)I/Ru]IAHmMQK_?JE+X1DM_os!T!]:[]#thKX?Mc$<D,PB&;MK<.P9r>ZAaTcL,fGt;[+lkrH>\r;ljeq11PAF>FXedJZ;>Z&l)EkXRIf\Ha:#=XgB)1-Z]&q+"bP*.A&V'C_X"L7PlNNX?lVp91%H1n=Yn]oa#3@,Ib&J[LZUmFMg?jPE<d\/1a1,)43pUJL'!U:k-5^fU2O7aeW0H30-qo@UJVU".\R_(kJpt5t[X9Qu^t[YHu=Ta@'0d/9)ao#T9=,6WZ[Q=kXMZ<o\djdkLDl=l>Da2sgp0db=<KQVs1c:5sYfk;k$^]N@cO.^D)43q]@B:%2`rBYI!)kcdh`L:nWGam!h[g7/>,c^&1/*9LC9rV/n?;UW_\>iXRc"`1qPj8u)8'H'Dq?7ZQ\j`KtH<>V9O@M`ZPm(VaoFUW4Y&A;KK>o#o*Rsd0gnWrK?R;#r`((7;dH8YnLcA1=o[9G:t<a.Y&L@7IY_(GP_(D-Bt^-#/@,`r<3,*+QK*ghjUf0g0<',[`X_M8_Pl%i$4Y8B9;GIB2!SBeR,"O$R653oR^1?-dAl6#f['7TFEF>*4EBVooVn0Ia'=2/(T5?Q`5l'GhY<u.-0"78nd$4`D8_j1dLI/Igr\aBIoS`qLM5I,n?"VGl9*r~>
+endstream
+endobj
+45 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 44 0 R
+/Annots 46 0 R
+>>
+endobj
+46 0 obj
+[
+47 0 R
+48 0 R
+49 0 R
+50 0 R
+51 0 R
+52 0 R
+53 0 R
+54 0 R
+55 0 R
+56 0 R
+57 0 R
+]
+endobj
+47 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 384.46 600.674 473.05 590.674 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://www.xmlsoft.org/)
+/S /URI >>
+/H /I
+>>
+endobj
+48 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 253.694 589.674 331.744 579.674 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-lib.html)
+/S /URI >>
+/H /I
+>>
+endobj
+49 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 251.348 179.0 241.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLCHAR)
+/S /URI >>
+/H /I
+>>
+endobj
+50 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 352.782 207.348 469.722 197.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://www.xmlsoft.org/encoding.html)
+/S /URI >>
+/H /I
+>>
+endobj
+51 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 264.0 196.348 282.88 186.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://www.xmlsoft.org/encoding.html)
+/S /URI >>
+/H /I
+>>
+endobj
+52 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 175.348 176.22 165.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOC)
+/S /URI >>
+/H /I
+>>
+endobj
+53 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 283.44 164.348 327.33 154.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLDOCPTR)
+/S /URI >>
+/H /I
+>>
+endobj
+54 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 143.348 192.89 133.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR)
+/S /URI >>
+/H /I
+>>
+endobj
+55 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 212.33 143.348 231.22 133.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE)
+/S /URI >>
+/H /I
+>>
+endobj
+56 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 132.348 165.66 122.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODE)
+/S /URI >>
+/H /I
+>>
+endobj
+57 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 424.512 143.348 473.402 133.348 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODEPTR)
+/S /URI >>
+/H /I
+>>
+endobj
+58 0 obj
+<< /Length 2255 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat$:CN%rcn9]V<QS2'gK[]h'@0>)f)7lYMf=BOaGonl2NeL#u91a,^@K1brQZuE0=@IajGN?FZ4NajnBA_M>$dU!$+"`eJ1M:]Ojt7YKEu/OYS42f>`:;<qZ<I0KnKHpe;;]&l>^:<_db'E9`C7D86c>iM!V?%pq(j]8(TmjVJ@/hO"p#j@3$Cj)4QYlBcgm<Nib'B/5Bd:/NQ&-54A:jf=bS!,R3a#Wf*JTRTcu\0l0>o5=D]d<<gK'fgm)0?*AK<5MQQE5F2eA\-ldAlDeXY2P))Q_FCg:=YVlC1Jj8[HZsFQ0(3=oWHTui9I37GdGXDqCJYOOK?u:@dLHX[5Mg4i\<BCn%2g?8!e.X`d0aTup@HBpT:Qdo8n=5RcacPSg.UTO[6S"CX*%?6Zo'^/rG%2.R<cC/g0I?h:n%g.Laa(p>8.JRsJY8>L4/XA88AID>np@tONC8KI)bAGC3$m"!ol?'^:h?4-6L<"E#a5rAX2ShL+&_V,VqYEtn>0Fj43E%+&Ekf?Li<4)g$teS2lhk6>sg2KSjV/BMUnok;DSIBKIbUhDRqs.9s]Bp3=r"*W]mmU)T`L'&is2[VesK?nNlQW+<cjRc[RbKm3O#Hrq9t!)j<OY9k=<LjX8c2A?:2X;W/Z7O*OmdUr7>U<rNN00Zc!VL,t@#i,n=<1aRT)'mj-Og;BTCAL]eYbTKJKOP&R+iKSr#7d_/A`$pPU)$pjB.>ahq#nVnFM-</`g=6:gTrZ"uhcl[R46cF=+%4pl%V!9>VB)JSoeo1rq&7<6]P/6JJ0/D,$3%QY<05[,$Bu^Ae]k+F4_O=l2g^<#2LmSAW:Dg?r!I#$;1'RT^-d;:$PNM0SfjJc!"cQZR?[dCCA/snB&hh'4#.+2d?roNc-)'@gK;cN$J7'="QakeCFunHn=1U3USH&9&$/,lqM)"Y'4*H3g)qD<)kXPS;]okLL`JWqWMRlE%3`n0@O6tXU$U;4<#MC&G$?d=.VcSME<\3sIPJl.7[CM!ZS1#ahHq'0`Oa78ENU_Er5@;9oP[b`k;X'n*oo_28P_AZ;d>63&TeE_^UH_:)bSM4b*=#7>H"2PAtLr:%D#t"<i$81Lpn>8/uEm0<IT5KH#@/0.Z8eLOJaiQkIcZCd@BClY%S"CPLXh>)SGaq+.A4rZ_<:#;WB`mk28O`#XYBYHe(CXl;7[=Zmnf>CFp_Qk&EE2=-\/)BUG5CgE:$^ea!Vce4,h-eulDr1h9jd6+g2s43i!`Z.X^b9(aAqnjcQ@#)-c0&?Xo*d_B%7i[ujL\pI$,cZci6BNbt0l'I+Bi.ml?R'^Z`)<2DCRJKmENilV[D6AmL%9&fp=rSnhn:Er+E!o"Oe/%nf]X^Y]=[(V],=KW>)Qr9^.hEfHP<SEW,+$9C0l,GT1]=I5Z6l+1a1WLdH(gB]+`<aGa^PsF*\GPL_<-L:&OR;[L9<@,alRZ*E2[f(>[P0--L4i9JHYLN4q+nC%k"+67D6+u7]g3=L*SSkBV;5s=(V;;;%S<aarB_G9uH>/O/rCA\tC;K[g]Og43!D]U)&(IYu4,t5,Q"4p=_kW]Kf37`!Q/i=UI(]S\AY3NrUr9n?lPpei&m6CoL!F`f1+bJ$84s'f0tU@=jQIjTU("RUJle@h7c`d.fuADeA4tVEWS[5H-"W0_a^lq5DI(Z2_DWJIGhSjqc(nY"rdP.V*G7.LOF'<ouse'+^QLS2Lrk]TjoHkQp`WNI2)SZUP\4!r(3Ibo!9"jV>0]?;ZgSME\L<!;;;eW73tNPS\OJFABIZL^!I0A]X&Um,5l9DM1rF-+I/MI1:QNW$l+\1L4_)/6h=R]Z<\a=T!/]n6siV>iN<YTOsdC>LcOJ+n?Na8g7&Y@WgLo39FL'PQ9aFr<B9Pgi,+VjWCnUC:g?D-\Wu6#?F%8"u58.Cq,\GE/#2BMY=Zn/Y:2=as\XC7R;)2NAh,3DJTY?^hIJcVHjW?%]U>##"lo'oaIMH0MX/E.nHkg4Ja0!6:N$p!WhL5inlikLtQKUXVR8#9Lh=1YEJL(oo\t'U@@iK;.<GO@n;Kg/>=#g<Q.HZ7SRqBJ<<]6Zkf?j*k>=V3+>Aj=?H/_SNohk*67B;HjI&#_:l42+^]%"B)M<=5DK%T79CZ_=P(W3NMU6`#oPccelH<4)5@*IX4oI:AR5OYQ=li?mjlg"1":[Y00-:\@)_A>F8"AAX!RU?Ocn3'i?Sh%Z1?T8k[CjJ%Hk6[#]Abe7DpY5@:0R%J)<$X+,\`)9`~>
+endstream
+endobj
+59 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 58 0 R
+/Annots 60 0 R
+>>
+endobj
+60 0 obj
+[
+61 0 R
+62 0 R
+]
+endobj
+61 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 249.81 674.674 414.8 664.674 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 31 0 R
+/H /I
+>>
+endobj
+62 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 361.83 222.18 395.71 212.18 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://www.w3.org/TR/REC-xml#charencoding)
+/S /URI >>
+/H /I
+>>
+endobj
+63 0 obj
+<< /Length 2246 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gau0ED/\/e&H88.i<C-b$k=YJU0^l:5hi\6LTK]C(E5'sK.>?T<a3]l3GC26^[LqAnL2SLMfnM*hMM!D]ArE)rH*&Qoa<LL!=<@roiWu\3MWn\IWS&s&=>1`KZ:@;DYDi(6aa\!>qr$"?Y%npAuc0WfOT1=I4j@Nj)4aBQ+q3Pa3(aU<j"&f^X!Z[Jd6#Y6"cab.1sc[^T-j25TC&K"q4i].p#4]H<%(2c(U4R_RQL.hq&MOKjcYL+T6C#*mCN2"%Eu'OpEjlaeEIc,75Sd&l1i@F;4t*8`.*&n?9QY<Bo4PgJogu=M9*0JhmubC"bW^TAU-@\-HNlq69M)H\C1$p$V[&H0OP-XJ*?F6H+rf7$8MF`>U75?9EhY]l!(_GIo\i/[M"<HcE+lBcTPG,=DHX[CeV?g8]TMb&qj@]MuWJ5E\G1&OIerN8A/h,Mst*C^V_8mKJ)cq079YS<8mO<IYNkfG$UH7-P$2/`k#rBZ-nV(eM5UA3B+&a,>`c&W]oL@>WG])@66`<K&s5Q-:l7NHE+MW#P@\=-`!j&dm&aeU"5O`$#^hC=qnF:1OojT`fAdSp2k(NMCBlU29!+^2O[ILjt",4;K't]:uDMX4a`h6<W]"Z>>;!2H^Tuf2u+>EkCXSYS$Jd,P;E2f]]etge+?UA!d^F52EY@d6K^eU5Ao`BTU$H"J%tJ);S?DXeUbSelaNNpNBJ:qjS%,84V;iGk6&C/X=k"Ec0X*j/C,d`ch#rca=9PGr$LkQM(\i=)+LfKG,7,5mV3ukqfp2#4k[g+o[g^=T[UHJ0EXb!&7_2]id]cpVh;;n>n+oX=-TgO"HeIrM%V&aG9Ym?8^oG@Nk%=e4V_YOgd_#ac6BF,E@*'](*M^fsd4%&6;Ho*r<CAS$r$Tk1'q[FO=&61:/_+X7=.3EPImLW62*!:QpTja:mf6TW(\^WnnO:DS*SeHQ0:\>8-JYbRJc!Rr?YK0@8i]-$F+&X!">e:>m3Q243PU53n6(SnKNAVS]:$7i93u=TieI'rtbdbTmc6Skbif(hQsKIh3RO-bUDoE'B:EbR#3YQp`RO"5j0%IfboC=\KHS'!Pks:fn&tHtHb&d[6ii,[f4aK-WW*YbPsnK`Suho`#&;[P_2iGNd@@W-FaZ(iMbV#?.=*)?XIU0Kbd_>Dh$$dfO'+X8CHRDEPulqFjCEAYaJV#F*BC4U[/%os/M]h`1EbRcUh;7g`\I;3`m.H.m1e(U]LN,P.<5>*P+>9]9/-&eb4'>g($<V#6%280N-$;\F2>8@JE,4OBmN$\u[*!=YS#46d`GNnr*CJK6<2jMm^m*B$8jq*qg5qR$LQ?#-q-foc\)T7G<kHt:\JFW1Wl(EY\f@dI@d!1T[fpXPh)48ReM.ii2p*WFh=]+Hi6Q-J)?CE\@B(t<+'K=H4jff3Z"jRk%QB;n!2)rJgl]`Yj!e]=VQ/'Pn$F,;d7o/t>;Uo<`^Vdra4PYor"Nb/t3r*ki*!SV^2ZK$)$+&4@u&XOYemi9M?Aj3AuPS3;^gfV$47i(4oA-`?*'oFB!ogXt:2?o<-;^ckYV(R@!(pI\H^S+=*bkTe^Y31&$6j,=d7p.ffdV;nY"lp3Yb0UujM)F"[M+DKmK+2Ot^LO>)]O.5?Rm8?]gr^%Z;IDLZji1m;=uketLoR=IZQpk@B:]K@8(&(g$k?8KB7>E%K_AXend`36oJc5)8Do0cObfGJL;Md\*+:U;M%e5gK8VjQ4PaL;o]49r5f;Bfcs=I>R;I(u3bPc0]'j%aO$dLm"A4"se*j%-VW,kPmgToCI:i7pJ_F((hrse=HpsIi@ee1K[Br0lq!dSBrQ(8#g:+6N`R*\#939.tKt9rlACg=OC8VEc8jEVQ3f0aicZH-[4CpkX"l'pke7rA*TO?jHJ.#MFgW'`J!2Rk=a"k+@9:I`]'"7BMU;8/]l\"3aNSo%"bgW5lGYe)r0/(d?@=ZrXohAR73#)Y-6q.8-I0Of'7Z4lVE7sDnnK9Q&.&8FpPttORU@,_l?"4F2!]:RGLkj@1?YAcGB5*9[IcG_`i]cg7[hiI_1SBC/McQI<ZY?H)bWdI0Ti#K6oX<^%-"&*)XU<O:3fZ38c1jKWFq5hkUF?73\/2s[Z\dUrVX>/-<foOm@N3V#IRmn-;3^m"^J^>s=8@5`p8@_-a=IcI$)hi$<f\`<S?:+d5'sk+%im*8;?8S;rnie&m^:'3Ha/>FI$&9dD8<i;:Rd/=i!W:HX$:]`rW*tq3d1~>
+endstream
+endobj
+64 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 63 0 R
+/Annots 65 0 R
+>>
+endobj
+65 0 obj
+[
+66 0 R
+67 0 R
+]
+endobj
+66 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 186.56 514.4 240.56 504.4 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-parser.html#XMLSTRCMP)
+/S /URI >>
+/H /I
+>>
+endobj
+67 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 262.18 229.78 382.18 219.78 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNODELISTGETSTRING)
+/S /URI >>
+/H /I
+>>
+endobj
+68 0 obj
+<< /Length 2448 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat<BCN&8jn9]Z($43\cSr*'anW8d+KgVbYLcp=-nfc8(]7Fe(QT3S4`.)D>^W'uNY0_Xf9KZ+sN+]f\Y0XhlN`OXShJ0_co2^'JFQL?"Y%SXR1@]`YPL]N6qYe(mO2n-Z(TS>Q&1"=J?.2uMn!F9ISR)9h0'@QhZA2r5\uol7c6@ODf.H$"aZ^nd*TPs4n%.1-b\!IloaWu8OPh*54L,b>X$9YN+%PJ5))^OljfW,u+S$c9T(A[.3GZg.=O_J#<>O:H7=S]&cT)hTd=]/Jc1fE`g+`q^p$ReCb0I0aX9GV48Z&mj4JT=WFuC1C<R#r)iK!#:YqPE)MrOWBl0g<c?##QS7\=tg\j(8kT=OC9Pg>=Z'ad&aEstoX%'i'X,=8^f93::pC)9og[0ZJf+-+kWH-<u>0'[nm7Cm-U>l+aLEu.5n6<NKQ,s@0`k!7M.=;`haR#&&a9j_.<-<Whk$WH)k^Y%Rpdr#UhoTU[s8`\7&M?sAG@]0pt4JI^]+it6$%:VnPdr;`@7oDSanMJ38EW-ORn`N!%4pp#0?-s1:_;]".bI*1C#n@iIf!k"NWOEY/ITA^81e0IKP4(+AI>Gh9Y/L^Y!BO<s6(K\FD&L[C$7.7KrfX#e:a7VFe1jo2Q7@MZSO+'WKh;oQT%2#d:'K^YKiD`#fsoh1gj*(]L'6*3lZct5[X><Hmk.<c`(shcJ@LG&=2ie_8r\4;V6ubO[1N,2eE&pT,q(EYbPP%8_iX^?Y[S@"Z4DB:%Rj-$i%j:%7=V]1]XI-]6T$QE/TUc?j%W_c^pt[.EQ(t>%f7D'VMp&d2+Etg#SN<[44`De<!B3'O[*=he6e]mcIpnb:e26<]?4g)Y<M+!("-XljMI:[=m0nZolW!;4%,a0fd9T`,]&in_HZ?B0Eh^tl7Q*SkUlXSBKQtQ7j#.q5Mc=\$N?'pQhK24^)ZPE"dX:.p%%NL(lebeN*&=ZS1,udfNOt%;P!<=l.o+R_$L:^Si9f`-o+Z2_DEGC*?CD"H*""k8Ks<eMWBff6/05ofGimi"JbFS@UPjk:eiYq"<1\9F7f:7LEd)]>l8(gVW"&f;/C0@N??3!7V3o??'8&33a/QAs)Qh4#Y[INpQ]=lcL3:$A'#?CoI.#2,UZ]G8SkCVa^7+N*q['QpWCjB3.oJp.=0C/`0o"'nP7F=P=Pp0Wo[7`L_t.0QVS+N1j(r0(cEKLH@i_qUtfgg]-*Jj@JiiDFZAs4NABV72_)m7lck-C;U*`&KpX!@8N)Til]s7C,FY%.BgeO>K^)N![Um]LY>9&)EF<WAod@(.P(`Um3<i@;/G[Qf[r7Vh3L$6\!&Lp[r0lp7i\ADpflj;G\4:[VbDIcf&YeO;(&p"Df)E*eW9Ki(d>o7fPNR),'Q<9"Q[)U14`7fBj2RuG8J7AJ8\\EUIN1VlE2g44VcX6WG;bkEZW:Om=/(':s&[4Q>$g-c7A!Wh;nUtni\/\Wpdct?R*)+1eYYlFf.o6OG@63'I7/02kX'pG&@H1]ju\nT,eg=V<b9!@T`GI*RW<'&e]ka0U5'f7&].7+PV^3mfC\`Z\mko1gO3ip77(;O4O5*Am.b$V?Y*)r0,YOPqrknEbS2p1#V.YQ0C-p&jt8'/",'JQXas3YK36VJ"WPhP8NS,e&UW^AC7#nLqT1&Q;A'(]`jRW8,V0m<\JC5c3G7QNIK.Y"oMsV>!#;"2.*rb]h4^0dck22HQ7jY4YFIj(`#bd;?9cZ8`PWZPN0-\j8u`$dWHAtfHX;DNVX?aVkGPK(\MeFW8VRUe6r0oR?^Y3C-US'%*,4'Xol)QZ.6hiMOH/UJXW@or4nUJ8#`r>KbMr=V'Hb=+l:3IpI1[F:Q8MR6D_9n[2+Ws*CB`4.0NO8B6H*Rs">%I7+pp-l,<nJ_p4lk,/n=fQW?6c>)ZY34E39q@l]IV<Q3&RkJMJ)l!G:1>7M?Kj1"#+b]gpRV%%qatk)\!BNJ=Q(V*g<,Qp+MrS_l%0[)!EUc,Ilh)dAaW,Yk3tZ.[.J+d"E+Ah#=Gp:dnQBpW2[V<W,5_gBklrL\R'\6=G2$u-Ipg6>>iC%LV"&sIFdF+e5Whj,;_T(-/IP_H`oBZP:3JKt$)r8YaT_rOs$gQpBA!SU<3RVE0e/;qN-\^KoBAajC]>'%VZD40K)Vo1qk<K%9SGp;A"-mcU!>lK/c=edgY6chpU]L/C8:mr"H3qTFBi*mGorIE6OE4MAM=j1nN$]#US0'U*L[[i].Z!O;P+iX'l'eb9'<HsDG:h;$N1?tRL%eN9kq>A%t4G/D0Fe.c@?W8]uN7[HPWM\hHKo,@]Pd(l_oIP%.r;#R_'?lqV0&Hucn:)5f=%HZaVnY2b7^Z@mWnQI5p"9TGYGD(T1)-q_iZT15JQ9lo]<e-U^0RKrK=6D%Yg`TZn[?)a>dHcJ4`=^PX/9IH+UOH',T5Mb(^1WRa>3T&E\d:i~>
+endstream
+endobj
+69 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 68 0 R
+/Annots 70 0 R
+>>
+endobj
+70 0 obj
+[
+71 0 R
+72 0 R
+73 0 R
+]
+endobj
+71 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 363.98 698.0 381.19 688.0 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-xpath.html)
+/S /URI >>
+/H /I
+>>
+endobj
+72 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 263.38 597.866 341.98 587.866 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://www.w3.org/TR/xpath)
+/S /URI >>
+/H /I
+>>
+endobj
+73 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 270.38 586.866 424.81 576.866 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 33 0 R
+/H /I
+>>
+endobj
+74 0 obj
+<< /Length 2451 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gasar99\,?&\cSp;#.ERe/0A(k2nMWXK.k63=fn@.i%6_Tcf72M9pjMjf)5YHU)b,h%2$\Q7i+ndHGI1q>n:chYltM[ZRg#2V\19Yk`;e2hCqLND)^_9T)6Y.,A]8Rt&-NW&s\Nk22Zq?`[54OTA!Y8S"4pI#0djP)3Z>\iZ,sTaU`q)@"KaDS!FT_?JWUl;/RH"<5$a+8,VfPX!C$Ui)#IWp<BSG5&q$<,^.L.o4WY4KZc?"U2fD9Y*_jl)%BRf+J>5UnP;s`GAC=X"'IMXs`mid:Tkn'iC'LkXnGfe]Cu\MVY!/@-12l%/-Z=9P@Nu0klY+@3DjA"6hGd@;V`,'L;ehIl4Xg:O>'Y/4d)V2i!d1;JV%=*mSLMV9%_6p-OYlRi*'lXH$_uW[2a:RqG'l2*g1S!bfaj8"D]I3A/IDI7L5`e6gnLcXE1Q3gZ]aD>0)-p_X-tO'kMC9-H6tGIm(e60+9TNkhJR5/DOf_\;Hs)YVLn?eM?n(j/3il+Hc)2gjKQX.%3bpm'nDq.6ZG,\/[e8knrl#+tD.JIO[_bDO+DVb:-Xq0[>6.`9!bh@RI9,Dbqd)m4UJ&8q!HnoR'qq_\bIgs0q\HSit'dGa)5.I2_]o,A8;%H(7@C%GRgHi8hhFP,Ds^-#MXW'7KNBLPaZ8.72(3*Y0S5Ss+Ln[RpsRS@*pm)?UP')2']J'paRlLmd\I+Jmt.$F#J%g4!"B@ZA6DoDJ9IYo014=Z)BLiUh]+'i%MX2\FhPODTbr7QeZ8J.JE(F)omVj"D<?\&l,qrIF!YDd3G2M-G!NC9S4nnDe'Mqq&SO_(>nB@V7o57L+u/YQ]2\K=l%T^OWN;$!H,l?]pe@Y.Q)dG0sF6i=:YI")%]FSrJJrmhrrg2M.0a:@uYpX'pWonJI)%OM#G#<^n9^F.lf-Z<NXGGc;KI@R3&.NU2?*2_t(ed`=TkFTV"Uq1AZ1AqgVlf=^Wlc3?rHslFY)Z,E^-N!g".noNMcn#n8k$G!!B&gn-O6o@AE.@krl9>[fXZ+XZs%B1rH6oe$X`@sD#[%k5`,*8-C("llc/[TChY0apeTqX-Bfst6]3WSkOc?p`E5`>S(1'jud28EOYW)//EEi[:(n=UG/&3&Vpme`DH^4De?0.ia8p"Ms-L_R]1[.'=p8k9??Rlns*hV'D65GD+oPCXa%!aoWfE12-5V*t^W/.>`ItdY57BqZHjTC$KJ`oq="<J<=*^FlfTfP\k@:C&/_r^t^ek]PAAcjbF/Qos6X1@;Q\-0YBmBY2d1cbN9qdFl>M1c3M5c>J!4)4Oj'7D:DZCrS,NNGh-ZRq"$M<ATSb(^4_3=S:!F<-V)o=)qQFZ^"_n(DN'3[%S]B-Eh?ZK:8t40t.<bDC$@KOQNHN);Tm6]k3(rF?_e(2p+VHNtk:'P6[G%LQ>Uos9IME-aU:7ktce_UEdpKYq![CX[G0D'lU#luaWj<+8+:>dT(%!n#YM/.KL[aaMT*5;N4WZ>HomM"=EuO4Ds[:3Uj",jK9d`hhK#jKo&l1HhFA"10jInOua:6kTBi*`m2H7[6el!edoBk,[2%mSpkZj)iZLg/cGQYYddK+G6(*gD`ct('-"@Z>J_@DU[tK"<\'^G<0#<2\H0V0q]L]=bo<CPn;o_1OWj+qe.MN5,li8_[A9QAMeHQB8I#/bDOD'`<p,J>@4\)S/:Y*@<Yj3XYnA(9QuA#G#3_:I<Y+khsn2f`eBM[=F".rkW2X,p?U%)i+-N-G8SZg8gA#H(eo'4(2i>,\+Q^aQA-6dM^*Y\T%H3+b_MKP6=GIror,rWc\urD!MCn*U@t)D=stWd*g;6#`\^>a;:M$Wl^*+6-\-(-8@u;kj-`jX$em[0fZmdsEc15Y03;]$*Y$ErD!"QAYF-gMgp`&C#<iE-1:GlN\)RjK>fbEeB"9=Q\YLAZCH4#P_e&6DYRS-[Me1u#(f(^gLqVA"ShhLe#=!b.!XA9)O-@$"Lsmk#m7XQl@)Ilh,s<D6h=m_UeO0q/,4:I-lsUBSHOk/SR%TEdbc_uIMR:(aA-h&&4RfD$AAI5_"$@\+$PjRm)\C;V7?I&T5AH"%3"u10@FOU#dHE>(ArJWdWe7>@WQu#O/[KVH$+TOb.EGl@Wr.S2QeJl4%"48C9-<cPl:mYf6%s&4h^**39>^`lK`US@it7[TbFp05Si&l;.Dp70if4#V&HMgQ#Fr7dS)dH"LnU,O*&_8?-0(L!N'l:'9)$11?,[a;ShNt%e++a]:/s3A>]kOElQo=j]^-L#T$M0)''pj?#*a8*/[SZ:SlN8r^baQu;VGstii2\od]W<O@rKh894"d%o3=\gbJJWqNig%'N[6L5VGkAJJ6mo!'0g@&IY7[07X\DjD>b-%"!(LdW6P>0mrr]ZFG+Ln;96\9Zp?hWb<FF:G%OXYm;8r*bN#mg1`"KM$6,=p9bN:"k>,fdrr_0@G\I~>
+endstream
+endobj
+75 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 74 0 R
+/Annots 76 0 R
+>>
+endobj
+76 0 obj
+[
+77 0 R
+78 0 R
+79 0 R
+80 0 R
+]
+endobj
+77 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 272.33 574.54 455.37 564.54 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 35 0 R
+/H /I
+>>
+endobj
+78 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 186.348 433.66 276.348 423.66 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD)
+/S /URI >>
+/H /I
+>>
+endobj
+79 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 324.744 220.754 470.014 210.754 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 37 0 R
+/H /I
+>>
+endobj
+80 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 209.754 208.16 199.754 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 37 0 R
+/H /I
+>>
+endobj
+81 0 obj
+<< /Length 2156 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+GatU4=`<(R&:XAW:]hF%()p9JiLg?p3H,S?BtEP%[h"@^o!4S#NC:_qMZ3>[77oAa9'ZJ2!J<2fI,pfffpA27+"pR9F_o+P'PEGKF66X9r4/,_HGGKtIhGqS46t5aLV*+\m+?YfYH2B!UL_Y#G$b:=q9&QWgAD"[i;bb9"b?^^4Zc=pct:T(_%1oTYg.%88>JX.+Jm+LE1+f=7TbGIDV/`eT=BEL/eCJs1#CiVP$Y'.mKf)?D4aoRC@\L/,VP:m-_KrmbAYK'K&AGjNu(4U[O+HU65kh1AdmH\#?J,l<[m'S8RNoHVpr$BP/MOVBS=`';1C`?3VQXq`q->?Eq\]<CF$^,'iLTfbkea\p[_atRM'WDL.':)p>fG!&9Ofm#eM)ig<PEQ'0_npZgS;@.jJC0<cWiG\-*Db#VXaQ>;(k/pqh)=4%VmS-BU!gI_qpR4EeJJ&+\8BQTP,L4jVl/NV)naGOGh5Uh0e2=d?<@P>0f^o>_RQ;o]C'6)"'nKr>,&PY#%.NYHeHMZ_MKR"-[5esp%eaN&2TGqTRHgC7e#0iOX;BHhE;CL*&B#l6`goi_Su:Z)k':'g7,IM[PjKgl`Pa>:q,KcEr@C]u3<3mhT$3!`h^VW)"2567"61``P%T_@Dhn^BdsD0U2u;CCgY@8\gbLf!]:BWGBPC!UBo#kb$LrtWCMa[JBZf7[#Q:gN<DCN'R6XV\n_?7q&if3CpRQAh?Loo:u?8H%@f_9efE5^9\Um\+6"\7iubp5n)Ne7IcYi5C6W1o.S8rLW2!65"'X=qd&iOZ1+tECitPGR19R5ho<O_n_$q[UVOrJWQlk#iaK[>Z2.t0NiHn;+C_98Rj-*Xn*?jmeg!6=n?;c&AV57Gejf[n#<339o!1R(gjSSSZm4]+Pk_&df#`VD#O8Vh=*L4B(b54n]6-7UBu-`p?9<6]o7/JiZWi]FtepGHIP*%g.]NX*@o%(b)rS2dY"GZb':M&O`aZdc$N2Ro;j+UhQs+kM'Tmf=Y?[)g"^qqOI^UXp3ljX26T,)]49t$+R'e!'Cpn-k1&_2IHq1('$Y,m?\!IJAQtHkj^>S+,[VN$XP31LjLiIK)BFO<T1#\T(u>(SWQnZeRRSQ9W6_I3V?ldFKW[o!56g_&jI9"LR;[L:oe);Ek=`(P-FdVsg+6(CE?%d-RnK?<@qHt=Tc(2DZ@pUq(32)l#d\IE&:6r=$7;Y.'.I+1OXhp4>YI&UWSnGnS]KFSVFk;S<Pb`M\I<2%)Hr@(*#N$OMZia`Ts?=6i%PGA*TaCn^_K.9gBeQHqtHCI$=)asXnr!f'WkWMH?33PMu>V%h/colS3/ElIQ02bZd15,g!3(<'mZa4P+uA.-opVha"G\;[Ou_]^>mmQ3kj2TP99YHpI'&sEH!1LEGC*R('l&C*OG^&i4F7rq2l[$ZhM:j(V1r\>Y"Cm%Q`;k:FC&DgU8UXs-Xqc[I1aJfkIW'TY/uk"QB[MUS#lU5r7Lg_9a@.k.5cp5PqtnKiS_K\gBWAN8_E+[_:NunDoiZogef7OTY6/ZE0haWh..]2"Z,.GE_ZL]KQ9)me=>po=Mn@hm\3JIQ]_t<*a-lVOeW=]-?jqG,>1uY;A=oG[[?7#G"_R"Q)*K`ic>j,8"nCXSLhPDjaSBdrbNR`[)Ud#4P/P,ReX8e;(u9L5JoG4,F=JpqGF!X2TX*JeuFM*+=Y/er4G^"LPoFkS3o%pih1F%u(J+-2]7V6Pa.VK:*od36#ccZ,?$)!Gth@=%?@u(4-P(g<g&h`8'TH$-)j$%A"dNoB\r<*EhR7lmi^UXD?,'hg.D`;*c+Zd4oN6eO4%>EfJ*L;i)j/nJYr:rd21V-a)h@ajIM<i[s"9n3T3s-[/H/D$Fk!E@7UM)Nr6!)HDQLi$ir$]"[k;^/Y'0W2VDgOQ9p]mk2mj0uV?o1/s@H^2LXGa.[8l:H`5X^iaM7#aeu]I+i`<[-Qq3@A5^<E;=hO)@<r55J_KlNoeWTZ"@%>i")]=kt'84)S%&-9*-ro$:^7tm[FfJ09:DkXg"f17Ub?+ooe'C!qh2N)/DpTU5(8aYhhlg2J8ZT:ZG`Da6L]A$gItu*E^k9.aEK)Hat<aQeEn4oJ&3$]aN`f:Cuar^M0OC]9[d2%&gE0kp,1%pn;U2#!YSMrrD8WN7%~>
+endstream
+endobj
+82 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 81 0 R
+/Annots 83 0 R
+>>
+endobj
+83 0 obj
+[
+84 0 R
+85 0 R
+86 0 R
+87 0 R
+]
+endobj
+84 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 204.89 545.98 279.89 535.98 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLNEWTEXTCHILD)
+/S /URI >>
+/H /I
+>>
+endobj
+85 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 338.334 437.654 471.934 427.654 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 39 0 R
+/H /I
+>>
+endobj
+86 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 144.0 426.654 242.88 416.654 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 39 0 R
+/H /I
+>>
+endobj
+87 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 246.998 175.034 306.998 165.034 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://xmlsoft.org/html/libxml-tree.html#XMLGETPROP)
+/S /URI >>
+/H /I
+>>
+endobj
+88 0 obj
+<< /Length 3062 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat=.D/\LD&cV3*Z,h^W?#-KeIn@ugaYcPj8C84+iX41(5k!--,$J\2;>.Q8^*I?i)9Q.;.IIS9a5h2O3#p4Wn%7u+n#s&l)Fme.DROa*n`Kfpfu3#[Z>%H0hGeJ1`EBP#*]O+Fs*_BBpStk*YdmB,.VbunX>]N3p>(?@7b)])2ZMWMs(k(=Rj9nMNBf-Ja`Bh6<?9V8%at>%ZnRZK[#*5UHV(N*g%ECLd-=Z>8j<o9)Z&2h*_0\X+:7Z\#Br#U#PNp_5O)XSUXe5]]t1gS];a=QNbHnYNj9ijXQEHZjWO:u7$0sXk5FZ\NK(sPK/ap3PDJSd,6?WLpn*'3Oau_1HnRQALmA=oYmjo[qrQJ5Y<7Y->C4:"Xd`7RABsnA\mOqLo#gm\G])`CqZA2kJ\<&RI7G-%%caI9)@22KWDu$$Uck3MfXOrU#JD`]+4S@INT7rVGZ8NQkTJX/\s[h0Ar;@M=nh%.b)q%Z($8UC_Op0LGG8rH0%hN=H,QKG#;-.>$,KJ\l82YSCrRN6![?e>*'6s"R?HZBb!3>d=1,HNbjB-%otsYjL^8LX!)4]V.3OFF)#Mb`KMbAFS.pp/UY)g+EkEZ0S9>-(@\b^_%fg\BY1=%U1G[<^cIV9KQ:[=]ELb<T0]ph[J%_lJU:El_hC"W4O?QDl"#/k<L3VnPRU5FBmOH-2qgg$QOG1'*(e78j6n5lfI$0Z_\=[2;boCV[]:6C&]iJVWnt5>:Cecr8*_!!!9c68%"6&&Qdf#t;dpfQi&Ve7+ZR!jC@5'E.+%3U+RQ+FQ^,spj`cOR5ZsunQ+#b<)=sB2;c\t:5drmt$So8AUaMd"-86MVphQa=tA%"cf#h9:RRLo_$%:c7]&2m<P"@"DbkU4&?iKCF[2LrHLf$#\7d&T`PeeQ3Vo.u"A\7NbKgbC$m[g:$!8\LXV`psK_;IV>67)W4!#gKg&>!9!W;Qpc9KOVJ)HVG*fI>>('-\+n/5H$_Xk/0VIdb(06+?2U@NQr'$l1Knk@0CdAIjF(b/L(+4)V,R6OgC3]OI^PbT@nDimj=L=W,XkhqE^/c.rHN/(mPeT8D**'g0I$kG7]DZBm:PP`j6,r7l]@5j13Ya&kXCW7GjYU5fSZuoQsmj;2.,^>8cHFL_F[,E'b6oT+B'b2ICQ.&B=]@Zm"$qa'7^@`jtAh@6=t/?g'ZMNfai]3*2Oa.4]FVV1+XAhX*)@9Fr1>VKOl\k,L+_Yh`Z^ES2"pkbD^+*TKX.Mq1t[JF=j!%&RFLEl2nJ`G8'nXIMRH:ic90+f%bjM8"=gU*&pA,oX4XrCMlT:U%Tlk*Di!W[q<ho,P`=]J2')!h+NQ6g%dZo5+u=.I3qL2;_Tt9hm1,VQ"jA6/5=s>5TR3&j/f(>D*l`N"luAPpDgS]ms?Y5:j;4jois'^e0d9>952;TVuH5KXi:L$!-i&P>\*8j%d<uIkp\KN!O;e:B3T6r(QQ^`+!7u'pC*!XIpqD1F+Vd6VLA:_QGepCS.qQ3^NiI6s+s@#?`+fnD5:;@"A%k)>#^/35S<4N2a:dKD,Zh8>^2!B>pr:</r*A`W+sa\LJUC[j[gi++e0"9TLRl#6k6>@UHMSU@&/@/RN?5-e!^M>E\-T-13UJ'RG[tNIq]S8N\nl"prl^1"-pVeCPoe^!Q@r<h<iWPq5hr![u0&[:atJ9p@nZ',osBogT!575pN>jDNCX^PFjk*!"35#R245@$\"'!SV>1rciW^2<_6qN/LVX4(QBHnP8:^n=?j<_U[l*I2XBShl's<#KqEBT%1rqf+u+*'WHGj^'OTu&RjP!;%M,NZUob'UC*pfqqYf?[S*?r0l66+56fQD:U?'hje?+T"&\CX<:Odcc!=ES(.FHTC2F^"C,5r.OQ")dK!tl/2<'D*f-)Bt3=j5E.R9%R^9T7og?#DbIO:OscXcI,0DE8\pTEe/jTAsm1mA-u?)\M6W.;[R`sKU&YjXUtU9=BE08?N^ZQYbiM0WX;iRpZ(aS=pVgN)E:RIW5YCDIDo8T#1@d,OFd_AA[R-K:XL;B<406j`gL*#=H#qH.:&a5o)M[=i5Nbn(OLN@D/>)J0je'%@=UZFHL]GJC\fhoi20IX?)aq?o#B>gDk>5)ZVOb+b[?[ekkPE%X3Yn1Wb9n?:dA/>&;9Ms@*KWQf!$e$<WCWE/4/OX@r`Blr5DpVar#3>cNaK4RP+F>%!'GP9HsFVuKJ'kf\<\7[D#=$6j+q6*fah]f@n.Mi&<"l'FWbId9J*>A=L,7A%L-.f0OIl+:,5IDS,I()"$SCKYNb,>U-Gce`PQR2IMr\h$X<>#&a9Q&:aHr8iLWp=&H;0YO_^M+X9AW/4$j1]ek.V3#tnZ#Q,:kc"geUJn4q?IqqfXg>0K?6-Uln#[Bn@RbNj`uF^k"R6SOCqJhcY$hC5Q!FQ3[_pr]ME,oWtLGihWT/B7QW-dB;;-WnE.VEW@liO[#F#?UuLAC%Q/g-c46u92`R&(3;CR!dJeNdhTW1G=Z^*A?<=n]NheBAT$2@'YM6lpTH.*`F>(jt4crCCj>Yr_N)LahT]P]ccBcE0RBlTf[T"TabbnR>Dm4qt0Rj$n4NM<iQs?[m)XlRrs6Al"VQ_MN(udb/+I/$Gl\^:.=ikUBMi",Y(CL_VB!!m]U,#Ms<Qb@6P$j+pGHD_ET7E"<Mch6WVr#tk+UML$fUD6)a2@PC9iD7rXXC[r^TKPgUm.O";NBVlq]oOpKP1$f$aq_&N(IkEW:OE9Y;S"+lDRDA5_qAF]n'=NgRjJeIO'^iJK$sL%c_p/+PA5OZ9*RC(m1pN(S.*Q50dalr6N&r<)Q;E&:]<:0`NDO(eR^$ap<spJGnba8`#;I7o^";VHmahn?Z+;r5C:`Nfq$`Cf0"][>Jrq;5D#0BAb;Le0H2%rKS_L"q%"%L:FX._].JPV[T'ps-5e1HGsI<jk-c#/jYk+-M>I^`_,he%/1EYQ,m@s!3j0842/.%^)-WpHgr3QcR7$#._!)hQJ-=p7YBLO?2XZ\].Kkj]SW)Q0JdKK?7p]!K6hN!l$cI'?/NOFY3b7%WlFQ%QD"/E"T8ic:i;a~>
+endstream
+endobj
+89 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 88 0 R
+/Annots 90 0 R
+>>
+endobj
+90 0 obj
+[
+91 0 R
+]
+endobj
+91 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 219.0 344.54 435.37 334.54 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 41 0 R
+/H /I
+>>
+endobj
+92 0 obj
+<< /Length 2048 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat=,D/\/e&H88.Tk5.-$o'>kHJR!`l\c!i6+8$*Vg0?uM7/,\P"SYDK44e.-^#*6>B5=hBZiL-T&[NTkdSaAq''d^Md0o*5'*:>)0T9[K,kqd^l5LQE9&Qoc<hC#8BXY=7QcVBf6'7>JlZ$F(Y-OfVH%Li)OdsJ9,j@)(AH^0jUVUOqmIpKXJcU@\BUu(2P&CK"(b2(*sccC0I;+VZIt2^/tKbJji9`0?*):f=X@qVK$HRsWF##YU>hDO#-X$ZQ>0mb<Z.7E;OlGPqt0^X<`?t@YH,5i:l<7XXP53plM0rSp4r,H[eN$?_SdI2=a:T#,_BM,@D"%n'K-NS6h-jk--regEJg8e]N>t,f=_!Y6#1M:Q$=A@Lo".+lblXl(a1Pg/La0([KVlj-2".T]&;]U[V9r)c=Sp2@?_1n.`B3o#skAJZ!,<f9;8BY/_?fBImqj=[lu^?5uNPem'i=hbVDaR(483;Vkhk_r$[FfX_F5@OX<Np`[hPY_*SH@ACdo#\>J\Rr6$P!@TQMQ[Yi\`IEGG_b9oZs=Bf?ume::TV-V*R,^"a\9O7,_e27Ap?'klu7Zo%%&HRM3qhq=MRr%dT)_tR&c$$"qi.J.F"U:#T,28X6bJc$HZ?_M\VV?is-l3sQ-qQPE<bS.Ml,,nF$iP%s\>\(5jbok/+0+[\4$DhX6h8BU\8]WTeJ,,6pC>Up-4YcVNCQ<o@ha]LeFAI<gaGK\!',&hY28Q(16q6<3q<>"8-0J;/9,RHPlb&O[$Ip(F&o`[BFKc^l=H0a@aD57"%9g?oX]1M0t7ceY,P+5<=trle/De_)a^r=DeMSO3mjI?R;Rs>X_W(s5A=<fCXY&f-Sp>Vj:=2O,g)kXU68G1j;f]$HWG&e\na.cOVOBb"&(Qn7EN%Ld.])&:IoOBiYEKKkmS8:ZtZC2M24&YSiUihY#.d&7/\NonBR;rc)QRh&iN$>nSAY(,W3k`Q79jM?S2KPh@"-RU`lPaMGR&&)1;MaQR0dQTf6P<.^I_91nV(jK@5W>)[U6Shc7;Ra,te:;oUDN1:(m`Ul]`nV86mc@H=4),`%TO]uZ9e/b^V$nKAm$FC`I6XX,*OQ!Pm5^U7:h?+Sc`@g:N]3YNaSM:S_H@>%1eYla[rNU/Kq.r8)SdHbk4h"*H`UIF+YeVnK$hsd't*Gl4r`pLeLAfPSr;6B/Zc#B#eB#mu8oUF<qDejOfZ//OXE/Tlk?`rSWgGher:dB>k*86\C%lYS70o.;-n&ebM."+6;pPqTG"GMK_^<iduRcQL#>9=0*VES82q]4_"nHk'X+3pd4,Bje&61/sSfD2\hjUjY3ceu\m9lm7EHF)Ca\Q^*$>g)Q6LjoBsI#o?"Jpj#1HS+(CoMQ.Sac0*g)b8M$!AJD7f5:eRcU[@<)+bG_"UEnsH+q'"9H^U@k(@l5GB[qkf35n4#5U7r?AnQO:PNL3Ye+gE5c!E.eEsCZ"/V.s2;1eBlU"fH:'l-.q385kF%/\qWeRrE.36<j&ku$B\*tC:mcY.40SpGH.)F6h5\`-?9nGWni8,%VFchaRJf0[B"q/5Y/j6SI<S,cpH2bXJB'+5JF9pOg$1bpdOgT"JWQBW"Pp]n9g^@!3gBf:s[]';t,IE9!a5q8rU-:k.PEpK2SR?Uc5`7C1[-EZ2!U#1cmQL4KgSno$L&]:ld(S^?g";i.r_Fa!p'qj6rrICfnZ&)F3QlUCPrruMmc]q4*A22H\ba*5X35S79$^S*h4G>c$G2,S\9h>V"+f[7o2J8!Mh_7(q44IPeNqj.*,L#BX33kSWrkUS+FVc6JBZWGMr'8^1r/k1C/pfDLp1G'1Q7D;kY,/68llZ-?5IYkbq8-hrpON(?pB6oj<[r06)u&&/I]t>31<_imL/Bt^V)]Gm=(*W_@i]&@Go&>'UIC7^eE=O\Dcq9aGee`WWg<q$6leY5d`u=fkCYamrEJ#]fn!n^<5=I"^L+u'KDo#CE43lN&p:25L81=-XNP:gr0:bl!GurpRR`qQS#QinZ1`<^9AQfa4(PJU'16FT(iXWd6R^4_`S;o~>
+endstream
+endobj
+93 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 92 0 R
+>>
+endobj
+94 0 obj
+<< /Length 1148 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gatm:>AMtc&:XAW:f7XD8LJjlD/Tr%P/8B,SCWB\Pm>iG-N[Fk=)sd,c@8'jP&*^ueo%/aJp'</Dn_X1\'rb#PmT2H'MK;f'\n[eJF"?fYTid=+p&A^dq/#kr3/jJo%?`O-GabSSB?)JcX'@ugL0m(Nh3KT6b_+JOO&&FEOIbH77dO/>1$Ml2.!baf&08=$@S283c\,$][Y?I@usVs9a8_62%o;Dn(@[0q>.ZI3,--WmC4:_>mj,Q2p![Q-HXD!1bQq]2WjAU6FL4cXDEl,H0;DPM9O^qZ(B3^;(U:4q?WW7U?ltd_o=j9+B7abk]1Mq%haO^fKf>kYQSEc)m!k0I,NbDhWs`BSsPeCG.CUTq?k#*##l$HT^Q?f!68O2Oo_I%f_'8b55'e9<T+LL>VH_0bLnD@[E[3b>GK%QK_RP!S2!k<&G2K3+ERl8)p5),ba,::YifpEg!=suk#kRT$M<aMmNDD.$fu)"k2t'#n/M.3%TIcDSaXremmLI<lh9hsjOmi%\&VK-IZrs.hO&LD:HG#u`9euVikY(+eW)'gJfh0:$TUb#W-1i?5k8mK<2HWfPGE8p1H,n/rjVsVV"2u,CN%Cdr,Kn6-@kY1Q:9ht^Ho5q?:hTH.uHcZ]f<mU`Ba[3#1I;gIWB0b_tgBhT!sYHJ2fO=(_WL%9XQoirD4!UKIR;l@/j+RJ^WF$@&"nk0R8b1G&18@/jWm+o3-`<#WF!Zp#M2CZ+r:!0&n48C<6nbZ+90$hCn4Oqt#k9oP--J+j^\HI1+:M4cG%="Wr+9>ZgCh<Ms=$3898u5rL01k1Ak\,/2MZ>1KN>n!0hP$2[8`oq;-N(#A]l843_lYDgjGq.`[7!p$Cn/O:*_[9\;f4G/TpU;FA\2ad\ASc64amQ*j^-A'`jl`3tL.cUQ;MIK\emF&I8mehqH=98fbI^p\@2`%b%^Mq@+Yt_#RB#47Jr=61NMqmsM?Z+lo^3=Yo&2.+&=uLia[<BTm]actPI?J-IFPV@d?DYb&gVDteC^0=b%&[ioPrrgB@:c5+fa';D^;!lRP*aYFpNdj`6m]adD%!soAA='5(8H@LDr(98p[TS'fn%2G<X?3Dk&hE#",p:n:=j[K-?2*5cYc'kd,!9,L#'JSF?@8lC+]Ap_h.%C~>
+endstream
+endobj
+95 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 94 0 R
+>>
+endobj
+96 0 obj
+<< /Length 1343 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+GatU3>ArLj'Ro4H=@e]"929(]2c$p9LYX:WX!g]MXAgXoK*)5A(2R`TCnds0^#KL70k6*@8-GD<kPBViSG>,d?/8*X,='P%2+#T7KH6lgY_+CT0*QA^?t[2r*[b`g/`Xh"\`>0*TD4Vhf-"e!0D)GFYZ:\0H2%'_H#i&^1g6`V?ZZ21Yu9oRG4T4VGfX'G[%@$SF.Nb;QKL<3>W6#t^5!h&eSVfnrhO_ZU6$%-7B%tG[6s8[Ds>%:Ed-+J*/N.Aq.n7]cmj[K>nTW[b+GK_;C0G$X<ZV@<Ko@5U:Bm#b6(m*cfon`:hdMpD`2O\El*mW`t;A7.03JG3`4QoM7TB_nj3WO.ae9`,qo?Kb^*"V/'u3H"cP$J$OPrm+L4JVmgh_Xp"/@ke06CS@QGY\0N',PMO,em=hBo1KZuQ>q:%k(lV?4-Ve5QV7_uuJ+$[_AVI$ThO[])kS7/:cQcpB35t@ZtrPk_OA`-UO=12q(.+I.TDj?dq]PX0HQiSp^in-e_(T5s%&-GtpmQcNs9p3GsR)<UapAqKsaafumG3UdnK4(U/JKtK6GsqoNIIe(fDI.Nj1(E87"#*6olj+H:!`7/CM(UW&';b!RSN>(V\Cacr,N$hM+/Kq_4266XPRQ*(E1ldg)S-nJ)6>"D+DP$U%C1)npoLcne!o_WHTU<PnjCqu[,:lT\._iU+q>5-=/mP:6'j0$+pFWg0(7gaq1k,%49>6DA.]u8$mpmO!S#QR/M3r8`e4ZVK+4DK!MTo^bQjb3L'[:KW4#!j)&0MLA<<nIh7L.L>j.ee:9PcCH[r.&c"i7aGK9m7Pl*bL0!=hs2Z;JhDi?iu5=f.g@iA][rMeYf`Q<.:1$<htRQ4Q&]]3`1E6EOcJKXu.4Ls5L:UDTWpBQU=PCTkh6WLX^UI9\a9cYn-9(VsJ/$\kkZZBCYPk57X,n8Gjqr[*dBrCgH[](-+leqHt&O"f,ls^:&__lpqCq\XnZJNXHeA\"qn&W%(7UQs;i?trLllj/TGgS.I""./d/5X#h&'Rf?lIO_=b,rlsLSK1A2GLm6ji._ZX7DB+f6u#T-\T%7=FVBXkZ)spl@*o9hR<d<6Kf"G90;l>>Q3Hj_.Y\"om_S/X%HKVa0rA9h;Kt[Z_(4j3R]rppClG(AKEruL/4-X$BBk1AYPo(_5p!U91E/c?Q*ZG<R,_8eRME%@TA>+IBCk&jV-92Gm7\rR@-UBKZ$A>O_2%kn7BV9L[49J_9U;QoN-=i0(7FlM`AZ"^M<s5M/lXlhaS^Z]/cq\k)FGNhjEY,blG?`T='U2-^PQ3c1bA2KYbZEO6\<^d9LNTmg"/=-hRgsEMMc*4=]f\~>
+endstream
+endobj
+97 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 96 0 R
+>>
+endobj
+98 0 obj
+<< /Length 1240 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gatm;gMYb8&:N/3d)q7\,\-8%gdNh\j4XZ?_ak^=WTo*[X_a`EW%0@+:upLi98_k0imLC0#SOMfR@VM]1HTtC)kC?8J:nI<Zh5^TDFYrXnO!AP-uR$JKpW"L/GOS_OJQ#JlX,S3I'UV]l)SOf:GD\E80u,[.3;JA;SC.qS+d;seRh#8C.Sb)eQPG/4-NHmQVhE:S'37U7u_Sj(,I)7<r6p!358o'M1J8<dZHMIJCB-lQ[gDr*.nlW#Et'TV)oX^_K=ADXB(nb+*rEDR-rhm_]mj2qU(Kb[p;LW@\B1.5"kHX\uVnS,(@3W=%NF:DgR*POoljpasP5K^"P1G.L&VFaX=98`.9AP2Q@tbkP3;D<g^Sp*5OqF-dUIF[.,3S363EYT8R7101EE?Vj==mr)f\+0#,aIde\B+g.c,QMfsdU2oq&?`,]K1M<3R1H1q0nRN1p5]D$e.nO4jVZF7\ho_hHJPS\O8\oM*C>.aUrqV#)4&*CmWhP1<'PnQ`:cBSC\0X.^irY"6hJ7t,DV-bJ\&?@^D-C9.T6@`Mt(f`d\arVlo?Y'!\UmGT1;f_/l"*8rZi\U]`**dgJpLo9n6qrJ^I]N%:6`@"2?6uSRg8U(`f,U3;5W(hQCR5gmoA=X-iWp#>MK6>RY_Rp,]^$#MOE*LV?o-0L]GP/4G+$Y!p6<4/();o@?+7H-;K'&1?(12tnRA)N:LcN>O('5hphg'NN]0*F#0)$!X[Q>#;3O:6cA)_Gq3s#:/;j!ReMc@%X,c-r,?6BL>oQ;DHik91egU-`TsIJ(mr5c<B.1Gm8Kco<P94nB"@dhG&fOF$@Ls/%,fHcCH0F/+dO__!Q,f50O*Uip(AYE*!-ciX%rR-B>MJR#1Jap>EX=MpV1!Ja"GPlZH0<sipSQ#MSS.hZ)h9Ap:*mG0hjMBI`c2MO9L24`'2ki\L`_86.%k;d;PFk]pk^K$&?QM])p[[&2V*>86n00?&'*M$\FrtUflpL7M%u&M^%@dic@,s"CYgB5\u<+tT:S"dm6s\mKp1u`Gg`-O\s%[=RQlHCKfC1cUP=BuWSU`i!='8K<%J/,>jm?#&9Sr)YIR\t!l;u]H9JH"'PZag`7AL\N$RetRk58[RCF!E0Xj^TR.2.<J*u@Fj_XQrrOPrGM)bSK0P^Vt+p+Nlp#s<WSUJ0a-a*N7,N;+aQL2f%CY.+LCYpF+ASAM>&gWCBhjtk*Hd+^BYdZX<a1r5K'AB&M($PHk('~>
+endstream
+endobj
+99 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 98 0 R
+>>
+endobj
+100 0 obj
+<< /Length 1188 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat=+?#S1_'Re<2n.r-jY2In&jmfR*Zp97s.`Cb0-ense32s<jSK6IL#k?f_:@*5lG[*L6Wd$;^I[kcJh!rSLltW46ie$JIf/)%3b_Y<=+*!+2\EMn$?T?6Yq)FH'6@J)\n_AHbr/Xi!ARQMWH0O*FbI9j/:I1sWgjekn51_:m:,3sYM#3?Q?g#i6dK$%<$ViD6jG6I[*?^`)H4tGIc^o@<BlM`gHl\TN]O(:k"4<pZdn*TCKDEKA,2C+446Z-%0>O$@a5'@OD@g=p`[XINq4i9U>Ro4sr%\I_6_BC^8nYuq4l>&U:)Wg9BA^^Q\/\&W:(q%Pb4@nujEB=<:`O/d7?`tl#dkQ?3A>T5ACSCIe4';hr%XSseO#.T*!@3rLn<AY%);6pgtY$I'#N\ea]!uo)h*e`\PC%_O_j(BOE&6a)Q@B06#c>8ahpHc2&cdQend>O-)Oj2:]ZfK*G*5_7LZ%`KFn5Yp'k@\QpW,q^QsiXG4,1a]1jCU5SmBlN/V^gr[M9o]nLU3Hd@2D<rM3eeB+Vgm%^_uK^#XO\r!7^Y<aSd"""p)+!k'sX]@o>Se^?:al2[,B\Ju$^ss,9`F*1E],l35de,NoA4&07JWt=76Er&Dn<:k+Y4ksY^'BNXB]j?g[+0to^_f'FjKYgl!cR+:cZ!9[)TFcSCoDG2FU4&abbtXncGOsI:,$Kh?Zj/.fT\O0<+u`gotb2Qa=P'OE,?RhPn-9+kdn6YkRc>sB^#U8A6Ln=lMI%C>),l<@hT8#I#r/d@.rsuo[2=dTMe[J@aO8MDT=+_J#r>'$S5GG``["PO;e^c"u6BV;+4>e'^KMGh1H:CN`DR/;Pq6H&&>a<*Tc-E%okku_T)hF\dE]*+EiaH-CEtc\GR`#bNj"M-Tij=`)e)'BO1HuIX5lDWUM6IX%&WIb'iaV*/ZO@0C]`_nU>RT[29^`GJ@)i,$^d]Z6Y+6GZu+5YFa7?Nmca7a!WME)MG/:<g:;7^$=pHam__rU@9?_5<q;QnKqnDI<B]=E[0rAcHtm(SS&o%\,FTG5j*F],ah8ChJq8b/`jfGlEd*6.2l7XQV+7`hF\"f]jB"`5JDmmL5P$p"Nl/k*K07IfNHQ"T"V5_>K#4UV]8p(#Xm3XHSg+k(j#?b66&<q<_,LhDTD_7jc5>341W.b#[WGYD54@3=D-k[/lj85~>
+endstream
+endobj
+101 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 100 0 R
+>>
+endobj
+102 0 obj
+<< /Length 1250 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat%#>E@5m'RoMS#_Q/m&Y-*H4-!H/=pBkk)Bfk'04Z+jlZOI08_6[LB!p@m^*gDPK&$p:>/edtIQmbVl.a2<EiqMsJ9["FKQrsmoa$#F7hrp98Jk"`/Q2'71t22%^="h+76jJ!l0Id-+l.UspC$pr>hpa]<VI]+/e@)i\,Q0qqRX/K0RBj\cBe<9,S\LPT6WBPim1Ii!WIi5(f=NPk!VV09YTfte)\l:i*__^Dd5>/LCBEI>oR&h9GU?(q9gJ4Gpt@oTRJKlT3XeY^`.BZXK]le+%2<2)COaSP&/$qc">XeIX)n,i-=r(?f+;YDWbAR@a'V3M0*8/o?6,m3rks<-u%4!(`bYj")W(u1O>B@5P7e`rRpj3aMDf1:Y,J#/Ks?/YBi(A:8Q6\\Lf'3dA4K4#jj[A?@:SL)u['@rG=b)YQSK90i?N*Tb@%ejQ>XBBRC"(!]d>,i[Qu43/#dY7C@e%J2G>(d91BU'c"E%\7#G@K**I]2S`Q%VuU0GUTbZh`Fc=2oj:/u4C)>+!J9$_@,UUtlS4`r.g)pW"QEOK?fF.1cV5;oo44mtLPn7-'m1NX%g>LHoIr587)DA8<OQ->:bDgK-%Z-<TT]/V>%4HkKo5r`W2;31^.0KRY\XFeEM=T6%6>R2?#V,VnA+dq=*7$s2V,DVX?Z$f,l0.82M:B]OLLDqLLR4[/`%PU2.U&+?mM[\GlJ>Q]<+7dhK?&b&sj^EX-K8'flDH'pTIZq@[6"nqo8'OQOp/qb"*<fV`"p6pa9?cP93P:)?Q1AD,eIm]#8Nee(jl]ZpR1Lkug*u]eh>d/.=hO5htJCat=u-ODViR?$pN/HbUclK\sC*A_4qZ)G&cdEP@,]Tn'M<U6VcL[Nid,d'c?hPEiUrs2CJM.*a`<<#MFJS?IIN=P_kpaCAWXQUlu<V/`A_[h')70:G'RBr`r2F;NKtNbAcDo5%bBTH8Xuc$JDP1b1d<640_kV[>grW33jcSj)A4*6#qH?o<=7(pgZ1Zm4<M4n`L;(j+n;la8X3g)a6$-V$(fi5hTgiCu[no,b4OE%=7o`d:DTA2kO_CPGHW2X,20L]dhc7Fii440qjOE*@A:W^Rc@U$^WXVNg)-eq2fOmDq"&T"gkSipbMbs6-F8Uc=ofH8]YS(#LYkJ(O^.WWXS;<M\UE)):Z?p=>GB-?%(W4Q<8f;:9uh!jtY[Xo2O,jG:O;W-g0,7;e95C\NT1k$-X^>tA*-CVUndP]rGm#FmCoV#~>
+endstream
+endobj
+103 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 102 0 R
+>>
+endobj
+104 0 obj
+<< /Length 1203 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat%"gMYb8&:N/3YV$8RXutPk05[/5,^+dT.+2.A$B7BK<\a]5<0sC"-cj&8QDDHq]Tc\=0M#r]B?jag/LHh9O[f]hDm>lFD_n(._*@54LuCiGs+f$,CqWWn<KYM<$_J9pl#6O\kABp$WCqB)Ah#]:q/WOqfrm4#em#dO2AgD+]JZ(ZHR&'CH-?3U+)c$J_--g9ouI:Mk-OMt?pX*f^!g\%XlF+uXd%E.ZSt<NDcL-:7e4EBfpP6/rHhZpM(6\kSRi=>"VKp1O#-.X9+HQ^m^9'0SW=m:362T`Df,m$+mcF*C-;bbVY!nhIhkIqPpqo$KB6bIL]C%Q"W4g1._sN;b=DVs,I"69Y'T:`XL]mO_GQ$hGgtHb/?cHZR-@.ZSOt"inu&1J^&UAW"hbTO,3_E#6i!e2a`c89G4F"BI6N1daNJ<pT\"B\$e]S?b-SB'oE/Rl%",Sg&rkh]H:7)9MRpAtrQB]%a>_[g%m)k%>nhqJ=BV(W=Ie$a4]2P4JarbA4">ddc_qkH+R,lZM,6Oc!O]b`:hun-SuADm@jR+g*,??&8;Nk,8Z1SF5YbsDlp<_s!uoFZQ/Fi^/sFd!f-S=^n@J\0b;>8aaaIns]bt?AUuFE6I".$">t2bfW/L;h69">g8FS;5)S*H#K[miPY_Y`?mK=R6^q5j*NH"Tr>]/%E^$8DT@,*S#$)c$q!6tHiE]Z`]mKXj=AW3NtXQEali1FO+k5g7`@?[.)S--H]MVaB'@3L_\k%7W,Z'XU:bEnD(pg>u4b1*-9:lIgdLnd[eH-JJj!"7'-E$R%bK_qP'S_9IK-eLh<oVShHJ^T$M(OGS"PpaO#D$H6,Q/=)tVF<\5rI!RaQST2iDZa*ZGF:Jph;:7\'cKOQ7BBMb1!Po`[O9sjZ9k."i9mGj+Un`!2<3Cnq@Cl3bGJ`pe;,Ap%s1;+]M(8pI>O?*4*N2!?2]3<8HVt(f@=`]lJXQAT+J$'LZqEtDbfdil$U*u#A%#@i+-/[^S7mdgng7ph867%GZ\+KR[<7T2+QK;Rth?sN=d[oifV(foA$G04ltNPo2V[[LWYM;Y5RK@(/he'3a9V-Z_*_4*7'^3R;.It4StQ7m9M:js0c!QK4Z7Q+uZuW7P]3lH0`QoP?6m=Q]INW"EKf#e-^bMKBf=B)L?&%n\1rA:T)C[m17McmW<YlJWnYi*f!$PAT-fpAUrnl~>
+endstream
+endobj
+105 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 104 0 R
+>>
+endobj
+106 0 obj
+<< /Length 1326 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+GatU3>Ar7S'Roe[cjX`s^%d6p8PrZX!G`XL*J3VjpF-FV9r;3)16kFO13D?%+)+Rg4/C>7#S>&kcZa9a\`i-qFM<PnMu\.Hoa#i4&b_=__]FhcFi][U*.,l2G<76sp%p69.&Pi`5[%W;d6Hn41OkEl9YEN+q=>1lT`0_JK<ZV:P<:MHGS9JMhUh;)<>\LPW13i7%;N?>O^bF;T(WEh*/XPl*sVfIT/YaO'"Q.RBf58GD8+*PlICZc]Td-8b2h\ZF$6*#F7@[IUOs1eb\#j97cd3'_bahS!^Y=DX@j^qHVY>6Q[JoY3?@AMG?7iUF"r6eK]HKebRk#;:YfCj"lJV9B4ZdN'Su:f(>J]oc%)_)17(!)B"T^Lh-1QUq2^rV<sE=gcMG$-Zm6T\ATE#])rXCB$Rc/5k3IRUT0Dqo)K)\mIYXOk4_#0mm(bh3:.V%s.>>j=ikEWI]oFK#[#bfmXKk1dif?YW^E".rmF"s5eU!QL*6YUFClC&5;+H@A>3(rnehj"M:]?u#rF$pQMq.S#g"0C,>bnd+X1^0!NdN_p@0XZdIrb]H@/)O9O[]b2BA/rh(hq'AIqa"a@a6*BV@/X*1gF;tD&$_^3d_65g3<jJgIg7,TGKcTq+U5II)u#%S&qI,/TQr4>s19Y]1`;Llr82&MEUTiK@5;I!<gH-PJpo2M63?97Pt[+T59N%"VBXq*UQHZ/6OK#YUWN2Oba*[q;'g337,+_aP))uE<qO"D3E#N\_1/JPacdAfMXTQqHpRsHMqf_V)0e;_BCc+hoRA&8?m2EWj8^[*4FUi$A(FP`)eKGfhiFWFclZ,&$T)'lB&n,@,B"2(FsJJ=;F=WeY,>KKg8>QNf7mH]<un'Df:)mLEVT<G\fnDGmN3:SEN*-^OI)nSt647')Os#+[71@].2Ki@I's(>,0BZ^@`LciSbR.\`T@,,!ZB$N[MnJ(I!fYT.F1'O+<[$(ji>]h-5U%*,8;,>XbapAe)bCVp'4#C(398,DZc5("li]i3dfW4aa<)Nr_7f"qFM>U:*`X%BTpVCC:?TlPX\#e>_6(l2tJ.S^-6Z==Y79g>6oigGnKlhkoCN7/a`\^WaYt;s)/Yep\tf6f"oGn8=BoYpdb3;D5=\W6JJ!C-FKA&A??7fg.VX1b"Tr)tDB@CD5Is7ncag)n/3u?P!qXn3d0QF*LtBU4,2;hs+djk?P,fR!OsgdQ_=5R#BL,+0!D5>qSWs2'5\B!)>7&e_'N#$B8*oDa!r6oMU0\Z0nBfY<56=<C`SQ%IGYB6UanRAp`^,]=KDs,e*)<b:'WqlVo8;o[_Sf&fgO7rrGFW:?V~>
+endstream
+endobj
+107 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 106 0 R
+>>
+endobj
+108 0 obj
+<< /Length 817 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat%!?#uMY'RekG_.,6a&.hh->Os^H-ge8]Vpf@X&$1[A%4bZ\B_q1Ud3r*9VrNDM4Qfu;"YQ/+k2J9%(dS;QI"O\h_#W-n"&,Zt@h_0JKCf/XS\.,ik6)$O,(p#:;Ds<40Ku@TIs_t,W.^6!GrnA#;$s(f9)Y?njhchE&*?4F[QJmroANC3B!/e:.BB<o6rhPBjl-+OHjAoj=mAk9a4-/>\)JOQ]!C$4[(gs)X_6\-S26U;)p&ieiOdM[QSYB]2mpjJ`JopoZP2JdO'V?T$KYciKiD*c47hETggnZGLA-'G\'#LoBWT!TojA.W9Q/SNQ]nJ`O]ANEHXS8j':ceoE+9cGii^W<orI*FK5P8_0]#I?In[aZ/'4@>f=[A1kBGCWM]!jkED&P^+_.>&bKm.5;3qTK?ppVcZ$AGm)GD=Q>Cg9$OE':kjQWVe.YT9E=O6,PD</.)`Or'Vk8PaYA/\mEU6T:EV:9P9#UeYWfnBU)b:b)UCZ/s$[H,2d5t#[q^KSl7U`k]M5gT)].$_F*\`/=Tb/nDn!'s)+hX>&>4CZYags^t'3erVnTh.?YQ\q9sZF44TY%64A7?c+qhj7TB`T'>Gd$])l4-[KR2YPVSJ_4/jW9$HYfU'(JV5&]0_?P<=eaf<-5s2DgkGad1Gs8n@;)91d-5CJ!F%[/#D(20lr6&ha,YfIo"9%b_Y4gXf9u5h@OGJ1VCRqSC_V!>M\+e+%H7@E>](t%:T`*,,0an'h\o2,oMu`\9j5r*;!sCH3#nAPNNG\AqDJ]ro_tDX%Ef>f@noBOGmLBeZcb0k0PLCUR)UIp~>
+endstream
+endobj
+109 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 108 0 R
+/Annots 110 0 R
+>>
+endobj
+110 0 obj
+[
+]
+endobj
+113 0 obj
+<<
+ /Title (\376\377\0\114\0\151\0\142\0\170\0\155\0\154\0\40\0\124\0\165\0\164\0\157\0\162\0\151\0\141\0\154)
+ /Parent 111 0 R
+ /Next 115 0 R
+ /A 112 0 R
+>> endobj
+115 0 obj
+<<
+ /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\40\0\157\0\146\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164\0\163)
+ /Parent 111 0 R
+ /Prev 113 0 R
+ /Next 116 0 R
+ /A 114 0 R
+>> endobj
+116 0 obj
+<<
+ /Title (\376\377\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156)
+ /Parent 111 0 R
+ /Prev 115 0 R
+ /Next 117 0 R
+ /A 9 0 R
+>> endobj
+117 0 obj
+<<
+ /Title (\376\377\0\104\0\141\0\164\0\141\0\40\0\124\0\171\0\160\0\145\0\163)
+ /Parent 111 0 R
+ /Prev 116 0 R
+ /Next 118 0 R
+ /A 11 0 R
+>> endobj
+118 0 obj
+<<
+ /Title (\376\377\0\120\0\141\0\162\0\163\0\151\0\156\0\147\0\40\0\164\0\150\0\145\0\40\0\146\0\151\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 117 0 R
+ /Next 119 0 R
+ /A 13 0 R
+>> endobj
+119 0 obj
+<<
+ /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164)
+ /Parent 111 0 R
+ /Prev 118 0 R
+ /Next 120 0 R
+ /A 15 0 R
+>> endobj
+120 0 obj
+<<
+ /Title (\376\377\0\125\0\163\0\151\0\156\0\147\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\164\0\157\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\145\0\40\0\105\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164)
+ /Parent 111 0 R
+ /Prev 119 0 R
+ /Next 121 0 R
+ /A 17 0 R
+>> endobj
+121 0 obj
+<<
+ /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\145\0\154\0\145\0\155\0\145\0\156\0\164\0\40\0\143\0\157\0\156\0\164\0\145\0\156\0\164)
+ /Parent 111 0 R
+ /Prev 120 0 R
+ /Next 122 0 R
+ /A 19 0 R
+>> endobj
+122 0 obj
+<<
+ /Title (\376\377\0\127\0\162\0\151\0\164\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145)
+ /Parent 111 0 R
+ /Prev 121 0 R
+ /Next 123 0 R
+ /A 21 0 R
+>> endobj
+123 0 obj
+<<
+ /Title (\376\377\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\163)
+ /Parent 111 0 R
+ /Prev 122 0 R
+ /Next 124 0 R
+ /A 23 0 R
+>> endobj
+124 0 obj
+<<
+ /Title (\376\377\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156)
+ /Parent 111 0 R
+ /Prev 123 0 R
+ /Next 125 0 R
+ /A 25 0 R
+>> endobj
+125 0 obj
+<<
+ /Title (\376\377\0\101\0\56\0\240\0\103\0\157\0\155\0\160\0\151\0\154\0\141\0\164\0\151\0\157\0\156)
+ /Parent 111 0 R
+ /Prev 124 0 R
+ /Next 126 0 R
+ /A 27 0 R
+>> endobj
+126 0 obj
+<<
+ /Title (\376\377\0\102\0\56\0\240\0\123\0\141\0\155\0\160\0\154\0\145\0\40\0\104\0\157\0\143\0\165\0\155\0\145\0\156\0\164)
+ /Parent 111 0 R
+ /Prev 125 0 R
+ /Next 127 0 R
+ /A 29 0 R
+>> endobj
+127 0 obj
+<<
+ /Title (\376\377\0\103\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 126 0 R
+ /Next 128 0 R
+ /A 31 0 R
+>> endobj
+128 0 obj
+<<
+ /Title (\376\377\0\104\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\130\0\120\0\141\0\164\0\150\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 127 0 R
+ /Next 129 0 R
+ /A 33 0 R
+>> endobj
+129 0 obj
+<<
+ /Title (\376\377\0\105\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\113\0\145\0\171\0\167\0\157\0\162\0\144\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 128 0 R
+ /Next 130 0 R
+ /A 35 0 R
+>> endobj
+130 0 obj
+<<
+ /Title (\376\377\0\106\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\101\0\144\0\144\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 129 0 R
+ /Next 131 0 R
+ /A 37 0 R
+>> endobj
+131 0 obj
+<<
+ /Title (\376\377\0\107\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\122\0\145\0\164\0\162\0\151\0\145\0\166\0\151\0\156\0\147\0\40\0\101\0\164\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\40\0\126\0\141\0\154\0\165\0\145\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 130 0 R
+ /Next 132 0 R
+ /A 39 0 R
+>> endobj
+132 0 obj
+<<
+ /Title (\376\377\0\110\0\56\0\240\0\103\0\157\0\144\0\145\0\40\0\146\0\157\0\162\0\40\0\105\0\156\0\143\0\157\0\144\0\151\0\156\0\147\0\40\0\103\0\157\0\156\0\166\0\145\0\162\0\163\0\151\0\157\0\156\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 111 0 R
+ /Prev 131 0 R
+ /Next 133 0 R
+ /A 41 0 R
+>> endobj
+133 0 obj
+<<
+ /Title (\376\377\0\111\0\56\0\240\0\101\0\143\0\153\0\156\0\157\0\167\0\154\0\145\0\144\0\147\0\145\0\155\0\145\0\156\0\164\0\163)
+ /Parent 111 0 R
+ /Prev 132 0 R
+ /Next 135 0 R
+ /A 43 0 R
+>> endobj
+135 0 obj
+<<
+ /Title (\376\377\0\111\0\156\0\144\0\145\0\170)
+ /Parent 111 0 R
+ /Prev 133 0 R
+ /A 134 0 R
+>> endobj
+136 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+137 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F14
+/BaseFont /ZapfDingbats >>
+endobj
+138 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F5
+/BaseFont /Times-Roman
+/Encoding /WinAnsiEncoding >>
+endobj
+139 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F6
+/BaseFont /Times-Italic
+/Encoding /WinAnsiEncoding >>
+endobj
+140 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /Helvetica
+/Encoding /WinAnsiEncoding >>
+endobj
+141 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F9
+/BaseFont /Courier
+/Encoding /WinAnsiEncoding >>
+endobj
+142 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F7
+/BaseFont /Times-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+1 0 obj
+<< /Type /Pages
+/Count 17
+/Kids [6 0 R 45 0 R 59 0 R 64 0 R 69 0 R 75 0 R 82 0 R 89 0 R 93 0 R 95 0 R 97 0 R 99 0 R 101 0 R 103 0 R 105 0 R 107 0 R 109 0 R ] >>
+endobj
+2 0 obj
+<< /Type /Catalog
+/Pages 1 0 R
+ /Outlines 111 0 R
+ /PageMode /UseOutlines
+ >>
+endobj
+3 0 obj
+<<
+/Font << /F3 136 0 R /F5 138 0 R /F14 137 0 R /F1 140 0 R /F6 139 0 R /F9 141 0 R /F7 142 0 R >>
+/ProcSet [ /PDF /ImageC /Text ] >>
+endobj
+9 0 obj
+<<
+/S /GoTo
+/D [45 0 R /XYZ 139.0 693.0 null]
+>>
+endobj
+11 0 obj
+<<
+/S /GoTo
+/D [45 0 R /XYZ 139.0 363.674 null]
+>>
+endobj
+13 0 obj
+<<
+/S /GoTo
+/D [59 0 R /XYZ 139.0 725.0 null]
+>>
+endobj
+15 0 obj
+<<
+/S /GoTo
+/D [59 0 R /XYZ 139.0 173.18 null]
+>>
+endobj
+17 0 obj
+<<
+/S /GoTo
+/D [64 0 R /XYZ 139.0 156.646 null]
+>>
+endobj
+19 0 obj
+<<
+/S /GoTo
+/D [75 0 R /XYZ 139.0 667.866 null]
+>>
+endobj
+21 0 obj
+<<
+/S /GoTo
+/D [75 0 R /XYZ 139.0 281.08 null]
+>>
+endobj
+23 0 obj
+<<
+/S /GoTo
+/D [82 0 R /XYZ 139.0 508.98 null]
+>>
+endobj
+25 0 obj
+<<
+/S /GoTo
+/D [89 0 R /XYZ 139.0 725.0 null]
+>>
+endobj
+27 0 obj
+<<
+/S /GoTo
+/D [93 0 R /XYZ 139.0 648.0 null]
+>>
+endobj
+29 0 obj
+<<
+/S /GoTo
+/D [93 0 R /XYZ 139.0 564.561 null]
+>>
+endobj
+31 0 obj
+<<
+/S /GoTo
+/D [93 0 R /XYZ 139.0 386.942 null]
+>>
+endobj
+33 0 obj
+<<
+/S /GoTo
+/D [95 0 R /XYZ 139.0 182.42 null]
+>>
+endobj
+35 0 obj
+<<
+/S /GoTo
+/D [99 0 R /XYZ 139.0 665.56 null]
+>>
+endobj
+37 0 obj
+<<
+/S /GoTo
+/D [101 0 R /XYZ 139.0 497.94 null]
+>>
+endobj
+39 0 obj
+<<
+/S /GoTo
+/D [103 0 R /XYZ 139.0 438.78 null]
+>>
+endobj
+41 0 obj
+<<
+/S /GoTo
+/D [105 0 R /XYZ 139.0 281.02 null]
+>>
+endobj
+43 0 obj
+<<
+/S /GoTo
+/D [107 0 R /XYZ 139.0 113.4 null]
+>>
+endobj
+111 0 obj
+<<
+ /First 113 0 R
+ /Last 135 0 R
+>> endobj
+112 0 obj
+<<
+/S /GoTo
+/D [6 0 R /XYZ 139.0 725.0 null]
+>>
+endobj
+114 0 obj
+<<
+/S /GoTo
+/D [6 0 R /XYZ 139.0 396.11 null]
+>>
+endobj
+134 0 obj
+<<
+/S /GoTo
+/D [109 0 R /XYZ 139.0 682.0 null]
+>>
+endobj
+xref
+0 143
+0000000000 65535 f
+0000046903 00000 n
+0000047079 00000 n
+0000047172 00000 n
+0000000015 00000 n
+0000000071 00000 n
+0000001911 00000 n
+0000002031 00000 n
+0000002175 00000 n
+0000047325 00000 n
+0000002309 00000 n
+0000047389 00000 n
+0000002445 00000 n
+0000047456 00000 n
+0000002581 00000 n
+0000047521 00000 n
+0000002717 00000 n
+0000047587 00000 n
+0000002853 00000 n
+0000047654 00000 n
+0000002989 00000 n
+0000047721 00000 n
+0000003125 00000 n
+0000047787 00000 n
+0000003261 00000 n
+0000047853 00000 n
+0000003397 00000 n
+0000047918 00000 n
+0000003533 00000 n
+0000047983 00000 n
+0000003669 00000 n
+0000048050 00000 n
+0000003804 00000 n
+0000048117 00000 n
+0000003940 00000 n
+0000048183 00000 n
+0000004076 00000 n
+0000048249 00000 n
+0000004212 00000 n
+0000048316 00000 n
+0000004348 00000 n
+0000048383 00000 n
+0000004484 00000 n
+0000048450 00000 n
+0000004620 00000 n
+0000006683 00000 n
+0000006806 00000 n
+0000006903 00000 n
+0000007078 00000 n
+0000007271 00000 n
+0000007469 00000 n
+0000007659 00000 n
+0000007846 00000 n
+0000008044 00000 n
+0000008246 00000 n
+0000008448 00000 n
+0000008648 00000 n
+0000008847 00000 n
+0000009052 00000 n
+0000011400 00000 n
+0000011523 00000 n
+0000011557 00000 n
+0000011693 00000 n
+0000011884 00000 n
+0000014223 00000 n
+0000014346 00000 n
+0000014380 00000 n
+0000014580 00000 n
+0000014791 00000 n
+0000017332 00000 n
+0000017455 00000 n
+0000017496 00000 n
+0000017685 00000 n
+0000017863 00000 n
+0000018000 00000 n
+0000020544 00000 n
+0000020667 00000 n
+0000020715 00000 n
+0000020850 00000 n
+0000021058 00000 n
+0000021197 00000 n
+0000021333 00000 n
+0000023582 00000 n
+0000023705 00000 n
+0000023753 00000 n
+0000023959 00000 n
+0000024098 00000 n
+0000024234 00000 n
+0000024439 00000 n
+0000027594 00000 n
+0000027717 00000 n
+0000027744 00000 n
+0000027878 00000 n
+0000030019 00000 n
+0000030127 00000 n
+0000031368 00000 n
+0000031476 00000 n
+0000032912 00000 n
+0000033020 00000 n
+0000034353 00000 n
+0000034461 00000 n
+0000035743 00000 n
+0000035853 00000 n
+0000037197 00000 n
+0000037307 00000 n
+0000038604 00000 n
+0000038714 00000 n
+0000040134 00000 n
+0000040244 00000 n
+0000041154 00000 n
+0000041280 00000 n
+0000048516 00000 n
+0000048570 00000 n
+0000041301 00000 n
+0000048635 00000 n
+0000041476 00000 n
+0000041677 00000 n
+0000041848 00000 n
+0000042007 00000 n
+0000042201 00000 n
+0000042455 00000 n
+0000042784 00000 n
+0000043020 00000 n
+0000043221 00000 n
+0000043446 00000 n
+0000043659 00000 n
+0000043842 00000 n
+0000044048 00000 n
+0000044306 00000 n
+0000044552 00000 n
+0000044833 00000 n
+0000045126 00000 n
+0000045496 00000 n
+0000045825 00000 n
+0000048701 00000 n
+0000046038 00000 n
+0000046154 00000 n
+0000046268 00000 n
+0000046354 00000 n
+0000046465 00000 n
+0000046577 00000 n
+0000046686 00000 n
+0000046793 00000 n
+trailer
+<<
+/Size 143
+/Root 2 0 R
+/Info 4 0 R
+>>
+startxref
+48768
+%%EOF
diff --git a/doc/upgrade.html b/doc/upgrade.html
new file mode 100644
index 0000000..569c3c1
--- /dev/null
+++ b/doc/upgrade.html
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Upgrading 1.x code</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Upgrading 1.x code</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Incompatible changes:</p><p>Version 2 of libxml2 is the first version introducing serious backward
+incompatible changes. The main goals were:</p><ul>
+ <li>a general cleanup. A number of mistakes inherited from the very early
+ versions couldn't be changed due to compatibility constraints. Example
+ the "childs" element in the nodes.</li>
+ <li>Uniformization of the various nodes, at least for their header and link
+ parts (doc, parent, children, prev, next), the goal is a simpler
+ programming model and simplifying the task of the DOM implementors.</li>
+ <li>better conformances to the XML specification, for example version 1.x
+ had an heuristic to try to detect ignorable white spaces. As a result the
+ SAX event generated were ignorableWhitespace() while the spec requires
+ character() in that case. This also mean that a number of DOM node
+ containing blank text may populate the DOM tree which were not present
+ before.</li>
+</ul><h3>How to fix libxml-1.x code:</h3><p>So client code of libxml designed to run with version 1.x may have to be
+changed to compile against version 2.x of libxml. Here is a list of changes
+that I have collected, they may not be sufficient, so in case you find other
+change which are required, <a href="mailto:Daniel.Veillard@w3.org">drop me a
+mail</a>:</p><ol>
+ <li>The package name have changed from libxml to libxml2, the library name
+ is now -lxml2 . There is a new xml2-config script which should be used to
+ select the right parameters libxml2</li>
+ <li>Node <strong>childs</strong> field has been renamed
+ <strong>children</strong> so s/childs/children/g should be applied
+ (probability of having "childs" anywhere else is close to 0+</li>
+ <li>The document don't have anymore a <strong>root</strong> element it has
+ been replaced by <strong>children</strong> and usually you will get a
+ list of element here. For example a Dtd element for the internal subset
+ and it's declaration may be found in that list, as well as processing
+ instructions or comments found before or after the document root element.
+ Use <strong>xmlDocGetRootElement(doc)</strong> to get the root element of
+ a document. Alternatively if you are sure to not reference DTDs nor have
+ PIs or comments before or after the root element
+ s/-&gt;root/-&gt;children/g will probably do it.</li>
+ <li>The white space issue, this one is more complex, unless special case of
+ validating parsing, the line breaks and spaces usually used for indenting
+ and formatting the document content becomes significant. So they are
+ reported by SAX and if your using the DOM tree, corresponding nodes are
+ generated. Too approach can be taken:
+ <ol>
+ <li>lazy one, use the compatibility call
+ <strong>xmlKeepBlanksDefault(0)</strong> but be aware that you are
+ relying on a special (and possibly broken) set of heuristics of
+ libxml to detect ignorable blanks. Don't complain if it breaks or
+ make your application not 100% clean w.r.t. to it's input.</li>
+ <li>the Right Way: change you code to accept possibly insignificant
+ blanks characters, or have your tree populated with weird blank text
+ nodes. You can spot them using the commodity function
+ <strong>xmlIsBlankNode(node)</strong> returning 1 for such blank
+ nodes.</li>
+ </ol>
+ <p>Note also that with the new default the output functions don't add any
+ extra indentation when saving a tree in order to be able to round trip
+ (read and save) without inflating the document with extra formatting
+ chars.</p>
+ </li>
+ <li>The include path has changed to $prefix/libxml/ and the includes
+ themselves uses this new prefix in includes instructions... If you are
+ using (as expected) the
+ <pre>xml2-config --cflags</pre>
+ <p>output to generate you compile commands this will probably work out of
+ the box</p>
+ </li>
+ <li>xmlDetectCharEncoding takes an extra argument indicating the length in
+ byte of the head of the document available for character detection.</li>
+</ol><h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3><p>Two new version of libxml (1.8.11) and libxml2 (2.3.4) have been released
+to allow smooth upgrade of existing libxml v1code while retaining
+compatibility. They offers the following:</p><ol>
+ <li>similar include naming, one should use
+ <strong>#include&lt;libxml/...&gt;</strong> in both cases.</li>
+ <li>similar identifiers defined via macros for the child and root fields:
+ respectively <strong>xmlChildrenNode</strong> and
+ <strong>xmlRootNode</strong></li>
+ <li>a new macro <strong>LIBXML_TEST_VERSION</strong> which should be
+ inserted once in the client code</li>
+</ol><p>So the roadmap to upgrade your existing libxml applications is the
+following:</p><ol>
+ <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li>
+ <li>find all occurrences where the xmlDoc <strong>root</strong> field is
+ used and change it to <strong>xmlRootNode</strong></li>
+ <li>similarly find all occurrences where the xmlNode
+ <strong>childs</strong> field is used and change it to
+ <strong>xmlChildrenNode</strong></li>
+ <li>add a <strong>LIBXML_TEST_VERSION</strong> macro somewhere in your
+ <strong>main()</strong> or in the library init entry point</li>
+ <li>Recompile, check compatibility, it should still work</li>
+ <li>Change your configure script to look first for xml2-config and fall
+ back using xml-config . Use the --cflags and --libs output of the command
+ as the Include and Linking parameters needed to use libxml.</li>
+ <li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and
+ libxml-devel-1.8.y can be kept simultaneously)</li>
+ <li>remove your config.cache, relaunch your configuration mechanism, and
+ recompile, if steps 2 and 3 were done right it should compile as-is</li>
+ <li>Test that your application is still running correctly, if not this may
+ be due to extra empty nodes due to formating spaces being kept in libxml2
+ contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your
+ code before calling the parser (next to
+ <strong>LIBXML_TEST_VERSION</strong> is a fine place).</li>
+</ol><p>Following those steps should work. It worked for some of my own code.</p><p>Let me put some emphasis on the fact that there is far more changes from
+libxml 1.x to 2.x than the ones you may have to patch for. The overall code
+has been considerably cleaned up and the conformance to the XML specification
+has been drastically improved too. Don't take those changes as an excuse to
+not upgrade, it may cost a lot on the long term ...</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/w3c.png b/doc/w3c.png
new file mode 100644
index 0000000..c541c20
--- /dev/null
+++ b/doc/w3c.png
Binary files differ
diff --git a/doc/wiki.xsl b/doc/wiki.xsl
new file mode 100644
index 0000000..c072d20
--- /dev/null
+++ b/doc/wiki.xsl
@@ -0,0 +1,589 @@
+<?xml version="1.0"?>
+<!--
+ Stylesheet to generate the HTML documentation from an XML API descriptions:
+ xsltproc wiki.xsl libxml2-api.xml
+
+ Daniel Veillard
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="exsl str"
+ exclude-result-prefixes="exsl str">
+
+ <!-- Generate XHTML-1.0 transitional -->
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+ <!-- Build keys for all symbols -->
+ <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
+
+ <!-- the target directory for the HTML output -->
+ <xsl:variable name="htmldir">wiki</xsl:variable>
+ <xsl:variable name="href_base">../</xsl:variable>
+
+ <xsl:template name="style">
+ <link rel="SHORTCUT ICON" href="/favicon.ico"/>
+ <style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style>
+ </xsl:template>
+
+ <xsl:template name="docstyle">
+ <style type="text/css">
+ div.deprecated pre.programlisting {border-style: double;border-color:red}
+ pre.programlisting {border-style: double;}
+ </style>
+ </xsl:template>
+
+ <!-- This is convoluted but needed to force the current document to
+ be the API one and not the result tree from the tokenize() result,
+ because the keys are only defined on the main document -->
+ <xsl:template mode="dumptoken" match='*'>
+ <xsl:param name="token"/>
+ <xsl:variable name="ref" select="key('symbols', $token)"/>
+ <xsl:choose>
+ <xsl:when test="$ref">
+ <a href="libxml-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$token"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- dumps a string, making cross-reference links -->
+ <xsl:template name="dumptext">
+ <xsl:param name="text"/>
+ <xsl:variable name="ctxt" select='.'/>
+ <!-- <xsl:value-of select="$text"/> -->
+ <xsl:for-each select="str:tokenize($text, ' &#9;')">
+ <xsl:apply-templates select="$ctxt" mode='dumptoken'>
+ <xsl:with-param name="token" select="string(.)"/>
+ </xsl:apply-templates>
+ <xsl:if test="position() != last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="macro" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="variable" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>Variable </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="string(@type)"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a name="{@name}"></a>
+ <xsl:value-of select="@name"/>
+ <xsl:text>
+
+</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="typedef" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <pre class="programlisting">
+ <xsl:choose>
+ <xsl:when test="@type = 'enum'">
+ <xsl:text>Enum </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Typedef </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <a name="{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="typedef[@type = 'enum']">
+ <xsl:variable name="name" select="string(@name)"/>
+ <h3>Enum <a name="{$name}"><xsl:value-of select="$name"/></a></h3>
+ <pre class="programlisting">
+ <xsl:text>Enum </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text> {
+</xsl:text>
+ <xsl:for-each select="/api/symbols/enum[@type = $name]">
+ <xsl:sort select="@value" data-type="number" order="ascending"/>
+ <xsl:text> </xsl:text>
+ <a name="{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:if test="@info != ''">
+ <xsl:text> : </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>}
+</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="struct" mode="toc">
+ <pre class="programlisting">
+ <xsl:text>Structure </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><br/>
+ <xsl:value-of select="@type"/><xsl:text>
+</xsl:text>
+ <xsl:if test="not(field)">
+ <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+ </xsl:if>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="struct">
+ <h3><a name="{@name}">Structure <xsl:value-of select="@name"/></a></h3>
+ <pre class="programlisting">
+ <xsl:text>Structure </xsl:text><xsl:value-of select="@name"/><br/>
+ <xsl:value-of select="@type"/><xsl:text> {
+</xsl:text>
+ <xsl:if test="not(field)">
+ <xsl:text>The content of this structure is not made public by the API.
+</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="field">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="@info != ''">
+ <xsl:text>&#9;: </xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="substring(@info, 1, 40)"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:text>
+</xsl:text>
+ </xsl:for-each>
+ <xsl:text>}</xsl:text>
+ </pre>
+ </xsl:template>
+
+ <xsl:template match="macro">
+ <xsl:variable name="name" select="string(@name)"/>
+ <h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3>
+ <pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="function" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <a href="#{@name}"><xsl:value-of select="@name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text>
+ </pre><xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="functype" mode="toc">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <pre class="programlisting">
+ <xsl:text>Function type: </xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:text>
+</xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <a href="#{$name}"><xsl:value-of select="$name"/></a>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)
+</xsl:text>
+ </pre>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="functype">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <h3>
+ <a name="{$name}"></a>
+ <xsl:text>Function type: </xsl:text>
+ <xsl:value-of select="$name"/>
+ </h3>
+ <pre class="programlisting">
+ <xsl:text>Function type: </xsl:text>
+ <xsl:value-of select="$name"/>
+ <xsl:text>
+</xsl:text>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p>
+ <xsl:if test="arg | return">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ <br/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="function">
+ <xsl:variable name="name" select="string(@name)"/>
+ <xsl:variable name="nlen" select="string-length($name)"/>
+ <xsl:variable name="tlen" select="string-length(return/@type)"/>
+ <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
+ <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>
+ <pre class="programlisting">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@type"/>
+ </xsl:call-template>
+ <xsl:text>&#9;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="$blen - 40 &lt; -8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &lt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;(</xsl:text>
+ <xsl:if test="not(arg)">
+ <xsl:text>void</xsl:text>
+ </xsl:if>
+ <xsl:for-each select="arg">
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@type"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text><br/>
+ <xsl:if test="$blen - 40 &gt; 8">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:if test="$blen - 40 &gt; 0">
+ <xsl:text>&#9;</xsl:text>
+ </xsl:if>
+ <xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text><br/>
+ <xsl:text>
+</xsl:text>
+ </pre>
+ <p>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="info"/>
+ </xsl:call-template>
+ </p><xsl:text>
+</xsl:text>
+ <xsl:if test="arg | return/@info">
+ <div class="variablelist"><table border="0"><col align="left"/><tbody>
+ <xsl:for-each select="arg">
+ <tr>
+ <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ <xsl:if test="return/@info">
+ <tr>
+ <td><span class="term"><i><tt>Returns</tt></i>:</span></td>
+ <td>
+ <xsl:call-template name="dumptext">
+ <xsl:with-param name="text" select="return/@info"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </tbody></table></div>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="exports" mode="toc">
+ <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>
+ </xsl:template>
+
+ <xsl:template match="exports">
+ <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>
+ </xsl:template>
+
+ <xsl:template name="description">
+ <xsl:if test="deprecated">
+ <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>
+ </xsl:if>
+ <xsl:if test="description">
+ <p><xsl:value-of select="description"/></p>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="docomponents">
+ <xsl:param name="mode"/>
+ <xsl:apply-templates select="exports[@type='macro']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']" mode="$mode">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="file">
+ <xsl:variable name="name" select="@name"/>
+ <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
+ <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <xsl:call-template name="style"/>
+ <xsl:call-template name="docstyle"/>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td>
+ <xsl:call-template name="description"/>
+ <xsl:choose>
+ <xsl:when test="deprecated">
+ <div class="deprecated">
+ <h2>Table of Contents</h2>
+ <xsl:apply-templates select="exports" mode="toc"/>
+ <h2>Description</h2>
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="exports"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>Table of Contents</h2>
+ <xsl:apply-templates select="exports[@type='macro']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']" mode="toc">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <h2>Description</h2>
+ <xsl:text>
+</xsl:text>
+ <xsl:apply-templates select="exports[@type='macro']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='enum']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='typedef']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='struct']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="exports[@type='function']">
+ <xsl:sort select='@symbol'/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+</table>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="file" mode="toc">
+ <xsl:variable name="name" select="@name"/>
+ <b><a href="http://xmlsoft.org/wiki/index.php?title=Libxml2:Api:{$name}"><xsl:value-of select="$name"/></a></b><br/>
+ <xsl:value-of select="summary"/>
+ <br/><br/>
+ </xsl:template>
+
+ <xsl:template name="mainpage">
+ <xsl:param name="file" select="concat($htmldir, '/libxml-index.html')"/>
+ <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>
+ <xsl:document href="{$file}" method="xml" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <xsl:call-template name="style"/>
+ <xsl:call-template name="docstyle"/>
+ <table border="0" cellpadding="3" cellspacing="1" width="100%">
+ <tr>
+ <td>
+ <xsl:apply-templates select="/api/files/file" mode="toc"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:document>
+ </xsl:template>
+
+ <xsl:template match="/">
+ <!-- Save the main libxml-index.html as well as a couple of copies -->
+ <xsl:call-template name="mainpage"/>
+ <!-- now build the file for each of the modules -->
+ <xsl:apply-templates select="/api/files/file"/>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/doc/xml.html b/doc/xml.html
new file mode 100644
index 0000000..373285d
--- /dev/null
+++ b/doc/xml.html
@@ -0,0 +1,5995 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>The XML C parser and toolkit of Gnome</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+</head>
+<body bgcolor="#ffffff">
+<h1 align="center">The XML C parser and toolkit of Gnome</h1>
+
+<h1>Note: this is the flat content of the <a href="index.html">web
+site</a></h1>
+
+<h1 style="text-align: center">libxml, a.k.a. gnome-xml</h1>
+
+<p></p>
+
+<p
+style="text-align: right; font-style: italic; font-size: 10pt">"Programming
+with libxml2 is like the thrilling embrace of an exotic stranger." <a
+href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
+Pilgrim</a></p>
+
+<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
+(but usable outside of the Gnome platform), it is free software available
+under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License</a>. XML itself is a metalanguage to design markup languages, i.e.
+text language where semantic and structure are added to the content using
+extra "markup" information enclosed between angle brackets. HTML is the most
+well-known markup language. Though the library is written in C <a
+href="python.html">a variety of language bindings</a> make it available in
+other environments.</p>
+
+<p>Libxml2 is known to be very portable, the library should build and work
+without serious troubles on a variety of systems (Linux, Unix, Windows,
+CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)</p>
+
+<p>Libxml2 implements a number of existing standards related to markup
+languages:</p>
+<ul>
+ <li>the XML standard: <a
+ href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
+ <li>Namespaces in XML: <a
+ href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
+ <li>XML Base: <a
+ href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
+ Uniform Resource Identifiers <a
+ href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
+ <li>XML Path Language (XPath) 1.0: <a
+ href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
+ <li>HTML4 parser: <a
+ href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
+ <li>XML Pointer Language (XPointer) Version 1.0: <a
+ href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
+ <li>XML Inclusions (XInclude) Version 1.0: <a
+ href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
+ <li>ISO-8859-x encodings, as well as <a
+ href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
+ and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
+ [UTF-16] Unicode encodings, and more if using iconv support</li>
+ <li>part of SGML Open Technical Resolution TR9401:1997</li>
+ <li>XML Catalogs Working Draft 06 August 2001: <a
+ href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
+ <li>Canonical XML Version 1.0: <a
+ href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
+ and the Exclusive XML Canonicalization CR draft <a
+ href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
+ <li>Relax NG, ISO/IEC 19757-2:2003, <a
+ href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
+ <li>W3C XML Schemas Part 2: Datatypes <a
+ href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+ 2001</a></li>
+ <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+ April 2004</li>
+</ul>
+
+<p>In most cases libxml2 tries to implement the specifications in a
+relatively strictly compliant way. As of release 2.4.16, libxml2 passed all
+1800+ tests from the <a
+href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
+Suite</a>.</p>
+
+<p>To some extent libxml2 provides support for the following additional
+specifications but doesn't claim to implement them completely:</p>
+<ul>
+ <li>Document Object Model (DOM) <a
+ href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
+ the document model, but it doesn't implement the API itself, gdome2 does
+ this on top of libxml2</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
+ libxml2 implements a basic FTP client code</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
+ HTTP/1.0, again a basic HTTP client code</li>
+ <li>SAX: a SAX2 like interface and a minimal SAX1 implementation compatible
+ with early expat versions</li>
+</ul>
+
+<p>A partial implementation of <a
+href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
+1: Structure</a> is being worked on but it would be far too early to make any
+conformance statement about it at the moment.</p>
+
+<p>Separate documents:</p>
+<ul>
+ <li><a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an
+ implementation of XSLT 1.0 and common extensions like EXSLT for
+ libxml2</li>
+ <li><a href="http://gdome2.cs.unibo.it/">the gdome2 page</a>
+ : a standard DOM2 implementation for libxml2</li>
+ <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an
+ implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
+ Digital Signature</a> for libxml2</li>
+ <li>also check the related links section for more related and active
+ projects.</li>
+</ul>
+<p> Hosting sponsored by <a href="http://www.aoemedia.de/opensource-cms.html"
+>Open Source CMS services</a> from AOE media.</p>
+
+<p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p>
+
+<h2><a name="Introducti">Introduction</a></h2>
+
+<p>This document describes libxml, the <a
+href="http://www.w3.org/XML/">XML</a> C parser and toolkit developed for the
+<a href="http://www.gnome.org/">Gnome</a> project. <a
+href="http://www.w3.org/XML/">XML is a standard</a> for building tag-based
+structured documents/data.</p>
+
+<p>Here are some key points about libxml:</p>
+<ul>
+ <li>Libxml2 exports Push (progressive) and Pull (blocking) type parser
+ interfaces for both XML and HTML.</li>
+ <li>Libxml2 can do DTD validation at parse time, using a parsed document
+ instance, or with an arbitrary DTD.</li>
+ <li>Libxml2 includes complete <a
+ href="http://www.w3.org/TR/xpath">XPath</a>, <a
+ href="http://www.w3.org/TR/xptr">XPointer</a> and <a
+ href="http://www.w3.org/TR/xinclude">XInclude</a> implementations.</li>
+ <li>It is written in plain C, making as few assumptions as possible, and
+ sticking closely to ANSI C/POSIX for easy embedding. Works on
+ Linux/Unix/Windows, ported to a number of other platforms.</li>
+ <li>Basic support for HTTP and FTP client allowing applications to fetch
+ remote resources.</li>
+ <li>The design is modular, most of the extensions can be compiled out.</li>
+ <li>The internal document representation is as close as possible to the <a
+ href="http://www.w3.org/DOM/">DOM</a> interfaces.</li>
+ <li>Libxml2 also has a <a
+ href="http://www.megginson.com/SAX/index.html">SAX like interface</a>;
+ the interface is designed to be compatible with <a
+ href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
+ <li>This library is released under the <a
+ href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a>. See the Copyright file in the distribution for the precise
+ wording.</li>
+</ul>
+
+<p>Warning: unless you are forced to because your application links with a
+Gnome-1.X library requiring it, <strong><span
+style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use
+libxml2</p>
+
+<h2><a name="FAQ">FAQ</a></h2>
+
+<p>Table of Contents:</p>
+<ul>
+ <li><a href="FAQ.html#License">License(s)</a></li>
+ <li><a href="FAQ.html#Installati">Installation</a></li>
+ <li><a href="FAQ.html#Compilatio">Compilation</a></li>
+ <li><a href="FAQ.html#Developer">Developer corner</a></li>
+</ul>
+
+<h3><a name="License">License</a>(s)</h3>
+<ol>
+ <li><em>Licensing Terms for libxml</em>
+ <p>libxml2 is released under the <a
+ href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a>; see the file Copyright in the distribution for the precise
+ wording</p>
+ </li>
+ <li><em>Can I embed libxml2 in a proprietary application ?</em>
+ <p>Yes. The MIT License allows you to keep proprietary the changes you
+ made to libxml, but it would be graceful to send-back bug fixes and
+ improvements as patches for possible incorporation in the main
+ development tree.</p>
+ </li>
+</ol>
+
+<h3><a name="Installati">Installation</a></h3>
+<ol>
+ <li><strong><span style="background-color: #FF0000">Do Not Use
+ libxml1</span></strong>, use libxml2</li>
+ <p></p>
+ <li><em>Where can I get libxml</em> ?
+ <p>The original distribution comes from <a
+ href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> or <a
+ href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p>
+ <p>Most Linux and BSD distributions include libxml, this is probably the
+ safer way for end-users to use libxml.</p>
+ <p>David Doolin provides precompiled Windows versions at <a
+ href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p>
+ </li>
+ <p></p>
+ <li><em>I see libxml and libxml2 releases, which one should I install ?</em>
+ <ul>
+ <li>If you are not constrained by backward compatibility issues with
+ existing applications, install libxml2 only</li>
+ <li>If you are not doing development, you can safely install both.
+ Usually the packages <a
+ href="http://rpmfind.net/linux/RPM/libxml.html">libxml</a> and <a
+ href="http://rpmfind.net/linux/RPM/libxml2.html">libxml2</a> are
+ compatible (this is not the case for development packages).</li>
+ <li>If you are a developer and your system provides separate packaging
+ for shared libraries and the development components, it is possible
+ to install libxml and libxml2, and also <a
+ href="http://rpmfind.net/linux/RPM/libxml-devel.html">libxml-devel</a>
+ and <a
+ href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml2-devel</a>
+ too for libxml2 &gt;= 2.3.0</li>
+ <li>If you are developing a new application, please develop against
+ libxml2(-devel)</li>
+ </ul>
+ </li>
+ <li><em>I can't install the libxml package, it conflicts with libxml0</em>
+ <p>You probably have an old libxml0 package used to provide the shared
+ library for libxml.so.0, you can probably safely remove it. The libxml
+ packages provided on <a
+ href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> provide
+ libxml.so.0</p>
+ </li>
+ <li><em>I can't install the libxml(2) RPM package due to failed
+ dependencies</em>
+ <p>The most generic solution is to re-fetch the latest src.rpm , and
+ rebuild it locally with</p>
+ <p><code>rpm --rebuild libxml(2)-xxx.src.rpm</code>.</p>
+ <p>If everything goes well it will generate two binary rpm packages (one
+ providing the shared libs and xmllint, and the other one, the -devel
+ package, providing includes, static libraries and scripts needed to build
+ applications with libxml(2)) that you can install locally.</p>
+ </li>
+</ol>
+
+<h3><a name="Compilatio">Compilation</a></h3>
+<ol>
+ <li><em>What is the process to compile libxml2 ?</em>
+ <p>As most UNIX libraries libxml2 follows the "standard":</p>
+ <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p>
+ <p><code>cd libxml-xxxx</code></p>
+ <p><code>./configure --help</code></p>
+ <p>to see the options, then the compilation/installation proper</p>
+ <p><code>./configure [possible options]</code></p>
+ <p><code>make</code></p>
+ <p><code>make install</code></p>
+ <p>At that point you may have to rerun ldconfig or a similar utility to
+ update your list of installed shared libs.</p>
+ </li>
+ <li><em>What other libraries are needed to compile/install libxml2 ?</em>
+ <p>Libxml2 does not require any other library, the normal C ANSI API
+ should be sufficient (please report any violation to this rule you may
+ find).</p>
+ <p>However if found at configuration time libxml2 will detect and use the
+ following libs:</p>
+ <ul>
+ <li><a href="http://www.info-zip.org/pub/infozip/zlib/">libz</a> : a
+ highly portable and available widely compression library.</li>
+ <li>iconv: a powerful character encoding conversion library. It is
+ included by default in recent glibc libraries, so it doesn't need to
+ be installed specifically on Linux. It now seems a <a
+ href="http://www.opennc.org/onlinepubs/7908799/xsh/iconv.html">part
+ of the official UNIX</a> specification. Here is one <a
+ href="http://www.gnu.org/software/libiconv/">implementation of the
+ library</a> which source can be found <a
+ href="ftp://ftp.ilog.fr/pub/Users/haible/gnu/">here</a>.</li>
+ </ul>
+ </li>
+ <p></p>
+ <li><em>Make check fails on some platforms</em>
+ <p>Sometimes the regression tests' results don't completely match the
+ value produced by the parser, and the makefile uses diff to print the
+ delta. On some platforms the diff return breaks the compilation process;
+ if the diff is small this is probably not a serious problem.</p>
+ <p>Sometimes (especially on Solaris) make checks fail due to limitations
+ in make. Try using GNU-make instead.</p>
+ </li>
+ <li><em>I use the SVN version and there is no configure script</em>
+ <p>The configure script (and other Makefiles) are generated. Use the
+ autogen.sh script to regenerate the configure script and Makefiles,
+ like:</p>
+ <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
+ </li>
+ <li><em>I have troubles when running make tests with gcc-3.0</em>
+ <p>It seems the initial release of gcc-3.0 has a problem with the
+ optimizer which miscompiles the URI module. Please use another
+ compiler.</p>
+ </li>
+</ol>
+
+<h3><a name="Developer">Developer</a> corner</h3>
+<ol>
+ <li><em>Troubles compiling or linking programs using libxml2</em>
+ <p>Usually the problem comes from the fact that the compiler doesn't get
+ the right compilation or linking flags. There is a small shell script
+ <code>xml2-config</code> which is installed as part of libxml2 usual
+ install process which provides those flags. Use</p>
+ <p><code>xml2-config --cflags</code></p>
+ <p>to get the compilation flags and</p>
+ <p><code>xml2-config --libs</code></p>
+ <p>to get the linker flags. Usually this is done directly from the
+ Makefile as:</p>
+ <p><code>CFLAGS=`xml2-config --cflags`</code></p>
+ <p><code>LIBS=`xml2-config --libs`</code></p>
+ </li>
+ <li><em>I want to install my own copy of libxml2 in my home directory and
+ link my programs against it, but it doesn't work</em>
+ <p>There are many different ways to accomplish this. Here is one way to
+ do this under Linux. Suppose your home directory is <code>/home/user.
+ </code>Then:</p>
+ <ul>
+ <li>Create a subdirectory, let's call it <code>myxml</code></li>
+ <li>unpack the libxml2 distribution into that subdirectory</li>
+ <li>chdir into the unpacked distribution
+ (<code>/home/user/myxml/libxml2 </code>)</li>
+ <li>configure the library using the "<code>--prefix</code>" switch,
+ specifying an installation subdirectory in
+ <code>/home/user/myxml</code>, e.g.
+ <p><code>./configure --prefix /home/user/myxml/xmlinst</code> {other
+ configuration options}</p>
+ </li>
+ <li>now run <code>make</code> followed by <code>make install</code></li>
+ <li>At this point, the installation subdirectory contains the complete
+ "private" include files, library files and binary program files (e.g.
+ xmllint), located in
+ <p><code>/home/user/myxml/xmlinst/lib,
+ /home/user/myxml/xmlinst/include </code> and <code>
+ /home/user/myxml/xmlinst/bin</code></p>
+ respectively.</li>
+ <li>In order to use this "private" library, you should first add it to
+ the beginning of your default PATH (so that your own private program
+ files such as xmllint will be used instead of the normal system
+ ones). To do this, the Bash command would be
+ <p><code>export PATH=/home/user/myxml/xmlinst/bin:$PATH</code></p>
+ </li>
+ <li>Now suppose you have a program <code>test1.c</code> that you would
+ like to compile with your "private" library. Simply compile it using
+ the command
+ <p><code>gcc `xml2-config --cflags --libs` -o test test.c</code></p>
+ Note that, because your PATH has been set with <code>
+ /home/user/myxml/xmlinst/bin</code> at the beginning, the xml2-config
+ program which you just installed will be used instead of the system
+ default one, and this will <em>automatically</em> get the correct
+ libraries linked with your program.</li>
+ </ul>
+ </li>
+
+ <p></p>
+ <li><em>xmlDocDump() generates output on one line.</em>
+ <p>Libxml2 will not <strong>invent</strong> spaces in the content of a
+ document since <strong>all spaces in the content of a document are
+ significant</strong>. If you build a tree from the API and want
+ indentation:</p>
+ <ol>
+ <li>the correct way is to generate those yourself too.</li>
+ <li>the dangerous way is to ask libxml2 to add those blanks to your
+ content <strong>modifying the content of your document in the
+ process</strong>. The result may not be what you expect. There is
+ <strong>NO</strong> way to guarantee that such a modification won't
+ affect other parts of the content of your document. See <a
+ href="http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault">xmlKeepBlanksDefault
+ ()</a> and <a
+ href="http://xmlsoft.org/html/libxml-tree.html#xmlSaveFormatFile">xmlSaveFormatFile
+ ()</a></li>
+ </ol>
+ </li>
+ <p></p>
+ <li><em>Extra nodes in the document:</em>
+ <p><em>For an XML file as below:</em></p>
+ <pre>&lt;?xml version="1.0"?&gt;
+&lt;PLAN xmlns="http://www.argus.ca/autotest/1.0/"&gt;
+&lt;NODE CommFlag="0"/&gt;
+&lt;NODE CommFlag="1"/&gt;
+&lt;/PLAN&gt;</pre>
+ <p><em>after parsing it with the function
+ pxmlDoc=xmlParseFile(...);</em></p>
+ <p><em>I want to the get the content of the first node (node with the
+ CommFlag="0")</em></p>
+ <p><em>so I did it as following;</em></p>
+ <pre>xmlNodePtr pnode;
+pnode=pxmlDoc-&gt;children-&gt;children;</pre>
+ <p><em>but it does not work. If I change it to</em></p>
+ <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
+ <p><em>then it works. Can someone explain it to me.</em></p>
+ <p></p>
+ <p>In XML all characters in the content of the document are significant
+ <strong>including blanks and formatting line breaks</strong>.</p>
+ <p>The extra nodes you are wondering about are just that, text nodes with
+ the formatting spaces which are part of the document but that people tend
+ to forget. There is a function <a
+ href="http://xmlsoft.org/html/libxml-parser.html">xmlKeepBlanksDefault
+ ()</a> to remove those at parse time, but that's an heuristic, and its
+ use should be limited to cases where you are certain there is no
+ mixed-content in the document.</p>
+ </li>
+ <li><em>I get compilation errors of existing code like when accessing
+ <strong>root</strong> or <strong>child fields</strong> of nodes.</em>
+ <p>You are compiling code developed for libxml version 1 and using a
+ libxml2 development environment. Either switch back to libxml v1 devel or
+ even better fix the code to compile with libxml2 (or both) by <a
+ href="upgrade.html">following the instructions</a>.</p>
+ </li>
+ <li><em>I get compilation errors about non existing
+ <strong>xmlRootNode</strong> or <strong>xmlChildrenNode</strong>
+ fields.</em>
+ <p>The source code you are using has been <a
+ href="upgrade.html">upgraded</a> to be able to compile with both libxml
+ and libxml2, but you need to install a more recent version:
+ libxml(-devel) &gt;= 1.8.8 or libxml2(-devel) &gt;= 2.1.0</p>
+ </li>
+ <li><em>Random crashes in threaded applications</em>
+ <p>Read and follow all advices on the <a href="threads.html">thread
+ safety</a> page, and make 100% sure you never call xmlCleanupParser()
+ while the library or an XML document might still be in use by another
+ thread.</p>
+ </li>
+ <li><em>The example provided in the web page does not compile.</em>
+ <p>It's hard to maintain the documentation in sync with the code
+ &lt;grin/&gt; ...</p>
+ <p>Check the previous points 1/ and 2/ raised before, and please send
+ patches.</p>
+ </li>
+ <li><em>Where can I get more examples and information than provided on the
+ web page?</em>
+ <p>Ideally a libxml2 book would be nice. I have no such plan ... But you
+ can:</p>
+ <ul>
+ <li>check more deeply the <a href="html/libxml-lib.html">existing
+ generated doc</a></li>
+ <li>have a look at <a href="examples/index.html">the set of
+ examples</a>.</li>
+ <li>look for examples of use for libxml2 function using the Gnome code
+ or by asking on Google.</li>
+ <li><a
+ href="http://svn.gnome.org/viewvc/libxml2/trunk/">Browse
+ the libxml2 source</a> , I try to write code as clean and documented
+ as possible, so looking at it may be helpful. In particular the code
+ of <a href="http://svn.gnome.org/viewvc/libxml2/trunk/xmllint.c?view=markup">xmllint.c</a> and of the various testXXX.c test programs should
+ provide good examples of how to do things with the library.</li>
+ </ul>
+ </li>
+ <p></p>
+ <li><em>What about C++ ?</em>
+ <p>libxml2 is written in pure C in order to allow easy reuse on a number
+ of platforms, including embedded systems. I don't intend to convert to
+ C++.</p>
+ <p>There is however a C++ wrapper which may fulfill your needs:</p>
+ <ul>
+ <li>by Ari Johnson &lt;ari@btigate.com&gt;:
+ <p>Website: <a
+ href="http://libxmlplusplus.sourceforge.net/">http://libxmlplusplus.sourceforge.net/</a></p>
+ <p>Download: <a
+ href="http://sourceforge.net/project/showfiles.php?group_id=12999">http://sourceforge.net/project/showfiles.php?group_id=12999</a></p>
+ </li>
+ </ul>
+ </li>
+ <li><em>How to validate a document a posteriori ?</em>
+ <p>It is possible to validate documents which had not been validated at
+ initial parsing time or documents which have been built from scratch
+ using the API. Use the <a
+ href="http://xmlsoft.org/html/libxml-valid.html#xmlValidateDtd">xmlValidateDtd()</a>
+ function. It is also possible to simply add a DTD to an existing
+ document:</p>
+ <pre>xmlDocPtr doc; /* your existing document */
+xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
+
+ dtd-&gt;name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */
+
+ doc-&gt;intSubset = dtd;
+ if (doc-&gt;children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
+ else xmlAddPrevSibling(doc-&gt;children, (xmlNodePtr)dtd);
+ </pre>
+ </li>
+ <li><em>So what is this funky "xmlChar" used all the time?</em>
+ <p>It is a null terminated sequence of utf-8 characters. And only utf-8!
+ You need to convert strings encoded in different ways to utf-8 before
+ passing them to the API. This can be accomplished with the iconv library
+ for instance.</p>
+ </li>
+ <li>etc ...</li>
+</ol>
+
+<p></p>
+
+<h2><a name="Documentat">Developer Menu</a></h2>
+
+<p>There are several on-line resources related to using libxml:</p>
+<ol>
+ <li>Use the <a href="search.php">search engine</a> to look up
+ information.</li>
+ <li>Check the <a href="FAQ.html">FAQ.</a></li>
+ <li>Check the <a href="http://xmlsoft.org/html/libxml-lib.html">extensive
+ documentation</a> automatically extracted from code comments.</li>
+ <li>Look at the documentation about <a href="encoding.html">libxml
+ internationalization support</a>.</li>
+ <li>This page provides a global overview and <a href="example.html">some
+ examples</a> on how to use libxml.</li>
+ <li><a href="examples/index.html">Code examples</a></li>
+ <li>John Fleck's libxml2 tutorial: <a href="tutorial/index.html">html</a>
+ or <a href="tutorial/xmltutorial.pdf">pdf</a>.</li>
+ <li>If you need to parse large files, check the <a
+ href="xmlreader.html">xmlReader</a> API tutorial</li>
+ <li><a href="mailto:james@daa.com.au">James Henstridge</a> wrote <a
+ href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">some nice
+ documentation</a> explaining how to use the libxml SAX interface.</li>
+ <li>George Lebl wrote <a
+ href="http://www-106.ibm.com/developerworks/library/l-gnome3/">an article
+ for IBM developerWorks</a> about using libxml.</li>
+ <li>Check <a href="http://svn.gnome.org/viewvc/libxml2/trunk/TODO?view=markup">the TODO
+ file</a>.</li>
+ <li>Read the <a href="upgrade.html">1.x to 2.x upgrade path</a>
+ description. If you are starting a new project using libxml you should
+ really use the 2.x version.</li>
+ <li>And don't forget to look at the <a
+ href="http://mail.gnome.org/archives/xml/">mailing-list archive</a>.</li>
+</ol>
+
+<h2><a name="Reporting">Reporting bugs and getting help</a></h2>
+
+<p>Well, bugs or missing features are always possible, and I will make a
+point of fixing them in a timely fashion. The best way to report a bug is to
+use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome
+bug tracking database</a> (make sure to use the "libxml2" module name). I
+look at reports there regularly and it's good to have a reminder when a bug
+is still open. Be sure to specify that the bug is for the package libxml2.</p>
+
+<p>For small problems you can try to get help on IRC, the #xml channel on
+irc.gnome.org (port 6667) usually have a few person subscribed which may help
+(but there is no guarantee and if a real issue is raised it should go on the
+mailing-list for archival).</p>
+
+<p>There is also a mailing-list <a
+href="mailto:xml@gnome.org">xml@gnome.org</a> for libxml, with an <a
+href="http://mail.gnome.org/archives/xml/">on-line archive</a> (<a
+href="http://xmlsoft.org/messages">old</a>). To subscribe to this list,
+please visit the <a
+href="http://mail.gnome.org/mailman/listinfo/xml">associated Web</a> page and
+follow the instructions. <strong>Do not send code, I won't debug it</strong>
+(but patches are really appreciated!).</p>
+
+<p>Please note that with the current amount of virus and SPAM, sending mail
+to the list without being subscribed won't work. There is *far too many
+bounces* (in the order of a thousand a day !) I cannot approve them manually
+anymore. If your mail to the list bounced waiting for administrator approval,
+it is LOST ! Repost it and fix the problem triggering the error. Also please
+note that <span style="color: #FF0000; background-color: #FFFFFF">emails with
+a legal warning asking to not copy or redistribute freely the information
+they contain</span> are <strong>NOT</strong> acceptable for the mailing-list,
+such mail will as much as possible be discarded automatically, and are less
+likely to be answered if they made it to the list, <strong>DO NOT</strong>
+post to the list from an email address where such legal requirements are
+automatically added, get private paying support if you can't share
+information.</p>
+
+<p>Check the following <strong><span style="color: #FF0000">before
+posting</span></strong>:</p>
+<ul>
+ <li>Read the <a href="FAQ.html">FAQ</a> and <a href="search.php">use the
+ search engine</a> to get information related to your problem.</li>
+ <li>Make sure you are <a href="ftp://xmlsoft.org/libxml2/">using a recent
+ version</a>, and that the problem still shows up in a recent version.</li>
+ <li>Check the <a href="http://mail.gnome.org/archives/xml/">list
+ archives</a> to see if the problem was reported already. In this case
+ there is probably a fix available, similarly check the <a
+ href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">registered
+ open bugs</a>.</li>
+ <li>Make sure you can reproduce the bug with xmllint or one of the test
+ programs found in source in the distribution.</li>
+ <li>Please send the command showing the error as well as the input (as an
+ attachment)</li>
+</ul>
+
+<p>Then send the bug with associated information to reproduce it to the <a
+href="mailto:xml@gnome.org">xml@gnome.org</a> list; if it's really libxml
+related I will approve it. Please do not send mail to me directly, it makes
+things really hard to track and in some cases I am not the best person to
+answer a given question, ask on the list.</p>
+
+<p>To <span style="color: #E50000">be really clear about support</span>:</p>
+<ul>
+ <li>Support or help <span style="color: #E50000">requests MUST be sent to
+ the list or on bugzilla</span> in case of problems, so that the Question
+ and Answers can be shared publicly. Failing to do so carries the implicit
+ message "I want free support but I don't want to share the benefits with
+ others" and is not welcome. I will automatically Carbon-Copy the
+ xml@gnome.org mailing list for any technical reply made about libxml2 or
+ libxslt.</li>
+ <li>There is <span style="color: #E50000">no guarantee of support</span>. If
+ your question remains unanswered after a week, repost it, making sure you
+ gave all the detail needed and the information requested.</li>
+ <li>Failing to provide information as requested or double checking first
+ for prior feedback also carries the implicit message "the time of the
+ library maintainers is less valuable than my time" and might not be
+ welcome.</li>
+</ul>
+
+<p>Of course, bugs reported with a suggested patch for fixing them will
+probably be processed faster than those without.</p>
+
+<p>If you're looking for help, a quick look at <a
+href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually
+provide the answer. I usually send source samples when answering libxml2
+usage questions. The <a
+href="http://xmlsoft.org/html/book1.html">auto-generated documentation</a> is
+not as polished as I would like (i need to learn more about DocBook), but
+it's a good starting point.</p>
+
+<h2><a name="help">How to help</a></h2>
+
+<p>You can help the project in various ways, the best thing to do first is to
+subscribe to the mailing-list as explained before, check the <a
+href="http://mail.gnome.org/archives/xml/">archives </a>and the <a
+href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome bug
+database</a>:</p>
+<ol>
+ <li>Provide patches when you find problems.</li>
+ <li>Provide the diffs when you port libxml2 to a new platform. They may not
+ be integrated in all cases but help pinpointing portability problems
+ and</li>
+ <li>Provide documentation fixes (either as patches to the code comments or
+ as HTML diffs).</li>
+ <li>Provide new documentations pieces (translations, examples, etc
+ ...).</li>
+ <li>Check the TODO file and try to close one of the items.</li>
+ <li>Take one of the points raised in the archive or the bug database and
+ provide a fix. <a href="mailto:daniel@veillard.com">Get in touch with me
+ </a>before to avoid synchronization problems and check that the suggested
+ fix will fit in nicely :-)</li>
+</ol>
+
+<h2><a name="Downloads">Downloads</a></h2>
+
+<p>The latest versions of libxml2 can be found on the <a
+href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a> server ( <a
+href="ftp://xmlsoft.org/libxml2/">FTP</a> and rsync are available), there are also
+mirrors (<a href="ftp://fr.rpmfind.net/pub/libxml/">France</a> and
+Antonin Sprinzl also provide <a href="ftp://gd.tuwien.ac.at/pub/libxml/">a
+mirror in Austria</a>). (NOTE that you need both the <a
+href="http://rpmfind.net/linux/RPM/libxml2.html">libxml(2)</a> and <a
+href="http://rpmfind.net/linux/RPM/libxml2-devel.html">libxml(2)-devel</a>
+packages installed to compile applications using libxml if using RPMs.)</p>
+
+<p>You can find all the history of libxml(2) and libxslt releases in the <a
+href="http://xmlsoft.org/sources/old/">old</a> directory. The precompiled
+Windows binaries made by Igor Zlatovic are available in the <a
+href="http://xmlsoft.org/sources/win32/">win32</a> directory.</p>
+
+<p>Binary ports:</p>
+<ul>
+ <li>RPMs for x86_64 are available directly on <a
+ href="ftp://xmlsoft.org/libxml2/">xmlsoft.org</a>, the source RPM will compile on
+ any architecture supported.</li>
+ <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the
+ maintainer of the Windows port, <a
+ href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
+ binaries</a>.</li>
+ <li>OpenCSW provides <a
+ href="http://opencsw.org/packages/libxml2">Solaris
+ binaries</a>.</li>
+ <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> provides <a
+ href="http://www.explain.com.au/oss/libxml2xslt.html">Mac Os X
+ binaries</a>.</li>
+ <li>The HP-UX porting center provides <a
+ href="http://hpux.connect.org.uk/hppd/hpux/Gnome/">HP-UX binaries</a></li>
+ <li>Bull provides precompiled <a
+ href="http://gnome.bullfreeware.com/new_index.html">RPMs for AIX</a> as
+ patr of their GNOME packages</li>
+</ul>
+
+<p>If you know other supported binary ports, please <a
+href="http://veillard.com/">contact me</a>.</p>
+
+<p><a name="Snapshot">Snapshot:</a></p>
+<ul>
+ <li>Code from the GNOME GIT base libxml2 module, updated hourly <a
+ href="ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz">libxml2-git-snapshot.tar.gz</a>.</li>
+ <li>Docs, content of the web site, the list archive included <a
+ href="ftp://xmlsoft.org/libxml2/libxml-docs.tar.gz">libxml-docs.tar.gz</a>.</li>
+</ul>
+
+<p><a name="Contribs">Contributions:</a></p>
+
+<p>I do accept external contributions, especially if compiling on another
+platform, get in touch with the list to upload the package, wrappers for
+various languages have been provided, and can be found in the <a
+href="python.html">bindings section</a></p>
+
+<p>Libxml2 is also available from GIT:</p>
+<ul>
+ <li><p>See <a href="http://git.gnome.org/browse/libxml2/">libxml2 Git web</a>.
+ To checkout a local tree use:</p>
+ <pre>git clone git://git.gnome.org/libxml2</pre>
+ </li>
+ <li>The <strong>libxslt</strong> module is also present
+ <a href="http://git.gnome.org/browse/libxslt/">there</a>.</li>
+</ul>
+
+<h2><a name="News">Releases</a></h2>
+
+<p>The <a href="ChangeLog.html">change log</a> describes the recents commits
+to the <a href="http://git.gnome.org/browse/libxml2/">GIT</a> code base.</p>
+
+<p>Here is the list of public releases:</p>
+
+<h3>2.9.2: Oct 16 2014</h3>
+<ul>
+ <li>Security:<br/>
+ Fix for CVE-2014-3660 billion laugh variant (Daniel Veillard),<br/>
+ CVE-2014-0191 Do not fetch external parameter entities (Daniel Veillard)<br/>
+ </li>
+
+ <li>Bug Fixes:<br/>
+ fix memory leak xml header encoding field with XML_PARSE_IGNORE_ENC (Bart De Schuymer),<br/>
+ xmlmemory: handle realloc properly (Yegor Yefremov),<br/>
+ Python generator bug raised by the const change (Daniel Veillard),<br/>
+ Windows Critical sections not released correctly (Daniel Veillard),<br/>
+ Parser error on repeated recursive entity expansion containing &amp;lt; (Daniel Veillard),<br/>
+ xpointer : fixing Null Pointers (Gaurav Gupta),<br/>
+ Remove Unnecessary Null check in xpointer.c (Gaurav Gupta),<br/>
+ parser bug on misformed namespace attributes (Dennis Filder),<br/>
+ Pointer dereferenced before null check (Daniel Veillard),<br/>
+ Leak of struct addrinfo in xmlNanoFTPConnect() (Gaurav Gupta),<br/>
+ Possible overflow in HTMLParser.c (Daniel Veillard),<br/>
+ python/tests/sync.py assumes Python dictionaries are ordered (John Beck),<br/>
+ Fix Enum check and missing break (Gaurav Gupta),<br/>
+ xmlIO: Handle error returns from dup() (Philip Withnall),<br/>
+ Fix a problem properly saving URIs (Daniel Veillard),<br/>
+ wrong error column in structured error when parsing attribute values (Juergen Keil),<br/>
+ wrong error column in structured error when skipping whitespace in xml decl (Juergen Keil),<br/>
+ no error column in structured error handler for xml schema validation errors (Juergen Keil),<br/>
+ Couple of Missing Null checks (Gaurav Gupta),<br/>
+ Add couple of missing Null checks (Daniel Veillard),<br/>
+ xmlschemastypes: Fix potential array overflow (Philip Withnall),<br/>
+ runtest: Fix a memory leak on parse failure (Philip Withnall),<br/>
+ xmlIO: Fix an FD leak on gzdopen() failure (Philip Withnall),<br/>
+ xmlcatalog: Fix a memory leak on quit (Philip Withnall),<br/>
+ HTMLparser: Correctly initialise a stack allocated structure (Philip Withnall),<br/>
+ Check for tmon in _xmlSchemaDateAdd() is incorrect (David Kilzer),<br/>
+ Avoid Possible Null Pointer in trio.c (Gaurav Gupta),<br/>
+ Fix processing in SAX2 in case of an allocation failure (Daniel Veillard),<br/>
+ XML Shell command "cd" does not handle "/" at end of path (Daniel Veillard),<br/>
+ Fix various Missing Null checks (Gaurav Gupta),<br/>
+ Fix a potential NULL dereference (Daniel Veillard),<br/>
+ Add a couple of misisng check in xmlRelaxNGCleanupTree (Gaurav Gupta),<br/>
+ Add a missing argument check (Gaurav Gupta),<br/>
+ Adding a check in case of allocation error (Gaurav Gupta),<br/>
+ xmlSaveUri() incorrectly recomposes URIs with rootless paths (Dennis Filder),<br/>
+ Adding some missing NULL checks (Gaurav),<br/>
+ Fixes for xmlInitParserCtxt (Daniel Veillard),<br/>
+ Fix regressions introduced by CVE-2014-0191 patch (Daniel Veillard),<br/>
+ erroneously ignores a validation error if no error callback set (Daniel Veillard),<br/>
+ xmllint was not parsing the --c14n11 flag (Sérgio Batista),<br/>
+ Avoid Possible null pointer dereference in memory debug mode (Gaurav),<br/>
+ Avoid Double Null Check (Gaurav),<br/>
+ Restore context size and position after XPATH_OP_ARG (Nick Wellnhofer),<br/>
+ Fix xmlParseInNodeContext() if node is not element (Daniel Veillard),<br/>
+ Avoid a possible NULL pointer dereference (Gaurav),<br/>
+ Fix xmlTextWriterWriteElement when a null content is given (Daniel Veillard),<br/>
+ Fix an typo 'onrest' in htmlScriptAttributes (Daniel Veillard),<br/>
+ fixing a ptotential uninitialized access (Daniel Veillard),<br/>
+ Fix an fd leak in an error case (Daniel Veillard),<br/>
+ Missing initialization for the catalog module (Daniel Veillard),<br/>
+ Handling of XPath function arguments in error case (Nick Wellnhofer),<br/>
+ Fix a couple of missing NULL checks (Gaurav),<br/>
+ Avoid a possibility of dangling encoding handler (Gaurav),<br/>
+ Fix HTML push parser to accept HTML_PARSE_NODEFDTD (Arnold Hendriks),<br/>
+ Fix a bug loading some compressed files (Mike Alexander),<br/>
+ Fix XPath node comparison bug (Gaurav),<br/>
+ Type mismatch in xmlschemas.c (Gaurav),<br/>
+ Type mismatch in xmlschemastypes.c (Gaurav),<br/>
+ Avoid a deadcode in catalog.c (Daniel Veillard),<br/>
+ run close socket on Solaris, same as we do on other platforms (Denis Pauk),<br/>
+ Fix pointer dereferenced before null check (Gaurav),<br/>
+ Fix a potential NULL dereference in tree code (Daniel Veillard),<br/>
+ Fix potential NULL pointer dereferences in regexp code (Gaurav),<br/>
+ xmllint --pretty crashed without following numeric argument (Tim Galeckas),<br/>
+ Fix XPath expressions of the form '@ns:*' (Nick Wellnhofer),<br/>
+ Fix XPath '//' optimization with predicates (Nick Wellnhofer),<br/>
+ Clear up a potential NULL dereference (Daniel Veillard),<br/>
+ Fix a possible NULL dereference (Gaurav),<br/>
+ Avoid crash if allocation fails (Daniel Veillard),<br/>
+ Remove occasional leading space in XPath number formatting (Daniel Veillard),<br/>
+ Fix handling of mmap errors (Daniel Veillard),<br/>
+ Catch malloc error and exit accordingly (Daniel Veillard),<br/>
+ missing else in xlink.c (Ami Fischman),<br/>
+ Fix a parsing bug on non-ascii element and CR/LF usage (Daniel Veillard),<br/>
+ Fix a regression in xmlGetDocCompressMode() (Daniel Veillard),<br/>
+ properly quote the namespace uris written out during c14n (Aleksey Sanin),<br/>
+ Remove premature XInclude check on URI being relative (Alexey Neyman),<br/>
+ Fix missing break on last() function for attributes (dcb),<br/>
+ Do not URI escape in server side includes (Romain Bondue),<br/>
+ Fix an error in xmlCleanupParser (Alexander Pastukhov)<br/>
+ </li>
+
+ <li>Documentation:<br/>
+ typo in error messages "colon are forbidden from..." (Daniel Veillard),<br/>
+ Fix a link to James SAX documentation old page (Daniel Veillard),<br/>
+ Fix typos in relaxng.c (Jan Pokorný),<br/>
+ Fix a doc typo (Daniel Veillard),<br/>
+ Fix typos in {tree,xpath}.c (errror) (Jan Pokorný),<br/>
+ Add limitations about encoding conversion (Daniel Veillard),<br/>
+ Fix typos in xmlschemas{,types}.c (Jan Pokorný),<br/>
+ Fix incorrect spelling entites-&gt;entities (Jan Pokorný),<br/>
+ Forgot to document 2.9.1 release, regenerate docs (Daniel Veillard)<br/>
+ </li>
+
+ <li>Portability:<br/>
+ AC_CONFIG_FILES and executable bit (Roumen Petrov),<br/>
+ remove HAVE_CONFIG_H dependency in testlimits.c (Roumen Petrov),<br/>
+ fix some tabs mixing incompatible with python3 (Roumen Petrov),<br/>
+ Visual Studio 14 CTP defines snprintf() (Francis Dupont),<br/>
+ OS400: do not try to copy unexisting doc files (Patrick Monnerat),<br/>
+ OS400: use either configure.ac or configure.in. (Patrick Monnerat),<br/>
+ os400: make-src.sh: create physical file with target CCSID (Patrick Monnerat),<br/>
+ OS400: Add some more C macros equivalent procedures. (Patrick Monnerat),<br/>
+ OS400: use C macros to implement equivalent RPG support procedures. (Patrick Monnerat),<br/>
+ OS400: implement XPath macros as procedures for ILE/RPG support. (Patrick Monnerat),<br/>
+ OS400: include in distribution tarball. (Patrick Monnerat),<br/>
+ OS400: Add README: compilation directives and OS/400 specific stuff. (Patrick Monnerat),<br/>
+ OS400: Add compilation scripts. (Patrick Monnerat),<br/>
+ OS400: ILE RPG language header files. (Patrick Monnerat),<br/>
+ OS400: implement some macros as functions for ILE/RPG language support (that as no macros). (Patrick Monnerat),<br/>
+ OS400: UTF8&lt;--&gt;EBCDIC wrappers for system and external library calls (Patrick Monnerat),<br/>
+ OS400: Easy character transcoding support (Patrick Monnerat),<br/>
+ OS400: iconv functions compatibility wrappers and table builder. (Patrick Monnerat),<br/>
+ OS400: create architecture directory. Implement dlfcn emulation. (Patrick Monnerat),<br/>
+ Fix building when configuring without xpath and xptr (Daniel Veillard),<br/>
+ configure: Add --with-python-install-dir (Jonas Eriksson),<br/>
+ Fix compilation with minimum and xinclude. (Nicolas Le Cam),<br/>
+ Compile out use of xmlValidateNCName() when not available. (Nicolas Le Cam),<br/>
+ Fix compilation with minimum and schematron. (Nicolas Le Cam),<br/>
+ Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). (Nicolas Le Cam),<br/>
+ Don't use xmlValidateName() when not available. (Nicolas Le Cam),<br/>
+ Fix a portability issue on Windows (Longstreth Jon),<br/>
+ Various portability patches for OpenVMS (Jacob (Jouk) Jansen),<br/>
+ Use specific macros for portability to OS/400 (Patrick Monnerat),<br/>
+ Add macros needed for OS/400 portability (Patrick Monnerat),<br/>
+ Portability patch for fopen on OS/400 (Patrick Monnerat),<br/>
+ Portability fixes for OS/400 (Patrick Monnerat),<br/>
+ Improve va_list portability (Patrick Monnerat),<br/>
+ Portability fix (Patrick Monnerat),<br/>
+ Portability fix (Patrick Monnerat),<br/>
+ Generic portability fix (Patrick Monnerat),<br/>
+ Shortening lines in headers (Patrick Monnerat),<br/>
+ build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB (Philip Withnall),<br/>
+ build: Add @LZMA_LIBS@ to libxml’s pkg-config files (Philip Withnall),<br/>
+ fix some tabs mixing incompatible with python3 (Daniel Veillard),<br/>
+ add additional defines checks for support "./configure --with-minimum" (Denis Pauk),<br/>
+ Another round of fixes for older versions of Python (Arfrever Frehtes Taifersar Arahesis),<br/>
+ python: fix drv_libxml2.py for python3 compatibility (Alexandre Rostovtsev),<br/>
+ python: Fix compiler warnings when building python3 bindings (Armin K),<br/>
+ Fix for compilation with python 2.6.8 (Petr Sumbera)<br/>
+ </li>
+
+ <li>Improvements:<br/>
+ win32/libxml2.def.src after rebuild in doc (Roumen Petrov),<br/>
+ elfgcchack.h: more legacy needs xmlSAX2StartElement() and xmlSAX2EndElement() (Roumen Petrov),<br/>
+ elfgcchack.h: add xmlXPathNodeEval and xmlXPathSetContextNode (Roumen Petrov),<br/>
+ Provide cmake module (Samuel Martin),<br/>
+ Fix a couple of issues raised by make dist (Daniel Veillard),<br/>
+ Fix and add const qualifiers (Kurt Roeckx),<br/>
+ Preparing for upcoming release of 2.9.2 (Daniel Veillard),<br/>
+ Fix zlib and lzma libraries check via command line (Dmitriy),<br/>
+ wrong error column in structured error when parsing end tag (Juergen Keil),<br/>
+ doc/news.html: small update to avoid line join while generating NEWS. (Patrick Monnerat),<br/>
+ Add methods for python3 iterator (Ron Angeles),<br/>
+ Support element node traversal in document fragments. (Kyle VanderBeek),<br/>
+ xmlNodeSetName: Allow setting the name to a substring of the currently set name (Tristan Van Berkom),<br/>
+ Added macros for argument casts (Eric Zurcher),<br/>
+ adding init calls to xml and html Read parsing entry points (Daniel Veillard),<br/>
+ Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c (Jan Pokorný),<br/>
+ Implement choice for name classes on attributes (Shaun McCance),<br/>
+ Two small namespace tweaks (Daniel Veillard),<br/>
+ xmllint --memory should fail on empty files (Daniel Veillard),<br/>
+ Cast encoding name to char pointer to match arg type (Nikolay Sivov)<br/>
+ </li>
+
+ <li>Cleanups:<br/>
+ Removal of old configure.in (Daniel Veillard),<br/>
+ Unreachable code in tree.c (Gaurav Gupta),<br/>
+ Remove a couple of dead conditions (Gaurav Gupta),<br/>
+ Avoid some dead code and cleanup in relaxng.c (Gaurav),<br/>
+ Drop not needed checks (Denis Pauk),<br/>
+ Fix a wrong test (Daniel Veillard)<br/>
+ </li>
+</ul>
+<h3>2.9.1: Apr 19 2013</h3>
+<ul>
+ <li> Features:<br/>
+ Support for Python3 (Daniel Veillard),<br/>
+ Add xmlXPathSetContextNode and xmlXPathNodeEval (Alex Bligh)<br/>
+ </li>
+
+ <li> Documentation:<br/>
+ Add documentation for xmllint --xpath (Daniel Veillard),<br/>
+ Fix the URL of the SAX documentation from James (Daniel Veillard),<br/>
+ Fix spelling of "length". (Michael Wood)<br/>
+ </li>
+
+ <li> Portability:<br/>
+ Fix python bindings with versions older than 2.7 (Daniel Veillard),<br/>
+ rebuild docs:Makefile.am (Roumen Petrov),<br/>
+ elfgcchack.h after rebuild in doc (Roumen Petrov),<br/>
+ elfgcchack for buf module (Roumen Petrov),<br/>
+ Fix a uneeded and wrong extra link parameter (Daniel Veillard),<br/>
+ Few cleanup patches for Windows (Denis Pauk),<br/>
+ Fix rpmbuild --nocheck (Mark Salter),<br/>
+ Fix for win32/configure.js and WITH_THREAD_ALLOC (Daniel Richard),<br/>
+ Fix Broken multi-arch support in xml2-config (Daniel Veillard),<br/>
+ Fix a portability issue for GCC &lt; 3.4.0 (Daniel Veillard),<br/>
+ Windows build fixes (Daniel Richard),<br/>
+ Fix a thread portability problem (Friedrich Haubensak),<br/>
+ Downgrade autoconf requirement to 2.63 (Daniel Veillard)<br/>
+ </li>
+
+ <li> Bug Fixes:<br/>
+ Fix a linking error for python bindings (Daniel Veillard),<br/>
+ Fix a couple of return without value (Jüri Aedla),<br/>
+ Improve the hashing functions (Daniel Franke),<br/>
+ Improve handling of xmlStopParser() (Daniel Veillard),<br/>
+ Remove risk of lockup in dictionary initialization (Daniel Veillard),<br/>
+ Activate detection of encoding in external subset (Daniel Veillard),<br/>
+ Fix an output buffer flushing conversion bug (Mikhail Titov),<br/>
+ Fix an old bug in xmlSchemaValidateOneElement (Csaba László),<br/>
+ Fix configure cannot remove messages (Gilles Espinasse),<br/>
+ fix schema validation in combination with xsi:nil (Daniel Veillard),<br/>
+ xmlCtxtReadFile doesn't work with literal IPv6 URLs (Steve Wolf),<br/>
+ Fix a few problems with setEntityLoader (Alexey Neyman),<br/>
+ Detect excessive entities expansion upon replacement (Daniel Veillard),<br/>
+ Fix the flushing out of raw buffers on encoding conversions (Daniel,<br/>
+Veillard),<br/>
+ Fix some buffer conversion issues (Daniel Veillard),<br/>
+ When calling xmlNodeDump make sure we grow the buffer quickly (Daniel,<br/>
+Veillard),<br/>
+ Fix an error in the progressive DTD parsing code (Dan Winship),<br/>
+ xmllint should not load DTD by default when using the reader (Daniel,<br/>
+Veillard),<br/>
+ Try IBM-037 when looking for EBCDIC handlers (Petr Sumbera),<br/>
+ Fix potential out of bound access (Daniel Veillard),<br/>
+ Fix large parse of file from memory (Daniel Veillard),<br/>
+ Fix a bug in the nsclean option of the parser (Daniel Veillard),<br/>
+ Fix a regression in 2.9.0 breaking validation while streaming (Daniel,<br/>
+Veillard),<br/>
+ Remove potential calls to exit() (Daniel Veillard)<br/>
+ </li>
+
+ <li> Improvements:<br/>
+ Regenerated API, and testapi, rebuild documentation (Daniel Veillard),<br/>
+ Fix tree iterators broken by 2to3 script (Daniel Veillard),<br/>
+ update all tests for Python3 and Python2 (Daniel Veillard),<br/>
+ A few more fixes for python 3 affecting libxml2.py (Daniel Veillard),<br/>
+ Fix compilation on Python3 (Daniel Veillard),<br/>
+ Converting apibuild.py to python3 (Daniel Veillard),<br/>
+ First pass at starting porting to python3 (Daniel Veillard),<br/>
+ updated configure.in for python3 (Daniel Veillard),<br/>
+ Add support for xpathRegisterVariable in Python (Shaun McCance),<br/>
+ Added a regression tests from bug 694228 data (Daniel Veillard),<br/>
+ Cache presence of '&lt;' in entities content (Daniel Veillard),<br/>
+ Avoid extra processing on entities (Daniel Veillard),<br/>
+ Python binding for xmlRegisterInputCallback (Alexey Neyman),<br/>
+ Python bindings: DOM casts everything to xmlNode (Alexey Neyman),<br/>
+ Define LIBXML_THREAD_ALLOC_ENABLED via xmlversion.h (Tim Starling),<br/>
+ Adding streaming validation to runtest checks (Daniel Veillard),<br/>
+ Add a --pushsmall option to xmllint (Daniel Veillard)<br/>
+ </li>
+
+ <li> Cleanups:<br/>
+ Switched comment in file to UTF-8 encoding (Daniel Veillard),<br/>
+ Extend gitignore (Daniel Veillard),<br/>
+ Silent the new python test on input (Alexey Neyman),<br/>
+ Cleanup of a duplicate test (Daniel Veillard),<br/>
+ Cleanup on duplicate test expressions (Daniel Veillard),<br/>
+ Fix compiler warning after 153cf15905cf4ec080612ada6703757d10caba1e (Patrick,<br/>
+Gansterer),<br/>
+ Spec cleanups and a fix for multiarch support (Daniel Veillard),<br/>
+ Silence a clang warning (Daniel Veillard),<br/>
+ Cleanup the Copyright to be pure MIT Licence wording (Daniel Veillard),<br/>
+ rand_seed should be static in dict.c (Wouter Van Rooy),<br/>
+ Fix typos in parser comments (Jan Pokorný)<br/>
+ </li>
+</ul>
+<h3>2.9.0: Sep 11 2012</h3>
+<ul>
+ <li> Features:<br/>
+ A few new API entry points,<br/>
+ More resilient push parser mode,<br/>
+ A lot of portability improvement,<br/>
+ Faster XPath evaluation<br/>
+ </li>
+
+ <li> Documentation:<br/>
+ xml2-config.1 markup error (Christian Weisgerber),<br/>
+ libxml(3) manpage typo fix (John Bradshaw),<br/>
+ More cleanups to the documentation part of libxml2 (Daniel Richard G)<br/>
+ </li>
+
+ <li> Portability:<br/>
+ Bug 676544 - fails to build with --without-sax1 (Akira TAGOH),<br/>
+ fix builds not having stdint.h (Rob Richards),<br/>
+ GetProcAddressA is available only on WinCE (Daniel Veillard),<br/>
+ More updates and cleanups on autotools and Makefiles (Daniel Richard G),<br/>
+ More changes for Win32 compilation (Eric Zurcher),<br/>
+ Basic changes for Win32 builds of release 2.9.0: compile buf.c (Eric Zurcher),<br/>
+ Bundles all generated files for python into the distribution (Daniel Richard G),<br/>
+ Fix compiler warnings of wincecompat.c (Patrick Gansterer),<br/>
+ Fix non __GNUC__ build (Patrick Gansterer),<br/>
+ Fix windows unicode build (Patrick Gansterer),<br/>
+ clean redefinition of {v}snprintf in C-source (Roumen Petrov),<br/>
+ use xmlBuf... if DEBUG_INPUT is defined (Roumen Petrov),<br/>
+ fix runtests to use pthreads support for various Unix platforms (Daniel Richard G),<br/>
+ Various "make distcheck" and portability fixups 2nd part (Daniel Richard G),<br/>
+ Various "make distcheck" and portability fixups (Daniel Richard G),<br/>
+ Fix compilation on older Visual Studio (Daniel Veillard)<br/>
+ </li>
+
+ <li> Bug Fixes:<br/>
+ Change the XPath code to percolate allocation errors (Daniel Veillard),<br/>
+ Fix reuse of xmlInitParser (Daniel Veillard),<br/>
+ Fix potential crash on entities errors (Daniel Veillard),<br/>
+ initialize var (Rob Richards),<br/>
+ Fix the XPath arity check to also check the XPath stack limits (Daniel Veillard),<br/>
+ Fix problem with specific and generic error handlers (Pietro Cerutti),<br/>
+ Avoid a potential infinite recursion (Daniel Veillard),<br/>
+ Fix an XSD error when generating internal automata (Daniel Veillard),<br/>
+ Patch for xinclude of text using multibyte characters (Vitaly Ostanin),<br/>
+ Fix a segfault on XSD validation on pattern error (Daniel Veillard),<br/>
+ Fix missing xmlsave.h module which was ignored in recent builds (Daniel Veillard),<br/>
+ Add a missing element check (Daniel Veillard),<br/>
+ Adding various checks on node type though the API (Daniel Veillard),<br/>
+ Namespace nodes can't be unlinked with xmlUnlinkNode (Daniel Veillard),<br/>
+ Fix make dist to include new private header files (Daniel Veillard),<br/>
+ More fixups on the push parser behaviour (Daniel Veillard),<br/>
+ Strengthen behaviour of the push parser in problematic situations (Daniel Veillard),<br/>
+ Enforce XML_PARSER_EOF state handling through the parser (Daniel Veillard),<br/>
+ Fixup limits parser (Daniel Veillard),<br/>
+ Do not fetch external parsed entities (Daniel Veillard),<br/>
+ Fix an error in previous commit (Aron Xu),<br/>
+ Fix entities local buffers size problems (Daniel Veillard),<br/>
+ Fix parser local buffers size problems (Daniel Veillard),<br/>
+ Fix a failure to report xmlreader parsing failures (Daniel Veillard)<br/>
+ </li>
+
+ <li> Improvements:<br/>
+ Keep libxml2.syms when running "make distclean" (Daniel Veillard),<br/>
+ Allow to set the quoting character of an xmlWriter (Csaba Raduly),<br/>
+ Keep non-significant blanks node in HTML parser (Daniel Veillard),<br/>
+ Add a forbidden variable error number and message to XPath (Daniel Veillard),<br/>
+ Support long path names on WNT (Michael Stahl),<br/>
+ Improve HTML escaping of attribute on output (Daniel Veillard),<br/>
+ Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors (Arfrever Frehtes Taifersar Arahesis),<br/>
+ Switching XPath node sorting to Timsort (Vojtech Fried),<br/>
+ Optimizing '//' in XPath expressions (Nick Wellnhofer),<br/>
+ Expose xmlBufShrink in the public tree API (Daniel Veillard),<br/>
+ Visible HTML elements close the head tag (Conrad Irwin),<br/>
+ Fix file and line report for XSD SAX and reader streaming validation (Daniel Veillard),<br/>
+ Fix const qualifyer to definition of xmlBufferDetach (Daniel Veillard),<br/>
+ minimize use of HAVE_CONFIG_H (Roumen Petrov),<br/>
+ fixup regression in Various "make distcheck" and portability fixups (Roumen Petrov),<br/>
+ Add support for big line numbers in error reporting (Daniel Veillard),<br/>
+ Avoid using xmlBuffer for serialization (Daniel Veillard),<br/>
+ Improve compatibility between xmlBuf and xmlBuffer (Daniel Veillard),<br/>
+ Provide new accessors for xmlOutputBuffer (Daniel Veillard),<br/>
+ Improvements for old buffer compatibility (Daniel Veillard),<br/>
+ Expand the limit test program (Daniel Veillard),<br/>
+ Improve error reporting on parser errors (Daniel Veillard),<br/>
+ Implement some default limits in the XPath module (Daniel Veillard),<br/>
+ Introduce some default parser limits (Daniel Veillard),<br/>
+ Cleanups and new limit APIs for dictionaries (Daniel Veillard),<br/>
+ Fixup for buf.c (Daniel Veillard),<br/>
+ Cleanup URI module memory allocation code (Daniel Veillard),<br/>
+ Extend testlimits (Daniel Veillard),<br/>
+ More avoid quadratic behaviour (Daniel Veillard),<br/>
+ Impose a reasonable limit on PI size (Daniel Veillard),<br/>
+ first version of testlimits new test (Daniel Veillard),<br/>
+ Avoid quadratic behaviour in some push parsing cases (Daniel Veillard),<br/>
+ Impose a reasonable limit on comment size (Daniel Veillard),<br/>
+ Impose a reasonable limit on attribute size (Daniel Veillard),<br/>
+ Harden the buffer code and make it more compatible (Daniel Veillard),<br/>
+ More cleanups for input/buffers code (Daniel Veillard),<br/>
+ Cleanup function xmlBufResetInput(),<br/> to set input from Buffer (Daniel Veillard)
+ Swicth the test program for characters to new input buffers (Daniel Veillard),<br/>
+ Convert the HTML tree module to the new buffers (Daniel Veillard),<br/>
+ Convert of the HTML parser to new input buffers (Daniel Veillard),<br/>
+ Convert the writer to new output buffer and save APIs (Daniel Veillard),<br/>
+ Convert XMLReader to the new input buffers (Daniel Veillard),<br/>
+ New saving functions using xmlBuf and conversion (Daniel Veillard),<br/>
+ Provide new xmlBuf based saving functions (Daniel Veillard),<br/>
+ Convert XInclude to the new input buffers (Daniel Veillard),<br/>
+ Convert catalog code to the new input buffers (Daniel Veillard),<br/>
+ Convert C14N to the new Input buffer (Daniel Veillard),<br/>
+ Convert xmlIO.c to the new input and output buffers (Daniel Veillard),<br/>
+ Convert XML parser to the new input buffers (Daniel Veillard),<br/>
+ Incompatible change to the Input and Output buffers (Daniel Veillard),<br/>
+ Adding new encoding function to deal with the new structures (Daniel Veillard),<br/>
+ Convert XPath to xmlBuf (Daniel Veillard),<br/>
+ Adding a new buf module for buffers (Daniel Veillard),<br/>
+ Memory error within SAX2 reuse common framework (Daniel Veillard),<br/>
+ Fix xmllint --xpath node initialization (Daniel Veillard)<br/>
+ </li>
+
+ <li> Cleanups:<br/>
+ Various cleanups to avoid compiler warnings (Daniel Veillard),<br/>
+ Big space and tab cleanup (Daniel Veillard),<br/>
+ Followup to LibXML2 docs/examples cleanup patch (Daniel Veillard),<br/>
+ Second round of cleanups for LibXML2 docs/examples (Daniel Richard),<br/>
+ Remove all .cvsignore as they are not used anymore (Daniel Veillard),<br/>
+ Fix a Timsort function helper comment (Daniel Veillard),<br/>
+ Small cleanup for valgrind target (Daniel Veillard),<br/>
+ Patch for portability of latin characters in C files (Daniel Veillard),<br/>
+ Cleanup some of the parser code (Daniel Veillard),<br/>
+ Fix a variable name in comment (Daniel Veillard),<br/>
+ Regenerated testapi.c (Daniel Veillard),<br/>
+ Regenerating docs and API files (Daniel Veillard),<br/>
+ Small cleanup of unused variables in test (Daniel Veillard),<br/>
+ Expand .gitignore with more files (Daniel Veillard)<br/>
+ </li>
+</ul>
+<h3>2.8.0: May 23 2012</h3>
+<ul>
+ <li>Features:
+ add lzma compression support (Anders F Bjorklund)
+ </li>
+
+ <li>Documentation:
+ xmlcatalog: Add uri and delegateURI to possible add types in man page. (Ville Skyttä),
+ Update README.tests (Daniel Veillard),
+ URI handling code is not OOM resilient (Daniel Veillard),
+ Fix an error in comment (Daniel Veillard),
+ Fixed bug #617016 (Daniel Mustieles),
+ Fixed two typos in the README document (Daniel Neel),
+ add generated html files (Anders F Bjorklund),
+ Clarify the need to use xmlFreeNode after xmlUnlinkNode (Daniel Veillard),
+ Improve documentation a bit (Daniel Veillard),
+ Updated URL for lxml python bindings (Daniel Veillard)
+ </li>
+
+ <li>Portability:
+ Restore code for Windows compilation (Daniel Veillard),
+ Remove git error message during configure (Christian Dywan),
+ xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY) (Patrick R. Gansterer),
+ remove a bashism in confgure.in (John Hein),
+ undef ERROR if already defined (Patrick R. Gansterer),
+ Fix library problems with mingw-w64 (Michael Cronenworth),
+ fix windows build. ifdef addition from bug 666491 makes no sense (Rob Richards),
+ prefer native threads on win32 (Sam Thursfield),
+ Allow to compile with Visual Studio 2010 (Thomas Lemm),
+ Fix mingw's snprintf configure check (Andoni Morales),
+ fixed a 64bit big endian issue (Marcus Meissner),
+ Fix portability failure if netdb.h lacks NO_ADDRESS (Daniel Veillard),
+ Fix windows build from lzma addition (Rob Richards),
+ autogen: Only check for libtoolize (Colin Walters),
+ Fix the Windows build files (Patrick von Reth),
+ 634846 Remove a linking option breaking Windows VC10 (Daniel Veillard),
+ 599241 fix an initialization problem on Win64 (Andrew W. Nosenko),
+ fix win build (Rob Richards)
+ </li>
+
+ <li>Bug fixes:
+ Part for rand_r checking missing (Daniel Veillard),
+ Cleanup on randomization (Daniel Veillard),
+ Fix undefined reference in python module (Pacho Ramos),
+ Fix a race in xmlNewInputStream (Daniel Veillard),
+ Fix weird streaming RelaxNG errors (Noam),
+ Fix various bugs in new code raised by the API checking (Daniel Veillard),
+ Fix various problems with "make dist" (Daniel Veillard),
+ Fix a memory leak in the xzlib code (Daniel Veillard),
+ HTML parser error with &lt;noscript&gt; in the &lt;head&gt; (Denis Pauk),
+ XSD: optional element in complex type extension (Remi Gacogne),
+ Fix html serialization error and htmlSetMetaEncoding() (Daniel Veillard),
+ Fix a wrong return value in previous patch (Daniel Veillard),
+ Fix an uninitialized variable use (Daniel Veillard),
+ Fix a compilation problem with --minimum (Brandon Slack),
+ Remove redundant and ungarded include of resolv.h (Daniel Veillard),
+ xinclude with parse="text" does not use the entity loader (Shaun McCance),
+ Allow to parse 1 byte HTML files (Denis Pauk),
+ Patch that fixes the skipping of the HTML_PARSE_NOIMPLIED flag (Martin Schröder),
+ Avoid memory leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li),
+ Prevent an infinite loop when dumping a node with encoding problems (Timothy Elliott),
+ xmlParseNodeInContext problems with an empty document (Tim Elliott),
+ HTML element position is not detected propperly (Pavel Andrejs),
+ Fix an off by one pointer access (Jüri Aedla),
+ Try to fix a problem with entities in SAX mode (Daniel Veillard),
+ Fix a crash with xmllint --path on empty results (Daniel Veillard),
+ Fixed bug #667946 (Daniel Mustieles),
+ Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
+ Fix a wrong enum type use in Schemas Types (Nico Weber),
+ Fix SAX2 builder in case of undefined attributes namespace (Daniel Veillard),
+ Fix SAX2 builder in case of undefined element namespaces (Daniel Veillard),
+ fix reference to STDOUT_FILENO on MSVC (Tay Ray Chuan),
+ fix a pair of possible out of array char references (Daniel Veillard),
+ Fix an allocation error when copying entities (Daniel Veillard),
+ Make sure the parser returns when getting a Stop order (Chris Evans),
+ Fix some potential problems on reallocation failures(parser.c) (Xia Xinfeng),
+ Fix a schema type duration comparison overflow (Daniel Veillard),
+ Fix an unimplemented part in RNG value validation (Daniel Veillard),
+ Fix missing error status in XPath evaluation (Daniel Veillard),
+ Hardening of XPath evaluation (Daniel Veillard),
+ Fix an off by one error in encoding (Daniel Veillard),
+ Fix RELAX NG include bug #655288 (Shaun McCance),
+ Fix XSD validation bug #630130 (Toyoda Eizi),
+ Fix some potential problems on reallocation failures (Chris Evans),
+ __xmlRaiseError: fix use of the structured callback channel (Dmitry V. Levin),
+ __xmlRaiseError: fix the structured callback channel's data initialization (Dmitry V. Levin),
+ Fix memory corruption when xmlParseBalancedChunkMemoryInternal is called from xmlParseBalancedChunk (Rob Richards),
+ Small fix for previous commit (Daniel Veillard),
+ Fix a potential freeing error in XPath (Daniel Veillard),
+ Fix a potential memory access error (Daniel Veillard),
+ Reactivate the shared library versionning script (Daniel Veillard)
+ </li>
+
+ <li>Improvements:
+ use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime (Roumen Petrov),
+ New symbols added for the next release (Daniel Veillard),
+ xmlTextReader bails too quickly on error (Andy Lutomirski),
+ Use a hybrid allocation scheme in xmlNodeSetContent (Conrad Irwin),
+ Use buffers when constructing string node lists. (Conrad Irwin),
+ Add HTML parser support for HTML5 meta charset encoding declaration (Denis Pauk),
+ wrong message for double hyphen in comment XML error (Bryan Henderson),
+ Fix "make tst" to grab lzma lib too (Daniel Veillard),
+ Add "whereis" command to xmllint shell (Ryan),
+ Improve xmllint shell (Ryan),
+ add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
+ Add --system support to autogen.sh (Daniel Veillard),
+ Add hash randomization to hash and dict structures (Daniel Veillard),
+ included xzlib in dist (Anders F Bjorklund),
+ move xz/lzma helpers to separate included files (Anders F Bjorklund),
+ add generated devhelp files (Anders F Bjorklund),
+ add XML_WITH_LZMA to api (Anders F Bjorklund),
+ autogen.sh: Honor NOCONFIGURE environment variable (Colin Walters),
+ Improve the error report on undefined REFs (Daniel Veillard),
+ Add exception for new W3C PI xml-model (Daniel Veillard),
+ Add options to ignore the internal encoding (Daniel Veillard),
+ testapi: use the right type for the check (Stefan Kost),
+ various: handle return values of write calls (Stefan Kost),
+ testWriter: xmlTextWriterWriteFormatElement wants an int instead of a long int (Stefan Kost),
+ runxmlconf: update to latest testsuite version (Stefan Kost),
+ configure: add -Wno-long-long to CFLAGS (Stefan Kost),
+ configure: support silent automake rules if possible (Stefan Kost),
+ xmlmemory: add a cast as size_t has no portable printf modifier (Stefan Kost),
+ __xmlRaiseError: remove redundant schannel initialization (Dmitry V. Levin),
+ __xmlRaiseError: do cheap code check early (Dmitry V. Levin)
+ </li>
+
+ <li>Cleanups:
+ Cleanups before 2.8.0-rc2 (Daniel Veillard),
+ Avoid an extra operation (Daniel Veillard),
+ Remove vestigial de-ANSI-fication support. (Javier Jardón),
+ autogen.sh: Fix typo (Javier Jardón),
+ Do not use unsigned but unsigned int (Daniel Veillard),
+ Remove two references to u_short (Daniel Veillard),
+ Fix -Wempty-body warning from clang (Nico Weber),
+ Cleanups of lzma support (Daniel Veillard),
+ Augment the list of ignored files (Daniel Veillard),
+ python: remove unused variable (Stefan Kost),
+ python: flag two unused args (Stefan Kost),
+ configure: acconfig.h is deprecated since autoconf-2.50 (Stefan Kost),
+ xpath: remove unused variable (Stefan Kost)
+ </li>
+</ul>
+<h3>2.7.8: Nov 4 2010</h3>
+<ul>
+ <li> Features:
+ 480323 add code to plug in ICU converters by default (Giuseppe Iuculano),
+ Add xmlSaveOption XML_SAVE_WSNONSIG (Adam Spragg)
+ </li>
+ <li> Documentation:
+ Fix devhelp documentation installation (Mike Hommey),
+ Fix web site encoding problems (Daniel Veillard),
+ Fix a couple of typo in HTML parser error messages (Michael Day),
+ Forgot to update the news page for 0.7.7 (Daniel Veillard)
+ </li>
+ <li> Portability:
+ 607273 Fix python detection on MSys/Windows (LRN),
+ 614087 Fix Socket API usage to allow Windows64 compilation (Ozkan Sezer),
+ Fix compilation with Clang (Koop Mast),
+ Fix Win32 build (Rob Richards)
+ </li>
+ <li> Bug Fixes:
+ 595789 fix a remaining potential Solaris problem (Daniel Veillard),
+ 617468 fix progressive HTML parsing with style using "'" (Denis Pauk),
+ 616478 Fix xmllint shell write command (Gwenn Kahz),
+ 614005 Possible erroneous HTML parsing on unterminated script (Pierre Belzile),
+ 627987 Fix XSD IDC errors in imported schemas (Jim Panetta),
+ 629325 XPath rounding errors first cleanup (Phil Shafer),
+ 630140 fix iso995x encoding error (Daniel Veillard),
+ make sure htmlCtxtReset do reset the disableSAX field (Daniel Veillard),
+ Fix a change of semantic on XPath preceding and following axis (Daniel Veillard),
+ Fix a potential segfault due to weak symbols on pthreads (Mike Hommey),
+ Fix a leak in XPath compilation (Daniel Veillard),
+ Fix the semantic of XPath axis for namespace/attribute context nodes (Daniel Veillard),
+ Avoid a descriptor leak in catalog loading code (Carlo Bramini),
+ Fix a small bug in XPath evaluation code (Marius Wachtler),
+ Fix handling of XML-1.0 XML namespace declaration (Daniel Veillard),
+ Fix errors in XSD double validation check (Csaba Raduly),
+ Fix handling of apos in URIs (Daniel Veillard),
+ xmlTextReaderReadOuterXml should handle DTD (Rob Richards),
+ Autogen.sh needs to create m4 directory (Rob Richards)
+ </li>
+ <li> Improvements:
+ 606592 update language ID parser to RFC 5646 (Daniel Veillard),
+ Sort python generated stubs (Mike Hommey),
+ Add an HTML parser option to avoid a default doctype (Daniel Veillard)
+ </li>
+ <li> Cleanups:
+ 618831 don't ship generated files in git (Adrian Bunk),
+ Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P (Adrian Bunk),
+ Various cleanups on encoding handling (Daniel Veillard),
+ Fix xmllint to use format=1 for default formatting (Adam Spragg),
+ Force _xmlSaveCtxt.format to be 0 or 1 (Adam Spragg),
+ Cleanup encoding pointer comparison (Nikolay Sivov),
+ Small code cleanup on previous patch (Daniel Veillard)
+ </li>
+</ul>
+<h3>2.7.7: Mar 15 2010</h3>
+<ul>
+ <li> Improvements:
+ Adding a --xpath option to xmllint (Daniel Veillard),
+ Make HTML parser non-recursive (Eugene Pimenov)
+ </li>
+ <li> Portability:
+ relaxng.c: cast to allow compilation with sun studio 11 (Ben Walton),
+ Fix build failure on Sparc solaris (Roumen Petrov),
+ use autoreconf in autogen.sh (Daniel Veillard),
+ Fix build with mingw (Roumen Petrov),
+ Upgrade some of the configure and autogen (Daniel Veillard),
+ Fix relaxNG tests in runtest for Windows runtest.c: initialize ret (Rob Richards),
+ Fix a const warning in xmlNodeSetBase (Martin Trappel),
+ Fix python generator to not use deprecated xmllib (Daniel Veillard),
+ Update some automake files (Daniel Veillard),
+ 598785 Fix nanohttp on Windows (spadix)
+ </li>
+ <li> Bug Fixes:
+ libxml violates the zlib interface and crashes (Mark Adler),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Fix missing win32 libraries in libxml-2.0.pc (Volker Grabsch),
+ Fix detection of python linker flags (Daniel Macks),
+ fix build error in libxml2/python (Paul Smith),
+ ChunkParser: Incorrect decoding of small xml files (Raul Hudea),
+ htmlCheckEncoding doesn't update input-end after shrink (Eugene Pimenov),
+ Fix a missing #ifdef (Daniel Veillard),
+ Fix encoding selection for xmlParseInNodeContext (Daniel Veillard),
+ xmlPreviousElementSibling mistake (François Delyon),
+ 608773 add a missing check in xmlGROW (Daniel Veillard),
+ Fix xmlParseInNodeContext for HTML content (Daniel Veillard),
+ Fix lost namespace when copying node * tree.c: reconcile namespace if not found (Rob Richards),
+ Fix some missing commas in HTML element lists (Eugene Pimenov),
+ Correct variable type to unsigned (Nikolay Sivov),
+ Recognize ID attribute in HTML without DOCTYPE (Daniel Veillard),
+ Fix memory leak in xmlXPathEvalExpression() (Martin),
+ Fix an init bug in global.c (Kai Henning),
+ Fix xmlNodeSetBase() comment (Daniel Veillard),
+ Fix broken escape behaviour in regexp ranges (Daniel Veillard),
+ Don't give default HTML boolean attribute values in parser (Daniel Veillard),
+ xmlCtxtResetLastError should reset ctxt-errNo (Daniel Veillard)
+ </li>
+ <li> Cleanups:
+ Cleanup a couple of weirdness in HTML parser (Eugene Pimenov)
+ </li>
+</ul>
+<h3>2.7.6: Oct 6 2009</h3>
+<ul>
+ <li> Bug Fixes:
+ Restore thread support in default configuration (Andrew W. Nosenko),
+ URI with no path parsing problem (Daniel Veillard),
+ Minor patch for conditional defines in threads.c (Eric Zurcher)
+ </li>
+</ul>
+<h3>2.7.5: Sep 24 2009</h3>
+<ul>
+ <li> Bug Fixes:
+ Restore behavior of --with-threads without argument (Andrew W. Nosenko),
+ Fix memory leak when doc is NULL (Rob Richards),
+ 595792 fixing a RelaxNG bug introduced in 2.7.4 (Daniel Veillard),
+ Fix a Relaxng bug raised by libvirt test suite (Daniel Veillard),
+ Fix a parsing problem with little data at startup (Daniel Veillard),
+ link python module with python library (Frederic Crozat),
+ 594874 Forgot an fclose in xmllint (Daniel Veillard)
+ </li>
+ <li> Cleanup:
+ Adding symbols.xml to EXTRA_DIST (Daniel Veillard)
+ </li>
+</ul>
+<h3>2.7.4: Sep 10 2009</h3>
+<ul>
+ <li>Improvements:
+ Switch to GIT (GNOME),
+ Add symbol versioning to libxml2 shared libs (Daniel Veillard)
+ </li>
+ <li>Portability:
+ 593857 try to work around thread pbm MinGW 4.4 (Daniel Veillard),
+ 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes (Daniel Veillard),
+ Fix Windows build * relaxng.c: fix windows build (Rob Richards),
+ Fix the globals.h to use XMLPUBFUN (Paul Smith),
+ Problem with extern extern in header (Daniel Veillard),
+ Add -lnetwork for compiling on Haiku (Scott McCreary),
+ Runtest portability patch for Solaris (Tim Rice),
+ Small patch to accomodate the Haiku OS (Scott McCreary),
+ 584605 package VxWorks folder in the distribution (Daniel Veillard),
+ 574017 Realloc too expensive on most platform (Daniel Veillard),
+ Fix windows build (Rob Richards),
+ 545579 doesn't compile without schema support (Daniel Veillard),
+ xmllint use xmlGetNodePath when not compiled in (Daniel Veillard),
+ Try to avoid __imp__xmlFree link trouble on msys (Daniel Veillard),
+ Allow to select the threading system on Windows (LRN),
+ Fix Solaris binary links, cleanups (Daniel Veillard),
+ Bug 571059 – MSVC doesn't work with the bakefile (Intron),
+ fix ATTRIBUTE_PRINTF header clash (Belgabor and Mike Hommey),
+ fixes for Borland/CodeGear/Embarcadero compilers (Eric Zurcher)
+ </li>
+ <li>Documentation:
+ 544910 typo: "renciliateNs" (Leonid Evdokimov),
+ Add VxWorks to list of OSes (Daniel Veillard),
+ Regenerate the documentation and update for git (Daniel Veillard),
+ 560524 ¿ xmlTextReaderLocalName description (Daniel Veillard),
+ Added sponsoring by AOE media for the server (Daniel Veillard),
+ updated URLs for GNOME (Vincent Lefevre),
+ more warnings about xmlCleanupThreads and xmlCleanupParser (Daniel Veillard)
+ </li>
+ <li>Bug fixes:
+ 594514 memory leaks - duplicate initialization (MOD),
+ Wrong block opening in htmlNodeDumpOutputInternal (Daniel Veillard),
+ 492317 Fix Relax-NG validation problems (Daniel Veillard),
+ 558452 fight with reg test and error report (Daniel Veillard),
+ 558452 RNG compilation of optional multiple child (Daniel Veillard),
+ 579746 XSD validation not correct / nilable groups (Daniel Veillard),
+ 502960 provide namespace stack when parsing entity (Daniel Veillard),
+ 566012 part 2 fix regresion tests and push mode (Daniel Veillard),
+ 566012 autodetected encoding and encoding conflict (Daniel Veillard),
+ 584220 xpointer(/) and xinclude problems (Daniel Veillard),
+ 587663 Incorrect Attribute-Value Normalization (Daniel Veillard),
+ 444994 HTML chunked failure for attribute with &lt;&gt; (Daniel Veillard),
+ Fix end of buffer char being split in XML parser (Daniel Veillard),
+ Non ASCII character may be split at buffer end (Adiel Mittmann),
+ 440226 Add xmlXIncludeProcessTreeFlagsData API (Stefan Behnel),
+ 572129 speed up parsing of large HTML text nodes (Markus Kull),
+ Fix HTML parsing with 0 character in CDATA (Daniel Veillard),
+ Fix SetGenericErrorFunc and SetStructured clash (Wang Lam),
+ 566012 Incomplete EBCDIC parsing support (Martin Kogler),
+ 541335 HTML avoid creating 2 head or 2 body element (Daniel Veillard),
+ 541237 error correcting missing end tags in HTML (Daniel Veillard),
+ 583439 missing line numbers in push mode (Daniel Veillard),
+ 587867 xmllint --html --xmlout serializing as HTML (Daniel Veillard),
+ 559501 avoid select and use poll for nanohttp (Raphael Prevost),
+ 559410 - Regexp bug on (...)? constructs (Daniel Veillard),
+ Fix a small problem on previous HTML parser patch (Daniel Veillard),
+ 592430 - HTML parser runs into endless loop (Daniel Veillard),
+ 447899 potential double free in xmlFreeTextReader (Daniel Veillard),
+ 446613 small validation bug mixed content with NS (Daniel Veillard),
+ Fix the problem of revalidating a doc with RNG (Daniel Veillard),
+ Fix xmlKeepBlanksDefault to not break indent (Nick Wellnhofer),
+ 512131 refs from externalRef part need to be added (Daniel Veillard),
+ 512131 crash in xmlRelaxNGValidateFullElement (Daniel Veillard),
+ 588441 allow '.' in HTML Names even if invalid (Daniel Veillard),
+ 582913 Fix htmlSetMetaEncoding() to be nicer (Daniel Veillard),
+ 579317 Try to find the HTML encoding information (Daniel Veillard),
+ 575875 don't output charset=html (Daniel Veillard),
+ 571271 fix semantic of xsd:all with minOccurs=0 (Daniel Veillard),
+ 570702 fix a bug in regexp determinism checking (Daniel Veillard),
+ 567619 xmlValidateNotationUse missing param test (Daniel Veillard),
+ 574393 ¿ utf-8 filename magic for compressed files (Hans Breuer),
+ Fix a couple of problems in the parser (Daniel Veillard),
+ 585505 ¿ Document ids and refs populated by XSD (Wayne Jensen),
+ 582906 XSD validating multiple imports of the same schema (Jason Childs),
+ Bug 582887 ¿ problems validating complex schemas (Jason Childs),
+ Bug 579729 ¿ fix XSD schemas parsing crash (Miroslav Bajtos),
+ 576368 ¿ htmlChunkParser with special attributes (Jiri Netolicky),
+ Bug 565747 ¿ relax anyURI data character checking (Vincent Lefevre),
+ Preserve attributes of include start on tree copy (Petr Pajas),
+ Skip silently unrecognized XPointer schemes (Jakub Wilk),
+ Fix leak on SAX1, xmllint --sax1 option and debug (Daniel Veillard),
+ potential NULL dereference on non-glibc (Jim Meyering),
+ Fix an XSD validation crash (Daniel Veillard),
+ Fix a regression in streaming entities support (Daniel Veillard),
+ Fix a couple of ABI issues with C14N 1.1 (Aleksey Sanin),
+ Aleksey Sanin support for c14n 1.1 (Aleksey Sanin),
+ reader bug fix with entities (Daniel Veillard),
+ use options from current parser ctxt for external entities (Rob Richards),
+ 581612 use %s to printf strings (Christian Persch),
+ 584605 change the threading initialization sequence (Igor Novoseltsev),
+ 580705 keep line numbers in HTML parser (Aaron Patterson),
+ 581803 broken HTML table attributes init (Roland Steiner),
+ do not set error code in xmlNsWarn (Rob Richards),
+ 564217 fix structured error handling problems,
+ reuse options from current parser for entities (Rob Richards),
+ xmlXPathRegisterNs should not allow enpty prefixes (Daniel Veillard),
+ add a missing check in xmlAddSibling (Kris Breuker),
+ avoid leaks on errors (Jinmei Tatuya)
+ </li>
+ <li>Cleanup:
+ Chasing dead assignments reported by clang-scan (Daniel Veillard),
+ A few more safety cleanup raised by scan (Daniel Veillard),
+ Fixing assorted potential problems raised by scan (Daniel Veillard),
+ Potential uninitialized arguments raised by scan (Daniel Veillard),
+ Fix a bunch of scan 'dead increments' and cleanup (Daniel Veillard),
+ Remove a pedantic warning (Daniel Veillard),
+ 555833 always use rm -f in uninstall-local (Daniel Veillard),
+ 542394 xmlRegisterOutputCallbacks MAX_INPUT_CALLBACK (Daniel Veillard),
+ Autoregenerate libxml2.syms automated checkings (Daniel Veillard),
+ Make xmlRecoverDoc const (Martin Trappel) (Daniel Veillard),
+ Both args of xmlStrcasestr are const (Daniel Veillard),
+ hide the nbParse* variables used for debugging (Mike Hommey),
+ 570806 changed include of config.h (William M. Brack),
+ cleanups and error reports when xmlTextWriterVSprintf fails (Jinmei Tatuya)
+ </li>
+</ul>
+<h3>2.7.3: Jan 18 2009</h3>
+<ul>
+ <li>Build fix: fix build when HTML support is not included.</li>
+ <li>Bug fixes: avoid memory overflow in gigantic text nodes,
+ indentation problem on the writed (Rob Richards),
+ xmlAddChildList pointer problem (Rob Richards and Kevin Milburn),
+ xmlAddChild problem with attribute (Rob Richards and Kris Breuker),
+ avoid a memory leak in an edge case (Daniel Zimmermann),
+ deallocate some pthread data (Alex Ott).</li>
+ <li>Improvements: configure option to avoid rebuilding docs (Adrian Bunk),
+ limit text nodes to 10MB max by default, add element traversal
+ APIs, add a parser option to enable pre 2.7 SAX behavior (Rob Richards),
+ add gcc malloc checking (Marcus Meissner), add gcc printf like functions
+ parameters checking (Marcus Meissner).</li>
+</ul>
+<h3>2.7.2: Oct 3 2008</h3>
+<ul>
+ <li>Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in</li>
+ <li>Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+ <li>Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents</li>
+</ul>
+
+<h3>2.7.1: Sep 1 2008</h3>
+<ul>
+ <li>Portability fix: Borland C fix (Moritz Both)</li>
+ <li>Bug fixes: python serialization wrappers, XPath QName corner
+ case handking and leaks (Martin)</li>
+ <li>Improvement: extend the xmlSave to handle HTML documents and trees</li>
+ <li>Cleanup: python serialization wrappers</li>
+</ul>
+
+<h3>2.7.0: Aug 30 2008</h3>
+<ul>
+ <li>Documentation: switch ChangeLog to UTF-8, improve mutithreads and
+ xmlParserCleanup docs</li>
+ <li>Portability fixes: Older Win32 platforms (Rob Richards), MSVC
+ porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg),
+ non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
+ </li>
+ <li>Bug fixes: various realloc problems (Ashwin), potential double-free
+ (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
+ Richards), pattern fix when streaming (William Brack), various XML
+ parsing and validation fixes based on the W3C regression tests, reader
+ tree skipping function fix (Ashwin), Schemas regexps escaping fix
+ (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown
+ when encoder cant serialize characters on output</li>
+ <li>Code cleanup: compilation fix without the reader, without the output
+ (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups,
+ serious cleanup of the entity handling code</li>
+ <li>Improvement: switch parser to XML-1.0 5th edition, add parsing flags
+ for old versions, switch URI parsing to RFC 3986,
+ add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
+ new hashing functions for dictionnaries (based on Stefan Behnel work),
+ improve handling of misplaced html/head/body in HTML parser, better
+ regression test tools and code coverage display, better algorithms
+ to detect various versions of the billion laughts attacks, make
+ arbitrary parser limits avoidable as a parser option</li>
+</ul>
+<h3>2.6.32: Apr 8 2008</h3>
+<ul>
+ <li>Documentation: returning heap memory to kernel (Wolfram Sang),
+ trying to clarify xmlCleanupParser() use, xmlXPathContext improvement
+ (Jack Jansen), improve the *Recover* functions documentation,
+ XmlNodeType doc link fix (Martijn Arts)</li>
+ <li>Bug fixes: internal subset memory leak (Ashwin), avoid problem with
+ paths starting with // (Petr Sumbera), streaming XSD validation callback
+ patches (Ashwin), fix redirection on port other than 80 (William Brack),
+ SAX2 leak (Ashwin), XInclude fragment of own document (Chris Ryan),
+ regexp bug with '.' (Andrew Tosh), flush the writer at the end of the
+ document (Alfred Mickautsch), output I/O bug fix (William Brack),
+ writer CDATA output after a text node (Alex Khesin), UTF-16 encoding
+ detection (William Brack), fix handling of empty CDATA nodes for Safari
+ team, python binding problem with namespace nodes, improve HTML parsing
+ (Arnold Hendriks), regexp automata build bug, memory leak fix (Vasily
+ Chekalkin), XSD test crash, weird system parameter entity parsing problem,
+ allow save to file:///X:/ windows paths, various attribute normalisation
+ problems, externalSubsetSplit fix (Ashwin), attribute redefinition in
+ the DTD (Ashwin), fix in char ref parsing check (Alex Khesin), many
+ out of memory handling fixes (Ashwin), XPath out of memory handling fixes
+ (Alvaro Herrera), various realloc problems (Ashwin), UCS4 encoding
+ conversion buffer size (Christian Fruth), problems with EatName
+ functions on memory errors, BOM handling in external parsed entities
+ (Mark Rowe)</li>
+ <li>Code cleanup: fix build under VS 2008 (David Wimsey), remove useless
+ mutex in xmlDict (Florent Guilian), Mingw32 compilation fix (Carlo
+ Bramini), Win and MacOS EOL cleanups (Florent Guiliani), iconv need
+ a const detection (Roumen Petrov), simplify xmlSetProp (Julien Charbon),
+ cross compilation fixes for Mingw (Roumen Petrov), SCO Openserver build
+ fix (Florent Guiliani), iconv uses const on Win32 (Rob Richards),
+ duplicate code removal (Ashwin), missing malloc test and error reports
+ (Ashwin), VMS makefile fix (Tycho Hilhorst)</li>
+ <li>improvements: better plug of schematron in the normal error handling
+ (Tobias Minich)</li>
+</ul>
+
+<h3>2.6.31: Jan 11 2008</h3>
+<ul>
+ <li>Security fix: missing of checks in UTF-8 parsing</li>
+ <li>Bug fixes: regexp bug, dump attribute from XHTML document, fix
+ xmlFree(NULL) to not crash in debug mode, Schematron parsing crash
+ (Rob Richards), global lock free on Windows (Marc-Antoine Ruel),
+ XSD crash due to double free (Rob Richards), indentation fix in
+ xmlTextWriterFullEndElement (Felipe Pena), error in attribute type
+ parsing if attribute redeclared, avoid crash in hash list scanner if
+ deleting elements, column counter bug fix (Christian Schmidt),
+ HTML embed element saving fix (Stefan Behnel), avoid -L/usr/lib
+ output from xml2-config (Fred Crozat), avoid an xmllint crash
+ (Stefan Kost), don't stop HTML parsing on out of range chars.
+ </li>
+ <li>Code cleanup: fix open() call third argument, regexp cut'n paste
+ copy error, unused variable in __xmlGlobalInitMutexLock (Hannes Eder),
+ some make distcheck realted fixes (John Carr)</li>
+ <li>Improvements: HTTP Header: includes port number (William Brack),
+ testURI --debug option, </li>
+</ul>
+<h3>2.6.30: Aug 23 2007</h3>
+<ul>
+ <li>Portability: Solaris crash on error handling, windows path fixes
+ (Roland Schwarz and Rob Richards), mingw build (Roland Schwarz)</li>
+ <li>Bugfixes: xmlXPathNodeSetSort problem (William Brack), leak when
+ reusing a writer for a new document (Dodji Seketeli), Schemas
+ xsi:nil handling patch (Frank Gross), relative URI build problem
+ (Patrik Fimml), crash in xmlDocFormatDump, invalid char in comment
+ detection bug, fix disparity with xmlSAXUserParseMemory, automata
+ generation for complex regexp counts problems, Schemas IDC import
+ problems (Frank Gross), xpath predicate evailation error handling
+ (William Brack)</li>
+</ul>
+<h3>2.6.29: Jun 12 2007</h3>
+<ul>
+ <li>Portability: patches from Andreas Stricke for WinCEi,
+ fix compilation warnings (William Brack), avoid warnings on Apple OS/X
+ (Wendy Doyle and Mark Rowe), Windows compilation and threading
+ improvements (Rob Richards), compilation against old Python versions,
+ new GNU tar changes (Ryan Hill)</li>
+ <li>Documentation: xmlURIUnescapeString comment, </li>
+ <li>Bugfixes: xmlBufferAdd problem (Richard Jones), 'make valgrind'
+ flag fix (Richard Jones), regexp interpretation of \,
+ htmlCreateDocParserCtxt (Jean-Daniel Dupas), configure.in
+ typo (Bjorn Reese), entity content failure, xmlListAppend() fix
+ (Georges-André Silber), XPath number serialization (William Brack),
+ nanohttp gzipped stream fix (William Brack and Alex Cornejo),
+ xmlCharEncFirstLine typo (Mark Rowe), uri bug (François Delyon),
+ XPath string value of PI nodes (William Brack), XPath node set
+ sorting bugs (William Brack), avoid outputting namespace decl
+ dups in the writer (Rob Richards), xmlCtxtReset bug, UTF-8 encoding
+ error handling, recustion on next in catalogs, fix a Relax-NG crash,
+ workaround wrong file: URIs, htmlNodeDumpFormatOutput on attributes,
+ invalid character in attribute detection bug, big comments before
+ internal subset streaming bug, HTML parsing of attributes with : in
+ the name, IDness of name in HTML (Dagfinn I. Mannsåker) </li>
+ <li>Improvement: keep URI query parts in raw form (Richard Jones),
+ embed tag support in HTML (Michael Day) </li>
+</ul>
+
+<h3>2.6.28: Apr 17 2007</h3>
+<ul>
+ <li>Documentation: comment fixes (Markus Keim), xpath comments fixes too
+ (James Dennett)</li>
+ <li>Bug fixes: XPath bug (William Brack), HTML parser autoclose stack usage
+ (Usamah Malik), various regexp bug fixes (DV and William), path conversion
+ on Windows (Igor Zlatkovic), htmlCtxtReset fix (Michael Day), XPath
+ principal node of axis bug, HTML serialization of some codepoint
+ (Steven Rainwater), user data propagation in XInclude (Michael Day),
+ standalone and XML decl detection (Michael Day), Python id ouptut
+ for some id, fix the big python string memory leak, URI parsing fixes
+ (Stéphane Bidoul and William), long comments parsing bug (William),
+ concurrent threads initialization (Ted Phelps), invalid char
+ in text XInclude (William), XPath memory leak (William), tab in
+ python problems (Andreas Hanke), XPath node comparison error
+ (Oleg Paraschenko), cleanup patch for reader (Julien Reichel),
+ XML Schemas attribute group (William), HTML parsing problem (William),
+ fix char 0x2d in regexps (William), regexp quantifier range with
+ min occurs of 0 (William), HTML script/style parsing (Mike Day)</li>
+ <li>Improvement: make xmlTextReaderSetup() public</li>
+ <li>Compilation and postability: fix a missing include problem (William),
+ __ss_familly on AIX again (Björn Wiberg), compilation without zlib
+ (Michael Day), catalog patch for Win32 (Christian Ehrlicher),
+ Windows CE fixes (Andreas Stricke)</li>
+ <li>Various CVS to SVN infrastructure changes</li>
+</ul>
+<h3>2.6.27: Oct 25 2006</h3>
+<ul>
+ <li>Portability fixes: file names on windows (Roland Schwingel,
+ Emelyanov Alexey), windows compile fixup (Rob Richards),
+ AIX iconv() is apparently case sensitive</li>
+ <li>improvements: Python XPath types mapping (Nic Ferrier), XPath optimization
+ (Kasimier), add xmlXPathCompiledEvalToBoolean (Kasimier), Python node
+ equality and comparison (Andreas Pakulat), xmlXPathCollectAndTest
+ improvememt (Kasimier), expose if library was compiled with zlib
+ support (Andrew Nosenko), cache for xmlSchemaIDCMatcher structs
+ (Kasimier), xmlTextConcat should work with comments and PIs (Rob
+ Richards), export htmlNewParserCtxt needed by Michael Day, refactoring
+ of catalog entity loaders (Michael Day), add XPointer support to
+ python bindings (Ross Reedstrom, Brian West and Stefan Anca),
+ try to sort out most file path to URI conversions and xmlPathToUri,
+ add --html --memory case to xmllint</li>
+ <li>building fix: fix --with-minimum (Felipe Contreras), VMS fix,
+ const'ification of HTML parser structures (Matthias Clasen),
+ portability fix (Emelyanov Alexey), wget autodetection (Peter
+ Breitenlohner), remove the build path recorded in the python
+ shared module, separate library flags for shared and static builds
+ (Mikhail Zabaluev), fix --with-minimum --with-sax1 builds, fix
+ --with-minimum --with-schemas builds</li>
+ <li>bug fix: xmlGetNodePath fix (Kasimier), xmlDOMWrapAdoptNode and
+ attribute (Kasimier), crash when using the recover mode,
+ xmlXPathEvalExpr problem (Kasimier), xmlXPathCompExprAdd bug (Kasimier),
+ missing destry in xmlFreeRMutex (Andrew Nosenko), XML Schemas fixes
+ (Kasimier), warning on entities processing, XHTML script and style
+ serialization (Kasimier), python generator for long types, bug in
+ xmlSchemaClearValidCtxt (Bertrand Fritsch), xmlSchemaXPathEvaluate
+ allocation bug (Marton Illes), error message end of line (Rob Richards),
+ fix attribute serialization in writer (Rob Richards), PHP4 DTD validation
+ crasher, parser safety patch (Ben Darnell), _private context propagation
+ when parsing entities (with Michael Day), fix entities behaviour when
+ using SAX, URI to file path fix (Mikhail Zabaluev), disapearing validity
+ context, arg error in SAX callback (Mike Hommey), fix mixed-content
+ autodetect when using --noblanks, fix xmlIOParseDTD error handling,
+ fix bug in xmlSplitQName on special Names, fix Relax-NG element content
+ validation bug, fix xmlReconciliateNs bug, fix potential attribute
+ XML parsing bug, fix line/column accounting in XML parser, chunking bug
+ in the HTML parser on script, try to detect obviously buggy HTML
+ meta encoding indications, bugs with encoding BOM and xmlSaveDoc,
+ HTML entities in attributes parsing, HTML minimized attribute values,
+ htmlReadDoc and htmlReadIO were broken, error handling bug in
+ xmlXPathEvalExpression (Olaf Walkowiak), fix a problem in
+ htmlCtxtUseOptions, xmlNewInputFromFile could leak (Marius Konitzer),
+ bug on misformed SSD regexps (Christopher Boumenot)
+ </li>
+ <li>documentation: warning about XML_PARSE_COMPACT (Kasimier Buchcik),
+ fix xmlXPathCastToString documentation, improve man pages for
+ xmllitn and xmlcatalog (Daniel Leidert), fixed comments of a few
+ functions</li>
+</ul>
+<h3>2.6.26: Jun 6 2006</h3>
+<ul>
+ <li>portability fixes: Python detection (Joseph Sacco), compilation
+ error(William Brack and Graham Bennett), LynxOS patch (Olli Savia)</li>
+ <li>bug fixes: encoding buffer problem, mix of code and data in
+ xmlIO.c(Kjartan Maraas), entities in XSD validation (Kasimier Buchcik),
+ variousXSD validation fixes (Kasimier), memory leak in pattern (Rob
+ Richards andKasimier), attribute with colon in name (Rob Richards), XPath
+ leak inerror reporting (Aleksey Sanin), XInclude text include of
+ selfdocument.</li>
+ <li>improvements: Xpath optimizations (Kasimier), XPath object
+ cache(Kasimier)</li>
+</ul>
+
+<h3>2.6.25: Jun 6 2006:</h3>
+
+<p>Do not use or package 2.6.25</p>
+
+<h3>2.6.24: Apr 28 2006</h3>
+<ul>
+ <li>Portability fixes: configure on Windows, testapi compile on windows
+ (Kasimier Buchcik, venkat naidu), Borland C++ 6 compile (Eric Zurcher),
+ HP-UX compiler workaround (Rick Jones), xml2-config bugfix, gcc-4.1
+ cleanups, Python detection scheme (Joseph Sacco), UTF-8 file paths on
+ Windows (Roland Schwingel).
+ </li>
+ <li>Improvements: xmlDOMWrapReconcileNamespaces xmlDOMWrapCloneNode (Kasimier
+ Buchcik), XML catalog debugging (Rick Jones), update to Unicode 4.01.</li>
+ <li>Bug fixes: xmlParseChunk() problem in 2.6.23, xmlParseInNodeContext()
+ on HTML docs, URI behaviour on Windows (Rob Richards), comment streaming
+ bug, xmlParseComment (with William Brack), regexp bug fixes (DV &amp;
+ Youri Golovanov), xmlGetNodePath on text/CDATA (Kasimier),
+ one Relax-NG interleave bug, xmllint --path and --valid,
+ XSD bugfixes (Kasimier), remove debug
+ left in Python bindings (Nic Ferrier), xmlCatalogAdd bug (Martin Cole),
+ xmlSetProp fixes (Rob Richards), HTML IDness (Rob Richards), a large
+ number of cleanups and small fixes based on Coverity reports, bug
+ in character ranges, Unicode tables const (Aivars Kalvans), schemas
+ fix (Stefan Kost), xmlRelaxNGParse error deallocation,
+ xmlSchemaAddSchemaDoc error deallocation, error handling on unallowed
+ code point, ixmllint --nonet to never reach the net (Gary Coady),
+ line break in writer after end PI (Jason Viers). </li>
+ <li>Documentation: man pages updates and cleanups (Daniel Leidert).</li>
+ <li>New features: Relax NG structure error handlers.</li>
+</ul>
+
+<h3>2.6.23: Jan 5 2006</h3>
+<ul>
+ <li>portability fixes: Windows (Rob Richards), getaddrinfo on Windows
+ (Kolja Nowak, Rob Richards), icc warnings (Kjartan Maraas),
+ --with-minimum compilation fixes (William Brack), error case handling fix
+ on Solaris (Albert Chin), don't use 'list' as parameter name reported by
+ Samuel Diaz Garcia, more old Unices portability fixes (Albert Chin),
+ MinGW compilation (Mark Junker), HP-UX compiler warnings (Rick
+ Jones),</li>
+ <li>code cleanup: xmlReportError (Adrian Mouat), remove xmlBufferClose
+ (Geert Jansen), unreachable code (Oleksandr Kononenko), refactoring
+ parsing code (Bjorn Reese)</li>
+ <li>bug fixes: xmlBuildRelativeURI and empty path (William Brack),
+ combinatory explosion and performances in regexp code, leak in
+ xmlTextReaderReadString(), xmlStringLenDecodeEntities problem (Massimo
+ Morara), Identity Constraints bugs and a segfault (Kasimier Buchcik),
+ XPath pattern based evaluation bugs (DV &amp; Kasimier),
+ xmlSchemaContentModelDump() memory leak (Kasimier), potential leak in
+ xmlSchemaCheckCSelectorXPath(), xmlTextWriterVSprintf() misuse of
+ vsnprintf (William Brack), XHTML serialization fix (Rob Richards), CRLF
+ split problem (William), issues with non-namespaced attributes in
+ xmlAddChild() xmlAddNextSibling() and xmlAddPrevSibling() (Rob Richards),
+ HTML parsing of script, Python must not output to stdout (Nic Ferrier),
+ exclusive C14N namespace visibility (Aleksey Sanin), XSD dataype
+ totalDigits bug (Kasimier Buchcik), error handling when writing to an
+ xmlBuffer (Rob Richards), runtest schemas error not reported (Hisashi
+ Fujinaka), signed/unsigned problem in date/time code (Albert Chin), fix
+ XSI driven XSD validation (Kasimier), parsing of xs:decimal (Kasimier),
+ fix DTD writer output (Rob Richards), leak in xmlTextReaderReadInnerXml
+ (Gary Coady), regexp bug affecting schemas (Kasimier), configuration of
+ runtime debugging (Kasimier), xmlNodeBufGetContent bug on entity refs
+ (Oleksandr Kononenko), xmlRegExecPushString2 bug (Sreeni Nair),
+ compilation and build fixes (Michael Day), removed dependancies on
+ xmlSchemaValidError (Kasimier), bug with &lt;xml:foo/&gt;, more XPath
+ pattern based evaluation fixes (Kasimier)</li>
+ <li>improvements: XSD Schemas redefinitions/restrictions (Kasimier
+ Buchcik), node copy checks and fix for attribute (Rob Richards), counted
+ transition bug in regexps, ctxt-&gt;standalone = -2 to indicate no
+ standalone attribute was found, add xmlSchemaSetParserStructuredErrors()
+ (Kasimier Buchcik), add xmlTextReaderSchemaValidateCtxt() to API
+ (Kasimier), handle gzipped HTTP resources (Gary Coady), add
+ htmlDocDumpMemoryFormat. (Rob Richards),</li>
+ <li>documentation: typo (Michael Day), libxml man page (Albert Chin), save
+ function to XML buffer (Geert Jansen), small doc fix (Aron Stansvik),</li>
+</ul>
+
+<h3>2.6.22: Sep 12 2005</h3>
+<ul>
+ <li>build fixes: compile without schematron (Stéphane Bidoul)</li>
+ <li>bug fixes: xmlDebugDumpNode on namespace node (Oleg Paraschenko)i,
+ CDATA push parser bug, xmlElemDump problem with XHTML1 doc,
+ XML_FEATURE_xxx clash with expat headers renamed XML_WITH_xxx, fix some
+ output formatting for meta element (Rob Richards), script and style
+ XHTML1 serialization (David Madore), Attribute derivation fixups in XSD
+ (Kasimier Buchcik), better IDC error reports (Kasimier Buchcik)</li>
+ <li>improvements: add XML_SAVE_NO_EMPTY xmlSaveOption (Rob Richards), add
+ XML_SAVE_NO_XHTML xmlSaveOption, XML Schemas improvements preparing for
+ derive (Kasimier Buchcik).</li>
+ <li>documentation: generation of gtk-doc like docs, integration with
+ devhelp.</li>
+</ul>
+
+<h3>2.6.21: Sep 4 2005</h3>
+<ul>
+ <li>build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
+ convention problems on Windows (Marcus Boerger), cleanups based on Linus'
+ sparse tool, update of win32/configure.js (Rob Richards), remove warnings
+ on Windows(Marcus Boerger), compilation without SAX1, detection of the
+ Python binary, use $GCC inestad of $CC = 'gcc' (Andrew W. Nosenko),
+ compilation/link with threads and old gcc, compile problem by C370 on
+ Z/OS,</li>
+ <li>bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
+ bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
+ htmlParseScript potential bug, Schemas regexp handling of spaces, Base64
+ Schemas comparisons NIST passes, automata build error xsd:all,
+ xmlGetNodePath for namespaced attributes (Alexander Pohoyda), xmlSchemas
+ foreign namespaces handling, XML Schemas facet comparison (Kupriyanov
+ Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier Buchcik), xml:
+ namespace ahndling in Schemas (Kasimier), empty model group in Schemas
+ (Kasimier), wilcard in Schemas (Kasimier), URI composition (William),
+ xs:anyType in Schemas (Kasimier), Python resolver emmitting error
+ messages directly, Python xmlAttr.parent (Jakub Piotr Clapa), trying to
+ fix the file path/URI conversion, xmlTextReaderGetAttribute fix (Rob
+ Richards), xmlSchemaFreeAnnot memleak (Kasimier), HTML UTF-8
+ serialization, streaming XPath, Schemas determinism detection problem,
+ XInclude bug, Schemas context type (Dean Hill), validation fix (Derek
+ Poon), xmlTextReaderGetAttribute[Ns] namespaces (Rob Richards), Schemas
+ type fix (Kuba Nowakowski), UTF-8 parser bug, error in encoding handling,
+ xmlGetLineNo fixes, bug on entities handling, entity name extraction in
+ error handling with XInclude, text nodes in HTML body tags (Gary Coady),
+ xml:id and IDness at the treee level fixes, XPath streaming patterns
+ bugs.</li>
+ <li>improvements: structured interfaces for schemas and RNG error reports
+ (Marcus Boerger), optimization of the char data inner loop parsing
+ (thanks to Behdad Esfahbod for the idea), schematron validation though
+ not finished yet, xmlSaveOption to omit XML declaration, keyref match
+ error reports (Kasimier), formal expression handling code not plugged
+ yet, more lax mode for the HTML parser, parser XML_PARSE_COMPACT option
+ for text nodes allocation.</li>
+ <li>documentation: xmllint man page had --nonet duplicated</li>
+</ul>
+
+<h3>2.6.20: Jul 10 2005</h3>
+<ul>
+ <li>build fixes: Windows build (Rob Richards), Mingw compilation (Igor
+ Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
+ andriy@google.com), use gcc weak references to pthread to avoid the
+ pthread dependancy on Linux, compilation problem (Steve Nairn), compiling
+ of subset (Morten Welinder), IPv6/ss_family compilation (William Brack),
+ compilation when disabling parts of the library, standalone test
+ distribution.</li>
+ <li>bug fixes: bug in lang(), memory cleanup on errors (William Brack),
+ HTTP query strings (Aron Stansvik), memory leak in DTD (William), integer
+ overflow in XPath (William), nanoftp buffer size, pattern "." apth fixup
+ (Kasimier), leak in tree reported by Malcolm Rowe, replaceNode patch
+ (Brent Hendricks), CDATA with NULL content (Mark Vakoc), xml:base fixup
+ on XInclude (William), pattern fixes (William), attribute bug in
+ exclusive c14n (Aleksey Sanin), xml:space and xml:lang with SAX2 (Rob
+ Richards), namespace trouble in complex parsing (Malcolm Rowe), XSD type
+ QNames fixes (Kasimier), XPath streaming fixups (William), RelaxNG bug
+ (Rob Richards), Schemas for Schemas fixes (Kasimier), removal of ID (Rob
+ Richards), a small RelaxNG leak, HTML parsing in push mode bug (James
+ Bursa), failure to detect UTF-8 parsing bugs in CDATA sections,
+ areBlanks() heuristic failure, duplicate attributes in DTD bug
+ (William).</li>
+ <li>improvements: lot of work on Schemas by Kasimier Buchcik both on
+ conformance and streaming, Schemas validation messages (Kasimier Buchcik,
+ Matthew Burgess), namespace removal at the python level (Brent
+ Hendricks), Update to new Schemas regression tests from W3C/Nist
+ (Kasimier), xmlSchemaValidateFile() (Kasimier), implementation of
+ xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml (James Wert),
+ standalone test framework and programs, new DOM import APIs
+ xmlDOMWrapReconcileNamespaces() xmlDOMWrapAdoptNode() and
+ xmlDOMWrapRemoveNode(), extension of xmllint capabilities for SAX and
+ Schemas regression tests, xmlStopParser() available in pull mode too,
+ ienhancement to xmllint --shell namespaces support, Windows port of the
+ standalone testing tools (Kasimier and William),
+ xmlSchemaValidateStream() xmlSchemaSAXPlug() and xmlSchemaSAXUnplug() SAX
+ Schemas APIs, Schemas xmlReader support.</li>
+</ul>
+
+<h3>2.6.19: Apr 02 2005</h3>
+<ul>
+ <li>build fixes: drop .la from RPMs, --with-minimum build fix (William
+ Brack), use XML_SOCKLEN_T instead of SOCKLEN_T because it breaks with AIX
+ 5.3 compiler, fixed elfgcchack.h generation and PLT reduction code on
+ Linux/ELF/gcc4</li>
+ <li>bug fixes: schemas type decimal fixups (William Brack), xmmlint return
+ code (Gerry Murphy), small schemas fixes (Matthew Burgess and GUY
+ Fabrice), workaround "DAV:" namespace brokeness in c14n (Aleksey Sanin),
+ segfault in Schemas (Kasimier Buchcik), Schemas attribute validation
+ (Kasimier), Prop related functions and xmlNewNodeEatName (Rob Richards),
+ HTML serialization of name attribute on a elements, Python error handlers
+ leaks and improvement (Brent Hendricks), uninitialized variable in
+ encoding code, Relax-NG validation bug, potential crash if
+ gnorableWhitespace is NULL, xmlSAXParseDoc and xmlParseDoc signatures,
+ switched back to assuming UTF-8 in case no encoding is given at
+ serialization time</li>
+ <li>improvements: lot of work on Schemas by Kasimier Buchcik on facets
+ checking and also mixed handling.</li>
+ <li></li>
+</ul>
+
+<h3>2.6.18: Mar 13 2005</h3>
+<ul>
+ <li>build fixes: warnings (Peter Breitenlohner), testapi.c generation,
+ Bakefile support (Francesco Montorsi), Windows compilation (Joel Reed),
+ some gcc4 fixes, HP-UX portability fixes (Rick Jones).</li>
+ <li>bug fixes: xmlSchemaElementDump namespace (Kasimier Buchcik), push and
+ xmlreader stopping on non-fatal errors, thread support for dictionnaries
+ reference counting (Gary Coady), internal subset and push problem, URL
+ saved in xmlCopyDoc, various schemas bug fixes (Kasimier), Python paths
+ fixup (Stephane Bidoul), xmlGetNodePath and namespaces, xmlSetNsProp fix
+ (Mike Hommey), warning should not count as error (William Brack),
+ xmlCreatePushParser empty chunk, XInclude parser flags (William), cleanup
+ FTP and HTTP code to reuse the uri parsing and IPv6 (William),
+ xmlTextWriterStartAttributeNS fix (Rob Richards), XMLLINT_INDENT being
+ empty (William), xmlWriter bugs (Rob Richards), multithreading on Windows
+ (Rich Salz), xmlSearchNsByHref fix (Kasimier), Python binding leak (Brent
+ Hendricks), aliasing bug exposed by gcc4 on s390, xmlTextReaderNext bug
+ (Rob Richards), Schemas decimal type fixes (William Brack),
+ xmlByteConsumed static buffer (Ben Maurer).</li>
+ <li>improvement: speedup parsing comments and DTDs, dictionnary support for
+ hash tables, Schemas Identity constraints (Kasimier), streaming XPath
+ subset, xmlTextReaderReadString added (Bjorn Reese), Schemas canonical
+ values handling (Kasimier), add xmlTextReaderByteConsumed (Aron
+ Stansvik),</li>
+ <li>Documentation: Wiki support (Joel Reed)</li>
+</ul>
+
+<h3>2.6.17: Jan 16 2005</h3>
+<ul>
+ <li>build fixes: Windows, warnings removal (William Brack),
+ maintainer-clean dependency(William), build in a different directory
+ (William), fixing --with-minimum configure build (William), BeOS build
+ (Marcin Konicki), Python-2.4 detection (William), compilation on AIX (Dan
+ McNichol)</li>
+ <li>bug fixes: xmlTextReaderHasAttributes (Rob Richards), xmlCtxtReadFile()
+ to use the catalog(s), loop on output (William Brack), XPath memory leak,
+ ID deallocation problem (Steve Shepard), debugDumpNode crash (William),
+ warning not using error callback (William), xmlStopParser bug (William),
+ UTF-16 with BOM on DTDs (William), namespace bug on empty elements in
+ push mode (Rob Richards), line and col computations fixups (Aleksey
+ Sanin), xmlURIEscape fix (William), xmlXPathErr on bad range (William),
+ patterns with too many steps, bug in RNG choice optimization, line number
+ sometimes missing.</li>
+ <li>improvements: XSD Schemas (Kasimier Buchcik), python generator
+ (William), xmlUTF8Strpos speedup (William), unicode Python strings
+ (William), XSD error reports (Kasimier Buchcik), Python __str__ call
+ serialize().</li>
+ <li>new APIs: added xmlDictExists(), GetLineNumber and GetColumnNumber for
+ the xmlReader (Aleksey Sanin), Dynamic Shared Libraries APIs (mostly Joel
+ Reed), error extraction API from regexps, new XMLSave option for format
+ (Phil Shafer)</li>
+ <li>documentation: site improvement (John Fleck), FAQ entries
+ (William).</li>
+</ul>
+
+<h3>2.6.16: Nov 10 2004</h3>
+<ul>
+ <li>general hardening and bug fixing crossing all the API based on new
+ automated regression testing</li>
+ <li>build fix: IPv6 build and test on AIX (Dodji Seketeli)</li>
+ <li>bug fixes: problem with XML::Libxml reported by Petr Pajas, encoding
+ conversion functions return values, UTF-8 bug affecting XPath reported by
+ Markus Bertheau, catalog problem with NULL entries (William Brack)</li>
+ <li>documentation: fix to xmllint man page, some API function descritpion
+ were updated.</li>
+ <li>improvements: DTD validation APIs provided at the Python level (Brent
+ Hendricks)</li>
+</ul>
+
+<h3>2.6.15: Oct 27 2004</h3>
+<ul>
+ <li>security fixes on the nanoftp and nanohttp modules</li>
+ <li>build fixes: xmllint detection bug in configure, building outside the
+ source tree (Thomas Fitzsimmons)</li>
+ <li>bug fixes: HTML parser on broken ASCII chars in names (William), Python
+ paths (Malcolm Tredinnick), xmlHasNsProp and default namespace (William),
+ saving to python file objects (Malcolm Tredinnick), DTD lookup fix
+ (Malcolm), save back &lt;group&gt; in catalogs (William), tree build
+ fixes (DV and Rob Richards), Schemas memory bug, structured error handler
+ on Python 64bits, thread local memory deallocation, memory leak reported
+ by Volker Roth, xmlValidateDtd in the presence of an internal subset,
+ entities and _private problem (William), xmlBuildRelativeURI error
+ (William).</li>
+ <li>improvements: better XInclude error reports (William), tree debugging
+ module and tests, convenience functions at the Reader API (Graham
+ Bennett), add support for PI in the HTML parser.</li>
+</ul>
+
+<h3>2.6.14: Sep 29 2004</h3>
+<ul>
+ <li>build fixes: configure paths for xmllint and xsltproc, compilation
+ without HTML parser, compilation warning cleanups (William Brack &amp;
+ Malcolm Tredinnick), VMS makefile update (Craig Berry),</li>
+ <li>bug fixes: xmlGetUTF8Char (William Brack), QName properties (Kasimier
+ Buchcik), XInclude testing, Notation serialization, UTF8ToISO8859x
+ transcoding (Mark Itzcovitz), lots of XML Schemas cleanup and fixes
+ (Kasimier), ChangeLog cleanup (Stepan Kasal), memory fixes (Mark Vakoc),
+ handling of failed realloc(), out of bound array adressing in Schemas
+ date handling, Python space/tabs cleanups (Malcolm Tredinnick), NMTOKENS
+ E20 validation fix (Malcolm),</li>
+ <li>improvements: added W3C XML Schemas testsuite (Kasimier Buchcik), add
+ xmlSchemaValidateOneElement (Kasimier), Python exception hierearchy
+ (Malcolm Tredinnick), Python libxml2 driver improvement (Malcolm
+ Tredinnick), Schemas support for xsi:schemaLocation,
+ xsi:noNamespaceSchemaLocation, xsi:type (Kasimier Buchcik)</li>
+</ul>
+
+<h3>2.6.13: Aug 31 2004</h3>
+<ul>
+ <li>build fixes: Windows and zlib (Igor Zlatkovic), -O flag with gcc,
+ Solaris compiler warning, fixing RPM BuildRequires,</li>
+ <li>fixes: DTD loading on Windows (Igor), Schemas error reports APIs
+ (Kasimier Buchcik), Schemas validation crash, xmlCheckUTF8 (William Brack
+ and Julius Mittenzwei), Schemas facet check (Kasimier), default namespace
+ problem (William), Schemas hexbinary empty values, encoding error could
+ genrate a serialization loop.</li>
+ <li>Improvements: Schemas validity improvements (Kasimier), added --path
+ and --load-trace options to xmllint</li>
+ <li>documentation: tutorial update (John Fleck)</li>
+</ul>
+
+<h3>2.6.12: Aug 22 2004</h3>
+<ul>
+ <li>build fixes: fix --with-minimum, elfgcchack.h fixes (Peter
+ Breitenlohner), perl path lookup (William), diff on Solaris (Albert
+ Chin), some 64bits cleanups.</li>
+ <li>Python: avoid a warning with 2.3 (William Brack), tab and space mixes
+ (William), wrapper generator fixes (William), Cygwin support (Gerrit P.
+ Haase), node wrapper fix (Marc-Antoine Parent), XML Schemas support
+ (Torkel Lyng)</li>
+ <li>Schemas: a lot of bug fixes and improvements from Kasimier Buchcik</li>
+ <li>fixes: RVT fixes (William), XPath context resets bug (William), memory
+ debug (Steve Hay), catalog white space handling (Peter Breitenlohner),
+ xmlReader state after attribute reading (William), structured error
+ handler (William), XInclude generated xml:base fixup (William), Windows
+ memory reallocation problem (Steve Hay), Out of Memory conditions
+ handling (William and Olivier Andrieu), htmlNewDoc() charset bug,
+ htmlReadMemory init (William), a posteriori validation DTD base
+ (William), notations serialization missing, xmlGetNodePath (Dodji),
+ xmlCheckUTF8 (Diego Tartara), missing line numbers on entity
+ (William)</li>
+ <li>improvements: DocBook catalog build scrip (William), xmlcatalog tool
+ (Albert Chin), xmllint --c14n option, no_proxy environment (Mike Hommey),
+ xmlParseInNodeContext() addition, extend xmllint --shell, allow XInclude
+ to not generate start/end nodes, extend xmllint --version to include CVS
+ tag (William)</li>
+ <li>documentation: web pages fixes, validity API docs fixes (William)
+ schemas API fix (Eric Haszlakiewicz), xmllint man page (John Fleck)</li>
+</ul>
+
+<h3>2.6.11: July 5 2004</h3>
+<ul>
+ <li>Schemas: a lot of changes and improvements by Kasimier Buchcik for
+ attributes, namespaces and simple types.</li>
+ <li>build fixes: --with-minimum (William Brack), some gcc cleanup
+ (William), --with-thread-alloc (William)</li>
+ <li>portability: Windows binary package change (Igor Zlatkovic), Catalog
+ path on Windows</li>
+ <li>documentation: update to the tutorial (John Fleck), xmllint return code
+ (John Fleck), man pages (Ville Skytta),</li>
+ <li>bug fixes: C14N bug serializing namespaces (Aleksey Sanin), testSAX
+ properly initialize the library (William), empty node set in XPath
+ (William), xmlSchemas errors (William), invalid charref problem pointed
+ by Morus Walter, XInclude xml:base generation (William), Relax-NG bug
+ with div processing (William), XPointer and xml:base problem(William),
+ Reader and entities, xmllint return code for schemas (William), reader
+ streaming problem (Steve Ball), DTD serialization problem (William),
+ libxml.m4 fixes (Mike Hommey), do not provide destructors as methods on
+ Python classes, xmlReader buffer bug, Python bindings memory interfaces
+ improvement (with Stéphane Bidoul), Fixed the push parser to be back to
+ synchronous behaviour.</li>
+ <li>improvement: custom per-thread I/O enhancement (Rob Richards), register
+ namespace in debug shell (Stefano Debenedetti), Python based regression
+ test for non-Unix users (William), dynamically increase the number of
+ XPath extension functions in Python and fix a memory leak (Marc-Antoine
+ Parent and William)</li>
+ <li>performance: hack done with Arjan van de Ven to reduce ELF footprint
+ and generated code on Linux, plus use gcc runtime profiling to optimize
+ the code generated in the RPM packages.</li>
+</ul>
+
+<h3>2.6.10: May 17 2004</h3>
+<ul>
+ <li>Web page generated for ChangeLog</li>
+ <li>build fixes: --without-html problems, make check without make all</li>
+ <li>portability: problem with xpath.c on Windows (MSC and Borland), memcmp
+ vs. strncmp on Solaris, XPath tests on Windows (Mark Vakoc), C++ do not
+ use "list" as parameter name, make tests work with Python 1.5 (Ed
+ Davis),</li>
+ <li>improvements: made xmlTextReaderMode public, small buffers resizing
+ (Morten Welinder), add --maxmem option to xmllint, add
+ xmlPopInputCallback() for Matt Sergeant, refactoring of serialization
+ escaping, added escaping customization</li>
+ <li>bugfixes: xsd:extension (Taihei Goi), assorted regexp bugs (William
+ Brack), xmlReader end of stream problem, node deregistration with reader,
+ URI escaping and filemanes, XHTML1 formatting (Nick Wellnhofer), regexp
+ transition reduction (William), various XSD Schemas fixes (Kasimier
+ Buchcik), XInclude fallback problem (William), weird problems with DTD
+ (William), structured error handler callback context (William), reverse
+ xmlEncodeSpecialChars() behaviour back to escaping '"'</li>
+</ul>
+
+<h3>2.6.9: Apr 18 2004</h3>
+<ul>
+ <li>implement xml:id Working Draft, relaxed XPath id() checking</li>
+ <li>bugfixes: xmlCtxtReset (Brent Hendricks), line number and CDATA (Dave
+ Beckett), Relax-NG compilation (William Brack), Regexp patches (with
+ William), xmlUriEscape (Mark Vakoc), a Relax-NG notAllowed problem (with
+ William), Relax-NG name classes compares (William), XInclude duplicate
+ fallback (William), external DTD encoding detection (William), a DTD
+ validation bug (William), xmlReader Close() fix, recusive extention
+ schemas</li>
+ <li>improvements: use xmlRead* APIs in test tools (Mark Vakoc), indenting
+ save optimization, better handle IIS broken HTTP redirect behaviour (Ian
+ Hummel), HTML parser frameset (James Bursa), libxml2-python RPM
+ dependancy, XML Schemas union support (Kasimier Buchcik), warning removal
+ clanup (William), keep ChangeLog compressed when installing from RPMs</li>
+ <li>documentation: examples and xmlDocDumpMemory docs (John Fleck), new
+ example (load, xpath, modify, save), xmlCatalogDump() comments,</li>
+ <li>Windows: Borland C++ builder (Eric Zurcher), work around Microsoft
+ compiler NaN handling bug (Mark Vakoc)</li>
+</ul>
+
+<h3>2.6.8: Mar 23 2004</h3>
+<ul>
+ <li>First step of the cleanup of the serialization code and APIs</li>
+ <li>XML Schemas: mixed content (Adam Dickmeiss), QName handling fixes (Adam
+ Dickmeiss), anyURI for "" (John Belmonte)</li>
+ <li>Python: Canonicalization C14N support added (Anthony Carrico)</li>
+ <li>xmlDocCopyNode() extension (William)</li>
+ <li>Relax-NG: fix when processing XInclude results (William), external
+ reference in interleave (William), missing error on &lt;choice&gt;
+ failure (William), memory leak in schemas datatype facets.</li>
+ <li>xmlWriter: patch for better DTD support (Alfred Mickautsch)</li>
+ <li>bug fixes: xmlXPathLangFunction memory leak (Mike Hommey and William
+ Brack), no ID errors if using HTML_PARSE_NOERROR, xmlcatalog fallbacks to
+ URI on SYSTEM lookup failure, XInclude parse flags inheritance (William),
+ XInclude and XPointer fixes for entities (William), XML parser bug
+ reported by Holger Rauch, nanohttp fd leak (William), regexps char
+ groups '-' handling (William), dictionnary reference counting problems,
+ do not close stderr.</li>
+ <li>performance patches from Petr Pajas</li>
+ <li>Documentation fixes: XML_CATALOG_FILES in man pages (Mike Hommey)</li>
+ <li>compilation and portability fixes: --without-valid, catalog cleanups
+ (Peter Breitenlohner), MingW patch (Roland Schwingel), cross-compilation
+ to Windows (Christophe de Vienne), --with-html-dir fixup (Julio Merino
+ Vidal), Windows build (Eric Zurcher)</li>
+</ul>
+
+<h3>2.6.7: Feb 23 2004</h3>
+<ul>
+ <li>documentation: tutorial updates (John Fleck), benchmark results</li>
+ <li>xmlWriter: updates and fixes (Alfred Mickautsch, Lucas Brasilino)</li>
+ <li>XPath optimization (Petr Pajas)</li>
+ <li>DTD ID handling optimization</li>
+ <li>bugfixes: xpath number with &gt; 19 fractional (William Brack), push
+ mode with unescaped '&gt;' characters, fix xmllint --stream --timing, fix
+ xmllint --memory --stream memory usage, xmlAttrSerializeTxtContent
+ handling NULL, trying to fix Relax-NG/Perl interface.</li>
+ <li>python: 2.3 compatibility, whitespace fixes (Malcolm Tredinnick)</li>
+ <li>Added relaxng option to xmllint --shell</li>
+</ul>
+
+<h3>2.6.6: Feb 12 2004</h3>
+<ul>
+ <li>nanohttp and nanoftp: buffer overflow error on URI parsing (Igor and
+ William) reported by Yuuichi Teranishi</li>
+ <li>bugfixes: make test and path issues, xmlWriter attribute serialization
+ (William Brack), xmlWriter indentation (William), schemas validation
+ (Eric Haszlakiewicz), XInclude dictionnaries issues (William and Oleg
+ Paraschenko), XInclude empty fallback (William), HTML warnings (William),
+ XPointer in XInclude (William), Python namespace serialization,
+ isolat1ToUTF8 bound error (Alfred Mickautsch), output of parameter
+ entities in internal subset (William), internal subset bug in push mode,
+ &lt;xs:all&gt; fix (Alexey Sarytchev)</li>
+ <li>Build: fix for automake-1.8 (Alexander Winston), warnings removal
+ (Philip Ludlam), SOCKLEN_T detection fixes (Daniel Richard), fix
+ --with-minimum configuration.</li>
+ <li>XInclude: allow the 2001 namespace without warning.</li>
+ <li>Documentation: missing example/index.html (John Fleck), version
+ dependancies (John Fleck)</li>
+ <li>reader API: structured error reporting (Steve Ball)</li>
+ <li>Windows compilation: mingw, msys (Mikhail Grushinskiy), function
+ prototype (Cameron Johnson), MSVC6 compiler warnings, _WINSOCKAPI_
+ patch</li>
+ <li>Parsers: added xmlByteConsumed(ctxt) API to get the byte offest in
+ input.</li>
+</ul>
+
+<h3>2.6.5: Jan 25 2004</h3>
+<ul>
+ <li>Bugfixes: dictionnaries for schemas (William Brack), regexp segfault
+ (William), xs:all problem (William), a number of XPointer bugfixes
+ (William), xmllint error go to stderr, DTD validation problem with
+ namespace, memory leak (William), SAX1 cleanup and minimal options fixes
+ (Mark Vadoc), parser context reset on error (Shaun McCance), XPath union
+ evaluation problem (William) , xmlReallocLoc with NULL (Aleksey Sanin),
+ XML Schemas double free (Steve Ball), XInclude with no href, argument
+ callbacks order for XPath callbacks (Frederic Peters)</li>
+ <li>Documentation: python scripts (William Brack), xslt stylesheets (John
+ Fleck), doc (Sven Zimmerman), I/O example.</li>
+ <li>Python bindings: fixes (William), enum support (Stéphane Bidoul),
+ structured error reporting (Stéphane Bidoul)</li>
+ <li>XInclude: various fixes for conformance, problem related to dictionnary
+ references (William &amp; me), recursion (William)</li>
+ <li>xmlWriter: indentation (Lucas Brasilino), memory leaks (Alfred
+ Mickautsch),</li>
+ <li>xmlSchemas: normalizedString datatype (John Belmonte)</li>
+ <li>code cleanup for strings functions (William)</li>
+ <li>Windows: compiler patches (Mark Vakoc)</li>
+ <li>Parser optimizations, a few new XPath and dictionnary APIs for future
+ XSLT optimizations.</li>
+</ul>
+
+<h3>2.6.4: Dec 24 2003</h3>
+<ul>
+ <li>Windows build fixes (Igor Zlatkovic)</li>
+ <li>Some serious XInclude problems reported by Oleg Paraschenko and</li>
+ <li>Unix and Makefile packaging fixes (me, William Brack,</li>
+ <li>Documentation improvements (John Fleck, William Brack), example fix
+ (Lucas Brasilino)</li>
+ <li>bugfixes: xmlTextReaderExpand() with xmlReaderWalker, XPath handling of
+ NULL strings (William Brack) , API building reader or parser from
+ filedescriptor should not close it, changed XPath sorting to be stable
+ again (William Brack), xmlGetNodePath() generating '(null)' (William
+ Brack), DTD validation and namespace bug (William Brack), XML Schemas
+ double inclusion behaviour</li>
+</ul>
+
+<h3>2.6.3: Dec 10 2003</h3>
+<ul>
+ <li>documentation updates and cleanup (DV, William Brack, John Fleck)</li>
+ <li>added a repository of examples, examples from Aleksey Sanin, Dodji
+ Seketeli, Alfred Mickautsch</li>
+ <li>Windows updates: Mark Vakoc, Igor Zlatkovic, Eric Zurcher, Mingw
+ (Kenneth Haley)</li>
+ <li>Unicode range checking (William Brack)</li>
+ <li>code cleanup (William Brack)</li>
+ <li>Python bindings: doc (John Fleck), bug fixes</li>
+ <li>UTF-16 cleanup and BOM issues (William Brack)</li>
+ <li>bug fixes: ID and xmlReader validation, XPath (William Brack),
+ xmlWriter (Alfred Mickautsch), hash.h inclusion problem, HTML parser
+ (James Bursa), attribute defaulting and validation, some serialization
+ cleanups, XML_GET_LINE macro, memory debug when using threads (William
+ Brack), serialization of attributes and entities content, xmlWriter
+ (Daniel Schulman)</li>
+ <li>XInclude bugfix, new APIs and update to the last version including the
+ namespace change.</li>
+ <li>XML Schemas improvements: include (Robert Stepanek), import and
+ namespace handling, fixed the regression tests troubles, added examples
+ based on Eric van der Vlist book, regexp fixes</li>
+ <li>preliminary pattern support for streaming (needed for schemas
+ constraints), added xmlTextReaderPreservePattern() to collect subdocument
+ when streaming.</li>
+ <li>various fixes in the structured error handling</li>
+</ul>
+
+<h3>2.6.2: Nov 4 2003</h3>
+<ul>
+ <li>XPath context unregistration fixes</li>
+ <li>text node coalescing fixes (Mark Lilback)</li>
+ <li>API to screate a W3C Schemas from an existing document (Steve Ball)</li>
+ <li>BeOS patches (Marcin 'Shard' Konicki)</li>
+ <li>xmlStrVPrintf function added (Aleksey Sanin)</li>
+ <li>compilation fixes (Mark Vakoc)</li>
+ <li>stdin parsing fix (William Brack)</li>
+ <li>a posteriori DTD validation fixes</li>
+ <li>xmlReader bug fixes: Walker fixes, python bindings</li>
+ <li>fixed xmlStopParser() to really stop the parser and errors</li>
+ <li>always generate line numbers when using the new xmlReadxxx
+ functions</li>
+ <li>added XInclude support to the xmlReader interface</li>
+ <li>implemented XML_PARSE_NONET parser option</li>
+ <li>DocBook XSLT processing bug fixed</li>
+ <li>HTML serialization for &lt;p&gt; elements (William Brack and me)</li>
+ <li>XPointer failure in XInclude are now handled as resource errors</li>
+ <li>fixed xmllint --html to use the HTML serializer on output (added
+ --xmlout to implement the previous behaviour of saving it using the XML
+ serializer)</li>
+</ul>
+
+<h3>2.6.1: Oct 28 2003</h3>
+<ul>
+ <li>Mostly bugfixes after the big 2.6.0 changes</li>
+ <li>Unix compilation patches: libxml.m4 (Patrick Welche), warnings cleanup
+ (William Brack)</li>
+ <li>Windows compilation patches (Joachim Bauch, Stephane Bidoul, Igor
+ Zlatkovic)</li>
+ <li>xmlWriter bugfix (Alfred Mickautsch)</li>
+ <li>chvalid.[ch]: couple of fixes from Stephane Bidoul</li>
+ <li>context reset: error state reset, push parser reset (Graham
+ Bennett)</li>
+ <li>context reuse: generate errors if file is not readable</li>
+ <li>defaulted attributes for element coming from internal entities
+ (Stephane Bidoul)</li>
+ <li>Python: tab and spaces mix (William Brack)</li>
+ <li>Error handler could crash in DTD validation in 2.6.0</li>
+ <li>xmlReader: do not use the document or element _private field</li>
+ <li>testSAX.c: avoid a problem with some PIs (Massimo Morara)</li>
+ <li>general bug fixes: mandatory encoding in text decl, serializing
+ Document Fragment nodes, xmlSearchNs 2.6.0 problem (Kasimier Buchcik),
+ XPath errors not reported, slow HTML parsing of large documents.</li>
+</ul>
+
+<h3>2.6.0: Oct 20 2003</h3>
+<ul>
+ <li>Major revision release: should be API and ABI compatible but got a lot
+ of change</li>
+ <li>Increased the library modularity, far more options can be stripped out,
+ a --with-minimum configuration will weight around 160KBytes</li>
+ <li>Use per parser and per document dictionnary, allocate names and small
+ text nodes from the dictionnary</li>
+ <li>Switch to a SAX2 like parser rewrote most of the XML parser core,
+ provides namespace resolution and defaulted attributes, minimize memory
+ allocations and copies, namespace checking and specific error handling,
+ immutable buffers, make predefined entities static structures, etc...</li>
+ <li>rewrote all the error handling in the library, all errors can be
+ intercepted at a structured level, with precise information
+ available.</li>
+ <li>New simpler and more generic XML and HTML parser APIs, allowing to
+ easilly modify the parsing options and reuse parser context for multiple
+ consecutive documents.</li>
+ <li>Similar new APIs for the xmlReader, for options and reuse, provided new
+ functions to access content as const strings, use them for Python
+ bindings</li>
+ <li>a lot of other smaller API improvements: xmlStrPrintf (Aleksey Sanin),
+ Walker i.e. reader on a document tree based on Alfred Mickautsch code,
+ make room in nodes for line numbers, reference counting and future PSVI
+ extensions, generation of character ranges to be checked with faster
+ algorithm (William), xmlParserMaxDepth (Crutcher Dunnavant), buffer
+ access</li>
+ <li>New xmlWriter API provided by Alfred Mickautsch</li>
+ <li>Schemas: base64 support by Anthony Carrico</li>
+ <li>Parser&lt;-&gt;HTTP integration fix, proper processing of the Mime-Type
+ and charset information if available.</li>
+ <li>Relax-NG: bug fixes including the one reported by Martijn Faassen and
+ zeroOrMore, better error reporting.</li>
+ <li>Python bindings (Stéphane Bidoul), never use stdout for errors
+ output</li>
+ <li>Portability: all the headers have macros for export and calling
+ convention definitions (Igor Zlatkovic), VMS update (Craig A. Berry),
+ Windows: threads (Jesse Pelton), Borland compiler (Eric Zurcher, Igor),
+ Mingw (Igor), typos (Mark Vakoc), beta version (Stephane Bidoul),
+ warning cleanups on AIX and MIPS compilers (William Brack), BeOS (Marcin
+ 'Shard' Konicki)</li>
+ <li>Documentation fixes and README (William Brack), search fix (William),
+ tutorial updates (John Fleck), namespace docs (Stefan Kost)</li>
+ <li>Bug fixes: xmlCleanupParser (Dave Beckett), threading uninitialized
+ mutexes, HTML doctype lowercase, SAX/IO (William), compression detection
+ and restore (William), attribute declaration in DTDs (William), namespace
+ on attribute in HTML output (William), input filename (Rob Richards),
+ namespace DTD validation, xmlReplaceNode (Chris Ryland), I/O callbacks
+ (Markus Keim), CDATA serialization (Shaun McCance), xmlReader (Peter
+ Derr), high codepoint charref like &amp;#x10FFFF;, buffer access in push
+ mode (Justin Fletcher), TLS threads on Windows (Jesse Pelton), XPath bug
+ (William), xmlCleanupParser (Marc Liyanage), CDATA output (William), HTTP
+ error handling.</li>
+ <li>xmllint options: --dtdvalidfpi for Tobias Reif, --sax1 for compat
+ testing, --nodict for building without tree dictionnary, --nocdata to
+ replace CDATA by text, --nsclean to remove surperfluous namespace
+ declarations</li>
+ <li>added xml2-config --libtool-libs option from Kevin P. Fleming</li>
+ <li>a lot of profiling and tuning of the code, speedup patch for
+ xmlSearchNs() by Luca Padovani. The xmlReader should do far less
+ allocation and it speed should get closer to SAX. Chris Anderson worked
+ on speeding and cleaning up repetitive checking code.</li>
+ <li>cleanup of "make tests"</li>
+ <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li>
+ <li>deactivated the broken docBook SGML parser code and plugged the XML
+ parser instead.</li>
+</ul>
+
+<h3>2.5.11: Sep 9 2003</h3>
+
+<p>A bugfix only release:</p>
+<ul>
+ <li>risk of crash in Relax-NG</li>
+ <li>risk of crash when using multithreaded programs</li>
+</ul>
+
+<h3>2.5.10: Aug 15 2003</h3>
+
+<p>A bugfixes only release</p>
+<ul>
+ <li>Windows Makefiles (William Brack)</li>
+ <li>UTF-16 support fixes (Mark Itzcovitz)</li>
+ <li>Makefile and portability (William Brack) automake, Linux alpha, Mingw
+ on Windows (Mikhail Grushinskiy)</li>
+ <li>HTML parser (Oliver Stoeneberg)</li>
+ <li>XInclude performance problem reported by Kevin Ruscoe</li>
+ <li>XML parser performance problem reported by Grant Goodale</li>
+ <li>xmlSAXParseDTD() bug fix from Malcolm Tredinnick</li>
+ <li>and a couple other cleanup</li>
+</ul>
+
+<h3>2.5.9: Aug 9 2003</h3>
+<ul>
+ <li>bugfixes: IPv6 portability, xmlHasNsProp (Markus Keim), Windows build
+ (Wiliam Brake, Jesse Pelton, Igor), Schemas (Peter Sobisch), threading
+ (Rob Richards), hexBinary type (), UTF-16 BOM (Dodji Seketeli),
+ xmlReader, Relax-NG schemas compilation, namespace handling, EXSLT (Sean
+ Griffin), HTML parsing problem (William Brack), DTD validation for mixed
+ content + namespaces, HTML serialization, library initialization,
+ progressive HTML parser</li>
+ <li>better interfaces for Relax-NG error handling (Joachim Bauch, )</li>
+ <li>adding xmlXIncludeProcessTree() for XInclud'ing in a subtree</li>
+ <li>doc fixes and improvements (John Fleck)</li>
+ <li>configure flag for -with-fexceptions when embedding in C++</li>
+ <li>couple of new UTF-8 helper functions (William Brack)</li>
+ <li>general encoding cleanup + ISO-8859-x without iconv (Peter Jacobi)</li>
+ <li>xmlTextReader cleanup + enum for node types (Bjorn Reese)</li>
+ <li>general compilation/warning cleanup Solaris/HP-UX/... (William
+ Brack)</li>
+</ul>
+
+<h3>2.5.8: Jul 6 2003</h3>
+<ul>
+ <li>bugfixes: XPath, XInclude, file/URI mapping, UTF-16 save (Mark
+ Itzcovitz), UTF-8 checking, URI saving, error printing (William Brack),
+ PI related memleak, compilation without schemas or without xpath (Joerg
+ Schmitz-Linneweber/Garry Pennington), xmlUnlinkNode problem with DTDs,
+ rpm problem on , i86_64, removed a few compilation problems from 2.5.7,
+ xmlIOParseDTD, and xmlSAXParseDTD (Malcolm Tredinnick)</li>
+ <li>portability: DJGPP (MsDos) , OpenVMS (Craig A. Berry)</li>
+ <li>William Brack fixed multithreading lock problems</li>
+ <li>IPv6 patch for FTP and HTTP accesses (Archana Shah/Wipro)</li>
+ <li>Windows fixes (Igor Zlatkovic, Eric Zurcher), threading (Stéphane
+ Bidoul)</li>
+ <li>A few W3C Schemas Structure improvements</li>
+ <li>W3C Schemas Datatype improvements (Charlie Bozeman)</li>
+ <li>Python bindings for thread globals (Stéphane Bidoul), and method/class
+ generator</li>
+ <li>added --nonet option to xmllint</li>
+ <li>documentation improvements (John Fleck)</li>
+</ul>
+
+<h3>2.5.7: Apr 25 2003</h3>
+<ul>
+ <li>Relax-NG: Compiling to regexp and streaming validation on top of the
+ xmlReader interface, added to xmllint --stream</li>
+ <li>xmlReader: Expand(), Next() and DOM access glue, bug fixes</li>
+ <li>Support for large files: RGN validated a 4.5GB instance</li>
+ <li>Thread support is now configured in by default</li>
+ <li>Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes
+ (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser
+ and zero bytes handling, some missing Windows file path conversions,
+ behaviour of the parser and validator in the presence of "out of memory"
+ error conditions</li>
+ <li>extended the API to be able to plug a garbage collecting memory
+ allocator, added xmlMallocAtomic() and modified the allocations
+ accordingly.</li>
+ <li>Performances: removed excessive malloc() calls, speedup of the push and
+ xmlReader interfaces, removed excessive thread locking</li>
+ <li>Documentation: man page (John Fleck), xmlReader documentation</li>
+ <li>Python: adding binding for xmlCatalogAddLocal (Brent M Hendricks)</li>
+</ul>
+
+<h3>2.5.6: Apr 1 2003</h3>
+<ul>
+ <li>Fixed W3C XML Schemas datatype, should be compliant now except for
+ binHex and base64 which are not supported yet.</li>
+ <li>bug fixes: non-ASCII IDs, HTML output, XInclude on large docs and
+ XInclude entities handling, encoding detection on external subsets, XML
+ Schemas bugs and memory leaks, HTML parser (James Bursa)</li>
+ <li>portability: python/trio (Albert Chin), Sun compiler warnings</li>
+ <li>documentation: added --relaxng option to xmllint man page (John)</li>
+ <li>improved error reporting: xml:space, start/end tag mismatches, Relax NG
+ errors</li>
+</ul>
+
+<h3>2.5.5: Mar 24 2003</h3>
+<ul>
+ <li>Lot of fixes on the Relax NG implementation. More testing including
+ DocBook and TEI examples.</li>
+ <li>Increased the support for W3C XML Schemas datatype</li>
+ <li>Several bug fixes in the URI handling layer</li>
+ <li>Bug fixes: HTML parser, xmlReader, DTD validation, XPath, encoding
+ conversion, line counting in the parser.</li>
+ <li>Added support for $XMLLINT_INDENT environment variable, FTP delete</li>
+ <li>Fixed the RPM spec file name</li>
+</ul>
+
+<h3>2.5.4: Feb 20 2003</h3>
+<ul>
+ <li>Conformance testing and lot of fixes on Relax NG and XInclude
+ implementation</li>
+ <li>Implementation of XPointer element() scheme</li>
+ <li>Bug fixes: XML parser, XInclude entities merge, validity checking on
+ namespaces,
+ <p>2 serialization bugs, node info generation problems, a DTD regexp
+ generation problem.</p>
+ </li>
+ <li>Portability: windows updates and path canonicalization (Igor)</li>
+ <li>A few typo fixes (Kjartan Maraas)</li>
+ <li>Python bindings generator fixes (Stephane Bidoul)</li>
+</ul>
+
+<h3>2.5.3: Feb 10 2003</h3>
+<ul>
+ <li>RelaxNG and XML Schemas datatypes improvements, and added a first
+ version of RelaxNG Python bindings</li>
+ <li>Fixes: XLink (Sean Chittenden), XInclude (Sean Chittenden), API fix for
+ serializing namespace nodes, encoding conversion bug, XHTML1
+ serialization</li>
+ <li>Portability fixes: Windows (Igor), AMD 64bits RPM spec file</li>
+</ul>
+
+<h3>2.5.2: Feb 5 2003</h3>
+<ul>
+ <li>First implementation of RelaxNG, added --relaxng flag to xmllint</li>
+ <li>Schemas support now compiled in by default.</li>
+ <li>Bug fixes: DTD validation, namespace checking, XInclude and entities,
+ delegateURI in XML Catalogs, HTML parser, XML reader (Stéphane Bidoul),
+ XPath parser and evaluation, UTF8ToUTF8 serialization, XML reader memory
+ consumption, HTML parser, HTML serialization in the presence of
+ namespaces</li>
+ <li>added an HTML API to check elements and attributes.</li>
+ <li>Documentation improvement, PDF for the tutorial (John Fleck), doc
+ patches (Stefan Kost)</li>
+ <li>Portability fixes: NetBSD (Julio Merino), Windows (Igor Zlatkovic)</li>
+ <li>Added python bindings for XPointer, contextual error reporting
+ (Stéphane Bidoul)</li>
+ <li>URI/file escaping problems (Stefano Zacchiroli)</li>
+</ul>
+
+<h3>2.5.1: Jan 8 2003</h3>
+<ul>
+ <li>Fixes a memory leak and configuration/compilation problems in 2.5.0</li>
+ <li>documentation updates (John)</li>
+ <li>a couple of XmlTextReader fixes</li>
+</ul>
+
+<h3>2.5.0: Jan 6 2003</h3>
+<ul>
+ <li>New <a href="xmlreader.html">XmltextReader interface</a> based on C#
+ API (with help of Stéphane Bidoul)</li>
+ <li>Windows: more exports, including the new API (Igor)</li>
+ <li>XInclude fallback fix</li>
+ <li>Python: bindings for the new API, packaging (Stéphane Bidoul),
+ drv_libxml2.py Python xml.sax driver (Stéphane Bidoul), fixes, speedup
+ and iterators for Python-2.2 (Hannu Krosing)</li>
+ <li>Tutorial fixes (john Fleck and Niraj Tolia) xmllint man update
+ (John)</li>
+ <li>Fix an XML parser bug raised by Vyacheslav Pindyura</li>
+ <li>Fix for VMS serialization (Nigel Hall) and config (Craig A. Berry)</li>
+ <li>Entities handling fixes</li>
+ <li>new API to optionally track node creation and deletion (Lukas
+ Schroeder)</li>
+ <li>Added documentation for the XmltextReader interface and some <a
+ href="guidelines.html">XML guidelines</a></li>
+</ul>
+
+<h3>2.4.30: Dec 12 2002</h3>
+<ul>
+ <li>2.4.29 broke the python bindings, rereleasing</li>
+ <li>Improvement/fixes of the XML API generator, and couple of minor code
+ fixes.</li>
+</ul>
+
+<h3>2.4.29: Dec 11 2002</h3>
+<ul>
+ <li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
+ (Stéphane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
+ <li>Fix for prev in python bindings (ERDI Gergo)</li>
+ <li>Fix for entities handling (Marcus Clarke)</li>
+ <li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
+ dump</li>
+ <li>Fix for URI parsing when handling URNs with fragment identifiers</li>
+ <li>Fix for HTTP URL escaping problem</li>
+ <li>added an TextXmlReader (C#) like API (work in progress)</li>
+ <li>Rewrote the API in XML generation script, includes a C parser and saves
+ more information needed for C# bindings</li>
+</ul>
+
+<h3>2.4.28: Nov 22 2002</h3>
+<ul>
+ <li>a couple of python binding fixes</li>
+ <li>2 bug fixes in the XML push parser</li>
+ <li>potential memory leak removed (Martin Stoilov)</li>
+ <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
+ <li>added encoding support for XInclude parse="text"</li>
+ <li>autodetection of XHTML1 and specific serialization rules added</li>
+ <li>nasty threading bug fixed (William Brack)</li>
+</ul>
+
+<h3>2.4.27: Nov 17 2002</h3>
+<ul>
+ <li>fixes for the Python bindings</li>
+ <li>a number of bug fixes: SGML catalogs, xmlParseBalancedChunkMemory(),
+ HTML parser, Schemas (Charles Bozeman), document fragment support
+ (Christian Glahn), xmlReconciliateNs (Brian Stafford), XPointer,
+ xmlFreeNode(), xmlSAXParseMemory (Peter Jones), xmlGetNodePath (Petr
+ Pajas), entities processing</li>
+ <li>added grep to xmllint --shell</li>
+ <li>VMS update patch from Craig A. Berry</li>
+ <li>cleanup of the Windows build with support for more compilers (Igor),
+ better thread support on Windows</li>
+ <li>cleanup of Unix Makefiles and spec file</li>
+ <li>Improvements to the documentation (John Fleck)</li>
+</ul>
+
+<h3>2.4.26: Oct 18 2002</h3>
+<ul>
+ <li>Patches for Windows CE port, improvements on Windows paths handling</li>
+ <li>Fixes to the validation code (DTD and Schemas), xmlNodeGetPath() ,
+ HTML serialization, Namespace compliance, and a number of small
+ problems</li>
+</ul>
+
+<h3>2.4.25: Sep 26 2002</h3>
+<ul>
+ <li>A number of bug fixes: XPath, validation, Python bindings, DOM and
+ tree, xmlI/O, Html</li>
+ <li>Serious rewrite of XInclude</li>
+ <li>Made XML Schemas regexp part of the default build and APIs, small fix
+ and improvement of the regexp core</li>
+ <li>Changed the validation code to reuse XML Schemas regexp APIs</li>
+ <li>Better handling of Windows file paths, improvement of Makefiles (Igor,
+ Daniel Gehriger, Mark Vakoc)</li>
+ <li>Improved the python I/O bindings, the tests, added resolver and regexp
+ APIs</li>
+ <li>New logos from Marc Liyanage</li>
+ <li>Tutorial improvements: John Fleck, Christopher Harris</li>
+ <li>Makefile: Fixes for AMD x86_64 (Mandrake), DESTDIR (Christophe
+ Merlet)</li>
+ <li>removal of all stderr/perror use for error reporting</li>
+ <li>Better error reporting: XPath and DTD validation</li>
+ <li>update of the trio portability layer (Bjorn Reese)</li>
+</ul>
+
+<p><strong>2.4.24: Aug 22 2002</strong></p>
+<ul>
+ <li>XPath fixes (William), xf:escape-uri() (Wesley Terpstra)</li>
+ <li>Python binding fixes: makefiles (William), generator, rpm build, x86-64
+ (fcrozat)</li>
+ <li>HTML &lt;style&gt; and boolean attributes serializer fixes</li>
+ <li>C14N improvements by Aleksey</li>
+ <li>doc cleanups: Rick Jones</li>
+ <li>Windows compiler makefile updates: Igor and Elizabeth Barham</li>
+ <li>XInclude: implementation of fallback and xml:base fixup added</li>
+</ul>
+
+<h3>2.4.23: July 6 2002</h3>
+<ul>
+ <li>performances patches: Peter Jacobi</li>
+ <li>c14n fixes, testsuite and performances: Aleksey Sanin</li>
+ <li>added xmlDocFormatDump: Chema Celorio</li>
+ <li>new tutorial: John Fleck</li>
+ <li>new hash functions and performances: Sander Vesik, portability fix from
+ Peter Jacobi</li>
+ <li>a number of bug fixes: XPath (William Brack, Richard Jinks), XML and
+ HTML parsers, ID lookup function</li>
+ <li>removal of all remaining sprintf: Aleksey Sanin</li>
+</ul>
+
+<h3>2.4.22: May 27 2002</h3>
+<ul>
+ <li>a number of bug fixes: configure scripts, base handling, parser, memory
+ usage, HTML parser, XPath, documentation (Christian Cornelssen),
+ indentation, URI parsing</li>
+ <li>Optimizations for XMLSec, fixing and making public some of the network
+ protocol handlers (Aleksey)</li>
+ <li>performance patch from Gary Pennington</li>
+ <li>Charles Bozeman provided date and time support for XML Schemas
+ datatypes</li>
+</ul>
+
+<h3>2.4.21: Apr 29 2002</h3>
+
+<p>This release is both a bug fix release and also contains the early XML
+Schemas <a href="http://www.w3.org/TR/xmlschema-1/">structures</a> and <a
+href="http://www.w3.org/TR/xmlschema-2/">datatypes</a> code, beware, all
+interfaces are likely to change, there is huge holes, it is clearly a work in
+progress and don't even think of putting this code in a production system,
+it's actually not compiled in by default. The real fixes are:
+</p>
+
+<ul>
+ <li>a couple of bugs or limitations introduced in 2.4.20</li>
+ <li>patches for Borland C++ and MSC by Igor</li>
+ <li>some fixes on XPath strings and conformance patches by Richard
+ Jinks</li>
+ <li>patch from Aleksey for the ExcC14N specification</li>
+ <li>OSF/1 bug fix by Bjorn</li>
+</ul>
+
+<h3>2.4.20: Apr 15 2002</h3>
+<ul>
+ <li>bug fixes: file descriptor leak, XPath, HTML output, DTD validation</li>
+ <li>XPath conformance testing by Richard Jinks</li>
+ <li>Portability fixes: Solaris, MPE/iX, Windows, OSF/1, python bindings,
+ libxml.m4</li>
+</ul>
+
+<h3>2.4.19: Mar 25 2002</h3>
+<ul>
+ <li>bug fixes: half a dozen XPath bugs, Validation, ISO-Latin to UTF8
+ encoder</li>
+ <li>portability fixes in the HTTP code</li>
+ <li>memory allocation checks using valgrind, and profiling tests</li>
+ <li>revamp of the Windows build and Makefiles</li>
+</ul>
+
+<h3>2.4.18: Mar 18 2002</h3>
+<ul>
+ <li>bug fixes: tree, SAX, canonicalization, validation, portability,
+ XPath</li>
+ <li>removed the --with-buffer option it was becoming unmaintainable</li>
+ <li>serious cleanup of the Python makefiles</li>
+ <li>speedup patch to XPath very effective for DocBook stylesheets</li>
+ <li>Fixes for Windows build, cleanup of the documentation</li>
+</ul>
+
+<h3>2.4.17: Mar 8 2002</h3>
+<ul>
+ <li>a lot of bug fixes, including "namespace nodes have no parents in
+ XPath"</li>
+ <li>fixed/improved the Python wrappers, added more examples and more
+ regression tests, XPath extension functions can now return node-sets</li>
+ <li>added the XML Canonicalization support from Aleksey Sanin</li>
+</ul>
+
+<h3>2.4.16: Feb 20 2002</h3>
+<ul>
+ <li>a lot of bug fixes, most of them were triggered by the XML Testsuite
+ from OASIS and W3C. Compliance has been significantly improved.</li>
+ <li>a couple of portability fixes too.</li>
+</ul>
+
+<h3>2.4.15: Feb 11 2002</h3>
+<ul>
+ <li>Fixed the Makefiles, especially the python module ones</li>
+ <li>A few bug fixes and cleanup</li>
+ <li>Includes cleanup</li>
+</ul>
+
+<h3>2.4.14: Feb 8 2002</h3>
+<ul>
+ <li>Change of License to the <a
+ href="http://www.opensource.org/licenses/mit-license.html">MIT
+ License</a> basically for integration in XFree86 codebase, and removing
+ confusion around the previous dual-licensing</li>
+ <li>added Python bindings, beta software but should already be quite
+ complete</li>
+ <li>a large number of fixes and cleanups, especially for all tree
+ manipulations</li>
+ <li>cleanup of the headers, generation of a reference API definition in
+ XML</li>
+</ul>
+
+<h3>2.4.13: Jan 14 2002</h3>
+<ul>
+ <li>update of the documentation: John Fleck and Charlie Bozeman</li>
+ <li>cleanup of timing code from Justin Fletcher</li>
+ <li>fixes for Windows and initial thread support on Win32: Igor and Serguei
+ Narojnyi</li>
+ <li>Cygwin patch from Robert Collins</li>
+ <li>added xmlSetEntityReferenceFunc() for Keith Isdale work on xsldbg</li>
+</ul>
+
+<h3>2.4.12: Dec 7 2001</h3>
+<ul>
+ <li>a few bug fixes: thread (Gary Pennington), xmllint (Geert Kloosterman),
+ XML parser (Robin Berjon), XPointer (Danny Jamshy), I/O cleanups
+ (robert)</li>
+ <li>Eric Lavigne contributed project files for MacOS</li>
+ <li>some makefiles cleanups</li>
+</ul>
+
+<h3>2.4.11: Nov 26 2001</h3>
+<ul>
+ <li>fixed a couple of errors in the includes, fixed a few bugs, some code
+ cleanups</li>
+ <li>xmllint man pages improvement by Heiko Rupp</li>
+ <li>updated VMS build instructions from John A Fotheringham</li>
+ <li>Windows Makefiles updates from Igor</li>
+</ul>
+
+<h3>2.4.10: Nov 10 2001</h3>
+<ul>
+ <li>URI escaping fix (Joel Young)</li>
+ <li>added xmlGetNodePath() (for paths or XPointers generation)</li>
+ <li>Fixes namespace handling problems when using DTD and validation</li>
+ <li>improvements on xmllint: Morus Walter patches for --format and
+ --encode, Stefan Kost and Heiko Rupp improvements on the --shell</li>
+ <li>fixes for xmlcatalog linking pointed by Weiqi Gao</li>
+ <li>fixes to the HTML parser</li>
+</ul>
+
+<h3>2.4.9: Nov 6 2001</h3>
+<ul>
+ <li>fixes more catalog bugs</li>
+ <li>avoid a compilation problem, improve xmlGetLineNo()</li>
+</ul>
+
+<h3>2.4.8: Nov 4 2001</h3>
+<ul>
+ <li>fixed SGML catalogs broken in previous release, updated xmlcatalog
+ tool</li>
+ <li>fixed a compile errors and some includes troubles.</li>
+</ul>
+
+<h3>2.4.7: Oct 30 2001</h3>
+<ul>
+ <li>exported some debugging interfaces</li>
+ <li>serious rewrite of the catalog code</li>
+ <li>integrated Gary Pennington thread safety patch, added configure option
+ and regression tests</li>
+ <li>removed an HTML parser bug</li>
+ <li>fixed a couple of potentially serious validation bugs</li>
+ <li>integrated the SGML DocBook support in xmllint</li>
+ <li>changed the nanoftp anonymous login passwd</li>
+ <li>some I/O cleanup and a couple of interfaces for Perl wrapper</li>
+ <li>general bug fixes</li>
+ <li>updated xmllint man page by John Fleck</li>
+ <li>some VMS and Windows updates</li>
+</ul>
+
+<h3>2.4.6: Oct 10 2001</h3>
+<ul>
+ <li>added an updated man pages by John Fleck</li>
+ <li>portability and configure fixes</li>
+ <li>an infinite loop on the HTML parser was removed (William)</li>
+ <li>Windows makefile patches from Igor</li>
+ <li>fixed half a dozen bugs reported for libxml or libxslt</li>
+ <li>updated xmlcatalog to be able to modify SGML super catalogs</li>
+</ul>
+
+<h3>2.4.5: Sep 14 2001</h3>
+<ul>
+ <li>Remove a few annoying bugs in 2.4.4</li>
+ <li>forces the HTML serializer to output decimal charrefs since some
+ version of Netscape can't handle hexadecimal ones</li>
+</ul>
+
+<h3>1.8.16: Sep 14 2001</h3>
+<ul>
+ <li>maintenance release of the old libxml1 branch, couple of bug and
+ portability fixes</li>
+</ul>
+
+<h3>2.4.4: Sep 12 2001</h3>
+<ul>
+ <li>added --convert to xmlcatalog, bug fixes and cleanups of XML
+ Catalog</li>
+ <li>a few bug fixes and some portability changes</li>
+ <li>some documentation cleanups</li>
+</ul>
+
+<h3>2.4.3: Aug 23 2001</h3>
+<ul>
+ <li>XML Catalog support see the doc</li>
+ <li>New NaN/Infinity floating point code</li>
+ <li>A few bug fixes</li>
+</ul>
+
+<h3>2.4.2: Aug 15 2001</h3>
+<ul>
+ <li>adds xmlLineNumbersDefault() to control line number generation</li>
+ <li>lot of bug fixes</li>
+ <li>the Microsoft MSC projects files should now be up to date</li>
+ <li>inheritance of namespaces from DTD defaulted attributes</li>
+ <li>fixes a serious potential security bug</li>
+ <li>added a --format option to xmllint</li>
+</ul>
+
+<h3>2.4.1: July 24 2001</h3>
+<ul>
+ <li>possibility to keep line numbers in the tree</li>
+ <li>some computation NaN fixes</li>
+ <li>extension of the XPath API</li>
+ <li>cleanup for alpha and ia64 targets</li>
+ <li>patch to allow saving through HTTP PUT or POST</li>
+</ul>
+
+<h3>2.4.0: July 10 2001</h3>
+<ul>
+ <li>Fixed a few bugs in XPath, validation, and tree handling.</li>
+ <li>Fixed XML Base implementation, added a couple of examples to the
+ regression tests</li>
+ <li>A bit of cleanup</li>
+</ul>
+
+<h3>2.3.14: July 5 2001</h3>
+<ul>
+ <li>fixed some entities problems and reduce memory requirement when
+ substituting them</li>
+ <li>lots of improvements in the XPath queries interpreter can be
+ substantially faster</li>
+ <li>Makefiles and configure cleanups</li>
+ <li>Fixes to XPath variable eval, and compare on empty node set</li>
+ <li>HTML tag closing bug fixed</li>
+ <li>Fixed an URI reference computation problem when validating</li>
+</ul>
+
+<h3>2.3.13: June 28 2001</h3>
+<ul>
+ <li>2.3.12 configure.in was broken as well as the push mode XML parser</li>
+ <li>a few more fixes for compilation on Windows MSC by Yon Derek</li>
+</ul>
+
+<h3>1.8.14: June 28 2001</h3>
+<ul>
+ <li>Zbigniew Chyla gave a patch to use the old XML parser in push mode</li>
+ <li>Small Makefile fix</li>
+</ul>
+
+<h3>2.3.12: June 26 2001</h3>
+<ul>
+ <li>lots of cleanup</li>
+ <li>a couple of validation fix</li>
+ <li>fixed line number counting</li>
+ <li>fixed serious problems in the XInclude processing</li>
+ <li>added support for UTF8 BOM at beginning of entities</li>
+ <li>fixed a strange gcc optimizer bugs in xpath handling of float, gcc-3.0
+ miscompile uri.c (William), Thomas Leitner provided a fix for the
+ optimizer on Tru64</li>
+ <li>incorporated Yon Derek and Igor Zlatkovic fixes and improvements for
+ compilation on Windows MSC</li>
+ <li>update of libxml-doc.el (Felix Natter)</li>
+ <li>fixed 2 bugs in URI normalization code</li>
+</ul>
+
+<h3>2.3.11: June 17 2001</h3>
+<ul>
+ <li>updates to trio, Makefiles and configure should fix some portability
+ problems (alpha)</li>
+ <li>fixed some HTML serialization problems (pre, script, and block/inline
+ handling), added encoding aware APIs, cleanup of this code</li>
+ <li>added xmlHasNsProp()</li>
+ <li>implemented a specific PI for encoding support in the DocBook SGML
+ parser</li>
+ <li>some XPath fixes (-Infinity, / as a function parameter and namespaces
+ node selection)</li>
+ <li>fixed a performance problem and an error in the validation code</li>
+ <li>fixed XInclude routine to implement the recursive behaviour</li>
+ <li>fixed xmlFreeNode problem when libxml is included statically twice</li>
+ <li>added --version to xmllint for bug reports</li>
+</ul>
+
+<h3>2.3.10: June 1 2001</h3>
+<ul>
+ <li>fixed the SGML catalog support</li>
+ <li>a number of reported bugs got fixed, in XPath, iconv detection,
+ XInclude processing</li>
+ <li>XPath string function should now handle unicode correctly</li>
+</ul>
+
+<h3>2.3.9: May 19 2001</h3>
+
+<p>Lots of bugfixes, and added a basic SGML catalog support:
+</p>
+<ul>
+ <li>HTML push bugfix #54891 and another patch from Jonas Borgstrom</li>
+ <li>some serious speed optimization again</li>
+ <li>some documentation cleanups</li>
+ <li>trying to get better linking on Solaris (-R)</li>
+ <li>XPath API cleanup from Thomas Broyer</li>
+ <li>Validation bug fixed #54631, added a patch from Gary Pennington, fixed
+ xmlValidGetValidElements()</li>
+ <li>Added an INSTALL file</li>
+ <li>Attribute removal added to API: #54433</li>
+ <li>added a basic support for SGML catalogs</li>
+ <li>fixed xmlKeepBlanksDefault(0) API</li>
+ <li>bugfix in xmlNodeGetLang()</li>
+ <li>fixed a small configure portability problem</li>
+ <li>fixed an inversion of SYSTEM and PUBLIC identifier in HTML document</li>
+</ul>
+
+<h3>1.8.13: May 14 2001</h3>
+<ul>
+ <li>bugfixes release of the old libxml1 branch used by Gnome</li>
+</ul>
+
+<h3>2.3.8: May 3 2001</h3>
+<ul>
+ <li>Integrated an SGML DocBook parser for the Gnome project</li>
+ <li>Fixed a few things in the HTML parser</li>
+ <li>Fixed some XPath bugs raised by XSLT use, tried to fix the floating
+ point portability issue</li>
+ <li>Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for
+ DOM+validation using the XML REC as input and a 700MHz celeron).</li>
+ <li>incorporated more Windows cleanup</li>
+ <li>added xmlSaveFormatFile()</li>
+ <li>fixed problems in copying nodes with entities references (gdome)</li>
+ <li>removed some troubles surrounding the new validation module</li>
+</ul>
+
+<h3>2.3.7: April 22 2001</h3>
+<ul>
+ <li>lots of small bug fixes, corrected XPointer</li>
+ <li>Non deterministic content model validation support</li>
+ <li>added xmlDocCopyNode for gdome2</li>
+ <li>revamped the way the HTML parser handles end of tags</li>
+ <li>XPath: corrections of namespaces support and number formatting</li>
+ <li>Windows: Igor Zlatkovic patches for MSC compilation</li>
+ <li>HTML output fixes from P C Chow and William M. Brack</li>
+ <li>Improved validation speed sensible for DocBook</li>
+ <li>fixed a big bug with ID declared in external parsed entities</li>
+ <li>portability fixes, update of Trio from Bjorn Reese</li>
+</ul>
+
+<h3>2.3.6: April 8 2001</h3>
+<ul>
+ <li>Code cleanup using extreme gcc compiler warning options, found and
+ cleared half a dozen potential problem</li>
+ <li>the Eazel team found an XML parser bug</li>
+ <li>cleaned up the user of some of the string formatting function. used the
+ trio library code to provide the one needed when the platform is missing
+ them</li>
+ <li>xpath: removed a memory leak and fixed the predicate evaluation
+ problem, extended the testsuite and cleaned up the result. XPointer seems
+ broken ...</li>
+</ul>
+
+<h3>2.3.5: Mar 23 2001</h3>
+<ul>
+ <li>Biggest change is separate parsing and evaluation of XPath expressions,
+ there is some new APIs for this too</li>
+ <li>included a number of bug fixes(XML push parser, 51876, notations,
+ 52299)</li>
+ <li>Fixed some portability issues</li>
+</ul>
+
+<h3>2.3.4: Mar 10 2001</h3>
+<ul>
+ <li>Fixed bugs #51860 and #51861</li>
+ <li>Added a global variable xmlDefaultBufferSize to allow default buffer
+ size to be application tunable.</li>
+ <li>Some cleanup in the validation code, still a bug left and this part
+ should probably be rewritten to support ambiguous content model :-\</li>
+ <li>Fix a couple of serious bugs introduced or raised by changes in 2.3.3
+ parser</li>
+ <li>Fixed another bug in xmlNodeGetContent()</li>
+ <li>Bjorn fixed XPath node collection and Number formatting</li>
+ <li>Fixed a loop reported in the HTML parsing</li>
+ <li>blank space are reported even if the Dtd content model proves that they
+ are formatting spaces, this is for XML conformance</li>
+</ul>
+
+<h3>2.3.3: Mar 1 2001</h3>
+<ul>
+ <li>small change in XPath for XSLT</li>
+ <li>documentation cleanups</li>
+ <li>fix in validation by Gary Pennington</li>
+ <li>serious parsing performances improvements</li>
+</ul>
+
+<h3>2.3.2: Feb 24 2001</h3>
+<ul>
+ <li>chasing XPath bugs, found a bunch, completed some TODO</li>
+ <li>fixed a Dtd parsing bug</li>
+ <li>fixed a bug in xmlNodeGetContent</li>
+ <li>ID/IDREF support partly rewritten by Gary Pennington</li>
+</ul>
+
+<h3>2.3.1: Feb 15 2001</h3>
+<ul>
+ <li>some XPath and HTML bug fixes for XSLT</li>
+ <li>small extension of the hash table interfaces for DOM gdome2
+ implementation</li>
+ <li>A few bug fixes</li>
+</ul>
+
+<h3>2.3.0: Feb 8 2001 (2.2.12 was on 25 Jan but I didn't kept track)</h3>
+<ul>
+ <li>Lots of XPath bug fixes</li>
+ <li>Add a mode with Dtd lookup but without validation error reporting for
+ XSLT</li>
+ <li>Add support for text node without escaping (XSLT)</li>
+ <li>bug fixes for xmlCheckFilename</li>
+ <li>validation code bug fixes from Gary Pennington</li>
+ <li>Patch from Paul D. Smith correcting URI path normalization</li>
+ <li>Patch to allow simultaneous install of libxml-devel and
+ libxml2-devel</li>
+ <li>the example Makefile is now fixed</li>
+ <li>added HTML to the RPM packages</li>
+ <li>tree copying bugfixes</li>
+ <li>updates to Windows makefiles</li>
+ <li>optimization patch from Bjorn Reese</li>
+</ul>
+
+<h3>2.2.11: Jan 4 2001</h3>
+<ul>
+ <li>bunch of bug fixes (memory I/O, xpath, ftp/http, ...)</li>
+ <li>added htmlHandleOmittedElem()</li>
+ <li>Applied Bjorn Reese's IPV6 first patch</li>
+ <li>Applied Paul D. Smith patches for validation of XInclude results</li>
+ <li>added XPointer xmlns() new scheme support</li>
+</ul>
+
+<h3>2.2.10: Nov 25 2000</h3>
+<ul>
+ <li>Fix the Windows problems of 2.2.8</li>
+ <li>integrate OpenVMS patches</li>
+ <li>better handling of some nasty HTML input</li>
+ <li>Improved the XPointer implementation</li>
+ <li>integrate a number of provided patches</li>
+</ul>
+
+<h3>2.2.9: Nov 25 2000</h3>
+<ul>
+ <li>erroneous release :-(</li>
+</ul>
+
+<h3>2.2.8: Nov 13 2000</h3>
+<ul>
+ <li>First version of <a href="http://www.w3.org/TR/xinclude">XInclude</a>
+ support</li>
+ <li>Patch in conditional section handling</li>
+ <li>updated MS compiler project</li>
+ <li>fixed some XPath problems</li>
+ <li>added an URI escaping function</li>
+ <li>some other bug fixes</li>
+</ul>
+
+<h3>2.2.7: Oct 31 2000</h3>
+<ul>
+ <li>added message redirection</li>
+ <li>XPath improvements (thanks TOM !)</li>
+ <li>xmlIOParseDTD() added</li>
+ <li>various small fixes in the HTML, URI, HTTP and XPointer support</li>
+ <li>some cleanup of the Makefile, autoconf and the distribution content</li>
+</ul>
+
+<h3>2.2.6: Oct 25 2000:</h3>
+<ul>
+ <li>Added an hash table module, migrated a number of internal structure to
+ those</li>
+ <li>Fixed a posteriori validation problems</li>
+ <li>HTTP module cleanups</li>
+ <li>HTML parser improvements (tag errors, script/style handling, attribute
+ normalization)</li>
+ <li>coalescing of adjacent text nodes</li>
+ <li>couple of XPath bug fixes, exported the internal API</li>
+</ul>
+
+<h3>2.2.5: Oct 15 2000:</h3>
+<ul>
+ <li>XPointer implementation and testsuite</li>
+ <li>Lot of XPath fixes, added variable and functions registration, more
+ tests</li>
+ <li>Portability fixes, lots of enhancements toward an easy Windows build
+ and release</li>
+ <li>Late validation fixes</li>
+ <li>Integrated a lot of contributed patches</li>
+ <li>added memory management docs</li>
+ <li>a performance problem when using large buffer seems fixed</li>
+</ul>
+
+<h3>2.2.4: Oct 1 2000:</h3>
+<ul>
+ <li>main XPath problem fixed</li>
+ <li>Integrated portability patches for Windows</li>
+ <li>Serious bug fixes on the URI and HTML code</li>
+</ul>
+
+<h3>2.2.3: Sep 17 2000</h3>
+<ul>
+ <li>bug fixes</li>
+ <li>cleanup of entity handling code</li>
+ <li>overall review of all loops in the parsers, all sprintf usage has been
+ checked too</li>
+ <li>Far better handling of larges Dtd. Validating against DocBook XML Dtd
+ works smoothly now.</li>
+</ul>
+
+<h3>1.8.10: Sep 6 2000</h3>
+<ul>
+ <li>bug fix release for some Gnome projects</li>
+</ul>
+
+<h3>2.2.2: August 12 2000</h3>
+<ul>
+ <li>mostly bug fixes</li>
+ <li>started adding routines to access xml parser context options</li>
+</ul>
+
+<h3>2.2.1: July 21 2000</h3>
+<ul>
+ <li>a purely bug fixes release</li>
+ <li>fixed an encoding support problem when parsing from a memory block</li>
+ <li>fixed a DOCTYPE parsing problem</li>
+ <li>removed a bug in the function allowing to override the memory
+ allocation routines</li>
+</ul>
+
+<h3>2.2.0: July 14 2000</h3>
+<ul>
+ <li>applied a lot of portability fixes</li>
+ <li>better encoding support/cleanup and saving (content is now always
+ encoded in UTF-8)</li>
+ <li>the HTML parser now correctly handles encodings</li>
+ <li>added xmlHasProp()</li>
+ <li>fixed a serious problem with &amp;#38;</li>
+ <li>propagated the fix to FTP client</li>
+ <li>cleanup, bugfixes, etc ...</li>
+ <li>Added a page about <a href="encoding.html">libxml Internationalization
+ support</a></li>
+</ul>
+
+<h3>1.8.9: July 9 2000</h3>
+<ul>
+ <li>fixed the spec the RPMs should be better</li>
+ <li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve
+ rpmfind users problem</li>
+</ul>
+
+<h3>2.1.1: July 1 2000</h3>
+<ul>
+ <li>fixes a couple of bugs in the 2.1.0 packaging</li>
+ <li>improvements on the HTML parser</li>
+</ul>
+
+<h3>2.1.0 and 1.8.8: June 29 2000</h3>
+<ul>
+ <li>1.8.8 is mostly a commodity package for upgrading to libxml2 according
+ to <a href="upgrade.html">new instructions</a>. It fixes a nasty problem
+ about &amp;#38; charref parsing</li>
+ <li>2.1.0 also ease the upgrade from libxml v1 to the recent version. it
+ also contains numerous fixes and enhancements:
+ <ul>
+ <li>added xmlStopParser() to stop parsing</li>
+ <li>improved a lot parsing speed when there is large CDATA blocs</li>
+ <li>includes XPath patches provided by Picdar Technology</li>
+ <li>tried to fix as much as possible DTD validation and namespace
+ related problems</li>
+ <li>output to a given encoding has been added/tested</li>
+ <li>lot of various fixes</li>
+ </ul>
+ </li>
+</ul>
+
+<h3>2.0.0: Apr 12 2000</h3>
+<ul>
+ <li>First public release of libxml2. If you are using libxml, it's a good
+ idea to check the 1.x to 2.x upgrade instructions. NOTE: while initially
+ scheduled for Apr 3 the release occurred only on Apr 12 due to massive
+ workload.</li>
+ <li>The include are now located under $prefix/include/libxml (instead of
+ $prefix/include/gnome-xml), they also are referenced by
+ <pre>#include &lt;libxml/xxx.h&gt;</pre>
+ <p>instead of</p>
+ <pre>#include "xxx.h"</pre>
+ </li>
+ <li>a new URI module for parsing URIs and following strictly RFC 2396</li>
+ <li>the memory allocation routines used by libxml can now be overloaded
+ dynamically by using xmlMemSetup()</li>
+ <li>The previously CVS only tool tester has been renamed
+ <strong>xmllint</strong> and is now installed as part of the libxml2
+ package</li>
+ <li>The I/O interface has been revamped. There is now ways to plug in
+ specific I/O modules, either at the URI scheme detection level using
+ xmlRegisterInputCallbacks() or by passing I/O functions when creating a
+ parser context using xmlCreateIOParserCtxt()</li>
+ <li>there is a C preprocessor macro LIBXML_VERSION providing the version
+ number of the libxml module in use</li>
+ <li>a number of optional features of libxml can now be excluded at
+ configure time (FTP/HTTP/HTML/XPath/Debug)</li>
+</ul>
+
+<h3>2.0.0beta: Mar 14 2000</h3>
+<ul>
+ <li>This is a first Beta release of libxml version 2</li>
+ <li>It's available only from<a href="ftp://xmlsoft.org/libxml2/">xmlsoft.org
+ FTP</a>, it's packaged as libxml2-2.0.0beta and available as tar and
+ RPMs</li>
+ <li>This version is now the head in the Gnome CVS base, the old one is
+ available under the tag LIB_XML_1_X</li>
+ <li>This includes a very large set of changes. From a programmatic point
+ of view applications should not have to be modified too much, check the
+ <a href="upgrade.html">upgrade page</a></li>
+ <li>Some interfaces may changes (especially a bit about encoding).</li>
+ <li>the updates includes:
+ <ul>
+ <li>fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly
+ handled now</li>
+ <li>Better handling of entities, especially well-formedness checking
+ and proper PEref extensions in external subsets</li>
+ <li>DTD conditional sections</li>
+ <li>Validation now correctly handle entities content</li>
+ <li><a href="http://rpmfind.net/tools/gdome/messages/0039.html">change
+ structures to accommodate DOM</a></li>
+ </ul>
+ </li>
+ <li>Serious progress were made toward compliance, <a
+ href="conf/result.html">here are the result of the test</a> against the
+ OASIS testsuite (except the Japanese tests since I don't support that
+ encoding yet). This URL is rebuilt every couple of hours using the CVS
+ head version.</li>
+</ul>
+
+<h3>1.8.7: Mar 6 2000</h3>
+<ul>
+ <li>This is a bug fix release:</li>
+ <li>It is possible to disable the ignorable blanks heuristic used by
+ libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note
+ that for adherence to XML spec, this behaviour will be disabled by
+ default in 2.x . The same function will allow to keep compatibility for
+ old code.</li>
+ <li>Blanks in &lt;a&gt; &lt;/a&gt; constructs are not ignored anymore,
+ avoiding heuristic is really the Right Way :-\</li>
+ <li>The unchecked use of snprintf which was breaking libxml-1.8.6
+ compilation on some platforms has been fixed</li>
+ <li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
+ URIs</li>
+</ul>
+
+<h3>1.8.6: Jan 31 2000</h3>
+<ul>
+ <li>added a nanoFTP transport module, debugged until the new version of <a
+ href="http://rpmfind.net/linux/rpm2html/rpmfind.html">rpmfind</a> can use
+ it without troubles</li>
+</ul>
+
+<h3>1.8.5: Jan 21 2000</h3>
+<ul>
+ <li>adding APIs to parse a well balanced chunk of XML (production <a
+ href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the
+ XML spec)</li>
+ <li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li>
+ <li>Jody Goldberg &lt;jgoldberg@home.com&gt; provided another patch trying
+ to solve the zlib checks problems</li>
+ <li>The current state in gnome CVS base is expected to ship as 1.8.5 with
+ gnumeric soon</li>
+</ul>
+
+<h3>1.8.4: Jan 13 2000</h3>
+<ul>
+ <li>bug fixes, reintroduced xmlNewGlobalNs(), fixed xmlNewNs()</li>
+ <li>all exit() call should have been removed from libxml</li>
+ <li>fixed a problem with INCLUDE_WINSOCK on WIN32 platform</li>
+ <li>added newDocFragment()</li>
+</ul>
+
+<h3>1.8.3: Jan 5 2000</h3>
+<ul>
+ <li>a Push interface for the XML and HTML parsers</li>
+ <li>a shell-like interface to the document tree (try tester --shell :-)</li>
+ <li>lots of bug fixes and improvement added over XMas holidays</li>
+ <li>fixed the DTD parsing code to work with the xhtml DTD</li>
+ <li>added xmlRemoveProp(), xmlRemoveID() and xmlRemoveRef()</li>
+ <li>Fixed bugs in xmlNewNs()</li>
+ <li>External entity loading code has been revamped, now it uses
+ xmlLoadExternalEntity(), some fix on entities processing were added</li>
+ <li>cleaned up WIN32 includes of socket stuff</li>
+</ul>
+
+<h3>1.8.2: Dec 21 1999</h3>
+<ul>
+ <li>I got another problem with includes and C++, I hope this issue is fixed
+ for good this time</li>
+ <li>Added a few tree modification functions: xmlReplaceNode,
+ xmlAddPrevSibling, xmlAddNextSibling, xmlNodeSetName and
+ xmlDocSetRootElement</li>
+ <li>Tried to improve the HTML output with help from <a
+ href="mailto:clahey@umich.edu">Chris Lahey</a></li>
+</ul>
+
+<h3>1.8.1: Dec 18 1999</h3>
+<ul>
+ <li>various patches to avoid troubles when using libxml with C++ compilers
+ the "namespace" keyword and C escaping in include files</li>
+ <li>a problem in one of the core macros IS_CHAR was corrected</li>
+ <li>fixed a bug introduced in 1.8.0 breaking default namespace processing,
+ and more specifically the Dia application</li>
+ <li>fixed a posteriori validation (validation after parsing, or by using a
+ Dtd not specified in the original document)</li>
+ <li>fixed a bug in</li>
+</ul>
+
+<h3>1.8.0: Dec 12 1999</h3>
+<ul>
+ <li>cleanup, especially memory wise</li>
+ <li>the parser should be more reliable, especially the HTML one, it should
+ not crash, whatever the input !</li>
+ <li>Integrated various patches, especially a speedup improvement for large
+ dataset from <a href="mailto:cnygard@bellatlantic.net">Carl Nygard</a>,
+ configure with --with-buffers to enable them.</li>
+ <li>attribute normalization, oops should have been added long ago !</li>
+ <li>attributes defaulted from DTDs should be available, xmlSetProp() now
+ does entities escaping by default.</li>
+</ul>
+
+<h3>1.7.4: Oct 25 1999</h3>
+<ul>
+ <li>Lots of HTML improvement</li>
+ <li>Fixed some errors when saving both XML and HTML</li>
+ <li>More examples, the regression tests should now look clean</li>
+ <li>Fixed a bug with contiguous charref</li>
+</ul>
+
+<h3>1.7.3: Sep 29 1999</h3>
+<ul>
+ <li>portability problems fixed</li>
+ <li>snprintf was used unconditionally, leading to link problems on system
+ were it's not available, fixed</li>
+</ul>
+
+<h3>1.7.1: Sep 24 1999</h3>
+<ul>
+ <li>The basic type for strings manipulated by libxml has been renamed in
+ 1.7.1 from <strong>CHAR</strong> to <strong>xmlChar</strong>. The reason
+ is that CHAR was conflicting with a predefined type on Windows. However
+ on non WIN32 environment, compatibility is provided by the way of a
+ <strong>#define </strong>.</li>
+ <li>Changed another error : the use of a structure field called errno, and
+ leading to troubles on platforms where it's a macro</li>
+</ul>
+
+<h3>1.7.0: Sep 23 1999</h3>
+<ul>
+ <li>Added the ability to fetch remote DTD or parsed entities, see the <a
+ href="html/libxml-nanohttp.html">nanohttp</a> module.</li>
+ <li>Added an errno to report errors by another mean than a simple printf
+ like callback</li>
+ <li>Finished ID/IDREF support and checking when validation</li>
+ <li>Serious memory leaks fixed (there is now a <a
+ href="html/libxml-xmlmemory.html">memory wrapper</a> module)</li>
+ <li>Improvement of <a href="http://www.w3.org/TR/xpath">XPath</a>
+ implementation</li>
+ <li>Added an HTML parser front-end</li>
+</ul>
+
+<h2><a name="XML">XML</a></h2>
+
+<p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for
+markup-based structured documents. Here is <a name="example">an example XML
+document</a>:</p>
+<pre>&lt;?xml version="1.0"?&gt;
+&lt;EXAMPLE prop1="gnome is great" prop2="&amp;amp; linux too"&gt;
+ &lt;head&gt;
+ &lt;title&gt;Welcome to Gnome&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;chapter&gt;
+ &lt;title&gt;The Linux adventure&lt;/title&gt;
+ &lt;p&gt;bla bla bla ...&lt;/p&gt;
+ &lt;image href="linus.gif"/&gt;
+ &lt;p&gt;...&lt;/p&gt;
+ &lt;/chapter&gt;
+&lt;/EXAMPLE&gt;</pre>
+
+<p>The first line specifies that it is an XML document and gives useful
+information about its encoding. Then the rest of the document is a text
+format whose structure is specified by tags between brackets. <strong>Each
+tag opened has to be closed</strong>. XML is pedantic about this. However, if
+a tag is empty (no content), a single tag can serve as both the opening and
+closing tag if it ends with <code>/&gt;</code> rather than with
+<code>&gt;</code>. Note that, for example, the image tag has no content (just
+an attribute) and is closed by ending the tag with <code>/&gt;</code>.</p>
+
+<p>XML can be applied successfully to a wide range of tasks, ranging from
+long term structured document maintenance (where it follows the steps of
+SGML) to simple data encoding mechanisms like configuration file formatting
+(glade), spreadsheets (gnumeric), or even shorter lived documents such as
+WebDAV where it is used to encode remote calls between a client and a
+server.</p>
+
+<h2><a name="XSLT">XSLT</a></h2>
+
+<p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p>
+
+<p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a
+language for transforming XML documents into other XML documents (or
+HTML/textual output).</p>
+
+<p>A separate library called libxslt is available implementing XSLT-1.0 for
+libxml2. This module "libxslt" too can be found in the Gnome SVN base.</p>
+
+<p>You can check the progresses on the libxslt <a
+href="http://xmlsoft.org/XSLT/ChangeLog.html">Changelog</a>.</p>
+
+<h2><a name="Python">Python and bindings</a></h2>
+
+<p>There are a number of language bindings and wrappers available for
+libxml2, the list below is not exhaustive. Please contact the <a
+href="http://mail.gnome.org/mailman/listinfo/xml-bindings">xml-bindings@gnome.org</a>
+(<a href="http://mail.gnome.org/archives/xml-bindings/">archives</a>) in
+order to get updates to this list or to discuss the specific topic of libxml2
+or libxslt wrappers or bindings:</p>
+<ul>
+ <li><a href="http://libxmlplusplus.sourceforge.net/">Libxml++</a> seems the
+ most up-to-date C++ bindings for libxml2, check the <a
+ href="http://libxmlplusplus.sourceforge.net/reference/html/hierarchy.html">documentation</a>
+ and the <a
+ href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/libxmlplusplus/libxml%2b%2b/examples/">examples</a>.</li>
+ <li>There is another <a href="http://libgdome-cpp.berlios.de/">C++ wrapper
+ based on the gdome2 bindings</a> maintained by Tobias Peters.</li>
+ <li>and a third C++ wrapper by Peter Jones &lt;pjones@pmade.org&gt;
+ <p>Website: <a
+ href="http://pmade.org/pjones/software/xmlwrapp/">http://pmade.org/pjones/software/xmlwrapp/</a></p>
+ </li>
+ <li>XML::LibXML <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl
+ bindings</a> are available on CPAN, as well as XML::LibXSLT
+ <a href="http://cpan.uwinnipeg.ca/dist/XML-LibXSLT">Perl libxslt
+ bindings</a>.</li>
+ <li>If you're interested into scripting XML processing, have a look at <a
+ href="http://xsh.sourceforge.net/">XSH</a> an XML editing shell based on
+ Libxml2 Perl bindings.</li>
+ <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provides an
+ earlier version of the libxml/libxslt <a
+ href="http://www.rexx.com/~dkuhlman">wrappers for Python</a>.</li>
+ <li>Gopal.V and Peter Minten develop <a
+ href="http://savannah.gnu.org/projects/libxmlsharp">libxml#</a>, a set of
+ C# libxml2 bindings.</li>
+ <li>Petr Kozelka provides <a
+ href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
+ libxml2</a> with Kylix, Delphi and other Pascal compilers.</li>
+ <li>Uwe Fechner also provides <a
+ href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
+ implementation for Kylix2/D5/D6 from Borland.</li>
+ <li>There is <a href="http://libxml.rubyforge.org/">bindings for Ruby</a>
+ and libxml2 bindings are also available in Ruby through the <a
+ href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
+ maintained by Tobias Peters.</li>
+ <li>Steve Ball and contributors maintains <a
+ href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for
+ Tcl</a>.</li>
+ <li>libxml2 and libxslt are the default XML libraries for PHP5.</li>
+ <li><a href="http://savannah.gnu.org/projects/classpathx/">LibxmlJ</a> is
+ an effort to create a 100% JAXP-compatible Java wrapper for libxml2 and
+ libxslt as part of GNU ClasspathX project.</li>
+ <li>Patrick McPhee provides Rexx bindings fof libxml2 and libxslt, look for
+ <a href="http://www.interlog.com/~ptjm/software.html">RexxXML</a>.</li>
+ <li><a
+ href="http://www.satimage.fr/software/en/xml_suite.html">Satimage</a>
+ provides <a
+ href="http://www.satimage.fr/software/en/downloads_osaxen.html">XMLLib
+ osax</a>. This is an osax for Mac OS X with a set of commands to
+ implement in AppleScript the XML DOM, XPATH and XSLT. Also includes
+ commands for Property-lists (Apple's fast lookup table XML format.)</li>
+ <li>Francesco Montorsi developped <a
+ href="https://sourceforge.net/project/showfiles.php?group_id=51305&amp;package_id=45182">wxXml2</a>
+ wrappers that interface libxml2, allowing wxWidgets applications to
+ load/save/edit XML instances.</li>
+</ul>
+
+<p>The distribution includes a set of Python bindings, which are guaranteed
+to be maintained as part of the library in the future, though the Python
+interface have not yet reached the completeness of the C API.</p>
+
+<p>Note that some of the Python purist dislike the default set of Python
+bindings, rather than complaining I suggest they have a look at <a
+href="http://lxml.de/">lxml the more pythonic bindings for libxml2
+and libxslt</a> and <a
+href="http://lxml.de/mailinglist/">check the mailing-list</a>.</p>
+
+<p><a href="mailto:stephane.bidoul@softwareag.com">Stéphane Bidoul</a>
+maintains <a href="http://users.skynet.be/sbi/libxml-python/">a Windows port
+of the Python bindings</a>.</p>
+
+<p>Note to people interested in building bindings, the API is formalized as
+<a href="libxml2-api.xml">an XML API description file</a> which allows to
+automate a large part of the Python bindings, this includes function
+descriptions, enums, structures, typedefs, etc... The Python script used to
+build the bindings is python/generator.py in the source distribution.</p>
+
+<p>To install the Python bindings there are 2 options:</p>
+<ul>
+ <li>If you use an RPM based distribution, simply install the <a
+ href="http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python">libxml2-python
+ RPM</a> (and if needed the <a
+ href="http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python">libxslt-python
+ RPM</a>).</li>
+ <li>Otherwise use the <a href="ftp://xmlsoft.org/libxml2/python/">libxml2-python
+ module distribution</a> corresponding to your installed version of
+ libxml2 and libxslt. Note that to install it you will need both libxml2
+ and libxslt installed and run "python setup.py build install" in the
+ module tree.</li>
+</ul>
+
+<p>The distribution includes a set of examples and regression tests for the
+python bindings in the <code>python/tests</code> directory. Here are some
+excerpts from those tests:</p>
+
+<h3>tst.py:</h3>
+
+<p>This is a basic test of the file interface and DOM navigation:</p>
+<pre>import libxml2, sys
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print "doc.name failed"
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print "root.name failed"
+ sys.exit(1)
+child = root.children
+if child.name != "foo":
+ print "child.name failed"
+ sys.exit(1)
+doc.freeDoc()</pre>
+
+<p>The Python module is called libxml2; parseFile is the equivalent of
+xmlParseFile (most of the bindings are automatically generated, and the xml
+prefix is removed and the casing convention are kept). All node seen at the
+binding level share the same subset of accessors:</p>
+<ul>
+ <li><code>name</code> : returns the node name</li>
+ <li><code>type</code> : returns a string indicating the node type</li>
+ <li><code>content</code> : returns the content of the node, it is based on
+ xmlNodeGetContent() and hence is recursive.</li>
+ <li><code>parent</code> , <code>children</code>, <code>last</code>,
+ <code>next</code>, <code>prev</code>, <code>doc</code>,
+ <code>properties</code>: pointing to the associated element in the tree,
+ those may return None in case no such link exists.</li>
+</ul>
+
+<p>Also note the need to explicitly deallocate documents with freeDoc() .
+Reference counting for libxml2 trees would need quite a lot of work to
+function properly, and rather than risk memory leaks if not implemented
+correctly it sounds safer to have an explicit function to free a tree. The
+wrapper python objects like doc, root or child are them automatically garbage
+collected.</p>
+
+<h3>validate.py:</h3>
+
+<p>This test check the validation interfaces and redirection of error
+messages:</p>
+<pre>import libxml2
+
+#deactivate error messages from the validation
+def noerr(ctx, str):
+ pass
+
+libxml2.registerErrorHandler(noerr, None)
+
+ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+doc.freeDoc()
+if valid != 0:
+ print "validity check failed"</pre>
+
+<p>The first thing to notice is the call to registerErrorHandler(), it
+defines a new error handler global to the library. It is used to avoid seeing
+the error messages when trying to validate the invalid document.</p>
+
+<p>The main interest of that test is the creation of a parser context with
+createFileParserCtxt() and how the behaviour can be changed before calling
+parseDocument() . Similarly the information resulting from the parsing phase
+is also available using context methods.</p>
+
+<p>Contexts like nodes are defined as class and the libxml2 wrappers maps the
+C function interfaces in terms of objects method as much as possible. The
+best to get a complete view of what methods are supported is to look at the
+libxml2.py module containing all the wrappers.</p>
+
+<h3>push.py:</h3>
+
+<p>This test show how to activate the push parser interface:</p>
+<pre>import libxml2
+
+ctxt = libxml2.createPushParser(None, "&lt;foo", 4, "test.xml")
+ctxt.parseChunk("/&gt;", 2, 1)
+doc = ctxt.doc()
+
+doc.freeDoc()</pre>
+
+<p>The context is created with a special call based on the
+xmlCreatePushParser() from the C library. The first argument is an optional
+SAX callback object, then the initial set of data, the length and the name of
+the resource in case URI-References need to be computed by the parser.</p>
+
+<p>Then the data are pushed using the parseChunk() method, the last call
+setting the third argument terminate to 1.</p>
+
+<h3>pushSAX.py:</h3>
+
+<p>this test show the use of the event based parsing interfaces. In this case
+the parser does not build a document, but provides callback information as
+the parser makes progresses analyzing the data being provided:</p>
+<pre>import libxml2
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.createPushParser(handler, "&lt;foo", 4, "test.xml")
+chunk = " url='tst'&gt;b"
+ctxt.parseChunk(chunk, len(chunk), 0)
+chunk = "ar&lt;/foo&gt;"
+ctxt.parseChunk(chunk, len(chunk), 1)
+
+reference = "startDocument:startElement foo {'url': 'tst'}:" + \
+ "characters: bar:endElement foo:endDocument:"
+if log != reference:
+ print "Error got: %s" % log
+ print "Expected: %s" % reference</pre>
+
+<p>The key object in that test is the handler, it provides a number of entry
+points which can be called by the parser as it makes progresses to indicate
+the information set obtained. The full set of callback is larger than what
+the callback class in that specific example implements (see the SAX
+definition for a complete list). The wrapper will only call those supplied by
+the object when activated. The startElement receives the names of the element
+and a dictionary containing the attributes carried by this element.</p>
+
+<p>Also note that the reference string generated from the callback shows a
+single character call even though the string "bar" is passed to the parser
+from 2 different call to parseChunk()</p>
+
+<h3>xpath.py:</h3>
+
+<p>This is a basic test of XPath wrappers support</p>
+<pre>import libxml2
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print "xpath query: wrong node set size"
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print "xpath query: wrong node set value"
+ sys.exit(1)
+doc.freeDoc()
+ctxt.xpathFreeContext()</pre>
+
+<p>This test parses a file, then create an XPath context to evaluate XPath
+expression on it. The xpathEval() method execute an XPath query and returns
+the result mapped in a Python way. String and numbers are natively converted,
+and node sets are returned as a tuple of libxml2 Python nodes wrappers. Like
+the document, the XPath context need to be freed explicitly, also not that
+the result of the XPath query may point back to the document tree and hence
+the document must be freed after the result of the query is used.</p>
+
+<h3>xpathext.py:</h3>
+
+<p>This test shows how to extend the XPath engine with functions written in
+python:</p>
+<pre>import libxml2
+
+def foo(ctx, x):
+ return x + 1
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+res = ctxt.xpathEval("foo(1)")
+if res != 2:
+ print "xpath extension failure"
+doc.freeDoc()
+ctxt.xpathFreeContext()</pre>
+
+<p>Note how the extension function is registered with the context (but that
+part is not yet finalized, this may change slightly in the future).</p>
+
+<h3>tstxpath.py:</h3>
+
+<p>This test is similar to the previous one but shows how the extension
+function can access the XPath evaluation context:</p>
+<pre>def foo(ctx, x):
+ global called
+
+ #
+ # test that access to the XPath evaluation contexts
+ #
+ pctxt = libxml2.xpathParserContext(_obj=ctx)
+ ctxt = pctxt.context()
+ called = ctxt.function()
+ return x + 1</pre>
+
+<p>All the interfaces around the XPath parser(or rather evaluation) context
+are not finalized, but it should be sufficient to do contextual work at the
+evaluation point.</p>
+
+<h3>Memory debugging:</h3>
+
+<p>last but not least, all tests starts with the following prologue:</p>
+<pre>#memory debug specific
+libxml2.debugMemory(1)</pre>
+
+<p>and ends with the following epilogue:</p>
+<pre>#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()</pre>
+
+<p>Those activate the memory debugging interface of libxml2 where all
+allocated block in the library are tracked. The prologue then cleans up the
+library state and checks that all allocated memory has been freed. If not it
+calls dumpMemory() which saves that list in a <code>.memdump</code> file.</p>
+
+<h2><a name="architecture">libxml2 architecture</a></h2>
+
+<p>Libxml2 is made of multiple components; some of them are optional, and
+most of the block interfaces are public. The main components are:</p>
+<ul>
+ <li>an Input/Output layer</li>
+ <li>FTP and HTTP client layers (optional)</li>
+ <li>an Internationalization layer managing the encodings support</li>
+ <li>a URI module</li>
+ <li>the XML parser and its basic SAX interface</li>
+ <li>an HTML parser using the same SAX interface (optional)</li>
+ <li>a SAX tree module to build an in-memory DOM representation</li>
+ <li>a tree module to manipulate the DOM representation</li>
+ <li>a validation module using the DOM representation (optional)</li>
+ <li>an XPath module for global lookup in a DOM representation
+ (optional)</li>
+ <li>a debug module (optional)</li>
+</ul>
+
+<p>Graphically this gives the following:</p>
+
+<p><img src="libxml.gif" alt="a graphical view of the various"></p>
+
+<p></p>
+
+<h2><a name="tree">The tree output</a></h2>
+
+<p>The parser returns a tree built during the document analysis. The value
+returned is an <strong>xmlDocPtr</strong> (i.e., a pointer to an
+<strong>xmlDoc</strong> structure). This structure contains information such
+as the file name, the document type, and a <strong>children</strong> pointer
+which is the root of the document (or more exactly the first child under the
+root which is the document). The tree is made of <strong>xmlNode</strong>s,
+chained in double-linked lists of siblings and with a children&lt;-&gt;parent
+relationship. An xmlNode can also carry properties (a chain of xmlAttr
+structures). An attribute may have a value which is a list of TEXT or
+ENTITY_REF nodes.</p>
+
+<p>Here is an example (erroneous with respect to the XML spec since there
+should be only one ELEMENT under the root):</p>
+
+<p><img src="structure.gif" alt=" structure.gif "></p>
+
+<p>In the source package there is a small program (not installed by default)
+called <strong>xmllint</strong> which parses XML files given as argument and
+prints them back as parsed. This is useful for detecting errors both in XML
+code and in the XML parser itself. It has an option <strong>--debug</strong>
+which prints the actual in-memory structure of the document; here is the
+result with the <a href="#example">example</a> given before:</p>
+<pre>DOCUMENT
+version=1.0
+standalone=true
+ ELEMENT EXAMPLE
+ ATTRIBUTE prop1
+ TEXT
+ content=gnome is great
+ ATTRIBUTE prop2
+ ENTITY_REF
+ TEXT
+ content= linux too
+ ELEMENT head
+ ELEMENT title
+ TEXT
+ content=Welcome to Gnome
+ ELEMENT chapter
+ ELEMENT title
+ TEXT
+ content=The Linux adventure
+ ELEMENT p
+ TEXT
+ content=bla bla bla ...
+ ELEMENT image
+ ATTRIBUTE href
+ TEXT
+ content=linus.gif
+ ELEMENT p
+ TEXT
+ content=...</pre>
+
+<p>This should be useful for learning the internal representation model.</p>
+
+<h2><a name="interface">The SAX interface</a></h2>
+
+<p>Sometimes the DOM tree output is just too large to fit reasonably into
+memory. In that case (and if you don't expect to save back the XML document
+loaded using libxml), it's better to use the SAX interface of libxml. SAX is
+a <strong>callback-based interface</strong> to the parser. Before parsing,
+the application layer registers a customized set of callbacks which are
+called by the library as it progresses through the XML input.</p>
+
+<p>To get more detailed step-by-step guidance on using the SAX interface of
+libxml, see the <a
+href="http://www.jamesh.id.au/articles/libxml-sax/libxml-sax.html">nice
+documentation</a>.written by <a href="mailto:james@daa.com.au">James
+Henstridge</a>.</p>
+
+<p>You can debug the SAX behaviour by using the <strong>testSAX</strong>
+program located in the gnome-xml module (it's usually not shipped in the
+binary packages of libxml, but you can find it in the tar source
+distribution). Here is the sequence of callbacks that would be reported by
+testSAX when parsing the example XML document shown earlier:</p>
+<pre>SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.getEntity(amp)
+SAX.startElement(EXAMPLE, prop1='gnome is great', prop2='&amp;amp; linux too')
+SAX.characters( , 3)
+SAX.startElement(head)
+SAX.characters( , 4)
+SAX.startElement(title)
+SAX.characters(Welcome to Gnome, 16)
+SAX.endElement(title)
+SAX.characters( , 3)
+SAX.endElement(head)
+SAX.characters( , 3)
+SAX.startElement(chapter)
+SAX.characters( , 4)
+SAX.startElement(title)
+SAX.characters(The Linux adventure, 19)
+SAX.endElement(title)
+SAX.characters( , 4)
+SAX.startElement(p)
+SAX.characters(bla bla bla ..., 15)
+SAX.endElement(p)
+SAX.characters( , 4)
+SAX.startElement(image, href='linus.gif')
+SAX.endElement(image)
+SAX.characters( , 4)
+SAX.startElement(p)
+SAX.characters(..., 3)
+SAX.endElement(p)
+SAX.characters( , 3)
+SAX.endElement(chapter)
+SAX.characters( , 1)
+SAX.endElement(EXAMPLE)
+SAX.endDocument()</pre>
+
+<p>Most of the other interfaces of libxml2 are based on the DOM tree-building
+facility, so nearly everything up to the end of this document presupposes the
+use of the standard DOM tree build. Note that the DOM tree itself is built by
+a set of registered default callbacks, without internal specific
+interface.</p>
+
+<h2><a name="Validation">Validation &amp; DTDs</a></h2>
+
+<p>Table of Content:</p>
+<ol>
+ <li><a href="#General5">General overview</a></li>
+ <li><a href="#definition">The definition</a></li>
+ <li><a href="#Simple">Simple rules</a>
+ <ol>
+ <li><a href="#reference">How to reference a DTD from a document</a></li>
+ <li><a href="#Declaring">Declaring elements</a></li>
+ <li><a href="#Declaring1">Declaring attributes</a></li>
+ </ol>
+ </li>
+ <li><a href="#Some">Some examples</a></li>
+ <li><a href="#validate">How to validate</a></li>
+ <li><a href="#Other">Other resources</a></li>
+</ol>
+
+<h3><a name="General5">General overview</a></h3>
+
+<p>Well what is validation and what is a DTD ?</p>
+
+<p>DTD is the acronym for Document Type Definition. This is a description of
+the content for a family of XML files. This is part of the XML 1.0
+specification, and allows one to describe and verify that a given document
+instance conforms to the set of rules detailing its structure and content.</p>
+
+<p>Validation is the process of checking a document against a DTD (more
+generally against a set of construction rules).</p>
+
+<p>The validation process and building DTDs are the two most difficult parts
+of the XML life cycle. Briefly a DTD defines all the possible elements to be
+found within your document, what is the formal shape of your document tree
+(by defining the allowed content of an element; either text, a regular
+expression for the allowed list of children, or mixed content i.e. both text
+and children). The DTD also defines the valid attributes for all elements and
+the types of those attributes.</p>
+
+<h3><a name="definition1">The definition</a></h3>
+
+<p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a
+href="http://www.xml.com/axml/axml.html">Tim Bray's annotated version of
+Rev1</a>):</p>
+<ul>
+ <li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring
+ elements</a></li>
+ <li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring
+ attributes</a></li>
+</ul>
+
+<p>(unfortunately) all this is inherited from the SGML world, the syntax is
+ancient...</p>
+
+<h3><a name="Simple1">Simple rules</a></h3>
+
+<p>Writing DTDs can be done in many ways. The rules to build them if you need
+something permanent or something which can evolve over time can be radically
+different. Really complex DTDs like DocBook ones are flexible but quite
+harder to design. I will just focus on DTDs for a formats with a fixed simple
+structure. It is just a set of basic rules, and definitely not exhaustive nor
+usable for complex DTD design.</p>
+
+<h4><a name="reference1">How to reference a DTD from a document</a>:</h4>
+
+<p>Assuming the top element of the document is <code>spec</code> and the dtd
+is placed in the file <code>mydtd</code> in the subdirectory
+<code>dtds</code> of the directory from where the document were loaded:</p>
+
+<p><code>&lt;!DOCTYPE spec SYSTEM "dtds/mydtd"&gt;</code></p>
+
+<p>Notes:</p>
+<ul>
+ <li>The system string is actually an URI-Reference (as defined in <a
+ href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a
+ full URL string indicating the location of your DTD on the Web. This is a
+ really good thing to do if you want others to validate your document.</li>
+ <li>It is also possible to associate a <code>PUBLIC</code> identifier (a
+ magic string) so that the DTD is looked up in catalogs on the client side
+ without having to locate it on the web.</li>
+ <li>A DTD contains a set of element and attribute declarations, but they
+ don't define what the root of the document should be. This is explicitly
+ told to the parser/validator as the first element of the
+ <code>DOCTYPE</code> declaration.</li>
+</ul>
+
+<h4><a name="Declaring2">Declaring elements</a>:</h4>
+
+<p>The following declares an element <code>spec</code>:</p>
+
+<p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p>
+
+<p>It also expresses that the spec element contains one <code>front</code>,
+one <code>body</code> and one optional <code>back</code> children elements in
+this order. The declaration of one element of the structure and its content
+are done in a single declaration. Similarly the following declares
+<code>div1</code> elements:</p>
+
+<p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p>
+
+<p>which means div1 contains one <code>head</code> then a series of optional
+<code>p</code>, <code>list</code>s and <code>note</code>s and then an
+optional <code>div2</code>. And last but not least an element can contain
+text:</p>
+
+<p><code>&lt;!ELEMENT b (#PCDATA)&gt;</code></p>
+
+<p><code>b</code> contains text or being of mixed content (text and elements
+in no particular order):</p>
+
+<p><code>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*&gt;</code></p>
+
+<p><code>p </code>can contain text or <code>a</code>, <code>ul</code>,
+<code>b</code>, <code>i </code>or <code>em</code> elements in no particular
+order.</p>
+
+<h4><a name="Declaring1">Declaring attributes</a>:</h4>
+
+<p>Again the attributes declaration includes their content definition:</p>
+
+<p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p>
+
+<p>means that the element <code>termdef</code> can have a <code>name</code>
+attribute containing text (<code>CDATA</code>) and which is optional
+(<code>#IMPLIED</code>). The attribute value can also be defined within a
+set:</p>
+
+<p><code>&lt;!ATTLIST list type (bullets|ordered|glossary)
+"ordered"&gt;</code></p>
+
+<p>means <code>list</code> element have a <code>type</code> attribute with 3
+allowed values "bullets", "ordered" or "glossary" and which default to
+"ordered" if the attribute is not explicitly specified.</p>
+
+<p>The content type of an attribute can be text (<code>CDATA</code>),
+anchor/reference/references
+(<code>ID</code>/<code>IDREF</code>/<code>IDREFS</code>), entity(ies)
+(<code>ENTITY</code>/<code>ENTITIES</code>) or name(s)
+(<code>NMTOKEN</code>/<code>NMTOKENS</code>). The following defines that a
+<code>chapter</code> element can have an optional <code>id</code> attribute
+of type <code>ID</code>, usable for reference from attribute of type
+IDREF:</p>
+
+<p><code>&lt;!ATTLIST chapter id ID #IMPLIED&gt;</code></p>
+
+<p>The last value of an attribute definition can be <code>#REQUIRED
+</code>meaning that the attribute has to be given, <code>#IMPLIED</code>
+meaning that it is optional, or the default value (possibly prefixed by
+<code>#FIXED</code> if it is the only allowed).</p>
+
+<p>Notes:</p>
+<ul>
+ <li>Usually the attributes pertaining to a given element are declared in a
+ single expression, but it is just a convention adopted by a lot of DTD
+ writers:
+ <pre>&lt;!ATTLIST termdef
+ id ID #REQUIRED
+ name CDATA #IMPLIED&gt;</pre>
+ <p>The previous construct defines both <code>id</code> and
+ <code>name</code> attributes for the element <code>termdef</code>.</p>
+ </li>
+</ul>
+
+<h3><a name="Some1">Some examples</a></h3>
+
+<p>The directory <code>test/valid/dtds/</code> in the libxml2 distribution
+contains some complex DTD examples. The example in the file
+<code>test/valid/dia.xml</code> shows an XML file where the simple DTD is
+directly included within the document.</p>
+
+<h3><a name="validate1">How to validate</a></h3>
+
+<p>The simplest way is to use the xmllint program included with libxml. The
+<code>--valid</code> option turns-on validation of the files given as input.
+For example the following validates a copy of the first revision of the XML
+1.0 specification:</p>
+
+<p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p>
+
+<p>the -- noout is used to disable output of the resulting tree.</p>
+
+<p>The <code>--dtdvalid dtd</code> allows validation of the document(s)
+against a given DTD.</p>
+
+<p>Libxml2 exports an API to handle DTDs and validation, check the <a
+href="http://xmlsoft.org/html/libxml-valid.html">associated
+description</a>.</p>
+
+<h3><a name="Other1">Other resources</a></h3>
+
+<p>DTDs are as old as SGML. So there may be a number of examples on-line, I
+will just list one for now, others pointers welcome:</p>
+<ul>
+ <li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li>
+</ul>
+
+<p>I suggest looking at the examples found under test/valid/dtd and any of
+the large number of books available on XML. The dia example in test/valid
+should be both simple and complete enough to allow you to build your own.</p>
+
+<p></p>
+
+<h2><a name="Memory">Memory Management</a></h2>
+
+<p>Table of Content:</p>
+<ol>
+ <li><a href="#General3">General overview</a></li>
+ <li><a href="#setting">Setting libxml2 set of memory routines</a></li>
+ <li><a href="#cleanup">Cleaning up after using the library</a></li>
+ <li><a href="#Debugging">Debugging routines</a></li>
+ <li><a href="#General4">General memory requirements</a></li>
+ <li><a href="#Compacting">Returning memory to the kernel</a></li>
+</ol>
+
+<h3><a name="General3">General overview</a></h3>
+
+<p>The module <code><a
+href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code>
+provides the interfaces to the libxml2 memory system:</p>
+<ul>
+ <li>libxml2 does not use the libc memory allocator directly but xmlFree(),
+ xmlMalloc() and xmlRealloc()</li>
+ <li>those routines can be reallocated to a specific set of routine, by
+ default the libc ones i.e. free(), malloc() and realloc()</li>
+ <li>the xmlmemory.c module includes a set of debugging routine</li>
+</ul>
+
+<h3><a name="setting">Setting libxml2 set of memory routines</a></h3>
+
+<p>It is sometimes useful to not use the default memory allocator, either for
+debugging, analysis or to implement a specific behaviour on memory management
+(like on embedded systems). Two function calls are available to do so:</p>
+<ul>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet
+ ()</a> which return the current set of functions in use by the parser</li>
+ <li><a
+ href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a>
+ which allow to set up a new set of memory allocation functions</li>
+</ul>
+
+<p>Of course a call to xmlMemSetup() should probably be done before calling
+any other libxml2 routines (unless you are sure your allocations routines are
+compatibles).</p>
+
+<h3><a name="cleanup">Cleaning up after using the library</a></h3>
+
+<p>Libxml2 is not stateless, there is a few set of memory structures needing
+allocation before the parser is fully functional (some encoding structures
+for example). This also mean that once parsing is finished there is a tiny
+amount of memory (a few hundred bytes) which can be recollected if you don't
+reuse the library or any document built with it:</p>
+<ul>
+ <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlCleanupParser
+ ()</a> is a centralized routine to free the library state and data. Note
+ that it won't deallocate any produced tree if any (use the xmlFreeDoc()
+ and related routines for this). This should be called only when the library
+ is not used anymore.</li>
+ <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser
+ ()</a> is the dual routine allowing to preallocate the parsing state
+ which can be useful for example to avoid initialization reentrancy
+ problems when using libxml2 in multithreaded applications</li>
+</ul>
+
+<p>Generally xmlCleanupParser() is safe assuming no parsing is ongoing and
+no document is still being used, if needed the state will be rebuild at the
+next invocation of parser routines (or by xmlInitParser()), but be careful
+of the consequences in multithreaded applications.</p>
+
+<h3><a name="Debugging">Debugging routines</a></h3>
+
+<p>When configured using --with-mem-debug flag (off by default), libxml2 uses
+a set of memory allocation debugging routines keeping track of all allocated
+blocks and the location in the code where the routine was called. A couple of
+other debugging routines allow to dump the memory allocated infos to a file
+or call a specific routine when a given block number is allocated:</p>
+<ul>
+ <li><a
+ href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a>
+ <a
+ href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a>
+ and <a
+ href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a>
+ are the memory debugging replacement allocation routines</li>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump
+ ()</a> dumps all the information about the allocated memory block lefts
+ in the <code>.memdump</code> file</li>
+</ul>
+
+<p>When developing libxml2 memory debug is enabled, the tests programs call
+xmlMemoryDump () and the "make test" regression tests will check for any
+memory leak during the full regression test sequence, this helps a lot
+ensuring that libxml2 does not leak memory and bullet proof memory
+allocations use (some libc implementations are known to be far too permissive
+resulting in major portability problems!).</p>
+
+<p>If the .memdump reports a leak, it displays the allocation function and
+also tries to give some information about the content and structure of the
+allocated blocks left. This is sufficient in most cases to find the culprit,
+but not always. Assuming the allocation problem is reproducible, it is
+possible to find more easily:</p>
+<ol>
+ <li>write down the block number xxxx not allocated</li>
+ <li>export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest
+ when using GDB is to simply give the command
+ <p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p>
+ <p>before running the program.</p>
+ </li>
+ <li>run the program under a debugger and set a breakpoint on
+ xmlMallocBreakpoint() a specific function called when this precise block
+ is allocated</li>
+ <li>when the breakpoint is reached you can then do a fine analysis of the
+ allocation an step to see the condition resulting in the missing
+ deallocation.</li>
+</ol>
+
+<p>I used to use a commercial tool to debug libxml2 memory problems but after
+noticing that it was not detecting memory leaks that simple mechanism was
+used and proved extremely efficient until now. Lately I have also used <a
+href="http://developer.kde.org/~sewardj/">valgrind</a> with quite some
+success, it is tied to the i386 architecture since it works by emulating the
+processor and instruction set, it is slow but extremely efficient, i.e. it
+spot memory usage errors in a very precise way.</p>
+
+<h3><a name="General4">General memory requirements</a></h3>
+
+<p>How much libxml2 memory require ? It's hard to tell in average it depends
+of a number of things:</p>
+<ul>
+ <li>the parser itself should work in a fixed amount of memory, except for
+ information maintained about the stacks of names and entities locations.
+ The I/O and encoding handlers will probably account for a few KBytes.
+ This is true for both the XML and HTML parser (though the HTML parser
+ need more state).</li>
+ <li>If you are generating the DOM tree then memory requirements will grow
+ nearly linear with the size of the data. In general for a balanced
+ textual document the internal memory requirement is about 4 times the
+ size of the UTF8 serialization of this document (example the XML-1.0
+ recommendation is a bit more of 150KBytes and takes 650KBytes of main
+ memory when parsed). Validation will add a amount of memory required for
+ maintaining the external Dtd state which should be linear with the
+ complexity of the content model defined by the Dtd</li>
+ <li>If you need to work with fixed memory requirements or don't need the
+ full DOM tree then using the <a href="xmlreader.html">xmlReader
+ interface</a> is probably the best way to proceed, it still allows to
+ validate or operate on subset of the tree if needed.</li>
+ <li>If you don't care about the advanced features of libxml2 like
+ validation, DOM, XPath or XPointer, don't use entities, need to work with
+ fixed memory requirements, and try to get the fastest parsing possible
+ then the SAX interface should be used, but it has known restrictions.</li>
+</ul>
+
+<p></p>
+<h3><a name="Compacting">Returning memory to the kernel</a></h3>
+
+<p>You may encounter that your process using libxml2 does not have a
+reduced memory usage although you freed the trees. This is because
+libxml2 allocates memory in a number of small chunks. When freeing one
+of those chunks, the OS may decide that giving this little memory back
+to the kernel will cause too much overhead and delay the operation. As
+all chunks are this small, they get actually freed but not returned to
+the kernel. On systems using glibc, there is a function call
+"malloc_trim" from malloc.h which does this missing operation (note that
+it is allowed to fail). Thus, after freeing your tree you may simply try
+"malloc_trim(0);" to really get the memory back. If your OS does not
+provide malloc_trim, try searching for a similar function.</p>
+<p></p>
+
+<h2><a name="Encodings">Encodings support</a></h2>
+
+<p>If you are not really familiar with Internationalization (usual shortcut
+is I18N) , Unicode, characters and glyphs, I suggest you read a <a
+href="http://www.tbray.org/ongoing/When/200x/2003/04/06/Unicode">presentation</a>
+by Tim Bray on Unicode and why you should care about it.</p>
+
+<p>If you don't understand why <b>it does not make sense to have a string
+without knowing what encoding it uses</b>, then as Joel Spolsky said <a
+href="http://www.joelonsoftware.com/articles/Unicode.html">please do not
+write another line of code until you finish reading that article.</a>. It is
+a prerequisite to understand this page, and avoid a lot of problems with
+libxml2, XML or text processing in general.</p>
+
+<p>Table of Content:</p>
+<ol>
+ <li><a href="encoding.html#What">What does internationalization support
+ mean ?</a></li>
+ <li><a href="encoding.html#internal">The internal encoding, how and
+ why</a></li>
+ <li><a href="encoding.html#implemente">How is it implemented ?</a></li>
+ <li><a href="encoding.html#Default">Default supported encodings</a></li>
+ <li><a href="encoding.html#extend">How to extend the existing
+ support</a></li>
+</ol>
+
+<h3><a name="What">What does internationalization support mean ?</a></h3>
+
+<p>XML was designed from the start to allow the support of any character set
+by using Unicode. Any conformant XML parser has to support the UTF-8 and
+UTF-16 default encodings which can both express the full unicode ranges. UTF8
+is a variable length encoding whose greatest points are to reuse the same
+encoding for ASCII and to save space for Western encodings, but it is a bit
+more complex to handle in practice. UTF-16 use 2 bytes per character (and
+sometimes combines two pairs), it makes implementation easier, but looks a
+bit overkill for Western languages encoding. Moreover the XML specification
+allows the document to be encoded in other encodings at the condition that
+they are clearly labeled as such. For example the following is a wellformed
+XML document encoded in ISO-8859-1 and using accentuated letters that we
+French like for both markup and content:</p>
+<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
+&lt;tr&egrave;s&gt;l&agrave; &lt;/tr&egrave;s&gt;</pre>
+
+<p>Having internationalization support in libxml2 means the following:</p>
+<ul>
+ <li>the document is properly parsed</li>
+ <li>information about it's encoding is saved</li>
+ <li>it can be modified</li>
+ <li>it can be saved in its original encoding</li>
+ <li>it can also be saved in another encoding supported by libxml2 (for
+ example straight UTF8 or even an ASCII form)</li>
+</ul>
+
+<p>Another very important point is that the whole libxml2 API, with the
+exception of a few routines to read with a specific encoding or save to a
+specific encoding, is completely agnostic about the original encoding of the
+document.</p>
+
+<p>It should be noted too that the HTML parser embedded in libxml2 now obey
+the same rules too, the following document will be (as of 2.2.2) handled in
+an internationalized fashion by libxml2 too:</p>
+<pre>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd"&gt;
+&lt;html lang="fr"&gt;
+&lt;head&gt;
+ &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p&gt;W3C cr&eacute;e des standards pour le Web.&lt;/body&gt;
+&lt;/html&gt;</pre>
+
+<h3><a name="internal">The internal encoding, how and why</a></h3>
+
+<p>One of the core decisions was to force all documents to be converted to a
+default internal encoding, and that encoding to be UTF-8, here are the
+rationales for those choices:</p>
+<ul>
+ <li>keeping the native encoding in the internal form would force the libxml
+ users (or the code associated) to be fully aware of the encoding of the
+ original document, for examples when adding a text node to a document,
+ the content would have to be provided in the document encoding, i.e. the
+ client code would have to check it before hand, make sure it's conformant
+ to the encoding, etc ... Very hard in practice, though in some specific
+ cases this may make sense.</li>
+ <li>the second decision was which encoding. From the XML spec only UTF8 and
+ UTF16 really makes sense as being the two only encodings for which there
+ is mandatory support. UCS-4 (32 bits fixed size encoding) could be
+ considered an intelligent choice too since it's a direct Unicode mapping
+ support. I selected UTF-8 on the basis of efficiency and compatibility
+ with surrounding software:
+ <ul>
+ <li>UTF-8 while a bit more complex to convert from/to (i.e. slightly
+ more costly to import and export CPU wise) is also far more compact
+ than UTF-16 (and UCS-4) for a majority of the documents I see it used
+ for right now (RPM RDF catalogs, advogato data, various configuration
+ file formats, etc.) and the key point for today's computer
+ architecture is efficient uses of caches. If one nearly double the
+ memory requirement to store the same amount of data, this will trash
+ caches (main memory/external caches/internal caches) and my take is
+ that this harms the system far more than the CPU requirements needed
+ for the conversion to UTF-8</li>
+ <li>Most of libxml2 version 1 users were using it with straight ASCII
+ most of the time, doing the conversion with an internal encoding
+ requiring all their code to be rewritten was a serious show-stopper
+ for using UTF-16 or UCS-4.</li>
+ <li>UTF-8 is being used as the de-facto internal encoding standard for
+ related code like the <a href="http://www.pango.org/">pango</a>
+ upcoming Gnome text widget, and a lot of Unix code (yet another place
+ where Unix programmer base takes a different approach from Microsoft
+ - they are using UTF-16)</li>
+ </ul>
+ </li>
+</ul>
+
+<p>What does this mean in practice for the libxml2 user:</p>
+<ul>
+ <li>xmlChar, the libxml2 data type is a byte, those bytes must be assembled
+ as UTF-8 valid strings. The proper way to terminate an xmlChar * string
+ is simply to append 0 byte, as usual.</li>
+ <li>One just need to make sure that when using chars outside the ASCII set,
+ the values has been properly converted to UTF-8</li>
+</ul>
+
+<h3><a name="implemente">How is it implemented ?</a></h3>
+
+<p>Let's describe how all this works within libxml, basically the I18N
+(internationalization) support get triggered only during I/O operation, i.e.
+when reading a document or saving one. Let's look first at the reading
+sequence:</p>
+<ol>
+ <li>when a document is processed, we usually don't know the encoding, a
+ simple heuristic allows to detect UTF-16 and UCS-4 from encodings where
+ the ASCII range (0-0x7F) maps with ASCII</li>
+ <li>the xml declaration if available is parsed, including the encoding
+ declaration. At that point, if the autodetected encoding is different
+ from the one declared a call to xmlSwitchEncoding() is issued.</li>
+ <li>If there is no encoding declaration, then the input has to be in either
+ UTF-8 or UTF-16, if it is not then at some point when processing the
+ input, the converter/checker of UTF-8 form will raise an encoding error.
+ You may end-up with a garbled document, or no document at all ! Example:
+ <pre>~/XML -&gt; ./xmllint err.xml
+err.xml:1: error: Input is not proper UTF-8, indicate encoding !
+&lt;tr&egrave;s&gt;l&agrave; &lt;/tr&egrave;s&gt;
+ ^
+err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C
+&lt;tr&egrave;s&gt;l&agrave; &lt;/tr&egrave;s&gt;
+ ^</pre>
+ </li>
+ <li>xmlSwitchEncoding() does an encoding name lookup, canonicalize it, and
+ then search the default registered encoding converters for that encoding.
+ If it's not within the default set and iconv() support has been compiled
+ it, it will ask iconv for such an encoder. If this fails then the parser
+ will report an error and stops processing:
+ <pre>~/XML -&gt; ./xmllint err2.xml
+err2.xml:1: error: Unsupported encoding UnsupportedEnc
+&lt;?xml version="1.0" encoding="UnsupportedEnc"?&gt;
+ ^</pre>
+ </li>
+ <li>From that point the encoder processes progressively the input (it is
+ plugged as a front-end to the I/O module) for that entity. It captures
+ and converts on-the-fly the document to be parsed to UTF-8. The parser
+ itself just does UTF-8 checking of this input and process it
+ transparently. The only difference is that the encoding information has
+ been added to the parsing context (more precisely to the input
+ corresponding to this entity).</li>
+ <li>The result (when using DOM) is an internal form completely in UTF-8
+ with just an encoding information on the document node.</li>
+</ol>
+
+<p>Ok then what happens when saving the document (assuming you
+collected/built an xmlDoc DOM like structure) ? It depends on the function
+called, xmlSaveFile() will just try to save in the original encoding, while
+xmlSaveFileTo() and xmlSaveFileEnc() can optionally save to a given
+encoding:</p>
+<ol>
+ <li>if no encoding is given, libxml2 will look for an encoding value
+ associated to the document and if it exists will try to save to that
+ encoding,
+ <p>otherwise everything is written in the internal form, i.e. UTF-8</p>
+ </li>
+ <li>so if an encoding was specified, either at the API level or on the
+ document, libxml2 will again canonicalize the encoding name, lookup for a
+ converter in the registered set or through iconv. If not found the
+ function will return an error code</li>
+ <li>the converter is placed before the I/O buffer layer, as another kind of
+ buffer, then libxml2 will simply push the UTF-8 serialization to through
+ that buffer, which will then progressively be converted and pushed onto
+ the I/O layer.</li>
+ <li>It is possible that the converter code fails on some input, for example
+ trying to push an UTF-8 encoded Chinese character through the UTF-8 to
+ ISO-8859-1 converter won't work. Since the encoders are progressive they
+ will just report the error and the number of bytes converted, at that
+ point libxml2 will decode the offending character, remove it from the
+ buffer and replace it with the associated charRef encoding &amp;#123; and
+ resume the conversion. This guarantees that any document will be saved
+ without losses (except for markup names where this is not legal, this is
+ a problem in the current version, in practice avoid using non-ascii
+ characters for tag or attribute names). A special "ascii" encoding name
+ is used to save documents to a pure ascii form can be used when
+ portability is really crucial</li>
+</ol>
+
+<p>Here are a few examples based on the same test document and assumin a
+terminal using ISO-8859-1 as the text encoding:</p>
+<pre>~/XML -&gt; ./xmllint isolat1
+&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
+&lt;tr&egrave;s&gt;là&lt;/tr&egrave;s&gt;
+~/XML -&gt; ./xmllint --encode UTF-8 isolat1
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;très&gt;là &nbsp;&lt;/très&gt;
+~/XML -&gt; </pre>
+
+<p>The same processing is applied (and reuse most of the code) for HTML I18N
+processing. Looking up and modifying the content encoding is a bit more
+difficult since it is located in a &lt;meta&gt; tag under the &lt;head&gt;,
+so a couple of functions htmlGetMetaEncoding() and htmlSetMetaEncoding() have
+been provided. The parser also attempts to switch encoding on the fly when
+detecting such a tag on input. Except for that the processing is the same
+(and again reuses the same code).</p>
+
+<h3><a name="Default">Default supported encodings</a></h3>
+
+<p>libxml2 has a set of default converters for the following encodings
+(located in encoding.c):</p>
+<ol>
+ <li>UTF-8 is supported by default (null handlers)</li>
+ <li>UTF-16, both little and big endian</li>
+ <li>ISO-Latin-1 (ISO-8859-1) covering most western languages</li>
+ <li>ASCII, useful mostly for saving</li>
+ <li>HTML, a specific handler for the conversion of UTF-8 to ASCII with HTML
+ predefined entities like &amp;copy; for the Copyright sign.</li>
+</ol>
+
+<p>More over when compiled on an Unix platform with iconv support the full
+set of encodings supported by iconv can be instantly be used by libxml. On a
+linux machine with glibc-2.1 the list of supported encodings and aliases fill
+3 full pages, and include UCS-4, the full set of ISO-Latin encodings, and the
+various Japanese ones.</p>
+
+<p>To convert from the UTF-8 values returned from the API to another encoding
+then it is possible to use the function provided from <a
+href="html/libxml-encoding.html">the encoding module</a> like <a
+href="html/libxml-encoding.html#UTF8Toisolat1">UTF8Toisolat1</a>, or use the
+POSIX <a
+href="http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html">iconv()</a>
+API directly.</p>
+
+<h4>Encoding aliases</h4>
+
+<p>From 2.2.3, libxml2 has support to register encoding names aliases. The
+goal is to be able to parse document whose encoding is supported but where
+the name differs (for example from the default set of names accepted by
+iconv). The following functions allow to register and handle new aliases for
+existing encodings. Once registered libxml2 will automatically lookup the
+aliases when handling a document:</p>
+<ul>
+ <li>int xmlAddEncodingAlias(const char *name, const char *alias);</li>
+ <li>int xmlDelEncodingAlias(const char *alias);</li>
+ <li>const char * xmlGetEncodingAlias(const char *alias);</li>
+ <li>void xmlCleanupEncodingAliases(void);</li>
+</ul>
+
+<h3><a name="extend">How to extend the existing support</a></h3>
+
+<p>Well adding support for new encoding, or overriding one of the encoders
+(assuming it is buggy) should not be hard, just write input and output
+conversion routines to/from UTF-8, and register them using
+xmlNewCharEncodingHandler(name, xxxToUTF8, UTF8Toxxx), and they will be
+called automatically if the parser(s) encounter such an encoding name
+(register it uppercase, this will help). The description of the encoders,
+their arguments and expected return values are described in the encoding.h
+header.</p>
+
+<h2><a name="IO">I/O Interfaces</a></h2>
+
+<p>Table of Content:</p>
+<ol>
+ <li><a href="#General1">General overview</a></li>
+ <li><a href="#basic">The basic buffer type</a></li>
+ <li><a href="#Input">Input I/O handlers</a></li>
+ <li><a href="#Output">Output I/O handlers</a></li>
+ <li><a href="#entities">The entities loader</a></li>
+ <li><a href="#Example2">Example of customized I/O</a></li>
+</ol>
+
+<h3><a name="General1">General overview</a></h3>
+
+<p>The module <code><a
+href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides
+the interfaces to the libxml2 I/O system. This consists of 4 main parts:</p>
+<ul>
+ <li>Entities loader, this is a routine which tries to fetch the entities
+ (files) based on their PUBLIC and SYSTEM identifiers. The default loader
+ don't look at the public identifier since libxml2 do not maintain a
+ catalog. You can redefine you own entity loader by using
+ <code>xmlGetExternalEntityLoader()</code> and
+ <code>xmlSetExternalEntityLoader()</code>. <a href="#entities">Check the
+ example</a>.</li>
+ <li>Input I/O buffers which are a commodity structure used by the parser(s)
+ input layer to handle fetching the information to feed the parser. This
+ provides buffering and is also a placeholder where the encoding
+ converters to UTF8 are piggy-backed.</li>
+ <li>Output I/O buffers are similar to the Input ones and fulfill similar
+ task but when generating a serialization from a tree.</li>
+ <li>A mechanism to register sets of I/O callbacks and associate them with
+ specific naming schemes like the protocol part of the URIs.
+ <p>This affect the default I/O operations and allows to use specific I/O
+ handlers for certain names.</p>
+ </li>
+</ul>
+
+<p>The general mechanism used when loading http://rpmfind.net/xml.html for
+example in the HTML parser is the following:</p>
+<ol>
+ <li>The default entity loader calls <code>xmlNewInputFromFile()</code> with
+ the parsing context and the URI string.</li>
+ <li>the URI string is checked against the existing registered handlers
+ using their match() callback function, if the HTTP module was compiled
+ in, it is registered and its match() function will succeeds</li>
+ <li>the open() function of the handler is called and if successful will
+ return an I/O Input buffer</li>
+ <li>the parser will the start reading from this buffer and progressively
+ fetch information from the resource, calling the read() function of the
+ handler until the resource is exhausted</li>
+ <li>if an encoding change is detected it will be installed on the input
+ buffer, providing buffering and efficient use of the conversion
+ routines</li>
+ <li>once the parser has finished, the close() function of the handler is
+ called once and the Input buffer and associated resources are
+ deallocated.</li>
+</ol>
+
+<p>The user defined callbacks are checked first to allow overriding of the
+default libxml2 I/O routines.</p>
+
+<h3><a name="basic">The basic buffer type</a></h3>
+
+<p>All the buffer manipulation handling is done using the
+<code>xmlBuffer</code> type define in <code><a
+href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a> </code>which is a
+resizable memory buffer. The buffer allocation strategy can be selected to be
+either best-fit or use an exponential doubling one (CPU vs. memory use
+trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and
+<code>XML_BUFFER_ALLOC_DOUBLEIT</code>, and can be set individually or on a
+system wide basis using <code>xmlBufferSetAllocationScheme()</code>. A number
+of functions allows to manipulate buffers with names starting with the
+<code>xmlBuffer...</code> prefix.</p>
+
+<h3><a name="Input">Input I/O handlers</a></h3>
+
+<p>An Input I/O handler is a simple structure
+<code>xmlParserInputBuffer</code> containing a context associated to the
+resource (file descriptor, or pointer to a protocol handler), the read() and
+close() callbacks to use and an xmlBuffer. And extra xmlBuffer and a charset
+encoding handler are also present to support charset conversion when
+needed.</p>
+
+<h3><a name="Output">Output I/O handlers</a></h3>
+
+<p>An Output handler <code>xmlOutputBuffer</code> is completely similar to an
+Input one except the callbacks are write() and close().</p>
+
+<h3><a name="entities">The entities loader</a></h3>
+
+<p>The entity loader resolves requests for new entities and create inputs for
+the parser. Creating an input from a filename or an URI string is done
+through the xmlNewInputFromFile() routine. The default entity loader do not
+handle the PUBLIC identifier associated with an entity (if any). So it just
+calls xmlNewInputFromFile() with the SYSTEM identifier (which is mandatory in
+XML).</p>
+
+<p>If you want to hook up a catalog mechanism then you simply need to
+override the default entity loader, here is an example:</p>
+<pre>#include &lt;libxml/xmlIO.h&gt;
+
+xmlExternalEntityLoader defaultLoader = NULL;
+
+xmlParserInputPtr
+xmlMyExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+ const char *fileID = NULL;
+ /* lookup for the fileID depending on ID */
+
+ ret = xmlNewInputFromFile(ctxt, fileID);
+ if (ret != NULL)
+ return(ret);
+ if (defaultLoader != NULL)
+ ret = defaultLoader(URL, ID, ctxt);
+ return(ret);
+}
+
+int main(..) {
+ ...
+
+ /*
+ * Install our own entity loader
+ */
+ defaultLoader = xmlGetExternalEntityLoader();
+ xmlSetExternalEntityLoader(xmlMyExternalEntityLoader);
+
+ ...
+}</pre>
+
+<h3><a name="Example2">Example of customized I/O</a></h3>
+
+<p>This example come from <a href="http://xmlsoft.org/messages/0708.html">a
+real use case</a>, xmlDocDump() closes the FILE * passed by the application
+and this was a problem. The <a
+href="http://xmlsoft.org/messages/0711.html">solution</a> was to redefine a
+new output handler with the closing call deactivated:</p>
+<ol>
+ <li>First define a new I/O output allocator where the output don't close
+ the file:
+ <pre>xmlOutputBufferPtr
+xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
+&nbsp;&nbsp;&nbsp;&nbsp;xmlOutputBufferPtr ret;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;if (xmlOutputCallbackInitialized == 0)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xmlRegisterDefaultOutputCallbacks();
+
+&nbsp;&nbsp;&nbsp;&nbsp;if (file == NULL) return(NULL);
+&nbsp;&nbsp;&nbsp;&nbsp;ret = xmlAllocOutputBuffer(encoder);
+&nbsp;&nbsp;&nbsp;&nbsp;if (ret != NULL) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;context = file;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;writecallback = xmlFileWrite;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret-&gt;closecallback = NULL; /* No close callback */
+&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;return(ret);
+} </pre>
+ </li>
+ <li>And then use it to save the document:
+ <pre>FILE *f;
+xmlOutputBufferPtr output;
+xmlDocPtr doc;
+int res;
+
+f = ...
+doc = ....
+
+output = xmlOutputBufferCreateOwn(f, NULL);
+res = xmlSaveFileTo(output, doc, NULL);
+ </pre>
+ </li>
+</ol>
+
+<h2><a name="Catalog">Catalog support</a></h2>
+
+<p>Table of Content:</p>
+<ol>
+ <li><a href="General2">General overview</a></li>
+ <li><a href="#definition">The definition</a></li>
+ <li><a href="#Simple">Using catalogs</a></li>
+ <li><a href="#Some">Some examples</a></li>
+ <li><a href="#reference">How to tune catalog usage</a></li>
+ <li><a href="#validate">How to debug catalog processing</a></li>
+ <li><a href="#Declaring">How to create and maintain catalogs</a></li>
+ <li><a href="#implemento">The implementor corner quick review of the
+ API</a></li>
+ <li><a href="#Other">Other resources</a></li>
+</ol>
+
+<h3><a name="General2">General overview</a></h3>
+
+<p>What is a catalog? Basically it's a lookup mechanism used when an entity
+(a file or a remote resource) references another entity. The catalog lookup
+is inserted between the moment the reference is recognized by the software
+(XML parser, stylesheet processing, or even images referenced for inclusion
+in a rendering) and the time where loading that resource is actually
+started.</p>
+
+<p>It is basically used for 3 things:</p>
+<ul>
+ <li>mapping from "logical" names, the public identifiers and a more
+ concrete name usable for download (and URI). For example it can associate
+ the logical name
+ <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p>
+ <p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be
+ downloaded</p>
+ <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p>
+ </li>
+ <li>remapping from a given URL to another one, like an HTTP indirection
+ saying that
+ <p>"http://www.oasis-open.org/committes/tr.xsl"</p>
+ <p>should really be looked at</p>
+ <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p>
+ </li>
+ <li>providing a local cache mechanism allowing to load the entities
+ associated to public identifiers or remote resources, this is a really
+ important feature for any significant deployment of XML or SGML since it
+ allows to avoid the aleas and delays associated to fetching remote
+ resources.</li>
+</ul>
+
+<h3><a name="definition">The definitions</a></h3>
+
+<p>Libxml, as of 2.4.3 implements 2 kind of catalogs:</p>
+<ul>
+ <li>the older SGML catalogs, the official spec is SGML Open Technical
+ Resolution TR9401:1997, but is better understood by reading <a
+ href="http://www.jclark.com/sp/catalog.htm">the SP Catalog page</a> from
+ James Clark. This is relatively old and not the preferred mode of
+ operation of libxml.</li>
+ <li><a href="http://www.oasis-open.org/committees/entity/spec.html">XML
+ Catalogs</a> is far more flexible, more recent, uses an XML syntax and
+ should scale quite better. This is the default option of libxml.</li>
+</ul>
+
+<p></p>
+
+<h3><a name="Simple">Using catalog</a></h3>
+
+<p>In a normal environment libxml2 will by default check the presence of a
+catalog in /etc/xml/catalog, and assuming it has been correctly populated,
+the processing is completely transparent to the document user. To take a
+concrete example, suppose you are authoring a DocBook document, this one
+starts with the following DOCTYPE definition:</p>
+<pre>&lt;?xml version='1.0'?&gt;
+&lt;!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN"
+ "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"&gt;</pre>
+
+<p>When validating the document with libxml, the catalog will be
+automatically consulted to lookup the public identifier "-//Norman Walsh//DTD
+DocBk XML V3.1.4//EN" and the system identifier
+"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have
+been installed on your system and the catalogs actually point to them, libxml
+will fetch them from the local disk.</p>
+
+<p style="font-size: 10pt"><strong>Note</strong>: Really don't use this
+DOCTYPE example it's a really old version, but is fine as an example.</p>
+
+<p>Libxml2 will check the catalog each time that it is requested to load an
+entity, this includes DTD, external parsed entities, stylesheets, etc ... If
+your system is correctly configured all the authoring phase and processing
+should use only local files, even if your document stays portable because it
+uses the canonical public and system ID, referencing the remote document.</p>
+
+<h3><a name="Some">Some examples:</a></h3>
+
+<p>Here is a couple of fragments from XML Catalogs used in libxml2 early
+regression tests in <code>test/catalogs</code> :</p>
+<pre>&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC
+ "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
+ &lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
+ uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
+...</pre>
+
+<p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are
+written in XML, there is a specific namespace for catalog elements
+"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this
+catalog is a <code>public</code> mapping it allows to associate a Public
+Identifier with an URI.</p>
+<pre>...
+ &lt;rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/"
+ rewritePrefix="file:///usr/share/xml/docbook/"/&gt;
+...</pre>
+
+<p>A <code>rewriteSystem</code> is a very powerful instruction, it says that
+any URI starting with a given prefix should be looked at another URI
+constructed by replacing the prefix with an new one. In effect this acts like
+a cache system for a full area of the Web. In practice it is extremely useful
+with a file prefix if you have installed a copy of those resources on your
+local system.</p>
+<pre>...
+&lt;delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+&lt;delegateURI uriStartString="http://www.oasis-open.org/docbook/"
+ catalog="file:///usr/share/xml/docbook.xml"/&gt;
+...</pre>
+
+<p>Delegation is the core features which allows to build a tree of catalogs,
+easier to maintain than a single catalog, based on Public Identifier, System
+Identifier or URI prefixes it instructs the catalog software to look up
+entries in another resource. This feature allow to build hierarchies of
+catalogs, the set of entries presented should be sufficient to redirect the
+resolution of all DocBook references to the specific catalog in
+<code>/usr/share/xml/docbook.xml</code> this one in turn could delegate all
+references for DocBook 4.2.1 to a specific catalog installed at the same time
+as the DocBook resources on the local machine.</p>
+
+<h3><a name="reference">How to tune catalog usage:</a></h3>
+
+<p>The user can change the default catalog behaviour by redirecting queries
+to its own set of catalogs, this can be done by setting the
+<code>XML_CATALOG_FILES</code> environment variable to a list of catalogs, an
+empty one should deactivate loading the default <code>/etc/xml/catalog</code>
+default catalog</p>
+
+<h3><a name="validate">How to debug catalog processing:</a></h3>
+
+<p>Setting up the <code>XML_DEBUG_CATALOG</code> environment variable will
+make libxml2 output debugging information for each catalog operations, for
+example:</p>
+<pre>orchis:~/XML -&gt; xmllint --memory --noout test/ent2
+warning: failed to load external entity "title.xml"
+orchis:~/XML -&gt; export XML_DEBUG_CATALOG=
+orchis:~/XML -&gt; xmllint --memory --noout test/ent2
+Failed to parse catalog /etc/xml/catalog
+Failed to parse catalog /etc/xml/catalog
+warning: failed to load external entity "title.xml"
+Catalogs cleanup
+orchis:~/XML -&gt; </pre>
+
+<p>The test/ent2 references an entity, running the parser from memory makes
+the base URI unavailable and the the "title.xml" entity cannot be loaded.
+Setting up the debug environment variable allows to detect that an attempt is
+made to load the <code>/etc/xml/catalog</code> but since it's not present the
+resolution fails.</p>
+
+<p>But the most advanced way to debug XML catalog processing is to use the
+<strong>xmlcatalog</strong> command shipped with libxml2, it allows to load
+catalogs and make resolution queries to see what is going on. This is also
+used for the regression tests:</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+orchis:~/XML -&gt; </pre>
+
+<p>For debugging what is going on, adding one -v flags increase the verbosity
+level to indicate the processing done (adding a second flag also indicate
+what elements are recognized at parsing):</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog -v test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+Parsing catalog test/catalogs/docbook.xml's content
+Found public match -//OASIS//DTD DocBook XML V4.1.2//EN
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+Catalogs cleanup
+orchis:~/XML -&gt; </pre>
+
+<p>A shell interface is also available to debug and process multiple queries
+(and for regression tests):</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog -shell test/catalogs/docbook.xml \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN"
+&gt; help
+Commands available:
+public PublicID: make a PUBLIC identifier lookup
+system SystemID: make a SYSTEM identifier lookup
+resolve PublicID SystemID: do a full resolver lookup
+add 'type' 'orig' 'replace' : add an entry
+del 'values' : remove values
+dump: print the current catalog state
+debug: increase the verbosity level
+quiet: decrease the verbosity level
+exit: quit the shell
+&gt; public "-//OASIS//DTD DocBook XML V4.1.2//EN"
+http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
+&gt; quit
+orchis:~/XML -&gt; </pre>
+
+<p>This should be sufficient for most debugging purpose, this was actually
+used heavily to debug the XML Catalog implementation itself.</p>
+
+<h3><a name="Declaring">How to create and maintain</a> catalogs:</h3>
+
+<p>Basically XML Catalogs are XML files, you can either use XML tools to
+manage them or use <strong>xmlcatalog</strong> for this. The basic step is
+to create a catalog the -create option provide this facility:</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog --create tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
+orchis:~/XML -&gt; </pre>
+
+<p>By default xmlcatalog does not overwrite the original catalog and save the
+result on the standard output, this can be overridden using the -noout
+option. The <code>-add</code> command allows to add entries in the
+catalog:</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog --noout --create --add "public" \
+ "-//OASIS//DTD DocBook XML V4.1.2//EN" \
+ http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml
+orchis:~/XML -&gt; cat tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt;
+&lt;public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN"
+ uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/&gt;
+&lt;/catalog&gt;
+orchis:~/XML -&gt; </pre>
+
+<p>The <code>-add</code> option will always take 3 parameters even if some of
+the XML Catalog constructs (like nextCatalog) will have only a single
+argument, just pass a third empty string, it will be ignored.</p>
+
+<p>Similarly the <code>-del</code> option remove matching entries from the
+catalog:</p>
+<pre>orchis:~/XML -&gt; ./xmlcatalog --del \
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml
+&lt;?xml version="1.0"?&gt;
+&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
+&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/&gt;
+orchis:~/XML -&gt; </pre>
+
+<p>The catalog is now empty. Note that the matching of <code>-del</code> is
+exact and would have worked in a similar fashion with the Public ID
+string.</p>
+
+<p>This is rudimentary but should be sufficient to manage a not too complex
+catalog tree of resources.</p>
+
+<h3><a name="implemento">The implementor corner quick review of the
+API:</a></h3>
+
+<p>First, and like for every other module of libxml, there is an
+automatically generated <a href="html/libxml-catalog.html">API page for
+catalog support</a>.</p>
+
+<p>The header for the catalog interfaces should be included as:</p>
+<pre>#include &lt;libxml/catalog.h&gt;</pre>
+
+<p>The API is voluntarily kept very simple. First it is not obvious that
+applications really need access to it since it is the default behaviour of
+libxml2 (Note: it is possible to completely override libxml2 default catalog
+by using <a href="html/libxml-parser.html">xmlSetExternalEntityLoader</a> to
+plug an application specific resolver).</p>
+
+<p>Basically libxml2 support 2 catalog lists:</p>
+<ul>
+ <li>the default one, global shared by all the application</li>
+ <li>a per-document catalog, this one is built if the document uses the
+ <code>oasis-xml-catalog</code> PIs to specify its own catalog list, it is
+ associated to the parser context and destroyed when the parsing context
+ is destroyed.</li>
+</ul>
+
+<p>the document one will be used first if it exists.</p>
+
+<h4>Initialization routines:</h4>
+
+<p>xmlInitializeCatalog(), xmlLoadCatalog() and xmlLoadCatalogs() should be
+used at startup to initialize the catalog, if the catalog should be
+initialized with specific values xmlLoadCatalog() or xmlLoadCatalogs()
+should be called before xmlInitializeCatalog() which would otherwise do a
+default initialization first.</p>
+
+<p>The xmlCatalogAddLocal() call is used by the parser to grow the document
+own catalog list if needed.</p>
+
+<h4>Preferences setup:</h4>
+
+<p>The XML Catalog spec requires the possibility to select default
+preferences between public and system delegation,
+xmlCatalogSetDefaultPrefer() allows this, xmlCatalogSetDefaults() and
+xmlCatalogGetDefaults() allow to control if XML Catalogs resolution should
+be forbidden, allowed for global catalog, for document catalog or both, the
+default is to allow both.</p>
+
+<p>And of course xmlCatalogSetDebug() allows to generate debug messages
+(through the xmlGenericError() mechanism).</p>
+
+<h4>Querying routines:</h4>
+
+<p>xmlCatalogResolve(), xmlCatalogResolveSystem(), xmlCatalogResolvePublic()
+and xmlCatalogResolveURI() are relatively explicit if you read the XML
+Catalog specification they correspond to section 7 algorithms, they should
+also work if you have loaded an SGML catalog with a simplified semantic.</p>
+
+<p>xmlCatalogLocalResolve() and xmlCatalogLocalResolveURI() are the same but
+operate on the document catalog list</p>
+
+<h4>Cleanup and Miscellaneous:</h4>
+
+<p>xmlCatalogCleanup() free-up the global catalog, xmlCatalogFreeLocal() is
+the per-document equivalent.</p>
+
+<p>xmlCatalogAdd() and xmlCatalogRemove() are used to dynamically modify the
+first catalog in the global list, and xmlCatalogDump() allows to dump a
+catalog state, those routines are primarily designed for xmlcatalog, I'm not
+sure that exposing more complex interfaces (like navigation ones) would be
+really useful.</p>
+
+<p>The xmlParseCatalogFile() is a function used to load XML Catalog files,
+it's similar as xmlParseFile() except it bypass all catalog lookups, it's
+provided because this functionality may be useful for client tools.</p>
+
+<h4>threaded environments:</h4>
+
+<p>Since the catalog tree is built progressively, some care has been taken to
+try to avoid troubles in multithreaded environments. The code is now thread
+safe assuming that the libxml2 library has been compiled with threads
+support.</p>
+
+<p></p>
+
+<h3><a name="Other">Other resources</a></h3>
+
+<p>The XML Catalog specification is relatively recent so there isn't much
+literature to point at:</p>
+<ul>
+ <li>You can find a good rant from Norm Walsh about <a
+ href="http://www.arbortext.com/Think_Tank/XML_Resources/Issue_Three/issue_three.html">the
+ need for catalogs</a>, it provides a lot of context information even if
+ I don't agree with everything presented. Norm also wrote a more recent
+ article <a
+ href="http://wwws.sun.com/software/xml/developers/resolver/article/">XML
+ entities and URI resolvers</a> describing them.</li>
+ <li>An <a href="http://home.ccil.org/~cowan/XML/XCatalog.html">old XML
+ catalog proposal</a> from John Cowan</li>
+ <li>The <a href="http://www.rddl.org/">Resource Directory Description
+ Language</a> (RDDL) another catalog system but more oriented toward
+ providing metadata for XML namespaces.</li>
+ <li>the page from the OASIS Technical <a
+ href="http://www.oasis-open.org/committees/entity/">Committee on Entity
+ Resolution</a> who maintains XML Catalog, you will find pointers to the
+ specification update, some background and pointers to others tools
+ providing XML Catalog support</li>
+ <li>There is a <a href="buildDocBookCatalog">shell script</a> to generate
+ XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/
+ directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
+ the resources found on the system. Otherwise it will just create
+ ~/xmlcatalog and ~/dbkxmlcatalog and doing:
+ <p><code>export XML_CATALOG_FILES=$HOME/xmlcatalog</code></p>
+ <p>should allow to process DocBook documentations without requiring
+ network accesses for the DTD or stylesheets</p>
+ </li>
+ <li>I have uploaded <a href="ftp://xmlsoft.org/libxml2/test/dbk412catalog.tar.gz">a
+ small tarball</a> containing XML Catalogs for DocBook 4.1.2 which seems
+ to work fine for me too</li>
+ <li>The <a href="http://www.xmlsoft.org/xmlcatalog_man.html">xmlcatalog
+ manual page</a></li>
+</ul>
+
+<p>If you have suggestions for corrections or additions, simply contact
+me:</p>
+
+<h2><a name="library">The parser interfaces</a></h2>
+
+<p>This section is directly intended to help programmers getting bootstrapped
+using the XML tollkit from the C language. It is not intended to be
+extensive. I hope the automatically generated documents will provide the
+completeness required, but as a separate set of documents. The interfaces of
+the XML parser are by principle low level, Those interested in a higher level
+API should <a href="#DOM">look at DOM</a>.</p>
+
+<p>The <a href="html/libxml-parser.html">parser interfaces for XML</a> are
+separated from the <a href="html/libxml-htmlparser.html">HTML parser
+interfaces</a>. Let's have a look at how the XML parser can be called:</p>
+
+<h3><a name="Invoking">Invoking the parser : the pull method</a></h3>
+
+<p>Usually, the first thing to do is to read an XML input. The parser accepts
+documents either from in-memory strings or from files. The functions are
+defined in "parser.h":</p>
+<dl>
+ <dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt>
+ <dd><p>Parse a null-terminated string containing the document.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt>
+ <dd><p>Parse an XML document contained in a (possibly compressed)
+ file.</p>
+ </dd>
+</dl>
+
+<p>The parser returns a pointer to the document structure (or NULL in case of
+failure).</p>
+
+<h3 id="Invoking1">Invoking the parser: the push method</h3>
+
+<p>In order for the application to keep the control when the document is
+being fetched (which is common for GUI based programs) libxml2 provides a
+push interface, too, as of version 1.8.3. Here are the interface
+functions:</p>
+<pre>xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+int xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);</pre>
+
+<p>and here is a simple example showing how to use the interface:</p>
+<pre> FILE *f;
+
+ f = fopen(filename, "r");
+ if (f != NULL) {
+ int res, size = 1024;
+ char chars[1024];
+ xmlParserCtxtPtr ctxt;
+
+ res = fread(chars, 1, 4, f);
+ if (res &gt; 0) {
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename);
+ while ((res = fread(chars, 1, size, f)) &gt; 0) {
+ xmlParseChunk(ctxt, chars, res, 0);
+ }
+ xmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt-&gt;myDoc;
+ xmlFreeParserCtxt(ctxt);
+ }
+ }</pre>
+
+<p>The HTML parser embedded into libxml2 also has a push interface; the
+functions are just prefixed by "html" rather than "xml".</p>
+
+<h3 id="Invoking2">Invoking the parser: the SAX interface</h3>
+
+<p>The tree-building interface makes the parser memory-hungry, first loading
+the document in memory and then building the tree itself. Reading a document
+without building the tree is possible using the SAX interfaces (see SAX.h and
+<a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James
+Henstridge's documentation</a>). Note also that the push interface can be
+limited to SAX: just use the two first arguments of
+<code>xmlCreatePushParserCtxt()</code>.</p>
+
+<h3><a name="Building">Building a tree from scratch</a></h3>
+
+<p>The other way to get an XML tree in memory is by building it. Basically
+there is a set of functions dedicated to building new elements. (These are
+also described in &lt;libxml/tree.h&gt;.) For example, here is a piece of
+code that produces the XML document used in the previous examples:</p>
+<pre> #include &lt;libxml/tree.h&gt;
+ xmlDocPtr doc;
+ xmlNodePtr tree, subtree;
+
+ doc = xmlNewDoc("1.0");
+ doc-&gt;children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL);
+ xmlSetProp(doc-&gt;children, "prop1", "gnome is great");
+ xmlSetProp(doc-&gt;children, "prop2", "&amp; linux too");
+ tree = xmlNewChild(doc-&gt;children, NULL, "head", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome");
+ tree = xmlNewChild(doc-&gt;children, NULL, "chapter", NULL);
+ subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure");
+ subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ...");
+ subtree = xmlNewChild(tree, NULL, "image", NULL);
+ xmlSetProp(subtree, "href", "linus.gif");</pre>
+
+<p>Not really rocket science ...</p>
+
+<h3><a name="Traversing">Traversing the tree</a></h3>
+
+<p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your
+code has access to the internal structure of all the elements of the tree.
+The names should be somewhat simple like <strong>parent</strong>,
+<strong>children</strong>, <strong>next</strong>, <strong>prev</strong>,
+<strong>properties</strong>, etc... For example, still with the previous
+example:</p>
+<pre><code>doc-&gt;children-&gt;children-&gt;children</code></pre>
+
+<p>points to the title element,</p>
+<pre>doc-&gt;children-&gt;children-&gt;next-&gt;children-&gt;children</pre>
+
+<p>points to the text node containing the chapter title "The Linux
+adventure".</p>
+
+<p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be
+present before the document root, so <code>doc-&gt;children</code> may point
+to an element which is not the document Root Element; a function
+<code>xmlDocGetRootElement()</code> was added for this purpose.</p>
+
+<h3><a name="Modifying">Modifying the tree</a></h3>
+
+<p>Functions are provided for reading and writing the document content. Here
+is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p>
+<dl>
+ <dt><code>xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const
+ xmlChar *value);</code></dt>
+ <dd><p>This sets (or changes) an attribute carried by an ELEMENT node.
+ The value can be NULL.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>const xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar
+ *name);</code></dt>
+ <dd><p>This function returns a pointer to new copy of the property
+ content. Note that the user must deallocate the result.</p>
+ </dd>
+</dl>
+
+<p>Two functions are provided for reading and writing the text associated
+with elements:</p>
+<dl>
+ <dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
+ *value);</code></dt>
+ <dd><p>This function takes an "external" string and converts it to one
+ text node or possibly to a list of entity and text nodes. All
+ non-predefined entity references like &amp;Gnome; will be stored
+ internally as entity nodes, hence the result of the function may not be
+ a single node.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>xmlChar *xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int
+ inLine);</code></dt>
+ <dd><p>This function is the inverse of
+ <code>xmlStringGetNodeList()</code>. It generates a new string
+ containing the content of the text and entity nodes. Note the extra
+ argument inLine. If this argument is set to 1, the function will expand
+ entity references. For example, instead of returning the &amp;Gnome;
+ XML encoding in the string, it will substitute it with its value (say,
+ "GNU Network Object Model Environment").</p>
+ </dd>
+</dl>
+
+<h3><a name="Saving">Saving a tree</a></h3>
+
+<p>Basically 3 options are possible:</p>
+<dl>
+ <dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int
+ *size);</code></dt>
+ <dd><p>Returns a buffer into which the document has been saved.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>extern void xmlDocDump(FILE *f, xmlDocPtr doc);</code></dt>
+ <dd><p>Dumps a document to an open file descriptor.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>int xmlSaveFile(const char *filename, xmlDocPtr cur);</code></dt>
+ <dd><p>Saves the document to a file. In this case, the compression
+ interface is triggered if it has been turned on.</p>
+ </dd>
+</dl>
+
+<h3><a name="Compressio">Compression</a></h3>
+
+<p>The library transparently handles compression when doing file-based
+accesses. The level of compression on saves can be turned on either globally
+or individually for one file:</p>
+<dl>
+ <dt><code>int xmlGetDocCompressMode (xmlDocPtr doc);</code></dt>
+ <dd><p>Gets the document compression ratio (0-9).</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>void xmlSetDocCompressMode (xmlDocPtr doc, int mode);</code></dt>
+ <dd><p>Sets the document compression ratio.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>int xmlGetCompressMode(void);</code></dt>
+ <dd><p>Gets the default compression ratio.</p>
+ </dd>
+</dl>
+<dl>
+ <dt><code>void xmlSetCompressMode(int mode);</code></dt>
+ <dd><p>Sets the default compression ratio.</p>
+ </dd>
+</dl>
+
+<h2><a name="Entities">Entities or no entities</a></h2>
+
+<p>Entities in principle are similar to simple C macros. An entity defines an
+abbreviation for a given string that you can reuse many times throughout the
+content of your document. Entities are especially useful when a given string
+may occur frequently within a document, or to confine the change needed to a
+document to a restricted area in the internal subset of the document (at the
+beginning). Example:</p>
+<pre>1 &lt;?xml version="1.0"?&gt;
+2 &lt;!DOCTYPE EXAMPLE SYSTEM "example.dtd" [
+3 &lt;!ENTITY xml "Extensible Markup Language"&gt;
+4 ]&gt;
+5 &lt;EXAMPLE&gt;
+6 &amp;xml;
+7 &lt;/EXAMPLE&gt;</pre>
+
+<p>Line 3 declares the xml entity. Line 6 uses the xml entity, by prefixing
+its name with '&amp;' and following it by ';' without any spaces added. There
+are 5 predefined entities in libxml2 allowing you to escape characters with
+predefined meaning in some parts of the xml document content:
+<strong>&amp;lt;</strong> for the character '&lt;', <strong>&amp;gt;</strong>
+for the character '&gt;', <strong>&amp;apos;</strong> for the character ''',
+<strong>&amp;quot;</strong> for the character '"', and
+<strong>&amp;amp;</strong> for the character '&amp;'.</p>
+
+<p>One of the problems related to entities is that you may want the parser to
+substitute an entity's content so that you can see the replacement text in
+your application. Or you may prefer to keep entity references as such in the
+content to be able to save the document back without losing this usually
+precious information (if the user went through the pain of explicitly
+defining entities, he may have a a rather negative attitude if you blindly
+substitute them as saving time). The <a
+href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault()</a>
+function allows you to check and change the behaviour, which is to not
+substitute entities by default.</p>
+
+<p>Here is the DOM tree built by libxml2 for the previous document in the
+default case:</p>
+<pre>/gnome/src/gnome-xml -&gt; ./xmllint --debug test/ent1
+DOCUMENT
+version=1.0
+ ELEMENT EXAMPLE
+ TEXT
+ content=
+ ENTITY_REF
+ INTERNAL_GENERAL_ENTITY xml
+ content=Extensible Markup Language
+ TEXT
+ content=</pre>
+
+<p>And here is the result when substituting entities:</p>
+<pre>/gnome/src/gnome-xml -&gt; ./tester --debug --noent test/ent1
+DOCUMENT
+version=1.0
+ ELEMENT EXAMPLE
+ TEXT
+ content= Extensible Markup Language</pre>
+
+<p>So, entities or no entities? Basically, it depends on your use case. I
+suggest that you keep the non-substituting default behaviour and avoid using
+entities in your XML document or data if you are not willing to handle the
+entity references elements in the DOM tree.</p>
+
+<p>Note that at save time libxml2 enforces the conversion of the predefined
+entities where necessary to prevent well-formedness problems, and will also
+transparently replace those with chars (i.e. it will not generate entity
+reference elements in the DOM tree or call the reference() SAX callback when
+finding them in the input).</p>
+
+<p><span style="background-color: #FF0000">WARNING</span>: handling entities
+on top of the libxml2 SAX interface is difficult!!! If you plan to use
+non-predefined entities in your documents, then the learning curve to handle
+then using the SAX API may be long. If you plan to use complex documents, I
+strongly suggest you consider using the DOM interface instead and let libxml
+deal with the complexity rather than trying to do it yourself.</p>
+
+<h2><a name="Namespaces">Namespaces</a></h2>
+
+<p>The libxml2 library implements <a
+href="http://www.w3.org/TR/REC-xml-names/">XML namespaces</a> support by
+recognizing namespace constructs in the input, and does namespace lookup
+automatically when building the DOM tree. A namespace declaration is
+associated with an in-memory structure and all elements or attributes within
+that namespace point to it. Hence testing the namespace is a simple and fast
+equality operation at the user level.</p>
+
+<p>I suggest that people using libxml2 use a namespace, and declare it in the
+root element of their document as the default namespace. Then they don't need
+to use the prefix in the content but we will have a basis for future semantic
+refinement and merging of data from different sources. This doesn't increase
+the size of the XML output significantly, but significantly increases its
+value in the long-term. Example:</p>
+<pre>&lt;mydoc xmlns="http://mydoc.example.org/schemas/"&gt;
+ &lt;elem1&gt;...&lt;/elem1&gt;
+ &lt;elem2&gt;...&lt;/elem2&gt;
+&lt;/mydoc&gt;</pre>
+
+<p>The namespace value has to be an absolute URL, but the URL doesn't have to
+point to any existing resource on the Web. It will bind all the element and
+attributes with that URL. I suggest to use an URL within a domain you
+control, and that the URL should contain some kind of version information if
+possible. For example, <code>"http://www.gnome.org/gnumeric/1.0/"</code> is a
+good namespace scheme.</p>
+
+<p>Then when you load a file, make sure that a namespace carrying the
+version-independent prefix is installed on the root element of your document,
+and if the version information don't match something you know, warn the user
+and be liberal in what you accept as the input. Also do *not* try to base
+namespace checking on the prefix value. &lt;foo:text&gt; may be exactly the
+same as &lt;bar:text&gt; in another document. What really matters is the URI
+associated with the element or the attribute, not the prefix string (which is
+just a shortcut for the full URI). In libxml, element and attributes have an
+<code>ns</code> field pointing to an xmlNs structure detailing the namespace
+prefix and its URI.</p>
+
+<p>@@Interfaces@@</p>
+<pre>xmlNodePtr node;
+if(!strncmp(node-&gt;name,"mytag",5)
+ &amp;&amp; node-&gt;ns
+ &amp;&amp; !strcmp(node-&gt;ns-&gt;href,"http://www.mysite.com/myns/1.0")) {
+ ...
+}</pre>
+
+<p>Usually people object to using namespaces together with validity checking.
+I will try to make sure that using namespaces won't break validity checking,
+so even if you plan to use or currently are using validation I strongly
+suggest adding namespaces to your document. A default namespace scheme
+<code>xmlns="http://...."</code> should not break validity even on less
+flexible parsers. Using namespaces to mix and differentiate content coming
+from multiple DTDs will certainly break current validation schemes. To check
+such documents one needs to use schema-validation, which is supported in
+libxml2 as well. See <a href="http://www.relaxng.org/">relagx-ng</a> and <a
+href="http://www.w3c.org/XML/Schema">w3c-schema</a>.</p>
+
+<h2><a name="Upgrading">Upgrading 1.x code</a></h2>
+
+<p>Incompatible changes:</p>
+
+<p>Version 2 of libxml2 is the first version introducing serious backward
+incompatible changes. The main goals were:</p>
+<ul>
+ <li>a general cleanup. A number of mistakes inherited from the very early
+ versions couldn't be changed due to compatibility constraints. Example
+ the "childs" element in the nodes.</li>
+ <li>Uniformization of the various nodes, at least for their header and link
+ parts (doc, parent, children, prev, next), the goal is a simpler
+ programming model and simplifying the task of the DOM implementors.</li>
+ <li>better conformances to the XML specification, for example version 1.x
+ had an heuristic to try to detect ignorable white spaces. As a result the
+ SAX event generated were ignorableWhitespace() while the spec requires
+ character() in that case. This also mean that a number of DOM node
+ containing blank text may populate the DOM tree which were not present
+ before.</li>
+</ul>
+
+<h3>How to fix libxml-1.x code:</h3>
+
+<p>So client code of libxml designed to run with version 1.x may have to be
+changed to compile against version 2.x of libxml. Here is a list of changes
+that I have collected, they may not be sufficient, so in case you find other
+change which are required, <a href="mailto:Daniel.Veillard@w3.org">drop me a
+mail</a>:</p>
+<ol>
+ <li>The package name have changed from libxml to libxml2, the library name
+ is now -lxml2 . There is a new xml2-config script which should be used to
+ select the right parameters libxml2</li>
+ <li>Node <strong>childs</strong> field has been renamed
+ <strong>children</strong> so s/childs/children/g should be applied
+ (probability of having "childs" anywhere else is close to 0+</li>
+ <li>The document don't have anymore a <strong>root</strong> element it has
+ been replaced by <strong>children</strong> and usually you will get a
+ list of element here. For example a Dtd element for the internal subset
+ and it's declaration may be found in that list, as well as processing
+ instructions or comments found before or after the document root element.
+ Use <strong>xmlDocGetRootElement(doc)</strong> to get the root element of
+ a document. Alternatively if you are sure to not reference DTDs nor have
+ PIs or comments before or after the root element
+ s/-&gt;root/-&gt;children/g will probably do it.</li>
+ <li>The white space issue, this one is more complex, unless special case of
+ validating parsing, the line breaks and spaces usually used for indenting
+ and formatting the document content becomes significant. So they are
+ reported by SAX and if your using the DOM tree, corresponding nodes are
+ generated. Too approach can be taken:
+ <ol>
+ <li>lazy one, use the compatibility call
+ <strong>xmlKeepBlanksDefault(0)</strong> but be aware that you are
+ relying on a special (and possibly broken) set of heuristics of
+ libxml to detect ignorable blanks. Don't complain if it breaks or
+ make your application not 100% clean w.r.t. to it's input.</li>
+ <li>the Right Way: change you code to accept possibly insignificant
+ blanks characters, or have your tree populated with weird blank text
+ nodes. You can spot them using the commodity function
+ <strong>xmlIsBlankNode(node)</strong> returning 1 for such blank
+ nodes.</li>
+ </ol>
+ <p>Note also that with the new default the output functions don't add any
+ extra indentation when saving a tree in order to be able to round trip
+ (read and save) without inflating the document with extra formatting
+ chars.</p>
+ </li>
+ <li>The include path has changed to $prefix/libxml/ and the includes
+ themselves uses this new prefix in includes instructions... If you are
+ using (as expected) the
+ <pre>xml2-config --cflags</pre>
+ <p>output to generate you compile commands this will probably work out of
+ the box</p>
+ </li>
+ <li>xmlDetectCharEncoding takes an extra argument indicating the length in
+ byte of the head of the document available for character detection.</li>
+</ol>
+
+<h3>Ensuring both libxml-1.x and libxml-2.x compatibility</h3>
+
+<p>Two new version of libxml (1.8.11) and libxml2 (2.3.4) have been released
+to allow smooth upgrade of existing libxml v1code while retaining
+compatibility. They offers the following:</p>
+<ol>
+ <li>similar include naming, one should use
+ <strong>#include&lt;libxml/...&gt;</strong> in both cases.</li>
+ <li>similar identifiers defined via macros for the child and root fields:
+ respectively <strong>xmlChildrenNode</strong> and
+ <strong>xmlRootNode</strong></li>
+ <li>a new macro <strong>LIBXML_TEST_VERSION</strong> which should be
+ inserted once in the client code</li>
+</ol>
+
+<p>So the roadmap to upgrade your existing libxml applications is the
+following:</p>
+<ol>
+ <li>install the libxml-1.8.8 (and libxml-devel-1.8.8) packages</li>
+ <li>find all occurrences where the xmlDoc <strong>root</strong> field is
+ used and change it to <strong>xmlRootNode</strong></li>
+ <li>similarly find all occurrences where the xmlNode
+ <strong>childs</strong> field is used and change it to
+ <strong>xmlChildrenNode</strong></li>
+ <li>add a <strong>LIBXML_TEST_VERSION</strong> macro somewhere in your
+ <strong>main()</strong> or in the library init entry point</li>
+ <li>Recompile, check compatibility, it should still work</li>
+ <li>Change your configure script to look first for xml2-config and fall
+ back using xml-config . Use the --cflags and --libs output of the command
+ as the Include and Linking parameters needed to use libxml.</li>
+ <li>install libxml2-2.3.x and libxml2-devel-2.3.x (libxml-1.8.y and
+ libxml-devel-1.8.y can be kept simultaneously)</li>
+ <li>remove your config.cache, relaunch your configuration mechanism, and
+ recompile, if steps 2 and 3 were done right it should compile as-is</li>
+ <li>Test that your application is still running correctly, if not this may
+ be due to extra empty nodes due to formating spaces being kept in libxml2
+ contrary to libxml1, in that case insert xmlKeepBlanksDefault(1) in your
+ code before calling the parser (next to
+ <strong>LIBXML_TEST_VERSION</strong> is a fine place).</li>
+</ol>
+
+<p>Following those steps should work. It worked for some of my own code.</p>
+
+<p>Let me put some emphasis on the fact that there is far more changes from
+libxml 1.x to 2.x than the ones you may have to patch for. The overall code
+has been considerably cleaned up and the conformance to the XML specification
+has been drastically improved too. Don't take those changes as an excuse to
+not upgrade, it may cost a lot on the long term ...</p>
+
+<h2><a name="Thread">Thread safety</a></h2>
+
+<p>Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent
+threads can safely work in parallel parsing different documents. There is
+however a couple of things to do to ensure it:</p>
+<ul>
+ <li>configure the library accordingly using the --with-threads options</li>
+ <li>call xmlInitParser() in the "main" thread before using any of the
+ libxml2 API (except possibly selecting a different memory allocator)</li>
+</ul>
+
+<p>Note that the thread safety cannot be ensured for multiple threads sharing
+the same document, the locking must be done at the application level, libxml
+exports a basic mutex and reentrant mutexes API in &lt;libxml/threads.h&gt;.
+The parts of the library checked for thread safety are:</p>
+<ul>
+ <li>concurrent loading</li>
+ <li>file access resolution</li>
+ <li>catalog access</li>
+ <li>catalog building</li>
+ <li>entities lookup/accesses</li>
+ <li>validation</li>
+ <li>global variables per-thread override</li>
+ <li>memory handling</li>
+</ul>
+
+<p>XPath has been tested for threaded usage on non-modified document
+ for example when using libxslt, but make 100% sure the documents
+ are accessed read-only !</p>
+
+<h2><a name="DOM"></a><a name="Principles">DOM Principles</a></h2>
+
+<p><a href="http://www.w3.org/DOM/">DOM</a> stands for the <em>Document
+Object Model</em>; this is an API for accessing XML or HTML structured
+documents. Native support for DOM in Gnome is on the way (module gnome-dom),
+and will be based on gnome-xml. This will be a far cleaner interface to
+manipulate XML files within Gnome since it won't expose the internal
+structure.</p>
+
+<p>The current DOM implementation on top of libxml2 is the <a
+href="http://svn.gnome.org/viewvc/gdome2/trunk/">gdome2 Gnome module</a>, this
+is a full DOM interface, thanks to Paolo Casarini, check the <a
+href="http://gdome2.cs.unibo.it/">Gdome2 homepage</a> for more
+information.</p>
+
+<h2><a name="Example"></a><a name="real">A real example</a></h2>
+
+<p>Here is a real size example, where the actual content of the application
+data is not kept in the DOM tree but uses internal structures. It is based on
+a proposal to keep a database of jobs related to Gnome, with an XML based
+storage structure. Here is an <a href="gjobs.xml">XML encoded jobs
+base</a>:</p>
+<pre>&lt;?xml version="1.0"?&gt;
+&lt;gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"&gt;
+ &lt;gjob:Jobs&gt;
+
+ &lt;gjob:Job&gt;
+ &lt;gjob:Project ID="3"/&gt;
+ &lt;gjob:Application&gt;GBackup&lt;/gjob:Application&gt;
+ &lt;gjob:Category&gt;Development&lt;/gjob:Category&gt;
+
+ &lt;gjob:Update&gt;
+ &lt;gjob:Status&gt;Open&lt;/gjob:Status&gt;
+ &lt;gjob:Modified&gt;Mon, 07 Jun 1999 20:27:45 -0400 MET DST&lt;/gjob:Modified&gt;
+ &lt;gjob:Salary&gt;USD 0.00&lt;/gjob:Salary&gt;
+ &lt;/gjob:Update&gt;
+
+ &lt;gjob:Developers&gt;
+ &lt;gjob:Developer&gt;
+ &lt;/gjob:Developer&gt;
+ &lt;/gjob:Developers&gt;
+
+ &lt;gjob:Contact&gt;
+ &lt;gjob:Person&gt;Nathan Clemons&lt;/gjob:Person&gt;
+ &lt;gjob:Email&gt;nathan@windsofstorm.net&lt;/gjob:Email&gt;
+ &lt;gjob:Company&gt;
+ &lt;/gjob:Company&gt;
+ &lt;gjob:Organisation&gt;
+ &lt;/gjob:Organisation&gt;
+ &lt;gjob:Webpage&gt;
+ &lt;/gjob:Webpage&gt;
+ &lt;gjob:Snailmail&gt;
+ &lt;/gjob:Snailmail&gt;
+ &lt;gjob:Phone&gt;
+ &lt;/gjob:Phone&gt;
+ &lt;/gjob:Contact&gt;
+
+ &lt;gjob:Requirements&gt;
+ The program should be released as free software, under the GPL.
+ &lt;/gjob:Requirements&gt;
+
+ &lt;gjob:Skills&gt;
+ &lt;/gjob:Skills&gt;
+
+ &lt;gjob:Details&gt;
+ A GNOME based system that will allow a superuser to configure
+ compressed and uncompressed files and/or file systems to be backed
+ up with a supported media in the system. This should be able to
+ perform via find commands generating a list of files that are passed
+ to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine
+ or via operations performed on the filesystem itself. Email
+ notification and GUI status display very important.
+ &lt;/gjob:Details&gt;
+
+ &lt;/gjob:Job&gt;
+
+ &lt;/gjob:Jobs&gt;
+&lt;/gjob:Helping&gt;</pre>
+
+<p>While loading the XML file into an internal DOM tree is a matter of
+calling only a couple of functions, browsing the tree to gather the data and
+generate the internal structures is harder, and more error prone.</p>
+
+<p>The suggested principle is to be tolerant with respect to the input
+structure. For example, the ordering of the attributes is not significant,
+the XML specification is clear about it. It's also usually a good idea not to
+depend on the order of the children of a given node, unless it really makes
+things harder. Here is some code to parse the information for a person:</p>
+<pre>/*
+ * A person record
+ */
+typedef struct person {
+ char *name;
+ char *email;
+ char *company;
+ char *organisation;
+ char *smail;
+ char *webPage;
+ char *phone;
+} person, *personPtr;
+
+/*
+ * And the code needed to parse it
+ */
+personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ personPtr ret = NULL;
+
+DEBUG("parsePerson\n");
+ /*
+ * allocate the struct
+ */
+ ret = (personPtr) malloc(sizeof(person));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(person));
+
+ /* We don't care what the top level element name is */
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!strcmp(cur-&gt;name, "Person")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;name = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Email")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;email = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ cur = cur-&gt;next;
+ }
+
+ return(ret);
+}</pre>
+
+<p>Here are a couple of things to notice:</p>
+<ul>
+ <li>Usually a recursive parsing style is the more convenient one: XML data
+ is by nature subject to repetitive constructs and usually exhibits highly
+ structured patterns.</li>
+ <li>The two arguments of type <em>xmlDocPtr</em> and <em>xmlNsPtr</em>,
+ i.e. the pointer to the global XML document and the namespace reserved to
+ the application. Document wide information are needed for example to
+ decode entities and it's a good coding practice to define a namespace for
+ your application set of data and test that the element and attributes
+ you're analyzing actually pertains to your application space. This is
+ done by a simple equality test (cur-&gt;ns == ns).</li>
+ <li>To retrieve text and attributes value, you can use the function
+ <em>xmlNodeListGetString</em> to gather all the text and entity reference
+ nodes generated by the DOM output and produce an single text string.</li>
+</ul>
+
+<p>Here is another piece of code used to parse another level of the
+structure:</p>
+<pre>#include &lt;libxml/tree.h&gt;
+/*
+ * a Description for a Job
+ */
+typedef struct job {
+ char *projectID;
+ char *application;
+ char *category;
+ personPtr contact;
+ int nbDevelopers;
+ personPtr developers[100]; /* using dynamic alloc is left as an exercise */
+} job, *jobPtr;
+
+/*
+ * And the code needed to parse it
+ */
+jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ jobPtr ret = NULL;
+
+DEBUG("parseJob\n");
+ /*
+ * allocate the struct
+ */
+ ret = (jobPtr) malloc(sizeof(job));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(job));
+
+ /* We don't care what the top level element name is */
+ cur = cur-&gt;xmlChildrenNode;
+ while (cur != NULL) {
+
+ if ((!strcmp(cur-&gt;name, "Project")) &amp;&amp; (cur-&gt;ns == ns)) {
+ ret-&gt;projectID = xmlGetProp(cur, "ID");
+ if (ret-&gt;projectID == NULL) {
+ fprintf(stderr, "Project has no ID\n");
+ }
+ }
+ if ((!strcmp(cur-&gt;name, "Application")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;application = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Category")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;category = xmlNodeListGetString(doc, cur-&gt;xmlChildrenNode, 1);
+ if ((!strcmp(cur-&gt;name, "Contact")) &amp;&amp; (cur-&gt;ns == ns))
+ ret-&gt;contact = parsePerson(doc, ns, cur);
+ cur = cur-&gt;next;
+ }
+
+ return(ret);
+}</pre>
+
+<p>Once you are used to it, writing this kind of code is quite simple, but
+boring. Ultimately, it could be possible to write stubbers taking either C
+data structure definitions, a set of XML examples or an XML DTD and produce
+the code needed to import and export the content between C data and XML
+storage. This is left as an exercise to the reader :-)</p>
+
+<p>Feel free to use <a href="example/gjobread.c">the code for the full C
+parsing example</a> as a template, it is also available with Makefile in the
+Gnome SVN base under libxml2/example</p>
+
+<h2><a name="Contributi">Contributions</a></h2>
+<ul>
+ <li>Bjorn Reese, William Brack and Thomas Broyer have provided a number of
+ patches, Gary Pennington worked on the validation API, threading support
+ and Solaris port.</li>
+ <li>John Fleck helps maintaining the documentation and man pages.</li>
+ <li><a href="mailto:igor@zlatkovic.com">Igor Zlatkovic</a> is now the
+ maintainer of the Windows port, <a
+ href="http://www.zlatkovic.com/projects/libxml/index.html">he provides
+ binaries</a></li>
+ <li><a href="mailto:Gary.Pennington@sun.com">Gary Pennington</a> provides
+ <a href="http://garypennington.net/libxml2/">Solaris binaries</a></li>
+ <li><a
+ href="http://mail.gnome.org/archives/xml/2001-March/msg00014.html">Matt
+ Sergeant</a> developed <a
+ href="http://axkit.org/download/">XML::LibXSLT</a>, a Perl wrapper for
+ libxml2/libxslt as part of the <a href="http://axkit.com/">AxKit XML
+ application server</a></li>
+ <li><a href="mailto:fnatter@gmx.net">Felix Natter</a> and <a
+ href="mailto:geertk@ai.rug.nl">Geert Kloosterman</a> provide <a
+ href="libxml-doc.el">an emacs module</a> to lookup libxml(2) functions
+ documentation</li>
+ <li><a href="mailto:sherwin@nlm.nih.gov">Ziying Sherwin</a> provided <a
+ href="http://xmlsoft.org/messages/0488.html">man pages</a></li>
+ <li>there is a module for <a
+ href="http://acs-misc.sourceforge.net/nsxml.html">libxml/libxslt support
+ in OpenNSD/AOLServer</a></li>
+ <li><a href="mailto:dkuhlman@cutter.rexx.com">Dave Kuhlman</a> provided the
+ first version of libxml/libxslt <a
+ href="http://www.rexx.com/~dkuhlman">wrappers for Python</a></li>
+ <li>Petr Kozelka provides <a
+ href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
+ libxml2</a> with Kylix and Delphi and other Pascal compilers</li>
+ <li><a href="mailto:aleksey@aleksey.com">Aleksey Sanin</a> implemented the
+ <a href="http://www.w3.org/Signature/">XML Canonicalization and XML
+ Digital Signature</a> <a
+ href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a></li>
+ <li><a href="mailto:Steve.Ball@explain.com.au">Steve Ball</a> and
+ contributors maintain <a href="http://tclxml.sourceforge.net/">tcl
+ bindings for libxml2 and libxslt</a>, as well as <a
+ href="http://tclxml.sf.net/tkxmllint.html">tkxmllint</a> a GUI for
+ xmllint and <a href="http://tclxml.sf.net/tkxsltproc.html">tkxsltproc</a>
+ a GUI for xsltproc.</li>
+</ul>
+
+<p></p>
+</body>
+</html>
diff --git a/doc/xmlcatalog.1 b/doc/xmlcatalog.1
new file mode 100644
index 0000000..b4a6b22
--- /dev/null
+++ b/doc/xmlcatalog.1
@@ -0,0 +1,340 @@
+'\" t
+.\" Title: xmlcatalog
+.\" Author: John Fleck <jfleck@inkstain.net>
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: $Date$
+.\" Manual: xmlcatalog Manual
+.\" Source: libxml2
+.\" Language: English
+.\"
+.TH "XMLCATALOG" "1" "$Date$" "libxml2" "xmlcatalog Manual"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+xmlcatalog \- Command line tool to parse and manipulate XML or SGML catalog files\&.
+.SH "SYNOPSIS"
+.HP \w'\fBxmlcatalog\fR\ 'u
+\fBxmlcatalog\fR [\fB\-\-sgml\fR | \fB\-\-shell\fR | \fB\-\-create\fR | \fB\-\-del\ \fR\fB\fIVALUE(S)\fR\fR | [\ \fB\-\-add\ \fR\fB\fITYPE\fR\fR\fB\ \fR\fB\fIORIG\fR\fR\fB\ \fR\fB\fIREPLACE\fR\fR\fB\ \fR\ |\ \fB\-\-add\ \fR\fB\fIFILENAME\fR\fR] | \fB\-\-noout\fR | \fB\-\-no\-super\-update\fR | [\fB\-v\fR\ |\ \fB\-\-verbose\fR]] {\fICATALOGFILE\fR} {\fIENTITIES\fR...}
+.SH "DESCRIPTION"
+.PP
+
+\fBxmlcatalog\fR
+is a command line application allowing users to monitor and manipulate
+XML
+and
+SGML
+catalogs\&. It is included in
+\fBlibxml\fR(3)\&.
+.PP
+Its functions can be invoked from a single command from the command line, or it can perform multiple functions in interactive mode\&. It can operate on both
+XML
+and
+SGML
+files\&.
+.SH "OPTIONS"
+.PP
+
+\fBxmlcatalog\fR
+accepts the following options (in alphabetical order):
+.PP
+\fB\-\-add \fR\fB\fITYPE\fR\fR\fB \fR\fB\fIORIG\fR\fR\fB \fR\fB\fIREPLACE\fR\fR\fB \fR
+.RS 4
+Add an entry to
+CATALOGFILE\&.
+\fITYPE\fR
+indicates the type of entry\&. Possible types are:
+\fIpublic\fR, \fIsystem\fR, \fIuri\fR, \fIrewriteSystem\fR, \fIrewriteURI\fR, \fIdelegatePublic\fR, \fIdelegateSystem\fR, \fIdelegateURI\fR, \fInextCatalog\fR\&.
+\fIORIG\fR
+is the original reference to be replaced, and
+\fIREPLACE\fR
+is the
+URI
+of the replacement entity to be used\&. The
+\fB\-\-add\fR
+option will not overwrite
+CATALOGFILE, outputting to
+stdout, unless
+\fB\-\-noout\fR
+is used\&. The
+\fB\-\-add\fR
+will always take three parameters even if some of the
+XML
+catalog constructs will have only a single argument\&.
+.RE
+.PP
+\fB\-\-add \fR\fB\fIFILENAME\fR\fR
+.RS 4
+If the
+\fB\-\-add\fR
+option is used following the
+\fB\-\-sgml\fR
+option, only a single argument, a
+\fIFILENAME\fR, is used\&. This is used to add the name of a catalog file to an
+SGML
+supercatalog, a file that contains references to other included
+SGML
+catalog files\&.
+.RE
+.PP
+\fB\-\-create\fR
+.RS 4
+Create a new
+XML
+catalog\&. Outputs to
+stdout, ignoring
+\fIfilename\fR
+unless
+\fB\-\-noout\fR
+is used, in which case it creates a new catalog file
+\fIfilename\fR\&.
+.RE
+.PP
+\fB\-\-del \fR\fB\fIVALUE(S)\fR\fR
+.RS 4
+Remove entries from
+\fICATALOGFILE\fR
+matching
+\fIVALUE(S)\fR\&. The
+\fB\-\-del\fR
+option will not overwrite
+\fICATALOGFILE\fR, outputting to
+stdout, unless
+\fB\-\-noout\fR
+is used\&.
+.RE
+.PP
+\fB\-\-noout\fR
+.RS 4
+Save output to the named file rather than outputting to
+stdout\&.
+.RE
+.PP
+\fB\-\-no\-super\-update\fR
+.RS 4
+Do not update the
+SGML
+super catalog\&.
+.RE
+.PP
+\fB\-\-shell\fR
+.RS 4
+Run a shell allowing interactive queries on catalog file
+\fICATALOGFILE\fR\&. For the set of available commands see
+the section called \(lqSHELL COMMANDS\(rq\&.
+.RE
+.PP
+\fB\-\-sgml\fR
+.RS 4
+Uses
+SGML
+super catalogs for
+\fB\-\-add\fR
+and
+\fB\-\-del\fR
+options\&.
+.RE
+.PP
+\fB\-v\fR, \fB\-\-verbose\fR
+.RS 4
+Output debugging information\&.
+.RE
+.SH "SHELL COMMANDS"
+.PP
+Invoking
+\fBxmlcatalog\fR
+with the
+\fB\-\-shell \fR\fB\fICATALOGFILE\fR\fR
+option opens a command line shell allowing interactive access to the catalog file identified by
+\fICATALOGFILE\fR\&. Invoking the shell provides a command line prompt after which the following commands (described in alphabetical order) can be entered\&.
+.PP
+\fBadd \fR\fB\fITYPE\fR\fR\fB \fR\fB\fIORIG\fR\fR\fB \fR\fB\fIREPLACE\fR\fR\fB \fR
+.RS 4
+Add an entry to the catalog file\&.
+\fITYPE\fR
+indicates the type of entry\&. Possible types are:
+\fIpublic\fR, \fIsystem\fR, \fIuri\fR, \fIrewriteSystem\fR, \fIrewriteURI\fR, \fIdelegatePublic\fR, \fIdelegateSystem\fR, \fIdelegateURI\fR, \fInextCatalog\fR\&.
+\fIORIG\fR
+is the original reference to be replaced, and
+\fIREPLACE\fR
+is the
+URI
+of the replacement entity to be used\&. The
+\fB\-\-add\fR
+option will not overwrite
+CATALOGFILE, outputting to
+stdout, unless
+\fB\-\-noout\fR
+is used\&. The
+\fB\-\-add\fR
+will always take three parameters even if some of the
+XML
+catalog constructs will have only a single argument\&.
+.RE
+.PP
+\fBdebug\fR
+.RS 4
+Print debugging statements showing the steps
+\fBxmlcatalog\fR
+is executing\&.
+.RE
+.PP
+\fBdel \fR\fB\fIVALUE(S)\fR\fR
+.RS 4
+Remove the catalog entry corresponding to
+\fIVALUE(S)\fR\&.
+.RE
+.PP
+\fBdump\fR
+.RS 4
+Print the current catalog\&.
+.RE
+.PP
+\fBexit\fR
+.RS 4
+Quit the shell\&.
+.RE
+.PP
+\fBpublic \fR\fB\fIPUBLIC\-ID\fR\fR
+.RS 4
+Execute a Formal Public Identifier look\-up of the catalog entry for
+\fIPUBLIC\-ID\fR\&. The corresponding entry will be output to the command line\&.
+.RE
+.PP
+\fBquiet\fR
+.RS 4
+Stop printing debugging statements\&.
+.RE
+.PP
+\fBsystem \fR\fB\fISYSTEM\-ID\fR\fR
+.RS 4
+Execute a Formal Public Identifier look\-up of the catalog entry for
+\fISYSTEM\-ID\fR\&. The corresponding entry will be output to the command line\&.
+.RE
+.SH "ENVIRONMENT"
+.PP
+\fBXML_CATALOG_FILES\fR
+.RS 4
+XML
+catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
+\fBXML_CATALOG_FILES\fR
+environment variable to a list of catalogs\&. An empty one should deactivate loading the default
+/etc/xml/catalog
+catalog\&.
+.RE
+.SH "DIAGNOSTICS"
+.PP
+
+\fBxmlcatalog\fR
+return codes provide information that can be used when calling it from scripts\&.
+.PP
+\fB0\fR
+.RS 4
+No error
+.RE
+.PP
+\fB1\fR
+.RS 4
+Failed to remove an entry from the catalog
+.RE
+.PP
+\fB2\fR
+.RS 4
+Failed to save to the catalog, check file permissions
+.RE
+.PP
+\fB3\fR
+.RS 4
+Failed to add an entry to the catalog
+.RE
+.PP
+\fB4\fR
+.RS 4
+Failed to look up an entry in the catalog
+.RE
+.SH "SEE ALSO"
+.PP
+\fBlibxml\fR(3)
+.PP
+More information can be found at
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBlibxml\fR(3)
+web page
+\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBlibxml\fR(3)
+catalog support web page at
+\m[blue]\fB\%http://www.xmlsoft.org/catalog.html\fR\m[]
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+James Clark\*(Aqs
+SGML
+catalog page
+\m[blue]\fB\%http://www.jclark.com/sp/catalog.htm\fR\m[]
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+OASIS
+XML
+catalog specification
+\m[blue]\fB\%http://www.oasis-open.org/committees/entity/spec.html\fR\m[]
+.RE
+.sp
+.SH "AUTHOR"
+.PP
+\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
+.RS 4
+Author.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2001, 2004
+.br
diff --git a/doc/xmlcatalog_man.html b/doc/xmlcatalog_man.html
new file mode 100644
index 0000000..d7b02ba
--- /dev/null
+++ b/doc/xmlcatalog_man.html
@@ -0,0 +1,101 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmlcatalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2431614"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmlcatalog &#8212; Command line tool to parse and manipulate <span class="acronym">XML</span> or
+ <span class="acronym">SGML</span> catalog files.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmlcatalog</tt> [[--shell] | [--create] | [--add <i class="replaceable"><tt>type</tt></i>
+ <i class="replaceable"><tt>orig</tt></i> <i class="replaceable"><tt>replace</tt></i>] | [--del <i class="replaceable"><tt>values</tt></i>] | [--noout] | [--verbose]] [<tt class="option"><i class="replaceable"><tt>catalogfile</tt></i></tt>] [<tt class="option"><i class="replaceable"><tt>entities</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+ <span class="application">xmlcatalog</span> is a command line application
+ allowing users to monitor and manipulate <span class="acronym">XML</span> and
+ <span class="acronym">SGML</span> catalogs. It is included in
+ <span class="application">libxml2</span>.
+ </p><p>
+ Its functions can be invoked from a single command from the command line,
+ or it can perform multiple functions in interactive mode. It can operate
+ on both <span class="acronym">XML</span> and <span class="acronym">SGML</span> files.
+ </p></div><div class="refsect1" lang="en"><a name="cloptions"></a><h2>Command Line Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
+ Run a shell
+ allowing interactive queries on catalog file
+ <i class="replaceable"><tt>filename</tt></i>.
+ </dd><dt><span class="term"><tt class="option">--create</tt> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
+ Create a new
+ <span class="acronym">XML</span> catalog. Outputs to stdout, ignoring
+ <i class="replaceable"><tt>filename</tt></i> unless <tt class="option">--noout</tt> is
+ used, in which case it creates a new catalog file
+ <i class="replaceable"><tt>filename</tt></i>.
+ </dd><dt><span class="term"><tt class="option">--add</tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd><p>
+ Add an entry to catalog file
+ <tt class="filename">filename</tt>. <i class="replaceable"><tt>type</tt></i>
+ indicates the type of entry. Possible types are 'public', 'system', 'uri',
+ 'rewriteSystem', 'rewriteURI', 'delegatePublic', 'delegateSystem',
+ 'delegateURI' and 'nextCatalog'. <i class="replaceable"><tt>'orig'</tt></i> is the original
+ reference to be replaced, and <i class="replaceable"><tt>'replace'</tt></i>
+ is the <span class="acronym">URI</span> of the replacement entity to be
+ used. The <tt class="option">--add</tt> option will not overwrite
+ <i class="replaceable"><tt>filename</tt></i>, outputing to stdout, unless
+ <tt class="option">--noout</tt> is used. The <tt class="option">--add</tt> will
+ always take three parameters even if some of the
+ <span class="acronym">XML</span> catalog constructs will have only a single
+ argument.
+
+ </p><p>
+ If the <tt class="option">--add</tt> option is used following the
+ <tt class="option">--sgml</tt> option, only a single argument, a
+ <i class="replaceable"><tt>filename</tt></i>, is used. This is used to add
+ the name of a catalog file to an <span class="acronym">SGML</span>
+ supercatalog, a file that contains references to other included
+ <span class="acronym">SGML</span> catalog files.
+ </p></dd><dt><span class="term"><tt class="option">--del</tt> <i class="replaceable"><tt>'values'</tt></i> <i class="replaceable"><tt>filename</tt></i></span></dt><dd>
+ Remove entries from the catalog file
+ <i class="replaceable"><tt>filename</tt></i> matching
+ <i class="replaceable"><tt>'values'</tt></i>. The <tt class="option">--del</tt> option
+ will not overwrite <i class="replaceable"><tt>filename</tt></i>, outputing to
+ stdout, unless <tt class="option">--noout</tt> is used.
+ </dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
+ Save output to the named file rather than
+ outputing to stdout.
+ </dd><dt><span class="term"><tt class="option">--sgml</tt></span></dt><dd>
+ Uses SGML Super catalogs for --add and --del options
+ </dd><dt><span class="term"><tt class="option">-v</tt> or <tt class="option">--verbose</tt></span></dt><dd>
+ output debugging
+ information.
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell Commands</h2><p>Invoking <span class="application">xmlcatalog</span> with the
+ <tt class="option">--shell</tt> <i class="replaceable"><tt>filename</tt></i> option opens
+ a command line shell allowing interactive access to the catalog file
+ identified by <i class="replaceable"><tt>filename</tt></i>. Invoking the shell
+ provides a command line prompt after which commands can be entered.
+ </p><div class="variablelist"><dl><dt><span class="term"><tt class="option">public</tt> <i class="replaceable"><tt>'PublicID'</tt></i></span></dt><dd>
+ Execute a
+ public identifier lookup of the catalog entry for
+ <i class="replaceable"><tt>'PublicID'</tt></i>. The corresponding entry will be
+ output to the command line.
+ </dd><dt><span class="term"><tt class="option">system</tt> <i class="replaceable"><tt>'SystemID'</tt></i></span></dt><dd>
+ Execute a
+ public identifier lookup of the catalog entry for
+ <i class="replaceable"><tt>'SystemID'</tt></i>. The corresponding entry will be
+ output to the command line.
+ </dd><dt><span class="term"><tt class="option">add </tt> <i class="replaceable"><tt>'type'</tt></i> <i class="replaceable"><tt>'orig'</tt></i> <i class="replaceable"><tt>'replace'</tt></i></span></dt><dd>
+ Add an entry to the catalog
+ file. <i class="replaceable"><tt>type</tt></i> indicates the type of
+ entry. Possible types are 'public', 'system', 'uri', 'rewriteSystem', 'rewriteURI',
+ 'delegatePublic', 'delegateSystem', 'delegateURI' and 'nextCatalog'. <i class="replaceable"><tt>'orig'</tt></i>
+ is the original reference to be replaced, and
+ <i class="replaceable"><tt>'replace'</tt></i> is the <span class="acronym">URI</span> of the
+ replacement entity to be used.
+ </dd><dt><span class="term"><tt class="option">del</tt> <i class="replaceable"><tt>'values'</tt></i></span></dt><dd>
+ Remove the
+ catalog entry corresponding to <i class="replaceable"><tt>'values'</tt></i>.
+ </dd><dt><span class="term"><tt class="option">dump</tt></span></dt><dd>
+ Print the current catalog.
+ </dd><dt><span class="term"><tt class="option">debug</tt></span></dt><dd>
+ Print debugging statements showing the steps
+ <span class="application">xmlcatalog</span> is executing.
+ </dd><dt><span class="term"><tt class="option">quiet</tt></span></dt><dd>
+ Stop printing debugging statements.
+ </dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
+ Quit the shell.
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="return"></a><h2>Return values</h2><p><span class="application">xmlcatalog</span>'s return codes provide
+ information that can be used when calling it from scripts.</p><p>0: normal</p><p>1: Failed to remove an entry from the catalog</p><p>2: Failed to save to the catalog, check file permissions</p><p>3: Failed to add an entry to the catalog</p><p>4: Failed to lookup and entry in the catalog</p></div><div class="refsect1" lang="en"><h2>Catalogs</h2><p>Catalog behavior can be changed by redirecting
+ queries to the user's own set of catalogs. This can be done by setting the
+ <tt class="varname">XML_CATALOG_FILES</tt> environment variable to a list of
+ catalogs. An empty one should deactivate loading the default
+ <tt class="filename">/etc/xml/catalog</tt> default catalog.</p></div><div class="refsect1" lang="en"><h2>References</h2><p><a href="http://www.xmlsoft.org/" target="_top">libxml web page</a></p><p><a href="http://www.xmlsoft.org/catalog.html" target="_top"><span class="application">libxml</span>
+ catalog support web page:</a></p><p><a href="http://www.jclark.com/sp/catalog.htm" target="_top">James Clark's
+ <span class="acronym">SGML</span> catalog page:</a></p><p><a href="http://www.oasis-open.org/committees/entity/spec.html" target="_top"><span class="acronym">OASIS</span>
+ <span class="acronym">XML</span> catalog specification: </a></p></div></div></body></html>
diff --git a/doc/xmlcatalog_man.xml b/doc/xmlcatalog_man.xml
new file mode 100644
index 0000000..049ed8f
--- /dev/null
+++ b/doc/xmlcatalog_man.xml
@@ -0,0 +1,450 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"
+ href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+
+ <!ENTITY xmlcatalog "<command>xmlcatalog</command>">
+]>
+
+<refentry>
+
+<refentryinfo>
+ <title>xmlcatalog Manual</title>
+ <productname>libxml2</productname>
+ <copyright>
+ <year>2001</year>
+ <year>2004</year>
+ </copyright>
+ <author>
+ <firstname>John</firstname>
+ <surname>Fleck</surname>
+ <affiliation>
+ <address>
+ <email>jfleck@inkstain.net</email>
+ </address>
+ </affiliation>
+ </author>
+ <!-- date should be the date of the latest change or the release version -->
+ <date>$Date$</date>
+ <!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
+ <!-- <releaseinfo>This is release 0.3 of the xmlcatalog Manual.</releaseinfo> -->
+ <!-- <edition>0.3</edition> -->
+</refentryinfo>
+
+<refmeta>
+ <refentrytitle>xmlcatalog</refentrytitle>
+ <manvolnum>1</manvolnum>
+</refmeta>
+
+<refnamediv>
+ <refname>xmlcatalog</refname>
+ <refpurpose>
+ Command line tool to parse and manipulate <acronym>XML</acronym>
+ or <acronym>SGML</acronym> catalog files.
+ </refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>xmlcatalog</command>
+ <group choice="opt">
+ <arg choice="plain"><option>--sgml</option></arg>
+ <arg choice="plain"><option>--shell</option></arg>
+ <arg choice="plain"><option>--create</option></arg>
+ <arg choice="plain"><option>--del <replaceable>VALUE(S)</replaceable></option></arg>
+ <arg choice="plain">
+ <group choice="opt">
+ <arg choice="plain">
+ <option>--add
+ <replaceable>TYPE</replaceable>
+ <replaceable>ORIG</replaceable>
+ <replaceable>REPLACE</replaceable>
+ </option>
+ </arg>
+ <arg choice="plain"><option>--add <replaceable>FILENAME</replaceable></option></arg>
+ </group>
+ </arg>
+ <arg choice="plain"><option>--noout</option></arg>
+ <arg choice="plain"><option>--no-super-update</option></arg>
+ <arg choice="plain">
+ <group choice="opt">
+ <arg choice="plain"><option>-v</option></arg>
+ <arg choice="plain"><option>--verbose</option></arg>
+ </group>
+ </arg>
+ </group>
+ <arg choice="req" rep="norepeat"><replaceable>CATALOGFILE</replaceable></arg>
+ <arg choice="req" rep="repeat"><replaceable>ENTITIES</replaceable></arg>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1 id="description">
+ <title>DESCRIPTION</title>
+ <para>
+ &xmlcatalog; is a command line application allowing users to monitor and
+ manipulate <acronym>XML</acronym> and <acronym>SGML</acronym> catalogs. It
+ is included in <citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry>.
+ </para>
+ <para>
+ Its functions can be invoked from a single command from the command line,
+ or it can perform multiple functions in interactive mode. It can operate
+ on both <acronym>XML</acronym> and <acronym>SGML</acronym> files.
+ </para>
+</refsect1>
+
+<refsect1 id="options">
+ <title>OPTIONS</title>
+ <para>
+ &xmlcatalog; accepts the following options (in alphabetical order):
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>
+ <option>--add
+ <replaceable>TYPE</replaceable>
+ <replaceable>ORIG</replaceable>
+ <replaceable>REPLACE</replaceable>
+ </option>
+ </term>
+ <listitem>
+ <para>
+ Add an entry to <filename>CATALOGFILE</filename>. <replaceable>TYPE</replaceable>
+ indicates the type of entry. Possible types are: <simplelist type="inline">
+ <member><parameter>public</parameter></member>
+ <member><parameter>system</parameter></member>
+ <member><parameter>uri</parameter></member>
+ <member><parameter>rewriteSystem</parameter></member>
+ <member><parameter>rewriteURI</parameter></member>
+ <member><parameter>delegatePublic</parameter></member>
+ <member><parameter>delegateSystem</parameter></member>
+ <member><parameter>delegateURI</parameter></member>
+ <member><parameter>nextCatalog</parameter></member>
+ </simplelist>. <replaceable>ORIG</replaceable> is the original
+ reference to be replaced, and <replaceable>REPLACE</replaceable>
+ is the <acronym>URI</acronym> of the replacement entity to be
+ used. The <option>--add</option> option will not overwrite
+ <filename>CATALOGFILE</filename>, outputting
+ to <filename class="devicefile">stdout</filename>, unless
+ <option>--noout</option> is used. The <option>--add</option> will
+ always take three parameters even if some of the <acronym>XML</acronym>
+ catalog constructs will have only a single argument.
+ </para>
+ <!--
+ FIXME - Is my list of possible types correct? Are SGML types the same?
+ -->
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--add <replaceable>FILENAME</replaceable></option></term>
+ <listitem>
+ <para>
+ If the <option>--add</option> option is used following
+ the <option>--sgml</option> option, only a single argument,
+ a <replaceable>FILENAME</replaceable>, is used. This is used to add
+ the name of a catalog file to an <acronym>SGML</acronym> supercatalog,
+ a file that contains references to other included <acronym>SGML</acronym>
+ catalog files.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--create</option></term>
+ <listitem>
+ <para>
+ Create a new <acronym>XML</acronym> catalog. Outputs
+ to <filename class="devicefile">stdout</filename>,
+ ignoring <replaceable>filename</replaceable> unless <option>--noout</option> is
+ used, in which case it creates a new catalog
+ file <replaceable>filename</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--del <replaceable>VALUE(S)</replaceable></option></term>
+ <listitem>
+ <para>
+ Remove entries from <replaceable>CATALOGFILE</replaceable>
+ matching <replaceable>VALUE(S)</replaceable>. The <option>--del</option>
+ option will not overwrite <replaceable>CATALOGFILE</replaceable>,
+ outputting to <filename class="devicefile">stdout</filename>,
+ unless <option>--noout</option> is used.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--noout</option></term>
+ <listitem>
+ <para>
+ Save output to the named file rather than outputting
+ to <filename class="devicefile">stdout</filename>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--no-super-update</option></term>
+ <listitem>
+ <para>
+ Do not update the <acronym>SGML</acronym> super catalog.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--shell</option></term>
+ <listitem>
+ <para>
+ Run a shell allowing interactive queries on catalog
+ file <replaceable>CATALOGFILE</replaceable>. For the set of available
+ commands see <xref linkend="shell"/>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--sgml</option></term>
+ <listitem>
+ <para>
+ Uses <acronym>SGML</acronym> super catalogs for <option>--add</option>
+ and <option>--del</option> options.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--verbose</option></term>
+ <listitem>
+ <para>Output debugging information.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="shell">
+ <title>SHELL COMMANDS</title>
+ <para>
+ Invoking &xmlcatalog; with
+ the <option>--shell <replaceable>CATALOGFILE</replaceable></option> option opens
+ a command line shell allowing interactive access to the catalog file
+ identified by <replaceable>CATALOGFILE</replaceable>. Invoking the shell
+ provides a command line prompt after which the following commands (described in
+ alphabetical order) can be entered.
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>
+ <option>add
+ <replaceable>TYPE</replaceable>
+ <replaceable>ORIG</replaceable>
+ <replaceable>REPLACE</replaceable>
+ </option>
+ </term>
+ <listitem>
+ <para>
+ Add an entry to the catalog file. <replaceable>TYPE</replaceable>
+ indicates the type of entry. Possible types are: <simplelist type="inline">
+ <member><parameter>public</parameter></member>
+ <member><parameter>system</parameter></member>
+ <member><parameter>uri</parameter></member>
+ <member><parameter>rewriteSystem</parameter></member>
+ <member><parameter>rewriteURI</parameter></member>
+ <member><parameter>delegatePublic</parameter></member>
+ <member><parameter>delegateSystem</parameter></member>
+ <member><parameter>delegateURI</parameter></member>
+ <member><parameter>nextCatalog</parameter></member>
+ </simplelist>. <replaceable>ORIG</replaceable> is the original
+ reference to be replaced, and <replaceable>REPLACE</replaceable>
+ is the <acronym>URI</acronym> of the replacement entity to be
+ used. The <option>--add</option> option will not overwrite
+ <filename>CATALOGFILE</filename>, outputting
+ to <filename class="devicefile">stdout</filename>, unless
+ <option>--noout</option> is used. The <option>--add</option> will
+ always take three parameters even if some of the <acronym>XML</acronym>
+ catalog constructs will have only a single argument.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>debug</option></term>
+ <listitem>
+ <para>
+ Print debugging statements showing the steps &xmlcatalog; is executing.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>del <replaceable>VALUE(S)</replaceable></option></term>
+ <listitem>
+ <para>
+ Remove the catalog entry corresponding to <replaceable>VALUE(S)</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>dump</option></term>
+ <listitem>
+ <para>Print the current catalog.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>exit</option></term>
+ <listitem>
+ <para>Quit the shell.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>public <replaceable>PUBLIC-ID</replaceable></option></term>
+ <listitem>
+ <para>
+ Execute a Formal Public Identifier look-up of the catalog entry
+ for <replaceable>PUBLIC-ID</replaceable>. The corresponding entry will be
+ output to the command line.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>quiet</option></term>
+ <listitem>
+ <para>Stop printing debugging statements.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>system <replaceable>SYSTEM-ID</replaceable></option></term>
+ <listitem>
+ <para>
+ Execute a Formal Public Identifier look-up of the catalog entry
+ for <replaceable>SYSTEM-ID</replaceable>. The corresponding entry will be
+ output to the command line.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="environment">
+ <title>ENVIRONMENT</title>
+ <variablelist>
+
+ <varlistentry>
+ <term><envar>XML_CATALOG_FILES</envar></term>
+ <listitem>
+ <para><acronym>XML</acronym> catalog behavior can be changed by redirecting
+ queries to the user's own set of catalogs. This can be done by setting
+ the <envar>XML_CATALOG_FILES</envar> environment variable to a list
+ of catalogs. An empty one should deactivate loading the
+ default <filename>/etc/xml/catalog</filename> catalog.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="diagnostics">
+ <title>DIAGNOSTICS</title>
+ <para>
+ &xmlcatalog; return codes provide information that can be used when
+ calling it from scripts.
+ </para>
+ <variablelist>
+
+ <varlistentry>
+ <term><errorcode>0</errorcode></term>
+ <listitem>
+ <para>No error</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>1</errorcode></term>
+ <listitem>
+ <para>Failed to remove an entry from the catalog</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>2</errorcode></term>
+ <listitem>
+ <para>Failed to save to the catalog, check file permissions</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>3</errorcode></term>
+ <listitem>
+ <para>Failed to add an entry to the catalog</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>4</errorcode></term>
+ <listitem>
+ <para>Failed to look up an entry in the catalog</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="seealso">
+ <title>SEE ALSO</title>
+ <para><citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry>
+ </para>
+ <para>
+ More information can be found at
+ <itemizedlist>
+ <listitem>
+ <para><citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
+ </para>
+ </listitem>
+ <listitem>
+ <para><citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry> catalog support web page
+ at <ulink url="http://www.xmlsoft.org/catalog.html"/>
+ </para>
+ </listitem>
+ <listitem>
+ <para>James Clark's <acronym>SGML</acronym> catalog
+ page <ulink url="http://www.jclark.com/sp/catalog.htm"/>
+ </para>
+ </listitem>
+ <listitem>
+ <para><acronym>OASIS</acronym> <acronym>XML</acronym> catalog specification
+ <ulink url="http://www.oasis-open.org/committees/entity/spec.html"/>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+</refsect1>
+
+</refentry>
diff --git a/doc/xmldtd.html b/doc/xmldtd.html
new file mode 100644
index 0000000..36333f0
--- /dev/null
+++ b/doc/xmldtd.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Validation &amp; DTDs</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Validation &amp; DTDs</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">Reference Manual</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">Releases</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation &amp; DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol>
+ <li><a href="#General5">General overview</a></li>
+ <li><a href="#definition">The definition</a></li>
+ <li><a href="#Simple">Simple rules</a>
+ <ol>
+ <li><a href="#reference">How to reference a DTD from a document</a></li>
+ <li><a href="#Declaring">Declaring elements</a></li>
+ <li><a href="#Declaring1">Declaring attributes</a></li>
+ </ol>
+ </li>
+ <li><a href="#Some">Some examples</a></li>
+ <li><a href="#validate">How to validate</a></li>
+ <li><a href="#Other">Other resources</a></li>
+</ol><h3><a name="General5" id="General5">General overview</a></h3><p>Well what is validation and what is a DTD ?</p><p>DTD is the acronym for Document Type Definition. This is a description of
+the content for a family of XML files. This is part of the XML 1.0
+specification, and allows one to describe and verify that a given document
+instance conforms to the set of rules detailing its structure and content.</p><p>Validation is the process of checking a document against a DTD (more
+generally against a set of construction rules).</p><p>The validation process and building DTDs are the two most difficult parts
+of the XML life cycle. Briefly a DTD defines all the possible elements to be
+found within your document, what is the formal shape of your document tree
+(by defining the allowed content of an element; either text, a regular
+expression for the allowed list of children, or mixed content i.e. both text
+and children). The DTD also defines the valid attributes for all elements and
+the types of those attributes.</p><h3><a name="definition1" id="definition1">The definition</a></h3><p>The <a href="http://www.w3.org/TR/REC-xml">W3C XML Recommendation</a> (<a href="http://www.xml.com/axml/axml.html">Tim Bray's annotated version of
+Rev1</a>):</p><ul>
+ <li><a href="http://www.w3.org/TR/REC-xml#elemdecls">Declaring
+ elements</a></li>
+ <li><a href="http://www.w3.org/TR/REC-xml#attdecls">Declaring
+ attributes</a></li>
+</ul><p>(unfortunately) all this is inherited from the SGML world, the syntax is
+ancient...</p><h3><a name="Simple1" id="Simple1">Simple rules</a></h3><p>Writing DTDs can be done in many ways. The rules to build them if you need
+something permanent or something which can evolve over time can be radically
+different. Really complex DTDs like DocBook ones are flexible but quite
+harder to design. I will just focus on DTDs for a formats with a fixed simple
+structure. It is just a set of basic rules, and definitely not exhaustive nor
+usable for complex DTD design.</p><h4><a name="reference1" id="reference1">How to reference a DTD from a document</a>:</h4><p>Assuming the top element of the document is <code>spec</code> and the dtd
+is placed in the file <code>mydtd</code> in the subdirectory
+<code>dtds</code> of the directory from where the document were loaded:</p><p><code>&lt;!DOCTYPE spec SYSTEM "dtds/mydtd"&gt;</code></p><p>Notes:</p><ul>
+ <li>The system string is actually an URI-Reference (as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a
+ full URL string indicating the location of your DTD on the Web. This is a
+ really good thing to do if you want others to validate your document.</li>
+ <li>It is also possible to associate a <code>PUBLIC</code> identifier (a
+ magic string) so that the DTD is looked up in catalogs on the client side
+ without having to locate it on the web.</li>
+ <li>A DTD contains a set of element and attribute declarations, but they
+ don't define what the root of the document should be. This is explicitly
+ told to the parser/validator as the first element of the
+ <code>DOCTYPE</code> declaration.</li>
+</ul><h4><a name="Declaring2" id="Declaring2">Declaring elements</a>:</h4><p>The following declares an element <code>spec</code>:</p><p><code>&lt;!ELEMENT spec (front, body, back?)&gt;</code></p><p>It also expresses that the spec element contains one <code>front</code>,
+one <code>body</code> and one optional <code>back</code> children elements in
+this order. The declaration of one element of the structure and its content
+are done in a single declaration. Similarly the following declares
+<code>div1</code> elements:</p><p><code>&lt;!ELEMENT div1 (head, (p | list | note)*, div2?)&gt;</code></p><p>which means div1 contains one <code>head</code> then a series of optional
+<code>p</code>, <code>list</code>s and <code>note</code>s and then an
+optional <code>div2</code>. And last but not least an element can contain
+text:</p><p><code>&lt;!ELEMENT b (#PCDATA)&gt;</code></p><p><code>b</code> contains text or being of mixed content (text and elements
+in no particular order):</p><p><code>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*&gt;</code></p><p><code>p </code>can contain text or <code>a</code>, <code>ul</code>,
+<code>b</code>, <code>i </code>or <code>em</code> elements in no particular
+order.</p><h4><a name="Declaring1" id="Declaring1">Declaring attributes</a>:</h4><p>Again the attributes declaration includes their content definition:</p><p><code>&lt;!ATTLIST termdef name CDATA #IMPLIED&gt;</code></p><p>means that the element <code>termdef</code> can have a <code>name</code>
+attribute containing text (<code>CDATA</code>) and which is optional
+(<code>#IMPLIED</code>). The attribute value can also be defined within a
+set:</p><p><code>&lt;!ATTLIST list type (bullets|ordered|glossary)
+"ordered"&gt;</code></p><p>means <code>list</code> element have a <code>type</code> attribute with 3
+allowed values "bullets", "ordered" or "glossary" and which default to
+"ordered" if the attribute is not explicitly specified.</p><p>The content type of an attribute can be text (<code>CDATA</code>),
+anchor/reference/references
+(<code>ID</code>/<code>IDREF</code>/<code>IDREFS</code>), entity(ies)
+(<code>ENTITY</code>/<code>ENTITIES</code>) or name(s)
+(<code>NMTOKEN</code>/<code>NMTOKENS</code>). The following defines that a
+<code>chapter</code> element can have an optional <code>id</code> attribute
+of type <code>ID</code>, usable for reference from attribute of type
+IDREF:</p><p><code>&lt;!ATTLIST chapter id ID #IMPLIED&gt;</code></p><p>The last value of an attribute definition can be <code>#REQUIRED
+</code>meaning that the attribute has to be given, <code>#IMPLIED</code>
+meaning that it is optional, or the default value (possibly prefixed by
+<code>#FIXED</code> if it is the only allowed).</p><p>Notes:</p><ul>
+ <li>Usually the attributes pertaining to a given element are declared in a
+ single expression, but it is just a convention adopted by a lot of DTD
+ writers:
+ <pre>&lt;!ATTLIST termdef
+ id ID #REQUIRED
+ name CDATA #IMPLIED&gt;</pre>
+ <p>The previous construct defines both <code>id</code> and
+ <code>name</code> attributes for the element <code>termdef</code>.</p>
+ </li>
+</ul><h3><a name="Some1" id="Some1">Some examples</a></h3><p>The directory <code>test/valid/dtds/</code> in the libxml2 distribution
+contains some complex DTD examples. The example in the file
+<code>test/valid/dia.xml</code> shows an XML file where the simple DTD is
+directly included within the document.</p><h3><a name="validate1" id="validate1">How to validate</a></h3><p>The simplest way is to use the xmllint program included with libxml. The
+<code>--valid</code> option turns-on validation of the files given as input.
+For example the following validates a copy of the first revision of the XML
+1.0 specification:</p><p><code>xmllint --valid --noout test/valid/REC-xml-19980210.xml</code></p><p>the -- noout is used to disable output of the resulting tree.</p><p>The <code>--dtdvalid dtd</code> allows validation of the document(s)
+against a given DTD.</p><p>Libxml2 exports an API to handle DTDs and validation, check the <a href="http://xmlsoft.org/html/libxml-valid.html">associated
+description</a>.</p><h3><a name="Other1" id="Other1">Other resources</a></h3><p>DTDs are as old as SGML. So there may be a number of examples on-line, I
+will just list one for now, others pointers welcome:</p><ul>
+ <li><a href="http://www.xml101.com:8081/dtd/">XML-101 DTD</a></li>
+</ul><p>I suggest looking at the examples found under test/valid/dtd and any of
+the large number of books available on XML. The dia example in test/valid
+should be both simple and complete enough to allow you to build your own.</p><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/xmlio.html b/doc/xmlio.html
new file mode 100644
index 0000000..51bb646
--- /dev/null
+++ b/doc/xmlio.html
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>I/O Interfaces</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>I/O Interfaces</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol>
+ <li><a href="#General1">General overview</a></li>
+ <li><a href="#basic">The basic buffer type</a></li>
+ <li><a href="#Input">Input I/O handlers</a></li>
+ <li><a href="#Output">Output I/O handlers</a></li>
+ <li><a href="#entities">The entities loader</a></li>
+ <li><a href="#Example2">Example of customized I/O</a></li>
+</ol><h3><a name="General1" id="General1">General overview</a></h3><p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlio.html">xmlIO.h</a></code> provides
+the interfaces to the libxml2 I/O system. This consists of 4 main parts:</p><ul>
+ <li>Entities loader, this is a routine which tries to fetch the entities
+ (files) based on their PUBLIC and SYSTEM identifiers. The default loader
+ don't look at the public identifier since libxml2 do not maintain a
+ catalog. You can redefine you own entity loader by using
+ <code>xmlGetExternalEntityLoader()</code> and
+ <code>xmlSetExternalEntityLoader()</code>. <a href="#entities">Check the
+ example</a>.</li>
+ <li>Input I/O buffers which are a commodity structure used by the parser(s)
+ input layer to handle fetching the information to feed the parser. This
+ provides buffering and is also a placeholder where the encoding
+ converters to UTF8 are piggy-backed.</li>
+ <li>Output I/O buffers are similar to the Input ones and fulfill similar
+ task but when generating a serialization from a tree.</li>
+ <li>A mechanism to register sets of I/O callbacks and associate them with
+ specific naming schemes like the protocol part of the URIs.
+ <p>This affect the default I/O operations and allows to use specific I/O
+ handlers for certain names.</p>
+ </li>
+</ul><p>The general mechanism used when loading http://rpmfind.net/xml.html for
+example in the HTML parser is the following:</p><ol>
+ <li>The default entity loader calls <code>xmlNewInputFromFile()</code> with
+ the parsing context and the URI string.</li>
+ <li>the URI string is checked against the existing registered handlers
+ using their match() callback function, if the HTTP module was compiled
+ in, it is registered and its match() function will succeeds</li>
+ <li>the open() function of the handler is called and if successful will
+ return an I/O Input buffer</li>
+ <li>the parser will the start reading from this buffer and progressively
+ fetch information from the resource, calling the read() function of the
+ handler until the resource is exhausted</li>
+ <li>if an encoding change is detected it will be installed on the input
+ buffer, providing buffering and efficient use of the conversion
+ routines</li>
+ <li>once the parser has finished, the close() function of the handler is
+ called once and the Input buffer and associated resources are
+ deallocated.</li>
+</ol><p>The user defined callbacks are checked first to allow overriding of the
+default libxml2 I/O routines.</p><h3><a name="basic" id="basic">The basic buffer type</a></h3><p>All the buffer manipulation handling is done using the
+<code>xmlBuffer</code> type define in <code><a href="http://xmlsoft.org/html/libxml-tree.html">tree.h</a> </code>which is a
+resizable memory buffer. The buffer allocation strategy can be selected to be
+either best-fit or use an exponential doubling one (CPU vs. memory use
+trade-off). The values are <code>XML_BUFFER_ALLOC_EXACT</code> and
+<code>XML_BUFFER_ALLOC_DOUBLEIT</code>, and can be set individually or on a
+system wide basis using <code>xmlBufferSetAllocationScheme()</code>. A number
+of functions allows to manipulate buffers with names starting with the
+<code>xmlBuffer...</code> prefix.</p><h3><a name="Input" id="Input">Input I/O handlers</a></h3><p>An Input I/O handler is a simple structure
+<code>xmlParserInputBuffer</code> containing a context associated to the
+resource (file descriptor, or pointer to a protocol handler), the read() and
+close() callbacks to use and an xmlBuffer. And extra xmlBuffer and a charset
+encoding handler are also present to support charset conversion when
+needed.</p><h3><a name="Output" id="Output">Output I/O handlers</a></h3><p>An Output handler <code>xmlOutputBuffer</code> is completely similar to an
+Input one except the callbacks are write() and close().</p><h3><a name="entities" id="entities">The entities loader</a></h3><p>The entity loader resolves requests for new entities and create inputs for
+the parser. Creating an input from a filename or an URI string is done
+through the xmlNewInputFromFile() routine. The default entity loader do not
+handle the PUBLIC identifier associated with an entity (if any). So it just
+calls xmlNewInputFromFile() with the SYSTEM identifier (which is mandatory in
+XML).</p><p>If you want to hook up a catalog mechanism then you simply need to
+override the default entity loader, here is an example:</p><pre>#include &lt;libxml/xmlIO.h&gt;
+
+xmlExternalEntityLoader defaultLoader = NULL;
+
+xmlParserInputPtr
+xmlMyExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+ const char *fileID = NULL;
+ /* lookup for the fileID depending on ID */
+
+ ret = xmlNewInputFromFile(ctxt, fileID);
+ if (ret != NULL)
+ return(ret);
+ if (defaultLoader != NULL)
+ ret = defaultLoader(URL, ID, ctxt);
+ return(ret);
+}
+
+int main(..) {
+ ...
+
+ /*
+ * Install our own entity loader
+ */
+ defaultLoader = xmlGetExternalEntityLoader();
+ xmlSetExternalEntityLoader(xmlMyExternalEntityLoader);
+
+ ...
+}</pre><h3><a name="Example2" id="Example2">Example of customized I/O</a></h3><p>This example come from <a href="http://xmlsoft.org/messages/0708.html">a
+real use case</a>, xmlDocDump() closes the FILE * passed by the application
+and this was a problem. The <a href="http://xmlsoft.org/messages/0711.html">solution</a> was to redefine a
+new output handler with the closing call deactivated:</p><ol>
+ <li>First define a new I/O output allocator where the output don't close
+ the file:
+ <pre>xmlOutputBufferPtr
+xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
+    xmlOutputBufferPtr ret;
+    
+    if (xmlOutputCallbackInitialized == 0)
+        xmlRegisterDefaultOutputCallbacks();
+
+    if (file == NULL) return(NULL);
+    ret = xmlAllocOutputBuffer(encoder);
+    if (ret != NULL) {
+        ret-&gt;context = file;
+        ret-&gt;writecallback = xmlFileWrite;
+        ret-&gt;closecallback = NULL; /* No close callback */
+    }
+    return(ret);
+} </pre>
+ </li>
+ <li>And then use it to save the document:
+ <pre>FILE *f;
+xmlOutputBufferPtr output;
+xmlDocPtr doc;
+int res;
+
+f = ...
+doc = ....
+
+output = xmlOutputBufferCreateOwn(f, NULL);
+res = xmlSaveFileTo(output, doc, NULL);
+ </pre>
+ </li>
+</ol><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/xmllint.1 b/doc/xmllint.1
new file mode 100644
index 0000000..540a114
--- /dev/null
+++ b/doc/xmllint.1
@@ -0,0 +1,647 @@
+'\" t
+.\" Title: xmllint
+.\" Author: John Fleck <jfleck@inkstain.net>
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: $Date$
+.\" Manual: xmllint Manual
+.\" Source: libxml2
+.\" Language: English
+.\"
+.TH "XMLLINT" "1" "$Date$" "libxml2" "xmllint Manual"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+xmllint \- command line XML tool
+.SH "SYNOPSIS"
+.HP \w'\fBxmllint\fR\ 'u
+\fBxmllint\fR [\fB\-\-version\fR | \fB\-\-debug\fR | \fB\-\-shell\fR | \fB\-\-xpath\ "\fR\fB\fIXPath_expression\fR\fR\fB"\fR | \fB\-\-debugent\fR | \fB\-\-copy\fR | \fB\-\-recover\fR | \fB\-\-noent\fR | \fB\-\-noout\fR | \fB\-\-nonet\fR | \fB\-\-path\ "\fR\fB\fIPATH(S)\fR\fR\fB"\fR | \fB\-\-load\-trace\fR | \fB\-\-htmlout\fR | \fB\-\-nowrap\fR | \fB\-\-valid\fR | \fB\-\-postvalid\fR | \fB\-\-dtdvalid\ \fR\fB\fIURL\fR\fR | \fB\-\-dtdvalidfpi\ \fR\fB\fIFPI\fR\fR | \fB\-\-timing\fR | \fB\-\-output\ \fR\fB\fIFILE\fR\fR | \fB\-\-repeat\fR | \fB\-\-insert\fR | \fB\-\-compress\fR | \fB\-\-html\fR | \fB\-\-xmlout\fR | \fB\-\-push\fR | \fB\-\-memory\fR | \fB\-\-maxmem\ \fR\fB\fINBBYTES\fR\fR | \fB\-\-nowarning\fR | \fB\-\-noblanks\fR | \fB\-\-nocdata\fR | \fB\-\-format\fR | \fB\-\-encode\ \fR\fB\fIENCODING\fR\fR | \fB\-\-dropdtd\fR | \fB\-\-nsclean\fR | \fB\-\-testIO\fR | \fB\-\-catalogs\fR | \fB\-\-nocatalogs\fR | \fB\-\-auto\fR | \fB\-\-xinclude\fR | \fB\-\-noxincludenode\fR | \fB\-\-loaddtd\fR | \fB\-\-dtdattr\fR | \fB\-\-stream\fR | \fB\-\-walker\fR | \fB\-\-pattern\ \fR\fB\fIPATTERNVALUE\fR\fR | \fB\-\-chkregister\fR | \fB\-\-relaxng\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-schema\ \fR\fB\fISCHEMA\fR\fR | \fB\-\-c14n\fR] {\fIXML\-FILE(S)\fR... | \-}
+.HP \w'\fBxmllint\fR\ 'u
+\fBxmllint\fR \fB\-\-help\fR
+.SH "DESCRIPTION"
+.PP
+The
+\fBxmllint\fR
+program parses one or more
+XML
+files, specified on the command line as
+\fIXML\-FILE\fR
+(or the standard input if the filename provided is
+\fB\-\fR
+)\&. It prints various types of output, depending upon the options selected\&. It is useful for detecting errors both in
+XML
+code and in the
+XML
+parser itself\&.
+.PP
+\fBxmllint\fR
+is included in
+\fBlibxml\fR(3)\&.
+.SH "OPTIONS"
+.PP
+\fBxmllint\fR
+accepts the following options (in alphabetical order):
+.PP
+\fB\-\-auto\fR
+.RS 4
+Generate a small document for testing purposes\&.
+.RE
+.PP
+\fB\-\-catalogs\fR
+.RS 4
+Use the
+SGML
+catalog(s) from
+\fBSGML_CATALOG_FILES\fR\&. Otherwise
+XML
+catalogs starting from
+/etc/xml/catalog
+are used by default\&.
+.RE
+.PP
+\fB\-\-chkregister\fR
+.RS 4
+Turn on node registration\&. Useful for developers testing
+\fBlibxml\fR(3)
+node tracking code\&.
+.RE
+.PP
+\fB\-\-compress\fR
+.RS 4
+Turn on
+\fBgzip\fR(1)
+compression of output\&.
+.RE
+.PP
+\fB\-\-copy\fR
+.RS 4
+Test the internal copy implementation\&.
+.RE
+.PP
+\fB\-\-c14n\fR
+.RS 4
+Use the W3C
+XML
+Canonicalisation (C14N) to serialize the result of parsing to
+stdout\&. It keeps comments in the result\&.
+.RE
+.PP
+\fB\-\-dtdvalid \fR\fB\fIURL\fR\fR
+.RS 4
+Use the
+DTD
+specified by an
+\fIURL\fR
+for validation\&.
+.RE
+.PP
+\fB\-\-dtdvalidfpi \fR\fB\fIFPI\fR\fR
+.RS 4
+Use the
+DTD
+specified by a Formal Public Identifier
+\fIFPI\fR
+for validation, note that this will require a catalog exporting that Formal Public Identifier to work\&.
+.RE
+.PP
+\fB\-\-debug\fR
+.RS 4
+Parse a file and output an annotated tree of the in\-memory version of the document\&.
+.RE
+.PP
+\fB\-\-debugent\fR
+.RS 4
+Debug the entities defined in the document\&.
+.RE
+.PP
+\fB\-\-dropdtd\fR
+.RS 4
+Remove
+DTD
+from output\&.
+.RE
+.PP
+\fB\-\-dtdattr\fR
+.RS 4
+Fetch external
+DTD
+and populate the tree with inherited attributes\&.
+.RE
+.PP
+\fB\-\-encode \fR\fB\fIENCODING\fR\fR
+.RS 4
+Output in the given encoding\&. Note that this works for full document not fragments or result from XPath queries\&.
+.RE
+.PP
+\fB\-\-format\fR
+.RS 4
+Reformat and reindent the output\&. The
+\fBXMLLINT_INDENT\fR
+environment variable controls the indentation\&. The default value is two spaces " ")\&.
+.RE
+.PP
+\fB\-\-help\fR
+.RS 4
+Print out a short usage summary for
+\fBxmllint\fR\&.
+.RE
+.PP
+\fB\-\-html\fR
+.RS 4
+Use the
+HTML
+parser\&.
+.RE
+.PP
+\fB\-\-htmlout\fR
+.RS 4
+Output results as an
+HTML
+file\&. This causes
+\fBxmllint\fR
+to output the necessary
+HTML
+tags surrounding the result tree output so the results can be displayed/viewed in a browser\&.
+.RE
+.PP
+\fB\-\-insert\fR
+.RS 4
+Test for valid insertions\&.
+.RE
+.PP
+\fB\-\-loaddtd\fR
+.RS 4
+Fetch an external
+DTD\&.
+.RE
+.PP
+\fB\-\-load\-trace\fR
+.RS 4
+Display all the documents loaded during the processing to
+stderr\&.
+.RE
+.PP
+\fB\-\-maxmem \fR\fB\fINNBYTES\fR\fR
+.RS 4
+Test the parser memory support\&.
+\fINNBYTES\fR
+is the maximum number of bytes the library is allowed to allocate\&. This can also be used to make sure batch processing of
+XML
+files will not exhaust the virtual memory of the server running them\&.
+.RE
+.PP
+\fB\-\-memory\fR
+.RS 4
+Parse from memory\&.
+.RE
+.PP
+\fB\-\-noblanks\fR
+.RS 4
+Drop ignorable blank spaces\&.
+.RE
+.PP
+\fB\-\-nocatalogs\fR
+.RS 4
+Do not use any catalogs\&.
+.RE
+.PP
+\fB\-\-nocdata\fR
+.RS 4
+Substitute CDATA section by equivalent text nodes\&.
+.RE
+.PP
+\fB\-\-noent\fR
+.RS 4
+Substitute entity values for entity references\&. By default,
+\fBxmllint\fR
+leaves entity references in place\&.
+.RE
+.PP
+\fB\-\-nonet\fR
+.RS 4
+Do not use the Internet to fetch
+DTDs or entities\&.
+.RE
+.PP
+\fB\-\-noout\fR
+.RS 4
+Suppress output\&. By default,
+\fBxmllint\fR
+outputs the result tree\&.
+.RE
+.PP
+\fB\-\-nowarning\fR
+.RS 4
+Do not emit warnings from the parser and/or validator\&.
+.RE
+.PP
+\fB\-\-nowrap\fR
+.RS 4
+Do not output
+HTML
+doc wrapper\&.
+.RE
+.PP
+\fB\-\-noxincludenode\fR
+.RS 4
+Do XInclude processing but do not generate XInclude start and end nodes\&.
+.RE
+.PP
+\fB\-\-nsclean\fR
+.RS 4
+Remove redundant namespace declarations\&.
+.RE
+.PP
+\fB\-\-output \fR\fB\fIFILE\fR\fR
+.RS 4
+Define a file path where
+\fBxmllint\fR
+will save the result of parsing\&. Usually the programs build a tree and save it on
+stdout, with this option the result
+XML
+instance will be saved onto a file\&.
+.RE
+.PP
+\fB\-\-path "\fR\fB\fIPATH(S)\fR\fR\fB"\fR
+.RS 4
+Use the (space\- or colon\-separated) list of filesystem paths specified by
+\fIPATHS\fR
+to load
+DTDs or entities\&. Enclose space\-separated lists by quotation marks\&.
+.RE
+.PP
+\fB\-\-pattern \fR\fB\fIPATTERNVALUE\fR\fR
+.RS 4
+Used to exercise the pattern recognition engine, which can be used with the reader interface to the parser\&. It allows to select some nodes in the document based on an XPath (subset) expression\&. Used for debugging\&.
+.RE
+.PP
+\fB\-\-postvalid\fR
+.RS 4
+Validate after parsing has completed\&.
+.RE
+.PP
+\fB\-\-push\fR
+.RS 4
+Use the push mode of the parser\&.
+.RE
+.PP
+\fB\-\-recover\fR
+.RS 4
+Output any parsable portions of an invalid document\&.
+.RE
+.PP
+\fB\-\-relaxng \fR\fB\fISCHEMA\fR\fR
+.RS 4
+Use RelaxNG file named
+\fISCHEMA\fR
+for validation\&.
+.RE
+.PP
+\fB\-\-repeat\fR
+.RS 4
+Repeat 100 times, for timing or profiling\&.
+.RE
+.PP
+\fB\-\-schema \fR\fB\fISCHEMA\fR\fR
+.RS 4
+Use a W3C
+XML
+Schema file named
+\fISCHEMA\fR
+for validation\&.
+.RE
+.PP
+\fB\-\-shell\fR
+.RS 4
+Run a navigating shell\&. Details on available commands in shell mode are below (see
+the section called \(lqSHELL COMMANDS\(rq)\&.
+.RE
+.PP
+\fB\-\-xpath "\fR\fB\fIXPath_expression\fR\fR\fB"\fR
+.RS 4
+Run an XPath expression given as argument and print the result\&. In case of a nodeset result, each node in the node set is serialized in full in the output\&. In case of an empty node set the "XPath set is empty" result will be shown and an error exit code will be returned\&.
+.RE
+.PP
+\fB\-\-stream\fR
+.RS 4
+Use streaming
+API
+\- useful when used in combination with
+\fB\-\-relaxng\fR
+or
+\fB\-\-valid\fR
+options for validation of files that are too large to be held in memory\&.
+.RE
+.PP
+\fB\-\-testIO\fR
+.RS 4
+Test user input/output support\&.
+.RE
+.PP
+\fB\-\-timing\fR
+.RS 4
+Output information about the time it takes
+\fBxmllint\fR
+to perform the various steps\&.
+.RE
+.PP
+\fB\-\-valid\fR
+.RS 4
+Determine if the document is a valid instance of the included Document Type Definition (DTD)\&. A
+DTD
+to be validated against also can be specified at the command line using the
+\fB\-\-dtdvalid\fR
+option\&. By default,
+\fBxmllint\fR
+also checks to determine if the document is well\-formed\&.
+.RE
+.PP
+\fB\-\-version\fR
+.RS 4
+Display the version of
+\fBlibxml\fR(3)
+used\&.
+.RE
+.PP
+\fB\-\-walker\fR
+.RS 4
+Test the walker module, which is a reader interface but for a document tree, instead of using the reader
+API
+on an unparsed document it works on an existing in\-memory tree\&. Used for debugging\&.
+.RE
+.PP
+\fB\-\-xinclude\fR
+.RS 4
+Do XInclude processing\&.
+.RE
+.PP
+\fB\-\-xmlout\fR
+.RS 4
+Used in conjunction with
+\fB\-\-html\fR\&. Usually when
+HTML
+is parsed the document is saved with the
+HTML
+serializer\&. But with this option the resulting document is saved with the
+XML
+serializer\&. This is primarily used to generate
+XHTML
+from
+HTML
+input\&.
+.RE
+.SH "SHELL COMMANDS"
+.PP
+\fBxmllint\fR
+offers an interactive shell mode invoked with the
+\fB\-\-shell\fR
+command\&. Available commands in shell mode include (in alphabetical order):
+.PP
+\fBbase\fR
+.RS 4
+Display
+XML
+base of the node\&.
+.RE
+.PP
+\fBbye\fR
+.RS 4
+Leave the shell\&.
+.RE
+.PP
+\fBcat \fR\fB\fINODE\fR\fR
+.RS 4
+Display the given node or the current one\&.
+.RE
+.PP
+\fBcd \fR\fB\fIPATH\fR\fR
+.RS 4
+Change the current node to the given path (if unique) or root if no argument is given\&.
+.RE
+.PP
+\fBdir \fR\fB\fIPATH\fR\fR
+.RS 4
+Dumps information about the node (namespace, attributes, content)\&.
+.RE
+.PP
+\fBdu \fR\fB\fIPATH\fR\fR
+.RS 4
+Show the structure of the subtree under the given path or the current node\&.
+.RE
+.PP
+\fBexit\fR
+.RS 4
+Leave the shell\&.
+.RE
+.PP
+\fBhelp\fR
+.RS 4
+Show this help\&.
+.RE
+.PP
+\fBfree\fR
+.RS 4
+Display memory usage\&.
+.RE
+.PP
+\fBload \fR\fB\fIFILENAME\fR\fR
+.RS 4
+Load a new document with the given filename\&.
+.RE
+.PP
+\fBls \fR\fB\fIPATH\fR\fR
+.RS 4
+List contents of the given path or the current directory\&.
+.RE
+.PP
+\fBpwd\fR
+.RS 4
+Display the path to the current node\&.
+.RE
+.PP
+\fBquit\fR
+.RS 4
+Leave the shell\&.
+.RE
+.PP
+\fBsave \fR\fB\fIFILENAME\fR\fR
+.RS 4
+Save the current document to the given filename or to the original name\&.
+.RE
+.PP
+\fBvalidate\fR
+.RS 4
+Check the document for errors\&.
+.RE
+.PP
+\fBwrite \fR\fB\fIFILENAME\fR\fR
+.RS 4
+Write the current node to the given filename\&.
+.RE
+.SH "ENVIRONMENT"
+.PP
+\fBSGML_CATALOG_FILES\fR
+.RS 4
+SGML
+catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
+\fBSGML_CATALOG_FILES\fR
+environment variable to a list of catalogs\&. An empty one should deactivate loading the default
+/etc/sgml/catalog
+catalog\&.
+.RE
+.PP
+\fBXML_CATALOG_FILES\fR
+.RS 4
+XML
+catalog behavior can be changed by redirecting queries to the user\*(Aqs own set of catalogs\&. This can be done by setting the
+\fBXML_CATALOG_FILES\fR
+environment variable to a list of catalogs\&. An empty one should deactivate loading the default
+/etc/xml/catalog
+catalog\&.
+.RE
+.PP
+\fBXML_DEBUG_CATALOG\fR
+.RS 4
+Setting the environment variable
+\fBXML_DEBUG_CATALOG\fR
+to
+\fInon\-zero\fR
+using the
+\fBexport\fR
+command outputs debugging information related to catalog operations\&.
+.RE
+.PP
+\fBXMLLINT_INDENT\fR
+.RS 4
+Setting the environment variable
+\fBXMLLINT_INDENT\fR
+controls the indentation\&. The default value is two spaces " "\&.
+.RE
+.SH "DIAGNOSTICS"
+.PP
+\fBxmllint\fR
+return codes provide information that can be used when calling it from scripts\&.
+.PP
+\fB0\fR
+.RS 4
+No error
+.RE
+.PP
+\fB1\fR
+.RS 4
+Unclassified
+.RE
+.PP
+\fB2\fR
+.RS 4
+Error in
+DTD
+.RE
+.PP
+\fB3\fR
+.RS 4
+Validation error
+.RE
+.PP
+\fB4\fR
+.RS 4
+Validation error
+.RE
+.PP
+\fB5\fR
+.RS 4
+Error in schema compilation
+.RE
+.PP
+\fB6\fR
+.RS 4
+Error writing output
+.RE
+.PP
+\fB7\fR
+.RS 4
+Error in pattern (generated when
+\fB\-\-pattern\fR
+option is used)
+.RE
+.PP
+\fB8\fR
+.RS 4
+Error in Reader registration (generated when
+\fB\-\-chkregister\fR
+option is used)
+.RE
+.PP
+\fB9\fR
+.RS 4
+Out of memory error
+.RE
+.SH "SEE ALSO"
+.PP
+\fBlibxml\fR(3)
+.PP
+More information can be found at
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\fBlibxml\fR(3)
+web page
+\m[blue]\fB\%http://www.xmlsoft.org/\fR\m[]
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+W3C
+XSLT
+page
+\m[blue]\fB\%http://www.w3.org/TR/xslt\fR\m[]
+.RE
+.sp
+.SH "AUTHORS"
+.PP
+\fBJohn Fleck\fR <\&jfleck@inkstain\&.net\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBZiying Sherwin\fR <\&sherwin@nlm\&.nih\&.gov\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBHeiko Rupp\fR <\&hwr@pilhuhn\&.de\&>
+.RS 4
+Author.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2001, 2004
+.br
diff --git a/doc/xmllint.html b/doc/xmllint.html
new file mode 100644
index 0000000..0a55877
--- /dev/null
+++ b/doc/xmllint.html
@@ -0,0 +1,175 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xmllint</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="id2876302"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>Name</h2><p>xmllint &#8212; command line <span class="acronym">XML</span> tool</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><tt class="command">xmllint</tt> [[--version] | [--debug] | [--shell] | [--debugent] | [--copy] | [--recover] | [--noent] | [--noout] | [--nonet] | [--htmlout] | [--nowrap] | [--valid] | [--postvalid] | [--dtdvalid <i class="replaceable"><tt>URL</tt></i>] | [--dtdvalidfpi <i class="replaceable"><tt>FPI</tt></i>] | [--timing] | [--output <i class="replaceable"><tt>file</tt></i>] | [--repeat] | [--insert] | [--compress] | [--html] | [--xmlout] | [--push] | [--memory] | [--maxmem <i class="replaceable"><tt>nbbytes</tt></i>] | [--nowarning] | [--noblanks] | [--nocdata] | [--format] | [--encode <i class="replaceable"><tt>encoding</tt></i>] | [--dropdtd] | [--nsclean] | [--testIO] | [--catalogs] | [--nocatalogs] | [--auto] | [--xinclude] | [--noxincludenode] | [--loaddtd] | [--dtdattr] | [--stream] | [--walker] | [--pattern <i class="replaceable"><tt>patternvalue</tt></i>] | [--chkregister] | [--relaxng] | [--schema] | [--c14n]] [<tt class="option"><i class="replaceable"><tt>xmlfile</tt></i></tt>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+ The xmllint program parses one or more XML files, specified on the
+ command line as <i class="replaceable"><tt>xmlfile</tt></i>. It prints various
+ types of output, depending upon the options selected. It is useful for
+ detecting errors both in <span class="acronym">XML</span> code and in the
+ <span class="acronym">XML</span> parser itself.
+ </p><p>
+ It is included in <span class="application">libxml2</span>.
+ </p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><tt class="option">--version</tt></span></dt><dd>
+ Display the version of
+ <span class="application">libxml2</span> used.
+ </dd><dt><span class="term"><tt class="option">--debug</tt></span></dt><dd>
+ Parse a file and output an annotated tree of the
+ in-memory version of the document.
+ </dd><dt><span class="term"><tt class="option">--shell</tt></span></dt><dd>
+ Run a navigating shell. Details on available commands in shell mode
+ are below.
+ </dd><dt><span class="term"><tt class="option">--debugent</tt></span></dt><dd>
+ Debug the entities defined in the document.
+ </dd><dt><span class="term"><tt class="option">--copy</tt> </span></dt><dd>
+ Test the internal copy implementation.
+ </dd><dt><span class="term"><tt class="option">--recover</tt></span></dt><dd>
+ Output any parsable portions of an invalid
+ document.
+ </dd><dt><span class="term"><tt class="option">--noent</tt></span></dt><dd>
+ Substitute entity values for entity
+ references. By default, <span class="application">xmllint</span> leaves entity
+ references in place.
+ </dd><dt><span class="term"><tt class="option">--nocdata</tt></span></dt><dd>
+ Substitute CDATA section by equivalent text nodes.
+ </dd><dt><span class="term"><tt class="option">--nsclean</tt></span></dt><dd>
+ Remove redundant namespace declarations.
+ </dd><dt><span class="term"><tt class="option">--noout</tt></span></dt><dd>
+ Suppress output. By default,
+ <span class="application">xmllint</span> outputs the result tree.
+ </dd><dt><span class="term"><tt class="option">--htmlout</tt></span></dt><dd>
+ Output results as an <span class="acronym">HTML</span>
+ file. This causes <span class="application">xmllint</span> to output
+ the necessary <span class="acronym">HTML</span> tags surrounding the result tree
+ output so the results can be displayed in a browser.
+ </dd><dt><span class="term"><tt class="option">--nowrap </tt></span></dt><dd>
+ Do not output HTML doc wrapper.
+ </dd><dt><span class="term"><tt class="option">--valid </tt></span></dt><dd>
+ Determine if the document is a valid instance
+ of the included Document Type Definition (<span class="acronym">DTD</span>). A
+ <span class="acronym">DTD</span> to be validated against also can be specified at
+ the command line using the <tt class="option">--dtdvalid</tt> option. By default,
+ <span class="application">xmllint</span> also checks to determine if the
+ document is well-formed.
+ </dd><dt><span class="term"><tt class="option">--postvalid</tt></span></dt><dd>
+ Validate after parsing is completed.
+ </dd><dt><span class="term"> <tt class="option">--dtdvalid</tt> <i class="replaceable"><tt>URL</tt></i></span></dt><dd>
+ Use the
+ <span class="acronym">DTD</span> specified by <i class="replaceable"><tt>URL</tt></i> for
+ validation.
+ </dd><dt><span class="term"> <tt class="option">--dtdvalidfpi</tt> <i class="replaceable"><tt>FPI</tt></i></span></dt><dd>
+ Use the
+ <span class="acronym">DTD</span> specified by the Public Identifier
+ <i class="replaceable"><tt>FPI</tt></i> for validation, note that this
+ will require a Catalog exporting that Public Identifier to work.
+ </dd><dt><span class="term"><tt class="option">--timing</tt></span></dt><dd>
+ Output information about the time it takes
+ <span class="application">xmllint</span> to perform the various steps.
+ </dd><dt><span class="term"><tt class="option">--output</tt> <i class="replaceable"><tt>file</tt></i></span></dt><dd>Define a file path where xmllint will save the result of
+ parsing. Usually the programs build a tree and save it on stdout, with
+ this option the result XML instance will be saved onto a file.</dd><dt><span class="term"><tt class="option">--repeat</tt></span></dt><dd>
+ Repeat 100 times, for timing or profiling.
+ </dd><dt><span class="term"><tt class="option">--insert</tt></span></dt><dd>
+ Test for valid insertions.
+ </dd><dt><span class="term"><tt class="option">--compress</tt></span></dt><dd>
+ Turn on gzip compression of output.
+ </dd><dt><span class="term"><tt class="option">--html</tt></span></dt><dd>
+ Use the <span class="acronym">HTML</span> parser.
+ </dd><dt><span class="term"><tt class="option">--xmlout</tt></span></dt><dd>Used in conjunction with <tt class="option">--html</tt>. Usually
+ when HTML is parsed the document is saved with the HTML serializer, but with
+ this option the resulting document is saved with the XML serializer. This is
+ primarily used to generate XHTML from HTML input.</dd><dt><span class="term"><tt class="option">--push</tt></span></dt><dd>
+ Use the push mode of the parser.
+ </dd><dt><span class="term"><tt class="option">--memory</tt></span></dt><dd>
+ Parse from memory.
+ </dd><dt><span class="term"><tt class="option">--maxmem</tt> <i class="replaceable"><tt>nnbytes</tt></i></span></dt><dd>Test the parser memory
+ support. <i class="replaceable"><tt>nnbytes</tt></i> is the maximum number of bytes the
+ library is allowed to allocate. This can also be used to make sure batch
+ processing of XML files will not exhaust the virtual memory of the server
+ running them.</dd><dt><span class="term"><tt class="option">--nowarning</tt></span></dt><dd>
+ Do not emit warnings from the parser and/or validator.
+ </dd><dt><span class="term"><tt class="option">--noblanks</tt></span></dt><dd>
+ Drop ignorable blank spaces.
+ </dd><dt><span class="term"><tt class="option">--format</tt></span></dt><dd>
+ Reformat and reindent the output. The $XMLLINT_INDENT
+ environment variable controls the indentation (default
+ value is two spaces " ").
+ </dd><dt><span class="term"><tt class="option">--testIO</tt></span></dt><dd>
+ Test user input/output support.
+ </dd><dt><span class="term"><tt class="option">--encode</tt> <i class="replaceable"><tt>encoding</tt></i></span></dt><dd>
+ Output in the given encoding.
+ </dd><dt><span class="term"><tt class="option">--catalogs</tt></span></dt><dd>
+ Use the catalogs from $SGML_CATALOG_FILES. Otherwise /etc/xml/catalog
+ is used by default.
+ </dd><dt><span class="term"><tt class="option">--nocatalogs</tt></span></dt><dd>
+ Do not use any catalogs.
+ </dd><dt><span class="term"><tt class="option">--auto</tt></span></dt><dd>
+ Generate a small document for testing purposes.
+ </dd><dt><span class="term"><tt class="option">--xinclude</tt></span></dt><dd>
+ Do XInclude processing.
+ </dd><dt><span class="term"><tt class="option">--noxincludenode</tt></span></dt><dd>
+ Do XInclude processing but do not generate XInclude start and end
+ nodes.
+ </dd><dt><span class="term"><tt class="option">--loaddtd</tt></span></dt><dd>
+ Fetch external DTD.
+ </dd><dt><span class="term"><tt class="option">--dtdattr</tt></span></dt><dd>
+ Fetch external DTD and populate the tree with inherited attributes.
+ </dd><dt><span class="term"><tt class="option">--dropdtd</tt></span></dt><dd>
+ Remove <span class="acronym">DTD</span> from output.
+ </dd><dt><span class="term"><tt class="option">--stream</tt></span></dt><dd>Use streaming API - useful when used in combination with
+ --relaxng or --valid options for validation of files that are
+ too large to be held in memory.</dd><dt><span class="term"><tt class="option">--walker</tt></span></dt><dd>Test the walker module, which is a reader interface but for a
+ document tree, instead of using the reader API on an unparsed document it
+ works on a existing in-memory tree. Used in debugging.</dd><dt><span class="term"><tt class="option">--chkregister</tt></span></dt><dd>Turn on node registration. Useful for developers testing
+ libxml2 node tracking code.</dd><dt><span class="term"><tt class="option">--pattern</tt> <i class="replaceable"><tt>patternvalue</tt></i></span></dt><dd>Used to exercise the pattern recognition engine, which can be
+ used with the reader interface to the parser. It allows to select some
+ nodes in the document based on an XPath (subset) expression. Used for
+ debugging.</dd><dt><span class="term"><tt class="option">--relaxng</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use RelaxNG file named <i class="replaceable"><tt>schema</tt></i> for
+ validation.</dd><dt><span class="term"><tt class="option">--schema</tt> <i class="replaceable"><tt>schema</tt></i></span></dt><dd>Use a W3C XML Schema file named <i class="replaceable"><tt>schema</tt></i> for validation.</dd><dt><span class="term">
+ <tt class="option">--c14n</tt></span></dt><dd>Use the W3C XML Canonicalisation (C14N) to
+serialize the result of parsing to stdout. It keeps comments in
+the result.</dd></dl></div></div><div class="refsect1" lang="en"><a name="shell"></a><h2>Shell</h2><p>
+ <span class="application">xmllint</span> offers an interactive shell mode
+ invoked with the <tt class="option">--shell</tt> command. Available commands in
+ shell mode include:
+ </p><div class="variablelist"><dl><dt><span class="term"><tt class="option">base</tt></span></dt><dd>
+ display XML base of the node
+ </dd><dt><span class="term"><tt class="option">bye</tt></span></dt><dd>
+ leave shell
+ </dd><dt><span class="term"><tt class="option">cat <i class="replaceable"><tt>node</tt></i></tt></span></dt><dd>
+ Display node if given or current node.
+ </dd><dt><span class="term"><tt class="option">cd <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+ Change the current node to <i class="replaceable"><tt>path</tt></i> (if given
+ and unique) or root if no argument given.
+ </dd><dt><span class="term"><tt class="option">dir <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+ Dumps information about the node (namespace, attributes, content).
+ </dd><dt><span class="term"><tt class="option">du <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+ Show the structure of the subtree under path or the current node.
+ </dd><dt><span class="term"><tt class="option">exit</tt></span></dt><dd>
+ Leave the shell.
+ </dd><dt><span class="term"><tt class="option">help</tt></span></dt><dd>
+ Show this help.
+ </dd><dt><span class="term"><tt class="option">free</tt></span></dt><dd>
+ Display memory usage.
+ </dd><dt><span class="term"><tt class="option">load <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+ Load a new document with the given name.
+ </dd><dt><span class="term"><tt class="option">ls <i class="replaceable"><tt>path</tt></i></tt></span></dt><dd>
+ List contents of <i class="replaceable"><tt>path</tt></i> (if given) or the
+ current directory.
+ </dd><dt><span class="term"><tt class="option">pwd</tt></span></dt><dd>
+ Display the path to the current node.
+ </dd><dt><span class="term"><tt class="option">quit</tt></span></dt><dd>
+ Leave the shell.
+ </dd><dt><span class="term"><tt class="option">save <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+ Saves the current document to <i class="replaceable"><tt>name</tt></i> if
+ given or to the original name.
+ </dd><dt><span class="term"><tt class="option">validate</tt></span></dt><dd>
+ Check the document for error.
+ </dd><dt><span class="term"><tt class="option">write <i class="replaceable"><tt>name</tt></i></tt></span></dt><dd>
+ Write the current node to the given filename.
+ </dd></dl></div></div><div class="refsect1" lang="en"><h2>Catalogs</h2><p>Catalog behavior can be changed by redirecting
+ queries to the user's own set of catalogs. This can be done by setting the
+ <tt class="varname">XML_CATALOG_FILES</tt> environment variable to a list of
+ catalogs. An empty one should deactivate loading the default
+ <tt class="filename">/etc/xml/catalog</tt> default catalog.</p></div><div class="refsect1" lang="en"><h2>Debugging Catalogs</h2><p>Setting the environment variable <tt class="varname">XML_DEBUG_CATALOG</tt>
+ using the command <b class="command">"export XML_DEBUG_CATALOG="</b>
+ outputs debugging information related to catalog operations.</p></div><div class="refsect1" lang="en"><h2>Error Return Codes</h2><p>On the completion of execution, <span class="application">Xmllint</span>
+ returns the following error codes:</p><div class="variablelist"><dl><dt><span class="term">0</span></dt><dd>No error</dd><dt><span class="term">1</span></dt><dd>Unclassified</dd><dt><span class="term">2</span></dt><dd>Error in DTD</dd><dt><span class="term">3</span></dt><dd>Validation error</dd><dt><span class="term">4</span></dt><dd>Validation error</dd><dt><span class="term">5</span></dt><dd>Error in schema compilation</dd><dt><span class="term">6</span></dt><dd>Error writing output</dd><dt><span class="term">7</span></dt><dd>Error in pattern (generated when
+ [<span class="optional">--pattern</span>] option is used)</dd><dt><span class="term">8</span></dt><dd>Error in Reader registration (generated when
+ [<span class="optional">--chkregister</span>] option is used)</dd><dt><span class="term">9</span></dt><dd>Out of memory error</dd></dl></div></div></div></body></html>
diff --git a/doc/xmllint.xml b/doc/xmllint.xml
new file mode 100644
index 0000000..1008179
--- /dev/null
+++ b/doc/xmllint.xml
@@ -0,0 +1,930 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"
+ href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+
+ <!ENTITY xmllint "<command>xmllint</command>">
+]>
+
+<refentry>
+
+<refentryinfo>
+ <title>xmllint Manual</title>
+ <productname>libxml2</productname>
+ <copyright>
+ <year>2001</year>
+ <year>2004</year>
+ </copyright>
+ <authorgroup>
+ <author>
+ <firstname>John</firstname>
+ <surname>Fleck</surname>
+ <affiliation>
+ <address>
+ <email>jfleck@inkstain.net</email>
+ </address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Ziying</firstname>
+ <surname>Sherwin</surname>
+ <affiliation>
+ <address>
+ <email>sherwin@nlm.nih.gov</email>
+ </address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Heiko</firstname>
+ <surname>Rupp</surname>
+ <affiliation>
+ <address>
+ <email>hwr@pilhuhn.de</email>
+ </address>
+ </affiliation>
+ </author>
+ </authorgroup>
+ <!-- date should be the date of the latest change or the release version -->
+ <date>$Date$</date>
+ <!-- still a bit buggy output, will talk to docbook-xsl upstream to fix this -->
+ <!-- <releaseinfo>This is release 0.5 of the xmllint Manual.</releaseinfo> -->
+ <!-- <edition>0.5</edition> -->
+</refentryinfo>
+
+<refmeta>
+ <refentrytitle>xmllint</refentrytitle>
+ <manvolnum>1</manvolnum>
+</refmeta>
+
+<refnamediv>
+ <refname>xmllint</refname>
+ <refpurpose>command line <acronym>XML</acronym> tool</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>xmllint</command>
+ <group choice="opt">
+ <arg choice="plain"><option>--version</option></arg>
+ <arg choice="plain"><option>--debug</option></arg>
+ <arg choice="plain"><option>--shell</option></arg>
+ <arg choice="plain"><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></arg>
+ <arg choice="plain"><option>--debugent</option></arg>
+ <arg choice="plain"><option>--copy</option></arg>
+ <arg choice="plain"><option>--recover</option></arg>
+ <arg choice="plain"><option>--noent</option></arg>
+ <arg choice="plain"><option>--noout</option></arg>
+ <arg choice="plain"><option>--nonet</option></arg>
+ <arg choice="plain"><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></arg>
+ <arg choice="plain"><option>--load-trace</option></arg>
+ <arg choice="plain"><option>--htmlout</option></arg>
+ <arg choice="plain"><option>--nowrap</option></arg>
+ <arg choice="plain"><option>--valid</option></arg>
+ <arg choice="plain"><option>--postvalid</option></arg>
+ <arg choice="plain"><option>--dtdvalid <replaceable class="option">URL</replaceable></option></arg>
+ <arg choice="plain"><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></arg>
+ <arg choice="plain"><option>--timing</option></arg>
+ <arg choice="plain"><option>--output <replaceable class="option">FILE</replaceable></option></arg>
+ <arg choice="plain"><option>--repeat</option></arg>
+ <arg choice="plain"><option>--insert</option></arg>
+ <arg choice="plain"><option>--compress</option></arg>
+ <arg choice="plain"><option>--html</option></arg>
+ <arg choice="plain"><option>--xmlout</option></arg>
+ <arg choice="plain"><option>--push</option></arg>
+ <arg choice="plain"><option>--memory</option></arg>
+ <arg choice="plain"><option>--maxmem <replaceable class="option">NBBYTES</replaceable></option></arg>
+ <arg choice="plain"><option>--nowarning</option></arg>
+ <arg choice="plain"><option>--noblanks</option></arg>
+ <arg choice="plain"><option>--nocdata</option></arg>
+ <arg choice="plain"><option>--format</option></arg>
+ <arg choice="plain"><option>--encode <replaceable class="option">ENCODING</replaceable></option></arg>
+ <arg choice="plain"><option>--dropdtd</option></arg>
+ <arg choice="plain"><option>--nsclean</option></arg>
+ <arg choice="plain"><option>--testIO</option></arg>
+ <arg choice="plain"><option>--catalogs</option></arg>
+ <arg choice="plain"><option>--nocatalogs</option></arg>
+ <arg choice="plain"><option>--auto</option></arg>
+ <arg choice="plain"><option>--xinclude</option></arg>
+ <arg choice="plain"><option>--noxincludenode</option></arg>
+ <arg choice="plain"><option>--loaddtd</option></arg>
+ <arg choice="plain"><option>--dtdattr</option></arg>
+ <arg choice="plain"><option>--stream</option></arg>
+ <arg choice="plain"><option>--walker</option></arg>
+ <arg choice="plain"><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></arg>
+ <arg choice="plain"><option>--chkregister</option></arg>
+ <arg choice="plain"><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></arg>
+ <arg choice="plain"><option>--schema <replaceable class="option">SCHEMA</replaceable></option></arg>
+ <arg choice="plain"><option>--c14n</option></arg>
+ </group>
+ <group choice="req">
+ <arg choice="plain" rep="repeat"><replaceable>XML-FILE(S)</replaceable></arg>
+ <arg choice="plain" rep="norepeat">-</arg>
+ </group>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>xmllint</command>
+ <arg choice="plain"><option>--help</option></arg>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1 id="description">
+ <title>DESCRIPTION</title>
+ <para>
+ The &xmllint; program parses one or more <acronym>XML</acronym> files,
+ specified on the command line as <replaceable>XML-FILE</replaceable>
+ (or the standard input if the filename provided
+ is <emphasis role="bold">-</emphasis> ). It prints various types of
+ output, depending upon the options selected. It is useful for detecting
+ errors both in <acronym>XML</acronym> code and in
+ the <acronym>XML</acronym> parser itself.
+ </para>
+ <para>&xmllint; is included in <citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry>.</para>
+</refsect1>
+
+<refsect1 id="options">
+ <title>OPTIONS</title>
+ <para>
+ &xmllint; accepts the following options (in alphabetical order):
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term><option>--auto</option></term>
+ <listitem>
+ <para>Generate a small document for testing purposes.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--catalogs</option></term>
+ <listitem>
+ <para>
+ Use the <acronym>SGML</acronym> catalog(s) from <envar>SGML_CATALOG_FILES</envar>.
+ Otherwise <acronym>XML</acronym> catalogs starting
+ from <filename>/etc/xml/catalog</filename> are used by default.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--chkregister</option></term>
+ <listitem>
+ <para>
+ Turn on node registration. Useful for developers testing <citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry> node tracking code.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--compress</option></term>
+ <listitem>
+ <para>
+ Turn on <citerefentry>
+ <refentrytitle>gzip</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> compression of output.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--copy</option></term>
+ <listitem>
+ <para>Test the internal copy implementation.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--c14n</option></term>
+ <listitem>
+ <para>
+ Use the W3C <acronym>XML</acronym> Canonicalisation (<acronym>C14N</acronym>) to
+ serialize the result of parsing to <filename class="devicefile">stdout</filename>.
+ It keeps comments in the result.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--dtdvalid <replaceable class="option">URL</replaceable></option></term>
+ <listitem>
+ <para>
+ Use the <acronym>DTD</acronym> specified by
+ an <replaceable>URL</replaceable> for validation.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--dtdvalidfpi <replaceable class="option">FPI</replaceable></option></term>
+ <listitem>
+ <para>
+ Use the <acronym>DTD</acronym> specified by a Formal Public
+ Identifier <replaceable>FPI</replaceable> for validation, note that this
+ will require a catalog exporting that Formal Public Identifier to work.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--debug</option></term>
+ <listitem>
+ <para>
+ Parse a file and output an annotated tree of the
+ in-memory version of the document.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--debugent</option></term>
+ <listitem>
+ <para>Debug the entities defined in the document.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--dropdtd</option></term>
+ <listitem>
+ <para>Remove <acronym>DTD</acronym> from output.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--dtdattr</option></term>
+ <listitem>
+ <para>
+ Fetch external <acronym>DTD</acronym> and populate the tree with
+ inherited attributes.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--encode <replaceable class="option">ENCODING</replaceable></option></term>
+ <listitem>
+ <para>Output in the given encoding. Note that this works for full document not fragments or result from XPath queries.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--format</option></term>
+ <listitem>
+ <para>
+ Reformat and reindent the output. The <envar>XMLLINT_INDENT</envar>
+ environment variable controls the indentation. The default value is two
+ spaces &quot; &quot;).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--help</option></term>
+ <listitem>
+ <para>Print out a short usage summary for &xmllint;.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--html</option></term>
+ <listitem>
+ <para>Use the <acronym>HTML</acronym> parser.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--htmlout</option></term>
+ <listitem>
+ <para>
+ Output results as an <acronym>HTML</acronym> file. This
+ causes &xmllint; to output the necessary <acronym>HTML</acronym>
+ tags surrounding the result tree output so the results can be
+ displayed/viewed in a browser.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--insert</option></term>
+ <listitem>
+ <para>Test for valid insertions.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--loaddtd</option></term>
+ <listitem>
+ <para>Fetch an external <acronym>DTD</acronym>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--load-trace</option></term>
+ <listitem>
+ <para>
+ Display all the documents loaded during the processing
+ to <filename class="devicefile">stderr</filename>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--maxmem <replaceable class="option">NNBYTES</replaceable></option></term>
+ <listitem>
+ <para>
+ Test the parser memory support. <replaceable>NNBYTES</replaceable>
+ is the maximum number of bytes the library is allowed to allocate.
+ This can also be used to make sure batch processing
+ of <acronym>XML</acronym> files will not exhaust the virtual memory
+ of the server running them.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--memory</option></term>
+ <listitem>
+ <para>Parse from memory.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--noblanks</option></term>
+ <listitem>
+ <para>Drop ignorable blank spaces.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nocatalogs</option></term>
+ <listitem>
+ <para>Do not use any catalogs.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nocdata</option></term>
+ <listitem>
+ <para>Substitute CDATA section by equivalent text nodes.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--noent</option></term>
+ <listitem>
+ <para>
+ Substitute entity values for entity references. By default, &xmllint;
+ leaves entity references in place.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nonet</option></term>
+ <listitem>
+ <para>
+ Do not use the Internet to fetch <acronym>DTD</acronym>s or entities.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--noout</option></term>
+ <listitem>
+ <para>
+ Suppress output. By default, &xmllint; outputs the result tree.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nowarning</option></term>
+ <listitem>
+ <para>Do not emit warnings from the parser and/or validator.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nowrap</option></term>
+ <listitem>
+ <para>Do not output <acronym>HTML</acronym> doc wrapper.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--noxincludenode</option></term>
+ <listitem>
+ <para>
+ Do XInclude processing but do not generate XInclude start and end nodes.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--nsclean</option></term>
+ <listitem>
+ <para>Remove redundant namespace declarations.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--output <replaceable class="option">FILE</replaceable></option></term>
+ <listitem>
+ <para>
+ Define a file path where &xmllint; will save the result of parsing.
+ Usually the programs build a tree and save it
+ on <filename class="devicefile">stdout</filename>, with this option
+ the result <acronym>XML</acronym> instance will be saved onto a file.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--path "<replaceable class="option">PATH(S)</replaceable>"</option></term>
+ <listitem>
+ <para>
+ Use the (space- or colon-separated) list of filesystem paths specified
+ by <replaceable>PATHS</replaceable> to load <acronym>DTD</acronym>s or
+ entities. Enclose space-separated lists by quotation marks.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--pattern <replaceable class="option">PATTERNVALUE</replaceable></option></term>
+ <listitem>
+ <para>
+ Used to exercise the pattern recognition engine, which can be used
+ with the reader interface to the parser. It allows to select some
+ nodes in the document based on an XPath (subset) expression. Used
+ for debugging.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--postvalid</option></term>
+ <listitem>
+ <para>Validate after parsing has completed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--push</option></term>
+ <listitem>
+ <para>Use the push mode of the parser.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--recover</option></term>
+ <listitem>
+ <para>Output any parsable portions of an invalid document.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--relaxng <replaceable class="option">SCHEMA</replaceable></option></term>
+ <listitem>
+ <para>
+ Use RelaxNG file named <replaceable class="option">SCHEMA</replaceable>
+ for validation.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--repeat</option></term>
+ <listitem>
+ <para>Repeat 100 times, for timing or profiling.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--schema <replaceable>SCHEMA</replaceable></option></term>
+ <listitem>
+ <para>
+ Use a W3C <acronym>XML</acronym> Schema file
+ named <replaceable>SCHEMA</replaceable> for validation.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--shell</option></term>
+ <listitem>
+ <para>
+ Run a navigating shell. Details on available commands in shell mode
+ are below (see <xref linkend="shell"/>).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--xpath "<replaceable class="option">XPath_expression</replaceable>"</option></term>
+ <listitem>
+ <para>
+ Run an XPath expression given as argument and print the
+ result. In case of a nodeset result, each node in the
+ node set is serialized in full in the output. In case
+ of an empty node set the "XPath set is empty" result
+ will be shown and an error exit code will be returned.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--stream</option></term>
+ <listitem>
+ <para>
+ Use streaming <acronym>API</acronym> - useful when used in combination
+ with <option>--relaxng</option> or <option>--valid</option> options
+ for validation of files that are too large to be held in memory.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--testIO</option></term>
+ <listitem>
+ <para>Test user input/output support.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--timing</option></term>
+ <listitem>
+ <para>
+ Output information about the time it takes &xmllint; to perform the
+ various steps.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--valid</option></term>
+ <listitem>
+ <para>
+ Determine if the document is a valid instance of the included
+ Document Type Definition (<acronym>DTD</acronym>).
+ A <acronym>DTD</acronym> to be validated against also can be
+ specified at the command line using the <option>--dtdvalid</option>
+ option. By default, &xmllint; also checks to determine if the
+ document is well-formed.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>
+ Display the version of <citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry> used.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--walker</option></term>
+ <listitem>
+ <para>
+ Test the walker module, which is a reader interface but for a
+ document tree, instead of using the reader <acronym>API</acronym> on
+ an unparsed document it works on an existing in-memory tree. Used for
+ debugging.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--xinclude</option></term>
+ <listitem>
+ <para>Do XInclude processing.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--xmlout</option></term>
+ <listitem>
+ <para>
+ Used in conjunction with <option>--html</option>. Usually
+ when <acronym>HTML</acronym> is parsed the document is saved with
+ the <acronym>HTML</acronym> serializer. But with this option the
+ resulting document is saved with the <acronym>XML</acronym>
+ serializer. This is primarily used to
+ generate <acronym>XHTML</acronym> from <acronym>HTML</acronym> input.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="shell">
+ <title>SHELL COMMANDS</title>
+ <para>
+ &xmllint; offers an interactive shell mode invoked with
+ the <option>--shell</option> command. Available commands in shell mode
+ include (in alphabetical order):
+ </para>
+ <variablelist>
+
+ <varlistentry>
+ <term><command>base</command></term>
+ <listitem>
+ <para>Display <acronym>XML</acronym> base of the node.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>bye</command></term>
+ <listitem>
+ <para>Leave the shell.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>cat <replaceable>NODE</replaceable></command></term>
+ <listitem>
+ <para>Display the given node or the current one.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>cd <replaceable>PATH</replaceable></command></term>
+ <listitem>
+ <para>
+ Change the current node to the given path (if unique) or root if no
+ argument is given.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>dir <replaceable>PATH</replaceable></command></term>
+ <listitem>
+ <para>
+ Dumps information about the node (namespace, attributes, content).
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>du <replaceable>PATH</replaceable></command></term>
+ <listitem>
+ <para>
+ Show the structure of the subtree under the given path or the current node.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>exit</command></term>
+ <listitem>
+ <para>Leave the shell.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>help</command></term>
+ <listitem>
+ <para>Show this help.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>free</command></term>
+ <listitem>
+ <para>Display memory usage.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>load <replaceable>FILENAME</replaceable></command></term>
+ <listitem>
+ <para>Load a new document with the given filename.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>ls <replaceable>PATH</replaceable></command></term>
+ <listitem>
+ <para>List contents of the given path or the current directory.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>pwd</command></term>
+ <listitem>
+ <para>Display the path to the current node.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>quit</command></term>
+ <listitem>
+ <para>Leave the shell.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>save <replaceable>FILENAME</replaceable></command></term>
+ <listitem>
+ <para>
+ Save the current document to the given filename or to the original name.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>validate</option></term>
+ <listitem>
+ <para>Check the document for errors.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><command>write <replaceable>FILENAME</replaceable></command></term>
+ <listitem>
+ <para>Write the current node to the given filename.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="environment">
+ <title>ENVIRONMENT</title>
+ <variablelist>
+
+ <varlistentry>
+ <term><envar>SGML_CATALOG_FILES</envar></term>
+ <listitem>
+ <para><acronym>SGML</acronym> catalog behavior can be changed by redirecting
+ queries to the user's own set of catalogs. This can be done by setting
+ the <envar>SGML_CATALOG_FILES</envar> environment variable to a list
+ of catalogs. An empty one should deactivate loading the
+ default <filename>/etc/sgml/catalog</filename> catalog.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><envar>XML_CATALOG_FILES</envar></term>
+ <listitem>
+ <para><acronym>XML</acronym> catalog behavior can be changed by redirecting
+ queries to the user's own set of catalogs. This can be done by setting
+ the <envar>XML_CATALOG_FILES</envar> environment variable to a list
+ of catalogs. An empty one should deactivate loading the
+ default <filename>/etc/xml/catalog</filename> catalog.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><envar>XML_DEBUG_CATALOG</envar></term>
+ <listitem>
+ <para>Setting the environment variable <envar>XML_DEBUG_CATALOG</envar>
+ to <parameter>non-zero</parameter> using the <command>export</command>
+ command outputs debugging information related to catalog operations.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><envar>XMLLINT_INDENT</envar></term>
+ <listitem>
+ <para>Setting the environment variable <envar>XMLLINT_INDENT</envar>
+ controls the indentation. The default value is two spaces &quot; &quot;.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="diagnostics">
+ <title>DIAGNOSTICS</title>
+ <para>
+ &xmllint; return codes provide information that can be used when
+ calling it from scripts.
+ </para>
+ <!-- better use segmentedlist element later,
+ which is currently only supported in snapshots -->
+ <variablelist>
+
+ <varlistentry>
+ <term><errorcode>0</errorcode></term>
+ <listitem>
+ <para>No error</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>1</errorcode></term>
+ <listitem>
+ <para>Unclassified</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>2</errorcode></term>
+ <listitem>
+ <para>Error in <acronym>DTD</acronym></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>3</errorcode></term>
+ <listitem>
+ <para>Validation error</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>4</errorcode></term>
+ <listitem>
+ <para>Validation error</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>5</errorcode></term>
+ <listitem>
+ <para>Error in schema compilation</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>6</errorcode></term>
+ <listitem>
+ <para>Error writing output</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>7</errorcode></term>
+ <listitem>
+ <para>
+ Error in pattern (generated when <option>--pattern</option> option is used)
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>8</errorcode></term>
+ <listitem>
+ <para>
+ Error in Reader registration (generated
+ when <option>--chkregister</option> option is used)
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><errorcode>9</errorcode></term>
+ <listitem>
+ <para>Out of memory error</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+</refsect1>
+
+<refsect1 id="seealso">
+ <title>SEE ALSO</title>
+ <para><citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry>
+ </para>
+ <para>
+ More information can be found at
+ <itemizedlist>
+ <listitem>
+ <para><citerefentry>
+ <refentrytitle>libxml</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry> web page <ulink url="http://www.xmlsoft.org/"/>
+ </para>
+ </listitem>
+ <listitem>
+ <para>W3C <acronym>XSLT</acronym> page <ulink url="http://www.w3.org/TR/xslt"/>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+</refsect1>
+
+</refentry>
diff --git a/doc/xmlmem.html b/doc/xmlmem.html
new file mode 100644
index 0000000..ba9e517
--- /dev/null
+++ b/doc/xmlmem.html
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+</style><title>Memory Management</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Memory Management</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="html/index.html" style="font-weight:bold">Reference Manual</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://opencsw.org/packages/libxml2">Solaris binaries</a></li><li><a href="http://www.explain.com.au/oss/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://lxml.de/">lxml Python bindings</a></li><li><a href="http://cpan.uwinnipeg.ca/dist/XML-LibXML">Perl bindings</a></li><li><a href="http://libxmlplusplus.sourceforge.net/">C++ bindings</a></li><li><a href="http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4">PHP bindings</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://libxml.rubyforge.org/">Ruby bindings</a></li><li><a href="http://tclxml.sourceforge.net/">Tcl bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Content:</p><ol>
+ <li><a href="#General3">General overview</a></li>
+ <li><a href="#setting">Setting libxml2 set of memory routines</a></li>
+ <li><a href="#cleanup">Cleaning up after using the library</a></li>
+ <li><a href="#Debugging">Debugging routines</a></li>
+ <li><a href="#General4">General memory requirements</a></li>
+ <li><a href="#Compacting">Returning memory to the kernel</a></li>
+</ol><h3><a name="General3" id="General3">General overview</a></h3><p>The module <code><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlmemory.h</a></code>
+provides the interfaces to the libxml2 memory system:</p><ul>
+ <li>libxml2 does not use the libc memory allocator directly but xmlFree(),
+ xmlMalloc() and xmlRealloc()</li>
+ <li>those routines can be reallocated to a specific set of routine, by
+ default the libc ones i.e. free(), malloc() and realloc()</li>
+ <li>the xmlmemory.c module includes a set of debugging routine</li>
+</ul><h3><a name="setting" id="setting">Setting libxml2 set of memory routines</a></h3><p>It is sometimes useful to not use the default memory allocator, either for
+debugging, analysis or to implement a specific behaviour on memory management
+(like on embedded systems). Two function calls are available to do so:</p><ul>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemGet
+ ()</a> which return the current set of functions in use by the parser</li>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemSetup()</a>
+ which allow to set up a new set of memory allocation functions</li>
+</ul><p>Of course a call to xmlMemSetup() should probably be done before calling
+any other libxml2 routines (unless you are sure your allocations routines are
+compatibles).</p><h3><a name="cleanup" id="cleanup">Cleaning up after using the library</a></h3><p>Libxml2 is not stateless, there is a few set of memory structures needing
+allocation before the parser is fully functional (some encoding structures
+for example). This also mean that once parsing is finished there is a tiny
+amount of memory (a few hundred bytes) which can be recollected if you don't
+reuse the library or any document built with it:</p><ul>
+ <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlCleanupParser
+ ()</a> is a centralized routine to free the library state and data. Note
+ that it won't deallocate any produced tree if any (use the xmlFreeDoc()
+ and related routines for this). This should be called only when the library
+ is not used anymore.</li>
+ <li><a href="http://xmlsoft.org/html/libxml-parser.html">xmlInitParser
+ ()</a> is the dual routine allowing to preallocate the parsing state
+ which can be useful for example to avoid initialization reentrancy
+ problems when using libxml2 in multithreaded applications</li>
+</ul><p>Generally xmlCleanupParser() is safe assuming no parsing is ongoing and
+no document is still being used, if needed the state will be rebuild at the
+next invocation of parser routines (or by xmlInitParser()), but be careful
+of the consequences in multithreaded applications.</p><h3><a name="Debugging" id="Debugging">Debugging routines</a></h3><p>When configured using --with-mem-debug flag (off by default), libxml2 uses
+a set of memory allocation debugging routines keeping track of all allocated
+blocks and the location in the code where the routine was called. A couple of
+other debugging routines allow to dump the memory allocated infos to a file
+or call a specific routine when a given block number is allocated:</p><ul>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMallocLoc()</a>
+ <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlReallocLoc()</a>
+ and <a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemStrdupLoc()</a>
+ are the memory debugging replacement allocation routines</li>
+ <li><a href="http://xmlsoft.org/html/libxml-xmlmemory.html">xmlMemoryDump
+ ()</a> dumps all the information about the allocated memory block lefts
+ in the <code>.memdump</code> file</li>
+</ul><p>When developing libxml2 memory debug is enabled, the tests programs call
+xmlMemoryDump () and the "make test" regression tests will check for any
+memory leak during the full regression test sequence, this helps a lot
+ensuring that libxml2 does not leak memory and bullet proof memory
+allocations use (some libc implementations are known to be far too permissive
+resulting in major portability problems!).</p><p>If the .memdump reports a leak, it displays the allocation function and
+also tries to give some information about the content and structure of the
+allocated blocks left. This is sufficient in most cases to find the culprit,
+but not always. Assuming the allocation problem is reproducible, it is
+possible to find more easily:</p><ol>
+ <li>write down the block number xxxx not allocated</li>
+ <li>export the environment variable XML_MEM_BREAKPOINT=xxxx , the easiest
+ when using GDB is to simply give the command
+ <p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p>
+ <p>before running the program.</p>
+ </li>
+ <li>run the program under a debugger and set a breakpoint on
+ xmlMallocBreakpoint() a specific function called when this precise block
+ is allocated</li>
+ <li>when the breakpoint is reached you can then do a fine analysis of the
+ allocation an step to see the condition resulting in the missing
+ deallocation.</li>
+</ol><p>I used to use a commercial tool to debug libxml2 memory problems but after
+noticing that it was not detecting memory leaks that simple mechanism was
+used and proved extremely efficient until now. Lately I have also used <a href="http://developer.kde.org/~sewardj/">valgrind</a> with quite some
+success, it is tied to the i386 architecture since it works by emulating the
+processor and instruction set, it is slow but extremely efficient, i.e. it
+spot memory usage errors in a very precise way.</p><h3><a name="General4" id="General4">General memory requirements</a></h3><p>How much libxml2 memory require ? It's hard to tell in average it depends
+of a number of things:</p><ul>
+ <li>the parser itself should work in a fixed amount of memory, except for
+ information maintained about the stacks of names and entities locations.
+ The I/O and encoding handlers will probably account for a few KBytes.
+ This is true for both the XML and HTML parser (though the HTML parser
+ need more state).</li>
+ <li>If you are generating the DOM tree then memory requirements will grow
+ nearly linear with the size of the data. In general for a balanced
+ textual document the internal memory requirement is about 4 times the
+ size of the UTF8 serialization of this document (example the XML-1.0
+ recommendation is a bit more of 150KBytes and takes 650KBytes of main
+ memory when parsed). Validation will add a amount of memory required for
+ maintaining the external Dtd state which should be linear with the
+ complexity of the content model defined by the Dtd</li>
+ <li>If you need to work with fixed memory requirements or don't need the
+ full DOM tree then using the <a href="xmlreader.html">xmlReader
+ interface</a> is probably the best way to proceed, it still allows to
+ validate or operate on subset of the tree if needed.</li>
+ <li>If you don't care about the advanced features of libxml2 like
+ validation, DOM, XPath or XPointer, don't use entities, need to work with
+ fixed memory requirements, and try to get the fastest parsing possible
+ then the SAX interface should be used, but it has known restrictions.</li>
+</ul><p></p><h3><a name="Compacting" id="Compacting">Returning memory to the kernel</a></h3><p>You may encounter that your process using libxml2 does not have a
+reduced memory usage although you freed the trees. This is because
+libxml2 allocates memory in a number of small chunks. When freeing one
+of those chunks, the OS may decide that giving this little memory back
+to the kernel will cause too much overhead and delay the operation. As
+all chunks are this small, they get actually freed but not returned to
+the kernel. On systems using glibc, there is a function call
+"malloc_trim" from malloc.h which does this missing operation (note that
+it is allowed to fail). Thus, after freeing your tree you may simply try
+"malloc_trim(0);" to really get the memory back. If your OS does not
+provide malloc_trim, try searching for a similar function.</p><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
diff --git a/doc/xmlreader.html b/doc/xmlreader.html
new file mode 100644
index 0000000..38608c1
--- /dev/null
+++ b/doc/xmlreader.html
@@ -0,0 +1,475 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html">
+ <style type="text/css"></style>
+<!--
+TD {font-family: Verdana,Arial,Helvetica}
+BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
+H1 {font-family: Verdana,Arial,Helvetica}
+H2 {font-family: Verdana,Arial,Helvetica}
+H3 {font-family: Verdana,Arial,Helvetica}
+A:link, A:visited, A:active { text-decoration: underline }
+ </style>
+-->
+ <title>Libxml2 XmlTextReader Interface tutorial</title>
+</head>
+
+<body bgcolor="#fffacd" text="#000000">
+<h1 align="center">Libxml2 XmlTextReader Interface tutorial</h1>
+
+<p></p>
+
+<p>This document describes the use of the XmlTextReader streaming API added
+to libxml2 in version 2.5.0 . This API is closely modeled after the <a
+href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html">XmlTextReader</a>
+and <a
+href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlReader.html">XmlReader</a>
+classes of the C# language.</p>
+
+<p>This tutorial will present the key points of this API, and working
+examples using both C and the Python bindings:</p>
+
+<p>Table of content:</p>
+<ul>
+ <li><a href="#Introducti">Introduction: why a new API</a></li>
+ <li><a href="#Walking">Walking a simple tree</a></li>
+ <li><a href="#Extracting">Extracting informations for the current
+ node</a></li>
+ <li><a href="#Extracting1">Extracting informations for the
+ attributes</a></li>
+ <li><a href="#Validating">Validating a document</a></li>
+ <li><a href="#Entities">Entities substitution</a></li>
+ <li><a href="#L1142">Relax-NG Validation</a></li>
+ <li><a href="#Mixing">Mixing the reader and tree or XPath
+ operations</a></li>
+</ul>
+
+<p></p>
+
+<h2><a name="Introducti">Introduction: why a new API</a></h2>
+
+<p>Libxml2 <a href="http://xmlsoft.org/html/libxml-tree.html">main API is
+tree based</a>, where the parsing operation results in a document loaded
+completely in memory, and expose it as a tree of nodes all availble at the
+same time. This is very simple and quite powerful, but has the major
+limitation that the size of the document that can be hamdled is limited by
+the size of the memory available. Libxml2 also provide a <a
+href="http://www.saxproject.org/">SAX</a> based API, but that version was
+designed upon one of the early <a
+href="http://www.jclark.com/xml/expat.html">expat</a> version of SAX, SAX is
+also not formally defined for C. SAX basically work by registering callbacks
+which are called directly by the parser as it progresses through the document
+streams. The problem is that this programming model is relatively complex,
+not well standardized, cannot provide validation directly, makes entity,
+namespace and base processing relatively hard.</p>
+
+<p>The <a
+href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html">XmlTextReader
+API from C#</a> provides a far simpler programming model. The API acts as a
+cursor going forward on the document stream and stopping at each node in the
+way. The user's code keeps control of the progress and simply calls a
+Read() function repeatedly to progress to each node in sequence in document
+order. There is direct support for namespaces, xml:base, entity handling and
+adding DTD validation on top of it was relatively simple. This API is really
+close to the <a href="http://www.w3.org/TR/DOM-Level-2-Core/">DOM Core
+specification</a> This provides a far more standard, easy to use and powerful
+API than the existing SAX. Moreover integrating extension features based on
+the tree seems relatively easy.</p>
+
+<p>In a nutshell the XmlTextReader API provides a simpler, more standard and
+more extensible interface to handle large documents than the existing SAX
+version.</p>
+
+<h2><a name="Walking">Walking a simple tree</a></h2>
+
+<p>Basically the XmlTextReader API is a forward only tree walking interface.
+The basic steps are:</p>
+<ol>
+ <li>prepare a reader context operating on some input</li>
+ <li>run a loop iterating over all nodes in the document</li>
+ <li>free up the reader context</li>
+</ol>
+
+<p>Here is a basic C sample doing this:</p>
+<pre>#include &lt;libxml/xmlreader.h&gt;
+
+void processNode(xmlTextReaderPtr reader) {
+ /* handling of a node in the tree */
+}
+
+int streamFile(char *filename) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+ reader = xmlNewTextReaderFilename(filename);
+ if (reader != NULL) {
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ printf("%s : failed to parse\n", filename);
+ }
+ } else {
+ printf("Unable to open %s\n", filename);
+ }
+}</pre>
+
+<p>A few things to notice:</p>
+<ul>
+ <li>the include file needed : <code>libxml/xmlreader.h</code></li>
+ <li>the creation of the reader using a filename</li>
+ <li>the repeated call to xmlTextReaderRead() and how any return value
+ different from 1 should stop the loop</li>
+ <li>that a negative return means a parsing error</li>
+ <li>how xmlFreeTextReader() should be used to free up the resources used by
+ the reader.</li>
+</ul>
+
+<p>Here is similar code in python for exactly the same processing:</p>
+<pre>import libxml2
+
+def processNode(reader):
+ pass
+
+def streamFile(filename):
+ try:
+ reader = libxml2.newTextReaderFilename(filename)
+ except:
+ print "unable to open %s" % (filename)
+ return
+
+ ret = reader.Read()
+ while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+ if ret != 0:
+ print "%s : failed to parse" % (filename)</pre>
+
+<p>The only things worth adding are that the <a
+href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html">xmlTextReader
+is abstracted as a class like in C#</a> with the same method names (but the
+properties are currently accessed with methods) and that one doesn't need to
+free the reader at the end of the processing. It will get garbage collected
+once all references have disapeared.</p>
+
+<h2><a name="Extracting">Extracting information for the current node</a></h2>
+
+<p>So far the example code did not indicate how information was extracted
+from the reader. It was abstrated as a call to the processNode() routine,
+with the reader as the argument. At each invocation, the parser is stopped on
+a given node and the reader can be used to query those node properties. Each
+<em>Property</em> is available at the C level as a function taking a single
+xmlTextReaderPtr argument whose name is
+<code>xmlTextReader</code><em>Property</em> , if the return type is an
+<code>xmlChar *</code> string then it must be deallocated with
+<code>xmlFree()</code> to avoid leaks. For the Python interface, there is a
+<em>Property</em> method to the reader class that can be called on the
+instance. The list of the properties is based on the <a
+href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlTextReader.html">C#
+XmlTextReader class</a> set of properties and methods:</p>
+<ul>
+ <li><em>NodeType</em>: The node type, 1 for start element, 15 for end of
+ element, 2 for attributes, 3 for text nodes, 4 for CData sections, 5 for
+ entity references, 6 for entity declarations, 7 for PIs, 8 for comments,
+ 9 for the document nodes, 10 for DTD/Doctype nodes, 11 for document
+ fragment and 12 for notation nodes.</li>
+ <li><em>Name</em>: the <a
+ href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">qualified
+ name</a> of the node, equal to (<em>Prefix</em>:)<em>LocalName</em>.</li>
+ <li><em>LocalName</em>: the <a
+ href="http://www.w3.org/TR/REC-xml-names/#NT-LocalPart">local name</a> of
+ the node.</li>
+ <li><em>Prefix</em>: a shorthand reference to the <a
+ href="http://www.w3.org/TR/REC-xml-names/">namespace</a> associated with
+ the node.</li>
+ <li><em>NamespaceUri</em>: the URI defining the <a
+ href="http://www.w3.org/TR/REC-xml-names/">namespace</a> associated with
+ the node.</li>
+ <li><em>BaseUri:</em> the base URI of the node. See the <a
+ href="http://www.w3.org/TR/xmlbase/">XML Base W3C specification</a>.</li>
+ <li><em>Depth:</em> the depth of the node in the tree, starts at 0 for the
+ root node.</li>
+ <li><em>HasAttributes</em>: whether the node has attributes.</li>
+ <li><em>HasValue</em>: whether the node can have a text value.</li>
+ <li><em>Value</em>: provides the text value of the node if present.</li>
+ <li><em>IsDefault</em>: whether an Attribute node was generated from the
+ default value defined in the DTD or schema (<em>unsupported
+ yet</em>).</li>
+ <li><em>XmlLang</em>: the <a
+ href="http://www.w3.org/TR/REC-xml#sec-lang-tag">xml:lang</a> scope
+ within which the node resides.</li>
+ <li><em>IsEmptyElement</em>: check if the current node is empty, this is a
+ bit bizarre in the sense that <code>&lt;a/&gt;</code> will be considered
+ empty while <code>&lt;a&gt;&lt;/a&gt;</code> will not.</li>
+ <li><em>AttributeCount</em>: provides the number of attributes of the
+ current node.</li>
+</ul>
+
+<p>Let's look first at a small example to get this in practice by redefining
+the processNode() function in the Python example:</p>
+<pre>def processNode(reader):
+ print "%d %d %s %d" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement())</pre>
+
+<p>and look at the result of calling streamFile("tst.xml") for various
+content of the XML test file.</p>
+
+<p>For the minimal document "<code>&lt;doc/&gt;</code>" we get:</p>
+<pre>0 1 doc 1</pre>
+
+<p>Only one node is found, its depth is 0, type 1 indicate an element start,
+of name "doc" and it is empty. Trying now with
+"<code>&lt;doc&gt;&lt;/doc&gt;</code>" instead leads to:</p>
+<pre>0 1 doc 0
+0 15 doc 0</pre>
+
+<p>The document root node is not flagged as empty anymore and both a start
+and an end of element are detected. The following document shows how
+character data are reported:</p>
+<pre>&lt;doc&gt;&lt;a/&gt;&lt;b&gt;some text&lt;/b&gt;
+&lt;c/&gt;&lt;/doc&gt;</pre>
+
+<p>We modifying the processNode() function to also report the node Value:</p>
+<pre>def processNode(reader):
+ print "%d %d %s %d %s" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement(),
+ reader.Value())</pre>
+
+<p>The result of the test is:</p>
+<pre>0 1 doc 0 None
+1 1 a 1 None
+1 1 b 0 None
+2 3 #text 0 some text
+1 15 b 0 None
+1 3 #text 0
+
+1 1 c 1 None
+0 15 doc 0 None</pre>
+
+<p>There are a few things to note:</p>
+<ul>
+ <li>the increase of the depth value (first row) as children nodes are
+ explored</li>
+ <li>the text node child of the b element, of type 3 and its content</li>
+ <li>the text node containing the line return between elements b and c</li>
+ <li>that elements have the Value None (or NULL in C)</li>
+</ul>
+
+<p>The equivalent routine for <code>processNode()</code> as used by
+<code>xmllint --stream --debug</code> is the following and can be found in
+the xmllint.c module in the source distribution:</p>
+<pre>static void processNode(xmlTextReaderPtr reader) {
+ xmlChar *name, *value;
+
+ name = xmlTextReaderName(reader);
+ if (name == NULL)
+ name = xmlStrdup(BAD_CAST "--");
+ value = xmlTextReaderValue(reader);
+
+ printf("%d %d %s %d",
+ xmlTextReaderDepth(reader),
+ xmlTextReaderNodeType(reader),
+ name,
+ xmlTextReaderIsEmptyElement(reader));
+ xmlFree(name);
+ if (value == NULL)
+ printf("\n");
+ else {
+ printf(" %s\n", value);
+ xmlFree(value);
+ }
+}</pre>
+
+<h2><a name="Extracting1">Extracting information for the attributes</a></h2>
+
+<p>The previous examples don't indicate how attributes are processed. The
+simple test "<code>&lt;doc a="b"/&gt;</code>" provides the following
+result:</p>
+<pre>0 1 doc 1 None</pre>
+
+<p>This proves that attribute nodes are not traversed by default. The
+<em>HasAttributes</em> property allow to detect their presence. To check
+their content the API has special instructions. Basically two kinds of operations
+are possible:</p>
+<ol>
+ <li>to move the reader to the attribute nodes of the current element, in
+ that case the cursor is positionned on the attribute node</li>
+ <li>to directly query the element node for the attribute value</li>
+</ol>
+
+<p>In both case the attribute can be designed either by its position in the
+list of attribute (<em>MoveToAttributeNo</em> or <em>GetAttributeNo</em>) or
+by their name (and namespace):</p>
+<ul>
+ <li><em>GetAttributeNo</em>(no): provides the value of the attribute with
+ the specified index no relative to the containing element.</li>
+ <li><em>GetAttribute</em>(name): provides the value of the attribute with
+ the specified qualified name.</li>
+ <li>GetAttributeNs(localName, namespaceURI): provides the value of the
+ attribute with the specified local name and namespace URI.</li>
+ <li><em>MoveToAttributeNo</em>(no): moves the position of the current
+ instance to the attribute with the specified index relative to the
+ containing element.</li>
+ <li><em>MoveToAttribute</em>(name): moves the position of the current
+ instance to the attribute with the specified qualified name.</li>
+ <li><em>MoveToAttributeNs</em>(localName, namespaceURI): moves the position
+ of the current instance to the attribute with the specified local name
+ and namespace URI.</li>
+ <li><em>MoveToFirstAttribute</em>: moves the position of the current
+ instance to the first attribute associated with the current node.</li>
+ <li><em>MoveToNextAttribute</em>: moves the position of the current
+ instance to the next attribute associated with the current node.</li>
+ <li><em>MoveToElement</em>: moves the position of the current instance to
+ the node that contains the current Attribute node.</li>
+</ul>
+
+<p>After modifying the processNode() function to show attributes:</p>
+<pre>def processNode(reader):
+ print "%d %d %s %d %s" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement(),
+ reader.Value())
+ if reader.NodeType() == 1: # Element
+ while reader.MoveToNextAttribute():
+ print "-- %d %d (%s) [%s]" % (reader.Depth(), reader.NodeType(),
+ reader.Name(),reader.Value())</pre>
+
+<p>The output for the same input document reflects the attribute:</p>
+<pre>0 1 doc 1 None
+-- 1 2 (a) [b]</pre>
+
+<p>There are a couple of things to note on the attribute processing:</p>
+<ul>
+ <li>Their depth is the one of the carrying element plus one.</li>
+ <li>Namespace declarations are seen as attributes, as in DOM.</li>
+</ul>
+
+<h2><a name="Validating">Validating a document</a></h2>
+
+<p>Libxml2 implementation adds some extra features on top of the XmlTextReader
+API. The main one is the ability to DTD validate the parsed document
+progressively. This is simply the activation of the associated feature of the
+parser used by the reader structure. There are a few options available
+defined as the enum xmlParserProperties in the libxml/xmlreader.h header
+file:</p>
+<ul>
+ <li>XML_PARSER_LOADDTD: force loading the DTD (without validating)</li>
+ <li>XML_PARSER_DEFAULTATTRS: force attribute defaulting (this also imply
+ loading the DTD)</li>
+ <li>XML_PARSER_VALIDATE: activate DTD validation (this also imply loading
+ the DTD)</li>
+ <li>XML_PARSER_SUBST_ENTITIES: substitute entities on the fly, entity
+ reference nodes are not generated and are replaced by their expanded
+ content.</li>
+ <li>more settings might be added, those were the one available at the 2.5.0
+ release...</li>
+</ul>
+
+<p>The GetParserProp() and SetParserProp() methods can then be used to get
+and set the values of those parser properties of the reader. For example</p>
+<pre>def parseAndValidate(file):
+ reader = libxml2.newTextReaderFilename(file)
+ reader.SetParserProp(libxml2.PARSER_VALIDATE, 1)
+ ret = reader.Read()
+ while ret == 1:
+ ret = reader.Read()
+ if ret != 0:
+ print "Error parsing and validating %s" % (file)</pre>
+
+<p>This routine will parse and validate the file. Error messages can be
+captured by registering an error handler. See python/tests/reader2.py for
+more complete Python examples. At the C level the equivalent call to cativate
+the validation feature is just:</p>
+<pre>ret = xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1)</pre>
+
+<p>and a return value of 0 indicates success.</p>
+
+<h2><a name="Entities">Entities substitution</a></h2>
+
+<p>By default the xmlReader will report entities as such and not replace them
+with their content. This default behaviour can however be overriden using:</p>
+
+<p><code>reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)</code></p>
+
+<h2><a name="L1142">Relax-NG Validation</a></h2>
+
+<p style="font-size: 10pt">Introduced in version 2.5.7</p>
+
+<p>Libxml2 can now validate the document being read using the xmlReader using
+Relax-NG schemas. While the Relax NG validator can't always work in a
+streamable mode, only subsets which cannot be reduced to regular expressions
+need to have their subtree expanded for validation. In practice it means
+that, unless the schemas for the top level element content is not expressable
+as a regexp, only chunk of the document needs to be parsed while
+validating.</p>
+
+<p>The steps to do so are:</p>
+<ul>
+ <li>create a reader working on a document as usual</li>
+ <li>before any call to read associate it to a Relax NG schemas, either the
+ preparsed schemas or the URL to the schemas to use</li>
+ <li>errors will be reported the usual way, and the validity status can be
+ obtained using the IsValid() interface of the reader like for DTDs.</li>
+</ul>
+
+<p>Example, assuming the reader has already being created and that the schema
+string contains the Relax-NG schemas:</p>
+<pre><code>rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))<br>
+rngs = rngp.relaxNGParse()<br>
+reader.RelaxNGSetSchema(rngs)<br>
+ret = reader.Read()<br>
+while ret == 1:<br>
+ ret = reader.Read()<br>
+if ret != 0:<br>
+ print "Error parsing the document"<br>
+if reader.IsValid() != 1:<br>
+ print "Document failed to validate"</code><br>
+</pre>
+
+<p>See <code>reader6.py</code> in the sources or documentation for a complete
+example.</p>
+
+<h2><a name="Mixing">Mixing the reader and tree or XPath operations</a></h2>
+
+<p style="font-size: 10pt">Introduced in version 2.5.7</p>
+
+<p>While the reader is a streaming interface, its underlying implementation
+is based on the DOM builder of libxml2. As a result it is relatively simple
+to mix operations based on both models under some constraints. To do so the
+reader has an Expand() operation allowing to grow the subtree under the
+current node. It returns a pointer to a standard node which can be
+manipulated in the usual ways. The node will get all its ancestors and the
+full subtree available. Usual operations like XPath queries can be used on
+that reduced view of the document. Here is an example extracted from
+reader5.py in the sources which extract and prints the bibliography for the
+"Dragon" compiler book from the XML 1.0 recommendation:</p>
+<pre>f = open('../../test/valid/REC-xml-19980210.xml')
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("REC")
+res=""
+while reader.Read():
+ while reader.Name() == 'bibl':
+ node = reader.Expand() # expand the subtree
+ if node.xpathEval("@id = 'Aho'"): # use XPath on it
+ res = res + node.serialize()
+ if reader.Next() != 1: # skip the subtree
+ break;</pre>
+
+<p>Note, however that the node instance returned by the Expand() call is only
+valid until the next Read() operation. The Expand() operation does not
+affects the Read() ones, however usually once processed the full subtree is
+not useful anymore, and the Next() operation allows to skip it completely and
+process to the successor or return 0 if the document end is reached.</p>
+
+<p><a href="mailto:xml@gnome.org">Daniel Veillard</a></p>
+
+<p>$Id$</p>
+
+<p></p>
+</body>
+</html>
diff --git a/doc/xsa.xsl b/doc/xsa.xsl
new file mode 100644
index 0000000..30151d4
--- /dev/null
+++ b/doc/xsa.xsl
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+ Stylesheet generating the XSA entry for libxml2 based on the
+ latest News entry.
+ See http://www.garshol.priv.no/download/xsa/ for a description of XSA
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml">
+ <xsl:output method="xml"
+ doctype-public="-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML"
+ doctype-system="http://www.garshol.priv.no/download/xsa/xsa.dtd"
+ indent="yes"/>
+
+ <xsl:template match="/">
+<xsa>
+ <vendor>
+ <name>Daniel Veillard</name>
+ <email>daniel@veillard.com</email>
+ <url>http://veillard.com/</url>
+ </vendor>
+ <product id="libxml2">
+ <name>libxml2</name>
+ <version><xsl:value-of select="substring-before(//xhtml:h3[2], ':')"/></version>
+ <last-release><xsl:value-of select="substring-after(//xhtml:h3[2], ':')"/></last-release>
+ <info-url>http://xmlsoft.org/</info-url>
+ <changes>
+ <xsl:apply-templates select="//xhtml:h3[2]/following-sibling::*[1]"/>
+ </changes>
+ </product>
+</xsa>
+ </xsl:template>
+ <xsl:template match="xhtml:h3">
+ </xsl:template>
+ <xsl:template match="xhtml:ul">
+ <xsl:apply-templates select=".//xhtml:li"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="xhtml:li">
+ <xsl:text> - </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+ <xsl:template match="xhtml:a">
+ <xsl:value-of select="."/>
+ <xsl:text> at
+</xsl:text>
+ <xsl:value-of select="@href"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/elfgcchack.h b/elfgcchack.h
new file mode 100644
index 0000000..8c52884
--- /dev/null
+++ b/elfgcchack.h
@@ -0,0 +1,17808 @@
+/*
+ * elfgcchack.h: hack by Arjan van de Ven <arjanv@redhat.com> to speed
+ * up the code when using gcc for call within the library.
+ *
+ * Based on the analysis http://people.redhat.com/drepper/dsohowto.pdf
+ * from Ulrich drepper. Rewritten to be generated from the XML description
+ * file for libxml2 API
+ * autogenerated with xsltproc doc/elfgcchack.xsl doc/libxml2-api.xml
+ */
+
+#ifdef IN_LIBXML
+#ifdef __GNUC__
+#ifdef PIC
+#ifdef linux
+#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+
+#include "libxml/c14n.h"
+#include "libxml/catalog.h"
+#include "libxml/chvalid.h"
+#include "libxml/debugXML.h"
+#include "libxml/dict.h"
+#include "libxml/DOCBparser.h"
+#include "libxml/encoding.h"
+#include "libxml/entities.h"
+#include "libxml/globals.h"
+#include "libxml/hash.h"
+#include "libxml/HTMLparser.h"
+#include "libxml/HTMLtree.h"
+#include "libxml/list.h"
+#include "libxml/nanoftp.h"
+#include "libxml/nanohttp.h"
+#include "libxml/parser.h"
+#include "libxml/parserInternals.h"
+#include "libxml/pattern.h"
+#include "libxml/relaxng.h"
+#include "libxml/SAX2.h"
+#include "libxml/SAX.h"
+#include "libxml/schemasInternals.h"
+#include "libxml/schematron.h"
+#include "libxml/threads.h"
+#include "libxml/tree.h"
+#include "libxml/uri.h"
+#include "libxml/valid.h"
+#include "libxml/xinclude.h"
+#include "libxml/xlink.h"
+#include "libxml/xmlautomata.h"
+#include "libxml/xmlerror.h"
+#include "libxml/xmlexports.h"
+#include "libxml/xmlIO.h"
+#include "libxml/xmlmemory.h"
+#include "libxml/xmlreader.h"
+#include "libxml/xmlregexp.h"
+#include "libxml/xmlsave.h"
+#include "libxml/xmlschemas.h"
+#include "libxml/xmlschemastypes.h"
+#include "libxml/xmlstring.h"
+#include "libxml/xmlunicode.h"
+#include "libxml/xmlversion.h"
+#include "libxml/xmlwriter.h"
+#include "libxml/xpath.h"
+#include "libxml/xpathInternals.h"
+#include "libxml/xpointer.h"
+#include "libxml/xmlmodule.h"
+
+/* special hot spot not exported ones */
+
+#ifdef bottom_globals
+#undef __xmlGenericError
+extern __typeof (__xmlGenericError) __xmlGenericError __attribute((alias("__xmlGenericError__internal_alias")));
+#else
+#ifndef __xmlGenericError
+extern __typeof (__xmlGenericError) __xmlGenericError__internal_alias __attribute((visibility("hidden")));
+#define __xmlGenericError __xmlGenericError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef __xmlGenericErrorContext
+extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext __attribute((alias("__xmlGenericErrorContext__internal_alias")));
+#else
+#ifndef __xmlGenericErrorContext
+extern __typeof (__xmlGenericErrorContext) __xmlGenericErrorContext__internal_alias __attribute((visibility("hidden")));
+#define __xmlGenericErrorContext __xmlGenericErrorContext__internal_alias
+#endif
+#endif
+
+/* list generated from libxml2-api.xml */
+#if defined(LIBXML_DOCB_ENABLED)
+#ifdef bottom_DOCBparser
+#undef docbCreatePushParserCtxt
+extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt __attribute((alias("docbCreatePushParserCtxt__internal_alias")));
+#else
+#ifndef docbCreatePushParserCtxt
+extern __typeof (docbCreatePushParserCtxt) docbCreatePushParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define docbCreatePushParserCtxt docbCreatePushParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlAttrAllowed
+extern __typeof (htmlAttrAllowed) htmlAttrAllowed __attribute((alias("htmlAttrAllowed__internal_alias")));
+#else
+#ifndef htmlAttrAllowed
+extern __typeof (htmlAttrAllowed) htmlAttrAllowed__internal_alias __attribute((visibility("hidden")));
+#define htmlAttrAllowed htmlAttrAllowed__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlAutoCloseTag
+extern __typeof (htmlAutoCloseTag) htmlAutoCloseTag __attribute((alias("htmlAutoCloseTag__internal_alias")));
+#else
+#ifndef htmlAutoCloseTag
+extern __typeof (htmlAutoCloseTag) htmlAutoCloseTag__internal_alias __attribute((visibility("hidden")));
+#define htmlAutoCloseTag htmlAutoCloseTag__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCreateFileParserCtxt
+extern __typeof (htmlCreateFileParserCtxt) htmlCreateFileParserCtxt __attribute((alias("htmlCreateFileParserCtxt__internal_alias")));
+#else
+#ifndef htmlCreateFileParserCtxt
+extern __typeof (htmlCreateFileParserCtxt) htmlCreateFileParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define htmlCreateFileParserCtxt htmlCreateFileParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCreateMemoryParserCtxt
+extern __typeof (htmlCreateMemoryParserCtxt) htmlCreateMemoryParserCtxt __attribute((alias("htmlCreateMemoryParserCtxt__internal_alias")));
+#else
+#ifndef htmlCreateMemoryParserCtxt
+extern __typeof (htmlCreateMemoryParserCtxt) htmlCreateMemoryParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define htmlCreateMemoryParserCtxt htmlCreateMemoryParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCreatePushParserCtxt
+extern __typeof (htmlCreatePushParserCtxt) htmlCreatePushParserCtxt __attribute((alias("htmlCreatePushParserCtxt__internal_alias")));
+#else
+#ifndef htmlCreatePushParserCtxt
+extern __typeof (htmlCreatePushParserCtxt) htmlCreatePushParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define htmlCreatePushParserCtxt htmlCreatePushParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReadDoc
+extern __typeof (htmlCtxtReadDoc) htmlCtxtReadDoc __attribute((alias("htmlCtxtReadDoc__internal_alias")));
+#else
+#ifndef htmlCtxtReadDoc
+extern __typeof (htmlCtxtReadDoc) htmlCtxtReadDoc__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReadDoc htmlCtxtReadDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReadFd
+extern __typeof (htmlCtxtReadFd) htmlCtxtReadFd __attribute((alias("htmlCtxtReadFd__internal_alias")));
+#else
+#ifndef htmlCtxtReadFd
+extern __typeof (htmlCtxtReadFd) htmlCtxtReadFd__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReadFd htmlCtxtReadFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReadFile
+extern __typeof (htmlCtxtReadFile) htmlCtxtReadFile __attribute((alias("htmlCtxtReadFile__internal_alias")));
+#else
+#ifndef htmlCtxtReadFile
+extern __typeof (htmlCtxtReadFile) htmlCtxtReadFile__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReadFile htmlCtxtReadFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReadIO
+extern __typeof (htmlCtxtReadIO) htmlCtxtReadIO __attribute((alias("htmlCtxtReadIO__internal_alias")));
+#else
+#ifndef htmlCtxtReadIO
+extern __typeof (htmlCtxtReadIO) htmlCtxtReadIO__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReadIO htmlCtxtReadIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReadMemory
+extern __typeof (htmlCtxtReadMemory) htmlCtxtReadMemory __attribute((alias("htmlCtxtReadMemory__internal_alias")));
+#else
+#ifndef htmlCtxtReadMemory
+extern __typeof (htmlCtxtReadMemory) htmlCtxtReadMemory__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReadMemory htmlCtxtReadMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtReset
+extern __typeof (htmlCtxtReset) htmlCtxtReset __attribute((alias("htmlCtxtReset__internal_alias")));
+#else
+#ifndef htmlCtxtReset
+extern __typeof (htmlCtxtReset) htmlCtxtReset__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtReset htmlCtxtReset__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlCtxtUseOptions
+extern __typeof (htmlCtxtUseOptions) htmlCtxtUseOptions __attribute((alias("htmlCtxtUseOptions__internal_alias")));
+#else
+#ifndef htmlCtxtUseOptions
+extern __typeof (htmlCtxtUseOptions) htmlCtxtUseOptions__internal_alias __attribute((visibility("hidden")));
+#define htmlCtxtUseOptions htmlCtxtUseOptions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_SAX2
+#undef htmlDefaultSAXHandlerInit
+extern __typeof (htmlDefaultSAXHandlerInit) htmlDefaultSAXHandlerInit __attribute((alias("htmlDefaultSAXHandlerInit__internal_alias")));
+#else
+#ifndef htmlDefaultSAXHandlerInit
+extern __typeof (htmlDefaultSAXHandlerInit) htmlDefaultSAXHandlerInit__internal_alias __attribute((visibility("hidden")));
+#define htmlDefaultSAXHandlerInit htmlDefaultSAXHandlerInit__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocContentDumpFormatOutput
+extern __typeof (htmlDocContentDumpFormatOutput) htmlDocContentDumpFormatOutput __attribute((alias("htmlDocContentDumpFormatOutput__internal_alias")));
+#else
+#ifndef htmlDocContentDumpFormatOutput
+extern __typeof (htmlDocContentDumpFormatOutput) htmlDocContentDumpFormatOutput__internal_alias __attribute((visibility("hidden")));
+#define htmlDocContentDumpFormatOutput htmlDocContentDumpFormatOutput__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocContentDumpOutput
+extern __typeof (htmlDocContentDumpOutput) htmlDocContentDumpOutput __attribute((alias("htmlDocContentDumpOutput__internal_alias")));
+#else
+#ifndef htmlDocContentDumpOutput
+extern __typeof (htmlDocContentDumpOutput) htmlDocContentDumpOutput__internal_alias __attribute((visibility("hidden")));
+#define htmlDocContentDumpOutput htmlDocContentDumpOutput__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocDump
+extern __typeof (htmlDocDump) htmlDocDump __attribute((alias("htmlDocDump__internal_alias")));
+#else
+#ifndef htmlDocDump
+extern __typeof (htmlDocDump) htmlDocDump__internal_alias __attribute((visibility("hidden")));
+#define htmlDocDump htmlDocDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocDumpMemory
+extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory __attribute((alias("htmlDocDumpMemory__internal_alias")));
+#else
+#ifndef htmlDocDumpMemory
+extern __typeof (htmlDocDumpMemory) htmlDocDumpMemory__internal_alias __attribute((visibility("hidden")));
+#define htmlDocDumpMemory htmlDocDumpMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlDocDumpMemoryFormat
+extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat __attribute((alias("htmlDocDumpMemoryFormat__internal_alias")));
+#else
+#ifndef htmlDocDumpMemoryFormat
+extern __typeof (htmlDocDumpMemoryFormat) htmlDocDumpMemoryFormat__internal_alias __attribute((visibility("hidden")));
+#define htmlDocDumpMemoryFormat htmlDocDumpMemoryFormat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlElementAllowedHere
+extern __typeof (htmlElementAllowedHere) htmlElementAllowedHere __attribute((alias("htmlElementAllowedHere__internal_alias")));
+#else
+#ifndef htmlElementAllowedHere
+extern __typeof (htmlElementAllowedHere) htmlElementAllowedHere__internal_alias __attribute((visibility("hidden")));
+#define htmlElementAllowedHere htmlElementAllowedHere__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlElementStatusHere
+extern __typeof (htmlElementStatusHere) htmlElementStatusHere __attribute((alias("htmlElementStatusHere__internal_alias")));
+#else
+#ifndef htmlElementStatusHere
+extern __typeof (htmlElementStatusHere) htmlElementStatusHere__internal_alias __attribute((visibility("hidden")));
+#define htmlElementStatusHere htmlElementStatusHere__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlEncodeEntities
+extern __typeof (htmlEncodeEntities) htmlEncodeEntities __attribute((alias("htmlEncodeEntities__internal_alias")));
+#else
+#ifndef htmlEncodeEntities
+extern __typeof (htmlEncodeEntities) htmlEncodeEntities__internal_alias __attribute((visibility("hidden")));
+#define htmlEncodeEntities htmlEncodeEntities__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlEntityLookup
+extern __typeof (htmlEntityLookup) htmlEntityLookup __attribute((alias("htmlEntityLookup__internal_alias")));
+#else
+#ifndef htmlEntityLookup
+extern __typeof (htmlEntityLookup) htmlEntityLookup__internal_alias __attribute((visibility("hidden")));
+#define htmlEntityLookup htmlEntityLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlEntityValueLookup
+extern __typeof (htmlEntityValueLookup) htmlEntityValueLookup __attribute((alias("htmlEntityValueLookup__internal_alias")));
+#else
+#ifndef htmlEntityValueLookup
+extern __typeof (htmlEntityValueLookup) htmlEntityValueLookup__internal_alias __attribute((visibility("hidden")));
+#define htmlEntityValueLookup htmlEntityValueLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlFreeParserCtxt
+extern __typeof (htmlFreeParserCtxt) htmlFreeParserCtxt __attribute((alias("htmlFreeParserCtxt__internal_alias")));
+#else
+#ifndef htmlFreeParserCtxt
+extern __typeof (htmlFreeParserCtxt) htmlFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define htmlFreeParserCtxt htmlFreeParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlGetMetaEncoding
+extern __typeof (htmlGetMetaEncoding) htmlGetMetaEncoding __attribute((alias("htmlGetMetaEncoding__internal_alias")));
+#else
+#ifndef htmlGetMetaEncoding
+extern __typeof (htmlGetMetaEncoding) htmlGetMetaEncoding__internal_alias __attribute((visibility("hidden")));
+#define htmlGetMetaEncoding htmlGetMetaEncoding__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlHandleOmittedElem
+extern __typeof (htmlHandleOmittedElem) htmlHandleOmittedElem __attribute((alias("htmlHandleOmittedElem__internal_alias")));
+#else
+#ifndef htmlHandleOmittedElem
+extern __typeof (htmlHandleOmittedElem) htmlHandleOmittedElem__internal_alias __attribute((visibility("hidden")));
+#define htmlHandleOmittedElem htmlHandleOmittedElem__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlInitAutoClose
+extern __typeof (htmlInitAutoClose) htmlInitAutoClose __attribute((alias("htmlInitAutoClose__internal_alias")));
+#else
+#ifndef htmlInitAutoClose
+extern __typeof (htmlInitAutoClose) htmlInitAutoClose__internal_alias __attribute((visibility("hidden")));
+#define htmlInitAutoClose htmlInitAutoClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlIsAutoClosed
+extern __typeof (htmlIsAutoClosed) htmlIsAutoClosed __attribute((alias("htmlIsAutoClosed__internal_alias")));
+#else
+#ifndef htmlIsAutoClosed
+extern __typeof (htmlIsAutoClosed) htmlIsAutoClosed__internal_alias __attribute((visibility("hidden")));
+#define htmlIsAutoClosed htmlIsAutoClosed__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlIsBooleanAttr
+extern __typeof (htmlIsBooleanAttr) htmlIsBooleanAttr __attribute((alias("htmlIsBooleanAttr__internal_alias")));
+#else
+#ifndef htmlIsBooleanAttr
+extern __typeof (htmlIsBooleanAttr) htmlIsBooleanAttr__internal_alias __attribute((visibility("hidden")));
+#define htmlIsBooleanAttr htmlIsBooleanAttr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlIsScriptAttribute
+extern __typeof (htmlIsScriptAttribute) htmlIsScriptAttribute __attribute((alias("htmlIsScriptAttribute__internal_alias")));
+#else
+#ifndef htmlIsScriptAttribute
+extern __typeof (htmlIsScriptAttribute) htmlIsScriptAttribute__internal_alias __attribute((visibility("hidden")));
+#define htmlIsScriptAttribute htmlIsScriptAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlNewDoc
+extern __typeof (htmlNewDoc) htmlNewDoc __attribute((alias("htmlNewDoc__internal_alias")));
+#else
+#ifndef htmlNewDoc
+extern __typeof (htmlNewDoc) htmlNewDoc__internal_alias __attribute((visibility("hidden")));
+#define htmlNewDoc htmlNewDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlNewDocNoDtD
+extern __typeof (htmlNewDocNoDtD) htmlNewDocNoDtD __attribute((alias("htmlNewDocNoDtD__internal_alias")));
+#else
+#ifndef htmlNewDocNoDtD
+extern __typeof (htmlNewDocNoDtD) htmlNewDocNoDtD__internal_alias __attribute((visibility("hidden")));
+#define htmlNewDocNoDtD htmlNewDocNoDtD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlNewParserCtxt
+extern __typeof (htmlNewParserCtxt) htmlNewParserCtxt __attribute((alias("htmlNewParserCtxt__internal_alias")));
+#else
+#ifndef htmlNewParserCtxt
+extern __typeof (htmlNewParserCtxt) htmlNewParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define htmlNewParserCtxt htmlNewParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlNodeDump
+extern __typeof (htmlNodeDump) htmlNodeDump __attribute((alias("htmlNodeDump__internal_alias")));
+#else
+#ifndef htmlNodeDump
+extern __typeof (htmlNodeDump) htmlNodeDump__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeDump htmlNodeDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlNodeDumpFile
+extern __typeof (htmlNodeDumpFile) htmlNodeDumpFile __attribute((alias("htmlNodeDumpFile__internal_alias")));
+#else
+#ifndef htmlNodeDumpFile
+extern __typeof (htmlNodeDumpFile) htmlNodeDumpFile__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeDumpFile htmlNodeDumpFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlNodeDumpFileFormat
+extern __typeof (htmlNodeDumpFileFormat) htmlNodeDumpFileFormat __attribute((alias("htmlNodeDumpFileFormat__internal_alias")));
+#else
+#ifndef htmlNodeDumpFileFormat
+extern __typeof (htmlNodeDumpFileFormat) htmlNodeDumpFileFormat__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeDumpFileFormat htmlNodeDumpFileFormat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlNodeDumpFormatOutput
+extern __typeof (htmlNodeDumpFormatOutput) htmlNodeDumpFormatOutput __attribute((alias("htmlNodeDumpFormatOutput__internal_alias")));
+#else
+#ifndef htmlNodeDumpFormatOutput
+extern __typeof (htmlNodeDumpFormatOutput) htmlNodeDumpFormatOutput__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeDumpFormatOutput htmlNodeDumpFormatOutput__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlNodeDumpOutput
+extern __typeof (htmlNodeDumpOutput) htmlNodeDumpOutput __attribute((alias("htmlNodeDumpOutput__internal_alias")));
+#else
+#ifndef htmlNodeDumpOutput
+extern __typeof (htmlNodeDumpOutput) htmlNodeDumpOutput__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeDumpOutput htmlNodeDumpOutput__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlNodeStatus
+extern __typeof (htmlNodeStatus) htmlNodeStatus __attribute((alias("htmlNodeStatus__internal_alias")));
+#else
+#ifndef htmlNodeStatus
+extern __typeof (htmlNodeStatus) htmlNodeStatus__internal_alias __attribute((visibility("hidden")));
+#define htmlNodeStatus htmlNodeStatus__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseCharRef
+extern __typeof (htmlParseCharRef) htmlParseCharRef __attribute((alias("htmlParseCharRef__internal_alias")));
+#else
+#ifndef htmlParseCharRef
+extern __typeof (htmlParseCharRef) htmlParseCharRef__internal_alias __attribute((visibility("hidden")));
+#define htmlParseCharRef htmlParseCharRef__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseChunk
+extern __typeof (htmlParseChunk) htmlParseChunk __attribute((alias("htmlParseChunk__internal_alias")));
+#else
+#ifndef htmlParseChunk
+extern __typeof (htmlParseChunk) htmlParseChunk__internal_alias __attribute((visibility("hidden")));
+#define htmlParseChunk htmlParseChunk__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseDoc
+extern __typeof (htmlParseDoc) htmlParseDoc __attribute((alias("htmlParseDoc__internal_alias")));
+#else
+#ifndef htmlParseDoc
+extern __typeof (htmlParseDoc) htmlParseDoc__internal_alias __attribute((visibility("hidden")));
+#define htmlParseDoc htmlParseDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseDocument
+extern __typeof (htmlParseDocument) htmlParseDocument __attribute((alias("htmlParseDocument__internal_alias")));
+#else
+#ifndef htmlParseDocument
+extern __typeof (htmlParseDocument) htmlParseDocument__internal_alias __attribute((visibility("hidden")));
+#define htmlParseDocument htmlParseDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseElement
+extern __typeof (htmlParseElement) htmlParseElement __attribute((alias("htmlParseElement__internal_alias")));
+#else
+#ifndef htmlParseElement
+extern __typeof (htmlParseElement) htmlParseElement__internal_alias __attribute((visibility("hidden")));
+#define htmlParseElement htmlParseElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseEntityRef
+extern __typeof (htmlParseEntityRef) htmlParseEntityRef __attribute((alias("htmlParseEntityRef__internal_alias")));
+#else
+#ifndef htmlParseEntityRef
+extern __typeof (htmlParseEntityRef) htmlParseEntityRef__internal_alias __attribute((visibility("hidden")));
+#define htmlParseEntityRef htmlParseEntityRef__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlParseFile
+extern __typeof (htmlParseFile) htmlParseFile __attribute((alias("htmlParseFile__internal_alias")));
+#else
+#ifndef htmlParseFile
+extern __typeof (htmlParseFile) htmlParseFile__internal_alias __attribute((visibility("hidden")));
+#define htmlParseFile htmlParseFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlReadDoc
+extern __typeof (htmlReadDoc) htmlReadDoc __attribute((alias("htmlReadDoc__internal_alias")));
+#else
+#ifndef htmlReadDoc
+extern __typeof (htmlReadDoc) htmlReadDoc__internal_alias __attribute((visibility("hidden")));
+#define htmlReadDoc htmlReadDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlReadFd
+extern __typeof (htmlReadFd) htmlReadFd __attribute((alias("htmlReadFd__internal_alias")));
+#else
+#ifndef htmlReadFd
+extern __typeof (htmlReadFd) htmlReadFd__internal_alias __attribute((visibility("hidden")));
+#define htmlReadFd htmlReadFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlReadFile
+extern __typeof (htmlReadFile) htmlReadFile __attribute((alias("htmlReadFile__internal_alias")));
+#else
+#ifndef htmlReadFile
+extern __typeof (htmlReadFile) htmlReadFile__internal_alias __attribute((visibility("hidden")));
+#define htmlReadFile htmlReadFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlReadIO
+extern __typeof (htmlReadIO) htmlReadIO __attribute((alias("htmlReadIO__internal_alias")));
+#else
+#ifndef htmlReadIO
+extern __typeof (htmlReadIO) htmlReadIO__internal_alias __attribute((visibility("hidden")));
+#define htmlReadIO htmlReadIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlReadMemory
+extern __typeof (htmlReadMemory) htmlReadMemory __attribute((alias("htmlReadMemory__internal_alias")));
+#else
+#ifndef htmlReadMemory
+extern __typeof (htmlReadMemory) htmlReadMemory__internal_alias __attribute((visibility("hidden")));
+#define htmlReadMemory htmlReadMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlSAXParseDoc
+extern __typeof (htmlSAXParseDoc) htmlSAXParseDoc __attribute((alias("htmlSAXParseDoc__internal_alias")));
+#else
+#ifndef htmlSAXParseDoc
+extern __typeof (htmlSAXParseDoc) htmlSAXParseDoc__internal_alias __attribute((visibility("hidden")));
+#define htmlSAXParseDoc htmlSAXParseDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlSAXParseFile
+extern __typeof (htmlSAXParseFile) htmlSAXParseFile __attribute((alias("htmlSAXParseFile__internal_alias")));
+#else
+#ifndef htmlSAXParseFile
+extern __typeof (htmlSAXParseFile) htmlSAXParseFile__internal_alias __attribute((visibility("hidden")));
+#define htmlSAXParseFile htmlSAXParseFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlSaveFile
+extern __typeof (htmlSaveFile) htmlSaveFile __attribute((alias("htmlSaveFile__internal_alias")));
+#else
+#ifndef htmlSaveFile
+extern __typeof (htmlSaveFile) htmlSaveFile__internal_alias __attribute((visibility("hidden")));
+#define htmlSaveFile htmlSaveFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlSaveFileEnc
+extern __typeof (htmlSaveFileEnc) htmlSaveFileEnc __attribute((alias("htmlSaveFileEnc__internal_alias")));
+#else
+#ifndef htmlSaveFileEnc
+extern __typeof (htmlSaveFileEnc) htmlSaveFileEnc__internal_alias __attribute((visibility("hidden")));
+#define htmlSaveFileEnc htmlSaveFileEnc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlSaveFileFormat
+extern __typeof (htmlSaveFileFormat) htmlSaveFileFormat __attribute((alias("htmlSaveFileFormat__internal_alias")));
+#else
+#ifndef htmlSaveFileFormat
+extern __typeof (htmlSaveFileFormat) htmlSaveFileFormat__internal_alias __attribute((visibility("hidden")));
+#define htmlSaveFileFormat htmlSaveFileFormat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLtree
+#undef htmlSetMetaEncoding
+extern __typeof (htmlSetMetaEncoding) htmlSetMetaEncoding __attribute((alias("htmlSetMetaEncoding__internal_alias")));
+#else
+#ifndef htmlSetMetaEncoding
+extern __typeof (htmlSetMetaEncoding) htmlSetMetaEncoding__internal_alias __attribute((visibility("hidden")));
+#define htmlSetMetaEncoding htmlSetMetaEncoding__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_HTMLparser
+#undef htmlTagLookup
+extern __typeof (htmlTagLookup) htmlTagLookup __attribute((alias("htmlTagLookup__internal_alias")));
+#else
+#ifndef htmlTagLookup
+extern __typeof (htmlTagLookup) htmlTagLookup__internal_alias __attribute((visibility("hidden")));
+#define htmlTagLookup htmlTagLookup__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef inputPop
+extern __typeof (inputPop) inputPop __attribute((alias("inputPop__internal_alias")));
+#else
+#ifndef inputPop
+extern __typeof (inputPop) inputPop__internal_alias __attribute((visibility("hidden")));
+#define inputPop inputPop__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef inputPush
+extern __typeof (inputPush) inputPush __attribute((alias("inputPush__internal_alias")));
+#else
+#ifndef inputPush
+extern __typeof (inputPush) inputPush__internal_alias __attribute((visibility("hidden")));
+#define inputPush inputPush__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef namePop
+extern __typeof (namePop) namePop __attribute((alias("namePop__internal_alias")));
+#else
+#ifndef namePop
+extern __typeof (namePop) namePop__internal_alias __attribute((visibility("hidden")));
+#define namePop namePop__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef namePush
+extern __typeof (namePush) namePush __attribute((alias("namePush__internal_alias")));
+#else
+#ifndef namePush
+extern __typeof (namePush) namePush__internal_alias __attribute((visibility("hidden")));
+#define namePush namePush__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef nodePop
+extern __typeof (nodePop) nodePop __attribute((alias("nodePop__internal_alias")));
+#else
+#ifndef nodePop
+extern __typeof (nodePop) nodePop__internal_alias __attribute((visibility("hidden")));
+#define nodePop nodePop__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef nodePush
+extern __typeof (nodePush) nodePush __attribute((alias("nodePush__internal_alias")));
+#else
+#ifndef nodePush
+extern __typeof (nodePush) nodePush__internal_alias __attribute((visibility("hidden")));
+#define nodePush nodePush__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef valuePop
+extern __typeof (valuePop) valuePop __attribute((alias("valuePop__internal_alias")));
+#else
+#ifndef valuePop
+extern __typeof (valuePop) valuePop__internal_alias __attribute((visibility("hidden")));
+#define valuePop valuePop__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef valuePush
+extern __typeof (valuePush) valuePush __attribute((alias("valuePush__internal_alias")));
+#else
+#ifndef valuePush
+extern __typeof (valuePush) valuePush__internal_alias __attribute((visibility("hidden")));
+#define valuePush valuePush__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogAdd
+extern __typeof (xmlACatalogAdd) xmlACatalogAdd __attribute((alias("xmlACatalogAdd__internal_alias")));
+#else
+#ifndef xmlACatalogAdd
+extern __typeof (xmlACatalogAdd) xmlACatalogAdd__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogAdd xmlACatalogAdd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogDump
+extern __typeof (xmlACatalogDump) xmlACatalogDump __attribute((alias("xmlACatalogDump__internal_alias")));
+#else
+#ifndef xmlACatalogDump
+extern __typeof (xmlACatalogDump) xmlACatalogDump__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogDump xmlACatalogDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogRemove
+extern __typeof (xmlACatalogRemove) xmlACatalogRemove __attribute((alias("xmlACatalogRemove__internal_alias")));
+#else
+#ifndef xmlACatalogRemove
+extern __typeof (xmlACatalogRemove) xmlACatalogRemove__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogRemove xmlACatalogRemove__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogResolve
+extern __typeof (xmlACatalogResolve) xmlACatalogResolve __attribute((alias("xmlACatalogResolve__internal_alias")));
+#else
+#ifndef xmlACatalogResolve
+extern __typeof (xmlACatalogResolve) xmlACatalogResolve__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogResolve xmlACatalogResolve__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogResolvePublic
+extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic __attribute((alias("xmlACatalogResolvePublic__internal_alias")));
+#else
+#ifndef xmlACatalogResolvePublic
+extern __typeof (xmlACatalogResolvePublic) xmlACatalogResolvePublic__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogResolvePublic xmlACatalogResolvePublic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogResolveSystem
+extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem __attribute((alias("xmlACatalogResolveSystem__internal_alias")));
+#else
+#ifndef xmlACatalogResolveSystem
+extern __typeof (xmlACatalogResolveSystem) xmlACatalogResolveSystem__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogResolveSystem xmlACatalogResolveSystem__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlACatalogResolveURI
+extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI __attribute((alias("xmlACatalogResolveURI__internal_alias")));
+#else
+#ifndef xmlACatalogResolveURI
+extern __typeof (xmlACatalogResolveURI) xmlACatalogResolveURI__internal_alias __attribute((visibility("hidden")));
+#define xmlACatalogResolveURI xmlACatalogResolveURI__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlAddAttributeDecl
+extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl __attribute((alias("xmlAddAttributeDecl__internal_alias")));
+#else
+#ifndef xmlAddAttributeDecl
+extern __typeof (xmlAddAttributeDecl) xmlAddAttributeDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlAddAttributeDecl xmlAddAttributeDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlAddChild
+extern __typeof (xmlAddChild) xmlAddChild __attribute((alias("xmlAddChild__internal_alias")));
+#else
+#ifndef xmlAddChild
+extern __typeof (xmlAddChild) xmlAddChild__internal_alias __attribute((visibility("hidden")));
+#define xmlAddChild xmlAddChild__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlAddChildList
+extern __typeof (xmlAddChildList) xmlAddChildList __attribute((alias("xmlAddChildList__internal_alias")));
+#else
+#ifndef xmlAddChildList
+extern __typeof (xmlAddChildList) xmlAddChildList__internal_alias __attribute((visibility("hidden")));
+#define xmlAddChildList xmlAddChildList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlAddDocEntity
+extern __typeof (xmlAddDocEntity) xmlAddDocEntity __attribute((alias("xmlAddDocEntity__internal_alias")));
+#else
+#ifndef xmlAddDocEntity
+extern __typeof (xmlAddDocEntity) xmlAddDocEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlAddDocEntity xmlAddDocEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlAddDtdEntity
+extern __typeof (xmlAddDtdEntity) xmlAddDtdEntity __attribute((alias("xmlAddDtdEntity__internal_alias")));
+#else
+#ifndef xmlAddDtdEntity
+extern __typeof (xmlAddDtdEntity) xmlAddDtdEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlAddDtdEntity xmlAddDtdEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlAddElementDecl
+extern __typeof (xmlAddElementDecl) xmlAddElementDecl __attribute((alias("xmlAddElementDecl__internal_alias")));
+#else
+#ifndef xmlAddElementDecl
+extern __typeof (xmlAddElementDecl) xmlAddElementDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlAddElementDecl xmlAddElementDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlAddEncodingAlias
+extern __typeof (xmlAddEncodingAlias) xmlAddEncodingAlias __attribute((alias("xmlAddEncodingAlias__internal_alias")));
+#else
+#ifndef xmlAddEncodingAlias
+extern __typeof (xmlAddEncodingAlias) xmlAddEncodingAlias__internal_alias __attribute((visibility("hidden")));
+#define xmlAddEncodingAlias xmlAddEncodingAlias__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlAddID
+extern __typeof (xmlAddID) xmlAddID __attribute((alias("xmlAddID__internal_alias")));
+#else
+#ifndef xmlAddID
+extern __typeof (xmlAddID) xmlAddID__internal_alias __attribute((visibility("hidden")));
+#define xmlAddID xmlAddID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlAddNextSibling
+extern __typeof (xmlAddNextSibling) xmlAddNextSibling __attribute((alias("xmlAddNextSibling__internal_alias")));
+#else
+#ifndef xmlAddNextSibling
+extern __typeof (xmlAddNextSibling) xmlAddNextSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlAddNextSibling xmlAddNextSibling__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlAddNotationDecl
+extern __typeof (xmlAddNotationDecl) xmlAddNotationDecl __attribute((alias("xmlAddNotationDecl__internal_alias")));
+#else
+#ifndef xmlAddNotationDecl
+extern __typeof (xmlAddNotationDecl) xmlAddNotationDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlAddNotationDecl xmlAddNotationDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_tree
+#undef xmlAddPrevSibling
+extern __typeof (xmlAddPrevSibling) xmlAddPrevSibling __attribute((alias("xmlAddPrevSibling__internal_alias")));
+#else
+#ifndef xmlAddPrevSibling
+extern __typeof (xmlAddPrevSibling) xmlAddPrevSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlAddPrevSibling xmlAddPrevSibling__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlAddRef
+extern __typeof (xmlAddRef) xmlAddRef __attribute((alias("xmlAddRef__internal_alias")));
+#else
+#ifndef xmlAddRef
+extern __typeof (xmlAddRef) xmlAddRef__internal_alias __attribute((visibility("hidden")));
+#define xmlAddRef xmlAddRef__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlAddSibling
+extern __typeof (xmlAddSibling) xmlAddSibling __attribute((alias("xmlAddSibling__internal_alias")));
+#else
+#ifndef xmlAddSibling
+extern __typeof (xmlAddSibling) xmlAddSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlAddSibling xmlAddSibling__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlAllocOutputBuffer
+extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer __attribute((alias("xmlAllocOutputBuffer__internal_alias")));
+#else
+#ifndef xmlAllocOutputBuffer
+extern __typeof (xmlAllocOutputBuffer) xmlAllocOutputBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlAllocOutputBuffer xmlAllocOutputBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlAllocParserInputBuffer
+extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer __attribute((alias("xmlAllocParserInputBuffer__internal_alias")));
+#else
+#ifndef xmlAllocParserInputBuffer
+extern __typeof (xmlAllocParserInputBuffer) xmlAllocParserInputBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlAllocParserInputBuffer xmlAllocParserInputBuffer__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlAttrSerializeTxtContent
+extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent __attribute((alias("xmlAttrSerializeTxtContent__internal_alias")));
+#else
+#ifndef xmlAttrSerializeTxtContent
+extern __typeof (xmlAttrSerializeTxtContent) xmlAttrSerializeTxtContent__internal_alias __attribute((visibility("hidden")));
+#define xmlAttrSerializeTxtContent xmlAttrSerializeTxtContent__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataCompile
+extern __typeof (xmlAutomataCompile) xmlAutomataCompile __attribute((alias("xmlAutomataCompile__internal_alias")));
+#else
+#ifndef xmlAutomataCompile
+extern __typeof (xmlAutomataCompile) xmlAutomataCompile__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataCompile xmlAutomataCompile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataGetInitState
+extern __typeof (xmlAutomataGetInitState) xmlAutomataGetInitState __attribute((alias("xmlAutomataGetInitState__internal_alias")));
+#else
+#ifndef xmlAutomataGetInitState
+extern __typeof (xmlAutomataGetInitState) xmlAutomataGetInitState__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataGetInitState xmlAutomataGetInitState__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataIsDeterminist
+extern __typeof (xmlAutomataIsDeterminist) xmlAutomataIsDeterminist __attribute((alias("xmlAutomataIsDeterminist__internal_alias")));
+#else
+#ifndef xmlAutomataIsDeterminist
+extern __typeof (xmlAutomataIsDeterminist) xmlAutomataIsDeterminist__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataIsDeterminist xmlAutomataIsDeterminist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewAllTrans
+extern __typeof (xmlAutomataNewAllTrans) xmlAutomataNewAllTrans __attribute((alias("xmlAutomataNewAllTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewAllTrans
+extern __typeof (xmlAutomataNewAllTrans) xmlAutomataNewAllTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewAllTrans xmlAutomataNewAllTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewCountTrans
+extern __typeof (xmlAutomataNewCountTrans) xmlAutomataNewCountTrans __attribute((alias("xmlAutomataNewCountTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewCountTrans
+extern __typeof (xmlAutomataNewCountTrans) xmlAutomataNewCountTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewCountTrans xmlAutomataNewCountTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewCountTrans2
+extern __typeof (xmlAutomataNewCountTrans2) xmlAutomataNewCountTrans2 __attribute((alias("xmlAutomataNewCountTrans2__internal_alias")));
+#else
+#ifndef xmlAutomataNewCountTrans2
+extern __typeof (xmlAutomataNewCountTrans2) xmlAutomataNewCountTrans2__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewCountTrans2 xmlAutomataNewCountTrans2__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewCountedTrans
+extern __typeof (xmlAutomataNewCountedTrans) xmlAutomataNewCountedTrans __attribute((alias("xmlAutomataNewCountedTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewCountedTrans
+extern __typeof (xmlAutomataNewCountedTrans) xmlAutomataNewCountedTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewCountedTrans xmlAutomataNewCountedTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewCounter
+extern __typeof (xmlAutomataNewCounter) xmlAutomataNewCounter __attribute((alias("xmlAutomataNewCounter__internal_alias")));
+#else
+#ifndef xmlAutomataNewCounter
+extern __typeof (xmlAutomataNewCounter) xmlAutomataNewCounter__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewCounter xmlAutomataNewCounter__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewCounterTrans
+extern __typeof (xmlAutomataNewCounterTrans) xmlAutomataNewCounterTrans __attribute((alias("xmlAutomataNewCounterTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewCounterTrans
+extern __typeof (xmlAutomataNewCounterTrans) xmlAutomataNewCounterTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewCounterTrans xmlAutomataNewCounterTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewEpsilon
+extern __typeof (xmlAutomataNewEpsilon) xmlAutomataNewEpsilon __attribute((alias("xmlAutomataNewEpsilon__internal_alias")));
+#else
+#ifndef xmlAutomataNewEpsilon
+extern __typeof (xmlAutomataNewEpsilon) xmlAutomataNewEpsilon__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewEpsilon xmlAutomataNewEpsilon__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewNegTrans
+extern __typeof (xmlAutomataNewNegTrans) xmlAutomataNewNegTrans __attribute((alias("xmlAutomataNewNegTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewNegTrans
+extern __typeof (xmlAutomataNewNegTrans) xmlAutomataNewNegTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewNegTrans xmlAutomataNewNegTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewOnceTrans
+extern __typeof (xmlAutomataNewOnceTrans) xmlAutomataNewOnceTrans __attribute((alias("xmlAutomataNewOnceTrans__internal_alias")));
+#else
+#ifndef xmlAutomataNewOnceTrans
+extern __typeof (xmlAutomataNewOnceTrans) xmlAutomataNewOnceTrans__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewOnceTrans xmlAutomataNewOnceTrans__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewOnceTrans2
+extern __typeof (xmlAutomataNewOnceTrans2) xmlAutomataNewOnceTrans2 __attribute((alias("xmlAutomataNewOnceTrans2__internal_alias")));
+#else
+#ifndef xmlAutomataNewOnceTrans2
+extern __typeof (xmlAutomataNewOnceTrans2) xmlAutomataNewOnceTrans2__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewOnceTrans2 xmlAutomataNewOnceTrans2__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewState
+extern __typeof (xmlAutomataNewState) xmlAutomataNewState __attribute((alias("xmlAutomataNewState__internal_alias")));
+#else
+#ifndef xmlAutomataNewState
+extern __typeof (xmlAutomataNewState) xmlAutomataNewState__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewState xmlAutomataNewState__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewTransition
+extern __typeof (xmlAutomataNewTransition) xmlAutomataNewTransition __attribute((alias("xmlAutomataNewTransition__internal_alias")));
+#else
+#ifndef xmlAutomataNewTransition
+extern __typeof (xmlAutomataNewTransition) xmlAutomataNewTransition__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewTransition xmlAutomataNewTransition__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataNewTransition2
+extern __typeof (xmlAutomataNewTransition2) xmlAutomataNewTransition2 __attribute((alias("xmlAutomataNewTransition2__internal_alias")));
+#else
+#ifndef xmlAutomataNewTransition2
+extern __typeof (xmlAutomataNewTransition2) xmlAutomataNewTransition2__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataNewTransition2 xmlAutomataNewTransition2__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlAutomataSetFinalState
+extern __typeof (xmlAutomataSetFinalState) xmlAutomataSetFinalState __attribute((alias("xmlAutomataSetFinalState__internal_alias")));
+#else
+#ifndef xmlAutomataSetFinalState
+extern __typeof (xmlAutomataSetFinalState) xmlAutomataSetFinalState__internal_alias __attribute((visibility("hidden")));
+#define xmlAutomataSetFinalState xmlAutomataSetFinalState__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlBoolToText
+extern __typeof (xmlBoolToText) xmlBoolToText __attribute((alias("xmlBoolToText__internal_alias")));
+#else
+#ifndef xmlBoolToText
+extern __typeof (xmlBoolToText) xmlBoolToText__internal_alias __attribute((visibility("hidden")));
+#define xmlBoolToText xmlBoolToText__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_buf
+#undef xmlBufContent
+extern __typeof (xmlBufContent) xmlBufContent __attribute((alias("xmlBufContent__internal_alias")));
+#else
+#ifndef xmlBufContent
+extern __typeof (xmlBufContent) xmlBufContent__internal_alias __attribute((visibility("hidden")));
+#define xmlBufContent xmlBufContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_buf
+#undef xmlBufEnd
+extern __typeof (xmlBufEnd) xmlBufEnd __attribute((alias("xmlBufEnd__internal_alias")));
+#else
+#ifndef xmlBufEnd
+extern __typeof (xmlBufEnd) xmlBufEnd__internal_alias __attribute((visibility("hidden")));
+#define xmlBufEnd xmlBufEnd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufGetNodeContent
+extern __typeof (xmlBufGetNodeContent) xmlBufGetNodeContent __attribute((alias("xmlBufGetNodeContent__internal_alias")));
+#else
+#ifndef xmlBufGetNodeContent
+extern __typeof (xmlBufGetNodeContent) xmlBufGetNodeContent__internal_alias __attribute((visibility("hidden")));
+#define xmlBufGetNodeContent xmlBufGetNodeContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlBufNodeDump
+extern __typeof (xmlBufNodeDump) xmlBufNodeDump __attribute((alias("xmlBufNodeDump__internal_alias")));
+#else
+#ifndef xmlBufNodeDump
+extern __typeof (xmlBufNodeDump) xmlBufNodeDump__internal_alias __attribute((visibility("hidden")));
+#define xmlBufNodeDump xmlBufNodeDump__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_buf
+#undef xmlBufShrink
+extern __typeof (xmlBufShrink) xmlBufShrink __attribute((alias("xmlBufShrink__internal_alias")));
+#else
+#ifndef xmlBufShrink
+extern __typeof (xmlBufShrink) xmlBufShrink__internal_alias __attribute((visibility("hidden")));
+#define xmlBufShrink xmlBufShrink__internal_alias
+#endif
+#endif
+
+#ifdef bottom_buf
+#undef xmlBufUse
+extern __typeof (xmlBufUse) xmlBufUse __attribute((alias("xmlBufUse__internal_alias")));
+#else
+#ifndef xmlBufUse
+extern __typeof (xmlBufUse) xmlBufUse__internal_alias __attribute((visibility("hidden")));
+#define xmlBufUse xmlBufUse__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferAdd
+extern __typeof (xmlBufferAdd) xmlBufferAdd __attribute((alias("xmlBufferAdd__internal_alias")));
+#else
+#ifndef xmlBufferAdd
+extern __typeof (xmlBufferAdd) xmlBufferAdd__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferAdd xmlBufferAdd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferAddHead
+extern __typeof (xmlBufferAddHead) xmlBufferAddHead __attribute((alias("xmlBufferAddHead__internal_alias")));
+#else
+#ifndef xmlBufferAddHead
+extern __typeof (xmlBufferAddHead) xmlBufferAddHead__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferAddHead xmlBufferAddHead__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferCCat
+extern __typeof (xmlBufferCCat) xmlBufferCCat __attribute((alias("xmlBufferCCat__internal_alias")));
+#else
+#ifndef xmlBufferCCat
+extern __typeof (xmlBufferCCat) xmlBufferCCat__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferCCat xmlBufferCCat__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferCat
+extern __typeof (xmlBufferCat) xmlBufferCat __attribute((alias("xmlBufferCat__internal_alias")));
+#else
+#ifndef xmlBufferCat
+extern __typeof (xmlBufferCat) xmlBufferCat__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferCat xmlBufferCat__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferContent
+extern __typeof (xmlBufferContent) xmlBufferContent __attribute((alias("xmlBufferContent__internal_alias")));
+#else
+#ifndef xmlBufferContent
+extern __typeof (xmlBufferContent) xmlBufferContent__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferContent xmlBufferContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferCreate
+extern __typeof (xmlBufferCreate) xmlBufferCreate __attribute((alias("xmlBufferCreate__internal_alias")));
+#else
+#ifndef xmlBufferCreate
+extern __typeof (xmlBufferCreate) xmlBufferCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferCreate xmlBufferCreate__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferCreateSize
+extern __typeof (xmlBufferCreateSize) xmlBufferCreateSize __attribute((alias("xmlBufferCreateSize__internal_alias")));
+#else
+#ifndef xmlBufferCreateSize
+extern __typeof (xmlBufferCreateSize) xmlBufferCreateSize__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferCreateSize xmlBufferCreateSize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferCreateStatic
+extern __typeof (xmlBufferCreateStatic) xmlBufferCreateStatic __attribute((alias("xmlBufferCreateStatic__internal_alias")));
+#else
+#ifndef xmlBufferCreateStatic
+extern __typeof (xmlBufferCreateStatic) xmlBufferCreateStatic__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferCreateStatic xmlBufferCreateStatic__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferDetach
+extern __typeof (xmlBufferDetach) xmlBufferDetach __attribute((alias("xmlBufferDetach__internal_alias")));
+#else
+#ifndef xmlBufferDetach
+extern __typeof (xmlBufferDetach) xmlBufferDetach__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferDetach xmlBufferDetach__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferDump
+extern __typeof (xmlBufferDump) xmlBufferDump __attribute((alias("xmlBufferDump__internal_alias")));
+#else
+#ifndef xmlBufferDump
+extern __typeof (xmlBufferDump) xmlBufferDump__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferDump xmlBufferDump__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferEmpty
+extern __typeof (xmlBufferEmpty) xmlBufferEmpty __attribute((alias("xmlBufferEmpty__internal_alias")));
+#else
+#ifndef xmlBufferEmpty
+extern __typeof (xmlBufferEmpty) xmlBufferEmpty__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferEmpty xmlBufferEmpty__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferFree
+extern __typeof (xmlBufferFree) xmlBufferFree __attribute((alias("xmlBufferFree__internal_alias")));
+#else
+#ifndef xmlBufferFree
+extern __typeof (xmlBufferFree) xmlBufferFree__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferFree xmlBufferFree__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferGrow
+extern __typeof (xmlBufferGrow) xmlBufferGrow __attribute((alias("xmlBufferGrow__internal_alias")));
+#else
+#ifndef xmlBufferGrow
+extern __typeof (xmlBufferGrow) xmlBufferGrow__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferGrow xmlBufferGrow__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferLength
+extern __typeof (xmlBufferLength) xmlBufferLength __attribute((alias("xmlBufferLength__internal_alias")));
+#else
+#ifndef xmlBufferLength
+extern __typeof (xmlBufferLength) xmlBufferLength__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferLength xmlBufferLength__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferResize
+extern __typeof (xmlBufferResize) xmlBufferResize __attribute((alias("xmlBufferResize__internal_alias")));
+#else
+#ifndef xmlBufferResize
+extern __typeof (xmlBufferResize) xmlBufferResize__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferResize xmlBufferResize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferSetAllocationScheme
+extern __typeof (xmlBufferSetAllocationScheme) xmlBufferSetAllocationScheme __attribute((alias("xmlBufferSetAllocationScheme__internal_alias")));
+#else
+#ifndef xmlBufferSetAllocationScheme
+extern __typeof (xmlBufferSetAllocationScheme) xmlBufferSetAllocationScheme__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferSetAllocationScheme xmlBufferSetAllocationScheme__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferShrink
+extern __typeof (xmlBufferShrink) xmlBufferShrink __attribute((alias("xmlBufferShrink__internal_alias")));
+#else
+#ifndef xmlBufferShrink
+extern __typeof (xmlBufferShrink) xmlBufferShrink__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferShrink xmlBufferShrink__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferWriteCHAR
+extern __typeof (xmlBufferWriteCHAR) xmlBufferWriteCHAR __attribute((alias("xmlBufferWriteCHAR__internal_alias")));
+#else
+#ifndef xmlBufferWriteCHAR
+extern __typeof (xmlBufferWriteCHAR) xmlBufferWriteCHAR__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferWriteCHAR xmlBufferWriteCHAR__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferWriteChar
+extern __typeof (xmlBufferWriteChar) xmlBufferWriteChar __attribute((alias("xmlBufferWriteChar__internal_alias")));
+#else
+#ifndef xmlBufferWriteChar
+extern __typeof (xmlBufferWriteChar) xmlBufferWriteChar__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferWriteChar xmlBufferWriteChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBufferWriteQuotedString
+extern __typeof (xmlBufferWriteQuotedString) xmlBufferWriteQuotedString __attribute((alias("xmlBufferWriteQuotedString__internal_alias")));
+#else
+#ifndef xmlBufferWriteQuotedString
+extern __typeof (xmlBufferWriteQuotedString) xmlBufferWriteQuotedString__internal_alias __attribute((visibility("hidden")));
+#define xmlBufferWriteQuotedString xmlBufferWriteQuotedString__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlBuildQName
+extern __typeof (xmlBuildQName) xmlBuildQName __attribute((alias("xmlBuildQName__internal_alias")));
+#else
+#ifndef xmlBuildQName
+extern __typeof (xmlBuildQName) xmlBuildQName__internal_alias __attribute((visibility("hidden")));
+#define xmlBuildQName xmlBuildQName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlBuildRelativeURI
+extern __typeof (xmlBuildRelativeURI) xmlBuildRelativeURI __attribute((alias("xmlBuildRelativeURI__internal_alias")));
+#else
+#ifndef xmlBuildRelativeURI
+extern __typeof (xmlBuildRelativeURI) xmlBuildRelativeURI__internal_alias __attribute((visibility("hidden")));
+#define xmlBuildRelativeURI xmlBuildRelativeURI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlBuildURI
+extern __typeof (xmlBuildURI) xmlBuildURI __attribute((alias("xmlBuildURI__internal_alias")));
+#else
+#ifndef xmlBuildURI
+extern __typeof (xmlBuildURI) xmlBuildURI__internal_alias __attribute((visibility("hidden")));
+#define xmlBuildURI xmlBuildURI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlByteConsumed
+extern __typeof (xmlByteConsumed) xmlByteConsumed __attribute((alias("xmlByteConsumed__internal_alias")));
+#else
+#ifndef xmlByteConsumed
+extern __typeof (xmlByteConsumed) xmlByteConsumed__internal_alias __attribute((visibility("hidden")));
+#define xmlByteConsumed xmlByteConsumed__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_c14n
+#undef xmlC14NDocDumpMemory
+extern __typeof (xmlC14NDocDumpMemory) xmlC14NDocDumpMemory __attribute((alias("xmlC14NDocDumpMemory__internal_alias")));
+#else
+#ifndef xmlC14NDocDumpMemory
+extern __typeof (xmlC14NDocDumpMemory) xmlC14NDocDumpMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlC14NDocDumpMemory xmlC14NDocDumpMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_c14n
+#undef xmlC14NDocSave
+extern __typeof (xmlC14NDocSave) xmlC14NDocSave __attribute((alias("xmlC14NDocSave__internal_alias")));
+#else
+#ifndef xmlC14NDocSave
+extern __typeof (xmlC14NDocSave) xmlC14NDocSave__internal_alias __attribute((visibility("hidden")));
+#define xmlC14NDocSave xmlC14NDocSave__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_c14n
+#undef xmlC14NDocSaveTo
+extern __typeof (xmlC14NDocSaveTo) xmlC14NDocSaveTo __attribute((alias("xmlC14NDocSaveTo__internal_alias")));
+#else
+#ifndef xmlC14NDocSaveTo
+extern __typeof (xmlC14NDocSaveTo) xmlC14NDocSaveTo__internal_alias __attribute((visibility("hidden")));
+#define xmlC14NDocSaveTo xmlC14NDocSaveTo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_c14n
+#undef xmlC14NExecute
+extern __typeof (xmlC14NExecute) xmlC14NExecute __attribute((alias("xmlC14NExecute__internal_alias")));
+#else
+#ifndef xmlC14NExecute
+extern __typeof (xmlC14NExecute) xmlC14NExecute__internal_alias __attribute((visibility("hidden")));
+#define xmlC14NExecute xmlC14NExecute__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlCanonicPath
+extern __typeof (xmlCanonicPath) xmlCanonicPath __attribute((alias("xmlCanonicPath__internal_alias")));
+#else
+#ifndef xmlCanonicPath
+extern __typeof (xmlCanonicPath) xmlCanonicPath__internal_alias __attribute((visibility("hidden")));
+#define xmlCanonicPath xmlCanonicPath__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogAdd
+extern __typeof (xmlCatalogAdd) xmlCatalogAdd __attribute((alias("xmlCatalogAdd__internal_alias")));
+#else
+#ifndef xmlCatalogAdd
+extern __typeof (xmlCatalogAdd) xmlCatalogAdd__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogAdd xmlCatalogAdd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogAddLocal
+extern __typeof (xmlCatalogAddLocal) xmlCatalogAddLocal __attribute((alias("xmlCatalogAddLocal__internal_alias")));
+#else
+#ifndef xmlCatalogAddLocal
+extern __typeof (xmlCatalogAddLocal) xmlCatalogAddLocal__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogAddLocal xmlCatalogAddLocal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogCleanup
+extern __typeof (xmlCatalogCleanup) xmlCatalogCleanup __attribute((alias("xmlCatalogCleanup__internal_alias")));
+#else
+#ifndef xmlCatalogCleanup
+extern __typeof (xmlCatalogCleanup) xmlCatalogCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogCleanup xmlCatalogCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogConvert
+extern __typeof (xmlCatalogConvert) xmlCatalogConvert __attribute((alias("xmlCatalogConvert__internal_alias")));
+#else
+#ifndef xmlCatalogConvert
+extern __typeof (xmlCatalogConvert) xmlCatalogConvert__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogConvert xmlCatalogConvert__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogDump
+extern __typeof (xmlCatalogDump) xmlCatalogDump __attribute((alias("xmlCatalogDump__internal_alias")));
+#else
+#ifndef xmlCatalogDump
+extern __typeof (xmlCatalogDump) xmlCatalogDump__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogDump xmlCatalogDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogFreeLocal
+extern __typeof (xmlCatalogFreeLocal) xmlCatalogFreeLocal __attribute((alias("xmlCatalogFreeLocal__internal_alias")));
+#else
+#ifndef xmlCatalogFreeLocal
+extern __typeof (xmlCatalogFreeLocal) xmlCatalogFreeLocal__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogFreeLocal xmlCatalogFreeLocal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogGetDefaults
+extern __typeof (xmlCatalogGetDefaults) xmlCatalogGetDefaults __attribute((alias("xmlCatalogGetDefaults__internal_alias")));
+#else
+#ifndef xmlCatalogGetDefaults
+extern __typeof (xmlCatalogGetDefaults) xmlCatalogGetDefaults__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogGetDefaults xmlCatalogGetDefaults__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogGetPublic
+extern __typeof (xmlCatalogGetPublic) xmlCatalogGetPublic __attribute((alias("xmlCatalogGetPublic__internal_alias")));
+#else
+#ifndef xmlCatalogGetPublic
+extern __typeof (xmlCatalogGetPublic) xmlCatalogGetPublic__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogGetPublic xmlCatalogGetPublic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogGetSystem
+extern __typeof (xmlCatalogGetSystem) xmlCatalogGetSystem __attribute((alias("xmlCatalogGetSystem__internal_alias")));
+#else
+#ifndef xmlCatalogGetSystem
+extern __typeof (xmlCatalogGetSystem) xmlCatalogGetSystem__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogGetSystem xmlCatalogGetSystem__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogIsEmpty
+extern __typeof (xmlCatalogIsEmpty) xmlCatalogIsEmpty __attribute((alias("xmlCatalogIsEmpty__internal_alias")));
+#else
+#ifndef xmlCatalogIsEmpty
+extern __typeof (xmlCatalogIsEmpty) xmlCatalogIsEmpty__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogIsEmpty xmlCatalogIsEmpty__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogLocalResolve
+extern __typeof (xmlCatalogLocalResolve) xmlCatalogLocalResolve __attribute((alias("xmlCatalogLocalResolve__internal_alias")));
+#else
+#ifndef xmlCatalogLocalResolve
+extern __typeof (xmlCatalogLocalResolve) xmlCatalogLocalResolve__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogLocalResolve xmlCatalogLocalResolve__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogLocalResolveURI
+extern __typeof (xmlCatalogLocalResolveURI) xmlCatalogLocalResolveURI __attribute((alias("xmlCatalogLocalResolveURI__internal_alias")));
+#else
+#ifndef xmlCatalogLocalResolveURI
+extern __typeof (xmlCatalogLocalResolveURI) xmlCatalogLocalResolveURI__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogLocalResolveURI xmlCatalogLocalResolveURI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogRemove
+extern __typeof (xmlCatalogRemove) xmlCatalogRemove __attribute((alias("xmlCatalogRemove__internal_alias")));
+#else
+#ifndef xmlCatalogRemove
+extern __typeof (xmlCatalogRemove) xmlCatalogRemove__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogRemove xmlCatalogRemove__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogResolve
+extern __typeof (xmlCatalogResolve) xmlCatalogResolve __attribute((alias("xmlCatalogResolve__internal_alias")));
+#else
+#ifndef xmlCatalogResolve
+extern __typeof (xmlCatalogResolve) xmlCatalogResolve__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogResolve xmlCatalogResolve__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogResolvePublic
+extern __typeof (xmlCatalogResolvePublic) xmlCatalogResolvePublic __attribute((alias("xmlCatalogResolvePublic__internal_alias")));
+#else
+#ifndef xmlCatalogResolvePublic
+extern __typeof (xmlCatalogResolvePublic) xmlCatalogResolvePublic__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogResolvePublic xmlCatalogResolvePublic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogResolveSystem
+extern __typeof (xmlCatalogResolveSystem) xmlCatalogResolveSystem __attribute((alias("xmlCatalogResolveSystem__internal_alias")));
+#else
+#ifndef xmlCatalogResolveSystem
+extern __typeof (xmlCatalogResolveSystem) xmlCatalogResolveSystem__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogResolveSystem xmlCatalogResolveSystem__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogResolveURI
+extern __typeof (xmlCatalogResolveURI) xmlCatalogResolveURI __attribute((alias("xmlCatalogResolveURI__internal_alias")));
+#else
+#ifndef xmlCatalogResolveURI
+extern __typeof (xmlCatalogResolveURI) xmlCatalogResolveURI__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogResolveURI xmlCatalogResolveURI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogSetDebug
+extern __typeof (xmlCatalogSetDebug) xmlCatalogSetDebug __attribute((alias("xmlCatalogSetDebug__internal_alias")));
+#else
+#ifndef xmlCatalogSetDebug
+extern __typeof (xmlCatalogSetDebug) xmlCatalogSetDebug__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogSetDebug xmlCatalogSetDebug__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogSetDefaultPrefer
+extern __typeof (xmlCatalogSetDefaultPrefer) xmlCatalogSetDefaultPrefer __attribute((alias("xmlCatalogSetDefaultPrefer__internal_alias")));
+#else
+#ifndef xmlCatalogSetDefaultPrefer
+extern __typeof (xmlCatalogSetDefaultPrefer) xmlCatalogSetDefaultPrefer__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogSetDefaultPrefer xmlCatalogSetDefaultPrefer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlCatalogSetDefaults
+extern __typeof (xmlCatalogSetDefaults) xmlCatalogSetDefaults __attribute((alias("xmlCatalogSetDefaults__internal_alias")));
+#else
+#ifndef xmlCatalogSetDefaults
+extern __typeof (xmlCatalogSetDefaults) xmlCatalogSetDefaults__internal_alias __attribute((visibility("hidden")));
+#define xmlCatalogSetDefaults xmlCatalogSetDefaults__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCharEncCloseFunc
+extern __typeof (xmlCharEncCloseFunc) xmlCharEncCloseFunc __attribute((alias("xmlCharEncCloseFunc__internal_alias")));
+#else
+#ifndef xmlCharEncCloseFunc
+extern __typeof (xmlCharEncCloseFunc) xmlCharEncCloseFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlCharEncCloseFunc xmlCharEncCloseFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCharEncFirstLine
+extern __typeof (xmlCharEncFirstLine) xmlCharEncFirstLine __attribute((alias("xmlCharEncFirstLine__internal_alias")));
+#else
+#ifndef xmlCharEncFirstLine
+extern __typeof (xmlCharEncFirstLine) xmlCharEncFirstLine__internal_alias __attribute((visibility("hidden")));
+#define xmlCharEncFirstLine xmlCharEncFirstLine__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCharEncInFunc
+extern __typeof (xmlCharEncInFunc) xmlCharEncInFunc __attribute((alias("xmlCharEncInFunc__internal_alias")));
+#else
+#ifndef xmlCharEncInFunc
+extern __typeof (xmlCharEncInFunc) xmlCharEncInFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlCharEncInFunc xmlCharEncInFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCharEncOutFunc
+extern __typeof (xmlCharEncOutFunc) xmlCharEncOutFunc __attribute((alias("xmlCharEncOutFunc__internal_alias")));
+#else
+#ifndef xmlCharEncOutFunc
+extern __typeof (xmlCharEncOutFunc) xmlCharEncOutFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlCharEncOutFunc xmlCharEncOutFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlCharInRange
+extern __typeof (xmlCharInRange) xmlCharInRange __attribute((alias("xmlCharInRange__internal_alias")));
+#else
+#ifndef xmlCharInRange
+extern __typeof (xmlCharInRange) xmlCharInRange__internal_alias __attribute((visibility("hidden")));
+#define xmlCharInRange xmlCharInRange__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlCharStrdup
+extern __typeof (xmlCharStrdup) xmlCharStrdup __attribute((alias("xmlCharStrdup__internal_alias")));
+#else
+#ifndef xmlCharStrdup
+extern __typeof (xmlCharStrdup) xmlCharStrdup__internal_alias __attribute((visibility("hidden")));
+#define xmlCharStrdup xmlCharStrdup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlCharStrndup
+extern __typeof (xmlCharStrndup) xmlCharStrndup __attribute((alias("xmlCharStrndup__internal_alias")));
+#else
+#ifndef xmlCharStrndup
+extern __typeof (xmlCharStrndup) xmlCharStrndup__internal_alias __attribute((visibility("hidden")));
+#define xmlCharStrndup xmlCharStrndup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlCheckFilename
+extern __typeof (xmlCheckFilename) xmlCheckFilename __attribute((alias("xmlCheckFilename__internal_alias")));
+#else
+#ifndef xmlCheckFilename
+extern __typeof (xmlCheckFilename) xmlCheckFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlCheckFilename xmlCheckFilename__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlCheckHTTPInput
+extern __typeof (xmlCheckHTTPInput) xmlCheckHTTPInput __attribute((alias("xmlCheckHTTPInput__internal_alias")));
+#else
+#ifndef xmlCheckHTTPInput
+extern __typeof (xmlCheckHTTPInput) xmlCheckHTTPInput__internal_alias __attribute((visibility("hidden")));
+#define xmlCheckHTTPInput xmlCheckHTTPInput__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCheckLanguageID
+extern __typeof (xmlCheckLanguageID) xmlCheckLanguageID __attribute((alias("xmlCheckLanguageID__internal_alias")));
+#else
+#ifndef xmlCheckLanguageID
+extern __typeof (xmlCheckLanguageID) xmlCheckLanguageID__internal_alias __attribute((visibility("hidden")));
+#define xmlCheckLanguageID xmlCheckLanguageID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlCheckUTF8
+extern __typeof (xmlCheckUTF8) xmlCheckUTF8 __attribute((alias("xmlCheckUTF8__internal_alias")));
+#else
+#ifndef xmlCheckUTF8
+extern __typeof (xmlCheckUTF8) xmlCheckUTF8__internal_alias __attribute((visibility("hidden")));
+#define xmlCheckUTF8 xmlCheckUTF8__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlCheckVersion
+extern __typeof (xmlCheckVersion) xmlCheckVersion __attribute((alias("xmlCheckVersion__internal_alias")));
+#else
+#ifndef xmlCheckVersion
+extern __typeof (xmlCheckVersion) xmlCheckVersion__internal_alias __attribute((visibility("hidden")));
+#define xmlCheckVersion xmlCheckVersion__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlChildElementCount
+extern __typeof (xmlChildElementCount) xmlChildElementCount __attribute((alias("xmlChildElementCount__internal_alias")));
+#else
+#ifndef xmlChildElementCount
+extern __typeof (xmlChildElementCount) xmlChildElementCount__internal_alias __attribute((visibility("hidden")));
+#define xmlChildElementCount xmlChildElementCount__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCleanupCharEncodingHandlers
+extern __typeof (xmlCleanupCharEncodingHandlers) xmlCleanupCharEncodingHandlers __attribute((alias("xmlCleanupCharEncodingHandlers__internal_alias")));
+#else
+#ifndef xmlCleanupCharEncodingHandlers
+extern __typeof (xmlCleanupCharEncodingHandlers) xmlCleanupCharEncodingHandlers__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupCharEncodingHandlers xmlCleanupCharEncodingHandlers__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlCleanupEncodingAliases
+extern __typeof (xmlCleanupEncodingAliases) xmlCleanupEncodingAliases __attribute((alias("xmlCleanupEncodingAliases__internal_alias")));
+#else
+#ifndef xmlCleanupEncodingAliases
+extern __typeof (xmlCleanupEncodingAliases) xmlCleanupEncodingAliases__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupEncodingAliases xmlCleanupEncodingAliases__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlCleanupGlobals
+extern __typeof (xmlCleanupGlobals) xmlCleanupGlobals __attribute((alias("xmlCleanupGlobals__internal_alias")));
+#else
+#ifndef xmlCleanupGlobals
+extern __typeof (xmlCleanupGlobals) xmlCleanupGlobals__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupGlobals xmlCleanupGlobals__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlCleanupInputCallbacks
+extern __typeof (xmlCleanupInputCallbacks) xmlCleanupInputCallbacks __attribute((alias("xmlCleanupInputCallbacks__internal_alias")));
+#else
+#ifndef xmlCleanupInputCallbacks
+extern __typeof (xmlCleanupInputCallbacks) xmlCleanupInputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupInputCallbacks xmlCleanupInputCallbacks__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlCleanupMemory
+extern __typeof (xmlCleanupMemory) xmlCleanupMemory __attribute((alias("xmlCleanupMemory__internal_alias")));
+#else
+#ifndef xmlCleanupMemory
+extern __typeof (xmlCleanupMemory) xmlCleanupMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupMemory xmlCleanupMemory__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlCleanupOutputCallbacks
+extern __typeof (xmlCleanupOutputCallbacks) xmlCleanupOutputCallbacks __attribute((alias("xmlCleanupOutputCallbacks__internal_alias")));
+#else
+#ifndef xmlCleanupOutputCallbacks
+extern __typeof (xmlCleanupOutputCallbacks) xmlCleanupOutputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupOutputCallbacks xmlCleanupOutputCallbacks__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCleanupParser
+extern __typeof (xmlCleanupParser) xmlCleanupParser __attribute((alias("xmlCleanupParser__internal_alias")));
+#else
+#ifndef xmlCleanupParser
+extern __typeof (xmlCleanupParser) xmlCleanupParser__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupParser xmlCleanupParser__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlCleanupPredefinedEntities
+extern __typeof (xmlCleanupPredefinedEntities) xmlCleanupPredefinedEntities __attribute((alias("xmlCleanupPredefinedEntities__internal_alias")));
+#else
+#ifndef xmlCleanupPredefinedEntities
+extern __typeof (xmlCleanupPredefinedEntities) xmlCleanupPredefinedEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupPredefinedEntities xmlCleanupPredefinedEntities__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlCleanupThreads
+extern __typeof (xmlCleanupThreads) xmlCleanupThreads __attribute((alias("xmlCleanupThreads__internal_alias")));
+#else
+#ifndef xmlCleanupThreads
+extern __typeof (xmlCleanupThreads) xmlCleanupThreads__internal_alias __attribute((visibility("hidden")));
+#define xmlCleanupThreads xmlCleanupThreads__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlClearNodeInfoSeq
+extern __typeof (xmlClearNodeInfoSeq) xmlClearNodeInfoSeq __attribute((alias("xmlClearNodeInfoSeq__internal_alias")));
+#else
+#ifndef xmlClearNodeInfoSeq
+extern __typeof (xmlClearNodeInfoSeq) xmlClearNodeInfoSeq__internal_alias __attribute((visibility("hidden")));
+#define xmlClearNodeInfoSeq xmlClearNodeInfoSeq__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlClearParserCtxt
+extern __typeof (xmlClearParserCtxt) xmlClearParserCtxt __attribute((alias("xmlClearParserCtxt__internal_alias")));
+#else
+#ifndef xmlClearParserCtxt
+extern __typeof (xmlClearParserCtxt) xmlClearParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlClearParserCtxt xmlClearParserCtxt__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlConvertSGMLCatalog
+extern __typeof (xmlConvertSGMLCatalog) xmlConvertSGMLCatalog __attribute((alias("xmlConvertSGMLCatalog__internal_alias")));
+#else
+#ifndef xmlConvertSGMLCatalog
+extern __typeof (xmlConvertSGMLCatalog) xmlConvertSGMLCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlConvertSGMLCatalog xmlConvertSGMLCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_valid
+#undef xmlCopyAttributeTable
+extern __typeof (xmlCopyAttributeTable) xmlCopyAttributeTable __attribute((alias("xmlCopyAttributeTable__internal_alias")));
+#else
+#ifndef xmlCopyAttributeTable
+extern __typeof (xmlCopyAttributeTable) xmlCopyAttributeTable__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyAttributeTable xmlCopyAttributeTable__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlCopyChar
+extern __typeof (xmlCopyChar) xmlCopyChar __attribute((alias("xmlCopyChar__internal_alias")));
+#else
+#ifndef xmlCopyChar
+extern __typeof (xmlCopyChar) xmlCopyChar__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyChar xmlCopyChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlCopyCharMultiByte
+extern __typeof (xmlCopyCharMultiByte) xmlCopyCharMultiByte __attribute((alias("xmlCopyCharMultiByte__internal_alias")));
+#else
+#ifndef xmlCopyCharMultiByte
+extern __typeof (xmlCopyCharMultiByte) xmlCopyCharMultiByte__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyCharMultiByte xmlCopyCharMultiByte__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlCopyDoc
+extern __typeof (xmlCopyDoc) xmlCopyDoc __attribute((alias("xmlCopyDoc__internal_alias")));
+#else
+#ifndef xmlCopyDoc
+extern __typeof (xmlCopyDoc) xmlCopyDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyDoc xmlCopyDoc__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlCopyDocElementContent
+extern __typeof (xmlCopyDocElementContent) xmlCopyDocElementContent __attribute((alias("xmlCopyDocElementContent__internal_alias")));
+#else
+#ifndef xmlCopyDocElementContent
+extern __typeof (xmlCopyDocElementContent) xmlCopyDocElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyDocElementContent xmlCopyDocElementContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlCopyDtd
+extern __typeof (xmlCopyDtd) xmlCopyDtd __attribute((alias("xmlCopyDtd__internal_alias")));
+#else
+#ifndef xmlCopyDtd
+extern __typeof (xmlCopyDtd) xmlCopyDtd__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyDtd xmlCopyDtd__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlCopyElementContent
+extern __typeof (xmlCopyElementContent) xmlCopyElementContent __attribute((alias("xmlCopyElementContent__internal_alias")));
+#else
+#ifndef xmlCopyElementContent
+extern __typeof (xmlCopyElementContent) xmlCopyElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyElementContent xmlCopyElementContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_valid
+#undef xmlCopyElementTable
+extern __typeof (xmlCopyElementTable) xmlCopyElementTable __attribute((alias("xmlCopyElementTable__internal_alias")));
+#else
+#ifndef xmlCopyElementTable
+extern __typeof (xmlCopyElementTable) xmlCopyElementTable__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyElementTable xmlCopyElementTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_entities
+#undef xmlCopyEntitiesTable
+extern __typeof (xmlCopyEntitiesTable) xmlCopyEntitiesTable __attribute((alias("xmlCopyEntitiesTable__internal_alias")));
+#else
+#ifndef xmlCopyEntitiesTable
+extern __typeof (xmlCopyEntitiesTable) xmlCopyEntitiesTable__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyEntitiesTable xmlCopyEntitiesTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_valid
+#undef xmlCopyEnumeration
+extern __typeof (xmlCopyEnumeration) xmlCopyEnumeration __attribute((alias("xmlCopyEnumeration__internal_alias")));
+#else
+#ifndef xmlCopyEnumeration
+extern __typeof (xmlCopyEnumeration) xmlCopyEnumeration__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyEnumeration xmlCopyEnumeration__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlCopyError
+extern __typeof (xmlCopyError) xmlCopyError __attribute((alias("xmlCopyError__internal_alias")));
+#else
+#ifndef xmlCopyError
+extern __typeof (xmlCopyError) xmlCopyError__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyError xmlCopyError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyNamespace
+extern __typeof (xmlCopyNamespace) xmlCopyNamespace __attribute((alias("xmlCopyNamespace__internal_alias")));
+#else
+#ifndef xmlCopyNamespace
+extern __typeof (xmlCopyNamespace) xmlCopyNamespace__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyNamespace xmlCopyNamespace__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyNamespaceList
+extern __typeof (xmlCopyNamespaceList) xmlCopyNamespaceList __attribute((alias("xmlCopyNamespaceList__internal_alias")));
+#else
+#ifndef xmlCopyNamespaceList
+extern __typeof (xmlCopyNamespaceList) xmlCopyNamespaceList__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyNamespaceList xmlCopyNamespaceList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyNode
+extern __typeof (xmlCopyNode) xmlCopyNode __attribute((alias("xmlCopyNode__internal_alias")));
+#else
+#ifndef xmlCopyNode
+extern __typeof (xmlCopyNode) xmlCopyNode__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyNode xmlCopyNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyNodeList
+extern __typeof (xmlCopyNodeList) xmlCopyNodeList __attribute((alias("xmlCopyNodeList__internal_alias")));
+#else
+#ifndef xmlCopyNodeList
+extern __typeof (xmlCopyNodeList) xmlCopyNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyNodeList xmlCopyNodeList__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_valid
+#undef xmlCopyNotationTable
+extern __typeof (xmlCopyNotationTable) xmlCopyNotationTable __attribute((alias("xmlCopyNotationTable__internal_alias")));
+#else
+#ifndef xmlCopyNotationTable
+extern __typeof (xmlCopyNotationTable) xmlCopyNotationTable__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyNotationTable xmlCopyNotationTable__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyProp
+extern __typeof (xmlCopyProp) xmlCopyProp __attribute((alias("xmlCopyProp__internal_alias")));
+#else
+#ifndef xmlCopyProp
+extern __typeof (xmlCopyProp) xmlCopyProp__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyProp xmlCopyProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCopyPropList
+extern __typeof (xmlCopyPropList) xmlCopyPropList __attribute((alias("xmlCopyPropList__internal_alias")));
+#else
+#ifndef xmlCopyPropList
+extern __typeof (xmlCopyPropList) xmlCopyPropList__internal_alias __attribute((visibility("hidden")));
+#define xmlCopyPropList xmlCopyPropList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateDocParserCtxt
+extern __typeof (xmlCreateDocParserCtxt) xmlCreateDocParserCtxt __attribute((alias("xmlCreateDocParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateDocParserCtxt
+extern __typeof (xmlCreateDocParserCtxt) xmlCreateDocParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateDocParserCtxt xmlCreateDocParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlCreateEntitiesTable
+extern __typeof (xmlCreateEntitiesTable) xmlCreateEntitiesTable __attribute((alias("xmlCreateEntitiesTable__internal_alias")));
+#else
+#ifndef xmlCreateEntitiesTable
+extern __typeof (xmlCreateEntitiesTable) xmlCreateEntitiesTable__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateEntitiesTable xmlCreateEntitiesTable__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateEntityParserCtxt
+extern __typeof (xmlCreateEntityParserCtxt) xmlCreateEntityParserCtxt __attribute((alias("xmlCreateEntityParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateEntityParserCtxt
+extern __typeof (xmlCreateEntityParserCtxt) xmlCreateEntityParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateEntityParserCtxt xmlCreateEntityParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlCreateEnumeration
+extern __typeof (xmlCreateEnumeration) xmlCreateEnumeration __attribute((alias("xmlCreateEnumeration__internal_alias")));
+#else
+#ifndef xmlCreateEnumeration
+extern __typeof (xmlCreateEnumeration) xmlCreateEnumeration__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateEnumeration xmlCreateEnumeration__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateFileParserCtxt
+extern __typeof (xmlCreateFileParserCtxt) xmlCreateFileParserCtxt __attribute((alias("xmlCreateFileParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateFileParserCtxt
+extern __typeof (xmlCreateFileParserCtxt) xmlCreateFileParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateFileParserCtxt xmlCreateFileParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateIOParserCtxt
+extern __typeof (xmlCreateIOParserCtxt) xmlCreateIOParserCtxt __attribute((alias("xmlCreateIOParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateIOParserCtxt
+extern __typeof (xmlCreateIOParserCtxt) xmlCreateIOParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateIOParserCtxt xmlCreateIOParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlCreateIntSubset
+extern __typeof (xmlCreateIntSubset) xmlCreateIntSubset __attribute((alias("xmlCreateIntSubset__internal_alias")));
+#else
+#ifndef xmlCreateIntSubset
+extern __typeof (xmlCreateIntSubset) xmlCreateIntSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateIntSubset xmlCreateIntSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateMemoryParserCtxt
+extern __typeof (xmlCreateMemoryParserCtxt) xmlCreateMemoryParserCtxt __attribute((alias("xmlCreateMemoryParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateMemoryParserCtxt
+extern __typeof (xmlCreateMemoryParserCtxt) xmlCreateMemoryParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateMemoryParserCtxt xmlCreateMemoryParserCtxt__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PUSH_ENABLED)
+#ifdef bottom_parser
+#undef xmlCreatePushParserCtxt
+extern __typeof (xmlCreatePushParserCtxt) xmlCreatePushParserCtxt __attribute((alias("xmlCreatePushParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreatePushParserCtxt
+extern __typeof (xmlCreatePushParserCtxt) xmlCreatePushParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreatePushParserCtxt xmlCreatePushParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlCreateURI
+extern __typeof (xmlCreateURI) xmlCreateURI __attribute((alias("xmlCreateURI__internal_alias")));
+#else
+#ifndef xmlCreateURI
+extern __typeof (xmlCreateURI) xmlCreateURI__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateURI xmlCreateURI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCreateURLParserCtxt
+extern __typeof (xmlCreateURLParserCtxt) xmlCreateURLParserCtxt __attribute((alias("xmlCreateURLParserCtxt__internal_alias")));
+#else
+#ifndef xmlCreateURLParserCtxt
+extern __typeof (xmlCreateURLParserCtxt) xmlCreateURLParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlCreateURLParserCtxt xmlCreateURLParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlCtxtGetLastError
+extern __typeof (xmlCtxtGetLastError) xmlCtxtGetLastError __attribute((alias("xmlCtxtGetLastError__internal_alias")));
+#else
+#ifndef xmlCtxtGetLastError
+extern __typeof (xmlCtxtGetLastError) xmlCtxtGetLastError__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtGetLastError xmlCtxtGetLastError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReadDoc
+extern __typeof (xmlCtxtReadDoc) xmlCtxtReadDoc __attribute((alias("xmlCtxtReadDoc__internal_alias")));
+#else
+#ifndef xmlCtxtReadDoc
+extern __typeof (xmlCtxtReadDoc) xmlCtxtReadDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReadDoc xmlCtxtReadDoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReadFd
+extern __typeof (xmlCtxtReadFd) xmlCtxtReadFd __attribute((alias("xmlCtxtReadFd__internal_alias")));
+#else
+#ifndef xmlCtxtReadFd
+extern __typeof (xmlCtxtReadFd) xmlCtxtReadFd__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReadFd xmlCtxtReadFd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReadFile
+extern __typeof (xmlCtxtReadFile) xmlCtxtReadFile __attribute((alias("xmlCtxtReadFile__internal_alias")));
+#else
+#ifndef xmlCtxtReadFile
+extern __typeof (xmlCtxtReadFile) xmlCtxtReadFile__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReadFile xmlCtxtReadFile__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReadIO
+extern __typeof (xmlCtxtReadIO) xmlCtxtReadIO __attribute((alias("xmlCtxtReadIO__internal_alias")));
+#else
+#ifndef xmlCtxtReadIO
+extern __typeof (xmlCtxtReadIO) xmlCtxtReadIO__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReadIO xmlCtxtReadIO__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReadMemory
+extern __typeof (xmlCtxtReadMemory) xmlCtxtReadMemory __attribute((alias("xmlCtxtReadMemory__internal_alias")));
+#else
+#ifndef xmlCtxtReadMemory
+extern __typeof (xmlCtxtReadMemory) xmlCtxtReadMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReadMemory xmlCtxtReadMemory__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtReset
+extern __typeof (xmlCtxtReset) xmlCtxtReset __attribute((alias("xmlCtxtReset__internal_alias")));
+#else
+#ifndef xmlCtxtReset
+extern __typeof (xmlCtxtReset) xmlCtxtReset__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtReset xmlCtxtReset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlCtxtResetLastError
+extern __typeof (xmlCtxtResetLastError) xmlCtxtResetLastError __attribute((alias("xmlCtxtResetLastError__internal_alias")));
+#else
+#ifndef xmlCtxtResetLastError
+extern __typeof (xmlCtxtResetLastError) xmlCtxtResetLastError__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtResetLastError xmlCtxtResetLastError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtResetPush
+extern __typeof (xmlCtxtResetPush) xmlCtxtResetPush __attribute((alias("xmlCtxtResetPush__internal_alias")));
+#else
+#ifndef xmlCtxtResetPush
+extern __typeof (xmlCtxtResetPush) xmlCtxtResetPush__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtResetPush xmlCtxtResetPush__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlCtxtUseOptions
+extern __typeof (xmlCtxtUseOptions) xmlCtxtUseOptions __attribute((alias("xmlCtxtUseOptions__internal_alias")));
+#else
+#ifndef xmlCtxtUseOptions
+extern __typeof (xmlCtxtUseOptions) xmlCtxtUseOptions__internal_alias __attribute((visibility("hidden")));
+#define xmlCtxtUseOptions xmlCtxtUseOptions__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlCurrentChar
+extern __typeof (xmlCurrentChar) xmlCurrentChar __attribute((alias("xmlCurrentChar__internal_alias")));
+#else
+#ifndef xmlCurrentChar
+extern __typeof (xmlCurrentChar) xmlCurrentChar__internal_alias __attribute((visibility("hidden")));
+#define xmlCurrentChar xmlCurrentChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapAdoptNode
+extern __typeof (xmlDOMWrapAdoptNode) xmlDOMWrapAdoptNode __attribute((alias("xmlDOMWrapAdoptNode__internal_alias")));
+#else
+#ifndef xmlDOMWrapAdoptNode
+extern __typeof (xmlDOMWrapAdoptNode) xmlDOMWrapAdoptNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapAdoptNode xmlDOMWrapAdoptNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapCloneNode
+extern __typeof (xmlDOMWrapCloneNode) xmlDOMWrapCloneNode __attribute((alias("xmlDOMWrapCloneNode__internal_alias")));
+#else
+#ifndef xmlDOMWrapCloneNode
+extern __typeof (xmlDOMWrapCloneNode) xmlDOMWrapCloneNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapCloneNode xmlDOMWrapCloneNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapFreeCtxt
+extern __typeof (xmlDOMWrapFreeCtxt) xmlDOMWrapFreeCtxt __attribute((alias("xmlDOMWrapFreeCtxt__internal_alias")));
+#else
+#ifndef xmlDOMWrapFreeCtxt
+extern __typeof (xmlDOMWrapFreeCtxt) xmlDOMWrapFreeCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapFreeCtxt xmlDOMWrapFreeCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapNewCtxt
+extern __typeof (xmlDOMWrapNewCtxt) xmlDOMWrapNewCtxt __attribute((alias("xmlDOMWrapNewCtxt__internal_alias")));
+#else
+#ifndef xmlDOMWrapNewCtxt
+extern __typeof (xmlDOMWrapNewCtxt) xmlDOMWrapNewCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapNewCtxt xmlDOMWrapNewCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapReconcileNamespaces
+extern __typeof (xmlDOMWrapReconcileNamespaces) xmlDOMWrapReconcileNamespaces __attribute((alias("xmlDOMWrapReconcileNamespaces__internal_alias")));
+#else
+#ifndef xmlDOMWrapReconcileNamespaces
+extern __typeof (xmlDOMWrapReconcileNamespaces) xmlDOMWrapReconcileNamespaces__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapReconcileNamespaces xmlDOMWrapReconcileNamespaces__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDOMWrapRemoveNode
+extern __typeof (xmlDOMWrapRemoveNode) xmlDOMWrapRemoveNode __attribute((alias("xmlDOMWrapRemoveNode__internal_alias")));
+#else
+#ifndef xmlDOMWrapRemoveNode
+extern __typeof (xmlDOMWrapRemoveNode) xmlDOMWrapRemoveNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDOMWrapRemoveNode xmlDOMWrapRemoveNode__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugCheckDocument
+extern __typeof (xmlDebugCheckDocument) xmlDebugCheckDocument __attribute((alias("xmlDebugCheckDocument__internal_alias")));
+#else
+#ifndef xmlDebugCheckDocument
+extern __typeof (xmlDebugCheckDocument) xmlDebugCheckDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugCheckDocument xmlDebugCheckDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpAttr
+extern __typeof (xmlDebugDumpAttr) xmlDebugDumpAttr __attribute((alias("xmlDebugDumpAttr__internal_alias")));
+#else
+#ifndef xmlDebugDumpAttr
+extern __typeof (xmlDebugDumpAttr) xmlDebugDumpAttr__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpAttr xmlDebugDumpAttr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpAttrList
+extern __typeof (xmlDebugDumpAttrList) xmlDebugDumpAttrList __attribute((alias("xmlDebugDumpAttrList__internal_alias")));
+#else
+#ifndef xmlDebugDumpAttrList
+extern __typeof (xmlDebugDumpAttrList) xmlDebugDumpAttrList__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpAttrList xmlDebugDumpAttrList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpDTD
+extern __typeof (xmlDebugDumpDTD) xmlDebugDumpDTD __attribute((alias("xmlDebugDumpDTD__internal_alias")));
+#else
+#ifndef xmlDebugDumpDTD
+extern __typeof (xmlDebugDumpDTD) xmlDebugDumpDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpDTD xmlDebugDumpDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpDocument
+extern __typeof (xmlDebugDumpDocument) xmlDebugDumpDocument __attribute((alias("xmlDebugDumpDocument__internal_alias")));
+#else
+#ifndef xmlDebugDumpDocument
+extern __typeof (xmlDebugDumpDocument) xmlDebugDumpDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpDocument xmlDebugDumpDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpDocumentHead
+extern __typeof (xmlDebugDumpDocumentHead) xmlDebugDumpDocumentHead __attribute((alias("xmlDebugDumpDocumentHead__internal_alias")));
+#else
+#ifndef xmlDebugDumpDocumentHead
+extern __typeof (xmlDebugDumpDocumentHead) xmlDebugDumpDocumentHead__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpDocumentHead xmlDebugDumpDocumentHead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpEntities
+extern __typeof (xmlDebugDumpEntities) xmlDebugDumpEntities __attribute((alias("xmlDebugDumpEntities__internal_alias")));
+#else
+#ifndef xmlDebugDumpEntities
+extern __typeof (xmlDebugDumpEntities) xmlDebugDumpEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpEntities xmlDebugDumpEntities__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpNode
+extern __typeof (xmlDebugDumpNode) xmlDebugDumpNode __attribute((alias("xmlDebugDumpNode__internal_alias")));
+#else
+#ifndef xmlDebugDumpNode
+extern __typeof (xmlDebugDumpNode) xmlDebugDumpNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpNode xmlDebugDumpNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpNodeList
+extern __typeof (xmlDebugDumpNodeList) xmlDebugDumpNodeList __attribute((alias("xmlDebugDumpNodeList__internal_alias")));
+#else
+#ifndef xmlDebugDumpNodeList
+extern __typeof (xmlDebugDumpNodeList) xmlDebugDumpNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpNodeList xmlDebugDumpNodeList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpOneNode
+extern __typeof (xmlDebugDumpOneNode) xmlDebugDumpOneNode __attribute((alias("xmlDebugDumpOneNode__internal_alias")));
+#else
+#ifndef xmlDebugDumpOneNode
+extern __typeof (xmlDebugDumpOneNode) xmlDebugDumpOneNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpOneNode xmlDebugDumpOneNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlDebugDumpString
+extern __typeof (xmlDebugDumpString) xmlDebugDumpString __attribute((alias("xmlDebugDumpString__internal_alias")));
+#else
+#ifndef xmlDebugDumpString
+extern __typeof (xmlDebugDumpString) xmlDebugDumpString__internal_alias __attribute((visibility("hidden")));
+#define xmlDebugDumpString xmlDebugDumpString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlDecodeEntities
+extern __typeof (xmlDecodeEntities) xmlDecodeEntities __attribute((alias("xmlDecodeEntities__internal_alias")));
+#else
+#ifndef xmlDecodeEntities
+extern __typeof (xmlDecodeEntities) xmlDecodeEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlDecodeEntities xmlDecodeEntities__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlDefaultSAXHandlerInit
+extern __typeof (xmlDefaultSAXHandlerInit) xmlDefaultSAXHandlerInit __attribute((alias("xmlDefaultSAXHandlerInit__internal_alias")));
+#else
+#ifndef xmlDefaultSAXHandlerInit
+extern __typeof (xmlDefaultSAXHandlerInit) xmlDefaultSAXHandlerInit__internal_alias __attribute((visibility("hidden")));
+#define xmlDefaultSAXHandlerInit xmlDefaultSAXHandlerInit__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlDelEncodingAlias
+extern __typeof (xmlDelEncodingAlias) xmlDelEncodingAlias __attribute((alias("xmlDelEncodingAlias__internal_alias")));
+#else
+#ifndef xmlDelEncodingAlias
+extern __typeof (xmlDelEncodingAlias) xmlDelEncodingAlias__internal_alias __attribute((visibility("hidden")));
+#define xmlDelEncodingAlias xmlDelEncodingAlias__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlDeregisterNodeDefault
+extern __typeof (xmlDeregisterNodeDefault) xmlDeregisterNodeDefault __attribute((alias("xmlDeregisterNodeDefault__internal_alias")));
+#else
+#ifndef xmlDeregisterNodeDefault
+extern __typeof (xmlDeregisterNodeDefault) xmlDeregisterNodeDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlDeregisterNodeDefault xmlDeregisterNodeDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlDetectCharEncoding
+extern __typeof (xmlDetectCharEncoding) xmlDetectCharEncoding __attribute((alias("xmlDetectCharEncoding__internal_alias")));
+#else
+#ifndef xmlDetectCharEncoding
+extern __typeof (xmlDetectCharEncoding) xmlDetectCharEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlDetectCharEncoding xmlDetectCharEncoding__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictCleanup
+extern __typeof (xmlDictCleanup) xmlDictCleanup __attribute((alias("xmlDictCleanup__internal_alias")));
+#else
+#ifndef xmlDictCleanup
+extern __typeof (xmlDictCleanup) xmlDictCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlDictCleanup xmlDictCleanup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictCreate
+extern __typeof (xmlDictCreate) xmlDictCreate __attribute((alias("xmlDictCreate__internal_alias")));
+#else
+#ifndef xmlDictCreate
+extern __typeof (xmlDictCreate) xmlDictCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlDictCreate xmlDictCreate__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictCreateSub
+extern __typeof (xmlDictCreateSub) xmlDictCreateSub __attribute((alias("xmlDictCreateSub__internal_alias")));
+#else
+#ifndef xmlDictCreateSub
+extern __typeof (xmlDictCreateSub) xmlDictCreateSub__internal_alias __attribute((visibility("hidden")));
+#define xmlDictCreateSub xmlDictCreateSub__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictExists
+extern __typeof (xmlDictExists) xmlDictExists __attribute((alias("xmlDictExists__internal_alias")));
+#else
+#ifndef xmlDictExists
+extern __typeof (xmlDictExists) xmlDictExists__internal_alias __attribute((visibility("hidden")));
+#define xmlDictExists xmlDictExists__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictFree
+extern __typeof (xmlDictFree) xmlDictFree __attribute((alias("xmlDictFree__internal_alias")));
+#else
+#ifndef xmlDictFree
+extern __typeof (xmlDictFree) xmlDictFree__internal_alias __attribute((visibility("hidden")));
+#define xmlDictFree xmlDictFree__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictGetUsage
+extern __typeof (xmlDictGetUsage) xmlDictGetUsage __attribute((alias("xmlDictGetUsage__internal_alias")));
+#else
+#ifndef xmlDictGetUsage
+extern __typeof (xmlDictGetUsage) xmlDictGetUsage__internal_alias __attribute((visibility("hidden")));
+#define xmlDictGetUsage xmlDictGetUsage__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictLookup
+extern __typeof (xmlDictLookup) xmlDictLookup __attribute((alias("xmlDictLookup__internal_alias")));
+#else
+#ifndef xmlDictLookup
+extern __typeof (xmlDictLookup) xmlDictLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlDictLookup xmlDictLookup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictOwns
+extern __typeof (xmlDictOwns) xmlDictOwns __attribute((alias("xmlDictOwns__internal_alias")));
+#else
+#ifndef xmlDictOwns
+extern __typeof (xmlDictOwns) xmlDictOwns__internal_alias __attribute((visibility("hidden")));
+#define xmlDictOwns xmlDictOwns__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictQLookup
+extern __typeof (xmlDictQLookup) xmlDictQLookup __attribute((alias("xmlDictQLookup__internal_alias")));
+#else
+#ifndef xmlDictQLookup
+extern __typeof (xmlDictQLookup) xmlDictQLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlDictQLookup xmlDictQLookup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictReference
+extern __typeof (xmlDictReference) xmlDictReference __attribute((alias("xmlDictReference__internal_alias")));
+#else
+#ifndef xmlDictReference
+extern __typeof (xmlDictReference) xmlDictReference__internal_alias __attribute((visibility("hidden")));
+#define xmlDictReference xmlDictReference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictSetLimit
+extern __typeof (xmlDictSetLimit) xmlDictSetLimit __attribute((alias("xmlDictSetLimit__internal_alias")));
+#else
+#ifndef xmlDictSetLimit
+extern __typeof (xmlDictSetLimit) xmlDictSetLimit__internal_alias __attribute((visibility("hidden")));
+#define xmlDictSetLimit xmlDictSetLimit__internal_alias
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlDictSize
+extern __typeof (xmlDictSize) xmlDictSize __attribute((alias("xmlDictSize__internal_alias")));
+#else
+#ifndef xmlDictSize
+extern __typeof (xmlDictSize) xmlDictSize__internal_alias __attribute((visibility("hidden")));
+#define xmlDictSize xmlDictSize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDocCopyNode
+extern __typeof (xmlDocCopyNode) xmlDocCopyNode __attribute((alias("xmlDocCopyNode__internal_alias")));
+#else
+#ifndef xmlDocCopyNode
+extern __typeof (xmlDocCopyNode) xmlDocCopyNode__internal_alias __attribute((visibility("hidden")));
+#define xmlDocCopyNode xmlDocCopyNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDocCopyNodeList
+extern __typeof (xmlDocCopyNodeList) xmlDocCopyNodeList __attribute((alias("xmlDocCopyNodeList__internal_alias")));
+#else
+#ifndef xmlDocCopyNodeList
+extern __typeof (xmlDocCopyNodeList) xmlDocCopyNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlDocCopyNodeList xmlDocCopyNodeList__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocDump
+extern __typeof (xmlDocDump) xmlDocDump __attribute((alias("xmlDocDump__internal_alias")));
+#else
+#ifndef xmlDocDump
+extern __typeof (xmlDocDump) xmlDocDump__internal_alias __attribute((visibility("hidden")));
+#define xmlDocDump xmlDocDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocDumpFormatMemory
+extern __typeof (xmlDocDumpFormatMemory) xmlDocDumpFormatMemory __attribute((alias("xmlDocDumpFormatMemory__internal_alias")));
+#else
+#ifndef xmlDocDumpFormatMemory
+extern __typeof (xmlDocDumpFormatMemory) xmlDocDumpFormatMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlDocDumpFormatMemory xmlDocDumpFormatMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocDumpFormatMemoryEnc
+extern __typeof (xmlDocDumpFormatMemoryEnc) xmlDocDumpFormatMemoryEnc __attribute((alias("xmlDocDumpFormatMemoryEnc__internal_alias")));
+#else
+#ifndef xmlDocDumpFormatMemoryEnc
+extern __typeof (xmlDocDumpFormatMemoryEnc) xmlDocDumpFormatMemoryEnc__internal_alias __attribute((visibility("hidden")));
+#define xmlDocDumpFormatMemoryEnc xmlDocDumpFormatMemoryEnc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocDumpMemory
+extern __typeof (xmlDocDumpMemory) xmlDocDumpMemory __attribute((alias("xmlDocDumpMemory__internal_alias")));
+#else
+#ifndef xmlDocDumpMemory
+extern __typeof (xmlDocDumpMemory) xmlDocDumpMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlDocDumpMemory xmlDocDumpMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocDumpMemoryEnc
+extern __typeof (xmlDocDumpMemoryEnc) xmlDocDumpMemoryEnc __attribute((alias("xmlDocDumpMemoryEnc__internal_alias")));
+#else
+#ifndef xmlDocDumpMemoryEnc
+extern __typeof (xmlDocDumpMemoryEnc) xmlDocDumpMemoryEnc__internal_alias __attribute((visibility("hidden")));
+#define xmlDocDumpMemoryEnc xmlDocDumpMemoryEnc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlDocFormatDump
+extern __typeof (xmlDocFormatDump) xmlDocFormatDump __attribute((alias("xmlDocFormatDump__internal_alias")));
+#else
+#ifndef xmlDocFormatDump
+extern __typeof (xmlDocFormatDump) xmlDocFormatDump__internal_alias __attribute((visibility("hidden")));
+#define xmlDocFormatDump xmlDocFormatDump__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlDocGetRootElement
+extern __typeof (xmlDocGetRootElement) xmlDocGetRootElement __attribute((alias("xmlDocGetRootElement__internal_alias")));
+#else
+#ifndef xmlDocGetRootElement
+extern __typeof (xmlDocGetRootElement) xmlDocGetRootElement__internal_alias __attribute((visibility("hidden")));
+#define xmlDocGetRootElement xmlDocGetRootElement__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_tree
+#undef xmlDocSetRootElement
+extern __typeof (xmlDocSetRootElement) xmlDocSetRootElement __attribute((alias("xmlDocSetRootElement__internal_alias")));
+#else
+#ifndef xmlDocSetRootElement
+extern __typeof (xmlDocSetRootElement) xmlDocSetRootElement__internal_alias __attribute((visibility("hidden")));
+#define xmlDocSetRootElement xmlDocSetRootElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpAttributeDecl
+extern __typeof (xmlDumpAttributeDecl) xmlDumpAttributeDecl __attribute((alias("xmlDumpAttributeDecl__internal_alias")));
+#else
+#ifndef xmlDumpAttributeDecl
+extern __typeof (xmlDumpAttributeDecl) xmlDumpAttributeDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpAttributeDecl xmlDumpAttributeDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpAttributeTable
+extern __typeof (xmlDumpAttributeTable) xmlDumpAttributeTable __attribute((alias("xmlDumpAttributeTable__internal_alias")));
+#else
+#ifndef xmlDumpAttributeTable
+extern __typeof (xmlDumpAttributeTable) xmlDumpAttributeTable__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpAttributeTable xmlDumpAttributeTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpElementDecl
+extern __typeof (xmlDumpElementDecl) xmlDumpElementDecl __attribute((alias("xmlDumpElementDecl__internal_alias")));
+#else
+#ifndef xmlDumpElementDecl
+extern __typeof (xmlDumpElementDecl) xmlDumpElementDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpElementDecl xmlDumpElementDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpElementTable
+extern __typeof (xmlDumpElementTable) xmlDumpElementTable __attribute((alias("xmlDumpElementTable__internal_alias")));
+#else
+#ifndef xmlDumpElementTable
+extern __typeof (xmlDumpElementTable) xmlDumpElementTable__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpElementTable xmlDumpElementTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_entities
+#undef xmlDumpEntitiesTable
+extern __typeof (xmlDumpEntitiesTable) xmlDumpEntitiesTable __attribute((alias("xmlDumpEntitiesTable__internal_alias")));
+#else
+#ifndef xmlDumpEntitiesTable
+extern __typeof (xmlDumpEntitiesTable) xmlDumpEntitiesTable__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpEntitiesTable xmlDumpEntitiesTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_entities
+#undef xmlDumpEntityDecl
+extern __typeof (xmlDumpEntityDecl) xmlDumpEntityDecl __attribute((alias("xmlDumpEntityDecl__internal_alias")));
+#else
+#ifndef xmlDumpEntityDecl
+extern __typeof (xmlDumpEntityDecl) xmlDumpEntityDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpEntityDecl xmlDumpEntityDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpNotationDecl
+extern __typeof (xmlDumpNotationDecl) xmlDumpNotationDecl __attribute((alias("xmlDumpNotationDecl__internal_alias")));
+#else
+#ifndef xmlDumpNotationDecl
+extern __typeof (xmlDumpNotationDecl) xmlDumpNotationDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpNotationDecl xmlDumpNotationDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlDumpNotationTable
+extern __typeof (xmlDumpNotationTable) xmlDumpNotationTable __attribute((alias("xmlDumpNotationTable__internal_alias")));
+#else
+#ifndef xmlDumpNotationTable
+extern __typeof (xmlDumpNotationTable) xmlDumpNotationTable__internal_alias __attribute((visibility("hidden")));
+#define xmlDumpNotationTable xmlDumpNotationTable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlElemDump
+extern __typeof (xmlElemDump) xmlElemDump __attribute((alias("xmlElemDump__internal_alias")));
+#else
+#ifndef xmlElemDump
+extern __typeof (xmlElemDump) xmlElemDump__internal_alias __attribute((visibility("hidden")));
+#define xmlElemDump xmlElemDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlEncodeEntities
+extern __typeof (xmlEncodeEntities) xmlEncodeEntities __attribute((alias("xmlEncodeEntities__internal_alias")));
+#else
+#ifndef xmlEncodeEntities
+extern __typeof (xmlEncodeEntities) xmlEncodeEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlEncodeEntities xmlEncodeEntities__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlEncodeEntitiesReentrant
+extern __typeof (xmlEncodeEntitiesReentrant) xmlEncodeEntitiesReentrant __attribute((alias("xmlEncodeEntitiesReentrant__internal_alias")));
+#else
+#ifndef xmlEncodeEntitiesReentrant
+extern __typeof (xmlEncodeEntitiesReentrant) xmlEncodeEntitiesReentrant__internal_alias __attribute((visibility("hidden")));
+#define xmlEncodeEntitiesReentrant xmlEncodeEntitiesReentrant__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlEncodeSpecialChars
+extern __typeof (xmlEncodeSpecialChars) xmlEncodeSpecialChars __attribute((alias("xmlEncodeSpecialChars__internal_alias")));
+#else
+#ifndef xmlEncodeSpecialChars
+extern __typeof (xmlEncodeSpecialChars) xmlEncodeSpecialChars__internal_alias __attribute((visibility("hidden")));
+#define xmlEncodeSpecialChars xmlEncodeSpecialChars__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlErrMemory
+extern __typeof (xmlErrMemory) xmlErrMemory __attribute((alias("xmlErrMemory__internal_alias")));
+#else
+#ifndef xmlErrMemory
+extern __typeof (xmlErrMemory) xmlErrMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlErrMemory xmlErrMemory__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpCtxtNbCons
+extern __typeof (xmlExpCtxtNbCons) xmlExpCtxtNbCons __attribute((alias("xmlExpCtxtNbCons__internal_alias")));
+#else
+#ifndef xmlExpCtxtNbCons
+extern __typeof (xmlExpCtxtNbCons) xmlExpCtxtNbCons__internal_alias __attribute((visibility("hidden")));
+#define xmlExpCtxtNbCons xmlExpCtxtNbCons__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpCtxtNbNodes
+extern __typeof (xmlExpCtxtNbNodes) xmlExpCtxtNbNodes __attribute((alias("xmlExpCtxtNbNodes__internal_alias")));
+#else
+#ifndef xmlExpCtxtNbNodes
+extern __typeof (xmlExpCtxtNbNodes) xmlExpCtxtNbNodes__internal_alias __attribute((visibility("hidden")));
+#define xmlExpCtxtNbNodes xmlExpCtxtNbNodes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpDump
+extern __typeof (xmlExpDump) xmlExpDump __attribute((alias("xmlExpDump__internal_alias")));
+#else
+#ifndef xmlExpDump
+extern __typeof (xmlExpDump) xmlExpDump__internal_alias __attribute((visibility("hidden")));
+#define xmlExpDump xmlExpDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpExpDerive
+extern __typeof (xmlExpExpDerive) xmlExpExpDerive __attribute((alias("xmlExpExpDerive__internal_alias")));
+#else
+#ifndef xmlExpExpDerive
+extern __typeof (xmlExpExpDerive) xmlExpExpDerive__internal_alias __attribute((visibility("hidden")));
+#define xmlExpExpDerive xmlExpExpDerive__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpFree
+extern __typeof (xmlExpFree) xmlExpFree __attribute((alias("xmlExpFree__internal_alias")));
+#else
+#ifndef xmlExpFree
+extern __typeof (xmlExpFree) xmlExpFree__internal_alias __attribute((visibility("hidden")));
+#define xmlExpFree xmlExpFree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpFreeCtxt
+extern __typeof (xmlExpFreeCtxt) xmlExpFreeCtxt __attribute((alias("xmlExpFreeCtxt__internal_alias")));
+#else
+#ifndef xmlExpFreeCtxt
+extern __typeof (xmlExpFreeCtxt) xmlExpFreeCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlExpFreeCtxt xmlExpFreeCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpGetLanguage
+extern __typeof (xmlExpGetLanguage) xmlExpGetLanguage __attribute((alias("xmlExpGetLanguage__internal_alias")));
+#else
+#ifndef xmlExpGetLanguage
+extern __typeof (xmlExpGetLanguage) xmlExpGetLanguage__internal_alias __attribute((visibility("hidden")));
+#define xmlExpGetLanguage xmlExpGetLanguage__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpGetStart
+extern __typeof (xmlExpGetStart) xmlExpGetStart __attribute((alias("xmlExpGetStart__internal_alias")));
+#else
+#ifndef xmlExpGetStart
+extern __typeof (xmlExpGetStart) xmlExpGetStart__internal_alias __attribute((visibility("hidden")));
+#define xmlExpGetStart xmlExpGetStart__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpIsNillable
+extern __typeof (xmlExpIsNillable) xmlExpIsNillable __attribute((alias("xmlExpIsNillable__internal_alias")));
+#else
+#ifndef xmlExpIsNillable
+extern __typeof (xmlExpIsNillable) xmlExpIsNillable__internal_alias __attribute((visibility("hidden")));
+#define xmlExpIsNillable xmlExpIsNillable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpMaxToken
+extern __typeof (xmlExpMaxToken) xmlExpMaxToken __attribute((alias("xmlExpMaxToken__internal_alias")));
+#else
+#ifndef xmlExpMaxToken
+extern __typeof (xmlExpMaxToken) xmlExpMaxToken__internal_alias __attribute((visibility("hidden")));
+#define xmlExpMaxToken xmlExpMaxToken__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpNewAtom
+extern __typeof (xmlExpNewAtom) xmlExpNewAtom __attribute((alias("xmlExpNewAtom__internal_alias")));
+#else
+#ifndef xmlExpNewAtom
+extern __typeof (xmlExpNewAtom) xmlExpNewAtom__internal_alias __attribute((visibility("hidden")));
+#define xmlExpNewAtom xmlExpNewAtom__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpNewCtxt
+extern __typeof (xmlExpNewCtxt) xmlExpNewCtxt __attribute((alias("xmlExpNewCtxt__internal_alias")));
+#else
+#ifndef xmlExpNewCtxt
+extern __typeof (xmlExpNewCtxt) xmlExpNewCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlExpNewCtxt xmlExpNewCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpNewOr
+extern __typeof (xmlExpNewOr) xmlExpNewOr __attribute((alias("xmlExpNewOr__internal_alias")));
+#else
+#ifndef xmlExpNewOr
+extern __typeof (xmlExpNewOr) xmlExpNewOr__internal_alias __attribute((visibility("hidden")));
+#define xmlExpNewOr xmlExpNewOr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpNewRange
+extern __typeof (xmlExpNewRange) xmlExpNewRange __attribute((alias("xmlExpNewRange__internal_alias")));
+#else
+#ifndef xmlExpNewRange
+extern __typeof (xmlExpNewRange) xmlExpNewRange__internal_alias __attribute((visibility("hidden")));
+#define xmlExpNewRange xmlExpNewRange__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpNewSeq
+extern __typeof (xmlExpNewSeq) xmlExpNewSeq __attribute((alias("xmlExpNewSeq__internal_alias")));
+#else
+#ifndef xmlExpNewSeq
+extern __typeof (xmlExpNewSeq) xmlExpNewSeq__internal_alias __attribute((visibility("hidden")));
+#define xmlExpNewSeq xmlExpNewSeq__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpParse
+extern __typeof (xmlExpParse) xmlExpParse __attribute((alias("xmlExpParse__internal_alias")));
+#else
+#ifndef xmlExpParse
+extern __typeof (xmlExpParse) xmlExpParse__internal_alias __attribute((visibility("hidden")));
+#define xmlExpParse xmlExpParse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpRef
+extern __typeof (xmlExpRef) xmlExpRef __attribute((alias("xmlExpRef__internal_alias")));
+#else
+#ifndef xmlExpRef
+extern __typeof (xmlExpRef) xmlExpRef__internal_alias __attribute((visibility("hidden")));
+#define xmlExpRef xmlExpRef__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpStringDerive
+extern __typeof (xmlExpStringDerive) xmlExpStringDerive __attribute((alias("xmlExpStringDerive__internal_alias")));
+#else
+#ifndef xmlExpStringDerive
+extern __typeof (xmlExpStringDerive) xmlExpStringDerive__internal_alias __attribute((visibility("hidden")));
+#define xmlExpStringDerive xmlExpStringDerive__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlExpSubsume
+extern __typeof (xmlExpSubsume) xmlExpSubsume __attribute((alias("xmlExpSubsume__internal_alias")));
+#else
+#ifndef xmlExpSubsume
+extern __typeof (xmlExpSubsume) xmlExpSubsume__internal_alias __attribute((visibility("hidden")));
+#define xmlExpSubsume xmlExpSubsume__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlFileClose
+extern __typeof (xmlFileClose) xmlFileClose __attribute((alias("xmlFileClose__internal_alias")));
+#else
+#ifndef xmlFileClose
+extern __typeof (xmlFileClose) xmlFileClose__internal_alias __attribute((visibility("hidden")));
+#define xmlFileClose xmlFileClose__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlFileMatch
+extern __typeof (xmlFileMatch) xmlFileMatch __attribute((alias("xmlFileMatch__internal_alias")));
+#else
+#ifndef xmlFileMatch
+extern __typeof (xmlFileMatch) xmlFileMatch__internal_alias __attribute((visibility("hidden")));
+#define xmlFileMatch xmlFileMatch__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlFileOpen
+extern __typeof (xmlFileOpen) xmlFileOpen __attribute((alias("xmlFileOpen__internal_alias")));
+#else
+#ifndef xmlFileOpen
+extern __typeof (xmlFileOpen) xmlFileOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlFileOpen xmlFileOpen__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlFileRead
+extern __typeof (xmlFileRead) xmlFileRead __attribute((alias("xmlFileRead__internal_alias")));
+#else
+#ifndef xmlFileRead
+extern __typeof (xmlFileRead) xmlFileRead__internal_alias __attribute((visibility("hidden")));
+#define xmlFileRead xmlFileRead__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlFindCharEncodingHandler
+extern __typeof (xmlFindCharEncodingHandler) xmlFindCharEncodingHandler __attribute((alias("xmlFindCharEncodingHandler__internal_alias")));
+#else
+#ifndef xmlFindCharEncodingHandler
+extern __typeof (xmlFindCharEncodingHandler) xmlFindCharEncodingHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlFindCharEncodingHandler xmlFindCharEncodingHandler__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlFirstElementChild
+extern __typeof (xmlFirstElementChild) xmlFirstElementChild __attribute((alias("xmlFirstElementChild__internal_alias")));
+#else
+#ifndef xmlFirstElementChild
+extern __typeof (xmlFirstElementChild) xmlFirstElementChild__internal_alias __attribute((visibility("hidden")));
+#define xmlFirstElementChild xmlFirstElementChild__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeAttributeTable
+extern __typeof (xmlFreeAttributeTable) xmlFreeAttributeTable __attribute((alias("xmlFreeAttributeTable__internal_alias")));
+#else
+#ifndef xmlFreeAttributeTable
+extern __typeof (xmlFreeAttributeTable) xmlFreeAttributeTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeAttributeTable xmlFreeAttributeTable__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlFreeAutomata
+extern __typeof (xmlFreeAutomata) xmlFreeAutomata __attribute((alias("xmlFreeAutomata__internal_alias")));
+#else
+#ifndef xmlFreeAutomata
+extern __typeof (xmlFreeAutomata) xmlFreeAutomata__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeAutomata xmlFreeAutomata__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlFreeCatalog
+extern __typeof (xmlFreeCatalog) xmlFreeCatalog __attribute((alias("xmlFreeCatalog__internal_alias")));
+#else
+#ifndef xmlFreeCatalog
+extern __typeof (xmlFreeCatalog) xmlFreeCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeCatalog xmlFreeCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeDoc
+extern __typeof (xmlFreeDoc) xmlFreeDoc __attribute((alias("xmlFreeDoc__internal_alias")));
+#else
+#ifndef xmlFreeDoc
+extern __typeof (xmlFreeDoc) xmlFreeDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeDoc xmlFreeDoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeDocElementContent
+extern __typeof (xmlFreeDocElementContent) xmlFreeDocElementContent __attribute((alias("xmlFreeDocElementContent__internal_alias")));
+#else
+#ifndef xmlFreeDocElementContent
+extern __typeof (xmlFreeDocElementContent) xmlFreeDocElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeDocElementContent xmlFreeDocElementContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeDtd
+extern __typeof (xmlFreeDtd) xmlFreeDtd __attribute((alias("xmlFreeDtd__internal_alias")));
+#else
+#ifndef xmlFreeDtd
+extern __typeof (xmlFreeDtd) xmlFreeDtd__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeDtd xmlFreeDtd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeElementContent
+extern __typeof (xmlFreeElementContent) xmlFreeElementContent __attribute((alias("xmlFreeElementContent__internal_alias")));
+#else
+#ifndef xmlFreeElementContent
+extern __typeof (xmlFreeElementContent) xmlFreeElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeElementContent xmlFreeElementContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeElementTable
+extern __typeof (xmlFreeElementTable) xmlFreeElementTable __attribute((alias("xmlFreeElementTable__internal_alias")));
+#else
+#ifndef xmlFreeElementTable
+extern __typeof (xmlFreeElementTable) xmlFreeElementTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeElementTable xmlFreeElementTable__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlFreeEntitiesTable
+extern __typeof (xmlFreeEntitiesTable) xmlFreeEntitiesTable __attribute((alias("xmlFreeEntitiesTable__internal_alias")));
+#else
+#ifndef xmlFreeEntitiesTable
+extern __typeof (xmlFreeEntitiesTable) xmlFreeEntitiesTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeEntitiesTable xmlFreeEntitiesTable__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeEnumeration
+extern __typeof (xmlFreeEnumeration) xmlFreeEnumeration __attribute((alias("xmlFreeEnumeration__internal_alias")));
+#else
+#ifndef xmlFreeEnumeration
+extern __typeof (xmlFreeEnumeration) xmlFreeEnumeration__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeEnumeration xmlFreeEnumeration__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeIDTable
+extern __typeof (xmlFreeIDTable) xmlFreeIDTable __attribute((alias("xmlFreeIDTable__internal_alias")));
+#else
+#ifndef xmlFreeIDTable
+extern __typeof (xmlFreeIDTable) xmlFreeIDTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeIDTable xmlFreeIDTable__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlFreeInputStream
+extern __typeof (xmlFreeInputStream) xmlFreeInputStream __attribute((alias("xmlFreeInputStream__internal_alias")));
+#else
+#ifndef xmlFreeInputStream
+extern __typeof (xmlFreeInputStream) xmlFreeInputStream__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeInputStream xmlFreeInputStream__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlFreeMutex
+extern __typeof (xmlFreeMutex) xmlFreeMutex __attribute((alias("xmlFreeMutex__internal_alias")));
+#else
+#ifndef xmlFreeMutex
+extern __typeof (xmlFreeMutex) xmlFreeMutex__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeMutex xmlFreeMutex__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeNode
+extern __typeof (xmlFreeNode) xmlFreeNode __attribute((alias("xmlFreeNode__internal_alias")));
+#else
+#ifndef xmlFreeNode
+extern __typeof (xmlFreeNode) xmlFreeNode__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeNode xmlFreeNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeNodeList
+extern __typeof (xmlFreeNodeList) xmlFreeNodeList __attribute((alias("xmlFreeNodeList__internal_alias")));
+#else
+#ifndef xmlFreeNodeList
+extern __typeof (xmlFreeNodeList) xmlFreeNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeNodeList xmlFreeNodeList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeNotationTable
+extern __typeof (xmlFreeNotationTable) xmlFreeNotationTable __attribute((alias("xmlFreeNotationTable__internal_alias")));
+#else
+#ifndef xmlFreeNotationTable
+extern __typeof (xmlFreeNotationTable) xmlFreeNotationTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeNotationTable xmlFreeNotationTable__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeNs
+extern __typeof (xmlFreeNs) xmlFreeNs __attribute((alias("xmlFreeNs__internal_alias")));
+#else
+#ifndef xmlFreeNs
+extern __typeof (xmlFreeNs) xmlFreeNs__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeNs xmlFreeNs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeNsList
+extern __typeof (xmlFreeNsList) xmlFreeNsList __attribute((alias("xmlFreeNsList__internal_alias")));
+#else
+#ifndef xmlFreeNsList
+extern __typeof (xmlFreeNsList) xmlFreeNsList__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeNsList xmlFreeNsList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlFreeParserCtxt
+extern __typeof (xmlFreeParserCtxt) xmlFreeParserCtxt __attribute((alias("xmlFreeParserCtxt__internal_alias")));
+#else
+#ifndef xmlFreeParserCtxt
+extern __typeof (xmlFreeParserCtxt) xmlFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeParserCtxt xmlFreeParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlFreeParserInputBuffer
+extern __typeof (xmlFreeParserInputBuffer) xmlFreeParserInputBuffer __attribute((alias("xmlFreeParserInputBuffer__internal_alias")));
+#else
+#ifndef xmlFreeParserInputBuffer
+extern __typeof (xmlFreeParserInputBuffer) xmlFreeParserInputBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeParserInputBuffer xmlFreeParserInputBuffer__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlFreePattern
+extern __typeof (xmlFreePattern) xmlFreePattern __attribute((alias("xmlFreePattern__internal_alias")));
+#else
+#ifndef xmlFreePattern
+extern __typeof (xmlFreePattern) xmlFreePattern__internal_alias __attribute((visibility("hidden")));
+#define xmlFreePattern xmlFreePattern__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlFreePatternList
+extern __typeof (xmlFreePatternList) xmlFreePatternList __attribute((alias("xmlFreePatternList__internal_alias")));
+#else
+#ifndef xmlFreePatternList
+extern __typeof (xmlFreePatternList) xmlFreePatternList__internal_alias __attribute((visibility("hidden")));
+#define xmlFreePatternList xmlFreePatternList__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreeProp
+extern __typeof (xmlFreeProp) xmlFreeProp __attribute((alias("xmlFreeProp__internal_alias")));
+#else
+#ifndef xmlFreeProp
+extern __typeof (xmlFreeProp) xmlFreeProp__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeProp xmlFreeProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlFreePropList
+extern __typeof (xmlFreePropList) xmlFreePropList __attribute((alias("xmlFreePropList__internal_alias")));
+#else
+#ifndef xmlFreePropList
+extern __typeof (xmlFreePropList) xmlFreePropList__internal_alias __attribute((visibility("hidden")));
+#define xmlFreePropList xmlFreePropList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlFreeRMutex
+extern __typeof (xmlFreeRMutex) xmlFreeRMutex __attribute((alias("xmlFreeRMutex__internal_alias")));
+#else
+#ifndef xmlFreeRMutex
+extern __typeof (xmlFreeRMutex) xmlFreeRMutex__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeRMutex xmlFreeRMutex__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlFreeRefTable
+extern __typeof (xmlFreeRefTable) xmlFreeRefTable __attribute((alias("xmlFreeRefTable__internal_alias")));
+#else
+#ifndef xmlFreeRefTable
+extern __typeof (xmlFreeRefTable) xmlFreeRefTable__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeRefTable xmlFreeRefTable__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlFreeStreamCtxt
+extern __typeof (xmlFreeStreamCtxt) xmlFreeStreamCtxt __attribute((alias("xmlFreeStreamCtxt__internal_alias")));
+#else
+#ifndef xmlFreeStreamCtxt
+extern __typeof (xmlFreeStreamCtxt) xmlFreeStreamCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeStreamCtxt xmlFreeStreamCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlFreeTextReader
+extern __typeof (xmlFreeTextReader) xmlFreeTextReader __attribute((alias("xmlFreeTextReader__internal_alias")));
+#else
+#ifndef xmlFreeTextReader
+extern __typeof (xmlFreeTextReader) xmlFreeTextReader__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeTextReader xmlFreeTextReader__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlFreeTextWriter
+extern __typeof (xmlFreeTextWriter) xmlFreeTextWriter __attribute((alias("xmlFreeTextWriter__internal_alias")));
+#else
+#ifndef xmlFreeTextWriter
+extern __typeof (xmlFreeTextWriter) xmlFreeTextWriter__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeTextWriter xmlFreeTextWriter__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlFreeURI
+extern __typeof (xmlFreeURI) xmlFreeURI __attribute((alias("xmlFreeURI__internal_alias")));
+#else
+#ifndef xmlFreeURI
+extern __typeof (xmlFreeURI) xmlFreeURI__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeURI xmlFreeURI__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlFreeValidCtxt
+extern __typeof (xmlFreeValidCtxt) xmlFreeValidCtxt __attribute((alias("xmlFreeValidCtxt__internal_alias")));
+#else
+#ifndef xmlFreeValidCtxt
+extern __typeof (xmlFreeValidCtxt) xmlFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlFreeValidCtxt xmlFreeValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlGcMemGet
+extern __typeof (xmlGcMemGet) xmlGcMemGet __attribute((alias("xmlGcMemGet__internal_alias")));
+#else
+#ifndef xmlGcMemGet
+extern __typeof (xmlGcMemGet) xmlGcMemGet__internal_alias __attribute((visibility("hidden")));
+#define xmlGcMemGet xmlGcMemGet__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlGcMemSetup
+extern __typeof (xmlGcMemSetup) xmlGcMemSetup __attribute((alias("xmlGcMemSetup__internal_alias")));
+#else
+#ifndef xmlGcMemSetup
+extern __typeof (xmlGcMemSetup) xmlGcMemSetup__internal_alias __attribute((visibility("hidden")));
+#define xmlGcMemSetup xmlGcMemSetup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetBufferAllocationScheme
+extern __typeof (xmlGetBufferAllocationScheme) xmlGetBufferAllocationScheme __attribute((alias("xmlGetBufferAllocationScheme__internal_alias")));
+#else
+#ifndef xmlGetBufferAllocationScheme
+extern __typeof (xmlGetBufferAllocationScheme) xmlGetBufferAllocationScheme__internal_alias __attribute((visibility("hidden")));
+#define xmlGetBufferAllocationScheme xmlGetBufferAllocationScheme__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlGetCharEncodingHandler
+extern __typeof (xmlGetCharEncodingHandler) xmlGetCharEncodingHandler __attribute((alias("xmlGetCharEncodingHandler__internal_alias")));
+#else
+#ifndef xmlGetCharEncodingHandler
+extern __typeof (xmlGetCharEncodingHandler) xmlGetCharEncodingHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlGetCharEncodingHandler xmlGetCharEncodingHandler__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlGetCharEncodingName
+extern __typeof (xmlGetCharEncodingName) xmlGetCharEncodingName __attribute((alias("xmlGetCharEncodingName__internal_alias")));
+#else
+#ifndef xmlGetCharEncodingName
+extern __typeof (xmlGetCharEncodingName) xmlGetCharEncodingName__internal_alias __attribute((visibility("hidden")));
+#define xmlGetCharEncodingName xmlGetCharEncodingName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetCompressMode
+extern __typeof (xmlGetCompressMode) xmlGetCompressMode __attribute((alias("xmlGetCompressMode__internal_alias")));
+#else
+#ifndef xmlGetCompressMode
+extern __typeof (xmlGetCompressMode) xmlGetCompressMode__internal_alias __attribute((visibility("hidden")));
+#define xmlGetCompressMode xmlGetCompressMode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetDocCompressMode
+extern __typeof (xmlGetDocCompressMode) xmlGetDocCompressMode __attribute((alias("xmlGetDocCompressMode__internal_alias")));
+#else
+#ifndef xmlGetDocCompressMode
+extern __typeof (xmlGetDocCompressMode) xmlGetDocCompressMode__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDocCompressMode xmlGetDocCompressMode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlGetDocEntity
+extern __typeof (xmlGetDocEntity) xmlGetDocEntity __attribute((alias("xmlGetDocEntity__internal_alias")));
+#else
+#ifndef xmlGetDocEntity
+extern __typeof (xmlGetDocEntity) xmlGetDocEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDocEntity xmlGetDocEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetDtdAttrDesc
+extern __typeof (xmlGetDtdAttrDesc) xmlGetDtdAttrDesc __attribute((alias("xmlGetDtdAttrDesc__internal_alias")));
+#else
+#ifndef xmlGetDtdAttrDesc
+extern __typeof (xmlGetDtdAttrDesc) xmlGetDtdAttrDesc__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdAttrDesc xmlGetDtdAttrDesc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetDtdElementDesc
+extern __typeof (xmlGetDtdElementDesc) xmlGetDtdElementDesc __attribute((alias("xmlGetDtdElementDesc__internal_alias")));
+#else
+#ifndef xmlGetDtdElementDesc
+extern __typeof (xmlGetDtdElementDesc) xmlGetDtdElementDesc__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdElementDesc xmlGetDtdElementDesc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlGetDtdEntity
+extern __typeof (xmlGetDtdEntity) xmlGetDtdEntity __attribute((alias("xmlGetDtdEntity__internal_alias")));
+#else
+#ifndef xmlGetDtdEntity
+extern __typeof (xmlGetDtdEntity) xmlGetDtdEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdEntity xmlGetDtdEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetDtdNotationDesc
+extern __typeof (xmlGetDtdNotationDesc) xmlGetDtdNotationDesc __attribute((alias("xmlGetDtdNotationDesc__internal_alias")));
+#else
+#ifndef xmlGetDtdNotationDesc
+extern __typeof (xmlGetDtdNotationDesc) xmlGetDtdNotationDesc__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdNotationDesc xmlGetDtdNotationDesc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetDtdQAttrDesc
+extern __typeof (xmlGetDtdQAttrDesc) xmlGetDtdQAttrDesc __attribute((alias("xmlGetDtdQAttrDesc__internal_alias")));
+#else
+#ifndef xmlGetDtdQAttrDesc
+extern __typeof (xmlGetDtdQAttrDesc) xmlGetDtdQAttrDesc__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdQAttrDesc xmlGetDtdQAttrDesc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetDtdQElementDesc
+extern __typeof (xmlGetDtdQElementDesc) xmlGetDtdQElementDesc __attribute((alias("xmlGetDtdQElementDesc__internal_alias")));
+#else
+#ifndef xmlGetDtdQElementDesc
+extern __typeof (xmlGetDtdQElementDesc) xmlGetDtdQElementDesc__internal_alias __attribute((visibility("hidden")));
+#define xmlGetDtdQElementDesc xmlGetDtdQElementDesc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlGetEncodingAlias
+extern __typeof (xmlGetEncodingAlias) xmlGetEncodingAlias __attribute((alias("xmlGetEncodingAlias__internal_alias")));
+#else
+#ifndef xmlGetEncodingAlias
+extern __typeof (xmlGetEncodingAlias) xmlGetEncodingAlias__internal_alias __attribute((visibility("hidden")));
+#define xmlGetEncodingAlias xmlGetEncodingAlias__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlGetExternalEntityLoader
+extern __typeof (xmlGetExternalEntityLoader) xmlGetExternalEntityLoader __attribute((alias("xmlGetExternalEntityLoader__internal_alias")));
+#else
+#ifndef xmlGetExternalEntityLoader
+extern __typeof (xmlGetExternalEntityLoader) xmlGetExternalEntityLoader__internal_alias __attribute((visibility("hidden")));
+#define xmlGetExternalEntityLoader xmlGetExternalEntityLoader__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlGetFeature
+extern __typeof (xmlGetFeature) xmlGetFeature __attribute((alias("xmlGetFeature__internal_alias")));
+#else
+#ifndef xmlGetFeature
+extern __typeof (xmlGetFeature) xmlGetFeature__internal_alias __attribute((visibility("hidden")));
+#define xmlGetFeature xmlGetFeature__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlGetFeaturesList
+extern __typeof (xmlGetFeaturesList) xmlGetFeaturesList __attribute((alias("xmlGetFeaturesList__internal_alias")));
+#else
+#ifndef xmlGetFeaturesList
+extern __typeof (xmlGetFeaturesList) xmlGetFeaturesList__internal_alias __attribute((visibility("hidden")));
+#define xmlGetFeaturesList xmlGetFeaturesList__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlGetGlobalState
+extern __typeof (xmlGetGlobalState) xmlGetGlobalState __attribute((alias("xmlGetGlobalState__internal_alias")));
+#else
+#ifndef xmlGetGlobalState
+extern __typeof (xmlGetGlobalState) xmlGetGlobalState__internal_alias __attribute((visibility("hidden")));
+#define xmlGetGlobalState xmlGetGlobalState__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetID
+extern __typeof (xmlGetID) xmlGetID __attribute((alias("xmlGetID__internal_alias")));
+#else
+#ifndef xmlGetID
+extern __typeof (xmlGetID) xmlGetID__internal_alias __attribute((visibility("hidden")));
+#define xmlGetID xmlGetID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetIntSubset
+extern __typeof (xmlGetIntSubset) xmlGetIntSubset __attribute((alias("xmlGetIntSubset__internal_alias")));
+#else
+#ifndef xmlGetIntSubset
+extern __typeof (xmlGetIntSubset) xmlGetIntSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlGetIntSubset xmlGetIntSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetLastChild
+extern __typeof (xmlGetLastChild) xmlGetLastChild __attribute((alias("xmlGetLastChild__internal_alias")));
+#else
+#ifndef xmlGetLastChild
+extern __typeof (xmlGetLastChild) xmlGetLastChild__internal_alias __attribute((visibility("hidden")));
+#define xmlGetLastChild xmlGetLastChild__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlGetLastError
+extern __typeof (xmlGetLastError) xmlGetLastError __attribute((alias("xmlGetLastError__internal_alias")));
+#else
+#ifndef xmlGetLastError
+extern __typeof (xmlGetLastError) xmlGetLastError__internal_alias __attribute((visibility("hidden")));
+#define xmlGetLastError xmlGetLastError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetLineNo
+extern __typeof (xmlGetLineNo) xmlGetLineNo __attribute((alias("xmlGetLineNo__internal_alias")));
+#else
+#ifndef xmlGetLineNo
+extern __typeof (xmlGetLineNo) xmlGetLineNo__internal_alias __attribute((visibility("hidden")));
+#define xmlGetLineNo xmlGetLineNo__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetNoNsProp
+extern __typeof (xmlGetNoNsProp) xmlGetNoNsProp __attribute((alias("xmlGetNoNsProp__internal_alias")));
+#else
+#ifndef xmlGetNoNsProp
+extern __typeof (xmlGetNoNsProp) xmlGetNoNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlGetNoNsProp xmlGetNoNsProp__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_tree
+#undef xmlGetNodePath
+extern __typeof (xmlGetNodePath) xmlGetNodePath __attribute((alias("xmlGetNodePath__internal_alias")));
+#else
+#ifndef xmlGetNodePath
+extern __typeof (xmlGetNodePath) xmlGetNodePath__internal_alias __attribute((visibility("hidden")));
+#define xmlGetNodePath xmlGetNodePath__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlGetNsList
+extern __typeof (xmlGetNsList) xmlGetNsList __attribute((alias("xmlGetNsList__internal_alias")));
+#else
+#ifndef xmlGetNsList
+extern __typeof (xmlGetNsList) xmlGetNsList__internal_alias __attribute((visibility("hidden")));
+#define xmlGetNsList xmlGetNsList__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetNsProp
+extern __typeof (xmlGetNsProp) xmlGetNsProp __attribute((alias("xmlGetNsProp__internal_alias")));
+#else
+#ifndef xmlGetNsProp
+extern __typeof (xmlGetNsProp) xmlGetNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlGetNsProp xmlGetNsProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlGetParameterEntity
+extern __typeof (xmlGetParameterEntity) xmlGetParameterEntity __attribute((alias("xmlGetParameterEntity__internal_alias")));
+#else
+#ifndef xmlGetParameterEntity
+extern __typeof (xmlGetParameterEntity) xmlGetParameterEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlGetParameterEntity xmlGetParameterEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlGetPredefinedEntity
+extern __typeof (xmlGetPredefinedEntity) xmlGetPredefinedEntity __attribute((alias("xmlGetPredefinedEntity__internal_alias")));
+#else
+#ifndef xmlGetPredefinedEntity
+extern __typeof (xmlGetPredefinedEntity) xmlGetPredefinedEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlGetPredefinedEntity xmlGetPredefinedEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlGetProp
+extern __typeof (xmlGetProp) xmlGetProp __attribute((alias("xmlGetProp__internal_alias")));
+#else
+#ifndef xmlGetProp
+extern __typeof (xmlGetProp) xmlGetProp__internal_alias __attribute((visibility("hidden")));
+#define xmlGetProp xmlGetProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlGetRefs
+extern __typeof (xmlGetRefs) xmlGetRefs __attribute((alias("xmlGetRefs__internal_alias")));
+#else
+#ifndef xmlGetRefs
+extern __typeof (xmlGetRefs) xmlGetRefs__internal_alias __attribute((visibility("hidden")));
+#define xmlGetRefs xmlGetRefs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlGetThreadId
+extern __typeof (xmlGetThreadId) xmlGetThreadId __attribute((alias("xmlGetThreadId__internal_alias")));
+#else
+#ifndef xmlGetThreadId
+extern __typeof (xmlGetThreadId) xmlGetThreadId__internal_alias __attribute((visibility("hidden")));
+#define xmlGetThreadId xmlGetThreadId__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlGetUTF8Char
+extern __typeof (xmlGetUTF8Char) xmlGetUTF8Char __attribute((alias("xmlGetUTF8Char__internal_alias")));
+#else
+#ifndef xmlGetUTF8Char
+extern __typeof (xmlGetUTF8Char) xmlGetUTF8Char__internal_alias __attribute((visibility("hidden")));
+#define xmlGetUTF8Char xmlGetUTF8Char__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlHandleEntity
+extern __typeof (xmlHandleEntity) xmlHandleEntity __attribute((alias("xmlHandleEntity__internal_alias")));
+#else
+#ifndef xmlHandleEntity
+extern __typeof (xmlHandleEntity) xmlHandleEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlHandleEntity xmlHandleEntity__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlHasFeature
+extern __typeof (xmlHasFeature) xmlHasFeature __attribute((alias("xmlHasFeature__internal_alias")));
+#else
+#ifndef xmlHasFeature
+extern __typeof (xmlHasFeature) xmlHasFeature__internal_alias __attribute((visibility("hidden")));
+#define xmlHasFeature xmlHasFeature__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlHasNsProp
+extern __typeof (xmlHasNsProp) xmlHasNsProp __attribute((alias("xmlHasNsProp__internal_alias")));
+#else
+#ifndef xmlHasNsProp
+extern __typeof (xmlHasNsProp) xmlHasNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlHasNsProp xmlHasNsProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlHasProp
+extern __typeof (xmlHasProp) xmlHasProp __attribute((alias("xmlHasProp__internal_alias")));
+#else
+#ifndef xmlHasProp
+extern __typeof (xmlHasProp) xmlHasProp__internal_alias __attribute((visibility("hidden")));
+#define xmlHasProp xmlHasProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashAddEntry
+extern __typeof (xmlHashAddEntry) xmlHashAddEntry __attribute((alias("xmlHashAddEntry__internal_alias")));
+#else
+#ifndef xmlHashAddEntry
+extern __typeof (xmlHashAddEntry) xmlHashAddEntry__internal_alias __attribute((visibility("hidden")));
+#define xmlHashAddEntry xmlHashAddEntry__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashAddEntry2
+extern __typeof (xmlHashAddEntry2) xmlHashAddEntry2 __attribute((alias("xmlHashAddEntry2__internal_alias")));
+#else
+#ifndef xmlHashAddEntry2
+extern __typeof (xmlHashAddEntry2) xmlHashAddEntry2__internal_alias __attribute((visibility("hidden")));
+#define xmlHashAddEntry2 xmlHashAddEntry2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashAddEntry3
+extern __typeof (xmlHashAddEntry3) xmlHashAddEntry3 __attribute((alias("xmlHashAddEntry3__internal_alias")));
+#else
+#ifndef xmlHashAddEntry3
+extern __typeof (xmlHashAddEntry3) xmlHashAddEntry3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashAddEntry3 xmlHashAddEntry3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashCopy
+extern __typeof (xmlHashCopy) xmlHashCopy __attribute((alias("xmlHashCopy__internal_alias")));
+#else
+#ifndef xmlHashCopy
+extern __typeof (xmlHashCopy) xmlHashCopy__internal_alias __attribute((visibility("hidden")));
+#define xmlHashCopy xmlHashCopy__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashCreate
+extern __typeof (xmlHashCreate) xmlHashCreate __attribute((alias("xmlHashCreate__internal_alias")));
+#else
+#ifndef xmlHashCreate
+extern __typeof (xmlHashCreate) xmlHashCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlHashCreate xmlHashCreate__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashCreateDict
+extern __typeof (xmlHashCreateDict) xmlHashCreateDict __attribute((alias("xmlHashCreateDict__internal_alias")));
+#else
+#ifndef xmlHashCreateDict
+extern __typeof (xmlHashCreateDict) xmlHashCreateDict__internal_alias __attribute((visibility("hidden")));
+#define xmlHashCreateDict xmlHashCreateDict__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashFree
+extern __typeof (xmlHashFree) xmlHashFree __attribute((alias("xmlHashFree__internal_alias")));
+#else
+#ifndef xmlHashFree
+extern __typeof (xmlHashFree) xmlHashFree__internal_alias __attribute((visibility("hidden")));
+#define xmlHashFree xmlHashFree__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashLookup
+extern __typeof (xmlHashLookup) xmlHashLookup __attribute((alias("xmlHashLookup__internal_alias")));
+#else
+#ifndef xmlHashLookup
+extern __typeof (xmlHashLookup) xmlHashLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlHashLookup xmlHashLookup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashLookup2
+extern __typeof (xmlHashLookup2) xmlHashLookup2 __attribute((alias("xmlHashLookup2__internal_alias")));
+#else
+#ifndef xmlHashLookup2
+extern __typeof (xmlHashLookup2) xmlHashLookup2__internal_alias __attribute((visibility("hidden")));
+#define xmlHashLookup2 xmlHashLookup2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashLookup3
+extern __typeof (xmlHashLookup3) xmlHashLookup3 __attribute((alias("xmlHashLookup3__internal_alias")));
+#else
+#ifndef xmlHashLookup3
+extern __typeof (xmlHashLookup3) xmlHashLookup3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashLookup3 xmlHashLookup3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashQLookup
+extern __typeof (xmlHashQLookup) xmlHashQLookup __attribute((alias("xmlHashQLookup__internal_alias")));
+#else
+#ifndef xmlHashQLookup
+extern __typeof (xmlHashQLookup) xmlHashQLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlHashQLookup xmlHashQLookup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashQLookup2
+extern __typeof (xmlHashQLookup2) xmlHashQLookup2 __attribute((alias("xmlHashQLookup2__internal_alias")));
+#else
+#ifndef xmlHashQLookup2
+extern __typeof (xmlHashQLookup2) xmlHashQLookup2__internal_alias __attribute((visibility("hidden")));
+#define xmlHashQLookup2 xmlHashQLookup2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashQLookup3
+extern __typeof (xmlHashQLookup3) xmlHashQLookup3 __attribute((alias("xmlHashQLookup3__internal_alias")));
+#else
+#ifndef xmlHashQLookup3
+extern __typeof (xmlHashQLookup3) xmlHashQLookup3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashQLookup3 xmlHashQLookup3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashRemoveEntry
+extern __typeof (xmlHashRemoveEntry) xmlHashRemoveEntry __attribute((alias("xmlHashRemoveEntry__internal_alias")));
+#else
+#ifndef xmlHashRemoveEntry
+extern __typeof (xmlHashRemoveEntry) xmlHashRemoveEntry__internal_alias __attribute((visibility("hidden")));
+#define xmlHashRemoveEntry xmlHashRemoveEntry__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashRemoveEntry2
+extern __typeof (xmlHashRemoveEntry2) xmlHashRemoveEntry2 __attribute((alias("xmlHashRemoveEntry2__internal_alias")));
+#else
+#ifndef xmlHashRemoveEntry2
+extern __typeof (xmlHashRemoveEntry2) xmlHashRemoveEntry2__internal_alias __attribute((visibility("hidden")));
+#define xmlHashRemoveEntry2 xmlHashRemoveEntry2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashRemoveEntry3
+extern __typeof (xmlHashRemoveEntry3) xmlHashRemoveEntry3 __attribute((alias("xmlHashRemoveEntry3__internal_alias")));
+#else
+#ifndef xmlHashRemoveEntry3
+extern __typeof (xmlHashRemoveEntry3) xmlHashRemoveEntry3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashRemoveEntry3 xmlHashRemoveEntry3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashScan
+extern __typeof (xmlHashScan) xmlHashScan __attribute((alias("xmlHashScan__internal_alias")));
+#else
+#ifndef xmlHashScan
+extern __typeof (xmlHashScan) xmlHashScan__internal_alias __attribute((visibility("hidden")));
+#define xmlHashScan xmlHashScan__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashScan3
+extern __typeof (xmlHashScan3) xmlHashScan3 __attribute((alias("xmlHashScan3__internal_alias")));
+#else
+#ifndef xmlHashScan3
+extern __typeof (xmlHashScan3) xmlHashScan3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashScan3 xmlHashScan3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashScanFull
+extern __typeof (xmlHashScanFull) xmlHashScanFull __attribute((alias("xmlHashScanFull__internal_alias")));
+#else
+#ifndef xmlHashScanFull
+extern __typeof (xmlHashScanFull) xmlHashScanFull__internal_alias __attribute((visibility("hidden")));
+#define xmlHashScanFull xmlHashScanFull__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashScanFull3
+extern __typeof (xmlHashScanFull3) xmlHashScanFull3 __attribute((alias("xmlHashScanFull3__internal_alias")));
+#else
+#ifndef xmlHashScanFull3
+extern __typeof (xmlHashScanFull3) xmlHashScanFull3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashScanFull3 xmlHashScanFull3__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashSize
+extern __typeof (xmlHashSize) xmlHashSize __attribute((alias("xmlHashSize__internal_alias")));
+#else
+#ifndef xmlHashSize
+extern __typeof (xmlHashSize) xmlHashSize__internal_alias __attribute((visibility("hidden")));
+#define xmlHashSize xmlHashSize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashUpdateEntry
+extern __typeof (xmlHashUpdateEntry) xmlHashUpdateEntry __attribute((alias("xmlHashUpdateEntry__internal_alias")));
+#else
+#ifndef xmlHashUpdateEntry
+extern __typeof (xmlHashUpdateEntry) xmlHashUpdateEntry__internal_alias __attribute((visibility("hidden")));
+#define xmlHashUpdateEntry xmlHashUpdateEntry__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashUpdateEntry2
+extern __typeof (xmlHashUpdateEntry2) xmlHashUpdateEntry2 __attribute((alias("xmlHashUpdateEntry2__internal_alias")));
+#else
+#ifndef xmlHashUpdateEntry2
+extern __typeof (xmlHashUpdateEntry2) xmlHashUpdateEntry2__internal_alias __attribute((visibility("hidden")));
+#define xmlHashUpdateEntry2 xmlHashUpdateEntry2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_hash
+#undef xmlHashUpdateEntry3
+extern __typeof (xmlHashUpdateEntry3) xmlHashUpdateEntry3 __attribute((alias("xmlHashUpdateEntry3__internal_alias")));
+#else
+#ifndef xmlHashUpdateEntry3
+extern __typeof (xmlHashUpdateEntry3) xmlHashUpdateEntry3__internal_alias __attribute((visibility("hidden")));
+#define xmlHashUpdateEntry3 xmlHashUpdateEntry3__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOFTPClose
+extern __typeof (xmlIOFTPClose) xmlIOFTPClose __attribute((alias("xmlIOFTPClose__internal_alias")));
+#else
+#ifndef xmlIOFTPClose
+extern __typeof (xmlIOFTPClose) xmlIOFTPClose__internal_alias __attribute((visibility("hidden")));
+#define xmlIOFTPClose xmlIOFTPClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOFTPMatch
+extern __typeof (xmlIOFTPMatch) xmlIOFTPMatch __attribute((alias("xmlIOFTPMatch__internal_alias")));
+#else
+#ifndef xmlIOFTPMatch
+extern __typeof (xmlIOFTPMatch) xmlIOFTPMatch__internal_alias __attribute((visibility("hidden")));
+#define xmlIOFTPMatch xmlIOFTPMatch__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOFTPOpen
+extern __typeof (xmlIOFTPOpen) xmlIOFTPOpen __attribute((alias("xmlIOFTPOpen__internal_alias")));
+#else
+#ifndef xmlIOFTPOpen
+extern __typeof (xmlIOFTPOpen) xmlIOFTPOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlIOFTPOpen xmlIOFTPOpen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOFTPRead
+extern __typeof (xmlIOFTPRead) xmlIOFTPRead __attribute((alias("xmlIOFTPRead__internal_alias")));
+#else
+#ifndef xmlIOFTPRead
+extern __typeof (xmlIOFTPRead) xmlIOFTPRead__internal_alias __attribute((visibility("hidden")));
+#define xmlIOFTPRead xmlIOFTPRead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOHTTPClose
+extern __typeof (xmlIOHTTPClose) xmlIOHTTPClose __attribute((alias("xmlIOHTTPClose__internal_alias")));
+#else
+#ifndef xmlIOHTTPClose
+extern __typeof (xmlIOHTTPClose) xmlIOHTTPClose__internal_alias __attribute((visibility("hidden")));
+#define xmlIOHTTPClose xmlIOHTTPClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOHTTPMatch
+extern __typeof (xmlIOHTTPMatch) xmlIOHTTPMatch __attribute((alias("xmlIOHTTPMatch__internal_alias")));
+#else
+#ifndef xmlIOHTTPMatch
+extern __typeof (xmlIOHTTPMatch) xmlIOHTTPMatch__internal_alias __attribute((visibility("hidden")));
+#define xmlIOHTTPMatch xmlIOHTTPMatch__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOHTTPOpen
+extern __typeof (xmlIOHTTPOpen) xmlIOHTTPOpen __attribute((alias("xmlIOHTTPOpen__internal_alias")));
+#else
+#ifndef xmlIOHTTPOpen
+extern __typeof (xmlIOHTTPOpen) xmlIOHTTPOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlIOHTTPOpen xmlIOHTTPOpen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOHTTPOpenW
+extern __typeof (xmlIOHTTPOpenW) xmlIOHTTPOpenW __attribute((alias("xmlIOHTTPOpenW__internal_alias")));
+#else
+#ifndef xmlIOHTTPOpenW
+extern __typeof (xmlIOHTTPOpenW) xmlIOHTTPOpenW__internal_alias __attribute((visibility("hidden")));
+#define xmlIOHTTPOpenW xmlIOHTTPOpenW__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlIOHTTPRead
+extern __typeof (xmlIOHTTPRead) xmlIOHTTPRead __attribute((alias("xmlIOHTTPRead__internal_alias")));
+#else
+#ifndef xmlIOHTTPRead
+extern __typeof (xmlIOHTTPRead) xmlIOHTTPRead__internal_alias __attribute((visibility("hidden")));
+#define xmlIOHTTPRead xmlIOHTTPRead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_parser
+#undef xmlIOParseDTD
+extern __typeof (xmlIOParseDTD) xmlIOParseDTD __attribute((alias("xmlIOParseDTD__internal_alias")));
+#else
+#ifndef xmlIOParseDTD
+extern __typeof (xmlIOParseDTD) xmlIOParseDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlIOParseDTD xmlIOParseDTD__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlInitCharEncodingHandlers
+extern __typeof (xmlInitCharEncodingHandlers) xmlInitCharEncodingHandlers __attribute((alias("xmlInitCharEncodingHandlers__internal_alias")));
+#else
+#ifndef xmlInitCharEncodingHandlers
+extern __typeof (xmlInitCharEncodingHandlers) xmlInitCharEncodingHandlers__internal_alias __attribute((visibility("hidden")));
+#define xmlInitCharEncodingHandlers xmlInitCharEncodingHandlers__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlInitGlobals
+extern __typeof (xmlInitGlobals) xmlInitGlobals __attribute((alias("xmlInitGlobals__internal_alias")));
+#else
+#ifndef xmlInitGlobals
+extern __typeof (xmlInitGlobals) xmlInitGlobals__internal_alias __attribute((visibility("hidden")));
+#define xmlInitGlobals xmlInitGlobals__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlInitMemory
+extern __typeof (xmlInitMemory) xmlInitMemory __attribute((alias("xmlInitMemory__internal_alias")));
+#else
+#ifndef xmlInitMemory
+extern __typeof (xmlInitMemory) xmlInitMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlInitMemory xmlInitMemory__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlInitNodeInfoSeq
+extern __typeof (xmlInitNodeInfoSeq) xmlInitNodeInfoSeq __attribute((alias("xmlInitNodeInfoSeq__internal_alias")));
+#else
+#ifndef xmlInitNodeInfoSeq
+extern __typeof (xmlInitNodeInfoSeq) xmlInitNodeInfoSeq__internal_alias __attribute((visibility("hidden")));
+#define xmlInitNodeInfoSeq xmlInitNodeInfoSeq__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlInitParser
+extern __typeof (xmlInitParser) xmlInitParser __attribute((alias("xmlInitParser__internal_alias")));
+#else
+#ifndef xmlInitParser
+extern __typeof (xmlInitParser) xmlInitParser__internal_alias __attribute((visibility("hidden")));
+#define xmlInitParser xmlInitParser__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlInitParserCtxt
+extern __typeof (xmlInitParserCtxt) xmlInitParserCtxt __attribute((alias("xmlInitParserCtxt__internal_alias")));
+#else
+#ifndef xmlInitParserCtxt
+extern __typeof (xmlInitParserCtxt) xmlInitParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlInitParserCtxt xmlInitParserCtxt__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlInitThreads
+extern __typeof (xmlInitThreads) xmlInitThreads __attribute((alias("xmlInitThreads__internal_alias")));
+#else
+#ifndef xmlInitThreads
+extern __typeof (xmlInitThreads) xmlInitThreads__internal_alias __attribute((visibility("hidden")));
+#define xmlInitThreads xmlInitThreads__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlInitializeCatalog
+extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog __attribute((alias("xmlInitializeCatalog__internal_alias")));
+#else
+#ifndef xmlInitializeCatalog
+extern __typeof (xmlInitializeCatalog) xmlInitializeCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlInitializeCatalog xmlInitializeCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_dict
+#undef xmlInitializeDict
+extern __typeof (xmlInitializeDict) xmlInitializeDict __attribute((alias("xmlInitializeDict__internal_alias")));
+#else
+#ifndef xmlInitializeDict
+extern __typeof (xmlInitializeDict) xmlInitializeDict__internal_alias __attribute((visibility("hidden")));
+#define xmlInitializeDict xmlInitializeDict__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlInitializeGlobalState
+extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState __attribute((alias("xmlInitializeGlobalState__internal_alias")));
+#else
+#ifndef xmlInitializeGlobalState
+extern __typeof (xmlInitializeGlobalState) xmlInitializeGlobalState__internal_alias __attribute((visibility("hidden")));
+#define xmlInitializeGlobalState xmlInitializeGlobalState__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlInitializePredefinedEntities
+extern __typeof (xmlInitializePredefinedEntities) xmlInitializePredefinedEntities __attribute((alias("xmlInitializePredefinedEntities__internal_alias")));
+#else
+#ifndef xmlInitializePredefinedEntities
+extern __typeof (xmlInitializePredefinedEntities) xmlInitializePredefinedEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlInitializePredefinedEntities xmlInitializePredefinedEntities__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsBaseChar
+extern __typeof (xmlIsBaseChar) xmlIsBaseChar __attribute((alias("xmlIsBaseChar__internal_alias")));
+#else
+#ifndef xmlIsBaseChar
+extern __typeof (xmlIsBaseChar) xmlIsBaseChar__internal_alias __attribute((visibility("hidden")));
+#define xmlIsBaseChar xmlIsBaseChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsBlank
+extern __typeof (xmlIsBlank) xmlIsBlank __attribute((alias("xmlIsBlank__internal_alias")));
+#else
+#ifndef xmlIsBlank
+extern __typeof (xmlIsBlank) xmlIsBlank__internal_alias __attribute((visibility("hidden")));
+#define xmlIsBlank xmlIsBlank__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlIsBlankNode
+extern __typeof (xmlIsBlankNode) xmlIsBlankNode __attribute((alias("xmlIsBlankNode__internal_alias")));
+#else
+#ifndef xmlIsBlankNode
+extern __typeof (xmlIsBlankNode) xmlIsBlankNode__internal_alias __attribute((visibility("hidden")));
+#define xmlIsBlankNode xmlIsBlankNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsChar
+extern __typeof (xmlIsChar) xmlIsChar __attribute((alias("xmlIsChar__internal_alias")));
+#else
+#ifndef xmlIsChar
+extern __typeof (xmlIsChar) xmlIsChar__internal_alias __attribute((visibility("hidden")));
+#define xmlIsChar xmlIsChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsCombining
+extern __typeof (xmlIsCombining) xmlIsCombining __attribute((alias("xmlIsCombining__internal_alias")));
+#else
+#ifndef xmlIsCombining
+extern __typeof (xmlIsCombining) xmlIsCombining__internal_alias __attribute((visibility("hidden")));
+#define xmlIsCombining xmlIsCombining__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsDigit
+extern __typeof (xmlIsDigit) xmlIsDigit __attribute((alias("xmlIsDigit__internal_alias")));
+#else
+#ifndef xmlIsDigit
+extern __typeof (xmlIsDigit) xmlIsDigit__internal_alias __attribute((visibility("hidden")));
+#define xmlIsDigit xmlIsDigit__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsExtender
+extern __typeof (xmlIsExtender) xmlIsExtender __attribute((alias("xmlIsExtender__internal_alias")));
+#else
+#ifndef xmlIsExtender
+extern __typeof (xmlIsExtender) xmlIsExtender__internal_alias __attribute((visibility("hidden")));
+#define xmlIsExtender xmlIsExtender__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlIsID
+extern __typeof (xmlIsID) xmlIsID __attribute((alias("xmlIsID__internal_alias")));
+#else
+#ifndef xmlIsID
+extern __typeof (xmlIsID) xmlIsID__internal_alias __attribute((visibility("hidden")));
+#define xmlIsID xmlIsID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsIdeographic
+extern __typeof (xmlIsIdeographic) xmlIsIdeographic __attribute((alias("xmlIsIdeographic__internal_alias")));
+#else
+#ifndef xmlIsIdeographic
+extern __typeof (xmlIsIdeographic) xmlIsIdeographic__internal_alias __attribute((visibility("hidden")));
+#define xmlIsIdeographic xmlIsIdeographic__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlIsLetter
+extern __typeof (xmlIsLetter) xmlIsLetter __attribute((alias("xmlIsLetter__internal_alias")));
+#else
+#ifndef xmlIsLetter
+extern __typeof (xmlIsLetter) xmlIsLetter__internal_alias __attribute((visibility("hidden")));
+#define xmlIsLetter xmlIsLetter__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlIsMainThread
+extern __typeof (xmlIsMainThread) xmlIsMainThread __attribute((alias("xmlIsMainThread__internal_alias")));
+#else
+#ifndef xmlIsMainThread
+extern __typeof (xmlIsMainThread) xmlIsMainThread__internal_alias __attribute((visibility("hidden")));
+#define xmlIsMainThread xmlIsMainThread__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlIsMixedElement
+extern __typeof (xmlIsMixedElement) xmlIsMixedElement __attribute((alias("xmlIsMixedElement__internal_alias")));
+#else
+#ifndef xmlIsMixedElement
+extern __typeof (xmlIsMixedElement) xmlIsMixedElement__internal_alias __attribute((visibility("hidden")));
+#define xmlIsMixedElement xmlIsMixedElement__internal_alias
+#endif
+#endif
+
+#ifdef bottom_chvalid
+#undef xmlIsPubidChar
+extern __typeof (xmlIsPubidChar) xmlIsPubidChar __attribute((alias("xmlIsPubidChar__internal_alias")));
+#else
+#ifndef xmlIsPubidChar
+extern __typeof (xmlIsPubidChar) xmlIsPubidChar__internal_alias __attribute((visibility("hidden")));
+#define xmlIsPubidChar xmlIsPubidChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlIsRef
+extern __typeof (xmlIsRef) xmlIsRef __attribute((alias("xmlIsRef__internal_alias")));
+#else
+#ifndef xmlIsRef
+extern __typeof (xmlIsRef) xmlIsRef__internal_alias __attribute((visibility("hidden")));
+#define xmlIsRef xmlIsRef__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlsave
+#undef xmlIsXHTML
+extern __typeof (xmlIsXHTML) xmlIsXHTML __attribute((alias("xmlIsXHTML__internal_alias")));
+#else
+#ifndef xmlIsXHTML
+extern __typeof (xmlIsXHTML) xmlIsXHTML__internal_alias __attribute((visibility("hidden")));
+#define xmlIsXHTML xmlIsXHTML__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlKeepBlanksDefault
+extern __typeof (xmlKeepBlanksDefault) xmlKeepBlanksDefault __attribute((alias("xmlKeepBlanksDefault__internal_alias")));
+#else
+#ifndef xmlKeepBlanksDefault
+extern __typeof (xmlKeepBlanksDefault) xmlKeepBlanksDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlKeepBlanksDefault xmlKeepBlanksDefault__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlLastElementChild
+extern __typeof (xmlLastElementChild) xmlLastElementChild __attribute((alias("xmlLastElementChild__internal_alias")));
+#else
+#ifndef xmlLastElementChild
+extern __typeof (xmlLastElementChild) xmlLastElementChild__internal_alias __attribute((visibility("hidden")));
+#define xmlLastElementChild xmlLastElementChild__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlLineNumbersDefault
+extern __typeof (xmlLineNumbersDefault) xmlLineNumbersDefault __attribute((alias("xmlLineNumbersDefault__internal_alias")));
+#else
+#ifndef xmlLineNumbersDefault
+extern __typeof (xmlLineNumbersDefault) xmlLineNumbersDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlLineNumbersDefault xmlLineNumbersDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlLinkGetData
+extern __typeof (xmlLinkGetData) xmlLinkGetData __attribute((alias("xmlLinkGetData__internal_alias")));
+#else
+#ifndef xmlLinkGetData
+extern __typeof (xmlLinkGetData) xmlLinkGetData__internal_alias __attribute((visibility("hidden")));
+#define xmlLinkGetData xmlLinkGetData__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListAppend
+extern __typeof (xmlListAppend) xmlListAppend __attribute((alias("xmlListAppend__internal_alias")));
+#else
+#ifndef xmlListAppend
+extern __typeof (xmlListAppend) xmlListAppend__internal_alias __attribute((visibility("hidden")));
+#define xmlListAppend xmlListAppend__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListClear
+extern __typeof (xmlListClear) xmlListClear __attribute((alias("xmlListClear__internal_alias")));
+#else
+#ifndef xmlListClear
+extern __typeof (xmlListClear) xmlListClear__internal_alias __attribute((visibility("hidden")));
+#define xmlListClear xmlListClear__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListCopy
+extern __typeof (xmlListCopy) xmlListCopy __attribute((alias("xmlListCopy__internal_alias")));
+#else
+#ifndef xmlListCopy
+extern __typeof (xmlListCopy) xmlListCopy__internal_alias __attribute((visibility("hidden")));
+#define xmlListCopy xmlListCopy__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListCreate
+extern __typeof (xmlListCreate) xmlListCreate __attribute((alias("xmlListCreate__internal_alias")));
+#else
+#ifndef xmlListCreate
+extern __typeof (xmlListCreate) xmlListCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlListCreate xmlListCreate__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListDelete
+extern __typeof (xmlListDelete) xmlListDelete __attribute((alias("xmlListDelete__internal_alias")));
+#else
+#ifndef xmlListDelete
+extern __typeof (xmlListDelete) xmlListDelete__internal_alias __attribute((visibility("hidden")));
+#define xmlListDelete xmlListDelete__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListDup
+extern __typeof (xmlListDup) xmlListDup __attribute((alias("xmlListDup__internal_alias")));
+#else
+#ifndef xmlListDup
+extern __typeof (xmlListDup) xmlListDup__internal_alias __attribute((visibility("hidden")));
+#define xmlListDup xmlListDup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListEmpty
+extern __typeof (xmlListEmpty) xmlListEmpty __attribute((alias("xmlListEmpty__internal_alias")));
+#else
+#ifndef xmlListEmpty
+extern __typeof (xmlListEmpty) xmlListEmpty__internal_alias __attribute((visibility("hidden")));
+#define xmlListEmpty xmlListEmpty__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListEnd
+extern __typeof (xmlListEnd) xmlListEnd __attribute((alias("xmlListEnd__internal_alias")));
+#else
+#ifndef xmlListEnd
+extern __typeof (xmlListEnd) xmlListEnd__internal_alias __attribute((visibility("hidden")));
+#define xmlListEnd xmlListEnd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListFront
+extern __typeof (xmlListFront) xmlListFront __attribute((alias("xmlListFront__internal_alias")));
+#else
+#ifndef xmlListFront
+extern __typeof (xmlListFront) xmlListFront__internal_alias __attribute((visibility("hidden")));
+#define xmlListFront xmlListFront__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListInsert
+extern __typeof (xmlListInsert) xmlListInsert __attribute((alias("xmlListInsert__internal_alias")));
+#else
+#ifndef xmlListInsert
+extern __typeof (xmlListInsert) xmlListInsert__internal_alias __attribute((visibility("hidden")));
+#define xmlListInsert xmlListInsert__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListMerge
+extern __typeof (xmlListMerge) xmlListMerge __attribute((alias("xmlListMerge__internal_alias")));
+#else
+#ifndef xmlListMerge
+extern __typeof (xmlListMerge) xmlListMerge__internal_alias __attribute((visibility("hidden")));
+#define xmlListMerge xmlListMerge__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListPopBack
+extern __typeof (xmlListPopBack) xmlListPopBack __attribute((alias("xmlListPopBack__internal_alias")));
+#else
+#ifndef xmlListPopBack
+extern __typeof (xmlListPopBack) xmlListPopBack__internal_alias __attribute((visibility("hidden")));
+#define xmlListPopBack xmlListPopBack__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListPopFront
+extern __typeof (xmlListPopFront) xmlListPopFront __attribute((alias("xmlListPopFront__internal_alias")));
+#else
+#ifndef xmlListPopFront
+extern __typeof (xmlListPopFront) xmlListPopFront__internal_alias __attribute((visibility("hidden")));
+#define xmlListPopFront xmlListPopFront__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListPushBack
+extern __typeof (xmlListPushBack) xmlListPushBack __attribute((alias("xmlListPushBack__internal_alias")));
+#else
+#ifndef xmlListPushBack
+extern __typeof (xmlListPushBack) xmlListPushBack__internal_alias __attribute((visibility("hidden")));
+#define xmlListPushBack xmlListPushBack__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListPushFront
+extern __typeof (xmlListPushFront) xmlListPushFront __attribute((alias("xmlListPushFront__internal_alias")));
+#else
+#ifndef xmlListPushFront
+extern __typeof (xmlListPushFront) xmlListPushFront__internal_alias __attribute((visibility("hidden")));
+#define xmlListPushFront xmlListPushFront__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListRemoveAll
+extern __typeof (xmlListRemoveAll) xmlListRemoveAll __attribute((alias("xmlListRemoveAll__internal_alias")));
+#else
+#ifndef xmlListRemoveAll
+extern __typeof (xmlListRemoveAll) xmlListRemoveAll__internal_alias __attribute((visibility("hidden")));
+#define xmlListRemoveAll xmlListRemoveAll__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListRemoveFirst
+extern __typeof (xmlListRemoveFirst) xmlListRemoveFirst __attribute((alias("xmlListRemoveFirst__internal_alias")));
+#else
+#ifndef xmlListRemoveFirst
+extern __typeof (xmlListRemoveFirst) xmlListRemoveFirst__internal_alias __attribute((visibility("hidden")));
+#define xmlListRemoveFirst xmlListRemoveFirst__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListRemoveLast
+extern __typeof (xmlListRemoveLast) xmlListRemoveLast __attribute((alias("xmlListRemoveLast__internal_alias")));
+#else
+#ifndef xmlListRemoveLast
+extern __typeof (xmlListRemoveLast) xmlListRemoveLast__internal_alias __attribute((visibility("hidden")));
+#define xmlListRemoveLast xmlListRemoveLast__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListReverse
+extern __typeof (xmlListReverse) xmlListReverse __attribute((alias("xmlListReverse__internal_alias")));
+#else
+#ifndef xmlListReverse
+extern __typeof (xmlListReverse) xmlListReverse__internal_alias __attribute((visibility("hidden")));
+#define xmlListReverse xmlListReverse__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListReverseSearch
+extern __typeof (xmlListReverseSearch) xmlListReverseSearch __attribute((alias("xmlListReverseSearch__internal_alias")));
+#else
+#ifndef xmlListReverseSearch
+extern __typeof (xmlListReverseSearch) xmlListReverseSearch__internal_alias __attribute((visibility("hidden")));
+#define xmlListReverseSearch xmlListReverseSearch__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListReverseWalk
+extern __typeof (xmlListReverseWalk) xmlListReverseWalk __attribute((alias("xmlListReverseWalk__internal_alias")));
+#else
+#ifndef xmlListReverseWalk
+extern __typeof (xmlListReverseWalk) xmlListReverseWalk__internal_alias __attribute((visibility("hidden")));
+#define xmlListReverseWalk xmlListReverseWalk__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListSearch
+extern __typeof (xmlListSearch) xmlListSearch __attribute((alias("xmlListSearch__internal_alias")));
+#else
+#ifndef xmlListSearch
+extern __typeof (xmlListSearch) xmlListSearch__internal_alias __attribute((visibility("hidden")));
+#define xmlListSearch xmlListSearch__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListSize
+extern __typeof (xmlListSize) xmlListSize __attribute((alias("xmlListSize__internal_alias")));
+#else
+#ifndef xmlListSize
+extern __typeof (xmlListSize) xmlListSize__internal_alias __attribute((visibility("hidden")));
+#define xmlListSize xmlListSize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListSort
+extern __typeof (xmlListSort) xmlListSort __attribute((alias("xmlListSort__internal_alias")));
+#else
+#ifndef xmlListSort
+extern __typeof (xmlListSort) xmlListSort__internal_alias __attribute((visibility("hidden")));
+#define xmlListSort xmlListSort__internal_alias
+#endif
+#endif
+
+#ifdef bottom_list
+#undef xmlListWalk
+extern __typeof (xmlListWalk) xmlListWalk __attribute((alias("xmlListWalk__internal_alias")));
+#else
+#ifndef xmlListWalk
+extern __typeof (xmlListWalk) xmlListWalk__internal_alias __attribute((visibility("hidden")));
+#define xmlListWalk xmlListWalk__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlLoadACatalog
+extern __typeof (xmlLoadACatalog) xmlLoadACatalog __attribute((alias("xmlLoadACatalog__internal_alias")));
+#else
+#ifndef xmlLoadACatalog
+extern __typeof (xmlLoadACatalog) xmlLoadACatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlLoadACatalog xmlLoadACatalog__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlLoadCatalog
+extern __typeof (xmlLoadCatalog) xmlLoadCatalog __attribute((alias("xmlLoadCatalog__internal_alias")));
+#else
+#ifndef xmlLoadCatalog
+extern __typeof (xmlLoadCatalog) xmlLoadCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlLoadCatalog xmlLoadCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlLoadCatalogs
+extern __typeof (xmlLoadCatalogs) xmlLoadCatalogs __attribute((alias("xmlLoadCatalogs__internal_alias")));
+#else
+#ifndef xmlLoadCatalogs
+extern __typeof (xmlLoadCatalogs) xmlLoadCatalogs__internal_alias __attribute((visibility("hidden")));
+#define xmlLoadCatalogs xmlLoadCatalogs__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlLoadExternalEntity
+extern __typeof (xmlLoadExternalEntity) xmlLoadExternalEntity __attribute((alias("xmlLoadExternalEntity__internal_alias")));
+#else
+#ifndef xmlLoadExternalEntity
+extern __typeof (xmlLoadExternalEntity) xmlLoadExternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlLoadExternalEntity xmlLoadExternalEntity__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlLoadSGMLSuperCatalog
+extern __typeof (xmlLoadSGMLSuperCatalog) xmlLoadSGMLSuperCatalog __attribute((alias("xmlLoadSGMLSuperCatalog__internal_alias")));
+#else
+#ifndef xmlLoadSGMLSuperCatalog
+extern __typeof (xmlLoadSGMLSuperCatalog) xmlLoadSGMLSuperCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlLoadSGMLSuperCatalog xmlLoadSGMLSuperCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlLockLibrary
+extern __typeof (xmlLockLibrary) xmlLockLibrary __attribute((alias("xmlLockLibrary__internal_alias")));
+#else
+#ifndef xmlLockLibrary
+extern __typeof (xmlLockLibrary) xmlLockLibrary__internal_alias __attribute((visibility("hidden")));
+#define xmlLockLibrary xmlLockLibrary__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlLsCountNode
+extern __typeof (xmlLsCountNode) xmlLsCountNode __attribute((alias("xmlLsCountNode__internal_alias")));
+#else
+#ifndef xmlLsCountNode
+extern __typeof (xmlLsCountNode) xmlLsCountNode__internal_alias __attribute((visibility("hidden")));
+#define xmlLsCountNode xmlLsCountNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlLsOneNode
+extern __typeof (xmlLsOneNode) xmlLsOneNode __attribute((alias("xmlLsOneNode__internal_alias")));
+#else
+#ifndef xmlLsOneNode
+extern __typeof (xmlLsOneNode) xmlLsOneNode__internal_alias __attribute((visibility("hidden")));
+#define xmlLsOneNode xmlLsOneNode__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMallocAtomicLoc
+extern __typeof (xmlMallocAtomicLoc) xmlMallocAtomicLoc __attribute((alias("xmlMallocAtomicLoc__internal_alias")));
+#else
+#ifndef xmlMallocAtomicLoc
+extern __typeof (xmlMallocAtomicLoc) xmlMallocAtomicLoc__internal_alias __attribute((visibility("hidden")));
+#define xmlMallocAtomicLoc xmlMallocAtomicLoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMallocLoc
+extern __typeof (xmlMallocLoc) xmlMallocLoc __attribute((alias("xmlMallocLoc__internal_alias")));
+#else
+#ifndef xmlMallocLoc
+extern __typeof (xmlMallocLoc) xmlMallocLoc__internal_alias __attribute((visibility("hidden")));
+#define xmlMallocLoc xmlMallocLoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemBlocks
+extern __typeof (xmlMemBlocks) xmlMemBlocks __attribute((alias("xmlMemBlocks__internal_alias")));
+#else
+#ifndef xmlMemBlocks
+extern __typeof (xmlMemBlocks) xmlMemBlocks__internal_alias __attribute((visibility("hidden")));
+#define xmlMemBlocks xmlMemBlocks__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemDisplay
+extern __typeof (xmlMemDisplay) xmlMemDisplay __attribute((alias("xmlMemDisplay__internal_alias")));
+#else
+#ifndef xmlMemDisplay
+extern __typeof (xmlMemDisplay) xmlMemDisplay__internal_alias __attribute((visibility("hidden")));
+#define xmlMemDisplay xmlMemDisplay__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemDisplayLast
+extern __typeof (xmlMemDisplayLast) xmlMemDisplayLast __attribute((alias("xmlMemDisplayLast__internal_alias")));
+#else
+#ifndef xmlMemDisplayLast
+extern __typeof (xmlMemDisplayLast) xmlMemDisplayLast__internal_alias __attribute((visibility("hidden")));
+#define xmlMemDisplayLast xmlMemDisplayLast__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemFree
+extern __typeof (xmlMemFree) xmlMemFree __attribute((alias("xmlMemFree__internal_alias")));
+#else
+#ifndef xmlMemFree
+extern __typeof (xmlMemFree) xmlMemFree__internal_alias __attribute((visibility("hidden")));
+#define xmlMemFree xmlMemFree__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemGet
+extern __typeof (xmlMemGet) xmlMemGet __attribute((alias("xmlMemGet__internal_alias")));
+#else
+#ifndef xmlMemGet
+extern __typeof (xmlMemGet) xmlMemGet__internal_alias __attribute((visibility("hidden")));
+#define xmlMemGet xmlMemGet__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemMalloc
+extern __typeof (xmlMemMalloc) xmlMemMalloc __attribute((alias("xmlMemMalloc__internal_alias")));
+#else
+#ifndef xmlMemMalloc
+extern __typeof (xmlMemMalloc) xmlMemMalloc__internal_alias __attribute((visibility("hidden")));
+#define xmlMemMalloc xmlMemMalloc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemRealloc
+extern __typeof (xmlMemRealloc) xmlMemRealloc __attribute((alias("xmlMemRealloc__internal_alias")));
+#else
+#ifndef xmlMemRealloc
+extern __typeof (xmlMemRealloc) xmlMemRealloc__internal_alias __attribute((visibility("hidden")));
+#define xmlMemRealloc xmlMemRealloc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemSetup
+extern __typeof (xmlMemSetup) xmlMemSetup __attribute((alias("xmlMemSetup__internal_alias")));
+#else
+#ifndef xmlMemSetup
+extern __typeof (xmlMemSetup) xmlMemSetup__internal_alias __attribute((visibility("hidden")));
+#define xmlMemSetup xmlMemSetup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemShow
+extern __typeof (xmlMemShow) xmlMemShow __attribute((alias("xmlMemShow__internal_alias")));
+#else
+#ifndef xmlMemShow
+extern __typeof (xmlMemShow) xmlMemShow__internal_alias __attribute((visibility("hidden")));
+#define xmlMemShow xmlMemShow__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemStrdupLoc
+extern __typeof (xmlMemStrdupLoc) xmlMemStrdupLoc __attribute((alias("xmlMemStrdupLoc__internal_alias")));
+#else
+#ifndef xmlMemStrdupLoc
+extern __typeof (xmlMemStrdupLoc) xmlMemStrdupLoc__internal_alias __attribute((visibility("hidden")));
+#define xmlMemStrdupLoc xmlMemStrdupLoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemUsed
+extern __typeof (xmlMemUsed) xmlMemUsed __attribute((alias("xmlMemUsed__internal_alias")));
+#else
+#ifndef xmlMemUsed
+extern __typeof (xmlMemUsed) xmlMemUsed__internal_alias __attribute((visibility("hidden")));
+#define xmlMemUsed xmlMemUsed__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemoryDump
+extern __typeof (xmlMemoryDump) xmlMemoryDump __attribute((alias("xmlMemoryDump__internal_alias")));
+#else
+#ifndef xmlMemoryDump
+extern __typeof (xmlMemoryDump) xmlMemoryDump__internal_alias __attribute((visibility("hidden")));
+#define xmlMemoryDump xmlMemoryDump__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlMemoryStrdup
+extern __typeof (xmlMemoryStrdup) xmlMemoryStrdup __attribute((alias("xmlMemoryStrdup__internal_alias")));
+#else
+#ifndef xmlMemoryStrdup
+extern __typeof (xmlMemoryStrdup) xmlMemoryStrdup__internal_alias __attribute((visibility("hidden")));
+#define xmlMemoryStrdup xmlMemoryStrdup__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_MODULES_ENABLED)
+#ifdef bottom_xmlmodule
+#undef xmlModuleClose
+extern __typeof (xmlModuleClose) xmlModuleClose __attribute((alias("xmlModuleClose__internal_alias")));
+#else
+#ifndef xmlModuleClose
+extern __typeof (xmlModuleClose) xmlModuleClose__internal_alias __attribute((visibility("hidden")));
+#define xmlModuleClose xmlModuleClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_MODULES_ENABLED)
+#ifdef bottom_xmlmodule
+#undef xmlModuleFree
+extern __typeof (xmlModuleFree) xmlModuleFree __attribute((alias("xmlModuleFree__internal_alias")));
+#else
+#ifndef xmlModuleFree
+extern __typeof (xmlModuleFree) xmlModuleFree__internal_alias __attribute((visibility("hidden")));
+#define xmlModuleFree xmlModuleFree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_MODULES_ENABLED)
+#ifdef bottom_xmlmodule
+#undef xmlModuleOpen
+extern __typeof (xmlModuleOpen) xmlModuleOpen __attribute((alias("xmlModuleOpen__internal_alias")));
+#else
+#ifndef xmlModuleOpen
+extern __typeof (xmlModuleOpen) xmlModuleOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlModuleOpen xmlModuleOpen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_MODULES_ENABLED)
+#ifdef bottom_xmlmodule
+#undef xmlModuleSymbol
+extern __typeof (xmlModuleSymbol) xmlModuleSymbol __attribute((alias("xmlModuleSymbol__internal_alias")));
+#else
+#ifndef xmlModuleSymbol
+extern __typeof (xmlModuleSymbol) xmlModuleSymbol__internal_alias __attribute((visibility("hidden")));
+#define xmlModuleSymbol xmlModuleSymbol__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlMutexLock
+extern __typeof (xmlMutexLock) xmlMutexLock __attribute((alias("xmlMutexLock__internal_alias")));
+#else
+#ifndef xmlMutexLock
+extern __typeof (xmlMutexLock) xmlMutexLock__internal_alias __attribute((visibility("hidden")));
+#define xmlMutexLock xmlMutexLock__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlMutexUnlock
+extern __typeof (xmlMutexUnlock) xmlMutexUnlock __attribute((alias("xmlMutexUnlock__internal_alias")));
+#else
+#ifndef xmlMutexUnlock
+extern __typeof (xmlMutexUnlock) xmlMutexUnlock__internal_alias __attribute((visibility("hidden")));
+#define xmlMutexUnlock xmlMutexUnlock__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlNamespaceParseNCName
+extern __typeof (xmlNamespaceParseNCName) xmlNamespaceParseNCName __attribute((alias("xmlNamespaceParseNCName__internal_alias")));
+#else
+#ifndef xmlNamespaceParseNCName
+extern __typeof (xmlNamespaceParseNCName) xmlNamespaceParseNCName__internal_alias __attribute((visibility("hidden")));
+#define xmlNamespaceParseNCName xmlNamespaceParseNCName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlNamespaceParseNSDef
+extern __typeof (xmlNamespaceParseNSDef) xmlNamespaceParseNSDef __attribute((alias("xmlNamespaceParseNSDef__internal_alias")));
+#else
+#ifndef xmlNamespaceParseNSDef
+extern __typeof (xmlNamespaceParseNSDef) xmlNamespaceParseNSDef__internal_alias __attribute((visibility("hidden")));
+#define xmlNamespaceParseNSDef xmlNamespaceParseNSDef__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlNamespaceParseQName
+extern __typeof (xmlNamespaceParseQName) xmlNamespaceParseQName __attribute((alias("xmlNamespaceParseQName__internal_alias")));
+#else
+#ifndef xmlNamespaceParseQName
+extern __typeof (xmlNamespaceParseQName) xmlNamespaceParseQName__internal_alias __attribute((visibility("hidden")));
+#define xmlNamespaceParseQName xmlNamespaceParseQName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPCheckResponse
+extern __typeof (xmlNanoFTPCheckResponse) xmlNanoFTPCheckResponse __attribute((alias("xmlNanoFTPCheckResponse__internal_alias")));
+#else
+#ifndef xmlNanoFTPCheckResponse
+extern __typeof (xmlNanoFTPCheckResponse) xmlNanoFTPCheckResponse__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPCheckResponse xmlNanoFTPCheckResponse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPCleanup
+extern __typeof (xmlNanoFTPCleanup) xmlNanoFTPCleanup __attribute((alias("xmlNanoFTPCleanup__internal_alias")));
+#else
+#ifndef xmlNanoFTPCleanup
+extern __typeof (xmlNanoFTPCleanup) xmlNanoFTPCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPCleanup xmlNanoFTPCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPClose
+extern __typeof (xmlNanoFTPClose) xmlNanoFTPClose __attribute((alias("xmlNanoFTPClose__internal_alias")));
+#else
+#ifndef xmlNanoFTPClose
+extern __typeof (xmlNanoFTPClose) xmlNanoFTPClose__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPClose xmlNanoFTPClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPCloseConnection
+extern __typeof (xmlNanoFTPCloseConnection) xmlNanoFTPCloseConnection __attribute((alias("xmlNanoFTPCloseConnection__internal_alias")));
+#else
+#ifndef xmlNanoFTPCloseConnection
+extern __typeof (xmlNanoFTPCloseConnection) xmlNanoFTPCloseConnection__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPCloseConnection xmlNanoFTPCloseConnection__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPConnect
+extern __typeof (xmlNanoFTPConnect) xmlNanoFTPConnect __attribute((alias("xmlNanoFTPConnect__internal_alias")));
+#else
+#ifndef xmlNanoFTPConnect
+extern __typeof (xmlNanoFTPConnect) xmlNanoFTPConnect__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPConnect xmlNanoFTPConnect__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPConnectTo
+extern __typeof (xmlNanoFTPConnectTo) xmlNanoFTPConnectTo __attribute((alias("xmlNanoFTPConnectTo__internal_alias")));
+#else
+#ifndef xmlNanoFTPConnectTo
+extern __typeof (xmlNanoFTPConnectTo) xmlNanoFTPConnectTo__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPConnectTo xmlNanoFTPConnectTo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPCwd
+extern __typeof (xmlNanoFTPCwd) xmlNanoFTPCwd __attribute((alias("xmlNanoFTPCwd__internal_alias")));
+#else
+#ifndef xmlNanoFTPCwd
+extern __typeof (xmlNanoFTPCwd) xmlNanoFTPCwd__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPCwd xmlNanoFTPCwd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPDele
+extern __typeof (xmlNanoFTPDele) xmlNanoFTPDele __attribute((alias("xmlNanoFTPDele__internal_alias")));
+#else
+#ifndef xmlNanoFTPDele
+extern __typeof (xmlNanoFTPDele) xmlNanoFTPDele__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPDele xmlNanoFTPDele__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPFreeCtxt
+extern __typeof (xmlNanoFTPFreeCtxt) xmlNanoFTPFreeCtxt __attribute((alias("xmlNanoFTPFreeCtxt__internal_alias")));
+#else
+#ifndef xmlNanoFTPFreeCtxt
+extern __typeof (xmlNanoFTPFreeCtxt) xmlNanoFTPFreeCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPFreeCtxt xmlNanoFTPFreeCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPGet
+extern __typeof (xmlNanoFTPGet) xmlNanoFTPGet __attribute((alias("xmlNanoFTPGet__internal_alias")));
+#else
+#ifndef xmlNanoFTPGet
+extern __typeof (xmlNanoFTPGet) xmlNanoFTPGet__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPGet xmlNanoFTPGet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPGetConnection
+extern __typeof (xmlNanoFTPGetConnection) xmlNanoFTPGetConnection __attribute((alias("xmlNanoFTPGetConnection__internal_alias")));
+#else
+#ifndef xmlNanoFTPGetConnection
+extern __typeof (xmlNanoFTPGetConnection) xmlNanoFTPGetConnection__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPGetConnection xmlNanoFTPGetConnection__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPGetResponse
+extern __typeof (xmlNanoFTPGetResponse) xmlNanoFTPGetResponse __attribute((alias("xmlNanoFTPGetResponse__internal_alias")));
+#else
+#ifndef xmlNanoFTPGetResponse
+extern __typeof (xmlNanoFTPGetResponse) xmlNanoFTPGetResponse__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPGetResponse xmlNanoFTPGetResponse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPGetSocket
+extern __typeof (xmlNanoFTPGetSocket) xmlNanoFTPGetSocket __attribute((alias("xmlNanoFTPGetSocket__internal_alias")));
+#else
+#ifndef xmlNanoFTPGetSocket
+extern __typeof (xmlNanoFTPGetSocket) xmlNanoFTPGetSocket__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPGetSocket xmlNanoFTPGetSocket__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPInit
+extern __typeof (xmlNanoFTPInit) xmlNanoFTPInit __attribute((alias("xmlNanoFTPInit__internal_alias")));
+#else
+#ifndef xmlNanoFTPInit
+extern __typeof (xmlNanoFTPInit) xmlNanoFTPInit__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPInit xmlNanoFTPInit__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPList
+extern __typeof (xmlNanoFTPList) xmlNanoFTPList __attribute((alias("xmlNanoFTPList__internal_alias")));
+#else
+#ifndef xmlNanoFTPList
+extern __typeof (xmlNanoFTPList) xmlNanoFTPList__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPList xmlNanoFTPList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPNewCtxt
+extern __typeof (xmlNanoFTPNewCtxt) xmlNanoFTPNewCtxt __attribute((alias("xmlNanoFTPNewCtxt__internal_alias")));
+#else
+#ifndef xmlNanoFTPNewCtxt
+extern __typeof (xmlNanoFTPNewCtxt) xmlNanoFTPNewCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPNewCtxt xmlNanoFTPNewCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPOpen
+extern __typeof (xmlNanoFTPOpen) xmlNanoFTPOpen __attribute((alias("xmlNanoFTPOpen__internal_alias")));
+#else
+#ifndef xmlNanoFTPOpen
+extern __typeof (xmlNanoFTPOpen) xmlNanoFTPOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPOpen xmlNanoFTPOpen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPProxy
+extern __typeof (xmlNanoFTPProxy) xmlNanoFTPProxy __attribute((alias("xmlNanoFTPProxy__internal_alias")));
+#else
+#ifndef xmlNanoFTPProxy
+extern __typeof (xmlNanoFTPProxy) xmlNanoFTPProxy__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPProxy xmlNanoFTPProxy__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPQuit
+extern __typeof (xmlNanoFTPQuit) xmlNanoFTPQuit __attribute((alias("xmlNanoFTPQuit__internal_alias")));
+#else
+#ifndef xmlNanoFTPQuit
+extern __typeof (xmlNanoFTPQuit) xmlNanoFTPQuit__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPQuit xmlNanoFTPQuit__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPRead
+extern __typeof (xmlNanoFTPRead) xmlNanoFTPRead __attribute((alias("xmlNanoFTPRead__internal_alias")));
+#else
+#ifndef xmlNanoFTPRead
+extern __typeof (xmlNanoFTPRead) xmlNanoFTPRead__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPRead xmlNanoFTPRead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPScanProxy
+extern __typeof (xmlNanoFTPScanProxy) xmlNanoFTPScanProxy __attribute((alias("xmlNanoFTPScanProxy__internal_alias")));
+#else
+#ifndef xmlNanoFTPScanProxy
+extern __typeof (xmlNanoFTPScanProxy) xmlNanoFTPScanProxy__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPScanProxy xmlNanoFTPScanProxy__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_FTP_ENABLED)
+#ifdef bottom_nanoftp
+#undef xmlNanoFTPUpdateURL
+extern __typeof (xmlNanoFTPUpdateURL) xmlNanoFTPUpdateURL __attribute((alias("xmlNanoFTPUpdateURL__internal_alias")));
+#else
+#ifndef xmlNanoFTPUpdateURL
+extern __typeof (xmlNanoFTPUpdateURL) xmlNanoFTPUpdateURL__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoFTPUpdateURL xmlNanoFTPUpdateURL__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPAuthHeader
+extern __typeof (xmlNanoHTTPAuthHeader) xmlNanoHTTPAuthHeader __attribute((alias("xmlNanoHTTPAuthHeader__internal_alias")));
+#else
+#ifndef xmlNanoHTTPAuthHeader
+extern __typeof (xmlNanoHTTPAuthHeader) xmlNanoHTTPAuthHeader__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPAuthHeader xmlNanoHTTPAuthHeader__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPCleanup
+extern __typeof (xmlNanoHTTPCleanup) xmlNanoHTTPCleanup __attribute((alias("xmlNanoHTTPCleanup__internal_alias")));
+#else
+#ifndef xmlNanoHTTPCleanup
+extern __typeof (xmlNanoHTTPCleanup) xmlNanoHTTPCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPCleanup xmlNanoHTTPCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPClose
+extern __typeof (xmlNanoHTTPClose) xmlNanoHTTPClose __attribute((alias("xmlNanoHTTPClose__internal_alias")));
+#else
+#ifndef xmlNanoHTTPClose
+extern __typeof (xmlNanoHTTPClose) xmlNanoHTTPClose__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPClose xmlNanoHTTPClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPContentLength
+extern __typeof (xmlNanoHTTPContentLength) xmlNanoHTTPContentLength __attribute((alias("xmlNanoHTTPContentLength__internal_alias")));
+#else
+#ifndef xmlNanoHTTPContentLength
+extern __typeof (xmlNanoHTTPContentLength) xmlNanoHTTPContentLength__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPContentLength xmlNanoHTTPContentLength__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPEncoding
+extern __typeof (xmlNanoHTTPEncoding) xmlNanoHTTPEncoding __attribute((alias("xmlNanoHTTPEncoding__internal_alias")));
+#else
+#ifndef xmlNanoHTTPEncoding
+extern __typeof (xmlNanoHTTPEncoding) xmlNanoHTTPEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPEncoding xmlNanoHTTPEncoding__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPFetch
+extern __typeof (xmlNanoHTTPFetch) xmlNanoHTTPFetch __attribute((alias("xmlNanoHTTPFetch__internal_alias")));
+#else
+#ifndef xmlNanoHTTPFetch
+extern __typeof (xmlNanoHTTPFetch) xmlNanoHTTPFetch__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPFetch xmlNanoHTTPFetch__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPInit
+extern __typeof (xmlNanoHTTPInit) xmlNanoHTTPInit __attribute((alias("xmlNanoHTTPInit__internal_alias")));
+#else
+#ifndef xmlNanoHTTPInit
+extern __typeof (xmlNanoHTTPInit) xmlNanoHTTPInit__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPInit xmlNanoHTTPInit__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPMethod
+extern __typeof (xmlNanoHTTPMethod) xmlNanoHTTPMethod __attribute((alias("xmlNanoHTTPMethod__internal_alias")));
+#else
+#ifndef xmlNanoHTTPMethod
+extern __typeof (xmlNanoHTTPMethod) xmlNanoHTTPMethod__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPMethod xmlNanoHTTPMethod__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPMethodRedir
+extern __typeof (xmlNanoHTTPMethodRedir) xmlNanoHTTPMethodRedir __attribute((alias("xmlNanoHTTPMethodRedir__internal_alias")));
+#else
+#ifndef xmlNanoHTTPMethodRedir
+extern __typeof (xmlNanoHTTPMethodRedir) xmlNanoHTTPMethodRedir__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPMethodRedir xmlNanoHTTPMethodRedir__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPMimeType
+extern __typeof (xmlNanoHTTPMimeType) xmlNanoHTTPMimeType __attribute((alias("xmlNanoHTTPMimeType__internal_alias")));
+#else
+#ifndef xmlNanoHTTPMimeType
+extern __typeof (xmlNanoHTTPMimeType) xmlNanoHTTPMimeType__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPMimeType xmlNanoHTTPMimeType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPOpen
+extern __typeof (xmlNanoHTTPOpen) xmlNanoHTTPOpen __attribute((alias("xmlNanoHTTPOpen__internal_alias")));
+#else
+#ifndef xmlNanoHTTPOpen
+extern __typeof (xmlNanoHTTPOpen) xmlNanoHTTPOpen__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPOpen xmlNanoHTTPOpen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPOpenRedir
+extern __typeof (xmlNanoHTTPOpenRedir) xmlNanoHTTPOpenRedir __attribute((alias("xmlNanoHTTPOpenRedir__internal_alias")));
+#else
+#ifndef xmlNanoHTTPOpenRedir
+extern __typeof (xmlNanoHTTPOpenRedir) xmlNanoHTTPOpenRedir__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPOpenRedir xmlNanoHTTPOpenRedir__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPRead
+extern __typeof (xmlNanoHTTPRead) xmlNanoHTTPRead __attribute((alias("xmlNanoHTTPRead__internal_alias")));
+#else
+#ifndef xmlNanoHTTPRead
+extern __typeof (xmlNanoHTTPRead) xmlNanoHTTPRead__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPRead xmlNanoHTTPRead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPRedir
+extern __typeof (xmlNanoHTTPRedir) xmlNanoHTTPRedir __attribute((alias("xmlNanoHTTPRedir__internal_alias")));
+#else
+#ifndef xmlNanoHTTPRedir
+extern __typeof (xmlNanoHTTPRedir) xmlNanoHTTPRedir__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPRedir xmlNanoHTTPRedir__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPReturnCode
+extern __typeof (xmlNanoHTTPReturnCode) xmlNanoHTTPReturnCode __attribute((alias("xmlNanoHTTPReturnCode__internal_alias")));
+#else
+#ifndef xmlNanoHTTPReturnCode
+extern __typeof (xmlNanoHTTPReturnCode) xmlNanoHTTPReturnCode__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPReturnCode xmlNanoHTTPReturnCode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPSave
+extern __typeof (xmlNanoHTTPSave) xmlNanoHTTPSave __attribute((alias("xmlNanoHTTPSave__internal_alias")));
+#else
+#ifndef xmlNanoHTTPSave
+extern __typeof (xmlNanoHTTPSave) xmlNanoHTTPSave__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPSave xmlNanoHTTPSave__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_nanohttp
+#undef xmlNanoHTTPScanProxy
+extern __typeof (xmlNanoHTTPScanProxy) xmlNanoHTTPScanProxy __attribute((alias("xmlNanoHTTPScanProxy__internal_alias")));
+#else
+#ifndef xmlNanoHTTPScanProxy
+extern __typeof (xmlNanoHTTPScanProxy) xmlNanoHTTPScanProxy__internal_alias __attribute((visibility("hidden")));
+#define xmlNanoHTTPScanProxy xmlNanoHTTPScanProxy__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlNewAutomata
+extern __typeof (xmlNewAutomata) xmlNewAutomata __attribute((alias("xmlNewAutomata__internal_alias")));
+#else
+#ifndef xmlNewAutomata
+extern __typeof (xmlNewAutomata) xmlNewAutomata__internal_alias __attribute((visibility("hidden")));
+#define xmlNewAutomata xmlNewAutomata__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewCDataBlock
+extern __typeof (xmlNewCDataBlock) xmlNewCDataBlock __attribute((alias("xmlNewCDataBlock__internal_alias")));
+#else
+#ifndef xmlNewCDataBlock
+extern __typeof (xmlNewCDataBlock) xmlNewCDataBlock__internal_alias __attribute((visibility("hidden")));
+#define xmlNewCDataBlock xmlNewCDataBlock__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlNewCatalog
+extern __typeof (xmlNewCatalog) xmlNewCatalog __attribute((alias("xmlNewCatalog__internal_alias")));
+#else
+#ifndef xmlNewCatalog
+extern __typeof (xmlNewCatalog) xmlNewCatalog__internal_alias __attribute((visibility("hidden")));
+#define xmlNewCatalog xmlNewCatalog__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlNewCharEncodingHandler
+extern __typeof (xmlNewCharEncodingHandler) xmlNewCharEncodingHandler __attribute((alias("xmlNewCharEncodingHandler__internal_alias")));
+#else
+#ifndef xmlNewCharEncodingHandler
+extern __typeof (xmlNewCharEncodingHandler) xmlNewCharEncodingHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlNewCharEncodingHandler xmlNewCharEncodingHandler__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewCharRef
+extern __typeof (xmlNewCharRef) xmlNewCharRef __attribute((alias("xmlNewCharRef__internal_alias")));
+#else
+#ifndef xmlNewCharRef
+extern __typeof (xmlNewCharRef) xmlNewCharRef__internal_alias __attribute((visibility("hidden")));
+#define xmlNewCharRef xmlNewCharRef__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlNewChild
+extern __typeof (xmlNewChild) xmlNewChild __attribute((alias("xmlNewChild__internal_alias")));
+#else
+#ifndef xmlNewChild
+extern __typeof (xmlNewChild) xmlNewChild__internal_alias __attribute((visibility("hidden")));
+#define xmlNewChild xmlNewChild__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewComment
+extern __typeof (xmlNewComment) xmlNewComment __attribute((alias("xmlNewComment__internal_alias")));
+#else
+#ifndef xmlNewComment
+extern __typeof (xmlNewComment) xmlNewComment__internal_alias __attribute((visibility("hidden")));
+#define xmlNewComment xmlNewComment__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDoc
+extern __typeof (xmlNewDoc) xmlNewDoc __attribute((alias("xmlNewDoc__internal_alias")));
+#else
+#ifndef xmlNewDoc
+extern __typeof (xmlNewDoc) xmlNewDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDoc xmlNewDoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocComment
+extern __typeof (xmlNewDocComment) xmlNewDocComment __attribute((alias("xmlNewDocComment__internal_alias")));
+#else
+#ifndef xmlNewDocComment
+extern __typeof (xmlNewDocComment) xmlNewDocComment__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocComment xmlNewDocComment__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlNewDocElementContent
+extern __typeof (xmlNewDocElementContent) xmlNewDocElementContent __attribute((alias("xmlNewDocElementContent__internal_alias")));
+#else
+#ifndef xmlNewDocElementContent
+extern __typeof (xmlNewDocElementContent) xmlNewDocElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocElementContent xmlNewDocElementContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNewDocFragment
+extern __typeof (xmlNewDocFragment) xmlNewDocFragment __attribute((alias("xmlNewDocFragment__internal_alias")));
+#else
+#ifndef xmlNewDocFragment
+extern __typeof (xmlNewDocFragment) xmlNewDocFragment__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocFragment xmlNewDocFragment__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocNode
+extern __typeof (xmlNewDocNode) xmlNewDocNode __attribute((alias("xmlNewDocNode__internal_alias")));
+#else
+#ifndef xmlNewDocNode
+extern __typeof (xmlNewDocNode) xmlNewDocNode__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocNode xmlNewDocNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocNodeEatName
+extern __typeof (xmlNewDocNodeEatName) xmlNewDocNodeEatName __attribute((alias("xmlNewDocNodeEatName__internal_alias")));
+#else
+#ifndef xmlNewDocNodeEatName
+extern __typeof (xmlNewDocNodeEatName) xmlNewDocNodeEatName__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocNodeEatName xmlNewDocNodeEatName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocPI
+extern __typeof (xmlNewDocPI) xmlNewDocPI __attribute((alias("xmlNewDocPI__internal_alias")));
+#else
+#ifndef xmlNewDocPI
+extern __typeof (xmlNewDocPI) xmlNewDocPI__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocPI xmlNewDocPI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocProp
+extern __typeof (xmlNewDocProp) xmlNewDocProp __attribute((alias("xmlNewDocProp__internal_alias")));
+#else
+#ifndef xmlNewDocProp
+extern __typeof (xmlNewDocProp) xmlNewDocProp__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocProp xmlNewDocProp__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNewDocRawNode
+extern __typeof (xmlNewDocRawNode) xmlNewDocRawNode __attribute((alias("xmlNewDocRawNode__internal_alias")));
+#else
+#ifndef xmlNewDocRawNode
+extern __typeof (xmlNewDocRawNode) xmlNewDocRawNode__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocRawNode xmlNewDocRawNode__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocText
+extern __typeof (xmlNewDocText) xmlNewDocText __attribute((alias("xmlNewDocText__internal_alias")));
+#else
+#ifndef xmlNewDocText
+extern __typeof (xmlNewDocText) xmlNewDocText__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocText xmlNewDocText__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDocTextLen
+extern __typeof (xmlNewDocTextLen) xmlNewDocTextLen __attribute((alias("xmlNewDocTextLen__internal_alias")));
+#else
+#ifndef xmlNewDocTextLen
+extern __typeof (xmlNewDocTextLen) xmlNewDocTextLen__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDocTextLen xmlNewDocTextLen__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewDtd
+extern __typeof (xmlNewDtd) xmlNewDtd __attribute((alias("xmlNewDtd__internal_alias")));
+#else
+#ifndef xmlNewDtd
+extern __typeof (xmlNewDtd) xmlNewDtd__internal_alias __attribute((visibility("hidden")));
+#define xmlNewDtd xmlNewDtd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlNewElementContent
+extern __typeof (xmlNewElementContent) xmlNewElementContent __attribute((alias("xmlNewElementContent__internal_alias")));
+#else
+#ifndef xmlNewElementContent
+extern __typeof (xmlNewElementContent) xmlNewElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNewElementContent xmlNewElementContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_entities
+#undef xmlNewEntity
+extern __typeof (xmlNewEntity) xmlNewEntity __attribute((alias("xmlNewEntity__internal_alias")));
+#else
+#ifndef xmlNewEntity
+extern __typeof (xmlNewEntity) xmlNewEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlNewEntity xmlNewEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewEntityInputStream
+extern __typeof (xmlNewEntityInputStream) xmlNewEntityInputStream __attribute((alias("xmlNewEntityInputStream__internal_alias")));
+#else
+#ifndef xmlNewEntityInputStream
+extern __typeof (xmlNewEntityInputStream) xmlNewEntityInputStream__internal_alias __attribute((visibility("hidden")));
+#define xmlNewEntityInputStream xmlNewEntityInputStream__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlNewGlobalNs
+extern __typeof (xmlNewGlobalNs) xmlNewGlobalNs __attribute((alias("xmlNewGlobalNs__internal_alias")));
+#else
+#ifndef xmlNewGlobalNs
+extern __typeof (xmlNewGlobalNs) xmlNewGlobalNs__internal_alias __attribute((visibility("hidden")));
+#define xmlNewGlobalNs xmlNewGlobalNs__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewIOInputStream
+extern __typeof (xmlNewIOInputStream) xmlNewIOInputStream __attribute((alias("xmlNewIOInputStream__internal_alias")));
+#else
+#ifndef xmlNewIOInputStream
+extern __typeof (xmlNewIOInputStream) xmlNewIOInputStream__internal_alias __attribute((visibility("hidden")));
+#define xmlNewIOInputStream xmlNewIOInputStream__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewInputFromFile
+extern __typeof (xmlNewInputFromFile) xmlNewInputFromFile __attribute((alias("xmlNewInputFromFile__internal_alias")));
+#else
+#ifndef xmlNewInputFromFile
+extern __typeof (xmlNewInputFromFile) xmlNewInputFromFile__internal_alias __attribute((visibility("hidden")));
+#define xmlNewInputFromFile xmlNewInputFromFile__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewInputStream
+extern __typeof (xmlNewInputStream) xmlNewInputStream __attribute((alias("xmlNewInputStream__internal_alias")));
+#else
+#ifndef xmlNewInputStream
+extern __typeof (xmlNewInputStream) xmlNewInputStream__internal_alias __attribute((visibility("hidden")));
+#define xmlNewInputStream xmlNewInputStream__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlNewMutex
+extern __typeof (xmlNewMutex) xmlNewMutex __attribute((alias("xmlNewMutex__internal_alias")));
+#else
+#ifndef xmlNewMutex
+extern __typeof (xmlNewMutex) xmlNewMutex__internal_alias __attribute((visibility("hidden")));
+#define xmlNewMutex xmlNewMutex__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewNode
+extern __typeof (xmlNewNode) xmlNewNode __attribute((alias("xmlNewNode__internal_alias")));
+#else
+#ifndef xmlNewNode
+extern __typeof (xmlNewNode) xmlNewNode__internal_alias __attribute((visibility("hidden")));
+#define xmlNewNode xmlNewNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewNodeEatName
+extern __typeof (xmlNewNodeEatName) xmlNewNodeEatName __attribute((alias("xmlNewNodeEatName__internal_alias")));
+#else
+#ifndef xmlNewNodeEatName
+extern __typeof (xmlNewNodeEatName) xmlNewNodeEatName__internal_alias __attribute((visibility("hidden")));
+#define xmlNewNodeEatName xmlNewNodeEatName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewNs
+extern __typeof (xmlNewNs) xmlNewNs __attribute((alias("xmlNewNs__internal_alias")));
+#else
+#ifndef xmlNewNs
+extern __typeof (xmlNewNs) xmlNewNs__internal_alias __attribute((visibility("hidden")));
+#define xmlNewNs xmlNewNs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewNsProp
+extern __typeof (xmlNewNsProp) xmlNewNsProp __attribute((alias("xmlNewNsProp__internal_alias")));
+#else
+#ifndef xmlNewNsProp
+extern __typeof (xmlNewNsProp) xmlNewNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlNewNsProp xmlNewNsProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewNsPropEatName
+extern __typeof (xmlNewNsPropEatName) xmlNewNsPropEatName __attribute((alias("xmlNewNsPropEatName__internal_alias")));
+#else
+#ifndef xmlNewNsPropEatName
+extern __typeof (xmlNewNsPropEatName) xmlNewNsPropEatName__internal_alias __attribute((visibility("hidden")));
+#define xmlNewNsPropEatName xmlNewNsPropEatName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewPI
+extern __typeof (xmlNewPI) xmlNewPI __attribute((alias("xmlNewPI__internal_alias")));
+#else
+#ifndef xmlNewPI
+extern __typeof (xmlNewPI) xmlNewPI__internal_alias __attribute((visibility("hidden")));
+#define xmlNewPI xmlNewPI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewParserCtxt
+extern __typeof (xmlNewParserCtxt) xmlNewParserCtxt __attribute((alias("xmlNewParserCtxt__internal_alias")));
+#else
+#ifndef xmlNewParserCtxt
+extern __typeof (xmlNewParserCtxt) xmlNewParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlNewParserCtxt xmlNewParserCtxt__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlNewProp
+extern __typeof (xmlNewProp) xmlNewProp __attribute((alias("xmlNewProp__internal_alias")));
+#else
+#ifndef xmlNewProp
+extern __typeof (xmlNewProp) xmlNewProp__internal_alias __attribute((visibility("hidden")));
+#define xmlNewProp xmlNewProp__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlNewRMutex
+extern __typeof (xmlNewRMutex) xmlNewRMutex __attribute((alias("xmlNewRMutex__internal_alias")));
+#else
+#ifndef xmlNewRMutex
+extern __typeof (xmlNewRMutex) xmlNewRMutex__internal_alias __attribute((visibility("hidden")));
+#define xmlNewRMutex xmlNewRMutex__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewReference
+extern __typeof (xmlNewReference) xmlNewReference __attribute((alias("xmlNewReference__internal_alias")));
+#else
+#ifndef xmlNewReference
+extern __typeof (xmlNewReference) xmlNewReference__internal_alias __attribute((visibility("hidden")));
+#define xmlNewReference xmlNewReference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNewStringInputStream
+extern __typeof (xmlNewStringInputStream) xmlNewStringInputStream __attribute((alias("xmlNewStringInputStream__internal_alias")));
+#else
+#ifndef xmlNewStringInputStream
+extern __typeof (xmlNewStringInputStream) xmlNewStringInputStream__internal_alias __attribute((visibility("hidden")));
+#define xmlNewStringInputStream xmlNewStringInputStream__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewText
+extern __typeof (xmlNewText) xmlNewText __attribute((alias("xmlNewText__internal_alias")));
+#else
+#ifndef xmlNewText
+extern __typeof (xmlNewText) xmlNewText__internal_alias __attribute((visibility("hidden")));
+#define xmlNewText xmlNewText__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNewTextChild
+extern __typeof (xmlNewTextChild) xmlNewTextChild __attribute((alias("xmlNewTextChild__internal_alias")));
+#else
+#ifndef xmlNewTextChild
+extern __typeof (xmlNewTextChild) xmlNewTextChild__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextChild xmlNewTextChild__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNewTextLen
+extern __typeof (xmlNewTextLen) xmlNewTextLen __attribute((alias("xmlNewTextLen__internal_alias")));
+#else
+#ifndef xmlNewTextLen
+extern __typeof (xmlNewTextLen) xmlNewTextLen__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextLen xmlNewTextLen__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlNewTextReader
+extern __typeof (xmlNewTextReader) xmlNewTextReader __attribute((alias("xmlNewTextReader__internal_alias")));
+#else
+#ifndef xmlNewTextReader
+extern __typeof (xmlNewTextReader) xmlNewTextReader__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextReader xmlNewTextReader__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlNewTextReaderFilename
+extern __typeof (xmlNewTextReaderFilename) xmlNewTextReaderFilename __attribute((alias("xmlNewTextReaderFilename__internal_alias")));
+#else
+#ifndef xmlNewTextReaderFilename
+extern __typeof (xmlNewTextReaderFilename) xmlNewTextReaderFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextReaderFilename xmlNewTextReaderFilename__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriter
+extern __typeof (xmlNewTextWriter) xmlNewTextWriter __attribute((alias("xmlNewTextWriter__internal_alias")));
+#else
+#ifndef xmlNewTextWriter
+extern __typeof (xmlNewTextWriter) xmlNewTextWriter__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriter xmlNewTextWriter__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriterDoc
+extern __typeof (xmlNewTextWriterDoc) xmlNewTextWriterDoc __attribute((alias("xmlNewTextWriterDoc__internal_alias")));
+#else
+#ifndef xmlNewTextWriterDoc
+extern __typeof (xmlNewTextWriterDoc) xmlNewTextWriterDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriterDoc xmlNewTextWriterDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriterFilename
+extern __typeof (xmlNewTextWriterFilename) xmlNewTextWriterFilename __attribute((alias("xmlNewTextWriterFilename__internal_alias")));
+#else
+#ifndef xmlNewTextWriterFilename
+extern __typeof (xmlNewTextWriterFilename) xmlNewTextWriterFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriterFilename xmlNewTextWriterFilename__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriterMemory
+extern __typeof (xmlNewTextWriterMemory) xmlNewTextWriterMemory __attribute((alias("xmlNewTextWriterMemory__internal_alias")));
+#else
+#ifndef xmlNewTextWriterMemory
+extern __typeof (xmlNewTextWriterMemory) xmlNewTextWriterMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriterMemory xmlNewTextWriterMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriterPushParser
+extern __typeof (xmlNewTextWriterPushParser) xmlNewTextWriterPushParser __attribute((alias("xmlNewTextWriterPushParser__internal_alias")));
+#else
+#ifndef xmlNewTextWriterPushParser
+extern __typeof (xmlNewTextWriterPushParser) xmlNewTextWriterPushParser__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriterPushParser xmlNewTextWriterPushParser__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlNewTextWriterTree
+extern __typeof (xmlNewTextWriterTree) xmlNewTextWriterTree __attribute((alias("xmlNewTextWriterTree__internal_alias")));
+#else
+#ifndef xmlNewTextWriterTree
+extern __typeof (xmlNewTextWriterTree) xmlNewTextWriterTree__internal_alias __attribute((visibility("hidden")));
+#define xmlNewTextWriterTree xmlNewTextWriterTree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlNewValidCtxt
+extern __typeof (xmlNewValidCtxt) xmlNewValidCtxt __attribute((alias("xmlNewValidCtxt__internal_alias")));
+#else
+#ifndef xmlNewValidCtxt
+extern __typeof (xmlNewValidCtxt) xmlNewValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlNewValidCtxt xmlNewValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlNextChar
+extern __typeof (xmlNextChar) xmlNextChar __attribute((alias("xmlNextChar__internal_alias")));
+#else
+#ifndef xmlNextChar
+extern __typeof (xmlNextChar) xmlNextChar__internal_alias __attribute((visibility("hidden")));
+#define xmlNextChar xmlNextChar__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNextElementSibling
+extern __typeof (xmlNextElementSibling) xmlNextElementSibling __attribute((alias("xmlNextElementSibling__internal_alias")));
+#else
+#ifndef xmlNextElementSibling
+extern __typeof (xmlNextElementSibling) xmlNextElementSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlNextElementSibling xmlNextElementSibling__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlNoNetExternalEntityLoader
+extern __typeof (xmlNoNetExternalEntityLoader) xmlNoNetExternalEntityLoader __attribute((alias("xmlNoNetExternalEntityLoader__internal_alias")));
+#else
+#ifndef xmlNoNetExternalEntityLoader
+extern __typeof (xmlNoNetExternalEntityLoader) xmlNoNetExternalEntityLoader__internal_alias __attribute((visibility("hidden")));
+#define xmlNoNetExternalEntityLoader xmlNoNetExternalEntityLoader__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeAddContent
+extern __typeof (xmlNodeAddContent) xmlNodeAddContent __attribute((alias("xmlNodeAddContent__internal_alias")));
+#else
+#ifndef xmlNodeAddContent
+extern __typeof (xmlNodeAddContent) xmlNodeAddContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeAddContent xmlNodeAddContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeAddContentLen
+extern __typeof (xmlNodeAddContentLen) xmlNodeAddContentLen __attribute((alias("xmlNodeAddContentLen__internal_alias")));
+#else
+#ifndef xmlNodeAddContentLen
+extern __typeof (xmlNodeAddContentLen) xmlNodeAddContentLen__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeAddContentLen xmlNodeAddContentLen__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeBufGetContent
+extern __typeof (xmlNodeBufGetContent) xmlNodeBufGetContent __attribute((alias("xmlNodeBufGetContent__internal_alias")));
+#else
+#ifndef xmlNodeBufGetContent
+extern __typeof (xmlNodeBufGetContent) xmlNodeBufGetContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeBufGetContent xmlNodeBufGetContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlNodeDump
+extern __typeof (xmlNodeDump) xmlNodeDump __attribute((alias("xmlNodeDump__internal_alias")));
+#else
+#ifndef xmlNodeDump
+extern __typeof (xmlNodeDump) xmlNodeDump__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeDump xmlNodeDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlNodeDumpOutput
+extern __typeof (xmlNodeDumpOutput) xmlNodeDumpOutput __attribute((alias("xmlNodeDumpOutput__internal_alias")));
+#else
+#ifndef xmlNodeDumpOutput
+extern __typeof (xmlNodeDumpOutput) xmlNodeDumpOutput__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeDumpOutput xmlNodeDumpOutput__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeGetBase
+extern __typeof (xmlNodeGetBase) xmlNodeGetBase __attribute((alias("xmlNodeGetBase__internal_alias")));
+#else
+#ifndef xmlNodeGetBase
+extern __typeof (xmlNodeGetBase) xmlNodeGetBase__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeGetBase xmlNodeGetBase__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeGetContent
+extern __typeof (xmlNodeGetContent) xmlNodeGetContent __attribute((alias("xmlNodeGetContent__internal_alias")));
+#else
+#ifndef xmlNodeGetContent
+extern __typeof (xmlNodeGetContent) xmlNodeGetContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeGetContent xmlNodeGetContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeGetLang
+extern __typeof (xmlNodeGetLang) xmlNodeGetLang __attribute((alias("xmlNodeGetLang__internal_alias")));
+#else
+#ifndef xmlNodeGetLang
+extern __typeof (xmlNodeGetLang) xmlNodeGetLang__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeGetLang xmlNodeGetLang__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeGetSpacePreserve
+extern __typeof (xmlNodeGetSpacePreserve) xmlNodeGetSpacePreserve __attribute((alias("xmlNodeGetSpacePreserve__internal_alias")));
+#else
+#ifndef xmlNodeGetSpacePreserve
+extern __typeof (xmlNodeGetSpacePreserve) xmlNodeGetSpacePreserve__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeGetSpacePreserve xmlNodeGetSpacePreserve__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeIsText
+extern __typeof (xmlNodeIsText) xmlNodeIsText __attribute((alias("xmlNodeIsText__internal_alias")));
+#else
+#ifndef xmlNodeIsText
+extern __typeof (xmlNodeIsText) xmlNodeIsText__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeIsText xmlNodeIsText__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeListGetRawString
+extern __typeof (xmlNodeListGetRawString) xmlNodeListGetRawString __attribute((alias("xmlNodeListGetRawString__internal_alias")));
+#else
+#ifndef xmlNodeListGetRawString
+extern __typeof (xmlNodeListGetRawString) xmlNodeListGetRawString__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeListGetRawString xmlNodeListGetRawString__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeListGetString
+extern __typeof (xmlNodeListGetString) xmlNodeListGetString __attribute((alias("xmlNodeListGetString__internal_alias")));
+#else
+#ifndef xmlNodeListGetString
+extern __typeof (xmlNodeListGetString) xmlNodeListGetString__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeListGetString xmlNodeListGetString__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeSetBase
+extern __typeof (xmlNodeSetBase) xmlNodeSetBase __attribute((alias("xmlNodeSetBase__internal_alias")));
+#else
+#ifndef xmlNodeSetBase
+extern __typeof (xmlNodeSetBase) xmlNodeSetBase__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetBase xmlNodeSetBase__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlNodeSetContent
+extern __typeof (xmlNodeSetContent) xmlNodeSetContent __attribute((alias("xmlNodeSetContent__internal_alias")));
+#else
+#ifndef xmlNodeSetContent
+extern __typeof (xmlNodeSetContent) xmlNodeSetContent__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetContent xmlNodeSetContent__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeSetContentLen
+extern __typeof (xmlNodeSetContentLen) xmlNodeSetContentLen __attribute((alias("xmlNodeSetContentLen__internal_alias")));
+#else
+#ifndef xmlNodeSetContentLen
+extern __typeof (xmlNodeSetContentLen) xmlNodeSetContentLen__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetContentLen xmlNodeSetContentLen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeSetLang
+extern __typeof (xmlNodeSetLang) xmlNodeSetLang __attribute((alias("xmlNodeSetLang__internal_alias")));
+#else
+#ifndef xmlNodeSetLang
+extern __typeof (xmlNodeSetLang) xmlNodeSetLang__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetLang xmlNodeSetLang__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeSetName
+extern __typeof (xmlNodeSetName) xmlNodeSetName __attribute((alias("xmlNodeSetName__internal_alias")));
+#else
+#ifndef xmlNodeSetName
+extern __typeof (xmlNodeSetName) xmlNodeSetName__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetName xmlNodeSetName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlNodeSetSpacePreserve
+extern __typeof (xmlNodeSetSpacePreserve) xmlNodeSetSpacePreserve __attribute((alias("xmlNodeSetSpacePreserve__internal_alias")));
+#else
+#ifndef xmlNodeSetSpacePreserve
+extern __typeof (xmlNodeSetSpacePreserve) xmlNodeSetSpacePreserve__internal_alias __attribute((visibility("hidden")));
+#define xmlNodeSetSpacePreserve xmlNodeSetSpacePreserve__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlNormalizeURIPath
+extern __typeof (xmlNormalizeURIPath) xmlNormalizeURIPath __attribute((alias("xmlNormalizeURIPath__internal_alias")));
+#else
+#ifndef xmlNormalizeURIPath
+extern __typeof (xmlNormalizeURIPath) xmlNormalizeURIPath__internal_alias __attribute((visibility("hidden")));
+#define xmlNormalizeURIPath xmlNormalizeURIPath__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlNormalizeWindowsPath
+extern __typeof (xmlNormalizeWindowsPath) xmlNormalizeWindowsPath __attribute((alias("xmlNormalizeWindowsPath__internal_alias")));
+#else
+#ifndef xmlNormalizeWindowsPath
+extern __typeof (xmlNormalizeWindowsPath) xmlNormalizeWindowsPath__internal_alias __attribute((visibility("hidden")));
+#define xmlNormalizeWindowsPath xmlNormalizeWindowsPath__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferClose
+extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose __attribute((alias("xmlOutputBufferClose__internal_alias")));
+#else
+#ifndef xmlOutputBufferClose
+extern __typeof (xmlOutputBufferClose) xmlOutputBufferClose__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferClose xmlOutputBufferClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateBuffer
+extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer __attribute((alias("xmlOutputBufferCreateBuffer__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateBuffer
+extern __typeof (xmlOutputBufferCreateBuffer) xmlOutputBufferCreateBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateBuffer xmlOutputBufferCreateBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateFd
+extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd __attribute((alias("xmlOutputBufferCreateFd__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateFd
+extern __typeof (xmlOutputBufferCreateFd) xmlOutputBufferCreateFd__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateFd xmlOutputBufferCreateFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateFile
+extern __typeof (xmlOutputBufferCreateFile) xmlOutputBufferCreateFile __attribute((alias("xmlOutputBufferCreateFile__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateFile
+extern __typeof (xmlOutputBufferCreateFile) xmlOutputBufferCreateFile__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateFile xmlOutputBufferCreateFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateFilename
+extern __typeof (xmlOutputBufferCreateFilename) xmlOutputBufferCreateFilename __attribute((alias("xmlOutputBufferCreateFilename__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateFilename
+extern __typeof (xmlOutputBufferCreateFilename) xmlOutputBufferCreateFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateFilename xmlOutputBufferCreateFilename__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateFilenameDefault
+extern __typeof (xmlOutputBufferCreateFilenameDefault) xmlOutputBufferCreateFilenameDefault __attribute((alias("xmlOutputBufferCreateFilenameDefault__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateFilenameDefault
+extern __typeof (xmlOutputBufferCreateFilenameDefault) xmlOutputBufferCreateFilenameDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateFilenameDefault xmlOutputBufferCreateFilenameDefault__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferCreateIO
+extern __typeof (xmlOutputBufferCreateIO) xmlOutputBufferCreateIO __attribute((alias("xmlOutputBufferCreateIO__internal_alias")));
+#else
+#ifndef xmlOutputBufferCreateIO
+extern __typeof (xmlOutputBufferCreateIO) xmlOutputBufferCreateIO__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferCreateIO xmlOutputBufferCreateIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferFlush
+extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush __attribute((alias("xmlOutputBufferFlush__internal_alias")));
+#else
+#ifndef xmlOutputBufferFlush
+extern __typeof (xmlOutputBufferFlush) xmlOutputBufferFlush__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferFlush xmlOutputBufferFlush__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferGetContent
+extern __typeof (xmlOutputBufferGetContent) xmlOutputBufferGetContent __attribute((alias("xmlOutputBufferGetContent__internal_alias")));
+#else
+#ifndef xmlOutputBufferGetContent
+extern __typeof (xmlOutputBufferGetContent) xmlOutputBufferGetContent__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferGetContent xmlOutputBufferGetContent__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferGetSize
+extern __typeof (xmlOutputBufferGetSize) xmlOutputBufferGetSize __attribute((alias("xmlOutputBufferGetSize__internal_alias")));
+#else
+#ifndef xmlOutputBufferGetSize
+extern __typeof (xmlOutputBufferGetSize) xmlOutputBufferGetSize__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferGetSize xmlOutputBufferGetSize__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferWrite
+extern __typeof (xmlOutputBufferWrite) xmlOutputBufferWrite __attribute((alias("xmlOutputBufferWrite__internal_alias")));
+#else
+#ifndef xmlOutputBufferWrite
+extern __typeof (xmlOutputBufferWrite) xmlOutputBufferWrite__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferWrite xmlOutputBufferWrite__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferWriteEscape
+extern __typeof (xmlOutputBufferWriteEscape) xmlOutputBufferWriteEscape __attribute((alias("xmlOutputBufferWriteEscape__internal_alias")));
+#else
+#ifndef xmlOutputBufferWriteEscape
+extern __typeof (xmlOutputBufferWriteEscape) xmlOutputBufferWriteEscape__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferWriteEscape xmlOutputBufferWriteEscape__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlOutputBufferWriteString
+extern __typeof (xmlOutputBufferWriteString) xmlOutputBufferWriteString __attribute((alias("xmlOutputBufferWriteString__internal_alias")));
+#else
+#ifndef xmlOutputBufferWriteString
+extern __typeof (xmlOutputBufferWriteString) xmlOutputBufferWriteString__internal_alias __attribute((visibility("hidden")));
+#define xmlOutputBufferWriteString xmlOutputBufferWriteString__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseAttValue
+extern __typeof (xmlParseAttValue) xmlParseAttValue __attribute((alias("xmlParseAttValue__internal_alias")));
+#else
+#ifndef xmlParseAttValue
+extern __typeof (xmlParseAttValue) xmlParseAttValue__internal_alias __attribute((visibility("hidden")));
+#define xmlParseAttValue xmlParseAttValue__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseAttribute
+extern __typeof (xmlParseAttribute) xmlParseAttribute __attribute((alias("xmlParseAttribute__internal_alias")));
+#else
+#ifndef xmlParseAttribute
+extern __typeof (xmlParseAttribute) xmlParseAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlParseAttribute xmlParseAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseAttributeListDecl
+extern __typeof (xmlParseAttributeListDecl) xmlParseAttributeListDecl __attribute((alias("xmlParseAttributeListDecl__internal_alias")));
+#else
+#ifndef xmlParseAttributeListDecl
+extern __typeof (xmlParseAttributeListDecl) xmlParseAttributeListDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseAttributeListDecl xmlParseAttributeListDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseAttributeType
+extern __typeof (xmlParseAttributeType) xmlParseAttributeType __attribute((alias("xmlParseAttributeType__internal_alias")));
+#else
+#ifndef xmlParseAttributeType
+extern __typeof (xmlParseAttributeType) xmlParseAttributeType__internal_alias __attribute((visibility("hidden")));
+#define xmlParseAttributeType xmlParseAttributeType__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseBalancedChunkMemory
+extern __typeof (xmlParseBalancedChunkMemory) xmlParseBalancedChunkMemory __attribute((alias("xmlParseBalancedChunkMemory__internal_alias")));
+#else
+#ifndef xmlParseBalancedChunkMemory
+extern __typeof (xmlParseBalancedChunkMemory) xmlParseBalancedChunkMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlParseBalancedChunkMemory xmlParseBalancedChunkMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseBalancedChunkMemoryRecover
+extern __typeof (xmlParseBalancedChunkMemoryRecover) xmlParseBalancedChunkMemoryRecover __attribute((alias("xmlParseBalancedChunkMemoryRecover__internal_alias")));
+#else
+#ifndef xmlParseBalancedChunkMemoryRecover
+extern __typeof (xmlParseBalancedChunkMemoryRecover) xmlParseBalancedChunkMemoryRecover__internal_alias __attribute((visibility("hidden")));
+#define xmlParseBalancedChunkMemoryRecover xmlParseBalancedChunkMemoryRecover__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseCDSect
+extern __typeof (xmlParseCDSect) xmlParseCDSect __attribute((alias("xmlParseCDSect__internal_alias")));
+#else
+#ifndef xmlParseCDSect
+extern __typeof (xmlParseCDSect) xmlParseCDSect__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCDSect xmlParseCDSect__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_CATALOG_ENABLED)
+#ifdef bottom_catalog
+#undef xmlParseCatalogFile
+extern __typeof (xmlParseCatalogFile) xmlParseCatalogFile __attribute((alias("xmlParseCatalogFile__internal_alias")));
+#else
+#ifndef xmlParseCatalogFile
+extern __typeof (xmlParseCatalogFile) xmlParseCatalogFile__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCatalogFile xmlParseCatalogFile__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseCharData
+extern __typeof (xmlParseCharData) xmlParseCharData __attribute((alias("xmlParseCharData__internal_alias")));
+#else
+#ifndef xmlParseCharData
+extern __typeof (xmlParseCharData) xmlParseCharData__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCharData xmlParseCharData__internal_alias
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlParseCharEncoding
+extern __typeof (xmlParseCharEncoding) xmlParseCharEncoding __attribute((alias("xmlParseCharEncoding__internal_alias")));
+#else
+#ifndef xmlParseCharEncoding
+extern __typeof (xmlParseCharEncoding) xmlParseCharEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCharEncoding xmlParseCharEncoding__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseCharRef
+extern __typeof (xmlParseCharRef) xmlParseCharRef __attribute((alias("xmlParseCharRef__internal_alias")));
+#else
+#ifndef xmlParseCharRef
+extern __typeof (xmlParseCharRef) xmlParseCharRef__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCharRef xmlParseCharRef__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PUSH_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseChunk
+extern __typeof (xmlParseChunk) xmlParseChunk __attribute((alias("xmlParseChunk__internal_alias")));
+#else
+#ifndef xmlParseChunk
+extern __typeof (xmlParseChunk) xmlParseChunk__internal_alias __attribute((visibility("hidden")));
+#define xmlParseChunk xmlParseChunk__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseComment
+extern __typeof (xmlParseComment) xmlParseComment __attribute((alias("xmlParseComment__internal_alias")));
+#else
+#ifndef xmlParseComment
+extern __typeof (xmlParseComment) xmlParseComment__internal_alias __attribute((visibility("hidden")));
+#define xmlParseComment xmlParseComment__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseContent
+extern __typeof (xmlParseContent) xmlParseContent __attribute((alias("xmlParseContent__internal_alias")));
+#else
+#ifndef xmlParseContent
+extern __typeof (xmlParseContent) xmlParseContent__internal_alias __attribute((visibility("hidden")));
+#define xmlParseContent xmlParseContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseCtxtExternalEntity
+extern __typeof (xmlParseCtxtExternalEntity) xmlParseCtxtExternalEntity __attribute((alias("xmlParseCtxtExternalEntity__internal_alias")));
+#else
+#ifndef xmlParseCtxtExternalEntity
+extern __typeof (xmlParseCtxtExternalEntity) xmlParseCtxtExternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlParseCtxtExternalEntity xmlParseCtxtExternalEntity__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseDTD
+extern __typeof (xmlParseDTD) xmlParseDTD __attribute((alias("xmlParseDTD__internal_alias")));
+#else
+#ifndef xmlParseDTD
+extern __typeof (xmlParseDTD) xmlParseDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlParseDTD xmlParseDTD__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseDefaultDecl
+extern __typeof (xmlParseDefaultDecl) xmlParseDefaultDecl __attribute((alias("xmlParseDefaultDecl__internal_alias")));
+#else
+#ifndef xmlParseDefaultDecl
+extern __typeof (xmlParseDefaultDecl) xmlParseDefaultDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseDefaultDecl xmlParseDefaultDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseDoc
+extern __typeof (xmlParseDoc) xmlParseDoc __attribute((alias("xmlParseDoc__internal_alias")));
+#else
+#ifndef xmlParseDoc
+extern __typeof (xmlParseDoc) xmlParseDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlParseDoc xmlParseDoc__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseDocTypeDecl
+extern __typeof (xmlParseDocTypeDecl) xmlParseDocTypeDecl __attribute((alias("xmlParseDocTypeDecl__internal_alias")));
+#else
+#ifndef xmlParseDocTypeDecl
+extern __typeof (xmlParseDocTypeDecl) xmlParseDocTypeDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseDocTypeDecl xmlParseDocTypeDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseDocument
+extern __typeof (xmlParseDocument) xmlParseDocument __attribute((alias("xmlParseDocument__internal_alias")));
+#else
+#ifndef xmlParseDocument
+extern __typeof (xmlParseDocument) xmlParseDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlParseDocument xmlParseDocument__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseElement
+extern __typeof (xmlParseElement) xmlParseElement __attribute((alias("xmlParseElement__internal_alias")));
+#else
+#ifndef xmlParseElement
+extern __typeof (xmlParseElement) xmlParseElement__internal_alias __attribute((visibility("hidden")));
+#define xmlParseElement xmlParseElement__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseElementChildrenContentDecl
+extern __typeof (xmlParseElementChildrenContentDecl) xmlParseElementChildrenContentDecl __attribute((alias("xmlParseElementChildrenContentDecl__internal_alias")));
+#else
+#ifndef xmlParseElementChildrenContentDecl
+extern __typeof (xmlParseElementChildrenContentDecl) xmlParseElementChildrenContentDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseElementChildrenContentDecl xmlParseElementChildrenContentDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseElementContentDecl
+extern __typeof (xmlParseElementContentDecl) xmlParseElementContentDecl __attribute((alias("xmlParseElementContentDecl__internal_alias")));
+#else
+#ifndef xmlParseElementContentDecl
+extern __typeof (xmlParseElementContentDecl) xmlParseElementContentDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseElementContentDecl xmlParseElementContentDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseElementDecl
+extern __typeof (xmlParseElementDecl) xmlParseElementDecl __attribute((alias("xmlParseElementDecl__internal_alias")));
+#else
+#ifndef xmlParseElementDecl
+extern __typeof (xmlParseElementDecl) xmlParseElementDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseElementDecl xmlParseElementDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseElementMixedContentDecl
+extern __typeof (xmlParseElementMixedContentDecl) xmlParseElementMixedContentDecl __attribute((alias("xmlParseElementMixedContentDecl__internal_alias")));
+#else
+#ifndef xmlParseElementMixedContentDecl
+extern __typeof (xmlParseElementMixedContentDecl) xmlParseElementMixedContentDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseElementMixedContentDecl xmlParseElementMixedContentDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEncName
+extern __typeof (xmlParseEncName) xmlParseEncName __attribute((alias("xmlParseEncName__internal_alias")));
+#else
+#ifndef xmlParseEncName
+extern __typeof (xmlParseEncName) xmlParseEncName__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEncName xmlParseEncName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEncodingDecl
+extern __typeof (xmlParseEncodingDecl) xmlParseEncodingDecl __attribute((alias("xmlParseEncodingDecl__internal_alias")));
+#else
+#ifndef xmlParseEncodingDecl
+extern __typeof (xmlParseEncodingDecl) xmlParseEncodingDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEncodingDecl xmlParseEncodingDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseEndTag
+extern __typeof (xmlParseEndTag) xmlParseEndTag __attribute((alias("xmlParseEndTag__internal_alias")));
+#else
+#ifndef xmlParseEndTag
+extern __typeof (xmlParseEndTag) xmlParseEndTag__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEndTag xmlParseEndTag__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseEntity
+extern __typeof (xmlParseEntity) xmlParseEntity __attribute((alias("xmlParseEntity__internal_alias")));
+#else
+#ifndef xmlParseEntity
+extern __typeof (xmlParseEntity) xmlParseEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEntity xmlParseEntity__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEntityDecl
+extern __typeof (xmlParseEntityDecl) xmlParseEntityDecl __attribute((alias("xmlParseEntityDecl__internal_alias")));
+#else
+#ifndef xmlParseEntityDecl
+extern __typeof (xmlParseEntityDecl) xmlParseEntityDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEntityDecl xmlParseEntityDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEntityRef
+extern __typeof (xmlParseEntityRef) xmlParseEntityRef __attribute((alias("xmlParseEntityRef__internal_alias")));
+#else
+#ifndef xmlParseEntityRef
+extern __typeof (xmlParseEntityRef) xmlParseEntityRef__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEntityRef xmlParseEntityRef__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEntityValue
+extern __typeof (xmlParseEntityValue) xmlParseEntityValue __attribute((alias("xmlParseEntityValue__internal_alias")));
+#else
+#ifndef xmlParseEntityValue
+extern __typeof (xmlParseEntityValue) xmlParseEntityValue__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEntityValue xmlParseEntityValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEnumeratedType
+extern __typeof (xmlParseEnumeratedType) xmlParseEnumeratedType __attribute((alias("xmlParseEnumeratedType__internal_alias")));
+#else
+#ifndef xmlParseEnumeratedType
+extern __typeof (xmlParseEnumeratedType) xmlParseEnumeratedType__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEnumeratedType xmlParseEnumeratedType__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseEnumerationType
+extern __typeof (xmlParseEnumerationType) xmlParseEnumerationType __attribute((alias("xmlParseEnumerationType__internal_alias")));
+#else
+#ifndef xmlParseEnumerationType
+extern __typeof (xmlParseEnumerationType) xmlParseEnumerationType__internal_alias __attribute((visibility("hidden")));
+#define xmlParseEnumerationType xmlParseEnumerationType__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseExtParsedEnt
+extern __typeof (xmlParseExtParsedEnt) xmlParseExtParsedEnt __attribute((alias("xmlParseExtParsedEnt__internal_alias")));
+#else
+#ifndef xmlParseExtParsedEnt
+extern __typeof (xmlParseExtParsedEnt) xmlParseExtParsedEnt__internal_alias __attribute((visibility("hidden")));
+#define xmlParseExtParsedEnt xmlParseExtParsedEnt__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseExternalEntity
+extern __typeof (xmlParseExternalEntity) xmlParseExternalEntity __attribute((alias("xmlParseExternalEntity__internal_alias")));
+#else
+#ifndef xmlParseExternalEntity
+extern __typeof (xmlParseExternalEntity) xmlParseExternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlParseExternalEntity xmlParseExternalEntity__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseExternalID
+extern __typeof (xmlParseExternalID) xmlParseExternalID __attribute((alias("xmlParseExternalID__internal_alias")));
+#else
+#ifndef xmlParseExternalID
+extern __typeof (xmlParseExternalID) xmlParseExternalID__internal_alias __attribute((visibility("hidden")));
+#define xmlParseExternalID xmlParseExternalID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseExternalSubset
+extern __typeof (xmlParseExternalSubset) xmlParseExternalSubset __attribute((alias("xmlParseExternalSubset__internal_alias")));
+#else
+#ifndef xmlParseExternalSubset
+extern __typeof (xmlParseExternalSubset) xmlParseExternalSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlParseExternalSubset xmlParseExternalSubset__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseFile
+extern __typeof (xmlParseFile) xmlParseFile __attribute((alias("xmlParseFile__internal_alias")));
+#else
+#ifndef xmlParseFile
+extern __typeof (xmlParseFile) xmlParseFile__internal_alias __attribute((visibility("hidden")));
+#define xmlParseFile xmlParseFile__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseInNodeContext
+extern __typeof (xmlParseInNodeContext) xmlParseInNodeContext __attribute((alias("xmlParseInNodeContext__internal_alias")));
+#else
+#ifndef xmlParseInNodeContext
+extern __typeof (xmlParseInNodeContext) xmlParseInNodeContext__internal_alias __attribute((visibility("hidden")));
+#define xmlParseInNodeContext xmlParseInNodeContext__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseMarkupDecl
+extern __typeof (xmlParseMarkupDecl) xmlParseMarkupDecl __attribute((alias("xmlParseMarkupDecl__internal_alias")));
+#else
+#ifndef xmlParseMarkupDecl
+extern __typeof (xmlParseMarkupDecl) xmlParseMarkupDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseMarkupDecl xmlParseMarkupDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseMemory
+extern __typeof (xmlParseMemory) xmlParseMemory __attribute((alias("xmlParseMemory__internal_alias")));
+#else
+#ifndef xmlParseMemory
+extern __typeof (xmlParseMemory) xmlParseMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlParseMemory xmlParseMemory__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseMisc
+extern __typeof (xmlParseMisc) xmlParseMisc __attribute((alias("xmlParseMisc__internal_alias")));
+#else
+#ifndef xmlParseMisc
+extern __typeof (xmlParseMisc) xmlParseMisc__internal_alias __attribute((visibility("hidden")));
+#define xmlParseMisc xmlParseMisc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseName
+extern __typeof (xmlParseName) xmlParseName __attribute((alias("xmlParseName__internal_alias")));
+#else
+#ifndef xmlParseName
+extern __typeof (xmlParseName) xmlParseName__internal_alias __attribute((visibility("hidden")));
+#define xmlParseName xmlParseName__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlParseNamespace
+extern __typeof (xmlParseNamespace) xmlParseNamespace __attribute((alias("xmlParseNamespace__internal_alias")));
+#else
+#ifndef xmlParseNamespace
+extern __typeof (xmlParseNamespace) xmlParseNamespace__internal_alias __attribute((visibility("hidden")));
+#define xmlParseNamespace xmlParseNamespace__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseNmtoken
+extern __typeof (xmlParseNmtoken) xmlParseNmtoken __attribute((alias("xmlParseNmtoken__internal_alias")));
+#else
+#ifndef xmlParseNmtoken
+extern __typeof (xmlParseNmtoken) xmlParseNmtoken__internal_alias __attribute((visibility("hidden")));
+#define xmlParseNmtoken xmlParseNmtoken__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseNotationDecl
+extern __typeof (xmlParseNotationDecl) xmlParseNotationDecl __attribute((alias("xmlParseNotationDecl__internal_alias")));
+#else
+#ifndef xmlParseNotationDecl
+extern __typeof (xmlParseNotationDecl) xmlParseNotationDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseNotationDecl xmlParseNotationDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseNotationType
+extern __typeof (xmlParseNotationType) xmlParseNotationType __attribute((alias("xmlParseNotationType__internal_alias")));
+#else
+#ifndef xmlParseNotationType
+extern __typeof (xmlParseNotationType) xmlParseNotationType__internal_alias __attribute((visibility("hidden")));
+#define xmlParseNotationType xmlParseNotationType__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParsePEReference
+extern __typeof (xmlParsePEReference) xmlParsePEReference __attribute((alias("xmlParsePEReference__internal_alias")));
+#else
+#ifndef xmlParsePEReference
+extern __typeof (xmlParsePEReference) xmlParsePEReference__internal_alias __attribute((visibility("hidden")));
+#define xmlParsePEReference xmlParsePEReference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParsePI
+extern __typeof (xmlParsePI) xmlParsePI __attribute((alias("xmlParsePI__internal_alias")));
+#else
+#ifndef xmlParsePI
+extern __typeof (xmlParsePI) xmlParsePI__internal_alias __attribute((visibility("hidden")));
+#define xmlParsePI xmlParsePI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParsePITarget
+extern __typeof (xmlParsePITarget) xmlParsePITarget __attribute((alias("xmlParsePITarget__internal_alias")));
+#else
+#ifndef xmlParsePITarget
+extern __typeof (xmlParsePITarget) xmlParsePITarget__internal_alias __attribute((visibility("hidden")));
+#define xmlParsePITarget xmlParsePITarget__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParsePubidLiteral
+extern __typeof (xmlParsePubidLiteral) xmlParsePubidLiteral __attribute((alias("xmlParsePubidLiteral__internal_alias")));
+#else
+#ifndef xmlParsePubidLiteral
+extern __typeof (xmlParsePubidLiteral) xmlParsePubidLiteral__internal_alias __attribute((visibility("hidden")));
+#define xmlParsePubidLiteral xmlParsePubidLiteral__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlParseQuotedString
+extern __typeof (xmlParseQuotedString) xmlParseQuotedString __attribute((alias("xmlParseQuotedString__internal_alias")));
+#else
+#ifndef xmlParseQuotedString
+extern __typeof (xmlParseQuotedString) xmlParseQuotedString__internal_alias __attribute((visibility("hidden")));
+#define xmlParseQuotedString xmlParseQuotedString__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseReference
+extern __typeof (xmlParseReference) xmlParseReference __attribute((alias("xmlParseReference__internal_alias")));
+#else
+#ifndef xmlParseReference
+extern __typeof (xmlParseReference) xmlParseReference__internal_alias __attribute((visibility("hidden")));
+#define xmlParseReference xmlParseReference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseSDDecl
+extern __typeof (xmlParseSDDecl) xmlParseSDDecl __attribute((alias("xmlParseSDDecl__internal_alias")));
+#else
+#ifndef xmlParseSDDecl
+extern __typeof (xmlParseSDDecl) xmlParseSDDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseSDDecl xmlParseSDDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlParseStartTag
+extern __typeof (xmlParseStartTag) xmlParseStartTag __attribute((alias("xmlParseStartTag__internal_alias")));
+#else
+#ifndef xmlParseStartTag
+extern __typeof (xmlParseStartTag) xmlParseStartTag__internal_alias __attribute((visibility("hidden")));
+#define xmlParseStartTag xmlParseStartTag__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseSystemLiteral
+extern __typeof (xmlParseSystemLiteral) xmlParseSystemLiteral __attribute((alias("xmlParseSystemLiteral__internal_alias")));
+#else
+#ifndef xmlParseSystemLiteral
+extern __typeof (xmlParseSystemLiteral) xmlParseSystemLiteral__internal_alias __attribute((visibility("hidden")));
+#define xmlParseSystemLiteral xmlParseSystemLiteral__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseTextDecl
+extern __typeof (xmlParseTextDecl) xmlParseTextDecl __attribute((alias("xmlParseTextDecl__internal_alias")));
+#else
+#ifndef xmlParseTextDecl
+extern __typeof (xmlParseTextDecl) xmlParseTextDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseTextDecl xmlParseTextDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlParseURI
+extern __typeof (xmlParseURI) xmlParseURI __attribute((alias("xmlParseURI__internal_alias")));
+#else
+#ifndef xmlParseURI
+extern __typeof (xmlParseURI) xmlParseURI__internal_alias __attribute((visibility("hidden")));
+#define xmlParseURI xmlParseURI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlParseURIRaw
+extern __typeof (xmlParseURIRaw) xmlParseURIRaw __attribute((alias("xmlParseURIRaw__internal_alias")));
+#else
+#ifndef xmlParseURIRaw
+extern __typeof (xmlParseURIRaw) xmlParseURIRaw__internal_alias __attribute((visibility("hidden")));
+#define xmlParseURIRaw xmlParseURIRaw__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlParseURIReference
+extern __typeof (xmlParseURIReference) xmlParseURIReference __attribute((alias("xmlParseURIReference__internal_alias")));
+#else
+#ifndef xmlParseURIReference
+extern __typeof (xmlParseURIReference) xmlParseURIReference__internal_alias __attribute((visibility("hidden")));
+#define xmlParseURIReference xmlParseURIReference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseVersionInfo
+extern __typeof (xmlParseVersionInfo) xmlParseVersionInfo __attribute((alias("xmlParseVersionInfo__internal_alias")));
+#else
+#ifndef xmlParseVersionInfo
+extern __typeof (xmlParseVersionInfo) xmlParseVersionInfo__internal_alias __attribute((visibility("hidden")));
+#define xmlParseVersionInfo xmlParseVersionInfo__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseVersionNum
+extern __typeof (xmlParseVersionNum) xmlParseVersionNum __attribute((alias("xmlParseVersionNum__internal_alias")));
+#else
+#ifndef xmlParseVersionNum
+extern __typeof (xmlParseVersionNum) xmlParseVersionNum__internal_alias __attribute((visibility("hidden")));
+#define xmlParseVersionNum xmlParseVersionNum__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParseXMLDecl
+extern __typeof (xmlParseXMLDecl) xmlParseXMLDecl __attribute((alias("xmlParseXMLDecl__internal_alias")));
+#else
+#ifndef xmlParseXMLDecl
+extern __typeof (xmlParseXMLDecl) xmlParseXMLDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlParseXMLDecl xmlParseXMLDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserAddNodeInfo
+extern __typeof (xmlParserAddNodeInfo) xmlParserAddNodeInfo __attribute((alias("xmlParserAddNodeInfo__internal_alias")));
+#else
+#ifndef xmlParserAddNodeInfo
+extern __typeof (xmlParserAddNodeInfo) xmlParserAddNodeInfo__internal_alias __attribute((visibility("hidden")));
+#define xmlParserAddNodeInfo xmlParserAddNodeInfo__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserError
+extern __typeof (xmlParserError) xmlParserError __attribute((alias("xmlParserError__internal_alias")));
+#else
+#ifndef xmlParserError
+extern __typeof (xmlParserError) xmlParserError__internal_alias __attribute((visibility("hidden")));
+#define xmlParserError xmlParserError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserFindNodeInfo
+extern __typeof (xmlParserFindNodeInfo) xmlParserFindNodeInfo __attribute((alias("xmlParserFindNodeInfo__internal_alias")));
+#else
+#ifndef xmlParserFindNodeInfo
+extern __typeof (xmlParserFindNodeInfo) xmlParserFindNodeInfo__internal_alias __attribute((visibility("hidden")));
+#define xmlParserFindNodeInfo xmlParserFindNodeInfo__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserFindNodeInfoIndex
+extern __typeof (xmlParserFindNodeInfoIndex) xmlParserFindNodeInfoIndex __attribute((alias("xmlParserFindNodeInfoIndex__internal_alias")));
+#else
+#ifndef xmlParserFindNodeInfoIndex
+extern __typeof (xmlParserFindNodeInfoIndex) xmlParserFindNodeInfoIndex__internal_alias __attribute((visibility("hidden")));
+#define xmlParserFindNodeInfoIndex xmlParserFindNodeInfoIndex__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserGetDirectory
+extern __typeof (xmlParserGetDirectory) xmlParserGetDirectory __attribute((alias("xmlParserGetDirectory__internal_alias")));
+#else
+#ifndef xmlParserGetDirectory
+extern __typeof (xmlParserGetDirectory) xmlParserGetDirectory__internal_alias __attribute((visibility("hidden")));
+#define xmlParserGetDirectory xmlParserGetDirectory__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlParserHandlePEReference
+extern __typeof (xmlParserHandlePEReference) xmlParserHandlePEReference __attribute((alias("xmlParserHandlePEReference__internal_alias")));
+#else
+#ifndef xmlParserHandlePEReference
+extern __typeof (xmlParserHandlePEReference) xmlParserHandlePEReference__internal_alias __attribute((visibility("hidden")));
+#define xmlParserHandlePEReference xmlParserHandlePEReference__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlParserHandleReference
+extern __typeof (xmlParserHandleReference) xmlParserHandleReference __attribute((alias("xmlParserHandleReference__internal_alias")));
+#else
+#ifndef xmlParserHandleReference
+extern __typeof (xmlParserHandleReference) xmlParserHandleReference__internal_alias __attribute((visibility("hidden")));
+#define xmlParserHandleReference xmlParserHandleReference__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateFd
+extern __typeof (xmlParserInputBufferCreateFd) xmlParserInputBufferCreateFd __attribute((alias("xmlParserInputBufferCreateFd__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateFd
+extern __typeof (xmlParserInputBufferCreateFd) xmlParserInputBufferCreateFd__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateFd xmlParserInputBufferCreateFd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateFile
+extern __typeof (xmlParserInputBufferCreateFile) xmlParserInputBufferCreateFile __attribute((alias("xmlParserInputBufferCreateFile__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateFile
+extern __typeof (xmlParserInputBufferCreateFile) xmlParserInputBufferCreateFile__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateFile xmlParserInputBufferCreateFile__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateFilename
+extern __typeof (xmlParserInputBufferCreateFilename) xmlParserInputBufferCreateFilename __attribute((alias("xmlParserInputBufferCreateFilename__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateFilename
+extern __typeof (xmlParserInputBufferCreateFilename) xmlParserInputBufferCreateFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateFilename xmlParserInputBufferCreateFilename__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateFilenameDefault
+extern __typeof (xmlParserInputBufferCreateFilenameDefault) xmlParserInputBufferCreateFilenameDefault __attribute((alias("xmlParserInputBufferCreateFilenameDefault__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateFilenameDefault
+extern __typeof (xmlParserInputBufferCreateFilenameDefault) xmlParserInputBufferCreateFilenameDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateFilenameDefault xmlParserInputBufferCreateFilenameDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateIO
+extern __typeof (xmlParserInputBufferCreateIO) xmlParserInputBufferCreateIO __attribute((alias("xmlParserInputBufferCreateIO__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateIO
+extern __typeof (xmlParserInputBufferCreateIO) xmlParserInputBufferCreateIO__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateIO xmlParserInputBufferCreateIO__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateMem
+extern __typeof (xmlParserInputBufferCreateMem) xmlParserInputBufferCreateMem __attribute((alias("xmlParserInputBufferCreateMem__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateMem
+extern __typeof (xmlParserInputBufferCreateMem) xmlParserInputBufferCreateMem__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateMem xmlParserInputBufferCreateMem__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferCreateStatic
+extern __typeof (xmlParserInputBufferCreateStatic) xmlParserInputBufferCreateStatic __attribute((alias("xmlParserInputBufferCreateStatic__internal_alias")));
+#else
+#ifndef xmlParserInputBufferCreateStatic
+extern __typeof (xmlParserInputBufferCreateStatic) xmlParserInputBufferCreateStatic__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferCreateStatic xmlParserInputBufferCreateStatic__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferGrow
+extern __typeof (xmlParserInputBufferGrow) xmlParserInputBufferGrow __attribute((alias("xmlParserInputBufferGrow__internal_alias")));
+#else
+#ifndef xmlParserInputBufferGrow
+extern __typeof (xmlParserInputBufferGrow) xmlParserInputBufferGrow__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferGrow xmlParserInputBufferGrow__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferPush
+extern __typeof (xmlParserInputBufferPush) xmlParserInputBufferPush __attribute((alias("xmlParserInputBufferPush__internal_alias")));
+#else
+#ifndef xmlParserInputBufferPush
+extern __typeof (xmlParserInputBufferPush) xmlParserInputBufferPush__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferPush xmlParserInputBufferPush__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlParserInputBufferRead
+extern __typeof (xmlParserInputBufferRead) xmlParserInputBufferRead __attribute((alias("xmlParserInputBufferRead__internal_alias")));
+#else
+#ifndef xmlParserInputBufferRead
+extern __typeof (xmlParserInputBufferRead) xmlParserInputBufferRead__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputBufferRead xmlParserInputBufferRead__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserInputGrow
+extern __typeof (xmlParserInputGrow) xmlParserInputGrow __attribute((alias("xmlParserInputGrow__internal_alias")));
+#else
+#ifndef xmlParserInputGrow
+extern __typeof (xmlParserInputGrow) xmlParserInputGrow__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputGrow xmlParserInputGrow__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserInputRead
+extern __typeof (xmlParserInputRead) xmlParserInputRead __attribute((alias("xmlParserInputRead__internal_alias")));
+#else
+#ifndef xmlParserInputRead
+extern __typeof (xmlParserInputRead) xmlParserInputRead__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputRead xmlParserInputRead__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlParserInputShrink
+extern __typeof (xmlParserInputShrink) xmlParserInputShrink __attribute((alias("xmlParserInputShrink__internal_alias")));
+#else
+#ifndef xmlParserInputShrink
+extern __typeof (xmlParserInputShrink) xmlParserInputShrink__internal_alias __attribute((visibility("hidden")));
+#define xmlParserInputShrink xmlParserInputShrink__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserPrintFileContext
+extern __typeof (xmlParserPrintFileContext) xmlParserPrintFileContext __attribute((alias("xmlParserPrintFileContext__internal_alias")));
+#else
+#ifndef xmlParserPrintFileContext
+extern __typeof (xmlParserPrintFileContext) xmlParserPrintFileContext__internal_alias __attribute((visibility("hidden")));
+#define xmlParserPrintFileContext xmlParserPrintFileContext__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserPrintFileInfo
+extern __typeof (xmlParserPrintFileInfo) xmlParserPrintFileInfo __attribute((alias("xmlParserPrintFileInfo__internal_alias")));
+#else
+#ifndef xmlParserPrintFileInfo
+extern __typeof (xmlParserPrintFileInfo) xmlParserPrintFileInfo__internal_alias __attribute((visibility("hidden")));
+#define xmlParserPrintFileInfo xmlParserPrintFileInfo__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserValidityError
+extern __typeof (xmlParserValidityError) xmlParserValidityError __attribute((alias("xmlParserValidityError__internal_alias")));
+#else
+#ifndef xmlParserValidityError
+extern __typeof (xmlParserValidityError) xmlParserValidityError__internal_alias __attribute((visibility("hidden")));
+#define xmlParserValidityError xmlParserValidityError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserValidityWarning
+extern __typeof (xmlParserValidityWarning) xmlParserValidityWarning __attribute((alias("xmlParserValidityWarning__internal_alias")));
+#else
+#ifndef xmlParserValidityWarning
+extern __typeof (xmlParserValidityWarning) xmlParserValidityWarning__internal_alias __attribute((visibility("hidden")));
+#define xmlParserValidityWarning xmlParserValidityWarning__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlParserWarning
+extern __typeof (xmlParserWarning) xmlParserWarning __attribute((alias("xmlParserWarning__internal_alias")));
+#else
+#ifndef xmlParserWarning
+extern __typeof (xmlParserWarning) xmlParserWarning__internal_alias __attribute((visibility("hidden")));
+#define xmlParserWarning xmlParserWarning__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlPathToURI
+extern __typeof (xmlPathToURI) xmlPathToURI __attribute((alias("xmlPathToURI__internal_alias")));
+#else
+#ifndef xmlPathToURI
+extern __typeof (xmlPathToURI) xmlPathToURI__internal_alias __attribute((visibility("hidden")));
+#define xmlPathToURI xmlPathToURI__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternFromRoot
+extern __typeof (xmlPatternFromRoot) xmlPatternFromRoot __attribute((alias("xmlPatternFromRoot__internal_alias")));
+#else
+#ifndef xmlPatternFromRoot
+extern __typeof (xmlPatternFromRoot) xmlPatternFromRoot__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternFromRoot xmlPatternFromRoot__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternGetStreamCtxt
+extern __typeof (xmlPatternGetStreamCtxt) xmlPatternGetStreamCtxt __attribute((alias("xmlPatternGetStreamCtxt__internal_alias")));
+#else
+#ifndef xmlPatternGetStreamCtxt
+extern __typeof (xmlPatternGetStreamCtxt) xmlPatternGetStreamCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternGetStreamCtxt xmlPatternGetStreamCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternMatch
+extern __typeof (xmlPatternMatch) xmlPatternMatch __attribute((alias("xmlPatternMatch__internal_alias")));
+#else
+#ifndef xmlPatternMatch
+extern __typeof (xmlPatternMatch) xmlPatternMatch__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternMatch xmlPatternMatch__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternMaxDepth
+extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth __attribute((alias("xmlPatternMaxDepth__internal_alias")));
+#else
+#ifndef xmlPatternMaxDepth
+extern __typeof (xmlPatternMaxDepth) xmlPatternMaxDepth__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternMaxDepth xmlPatternMaxDepth__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternMinDepth
+extern __typeof (xmlPatternMinDepth) xmlPatternMinDepth __attribute((alias("xmlPatternMinDepth__internal_alias")));
+#else
+#ifndef xmlPatternMinDepth
+extern __typeof (xmlPatternMinDepth) xmlPatternMinDepth__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternMinDepth xmlPatternMinDepth__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatternStreamable
+extern __typeof (xmlPatternStreamable) xmlPatternStreamable __attribute((alias("xmlPatternStreamable__internal_alias")));
+#else
+#ifndef xmlPatternStreamable
+extern __typeof (xmlPatternStreamable) xmlPatternStreamable__internal_alias __attribute((visibility("hidden")));
+#define xmlPatternStreamable xmlPatternStreamable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlPatterncompile
+extern __typeof (xmlPatterncompile) xmlPatterncompile __attribute((alias("xmlPatterncompile__internal_alias")));
+#else
+#ifndef xmlPatterncompile
+extern __typeof (xmlPatterncompile) xmlPatterncompile__internal_alias __attribute((visibility("hidden")));
+#define xmlPatterncompile xmlPatterncompile__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlPedanticParserDefault
+extern __typeof (xmlPedanticParserDefault) xmlPedanticParserDefault __attribute((alias("xmlPedanticParserDefault__internal_alias")));
+#else
+#ifndef xmlPedanticParserDefault
+extern __typeof (xmlPedanticParserDefault) xmlPedanticParserDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlPedanticParserDefault xmlPedanticParserDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlPopInput
+extern __typeof (xmlPopInput) xmlPopInput __attribute((alias("xmlPopInput__internal_alias")));
+#else
+#ifndef xmlPopInput
+extern __typeof (xmlPopInput) xmlPopInput__internal_alias __attribute((visibility("hidden")));
+#define xmlPopInput xmlPopInput__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlPopInputCallbacks
+extern __typeof (xmlPopInputCallbacks) xmlPopInputCallbacks __attribute((alias("xmlPopInputCallbacks__internal_alias")));
+#else
+#ifndef xmlPopInputCallbacks
+extern __typeof (xmlPopInputCallbacks) xmlPopInputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlPopInputCallbacks xmlPopInputCallbacks__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlPreviousElementSibling
+extern __typeof (xmlPreviousElementSibling) xmlPreviousElementSibling __attribute((alias("xmlPreviousElementSibling__internal_alias")));
+#else
+#ifndef xmlPreviousElementSibling
+extern __typeof (xmlPreviousElementSibling) xmlPreviousElementSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlPreviousElementSibling xmlPreviousElementSibling__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlPrintURI
+extern __typeof (xmlPrintURI) xmlPrintURI __attribute((alias("xmlPrintURI__internal_alias")));
+#else
+#ifndef xmlPrintURI
+extern __typeof (xmlPrintURI) xmlPrintURI__internal_alias __attribute((visibility("hidden")));
+#define xmlPrintURI xmlPrintURI__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlPushInput
+extern __typeof (xmlPushInput) xmlPushInput __attribute((alias("xmlPushInput__internal_alias")));
+#else
+#ifndef xmlPushInput
+extern __typeof (xmlPushInput) xmlPushInput__internal_alias __attribute((visibility("hidden")));
+#define xmlPushInput xmlPushInput__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlRMutexLock
+extern __typeof (xmlRMutexLock) xmlRMutexLock __attribute((alias("xmlRMutexLock__internal_alias")));
+#else
+#ifndef xmlRMutexLock
+extern __typeof (xmlRMutexLock) xmlRMutexLock__internal_alias __attribute((visibility("hidden")));
+#define xmlRMutexLock xmlRMutexLock__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlRMutexUnlock
+extern __typeof (xmlRMutexUnlock) xmlRMutexUnlock __attribute((alias("xmlRMutexUnlock__internal_alias")));
+#else
+#ifndef xmlRMutexUnlock
+extern __typeof (xmlRMutexUnlock) xmlRMutexUnlock__internal_alias __attribute((visibility("hidden")));
+#define xmlRMutexUnlock xmlRMutexUnlock__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlReadDoc
+extern __typeof (xmlReadDoc) xmlReadDoc __attribute((alias("xmlReadDoc__internal_alias")));
+#else
+#ifndef xmlReadDoc
+extern __typeof (xmlReadDoc) xmlReadDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlReadDoc xmlReadDoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlReadFd
+extern __typeof (xmlReadFd) xmlReadFd __attribute((alias("xmlReadFd__internal_alias")));
+#else
+#ifndef xmlReadFd
+extern __typeof (xmlReadFd) xmlReadFd__internal_alias __attribute((visibility("hidden")));
+#define xmlReadFd xmlReadFd__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlReadFile
+extern __typeof (xmlReadFile) xmlReadFile __attribute((alias("xmlReadFile__internal_alias")));
+#else
+#ifndef xmlReadFile
+extern __typeof (xmlReadFile) xmlReadFile__internal_alias __attribute((visibility("hidden")));
+#define xmlReadFile xmlReadFile__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlReadIO
+extern __typeof (xmlReadIO) xmlReadIO __attribute((alias("xmlReadIO__internal_alias")));
+#else
+#ifndef xmlReadIO
+extern __typeof (xmlReadIO) xmlReadIO__internal_alias __attribute((visibility("hidden")));
+#define xmlReadIO xmlReadIO__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlReadMemory
+extern __typeof (xmlReadMemory) xmlReadMemory __attribute((alias("xmlReadMemory__internal_alias")));
+#else
+#ifndef xmlReadMemory
+extern __typeof (xmlReadMemory) xmlReadMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlReadMemory xmlReadMemory__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderForDoc
+extern __typeof (xmlReaderForDoc) xmlReaderForDoc __attribute((alias("xmlReaderForDoc__internal_alias")));
+#else
+#ifndef xmlReaderForDoc
+extern __typeof (xmlReaderForDoc) xmlReaderForDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderForDoc xmlReaderForDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderForFd
+extern __typeof (xmlReaderForFd) xmlReaderForFd __attribute((alias("xmlReaderForFd__internal_alias")));
+#else
+#ifndef xmlReaderForFd
+extern __typeof (xmlReaderForFd) xmlReaderForFd__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderForFd xmlReaderForFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderForFile
+extern __typeof (xmlReaderForFile) xmlReaderForFile __attribute((alias("xmlReaderForFile__internal_alias")));
+#else
+#ifndef xmlReaderForFile
+extern __typeof (xmlReaderForFile) xmlReaderForFile__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderForFile xmlReaderForFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderForIO
+extern __typeof (xmlReaderForIO) xmlReaderForIO __attribute((alias("xmlReaderForIO__internal_alias")));
+#else
+#ifndef xmlReaderForIO
+extern __typeof (xmlReaderForIO) xmlReaderForIO__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderForIO xmlReaderForIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderForMemory
+extern __typeof (xmlReaderForMemory) xmlReaderForMemory __attribute((alias("xmlReaderForMemory__internal_alias")));
+#else
+#ifndef xmlReaderForMemory
+extern __typeof (xmlReaderForMemory) xmlReaderForMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderForMemory xmlReaderForMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewDoc
+extern __typeof (xmlReaderNewDoc) xmlReaderNewDoc __attribute((alias("xmlReaderNewDoc__internal_alias")));
+#else
+#ifndef xmlReaderNewDoc
+extern __typeof (xmlReaderNewDoc) xmlReaderNewDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewDoc xmlReaderNewDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewFd
+extern __typeof (xmlReaderNewFd) xmlReaderNewFd __attribute((alias("xmlReaderNewFd__internal_alias")));
+#else
+#ifndef xmlReaderNewFd
+extern __typeof (xmlReaderNewFd) xmlReaderNewFd__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewFd xmlReaderNewFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewFile
+extern __typeof (xmlReaderNewFile) xmlReaderNewFile __attribute((alias("xmlReaderNewFile__internal_alias")));
+#else
+#ifndef xmlReaderNewFile
+extern __typeof (xmlReaderNewFile) xmlReaderNewFile__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewFile xmlReaderNewFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewIO
+extern __typeof (xmlReaderNewIO) xmlReaderNewIO __attribute((alias("xmlReaderNewIO__internal_alias")));
+#else
+#ifndef xmlReaderNewIO
+extern __typeof (xmlReaderNewIO) xmlReaderNewIO__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewIO xmlReaderNewIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewMemory
+extern __typeof (xmlReaderNewMemory) xmlReaderNewMemory __attribute((alias("xmlReaderNewMemory__internal_alias")));
+#else
+#ifndef xmlReaderNewMemory
+extern __typeof (xmlReaderNewMemory) xmlReaderNewMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewMemory xmlReaderNewMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderNewWalker
+extern __typeof (xmlReaderNewWalker) xmlReaderNewWalker __attribute((alias("xmlReaderNewWalker__internal_alias")));
+#else
+#ifndef xmlReaderNewWalker
+extern __typeof (xmlReaderNewWalker) xmlReaderNewWalker__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderNewWalker xmlReaderNewWalker__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlReaderWalker
+extern __typeof (xmlReaderWalker) xmlReaderWalker __attribute((alias("xmlReaderWalker__internal_alias")));
+#else
+#ifndef xmlReaderWalker
+extern __typeof (xmlReaderWalker) xmlReaderWalker__internal_alias __attribute((visibility("hidden")));
+#define xmlReaderWalker xmlReaderWalker__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlmemory
+#undef xmlReallocLoc
+extern __typeof (xmlReallocLoc) xmlReallocLoc __attribute((alias("xmlReallocLoc__internal_alias")));
+#else
+#ifndef xmlReallocLoc
+extern __typeof (xmlReallocLoc) xmlReallocLoc__internal_alias __attribute((visibility("hidden")));
+#define xmlReallocLoc xmlReallocLoc__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef bottom_tree
+#undef xmlReconciliateNs
+extern __typeof (xmlReconciliateNs) xmlReconciliateNs __attribute((alias("xmlReconciliateNs__internal_alias")));
+#else
+#ifndef xmlReconciliateNs
+extern __typeof (xmlReconciliateNs) xmlReconciliateNs__internal_alias __attribute((visibility("hidden")));
+#define xmlReconciliateNs xmlReconciliateNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlRecoverDoc
+extern __typeof (xmlRecoverDoc) xmlRecoverDoc __attribute((alias("xmlRecoverDoc__internal_alias")));
+#else
+#ifndef xmlRecoverDoc
+extern __typeof (xmlRecoverDoc) xmlRecoverDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlRecoverDoc xmlRecoverDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlRecoverFile
+extern __typeof (xmlRecoverFile) xmlRecoverFile __attribute((alias("xmlRecoverFile__internal_alias")));
+#else
+#ifndef xmlRecoverFile
+extern __typeof (xmlRecoverFile) xmlRecoverFile__internal_alias __attribute((visibility("hidden")));
+#define xmlRecoverFile xmlRecoverFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlRecoverMemory
+extern __typeof (xmlRecoverMemory) xmlRecoverMemory __attribute((alias("xmlRecoverMemory__internal_alias")));
+#else
+#ifndef xmlRecoverMemory
+extern __typeof (xmlRecoverMemory) xmlRecoverMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlRecoverMemory xmlRecoverMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegExecErrInfo
+extern __typeof (xmlRegExecErrInfo) xmlRegExecErrInfo __attribute((alias("xmlRegExecErrInfo__internal_alias")));
+#else
+#ifndef xmlRegExecErrInfo
+extern __typeof (xmlRegExecErrInfo) xmlRegExecErrInfo__internal_alias __attribute((visibility("hidden")));
+#define xmlRegExecErrInfo xmlRegExecErrInfo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegExecNextValues
+extern __typeof (xmlRegExecNextValues) xmlRegExecNextValues __attribute((alias("xmlRegExecNextValues__internal_alias")));
+#else
+#ifndef xmlRegExecNextValues
+extern __typeof (xmlRegExecNextValues) xmlRegExecNextValues__internal_alias __attribute((visibility("hidden")));
+#define xmlRegExecNextValues xmlRegExecNextValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegExecPushString
+extern __typeof (xmlRegExecPushString) xmlRegExecPushString __attribute((alias("xmlRegExecPushString__internal_alias")));
+#else
+#ifndef xmlRegExecPushString
+extern __typeof (xmlRegExecPushString) xmlRegExecPushString__internal_alias __attribute((visibility("hidden")));
+#define xmlRegExecPushString xmlRegExecPushString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegExecPushString2
+extern __typeof (xmlRegExecPushString2) xmlRegExecPushString2 __attribute((alias("xmlRegExecPushString2__internal_alias")));
+#else
+#ifndef xmlRegExecPushString2
+extern __typeof (xmlRegExecPushString2) xmlRegExecPushString2__internal_alias __attribute((visibility("hidden")));
+#define xmlRegExecPushString2 xmlRegExecPushString2__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegFreeExecCtxt
+extern __typeof (xmlRegFreeExecCtxt) xmlRegFreeExecCtxt __attribute((alias("xmlRegFreeExecCtxt__internal_alias")));
+#else
+#ifndef xmlRegFreeExecCtxt
+extern __typeof (xmlRegFreeExecCtxt) xmlRegFreeExecCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRegFreeExecCtxt xmlRegFreeExecCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegFreeRegexp
+extern __typeof (xmlRegFreeRegexp) xmlRegFreeRegexp __attribute((alias("xmlRegFreeRegexp__internal_alias")));
+#else
+#ifndef xmlRegFreeRegexp
+extern __typeof (xmlRegFreeRegexp) xmlRegFreeRegexp__internal_alias __attribute((visibility("hidden")));
+#define xmlRegFreeRegexp xmlRegFreeRegexp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegNewExecCtxt
+extern __typeof (xmlRegNewExecCtxt) xmlRegNewExecCtxt __attribute((alias("xmlRegNewExecCtxt__internal_alias")));
+#else
+#ifndef xmlRegNewExecCtxt
+extern __typeof (xmlRegNewExecCtxt) xmlRegNewExecCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRegNewExecCtxt xmlRegNewExecCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegexpCompile
+extern __typeof (xmlRegexpCompile) xmlRegexpCompile __attribute((alias("xmlRegexpCompile__internal_alias")));
+#else
+#ifndef xmlRegexpCompile
+extern __typeof (xmlRegexpCompile) xmlRegexpCompile__internal_alias __attribute((visibility("hidden")));
+#define xmlRegexpCompile xmlRegexpCompile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegexpExec
+extern __typeof (xmlRegexpExec) xmlRegexpExec __attribute((alias("xmlRegexpExec__internal_alias")));
+#else
+#ifndef xmlRegexpExec
+extern __typeof (xmlRegexpExec) xmlRegexpExec__internal_alias __attribute((visibility("hidden")));
+#define xmlRegexpExec xmlRegexpExec__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegexpIsDeterminist
+extern __typeof (xmlRegexpIsDeterminist) xmlRegexpIsDeterminist __attribute((alias("xmlRegexpIsDeterminist__internal_alias")));
+#else
+#ifndef xmlRegexpIsDeterminist
+extern __typeof (xmlRegexpIsDeterminist) xmlRegexpIsDeterminist__internal_alias __attribute((visibility("hidden")));
+#define xmlRegexpIsDeterminist xmlRegexpIsDeterminist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_xmlregexp
+#undef xmlRegexpPrint
+extern __typeof (xmlRegexpPrint) xmlRegexpPrint __attribute((alias("xmlRegexpPrint__internal_alias")));
+#else
+#ifndef xmlRegexpPrint
+extern __typeof (xmlRegexpPrint) xmlRegexpPrint__internal_alias __attribute((visibility("hidden")));
+#define xmlRegexpPrint xmlRegexpPrint__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_encoding
+#undef xmlRegisterCharEncodingHandler
+extern __typeof (xmlRegisterCharEncodingHandler) xmlRegisterCharEncodingHandler __attribute((alias("xmlRegisterCharEncodingHandler__internal_alias")));
+#else
+#ifndef xmlRegisterCharEncodingHandler
+extern __typeof (xmlRegisterCharEncodingHandler) xmlRegisterCharEncodingHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterCharEncodingHandler xmlRegisterCharEncodingHandler__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlRegisterDefaultInputCallbacks
+extern __typeof (xmlRegisterDefaultInputCallbacks) xmlRegisterDefaultInputCallbacks __attribute((alias("xmlRegisterDefaultInputCallbacks__internal_alias")));
+#else
+#ifndef xmlRegisterDefaultInputCallbacks
+extern __typeof (xmlRegisterDefaultInputCallbacks) xmlRegisterDefaultInputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterDefaultInputCallbacks xmlRegisterDefaultInputCallbacks__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlRegisterDefaultOutputCallbacks
+extern __typeof (xmlRegisterDefaultOutputCallbacks) xmlRegisterDefaultOutputCallbacks __attribute((alias("xmlRegisterDefaultOutputCallbacks__internal_alias")));
+#else
+#ifndef xmlRegisterDefaultOutputCallbacks
+extern __typeof (xmlRegisterDefaultOutputCallbacks) xmlRegisterDefaultOutputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterDefaultOutputCallbacks xmlRegisterDefaultOutputCallbacks__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlRegisterHTTPPostCallbacks
+extern __typeof (xmlRegisterHTTPPostCallbacks) xmlRegisterHTTPPostCallbacks __attribute((alias("xmlRegisterHTTPPostCallbacks__internal_alias")));
+#else
+#ifndef xmlRegisterHTTPPostCallbacks
+extern __typeof (xmlRegisterHTTPPostCallbacks) xmlRegisterHTTPPostCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterHTTPPostCallbacks xmlRegisterHTTPPostCallbacks__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlRegisterInputCallbacks
+extern __typeof (xmlRegisterInputCallbacks) xmlRegisterInputCallbacks __attribute((alias("xmlRegisterInputCallbacks__internal_alias")));
+#else
+#ifndef xmlRegisterInputCallbacks
+extern __typeof (xmlRegisterInputCallbacks) xmlRegisterInputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterInputCallbacks xmlRegisterInputCallbacks__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlRegisterNodeDefault
+extern __typeof (xmlRegisterNodeDefault) xmlRegisterNodeDefault __attribute((alias("xmlRegisterNodeDefault__internal_alias")));
+#else
+#ifndef xmlRegisterNodeDefault
+extern __typeof (xmlRegisterNodeDefault) xmlRegisterNodeDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterNodeDefault xmlRegisterNodeDefault__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlIO
+#undef xmlRegisterOutputCallbacks
+extern __typeof (xmlRegisterOutputCallbacks) xmlRegisterOutputCallbacks __attribute((alias("xmlRegisterOutputCallbacks__internal_alias")));
+#else
+#ifndef xmlRegisterOutputCallbacks
+extern __typeof (xmlRegisterOutputCallbacks) xmlRegisterOutputCallbacks__internal_alias __attribute((visibility("hidden")));
+#define xmlRegisterOutputCallbacks xmlRegisterOutputCallbacks__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGCleanupTypes
+extern __typeof (xmlRelaxNGCleanupTypes) xmlRelaxNGCleanupTypes __attribute((alias("xmlRelaxNGCleanupTypes__internal_alias")));
+#else
+#ifndef xmlRelaxNGCleanupTypes
+extern __typeof (xmlRelaxNGCleanupTypes) xmlRelaxNGCleanupTypes__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGCleanupTypes xmlRelaxNGCleanupTypes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGDump
+extern __typeof (xmlRelaxNGDump) xmlRelaxNGDump __attribute((alias("xmlRelaxNGDump__internal_alias")));
+#else
+#ifndef xmlRelaxNGDump
+extern __typeof (xmlRelaxNGDump) xmlRelaxNGDump__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGDump xmlRelaxNGDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGDumpTree
+extern __typeof (xmlRelaxNGDumpTree) xmlRelaxNGDumpTree __attribute((alias("xmlRelaxNGDumpTree__internal_alias")));
+#else
+#ifndef xmlRelaxNGDumpTree
+extern __typeof (xmlRelaxNGDumpTree) xmlRelaxNGDumpTree__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGDumpTree xmlRelaxNGDumpTree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGFree
+extern __typeof (xmlRelaxNGFree) xmlRelaxNGFree __attribute((alias("xmlRelaxNGFree__internal_alias")));
+#else
+#ifndef xmlRelaxNGFree
+extern __typeof (xmlRelaxNGFree) xmlRelaxNGFree__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGFree xmlRelaxNGFree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGFreeParserCtxt
+extern __typeof (xmlRelaxNGFreeParserCtxt) xmlRelaxNGFreeParserCtxt __attribute((alias("xmlRelaxNGFreeParserCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGFreeParserCtxt
+extern __typeof (xmlRelaxNGFreeParserCtxt) xmlRelaxNGFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGFreeParserCtxt xmlRelaxNGFreeParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGFreeValidCtxt
+extern __typeof (xmlRelaxNGFreeValidCtxt) xmlRelaxNGFreeValidCtxt __attribute((alias("xmlRelaxNGFreeValidCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGFreeValidCtxt
+extern __typeof (xmlRelaxNGFreeValidCtxt) xmlRelaxNGFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGFreeValidCtxt xmlRelaxNGFreeValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGGetParserErrors
+extern __typeof (xmlRelaxNGGetParserErrors) xmlRelaxNGGetParserErrors __attribute((alias("xmlRelaxNGGetParserErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGGetParserErrors
+extern __typeof (xmlRelaxNGGetParserErrors) xmlRelaxNGGetParserErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGGetParserErrors xmlRelaxNGGetParserErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGGetValidErrors
+extern __typeof (xmlRelaxNGGetValidErrors) xmlRelaxNGGetValidErrors __attribute((alias("xmlRelaxNGGetValidErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGGetValidErrors
+extern __typeof (xmlRelaxNGGetValidErrors) xmlRelaxNGGetValidErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGGetValidErrors xmlRelaxNGGetValidErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGInitTypes
+extern __typeof (xmlRelaxNGInitTypes) xmlRelaxNGInitTypes __attribute((alias("xmlRelaxNGInitTypes__internal_alias")));
+#else
+#ifndef xmlRelaxNGInitTypes
+extern __typeof (xmlRelaxNGInitTypes) xmlRelaxNGInitTypes__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGInitTypes xmlRelaxNGInitTypes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGNewDocParserCtxt
+extern __typeof (xmlRelaxNGNewDocParserCtxt) xmlRelaxNGNewDocParserCtxt __attribute((alias("xmlRelaxNGNewDocParserCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGNewDocParserCtxt
+extern __typeof (xmlRelaxNGNewDocParserCtxt) xmlRelaxNGNewDocParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGNewDocParserCtxt xmlRelaxNGNewDocParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGNewMemParserCtxt
+extern __typeof (xmlRelaxNGNewMemParserCtxt) xmlRelaxNGNewMemParserCtxt __attribute((alias("xmlRelaxNGNewMemParserCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGNewMemParserCtxt
+extern __typeof (xmlRelaxNGNewMemParserCtxt) xmlRelaxNGNewMemParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGNewMemParserCtxt xmlRelaxNGNewMemParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGNewParserCtxt
+extern __typeof (xmlRelaxNGNewParserCtxt) xmlRelaxNGNewParserCtxt __attribute((alias("xmlRelaxNGNewParserCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGNewParserCtxt
+extern __typeof (xmlRelaxNGNewParserCtxt) xmlRelaxNGNewParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGNewParserCtxt xmlRelaxNGNewParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGNewValidCtxt
+extern __typeof (xmlRelaxNGNewValidCtxt) xmlRelaxNGNewValidCtxt __attribute((alias("xmlRelaxNGNewValidCtxt__internal_alias")));
+#else
+#ifndef xmlRelaxNGNewValidCtxt
+extern __typeof (xmlRelaxNGNewValidCtxt) xmlRelaxNGNewValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGNewValidCtxt xmlRelaxNGNewValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGParse
+extern __typeof (xmlRelaxNGParse) xmlRelaxNGParse __attribute((alias("xmlRelaxNGParse__internal_alias")));
+#else
+#ifndef xmlRelaxNGParse
+extern __typeof (xmlRelaxNGParse) xmlRelaxNGParse__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGParse xmlRelaxNGParse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGSetParserErrors
+extern __typeof (xmlRelaxNGSetParserErrors) xmlRelaxNGSetParserErrors __attribute((alias("xmlRelaxNGSetParserErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGSetParserErrors
+extern __typeof (xmlRelaxNGSetParserErrors) xmlRelaxNGSetParserErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGSetParserErrors xmlRelaxNGSetParserErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGSetParserStructuredErrors
+extern __typeof (xmlRelaxNGSetParserStructuredErrors) xmlRelaxNGSetParserStructuredErrors __attribute((alias("xmlRelaxNGSetParserStructuredErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGSetParserStructuredErrors
+extern __typeof (xmlRelaxNGSetParserStructuredErrors) xmlRelaxNGSetParserStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGSetParserStructuredErrors xmlRelaxNGSetParserStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGSetValidErrors
+extern __typeof (xmlRelaxNGSetValidErrors) xmlRelaxNGSetValidErrors __attribute((alias("xmlRelaxNGSetValidErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGSetValidErrors
+extern __typeof (xmlRelaxNGSetValidErrors) xmlRelaxNGSetValidErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGSetValidErrors xmlRelaxNGSetValidErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGSetValidStructuredErrors
+extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors __attribute((alias("xmlRelaxNGSetValidStructuredErrors__internal_alias")));
+#else
+#ifndef xmlRelaxNGSetValidStructuredErrors
+extern __typeof (xmlRelaxNGSetValidStructuredErrors) xmlRelaxNGSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGSetValidStructuredErrors xmlRelaxNGSetValidStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGValidateDoc
+extern __typeof (xmlRelaxNGValidateDoc) xmlRelaxNGValidateDoc __attribute((alias("xmlRelaxNGValidateDoc__internal_alias")));
+#else
+#ifndef xmlRelaxNGValidateDoc
+extern __typeof (xmlRelaxNGValidateDoc) xmlRelaxNGValidateDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGValidateDoc xmlRelaxNGValidateDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGValidateFullElement
+extern __typeof (xmlRelaxNGValidateFullElement) xmlRelaxNGValidateFullElement __attribute((alias("xmlRelaxNGValidateFullElement__internal_alias")));
+#else
+#ifndef xmlRelaxNGValidateFullElement
+extern __typeof (xmlRelaxNGValidateFullElement) xmlRelaxNGValidateFullElement__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGValidateFullElement xmlRelaxNGValidateFullElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGValidatePopElement
+extern __typeof (xmlRelaxNGValidatePopElement) xmlRelaxNGValidatePopElement __attribute((alias("xmlRelaxNGValidatePopElement__internal_alias")));
+#else
+#ifndef xmlRelaxNGValidatePopElement
+extern __typeof (xmlRelaxNGValidatePopElement) xmlRelaxNGValidatePopElement__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGValidatePopElement xmlRelaxNGValidatePopElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGValidatePushCData
+extern __typeof (xmlRelaxNGValidatePushCData) xmlRelaxNGValidatePushCData __attribute((alias("xmlRelaxNGValidatePushCData__internal_alias")));
+#else
+#ifndef xmlRelaxNGValidatePushCData
+extern __typeof (xmlRelaxNGValidatePushCData) xmlRelaxNGValidatePushCData__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGValidatePushCData xmlRelaxNGValidatePushCData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxNGValidatePushElement
+extern __typeof (xmlRelaxNGValidatePushElement) xmlRelaxNGValidatePushElement __attribute((alias("xmlRelaxNGValidatePushElement__internal_alias")));
+#else
+#ifndef xmlRelaxNGValidatePushElement
+extern __typeof (xmlRelaxNGValidatePushElement) xmlRelaxNGValidatePushElement__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxNGValidatePushElement xmlRelaxNGValidatePushElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_relaxng
+#undef xmlRelaxParserSetFlag
+extern __typeof (xmlRelaxParserSetFlag) xmlRelaxParserSetFlag __attribute((alias("xmlRelaxParserSetFlag__internal_alias")));
+#else
+#ifndef xmlRelaxParserSetFlag
+extern __typeof (xmlRelaxParserSetFlag) xmlRelaxParserSetFlag__internal_alias __attribute((visibility("hidden")));
+#define xmlRelaxParserSetFlag xmlRelaxParserSetFlag__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlRemoveID
+extern __typeof (xmlRemoveID) xmlRemoveID __attribute((alias("xmlRemoveID__internal_alias")));
+#else
+#ifndef xmlRemoveID
+extern __typeof (xmlRemoveID) xmlRemoveID__internal_alias __attribute((visibility("hidden")));
+#define xmlRemoveID xmlRemoveID__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlRemoveProp
+extern __typeof (xmlRemoveProp) xmlRemoveProp __attribute((alias("xmlRemoveProp__internal_alias")));
+#else
+#ifndef xmlRemoveProp
+extern __typeof (xmlRemoveProp) xmlRemoveProp__internal_alias __attribute((visibility("hidden")));
+#define xmlRemoveProp xmlRemoveProp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlRemoveRef
+extern __typeof (xmlRemoveRef) xmlRemoveRef __attribute((alias("xmlRemoveRef__internal_alias")));
+#else
+#ifndef xmlRemoveRef
+extern __typeof (xmlRemoveRef) xmlRemoveRef__internal_alias __attribute((visibility("hidden")));
+#define xmlRemoveRef xmlRemoveRef__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_tree
+#undef xmlReplaceNode
+extern __typeof (xmlReplaceNode) xmlReplaceNode __attribute((alias("xmlReplaceNode__internal_alias")));
+#else
+#ifndef xmlReplaceNode
+extern __typeof (xmlReplaceNode) xmlReplaceNode__internal_alias __attribute((visibility("hidden")));
+#define xmlReplaceNode xmlReplaceNode__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlResetError
+extern __typeof (xmlResetError) xmlResetError __attribute((alias("xmlResetError__internal_alias")));
+#else
+#ifndef xmlResetError
+extern __typeof (xmlResetError) xmlResetError__internal_alias __attribute((visibility("hidden")));
+#define xmlResetError xmlResetError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlResetLastError
+extern __typeof (xmlResetLastError) xmlResetLastError __attribute((alias("xmlResetLastError__internal_alias")));
+#else
+#ifndef xmlResetLastError
+extern __typeof (xmlResetLastError) xmlResetLastError__internal_alias __attribute((visibility("hidden")));
+#define xmlResetLastError xmlResetLastError__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2AttributeDecl
+extern __typeof (xmlSAX2AttributeDecl) xmlSAX2AttributeDecl __attribute((alias("xmlSAX2AttributeDecl__internal_alias")));
+#else
+#ifndef xmlSAX2AttributeDecl
+extern __typeof (xmlSAX2AttributeDecl) xmlSAX2AttributeDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2AttributeDecl xmlSAX2AttributeDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2CDataBlock
+extern __typeof (xmlSAX2CDataBlock) xmlSAX2CDataBlock __attribute((alias("xmlSAX2CDataBlock__internal_alias")));
+#else
+#ifndef xmlSAX2CDataBlock
+extern __typeof (xmlSAX2CDataBlock) xmlSAX2CDataBlock__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2CDataBlock xmlSAX2CDataBlock__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2Characters
+extern __typeof (xmlSAX2Characters) xmlSAX2Characters __attribute((alias("xmlSAX2Characters__internal_alias")));
+#else
+#ifndef xmlSAX2Characters
+extern __typeof (xmlSAX2Characters) xmlSAX2Characters__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2Characters xmlSAX2Characters__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2Comment
+extern __typeof (xmlSAX2Comment) xmlSAX2Comment __attribute((alias("xmlSAX2Comment__internal_alias")));
+#else
+#ifndef xmlSAX2Comment
+extern __typeof (xmlSAX2Comment) xmlSAX2Comment__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2Comment xmlSAX2Comment__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2ElementDecl
+extern __typeof (xmlSAX2ElementDecl) xmlSAX2ElementDecl __attribute((alias("xmlSAX2ElementDecl__internal_alias")));
+#else
+#ifndef xmlSAX2ElementDecl
+extern __typeof (xmlSAX2ElementDecl) xmlSAX2ElementDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2ElementDecl xmlSAX2ElementDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2EndDocument
+extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument __attribute((alias("xmlSAX2EndDocument__internal_alias")));
+#else
+#ifndef xmlSAX2EndDocument
+extern __typeof (xmlSAX2EndDocument) xmlSAX2EndDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2EndDocument xmlSAX2EndDocument__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_SAX2
+#undef xmlSAX2EndElement
+extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement __attribute((alias("xmlSAX2EndElement__internal_alias")));
+#else
+#ifndef xmlSAX2EndElement
+extern __typeof (xmlSAX2EndElement) xmlSAX2EndElement__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2EndElement xmlSAX2EndElement__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2EndElementNs
+extern __typeof (xmlSAX2EndElementNs) xmlSAX2EndElementNs __attribute((alias("xmlSAX2EndElementNs__internal_alias")));
+#else
+#ifndef xmlSAX2EndElementNs
+extern __typeof (xmlSAX2EndElementNs) xmlSAX2EndElementNs__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2EndElementNs xmlSAX2EndElementNs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2EntityDecl
+extern __typeof (xmlSAX2EntityDecl) xmlSAX2EntityDecl __attribute((alias("xmlSAX2EntityDecl__internal_alias")));
+#else
+#ifndef xmlSAX2EntityDecl
+extern __typeof (xmlSAX2EntityDecl) xmlSAX2EntityDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2EntityDecl xmlSAX2EntityDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2ExternalSubset
+extern __typeof (xmlSAX2ExternalSubset) xmlSAX2ExternalSubset __attribute((alias("xmlSAX2ExternalSubset__internal_alias")));
+#else
+#ifndef xmlSAX2ExternalSubset
+extern __typeof (xmlSAX2ExternalSubset) xmlSAX2ExternalSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2ExternalSubset xmlSAX2ExternalSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetColumnNumber
+extern __typeof (xmlSAX2GetColumnNumber) xmlSAX2GetColumnNumber __attribute((alias("xmlSAX2GetColumnNumber__internal_alias")));
+#else
+#ifndef xmlSAX2GetColumnNumber
+extern __typeof (xmlSAX2GetColumnNumber) xmlSAX2GetColumnNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetColumnNumber xmlSAX2GetColumnNumber__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetEntity
+extern __typeof (xmlSAX2GetEntity) xmlSAX2GetEntity __attribute((alias("xmlSAX2GetEntity__internal_alias")));
+#else
+#ifndef xmlSAX2GetEntity
+extern __typeof (xmlSAX2GetEntity) xmlSAX2GetEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetEntity xmlSAX2GetEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetLineNumber
+extern __typeof (xmlSAX2GetLineNumber) xmlSAX2GetLineNumber __attribute((alias("xmlSAX2GetLineNumber__internal_alias")));
+#else
+#ifndef xmlSAX2GetLineNumber
+extern __typeof (xmlSAX2GetLineNumber) xmlSAX2GetLineNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetLineNumber xmlSAX2GetLineNumber__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetParameterEntity
+extern __typeof (xmlSAX2GetParameterEntity) xmlSAX2GetParameterEntity __attribute((alias("xmlSAX2GetParameterEntity__internal_alias")));
+#else
+#ifndef xmlSAX2GetParameterEntity
+extern __typeof (xmlSAX2GetParameterEntity) xmlSAX2GetParameterEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetParameterEntity xmlSAX2GetParameterEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetPublicId
+extern __typeof (xmlSAX2GetPublicId) xmlSAX2GetPublicId __attribute((alias("xmlSAX2GetPublicId__internal_alias")));
+#else
+#ifndef xmlSAX2GetPublicId
+extern __typeof (xmlSAX2GetPublicId) xmlSAX2GetPublicId__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetPublicId xmlSAX2GetPublicId__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2GetSystemId
+extern __typeof (xmlSAX2GetSystemId) xmlSAX2GetSystemId __attribute((alias("xmlSAX2GetSystemId__internal_alias")));
+#else
+#ifndef xmlSAX2GetSystemId
+extern __typeof (xmlSAX2GetSystemId) xmlSAX2GetSystemId__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2GetSystemId xmlSAX2GetSystemId__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2HasExternalSubset
+extern __typeof (xmlSAX2HasExternalSubset) xmlSAX2HasExternalSubset __attribute((alias("xmlSAX2HasExternalSubset__internal_alias")));
+#else
+#ifndef xmlSAX2HasExternalSubset
+extern __typeof (xmlSAX2HasExternalSubset) xmlSAX2HasExternalSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2HasExternalSubset xmlSAX2HasExternalSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2HasInternalSubset
+extern __typeof (xmlSAX2HasInternalSubset) xmlSAX2HasInternalSubset __attribute((alias("xmlSAX2HasInternalSubset__internal_alias")));
+#else
+#ifndef xmlSAX2HasInternalSubset
+extern __typeof (xmlSAX2HasInternalSubset) xmlSAX2HasInternalSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2HasInternalSubset xmlSAX2HasInternalSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2IgnorableWhitespace
+extern __typeof (xmlSAX2IgnorableWhitespace) xmlSAX2IgnorableWhitespace __attribute((alias("xmlSAX2IgnorableWhitespace__internal_alias")));
+#else
+#ifndef xmlSAX2IgnorableWhitespace
+extern __typeof (xmlSAX2IgnorableWhitespace) xmlSAX2IgnorableWhitespace__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2IgnorableWhitespace xmlSAX2IgnorableWhitespace__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2InitDefaultSAXHandler
+extern __typeof (xmlSAX2InitDefaultSAXHandler) xmlSAX2InitDefaultSAXHandler __attribute((alias("xmlSAX2InitDefaultSAXHandler__internal_alias")));
+#else
+#ifndef xmlSAX2InitDefaultSAXHandler
+extern __typeof (xmlSAX2InitDefaultSAXHandler) xmlSAX2InitDefaultSAXHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2InitDefaultSAXHandler xmlSAX2InitDefaultSAXHandler__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_DOCB_ENABLED)
+#ifdef bottom_SAX2
+#undef xmlSAX2InitDocbDefaultSAXHandler
+extern __typeof (xmlSAX2InitDocbDefaultSAXHandler) xmlSAX2InitDocbDefaultSAXHandler __attribute((alias("xmlSAX2InitDocbDefaultSAXHandler__internal_alias")));
+#else
+#ifndef xmlSAX2InitDocbDefaultSAXHandler
+extern __typeof (xmlSAX2InitDocbDefaultSAXHandler) xmlSAX2InitDocbDefaultSAXHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2InitDocbDefaultSAXHandler xmlSAX2InitDocbDefaultSAXHandler__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_SAX2
+#undef xmlSAX2InitHtmlDefaultSAXHandler
+extern __typeof (xmlSAX2InitHtmlDefaultSAXHandler) xmlSAX2InitHtmlDefaultSAXHandler __attribute((alias("xmlSAX2InitHtmlDefaultSAXHandler__internal_alias")));
+#else
+#ifndef xmlSAX2InitHtmlDefaultSAXHandler
+extern __typeof (xmlSAX2InitHtmlDefaultSAXHandler) xmlSAX2InitHtmlDefaultSAXHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2InitHtmlDefaultSAXHandler xmlSAX2InitHtmlDefaultSAXHandler__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2InternalSubset
+extern __typeof (xmlSAX2InternalSubset) xmlSAX2InternalSubset __attribute((alias("xmlSAX2InternalSubset__internal_alias")));
+#else
+#ifndef xmlSAX2InternalSubset
+extern __typeof (xmlSAX2InternalSubset) xmlSAX2InternalSubset__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2InternalSubset xmlSAX2InternalSubset__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2IsStandalone
+extern __typeof (xmlSAX2IsStandalone) xmlSAX2IsStandalone __attribute((alias("xmlSAX2IsStandalone__internal_alias")));
+#else
+#ifndef xmlSAX2IsStandalone
+extern __typeof (xmlSAX2IsStandalone) xmlSAX2IsStandalone__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2IsStandalone xmlSAX2IsStandalone__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2NotationDecl
+extern __typeof (xmlSAX2NotationDecl) xmlSAX2NotationDecl __attribute((alias("xmlSAX2NotationDecl__internal_alias")));
+#else
+#ifndef xmlSAX2NotationDecl
+extern __typeof (xmlSAX2NotationDecl) xmlSAX2NotationDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2NotationDecl xmlSAX2NotationDecl__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2ProcessingInstruction
+extern __typeof (xmlSAX2ProcessingInstruction) xmlSAX2ProcessingInstruction __attribute((alias("xmlSAX2ProcessingInstruction__internal_alias")));
+#else
+#ifndef xmlSAX2ProcessingInstruction
+extern __typeof (xmlSAX2ProcessingInstruction) xmlSAX2ProcessingInstruction__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2ProcessingInstruction xmlSAX2ProcessingInstruction__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2Reference
+extern __typeof (xmlSAX2Reference) xmlSAX2Reference __attribute((alias("xmlSAX2Reference__internal_alias")));
+#else
+#ifndef xmlSAX2Reference
+extern __typeof (xmlSAX2Reference) xmlSAX2Reference__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2Reference xmlSAX2Reference__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2ResolveEntity
+extern __typeof (xmlSAX2ResolveEntity) xmlSAX2ResolveEntity __attribute((alias("xmlSAX2ResolveEntity__internal_alias")));
+#else
+#ifndef xmlSAX2ResolveEntity
+extern __typeof (xmlSAX2ResolveEntity) xmlSAX2ResolveEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2ResolveEntity xmlSAX2ResolveEntity__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2SetDocumentLocator
+extern __typeof (xmlSAX2SetDocumentLocator) xmlSAX2SetDocumentLocator __attribute((alias("xmlSAX2SetDocumentLocator__internal_alias")));
+#else
+#ifndef xmlSAX2SetDocumentLocator
+extern __typeof (xmlSAX2SetDocumentLocator) xmlSAX2SetDocumentLocator__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2SetDocumentLocator xmlSAX2SetDocumentLocator__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2StartDocument
+extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument __attribute((alias("xmlSAX2StartDocument__internal_alias")));
+#else
+#ifndef xmlSAX2StartDocument
+extern __typeof (xmlSAX2StartDocument) xmlSAX2StartDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2StartDocument xmlSAX2StartDocument__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_SAX2
+#undef xmlSAX2StartElement
+extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement __attribute((alias("xmlSAX2StartElement__internal_alias")));
+#else
+#ifndef xmlSAX2StartElement
+extern __typeof (xmlSAX2StartElement) xmlSAX2StartElement__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2StartElement xmlSAX2StartElement__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2StartElementNs
+extern __typeof (xmlSAX2StartElementNs) xmlSAX2StartElementNs __attribute((alias("xmlSAX2StartElementNs__internal_alias")));
+#else
+#ifndef xmlSAX2StartElementNs
+extern __typeof (xmlSAX2StartElementNs) xmlSAX2StartElementNs__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2StartElementNs xmlSAX2StartElementNs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAX2UnparsedEntityDecl
+extern __typeof (xmlSAX2UnparsedEntityDecl) xmlSAX2UnparsedEntityDecl __attribute((alias("xmlSAX2UnparsedEntityDecl__internal_alias")));
+#else
+#ifndef xmlSAX2UnparsedEntityDecl
+extern __typeof (xmlSAX2UnparsedEntityDecl) xmlSAX2UnparsedEntityDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlSAX2UnparsedEntityDecl xmlSAX2UnparsedEntityDecl__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_SAX2
+#undef xmlSAXDefaultVersion
+extern __typeof (xmlSAXDefaultVersion) xmlSAXDefaultVersion __attribute((alias("xmlSAXDefaultVersion__internal_alias")));
+#else
+#ifndef xmlSAXDefaultVersion
+extern __typeof (xmlSAXDefaultVersion) xmlSAXDefaultVersion__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXDefaultVersion xmlSAXDefaultVersion__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseDTD
+extern __typeof (xmlSAXParseDTD) xmlSAXParseDTD __attribute((alias("xmlSAXParseDTD__internal_alias")));
+#else
+#ifndef xmlSAXParseDTD
+extern __typeof (xmlSAXParseDTD) xmlSAXParseDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseDTD xmlSAXParseDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseDoc
+extern __typeof (xmlSAXParseDoc) xmlSAXParseDoc __attribute((alias("xmlSAXParseDoc__internal_alias")));
+#else
+#ifndef xmlSAXParseDoc
+extern __typeof (xmlSAXParseDoc) xmlSAXParseDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseDoc xmlSAXParseDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseEntity
+extern __typeof (xmlSAXParseEntity) xmlSAXParseEntity __attribute((alias("xmlSAXParseEntity__internal_alias")));
+#else
+#ifndef xmlSAXParseEntity
+extern __typeof (xmlSAXParseEntity) xmlSAXParseEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseEntity xmlSAXParseEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseFile
+extern __typeof (xmlSAXParseFile) xmlSAXParseFile __attribute((alias("xmlSAXParseFile__internal_alias")));
+#else
+#ifndef xmlSAXParseFile
+extern __typeof (xmlSAXParseFile) xmlSAXParseFile__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseFile xmlSAXParseFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseFileWithData
+extern __typeof (xmlSAXParseFileWithData) xmlSAXParseFileWithData __attribute((alias("xmlSAXParseFileWithData__internal_alias")));
+#else
+#ifndef xmlSAXParseFileWithData
+extern __typeof (xmlSAXParseFileWithData) xmlSAXParseFileWithData__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseFileWithData xmlSAXParseFileWithData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseMemory
+extern __typeof (xmlSAXParseMemory) xmlSAXParseMemory __attribute((alias("xmlSAXParseMemory__internal_alias")));
+#else
+#ifndef xmlSAXParseMemory
+extern __typeof (xmlSAXParseMemory) xmlSAXParseMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseMemory xmlSAXParseMemory__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXParseMemoryWithData
+extern __typeof (xmlSAXParseMemoryWithData) xmlSAXParseMemoryWithData __attribute((alias("xmlSAXParseMemoryWithData__internal_alias")));
+#else
+#ifndef xmlSAXParseMemoryWithData
+extern __typeof (xmlSAXParseMemoryWithData) xmlSAXParseMemoryWithData__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXParseMemoryWithData xmlSAXParseMemoryWithData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXUserParseFile
+extern __typeof (xmlSAXUserParseFile) xmlSAXUserParseFile __attribute((alias("xmlSAXUserParseFile__internal_alias")));
+#else
+#ifndef xmlSAXUserParseFile
+extern __typeof (xmlSAXUserParseFile) xmlSAXUserParseFile__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXUserParseFile xmlSAXUserParseFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSAXUserParseMemory
+extern __typeof (xmlSAXUserParseMemory) xmlSAXUserParseMemory __attribute((alias("xmlSAXUserParseMemory__internal_alias")));
+#else
+#ifndef xmlSAXUserParseMemory
+extern __typeof (xmlSAXUserParseMemory) xmlSAXUserParseMemory__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXUserParseMemory xmlSAXUserParseMemory__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_SAX2
+#undef xmlSAXVersion
+extern __typeof (xmlSAXVersion) xmlSAXVersion __attribute((alias("xmlSAXVersion__internal_alias")));
+#else
+#ifndef xmlSAXVersion
+extern __typeof (xmlSAXVersion) xmlSAXVersion__internal_alias __attribute((visibility("hidden")));
+#define xmlSAXVersion xmlSAXVersion__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveClose
+extern __typeof (xmlSaveClose) xmlSaveClose __attribute((alias("xmlSaveClose__internal_alias")));
+#else
+#ifndef xmlSaveClose
+extern __typeof (xmlSaveClose) xmlSaveClose__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveClose xmlSaveClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveDoc
+extern __typeof (xmlSaveDoc) xmlSaveDoc __attribute((alias("xmlSaveDoc__internal_alias")));
+#else
+#ifndef xmlSaveDoc
+extern __typeof (xmlSaveDoc) xmlSaveDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveDoc xmlSaveDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFile
+extern __typeof (xmlSaveFile) xmlSaveFile __attribute((alias("xmlSaveFile__internal_alias")));
+#else
+#ifndef xmlSaveFile
+extern __typeof (xmlSaveFile) xmlSaveFile__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFile xmlSaveFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFileEnc
+extern __typeof (xmlSaveFileEnc) xmlSaveFileEnc __attribute((alias("xmlSaveFileEnc__internal_alias")));
+#else
+#ifndef xmlSaveFileEnc
+extern __typeof (xmlSaveFileEnc) xmlSaveFileEnc__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFileEnc xmlSaveFileEnc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFileTo
+extern __typeof (xmlSaveFileTo) xmlSaveFileTo __attribute((alias("xmlSaveFileTo__internal_alias")));
+#else
+#ifndef xmlSaveFileTo
+extern __typeof (xmlSaveFileTo) xmlSaveFileTo__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFileTo xmlSaveFileTo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFlush
+extern __typeof (xmlSaveFlush) xmlSaveFlush __attribute((alias("xmlSaveFlush__internal_alias")));
+#else
+#ifndef xmlSaveFlush
+extern __typeof (xmlSaveFlush) xmlSaveFlush__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFlush xmlSaveFlush__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFormatFile
+extern __typeof (xmlSaveFormatFile) xmlSaveFormatFile __attribute((alias("xmlSaveFormatFile__internal_alias")));
+#else
+#ifndef xmlSaveFormatFile
+extern __typeof (xmlSaveFormatFile) xmlSaveFormatFile__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFormatFile xmlSaveFormatFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFormatFileEnc
+extern __typeof (xmlSaveFormatFileEnc) xmlSaveFormatFileEnc __attribute((alias("xmlSaveFormatFileEnc__internal_alias")));
+#else
+#ifndef xmlSaveFormatFileEnc
+extern __typeof (xmlSaveFormatFileEnc) xmlSaveFormatFileEnc__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFormatFileEnc xmlSaveFormatFileEnc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveFormatFileTo
+extern __typeof (xmlSaveFormatFileTo) xmlSaveFormatFileTo __attribute((alias("xmlSaveFormatFileTo__internal_alias")));
+#else
+#ifndef xmlSaveFormatFileTo
+extern __typeof (xmlSaveFormatFileTo) xmlSaveFormatFileTo__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveFormatFileTo xmlSaveFormatFileTo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveSetAttrEscape
+extern __typeof (xmlSaveSetAttrEscape) xmlSaveSetAttrEscape __attribute((alias("xmlSaveSetAttrEscape__internal_alias")));
+#else
+#ifndef xmlSaveSetAttrEscape
+extern __typeof (xmlSaveSetAttrEscape) xmlSaveSetAttrEscape__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveSetAttrEscape xmlSaveSetAttrEscape__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveSetEscape
+extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape __attribute((alias("xmlSaveSetEscape__internal_alias")));
+#else
+#ifndef xmlSaveSetEscape
+extern __typeof (xmlSaveSetEscape) xmlSaveSetEscape__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveSetEscape xmlSaveSetEscape__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveToBuffer
+extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer __attribute((alias("xmlSaveToBuffer__internal_alias")));
+#else
+#ifndef xmlSaveToBuffer
+extern __typeof (xmlSaveToBuffer) xmlSaveToBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveToBuffer xmlSaveToBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveToFd
+extern __typeof (xmlSaveToFd) xmlSaveToFd __attribute((alias("xmlSaveToFd__internal_alias")));
+#else
+#ifndef xmlSaveToFd
+extern __typeof (xmlSaveToFd) xmlSaveToFd__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveToFd xmlSaveToFd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveToFilename
+extern __typeof (xmlSaveToFilename) xmlSaveToFilename __attribute((alias("xmlSaveToFilename__internal_alias")));
+#else
+#ifndef xmlSaveToFilename
+extern __typeof (xmlSaveToFilename) xmlSaveToFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveToFilename xmlSaveToFilename__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveToIO
+extern __typeof (xmlSaveToIO) xmlSaveToIO __attribute((alias("xmlSaveToIO__internal_alias")));
+#else
+#ifndef xmlSaveToIO
+extern __typeof (xmlSaveToIO) xmlSaveToIO__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveToIO xmlSaveToIO__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlsave
+#undef xmlSaveTree
+extern __typeof (xmlSaveTree) xmlSaveTree __attribute((alias("xmlSaveTree__internal_alias")));
+#else
+#ifndef xmlSaveTree
+extern __typeof (xmlSaveTree) xmlSaveTree__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveTree xmlSaveTree__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlSaveUri
+extern __typeof (xmlSaveUri) xmlSaveUri __attribute((alias("xmlSaveUri__internal_alias")));
+#else
+#ifndef xmlSaveUri
+extern __typeof (xmlSaveUri) xmlSaveUri__internal_alias __attribute((visibility("hidden")));
+#define xmlSaveUri xmlSaveUri__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlScanName
+extern __typeof (xmlScanName) xmlScanName __attribute((alias("xmlScanName__internal_alias")));
+#else
+#ifndef xmlScanName
+extern __typeof (xmlScanName) xmlScanName__internal_alias __attribute((visibility("hidden")));
+#define xmlScanName xmlScanName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaCheckFacet
+extern __typeof (xmlSchemaCheckFacet) xmlSchemaCheckFacet __attribute((alias("xmlSchemaCheckFacet__internal_alias")));
+#else
+#ifndef xmlSchemaCheckFacet
+extern __typeof (xmlSchemaCheckFacet) xmlSchemaCheckFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCheckFacet xmlSchemaCheckFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaCleanupTypes
+extern __typeof (xmlSchemaCleanupTypes) xmlSchemaCleanupTypes __attribute((alias("xmlSchemaCleanupTypes__internal_alias")));
+#else
+#ifndef xmlSchemaCleanupTypes
+extern __typeof (xmlSchemaCleanupTypes) xmlSchemaCleanupTypes__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCleanupTypes xmlSchemaCleanupTypes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaCollapseString
+extern __typeof (xmlSchemaCollapseString) xmlSchemaCollapseString __attribute((alias("xmlSchemaCollapseString__internal_alias")));
+#else
+#ifndef xmlSchemaCollapseString
+extern __typeof (xmlSchemaCollapseString) xmlSchemaCollapseString__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCollapseString xmlSchemaCollapseString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaCompareValues
+extern __typeof (xmlSchemaCompareValues) xmlSchemaCompareValues __attribute((alias("xmlSchemaCompareValues__internal_alias")));
+#else
+#ifndef xmlSchemaCompareValues
+extern __typeof (xmlSchemaCompareValues) xmlSchemaCompareValues__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCompareValues xmlSchemaCompareValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaCompareValuesWhtsp
+extern __typeof (xmlSchemaCompareValuesWhtsp) xmlSchemaCompareValuesWhtsp __attribute((alias("xmlSchemaCompareValuesWhtsp__internal_alias")));
+#else
+#ifndef xmlSchemaCompareValuesWhtsp
+extern __typeof (xmlSchemaCompareValuesWhtsp) xmlSchemaCompareValuesWhtsp__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCompareValuesWhtsp xmlSchemaCompareValuesWhtsp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaCopyValue
+extern __typeof (xmlSchemaCopyValue) xmlSchemaCopyValue __attribute((alias("xmlSchemaCopyValue__internal_alias")));
+#else
+#ifndef xmlSchemaCopyValue
+extern __typeof (xmlSchemaCopyValue) xmlSchemaCopyValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaCopyValue xmlSchemaCopyValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaDump
+extern __typeof (xmlSchemaDump) xmlSchemaDump __attribute((alias("xmlSchemaDump__internal_alias")));
+#else
+#ifndef xmlSchemaDump
+extern __typeof (xmlSchemaDump) xmlSchemaDump__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaDump xmlSchemaDump__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFree
+extern __typeof (xmlSchemaFree) xmlSchemaFree __attribute((alias("xmlSchemaFree__internal_alias")));
+#else
+#ifndef xmlSchemaFree
+extern __typeof (xmlSchemaFree) xmlSchemaFree__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFree xmlSchemaFree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFreeFacet
+extern __typeof (xmlSchemaFreeFacet) xmlSchemaFreeFacet __attribute((alias("xmlSchemaFreeFacet__internal_alias")));
+#else
+#ifndef xmlSchemaFreeFacet
+extern __typeof (xmlSchemaFreeFacet) xmlSchemaFreeFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeFacet xmlSchemaFreeFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFreeParserCtxt
+extern __typeof (xmlSchemaFreeParserCtxt) xmlSchemaFreeParserCtxt __attribute((alias("xmlSchemaFreeParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaFreeParserCtxt
+extern __typeof (xmlSchemaFreeParserCtxt) xmlSchemaFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeParserCtxt xmlSchemaFreeParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFreeType
+extern __typeof (xmlSchemaFreeType) xmlSchemaFreeType __attribute((alias("xmlSchemaFreeType__internal_alias")));
+#else
+#ifndef xmlSchemaFreeType
+extern __typeof (xmlSchemaFreeType) xmlSchemaFreeType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeType xmlSchemaFreeType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFreeValidCtxt
+extern __typeof (xmlSchemaFreeValidCtxt) xmlSchemaFreeValidCtxt __attribute((alias("xmlSchemaFreeValidCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaFreeValidCtxt
+extern __typeof (xmlSchemaFreeValidCtxt) xmlSchemaFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeValidCtxt xmlSchemaFreeValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaFreeValue
+extern __typeof (xmlSchemaFreeValue) xmlSchemaFreeValue __attribute((alias("xmlSchemaFreeValue__internal_alias")));
+#else
+#ifndef xmlSchemaFreeValue
+extern __typeof (xmlSchemaFreeValue) xmlSchemaFreeValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeValue xmlSchemaFreeValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaFreeWildcard
+extern __typeof (xmlSchemaFreeWildcard) xmlSchemaFreeWildcard __attribute((alias("xmlSchemaFreeWildcard__internal_alias")));
+#else
+#ifndef xmlSchemaFreeWildcard
+extern __typeof (xmlSchemaFreeWildcard) xmlSchemaFreeWildcard__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaFreeWildcard xmlSchemaFreeWildcard__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetBuiltInListSimpleTypeItemType
+extern __typeof (xmlSchemaGetBuiltInListSimpleTypeItemType) xmlSchemaGetBuiltInListSimpleTypeItemType __attribute((alias("xmlSchemaGetBuiltInListSimpleTypeItemType__internal_alias")));
+#else
+#ifndef xmlSchemaGetBuiltInListSimpleTypeItemType
+extern __typeof (xmlSchemaGetBuiltInListSimpleTypeItemType) xmlSchemaGetBuiltInListSimpleTypeItemType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetBuiltInListSimpleTypeItemType xmlSchemaGetBuiltInListSimpleTypeItemType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetBuiltInType
+extern __typeof (xmlSchemaGetBuiltInType) xmlSchemaGetBuiltInType __attribute((alias("xmlSchemaGetBuiltInType__internal_alias")));
+#else
+#ifndef xmlSchemaGetBuiltInType
+extern __typeof (xmlSchemaGetBuiltInType) xmlSchemaGetBuiltInType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetBuiltInType xmlSchemaGetBuiltInType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetCanonValue
+extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue __attribute((alias("xmlSchemaGetCanonValue__internal_alias")));
+#else
+#ifndef xmlSchemaGetCanonValue
+extern __typeof (xmlSchemaGetCanonValue) xmlSchemaGetCanonValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetCanonValue xmlSchemaGetCanonValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetCanonValueWhtsp
+extern __typeof (xmlSchemaGetCanonValueWhtsp) xmlSchemaGetCanonValueWhtsp __attribute((alias("xmlSchemaGetCanonValueWhtsp__internal_alias")));
+#else
+#ifndef xmlSchemaGetCanonValueWhtsp
+extern __typeof (xmlSchemaGetCanonValueWhtsp) xmlSchemaGetCanonValueWhtsp__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetCanonValueWhtsp xmlSchemaGetCanonValueWhtsp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetFacetValueAsULong
+extern __typeof (xmlSchemaGetFacetValueAsULong) xmlSchemaGetFacetValueAsULong __attribute((alias("xmlSchemaGetFacetValueAsULong__internal_alias")));
+#else
+#ifndef xmlSchemaGetFacetValueAsULong
+extern __typeof (xmlSchemaGetFacetValueAsULong) xmlSchemaGetFacetValueAsULong__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetFacetValueAsULong xmlSchemaGetFacetValueAsULong__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaGetParserErrors
+extern __typeof (xmlSchemaGetParserErrors) xmlSchemaGetParserErrors __attribute((alias("xmlSchemaGetParserErrors__internal_alias")));
+#else
+#ifndef xmlSchemaGetParserErrors
+extern __typeof (xmlSchemaGetParserErrors) xmlSchemaGetParserErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetParserErrors xmlSchemaGetParserErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetPredefinedType
+extern __typeof (xmlSchemaGetPredefinedType) xmlSchemaGetPredefinedType __attribute((alias("xmlSchemaGetPredefinedType__internal_alias")));
+#else
+#ifndef xmlSchemaGetPredefinedType
+extern __typeof (xmlSchemaGetPredefinedType) xmlSchemaGetPredefinedType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetPredefinedType xmlSchemaGetPredefinedType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaGetValType
+extern __typeof (xmlSchemaGetValType) xmlSchemaGetValType __attribute((alias("xmlSchemaGetValType__internal_alias")));
+#else
+#ifndef xmlSchemaGetValType
+extern __typeof (xmlSchemaGetValType) xmlSchemaGetValType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetValType xmlSchemaGetValType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaGetValidErrors
+extern __typeof (xmlSchemaGetValidErrors) xmlSchemaGetValidErrors __attribute((alias("xmlSchemaGetValidErrors__internal_alias")));
+#else
+#ifndef xmlSchemaGetValidErrors
+extern __typeof (xmlSchemaGetValidErrors) xmlSchemaGetValidErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaGetValidErrors xmlSchemaGetValidErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaInitTypes
+extern __typeof (xmlSchemaInitTypes) xmlSchemaInitTypes __attribute((alias("xmlSchemaInitTypes__internal_alias")));
+#else
+#ifndef xmlSchemaInitTypes
+extern __typeof (xmlSchemaInitTypes) xmlSchemaInitTypes__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaInitTypes xmlSchemaInitTypes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaIsBuiltInTypeFacet
+extern __typeof (xmlSchemaIsBuiltInTypeFacet) xmlSchemaIsBuiltInTypeFacet __attribute((alias("xmlSchemaIsBuiltInTypeFacet__internal_alias")));
+#else
+#ifndef xmlSchemaIsBuiltInTypeFacet
+extern __typeof (xmlSchemaIsBuiltInTypeFacet) xmlSchemaIsBuiltInTypeFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaIsBuiltInTypeFacet xmlSchemaIsBuiltInTypeFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaIsValid
+extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid __attribute((alias("xmlSchemaIsValid__internal_alias")));
+#else
+#ifndef xmlSchemaIsValid
+extern __typeof (xmlSchemaIsValid) xmlSchemaIsValid__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaIsValid xmlSchemaIsValid__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaNewDocParserCtxt
+extern __typeof (xmlSchemaNewDocParserCtxt) xmlSchemaNewDocParserCtxt __attribute((alias("xmlSchemaNewDocParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaNewDocParserCtxt
+extern __typeof (xmlSchemaNewDocParserCtxt) xmlSchemaNewDocParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewDocParserCtxt xmlSchemaNewDocParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaNewFacet
+extern __typeof (xmlSchemaNewFacet) xmlSchemaNewFacet __attribute((alias("xmlSchemaNewFacet__internal_alias")));
+#else
+#ifndef xmlSchemaNewFacet
+extern __typeof (xmlSchemaNewFacet) xmlSchemaNewFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewFacet xmlSchemaNewFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaNewMemParserCtxt
+extern __typeof (xmlSchemaNewMemParserCtxt) xmlSchemaNewMemParserCtxt __attribute((alias("xmlSchemaNewMemParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaNewMemParserCtxt
+extern __typeof (xmlSchemaNewMemParserCtxt) xmlSchemaNewMemParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewMemParserCtxt xmlSchemaNewMemParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaNewNOTATIONValue
+extern __typeof (xmlSchemaNewNOTATIONValue) xmlSchemaNewNOTATIONValue __attribute((alias("xmlSchemaNewNOTATIONValue__internal_alias")));
+#else
+#ifndef xmlSchemaNewNOTATIONValue
+extern __typeof (xmlSchemaNewNOTATIONValue) xmlSchemaNewNOTATIONValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewNOTATIONValue xmlSchemaNewNOTATIONValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaNewParserCtxt
+extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt __attribute((alias("xmlSchemaNewParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaNewParserCtxt
+extern __typeof (xmlSchemaNewParserCtxt) xmlSchemaNewParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewParserCtxt xmlSchemaNewParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaNewQNameValue
+extern __typeof (xmlSchemaNewQNameValue) xmlSchemaNewQNameValue __attribute((alias("xmlSchemaNewQNameValue__internal_alias")));
+#else
+#ifndef xmlSchemaNewQNameValue
+extern __typeof (xmlSchemaNewQNameValue) xmlSchemaNewQNameValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewQNameValue xmlSchemaNewQNameValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaNewStringValue
+extern __typeof (xmlSchemaNewStringValue) xmlSchemaNewStringValue __attribute((alias("xmlSchemaNewStringValue__internal_alias")));
+#else
+#ifndef xmlSchemaNewStringValue
+extern __typeof (xmlSchemaNewStringValue) xmlSchemaNewStringValue__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewStringValue xmlSchemaNewStringValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaNewValidCtxt
+extern __typeof (xmlSchemaNewValidCtxt) xmlSchemaNewValidCtxt __attribute((alias("xmlSchemaNewValidCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaNewValidCtxt
+extern __typeof (xmlSchemaNewValidCtxt) xmlSchemaNewValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaNewValidCtxt xmlSchemaNewValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaParse
+extern __typeof (xmlSchemaParse) xmlSchemaParse __attribute((alias("xmlSchemaParse__internal_alias")));
+#else
+#ifndef xmlSchemaParse
+extern __typeof (xmlSchemaParse) xmlSchemaParse__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaParse xmlSchemaParse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSAXPlug
+extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug __attribute((alias("xmlSchemaSAXPlug__internal_alias")));
+#else
+#ifndef xmlSchemaSAXPlug
+extern __typeof (xmlSchemaSAXPlug) xmlSchemaSAXPlug__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSAXPlug xmlSchemaSAXPlug__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSAXUnplug
+extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug __attribute((alias("xmlSchemaSAXUnplug__internal_alias")));
+#else
+#ifndef xmlSchemaSAXUnplug
+extern __typeof (xmlSchemaSAXUnplug) xmlSchemaSAXUnplug__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSAXUnplug xmlSchemaSAXUnplug__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSetParserErrors
+extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors __attribute((alias("xmlSchemaSetParserErrors__internal_alias")));
+#else
+#ifndef xmlSchemaSetParserErrors
+extern __typeof (xmlSchemaSetParserErrors) xmlSchemaSetParserErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetParserErrors xmlSchemaSetParserErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSetParserStructuredErrors
+extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors __attribute((alias("xmlSchemaSetParserStructuredErrors__internal_alias")));
+#else
+#ifndef xmlSchemaSetParserStructuredErrors
+extern __typeof (xmlSchemaSetParserStructuredErrors) xmlSchemaSetParserStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetParserStructuredErrors xmlSchemaSetParserStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSetValidErrors
+extern __typeof (xmlSchemaSetValidErrors) xmlSchemaSetValidErrors __attribute((alias("xmlSchemaSetValidErrors__internal_alias")));
+#else
+#ifndef xmlSchemaSetValidErrors
+extern __typeof (xmlSchemaSetValidErrors) xmlSchemaSetValidErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetValidErrors xmlSchemaSetValidErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSetValidOptions
+extern __typeof (xmlSchemaSetValidOptions) xmlSchemaSetValidOptions __attribute((alias("xmlSchemaSetValidOptions__internal_alias")));
+#else
+#ifndef xmlSchemaSetValidOptions
+extern __typeof (xmlSchemaSetValidOptions) xmlSchemaSetValidOptions__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetValidOptions xmlSchemaSetValidOptions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaSetValidStructuredErrors
+extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors __attribute((alias("xmlSchemaSetValidStructuredErrors__internal_alias")));
+#else
+#ifndef xmlSchemaSetValidStructuredErrors
+extern __typeof (xmlSchemaSetValidStructuredErrors) xmlSchemaSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaSetValidStructuredErrors xmlSchemaSetValidStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValPredefTypeNode
+extern __typeof (xmlSchemaValPredefTypeNode) xmlSchemaValPredefTypeNode __attribute((alias("xmlSchemaValPredefTypeNode__internal_alias")));
+#else
+#ifndef xmlSchemaValPredefTypeNode
+extern __typeof (xmlSchemaValPredefTypeNode) xmlSchemaValPredefTypeNode__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValPredefTypeNode xmlSchemaValPredefTypeNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValPredefTypeNodeNoNorm
+extern __typeof (xmlSchemaValPredefTypeNodeNoNorm) xmlSchemaValPredefTypeNodeNoNorm __attribute((alias("xmlSchemaValPredefTypeNodeNoNorm__internal_alias")));
+#else
+#ifndef xmlSchemaValPredefTypeNodeNoNorm
+extern __typeof (xmlSchemaValPredefTypeNodeNoNorm) xmlSchemaValPredefTypeNodeNoNorm__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValPredefTypeNodeNoNorm xmlSchemaValPredefTypeNodeNoNorm__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidCtxtGetOptions
+extern __typeof (xmlSchemaValidCtxtGetOptions) xmlSchemaValidCtxtGetOptions __attribute((alias("xmlSchemaValidCtxtGetOptions__internal_alias")));
+#else
+#ifndef xmlSchemaValidCtxtGetOptions
+extern __typeof (xmlSchemaValidCtxtGetOptions) xmlSchemaValidCtxtGetOptions__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidCtxtGetOptions xmlSchemaValidCtxtGetOptions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidCtxtGetParserCtxt
+extern __typeof (xmlSchemaValidCtxtGetParserCtxt) xmlSchemaValidCtxtGetParserCtxt __attribute((alias("xmlSchemaValidCtxtGetParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchemaValidCtxtGetParserCtxt
+extern __typeof (xmlSchemaValidCtxtGetParserCtxt) xmlSchemaValidCtxtGetParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidCtxtGetParserCtxt xmlSchemaValidCtxtGetParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateDoc
+extern __typeof (xmlSchemaValidateDoc) xmlSchemaValidateDoc __attribute((alias("xmlSchemaValidateDoc__internal_alias")));
+#else
+#ifndef xmlSchemaValidateDoc
+extern __typeof (xmlSchemaValidateDoc) xmlSchemaValidateDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateDoc xmlSchemaValidateDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidateFacet
+extern __typeof (xmlSchemaValidateFacet) xmlSchemaValidateFacet __attribute((alias("xmlSchemaValidateFacet__internal_alias")));
+#else
+#ifndef xmlSchemaValidateFacet
+extern __typeof (xmlSchemaValidateFacet) xmlSchemaValidateFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateFacet xmlSchemaValidateFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidateFacetWhtsp
+extern __typeof (xmlSchemaValidateFacetWhtsp) xmlSchemaValidateFacetWhtsp __attribute((alias("xmlSchemaValidateFacetWhtsp__internal_alias")));
+#else
+#ifndef xmlSchemaValidateFacetWhtsp
+extern __typeof (xmlSchemaValidateFacetWhtsp) xmlSchemaValidateFacetWhtsp__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateFacetWhtsp xmlSchemaValidateFacetWhtsp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateFile
+extern __typeof (xmlSchemaValidateFile) xmlSchemaValidateFile __attribute((alias("xmlSchemaValidateFile__internal_alias")));
+#else
+#ifndef xmlSchemaValidateFile
+extern __typeof (xmlSchemaValidateFile) xmlSchemaValidateFile__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateFile xmlSchemaValidateFile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidateLengthFacet
+extern __typeof (xmlSchemaValidateLengthFacet) xmlSchemaValidateLengthFacet __attribute((alias("xmlSchemaValidateLengthFacet__internal_alias")));
+#else
+#ifndef xmlSchemaValidateLengthFacet
+extern __typeof (xmlSchemaValidateLengthFacet) xmlSchemaValidateLengthFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateLengthFacet xmlSchemaValidateLengthFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidateLengthFacetWhtsp
+extern __typeof (xmlSchemaValidateLengthFacetWhtsp) xmlSchemaValidateLengthFacetWhtsp __attribute((alias("xmlSchemaValidateLengthFacetWhtsp__internal_alias")));
+#else
+#ifndef xmlSchemaValidateLengthFacetWhtsp
+extern __typeof (xmlSchemaValidateLengthFacetWhtsp) xmlSchemaValidateLengthFacetWhtsp__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateLengthFacetWhtsp xmlSchemaValidateLengthFacetWhtsp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidateListSimpleTypeFacet
+extern __typeof (xmlSchemaValidateListSimpleTypeFacet) xmlSchemaValidateListSimpleTypeFacet __attribute((alias("xmlSchemaValidateListSimpleTypeFacet__internal_alias")));
+#else
+#ifndef xmlSchemaValidateListSimpleTypeFacet
+extern __typeof (xmlSchemaValidateListSimpleTypeFacet) xmlSchemaValidateListSimpleTypeFacet__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateListSimpleTypeFacet xmlSchemaValidateListSimpleTypeFacet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateOneElement
+extern __typeof (xmlSchemaValidateOneElement) xmlSchemaValidateOneElement __attribute((alias("xmlSchemaValidateOneElement__internal_alias")));
+#else
+#ifndef xmlSchemaValidateOneElement
+extern __typeof (xmlSchemaValidateOneElement) xmlSchemaValidateOneElement__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateOneElement xmlSchemaValidateOneElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValidatePredefinedType
+extern __typeof (xmlSchemaValidatePredefinedType) xmlSchemaValidatePredefinedType __attribute((alias("xmlSchemaValidatePredefinedType__internal_alias")));
+#else
+#ifndef xmlSchemaValidatePredefinedType
+extern __typeof (xmlSchemaValidatePredefinedType) xmlSchemaValidatePredefinedType__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidatePredefinedType xmlSchemaValidatePredefinedType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateSetFilename
+extern __typeof (xmlSchemaValidateSetFilename) xmlSchemaValidateSetFilename __attribute((alias("xmlSchemaValidateSetFilename__internal_alias")));
+#else
+#ifndef xmlSchemaValidateSetFilename
+extern __typeof (xmlSchemaValidateSetFilename) xmlSchemaValidateSetFilename__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateSetFilename xmlSchemaValidateSetFilename__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateSetLocator
+extern __typeof (xmlSchemaValidateSetLocator) xmlSchemaValidateSetLocator __attribute((alias("xmlSchemaValidateSetLocator__internal_alias")));
+#else
+#ifndef xmlSchemaValidateSetLocator
+extern __typeof (xmlSchemaValidateSetLocator) xmlSchemaValidateSetLocator__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateSetLocator xmlSchemaValidateSetLocator__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemas
+#undef xmlSchemaValidateStream
+extern __typeof (xmlSchemaValidateStream) xmlSchemaValidateStream __attribute((alias("xmlSchemaValidateStream__internal_alias")));
+#else
+#ifndef xmlSchemaValidateStream
+extern __typeof (xmlSchemaValidateStream) xmlSchemaValidateStream__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValidateStream xmlSchemaValidateStream__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValueAppend
+extern __typeof (xmlSchemaValueAppend) xmlSchemaValueAppend __attribute((alias("xmlSchemaValueAppend__internal_alias")));
+#else
+#ifndef xmlSchemaValueAppend
+extern __typeof (xmlSchemaValueAppend) xmlSchemaValueAppend__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValueAppend xmlSchemaValueAppend__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValueGetAsBoolean
+extern __typeof (xmlSchemaValueGetAsBoolean) xmlSchemaValueGetAsBoolean __attribute((alias("xmlSchemaValueGetAsBoolean__internal_alias")));
+#else
+#ifndef xmlSchemaValueGetAsBoolean
+extern __typeof (xmlSchemaValueGetAsBoolean) xmlSchemaValueGetAsBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValueGetAsBoolean xmlSchemaValueGetAsBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValueGetAsString
+extern __typeof (xmlSchemaValueGetAsString) xmlSchemaValueGetAsString __attribute((alias("xmlSchemaValueGetAsString__internal_alias")));
+#else
+#ifndef xmlSchemaValueGetAsString
+extern __typeof (xmlSchemaValueGetAsString) xmlSchemaValueGetAsString__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValueGetAsString xmlSchemaValueGetAsString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaValueGetNext
+extern __typeof (xmlSchemaValueGetNext) xmlSchemaValueGetNext __attribute((alias("xmlSchemaValueGetNext__internal_alias")));
+#else
+#ifndef xmlSchemaValueGetNext
+extern __typeof (xmlSchemaValueGetNext) xmlSchemaValueGetNext__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaValueGetNext xmlSchemaValueGetNext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlschemastypes
+#undef xmlSchemaWhiteSpaceReplace
+extern __typeof (xmlSchemaWhiteSpaceReplace) xmlSchemaWhiteSpaceReplace __attribute((alias("xmlSchemaWhiteSpaceReplace__internal_alias")));
+#else
+#ifndef xmlSchemaWhiteSpaceReplace
+extern __typeof (xmlSchemaWhiteSpaceReplace) xmlSchemaWhiteSpaceReplace__internal_alias __attribute((visibility("hidden")));
+#define xmlSchemaWhiteSpaceReplace xmlSchemaWhiteSpaceReplace__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronFree
+extern __typeof (xmlSchematronFree) xmlSchematronFree __attribute((alias("xmlSchematronFree__internal_alias")));
+#else
+#ifndef xmlSchematronFree
+extern __typeof (xmlSchematronFree) xmlSchematronFree__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronFree xmlSchematronFree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronFreeParserCtxt
+extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt __attribute((alias("xmlSchematronFreeParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronFreeParserCtxt
+extern __typeof (xmlSchematronFreeParserCtxt) xmlSchematronFreeParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronFreeParserCtxt xmlSchematronFreeParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronFreeValidCtxt
+extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt __attribute((alias("xmlSchematronFreeValidCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronFreeValidCtxt
+extern __typeof (xmlSchematronFreeValidCtxt) xmlSchematronFreeValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronFreeValidCtxt xmlSchematronFreeValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronNewDocParserCtxt
+extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt __attribute((alias("xmlSchematronNewDocParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronNewDocParserCtxt
+extern __typeof (xmlSchematronNewDocParserCtxt) xmlSchematronNewDocParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronNewDocParserCtxt xmlSchematronNewDocParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronNewMemParserCtxt
+extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt __attribute((alias("xmlSchematronNewMemParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronNewMemParserCtxt
+extern __typeof (xmlSchematronNewMemParserCtxt) xmlSchematronNewMemParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronNewMemParserCtxt xmlSchematronNewMemParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronNewParserCtxt
+extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt __attribute((alias("xmlSchematronNewParserCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronNewParserCtxt
+extern __typeof (xmlSchematronNewParserCtxt) xmlSchematronNewParserCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronNewParserCtxt xmlSchematronNewParserCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronNewValidCtxt
+extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt __attribute((alias("xmlSchematronNewValidCtxt__internal_alias")));
+#else
+#ifndef xmlSchematronNewValidCtxt
+extern __typeof (xmlSchematronNewValidCtxt) xmlSchematronNewValidCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronNewValidCtxt xmlSchematronNewValidCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronParse
+extern __typeof (xmlSchematronParse) xmlSchematronParse __attribute((alias("xmlSchematronParse__internal_alias")));
+#else
+#ifndef xmlSchematronParse
+extern __typeof (xmlSchematronParse) xmlSchematronParse__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronParse xmlSchematronParse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronSetValidStructuredErrors
+extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors __attribute((alias("xmlSchematronSetValidStructuredErrors__internal_alias")));
+#else
+#ifndef xmlSchematronSetValidStructuredErrors
+extern __typeof (xmlSchematronSetValidStructuredErrors) xmlSchematronSetValidStructuredErrors__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronSetValidStructuredErrors xmlSchematronSetValidStructuredErrors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+#ifdef bottom_schematron
+#undef xmlSchematronValidateDoc
+extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc __attribute((alias("xmlSchematronValidateDoc__internal_alias")));
+#else
+#ifndef xmlSchematronValidateDoc
+extern __typeof (xmlSchematronValidateDoc) xmlSchematronValidateDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSchematronValidateDoc xmlSchematronValidateDoc__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSearchNs
+extern __typeof (xmlSearchNs) xmlSearchNs __attribute((alias("xmlSearchNs__internal_alias")));
+#else
+#ifndef xmlSearchNs
+extern __typeof (xmlSearchNs) xmlSearchNs__internal_alias __attribute((visibility("hidden")));
+#define xmlSearchNs xmlSearchNs__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSearchNsByHref
+extern __typeof (xmlSearchNsByHref) xmlSearchNsByHref __attribute((alias("xmlSearchNsByHref__internal_alias")));
+#else
+#ifndef xmlSearchNsByHref
+extern __typeof (xmlSearchNsByHref) xmlSearchNsByHref__internal_alias __attribute((visibility("hidden")));
+#define xmlSearchNsByHref xmlSearchNsByHref__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetBufferAllocationScheme
+extern __typeof (xmlSetBufferAllocationScheme) xmlSetBufferAllocationScheme __attribute((alias("xmlSetBufferAllocationScheme__internal_alias")));
+#else
+#ifndef xmlSetBufferAllocationScheme
+extern __typeof (xmlSetBufferAllocationScheme) xmlSetBufferAllocationScheme__internal_alias __attribute((visibility("hidden")));
+#define xmlSetBufferAllocationScheme xmlSetBufferAllocationScheme__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetCompressMode
+extern __typeof (xmlSetCompressMode) xmlSetCompressMode __attribute((alias("xmlSetCompressMode__internal_alias")));
+#else
+#ifndef xmlSetCompressMode
+extern __typeof (xmlSetCompressMode) xmlSetCompressMode__internal_alias __attribute((visibility("hidden")));
+#define xmlSetCompressMode xmlSetCompressMode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetDocCompressMode
+extern __typeof (xmlSetDocCompressMode) xmlSetDocCompressMode __attribute((alias("xmlSetDocCompressMode__internal_alias")));
+#else
+#ifndef xmlSetDocCompressMode
+extern __typeof (xmlSetDocCompressMode) xmlSetDocCompressMode__internal_alias __attribute((visibility("hidden")));
+#define xmlSetDocCompressMode xmlSetDocCompressMode__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_parser
+#undef xmlSetEntityReferenceFunc
+extern __typeof (xmlSetEntityReferenceFunc) xmlSetEntityReferenceFunc __attribute((alias("xmlSetEntityReferenceFunc__internal_alias")));
+#else
+#ifndef xmlSetEntityReferenceFunc
+extern __typeof (xmlSetEntityReferenceFunc) xmlSetEntityReferenceFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlSetEntityReferenceFunc xmlSetEntityReferenceFunc__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_xmlIO
+#undef xmlSetExternalEntityLoader
+extern __typeof (xmlSetExternalEntityLoader) xmlSetExternalEntityLoader __attribute((alias("xmlSetExternalEntityLoader__internal_alias")));
+#else
+#ifndef xmlSetExternalEntityLoader
+extern __typeof (xmlSetExternalEntityLoader) xmlSetExternalEntityLoader__internal_alias __attribute((visibility("hidden")));
+#define xmlSetExternalEntityLoader xmlSetExternalEntityLoader__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_legacy
+#undef xmlSetFeature
+extern __typeof (xmlSetFeature) xmlSetFeature __attribute((alias("xmlSetFeature__internal_alias")));
+#else
+#ifndef xmlSetFeature
+extern __typeof (xmlSetFeature) xmlSetFeature__internal_alias __attribute((visibility("hidden")));
+#define xmlSetFeature xmlSetFeature__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlSetGenericErrorFunc
+extern __typeof (xmlSetGenericErrorFunc) xmlSetGenericErrorFunc __attribute((alias("xmlSetGenericErrorFunc__internal_alias")));
+#else
+#ifndef xmlSetGenericErrorFunc
+extern __typeof (xmlSetGenericErrorFunc) xmlSetGenericErrorFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlSetGenericErrorFunc xmlSetGenericErrorFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetListDoc
+extern __typeof (xmlSetListDoc) xmlSetListDoc __attribute((alias("xmlSetListDoc__internal_alias")));
+#else
+#ifndef xmlSetListDoc
+extern __typeof (xmlSetListDoc) xmlSetListDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSetListDoc xmlSetListDoc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetNs
+extern __typeof (xmlSetNs) xmlSetNs __attribute((alias("xmlSetNs__internal_alias")));
+#else
+#ifndef xmlSetNs
+extern __typeof (xmlSetNs) xmlSetNs__internal_alias __attribute((visibility("hidden")));
+#define xmlSetNs xmlSetNs__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_tree
+#undef xmlSetNsProp
+extern __typeof (xmlSetNsProp) xmlSetNsProp __attribute((alias("xmlSetNsProp__internal_alias")));
+#else
+#ifndef xmlSetNsProp
+extern __typeof (xmlSetNsProp) xmlSetNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlSetNsProp xmlSetNsProp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+#ifdef bottom_tree
+#undef xmlSetProp
+extern __typeof (xmlSetProp) xmlSetProp __attribute((alias("xmlSetProp__internal_alias")));
+#else
+#ifndef xmlSetProp
+extern __typeof (xmlSetProp) xmlSetProp__internal_alias __attribute((visibility("hidden")));
+#define xmlSetProp xmlSetProp__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_error
+#undef xmlSetStructuredErrorFunc
+extern __typeof (xmlSetStructuredErrorFunc) xmlSetStructuredErrorFunc __attribute((alias("xmlSetStructuredErrorFunc__internal_alias")));
+#else
+#ifndef xmlSetStructuredErrorFunc
+extern __typeof (xmlSetStructuredErrorFunc) xmlSetStructuredErrorFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlSetStructuredErrorFunc xmlSetStructuredErrorFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSetTreeDoc
+extern __typeof (xmlSetTreeDoc) xmlSetTreeDoc __attribute((alias("xmlSetTreeDoc__internal_alias")));
+#else
+#ifndef xmlSetTreeDoc
+extern __typeof (xmlSetTreeDoc) xmlSetTreeDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlSetTreeDoc xmlSetTreeDoc__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef bottom_parser
+#undef xmlSetupParserForBuffer
+extern __typeof (xmlSetupParserForBuffer) xmlSetupParserForBuffer __attribute((alias("xmlSetupParserForBuffer__internal_alias")));
+#else
+#ifndef xmlSetupParserForBuffer
+extern __typeof (xmlSetupParserForBuffer) xmlSetupParserForBuffer__internal_alias __attribute((visibility("hidden")));
+#define xmlSetupParserForBuffer xmlSetupParserForBuffer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShell
+extern __typeof (xmlShell) xmlShell __attribute((alias("xmlShell__internal_alias")));
+#else
+#ifndef xmlShell
+extern __typeof (xmlShell) xmlShell__internal_alias __attribute((visibility("hidden")));
+#define xmlShell xmlShell__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellBase
+extern __typeof (xmlShellBase) xmlShellBase __attribute((alias("xmlShellBase__internal_alias")));
+#else
+#ifndef xmlShellBase
+extern __typeof (xmlShellBase) xmlShellBase__internal_alias __attribute((visibility("hidden")));
+#define xmlShellBase xmlShellBase__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellCat
+extern __typeof (xmlShellCat) xmlShellCat __attribute((alias("xmlShellCat__internal_alias")));
+#else
+#ifndef xmlShellCat
+extern __typeof (xmlShellCat) xmlShellCat__internal_alias __attribute((visibility("hidden")));
+#define xmlShellCat xmlShellCat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellDir
+extern __typeof (xmlShellDir) xmlShellDir __attribute((alias("xmlShellDir__internal_alias")));
+#else
+#ifndef xmlShellDir
+extern __typeof (xmlShellDir) xmlShellDir__internal_alias __attribute((visibility("hidden")));
+#define xmlShellDir xmlShellDir__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellDu
+extern __typeof (xmlShellDu) xmlShellDu __attribute((alias("xmlShellDu__internal_alias")));
+#else
+#ifndef xmlShellDu
+extern __typeof (xmlShellDu) xmlShellDu__internal_alias __attribute((visibility("hidden")));
+#define xmlShellDu xmlShellDu__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellList
+extern __typeof (xmlShellList) xmlShellList __attribute((alias("xmlShellList__internal_alias")));
+#else
+#ifndef xmlShellList
+extern __typeof (xmlShellList) xmlShellList__internal_alias __attribute((visibility("hidden")));
+#define xmlShellList xmlShellList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellLoad
+extern __typeof (xmlShellLoad) xmlShellLoad __attribute((alias("xmlShellLoad__internal_alias")));
+#else
+#ifndef xmlShellLoad
+extern __typeof (xmlShellLoad) xmlShellLoad__internal_alias __attribute((visibility("hidden")));
+#define xmlShellLoad xmlShellLoad__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellPrintNode
+extern __typeof (xmlShellPrintNode) xmlShellPrintNode __attribute((alias("xmlShellPrintNode__internal_alias")));
+#else
+#ifndef xmlShellPrintNode
+extern __typeof (xmlShellPrintNode) xmlShellPrintNode__internal_alias __attribute((visibility("hidden")));
+#define xmlShellPrintNode xmlShellPrintNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellPrintXPathError
+extern __typeof (xmlShellPrintXPathError) xmlShellPrintXPathError __attribute((alias("xmlShellPrintXPathError__internal_alias")));
+#else
+#ifndef xmlShellPrintXPathError
+extern __typeof (xmlShellPrintXPathError) xmlShellPrintXPathError__internal_alias __attribute((visibility("hidden")));
+#define xmlShellPrintXPathError xmlShellPrintXPathError__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellPrintXPathResult
+extern __typeof (xmlShellPrintXPathResult) xmlShellPrintXPathResult __attribute((alias("xmlShellPrintXPathResult__internal_alias")));
+#else
+#ifndef xmlShellPrintXPathResult
+extern __typeof (xmlShellPrintXPathResult) xmlShellPrintXPathResult__internal_alias __attribute((visibility("hidden")));
+#define xmlShellPrintXPathResult xmlShellPrintXPathResult__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellPwd
+extern __typeof (xmlShellPwd) xmlShellPwd __attribute((alias("xmlShellPwd__internal_alias")));
+#else
+#ifndef xmlShellPwd
+extern __typeof (xmlShellPwd) xmlShellPwd__internal_alias __attribute((visibility("hidden")));
+#define xmlShellPwd xmlShellPwd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellSave
+extern __typeof (xmlShellSave) xmlShellSave __attribute((alias("xmlShellSave__internal_alias")));
+#else
+#ifndef xmlShellSave
+extern __typeof (xmlShellSave) xmlShellSave__internal_alias __attribute((visibility("hidden")));
+#define xmlShellSave xmlShellSave__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellValidate
+extern __typeof (xmlShellValidate) xmlShellValidate __attribute((alias("xmlShellValidate__internal_alias")));
+#else
+#ifndef xmlShellValidate
+extern __typeof (xmlShellValidate) xmlShellValidate__internal_alias __attribute((visibility("hidden")));
+#define xmlShellValidate xmlShellValidate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_debugXML
+#undef xmlShellWrite
+extern __typeof (xmlShellWrite) xmlShellWrite __attribute((alias("xmlShellWrite__internal_alias")));
+#else
+#ifndef xmlShellWrite
+extern __typeof (xmlShellWrite) xmlShellWrite__internal_alias __attribute((visibility("hidden")));
+#define xmlShellWrite xmlShellWrite__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlSkipBlankChars
+extern __typeof (xmlSkipBlankChars) xmlSkipBlankChars __attribute((alias("xmlSkipBlankChars__internal_alias")));
+#else
+#ifndef xmlSkipBlankChars
+extern __typeof (xmlSkipBlankChars) xmlSkipBlankChars__internal_alias __attribute((visibility("hidden")));
+#define xmlSkipBlankChars xmlSkipBlankChars__internal_alias
+#endif
+#endif
+
+#ifdef bottom_valid
+#undef xmlSnprintfElementContent
+extern __typeof (xmlSnprintfElementContent) xmlSnprintfElementContent __attribute((alias("xmlSnprintfElementContent__internal_alias")));
+#else
+#ifndef xmlSnprintfElementContent
+extern __typeof (xmlSnprintfElementContent) xmlSnprintfElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlSnprintfElementContent xmlSnprintfElementContent__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlSplitQName
+extern __typeof (xmlSplitQName) xmlSplitQName __attribute((alias("xmlSplitQName__internal_alias")));
+#else
+#ifndef xmlSplitQName
+extern __typeof (xmlSplitQName) xmlSplitQName__internal_alias __attribute((visibility("hidden")));
+#define xmlSplitQName xmlSplitQName__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSplitQName2
+extern __typeof (xmlSplitQName2) xmlSplitQName2 __attribute((alias("xmlSplitQName2__internal_alias")));
+#else
+#ifndef xmlSplitQName2
+extern __typeof (xmlSplitQName2) xmlSplitQName2__internal_alias __attribute((visibility("hidden")));
+#define xmlSplitQName2 xmlSplitQName2__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlSplitQName3
+extern __typeof (xmlSplitQName3) xmlSplitQName3 __attribute((alias("xmlSplitQName3__internal_alias")));
+#else
+#ifndef xmlSplitQName3
+extern __typeof (xmlSplitQName3) xmlSplitQName3__internal_alias __attribute((visibility("hidden")));
+#define xmlSplitQName3 xmlSplitQName3__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef bottom_valid
+#undef xmlSprintfElementContent
+extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent __attribute((alias("xmlSprintfElementContent__internal_alias")));
+#else
+#ifndef xmlSprintfElementContent
+extern __typeof (xmlSprintfElementContent) xmlSprintfElementContent__internal_alias __attribute((visibility("hidden")));
+#define xmlSprintfElementContent xmlSprintfElementContent__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlStopParser
+extern __typeof (xmlStopParser) xmlStopParser __attribute((alias("xmlStopParser__internal_alias")));
+#else
+#ifndef xmlStopParser
+extern __typeof (xmlStopParser) xmlStopParser__internal_alias __attribute((visibility("hidden")));
+#define xmlStopParser xmlStopParser__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrEqual
+extern __typeof (xmlStrEqual) xmlStrEqual __attribute((alias("xmlStrEqual__internal_alias")));
+#else
+#ifndef xmlStrEqual
+extern __typeof (xmlStrEqual) xmlStrEqual__internal_alias __attribute((visibility("hidden")));
+#define xmlStrEqual xmlStrEqual__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrPrintf
+extern __typeof (xmlStrPrintf) xmlStrPrintf __attribute((alias("xmlStrPrintf__internal_alias")));
+#else
+#ifndef xmlStrPrintf
+extern __typeof (xmlStrPrintf) xmlStrPrintf__internal_alias __attribute((visibility("hidden")));
+#define xmlStrPrintf xmlStrPrintf__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrQEqual
+extern __typeof (xmlStrQEqual) xmlStrQEqual __attribute((alias("xmlStrQEqual__internal_alias")));
+#else
+#ifndef xmlStrQEqual
+extern __typeof (xmlStrQEqual) xmlStrQEqual__internal_alias __attribute((visibility("hidden")));
+#define xmlStrQEqual xmlStrQEqual__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrVPrintf
+extern __typeof (xmlStrVPrintf) xmlStrVPrintf __attribute((alias("xmlStrVPrintf__internal_alias")));
+#else
+#ifndef xmlStrVPrintf
+extern __typeof (xmlStrVPrintf) xmlStrVPrintf__internal_alias __attribute((visibility("hidden")));
+#define xmlStrVPrintf xmlStrVPrintf__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrcasecmp
+extern __typeof (xmlStrcasecmp) xmlStrcasecmp __attribute((alias("xmlStrcasecmp__internal_alias")));
+#else
+#ifndef xmlStrcasecmp
+extern __typeof (xmlStrcasecmp) xmlStrcasecmp__internal_alias __attribute((visibility("hidden")));
+#define xmlStrcasecmp xmlStrcasecmp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrcasestr
+extern __typeof (xmlStrcasestr) xmlStrcasestr __attribute((alias("xmlStrcasestr__internal_alias")));
+#else
+#ifndef xmlStrcasestr
+extern __typeof (xmlStrcasestr) xmlStrcasestr__internal_alias __attribute((visibility("hidden")));
+#define xmlStrcasestr xmlStrcasestr__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrcat
+extern __typeof (xmlStrcat) xmlStrcat __attribute((alias("xmlStrcat__internal_alias")));
+#else
+#ifndef xmlStrcat
+extern __typeof (xmlStrcat) xmlStrcat__internal_alias __attribute((visibility("hidden")));
+#define xmlStrcat xmlStrcat__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrchr
+extern __typeof (xmlStrchr) xmlStrchr __attribute((alias("xmlStrchr__internal_alias")));
+#else
+#ifndef xmlStrchr
+extern __typeof (xmlStrchr) xmlStrchr__internal_alias __attribute((visibility("hidden")));
+#define xmlStrchr xmlStrchr__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrcmp
+extern __typeof (xmlStrcmp) xmlStrcmp __attribute((alias("xmlStrcmp__internal_alias")));
+#else
+#ifndef xmlStrcmp
+extern __typeof (xmlStrcmp) xmlStrcmp__internal_alias __attribute((visibility("hidden")));
+#define xmlStrcmp xmlStrcmp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrdup
+extern __typeof (xmlStrdup) xmlStrdup __attribute((alias("xmlStrdup__internal_alias")));
+#else
+#ifndef xmlStrdup
+extern __typeof (xmlStrdup) xmlStrdup__internal_alias __attribute((visibility("hidden")));
+#define xmlStrdup xmlStrdup__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlStreamPop
+extern __typeof (xmlStreamPop) xmlStreamPop __attribute((alias("xmlStreamPop__internal_alias")));
+#else
+#ifndef xmlStreamPop
+extern __typeof (xmlStreamPop) xmlStreamPop__internal_alias __attribute((visibility("hidden")));
+#define xmlStreamPop xmlStreamPop__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlStreamPush
+extern __typeof (xmlStreamPush) xmlStreamPush __attribute((alias("xmlStreamPush__internal_alias")));
+#else
+#ifndef xmlStreamPush
+extern __typeof (xmlStreamPush) xmlStreamPush__internal_alias __attribute((visibility("hidden")));
+#define xmlStreamPush xmlStreamPush__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlStreamPushAttr
+extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr __attribute((alias("xmlStreamPushAttr__internal_alias")));
+#else
+#ifndef xmlStreamPushAttr
+extern __typeof (xmlStreamPushAttr) xmlStreamPushAttr__internal_alias __attribute((visibility("hidden")));
+#define xmlStreamPushAttr xmlStreamPushAttr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlStreamPushNode
+extern __typeof (xmlStreamPushNode) xmlStreamPushNode __attribute((alias("xmlStreamPushNode__internal_alias")));
+#else
+#ifndef xmlStreamPushNode
+extern __typeof (xmlStreamPushNode) xmlStreamPushNode__internal_alias __attribute((visibility("hidden")));
+#define xmlStreamPushNode xmlStreamPushNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_pattern
+#undef xmlStreamWantsAnyNode
+extern __typeof (xmlStreamWantsAnyNode) xmlStreamWantsAnyNode __attribute((alias("xmlStreamWantsAnyNode__internal_alias")));
+#else
+#ifndef xmlStreamWantsAnyNode
+extern __typeof (xmlStreamWantsAnyNode) xmlStreamWantsAnyNode__internal_alias __attribute((visibility("hidden")));
+#define xmlStreamWantsAnyNode xmlStreamWantsAnyNode__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlStringCurrentChar
+extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar __attribute((alias("xmlStringCurrentChar__internal_alias")));
+#else
+#ifndef xmlStringCurrentChar
+extern __typeof (xmlStringCurrentChar) xmlStringCurrentChar__internal_alias __attribute((visibility("hidden")));
+#define xmlStringCurrentChar xmlStringCurrentChar__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlStringDecodeEntities
+extern __typeof (xmlStringDecodeEntities) xmlStringDecodeEntities __attribute((alias("xmlStringDecodeEntities__internal_alias")));
+#else
+#ifndef xmlStringDecodeEntities
+extern __typeof (xmlStringDecodeEntities) xmlStringDecodeEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlStringDecodeEntities xmlStringDecodeEntities__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlStringGetNodeList
+extern __typeof (xmlStringGetNodeList) xmlStringGetNodeList __attribute((alias("xmlStringGetNodeList__internal_alias")));
+#else
+#ifndef xmlStringGetNodeList
+extern __typeof (xmlStringGetNodeList) xmlStringGetNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlStringGetNodeList xmlStringGetNodeList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parser
+#undef xmlStringLenDecodeEntities
+extern __typeof (xmlStringLenDecodeEntities) xmlStringLenDecodeEntities __attribute((alias("xmlStringLenDecodeEntities__internal_alias")));
+#else
+#ifndef xmlStringLenDecodeEntities
+extern __typeof (xmlStringLenDecodeEntities) xmlStringLenDecodeEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlStringLenDecodeEntities xmlStringLenDecodeEntities__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlStringLenGetNodeList
+extern __typeof (xmlStringLenGetNodeList) xmlStringLenGetNodeList __attribute((alias("xmlStringLenGetNodeList__internal_alias")));
+#else
+#ifndef xmlStringLenGetNodeList
+extern __typeof (xmlStringLenGetNodeList) xmlStringLenGetNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlStringLenGetNodeList xmlStringLenGetNodeList__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrlen
+extern __typeof (xmlStrlen) xmlStrlen __attribute((alias("xmlStrlen__internal_alias")));
+#else
+#ifndef xmlStrlen
+extern __typeof (xmlStrlen) xmlStrlen__internal_alias __attribute((visibility("hidden")));
+#define xmlStrlen xmlStrlen__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrncasecmp
+extern __typeof (xmlStrncasecmp) xmlStrncasecmp __attribute((alias("xmlStrncasecmp__internal_alias")));
+#else
+#ifndef xmlStrncasecmp
+extern __typeof (xmlStrncasecmp) xmlStrncasecmp__internal_alias __attribute((visibility("hidden")));
+#define xmlStrncasecmp xmlStrncasecmp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrncat
+extern __typeof (xmlStrncat) xmlStrncat __attribute((alias("xmlStrncat__internal_alias")));
+#else
+#ifndef xmlStrncat
+extern __typeof (xmlStrncat) xmlStrncat__internal_alias __attribute((visibility("hidden")));
+#define xmlStrncat xmlStrncat__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrncatNew
+extern __typeof (xmlStrncatNew) xmlStrncatNew __attribute((alias("xmlStrncatNew__internal_alias")));
+#else
+#ifndef xmlStrncatNew
+extern __typeof (xmlStrncatNew) xmlStrncatNew__internal_alias __attribute((visibility("hidden")));
+#define xmlStrncatNew xmlStrncatNew__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrncmp
+extern __typeof (xmlStrncmp) xmlStrncmp __attribute((alias("xmlStrncmp__internal_alias")));
+#else
+#ifndef xmlStrncmp
+extern __typeof (xmlStrncmp) xmlStrncmp__internal_alias __attribute((visibility("hidden")));
+#define xmlStrncmp xmlStrncmp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrndup
+extern __typeof (xmlStrndup) xmlStrndup __attribute((alias("xmlStrndup__internal_alias")));
+#else
+#ifndef xmlStrndup
+extern __typeof (xmlStrndup) xmlStrndup__internal_alias __attribute((visibility("hidden")));
+#define xmlStrndup xmlStrndup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrstr
+extern __typeof (xmlStrstr) xmlStrstr __attribute((alias("xmlStrstr__internal_alias")));
+#else
+#ifndef xmlStrstr
+extern __typeof (xmlStrstr) xmlStrstr__internal_alias __attribute((visibility("hidden")));
+#define xmlStrstr xmlStrstr__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlStrsub
+extern __typeof (xmlStrsub) xmlStrsub __attribute((alias("xmlStrsub__internal_alias")));
+#else
+#ifndef xmlStrsub
+extern __typeof (xmlStrsub) xmlStrsub__internal_alias __attribute((visibility("hidden")));
+#define xmlStrsub xmlStrsub__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlSubstituteEntitiesDefault
+extern __typeof (xmlSubstituteEntitiesDefault) xmlSubstituteEntitiesDefault __attribute((alias("xmlSubstituteEntitiesDefault__internal_alias")));
+#else
+#ifndef xmlSubstituteEntitiesDefault
+extern __typeof (xmlSubstituteEntitiesDefault) xmlSubstituteEntitiesDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlSubstituteEntitiesDefault xmlSubstituteEntitiesDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlSwitchEncoding
+extern __typeof (xmlSwitchEncoding) xmlSwitchEncoding __attribute((alias("xmlSwitchEncoding__internal_alias")));
+#else
+#ifndef xmlSwitchEncoding
+extern __typeof (xmlSwitchEncoding) xmlSwitchEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlSwitchEncoding xmlSwitchEncoding__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlSwitchInputEncoding
+extern __typeof (xmlSwitchInputEncoding) xmlSwitchInputEncoding __attribute((alias("xmlSwitchInputEncoding__internal_alias")));
+#else
+#ifndef xmlSwitchInputEncoding
+extern __typeof (xmlSwitchInputEncoding) xmlSwitchInputEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlSwitchInputEncoding xmlSwitchInputEncoding__internal_alias
+#endif
+#endif
+
+#ifdef bottom_parserInternals
+#undef xmlSwitchToEncoding
+extern __typeof (xmlSwitchToEncoding) xmlSwitchToEncoding __attribute((alias("xmlSwitchToEncoding__internal_alias")));
+#else
+#ifndef xmlSwitchToEncoding
+extern __typeof (xmlSwitchToEncoding) xmlSwitchToEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlSwitchToEncoding xmlSwitchToEncoding__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlTextConcat
+extern __typeof (xmlTextConcat) xmlTextConcat __attribute((alias("xmlTextConcat__internal_alias")));
+#else
+#ifndef xmlTextConcat
+extern __typeof (xmlTextConcat) xmlTextConcat__internal_alias __attribute((visibility("hidden")));
+#define xmlTextConcat xmlTextConcat__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlTextMerge
+extern __typeof (xmlTextMerge) xmlTextMerge __attribute((alias("xmlTextMerge__internal_alias")));
+#else
+#ifndef xmlTextMerge
+extern __typeof (xmlTextMerge) xmlTextMerge__internal_alias __attribute((visibility("hidden")));
+#define xmlTextMerge xmlTextMerge__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderAttributeCount
+extern __typeof (xmlTextReaderAttributeCount) xmlTextReaderAttributeCount __attribute((alias("xmlTextReaderAttributeCount__internal_alias")));
+#else
+#ifndef xmlTextReaderAttributeCount
+extern __typeof (xmlTextReaderAttributeCount) xmlTextReaderAttributeCount__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderAttributeCount xmlTextReaderAttributeCount__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderBaseUri
+extern __typeof (xmlTextReaderBaseUri) xmlTextReaderBaseUri __attribute((alias("xmlTextReaderBaseUri__internal_alias")));
+#else
+#ifndef xmlTextReaderBaseUri
+extern __typeof (xmlTextReaderBaseUri) xmlTextReaderBaseUri__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderBaseUri xmlTextReaderBaseUri__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderByteConsumed
+extern __typeof (xmlTextReaderByteConsumed) xmlTextReaderByteConsumed __attribute((alias("xmlTextReaderByteConsumed__internal_alias")));
+#else
+#ifndef xmlTextReaderByteConsumed
+extern __typeof (xmlTextReaderByteConsumed) xmlTextReaderByteConsumed__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderByteConsumed xmlTextReaderByteConsumed__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderClose
+extern __typeof (xmlTextReaderClose) xmlTextReaderClose __attribute((alias("xmlTextReaderClose__internal_alias")));
+#else
+#ifndef xmlTextReaderClose
+extern __typeof (xmlTextReaderClose) xmlTextReaderClose__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderClose xmlTextReaderClose__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstBaseUri
+extern __typeof (xmlTextReaderConstBaseUri) xmlTextReaderConstBaseUri __attribute((alias("xmlTextReaderConstBaseUri__internal_alias")));
+#else
+#ifndef xmlTextReaderConstBaseUri
+extern __typeof (xmlTextReaderConstBaseUri) xmlTextReaderConstBaseUri__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstBaseUri xmlTextReaderConstBaseUri__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstEncoding
+extern __typeof (xmlTextReaderConstEncoding) xmlTextReaderConstEncoding __attribute((alias("xmlTextReaderConstEncoding__internal_alias")));
+#else
+#ifndef xmlTextReaderConstEncoding
+extern __typeof (xmlTextReaderConstEncoding) xmlTextReaderConstEncoding__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstEncoding xmlTextReaderConstEncoding__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstLocalName
+extern __typeof (xmlTextReaderConstLocalName) xmlTextReaderConstLocalName __attribute((alias("xmlTextReaderConstLocalName__internal_alias")));
+#else
+#ifndef xmlTextReaderConstLocalName
+extern __typeof (xmlTextReaderConstLocalName) xmlTextReaderConstLocalName__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstLocalName xmlTextReaderConstLocalName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstName
+extern __typeof (xmlTextReaderConstName) xmlTextReaderConstName __attribute((alias("xmlTextReaderConstName__internal_alias")));
+#else
+#ifndef xmlTextReaderConstName
+extern __typeof (xmlTextReaderConstName) xmlTextReaderConstName__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstName xmlTextReaderConstName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstNamespaceUri
+extern __typeof (xmlTextReaderConstNamespaceUri) xmlTextReaderConstNamespaceUri __attribute((alias("xmlTextReaderConstNamespaceUri__internal_alias")));
+#else
+#ifndef xmlTextReaderConstNamespaceUri
+extern __typeof (xmlTextReaderConstNamespaceUri) xmlTextReaderConstNamespaceUri__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstNamespaceUri xmlTextReaderConstNamespaceUri__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstPrefix
+extern __typeof (xmlTextReaderConstPrefix) xmlTextReaderConstPrefix __attribute((alias("xmlTextReaderConstPrefix__internal_alias")));
+#else
+#ifndef xmlTextReaderConstPrefix
+extern __typeof (xmlTextReaderConstPrefix) xmlTextReaderConstPrefix__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstPrefix xmlTextReaderConstPrefix__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstString
+extern __typeof (xmlTextReaderConstString) xmlTextReaderConstString __attribute((alias("xmlTextReaderConstString__internal_alias")));
+#else
+#ifndef xmlTextReaderConstString
+extern __typeof (xmlTextReaderConstString) xmlTextReaderConstString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstString xmlTextReaderConstString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstValue
+extern __typeof (xmlTextReaderConstValue) xmlTextReaderConstValue __attribute((alias("xmlTextReaderConstValue__internal_alias")));
+#else
+#ifndef xmlTextReaderConstValue
+extern __typeof (xmlTextReaderConstValue) xmlTextReaderConstValue__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstValue xmlTextReaderConstValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstXmlLang
+extern __typeof (xmlTextReaderConstXmlLang) xmlTextReaderConstXmlLang __attribute((alias("xmlTextReaderConstXmlLang__internal_alias")));
+#else
+#ifndef xmlTextReaderConstXmlLang
+extern __typeof (xmlTextReaderConstXmlLang) xmlTextReaderConstXmlLang__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstXmlLang xmlTextReaderConstXmlLang__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderConstXmlVersion
+extern __typeof (xmlTextReaderConstXmlVersion) xmlTextReaderConstXmlVersion __attribute((alias("xmlTextReaderConstXmlVersion__internal_alias")));
+#else
+#ifndef xmlTextReaderConstXmlVersion
+extern __typeof (xmlTextReaderConstXmlVersion) xmlTextReaderConstXmlVersion__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderConstXmlVersion xmlTextReaderConstXmlVersion__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderCurrentDoc
+extern __typeof (xmlTextReaderCurrentDoc) xmlTextReaderCurrentDoc __attribute((alias("xmlTextReaderCurrentDoc__internal_alias")));
+#else
+#ifndef xmlTextReaderCurrentDoc
+extern __typeof (xmlTextReaderCurrentDoc) xmlTextReaderCurrentDoc__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderCurrentDoc xmlTextReaderCurrentDoc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderCurrentNode
+extern __typeof (xmlTextReaderCurrentNode) xmlTextReaderCurrentNode __attribute((alias("xmlTextReaderCurrentNode__internal_alias")));
+#else
+#ifndef xmlTextReaderCurrentNode
+extern __typeof (xmlTextReaderCurrentNode) xmlTextReaderCurrentNode__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderCurrentNode xmlTextReaderCurrentNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderDepth
+extern __typeof (xmlTextReaderDepth) xmlTextReaderDepth __attribute((alias("xmlTextReaderDepth__internal_alias")));
+#else
+#ifndef xmlTextReaderDepth
+extern __typeof (xmlTextReaderDepth) xmlTextReaderDepth__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderDepth xmlTextReaderDepth__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderExpand
+extern __typeof (xmlTextReaderExpand) xmlTextReaderExpand __attribute((alias("xmlTextReaderExpand__internal_alias")));
+#else
+#ifndef xmlTextReaderExpand
+extern __typeof (xmlTextReaderExpand) xmlTextReaderExpand__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderExpand xmlTextReaderExpand__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetAttribute
+extern __typeof (xmlTextReaderGetAttribute) xmlTextReaderGetAttribute __attribute((alias("xmlTextReaderGetAttribute__internal_alias")));
+#else
+#ifndef xmlTextReaderGetAttribute
+extern __typeof (xmlTextReaderGetAttribute) xmlTextReaderGetAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetAttribute xmlTextReaderGetAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetAttributeNo
+extern __typeof (xmlTextReaderGetAttributeNo) xmlTextReaderGetAttributeNo __attribute((alias("xmlTextReaderGetAttributeNo__internal_alias")));
+#else
+#ifndef xmlTextReaderGetAttributeNo
+extern __typeof (xmlTextReaderGetAttributeNo) xmlTextReaderGetAttributeNo__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetAttributeNo xmlTextReaderGetAttributeNo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetAttributeNs
+extern __typeof (xmlTextReaderGetAttributeNs) xmlTextReaderGetAttributeNs __attribute((alias("xmlTextReaderGetAttributeNs__internal_alias")));
+#else
+#ifndef xmlTextReaderGetAttributeNs
+extern __typeof (xmlTextReaderGetAttributeNs) xmlTextReaderGetAttributeNs__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetAttributeNs xmlTextReaderGetAttributeNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetErrorHandler
+extern __typeof (xmlTextReaderGetErrorHandler) xmlTextReaderGetErrorHandler __attribute((alias("xmlTextReaderGetErrorHandler__internal_alias")));
+#else
+#ifndef xmlTextReaderGetErrorHandler
+extern __typeof (xmlTextReaderGetErrorHandler) xmlTextReaderGetErrorHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetErrorHandler xmlTextReaderGetErrorHandler__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetParserColumnNumber
+extern __typeof (xmlTextReaderGetParserColumnNumber) xmlTextReaderGetParserColumnNumber __attribute((alias("xmlTextReaderGetParserColumnNumber__internal_alias")));
+#else
+#ifndef xmlTextReaderGetParserColumnNumber
+extern __typeof (xmlTextReaderGetParserColumnNumber) xmlTextReaderGetParserColumnNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetParserColumnNumber xmlTextReaderGetParserColumnNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetParserLineNumber
+extern __typeof (xmlTextReaderGetParserLineNumber) xmlTextReaderGetParserLineNumber __attribute((alias("xmlTextReaderGetParserLineNumber__internal_alias")));
+#else
+#ifndef xmlTextReaderGetParserLineNumber
+extern __typeof (xmlTextReaderGetParserLineNumber) xmlTextReaderGetParserLineNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetParserLineNumber xmlTextReaderGetParserLineNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetParserProp
+extern __typeof (xmlTextReaderGetParserProp) xmlTextReaderGetParserProp __attribute((alias("xmlTextReaderGetParserProp__internal_alias")));
+#else
+#ifndef xmlTextReaderGetParserProp
+extern __typeof (xmlTextReaderGetParserProp) xmlTextReaderGetParserProp__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetParserProp xmlTextReaderGetParserProp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderGetRemainder
+extern __typeof (xmlTextReaderGetRemainder) xmlTextReaderGetRemainder __attribute((alias("xmlTextReaderGetRemainder__internal_alias")));
+#else
+#ifndef xmlTextReaderGetRemainder
+extern __typeof (xmlTextReaderGetRemainder) xmlTextReaderGetRemainder__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderGetRemainder xmlTextReaderGetRemainder__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderHasAttributes
+extern __typeof (xmlTextReaderHasAttributes) xmlTextReaderHasAttributes __attribute((alias("xmlTextReaderHasAttributes__internal_alias")));
+#else
+#ifndef xmlTextReaderHasAttributes
+extern __typeof (xmlTextReaderHasAttributes) xmlTextReaderHasAttributes__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderHasAttributes xmlTextReaderHasAttributes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderHasValue
+extern __typeof (xmlTextReaderHasValue) xmlTextReaderHasValue __attribute((alias("xmlTextReaderHasValue__internal_alias")));
+#else
+#ifndef xmlTextReaderHasValue
+extern __typeof (xmlTextReaderHasValue) xmlTextReaderHasValue__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderHasValue xmlTextReaderHasValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderIsDefault
+extern __typeof (xmlTextReaderIsDefault) xmlTextReaderIsDefault __attribute((alias("xmlTextReaderIsDefault__internal_alias")));
+#else
+#ifndef xmlTextReaderIsDefault
+extern __typeof (xmlTextReaderIsDefault) xmlTextReaderIsDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderIsDefault xmlTextReaderIsDefault__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderIsEmptyElement
+extern __typeof (xmlTextReaderIsEmptyElement) xmlTextReaderIsEmptyElement __attribute((alias("xmlTextReaderIsEmptyElement__internal_alias")));
+#else
+#ifndef xmlTextReaderIsEmptyElement
+extern __typeof (xmlTextReaderIsEmptyElement) xmlTextReaderIsEmptyElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderIsEmptyElement xmlTextReaderIsEmptyElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderIsNamespaceDecl
+extern __typeof (xmlTextReaderIsNamespaceDecl) xmlTextReaderIsNamespaceDecl __attribute((alias("xmlTextReaderIsNamespaceDecl__internal_alias")));
+#else
+#ifndef xmlTextReaderIsNamespaceDecl
+extern __typeof (xmlTextReaderIsNamespaceDecl) xmlTextReaderIsNamespaceDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderIsNamespaceDecl xmlTextReaderIsNamespaceDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderIsValid
+extern __typeof (xmlTextReaderIsValid) xmlTextReaderIsValid __attribute((alias("xmlTextReaderIsValid__internal_alias")));
+#else
+#ifndef xmlTextReaderIsValid
+extern __typeof (xmlTextReaderIsValid) xmlTextReaderIsValid__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderIsValid xmlTextReaderIsValid__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderLocalName
+extern __typeof (xmlTextReaderLocalName) xmlTextReaderLocalName __attribute((alias("xmlTextReaderLocalName__internal_alias")));
+#else
+#ifndef xmlTextReaderLocalName
+extern __typeof (xmlTextReaderLocalName) xmlTextReaderLocalName__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderLocalName xmlTextReaderLocalName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderLocatorBaseURI
+extern __typeof (xmlTextReaderLocatorBaseURI) xmlTextReaderLocatorBaseURI __attribute((alias("xmlTextReaderLocatorBaseURI__internal_alias")));
+#else
+#ifndef xmlTextReaderLocatorBaseURI
+extern __typeof (xmlTextReaderLocatorBaseURI) xmlTextReaderLocatorBaseURI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderLocatorBaseURI xmlTextReaderLocatorBaseURI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderLocatorLineNumber
+extern __typeof (xmlTextReaderLocatorLineNumber) xmlTextReaderLocatorLineNumber __attribute((alias("xmlTextReaderLocatorLineNumber__internal_alias")));
+#else
+#ifndef xmlTextReaderLocatorLineNumber
+extern __typeof (xmlTextReaderLocatorLineNumber) xmlTextReaderLocatorLineNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderLocatorLineNumber xmlTextReaderLocatorLineNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderLookupNamespace
+extern __typeof (xmlTextReaderLookupNamespace) xmlTextReaderLookupNamespace __attribute((alias("xmlTextReaderLookupNamespace__internal_alias")));
+#else
+#ifndef xmlTextReaderLookupNamespace
+extern __typeof (xmlTextReaderLookupNamespace) xmlTextReaderLookupNamespace__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderLookupNamespace xmlTextReaderLookupNamespace__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToAttribute
+extern __typeof (xmlTextReaderMoveToAttribute) xmlTextReaderMoveToAttribute __attribute((alias("xmlTextReaderMoveToAttribute__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToAttribute
+extern __typeof (xmlTextReaderMoveToAttribute) xmlTextReaderMoveToAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToAttribute xmlTextReaderMoveToAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToAttributeNo
+extern __typeof (xmlTextReaderMoveToAttributeNo) xmlTextReaderMoveToAttributeNo __attribute((alias("xmlTextReaderMoveToAttributeNo__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToAttributeNo
+extern __typeof (xmlTextReaderMoveToAttributeNo) xmlTextReaderMoveToAttributeNo__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToAttributeNo xmlTextReaderMoveToAttributeNo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToAttributeNs
+extern __typeof (xmlTextReaderMoveToAttributeNs) xmlTextReaderMoveToAttributeNs __attribute((alias("xmlTextReaderMoveToAttributeNs__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToAttributeNs
+extern __typeof (xmlTextReaderMoveToAttributeNs) xmlTextReaderMoveToAttributeNs__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToAttributeNs xmlTextReaderMoveToAttributeNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToElement
+extern __typeof (xmlTextReaderMoveToElement) xmlTextReaderMoveToElement __attribute((alias("xmlTextReaderMoveToElement__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToElement
+extern __typeof (xmlTextReaderMoveToElement) xmlTextReaderMoveToElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToElement xmlTextReaderMoveToElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToFirstAttribute
+extern __typeof (xmlTextReaderMoveToFirstAttribute) xmlTextReaderMoveToFirstAttribute __attribute((alias("xmlTextReaderMoveToFirstAttribute__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToFirstAttribute
+extern __typeof (xmlTextReaderMoveToFirstAttribute) xmlTextReaderMoveToFirstAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToFirstAttribute xmlTextReaderMoveToFirstAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderMoveToNextAttribute
+extern __typeof (xmlTextReaderMoveToNextAttribute) xmlTextReaderMoveToNextAttribute __attribute((alias("xmlTextReaderMoveToNextAttribute__internal_alias")));
+#else
+#ifndef xmlTextReaderMoveToNextAttribute
+extern __typeof (xmlTextReaderMoveToNextAttribute) xmlTextReaderMoveToNextAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderMoveToNextAttribute xmlTextReaderMoveToNextAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderName
+extern __typeof (xmlTextReaderName) xmlTextReaderName __attribute((alias("xmlTextReaderName__internal_alias")));
+#else
+#ifndef xmlTextReaderName
+extern __typeof (xmlTextReaderName) xmlTextReaderName__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderName xmlTextReaderName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderNamespaceUri
+extern __typeof (xmlTextReaderNamespaceUri) xmlTextReaderNamespaceUri __attribute((alias("xmlTextReaderNamespaceUri__internal_alias")));
+#else
+#ifndef xmlTextReaderNamespaceUri
+extern __typeof (xmlTextReaderNamespaceUri) xmlTextReaderNamespaceUri__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderNamespaceUri xmlTextReaderNamespaceUri__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderNext
+extern __typeof (xmlTextReaderNext) xmlTextReaderNext __attribute((alias("xmlTextReaderNext__internal_alias")));
+#else
+#ifndef xmlTextReaderNext
+extern __typeof (xmlTextReaderNext) xmlTextReaderNext__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderNext xmlTextReaderNext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderNextSibling
+extern __typeof (xmlTextReaderNextSibling) xmlTextReaderNextSibling __attribute((alias("xmlTextReaderNextSibling__internal_alias")));
+#else
+#ifndef xmlTextReaderNextSibling
+extern __typeof (xmlTextReaderNextSibling) xmlTextReaderNextSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderNextSibling xmlTextReaderNextSibling__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderNodeType
+extern __typeof (xmlTextReaderNodeType) xmlTextReaderNodeType __attribute((alias("xmlTextReaderNodeType__internal_alias")));
+#else
+#ifndef xmlTextReaderNodeType
+extern __typeof (xmlTextReaderNodeType) xmlTextReaderNodeType__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderNodeType xmlTextReaderNodeType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderNormalization
+extern __typeof (xmlTextReaderNormalization) xmlTextReaderNormalization __attribute((alias("xmlTextReaderNormalization__internal_alias")));
+#else
+#ifndef xmlTextReaderNormalization
+extern __typeof (xmlTextReaderNormalization) xmlTextReaderNormalization__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderNormalization xmlTextReaderNormalization__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderPrefix
+extern __typeof (xmlTextReaderPrefix) xmlTextReaderPrefix __attribute((alias("xmlTextReaderPrefix__internal_alias")));
+#else
+#ifndef xmlTextReaderPrefix
+extern __typeof (xmlTextReaderPrefix) xmlTextReaderPrefix__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderPrefix xmlTextReaderPrefix__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderPreserve
+extern __typeof (xmlTextReaderPreserve) xmlTextReaderPreserve __attribute((alias("xmlTextReaderPreserve__internal_alias")));
+#else
+#ifndef xmlTextReaderPreserve
+extern __typeof (xmlTextReaderPreserve) xmlTextReaderPreserve__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderPreserve xmlTextReaderPreserve__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderPreservePattern
+extern __typeof (xmlTextReaderPreservePattern) xmlTextReaderPreservePattern __attribute((alias("xmlTextReaderPreservePattern__internal_alias")));
+#else
+#ifndef xmlTextReaderPreservePattern
+extern __typeof (xmlTextReaderPreservePattern) xmlTextReaderPreservePattern__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderPreservePattern xmlTextReaderPreservePattern__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderQuoteChar
+extern __typeof (xmlTextReaderQuoteChar) xmlTextReaderQuoteChar __attribute((alias("xmlTextReaderQuoteChar__internal_alias")));
+#else
+#ifndef xmlTextReaderQuoteChar
+extern __typeof (xmlTextReaderQuoteChar) xmlTextReaderQuoteChar__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderQuoteChar xmlTextReaderQuoteChar__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderRead
+extern __typeof (xmlTextReaderRead) xmlTextReaderRead __attribute((alias("xmlTextReaderRead__internal_alias")));
+#else
+#ifndef xmlTextReaderRead
+extern __typeof (xmlTextReaderRead) xmlTextReaderRead__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderRead xmlTextReaderRead__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderReadAttributeValue
+extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValue __attribute((alias("xmlTextReaderReadAttributeValue__internal_alias")));
+#else
+#ifndef xmlTextReaderReadAttributeValue
+extern __typeof (xmlTextReaderReadAttributeValue) xmlTextReaderReadAttributeValue__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderReadAttributeValue xmlTextReaderReadAttributeValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderReadInnerXml
+extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml __attribute((alias("xmlTextReaderReadInnerXml__internal_alias")));
+#else
+#ifndef xmlTextReaderReadInnerXml
+extern __typeof (xmlTextReaderReadInnerXml) xmlTextReaderReadInnerXml__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderReadInnerXml xmlTextReaderReadInnerXml__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderReadOuterXml
+extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml __attribute((alias("xmlTextReaderReadOuterXml__internal_alias")));
+#else
+#ifndef xmlTextReaderReadOuterXml
+extern __typeof (xmlTextReaderReadOuterXml) xmlTextReaderReadOuterXml__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderReadOuterXml xmlTextReaderReadOuterXml__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderReadState
+extern __typeof (xmlTextReaderReadState) xmlTextReaderReadState __attribute((alias("xmlTextReaderReadState__internal_alias")));
+#else
+#ifndef xmlTextReaderReadState
+extern __typeof (xmlTextReaderReadState) xmlTextReaderReadState__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderReadState xmlTextReaderReadState__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderReadString
+extern __typeof (xmlTextReaderReadString) xmlTextReaderReadString __attribute((alias("xmlTextReaderReadString__internal_alias")));
+#else
+#ifndef xmlTextReaderReadString
+extern __typeof (xmlTextReaderReadString) xmlTextReaderReadString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderReadString xmlTextReaderReadString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderRelaxNGSetSchema
+extern __typeof (xmlTextReaderRelaxNGSetSchema) xmlTextReaderRelaxNGSetSchema __attribute((alias("xmlTextReaderRelaxNGSetSchema__internal_alias")));
+#else
+#ifndef xmlTextReaderRelaxNGSetSchema
+extern __typeof (xmlTextReaderRelaxNGSetSchema) xmlTextReaderRelaxNGSetSchema__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderRelaxNGSetSchema xmlTextReaderRelaxNGSetSchema__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderRelaxNGValidate
+extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate __attribute((alias("xmlTextReaderRelaxNGValidate__internal_alias")));
+#else
+#ifndef xmlTextReaderRelaxNGValidate
+extern __typeof (xmlTextReaderRelaxNGValidate) xmlTextReaderRelaxNGValidate__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderRelaxNGValidate xmlTextReaderRelaxNGValidate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderRelaxNGValidateCtxt
+extern __typeof (xmlTextReaderRelaxNGValidateCtxt) xmlTextReaderRelaxNGValidateCtxt __attribute((alias("xmlTextReaderRelaxNGValidateCtxt__internal_alias")));
+#else
+#ifndef xmlTextReaderRelaxNGValidateCtxt
+extern __typeof (xmlTextReaderRelaxNGValidateCtxt) xmlTextReaderRelaxNGValidateCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderRelaxNGValidateCtxt xmlTextReaderRelaxNGValidateCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSchemaValidate
+extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate __attribute((alias("xmlTextReaderSchemaValidate__internal_alias")));
+#else
+#ifndef xmlTextReaderSchemaValidate
+extern __typeof (xmlTextReaderSchemaValidate) xmlTextReaderSchemaValidate__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSchemaValidate xmlTextReaderSchemaValidate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSchemaValidateCtxt
+extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt __attribute((alias("xmlTextReaderSchemaValidateCtxt__internal_alias")));
+#else
+#ifndef xmlTextReaderSchemaValidateCtxt
+extern __typeof (xmlTextReaderSchemaValidateCtxt) xmlTextReaderSchemaValidateCtxt__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSchemaValidateCtxt xmlTextReaderSchemaValidateCtxt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSetErrorHandler
+extern __typeof (xmlTextReaderSetErrorHandler) xmlTextReaderSetErrorHandler __attribute((alias("xmlTextReaderSetErrorHandler__internal_alias")));
+#else
+#ifndef xmlTextReaderSetErrorHandler
+extern __typeof (xmlTextReaderSetErrorHandler) xmlTextReaderSetErrorHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSetErrorHandler xmlTextReaderSetErrorHandler__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSetParserProp
+extern __typeof (xmlTextReaderSetParserProp) xmlTextReaderSetParserProp __attribute((alias("xmlTextReaderSetParserProp__internal_alias")));
+#else
+#ifndef xmlTextReaderSetParserProp
+extern __typeof (xmlTextReaderSetParserProp) xmlTextReaderSetParserProp__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSetParserProp xmlTextReaderSetParserProp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSetSchema
+extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema __attribute((alias("xmlTextReaderSetSchema__internal_alias")));
+#else
+#ifndef xmlTextReaderSetSchema
+extern __typeof (xmlTextReaderSetSchema) xmlTextReaderSetSchema__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSetSchema xmlTextReaderSetSchema__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSetStructuredErrorHandler
+extern __typeof (xmlTextReaderSetStructuredErrorHandler) xmlTextReaderSetStructuredErrorHandler __attribute((alias("xmlTextReaderSetStructuredErrorHandler__internal_alias")));
+#else
+#ifndef xmlTextReaderSetStructuredErrorHandler
+extern __typeof (xmlTextReaderSetStructuredErrorHandler) xmlTextReaderSetStructuredErrorHandler__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSetStructuredErrorHandler xmlTextReaderSetStructuredErrorHandler__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderSetup
+extern __typeof (xmlTextReaderSetup) xmlTextReaderSetup __attribute((alias("xmlTextReaderSetup__internal_alias")));
+#else
+#ifndef xmlTextReaderSetup
+extern __typeof (xmlTextReaderSetup) xmlTextReaderSetup__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderSetup xmlTextReaderSetup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderStandalone
+extern __typeof (xmlTextReaderStandalone) xmlTextReaderStandalone __attribute((alias("xmlTextReaderStandalone__internal_alias")));
+#else
+#ifndef xmlTextReaderStandalone
+extern __typeof (xmlTextReaderStandalone) xmlTextReaderStandalone__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderStandalone xmlTextReaderStandalone__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderValue
+extern __typeof (xmlTextReaderValue) xmlTextReaderValue __attribute((alias("xmlTextReaderValue__internal_alias")));
+#else
+#ifndef xmlTextReaderValue
+extern __typeof (xmlTextReaderValue) xmlTextReaderValue__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderValue xmlTextReaderValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_READER_ENABLED)
+#ifdef bottom_xmlreader
+#undef xmlTextReaderXmlLang
+extern __typeof (xmlTextReaderXmlLang) xmlTextReaderXmlLang __attribute((alias("xmlTextReaderXmlLang__internal_alias")));
+#else
+#ifndef xmlTextReaderXmlLang
+extern __typeof (xmlTextReaderXmlLang) xmlTextReaderXmlLang__internal_alias __attribute((visibility("hidden")));
+#define xmlTextReaderXmlLang xmlTextReaderXmlLang__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndAttribute
+extern __typeof (xmlTextWriterEndAttribute) xmlTextWriterEndAttribute __attribute((alias("xmlTextWriterEndAttribute__internal_alias")));
+#else
+#ifndef xmlTextWriterEndAttribute
+extern __typeof (xmlTextWriterEndAttribute) xmlTextWriterEndAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndAttribute xmlTextWriterEndAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndCDATA
+extern __typeof (xmlTextWriterEndCDATA) xmlTextWriterEndCDATA __attribute((alias("xmlTextWriterEndCDATA__internal_alias")));
+#else
+#ifndef xmlTextWriterEndCDATA
+extern __typeof (xmlTextWriterEndCDATA) xmlTextWriterEndCDATA__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndCDATA xmlTextWriterEndCDATA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndComment
+extern __typeof (xmlTextWriterEndComment) xmlTextWriterEndComment __attribute((alias("xmlTextWriterEndComment__internal_alias")));
+#else
+#ifndef xmlTextWriterEndComment
+extern __typeof (xmlTextWriterEndComment) xmlTextWriterEndComment__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndComment xmlTextWriterEndComment__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndDTD
+extern __typeof (xmlTextWriterEndDTD) xmlTextWriterEndDTD __attribute((alias("xmlTextWriterEndDTD__internal_alias")));
+#else
+#ifndef xmlTextWriterEndDTD
+extern __typeof (xmlTextWriterEndDTD) xmlTextWriterEndDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndDTD xmlTextWriterEndDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndDTDAttlist
+extern __typeof (xmlTextWriterEndDTDAttlist) xmlTextWriterEndDTDAttlist __attribute((alias("xmlTextWriterEndDTDAttlist__internal_alias")));
+#else
+#ifndef xmlTextWriterEndDTDAttlist
+extern __typeof (xmlTextWriterEndDTDAttlist) xmlTextWriterEndDTDAttlist__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndDTDAttlist xmlTextWriterEndDTDAttlist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndDTDElement
+extern __typeof (xmlTextWriterEndDTDElement) xmlTextWriterEndDTDElement __attribute((alias("xmlTextWriterEndDTDElement__internal_alias")));
+#else
+#ifndef xmlTextWriterEndDTDElement
+extern __typeof (xmlTextWriterEndDTDElement) xmlTextWriterEndDTDElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndDTDElement xmlTextWriterEndDTDElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndDTDEntity
+extern __typeof (xmlTextWriterEndDTDEntity) xmlTextWriterEndDTDEntity __attribute((alias("xmlTextWriterEndDTDEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterEndDTDEntity
+extern __typeof (xmlTextWriterEndDTDEntity) xmlTextWriterEndDTDEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndDTDEntity xmlTextWriterEndDTDEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndDocument
+extern __typeof (xmlTextWriterEndDocument) xmlTextWriterEndDocument __attribute((alias("xmlTextWriterEndDocument__internal_alias")));
+#else
+#ifndef xmlTextWriterEndDocument
+extern __typeof (xmlTextWriterEndDocument) xmlTextWriterEndDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndDocument xmlTextWriterEndDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndElement
+extern __typeof (xmlTextWriterEndElement) xmlTextWriterEndElement __attribute((alias("xmlTextWriterEndElement__internal_alias")));
+#else
+#ifndef xmlTextWriterEndElement
+extern __typeof (xmlTextWriterEndElement) xmlTextWriterEndElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndElement xmlTextWriterEndElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterEndPI
+extern __typeof (xmlTextWriterEndPI) xmlTextWriterEndPI __attribute((alias("xmlTextWriterEndPI__internal_alias")));
+#else
+#ifndef xmlTextWriterEndPI
+extern __typeof (xmlTextWriterEndPI) xmlTextWriterEndPI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterEndPI xmlTextWriterEndPI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterFlush
+extern __typeof (xmlTextWriterFlush) xmlTextWriterFlush __attribute((alias("xmlTextWriterFlush__internal_alias")));
+#else
+#ifndef xmlTextWriterFlush
+extern __typeof (xmlTextWriterFlush) xmlTextWriterFlush__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterFlush xmlTextWriterFlush__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterFullEndElement
+extern __typeof (xmlTextWriterFullEndElement) xmlTextWriterFullEndElement __attribute((alias("xmlTextWriterFullEndElement__internal_alias")));
+#else
+#ifndef xmlTextWriterFullEndElement
+extern __typeof (xmlTextWriterFullEndElement) xmlTextWriterFullEndElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterFullEndElement xmlTextWriterFullEndElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterSetIndent
+extern __typeof (xmlTextWriterSetIndent) xmlTextWriterSetIndent __attribute((alias("xmlTextWriterSetIndent__internal_alias")));
+#else
+#ifndef xmlTextWriterSetIndent
+extern __typeof (xmlTextWriterSetIndent) xmlTextWriterSetIndent__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterSetIndent xmlTextWriterSetIndent__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterSetIndentString
+extern __typeof (xmlTextWriterSetIndentString) xmlTextWriterSetIndentString __attribute((alias("xmlTextWriterSetIndentString__internal_alias")));
+#else
+#ifndef xmlTextWriterSetIndentString
+extern __typeof (xmlTextWriterSetIndentString) xmlTextWriterSetIndentString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterSetIndentString xmlTextWriterSetIndentString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterSetQuoteChar
+extern __typeof (xmlTextWriterSetQuoteChar) xmlTextWriterSetQuoteChar __attribute((alias("xmlTextWriterSetQuoteChar__internal_alias")));
+#else
+#ifndef xmlTextWriterSetQuoteChar
+extern __typeof (xmlTextWriterSetQuoteChar) xmlTextWriterSetQuoteChar__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterSetQuoteChar xmlTextWriterSetQuoteChar__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartAttribute
+extern __typeof (xmlTextWriterStartAttribute) xmlTextWriterStartAttribute __attribute((alias("xmlTextWriterStartAttribute__internal_alias")));
+#else
+#ifndef xmlTextWriterStartAttribute
+extern __typeof (xmlTextWriterStartAttribute) xmlTextWriterStartAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartAttribute xmlTextWriterStartAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartAttributeNS
+extern __typeof (xmlTextWriterStartAttributeNS) xmlTextWriterStartAttributeNS __attribute((alias("xmlTextWriterStartAttributeNS__internal_alias")));
+#else
+#ifndef xmlTextWriterStartAttributeNS
+extern __typeof (xmlTextWriterStartAttributeNS) xmlTextWriterStartAttributeNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartAttributeNS xmlTextWriterStartAttributeNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartCDATA
+extern __typeof (xmlTextWriterStartCDATA) xmlTextWriterStartCDATA __attribute((alias("xmlTextWriterStartCDATA__internal_alias")));
+#else
+#ifndef xmlTextWriterStartCDATA
+extern __typeof (xmlTextWriterStartCDATA) xmlTextWriterStartCDATA__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartCDATA xmlTextWriterStartCDATA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartComment
+extern __typeof (xmlTextWriterStartComment) xmlTextWriterStartComment __attribute((alias("xmlTextWriterStartComment__internal_alias")));
+#else
+#ifndef xmlTextWriterStartComment
+extern __typeof (xmlTextWriterStartComment) xmlTextWriterStartComment__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartComment xmlTextWriterStartComment__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartDTD
+extern __typeof (xmlTextWriterStartDTD) xmlTextWriterStartDTD __attribute((alias("xmlTextWriterStartDTD__internal_alias")));
+#else
+#ifndef xmlTextWriterStartDTD
+extern __typeof (xmlTextWriterStartDTD) xmlTextWriterStartDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartDTD xmlTextWriterStartDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartDTDAttlist
+extern __typeof (xmlTextWriterStartDTDAttlist) xmlTextWriterStartDTDAttlist __attribute((alias("xmlTextWriterStartDTDAttlist__internal_alias")));
+#else
+#ifndef xmlTextWriterStartDTDAttlist
+extern __typeof (xmlTextWriterStartDTDAttlist) xmlTextWriterStartDTDAttlist__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartDTDAttlist xmlTextWriterStartDTDAttlist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartDTDElement
+extern __typeof (xmlTextWriterStartDTDElement) xmlTextWriterStartDTDElement __attribute((alias("xmlTextWriterStartDTDElement__internal_alias")));
+#else
+#ifndef xmlTextWriterStartDTDElement
+extern __typeof (xmlTextWriterStartDTDElement) xmlTextWriterStartDTDElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartDTDElement xmlTextWriterStartDTDElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartDTDEntity
+extern __typeof (xmlTextWriterStartDTDEntity) xmlTextWriterStartDTDEntity __attribute((alias("xmlTextWriterStartDTDEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterStartDTDEntity
+extern __typeof (xmlTextWriterStartDTDEntity) xmlTextWriterStartDTDEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartDTDEntity xmlTextWriterStartDTDEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartDocument
+extern __typeof (xmlTextWriterStartDocument) xmlTextWriterStartDocument __attribute((alias("xmlTextWriterStartDocument__internal_alias")));
+#else
+#ifndef xmlTextWriterStartDocument
+extern __typeof (xmlTextWriterStartDocument) xmlTextWriterStartDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartDocument xmlTextWriterStartDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartElement
+extern __typeof (xmlTextWriterStartElement) xmlTextWriterStartElement __attribute((alias("xmlTextWriterStartElement__internal_alias")));
+#else
+#ifndef xmlTextWriterStartElement
+extern __typeof (xmlTextWriterStartElement) xmlTextWriterStartElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartElement xmlTextWriterStartElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartElementNS
+extern __typeof (xmlTextWriterStartElementNS) xmlTextWriterStartElementNS __attribute((alias("xmlTextWriterStartElementNS__internal_alias")));
+#else
+#ifndef xmlTextWriterStartElementNS
+extern __typeof (xmlTextWriterStartElementNS) xmlTextWriterStartElementNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartElementNS xmlTextWriterStartElementNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterStartPI
+extern __typeof (xmlTextWriterStartPI) xmlTextWriterStartPI __attribute((alias("xmlTextWriterStartPI__internal_alias")));
+#else
+#ifndef xmlTextWriterStartPI
+extern __typeof (xmlTextWriterStartPI) xmlTextWriterStartPI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterStartPI xmlTextWriterStartPI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteAttribute
+extern __typeof (xmlTextWriterWriteAttribute) xmlTextWriterWriteAttribute __attribute((alias("xmlTextWriterWriteAttribute__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteAttribute
+extern __typeof (xmlTextWriterWriteAttribute) xmlTextWriterWriteAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteAttribute xmlTextWriterWriteAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteAttributeNS
+extern __typeof (xmlTextWriterWriteAttributeNS) xmlTextWriterWriteAttributeNS __attribute((alias("xmlTextWriterWriteAttributeNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteAttributeNS
+extern __typeof (xmlTextWriterWriteAttributeNS) xmlTextWriterWriteAttributeNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteAttributeNS xmlTextWriterWriteAttributeNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteBase64
+extern __typeof (xmlTextWriterWriteBase64) xmlTextWriterWriteBase64 __attribute((alias("xmlTextWriterWriteBase64__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteBase64
+extern __typeof (xmlTextWriterWriteBase64) xmlTextWriterWriteBase64__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteBase64 xmlTextWriterWriteBase64__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteBinHex
+extern __typeof (xmlTextWriterWriteBinHex) xmlTextWriterWriteBinHex __attribute((alias("xmlTextWriterWriteBinHex__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteBinHex
+extern __typeof (xmlTextWriterWriteBinHex) xmlTextWriterWriteBinHex__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteBinHex xmlTextWriterWriteBinHex__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteCDATA
+extern __typeof (xmlTextWriterWriteCDATA) xmlTextWriterWriteCDATA __attribute((alias("xmlTextWriterWriteCDATA__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteCDATA
+extern __typeof (xmlTextWriterWriteCDATA) xmlTextWriterWriteCDATA__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteCDATA xmlTextWriterWriteCDATA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteComment
+extern __typeof (xmlTextWriterWriteComment) xmlTextWriterWriteComment __attribute((alias("xmlTextWriterWriteComment__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteComment
+extern __typeof (xmlTextWriterWriteComment) xmlTextWriterWriteComment__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteComment xmlTextWriterWriteComment__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTD
+extern __typeof (xmlTextWriterWriteDTD) xmlTextWriterWriteDTD __attribute((alias("xmlTextWriterWriteDTD__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTD
+extern __typeof (xmlTextWriterWriteDTD) xmlTextWriterWriteDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTD xmlTextWriterWriteDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDAttlist
+extern __typeof (xmlTextWriterWriteDTDAttlist) xmlTextWriterWriteDTDAttlist __attribute((alias("xmlTextWriterWriteDTDAttlist__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDAttlist
+extern __typeof (xmlTextWriterWriteDTDAttlist) xmlTextWriterWriteDTDAttlist__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDAttlist xmlTextWriterWriteDTDAttlist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDElement
+extern __typeof (xmlTextWriterWriteDTDElement) xmlTextWriterWriteDTDElement __attribute((alias("xmlTextWriterWriteDTDElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDElement
+extern __typeof (xmlTextWriterWriteDTDElement) xmlTextWriterWriteDTDElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDElement xmlTextWriterWriteDTDElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDEntity
+extern __typeof (xmlTextWriterWriteDTDEntity) xmlTextWriterWriteDTDEntity __attribute((alias("xmlTextWriterWriteDTDEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDEntity
+extern __typeof (xmlTextWriterWriteDTDEntity) xmlTextWriterWriteDTDEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDEntity xmlTextWriterWriteDTDEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDExternalEntity
+extern __typeof (xmlTextWriterWriteDTDExternalEntity) xmlTextWriterWriteDTDExternalEntity __attribute((alias("xmlTextWriterWriteDTDExternalEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDExternalEntity
+extern __typeof (xmlTextWriterWriteDTDExternalEntity) xmlTextWriterWriteDTDExternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDExternalEntity xmlTextWriterWriteDTDExternalEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDExternalEntityContents
+extern __typeof (xmlTextWriterWriteDTDExternalEntityContents) xmlTextWriterWriteDTDExternalEntityContents __attribute((alias("xmlTextWriterWriteDTDExternalEntityContents__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDExternalEntityContents
+extern __typeof (xmlTextWriterWriteDTDExternalEntityContents) xmlTextWriterWriteDTDExternalEntityContents__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDExternalEntityContents xmlTextWriterWriteDTDExternalEntityContents__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDInternalEntity
+extern __typeof (xmlTextWriterWriteDTDInternalEntity) xmlTextWriterWriteDTDInternalEntity __attribute((alias("xmlTextWriterWriteDTDInternalEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDInternalEntity
+extern __typeof (xmlTextWriterWriteDTDInternalEntity) xmlTextWriterWriteDTDInternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDInternalEntity xmlTextWriterWriteDTDInternalEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteDTDNotation
+extern __typeof (xmlTextWriterWriteDTDNotation) xmlTextWriterWriteDTDNotation __attribute((alias("xmlTextWriterWriteDTDNotation__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteDTDNotation
+extern __typeof (xmlTextWriterWriteDTDNotation) xmlTextWriterWriteDTDNotation__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteDTDNotation xmlTextWriterWriteDTDNotation__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteElement
+extern __typeof (xmlTextWriterWriteElement) xmlTextWriterWriteElement __attribute((alias("xmlTextWriterWriteElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteElement
+extern __typeof (xmlTextWriterWriteElement) xmlTextWriterWriteElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteElement xmlTextWriterWriteElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteElementNS
+extern __typeof (xmlTextWriterWriteElementNS) xmlTextWriterWriteElementNS __attribute((alias("xmlTextWriterWriteElementNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteElementNS
+extern __typeof (xmlTextWriterWriteElementNS) xmlTextWriterWriteElementNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteElementNS xmlTextWriterWriteElementNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatAttribute
+extern __typeof (xmlTextWriterWriteFormatAttribute) xmlTextWriterWriteFormatAttribute __attribute((alias("xmlTextWriterWriteFormatAttribute__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatAttribute
+extern __typeof (xmlTextWriterWriteFormatAttribute) xmlTextWriterWriteFormatAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatAttribute xmlTextWriterWriteFormatAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatAttributeNS
+extern __typeof (xmlTextWriterWriteFormatAttributeNS) xmlTextWriterWriteFormatAttributeNS __attribute((alias("xmlTextWriterWriteFormatAttributeNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatAttributeNS
+extern __typeof (xmlTextWriterWriteFormatAttributeNS) xmlTextWriterWriteFormatAttributeNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatAttributeNS xmlTextWriterWriteFormatAttributeNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatCDATA
+extern __typeof (xmlTextWriterWriteFormatCDATA) xmlTextWriterWriteFormatCDATA __attribute((alias("xmlTextWriterWriteFormatCDATA__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatCDATA
+extern __typeof (xmlTextWriterWriteFormatCDATA) xmlTextWriterWriteFormatCDATA__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatCDATA xmlTextWriterWriteFormatCDATA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatComment
+extern __typeof (xmlTextWriterWriteFormatComment) xmlTextWriterWriteFormatComment __attribute((alias("xmlTextWriterWriteFormatComment__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatComment
+extern __typeof (xmlTextWriterWriteFormatComment) xmlTextWriterWriteFormatComment__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatComment xmlTextWriterWriteFormatComment__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatDTD
+extern __typeof (xmlTextWriterWriteFormatDTD) xmlTextWriterWriteFormatDTD __attribute((alias("xmlTextWriterWriteFormatDTD__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatDTD
+extern __typeof (xmlTextWriterWriteFormatDTD) xmlTextWriterWriteFormatDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatDTD xmlTextWriterWriteFormatDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatDTDAttlist
+extern __typeof (xmlTextWriterWriteFormatDTDAttlist) xmlTextWriterWriteFormatDTDAttlist __attribute((alias("xmlTextWriterWriteFormatDTDAttlist__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatDTDAttlist
+extern __typeof (xmlTextWriterWriteFormatDTDAttlist) xmlTextWriterWriteFormatDTDAttlist__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatDTDAttlist xmlTextWriterWriteFormatDTDAttlist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatDTDElement
+extern __typeof (xmlTextWriterWriteFormatDTDElement) xmlTextWriterWriteFormatDTDElement __attribute((alias("xmlTextWriterWriteFormatDTDElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatDTDElement
+extern __typeof (xmlTextWriterWriteFormatDTDElement) xmlTextWriterWriteFormatDTDElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatDTDElement xmlTextWriterWriteFormatDTDElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatDTDInternalEntity
+extern __typeof (xmlTextWriterWriteFormatDTDInternalEntity) xmlTextWriterWriteFormatDTDInternalEntity __attribute((alias("xmlTextWriterWriteFormatDTDInternalEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatDTDInternalEntity
+extern __typeof (xmlTextWriterWriteFormatDTDInternalEntity) xmlTextWriterWriteFormatDTDInternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatDTDInternalEntity xmlTextWriterWriteFormatDTDInternalEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatElement
+extern __typeof (xmlTextWriterWriteFormatElement) xmlTextWriterWriteFormatElement __attribute((alias("xmlTextWriterWriteFormatElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatElement
+extern __typeof (xmlTextWriterWriteFormatElement) xmlTextWriterWriteFormatElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatElement xmlTextWriterWriteFormatElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatElementNS
+extern __typeof (xmlTextWriterWriteFormatElementNS) xmlTextWriterWriteFormatElementNS __attribute((alias("xmlTextWriterWriteFormatElementNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatElementNS
+extern __typeof (xmlTextWriterWriteFormatElementNS) xmlTextWriterWriteFormatElementNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatElementNS xmlTextWriterWriteFormatElementNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatPI
+extern __typeof (xmlTextWriterWriteFormatPI) xmlTextWriterWriteFormatPI __attribute((alias("xmlTextWriterWriteFormatPI__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatPI
+extern __typeof (xmlTextWriterWriteFormatPI) xmlTextWriterWriteFormatPI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatPI xmlTextWriterWriteFormatPI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatRaw
+extern __typeof (xmlTextWriterWriteFormatRaw) xmlTextWriterWriteFormatRaw __attribute((alias("xmlTextWriterWriteFormatRaw__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatRaw
+extern __typeof (xmlTextWriterWriteFormatRaw) xmlTextWriterWriteFormatRaw__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatRaw xmlTextWriterWriteFormatRaw__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteFormatString
+extern __typeof (xmlTextWriterWriteFormatString) xmlTextWriterWriteFormatString __attribute((alias("xmlTextWriterWriteFormatString__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteFormatString
+extern __typeof (xmlTextWriterWriteFormatString) xmlTextWriterWriteFormatString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteFormatString xmlTextWriterWriteFormatString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWritePI
+extern __typeof (xmlTextWriterWritePI) xmlTextWriterWritePI __attribute((alias("xmlTextWriterWritePI__internal_alias")));
+#else
+#ifndef xmlTextWriterWritePI
+extern __typeof (xmlTextWriterWritePI) xmlTextWriterWritePI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWritePI xmlTextWriterWritePI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteRaw
+extern __typeof (xmlTextWriterWriteRaw) xmlTextWriterWriteRaw __attribute((alias("xmlTextWriterWriteRaw__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteRaw
+extern __typeof (xmlTextWriterWriteRaw) xmlTextWriterWriteRaw__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteRaw xmlTextWriterWriteRaw__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteRawLen
+extern __typeof (xmlTextWriterWriteRawLen) xmlTextWriterWriteRawLen __attribute((alias("xmlTextWriterWriteRawLen__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteRawLen
+extern __typeof (xmlTextWriterWriteRawLen) xmlTextWriterWriteRawLen__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteRawLen xmlTextWriterWriteRawLen__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteString
+extern __typeof (xmlTextWriterWriteString) xmlTextWriterWriteString __attribute((alias("xmlTextWriterWriteString__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteString
+extern __typeof (xmlTextWriterWriteString) xmlTextWriterWriteString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteString xmlTextWriterWriteString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatAttribute
+extern __typeof (xmlTextWriterWriteVFormatAttribute) xmlTextWriterWriteVFormatAttribute __attribute((alias("xmlTextWriterWriteVFormatAttribute__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatAttribute
+extern __typeof (xmlTextWriterWriteVFormatAttribute) xmlTextWriterWriteVFormatAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatAttribute xmlTextWriterWriteVFormatAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatAttributeNS
+extern __typeof (xmlTextWriterWriteVFormatAttributeNS) xmlTextWriterWriteVFormatAttributeNS __attribute((alias("xmlTextWriterWriteVFormatAttributeNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatAttributeNS
+extern __typeof (xmlTextWriterWriteVFormatAttributeNS) xmlTextWriterWriteVFormatAttributeNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatAttributeNS xmlTextWriterWriteVFormatAttributeNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatCDATA
+extern __typeof (xmlTextWriterWriteVFormatCDATA) xmlTextWriterWriteVFormatCDATA __attribute((alias("xmlTextWriterWriteVFormatCDATA__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatCDATA
+extern __typeof (xmlTextWriterWriteVFormatCDATA) xmlTextWriterWriteVFormatCDATA__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatCDATA xmlTextWriterWriteVFormatCDATA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatComment
+extern __typeof (xmlTextWriterWriteVFormatComment) xmlTextWriterWriteVFormatComment __attribute((alias("xmlTextWriterWriteVFormatComment__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatComment
+extern __typeof (xmlTextWriterWriteVFormatComment) xmlTextWriterWriteVFormatComment__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatComment xmlTextWriterWriteVFormatComment__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatDTD
+extern __typeof (xmlTextWriterWriteVFormatDTD) xmlTextWriterWriteVFormatDTD __attribute((alias("xmlTextWriterWriteVFormatDTD__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatDTD
+extern __typeof (xmlTextWriterWriteVFormatDTD) xmlTextWriterWriteVFormatDTD__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatDTD xmlTextWriterWriteVFormatDTD__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatDTDAttlist
+extern __typeof (xmlTextWriterWriteVFormatDTDAttlist) xmlTextWriterWriteVFormatDTDAttlist __attribute((alias("xmlTextWriterWriteVFormatDTDAttlist__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatDTDAttlist
+extern __typeof (xmlTextWriterWriteVFormatDTDAttlist) xmlTextWriterWriteVFormatDTDAttlist__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatDTDAttlist xmlTextWriterWriteVFormatDTDAttlist__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatDTDElement
+extern __typeof (xmlTextWriterWriteVFormatDTDElement) xmlTextWriterWriteVFormatDTDElement __attribute((alias("xmlTextWriterWriteVFormatDTDElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatDTDElement
+extern __typeof (xmlTextWriterWriteVFormatDTDElement) xmlTextWriterWriteVFormatDTDElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatDTDElement xmlTextWriterWriteVFormatDTDElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatDTDInternalEntity
+extern __typeof (xmlTextWriterWriteVFormatDTDInternalEntity) xmlTextWriterWriteVFormatDTDInternalEntity __attribute((alias("xmlTextWriterWriteVFormatDTDInternalEntity__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatDTDInternalEntity
+extern __typeof (xmlTextWriterWriteVFormatDTDInternalEntity) xmlTextWriterWriteVFormatDTDInternalEntity__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatDTDInternalEntity xmlTextWriterWriteVFormatDTDInternalEntity__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatElement
+extern __typeof (xmlTextWriterWriteVFormatElement) xmlTextWriterWriteVFormatElement __attribute((alias("xmlTextWriterWriteVFormatElement__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatElement
+extern __typeof (xmlTextWriterWriteVFormatElement) xmlTextWriterWriteVFormatElement__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatElement xmlTextWriterWriteVFormatElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatElementNS
+extern __typeof (xmlTextWriterWriteVFormatElementNS) xmlTextWriterWriteVFormatElementNS __attribute((alias("xmlTextWriterWriteVFormatElementNS__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatElementNS
+extern __typeof (xmlTextWriterWriteVFormatElementNS) xmlTextWriterWriteVFormatElementNS__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatElementNS xmlTextWriterWriteVFormatElementNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatPI
+extern __typeof (xmlTextWriterWriteVFormatPI) xmlTextWriterWriteVFormatPI __attribute((alias("xmlTextWriterWriteVFormatPI__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatPI
+extern __typeof (xmlTextWriterWriteVFormatPI) xmlTextWriterWriteVFormatPI__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatPI xmlTextWriterWriteVFormatPI__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatRaw
+extern __typeof (xmlTextWriterWriteVFormatRaw) xmlTextWriterWriteVFormatRaw __attribute((alias("xmlTextWriterWriteVFormatRaw__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatRaw
+extern __typeof (xmlTextWriterWriteVFormatRaw) xmlTextWriterWriteVFormatRaw__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatRaw xmlTextWriterWriteVFormatRaw__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_WRITER_ENABLED)
+#ifdef bottom_xmlwriter
+#undef xmlTextWriterWriteVFormatString
+extern __typeof (xmlTextWriterWriteVFormatString) xmlTextWriterWriteVFormatString __attribute((alias("xmlTextWriterWriteVFormatString__internal_alias")));
+#else
+#ifndef xmlTextWriterWriteVFormatString
+extern __typeof (xmlTextWriterWriteVFormatString) xmlTextWriterWriteVFormatString__internal_alias __attribute((visibility("hidden")));
+#define xmlTextWriterWriteVFormatString xmlTextWriterWriteVFormatString__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefBufferAllocScheme
+extern __typeof (xmlThrDefBufferAllocScheme) xmlThrDefBufferAllocScheme __attribute((alias("xmlThrDefBufferAllocScheme__internal_alias")));
+#else
+#ifndef xmlThrDefBufferAllocScheme
+extern __typeof (xmlThrDefBufferAllocScheme) xmlThrDefBufferAllocScheme__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefBufferAllocScheme xmlThrDefBufferAllocScheme__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefDefaultBufferSize
+extern __typeof (xmlThrDefDefaultBufferSize) xmlThrDefDefaultBufferSize __attribute((alias("xmlThrDefDefaultBufferSize__internal_alias")));
+#else
+#ifndef xmlThrDefDefaultBufferSize
+extern __typeof (xmlThrDefDefaultBufferSize) xmlThrDefDefaultBufferSize__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefDefaultBufferSize xmlThrDefDefaultBufferSize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefDeregisterNodeDefault
+extern __typeof (xmlThrDefDeregisterNodeDefault) xmlThrDefDeregisterNodeDefault __attribute((alias("xmlThrDefDeregisterNodeDefault__internal_alias")));
+#else
+#ifndef xmlThrDefDeregisterNodeDefault
+extern __typeof (xmlThrDefDeregisterNodeDefault) xmlThrDefDeregisterNodeDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefDeregisterNodeDefault xmlThrDefDeregisterNodeDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefDoValidityCheckingDefaultValue
+extern __typeof (xmlThrDefDoValidityCheckingDefaultValue) xmlThrDefDoValidityCheckingDefaultValue __attribute((alias("xmlThrDefDoValidityCheckingDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefDoValidityCheckingDefaultValue
+extern __typeof (xmlThrDefDoValidityCheckingDefaultValue) xmlThrDefDoValidityCheckingDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefDoValidityCheckingDefaultValue xmlThrDefDoValidityCheckingDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefGetWarningsDefaultValue
+extern __typeof (xmlThrDefGetWarningsDefaultValue) xmlThrDefGetWarningsDefaultValue __attribute((alias("xmlThrDefGetWarningsDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefGetWarningsDefaultValue
+extern __typeof (xmlThrDefGetWarningsDefaultValue) xmlThrDefGetWarningsDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefGetWarningsDefaultValue xmlThrDefGetWarningsDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefIndentTreeOutput
+extern __typeof (xmlThrDefIndentTreeOutput) xmlThrDefIndentTreeOutput __attribute((alias("xmlThrDefIndentTreeOutput__internal_alias")));
+#else
+#ifndef xmlThrDefIndentTreeOutput
+extern __typeof (xmlThrDefIndentTreeOutput) xmlThrDefIndentTreeOutput__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefIndentTreeOutput xmlThrDefIndentTreeOutput__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefKeepBlanksDefaultValue
+extern __typeof (xmlThrDefKeepBlanksDefaultValue) xmlThrDefKeepBlanksDefaultValue __attribute((alias("xmlThrDefKeepBlanksDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefKeepBlanksDefaultValue
+extern __typeof (xmlThrDefKeepBlanksDefaultValue) xmlThrDefKeepBlanksDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefKeepBlanksDefaultValue xmlThrDefKeepBlanksDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefLineNumbersDefaultValue
+extern __typeof (xmlThrDefLineNumbersDefaultValue) xmlThrDefLineNumbersDefaultValue __attribute((alias("xmlThrDefLineNumbersDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefLineNumbersDefaultValue
+extern __typeof (xmlThrDefLineNumbersDefaultValue) xmlThrDefLineNumbersDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefLineNumbersDefaultValue xmlThrDefLineNumbersDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefLoadExtDtdDefaultValue
+extern __typeof (xmlThrDefLoadExtDtdDefaultValue) xmlThrDefLoadExtDtdDefaultValue __attribute((alias("xmlThrDefLoadExtDtdDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefLoadExtDtdDefaultValue
+extern __typeof (xmlThrDefLoadExtDtdDefaultValue) xmlThrDefLoadExtDtdDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefLoadExtDtdDefaultValue xmlThrDefLoadExtDtdDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefOutputBufferCreateFilenameDefault
+extern __typeof (xmlThrDefOutputBufferCreateFilenameDefault) xmlThrDefOutputBufferCreateFilenameDefault __attribute((alias("xmlThrDefOutputBufferCreateFilenameDefault__internal_alias")));
+#else
+#ifndef xmlThrDefOutputBufferCreateFilenameDefault
+extern __typeof (xmlThrDefOutputBufferCreateFilenameDefault) xmlThrDefOutputBufferCreateFilenameDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefOutputBufferCreateFilenameDefault xmlThrDefOutputBufferCreateFilenameDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefParserDebugEntities
+extern __typeof (xmlThrDefParserDebugEntities) xmlThrDefParserDebugEntities __attribute((alias("xmlThrDefParserDebugEntities__internal_alias")));
+#else
+#ifndef xmlThrDefParserDebugEntities
+extern __typeof (xmlThrDefParserDebugEntities) xmlThrDefParserDebugEntities__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefParserDebugEntities xmlThrDefParserDebugEntities__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefParserInputBufferCreateFilenameDefault
+extern __typeof (xmlThrDefParserInputBufferCreateFilenameDefault) xmlThrDefParserInputBufferCreateFilenameDefault __attribute((alias("xmlThrDefParserInputBufferCreateFilenameDefault__internal_alias")));
+#else
+#ifndef xmlThrDefParserInputBufferCreateFilenameDefault
+extern __typeof (xmlThrDefParserInputBufferCreateFilenameDefault) xmlThrDefParserInputBufferCreateFilenameDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefParserInputBufferCreateFilenameDefault xmlThrDefParserInputBufferCreateFilenameDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefPedanticParserDefaultValue
+extern __typeof (xmlThrDefPedanticParserDefaultValue) xmlThrDefPedanticParserDefaultValue __attribute((alias("xmlThrDefPedanticParserDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefPedanticParserDefaultValue
+extern __typeof (xmlThrDefPedanticParserDefaultValue) xmlThrDefPedanticParserDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefPedanticParserDefaultValue xmlThrDefPedanticParserDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefRegisterNodeDefault
+extern __typeof (xmlThrDefRegisterNodeDefault) xmlThrDefRegisterNodeDefault __attribute((alias("xmlThrDefRegisterNodeDefault__internal_alias")));
+#else
+#ifndef xmlThrDefRegisterNodeDefault
+extern __typeof (xmlThrDefRegisterNodeDefault) xmlThrDefRegisterNodeDefault__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefRegisterNodeDefault xmlThrDefRegisterNodeDefault__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefSaveNoEmptyTags
+extern __typeof (xmlThrDefSaveNoEmptyTags) xmlThrDefSaveNoEmptyTags __attribute((alias("xmlThrDefSaveNoEmptyTags__internal_alias")));
+#else
+#ifndef xmlThrDefSaveNoEmptyTags
+extern __typeof (xmlThrDefSaveNoEmptyTags) xmlThrDefSaveNoEmptyTags__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefSaveNoEmptyTags xmlThrDefSaveNoEmptyTags__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefSetGenericErrorFunc
+extern __typeof (xmlThrDefSetGenericErrorFunc) xmlThrDefSetGenericErrorFunc __attribute((alias("xmlThrDefSetGenericErrorFunc__internal_alias")));
+#else
+#ifndef xmlThrDefSetGenericErrorFunc
+extern __typeof (xmlThrDefSetGenericErrorFunc) xmlThrDefSetGenericErrorFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefSetGenericErrorFunc xmlThrDefSetGenericErrorFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefSetStructuredErrorFunc
+extern __typeof (xmlThrDefSetStructuredErrorFunc) xmlThrDefSetStructuredErrorFunc __attribute((alias("xmlThrDefSetStructuredErrorFunc__internal_alias")));
+#else
+#ifndef xmlThrDefSetStructuredErrorFunc
+extern __typeof (xmlThrDefSetStructuredErrorFunc) xmlThrDefSetStructuredErrorFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefSetStructuredErrorFunc xmlThrDefSetStructuredErrorFunc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefSubstituteEntitiesDefaultValue
+extern __typeof (xmlThrDefSubstituteEntitiesDefaultValue) xmlThrDefSubstituteEntitiesDefaultValue __attribute((alias("xmlThrDefSubstituteEntitiesDefaultValue__internal_alias")));
+#else
+#ifndef xmlThrDefSubstituteEntitiesDefaultValue
+extern __typeof (xmlThrDefSubstituteEntitiesDefaultValue) xmlThrDefSubstituteEntitiesDefaultValue__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefSubstituteEntitiesDefaultValue xmlThrDefSubstituteEntitiesDefaultValue__internal_alias
+#endif
+#endif
+
+#ifdef bottom_globals
+#undef xmlThrDefTreeIndentString
+extern __typeof (xmlThrDefTreeIndentString) xmlThrDefTreeIndentString __attribute((alias("xmlThrDefTreeIndentString__internal_alias")));
+#else
+#ifndef xmlThrDefTreeIndentString
+extern __typeof (xmlThrDefTreeIndentString) xmlThrDefTreeIndentString__internal_alias __attribute((visibility("hidden")));
+#define xmlThrDefTreeIndentString xmlThrDefTreeIndentString__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsAegeanNumbers
+extern __typeof (xmlUCSIsAegeanNumbers) xmlUCSIsAegeanNumbers __attribute((alias("xmlUCSIsAegeanNumbers__internal_alias")));
+#else
+#ifndef xmlUCSIsAegeanNumbers
+extern __typeof (xmlUCSIsAegeanNumbers) xmlUCSIsAegeanNumbers__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsAegeanNumbers xmlUCSIsAegeanNumbers__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsAlphabeticPresentationForms
+extern __typeof (xmlUCSIsAlphabeticPresentationForms) xmlUCSIsAlphabeticPresentationForms __attribute((alias("xmlUCSIsAlphabeticPresentationForms__internal_alias")));
+#else
+#ifndef xmlUCSIsAlphabeticPresentationForms
+extern __typeof (xmlUCSIsAlphabeticPresentationForms) xmlUCSIsAlphabeticPresentationForms__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsAlphabeticPresentationForms xmlUCSIsAlphabeticPresentationForms__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsArabic
+extern __typeof (xmlUCSIsArabic) xmlUCSIsArabic __attribute((alias("xmlUCSIsArabic__internal_alias")));
+#else
+#ifndef xmlUCSIsArabic
+extern __typeof (xmlUCSIsArabic) xmlUCSIsArabic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsArabic xmlUCSIsArabic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsArabicPresentationFormsA
+extern __typeof (xmlUCSIsArabicPresentationFormsA) xmlUCSIsArabicPresentationFormsA __attribute((alias("xmlUCSIsArabicPresentationFormsA__internal_alias")));
+#else
+#ifndef xmlUCSIsArabicPresentationFormsA
+extern __typeof (xmlUCSIsArabicPresentationFormsA) xmlUCSIsArabicPresentationFormsA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsArabicPresentationFormsA xmlUCSIsArabicPresentationFormsA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsArabicPresentationFormsB
+extern __typeof (xmlUCSIsArabicPresentationFormsB) xmlUCSIsArabicPresentationFormsB __attribute((alias("xmlUCSIsArabicPresentationFormsB__internal_alias")));
+#else
+#ifndef xmlUCSIsArabicPresentationFormsB
+extern __typeof (xmlUCSIsArabicPresentationFormsB) xmlUCSIsArabicPresentationFormsB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsArabicPresentationFormsB xmlUCSIsArabicPresentationFormsB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsArmenian
+extern __typeof (xmlUCSIsArmenian) xmlUCSIsArmenian __attribute((alias("xmlUCSIsArmenian__internal_alias")));
+#else
+#ifndef xmlUCSIsArmenian
+extern __typeof (xmlUCSIsArmenian) xmlUCSIsArmenian__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsArmenian xmlUCSIsArmenian__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsArrows
+extern __typeof (xmlUCSIsArrows) xmlUCSIsArrows __attribute((alias("xmlUCSIsArrows__internal_alias")));
+#else
+#ifndef xmlUCSIsArrows
+extern __typeof (xmlUCSIsArrows) xmlUCSIsArrows__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsArrows xmlUCSIsArrows__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBasicLatin
+extern __typeof (xmlUCSIsBasicLatin) xmlUCSIsBasicLatin __attribute((alias("xmlUCSIsBasicLatin__internal_alias")));
+#else
+#ifndef xmlUCSIsBasicLatin
+extern __typeof (xmlUCSIsBasicLatin) xmlUCSIsBasicLatin__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBasicLatin xmlUCSIsBasicLatin__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBengali
+extern __typeof (xmlUCSIsBengali) xmlUCSIsBengali __attribute((alias("xmlUCSIsBengali__internal_alias")));
+#else
+#ifndef xmlUCSIsBengali
+extern __typeof (xmlUCSIsBengali) xmlUCSIsBengali__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBengali xmlUCSIsBengali__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBlock
+extern __typeof (xmlUCSIsBlock) xmlUCSIsBlock __attribute((alias("xmlUCSIsBlock__internal_alias")));
+#else
+#ifndef xmlUCSIsBlock
+extern __typeof (xmlUCSIsBlock) xmlUCSIsBlock__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBlock xmlUCSIsBlock__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBlockElements
+extern __typeof (xmlUCSIsBlockElements) xmlUCSIsBlockElements __attribute((alias("xmlUCSIsBlockElements__internal_alias")));
+#else
+#ifndef xmlUCSIsBlockElements
+extern __typeof (xmlUCSIsBlockElements) xmlUCSIsBlockElements__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBlockElements xmlUCSIsBlockElements__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBopomofo
+extern __typeof (xmlUCSIsBopomofo) xmlUCSIsBopomofo __attribute((alias("xmlUCSIsBopomofo__internal_alias")));
+#else
+#ifndef xmlUCSIsBopomofo
+extern __typeof (xmlUCSIsBopomofo) xmlUCSIsBopomofo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBopomofo xmlUCSIsBopomofo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBopomofoExtended
+extern __typeof (xmlUCSIsBopomofoExtended) xmlUCSIsBopomofoExtended __attribute((alias("xmlUCSIsBopomofoExtended__internal_alias")));
+#else
+#ifndef xmlUCSIsBopomofoExtended
+extern __typeof (xmlUCSIsBopomofoExtended) xmlUCSIsBopomofoExtended__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBopomofoExtended xmlUCSIsBopomofoExtended__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBoxDrawing
+extern __typeof (xmlUCSIsBoxDrawing) xmlUCSIsBoxDrawing __attribute((alias("xmlUCSIsBoxDrawing__internal_alias")));
+#else
+#ifndef xmlUCSIsBoxDrawing
+extern __typeof (xmlUCSIsBoxDrawing) xmlUCSIsBoxDrawing__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBoxDrawing xmlUCSIsBoxDrawing__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBraillePatterns
+extern __typeof (xmlUCSIsBraillePatterns) xmlUCSIsBraillePatterns __attribute((alias("xmlUCSIsBraillePatterns__internal_alias")));
+#else
+#ifndef xmlUCSIsBraillePatterns
+extern __typeof (xmlUCSIsBraillePatterns) xmlUCSIsBraillePatterns__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBraillePatterns xmlUCSIsBraillePatterns__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsBuhid
+extern __typeof (xmlUCSIsBuhid) xmlUCSIsBuhid __attribute((alias("xmlUCSIsBuhid__internal_alias")));
+#else
+#ifndef xmlUCSIsBuhid
+extern __typeof (xmlUCSIsBuhid) xmlUCSIsBuhid__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsBuhid xmlUCSIsBuhid__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsByzantineMusicalSymbols
+extern __typeof (xmlUCSIsByzantineMusicalSymbols) xmlUCSIsByzantineMusicalSymbols __attribute((alias("xmlUCSIsByzantineMusicalSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsByzantineMusicalSymbols
+extern __typeof (xmlUCSIsByzantineMusicalSymbols) xmlUCSIsByzantineMusicalSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsByzantineMusicalSymbols xmlUCSIsByzantineMusicalSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKCompatibility
+extern __typeof (xmlUCSIsCJKCompatibility) xmlUCSIsCJKCompatibility __attribute((alias("xmlUCSIsCJKCompatibility__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKCompatibility
+extern __typeof (xmlUCSIsCJKCompatibility) xmlUCSIsCJKCompatibility__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKCompatibility xmlUCSIsCJKCompatibility__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKCompatibilityForms
+extern __typeof (xmlUCSIsCJKCompatibilityForms) xmlUCSIsCJKCompatibilityForms __attribute((alias("xmlUCSIsCJKCompatibilityForms__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKCompatibilityForms
+extern __typeof (xmlUCSIsCJKCompatibilityForms) xmlUCSIsCJKCompatibilityForms__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKCompatibilityForms xmlUCSIsCJKCompatibilityForms__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKCompatibilityIdeographs
+extern __typeof (xmlUCSIsCJKCompatibilityIdeographs) xmlUCSIsCJKCompatibilityIdeographs __attribute((alias("xmlUCSIsCJKCompatibilityIdeographs__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKCompatibilityIdeographs
+extern __typeof (xmlUCSIsCJKCompatibilityIdeographs) xmlUCSIsCJKCompatibilityIdeographs__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKCompatibilityIdeographs xmlUCSIsCJKCompatibilityIdeographs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKCompatibilityIdeographsSupplement
+extern __typeof (xmlUCSIsCJKCompatibilityIdeographsSupplement) xmlUCSIsCJKCompatibilityIdeographsSupplement __attribute((alias("xmlUCSIsCJKCompatibilityIdeographsSupplement__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKCompatibilityIdeographsSupplement
+extern __typeof (xmlUCSIsCJKCompatibilityIdeographsSupplement) xmlUCSIsCJKCompatibilityIdeographsSupplement__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKCompatibilityIdeographsSupplement xmlUCSIsCJKCompatibilityIdeographsSupplement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKRadicalsSupplement
+extern __typeof (xmlUCSIsCJKRadicalsSupplement) xmlUCSIsCJKRadicalsSupplement __attribute((alias("xmlUCSIsCJKRadicalsSupplement__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKRadicalsSupplement
+extern __typeof (xmlUCSIsCJKRadicalsSupplement) xmlUCSIsCJKRadicalsSupplement__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKRadicalsSupplement xmlUCSIsCJKRadicalsSupplement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKSymbolsandPunctuation
+extern __typeof (xmlUCSIsCJKSymbolsandPunctuation) xmlUCSIsCJKSymbolsandPunctuation __attribute((alias("xmlUCSIsCJKSymbolsandPunctuation__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKSymbolsandPunctuation
+extern __typeof (xmlUCSIsCJKSymbolsandPunctuation) xmlUCSIsCJKSymbolsandPunctuation__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKSymbolsandPunctuation xmlUCSIsCJKSymbolsandPunctuation__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKUnifiedIdeographs
+extern __typeof (xmlUCSIsCJKUnifiedIdeographs) xmlUCSIsCJKUnifiedIdeographs __attribute((alias("xmlUCSIsCJKUnifiedIdeographs__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKUnifiedIdeographs
+extern __typeof (xmlUCSIsCJKUnifiedIdeographs) xmlUCSIsCJKUnifiedIdeographs__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKUnifiedIdeographs xmlUCSIsCJKUnifiedIdeographs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKUnifiedIdeographsExtensionA
+extern __typeof (xmlUCSIsCJKUnifiedIdeographsExtensionA) xmlUCSIsCJKUnifiedIdeographsExtensionA __attribute((alias("xmlUCSIsCJKUnifiedIdeographsExtensionA__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKUnifiedIdeographsExtensionA
+extern __typeof (xmlUCSIsCJKUnifiedIdeographsExtensionA) xmlUCSIsCJKUnifiedIdeographsExtensionA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKUnifiedIdeographsExtensionA xmlUCSIsCJKUnifiedIdeographsExtensionA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCJKUnifiedIdeographsExtensionB
+extern __typeof (xmlUCSIsCJKUnifiedIdeographsExtensionB) xmlUCSIsCJKUnifiedIdeographsExtensionB __attribute((alias("xmlUCSIsCJKUnifiedIdeographsExtensionB__internal_alias")));
+#else
+#ifndef xmlUCSIsCJKUnifiedIdeographsExtensionB
+extern __typeof (xmlUCSIsCJKUnifiedIdeographsExtensionB) xmlUCSIsCJKUnifiedIdeographsExtensionB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCJKUnifiedIdeographsExtensionB xmlUCSIsCJKUnifiedIdeographsExtensionB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCat
+extern __typeof (xmlUCSIsCat) xmlUCSIsCat __attribute((alias("xmlUCSIsCat__internal_alias")));
+#else
+#ifndef xmlUCSIsCat
+extern __typeof (xmlUCSIsCat) xmlUCSIsCat__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCat xmlUCSIsCat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatC
+extern __typeof (xmlUCSIsCatC) xmlUCSIsCatC __attribute((alias("xmlUCSIsCatC__internal_alias")));
+#else
+#ifndef xmlUCSIsCatC
+extern __typeof (xmlUCSIsCatC) xmlUCSIsCatC__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatC xmlUCSIsCatC__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatCc
+extern __typeof (xmlUCSIsCatCc) xmlUCSIsCatCc __attribute((alias("xmlUCSIsCatCc__internal_alias")));
+#else
+#ifndef xmlUCSIsCatCc
+extern __typeof (xmlUCSIsCatCc) xmlUCSIsCatCc__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatCc xmlUCSIsCatCc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatCf
+extern __typeof (xmlUCSIsCatCf) xmlUCSIsCatCf __attribute((alias("xmlUCSIsCatCf__internal_alias")));
+#else
+#ifndef xmlUCSIsCatCf
+extern __typeof (xmlUCSIsCatCf) xmlUCSIsCatCf__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatCf xmlUCSIsCatCf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatCo
+extern __typeof (xmlUCSIsCatCo) xmlUCSIsCatCo __attribute((alias("xmlUCSIsCatCo__internal_alias")));
+#else
+#ifndef xmlUCSIsCatCo
+extern __typeof (xmlUCSIsCatCo) xmlUCSIsCatCo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatCo xmlUCSIsCatCo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatCs
+extern __typeof (xmlUCSIsCatCs) xmlUCSIsCatCs __attribute((alias("xmlUCSIsCatCs__internal_alias")));
+#else
+#ifndef xmlUCSIsCatCs
+extern __typeof (xmlUCSIsCatCs) xmlUCSIsCatCs__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatCs xmlUCSIsCatCs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatL
+extern __typeof (xmlUCSIsCatL) xmlUCSIsCatL __attribute((alias("xmlUCSIsCatL__internal_alias")));
+#else
+#ifndef xmlUCSIsCatL
+extern __typeof (xmlUCSIsCatL) xmlUCSIsCatL__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatL xmlUCSIsCatL__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatLl
+extern __typeof (xmlUCSIsCatLl) xmlUCSIsCatLl __attribute((alias("xmlUCSIsCatLl__internal_alias")));
+#else
+#ifndef xmlUCSIsCatLl
+extern __typeof (xmlUCSIsCatLl) xmlUCSIsCatLl__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatLl xmlUCSIsCatLl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatLm
+extern __typeof (xmlUCSIsCatLm) xmlUCSIsCatLm __attribute((alias("xmlUCSIsCatLm__internal_alias")));
+#else
+#ifndef xmlUCSIsCatLm
+extern __typeof (xmlUCSIsCatLm) xmlUCSIsCatLm__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatLm xmlUCSIsCatLm__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatLo
+extern __typeof (xmlUCSIsCatLo) xmlUCSIsCatLo __attribute((alias("xmlUCSIsCatLo__internal_alias")));
+#else
+#ifndef xmlUCSIsCatLo
+extern __typeof (xmlUCSIsCatLo) xmlUCSIsCatLo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatLo xmlUCSIsCatLo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatLt
+extern __typeof (xmlUCSIsCatLt) xmlUCSIsCatLt __attribute((alias("xmlUCSIsCatLt__internal_alias")));
+#else
+#ifndef xmlUCSIsCatLt
+extern __typeof (xmlUCSIsCatLt) xmlUCSIsCatLt__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatLt xmlUCSIsCatLt__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatLu
+extern __typeof (xmlUCSIsCatLu) xmlUCSIsCatLu __attribute((alias("xmlUCSIsCatLu__internal_alias")));
+#else
+#ifndef xmlUCSIsCatLu
+extern __typeof (xmlUCSIsCatLu) xmlUCSIsCatLu__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatLu xmlUCSIsCatLu__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatM
+extern __typeof (xmlUCSIsCatM) xmlUCSIsCatM __attribute((alias("xmlUCSIsCatM__internal_alias")));
+#else
+#ifndef xmlUCSIsCatM
+extern __typeof (xmlUCSIsCatM) xmlUCSIsCatM__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatM xmlUCSIsCatM__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatMc
+extern __typeof (xmlUCSIsCatMc) xmlUCSIsCatMc __attribute((alias("xmlUCSIsCatMc__internal_alias")));
+#else
+#ifndef xmlUCSIsCatMc
+extern __typeof (xmlUCSIsCatMc) xmlUCSIsCatMc__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatMc xmlUCSIsCatMc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatMe
+extern __typeof (xmlUCSIsCatMe) xmlUCSIsCatMe __attribute((alias("xmlUCSIsCatMe__internal_alias")));
+#else
+#ifndef xmlUCSIsCatMe
+extern __typeof (xmlUCSIsCatMe) xmlUCSIsCatMe__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatMe xmlUCSIsCatMe__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatMn
+extern __typeof (xmlUCSIsCatMn) xmlUCSIsCatMn __attribute((alias("xmlUCSIsCatMn__internal_alias")));
+#else
+#ifndef xmlUCSIsCatMn
+extern __typeof (xmlUCSIsCatMn) xmlUCSIsCatMn__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatMn xmlUCSIsCatMn__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatN
+extern __typeof (xmlUCSIsCatN) xmlUCSIsCatN __attribute((alias("xmlUCSIsCatN__internal_alias")));
+#else
+#ifndef xmlUCSIsCatN
+extern __typeof (xmlUCSIsCatN) xmlUCSIsCatN__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatN xmlUCSIsCatN__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatNd
+extern __typeof (xmlUCSIsCatNd) xmlUCSIsCatNd __attribute((alias("xmlUCSIsCatNd__internal_alias")));
+#else
+#ifndef xmlUCSIsCatNd
+extern __typeof (xmlUCSIsCatNd) xmlUCSIsCatNd__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatNd xmlUCSIsCatNd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatNl
+extern __typeof (xmlUCSIsCatNl) xmlUCSIsCatNl __attribute((alias("xmlUCSIsCatNl__internal_alias")));
+#else
+#ifndef xmlUCSIsCatNl
+extern __typeof (xmlUCSIsCatNl) xmlUCSIsCatNl__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatNl xmlUCSIsCatNl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatNo
+extern __typeof (xmlUCSIsCatNo) xmlUCSIsCatNo __attribute((alias("xmlUCSIsCatNo__internal_alias")));
+#else
+#ifndef xmlUCSIsCatNo
+extern __typeof (xmlUCSIsCatNo) xmlUCSIsCatNo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatNo xmlUCSIsCatNo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatP
+extern __typeof (xmlUCSIsCatP) xmlUCSIsCatP __attribute((alias("xmlUCSIsCatP__internal_alias")));
+#else
+#ifndef xmlUCSIsCatP
+extern __typeof (xmlUCSIsCatP) xmlUCSIsCatP__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatP xmlUCSIsCatP__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPc
+extern __typeof (xmlUCSIsCatPc) xmlUCSIsCatPc __attribute((alias("xmlUCSIsCatPc__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPc
+extern __typeof (xmlUCSIsCatPc) xmlUCSIsCatPc__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPc xmlUCSIsCatPc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPd
+extern __typeof (xmlUCSIsCatPd) xmlUCSIsCatPd __attribute((alias("xmlUCSIsCatPd__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPd
+extern __typeof (xmlUCSIsCatPd) xmlUCSIsCatPd__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPd xmlUCSIsCatPd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPe
+extern __typeof (xmlUCSIsCatPe) xmlUCSIsCatPe __attribute((alias("xmlUCSIsCatPe__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPe
+extern __typeof (xmlUCSIsCatPe) xmlUCSIsCatPe__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPe xmlUCSIsCatPe__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPf
+extern __typeof (xmlUCSIsCatPf) xmlUCSIsCatPf __attribute((alias("xmlUCSIsCatPf__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPf
+extern __typeof (xmlUCSIsCatPf) xmlUCSIsCatPf__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPf xmlUCSIsCatPf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPi
+extern __typeof (xmlUCSIsCatPi) xmlUCSIsCatPi __attribute((alias("xmlUCSIsCatPi__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPi
+extern __typeof (xmlUCSIsCatPi) xmlUCSIsCatPi__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPi xmlUCSIsCatPi__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPo
+extern __typeof (xmlUCSIsCatPo) xmlUCSIsCatPo __attribute((alias("xmlUCSIsCatPo__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPo
+extern __typeof (xmlUCSIsCatPo) xmlUCSIsCatPo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPo xmlUCSIsCatPo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatPs
+extern __typeof (xmlUCSIsCatPs) xmlUCSIsCatPs __attribute((alias("xmlUCSIsCatPs__internal_alias")));
+#else
+#ifndef xmlUCSIsCatPs
+extern __typeof (xmlUCSIsCatPs) xmlUCSIsCatPs__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatPs xmlUCSIsCatPs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatS
+extern __typeof (xmlUCSIsCatS) xmlUCSIsCatS __attribute((alias("xmlUCSIsCatS__internal_alias")));
+#else
+#ifndef xmlUCSIsCatS
+extern __typeof (xmlUCSIsCatS) xmlUCSIsCatS__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatS xmlUCSIsCatS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatSc
+extern __typeof (xmlUCSIsCatSc) xmlUCSIsCatSc __attribute((alias("xmlUCSIsCatSc__internal_alias")));
+#else
+#ifndef xmlUCSIsCatSc
+extern __typeof (xmlUCSIsCatSc) xmlUCSIsCatSc__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatSc xmlUCSIsCatSc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatSk
+extern __typeof (xmlUCSIsCatSk) xmlUCSIsCatSk __attribute((alias("xmlUCSIsCatSk__internal_alias")));
+#else
+#ifndef xmlUCSIsCatSk
+extern __typeof (xmlUCSIsCatSk) xmlUCSIsCatSk__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatSk xmlUCSIsCatSk__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatSm
+extern __typeof (xmlUCSIsCatSm) xmlUCSIsCatSm __attribute((alias("xmlUCSIsCatSm__internal_alias")));
+#else
+#ifndef xmlUCSIsCatSm
+extern __typeof (xmlUCSIsCatSm) xmlUCSIsCatSm__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatSm xmlUCSIsCatSm__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatSo
+extern __typeof (xmlUCSIsCatSo) xmlUCSIsCatSo __attribute((alias("xmlUCSIsCatSo__internal_alias")));
+#else
+#ifndef xmlUCSIsCatSo
+extern __typeof (xmlUCSIsCatSo) xmlUCSIsCatSo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatSo xmlUCSIsCatSo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatZ
+extern __typeof (xmlUCSIsCatZ) xmlUCSIsCatZ __attribute((alias("xmlUCSIsCatZ__internal_alias")));
+#else
+#ifndef xmlUCSIsCatZ
+extern __typeof (xmlUCSIsCatZ) xmlUCSIsCatZ__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatZ xmlUCSIsCatZ__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatZl
+extern __typeof (xmlUCSIsCatZl) xmlUCSIsCatZl __attribute((alias("xmlUCSIsCatZl__internal_alias")));
+#else
+#ifndef xmlUCSIsCatZl
+extern __typeof (xmlUCSIsCatZl) xmlUCSIsCatZl__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatZl xmlUCSIsCatZl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatZp
+extern __typeof (xmlUCSIsCatZp) xmlUCSIsCatZp __attribute((alias("xmlUCSIsCatZp__internal_alias")));
+#else
+#ifndef xmlUCSIsCatZp
+extern __typeof (xmlUCSIsCatZp) xmlUCSIsCatZp__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatZp xmlUCSIsCatZp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCatZs
+extern __typeof (xmlUCSIsCatZs) xmlUCSIsCatZs __attribute((alias("xmlUCSIsCatZs__internal_alias")));
+#else
+#ifndef xmlUCSIsCatZs
+extern __typeof (xmlUCSIsCatZs) xmlUCSIsCatZs__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCatZs xmlUCSIsCatZs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCherokee
+extern __typeof (xmlUCSIsCherokee) xmlUCSIsCherokee __attribute((alias("xmlUCSIsCherokee__internal_alias")));
+#else
+#ifndef xmlUCSIsCherokee
+extern __typeof (xmlUCSIsCherokee) xmlUCSIsCherokee__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCherokee xmlUCSIsCherokee__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCombiningDiacriticalMarks
+extern __typeof (xmlUCSIsCombiningDiacriticalMarks) xmlUCSIsCombiningDiacriticalMarks __attribute((alias("xmlUCSIsCombiningDiacriticalMarks__internal_alias")));
+#else
+#ifndef xmlUCSIsCombiningDiacriticalMarks
+extern __typeof (xmlUCSIsCombiningDiacriticalMarks) xmlUCSIsCombiningDiacriticalMarks__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCombiningDiacriticalMarks xmlUCSIsCombiningDiacriticalMarks__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCombiningDiacriticalMarksforSymbols
+extern __typeof (xmlUCSIsCombiningDiacriticalMarksforSymbols) xmlUCSIsCombiningDiacriticalMarksforSymbols __attribute((alias("xmlUCSIsCombiningDiacriticalMarksforSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsCombiningDiacriticalMarksforSymbols
+extern __typeof (xmlUCSIsCombiningDiacriticalMarksforSymbols) xmlUCSIsCombiningDiacriticalMarksforSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCombiningDiacriticalMarksforSymbols xmlUCSIsCombiningDiacriticalMarksforSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCombiningHalfMarks
+extern __typeof (xmlUCSIsCombiningHalfMarks) xmlUCSIsCombiningHalfMarks __attribute((alias("xmlUCSIsCombiningHalfMarks__internal_alias")));
+#else
+#ifndef xmlUCSIsCombiningHalfMarks
+extern __typeof (xmlUCSIsCombiningHalfMarks) xmlUCSIsCombiningHalfMarks__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCombiningHalfMarks xmlUCSIsCombiningHalfMarks__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCombiningMarksforSymbols
+extern __typeof (xmlUCSIsCombiningMarksforSymbols) xmlUCSIsCombiningMarksforSymbols __attribute((alias("xmlUCSIsCombiningMarksforSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsCombiningMarksforSymbols
+extern __typeof (xmlUCSIsCombiningMarksforSymbols) xmlUCSIsCombiningMarksforSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCombiningMarksforSymbols xmlUCSIsCombiningMarksforSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsControlPictures
+extern __typeof (xmlUCSIsControlPictures) xmlUCSIsControlPictures __attribute((alias("xmlUCSIsControlPictures__internal_alias")));
+#else
+#ifndef xmlUCSIsControlPictures
+extern __typeof (xmlUCSIsControlPictures) xmlUCSIsControlPictures__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsControlPictures xmlUCSIsControlPictures__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCurrencySymbols
+extern __typeof (xmlUCSIsCurrencySymbols) xmlUCSIsCurrencySymbols __attribute((alias("xmlUCSIsCurrencySymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsCurrencySymbols
+extern __typeof (xmlUCSIsCurrencySymbols) xmlUCSIsCurrencySymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCurrencySymbols xmlUCSIsCurrencySymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCypriotSyllabary
+extern __typeof (xmlUCSIsCypriotSyllabary) xmlUCSIsCypriotSyllabary __attribute((alias("xmlUCSIsCypriotSyllabary__internal_alias")));
+#else
+#ifndef xmlUCSIsCypriotSyllabary
+extern __typeof (xmlUCSIsCypriotSyllabary) xmlUCSIsCypriotSyllabary__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCypriotSyllabary xmlUCSIsCypriotSyllabary__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCyrillic
+extern __typeof (xmlUCSIsCyrillic) xmlUCSIsCyrillic __attribute((alias("xmlUCSIsCyrillic__internal_alias")));
+#else
+#ifndef xmlUCSIsCyrillic
+extern __typeof (xmlUCSIsCyrillic) xmlUCSIsCyrillic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCyrillic xmlUCSIsCyrillic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsCyrillicSupplement
+extern __typeof (xmlUCSIsCyrillicSupplement) xmlUCSIsCyrillicSupplement __attribute((alias("xmlUCSIsCyrillicSupplement__internal_alias")));
+#else
+#ifndef xmlUCSIsCyrillicSupplement
+extern __typeof (xmlUCSIsCyrillicSupplement) xmlUCSIsCyrillicSupplement__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsCyrillicSupplement xmlUCSIsCyrillicSupplement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsDeseret
+extern __typeof (xmlUCSIsDeseret) xmlUCSIsDeseret __attribute((alias("xmlUCSIsDeseret__internal_alias")));
+#else
+#ifndef xmlUCSIsDeseret
+extern __typeof (xmlUCSIsDeseret) xmlUCSIsDeseret__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsDeseret xmlUCSIsDeseret__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsDevanagari
+extern __typeof (xmlUCSIsDevanagari) xmlUCSIsDevanagari __attribute((alias("xmlUCSIsDevanagari__internal_alias")));
+#else
+#ifndef xmlUCSIsDevanagari
+extern __typeof (xmlUCSIsDevanagari) xmlUCSIsDevanagari__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsDevanagari xmlUCSIsDevanagari__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsDingbats
+extern __typeof (xmlUCSIsDingbats) xmlUCSIsDingbats __attribute((alias("xmlUCSIsDingbats__internal_alias")));
+#else
+#ifndef xmlUCSIsDingbats
+extern __typeof (xmlUCSIsDingbats) xmlUCSIsDingbats__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsDingbats xmlUCSIsDingbats__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsEnclosedAlphanumerics
+extern __typeof (xmlUCSIsEnclosedAlphanumerics) xmlUCSIsEnclosedAlphanumerics __attribute((alias("xmlUCSIsEnclosedAlphanumerics__internal_alias")));
+#else
+#ifndef xmlUCSIsEnclosedAlphanumerics
+extern __typeof (xmlUCSIsEnclosedAlphanumerics) xmlUCSIsEnclosedAlphanumerics__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsEnclosedAlphanumerics xmlUCSIsEnclosedAlphanumerics__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsEnclosedCJKLettersandMonths
+extern __typeof (xmlUCSIsEnclosedCJKLettersandMonths) xmlUCSIsEnclosedCJKLettersandMonths __attribute((alias("xmlUCSIsEnclosedCJKLettersandMonths__internal_alias")));
+#else
+#ifndef xmlUCSIsEnclosedCJKLettersandMonths
+extern __typeof (xmlUCSIsEnclosedCJKLettersandMonths) xmlUCSIsEnclosedCJKLettersandMonths__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsEnclosedCJKLettersandMonths xmlUCSIsEnclosedCJKLettersandMonths__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsEthiopic
+extern __typeof (xmlUCSIsEthiopic) xmlUCSIsEthiopic __attribute((alias("xmlUCSIsEthiopic__internal_alias")));
+#else
+#ifndef xmlUCSIsEthiopic
+extern __typeof (xmlUCSIsEthiopic) xmlUCSIsEthiopic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsEthiopic xmlUCSIsEthiopic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGeneralPunctuation
+extern __typeof (xmlUCSIsGeneralPunctuation) xmlUCSIsGeneralPunctuation __attribute((alias("xmlUCSIsGeneralPunctuation__internal_alias")));
+#else
+#ifndef xmlUCSIsGeneralPunctuation
+extern __typeof (xmlUCSIsGeneralPunctuation) xmlUCSIsGeneralPunctuation__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGeneralPunctuation xmlUCSIsGeneralPunctuation__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGeometricShapes
+extern __typeof (xmlUCSIsGeometricShapes) xmlUCSIsGeometricShapes __attribute((alias("xmlUCSIsGeometricShapes__internal_alias")));
+#else
+#ifndef xmlUCSIsGeometricShapes
+extern __typeof (xmlUCSIsGeometricShapes) xmlUCSIsGeometricShapes__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGeometricShapes xmlUCSIsGeometricShapes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGeorgian
+extern __typeof (xmlUCSIsGeorgian) xmlUCSIsGeorgian __attribute((alias("xmlUCSIsGeorgian__internal_alias")));
+#else
+#ifndef xmlUCSIsGeorgian
+extern __typeof (xmlUCSIsGeorgian) xmlUCSIsGeorgian__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGeorgian xmlUCSIsGeorgian__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGothic
+extern __typeof (xmlUCSIsGothic) xmlUCSIsGothic __attribute((alias("xmlUCSIsGothic__internal_alias")));
+#else
+#ifndef xmlUCSIsGothic
+extern __typeof (xmlUCSIsGothic) xmlUCSIsGothic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGothic xmlUCSIsGothic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGreek
+extern __typeof (xmlUCSIsGreek) xmlUCSIsGreek __attribute((alias("xmlUCSIsGreek__internal_alias")));
+#else
+#ifndef xmlUCSIsGreek
+extern __typeof (xmlUCSIsGreek) xmlUCSIsGreek__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGreek xmlUCSIsGreek__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGreekExtended
+extern __typeof (xmlUCSIsGreekExtended) xmlUCSIsGreekExtended __attribute((alias("xmlUCSIsGreekExtended__internal_alias")));
+#else
+#ifndef xmlUCSIsGreekExtended
+extern __typeof (xmlUCSIsGreekExtended) xmlUCSIsGreekExtended__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGreekExtended xmlUCSIsGreekExtended__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGreekandCoptic
+extern __typeof (xmlUCSIsGreekandCoptic) xmlUCSIsGreekandCoptic __attribute((alias("xmlUCSIsGreekandCoptic__internal_alias")));
+#else
+#ifndef xmlUCSIsGreekandCoptic
+extern __typeof (xmlUCSIsGreekandCoptic) xmlUCSIsGreekandCoptic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGreekandCoptic xmlUCSIsGreekandCoptic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGujarati
+extern __typeof (xmlUCSIsGujarati) xmlUCSIsGujarati __attribute((alias("xmlUCSIsGujarati__internal_alias")));
+#else
+#ifndef xmlUCSIsGujarati
+extern __typeof (xmlUCSIsGujarati) xmlUCSIsGujarati__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGujarati xmlUCSIsGujarati__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsGurmukhi
+extern __typeof (xmlUCSIsGurmukhi) xmlUCSIsGurmukhi __attribute((alias("xmlUCSIsGurmukhi__internal_alias")));
+#else
+#ifndef xmlUCSIsGurmukhi
+extern __typeof (xmlUCSIsGurmukhi) xmlUCSIsGurmukhi__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsGurmukhi xmlUCSIsGurmukhi__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHalfwidthandFullwidthForms
+extern __typeof (xmlUCSIsHalfwidthandFullwidthForms) xmlUCSIsHalfwidthandFullwidthForms __attribute((alias("xmlUCSIsHalfwidthandFullwidthForms__internal_alias")));
+#else
+#ifndef xmlUCSIsHalfwidthandFullwidthForms
+extern __typeof (xmlUCSIsHalfwidthandFullwidthForms) xmlUCSIsHalfwidthandFullwidthForms__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHalfwidthandFullwidthForms xmlUCSIsHalfwidthandFullwidthForms__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHangulCompatibilityJamo
+extern __typeof (xmlUCSIsHangulCompatibilityJamo) xmlUCSIsHangulCompatibilityJamo __attribute((alias("xmlUCSIsHangulCompatibilityJamo__internal_alias")));
+#else
+#ifndef xmlUCSIsHangulCompatibilityJamo
+extern __typeof (xmlUCSIsHangulCompatibilityJamo) xmlUCSIsHangulCompatibilityJamo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHangulCompatibilityJamo xmlUCSIsHangulCompatibilityJamo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHangulJamo
+extern __typeof (xmlUCSIsHangulJamo) xmlUCSIsHangulJamo __attribute((alias("xmlUCSIsHangulJamo__internal_alias")));
+#else
+#ifndef xmlUCSIsHangulJamo
+extern __typeof (xmlUCSIsHangulJamo) xmlUCSIsHangulJamo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHangulJamo xmlUCSIsHangulJamo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHangulSyllables
+extern __typeof (xmlUCSIsHangulSyllables) xmlUCSIsHangulSyllables __attribute((alias("xmlUCSIsHangulSyllables__internal_alias")));
+#else
+#ifndef xmlUCSIsHangulSyllables
+extern __typeof (xmlUCSIsHangulSyllables) xmlUCSIsHangulSyllables__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHangulSyllables xmlUCSIsHangulSyllables__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHanunoo
+extern __typeof (xmlUCSIsHanunoo) xmlUCSIsHanunoo __attribute((alias("xmlUCSIsHanunoo__internal_alias")));
+#else
+#ifndef xmlUCSIsHanunoo
+extern __typeof (xmlUCSIsHanunoo) xmlUCSIsHanunoo__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHanunoo xmlUCSIsHanunoo__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHebrew
+extern __typeof (xmlUCSIsHebrew) xmlUCSIsHebrew __attribute((alias("xmlUCSIsHebrew__internal_alias")));
+#else
+#ifndef xmlUCSIsHebrew
+extern __typeof (xmlUCSIsHebrew) xmlUCSIsHebrew__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHebrew xmlUCSIsHebrew__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHighPrivateUseSurrogates
+extern __typeof (xmlUCSIsHighPrivateUseSurrogates) xmlUCSIsHighPrivateUseSurrogates __attribute((alias("xmlUCSIsHighPrivateUseSurrogates__internal_alias")));
+#else
+#ifndef xmlUCSIsHighPrivateUseSurrogates
+extern __typeof (xmlUCSIsHighPrivateUseSurrogates) xmlUCSIsHighPrivateUseSurrogates__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHighPrivateUseSurrogates xmlUCSIsHighPrivateUseSurrogates__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHighSurrogates
+extern __typeof (xmlUCSIsHighSurrogates) xmlUCSIsHighSurrogates __attribute((alias("xmlUCSIsHighSurrogates__internal_alias")));
+#else
+#ifndef xmlUCSIsHighSurrogates
+extern __typeof (xmlUCSIsHighSurrogates) xmlUCSIsHighSurrogates__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHighSurrogates xmlUCSIsHighSurrogates__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsHiragana
+extern __typeof (xmlUCSIsHiragana) xmlUCSIsHiragana __attribute((alias("xmlUCSIsHiragana__internal_alias")));
+#else
+#ifndef xmlUCSIsHiragana
+extern __typeof (xmlUCSIsHiragana) xmlUCSIsHiragana__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsHiragana xmlUCSIsHiragana__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsIPAExtensions
+extern __typeof (xmlUCSIsIPAExtensions) xmlUCSIsIPAExtensions __attribute((alias("xmlUCSIsIPAExtensions__internal_alias")));
+#else
+#ifndef xmlUCSIsIPAExtensions
+extern __typeof (xmlUCSIsIPAExtensions) xmlUCSIsIPAExtensions__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsIPAExtensions xmlUCSIsIPAExtensions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsIdeographicDescriptionCharacters
+extern __typeof (xmlUCSIsIdeographicDescriptionCharacters) xmlUCSIsIdeographicDescriptionCharacters __attribute((alias("xmlUCSIsIdeographicDescriptionCharacters__internal_alias")));
+#else
+#ifndef xmlUCSIsIdeographicDescriptionCharacters
+extern __typeof (xmlUCSIsIdeographicDescriptionCharacters) xmlUCSIsIdeographicDescriptionCharacters__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsIdeographicDescriptionCharacters xmlUCSIsIdeographicDescriptionCharacters__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKanbun
+extern __typeof (xmlUCSIsKanbun) xmlUCSIsKanbun __attribute((alias("xmlUCSIsKanbun__internal_alias")));
+#else
+#ifndef xmlUCSIsKanbun
+extern __typeof (xmlUCSIsKanbun) xmlUCSIsKanbun__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKanbun xmlUCSIsKanbun__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKangxiRadicals
+extern __typeof (xmlUCSIsKangxiRadicals) xmlUCSIsKangxiRadicals __attribute((alias("xmlUCSIsKangxiRadicals__internal_alias")));
+#else
+#ifndef xmlUCSIsKangxiRadicals
+extern __typeof (xmlUCSIsKangxiRadicals) xmlUCSIsKangxiRadicals__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKangxiRadicals xmlUCSIsKangxiRadicals__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKannada
+extern __typeof (xmlUCSIsKannada) xmlUCSIsKannada __attribute((alias("xmlUCSIsKannada__internal_alias")));
+#else
+#ifndef xmlUCSIsKannada
+extern __typeof (xmlUCSIsKannada) xmlUCSIsKannada__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKannada xmlUCSIsKannada__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKatakana
+extern __typeof (xmlUCSIsKatakana) xmlUCSIsKatakana __attribute((alias("xmlUCSIsKatakana__internal_alias")));
+#else
+#ifndef xmlUCSIsKatakana
+extern __typeof (xmlUCSIsKatakana) xmlUCSIsKatakana__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKatakana xmlUCSIsKatakana__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKatakanaPhoneticExtensions
+extern __typeof (xmlUCSIsKatakanaPhoneticExtensions) xmlUCSIsKatakanaPhoneticExtensions __attribute((alias("xmlUCSIsKatakanaPhoneticExtensions__internal_alias")));
+#else
+#ifndef xmlUCSIsKatakanaPhoneticExtensions
+extern __typeof (xmlUCSIsKatakanaPhoneticExtensions) xmlUCSIsKatakanaPhoneticExtensions__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKatakanaPhoneticExtensions xmlUCSIsKatakanaPhoneticExtensions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKhmer
+extern __typeof (xmlUCSIsKhmer) xmlUCSIsKhmer __attribute((alias("xmlUCSIsKhmer__internal_alias")));
+#else
+#ifndef xmlUCSIsKhmer
+extern __typeof (xmlUCSIsKhmer) xmlUCSIsKhmer__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKhmer xmlUCSIsKhmer__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsKhmerSymbols
+extern __typeof (xmlUCSIsKhmerSymbols) xmlUCSIsKhmerSymbols __attribute((alias("xmlUCSIsKhmerSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsKhmerSymbols
+extern __typeof (xmlUCSIsKhmerSymbols) xmlUCSIsKhmerSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsKhmerSymbols xmlUCSIsKhmerSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLao
+extern __typeof (xmlUCSIsLao) xmlUCSIsLao __attribute((alias("xmlUCSIsLao__internal_alias")));
+#else
+#ifndef xmlUCSIsLao
+extern __typeof (xmlUCSIsLao) xmlUCSIsLao__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLao xmlUCSIsLao__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLatin1Supplement
+extern __typeof (xmlUCSIsLatin1Supplement) xmlUCSIsLatin1Supplement __attribute((alias("xmlUCSIsLatin1Supplement__internal_alias")));
+#else
+#ifndef xmlUCSIsLatin1Supplement
+extern __typeof (xmlUCSIsLatin1Supplement) xmlUCSIsLatin1Supplement__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLatin1Supplement xmlUCSIsLatin1Supplement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLatinExtendedA
+extern __typeof (xmlUCSIsLatinExtendedA) xmlUCSIsLatinExtendedA __attribute((alias("xmlUCSIsLatinExtendedA__internal_alias")));
+#else
+#ifndef xmlUCSIsLatinExtendedA
+extern __typeof (xmlUCSIsLatinExtendedA) xmlUCSIsLatinExtendedA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLatinExtendedA xmlUCSIsLatinExtendedA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLatinExtendedAdditional
+extern __typeof (xmlUCSIsLatinExtendedAdditional) xmlUCSIsLatinExtendedAdditional __attribute((alias("xmlUCSIsLatinExtendedAdditional__internal_alias")));
+#else
+#ifndef xmlUCSIsLatinExtendedAdditional
+extern __typeof (xmlUCSIsLatinExtendedAdditional) xmlUCSIsLatinExtendedAdditional__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLatinExtendedAdditional xmlUCSIsLatinExtendedAdditional__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLatinExtendedB
+extern __typeof (xmlUCSIsLatinExtendedB) xmlUCSIsLatinExtendedB __attribute((alias("xmlUCSIsLatinExtendedB__internal_alias")));
+#else
+#ifndef xmlUCSIsLatinExtendedB
+extern __typeof (xmlUCSIsLatinExtendedB) xmlUCSIsLatinExtendedB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLatinExtendedB xmlUCSIsLatinExtendedB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLetterlikeSymbols
+extern __typeof (xmlUCSIsLetterlikeSymbols) xmlUCSIsLetterlikeSymbols __attribute((alias("xmlUCSIsLetterlikeSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsLetterlikeSymbols
+extern __typeof (xmlUCSIsLetterlikeSymbols) xmlUCSIsLetterlikeSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLetterlikeSymbols xmlUCSIsLetterlikeSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLimbu
+extern __typeof (xmlUCSIsLimbu) xmlUCSIsLimbu __attribute((alias("xmlUCSIsLimbu__internal_alias")));
+#else
+#ifndef xmlUCSIsLimbu
+extern __typeof (xmlUCSIsLimbu) xmlUCSIsLimbu__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLimbu xmlUCSIsLimbu__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLinearBIdeograms
+extern __typeof (xmlUCSIsLinearBIdeograms) xmlUCSIsLinearBIdeograms __attribute((alias("xmlUCSIsLinearBIdeograms__internal_alias")));
+#else
+#ifndef xmlUCSIsLinearBIdeograms
+extern __typeof (xmlUCSIsLinearBIdeograms) xmlUCSIsLinearBIdeograms__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLinearBIdeograms xmlUCSIsLinearBIdeograms__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLinearBSyllabary
+extern __typeof (xmlUCSIsLinearBSyllabary) xmlUCSIsLinearBSyllabary __attribute((alias("xmlUCSIsLinearBSyllabary__internal_alias")));
+#else
+#ifndef xmlUCSIsLinearBSyllabary
+extern __typeof (xmlUCSIsLinearBSyllabary) xmlUCSIsLinearBSyllabary__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLinearBSyllabary xmlUCSIsLinearBSyllabary__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsLowSurrogates
+extern __typeof (xmlUCSIsLowSurrogates) xmlUCSIsLowSurrogates __attribute((alias("xmlUCSIsLowSurrogates__internal_alias")));
+#else
+#ifndef xmlUCSIsLowSurrogates
+extern __typeof (xmlUCSIsLowSurrogates) xmlUCSIsLowSurrogates__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsLowSurrogates xmlUCSIsLowSurrogates__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMalayalam
+extern __typeof (xmlUCSIsMalayalam) xmlUCSIsMalayalam __attribute((alias("xmlUCSIsMalayalam__internal_alias")));
+#else
+#ifndef xmlUCSIsMalayalam
+extern __typeof (xmlUCSIsMalayalam) xmlUCSIsMalayalam__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMalayalam xmlUCSIsMalayalam__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMathematicalAlphanumericSymbols
+extern __typeof (xmlUCSIsMathematicalAlphanumericSymbols) xmlUCSIsMathematicalAlphanumericSymbols __attribute((alias("xmlUCSIsMathematicalAlphanumericSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsMathematicalAlphanumericSymbols
+extern __typeof (xmlUCSIsMathematicalAlphanumericSymbols) xmlUCSIsMathematicalAlphanumericSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMathematicalAlphanumericSymbols xmlUCSIsMathematicalAlphanumericSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMathematicalOperators
+extern __typeof (xmlUCSIsMathematicalOperators) xmlUCSIsMathematicalOperators __attribute((alias("xmlUCSIsMathematicalOperators__internal_alias")));
+#else
+#ifndef xmlUCSIsMathematicalOperators
+extern __typeof (xmlUCSIsMathematicalOperators) xmlUCSIsMathematicalOperators__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMathematicalOperators xmlUCSIsMathematicalOperators__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMiscellaneousMathematicalSymbolsA
+extern __typeof (xmlUCSIsMiscellaneousMathematicalSymbolsA) xmlUCSIsMiscellaneousMathematicalSymbolsA __attribute((alias("xmlUCSIsMiscellaneousMathematicalSymbolsA__internal_alias")));
+#else
+#ifndef xmlUCSIsMiscellaneousMathematicalSymbolsA
+extern __typeof (xmlUCSIsMiscellaneousMathematicalSymbolsA) xmlUCSIsMiscellaneousMathematicalSymbolsA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMiscellaneousMathematicalSymbolsA xmlUCSIsMiscellaneousMathematicalSymbolsA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMiscellaneousMathematicalSymbolsB
+extern __typeof (xmlUCSIsMiscellaneousMathematicalSymbolsB) xmlUCSIsMiscellaneousMathematicalSymbolsB __attribute((alias("xmlUCSIsMiscellaneousMathematicalSymbolsB__internal_alias")));
+#else
+#ifndef xmlUCSIsMiscellaneousMathematicalSymbolsB
+extern __typeof (xmlUCSIsMiscellaneousMathematicalSymbolsB) xmlUCSIsMiscellaneousMathematicalSymbolsB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMiscellaneousMathematicalSymbolsB xmlUCSIsMiscellaneousMathematicalSymbolsB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMiscellaneousSymbols
+extern __typeof (xmlUCSIsMiscellaneousSymbols) xmlUCSIsMiscellaneousSymbols __attribute((alias("xmlUCSIsMiscellaneousSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsMiscellaneousSymbols
+extern __typeof (xmlUCSIsMiscellaneousSymbols) xmlUCSIsMiscellaneousSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMiscellaneousSymbols xmlUCSIsMiscellaneousSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMiscellaneousSymbolsandArrows
+extern __typeof (xmlUCSIsMiscellaneousSymbolsandArrows) xmlUCSIsMiscellaneousSymbolsandArrows __attribute((alias("xmlUCSIsMiscellaneousSymbolsandArrows__internal_alias")));
+#else
+#ifndef xmlUCSIsMiscellaneousSymbolsandArrows
+extern __typeof (xmlUCSIsMiscellaneousSymbolsandArrows) xmlUCSIsMiscellaneousSymbolsandArrows__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMiscellaneousSymbolsandArrows xmlUCSIsMiscellaneousSymbolsandArrows__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMiscellaneousTechnical
+extern __typeof (xmlUCSIsMiscellaneousTechnical) xmlUCSIsMiscellaneousTechnical __attribute((alias("xmlUCSIsMiscellaneousTechnical__internal_alias")));
+#else
+#ifndef xmlUCSIsMiscellaneousTechnical
+extern __typeof (xmlUCSIsMiscellaneousTechnical) xmlUCSIsMiscellaneousTechnical__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMiscellaneousTechnical xmlUCSIsMiscellaneousTechnical__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMongolian
+extern __typeof (xmlUCSIsMongolian) xmlUCSIsMongolian __attribute((alias("xmlUCSIsMongolian__internal_alias")));
+#else
+#ifndef xmlUCSIsMongolian
+extern __typeof (xmlUCSIsMongolian) xmlUCSIsMongolian__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMongolian xmlUCSIsMongolian__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMusicalSymbols
+extern __typeof (xmlUCSIsMusicalSymbols) xmlUCSIsMusicalSymbols __attribute((alias("xmlUCSIsMusicalSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsMusicalSymbols
+extern __typeof (xmlUCSIsMusicalSymbols) xmlUCSIsMusicalSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMusicalSymbols xmlUCSIsMusicalSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsMyanmar
+extern __typeof (xmlUCSIsMyanmar) xmlUCSIsMyanmar __attribute((alias("xmlUCSIsMyanmar__internal_alias")));
+#else
+#ifndef xmlUCSIsMyanmar
+extern __typeof (xmlUCSIsMyanmar) xmlUCSIsMyanmar__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsMyanmar xmlUCSIsMyanmar__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsNumberForms
+extern __typeof (xmlUCSIsNumberForms) xmlUCSIsNumberForms __attribute((alias("xmlUCSIsNumberForms__internal_alias")));
+#else
+#ifndef xmlUCSIsNumberForms
+extern __typeof (xmlUCSIsNumberForms) xmlUCSIsNumberForms__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsNumberForms xmlUCSIsNumberForms__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsOgham
+extern __typeof (xmlUCSIsOgham) xmlUCSIsOgham __attribute((alias("xmlUCSIsOgham__internal_alias")));
+#else
+#ifndef xmlUCSIsOgham
+extern __typeof (xmlUCSIsOgham) xmlUCSIsOgham__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsOgham xmlUCSIsOgham__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsOldItalic
+extern __typeof (xmlUCSIsOldItalic) xmlUCSIsOldItalic __attribute((alias("xmlUCSIsOldItalic__internal_alias")));
+#else
+#ifndef xmlUCSIsOldItalic
+extern __typeof (xmlUCSIsOldItalic) xmlUCSIsOldItalic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsOldItalic xmlUCSIsOldItalic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsOpticalCharacterRecognition
+extern __typeof (xmlUCSIsOpticalCharacterRecognition) xmlUCSIsOpticalCharacterRecognition __attribute((alias("xmlUCSIsOpticalCharacterRecognition__internal_alias")));
+#else
+#ifndef xmlUCSIsOpticalCharacterRecognition
+extern __typeof (xmlUCSIsOpticalCharacterRecognition) xmlUCSIsOpticalCharacterRecognition__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsOpticalCharacterRecognition xmlUCSIsOpticalCharacterRecognition__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsOriya
+extern __typeof (xmlUCSIsOriya) xmlUCSIsOriya __attribute((alias("xmlUCSIsOriya__internal_alias")));
+#else
+#ifndef xmlUCSIsOriya
+extern __typeof (xmlUCSIsOriya) xmlUCSIsOriya__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsOriya xmlUCSIsOriya__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsOsmanya
+extern __typeof (xmlUCSIsOsmanya) xmlUCSIsOsmanya __attribute((alias("xmlUCSIsOsmanya__internal_alias")));
+#else
+#ifndef xmlUCSIsOsmanya
+extern __typeof (xmlUCSIsOsmanya) xmlUCSIsOsmanya__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsOsmanya xmlUCSIsOsmanya__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsPhoneticExtensions
+extern __typeof (xmlUCSIsPhoneticExtensions) xmlUCSIsPhoneticExtensions __attribute((alias("xmlUCSIsPhoneticExtensions__internal_alias")));
+#else
+#ifndef xmlUCSIsPhoneticExtensions
+extern __typeof (xmlUCSIsPhoneticExtensions) xmlUCSIsPhoneticExtensions__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsPhoneticExtensions xmlUCSIsPhoneticExtensions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsPrivateUse
+extern __typeof (xmlUCSIsPrivateUse) xmlUCSIsPrivateUse __attribute((alias("xmlUCSIsPrivateUse__internal_alias")));
+#else
+#ifndef xmlUCSIsPrivateUse
+extern __typeof (xmlUCSIsPrivateUse) xmlUCSIsPrivateUse__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsPrivateUse xmlUCSIsPrivateUse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsPrivateUseArea
+extern __typeof (xmlUCSIsPrivateUseArea) xmlUCSIsPrivateUseArea __attribute((alias("xmlUCSIsPrivateUseArea__internal_alias")));
+#else
+#ifndef xmlUCSIsPrivateUseArea
+extern __typeof (xmlUCSIsPrivateUseArea) xmlUCSIsPrivateUseArea__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsPrivateUseArea xmlUCSIsPrivateUseArea__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsRunic
+extern __typeof (xmlUCSIsRunic) xmlUCSIsRunic __attribute((alias("xmlUCSIsRunic__internal_alias")));
+#else
+#ifndef xmlUCSIsRunic
+extern __typeof (xmlUCSIsRunic) xmlUCSIsRunic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsRunic xmlUCSIsRunic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsShavian
+extern __typeof (xmlUCSIsShavian) xmlUCSIsShavian __attribute((alias("xmlUCSIsShavian__internal_alias")));
+#else
+#ifndef xmlUCSIsShavian
+extern __typeof (xmlUCSIsShavian) xmlUCSIsShavian__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsShavian xmlUCSIsShavian__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSinhala
+extern __typeof (xmlUCSIsSinhala) xmlUCSIsSinhala __attribute((alias("xmlUCSIsSinhala__internal_alias")));
+#else
+#ifndef xmlUCSIsSinhala
+extern __typeof (xmlUCSIsSinhala) xmlUCSIsSinhala__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSinhala xmlUCSIsSinhala__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSmallFormVariants
+extern __typeof (xmlUCSIsSmallFormVariants) xmlUCSIsSmallFormVariants __attribute((alias("xmlUCSIsSmallFormVariants__internal_alias")));
+#else
+#ifndef xmlUCSIsSmallFormVariants
+extern __typeof (xmlUCSIsSmallFormVariants) xmlUCSIsSmallFormVariants__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSmallFormVariants xmlUCSIsSmallFormVariants__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSpacingModifierLetters
+extern __typeof (xmlUCSIsSpacingModifierLetters) xmlUCSIsSpacingModifierLetters __attribute((alias("xmlUCSIsSpacingModifierLetters__internal_alias")));
+#else
+#ifndef xmlUCSIsSpacingModifierLetters
+extern __typeof (xmlUCSIsSpacingModifierLetters) xmlUCSIsSpacingModifierLetters__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSpacingModifierLetters xmlUCSIsSpacingModifierLetters__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSpecials
+extern __typeof (xmlUCSIsSpecials) xmlUCSIsSpecials __attribute((alias("xmlUCSIsSpecials__internal_alias")));
+#else
+#ifndef xmlUCSIsSpecials
+extern __typeof (xmlUCSIsSpecials) xmlUCSIsSpecials__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSpecials xmlUCSIsSpecials__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSuperscriptsandSubscripts
+extern __typeof (xmlUCSIsSuperscriptsandSubscripts) xmlUCSIsSuperscriptsandSubscripts __attribute((alias("xmlUCSIsSuperscriptsandSubscripts__internal_alias")));
+#else
+#ifndef xmlUCSIsSuperscriptsandSubscripts
+extern __typeof (xmlUCSIsSuperscriptsandSubscripts) xmlUCSIsSuperscriptsandSubscripts__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSuperscriptsandSubscripts xmlUCSIsSuperscriptsandSubscripts__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSupplementalArrowsA
+extern __typeof (xmlUCSIsSupplementalArrowsA) xmlUCSIsSupplementalArrowsA __attribute((alias("xmlUCSIsSupplementalArrowsA__internal_alias")));
+#else
+#ifndef xmlUCSIsSupplementalArrowsA
+extern __typeof (xmlUCSIsSupplementalArrowsA) xmlUCSIsSupplementalArrowsA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSupplementalArrowsA xmlUCSIsSupplementalArrowsA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSupplementalArrowsB
+extern __typeof (xmlUCSIsSupplementalArrowsB) xmlUCSIsSupplementalArrowsB __attribute((alias("xmlUCSIsSupplementalArrowsB__internal_alias")));
+#else
+#ifndef xmlUCSIsSupplementalArrowsB
+extern __typeof (xmlUCSIsSupplementalArrowsB) xmlUCSIsSupplementalArrowsB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSupplementalArrowsB xmlUCSIsSupplementalArrowsB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSupplementalMathematicalOperators
+extern __typeof (xmlUCSIsSupplementalMathematicalOperators) xmlUCSIsSupplementalMathematicalOperators __attribute((alias("xmlUCSIsSupplementalMathematicalOperators__internal_alias")));
+#else
+#ifndef xmlUCSIsSupplementalMathematicalOperators
+extern __typeof (xmlUCSIsSupplementalMathematicalOperators) xmlUCSIsSupplementalMathematicalOperators__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSupplementalMathematicalOperators xmlUCSIsSupplementalMathematicalOperators__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSupplementaryPrivateUseAreaA
+extern __typeof (xmlUCSIsSupplementaryPrivateUseAreaA) xmlUCSIsSupplementaryPrivateUseAreaA __attribute((alias("xmlUCSIsSupplementaryPrivateUseAreaA__internal_alias")));
+#else
+#ifndef xmlUCSIsSupplementaryPrivateUseAreaA
+extern __typeof (xmlUCSIsSupplementaryPrivateUseAreaA) xmlUCSIsSupplementaryPrivateUseAreaA__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSupplementaryPrivateUseAreaA xmlUCSIsSupplementaryPrivateUseAreaA__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSupplementaryPrivateUseAreaB
+extern __typeof (xmlUCSIsSupplementaryPrivateUseAreaB) xmlUCSIsSupplementaryPrivateUseAreaB __attribute((alias("xmlUCSIsSupplementaryPrivateUseAreaB__internal_alias")));
+#else
+#ifndef xmlUCSIsSupplementaryPrivateUseAreaB
+extern __typeof (xmlUCSIsSupplementaryPrivateUseAreaB) xmlUCSIsSupplementaryPrivateUseAreaB__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSupplementaryPrivateUseAreaB xmlUCSIsSupplementaryPrivateUseAreaB__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsSyriac
+extern __typeof (xmlUCSIsSyriac) xmlUCSIsSyriac __attribute((alias("xmlUCSIsSyriac__internal_alias")));
+#else
+#ifndef xmlUCSIsSyriac
+extern __typeof (xmlUCSIsSyriac) xmlUCSIsSyriac__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsSyriac xmlUCSIsSyriac__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTagalog
+extern __typeof (xmlUCSIsTagalog) xmlUCSIsTagalog __attribute((alias("xmlUCSIsTagalog__internal_alias")));
+#else
+#ifndef xmlUCSIsTagalog
+extern __typeof (xmlUCSIsTagalog) xmlUCSIsTagalog__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTagalog xmlUCSIsTagalog__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTagbanwa
+extern __typeof (xmlUCSIsTagbanwa) xmlUCSIsTagbanwa __attribute((alias("xmlUCSIsTagbanwa__internal_alias")));
+#else
+#ifndef xmlUCSIsTagbanwa
+extern __typeof (xmlUCSIsTagbanwa) xmlUCSIsTagbanwa__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTagbanwa xmlUCSIsTagbanwa__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTags
+extern __typeof (xmlUCSIsTags) xmlUCSIsTags __attribute((alias("xmlUCSIsTags__internal_alias")));
+#else
+#ifndef xmlUCSIsTags
+extern __typeof (xmlUCSIsTags) xmlUCSIsTags__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTags xmlUCSIsTags__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTaiLe
+extern __typeof (xmlUCSIsTaiLe) xmlUCSIsTaiLe __attribute((alias("xmlUCSIsTaiLe__internal_alias")));
+#else
+#ifndef xmlUCSIsTaiLe
+extern __typeof (xmlUCSIsTaiLe) xmlUCSIsTaiLe__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTaiLe xmlUCSIsTaiLe__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTaiXuanJingSymbols
+extern __typeof (xmlUCSIsTaiXuanJingSymbols) xmlUCSIsTaiXuanJingSymbols __attribute((alias("xmlUCSIsTaiXuanJingSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsTaiXuanJingSymbols
+extern __typeof (xmlUCSIsTaiXuanJingSymbols) xmlUCSIsTaiXuanJingSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTaiXuanJingSymbols xmlUCSIsTaiXuanJingSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTamil
+extern __typeof (xmlUCSIsTamil) xmlUCSIsTamil __attribute((alias("xmlUCSIsTamil__internal_alias")));
+#else
+#ifndef xmlUCSIsTamil
+extern __typeof (xmlUCSIsTamil) xmlUCSIsTamil__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTamil xmlUCSIsTamil__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTelugu
+extern __typeof (xmlUCSIsTelugu) xmlUCSIsTelugu __attribute((alias("xmlUCSIsTelugu__internal_alias")));
+#else
+#ifndef xmlUCSIsTelugu
+extern __typeof (xmlUCSIsTelugu) xmlUCSIsTelugu__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTelugu xmlUCSIsTelugu__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsThaana
+extern __typeof (xmlUCSIsThaana) xmlUCSIsThaana __attribute((alias("xmlUCSIsThaana__internal_alias")));
+#else
+#ifndef xmlUCSIsThaana
+extern __typeof (xmlUCSIsThaana) xmlUCSIsThaana__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsThaana xmlUCSIsThaana__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsThai
+extern __typeof (xmlUCSIsThai) xmlUCSIsThai __attribute((alias("xmlUCSIsThai__internal_alias")));
+#else
+#ifndef xmlUCSIsThai
+extern __typeof (xmlUCSIsThai) xmlUCSIsThai__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsThai xmlUCSIsThai__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsTibetan
+extern __typeof (xmlUCSIsTibetan) xmlUCSIsTibetan __attribute((alias("xmlUCSIsTibetan__internal_alias")));
+#else
+#ifndef xmlUCSIsTibetan
+extern __typeof (xmlUCSIsTibetan) xmlUCSIsTibetan__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsTibetan xmlUCSIsTibetan__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsUgaritic
+extern __typeof (xmlUCSIsUgaritic) xmlUCSIsUgaritic __attribute((alias("xmlUCSIsUgaritic__internal_alias")));
+#else
+#ifndef xmlUCSIsUgaritic
+extern __typeof (xmlUCSIsUgaritic) xmlUCSIsUgaritic__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsUgaritic xmlUCSIsUgaritic__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsUnifiedCanadianAboriginalSyllabics
+extern __typeof (xmlUCSIsUnifiedCanadianAboriginalSyllabics) xmlUCSIsUnifiedCanadianAboriginalSyllabics __attribute((alias("xmlUCSIsUnifiedCanadianAboriginalSyllabics__internal_alias")));
+#else
+#ifndef xmlUCSIsUnifiedCanadianAboriginalSyllabics
+extern __typeof (xmlUCSIsUnifiedCanadianAboriginalSyllabics) xmlUCSIsUnifiedCanadianAboriginalSyllabics__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsUnifiedCanadianAboriginalSyllabics xmlUCSIsUnifiedCanadianAboriginalSyllabics__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsVariationSelectors
+extern __typeof (xmlUCSIsVariationSelectors) xmlUCSIsVariationSelectors __attribute((alias("xmlUCSIsVariationSelectors__internal_alias")));
+#else
+#ifndef xmlUCSIsVariationSelectors
+extern __typeof (xmlUCSIsVariationSelectors) xmlUCSIsVariationSelectors__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsVariationSelectors xmlUCSIsVariationSelectors__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsVariationSelectorsSupplement
+extern __typeof (xmlUCSIsVariationSelectorsSupplement) xmlUCSIsVariationSelectorsSupplement __attribute((alias("xmlUCSIsVariationSelectorsSupplement__internal_alias")));
+#else
+#ifndef xmlUCSIsVariationSelectorsSupplement
+extern __typeof (xmlUCSIsVariationSelectorsSupplement) xmlUCSIsVariationSelectorsSupplement__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsVariationSelectorsSupplement xmlUCSIsVariationSelectorsSupplement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsYiRadicals
+extern __typeof (xmlUCSIsYiRadicals) xmlUCSIsYiRadicals __attribute((alias("xmlUCSIsYiRadicals__internal_alias")));
+#else
+#ifndef xmlUCSIsYiRadicals
+extern __typeof (xmlUCSIsYiRadicals) xmlUCSIsYiRadicals__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsYiRadicals xmlUCSIsYiRadicals__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsYiSyllables
+extern __typeof (xmlUCSIsYiSyllables) xmlUCSIsYiSyllables __attribute((alias("xmlUCSIsYiSyllables__internal_alias")));
+#else
+#ifndef xmlUCSIsYiSyllables
+extern __typeof (xmlUCSIsYiSyllables) xmlUCSIsYiSyllables__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsYiSyllables xmlUCSIsYiSyllables__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_UNICODE_ENABLED)
+#ifdef bottom_xmlunicode
+#undef xmlUCSIsYijingHexagramSymbols
+extern __typeof (xmlUCSIsYijingHexagramSymbols) xmlUCSIsYijingHexagramSymbols __attribute((alias("xmlUCSIsYijingHexagramSymbols__internal_alias")));
+#else
+#ifndef xmlUCSIsYijingHexagramSymbols
+extern __typeof (xmlUCSIsYijingHexagramSymbols) xmlUCSIsYijingHexagramSymbols__internal_alias __attribute((visibility("hidden")));
+#define xmlUCSIsYijingHexagramSymbols xmlUCSIsYijingHexagramSymbols__internal_alias
+#endif
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlURIEscape
+extern __typeof (xmlURIEscape) xmlURIEscape __attribute((alias("xmlURIEscape__internal_alias")));
+#else
+#ifndef xmlURIEscape
+extern __typeof (xmlURIEscape) xmlURIEscape__internal_alias __attribute((visibility("hidden")));
+#define xmlURIEscape xmlURIEscape__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlURIEscapeStr
+extern __typeof (xmlURIEscapeStr) xmlURIEscapeStr __attribute((alias("xmlURIEscapeStr__internal_alias")));
+#else
+#ifndef xmlURIEscapeStr
+extern __typeof (xmlURIEscapeStr) xmlURIEscapeStr__internal_alias __attribute((visibility("hidden")));
+#define xmlURIEscapeStr xmlURIEscapeStr__internal_alias
+#endif
+#endif
+
+#ifdef bottom_uri
+#undef xmlURIUnescapeString
+extern __typeof (xmlURIUnescapeString) xmlURIUnescapeString __attribute((alias("xmlURIUnescapeString__internal_alias")));
+#else
+#ifndef xmlURIUnescapeString
+extern __typeof (xmlURIUnescapeString) xmlURIUnescapeString__internal_alias __attribute((visibility("hidden")));
+#define xmlURIUnescapeString xmlURIUnescapeString__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Charcmp
+extern __typeof (xmlUTF8Charcmp) xmlUTF8Charcmp __attribute((alias("xmlUTF8Charcmp__internal_alias")));
+#else
+#ifndef xmlUTF8Charcmp
+extern __typeof (xmlUTF8Charcmp) xmlUTF8Charcmp__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Charcmp xmlUTF8Charcmp__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Size
+extern __typeof (xmlUTF8Size) xmlUTF8Size __attribute((alias("xmlUTF8Size__internal_alias")));
+#else
+#ifndef xmlUTF8Size
+extern __typeof (xmlUTF8Size) xmlUTF8Size__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Size xmlUTF8Size__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strlen
+extern __typeof (xmlUTF8Strlen) xmlUTF8Strlen __attribute((alias("xmlUTF8Strlen__internal_alias")));
+#else
+#ifndef xmlUTF8Strlen
+extern __typeof (xmlUTF8Strlen) xmlUTF8Strlen__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strlen xmlUTF8Strlen__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strloc
+extern __typeof (xmlUTF8Strloc) xmlUTF8Strloc __attribute((alias("xmlUTF8Strloc__internal_alias")));
+#else
+#ifndef xmlUTF8Strloc
+extern __typeof (xmlUTF8Strloc) xmlUTF8Strloc__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strloc xmlUTF8Strloc__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strndup
+extern __typeof (xmlUTF8Strndup) xmlUTF8Strndup __attribute((alias("xmlUTF8Strndup__internal_alias")));
+#else
+#ifndef xmlUTF8Strndup
+extern __typeof (xmlUTF8Strndup) xmlUTF8Strndup__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strndup xmlUTF8Strndup__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strpos
+extern __typeof (xmlUTF8Strpos) xmlUTF8Strpos __attribute((alias("xmlUTF8Strpos__internal_alias")));
+#else
+#ifndef xmlUTF8Strpos
+extern __typeof (xmlUTF8Strpos) xmlUTF8Strpos__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strpos xmlUTF8Strpos__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strsize
+extern __typeof (xmlUTF8Strsize) xmlUTF8Strsize __attribute((alias("xmlUTF8Strsize__internal_alias")));
+#else
+#ifndef xmlUTF8Strsize
+extern __typeof (xmlUTF8Strsize) xmlUTF8Strsize__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strsize xmlUTF8Strsize__internal_alias
+#endif
+#endif
+
+#ifdef bottom_xmlstring
+#undef xmlUTF8Strsub
+extern __typeof (xmlUTF8Strsub) xmlUTF8Strsub __attribute((alias("xmlUTF8Strsub__internal_alias")));
+#else
+#ifndef xmlUTF8Strsub
+extern __typeof (xmlUTF8Strsub) xmlUTF8Strsub__internal_alias __attribute((visibility("hidden")));
+#define xmlUTF8Strsub xmlUTF8Strsub__internal_alias
+#endif
+#endif
+
+#ifdef bottom_tree
+#undef xmlUnlinkNode
+extern __typeof (xmlUnlinkNode) xmlUnlinkNode __attribute((alias("xmlUnlinkNode__internal_alias")));
+#else
+#ifndef xmlUnlinkNode
+extern __typeof (xmlUnlinkNode) xmlUnlinkNode__internal_alias __attribute((visibility("hidden")));
+#define xmlUnlinkNode xmlUnlinkNode__internal_alias
+#endif
+#endif
+
+#ifdef bottom_threads
+#undef xmlUnlockLibrary
+extern __typeof (xmlUnlockLibrary) xmlUnlockLibrary __attribute((alias("xmlUnlockLibrary__internal_alias")));
+#else
+#ifndef xmlUnlockLibrary
+extern __typeof (xmlUnlockLibrary) xmlUnlockLibrary__internal_alias __attribute((visibility("hidden")));
+#define xmlUnlockLibrary xmlUnlockLibrary__internal_alias
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlUnsetNsProp
+extern __typeof (xmlUnsetNsProp) xmlUnsetNsProp __attribute((alias("xmlUnsetNsProp__internal_alias")));
+#else
+#ifndef xmlUnsetNsProp
+extern __typeof (xmlUnsetNsProp) xmlUnsetNsProp__internal_alias __attribute((visibility("hidden")));
+#define xmlUnsetNsProp xmlUnsetNsProp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlUnsetProp
+extern __typeof (xmlUnsetProp) xmlUnsetProp __attribute((alias("xmlUnsetProp__internal_alias")));
+#else
+#ifndef xmlUnsetProp
+extern __typeof (xmlUnsetProp) xmlUnsetProp__internal_alias __attribute((visibility("hidden")));
+#define xmlUnsetProp xmlUnsetProp__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidBuildContentModel
+extern __typeof (xmlValidBuildContentModel) xmlValidBuildContentModel __attribute((alias("xmlValidBuildContentModel__internal_alias")));
+#else
+#ifndef xmlValidBuildContentModel
+extern __typeof (xmlValidBuildContentModel) xmlValidBuildContentModel__internal_alias __attribute((visibility("hidden")));
+#define xmlValidBuildContentModel xmlValidBuildContentModel__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidCtxtNormalizeAttributeValue
+extern __typeof (xmlValidCtxtNormalizeAttributeValue) xmlValidCtxtNormalizeAttributeValue __attribute((alias("xmlValidCtxtNormalizeAttributeValue__internal_alias")));
+#else
+#ifndef xmlValidCtxtNormalizeAttributeValue
+extern __typeof (xmlValidCtxtNormalizeAttributeValue) xmlValidCtxtNormalizeAttributeValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidCtxtNormalizeAttributeValue xmlValidCtxtNormalizeAttributeValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidGetPotentialChildren
+extern __typeof (xmlValidGetPotentialChildren) xmlValidGetPotentialChildren __attribute((alias("xmlValidGetPotentialChildren__internal_alias")));
+#else
+#ifndef xmlValidGetPotentialChildren
+extern __typeof (xmlValidGetPotentialChildren) xmlValidGetPotentialChildren__internal_alias __attribute((visibility("hidden")));
+#define xmlValidGetPotentialChildren xmlValidGetPotentialChildren__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidGetValidElements
+extern __typeof (xmlValidGetValidElements) xmlValidGetValidElements __attribute((alias("xmlValidGetValidElements__internal_alias")));
+#else
+#ifndef xmlValidGetValidElements
+extern __typeof (xmlValidGetValidElements) xmlValidGetValidElements__internal_alias __attribute((visibility("hidden")));
+#define xmlValidGetValidElements xmlValidGetValidElements__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidNormalizeAttributeValue
+extern __typeof (xmlValidNormalizeAttributeValue) xmlValidNormalizeAttributeValue __attribute((alias("xmlValidNormalizeAttributeValue__internal_alias")));
+#else
+#ifndef xmlValidNormalizeAttributeValue
+extern __typeof (xmlValidNormalizeAttributeValue) xmlValidNormalizeAttributeValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidNormalizeAttributeValue xmlValidNormalizeAttributeValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateAttributeDecl
+extern __typeof (xmlValidateAttributeDecl) xmlValidateAttributeDecl __attribute((alias("xmlValidateAttributeDecl__internal_alias")));
+#else
+#ifndef xmlValidateAttributeDecl
+extern __typeof (xmlValidateAttributeDecl) xmlValidateAttributeDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateAttributeDecl xmlValidateAttributeDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateAttributeValue
+extern __typeof (xmlValidateAttributeValue) xmlValidateAttributeValue __attribute((alias("xmlValidateAttributeValue__internal_alias")));
+#else
+#ifndef xmlValidateAttributeValue
+extern __typeof (xmlValidateAttributeValue) xmlValidateAttributeValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateAttributeValue xmlValidateAttributeValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateDocument
+extern __typeof (xmlValidateDocument) xmlValidateDocument __attribute((alias("xmlValidateDocument__internal_alias")));
+#else
+#ifndef xmlValidateDocument
+extern __typeof (xmlValidateDocument) xmlValidateDocument__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateDocument xmlValidateDocument__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateDocumentFinal
+extern __typeof (xmlValidateDocumentFinal) xmlValidateDocumentFinal __attribute((alias("xmlValidateDocumentFinal__internal_alias")));
+#else
+#ifndef xmlValidateDocumentFinal
+extern __typeof (xmlValidateDocumentFinal) xmlValidateDocumentFinal__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateDocumentFinal xmlValidateDocumentFinal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateDtd
+extern __typeof (xmlValidateDtd) xmlValidateDtd __attribute((alias("xmlValidateDtd__internal_alias")));
+#else
+#ifndef xmlValidateDtd
+extern __typeof (xmlValidateDtd) xmlValidateDtd__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateDtd xmlValidateDtd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateDtdFinal
+extern __typeof (xmlValidateDtdFinal) xmlValidateDtdFinal __attribute((alias("xmlValidateDtdFinal__internal_alias")));
+#else
+#ifndef xmlValidateDtdFinal
+extern __typeof (xmlValidateDtdFinal) xmlValidateDtdFinal__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateDtdFinal xmlValidateDtdFinal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateElement
+extern __typeof (xmlValidateElement) xmlValidateElement __attribute((alias("xmlValidateElement__internal_alias")));
+#else
+#ifndef xmlValidateElement
+extern __typeof (xmlValidateElement) xmlValidateElement__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateElement xmlValidateElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateElementDecl
+extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl __attribute((alias("xmlValidateElementDecl__internal_alias")));
+#else
+#ifndef xmlValidateElementDecl
+extern __typeof (xmlValidateElementDecl) xmlValidateElementDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateElementDecl xmlValidateElementDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef bottom_tree
+#undef xmlValidateNCName
+extern __typeof (xmlValidateNCName) xmlValidateNCName __attribute((alias("xmlValidateNCName__internal_alias")));
+#else
+#ifndef xmlValidateNCName
+extern __typeof (xmlValidateNCName) xmlValidateNCName__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNCName xmlValidateNCName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlValidateNMToken
+extern __typeof (xmlValidateNMToken) xmlValidateNMToken __attribute((alias("xmlValidateNMToken__internal_alias")));
+#else
+#ifndef xmlValidateNMToken
+extern __typeof (xmlValidateNMToken) xmlValidateNMToken__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNMToken xmlValidateNMToken__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlValidateName
+extern __typeof (xmlValidateName) xmlValidateName __attribute((alias("xmlValidateName__internal_alias")));
+#else
+#ifndef xmlValidateName
+extern __typeof (xmlValidateName) xmlValidateName__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateName xmlValidateName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNameValue
+extern __typeof (xmlValidateNameValue) xmlValidateNameValue __attribute((alias("xmlValidateNameValue__internal_alias")));
+#else
+#ifndef xmlValidateNameValue
+extern __typeof (xmlValidateNameValue) xmlValidateNameValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNameValue xmlValidateNameValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNamesValue
+extern __typeof (xmlValidateNamesValue) xmlValidateNamesValue __attribute((alias("xmlValidateNamesValue__internal_alias")));
+#else
+#ifndef xmlValidateNamesValue
+extern __typeof (xmlValidateNamesValue) xmlValidateNamesValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNamesValue xmlValidateNamesValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNmtokenValue
+extern __typeof (xmlValidateNmtokenValue) xmlValidateNmtokenValue __attribute((alias("xmlValidateNmtokenValue__internal_alias")));
+#else
+#ifndef xmlValidateNmtokenValue
+extern __typeof (xmlValidateNmtokenValue) xmlValidateNmtokenValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNmtokenValue xmlValidateNmtokenValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNmtokensValue
+extern __typeof (xmlValidateNmtokensValue) xmlValidateNmtokensValue __attribute((alias("xmlValidateNmtokensValue__internal_alias")));
+#else
+#ifndef xmlValidateNmtokensValue
+extern __typeof (xmlValidateNmtokensValue) xmlValidateNmtokensValue__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNmtokensValue xmlValidateNmtokensValue__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNotationDecl
+extern __typeof (xmlValidateNotationDecl) xmlValidateNotationDecl __attribute((alias("xmlValidateNotationDecl__internal_alias")));
+#else
+#ifndef xmlValidateNotationDecl
+extern __typeof (xmlValidateNotationDecl) xmlValidateNotationDecl__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNotationDecl xmlValidateNotationDecl__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateNotationUse
+extern __typeof (xmlValidateNotationUse) xmlValidateNotationUse __attribute((alias("xmlValidateNotationUse__internal_alias")));
+#else
+#ifndef xmlValidateNotationUse
+extern __typeof (xmlValidateNotationUse) xmlValidateNotationUse__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateNotationUse xmlValidateNotationUse__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateOneAttribute
+extern __typeof (xmlValidateOneAttribute) xmlValidateOneAttribute __attribute((alias("xmlValidateOneAttribute__internal_alias")));
+#else
+#ifndef xmlValidateOneAttribute
+extern __typeof (xmlValidateOneAttribute) xmlValidateOneAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateOneAttribute xmlValidateOneAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateOneElement
+extern __typeof (xmlValidateOneElement) xmlValidateOneElement __attribute((alias("xmlValidateOneElement__internal_alias")));
+#else
+#ifndef xmlValidateOneElement
+extern __typeof (xmlValidateOneElement) xmlValidateOneElement__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateOneElement xmlValidateOneElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateOneNamespace
+extern __typeof (xmlValidateOneNamespace) xmlValidateOneNamespace __attribute((alias("xmlValidateOneNamespace__internal_alias")));
+#else
+#ifndef xmlValidateOneNamespace
+extern __typeof (xmlValidateOneNamespace) xmlValidateOneNamespace__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateOneNamespace xmlValidateOneNamespace__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidatePopElement
+extern __typeof (xmlValidatePopElement) xmlValidatePopElement __attribute((alias("xmlValidatePopElement__internal_alias")));
+#else
+#ifndef xmlValidatePopElement
+extern __typeof (xmlValidatePopElement) xmlValidatePopElement__internal_alias __attribute((visibility("hidden")));
+#define xmlValidatePopElement xmlValidatePopElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidatePushCData
+extern __typeof (xmlValidatePushCData) xmlValidatePushCData __attribute((alias("xmlValidatePushCData__internal_alias")));
+#else
+#ifndef xmlValidatePushCData
+extern __typeof (xmlValidatePushCData) xmlValidatePushCData__internal_alias __attribute((visibility("hidden")));
+#define xmlValidatePushCData xmlValidatePushCData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidatePushElement
+extern __typeof (xmlValidatePushElement) xmlValidatePushElement __attribute((alias("xmlValidatePushElement__internal_alias")));
+#else
+#ifndef xmlValidatePushElement
+extern __typeof (xmlValidatePushElement) xmlValidatePushElement__internal_alias __attribute((visibility("hidden")));
+#define xmlValidatePushElement xmlValidatePushElement__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_tree
+#undef xmlValidateQName
+extern __typeof (xmlValidateQName) xmlValidateQName __attribute((alias("xmlValidateQName__internal_alias")));
+#else
+#ifndef xmlValidateQName
+extern __typeof (xmlValidateQName) xmlValidateQName__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateQName xmlValidateQName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef bottom_valid
+#undef xmlValidateRoot
+extern __typeof (xmlValidateRoot) xmlValidateRoot __attribute((alias("xmlValidateRoot__internal_alias")));
+#else
+#ifndef xmlValidateRoot
+extern __typeof (xmlValidateRoot) xmlValidateRoot__internal_alias __attribute((visibility("hidden")));
+#define xmlValidateRoot xmlValidateRoot__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeFreeContext
+extern __typeof (xmlXIncludeFreeContext) xmlXIncludeFreeContext __attribute((alias("xmlXIncludeFreeContext__internal_alias")));
+#else
+#ifndef xmlXIncludeFreeContext
+extern __typeof (xmlXIncludeFreeContext) xmlXIncludeFreeContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeFreeContext xmlXIncludeFreeContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeNewContext
+extern __typeof (xmlXIncludeNewContext) xmlXIncludeNewContext __attribute((alias("xmlXIncludeNewContext__internal_alias")));
+#else
+#ifndef xmlXIncludeNewContext
+extern __typeof (xmlXIncludeNewContext) xmlXIncludeNewContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeNewContext xmlXIncludeNewContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcess
+extern __typeof (xmlXIncludeProcess) xmlXIncludeProcess __attribute((alias("xmlXIncludeProcess__internal_alias")));
+#else
+#ifndef xmlXIncludeProcess
+extern __typeof (xmlXIncludeProcess) xmlXIncludeProcess__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcess xmlXIncludeProcess__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessFlags
+extern __typeof (xmlXIncludeProcessFlags) xmlXIncludeProcessFlags __attribute((alias("xmlXIncludeProcessFlags__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessFlags
+extern __typeof (xmlXIncludeProcessFlags) xmlXIncludeProcessFlags__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessFlags xmlXIncludeProcessFlags__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessFlagsData
+extern __typeof (xmlXIncludeProcessFlagsData) xmlXIncludeProcessFlagsData __attribute((alias("xmlXIncludeProcessFlagsData__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessFlagsData
+extern __typeof (xmlXIncludeProcessFlagsData) xmlXIncludeProcessFlagsData__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessFlagsData xmlXIncludeProcessFlagsData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessNode
+extern __typeof (xmlXIncludeProcessNode) xmlXIncludeProcessNode __attribute((alias("xmlXIncludeProcessNode__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessNode
+extern __typeof (xmlXIncludeProcessNode) xmlXIncludeProcessNode__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessNode xmlXIncludeProcessNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessTree
+extern __typeof (xmlXIncludeProcessTree) xmlXIncludeProcessTree __attribute((alias("xmlXIncludeProcessTree__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessTree
+extern __typeof (xmlXIncludeProcessTree) xmlXIncludeProcessTree__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessTree xmlXIncludeProcessTree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessTreeFlags
+extern __typeof (xmlXIncludeProcessTreeFlags) xmlXIncludeProcessTreeFlags __attribute((alias("xmlXIncludeProcessTreeFlags__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessTreeFlags
+extern __typeof (xmlXIncludeProcessTreeFlags) xmlXIncludeProcessTreeFlags__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessTreeFlags xmlXIncludeProcessTreeFlags__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeProcessTreeFlagsData
+extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData __attribute((alias("xmlXIncludeProcessTreeFlagsData__internal_alias")));
+#else
+#ifndef xmlXIncludeProcessTreeFlagsData
+extern __typeof (xmlXIncludeProcessTreeFlagsData) xmlXIncludeProcessTreeFlagsData__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeProcessTreeFlagsData xmlXIncludeProcessTreeFlagsData__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+#ifdef bottom_xinclude
+#undef xmlXIncludeSetFlags
+extern __typeof (xmlXIncludeSetFlags) xmlXIncludeSetFlags __attribute((alias("xmlXIncludeSetFlags__internal_alias")));
+#else
+#ifndef xmlXIncludeSetFlags
+extern __typeof (xmlXIncludeSetFlags) xmlXIncludeSetFlags__internal_alias __attribute((visibility("hidden")));
+#define xmlXIncludeSetFlags xmlXIncludeSetFlags__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathAddValues
+extern __typeof (xmlXPathAddValues) xmlXPathAddValues __attribute((alias("xmlXPathAddValues__internal_alias")));
+#else
+#ifndef xmlXPathAddValues
+extern __typeof (xmlXPathAddValues) xmlXPathAddValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathAddValues xmlXPathAddValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathBooleanFunction
+extern __typeof (xmlXPathBooleanFunction) xmlXPathBooleanFunction __attribute((alias("xmlXPathBooleanFunction__internal_alias")));
+#else
+#ifndef xmlXPathBooleanFunction
+extern __typeof (xmlXPathBooleanFunction) xmlXPathBooleanFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathBooleanFunction xmlXPathBooleanFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastBooleanToNumber
+extern __typeof (xmlXPathCastBooleanToNumber) xmlXPathCastBooleanToNumber __attribute((alias("xmlXPathCastBooleanToNumber__internal_alias")));
+#else
+#ifndef xmlXPathCastBooleanToNumber
+extern __typeof (xmlXPathCastBooleanToNumber) xmlXPathCastBooleanToNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastBooleanToNumber xmlXPathCastBooleanToNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastBooleanToString
+extern __typeof (xmlXPathCastBooleanToString) xmlXPathCastBooleanToString __attribute((alias("xmlXPathCastBooleanToString__internal_alias")));
+#else
+#ifndef xmlXPathCastBooleanToString
+extern __typeof (xmlXPathCastBooleanToString) xmlXPathCastBooleanToString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastBooleanToString xmlXPathCastBooleanToString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNodeSetToBoolean
+extern __typeof (xmlXPathCastNodeSetToBoolean) xmlXPathCastNodeSetToBoolean __attribute((alias("xmlXPathCastNodeSetToBoolean__internal_alias")));
+#else
+#ifndef xmlXPathCastNodeSetToBoolean
+extern __typeof (xmlXPathCastNodeSetToBoolean) xmlXPathCastNodeSetToBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNodeSetToBoolean xmlXPathCastNodeSetToBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNodeSetToNumber
+extern __typeof (xmlXPathCastNodeSetToNumber) xmlXPathCastNodeSetToNumber __attribute((alias("xmlXPathCastNodeSetToNumber__internal_alias")));
+#else
+#ifndef xmlXPathCastNodeSetToNumber
+extern __typeof (xmlXPathCastNodeSetToNumber) xmlXPathCastNodeSetToNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNodeSetToNumber xmlXPathCastNodeSetToNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNodeSetToString
+extern __typeof (xmlXPathCastNodeSetToString) xmlXPathCastNodeSetToString __attribute((alias("xmlXPathCastNodeSetToString__internal_alias")));
+#else
+#ifndef xmlXPathCastNodeSetToString
+extern __typeof (xmlXPathCastNodeSetToString) xmlXPathCastNodeSetToString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNodeSetToString xmlXPathCastNodeSetToString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNodeToNumber
+extern __typeof (xmlXPathCastNodeToNumber) xmlXPathCastNodeToNumber __attribute((alias("xmlXPathCastNodeToNumber__internal_alias")));
+#else
+#ifndef xmlXPathCastNodeToNumber
+extern __typeof (xmlXPathCastNodeToNumber) xmlXPathCastNodeToNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNodeToNumber xmlXPathCastNodeToNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNodeToString
+extern __typeof (xmlXPathCastNodeToString) xmlXPathCastNodeToString __attribute((alias("xmlXPathCastNodeToString__internal_alias")));
+#else
+#ifndef xmlXPathCastNodeToString
+extern __typeof (xmlXPathCastNodeToString) xmlXPathCastNodeToString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNodeToString xmlXPathCastNodeToString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNumberToBoolean
+extern __typeof (xmlXPathCastNumberToBoolean) xmlXPathCastNumberToBoolean __attribute((alias("xmlXPathCastNumberToBoolean__internal_alias")));
+#else
+#ifndef xmlXPathCastNumberToBoolean
+extern __typeof (xmlXPathCastNumberToBoolean) xmlXPathCastNumberToBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNumberToBoolean xmlXPathCastNumberToBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastNumberToString
+extern __typeof (xmlXPathCastNumberToString) xmlXPathCastNumberToString __attribute((alias("xmlXPathCastNumberToString__internal_alias")));
+#else
+#ifndef xmlXPathCastNumberToString
+extern __typeof (xmlXPathCastNumberToString) xmlXPathCastNumberToString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastNumberToString xmlXPathCastNumberToString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastStringToBoolean
+extern __typeof (xmlXPathCastStringToBoolean) xmlXPathCastStringToBoolean __attribute((alias("xmlXPathCastStringToBoolean__internal_alias")));
+#else
+#ifndef xmlXPathCastStringToBoolean
+extern __typeof (xmlXPathCastStringToBoolean) xmlXPathCastStringToBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastStringToBoolean xmlXPathCastStringToBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastStringToNumber
+extern __typeof (xmlXPathCastStringToNumber) xmlXPathCastStringToNumber __attribute((alias("xmlXPathCastStringToNumber__internal_alias")));
+#else
+#ifndef xmlXPathCastStringToNumber
+extern __typeof (xmlXPathCastStringToNumber) xmlXPathCastStringToNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastStringToNumber xmlXPathCastStringToNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastToBoolean
+extern __typeof (xmlXPathCastToBoolean) xmlXPathCastToBoolean __attribute((alias("xmlXPathCastToBoolean__internal_alias")));
+#else
+#ifndef xmlXPathCastToBoolean
+extern __typeof (xmlXPathCastToBoolean) xmlXPathCastToBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastToBoolean xmlXPathCastToBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastToNumber
+extern __typeof (xmlXPathCastToNumber) xmlXPathCastToNumber __attribute((alias("xmlXPathCastToNumber__internal_alias")));
+#else
+#ifndef xmlXPathCastToNumber
+extern __typeof (xmlXPathCastToNumber) xmlXPathCastToNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastToNumber xmlXPathCastToNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCastToString
+extern __typeof (xmlXPathCastToString) xmlXPathCastToString __attribute((alias("xmlXPathCastToString__internal_alias")));
+#else
+#ifndef xmlXPathCastToString
+extern __typeof (xmlXPathCastToString) xmlXPathCastToString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCastToString xmlXPathCastToString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCeilingFunction
+extern __typeof (xmlXPathCeilingFunction) xmlXPathCeilingFunction __attribute((alias("xmlXPathCeilingFunction__internal_alias")));
+#else
+#ifndef xmlXPathCeilingFunction
+extern __typeof (xmlXPathCeilingFunction) xmlXPathCeilingFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCeilingFunction xmlXPathCeilingFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCmpNodes
+extern __typeof (xmlXPathCmpNodes) xmlXPathCmpNodes __attribute((alias("xmlXPathCmpNodes__internal_alias")));
+#else
+#ifndef xmlXPathCmpNodes
+extern __typeof (xmlXPathCmpNodes) xmlXPathCmpNodes__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCmpNodes xmlXPathCmpNodes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCompareValues
+extern __typeof (xmlXPathCompareValues) xmlXPathCompareValues __attribute((alias("xmlXPathCompareValues__internal_alias")));
+#else
+#ifndef xmlXPathCompareValues
+extern __typeof (xmlXPathCompareValues) xmlXPathCompareValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCompareValues xmlXPathCompareValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCompile
+extern __typeof (xmlXPathCompile) xmlXPathCompile __attribute((alias("xmlXPathCompile__internal_alias")));
+#else
+#ifndef xmlXPathCompile
+extern __typeof (xmlXPathCompile) xmlXPathCompile__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCompile xmlXPathCompile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCompiledEval
+extern __typeof (xmlXPathCompiledEval) xmlXPathCompiledEval __attribute((alias("xmlXPathCompiledEval__internal_alias")));
+#else
+#ifndef xmlXPathCompiledEval
+extern __typeof (xmlXPathCompiledEval) xmlXPathCompiledEval__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCompiledEval xmlXPathCompiledEval__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCompiledEvalToBoolean
+extern __typeof (xmlXPathCompiledEvalToBoolean) xmlXPathCompiledEvalToBoolean __attribute((alias("xmlXPathCompiledEvalToBoolean__internal_alias")));
+#else
+#ifndef xmlXPathCompiledEvalToBoolean
+extern __typeof (xmlXPathCompiledEvalToBoolean) xmlXPathCompiledEvalToBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCompiledEvalToBoolean xmlXPathCompiledEvalToBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathConcatFunction
+extern __typeof (xmlXPathConcatFunction) xmlXPathConcatFunction __attribute((alias("xmlXPathConcatFunction__internal_alias")));
+#else
+#ifndef xmlXPathConcatFunction
+extern __typeof (xmlXPathConcatFunction) xmlXPathConcatFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathConcatFunction xmlXPathConcatFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathContainsFunction
+extern __typeof (xmlXPathContainsFunction) xmlXPathContainsFunction __attribute((alias("xmlXPathContainsFunction__internal_alias")));
+#else
+#ifndef xmlXPathContainsFunction
+extern __typeof (xmlXPathContainsFunction) xmlXPathContainsFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathContainsFunction xmlXPathContainsFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathContextSetCache
+extern __typeof (xmlXPathContextSetCache) xmlXPathContextSetCache __attribute((alias("xmlXPathContextSetCache__internal_alias")));
+#else
+#ifndef xmlXPathContextSetCache
+extern __typeof (xmlXPathContextSetCache) xmlXPathContextSetCache__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathContextSetCache xmlXPathContextSetCache__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathConvertBoolean
+extern __typeof (xmlXPathConvertBoolean) xmlXPathConvertBoolean __attribute((alias("xmlXPathConvertBoolean__internal_alias")));
+#else
+#ifndef xmlXPathConvertBoolean
+extern __typeof (xmlXPathConvertBoolean) xmlXPathConvertBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathConvertBoolean xmlXPathConvertBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathConvertNumber
+extern __typeof (xmlXPathConvertNumber) xmlXPathConvertNumber __attribute((alias("xmlXPathConvertNumber__internal_alias")));
+#else
+#ifndef xmlXPathConvertNumber
+extern __typeof (xmlXPathConvertNumber) xmlXPathConvertNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathConvertNumber xmlXPathConvertNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathConvertString
+extern __typeof (xmlXPathConvertString) xmlXPathConvertString __attribute((alias("xmlXPathConvertString__internal_alias")));
+#else
+#ifndef xmlXPathConvertString
+extern __typeof (xmlXPathConvertString) xmlXPathConvertString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathConvertString xmlXPathConvertString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCountFunction
+extern __typeof (xmlXPathCountFunction) xmlXPathCountFunction __attribute((alias("xmlXPathCountFunction__internal_alias")));
+#else
+#ifndef xmlXPathCountFunction
+extern __typeof (xmlXPathCountFunction) xmlXPathCountFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCountFunction xmlXPathCountFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathCtxtCompile
+extern __typeof (xmlXPathCtxtCompile) xmlXPathCtxtCompile __attribute((alias("xmlXPathCtxtCompile__internal_alias")));
+#else
+#ifndef xmlXPathCtxtCompile
+extern __typeof (xmlXPathCtxtCompile) xmlXPathCtxtCompile__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathCtxtCompile xmlXPathCtxtCompile__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDebugDumpCompExpr
+extern __typeof (xmlXPathDebugDumpCompExpr) xmlXPathDebugDumpCompExpr __attribute((alias("xmlXPathDebugDumpCompExpr__internal_alias")));
+#else
+#ifndef xmlXPathDebugDumpCompExpr
+extern __typeof (xmlXPathDebugDumpCompExpr) xmlXPathDebugDumpCompExpr__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDebugDumpCompExpr xmlXPathDebugDumpCompExpr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDebugDumpObject
+extern __typeof (xmlXPathDebugDumpObject) xmlXPathDebugDumpObject __attribute((alias("xmlXPathDebugDumpObject__internal_alias")));
+#else
+#ifndef xmlXPathDebugDumpObject
+extern __typeof (xmlXPathDebugDumpObject) xmlXPathDebugDumpObject__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDebugDumpObject xmlXPathDebugDumpObject__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDifference
+extern __typeof (xmlXPathDifference) xmlXPathDifference __attribute((alias("xmlXPathDifference__internal_alias")));
+#else
+#ifndef xmlXPathDifference
+extern __typeof (xmlXPathDifference) xmlXPathDifference__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDifference xmlXPathDifference__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDistinct
+extern __typeof (xmlXPathDistinct) xmlXPathDistinct __attribute((alias("xmlXPathDistinct__internal_alias")));
+#else
+#ifndef xmlXPathDistinct
+extern __typeof (xmlXPathDistinct) xmlXPathDistinct__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDistinct xmlXPathDistinct__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDistinctSorted
+extern __typeof (xmlXPathDistinctSorted) xmlXPathDistinctSorted __attribute((alias("xmlXPathDistinctSorted__internal_alias")));
+#else
+#ifndef xmlXPathDistinctSorted
+extern __typeof (xmlXPathDistinctSorted) xmlXPathDistinctSorted__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDistinctSorted xmlXPathDistinctSorted__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathDivValues
+extern __typeof (xmlXPathDivValues) xmlXPathDivValues __attribute((alias("xmlXPathDivValues__internal_alias")));
+#else
+#ifndef xmlXPathDivValues
+extern __typeof (xmlXPathDivValues) xmlXPathDivValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathDivValues xmlXPathDivValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEqualValues
+extern __typeof (xmlXPathEqualValues) xmlXPathEqualValues __attribute((alias("xmlXPathEqualValues__internal_alias")));
+#else
+#ifndef xmlXPathEqualValues
+extern __typeof (xmlXPathEqualValues) xmlXPathEqualValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEqualValues xmlXPathEqualValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathErr
+extern __typeof (xmlXPathErr) xmlXPathErr __attribute((alias("xmlXPathErr__internal_alias")));
+#else
+#ifndef xmlXPathErr
+extern __typeof (xmlXPathErr) xmlXPathErr__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathErr xmlXPathErr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEval
+extern __typeof (xmlXPathEval) xmlXPathEval __attribute((alias("xmlXPathEval__internal_alias")));
+#else
+#ifndef xmlXPathEval
+extern __typeof (xmlXPathEval) xmlXPathEval__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEval xmlXPathEval__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEvalExpr
+extern __typeof (xmlXPathEvalExpr) xmlXPathEvalExpr __attribute((alias("xmlXPathEvalExpr__internal_alias")));
+#else
+#ifndef xmlXPathEvalExpr
+extern __typeof (xmlXPathEvalExpr) xmlXPathEvalExpr__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEvalExpr xmlXPathEvalExpr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEvalExpression
+extern __typeof (xmlXPathEvalExpression) xmlXPathEvalExpression __attribute((alias("xmlXPathEvalExpression__internal_alias")));
+#else
+#ifndef xmlXPathEvalExpression
+extern __typeof (xmlXPathEvalExpression) xmlXPathEvalExpression__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEvalExpression xmlXPathEvalExpression__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEvalPredicate
+extern __typeof (xmlXPathEvalPredicate) xmlXPathEvalPredicate __attribute((alias("xmlXPathEvalPredicate__internal_alias")));
+#else
+#ifndef xmlXPathEvalPredicate
+extern __typeof (xmlXPathEvalPredicate) xmlXPathEvalPredicate__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEvalPredicate xmlXPathEvalPredicate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathEvaluatePredicateResult
+extern __typeof (xmlXPathEvaluatePredicateResult) xmlXPathEvaluatePredicateResult __attribute((alias("xmlXPathEvaluatePredicateResult__internal_alias")));
+#else
+#ifndef xmlXPathEvaluatePredicateResult
+extern __typeof (xmlXPathEvaluatePredicateResult) xmlXPathEvaluatePredicateResult__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathEvaluatePredicateResult xmlXPathEvaluatePredicateResult__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFalseFunction
+extern __typeof (xmlXPathFalseFunction) xmlXPathFalseFunction __attribute((alias("xmlXPathFalseFunction__internal_alias")));
+#else
+#ifndef xmlXPathFalseFunction
+extern __typeof (xmlXPathFalseFunction) xmlXPathFalseFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFalseFunction xmlXPathFalseFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFloorFunction
+extern __typeof (xmlXPathFloorFunction) xmlXPathFloorFunction __attribute((alias("xmlXPathFloorFunction__internal_alias")));
+#else
+#ifndef xmlXPathFloorFunction
+extern __typeof (xmlXPathFloorFunction) xmlXPathFloorFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFloorFunction xmlXPathFloorFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeCompExpr
+extern __typeof (xmlXPathFreeCompExpr) xmlXPathFreeCompExpr __attribute((alias("xmlXPathFreeCompExpr__internal_alias")));
+#else
+#ifndef xmlXPathFreeCompExpr
+extern __typeof (xmlXPathFreeCompExpr) xmlXPathFreeCompExpr__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeCompExpr xmlXPathFreeCompExpr__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeContext
+extern __typeof (xmlXPathFreeContext) xmlXPathFreeContext __attribute((alias("xmlXPathFreeContext__internal_alias")));
+#else
+#ifndef xmlXPathFreeContext
+extern __typeof (xmlXPathFreeContext) xmlXPathFreeContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeContext xmlXPathFreeContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeNodeSet
+extern __typeof (xmlXPathFreeNodeSet) xmlXPathFreeNodeSet __attribute((alias("xmlXPathFreeNodeSet__internal_alias")));
+#else
+#ifndef xmlXPathFreeNodeSet
+extern __typeof (xmlXPathFreeNodeSet) xmlXPathFreeNodeSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeNodeSet xmlXPathFreeNodeSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeNodeSetList
+extern __typeof (xmlXPathFreeNodeSetList) xmlXPathFreeNodeSetList __attribute((alias("xmlXPathFreeNodeSetList__internal_alias")));
+#else
+#ifndef xmlXPathFreeNodeSetList
+extern __typeof (xmlXPathFreeNodeSetList) xmlXPathFreeNodeSetList__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeNodeSetList xmlXPathFreeNodeSetList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeObject
+extern __typeof (xmlXPathFreeObject) xmlXPathFreeObject __attribute((alias("xmlXPathFreeObject__internal_alias")));
+#else
+#ifndef xmlXPathFreeObject
+extern __typeof (xmlXPathFreeObject) xmlXPathFreeObject__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeObject xmlXPathFreeObject__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFreeParserContext
+extern __typeof (xmlXPathFreeParserContext) xmlXPathFreeParserContext __attribute((alias("xmlXPathFreeParserContext__internal_alias")));
+#else
+#ifndef xmlXPathFreeParserContext
+extern __typeof (xmlXPathFreeParserContext) xmlXPathFreeParserContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFreeParserContext xmlXPathFreeParserContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFunctionLookup
+extern __typeof (xmlXPathFunctionLookup) xmlXPathFunctionLookup __attribute((alias("xmlXPathFunctionLookup__internal_alias")));
+#else
+#ifndef xmlXPathFunctionLookup
+extern __typeof (xmlXPathFunctionLookup) xmlXPathFunctionLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFunctionLookup xmlXPathFunctionLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathFunctionLookupNS
+extern __typeof (xmlXPathFunctionLookupNS) xmlXPathFunctionLookupNS __attribute((alias("xmlXPathFunctionLookupNS__internal_alias")));
+#else
+#ifndef xmlXPathFunctionLookupNS
+extern __typeof (xmlXPathFunctionLookupNS) xmlXPathFunctionLookupNS__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathFunctionLookupNS xmlXPathFunctionLookupNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathHasSameNodes
+extern __typeof (xmlXPathHasSameNodes) xmlXPathHasSameNodes __attribute((alias("xmlXPathHasSameNodes__internal_alias")));
+#else
+#ifndef xmlXPathHasSameNodes
+extern __typeof (xmlXPathHasSameNodes) xmlXPathHasSameNodes__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathHasSameNodes xmlXPathHasSameNodes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathIdFunction
+extern __typeof (xmlXPathIdFunction) xmlXPathIdFunction __attribute((alias("xmlXPathIdFunction__internal_alias")));
+#else
+#ifndef xmlXPathIdFunction
+extern __typeof (xmlXPathIdFunction) xmlXPathIdFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathIdFunction xmlXPathIdFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathInit
+extern __typeof (xmlXPathInit) xmlXPathInit __attribute((alias("xmlXPathInit__internal_alias")));
+#else
+#ifndef xmlXPathInit
+extern __typeof (xmlXPathInit) xmlXPathInit__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathInit xmlXPathInit__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathIntersection
+extern __typeof (xmlXPathIntersection) xmlXPathIntersection __attribute((alias("xmlXPathIntersection__internal_alias")));
+#else
+#ifndef xmlXPathIntersection
+extern __typeof (xmlXPathIntersection) xmlXPathIntersection__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathIntersection xmlXPathIntersection__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathIsInf
+extern __typeof (xmlXPathIsInf) xmlXPathIsInf __attribute((alias("xmlXPathIsInf__internal_alias")));
+#else
+#ifndef xmlXPathIsInf
+extern __typeof (xmlXPathIsInf) xmlXPathIsInf__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathIsInf xmlXPathIsInf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathIsNaN
+extern __typeof (xmlXPathIsNaN) xmlXPathIsNaN __attribute((alias("xmlXPathIsNaN__internal_alias")));
+#else
+#ifndef xmlXPathIsNaN
+extern __typeof (xmlXPathIsNaN) xmlXPathIsNaN__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathIsNaN xmlXPathIsNaN__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathIsNodeType
+extern __typeof (xmlXPathIsNodeType) xmlXPathIsNodeType __attribute((alias("xmlXPathIsNodeType__internal_alias")));
+#else
+#ifndef xmlXPathIsNodeType
+extern __typeof (xmlXPathIsNodeType) xmlXPathIsNodeType__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathIsNodeType xmlXPathIsNodeType__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathLangFunction
+extern __typeof (xmlXPathLangFunction) xmlXPathLangFunction __attribute((alias("xmlXPathLangFunction__internal_alias")));
+#else
+#ifndef xmlXPathLangFunction
+extern __typeof (xmlXPathLangFunction) xmlXPathLangFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathLangFunction xmlXPathLangFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathLastFunction
+extern __typeof (xmlXPathLastFunction) xmlXPathLastFunction __attribute((alias("xmlXPathLastFunction__internal_alias")));
+#else
+#ifndef xmlXPathLastFunction
+extern __typeof (xmlXPathLastFunction) xmlXPathLastFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathLastFunction xmlXPathLastFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathLeading
+extern __typeof (xmlXPathLeading) xmlXPathLeading __attribute((alias("xmlXPathLeading__internal_alias")));
+#else
+#ifndef xmlXPathLeading
+extern __typeof (xmlXPathLeading) xmlXPathLeading__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathLeading xmlXPathLeading__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathLeadingSorted
+extern __typeof (xmlXPathLeadingSorted) xmlXPathLeadingSorted __attribute((alias("xmlXPathLeadingSorted__internal_alias")));
+#else
+#ifndef xmlXPathLeadingSorted
+extern __typeof (xmlXPathLeadingSorted) xmlXPathLeadingSorted__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathLeadingSorted xmlXPathLeadingSorted__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathLocalNameFunction
+extern __typeof (xmlXPathLocalNameFunction) xmlXPathLocalNameFunction __attribute((alias("xmlXPathLocalNameFunction__internal_alias")));
+#else
+#ifndef xmlXPathLocalNameFunction
+extern __typeof (xmlXPathLocalNameFunction) xmlXPathLocalNameFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathLocalNameFunction xmlXPathLocalNameFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathModValues
+extern __typeof (xmlXPathModValues) xmlXPathModValues __attribute((alias("xmlXPathModValues__internal_alias")));
+#else
+#ifndef xmlXPathModValues
+extern __typeof (xmlXPathModValues) xmlXPathModValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathModValues xmlXPathModValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathMultValues
+extern __typeof (xmlXPathMultValues) xmlXPathMultValues __attribute((alias("xmlXPathMultValues__internal_alias")));
+#else
+#ifndef xmlXPathMultValues
+extern __typeof (xmlXPathMultValues) xmlXPathMultValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathMultValues xmlXPathMultValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNamespaceURIFunction
+extern __typeof (xmlXPathNamespaceURIFunction) xmlXPathNamespaceURIFunction __attribute((alias("xmlXPathNamespaceURIFunction__internal_alias")));
+#else
+#ifndef xmlXPathNamespaceURIFunction
+extern __typeof (xmlXPathNamespaceURIFunction) xmlXPathNamespaceURIFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNamespaceURIFunction xmlXPathNamespaceURIFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewBoolean
+extern __typeof (xmlXPathNewBoolean) xmlXPathNewBoolean __attribute((alias("xmlXPathNewBoolean__internal_alias")));
+#else
+#ifndef xmlXPathNewBoolean
+extern __typeof (xmlXPathNewBoolean) xmlXPathNewBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewBoolean xmlXPathNewBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewCString
+extern __typeof (xmlXPathNewCString) xmlXPathNewCString __attribute((alias("xmlXPathNewCString__internal_alias")));
+#else
+#ifndef xmlXPathNewCString
+extern __typeof (xmlXPathNewCString) xmlXPathNewCString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewCString xmlXPathNewCString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewContext
+extern __typeof (xmlXPathNewContext) xmlXPathNewContext __attribute((alias("xmlXPathNewContext__internal_alias")));
+#else
+#ifndef xmlXPathNewContext
+extern __typeof (xmlXPathNewContext) xmlXPathNewContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewContext xmlXPathNewContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewFloat
+extern __typeof (xmlXPathNewFloat) xmlXPathNewFloat __attribute((alias("xmlXPathNewFloat__internal_alias")));
+#else
+#ifndef xmlXPathNewFloat
+extern __typeof (xmlXPathNewFloat) xmlXPathNewFloat__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewFloat xmlXPathNewFloat__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewNodeSet
+extern __typeof (xmlXPathNewNodeSet) xmlXPathNewNodeSet __attribute((alias("xmlXPathNewNodeSet__internal_alias")));
+#else
+#ifndef xmlXPathNewNodeSet
+extern __typeof (xmlXPathNewNodeSet) xmlXPathNewNodeSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewNodeSet xmlXPathNewNodeSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewNodeSetList
+extern __typeof (xmlXPathNewNodeSetList) xmlXPathNewNodeSetList __attribute((alias("xmlXPathNewNodeSetList__internal_alias")));
+#else
+#ifndef xmlXPathNewNodeSetList
+extern __typeof (xmlXPathNewNodeSetList) xmlXPathNewNodeSetList__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewNodeSetList xmlXPathNewNodeSetList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewParserContext
+extern __typeof (xmlXPathNewParserContext) xmlXPathNewParserContext __attribute((alias("xmlXPathNewParserContext__internal_alias")));
+#else
+#ifndef xmlXPathNewParserContext
+extern __typeof (xmlXPathNewParserContext) xmlXPathNewParserContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewParserContext xmlXPathNewParserContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewString
+extern __typeof (xmlXPathNewString) xmlXPathNewString __attribute((alias("xmlXPathNewString__internal_alias")));
+#else
+#ifndef xmlXPathNewString
+extern __typeof (xmlXPathNewString) xmlXPathNewString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewString xmlXPathNewString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNewValueTree
+extern __typeof (xmlXPathNewValueTree) xmlXPathNewValueTree __attribute((alias("xmlXPathNewValueTree__internal_alias")));
+#else
+#ifndef xmlXPathNewValueTree
+extern __typeof (xmlXPathNewValueTree) xmlXPathNewValueTree__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNewValueTree xmlXPathNewValueTree__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextAncestor
+extern __typeof (xmlXPathNextAncestor) xmlXPathNextAncestor __attribute((alias("xmlXPathNextAncestor__internal_alias")));
+#else
+#ifndef xmlXPathNextAncestor
+extern __typeof (xmlXPathNextAncestor) xmlXPathNextAncestor__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextAncestor xmlXPathNextAncestor__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextAncestorOrSelf
+extern __typeof (xmlXPathNextAncestorOrSelf) xmlXPathNextAncestorOrSelf __attribute((alias("xmlXPathNextAncestorOrSelf__internal_alias")));
+#else
+#ifndef xmlXPathNextAncestorOrSelf
+extern __typeof (xmlXPathNextAncestorOrSelf) xmlXPathNextAncestorOrSelf__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextAncestorOrSelf xmlXPathNextAncestorOrSelf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextAttribute
+extern __typeof (xmlXPathNextAttribute) xmlXPathNextAttribute __attribute((alias("xmlXPathNextAttribute__internal_alias")));
+#else
+#ifndef xmlXPathNextAttribute
+extern __typeof (xmlXPathNextAttribute) xmlXPathNextAttribute__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextAttribute xmlXPathNextAttribute__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextChild
+extern __typeof (xmlXPathNextChild) xmlXPathNextChild __attribute((alias("xmlXPathNextChild__internal_alias")));
+#else
+#ifndef xmlXPathNextChild
+extern __typeof (xmlXPathNextChild) xmlXPathNextChild__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextChild xmlXPathNextChild__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextDescendant
+extern __typeof (xmlXPathNextDescendant) xmlXPathNextDescendant __attribute((alias("xmlXPathNextDescendant__internal_alias")));
+#else
+#ifndef xmlXPathNextDescendant
+extern __typeof (xmlXPathNextDescendant) xmlXPathNextDescendant__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextDescendant xmlXPathNextDescendant__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextDescendantOrSelf
+extern __typeof (xmlXPathNextDescendantOrSelf) xmlXPathNextDescendantOrSelf __attribute((alias("xmlXPathNextDescendantOrSelf__internal_alias")));
+#else
+#ifndef xmlXPathNextDescendantOrSelf
+extern __typeof (xmlXPathNextDescendantOrSelf) xmlXPathNextDescendantOrSelf__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextDescendantOrSelf xmlXPathNextDescendantOrSelf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextFollowing
+extern __typeof (xmlXPathNextFollowing) xmlXPathNextFollowing __attribute((alias("xmlXPathNextFollowing__internal_alias")));
+#else
+#ifndef xmlXPathNextFollowing
+extern __typeof (xmlXPathNextFollowing) xmlXPathNextFollowing__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextFollowing xmlXPathNextFollowing__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextFollowingSibling
+extern __typeof (xmlXPathNextFollowingSibling) xmlXPathNextFollowingSibling __attribute((alias("xmlXPathNextFollowingSibling__internal_alias")));
+#else
+#ifndef xmlXPathNextFollowingSibling
+extern __typeof (xmlXPathNextFollowingSibling) xmlXPathNextFollowingSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextFollowingSibling xmlXPathNextFollowingSibling__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextNamespace
+extern __typeof (xmlXPathNextNamespace) xmlXPathNextNamespace __attribute((alias("xmlXPathNextNamespace__internal_alias")));
+#else
+#ifndef xmlXPathNextNamespace
+extern __typeof (xmlXPathNextNamespace) xmlXPathNextNamespace__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextNamespace xmlXPathNextNamespace__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextParent
+extern __typeof (xmlXPathNextParent) xmlXPathNextParent __attribute((alias("xmlXPathNextParent__internal_alias")));
+#else
+#ifndef xmlXPathNextParent
+extern __typeof (xmlXPathNextParent) xmlXPathNextParent__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextParent xmlXPathNextParent__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextPreceding
+extern __typeof (xmlXPathNextPreceding) xmlXPathNextPreceding __attribute((alias("xmlXPathNextPreceding__internal_alias")));
+#else
+#ifndef xmlXPathNextPreceding
+extern __typeof (xmlXPathNextPreceding) xmlXPathNextPreceding__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextPreceding xmlXPathNextPreceding__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextPrecedingSibling
+extern __typeof (xmlXPathNextPrecedingSibling) xmlXPathNextPrecedingSibling __attribute((alias("xmlXPathNextPrecedingSibling__internal_alias")));
+#else
+#ifndef xmlXPathNextPrecedingSibling
+extern __typeof (xmlXPathNextPrecedingSibling) xmlXPathNextPrecedingSibling__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextPrecedingSibling xmlXPathNextPrecedingSibling__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNextSelf
+extern __typeof (xmlXPathNextSelf) xmlXPathNextSelf __attribute((alias("xmlXPathNextSelf__internal_alias")));
+#else
+#ifndef xmlXPathNextSelf
+extern __typeof (xmlXPathNextSelf) xmlXPathNextSelf__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNextSelf xmlXPathNextSelf__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeEval
+extern __typeof (xmlXPathNodeEval) xmlXPathNodeEval __attribute((alias("xmlXPathNodeEval__internal_alias")));
+#else
+#ifndef xmlXPathNodeEval
+extern __typeof (xmlXPathNodeEval) xmlXPathNodeEval__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeEval xmlXPathNodeEval__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeLeading
+extern __typeof (xmlXPathNodeLeading) xmlXPathNodeLeading __attribute((alias("xmlXPathNodeLeading__internal_alias")));
+#else
+#ifndef xmlXPathNodeLeading
+extern __typeof (xmlXPathNodeLeading) xmlXPathNodeLeading__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeLeading xmlXPathNodeLeading__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeLeadingSorted
+extern __typeof (xmlXPathNodeLeadingSorted) xmlXPathNodeLeadingSorted __attribute((alias("xmlXPathNodeLeadingSorted__internal_alias")));
+#else
+#ifndef xmlXPathNodeLeadingSorted
+extern __typeof (xmlXPathNodeLeadingSorted) xmlXPathNodeLeadingSorted__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeLeadingSorted xmlXPathNodeLeadingSorted__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetAdd
+extern __typeof (xmlXPathNodeSetAdd) xmlXPathNodeSetAdd __attribute((alias("xmlXPathNodeSetAdd__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetAdd
+extern __typeof (xmlXPathNodeSetAdd) xmlXPathNodeSetAdd__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetAdd xmlXPathNodeSetAdd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetAddNs
+extern __typeof (xmlXPathNodeSetAddNs) xmlXPathNodeSetAddNs __attribute((alias("xmlXPathNodeSetAddNs__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetAddNs
+extern __typeof (xmlXPathNodeSetAddNs) xmlXPathNodeSetAddNs__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetAddNs xmlXPathNodeSetAddNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetAddUnique
+extern __typeof (xmlXPathNodeSetAddUnique) xmlXPathNodeSetAddUnique __attribute((alias("xmlXPathNodeSetAddUnique__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetAddUnique
+extern __typeof (xmlXPathNodeSetAddUnique) xmlXPathNodeSetAddUnique__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetAddUnique xmlXPathNodeSetAddUnique__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetContains
+extern __typeof (xmlXPathNodeSetContains) xmlXPathNodeSetContains __attribute((alias("xmlXPathNodeSetContains__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetContains
+extern __typeof (xmlXPathNodeSetContains) xmlXPathNodeSetContains__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetContains xmlXPathNodeSetContains__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetCreate
+extern __typeof (xmlXPathNodeSetCreate) xmlXPathNodeSetCreate __attribute((alias("xmlXPathNodeSetCreate__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetCreate
+extern __typeof (xmlXPathNodeSetCreate) xmlXPathNodeSetCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetCreate xmlXPathNodeSetCreate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetDel
+extern __typeof (xmlXPathNodeSetDel) xmlXPathNodeSetDel __attribute((alias("xmlXPathNodeSetDel__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetDel
+extern __typeof (xmlXPathNodeSetDel) xmlXPathNodeSetDel__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetDel xmlXPathNodeSetDel__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetFreeNs
+extern __typeof (xmlXPathNodeSetFreeNs) xmlXPathNodeSetFreeNs __attribute((alias("xmlXPathNodeSetFreeNs__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetFreeNs
+extern __typeof (xmlXPathNodeSetFreeNs) xmlXPathNodeSetFreeNs__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetFreeNs xmlXPathNodeSetFreeNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetMerge
+extern __typeof (xmlXPathNodeSetMerge) xmlXPathNodeSetMerge __attribute((alias("xmlXPathNodeSetMerge__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetMerge
+extern __typeof (xmlXPathNodeSetMerge) xmlXPathNodeSetMerge__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetMerge xmlXPathNodeSetMerge__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetRemove
+extern __typeof (xmlXPathNodeSetRemove) xmlXPathNodeSetRemove __attribute((alias("xmlXPathNodeSetRemove__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetRemove
+extern __typeof (xmlXPathNodeSetRemove) xmlXPathNodeSetRemove__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetRemove xmlXPathNodeSetRemove__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeSetSort
+extern __typeof (xmlXPathNodeSetSort) xmlXPathNodeSetSort __attribute((alias("xmlXPathNodeSetSort__internal_alias")));
+#else
+#ifndef xmlXPathNodeSetSort
+extern __typeof (xmlXPathNodeSetSort) xmlXPathNodeSetSort__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeSetSort xmlXPathNodeSetSort__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeTrailing
+extern __typeof (xmlXPathNodeTrailing) xmlXPathNodeTrailing __attribute((alias("xmlXPathNodeTrailing__internal_alias")));
+#else
+#ifndef xmlXPathNodeTrailing
+extern __typeof (xmlXPathNodeTrailing) xmlXPathNodeTrailing__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeTrailing xmlXPathNodeTrailing__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNodeTrailingSorted
+extern __typeof (xmlXPathNodeTrailingSorted) xmlXPathNodeTrailingSorted __attribute((alias("xmlXPathNodeTrailingSorted__internal_alias")));
+#else
+#ifndef xmlXPathNodeTrailingSorted
+extern __typeof (xmlXPathNodeTrailingSorted) xmlXPathNodeTrailingSorted__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNodeTrailingSorted xmlXPathNodeTrailingSorted__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNormalizeFunction
+extern __typeof (xmlXPathNormalizeFunction) xmlXPathNormalizeFunction __attribute((alias("xmlXPathNormalizeFunction__internal_alias")));
+#else
+#ifndef xmlXPathNormalizeFunction
+extern __typeof (xmlXPathNormalizeFunction) xmlXPathNormalizeFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNormalizeFunction xmlXPathNormalizeFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNotEqualValues
+extern __typeof (xmlXPathNotEqualValues) xmlXPathNotEqualValues __attribute((alias("xmlXPathNotEqualValues__internal_alias")));
+#else
+#ifndef xmlXPathNotEqualValues
+extern __typeof (xmlXPathNotEqualValues) xmlXPathNotEqualValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNotEqualValues xmlXPathNotEqualValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNotFunction
+extern __typeof (xmlXPathNotFunction) xmlXPathNotFunction __attribute((alias("xmlXPathNotFunction__internal_alias")));
+#else
+#ifndef xmlXPathNotFunction
+extern __typeof (xmlXPathNotFunction) xmlXPathNotFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNotFunction xmlXPathNotFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNsLookup
+extern __typeof (xmlXPathNsLookup) xmlXPathNsLookup __attribute((alias("xmlXPathNsLookup__internal_alias")));
+#else
+#ifndef xmlXPathNsLookup
+extern __typeof (xmlXPathNsLookup) xmlXPathNsLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNsLookup xmlXPathNsLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathNumberFunction
+extern __typeof (xmlXPathNumberFunction) xmlXPathNumberFunction __attribute((alias("xmlXPathNumberFunction__internal_alias")));
+#else
+#ifndef xmlXPathNumberFunction
+extern __typeof (xmlXPathNumberFunction) xmlXPathNumberFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathNumberFunction xmlXPathNumberFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathObjectCopy
+extern __typeof (xmlXPathObjectCopy) xmlXPathObjectCopy __attribute((alias("xmlXPathObjectCopy__internal_alias")));
+#else
+#ifndef xmlXPathObjectCopy
+extern __typeof (xmlXPathObjectCopy) xmlXPathObjectCopy__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathObjectCopy xmlXPathObjectCopy__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathOrderDocElems
+extern __typeof (xmlXPathOrderDocElems) xmlXPathOrderDocElems __attribute((alias("xmlXPathOrderDocElems__internal_alias")));
+#else
+#ifndef xmlXPathOrderDocElems
+extern __typeof (xmlXPathOrderDocElems) xmlXPathOrderDocElems__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathOrderDocElems xmlXPathOrderDocElems__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathParseNCName
+extern __typeof (xmlXPathParseNCName) xmlXPathParseNCName __attribute((alias("xmlXPathParseNCName__internal_alias")));
+#else
+#ifndef xmlXPathParseNCName
+extern __typeof (xmlXPathParseNCName) xmlXPathParseNCName__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathParseNCName xmlXPathParseNCName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathParseName
+extern __typeof (xmlXPathParseName) xmlXPathParseName __attribute((alias("xmlXPathParseName__internal_alias")));
+#else
+#ifndef xmlXPathParseName
+extern __typeof (xmlXPathParseName) xmlXPathParseName__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathParseName xmlXPathParseName__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPopBoolean
+extern __typeof (xmlXPathPopBoolean) xmlXPathPopBoolean __attribute((alias("xmlXPathPopBoolean__internal_alias")));
+#else
+#ifndef xmlXPathPopBoolean
+extern __typeof (xmlXPathPopBoolean) xmlXPathPopBoolean__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPopBoolean xmlXPathPopBoolean__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPopExternal
+extern __typeof (xmlXPathPopExternal) xmlXPathPopExternal __attribute((alias("xmlXPathPopExternal__internal_alias")));
+#else
+#ifndef xmlXPathPopExternal
+extern __typeof (xmlXPathPopExternal) xmlXPathPopExternal__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPopExternal xmlXPathPopExternal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPopNodeSet
+extern __typeof (xmlXPathPopNodeSet) xmlXPathPopNodeSet __attribute((alias("xmlXPathPopNodeSet__internal_alias")));
+#else
+#ifndef xmlXPathPopNodeSet
+extern __typeof (xmlXPathPopNodeSet) xmlXPathPopNodeSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPopNodeSet xmlXPathPopNodeSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPopNumber
+extern __typeof (xmlXPathPopNumber) xmlXPathPopNumber __attribute((alias("xmlXPathPopNumber__internal_alias")));
+#else
+#ifndef xmlXPathPopNumber
+extern __typeof (xmlXPathPopNumber) xmlXPathPopNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPopNumber xmlXPathPopNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPopString
+extern __typeof (xmlXPathPopString) xmlXPathPopString __attribute((alias("xmlXPathPopString__internal_alias")));
+#else
+#ifndef xmlXPathPopString
+extern __typeof (xmlXPathPopString) xmlXPathPopString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPopString xmlXPathPopString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathPositionFunction
+extern __typeof (xmlXPathPositionFunction) xmlXPathPositionFunction __attribute((alias("xmlXPathPositionFunction__internal_alias")));
+#else
+#ifndef xmlXPathPositionFunction
+extern __typeof (xmlXPathPositionFunction) xmlXPathPositionFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathPositionFunction xmlXPathPositionFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterAllFunctions
+extern __typeof (xmlXPathRegisterAllFunctions) xmlXPathRegisterAllFunctions __attribute((alias("xmlXPathRegisterAllFunctions__internal_alias")));
+#else
+#ifndef xmlXPathRegisterAllFunctions
+extern __typeof (xmlXPathRegisterAllFunctions) xmlXPathRegisterAllFunctions__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterAllFunctions xmlXPathRegisterAllFunctions__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterFunc
+extern __typeof (xmlXPathRegisterFunc) xmlXPathRegisterFunc __attribute((alias("xmlXPathRegisterFunc__internal_alias")));
+#else
+#ifndef xmlXPathRegisterFunc
+extern __typeof (xmlXPathRegisterFunc) xmlXPathRegisterFunc__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterFunc xmlXPathRegisterFunc__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterFuncLookup
+extern __typeof (xmlXPathRegisterFuncLookup) xmlXPathRegisterFuncLookup __attribute((alias("xmlXPathRegisterFuncLookup__internal_alias")));
+#else
+#ifndef xmlXPathRegisterFuncLookup
+extern __typeof (xmlXPathRegisterFuncLookup) xmlXPathRegisterFuncLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterFuncLookup xmlXPathRegisterFuncLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterFuncNS
+extern __typeof (xmlXPathRegisterFuncNS) xmlXPathRegisterFuncNS __attribute((alias("xmlXPathRegisterFuncNS__internal_alias")));
+#else
+#ifndef xmlXPathRegisterFuncNS
+extern __typeof (xmlXPathRegisterFuncNS) xmlXPathRegisterFuncNS__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterFuncNS xmlXPathRegisterFuncNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterNs
+extern __typeof (xmlXPathRegisterNs) xmlXPathRegisterNs __attribute((alias("xmlXPathRegisterNs__internal_alias")));
+#else
+#ifndef xmlXPathRegisterNs
+extern __typeof (xmlXPathRegisterNs) xmlXPathRegisterNs__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterNs xmlXPathRegisterNs__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterVariable
+extern __typeof (xmlXPathRegisterVariable) xmlXPathRegisterVariable __attribute((alias("xmlXPathRegisterVariable__internal_alias")));
+#else
+#ifndef xmlXPathRegisterVariable
+extern __typeof (xmlXPathRegisterVariable) xmlXPathRegisterVariable__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterVariable xmlXPathRegisterVariable__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterVariableLookup
+extern __typeof (xmlXPathRegisterVariableLookup) xmlXPathRegisterVariableLookup __attribute((alias("xmlXPathRegisterVariableLookup__internal_alias")));
+#else
+#ifndef xmlXPathRegisterVariableLookup
+extern __typeof (xmlXPathRegisterVariableLookup) xmlXPathRegisterVariableLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterVariableLookup xmlXPathRegisterVariableLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisterVariableNS
+extern __typeof (xmlXPathRegisterVariableNS) xmlXPathRegisterVariableNS __attribute((alias("xmlXPathRegisterVariableNS__internal_alias")));
+#else
+#ifndef xmlXPathRegisterVariableNS
+extern __typeof (xmlXPathRegisterVariableNS) xmlXPathRegisterVariableNS__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisterVariableNS xmlXPathRegisterVariableNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisteredFuncsCleanup
+extern __typeof (xmlXPathRegisteredFuncsCleanup) xmlXPathRegisteredFuncsCleanup __attribute((alias("xmlXPathRegisteredFuncsCleanup__internal_alias")));
+#else
+#ifndef xmlXPathRegisteredFuncsCleanup
+extern __typeof (xmlXPathRegisteredFuncsCleanup) xmlXPathRegisteredFuncsCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisteredFuncsCleanup xmlXPathRegisteredFuncsCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisteredNsCleanup
+extern __typeof (xmlXPathRegisteredNsCleanup) xmlXPathRegisteredNsCleanup __attribute((alias("xmlXPathRegisteredNsCleanup__internal_alias")));
+#else
+#ifndef xmlXPathRegisteredNsCleanup
+extern __typeof (xmlXPathRegisteredNsCleanup) xmlXPathRegisteredNsCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisteredNsCleanup xmlXPathRegisteredNsCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRegisteredVariablesCleanup
+extern __typeof (xmlXPathRegisteredVariablesCleanup) xmlXPathRegisteredVariablesCleanup __attribute((alias("xmlXPathRegisteredVariablesCleanup__internal_alias")));
+#else
+#ifndef xmlXPathRegisteredVariablesCleanup
+extern __typeof (xmlXPathRegisteredVariablesCleanup) xmlXPathRegisteredVariablesCleanup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRegisteredVariablesCleanup xmlXPathRegisteredVariablesCleanup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRoot
+extern __typeof (xmlXPathRoot) xmlXPathRoot __attribute((alias("xmlXPathRoot__internal_alias")));
+#else
+#ifndef xmlXPathRoot
+extern __typeof (xmlXPathRoot) xmlXPathRoot__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRoot xmlXPathRoot__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathRoundFunction
+extern __typeof (xmlXPathRoundFunction) xmlXPathRoundFunction __attribute((alias("xmlXPathRoundFunction__internal_alias")));
+#else
+#ifndef xmlXPathRoundFunction
+extern __typeof (xmlXPathRoundFunction) xmlXPathRoundFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathRoundFunction xmlXPathRoundFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSetContextNode
+extern __typeof (xmlXPathSetContextNode) xmlXPathSetContextNode __attribute((alias("xmlXPathSetContextNode__internal_alias")));
+#else
+#ifndef xmlXPathSetContextNode
+extern __typeof (xmlXPathSetContextNode) xmlXPathSetContextNode__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSetContextNode xmlXPathSetContextNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathStartsWithFunction
+extern __typeof (xmlXPathStartsWithFunction) xmlXPathStartsWithFunction __attribute((alias("xmlXPathStartsWithFunction__internal_alias")));
+#else
+#ifndef xmlXPathStartsWithFunction
+extern __typeof (xmlXPathStartsWithFunction) xmlXPathStartsWithFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathStartsWithFunction xmlXPathStartsWithFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathStringEvalNumber
+extern __typeof (xmlXPathStringEvalNumber) xmlXPathStringEvalNumber __attribute((alias("xmlXPathStringEvalNumber__internal_alias")));
+#else
+#ifndef xmlXPathStringEvalNumber
+extern __typeof (xmlXPathStringEvalNumber) xmlXPathStringEvalNumber__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathStringEvalNumber xmlXPathStringEvalNumber__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathStringFunction
+extern __typeof (xmlXPathStringFunction) xmlXPathStringFunction __attribute((alias("xmlXPathStringFunction__internal_alias")));
+#else
+#ifndef xmlXPathStringFunction
+extern __typeof (xmlXPathStringFunction) xmlXPathStringFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathStringFunction xmlXPathStringFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathStringLengthFunction
+extern __typeof (xmlXPathStringLengthFunction) xmlXPathStringLengthFunction __attribute((alias("xmlXPathStringLengthFunction__internal_alias")));
+#else
+#ifndef xmlXPathStringLengthFunction
+extern __typeof (xmlXPathStringLengthFunction) xmlXPathStringLengthFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathStringLengthFunction xmlXPathStringLengthFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSubValues
+extern __typeof (xmlXPathSubValues) xmlXPathSubValues __attribute((alias("xmlXPathSubValues__internal_alias")));
+#else
+#ifndef xmlXPathSubValues
+extern __typeof (xmlXPathSubValues) xmlXPathSubValues__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSubValues xmlXPathSubValues__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSubstringAfterFunction
+extern __typeof (xmlXPathSubstringAfterFunction) xmlXPathSubstringAfterFunction __attribute((alias("xmlXPathSubstringAfterFunction__internal_alias")));
+#else
+#ifndef xmlXPathSubstringAfterFunction
+extern __typeof (xmlXPathSubstringAfterFunction) xmlXPathSubstringAfterFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSubstringAfterFunction xmlXPathSubstringAfterFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSubstringBeforeFunction
+extern __typeof (xmlXPathSubstringBeforeFunction) xmlXPathSubstringBeforeFunction __attribute((alias("xmlXPathSubstringBeforeFunction__internal_alias")));
+#else
+#ifndef xmlXPathSubstringBeforeFunction
+extern __typeof (xmlXPathSubstringBeforeFunction) xmlXPathSubstringBeforeFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSubstringBeforeFunction xmlXPathSubstringBeforeFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSubstringFunction
+extern __typeof (xmlXPathSubstringFunction) xmlXPathSubstringFunction __attribute((alias("xmlXPathSubstringFunction__internal_alias")));
+#else
+#ifndef xmlXPathSubstringFunction
+extern __typeof (xmlXPathSubstringFunction) xmlXPathSubstringFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSubstringFunction xmlXPathSubstringFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathSumFunction
+extern __typeof (xmlXPathSumFunction) xmlXPathSumFunction __attribute((alias("xmlXPathSumFunction__internal_alias")));
+#else
+#ifndef xmlXPathSumFunction
+extern __typeof (xmlXPathSumFunction) xmlXPathSumFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathSumFunction xmlXPathSumFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathTrailing
+extern __typeof (xmlXPathTrailing) xmlXPathTrailing __attribute((alias("xmlXPathTrailing__internal_alias")));
+#else
+#ifndef xmlXPathTrailing
+extern __typeof (xmlXPathTrailing) xmlXPathTrailing__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathTrailing xmlXPathTrailing__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathTrailingSorted
+extern __typeof (xmlXPathTrailingSorted) xmlXPathTrailingSorted __attribute((alias("xmlXPathTrailingSorted__internal_alias")));
+#else
+#ifndef xmlXPathTrailingSorted
+extern __typeof (xmlXPathTrailingSorted) xmlXPathTrailingSorted__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathTrailingSorted xmlXPathTrailingSorted__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathTranslateFunction
+extern __typeof (xmlXPathTranslateFunction) xmlXPathTranslateFunction __attribute((alias("xmlXPathTranslateFunction__internal_alias")));
+#else
+#ifndef xmlXPathTranslateFunction
+extern __typeof (xmlXPathTranslateFunction) xmlXPathTranslateFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathTranslateFunction xmlXPathTranslateFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathTrueFunction
+extern __typeof (xmlXPathTrueFunction) xmlXPathTrueFunction __attribute((alias("xmlXPathTrueFunction__internal_alias")));
+#else
+#ifndef xmlXPathTrueFunction
+extern __typeof (xmlXPathTrueFunction) xmlXPathTrueFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathTrueFunction xmlXPathTrueFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathValueFlipSign
+extern __typeof (xmlXPathValueFlipSign) xmlXPathValueFlipSign __attribute((alias("xmlXPathValueFlipSign__internal_alias")));
+#else
+#ifndef xmlXPathValueFlipSign
+extern __typeof (xmlXPathValueFlipSign) xmlXPathValueFlipSign__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathValueFlipSign xmlXPathValueFlipSign__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathVariableLookup
+extern __typeof (xmlXPathVariableLookup) xmlXPathVariableLookup __attribute((alias("xmlXPathVariableLookup__internal_alias")));
+#else
+#ifndef xmlXPathVariableLookup
+extern __typeof (xmlXPathVariableLookup) xmlXPathVariableLookup__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathVariableLookup xmlXPathVariableLookup__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathVariableLookupNS
+extern __typeof (xmlXPathVariableLookupNS) xmlXPathVariableLookupNS __attribute((alias("xmlXPathVariableLookupNS__internal_alias")));
+#else
+#ifndef xmlXPathVariableLookupNS
+extern __typeof (xmlXPathVariableLookupNS) xmlXPathVariableLookupNS__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathVariableLookupNS xmlXPathVariableLookupNS__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathWrapCString
+extern __typeof (xmlXPathWrapCString) xmlXPathWrapCString __attribute((alias("xmlXPathWrapCString__internal_alias")));
+#else
+#ifndef xmlXPathWrapCString
+extern __typeof (xmlXPathWrapCString) xmlXPathWrapCString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathWrapCString xmlXPathWrapCString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathWrapExternal
+extern __typeof (xmlXPathWrapExternal) xmlXPathWrapExternal __attribute((alias("xmlXPathWrapExternal__internal_alias")));
+#else
+#ifndef xmlXPathWrapExternal
+extern __typeof (xmlXPathWrapExternal) xmlXPathWrapExternal__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathWrapExternal xmlXPathWrapExternal__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathWrapNodeSet
+extern __typeof (xmlXPathWrapNodeSet) xmlXPathWrapNodeSet __attribute((alias("xmlXPathWrapNodeSet__internal_alias")));
+#else
+#ifndef xmlXPathWrapNodeSet
+extern __typeof (xmlXPathWrapNodeSet) xmlXPathWrapNodeSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathWrapNodeSet xmlXPathWrapNodeSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPathWrapString
+extern __typeof (xmlXPathWrapString) xmlXPathWrapString __attribute((alias("xmlXPathWrapString__internal_alias")));
+#else
+#ifndef xmlXPathWrapString
+extern __typeof (xmlXPathWrapString) xmlXPathWrapString__internal_alias __attribute((visibility("hidden")));
+#define xmlXPathWrapString xmlXPathWrapString__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPATH_ENABLED)
+#ifdef bottom_xpath
+#undef xmlXPatherror
+extern __typeof (xmlXPatherror) xmlXPatherror __attribute((alias("xmlXPatherror__internal_alias")));
+#else
+#ifndef xmlXPatherror
+extern __typeof (xmlXPatherror) xmlXPatherror__internal_alias __attribute((visibility("hidden")));
+#define xmlXPatherror xmlXPatherror__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrBuildNodeList
+extern __typeof (xmlXPtrBuildNodeList) xmlXPtrBuildNodeList __attribute((alias("xmlXPtrBuildNodeList__internal_alias")));
+#else
+#ifndef xmlXPtrBuildNodeList
+extern __typeof (xmlXPtrBuildNodeList) xmlXPtrBuildNodeList__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrBuildNodeList xmlXPtrBuildNodeList__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrEval
+extern __typeof (xmlXPtrEval) xmlXPtrEval __attribute((alias("xmlXPtrEval__internal_alias")));
+#else
+#ifndef xmlXPtrEval
+extern __typeof (xmlXPtrEval) xmlXPtrEval__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrEval xmlXPtrEval__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrEvalRangePredicate
+extern __typeof (xmlXPtrEvalRangePredicate) xmlXPtrEvalRangePredicate __attribute((alias("xmlXPtrEvalRangePredicate__internal_alias")));
+#else
+#ifndef xmlXPtrEvalRangePredicate
+extern __typeof (xmlXPtrEvalRangePredicate) xmlXPtrEvalRangePredicate__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrEvalRangePredicate xmlXPtrEvalRangePredicate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrFreeLocationSet
+extern __typeof (xmlXPtrFreeLocationSet) xmlXPtrFreeLocationSet __attribute((alias("xmlXPtrFreeLocationSet__internal_alias")));
+#else
+#ifndef xmlXPtrFreeLocationSet
+extern __typeof (xmlXPtrFreeLocationSet) xmlXPtrFreeLocationSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrFreeLocationSet xmlXPtrFreeLocationSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrLocationSetAdd
+extern __typeof (xmlXPtrLocationSetAdd) xmlXPtrLocationSetAdd __attribute((alias("xmlXPtrLocationSetAdd__internal_alias")));
+#else
+#ifndef xmlXPtrLocationSetAdd
+extern __typeof (xmlXPtrLocationSetAdd) xmlXPtrLocationSetAdd__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrLocationSetAdd xmlXPtrLocationSetAdd__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrLocationSetCreate
+extern __typeof (xmlXPtrLocationSetCreate) xmlXPtrLocationSetCreate __attribute((alias("xmlXPtrLocationSetCreate__internal_alias")));
+#else
+#ifndef xmlXPtrLocationSetCreate
+extern __typeof (xmlXPtrLocationSetCreate) xmlXPtrLocationSetCreate__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrLocationSetCreate xmlXPtrLocationSetCreate__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrLocationSetDel
+extern __typeof (xmlXPtrLocationSetDel) xmlXPtrLocationSetDel __attribute((alias("xmlXPtrLocationSetDel__internal_alias")));
+#else
+#ifndef xmlXPtrLocationSetDel
+extern __typeof (xmlXPtrLocationSetDel) xmlXPtrLocationSetDel__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrLocationSetDel xmlXPtrLocationSetDel__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrLocationSetMerge
+extern __typeof (xmlXPtrLocationSetMerge) xmlXPtrLocationSetMerge __attribute((alias("xmlXPtrLocationSetMerge__internal_alias")));
+#else
+#ifndef xmlXPtrLocationSetMerge
+extern __typeof (xmlXPtrLocationSetMerge) xmlXPtrLocationSetMerge__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrLocationSetMerge xmlXPtrLocationSetMerge__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrLocationSetRemove
+extern __typeof (xmlXPtrLocationSetRemove) xmlXPtrLocationSetRemove __attribute((alias("xmlXPtrLocationSetRemove__internal_alias")));
+#else
+#ifndef xmlXPtrLocationSetRemove
+extern __typeof (xmlXPtrLocationSetRemove) xmlXPtrLocationSetRemove__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrLocationSetRemove xmlXPtrLocationSetRemove__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewCollapsedRange
+extern __typeof (xmlXPtrNewCollapsedRange) xmlXPtrNewCollapsedRange __attribute((alias("xmlXPtrNewCollapsedRange__internal_alias")));
+#else
+#ifndef xmlXPtrNewCollapsedRange
+extern __typeof (xmlXPtrNewCollapsedRange) xmlXPtrNewCollapsedRange__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewCollapsedRange xmlXPtrNewCollapsedRange__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewContext
+extern __typeof (xmlXPtrNewContext) xmlXPtrNewContext __attribute((alias("xmlXPtrNewContext__internal_alias")));
+#else
+#ifndef xmlXPtrNewContext
+extern __typeof (xmlXPtrNewContext) xmlXPtrNewContext__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewContext xmlXPtrNewContext__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewLocationSetNodeSet
+extern __typeof (xmlXPtrNewLocationSetNodeSet) xmlXPtrNewLocationSetNodeSet __attribute((alias("xmlXPtrNewLocationSetNodeSet__internal_alias")));
+#else
+#ifndef xmlXPtrNewLocationSetNodeSet
+extern __typeof (xmlXPtrNewLocationSetNodeSet) xmlXPtrNewLocationSetNodeSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewLocationSetNodeSet xmlXPtrNewLocationSetNodeSet__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewLocationSetNodes
+extern __typeof (xmlXPtrNewLocationSetNodes) xmlXPtrNewLocationSetNodes __attribute((alias("xmlXPtrNewLocationSetNodes__internal_alias")));
+#else
+#ifndef xmlXPtrNewLocationSetNodes
+extern __typeof (xmlXPtrNewLocationSetNodes) xmlXPtrNewLocationSetNodes__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewLocationSetNodes xmlXPtrNewLocationSetNodes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRange
+extern __typeof (xmlXPtrNewRange) xmlXPtrNewRange __attribute((alias("xmlXPtrNewRange__internal_alias")));
+#else
+#ifndef xmlXPtrNewRange
+extern __typeof (xmlXPtrNewRange) xmlXPtrNewRange__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRange xmlXPtrNewRange__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRangeNodeObject
+extern __typeof (xmlXPtrNewRangeNodeObject) xmlXPtrNewRangeNodeObject __attribute((alias("xmlXPtrNewRangeNodeObject__internal_alias")));
+#else
+#ifndef xmlXPtrNewRangeNodeObject
+extern __typeof (xmlXPtrNewRangeNodeObject) xmlXPtrNewRangeNodeObject__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRangeNodeObject xmlXPtrNewRangeNodeObject__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRangeNodePoint
+extern __typeof (xmlXPtrNewRangeNodePoint) xmlXPtrNewRangeNodePoint __attribute((alias("xmlXPtrNewRangeNodePoint__internal_alias")));
+#else
+#ifndef xmlXPtrNewRangeNodePoint
+extern __typeof (xmlXPtrNewRangeNodePoint) xmlXPtrNewRangeNodePoint__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRangeNodePoint xmlXPtrNewRangeNodePoint__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRangeNodes
+extern __typeof (xmlXPtrNewRangeNodes) xmlXPtrNewRangeNodes __attribute((alias("xmlXPtrNewRangeNodes__internal_alias")));
+#else
+#ifndef xmlXPtrNewRangeNodes
+extern __typeof (xmlXPtrNewRangeNodes) xmlXPtrNewRangeNodes__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRangeNodes xmlXPtrNewRangeNodes__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRangePointNode
+extern __typeof (xmlXPtrNewRangePointNode) xmlXPtrNewRangePointNode __attribute((alias("xmlXPtrNewRangePointNode__internal_alias")));
+#else
+#ifndef xmlXPtrNewRangePointNode
+extern __typeof (xmlXPtrNewRangePointNode) xmlXPtrNewRangePointNode__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRangePointNode xmlXPtrNewRangePointNode__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrNewRangePoints
+extern __typeof (xmlXPtrNewRangePoints) xmlXPtrNewRangePoints __attribute((alias("xmlXPtrNewRangePoints__internal_alias")));
+#else
+#ifndef xmlXPtrNewRangePoints
+extern __typeof (xmlXPtrNewRangePoints) xmlXPtrNewRangePoints__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrNewRangePoints xmlXPtrNewRangePoints__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrRangeToFunction
+extern __typeof (xmlXPtrRangeToFunction) xmlXPtrRangeToFunction __attribute((alias("xmlXPtrRangeToFunction__internal_alias")));
+#else
+#ifndef xmlXPtrRangeToFunction
+extern __typeof (xmlXPtrRangeToFunction) xmlXPtrRangeToFunction__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrRangeToFunction xmlXPtrRangeToFunction__internal_alias
+#endif
+#endif
+#endif
+
+#if defined(LIBXML_XPTR_ENABLED)
+#ifdef bottom_xpointer
+#undef xmlXPtrWrapLocationSet
+extern __typeof (xmlXPtrWrapLocationSet) xmlXPtrWrapLocationSet __attribute((alias("xmlXPtrWrapLocationSet__internal_alias")));
+#else
+#ifndef xmlXPtrWrapLocationSet
+extern __typeof (xmlXPtrWrapLocationSet) xmlXPtrWrapLocationSet__internal_alias __attribute((visibility("hidden")));
+#define xmlXPtrWrapLocationSet xmlXPtrWrapLocationSet__internal_alias
+#endif
+#endif
+#endif
+
+
+#endif
+#endif
+#endif
+#endif
+#endif
+
diff --git a/enc.h b/enc.h
new file mode 100644
index 0000000..057d206
--- /dev/null
+++ b/enc.h
@@ -0,0 +1,32 @@
+/*
+ * Summary: Internal Interfaces for encoding in libxml2
+ * Description: this module describes a few interfaces which were
+ * addded along with the API changes in 2.9.0
+ * those are private routines at this point
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ENC_H__
+#define __XML_ENC_H__
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
+ xmlBufferPtr in, int len);
+int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
+int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
+int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_ENC_H__ */
+
+
diff --git a/encoding.c b/encoding.c
new file mode 100644
index 0000000..574e1ae
--- /dev/null
+++ b/encoding.c
@@ -0,0 +1,4085 @@
+/*
+ * encoding.c : implements the encoding conversion functions needed for XML
+ *
+ * Related specs:
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * rfc2781 UTF-16, an encoding of ISO 10646, P. Hoffman, F. Yergeau
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ *
+ * Original code for IsoLatin1 and UTF-16 by "Martin J. Duerst" <duerst@w3.org>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <limits.h>
+
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef LIBXML_ICONV_ENABLED
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#endif
+#include <libxml/encoding.h>
+#include <libxml/xmlmemory.h>
+#ifdef LIBXML_HTML_ENABLED
+#include <libxml/HTMLparser.h>
+#endif
+#include <libxml/globals.h>
+#include <libxml/xmlerror.h>
+
+#include "buf.h"
+#include "enc.h"
+
+static xmlCharEncodingHandlerPtr xmlUTF16LEHandler = NULL;
+static xmlCharEncodingHandlerPtr xmlUTF16BEHandler = NULL;
+
+typedef struct _xmlCharEncodingAlias xmlCharEncodingAlias;
+typedef xmlCharEncodingAlias *xmlCharEncodingAliasPtr;
+struct _xmlCharEncodingAlias {
+ const char *name;
+ const char *alias;
+};
+
+static xmlCharEncodingAliasPtr xmlCharEncodingAliases = NULL;
+static int xmlCharEncodingAliasesNb = 0;
+static int xmlCharEncodingAliasesMax = 0;
+
+#if defined(LIBXML_ICONV_ENABLED) || defined(LIBXML_ICU_ENABLED)
+#if 0
+#define DEBUG_ENCODING /* Define this to get encoding traces */
+#endif
+#else
+#ifdef LIBXML_ISO8859X_ENABLED
+static void xmlRegisterCharEncodingHandlersISO8859x (void);
+#endif
+#endif
+
+static int xmlLittleEndian = 1;
+
+/**
+ * xmlEncodingErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlEncodingErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_I18N, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * xmlErrEncoding:
+ * @error: the error number
+ * @msg: the error message
+ *
+ * n encoding error
+ */
+static void
+xmlEncodingErr(xmlParserErrors error, const char *msg, const char *val)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL,
+ XML_FROM_I18N, error, XML_ERR_FATAL,
+ NULL, 0, val, NULL, NULL, 0, 0, msg, val);
+}
+
+#ifdef LIBXML_ICU_ENABLED
+static uconv_t*
+openIcuConverter(const char* name, int toUnicode)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ uconv_t *conv = (uconv_t *) xmlMalloc(sizeof(uconv_t));
+ if (conv == NULL)
+ return NULL;
+
+ conv->uconv = ucnv_open(name, &status);
+ if (U_FAILURE(status))
+ goto error;
+
+ status = U_ZERO_ERROR;
+ if (toUnicode) {
+ ucnv_setToUCallBack(conv->uconv, UCNV_TO_U_CALLBACK_STOP,
+ NULL, NULL, NULL, &status);
+ }
+ else {
+ ucnv_setFromUCallBack(conv->uconv, UCNV_FROM_U_CALLBACK_STOP,
+ NULL, NULL, NULL, &status);
+ }
+ if (U_FAILURE(status))
+ goto error;
+
+ status = U_ZERO_ERROR;
+ conv->utf8 = ucnv_open("UTF-8", &status);
+ if (U_SUCCESS(status))
+ return conv;
+
+error:
+ if (conv->uconv)
+ ucnv_close(conv->uconv);
+ xmlFree(conv);
+ return NULL;
+}
+
+static void
+closeIcuConverter(uconv_t *conv)
+{
+ if (conv != NULL) {
+ ucnv_close(conv->uconv);
+ ucnv_close(conv->utf8);
+ xmlFree(conv);
+ }
+}
+#endif /* LIBXML_ICU_ENABLED */
+
+/************************************************************************
+ * *
+ * Conversions To/From UTF8 encoding *
+ * *
+ ************************************************************************/
+
+/**
+ * asciiToUTF8:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of ASCII chars
+ * @inlen: the length of @in
+ *
+ * Take a block of ASCII chars in and try to convert it to an UTF-8
+ * block of chars out.
+ * Returns 0 if success, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+static int
+asciiToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ unsigned char* outstart = out;
+ const unsigned char* base = in;
+ const unsigned char* processed = in;
+ unsigned char* outend = out + *outlen;
+ const unsigned char* inend;
+ unsigned int c;
+
+ inend = in + (*inlen);
+ while ((in < inend) && (out - outstart + 5 < *outlen)) {
+ c= *in++;
+
+ if (out >= outend)
+ break;
+ if (c < 0x80) {
+ *out++ = c;
+ } else {
+ *outlen = out - outstart;
+ *inlen = processed - base;
+ return(-1);
+ }
+
+ processed = (const unsigned char*) in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - base;
+ return(*outlen);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * UTF8Toascii:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ASCII
+ * block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+static int
+UTF8Toascii(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ const unsigned char* processed = in;
+ const unsigned char* outend;
+ const unsigned char* outstart = out;
+ const unsigned char* instart = in;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
+ if (in == NULL) {
+ /*
+ * initialization nothing to do
+ */
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend = in + (*inlen);
+ outend = out + (*outlen);
+ while (in < inend) {
+ d = *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in Ascii */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing) {
+ break;
+ }
+
+ for ( ; trailing; trailing--) {
+ if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80))
+ break;
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (c < 0x80) {
+ if (out >= outend)
+ break;
+ *out++ = c;
+ } else {
+ /* no chance for this in Ascii */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ processed = in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(*outlen);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * isolat1ToUTF8:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of ISO Latin 1 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of ISO Latin 1 chars in and try to convert it to an UTF-8
+ * block of chars out.
+ * Returns the number of bytes written if success, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+isolat1ToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ unsigned char* outstart = out;
+ const unsigned char* base = in;
+ unsigned char* outend;
+ const unsigned char* inend;
+ const unsigned char* instop;
+
+ if ((out == NULL) || (in == NULL) || (outlen == NULL) || (inlen == NULL))
+ return(-1);
+
+ outend = out + *outlen;
+ inend = in + (*inlen);
+ instop = inend;
+
+ while ((in < inend) && (out < outend - 1)) {
+ if (*in >= 0x80) {
+ *out++ = (((*in) >> 6) & 0x1F) | 0xC0;
+ *out++ = ((*in) & 0x3F) | 0x80;
+ ++in;
+ }
+ if ((instop - in) > (outend - out)) instop = in + (outend - out);
+ while ((in < instop) && (*in < 0x80)) {
+ *out++ = *in++;
+ }
+ }
+ if ((in < inend) && (out < outend) && (*in < 0x80)) {
+ *out++ = *in++;
+ }
+ *outlen = out - outstart;
+ *inlen = in - base;
+ return(*outlen);
+}
+
+/**
+ * UTF8ToUTF8:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @inb: a pointer to an array of UTF-8 chars
+ * @inlenb: the length of @in in UTF-8 chars
+ *
+ * No op copy operation for UTF8 handling.
+ *
+ * Returns the number of bytes written, or -1 if lack of space.
+ * The value of *inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ */
+static int
+UTF8ToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* inb, int *inlenb)
+{
+ int len;
+
+ if ((out == NULL) || (inb == NULL) || (outlen == NULL) || (inlenb == NULL))
+ return(-1);
+ if (*outlen > *inlenb) {
+ len = *inlenb;
+ } else {
+ len = *outlen;
+ }
+ if (len < 0)
+ return(-1);
+
+ memcpy(out, inb, len);
+
+ *outlen = len;
+ *inlenb = len;
+ return(*outlen);
+}
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * UTF8Toisolat1:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ISO Latin 1
+ * block of chars out.
+ *
+ * Returns the number of bytes written if success, -2 if the transcoding fails,
+ or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+int
+UTF8Toisolat1(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ const unsigned char* processed = in;
+ const unsigned char* outend;
+ const unsigned char* outstart = out;
+ const unsigned char* instart = in;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
+ if (in == NULL) {
+ /*
+ * initialization nothing to do
+ */
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend = in + (*inlen);
+ outend = out + (*outlen);
+ while (in < inend) {
+ d = *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in IsoLat1 */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing) {
+ break;
+ }
+
+ for ( ; trailing; trailing--) {
+ if (in >= inend)
+ break;
+ if (((d= *in++) & 0xC0) != 0x80) {
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (c <= 0xFF) {
+ if (out >= outend)
+ break;
+ *out++ = c;
+ } else {
+ /* no chance for this in IsoLat1 */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ processed = in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(*outlen);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * UTF16LEToUTF8:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @inb: a pointer to an array of UTF-16LE passwd as a byte array
+ * @inlenb: the length of @in in UTF-16LE chars
+ *
+ * Take a block of UTF-16LE ushorts in and try to convert it to an UTF-8
+ * block of chars out. This function assumes the endian property
+ * is the same between the native type of this machine and the
+ * inputed one.
+ *
+ * Returns the number of bytes written, or -1 if lack of space, or -2
+ * if the transcoding fails (if *in is not a valid utf16 string)
+ * The value of *inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ */
+static int
+UTF16LEToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* inb, int *inlenb)
+{
+ unsigned char* outstart = out;
+ const unsigned char* processed = inb;
+ unsigned char* outend = out + *outlen;
+ unsigned short* in = (unsigned short*) inb;
+ unsigned short* inend;
+ unsigned int c, d, inlen;
+ unsigned char *tmp;
+ int bits;
+
+ if ((*inlenb % 2) == 1)
+ (*inlenb)--;
+ inlen = *inlenb / 2;
+ inend = in + inlen;
+ while ((in < inend) && (out - outstart + 5 < *outlen)) {
+ if (xmlLittleEndian) {
+ c= *in++;
+ } else {
+ tmp = (unsigned char *) in;
+ c = *tmp++;
+ c = c | (((unsigned int)*tmp) << 8);
+ in++;
+ }
+ if ((c & 0xFC00) == 0xD800) { /* surrogates */
+ if (in >= inend) { /* (in > inend) shouldn't happens */
+ break;
+ }
+ if (xmlLittleEndian) {
+ d = *in++;
+ } else {
+ tmp = (unsigned char *) in;
+ d = *tmp++;
+ d = d | (((unsigned int)*tmp) << 8);
+ in++;
+ }
+ if ((d & 0xFC00) == 0xDC00) {
+ c &= 0x03FF;
+ c <<= 10;
+ c |= d & 0x03FF;
+ c += 0x10000;
+ }
+ else {
+ *outlen = out - outstart;
+ *inlenb = processed - inb;
+ return(-2);
+ }
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (out >= outend)
+ break;
+ if (c < 0x80) { *out++= c; bits= -6; }
+ else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ if (out >= outend)
+ break;
+ *out++= ((c >> bits) & 0x3F) | 0x80;
+ }
+ processed = (const unsigned char*) in;
+ }
+ *outlen = out - outstart;
+ *inlenb = processed - inb;
+ return(*outlen);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * UTF8ToUTF16LE:
+ * @outb: a pointer to an array of bytes to store the result
+ * @outlen: the length of @outb
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an UTF-16LE
+ * block of chars out.
+ *
+ * Returns the number of bytes written, or -1 if lack of space, or -2
+ * if the transcoding failed.
+ */
+static int
+UTF8ToUTF16LE(unsigned char* outb, int *outlen,
+ const unsigned char* in, int *inlen)
+{
+ unsigned short* out = (unsigned short*) outb;
+ const unsigned char* processed = in;
+ const unsigned char *const instart = in;
+ unsigned short* outstart= out;
+ unsigned short* outend;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+ unsigned char *tmp;
+ unsigned short tmp1, tmp2;
+
+ /* UTF16LE encoding has no BOM */
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
+ if (in == NULL) {
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend= in + *inlen;
+ outend = out + (*outlen / 2);
+ while (in < inend) {
+ d= *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = (out - outstart) * 2;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in UTF-16 */
+ *outlen = (out - outstart) * 2;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing) {
+ break;
+ }
+
+ for ( ; trailing; trailing--) {
+ if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80))
+ break;
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (c < 0x10000) {
+ if (out >= outend)
+ break;
+ if (xmlLittleEndian) {
+ *out++ = c;
+ } else {
+ tmp = (unsigned char *) out;
+ *tmp = c ;
+ *(tmp + 1) = c >> 8 ;
+ out++;
+ }
+ }
+ else if (c < 0x110000) {
+ if (out+1 >= outend)
+ break;
+ c -= 0x10000;
+ if (xmlLittleEndian) {
+ *out++ = 0xD800 | (c >> 10);
+ *out++ = 0xDC00 | (c & 0x03FF);
+ } else {
+ tmp1 = 0xD800 | (c >> 10);
+ tmp = (unsigned char *) out;
+ *tmp = (unsigned char) tmp1;
+ *(tmp + 1) = tmp1 >> 8;
+ out++;
+
+ tmp2 = 0xDC00 | (c & 0x03FF);
+ tmp = (unsigned char *) out;
+ *tmp = (unsigned char) tmp2;
+ *(tmp + 1) = tmp2 >> 8;
+ out++;
+ }
+ }
+ else
+ break;
+ processed = in;
+ }
+ *outlen = (out - outstart) * 2;
+ *inlen = processed - instart;
+ return(*outlen);
+}
+
+/**
+ * UTF8ToUTF16:
+ * @outb: a pointer to an array of bytes to store the result
+ * @outlen: the length of @outb
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an UTF-16
+ * block of chars out.
+ *
+ * Returns the number of bytes written, or -1 if lack of space, or -2
+ * if the transcoding failed.
+ */
+static int
+UTF8ToUTF16(unsigned char* outb, int *outlen,
+ const unsigned char* in, int *inlen)
+{
+ if (in == NULL) {
+ /*
+ * initialization, add the Byte Order Mark for UTF-16LE
+ */
+ if (*outlen >= 2) {
+ outb[0] = 0xFF;
+ outb[1] = 0xFE;
+ *outlen = 2;
+ *inlen = 0;
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "Added FFFE Byte Order Mark\n");
+#endif
+ return(2);
+ }
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ return (UTF8ToUTF16LE(outb, outlen, in, inlen));
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * UTF16BEToUTF8:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @inb: a pointer to an array of UTF-16 passed as a byte array
+ * @inlenb: the length of @in in UTF-16 chars
+ *
+ * Take a block of UTF-16 ushorts in and try to convert it to an UTF-8
+ * block of chars out. This function assumes the endian property
+ * is the same between the native type of this machine and the
+ * inputed one.
+ *
+ * Returns the number of bytes written, or -1 if lack of space, or -2
+ * if the transcoding fails (if *in is not a valid utf16 string)
+ * The value of *inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ */
+static int
+UTF16BEToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* inb, int *inlenb)
+{
+ unsigned char* outstart = out;
+ const unsigned char* processed = inb;
+ unsigned char* outend = out + *outlen;
+ unsigned short* in = (unsigned short*) inb;
+ unsigned short* inend;
+ unsigned int c, d, inlen;
+ unsigned char *tmp;
+ int bits;
+
+ if ((*inlenb % 2) == 1)
+ (*inlenb)--;
+ inlen = *inlenb / 2;
+ inend= in + inlen;
+ while (in < inend) {
+ if (xmlLittleEndian) {
+ tmp = (unsigned char *) in;
+ c = *tmp++;
+ c = c << 8;
+ c = c | (unsigned int) *tmp;
+ in++;
+ } else {
+ c= *in++;
+ }
+ if ((c & 0xFC00) == 0xD800) { /* surrogates */
+ if (in >= inend) { /* (in > inend) shouldn't happens */
+ *outlen = out - outstart;
+ *inlenb = processed - inb;
+ return(-2);
+ }
+ if (xmlLittleEndian) {
+ tmp = (unsigned char *) in;
+ d = *tmp++;
+ d = d << 8;
+ d = d | (unsigned int) *tmp;
+ in++;
+ } else {
+ d= *in++;
+ }
+ if ((d & 0xFC00) == 0xDC00) {
+ c &= 0x03FF;
+ c <<= 10;
+ c |= d & 0x03FF;
+ c += 0x10000;
+ }
+ else {
+ *outlen = out - outstart;
+ *inlenb = processed - inb;
+ return(-2);
+ }
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (out >= outend)
+ break;
+ if (c < 0x80) { *out++= c; bits= -6; }
+ else if (c < 0x800) { *out++= ((c >> 6) & 0x1F) | 0xC0; bits= 0; }
+ else if (c < 0x10000) { *out++= ((c >> 12) & 0x0F) | 0xE0; bits= 6; }
+ else { *out++= ((c >> 18) & 0x07) | 0xF0; bits= 12; }
+
+ for ( ; bits >= 0; bits-= 6) {
+ if (out >= outend)
+ break;
+ *out++= ((c >> bits) & 0x3F) | 0x80;
+ }
+ processed = (const unsigned char*) in;
+ }
+ *outlen = out - outstart;
+ *inlenb = processed - inb;
+ return(*outlen);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * UTF8ToUTF16BE:
+ * @outb: a pointer to an array of bytes to store the result
+ * @outlen: the length of @outb
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an UTF-16BE
+ * block of chars out.
+ *
+ * Returns the number of byte written, or -1 by lack of space, or -2
+ * if the transcoding failed.
+ */
+static int
+UTF8ToUTF16BE(unsigned char* outb, int *outlen,
+ const unsigned char* in, int *inlen)
+{
+ unsigned short* out = (unsigned short*) outb;
+ const unsigned char* processed = in;
+ const unsigned char *const instart = in;
+ unsigned short* outstart= out;
+ unsigned short* outend;
+ const unsigned char* inend;
+ unsigned int c, d;
+ int trailing;
+ unsigned char *tmp;
+ unsigned short tmp1, tmp2;
+
+ /* UTF-16BE has no BOM */
+ if ((outb == NULL) || (outlen == NULL) || (inlen == NULL)) return(-1);
+ if (in == NULL) {
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend= in + *inlen;
+ outend = out + (*outlen / 2);
+ while (in < inend) {
+ d= *in++;
+ if (d < 0x80) { c= d; trailing= 0; }
+ else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) { c= d & 0x1F; trailing= 1; }
+ else if (d < 0xF0) { c= d & 0x0F; trailing= 2; }
+ else if (d < 0xF8) { c= d & 0x07; trailing= 3; }
+ else {
+ /* no chance for this in UTF-16 */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+
+ if (inend - in < trailing) {
+ break;
+ }
+
+ for ( ; trailing; trailing--) {
+ if ((in >= inend) || (((d= *in++) & 0xC0) != 0x80)) break;
+ c <<= 6;
+ c |= d & 0x3F;
+ }
+
+ /* assertion: c is a single UTF-4 value */
+ if (c < 0x10000) {
+ if (out >= outend) break;
+ if (xmlLittleEndian) {
+ tmp = (unsigned char *) out;
+ *tmp = c >> 8;
+ *(tmp + 1) = c;
+ out++;
+ } else {
+ *out++ = c;
+ }
+ }
+ else if (c < 0x110000) {
+ if (out+1 >= outend) break;
+ c -= 0x10000;
+ if (xmlLittleEndian) {
+ tmp1 = 0xD800 | (c >> 10);
+ tmp = (unsigned char *) out;
+ *tmp = tmp1 >> 8;
+ *(tmp + 1) = (unsigned char) tmp1;
+ out++;
+
+ tmp2 = 0xDC00 | (c & 0x03FF);
+ tmp = (unsigned char *) out;
+ *tmp = tmp2 >> 8;
+ *(tmp + 1) = (unsigned char) tmp2;
+ out++;
+ } else {
+ *out++ = 0xD800 | (c >> 10);
+ *out++ = 0xDC00 | (c & 0x03FF);
+ }
+ }
+ else
+ break;
+ processed = in;
+ }
+ *outlen = (out - outstart) * 2;
+ *inlen = processed - instart;
+ return(*outlen);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Generic encoding handling routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlDetectCharEncoding:
+ * @in: a pointer to the first bytes of the XML entity, must be at least
+ * 2 bytes long (at least 4 if encoding is UTF4 variant).
+ * @len: pointer to the length of the buffer
+ *
+ * Guess the encoding of the entity using the first bytes of the entity content
+ * according to the non-normative appendix F of the XML-1.0 recommendation.
+ *
+ * Returns one of the XML_CHAR_ENCODING_... values.
+ */
+xmlCharEncoding
+xmlDetectCharEncoding(const unsigned char* in, int len)
+{
+ if (in == NULL)
+ return(XML_CHAR_ENCODING_NONE);
+ if (len >= 4) {
+ if ((in[0] == 0x00) && (in[1] == 0x00) &&
+ (in[2] == 0x00) && (in[3] == 0x3C))
+ return(XML_CHAR_ENCODING_UCS4BE);
+ if ((in[0] == 0x3C) && (in[1] == 0x00) &&
+ (in[2] == 0x00) && (in[3] == 0x00))
+ return(XML_CHAR_ENCODING_UCS4LE);
+ if ((in[0] == 0x00) && (in[1] == 0x00) &&
+ (in[2] == 0x3C) && (in[3] == 0x00))
+ return(XML_CHAR_ENCODING_UCS4_2143);
+ if ((in[0] == 0x00) && (in[1] == 0x3C) &&
+ (in[2] == 0x00) && (in[3] == 0x00))
+ return(XML_CHAR_ENCODING_UCS4_3412);
+ if ((in[0] == 0x4C) && (in[1] == 0x6F) &&
+ (in[2] == 0xA7) && (in[3] == 0x94))
+ return(XML_CHAR_ENCODING_EBCDIC);
+ if ((in[0] == 0x3C) && (in[1] == 0x3F) &&
+ (in[2] == 0x78) && (in[3] == 0x6D))
+ return(XML_CHAR_ENCODING_UTF8);
+ /*
+ * Although not part of the recommendation, we also
+ * attempt an "auto-recognition" of UTF-16LE and
+ * UTF-16BE encodings.
+ */
+ if ((in[0] == 0x3C) && (in[1] == 0x00) &&
+ (in[2] == 0x3F) && (in[3] == 0x00))
+ return(XML_CHAR_ENCODING_UTF16LE);
+ if ((in[0] == 0x00) && (in[1] == 0x3C) &&
+ (in[2] == 0x00) && (in[3] == 0x3F))
+ return(XML_CHAR_ENCODING_UTF16BE);
+ }
+ if (len >= 3) {
+ /*
+ * Errata on XML-1.0 June 20 2001
+ * We now allow an UTF8 encoded BOM
+ */
+ if ((in[0] == 0xEF) && (in[1] == 0xBB) &&
+ (in[2] == 0xBF))
+ return(XML_CHAR_ENCODING_UTF8);
+ }
+ /* For UTF-16 we can recognize by the BOM */
+ if (len >= 2) {
+ if ((in[0] == 0xFE) && (in[1] == 0xFF))
+ return(XML_CHAR_ENCODING_UTF16BE);
+ if ((in[0] == 0xFF) && (in[1] == 0xFE))
+ return(XML_CHAR_ENCODING_UTF16LE);
+ }
+ return(XML_CHAR_ENCODING_NONE);
+}
+
+/**
+ * xmlCleanupEncodingAliases:
+ *
+ * Unregisters all aliases
+ */
+void
+xmlCleanupEncodingAliases(void) {
+ int i;
+
+ if (xmlCharEncodingAliases == NULL)
+ return;
+
+ for (i = 0;i < xmlCharEncodingAliasesNb;i++) {
+ if (xmlCharEncodingAliases[i].name != NULL)
+ xmlFree((char *) xmlCharEncodingAliases[i].name);
+ if (xmlCharEncodingAliases[i].alias != NULL)
+ xmlFree((char *) xmlCharEncodingAliases[i].alias);
+ }
+ xmlCharEncodingAliasesNb = 0;
+ xmlCharEncodingAliasesMax = 0;
+ xmlFree(xmlCharEncodingAliases);
+ xmlCharEncodingAliases = NULL;
+}
+
+/**
+ * xmlGetEncodingAlias:
+ * @alias: the alias name as parsed, in UTF-8 format (ASCII actually)
+ *
+ * Lookup an encoding name for the given alias.
+ *
+ * Returns NULL if not found, otherwise the original name
+ */
+const char *
+xmlGetEncodingAlias(const char *alias) {
+ int i;
+ char upper[100];
+
+ if (alias == NULL)
+ return(NULL);
+
+ if (xmlCharEncodingAliases == NULL)
+ return(NULL);
+
+ for (i = 0;i < 99;i++) {
+ upper[i] = toupper(alias[i]);
+ if (upper[i] == 0) break;
+ }
+ upper[i] = 0;
+
+ /*
+ * Walk down the list looking for a definition of the alias
+ */
+ for (i = 0;i < xmlCharEncodingAliasesNb;i++) {
+ if (!strcmp(xmlCharEncodingAliases[i].alias, upper)) {
+ return(xmlCharEncodingAliases[i].name);
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * xmlAddEncodingAlias:
+ * @name: the encoding name as parsed, in UTF-8 format (ASCII actually)
+ * @alias: the alias name as parsed, in UTF-8 format (ASCII actually)
+ *
+ * Registers an alias @alias for an encoding named @name. Existing alias
+ * will be overwritten.
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlAddEncodingAlias(const char *name, const char *alias) {
+ int i;
+ char upper[100];
+
+ if ((name == NULL) || (alias == NULL))
+ return(-1);
+
+ for (i = 0;i < 99;i++) {
+ upper[i] = toupper(alias[i]);
+ if (upper[i] == 0) break;
+ }
+ upper[i] = 0;
+
+ if (xmlCharEncodingAliases == NULL) {
+ xmlCharEncodingAliasesNb = 0;
+ xmlCharEncodingAliasesMax = 20;
+ xmlCharEncodingAliases = (xmlCharEncodingAliasPtr)
+ xmlMalloc(xmlCharEncodingAliasesMax * sizeof(xmlCharEncodingAlias));
+ if (xmlCharEncodingAliases == NULL)
+ return(-1);
+ } else if (xmlCharEncodingAliasesNb >= xmlCharEncodingAliasesMax) {
+ xmlCharEncodingAliasesMax *= 2;
+ xmlCharEncodingAliases = (xmlCharEncodingAliasPtr)
+ xmlRealloc(xmlCharEncodingAliases,
+ xmlCharEncodingAliasesMax * sizeof(xmlCharEncodingAlias));
+ }
+ /*
+ * Walk down the list looking for a definition of the alias
+ */
+ for (i = 0;i < xmlCharEncodingAliasesNb;i++) {
+ if (!strcmp(xmlCharEncodingAliases[i].alias, upper)) {
+ /*
+ * Replace the definition.
+ */
+ xmlFree((char *) xmlCharEncodingAliases[i].name);
+ xmlCharEncodingAliases[i].name = xmlMemStrdup(name);
+ return(0);
+ }
+ }
+ /*
+ * Add the definition
+ */
+ xmlCharEncodingAliases[xmlCharEncodingAliasesNb].name = xmlMemStrdup(name);
+ xmlCharEncodingAliases[xmlCharEncodingAliasesNb].alias = xmlMemStrdup(upper);
+ xmlCharEncodingAliasesNb++;
+ return(0);
+}
+
+/**
+ * xmlDelEncodingAlias:
+ * @alias: the alias name as parsed, in UTF-8 format (ASCII actually)
+ *
+ * Unregisters an encoding alias @alias
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlDelEncodingAlias(const char *alias) {
+ int i;
+
+ if (alias == NULL)
+ return(-1);
+
+ if (xmlCharEncodingAliases == NULL)
+ return(-1);
+ /*
+ * Walk down the list looking for a definition of the alias
+ */
+ for (i = 0;i < xmlCharEncodingAliasesNb;i++) {
+ if (!strcmp(xmlCharEncodingAliases[i].alias, alias)) {
+ xmlFree((char *) xmlCharEncodingAliases[i].name);
+ xmlFree((char *) xmlCharEncodingAliases[i].alias);
+ xmlCharEncodingAliasesNb--;
+ memmove(&xmlCharEncodingAliases[i], &xmlCharEncodingAliases[i + 1],
+ sizeof(xmlCharEncodingAlias) * (xmlCharEncodingAliasesNb - i));
+ return(0);
+ }
+ }
+ return(-1);
+}
+
+/**
+ * xmlParseCharEncoding:
+ * @name: the encoding name as parsed, in UTF-8 format (ASCII actually)
+ *
+ * Compare the string to the encoding schemes already known. Note
+ * that the comparison is case insensitive accordingly to the section
+ * [XML] 4.3.3 Character Encoding in Entities.
+ *
+ * Returns one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
+ * if not recognized.
+ */
+xmlCharEncoding
+xmlParseCharEncoding(const char* name)
+{
+ const char *alias;
+ char upper[500];
+ int i;
+
+ if (name == NULL)
+ return(XML_CHAR_ENCODING_NONE);
+
+ /*
+ * Do the alias resolution
+ */
+ alias = xmlGetEncodingAlias(name);
+ if (alias != NULL)
+ name = alias;
+
+ for (i = 0;i < 499;i++) {
+ upper[i] = toupper(name[i]);
+ if (upper[i] == 0) break;
+ }
+ upper[i] = 0;
+
+ if (!strcmp(upper, "")) return(XML_CHAR_ENCODING_NONE);
+ if (!strcmp(upper, "UTF-8")) return(XML_CHAR_ENCODING_UTF8);
+ if (!strcmp(upper, "UTF8")) return(XML_CHAR_ENCODING_UTF8);
+
+ /*
+ * NOTE: if we were able to parse this, the endianness of UTF16 is
+ * already found and in use
+ */
+ if (!strcmp(upper, "UTF-16")) return(XML_CHAR_ENCODING_UTF16LE);
+ if (!strcmp(upper, "UTF16")) return(XML_CHAR_ENCODING_UTF16LE);
+
+ if (!strcmp(upper, "ISO-10646-UCS-2")) return(XML_CHAR_ENCODING_UCS2);
+ if (!strcmp(upper, "UCS-2")) return(XML_CHAR_ENCODING_UCS2);
+ if (!strcmp(upper, "UCS2")) return(XML_CHAR_ENCODING_UCS2);
+
+ /*
+ * NOTE: if we were able to parse this, the endianness of UCS4 is
+ * already found and in use
+ */
+ if (!strcmp(upper, "ISO-10646-UCS-4")) return(XML_CHAR_ENCODING_UCS4LE);
+ if (!strcmp(upper, "UCS-4")) return(XML_CHAR_ENCODING_UCS4LE);
+ if (!strcmp(upper, "UCS4")) return(XML_CHAR_ENCODING_UCS4LE);
+
+
+ if (!strcmp(upper, "ISO-8859-1")) return(XML_CHAR_ENCODING_8859_1);
+ if (!strcmp(upper, "ISO-LATIN-1")) return(XML_CHAR_ENCODING_8859_1);
+ if (!strcmp(upper, "ISO LATIN 1")) return(XML_CHAR_ENCODING_8859_1);
+
+ if (!strcmp(upper, "ISO-8859-2")) return(XML_CHAR_ENCODING_8859_2);
+ if (!strcmp(upper, "ISO-LATIN-2")) return(XML_CHAR_ENCODING_8859_2);
+ if (!strcmp(upper, "ISO LATIN 2")) return(XML_CHAR_ENCODING_8859_2);
+
+ if (!strcmp(upper, "ISO-8859-3")) return(XML_CHAR_ENCODING_8859_3);
+ if (!strcmp(upper, "ISO-8859-4")) return(XML_CHAR_ENCODING_8859_4);
+ if (!strcmp(upper, "ISO-8859-5")) return(XML_CHAR_ENCODING_8859_5);
+ if (!strcmp(upper, "ISO-8859-6")) return(XML_CHAR_ENCODING_8859_6);
+ if (!strcmp(upper, "ISO-8859-7")) return(XML_CHAR_ENCODING_8859_7);
+ if (!strcmp(upper, "ISO-8859-8")) return(XML_CHAR_ENCODING_8859_8);
+ if (!strcmp(upper, "ISO-8859-9")) return(XML_CHAR_ENCODING_8859_9);
+
+ if (!strcmp(upper, "ISO-2022-JP")) return(XML_CHAR_ENCODING_2022_JP);
+ if (!strcmp(upper, "SHIFT_JIS")) return(XML_CHAR_ENCODING_SHIFT_JIS);
+ if (!strcmp(upper, "EUC-JP")) return(XML_CHAR_ENCODING_EUC_JP);
+
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext, "Unknown encoding %s\n", name);
+#endif
+ return(XML_CHAR_ENCODING_ERROR);
+}
+
+/**
+ * xmlGetCharEncodingName:
+ * @enc: the encoding
+ *
+ * The "canonical" name for XML encoding.
+ * C.f. http://www.w3.org/TR/REC-xml#charencoding
+ * Section 4.3.3 Character Encoding in Entities
+ *
+ * Returns the canonical name for the given encoding
+ */
+
+const char*
+xmlGetCharEncodingName(xmlCharEncoding enc) {
+ switch (enc) {
+ case XML_CHAR_ENCODING_ERROR:
+ return(NULL);
+ case XML_CHAR_ENCODING_NONE:
+ return(NULL);
+ case XML_CHAR_ENCODING_UTF8:
+ return("UTF-8");
+ case XML_CHAR_ENCODING_UTF16LE:
+ return("UTF-16");
+ case XML_CHAR_ENCODING_UTF16BE:
+ return("UTF-16");
+ case XML_CHAR_ENCODING_EBCDIC:
+ return("EBCDIC");
+ case XML_CHAR_ENCODING_UCS4LE:
+ return("ISO-10646-UCS-4");
+ case XML_CHAR_ENCODING_UCS4BE:
+ return("ISO-10646-UCS-4");
+ case XML_CHAR_ENCODING_UCS4_2143:
+ return("ISO-10646-UCS-4");
+ case XML_CHAR_ENCODING_UCS4_3412:
+ return("ISO-10646-UCS-4");
+ case XML_CHAR_ENCODING_UCS2:
+ return("ISO-10646-UCS-2");
+ case XML_CHAR_ENCODING_8859_1:
+ return("ISO-8859-1");
+ case XML_CHAR_ENCODING_8859_2:
+ return("ISO-8859-2");
+ case XML_CHAR_ENCODING_8859_3:
+ return("ISO-8859-3");
+ case XML_CHAR_ENCODING_8859_4:
+ return("ISO-8859-4");
+ case XML_CHAR_ENCODING_8859_5:
+ return("ISO-8859-5");
+ case XML_CHAR_ENCODING_8859_6:
+ return("ISO-8859-6");
+ case XML_CHAR_ENCODING_8859_7:
+ return("ISO-8859-7");
+ case XML_CHAR_ENCODING_8859_8:
+ return("ISO-8859-8");
+ case XML_CHAR_ENCODING_8859_9:
+ return("ISO-8859-9");
+ case XML_CHAR_ENCODING_2022_JP:
+ return("ISO-2022-JP");
+ case XML_CHAR_ENCODING_SHIFT_JIS:
+ return("Shift-JIS");
+ case XML_CHAR_ENCODING_EUC_JP:
+ return("EUC-JP");
+ case XML_CHAR_ENCODING_ASCII:
+ return(NULL);
+ }
+ return(NULL);
+}
+
+/************************************************************************
+ * *
+ * Char encoding handlers *
+ * *
+ ************************************************************************/
+
+
+/* the size should be growable, but it's not a big deal ... */
+#define MAX_ENCODING_HANDLERS 50
+static xmlCharEncodingHandlerPtr *handlers = NULL;
+static int nbCharEncodingHandler = 0;
+
+/*
+ * The default is UTF-8 for XML, that's also the default used for the
+ * parser internals, so the default encoding handler is NULL
+ */
+
+static xmlCharEncodingHandlerPtr xmlDefaultCharEncodingHandler = NULL;
+
+/**
+ * xmlNewCharEncodingHandler:
+ * @name: the encoding name, in UTF-8 format (ASCII actually)
+ * @input: the xmlCharEncodingInputFunc to read that encoding
+ * @output: the xmlCharEncodingOutputFunc to write that encoding
+ *
+ * Create and registers an xmlCharEncodingHandler.
+ *
+ * Returns the xmlCharEncodingHandlerPtr created (or NULL in case of error).
+ */
+xmlCharEncodingHandlerPtr
+xmlNewCharEncodingHandler(const char *name,
+ xmlCharEncodingInputFunc input,
+ xmlCharEncodingOutputFunc output) {
+ xmlCharEncodingHandlerPtr handler;
+ const char *alias;
+ char upper[500];
+ int i;
+ char *up = NULL;
+
+ /*
+ * Do the alias resolution
+ */
+ alias = xmlGetEncodingAlias(name);
+ if (alias != NULL)
+ name = alias;
+
+ /*
+ * Keep only the uppercase version of the encoding.
+ */
+ if (name == NULL) {
+ xmlEncodingErr(XML_I18N_NO_NAME,
+ "xmlNewCharEncodingHandler : no name !\n", NULL);
+ return(NULL);
+ }
+ for (i = 0;i < 499;i++) {
+ upper[i] = toupper(name[i]);
+ if (upper[i] == 0) break;
+ }
+ upper[i] = 0;
+ up = xmlMemStrdup(upper);
+ if (up == NULL) {
+ xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
+ return(NULL);
+ }
+
+ /*
+ * allocate and fill-up an handler block.
+ */
+ handler = (xmlCharEncodingHandlerPtr)
+ xmlMalloc(sizeof(xmlCharEncodingHandler));
+ if (handler == NULL) {
+ xmlFree(up);
+ xmlEncodingErrMemory("xmlNewCharEncodingHandler : out of memory !\n");
+ return(NULL);
+ }
+ memset(handler, 0, sizeof(xmlCharEncodingHandler));
+ handler->input = input;
+ handler->output = output;
+ handler->name = up;
+
+#ifdef LIBXML_ICONV_ENABLED
+ handler->iconv_in = NULL;
+ handler->iconv_out = NULL;
+#endif
+#ifdef LIBXML_ICU_ENABLED
+ handler->uconv_in = NULL;
+ handler->uconv_out = NULL;
+#endif
+
+ /*
+ * registers and returns the handler.
+ */
+ xmlRegisterCharEncodingHandler(handler);
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "Registered encoding handler for %s\n", name);
+#endif
+ return(handler);
+}
+
+/**
+ * xmlInitCharEncodingHandlers:
+ *
+ * Initialize the char encoding support, it registers the default
+ * encoding supported.
+ * NOTE: while public, this function usually doesn't need to be called
+ * in normal processing.
+ */
+void
+xmlInitCharEncodingHandlers(void) {
+ unsigned short int tst = 0x1234;
+ unsigned char *ptr = (unsigned char *) &tst;
+
+ if (handlers != NULL) return;
+
+ handlers = (xmlCharEncodingHandlerPtr *)
+ xmlMalloc(MAX_ENCODING_HANDLERS * sizeof(xmlCharEncodingHandlerPtr));
+
+ if (*ptr == 0x12) xmlLittleEndian = 0;
+ else if (*ptr == 0x34) xmlLittleEndian = 1;
+ else {
+ xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
+ "Odd problem at endianness detection\n", NULL);
+ }
+
+ if (handlers == NULL) {
+ xmlEncodingErrMemory("xmlInitCharEncodingHandlers : out of memory !\n");
+ return;
+ }
+ xmlNewCharEncodingHandler("UTF-8", UTF8ToUTF8, UTF8ToUTF8);
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlUTF16LEHandler =
+ xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, UTF8ToUTF16LE);
+ xmlUTF16BEHandler =
+ xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, UTF8ToUTF16BE);
+ xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, UTF8ToUTF16);
+ xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1);
+ xmlNewCharEncodingHandler("ASCII", asciiToUTF8, UTF8Toascii);
+ xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, UTF8Toascii);
+#ifdef LIBXML_HTML_ENABLED
+ xmlNewCharEncodingHandler("HTML", NULL, UTF8ToHtml);
+#endif
+#else
+ xmlUTF16LEHandler =
+ xmlNewCharEncodingHandler("UTF-16LE", UTF16LEToUTF8, NULL);
+ xmlUTF16BEHandler =
+ xmlNewCharEncodingHandler("UTF-16BE", UTF16BEToUTF8, NULL);
+ xmlNewCharEncodingHandler("UTF-16", UTF16LEToUTF8, NULL);
+ xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, NULL);
+ xmlNewCharEncodingHandler("ASCII", asciiToUTF8, NULL);
+ xmlNewCharEncodingHandler("US-ASCII", asciiToUTF8, NULL);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED)
+#ifdef LIBXML_ISO8859X_ENABLED
+ xmlRegisterCharEncodingHandlersISO8859x ();
+#endif
+#endif
+
+}
+
+/**
+ * xmlCleanupCharEncodingHandlers:
+ *
+ * Cleanup the memory allocated for the char encoding support, it
+ * unregisters all the encoding handlers and the aliases.
+ */
+void
+xmlCleanupCharEncodingHandlers(void) {
+ xmlCleanupEncodingAliases();
+
+ if (handlers == NULL) return;
+
+ for (;nbCharEncodingHandler > 0;) {
+ nbCharEncodingHandler--;
+ if (handlers[nbCharEncodingHandler] != NULL) {
+ if (handlers[nbCharEncodingHandler]->name != NULL)
+ xmlFree(handlers[nbCharEncodingHandler]->name);
+ xmlFree(handlers[nbCharEncodingHandler]);
+ }
+ }
+ xmlFree(handlers);
+ handlers = NULL;
+ nbCharEncodingHandler = 0;
+ xmlDefaultCharEncodingHandler = NULL;
+}
+
+/**
+ * xmlRegisterCharEncodingHandler:
+ * @handler: the xmlCharEncodingHandlerPtr handler block
+ *
+ * Register the char encoding handler, surprising, isn't it ?
+ */
+void
+xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
+ if (handlers == NULL) xmlInitCharEncodingHandlers();
+ if ((handler == NULL) || (handlers == NULL)) {
+ xmlEncodingErr(XML_I18N_NO_HANDLER,
+ "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
+ return;
+ }
+
+ if (nbCharEncodingHandler >= MAX_ENCODING_HANDLERS) {
+ xmlEncodingErr(XML_I18N_EXCESS_HANDLER,
+ "xmlRegisterCharEncodingHandler: Too many handler registered, see %s\n",
+ "MAX_ENCODING_HANDLERS");
+ return;
+ }
+ handlers[nbCharEncodingHandler++] = handler;
+}
+
+/**
+ * xmlGetCharEncodingHandler:
+ * @enc: an xmlCharEncoding value.
+ *
+ * Search in the registered set the handler able to read/write that encoding.
+ *
+ * Returns the handler or NULL if not found
+ */
+xmlCharEncodingHandlerPtr
+xmlGetCharEncodingHandler(xmlCharEncoding enc) {
+ xmlCharEncodingHandlerPtr handler;
+
+ if (handlers == NULL) xmlInitCharEncodingHandlers();
+ switch (enc) {
+ case XML_CHAR_ENCODING_ERROR:
+ return(NULL);
+ case XML_CHAR_ENCODING_NONE:
+ return(NULL);
+ case XML_CHAR_ENCODING_UTF8:
+ return(NULL);
+ case XML_CHAR_ENCODING_UTF16LE:
+ return(xmlUTF16LEHandler);
+ case XML_CHAR_ENCODING_UTF16BE:
+ return(xmlUTF16BEHandler);
+ case XML_CHAR_ENCODING_EBCDIC:
+ handler = xmlFindCharEncodingHandler("EBCDIC");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("ebcdic");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("EBCDIC-US");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("IBM-037");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_UCS4BE:
+ handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS-4");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS4");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_UCS4LE:
+ handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS-4");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS4");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_UCS4_2143:
+ break;
+ case XML_CHAR_ENCODING_UCS4_3412:
+ break;
+ case XML_CHAR_ENCODING_UCS2:
+ handler = xmlFindCharEncodingHandler("ISO-10646-UCS-2");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS-2");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("UCS2");
+ if (handler != NULL) return(handler);
+ break;
+
+ /*
+ * We used to keep ISO Latin encodings native in the
+ * generated data. This led to so many problems that
+ * this has been removed. One can still change this
+ * back by registering no-ops encoders for those
+ */
+ case XML_CHAR_ENCODING_8859_1:
+ handler = xmlFindCharEncodingHandler("ISO-8859-1");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_2:
+ handler = xmlFindCharEncodingHandler("ISO-8859-2");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_3:
+ handler = xmlFindCharEncodingHandler("ISO-8859-3");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_4:
+ handler = xmlFindCharEncodingHandler("ISO-8859-4");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_5:
+ handler = xmlFindCharEncodingHandler("ISO-8859-5");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_6:
+ handler = xmlFindCharEncodingHandler("ISO-8859-6");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_7:
+ handler = xmlFindCharEncodingHandler("ISO-8859-7");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_8:
+ handler = xmlFindCharEncodingHandler("ISO-8859-8");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_8859_9:
+ handler = xmlFindCharEncodingHandler("ISO-8859-9");
+ if (handler != NULL) return(handler);
+ break;
+
+
+ case XML_CHAR_ENCODING_2022_JP:
+ handler = xmlFindCharEncodingHandler("ISO-2022-JP");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_SHIFT_JIS:
+ handler = xmlFindCharEncodingHandler("SHIFT-JIS");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("SHIFT_JIS");
+ if (handler != NULL) return(handler);
+ handler = xmlFindCharEncodingHandler("Shift_JIS");
+ if (handler != NULL) return(handler);
+ break;
+ case XML_CHAR_ENCODING_EUC_JP:
+ handler = xmlFindCharEncodingHandler("EUC-JP");
+ if (handler != NULL) return(handler);
+ break;
+ default:
+ break;
+ }
+
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "No handler found for encoding %d\n", enc);
+#endif
+ return(NULL);
+}
+
+/**
+ * xmlFindCharEncodingHandler:
+ * @name: a string describing the char encoding.
+ *
+ * Search in the registered set the handler able to read/write that encoding.
+ *
+ * Returns the handler or NULL if not found
+ */
+xmlCharEncodingHandlerPtr
+xmlFindCharEncodingHandler(const char *name) {
+ const char *nalias;
+ const char *norig;
+ xmlCharEncoding alias;
+#ifdef LIBXML_ICONV_ENABLED
+ xmlCharEncodingHandlerPtr enc;
+ iconv_t icv_in, icv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ xmlCharEncodingHandlerPtr encu;
+ uconv_t *ucv_in, *ucv_out;
+#endif /* LIBXML_ICU_ENABLED */
+ char upper[100];
+ int i;
+
+ if (handlers == NULL) xmlInitCharEncodingHandlers();
+ if (name == NULL) return(xmlDefaultCharEncodingHandler);
+ if (name[0] == 0) return(xmlDefaultCharEncodingHandler);
+
+ /*
+ * Do the alias resolution
+ */
+ norig = name;
+ nalias = xmlGetEncodingAlias(name);
+ if (nalias != NULL)
+ name = nalias;
+
+ /*
+ * Check first for directly registered encoding names
+ */
+ for (i = 0;i < 99;i++) {
+ upper[i] = toupper(name[i]);
+ if (upper[i] == 0) break;
+ }
+ upper[i] = 0;
+
+ if (handlers != NULL) {
+ for (i = 0;i < nbCharEncodingHandler; i++) {
+ if (!strcmp(upper, handlers[i]->name)) {
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "Found registered handler for encoding %s\n", name);
+#endif
+ return(handlers[i]);
+ }
+ }
+ }
+
+#ifdef LIBXML_ICONV_ENABLED
+ /* check whether iconv can handle this */
+ icv_in = iconv_open("UTF-8", name);
+ icv_out = iconv_open(name, "UTF-8");
+ if (icv_in == (iconv_t) -1) {
+ icv_in = iconv_open("UTF-8", upper);
+ }
+ if (icv_out == (iconv_t) -1) {
+ icv_out = iconv_open(upper, "UTF-8");
+ }
+ if ((icv_in != (iconv_t) -1) && (icv_out != (iconv_t) -1)) {
+ enc = (xmlCharEncodingHandlerPtr)
+ xmlMalloc(sizeof(xmlCharEncodingHandler));
+ if (enc == NULL) {
+ iconv_close(icv_in);
+ iconv_close(icv_out);
+ return(NULL);
+ }
+ memset(enc, 0, sizeof(xmlCharEncodingHandler));
+ enc->name = xmlMemStrdup(name);
+ enc->input = NULL;
+ enc->output = NULL;
+ enc->iconv_in = icv_in;
+ enc->iconv_out = icv_out;
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "Found iconv handler for encoding %s\n", name);
+#endif
+ return enc;
+ } else if ((icv_in != (iconv_t) -1) || icv_out != (iconv_t) -1) {
+ xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
+ "iconv : problems with filters for '%s'\n", name);
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ /* check whether icu can handle this */
+ ucv_in = openIcuConverter(name, 1);
+ ucv_out = openIcuConverter(name, 0);
+ if (ucv_in != NULL && ucv_out != NULL) {
+ encu = (xmlCharEncodingHandlerPtr)
+ xmlMalloc(sizeof(xmlCharEncodingHandler));
+ if (encu == NULL) {
+ closeIcuConverter(ucv_in);
+ closeIcuConverter(ucv_out);
+ return(NULL);
+ }
+ memset(encu, 0, sizeof(xmlCharEncodingHandler));
+ encu->name = xmlMemStrdup(name);
+ encu->input = NULL;
+ encu->output = NULL;
+ encu->uconv_in = ucv_in;
+ encu->uconv_out = ucv_out;
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "Found ICU converter handler for encoding %s\n", name);
+#endif
+ return encu;
+ } else if (ucv_in != NULL || ucv_out != NULL) {
+ closeIcuConverter(ucv_in);
+ closeIcuConverter(ucv_out);
+ xmlEncodingErr(XML_ERR_INTERNAL_ERROR,
+ "ICU converter : problems with filters for '%s'\n", name);
+ }
+#endif /* LIBXML_ICU_ENABLED */
+
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "No handler found for encoding %s\n", name);
+#endif
+
+ /*
+ * Fallback using the canonical names
+ */
+ alias = xmlParseCharEncoding(norig);
+ if (alias != XML_CHAR_ENCODING_ERROR) {
+ const char* canon;
+ canon = xmlGetCharEncodingName(alias);
+ if ((canon != NULL) && (strcmp(name, canon))) {
+ return(xmlFindCharEncodingHandler(canon));
+ }
+ }
+
+ /* If "none of the above", give up */
+ return(NULL);
+}
+
+/************************************************************************
+ * *
+ * ICONV based generic conversion functions *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_ICONV_ENABLED
+/**
+ * xmlIconvWrapper:
+ * @cd: iconv converter data structure
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of ISO Latin 1 chars
+ * @inlen: the length of @in
+ *
+ * Returns 0 if success, or
+ * -1 by lack of space, or
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ * -3 if there the last byte can't form a single output char.
+ *
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of ocetes consumed.
+ */
+static int
+xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen) {
+ size_t icv_inlen, icv_outlen;
+ const char *icv_in = (const char *) in;
+ char *icv_out = (char *) out;
+ int ret;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) {
+ if (outlen != NULL) *outlen = 0;
+ return(-1);
+ }
+ icv_inlen = *inlen;
+ icv_outlen = *outlen;
+ ret = iconv(cd, (ICONV_CONST char **) &icv_in, &icv_inlen, &icv_out, &icv_outlen);
+ *inlen -= icv_inlen;
+ *outlen -= icv_outlen;
+ if ((icv_inlen != 0) || (ret == -1)) {
+#ifdef EILSEQ
+ if (errno == EILSEQ) {
+ return -2;
+ } else
+#endif
+#ifdef E2BIG
+ if (errno == E2BIG) {
+ return -1;
+ } else
+#endif
+#ifdef EINVAL
+ if (errno == EINVAL) {
+ return -3;
+ } else
+#endif
+ {
+ return -3;
+ }
+ }
+ return 0;
+}
+#endif /* LIBXML_ICONV_ENABLED */
+
+/************************************************************************
+ * *
+ * ICU based generic conversion functions *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_ICU_ENABLED
+/**
+ * xmlUconvWrapper:
+ * @cd: ICU uconverter data structure
+ * @toUnicode : non-zero if toUnicode. 0 otherwise.
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of ISO Latin 1 chars
+ * @inlen: the length of @in
+ *
+ * Returns 0 if success, or
+ * -1 by lack of space, or
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ * -3 if there the last byte can't form a single output char.
+ *
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of ocetes consumed.
+ */
+static int
+xmlUconvWrapper(uconv_t *cd, int toUnicode, unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen) {
+ const char *ucv_in = (const char *) in;
+ char *ucv_out = (char *) out;
+ UErrorCode err = U_ZERO_ERROR;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) || (in == NULL)) {
+ if (outlen != NULL) *outlen = 0;
+ return(-1);
+ }
+
+ /*
+ * TODO(jungshik)
+ * 1. is ucnv_convert(To|From)Algorithmic better?
+ * 2. had we better use an explicit pivot buffer?
+ * 3. error returned comes from 'fromUnicode' only even
+ * when toUnicode is true !
+ */
+ if (toUnicode) {
+ /* encoding => UTF-16 => UTF-8 */
+ ucnv_convertEx(cd->utf8, cd->uconv, &ucv_out, ucv_out + *outlen,
+ &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL,
+ 0, TRUE, &err);
+ } else {
+ /* UTF-8 => UTF-16 => encoding */
+ ucnv_convertEx(cd->uconv, cd->utf8, &ucv_out, ucv_out + *outlen,
+ &ucv_in, ucv_in + *inlen, NULL, NULL, NULL, NULL,
+ 0, TRUE, &err);
+ }
+ *inlen = ucv_in - (const char*) in;
+ *outlen = ucv_out - (char *) out;
+ if (U_SUCCESS(err))
+ return 0;
+ if (err == U_BUFFER_OVERFLOW_ERROR)
+ return -1;
+ if (err == U_INVALID_CHAR_FOUND || err == U_ILLEGAL_CHAR_FOUND)
+ return -2;
+ /* if (err == U_TRUNCATED_CHAR_FOUND) */
+ return -3;
+}
+#endif /* LIBXML_ICU_ENABLED */
+
+/************************************************************************
+ * *
+ * The real API used by libxml for on-the-fly conversion *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCharEncFirstLineInt:
+ * @handler: char enconding transformation data structure
+ * @out: an xmlBuffer for the output.
+ * @in: an xmlBuffer for the input
+ * @len: number of bytes to convert for the first line, or -1
+ *
+ * Front-end for the encoding handler input function, but handle only
+ * the very first line, i.e. limit itself to 45 chars.
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
+ xmlBufferPtr in, int len) {
+ int ret = -2;
+ int written;
+ int toconv;
+
+ if (handler == NULL) return(-1);
+ if (out == NULL) return(-1);
+ if (in == NULL) return(-1);
+
+ /* calculate space available */
+ written = out->size - out->use - 1; /* count '\0' */
+ toconv = in->use;
+ /*
+ * echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
+ * 45 chars should be sufficient to reach the end of the encoding
+ * declaration without going too far inside the document content.
+ * on UTF-16 this means 90bytes, on UCS4 this means 180
+ * The actual value depending on guessed encoding is passed as @len
+ * if provided
+ */
+ if (len >= 0) {
+ if (toconv > len)
+ toconv = len;
+ } else {
+ if (toconv > 180)
+ toconv = 180;
+ }
+ if (toconv * 2 >= written) {
+ xmlBufferGrow(out, toconv * 2);
+ written = out->size - out->use - 1;
+ }
+
+ if (handler->input != NULL) {
+ ret = handler->input(&out->content[out->use], &written,
+ in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (handler->iconv_in != NULL) {
+ ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ if (ret == -1) ret = -3;
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (handler->uconv_in != NULL) {
+ ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ if (ret == -1) ret = -3;
+ }
+#endif /* LIBXML_ICU_ENABLED */
+#ifdef DEBUG_ENCODING
+ switch (ret) {
+ case 0:
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input\n",
+ toconv, written);
+ break;
+ case -1:
+ xmlGenericError(xmlGenericErrorContext,"converted %d bytes to %d bytes of input, %d left\n",
+ toconv, written, in->use);
+ break;
+ case -2:
+ xmlGenericError(xmlGenericErrorContext,
+ "input conversion failed due to input error\n");
+ break;
+ case -3:
+ xmlGenericError(xmlGenericErrorContext,"converted %d bytes to %d bytes of input, %d left\n",
+ toconv, written, in->use);
+ break;
+ default:
+ xmlGenericError(xmlGenericErrorContext,"Unknown input conversion failed %d\n", ret);
+ }
+#endif /* DEBUG_ENCODING */
+ /*
+ * Ignore when input buffer is not on a boundary
+ */
+ if (ret == -3) ret = 0;
+ if (ret == -1) ret = 0;
+ return(ret);
+}
+
+/**
+ * xmlCharEncFirstLine:
+ * @handler: char enconding transformation data structure
+ * @out: an xmlBuffer for the output.
+ * @in: an xmlBuffer for the input
+ *
+ * Front-end for the encoding handler input function, but handle only
+ * the very first line, i.e. limit itself to 45 chars.
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
+ xmlBufferPtr in) {
+ return(xmlCharEncFirstLineInt(handler, out, in, -1));
+}
+
+/**
+ * xmlCharEncFirstLineInput:
+ * @input: a parser input buffer
+ * @len: number of bytes to convert for the first line, or -1
+ *
+ * Front-end for the encoding handler input function, but handle only
+ * the very first line. Point is that this is based on autodetection
+ * of the encoding and once that first line is converted we may find
+ * out that a different decoder is needed to process the input.
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len)
+{
+ int ret = -2;
+ size_t written;
+ size_t toconv;
+ int c_in;
+ int c_out;
+ xmlBufPtr in;
+ xmlBufPtr out;
+
+ if ((input == NULL) || (input->encoder == NULL) ||
+ (input->buffer == NULL) || (input->raw == NULL))
+ return (-1);
+ out = input->buffer;
+ in = input->raw;
+
+ toconv = xmlBufUse(in);
+ if (toconv == 0)
+ return (0);
+ written = xmlBufAvail(out) - 1; /* count '\0' */
+ /*
+ * echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38
+ * 45 chars should be sufficient to reach the end of the encoding
+ * declaration without going too far inside the document content.
+ * on UTF-16 this means 90bytes, on UCS4 this means 180
+ * The actual value depending on guessed encoding is passed as @len
+ * if provided
+ */
+ if (len >= 0) {
+ if (toconv > (unsigned int) len)
+ toconv = len;
+ } else {
+ if (toconv > 180)
+ toconv = 180;
+ }
+ if (toconv * 2 >= written) {
+ xmlBufGrow(out, toconv * 2);
+ written = xmlBufAvail(out) - 1;
+ }
+ if (written > 360)
+ written = 360;
+
+ c_in = toconv;
+ c_out = written;
+ if (input->encoder->input != NULL) {
+ ret = input->encoder->input(xmlBufEnd(out), &c_out,
+ xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (input->encoder->iconv_in != NULL) {
+ ret = xmlIconvWrapper(input->encoder->iconv_in, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (input->encoder->uconv_in != NULL) {
+ ret = xmlUconvWrapper(input->encoder->uconv_in, 1, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICU_ENABLED */
+ switch (ret) {
+ case 0:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input\n",
+ c_in, c_out);
+#endif
+ break;
+ case -1:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ c_in, c_out, (int)xmlBufUse(in));
+#endif
+ break;
+ case -3:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ c_in, c_out, (int)xmlBufUse(in));
+#endif
+ break;
+ case -2: {
+ char buf[50];
+ const xmlChar *content = xmlBufContent(in);
+
+ snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
+ content[0], content[1],
+ content[2], content[3]);
+ buf[49] = 0;
+ xmlEncodingErr(XML_I18N_CONV_FAILED,
+ "input conversion failed due to input error, bytes %s\n",
+ buf);
+ }
+ }
+ /*
+ * Ignore when input buffer is not on a boundary
+ */
+ if (ret == -3) ret = 0;
+ if (ret == -1) ret = 0;
+ return(ret);
+}
+
+/**
+ * xmlCharEncInput:
+ * @input: a parser input buffer
+ * @flush: try to flush all the raw buffer
+ *
+ * Generic front-end for the encoding handler on parser input
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncInput(xmlParserInputBufferPtr input, int flush)
+{
+ int ret = -2;
+ size_t written;
+ size_t toconv;
+ int c_in;
+ int c_out;
+ xmlBufPtr in;
+ xmlBufPtr out;
+
+ if ((input == NULL) || (input->encoder == NULL) ||
+ (input->buffer == NULL) || (input->raw == NULL))
+ return (-1);
+ out = input->buffer;
+ in = input->raw;
+
+ toconv = xmlBufUse(in);
+ if (toconv == 0)
+ return (0);
+ if ((toconv > 64 * 1024) && (flush == 0))
+ toconv = 64 * 1024;
+ written = xmlBufAvail(out);
+ if (written > 0)
+ written--; /* count '\0' */
+ if (toconv * 2 >= written) {
+ xmlBufGrow(out, toconv * 2);
+ written = xmlBufAvail(out);
+ if (written > 0)
+ written--; /* count '\0' */
+ }
+ if ((written > 128 * 1024) && (flush == 0))
+ written = 128 * 1024;
+
+ c_in = toconv;
+ c_out = written;
+ if (input->encoder->input != NULL) {
+ ret = input->encoder->input(xmlBufEnd(out), &c_out,
+ xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (input->encoder->iconv_in != NULL) {
+ ret = xmlIconvWrapper(input->encoder->iconv_in, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (input->encoder->uconv_in != NULL) {
+ ret = xmlUconvWrapper(input->encoder->uconv_in, 1, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICU_ENABLED */
+ switch (ret) {
+ case 0:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input\n",
+ c_in, c_out);
+#endif
+ break;
+ case -1:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ c_in, c_out, (int)xmlBufUse(in));
+#endif
+ break;
+ case -3:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ c_in, c_out, (int)xmlBufUse(in));
+#endif
+ break;
+ case -2: {
+ char buf[50];
+ const xmlChar *content = xmlBufContent(in);
+
+ snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
+ content[0], content[1],
+ content[2], content[3]);
+ buf[49] = 0;
+ xmlEncodingErr(XML_I18N_CONV_FAILED,
+ "input conversion failed due to input error, bytes %s\n",
+ buf);
+ }
+ }
+ /*
+ * Ignore when input buffer is not on a boundary
+ */
+ if (ret == -3)
+ ret = 0;
+ return (c_out? c_out : ret);
+}
+
+/**
+ * xmlCharEncInFunc:
+ * @handler: char encoding transformation data structure
+ * @out: an xmlBuffer for the output.
+ * @in: an xmlBuffer for the input
+ *
+ * Generic front-end for the encoding handler input function
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
+ xmlBufferPtr in)
+{
+ int ret = -2;
+ int written;
+ int toconv;
+
+ if (handler == NULL)
+ return (-1);
+ if (out == NULL)
+ return (-1);
+ if (in == NULL)
+ return (-1);
+
+ toconv = in->use;
+ if (toconv == 0)
+ return (0);
+ written = out->size - out->use -1; /* count '\0' */
+ if (toconv * 2 >= written) {
+ xmlBufferGrow(out, out->size + toconv * 2);
+ written = out->size - out->use - 1;
+ }
+ if (handler->input != NULL) {
+ ret = handler->input(&out->content[out->use], &written,
+ in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (handler->iconv_in != NULL) {
+ ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (handler->uconv_in != NULL) {
+ ret = xmlUconvWrapper(handler->uconv_in, 1, &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ if (ret == -1)
+ ret = -3;
+ }
+#endif /* LIBXML_ICU_ENABLED */
+ switch (ret) {
+ case 0:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input\n",
+ toconv, written);
+#endif
+ break;
+ case -1:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ toconv, written, in->use);
+#endif
+ break;
+ case -3:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of input, %d left\n",
+ toconv, written, in->use);
+#endif
+ break;
+ case -2: {
+ char buf[50];
+
+ snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
+ in->content[0], in->content[1],
+ in->content[2], in->content[3]);
+ buf[49] = 0;
+ xmlEncodingErr(XML_I18N_CONV_FAILED,
+ "input conversion failed due to input error, bytes %s\n",
+ buf);
+ }
+ }
+ /*
+ * Ignore when input buffer is not on a boundary
+ */
+ if (ret == -3)
+ ret = 0;
+ return (written? written : ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlCharEncOutput:
+ * @output: a parser output buffer
+ * @init: is this an initialization call without data
+ *
+ * Generic front-end for the encoding handler on parser output
+ * a first call with @init == 1 has to be made first to initiate the
+ * output in case of non-stateless encoding needing to initiate their
+ * state or the output (like the BOM in UTF16).
+ * In case of UTF8 sequence conversion errors for the given encoder,
+ * the content will be automatically remapped to a CharRef sequence.
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncOutput(xmlOutputBufferPtr output, int init)
+{
+ int ret = -2;
+ size_t written;
+ size_t writtentot = 0;
+ size_t toconv;
+ int c_in;
+ int c_out;
+ xmlBufPtr in;
+ xmlBufPtr out;
+ int charref_len = 0;
+
+ if ((output == NULL) || (output->encoder == NULL) ||
+ (output->buffer == NULL) || (output->conv == NULL))
+ return (-1);
+ out = output->conv;
+ in = output->buffer;
+
+retry:
+
+ written = xmlBufAvail(out);
+ if (written > 0)
+ written--; /* count '\0' */
+
+ /*
+ * First specific handling of the initialization call
+ */
+ if (init) {
+ c_in = 0;
+ c_out = written;
+ if (output->encoder->output != NULL) {
+ ret = output->encoder->output(xmlBufEnd(out), &c_out,
+ NULL, &c_in);
+ if (ret > 0) /* Gennady: check return value */
+ xmlBufAddLen(out, c_out);
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (output->encoder->iconv_out != NULL) {
+ ret = xmlIconvWrapper(output->encoder->iconv_out, xmlBufEnd(out),
+ &c_out, NULL, &c_in);
+ xmlBufAddLen(out, c_out);
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (output->encoder->uconv_out != NULL) {
+ ret = xmlUconvWrapper(output->encoder->uconv_out, 0, xmlBufEnd(out),
+ &c_out, NULL, &c_in);
+ xmlBufAddLen(out, c_out);
+ }
+#endif /* LIBXML_ICU_ENABLED */
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "initialized encoder\n");
+#endif
+ return(0);
+ }
+
+ /*
+ * Conversion itself.
+ */
+ toconv = xmlBufUse(in);
+ if (toconv == 0)
+ return (0);
+ if (toconv > 64 * 1024)
+ toconv = 64 * 1024;
+ if (toconv * 4 >= written) {
+ xmlBufGrow(out, toconv * 4);
+ written = xmlBufAvail(out) - 1;
+ }
+ if (written > 256 * 1024)
+ written = 256 * 1024;
+
+ c_in = toconv;
+ c_out = written;
+ if (output->encoder->output != NULL) {
+ ret = output->encoder->output(xmlBufEnd(out), &c_out,
+ xmlBufContent(in), &c_in);
+ if (c_out > 0) {
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ writtentot += c_out;
+ }
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (output->encoder->iconv_out != NULL) {
+ ret = xmlIconvWrapper(output->encoder->iconv_out, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ writtentot += c_out;
+ if (ret == -1) {
+ if (c_out > 0) {
+ /*
+ * Can be a limitation of iconv
+ */
+ charref_len = 0;
+ goto retry;
+ }
+ ret = -3;
+ }
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (output->encoder->uconv_out != NULL) {
+ ret = xmlUconvWrapper(output->encoder->uconv_out, 0, xmlBufEnd(out),
+ &c_out, xmlBufContent(in), &c_in);
+ xmlBufShrink(in, c_in);
+ xmlBufAddLen(out, c_out);
+ writtentot += c_out;
+ if (ret == -1) {
+ if (c_out > 0) {
+ /*
+ * Can be a limitation of uconv
+ */
+ charref_len = 0;
+ goto retry;
+ }
+ ret = -3;
+ }
+ }
+#endif /* LIBXML_ICU_ENABLED */
+ else {
+ xmlEncodingErr(XML_I18N_NO_OUTPUT,
+ "xmlCharEncOutFunc: no output function !\n", NULL);
+ return(-1);
+ }
+
+ if (ret >= 0) output += ret;
+
+ /*
+ * Attempt to handle error cases
+ */
+ switch (ret) {
+ case 0:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of output\n",
+ c_in, c_out);
+#endif
+ break;
+ case -1:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "output conversion failed by lack of space\n");
+#endif
+ break;
+ case -3:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,"converted %d bytes to %d bytes of output %d left\n",
+ c_in, c_out, (int) xmlBufUse(in));
+#endif
+ break;
+ case -2: {
+ int len = (int) xmlBufUse(in);
+ xmlChar *content = xmlBufContent(in);
+ int cur;
+
+ cur = xmlGetUTF8Char(content, &len);
+ if ((charref_len != 0) && (c_out < charref_len)) {
+ /*
+ * We attempted to insert a character reference and failed.
+ * Undo what was written and skip the remaining charref.
+ */
+ xmlBufErase(out, c_out);
+ writtentot -= c_out;
+ xmlBufShrink(in, charref_len - c_out);
+ charref_len = 0;
+
+ ret = -1;
+ break;
+ } else if (cur > 0) {
+ xmlChar charref[20];
+
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "handling output conversion error\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ content[0], content[1],
+ content[2], content[3]);
+#endif
+ /*
+ * Removes the UTF8 sequence, and replace it by a charref
+ * and continue the transcoding phase, hoping the error
+ * did not mangle the encoder state.
+ */
+ charref_len = snprintf((char *) &charref[0], sizeof(charref),
+ "&#%d;", cur);
+ xmlBufShrink(in, len);
+ xmlBufAddHead(in, charref, -1);
+
+ goto retry;
+ } else {
+ char buf[50];
+
+ snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
+ content[0], content[1],
+ content[2], content[3]);
+ buf[49] = 0;
+ xmlEncodingErr(XML_I18N_CONV_FAILED,
+ "output conversion failed due to conv error, bytes %s\n",
+ buf);
+ if (xmlBufGetAllocationScheme(in) != XML_BUFFER_ALLOC_IMMUTABLE)
+ content[0] = ' ';
+ }
+ break;
+ }
+ }
+ return(ret);
+}
+#endif
+
+/**
+ * xmlCharEncOutFunc:
+ * @handler: char enconding transformation data structure
+ * @out: an xmlBuffer for the output.
+ * @in: an xmlBuffer for the input
+ *
+ * Generic front-end for the encoding handler output function
+ * a first call with @in == NULL has to be made firs to initiate the
+ * output in case of non-stateless encoding needing to initiate their
+ * state or the output (like the BOM in UTF16).
+ * In case of UTF8 sequence conversion errors for the given encoder,
+ * the content will be automatically remapped to a CharRef sequence.
+ *
+ * Returns the number of byte written if success, or
+ * -1 general error
+ * -2 if the transcoding fails (for *in is not valid utf8 string or
+ * the result of transformation can't fit into the encoding we want), or
+ */
+int
+xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
+ xmlBufferPtr in) {
+ int ret = -2;
+ int written;
+ int writtentot = 0;
+ int toconv;
+ int output = 0;
+ int charref_len = 0;
+
+ if (handler == NULL) return(-1);
+ if (out == NULL) return(-1);
+
+retry:
+
+ written = out->size - out->use;
+
+ if (written > 0)
+ written--; /* Gennady: count '/0' */
+
+ /*
+ * First specific handling of in = NULL, i.e. the initialization call
+ */
+ if (in == NULL) {
+ toconv = 0;
+ if (handler->output != NULL) {
+ ret = handler->output(&out->content[out->use], &written,
+ NULL, &toconv);
+ if (ret >= 0) { /* Gennady: check return value */
+ out->use += written;
+ out->content[out->use] = 0;
+ }
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (handler->iconv_out != NULL) {
+ ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
+ &written, NULL, &toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (handler->uconv_out != NULL) {
+ ret = xmlUconvWrapper(handler->uconv_out, 0,
+ &out->content[out->use],
+ &written, NULL, &toconv);
+ out->use += written;
+ out->content[out->use] = 0;
+ }
+#endif /* LIBXML_ICU_ENABLED */
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "initialized encoder\n");
+#endif
+ return(0);
+ }
+
+ /*
+ * Conversion itself.
+ */
+ toconv = in->use;
+ if (toconv == 0)
+ return(0);
+ if (toconv * 4 >= written) {
+ xmlBufferGrow(out, toconv * 4);
+ written = out->size - out->use - 1;
+ }
+ if (handler->output != NULL) {
+ ret = handler->output(&out->content[out->use], &written,
+ in->content, &toconv);
+ if (written > 0) {
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ writtentot += written;
+ }
+ out->content[out->use] = 0;
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ else if (handler->iconv_out != NULL) {
+ ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ writtentot += written;
+ out->content[out->use] = 0;
+ if (ret == -1) {
+ if (written > 0) {
+ /*
+ * Can be a limitation of iconv
+ */
+ charref_len = 0;
+ goto retry;
+ }
+ ret = -3;
+ }
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ else if (handler->uconv_out != NULL) {
+ ret = xmlUconvWrapper(handler->uconv_out, 0,
+ &out->content[out->use],
+ &written, in->content, &toconv);
+ xmlBufferShrink(in, toconv);
+ out->use += written;
+ writtentot += written;
+ out->content[out->use] = 0;
+ if (ret == -1) {
+ if (written > 0) {
+ /*
+ * Can be a limitation of iconv
+ */
+ charref_len = 0;
+ goto retry;
+ }
+ ret = -3;
+ }
+ }
+#endif /* LIBXML_ICU_ENABLED */
+ else {
+ xmlEncodingErr(XML_I18N_NO_OUTPUT,
+ "xmlCharEncOutFunc: no output function !\n", NULL);
+ return(-1);
+ }
+
+ if (ret >= 0) output += ret;
+
+ /*
+ * Attempt to handle error cases
+ */
+ switch (ret) {
+ case 0:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "converted %d bytes to %d bytes of output\n",
+ toconv, written);
+#endif
+ break;
+ case -1:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "output conversion failed by lack of space\n");
+#endif
+ break;
+ case -3:
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,"converted %d bytes to %d bytes of output %d left\n",
+ toconv, written, in->use);
+#endif
+ break;
+ case -2: {
+ int len = in->use;
+ const xmlChar *utf = (const xmlChar *) in->content;
+ int cur;
+
+ cur = xmlGetUTF8Char(utf, &len);
+ if ((charref_len != 0) && (written < charref_len)) {
+ /*
+ * We attempted to insert a character reference and failed.
+ * Undo what was written and skip the remaining charref.
+ */
+ out->use -= written;
+ writtentot -= written;
+ xmlBufferShrink(in, charref_len - written);
+ charref_len = 0;
+
+ ret = -1;
+ break;
+ } else if (cur > 0) {
+ xmlChar charref[20];
+
+#ifdef DEBUG_ENCODING
+ xmlGenericError(xmlGenericErrorContext,
+ "handling output conversion error\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ in->content[0], in->content[1],
+ in->content[2], in->content[3]);
+#endif
+ /*
+ * Removes the UTF8 sequence, and replace it by a charref
+ * and continue the transcoding phase, hoping the error
+ * did not mangle the encoder state.
+ */
+ charref_len = snprintf((char *) &charref[0], sizeof(charref),
+ "&#%d;", cur);
+ xmlBufferShrink(in, len);
+ xmlBufferAddHead(in, charref, -1);
+
+ goto retry;
+ } else {
+ char buf[50];
+
+ snprintf(&buf[0], 49, "0x%02X 0x%02X 0x%02X 0x%02X",
+ in->content[0], in->content[1],
+ in->content[2], in->content[3]);
+ buf[49] = 0;
+ xmlEncodingErr(XML_I18N_CONV_FAILED,
+ "output conversion failed due to conv error, bytes %s\n",
+ buf);
+ if (in->alloc != XML_BUFFER_ALLOC_IMMUTABLE)
+ in->content[0] = ' ';
+ }
+ break;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlCharEncCloseFunc:
+ * @handler: char enconding transformation data structure
+ *
+ * Generic front-end for encoding handler close function
+ *
+ * Returns 0 if success, or -1 in case of error
+ */
+int
+xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
+ int ret = 0;
+ int tofree = 0;
+ int i, handler_in_list = 0;
+
+ if (handler == NULL) return(-1);
+ if (handler->name == NULL) return(-1);
+ if (handlers != NULL) {
+ for (i = 0;i < nbCharEncodingHandler; i++) {
+ if (handler == handlers[i]) {
+ handler_in_list = 1;
+ break;
+ }
+ }
+ }
+#ifdef LIBXML_ICONV_ENABLED
+ /*
+ * Iconv handlers can be used only once, free the whole block.
+ * and the associated icon resources.
+ */
+ if ((handler_in_list == 0) &&
+ ((handler->iconv_out != NULL) || (handler->iconv_in != NULL))) {
+ tofree = 1;
+ if (handler->iconv_out != NULL) {
+ if (iconv_close(handler->iconv_out))
+ ret = -1;
+ handler->iconv_out = NULL;
+ }
+ if (handler->iconv_in != NULL) {
+ if (iconv_close(handler->iconv_in))
+ ret = -1;
+ handler->iconv_in = NULL;
+ }
+ }
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ if ((handler_in_list == 0) &&
+ ((handler->uconv_out != NULL) || (handler->uconv_in != NULL))) {
+ tofree = 1;
+ if (handler->uconv_out != NULL) {
+ closeIcuConverter(handler->uconv_out);
+ handler->uconv_out = NULL;
+ }
+ if (handler->uconv_in != NULL) {
+ closeIcuConverter(handler->uconv_in);
+ handler->uconv_in = NULL;
+ }
+ }
+#endif
+ if (tofree) {
+ /* free up only dynamic handlers iconv/uconv */
+ if (handler->name != NULL)
+ xmlFree(handler->name);
+ handler->name = NULL;
+ xmlFree(handler);
+ }
+#ifdef DEBUG_ENCODING
+ if (ret)
+ xmlGenericError(xmlGenericErrorContext,
+ "failed to close the encoding handler\n");
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "closed the encoding handler\n");
+#endif
+
+ return(ret);
+}
+
+/**
+ * xmlByteConsumed:
+ * @ctxt: an XML parser context
+ *
+ * This function provides the current index of the parser relative
+ * to the start of the current entity. This function is computed in
+ * bytes from the beginning starting at zero and finishing at the
+ * size in byte of the file if parsing a file. The function is
+ * of constant cost if the input is UTF-8 but can be costly if run
+ * on non-UTF-8 input.
+ *
+ * Returns the index in bytes from the beginning of the entity or -1
+ * in case the index could not be computed.
+ */
+long
+xmlByteConsumed(xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr in;
+
+ if (ctxt == NULL) return(-1);
+ in = ctxt->input;
+ if (in == NULL) return(-1);
+ if ((in->buf != NULL) && (in->buf->encoder != NULL)) {
+ unsigned int unused = 0;
+ xmlCharEncodingHandler * handler = in->buf->encoder;
+ /*
+ * Encoding conversion, compute the number of unused original
+ * bytes from the input not consumed and substract that from
+ * the raw consumed value, this is not a cheap operation
+ */
+ if (in->end - in->cur > 0) {
+ unsigned char convbuf[32000];
+ const unsigned char *cur = (const unsigned char *)in->cur;
+ int toconv = in->end - in->cur, written = 32000;
+
+ int ret;
+
+ if (handler->output != NULL) {
+ do {
+ toconv = in->end - cur;
+ written = 32000;
+ ret = handler->output(&convbuf[0], &written,
+ cur, &toconv);
+ if (ret == -1) return(-1);
+ unused += written;
+ cur += toconv;
+ } while (ret == -2);
+#ifdef LIBXML_ICONV_ENABLED
+ } else if (handler->iconv_out != NULL) {
+ do {
+ toconv = in->end - cur;
+ written = 32000;
+ ret = xmlIconvWrapper(handler->iconv_out, &convbuf[0],
+ &written, cur, &toconv);
+ if (ret < 0) {
+ if (written > 0)
+ ret = -2;
+ else
+ return(-1);
+ }
+ unused += written;
+ cur += toconv;
+ } while (ret == -2);
+#endif
+#ifdef LIBXML_ICU_ENABLED
+ } else if (handler->uconv_out != NULL) {
+ do {
+ toconv = in->end - cur;
+ written = 32000;
+ ret = xmlUconvWrapper(handler->uconv_out, 0, &convbuf[0],
+ &written, cur, &toconv);
+ if (ret < 0) {
+ if (written > 0)
+ ret = -2;
+ else
+ return(-1);
+ }
+ unused += written;
+ cur += toconv;
+ } while (ret == -2);
+#endif
+ } else {
+ /* could not find a converter */
+ return(-1);
+ }
+ }
+ if (in->buf->rawconsumed < unused)
+ return(-1);
+ return(in->buf->rawconsumed - unused);
+ }
+ return(in->consumed + (in->cur - in->base));
+}
+
+#if !defined(LIBXML_ICONV_ENABLED) && !defined(LIBXML_ICU_ENABLED)
+#ifdef LIBXML_ISO8859X_ENABLED
+
+/**
+ * UTF8ToISO8859x:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ * @xlattable: the 2-level transcoding table
+ *
+ * Take a block of UTF-8 chars in and try to convert it to an ISO 8859-*
+ * block of chars out.
+ *
+ * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * as the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of ocetes consumed.
+ */
+static int
+UTF8ToISO8859x(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen,
+ unsigned char const *xlattable) {
+ const unsigned char* outstart = out;
+ const unsigned char* inend;
+ const unsigned char* instart = in;
+ const unsigned char* processed = in;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) ||
+ (xlattable == NULL))
+ return(-1);
+ if (in == NULL) {
+ /*
+ * initialization nothing to do
+ */
+ *outlen = 0;
+ *inlen = 0;
+ return(0);
+ }
+ inend = in + (*inlen);
+ while (in < inend) {
+ unsigned char d = *in++;
+ if (d < 0x80) {
+ *out++ = d;
+ } else if (d < 0xC0) {
+ /* trailing byte in leading position */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ } else if (d < 0xE0) {
+ unsigned char c;
+ if (!(in < inend)) {
+ /* trailing byte not in input buffer */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-3);
+ }
+ c = *in++;
+ if ((c & 0xC0) != 0x80) {
+ /* not a trailing byte */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ c = c & 0x3F;
+ d = d & 0x1F;
+ d = xlattable [48 + c + xlattable [d] * 64];
+ if (d == 0) {
+ /* not in character set */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ *out++ = d;
+ } else if (d < 0xF0) {
+ unsigned char c1;
+ unsigned char c2;
+ if (!(in < inend - 1)) {
+ /* trailing bytes not in input buffer */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-3);
+ }
+ c1 = *in++;
+ if ((c1 & 0xC0) != 0x80) {
+ /* not a trailing byte (c1) */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ c2 = *in++;
+ if ((c2 & 0xC0) != 0x80) {
+ /* not a trailing byte (c2) */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ c1 = c1 & 0x3F;
+ c2 = c2 & 0x3F;
+ d = d & 0x0F;
+ d = xlattable [48 + c2 + xlattable [48 + c1 +
+ xlattable [32 + d] * 64] * 64];
+ if (d == 0) {
+ /* not in character set */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ *out++ = d;
+ } else {
+ /* cannot transcode >= U+010000 */
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(-2);
+ }
+ processed = in;
+ }
+ *outlen = out - outstart;
+ *inlen = processed - instart;
+ return(*outlen);
+}
+
+/**
+ * ISO8859xToUTF8
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of ISO Latin 1 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of ISO 8859-* chars in and try to convert it to an UTF-8
+ * block of chars out.
+ * Returns 0 if success, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * The value of @outlen after return is the number of ocetes produced.
+ */
+static int
+ISO8859xToUTF8(unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen,
+ unsigned short const *unicodetable) {
+ unsigned char* outstart = out;
+ unsigned char* outend;
+ const unsigned char* instart = in;
+ const unsigned char* inend;
+ const unsigned char* instop;
+ unsigned int c;
+
+ if ((out == NULL) || (outlen == NULL) || (inlen == NULL) ||
+ (in == NULL) || (unicodetable == NULL))
+ return(-1);
+ outend = out + *outlen;
+ inend = in + *inlen;
+ instop = inend;
+
+ while ((in < inend) && (out < outend - 2)) {
+ if (*in >= 0x80) {
+ c = unicodetable [*in - 0x80];
+ if (c == 0) {
+ /* undefined code point */
+ *outlen = out - outstart;
+ *inlen = in - instart;
+ return (-1);
+ }
+ if (c < 0x800) {
+ *out++ = ((c >> 6) & 0x1F) | 0xC0;
+ *out++ = (c & 0x3F) | 0x80;
+ } else {
+ *out++ = ((c >> 12) & 0x0F) | 0xE0;
+ *out++ = ((c >> 6) & 0x3F) | 0x80;
+ *out++ = (c & 0x3F) | 0x80;
+ }
+ ++in;
+ }
+ if (instop - in > outend - out) instop = in + (outend - out);
+ while ((*in < 0x80) && (in < instop)) {
+ *out++ = *in++;
+ }
+ }
+ if ((in < inend) && (out < outend) && (*in < 0x80)) {
+ *out++ = *in++;
+ }
+ if ((in < inend) && (out < outend) && (*in < 0x80)) {
+ *out++ = *in++;
+ }
+ *outlen = out - outstart;
+ *inlen = in - instart;
+ return (*outlen);
+}
+
+
+/************************************************************************
+ * Lookup tables for ISO-8859-2..ISO-8859-16 transcoding *
+ ************************************************************************/
+
+static unsigned short const xmlunicodetable_ISO8859_2 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
+ 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
+ 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
+ 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c,
+ 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
+ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
+ 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
+ 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
+ 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
+ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
+ 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
+ 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_2 [48 + 6 * 64] = {
+ "\x00\x00\x01\x05\x02\x04\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\xa4\x00\x00\xa7\xa8\x00\x00\x00\x00\xad\x00\x00"
+ "\xb0\x00\x00\x00\xb4\x00\x00\x00\xb8\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xc3\xe3\xa1\xb1\xc6\xe6\x00\x00\x00\x00\xc8\xe8\xcf\xef"
+ "\xd0\xf0\x00\x00\x00\x00\x00\x00\xca\xea\xcc\xec\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc5\xe5\x00\x00\xa5\xb5\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xa2\xff\x00\xb2\x00\xbd\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xa3\xb3\xd1\xf1\x00\x00\xd2\xf2\x00\x00\x00\x00\x00\x00\x00"
+ "\xd5\xf5\x00\x00\xc0\xe0\x00\x00\xd8\xf8\xa6\xb6\x00\x00\xaa\xba"
+ "\xa9\xb9\xde\xfe\xab\xbb\x00\x00\x00\x00\x00\x00\x00\x00\xd9\xf9"
+ "\xdb\xfb\x00\x00\x00\x00\x00\x00\x00\xac\xbc\xaf\xbf\xae\xbe\x00"
+ "\x00\xc1\xc2\x00\xc4\x00\x00\xc7\x00\xc9\x00\xcb\x00\xcd\xce\x00"
+ "\x00\x00\x00\xd3\xd4\x00\xd6\xd7\x00\x00\xda\x00\xdc\xdd\x00\xdf"
+ "\x00\xe1\xe2\x00\xe4\x00\x00\xe7\x00\xe9\x00\xeb\x00\xed\xee\x00"
+ "\x00\x00\x00\xf3\xf4\x00\xf6\xf7\x00\x00\xfa\x00\xfc\xfd\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_3 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7,
+ 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b,
+ 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7,
+ 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0x0000, 0x017c,
+ 0x00c0, 0x00c1, 0x00c2, 0x0000, 0x00c4, 0x010a, 0x0108, 0x00c7,
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x0000, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7,
+ 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x0000, 0x00e4, 0x010b, 0x0109, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x0000, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7,
+ 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_3 [48 + 7 * 64] = {
+ "\x04\x00\x01\x06\x02\x05\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\xa3\xa4\x00\x00\xa7\xa8\x00\x00\x00\x00\xad\x00\x00"
+ "\xb0\x00\xb2\xb3\xb4\xb5\x00\xb7\xb8\x00\x00\x00\x00\xbd\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xc6\xe6\xc5\xe5\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xf8\xab\xbb"
+ "\xd5\xf5\x00\x00\xa6\xb6\xa1\xb1\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa9\xb9\x00\x00\xac\xbc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xa2\xff\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfe\xaa\xba"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\xbf\x00\x00\x00"
+ "\xc0\xc1\xc2\x00\xc4\x00\x00\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\x00\xd1\xd2\xd3\xd4\x00\xd6\xd7\x00\xd9\xda\xdb\xdc\x00\x00\xdf"
+ "\xe0\xe1\xe2\x00\xe4\x00\x00\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\x00\xf1\xf2\xf3\xf4\x00\xf6\xf7\x00\xf9\xfa\xfb\xfc\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_4 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
+ 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
+ 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
+ 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b,
+ 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
+ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a,
+ 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
+ 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df,
+ 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
+ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
+ 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+ 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_4 [48 + 6 * 64] = {
+ "\x00\x00\x01\x05\x02\x03\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\xa4\x00\x00\xa7\xa8\x00\x00\x00\x00\xad\x00\xaf"
+ "\xb0\x00\x00\x00\xb4\x00\x00\x00\xb8\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\xe0\x00\x00\xa1\xb1\x00\x00\x00\x00\x00\x00\xc8\xe8\x00\x00"
+ "\xd0\xf0\xaa\xba\x00\x00\xcc\xec\xca\xea\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xab\xbb\x00\x00\x00\x00\xa5\xb5\xcf\xef\x00\x00\xc7\xe7"
+ "\x00\x00\x00\x00\x00\x00\xd3\xf3\xa2\x00\x00\xa6\xb6\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xd1\xf1\x00\x00\x00\xbd\xbf\xd2\xf2\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xa3\xb3\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa9\xb9\x00\x00\x00\x00\xac\xbc\xdd\xfd\xde\xfe\x00\x00\x00\x00"
+ "\x00\x00\xd9\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\xbe\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\xb2\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xc1\xc2\xc3\xc4\xc5\xc6\x00\x00\xc9\x00\xcb\x00\xcd\xce\x00"
+ "\x00\x00\x00\x00\xd4\xd5\xd6\xd7\xd8\x00\xda\xdb\xdc\x00\x00\xdf"
+ "\x00\xe1\xe2\xe3\xe4\xe5\xe6\x00\x00\xe9\x00\xeb\x00\xed\xee\x00"
+ "\x00\x00\x00\x00\xf4\xf5\xf6\xf7\xf8\x00\xfa\xfb\xfc\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_5 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
+ 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
+ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
+ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
+ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
+ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
+ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
+ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
+ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_5 [48 + 6 * 64] = {
+ "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x02\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\x00\x00\x00\xfd\x00\x00\x00\x00\x00\xad\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\x00\xae\xaf"
+ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\x00\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\x00\xfe\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_6 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f,
+ 0x0000, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
+ 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
+ 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
+ 0x0638, 0x0639, 0x063a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
+ 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
+ 0x0650, 0x0651, 0x0652, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_6 [48 + 5 * 64] = {
+ "\x02\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x03\x04\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\xa4\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x00\x00\x00\xbf"
+ "\x00\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\x00\x00\x00\x00\x00"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\xf0\xf1\xf2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_7 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x2018, 0x2019, 0x00a3, 0x0000, 0x0000, 0x00a6, 0x00a7,
+ 0x00a8, 0x00a9, 0x0000, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7,
+ 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f,
+ 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
+ 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f,
+ 0x03a0, 0x03a1, 0x0000, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7,
+ 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af,
+ 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7,
+ 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
+ 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
+ 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0x0000,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_7 [48 + 7 * 64] = {
+ "\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x06"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\xa3\x00\x00\xa6\xa7\xa8\xa9\x00\xab\xac\xad\x00\x00"
+ "\xb0\xb1\xb2\xb3\x00\x00\x00\xb7\x00\x00\x00\xbb\x00\xbd\x00\x00"
+ "\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xaf\x00\x00\xa1\xa2\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xb4\xb5\xb6\x00\xb8\xb9\xba\x00\xbc\x00\xbe\xbf"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\xd0\xd1\x00\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_8 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+ 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+ 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2017,
+ 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7,
+ 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
+ 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
+ 0x05e8, 0x05e9, 0x05ea, 0x0000, 0x0000, 0x200e, 0x200f, 0x0000,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_8 [48 + 7 * 64] = {
+ "\x02\x00\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\x00\xab\xac\xad\xae\xaf"
+ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\x00\xbb\xbc\xbd\xbe\x00"
+ "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfd\xfe"
+ "\x00\x00\x00\x00\x00\x00\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_9 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
+ 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+ 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
+ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
+ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_9 [48 + 5 * 64] = {
+ "\x00\x00\x01\x02\x03\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\x00\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\x00\x00\xdf"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\x00\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\x00\x00\xff"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\xf0"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xdd\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xfe"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_10 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7,
+ 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
+ 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7,
+ 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b,
+ 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e,
+ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf,
+ 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168,
+ 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
+ 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f,
+ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
+ 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169,
+ 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_10 [48 + 7 * 64] = {
+ "\x00\x00\x01\x06\x02\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x00\x00\xad\x00\x00"
+ "\xb0\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\xe0\x00\x00\xa1\xb1\x00\x00\x00\x00\x00\x00\xc8\xe8\x00\x00"
+ "\xa9\xb9\xa2\xb2\x00\x00\xcc\xec\xca\xea\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xa3\xb3\x00\x00\x00\x00\xa5\xb5\xa4\xb4\x00\x00\xc7\xe7"
+ "\x00\x00\x00\x00\x00\x00\xa6\xb6\xff\x00\x00\xa8\xb8\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xd1\xf1\x00\x00\x00\xaf\xbf\xd2\xf2\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xaa\xba\x00\x00\x00\x00\xab\xbb\xd7\xf7\xae\xbe\x00\x00\x00\x00"
+ "\x00\x00\xd9\xf9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\xbc\x00"
+ "\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xc1\xc2\xc3\xc4\xc5\xc6\x00\x00\xc9\x00\xcb\x00\xcd\xce\xcf"
+ "\xd0\x00\x00\xd3\xd4\xd5\xd6\x00\xd8\x00\xda\xdb\xdc\xdd\xde\xdf"
+ "\x00\xe1\xe2\xe3\xe4\xe5\xe6\x00\x00\xe9\x00\xeb\x00\xed\xee\xef"
+ "\xf0\x00\x00\xf3\xf4\xf5\xf6\x00\xf8\x00\xfa\xfb\xfc\xfd\xfe\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_11 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07,
+ 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
+ 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
+ 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
+ 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27,
+ 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
+ 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
+ 0x0e38, 0x0e39, 0x0e3a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0e3f,
+ 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
+ 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
+ 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
+ 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x0000, 0x0000, 0x0000, 0x0000,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_11 [48 + 6 * 64] = {
+ "\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x03\x05\x00\x00\x00\x00\x00\x00"
+ "\x00\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
+ "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\x00\x00\x00\x00\xdf"
+ "\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_13 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7,
+ 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7,
+ 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6,
+ 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112,
+ 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b,
+ 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7,
+ 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df,
+ 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113,
+ 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c,
+ 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7,
+ 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_13 [48 + 7 * 64] = {
+ "\x00\x00\x01\x04\x06\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\xa2\xa3\xa4\x00\xa6\xa7\x00\xa9\x00\xab\xac\xad\xae\x00"
+ "\xb0\xb1\xb2\xb3\x00\xb5\xb6\xb7\x00\xb9\x00\xbb\xbc\xbd\xbe\x00"
+ "\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\xb4\xa1\xa5\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xc4\xc5\xaf\x00\x00\xc9\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xd3\x00\xd5\xd6\xd7\xa8\x00\x00\x00\xdc\x00\x00\xdf"
+ "\x00\x00\x00\x00\xe4\xe5\xbf\x00\x00\xe9\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\xf3\x00\xf5\xf6\xf7\xb8\x00\x00\x00\xfc\x00\x00\x00"
+ "\x00\xd9\xf9\xd1\xf1\xd2\xf2\x00\x00\x00\x00\x00\xd4\xf4\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xaa\xba\x00\x00\xda\xfa\x00\x00\x00\x00"
+ "\xd0\xf0\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xfb\x00\x00\x00\x00"
+ "\x00\x00\xd8\xf8\x00\x00\x00\x00\x00\xca\xea\xdd\xfd\xde\xfe\x00"
+ "\xc2\xe2\x00\x00\xc0\xe0\xc3\xe3\x00\x00\x00\x00\xc8\xe8\x00\x00"
+ "\x00\x00\xc7\xe7\x00\x00\xcb\xeb\xc6\xe6\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xcc\xec\x00\x00\x00\x00\x00\x00\xce\xee\x00\x00\xc1\xe1"
+ "\x00\x00\x00\x00\x00\x00\xcd\xed\x00\x00\x00\xcf\xef\x00\x00\x00"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_14 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7,
+ 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
+ 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56,
+ 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61,
+ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a,
+ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b,
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_14 [48 + 10 * 64] = {
+ "\x00\x00\x01\x09\x04\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\xa3\x00\x00\x00\xa7\x00\xa9\x00\x00\x00\xad\xae\x00"
+ "\x00\x00\x00\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x03\x08\x05\x06\x00\x00\x00\x00"
+ "\x00\x00\xa1\xa2\x00\x00\x00\x00\x00\x00\xa6\xab\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xb1"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\xa5\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xb2\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa8\xb8\xaa\xba\xbd\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xac\xbc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\xd0\xf0\xde\xfe\xaf\x00\x00\x00\x00\x00\x00\x00"
+ "\xb4\xb5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\xb7\xb9\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xbb\xbf\x00\x00\x00\x00\x00\x00\x00\x00\xd7\xf7\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\x00\xd1\xd2\xd3\xd4\xd5\xd6\x00\xd8\xd9\xda\xdb\xdc\xdd\x00\xdf"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\x00\xf1\xf2\xf3\xf4\xf5\xf6\x00\xf8\xf9\xfa\xfb\xfc\xfd\x00\xff"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_15 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7,
+ 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
+ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7,
+ 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf,
+ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
+ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
+ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_15 [48 + 6 * 64] = {
+ "\x00\x00\x01\x05\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\xa1\xa2\xa3\x00\xa5\x00\xa7\x00\xa9\xaa\xab\xac\xad\xae\xaf"
+ "\xb0\xb1\xb2\xb3\x00\xb5\xb6\xb7\x00\xb9\xba\xbb\x00\x00\x00\xbf"
+ "\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\xbc\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xa6\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x00\x00\x00\x00\xb4\xb8\x00"
+ "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
+ "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
+};
+
+static unsigned short const xmlunicodetable_ISO8859_16 [128] = {
+ 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087,
+ 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f,
+ 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097,
+ 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f,
+ 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7,
+ 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
+ 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7,
+ 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c,
+ 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7,
+ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
+ 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a,
+ 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df,
+ 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7,
+ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
+ 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b,
+ 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff,
+};
+
+static unsigned char const xmltranscodetable_ISO8859_16 [48 + 9 * 64] = {
+ "\x00\x00\x01\x08\x02\x03\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
+ "\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
+ "\xa0\x00\x00\x00\x00\x00\x00\xa7\x00\xa9\x00\xab\x00\xad\x00\x00"
+ "\xb0\xb1\x00\x00\x00\x00\xb6\xb7\x00\x00\x00\xbb\x00\x00\x00\x00"
+ "\x00\x00\xc3\xe3\xa1\xa2\xc5\xe5\x00\x00\x00\x00\xb2\xb9\x00\x00"
+ "\xd0\xf0\x00\x00\x00\x00\x00\x00\xdd\xfd\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\xa3\xb3\xd1\xf1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xd5\xf5\xbc\xbd\x00\x00\x00\x00\x00\x00\xd7\xf7\x00\x00\x00\x00"
+ "\xa6\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xd8\xf8\x00\x00\x00\x00\x00\x00\xbe\xac\xae\xaf\xbf\xb4\xb8\x00"
+ "\x06\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\xa5\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xba\xde\xfe\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
+ "\xc0\xc1\xc2\x00\xc4\x00\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
+ "\x00\x00\xd2\xd3\xd4\x00\xd6\x00\x00\xd9\xda\xdb\xdc\x00\x00\xdf"
+ "\xe0\xe1\xe2\x00\xe4\x00\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef"
+ "\x00\x00\xf2\xf3\xf4\x00\xf6\x00\x00\xf9\xfa\xfb\xfc\x00\x00\xff"
+};
+
+
+/*
+ * auto-generated functions for ISO-8859-2 .. ISO-8859-16
+ */
+
+static int ISO8859_2ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_2);
+}
+static int UTF8ToISO8859_2 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_2);
+}
+
+static int ISO8859_3ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_3);
+}
+static int UTF8ToISO8859_3 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_3);
+}
+
+static int ISO8859_4ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_4);
+}
+static int UTF8ToISO8859_4 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_4);
+}
+
+static int ISO8859_5ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_5);
+}
+static int UTF8ToISO8859_5 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_5);
+}
+
+static int ISO8859_6ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_6);
+}
+static int UTF8ToISO8859_6 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_6);
+}
+
+static int ISO8859_7ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_7);
+}
+static int UTF8ToISO8859_7 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_7);
+}
+
+static int ISO8859_8ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_8);
+}
+static int UTF8ToISO8859_8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_8);
+}
+
+static int ISO8859_9ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_9);
+}
+static int UTF8ToISO8859_9 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_9);
+}
+
+static int ISO8859_10ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_10);
+}
+static int UTF8ToISO8859_10 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_10);
+}
+
+static int ISO8859_11ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_11);
+}
+static int UTF8ToISO8859_11 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_11);
+}
+
+static int ISO8859_13ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_13);
+}
+static int UTF8ToISO8859_13 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_13);
+}
+
+static int ISO8859_14ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_14);
+}
+static int UTF8ToISO8859_14 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_14);
+}
+
+static int ISO8859_15ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_15);
+}
+static int UTF8ToISO8859_15 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_15);
+}
+
+static int ISO8859_16ToUTF8 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return ISO8859xToUTF8 (out, outlen, in, inlen, xmlunicodetable_ISO8859_16);
+}
+static int UTF8ToISO8859_16 (unsigned char* out, int *outlen,
+ const unsigned char* in, int *inlen) {
+ return UTF8ToISO8859x (out, outlen, in, inlen, xmltranscodetable_ISO8859_16);
+}
+
+static void
+xmlRegisterCharEncodingHandlersISO8859x (void) {
+ xmlNewCharEncodingHandler ("ISO-8859-2", ISO8859_2ToUTF8, UTF8ToISO8859_2);
+ xmlNewCharEncodingHandler ("ISO-8859-3", ISO8859_3ToUTF8, UTF8ToISO8859_3);
+ xmlNewCharEncodingHandler ("ISO-8859-4", ISO8859_4ToUTF8, UTF8ToISO8859_4);
+ xmlNewCharEncodingHandler ("ISO-8859-5", ISO8859_5ToUTF8, UTF8ToISO8859_5);
+ xmlNewCharEncodingHandler ("ISO-8859-6", ISO8859_6ToUTF8, UTF8ToISO8859_6);
+ xmlNewCharEncodingHandler ("ISO-8859-7", ISO8859_7ToUTF8, UTF8ToISO8859_7);
+ xmlNewCharEncodingHandler ("ISO-8859-8", ISO8859_8ToUTF8, UTF8ToISO8859_8);
+ xmlNewCharEncodingHandler ("ISO-8859-9", ISO8859_9ToUTF8, UTF8ToISO8859_9);
+ xmlNewCharEncodingHandler ("ISO-8859-10", ISO8859_10ToUTF8, UTF8ToISO8859_10);
+ xmlNewCharEncodingHandler ("ISO-8859-11", ISO8859_11ToUTF8, UTF8ToISO8859_11);
+ xmlNewCharEncodingHandler ("ISO-8859-13", ISO8859_13ToUTF8, UTF8ToISO8859_13);
+ xmlNewCharEncodingHandler ("ISO-8859-14", ISO8859_14ToUTF8, UTF8ToISO8859_14);
+ xmlNewCharEncodingHandler ("ISO-8859-15", ISO8859_15ToUTF8, UTF8ToISO8859_15);
+ xmlNewCharEncodingHandler ("ISO-8859-16", ISO8859_16ToUTF8, UTF8ToISO8859_16);
+}
+
+#endif
+#endif
+
+#define bottom_encoding
+#include "elfgcchack.h"
diff --git a/entities.c b/entities.c
new file mode 100644
index 0000000..a72afb3
--- /dev/null
+++ b/entities.c
@@ -0,0 +1,1105 @@
+/*
+ * entities.c : implementation for the XML entities handling
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <libxml/xmlmemory.h>
+#include <libxml/hash.h>
+#include <libxml/entities.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+#include <libxml/dict.h>
+
+#include "save.h"
+
+/*
+ * The XML predefined entities.
+ */
+
+static xmlEntity xmlEntityLt = {
+ NULL, XML_ENTITY_DECL, BAD_CAST "lt",
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ BAD_CAST "<", BAD_CAST "<", 1,
+ XML_INTERNAL_PREDEFINED_ENTITY,
+ NULL, NULL, NULL, NULL, 0, 1
+};
+static xmlEntity xmlEntityGt = {
+ NULL, XML_ENTITY_DECL, BAD_CAST "gt",
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ BAD_CAST ">", BAD_CAST ">", 1,
+ XML_INTERNAL_PREDEFINED_ENTITY,
+ NULL, NULL, NULL, NULL, 0, 1
+};
+static xmlEntity xmlEntityAmp = {
+ NULL, XML_ENTITY_DECL, BAD_CAST "amp",
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ BAD_CAST "&", BAD_CAST "&", 1,
+ XML_INTERNAL_PREDEFINED_ENTITY,
+ NULL, NULL, NULL, NULL, 0, 1
+};
+static xmlEntity xmlEntityQuot = {
+ NULL, XML_ENTITY_DECL, BAD_CAST "quot",
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ BAD_CAST "\"", BAD_CAST "\"", 1,
+ XML_INTERNAL_PREDEFINED_ENTITY,
+ NULL, NULL, NULL, NULL, 0, 1
+};
+static xmlEntity xmlEntityApos = {
+ NULL, XML_ENTITY_DECL, BAD_CAST "apos",
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ BAD_CAST "'", BAD_CAST "'", 1,
+ XML_INTERNAL_PREDEFINED_ENTITY,
+ NULL, NULL, NULL, NULL, 0, 1
+};
+
+/**
+ * xmlEntitiesErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlEntitiesErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * xmlEntitiesErr:
+ * @code: the error code
+ * @msg: the message
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlEntitiesErr(xmlParserErrors code, const char *msg)
+{
+ __xmlSimpleError(XML_FROM_TREE, code, NULL, msg, NULL);
+}
+
+/*
+ * xmlFreeEntity : clean-up an entity record.
+ */
+static void
+xmlFreeEntity(xmlEntityPtr entity)
+{
+ xmlDictPtr dict = NULL;
+
+ if (entity == NULL)
+ return;
+
+ if (entity->doc != NULL)
+ dict = entity->doc->dict;
+
+
+ if ((entity->children) && (entity->owner == 1) &&
+ (entity == (xmlEntityPtr) entity->children->parent))
+ xmlFreeNodeList(entity->children);
+ if (dict != NULL) {
+ if ((entity->name != NULL) && (!xmlDictOwns(dict, entity->name)))
+ xmlFree((char *) entity->name);
+ if ((entity->ExternalID != NULL) &&
+ (!xmlDictOwns(dict, entity->ExternalID)))
+ xmlFree((char *) entity->ExternalID);
+ if ((entity->SystemID != NULL) &&
+ (!xmlDictOwns(dict, entity->SystemID)))
+ xmlFree((char *) entity->SystemID);
+ if ((entity->URI != NULL) && (!xmlDictOwns(dict, entity->URI)))
+ xmlFree((char *) entity->URI);
+ if ((entity->content != NULL)
+ && (!xmlDictOwns(dict, entity->content)))
+ xmlFree((char *) entity->content);
+ if ((entity->orig != NULL) && (!xmlDictOwns(dict, entity->orig)))
+ xmlFree((char *) entity->orig);
+ } else {
+ if (entity->name != NULL)
+ xmlFree((char *) entity->name);
+ if (entity->ExternalID != NULL)
+ xmlFree((char *) entity->ExternalID);
+ if (entity->SystemID != NULL)
+ xmlFree((char *) entity->SystemID);
+ if (entity->URI != NULL)
+ xmlFree((char *) entity->URI);
+ if (entity->content != NULL)
+ xmlFree((char *) entity->content);
+ if (entity->orig != NULL)
+ xmlFree((char *) entity->orig);
+ }
+ xmlFree(entity);
+}
+
+/*
+ * xmlCreateEntity:
+ *
+ * internal routine doing the entity node strutures allocations
+ */
+static xmlEntityPtr
+xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
+ const xmlChar *ExternalID, const xmlChar *SystemID,
+ const xmlChar *content) {
+ xmlEntityPtr ret;
+
+ ret = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity));
+ if (ret == NULL) {
+ xmlEntitiesErrMemory("xmlCreateEntity: malloc failed");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlEntity));
+ ret->type = XML_ENTITY_DECL;
+ ret->checked = 0;
+
+ /*
+ * fill the structure.
+ */
+ ret->etype = (xmlEntityType) type;
+ if (dict == NULL) {
+ ret->name = xmlStrdup(name);
+ if (ExternalID != NULL)
+ ret->ExternalID = xmlStrdup(ExternalID);
+ if (SystemID != NULL)
+ ret->SystemID = xmlStrdup(SystemID);
+ } else {
+ ret->name = xmlDictLookup(dict, name, -1);
+ if (ExternalID != NULL)
+ ret->ExternalID = xmlDictLookup(dict, ExternalID, -1);
+ if (SystemID != NULL)
+ ret->SystemID = xmlDictLookup(dict, SystemID, -1);
+ }
+ if (content != NULL) {
+ ret->length = xmlStrlen(content);
+ if ((dict != NULL) && (ret->length < 5))
+ ret->content = (xmlChar *)
+ xmlDictLookup(dict, content, ret->length);
+ else
+ ret->content = xmlStrndup(content, ret->length);
+ } else {
+ ret->length = 0;
+ ret->content = NULL;
+ }
+ ret->URI = NULL; /* to be computed by the layer knowing
+ the defining entity */
+ ret->orig = NULL;
+ ret->owner = 0;
+
+ return(ret);
+}
+
+/*
+ * xmlAddEntity : register a new entity for an entities table.
+ */
+static xmlEntityPtr
+xmlAddEntity(xmlDtdPtr dtd, const xmlChar *name, int type,
+ const xmlChar *ExternalID, const xmlChar *SystemID,
+ const xmlChar *content) {
+ xmlDictPtr dict = NULL;
+ xmlEntitiesTablePtr table = NULL;
+ xmlEntityPtr ret;
+
+ if (name == NULL)
+ return(NULL);
+ if (dtd == NULL)
+ return(NULL);
+ if (dtd->doc != NULL)
+ dict = dtd->doc->dict;
+
+ switch (type) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ if (dtd->entities == NULL)
+ dtd->entities = xmlHashCreateDict(0, dict);
+ table = dtd->entities;
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ if (dtd->pentities == NULL)
+ dtd->pentities = xmlHashCreateDict(0, dict);
+ table = dtd->pentities;
+ break;
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ return(NULL);
+ }
+ if (table == NULL)
+ return(NULL);
+ ret = xmlCreateEntity(dict, name, type, ExternalID, SystemID, content);
+ if (ret == NULL)
+ return(NULL);
+ ret->doc = dtd->doc;
+
+ if (xmlHashAddEntry(table, name, ret)) {
+ /*
+ * entity was already defined at another level.
+ */
+ xmlFreeEntity(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlGetPredefinedEntity:
+ * @name: the entity name
+ *
+ * Check whether this name is an predefined entity.
+ *
+ * Returns NULL if not, otherwise the entity
+ */
+xmlEntityPtr
+xmlGetPredefinedEntity(const xmlChar *name) {
+ if (name == NULL) return(NULL);
+ switch (name[0]) {
+ case 'l':
+ if (xmlStrEqual(name, BAD_CAST "lt"))
+ return(&xmlEntityLt);
+ break;
+ case 'g':
+ if (xmlStrEqual(name, BAD_CAST "gt"))
+ return(&xmlEntityGt);
+ break;
+ case 'a':
+ if (xmlStrEqual(name, BAD_CAST "amp"))
+ return(&xmlEntityAmp);
+ if (xmlStrEqual(name, BAD_CAST "apos"))
+ return(&xmlEntityApos);
+ break;
+ case 'q':
+ if (xmlStrEqual(name, BAD_CAST "quot"))
+ return(&xmlEntityQuot);
+ break;
+ default:
+ break;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlAddDtdEntity:
+ * @doc: the document
+ * @name: the entity name
+ * @type: the entity type XML_xxx_yyy_ENTITY
+ * @ExternalID: the entity external ID if available
+ * @SystemID: the entity system ID if available
+ * @content: the entity content
+ *
+ * Register a new entity for this document DTD external subset.
+ *
+ * Returns a pointer to the entity or NULL in case of error
+ */
+xmlEntityPtr
+xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type,
+ const xmlChar *ExternalID, const xmlChar *SystemID,
+ const xmlChar *content) {
+ xmlEntityPtr ret;
+ xmlDtdPtr dtd;
+
+ if (doc == NULL) {
+ xmlEntitiesErr(XML_DTD_NO_DOC,
+ "xmlAddDtdEntity: document is NULL");
+ return(NULL);
+ }
+ if (doc->extSubset == NULL) {
+ xmlEntitiesErr(XML_DTD_NO_DTD,
+ "xmlAddDtdEntity: document without external subset");
+ return(NULL);
+ }
+ dtd = doc->extSubset;
+ ret = xmlAddEntity(dtd, name, type, ExternalID, SystemID, content);
+ if (ret == NULL) return(NULL);
+
+ /*
+ * Link it to the DTD
+ */
+ ret->parent = dtd;
+ ret->doc = dtd->doc;
+ if (dtd->last == NULL) {
+ dtd->children = dtd->last = (xmlNodePtr) ret;
+ } else {
+ dtd->last->next = (xmlNodePtr) ret;
+ ret->prev = dtd->last;
+ dtd->last = (xmlNodePtr) ret;
+ }
+ return(ret);
+}
+
+/**
+ * xmlAddDocEntity:
+ * @doc: the document
+ * @name: the entity name
+ * @type: the entity type XML_xxx_yyy_ENTITY
+ * @ExternalID: the entity external ID if available
+ * @SystemID: the entity system ID if available
+ * @content: the entity content
+ *
+ * Register a new entity for this document.
+ *
+ * Returns a pointer to the entity or NULL in case of error
+ */
+xmlEntityPtr
+xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type,
+ const xmlChar *ExternalID, const xmlChar *SystemID,
+ const xmlChar *content) {
+ xmlEntityPtr ret;
+ xmlDtdPtr dtd;
+
+ if (doc == NULL) {
+ xmlEntitiesErr(XML_DTD_NO_DOC,
+ "xmlAddDocEntity: document is NULL");
+ return(NULL);
+ }
+ if (doc->intSubset == NULL) {
+ xmlEntitiesErr(XML_DTD_NO_DTD,
+ "xmlAddDocEntity: document without internal subset");
+ return(NULL);
+ }
+ dtd = doc->intSubset;
+ ret = xmlAddEntity(dtd, name, type, ExternalID, SystemID, content);
+ if (ret == NULL) return(NULL);
+
+ /*
+ * Link it to the DTD
+ */
+ ret->parent = dtd;
+ ret->doc = dtd->doc;
+ if (dtd->last == NULL) {
+ dtd->children = dtd->last = (xmlNodePtr) ret;
+ } else {
+ dtd->last->next = (xmlNodePtr) ret;
+ ret->prev = dtd->last;
+ dtd->last = (xmlNodePtr) ret;
+ }
+ return(ret);
+}
+
+/**
+ * xmlNewEntity:
+ * @doc: the document
+ * @name: the entity name
+ * @type: the entity type XML_xxx_yyy_ENTITY
+ * @ExternalID: the entity external ID if available
+ * @SystemID: the entity system ID if available
+ * @content: the entity content
+ *
+ * Create a new entity, this differs from xmlAddDocEntity() that if
+ * the document is NULL or has no internal subset defined, then an
+ * unlinked entity structure will be returned, it is then the responsability
+ * of the caller to link it to the document later or free it when not needed
+ * anymore.
+ *
+ * Returns a pointer to the entity or NULL in case of error
+ */
+xmlEntityPtr
+xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type,
+ const xmlChar *ExternalID, const xmlChar *SystemID,
+ const xmlChar *content) {
+ xmlEntityPtr ret;
+ xmlDictPtr dict;
+
+ if ((doc != NULL) && (doc->intSubset != NULL)) {
+ return(xmlAddDocEntity(doc, name, type, ExternalID, SystemID, content));
+ }
+ if (doc != NULL)
+ dict = doc->dict;
+ else
+ dict = NULL;
+ ret = xmlCreateEntity(dict, name, type, ExternalID, SystemID, content);
+ if (ret == NULL)
+ return(NULL);
+ ret->doc = doc;
+ return(ret);
+}
+
+/**
+ * xmlGetEntityFromTable:
+ * @table: an entity table
+ * @name: the entity name
+ * @parameter: look for parameter entities
+ *
+ * Do an entity lookup in the table.
+ * returns the corresponding parameter entity, if found.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+static xmlEntityPtr
+xmlGetEntityFromTable(xmlEntitiesTablePtr table, const xmlChar *name) {
+ return((xmlEntityPtr) xmlHashLookup(table, name));
+}
+
+/**
+ * xmlGetParameterEntity:
+ * @doc: the document referencing the entity
+ * @name: the entity name
+ *
+ * Do an entity lookup in the internal and external subsets and
+ * returns the corresponding parameter entity, if found.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+xmlEntityPtr
+xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) {
+ xmlEntitiesTablePtr table;
+ xmlEntityPtr ret;
+
+ if (doc == NULL)
+ return(NULL);
+ if ((doc->intSubset != NULL) && (doc->intSubset->pentities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->intSubset->pentities;
+ ret = xmlGetEntityFromTable(table, name);
+ if (ret != NULL)
+ return(ret);
+ }
+ if ((doc->extSubset != NULL) && (doc->extSubset->pentities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->extSubset->pentities;
+ return(xmlGetEntityFromTable(table, name));
+ }
+ return(NULL);
+}
+
+/**
+ * xmlGetDtdEntity:
+ * @doc: the document referencing the entity
+ * @name: the entity name
+ *
+ * Do an entity lookup in the DTD entity hash table and
+ * returns the corresponding entity, if found.
+ * Note: the first argument is the document node, not the DTD node.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+xmlEntityPtr
+xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) {
+ xmlEntitiesTablePtr table;
+
+ if (doc == NULL)
+ return(NULL);
+ if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->extSubset->entities;
+ return(xmlGetEntityFromTable(table, name));
+ }
+ return(NULL);
+}
+
+/**
+ * xmlGetDocEntity:
+ * @doc: the document referencing the entity
+ * @name: the entity name
+ *
+ * Do an entity lookup in the document entity hash table and
+ * returns the corresponding entity, otherwise a lookup is done
+ * in the predefined entities too.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+xmlEntityPtr
+xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name) {
+ xmlEntityPtr cur;
+ xmlEntitiesTablePtr table;
+
+ if (doc != NULL) {
+ if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->intSubset->entities;
+ cur = xmlGetEntityFromTable(table, name);
+ if (cur != NULL)
+ return(cur);
+ }
+ if (doc->standalone != 1) {
+ if ((doc->extSubset != NULL) &&
+ (doc->extSubset->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->extSubset->entities;
+ cur = xmlGetEntityFromTable(table, name);
+ if (cur != NULL)
+ return(cur);
+ }
+ }
+ }
+ return(xmlGetPredefinedEntity(name));
+}
+
+/*
+ * Macro used to grow the current buffer.
+ */
+#define growBufferReentrant() { \
+ xmlChar *tmp; \
+ size_t new_size = buffer_size * 2; \
+ if (new_size < buffer_size) goto mem_error; \
+ tmp = (xmlChar *) xmlRealloc(buffer, new_size); \
+ if (tmp == NULL) goto mem_error; \
+ buffer = tmp; \
+ buffer_size = new_size; \
+}
+
+/**
+ * xmlEncodeEntitiesInternal:
+ * @doc: the document containing the string
+ * @input: A string to convert to XML.
+ * @attr: are we handling an atrbute value
+ *
+ * Do a global encoding of a string, replacing the predefined entities
+ * and non ASCII values with their entities and CharRef counterparts.
+ * Contrary to xmlEncodeEntities, this routine is reentrant, and result
+ * must be deallocated.
+ *
+ * Returns A newly allocated string with the substitution done.
+ */
+static xmlChar *
+xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
+ const xmlChar *cur = input;
+ xmlChar *buffer = NULL;
+ xmlChar *out = NULL;
+ size_t buffer_size = 0;
+ int html = 0;
+
+ if (input == NULL) return(NULL);
+ if (doc != NULL)
+ html = (doc->type == XML_HTML_DOCUMENT_NODE);
+
+ /*
+ * allocate an translation buffer.
+ */
+ buffer_size = 1000;
+ buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed");
+ return(NULL);
+ }
+ out = buffer;
+
+ while (*cur != '\0') {
+ size_t indx = out - buffer;
+ if (indx + 100 > buffer_size) {
+
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+
+ /*
+ * By default one have to encode at least '<', '>', '"' and '&' !
+ */
+ if (*cur == '<') {
+ const xmlChar *end;
+
+ /*
+ * Special handling of server side include in HTML attributes
+ */
+ if (html && attr &&
+ (cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') &&
+ ((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) {
+ while (cur != end) {
+ *out++ = *cur++;
+ indx = out - buffer;
+ if (indx + 100 > buffer_size) {
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+ }
+ *out++ = *cur++;
+ *out++ = *cur++;
+ *out++ = *cur++;
+ continue;
+ }
+ *out++ = '&';
+ *out++ = 'l';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*cur == '>') {
+ *out++ = '&';
+ *out++ = 'g';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*cur == '&') {
+ /*
+ * Special handling of &{...} construct from HTML 4, see
+ * http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1
+ */
+ if (html && attr && (cur[1] == '{') &&
+ (strchr((const char *) cur, '}'))) {
+ while (*cur != '}') {
+ *out++ = *cur++;
+ indx = out - buffer;
+ if (indx + 100 > buffer_size) {
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+ }
+ *out++ = *cur++;
+ continue;
+ }
+ *out++ = '&';
+ *out++ = 'a';
+ *out++ = 'm';
+ *out++ = 'p';
+ *out++ = ';';
+ } else if (((*cur >= 0x20) && (*cur < 0x80)) ||
+ (*cur == '\n') || (*cur == '\t') || ((html) && (*cur == '\r'))) {
+ /*
+ * default case, just copy !
+ */
+ *out++ = *cur;
+ } else if (*cur >= 0x80) {
+ if (((doc != NULL) && (doc->encoding != NULL)) || (html)) {
+ /*
+ * Bjørn Reese <br@sseusa.com> provided the patch
+ xmlChar xc;
+ xc = (*cur & 0x3F) << 6;
+ if (cur[1] != 0) {
+ xc += *(++cur) & 0x3F;
+ *out++ = xc;
+ } else
+ */
+ *out++ = *cur;
+ } else {
+ /*
+ * We assume we have UTF-8 input.
+ */
+ char buf[11], *ptr;
+ int val = 0, l = 1;
+
+ if (*cur < 0xC0) {
+ xmlEntitiesErr(XML_CHECK_NOT_UTF8,
+ "xmlEncodeEntities: input not UTF-8");
+ if (doc != NULL)
+ doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+ snprintf(buf, sizeof(buf), "&#%d;", *cur);
+ buf[sizeof(buf) - 1] = 0;
+ ptr = buf;
+ while (*ptr != 0) *out++ = *ptr++;
+ cur++;
+ continue;
+ } else if (*cur < 0xE0) {
+ val = (cur[0]) & 0x1F;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ l = 2;
+ } else if (*cur < 0xF0) {
+ val = (cur[0]) & 0x0F;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ val <<= 6;
+ val |= (cur[2]) & 0x3F;
+ l = 3;
+ } else if (*cur < 0xF8) {
+ val = (cur[0]) & 0x07;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ val <<= 6;
+ val |= (cur[2]) & 0x3F;
+ val <<= 6;
+ val |= (cur[3]) & 0x3F;
+ l = 4;
+ }
+ if ((l == 1) || (!IS_CHAR(val))) {
+ xmlEntitiesErr(XML_ERR_INVALID_CHAR,
+ "xmlEncodeEntities: char out of range\n");
+ if (doc != NULL)
+ doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+ snprintf(buf, sizeof(buf), "&#%d;", *cur);
+ buf[sizeof(buf) - 1] = 0;
+ ptr = buf;
+ while (*ptr != 0) *out++ = *ptr++;
+ cur++;
+ continue;
+ }
+ /*
+ * We could do multiple things here. Just save as a char ref
+ */
+ snprintf(buf, sizeof(buf), "&#x%X;", val);
+ buf[sizeof(buf) - 1] = 0;
+ ptr = buf;
+ while (*ptr != 0) *out++ = *ptr++;
+ cur += l;
+ continue;
+ }
+ } else if (IS_BYTE_CHAR(*cur)) {
+ char buf[11], *ptr;
+
+ snprintf(buf, sizeof(buf), "&#%d;", *cur);
+ buf[sizeof(buf) - 1] = 0;
+ ptr = buf;
+ while (*ptr != 0) *out++ = *ptr++;
+ }
+ cur++;
+ }
+ *out = 0;
+ return(buffer);
+
+mem_error:
+ xmlEntitiesErrMemory("xmlEncodeEntities: realloc failed");
+ xmlFree(buffer);
+ return(NULL);
+}
+
+/**
+ * xmlEncodeAttributeEntities:
+ * @doc: the document containing the string
+ * @input: A string to convert to XML.
+ *
+ * Do a global encoding of a string, replacing the predefined entities
+ * and non ASCII values with their entities and CharRef counterparts for
+ * attribute values.
+ *
+ * Returns A newly allocated string with the substitution done.
+ */
+xmlChar *
+xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input) {
+ return xmlEncodeEntitiesInternal(doc, input, 1);
+}
+
+/**
+ * xmlEncodeEntitiesReentrant:
+ * @doc: the document containing the string
+ * @input: A string to convert to XML.
+ *
+ * Do a global encoding of a string, replacing the predefined entities
+ * and non ASCII values with their entities and CharRef counterparts.
+ * Contrary to xmlEncodeEntities, this routine is reentrant, and result
+ * must be deallocated.
+ *
+ * Returns A newly allocated string with the substitution done.
+ */
+xmlChar *
+xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
+ return xmlEncodeEntitiesInternal(doc, input, 0);
+}
+
+/**
+ * xmlEncodeSpecialChars:
+ * @doc: the document containing the string
+ * @input: A string to convert to XML.
+ *
+ * Do a global encoding of a string, replacing the predefined entities
+ * this routine is reentrant, and result must be deallocated.
+ *
+ * Returns A newly allocated string with the substitution done.
+ */
+xmlChar *
+xmlEncodeSpecialChars(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlChar *input) {
+ const xmlChar *cur = input;
+ xmlChar *buffer = NULL;
+ xmlChar *out = NULL;
+ size_t buffer_size = 0;
+ if (input == NULL) return(NULL);
+
+ /*
+ * allocate an translation buffer.
+ */
+ buffer_size = 1000;
+ buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlEntitiesErrMemory("xmlEncodeSpecialChars: malloc failed");
+ return(NULL);
+ }
+ out = buffer;
+
+ while (*cur != '\0') {
+ size_t indx = out - buffer;
+ if (indx + 10 > buffer_size) {
+
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+
+ /*
+ * By default one have to encode at least '<', '>', '"' and '&' !
+ */
+ if (*cur == '<') {
+ *out++ = '&';
+ *out++ = 'l';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*cur == '>') {
+ *out++ = '&';
+ *out++ = 'g';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*cur == '&') {
+ *out++ = '&';
+ *out++ = 'a';
+ *out++ = 'm';
+ *out++ = 'p';
+ *out++ = ';';
+ } else if (*cur == '"') {
+ *out++ = '&';
+ *out++ = 'q';
+ *out++ = 'u';
+ *out++ = 'o';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*cur == '\r') {
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = '1';
+ *out++ = '3';
+ *out++ = ';';
+ } else {
+ /*
+ * Works because on UTF-8, all extended sequences cannot
+ * result in bytes in the ASCII range.
+ */
+ *out++ = *cur;
+ }
+ cur++;
+ }
+ *out = 0;
+ return(buffer);
+
+mem_error:
+ xmlEntitiesErrMemory("xmlEncodeSpecialChars: realloc failed");
+ xmlFree(buffer);
+ return(NULL);
+}
+
+/**
+ * xmlCreateEntitiesTable:
+ *
+ * create and initialize an empty entities hash table.
+ * This really doesn't make sense and should be deprecated
+ *
+ * Returns the xmlEntitiesTablePtr just created or NULL in case of error.
+ */
+xmlEntitiesTablePtr
+xmlCreateEntitiesTable(void) {
+ return((xmlEntitiesTablePtr) xmlHashCreate(0));
+}
+
+/**
+ * xmlFreeEntityWrapper:
+ * @entity: An entity
+ * @name: its name
+ *
+ * Deallocate the memory used by an entities in the hash table.
+ */
+static void
+xmlFreeEntityWrapper(xmlEntityPtr entity,
+ const xmlChar *name ATTRIBUTE_UNUSED) {
+ if (entity != NULL)
+ xmlFreeEntity(entity);
+}
+
+/**
+ * xmlFreeEntitiesTable:
+ * @table: An entity table
+ *
+ * Deallocate the memory used by an entities hash table.
+ */
+void
+xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeEntityWrapper);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlCopyEntity:
+ * @ent: An entity
+ *
+ * Build a copy of an entity
+ *
+ * Returns the new xmlEntitiesPtr or NULL in case of error.
+ */
+static xmlEntityPtr
+xmlCopyEntity(xmlEntityPtr ent) {
+ xmlEntityPtr cur;
+
+ cur = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity));
+ if (cur == NULL) {
+ xmlEntitiesErrMemory("xmlCopyEntity:: malloc failed");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlEntity));
+ cur->type = XML_ENTITY_DECL;
+
+ cur->etype = ent->etype;
+ if (ent->name != NULL)
+ cur->name = xmlStrdup(ent->name);
+ if (ent->ExternalID != NULL)
+ cur->ExternalID = xmlStrdup(ent->ExternalID);
+ if (ent->SystemID != NULL)
+ cur->SystemID = xmlStrdup(ent->SystemID);
+ if (ent->content != NULL)
+ cur->content = xmlStrdup(ent->content);
+ if (ent->orig != NULL)
+ cur->orig = xmlStrdup(ent->orig);
+ if (ent->URI != NULL)
+ cur->URI = xmlStrdup(ent->URI);
+ return(cur);
+}
+
+/**
+ * xmlCopyEntitiesTable:
+ * @table: An entity table
+ *
+ * Build a copy of an entity table.
+ *
+ * Returns the new xmlEntitiesTablePtr or NULL in case of error.
+ */
+xmlEntitiesTablePtr
+xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
+ return(xmlHashCopy(table, (xmlHashCopier) xmlCopyEntity));
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+
+/**
+ * xmlDumpEntityContent:
+ * @buf: An XML buffer.
+ * @content: The entity content.
+ *
+ * This will dump the quoted string value, taking care of the special
+ * treatment required by %
+ */
+static void
+xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) {
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
+ if (xmlStrchr(content, '%')) {
+ const xmlChar * base, *cur;
+
+ xmlBufferCCat(buf, "\"");
+ base = cur = content;
+ while (*cur != 0) {
+ if (*cur == '"') {
+ if (base != cur)
+ xmlBufferAdd(buf, base, cur - base);
+ xmlBufferAdd(buf, BAD_CAST "&quot;", 6);
+ cur++;
+ base = cur;
+ } else if (*cur == '%') {
+ if (base != cur)
+ xmlBufferAdd(buf, base, cur - base);
+ xmlBufferAdd(buf, BAD_CAST "&#x25;", 6);
+ cur++;
+ base = cur;
+ } else {
+ cur++;
+ }
+ }
+ if (base != cur)
+ xmlBufferAdd(buf, base, cur - base);
+ xmlBufferCCat(buf, "\"");
+ } else {
+ xmlBufferWriteQuotedString(buf, content);
+ }
+}
+
+/**
+ * xmlDumpEntityDecl:
+ * @buf: An XML buffer.
+ * @ent: An entity table
+ *
+ * This will dump the content of the entity table as an XML DTD definition
+ */
+void
+xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) {
+ if ((buf == NULL) || (ent == NULL)) return;
+ switch (ent->etype) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ xmlBufferWriteChar(buf, "<!ENTITY ");
+ xmlBufferWriteCHAR(buf, ent->name);
+ xmlBufferWriteChar(buf, " ");
+ if (ent->orig != NULL)
+ xmlBufferWriteQuotedString(buf, ent->orig);
+ else
+ xmlDumpEntityContent(buf, ent->content);
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ xmlBufferWriteChar(buf, "<!ENTITY ");
+ xmlBufferWriteCHAR(buf, ent->name);
+ if (ent->ExternalID != NULL) {
+ xmlBufferWriteChar(buf, " PUBLIC ");
+ xmlBufferWriteQuotedString(buf, ent->ExternalID);
+ xmlBufferWriteChar(buf, " ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ } else {
+ xmlBufferWriteChar(buf, " SYSTEM ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ }
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ xmlBufferWriteChar(buf, "<!ENTITY ");
+ xmlBufferWriteCHAR(buf, ent->name);
+ if (ent->ExternalID != NULL) {
+ xmlBufferWriteChar(buf, " PUBLIC ");
+ xmlBufferWriteQuotedString(buf, ent->ExternalID);
+ xmlBufferWriteChar(buf, " ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ } else {
+ xmlBufferWriteChar(buf, " SYSTEM ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ }
+ if (ent->content != NULL) { /* Should be true ! */
+ xmlBufferWriteChar(buf, " NDATA ");
+ if (ent->orig != NULL)
+ xmlBufferWriteCHAR(buf, ent->orig);
+ else
+ xmlBufferWriteCHAR(buf, ent->content);
+ }
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ xmlBufferWriteChar(buf, "<!ENTITY % ");
+ xmlBufferWriteCHAR(buf, ent->name);
+ xmlBufferWriteChar(buf, " ");
+ if (ent->orig == NULL)
+ xmlDumpEntityContent(buf, ent->content);
+ else
+ xmlBufferWriteQuotedString(buf, ent->orig);
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ xmlBufferWriteChar(buf, "<!ENTITY % ");
+ xmlBufferWriteCHAR(buf, ent->name);
+ if (ent->ExternalID != NULL) {
+ xmlBufferWriteChar(buf, " PUBLIC ");
+ xmlBufferWriteQuotedString(buf, ent->ExternalID);
+ xmlBufferWriteChar(buf, " ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ } else {
+ xmlBufferWriteChar(buf, " SYSTEM ");
+ xmlBufferWriteQuotedString(buf, ent->SystemID);
+ }
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ default:
+ xmlEntitiesErr(XML_DTD_UNKNOWN_ENTITY,
+ "xmlDumpEntitiesDecl: internal: unknown type entity type");
+ }
+}
+
+/**
+ * xmlDumpEntityDeclScan:
+ * @ent: An entity table
+ * @buf: An XML buffer.
+ *
+ * When using the hash table scan function, arguments need to be reversed
+ */
+static void
+xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
+ xmlDumpEntityDecl(buf, ent);
+}
+
+/**
+ * xmlDumpEntitiesTable:
+ * @buf: An XML buffer.
+ * @table: An entity table
+ *
+ * This will dump the content of the entity table as an XML DTD definition
+ */
+void
+xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) {
+ xmlHashScan(table, (xmlHashScanner)xmlDumpEntityDeclScan, buf);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+#define bottom_entities
+#include "elfgcchack.h"
diff --git a/error.c b/error.c
new file mode 100644
index 0000000..cbcf5c9
--- /dev/null
+++ b/error.c
@@ -0,0 +1,996 @@
+/*
+ * error.c: module displaying/handling XML parser errors
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <stdarg.h>
+#include <libxml/parser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/globals.h>
+
+void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
+ const char *msg,
+ ...);
+
+#define XML_GET_VAR_STR(msg, str) { \
+ int size, prev_size = -1; \
+ int chars; \
+ char *larger; \
+ va_list ap; \
+ \
+ str = (char *) xmlMalloc(150); \
+ if (str != NULL) { \
+ \
+ size = 150; \
+ \
+ while (size < 64000) { \
+ va_start(ap, msg); \
+ chars = vsnprintf(str, size, msg, ap); \
+ va_end(ap); \
+ if ((chars > -1) && (chars < size)) { \
+ if (prev_size == chars) { \
+ break; \
+ } else { \
+ prev_size = chars; \
+ } \
+ } \
+ if (chars > -1) \
+ size += chars + 1; \
+ else \
+ size += 100; \
+ if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\
+ break; \
+ } \
+ str = larger; \
+ }} \
+}
+
+/************************************************************************
+ * *
+ * Handling of out of context errors *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlGenericErrorDefaultFunc:
+ * @ctx: an error context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Default handler for out of context error messages.
+ */
+void XMLCDECL
+xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+
+ if (xmlGenericErrorContext == NULL)
+ xmlGenericErrorContext = (void *) stderr;
+
+ va_start(args, msg);
+ vfprintf((FILE *)xmlGenericErrorContext, msg, args);
+ va_end(args);
+}
+
+/**
+ * initGenericErrorDefaultFunc:
+ * @handler: the handler
+ *
+ * Set or reset (if NULL) the default handler for generic errors
+ * to the builtin error function.
+ */
+void
+initGenericErrorDefaultFunc(xmlGenericErrorFunc * handler)
+{
+ if (handler == NULL)
+ xmlGenericError = xmlGenericErrorDefaultFunc;
+ else
+ xmlGenericError = (*handler);
+}
+
+/**
+ * xmlSetGenericErrorFunc:
+ * @ctx: the new error handling context
+ * @handler: the new handler function
+ *
+ * Function to reset the handler and the error context for out of
+ * context error messages.
+ * This simply means that @handler will be called for subsequent
+ * error messages while not parsing nor validating. And @ctx will
+ * be passed as first argument to @handler
+ * One can simply force messages to be emitted to another FILE * than
+ * stderr by setting @ctx to this file handle and @handler to NULL.
+ * For multi-threaded applications, this must be set separately for each thread.
+ */
+void
+xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
+ xmlGenericErrorContext = ctx;
+ if (handler != NULL)
+ xmlGenericError = handler;
+ else
+ xmlGenericError = xmlGenericErrorDefaultFunc;
+}
+
+/**
+ * xmlSetStructuredErrorFunc:
+ * @ctx: the new error handling context
+ * @handler: the new handler function
+ *
+ * Function to reset the handler and the error context for out of
+ * context structured error messages.
+ * This simply means that @handler will be called for subsequent
+ * error messages while not parsing nor validating. And @ctx will
+ * be passed as first argument to @handler
+ * For multi-threaded applications, this must be set separately for each thread.
+ */
+void
+xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
+ xmlStructuredErrorContext = ctx;
+ xmlStructuredError = handler;
+}
+
+/************************************************************************
+ * *
+ * Handling of parsing errors *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlParserPrintFileInfo:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays the associated file and line informations for the current input
+ */
+
+void
+xmlParserPrintFileInfo(xmlParserInputPtr input) {
+ if (input != NULL) {
+ if (input->filename)
+ xmlGenericError(xmlGenericErrorContext,
+ "%s:%d: ", input->filename,
+ input->line);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Entity: line %d: ", input->line);
+ }
+}
+
+/**
+ * xmlParserPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+
+static void
+xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
+ xmlGenericErrorFunc channel, void *data ) {
+ const xmlChar *cur, *base;
+ unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
+ xmlChar content[81]; /* space for 80 chars + line terminator */
+ xmlChar *ctnt;
+
+ if (input == NULL) return;
+ cur = input->cur;
+ base = input->base;
+ /* skip backwards over any end-of-lines */
+ while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
+ cur--;
+ }
+ n = 0;
+ /* search backwards for beginning-of-line (to max buff size) */
+ while ((n++ < (sizeof(content)-1)) && (cur > base) &&
+ (*(cur) != '\n') && (*(cur) != '\r'))
+ cur--;
+ if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ /* calculate the error position in terms of the current position */
+ col = input->cur - cur;
+ /* search forward for end-of-line (to max buff size) */
+ n = 0;
+ ctnt = content;
+ /* copy selected text to our buffer */
+ while ((*cur != 0) && (*(cur) != '\n') &&
+ (*(cur) != '\r') && (n < sizeof(content)-1)) {
+ *ctnt++ = *cur++;
+ n++;
+ }
+ *ctnt = 0;
+ /* print out the selected text */
+ channel(data ,"%s\n", content);
+ /* create blank line with problem pointer */
+ n = 0;
+ ctnt = content;
+ /* (leave buffer space for pointer + line terminator) */
+ while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
+ if (*(ctnt) != '\t')
+ *(ctnt) = ' ';
+ ctnt++;
+ }
+ *ctnt++ = '^';
+ *ctnt = 0;
+ channel(data ,"%s\n", content);
+}
+
+/**
+ * xmlParserPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+void
+xmlParserPrintFileContext(xmlParserInputPtr input) {
+ xmlParserPrintFileContextInternal(input, xmlGenericError,
+ xmlGenericErrorContext);
+}
+
+/**
+ * xmlReportError:
+ * @err: the error
+ * @ctx: the parser context or NULL
+ * @str: the formatted error message
+ *
+ * Report an erro with its context, replace the 4 old error/warning
+ * routines.
+ */
+static void
+xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
+ xmlGenericErrorFunc channel, void *data)
+{
+ char *file = NULL;
+ int line = 0;
+ int code = -1;
+ int domain;
+ const xmlChar *name = NULL;
+ xmlNodePtr node;
+ xmlErrorLevel level;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+
+ if (err == NULL)
+ return;
+
+ if (channel == NULL) {
+ channel = xmlGenericError;
+ data = xmlGenericErrorContext;
+ }
+ file = err->file;
+ line = err->line;
+ code = err->code;
+ domain = err->domain;
+ level = err->level;
+ node = err->node;
+
+ if (code == XML_ERR_OK)
+ return;
+
+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
+ name = node->name;
+
+ /*
+ * Maintain the compatibility with the legacy error handling
+ */
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ if (input != NULL) {
+ if (input->filename)
+ channel(data, "%s:%d: ", input->filename, input->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", input->line);
+ }
+ } else {
+ if (file != NULL)
+ channel(data, "%s:%d: ", file, line);
+ else if ((line != 0) &&
+ ((domain == XML_FROM_PARSER) || (domain == XML_FROM_SCHEMASV)||
+ (domain == XML_FROM_SCHEMASP)||(domain == XML_FROM_DTD) ||
+ (domain == XML_FROM_RELAXNGP)||(domain == XML_FROM_RELAXNGV)))
+ channel(data, "Entity: line %d: ", line);
+ }
+ if (name != NULL) {
+ channel(data, "element %s: ", name);
+ }
+ switch (domain) {
+ case XML_FROM_PARSER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_NAMESPACE:
+ channel(data, "namespace ");
+ break;
+ case XML_FROM_DTD:
+ case XML_FROM_VALID:
+ channel(data, "validity ");
+ break;
+ case XML_FROM_HTML:
+ channel(data, "HTML parser ");
+ break;
+ case XML_FROM_MEMORY:
+ channel(data, "memory ");
+ break;
+ case XML_FROM_OUTPUT:
+ channel(data, "output ");
+ break;
+ case XML_FROM_IO:
+ channel(data, "I/O ");
+ break;
+ case XML_FROM_XINCLUDE:
+ channel(data, "XInclude ");
+ break;
+ case XML_FROM_XPATH:
+ channel(data, "XPath ");
+ break;
+ case XML_FROM_XPOINTER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_REGEXP:
+ channel(data, "regexp ");
+ break;
+ case XML_FROM_MODULE:
+ channel(data, "module ");
+ break;
+ case XML_FROM_SCHEMASV:
+ channel(data, "Schemas validity ");
+ break;
+ case XML_FROM_SCHEMASP:
+ channel(data, "Schemas parser ");
+ break;
+ case XML_FROM_RELAXNGP:
+ channel(data, "Relax-NG parser ");
+ break;
+ case XML_FROM_RELAXNGV:
+ channel(data, "Relax-NG validity ");
+ break;
+ case XML_FROM_CATALOG:
+ channel(data, "Catalog ");
+ break;
+ case XML_FROM_C14N:
+ channel(data, "C14N ");
+ break;
+ case XML_FROM_XSLT:
+ channel(data, "XSLT ");
+ break;
+ case XML_FROM_I18N:
+ channel(data, "encoding ");
+ break;
+ case XML_FROM_SCHEMATRONV:
+ channel(data, "schematron ");
+ break;
+ case XML_FROM_BUFFER:
+ channel(data, "internal buffer ");
+ break;
+ case XML_FROM_URI:
+ channel(data, "URI ");
+ break;
+ default:
+ break;
+ }
+ switch (level) {
+ case XML_ERR_NONE:
+ channel(data, ": ");
+ break;
+ case XML_ERR_WARNING:
+ channel(data, "warning : ");
+ break;
+ case XML_ERR_ERROR:
+ channel(data, "error : ");
+ break;
+ case XML_ERR_FATAL:
+ channel(data, "error : ");
+ break;
+ }
+ if (str != NULL) {
+ int len;
+ len = xmlStrlen((const xmlChar *)str);
+ if ((len > 0) && (str[len - 1] != '\n'))
+ channel(data, "%s\n", str);
+ else
+ channel(data, "%s", str);
+ } else {
+ channel(data, "%s\n", "out of memory error");
+ }
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContextInternal(input, channel, data);
+ if (cur != NULL) {
+ if (cur->filename)
+ channel(data, "%s:%d: \n", cur->filename, cur->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: \n", cur->line);
+ xmlParserPrintFileContextInternal(cur, channel, data);
+ }
+ }
+ if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
+ (err->int1 < 100) &&
+ (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
+ xmlChar buf[150];
+ int i;
+
+ channel(data, "%s\n", err->str1);
+ for (i=0;i < err->int1;i++)
+ buf[i] = ' ';
+ buf[i++] = '^';
+ buf[i] = 0;
+ channel(data, "%s\n", buf);
+ }
+}
+
+/**
+ * __xmlRaiseError:
+ * @schannel: the structured callback channel
+ * @channel: the old callback channel
+ * @data: the callback data
+ * @ctx: the parser context or NULL
+ * @ctx: the parser context or NULL
+ * @domain: the domain for the error
+ * @code: the code for the error
+ * @level: the xmlErrorLevel for the error
+ * @file: the file source of the error (or NULL)
+ * @line: the line of the error or 0 if N/A
+ * @str1: extra string info
+ * @str2: extra string info
+ * @str3: extra string info
+ * @int1: extra int info
+ * @col: column number of the error or 0 if N/A
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Update the appropriate global or contextual error structure,
+ * then forward the error message down the parser or generic
+ * error callback handler
+ */
+void XMLCDECL
+__xmlRaiseError(xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel, void *data, void *ctx,
+ void *nod, int domain, int code, xmlErrorLevel level,
+ const char *file, int line, const char *str1,
+ const char *str2, const char *str3, int int1, int col,
+ const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = NULL;
+ xmlNodePtr node = (xmlNodePtr) nod;
+ char *str = NULL;
+ xmlParserInputPtr input = NULL;
+ xmlErrorPtr to = &xmlLastError;
+ xmlNodePtr baseptr = NULL;
+
+ if (code == XML_ERR_OK)
+ return;
+ if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))
+ return;
+ if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
+ (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
+ (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
+ ctxt = (xmlParserCtxtPtr) ctx;
+ if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
+ (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
+ (ctxt->sax->serror != NULL)) {
+ schannel = ctxt->sax->serror;
+ data = ctxt->userData;
+ }
+ }
+ /*
+ * Check if structured error handler set
+ */
+ if (schannel == NULL) {
+ schannel = xmlStructuredError;
+ /*
+ * if user has defined handler, change data ptr to user's choice
+ */
+ if (schannel != NULL)
+ data = xmlStructuredErrorContext;
+ }
+ /*
+ * Formatting the message
+ */
+ if (msg == NULL) {
+ str = (char *) xmlStrdup(BAD_CAST "No error message provided");
+ } else {
+ XML_GET_VAR_STR(msg, str);
+ }
+
+ /*
+ * specific processing if a parser context is provided
+ */
+ if (ctxt != NULL) {
+ if (file == NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ if (input != NULL) {
+ file = input->filename;
+ line = input->line;
+ col = input->col;
+ }
+ }
+ to = &ctxt->lastError;
+ } else if ((node != NULL) && (file == NULL)) {
+ int i;
+
+ if ((node->doc != NULL) && (node->doc->URL != NULL)) {
+ baseptr = node;
+/* file = (const char *) node->doc->URL; */
+ }
+ for (i = 0;
+ ((i < 10) && (node != NULL) && (node->type != XML_ELEMENT_NODE));
+ i++)
+ node = node->parent;
+ if ((baseptr == NULL) && (node != NULL) &&
+ (node->doc != NULL) && (node->doc->URL != NULL))
+ baseptr = node;
+
+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
+ line = node->line;
+ if ((line == 0) || (line == 65535))
+ line = xmlGetLineNo(node);
+ }
+
+ /*
+ * Save the information about the error
+ */
+ xmlResetError(to);
+ to->domain = domain;
+ to->code = code;
+ to->message = str;
+ to->level = level;
+ if (file != NULL)
+ to->file = (char *) xmlStrdup((const xmlChar *) file);
+ else if (baseptr != NULL) {
+#ifdef LIBXML_XINCLUDE_ENABLED
+ /*
+ * We check if the error is within an XInclude section and,
+ * if so, attempt to print out the href of the XInclude instead
+ * of the usual "base" (doc->URL) for the node (bug 152623).
+ */
+ xmlNodePtr prev = baseptr;
+ int inclcount = 0;
+ while (prev != NULL) {
+ if (prev->prev == NULL)
+ prev = prev->parent;
+ else {
+ prev = prev->prev;
+ if (prev->type == XML_XINCLUDE_START) {
+ if (--inclcount < 0)
+ break;
+ } else if (prev->type == XML_XINCLUDE_END)
+ inclcount++;
+ }
+ }
+ if (prev != NULL) {
+ if (prev->type == XML_XINCLUDE_START) {
+ prev->type = XML_ELEMENT_NODE;
+ to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
+ prev->type = XML_XINCLUDE_START;
+ } else {
+ to->file = (char *) xmlGetProp(prev, BAD_CAST "href");
+ }
+ } else
+#endif
+ to->file = (char *) xmlStrdup(baseptr->doc->URL);
+ if ((to->file == NULL) && (node != NULL) && (node->doc != NULL)) {
+ to->file = (char *) xmlStrdup(node->doc->URL);
+ }
+ }
+ to->line = line;
+ if (str1 != NULL)
+ to->str1 = (char *) xmlStrdup((const xmlChar *) str1);
+ if (str2 != NULL)
+ to->str2 = (char *) xmlStrdup((const xmlChar *) str2);
+ if (str3 != NULL)
+ to->str3 = (char *) xmlStrdup((const xmlChar *) str3);
+ to->int1 = int1;
+ to->int2 = col;
+ to->node = node;
+ to->ctxt = ctx;
+
+ if (to != &xmlLastError)
+ xmlCopyError(to,&xmlLastError);
+
+ if (schannel != NULL) {
+ schannel(data, to);
+ return;
+ }
+
+ /*
+ * Find the callback channel if channel param is NULL
+ */
+ if ((ctxt != NULL) && (channel == NULL) &&
+ (xmlStructuredError == NULL) && (ctxt->sax != NULL)) {
+ if (level == XML_ERR_WARNING)
+ channel = ctxt->sax->warning;
+ else
+ channel = ctxt->sax->error;
+ data = ctxt->userData;
+ } else if (channel == NULL) {
+ channel = xmlGenericError;
+ if (ctxt != NULL) {
+ data = ctxt;
+ } else {
+ data = xmlGenericErrorContext;
+ }
+ }
+ if (channel == NULL)
+ return;
+
+ if ((channel == xmlParserError) ||
+ (channel == xmlParserWarning) ||
+ (channel == xmlParserValidityError) ||
+ (channel == xmlParserValidityWarning))
+ xmlReportError(to, ctxt, str, NULL, NULL);
+ else if ((channel == (xmlGenericErrorFunc) fprintf) ||
+ (channel == xmlGenericErrorDefaultFunc))
+ xmlReportError(to, ctxt, str, channel, data);
+ else
+ channel(data, "%s", str);
+}
+
+/**
+ * __xmlSimpleError:
+ * @domain: where the error comes from
+ * @code: the error code
+ * @node: the context node
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+void
+__xmlSimpleError(int domain, int code, xmlNodePtr node,
+ const char *msg, const char *extra)
+{
+
+ if (code == XML_ERR_NO_MEMORY) {
+ if (extra)
+ __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "Memory allocation failed\n");
+ } else {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, node, domain,
+ code, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0, msg, extra);
+ }
+}
+/**
+ * xmlParserError:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, gives file, line, position and
+ * extra parameters.
+ */
+void XMLCDECL
+xmlParserError(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+ char * str;
+
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ xmlParserPrintFileInfo(input);
+ }
+
+ xmlGenericError(xmlGenericErrorContext, "error: ");
+ XML_GET_VAR_STR(msg, str);
+ xmlGenericError(xmlGenericErrorContext, "%s", str);
+ if (str != NULL)
+ xmlFree(str);
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContext(input);
+ if (cur != NULL) {
+ xmlParserPrintFileInfo(cur);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+ xmlParserPrintFileContext(cur);
+ }
+ }
+}
+
+/**
+ * xmlParserWarning:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+void XMLCDECL
+xmlParserWarning(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+ char * str;
+
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ xmlParserPrintFileInfo(input);
+ }
+
+ xmlGenericError(xmlGenericErrorContext, "warning: ");
+ XML_GET_VAR_STR(msg, str);
+ xmlGenericError(xmlGenericErrorContext, "%s", str);
+ if (str != NULL)
+ xmlFree(str);
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContext(input);
+ if (cur != NULL) {
+ xmlParserPrintFileInfo(cur);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+ xmlParserPrintFileContext(cur);
+ }
+ }
+}
+
+/************************************************************************
+ * *
+ * Handling of validation errors *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlParserValidityError:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an validity error messages, gives file,
+ * line, position and extra parameters.
+ */
+void XMLCDECL
+xmlParserValidityError(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input = NULL;
+ char * str;
+ int len = xmlStrlen((const xmlChar *) msg);
+ static int had_info = 0;
+
+ if ((len > 1) && (msg[len - 2] != ':')) {
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input->filename == NULL) && (ctxt->inputNr > 1))
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+
+ if (had_info == 0) {
+ xmlParserPrintFileInfo(input);
+ }
+ }
+ xmlGenericError(xmlGenericErrorContext, "validity error: ");
+ had_info = 0;
+ } else {
+ had_info = 1;
+ }
+
+ XML_GET_VAR_STR(msg, str);
+ xmlGenericError(xmlGenericErrorContext, "%s", str);
+ if (str != NULL)
+ xmlFree(str);
+
+ if ((ctxt != NULL) && (input != NULL)) {
+ xmlParserPrintFileContext(input);
+ }
+}
+
+/**
+ * xmlParserValidityWarning:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a validity warning messages, gives file, line,
+ * position and extra parameters.
+ */
+void XMLCDECL
+xmlParserValidityWarning(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input = NULL;
+ char * str;
+ int len = xmlStrlen((const xmlChar *) msg);
+
+ if ((ctxt != NULL) && (len != 0) && (msg[len - 1] != ':')) {
+ input = ctxt->input;
+ if ((input->filename == NULL) && (ctxt->inputNr > 1))
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+
+ xmlParserPrintFileInfo(input);
+ }
+
+ xmlGenericError(xmlGenericErrorContext, "validity warning: ");
+ XML_GET_VAR_STR(msg, str);
+ xmlGenericError(xmlGenericErrorContext, "%s", str);
+ if (str != NULL)
+ xmlFree(str);
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContext(input);
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Extended Error Handling *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlGetLastError:
+ *
+ * Get the last global error registered. This is per thread if compiled
+ * with thread support.
+ *
+ * Returns NULL if no error occured or a pointer to the error
+ */
+xmlErrorPtr
+xmlGetLastError(void)
+{
+ if (xmlLastError.code == XML_ERR_OK)
+ return (NULL);
+ return (&xmlLastError);
+}
+
+/**
+ * xmlResetError:
+ * @err: pointer to the error.
+ *
+ * Cleanup the error.
+ */
+void
+xmlResetError(xmlErrorPtr err)
+{
+ if (err == NULL)
+ return;
+ if (err->code == XML_ERR_OK)
+ return;
+ if (err->message != NULL)
+ xmlFree(err->message);
+ if (err->file != NULL)
+ xmlFree(err->file);
+ if (err->str1 != NULL)
+ xmlFree(err->str1);
+ if (err->str2 != NULL)
+ xmlFree(err->str2);
+ if (err->str3 != NULL)
+ xmlFree(err->str3);
+ memset(err, 0, sizeof(xmlError));
+ err->code = XML_ERR_OK;
+}
+
+/**
+ * xmlResetLastError:
+ *
+ * Cleanup the last global error registered. For parsing error
+ * this does not change the well-formedness result.
+ */
+void
+xmlResetLastError(void)
+{
+ if (xmlLastError.code == XML_ERR_OK)
+ return;
+ xmlResetError(&xmlLastError);
+}
+
+/**
+ * xmlCtxtGetLastError:
+ * @ctx: an XML parser context
+ *
+ * Get the last parsing error registered.
+ *
+ * Returns NULL if no error occured or a pointer to the error
+ */
+xmlErrorPtr
+xmlCtxtGetLastError(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+
+ if (ctxt == NULL)
+ return (NULL);
+ if (ctxt->lastError.code == XML_ERR_OK)
+ return (NULL);
+ return (&ctxt->lastError);
+}
+
+/**
+ * xmlCtxtResetLastError:
+ * @ctx: an XML parser context
+ *
+ * Cleanup the last global error registered. For parsing error
+ * this does not change the well-formedness result.
+ */
+void
+xmlCtxtResetLastError(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+
+ if (ctxt == NULL)
+ return;
+ ctxt->errNo = XML_ERR_OK;
+ if (ctxt->lastError.code == XML_ERR_OK)
+ return;
+ xmlResetError(&ctxt->lastError);
+}
+
+/**
+ * xmlCopyError:
+ * @from: a source error
+ * @to: a target error
+ *
+ * Save the original error to the new place.
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlCopyError(xmlErrorPtr from, xmlErrorPtr to) {
+ char *message, *file, *str1, *str2, *str3;
+
+ if ((from == NULL) || (to == NULL))
+ return(-1);
+
+ message = (char *) xmlStrdup((xmlChar *) from->message);
+ file = (char *) xmlStrdup ((xmlChar *) from->file);
+ str1 = (char *) xmlStrdup ((xmlChar *) from->str1);
+ str2 = (char *) xmlStrdup ((xmlChar *) from->str2);
+ str3 = (char *) xmlStrdup ((xmlChar *) from->str3);
+
+ if (to->message != NULL)
+ xmlFree(to->message);
+ if (to->file != NULL)
+ xmlFree(to->file);
+ if (to->str1 != NULL)
+ xmlFree(to->str1);
+ if (to->str2 != NULL)
+ xmlFree(to->str2);
+ if (to->str3 != NULL)
+ xmlFree(to->str3);
+ to->domain = from->domain;
+ to->code = from->code;
+ to->level = from->level;
+ to->line = from->line;
+ to->node = from->node;
+ to->int1 = from->int1;
+ to->int2 = from->int2;
+ to->node = from->node;
+ to->ctxt = from->ctxt;
+ to->message = message;
+ to->file = file;
+ to->str1 = str1;
+ to->str2 = str2;
+ to->str3 = str3;
+
+ return 0;
+}
+
+#define bottom_error
+#include "elfgcchack.h"
diff --git a/example/Makefile.am b/example/Makefile.am
new file mode 100644
index 0000000..488ee6e
--- /dev/null
+++ b/example/Makefile.am
@@ -0,0 +1,7 @@
+noinst_PROGRAMS = gjobread
+
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
+LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD)
+
+gjobread_SOURCES=gjobread.c
diff --git a/example/Makefile.in b/example/Makefile.in
new file mode 100644
index 0000000..dea6d65
--- /dev/null
+++ b/example/Makefile.in
@@ -0,0 +1,692 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = gjobread$(EXEEXT)
+subdir = example
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_gjobread_OBJECTS = gjobread.$(OBJEXT)
+gjobread_OBJECTS = $(am_gjobread_OBJECTS)
+gjobread_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+gjobread_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(top_builddir)/libxml2.la $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(gjobread_SOURCES)
+DIST_SOURCES = $(gjobread_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/include
+AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS)
+LDADD = $(RDL_LIBS) $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(ICONV_LIBS) -lm $(WIN32_EXTRA_LIBADD)
+gjobread_SOURCES = gjobread.c
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu example/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+gjobread$(EXEEXT): $(gjobread_OBJECTS) $(gjobread_DEPENDENCIES) $(EXTRA_gjobread_DEPENDENCIES)
+ @rm -f gjobread$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(gjobread_OBJECTS) $(gjobread_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gjobread.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/example/gjobread.c b/example/gjobread.c
new file mode 100644
index 0000000..d3f6d57
--- /dev/null
+++ b/example/gjobread.c
@@ -0,0 +1,309 @@
+/*
+ * gjobread.c : a small test program for gnome jobs XML format
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel.Veillard@w3.org
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+/*
+ * This example should compile and run indifferently with libxml-1.8.8 +
+ * and libxml2-2.1.0 +
+ * Check the COMPAT comments below
+ */
+
+/*
+ * COMPAT using xml-config --cflags to get the include path this will
+ * work with both
+ */
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+
+#define DEBUG(x) printf(x)
+
+/*
+ * A person record
+ * an xmlChar * is really an UTF8 encoded char string (0 terminated)
+ */
+typedef struct person {
+ xmlChar *name;
+ xmlChar *email;
+ xmlChar *company;
+ xmlChar *organisation;
+ xmlChar *smail;
+ xmlChar *webPage;
+ xmlChar *phone;
+} person, *personPtr;
+
+/*
+ * And the code needed to parse it
+ */
+static personPtr
+parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ personPtr ret = NULL;
+
+DEBUG("parsePerson\n");
+ /*
+ * allocate the struct
+ */
+ ret = (personPtr) malloc(sizeof(person));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(person));
+
+ /* We don't care what the top level element name is */
+ /* COMPAT xmlChildrenNode is a macro unifying libxml1 and libxml2 names */
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"Person")) &&
+ (cur->ns == ns))
+ ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!xmlStrcmp(cur->name, (const xmlChar *)"Email")) &&
+ (cur->ns == ns))
+ ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ cur = cur->next;
+ }
+
+ return(ret);
+}
+
+/*
+ * and to print it
+ */
+static void
+printPerson(personPtr cur) {
+ if (cur == NULL) return;
+ printf("------ Person\n");
+ if (cur->name) printf(" name: %s\n", cur->name);
+ if (cur->email) printf(" email: %s\n", cur->email);
+ if (cur->company) printf(" company: %s\n", cur->company);
+ if (cur->organisation) printf(" organisation: %s\n", cur->organisation);
+ if (cur->smail) printf(" smail: %s\n", cur->smail);
+ if (cur->webPage) printf(" Web: %s\n", cur->webPage);
+ if (cur->phone) printf(" phone: %s\n", cur->phone);
+ printf("------\n");
+}
+
+/*
+ * a Description for a Job
+ */
+typedef struct job {
+ xmlChar *projectID;
+ xmlChar *application;
+ xmlChar *category;
+ personPtr contact;
+ int nbDevelopers;
+ personPtr developers[100]; /* using dynamic alloc is left as an exercise */
+} job, *jobPtr;
+
+/*
+ * And the code needed to parse it
+ */
+static jobPtr
+parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) {
+ jobPtr ret = NULL;
+
+DEBUG("parseJob\n");
+ /*
+ * allocate the struct
+ */
+ ret = (jobPtr) malloc(sizeof(job));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(job));
+
+ /* We don't care what the top level element name is */
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+
+ if ((!xmlStrcmp(cur->name, (const xmlChar *) "Project")) &&
+ (cur->ns == ns)) {
+ ret->projectID = xmlGetProp(cur, (const xmlChar *) "ID");
+ if (ret->projectID == NULL) {
+ fprintf(stderr, "Project has no ID\n");
+ }
+ }
+ if ((!xmlStrcmp(cur->name, (const xmlChar *) "Application")) &&
+ (cur->ns == ns))
+ ret->application =
+ xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!xmlStrcmp(cur->name, (const xmlChar *) "Category")) &&
+ (cur->ns == ns))
+ ret->category =
+ xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!xmlStrcmp(cur->name, (const xmlChar *) "Contact")) &&
+ (cur->ns == ns))
+ ret->contact = parsePerson(doc, ns, cur);
+ cur = cur->next;
+ }
+
+ return(ret);
+}
+
+/*
+ * and to print it
+ */
+static void
+printJob(jobPtr cur) {
+ int i;
+
+ if (cur == NULL) return;
+ printf("======= Job\n");
+ if (cur->projectID != NULL) printf("projectID: %s\n", cur->projectID);
+ if (cur->application != NULL) printf("application: %s\n", cur->application);
+ if (cur->category != NULL) printf("category: %s\n", cur->category);
+ if (cur->contact != NULL) printPerson(cur->contact);
+ printf("%d developers\n", cur->nbDevelopers);
+
+ for (i = 0;i < cur->nbDevelopers;i++) printPerson(cur->developers[i]);
+ printf("======= \n");
+}
+
+/*
+ * A pool of Gnome Jobs
+ */
+typedef struct gjob {
+ int nbJobs;
+ jobPtr jobs[500]; /* using dynamic alloc is left as an exercise */
+} gJob, *gJobPtr;
+
+
+static gJobPtr
+parseGjobFile(char *filename) {
+ xmlDocPtr doc;
+ gJobPtr ret;
+ jobPtr curjob;
+ xmlNsPtr ns;
+ xmlNodePtr cur;
+
+#ifdef LIBXML_SAX1_ENABLED
+ /*
+ * build an XML tree from a the file;
+ */
+ doc = xmlParseFile(filename);
+ if (doc == NULL) return(NULL);
+#else
+ /*
+ * the library has been compiled without some of the old interfaces
+ */
+ return(NULL);
+#endif /* LIBXML_SAX1_ENABLED */
+
+ /*
+ * Check the document is of the right kind
+ */
+
+ cur = xmlDocGetRootElement(doc);
+ if (cur == NULL) {
+ fprintf(stderr,"empty document\n");
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ ns = xmlSearchNsByHref(doc, cur,
+ (const xmlChar *) "http://www.gnome.org/some-location");
+ if (ns == NULL) {
+ fprintf(stderr,
+ "document of the wrong type, GJob Namespace not found\n");
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ if (xmlStrcmp(cur->name, (const xmlChar *) "Helping")) {
+ fprintf(stderr,"document of the wrong type, root node != Helping");
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ /*
+ * Allocate the structure to be returned.
+ */
+ ret = (gJobPtr) malloc(sizeof(gJob));
+ if (ret == NULL) {
+ fprintf(stderr,"out of memory\n");
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(gJob));
+
+ /*
+ * Now, walk the tree.
+ */
+ /* First level we expect just Jobs */
+ cur = cur->xmlChildrenNode;
+ while ( cur && xmlIsBlankNode ( cur ) ) {
+ cur = cur -> next;
+ }
+ if ( cur == 0 ) {
+ xmlFreeDoc(doc);
+ free(ret);
+ return ( NULL );
+ }
+ if ((xmlStrcmp(cur->name, (const xmlChar *) "Jobs")) || (cur->ns != ns)) {
+ fprintf(stderr,"document of the wrong type, was '%s', Jobs expected",
+ cur->name);
+ fprintf(stderr,"xmlDocDump follows\n");
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlDocDump ( stderr, doc );
+ fprintf(stderr,"xmlDocDump finished\n");
+#endif /* LIBXML_OUTPUT_ENABLED */
+ xmlFreeDoc(doc);
+ free(ret);
+ return(NULL);
+ }
+
+ /* Second level is a list of Job, but be laxist */
+ cur = cur->xmlChildrenNode;
+ while (cur != NULL) {
+ if ((!xmlStrcmp(cur->name, (const xmlChar *) "Job")) &&
+ (cur->ns == ns)) {
+ curjob = parseJob(doc, ns, cur);
+ if (curjob != NULL)
+ ret->jobs[ret->nbJobs++] = curjob;
+ if (ret->nbJobs >= 500) break;
+ }
+ cur = cur->next;
+ }
+
+ return(ret);
+}
+
+static void
+handleGjob(gJobPtr cur) {
+ int i;
+
+ /*
+ * Do whatever you want and free the structure.
+ */
+ printf("%d Jobs registered\n", cur->nbJobs);
+ for (i = 0; i < cur->nbJobs; i++) printJob(cur->jobs[i]);
+}
+
+int main(int argc, char **argv) {
+ int i;
+ gJobPtr cur;
+
+ /* COMPAT: Do not genrate nodes for formatting spaces */
+ LIBXML_TEST_VERSION
+ xmlKeepBlanksDefault(0);
+
+ for (i = 1; i < argc ; i++) {
+ cur = parseGjobFile(argv[i]);
+ if ( cur )
+ handleGjob(cur);
+ else
+ fprintf( stderr, "Error parsing file '%s'\n", argv[i]);
+
+ }
+
+ /* Clean up everything else before quitting. */
+ xmlCleanupParser();
+
+ return(0);
+}
diff --git a/example/gjobs.xml b/example/gjobs.xml
new file mode 100644
index 0000000..8372976
--- /dev/null
+++ b/example/gjobs.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location">
+ <gjob:Jobs>
+
+ <gjob:Job>
+ <gjob:Project ID="3"/>
+ <gjob:Application>GBackup</gjob:Application>
+ <gjob:Category>Development</gjob:Category>
+
+ <gjob:Update>
+ <gjob:Status>Open</gjob:Status>
+ <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified>
+ <gjob:Salary>USD 0.00</gjob:Salary>
+ </gjob:Update>
+
+ <gjob:Developers>
+ <gjob:Developer>
+ </gjob:Developer>
+ </gjob:Developers>
+
+ <gjob:Contact>
+ <gjob:Person>Nathan Clemons</gjob:Person>
+ <gjob:Email>nathan@windsofstorm.net</gjob:Email>
+ <gjob:Company>
+ </gjob:Company>
+ <gjob:Organisation>
+ </gjob:Organisation>
+ <gjob:Webpage>
+ </gjob:Webpage>
+ <gjob:Snailmail>
+ </gjob:Snailmail>
+ <gjob:Phone>
+ </gjob:Phone>
+ </gjob:Contact>
+
+ <gjob:Requirements>
+ The program should be released as free software, under the GPL.
+ </gjob:Requirements>
+
+ <gjob:Skills>
+ </gjob:Skills>
+
+ <gjob:Details>
+ A GNOME based system that will allow a superuser to configure
+ compressed and uncompressed files and/or file systems to be backed
+ up with a supported media in the system. This should be able to
+ perform via find commands generating a list of files that are passed
+ to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine
+ or via operations performed on the filesystem itself. Email
+ notification and GUI status display very important.
+ </gjob:Details>
+
+ </gjob:Job>
+
+ </gjob:Jobs>
+</gjob:Helping>
+
diff --git a/genUnicode.py b/genUnicode.py
new file mode 100755
index 0000000..56e4e9b
--- /dev/null
+++ b/genUnicode.py
@@ -0,0 +1,478 @@
+#!/usr/bin/python -u
+#
+# Original script modified in November 2003 to take advantage of
+# the character-validation range routines, and updated to the
+# current Unicode information (Version 4.0.1)
+#
+# NOTE: there is an 'alias' facility for blocks which are not present in
+# the current release, but are needed for ABI compatibility. This
+# must be accomplished MANUALLY! Please see the comments below under
+# 'blockAliases'
+#
+import sys
+import string
+import time
+
+webpage = "http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html"
+sources = "Blocks-4.0.1.txt UnicodeData-4.0.1.txt"
+
+#
+# blockAliases is a small hack - it is used for mapping block names which
+# were were used in the 3.1 release, but are missing or changed in the current
+# release. The format is "OldBlockName:NewBlockName1[,NewBlockName2[,...]]"
+blockAliases = []
+blockAliases.append("CombiningMarksforSymbols:CombiningDiacriticalMarksforSymbols")
+blockAliases.append("Greek:GreekandCoptic")
+blockAliases.append("PrivateUse:PrivateUseArea,SupplementaryPrivateUseArea-A," +
+ "SupplementaryPrivateUseArea-B")
+
+# minTableSize gives the minimum number of ranges which must be present
+# before a range table is produced. If there are less than this
+# number, inline comparisons are generated
+minTableSize = 8
+
+(blockfile, catfile) = string.split(sources)
+
+
+#
+# Now process the "blocks" file, reducing it to a dictionary
+# indexed by blockname, containing a tuple with the applicable
+# block range
+#
+BlockNames = {}
+try:
+ blocks = open(blockfile, "r")
+except:
+ print "Missing %s, aborting ..." % blockfile
+ sys.exit(1)
+
+for line in blocks.readlines():
+ if line[0] == '#':
+ continue
+ line = string.strip(line)
+ if line == '':
+ continue
+ try:
+ fields = string.split(line, ';')
+ range = string.strip(fields[0])
+ (start, end) = string.split(range, "..")
+ name = string.strip(fields[1])
+ name = string.replace(name, ' ', '')
+ except:
+ print "Failed to process line: %s" % (line)
+ continue
+ start = "0x" + start
+ end = "0x" + end
+ try:
+ BlockNames[name].append((start, end))
+ except:
+ BlockNames[name] = [(start, end)]
+blocks.close()
+print "Parsed %d blocks descriptions" % (len(BlockNames.keys()))
+
+for block in blockAliases:
+ alias = string.split(block,':')
+ alist = string.split(alias[1],',')
+ for comp in alist:
+ if BlockNames.has_key(comp):
+ if alias[0] not in BlockNames:
+ BlockNames[alias[0]] = []
+ for r in BlockNames[comp]:
+ BlockNames[alias[0]].append(r)
+ else:
+ print "Alias %s: %s not in Blocks" % (alias[0], comp)
+ continue
+
+#
+# Next process the Categories file. This is more complex, since
+# the file is in code sequence, and we need to invert it. We use
+# a dictionary with index category-name, with each entry containing
+# all the ranges (codepoints) of that category. Note that category
+# names comprise two parts - the general category, and the "subclass"
+# within that category. Therefore, both "general category" (which is
+# the first character of the 2-character category-name) and the full
+# (2-character) name are entered into this dictionary.
+#
+try:
+ data = open(catfile, "r")
+except:
+ print "Missing %s, aborting ..." % catfile
+ sys.exit(1)
+
+nbchar = 0;
+Categories = {}
+for line in data.readlines():
+ if line[0] == '#':
+ continue
+ line = string.strip(line)
+ if line == '':
+ continue
+ try:
+ fields = string.split(line, ';')
+ point = string.strip(fields[0])
+ value = 0
+ while point != '':
+ value = value * 16
+ if point[0] >= '0' and point[0] <= '9':
+ value = value + ord(point[0]) - ord('0')
+ elif point[0] >= 'A' and point[0] <= 'F':
+ value = value + 10 + ord(point[0]) - ord('A')
+ elif point[0] >= 'a' and point[0] <= 'f':
+ value = value + 10 + ord(point[0]) - ord('a')
+ point = point[1:]
+ name = fields[2]
+ except:
+ print "Failed to process line: %s" % (line)
+ continue
+
+ nbchar = nbchar + 1
+ # update entry for "full name"
+ try:
+ Categories[name].append(value)
+ except:
+ try:
+ Categories[name] = [value]
+ except:
+ print "Failed to process line: %s" % (line)
+ # update "general category" name
+ try:
+ Categories[name[0]].append(value)
+ except:
+ try:
+ Categories[name[0]] = [value]
+ except:
+ print "Failed to process line: %s" % (line)
+
+blocks.close()
+print "Parsed %d char generating %d categories" % (nbchar, len(Categories.keys()))
+
+#
+# The data is now all read. Time to process it into a more useful form.
+#
+# reduce the number list into ranges
+for cat in Categories.keys():
+ list = Categories[cat]
+ start = -1
+ prev = -1
+ end = -1
+ ranges = []
+ for val in list:
+ if start == -1:
+ start = val
+ prev = val
+ continue
+ elif val == prev + 1:
+ prev = val
+ continue
+ elif prev == start:
+ ranges.append((prev, prev))
+ start = val
+ prev = val
+ continue
+ else:
+ ranges.append((start, prev))
+ start = val
+ prev = val
+ continue
+ if prev == start:
+ ranges.append((prev, prev))
+ else:
+ ranges.append((start, prev))
+ Categories[cat] = ranges
+
+#
+# Assure all data is in alphabetic order, since we will be doing binary
+# searches on the tables.
+#
+bkeys = BlockNames.keys()
+bkeys.sort()
+
+ckeys = Categories.keys()
+ckeys.sort()
+
+#
+# Generate the resulting files
+#
+try:
+ header = open("include/libxml/xmlunicode.h", "w")
+except:
+ print "Failed to open include/libxml/xmlunicode.h"
+ sys.exit(1)
+
+try:
+ output = open("xmlunicode.c", "w")
+except:
+ print "Failed to open xmlunicode.c"
+ sys.exit(1)
+
+date = time.asctime(time.localtime(time.time()))
+
+header.write(
+"""/*
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * %s
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: %s
+ * Sources: %s
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_UNICODE_H__
+#define __XML_UNICODE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+""" % (webpage, date, sources));
+
+output.write(
+"""/*
+ * xmlunicode.c: this module implements the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * %s
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: %s
+ * Sources: %s
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#include <string.h>
+#include <libxml/xmlversion.h>
+#include <libxml/xmlunicode.h>
+#include <libxml/chvalid.h>
+
+typedef int (xmlIntFunc)(int); /* just to keep one's mind untwisted */
+
+typedef struct {
+ const char *rangename;
+ xmlIntFunc *func;
+} xmlUnicodeRange;
+
+typedef struct {
+ xmlUnicodeRange *table;
+ int numentries;
+} xmlUnicodeNameTable;
+
+
+static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname);
+
+static xmlUnicodeRange xmlUnicodeBlocks[] = {
+""" % (webpage, date, sources));
+
+flag = 0
+for block in bkeys:
+ name = string.replace(block, '-', '')
+ if flag:
+ output.write(',\n')
+ else:
+ flag = 1
+ output.write(' {"%s", xmlUCSIs%s}' % (block, name))
+output.write('};\n\n')
+
+output.write('static xmlUnicodeRange xmlUnicodeCats[] = {\n')
+flag = 0;
+for name in ckeys:
+ if flag:
+ output.write(',\n')
+ else:
+ flag = 1
+ output.write(' {"%s", xmlUCSIsCat%s}' % (name, name))
+output.write('};\n\n')
+
+#
+# For any categories with more than minTableSize ranges we generate
+# a range table suitable for xmlCharInRange
+#
+for name in ckeys:
+ if len(Categories[name]) > minTableSize:
+ numshort = 0
+ numlong = 0
+ ranges = Categories[name]
+ sptr = "NULL"
+ lptr = "NULL"
+ for range in ranges:
+ (low, high) = range
+ if high < 0x10000:
+ if numshort == 0:
+ pline = "static const xmlChSRange xml%sS[] = {" % name
+ sptr = "xml%sS" % name
+ else:
+ pline += ", "
+ numshort += 1
+ else:
+ if numlong == 0:
+ if numshort > 0:
+ output.write(pline + " };\n")
+ pline = "static const xmlChLRange xml%sL[] = {" % name
+ lptr = "xml%sL" % name
+ else:
+ pline += ", "
+ numlong += 1
+ if len(pline) > 60:
+ output.write(pline + "\n")
+ pline = " "
+ pline += "{%s, %s}" % (hex(low), hex(high))
+ output.write(pline + " };\nstatic xmlChRangeGroup xml%sG = {%s,%s,%s,%s};\n\n"
+ % (name, numshort, numlong, sptr, lptr))
+
+
+output.write(
+"""static xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, %s};
+static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, %s};
+
+/**
+ * xmlUnicodeLookup:
+ * @tptr: pointer to the name table
+ * @name: name to be found
+ *
+ * binary table lookup for user-supplied name
+ *
+ * Returns pointer to range function if found, otherwise NULL
+ */
+static xmlIntFunc
+*xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) {
+ int low, high, mid, cmp;
+ xmlUnicodeRange *sptr;
+
+ if ((tptr == NULL) || (tname == NULL)) return(NULL);
+
+ low = 0;
+ high = tptr->numentries - 1;
+ sptr = tptr->table;
+ while (low <= high) {
+ mid = (low + high) / 2;
+ if ((cmp=strcmp(tname, sptr[mid].rangename)) == 0)
+ return (sptr[mid].func);
+ if (cmp < 0)
+ high = mid - 1;
+ else
+ low = mid + 1;
+ }
+ return (NULL);
+}
+
+""" % (len(BlockNames), len(Categories)) )
+
+for block in bkeys:
+ name = string.replace(block, '-', '')
+ header.write("XMLPUBFUN int XMLCALL xmlUCSIs%s\t(int code);\n" % name)
+ output.write("/**\n * xmlUCSIs%s:\n * @code: UCS code point\n" % (name))
+ output.write(" *\n * Check whether the character is part of %s UCS Block\n"%
+ (block))
+ output.write(" *\n * Returns 1 if true 0 otherwise\n */\n");
+ output.write("int\nxmlUCSIs%s(int code) {\n return(" % name)
+ flag = 0
+ for (start, end) in BlockNames[block]:
+ if flag:
+ output.write(" ||\n ")
+ else:
+ flag = 1
+ output.write("((code >= %s) && (code <= %s))" % (start, end))
+ output.write(");\n}\n\n")
+
+header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsBlock\t(int code, const char *block);\n\n")
+output.write(
+"""/**
+ * xmlUCSIsBlock:
+ * @code: UCS code point
+ * @block: UCS block name
+ *
+ * Check whether the character is part of the UCS Block
+ *
+ * Returns 1 if true, 0 if false and -1 on unknown block
+ */
+int
+xmlUCSIsBlock(int code, const char *block) {
+ xmlIntFunc *func;
+
+ func = xmlUnicodeLookup(&xmlUnicodeBlockTbl, block);
+ if (func == NULL)
+ return (-1);
+ return (func(code));
+}
+
+""")
+
+for name in ckeys:
+ ranges = Categories[name]
+ header.write("XMLPUBFUN int XMLCALL xmlUCSIsCat%s\t(int code);\n" % name)
+ output.write("/**\n * xmlUCSIsCat%s:\n * @code: UCS code point\n" % (name))
+ output.write(" *\n * Check whether the character is part of %s UCS Category\n"%
+ (name))
+ output.write(" *\n * Returns 1 if true 0 otherwise\n */\n");
+ output.write("int\nxmlUCSIsCat%s(int code) {\n" % name)
+ if len(Categories[name]) > minTableSize:
+ output.write(" return(xmlCharInRange((unsigned int)code, &xml%sG)"
+ % name)
+ else:
+ start = 1
+ for range in ranges:
+ (begin, end) = range;
+ if start:
+ output.write(" return(");
+ start = 0
+ else:
+ output.write(" ||\n ");
+ if (begin == end):
+ output.write("(code == %s)" % (hex(begin)))
+ else:
+ output.write("((code >= %s) && (code <= %s))" % (
+ hex(begin), hex(end)))
+ output.write(");\n}\n\n")
+
+header.write("\nXMLPUBFUN int XMLCALL xmlUCSIsCat\t(int code, const char *cat);\n")
+output.write(
+"""/**
+ * xmlUCSIsCat:
+ * @code: UCS code point
+ * @cat: UCS Category name
+ *
+ * Check whether the character is part of the UCS Category
+ *
+ * Returns 1 if true, 0 if false and -1 on unknown category
+ */
+int
+xmlUCSIsCat(int code, const char *cat) {
+ xmlIntFunc *func;
+
+ func = xmlUnicodeLookup(&xmlUnicodeCatTbl, cat);
+ if (func == NULL)
+ return (-1);
+ return (func(code));
+}
+
+#define bottom_xmlunicode
+#include "elfgcchack.h"
+#endif /* LIBXML_UNICODE_ENABLED */
+""")
+
+header.write("""
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_UNICODE_ENABLED */
+
+#endif /* __XML_UNICODE_H__ */
+""");
+
+header.close()
+output.close()
diff --git a/gentest.py b/gentest.py
new file mode 100755
index 0000000..f178620
--- /dev/null
+++ b/gentest.py
@@ -0,0 +1,963 @@
+#!/usr/bin/python -u
+#
+# generate a tester program for the API
+#
+import sys
+import os
+import string
+try:
+ import libxml2
+except:
+ print "libxml2 python bindings not available, skipping testapi.c generation"
+ sys.exit(0)
+
+if len(sys.argv) > 1:
+ srcPref = sys.argv[1] + '/'
+else:
+ srcPref = ''
+
+#
+# Modules we want to skip in API test
+#
+skipped_modules = [ "SAX", "xlink", "threads", "globals",
+ "xmlmemory", "xmlversion", "xmlexports",
+ #deprecated
+ "DOCBparser",
+]
+
+#
+# defines for each module
+#
+modules_defines = {
+ "HTMLparser": "LIBXML_HTML_ENABLED",
+ "catalog": "LIBXML_CATALOG_ENABLED",
+ "xmlreader": "LIBXML_READER_ENABLED",
+ "relaxng": "LIBXML_SCHEMAS_ENABLED",
+ "schemasInternals": "LIBXML_SCHEMAS_ENABLED",
+ "xmlschemas": "LIBXML_SCHEMAS_ENABLED",
+ "xmlschemastypes": "LIBXML_SCHEMAS_ENABLED",
+ "xpath": "LIBXML_XPATH_ENABLED",
+ "xpathInternals": "LIBXML_XPATH_ENABLED",
+ "xinclude": "LIBXML_XINCLUDE_ENABLED",
+ "xpointer": "LIBXML_XPTR_ENABLED",
+ "xmlregexp" : "LIBXML_REGEXP_ENABLED",
+ "xmlautomata" : "LIBXML_AUTOMATA_ENABLED",
+ "xmlsave" : "LIBXML_OUTPUT_ENABLED",
+ "DOCBparser" : "LIBXML_DOCB_ENABLED",
+ "xmlmodule" : "LIBXML_MODULES_ENABLED",
+ "pattern" : "LIBXML_PATTERN_ENABLED",
+ "schematron" : "LIBXML_SCHEMATRON_ENABLED",
+}
+
+#
+# defines for specific functions
+#
+function_defines = {
+ "htmlDefaultSAXHandlerInit": "LIBXML_HTML_ENABLED",
+ "xmlSAX2EndElement" : "LIBXML_SAX1_ENABLED",
+ "xmlSAX2StartElement" : "LIBXML_SAX1_ENABLED",
+ "xmlSAXDefaultVersion" : "LIBXML_SAX1_ENABLED",
+ "UTF8Toisolat1" : "LIBXML_OUTPUT_ENABLED",
+ "xmlCleanupPredefinedEntities": "LIBXML_LEGACY_ENABLED",
+ "xmlInitializePredefinedEntities": "LIBXML_LEGACY_ENABLED",
+ "xmlSetFeature": "LIBXML_LEGACY_ENABLED",
+ "xmlGetFeature": "LIBXML_LEGACY_ENABLED",
+ "xmlGetFeaturesList": "LIBXML_LEGACY_ENABLED",
+ "xmlIOParseDTD": "LIBXML_VALID_ENABLED",
+ "xmlParseDTD": "LIBXML_VALID_ENABLED",
+ "xmlParseDoc": "LIBXML_SAX1_ENABLED",
+ "xmlParseMemory": "LIBXML_SAX1_ENABLED",
+ "xmlRecoverDoc": "LIBXML_SAX1_ENABLED",
+ "xmlParseFile": "LIBXML_SAX1_ENABLED",
+ "xmlRecoverFile": "LIBXML_SAX1_ENABLED",
+ "xmlRecoverMemory": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseFileWithData": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseMemory": "LIBXML_SAX1_ENABLED",
+ "xmlSAXUserParseMemory": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseDoc": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseDTD": "LIBXML_SAX1_ENABLED",
+ "xmlSAXUserParseFile": "LIBXML_SAX1_ENABLED",
+ "xmlParseEntity": "LIBXML_SAX1_ENABLED",
+ "xmlParseExternalEntity": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseMemoryWithData": "LIBXML_SAX1_ENABLED",
+ "xmlParseBalancedChunkMemory": "LIBXML_SAX1_ENABLED",
+ "xmlParseBalancedChunkMemoryRecover": "LIBXML_SAX1_ENABLED",
+ "xmlSetupParserForBuffer": "LIBXML_SAX1_ENABLED",
+ "xmlStopParser": "LIBXML_PUSH_ENABLED",
+ "xmlAttrSerializeTxtContent": "LIBXML_OUTPUT_ENABLED",
+ "xmlSAXParseFile": "LIBXML_SAX1_ENABLED",
+ "xmlSAXParseEntity": "LIBXML_SAX1_ENABLED",
+ "xmlNewTextChild": "LIBXML_TREE_ENABLED",
+ "xmlNewDocRawNode": "LIBXML_TREE_ENABLED",
+ "xmlNewProp": "LIBXML_TREE_ENABLED",
+ "xmlReconciliateNs": "LIBXML_TREE_ENABLED",
+ "xmlValidateNCName": "LIBXML_TREE_ENABLED",
+ "xmlValidateNMToken": "LIBXML_TREE_ENABLED",
+ "xmlValidateName": "LIBXML_TREE_ENABLED",
+ "xmlNewChild": "LIBXML_TREE_ENABLED",
+ "xmlValidateQName": "LIBXML_TREE_ENABLED",
+ "xmlSprintfElementContent": "LIBXML_OUTPUT_ENABLED",
+ "xmlValidGetPotentialChildren" : "LIBXML_VALID_ENABLED",
+ "xmlValidGetValidElements" : "LIBXML_VALID_ENABLED",
+ "docbDefaultSAXHandlerInit" : "LIBXML_DOCB_ENABLED",
+ "xmlTextReaderPreservePattern" : "LIBXML_PATTERN_ENABLED",
+}
+
+#
+# Some functions really need to be skipped for the tests.
+#
+skipped_functions = [
+# block on I/O
+"xmlFdRead", "xmlReadFd", "xmlCtxtReadFd",
+"htmlFdRead", "htmlReadFd", "htmlCtxtReadFd",
+"xmlReaderNewFd", "xmlReaderForFd",
+"xmlIORead", "xmlReadIO", "xmlCtxtReadIO",
+"htmlIORead", "htmlReadIO", "htmlCtxtReadIO",
+"xmlReaderNewIO", "xmlBufferDump", "xmlNanoFTPConnect",
+"xmlNanoFTPConnectTo", "xmlNanoHTTPMethod", "xmlNanoHTTPMethodRedir",
+# Complex I/O APIs
+"xmlCreateIOParserCtxt", "xmlParserInputBufferCreateIO",
+"xmlRegisterInputCallbacks", "xmlReaderForIO",
+"xmlOutputBufferCreateIO", "xmlRegisterOutputCallbacks",
+"xmlSaveToIO", "xmlIOHTTPOpenW",
+# library state cleanup, generate false leak informations and other
+# troubles, heavillyb tested otherwise.
+"xmlCleanupParser", "xmlRelaxNGCleanupTypes", "xmlSetListDoc",
+"xmlSetTreeDoc", "xmlUnlinkNode",
+# hard to avoid leaks in the tests
+"xmlStrcat", "xmlStrncat", "xmlCatalogAddLocal", "xmlNewTextWriterDoc",
+"xmlXPathNewValueTree", "xmlXPathWrapString",
+# unimplemented
+"xmlTextReaderReadInnerXml", "xmlTextReaderReadOuterXml",
+"xmlTextReaderReadString",
+# destructor
+"xmlListDelete", "xmlOutputBufferClose", "xmlNanoFTPClose", "xmlNanoHTTPClose",
+# deprecated
+"xmlCatalogGetPublic", "xmlCatalogGetSystem", "xmlEncodeEntities",
+"xmlNewGlobalNs", "xmlHandleEntity", "xmlNamespaceParseNCName",
+"xmlNamespaceParseNSDef", "xmlNamespaceParseQName",
+"xmlParseNamespace", "xmlParseQuotedString", "xmlParserHandleReference",
+"xmlScanName",
+"xmlDecodeEntities",
+# allocators
+"xmlMemFree",
+# verbosity
+"xmlCatalogSetDebug", "xmlShellPrintXPathError", "xmlShellPrintNode",
+# Internal functions, no user space should really call them
+"xmlParseAttribute", "xmlParseAttributeListDecl", "xmlParseName",
+"xmlParseNmtoken", "xmlParseEntityValue", "xmlParseAttValue",
+"xmlParseSystemLiteral", "xmlParsePubidLiteral", "xmlParseCharData",
+"xmlParseExternalID", "xmlParseComment", "xmlParsePITarget", "xmlParsePI",
+"xmlParseNotationDecl", "xmlParseEntityDecl", "xmlParseDefaultDecl",
+"xmlParseNotationType", "xmlParseEnumerationType", "xmlParseEnumeratedType",
+"xmlParseAttributeType", "xmlParseAttributeListDecl",
+"xmlParseElementMixedContentDecl", "xmlParseElementChildrenContentDecl",
+"xmlParseElementContentDecl", "xmlParseElementDecl", "xmlParseMarkupDecl",
+"xmlParseCharRef", "xmlParseEntityRef", "xmlParseReference",
+"xmlParsePEReference", "xmlParseDocTypeDecl", "xmlParseAttribute",
+"xmlParseStartTag", "xmlParseEndTag", "xmlParseCDSect", "xmlParseContent",
+"xmlParseElement", "xmlParseVersionNum", "xmlParseVersionInfo",
+"xmlParseEncName", "xmlParseEncodingDecl", "xmlParseSDDecl",
+"xmlParseXMLDecl", "xmlParseTextDecl", "xmlParseMisc",
+"xmlParseExternalSubset", "xmlParserHandlePEReference",
+"xmlSkipBlankChars",
+]
+
+#
+# These functions have side effects on the global state
+# and hence generate errors on memory allocation tests
+#
+skipped_memcheck = [ "xmlLoadCatalog", "xmlAddEncodingAlias",
+ "xmlSchemaInitTypes", "xmlNanoFTPProxy", "xmlNanoFTPScanProxy",
+ "xmlNanoHTTPScanProxy", "xmlResetLastError", "xmlCatalogConvert",
+ "xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
+ "xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
+ "xmlSchemaGetBuiltInType",
+ "htmlParseFile", "htmlCtxtReadFile", # loads the catalogs
+ "xmlTextReaderSchemaValidate", "xmlSchemaCleanupTypes", # initialize the schemas type system
+ "xmlCatalogResolve", "xmlIOParseDTD" # loads the catalogs
+]
+
+#
+# Extra code needed for some test cases
+#
+extra_pre_call = {
+ "xmlSAXUserParseFile": """
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+""",
+ "xmlSAXUserParseMemory": """
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+""",
+ "xmlParseBalancedChunkMemory": """
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+""",
+ "xmlParseBalancedChunkMemoryRecover": """
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+""",
+ "xmlParserInputBufferCreateFd":
+ "if (fd >= 0) fd = -1;",
+}
+extra_post_call = {
+ "xmlAddChild":
+ "if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }",
+ "xmlAddEntity":
+ "if (ret_val != NULL) { xmlFreeNode(ret_val) ; ret_val = NULL; }",
+ "xmlAddChildList":
+ "if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }",
+ "xmlAddSibling":
+ "if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }",
+ "xmlAddNextSibling":
+ "if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }",
+ "xmlAddPrevSibling":
+ "if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }",
+ "xmlDocSetRootElement":
+ "if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }",
+ "xmlReplaceNode":
+ """if (cur != NULL) {
+ xmlUnlinkNode(cur);
+ xmlFreeNode(cur) ; cur = NULL ; }
+ if (old != NULL) {
+ xmlUnlinkNode(old);
+ xmlFreeNode(old) ; old = NULL ; }
+ ret_val = NULL;""",
+ "xmlTextMerge":
+ """if ((first != NULL) && (first->type != XML_TEXT_NODE)) {
+ xmlUnlinkNode(second);
+ xmlFreeNode(second) ; second = NULL ; }""",
+ "xmlBuildQName":
+ """if ((ret_val != NULL) && (ret_val != ncname) &&
+ (ret_val != prefix) && (ret_val != memory))
+ xmlFree(ret_val);
+ ret_val = NULL;""",
+ "xmlNewDocElementContent":
+ """xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;""",
+ "xmlDictReference": "xmlDictFree(dict);",
+ # Functions which deallocates one of their parameters
+ "xmlXPathConvertBoolean": """val = NULL;""",
+ "xmlXPathConvertNumber": """val = NULL;""",
+ "xmlXPathConvertString": """val = NULL;""",
+ "xmlSaveFileTo": """buf = NULL;""",
+ "xmlSaveFormatFileTo": """buf = NULL;""",
+ "xmlIOParseDTD": "input = NULL;",
+ "xmlRemoveProp": "cur = NULL;",
+ "xmlNewNs": "if ((node == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);",
+ "xmlCopyNamespace": "if (ret_val != NULL) xmlFreeNs(ret_val);",
+ "xmlCopyNamespaceList": "if (ret_val != NULL) xmlFreeNsList(ret_val);",
+ "xmlNewTextWriter": "if (ret_val != NULL) out = NULL;",
+ "xmlNewTextWriterPushParser": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;} if (ret_val != NULL) ctxt = NULL;",
+ "xmlNewIOInputStream": "if (ret_val != NULL) input = NULL;",
+ "htmlParseChunk": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
+ "htmlParseDocument": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
+ "xmlParseDocument": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
+ "xmlParseChunk": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
+ "xmlParseExtParsedEnt": "if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}",
+ "xmlDOMWrapAdoptNode": "if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}",
+ "xmlBufferSetAllocationScheme": "if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}"
+}
+
+modules = []
+
+def is_skipped_module(name):
+ for mod in skipped_modules:
+ if mod == name:
+ return 1
+ return 0
+
+def is_skipped_function(name):
+ for fun in skipped_functions:
+ if fun == name:
+ return 1
+ # Do not test destructors
+ if string.find(name, 'Free') != -1:
+ return 1
+ return 0
+
+def is_skipped_memcheck(name):
+ for fun in skipped_memcheck:
+ if fun == name:
+ return 1
+ return 0
+
+missing_types = {}
+def add_missing_type(name, func):
+ try:
+ list = missing_types[name]
+ list.append(func)
+ except:
+ missing_types[name] = [func]
+
+generated_param_types = []
+def add_generated_param_type(name):
+ generated_param_types.append(name)
+
+generated_return_types = []
+def add_generated_return_type(name):
+ generated_return_types.append(name)
+
+missing_functions = {}
+missing_functions_nr = 0
+def add_missing_functions(name, module):
+ global missing_functions_nr
+
+ missing_functions_nr = missing_functions_nr + 1
+ try:
+ list = missing_functions[module]
+ list.append(name)
+ except:
+ missing_functions[module] = [name]
+
+#
+# Provide the type generators and destructors for the parameters
+#
+
+def type_convert(str, name, info, module, function, pos):
+# res = string.replace(str, " ", " ")
+# res = string.replace(str, " ", " ")
+# res = string.replace(str, " ", " ")
+ res = string.replace(str, " *", "_ptr")
+# res = string.replace(str, "*", "_ptr")
+ res = string.replace(res, " ", "_")
+ if res == 'const_char_ptr':
+ if string.find(name, "file") != -1 or \
+ string.find(name, "uri") != -1 or \
+ string.find(name, "URI") != -1 or \
+ string.find(info, "filename") != -1 or \
+ string.find(info, "URI") != -1 or \
+ string.find(info, "URL") != -1:
+ if string.find(function, "Save") != -1 or \
+ string.find(function, "Create") != -1 or \
+ string.find(function, "Write") != -1 or \
+ string.find(function, "Fetch") != -1:
+ return('fileoutput')
+ return('filepath')
+ if res == 'void_ptr':
+ if module == 'nanoftp' and name == 'ctx':
+ return('xmlNanoFTPCtxtPtr')
+ if function == 'xmlNanoFTPNewCtxt' or \
+ function == 'xmlNanoFTPConnectTo' or \
+ function == 'xmlNanoFTPOpen':
+ return('xmlNanoFTPCtxtPtr')
+ if module == 'nanohttp' and name == 'ctx':
+ return('xmlNanoHTTPCtxtPtr')
+ if function == 'xmlNanoHTTPMethod' or \
+ function == 'xmlNanoHTTPMethodRedir' or \
+ function == 'xmlNanoHTTPOpen' or \
+ function == 'xmlNanoHTTPOpenRedir':
+ return('xmlNanoHTTPCtxtPtr');
+ if function == 'xmlIOHTTPOpen':
+ return('xmlNanoHTTPCtxtPtr')
+ if string.find(name, "data") != -1:
+ return('userdata')
+ if string.find(name, "user") != -1:
+ return('userdata')
+ if res == 'xmlDoc_ptr':
+ res = 'xmlDocPtr'
+ if res == 'xmlNode_ptr':
+ res = 'xmlNodePtr'
+ if res == 'xmlDict_ptr':
+ res = 'xmlDictPtr'
+ if res == 'xmlNodePtr' and pos != 0:
+ if (function == 'xmlAddChild' and pos == 2) or \
+ (function == 'xmlAddChildList' and pos == 2) or \
+ (function == 'xmlAddNextSibling' and pos == 2) or \
+ (function == 'xmlAddSibling' and pos == 2) or \
+ (function == 'xmlDocSetRootElement' and pos == 2) or \
+ (function == 'xmlReplaceNode' and pos == 2) or \
+ (function == 'xmlTextMerge') or \
+ (function == 'xmlAddPrevSibling' and pos == 2):
+ return('xmlNodePtr_in');
+ if res == 'const xmlBufferPtr':
+ res = 'xmlBufferPtr'
+ if res == 'xmlChar_ptr' and name == 'name' and \
+ string.find(function, "EatName") != -1:
+ return('eaten_name')
+ if res == 'void_ptr*':
+ res = 'void_ptr_ptr'
+ if res == 'char_ptr*':
+ res = 'char_ptr_ptr'
+ if res == 'xmlChar_ptr*':
+ res = 'xmlChar_ptr_ptr'
+ if res == 'const_xmlChar_ptr*':
+ res = 'const_xmlChar_ptr_ptr'
+ if res == 'const_char_ptr*':
+ res = 'const_char_ptr_ptr'
+ if res == 'FILE_ptr' and module == 'debugXML':
+ res = 'debug_FILE_ptr';
+ if res == 'int' and name == 'options':
+ if module == 'parser' or module == 'xmlreader':
+ res = 'parseroptions'
+
+ return res
+
+known_param_types = []
+
+def is_known_param_type(name, rtype):
+ global test
+ for type in known_param_types:
+ if type == name:
+ return 1
+ for type in generated_param_types:
+ if type == name:
+ return 1
+
+ if name[-3:] == 'Ptr' or name[-4:] == '_ptr':
+ if rtype[0:6] == 'const ':
+ crtype = rtype[6:]
+ else:
+ crtype = rtype
+
+ define = 0
+ if modules_defines.has_key(module):
+ test.write("#ifdef %s\n" % (modules_defines[module]))
+ define = 1
+ test.write("""
+#define gen_nb_%s 1
+static %s gen_%s(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+""" % (name, crtype, name, name, rtype))
+ if define == 1:
+ test.write("#endif\n\n")
+ add_generated_param_type(name)
+ return 1
+
+ return 0
+
+#
+# Provide the type destructors for the return values
+#
+
+known_return_types = []
+
+def is_known_return_type(name):
+ for type in known_return_types:
+ if type == name:
+ return 1
+ return 0
+
+#
+# Copy the beginning of the C test program result
+#
+
+try:
+ input = open("testapi.c", "r")
+except:
+ input = open(srcPref + "testapi.c", "r")
+test = open('testapi.c.new', 'w')
+
+def compare_and_save():
+ global test
+
+ test.close()
+ try:
+ input = open("testapi.c", "r").read()
+ except:
+ input = ''
+ test = open('testapi.c.new', "r").read()
+ if input != test:
+ try:
+ os.system("rm testapi.c; mv testapi.c.new testapi.c")
+ except:
+ os.system("mv testapi.c.new testapi.c")
+ print("Updated testapi.c")
+ else:
+ print("Generated testapi.c is identical")
+
+line = input.readline()
+while line != "":
+ if line == "/* CUT HERE: everything below that line is generated */\n":
+ break;
+ if line[0:15] == "#define gen_nb_":
+ type = string.split(line[15:])[0]
+ known_param_types.append(type)
+ if line[0:19] == "static void desret_":
+ type = string.split(line[19:], '(')[0]
+ known_return_types.append(type)
+ test.write(line)
+ line = input.readline()
+input.close()
+
+if line == "":
+ print "Could not find the CUT marker in testapi.c skipping generation"
+ test.close()
+ sys.exit(0)
+
+print("Scanned testapi.c: found %d parameters types and %d return types\n" % (
+ len(known_param_types), len(known_return_types)))
+test.write("/* CUT HERE: everything below that line is generated */\n")
+
+
+#
+# Open the input API description
+#
+doc = libxml2.readFile(srcPref + 'doc/libxml2-api.xml', None, 0)
+if doc == None:
+ print "Failed to load doc/libxml2-api.xml"
+ sys.exit(1)
+ctxt = doc.xpathNewContext()
+
+#
+# Generate a list of all function parameters and select only
+# those used in the api tests
+#
+argtypes = {}
+args = ctxt.xpathEval("/api/symbols/function/arg")
+for arg in args:
+ mod = arg.xpathEval('string(../@file)')
+ func = arg.xpathEval('string(../@name)')
+ if (mod not in skipped_modules) and (func not in skipped_functions):
+ type = arg.xpathEval('string(@type)')
+ if not argtypes.has_key(type):
+ argtypes[type] = func
+
+# similarly for return types
+rettypes = {}
+rets = ctxt.xpathEval("/api/symbols/function/return")
+for ret in rets:
+ mod = ret.xpathEval('string(../@file)')
+ func = ret.xpathEval('string(../@name)')
+ if (mod not in skipped_modules) and (func not in skipped_functions):
+ type = ret.xpathEval('string(@type)')
+ if not rettypes.has_key(type):
+ rettypes[type] = func
+
+#
+# Generate constructors and return type handling for all enums
+# which are used as function parameters
+#
+enums = ctxt.xpathEval("/api/symbols/typedef[@type='enum']")
+for enum in enums:
+ module = enum.xpathEval('string(@file)')
+ name = enum.xpathEval('string(@name)')
+ #
+ # Skip any enums which are not in our filtered lists
+ #
+ if (name == None) or ((name not in argtypes) and (name not in rettypes)):
+ continue;
+ define = 0
+
+ if argtypes.has_key(name) and is_known_param_type(name, name) == 0:
+ values = ctxt.xpathEval("/api/symbols/enum[@type='%s']" % name)
+ i = 0
+ vals = []
+ for value in values:
+ vname = value.xpathEval('string(@name)')
+ if vname == None:
+ continue;
+ i = i + 1
+ if i >= 5:
+ break;
+ vals.append(vname)
+ if vals == []:
+ print "Didn't find any value for enum %s" % (name)
+ continue
+ if modules_defines.has_key(module):
+ test.write("#ifdef %s\n" % (modules_defines[module]))
+ define = 1
+ test.write("#define gen_nb_%s %d\n" % (name, len(vals)))
+ test.write("""static %s gen_%s(int no, int nr ATTRIBUTE_UNUSED) {\n""" %
+ (name, name))
+ i = 1
+ for value in vals:
+ test.write(" if (no == %d) return(%s);\n" % (i, value))
+ i = i + 1
+ test.write(""" return(0);
+}
+
+static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+""" % (name, name));
+ known_param_types.append(name)
+
+ if (is_known_return_type(name) == 0) and (name in rettypes):
+ if define == 0 and modules_defines.has_key(module):
+ test.write("#ifdef %s\n" % (modules_defines[module]))
+ define = 1
+ test.write("""static void desret_%s(%s val ATTRIBUTE_UNUSED) {
+}
+
+""" % (name, name))
+ known_return_types.append(name)
+ if define == 1:
+ test.write("#endif\n\n")
+
+#
+# Load the interfaces
+#
+headers = ctxt.xpathEval("/api/files/file")
+for file in headers:
+ name = file.xpathEval('string(@name)')
+ if (name == None) or (name == ''):
+ continue
+
+ #
+ # Some module may be skipped because they don't really consists
+ # of user callable APIs
+ #
+ if is_skipped_module(name):
+ continue
+
+ #
+ # do not test deprecated APIs
+ #
+ desc = file.xpathEval('string(description)')
+ if string.find(desc, 'DEPRECATED') != -1:
+ print "Skipping deprecated interface %s" % name
+ continue;
+
+ test.write("#include <libxml/%s.h>\n" % name)
+ modules.append(name)
+
+#
+# Generate the callers signatures
+#
+for module in modules:
+ test.write("static int test_%s(void);\n" % module);
+
+#
+# Generate the top caller
+#
+
+test.write("""
+/**
+ * testlibxml2:
+ *
+ * Main entry point of the tester for the full libxml2 module,
+ * it calls all the tester entry point for each module.
+ *
+ * Returns the number of error found
+ */
+static int
+testlibxml2(void)
+{
+ int test_ret = 0;
+
+""")
+
+for module in modules:
+ test.write(" test_ret += test_%s();\n" % module)
+
+test.write("""
+ printf("Total: %d functions, %d tests, %d errors\\n",
+ function_tests, call_tests, test_ret);
+ return(test_ret);
+}
+
+""")
+
+#
+# How to handle a function
+#
+nb_tests = 0
+
+def generate_test(module, node):
+ global test
+ global nb_tests
+ nb_cond = 0
+ no_gen = 0
+
+ name = node.xpathEval('string(@name)')
+ if is_skipped_function(name):
+ return
+
+ #
+ # check we know how to handle the args and return values
+ # and store the informations for the generation
+ #
+ try:
+ args = node.xpathEval("arg")
+ except:
+ args = []
+ t_args = []
+ n = 0
+ for arg in args:
+ n = n + 1
+ rtype = arg.xpathEval("string(@type)")
+ if rtype == 'void':
+ break;
+ info = arg.xpathEval("string(@info)")
+ nam = arg.xpathEval("string(@name)")
+ type = type_convert(rtype, nam, info, module, name, n)
+ if is_known_param_type(type, rtype) == 0:
+ add_missing_type(type, name);
+ no_gen = 1
+ if (type[-3:] == 'Ptr' or type[-4:] == '_ptr') and \
+ rtype[0:6] == 'const ':
+ crtype = rtype[6:]
+ else:
+ crtype = rtype
+ t_args.append((nam, type, rtype, crtype, info))
+
+ try:
+ rets = node.xpathEval("return")
+ except:
+ rets = []
+ t_ret = None
+ for ret in rets:
+ rtype = ret.xpathEval("string(@type)")
+ info = ret.xpathEval("string(@info)")
+ type = type_convert(rtype, 'return', info, module, name, 0)
+ if rtype == 'void':
+ break
+ if is_known_return_type(type) == 0:
+ add_missing_type(type, name);
+ no_gen = 1
+ t_ret = (type, rtype, info)
+ break
+
+ test.write("""
+static int
+test_%s(void) {
+ int test_ret = 0;
+
+""" % (name))
+
+ if no_gen == 1:
+ add_missing_functions(name, module)
+ test.write("""
+ /* missing type support */
+ return(test_ret);
+}
+
+""")
+ return
+
+ try:
+ conds = node.xpathEval("cond")
+ for cond in conds:
+ test.write("#if %s\n" % (cond.get_content()))
+ nb_cond = nb_cond + 1
+ except:
+ pass
+
+ define = 0
+ if function_defines.has_key(name):
+ test.write("#ifdef %s\n" % (function_defines[name]))
+ define = 1
+
+ # Declare the memory usage counter
+ no_mem = is_skipped_memcheck(name)
+ if no_mem == 0:
+ test.write(" int mem_base;\n");
+
+ # Declare the return value
+ if t_ret != None:
+ test.write(" %s ret_val;\n" % (t_ret[1]))
+
+ # Declare the arguments
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ # add declaration
+ test.write(" %s %s; /* %s */\n" % (crtype, nam, info))
+ test.write(" int n_%s;\n" % (nam))
+ test.write("\n")
+
+ # Cascade loop on of each argument list of values
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ #
+ test.write(" for (n_%s = 0;n_%s < gen_nb_%s;n_%s++) {\n" % (
+ nam, nam, type, nam))
+
+ # log the memory usage
+ if no_mem == 0:
+ test.write(" mem_base = xmlMemBlocks();\n");
+
+ # prepare the call
+ i = 0;
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ #
+ test.write(" %s = gen_%s(n_%s, %d);\n" % (nam, type, nam, i))
+ i = i + 1;
+
+ # do the call, and clanup the result
+ if extra_pre_call.has_key(name):
+ test.write(" %s\n"% (extra_pre_call[name]))
+ if t_ret != None:
+ test.write("\n ret_val = %s(" % (name))
+ need = 0
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg
+ if need:
+ test.write(", ")
+ else:
+ need = 1
+ if rtype != crtype:
+ test.write("(%s)" % rtype)
+ test.write("%s" % nam);
+ test.write(");\n")
+ if extra_post_call.has_key(name):
+ test.write(" %s\n"% (extra_post_call[name]))
+ test.write(" desret_%s(ret_val);\n" % t_ret[0])
+ else:
+ test.write("\n %s(" % (name));
+ need = 0;
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ if need:
+ test.write(", ")
+ else:
+ need = 1
+ if rtype != crtype:
+ test.write("(%s)" % rtype)
+ test.write("%s" % nam)
+ test.write(");\n")
+ if extra_post_call.has_key(name):
+ test.write(" %s\n"% (extra_post_call[name]))
+
+ test.write(" call_tests++;\n");
+
+ # Free the arguments
+ i = 0;
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ # This is a hack to prevent generating a destructor for the
+ # 'input' argument in xmlTextReaderSetup. There should be
+ # a better, more generic way to do this!
+ if string.find(info, 'destroy') == -1:
+ test.write(" des_%s(n_%s, " % (type, nam))
+ if rtype != crtype:
+ test.write("(%s)" % rtype)
+ test.write("%s, %d);\n" % (nam, i))
+ i = i + 1;
+
+ test.write(" xmlResetLastError();\n");
+ # Check the memory usage
+ if no_mem == 0:
+ test.write(""" if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %%d blocks found in %s",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+""" % (name));
+ for arg in t_args:
+ (nam, type, rtype, crtype, info) = arg;
+ test.write(""" printf(" %%d", n_%s);\n""" % (nam))
+ test.write(""" printf("\\n");\n""")
+ test.write(" }\n")
+
+ for arg in t_args:
+ test.write(" }\n")
+
+ test.write(" function_tests++;\n")
+ #
+ # end of conditional
+ #
+ while nb_cond > 0:
+ test.write("#endif\n")
+ nb_cond = nb_cond -1
+ if define == 1:
+ test.write("#endif\n")
+
+ nb_tests = nb_tests + 1;
+
+ test.write("""
+ return(test_ret);
+}
+
+""")
+
+#
+# Generate all module callers
+#
+for module in modules:
+ # gather all the functions exported by that module
+ try:
+ functions = ctxt.xpathEval("/api/symbols/function[@file='%s']" % (module))
+ except:
+ print "Failed to gather functions from module %s" % (module)
+ continue;
+
+ # iterate over all functions in the module generating the test
+ i = 0
+ nb_tests_old = nb_tests
+ for function in functions:
+ i = i + 1
+ generate_test(module, function);
+
+ # header
+ test.write("""static int
+test_%s(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing %s : %d of %d functions ...\\n");
+""" % (module, module, nb_tests - nb_tests_old, i))
+
+ # iterate over all functions in the module generating the call
+ for function in functions:
+ name = function.xpathEval('string(@name)')
+ if is_skipped_function(name):
+ continue
+ test.write(" test_ret += test_%s();\n" % (name))
+
+ # footer
+ test.write("""
+ if (test_ret != 0)
+ printf("Module %s: %%d errors\\n", test_ret);
+ return(test_ret);
+}
+""" % (module))
+
+#
+# Generate direct module caller
+#
+test.write("""static int
+test_module(const char *module) {
+""");
+for module in modules:
+ test.write(""" if (!strcmp(module, "%s")) return(test_%s());\n""" % (
+ module, module))
+test.write(""" return(0);
+}
+""");
+
+print "Generated test for %d modules and %d functions" %(len(modules), nb_tests)
+
+compare_and_save()
+
+missing_list = []
+for missing in missing_types.keys():
+ if missing == 'va_list' or missing == '...':
+ continue;
+
+ n = len(missing_types[missing])
+ missing_list.append((n, missing))
+
+def compare_missing(a, b):
+ return b[0] - a[0]
+
+missing_list.sort(compare_missing)
+print "Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list))
+lst = open("missing.lst", "w")
+lst.write("Missing support for %d types" % (len(missing_list)))
+lst.write("\n")
+for miss in missing_list:
+ lst.write("%s: %d :" % (miss[1], miss[0]))
+ i = 0
+ for n in missing_types[miss[1]]:
+ i = i + 1
+ if i > 5:
+ lst.write(" ...")
+ break
+ lst.write(" %s" % (n))
+ lst.write("\n")
+lst.write("\n")
+lst.write("\n")
+lst.write("Missing support per module");
+for module in missing_functions.keys():
+ lst.write("module %s:\n %s\n" % (module, missing_functions[module]))
+
+lst.close()
+
+
diff --git a/globals.c b/globals.c
new file mode 100644
index 0000000..e351b03
--- /dev/null
+++ b/globals.c
@@ -0,0 +1,1114 @@
+/*
+ * globals.c: definition and handling of the set of global variables
+ * of the library
+ *
+ * The bottom of this file is automatically generated by build_glob.py
+ * based on the description file global.data
+ *
+ * See Copyright for the status of this software.
+ *
+ * Gary Pennington <Gary.Pennington@uk.sun.com>
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <string.h>
+
+#include <libxml/globals.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/threads.h>
+
+/* #define DEBUG_GLOBALS */
+
+/*
+ * Helpful Macro
+ */
+#ifdef LIBXML_THREAD_ENABLED
+#define IS_MAIN_THREAD (xmlIsMainThread())
+#else
+#define IS_MAIN_THREAD 1
+#endif
+
+/*
+ * Mutex to protect "ForNewThreads" variables
+ */
+static xmlMutexPtr xmlThrDefMutex = NULL;
+
+/**
+ * xmlInitGlobals:
+ *
+ * Additional initialisation for multi-threading
+ */
+void xmlInitGlobals(void)
+{
+ if (xmlThrDefMutex == NULL)
+ xmlThrDefMutex = xmlNewMutex();
+}
+
+/**
+ * xmlCleanupGlobals:
+ *
+ * Additional cleanup for multi-threading
+ */
+void xmlCleanupGlobals(void)
+{
+ if (xmlThrDefMutex != NULL) {
+ xmlFreeMutex(xmlThrDefMutex);
+ xmlThrDefMutex = NULL;
+ }
+ __xmlGlobalInitMutexDestroy();
+}
+
+/************************************************************************
+ * *
+ * All the user accessible global variables of the library *
+ * *
+ ************************************************************************/
+
+/*
+ * Memory allocation routines
+ */
+#undef xmlFree
+#undef xmlMalloc
+#undef xmlMallocAtomic
+#undef xmlMemStrdup
+#undef xmlRealloc
+
+#if defined(DEBUG_MEMORY_LOCATION) || defined(DEBUG_MEMORY)
+xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
+xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
+xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
+xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
+xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
+#else
+/**
+ * xmlFree:
+ * @mem: an already allocated block of memory
+ *
+ * The variable holding the libxml free() implementation
+ */
+xmlFreeFunc xmlFree = (xmlFreeFunc) free;
+/**
+ * xmlMalloc:
+ * @size: the size requested in bytes
+ *
+ * The variable holding the libxml malloc() implementation
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error
+ */
+xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
+/**
+ * xmlMallocAtomic:
+ * @size: the size requested in bytes
+ *
+ * The variable holding the libxml malloc() implementation for atomic
+ * data (i.e. blocks not containings pointers), useful when using a
+ * garbage collecting allocator.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error
+ */
+xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
+/**
+ * xmlRealloc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * The variable holding the libxml realloc() implementation
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error
+ */
+xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
+/**
+ * xmlMemStrdup:
+ * @str: a zero terminated string
+ *
+ * The variable holding the libxml strdup() implementation
+ *
+ * Returns the copy of the string or NULL in case of error
+ */
+xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
+#endif /* DEBUG_MEMORY_LOCATION || DEBUG_MEMORY */
+
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#include <libxml/SAX.h>
+
+#undef docbDefaultSAXHandler
+#undef htmlDefaultSAXHandler
+#undef oldXMLWDcompatibility
+#undef xmlBufferAllocScheme
+#undef xmlDefaultBufferSize
+#undef xmlDefaultSAXHandler
+#undef xmlDefaultSAXLocator
+#undef xmlDoValidityCheckingDefaultValue
+#undef xmlGenericError
+#undef xmlStructuredError
+#undef xmlGenericErrorContext
+#undef xmlStructuredErrorContext
+#undef xmlGetWarningsDefaultValue
+#undef xmlIndentTreeOutput
+#undef xmlTreeIndentString
+#undef xmlKeepBlanksDefaultValue
+#undef xmlLineNumbersDefaultValue
+#undef xmlLoadExtDtdDefaultValue
+#undef xmlParserDebugEntities
+#undef xmlParserVersion
+#undef xmlPedanticParserDefaultValue
+#undef xmlSaveNoEmptyTags
+#undef xmlSubstituteEntitiesDefaultValue
+#undef xmlRegisterNodeDefaultValue
+#undef xmlDeregisterNodeDefaultValue
+#undef xmlLastError
+
+#undef xmlParserInputBufferCreateFilenameValue
+#undef xmlOutputBufferCreateFilenameValue
+/**
+ * xmlParserVersion:
+ *
+ * Constant string describing the internal version of the library
+ */
+const char *xmlParserVersion = LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA;
+
+/**
+ * xmlBufferAllocScheme:
+ *
+ * Global setting, default allocation policy for buffers, default is
+ * XML_BUFFER_ALLOC_EXACT
+ */
+xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
+static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT;
+/**
+ * xmlDefaultBufferSize:
+ *
+ * Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
+ */
+int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
+static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE;
+
+/*
+ * Parser defaults
+ */
+
+/**
+ * oldXMLWDcompatibility:
+ *
+ * Global setting, DEPRECATED.
+ */
+int oldXMLWDcompatibility = 0; /* DEPRECATED */
+/**
+ * xmlParserDebugEntities:
+ *
+ * Global setting, asking the parser to print out debugging informations.
+ * while handling entities.
+ * Disabled by default
+ */
+int xmlParserDebugEntities = 0;
+static int xmlParserDebugEntitiesThrDef = 0;
+/**
+ * xmlDoValidityCheckingDefaultValue:
+ *
+ * Global setting, indicate that the parser should work in validating mode.
+ * Disabled by default.
+ */
+int xmlDoValidityCheckingDefaultValue = 0;
+static int xmlDoValidityCheckingDefaultValueThrDef = 0;
+/**
+ * xmlGetWarningsDefaultValue:
+ *
+ * Global setting, indicate that the parser should provide warnings.
+ * Activated by default.
+ */
+int xmlGetWarningsDefaultValue = 1;
+static int xmlGetWarningsDefaultValueThrDef = 1;
+/**
+ * xmlLoadExtDtdDefaultValue:
+ *
+ * Global setting, indicate that the parser should load DTD while not
+ * validating.
+ * Disabled by default.
+ */
+int xmlLoadExtDtdDefaultValue = 0;
+static int xmlLoadExtDtdDefaultValueThrDef = 0;
+/**
+ * xmlPedanticParserDefaultValue:
+ *
+ * Global setting, indicate that the parser be pedantic
+ * Disabled by default.
+ */
+int xmlPedanticParserDefaultValue = 0;
+static int xmlPedanticParserDefaultValueThrDef = 0;
+/**
+ * xmlLineNumbersDefaultValue:
+ *
+ * Global setting, indicate that the parser should store the line number
+ * in the content field of elements in the DOM tree.
+ * Disabled by default since this may not be safe for old classes of
+ * applicaton.
+ */
+int xmlLineNumbersDefaultValue = 0;
+static int xmlLineNumbersDefaultValueThrDef = 0;
+/**
+ * xmlKeepBlanksDefaultValue:
+ *
+ * Global setting, indicate that the parser should keep all blanks
+ * nodes found in the content
+ * Activated by default, this is actually needed to have the parser
+ * conformant to the XML Recommendation, however the option is kept
+ * for some applications since this was libxml1 default behaviour.
+ */
+int xmlKeepBlanksDefaultValue = 1;
+static int xmlKeepBlanksDefaultValueThrDef = 1;
+/**
+ * xmlSubstituteEntitiesDefaultValue:
+ *
+ * Global setting, indicate that the parser should not generate entity
+ * references but replace them with the actual content of the entity
+ * Disabled by default, this should be activated when using XPath since
+ * the XPath data model requires entities replacement and the XPath
+ * engine does not handle entities references transparently.
+ */
+int xmlSubstituteEntitiesDefaultValue = 0;
+static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
+
+xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL;
+static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
+xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL;
+static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
+
+xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue = NULL;
+static xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValueThrDef = NULL;
+
+xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL;
+static xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValueThrDef = NULL;
+
+/*
+ * Error handling
+ */
+
+/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
+/* Must initialize xmlGenericError in xmlInitParser */
+void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
+ const char *msg,
+ ...);
+/**
+ * xmlGenericError:
+ *
+ * Global setting: function used for generic error callbacks
+ */
+xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
+static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
+/**
+ * xmlStructuredError:
+ *
+ * Global setting: function used for structured error callbacks
+ */
+xmlStructuredErrorFunc xmlStructuredError = NULL;
+static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL;
+/**
+ * xmlGenericErrorContext:
+ *
+ * Global setting passed to generic error callbacks
+ */
+void *xmlGenericErrorContext = NULL;
+static void *xmlGenericErrorContextThrDef = NULL;
+/**
+ * xmlStructuredErrorContext:
+ *
+ * Global setting passed to structured error callbacks
+ */
+void *xmlStructuredErrorContext = NULL;
+static void *xmlStructuredErrorContextThrDef = NULL;
+xmlError xmlLastError;
+
+/*
+ * output defaults
+ */
+/**
+ * xmlIndentTreeOutput:
+ *
+ * Global setting, asking the serializer to indent the output tree by default
+ * Enabled by default
+ */
+int xmlIndentTreeOutput = 1;
+static int xmlIndentTreeOutputThrDef = 1;
+
+/**
+ * xmlTreeIndentString:
+ *
+ * The string used to do one-level indent. By default is equal to " " (two spaces)
+ */
+const char *xmlTreeIndentString = " ";
+static const char *xmlTreeIndentStringThrDef = " ";
+
+/**
+ * xmlSaveNoEmptyTags:
+ *
+ * Global setting, asking the serializer to not output empty tags
+ * as <empty/> but <empty></empty>. those two forms are undistinguishable
+ * once parsed.
+ * Disabled by default
+ */
+int xmlSaveNoEmptyTags = 0;
+static int xmlSaveNoEmptyTagsThrDef = 0;
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlDefaultSAXHandler:
+ *
+ * Default SAX version1 handler for XML, builds the DOM tree
+ */
+xmlSAXHandlerV1 xmlDefaultSAXHandler = {
+ xmlSAX2InternalSubset,
+ xmlSAX2IsStandalone,
+ xmlSAX2HasInternalSubset,
+ xmlSAX2HasExternalSubset,
+ xmlSAX2ResolveEntity,
+ xmlSAX2GetEntity,
+ xmlSAX2EntityDecl,
+ xmlSAX2NotationDecl,
+ xmlSAX2AttributeDecl,
+ xmlSAX2ElementDecl,
+ xmlSAX2UnparsedEntityDecl,
+ xmlSAX2SetDocumentLocator,
+ xmlSAX2StartDocument,
+ xmlSAX2EndDocument,
+ xmlSAX2StartElement,
+ xmlSAX2EndElement,
+ xmlSAX2Reference,
+ xmlSAX2Characters,
+ xmlSAX2Characters,
+ xmlSAX2ProcessingInstruction,
+ xmlSAX2Comment,
+ xmlParserWarning,
+ xmlParserError,
+ xmlParserError,
+ xmlSAX2GetParameterEntity,
+ xmlSAX2CDataBlock,
+ xmlSAX2ExternalSubset,
+ 0,
+};
+#endif /* LIBXML_SAX1_ENABLED */
+
+/**
+ * xmlDefaultSAXLocator:
+ *
+ * The default SAX Locator
+ * { getPublicId, getSystemId, getLineNumber, getColumnNumber}
+ */
+xmlSAXLocator xmlDefaultSAXLocator = {
+ xmlSAX2GetPublicId,
+ xmlSAX2GetSystemId,
+ xmlSAX2GetLineNumber,
+ xmlSAX2GetColumnNumber
+};
+
+#ifdef LIBXML_HTML_ENABLED
+/**
+ * htmlDefaultSAXHandler:
+ *
+ * Default old SAX v1 handler for HTML, builds the DOM tree
+ */
+xmlSAXHandlerV1 htmlDefaultSAXHandler = {
+ xmlSAX2InternalSubset,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ xmlSAX2GetEntity,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ xmlSAX2SetDocumentLocator,
+ xmlSAX2StartDocument,
+ xmlSAX2EndDocument,
+ xmlSAX2StartElement,
+ xmlSAX2EndElement,
+ NULL,
+ xmlSAX2Characters,
+ xmlSAX2IgnorableWhitespace,
+ xmlSAX2ProcessingInstruction,
+ xmlSAX2Comment,
+ xmlParserWarning,
+ xmlParserError,
+ xmlParserError,
+ xmlSAX2GetParameterEntity,
+ xmlSAX2CDataBlock,
+ NULL,
+ 0,
+};
+#endif /* LIBXML_HTML_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+/**
+ * docbDefaultSAXHandler:
+ *
+ * Default old SAX v1 handler for SGML DocBook, builds the DOM tree
+ */
+xmlSAXHandlerV1 docbDefaultSAXHandler = {
+ xmlSAX2InternalSubset,
+ xmlSAX2IsStandalone,
+ xmlSAX2HasInternalSubset,
+ xmlSAX2HasExternalSubset,
+ xmlSAX2ResolveEntity,
+ xmlSAX2GetEntity,
+ xmlSAX2EntityDecl,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ xmlSAX2SetDocumentLocator,
+ xmlSAX2StartDocument,
+ xmlSAX2EndDocument,
+ xmlSAX2StartElement,
+ xmlSAX2EndElement,
+ xmlSAX2Reference,
+ xmlSAX2Characters,
+ xmlSAX2IgnorableWhitespace,
+ NULL,
+ xmlSAX2Comment,
+ xmlParserWarning,
+ xmlParserError,
+ xmlParserError,
+ xmlSAX2GetParameterEntity,
+ NULL,
+ NULL,
+ 0,
+};
+#endif /* LIBXML_DOCB_ENABLED */
+
+/**
+ * xmlInitializeGlobalState:
+ * @gs: a pointer to a newly allocated global state
+ *
+ * xmlInitializeGlobalState() initialize a global state with all the
+ * default values of the library.
+ */
+void
+xmlInitializeGlobalState(xmlGlobalStatePtr gs)
+{
+#ifdef DEBUG_GLOBALS
+ fprintf(stderr, "Initializing globals at %lu for thread %d\n",
+ (unsigned long) gs, xmlGetThreadId());
+#endif
+
+ /*
+ * Perform initialization as required by libxml
+ */
+ if (xmlThrDefMutex == NULL)
+ xmlInitGlobals();
+
+ xmlMutexLock(xmlThrDefMutex);
+
+#if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
+ initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
+ inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
+#endif
+
+ gs->oldXMLWDcompatibility = 0;
+ gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
+ gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
+#if defined(LIBXML_SAX1_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
+ initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
+#endif /* LIBXML_SAX1_ENABLED */
+ gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId;
+ gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
+ gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
+ gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
+ gs->xmlDoValidityCheckingDefaultValue =
+ xmlDoValidityCheckingDefaultValueThrDef;
+#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
+ gs->xmlFree = (xmlFreeFunc) xmlMemFree;
+ gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
+ gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
+ gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
+ gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
+#else
+ gs->xmlFree = (xmlFreeFunc) free;
+ gs->xmlMalloc = (xmlMallocFunc) malloc;
+ gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
+ gs->xmlRealloc = (xmlReallocFunc) realloc;
+ gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
+#endif
+ gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
+ gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
+ gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
+ gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
+ gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
+ gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
+ gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
+ gs->xmlParserVersion = LIBXML_VERSION_STRING;
+ gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
+ gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
+ gs->xmlSubstituteEntitiesDefaultValue =
+ xmlSubstituteEntitiesDefaultValueThrDef;
+
+ gs->xmlGenericError = xmlGenericErrorThrDef;
+ gs->xmlStructuredError = xmlStructuredErrorThrDef;
+ gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
+ gs->xmlStructuredErrorContext = xmlStructuredErrorContextThrDef;
+ gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
+ gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
+
+ gs->xmlParserInputBufferCreateFilenameValue = xmlParserInputBufferCreateFilenameValueThrDef;
+ gs->xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
+ memset(&gs->xmlLastError, 0, sizeof(xmlError));
+
+ xmlMutexUnlock(xmlThrDefMutex);
+}
+
+/**
+ * DOC_DISABLE : we ignore missing doc for the xmlThrDef functions,
+ * those are really internal work
+ */
+void
+xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
+ xmlMutexLock(xmlThrDefMutex);
+ xmlGenericErrorContextThrDef = ctx;
+ if (handler != NULL)
+ xmlGenericErrorThrDef = handler;
+ else
+ xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
+ xmlMutexUnlock(xmlThrDefMutex);
+}
+
+void
+xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
+ xmlMutexLock(xmlThrDefMutex);
+ xmlStructuredErrorContextThrDef = ctx;
+ xmlStructuredErrorThrDef = handler;
+ xmlMutexUnlock(xmlThrDefMutex);
+}
+
+/**
+ * xmlRegisterNodeDefault:
+ * @func: function pointer to the new RegisterNodeFunc
+ *
+ * Registers a callback for node creation
+ *
+ * Returns the old value of the registration function
+ */
+xmlRegisterNodeFunc
+xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
+{
+ xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
+
+ __xmlRegisterCallbacks = 1;
+ xmlRegisterNodeDefaultValue = func;
+ return(old);
+}
+
+xmlRegisterNodeFunc
+xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
+{
+ xmlRegisterNodeFunc old;
+
+ xmlMutexLock(xmlThrDefMutex);
+ old = xmlRegisterNodeDefaultValueThrDef;
+
+ __xmlRegisterCallbacks = 1;
+ xmlRegisterNodeDefaultValueThrDef = func;
+ xmlMutexUnlock(xmlThrDefMutex);
+
+ return(old);
+}
+
+/**
+ * xmlDeregisterNodeDefault:
+ * @func: function pointer to the new DeregisterNodeFunc
+ *
+ * Registers a callback for node destruction
+ *
+ * Returns the previous value of the deregistration function
+ */
+xmlDeregisterNodeFunc
+xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
+{
+ xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
+
+ __xmlRegisterCallbacks = 1;
+ xmlDeregisterNodeDefaultValue = func;
+ return(old);
+}
+
+xmlDeregisterNodeFunc
+xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
+{
+ xmlDeregisterNodeFunc old;
+
+ xmlMutexLock(xmlThrDefMutex);
+ old = xmlDeregisterNodeDefaultValueThrDef;
+
+ __xmlRegisterCallbacks = 1;
+ xmlDeregisterNodeDefaultValueThrDef = func;
+ xmlMutexUnlock(xmlThrDefMutex);
+
+ return(old);
+}
+
+xmlParserInputBufferCreateFilenameFunc
+xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
+{
+ xmlParserInputBufferCreateFilenameFunc old;
+
+ xmlMutexLock(xmlThrDefMutex);
+ old = xmlParserInputBufferCreateFilenameValueThrDef;
+ if (old == NULL) {
+ old = __xmlParserInputBufferCreateFilename;
+ }
+
+ xmlParserInputBufferCreateFilenameValueThrDef = func;
+ xmlMutexUnlock(xmlThrDefMutex);
+
+ return(old);
+}
+
+xmlOutputBufferCreateFilenameFunc
+xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
+{
+ xmlOutputBufferCreateFilenameFunc old;
+
+ xmlMutexLock(xmlThrDefMutex);
+ old = xmlOutputBufferCreateFilenameValueThrDef;
+#ifdef LIBXML_OUTPUT_ENABLED
+ if (old == NULL) {
+ old = __xmlOutputBufferCreateFilename;
+ }
+#endif
+ xmlOutputBufferCreateFilenameValueThrDef = func;
+ xmlMutexUnlock(xmlThrDefMutex);
+
+ return(old);
+}
+
+#ifdef LIBXML_DOCB_ENABLED
+#undef docbDefaultSAXHandler
+xmlSAXHandlerV1 *
+__docbDefaultSAXHandler(void) {
+ if (IS_MAIN_THREAD)
+ return (&docbDefaultSAXHandler);
+ else
+ return (&xmlGetGlobalState()->docbDefaultSAXHandler);
+}
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+#undef htmlDefaultSAXHandler
+xmlSAXHandlerV1 *
+__htmlDefaultSAXHandler(void) {
+ if (IS_MAIN_THREAD)
+ return (&htmlDefaultSAXHandler);
+ else
+ return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
+}
+#endif
+
+#undef xmlLastError
+xmlError *
+__xmlLastError(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlLastError);
+ else
+ return (&xmlGetGlobalState()->xmlLastError);
+}
+
+/*
+ * The following memory routines were apparently lost at some point,
+ * and were re-inserted at this point on June 10, 2004. Hope it's
+ * the right place for them :-)
+ */
+#if defined(LIBXML_THREAD_ALLOC_ENABLED) && defined(LIBXML_THREAD_ENABLED)
+#undef xmlMalloc
+xmlMallocFunc *
+__xmlMalloc(void){
+ if (IS_MAIN_THREAD)
+ return (&xmlMalloc);
+ else
+ return (&xmlGetGlobalState()->xmlMalloc);
+}
+
+#undef xmlMallocAtomic
+xmlMallocFunc *
+__xmlMallocAtomic(void){
+ if (IS_MAIN_THREAD)
+ return (&xmlMallocAtomic);
+ else
+ return (&xmlGetGlobalState()->xmlMallocAtomic);
+}
+
+#undef xmlRealloc
+xmlReallocFunc *
+__xmlRealloc(void){
+ if (IS_MAIN_THREAD)
+ return (&xmlRealloc);
+ else
+ return (&xmlGetGlobalState()->xmlRealloc);
+}
+
+#undef xmlFree
+xmlFreeFunc *
+__xmlFree(void){
+ if (IS_MAIN_THREAD)
+ return (&xmlFree);
+ else
+ return (&xmlGetGlobalState()->xmlFree);
+}
+
+xmlStrdupFunc *
+__xmlMemStrdup(void){
+ if (IS_MAIN_THREAD)
+ return (&xmlMemStrdup);
+ else
+ return (&xmlGetGlobalState()->xmlMemStrdup);
+}
+
+#endif
+
+/*
+ * Everything starting from the line below is
+ * Automatically generated by build_glob.py.
+ * Do not modify the previous line.
+ */
+
+
+#undef oldXMLWDcompatibility
+int *
+__oldXMLWDcompatibility(void) {
+ if (IS_MAIN_THREAD)
+ return (&oldXMLWDcompatibility);
+ else
+ return (&xmlGetGlobalState()->oldXMLWDcompatibility);
+}
+
+#undef xmlBufferAllocScheme
+xmlBufferAllocationScheme *
+__xmlBufferAllocScheme(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlBufferAllocScheme);
+ else
+ return (&xmlGetGlobalState()->xmlBufferAllocScheme);
+}
+xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
+ xmlBufferAllocationScheme ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlBufferAllocSchemeThrDef;
+ xmlBufferAllocSchemeThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlDefaultBufferSize
+int *
+__xmlDefaultBufferSize(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlDefaultBufferSize);
+ else
+ return (&xmlGetGlobalState()->xmlDefaultBufferSize);
+}
+int xmlThrDefDefaultBufferSize(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlDefaultBufferSizeThrDef;
+ xmlDefaultBufferSizeThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+#undef xmlDefaultSAXHandler
+xmlSAXHandlerV1 *
+__xmlDefaultSAXHandler(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlDefaultSAXHandler);
+ else
+ return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+#undef xmlDefaultSAXLocator
+xmlSAXLocator *
+__xmlDefaultSAXLocator(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlDefaultSAXLocator);
+ else
+ return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
+}
+
+#undef xmlDoValidityCheckingDefaultValue
+int *
+__xmlDoValidityCheckingDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlDoValidityCheckingDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
+}
+int xmlThrDefDoValidityCheckingDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlDoValidityCheckingDefaultValueThrDef;
+ xmlDoValidityCheckingDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlGenericError
+xmlGenericErrorFunc *
+__xmlGenericError(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlGenericError);
+ else
+ return (&xmlGetGlobalState()->xmlGenericError);
+}
+
+#undef xmlStructuredError
+xmlStructuredErrorFunc *
+__xmlStructuredError(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlStructuredError);
+ else
+ return (&xmlGetGlobalState()->xmlStructuredError);
+}
+
+#undef xmlGenericErrorContext
+void * *
+__xmlGenericErrorContext(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlGenericErrorContext);
+ else
+ return (&xmlGetGlobalState()->xmlGenericErrorContext);
+}
+
+#undef xmlStructuredErrorContext
+void * *
+__xmlStructuredErrorContext(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlStructuredErrorContext);
+ else
+ return (&xmlGetGlobalState()->xmlStructuredErrorContext);
+}
+
+#undef xmlGetWarningsDefaultValue
+int *
+__xmlGetWarningsDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlGetWarningsDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
+}
+int xmlThrDefGetWarningsDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlGetWarningsDefaultValueThrDef;
+ xmlGetWarningsDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlIndentTreeOutput
+int *
+__xmlIndentTreeOutput(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlIndentTreeOutput);
+ else
+ return (&xmlGetGlobalState()->xmlIndentTreeOutput);
+}
+int xmlThrDefIndentTreeOutput(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlIndentTreeOutputThrDef;
+ xmlIndentTreeOutputThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlTreeIndentString
+const char * *
+__xmlTreeIndentString(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlTreeIndentString);
+ else
+ return (&xmlGetGlobalState()->xmlTreeIndentString);
+}
+const char * xmlThrDefTreeIndentString(const char * v) {
+ const char * ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlTreeIndentStringThrDef;
+ xmlTreeIndentStringThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlKeepBlanksDefaultValue
+int *
+__xmlKeepBlanksDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlKeepBlanksDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
+}
+int xmlThrDefKeepBlanksDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlKeepBlanksDefaultValueThrDef;
+ xmlKeepBlanksDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlLineNumbersDefaultValue
+int *
+__xmlLineNumbersDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlLineNumbersDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
+}
+int xmlThrDefLineNumbersDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlLineNumbersDefaultValueThrDef;
+ xmlLineNumbersDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlLoadExtDtdDefaultValue
+int *
+__xmlLoadExtDtdDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlLoadExtDtdDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
+}
+int xmlThrDefLoadExtDtdDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlLoadExtDtdDefaultValueThrDef;
+ xmlLoadExtDtdDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlParserDebugEntities
+int *
+__xmlParserDebugEntities(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlParserDebugEntities);
+ else
+ return (&xmlGetGlobalState()->xmlParserDebugEntities);
+}
+int xmlThrDefParserDebugEntities(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlParserDebugEntitiesThrDef;
+ xmlParserDebugEntitiesThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlParserVersion
+const char * *
+__xmlParserVersion(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlParserVersion);
+ else
+ return (&xmlGetGlobalState()->xmlParserVersion);
+}
+
+#undef xmlPedanticParserDefaultValue
+int *
+__xmlPedanticParserDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlPedanticParserDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
+}
+int xmlThrDefPedanticParserDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlPedanticParserDefaultValueThrDef;
+ xmlPedanticParserDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlSaveNoEmptyTags
+int *
+__xmlSaveNoEmptyTags(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlSaveNoEmptyTags);
+ else
+ return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
+}
+int xmlThrDefSaveNoEmptyTags(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlSaveNoEmptyTagsThrDef;
+ xmlSaveNoEmptyTagsThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlSubstituteEntitiesDefaultValue
+int *
+__xmlSubstituteEntitiesDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlSubstituteEntitiesDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
+}
+int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
+ int ret;
+ xmlMutexLock(xmlThrDefMutex);
+ ret = xmlSubstituteEntitiesDefaultValueThrDef;
+ xmlSubstituteEntitiesDefaultValueThrDef = v;
+ xmlMutexUnlock(xmlThrDefMutex);
+ return ret;
+}
+
+#undef xmlRegisterNodeDefaultValue
+xmlRegisterNodeFunc *
+__xmlRegisterNodeDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlRegisterNodeDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue);
+}
+
+#undef xmlDeregisterNodeDefaultValue
+xmlDeregisterNodeFunc *
+__xmlDeregisterNodeDefaultValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlDeregisterNodeDefaultValue);
+ else
+ return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue);
+}
+
+#undef xmlParserInputBufferCreateFilenameValue
+xmlParserInputBufferCreateFilenameFunc *
+__xmlParserInputBufferCreateFilenameValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlParserInputBufferCreateFilenameValue);
+ else
+ return (&xmlGetGlobalState()->xmlParserInputBufferCreateFilenameValue);
+}
+
+#undef xmlOutputBufferCreateFilenameValue
+xmlOutputBufferCreateFilenameFunc *
+__xmlOutputBufferCreateFilenameValue(void) {
+ if (IS_MAIN_THREAD)
+ return (&xmlOutputBufferCreateFilenameValue);
+ else
+ return (&xmlGetGlobalState()->xmlOutputBufferCreateFilenameValue);
+}
+
+#define bottom_globals
+#include "elfgcchack.h"
diff --git a/hash.c b/hash.c
new file mode 100644
index 0000000..f9a2017
--- /dev/null
+++ b/hash.c
@@ -0,0 +1,1124 @@
+/*
+ * hash.c: chained hash tables
+ *
+ * Reference: Your favorite introductory book on algorithms
+ *
+ * Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ * Author: breese@users.sourceforge.net
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+/*
+ * Following http://www.ocert.org/advisories/ocert-2011-003.html
+ * it seems that having hash randomization might be a good idea
+ * when using XML with untrusted data
+ */
+#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
+#define HASH_RANDOMIZATION
+#endif
+
+#include <libxml/parser.h>
+#include <libxml/hash.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+
+#define MAX_HASH_LEN 8
+
+/* #define DEBUG_GROW */
+
+/*
+ * A single entry in the hash table
+ */
+typedef struct _xmlHashEntry xmlHashEntry;
+typedef xmlHashEntry *xmlHashEntryPtr;
+struct _xmlHashEntry {
+ struct _xmlHashEntry *next;
+ xmlChar *name;
+ xmlChar *name2;
+ xmlChar *name3;
+ void *payload;
+ int valid;
+};
+
+/*
+ * The entire hash table
+ */
+struct _xmlHashTable {
+ struct _xmlHashEntry *table;
+ int size;
+ int nbElems;
+ xmlDictPtr dict;
+#ifdef HASH_RANDOMIZATION
+ int random_seed;
+#endif
+};
+
+/*
+ * xmlHashComputeKey:
+ * Calculate the hash key
+ */
+static unsigned long
+xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3) {
+ unsigned long value = 0L;
+ char ch;
+
+#ifdef HASH_RANDOMIZATION
+ value = table->random_seed;
+#endif
+ if (name != NULL) {
+ value += 30 * (*name);
+ while ((ch = *name++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ value = value ^ ((value << 5) + (value >> 3));
+ if (name2 != NULL) {
+ while ((ch = *name2++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ value = value ^ ((value << 5) + (value >> 3));
+ if (name3 != NULL) {
+ while ((ch = *name3++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ return (value % table->size);
+}
+
+static unsigned long
+xmlHashComputeQKey(xmlHashTablePtr table,
+ const xmlChar *prefix, const xmlChar *name,
+ const xmlChar *prefix2, const xmlChar *name2,
+ const xmlChar *prefix3, const xmlChar *name3) {
+ unsigned long value = 0L;
+ char ch;
+
+#ifdef HASH_RANDOMIZATION
+ value = table->random_seed;
+#endif
+ if (prefix != NULL)
+ value += 30 * (*prefix);
+ else
+ value += 30 * (*name);
+
+ if (prefix != NULL) {
+ while ((ch = *prefix++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
+ }
+ if (name != NULL) {
+ while ((ch = *name++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ value = value ^ ((value << 5) + (value >> 3));
+ if (prefix2 != NULL) {
+ while ((ch = *prefix2++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
+ }
+ if (name2 != NULL) {
+ while ((ch = *name2++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ value = value ^ ((value << 5) + (value >> 3));
+ if (prefix3 != NULL) {
+ while ((ch = *prefix3++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
+ }
+ if (name3 != NULL) {
+ while ((ch = *name3++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ return (value % table->size);
+}
+
+/**
+ * xmlHashCreate:
+ * @size: the size of the hash table
+ *
+ * Create a new xmlHashTablePtr.
+ *
+ * Returns the newly created object, or NULL if an error occured.
+ */
+xmlHashTablePtr
+xmlHashCreate(int size) {
+ xmlHashTablePtr table;
+
+ if (size <= 0)
+ size = 256;
+
+ table = xmlMalloc(sizeof(xmlHashTable));
+ if (table) {
+ table->dict = NULL;
+ table->size = size;
+ table->nbElems = 0;
+ table->table = xmlMalloc(size * sizeof(xmlHashEntry));
+ if (table->table) {
+ memset(table->table, 0, size * sizeof(xmlHashEntry));
+#ifdef HASH_RANDOMIZATION
+ table->random_seed = __xmlRandom();
+#endif
+ return(table);
+ }
+ xmlFree(table);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlHashCreateDict:
+ * @size: the size of the hash table
+ * @dict: a dictionary to use for the hash
+ *
+ * Create a new xmlHashTablePtr which will use @dict as the internal dictionary
+ *
+ * Returns the newly created object, or NULL if an error occured.
+ */
+xmlHashTablePtr
+xmlHashCreateDict(int size, xmlDictPtr dict) {
+ xmlHashTablePtr table;
+
+ table = xmlHashCreate(size);
+ if (table != NULL) {
+ table->dict = dict;
+ xmlDictReference(dict);
+ }
+ return(table);
+}
+
+/**
+ * xmlHashGrow:
+ * @table: the hash table
+ * @size: the new size of the hash table
+ *
+ * resize the hash table
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlHashGrow(xmlHashTablePtr table, int size) {
+ unsigned long key;
+ int oldsize, i;
+ xmlHashEntryPtr iter, next;
+ struct _xmlHashEntry *oldtable;
+#ifdef DEBUG_GROW
+ unsigned long nbElem = 0;
+#endif
+
+ if (table == NULL)
+ return(-1);
+ if (size < 8)
+ return(-1);
+ if (size > 8 * 2048)
+ return(-1);
+
+ oldsize = table->size;
+ oldtable = table->table;
+ if (oldtable == NULL)
+ return(-1);
+
+ table->table = xmlMalloc(size * sizeof(xmlHashEntry));
+ if (table->table == NULL) {
+ table->table = oldtable;
+ return(-1);
+ }
+ memset(table->table, 0, size * sizeof(xmlHashEntry));
+ table->size = size;
+
+ /* If the two loops are merged, there would be situations where
+ a new entry needs to allocated and data copied into it from
+ the main table. So instead, we run through the array twice, first
+ copying all the elements in the main array (where we can't get
+ conflicts) and then the rest, so we only free (and don't allocate)
+ */
+ for (i = 0; i < oldsize; i++) {
+ if (oldtable[i].valid == 0)
+ continue;
+ key = xmlHashComputeKey(table, oldtable[i].name, oldtable[i].name2,
+ oldtable[i].name3);
+ memcpy(&(table->table[key]), &(oldtable[i]), sizeof(xmlHashEntry));
+ table->table[key].next = NULL;
+ }
+
+ for (i = 0; i < oldsize; i++) {
+ iter = oldtable[i].next;
+ while (iter) {
+ next = iter->next;
+
+ /*
+ * put back the entry in the new table
+ */
+
+ key = xmlHashComputeKey(table, iter->name, iter->name2,
+ iter->name3);
+ if (table->table[key].valid == 0) {
+ memcpy(&(table->table[key]), iter, sizeof(xmlHashEntry));
+ table->table[key].next = NULL;
+ xmlFree(iter);
+ } else {
+ iter->next = table->table[key].next;
+ table->table[key].next = iter;
+ }
+
+#ifdef DEBUG_GROW
+ nbElem++;
+#endif
+
+ iter = next;
+ }
+ }
+
+ xmlFree(oldtable);
+
+#ifdef DEBUG_GROW
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlHashGrow : from %d to %d, %d elems\n", oldsize, size, nbElem);
+#endif
+
+ return(0);
+}
+
+/**
+ * xmlHashFree:
+ * @table: the hash table
+ * @f: the deallocator function for items in the hash
+ *
+ * Free the hash @table and its contents. The userdata is
+ * deallocated with @f if provided.
+ */
+void
+xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) {
+ int i;
+ xmlHashEntryPtr iter;
+ xmlHashEntryPtr next;
+ int inside_table = 0;
+ int nbElems;
+
+ if (table == NULL)
+ return;
+ if (table->table) {
+ nbElems = table->nbElems;
+ for(i = 0; (i < table->size) && (nbElems > 0); i++) {
+ iter = &(table->table[i]);
+ if (iter->valid == 0)
+ continue;
+ inside_table = 1;
+ while (iter) {
+ next = iter->next;
+ if ((f != NULL) && (iter->payload != NULL))
+ f(iter->payload, iter->name);
+ if (table->dict == NULL) {
+ if (iter->name)
+ xmlFree(iter->name);
+ if (iter->name2)
+ xmlFree(iter->name2);
+ if (iter->name3)
+ xmlFree(iter->name3);
+ }
+ iter->payload = NULL;
+ if (!inside_table)
+ xmlFree(iter);
+ nbElems--;
+ inside_table = 0;
+ iter = next;
+ }
+ }
+ xmlFree(table->table);
+ }
+ if (table->dict)
+ xmlDictFree(table->dict);
+ xmlFree(table);
+}
+
+/**
+ * xmlHashAddEntry:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @userdata: a pointer to the userdata
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the @name. Duplicate names generate errors.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata) {
+ return(xmlHashAddEntry3(table, name, NULL, NULL, userdata));
+}
+
+/**
+ * xmlHashAddEntry2:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @userdata: a pointer to the userdata
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the (@name, @name2) tuple. Duplicate tuples generate errors.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, void *userdata) {
+ return(xmlHashAddEntry3(table, name, name2, NULL, userdata));
+}
+
+/**
+ * xmlHashUpdateEntry:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @userdata: a pointer to the userdata
+ * @f: the deallocator function for replaced item (if any)
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the @name. Existing entry for this @name will be removed
+ * and freed with @f if found.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name,
+ void *userdata, xmlHashDeallocator f) {
+ return(xmlHashUpdateEntry3(table, name, NULL, NULL, userdata, f));
+}
+
+/**
+ * xmlHashUpdateEntry2:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @userdata: a pointer to the userdata
+ * @f: the deallocator function for replaced item (if any)
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the (@name, @name2) tuple. Existing entry for this tuple will
+ * be removed and freed with @f if found.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, void *userdata,
+ xmlHashDeallocator f) {
+ return(xmlHashUpdateEntry3(table, name, name2, NULL, userdata, f));
+}
+
+/**
+ * xmlHashLookup:
+ * @table: the hash table
+ * @name: the name of the userdata
+ *
+ * Find the userdata specified by the @name.
+ *
+ * Returns the pointer to the userdata
+ */
+void *
+xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) {
+ return(xmlHashLookup3(table, name, NULL, NULL));
+}
+
+/**
+ * xmlHashLookup2:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ *
+ * Find the userdata specified by the (@name, @name2) tuple.
+ *
+ * Returns the pointer to the userdata
+ */
+void *
+xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2) {
+ return(xmlHashLookup3(table, name, name2, NULL));
+}
+
+/**
+ * xmlHashQLookup:
+ * @table: the hash table
+ * @prefix: the prefix of the userdata
+ * @name: the name of the userdata
+ *
+ * Find the userdata specified by the QName @prefix:@name/@name.
+ *
+ * Returns the pointer to the userdata
+ */
+void *
+xmlHashQLookup(xmlHashTablePtr table, const xmlChar *prefix,
+ const xmlChar *name) {
+ return(xmlHashQLookup3(table, prefix, name, NULL, NULL, NULL, NULL));
+}
+
+/**
+ * xmlHashQLookup2:
+ * @table: the hash table
+ * @prefix: the prefix of the userdata
+ * @name: the name of the userdata
+ * @prefix2: the second prefix of the userdata
+ * @name2: a second name of the userdata
+ *
+ * Find the userdata specified by the QNames tuple
+ *
+ * Returns the pointer to the userdata
+ */
+void *
+xmlHashQLookup2(xmlHashTablePtr table, const xmlChar *prefix,
+ const xmlChar *name, const xmlChar *prefix2,
+ const xmlChar *name2) {
+ return(xmlHashQLookup3(table, prefix, name, prefix2, name2, NULL, NULL));
+}
+
+/**
+ * xmlHashAddEntry3:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @name3: a third name of the userdata
+ * @userdata: a pointer to the userdata
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the tuple (@name, @name2, @name3). Duplicate entries generate
+ * errors.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ void *userdata) {
+ unsigned long key, len = 0;
+ xmlHashEntryPtr entry;
+ xmlHashEntryPtr insert;
+
+ if ((table == NULL) || (name == NULL))
+ return(-1);
+
+ /*
+ * If using a dict internalize if needed
+ */
+ if (table->dict) {
+ if (!xmlDictOwns(table->dict, name)) {
+ name = xmlDictLookup(table->dict, name, -1);
+ if (name == NULL)
+ return(-1);
+ }
+ if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) {
+ name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name2 == NULL)
+ return(-1);
+ }
+ if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) {
+ name3 = xmlDictLookup(table->dict, name3, -1);
+ if (name3 == NULL)
+ return(-1);
+ }
+ }
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ key = xmlHashComputeKey(table, name, name2, name3);
+ if (table->table[key].valid == 0) {
+ insert = NULL;
+ } else {
+ if (table->dict) {
+ for (insert = &(table->table[key]); insert->next != NULL;
+ insert = insert->next) {
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3))
+ return(-1);
+ len++;
+ }
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3))
+ return(-1);
+ } else {
+ for (insert = &(table->table[key]); insert->next != NULL;
+ insert = insert->next) {
+ if ((xmlStrEqual(insert->name, name)) &&
+ (xmlStrEqual(insert->name2, name2)) &&
+ (xmlStrEqual(insert->name3, name3)))
+ return(-1);
+ len++;
+ }
+ if ((xmlStrEqual(insert->name, name)) &&
+ (xmlStrEqual(insert->name2, name2)) &&
+ (xmlStrEqual(insert->name3, name3)))
+ return(-1);
+ }
+ }
+
+ if (insert == NULL) {
+ entry = &(table->table[key]);
+ } else {
+ entry = xmlMalloc(sizeof(xmlHashEntry));
+ if (entry == NULL)
+ return(-1);
+ }
+
+ if (table->dict != NULL) {
+ entry->name = (xmlChar *) name;
+ entry->name2 = (xmlChar *) name2;
+ entry->name3 = (xmlChar *) name3;
+ } else {
+ entry->name = xmlStrdup(name);
+ entry->name2 = xmlStrdup(name2);
+ entry->name3 = xmlStrdup(name3);
+ }
+ entry->payload = userdata;
+ entry->next = NULL;
+ entry->valid = 1;
+
+
+ if (insert != NULL)
+ insert->next = entry;
+
+ table->nbElems++;
+
+ if (len > MAX_HASH_LEN)
+ xmlHashGrow(table, MAX_HASH_LEN * table->size);
+
+ return(0);
+}
+
+/**
+ * xmlHashUpdateEntry3:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @name3: a third name of the userdata
+ * @userdata: a pointer to the userdata
+ * @f: the deallocator function for replaced item (if any)
+ *
+ * Add the @userdata to the hash @table. This can later be retrieved
+ * by using the tuple (@name, @name2, @name3). Existing entry for this tuple
+ * will be removed and freed with @f if found.
+ *
+ * Returns 0 the addition succeeded and -1 in case of error.
+ */
+int
+xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ void *userdata, xmlHashDeallocator f) {
+ unsigned long key;
+ xmlHashEntryPtr entry;
+ xmlHashEntryPtr insert;
+
+ if ((table == NULL) || name == NULL)
+ return(-1);
+
+ /*
+ * If using a dict internalize if needed
+ */
+ if (table->dict) {
+ if (!xmlDictOwns(table->dict, name)) {
+ name = xmlDictLookup(table->dict, name, -1);
+ if (name == NULL)
+ return(-1);
+ }
+ if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) {
+ name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name2 == NULL)
+ return(-1);
+ }
+ if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) {
+ name3 = xmlDictLookup(table->dict, name3, -1);
+ if (name3 == NULL)
+ return(-1);
+ }
+ }
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ key = xmlHashComputeKey(table, name, name2, name3);
+ if (table->table[key].valid == 0) {
+ insert = NULL;
+ } else {
+ if (table ->dict) {
+ for (insert = &(table->table[key]); insert->next != NULL;
+ insert = insert->next) {
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3)) {
+ if (f)
+ f(insert->payload, insert->name);
+ insert->payload = userdata;
+ return(0);
+ }
+ }
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3)) {
+ if (f)
+ f(insert->payload, insert->name);
+ insert->payload = userdata;
+ return(0);
+ }
+ } else {
+ for (insert = &(table->table[key]); insert->next != NULL;
+ insert = insert->next) {
+ if ((xmlStrEqual(insert->name, name)) &&
+ (xmlStrEqual(insert->name2, name2)) &&
+ (xmlStrEqual(insert->name3, name3))) {
+ if (f)
+ f(insert->payload, insert->name);
+ insert->payload = userdata;
+ return(0);
+ }
+ }
+ if ((xmlStrEqual(insert->name, name)) &&
+ (xmlStrEqual(insert->name2, name2)) &&
+ (xmlStrEqual(insert->name3, name3))) {
+ if (f)
+ f(insert->payload, insert->name);
+ insert->payload = userdata;
+ return(0);
+ }
+ }
+ }
+
+ if (insert == NULL) {
+ entry = &(table->table[key]);
+ } else {
+ entry = xmlMalloc(sizeof(xmlHashEntry));
+ if (entry == NULL)
+ return(-1);
+ }
+
+ if (table->dict != NULL) {
+ entry->name = (xmlChar *) name;
+ entry->name2 = (xmlChar *) name2;
+ entry->name3 = (xmlChar *) name3;
+ } else {
+ entry->name = xmlStrdup(name);
+ entry->name2 = xmlStrdup(name2);
+ entry->name3 = xmlStrdup(name3);
+ }
+ entry->payload = userdata;
+ entry->next = NULL;
+ entry->valid = 1;
+ table->nbElems++;
+
+
+ if (insert != NULL) {
+ insert->next = entry;
+ }
+ return(0);
+}
+
+/**
+ * xmlHashLookup3:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @name3: a third name of the userdata
+ *
+ * Find the userdata specified by the (@name, @name2, @name3) tuple.
+ *
+ * Returns the a pointer to the userdata
+ */
+void *
+xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3) {
+ unsigned long key;
+ xmlHashEntryPtr entry;
+
+ if (table == NULL)
+ return(NULL);
+ if (name == NULL)
+ return(NULL);
+ key = xmlHashComputeKey(table, name, name2, name3);
+ if (table->table[key].valid == 0)
+ return(NULL);
+ if (table->dict) {
+ for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
+ if ((entry->name == name) &&
+ (entry->name2 == name2) &&
+ (entry->name3 == name3))
+ return(entry->payload);
+ }
+ }
+ for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
+ if ((xmlStrEqual(entry->name, name)) &&
+ (xmlStrEqual(entry->name2, name2)) &&
+ (xmlStrEqual(entry->name3, name3)))
+ return(entry->payload);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlHashQLookup3:
+ * @table: the hash table
+ * @prefix: the prefix of the userdata
+ * @name: the name of the userdata
+ * @prefix2: the second prefix of the userdata
+ * @name2: a second name of the userdata
+ * @prefix3: the third prefix of the userdata
+ * @name3: a third name of the userdata
+ *
+ * Find the userdata specified by the (@name, @name2, @name3) tuple.
+ *
+ * Returns the a pointer to the userdata
+ */
+void *
+xmlHashQLookup3(xmlHashTablePtr table,
+ const xmlChar *prefix, const xmlChar *name,
+ const xmlChar *prefix2, const xmlChar *name2,
+ const xmlChar *prefix3, const xmlChar *name3) {
+ unsigned long key;
+ xmlHashEntryPtr entry;
+
+ if (table == NULL)
+ return(NULL);
+ if (name == NULL)
+ return(NULL);
+ key = xmlHashComputeQKey(table, prefix, name, prefix2,
+ name2, prefix3, name3);
+ if (table->table[key].valid == 0)
+ return(NULL);
+ for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
+ if ((xmlStrQEqual(prefix, name, entry->name)) &&
+ (xmlStrQEqual(prefix2, name2, entry->name2)) &&
+ (xmlStrQEqual(prefix3, name3, entry->name3)))
+ return(entry->payload);
+ }
+ return(NULL);
+}
+
+typedef struct {
+ xmlHashScanner hashscanner;
+ void *data;
+} stubData;
+
+static void
+stubHashScannerFull (void *payload, void *data, const xmlChar *name,
+ const xmlChar *name2 ATTRIBUTE_UNUSED,
+ const xmlChar *name3 ATTRIBUTE_UNUSED) {
+ stubData *stubdata = (stubData *) data;
+ stubdata->hashscanner (payload, stubdata->data, (xmlChar *) name);
+}
+
+/**
+ * xmlHashScan:
+ * @table: the hash table
+ * @f: the scanner function for items in the hash
+ * @data: extra data passed to f
+ *
+ * Scan the hash @table and applied @f to each value.
+ */
+void
+xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
+ stubData stubdata;
+ stubdata.data = data;
+ stubdata.hashscanner = f;
+ xmlHashScanFull (table, stubHashScannerFull, &stubdata);
+}
+
+/**
+ * xmlHashScanFull:
+ * @table: the hash table
+ * @f: the scanner function for items in the hash
+ * @data: extra data passed to f
+ *
+ * Scan the hash @table and applied @f to each value.
+ */
+void
+xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
+ int i, nb;
+ xmlHashEntryPtr iter;
+ xmlHashEntryPtr next;
+
+ if (table == NULL)
+ return;
+ if (f == NULL)
+ return;
+
+ if (table->table) {
+ for(i = 0; i < table->size; i++) {
+ if (table->table[i].valid == 0)
+ continue;
+ iter = &(table->table[i]);
+ while (iter) {
+ next = iter->next;
+ nb = table->nbElems;
+ if ((f != NULL) && (iter->payload != NULL))
+ f(iter->payload, data, iter->name,
+ iter->name2, iter->name3);
+ if (nb != table->nbElems) {
+ /* table was modified by the callback, be careful */
+ if (iter == &(table->table[i])) {
+ if (table->table[i].valid == 0)
+ iter = NULL;
+ if (table->table[i].next != next)
+ iter = &(table->table[i]);
+ } else
+ iter = next;
+ } else
+ iter = next;
+ }
+ }
+ }
+}
+
+/**
+ * xmlHashScan3:
+ * @table: the hash table
+ * @name: the name of the userdata or NULL
+ * @name2: a second name of the userdata or NULL
+ * @name3: a third name of the userdata or NULL
+ * @f: the scanner function for items in the hash
+ * @data: extra data passed to f
+ *
+ * Scan the hash @table and applied @f to each value matching
+ * (@name, @name2, @name3) tuple. If one of the names is null,
+ * the comparison is considered to match.
+ */
+void
+xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ xmlHashScanner f, void *data) {
+ xmlHashScanFull3 (table, name, name2, name3,
+ (xmlHashScannerFull) f, data);
+}
+
+/**
+ * xmlHashScanFull3:
+ * @table: the hash table
+ * @name: the name of the userdata or NULL
+ * @name2: a second name of the userdata or NULL
+ * @name3: a third name of the userdata or NULL
+ * @f: the scanner function for items in the hash
+ * @data: extra data passed to f
+ *
+ * Scan the hash @table and applied @f to each value matching
+ * (@name, @name2, @name3) tuple. If one of the names is null,
+ * the comparison is considered to match.
+ */
+void
+xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ xmlHashScannerFull f, void *data) {
+ int i;
+ xmlHashEntryPtr iter;
+ xmlHashEntryPtr next;
+
+ if (table == NULL)
+ return;
+ if (f == NULL)
+ return;
+
+ if (table->table) {
+ for(i = 0; i < table->size; i++) {
+ if (table->table[i].valid == 0)
+ continue;
+ iter = &(table->table[i]);
+ while (iter) {
+ next = iter->next;
+ if (((name == NULL) || (xmlStrEqual(name, iter->name))) &&
+ ((name2 == NULL) || (xmlStrEqual(name2, iter->name2))) &&
+ ((name3 == NULL) || (xmlStrEqual(name3, iter->name3))) &&
+ (iter->payload != NULL)) {
+ f(iter->payload, data, iter->name,
+ iter->name2, iter->name3);
+ }
+ iter = next;
+ }
+ }
+ }
+}
+
+/**
+ * xmlHashCopy:
+ * @table: the hash table
+ * @f: the copier function for items in the hash
+ *
+ * Scan the hash @table and applied @f to each value.
+ *
+ * Returns the new table or NULL in case of error.
+ */
+xmlHashTablePtr
+xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) {
+ int i;
+ xmlHashEntryPtr iter;
+ xmlHashEntryPtr next;
+ xmlHashTablePtr ret;
+
+ if (table == NULL)
+ return(NULL);
+ if (f == NULL)
+ return(NULL);
+
+ ret = xmlHashCreate(table->size);
+ if (ret == NULL)
+ return(NULL);
+
+ if (table->table) {
+ for(i = 0; i < table->size; i++) {
+ if (table->table[i].valid == 0)
+ continue;
+ iter = &(table->table[i]);
+ while (iter) {
+ next = iter->next;
+ xmlHashAddEntry3(ret, iter->name, iter->name2,
+ iter->name3, f(iter->payload, iter->name));
+ iter = next;
+ }
+ }
+ }
+ ret->nbElems = table->nbElems;
+ return(ret);
+}
+
+/**
+ * xmlHashSize:
+ * @table: the hash table
+ *
+ * Query the number of elements installed in the hash @table.
+ *
+ * Returns the number of elements in the hash table or
+ * -1 in case of error
+ */
+int
+xmlHashSize(xmlHashTablePtr table) {
+ if (table == NULL)
+ return(-1);
+ return(table->nbElems);
+}
+
+/**
+ * xmlHashRemoveEntry:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @f: the deallocator function for removed item (if any)
+ *
+ * Find the userdata specified by the @name and remove
+ * it from the hash @table. Existing userdata for this tuple will be removed
+ * and freed with @f.
+ *
+ * Returns 0 if the removal succeeded and -1 in case of error or not found.
+ */
+int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
+ xmlHashDeallocator f) {
+ return(xmlHashRemoveEntry3(table, name, NULL, NULL, f));
+}
+
+/**
+ * xmlHashRemoveEntry2:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @f: the deallocator function for removed item (if any)
+ *
+ * Find the userdata specified by the (@name, @name2) tuple and remove
+ * it from the hash @table. Existing userdata for this tuple will be removed
+ * and freed with @f.
+ *
+ * Returns 0 if the removal succeeded and -1 in case of error or not found.
+ */
+int
+xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, xmlHashDeallocator f) {
+ return(xmlHashRemoveEntry3(table, name, name2, NULL, f));
+}
+
+/**
+ * xmlHashRemoveEntry3:
+ * @table: the hash table
+ * @name: the name of the userdata
+ * @name2: a second name of the userdata
+ * @name3: a third name of the userdata
+ * @f: the deallocator function for removed item (if any)
+ *
+ * Find the userdata specified by the (@name, @name2, @name3) tuple and remove
+ * it from the hash @table. Existing userdata for this tuple will be removed
+ * and freed with @f.
+ *
+ * Returns 0 if the removal succeeded and -1 in case of error or not found.
+ */
+int
+xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f) {
+ unsigned long key;
+ xmlHashEntryPtr entry;
+ xmlHashEntryPtr prev = NULL;
+
+ if (table == NULL || name == NULL)
+ return(-1);
+
+ key = xmlHashComputeKey(table, name, name2, name3);
+ if (table->table[key].valid == 0) {
+ return(-1);
+ } else {
+ for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
+ if (xmlStrEqual(entry->name, name) &&
+ xmlStrEqual(entry->name2, name2) &&
+ xmlStrEqual(entry->name3, name3)) {
+ if ((f != NULL) && (entry->payload != NULL))
+ f(entry->payload, entry->name);
+ entry->payload = NULL;
+ if (table->dict == NULL) {
+ if(entry->name)
+ xmlFree(entry->name);
+ if(entry->name2)
+ xmlFree(entry->name2);
+ if(entry->name3)
+ xmlFree(entry->name3);
+ }
+ if(prev) {
+ prev->next = entry->next;
+ xmlFree(entry);
+ } else {
+ if (entry->next == NULL) {
+ entry->valid = 0;
+ } else {
+ entry = entry->next;
+ memcpy(&(table->table[key]), entry, sizeof(xmlHashEntry));
+ xmlFree(entry);
+ }
+ }
+ table->nbElems--;
+ return(0);
+ }
+ prev = entry;
+ }
+ return(-1);
+ }
+}
+
+#define bottom_hash
+#include "elfgcchack.h"
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..7dbfaa5
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,5 @@
+## Process this file with automake to produce Makefile.in
+SUBDIRS=libxml
+
+EXTRA_DIST = win32config.h wsockcompat.h
+
diff --git a/include/Makefile.in b/include/Makefile.in
new file mode 100644
index 0000000..c7aea1b
--- /dev/null
+++ b/include/Makefile.in
@@ -0,0 +1,718 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = libxml
+EXTRA_DIST = win32config.h wsockcompat.h
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/libxml/DOCBparser.h b/include/libxml/DOCBparser.h
new file mode 100644
index 0000000..9394fa7
--- /dev/null
+++ b/include/libxml/DOCBparser.h
@@ -0,0 +1,96 @@
+/*
+ * Summary: old DocBook SGML parser
+ * Description: interface for a DocBook SGML non-verifying parser
+ * This code is DEPRECATED, and should not be used anymore.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DOCB_PARSER_H__
+#define __DOCB_PARSER_H__
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_DOCB_ENABLED
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+
+#ifndef IN_LIBXML
+#ifdef __GNUC__
+#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and SGML are shared.
+ */
+typedef xmlParserCtxt docbParserCtxt;
+typedef xmlParserCtxtPtr docbParserCtxtPtr;
+typedef xmlSAXHandler docbSAXHandler;
+typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
+typedef xmlParserInput docbParserInput;
+typedef xmlParserInputPtr docbParserInputPtr;
+typedef xmlDocPtr docbDocPtr;
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN int XMLCALL
+ docbEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseFile (const char *filename,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseFile (const char *filename,
+ const char *encoding);
+
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN void XMLCALL
+ docbFreeParserCtxt (docbParserCtxtPtr ctxt);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ docbParseChunk (docbParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ docbParseDocument (docbParserCtxtPtr ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DOCB_ENABLED */
+
+#endif /* __DOCB_PARSER_H__ */
diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h
new file mode 100644
index 0000000..551186c
--- /dev/null
+++ b/include/libxml/HTMLparser.h
@@ -0,0 +1,306 @@
+/*
+ * Summary: interface for an HTML 4.0 non-verifying parser
+ * Description: this module implements an HTML 4.0 non-verifying parser
+ * with API compatible with the XML parser ones. It should
+ * be able to parse "real world" HTML, even if severely
+ * broken from a specification point of view.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_PARSER_H__
+#define __HTML_PARSER_H__
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and HTML are shared.
+ */
+typedef xmlParserCtxt htmlParserCtxt;
+typedef xmlParserCtxtPtr htmlParserCtxtPtr;
+typedef xmlParserNodeInfo htmlParserNodeInfo;
+typedef xmlSAXHandler htmlSAXHandler;
+typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
+typedef xmlParserInput htmlParserInput;
+typedef xmlParserInputPtr htmlParserInputPtr;
+typedef xmlDocPtr htmlDocPtr;
+typedef xmlNodePtr htmlNodePtr;
+
+/*
+ * Internal description of an HTML element, representing HTML 4.01
+ * and XHTML 1.0 (which share the same structure).
+ */
+typedef struct _htmlElemDesc htmlElemDesc;
+typedef htmlElemDesc *htmlElemDescPtr;
+struct _htmlElemDesc {
+ const char *name; /* The tag name */
+ char startTag; /* Whether the start tag can be implied */
+ char endTag; /* Whether the end tag can be implied */
+ char saveEndTag; /* Whether the end tag should be saved */
+ char empty; /* Is this an empty element ? */
+ char depr; /* Is this a deprecated element ? */
+ char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
+ char isinline; /* is this a block 0 or inline 1 element */
+ const char *desc; /* the description */
+
+/* NRK Jan.2003
+ * New fields encapsulating HTML structure
+ *
+ * Bugs:
+ * This is a very limited representation. It fails to tell us when
+ * an element *requires* subelements (we only have whether they're
+ * allowed or not), and it doesn't tell us where CDATA and PCDATA
+ * are allowed. Some element relationships are not fully represented:
+ * these are flagged with the word MODIFIER
+ */
+ const char** subelts; /* allowed sub-elements of this element */
+ const char* defaultsubelt; /* subelement for suggested auto-repair
+ if necessary or NULL */
+ const char** attrs_opt; /* Optional Attributes */
+ const char** attrs_depr; /* Additional deprecated attributes */
+ const char** attrs_req; /* Required attributes */
+};
+
+/*
+ * Internal description of an HTML entity.
+ */
+typedef struct _htmlEntityDesc htmlEntityDesc;
+typedef htmlEntityDesc *htmlEntityDescPtr;
+struct _htmlEntityDesc {
+ unsigned int value; /* the UNICODE value for the character */
+ const char *name; /* The entity name */
+ const char *desc; /* the description */
+};
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN const htmlElemDesc * XMLCALL
+ htmlTagLookup (const xmlChar *tag);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityLookup(const xmlChar *name);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityValueLookup(unsigned int value);
+
+XMLPUBFUN int XMLCALL
+ htmlIsAutoClosed(htmlDocPtr doc,
+ htmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ htmlAutoCloseTag(htmlDocPtr doc,
+ const xmlChar *name,
+ htmlNodePtr elem);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
+ const xmlChar **str);
+XMLPUBFUN int XMLCALL
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ htmlParseElement(htmlParserCtxtPtr ctxt);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlNewParserCtxt(void);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+
+XMLPUBFUN int XMLCALL
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseFile(const char *filename,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseFile (const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ UTF8ToHtml (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+XMLPUBFUN int XMLCALL
+ htmlEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+XMLPUBFUN int XMLCALL
+ htmlIsScriptAttribute(const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ htmlHandleOmittedElem(int val);
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+XMLPUBFUN void XMLCALL
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
+ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ HTML_PARSE_NONET = 1<<11,/* Forbid network access */
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
+ HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
+ HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
+} htmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/* NRK/Jan2003: further knowledge of HTML structure
+ */
+typedef enum {
+ HTML_NA = 0 , /* something we don't check at all */
+ HTML_INVALID = 0x1 ,
+ HTML_DEPRECATED = 0x2 ,
+ HTML_VALID = 0x4 ,
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
+} htmlStatus ;
+
+/* Using htmlElemDesc rather than name here, to emphasise the fact
+ that otherwise there's a lookup overhead
+*/
+XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
+XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
+/**
+ * htmlDefaultSubelement:
+ * @elt: HTML element
+ *
+ * Returns the default subelement for this element
+ */
+#define htmlDefaultSubelement(elt) elt->defaultsubelt
+/**
+ * htmlElementAllowedHereDesc:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element description may be a
+ * direct child of the specified element.
+ *
+ * Returns 1 if allowed; 0 otherwise.
+ */
+#define htmlElementAllowedHereDesc(parent,elt) \
+ htmlElementAllowedHere((parent), (elt)->name)
+/**
+ * htmlRequiredAttrs:
+ * @elt: HTML element
+ *
+ * Returns the attributes required for the specified element.
+ */
+#define htmlRequiredAttrs(elt) (elt)->attrs_req
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+#endif /* __HTML_PARSER_H__ */
diff --git a/include/libxml/HTMLtree.h b/include/libxml/HTMLtree.h
new file mode 100644
index 0000000..c0e1103
--- /dev/null
+++ b/include/libxml/HTMLtree.h
@@ -0,0 +1,147 @@
+/*
+ * Summary: specific APIs to process HTML tree, especially serialization
+ * Description: this module implements a few function needed to process
+ * tree in an HTML specific way.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_TREE_H__
+#define __HTML_TREE_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/HTMLparser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * HTML_TEXT_NODE:
+ *
+ * Macro. A text node in a HTML document is really implemented
+ * the same way as a text node in an XML document.
+ */
+#define HTML_TEXT_NODE XML_TEXT_NODE
+/**
+ * HTML_ENTITY_REF_NODE:
+ *
+ * Macro. An entity reference in a HTML document is really implemented
+ * the same way as an entity reference in an XML document.
+ */
+#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
+/**
+ * HTML_COMMENT_NODE:
+ *
+ * Macro. A comment in a HTML document is really implemented
+ * the same way as a comment in an XML document.
+ */
+#define HTML_COMMENT_NODE XML_COMMENT_NODE
+/**
+ * HTML_PRESERVE_NODE:
+ *
+ * Macro. A preserved node in a HTML document is really implemented
+ * the same way as a CDATA section in an XML document.
+ */
+#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
+/**
+ * HTML_PI_NODE:
+ *
+ * Macro. A processing instruction in a HTML document is really implemented
+ * the same way as a processing instruction in an XML document.
+ */
+#define HTML_PI_NODE XML_PI_NODE
+
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDoc (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDocNoDtD (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN const xmlChar * XMLCALL
+ htmlGetMetaEncoding (htmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ htmlSetMetaEncoding (htmlDocPtr doc,
+ const xmlChar *encoding);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemoryFormat (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFile (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDumpFileFormat (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileFormat (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ htmlIsBooleanAttr (const xmlChar *name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#endif /* __HTML_TREE_H__ */
+
diff --git a/include/libxml/Makefile.am b/include/libxml/Makefile.am
new file mode 100644
index 0000000..cf9297a
--- /dev/null
+++ b/include/libxml/Makefile.am
@@ -0,0 +1,54 @@
+## Process this file with automake to produce Makefile.in
+
+xmlincdir = $(includedir)/libxml2/libxml
+
+xmlinc_HEADERS = \
+ SAX.h \
+ entities.h \
+ encoding.h \
+ parser.h \
+ parserInternals.h \
+ xmlerror.h \
+ HTMLparser.h \
+ HTMLtree.h \
+ debugXML.h \
+ tree.h \
+ list.h \
+ hash.h \
+ xpath.h \
+ xpathInternals.h \
+ xpointer.h \
+ xinclude.h \
+ xmlIO.h \
+ xmlmemory.h \
+ nanohttp.h \
+ nanoftp.h \
+ uri.h \
+ valid.h \
+ xlink.h \
+ xmlversion.h \
+ DOCBparser.h \
+ catalog.h \
+ threads.h \
+ globals.h \
+ c14n.h \
+ xmlautomata.h \
+ xmlregexp.h \
+ xmlmodule.h \
+ xmlschemas.h \
+ schemasInternals.h \
+ xmlschemastypes.h \
+ xmlstring.h \
+ xmlunicode.h \
+ xmlreader.h \
+ relaxng.h \
+ dict.h \
+ SAX2.h \
+ xmlexports.h \
+ xmlwriter.h \
+ chvalid.h \
+ pattern.h \
+ xmlsave.h \
+ schematron.h
+
+EXTRA_DIST = xmlversion.h.in
diff --git a/include/libxml/Makefile.in b/include/libxml/Makefile.in
new file mode 100644
index 0000000..ce84b54
--- /dev/null
+++ b/include/libxml/Makefile.in
@@ -0,0 +1,709 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include/libxml
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(srcdir)/xmlversion.h.in $(xmlinc_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = xmlversion.h
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(xmlincdir)"
+HEADERS = $(xmlinc_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+xmlincdir = $(includedir)/libxml2/libxml
+xmlinc_HEADERS = \
+ SAX.h \
+ entities.h \
+ encoding.h \
+ parser.h \
+ parserInternals.h \
+ xmlerror.h \
+ HTMLparser.h \
+ HTMLtree.h \
+ debugXML.h \
+ tree.h \
+ list.h \
+ hash.h \
+ xpath.h \
+ xpathInternals.h \
+ xpointer.h \
+ xinclude.h \
+ xmlIO.h \
+ xmlmemory.h \
+ nanohttp.h \
+ nanoftp.h \
+ uri.h \
+ valid.h \
+ xlink.h \
+ xmlversion.h \
+ DOCBparser.h \
+ catalog.h \
+ threads.h \
+ globals.h \
+ c14n.h \
+ xmlautomata.h \
+ xmlregexp.h \
+ xmlmodule.h \
+ xmlschemas.h \
+ schemasInternals.h \
+ xmlschemastypes.h \
+ xmlstring.h \
+ xmlunicode.h \
+ xmlreader.h \
+ relaxng.h \
+ dict.h \
+ SAX2.h \
+ xmlexports.h \
+ xmlwriter.h \
+ chvalid.h \
+ pattern.h \
+ xmlsave.h \
+ schematron.h
+
+EXTRA_DIST = xmlversion.h.in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/libxml/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/libxml/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+xmlversion.h: $(top_builddir)/config.status $(srcdir)/xmlversion.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-xmlincHEADERS: $(xmlinc_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(xmlincdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(xmlincdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xmlincdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(xmlincdir)" || exit $$?; \
+ done
+
+uninstall-xmlincHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlinc_HEADERS)'; test -n "$(xmlincdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(xmlincdir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(xmlincdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-xmlincHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-xmlincHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-xmlincHEADERS installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-xmlincHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/libxml/SAX.h b/include/libxml/SAX.h
new file mode 100644
index 0000000..20093ce
--- /dev/null
+++ b/include/libxml/SAX.h
@@ -0,0 +1,173 @@
+/*
+ * Summary: Old SAX version 1 handler, deprecated
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
+ * build the DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX_H__
+#define __XML_SAX_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef LIBXML_LEGACY_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ getPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ getSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ setDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ getLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ getColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ isStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ internalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ externalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ resolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ entityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ attributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ elementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ notationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ unparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ startDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ endDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ attribute (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ startElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ endElement (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ ignorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ processingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ globalNamespace (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ setNamespace (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlNsPtr XMLCALL
+ getNamespace (void *ctx);
+XMLPUBFUN int XMLCALL
+ checkNamespace (void *ctx,
+ xmlChar *nameSpace);
+XMLPUBFUN void XMLCALL
+ namespaceDecl (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ cdataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#endif /* __XML_SAX_H__ */
diff --git a/include/libxml/SAX2.h b/include/libxml/SAX2.h
new file mode 100644
index 0000000..a55212e
--- /dev/null
+++ b/include/libxml/SAX2.h
@@ -0,0 +1,178 @@
+/*
+ * Summary: SAX2 parser interface used to build the DOM tree
+ * Description: those are the default SAX2 interfaces used by
+ * the library when building DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX2_H__
+#define __XML_SAX2_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2SetDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2IsStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2InternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ExternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlSAX2ResolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2EntityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2AttributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ElementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2NotationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ xmlSAX2UnparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndDocument (void *ctx);
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
+ defined(LIBXML_LEGACY_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElement (void *ctx,
+ const xmlChar *name);
+#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2IgnorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ProcessingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlSAX2CDataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXDefaultVersion (int version);
+#endif /* LIBXML_SAX1_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlSAXVersion (xmlSAXHandler *hdlr,
+ int version);
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ htmlDefaultSAXHandlerInit (void);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ docbDefaultSAXHandlerInit (void);
+#endif
+XMLPUBFUN void XMLCALL
+ xmlDefaultSAXHandlerInit (void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_SAX2_H__ */
diff --git a/include/libxml/c14n.h b/include/libxml/c14n.h
new file mode 100644
index 0000000..b8971d9
--- /dev/null
+++ b/include/libxml/c14n.h
@@ -0,0 +1,126 @@
+/*
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
+ * Description: the c14n modules provides a
+ *
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * and an
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XML_C14N_H__
+#define __XML_C14N_H__
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+/*
+ * XML Canonicazation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * Exclusive XML Canonicazation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Canonical form of an XML document could be created if and only if
+ * a) default attributes (if any) are added to all nodes
+ * b) all character and parsed entity references are resolved
+ * In order to achive this in libxml2 the document MUST be loaded with
+ * following global setings:
+ *
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * xmlSubstituteEntitiesDefault(1);
+ *
+ * or corresponding parser context setting:
+ * xmlParserCtxtPtr ctxt;
+ *
+ * ...
+ * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * ctxt->replaceEntities = 1;
+ * ...
+ */
+
+/*
+ * xmlC14NMode:
+ *
+ * Predefined values for C14N modes
+ *
+ */
+typedef enum {
+ XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
+} xmlC14NMode;
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSaveTo (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlChar **doc_txt_ptr);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSave (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ const char* filename,
+ int compression);
+
+
+/**
+ * This is the core C14N function
+ */
+/**
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the curent node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+ */
+typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NExecute (xmlDocPtr doc,
+ xmlC14NIsVisibleCallback is_visible_callback,
+ void* user_data,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* LIBXML_C14N_ENABLED */
+#endif /* __XML_C14N_H__ */
+
diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h
new file mode 100644
index 0000000..5a13f51
--- /dev/null
+++ b/include/libxml/catalog.h
@@ -0,0 +1,182 @@
+/**
+ * Summary: interfaces to the Catalog handling system
+ * Description: the catalog module implements the support for
+ * XML Catalogs and SGML catalogs
+ *
+ * SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CATALOG_H__
+#define __XML_CATALOG_H__
+
+#include <stdio.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_CATALOG_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_CATALOGS_NAMESPACE:
+ *
+ * The namespace for the XML Catalogs elements.
+ */
+#define XML_CATALOGS_NAMESPACE \
+ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
+/**
+ * XML_CATALOG_PI:
+ *
+ * The specific XML Catalog Processing Instuction name.
+ */
+#define XML_CATALOG_PI \
+ (const xmlChar *) "oasis-xml-catalog"
+
+/*
+ * The API is voluntarily limited to general cataloging.
+ */
+typedef enum {
+ XML_CATA_PREFER_NONE = 0,
+ XML_CATA_PREFER_PUBLIC = 1,
+ XML_CATA_PREFER_SYSTEM
+} xmlCatalogPrefer;
+
+typedef enum {
+ XML_CATA_ALLOW_NONE = 0,
+ XML_CATA_ALLOW_GLOBAL = 1,
+ XML_CATA_ALLOW_DOCUMENT = 2,
+ XML_CATA_ALLOW_ALL = 3
+} xmlCatalogAllow;
+
+typedef struct _xmlCatalog xmlCatalog;
+typedef xmlCatalog *xmlCatalogPtr;
+
+/*
+ * Operations on a given catalog.
+ */
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlNewCatalog (int sgml);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadACatalog (const char *filename);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadSGMLSuperCatalog (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlConvertSGMLCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlACatalogAdd (xmlCatalogPtr catal,
+ const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlACatalogRemove (xmlCatalogPtr catal,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolve (xmlCatalogPtr catal,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveSystem(xmlCatalogPtr catal,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolvePublic(xmlCatalogPtr catal,
+ const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveURI (xmlCatalogPtr catal,
+ const xmlChar *URI);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlACatalogDump (xmlCatalogPtr catal,
+ FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlCatalogIsEmpty (xmlCatalogPtr catal);
+
+/*
+ * Global operations.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitializeCatalog (void);
+XMLPUBFUN int XMLCALL
+ xmlLoadCatalog (const char *filename);
+XMLPUBFUN void XMLCALL
+ xmlLoadCatalogs (const char *paths);
+XMLPUBFUN void XMLCALL
+ xmlCatalogCleanup (void);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCatalogDump (FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolve (const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveSystem (const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolvePublic (const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveURI (const xmlChar *URI);
+XMLPUBFUN int XMLCALL
+ xmlCatalogAdd (const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlCatalogRemove (const xmlChar *value);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseCatalogFile (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlCatalogConvert (void);
+
+/*
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCatalogFreeLocal (void *catalogs);
+XMLPUBFUN void * XMLCALL
+ xmlCatalogAddLocal (void *catalogs,
+ const xmlChar *URL);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolve (void *catalogs,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolveURI(void *catalogs,
+ const xmlChar *URI);
+/*
+ * Preference settings.
+ */
+XMLPUBFUN int XMLCALL
+ xmlCatalogSetDebug (int level);
+XMLPUBFUN xmlCatalogPrefer XMLCALL
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
+XMLPUBFUN void XMLCALL
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
+XMLPUBFUN xmlCatalogAllow XMLCALL
+ xmlCatalogGetDefaults (void);
+
+
+/* DEPRECATED interfaces */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetSystem (const xmlChar *sysID);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetPublic (const xmlChar *pubID);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_CATALOG_ENABLED */
+#endif /* __XML_CATALOG_H__ */
diff --git a/include/libxml/chvalid.h b/include/libxml/chvalid.h
new file mode 100644
index 0000000..fb43016
--- /dev/null
+++ b/include/libxml/chvalid.h
@@ -0,0 +1,230 @@
+/*
+ * Summary: Unicode character range checking
+ * Description: this module exports interfaces for the character
+ * range validation APIs
+ *
+ * This file is automatically generated from the cvs source
+ * definition files using the genChRanges.py Python script
+ *
+ * Generation date: Mon Mar 27 11:09:48 2006
+ * Sources: chvalid.def
+ * Author: William Brack <wbrack@mmm.com.hk>
+ */
+
+#ifndef __XML_CHVALID_H__
+#define __XML_CHVALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Define our typedefs and structures
+ *
+ */
+typedef struct _xmlChSRange xmlChSRange;
+typedef xmlChSRange *xmlChSRangePtr;
+struct _xmlChSRange {
+ unsigned short low;
+ unsigned short high;
+};
+
+typedef struct _xmlChLRange xmlChLRange;
+typedef xmlChLRange *xmlChLRangePtr;
+struct _xmlChLRange {
+ unsigned int low;
+ unsigned int high;
+};
+
+typedef struct _xmlChRangeGroup xmlChRangeGroup;
+typedef xmlChRangeGroup *xmlChRangeGroupPtr;
+struct _xmlChRangeGroup {
+ int nbShortRange;
+ int nbLongRange;
+ const xmlChSRange *shortRange; /* points to an array of ranges */
+ const xmlChLRange *longRange;
+};
+
+/**
+ * Range checking routine
+ */
+XMLPUBFUN int XMLCALL
+ xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
+
+
+/**
+ * xmlIsBaseChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)) || \
+ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
+ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
+ (0xf8 <= (c)))
+
+/**
+ * xmlIsBaseCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
+ xmlIsBaseChar_ch((c)) : \
+ xmlCharInRange((c), &xmlIsBaseCharGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
+
+/**
+ * xmlIsBlank_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlank_ch(c) (((c) == 0x20) || \
+ ((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd))
+
+/**
+ * xmlIsBlankQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlankQ(c) (((c) < 0x100) ? \
+ xmlIsBlank_ch((c)) : 0)
+
+
+/**
+ * xmlIsChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd) || \
+ (0x20 <= (c)))
+
+/**
+ * xmlIsCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCharQ(c) (((c) < 0x100) ? \
+ xmlIsChar_ch((c)) :\
+ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
+ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
+ ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
+
+/**
+ * xmlIsCombiningQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
+ 0 : \
+ xmlCharInRange((c), &xmlIsCombiningGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
+
+/**
+ * xmlIsDigit_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
+
+/**
+ * xmlIsDigitQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigitQ(c) (((c) < 0x100) ? \
+ xmlIsDigit_ch((c)) : \
+ xmlCharInRange((c), &xmlIsDigitGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
+
+/**
+ * xmlIsExtender_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtender_ch(c) (((c) == 0xb7))
+
+/**
+ * xmlIsExtenderQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
+ xmlIsExtender_ch((c)) : \
+ xmlCharInRange((c), &xmlIsExtenderGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
+
+/**
+ * xmlIsIdeographicQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
+ 0 :\
+ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
+ ((c) == 0x3007) || \
+ ((0x3021 <= (c)) && ((c) <= 0x3029))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
+XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
+
+/**
+ * xmlIsPubidChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
+
+/**
+ * xmlIsPubidCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
+ xmlIsPubidChar_ch((c)) : 0)
+
+XMLPUBFUN int XMLCALL
+ xmlIsBaseChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsBlank(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsCombining(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsDigit(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsExtender(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsIdeographic(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsPubidChar(unsigned int ch);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_CHVALID_H__ */
diff --git a/include/libxml/debugXML.h b/include/libxml/debugXML.h
new file mode 100644
index 0000000..5b3be13
--- /dev/null
+++ b/include/libxml/debugXML.h
@@ -0,0 +1,217 @@
+/*
+ * Summary: Tree debugging APIs
+ * Description: Interfaces to a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DEBUG_XML__
+#define __DEBUG_XML__
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The standard Dump routines.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpString (FILE *output,
+ const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttr (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttrList (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpOneNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNodeList (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocumentHead(FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocument (FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDTD (FILE *output,
+ xmlDtdPtr dtd);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpEntities (FILE *output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN int XMLCALL
+ xmlDebugCheckDocument (FILE * output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * XML shell helpers *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN void XMLCALL
+ xmlLsOneNode (FILE *output, xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlLsCountNode (xmlNodePtr node);
+
+XMLPUBFUN const char * XMLCALL
+ xmlBoolToText (int boolval);
+
+/****************************************************************
+ * *
+ * The XML shell related structures and functions *
+ * *
+ ****************************************************************/
+
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlShellReadlineFunc:
+ * @prompt: a string prompt
+ *
+ * This is a generic signature for the XML shell input function.
+ *
+ * Returns a string which will be freed by the Shell.
+ */
+typedef char * (* xmlShellReadlineFunc)(char *prompt);
+
+/**
+ * xmlShellCtxt:
+ *
+ * A debugging shell context.
+ * TODO: add the defined function tables.
+ */
+typedef struct _xmlShellCtxt xmlShellCtxt;
+typedef xmlShellCtxt *xmlShellCtxtPtr;
+struct _xmlShellCtxt {
+ char *filename;
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ xmlXPathContextPtr pctxt;
+ int loaded;
+ FILE *output;
+ xmlShellReadlineFunc input;
+};
+
+/**
+ * xmlShellCmd:
+ * @ctxt: a shell context
+ * @arg: a string argument
+ * @node: a first node
+ * @node2: a second node
+ *
+ * This is a generic signature for the XML shell functions.
+ *
+ * Returns an int, negative returns indicating errors.
+ */
+typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathError (int errorType,
+ const char *arg);
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathResult(xmlXPathObjectPtr list);
+XMLPUBFUN int XMLCALL
+ xmlShellList (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellBase (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellDir (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellLoad (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlShellPrintNode (xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlShellCat (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellWrite (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellSave (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlShellValidate (xmlShellCtxtPtr ctxt,
+ char *dtd,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_VALID_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlShellDu (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr tree,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellPwd (xmlShellCtxtPtr ctxt,
+ char *buffer,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+/*
+ * The Shell interface.
+ */
+XMLPUBFUN void XMLCALL
+ xmlShell (xmlDocPtr doc,
+ char *filename,
+ xmlShellReadlineFunc input,
+ FILE *output);
+
+#endif /* LIBXML_XPATH_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DEBUG_ENABLED */
+#endif /* __DEBUG_XML__ */
diff --git a/include/libxml/dict.h b/include/libxml/dict.h
new file mode 100644
index 0000000..7022ec8
--- /dev/null
+++ b/include/libxml/dict.h
@@ -0,0 +1,80 @@
+/*
+ * Summary: string dictionnary
+ * Description: dictionary of reusable strings, just used to avoid allocation
+ * and freeing operations.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_DICT_H__
+#define __XML_DICT_H__
+
+#include <limits.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The dictionnary.
+ */
+typedef struct _xmlDict xmlDict;
+typedef xmlDict *xmlDictPtr;
+
+/*
+ * Initializer
+ */
+XMLPUBFUN int XMLCALL xmlInitializeDict(void);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreate (void);
+XMLPUBFUN size_t XMLCALL
+ xmlDictSetLimit (xmlDictPtr dict,
+ size_t limit);
+XMLPUBFUN size_t XMLCALL
+ xmlDictGetUsage (xmlDictPtr dict);
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreateSub(xmlDictPtr sub);
+XMLPUBFUN int XMLCALL
+ xmlDictReference(xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlDictFree (xmlDictPtr dict);
+
+/*
+ * Lookup of entry in the dictionnary.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictLookup (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictExists (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictQLookup (xmlDictPtr dict,
+ const xmlChar *prefix,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlDictOwns (xmlDictPtr dict,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlDictSize (xmlDictPtr dict);
+
+/*
+ * Cleanup function
+ */
+XMLPUBFUN void XMLCALL
+ xmlDictCleanup (void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_DICT_H__ */
diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h
new file mode 100644
index 0000000..7967cc6
--- /dev/null
+++ b/include/libxml/encoding.h
@@ -0,0 +1,240 @@
+/*
+ * Summary: interface for the encoding conversion functions
+ * Description: interface for the encoding conversion functions needed for
+ * XML basic encoding and iconv() support.
+ *
+ * Related specs are
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CHAR_ENCODING_H__
+#define __XML_CHAR_ENCODING_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_ICONV_ENABLED
+#include <iconv.h>
+#endif
+#ifdef LIBXML_ICU_ENABLED
+#include <unicode/ucnv.h>
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlCharEncoding:
+ *
+ * Predefined values for some standard encodings.
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
+ *
+ * Anything else would have to be translated to UTF8 before being
+ * given to the parser itself. The BOM for UTF16 and the encoding
+ * declaration are looked at and a converter is looked for at that
+ * point. If not found the parser stops here as asked by the XML REC. A
+ * converter can be registered by the user using xmlRegisterCharEncodingHandler
+ * but the current form doesn't allow stateful transcoding (a serious
+ * problem agreed !). If iconv has been found it will be used
+ * automatically and allow stateful transcoding, the simplest is then
+ * to be sure to enable iconv and to provide iconv libs for the encoding
+ * support needed.
+ *
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
+ * the specific UTF-16LE and UTF-16BE are present.
+ */
+typedef enum {
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
+ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
+} xmlCharEncoding;
+
+/**
+ * xmlCharEncodingInputFunc:
+ * @out: a pointer to an array of bytes to store the UTF-8 result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of chars in the original encoding
+ * @inlen: the length of @in
+ *
+ * Take a block of chars in the original encoding and try to convert
+ * it to an UTF-8 block of chars out.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/**
+ * xmlCharEncodingOutputFunc:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to another
+ * encoding.
+ * Note: a first call designed to produce heading info is called with
+ * in = NULL. If stateful this should also initialize the encoder state.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets produced.
+ */
+typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/*
+ * Block defining the handlers for non UTF-8 encodings.
+ * If iconv is supported, there are two extra fields.
+ */
+#ifdef LIBXML_ICU_ENABLED
+struct _uconv_t {
+ UConverter *uconv; /* for conversion between an encoding and UTF-16 */
+ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
+};
+typedef struct _uconv_t uconv_t;
+#endif
+
+typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
+typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
+struct _xmlCharEncodingHandler {
+ char *name;
+ xmlCharEncodingInputFunc input;
+ xmlCharEncodingOutputFunc output;
+#ifdef LIBXML_ICONV_ENABLED
+ iconv_t iconv_in;
+ iconv_t iconv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ uconv_t *uconv_in;
+ uconv_t *uconv_out;
+#endif /* LIBXML_ICU_ENABLED */
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Interfaces for encoding handlers.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlFindCharEncodingHandler (const char *name);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlNewCharEncodingHandler (const char *name,
+ xmlCharEncodingInputFunc input,
+ xmlCharEncodingOutputFunc output);
+
+/*
+ * Interfaces for encoding names and aliases.
+ */
+XMLPUBFUN int XMLCALL
+ xmlAddEncodingAlias (const char *name,
+ const char *alias);
+XMLPUBFUN int XMLCALL
+ xmlDelEncodingAlias (const char *alias);
+XMLPUBFUN const char * XMLCALL
+ xmlGetEncodingAlias (const char *alias);
+XMLPUBFUN void XMLCALL
+ xmlCleanupEncodingAliases (void);
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlParseCharEncoding (const char *name);
+XMLPUBFUN const char * XMLCALL
+ xmlGetCharEncodingName (xmlCharEncoding enc);
+
+/*
+ * Interfaces directly used by the parsers.
+ */
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlDetectCharEncoding (const unsigned char *in,
+ int len);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
+
+/*
+ * Export a few useful functions
+ */
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ UTF8Toisolat1 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ isolat1ToUTF8 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_CHAR_ENCODING_H__ */
diff --git a/include/libxml/entities.h b/include/libxml/entities.h
new file mode 100644
index 0000000..47b4573
--- /dev/null
+++ b/include/libxml/entities.h
@@ -0,0 +1,151 @@
+/*
+ * Summary: interface for the XML entities handling
+ * Description: this module provides some of the entity API needed
+ * for the parser and applications.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ENTITIES_H__
+#define __XML_ENTITIES_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The different valid entity types.
+ */
+typedef enum {
+ XML_INTERNAL_GENERAL_ENTITY = 1,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
+ XML_INTERNAL_PARAMETER_ENTITY = 4,
+ XML_EXTERNAL_PARAMETER_ENTITY = 5,
+ XML_INTERNAL_PREDEFINED_ENTITY = 6
+} xmlEntityType;
+
+/*
+ * An unit of storage for an entity, contains the string, the value
+ * and the linkind data needed for the linking in the hash table.
+ */
+
+struct _xmlEntity {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
+ const xmlChar *name; /* Entity name */
+ struct _xmlNode *children; /* First child link */
+ struct _xmlNode *last; /* Last child link */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlChar *orig; /* content without ref substitution */
+ xmlChar *content; /* content or ndata if unparsed */
+ int length; /* the content length */
+ xmlEntityType etype; /* The entity type */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
+
+ struct _xmlEntity *nexte; /* unused */
+ const xmlChar *URI; /* the full URI as computed */
+ int owner; /* does the entity own the childrens */
+ int checked; /* was the entity content checked */
+ /* this is also used to count entities
+ * references done from that entity
+ * and if it contains '<' */
+};
+
+/*
+ * All entities are stored in an hash table.
+ * There is 2 separate hash tables for global and parameter entities.
+ */
+
+typedef struct _xmlHashTable xmlEntitiesTable;
+typedef xmlEntitiesTable *xmlEntitiesTablePtr;
+
+/*
+ * External functions:
+ */
+
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlInitializePredefinedEntities (void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlNewEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDocEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDtdEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetPredefinedEntity (const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDocEntity (const xmlDoc *doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDtdEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetParameterEntity (xmlDocPtr doc,
+ const xmlChar *name);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlEncodeEntities (xmlDocPtr doc,
+ const xmlChar *input);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeEntitiesReentrant(xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeSpecialChars (const xmlDoc *doc,
+ const xmlChar *input);
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCreateEntitiesTable (void);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpEntitiesTable (xmlBufferPtr buf,
+ xmlEntitiesTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpEntityDecl (xmlBufferPtr buf,
+ xmlEntityPtr ent);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCleanupPredefinedEntities(void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+# endif /* __XML_ENTITIES_H__ */
diff --git a/include/libxml/globals.h b/include/libxml/globals.h
new file mode 100644
index 0000000..a9305aa
--- /dev/null
+++ b/include/libxml/globals.h
@@ -0,0 +1,509 @@
+/*
+ * Summary: interface for all global variables of the library
+ * Description: all the global variables and thread handling for
+ * those variables is handled by this module.
+ *
+ * The bottom of this file is automatically generated by build_glob.py
+ * based on the description file global.data
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
+ */
+
+#ifndef __XML_GLOBALS_H
+#define __XML_GLOBALS_H
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/SAX.h>
+#include <libxml/SAX2.h>
+#include <libxml/xmlmemory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitGlobals(void);
+XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
+
+/**
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,
+ xmlCharEncoding enc);
+
+
+/**
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
+
+/*
+ * Externally global symbols which need to be protected for backwards
+ * compatibility support.
+ */
+
+#undef docbDefaultSAXHandler
+#undef htmlDefaultSAXHandler
+#undef oldXMLWDcompatibility
+#undef xmlBufferAllocScheme
+#undef xmlDefaultBufferSize
+#undef xmlDefaultSAXHandler
+#undef xmlDefaultSAXLocator
+#undef xmlDoValidityCheckingDefaultValue
+#undef xmlFree
+#undef xmlGenericError
+#undef xmlStructuredError
+#undef xmlGenericErrorContext
+#undef xmlStructuredErrorContext
+#undef xmlGetWarningsDefaultValue
+#undef xmlIndentTreeOutput
+#undef xmlTreeIndentString
+#undef xmlKeepBlanksDefaultValue
+#undef xmlLineNumbersDefaultValue
+#undef xmlLoadExtDtdDefaultValue
+#undef xmlMalloc
+#undef xmlMallocAtomic
+#undef xmlMemStrdup
+#undef xmlParserDebugEntities
+#undef xmlParserVersion
+#undef xmlPedanticParserDefaultValue
+#undef xmlRealloc
+#undef xmlSaveNoEmptyTags
+#undef xmlSubstituteEntitiesDefaultValue
+#undef xmlRegisterNodeDefaultValue
+#undef xmlDeregisterNodeDefaultValue
+#undef xmlLastError
+#undef xmlParserInputBufferCreateFilenameValue
+#undef xmlOutputBufferCreateFilenameValue
+
+/**
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+ */
+typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
+/**
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+ */
+typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
+
+typedef struct _xmlGlobalState xmlGlobalState;
+typedef xmlGlobalState *xmlGlobalStatePtr;
+struct _xmlGlobalState
+{
+ const char *xmlParserVersion;
+
+ xmlSAXLocator xmlDefaultSAXLocator;
+ xmlSAXHandlerV1 xmlDefaultSAXHandler;
+ xmlSAXHandlerV1 docbDefaultSAXHandler;
+ xmlSAXHandlerV1 htmlDefaultSAXHandler;
+
+ xmlFreeFunc xmlFree;
+ xmlMallocFunc xmlMalloc;
+ xmlStrdupFunc xmlMemStrdup;
+ xmlReallocFunc xmlRealloc;
+
+ xmlGenericErrorFunc xmlGenericError;
+ xmlStructuredErrorFunc xmlStructuredError;
+ void *xmlGenericErrorContext;
+
+ int oldXMLWDcompatibility;
+
+ xmlBufferAllocationScheme xmlBufferAllocScheme;
+ int xmlDefaultBufferSize;
+
+ int xmlSubstituteEntitiesDefaultValue;
+ int xmlDoValidityCheckingDefaultValue;
+ int xmlGetWarningsDefaultValue;
+ int xmlKeepBlanksDefaultValue;
+ int xmlLineNumbersDefaultValue;
+ int xmlLoadExtDtdDefaultValue;
+ int xmlParserDebugEntities;
+ int xmlPedanticParserDefaultValue;
+
+ int xmlSaveNoEmptyTags;
+ int xmlIndentTreeOutput;
+ const char *xmlTreeIndentString;
+
+ xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+ xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+
+ xmlMallocFunc xmlMallocAtomic;
+ xmlError xmlLastError;
+
+ xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+ xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+
+ void *xmlStructuredErrorContext;
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/threads.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
+
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefParserInputBufferCreateFilenameDefault(
+ xmlParserInputBufferCreateFilenameFunc func);
+
+/** DOC_DISABLE */
+/*
+ * In general the memory allocation entry points are not kept
+ * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
+ * - xmlMalloc
+ * - xmlMallocAtomic
+ * - xmlRealloc
+ * - xmlMemStrdup
+ * - xmlFree
+ */
+
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
+#define xmlMalloc \
+(*(__xmlMalloc()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
+#define xmlMallocAtomic \
+(*(__xmlMallocAtomic()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
+#define xmlRealloc \
+(*(__xmlRealloc()))
+#else
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
+#define xmlFree \
+(*(__xmlFree()))
+#else
+XMLPUBVAR xmlFreeFunc xmlFree;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
+#define xmlMemStrdup \
+(*(__xmlMemStrdup()))
+#else
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif
+
+#else /* !LIBXML_THREAD_ALLOC_ENABLED */
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+XMLPUBVAR xmlFreeFunc xmlFree;
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif /* LIBXML_THREAD_ALLOC_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define docbDefaultSAXHandler \
+(*(__docbDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
+#endif
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define htmlDefaultSAXHandler \
+(*(__htmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
+#endif
+#endif
+
+XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLastError \
+(*(__xmlLastError()))
+#else
+XMLPUBVAR xmlError xmlLastError;
+#endif
+
+/*
+ * Everything starting from the line below is
+ * Automatically generated by build_glob.py.
+ * Do not modify the previous line.
+ */
+
+
+XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define oldXMLWDcompatibility \
+(*(__oldXMLWDcompatibility()))
+#else
+XMLPUBVAR int oldXMLWDcompatibility;
+#endif
+
+XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlBufferAllocScheme \
+(*(__xmlBufferAllocScheme()))
+#else
+XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
+#endif
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+ xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
+
+XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultBufferSize \
+(*(__xmlDefaultBufferSize()))
+#else
+XMLPUBVAR int xmlDefaultBufferSize;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
+
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXHandler \
+(*(__xmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
+#endif
+
+XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXLocator \
+(*(__xmlDefaultSAXLocator()))
+#else
+XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDoValidityCheckingDefaultValue \
+(*(__xmlDoValidityCheckingDefaultValue()))
+#else
+XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
+
+XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericError \
+(*(__xmlGenericError()))
+#else
+XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
+#endif
+
+XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredError \
+(*(__xmlStructuredError()))
+#else
+XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericErrorContext \
+(*(__xmlGenericErrorContext()))
+#else
+XMLPUBVAR void * xmlGenericErrorContext;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredErrorContext \
+(*(__xmlStructuredErrorContext()))
+#else
+XMLPUBVAR void * xmlStructuredErrorContext;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGetWarningsDefaultValue \
+(*(__xmlGetWarningsDefaultValue()))
+#else
+XMLPUBVAR int xmlGetWarningsDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlIndentTreeOutput \
+(*(__xmlIndentTreeOutput()))
+#else
+XMLPUBVAR int xmlIndentTreeOutput;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlTreeIndentString \
+(*(__xmlTreeIndentString()))
+#else
+XMLPUBVAR const char * xmlTreeIndentString;
+#endif
+XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
+
+XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlKeepBlanksDefaultValue \
+(*(__xmlKeepBlanksDefaultValue()))
+#else
+XMLPUBVAR int xmlKeepBlanksDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLineNumbersDefaultValue \
+(*(__xmlLineNumbersDefaultValue()))
+#else
+XMLPUBVAR int xmlLineNumbersDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLoadExtDtdDefaultValue \
+(*(__xmlLoadExtDtdDefaultValue()))
+#else
+XMLPUBVAR int xmlLoadExtDtdDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserDebugEntities \
+(*(__xmlParserDebugEntities()))
+#else
+XMLPUBVAR int xmlParserDebugEntities;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserVersion \
+(*(__xmlParserVersion()))
+#else
+XMLPUBVAR const char * xmlParserVersion;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlPedanticParserDefaultValue \
+(*(__xmlPedanticParserDefaultValue()))
+#else
+XMLPUBVAR int xmlPedanticParserDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSaveNoEmptyTags \
+(*(__xmlSaveNoEmptyTags()))
+#else
+XMLPUBVAR int xmlSaveNoEmptyTags;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSubstituteEntitiesDefaultValue \
+(*(__xmlSubstituteEntitiesDefaultValue()))
+#else
+XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
+
+XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlRegisterNodeDefaultValue \
+(*(__xmlRegisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDeregisterNodeDefaultValue \
+(*(__xmlDeregisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
+ __xmlParserInputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserInputBufferCreateFilenameValue \
+(*(__xmlParserInputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+#endif
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlOutputBufferCreateFilenameValue \
+(*(__xmlOutputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_GLOBALS_H */
diff --git a/include/libxml/hash.h b/include/libxml/hash.h
new file mode 100644
index 0000000..dc8ab7e
--- /dev/null
+++ b/include/libxml/hash.h
@@ -0,0 +1,233 @@
+/*
+ * Summary: Chained hash tables
+ * Description: This module implements the hash table support used in
+ * various places in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Bjorn Reese <bjorn.reese@systematic.dk>
+ */
+
+#ifndef __XML_HASH_H__
+#define __XML_HASH_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The hash table.
+ */
+typedef struct _xmlHashTable xmlHashTable;
+typedef xmlHashTable *xmlHashTablePtr;
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Recent version of gcc produce a warning when a function pointer is assigned
+ * to an object pointer, or vice versa. The following macro is a dirty hack
+ * to allow suppression of the warning. If your architecture has function
+ * pointers which are a different size than a void pointer, there may be some
+ * serious trouble within the library.
+ */
+/**
+ * XML_CAST_FPTR:
+ * @fptr: pointer to a function
+ *
+ * Macro to do a casting from an object pointer to a
+ * function pointer without encountering a warning from
+ * gcc
+ *
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
+ */
+
+#define XML_CAST_FPTR(fptr) fptr
+
+
+/*
+ * function types:
+ */
+/**
+ * xmlHashDeallocator:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to free data from a hash.
+ */
+typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
+/**
+ * xmlHashCopier:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to copy data from a hash.
+ *
+ * Returns a copy of the data or NULL in case of error.
+ */
+typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
+/**
+ * xmlHashScanner:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ *
+ * Callback when scanning data in a hash with the simple scanner.
+ */
+typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
+/**
+ * xmlHashScannerFull:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ * @name2: the second name associated
+ * @name3: the third name associated
+ *
+ * Callback when scanning data in a hash with the full scanner.
+ */
+typedef void (*xmlHashScannerFull)(void *payload, void *data,
+ const xmlChar *name, const xmlChar *name2,
+ const xmlChar *name3);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreate (int size);
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreateDict(int size,
+ xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlHashFree (xmlHashTablePtr table,
+ xmlHashDeallocator f);
+
+/*
+ * Add a new entry to the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry (xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry(xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata,
+ xmlHashDeallocator f);
+
+/*
+ * Remove an entry from the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ xmlHashDeallocator f);
+
+/*
+ * Retrieve the userdata.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup (xmlHashTablePtr table,
+ const xmlChar *name);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2,
+ const xmlChar *name3,
+ const xmlChar *prefix3);
+
+/*
+ * Helpers.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCopy (xmlHashTablePtr table,
+ xmlHashCopier f);
+XMLPUBFUN int XMLCALL
+ xmlHashSize (xmlHashTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlHashScan (xmlHashTablePtr table,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScan3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull (xmlHashTablePtr table,
+ xmlHashScannerFull f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScannerFull f,
+ void *data);
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_HASH_H__ */
diff --git a/include/libxml/list.h b/include/libxml/list.h
new file mode 100644
index 0000000..0504e0c
--- /dev/null
+++ b/include/libxml/list.h
@@ -0,0 +1,137 @@
+/*
+ * Summary: lists interfaces
+ * Description: this module implement the list support used in
+ * various place in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>
+ */
+
+#ifndef __XML_LINK_INCLUDE__
+#define __XML_LINK_INCLUDE__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlLink xmlLink;
+typedef xmlLink *xmlLinkPtr;
+
+typedef struct _xmlList xmlList;
+typedef xmlList *xmlListPtr;
+
+/**
+ * xmlListDeallocator:
+ * @lk: the data to deallocate
+ *
+ * Callback function used to free data from a list.
+ */
+typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
+/**
+ * xmlListDataCompare:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Callback function used to compare 2 data.
+ *
+ * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
+ */
+typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
+/**
+ * xmlListWalker:
+ * @data: the data found in the list
+ * @user: extra user provided data to the walker
+ *
+ * Callback function used when walking a list with xmlListWalk().
+ *
+ * Returns 0 to stop walking the list, 1 otherwise.
+ */
+typedef int (*xmlListWalker) (const void *data, const void *user);
+
+/* Creation/Deletion */
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListCreate (xmlListDeallocator deallocator,
+ xmlListDataCompare compare);
+XMLPUBFUN void XMLCALL
+ xmlListDelete (xmlListPtr l);
+
+/* Basic Operators */
+XMLPUBFUN void * XMLCALL
+ xmlListSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN void * XMLCALL
+ xmlListReverseSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListInsert (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListAppend (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListRemoveFirst (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveLast (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveAll (xmlListPtr l,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlListClear (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListEmpty (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListFront (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListEnd (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListSize (xmlListPtr l);
+
+XMLPUBFUN void XMLCALL
+ xmlListPopFront (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListPopBack (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListPushFront (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListPushBack (xmlListPtr l,
+ void *data);
+
+/* Advanced Operators */
+XMLPUBFUN void XMLCALL
+ xmlListReverse (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListSort (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListReverseWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListMerge (xmlListPtr l1,
+ xmlListPtr l2);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListDup (const xmlListPtr old);
+XMLPUBFUN int XMLCALL
+ xmlListCopy (xmlListPtr cur,
+ const xmlListPtr old);
+/* Link operators */
+XMLPUBFUN void * XMLCALL
+ xmlLinkGetData (xmlLinkPtr lk);
+
+/* xmlListUnique() */
+/* xmlListSwap */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_LINK_INCLUDE__ */
diff --git a/include/libxml/nanoftp.h b/include/libxml/nanoftp.h
new file mode 100644
index 0000000..abb4bf7
--- /dev/null
+++ b/include/libxml/nanoftp.h
@@ -0,0 +1,163 @@
+/*
+ * Summary: minimal FTP implementation
+ * Description: minimal FTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_FTP_H__
+#define __NANO_FTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_FTP_ENABLED
+
+/* Needed for portability to Windows 64 bits */
+#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#include <winsock2.h>
+#else
+/**
+ * SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ */
+#define SOCKET int
+/**
+ * INVALID_SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ * the value to be used when the socket is not valid
+ */
+#undef INVALID_SOCKET
+#define INVALID_SOCKET (-1)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ftpListCallback:
+ * @userData: user provided data for the callback
+ * @filename: the file name (including "->" when links are shown)
+ * @attrib: the attribute string
+ * @owner: the owner string
+ * @group: the group string
+ * @size: the file size
+ * @links: the link count
+ * @year: the year
+ * @month: the month
+ * @day: the day
+ * @hour: the hour
+ * @minute: the minute
+ *
+ * A callback for the xmlNanoFTPList command.
+ * Note that only one of year and day:minute are specified.
+ */
+typedef void (*ftpListCallback) (void *userData,
+ const char *filename, const char *attrib,
+ const char *owner, const char *group,
+ unsigned long size, int links, int year,
+ const char *month, int day, int hour,
+ int minute);
+/**
+ * ftpDataCallback:
+ * @userData: the user provided context
+ * @data: the data received
+ * @len: its size in bytes
+ *
+ * A callback for the xmlNanoFTPGet command.
+ */
+typedef void (*ftpDataCallback) (void *userData,
+ const char *data,
+ int len);
+
+/*
+ * Init
+ */
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPCleanup (void);
+
+/*
+ * Creating/freeing contexts.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPNewCtxt (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPFreeCtxt (void * ctx);
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPConnectTo (const char *server,
+ int port);
+/*
+ * Opening/closing session connections.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPOpen (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPConnect (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPClose (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPQuit (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPScanProxy (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPProxy (const char *host,
+ int port,
+ const char *user,
+ const char *passwd,
+ int type);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPUpdateURL (void *ctx,
+ const char *URL);
+
+/*
+ * Rather internal commands.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGetResponse (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCheckResponse (void *ctx);
+
+/*
+ * CD/DIR/GET handlers.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCwd (void *ctx,
+ const char *directory);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPDele (void *ctx,
+ const char *file);
+
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetConnection (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCloseConnection(void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPList (void *ctx,
+ ftpListCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetSocket (void *ctx,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGet (void *ctx,
+ ftpDataCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPRead (void *ctx,
+ void *dest,
+ int len);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_FTP_ENABLED */
+#endif /* __NANO_FTP_H__ */
diff --git a/include/libxml/nanohttp.h b/include/libxml/nanohttp.h
new file mode 100644
index 0000000..22b8fb4
--- /dev/null
+++ b/include/libxml/nanohttp.h
@@ -0,0 +1,81 @@
+/*
+ * Summary: minimal HTTP implementation
+ * Description: minimal HTTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_HTTP_H__
+#define __NANO_HTTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_HTTP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPCleanup (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPScanProxy (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPFetch (const char *URL,
+ const char *filename,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethod (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethodRedir (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ char **redir,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpen (const char *URL,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpenRedir (const char *URL,
+ char **contentType,
+ char **redir);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPReturnCode (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPAuthHeader (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPRedir (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPContentLength( void * ctx );
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPEncoding (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPMimeType (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPRead (void *ctx,
+ void *dest,
+ int len);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPSave (void *ctxt,
+ const char *filename);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPClose (void *ctx);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTTP_ENABLED */
+#endif /* __NANO_HTTP_H__ */
diff --git a/include/libxml/parser.h b/include/libxml/parser.h
new file mode 100644
index 0000000..3f5730d
--- /dev/null
+++ b/include/libxml/parser.h
@@ -0,0 +1,1241 @@
+/*
+ * Summary: the core parser module
+ * Description: Interfaces, constants and types related to the XML parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_H__
+#define __XML_PARSER_H__
+
+#include <stdarg.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#include <libxml/hash.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_DEFAULT_VERSION:
+ *
+ * The default version of XML used: 1.0
+ */
+#define XML_DEFAULT_VERSION "1.0"
+
+/**
+ * xmlParserInput:
+ *
+ * An xmlParserInput is an input flow for the XML processor.
+ * Each entity parsed is associated an xmlParserInput (except the
+ * few predefined ones). This is the case both for internal entities
+ * - in which case the flow is already completely in memory - or
+ * external entities - in which case we use the buf structure for
+ * progressive reading and I18N conversions to the internal UTF-8 format.
+ */
+
+/**
+ * xmlParserInputDeallocate:
+ * @str: the string to deallocate
+ *
+ * Callback for freeing some parser input allocations.
+ */
+typedef void (* xmlParserInputDeallocate)(xmlChar *str);
+
+struct _xmlParserInput {
+ /* Input buffer */
+ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
+
+ const char *filename; /* The file analyzed, if any */
+ const char *directory; /* the directory/base of the file */
+ const xmlChar *base; /* Base of the array to parse */
+ const xmlChar *cur; /* Current char being parsed */
+ const xmlChar *end; /* end of the array to parse */
+ int length; /* length if known */
+ int line; /* Current line */
+ int col; /* Current column */
+ /*
+ * NOTE: consumed is only tested for equality in the parser code,
+ * so even if there is an overflow this should not give troubles
+ * for parsing very large instances.
+ */
+ unsigned long consumed; /* How many xmlChars already consumed */
+ xmlParserInputDeallocate free; /* function to deallocate the base */
+ const xmlChar *encoding; /* the encoding string for entity */
+ const xmlChar *version; /* the version string for entity */
+ int standalone; /* Was that entity marked standalone */
+ int id; /* an unique identifier for the entity */
+};
+
+/**
+ * xmlParserNodeInfo:
+ *
+ * The parser can be asked to collect Node informations, i.e. at what
+ * place in the file they were detected.
+ * NOTE: This is off by default and not very well tested.
+ */
+typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
+typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
+
+struct _xmlParserNodeInfo {
+ const struct _xmlNode* node;
+ /* Position & line # that text that created the node begins & ends on */
+ unsigned long begin_pos;
+ unsigned long begin_line;
+ unsigned long end_pos;
+ unsigned long end_line;
+};
+
+typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
+typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
+struct _xmlParserNodeInfoSeq {
+ unsigned long maximum;
+ unsigned long length;
+ xmlParserNodeInfo* buffer;
+};
+
+/**
+ * xmlParserInputState:
+ *
+ * The parser is now working also as a state based parser.
+ * The recursive one use the state info for entities processing.
+ */
+typedef enum {
+ XML_PARSER_EOF = -1, /* nothing is to be parsed */
+ XML_PARSER_START = 0, /* nothing has been parsed */
+ XML_PARSER_MISC, /* Misc* before int subset */
+ XML_PARSER_PI, /* Within a processing instruction */
+ XML_PARSER_DTD, /* within some DTD content */
+ XML_PARSER_PROLOG, /* Misc* after internal subset */
+ XML_PARSER_COMMENT, /* within a comment */
+ XML_PARSER_START_TAG, /* within a start tag */
+ XML_PARSER_CONTENT, /* within the content */
+ XML_PARSER_CDATA_SECTION, /* within a CDATA section */
+ XML_PARSER_END_TAG, /* within a closing tag */
+ XML_PARSER_ENTITY_DECL, /* within an entity declaration */
+ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
+ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
+ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
+ XML_PARSER_EPILOG, /* the Misc* after the last end tag */
+ XML_PARSER_IGNORE, /* within an IGNORED section */
+ XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
+} xmlParserInputState;
+
+/**
+ * XML_DETECT_IDS:
+ *
+ * Bit in the loadsubset context field to tell to do ID/REFs lookups.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_DETECT_IDS 2
+
+/**
+ * XML_COMPLETE_ATTRS:
+ *
+ * Bit in the loadsubset context field to tell to do complete the
+ * elements attributes lists with the ones defaulted from the DTDs.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_COMPLETE_ATTRS 4
+
+/**
+ * XML_SKIP_IDS:
+ *
+ * Bit in the loadsubset context field to tell to not do ID/REFs registration.
+ * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
+ */
+#define XML_SKIP_IDS 8
+
+/**
+ * xmlParserMode:
+ *
+ * A parser can operate in various modes
+ */
+typedef enum {
+ XML_PARSE_UNKNOWN = 0,
+ XML_PARSE_DOM = 1,
+ XML_PARSE_SAX = 2,
+ XML_PARSE_PUSH_DOM = 3,
+ XML_PARSE_PUSH_SAX = 4,
+ XML_PARSE_READER = 5
+} xmlParserMode;
+
+/**
+ * xmlParserCtxt:
+ *
+ * The parser context.
+ * NOTE This doesn't completely define the parser state, the (current ?)
+ * design of the parser uses recursive function calls since this allow
+ * and easy mapping from the production rules of the specification
+ * to the actual code. The drawback is that the actual function call
+ * also reflect the parser state. However most of the parsing routines
+ * takes as the only argument the parser context pointer, so migrating
+ * to a state based parser for progressive parsing shouldn't be too hard.
+ */
+struct _xmlParserCtxt {
+ struct _xmlSAXHandler *sax; /* The SAX handler */
+ void *userData; /* For SAX interface only, used by DOM build */
+ xmlDocPtr myDoc; /* the document being built */
+ int wellFormed; /* is the document well formed */
+ int replaceEntities; /* shall we replace entities ? */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* the declared encoding, if any */
+ int standalone; /* standalone document */
+ int html; /* an HTML(1)/Docbook(2) document
+ * 3 is HTML after <head>
+ * 10 is HTML after <body>
+ */
+
+ /* Input stream stack */
+ xmlParserInputPtr input; /* Current input stream */
+ int inputNr; /* Number of current input streams */
+ int inputMax; /* Max number of input streams */
+ xmlParserInputPtr *inputTab; /* stack of inputs */
+
+ /* Node analysis stack only used for DOM building */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ int record_info; /* Whether node info should be kept */
+ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
+
+ int errNo; /* error code */
+
+ int hasExternalSubset; /* reference and external subset */
+ int hasPErefs; /* the internal subset has PE refs */
+ int external; /* are we parsing an external entity */
+
+ int valid; /* is the document valid */
+ int validate; /* shall we try to validate ? */
+ xmlValidCtxt vctxt; /* The validity context */
+
+ xmlParserInputState instate; /* current type of input */
+ int token; /* next char look-ahead */
+
+ char *directory; /* the data directory */
+
+ /* Node name stack */
+ const xmlChar *name; /* Current parsed Node */
+ int nameNr; /* Depth of the parsing stack */
+ int nameMax; /* Max depth of the parsing stack */
+ const xmlChar * *nameTab; /* array of nodes */
+
+ long nbChars; /* number of xmlChar processed */
+ long checkIndex; /* used by progressive parsing lookup */
+ int keepBlanks; /* ugly but ... */
+ int disableSAX; /* SAX callbacks are disabled */
+ int inSubset; /* Parsing is in int 1/ext 2 subset */
+ const xmlChar * intSubName; /* name of subset */
+ xmlChar * extSubURI; /* URI of external subset */
+ xmlChar * extSubSystem; /* SYSTEM ID of external subset */
+
+ /* xml:space values */
+ int * space; /* Should the parser preserve spaces */
+ int spaceNr; /* Depth of the parsing stack */
+ int spaceMax; /* Max depth of the parsing stack */
+ int * spaceTab; /* array of space infos */
+
+ int depth; /* to prevent entity substitution loops */
+ xmlParserInputPtr entity; /* used to check entities boundaries */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ int nodelen; /* Those two fields are there to */
+ int nodemem; /* Speed up large node parsing */
+ int pedantic; /* signal pedantic warnings */
+ void *_private; /* For user data, libxml won't touch it */
+
+ int loadsubset; /* should the external subset be loaded */
+ int linenumbers; /* set line number in element content */
+ void *catalogs; /* document's own catalog */
+ int recovery; /* run in recovery mode */
+ int progressive; /* is this a progressive parsing */
+ xmlDictPtr dict; /* dictionnary for the parser */
+ const xmlChar * *atts; /* array for the attributes callbacks */
+ int maxatts; /* the size of the array */
+ int docdict; /* use strings from dict to build tree */
+
+ /*
+ * pre-interned strings
+ */
+ const xmlChar *str_xml;
+ const xmlChar *str_xmlns;
+ const xmlChar *str_xml_ns;
+
+ /*
+ * Everything below is used only by the new SAX mode
+ */
+ int sax2; /* operating in the new SAX mode */
+ int nsNr; /* the number of inherited namespaces */
+ int nsMax; /* the size of the arrays */
+ const xmlChar * *nsTab; /* the array of prefix/namespace name */
+ int *attallocs; /* which attribute were allocated */
+ void * *pushTab; /* array of data for push */
+ xmlHashTablePtr attsDefault; /* defaulted attributes if any */
+ xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
+ int nsWellFormed; /* is the document XML Nanespace okay */
+ int options; /* Extra options */
+
+ /*
+ * Those fields are needed only for treaming parsing so far
+ */
+ int dictNames; /* Use dictionary names for the tree */
+ int freeElemsNr; /* number of freed element nodes */
+ xmlNodePtr freeElems; /* List of freed element nodes */
+ int freeAttrsNr; /* number of freed attributes nodes */
+ xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
+
+ /*
+ * the complete error informations for the last error.
+ */
+ xmlError lastError;
+ xmlParserMode parseMode; /* the parser mode */
+ unsigned long nbentities; /* number of entities references */
+ unsigned long sizeentities; /* size of parsed entities */
+
+ /* for use by HTML non-recursive parser */
+ xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
+ int nodeInfoNr; /* Depth of the parsing stack */
+ int nodeInfoMax; /* Max depth of the parsing stack */
+ xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
+
+ int input_id; /* we need to label inputs */
+ unsigned long sizeentcopy; /* volume of entity copy */
+};
+
+/**
+ * xmlSAXLocator:
+ *
+ * A SAX Locator.
+ */
+struct _xmlSAXLocator {
+ const xmlChar *(*getPublicId)(void *ctx);
+ const xmlChar *(*getSystemId)(void *ctx);
+ int (*getLineNumber)(void *ctx);
+ int (*getColumnNumber)(void *ctx);
+};
+
+/**
+ * xmlSAXHandler:
+ *
+ * A SAX handler is bunch of callbacks called by the parser when processing
+ * of the input generate data or structure informations.
+ */
+
+/**
+ * resolveEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Callback:
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * internalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ */
+typedef void (*internalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * externalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ */
+typedef void (*externalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * getEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * getParameterEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * entityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed.
+ */
+typedef void (*entityDeclSAXFunc) (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+/**
+ * notationDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+typedef void (*notationDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * attributeDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed.
+ */
+typedef void (*attributeDeclSAXFunc)(void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+/**
+ * elementDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed.
+ */
+typedef void (*elementDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+/**
+ * unparsedEntityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed.
+ */
+typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+/**
+ * setDocumentLocatorSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
+ * Everything is available on the context, so this is useless in our case.
+ */
+typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
+ xmlSAXLocatorPtr loc);
+/**
+ * startDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document start being processed.
+ */
+typedef void (*startDocumentSAXFunc) (void *ctx);
+/**
+ * endDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document end has been detected.
+ */
+typedef void (*endDocumentSAXFunc) (void *ctx);
+/**
+ * startElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * Called when an opening tag has been processed.
+ */
+typedef void (*startElementSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar **atts);
+/**
+ * endElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * Called when the end of an element has been detected.
+ */
+typedef void (*endElementSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * attributeSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+typedef void (*attributeSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *value);
+/**
+ * referenceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Called when an entity reference is detected.
+ */
+typedef void (*referenceSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * charactersSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some chars from the parser.
+ */
+typedef void (*charactersSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * ignorableWhitespaceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters.
+ */
+typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * processingInstructionSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ */
+typedef void (*processingInstructionSAXFunc) (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+/**
+ * commentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+typedef void (*commentSAXFunc) (void *ctx,
+ const xmlChar *value);
+/**
+ * cdataBlockSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * Called when a pcdata block has been parsed.
+ */
+typedef void (*cdataBlockSAXFunc) (
+ void *ctx,
+ const xmlChar *value,
+ int len);
+/**
+ * warningSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, callback.
+ */
+typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, callback.
+ */
+typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format fatal error messages, callback.
+ * Note: so far fatalError() SAX callbacks are not used, error()
+ * get all the callbacks for errors.
+ */
+typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone?
+ *
+ * Returns 1 if true
+ */
+typedef int (*isStandaloneSAXFunc) (void *ctx);
+/**
+ * hasInternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset.
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
+
+/**
+ * hasExternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset?
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
+
+/************************************************************************
+ * *
+ * The SAX version 2 API extensions *
+ * *
+ ************************************************************************/
+/**
+ * XML_SAX2_MAGIC:
+ *
+ * Special constant found in SAX2 blocks initialized fields
+ */
+#define XML_SAX2_MAGIC 0xDEEDBEAF
+
+/**
+ * startElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
+ * ones are at the end of the array
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace informations for the element, as well as
+ * the new namespace declarations on the element.
+ */
+
+typedef void (*startElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+
+/**
+ * endElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace informations for the element.
+ */
+
+typedef void (*endElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+
+
+struct _xmlSAXHandler {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+ /* The following fields are extensions available only on version 2 */
+ void *_private;
+ startElementNsSAX2Func startElementNs;
+ endElementNsSAX2Func endElementNs;
+ xmlStructuredErrorFunc serror;
+};
+
+/*
+ * SAX Version 1
+ */
+typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
+typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
+struct _xmlSAXHandlerV1 {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+};
+
+
+/**
+ * xmlExternalEntityLoader:
+ * @URL: The System ID of the resource requested
+ * @ID: The Public ID of the resource requested
+ * @context: the XML parser context
+ *
+ * External entity loaders types.
+ *
+ * Returns the entity input parser.
+ */
+typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+#include <libxml/globals.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Init/Cleanup
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitParser (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupParser (void);
+
+/*
+ * Input functions
+ */
+XMLPUBFUN int XMLCALL
+ xmlParserInputRead (xmlParserInputPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputGrow (xmlParserInputPtr in,
+ int len);
+
+/*
+ * Basic parsing Interfaces
+ */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseFile (const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseMemory (const char *buffer,
+ int size);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlSubstituteEntitiesDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlKeepBlanksDefault (int val);
+XMLPUBFUN void XMLCALL
+ xmlStopParser (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlPedanticParserDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlLineNumbersDefault (int val);
+
+#ifdef LIBXML_SAX1_ENABLED
+/*
+ * Recovery mode
+ */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverMemory (const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverFile (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+/*
+ * Less common routines and SAX interfaces
+ */
+XMLPUBFUN int XMLCALL
+ xmlParseDocument (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseDoc (xmlSAXHandlerPtr sax,
+ const xmlChar *cur,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemory (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFile (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseEntity (xmlSAXHandlerPtr sax,
+ const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseEntity (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlSAXParseDTD (xmlSAXHandlerPtr sax,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlParseDTD (const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlIOParseDTD (xmlSAXHandlerPtr sax,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+#endif /* LIBXML_VALID_ENABLE */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemory(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserErrors XMLCALL
+ xmlParseInNodeContext (xmlNodePtr node,
+ const char *data,
+ int datalen,
+ int options,
+ xmlNodePtr *lst);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst,
+ int recover);
+XMLPUBFUN int XMLCALL
+ xmlParseExternalEntity (xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+
+/*
+ * Parser contexts handling.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlNewParserCtxt (void);
+XMLPUBFUN int XMLCALL
+ xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
+ const xmlChar* buffer,
+ const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateDocParserCtxt (const xmlChar *cur);
+
+#ifdef LIBXML_LEGACY_ENABLED
+/*
+ * Reading/setting optional parsing features.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetFeaturesList (int *len,
+ const char **result);
+XMLPUBFUN int XMLCALL
+ xmlGetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *result);
+XMLPUBFUN int XMLCALL
+ xmlSetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *value);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef LIBXML_PUSH_ENABLED
+/*
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+/*
+ * Special I/O mode.
+ */
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
+ void *user_data,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+
+/*
+ * Node infos.
+ */
+XMLPUBFUN const xmlParserNodeInfo* XMLCALL
+ xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN void XMLCALL
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN unsigned long XMLCALL
+ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
+ const xmlParserNodeInfoPtr info);
+
+/*
+ * External entities handling actually implemented in xmlIO.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
+XMLPUBFUN xmlExternalEntityLoader XMLCALL
+ xmlGetExternalEntityLoader(void);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlLoadExternalEntity (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * Index lookup, actually implemented in the encoding module
+ */
+XMLPUBFUN long XMLCALL
+ xmlByteConsumed (xmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ XML_PARSE_RECOVER = 1<<0, /* recover on errors */
+ XML_PARSE_NOENT = 1<<1, /* substitute entities */
+ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
+ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
+ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
+ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
+ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
+ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
+ XML_PARSE_NONET = 1<<11,/* Forbid network access */
+ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
+ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
+ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
+ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
+ the tree allowed afterwards (will possibly
+ crash if you try to modify the tree) */
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
+ XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
+ XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
+ XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
+ XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */
+} xmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ xmlCtxtReset (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/*
+ * Library wide options
+ */
+/**
+ * xmlFeature:
+ *
+ * Used to examine the existance of features that can be enabled
+ * or disabled at compile-time.
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
+ */
+typedef enum {
+ XML_WITH_THREAD = 1,
+ XML_WITH_TREE = 2,
+ XML_WITH_OUTPUT = 3,
+ XML_WITH_PUSH = 4,
+ XML_WITH_READER = 5,
+ XML_WITH_PATTERN = 6,
+ XML_WITH_WRITER = 7,
+ XML_WITH_SAX1 = 8,
+ XML_WITH_FTP = 9,
+ XML_WITH_HTTP = 10,
+ XML_WITH_VALID = 11,
+ XML_WITH_HTML = 12,
+ XML_WITH_LEGACY = 13,
+ XML_WITH_C14N = 14,
+ XML_WITH_CATALOG = 15,
+ XML_WITH_XPATH = 16,
+ XML_WITH_XPTR = 17,
+ XML_WITH_XINCLUDE = 18,
+ XML_WITH_ICONV = 19,
+ XML_WITH_ISO8859X = 20,
+ XML_WITH_UNICODE = 21,
+ XML_WITH_REGEXP = 22,
+ XML_WITH_AUTOMATA = 23,
+ XML_WITH_EXPR = 24,
+ XML_WITH_SCHEMAS = 25,
+ XML_WITH_SCHEMATRON = 26,
+ XML_WITH_MODULES = 27,
+ XML_WITH_DEBUG = 28,
+ XML_WITH_DEBUG_MEM = 29,
+ XML_WITH_DEBUG_RUN = 30,
+ XML_WITH_ZLIB = 31,
+ XML_WITH_ICU = 32,
+ XML_WITH_LZMA = 33,
+ XML_WITH_NONE = 99999 /* just to be sure of allocation size */
+} xmlFeature;
+
+XMLPUBFUN int XMLCALL
+ xmlHasFeature (xmlFeature feature);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_H__ */
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
new file mode 100644
index 0000000..6065320
--- /dev/null
+++ b/include/libxml/parserInternals.h
@@ -0,0 +1,644 @@
+/*
+ * Summary: internals routines and limits exported by the parser.
+ * Description: this module exports a number of internal parsing routines
+ * they are not really all intended for applications but
+ * can prove useful doing low level processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_INTERNALS_H__
+#define __XML_PARSER_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/chvalid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserMaxDepth:
+ *
+ * arbitrary depth limit for the XML documents that we allow to
+ * process. This is not a limitation of the parser but a safety
+ * boundary feature, use XML_PARSE_HUGE option to override it.
+ */
+XMLPUBVAR unsigned int xmlParserMaxDepth;
+
+/**
+ * XML_MAX_TEXT_LENGTH:
+ *
+ * Maximum size allowed for a single text node when building a tree.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_TEXT_LENGTH 10000000
+
+/**
+ * XML_MAX_NAME_LENGTH:
+ *
+ * Maximum size allowed for a markup identitier
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Note that with the use of parsing dictionaries overriding the limit
+ * may result in more runtime memory usage in face of "unfriendly' content
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_NAME_LENGTH 50000
+
+/**
+ * XML_MAX_DICTIONARY_LIMIT:
+ *
+ * Maximum size allowed by the parser for a dictionary by default
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_DICTIONARY_LIMIT 10000000
+
+/**
+ * XML_MAX_LOOKUP_LIMIT:
+ *
+ * Maximum size allowed by the parser for ahead lookup
+ * This is an upper boundary enforced by the parser to avoid bad
+ * behaviour on "unfriendly' content
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_LOOKUP_LIMIT 10000000
+
+/**
+ * XML_MAX_NAMELEN:
+ *
+ * Identifiers can be longer, but this will be more costly
+ * at runtime.
+ */
+#define XML_MAX_NAMELEN 100
+
+/**
+ * INPUT_CHUNK:
+ *
+ * The parser tries to always have that amount of input ready.
+ * One of the point is providing context when reporting errors.
+ */
+#define INPUT_CHUNK 250
+
+/************************************************************************
+ * *
+ * UNICODE version of the macros. *
+ * *
+ ************************************************************************/
+/**
+ * IS_BYTE_CHAR:
+ * @c: an byte value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20...]
+ * any byte character in the accepted range
+ */
+#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
+
+/**
+ * IS_CHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
+ * | [#x10000-#x10FFFF]
+ * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ */
+#define IS_CHAR(c) xmlIsCharQ(c)
+
+/**
+ * IS_CHAR_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Behaves like IS_CHAR on single-byte value
+ */
+#define IS_CHAR_CH(c) xmlIsChar_ch(c)
+
+/**
+ * IS_BLANK:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
+ */
+#define IS_BLANK(c) xmlIsBlankQ(c)
+
+/**
+ * IS_BLANK_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Behaviour same as IS_BLANK
+ */
+#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
+
+/**
+ * IS_BASECHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [85] BaseChar ::= ... long list see REC ...
+ */
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
+
+/**
+ * IS_DIGIT:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [88] Digit ::= ... long list see REC ...
+ */
+#define IS_DIGIT(c) xmlIsDigitQ(c)
+
+/**
+ * IS_DIGIT_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_DIGIT but with a single byte argument
+ */
+#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
+
+/**
+ * IS_COMBINING:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [87] CombiningChar ::= ... long list see REC ...
+ */
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
+
+/**
+ * IS_COMBINING_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Always false (all combining chars > 0xff)
+ */
+#define IS_COMBINING_CH(c) 0
+
+/**
+ * IS_EXTENDER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
+ * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
+ * [#x309D-#x309E] | [#x30FC-#x30FE]
+ */
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
+
+/**
+ * IS_EXTENDER_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_EXTENDER but with a single-byte argument
+ */
+#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
+
+/**
+ * IS_IDEOGRAPHIC:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
+ */
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
+
+/**
+ * IS_LETTER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [84] Letter ::= BaseChar | Ideographic
+ */
+#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
+
+/**
+ * IS_LETTER_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Macro behaves like IS_LETTER, but only check base chars
+ *
+ */
+#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
+
+/**
+ * IS_ASCII_LETTER:
+ * @c: an xmlChar value
+ *
+ * Macro to check [a-zA-Z]
+ *
+ */
+#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)))
+
+/**
+ * IS_ASCII_DIGIT:
+ * @c: an xmlChar value
+ *
+ * Macro to check [0-9]
+ *
+ */
+#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
+
+/**
+ * IS_PUBIDCHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
+ */
+#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
+
+/**
+ * IS_PUBIDCHAR_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Same as IS_PUBIDCHAR but for single-byte value
+ */
+#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
+
+/**
+ * SKIP_EOL:
+ * @p: and UTF8 string pointer
+ *
+ * Skips the end of line chars.
+ */
+#define SKIP_EOL(p) \
+ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
+ if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
+
+/**
+ * MOVETO_ENDTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '>' char.
+ */
+#define MOVETO_ENDTAG(p) \
+ while ((*p) && (*(p) != '>')) (p)++
+
+/**
+ * MOVETO_STARTTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '<' char.
+ */
+#define MOVETO_STARTTAG(p) \
+ while ((*p) && (*(p) != '<')) (p)++
+
+/**
+ * Global variables used for predefined strings.
+ */
+XMLPUBVAR const xmlChar xmlStringText[];
+XMLPUBVAR const xmlChar xmlStringTextNoenc[];
+XMLPUBVAR const xmlChar xmlStringComment[];
+
+/*
+ * Function to finish the work of the macros where needed.
+ */
+XMLPUBFUN int XMLCALL xmlIsLetter (int c);
+
+/**
+ * Parser context.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateFileParserCtxt (const char *filename);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateURLParserCtxt (const char *filename,
+ int options);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateEntityParserCtxt(const xmlChar *URL,
+ const xmlChar *ID,
+ const xmlChar *base);
+XMLPUBFUN int XMLCALL
+ xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN int XMLCALL
+ xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler);
+
+#ifdef IN_LIBXML
+/* internal error reporting */
+XMLPUBFUN void XMLCALL
+ __xmlErrEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserErrors xmlerr,
+ const char *msg,
+ const xmlChar * str1,
+ const xmlChar * str2);
+#endif
+
+/**
+ * Input Streams.
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
+ const xmlChar *buffer);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+XMLPUBFUN int XMLCALL
+ xmlPushInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN xmlChar XMLCALL
+ xmlPopInput (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeInputStream (xmlParserInputPtr input);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
+ const char *filename);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputStream (xmlParserCtxtPtr ctxt);
+
+/**
+ * Namespaces.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName (xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlChar **prefix);
+
+/**
+ * Generic production rules.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseNmtoken (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEntityValue (xmlParserCtxtPtr ctxt,
+ xmlChar **orig);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseAttValue (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseCharData (xmlParserCtxtPtr ctxt,
+ int cdata);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseExternalID (xmlParserCtxtPtr ctxt,
+ xmlChar **publicID,
+ int strict);
+XMLPUBFUN void XMLCALL
+ xmlParseComment (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParsePITarget (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePI (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseNotationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN int XMLCALL
+ xmlParseAttributeType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN void XMLCALL
+ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementMixedContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementChildrenContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN int XMLCALL
+ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlElementContentPtr *result);
+XMLPUBFUN int XMLCALL
+ xmlParseElementDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseCharRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlParseEntityRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePEReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseAttribute (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseStartTag (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEndTag (xmlParserCtxtPtr ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlParseCDSect (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseContent (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseElement (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionNum (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEncName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseSDDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseTextDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMisc (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * XML_SUBSTITUTE_NONE:
+ *
+ * If no entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_NONE 0
+/**
+ * XML_SUBSTITUTE_REF:
+ *
+ * Whether general entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_REF 1
+/**
+ * XML_SUBSTITUTE_PEREF:
+ *
+ * Whether parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_PEREF 2
+/**
+ * XML_SUBSTITUTE_BOTH:
+ *
+ * Both general and parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_BOTH 3
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+
+/*
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
+ */
+XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
+ xmlNodePtr value);
+XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr value);
+XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
+ const xmlChar *value);
+
+/*
+ * other commodities shared between parser.c and parserInternals.
+ */
+XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ int *len);
+XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
+
+/*
+ * Really core function shared with HTML parser.
+ */
+XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
+ int *len);
+XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
+ int val);
+XMLPUBFUN int XMLCALL xmlCopyChar (int len,
+ xmlChar *out,
+ int val);
+XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
+
+#ifdef LIBXML_HTML_ENABLED
+/*
+ * Actually comes from the HTML parser but launched from the init stuff.
+ */
+XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
+XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+#endif
+
+/*
+ * Specific function to keep track of entities references
+ * and used by the XSLT debugger.
+ */
+#ifdef LIBXML_LEGACY_ENABLED
+/**
+ * xmlEntityReferenceFunc:
+ * @ent: the entity
+ * @firstNode: the fist node in the chunk
+ * @lastNode: the last nod in the chunk
+ *
+ * Callback function used when one needs to be able to track back the
+ * provenance of a chunk of nodes inherited from an entity replacement.
+ */
+typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
+ xmlNodePtr firstNode,
+ xmlNodePtr lastNode);
+
+XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseQuotedString (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNamespace (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlScanName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
+ xmlChar **prefix);
+/**
+ * Entities
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlDecodeEntities (xmlParserCtxtPtr ctxt,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN void XMLCALL
+ xmlHandleEntity (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef IN_LIBXML
+/*
+ * internal only
+ */
+XMLPUBFUN void XMLCALL
+ xmlErrMemory (xmlParserCtxtPtr ctxt,
+ const char *extra);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_INTERNALS_H__ */
diff --git a/include/libxml/pattern.h b/include/libxml/pattern.h
new file mode 100644
index 0000000..97d2cd2
--- /dev/null
+++ b/include/libxml/pattern.h
@@ -0,0 +1,100 @@
+/*
+ * Summary: pattern expression handling
+ * Description: allows to compile and test pattern expressions for nodes
+ * either in a tree or based on a parser state.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PATTERN_H__
+#define __XML_PATTERN_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+
+#ifdef LIBXML_PATTERN_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlPattern:
+ *
+ * A compiled (XPath based) pattern to select nodes
+ */
+typedef struct _xmlPattern xmlPattern;
+typedef xmlPattern *xmlPatternPtr;
+
+/**
+ * xmlPatternFlags:
+ *
+ * This is the set of options affecting the behaviour of pattern
+ * matching with this module
+ *
+ */
+typedef enum {
+ XML_PATTERN_DEFAULT = 0, /* simple pattern match */
+ XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
+ XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
+ XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
+} xmlPatternFlags;
+
+XMLPUBFUN void XMLCALL
+ xmlFreePattern (xmlPatternPtr comp);
+
+XMLPUBFUN void XMLCALL
+ xmlFreePatternList (xmlPatternPtr comp);
+
+XMLPUBFUN xmlPatternPtr XMLCALL
+ xmlPatterncompile (const xmlChar *pattern,
+ xmlDict *dict,
+ int flags,
+ const xmlChar **namespaces);
+XMLPUBFUN int XMLCALL
+ xmlPatternMatch (xmlPatternPtr comp,
+ xmlNodePtr node);
+
+/* streaming interfaces */
+typedef struct _xmlStreamCtxt xmlStreamCtxt;
+typedef xmlStreamCtxt *xmlStreamCtxtPtr;
+
+XMLPUBFUN int XMLCALL
+ xmlPatternStreamable (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMaxDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMinDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternFromRoot (xmlPatternPtr comp);
+XMLPUBFUN xmlStreamCtxtPtr XMLCALL
+ xmlPatternGetStreamCtxt (xmlPatternPtr comp);
+XMLPUBFUN void XMLCALL
+ xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushNode (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns,
+ int nodeType);
+XMLPUBFUN int XMLCALL
+ xmlStreamPush (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushAttr (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPop (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_PATTERN_ENABLED */
+
+#endif /* __XML_PATTERN_H__ */
diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h
new file mode 100644
index 0000000..f269c9e
--- /dev/null
+++ b/include/libxml/relaxng.h
@@ -0,0 +1,217 @@
+/*
+ * Summary: implementation of the Relax-NG validation
+ * Description: implementation of the Relax-NG validation
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_RELAX_NG__
+#define __XML_RELAX_NG__
+
+#include <libxml/xmlversion.h>
+#include <libxml/hash.h>
+#include <libxml/xmlstring.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlRelaxNG xmlRelaxNG;
+typedef xmlRelaxNG *xmlRelaxNGPtr;
+
+
+/**
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
+typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
+
+typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
+typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
+
+/*
+ * xmlRelaxNGValidErr:
+ *
+ * List of possible Relax NG validation errors
+ */
+typedef enum {
+ XML_RELAXNG_OK = 0,
+ XML_RELAXNG_ERR_MEMORY,
+ XML_RELAXNG_ERR_TYPE,
+ XML_RELAXNG_ERR_TYPEVAL,
+ XML_RELAXNG_ERR_DUPID,
+ XML_RELAXNG_ERR_TYPECMP,
+ XML_RELAXNG_ERR_NOSTATE,
+ XML_RELAXNG_ERR_NODEFINE,
+ XML_RELAXNG_ERR_LISTEXTRA,
+ XML_RELAXNG_ERR_LISTEMPTY,
+ XML_RELAXNG_ERR_INTERNODATA,
+ XML_RELAXNG_ERR_INTERSEQ,
+ XML_RELAXNG_ERR_INTEREXTRA,
+ XML_RELAXNG_ERR_ELEMNAME,
+ XML_RELAXNG_ERR_ATTRNAME,
+ XML_RELAXNG_ERR_ELEMNONS,
+ XML_RELAXNG_ERR_ATTRNONS,
+ XML_RELAXNG_ERR_ELEMWRONGNS,
+ XML_RELAXNG_ERR_ATTRWRONGNS,
+ XML_RELAXNG_ERR_ELEMEXTRANS,
+ XML_RELAXNG_ERR_ATTREXTRANS,
+ XML_RELAXNG_ERR_ELEMNOTEMPTY,
+ XML_RELAXNG_ERR_NOELEM,
+ XML_RELAXNG_ERR_NOTELEM,
+ XML_RELAXNG_ERR_ATTRVALID,
+ XML_RELAXNG_ERR_CONTENTVALID,
+ XML_RELAXNG_ERR_EXTRACONTENT,
+ XML_RELAXNG_ERR_INVALIDATTR,
+ XML_RELAXNG_ERR_DATAELEM,
+ XML_RELAXNG_ERR_VALELEM,
+ XML_RELAXNG_ERR_LISTELEM,
+ XML_RELAXNG_ERR_DATATYPE,
+ XML_RELAXNG_ERR_VALUE,
+ XML_RELAXNG_ERR_LIST,
+ XML_RELAXNG_ERR_NOGRAMMAR,
+ XML_RELAXNG_ERR_EXTRADATA,
+ XML_RELAXNG_ERR_LACKDATA,
+ XML_RELAXNG_ERR_INTERNAL,
+ XML_RELAXNG_ERR_ELEMWRONG,
+ XML_RELAXNG_ERR_TEXTWRONG
+} xmlRelaxNGValidErr;
+
+/*
+ * xmlRelaxNGParserFlags:
+ *
+ * List of possible Relax NG Parser flags
+ */
+typedef enum {
+ XML_RELAXNGP_NONE = 0,
+ XML_RELAXNGP_FREE_DOC = 1,
+ XML_RELAXNGP_CRNG = 2
+} xmlRelaxNGParserFlag;
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGCleanupTypes (void);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewParserCtxt (const char *URL);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
+ int flag);
+
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserStructuredErrors(
+ xmlRelaxNGParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN xmlRelaxNGPtr XMLCALL
+ xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFree (xmlRelaxNGPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDump (FILE *output,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDumpTree (FILE * output,
+ xmlRelaxNGPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx);
+XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
+ xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+/*
+ * Interfaces for progressive validation when possible
+ */
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+#endif /* __XML_RELAX_NG__ */
diff --git a/include/libxml/schemasInternals.h b/include/libxml/schemasInternals.h
new file mode 100644
index 0000000..4f0ca9a
--- /dev/null
+++ b/include/libxml/schemasInternals.h
@@ -0,0 +1,958 @@
+/*
+ * Summary: internal interfaces for XML Schemas
+ * Description: internal interfaces for the XML Schemas handling
+ * and schema validity checking
+ * The Schemas development is a Work In Progress.
+ * Some of those interfaces are not garanteed to be API or ABI stable !
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_INTERNALS_H__
+#define __XML_SCHEMA_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/xmlregexp.h>
+#include <libxml/hash.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMAS_UNKNOWN = 0,
+ XML_SCHEMAS_STRING,
+ XML_SCHEMAS_NORMSTRING,
+ XML_SCHEMAS_DECIMAL,
+ XML_SCHEMAS_TIME,
+ XML_SCHEMAS_GDAY,
+ XML_SCHEMAS_GMONTH,
+ XML_SCHEMAS_GMONTHDAY,
+ XML_SCHEMAS_GYEAR,
+ XML_SCHEMAS_GYEARMONTH,
+ XML_SCHEMAS_DATE,
+ XML_SCHEMAS_DATETIME,
+ XML_SCHEMAS_DURATION,
+ XML_SCHEMAS_FLOAT,
+ XML_SCHEMAS_DOUBLE,
+ XML_SCHEMAS_BOOLEAN,
+ XML_SCHEMAS_TOKEN,
+ XML_SCHEMAS_LANGUAGE,
+ XML_SCHEMAS_NMTOKEN,
+ XML_SCHEMAS_NMTOKENS,
+ XML_SCHEMAS_NAME,
+ XML_SCHEMAS_QNAME,
+ XML_SCHEMAS_NCNAME,
+ XML_SCHEMAS_ID,
+ XML_SCHEMAS_IDREF,
+ XML_SCHEMAS_IDREFS,
+ XML_SCHEMAS_ENTITY,
+ XML_SCHEMAS_ENTITIES,
+ XML_SCHEMAS_NOTATION,
+ XML_SCHEMAS_ANYURI,
+ XML_SCHEMAS_INTEGER,
+ XML_SCHEMAS_NPINTEGER,
+ XML_SCHEMAS_NINTEGER,
+ XML_SCHEMAS_NNINTEGER,
+ XML_SCHEMAS_PINTEGER,
+ XML_SCHEMAS_INT,
+ XML_SCHEMAS_UINT,
+ XML_SCHEMAS_LONG,
+ XML_SCHEMAS_ULONG,
+ XML_SCHEMAS_SHORT,
+ XML_SCHEMAS_USHORT,
+ XML_SCHEMAS_BYTE,
+ XML_SCHEMAS_UBYTE,
+ XML_SCHEMAS_HEXBINARY,
+ XML_SCHEMAS_BASE64BINARY,
+ XML_SCHEMAS_ANYTYPE,
+ XML_SCHEMAS_ANYSIMPLETYPE
+} xmlSchemaValType;
+
+/*
+ * XML Schemas defines multiple type of types.
+ */
+typedef enum {
+ XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
+ XML_SCHEMA_TYPE_ANY,
+ XML_SCHEMA_TYPE_FACET,
+ XML_SCHEMA_TYPE_SIMPLE,
+ XML_SCHEMA_TYPE_COMPLEX,
+ XML_SCHEMA_TYPE_SEQUENCE = 6,
+ XML_SCHEMA_TYPE_CHOICE,
+ XML_SCHEMA_TYPE_ALL,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT,
+ XML_SCHEMA_TYPE_UR,
+ XML_SCHEMA_TYPE_RESTRICTION,
+ XML_SCHEMA_TYPE_EXTENSION,
+ XML_SCHEMA_TYPE_ELEMENT,
+ XML_SCHEMA_TYPE_ATTRIBUTE,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
+ XML_SCHEMA_TYPE_GROUP,
+ XML_SCHEMA_TYPE_NOTATION,
+ XML_SCHEMA_TYPE_LIST,
+ XML_SCHEMA_TYPE_UNION,
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ XML_SCHEMA_TYPE_IDC_UNIQUE,
+ XML_SCHEMA_TYPE_IDC_KEY,
+ XML_SCHEMA_TYPE_IDC_KEYREF,
+ XML_SCHEMA_TYPE_PARTICLE = 25,
+ XML_SCHEMA_TYPE_ATTRIBUTE_USE,
+ XML_SCHEMA_FACET_MININCLUSIVE = 1000,
+ XML_SCHEMA_FACET_MINEXCLUSIVE,
+ XML_SCHEMA_FACET_MAXINCLUSIVE,
+ XML_SCHEMA_FACET_MAXEXCLUSIVE,
+ XML_SCHEMA_FACET_TOTALDIGITS,
+ XML_SCHEMA_FACET_FRACTIONDIGITS,
+ XML_SCHEMA_FACET_PATTERN,
+ XML_SCHEMA_FACET_ENUMERATION,
+ XML_SCHEMA_FACET_WHITESPACE,
+ XML_SCHEMA_FACET_LENGTH,
+ XML_SCHEMA_FACET_MAXLENGTH,
+ XML_SCHEMA_FACET_MINLENGTH,
+ XML_SCHEMA_EXTRA_QNAMEREF = 2000,
+ XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
+} xmlSchemaTypeType;
+
+typedef enum {
+ XML_SCHEMA_CONTENT_UNKNOWN = 0,
+ XML_SCHEMA_CONTENT_EMPTY = 1,
+ XML_SCHEMA_CONTENT_ELEMENTS,
+ XML_SCHEMA_CONTENT_MIXED,
+ XML_SCHEMA_CONTENT_SIMPLE,
+ XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
+ XML_SCHEMA_CONTENT_BASIC,
+ XML_SCHEMA_CONTENT_ANY
+} xmlSchemaContentType;
+
+typedef struct _xmlSchemaVal xmlSchemaVal;
+typedef xmlSchemaVal *xmlSchemaValPtr;
+
+typedef struct _xmlSchemaType xmlSchemaType;
+typedef xmlSchemaType *xmlSchemaTypePtr;
+
+typedef struct _xmlSchemaFacet xmlSchemaFacet;
+typedef xmlSchemaFacet *xmlSchemaFacetPtr;
+
+/**
+ * Annotation
+ */
+typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
+typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
+struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot *next;
+ xmlNodePtr content; /* the annotation */
+};
+
+/**
+ * XML_SCHEMAS_ANYATTR_SKIP:
+ *
+ * Skip unknown attribute from validation
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_SKIP 1
+/**
+ * XML_SCHEMAS_ANYATTR_LAX:
+ *
+ * Ignore validation non definition on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_LAX 2
+/**
+ * XML_SCHEMAS_ANYATTR_STRICT:
+ *
+ * Apply strict validation rules on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_STRICT 3
+/**
+ * XML_SCHEMAS_ANY_SKIP:
+ *
+ * Skip unknown attribute from validation
+ */
+#define XML_SCHEMAS_ANY_SKIP 1
+/**
+ * XML_SCHEMAS_ANY_LAX:
+ *
+ * Used by wildcards.
+ * Validate if type found, don't worry if not found
+ */
+#define XML_SCHEMAS_ANY_LAX 2
+/**
+ * XML_SCHEMAS_ANY_STRICT:
+ *
+ * Used by wildcards.
+ * Apply strict validation rules
+ */
+#define XML_SCHEMAS_ANY_STRICT 3
+/**
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * Used by wildcards.
+ * The attribute is prohibited.
+ */
+#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
+/**
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+ */
+#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
+/**
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+ */
+#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
+/**
+ * XML_SCHEMAS_ATTR_GLOBAL:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
+/**
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
+ *
+ * this is set when the "type" and "ref" references
+ * have been resolved.
+ */
+#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
+/**
+ * XML_SCHEMAS_ATTR_FIXED:
+ *
+ * the attribute has a fixed value
+ */
+#define XML_SCHEMAS_ATTR_FIXED 1 << 9
+
+/**
+ * xmlSchemaAttribute:
+ * An attribute definition.
+ */
+
+typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
+typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
+struct _xmlSchemaAttribute {
+ xmlSchemaTypeType type;
+ struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
+ const xmlChar *name; /* the name of the declaration */
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ const xmlChar *typeName; /* the local name of the type definition */
+ const xmlChar *typeNs; /* the ns URI of the type definition */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaTypePtr base; /* Deprecated; not used */
+ int occurs; /* Deprecated; not used */
+ const xmlChar *defValue; /* The initial value of the value constraint */
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlNodePtr node;
+ const xmlChar *targetNamespace;
+ int flags;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value constraint */
+ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
+};
+
+/**
+ * xmlSchemaAttributeLink:
+ * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
+ */
+typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
+typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
+struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
+ struct _xmlSchemaAttribute *attr;/* the linked attribute */
+};
+
+/**
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
+ *
+ * If the wildcard is complete.
+ */
+#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
+
+/**
+ * xmlSchemaCharValueLink:
+ * Used to build a list of namespaces on wildcards.
+ */
+typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
+typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
+struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
+ const xmlChar *value;/* the value */
+};
+
+/**
+ * xmlSchemaWildcard.
+ * A wildcard.
+ */
+typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
+typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
+struct _xmlSchemaWildcard {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *id; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+ int processContents;
+ int any; /* Indicates if the ns constraint is of ##any */
+ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
+ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
+ int flags;
+};
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
+/**
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
+ *
+ * Marks the attr group as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
+/**
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+ */
+#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
+
+/**
+ * An attribute group definition.
+ *
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
+ * must be kept similar
+ */
+typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
+typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
+struct _xmlSchemaAttributeGroup {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
+ const xmlChar *name;
+ const xmlChar *id;
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int flags;
+ xmlSchemaWildcardPtr attributeWildcard;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/**
+ * xmlSchemaTypeLink:
+ * Used to build a list of types (e.g. member types of
+ * simpleType with variety "union").
+ */
+typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
+typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
+struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink *next;/* the next type link ... */
+ xmlSchemaTypePtr type;/* the linked type */
+};
+
+/**
+ * xmlSchemaFacetLink:
+ * Used to build a list of facets.
+ */
+typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
+typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
+struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink *next;/* the next facet link ... */
+ xmlSchemaFacetPtr facet;/* the linked facet */
+};
+
+/**
+ * XML_SCHEMAS_TYPE_MIXED:
+ *
+ * the element content type is mixed
+ */
+#define XML_SCHEMAS_TYPE_MIXED 1 << 0
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
+ *
+ * the simple or complex type has a derivation method of "extension".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
+ *
+ * the simple or complex type has a derivation method of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
+/**
+ * XML_SCHEMAS_TYPE_GLOBAL:
+ *
+ * the type is global
+ */
+#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
+/**
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
+ *
+ * the complexType owns an attribute wildcard, i.e.
+ * it can be freed by the complexType
+ */
+#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
+ *
+ * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
+ *
+ * the simpleType has a variety of "list".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
+/**
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
+ *
+ * the complexType has a final of "extension".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
+/**
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the simpleType/complexType has a final of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
+/**
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
+ *
+ * the simpleType has a final of "list".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
+/**
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
+ *
+ * the simpleType has a final of "union".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
+/**
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
+ *
+ * the simpleType has a final of "default".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
+/**
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
+ *
+ * Marks the item as a builtin primitive.
+ */
+#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
+/**
+ * XML_SCHEMAS_TYPE_MARKED:
+ *
+ * Marks the item as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_TYPE_MARKED 1 << 16
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * <schema> item.
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
+/**
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+ */
+#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
+/**
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
+ *
+ * indicates if the facets need a computed value
+ */
+#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
+ *
+ * indicates that the type was typefixed
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
+ *
+ * indicates that the type is invalid
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
+ *
+ * a whitespace-facet value of "preserve"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
+ *
+ * a whitespace-facet value of "replace"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
+ *
+ * a whitespace-facet value of "collapse"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
+/**
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
+ *
+ * has facets
+ */
+#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
+/**
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
+ *
+ * indicates if the facets (pattern) need a normalized value
+ */
+#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
+
+/**
+ * XML_SCHEMAS_TYPE_FIXUP_1:
+ *
+ * First stage of fixup was done.
+ */
+#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
+
+/**
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+ */
+#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
+/**
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+ */
+/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
+
+/**
+ * _xmlSchemaType:
+ *
+ * Schemas type definition.
+ */
+struct _xmlSchemaType {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* the next type if in a sequence ... */
+ const xmlChar *name;
+ const xmlChar *id ; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes;
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ xmlSchemaContentType contentType;
+ const xmlChar *base; /* Base type's local name */
+ const xmlChar *baseNs; /* Base type's target namespace */
+ xmlSchemaTypePtr baseType; /* The base type component */
+ xmlSchemaFacetPtr facets; /* Local facets */
+ struct _xmlSchemaType *redef; /* Deprecated; not used */
+ int recurse; /* Obsolete */
+ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
+ xmlSchemaWildcardPtr attributeWildcard;
+ int builtInType; /* Type of built-in types. */
+ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
+ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
+ Could we use @subtypes for this? */
+ xmlRegexpPtr contModel; /* Holds the automaton of the content model */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/*
+ * xmlSchemaElement:
+ * An element definition.
+ *
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
+ * structures must be kept similar
+ */
+/**
+ * XML_SCHEMAS_ELEM_NILLABLE:
+ *
+ * the element is nillable
+ */
+#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
+/**
+ * XML_SCHEMAS_ELEM_GLOBAL:
+ *
+ * the element is global
+ */
+#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ELEM_DEFAULT:
+ *
+ * the element has a default value
+ */
+#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
+/**
+ * XML_SCHEMAS_ELEM_FIXED:
+ *
+ * the element has a fixed value
+ */
+#define XML_SCHEMAS_ELEM_FIXED 1 << 3
+/**
+ * XML_SCHEMAS_ELEM_ABSTRACT:
+ *
+ * the element is abstract
+ */
+#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
+/**
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
+ *
+ * the element is top level
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
+ */
+#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
+/**
+ * XML_SCHEMAS_ELEM_REF:
+ *
+ * the element is a reference to a type
+ */
+#define XML_SCHEMAS_ELEM_REF 1 << 6
+/**
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
+ *
+ * this is set when "type", "ref", "substitutionGroup"
+ * references have been resolved.
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
+ /**
+ * XML_SCHEMAS_ELEM_CIRCULAR:
+ *
+ * a helper flag for the search of circular references.
+ */
+#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
+ *
+ * the "block" attribute is absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
+ *
+ * disallowed substitutions are absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
+ *
+ * disallowed substitutions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
+ *
+ * disallowed substitutions: "substituion"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
+/**
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
+ *
+ * substitution group exclusions are absent
+ */
+#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
+/**
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
+ *
+ * substitution group exclusions: "extension"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
+/**
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
+ *
+ * substitution group exclusions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
+/**
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
+ *
+ * the declaration is a substitution group head
+ */
+#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
+ *
+ * this is set when the elem decl has been checked against
+ * all constraints
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
+
+typedef struct _xmlSchemaElement xmlSchemaElement;
+typedef xmlSchemaElement *xmlSchemaElementPtr;
+struct _xmlSchemaElement {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* Not used? */
+ const xmlChar *name;
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlSchemaAttributePtr attributes;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ const xmlChar *targetNamespace;
+ const xmlChar *namedType;
+ const xmlChar *namedTypeNs;
+ const xmlChar *substGroup;
+ const xmlChar *substGroupNs;
+ const xmlChar *scope;
+ const xmlChar *value; /* The original value of the value constraint. */
+ struct _xmlSchemaElement *refDecl; /* This will now be used for the
+ substitution group affiliation */
+ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
+ xmlSchemaContentType contentType;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value contraint. */
+ void *idcs; /* The identity-constraint defs */
+};
+
+/*
+ * XML_SCHEMAS_FACET_UNKNOWN:
+ *
+ * unknown facet handling
+ */
+#define XML_SCHEMAS_FACET_UNKNOWN 0
+/*
+ * XML_SCHEMAS_FACET_PRESERVE:
+ *
+ * preserve the type of the facet
+ */
+#define XML_SCHEMAS_FACET_PRESERVE 1
+/*
+ * XML_SCHEMAS_FACET_REPLACE:
+ *
+ * replace the type of the facet
+ */
+#define XML_SCHEMAS_FACET_REPLACE 2
+/*
+ * XML_SCHEMAS_FACET_COLLAPSE:
+ *
+ * collapse the types of the facet
+ */
+#define XML_SCHEMAS_FACET_COLLAPSE 3
+/**
+ * A facet definition.
+ */
+struct _xmlSchemaFacet {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
+ const xmlChar *value; /* The original value */
+ const xmlChar *id; /* Obsolete */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
+ int whitespace;
+ xmlSchemaValPtr val; /* The compiled value */
+ xmlRegexpPtr regexp; /* The regex for patterns */
+};
+
+/**
+ * A notation definition.
+ */
+typedef struct _xmlSchemaNotation xmlSchemaNotation;
+typedef xmlSchemaNotation *xmlSchemaNotationPtr;
+struct _xmlSchemaNotation {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *name;
+ xmlSchemaAnnotPtr annot;
+ const xmlChar *identifier;
+ const xmlChar *targetNamespace;
+};
+
+/*
+* TODO: Actually all those flags used for the schema should sit
+* on the schema parser context, since they are used only
+* during parsing an XML schema document, and not available
+* on the component level as per spec.
+*/
+/**
+ * XML_SCHEMAS_QUALIF_ELEM:
+ *
+ * Reflects elementFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
+/**
+ * XML_SCHEMAS_QUALIF_ATTR:
+ *
+ * Reflects attributeFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
+ *
+ * the cshema has "list" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
+ *
+ * the schema has "union" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
+ *
+ * the schema has "substitution" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
+/**
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
+ *
+ * the schema is currently including an other schema with
+ * no target namespace.
+ */
+#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
+/**
+ * _xmlSchema:
+ *
+ * A Schemas definition
+ */
+struct _xmlSchema {
+ const xmlChar *name; /* schema name */
+ const xmlChar *targetNamespace; /* the target namespace */
+ const xmlChar *version;
+ const xmlChar *id; /* Obsolete */
+ xmlDocPtr doc;
+ xmlSchemaAnnotPtr annot;
+ int flags;
+
+ xmlHashTablePtr typeDecl;
+ xmlHashTablePtr attrDecl;
+ xmlHashTablePtr attrgrpDecl;
+ xmlHashTablePtr elemDecl;
+ xmlHashTablePtr notaDecl;
+
+ xmlHashTablePtr schemasImports;
+
+ void *_private; /* unused by the library for users or bindings */
+ xmlHashTablePtr groupDecl;
+ xmlDictPtr dict;
+ void *includes; /* the includes, this is opaque for now */
+ int preserve; /* whether to free the document */
+ int counter; /* used to give ononymous components unique names */
+ xmlHashTablePtr idcDef; /* All identity-constraint defs. */
+ void *volatiles; /* Obsolete */
+};
+
+XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
+XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_INTERNALS_H__ */
diff --git a/include/libxml/schematron.h b/include/libxml/schematron.h
new file mode 100644
index 0000000..364eaec
--- /dev/null
+++ b/include/libxml/schematron.h
@@ -0,0 +1,142 @@
+/*
+ * Summary: XML Schemastron implementation
+ * Description: interface to the XML Schematron validity checking.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMATRON_H__
+#define __XML_SCHEMATRON_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
+ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
+ XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
+ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
+ XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
+ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
+ XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
+} xmlSchematronValidOptions;
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchematron xmlSchematron;
+typedef xmlSchematron *xmlSchematronPtr;
+
+/**
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
+typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
+
+typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
+typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewMemParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
+/*****
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc * err,
+ xmlSchematronValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
+ *****/
+XMLPUBFUN xmlSchematronPtr XMLCALL
+ xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFree (xmlSchematronPtr schema);
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidStructuredErrors(
+ xmlSchematronValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+/******
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc *err,
+ xmlSchematronValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+ *******/
+
+XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
+ xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
+ int options);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMATRON_ENABLED */
+#endif /* __XML_SCHEMATRON_H__ */
diff --git a/include/libxml/threads.h b/include/libxml/threads.h
new file mode 100644
index 0000000..d31f16a
--- /dev/null
+++ b/include/libxml/threads.h
@@ -0,0 +1,84 @@
+/**
+ * Summary: interfaces for thread handling
+ * Description: set of generic threading related routines
+ * should work with pthreads, Windows native or TLS threads
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_THREADS_H__
+#define __XML_THREADS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlMutex are a simple mutual exception locks.
+ */
+typedef struct _xmlMutex xmlMutex;
+typedef xmlMutex *xmlMutexPtr;
+
+/*
+ * xmlRMutex are reentrant mutual exception locks.
+ */
+typedef struct _xmlRMutex xmlRMutex;
+typedef xmlRMutex *xmlRMutexPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/globals.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN xmlMutexPtr XMLCALL
+ xmlNewMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlMutexLock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlMutexUnlock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeMutex (xmlMutexPtr tok);
+
+XMLPUBFUN xmlRMutexPtr XMLCALL
+ xmlNewRMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlRMutexLock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlRMutexUnlock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeRMutex (xmlRMutexPtr tok);
+
+/*
+ * Library wide APIs.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitThreads (void);
+XMLPUBFUN void XMLCALL
+ xmlLockLibrary (void);
+XMLPUBFUN void XMLCALL
+ xmlUnlockLibrary(void);
+XMLPUBFUN int XMLCALL
+ xmlGetThreadId (void);
+XMLPUBFUN int XMLCALL
+ xmlIsMainThread (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupThreads(void);
+XMLPUBFUN xmlGlobalStatePtr XMLCALL
+ xmlGetGlobalState(void);
+
+#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
+int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XML_THREADS_H__ */
diff --git a/include/libxml/tree.h b/include/libxml/tree.h
new file mode 100644
index 0000000..2f90717
--- /dev/null
+++ b/include/libxml/tree.h
@@ -0,0 +1,1310 @@
+/*
+ * Summary: interfaces for tree manipulation
+ * Description: this module describes the structures found in an tree resulting
+ * from an XML or HTML parsing, as well as the API provided for
+ * various processing on that tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_TREE_H__
+#define __XML_TREE_H__
+
+#include <stdio.h>
+#include <limits.h>
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Some of the basic types pointer to structures:
+ */
+/* xmlIO.h */
+typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
+typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
+
+typedef struct _xmlOutputBuffer xmlOutputBuffer;
+typedef xmlOutputBuffer *xmlOutputBufferPtr;
+
+/* parser.h */
+typedef struct _xmlParserInput xmlParserInput;
+typedef xmlParserInput *xmlParserInputPtr;
+
+typedef struct _xmlParserCtxt xmlParserCtxt;
+typedef xmlParserCtxt *xmlParserCtxtPtr;
+
+typedef struct _xmlSAXLocator xmlSAXLocator;
+typedef xmlSAXLocator *xmlSAXLocatorPtr;
+
+typedef struct _xmlSAXHandler xmlSAXHandler;
+typedef xmlSAXHandler *xmlSAXHandlerPtr;
+
+/* entities.h */
+typedef struct _xmlEntity xmlEntity;
+typedef xmlEntity *xmlEntityPtr;
+
+/**
+ * BASE_BUFFER_SIZE:
+ *
+ * default buffer size 4000.
+ */
+#define BASE_BUFFER_SIZE 4096
+
+/**
+ * LIBXML_NAMESPACE_DICT:
+ *
+ * Defines experimental behaviour:
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
+ */
+/* #define LIBXML_NAMESPACE_DICT */
+
+/**
+ * xmlBufferAllocationScheme:
+ *
+ * A buffer allocation scheme can be defined to either match exactly the
+ * need or double it's allocated size each time it is found too small.
+ */
+
+typedef enum {
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
+ XML_BUFFER_ALLOC_HYBRID /* exact up to a threshold, and doubleit thereafter */
+} xmlBufferAllocationScheme;
+
+/**
+ * xmlBuffer:
+ *
+ * A buffer structure, this old construct is limited to 2GB and
+ * is being deprecated, use API with xmlBuf instead
+ */
+typedef struct _xmlBuffer xmlBuffer;
+typedef xmlBuffer *xmlBufferPtr;
+struct _xmlBuffer {
+ xmlChar *content; /* The buffer content UTF8 */
+ unsigned int use; /* The buffer size used */
+ unsigned int size; /* The buffer size */
+ xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
+};
+
+/**
+ * xmlBuf:
+ *
+ * A buffer structure, new one, the actual structure internals are not public
+ */
+
+typedef struct _xmlBuf xmlBuf;
+
+/**
+ * xmlBufPtr:
+ *
+ * A pointer to a buffer structure, the actual structure internals are not
+ * public
+ */
+
+typedef xmlBuf *xmlBufPtr;
+
+/*
+ * A few public routines for xmlBuf. As those are expected to be used
+ * mostly internally the bulk of the routines are internal in buf.h
+ */
+XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf);
+XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf);
+XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf);
+XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len);
+
+/*
+ * LIBXML2_NEW_BUFFER:
+ *
+ * Macro used to express that the API use the new buffers for
+ * xmlParserInputBuffer and xmlOutputBuffer. The change was
+ * introduced in 2.9.0.
+ */
+#define LIBXML2_NEW_BUFFER
+
+/**
+ * XML_XML_NAMESPACE:
+ *
+ * This is the namespace for the special xml: prefix predefined in the
+ * XML Namespace specification.
+ */
+#define XML_XML_NAMESPACE \
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
+
+/**
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+ */
+#define XML_XML_ID (const xmlChar *) "xml:id"
+
+/*
+ * The different element types carried by an XML tree.
+ *
+ * NOTE: This is synchronized with DOM Level1 values
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
+ */
+typedef enum {
+ XML_ELEMENT_NODE= 1,
+ XML_ATTRIBUTE_NODE= 2,
+ XML_TEXT_NODE= 3,
+ XML_CDATA_SECTION_NODE= 4,
+ XML_ENTITY_REF_NODE= 5,
+ XML_ENTITY_NODE= 6,
+ XML_PI_NODE= 7,
+ XML_COMMENT_NODE= 8,
+ XML_DOCUMENT_NODE= 9,
+ XML_DOCUMENT_TYPE_NODE= 10,
+ XML_DOCUMENT_FRAG_NODE= 11,
+ XML_NOTATION_NODE= 12,
+ XML_HTML_DOCUMENT_NODE= 13,
+ XML_DTD_NODE= 14,
+ XML_ELEMENT_DECL= 15,
+ XML_ATTRIBUTE_DECL= 16,
+ XML_ENTITY_DECL= 17,
+ XML_NAMESPACE_DECL= 18,
+ XML_XINCLUDE_START= 19,
+ XML_XINCLUDE_END= 20
+#ifdef LIBXML_DOCB_ENABLED
+ ,XML_DOCB_DOCUMENT_NODE= 21
+#endif
+} xmlElementType;
+
+
+/**
+ * xmlNotation:
+ *
+ * A DTD Notation definition.
+ */
+
+typedef struct _xmlNotation xmlNotation;
+typedef xmlNotation *xmlNotationPtr;
+struct _xmlNotation {
+ const xmlChar *name; /* Notation name */
+ const xmlChar *PublicID; /* Public identifier, if any */
+ const xmlChar *SystemID; /* System identifier, if any */
+};
+
+/**
+ * xmlAttributeType:
+ *
+ * A DTD Attribute type definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_CDATA = 1,
+ XML_ATTRIBUTE_ID,
+ XML_ATTRIBUTE_IDREF ,
+ XML_ATTRIBUTE_IDREFS,
+ XML_ATTRIBUTE_ENTITY,
+ XML_ATTRIBUTE_ENTITIES,
+ XML_ATTRIBUTE_NMTOKEN,
+ XML_ATTRIBUTE_NMTOKENS,
+ XML_ATTRIBUTE_ENUMERATION,
+ XML_ATTRIBUTE_NOTATION
+} xmlAttributeType;
+
+/**
+ * xmlAttributeDefault:
+ *
+ * A DTD Attribute default definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_NONE = 1,
+ XML_ATTRIBUTE_REQUIRED,
+ XML_ATTRIBUTE_IMPLIED,
+ XML_ATTRIBUTE_FIXED
+} xmlAttributeDefault;
+
+/**
+ * xmlEnumeration:
+ *
+ * List structure used when there is an enumeration in DTDs.
+ */
+
+typedef struct _xmlEnumeration xmlEnumeration;
+typedef xmlEnumeration *xmlEnumerationPtr;
+struct _xmlEnumeration {
+ struct _xmlEnumeration *next; /* next one */
+ const xmlChar *name; /* Enumeration name */
+};
+
+/**
+ * xmlAttribute:
+ *
+ * An Attribute declaration in a DTD.
+ */
+
+typedef struct _xmlAttribute xmlAttribute;
+typedef xmlAttribute *xmlAttributePtr;
+struct _xmlAttribute {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
+ const xmlChar *name; /* Attribute name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ struct _xmlAttribute *nexth; /* next in hash table */
+ xmlAttributeType atype; /* The attribute type */
+ xmlAttributeDefault def; /* the default */
+ const xmlChar *defaultValue; /* or the default value */
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
+ const xmlChar *prefix; /* the namespace prefix if any */
+ const xmlChar *elem; /* Element holding the attribute */
+};
+
+/**
+ * xmlElementContentType:
+ *
+ * Possible definitions of element content types.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_PCDATA = 1,
+ XML_ELEMENT_CONTENT_ELEMENT,
+ XML_ELEMENT_CONTENT_SEQ,
+ XML_ELEMENT_CONTENT_OR
+} xmlElementContentType;
+
+/**
+ * xmlElementContentOccur:
+ *
+ * Possible definitions of element content occurrences.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_ONCE = 1,
+ XML_ELEMENT_CONTENT_OPT,
+ XML_ELEMENT_CONTENT_MULT,
+ XML_ELEMENT_CONTENT_PLUS
+} xmlElementContentOccur;
+
+/**
+ * xmlElementContent:
+ *
+ * An XML Element content as stored after parsing an element definition
+ * in a DTD.
+ */
+
+typedef struct _xmlElementContent xmlElementContent;
+typedef xmlElementContent *xmlElementContentPtr;
+struct _xmlElementContent {
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
+ const xmlChar *name; /* Element name */
+ struct _xmlElementContent *c1; /* first child */
+ struct _xmlElementContent *c2; /* second child */
+ struct _xmlElementContent *parent; /* parent */
+ const xmlChar *prefix; /* Namespace prefix */
+};
+
+/**
+ * xmlElementTypeVal:
+ *
+ * The different possibilities for an element content type.
+ */
+
+typedef enum {
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
+ XML_ELEMENT_TYPE_EMPTY = 1,
+ XML_ELEMENT_TYPE_ANY,
+ XML_ELEMENT_TYPE_MIXED,
+ XML_ELEMENT_TYPE_ELEMENT
+} xmlElementTypeVal;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/xmlregexp.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlElement:
+ *
+ * An XML Element declaration from a DTD.
+ */
+
+typedef struct _xmlElement xmlElement;
+typedef xmlElement *xmlElementPtr;
+struct _xmlElement {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
+ const xmlChar *name; /* Element name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlElementTypeVal etype; /* The type */
+ xmlElementContentPtr content; /* the allowed element content */
+ xmlAttributePtr attributes; /* List of the declared attributes */
+ const xmlChar *prefix; /* the namespace prefix if any */
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlRegexpPtr contModel; /* the validating regexp */
+#else
+ void *contModel;
+#endif
+};
+
+
+/**
+ * XML_LOCAL_NAMESPACE:
+ *
+ * A namespace declaration node.
+ */
+#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
+typedef xmlElementType xmlNsType;
+
+/**
+ * xmlNs:
+ *
+ * An XML namespace.
+ * Note that prefix == NULL is valid, it defines the default namespace
+ * within the subtree (until overridden).
+ *
+ * xmlNsType is unified with xmlElementType.
+ */
+
+typedef struct _xmlNs xmlNs;
+typedef xmlNs *xmlNsPtr;
+struct _xmlNs {
+ struct _xmlNs *next; /* next Ns link for this node */
+ xmlNsType type; /* global or local */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
+ void *_private; /* application data */
+ struct _xmlDoc *context; /* normally an xmlDoc */
+};
+
+/**
+ * xmlDtd:
+ *
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
+ * the internal subset and for the external subset.
+ */
+typedef struct _xmlDtd xmlDtd;
+typedef xmlDtd *xmlDtdPtr;
+struct _xmlDtd {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DTD_NODE, must be second ! */
+ const xmlChar *name; /* Name of the DTD */
+ struct _xmlNode *children; /* the value of the property link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlDoc *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ void *notations; /* Hash table for notations if any */
+ void *elements; /* Hash table for elements if any */
+ void *attributes; /* Hash table for attributes if any */
+ void *entities; /* Hash table for entities if any */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ void *pentities; /* Hash table for param entities if any */
+};
+
+/**
+ * xmlAttr:
+ *
+ * An attribute on an XML node.
+ */
+typedef struct _xmlAttr xmlAttr;
+typedef xmlAttr *xmlAttrPtr;
+struct _xmlAttr {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
+ const xmlChar *name; /* the name of the property */
+ struct _xmlNode *children; /* the value of the property */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlAttr *next; /* next sibling link */
+ struct _xmlAttr *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlAttributeType atype; /* the attribute type if validating */
+ void *psvi; /* for type/PSVI informations */
+};
+
+/**
+ * xmlID:
+ *
+ * An XML ID instance.
+ */
+
+typedef struct _xmlID xmlID;
+typedef xmlID *xmlIDPtr;
+struct _xmlID {
+ struct _xmlID *next; /* next ID */
+ const xmlChar *value; /* The ID name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+ struct _xmlDoc *doc; /* The document holding the ID */
+};
+
+/**
+ * xmlRef:
+ *
+ * An XML IDREF instance.
+ */
+
+typedef struct _xmlRef xmlRef;
+typedef xmlRef *xmlRefPtr;
+struct _xmlRef {
+ struct _xmlRef *next; /* next Ref */
+ const xmlChar *value; /* The Ref name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+};
+
+/**
+ * xmlNode:
+ *
+ * A node in an XML tree.
+ */
+typedef struct _xmlNode xmlNode;
+typedef xmlNode *xmlNodePtr;
+struct _xmlNode {
+ void *_private; /* application data */
+ xmlElementType type; /* type number, must be second ! */
+ const xmlChar *name; /* the name of the node, or the entity */
+ struct _xmlNode *children; /* parent->childs link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlChar *content; /* the content */
+ struct _xmlAttr *properties;/* properties list */
+ xmlNs *nsDef; /* namespace definitions on this node */
+ void *psvi; /* for type/PSVI informations */
+ unsigned short line; /* line number */
+ unsigned short extra; /* extra data for XPath/XSLT */
+};
+
+/**
+ * XML_GET_CONTENT:
+ *
+ * Macro to extract the content pointer of a node.
+ */
+#define XML_GET_CONTENT(n) \
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
+
+/**
+ * XML_GET_LINE:
+ *
+ * Macro to extract the line number of an element node.
+ */
+#define XML_GET_LINE(n) \
+ (xmlGetLineNo(n))
+
+/**
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similary named xmlParserOption
+ */
+typedef enum {
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
+ and not by parsing an instance */
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
+} xmlDocProperties;
+
+/**
+ * xmlDoc:
+ *
+ * An XML document.
+ */
+typedef struct _xmlDoc xmlDoc;
+typedef xmlDoc *xmlDocPtr;
+struct _xmlDoc {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
+ char *name; /* name/filename/URI of the document */
+ struct _xmlNode *children; /* the document tree */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* autoreference to itself */
+
+ /* End of common part */
+ int compression;/* level of zlib compression */
+ int standalone; /* standalone document (no external refs)
+ 1 if standalone="yes"
+ 0 if standalone="no"
+ -1 if there is no XML declaration
+ -2 if there is an XML declaration, but no
+ standalone attribute was specified */
+ struct _xmlDtd *intSubset; /* the document internal subset */
+ struct _xmlDtd *extSubset; /* the document external subset */
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* external initial encoding, if any */
+ void *ids; /* Hash table for ID attributes if any */
+ void *refs; /* Hash table for IDREFs attributes if any */
+ const xmlChar *URL; /* The URI for that document */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
+ void *psvi; /* for type/PSVI informations */
+ int parseFlags; /* set of xmlParserOption used to parse the
+ document */
+ int properties; /* set of xmlDocProperties for this document
+ set at the end of parsing */
+};
+
+
+typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
+typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
+
+/**
+ * xmlDOMWrapAcquireNsFunction:
+ * @ctxt: a DOM wrapper context
+ * @node: the context node (element or attribute)
+ * @nsName: the requested namespace name
+ * @nsPrefix: the requested namespace prefix
+ *
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
+ *
+ * Returns an xmlNsPtr or NULL in case of an error.
+ */
+typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *nsName,
+ const xmlChar *nsPrefix);
+
+/**
+ * xmlDOMWrapCtxt:
+ *
+ * Context for DOM wrapper-operations.
+ */
+struct _xmlDOMWrapCtxt {
+ void * _private;
+ /*
+ * The type of this context, just in case we need specialized
+ * contexts in the future.
+ */
+ int type;
+ /*
+ * Internal namespace map used for various operations.
+ */
+ void * namespaceMap;
+ /*
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
+ * (Note that this is not intended for elem->nsDef).
+ */
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
+};
+
+/**
+ * xmlChildrenNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children."
+ */
+#ifndef xmlChildrenNode
+#define xmlChildrenNode children
+#endif
+
+/**
+ * xmlRootNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children".
+ */
+#ifndef xmlRootNode
+#define xmlRootNode children
+#endif
+
+/*
+ * Variables.
+ */
+
+/*
+ * Some helper functions
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \
+ defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \
+ defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \
+ defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNCName (const xmlChar *value,
+ int space);
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateQName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateNMToken (const xmlChar *value,
+ int space);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildQName (const xmlChar *ncname,
+ const xmlChar *prefix,
+ xmlChar *memory,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName2 (const xmlChar *name,
+ xmlChar **prefix);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSplitQName3 (const xmlChar *name,
+ int *len);
+
+/*
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+ xmlGetBufferAllocationScheme(void);
+
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreate (void);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateSize (size_t size);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateStatic (void *mem,
+ size_t size);
+XMLPUBFUN int XMLCALL
+ xmlBufferResize (xmlBufferPtr buf,
+ unsigned int size);
+XMLPUBFUN void XMLCALL
+ xmlBufferFree (xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferDump (FILE *file,
+ xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferAdd (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferAddHead (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferCat (xmlBufferPtr buf,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferCCat (xmlBufferPtr buf,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferShrink (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferGrow (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN void XMLCALL
+ xmlBufferEmpty (xmlBufferPtr buf);
+XMLPUBFUN const xmlChar* XMLCALL
+ xmlBufferContent (const xmlBuffer *buf);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlBufferDetach (xmlBufferPtr buf);
+XMLPUBFUN void XMLCALL
+ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
+ xmlBufferAllocationScheme scheme);
+XMLPUBFUN int XMLCALL
+ xmlBufferLength (const xmlBuffer *buf);
+
+/*
+ * Creating/freeing new structures.
+ */
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCreateIntSubset (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlNewDtd (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlGetIntSubset (const xmlDoc *doc);
+XMLPUBFUN void XMLCALL
+ xmlFreeDtd (xmlDtdPtr cur);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewGlobalNs (xmlDocPtr doc,
+ const xmlChar *href,
+ const xmlChar *prefix);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewNs (xmlNodePtr node,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlFreeNs (xmlNsPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNsList (xmlNsPtr cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlNewDoc (const xmlChar *version);
+XMLPUBFUN void XMLCALL
+ xmlFreeDoc (xmlDocPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewDocProp (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *value);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsPropEatName (xmlNodePtr node,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlFreePropList (xmlAttrPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeProp (xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyProp (xmlNodePtr target,
+ xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyPropList (xmlNodePtr target,
+ xmlAttrPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCopyDtd (xmlDtdPtr dtd);
+#endif /* LIBXML_TREE_ENABLED */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCopyDoc (xmlDocPtr doc,
+ int recursive);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+/*
+ * Creating new nodes.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNodeEatName (xmlDocPtr doc,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNode (xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNodeEatName (xmlNsPtr ns,
+ xmlChar *name);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+#endif
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocText (const xmlDoc *doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewText (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocPI (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewPI (const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocTextLen (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextLen (const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocComment (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewComment (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCDataBlock (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCharRef (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewReference (const xmlDoc *doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNode (xmlNodePtr node,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNode (xmlNodePtr node,
+ xmlDocPtr doc,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNodeList (xmlDocPtr doc,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNodeList (xmlNodePtr node);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocRawNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocFragment (xmlDocPtr doc);
+#endif /* LIBXML_TREE_ENABLED */
+
+/*
+ * Navigating.
+ */
+XMLPUBFUN long XMLCALL
+ xmlGetLineNo (const xmlNode *node);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNodePath (const xmlNode *node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocGetRootElement (const xmlDoc *doc);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlGetLastChild (const xmlNode *parent);
+XMLPUBFUN int XMLCALL
+ xmlNodeIsText (const xmlNode *node);
+XMLPUBFUN int XMLCALL
+ xmlIsBlankNode (const xmlNode *node);
+
+/*
+ * Changing the structure.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocSetRootElement (xmlDocPtr doc,
+ xmlNodePtr root);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetName (xmlNodePtr cur,
+ const xmlChar *name);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChild (xmlNodePtr parent,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChildList (xmlNodePtr parent,
+ xmlNodePtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlReplaceNode (xmlNodePtr old,
+ xmlNodePtr cur);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddPrevSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddNextSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN void XMLCALL
+ xmlUnlinkNode (xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextMerge (xmlNodePtr first,
+ xmlNodePtr second);
+XMLPUBFUN int XMLCALL
+ xmlTextConcat (xmlNodePtr node,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlFreeNodeList (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNode (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSetTreeDoc (xmlNodePtr tree,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSetListDoc (xmlNodePtr list,
+ xmlDocPtr doc);
+/*
+ * Namespaces.
+ */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNs (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNsByHref (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *href);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNsPtr * XMLCALL
+ xmlGetNsList (const xmlDoc *doc,
+ const xmlNode *node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
+
+XMLPUBFUN void XMLCALL
+ xmlSetNs (xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespace (xmlNsPtr cur);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespaceList (xmlNsPtr cur);
+
+/*
+ * Changing the content.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNoNsProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasNsProp (const xmlNode *node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNsProp (const xmlNode *node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringGetNodeList (const xmlDoc *doc,
+ const xmlChar *value);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringLenGetNodeList (const xmlDoc *doc,
+ const xmlChar *value,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetString (xmlDocPtr doc,
+ const xmlNode *list,
+ int inLine);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetRawString (const xmlDoc *doc,
+ const xmlNode *list,
+ int inLine);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContent (xmlNodePtr cur,
+ const xmlChar *content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContent (xmlNodePtr cur,
+ const xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetContent (const xmlNode *cur);
+
+XMLPUBFUN int XMLCALL
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
+ const xmlNode *cur);
+XMLPUBFUN int XMLCALL
+ xmlBufGetNodeContent (xmlBufPtr buf,
+ const xmlNode *cur);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetLang (const xmlNode *cur);
+XMLPUBFUN int XMLCALL
+ xmlNodeGetSpacePreserve (const xmlNode *cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetLang (xmlNodePtr cur,
+ const xmlChar *lang);
+XMLPUBFUN void XMLCALL
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
+ int val);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetBase (const xmlDoc *doc,
+ const xmlNode *cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlNodeSetBase (xmlNodePtr cur,
+ const xmlChar *uri);
+#endif
+
+/*
+ * Removing content.
+ */
+XMLPUBFUN int XMLCALL
+ xmlRemoveProp (xmlAttrPtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlUnsetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlUnsetProp (xmlNodePtr node,
+ const xmlChar *name);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+
+/*
+ * Internal, don't use.
+ */
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
+ const xmlChar *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteChar (xmlBufferPtr buf,
+ const char *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
+ const xmlChar *string);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlAttrPtr attr,
+ const xmlChar *string);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * Namespace handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlReconciliateNs (xmlDocPtr doc,
+ xmlNodePtr tree);
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Saving.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocFormatDump (FILE *f,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlElemDump (FILE *f,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFile (const char *filename,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN size_t XMLCALL
+ xmlBufNodeDump (xmlBufPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format,
+ const char *encoding);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * XHTML
+ */
+XMLPUBFUN int XMLCALL
+ xmlIsXHTML (const xmlChar *systemID,
+ const xmlChar *publicID);
+
+/*
+ * Compression.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetDocCompressMode (const xmlDoc *doc);
+XMLPUBFUN void XMLCALL
+ xmlSetDocCompressMode (xmlDocPtr doc,
+ int mode);
+XMLPUBFUN int XMLCALL
+ xmlGetCompressMode (void);
+XMLPUBFUN void XMLCALL
+ xmlSetCompressMode (int mode);
+
+/*
+* DOM-wrapper helper functions.
+*/
+XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
+ xmlDOMWrapNewCtxt (void);
+XMLPUBFUN void XMLCALL
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr elem,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr node,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlNodePtr *clonedNode,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int deep,
+ int options);
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+ */
+XMLPUBFUN unsigned long XMLCALL
+ xmlChildElementCount (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNextElementSibling (xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlFirstElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlLastElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlPreviousElementSibling (xmlNodePtr node);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#ifndef __XML_PARSER_H__
+#include <libxml/xmlmemory.h>
+#endif
+
+#endif /* __XML_TREE_H__ */
+
diff --git a/include/libxml/uri.h b/include/libxml/uri.h
new file mode 100644
index 0000000..db48262
--- /dev/null
+++ b/include/libxml/uri.h
@@ -0,0 +1,94 @@
+/**
+ * Summary: library of generic URI related routines
+ * Description: library of generic URI related routines
+ * Implements RFC 2396
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_URI_H__
+#define __XML_URI_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlURI:
+ *
+ * A parsed URI reference. This is a struct containing the various fields
+ * as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
+ */
+typedef struct _xmlURI xmlURI;
+typedef xmlURI *xmlURIPtr;
+struct _xmlURI {
+ char *scheme; /* the URI scheme */
+ char *opaque; /* opaque part */
+ char *authority; /* the authority part */
+ char *server; /* the server part */
+ char *user; /* the user part */
+ int port; /* the port number */
+ char *path; /* the path string */
+ char *query; /* the query string (deprecated - use with caution) */
+ char *fragment; /* the fragment identifier */
+ int cleanup; /* parsing potentially unclean URI */
+ char *query_raw; /* the query string (as it appears in the URI) */
+};
+
+/*
+ * This function is in tree.h:
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
+ * xmlNodePtr cur);
+ */
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlCreateURI (void);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildRelativeURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURI (const char *str);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURIRaw (const char *str,
+ int raw);
+XMLPUBFUN int XMLCALL
+ xmlParseURIReference (xmlURIPtr uri,
+ const char *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSaveUri (xmlURIPtr uri);
+XMLPUBFUN void XMLCALL
+ xmlPrintURI (FILE *stream,
+ xmlURIPtr uri);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscapeStr (const xmlChar *str,
+ const xmlChar *list);
+XMLPUBFUN char * XMLCALL
+ xmlURIUnescapeString (const char *str,
+ int len,
+ char *target);
+XMLPUBFUN int XMLCALL
+ xmlNormalizeURIPath (char *path);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscape (const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlFreeURI (xmlURIPtr uri);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlCanonicPath (const xmlChar *path);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlPathToURI (const xmlChar *path);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_URI_H__ */
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
new file mode 100644
index 0000000..2bc7b38
--- /dev/null
+++ b/include/libxml/valid.h
@@ -0,0 +1,458 @@
+/*
+ * Summary: The DTD validation
+ * Description: API for the DTD handling and the validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_VALID_H__
+#define __XML_VALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/list.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Validation state added for non-determinist content model.
+ */
+typedef struct _xmlValidState xmlValidState;
+typedef xmlValidState *xmlValidStatePtr;
+
+/**
+ * xmlValidityErrorFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity error is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlValidityWarningFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity warning is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+#ifdef IN_LIBXML
+/**
+ * XML_CTXT_FINISH_DTD_0:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_0 0xabcd1234
+/**
+ * XML_CTXT_FINISH_DTD_1:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_1 0xabcd1235
+#endif
+
+/*
+ * xmlValidCtxt:
+ * An xmlValidCtxt is used for error reporting when validating.
+ */
+typedef struct _xmlValidCtxt xmlValidCtxt;
+typedef xmlValidCtxt *xmlValidCtxtPtr;
+struct _xmlValidCtxt {
+ void *userData; /* user specific data block */
+ xmlValidityErrorFunc error; /* the callback in case of errors */
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
+
+ /* Node analysis stack used when validating within entities */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ unsigned int finishDtd; /* finished validating the Dtd ? */
+ xmlDocPtr doc; /* the document */
+ int valid; /* temporary validity check result */
+
+ /* state state used for non-determinist content validation */
+ xmlValidState *vstate; /* current state */
+ int vstateNr; /* Depth of the validation stack */
+ int vstateMax; /* Max depth of the validation stack */
+ xmlValidState *vstateTab; /* array of validation states */
+
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlAutomataPtr am; /* the automata */
+ xmlAutomataStatePtr state; /* used to build the automata */
+#else
+ void *am;
+ void *state;
+#endif
+};
+
+/*
+ * ALL notation declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlNotationTable;
+typedef xmlNotationTable *xmlNotationTablePtr;
+
+/*
+ * ALL element declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlElementTable;
+typedef xmlElementTable *xmlElementTablePtr;
+
+/*
+ * ALL attribute declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlAttributeTable;
+typedef xmlAttributeTable *xmlAttributeTablePtr;
+
+/*
+ * ALL IDs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlIDTable;
+typedef xmlIDTable *xmlIDTablePtr;
+
+/*
+ * ALL Refs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlRefTable;
+typedef xmlRefTable *xmlRefTablePtr;
+
+/* Notation */
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *PublicID,
+ const xmlChar *SystemID);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNotationTablePtr XMLCALL
+ xmlCopyNotationTable (xmlNotationTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeNotationTable (xmlNotationTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationDecl (xmlBufferPtr buf,
+ xmlNotationPtr nota);
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationTable (xmlBufferPtr buf,
+ xmlNotationTablePtr table);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Element Content */
+/* the non Doc version are being deprecated */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewElementContent (const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyElementContent (xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeElementContent (xmlElementContentPtr cur);
+/* the new versions with doc argument */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewDocElementContent (xmlDocPtr doc,
+ const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSnprintfElementContent(char *buf,
+ int size,
+ xmlElementContentPtr content,
+ int englob);
+#ifdef LIBXML_OUTPUT_ENABLED
+/* DEPRECATED */
+XMLPUBFUN void XMLCALL
+ xmlSprintfElementContent(char *buf,
+ xmlElementContentPtr content,
+ int englob);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/* DEPRECATED */
+
+/* Element */
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ xmlElementTypeVal type,
+ xmlElementContentPtr content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlElementTablePtr XMLCALL
+ xmlCopyElementTable (xmlElementTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeElementTable (xmlElementTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpElementTable (xmlBufferPtr buf,
+ xmlElementTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpElementDecl (xmlBufferPtr buf,
+ xmlElementPtr elem);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Enumeration */
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCreateEnumeration (const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
+#endif /* LIBXML_TREE_ENABLED */
+
+/* Attribute */
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *ns,
+ xmlAttributeType type,
+ xmlAttributeDefault def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlAttributeTablePtr XMLCALL
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeTable (xmlBufferPtr buf,
+ xmlAttributeTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
+ xmlAttributePtr attr);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* IDs */
+XMLPUBFUN xmlIDPtr XMLCALL
+ xmlAddID (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeIDTable (xmlIDTablePtr table);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlGetID (xmlDocPtr doc,
+ const xmlChar *ID);
+XMLPUBFUN int XMLCALL
+ xmlIsID (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveID (xmlDocPtr doc,
+ xmlAttrPtr attr);
+
+/* IDREFs */
+XMLPUBFUN xmlRefPtr XMLCALL
+ xmlAddRef (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeRefTable (xmlRefTablePtr table);
+XMLPUBFUN int XMLCALL
+ xmlIsRef (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveRef (xmlDocPtr doc,
+ xmlAttrPtr attr);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlGetRefs (xmlDocPtr doc,
+ const xmlChar *ID);
+
+/**
+ * The public function calls related to validity checking.
+ */
+#ifdef LIBXML_VALID_ENABLED
+/* Allocate/Release Validation Contexts */
+XMLPUBFUN xmlValidCtxtPtr XMLCALL
+ xmlNewValidCtxt(void);
+XMLPUBFUN void XMLCALL
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
+
+XMLPUBFUN int XMLCALL
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlElementPtr elem);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlAttributePtr attr);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeValue(xmlAttributeType type,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNotationPtr nota);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlDtdPtr dtd);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *prefix,
+ xmlNsPtr ns,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+#endif /* LIBXML_VALID_ENABLED */
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *notationName);
+#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlIsMixedElement (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+
+#ifdef LIBXML_VALID_ENABLED
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
+ const xmlChar **names,
+ int *len,
+ int max);
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetValidElements(xmlNode *prev,
+ xmlNode *next,
+ const xmlChar **names,
+ int max);
+XMLPUBFUN int XMLCALL
+ xmlValidateNameValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNamesValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokenValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokensValue(const xmlChar *value);
+
+#ifdef LIBXML_REGEXP_ENABLED
+/*
+ * Validation based on the regexp support
+ */
+XMLPUBFUN int XMLCALL
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
+ xmlElementPtr elem);
+
+XMLPUBFUN int XMLCALL
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+XMLPUBFUN int XMLCALL
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+#endif /* LIBXML_REGEXP_ENABLED */
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_VALID_H__ */
diff --git a/include/libxml/xinclude.h b/include/libxml/xinclude.h
new file mode 100644
index 0000000..863ab25
--- /dev/null
+++ b/include/libxml/xinclude.h
@@ -0,0 +1,129 @@
+/*
+ * Summary: implementation of XInclude
+ * Description: API to handle XInclude processing,
+ * implements the
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XINCLUDE_H__
+#define __XML_XINCLUDE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XINCLUDE_NS:
+ *
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
+ */
+#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
+/**
+ * XINCLUDE_OLD_NS:
+ *
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
+ */
+#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
+/**
+ * XINCLUDE_NODE:
+ *
+ * Macro defining "include"
+ */
+#define XINCLUDE_NODE (const xmlChar *) "include"
+/**
+ * XINCLUDE_FALLBACK:
+ *
+ * Macro defining "fallback"
+ */
+#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
+/**
+ * XINCLUDE_HREF:
+ *
+ * Macro defining "href"
+ */
+#define XINCLUDE_HREF (const xmlChar *) "href"
+/**
+ * XINCLUDE_PARSE:
+ *
+ * Macro defining "parse"
+ */
+#define XINCLUDE_PARSE (const xmlChar *) "parse"
+/**
+ * XINCLUDE_PARSE_XML:
+ *
+ * Macro defining "xml"
+ */
+#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
+/**
+ * XINCLUDE_PARSE_TEXT:
+ *
+ * Macro defining "text"
+ */
+#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
+/**
+ * XINCLUDE_PARSE_ENCODING:
+ *
+ * Macro defining "encoding"
+ */
+#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
+/**
+ * XINCLUDE_PARSE_XPOINTER:
+ *
+ * Macro defining "xpointer"
+ */
+#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
+
+typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
+typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
+
+/*
+ * standalone processing
+ */
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcess (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
+ int flags);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTree (xmlNodePtr tree);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
+ int flags);
+/*
+ * contextual processing
+ */
+XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
+ xmlXIncludeNewContext (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
+ int flags);
+XMLPUBFUN void XMLCALL
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
+ xmlNodePtr tree);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XINCLUDE_ENABLED */
+
+#endif /* __XML_XINCLUDE_H__ */
diff --git a/include/libxml/xlink.h b/include/libxml/xlink.h
new file mode 100644
index 0000000..a209a99
--- /dev/null
+++ b/include/libxml/xlink.h
@@ -0,0 +1,189 @@
+/*
+ * Summary: unfinished XLink detection module
+ * Description: unfinished XLink detection module
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XLINK_H__
+#define __XML_XLINK_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Various defines for the various Link properties.
+ *
+ * NOTE: the link detection layer will try to resolve QName expansion
+ * of namespaces. If "foo" is the prefix for "http://foo.com/"
+ * then the link detection layer will expand role="foo:myrole"
+ * to "http://foo.com/:myrole".
+ * NOTE: the link detection layer will expand URI-Refences found on
+ * href attributes by using the base mechanism if found.
+ */
+typedef xmlChar *xlinkHRef;
+typedef xmlChar *xlinkRole;
+typedef xmlChar *xlinkTitle;
+
+typedef enum {
+ XLINK_TYPE_NONE = 0,
+ XLINK_TYPE_SIMPLE,
+ XLINK_TYPE_EXTENDED,
+ XLINK_TYPE_EXTENDED_SET
+} xlinkType;
+
+typedef enum {
+ XLINK_SHOW_NONE = 0,
+ XLINK_SHOW_NEW,
+ XLINK_SHOW_EMBED,
+ XLINK_SHOW_REPLACE
+} xlinkShow;
+
+typedef enum {
+ XLINK_ACTUATE_NONE = 0,
+ XLINK_ACTUATE_AUTO,
+ XLINK_ACTUATE_ONREQUEST
+} xlinkActuate;
+
+/**
+ * xlinkNodeDetectFunc:
+ * @ctx: user data pointer
+ * @node: the node to check
+ *
+ * This is the prototype for the link detection routine.
+ * It calls the default link detection callbacks upon link detection.
+ */
+typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
+
+/*
+ * The link detection module interact with the upper layers using
+ * a set of callback registered at parsing time.
+ */
+
+/**
+ * xlinkSimpleLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @href: the target of the link
+ * @role: the role string
+ * @title: the link title
+ *
+ * This is the prototype for a simple link detection callback.
+ */
+typedef void
+(*xlinkSimpleLinkFunk) (void *ctx,
+ xmlNodePtr node,
+ const xlinkHRef href,
+ const xlinkRole role,
+ const xlinkTitle title);
+
+/**
+ * xlinkExtendedLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbArcs: the number of arcs detected on the link
+ * @from: pointer to the array of source roles found on the arcs
+ * @to: pointer to the array of target roles found on the arcs
+ * @show: array of values for the show attributes found on the arcs
+ * @actuate: array of values for the actuate attributes found on the arcs
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkFunk)(void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbArcs,
+ const xlinkRole *from,
+ const xlinkRole *to,
+ xlinkShow *show,
+ xlinkActuate *actuate,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * xlinkExtendedLinkSetFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link set detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkSetFunk) (void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * This is the structure containing a set of Links detection callbacks.
+ *
+ * There is no default xlink callbacks, if one want to get link
+ * recognition activated, those call backs must be provided before parsing.
+ */
+typedef struct _xlinkHandler xlinkHandler;
+typedef xlinkHandler *xlinkHandlerPtr;
+struct _xlinkHandler {
+ xlinkSimpleLinkFunk simple;
+ xlinkExtendedLinkFunk extended;
+ xlinkExtendedLinkSetFunk set;
+};
+
+/*
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+ */
+
+XMLPUBFUN xlinkNodeDetectFunc XMLCALL
+ xlinkGetDefaultDetect (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
+
+/*
+ * Routines to set/get the default handlers.
+ */
+XMLPUBFUN xlinkHandlerPtr XMLCALL
+ xlinkGetDefaultHandler (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultHandler (xlinkHandlerPtr handler);
+
+/*
+ * Link detection module itself.
+ */
+XMLPUBFUN xlinkType XMLCALL
+ xlinkIsLink (xmlDocPtr doc,
+ xmlNodePtr node);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+
+#endif /* __XML_XLINK_H__ */
diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h
new file mode 100644
index 0000000..3e41744
--- /dev/null
+++ b/include/libxml/xmlIO.h
@@ -0,0 +1,366 @@
+/*
+ * Summary: interface for the I/O interfaces used by the parser
+ * Description: interface for the I/O interfaces used by the parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_IO_H__
+#define __XML_IO_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Those are the functions and datatypes for the parser input
+ * I/O structures.
+ */
+
+/**
+ * xmlInputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to detect if the current handler
+ * can provide input fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
+/**
+ * xmlInputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to open the resource
+ *
+ * Returns an Input context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
+/**
+ * xmlInputReadCallback:
+ * @context: an Input context
+ * @buffer: the buffer to store data read
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Input API to read the resource
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
+/**
+ * xmlInputCloseCallback:
+ * @context: an Input context
+ *
+ * Callback used in the I/O Input API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Those are the functions and datatypes for the library output
+ * I/O structures.
+ */
+
+/**
+ * xmlOutputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to detect if the current handler
+ * can provide output fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Output module should be used
+ */
+typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
+/**
+ * xmlOutputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to open the resource
+ *
+ * Returns an Output context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
+/**
+ * xmlOutputWriteCallback:
+ * @context: an Output context
+ * @buffer: the buffer of data to write
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Output API to write to the resource
+ *
+ * Returns the number of bytes written or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
+ int len);
+/**
+ * xmlOutputCloseCallback:
+ * @context: an Output context
+ *
+ * Callback used in the I/O Output API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/globals.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/encoding.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+struct _xmlParserInputBuffer {
+ void* context;
+ xmlInputReadCallback readcallback;
+ xmlInputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
+ xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
+ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
+ int error;
+ unsigned long rawconsumed;/* amount consumed from raw */
+};
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+struct _xmlOutputBuffer {
+ void* context;
+ xmlOutputWriteCallback writecallback;
+ xmlOutputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
+ xmlBufPtr conv; /* if encoder != NULL buffer for output */
+ int written; /* total number of byte written */
+ int error;
+};
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/*
+ * Interfaces for input
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupInputCallbacks (void);
+
+XMLPUBFUN int XMLCALL
+ xmlPopInputCallbacks (void);
+
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultInputCallbacks (void);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlAllocParserInputBuffer (xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFilename (const char *URI,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFile (FILE *file,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFd (int fd,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateMem (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateStatic (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferRead (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferPush (xmlParserInputBufferPtr in,
+ int len,
+ const char *buf);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
+XMLPUBFUN char * XMLCALL
+ xmlParserGetDirectory (const char *filename);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc,
+ xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc);
+
+xmlParserInputBufferPtr
+ __xmlParserInputBufferCreateFilename(const char *URI,
+ xmlCharEncoding enc);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Interfaces for output
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupOutputCallbacks (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultOutputCallbacks(void);
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFilename (const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFile (FILE *file,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFd (int fd,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncodingHandlerPtr encoder);
+
+/* Couple of APIs to get the output without digging into the buffers */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlOutputBufferGetContent (xmlOutputBufferPtr out);
+XMLPUBFUN size_t XMLCALL
+ xmlOutputBufferGetSize (xmlOutputBufferPtr out);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWrite (xmlOutputBufferPtr out,
+ int len,
+ const char *buf);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteString (xmlOutputBufferPtr out,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
+ const xmlChar *str,
+ xmlCharEncodingOutputFunc escaping);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferFlush (xmlOutputBufferPtr out);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferClose (xmlOutputBufferPtr out);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
+ xmlOutputOpenCallback openFunc,
+ xmlOutputWriteCallback writeFunc,
+ xmlOutputCloseCallback closeFunc);
+
+xmlOutputBufferPtr
+ __xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+#ifdef LIBXML_HTTP_ENABLED
+/* This function only exists if HTTP support built into the library */
+XMLPUBFUN void XMLCALL
+ xmlRegisterHTTPPostCallbacks (void );
+#endif /* LIBXML_HTTP_ENABLED */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr ret);
+
+/*
+ * A predefined entity loader disabling network accesses
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNoNetExternalEntityLoader (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
+ * Check xmlCanonicPath in uri.h for a better alternative.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNormalizeWindowsPath (const xmlChar *path);
+
+XMLPUBFUN int XMLCALL
+ xmlCheckFilename (const char *path);
+/**
+ * Default 'file://' protocol callbacks
+ */
+XMLPUBFUN int XMLCALL
+ xmlFileMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlFileOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlFileRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlFileClose (void * context);
+
+/**
+ * Default 'http://' protocol callbacks
+ */
+#ifdef LIBXML_HTTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpen (const char *filename);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpenW (const char * post_uri,
+ int compression );
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPClose (void * context);
+#endif /* LIBXML_HTTP_ENABLED */
+
+/**
+ * Default 'ftp://' protocol callbacks
+ */
+#ifdef LIBXML_FTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOFTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOFTPOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPClose (void * context);
+#endif /* LIBXML_FTP_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_IO_H__ */
diff --git a/include/libxml/xmlautomata.h b/include/libxml/xmlautomata.h
new file mode 100644
index 0000000..bf1b131
--- /dev/null
+++ b/include/libxml/xmlautomata.h
@@ -0,0 +1,146 @@
+/*
+ * Summary: API to build regexp automata
+ * Description: the API to build regexp automata
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_AUTOMATA_H__
+#define __XML_AUTOMATA_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+#ifdef LIBXML_AUTOMATA_ENABLED
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlAutomataPtr:
+ *
+ * A libxml automata description, It can be compiled into a regexp
+ */
+typedef struct _xmlAutomata xmlAutomata;
+typedef xmlAutomata *xmlAutomataPtr;
+
+/**
+ * xmlAutomataStatePtr:
+ *
+ * A state int the automata description,
+ */
+typedef struct _xmlAutomataState xmlAutomataState;
+typedef xmlAutomataState *xmlAutomataStatePtr;
+
+/*
+ * Building API
+ */
+XMLPUBFUN xmlAutomataPtr XMLCALL
+ xmlNewAutomata (void);
+XMLPUBFUN void XMLCALL
+ xmlFreeAutomata (xmlAutomataPtr am);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataGetInitState (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataSetFinalState (xmlAutomataPtr am,
+ xmlAutomataStatePtr state);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewState (xmlAutomataPtr am);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewNegTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewAllTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int lax);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewEpsilon (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountedTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCounterTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN int XMLCALL
+ xmlAutomataNewCounter (xmlAutomataPtr am,
+ int min,
+ int max);
+
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlAutomataCompile (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataIsDeterminist (xmlAutomataPtr am);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_AUTOMATA_ENABLED */
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /* __XML_AUTOMATA_H__ */
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
new file mode 100644
index 0000000..43e68ca
--- /dev/null
+++ b/include/libxml/xmlerror.h
@@ -0,0 +1,945 @@
+/*
+ * Summary: error handling
+ * Description: the API used to report errors
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#include <libxml/parser.h>
+
+#ifndef __XML_ERROR_H__
+#define __XML_ERROR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlErrorLevel:
+ *
+ * Indicates the level of an error
+ */
+typedef enum {
+ XML_ERR_NONE = 0,
+ XML_ERR_WARNING = 1, /* A simple warning */
+ XML_ERR_ERROR = 2, /* A recoverable error */
+ XML_ERR_FATAL = 3 /* A fatal error */
+} xmlErrorLevel;
+
+/**
+ * xmlErrorDomain:
+ *
+ * Indicates where an error may have come from
+ */
+typedef enum {
+ XML_FROM_NONE = 0,
+ XML_FROM_PARSER, /* The XML parser */
+ XML_FROM_TREE, /* The tree module */
+ XML_FROM_NAMESPACE, /* The XML Namespace module */
+ XML_FROM_DTD, /* The XML DTD validation with parser context*/
+ XML_FROM_HTML, /* The HTML parser */
+ XML_FROM_MEMORY, /* The memory allocator */
+ XML_FROM_OUTPUT, /* The serialization code */
+ XML_FROM_IO, /* The Input/Output stack */
+ XML_FROM_FTP, /* The FTP module */
+ XML_FROM_HTTP, /* The HTTP module */
+ XML_FROM_XINCLUDE, /* The XInclude processing */
+ XML_FROM_XPATH, /* The XPath module */
+ XML_FROM_XPOINTER, /* The XPointer module */
+ XML_FROM_REGEXP, /* The regular expressions module */
+ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
+ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
+ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
+ XML_FROM_RELAXNGP, /* The Relax-NG parser module */
+ XML_FROM_RELAXNGV, /* The Relax-NG validator module */
+ XML_FROM_CATALOG, /* The Catalog module */
+ XML_FROM_C14N, /* The Canonicalization module */
+ XML_FROM_XSLT, /* The XSLT engine from libxslt */
+ XML_FROM_VALID, /* The XML DTD validation with valid context */
+ XML_FROM_CHECK, /* The error checking module */
+ XML_FROM_WRITER, /* The xmlwriter module */
+ XML_FROM_MODULE, /* The dynamically loaded module module*/
+ XML_FROM_I18N, /* The module handling character conversion */
+ XML_FROM_SCHEMATRONV,/* The Schematron validator module */
+ XML_FROM_BUFFER, /* The buffers module */
+ XML_FROM_URI /* The URI module */
+} xmlErrorDomain;
+
+/**
+ * xmlError:
+ *
+ * An XML Error instance.
+ */
+
+typedef struct _xmlError xmlError;
+typedef xmlError *xmlErrorPtr;
+struct _xmlError {
+ int domain; /* What part of the library raised this error */
+ int code; /* The error code, e.g. an xmlParserError */
+ char *message;/* human-readable informative error message */
+ xmlErrorLevel level;/* how consequent is the error */
+ char *file; /* the filename */
+ int line; /* the line number if available */
+ char *str1; /* extra string information */
+ char *str2; /* extra string information */
+ char *str3; /* extra string information */
+ int int1; /* extra number information */
+ int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
+ void *ctxt; /* the parser context if available */
+ void *node; /* the node in the tree */
+};
+
+/**
+ * xmlParserError:
+ *
+ * This is an error that the XML (or HTML) parser can generate
+ */
+typedef enum {
+ XML_ERR_OK = 0,
+ XML_ERR_INTERNAL_ERROR, /* 1 */
+ XML_ERR_NO_MEMORY, /* 2 */
+ XML_ERR_DOCUMENT_START, /* 3 */
+ XML_ERR_DOCUMENT_EMPTY, /* 4 */
+ XML_ERR_DOCUMENT_END, /* 5 */
+ XML_ERR_INVALID_HEX_CHARREF, /* 6 */
+ XML_ERR_INVALID_DEC_CHARREF, /* 7 */
+ XML_ERR_INVALID_CHARREF, /* 8 */
+ XML_ERR_INVALID_CHAR, /* 9 */
+ XML_ERR_CHARREF_AT_EOF, /* 10 */
+ XML_ERR_CHARREF_IN_PROLOG, /* 11 */
+ XML_ERR_CHARREF_IN_EPILOG, /* 12 */
+ XML_ERR_CHARREF_IN_DTD, /* 13 */
+ XML_ERR_ENTITYREF_AT_EOF, /* 14 */
+ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
+ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
+ XML_ERR_ENTITYREF_IN_DTD, /* 17 */
+ XML_ERR_PEREF_AT_EOF, /* 18 */
+ XML_ERR_PEREF_IN_PROLOG, /* 19 */
+ XML_ERR_PEREF_IN_EPILOG, /* 20 */
+ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
+ XML_ERR_ENTITYREF_NO_NAME, /* 22 */
+ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
+ XML_ERR_PEREF_NO_NAME, /* 24 */
+ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
+ XML_ERR_UNDECLARED_ENTITY, /* 26 */
+ XML_WAR_UNDECLARED_ENTITY, /* 27 */
+ XML_ERR_UNPARSED_ENTITY, /* 28 */
+ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
+ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
+ XML_ERR_UNKNOWN_ENCODING, /* 31 */
+ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
+ XML_ERR_STRING_NOT_STARTED, /* 33 */
+ XML_ERR_STRING_NOT_CLOSED, /* 34 */
+ XML_ERR_NS_DECL_ERROR, /* 35 */
+ XML_ERR_ENTITY_NOT_STARTED, /* 36 */
+ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
+ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
+ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
+ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
+ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
+ XML_ERR_LITERAL_NOT_STARTED, /* 43 */
+ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
+ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
+ XML_ERR_PI_NOT_STARTED, /* 46 */
+ XML_ERR_PI_NOT_FINISHED, /* 47 */
+ XML_ERR_NOTATION_NOT_STARTED, /* 48 */
+ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
+ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
+ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
+ XML_ERR_MIXED_NOT_STARTED, /* 52 */
+ XML_ERR_MIXED_NOT_FINISHED, /* 53 */
+ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
+ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
+ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
+ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
+ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
+ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
+ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
+ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
+ XML_ERR_MISPLACED_CDATA_END, /* 62 */
+ XML_ERR_CDATA_NOT_FINISHED, /* 63 */
+ XML_ERR_RESERVED_XML_NAME, /* 64 */
+ XML_ERR_SPACE_REQUIRED, /* 65 */
+ XML_ERR_SEPARATOR_REQUIRED, /* 66 */
+ XML_ERR_NMTOKEN_REQUIRED, /* 67 */
+ XML_ERR_NAME_REQUIRED, /* 68 */
+ XML_ERR_PCDATA_REQUIRED, /* 69 */
+ XML_ERR_URI_REQUIRED, /* 70 */
+ XML_ERR_PUBID_REQUIRED, /* 71 */
+ XML_ERR_LT_REQUIRED, /* 72 */
+ XML_ERR_GT_REQUIRED, /* 73 */
+ XML_ERR_LTSLASH_REQUIRED, /* 74 */
+ XML_ERR_EQUAL_REQUIRED, /* 75 */
+ XML_ERR_TAG_NAME_MISMATCH, /* 76 */
+ XML_ERR_TAG_NOT_FINISHED, /* 77 */
+ XML_ERR_STANDALONE_VALUE, /* 78 */
+ XML_ERR_ENCODING_NAME, /* 79 */
+ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
+ XML_ERR_INVALID_ENCODING, /* 81 */
+ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
+ XML_ERR_CONDSEC_INVALID, /* 83 */
+ XML_ERR_VALUE_REQUIRED, /* 84 */
+ XML_ERR_NOT_WELL_BALANCED, /* 85 */
+ XML_ERR_EXTRA_CONTENT, /* 86 */
+ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
+ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
+ XML_ERR_ENTITY_LOOP, /* 89 */
+ XML_ERR_ENTITY_BOUNDARY, /* 90 */
+ XML_ERR_INVALID_URI, /* 91 */
+ XML_ERR_URI_FRAGMENT, /* 92 */
+ XML_WAR_CATALOG_PI, /* 93 */
+ XML_ERR_NO_DTD, /* 94 */
+ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
+ XML_ERR_VERSION_MISSING, /* 96 */
+ XML_WAR_UNKNOWN_VERSION, /* 97 */
+ XML_WAR_LANG_VALUE, /* 98 */
+ XML_WAR_NS_URI, /* 99 */
+ XML_WAR_NS_URI_RELATIVE, /* 100 */
+ XML_ERR_MISSING_ENCODING, /* 101 */
+ XML_WAR_SPACE_VALUE, /* 102 */
+ XML_ERR_NOT_STANDALONE, /* 103 */
+ XML_ERR_ENTITY_PROCESSING, /* 104 */
+ XML_ERR_NOTATION_PROCESSING, /* 105 */
+ XML_WAR_NS_COLUMN, /* 106 */
+ XML_WAR_ENTITY_REDEFINED, /* 107 */
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
+ XML_ERR_VERSION_MISMATCH, /* 109 */
+ XML_ERR_NAME_TOO_LONG, /* 110 */
+ XML_ERR_USER_STOP, /* 111 */
+ XML_NS_ERR_XML_NAMESPACE = 200,
+ XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
+ XML_NS_ERR_QNAME, /* 202 */
+ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
+ XML_NS_ERR_EMPTY, /* 204 */
+ XML_NS_ERR_COLON, /* 205 */
+ XML_DTD_ATTRIBUTE_DEFAULT = 500,
+ XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
+ XML_DTD_ATTRIBUTE_VALUE, /* 502 */
+ XML_DTD_CONTENT_ERROR, /* 503 */
+ XML_DTD_CONTENT_MODEL, /* 504 */
+ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
+ XML_DTD_DIFFERENT_PREFIX, /* 506 */
+ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
+ XML_DTD_ELEM_NAMESPACE, /* 508 */
+ XML_DTD_ELEM_REDEFINED, /* 509 */
+ XML_DTD_EMPTY_NOTATION, /* 510 */
+ XML_DTD_ENTITY_TYPE, /* 511 */
+ XML_DTD_ID_FIXED, /* 512 */
+ XML_DTD_ID_REDEFINED, /* 513 */
+ XML_DTD_ID_SUBSET, /* 514 */
+ XML_DTD_INVALID_CHILD, /* 515 */
+ XML_DTD_INVALID_DEFAULT, /* 516 */
+ XML_DTD_LOAD_ERROR, /* 517 */
+ XML_DTD_MISSING_ATTRIBUTE, /* 518 */
+ XML_DTD_MIXED_CORRUPT, /* 519 */
+ XML_DTD_MULTIPLE_ID, /* 520 */
+ XML_DTD_NO_DOC, /* 521 */
+ XML_DTD_NO_DTD, /* 522 */
+ XML_DTD_NO_ELEM_NAME, /* 523 */
+ XML_DTD_NO_PREFIX, /* 524 */
+ XML_DTD_NO_ROOT, /* 525 */
+ XML_DTD_NOTATION_REDEFINED, /* 526 */
+ XML_DTD_NOTATION_VALUE, /* 527 */
+ XML_DTD_NOT_EMPTY, /* 528 */
+ XML_DTD_NOT_PCDATA, /* 529 */
+ XML_DTD_NOT_STANDALONE, /* 530 */
+ XML_DTD_ROOT_NAME, /* 531 */
+ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
+ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
+ XML_DTD_UNKNOWN_ELEM, /* 534 */
+ XML_DTD_UNKNOWN_ENTITY, /* 535 */
+ XML_DTD_UNKNOWN_ID, /* 536 */
+ XML_DTD_UNKNOWN_NOTATION, /* 537 */
+ XML_DTD_STANDALONE_DEFAULTED, /* 538 */
+ XML_DTD_XMLID_VALUE, /* 539 */
+ XML_DTD_XMLID_TYPE, /* 540 */
+ XML_DTD_DUP_TOKEN, /* 541 */
+ XML_HTML_STRUCURE_ERROR = 800,
+ XML_HTML_UNKNOWN_TAG, /* 801 */
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
+ XML_RNGP_ATTR_CONFLICT, /* 1001 */
+ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
+ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
+ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
+ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
+ XML_RNGP_CHOICE_CONTENT, /* 1006 */
+ XML_RNGP_CHOICE_EMPTY, /* 1007 */
+ XML_RNGP_CREATE_FAILURE, /* 1008 */
+ XML_RNGP_DATA_CONTENT, /* 1009 */
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
+ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
+ XML_RNGP_DEFINE_EMPTY, /* 1012 */
+ XML_RNGP_DEFINE_MISSING, /* 1013 */
+ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
+ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
+ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
+ XML_RNGP_ELEMENT_EMPTY, /* 1017 */
+ XML_RNGP_ELEMENT_CONTENT, /* 1018 */
+ XML_RNGP_ELEMENT_NAME, /* 1019 */
+ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
+ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
+ XML_RNGP_EMPTY, /* 1022 */
+ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
+ XML_RNGP_EMPTY_CONTENT, /* 1024 */
+ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
+ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
+ XML_RNGP_EXCEPT_EMPTY, /* 1027 */
+ XML_RNGP_EXCEPT_MISSING, /* 1028 */
+ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
+ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
+ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
+ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
+ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
+ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
+ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
+ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
+ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
+ XML_RNGP_GRAMMAR_MISSING, /* 1038 */
+ XML_RNGP_GRAMMAR_NO_START, /* 1039 */
+ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
+ XML_RNGP_HREF_ERROR, /* 1041 */
+ XML_RNGP_INCLUDE_EMPTY, /* 1042 */
+ XML_RNGP_INCLUDE_FAILURE, /* 1043 */
+ XML_RNGP_INCLUDE_RECURSE, /* 1044 */
+ XML_RNGP_INTERLEAVE_ADD, /* 1045 */
+ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
+ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
+ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
+ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
+ XML_RNGP_INVALID_URI, /* 1050 */
+ XML_RNGP_INVALID_VALUE, /* 1051 */
+ XML_RNGP_MISSING_HREF, /* 1052 */
+ XML_RNGP_NAME_MISSING, /* 1053 */
+ XML_RNGP_NEED_COMBINE, /* 1054 */
+ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
+ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
+ XML_RNGP_NSNAME_NO_NS, /* 1057 */
+ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
+ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
+ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
+ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
+ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
+ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
+ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
+ XML_RNGP_PARSE_ERROR, /* 1065 */
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
+ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
+ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
+ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
+ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
+ XML_RNGP_PAT_LIST_ATTR, /* 1078 */
+ XML_RNGP_PAT_LIST_ELEM, /* 1079 */
+ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
+ XML_RNGP_PAT_LIST_LIST, /* 1081 */
+ XML_RNGP_PAT_LIST_REF, /* 1082 */
+ XML_RNGP_PAT_LIST_TEXT, /* 1083 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
+ XML_RNGP_PAT_START_ATTR, /* 1088 */
+ XML_RNGP_PAT_START_DATA, /* 1089 */
+ XML_RNGP_PAT_START_EMPTY, /* 1090 */
+ XML_RNGP_PAT_START_GROUP, /* 1091 */
+ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
+ XML_RNGP_PAT_START_LIST, /* 1093 */
+ XML_RNGP_PAT_START_ONEMORE, /* 1094 */
+ XML_RNGP_PAT_START_TEXT, /* 1095 */
+ XML_RNGP_PAT_START_VALUE, /* 1096 */
+ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
+ XML_RNGP_REF_CREATE_FAILED, /* 1098 */
+ XML_RNGP_REF_CYCLE, /* 1099 */
+ XML_RNGP_REF_NAME_INVALID, /* 1100 */
+ XML_RNGP_REF_NO_DEF, /* 1101 */
+ XML_RNGP_REF_NO_NAME, /* 1102 */
+ XML_RNGP_REF_NOT_EMPTY, /* 1103 */
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
+ XML_RNGP_START_CONTENT, /* 1105 */
+ XML_RNGP_START_EMPTY, /* 1106 */
+ XML_RNGP_START_MISSING, /* 1107 */
+ XML_RNGP_TEXT_EXPECTED, /* 1108 */
+ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
+ XML_RNGP_TYPE_MISSING, /* 1110 */
+ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
+ XML_RNGP_TYPE_VALUE, /* 1112 */
+ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
+ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
+ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
+ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
+ XML_RNGP_URI_FRAGMENT, /* 1117 */
+ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
+ XML_RNGP_VALUE_EMPTY, /* 1119 */
+ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
+ XML_RNGP_XMLNS_NAME, /* 1121 */
+ XML_RNGP_XML_NS, /* 1122 */
+ XML_XPATH_EXPRESSION_OK = 1200,
+ XML_XPATH_NUMBER_ERROR, /* 1201 */
+ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
+ XML_XPATH_START_LITERAL_ERROR, /* 1203 */
+ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
+ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
+ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
+ XML_XPATH_EXPR_ERROR, /* 1207 */
+ XML_XPATH_UNCLOSED_ERROR, /* 1208 */
+ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
+ XML_XPATH_INVALID_OPERAND, /* 1210 */
+ XML_XPATH_INVALID_TYPE, /* 1211 */
+ XML_XPATH_INVALID_ARITY, /* 1212 */
+ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
+ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
+ XML_XPATH_MEMORY_ERROR, /* 1215 */
+ XML_XPTR_SYNTAX_ERROR, /* 1216 */
+ XML_XPTR_RESOURCE_ERROR, /* 1217 */
+ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
+ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
+ XML_XPATH_ENCODING_ERROR, /* 1220 */
+ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
+ XML_TREE_INVALID_HEX = 1300,
+ XML_TREE_INVALID_DEC, /* 1301 */
+ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
+ XML_TREE_NOT_UTF8, /* 1303 */
+ XML_SAVE_NOT_UTF8 = 1400,
+ XML_SAVE_CHAR_INVALID, /* 1401 */
+ XML_SAVE_NO_DOCTYPE, /* 1402 */
+ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
+ XML_REGEXP_COMPILE_ERROR = 1450,
+ XML_IO_UNKNOWN = 1500,
+ XML_IO_EACCES, /* 1501 */
+ XML_IO_EAGAIN, /* 1502 */
+ XML_IO_EBADF, /* 1503 */
+ XML_IO_EBADMSG, /* 1504 */
+ XML_IO_EBUSY, /* 1505 */
+ XML_IO_ECANCELED, /* 1506 */
+ XML_IO_ECHILD, /* 1507 */
+ XML_IO_EDEADLK, /* 1508 */
+ XML_IO_EDOM, /* 1509 */
+ XML_IO_EEXIST, /* 1510 */
+ XML_IO_EFAULT, /* 1511 */
+ XML_IO_EFBIG, /* 1512 */
+ XML_IO_EINPROGRESS, /* 1513 */
+ XML_IO_EINTR, /* 1514 */
+ XML_IO_EINVAL, /* 1515 */
+ XML_IO_EIO, /* 1516 */
+ XML_IO_EISDIR, /* 1517 */
+ XML_IO_EMFILE, /* 1518 */
+ XML_IO_EMLINK, /* 1519 */
+ XML_IO_EMSGSIZE, /* 1520 */
+ XML_IO_ENAMETOOLONG, /* 1521 */
+ XML_IO_ENFILE, /* 1522 */
+ XML_IO_ENODEV, /* 1523 */
+ XML_IO_ENOENT, /* 1524 */
+ XML_IO_ENOEXEC, /* 1525 */
+ XML_IO_ENOLCK, /* 1526 */
+ XML_IO_ENOMEM, /* 1527 */
+ XML_IO_ENOSPC, /* 1528 */
+ XML_IO_ENOSYS, /* 1529 */
+ XML_IO_ENOTDIR, /* 1530 */
+ XML_IO_ENOTEMPTY, /* 1531 */
+ XML_IO_ENOTSUP, /* 1532 */
+ XML_IO_ENOTTY, /* 1533 */
+ XML_IO_ENXIO, /* 1534 */
+ XML_IO_EPERM, /* 1535 */
+ XML_IO_EPIPE, /* 1536 */
+ XML_IO_ERANGE, /* 1537 */
+ XML_IO_EROFS, /* 1538 */
+ XML_IO_ESPIPE, /* 1539 */
+ XML_IO_ESRCH, /* 1540 */
+ XML_IO_ETIMEDOUT, /* 1541 */
+ XML_IO_EXDEV, /* 1542 */
+ XML_IO_NETWORK_ATTEMPT, /* 1543 */
+ XML_IO_ENCODER, /* 1544 */
+ XML_IO_FLUSH, /* 1545 */
+ XML_IO_WRITE, /* 1546 */
+ XML_IO_NO_INPUT, /* 1547 */
+ XML_IO_BUFFER_FULL, /* 1548 */
+ XML_IO_LOAD_ERROR, /* 1549 */
+ XML_IO_ENOTSOCK, /* 1550 */
+ XML_IO_EISCONN, /* 1551 */
+ XML_IO_ECONNREFUSED, /* 1552 */
+ XML_IO_ENETUNREACH, /* 1553 */
+ XML_IO_EADDRINUSE, /* 1554 */
+ XML_IO_EALREADY, /* 1555 */
+ XML_IO_EAFNOSUPPORT, /* 1556 */
+ XML_XINCLUDE_RECURSION=1600,
+ XML_XINCLUDE_PARSE_VALUE, /* 1601 */
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
+ XML_XINCLUDE_NO_HREF, /* 1603 */
+ XML_XINCLUDE_NO_FALLBACK, /* 1604 */
+ XML_XINCLUDE_HREF_URI, /* 1605 */
+ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
+ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
+ XML_XINCLUDE_INVALID_CHAR, /* 1608 */
+ XML_XINCLUDE_BUILD_FAILED, /* 1609 */
+ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
+ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
+ XML_XINCLUDE_XPTR_FAILED, /* 1612 */
+ XML_XINCLUDE_XPTR_RESULT, /* 1613 */
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
+ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
+ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
+ XML_CATALOG_MISSING_ATTR = 1650,
+ XML_CATALOG_ENTRY_BROKEN, /* 1651 */
+ XML_CATALOG_PREFER_VALUE, /* 1652 */
+ XML_CATALOG_NOT_CATALOG, /* 1653 */
+ XML_CATALOG_RECURSION, /* 1654 */
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
+ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
+ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
+ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
+ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
+ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
+ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
+ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
+ XML_SCHEMAP_INVALID_ENUM, /* 1715 */
+ XML_SCHEMAP_INVALID_FACET, /* 1716 */
+ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
+ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
+ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
+ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
+ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
+ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
+ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
+ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
+ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
+ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
+ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
+ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
+ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
+ XML_SCHEMAP_FAILED_LOAD, /* 1757 */
+ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
+ XML_SCHEMAP_NOROOT, /* 1759 */
+ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
+ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
+ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
+ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
+ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
+ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
+ XML_SCHEMAP_FAILED_PARSE, /* 1766 */
+ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
+ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
+ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
+ XML_SCHEMAP_RECURSIVE, /* 1775 */
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
+ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
+ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
+ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
+ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
+ XML_SCHEMAV_NOROOT = 1801,
+ XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
+ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
+ XML_SCHEMAV_MISSING, /* 1804 */
+ XML_SCHEMAV_WRONGELEM, /* 1805 */
+ XML_SCHEMAV_NOTYPE, /* 1806 */
+ XML_SCHEMAV_NOROLLBACK, /* 1807 */
+ XML_SCHEMAV_ISABSTRACT, /* 1808 */
+ XML_SCHEMAV_NOTEMPTY, /* 1809 */
+ XML_SCHEMAV_ELEMCONT, /* 1810 */
+ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
+ XML_SCHEMAV_NOTNILLABLE, /* 1812 */
+ XML_SCHEMAV_EXTRACONTENT, /* 1813 */
+ XML_SCHEMAV_INVALIDATTR, /* 1814 */
+ XML_SCHEMAV_INVALIDELEM, /* 1815 */
+ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
+ XML_SCHEMAV_CONSTRUCT, /* 1817 */
+ XML_SCHEMAV_INTERNAL, /* 1818 */
+ XML_SCHEMAV_NOTSIMPLE, /* 1819 */
+ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
+ XML_SCHEMAV_ATTRINVALID, /* 1821 */
+ XML_SCHEMAV_VALUE, /* 1822 */
+ XML_SCHEMAV_FACET, /* 1823 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
+ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
+ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
+ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
+ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
+ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
+ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
+ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
+ XML_SCHEMAV_CVC_ELT_1, /* 1845 */
+ XML_SCHEMAV_CVC_ELT_2, /* 1846 */
+ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
+ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
+ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
+ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
+ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
+ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
+ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
+ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
+ XML_SCHEMAV_CVC_ELT_6, /* 1859 */
+ XML_SCHEMAV_CVC_ELT_7, /* 1860 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
+ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
+ XML_SCHEMAV_CVC_AU, /* 1874 */
+ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
+ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
+ XML_SCHEMAV_CVC_IDC, /* 1877 */
+ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
+ XML_SCHEMAV_MISC, /* 1879 */
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
+ XML_XPTR_CHILDSEQ_START, /* 1901 */
+ XML_XPTR_EVAL_FAILED, /* 1902 */
+ XML_XPTR_EXTRA_OBJECTS, /* 1903 */
+ XML_C14N_CREATE_CTXT = 1950,
+ XML_C14N_REQUIRES_UTF8, /* 1951 */
+ XML_C14N_CREATE_STACK, /* 1952 */
+ XML_C14N_INVALID_NODE, /* 1953 */
+ XML_C14N_UNKNOW_NODE, /* 1954 */
+ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
+ XML_FTP_PASV_ANSWER = 2000,
+ XML_FTP_EPSV_ANSWER, /* 2001 */
+ XML_FTP_ACCNT, /* 2002 */
+ XML_FTP_URL_SYNTAX, /* 2003 */
+ XML_HTTP_URL_SYNTAX = 2020,
+ XML_HTTP_USE_IP, /* 2021 */
+ XML_HTTP_UNKNOWN_HOST, /* 2022 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
+ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
+ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
+ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
+ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
+ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
+ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
+ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
+ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
+ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
+ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
+ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
+ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
+ XML_SCHEMAP_NO_XMLNS, /* 3056 */
+ XML_SCHEMAP_NO_XSI, /* 3057 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
+ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
+ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
+ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
+ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
+ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
+ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
+ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
+ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
+ XML_SCHEMAP_SRC_CT_1, /* 3076 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
+ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
+ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
+ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
+ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
+ XML_SCHEMAP_SRC_IMPORT, /* 3082 */
+ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
+ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
+ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
+ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
+ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
+ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
+ XML_SCHEMATRONV_REPORT,
+ XML_MODULE_OPEN = 4900, /* 4900 */
+ XML_MODULE_CLOSE, /* 4901 */
+ XML_CHECK_FOUND_ELEMENT = 5000,
+ XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
+ XML_CHECK_FOUND_TEXT, /* 5002 */
+ XML_CHECK_FOUND_CDATA, /* 5003 */
+ XML_CHECK_FOUND_ENTITYREF, /* 5004 */
+ XML_CHECK_FOUND_ENTITY, /* 5005 */
+ XML_CHECK_FOUND_PI, /* 5006 */
+ XML_CHECK_FOUND_COMMENT, /* 5007 */
+ XML_CHECK_FOUND_DOCTYPE, /* 5008 */
+ XML_CHECK_FOUND_FRAGMENT, /* 5009 */
+ XML_CHECK_FOUND_NOTATION, /* 5010 */
+ XML_CHECK_UNKNOWN_NODE, /* 5011 */
+ XML_CHECK_ENTITY_TYPE, /* 5012 */
+ XML_CHECK_NO_PARENT, /* 5013 */
+ XML_CHECK_NO_DOC, /* 5014 */
+ XML_CHECK_NO_NAME, /* 5015 */
+ XML_CHECK_NO_ELEM, /* 5016 */
+ XML_CHECK_WRONG_DOC, /* 5017 */
+ XML_CHECK_NO_PREV, /* 5018 */
+ XML_CHECK_WRONG_PREV, /* 5019 */
+ XML_CHECK_NO_NEXT, /* 5020 */
+ XML_CHECK_WRONG_NEXT, /* 5021 */
+ XML_CHECK_NOT_DTD, /* 5022 */
+ XML_CHECK_NOT_ATTR, /* 5023 */
+ XML_CHECK_NOT_ATTR_DECL, /* 5024 */
+ XML_CHECK_NOT_ELEM_DECL, /* 5025 */
+ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
+ XML_CHECK_NOT_NS_DECL, /* 5027 */
+ XML_CHECK_NO_HREF, /* 5028 */
+ XML_CHECK_WRONG_PARENT,/* 5029 */
+ XML_CHECK_NS_SCOPE, /* 5030 */
+ XML_CHECK_NS_ANCESTOR, /* 5031 */
+ XML_CHECK_NOT_UTF8, /* 5032 */
+ XML_CHECK_NO_DICT, /* 5033 */
+ XML_CHECK_NOT_NCNAME, /* 5034 */
+ XML_CHECK_OUTSIDE_DICT, /* 5035 */
+ XML_CHECK_WRONG_NAME, /* 5036 */
+ XML_CHECK_NAME_NOT_NULL, /* 5037 */
+ XML_I18N_NO_NAME = 6000,
+ XML_I18N_NO_HANDLER, /* 6001 */
+ XML_I18N_EXCESS_HANDLER, /* 6002 */
+ XML_I18N_CONV_FAILED, /* 6003 */
+ XML_I18N_NO_OUTPUT, /* 6004 */
+ XML_BUF_OVERFLOW = 7000
+} xmlParserErrors;
+
+/**
+ * xmlGenericErrorFunc:
+ * @ctx: a parsing context
+ * @msg: the message
+ * @...: the extra arguments of the varags to format the message
+ *
+ * Signature of the function to use when there is an error and
+ * no parsing or validity context available .
+ */
+typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+ * @error: the error being raised.
+ *
+ * Signature of the function to use when there is an error and
+ * the module handles the new error reporting mechanism.
+ */
+typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+
+/*
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+ */
+XMLPUBFUN void XMLCALL
+ xmlSetGenericErrorFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XMLPUBFUN void XMLCALL
+ initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
+
+XMLPUBFUN void XMLCALL
+ xmlSetStructuredErrorFunc (void *ctx,
+ xmlStructuredErrorFunc handler);
+/*
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ */
+XMLPUBFUN void XMLCDECL
+ xmlParserError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileInfo (xmlParserInputPtr input);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileContext (xmlParserInputPtr input);
+
+/*
+ * Extended error information routines
+ */
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlGetLastError (void);
+XMLPUBFUN void XMLCALL
+ xmlResetLastError (void);
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlCtxtGetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlCtxtResetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlResetError (xmlErrorPtr err);
+XMLPUBFUN int XMLCALL
+ xmlCopyError (xmlErrorPtr from,
+ xmlErrorPtr to);
+
+#ifdef IN_LIBXML
+/*
+ * Internal callback reporting routine
+ */
+XMLPUBFUN void XMLCALL
+ __xmlRaiseError (xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel,
+ void *data,
+ void *ctx,
+ void *node,
+ int domain,
+ int code,
+ xmlErrorLevel level,
+ const char *file,
+ int line,
+ const char *str1,
+ const char *str2,
+ const char *str3,
+ int int1,
+ int col,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(16,17);
+XMLPUBFUN void XMLCALL
+ __xmlSimpleError (int domain,
+ int code,
+ xmlNodePtr node,
+ const char *msg,
+ const char *extra);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_ERROR_H__ */
diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h
new file mode 100644
index 0000000..2c79f81
--- /dev/null
+++ b/include/libxml/xmlexports.h
@@ -0,0 +1,162 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Igor Zlatovic <igor@zlatkovic.com>
+ */
+
+#ifndef __XML_EXPORTS_H__
+#define __XML_EXPORTS_H__
+
+/**
+ * XMLPUBFUN, XMLPUBVAR, XMLCALL
+ *
+ * Macros which declare an exportable function, an exportable variable and
+ * the calling convention used for functions.
+ *
+ * Please use an extra block for every platform/compiler combination when
+ * modifying this, rather than overlong #ifdef lines. This helps
+ * readability as well as the fact that different compilers on the same
+ * platform might need different definitions.
+ */
+
+/**
+ * XMLPUBFUN:
+ *
+ * Macros which declare an exportable function
+ */
+#define XMLPUBFUN
+/**
+ * XMLPUBVAR:
+ *
+ * Macros which declare an exportable variable
+ */
+#define XMLPUBVAR extern
+/**
+ * XMLCALL:
+ *
+ * Macros which declare the called convention for exported functions
+ */
+#define XMLCALL
+/**
+ * XMLCDECL:
+ *
+ * Macro which declares the calling convention for exported functions that
+ * use '...'.
+ */
+#define XMLCDECL
+
+/** DOC_DISABLE */
+
+/* Windows platform with MS compiler */
+#if defined(_WIN32) && defined(_MSC_VER)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #if defined(LIBXML_FASTCALL)
+ #define XMLCALL __fastcall
+ #else
+ #define XMLCALL __cdecl
+ #endif
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with Borland compiler */
+#if defined(_WIN32) && defined(__BORLANDC__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with GNU compiler (Mingw) */
+#if defined(_WIN32) && defined(__MINGW32__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ /*
+ * if defined(IN_LIBXML) this raises problems on mingw with msys
+ * _imp__xmlFree listed as missing. Try to workaround the problem
+ * by also making that declaration when compiling client code.
+ */
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Cygwin platform, GNU compiler */
+#if defined(_WIN32) && defined(__CYGWIN__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+#endif
+
+/* Compatibility */
+#if !defined(LIBXML_DLL_IMPORT)
+#define LIBXML_DLL_IMPORT XMLPUBVAR
+#endif
+
+#endif /* __XML_EXPORTS_H__ */
+
+
diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h
new file mode 100644
index 0000000..17e375a
--- /dev/null
+++ b/include/libxml/xmlmemory.h
@@ -0,0 +1,224 @@
+/*
+ * Summary: interface for the memory allocator
+ * Description: provides interfaces for the memory allocator,
+ * including debugging capabilities.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __DEBUG_MEMORY_ALLOC__
+#define __DEBUG_MEMORY_ALLOC__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+/**
+ * DEBUG_MEMORY:
+ *
+ * DEBUG_MEMORY replaces the allocator with a collect and debug
+ * shell to the libc allocator.
+ * DEBUG_MEMORY should only be activated when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+/* #define DEBUG_MEMORY_FREED */
+/* #define DEBUG_MEMORY_LOCATION */
+
+#ifdef DEBUG
+#ifndef DEBUG_MEMORY
+#define DEBUG_MEMORY
+#endif
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * DEBUG_MEMORY_LOCATION should be activated only when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+#ifdef DEBUG_MEMORY_LOCATION
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The XML memory wrapper support 4 basic overloadable functions.
+ */
+/**
+ * xmlFreeFunc:
+ * @mem: an already allocated block of memory
+ *
+ * Signature for a free() implementation.
+ */
+typedef void (XMLCALL *xmlFreeFunc)(void *mem);
+/**
+ * xmlMallocFunc:
+ * @size: the size requested in bytes
+ *
+ * Signature for a malloc() implementation.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error.
+ */
+typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
+
+/**
+ * xmlReallocFunc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * Signature for a realloc() implementation.
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
+ */
+typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
+
+/**
+ * xmlStrdupFunc:
+ * @str: a zero terminated string
+ *
+ * Signature for an strdup() implementation.
+ *
+ * Returns the copy of the string or NULL in case of error.
+ */
+typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
+
+/*
+ * The 4 interfaces used for all memory handling within libxml.
+LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
+LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
+LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
+ */
+
+/*
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlMallocFunc mallocAtomicFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlMallocFunc *mallocAtomicFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+
+/*
+ * Initialization of the memory layer.
+ */
+XMLPUBFUN int XMLCALL
+ xmlInitMemory (void);
+
+/*
+ * Cleanup of the memory layer.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupMemory (void);
+/*
+ * These are specific to the XML debug memory wrapper.
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemUsed (void);
+XMLPUBFUN int XMLCALL
+ xmlMemBlocks (void);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplay (FILE *fp);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
+XMLPUBFUN void XMLCALL
+ xmlMemShow (FILE *fp, int nr);
+XMLPUBFUN void XMLCALL
+ xmlMemoryDump (void);
+XMLPUBFUN void * XMLCALL
+ xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlMemRealloc (void *ptr,size_t size);
+XMLPUBFUN void XMLCALL
+ xmlMemFree (void *ptr);
+XMLPUBFUN char * XMLCALL
+ xmlMemoryStrdup (const char *str);
+XMLPUBFUN void * XMLCALL
+ xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
+XMLPUBFUN void * XMLCALL
+ xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN char * XMLCALL
+ xmlMemStrdupLoc (const char *str, const char *file, int line);
+
+
+#ifdef DEBUG_MEMORY_LOCATION
+/**
+ * xmlMalloc:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
+/**
+ * xmlMallocAtomic:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library for allocation
+ * of block not containing pointers to other areas.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
+/**
+ * xmlRealloc:
+ * @ptr: pointer to the existing allocated area
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the realloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
+/**
+ * xmlMemStrdup:
+ * @str: pointer to the existing string
+ *
+ * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
+
+#endif /* DEBUG_MEMORY_LOCATION */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#ifndef __XML_GLOBALS_H
+#ifndef __XML_THREADS_H__
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#endif
+#endif
+
+#endif /* __DEBUG_MEMORY_ALLOC__ */
+
diff --git a/include/libxml/xmlmodule.h b/include/libxml/xmlmodule.h
new file mode 100644
index 0000000..9667820
--- /dev/null
+++ b/include/libxml/xmlmodule.h
@@ -0,0 +1,57 @@
+/*
+ * Summary: dynamic module loading
+ * Description: basic API for dynamic module loading, used by
+ * libexslt added in 2.6.17
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Joel W. Reed
+ */
+
+#ifndef __XML_MODULE_H__
+#define __XML_MODULE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_MODULES_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlModulePtr:
+ *
+ * A handle to a dynamically loaded module
+ */
+typedef struct _xmlModule xmlModule;
+typedef xmlModule *xmlModulePtr;
+
+/**
+ * xmlModuleOption:
+ *
+ * enumeration of options that can be passed down to xmlModuleOpen()
+ */
+typedef enum {
+ XML_MODULE_LAZY = 1, /* lazy binding */
+ XML_MODULE_LOCAL= 2 /* local binding */
+} xmlModuleOption;
+
+XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
+ int options);
+
+XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
+ const char* name,
+ void **result);
+
+XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
+
+XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_MODULES_ENABLED */
+
+#endif /*__XML_MODULE_H__ */
diff --git a/include/libxml/xmlreader.h b/include/libxml/xmlreader.h
new file mode 100644
index 0000000..2c99e3a
--- /dev/null
+++ b/include/libxml/xmlreader.h
@@ -0,0 +1,428 @@
+/*
+ * Summary: the XMLReader implementation
+ * Description: API of the XML streaming API based on C# interfaces.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLREADER_H__
+#define __XML_XMLREADER_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+ */
+typedef enum {
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+ XML_PARSER_SEVERITY_WARNING = 3,
+ XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * xmlTextReaderMode:
+ *
+ * Internal state values for the reader.
+ */
+typedef enum {
+ XML_TEXTREADER_MODE_INITIAL = 0,
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
+ XML_TEXTREADER_MODE_ERROR = 2,
+ XML_TEXTREADER_MODE_EOF =3,
+ XML_TEXTREADER_MODE_CLOSED = 4,
+ XML_TEXTREADER_MODE_READING = 5
+} xmlTextReaderMode;
+
+/**
+ * xmlParserProperties:
+ *
+ * Some common options to use with xmlTextReaderSetParserProp, but it
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * xmlReaderForxxx APIs now.
+ */
+typedef enum {
+ XML_PARSER_LOADDTD = 1,
+ XML_PARSER_DEFAULTATTRS = 2,
+ XML_PARSER_VALIDATE = 3,
+ XML_PARSER_SUBST_ENTITIES = 4
+} xmlParserProperties;
+
+/**
+ * xmlReaderTypes:
+ *
+ * Predefined constants for the different types of nodes.
+ */
+typedef enum {
+ XML_READER_TYPE_NONE = 0,
+ XML_READER_TYPE_ELEMENT = 1,
+ XML_READER_TYPE_ATTRIBUTE = 2,
+ XML_READER_TYPE_TEXT = 3,
+ XML_READER_TYPE_CDATA = 4,
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
+ XML_READER_TYPE_ENTITY = 6,
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
+ XML_READER_TYPE_COMMENT = 8,
+ XML_READER_TYPE_DOCUMENT = 9,
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
+ XML_READER_TYPE_NOTATION = 12,
+ XML_READER_TYPE_WHITESPACE = 13,
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
+ XML_READER_TYPE_END_ELEMENT = 15,
+ XML_READER_TYPE_END_ENTITY = 16,
+ XML_READER_TYPE_XML_DECLARATION = 17
+} xmlReaderTypes;
+
+/**
+ * xmlTextReader:
+ *
+ * Structure for an xmlReader context.
+ */
+typedef struct _xmlTextReader xmlTextReader;
+
+/**
+ * xmlTextReaderPtr:
+ *
+ * Pointer to an xmlReader context.
+ */
+typedef xmlTextReader *xmlTextReaderPtr;
+
+/*
+ * Constructors & Destructor
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReader (xmlParserInputBufferPtr input,
+ const char *URI);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReaderFilename(const char *URI);
+
+XMLPUBFUN void XMLCALL
+ xmlFreeTextReader (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
+ xmlParserInputBufferPtr input, const char *URL,
+ const char *encoding, int options);
+
+/*
+ * Iterators
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRead (xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
+
+/*
+ * Attributes of the node
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
+
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
+ const xmlChar *str);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
+
+/*
+ * use the Const version of the routine for
+ * better performance and simpler code
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderValue (xmlTextReaderPtr reader);
+
+/*
+ * Methods of the XmlTextReader
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderClose (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
+ const xmlChar *prefix);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
+
+/*
+ * Extensions
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
+ int prop,
+ int value);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
+ int prop);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
+#ifdef LIBXML_PATTERN_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
+ const xmlChar *pattern,
+ const xmlChar **namespaces);
+#endif /* LIBXML_PATTERN_ENABLED */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNext (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
+#ifdef LIBXML_SCHEMAS_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
+ const char *rng);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
+ xmlRelaxNGValidCtxtPtr ctxt,
+ int options);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
+ const char *xsd);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
+ xmlSchemaPtr schema);
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
+
+
+/*
+ * Index lookup
+ */
+XMLPUBFUN long XMLCALL
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
+
+/*
+ * New more complete APIs for simpler creation and reuse of readers
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderWalker (xmlDocPtr doc);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForDoc (const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFile (const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN int XMLCALL
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
+ const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFile (xmlTextReaderPtr reader,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFd (xmlTextReaderPtr reader,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewIO (xmlTextReaderPtr reader,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+/*
+ * Error handling extensions
+ */
+typedef void * xmlTextReaderLocatorPtr;
+
+/**
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occured
+ *
+ * Signature of an error callback from a reader parser
+ */
+typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
+ const char *msg,
+ xmlParserSeverities severity,
+ xmlTextReaderLocatorPtr locator);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+ xmlStructuredErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc *f,
+ void **arg);
+
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XMLREADER_H__ */
+
diff --git a/include/libxml/xmlregexp.h b/include/libxml/xmlregexp.h
new file mode 100644
index 0000000..7009645
--- /dev/null
+++ b/include/libxml/xmlregexp.h
@@ -0,0 +1,222 @@
+/*
+ * Summary: regular expressions handling
+ * Description: basic API for libxml regular expressions handling used
+ * for XML Schemas and validation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_REGEXP_H__
+#define __XML_REGEXP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlRegexpPtr:
+ *
+ * A libxml regular expression, they can actually be far more complex
+ * thank the POSIX regex expressions.
+ */
+typedef struct _xmlRegexp xmlRegexp;
+typedef xmlRegexp *xmlRegexpPtr;
+
+/**
+ * xmlRegExecCtxtPtr:
+ *
+ * A libxml progressive regular expression evaluation context
+ */
+typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
+typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The POSIX like API
+ */
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlRegexpCompile (const xmlChar *regexp);
+XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpExec (xmlRegexpPtr comp,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlRegexpPrint (FILE *output,
+ xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
+
+/**
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
+ * Callback function when doing a transition in the automata
+ */
+typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
+ const xmlChar *token,
+ void *transdata,
+ void *inputdata);
+
+/*
+ * The progressive API
+ */
+XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
+ xmlRegExecCallbacks callback,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ const xmlChar *value2,
+ void *data);
+
+XMLPUBFUN int XMLCALL
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+XMLPUBFUN int XMLCALL
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
+ const xmlChar **string,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+#ifdef LIBXML_EXPR_ENABLED
+/*
+ * Formal regular expression handling
+ * Its goal is to do some formal work on content models
+ */
+
+/* expressions are used within a context */
+typedef struct _xmlExpCtxt xmlExpCtxt;
+typedef xmlExpCtxt *xmlExpCtxtPtr;
+
+XMLPUBFUN void XMLCALL
+ xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
+XMLPUBFUN xmlExpCtxtPtr XMLCALL
+ xmlExpNewCtxt (int maxNodes,
+ xmlDictPtr dict);
+
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
+
+/* Expressions are trees but the tree is opaque */
+typedef struct _xmlExpNode xmlExpNode;
+typedef xmlExpNode *xmlExpNodePtr;
+
+typedef enum {
+ XML_EXP_EMPTY = 0,
+ XML_EXP_FORBID = 1,
+ XML_EXP_ATOM = 2,
+ XML_EXP_SEQ = 3,
+ XML_EXP_OR = 4,
+ XML_EXP_COUNT = 5
+} xmlExpNodeType;
+
+/*
+ * 2 core expressions shared by all for the empty language set
+ * and for the set with just the empty token
+ */
+XMLPUBVAR xmlExpNodePtr forbiddenExp;
+XMLPUBVAR xmlExpNodePtr emptyExp;
+
+/*
+ * Expressions are reference counted internally
+ */
+XMLPUBFUN void XMLCALL
+ xmlExpFree (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr);
+XMLPUBFUN void XMLCALL
+ xmlExpRef (xmlExpNodePtr expr);
+
+/*
+ * constructors can be either manual or from a string
+ */
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpParse (xmlExpCtxtPtr ctxt,
+ const char *expr);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewAtom (xmlExpCtxtPtr ctxt,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewOr (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewSeq (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewRange (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr subset,
+ int min,
+ int max);
+/*
+ * The really interesting APIs
+ */
+XMLPUBFUN int XMLCALL
+ xmlExpIsNillable(xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpMaxToken (xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**langList,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlExpGetStart (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**tokList,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpStringDerive(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpExpDerive (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN int XMLCALL
+ xmlExpSubsume (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN void XMLCALL
+ xmlExpDump (xmlBufferPtr buf,
+ xmlExpNodePtr expr);
+#endif /* LIBXML_EXPR_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /*__XML_REGEXP_H__ */
diff --git a/include/libxml/xmlsave.h b/include/libxml/xmlsave.h
new file mode 100644
index 0000000..fb329b2
--- /dev/null
+++ b/include/libxml/xmlsave.h
@@ -0,0 +1,88 @@
+/*
+ * Summary: the XML document serializer
+ * Description: API to save document or subtree of document
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLSAVE_H__
+#define __XML_XMLSAVE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlSaveOption:
+ *
+ * This is the set of XML save options that can be passed down
+ * to the xmlSaveToFd() and similar calls.
+ */
+typedef enum {
+ XML_SAVE_FORMAT = 1<<0, /* format save output */
+ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
+ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
+ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
+ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
+ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
+ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
+ XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
+} xmlSaveOption;
+
+
+typedef struct _xmlSaveCtxt xmlSaveCtxt;
+typedef xmlSaveCtxt *xmlSaveCtxtPtr;
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFd (int fd,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFilename (const char *filename,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToBuffer (xmlBufferPtr buffer,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN long XMLCALL
+ xmlSaveDoc (xmlSaveCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN long XMLCALL
+ xmlSaveTree (xmlSaveCtxtPtr ctxt,
+ xmlNodePtr node);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFlush (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveClose (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* __XML_XMLSAVE_H__ */
+
+
diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h
new file mode 100644
index 0000000..97930c7
--- /dev/null
+++ b/include/libxml/xmlschemas.h
@@ -0,0 +1,246 @@
+/*
+ * Summary: incomplete XML Schemas structure implementation
+ * Description: interface to the XML Schemas handling and schema validity
+ * checking, it is incomplete right now.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_H__
+#define __XML_SCHEMA_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This error codes are obsolete; not used any more.
+ */
+typedef enum {
+ XML_SCHEMAS_ERR_OK = 0,
+ XML_SCHEMAS_ERR_NOROOT = 1,
+ XML_SCHEMAS_ERR_UNDECLAREDELEM,
+ XML_SCHEMAS_ERR_NOTTOPLEVEL,
+ XML_SCHEMAS_ERR_MISSING,
+ XML_SCHEMAS_ERR_WRONGELEM,
+ XML_SCHEMAS_ERR_NOTYPE,
+ XML_SCHEMAS_ERR_NOROLLBACK,
+ XML_SCHEMAS_ERR_ISABSTRACT,
+ XML_SCHEMAS_ERR_NOTEMPTY,
+ XML_SCHEMAS_ERR_ELEMCONT,
+ XML_SCHEMAS_ERR_HAVEDEFAULT,
+ XML_SCHEMAS_ERR_NOTNILLABLE,
+ XML_SCHEMAS_ERR_EXTRACONTENT,
+ XML_SCHEMAS_ERR_INVALIDATTR,
+ XML_SCHEMAS_ERR_INVALIDELEM,
+ XML_SCHEMAS_ERR_NOTDETERMINIST,
+ XML_SCHEMAS_ERR_CONSTRUCT,
+ XML_SCHEMAS_ERR_INTERNAL,
+ XML_SCHEMAS_ERR_NOTSIMPLE,
+ XML_SCHEMAS_ERR_ATTRUNKNOWN,
+ XML_SCHEMAS_ERR_ATTRINVALID,
+ XML_SCHEMAS_ERR_VALUE,
+ XML_SCHEMAS_ERR_FACET,
+ XML_SCHEMAS_ERR_,
+ XML_SCHEMAS_ERR_XXX
+} xmlSchemaValidError;
+
+/*
+* ATTENTION: Change xmlSchemaSetValidOptions's check
+* for invalid values, if adding to the validation
+* options below.
+*/
+/**
+ * xmlSchemaValidOption:
+ *
+ * This is the set of XML Schema validation options.
+ */
+typedef enum {
+ XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
+ /* Default/fixed: create an attribute node
+ * or an element's text node on the instance.
+ */
+} xmlSchemaValidOption;
+
+/*
+ XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
+ * assemble schemata using
+ * xsi:schemaLocation and
+ * xsi:noNamespaceSchemaLocation
+*/
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchema xmlSchema;
+typedef xmlSchema *xmlSchemaPtr;
+
+/**
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
+typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
+
+typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
+typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
+
+/**
+ * xmlSchemaValidityLocatorFunc:
+ * @ctx: user provided context
+ * @file: returned file information
+ * @line: returned line information
+ *
+ * A schemas validation locator, a callback called by the validator.
+ * This is used when file or node informations are not available
+ * to find out what file and line number are affected
+ *
+ * Returns: 0 in case of success and -1 in case of error
+ */
+
+typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
+ const char **file, unsigned long *line);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaPtr XMLCALL
+ xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFree (xmlSchemaPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSchemaDump (FILE *output,
+ xmlSchemaPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc *err,
+ xmlSchemaValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN void XMLCALL
+ xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
+ xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc,
+ xmlSAXHandlerPtr sax,
+ void *user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
+ const char * filename,
+ int options);
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
+
+/*
+ * Interface to insert Schemas SAX validation in a SAX stream
+ */
+typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
+typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
+
+XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
+ xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
+ xmlSAXHandlerPtr *sax,
+ void **user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
+
+
+XMLPUBFUN void XMLCALL
+ xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaValidityLocatorFunc f,
+ void *ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_H__ */
diff --git a/include/libxml/xmlschemastypes.h b/include/libxml/xmlschemastypes.h
new file mode 100644
index 0000000..35d48d4
--- /dev/null
+++ b/include/libxml/xmlschemastypes.h
@@ -0,0 +1,151 @@
+/*
+ * Summary: implementation of XML Schema Datatypes
+ * Description: module providing the XML Schema Datatypes implementation
+ * both definition and validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_TYPES_H__
+#define __XML_SCHEMA_TYPES_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/schemasInternals.h>
+#include <libxml/xmlschemas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
+ XML_SCHEMA_WHITESPACE_PRESERVE = 1,
+ XML_SCHEMA_WHITESPACE_REPLACE = 2,
+ XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+} xmlSchemaWhitespaceValueType;
+
+XMLPUBFUN void XMLCALL
+ xmlSchemaInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlSchemaCleanupTypes (void);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetPredefinedType (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacet (xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaFacetPtr XMLCALL
+ xmlSchemaNewFacet (void);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
+ xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValues (xmlSchemaValPtr x,
+ xmlSchemaValPtr y);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ unsigned long actualLen,
+ unsigned long *expectedLen);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInType (xmlSchemaValType type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
+ int facetType);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaCollapseString (const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaWhiteSpaceReplace (const xmlChar *value);
+XMLPUBFUN unsigned long XMLCALL
+ xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValue (xmlSchemaValPtr val,
+ const xmlChar **retValue);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
+ const xmlChar **retValue,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueAppend (xmlSchemaValPtr prev,
+ xmlSchemaValPtr cur);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaValueGetNext (xmlSchemaValPtr cur);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSchemaValueGetAsString (xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewStringValue (xmlSchemaValType type,
+ const xmlChar *value);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewNOTATIONValue (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewQNameValue (const xmlChar *namespaceName,
+ const xmlChar *localName);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValPtr y,
+ xmlSchemaWhitespaceValueType yws);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaCopyValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValType XMLCALL
+ xmlSchemaGetValType (xmlSchemaValPtr val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_TYPES_H__ */
diff --git a/include/libxml/xmlstring.h b/include/libxml/xmlstring.h
new file mode 100644
index 0000000..2036236
--- /dev/null
+++ b/include/libxml/xmlstring.h
@@ -0,0 +1,140 @@
+/*
+ * Summary: set of routines to process strings
+ * Description: type and interfaces needed for the internal string handling
+ * of the library, especially UTF8 processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_STRING_H__
+#define __XML_STRING_H__
+
+#include <stdarg.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlChar:
+ *
+ * This is a basic byte in an UTF-8 encoded string.
+ * It's unsigned allowing to pinpoint case where char * are assigned
+ * to xmlChar * (possibly making serialization back impossible).
+ */
+typedef unsigned char xmlChar;
+
+/**
+ * BAD_CAST:
+ *
+ * Macro to cast a string to an xmlChar * when one know its safe.
+ */
+#define BAD_CAST (xmlChar *)
+
+/*
+ * xmlChar handling
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrdup (const xmlChar *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrndup (const xmlChar *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrndup (const char *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrdup (const char *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrsub (const xmlChar *str,
+ int start,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrchr (const xmlChar *str,
+ xmlChar val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrstr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrcasestr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN int XMLCALL
+ xmlStrcmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrcasecmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncasecmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrEqual (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrQEqual (const xmlChar *pref,
+ const xmlChar *name,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlStrlen (const xmlChar *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrcat (xmlChar *cur,
+ const xmlChar *add);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncat (xmlChar *cur,
+ const xmlChar *add,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncatNew (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ ...);
+XMLPUBFUN int XMLCALL
+ xmlStrVPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ va_list ap);
+
+XMLPUBFUN int XMLCALL
+ xmlGetUTF8Char (const unsigned char *utf,
+ int *len);
+XMLPUBFUN int XMLCALL
+ xmlCheckUTF8 (const unsigned char *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strsize (const xmlChar *utf,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strndup (const xmlChar *utf,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlUTF8Strpos (const xmlChar *utf,
+ int pos);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strloc (const xmlChar *utf,
+ const xmlChar *utfchar);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strsub (const xmlChar *utf,
+ int start,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strlen (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Size (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Charcmp (const xmlChar *utf1,
+ const xmlChar *utf2);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_STRING_H__ */
diff --git a/include/libxml/xmlunicode.h b/include/libxml/xmlunicode.h
new file mode 100644
index 0000000..01ac8b6
--- /dev/null
+++ b/include/libxml/xmlunicode.h
@@ -0,0 +1,202 @@
+/*
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: Mon Mar 27 11:09:52 2006
+ * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_UNICODE_H__
+#define __XML_UNICODE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_UNICODE_ENABLED */
+
+#endif /* __XML_UNICODE_H__ */
diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h
new file mode 100644
index 0000000..ffd42ea
--- /dev/null
+++ b/include/libxml/xmlversion.h
@@ -0,0 +1,489 @@
+/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.9.2"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 20902
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "20902"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA "-GITv2.9.2-rc2-10-gbe2a7ed"
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(20902);
+
+#ifndef VMS
+#if 0
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_THREAD_ALLOC_ENABLED:
+ *
+ * Whether the allocation hooks are per-thread
+ */
+#if 0
+#define LIBXML_THREAD_ALLOC_ENABLED
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if 1
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if 1
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 1
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if 1
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if 1
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 1
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 0
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 1
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if 0
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if 0
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if 1
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".so"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 1
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+/**
+ * LIBXML_LZMA_ENABLED:
+ *
+ * Whether the Lzma support is compiled in
+ */
+#if 1
+#define LIBXML_LZMA_ENABLED
+#endif
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+
+#ifndef ATTRIBUTE_UNUSED
+# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
+# define ATTRIBUTE_UNUSED __attribute__((unused))
+# else
+# define ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
+#ifndef LIBXML_ATTR_ALLOC_SIZE
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+# else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+# endif
+#else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef LIBXML_ATTR_FORMAT
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+# endif
+#else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+#else /* ! __GNUC__ */
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#define ATTRIBUTE_UNUSED
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+#define LIBXML_ATTR_ALLOC_SIZE(x)
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+#define LIBXML_ATTR_FORMAT(fmt,args)
+#endif /* __GNUC__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in
new file mode 100644
index 0000000..00a836f
--- /dev/null
+++ b/include/libxml/xmlversion.h.in
@@ -0,0 +1,489 @@
+/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "@VERSION@"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION @LIBXML_VERSION_NUMBER@
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "@LIBXML_VERSION_NUMBER@"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA "@LIBXML_VERSION_EXTRA@"
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(@LIBXML_VERSION_NUMBER@);
+
+#ifndef VMS
+#if @WITH_TRIO@
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if @WITH_THREADS@
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_THREAD_ALLOC_ENABLED:
+ *
+ * Whether the allocation hooks are per-thread
+ */
+#if @WITH_THREAD_ALLOC@
+#define LIBXML_THREAD_ALLOC_ENABLED
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if @WITH_TREE@
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if @WITH_OUTPUT@
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if @WITH_PUSH@
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if @WITH_READER@
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if @WITH_PATTERN@
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if @WITH_WRITER@
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if @WITH_SAX1@
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if @WITH_FTP@
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if @WITH_HTTP@
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if @WITH_VALID@
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if @WITH_HTML@
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if @WITH_LEGACY@
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if @WITH_C14N@
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if @WITH_CATALOG@
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if @WITH_DOCB@
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if @WITH_XPATH@
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if @WITH_XPTR@
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if @WITH_XINCLUDE@
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if @WITH_ICONV@
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if @WITH_ICU@
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if @WITH_ISO8859X@
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if @WITH_DEBUG@
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if @WITH_MEM_DEBUG@
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if @WITH_RUN_DEBUG@
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if @WITH_REGEXPS@
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if @WITH_REGEXPS@
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if @WITH_REGEXPS@
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if @WITH_SCHEMAS@
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if @WITH_SCHEMAS@
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if @WITH_SCHEMATRON@
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if @WITH_MODULES@
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if @WITH_ZLIB@
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+/**
+ * LIBXML_LZMA_ENABLED:
+ *
+ * Whether the Lzma support is compiled in
+ */
+#if @WITH_LZMA@
+#define LIBXML_LZMA_ENABLED
+#endif
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+
+#ifndef ATTRIBUTE_UNUSED
+# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
+# define ATTRIBUTE_UNUSED __attribute__((unused))
+# else
+# define ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
+#ifndef LIBXML_ATTR_ALLOC_SIZE
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+# else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+# endif
+#else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef LIBXML_ATTR_FORMAT
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+# endif
+#else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+#else /* ! __GNUC__ */
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#define ATTRIBUTE_UNUSED
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+#define LIBXML_ATTR_ALLOC_SIZE(x)
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+#define LIBXML_ATTR_FORMAT(fmt,args)
+#endif /* __GNUC__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
diff --git a/include/libxml/xmlwriter.h b/include/libxml/xmlwriter.h
new file mode 100644
index 0000000..dd5add3
--- /dev/null
+++ b/include/libxml/xmlwriter.h
@@ -0,0 +1,488 @@
+/*
+ * Summary: text writing API for XML
+ * Description: text writing API for XML
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Alfred Mickautsch <alfred@mickautsch.de>
+ */
+
+#ifndef __XML_XMLWRITER_H__
+#define __XML_XMLWRITER_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_WRITER_ENABLED
+
+#include <stdarg.h>
+#include <libxml/xmlIO.h>
+#include <libxml/list.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct _xmlTextWriter xmlTextWriter;
+ typedef xmlTextWriter *xmlTextWriterPtr;
+
+/*
+ * Constructors & Destructor
+ */
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriter(xmlOutputBufferPtr out);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterFilename(const char *uri, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
+ int compression);
+ XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
+
+/*
+ * Functions
+ */
+
+
+/*
+ * Document
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDocument(xmlTextWriterPtr writer,
+ const char *version,
+ const char *encoding,
+ const char *standalone);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
+ writer);
+
+/*
+ * Comments
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
+ writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ content);
+
+/*
+ * Elements
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * Elements conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * Text
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
+ const xmlChar * content, int len);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+
+/*
+ * Attributes
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
+ writer);
+
+/*
+ * Attributes conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * PI's
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartPI(xmlTextWriterPtr writer,
+ const xmlChar * target);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
+
+/*
+ * PI conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWritePI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const xmlChar * content);
+
+/**
+ * xmlTextWriterWriteProcessingInstruction:
+ *
+ * This macro maps to xmlTextWriterWritePI
+ */
+#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
+
+/*
+ * CDATA
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
+
+/*
+ * CDATA conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
+ const xmlChar * content);
+
+/*
+ * DTD
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
+
+/*
+ * DTD conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * subset);
+
+/**
+ * xmlTextWriterWriteDocType:
+ *
+ * this macro maps to xmlTextWriterWriteDTD
+ */
+#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
+
+/*
+ * DTD element definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD element definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD attribute list definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD attribute list definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD entity definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
+ int pe, const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD entity definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(4,5);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(4,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
+ writer,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar *
+ ndataid);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
+ writer, int pe,
+ const xmlChar * name,
+ const xmlChar *
+ pubid,
+ const xmlChar *
+ sysid,
+ const xmlChar *
+ ndataid,
+ const xmlChar *
+ content);
+
+/*
+ * DTD notation definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+
+/*
+ * Indentation
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
+ const xmlChar * str);
+
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
+
+
+/*
+ * misc
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_WRITER_ENABLED */
+
+#endif /* __XML_XMLWRITER_H__ */
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
new file mode 100644
index 0000000..d96776c
--- /dev/null
+++ b/include/libxml/xpath.h
@@ -0,0 +1,557 @@
+/*
+ * Summary: XML Path Language implementation
+ * Description: API for the XML Path Language implementation
+ *
+ * XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ * http://www.w3.org/TR/xpath
+ *
+ * Implements
+ * W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/hash.h>
+#endif /* LIBXML_XPATH_ENABLED */
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+#ifdef LIBXML_XPATH_ENABLED
+
+typedef struct _xmlXPathContext xmlXPathContext;
+typedef xmlXPathContext *xmlXPathContextPtr;
+typedef struct _xmlXPathParserContext xmlXPathParserContext;
+typedef xmlXPathParserContext *xmlXPathParserContextPtr;
+
+/**
+ * The set of XPath error codes.
+ */
+
+typedef enum {
+ XPATH_EXPRESSION_OK = 0,
+ XPATH_NUMBER_ERROR,
+ XPATH_UNFINISHED_LITERAL_ERROR,
+ XPATH_START_LITERAL_ERROR,
+ XPATH_VARIABLE_REF_ERROR,
+ XPATH_UNDEF_VARIABLE_ERROR,
+ XPATH_INVALID_PREDICATE_ERROR,
+ XPATH_EXPR_ERROR,
+ XPATH_UNCLOSED_ERROR,
+ XPATH_UNKNOWN_FUNC_ERROR,
+ XPATH_INVALID_OPERAND,
+ XPATH_INVALID_TYPE,
+ XPATH_INVALID_ARITY,
+ XPATH_INVALID_CTXT_SIZE,
+ XPATH_INVALID_CTXT_POSITION,
+ XPATH_MEMORY_ERROR,
+ XPTR_SYNTAX_ERROR,
+ XPTR_RESOURCE_ERROR,
+ XPTR_SUB_RESOURCE_ERROR,
+ XPATH_UNDEF_PREFIX_ERROR,
+ XPATH_ENCODING_ERROR,
+ XPATH_INVALID_CHAR_ERROR,
+ XPATH_INVALID_CTXT,
+ XPATH_STACK_ERROR,
+ XPATH_FORBID_VARIABLE_ERROR
+} xmlXPathError;
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates).
+ */
+typedef struct _xmlNodeSet xmlNodeSet;
+typedef xmlNodeSet *xmlNodeSetPtr;
+struct _xmlNodeSet {
+ int nodeNr; /* number of nodes in the set */
+ int nodeMax; /* size of the array as allocated */
+ xmlNodePtr *nodeTab; /* array of nodes in no particular order */
+ /* @@ with_ns to check wether namespace nodes should be looked at @@ */
+};
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ * - node-set
+ * - boolean
+ * - number
+ * - string
+ *
+ * @@ XPointer will add more types !
+ */
+
+typedef enum {
+ XPATH_UNDEFINED = 0,
+ XPATH_NODESET = 1,
+ XPATH_BOOLEAN = 2,
+ XPATH_NUMBER = 3,
+ XPATH_STRING = 4,
+ XPATH_POINT = 5,
+ XPATH_RANGE = 6,
+ XPATH_LOCATIONSET = 7,
+ XPATH_USERS = 8,
+ XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
+} xmlXPathObjectType;
+
+typedef struct _xmlXPathObject xmlXPathObject;
+typedef xmlXPathObject *xmlXPathObjectPtr;
+struct _xmlXPathObject {
+ xmlXPathObjectType type;
+ xmlNodeSetPtr nodesetval;
+ int boolval;
+ double floatval;
+ xmlChar *stringval;
+ void *user;
+ int index;
+ void *user2;
+ int index2;
+};
+
+/**
+ * xmlXPathConvertFunc:
+ * @obj: an XPath object
+ * @type: the number of the target type
+ *
+ * A conversion function is associated to a type and used to cast
+ * the new type to primitive values.
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
+
+/*
+ * Extra type: a name and a conversion function.
+ */
+
+typedef struct _xmlXPathType xmlXPathType;
+typedef xmlXPathType *xmlXPathTypePtr;
+struct _xmlXPathType {
+ const xmlChar *name; /* the type name */
+ xmlXPathConvertFunc func; /* the conversion function */
+};
+
+/*
+ * Extra variable: a name and a value.
+ */
+
+typedef struct _xmlXPathVariable xmlXPathVariable;
+typedef xmlXPathVariable *xmlXPathVariablePtr;
+struct _xmlXPathVariable {
+ const xmlChar *name; /* the variable name */
+ xmlXPathObjectPtr value; /* the value */
+};
+
+/**
+ * xmlXPathEvalFunc:
+ * @ctxt: an XPath parser context
+ * @nargs: the number of arguments passed to the function
+ *
+ * An XPath evaluation function, the parameters are on the XPath context stack.
+ */
+
+typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
+ int nargs);
+
+/*
+ * Extra function: a name and a evaluation function.
+ */
+
+typedef struct _xmlXPathFunct xmlXPathFunct;
+typedef xmlXPathFunct *xmlXPathFuncPtr;
+struct _xmlXPathFunct {
+ const xmlChar *name; /* the function name */
+ xmlXPathEvalFunc func; /* the evaluation function */
+};
+
+/**
+ * xmlXPathAxisFunc:
+ * @ctxt: the XPath interpreter context
+ * @cur: the previous node being explored on that axis
+ *
+ * An axis traversal function. To traverse an axis, the engine calls
+ * the first time with cur == NULL and repeat until the function returns
+ * NULL indicating the end of the axis traversal.
+ *
+ * Returns the next node in that axis or NULL if at the end of the axis.
+ */
+
+typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr cur);
+
+/*
+ * Extra axis: a name and an axis function.
+ */
+
+typedef struct _xmlXPathAxis xmlXPathAxis;
+typedef xmlXPathAxis *xmlXPathAxisPtr;
+struct _xmlXPathAxis {
+ const xmlChar *name; /* the axis name */
+ xmlXPathAxisFunc func; /* the search function */
+};
+
+/**
+ * xmlXPathFunction:
+ * @ctxt: the XPath interprestation context
+ * @nargs: the number of arguments
+ *
+ * An XPath function.
+ * The arguments (if any) are popped out from the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/*
+ * Function and Variable Lookup.
+ */
+
+/**
+ * xmlXPathVariableLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the variable
+ * @ns_uri: the namespace name hosting this variable
+ *
+ * Prototype for callbacks used to plug variable lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath object value or NULL if not found.
+ */
+typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFuncLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the function
+ * @ns_uri: the namespace name hosting this function
+ *
+ * Prototype for callbacks used to plug function lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath function or NULL if not found.
+ */
+typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFlags:
+ * Flags for XPath engine compilation and runtime
+ */
+/**
+ * XML_XPATH_CHECKNS:
+ *
+ * check namespaces at compilation
+ */
+#define XML_XPATH_CHECKNS (1<<0)
+/**
+ * XML_XPATH_NOVAR:
+ *
+ * forbid variables in expression
+ */
+#define XML_XPATH_NOVAR (1<<1)
+
+/**
+ * xmlXPathContext:
+ *
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ * - a node (the context node)
+ * - a node list (the context node list)
+ * - a set of variable bindings
+ * - a function library
+ * - the set of namespace declarations in scope for the expression
+ * Following the switch to hash tables, this need to be trimmed up at
+ * the next binary incompatible release.
+ * The node may be modified when the context is passed to libxml2
+ * for an XPath evaluation so you may need to initialize it again
+ * before the next call.
+ */
+
+struct _xmlXPathContext {
+ xmlDocPtr doc; /* The current document */
+ xmlNodePtr node; /* The current node */
+
+ int nb_variables_unused; /* unused (hash table) */
+ int max_variables_unused; /* unused (hash table) */
+ xmlHashTablePtr varHash; /* Hash table of defined variables */
+
+ int nb_types; /* number of defined types */
+ int max_types; /* max number of types */
+ xmlXPathTypePtr types; /* Array of defined types */
+
+ int nb_funcs_unused; /* unused (hash table) */
+ int max_funcs_unused; /* unused (hash table) */
+ xmlHashTablePtr funcHash; /* Hash table of defined funcs */
+
+ int nb_axis; /* number of defined axis */
+ int max_axis; /* max number of axis */
+ xmlXPathAxisPtr axis; /* Array of defined axis */
+
+ /* the namespace nodes of the context node */
+ xmlNsPtr *namespaces; /* Array of namespaces */
+ int nsNr; /* number of namespace in scope */
+ void *user; /* function to free */
+
+ /* extra variables */
+ int contextSize; /* the context size */
+ int proximityPosition; /* the proximity position */
+
+ /* extra stuff for XPointer */
+ int xptr; /* is this an XPointer context? */
+ xmlNodePtr here; /* for here() */
+ xmlNodePtr origin; /* for origin() */
+
+ /* the set of namespace declarations in scope for the expression */
+ xmlHashTablePtr nsHash; /* The namespaces hash table */
+ xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
+ void *varLookupData; /* variable lookup data */
+
+ /* Possibility to link in an extra item */
+ void *extra; /* needed for XSLT */
+
+ /* The function name and URI when calling a function */
+ const xmlChar *function;
+ const xmlChar *functionURI;
+
+ /* function lookup function and data */
+ xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
+ void *funcLookupData; /* function lookup data */
+
+ /* temporary namespace lists kept for walking the namespace axis */
+ xmlNsPtr *tmpNsList; /* Array of namespaces */
+ int tmpNsNr; /* number of namespaces in scope */
+
+ /* error reporting mechanism */
+ void *userData; /* user specific data block */
+ xmlStructuredErrorFunc error; /* the callback in case of errors */
+ xmlError lastError; /* the last error */
+ xmlNodePtr debugNode; /* the source node XSLT */
+
+ /* dictionary */
+ xmlDictPtr dict; /* dictionary if any */
+
+ int flags; /* flags to control compilation */
+
+ /* Cache for reusal of XPath objects */
+ void *cache;
+};
+
+/*
+ * The structure of a compiled expression form is not public.
+ */
+
+typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
+typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
+
+/**
+ * xmlXPathParserContext:
+ *
+ * An XPath parser context. It contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+ */
+struct _xmlXPathParserContext {
+ const xmlChar *cur; /* the current char being parsed */
+ const xmlChar *base; /* the full expression */
+
+ int error; /* error code */
+
+ xmlXPathContextPtr context; /* the evaluation context */
+ xmlXPathObjectPtr value; /* the current value */
+ int valueNr; /* number of values stacked */
+ int valueMax; /* max number of values stacked */
+ xmlXPathObjectPtr *valueTab; /* stack of values */
+
+ xmlXPathCompExprPtr comp; /* the precompiled expression */
+ int xptr; /* it this an XPointer expression */
+ xmlNodePtr ancestor; /* used for walking preceding axis */
+
+ int valueFrame; /* used to limit Pop on the stack */
+};
+
+/************************************************************************
+ * *
+ * Public API *
+ * *
+ ************************************************************************/
+
+/**
+ * Objects and Nodesets handling
+ */
+
+XMLPUBVAR double xmlXPathNAN;
+XMLPUBVAR double xmlXPathPINF;
+XMLPUBVAR double xmlXPathNINF;
+
+/* These macros may later turn into functions */
+/**
+ * xmlXPathNodeSetGetLength:
+ * @ns: a node-set
+ *
+ * Implement a functionality similar to the DOM NodeList.length.
+ *
+ * Returns the number of nodes in the node-set.
+ */
+#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
+/**
+ * xmlXPathNodeSetItem:
+ * @ns: a node-set
+ * @index: index of a node in the set
+ *
+ * Implements a functionality similar to the DOM NodeList.item().
+ *
+ * Returns the xmlNodePtr at the given @index in @ns or NULL if
+ * @index is out of range (0 to length-1)
+ */
+#define xmlXPathNodeSetItem(ns, index) \
+ ((((ns) != NULL) && \
+ ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
+ (ns)->nodeTab[(index)] \
+ : NULL)
+/**
+ * xmlXPathNodeSetIsEmpty:
+ * @ns: a node-set
+ *
+ * Checks whether @ns is empty or not.
+ *
+ * Returns %TRUE if @ns is an empty node-set.
+ */
+#define xmlXPathNodeSetIsEmpty(ns) \
+ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
+
+
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeObject (xmlXPathObjectPtr obj);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetCreate (xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathObjectCopy (xmlXPathObjectPtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCmpNodes (xmlNodePtr node1,
+ xmlNodePtr node2);
+/**
+ * Conversion functions to basic types.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNumberToBoolean (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastStringToBoolean (const xmlChar * val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastToBoolean (xmlXPathObjectPtr val);
+
+XMLPUBFUN double XMLCALL
+ xmlXPathCastBooleanToNumber (int val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastStringToNumber (const xmlChar * val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeToNumber (xmlNodePtr node);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastToNumber (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastBooleanToString (int val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNumberToString (double val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeToString (xmlNodePtr node);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastToString (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertBoolean (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertNumber (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertString (xmlXPathObjectPtr val);
+
+/**
+ * Context handling.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPathNewContext (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeContext (xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
+ int active,
+ int value,
+ int options);
+/**
+ * Evaluation functions.
+ */
+XMLPUBFUN long XMLCALL
+ xmlXPathOrderDocElems (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXPathSetContextNode (xmlNodePtr node,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNodeEval (xmlNodePtr node,
+ const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEvalExpression (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
+ xmlXPathObjectPtr res);
+/**
+ * Separate compilation/evaluation entry points.
+ */
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCompile (const xmlChar *str);
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
+ const xmlChar *str);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN int XMLCALL
+ xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
+#endif /* LIBXML_XPATH_ENABLED */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlXPathInit (void);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsNaN (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsInf (double val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
+#endif /* ! __XML_XPATH_H__ */
diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h
new file mode 100644
index 0000000..70c9db9
--- /dev/null
+++ b/include/libxml/xpathInternals.h
@@ -0,0 +1,632 @@
+/*
+ * Summary: internal interfaces for XML Path Language implementation
+ * Description: internal interfaces for XML Path Language implementation
+ * used to build new modules on top of XPath like XPointer and
+ * XSLT
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_INTERNALS_H__
+#define __XML_XPATH_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xpath.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************
+ * *
+ * Helpers *
+ * *
+ ************************************************************************/
+
+/*
+ * Many of these macros may later turn into functions. They
+ * shouldn't be used in #ifdef's preprocessor instructions.
+ */
+/**
+ * xmlXPathSetError:
+ * @ctxt: an XPath parser context
+ * @err: an xmlXPathError code
+ *
+ * Raises an error.
+ */
+#define xmlXPathSetError(ctxt, err) \
+ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
+ if ((ctxt) != NULL) (ctxt)->error = (err); }
+
+/**
+ * xmlXPathSetArityError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_ARITY error.
+ */
+#define xmlXPathSetArityError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
+
+/**
+ * xmlXPathSetTypeError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_TYPE error.
+ */
+#define xmlXPathSetTypeError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
+
+/**
+ * xmlXPathGetError:
+ * @ctxt: an XPath parser context
+ *
+ * Get the error code of an XPath context.
+ *
+ * Returns the context error.
+ */
+#define xmlXPathGetError(ctxt) ((ctxt)->error)
+
+/**
+ * xmlXPathCheckError:
+ * @ctxt: an XPath parser context
+ *
+ * Check if an XPath error was raised.
+ *
+ * Returns true if an error has been raised, false otherwise.
+ */
+#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
+
+/**
+ * xmlXPathGetDocument:
+ * @ctxt: an XPath parser context
+ *
+ * Get the document of an XPath context.
+ *
+ * Returns the context document.
+ */
+#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
+
+/**
+ * xmlXPathGetContextNode:
+ * @ctxt: an XPath parser context
+ *
+ * Get the context node of an XPath context.
+ *
+ * Returns the context node.
+ */
+#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
+
+XMLPUBFUN int XMLCALL
+ xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN double XMLCALL
+ xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathPopString (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void * XMLCALL
+ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
+
+/**
+ * xmlXPathReturnBoolean:
+ * @ctxt: an XPath parser context
+ * @val: a boolean
+ *
+ * Pushes the boolean @val on the context stack.
+ */
+#define xmlXPathReturnBoolean(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewBoolean(val))
+
+/**
+ * xmlXPathReturnTrue:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes true on the context stack.
+ */
+#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
+
+/**
+ * xmlXPathReturnFalse:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes false on the context stack.
+ */
+#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
+
+/**
+ * xmlXPathReturnNumber:
+ * @ctxt: an XPath parser context
+ * @val: a double
+ *
+ * Pushes the double @val on the context stack.
+ */
+#define xmlXPathReturnNumber(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewFloat(val))
+
+/**
+ * xmlXPathReturnString:
+ * @ctxt: an XPath parser context
+ * @str: a string
+ *
+ * Pushes the string @str on the context stack.
+ */
+#define xmlXPathReturnString(ctxt, str) \
+ valuePush((ctxt), xmlXPathWrapString(str))
+
+/**
+ * xmlXPathReturnEmptyString:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty string on the stack.
+ */
+#define xmlXPathReturnEmptyString(ctxt) \
+ valuePush((ctxt), xmlXPathNewCString(""))
+
+/**
+ * xmlXPathReturnNodeSet:
+ * @ctxt: an XPath parser context
+ * @ns: a node-set
+ *
+ * Pushes the node-set @ns on the context stack.
+ */
+#define xmlXPathReturnNodeSet(ctxt, ns) \
+ valuePush((ctxt), xmlXPathWrapNodeSet(ns))
+
+/**
+ * xmlXPathReturnEmptyNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty node-set on the context stack.
+ */
+#define xmlXPathReturnEmptyNodeSet(ctxt) \
+ valuePush((ctxt), xmlXPathNewNodeSet(NULL))
+
+/**
+ * xmlXPathReturnExternal:
+ * @ctxt: an XPath parser context
+ * @val: user data
+ *
+ * Pushes user data on the context stack.
+ */
+#define xmlXPathReturnExternal(ctxt, val) \
+ valuePush((ctxt), xmlXPathWrapExternal(val))
+
+/**
+ * xmlXPathStackIsNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Check if the current value on the XPath stack is a node set or
+ * an XSLT value tree.
+ *
+ * Returns true if the current object on the stack is a node-set.
+ */
+#define xmlXPathStackIsNodeSet(ctxt) \
+ (((ctxt)->value != NULL) \
+ && (((ctxt)->value->type == XPATH_NODESET) \
+ || ((ctxt)->value->type == XPATH_XSLT_TREE)))
+
+/**
+ * xmlXPathStackIsExternal:
+ * @ctxt: an XPath parser context
+ *
+ * Checks if the current value on the XPath stack is an external
+ * object.
+ *
+ * Returns true if the current object on the stack is an external
+ * object.
+ */
+#define xmlXPathStackIsExternal(ctxt) \
+ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
+
+/**
+ * xmlXPathEmptyNodeSet:
+ * @ns: a node-set
+ *
+ * Empties a node-set.
+ */
+#define xmlXPathEmptyNodeSet(ns) \
+ { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
+
+/**
+ * CHECK_ERROR:
+ *
+ * Macro to return from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return
+
+/**
+ * CHECK_ERROR0:
+ *
+ * Macro to return 0 from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR0 \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
+
+/**
+ * XP_ERROR:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return.
+ */
+#define XP_ERROR(X) \
+ { xmlXPathErr(ctxt, X); return; }
+
+/**
+ * XP_ERROR0:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return 0.
+ */
+#define XP_ERROR0(X) \
+ { xmlXPathErr(ctxt, X); return(0); }
+
+/**
+ * CHECK_TYPE:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type.
+ */
+#define CHECK_TYPE(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_TYPE0:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type. Return(0) in case of failure
+ */
+#define CHECK_TYPE0(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR0(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_ARITY:
+ * @x: the number of expected args
+ *
+ * Macro to check that the number of args passed to an XPath function matches.
+ */
+#define CHECK_ARITY(x) \
+ if (ctxt == NULL) return; \
+ if (nargs != (x)) \
+ XP_ERROR(XPATH_INVALID_ARITY); \
+ if (ctxt->valueNr < ctxt->valueFrame + (x)) \
+ XP_ERROR(XPATH_STACK_ERROR);
+
+/**
+ * CAST_TO_STRING:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a string.
+ */
+#define CAST_TO_STRING \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
+ xmlXPathStringFunction(ctxt, 1);
+
+/**
+ * CAST_TO_NUMBER:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a number.
+ */
+#define CAST_TO_NUMBER \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
+ xmlXPathNumberFunction(ctxt, 1);
+
+/**
+ * CAST_TO_BOOLEAN:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a boolean.
+ */
+#define CAST_TO_BOOLEAN \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
+ xmlXPathBooleanFunction(ctxt, 1);
+
+/*
+ * Variable Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
+ xmlXPathVariableLookupFunc f,
+ void *data);
+
+/*
+ * Function Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt);
+
+/*
+ * Error reporting.
+ */
+XMLPUBFUN void XMLCALL
+ xmlXPatherror (xmlXPathParserContextPtr ctxt,
+ const char *file,
+ int line,
+ int no);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathErr (xmlXPathParserContextPtr ctxt,
+ int error);
+
+#ifdef LIBXML_DEBUG_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpObject (FILE *output,
+ xmlXPathObjectPtr cur,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpCompExpr(FILE *output,
+ xmlXPathCompExprPtr comp,
+ int depth);
+#endif
+/**
+ * NodeSet handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetContains (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDifference (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathIntersection (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinct (xmlNodeSetPtr nodes);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeading (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeading (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailing (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+
+/**
+ * Extending a context.
+ */
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix,
+ const xmlChar *ns_uri);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlXPathNsLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathObjectPtr value);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathObjectPtr value);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
+
+/**
+ * Utilities to extend XPath.
+ */
+XMLPUBFUN xmlXPathParserContextPtr XMLCALL
+ xmlXPathNewParserContext (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
+
+/* TODO: remap to xmlXPathValuePop and Push. */
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ valuePop (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ valuePush (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr value);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewString (const xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewCString (const char *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapString (xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapCString (char * val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewFloat (double val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewBoolean (int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSet (xmlNodePtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewValueTree (xmlNodePtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
+ xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetSort (xmlNodeSetPtr set);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRoot (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseName (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
+
+/*
+ * Existing functions.
+ */
+XMLPUBFUN double XMLCALL
+ xmlXPathStringEvalNumber (const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr res);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
+ xmlNodeSetPtr val2);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetDel (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
+ int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSetList (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapNodeSet (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapExternal (void *val);
+
+XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
+XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
+
+/*
+ * Some of the axis navigation routines.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+/*
+ * The official core of XPath functions.
+ */
+XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+/**
+ * Really internal functions
+ */
+XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* ! __XML_XPATH_INTERNALS_H__ */
diff --git a/include/libxml/xpointer.h b/include/libxml/xpointer.h
new file mode 100644
index 0000000..b99112b
--- /dev/null
+++ b/include/libxml/xpointer.h
@@ -0,0 +1,114 @@
+/*
+ * Summary: API to handle XML Pointers
+ * Description: API to handle XML Pointers
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPTR_H__
+#define __XML_XPTR_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * A Location Set
+ */
+typedef struct _xmlLocationSet xmlLocationSet;
+typedef xmlLocationSet *xmlLocationSetPtr;
+struct _xmlLocationSet {
+ int locNr; /* number of locations in the set */
+ int locMax; /* size of the array as allocated */
+ xmlXPathObjectPtr *locTab;/* array of locations */
+};
+
+/*
+ * Handling of location sets.
+ */
+
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
+ xmlLocationSetPtr val2);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRange (xmlNodePtr start,
+ int startindex,
+ xmlNodePtr end,
+ int endindex);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodePoint (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodeObject (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewCollapsedRange (xmlNodePtr start);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
+ int val);
+
+/*
+ * Functions.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPtrNewContext (xmlDocPtr doc,
+ xmlNodePtr here,
+ xmlNodePtr origin);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN void XMLCALL
+ xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+#endif /* __XML_XPTR_H__ */
diff --git a/include/win32config.h b/include/win32config.h
new file mode 100644
index 0000000..40cf7df
--- /dev/null
+++ b/include/win32config.h
@@ -0,0 +1,128 @@
+#ifndef __LIBXML_WIN32_CONFIG__
+#define __LIBXML_WIN32_CONFIG__
+
+#define HAVE_CTYPE_H
+#define HAVE_STDARG_H
+#define HAVE_MALLOC_H
+#define HAVE_ERRNO_H
+#define SEND_ARG2_CAST
+#define GETHOSTBYNAME_ARG_CAST
+
+#if defined(_WIN32_WCE)
+#undef HAVE_ERRNO_H
+#include <windows.h>
+#include "wincecompat.h"
+#else
+#define HAVE_SYS_STAT_H
+#define HAVE__STAT
+#define HAVE_STAT
+#define HAVE_STDLIB_H
+#define HAVE_TIME_H
+#define HAVE_FCNTL_H
+#include <io.h>
+#include <direct.h>
+#endif
+
+#include <libxml/xmlversion.h>
+
+#ifndef ICONV_CONST
+#define ICONV_CONST const
+#endif
+
+#ifdef NEED_SOCKETS
+#include <wsockcompat.h>
+#endif
+
+/*
+ * Windows platforms may define except
+ */
+#undef except
+
+#define HAVE_ISINF
+#define HAVE_ISNAN
+#include <math.h>
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+/* MS C-runtime has functions which can be used in order to determine if
+ a given floating-point variable contains NaN, (+-)INF. These are
+ preferred, because floating-point technology is considered propriatary
+ by MS and we can assume that their functions know more about their
+ oddities than we do. */
+#include <float.h>
+/* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
+ function. */
+#ifndef isinf
+#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
+ : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
+#endif
+/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
+#ifndef isnan
+#define isnan(d) (_isnan(d))
+#endif
+#else /* _MSC_VER */
+#ifndef isinf
+static int isinf (double d) {
+ int expon = 0;
+ double val = frexp (d, &expon);
+ if (expon == 1025) {
+ if (val == 0.5) {
+ return 1;
+ } else if (val == -0.5) {
+ return -1;
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+}
+#endif
+#ifndef isnan
+static int isnan (double d) {
+ int expon = 0;
+ double val = frexp (d, &expon);
+ if (expon == 1025) {
+ if (val == 0.5) {
+ return 0;
+ } else if (val == -0.5) {
+ return 0;
+ } else {
+ return 1;
+ }
+ } else {
+ return 0;
+ }
+}
+#endif
+#endif /* _MSC_VER */
+
+#if defined(_MSC_VER)
+#define mkdir(p,m) _mkdir(p)
+#if _MSC_VER < 1900
+#define snprintf _snprintf
+#endif
+#if _MSC_VER < 1500
+#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#endif
+#elif defined(__MINGW32__)
+#define mkdir(p,m) _mkdir(p)
+#endif
+
+/* Threading API to use should be specified here for compatibility reasons.
+ This is however best specified on the compiler's command-line. */
+#if defined(LIBXML_THREAD_ENABLED)
+#if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
+#define HAVE_WIN32_THREADS
+#endif
+#endif
+
+/* Some third-party libraries far from our control assume the following
+ is defined, which it is not if we don't include windows.h. */
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+#if !defined(TRUE)
+#define TRUE (!(FALSE))
+#endif
+
+#endif /* __LIBXML_WIN32_CONFIG__ */
+
diff --git a/include/wsockcompat.h b/include/wsockcompat.h
new file mode 100644
index 0000000..e6a1a99
--- /dev/null
+++ b/include/wsockcompat.h
@@ -0,0 +1,86 @@
+/* include/wsockcompat.h
+ * Windows -> Berkeley Sockets compatibility things.
+ */
+
+#if !defined __XML_WSOCKCOMPAT_H__
+#define __XML_WSOCKCOMPAT_H__
+
+#ifdef _WIN32_WCE
+#include <winsock.h>
+#else
+#undef HAVE_ERRNO_H
+#include <winsock2.h>
+
+/* the following is a workaround a problem for 'inline' keyword in said
+ header when compiled with Borland C++ 6 */
+#if defined(__BORLANDC__) && !defined(__cplusplus)
+#define inline __inline
+#define _inline __inline
+#endif
+
+#include <ws2tcpip.h>
+
+/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
+#if defined(GetAddrInfo)
+#include <wspiapi.h>
+#define HAVE_GETADDRINFO
+#endif
+#endif
+
+#if defined( __MINGW32__ ) || defined( _MSC_VER )
+/* Include <errno.h> here to ensure that it doesn't get included later
+ * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
+#include <errno.h>
+#undef EWOULDBLOCK
+#endif
+
+#if !defined SOCKLEN_T
+#define SOCKLEN_T int
+#endif
+
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define ESHUTDOWN WSAESHUTDOWN
+
+#if (!defined(_MSC_VER) || (_MSC_VER < 1600))
+#define EINPROGRESS WSAEINPROGRESS
+#define EALREADY WSAEALREADY
+#define ENOTSOCK WSAENOTSOCK
+#define EDESTADDRREQ WSAEDESTADDRREQ
+#define EMSGSIZE WSAEMSGSIZE
+#define EPROTOTYPE WSAEPROTOTYPE
+#define ENOPROTOOPT WSAENOPROTOOPT
+#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#define EOPNOTSUPP WSAEOPNOTSUPP
+#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#define EADDRINUSE WSAEADDRINUSE
+#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#define ENETDOWN WSAENETDOWN
+#define ENETUNREACH WSAENETUNREACH
+#define ENETRESET WSAENETRESET
+#define ECONNABORTED WSAECONNABORTED
+#define ECONNRESET WSAECONNRESET
+#define ENOBUFS WSAENOBUFS
+#define EISCONN WSAEISCONN
+#define ENOTCONN WSAENOTCONN
+#define ETOOMANYREFS WSAETOOMANYREFS
+#define ETIMEDOUT WSAETIMEDOUT
+#define ECONNREFUSED WSAECONNREFUSED
+#define ELOOP WSAELOOP
+#define EHOSTDOWN WSAEHOSTDOWN
+#define EHOSTUNREACH WSAEHOSTUNREACH
+#define EPROCLIM WSAEPROCLIM
+#define EUSERS WSAEUSERS
+#define EDQUOT WSAEDQUOT
+#define ESTALE WSAESTALE
+#define EREMOTE WSAEREMOTE
+/* These cause conflicts with the codes from errno.h. Since they are
+ not used in the relevant code (nanoftp, nanohttp), we can leave
+ them disabled.
+#define ENAMETOOLONG WSAENAMETOOLONG
+#define ENOTEMPTY WSAENOTEMPTY
+*/
+#endif /* _MSC_VER */
+
+#endif /* __XML_WSOCKCOMPAT_H__ */
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/legacy.c b/legacy.c
new file mode 100644
index 0000000..86362bf
--- /dev/null
+++ b/legacy.c
@@ -0,0 +1,1343 @@
+/*
+ * legacy.c: set of deprecated routines, not to be used anymore but
+ * kept purely for ABI compatibility
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_LEGACY_ENABLED
+#include <string.h>
+
+#include <libxml/tree.h>
+#include <libxml/entities.h>
+#include <libxml/SAX.h>
+#include <libxml/parserInternals.h>
+#include <libxml/HTMLparser.h>
+
+void xmlUpgradeOldNs(xmlDocPtr doc);
+
+/************************************************************************
+ * *
+ * Deprecated functions kept for compatibility *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_HTML_ENABLED
+xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
+ xmlChar end2, xmlChar end3);
+
+/**
+ * htmlDecodeEntities:
+ * @ctxt: the parser context
+ * @len: the len to decode (in bytes !), -1 for no size limit
+ * @end: an end marker xmlChar, 0 if none
+ * @end2: an end marker xmlChar, 0 if none
+ * @end3: an end marker xmlChar, 0 if none
+ *
+ * Substitute the HTML entities by their value
+ *
+ * DEPRECATED !!!!
+ *
+ * Returns A newly allocated string with the substitution done. The caller
+ * must deallocate it !
+ */
+xmlChar *
+htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED, xmlChar end ATTRIBUTE_UNUSED,
+ xmlChar end2 ATTRIBUTE_UNUSED,
+ xmlChar end3 ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "htmlDecodeEntities() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+#endif
+
+/**
+ * xmlInitializePredefinedEntities:
+ *
+ * Set up the predefined entities.
+ * Deprecated call
+ */
+void
+xmlInitializePredefinedEntities(void)
+{
+}
+
+/**
+ * xmlCleanupPredefinedEntities:
+ *
+ * Cleanup up the predefined entities table.
+ * Deprecated call
+ */
+void
+xmlCleanupPredefinedEntities(void)
+{
+}
+
+static const char *xmlFeaturesList[] = {
+ "validate",
+ "load subset",
+ "keep blanks",
+ "disable SAX",
+ "fetch external entities",
+ "substitute entities",
+ "gather line info",
+ "user data",
+ "is html",
+ "is standalone",
+ "stop parser",
+ "document",
+ "is well formed",
+ "is valid",
+ "SAX block",
+ "SAX function internalSubset",
+ "SAX function isStandalone",
+ "SAX function hasInternalSubset",
+ "SAX function hasExternalSubset",
+ "SAX function resolveEntity",
+ "SAX function getEntity",
+ "SAX function entityDecl",
+ "SAX function notationDecl",
+ "SAX function attributeDecl",
+ "SAX function elementDecl",
+ "SAX function unparsedEntityDecl",
+ "SAX function setDocumentLocator",
+ "SAX function startDocument",
+ "SAX function endDocument",
+ "SAX function startElement",
+ "SAX function endElement",
+ "SAX function reference",
+ "SAX function characters",
+ "SAX function ignorableWhitespace",
+ "SAX function processingInstruction",
+ "SAX function comment",
+ "SAX function warning",
+ "SAX function error",
+ "SAX function fatalError",
+ "SAX function getParameterEntity",
+ "SAX function cdataBlock",
+ "SAX function externalSubset",
+};
+
+/**
+ * xmlGetFeaturesList:
+ * @len: the length of the features name array (input/output)
+ * @result: an array of string to be filled with the features name.
+ *
+ * Copy at most *@len feature names into the @result array
+ *
+ * Returns -1 in case or error, or the total number of features,
+ * len is updated with the number of strings copied,
+ * strings must not be deallocated
+ */
+int
+xmlGetFeaturesList(int *len, const char **result)
+{
+ int ret, i;
+
+ ret = sizeof(xmlFeaturesList) / sizeof(xmlFeaturesList[0]);
+ if ((len == NULL) || (result == NULL))
+ return (ret);
+ if ((*len < 0) || (*len >= 1000))
+ return (-1);
+ if (*len > ret)
+ *len = ret;
+ for (i = 0; i < *len; i++)
+ result[i] = xmlFeaturesList[i];
+ return (ret);
+}
+
+/**
+ * xmlGetFeature:
+ * @ctxt: an XML/HTML parser context
+ * @name: the feature name
+ * @result: location to store the result
+ *
+ * Read the current value of one feature of this parser instance
+ *
+ * Returns -1 in case or error, 0 otherwise
+ */
+int
+xmlGetFeature(xmlParserCtxtPtr ctxt, const char *name, void *result)
+{
+ if ((ctxt == NULL) || (name == NULL) || (result == NULL))
+ return (-1);
+
+ if (!strcmp(name, "validate")) {
+ *((int *) result) = ctxt->validate;
+ } else if (!strcmp(name, "keep blanks")) {
+ *((int *) result) = ctxt->keepBlanks;
+ } else if (!strcmp(name, "disable SAX")) {
+ *((int *) result) = ctxt->disableSAX;
+ } else if (!strcmp(name, "fetch external entities")) {
+ *((int *) result) = ctxt->loadsubset;
+ } else if (!strcmp(name, "substitute entities")) {
+ *((int *) result) = ctxt->replaceEntities;
+ } else if (!strcmp(name, "gather line info")) {
+ *((int *) result) = ctxt->record_info;
+ } else if (!strcmp(name, "user data")) {
+ *((void **) result) = ctxt->userData;
+ } else if (!strcmp(name, "is html")) {
+ *((int *) result) = ctxt->html;
+ } else if (!strcmp(name, "is standalone")) {
+ *((int *) result) = ctxt->standalone;
+ } else if (!strcmp(name, "document")) {
+ *((xmlDocPtr *) result) = ctxt->myDoc;
+ } else if (!strcmp(name, "is well formed")) {
+ *((int *) result) = ctxt->wellFormed;
+ } else if (!strcmp(name, "is valid")) {
+ *((int *) result) = ctxt->valid;
+ } else if (!strcmp(name, "SAX block")) {
+ *((xmlSAXHandlerPtr *) result) = ctxt->sax;
+ } else if (!strcmp(name, "SAX function internalSubset")) {
+ *((internalSubsetSAXFunc *) result) = ctxt->sax->internalSubset;
+ } else if (!strcmp(name, "SAX function isStandalone")) {
+ *((isStandaloneSAXFunc *) result) = ctxt->sax->isStandalone;
+ } else if (!strcmp(name, "SAX function hasInternalSubset")) {
+ *((hasInternalSubsetSAXFunc *) result) =
+ ctxt->sax->hasInternalSubset;
+ } else if (!strcmp(name, "SAX function hasExternalSubset")) {
+ *((hasExternalSubsetSAXFunc *) result) =
+ ctxt->sax->hasExternalSubset;
+ } else if (!strcmp(name, "SAX function resolveEntity")) {
+ *((resolveEntitySAXFunc *) result) = ctxt->sax->resolveEntity;
+ } else if (!strcmp(name, "SAX function getEntity")) {
+ *((getEntitySAXFunc *) result) = ctxt->sax->getEntity;
+ } else if (!strcmp(name, "SAX function entityDecl")) {
+ *((entityDeclSAXFunc *) result) = ctxt->sax->entityDecl;
+ } else if (!strcmp(name, "SAX function notationDecl")) {
+ *((notationDeclSAXFunc *) result) = ctxt->sax->notationDecl;
+ } else if (!strcmp(name, "SAX function attributeDecl")) {
+ *((attributeDeclSAXFunc *) result) = ctxt->sax->attributeDecl;
+ } else if (!strcmp(name, "SAX function elementDecl")) {
+ *((elementDeclSAXFunc *) result) = ctxt->sax->elementDecl;
+ } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
+ *((unparsedEntityDeclSAXFunc *) result) =
+ ctxt->sax->unparsedEntityDecl;
+ } else if (!strcmp(name, "SAX function setDocumentLocator")) {
+ *((setDocumentLocatorSAXFunc *) result) =
+ ctxt->sax->setDocumentLocator;
+ } else if (!strcmp(name, "SAX function startDocument")) {
+ *((startDocumentSAXFunc *) result) = ctxt->sax->startDocument;
+ } else if (!strcmp(name, "SAX function endDocument")) {
+ *((endDocumentSAXFunc *) result) = ctxt->sax->endDocument;
+ } else if (!strcmp(name, "SAX function startElement")) {
+ *((startElementSAXFunc *) result) = ctxt->sax->startElement;
+ } else if (!strcmp(name, "SAX function endElement")) {
+ *((endElementSAXFunc *) result) = ctxt->sax->endElement;
+ } else if (!strcmp(name, "SAX function reference")) {
+ *((referenceSAXFunc *) result) = ctxt->sax->reference;
+ } else if (!strcmp(name, "SAX function characters")) {
+ *((charactersSAXFunc *) result) = ctxt->sax->characters;
+ } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
+ *((ignorableWhitespaceSAXFunc *) result) =
+ ctxt->sax->ignorableWhitespace;
+ } else if (!strcmp(name, "SAX function processingInstruction")) {
+ *((processingInstructionSAXFunc *) result) =
+ ctxt->sax->processingInstruction;
+ } else if (!strcmp(name, "SAX function comment")) {
+ *((commentSAXFunc *) result) = ctxt->sax->comment;
+ } else if (!strcmp(name, "SAX function warning")) {
+ *((warningSAXFunc *) result) = ctxt->sax->warning;
+ } else if (!strcmp(name, "SAX function error")) {
+ *((errorSAXFunc *) result) = ctxt->sax->error;
+ } else if (!strcmp(name, "SAX function fatalError")) {
+ *((fatalErrorSAXFunc *) result) = ctxt->sax->fatalError;
+ } else if (!strcmp(name, "SAX function getParameterEntity")) {
+ *((getParameterEntitySAXFunc *) result) =
+ ctxt->sax->getParameterEntity;
+ } else if (!strcmp(name, "SAX function cdataBlock")) {
+ *((cdataBlockSAXFunc *) result) = ctxt->sax->cdataBlock;
+ } else if (!strcmp(name, "SAX function externalSubset")) {
+ *((externalSubsetSAXFunc *) result) = ctxt->sax->externalSubset;
+ } else {
+ return (-1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSetFeature:
+ * @ctxt: an XML/HTML parser context
+ * @name: the feature name
+ * @value: pointer to the location of the new value
+ *
+ * Change the current value of one feature of this parser instance
+ *
+ * Returns -1 in case or error, 0 otherwise
+ */
+int
+xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
+{
+ if ((ctxt == NULL) || (name == NULL) || (value == NULL))
+ return (-1);
+
+ if (!strcmp(name, "validate")) {
+ int newvalidate = *((int *) value);
+
+ if ((!ctxt->validate) && (newvalidate != 0)) {
+ if (ctxt->vctxt.warning == NULL)
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ if (ctxt->vctxt.error == NULL)
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->vctxt.nodeMax = 0;
+ }
+ ctxt->validate = newvalidate;
+ } else if (!strcmp(name, "keep blanks")) {
+ ctxt->keepBlanks = *((int *) value);
+ } else if (!strcmp(name, "disable SAX")) {
+ ctxt->disableSAX = *((int *) value);
+ } else if (!strcmp(name, "fetch external entities")) {
+ ctxt->loadsubset = *((int *) value);
+ } else if (!strcmp(name, "substitute entities")) {
+ ctxt->replaceEntities = *((int *) value);
+ } else if (!strcmp(name, "gather line info")) {
+ ctxt->record_info = *((int *) value);
+ } else if (!strcmp(name, "user data")) {
+ ctxt->userData = *((void **) value);
+ } else if (!strcmp(name, "is html")) {
+ ctxt->html = *((int *) value);
+ } else if (!strcmp(name, "is standalone")) {
+ ctxt->standalone = *((int *) value);
+ } else if (!strcmp(name, "document")) {
+ ctxt->myDoc = *((xmlDocPtr *) value);
+ } else if (!strcmp(name, "is well formed")) {
+ ctxt->wellFormed = *((int *) value);
+ } else if (!strcmp(name, "is valid")) {
+ ctxt->valid = *((int *) value);
+ } else if (!strcmp(name, "SAX block")) {
+ ctxt->sax = *((xmlSAXHandlerPtr *) value);
+ } else if (!strcmp(name, "SAX function internalSubset")) {
+ ctxt->sax->internalSubset = *((internalSubsetSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function isStandalone")) {
+ ctxt->sax->isStandalone = *((isStandaloneSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function hasInternalSubset")) {
+ ctxt->sax->hasInternalSubset =
+ *((hasInternalSubsetSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function hasExternalSubset")) {
+ ctxt->sax->hasExternalSubset =
+ *((hasExternalSubsetSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function resolveEntity")) {
+ ctxt->sax->resolveEntity = *((resolveEntitySAXFunc *) value);
+ } else if (!strcmp(name, "SAX function getEntity")) {
+ ctxt->sax->getEntity = *((getEntitySAXFunc *) value);
+ } else if (!strcmp(name, "SAX function entityDecl")) {
+ ctxt->sax->entityDecl = *((entityDeclSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function notationDecl")) {
+ ctxt->sax->notationDecl = *((notationDeclSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function attributeDecl")) {
+ ctxt->sax->attributeDecl = *((attributeDeclSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function elementDecl")) {
+ ctxt->sax->elementDecl = *((elementDeclSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
+ ctxt->sax->unparsedEntityDecl =
+ *((unparsedEntityDeclSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function setDocumentLocator")) {
+ ctxt->sax->setDocumentLocator =
+ *((setDocumentLocatorSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function startDocument")) {
+ ctxt->sax->startDocument = *((startDocumentSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function endDocument")) {
+ ctxt->sax->endDocument = *((endDocumentSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function startElement")) {
+ ctxt->sax->startElement = *((startElementSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function endElement")) {
+ ctxt->sax->endElement = *((endElementSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function reference")) {
+ ctxt->sax->reference = *((referenceSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function characters")) {
+ ctxt->sax->characters = *((charactersSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
+ ctxt->sax->ignorableWhitespace =
+ *((ignorableWhitespaceSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function processingInstruction")) {
+ ctxt->sax->processingInstruction =
+ *((processingInstructionSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function comment")) {
+ ctxt->sax->comment = *((commentSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function warning")) {
+ ctxt->sax->warning = *((warningSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function error")) {
+ ctxt->sax->error = *((errorSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function fatalError")) {
+ ctxt->sax->fatalError = *((fatalErrorSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function getParameterEntity")) {
+ ctxt->sax->getParameterEntity =
+ *((getParameterEntitySAXFunc *) value);
+ } else if (!strcmp(name, "SAX function cdataBlock")) {
+ ctxt->sax->cdataBlock = *((cdataBlockSAXFunc *) value);
+ } else if (!strcmp(name, "SAX function externalSubset")) {
+ ctxt->sax->externalSubset = *((externalSubsetSAXFunc *) value);
+ } else {
+ return (-1);
+ }
+ return (0);
+}
+
+/**
+ * xmlDecodeEntities:
+ * @ctxt: the parser context
+ * @len: the len to decode (in bytes !), -1 for no size limit
+ * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
+ * @end: an end marker xmlChar, 0 if none
+ * @end2: an end marker xmlChar, 0 if none
+ * @end3: an end marker xmlChar, 0 if none
+ *
+ * This function is deprecated, we now always process entities content
+ * through xmlStringDecodeEntities
+ *
+ * TODO: remove it in next major release.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * Returns A newly allocated string with the substitution done. The caller
+ * must deallocate it !
+ */
+xmlChar *
+xmlDecodeEntities(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED, int what ATTRIBUTE_UNUSED,
+ xmlChar end ATTRIBUTE_UNUSED,
+ xmlChar end2 ATTRIBUTE_UNUSED,
+ xmlChar end3 ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlDecodeEntities() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlNamespaceParseNCName:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML namespace name.
+ *
+ * TODO: this seems not in use anymore, the namespace handling is done on
+ * top of the SAX interfaces, i.e. not on raw input.
+ *
+ * [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
+ *
+ * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
+ * CombiningChar | Extender
+ *
+ * Returns the namespace name or NULL
+ */
+
+xmlChar *
+xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNamespaceParseNCName() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlNamespaceParseQName:
+ * @ctxt: an XML parser context
+ * @prefix: a xmlChar **
+ *
+ * TODO: this seems not in use anymore, the namespace handling is done on
+ * top of the SAX interfaces, i.e. not on raw input.
+ *
+ * parse an XML qualified name
+ *
+ * [NS 5] QName ::= (Prefix ':')? LocalPart
+ *
+ * [NS 6] Prefix ::= NCName
+ *
+ * [NS 7] LocalPart ::= NCName
+ *
+ * Returns the local part, and prefix is updated
+ * to get the Prefix if any.
+ */
+
+xmlChar *
+xmlNamespaceParseQName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlChar ** prefix ATTRIBUTE_UNUSED)
+{
+
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNamespaceParseQName() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlNamespaceParseNSDef:
+ * @ctxt: an XML parser context
+ *
+ * parse a namespace prefix declaration
+ *
+ * TODO: this seems not in use anymore, the namespace handling is done on
+ * top of the SAX interfaces, i.e. not on raw input.
+ *
+ * [NS 1] NSDef ::= PrefixDef Eq SystemLiteral
+ *
+ * [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?
+ *
+ * Returns the namespace name
+ */
+
+xmlChar *
+xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNamespaceParseNSDef() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlParseQuotedString:
+ * @ctxt: an XML parser context
+ *
+ * Parse and return a string between quotes or doublequotes
+ *
+ * TODO: Deprecated, to be removed at next drop of binary compatibility
+ *
+ * Returns the string parser or NULL.
+ */
+xmlChar *
+xmlParseQuotedString(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParseQuotedString() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlParseNamespace:
+ * @ctxt: an XML parser context
+ *
+ * xmlParseNamespace: parse specific PI '<?namespace ...' constructs.
+ *
+ * This is what the older xml-name Working Draft specified, a bunch of
+ * other stuff may still rely on it, so support is still here as
+ * if it was declared on the root of the Tree:-(
+ *
+ * TODO: remove from library
+ *
+ * To be removed at next drop of binary compatibility
+ */
+
+void
+xmlParseNamespace(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParseNamespace() deprecated function reached\n");
+ deprecated = 1;
+ }
+}
+
+/**
+ * xmlScanName:
+ * @ctxt: an XML parser context
+ *
+ * Trickery: parse an XML name but without consuming the input flow
+ * Needed for rollback cases. Used only when parsing entities references.
+ *
+ * TODO: seems deprecated now, only used in the default part of
+ * xmlParserHandleReference
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * [6] Names ::= Name (S Name)*
+ *
+ * Returns the Name parsed or NULL
+ */
+
+xmlChar *
+xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlScanName() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlParserHandleReference:
+ * @ctxt: the parser context
+ *
+ * TODO: Remove, now deprecated ... the test is done directly in the
+ * content parsing
+ * routines.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ *
+ * [68] EntityRef ::= '&' Name ';'
+ *
+ * [ WFC: Entity Declared ]
+ * the Name given in the entity reference must match that in an entity
+ * declaration, except that well-formed documents need not declare any
+ * of the following entities: amp, lt, gt, apos, quot.
+ *
+ * [ WFC: Parsed Entity ]
+ * An entity reference must not contain the name of an unparsed entity
+ *
+ * [66] CharRef ::= '&#' [0-9]+ ';' |
+ * '&#x' [0-9a-fA-F]+ ';'
+ *
+ * A PEReference may have been detected in the current input stream
+ * the handling is done accordingly to
+ * http://www.w3.org/TR/REC-xml#entproc
+ */
+void
+xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParserHandleReference() deprecated function reached\n");
+ deprecated = 1;
+ }
+
+ return;
+}
+
+/**
+ * xmlHandleEntity:
+ * @ctxt: an XML parser context
+ * @entity: an XML entity pointer.
+ *
+ * Default handling of defined entities, when should we define a new input
+ * stream ? When do we just handle that as a set of chars ?
+ *
+ * OBSOLETE: to be removed at some point.
+ */
+
+void
+xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlEntityPtr entity ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlHandleEntity() deprecated function reached\n");
+ deprecated = 1;
+ }
+}
+
+/**
+ * xmlNewGlobalNs:
+ * @doc: the document carrying the namespace
+ * @href: the URI associated
+ * @prefix: the prefix for the namespace
+ *
+ * Creation of a Namespace, the old way using PI and without scoping
+ * DEPRECATED !!!
+ * Returns NULL this functionality had been removed
+ */
+xmlNsPtr
+xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
+ const xmlChar * href ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewGlobalNs() deprecated function reached\n");
+ deprecated = 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlUpgradeOldNs:
+ * @doc: a document pointer
+ *
+ * Upgrade old style Namespaces (PI) and move them to the root of the document.
+ * DEPRECATED
+ */
+void
+xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
+{
+ static int deprecated = 0;
+
+ if (!deprecated) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlUpgradeOldNs() deprecated function reached\n");
+ deprecated = 1;
+ }
+}
+
+/**
+ * xmlEncodeEntities:
+ * @doc: the document containing the string
+ * @input: A string to convert to XML.
+ *
+ * TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary
+ * compatibility
+ *
+ * People must migrate their code to xmlEncodeEntitiesReentrant !
+ * This routine will issue a warning when encountered.
+ *
+ * Returns NULL
+ */
+const xmlChar *
+xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
+ const xmlChar * input ATTRIBUTE_UNUSED)
+{
+ static int warning = 1;
+
+ if (warning) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Deprecated API xmlEncodeEntities() used\n");
+ xmlGenericError(xmlGenericErrorContext,
+ " change code to use xmlEncodeEntitiesReentrant()\n");
+ warning = 0;
+ }
+ return (NULL);
+}
+
+/************************************************************************
+ * *
+ * Old set of SAXv1 functions *
+ * *
+ ************************************************************************/
+static int deprecated_v1_msg = 0;
+
+#define DEPRECATED(n) \
+ if (deprecated_v1_msg == 0) \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Use of deprecated SAXv1 function %s\n", n); \
+ deprecated_v1_msg++;
+
+/**
+ * getPublicId:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
+ * DEPRECATED: use xmlSAX2GetPublicId()
+ *
+ * Returns a xmlChar *
+ */
+const xmlChar *
+getPublicId(void *ctx)
+{
+ DEPRECATED("getPublicId")
+ return (xmlSAX2GetPublicId(ctx));
+}
+
+/**
+ * getSystemId:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provides the system ID, basically URL or filename e.g.
+ * http://www.sgmlsource.com/dtds/memo.dtd
+ * DEPRECATED: use xmlSAX2GetSystemId()
+ *
+ * Returns a xmlChar *
+ */
+const xmlChar *
+getSystemId(void *ctx)
+{
+ DEPRECATED("getSystemId")
+ return (xmlSAX2GetSystemId(ctx));
+}
+
+/**
+ * getLineNumber:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provide the line number of the current parsing point.
+ * DEPRECATED: use xmlSAX2GetLineNumber()
+ *
+ * Returns an int
+ */
+int
+getLineNumber(void *ctx)
+{
+ DEPRECATED("getLineNumber")
+ return (xmlSAX2GetLineNumber(ctx));
+}
+
+/**
+ * getColumnNumber:
+ * @ctx: the user data (XML parser context)
+ *
+ * Provide the column number of the current parsing point.
+ * DEPRECATED: use xmlSAX2GetColumnNumber()
+ *
+ * Returns an int
+ */
+int
+getColumnNumber(void *ctx)
+{
+ DEPRECATED("getColumnNumber")
+ return (xmlSAX2GetColumnNumber(ctx));
+}
+
+/**
+ * isStandalone:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone ?
+ * DEPRECATED: use xmlSAX2IsStandalone()
+ *
+ * Returns 1 if true
+ */
+int
+isStandalone(void *ctx)
+{
+ DEPRECATED("isStandalone")
+ return (xmlSAX2IsStandalone(ctx));
+}
+
+/**
+ * hasInternalSubset:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset
+ * DEPRECATED: use xmlSAX2HasInternalSubset()
+ *
+ * Returns 1 if true
+ */
+int
+hasInternalSubset(void *ctx)
+{
+ DEPRECATED("hasInternalSubset")
+ return (xmlSAX2HasInternalSubset(ctx));
+}
+
+/**
+ * hasExternalSubset:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset
+ * DEPRECATED: use xmlSAX2HasExternalSubset()
+ *
+ * Returns 1 if true
+ */
+int
+hasExternalSubset(void *ctx)
+{
+ DEPRECATED("hasExternalSubset")
+ return (xmlSAX2HasExternalSubset(ctx));
+}
+
+/**
+ * internalSubset:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ * DEPRECATED: use xmlSAX2InternalSubset()
+ */
+void
+internalSubset(void *ctx, const xmlChar * name,
+ const xmlChar * ExternalID, const xmlChar * SystemID)
+{
+ DEPRECATED("internalSubset")
+ xmlSAX2InternalSubset(ctx, name, ExternalID, SystemID);
+}
+
+/**
+ * externalSubset:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ * DEPRECATED: use xmlSAX2ExternalSubset()
+ */
+void
+externalSubset(void *ctx, const xmlChar * name,
+ const xmlChar * ExternalID, const xmlChar * SystemID)
+{
+ DEPRECATED("externalSubset")
+ xmlSAX2ExternalSubset(ctx, name, ExternalID, SystemID);
+}
+
+/**
+ * resolveEntity:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ * DEPRECATED: use xmlSAX2ResolveEntity()
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+xmlParserInputPtr
+resolveEntity(void *ctx, const xmlChar * publicId,
+ const xmlChar * systemId)
+{
+ DEPRECATED("resolveEntity")
+ return (xmlSAX2ResolveEntity(ctx, publicId, systemId));
+}
+
+/**
+ * getEntity:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name
+ * DEPRECATED: use xmlSAX2GetEntity()
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+xmlEntityPtr
+getEntity(void *ctx, const xmlChar * name)
+{
+ DEPRECATED("getEntity")
+ return (xmlSAX2GetEntity(ctx, name));
+}
+
+/**
+ * getParameterEntity:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ * DEPRECATED: use xmlSAX2GetParameterEntity()
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+xmlEntityPtr
+getParameterEntity(void *ctx, const xmlChar * name)
+{
+ DEPRECATED("getParameterEntity")
+ return (xmlSAX2GetParameterEntity(ctx, name));
+}
+
+
+/**
+ * entityDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ * DEPRECATED: use xmlSAX2EntityDecl()
+ */
+void
+entityDecl(void *ctx, const xmlChar * name, int type,
+ const xmlChar * publicId, const xmlChar * systemId,
+ xmlChar * content)
+{
+ DEPRECATED("entityDecl")
+ xmlSAX2EntityDecl(ctx, name, type, publicId, systemId, content);
+}
+
+/**
+ * attributeDecl:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed
+ * DEPRECATED: use xmlSAX2AttributeDecl()
+ */
+void
+attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
+ int type, int def, const xmlChar * defaultValue,
+ xmlEnumerationPtr tree)
+{
+ DEPRECATED("attributeDecl")
+ xmlSAX2AttributeDecl(ctx, elem, fullname, type, def, defaultValue,
+ tree);
+}
+
+/**
+ * elementDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed
+ * DEPRECATED: use xmlSAX2ElementDecl()
+ */
+void
+elementDecl(void *ctx, const xmlChar * name, int type,
+ xmlElementContentPtr content)
+{
+ DEPRECATED("elementDecl")
+ xmlSAX2ElementDecl(ctx, name, type, content);
+}
+
+/**
+ * notationDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ * DEPRECATED: use xmlSAX2NotationDecl()
+ */
+void
+notationDecl(void *ctx, const xmlChar * name,
+ const xmlChar * publicId, const xmlChar * systemId)
+{
+ DEPRECATED("notationDecl")
+ xmlSAX2NotationDecl(ctx, name, publicId, systemId);
+}
+
+/**
+ * unparsedEntityDecl:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ * DEPRECATED: use xmlSAX2UnparsedEntityDecl()
+ */
+void
+unparsedEntityDecl(void *ctx, const xmlChar * name,
+ const xmlChar * publicId, const xmlChar * systemId,
+ const xmlChar * notationName)
+{
+ DEPRECATED("unparsedEntityDecl")
+ xmlSAX2UnparsedEntityDecl(ctx, name, publicId, systemId,
+ notationName);
+}
+
+/**
+ * setDocumentLocator:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ * DEPRECATED
+ */
+void
+setDocumentLocator(void *ctx ATTRIBUTE_UNUSED,
+ xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("setDocumentLocator")
+}
+
+/**
+ * startDocument:
+ * @ctx: the user data (XML parser context)
+ *
+ * called when the document start being processed.
+ * DEPRECATED: use xmlSAX2StartDocument()
+ */
+void
+startDocument(void *ctx)
+{
+ /* don't be too painful for glade users */
+ /* DEPRECATED("startDocument") */
+ xmlSAX2StartDocument(ctx);
+}
+
+/**
+ * endDocument:
+ * @ctx: the user data (XML parser context)
+ *
+ * called when the document end has been detected.
+ * DEPRECATED: use xmlSAX2EndDocument()
+ */
+void
+endDocument(void *ctx)
+{
+ DEPRECATED("endDocument")
+ xmlSAX2EndDocument(ctx);
+}
+
+/**
+ * attribute:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ * DEPRECATED: use xmlSAX2Attribute()
+ */
+void
+attribute(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * fullname ATTRIBUTE_UNUSED,
+ const xmlChar * value ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("attribute")
+}
+
+/**
+ * startElement:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * called when an opening tag has been processed.
+ * DEPRECATED: use xmlSAX2StartElement()
+ */
+void
+startElement(void *ctx, const xmlChar * fullname, const xmlChar ** atts)
+{
+ xmlSAX2StartElement(ctx, fullname, atts);
+}
+
+/**
+ * endElement:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ * DEPRECATED: use xmlSAX2EndElement()
+ */
+void
+endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("endElement")
+ xmlSAX2EndElement(ctx, name);
+}
+
+/**
+ * reference:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ * DEPRECATED: use xmlSAX2Reference()
+ */
+void
+reference(void *ctx, const xmlChar * name)
+{
+ DEPRECATED("reference")
+ xmlSAX2Reference(ctx, name);
+}
+
+/**
+ * characters:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * DEPRECATED: use xmlSAX2Characters()
+ */
+void
+characters(void *ctx, const xmlChar * ch, int len)
+{
+ DEPRECATED("characters")
+ xmlSAX2Characters(ctx, ch, len);
+}
+
+/**
+ * ignorableWhitespace:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters
+ * DEPRECATED: use xmlSAX2IgnorableWhitespace()
+ */
+void
+ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * ch ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("ignorableWhitespace")
+}
+
+/**
+ * processingInstruction:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ * DEPRECATED: use xmlSAX2ProcessingInstruction()
+ */
+void
+processingInstruction(void *ctx, const xmlChar * target,
+ const xmlChar * data)
+{
+ DEPRECATED("processingInstruction")
+ xmlSAX2ProcessingInstruction(ctx, target, data);
+}
+
+/**
+ * globalNamespace:
+ * @ctx: the user data (XML parser context)
+ * @href: the namespace associated URN
+ * @prefix: the namespace prefix
+ *
+ * An old global namespace has been parsed.
+ * DEPRECATED
+ */
+void
+globalNamespace(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * href ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("globalNamespace")
+}
+
+/**
+ * setNamespace:
+ * @ctx: the user data (XML parser context)
+ * @name: the namespace prefix
+ *
+ * Set the current element namespace.
+ * DEPRECATED
+ */
+
+void
+setNamespace(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("setNamespace")
+}
+
+/**
+ * getNamespace:
+ * @ctx: the user data (XML parser context)
+ *
+ * Get the current element namespace.
+ * DEPRECATED
+ *
+ * Returns the xmlNsPtr or NULL if none
+ */
+
+xmlNsPtr
+getNamespace(void *ctx ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("getNamespace")
+ return (NULL);
+}
+
+/**
+ * checkNamespace:
+ * @ctx: the user data (XML parser context)
+ * @namespace: the namespace to check against
+ *
+ * Check that the current element namespace is the same as the
+ * one read upon parsing.
+ * DEPRECATED
+ *
+ * Returns 1 if true 0 otherwise
+ */
+
+int
+checkNamespace(void *ctx ATTRIBUTE_UNUSED,
+ xmlChar * namespace ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("checkNamespace")
+ return (0);
+}
+
+/**
+ * namespaceDecl:
+ * @ctx: the user data (XML parser context)
+ * @href: the namespace associated URN
+ * @prefix: the namespace prefix
+ *
+ * A namespace has been parsed.
+ * DEPRECATED
+ */
+void
+namespaceDecl(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * href ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED)
+{
+ DEPRECATED("namespaceDecl")
+}
+
+/**
+ * comment:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ * DEPRECATED: use xmlSAX2Comment()
+ */
+void
+comment(void *ctx, const xmlChar * value)
+{
+ DEPRECATED("comment")
+ xmlSAX2Comment(ctx, value);
+}
+
+/**
+ * cdataBlock:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ * DEPRECATED: use xmlSAX2CDataBlock()
+ */
+void
+cdataBlock(void *ctx, const xmlChar * value, int len)
+{
+ DEPRECATED("cdataBlock")
+ xmlSAX2CDataBlock(ctx, value, len);
+}
+#define bottom_legacy
+#include "elfgcchack.h"
+#endif /* LIBXML_LEGACY_ENABLED */
+
diff --git a/libxml-2.0-uninstalled.pc.in b/libxml-2.0-uninstalled.pc.in
new file mode 100644
index 0000000..60b886b
--- /dev/null
+++ b/libxml-2.0-uninstalled.pc.in
@@ -0,0 +1,12 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}
+includedir=${pcfiledir}/include
+
+
+Name: libXML
+Version: @VERSION@
+Description: libXML library version2.
+Requires:
+Libs: -L${libdir} -lxml2 @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@
+Cflags: -I${includedir} @XML_INCLUDEDIR@ @XML_CFLAGS@
diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in
new file mode 100644
index 0000000..2653a7c
--- /dev/null
+++ b/libxml-2.0.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+modules=@WITH_MODULES@
+
+Name: libXML
+Version: @VERSION@
+Description: libXML library version2.
+Requires:
+Libs: -L${libdir} -lxml2
+Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
+Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
diff --git a/libxml.3 b/libxml.3
new file mode 100644
index 0000000..b3e9fef
--- /dev/null
+++ b/libxml.3
@@ -0,0 +1,71 @@
+.TH libxml 3 "12 April 2000"
+.SH NAME
+libxml \- library used to parse XML files
+.SH DESCRIPTION
+The
+.I libxml
+library is used to parse XML files.
+Its internal document representation is as close as possible to the
+.I DOM
+(Document Object Model) interface,
+an API for accessing XML or HTML structured documents.
+.LP
+The
+.I libxml
+library also has a
+.IR SAX -like
+interface,
+which is designed to be compatible with
+.IR expat (1).
+NOTE:
+.IR SAX ,
+the Simple API for XML,
+is a standard interface for event-based XML parsing,
+developed collaboratively by the members of the XML-DEV mailing list,
+currently hosted by OASIS.
+The
+.I expat
+library is a XML 1.0 parser written in C,
+which aims to be fully conforming.
+It is currently not a validating XML processor.
+.LP
+The
+.I libxml
+library now includes a nearly complete
+.I XPath
+implementation.
+The
+.I XPath
+(XML Path Language) is a language for addressing parts of an
+XML document,
+designed to be used by both
+.I XSLT
+and
+.IR XPointer .
+.LP
+The
+.I libxml
+library exports Push and Pull type parser interfaces for both XML and
+.IR html .
+.SH FILES
+.TP 2.2i
+.B /depot/lib/libxml_2.0.0/libxml.a
+static library
+.TP
+.B /depot/lib/libxml_2.0.0/libxml.so
+shared library
+.TP
+.B /depot/package/libxml_2.0.0/bin/xmllint
+binary application for parsing XML files
+.SH AUTHORS
+Daniel Veillard (daniel@veillard.com).
+Red Hat Inc.
+Manual page by Ziying Sherwin (sherwin@nlm.nih.gov),
+Lister Hill National Center for Biomedical Communications,
+U.S. National Library of Medicine.
+.SH SEE ALSO
+.IR xmllint (1),
+.IR libxslt (3),
+.IR libexslt (3),
+.IR xsltproc (1)
+.\" end of manual page
diff --git a/libxml.h b/libxml.h
new file mode 100644
index 0000000..2da9044
--- /dev/null
+++ b/libxml.h
@@ -0,0 +1,112 @@
+/*
+ * libxml.h: internal header only used during the compilation of libxml
+ *
+ * See COPYRIGHT for the status of this software
+ *
+ * Author: breese@users.sourceforge.net
+ */
+
+#ifndef __XML_LIBXML_H__
+#define __XML_LIBXML_H__
+
+#ifndef NO_LARGEFILE_SOURCE
+#ifndef _LARGEFILE_SOURCE
+#define _LARGEFILE_SOURCE
+#endif
+#ifndef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 64
+#endif
+#endif
+
+#if defined(macintosh)
+#include "config-mac.h"
+#elif defined(_WIN32_WCE)
+/*
+ * Windows CE compatibility definitions and functions
+ * This is needed to compile libxml2 for Windows CE.
+ * At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2/SH4 target
+ */
+#include <win32config.h>
+#include <libxml/xmlversion.h>
+#else
+/*
+ * Currently supported platforms use either autoconf or
+ * copy to config.h own "preset" configuration file.
+ * As result ifdef HAVE_CONFIG_H is omited here.
+ */
+#include "config.h"
+#include <libxml/xmlversion.h>
+#endif
+
+#if defined(__Lynx__)
+#include <stdio.h> /* pull definition of size_t */
+#include <varargs.h>
+int snprintf(char *, size_t, const char *, ...);
+int vfprintf(FILE *, const char *, va_list);
+#endif
+
+#ifndef WITH_TRIO
+#include <stdio.h>
+#else
+/**
+ * TRIO_REPLACE_STDIO:
+ *
+ * This macro is defined if teh trio string formatting functions are to
+ * be used instead of the default stdio ones.
+ */
+#define TRIO_REPLACE_STDIO
+#include "trio.h"
+#endif
+
+/*
+ * Internal variable indicating if a callback has been registered for
+ * node creation/destruction. It avoids spending a lot of time in locking
+ * function while checking if the callback exists.
+ */
+extern int __xmlRegisterCallbacks;
+/*
+ * internal error reporting routines, shared but not partof the API.
+ */
+void __xmlIOErr(int domain, int code, const char *extra);
+void __xmlLoaderErr(void *ctx, const char *msg, const char *filename);
+#ifdef LIBXML_HTML_ENABLED
+/*
+ * internal function of HTML parser needed for xmlParseInNodeContext
+ * but not part of the API
+ */
+void __htmlParseContent(void *ctx);
+#endif
+
+/*
+ * internal global initialization critical section routines.
+ */
+void __xmlGlobalInitMutexLock(void);
+void __xmlGlobalInitMutexUnlock(void);
+void __xmlGlobalInitMutexDestroy(void);
+
+int __xmlInitializeDict(void);
+
+#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
+/*
+ * internal thread safe random function
+ */
+int __xmlRandom(void);
+#endif
+
+int xmlNop(void);
+
+#ifdef IN_LIBXML
+#ifdef __GNUC__
+#ifdef PIC
+#ifdef linux
+#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+#include "elfgcchack.h"
+#endif
+#endif
+#endif
+#endif
+#endif
+#if !defined(PIC) && !defined(NOLIBTOOL)
+# define LIBXML_STATIC
+#endif
+#endif /* ! __XML_LIBXML_H__ */
diff --git a/libxml.m4 b/libxml.m4
new file mode 100644
index 0000000..68cd824
--- /dev/null
+++ b/libxml.m4
@@ -0,0 +1,188 @@
+# Configure paths for LIBXML2
+# Mike Hommey 2004-06-19
+# use CPPFLAGS instead of CFLAGS
+# Toshio Kuratomi 2001-04-21
+# Adapted from:
+# Configure paths for GLIB
+# Owen Taylor 97-11-3
+
+dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
+dnl
+AC_DEFUN([AM_PATH_XML2],[
+AC_ARG_WITH(xml-prefix,
+ [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
+ xml_config_prefix="$withval", xml_config_prefix="")
+AC_ARG_WITH(xml-exec-prefix,
+ [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
+ xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
+AC_ARG_ENABLE(xmltest,
+ [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
+ enable_xmltest=yes)
+
+ if test x$xml_config_exec_prefix != x ; then
+ xml_config_args="$xml_config_args"
+ if test x${XML2_CONFIG+set} != xset ; then
+ XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
+ fi
+ fi
+ if test x$xml_config_prefix != x ; then
+ xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
+ if test x${XML2_CONFIG+set} != xset ; then
+ XML2_CONFIG=$xml_config_prefix/bin/xml2-config
+ fi
+ fi
+
+ AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
+ min_xml_version=ifelse([$1], ,2.0.0,[$1])
+ AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
+ no_xml=""
+ if test "$XML2_CONFIG" = "no" ; then
+ no_xml=yes
+ else
+ XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
+ XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
+ xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_xmltest" = "xyes" ; then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+ LIBS="$XML_LIBS $LIBS"
+dnl
+dnl Now check if the installed libxml is sufficiently new.
+dnl (Also sanity checks the results of xml2-config to some extent)
+dnl
+ rm -f conf.xmltest
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <libxml/xmlversion.h>
+
+int
+main()
+{
+ int xml_major_version, xml_minor_version, xml_micro_version;
+ int major, minor, micro;
+ char *tmp_version;
+
+ system("touch conf.xmltest");
+
+ /* Capture xml2-config output via autoconf/configure variables */
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = (char *)strdup("$min_xml_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string from xml2-config\n", "$min_xml_version");
+ exit(1);
+ }
+ free(tmp_version);
+
+ /* Capture the version information from the header files */
+ tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
+ if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
+ printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
+ exit(1);
+ }
+ free(tmp_version);
+
+ /* Compare xml2-config output to the libxml headers */
+ if ((xml_major_version != $xml_config_major_version) ||
+ (xml_minor_version != $xml_config_minor_version) ||
+ (xml_micro_version != $xml_config_micro_version))
+ {
+ printf("*** libxml header files (version %d.%d.%d) do not match\n",
+ xml_major_version, xml_minor_version, xml_micro_version);
+ printf("*** xml2-config (version %d.%d.%d)\n",
+ $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
+ return 1;
+ }
+/* Compare the headers to the library to make sure we match */
+ /* Less than ideal -- doesn't provide us with return value feedback,
+ * only exits if there's a serious mismatch between header and library.
+ */
+ LIBXML_TEST_VERSION;
+
+ /* Test that the library is greater than our minimum version */
+ if ((xml_major_version > major) ||
+ ((xml_major_version == major) && (xml_minor_version > minor)) ||
+ ((xml_major_version == major) && (xml_minor_version == minor) &&
+ (xml_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
+ xml_major_version, xml_minor_version, xml_micro_version);
+ printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
+ major, minor, micro);
+ printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
+ printf("*** correct copy of xml2-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ return 1;
+}
+],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+
+ if test "x$no_xml" = x ; then
+ AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$XML2_CONFIG" = "no" ; then
+ echo "*** The xml2-config script installed by LIBXML could not be found"
+ echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the XML2_CONFIG environment variable to the"
+ echo "*** full path to xml2-config."
+ else
+ if test -f conf.xmltest ; then
+ :
+ else
+ echo "*** Could not run libxml test program, checking why..."
+ CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
+ LIBS="$LIBS $XML_LIBS"
+ AC_TRY_LINK([
+#include <libxml/xmlversion.h>
+#include <stdio.h>
+], [ LIBXML_TEST_VERSION; return 0;],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
+ echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
+ echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
+ echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+
+ XML_CPPFLAGS=""
+ XML_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(XML_CPPFLAGS)
+ AC_SUBST(XML_LIBS)
+ rm -f conf.xmltest
+])
diff --git a/libxml.spec.in b/libxml.spec.in
new file mode 100644
index 0000000..242a4fe
--- /dev/null
+++ b/libxml.spec.in
@@ -0,0 +1,151 @@
+Summary: Library providing XML and HTML support
+Name: libxml2
+Version: @VERSION@
+Release: 1%{?dist}%{?extra_release}
+License: MIT
+Group: Development/Libraries
+Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: python python-devel zlib-devel pkgconfig xz-devel
+URL: http://xmlsoft.org/
+
+%description
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select sub nodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package devel
+Summary: Libraries, includes, etc. to develop XML and HTML applications
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+Requires: zlib-devel
+Requires: xz-devel
+Requires: pkgconfig
+
+%description devel
+Libraries, include files, etc you can use to develop XML applications.
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select sub nodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package static
+Summary: Static library for libxml2
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description static
+Static library for libxml2 provided for specific uses or shaving a few
+microseconds when parsing, do not link to them for generic purpose packages.
+
+%package python
+Summary: Python bindings for the libxml2 library
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description python
+The libxml2-python package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%prep
+%setup -q
+
+%build
+%configure
+make %{_smp_mflags}
+
+%install
+rm -fr %{buildroot}
+
+make install DESTDIR=%{buildroot}
+
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
+(cd doc/examples ; make clean ; rm -rf .deps Makefile)
+gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
+
+%check
+make runtests
+
+%clean
+rm -fr %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+%doc AUTHORS NEWS README Copyright TODO
+%doc %{_mandir}/man1/xmllint.1*
+%doc %{_mandir}/man1/xmlcatalog.1*
+%doc %{_mandir}/man3/libxml.3*
+
+%{_libdir}/lib*.so.*
+%{_bindir}/xmllint
+%{_bindir}/xmlcatalog
+
+%files devel
+%defattr(-, root, root)
+
+%doc %{_mandir}/man1/xml2-config.1*
+%doc AUTHORS NEWS README Copyright
+%doc doc/*.html doc/html doc/*.gif doc/*.png
+%doc doc/tutorial doc/libxml2-api.xml.gz
+%doc doc/examples
+%doc %dir %{_datadir}/gtk-doc/html/libxml2
+%doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
+%doc %{_datadir}/gtk-doc/html/libxml2/*.html
+%doc %{_datadir}/gtk-doc/html/libxml2/*.png
+%doc %{_datadir}/gtk-doc/html/libxml2/*.css
+
+%{_libdir}/lib*.so
+%{_libdir}/*.sh
+%{_includedir}/*
+%{_bindir}/xml2-config
+%{_datadir}/aclocal/libxml.m4
+%{_libdir}/pkgconfig/libxml-2.0.pc
+%{_libdir}/cmake/libxml2/libxml2-config.cmake
+
+%files static
+%defattr(-, root, root)
+
+%{_libdir}/*a
+
+%files python
+%defattr(-, root, root)
+
+%{_libdir}/python*/site-packages/libxml2.py*
+%{_libdir}/python*/site-packages/drv_libxml2.py*
+%{_libdir}/python*/site-packages/libxml2mod*
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+
+%changelog
+* @RELDATE@ Daniel Veillard <veillard@redhat.com>
+- upstream release @VERSION@ see http://xmlsoft.org/news.html
+
diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in
new file mode 100644
index 0000000..ac29329
--- /dev/null
+++ b/libxml2-config.cmake.in
@@ -0,0 +1,50 @@
+# libxml2-config.cmake
+# --------------------
+#
+# Libxml2 cmake module.
+# THis module sets the following variables:
+#
+# ::
+#
+# LIBXML2_INCLUDE_DIRS - Directory where libxml2 headers are located.
+# LIBXML2_LIBRARIES - xml2 libraries to link against.
+# LIBXML2_VERSION_MAJOR - The major version of libxml2.
+# LIBXML2_VERSION_MINOR - The minor version of libxml2.
+# LIBXML2_VERSION_PATCH - The patch version of libxml2.
+# LIBXML2_VERSION_STRING - version number as a string (ex: "2.3.4")
+# LIBXML2_MODULES - whether libxml2 as dso support
+
+get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
+
+set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@)
+set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@)
+set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@)
+set(LIBXML2_VERSION_STRING "@VERSION@")
+set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
+set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include)
+set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
+set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2)
+
+if(@WITH_THREADS@)
+ find_package(Threads REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
+if(@WITH_LZMA@)
+ find_package(LibLZMA REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES})
+ list(APPEND LIBXML2_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIRS})
+endif()
+
+if(@WITH_ZLIB@)
+ find_package(ZLIB REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${ZLIB_LIBRARIES})
+ list(APPEND LIBXML2_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
+endif()
+
+list(APPEND LIBXML2_LIBRARIES @ICU_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@)
+
+# whether libxml2 has dso support
+set(LIBXML2_MODULES @WITH_MODULES@)
+
+mark_as_advanced( LIBXML2_INCLUDE_DIRS LIBXML2_LIBRARIES )
diff --git a/libxml2.spec b/libxml2.spec
new file mode 100644
index 0000000..130cda7
--- /dev/null
+++ b/libxml2.spec
@@ -0,0 +1,151 @@
+Summary: Library providing XML and HTML support
+Name: libxml2
+Version: 2.9.2
+Release: 1%{?dist}%{?extra_release}
+License: MIT
+Group: Development/Libraries
+Source: ftp://xmlsoft.org/libxml2/libxml2-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: python python-devel zlib-devel pkgconfig xz-devel
+URL: http://xmlsoft.org/
+
+%description
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select sub nodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package devel
+Summary: Libraries, includes, etc. to develop XML and HTML applications
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+Requires: zlib-devel
+Requires: xz-devel
+Requires: pkgconfig
+
+%description devel
+Libraries, include files, etc you can use to develop XML applications.
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DtDs, either
+at parse time or later once the document has been modified. The output
+can be a simple SAX stream or and in-memory DOM like representations.
+In this case one can use the built-in XPath and XPointer implementation
+to select sub nodes or ranges. A flexible Input/Output mechanism is
+available, with existing HTTP and FTP modules and combined to an
+URI library.
+
+%package static
+Summary: Static library for libxml2
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description static
+Static library for libxml2 provided for specific uses or shaving a few
+microseconds when parsing, do not link to them for generic purpose packages.
+
+%package python
+Summary: Python bindings for the libxml2 library
+Group: Development/Libraries
+Requires: libxml2 = %{version}-%{release}
+
+%description python
+The libxml2-python package contains a module that permits applications
+written in the Python programming language to use the interface
+supplied by the libxml2 library to manipulate XML files.
+
+This library allows to manipulate XML files. It includes support
+to read, modify and write XML and HTML files. There is DTDs support
+this includes parsing and validation even with complex DTDs, either
+at parse time or later once the document has been modified.
+
+%prep
+%setup -q
+
+%build
+%configure
+make %{_smp_mflags}
+
+%install
+rm -fr %{buildroot}
+
+make install DESTDIR=%{buildroot}
+
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-%{version}/*
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libxml2-python-%{version}/*
+(cd doc/examples ; make clean ; rm -rf .deps Makefile)
+gzip -9 -c doc/libxml2-api.xml > doc/libxml2-api.xml.gz
+
+%check
+make runtests
+
+%clean
+rm -fr %{buildroot}
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+%doc AUTHORS NEWS README Copyright TODO
+%doc %{_mandir}/man1/xmllint.1*
+%doc %{_mandir}/man1/xmlcatalog.1*
+%doc %{_mandir}/man3/libxml.3*
+
+%{_libdir}/lib*.so.*
+%{_bindir}/xmllint
+%{_bindir}/xmlcatalog
+
+%files devel
+%defattr(-, root, root)
+
+%doc %{_mandir}/man1/xml2-config.1*
+%doc AUTHORS NEWS README Copyright
+%doc doc/*.html doc/html doc/*.gif doc/*.png
+%doc doc/tutorial doc/libxml2-api.xml.gz
+%doc doc/examples
+%doc %dir %{_datadir}/gtk-doc/html/libxml2
+%doc %{_datadir}/gtk-doc/html/libxml2/*.devhelp
+%doc %{_datadir}/gtk-doc/html/libxml2/*.html
+%doc %{_datadir}/gtk-doc/html/libxml2/*.png
+%doc %{_datadir}/gtk-doc/html/libxml2/*.css
+
+%{_libdir}/lib*.so
+%{_libdir}/*.sh
+%{_includedir}/*
+%{_bindir}/xml2-config
+%{_datadir}/aclocal/libxml.m4
+%{_libdir}/pkgconfig/libxml-2.0.pc
+%{_libdir}/cmake/libxml2/libxml2-config.cmake
+
+%files static
+%defattr(-, root, root)
+
+%{_libdir}/*a
+
+%files python
+%defattr(-, root, root)
+
+%{_libdir}/python*/site-packages/libxml2.py*
+%{_libdir}/python*/site-packages/drv_libxml2.py*
+%{_libdir}/python*/site-packages/libxml2mod*
+%doc python/TODO
+%doc python/libxml2class.txt
+%doc python/tests/*.py
+%doc doc/*.py
+%doc doc/python.html
+
+%changelog
+* Thu Oct 16 2014 Daniel Veillard <veillard@redhat.com>
+- upstream release 2.9.2 see http://xmlsoft.org/news.html
+
diff --git a/libxml2.syms b/libxml2.syms
new file mode 100644
index 0000000..370dcf1
--- /dev/null
+++ b/libxml2.syms
@@ -0,0 +1,2281 @@
+#
+# Officially exported symbols, for which header
+# file definitions are installed in /usr/include/libxml2
+#
+# Automatically generated from symbols.xml and syms.xsl
+#
+# Versions here are *fixed* to match the libxml2 version
+# at which the symbol was introduced. This ensures that
+# a new client app requiring symbol foo() can't accidentally
+# run with old libxml2.so not providing foo() - the global
+# soname version info can't enforce this since we never
+# change the soname
+#
+
+LIBXML2_2.4.30 {
+ global:
+
+# debugXML
+ xmlBoolToText;
+ xmlDebugDumpAttr;
+ xmlDebugDumpAttrList;
+ xmlDebugDumpDTD;
+ xmlDebugDumpDocument;
+ xmlDebugDumpDocumentHead;
+ xmlDebugDumpEntities;
+ xmlDebugDumpNode;
+ xmlDebugDumpNodeList;
+ xmlDebugDumpOneNode;
+ xmlDebugDumpString;
+ xmlLsCountNode;
+ xmlLsOneNode;
+ xmlShell;
+ xmlShellBase;
+ xmlShellCat;
+ xmlShellDir;
+ xmlShellDu;
+ xmlShellList;
+ xmlShellLoad;
+ xmlShellPrintNode;
+ xmlShellPrintXPathError;
+ xmlShellPrintXPathResult;
+ xmlShellPwd;
+ xmlShellSave;
+ xmlShellValidate;
+ xmlShellWrite;
+
+# xpointer
+ xmlXPtrBuildNodeList;
+ xmlXPtrEval;
+ xmlXPtrEvalRangePredicate;
+ xmlXPtrFreeLocationSet;
+ xmlXPtrLocationSetAdd;
+ xmlXPtrLocationSetCreate;
+ xmlXPtrLocationSetDel;
+ xmlXPtrLocationSetMerge;
+ xmlXPtrLocationSetRemove;
+ xmlXPtrNewCollapsedRange;
+ xmlXPtrNewContext;
+ xmlXPtrNewLocationSetNodeSet;
+ xmlXPtrNewLocationSetNodes;
+ xmlXPtrNewRange;
+ xmlXPtrNewRangeNodeObject;
+ xmlXPtrNewRangeNodePoint;
+ xmlXPtrNewRangeNodes;
+ xmlXPtrNewRangePointNode;
+ xmlXPtrNewRangePoints;
+ xmlXPtrRangeToFunction;
+ xmlXPtrWrapLocationSet;
+
+# SAX
+ attribute;
+ attributeDecl;
+ cdataBlock;
+ characters;
+ checkNamespace;
+ comment;
+
+# SAX2
+ docbDefaultSAXHandlerInit;
+
+# SAX
+ elementDecl;
+ endDocument;
+ endElement;
+ entityDecl;
+ externalSubset;
+ getColumnNumber;
+ getEntity;
+ getLineNumber;
+ getNamespace;
+ getParameterEntity;
+ getPublicId;
+ getSystemId;
+ globalNamespace;
+ hasExternalSubset;
+ hasInternalSubset;
+
+# SAX2
+ htmlDefaultSAXHandlerInit;
+
+# SAX
+ ignorableWhitespace;
+ initdocbDefaultSAXHandler;
+ inithtmlDefaultSAXHandler;
+ initxmlDefaultSAXHandler;
+ internalSubset;
+ isStandalone;
+ namespaceDecl;
+ notationDecl;
+ processingInstruction;
+ reference;
+ resolveEntity;
+ setDocumentLocator;
+ setNamespace;
+ startDocument;
+ startElement;
+ unparsedEntityDecl;
+
+# SAX2
+ xmlDefaultSAXHandlerInit;
+
+# parserInternals
+ htmlCreateFileParserCtxt;
+ htmlInitAutoClose;
+ inputPop;
+ inputPush;
+ namePop;
+ namePush;
+ nodePop;
+ nodePush;
+ xmlCheckLanguageID;
+ xmlCopyChar;
+ xmlCopyCharMultiByte;
+ xmlCreateEntityParserCtxt;
+ xmlCreateFileParserCtxt;
+ xmlCreateMemoryParserCtxt;
+ xmlCurrentChar;
+ xmlDecodeEntities;
+ xmlFreeInputStream;
+ xmlHandleEntity;
+
+# chvalid
+ xmlIsBaseChar;
+ xmlIsBlank;
+ xmlIsChar;
+ xmlIsCombining;
+ xmlIsDigit;
+ xmlIsExtender;
+ xmlIsIdeographic;
+
+# parserInternals
+ xmlIsLetter;
+
+# chvalid
+ xmlIsPubidChar;
+
+# parserInternals
+ xmlNamespaceParseNCName;
+ xmlNamespaceParseNSDef;
+ xmlNamespaceParseQName;
+ xmlNewEntityInputStream;
+ xmlNewInputFromFile;
+ xmlNewInputStream;
+
+# parser
+ xmlNewParserCtxt;
+
+# parserInternals
+ xmlNewStringInputStream;
+ xmlNextChar;
+ xmlParseAttValue;
+ xmlParseAttribute;
+ xmlParseAttributeListDecl;
+ xmlParseAttributeType;
+ xmlParseCDSect;
+ xmlParseCharData;
+ xmlParseCharRef;
+ xmlParseComment;
+ xmlParseContent;
+ xmlParseDefaultDecl;
+ xmlParseDocTypeDecl;
+ xmlParseElement;
+ xmlParseElementChildrenContentDecl;
+ xmlParseElementContentDecl;
+ xmlParseElementDecl;
+ xmlParseElementMixedContentDecl;
+ xmlParseEncName;
+ xmlParseEncodingDecl;
+ xmlParseEndTag;
+ xmlParseEntityDecl;
+ xmlParseEntityRef;
+ xmlParseEntityValue;
+ xmlParseEnumeratedType;
+ xmlParseEnumerationType;
+ xmlParseExternalID;
+ xmlParseExternalSubset;
+ xmlParseMarkupDecl;
+ xmlParseMisc;
+ xmlParseName;
+ xmlParseNamespace;
+ xmlParseNmtoken;
+ xmlParseNotationDecl;
+ xmlParseNotationType;
+ xmlParsePEReference;
+ xmlParsePI;
+ xmlParsePITarget;
+ xmlParsePubidLiteral;
+ xmlParseQuotedString;
+ xmlParseReference;
+ xmlParseSDDecl;
+ xmlParseStartTag;
+ xmlParseSystemLiteral;
+ xmlParseTextDecl;
+ xmlParseVersionInfo;
+ xmlParseVersionNum;
+ xmlParseXMLDecl;
+ xmlParserHandlePEReference;
+ xmlParserHandleReference;
+ xmlParserInputShrink;
+ xmlPopInput;
+ xmlPushInput;
+ xmlScanName;
+ xmlSetEntityReferenceFunc;
+ xmlSkipBlankChars;
+ xmlSplitQName;
+ xmlStringComment; # variable
+ xmlStringCurrentChar;
+ xmlStringDecodeEntities;
+ xmlStringText; # variable
+ xmlStringTextNoenc; # variable
+ xmlSwitchEncoding;
+ xmlSwitchToEncoding;
+
+# c14n
+ xmlC14NDocDumpMemory;
+ xmlC14NDocSave;
+ xmlC14NDocSaveTo;
+ xmlC14NExecute;
+
+# catalog
+ xmlACatalogAdd;
+ xmlACatalogDump;
+ xmlACatalogRemove;
+ xmlACatalogResolve;
+ xmlACatalogResolvePublic;
+ xmlACatalogResolveSystem;
+ xmlACatalogResolveURI;
+ xmlCatalogAdd;
+ xmlCatalogAddLocal;
+ xmlCatalogCleanup;
+ xmlCatalogConvert;
+ xmlCatalogDump;
+ xmlCatalogFreeLocal;
+ xmlCatalogGetDefaults;
+ xmlCatalogGetPublic;
+ xmlCatalogGetSystem;
+ xmlCatalogIsEmpty;
+ xmlCatalogLocalResolve;
+ xmlCatalogLocalResolveURI;
+ xmlCatalogRemove;
+ xmlCatalogResolve;
+ xmlCatalogResolvePublic;
+ xmlCatalogResolveSystem;
+ xmlCatalogResolveURI;
+ xmlCatalogSetDebug;
+ xmlCatalogSetDefaultPrefer;
+ xmlCatalogSetDefaults;
+ xmlConvertSGMLCatalog;
+ xmlFreeCatalog;
+ xmlInitializeCatalog;
+ xmlLoadACatalog;
+ xmlLoadCatalog;
+ xmlLoadCatalogs;
+ xmlLoadSGMLSuperCatalog;
+ xmlNewCatalog;
+ xmlParseCatalogFile;
+
+# xpathInternals
+ valuePop;
+ valuePush;
+ xmlXPathAddValues;
+ xmlXPathBooleanFunction;
+ xmlXPathCeilingFunction;
+ xmlXPathCompareValues;
+ xmlXPathConcatFunction;
+ xmlXPathContainsFunction;
+ xmlXPathCountFunction;
+ xmlXPathDebugDumpCompExpr;
+ xmlXPathDebugDumpObject;
+ xmlXPathDifference;
+ xmlXPathDistinct;
+ xmlXPathDistinctSorted;
+ xmlXPathDivValues;
+ xmlXPathEqualValues;
+ xmlXPathEvalExpr;
+ xmlXPathEvaluatePredicateResult;
+ xmlXPathFalseFunction;
+ xmlXPathFloorFunction;
+ xmlXPathFreeParserContext;
+ xmlXPathFunctionLookup;
+ xmlXPathFunctionLookupNS;
+ xmlXPathHasSameNodes;
+ xmlXPathIdFunction;
+ xmlXPathIntersection;
+ xmlXPathIsNodeType;
+ xmlXPathLangFunction;
+ xmlXPathLastFunction;
+ xmlXPathLeading;
+ xmlXPathLeadingSorted;
+ xmlXPathLocalNameFunction;
+ xmlXPathModValues;
+ xmlXPathMultValues;
+ xmlXPathNamespaceURIFunction;
+ xmlXPathNewBoolean;
+ xmlXPathNewCString;
+ xmlXPathNewFloat;
+ xmlXPathNewNodeSet;
+ xmlXPathNewNodeSetList;
+ xmlXPathNewParserContext;
+ xmlXPathNewString;
+ xmlXPathNewValueTree;
+ xmlXPathNextAncestor;
+ xmlXPathNextAncestorOrSelf;
+ xmlXPathNextAttribute;
+ xmlXPathNextChild;
+ xmlXPathNextDescendant;
+ xmlXPathNextDescendantOrSelf;
+ xmlXPathNextFollowing;
+ xmlXPathNextFollowingSibling;
+ xmlXPathNextNamespace;
+ xmlXPathNextParent;
+ xmlXPathNextPreceding;
+ xmlXPathNextPrecedingSibling;
+ xmlXPathNextSelf;
+ xmlXPathNodeLeading;
+ xmlXPathNodeLeadingSorted;
+ xmlXPathNodeSetAdd;
+ xmlXPathNodeSetAddNs;
+ xmlXPathNodeSetAddUnique;
+ xmlXPathNodeSetContains;
+ xmlXPathNodeSetDel;
+ xmlXPathNodeSetFreeNs;
+ xmlXPathNodeSetMerge;
+ xmlXPathNodeSetRemove;
+ xmlXPathNodeSetSort;
+ xmlXPathNodeTrailing;
+ xmlXPathNodeTrailingSorted;
+ xmlXPathNormalizeFunction;
+ xmlXPathNotEqualValues;
+ xmlXPathNotFunction;
+ xmlXPathNsLookup;
+ xmlXPathNumberFunction;
+ xmlXPathParseNCName;
+ xmlXPathParseName;
+ xmlXPathPopBoolean;
+ xmlXPathPopExternal;
+ xmlXPathPopNodeSet;
+ xmlXPathPopNumber;
+ xmlXPathPopString;
+ xmlXPathPositionFunction;
+ xmlXPathRegisterAllFunctions;
+ xmlXPathRegisterFunc;
+ xmlXPathRegisterFuncLookup;
+ xmlXPathRegisterFuncNS;
+ xmlXPathRegisterNs;
+ xmlXPathRegisterVariable;
+ xmlXPathRegisterVariableLookup;
+ xmlXPathRegisterVariableNS;
+ xmlXPathRegisteredFuncsCleanup;
+ xmlXPathRegisteredNsCleanup;
+ xmlXPathRegisteredVariablesCleanup;
+ xmlXPathRoot;
+ xmlXPathRoundFunction;
+ xmlXPathStartsWithFunction;
+ xmlXPathStringEvalNumber;
+ xmlXPathStringFunction;
+ xmlXPathStringLengthFunction;
+ xmlXPathSubValues;
+ xmlXPathSubstringAfterFunction;
+ xmlXPathSubstringBeforeFunction;
+ xmlXPathSubstringFunction;
+ xmlXPathSumFunction;
+ xmlXPathTrailing;
+ xmlXPathTrailingSorted;
+ xmlXPathTranslateFunction;
+ xmlXPathTrueFunction;
+ xmlXPathValueFlipSign;
+ xmlXPathVariableLookup;
+ xmlXPathVariableLookupNS;
+ xmlXPathWrapCString;
+ xmlXPathWrapExternal;
+ xmlXPathWrapNodeSet;
+ xmlXPathWrapString;
+ xmlXPatherror;
+
+# xmlautomata
+ xmlAutomataCompile;
+ xmlAutomataGetInitState;
+ xmlAutomataIsDeterminist;
+ xmlAutomataNewAllTrans;
+ xmlAutomataNewCountTrans;
+ xmlAutomataNewCountedTrans;
+ xmlAutomataNewCounter;
+ xmlAutomataNewCounterTrans;
+ xmlAutomataNewEpsilon;
+ xmlAutomataNewOnceTrans;
+ xmlAutomataNewState;
+ xmlAutomataNewTransition;
+ xmlAutomataSetFinalState;
+ xmlFreeAutomata;
+ xmlNewAutomata;
+
+# HTMLtree
+ htmlDocContentDumpFormatOutput;
+ htmlDocContentDumpOutput;
+ htmlDocDump;
+ htmlDocDumpMemory;
+ htmlGetMetaEncoding;
+ htmlIsBooleanAttr;
+ htmlNewDoc;
+ htmlNewDocNoDtD;
+ htmlNodeDump;
+ htmlNodeDumpFile;
+ htmlNodeDumpFileFormat;
+ htmlNodeDumpFormatOutput;
+ htmlNodeDumpOutput;
+ htmlSaveFile;
+ htmlSaveFileEnc;
+ htmlSaveFileFormat;
+ htmlSetMetaEncoding;
+
+# nanoftp
+ xmlNanoFTPCheckResponse;
+ xmlNanoFTPCleanup;
+ xmlNanoFTPClose;
+ xmlNanoFTPCloseConnection;
+ xmlNanoFTPConnect;
+ xmlNanoFTPConnectTo;
+ xmlNanoFTPCwd;
+ xmlNanoFTPFreeCtxt;
+ xmlNanoFTPGet;
+ xmlNanoFTPGetConnection;
+ xmlNanoFTPGetResponse;
+ xmlNanoFTPGetSocket;
+ xmlNanoFTPInit;
+ xmlNanoFTPList;
+ xmlNanoFTPNewCtxt;
+ xmlNanoFTPOpen;
+ xmlNanoFTPProxy;
+ xmlNanoFTPQuit;
+ xmlNanoFTPRead;
+ xmlNanoFTPScanProxy;
+ xmlNanoFTPUpdateURL;
+
+# DOCBparser
+ docbCreateFileParserCtxt;
+ docbCreatePushParserCtxt;
+ docbEncodeEntities;
+ docbFreeParserCtxt;
+ docbParseChunk;
+ docbParseDoc;
+ docbParseDocument;
+ docbParseFile;
+ docbSAXParseDoc;
+ docbSAXParseFile;
+
+# xpath
+ xmlXPathCastBooleanToNumber;
+ xmlXPathCastBooleanToString;
+ xmlXPathCastNodeSetToBoolean;
+ xmlXPathCastNodeSetToNumber;
+ xmlXPathCastNodeSetToString;
+ xmlXPathCastNodeToNumber;
+ xmlXPathCastNodeToString;
+ xmlXPathCastNumberToBoolean;
+ xmlXPathCastNumberToString;
+ xmlXPathCastStringToBoolean;
+ xmlXPathCastStringToNumber;
+ xmlXPathCastToBoolean;
+ xmlXPathCastToNumber;
+ xmlXPathCastToString;
+ xmlXPathCmpNodes;
+ xmlXPathCompile;
+ xmlXPathCompiledEval;
+ xmlXPathConvertBoolean;
+ xmlXPathConvertNumber;
+ xmlXPathConvertString;
+ xmlXPathEval;
+ xmlXPathEvalExpression;
+ xmlXPathEvalPredicate;
+ xmlXPathFreeCompExpr;
+ xmlXPathFreeContext;
+ xmlXPathFreeNodeSet;
+ xmlXPathFreeNodeSetList;
+ xmlXPathFreeObject;
+ xmlXPathInit;
+ xmlXPathIsInf;
+ xmlXPathIsNaN;
+ xmlXPathNAN; # variable
+ xmlXPathNINF; # variable
+ xmlXPathNewContext;
+ xmlXPathNodeSetCreate;
+ xmlXPathObjectCopy;
+ xmlXPathPINF; # variable
+
+# xlink
+ xlinkGetDefaultDetect;
+ xlinkGetDefaultHandler;
+ xlinkIsLink;
+ xlinkSetDefaultDetect;
+ xlinkSetDefaultHandler;
+
+# entities
+ xmlAddDocEntity;
+ xmlAddDtdEntity;
+ xmlCleanupPredefinedEntities;
+ xmlCopyEntitiesTable;
+ xmlCreateEntitiesTable;
+ xmlDumpEntitiesTable;
+ xmlDumpEntityDecl;
+ xmlEncodeEntities;
+ xmlEncodeEntitiesReentrant;
+ xmlEncodeSpecialChars;
+ xmlFreeEntitiesTable;
+ xmlGetDocEntity;
+ xmlGetDtdEntity;
+ xmlGetParameterEntity;
+ xmlGetPredefinedEntity;
+ xmlInitializePredefinedEntities;
+
+# xinclude
+ xmlXIncludeProcess;
+
+# list
+ xmlLinkGetData;
+ xmlListAppend;
+ xmlListClear;
+ xmlListCopy;
+ xmlListCreate;
+ xmlListDelete;
+ xmlListDup;
+ xmlListEmpty;
+ xmlListEnd;
+ xmlListFront;
+ xmlListInsert;
+ xmlListMerge;
+ xmlListPopBack;
+ xmlListPopFront;
+ xmlListPushBack;
+ xmlListPushFront;
+ xmlListRemoveAll;
+ xmlListRemoveFirst;
+ xmlListRemoveLast;
+ xmlListReverse;
+ xmlListReverseSearch;
+ xmlListReverseWalk;
+ xmlListSearch;
+ xmlListSize;
+ xmlListSort;
+ xmlListWalk;
+
+# xmlmemory
+ xmlInitMemory;
+ xmlMallocLoc;
+ xmlMemDisplay;
+ xmlMemFree;
+ xmlMemGet;
+ xmlMemMalloc;
+ xmlMemRealloc;
+ xmlMemSetup;
+ xmlMemShow;
+ xmlMemStrdupLoc;
+ xmlMemUsed;
+ xmlMemoryDump;
+ xmlMemoryStrdup;
+ xmlReallocLoc;
+
+# xmlIO
+ xmlAllocOutputBuffer;
+ xmlAllocParserInputBuffer;
+ xmlCheckFilename;
+ xmlCleanupInputCallbacks;
+ xmlCleanupOutputCallbacks;
+ xmlFileClose;
+ xmlFileMatch;
+ xmlFileOpen;
+ xmlFileRead;
+ xmlFreeParserInputBuffer;
+ xmlIOFTPClose;
+ xmlIOFTPMatch;
+ xmlIOFTPOpen;
+ xmlIOFTPRead;
+ xmlIOHTTPClose;
+ xmlIOHTTPMatch;
+ xmlIOHTTPOpen;
+ xmlIOHTTPOpenW;
+ xmlIOHTTPRead;
+ xmlNoNetExternalEntityLoader;
+ xmlNormalizeWindowsPath;
+ xmlOutputBufferClose;
+ xmlOutputBufferCreateFd;
+ xmlOutputBufferCreateFile;
+ xmlOutputBufferCreateFilename;
+ xmlOutputBufferCreateIO;
+ xmlOutputBufferFlush;
+ xmlOutputBufferWrite;
+ xmlOutputBufferWriteString;
+ xmlParserGetDirectory;
+ xmlParserInputBufferCreateFd;
+ xmlParserInputBufferCreateFile;
+ xmlParserInputBufferCreateFilename;
+ xmlParserInputBufferCreateIO;
+ xmlParserInputBufferCreateMem;
+ xmlParserInputBufferGrow;
+ xmlParserInputBufferPush;
+ xmlParserInputBufferRead;
+ xmlRegisterDefaultInputCallbacks;
+ xmlRegisterDefaultOutputCallbacks;
+ xmlRegisterHTTPPostCallbacks;
+ xmlRegisterInputCallbacks;
+ xmlRegisterOutputCallbacks;
+
+# xmlversion
+ xmlCheckVersion;
+
+# valid
+ xmlAddAttributeDecl;
+ xmlAddElementDecl;
+ xmlAddID;
+ xmlAddNotationDecl;
+ xmlAddRef;
+ xmlCopyAttributeTable;
+ xmlCopyElementContent;
+ xmlCopyElementTable;
+ xmlCopyEnumeration;
+ xmlCopyNotationTable;
+ xmlCreateEnumeration;
+ xmlDumpAttributeDecl;
+ xmlDumpAttributeTable;
+ xmlDumpElementDecl;
+ xmlDumpElementTable;
+ xmlDumpNotationDecl;
+ xmlDumpNotationTable;
+ xmlFreeAttributeTable;
+ xmlFreeElementContent;
+ xmlFreeElementTable;
+ xmlFreeEnumeration;
+ xmlFreeIDTable;
+ xmlFreeNotationTable;
+ xmlFreeRefTable;
+ xmlGetDtdAttrDesc;
+ xmlGetDtdElementDesc;
+ xmlGetDtdNotationDesc;
+ xmlGetDtdQAttrDesc;
+ xmlGetDtdQElementDesc;
+ xmlGetID;
+ xmlGetRefs;
+ xmlIsID;
+ xmlIsMixedElement;
+ xmlIsRef;
+ xmlNewElementContent;
+ xmlRemoveID;
+ xmlRemoveRef;
+ xmlSnprintfElementContent;
+
+# tree
+ xmlSplitQName2;
+
+# valid
+ xmlSprintfElementContent;
+ xmlValidBuildContentModel;
+ xmlValidCtxtNormalizeAttributeValue;
+ xmlValidGetPotentialChildren;
+ xmlValidGetValidElements;
+ xmlValidNormalizeAttributeValue;
+ xmlValidateAttributeDecl;
+ xmlValidateAttributeValue;
+ xmlValidateDocument;
+ xmlValidateDocumentFinal;
+ xmlValidateDtd;
+ xmlValidateDtdFinal;
+ xmlValidateElement;
+ xmlValidateElementDecl;
+ xmlValidateNameValue;
+ xmlValidateNamesValue;
+ xmlValidateNmtokenValue;
+ xmlValidateNmtokensValue;
+ xmlValidateNotationDecl;
+ xmlValidateNotationUse;
+ xmlValidateOneAttribute;
+ xmlValidateOneElement;
+ xmlValidateOneNamespace;
+ xmlValidateRoot;
+
+# HTMLparser
+ UTF8ToHtml;
+ htmlAutoCloseTag;
+ htmlCreatePushParserCtxt;
+ htmlEncodeEntities;
+ htmlEntityLookup;
+ htmlEntityValueLookup;
+ htmlFreeParserCtxt;
+ htmlHandleOmittedElem;
+ htmlIsAutoClosed;
+ htmlIsScriptAttribute;
+ htmlParseCharRef;
+ htmlParseChunk;
+ htmlParseDoc;
+ htmlParseDocument;
+ htmlParseElement;
+ htmlParseEntityRef;
+ htmlParseFile;
+ htmlSAXParseDoc;
+ htmlSAXParseFile;
+ htmlTagLookup;
+
+# xmlstring
+ xmlCharStrdup;
+ xmlCharStrndup;
+
+# parser
+ xmlCleanupParser;
+ xmlClearNodeInfoSeq;
+ xmlClearParserCtxt;
+ xmlCreateDocParserCtxt;
+ xmlCreateIOParserCtxt;
+ xmlCreatePushParserCtxt;
+ xmlFreeParserCtxt;
+ xmlGetExternalEntityLoader;
+ xmlGetFeature;
+ xmlGetFeaturesList;
+
+# globals
+ xmlGetWarningsDefaultValue; # variable
+
+# parser
+ xmlIOParseDTD;
+ xmlInitNodeInfoSeq;
+ xmlInitParser;
+ xmlInitParserCtxt;
+ xmlKeepBlanksDefault;
+ xmlLineNumbersDefault;
+ xmlLoadExternalEntity;
+ xmlNewIOInputStream;
+ xmlParseBalancedChunkMemory;
+ xmlParseBalancedChunkMemoryRecover;
+ xmlParseChunk;
+ xmlParseCtxtExternalEntity;
+ xmlParseDTD;
+ xmlParseDoc;
+ xmlParseDocument;
+ xmlParseEntity;
+ xmlParseExtParsedEnt;
+ xmlParseExternalEntity;
+ xmlParseFile;
+ xmlParseMemory;
+ xmlParserAddNodeInfo;
+ xmlParserFindNodeInfo;
+ xmlParserFindNodeInfoIndex;
+ xmlParserInputGrow;
+ xmlParserInputRead;
+ xmlPedanticParserDefault;
+ xmlRecoverDoc;
+ xmlRecoverFile;
+ xmlRecoverMemory;
+ xmlSAXParseDTD;
+ xmlSAXParseDoc;
+ xmlSAXParseEntity;
+ xmlSAXParseFile;
+ xmlSAXParseFileWithData;
+ xmlSAXParseMemory;
+ xmlSAXParseMemoryWithData;
+ xmlSAXUserParseFile;
+ xmlSAXUserParseMemory;
+ xmlSetExternalEntityLoader;
+ xmlSetFeature;
+ xmlSetupParserForBuffer;
+ xmlStopParser;
+
+# xmlstring
+ xmlStrEqual;
+ xmlStrcasecmp;
+ xmlStrcasestr;
+ xmlStrcat;
+ xmlStrchr;
+ xmlStrcmp;
+ xmlStrdup;
+ xmlStrlen;
+ xmlStrncasecmp;
+ xmlStrncat;
+ xmlStrncmp;
+ xmlStrndup;
+ xmlStrstr;
+ xmlStrsub;
+
+# parser
+ xmlSubstituteEntitiesDefault;
+
+# xmlreader
+ xmlFreeTextReader;
+ xmlNewTextReader;
+ xmlNewTextReaderFilename;
+ xmlTextReaderAttributeCount;
+ xmlTextReaderBaseUri;
+ xmlTextReaderDepth;
+ xmlTextReaderHasAttributes;
+ xmlTextReaderHasValue;
+ xmlTextReaderIsDefault;
+ xmlTextReaderIsEmptyElement;
+ xmlTextReaderLocalName;
+ xmlTextReaderName;
+ xmlTextReaderNamespaceUri;
+ xmlTextReaderNodeType;
+ xmlTextReaderPrefix;
+ xmlTextReaderQuoteChar;
+ xmlTextReaderRead;
+ xmlTextReaderValue;
+ xmlTextReaderXmlLang;
+
+# globals
+ docbDefaultSAXHandler; # variable
+ htmlDefaultSAXHandler; # variable
+ xmlDefaultSAXHandler; # variable
+ xmlDefaultSAXLocator; # variable
+ xmlDoValidityCheckingDefaultValue; # variable
+ xmlFree; # variable
+ xmlGenericError; # variable
+ xmlGenericErrorContext; # variable
+ xmlInitializeGlobalState;
+ xmlKeepBlanksDefaultValue; # variable
+ xmlLineNumbersDefaultValue; # variable
+ xmlLoadExtDtdDefaultValue; # variable
+ xmlMalloc; # variable
+ xmlMemStrdup; # variable
+ xmlParserDebugEntities; # variable
+ xmlParserVersion; # variable
+ xmlPedanticParserDefaultValue; # variable
+ xmlRealloc; # variable
+ xmlSaveNoEmptyTags; # variable
+ xmlSubstituteEntitiesDefaultValue; # variable
+ xmlTreeIndentString; # variable
+
+# threads
+ xmlCleanupThreads;
+ xmlFreeMutex;
+ xmlFreeRMutex;
+ xmlGetGlobalState;
+ xmlGetThreadId;
+ xmlInitThreads;
+ xmlIsMainThread;
+ xmlLockLibrary;
+ xmlMutexLock;
+ xmlMutexUnlock;
+ xmlNewMutex;
+ xmlNewRMutex;
+ xmlRMutexLock;
+ xmlRMutexUnlock;
+ xmlUnlockLibrary;
+
+# hash
+ xmlHashAddEntry;
+ xmlHashAddEntry2;
+ xmlHashAddEntry3;
+ xmlHashCopy;
+ xmlHashCreate;
+ xmlHashFree;
+ xmlHashLookup;
+ xmlHashLookup2;
+ xmlHashLookup3;
+ xmlHashRemoveEntry;
+ xmlHashRemoveEntry2;
+ xmlHashRemoveEntry3;
+ xmlHashScan;
+ xmlHashScan3;
+ xmlHashScanFull;
+ xmlHashScanFull3;
+ xmlHashSize;
+ xmlHashUpdateEntry;
+ xmlHashUpdateEntry2;
+ xmlHashUpdateEntry3;
+
+# xmlerror
+ initGenericErrorDefaultFunc;
+ xmlParserError;
+ xmlParserPrintFileContext;
+ xmlParserPrintFileInfo;
+ xmlParserValidityError;
+ xmlParserValidityWarning;
+ xmlParserWarning;
+ xmlSetGenericErrorFunc;
+
+# globals
+ oldXMLWDcompatibility; # variable
+
+# tree
+ xmlAddChild;
+ xmlAddChildList;
+ xmlAddNextSibling;
+ xmlAddPrevSibling;
+ xmlAddSibling;
+ xmlBufferAdd;
+ xmlBufferAddHead;
+
+# globals
+ xmlBufferAllocScheme; # variable
+
+# tree
+ xmlBufferCCat;
+ xmlBufferCat;
+ xmlBufferContent;
+ xmlBufferCreate;
+ xmlBufferCreateSize;
+ xmlBufferDump;
+ xmlBufferEmpty;
+ xmlBufferFree;
+ xmlBufferGrow;
+ xmlBufferLength;
+ xmlBufferResize;
+ xmlBufferSetAllocationScheme;
+ xmlBufferShrink;
+ xmlBufferWriteCHAR;
+ xmlBufferWriteChar;
+ xmlBufferWriteQuotedString;
+ xmlCopyDoc;
+ xmlCopyDtd;
+ xmlCopyNamespace;
+ xmlCopyNamespaceList;
+ xmlCopyNode;
+ xmlCopyNodeList;
+ xmlCopyProp;
+ xmlCopyPropList;
+ xmlCreateIntSubset;
+
+# globals
+ xmlDefaultBufferSize; # variable
+
+# tree
+ xmlDocCopyNode;
+ xmlDocDump;
+ xmlDocDumpFormatMemory;
+ xmlDocDumpFormatMemoryEnc;
+ xmlDocDumpMemory;
+ xmlDocDumpMemoryEnc;
+ xmlDocFormatDump;
+ xmlDocGetRootElement;
+ xmlDocSetRootElement;
+ xmlElemDump;
+ xmlFreeDoc;
+ xmlFreeDtd;
+ xmlFreeNode;
+ xmlFreeNodeList;
+ xmlFreeNs;
+ xmlFreeNsList;
+ xmlFreeProp;
+ xmlFreePropList;
+ xmlGetBufferAllocationScheme;
+ xmlGetCompressMode;
+ xmlGetDocCompressMode;
+ xmlGetIntSubset;
+ xmlGetLastChild;
+ xmlGetLineNo;
+ xmlGetNodePath;
+ xmlGetNsList;
+ xmlGetNsProp;
+ xmlGetProp;
+ xmlHasNsProp;
+ xmlHasProp;
+
+# globals
+ xmlIndentTreeOutput; # variable
+
+# tree
+ xmlIsBlankNode;
+ xmlIsXHTML;
+ xmlNewCDataBlock;
+ xmlNewCharRef;
+ xmlNewChild;
+ xmlNewComment;
+ xmlNewDoc;
+ xmlNewDocComment;
+ xmlNewDocFragment;
+ xmlNewDocNode;
+ xmlNewDocNodeEatName;
+ xmlNewDocProp;
+ xmlNewDocRawNode;
+ xmlNewDocText;
+ xmlNewDocTextLen;
+ xmlNewDtd;
+ xmlNewGlobalNs;
+ xmlNewNode;
+ xmlNewNodeEatName;
+ xmlNewNs;
+ xmlNewNsProp;
+ xmlNewNsPropEatName;
+ xmlNewPI;
+ xmlNewProp;
+ xmlNewReference;
+ xmlNewText;
+ xmlNewTextChild;
+ xmlNewTextLen;
+ xmlNodeAddContent;
+ xmlNodeAddContentLen;
+ xmlNodeDump;
+ xmlNodeDumpOutput;
+ xmlNodeGetBase;
+ xmlNodeGetContent;
+ xmlNodeGetLang;
+ xmlNodeGetSpacePreserve;
+ xmlNodeIsText;
+ xmlNodeListGetRawString;
+ xmlNodeListGetString;
+ xmlNodeSetBase;
+ xmlNodeSetContent;
+ xmlNodeSetContentLen;
+ xmlNodeSetLang;
+ xmlNodeSetName;
+ xmlNodeSetSpacePreserve;
+ xmlReconciliateNs;
+ xmlRemoveProp;
+ xmlReplaceNode;
+ xmlSaveFile;
+ xmlSaveFileEnc;
+ xmlSaveFileTo;
+ xmlSaveFormatFile;
+ xmlSaveFormatFileEnc;
+ xmlSaveFormatFileTo;
+ xmlSearchNs;
+ xmlSearchNsByHref;
+ xmlSetBufferAllocationScheme;
+ xmlSetCompressMode;
+ xmlSetDocCompressMode;
+ xmlSetListDoc;
+ xmlSetNs;
+ xmlSetNsProp;
+ xmlSetProp;
+ xmlSetTreeDoc;
+ xmlStringGetNodeList;
+ xmlStringLenGetNodeList;
+ xmlTextConcat;
+ xmlTextMerge;
+ xmlUnlinkNode;
+ xmlUnsetNsProp;
+ xmlUnsetProp;
+
+# xmlregexp
+ xmlRegExecPushString;
+ xmlRegFreeExecCtxt;
+ xmlRegFreeRegexp;
+ xmlRegNewExecCtxt;
+ xmlRegexpCompile;
+ xmlRegexpExec;
+ xmlRegexpIsDeterminist;
+ xmlRegexpPrint;
+
+# nanohttp
+ xmlNanoHTTPAuthHeader;
+ xmlNanoHTTPCleanup;
+ xmlNanoHTTPClose;
+ xmlNanoHTTPFetch;
+ xmlNanoHTTPInit;
+ xmlNanoHTTPMethod;
+ xmlNanoHTTPMethodRedir;
+ xmlNanoHTTPOpen;
+ xmlNanoHTTPOpenRedir;
+ xmlNanoHTTPRead;
+ xmlNanoHTTPReturnCode;
+ xmlNanoHTTPSave;
+ xmlNanoHTTPScanProxy;
+
+# xmlunicode
+ xmlUCSIsAlphabeticPresentationForms;
+ xmlUCSIsArabic;
+ xmlUCSIsArabicPresentationFormsA;
+ xmlUCSIsArabicPresentationFormsB;
+ xmlUCSIsArmenian;
+ xmlUCSIsArrows;
+ xmlUCSIsBasicLatin;
+ xmlUCSIsBengali;
+ xmlUCSIsBlock;
+ xmlUCSIsBlockElements;
+ xmlUCSIsBopomofo;
+ xmlUCSIsBopomofoExtended;
+ xmlUCSIsBoxDrawing;
+ xmlUCSIsBraillePatterns;
+ xmlUCSIsByzantineMusicalSymbols;
+ xmlUCSIsCJKCompatibility;
+ xmlUCSIsCJKCompatibilityForms;
+ xmlUCSIsCJKCompatibilityIdeographs;
+ xmlUCSIsCJKCompatibilityIdeographsSupplement;
+ xmlUCSIsCJKRadicalsSupplement;
+ xmlUCSIsCJKSymbolsandPunctuation;
+ xmlUCSIsCJKUnifiedIdeographs;
+ xmlUCSIsCJKUnifiedIdeographsExtensionA;
+ xmlUCSIsCJKUnifiedIdeographsExtensionB;
+ xmlUCSIsCat;
+ xmlUCSIsCatC;
+ xmlUCSIsCatCc;
+ xmlUCSIsCatCf;
+ xmlUCSIsCatCo;
+ xmlUCSIsCatCs;
+ xmlUCSIsCatL;
+ xmlUCSIsCatLl;
+ xmlUCSIsCatLm;
+ xmlUCSIsCatLo;
+ xmlUCSIsCatLt;
+ xmlUCSIsCatLu;
+ xmlUCSIsCatM;
+ xmlUCSIsCatMc;
+ xmlUCSIsCatMe;
+ xmlUCSIsCatMn;
+ xmlUCSIsCatN;
+ xmlUCSIsCatNd;
+ xmlUCSIsCatNl;
+ xmlUCSIsCatNo;
+ xmlUCSIsCatP;
+ xmlUCSIsCatPc;
+ xmlUCSIsCatPd;
+ xmlUCSIsCatPe;
+ xmlUCSIsCatPf;
+ xmlUCSIsCatPi;
+ xmlUCSIsCatPo;
+ xmlUCSIsCatPs;
+ xmlUCSIsCatS;
+ xmlUCSIsCatSc;
+ xmlUCSIsCatSk;
+ xmlUCSIsCatSm;
+ xmlUCSIsCatSo;
+ xmlUCSIsCatZ;
+ xmlUCSIsCatZl;
+ xmlUCSIsCatZp;
+ xmlUCSIsCatZs;
+ xmlUCSIsCherokee;
+ xmlUCSIsCombiningDiacriticalMarks;
+ xmlUCSIsCombiningHalfMarks;
+ xmlUCSIsCombiningMarksforSymbols;
+ xmlUCSIsControlPictures;
+ xmlUCSIsCurrencySymbols;
+ xmlUCSIsCyrillic;
+ xmlUCSIsDeseret;
+ xmlUCSIsDevanagari;
+ xmlUCSIsDingbats;
+ xmlUCSIsEnclosedAlphanumerics;
+ xmlUCSIsEnclosedCJKLettersandMonths;
+ xmlUCSIsEthiopic;
+ xmlUCSIsGeneralPunctuation;
+ xmlUCSIsGeometricShapes;
+ xmlUCSIsGeorgian;
+ xmlUCSIsGothic;
+ xmlUCSIsGreek;
+ xmlUCSIsGreekExtended;
+ xmlUCSIsGujarati;
+ xmlUCSIsGurmukhi;
+ xmlUCSIsHalfwidthandFullwidthForms;
+ xmlUCSIsHangulCompatibilityJamo;
+ xmlUCSIsHangulJamo;
+ xmlUCSIsHangulSyllables;
+ xmlUCSIsHebrew;
+ xmlUCSIsHighPrivateUseSurrogates;
+ xmlUCSIsHighSurrogates;
+ xmlUCSIsHiragana;
+ xmlUCSIsIPAExtensions;
+ xmlUCSIsIdeographicDescriptionCharacters;
+ xmlUCSIsKanbun;
+ xmlUCSIsKangxiRadicals;
+ xmlUCSIsKannada;
+ xmlUCSIsKatakana;
+ xmlUCSIsKhmer;
+ xmlUCSIsLao;
+ xmlUCSIsLatin1Supplement;
+ xmlUCSIsLatinExtendedA;
+ xmlUCSIsLatinExtendedAdditional;
+ xmlUCSIsLatinExtendedB;
+ xmlUCSIsLetterlikeSymbols;
+ xmlUCSIsLowSurrogates;
+ xmlUCSIsMalayalam;
+ xmlUCSIsMathematicalAlphanumericSymbols;
+ xmlUCSIsMathematicalOperators;
+ xmlUCSIsMiscellaneousSymbols;
+ xmlUCSIsMiscellaneousTechnical;
+ xmlUCSIsMongolian;
+ xmlUCSIsMusicalSymbols;
+ xmlUCSIsMyanmar;
+ xmlUCSIsNumberForms;
+ xmlUCSIsOgham;
+ xmlUCSIsOldItalic;
+ xmlUCSIsOpticalCharacterRecognition;
+ xmlUCSIsOriya;
+ xmlUCSIsPrivateUse;
+ xmlUCSIsRunic;
+ xmlUCSIsSinhala;
+ xmlUCSIsSmallFormVariants;
+ xmlUCSIsSpacingModifierLetters;
+ xmlUCSIsSpecials;
+ xmlUCSIsSuperscriptsandSubscripts;
+ xmlUCSIsSyriac;
+ xmlUCSIsTags;
+ xmlUCSIsTamil;
+ xmlUCSIsTelugu;
+ xmlUCSIsThaana;
+ xmlUCSIsThai;
+ xmlUCSIsTibetan;
+ xmlUCSIsUnifiedCanadianAboriginalSyllabics;
+ xmlUCSIsYiRadicals;
+ xmlUCSIsYiSyllables;
+
+# uri
+ xmlBuildURI;
+ xmlCreateURI;
+ xmlFreeURI;
+ xmlNormalizeURIPath;
+ xmlParseURI;
+ xmlParseURIReference;
+ xmlPrintURI;
+ xmlSaveUri;
+ xmlURIEscape;
+ xmlURIEscapeStr;
+ xmlURIUnescapeString;
+
+# encoding
+ UTF8Toisolat1;
+ isolat1ToUTF8;
+ xmlAddEncodingAlias;
+ xmlCharEncCloseFunc;
+ xmlCharEncFirstLine;
+ xmlCharEncInFunc;
+ xmlCharEncOutFunc;
+
+# xmlstring
+ xmlCheckUTF8;
+
+# encoding
+ xmlCleanupCharEncodingHandlers;
+ xmlCleanupEncodingAliases;
+ xmlDelEncodingAlias;
+ xmlDetectCharEncoding;
+ xmlFindCharEncodingHandler;
+ xmlGetCharEncodingHandler;
+ xmlGetCharEncodingName;
+ xmlGetEncodingAlias;
+
+# xmlstring
+ xmlGetUTF8Char;
+
+# encoding
+ xmlInitCharEncodingHandlers;
+ xmlNewCharEncodingHandler;
+ xmlParseCharEncoding;
+ xmlRegisterCharEncodingHandler;
+
+# xmlstring
+ xmlUTF8Strlen;
+ xmlUTF8Strloc;
+ xmlUTF8Strndup;
+ xmlUTF8Strpos;
+ xmlUTF8Strsize;
+ xmlUTF8Strsub;
+} ;
+
+LIBXML2_2.5.0 {
+ global:
+
+# globals
+ xmlDeregisterNodeDefault;
+ xmlDeregisterNodeDefaultValue; # variable
+ xmlRegisterNodeDefault;
+ xmlRegisterNodeDefaultValue; # variable
+
+# xmlreader
+ xmlTextReaderClose;
+ xmlTextReaderCurrentDoc;
+ xmlTextReaderCurrentNode;
+ xmlTextReaderGetAttributeNo;
+ xmlTextReaderGetAttributeNs;
+ xmlTextReaderGetAttribute;
+ xmlTextReaderGetParserProp;
+ xmlTextReaderGetRemainder;
+ xmlTextReaderLookupNamespace;
+ xmlTextReaderMoveToAttributeNo;
+ xmlTextReaderMoveToAttributeNs;
+ xmlTextReaderMoveToAttribute;
+ xmlTextReaderMoveToElement;
+ xmlTextReaderMoveToFirstAttribute;
+ xmlTextReaderMoveToNextAttribute;
+ xmlTextReaderNormalization;
+ xmlTextReaderReadAttributeValue;
+ xmlTextReaderReadInnerXml;
+ xmlTextReaderReadOuterXml;
+ xmlTextReaderReadState;
+ xmlTextReaderReadString;
+ xmlTextReaderSetParserProp;
+
+# valid
+ xmlValidatePopElement;
+ xmlValidatePushCData;
+ xmlValidatePushElement;
+} LIBXML2_2.4.30;
+
+LIBXML2_2.5.2 {
+ global:
+
+# tree
+ xmlGetNoNsProp;
+
+# HTMLparser
+ htmlAttrAllowed;
+ htmlElementAllowedHere;
+ htmlElementStatusHere;
+ htmlNodeStatus;
+
+# relaxng
+ xmlRelaxNGCleanupTypes;
+ xmlRelaxNGDump;
+ xmlRelaxNGFreeParserCtxt;
+ xmlRelaxNGFree;
+ xmlRelaxNGFreeValidCtxt;
+ xmlRelaxNGNewMemParserCtxt;
+ xmlRelaxNGNewParserCtxt;
+ xmlRelaxNGNewValidCtxt;
+ xmlRelaxNGParse;
+ xmlRelaxNGSetParserErrors;
+ xmlRelaxNGSetValidErrors;
+ xmlRelaxNGValidateDoc;
+
+# xmlreader
+ xmlTextReaderGetErrorHandler;
+ xmlTextReaderLocatorBaseURI;
+ xmlTextReaderLocatorLineNumber;
+ xmlTextReaderSetErrorHandler;
+
+# relaxng
+# xmlRelaxNGValidateStream; removed in 2.5.5
+} LIBXML2_2.5.0;
+
+LIBXML2_2.5.4 {
+ global:
+
+# uri
+ xmlCanonicPath;
+
+# relaxng
+ xmlRelaxNGDumpTree;
+
+# tree
+ xmlValidateName;
+ xmlValidateNCName;
+ xmlValidateNMToken;
+ xmlValidateQName;
+} LIBXML2_2.5.2;
+
+LIBXML2_2.5.5 {
+ global:
+
+# nanoftp
+ xmlNanoFTPDele;
+} LIBXML2_2.5.4;
+
+LIBXML2_2.5.6 {
+ global:
+
+# xpath
+ xmlXPathOrderDocElems;
+} LIBXML2_2.5.5;
+
+LIBXML2_2.5.7 {
+ global:
+
+# HTMLparser
+ htmlCreateMemoryParserCtxt;
+
+# xmlautomata
+ xmlAutomataNewTransition2;
+
+# tree
+ xmlBuildQName;
+
+# xmlmemory
+ xmlGcMemGet;
+ xmlGcMemSetup;
+
+# globals
+ xmlMallocAtomic; # variable
+
+# xmlregexp
+ xmlRegExecPushString2;
+
+# relaxng
+ xmlRelaxNGNewDocParserCtxt;
+ xmlRelaxNGValidateFullElement;
+ xmlRelaxNGValidatePopElement;
+ xmlRelaxNGValidatePushCData;
+ xmlRelaxNGValidatePushElement;
+
+# xmlreader
+ xmlTextReaderExpand;
+ xmlTextReaderIsValid;
+ xmlTextReaderNext;
+ xmlTextReaderRelaxNGSetSchema;
+ xmlTextReaderRelaxNGValidate;
+} LIBXML2_2.5.6;
+
+LIBXML2_2.5.8 {
+ global:
+
+# globals
+ xmlCleanupGlobals;
+ xmlInitGlobals;
+
+# valid
+ xmlFreeValidCtxt;
+ xmlNewValidCtxt;
+
+# schemasInternals
+ xmlSchemaFreeType;
+
+# xmlschemas
+ xmlSchemaDump;
+ xmlSchemaFreeParserCtxt;
+ xmlSchemaFreeValidCtxt;
+ xmlSchemaFree;
+ xmlSchemaNewMemParserCtxt;
+ xmlSchemaNewParserCtxt;
+ xmlSchemaNewValidCtxt;
+ xmlSchemaParse;
+ xmlSchemaSetParserErrors;
+ xmlSchemaSetValidErrors;
+ xmlSchemaValidateDoc;
+ xmlSchemaValidateStream;
+
+# xmlschemastypes
+ xmlSchemaCheckFacet;
+ xmlSchemaCleanupTypes;
+ xmlSchemaCompareValues;
+ xmlSchemaFreeFacet;
+ xmlSchemaFreeValue;
+ xmlSchemaGetPredefinedType;
+ xmlSchemaInitTypes;
+ xmlSchemaNewFacet;
+ xmlSchemaValidateFacet;
+ xmlSchemaValidatePredefinedType;
+ xmlSchemaValPredefTypeNode;
+
+# globals
+ xmlThrDefBufferAllocScheme;
+ xmlThrDefDefaultBufferSize;
+ xmlThrDefDeregisterNodeDefault;
+ xmlThrDefDoValidityCheckingDefaultValue;
+ xmlThrDefGetWarningsDefaultValue;
+ xmlThrDefIndentTreeOutput;
+ xmlThrDefKeepBlanksDefaultValue;
+ xmlThrDefLineNumbersDefaultValue;
+ xmlThrDefLoadExtDtdDefaultValue;
+ xmlThrDefParserDebugEntities;
+ xmlThrDefPedanticParserDefaultValue;
+ xmlThrDefRegisterNodeDefault;
+ xmlThrDefSaveNoEmptyTags;
+ xmlThrDefSetGenericErrorFunc;
+ xmlThrDefSubstituteEntitiesDefaultValue;
+ xmlThrDefTreeIndentString;
+} LIBXML2_2.5.7;
+
+LIBXML2_2.5.9 {
+ global:
+
+# xmlmemory
+ xmlMallocAtomicLoc;
+
+# relaxng
+ xmlRelaxNGGetParserErrors;
+ xmlRelaxNGGetValidErrors;
+
+# tree
+ xmlSplitQName3;
+
+# xmlstring
+ xmlUTF8Charcmp;
+ xmlUTF8Size;
+
+# xinclude
+ xmlXIncludeProcessTree;
+} LIBXML2_2.5.8;
+
+LIBXML2_2.6.0 {
+ global:
+
+# SAX2
+ xmlSAX2AttributeDecl;
+ xmlSAX2CDataBlock;
+ xmlSAX2Characters;
+ xmlSAX2Comment;
+ xmlSAX2ElementDecl;
+ xmlSAX2EndDocument;
+ xmlSAX2EndElementNs;
+ xmlSAX2EndElement;
+ xmlSAX2EntityDecl;
+ xmlSAX2ExternalSubset;
+ xmlSAX2GetColumnNumber;
+ xmlSAX2GetEntity;
+ xmlSAX2GetLineNumber;
+ xmlSAX2GetParameterEntity;
+ xmlSAX2GetPublicId;
+ xmlSAX2GetSystemId;
+ xmlSAX2HasExternalSubset;
+ xmlSAX2HasInternalSubset;
+ xmlSAX2IgnorableWhitespace;
+ xmlSAX2InitDefaultSAXHandler;
+ xmlSAX2InitDocbDefaultSAXHandler;
+ xmlSAX2InitHtmlDefaultSAXHandler;
+ xmlSAX2InternalSubset;
+ xmlSAX2IsStandalone;
+ xmlSAX2NotationDecl;
+ xmlSAX2ProcessingInstruction;
+ xmlSAX2Reference;
+ xmlSAX2ResolveEntity;
+ xmlSAX2SetDocumentLocator;
+ xmlSAX2StartDocument;
+ xmlSAX2StartElementNs;
+ xmlSAX2StartElement;
+ xmlSAX2UnparsedEntityDecl;
+ xmlSAXDefaultVersion;
+ xmlSAXVersion;
+
+# HTMLparser
+ htmlCtxtReadDoc;
+ htmlCtxtReadFd;
+ htmlCtxtReadFile;
+ htmlCtxtReadIO;
+ htmlCtxtReadMemory;
+ htmlCtxtReset;
+ htmlCtxtUseOptions;
+ htmlReadDoc;
+ htmlReadFd;
+ htmlReadFile;
+ htmlReadIO;
+ htmlReadMemory;
+
+# tree
+ xmlBufferCreateStatic;
+
+# chvalid
+ xmlCharInRange;
+
+# xmlIO
+ xmlCheckHTTPInput;
+
+# xmlerror
+ xmlCopyError;
+ xmlCtxtGetLastError;
+ xmlGetLastError;
+ xmlResetError;
+ xmlResetLastError;
+ xmlSetStructuredErrorFunc;
+
+# parser
+ xmlCtxtReadDoc;
+ xmlCtxtReadFd;
+ xmlCtxtReadFile;
+ xmlCtxtReadIO;
+ xmlCtxtReadMemory;
+
+# xmlerror
+ xmlCtxtResetLastError;
+
+# parser
+ xmlCtxtReset;
+ xmlCtxtUseOptions;
+ xmlReadDoc;
+ xmlReadFd;
+ xmlReadFile;
+ xmlReadIO;
+ xmlReadMemory;
+
+# xmlstring
+ xmlStrPrintf;
+ xmlStrQEqual;
+
+# dict
+ xmlDictCreate;
+ xmlDictFree;
+ xmlDictLookup;
+ xmlDictOwns;
+ xmlDictQLookup;
+ xmlDictReference;
+ xmlDictSize;
+
+# parserInternals
+ xmlErrMemory;
+ xmlParserMaxDepth; # variable
+ xmlStringLenDecodeEntities;
+ xmlSwitchInputEncoding;
+
+# xmlwriter
+ xmlFreeTextWriter;
+ xmlNewTextWriterFilename;
+ xmlNewTextWriterMemory;
+ xmlNewTextWriter;
+ xmlTextWriterEndAttribute;
+ xmlTextWriterEndCDATA;
+ xmlTextWriterEndDocument;
+ xmlTextWriterEndDTD;
+ xmlTextWriterEndElement;
+ xmlTextWriterEndPI;
+ xmlTextWriterFlush;
+ xmlTextWriterFullEndElement;
+ xmlTextWriterStartAttributeNS;
+ xmlTextWriterStartAttribute;
+ xmlTextWriterStartCDATA;
+ xmlTextWriterStartDocument;
+ xmlTextWriterStartDTDAttlist;
+ xmlTextWriterStartDTDElement;
+ xmlTextWriterStartDTDEntity;
+ xmlTextWriterStartDTD;
+ xmlTextWriterStartElementNS;
+ xmlTextWriterStartElement;
+ xmlTextWriterStartPI;
+ xmlTextWriterWriteAttributeNS;
+ xmlTextWriterWriteAttribute;
+ xmlTextWriterWriteBase64;
+ xmlTextWriterWriteBinHex;
+ xmlTextWriterWriteCDATA;
+ xmlTextWriterWriteComment;
+ xmlTextWriterWriteDTDAttlist;
+ xmlTextWriterWriteDTDElement;
+ xmlTextWriterWriteDTDEntity;
+ xmlTextWriterWriteDTDExternalEntity;
+ xmlTextWriterWriteDTDInternalEntity;
+ xmlTextWriterWriteDTDNotation;
+ xmlTextWriterWriteDTD;
+ xmlTextWriterWriteElementNS;
+ xmlTextWriterWriteElement;
+ xmlTextWriterWriteFormatAttributeNS;
+ xmlTextWriterWriteFormatAttribute;
+ xmlTextWriterWriteFormatCDATA;
+ xmlTextWriterWriteFormatComment;
+ xmlTextWriterWriteFormatDTDAttlist;
+ xmlTextWriterWriteFormatDTDElement;
+ xmlTextWriterWriteFormatDTDInternalEntity;
+ xmlTextWriterWriteFormatDTD;
+ xmlTextWriterWriteFormatElementNS;
+ xmlTextWriterWriteFormatElement;
+ xmlTextWriterWriteFormatPI;
+ xmlTextWriterWriteFormatRaw;
+ xmlTextWriterWriteFormatString;
+ xmlTextWriterWritePI;
+ xmlTextWriterWriteRawLen;
+ xmlTextWriterWriteRaw;
+ xmlTextWriterWriteString;
+ xmlTextWriterWriteVFormatAttributeNS;
+ xmlTextWriterWriteVFormatAttribute;
+ xmlTextWriterWriteVFormatCDATA;
+ xmlTextWriterWriteVFormatComment;
+ xmlTextWriterWriteVFormatDTDAttlist;
+ xmlTextWriterWriteVFormatDTDElement;
+ xmlTextWriterWriteVFormatDTDInternalEntity;
+ xmlTextWriterWriteVFormatDTD;
+ xmlTextWriterWriteVFormatElementNS;
+ xmlTextWriterWriteVFormatElement;
+ xmlTextWriterWriteVFormatPI;
+ xmlTextWriterWriteVFormatRaw;
+ xmlTextWriterWriteVFormatString;
+
+# hash
+ xmlHashQLookup2;
+ xmlHashQLookup3;
+ xmlHashQLookup;
+
+# chvalid
+ xmlIsBaseCharGroup; # variable
+ xmlIsCharGroup; # variable
+ xmlIsCombiningGroup; # variable
+ xmlIsDigitGroup; # variable
+ xmlIsExtenderGroup; # variable
+ xmlIsIdeographicGroup; # variable
+ xmlIsPubidChar_tab; # variable
+
+# globals
+ xmlLastError; # variable
+
+# nanohttp
+ xmlNanoHTTPEncoding;
+ xmlNanoHTTPMimeType;
+ xmlNanoHTTPRedir;
+
+# tree
+ xmlNodeBufGetContent;
+
+# xmlIO
+ xmlParserInputBufferCreateStatic;
+
+# xmlreader
+ xmlReaderForDoc;
+ xmlReaderForFd;
+ xmlReaderForFile;
+ xmlReaderForIO;
+ xmlReaderForMemory;
+ xmlReaderNewDoc;
+ xmlReaderNewFd;
+ xmlReaderNewFile;
+ xmlReaderNewIO;
+ xmlReaderNewMemory;
+ xmlReaderNewWalker;
+ xmlReaderWalker;
+ xmlTextReaderConstBaseUri;
+ xmlTextReaderConstLocalName;
+ xmlTextReaderConstNamespaceUri;
+ xmlTextReaderConstName;
+ xmlTextReaderConstPrefix;
+ xmlTextReaderConstString;
+ xmlTextReaderConstValue;
+ xmlTextReaderConstXmlLang;
+ xmlTextReaderNextSibling;
+ xmlTextReaderPreserve;
+
+# globals
+ xmlStructuredError; # variable
+ xmlThrDefSetStructuredErrorFunc;
+
+# xpathInternals
+ xmlXPathErr;
+
+# SAX2
+# xmlSAX2CheckNamespace; removed in 2.6.10
+# xmlSAX2GetNamespace; removed in 2.6.10
+# xmlSAX2GlobalNamespace; removed in 2.6.10
+# xmlSAX2NamespaceDecl; removed in 2.6.10
+# xmlSAX2SetNamespace; removed in 2.6.10
+} LIBXML2_2.5.9;
+
+LIBXML2_2.6.1 {
+ global:
+
+# parser
+ xmlCtxtResetPush;
+} LIBXML2_2.6.0;
+
+LIBXML2_2.6.2 {
+ global:
+
+# parserInternals
+ xmlCreateURLParserCtxt;
+
+# xmlschemas
+ xmlSchemaNewDocParserCtxt;
+
+# xmlstring
+ xmlStrVPrintf;
+
+# xinclude
+ xmlXIncludeFreeContext;
+ xmlXIncludeNewContext;
+ xmlXIncludeProcessNode;
+} LIBXML2_2.6.1;
+
+LIBXML2_2.6.3 {
+ global:
+
+# pattern
+ xmlFreePatternList;
+ xmlFreePattern;
+ xmlPatterncompile;
+ xmlPatternMatch;
+
+# xmlwriter
+ xmlNewTextWriterDoc;
+ xmlNewTextWriterPushParser;
+ xmlNewTextWriterTree;
+
+# xmlreader
+ xmlTextReaderPreservePattern;
+
+# xmlunicode
+ xmlUCSIsAegeanNumbers;
+ xmlUCSIsBuhid;
+ xmlUCSIsCombiningDiacriticalMarksforSymbols;
+ xmlUCSIsCypriotSyllabary;
+ xmlUCSIsCyrillicSupplement;
+ xmlUCSIsGreekandCoptic;
+ xmlUCSIsHanunoo;
+ xmlUCSIsKatakanaPhoneticExtensions;
+ xmlUCSIsKhmerSymbols;
+ xmlUCSIsLimbu;
+ xmlUCSIsLinearBIdeograms;
+ xmlUCSIsLinearBSyllabary;
+ xmlUCSIsMiscellaneousMathematicalSymbolsA;
+ xmlUCSIsMiscellaneousMathematicalSymbolsB;
+ xmlUCSIsMiscellaneousSymbolsandArrows;
+ xmlUCSIsOsmanya;
+ xmlUCSIsPhoneticExtensions;
+ xmlUCSIsPrivateUseArea;
+ xmlUCSIsShavian;
+ xmlUCSIsSupplementalArrowsA;
+ xmlUCSIsSupplementalArrowsB;
+ xmlUCSIsSupplementalMathematicalOperators;
+ xmlUCSIsSupplementaryPrivateUseAreaA;
+ xmlUCSIsSupplementaryPrivateUseAreaB;
+ xmlUCSIsTagalog;
+ xmlUCSIsTagbanwa;
+ xmlUCSIsTaiLe;
+ xmlUCSIsTaiXuanJingSymbols;
+ xmlUCSIsUgaritic;
+ xmlUCSIsVariationSelectorsSupplement;
+ xmlUCSIsVariationSelectors;
+ xmlUCSIsYijingHexagramSymbols;
+
+# xinclude
+ xmlXIncludeProcessFlags;
+ xmlXIncludeProcessTreeFlags;
+ xmlXIncludeSetFlags;
+} LIBXML2_2.6.2;
+
+LIBXML2_2.6.5 {
+ global:
+
+# xmlmemory
+ xmlCleanupMemory;
+
+# dict
+ xmlDictCreateSub;
+
+# relaxng
+ xmlRelaxParserSetFlag;
+
+# xmlstring
+ xmlStrncatNew;
+
+# xmlwriter
+ xmlTextWriterSetIndentString;
+ xmlTextWriterSetIndent;
+
+# xpath
+ xmlXPathCtxtCompile;
+} LIBXML2_2.6.3;
+
+LIBXML2_2.6.6 {
+ global:
+
+# tree
+ xmlAttrSerializeTxtContent;
+
+# parser
+ xmlByteConsumed;
+
+# xmlreader
+ xmlTextReaderSetStructuredErrorHandler;
+} LIBXML2_2.6.5;
+
+LIBXML2_2.6.7 {
+ global:
+
+# xmlwriter
+ xmlTextWriterEndComment;
+ xmlTextWriterStartComment;
+} LIBXML2_2.6.6;
+
+LIBXML2_2.6.8 {
+ global:
+
+# xmlsave
+ xmlSaveClose;
+ xmlSaveDoc;
+ xmlSaveFlush;
+ xmlSaveToFd;
+ xmlSaveToFilename;
+ xmlSaveToIO;
+ xmlSaveTree;
+
+# xmlwriter
+ xmlTextWriterEndDTDAttlist;
+ xmlTextWriterEndDTDElement;
+ xmlTextWriterEndDTDEntity;
+ xmlTextWriterWriteDTDExternalEntityContents;
+} LIBXML2_2.6.7;
+
+LIBXML2_2.6.10 {
+ global:
+
+# xmlIO
+ xmlOutputBufferWriteEscape;
+ xmlPopInputCallbacks;
+
+# xmlsave
+ xmlSaveSetAttrEscape;
+ xmlSaveSetEscape;
+} LIBXML2_2.6.8;
+
+LIBXML2_2.6.11 {
+ global:
+
+# uri
+ xmlBuildRelativeURI;
+
+# globals
+ xmlOutputBufferCreateFilenameDefault;
+ xmlOutputBufferCreateFilenameValue; # variable
+ xmlParserInputBufferCreateFilenameDefault;
+ xmlParserInputBufferCreateFilenameValue; # variable
+ xmlThrDefOutputBufferCreateFilenameDefault;
+ xmlThrDefParserInputBufferCreateFilenameDefault;
+
+# schemasInternals
+ xmlSchemaFreeWildcard;
+
+# xmlschemastypes
+ xmlSchemaCollapseString;
+ xmlSchemaGetBuiltInListSimpleTypeItemType;
+ xmlSchemaGetBuiltInType;
+ xmlSchemaIsBuiltInTypeFacet;
+ xmlSchemaValidateListSimpleTypeFacet;
+} LIBXML2_2.6.10;
+
+LIBXML2_2.6.12 {
+ global:
+
+# parser
+ xmlParseInNodeContext;
+
+# xmlschemastypes
+ xmlSchemaGetFacetValueAsULong;
+ xmlSchemaValidateLengthFacet;
+ xmlSchemaValPredefTypeNodeNoNorm;
+
+# xmlschemas
+ xmlSchemaGetParserErrors;
+ xmlSchemaGetValidErrors;
+} LIBXML2_2.6.11;
+
+LIBXML2_2.6.14 {
+ global:
+
+# xmlautomata
+ xmlAutomataNewCountTrans2;
+ xmlAutomataNewOnceTrans2;
+
+# nanohttp
+ xmlNanoHTTPContentLength;
+
+# xmlschemas
+ xmlSchemaSetValidOptions;
+ xmlSchemaValidateOneElement;
+ xmlSchemaValidCtxtGetOptions;
+} LIBXML2_2.6.12;
+
+LIBXML2_2.6.15 {
+ global:
+
+# debugXML
+ xmlDebugCheckDocument;
+
+# tree
+ xmlDocCopyNodeList;
+ xmlNewDocPI;
+
+# xmlreader
+ xmlTextReaderConstEncoding;
+ xmlTextReaderConstXmlVersion;
+ xmlTextReaderIsNamespaceDecl;
+ xmlTextReaderStandalone;
+} LIBXML2_2.6.14;
+
+LIBXML2_2.6.16 {
+ global:
+
+# xmlmemory
+ xmlMemBlocks;
+
+# relaxng
+ xmlRelaxNGInitTypes;
+} LIBXML2_2.6.15;
+
+LIBXML2_2.6.17 {
+ global:
+
+# dict
+ xmlDictExists;
+
+# xmlmodule
+ xmlModuleClose;
+ xmlModuleFree;
+ xmlModuleOpen;
+ xmlModuleSymbol;
+
+# xmlregexp
+ xmlRegExecErrInfo;
+ xmlRegExecNextValues;
+
+# xmlschemastypes
+ xmlSchemaWhiteSpaceReplace;
+
+# xmlreader
+ xmlTextReaderGetParserColumnNumber;
+ xmlTextReaderGetParserLineNumber;
+} LIBXML2_2.6.16;
+
+LIBXML2_2.6.18 {
+ global:
+
+# valid
+ xmlCopyDocElementContent;
+ xmlFreeDocElementContent;
+ xmlNewDocElementContent;
+
+# dict
+ xmlDictCleanup;
+
+# hash
+ xmlHashCreateDict;
+
+# pattern
+ xmlFreeStreamCtxt;
+ xmlPatternFromRoot;
+ xmlPatternGetStreamCtxt;
+ xmlPatternMaxDepth;
+ xmlPatternStreamable;
+ xmlStreamPop;
+ xmlStreamPushAttr;
+ xmlStreamPush;
+
+# xmlschemastypes
+ xmlSchemaCompareValuesWhtsp;
+ xmlSchemaCopyValue;
+ xmlSchemaGetCanonValue;
+ xmlSchemaNewNOTATIONValue;
+ xmlSchemaNewStringValue;
+
+# xmlreader
+ xmlTextReaderByteConsumed;
+} LIBXML2_2.6.17;
+
+LIBXML2_2.6.19 {
+ global:
+
+# xmlschemastypes
+ xmlSchemaGetValType;
+ xmlSchemaValidateFacetWhtsp;
+ xmlSchemaValidateLengthFacetWhtsp;
+} LIBXML2_2.6.18;
+
+LIBXML2_2.6.20 {
+ global:
+
+# tree
+ xmlDOMWrapAdoptNode;
+ xmlDOMWrapFreeCtxt;
+ xmlDOMWrapNewCtxt;
+ xmlDOMWrapReconcileNamespaces;
+ xmlDOMWrapRemoveNode;
+
+# xmlschemastypes
+ xmlSchemaGetCanonValueWhtsp;
+ xmlSchemaNewQNameValue;
+ xmlSchemaValueAppend;
+ xmlSchemaValueGetAsBoolean;
+ xmlSchemaValueGetAsString;
+ xmlSchemaValueGetNext;
+
+# xmlschemas
+ xmlSchemaIsValid;
+ xmlSchemaSAXPlug;
+ xmlSchemaSAXUnplug;
+ xmlSchemaValidateFile;
+
+# xmlreader
+ xmlTextReaderSchemaValidate;
+ xmlTextReaderSetSchema;
+} LIBXML2_2.6.19;
+
+LIBXML2_2.6.21 {
+ global:
+
+# xmlautomata
+ xmlAutomataNewNegTrans;
+
+# xmlregexp
+ emptyExp; # variable
+ forbiddenExp; # variable
+ xmlExpCtxtNbCons;
+ xmlExpCtxtNbNodes;
+ xmlExpDump;
+ xmlExpExpDerive;
+ xmlExpFreeCtxt;
+ xmlExpFree;
+ xmlExpGetLanguage;
+ xmlExpGetStart;
+ xmlExpIsNillable;
+ xmlExpMaxToken;
+ xmlExpNewAtom;
+ xmlExpNewCtxt;
+ xmlExpNewOr;
+ xmlExpNewRange;
+ xmlExpNewSeq;
+ xmlExpParse;
+ xmlExpRef;
+ xmlExpStringDerive;
+ xmlExpSubsume;
+
+# parser
+ xmlHasFeature;
+
+# uri
+ xmlParseURIRaw;
+
+# pattern
+ xmlPatternMinDepth;
+
+# relaxng
+ xmlRelaxNGSetValidStructuredErrors;
+
+# xmlschemas
+ xmlSchemaSetValidStructuredErrors;
+
+# schematron
+ xmlSchematronFreeParserCtxt;
+ xmlSchematronFree;
+ xmlSchematronFreeValidCtxt;
+ xmlSchematronNewDocParserCtxt;
+ xmlSchematronNewMemParserCtxt;
+ xmlSchematronNewParserCtxt;
+ xmlSchematronNewValidCtxt;
+ xmlSchematronParse;
+ xmlSchematronValidateDoc;
+} LIBXML2_2.6.20;
+
+LIBXML2_2.6.23 {
+ global:
+
+# HTMLtree
+ htmlDocDumpMemoryFormat;
+
+# xmlIO
+ xmlOutputBufferCreateBuffer;
+
+# xmlsave
+ xmlSaveToBuffer;# suppressed in 2.6.11, readded in 2.6.23
+
+
+# xmlschemas
+ xmlSchemaSetParserStructuredErrors;
+
+# pattern
+ xmlStreamPushNode;
+ xmlStreamWantsAnyNode;
+
+# xmlreader
+ xmlTextReaderSchemaValidateCtxt;
+} LIBXML2_2.6.21;
+
+LIBXML2_2.6.24 {
+ global:
+
+# tree
+ xmlDOMWrapCloneNode;
+
+# relaxng
+ xmlRelaxNGSetParserStructuredErrors;
+} LIBXML2_2.6.23;
+
+LIBXML2_2.6.25 {
+ global:
+
+# xpath
+ xmlXPathContextSetCache;
+} LIBXML2_2.6.24;
+
+LIBXML2_2.6.27 {
+ global:
+
+# HTMLparser
+ htmlNewParserCtxt;
+
+# uri
+ xmlPathToURI;
+
+# xinclude
+ xmlXIncludeProcessFlagsData;
+
+# xpath
+ xmlXPathCompiledEvalToBoolean;
+} LIBXML2_2.6.25;
+
+LIBXML2_2.6.28 {
+ global:
+
+# xmlreader
+ xmlTextReaderSetup;
+} LIBXML2_2.6.27;
+
+LIBXML2_2.6.29 {
+ global:
+
+# threads
+ xmlDllMain;
+} LIBXML2_2.6.28;
+
+LIBXML2_2.6.32 {
+ global:
+
+# schematron
+ xmlSchematronSetValidStructuredErrors;
+} LIBXML2_2.6.29;
+
+LIBXML2_2.7.0 {
+ global:
+
+# xmlmemory
+ xmlMemDisplayLast;
+
+# entities
+ xmlNewEntity;
+
+# xmlschemas
+ xmlSchemaValidCtxtGetParserCtxt;
+} LIBXML2_2.6.32;
+
+LIBXML2_2.7.3 {
+ global:
+
+# tree
+ xmlChildElementCount;
+ xmlFirstElementChild;
+ xmlLastElementChild;
+ xmlNextElementSibling;
+ xmlPreviousElementSibling;
+} LIBXML2_2.7.0;
+
+LIBXML2_2.7.4 {
+ global:
+
+# globals
+ xmlStructuredErrorContext; # variable
+
+# xinclude
+ xmlXIncludeProcessTreeFlagsData;
+} LIBXML2_2.7.3;
+
+LIBXML2_2.8.0 {
+ global:
+
+# xmlreader
+ xmlTextReaderRelaxNGValidateCtxt;
+
+# tree
+ xmlBufferDetach;
+
+# dict
+ xmlInitializeDict;
+} LIBXML2_2.7.4;
+
+LIBXML2_2.9.0 {
+ global:
+
+# tree
+ xmlBufContent;
+ xmlBufEnd;
+ xmlBufGetNodeContent;
+ xmlBufNodeDump;
+ xmlBufShrink;
+ xmlBufUse;
+
+# dict
+ xmlDictGetUsage;
+ xmlDictSetLimit;
+
+# xmlschemas
+ xmlSchemaValidateSetFilename;
+ xmlSchemaValidateSetLocator;
+
+# xmlIO
+ xmlOutputBufferGetContent;
+ xmlOutputBufferGetSize;
+
+# xmlwriter
+ xmlTextWriterSetQuoteChar;
+} LIBXML2_2.8.0;
+
+LIBXML2_2.9.1 {
+ global:
+
+# xpath
+ xmlXPathNodeEval;
+ xmlXPathSetContextNode;
+} LIBXML2_2.9.0;
+
diff --git a/libxml2_2.9.2+dfsg1.orig.tar.xz.delta b/libxml2_2.9.2+dfsg1.orig.tar.xz.delta
new file mode 100644
index 0000000..511940a
--- /dev/null
+++ b/libxml2_2.9.2+dfsg1.orig.tar.xz.delta
Binary files differ
diff --git a/libxml2_2.9.2+dfsg1.orig.tar.xz.id b/libxml2_2.9.2+dfsg1.orig.tar.xz.id
new file mode 100644
index 0000000..f1dcaa5
--- /dev/null
+++ b/libxml2_2.9.2+dfsg1.orig.tar.xz.id
@@ -0,0 +1 @@
+b022967f880b7fb1e56c8cc4c3f200d6ffbc9efd
diff --git a/list.c b/list.c
new file mode 100644
index 0000000..d33d928
--- /dev/null
+++ b/list.c
@@ -0,0 +1,779 @@
+/*
+ * list.c: lists handling implementation
+ *
+ * Copyright (C) 2000 Gary Pennington and Daniel Veillard.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ * Author: Gary.Pennington@uk.sun.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/list.h>
+#include <libxml/globals.h>
+
+/*
+ * Type definition are kept internal
+ */
+
+struct _xmlLink
+{
+ struct _xmlLink *next;
+ struct _xmlLink *prev;
+ void *data;
+};
+
+struct _xmlList
+{
+ xmlLinkPtr sentinel;
+ void (*linkDeallocator)(xmlLinkPtr );
+ int (*linkCompare)(const void *, const void*);
+};
+
+/************************************************************************
+ * *
+ * Interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlLinkDeallocator:
+ * @l: a list
+ * @lk: a link
+ *
+ * Unlink and deallocate @lk from list @l
+ */
+static void
+xmlLinkDeallocator(xmlListPtr l, xmlLinkPtr lk)
+{
+ (lk->prev)->next = lk->next;
+ (lk->next)->prev = lk->prev;
+ if(l->linkDeallocator)
+ l->linkDeallocator(lk);
+ xmlFree(lk);
+}
+
+/**
+ * xmlLinkCompare:
+ * @data0: first data
+ * @data1: second data
+ *
+ * Compares two arbitrary data
+ *
+ * Returns -1, 0 or 1 depending on whether data1 is greater equal or smaller
+ * than data0
+ */
+static int
+xmlLinkCompare(const void *data0, const void *data1)
+{
+ if (data0 < data1)
+ return (-1);
+ else if (data0 == data1)
+ return (0);
+ return (1);
+}
+
+/**
+ * xmlListLowerSearch:
+ * @l: a list
+ * @data: a data
+ *
+ * Search data in the ordered list walking from the beginning
+ *
+ * Returns the link containing the data or NULL
+ */
+static xmlLinkPtr
+xmlListLowerSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+
+ if (l == NULL)
+ return(NULL);
+ for(lk = l->sentinel->next;lk != l->sentinel && l->linkCompare(lk->data, data) <0 ;lk = lk->next);
+ return lk;
+}
+
+/**
+ * xmlListHigherSearch:
+ * @l: a list
+ * @data: a data
+ *
+ * Search data in the ordered list walking backward from the end
+ *
+ * Returns the link containing the data or NULL
+ */
+static xmlLinkPtr
+xmlListHigherSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+
+ if (l == NULL)
+ return(NULL);
+ for(lk = l->sentinel->prev;lk != l->sentinel && l->linkCompare(lk->data, data) >0 ;lk = lk->prev);
+ return lk;
+}
+
+/**
+ * xmlListSearch:
+ * @l: a list
+ * @data: a data
+ *
+ * Search data in the list
+ *
+ * Returns the link containing the data or NULL
+ */
+static xmlLinkPtr
+xmlListLinkSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+ if (l == NULL)
+ return(NULL);
+ lk = xmlListLowerSearch(l, data);
+ if (lk == l->sentinel)
+ return NULL;
+ else {
+ if (l->linkCompare(lk->data, data) ==0)
+ return lk;
+ return NULL;
+ }
+}
+
+/**
+ * xmlListLinkReverseSearch:
+ * @l: a list
+ * @data: a data
+ *
+ * Search data in the list processing backward
+ *
+ * Returns the link containing the data or NULL
+ */
+static xmlLinkPtr
+xmlListLinkReverseSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+ if (l == NULL)
+ return(NULL);
+ lk = xmlListHigherSearch(l, data);
+ if (lk == l->sentinel)
+ return NULL;
+ else {
+ if (l->linkCompare(lk->data, data) ==0)
+ return lk;
+ return NULL;
+ }
+}
+
+/**
+ * xmlListCreate:
+ * @deallocator: an optional deallocator function
+ * @compare: an optional comparison function
+ *
+ * Create a new list
+ *
+ * Returns the new list or NULL in case of error
+ */
+xmlListPtr
+xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
+{
+ xmlListPtr l;
+ if (NULL == (l = (xmlListPtr )xmlMalloc( sizeof(xmlList)))) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for list");
+ return (NULL);
+ }
+ /* Initialize the list to NULL */
+ memset(l, 0, sizeof(xmlList));
+
+ /* Add the sentinel */
+ if (NULL ==(l->sentinel = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for sentinel");
+ xmlFree(l);
+ return (NULL);
+ }
+ l->sentinel->next = l->sentinel;
+ l->sentinel->prev = l->sentinel;
+ l->sentinel->data = NULL;
+
+ /* If there is a link deallocator, use it */
+ if (deallocator != NULL)
+ l->linkDeallocator = deallocator;
+ /* If there is a link comparator, use it */
+ if (compare != NULL)
+ l->linkCompare = compare;
+ else /* Use our own */
+ l->linkCompare = xmlLinkCompare;
+ return l;
+}
+
+/**
+ * xmlListSearch:
+ * @l: a list
+ * @data: a search value
+ *
+ * Search the list for an existing value of @data
+ *
+ * Returns the value associated to @data or NULL in case of error
+ */
+void *
+xmlListSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+ if (l == NULL)
+ return(NULL);
+ lk = xmlListLinkSearch(l, data);
+ if (lk)
+ return (lk->data);
+ return NULL;
+}
+
+/**
+ * xmlListReverseSearch:
+ * @l: a list
+ * @data: a search value
+ *
+ * Search the list in reverse order for an existing value of @data
+ *
+ * Returns the value associated to @data or NULL in case of error
+ */
+void *
+xmlListReverseSearch(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+ if (l == NULL)
+ return(NULL);
+ lk = xmlListLinkReverseSearch(l, data);
+ if (lk)
+ return (lk->data);
+ return NULL;
+}
+
+/**
+ * xmlListInsert:
+ * @l: a list
+ * @data: the data
+ *
+ * Insert data in the ordered list at the beginning for this value
+ *
+ * Returns 0 in case of success, 1 in case of failure
+ */
+int
+xmlListInsert(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lkPlace, lkNew;
+
+ if (l == NULL)
+ return(1);
+ lkPlace = xmlListLowerSearch(l, data);
+ /* Add the new link */
+ lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
+ if (lkNew == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for new link");
+ return (1);
+ }
+ lkNew->data = data;
+ lkPlace = lkPlace->prev;
+ lkNew->next = lkPlace->next;
+ (lkPlace->next)->prev = lkNew;
+ lkPlace->next = lkNew;
+ lkNew->prev = lkPlace;
+ return 0;
+}
+
+/**
+ * xmlListAppend:
+ * @l: a list
+ * @data: the data
+ *
+ * Insert data in the ordered list at the end for this value
+ *
+ * Returns 0 in case of success, 1 in case of failure
+ */
+int xmlListAppend(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lkPlace, lkNew;
+
+ if (l == NULL)
+ return(1);
+ lkPlace = xmlListHigherSearch(l, data);
+ /* Add the new link */
+ lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
+ if (lkNew == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for new link");
+ return (1);
+ }
+ lkNew->data = data;
+ lkNew->next = lkPlace->next;
+ (lkPlace->next)->prev = lkNew;
+ lkPlace->next = lkNew;
+ lkNew->prev = lkPlace;
+ return 0;
+}
+
+/**
+ * xmlListDelete:
+ * @l: a list
+ *
+ * Deletes the list and its associated data
+ */
+void xmlListDelete(xmlListPtr l)
+{
+ if (l == NULL)
+ return;
+
+ xmlListClear(l);
+ xmlFree(l->sentinel);
+ xmlFree(l);
+}
+
+/**
+ * xmlListRemoveFirst:
+ * @l: a list
+ * @data: list data
+ *
+ * Remove the first instance associated to data in the list
+ *
+ * Returns 1 if a deallocation occured, or 0 if not found
+ */
+int
+xmlListRemoveFirst(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+
+ if (l == NULL)
+ return(0);
+ /*Find the first instance of this data */
+ lk = xmlListLinkSearch(l, data);
+ if (lk != NULL) {
+ xmlLinkDeallocator(l, lk);
+ return 1;
+ }
+ return 0;
+}
+
+/**
+ * xmlListRemoveLast:
+ * @l: a list
+ * @data: list data
+ *
+ * Remove the last instance associated to data in the list
+ *
+ * Returns 1 if a deallocation occured, or 0 if not found
+ */
+int
+xmlListRemoveLast(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lk;
+
+ if (l == NULL)
+ return(0);
+ /*Find the last instance of this data */
+ lk = xmlListLinkReverseSearch(l, data);
+ if (lk != NULL) {
+ xmlLinkDeallocator(l, lk);
+ return 1;
+ }
+ return 0;
+}
+
+/**
+ * xmlListRemoveAll:
+ * @l: a list
+ * @data: list data
+ *
+ * Remove the all instance associated to data in the list
+ *
+ * Returns the number of deallocation, or 0 if not found
+ */
+int
+xmlListRemoveAll(xmlListPtr l, void *data)
+{
+ int count=0;
+
+ if (l == NULL)
+ return(0);
+
+ while(xmlListRemoveFirst(l, data))
+ count++;
+ return count;
+}
+
+/**
+ * xmlListClear:
+ * @l: a list
+ *
+ * Remove the all data in the list
+ */
+void
+xmlListClear(xmlListPtr l)
+{
+ xmlLinkPtr lk;
+
+ if (l == NULL)
+ return;
+ lk = l->sentinel->next;
+ while(lk != l->sentinel) {
+ xmlLinkPtr next = lk->next;
+
+ xmlLinkDeallocator(l, lk);
+ lk = next;
+ }
+}
+
+/**
+ * xmlListEmpty:
+ * @l: a list
+ *
+ * Is the list empty ?
+ *
+ * Returns 1 if the list is empty, 0 if not empty and -1 in case of error
+ */
+int
+xmlListEmpty(xmlListPtr l)
+{
+ if (l == NULL)
+ return(-1);
+ return (l->sentinel->next == l->sentinel);
+}
+
+/**
+ * xmlListFront:
+ * @l: a list
+ *
+ * Get the first element in the list
+ *
+ * Returns the first element in the list, or NULL
+ */
+xmlLinkPtr
+xmlListFront(xmlListPtr l)
+{
+ if (l == NULL)
+ return(NULL);
+ return (l->sentinel->next);
+}
+
+/**
+ * xmlListEnd:
+ * @l: a list
+ *
+ * Get the last element in the list
+ *
+ * Returns the last element in the list, or NULL
+ */
+xmlLinkPtr
+xmlListEnd(xmlListPtr l)
+{
+ if (l == NULL)
+ return(NULL);
+ return (l->sentinel->prev);
+}
+
+/**
+ * xmlListSize:
+ * @l: a list
+ *
+ * Get the number of elements in the list
+ *
+ * Returns the number of elements in the list or -1 in case of error
+ */
+int
+xmlListSize(xmlListPtr l)
+{
+ xmlLinkPtr lk;
+ int count=0;
+
+ if (l == NULL)
+ return(-1);
+ /* TODO: keep a counter in xmlList instead */
+ for(lk = l->sentinel->next; lk != l->sentinel; lk = lk->next, count++);
+ return count;
+}
+
+/**
+ * xmlListPopFront:
+ * @l: a list
+ *
+ * Removes the first element in the list
+ */
+void
+xmlListPopFront(xmlListPtr l)
+{
+ if(!xmlListEmpty(l))
+ xmlLinkDeallocator(l, l->sentinel->next);
+}
+
+/**
+ * xmlListPopBack:
+ * @l: a list
+ *
+ * Removes the last element in the list
+ */
+void
+xmlListPopBack(xmlListPtr l)
+{
+ if(!xmlListEmpty(l))
+ xmlLinkDeallocator(l, l->sentinel->prev);
+}
+
+/**
+ * xmlListPushFront:
+ * @l: a list
+ * @data: new data
+ *
+ * add the new data at the beginning of the list
+ *
+ * Returns 1 if successful, 0 otherwise
+ */
+int
+xmlListPushFront(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lkPlace, lkNew;
+
+ if (l == NULL)
+ return(0);
+ lkPlace = l->sentinel;
+ /* Add the new link */
+ lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
+ if (lkNew == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for new link");
+ return (0);
+ }
+ lkNew->data = data;
+ lkNew->next = lkPlace->next;
+ (lkPlace->next)->prev = lkNew;
+ lkPlace->next = lkNew;
+ lkNew->prev = lkPlace;
+ return 1;
+}
+
+/**
+ * xmlListPushBack:
+ * @l: a list
+ * @data: new data
+ *
+ * add the new data at the end of the list
+ *
+ * Returns 1 if successful, 0 otherwise
+ */
+int
+xmlListPushBack(xmlListPtr l, void *data)
+{
+ xmlLinkPtr lkPlace, lkNew;
+
+ if (l == NULL)
+ return(0);
+ lkPlace = l->sentinel->prev;
+ /* Add the new link */
+ if (NULL ==(lkNew = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot initialize memory for new link");
+ return (0);
+ }
+ lkNew->data = data;
+ lkNew->next = lkPlace->next;
+ (lkPlace->next)->prev = lkNew;
+ lkPlace->next = lkNew;
+ lkNew->prev = lkPlace;
+ return 1;
+}
+
+/**
+ * xmlLinkGetData:
+ * @lk: a link
+ *
+ * See Returns.
+ *
+ * Returns a pointer to the data referenced from this link
+ */
+void *
+xmlLinkGetData(xmlLinkPtr lk)
+{
+ if (lk == NULL)
+ return(NULL);
+ return lk->data;
+}
+
+/**
+ * xmlListReverse:
+ * @l: a list
+ *
+ * Reverse the order of the elements in the list
+ */
+void
+xmlListReverse(xmlListPtr l)
+{
+ xmlLinkPtr lk;
+ xmlLinkPtr lkPrev;
+
+ if (l == NULL)
+ return;
+ lkPrev = l->sentinel;
+ for (lk = l->sentinel->next; lk != l->sentinel; lk = lk->next) {
+ lkPrev->next = lkPrev->prev;
+ lkPrev->prev = lk;
+ lkPrev = lk;
+ }
+ /* Fix up the last node */
+ lkPrev->next = lkPrev->prev;
+ lkPrev->prev = lk;
+}
+
+/**
+ * xmlListSort:
+ * @l: a list
+ *
+ * Sort all the elements in the list
+ */
+void
+xmlListSort(xmlListPtr l)
+{
+ xmlListPtr lTemp;
+
+ if (l == NULL)
+ return;
+ if(xmlListEmpty(l))
+ return;
+
+ /* I think that the real answer is to implement quicksort, the
+ * alternative is to implement some list copying procedure which
+ * would be based on a list copy followed by a clear followed by
+ * an insert. This is slow...
+ */
+
+ if (NULL ==(lTemp = xmlListDup(l)))
+ return;
+ xmlListClear(l);
+ xmlListMerge(l, lTemp);
+ xmlListDelete(lTemp);
+ return;
+}
+
+/**
+ * xmlListWalk:
+ * @l: a list
+ * @walker: a processing function
+ * @user: a user parameter passed to the walker function
+ *
+ * Walk all the element of the first from first to last and
+ * apply the walker function to it
+ */
+void
+xmlListWalk(xmlListPtr l, xmlListWalker walker, const void *user) {
+ xmlLinkPtr lk;
+
+ if ((l == NULL) || (walker == NULL))
+ return;
+ for(lk = l->sentinel->next; lk != l->sentinel; lk = lk->next) {
+ if((walker(lk->data, user)) == 0)
+ break;
+ }
+}
+
+/**
+ * xmlListReverseWalk:
+ * @l: a list
+ * @walker: a processing function
+ * @user: a user parameter passed to the walker function
+ *
+ * Walk all the element of the list in reverse order and
+ * apply the walker function to it
+ */
+void
+xmlListReverseWalk(xmlListPtr l, xmlListWalker walker, const void *user) {
+ xmlLinkPtr lk;
+
+ if ((l == NULL) || (walker == NULL))
+ return;
+ for(lk = l->sentinel->prev; lk != l->sentinel; lk = lk->prev) {
+ if((walker(lk->data, user)) == 0)
+ break;
+ }
+}
+
+/**
+ * xmlListMerge:
+ * @l1: the original list
+ * @l2: the new list
+ *
+ * include all the elements of the second list in the first one and
+ * clear the second list
+ */
+void
+xmlListMerge(xmlListPtr l1, xmlListPtr l2)
+{
+ xmlListCopy(l1, l2);
+ xmlListClear(l2);
+}
+
+/**
+ * xmlListDup:
+ * @old: the list
+ *
+ * Duplicate the list
+ *
+ * Returns a new copy of the list or NULL in case of error
+ */
+xmlListPtr
+xmlListDup(const xmlListPtr old)
+{
+ xmlListPtr cur;
+
+ if (old == NULL)
+ return(NULL);
+ /* Hmmm, how to best deal with allocation issues when copying
+ * lists. If there is a de-allocator, should responsibility lie with
+ * the new list or the old list. Surely not both. I'll arbitrarily
+ * set it to be the old list for the time being whilst I work out
+ * the answer
+ */
+ if (NULL ==(cur = xmlListCreate(NULL, old->linkCompare)))
+ return (NULL);
+ if (0 != xmlListCopy(cur, old))
+ return NULL;
+ return cur;
+}
+
+/**
+ * xmlListCopy:
+ * @cur: the new list
+ * @old: the old list
+ *
+ * Move all the element from the old list in the new list
+ *
+ * Returns 0 in case of success 1 in case of error
+ */
+int
+xmlListCopy(xmlListPtr cur, const xmlListPtr old)
+{
+ /* Walk the old tree and insert the data into the new one */
+ xmlLinkPtr lk;
+
+ if ((old == NULL) || (cur == NULL))
+ return(1);
+ for(lk = old->sentinel->next; lk != old->sentinel; lk = lk->next) {
+ if (0 !=xmlListInsert(cur, lk->data)) {
+ xmlListDelete(cur);
+ return (1);
+ }
+ }
+ return (0);
+}
+/* xmlListUnique() */
+/* xmlListSwap */
+#define bottom_list
+#include "elfgcchack.h"
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..63ae69d
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,9655 @@
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --no-warn don't display warning messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4.2
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.2
+TIMESTAMP=""
+package_revision=1.3337
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case "$lt_sysroot:$1" in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result="=$func_stripname_result"
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $opt_debug
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=""
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $opt_debug
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " \`$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result="$1"
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $opt_debug
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " \`$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result="$3"
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $opt_debug
+ case $4 in
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $opt_debug
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $opt_debug
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_file_result="$1"
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result="$func_cygpath_result"
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $opt_debug
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $opt_debug
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $opt_debug
+ func_to_host_path_result="$1"
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result="$func_cygpath_result"
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_append_quoted lastarg "$arg"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+ -Wc,FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test "$opt_help" = :; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ sed '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "\`$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument \`$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ func_append install_prog "$func_quote_for_eval_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ func_append install_prog " $func_quote_for_eval_result"
+ if test -n "$arg2"; then
+ func_quote_for_eval "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_for_eval "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=""
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname" ; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename="$func_basename_result"
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename" ; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $opt_debug
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $opt_debug
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1" ; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=""
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test "$lock_old_archive_extraction" = yes; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=\"$qECHO\"
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir="$arg"
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $func_quote_for_eval_result"
+ func_append compiler_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps ; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ case "$host" in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$absdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd1 in $cmds; do
+ IFS="$save_ifs"
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test "$try_normal_branch" = yes \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=${output_objdir}/${output_la}.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$opt_mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ func_resolve_sysroot "$deplib"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test "x$bindir" != x ;
+ then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=yes ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case "$opt_mode" in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644
index 0000000..f12cfdf
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1,7992 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_REPLACE_SHELLFNS
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case "$ECHO" in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([${with_sysroot}])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD="${LD-ld}_sol2"
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec="$LIB"
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test "$with_gnu_ld" = yes; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS="$save_LDFLAGS"])
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ fi
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${prev}${p} in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644
index 0000000..5d9acd8
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1,384 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644
index 0000000..9000a05
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644
index 0000000..07a8602
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644
index 0000000..c573da9
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1,98 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/macos/README b/macos/README
new file mode 100644
index 0000000..434aece
--- /dev/null
+++ b/macos/README
@@ -0,0 +1,8 @@
+This is a MacOS port contribution (not to be used for MacOS-X)
+for the CodeWarrior environment.
+Please contact the author directly in case of problems:
+ Eric <erlavigne@wanadoo.fr>
+
+ thanks,
+
+Daniel
diff --git a/macos/libxml2.mcp.xml.sit.hqx b/macos/libxml2.mcp.xml.sit.hqx
new file mode 100644
index 0000000..758554d
--- /dev/null
+++ b/macos/libxml2.mcp.xml.sit.hqx
@@ -0,0 +1 @@
+(This file must be converted with BinHex 4.0) :%faTBRKYE$)ZE@0`,RKYE#jcDA3!8dP8090*9#%!N!3aG3#3"!p[8h4eCQC*G#! SBbNa16Nh,6)`-$%J3@aKC'4TEL"6HA0dC@ec,#"*EQ-Z,#"SG(4`1Lm[Gj!$,Q& XB@4ND@jcHA-ZBfpY,e0dG@CQ5A3[$3SD!!83!!!aG3#3!h)!!3#3!h+,E`fPT9* PFf9bGQ9NTD8!TC!%!3!!2`!3Z$,!1,Jb`$J!N!d2*kd!#kD6!!!`S!#3"!m!E'P LH'eX-LjYBh!ZH'eX!!#Ec&4&@&4$9dP&!3!"J!!"!*!+J!#3"d,"e5%1mE,3PTT e%qciJM!83K&J"3$c)Ci-RLl*Jj&KYk6LMHPcX8k"VfYVbpc+6J"MIMCMT8+`(1i 58pfYfaf$DRNpGF+I2Uqri(%MYPj*RHkh`84'!1b-(0aakcC-j6S3IbdRP[K!N!! Liq5aS+@E&STcZ'NAH!p%'FU(UeiGbT[LIha$)jh2$NMlf2[[ah9a-IlElkZ$PNe V4iS[!jVf@LKE9h3B+[8)Qk#MlZ$k+DpGa,5eMaXSC2%EC*FhFlaJYNTakfZJpF* f#Sm53bfNiMV@RKXN4)`K%+6k`C!!ZKeM9'-J6C0HG!!qG1#fH0@mSZeZG0$IBSV %iP%Nmkpb#T8%YRU9"ilEN!!HjfD"iMpY'AD20KerK6rD28Vja6Z)X,lJ2T`KSU1 H9d5aXqEDfLe2abB[!bQdYH03K5MPm6YP,#"p9@(3iT[,0A!M-LHV&V0RSkAdBCS Y+r-2[FK6$BVPQ(82mEHmlI(fXpVHR,AKe!K)AHN(hKdrr$1LqkTR`X#Cd*MUBje T`JL@D(NDaKedj!DVqVK2H)40b20B86$%`f5)E"Id`#5,1YK#)fl3@'D5!-S5"(X d`K2J(&*8GP6FfUqS@5kY"DrqT5jXN9Ep'U6h(eRrAP@fF+qqQ4SBP&hi1["!U`e CL9`1Gq!X0RLRlE0rBHN,`hmJV2ZMJhCFHFMEj1IV(55eh[M#F"C)i,-*jH-*%$) kmPpSXLS1AA9KH)Y9MRUYaJ6m2f'AURTca'-409*)aQ''XIpFV[2Tb&0A!U9`CDD aM(19P!G`[1L[NmTPEm0C+&['U-a6TkJMjN0Lf+#C'M4F#+H[mf"TN`i5&p%Gq4' 2Gq+P&PG$$8AF3Hcr`+a`+UAi!GI'P+Vj1&3@e+hkaK*CHd6ll1ZXGaN5I1Hip@L frl+%HQd#Y%*I0[b*YbeUClA$90Nq1bq+9BcE'JJhJ,(ELMQj45#D0@la%&(DiT@ 0J-$8Dh!PD6d@1UB'a(Ra)a'3!)6JX*U+h5rS#YP%I4!Y$$kf+FTJV8X@+b5+D,# MIR9Ha3erq+fpl&kp[BQ4M-RSNDeC%280dXPZ9@JAA1mQ`YKCNI4cNrjZm121rm( 0hFQdJ0%hEe&L8P"8Pd$!Tqi4ElJa+akC*Mrfdfk"GeJ`*1hP#Ne1E,Db[hGcq*% XD4QeT"p5SX*EYZNA81#,HR)+*J`A*S-C&eB&%eVjFcG"F"6DPQl0V4D$`9k!Je, -"j*-EXIERUe&@lAFCfl!&APmZYINP'2+'RHYS1mehXCEUAGYbKe%DGJPB9i-H!i HPPe1'#18`-UaSjNFMmi$r5V901iYN!#i1(rY[S5#@M+ZQYV)U)3-MPDcDX"hNpG KaNXjbTZP18(Sd9kLM@"i@"[3JQ+T8Pk1VYYYrB"3KTqQMFG"918VEN80GP-CEq6 82'-3GhThLj%Z,jNb+lHEA-Uc@lLrrLq,9phe'8kpPKfCY*&TjMLU2[I$HF6qZ2R XFZM2bfkjr,il23`S+3#IrMTUjLDFi"JdqD'[QSFh!5ar3Kdh(,*HPELp(bc*PZb 90Jh'iT2!PIJ)D&+RqMH8ZIJSLXakp@q6Xh4b%bBf%QJG`U%Fa6kiCE*Pad(&dLp 1fP33pMiFc*-KMk+RQNBAf3d2-A'5k'HIrM0k*Le0e1A@![39*ICcm23M$!85JlX Vr-+BrIE$L!8"bQ"pXcIlKVBY2EhdNlSN4*mhp@+Jm#i"c1@e5*,j8J)b%QB%fU" 0&ZNqAeQc%L&AZZ0lpp6UjCXXj[%m'qS8+4Dra&+E!JQF6c21$h,0mZYF3D[NiGr #2d!aZID(m!hc2!)AMV(bKPEe9lf%*qK+T2V3RDe`)+YRr[QmNriTXaIIM@-BTI+ pH1pY+%AM0HR*$%C9#Ghr(,Imk[#([a)RFVZ#B%`r53(GZmRSG8`L!pJQ-&(d(U& CD&UL@cYdZ&j0HEV'rFja@c`IPQ*GbZ6MKIMEFEPF)+YY[+KK9k9JDp4-$MKm0rr RfQQ6T&%!V#BS2Ukq2Sq*28`)`fI$TRBph'X%)SfQ0V*8-ia5Y20rTAI-8"f,X[+ 9BVIMdj&c5"jM6GfI'P$0b5"2V-*#QI5M8RlIY$U&bSe'[V%&J63`Y-C-SQPI@NK KKLD`qaEFU'#RI$ZCE,pB+F@$+GD8L#JDjG2H1ALUJ23+'J&DB-fEiAEmI)-H%ME C!21@cP1+rPPfEN+Mi@AkN89a4jC6S38,Y-+!82'L",+(89rIVQLqD)&56ZiI!BM dEKR[NTPASR@R)S3D8lNrjX3$c[h%jlVrVkU5C(ebrk(d@Xj-KQ,XPQl0j&G#4X3 e-Z3Lkl+Y,E1GB,DkQ1IK(ibLB%k-KpTUEm[kBhZ9h1HFmC&$H(AB,`Mkl8H"Dq, DmAI0cI$iUG8&cMHR#Gb`@r,`'NM0SYH'NB6qbpYp[q0$e`I[SJi[5F[iHrKAY8p XTe%##-l)kQL4V!@[r`UI8pb,2MT0PL3jUX2ZJ#Qp9e9+Cjp`S0$cT,5ZB@Zl80D HFQeDT8HRD*!!9+Kk(9[,h9$DNa'(5l5p#9*lP8i)hS'lPaBQV4lXkFP60Zi-fi, 44'S@mHA9q@V-(`Br`,j2R,4GaKPMDhF%#Z1NLfJr@'f`9F+dk,dq1%KTYN,`9dD 2'&#UjmDIIK3VZ4*&ld5YraQS)!0`2BjN6pU8CJ(JCT)m'kTh)(9"Aiq"pHkV*mb E$&Y6FdXGqA9dF46dEEd'emEhcGT%q@AP+H"PfE8aq4B6p3K3Vf`mPB+&hh1kNrr Y)aY"IEC9PA)Z'kBjp3Q6Flqr@Gk2M2*pY@ViVlea*R5E%$S@BqC#q9m)hj08`ki q-!22J4GALA2Gf-r8NJpMV10V9AVG"3Ji(mbAf!4hB*[U"Z!k`i#JHp(Vd+!)[6i &Mch&2ph54+DTXqlRr#8r'Q%3cXh%aNiiEf14l,M'8J'f(L4MA,4a&%d2j@*m1,j V'8%ZdI$$(NJY#ZUUhFp`9MBd2S4Bkc[8X`HdBCEYlTC9&lXD%DqK5QIE%C8,E5U rD$3hjp`ZM#Lc4iRf!3q3!&f@Jl'DF6-3jiM15-l@@@Z0*1c-B)PfNL$BqZ,XYTV PA0`C+db3!#C9!j0`5MplSdBhU1kE1EG-h@Kja&kr#*(BcrV'l5B6TCZ#NK8rpC% "(RD0TCl,5p8D5iT5QFpmf!$)-6XQ3deZC6A,LB6MJ2,5m&e+2YF,C4RaL2-"+59 YS14-rVrF#2j!P!RaqRbRqJ0Y-dh@D5)"qpe")lVT4A5G4bA,VXcHp88p)eGB#&D Zpm1ZAr+5@r+Q80@Ad4%FHFPr-HPFhPMhFA%K*Vc$)S&4bqP%2a8R9(P45+Ff#9f Q%KTj`&S'Rf@UN@S&Ga%&dUaA8LMXSX%%)-br8E3LB5*Fq2BMbe-8eEGcLc'kM4J 4UQDX$DDAGJ0(ZH&G5PV&5+#cXDU4JAT+rQ"8'[e$GhklGBN'VdeB62A*rr9X9fL QYGqf-!%II"MXa)kFD%afKXieB#)ZbqB9MXA(lm1'YBEc5JNKd6"JNa'fX[J+Gi+ l6Ue*EXGq4#*-3i+dij0i"qV%@b+`U(rF(Gm2!`QMl08FeY[LMdhU,@-kaLa!NUL Gd(-,Z96mRc4'miNaf!"FjKl)-E5U#*UXBR)HVI(Y"#qR!M[N,Jk%@Y-UYqmFihK 9Gh"0'%HFr%*A0iq3!+JGHhlia$%BqDjVaiSAk@0#R9F3UbkXM2Bi-j,2IY[GCmd Db#BE9QUTNGG&-9VaR`kc[aDi"MfZ3QRIQiK&!1QQU(bMa!&iLY228pZrqI[1Zm5 !TGRZ#4QPD*PbBC,C&ZILe%68Dj8,2ebjd#H'ZUbeY!miLR)[U-K-TZRQ)&h'IdJ HC*NP#3qV+jiL`[4"e+Eka%EM4ZGik@UfL5a+DqI[eXJji`"SK!mdNkYFCbaL-$e i@$[MB)#(f5)f#a%%BS#TTLQkhX95Lb2'YJpDHCce#QB*[hhN5N,a1#dYQ%YE@m( SV'hKeM`U8Hcq-'+Gm,eaIC`8`T`)Qmh3R"EhFlX2m`2Sf9!Y299Jr%[cj'a,&@l aq(DNk&&a+ZRh#JR(@(EdmACB5Q"XZmXX@ECVDGj%JD$Cca5r-!&!0D`2R)jqL1[ qF95MLX@N"ShEM2Vd'iN6fU@P',LfcARZ`2!2R*Z"er[MBLchA)0B%`SJjV)&-"D pS4(X[VDdU5[Hh!rfr9a5Gp*2L4b5lX+ML(%@`ZlL`$ZK*6liZh$L!r9j$2P21G9 j#qJ`2e+K2(qQ5&P!m5kACR[60`P80eU!)0pLk*X@5VrJN9INKI4cIl3V,QXFIi0 lRp5UQl@qiLR8l3d`C2J+dLTB*KrVf#C)Jh$-bmFXjB(H+4aBbK&!+VJf"MpHPIm ap,JI1m(H)q[K#A2HK2S4Q5J'Y9VF(8H@@5)h&r@$r(FiPpSMAL1SBJm"2m3!R"C [+JFMkK0e$GSPMZe0`l"qdHET4`%plD0Lq$-J0bdB&bZH+P)6Zr-Z2-S2F)%R!f3 N9Z`@2GIU+1I2YA6AUf-)"!U,B[L!DT+%9AG'hCN)&AIr*8p2c"bMA2#rMJb-85N #"B6F+b-rSp'GfD[2"$PLe-9*5!qAR1*VFeiC1ZcSq`CrrMNU-#56h55Mh%1*XUD h,1iP42BABKR"efD6%$BD`5a))&jdieSj02V!'4YcU#ahYFMhRkrNcLlcS+'a%(P l`),$rh"cqCj*k3'AAK-+q%V-"5M51JSC@M'KQA[)d[ja*-Lb8VmLJ-&MdB+AJq! VLQjFBTHNG8CYUVbJlN*$Vp5,Q(4ie&3QYVe8UJ9Qh%T+e,Q(IAU8YKfSp8QA6Y+ Bf69`3pER5R[#[M5Xmq1@SPaqp5$(rfmK!5j2LE1T@hJDV94f,I,[0MbAqP5Hh"K -)G-q`dVrj@-c@#BPKb+r#&FQr#dK'h(@,B6"LaqAhhGA'+j,Xh$raYdDlk%CbC1 +KDaRqPDYJFIaBCbH,-bk56Se0VXF2Q[P%9GXa!4imM@5h93HhdidM#*M5Pp5mTS &I&*1J[BK1R*kP-+f)DAbh9Zaki8+P-Q'$i)XB568d`Mp1FUflbbV`LF#CXPDikb $Ve3rdC2R*YImeT!!H03R+9`Z*XJf@0@C&Fc@Kd%ZdU[kELrqHi2+R#2$LE1F*Ec dfZJlieqTAHVa"Kq)U((5N9@)fh#ERTT!Pc5-$-$4r!T8$+2X9kKL2i['Shd!EiM )4i3H2d8q5[Bj#q%aR[RZ$[`"5%4+SCX+@ZPIL``qiLU@T%B2JMa$J0`%[l,c)jY a'+FrEDI14dMD)M1cf3JDUScE05PD"5PKmhm9bp9#9Z9'9E)8ir+@8Ec+FV"`GRc 1qpmDG,Y$VdN0UCNebp*'r2)CllpIa%1`$'eN+4#UCib4#CVKGMqm8!CTYQR'RBS 4T&JQUIVld64'Z,fQ(aN*B84m'ERb+`$`ec)a'&p&(j%Q3m%'5ppVQEF%H%ZT!F% DTam+apNGm@ij$-`[9+XR8F)kBm[,%k$AV!Ar1lIKiP8*p0P*BU62-SJ,(lATG-M &VaKj*FqH+Y$5MKSH!3!q0+RqC8aZNMf%!AVi,[M,[N8H'Gi4XG@K`AdGIbX`h@X `!f(DTZ(X6XmF$T19-CC8a'Zk8,K`&bpkR,4,1965R(E52!qbXA!cjG`X0$qD9Bd Jql)[&+&S9Fmrf)P$PGa-Ld#h'EAR(2a+ALC&9CPNbkTEJLZRiij`KrBZ9X3FrBp 1NI'k8kH'j*LRr3LCT@F#"A0*[DT-pXpj@aB[#qhL'cYPP8E8,#BXVRYV0ca20N4 49j9e%"8%9[@[Lbp$qLSiQ6,Hq$VCQcN2[5Sqe6,kbiThV335N!#eIf#*d6pmcc1 "FCJ9jlVkTBEbIdDSVdG#NBG"jBTMk*!!KLVS5XCY#!b)&PAVrDC"14THIl*0dMb iX,MM'VG`Am&&f*&TEE8%$JZVVF%A$*`lCjm!ki"EfLHAr(5mH3M#i+hU(Hm!fc0 G3h1MLJ,-2bYFE!!'e58MMiHS#'kXdSDLa`qmLI[qkHUfM4mZLNIEaj&`TU3B#Lh 8p3lD-j`@943Am`E"Y&LF[DpP`&F20UU'4Sa,&@$!dXRbU[E0)h)UKKG#0+*3lFK *-`UGrdCkL$*93-"I96'Db@rDNed5)3h(4H,@d6`5VjZV@84!fc(4NNNe'h"BfpT cU(5'#X',[p0[+`c`C!`Y%V6@e`hTLb0T18GE`BSpR!AE-5QbeTdYrV@6R12C9pJ !I6U5QqRBTf2(JiSb*!&BGQ4Zr4"#`PMV2DQGMq#%JqI`GbJEfem0e8iUr,YR6rP 1fZ9iTAcV%M0[53rN5J+V$!m#HbIGQpDM#(XI"`e0Rm+LeK!'m$Jb[PT!D"2kaTQ PD41V,6FqQV6@1)K"f#iS#mP8R4,1e%I'+HJ-TXZK2%X3iipeYIGc(89aU`I@DIG [Nd*i4dRYrDHCpQ-MA3@(pPh&QUXTJam9crlBpYcle9b51Y%Kh4LY1@*NbVr"@Be A5r1*ZQ9AD#FYPS!40QVa`j4RZlB2Vrb3!-)RV4"M5iRQAMqb&41`XV1l)1%CQIP DGkD-$)dDLi"aKGp)ZeqimRbl2#$[DaG&5$TReaa,T'S-$R(+q)$%iJQ#G1@ZTkc 3aTj9hi,55L0Xk`4pF4FEMX2i"9KXr,LPekQ)MFIM`22D$*+1R-$0+'VU1CQd3$M #F$DhBUb8mA#pdM`0'AZC`[mTl+'6LXA+XdfRf34G1[LDipik`D3`M$iMaXfcA(q 99[@03r[28S&&pC30RB@ZTHbkcC1P$Z4DRfAeb2c&1fQK*GrEH$ePaiBrRL(c*55 Uq&V0@QP(B2afNiQS[&q)e+[22Iq&2KlG(0p(F"#DjF#Jf*b*Qm%#V,DYbN2"kaK ML90PE4@5C[p"KNMKE,mqcfEQD9V2@qb1"dHBC&KdGlEba&*4@U,rC9DfrdRj6K, ldb`ZCSQ+XNNEANeD0N@%r6NhNL1mm'9F+hP6J)RBiHT%-fc4eck,(21H,FL0Qp4 4&r5VV&(NS6U"9#%'[pPCDN3J%YfPp,NdmSHMS$iP9q,CkBRrdcQ9)92bkR@+(8+ 2Yd1F1@HJ&+iED,d!K8qdNRr+%Bd[!@8YN!"@'R(pm#GQE%C,Z2mKj$mNUjKUf4' Teq#1"dB$',jhRET3j*&b'*XN0pNbXSTG[`CEJjiH!3U5(Sp21C0*SEJrF3l2KZP f`h11DA&Qif9)$-$mjB59qcBU4QNXr1"keDI@GLTkpUc'Cfrh-qP$Tb8h46[1'%` `l!ZrjIL!)RNVP93+(h)r8f1!14(+,`08Pl6p,42dl,0HIVa&EVIPVc+ff+9(pK" %'$$!iJ2N9r+P!Gh#6kBX*64pp0&4%'L@YJGMqp(D%&10MLkk'E(1&YMEX9kG(kj fFMfEdMI3+)!3*XD$@$4ep81ljV!9Z)X#j'CL1QbNi[#k-mGSH#`@P-Y8Gf3J"ER mVKd+28pjVK&H6ZPHQGlIC&)[hR+V4RZEPUk`rdhhhq4+e@Q#Zja(HQqq1'kZ*[+ r[VlqA3YpEQMHL6d)+r%i4@A@SI*Y[c20(KHk)$)NlU0!Lj5KEM#V#Qqhb)39T)m %If#X8'aG0VFNREEY9[B"LqM-"D,F*Y--VM2EjY'0#+%`V&@'0aVV)8rF8+*3l5Y KKd!3h@lrBaTCpjEi1&KSD`A+Q$-KX2rLr8(,"`4FjiT2+K5G09ZDZ[1-eA!B)G1 N03#`H568SX$iUK@e'2iRT!+l8,jibK)c58qcFIVSZ'mlX5$Uqmk8U3Sf`R$K9!Z M81R%r)Zb*TPjZP$D4Ga2(d"pp8'&U563((EF*CS5`H!'h-qhG,6-cfURU#JGfDr LfEEGV)&1M"Q3!+1ZMpZ+E6U*`Uj[2#b@`3hP)ZCqh((-e4FKA)Jm'+[SAG(14[) 9b6(eG(GiDNbK$ThUDbmK,RJHPe82a@MY6&jj&[bK!3'X5f'9JD1I2D$23%*f,'S pNdN&UkaaCUCIF`ZHBLBC5bYq!,A-(3Yi5-pe&H"lV@4VEj0`L$h3U'kqp(rL%aq h*hjN*ZFd*lpcA`1CUN80lJN03f9)5HM@HjV[bP2P!JBMl"RS1rPMY"U)XmibF)R I5A(hFa,+TQ5kmF&`&-rS!r%-jJMBLM#ICV6lC9RhkaTh$3jkML1[DqY`&8b&q#1 %+K,lpe3TH[6i+(hdhlN2ZX*3E30V+C)[1R2Jkk%$)$amb1@BdehidBEG!MAi3h! 3B1Gd'IrTqY60bD*4l1U2bafI*I)48c68prXT5fmRJ4CqhaC)0CKfHTJUKGp)E+J QX&)!VmAk3!T(rrDRAFIj8#DKF#FmNRM8L8r6GJqS@6lc9d@KQNK)Kmd'ILRI#m$ 3e5+KTf8AriK0%6B065QEb2apXF9(E5[$c68k%r3R'U0biTSG+1A9U-YJUL*@ffM !Kl,pQ`JEiVK0&M!@AbfdX&R$Ce*"rch"Ea4fm8CmPFkSM5b&L6BNeCDFT28F+cR j(J&X"f*UU6!B!C5caJl`qT4%A*UTN!!BRh2BUl0Q[Bjeldik2A-U&H)N#$+BfAY +HD5HI@BFS@lI',mkFU%)hTXZK#8`5b'LD'-5ULKi*X,30-q`BGq1@UZ"U$+lia' cb3CK'UG-kfD9d@+fKUU*VQkEk@#ZL1k!qq9m(%#dhpF@%I'N$$iN!k"ALFrE1+' $$Q6rJFHPMk&S+H2$lrC@,IAQ6)PAHiU8@dmQlRZ&*mYKD*40&-LZRcQDbAbM-j4 lp$d35aGj2q1F1)43TUpSHca@r0#P,9G4+Q6,[dPL)3q6UARe[FY-*Eiq08N!KKd b'I5a)D6jdZ4BIEiK&6fX433Kam*S@ceYd4#qL!-91*c&%RY4mIj#ELKf-c$+j5l 3P*m#Ii5a0LKSXrLEYVEpcJ0([&`(6RN(&q&frRNB[hB[TZSjZFTY(!5aP+k,#BV !8jaSX`qirr&TSa2a*-rb#ERNIC@bU)@i-I*"TYEeQAVD-Nir+X2Kl$'#Be44+d* N$$QJKBXmN5UXB5m@@%T@pPrKacq$'3LP$('80+YjYdf"j$K4r&0lGELAM#pf4D) 14SUH4hb$Kl)'r%N3l`N5c5+[B*3XZC!!2G+'rQ-rU#&kL(bbbjX[a#a$D6bmKaU K)E)@KB668cG"M5"+lZ@DYB9&Q3pqckb6,8Hr[BN%)YMZ-DS8IfS9cfli3dJ)#5U 3!,Dl3U(9eQaEc'`3ZB1lrSHYK`&+E"GT)qS"jG`-"8'1NYDAeqbEENcmZEI9JG@ FJ-K"%Z2RZrLL&CY'P8KQ"#Z(LS'1HbP'SmbB!hj%Y3-M2lKY#XD1l`NPr2YpL[G p6YF8BqH0`PT1D884$-Dpp`XN,F3%&Dqbr%QRBTE@AINe5D("mkY+UpP(NH,1YXc )ie221a'3!(@10a&DY+18d-e3F+,eKCA*(V3RSp&eR)",f8E2Me"j)HU4H)bT4ST p(HE"hbe&CaEDSJ&d9p(2JX+2)8%T-,jAQQAG)l&FaIp@U&L&-IGZCLe[jDjh[%h "mNC529(I"HE&Z[L*09QhYXFPd+aG6UKf,hIhbF`bNXDpV8Q,8YP,A!rlfDm1qaF pcaSh'kTk5LjJL(dh,AlifN3CCd&9kPTk,X&B@MN0c0kmrUhci#*(cj%q0184%P@ +62ELf@0HC4D'`l!m`,2VeGFPmAkN98fF&p(fN!!H'i*GmKe4C3#+N`Vq3a[DA)L #b#kjf9V6Emk2iIKCBMc$dj@qTm2-hq4pfdSqjPM[E(5eTeZ'1-+MELGTQj!!!A* rQ0V%'jGp3"4FcCVAN!#BHZ,5UAh+LI[+aU'DPLcAhhE3lGI0r[ff$6+YSIE#ir" 98L@%YZXV&R0JaZb8rKPkY9VJ-rKI)jChGP,DpG!DVj!!Ch5CE#[A%40%PdJ`ER+ U0PjXF%LADA`bKm9@*MTA(fm4E3DILCaeB"1CRZrh(MX1N!#FBpIfPh1RQQBqMjp hIh&MAUjRI#1hXE)!X9l-P(2hKqKfiChFkE8[2JPQ%i3Hi18([a)JhfB9)%@NaAb 4C'k@F$MGp2)leMbkdYGa%eH!"R`KFEc3KHBA,ENbkGekhYhUUH&GQ4A*i3YSlYT !9V[2VM'-%H5l8c0Ml63[ffljh9VDrD*HeICH2qkl&lLepPB(LL-QC61dQUbXipK VfZ$qP%hE&bm-NT)`NU'-6Q1PSYEV@ciV!Fl3rL,jXe)5f---"K'lP#jKT5@6U49 dBRpSTU+2LS1iB44TJ,c0C@fqPcUN&lR8D-MHAjblAPMF,T!!f$$J[H%2b[(`a2V !j&ZGNbSpGH")"3D1-d&R[&ScPCK35-`KhZMm`H%hKU(Z"BD[Kq2X-X'I+!9cUHq c[Ed6T0LRdU4pBXYA#SZkaKK*`+22Hd$S!(p8A6MMq6[HNRrH'84hi,06GcS6)M+ EN!$dVrC*[r@Mh8d%,eZdjYJMANpL2ak+b4Tj3f3++-DNYAEe@jl(Z%A5kc*"l!J A,eP"Ihd#lkhED'V[j9'BZa#i2(#BZ`KSGi5p$eMP)qRT'-Y-qd5T*AYJC4FfmJp p!6RJ`MCR24'(QledJDVENlD,alX8QXcP6XR,-f!Np8kI)YhBqa)J@KYjHUqQFT! !Q*m4j0C"Ke0H1#`+'Z)DdC!!P$qmXU1eRU%qXN"K%i$S8@6fJ8%'9%0N)&Z@M$c C9[c!hp0i4e9)qXNTIemr(N"AFB3$@Bfe861h1h""#e8RF06BHGGep3DDD@+C+IC j6dHD"M9plFIVBa8%-U,EU5VUjPA("8[8&X3F*PHM'PUQ3PKX@3N"&ZdjhmlRcr5 `m3fF3348Vc95&NK`X+61RGdfZ"RBM,'*"aQ1&He(91[2hha'VB9F5dc5RTS-YlN @J1XMS68pb6QDIfA-kL*lr,#@[6[R-4SI--iD9&B,K3%m1cYHBkHcFI`DAJ9cN!! 5%pN%NYM2(PM#6c*Zqj1lTreCT-C%-mcmd"HkZLX(@iiqE2D1(lqNKGN-bmZS1UP D6$'RAN'8Gm3P8"km2lQD!3KBhN-b!m(X5iq0RNqh`IDP3f"SiSpZM[b0l`L#PE@ GaKjJr12$YL'()jmIU,L`MD1XY&M!`qDQ&p'pL#-#[0+$dCYTN!#*kb-i#1`PGUr 820-ENP%JRTVP3'`XVZ@c,$T-a34dB-+KS9)bSTMK8dY&Z"-*d,a$VXPA$E(icT6 fI[EN"T*hJ1ZHd281K1#,$j[YRL3FXca'mF8khR,ZkKa6YYeJa#D3!,ra36"cHJJ Ki+'3!'XL"9HQ*jU@UjQI8#'+dd8r'hIRDpd"[eUKC%I+VFIUrM$J!lQbGYdK,V* R'f!RFqMYNBZTN!!R(M%Bm9D,eqNC2(d&hf*DrfY0UC)`h3m)jC+d@+PhZmCf[(L i%"2+@iRD!kB1`FK4(lbjP$aKRGLi6eRA!!KJ6dBX3drdH@V',NR(82GfS*2Ah%b QKc+IJm,)F5m(!Q9S#jdX0mCCUZH0j@dReFCm@rE`lI@)Cp8e,0&U$FS$)i1F8BA 06(%cC(-9k)r-C60ZE(%Z9icHl1q#R@V1!$D1MrRjL6J`Tf&#eb`P!&Z*2+CMKa[ e+3G80!Nh!1E%dTrb[H'3!)Fbmq03UYUQfKeqTPkAc+HNIrkb9PP(14eNIe2b)k3 65Q"qqq*rZ`'0S)3eG,,`AX+04NPYp3p"BGCL)I,Ta2mhC%5",Ub!S6K8,mq`YYP 1dj5Xmb+eA-kbKX[DPZ!M*TeN@A6$A*c2CI!d)9#P%c6&-3T6V!Qq`9@U*FB#fY0 f*)MD1LGaihP0S"r6X54GI*8j962*GMPI4"fpdhkDC4KJSXjAp5p6'c")LP+X821 -@jA'6VU[68+$b+5J0fP6@9!Y++,2*K66q&a#E,qRbD@qS(&mXJLp3'-L1@AAkL4 K@#(mFl8F68JN8Yh'L6--qL0#403RL2@Fl*J6kQXr8U-R*lLGP9'6ZITYJA32UFN Fm2$2e%S,qP+Qcq3e@M9l3BSk4,LNZqRb0D++"E2"f5Q`"QrE&!8rI@`*eH"`IV3 X3c*)BC%khQX[NjMlliHcm$Pq!rflL-,'"2F3m[`jT+f8mZp`-$1SYdMLBSLYY1G m"pU[M2cJ4*Q[)M!#lGfeI2eS$EeE9&38q)*'ehPbmY2pSi0iX%%!(2HGFG-Lb(I MA$T'55UIMHfp)[qZVA`iHF)A"c&E*Z,TrZp,M5B#&I3A(VmYG54!%iI"`LeVQ(Y 6RGdTr6U#!k'VLrkkJpPjmQX66Yl1[4SSf*B+BjpVfpBa9&)KZphfFhTre8D,#`q her!mfD5+rVPr8c$(qMh!R,k4b@lm2MpRZC[Q2RTp2M!M1**2J'-br2Br[`r-h[r 1IG2dk!V&YN)4lIaEZdKHMkBPHam*MVVNSZV8hNiVlQa9E8L$H8D6'[qK6rarr"6 Il0VAJ9&Gr&RhM'P+1E@X5TkGK4[14"i+EKP6m`ib6mKcm'Ym$-e3+VqkY)mFYEI U#YVQ+r6%90+r&B5T"(RGS[VBq@DD*l@)4LmNY53-kkFp'LbhfSZ&5$j63%[5ilG $JNd+HiLi*SkKKB0PAi"Y5495GF48lcVmHkL1UB1[[INqP8kPB`ai#q-(-,Z8YI2 'bml`q@eU#H66D)LHGHh8dmQe+PQc4*`,bqa9Me0ddq0'h%GPcU'5(,52kr80!%r 8p6H%DGGHjGjdflF)qYCk5BYZ91l@&S'6U0VJ9@em6'#H5CH#%*5CG6p[pJJ0a[- 6pq+R'heN6!)[bD(Ch'E*NbaZA@m'h@5rdMr1R5+TlA4C4AEp55cm4Q%P!h*le2, '4[4J1R#Q%q13!![-lrI+Q5aQcd(R"&pcJ%RJ9dBP4VCQ`r*JlCceY0I2DlFB6[0 !VhITUJ#(,69+d3`98pkKC9!Np,Yr(9b$8QVSaY3BIl3,BJbJX9[LjU1c&PKMFDG 4VhUKME$Y"bXYr[dRhAH0*LJ0G9+r&VlRaHKDF@!TX2&+6I"*iMdm@!CUde@C"AD i,,h)pNpDmGrR!Pf@d6d+m,*L4NA1Q6CKReAQY",Q,43reH`SXA$&@2K0A`$#5aU f(dSd6S9kK['l6Jj0qhel8BYa[PqK0V9BBX@rQCXr6lEL,5lhiA9p0Ye%1q11fMb MNecMU3aH@dRe&lA[XMUrCcaL#)%0EaQ##-0TCBT*I6,d3e+#aGkqpai3X[l5#dD SIYlc'6"(J3-P*)X"ehiL8d3Dr#jJh`V(G`[[JYmFDLD%(j6@b%Pc4UU,arF)#Sh &"G``)M[)BD$"D3J5KNTdJd63$1SH'd%3PXBFhICG[VH)m'I4r-#)EmLZ!b4DECe +c2kKfEYU(8bLYIR(`ULj2[%PmMpbi+rG*!HCG[h(S02efTp"h&la(E(MYSE2Dkj [JeBI-Nj"j14JUBe39hla'6rCHU9Y91bm`T-'`qpZbUNEp!$9mA,XT,QcZ)XFJr# 3!*DR9hr14YS,9NrN&k[(@`6!Q9kCreGQK#DQIX3#4ZjFrhY2f93E%K6DckX14dR 9LbG##jijr9,!XY9r"2iZGM#EU@3KqcpZNa14KAZqPkBAB`"`jA&emSrZ2qcU5'J cB-h3TKGhA+)aY(!Zq)akeKPPqpGlIRciHXBZG`5CImR4d)'lFdbZ)%MrY,-%b5[ LZjN@b8!#fQCV&q4192U1GcfdYU!NU0!NMaRFEr`a[-$0Vr@@rQk!VAfJBH+NGeQ M11pI,6HCaG[He9cG"p8L!([cAE4AI4dIh%D)T6YQm&A(r1F9*+Far&TIaJ(pN!$ [rj!!h+Hhr*ZYbr5KG-k-'edr-kRC0b*N*aK$%[0$rGE$KTm[b8[aP'VJ3pH(Xiq rj8hTmi8`YFHH'%0EeP!Cr!8C`%hIXMSPMlATrD[X(#%Q@k[(b!-FE[FH13$pJ-C RRXk+$D`MAT&'iU1"Vq6"G8cQYi6V)6I0CNr2l@mVrQ5kH6Uaj$VJ*I22q2iTqFl SEGGD+b8M$H3RU5Br2ph-DC!!#[Q$bVkEH+Z[K#HK$A#03AEbI+Hf-U@jc(D8$2X NbX#ER+%4&1KCQEPb+K(Ud#@6+hG@qd4"96#3!1LM36ZM'5AK$5m0A+5F)bQQC[G &[#eQYhM0992'P02j6Ii)j62#(TT3NQU'Y4FN!*R!0L&!m#J)DekGqh#b8KR8qdf GRP2GAP-KiU!L"B%*Sk5d5)6EaH#)[PIDY%S1@r*6qYD5UVY)!6#+`rCT90@@9Pe f2`GT'%#NQ#rGViDr-TX*c4h*ZF&UDGhd8#EVl2LPpXTG,1UBF+D[#,LFFA'M6hk aJlBC8ddU!5Jbm*cPYFM`F6U4T3P"cP5M4EI0#+a8Q&2*TZfZ$l3IHC-,JBb`J%Z M`R!22V-D@MMYTEq0m*B$""L&-$@R%596"[Y'"qFra9-Ll2Z-cHJL[EXIP'YaGET P'3DN&iTMTYek#5*m+A@ETbN-G05Sc1+XHL(!DZY!%dkdDD6R-hV,'3Ikh+&mSN& -$+H4C`,MB)CXi!6q#APCi06hY-'MNZSFYk)HqJTBrM*2fl@e2TE3,dRPR3l'SjS G+-r!A3fY2ah6+jU&d+ri0$T43"64%'$1#d6LUFZ92*J)LB*L!Qk[(fX1er@U!4% Llp(48ifPZ"mbC[CZfd+SP`!`D9p(TPP,TXVfC4Xm8Dj@CqdY&8jm(+Y4&LfUEL& P)G!9k1%F5EXQAZZkZcKeG"+M(VS9++C3`L(1*0B$Q9P`1[I00-iHaEaJ!$*#K*! !9I$I8E4Y&N93S$IC+3YfR"!"rR+SU0YPEL+0FM`*IpkDSHLXH4$#SVXmC6[%'bf 3!#I5Af,bTHD$ik9fPDU"*TL8I#!9$8r9bK'KX@R21k6B#Q+#8d+(SHA-G$0p%Fb Y+*IGiF,D"rkEcVBL,Tq*PhSSM''Y65ddf,lBF-6FQVaEV6BZBqZVIi,VCa2`N9J ldk3`Tf0jM0@3!2fZqZ80lVFI!k`AD2LAf`AV$pie&$'BpGPE,2&q)&mpa01GL"i I,aVddjPG4NUYPi"QlZN[N!$D0Q0`$q6@5-Zi)d[%6%26i2M8K(,#@hLj#-EA6!J pKr$AaV*JP@S"IMX)VFiPjm@N[Y&"bXdQ,A+YYih0"P`dH5VrG$Ij"aT#N!!b,3q HVfA3*UBE`AMTjm[f,b$bB3c"NC!!-RIDMC%$8k,emVqD@Nb(qjMPS$iF@LSm)r` lE#GT$83$1MriQh8q`dC'm1`E(k86FZ@a@T'JXQXT(f-!VbbiQ(bG+qKIdf4Ik@j AX6mhU1l[#@e,M-r%66H2Ecm+FX2FDX"IpEBpL(,SGMTb$lD0SmTe(X0&qLaA,ji VR!lL`lU1aERrM1d%bPK1'KqK%LV8XZD%U4cMK#3ik%bi&Ccc!m(maEM)c%#[l4h kBhF(8Pf-Y(9V9b6mi,&XRMmpY4-XeQS9cl&U,liFY-L@**E)$rGS&Ej9("ddMEF kpV9"led`(i5pIXPjjCKL(C`8qFpbj"&6V8A6c*F5G@EMACK6'N$alR2-0(`$FPB la`e#rPpr`"MIBA"V,VV$)`M@Mal5S)c5l5HQB+ZK8AVAR'Qi(`k+T('9+)95H0K @9Z4lE'-,T3fV0,CIUm#i%ReI*aGc01!)k1+IkjrhcM"eZ$DD&RrXGH86d'P4I`' Ib4#'LU"mH`+!d&q''ilmFe!cl+"'aak)[&'NBEFeUMI'`l3+%ircfca0iYef#1j *c2,QihC"$T!!jTT#c,fl,c4HcK[-&0aER!$%Zm@k1`2UfL`8+KH(2b3Jbh&-TAf %Xk!d@RqR+c`)%D',mBMNb1$9iI'`%SY0-Z"!Z63*%Q&-hRKKL$-,84KUQ`raX#' RJRpA4,@-*iM2MaAH*`[apdZ`QK$5rdAd+d2H$&10b`RKB!"A61'$!f9(HX[2pSp j)R#*3Z5aT6p+"T!!1`lrFHp2TPchN!!9aHdQeYLBr(DbIP%%hd0(N!!YUZkEQ5Z +6#P"dQ5pbYpS%BTRb4PUB58'@fSCjfBSF#V*5MNiRdihbSGSYdU5*9NPiT6i4XB Ge[1'E#V`AEpDcD((Y"b3!*f6S!F(ilCmBh)$Y@(cNE5hDpJqj[qH8QVXQ!'C"k- &Jf!H0a5"h6@"0UXcCPNSQa@2$1B(1bM'6TMZ51ATGpTfN!!M6[l[QJI"%l((dX) TlV0E-qd[KFI46`9!1YJj`SY`"VBaC#jCDj*iEjhN3dLFN5@'e0k5"Ck'@pdBXaD ,#ElN(2A4[pJ-PJPA"*[V['1DSBqKGG,ahhJCqffGdUT$4q"ddpLQBm9NbeRkA'` eDqB!k2qVPc-b%D$PPCBkjU&2G*-#Z6L#E6qKI`l5ZCr&"6Vd+FBiNNFdLi&h5G+ dQPQ'm$@5Uj[S6ZSJ6G*8GMc6Zr*Dkkb"i)3NrD&4rVpJZXkH*kq8G2IhLacGU,% h!-(A5hc8TV1&M!XRD,5-cEc%6[pB&CFJl0(mEq-!DcQi5D%%B3jqT-&!-kl[edk Pl-E0cVFIA"'&H8'K9hS5eZEr`VTD%&NV&%&iGE%I%&FiX"YSa$KpRmGeB&AcT0i Iad9M6U(d9mR#$Lq@iZa'*iKN`XLdh68@-"*LN!$64'++F,d`dHA$CSPm2*D"R6H BTI1#V$r5949LiNdJ*"HZ0a,M9IA8!2!"fL&(2kiH,!YYUP1)3!bFKq#F2)Gd62r dG)S[eX,fCrm4ipd-QrJH-#"b6-6[jd0I0bL"JHb$fQ!q!%F8R80cVjMJ$RFrUkT LKU2BML-FEDhN`'8D!!!: \ No newline at end of file
diff --git a/macos/src/XMLTestPrefix.h b/macos/src/XMLTestPrefix.h
new file mode 100644
index 0000000..3e84255
--- /dev/null
+++ b/macos/src/XMLTestPrefix.h
@@ -0,0 +1 @@
+int test_main(int argc, char **argv); #define main(X,Y) test_main(X,Y) \ No newline at end of file
diff --git a/macos/src/XMLTestPrefix2.h b/macos/src/XMLTestPrefix2.h
new file mode 100644
index 0000000..55df51e
--- /dev/null
+++ b/macos/src/XMLTestPrefix2.h
@@ -0,0 +1 @@
+int test_main(int argc, char* argv[]); #define main() test_main(int argc, char* argv[]) \ No newline at end of file
diff --git a/macos/src/config-mac.h b/macos/src/config-mac.h
new file mode 100644
index 0000000..e9a8f9d
--- /dev/null
+++ b/macos/src/config-mac.h
@@ -0,0 +1,192 @@
+/* config.h generated manually for macos. */
+
+/* Define if you have the strftime function. */
+#define HAVE_STRFTIME
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS
+
+#define PACKAGE
+#define VERSION
+
+#undef HAVE_LIBZ
+#undef HAVE_LIBM
+#undef HAVE_ISINF
+#undef HAVE_ISNAN
+#undef HAVE_LIBHISTORY
+#undef HAVE_LIBREADLINE
+
+#define XML_SOCKLEN_T socklen_t
+#define HAVE_LIBPTHREAD
+#define HAVE_PTHREAD_H
+#define LIBXML_THREAD_ENABLED
+
+/* Define if you have the _stat function. */
+#define HAVE__STAT
+
+/* Define if you have the class function. */
+#undef HAVE_CLASS
+
+/* Define if you have the finite function. */
+#undef HAVE_FINITE
+
+/* Define if you have the fp_class function. */
+#undef HAVE_FP_CLASS
+
+/* Define if you have the fpclass function. */
+#undef HAVE_FPCLASS
+
+/* Define if you have the fprintf function. */
+#define HAVE_FPRINTF
+
+/* Define if you have the isnand function. */
+#undef HAVE_ISNAND
+
+/* Define if you have the localtime function. */
+#define HAVE_LOCALTIME
+
+/* Define if you have the printf function. */
+#define HAVE_PRINTF
+
+/* Define if you have the signal function. */
+#define HAVE_SIGNAL
+
+/* Define if you have the snprintf function. */
+#define HAVE_SNPRINTF
+
+/* Define if you have the sprintf function. */
+#define HAVE_SPRINTF
+
+/* Define if you have the sscanf function. */
+#define HAVE_SSCANF
+
+/* Define if you have the stat function. */
+#define HAVE_STAT
+
+/* Define if you have the strdup function. */
+#define HAVE_STRDUP
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR
+
+/* Define if you have the strftime function. */
+#define HAVE_STRFTIME
+
+/* Define if you have the strndup function. */
+#define HAVE_STRNDUP
+
+/* Define if you have the vfprintf function. */
+#define HAVE_VFPRINTF
+
+/* Define if you have the vsnprintf function. */
+#define HAVE_VSNPRINTF
+
+/* Define if you have the vsprintf function. */
+#define HAVE_VSPRINTF
+
+/* Define if you have the <ansidecl.h> header file. */
+#define HAVE_ANSIDECL_H
+
+/* Define if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H
+
+/* Define if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H
+
+/* Define if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H
+
+/* Define if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H
+
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H
+
+/* Define if you have the <float.h> header file. */
+#define HAVE_FLOAT_H
+
+/* Define if you have the <fp_class.h> header file. */
+#define HAVE_FP_CLASS_H
+
+/* Define if you have the <ieeefp.h> header file. */
+#define HAVE_IEEEFP_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <math.h> header file. */
+#define HAVE_MATH_H
+
+/* Define if you have the <nan.h> header file. */
+#define HAVE_NAN_H
+
+/* Define if you have the <ndir.h> header file. */
+#define HAVE_NDIR_H
+
+/* Define if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H
+
+/* Define if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H
+
+/* Define if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H
+
+/* Define if you have the <sys/dir.h> header file. */
+#define HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define if you have the <sys/ndir.h> header file. */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H
+
+/* Define if you have the <time.h> header file. */
+#define HAVE_TIME_H
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H
+
+/* Define if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Name of package */
+#define PACKAGE
+
+/* Version number of package */
+#define VERSION
+
+/* Define if compiler has function prototypes */
+#define PROTOTYPES
+
+#include <libxml/xmlversion.h>
+#include <sys/types.h>
+#include <extra/stricmp.h>
+#include <extra/strdup.h>
diff --git a/macos/src/libxml2_GUSIConfig.cp b/macos/src/libxml2_GUSIConfig.cp
new file mode 100644
index 0000000..77d0c93
--- /dev/null
+++ b/macos/src/libxml2_GUSIConfig.cp
@@ -0,0 +1 @@
+/**************** BEGIN GUSI CONFIGURATION **************************** * * GUSI Configuration section generated by GUSI Configurator * last modified: Wed Oct 31 17:07:45 2001 * * This section will be overwritten by the next run of Configurator. */ #define GUSI_SOURCE #include <GUSIConfig.h> #include <sys/cdefs.h> /* Declarations of Socket Factories */ __BEGIN_DECLS void GUSIwithInetSockets(); void GUSIwithLocalSockets(); void GUSIwithMTInetSockets(); void GUSIwithMTTcpSockets(); void GUSIwithMTUdpSockets(); void GUSIwithOTInetSockets(); void GUSIwithOTTcpSockets(); void GUSIwithOTUdpSockets(); void GUSIwithPPCSockets(); void GUSISetupFactories(); __END_DECLS /* Configure Socket Factories */ void GUSISetupFactories() { #ifdef GUSISetupFactories_BeginHook GUSISetupFactories_BeginHook #endif GUSIwithInetSockets(); #ifdef GUSISetupFactories_EndHook GUSISetupFactories_EndHook #endif } /* Declarations of File Devices */ __BEGIN_DECLS void GUSIwithNullSockets(); void GUSISetupDevices(); __END_DECLS /* Configure File Devices */ void GUSISetupDevices() { #ifdef GUSISetupDevices_BeginHook GUSISetupDevices_BeginHook #endif GUSIwithNullSockets(); #ifdef GUSISetupDevices_EndHook GUSISetupDevices_EndHook #endif } #ifndef __cplusplus #error GUSISetupConfig() needs to be written in C++ #endif GUSIConfiguration::FileSuffix sSuffices[] = { "", '????', '????' }; extern "C" void GUSISetupConfig() { GUSIConfiguration * config = GUSIConfiguration::CreateInstance(GUSIConfiguration::kNoResource); config->ConfigureDefaultTypeCreator('TEXT', 'CWIE'); config->ConfigureSuffices( sizeof(sSuffices)/sizeof(GUSIConfiguration::FileSuffix)-1, sSuffices); } /**************** END GUSI CONFIGURATION *************************/ \ No newline at end of file
diff --git a/macos/src/macos_main.c b/macos/src/macos_main.c
new file mode 100644
index 0000000..2625000
--- /dev/null
+++ b/macos/src/macos_main.c
@@ -0,0 +1 @@
+#include <GUSICommandLine.h> #include <stdlib.h> #undef main DECLARE_MAIN(test) REGISTER_MAIN_START REGISTER_MAIN(test) REGISTER_MAIN_END int main() { (void) exec_commands(); return 0; } \ No newline at end of file
diff --git a/missing b/missing
new file mode 100755
index 0000000..cdea514
--- /dev/null
+++ b/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2012-06-26.16; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/nanoftp.c b/nanoftp.c
new file mode 100644
index 0000000..2135ab9
--- /dev/null
+++ b/nanoftp.c
@@ -0,0 +1,2121 @@
+/*
+ * nanoftp.c: basic FTP client support
+ *
+ * Reference: RFC 959
+ */
+
+#ifdef TESTING
+#define STANDALONE
+#define HAVE_STDLIB_H
+#define HAVE_UNISTD_H
+#define HAVE_SYS_SOCKET_H
+#define HAVE_NETINET_IN_H
+#define HAVE_NETDB_H
+#define HAVE_SYS_TIME_H
+#else /* TESTING */
+#define NEED_SOCKETS
+#endif /* TESTING */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_FTP_ENABLED
+#include <string.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/uri.h>
+#include <libxml/nanoftp.h>
+#include <libxml/globals.h>
+
+/* #define DEBUG_FTP 1 */
+#ifdef STANDALONE
+#ifndef DEBUG_FTP
+#define DEBUG_FTP 1
+#endif
+#endif
+
+
+#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_
+#endif
+#include <wsockcompat.h>
+#include <winsock2.h>
+#undef XML_SOCKLEN_T
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+/**
+ * A couple portability macros
+ */
+#ifndef _WINSOCKAPI_
+#if !defined(__BEOS__) || defined(__HAIKU__)
+#define closesocket(s) close(s)
+#endif
+#endif
+
+#ifdef __BEOS__
+#ifndef PF_INET
+#define PF_INET AF_INET
+#endif
+#endif
+
+#ifdef _AIX
+#ifdef HAVE_BROKEN_SS_FAMILY
+#define ss_family __ss_family
+#endif
+#endif
+
+#ifndef XML_SOCKLEN_T
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+#define FTP_COMMAND_OK 200
+#define FTP_SYNTAX_ERROR 500
+#define FTP_GET_PASSWD 331
+#define FTP_BUF_SIZE 1024
+
+#define XML_NANO_MAX_URLBUF 4096
+
+typedef struct xmlNanoFTPCtxt {
+ char *protocol; /* the protocol name */
+ char *hostname; /* the host name */
+ int port; /* the port */
+ char *path; /* the path within the URL */
+ char *user; /* user string */
+ char *passwd; /* passwd string */
+#ifdef SUPPORT_IP6
+ struct sockaddr_storage ftpAddr; /* this is large enough to hold IPv6 address*/
+#else
+ struct sockaddr_in ftpAddr; /* the socket address struct */
+#endif
+ int passive; /* currently we support only passive !!! */
+ SOCKET controlFd; /* the file descriptor for the control socket */
+ SOCKET dataFd; /* the file descriptor for the data socket */
+ int state; /* WRITE / READ / CLOSED */
+ int returnValue; /* the protocol return value */
+ /* buffer for data received from the control connection */
+ char controlBuf[FTP_BUF_SIZE + 1];
+ int controlBufIndex;
+ int controlBufUsed;
+ int controlBufAnswer;
+} xmlNanoFTPCtxt, *xmlNanoFTPCtxtPtr;
+
+static int initialized = 0;
+static char *proxy = NULL; /* the proxy name if any */
+static int proxyPort = 0; /* the proxy port if any */
+static char *proxyUser = NULL; /* user for proxy authentication */
+static char *proxyPasswd = NULL;/* passwd for proxy authentication */
+static int proxyType = 0; /* uses TYPE or a@b ? */
+
+#ifdef SUPPORT_IP6
+static
+int have_ipv6(void) {
+ int s;
+
+ s = socket (AF_INET6, SOCK_STREAM, 0);
+ if (s != -1) {
+ close (s);
+ return (1);
+ }
+ return (0);
+}
+#endif
+
+/**
+ * xmlFTPErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlFTPErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_FTP, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * xmlNanoFTPInit:
+ *
+ * Initialize the FTP protocol layer.
+ * Currently it just checks for proxy informations,
+ * and get the hostname
+ */
+
+void
+xmlNanoFTPInit(void) {
+ const char *env;
+#ifdef _WINSOCKAPI_
+ WSADATA wsaData;
+#endif
+
+ if (initialized)
+ return;
+
+#ifdef _WINSOCKAPI_
+ if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
+ return;
+#endif
+
+ proxyPort = 21;
+ env = getenv("no_proxy");
+ if (env && ((env[0] == '*' ) && (env[1] == 0)))
+ return;
+ env = getenv("ftp_proxy");
+ if (env != NULL) {
+ xmlNanoFTPScanProxy(env);
+ } else {
+ env = getenv("FTP_PROXY");
+ if (env != NULL) {
+ xmlNanoFTPScanProxy(env);
+ }
+ }
+ env = getenv("ftp_proxy_user");
+ if (env != NULL) {
+ proxyUser = xmlMemStrdup(env);
+ }
+ env = getenv("ftp_proxy_password");
+ if (env != NULL) {
+ proxyPasswd = xmlMemStrdup(env);
+ }
+ initialized = 1;
+}
+
+/**
+ * xmlNanoFTPCleanup:
+ *
+ * Cleanup the FTP protocol layer. This cleanup proxy informations.
+ */
+
+void
+xmlNanoFTPCleanup(void) {
+ if (proxy != NULL) {
+ xmlFree(proxy);
+ proxy = NULL;
+ }
+ if (proxyUser != NULL) {
+ xmlFree(proxyUser);
+ proxyUser = NULL;
+ }
+ if (proxyPasswd != NULL) {
+ xmlFree(proxyPasswd);
+ proxyPasswd = NULL;
+ }
+#ifdef _WINSOCKAPI_
+ if (initialized)
+ WSACleanup();
+#endif
+ initialized = 0;
+}
+
+/**
+ * xmlNanoFTPProxy:
+ * @host: the proxy host name
+ * @port: the proxy port
+ * @user: the proxy user name
+ * @passwd: the proxy password
+ * @type: the type of proxy 1 for using SITE, 2 for USER a@b
+ *
+ * Setup the FTP proxy informations.
+ * This can also be done by using ftp_proxy ftp_proxy_user and
+ * ftp_proxy_password environment variables.
+ */
+
+void
+xmlNanoFTPProxy(const char *host, int port, const char *user,
+ const char *passwd, int type) {
+ if (proxy != NULL) {
+ xmlFree(proxy);
+ proxy = NULL;
+ }
+ if (proxyUser != NULL) {
+ xmlFree(proxyUser);
+ proxyUser = NULL;
+ }
+ if (proxyPasswd != NULL) {
+ xmlFree(proxyPasswd);
+ proxyPasswd = NULL;
+ }
+ if (host)
+ proxy = xmlMemStrdup(host);
+ if (user)
+ proxyUser = xmlMemStrdup(user);
+ if (passwd)
+ proxyPasswd = xmlMemStrdup(passwd);
+ proxyPort = port;
+ proxyType = type;
+}
+
+/**
+ * xmlNanoFTPScanURL:
+ * @ctx: an FTP context
+ * @URL: The URL used to initialize the context
+ *
+ * (Re)Initialize an FTP context by parsing the URL and finding
+ * the protocol host port and path it indicates.
+ */
+
+static void
+xmlNanoFTPScanURL(void *ctx, const char *URL) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ xmlURIPtr uri;
+
+ /*
+ * Clear any existing data from the context
+ */
+ if (ctxt->protocol != NULL) {
+ xmlFree(ctxt->protocol);
+ ctxt->protocol = NULL;
+ }
+ if (ctxt->hostname != NULL) {
+ xmlFree(ctxt->hostname);
+ ctxt->hostname = NULL;
+ }
+ if (ctxt->path != NULL) {
+ xmlFree(ctxt->path);
+ ctxt->path = NULL;
+ }
+ if (URL == NULL) return;
+
+ uri = xmlParseURIRaw(URL, 1);
+ if (uri == NULL)
+ return;
+
+ if ((uri->scheme == NULL) || (uri->server == NULL)) {
+ xmlFreeURI(uri);
+ return;
+ }
+
+ ctxt->protocol = xmlMemStrdup(uri->scheme);
+ ctxt->hostname = xmlMemStrdup(uri->server);
+ if (uri->path != NULL)
+ ctxt->path = xmlMemStrdup(uri->path);
+ else
+ ctxt->path = xmlMemStrdup("/");
+ if (uri->port != 0)
+ ctxt->port = uri->port;
+
+ if (uri->user != NULL) {
+ char *cptr;
+ if ((cptr=strchr(uri->user, ':')) == NULL)
+ ctxt->user = xmlMemStrdup(uri->user);
+ else {
+ ctxt->user = (char *)xmlStrndup((xmlChar *)uri->user,
+ (cptr - uri->user));
+ ctxt->passwd = xmlMemStrdup(cptr+1);
+ }
+ }
+
+ xmlFreeURI(uri);
+
+}
+
+/**
+ * xmlNanoFTPUpdateURL:
+ * @ctx: an FTP context
+ * @URL: The URL used to update the context
+ *
+ * Update an FTP context by parsing the URL and finding
+ * new path it indicates. If there is an error in the
+ * protocol, hostname, port or other information, the
+ * error is raised. It indicates a new connection has to
+ * be established.
+ *
+ * Returns 0 if Ok, -1 in case of error (other host).
+ */
+
+int
+xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ xmlURIPtr uri;
+
+ if (URL == NULL)
+ return(-1);
+ if (ctxt == NULL)
+ return(-1);
+ if (ctxt->protocol == NULL)
+ return(-1);
+ if (ctxt->hostname == NULL)
+ return(-1);
+
+ uri = xmlParseURIRaw(URL, 1);
+ if (uri == NULL)
+ return(-1);
+
+ if ((uri->scheme == NULL) || (uri->server == NULL)) {
+ xmlFreeURI(uri);
+ return(-1);
+ }
+ if ((strcmp(ctxt->protocol, uri->scheme)) ||
+ (strcmp(ctxt->hostname, uri->server)) ||
+ ((uri->port != 0) && (ctxt->port != uri->port))) {
+ xmlFreeURI(uri);
+ return(-1);
+ }
+
+ if (uri->port != 0)
+ ctxt->port = uri->port;
+
+ if (ctxt->path != NULL) {
+ xmlFree(ctxt->path);
+ ctxt->path = NULL;
+ }
+
+ if (uri->path == NULL)
+ ctxt->path = xmlMemStrdup("/");
+ else
+ ctxt->path = xmlMemStrdup(uri->path);
+
+ xmlFreeURI(uri);
+
+ return(0);
+}
+
+/**
+ * xmlNanoFTPScanProxy:
+ * @URL: The proxy URL used to initialize the proxy context
+ *
+ * (Re)Initialize the FTP Proxy context by parsing the URL and finding
+ * the protocol host port it indicates.
+ * Should be like ftp://myproxy/ or ftp://myproxy:3128/
+ * A NULL URL cleans up proxy informations.
+ */
+
+void
+xmlNanoFTPScanProxy(const char *URL) {
+ xmlURIPtr uri;
+
+ if (proxy != NULL) {
+ xmlFree(proxy);
+ proxy = NULL;
+ }
+ proxyPort = 0;
+
+#ifdef DEBUG_FTP
+ if (URL == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Removing FTP proxy info\n");
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Using FTP proxy %s\n", URL);
+#endif
+ if (URL == NULL) return;
+
+ uri = xmlParseURIRaw(URL, 1);
+ if ((uri == NULL) || (uri->scheme == NULL) ||
+ (strcmp(uri->scheme, "ftp")) || (uri->server == NULL)) {
+ __xmlIOErr(XML_FROM_FTP, XML_FTP_URL_SYNTAX, "Syntax Error\n");
+ if (uri != NULL)
+ xmlFreeURI(uri);
+ return;
+ }
+
+ proxy = xmlMemStrdup(uri->server);
+ if (uri->port != 0)
+ proxyPort = uri->port;
+
+ xmlFreeURI(uri);
+}
+
+/**
+ * xmlNanoFTPNewCtxt:
+ * @URL: The URL used to initialize the context
+ *
+ * Allocate and initialize a new FTP context.
+ *
+ * Returns an FTP context or NULL in case of error.
+ */
+
+void*
+xmlNanoFTPNewCtxt(const char *URL) {
+ xmlNanoFTPCtxtPtr ret;
+ char *unescaped;
+
+ ret = (xmlNanoFTPCtxtPtr) xmlMalloc(sizeof(xmlNanoFTPCtxt));
+ if (ret == NULL) {
+ xmlFTPErrMemory("allocating FTP context");
+ return(NULL);
+ }
+
+ memset(ret, 0, sizeof(xmlNanoFTPCtxt));
+ ret->port = 21;
+ ret->passive = 1;
+ ret->returnValue = 0;
+ ret->controlBufIndex = 0;
+ ret->controlBufUsed = 0;
+ ret->controlFd = INVALID_SOCKET;
+
+ unescaped = xmlURIUnescapeString(URL, 0, NULL);
+ if (unescaped != NULL) {
+ xmlNanoFTPScanURL(ret, unescaped);
+ xmlFree(unescaped);
+ } else if (URL != NULL)
+ xmlNanoFTPScanURL(ret, URL);
+
+ return(ret);
+}
+
+/**
+ * xmlNanoFTPFreeCtxt:
+ * @ctx: an FTP context
+ *
+ * Frees the context after closing the connection.
+ */
+
+void
+xmlNanoFTPFreeCtxt(void * ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ if (ctxt == NULL) return;
+ if (ctxt->hostname != NULL) xmlFree(ctxt->hostname);
+ if (ctxt->protocol != NULL) xmlFree(ctxt->protocol);
+ if (ctxt->path != NULL) xmlFree(ctxt->path);
+ ctxt->passive = 1;
+ if (ctxt->controlFd != INVALID_SOCKET) closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlBufIndex = -1;
+ ctxt->controlBufUsed = -1;
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlNanoFTPParseResponse:
+ * @buf: the buffer containing the response
+ * @len: the buffer length
+ *
+ * Parsing of the server answer, we just extract the code.
+ *
+ * returns 0 for errors
+ * +XXX for last line of response
+ * -XXX for response to be continued
+ */
+static int
+xmlNanoFTPParseResponse(char *buf, int len) {
+ int val = 0;
+
+ if (len < 3) return(-1);
+ if ((*buf >= '0') && (*buf <= '9'))
+ val = val * 10 + (*buf - '0');
+ else
+ return(0);
+ buf++;
+ if ((*buf >= '0') && (*buf <= '9'))
+ val = val * 10 + (*buf - '0');
+ else
+ return(0);
+ buf++;
+ if ((*buf >= '0') && (*buf <= '9'))
+ val = val * 10 + (*buf - '0');
+ else
+ return(0);
+ buf++;
+ if (*buf == '-')
+ return(-val);
+ return(val);
+}
+
+/**
+ * xmlNanoFTPGetMore:
+ * @ctx: an FTP context
+ *
+ * Read more information from the FTP control connection
+ * Returns the number of bytes read, < 0 indicates an error
+ */
+static int
+xmlNanoFTPGetMore(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ int len;
+ int size;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+
+ if ((ctxt->controlBufIndex < 0) || (ctxt->controlBufIndex > FTP_BUF_SIZE)) {
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPGetMore : controlBufIndex = %d\n",
+ ctxt->controlBufIndex);
+#endif
+ return(-1);
+ }
+
+ if ((ctxt->controlBufUsed < 0) || (ctxt->controlBufUsed > FTP_BUF_SIZE)) {
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPGetMore : controlBufUsed = %d\n",
+ ctxt->controlBufUsed);
+#endif
+ return(-1);
+ }
+ if (ctxt->controlBufIndex > ctxt->controlBufUsed) {
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPGetMore : controlBufIndex > controlBufUsed %d > %d\n",
+ ctxt->controlBufIndex, ctxt->controlBufUsed);
+#endif
+ return(-1);
+ }
+
+ /*
+ * First pack the control buffer
+ */
+ if (ctxt->controlBufIndex > 0) {
+ memmove(&ctxt->controlBuf[0], &ctxt->controlBuf[ctxt->controlBufIndex],
+ ctxt->controlBufUsed - ctxt->controlBufIndex);
+ ctxt->controlBufUsed -= ctxt->controlBufIndex;
+ ctxt->controlBufIndex = 0;
+ }
+ size = FTP_BUF_SIZE - ctxt->controlBufUsed;
+ if (size == 0) {
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPGetMore : buffer full %d \n", ctxt->controlBufUsed);
+#endif
+ return(0);
+ }
+
+ /*
+ * Read the amount left on the control connection
+ */
+ if ((len = recv(ctxt->controlFd, &ctxt->controlBuf[ctxt->controlBufIndex],
+ size, 0)) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "recv failed");
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPGetMore : read %d [%d - %d]\n", len,
+ ctxt->controlBufUsed, ctxt->controlBufUsed + len);
+#endif
+ ctxt->controlBufUsed += len;
+ ctxt->controlBuf[ctxt->controlBufUsed] = 0;
+
+ return(len);
+}
+
+/**
+ * xmlNanoFTPReadResponse:
+ * @ctx: an FTP context
+ *
+ * Read the response from the FTP server after a command.
+ * Returns the code number
+ */
+static int
+xmlNanoFTPReadResponse(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char *ptr, *end;
+ int len;
+ int res = -1, cur = -1;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+
+get_more:
+ /*
+ * Assumes everything up to controlBuf[controlBufIndex] has been read
+ * and analyzed.
+ */
+ len = xmlNanoFTPGetMore(ctx);
+ if (len < 0) {
+ return(-1);
+ }
+ if ((ctxt->controlBufUsed == 0) && (len == 0)) {
+ return(-1);
+ }
+ ptr = &ctxt->controlBuf[ctxt->controlBufIndex];
+ end = &ctxt->controlBuf[ctxt->controlBufUsed];
+
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "\n<<<\n%s\n--\n", ptr);
+#endif
+ while (ptr < end) {
+ cur = xmlNanoFTPParseResponse(ptr, end - ptr);
+ if (cur > 0) {
+ /*
+ * Successfully scanned the control code, scratch
+ * till the end of the line, but keep the index to be
+ * able to analyze the result if needed.
+ */
+ res = cur;
+ ptr += 3;
+ ctxt->controlBufAnswer = ptr - ctxt->controlBuf;
+ while ((ptr < end) && (*ptr != '\n')) ptr++;
+ if (*ptr == '\n') ptr++;
+ if (*ptr == '\r') ptr++;
+ break;
+ }
+ while ((ptr < end) && (*ptr != '\n')) ptr++;
+ if (ptr >= end) {
+ ctxt->controlBufIndex = ctxt->controlBufUsed;
+ goto get_more;
+ }
+ if (*ptr != '\r') ptr++;
+ }
+
+ if (res < 0) goto get_more;
+ ctxt->controlBufIndex = ptr - ctxt->controlBuf;
+#ifdef DEBUG_FTP
+ ptr = &ctxt->controlBuf[ctxt->controlBufIndex];
+ xmlGenericError(xmlGenericErrorContext, "\n---\n%s\n--\n", ptr);
+#endif
+
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "Got %d\n", res);
+#endif
+ return(res / 100);
+}
+
+/**
+ * xmlNanoFTPGetResponse:
+ * @ctx: an FTP context
+ *
+ * Get the response from the FTP server after a command.
+ * Returns the code number
+ */
+
+int
+xmlNanoFTPGetResponse(void *ctx) {
+ int res;
+
+ res = xmlNanoFTPReadResponse(ctx);
+
+ return(res);
+}
+
+/**
+ * xmlNanoFTPCheckResponse:
+ * @ctx: an FTP context
+ *
+ * Check if there is a response from the FTP server after a command.
+ * Returns the code number, or 0
+ */
+
+int
+xmlNanoFTPCheckResponse(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ fd_set rfd;
+ struct timeval tv;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ FD_ZERO(&rfd);
+ FD_SET(ctxt->controlFd, &rfd);
+ switch(select(ctxt->controlFd + 1, &rfd, NULL, NULL, &tv)) {
+ case 0:
+ return(0);
+ case -1:
+ __xmlIOErr(XML_FROM_FTP, 0, "select");
+ return(-1);
+
+ }
+
+ return(xmlNanoFTPReadResponse(ctx));
+}
+
+/**
+ * Send the user authentication
+ */
+
+static int
+xmlNanoFTPSendUser(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[200];
+ int len;
+ int res;
+
+ if (ctxt->user == NULL)
+ snprintf(buf, sizeof(buf), "USER anonymous\r\n");
+ else
+ snprintf(buf, sizeof(buf), "USER %s\r\n", ctxt->user);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ return(res);
+ }
+ return(0);
+}
+
+/**
+ * Send the password authentication
+ */
+
+static int
+xmlNanoFTPSendPasswd(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[200];
+ int len;
+ int res;
+
+ if (ctxt->passwd == NULL)
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
+ else
+ snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ return(res);
+ }
+ return(0);
+}
+
+/**
+ * xmlNanoFTPQuit:
+ * @ctx: an FTP context
+ *
+ * Send a QUIT command to the server
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+
+
+int
+xmlNanoFTPQuit(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[200];
+ int len, res;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+
+ snprintf(buf, sizeof(buf), "QUIT\r\n");
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf); /* Just to be consistent, even though we know it can't have a % in it */
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ return(res);
+ }
+ return(0);
+}
+
+/**
+ * xmlNanoFTPConnect:
+ * @ctx: an FTP context
+ *
+ * Tries to open a control connection
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+
+int
+xmlNanoFTPConnect(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ struct hostent *hp;
+ int port;
+ int res;
+ int addrlen = sizeof (struct sockaddr_in);
+
+ if (ctxt == NULL)
+ return(-1);
+ if (ctxt->hostname == NULL)
+ return(-1);
+
+ /*
+ * do the blocking DNS query.
+ */
+ if (proxy) {
+ port = proxyPort;
+ } else {
+ port = ctxt->port;
+ }
+ if (port == 0)
+ port = 21;
+
+ memset (&ctxt->ftpAddr, 0, sizeof(ctxt->ftpAddr));
+
+#ifdef SUPPORT_IP6
+ if (have_ipv6 ()) {
+ struct addrinfo hints, *tmp, *result;
+
+ result = NULL;
+ memset (&hints, 0, sizeof(hints));
+ hints.ai_socktype = SOCK_STREAM;
+
+ if (proxy) {
+ if (getaddrinfo (proxy, NULL, &hints, &result) != 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed");
+ return (-1);
+ }
+ }
+ else
+ if (getaddrinfo (ctxt->hostname, NULL, &hints, &result) != 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed");
+ return (-1);
+ }
+
+ for (tmp = result; tmp; tmp = tmp->ai_next)
+ if (tmp->ai_family == AF_INET || tmp->ai_family == AF_INET6)
+ break;
+
+ if (!tmp) {
+ if (result)
+ freeaddrinfo (result);
+ __xmlIOErr(XML_FROM_FTP, 0, "getaddrinfo failed");
+ return (-1);
+ }
+ if (tmp->ai_addrlen > sizeof(ctxt->ftpAddr)) {
+ if (result)
+ freeaddrinfo (result);
+ __xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch");
+ return (-1);
+ }
+ if (tmp->ai_family == AF_INET6) {
+ memcpy (&ctxt->ftpAddr, tmp->ai_addr, tmp->ai_addrlen);
+ ((struct sockaddr_in6 *) &ctxt->ftpAddr)->sin6_port = htons (port);
+ ctxt->controlFd = socket (AF_INET6, SOCK_STREAM, 0);
+ }
+ else {
+ memcpy (&ctxt->ftpAddr, tmp->ai_addr, tmp->ai_addrlen);
+ ((struct sockaddr_in *) &ctxt->ftpAddr)->sin_port = htons (port);
+ ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
+ }
+ addrlen = tmp->ai_addrlen;
+ freeaddrinfo (result);
+ }
+ else
+#endif
+ {
+ if (proxy)
+ hp = gethostbyname (GETHOSTBYNAME_ARG_CAST proxy);
+ else
+ hp = gethostbyname (GETHOSTBYNAME_ARG_CAST ctxt->hostname);
+ if (hp == NULL) {
+ __xmlIOErr(XML_FROM_FTP, 0, "gethostbyname failed");
+ return (-1);
+ }
+ if ((unsigned int) hp->h_length >
+ sizeof(((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr)) {
+ __xmlIOErr(XML_FROM_FTP, 0, "gethostbyname address mismatch");
+ return (-1);
+ }
+
+ /*
+ * Prepare the socket
+ */
+ ((struct sockaddr_in *)&ctxt->ftpAddr)->sin_family = AF_INET;
+ memcpy (&((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr,
+ hp->h_addr_list[0], hp->h_length);
+ ((struct sockaddr_in *)&ctxt->ftpAddr)->sin_port =
+ (unsigned short)htons ((unsigned short)port);
+ ctxt->controlFd = socket (AF_INET, SOCK_STREAM, 0);
+ addrlen = sizeof (struct sockaddr_in);
+ }
+
+ if (ctxt->controlFd == INVALID_SOCKET) {
+ __xmlIOErr(XML_FROM_FTP, 0, "socket failed");
+ return(-1);
+ }
+
+ /*
+ * Do the connect.
+ */
+ if (connect(ctxt->controlFd, (struct sockaddr *) &ctxt->ftpAddr,
+ addrlen) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a connection");
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+
+ /*
+ * Wait for the HELLO from the server.
+ */
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res != 2) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+
+ /*
+ * State diagram for the login operation on the FTP server
+ *
+ * Reference: RFC 959
+ *
+ * 1
+ * +---+ USER +---+------------->+---+
+ * | B |---------->| W | 2 ---->| E |
+ * +---+ +---+------ | -->+---+
+ * | | | | |
+ * 3 | | 4,5 | | |
+ * -------------- ----- | | |
+ * | | | | |
+ * | | | | |
+ * | --------- |
+ * | 1| | | |
+ * V | | | |
+ * +---+ PASS +---+ 2 | ------>+---+
+ * | |---------->| W |------------->| S |
+ * +---+ +---+ ---------->+---+
+ * | | | | |
+ * 3 | |4,5| | |
+ * -------------- -------- |
+ * | | | | |
+ * | | | | |
+ * | -----------
+ * | 1,3| | | |
+ * V | 2| | |
+ * +---+ ACCT +---+-- | ----->+---+
+ * | |---------->| W | 4,5 -------->| F |
+ * +---+ +---+------------->+---+
+ *
+ * Of course in case of using a proxy this get really nasty and is not
+ * standardized at all :-(
+ */
+ if (proxy) {
+ int len;
+ char buf[400];
+
+ if (proxyUser != NULL) {
+ /*
+ * We need proxy auth
+ */
+ snprintf(buf, sizeof(buf), "USER %s\r\n", proxyUser);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ switch (res) {
+ case 2:
+ if (proxyPasswd == NULL)
+ break;
+ case 3:
+ if (proxyPasswd != NULL)
+ snprintf(buf, sizeof(buf), "PASS %s\r\n", proxyPasswd);
+ else
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res > 3) {
+ closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ break;
+ case 1:
+ break;
+ case 4:
+ case 5:
+ case -1:
+ default:
+ closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ }
+
+ /*
+ * We assume we don't need more authentication to the proxy
+ * and that it succeeded :-\
+ */
+ switch (proxyType) {
+ case 0:
+ /* we will try in sequence */
+ case 1:
+ /* Using SITE command */
+ snprintf(buf, sizeof(buf), "SITE %s\r\n", ctxt->hostname);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res == 2) {
+ /* we assume it worked :-\ 1 is error for SITE command */
+ proxyType = 1;
+ break;
+ }
+ if (proxyType == 1) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ case 2:
+ /* USER user@host command */
+ if (ctxt->user == NULL)
+ snprintf(buf, sizeof(buf), "USER anonymous@%s\r\n",
+ ctxt->hostname);
+ else
+ snprintf(buf, sizeof(buf), "USER %s@%s\r\n",
+ ctxt->user, ctxt->hostname);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if ((res == 1) || (res == 2)) {
+ /* we assume it worked :-\ */
+ proxyType = 2;
+ return(0);
+ }
+ if (ctxt->passwd == NULL)
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
+ else
+ snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if ((res == 1) || (res == 2)) {
+ /* we assume it worked :-\ */
+ proxyType = 2;
+ return(0);
+ }
+ if (proxyType == 2) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ case 3:
+ /*
+ * If you need support for other Proxy authentication scheme
+ * send the code or at least the sequence in use.
+ */
+ default:
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ }
+ /*
+ * Non-proxy handling.
+ */
+ res = xmlNanoFTPSendUser(ctxt);
+ if (res < 0) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ switch (res) {
+ case 2:
+ return(0);
+ case 3:
+ break;
+ case 1:
+ case 4:
+ case 5:
+ case -1:
+ default:
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ res = xmlNanoFTPSendPasswd(ctxt);
+ if (res < 0) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ switch (res) {
+ case 2:
+ break;
+ case 3:
+ __xmlIOErr(XML_FROM_FTP, XML_FTP_ACCNT,
+ "FTP server asking for ACCNT on anonymous\n");
+ case 1:
+ case 4:
+ case 5:
+ case -1:
+ default:
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+
+ return(0);
+}
+
+/**
+ * xmlNanoFTPConnectTo:
+ * @server: an FTP server name
+ * @port: the port (use 21 if 0)
+ *
+ * Tries to open a control connection to the given server/port
+ *
+ * Returns an fTP context or NULL if it failed
+ */
+
+void*
+xmlNanoFTPConnectTo(const char *server, int port) {
+ xmlNanoFTPCtxtPtr ctxt;
+ int res;
+
+ xmlNanoFTPInit();
+ if (server == NULL)
+ return(NULL);
+ if (port <= 0)
+ return(NULL);
+ ctxt = (xmlNanoFTPCtxtPtr) xmlNanoFTPNewCtxt(NULL);
+ if (ctxt == NULL)
+ return(NULL);
+ ctxt->hostname = xmlMemStrdup(server);
+ if (ctxt->hostname == NULL) {
+ xmlNanoFTPFreeCtxt(ctxt);
+ return(NULL);
+ }
+ if (port != 0)
+ ctxt->port = port;
+ res = xmlNanoFTPConnect(ctxt);
+ if (res < 0) {
+ xmlNanoFTPFreeCtxt(ctxt);
+ return(NULL);
+ }
+ return(ctxt);
+}
+
+/**
+ * xmlNanoFTPCwd:
+ * @ctx: an FTP context
+ * @directory: a directory on the server
+ *
+ * Tries to change the remote directory
+ *
+ * Returns -1 incase of error, 1 if CWD worked, 0 if it failed
+ */
+
+int
+xmlNanoFTPCwd(void *ctx, const char *directory) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[400];
+ int len;
+ int res;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+ if (directory == NULL) return 0;
+
+ /*
+ * Expected response code for CWD:
+ *
+ * CWD
+ * 250
+ * 500, 501, 502, 421, 530, 550
+ */
+ snprintf(buf, sizeof(buf), "CWD %s\r\n", directory);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res == 4) {
+ return(-1);
+ }
+ if (res == 2) return(1);
+ if (res == 5) {
+ return(0);
+ }
+ return(0);
+}
+
+/**
+ * xmlNanoFTPDele:
+ * @ctx: an FTP context
+ * @file: a file or directory on the server
+ *
+ * Tries to delete an item (file or directory) from server
+ *
+ * Returns -1 incase of error, 1 if DELE worked, 0 if it failed
+ */
+
+int
+xmlNanoFTPDele(void *ctx, const char *file) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[400];
+ int len;
+ int res;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET) ||
+ (file == NULL)) return(-1);
+
+ /*
+ * Expected response code for DELE:
+ *
+ * DELE
+ * 250
+ * 450, 550
+ * 500, 501, 502, 421, 530
+ */
+
+ snprintf(buf, sizeof(buf), "DELE %s\r\n", file);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ return(res);
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res == 4) {
+ return(-1);
+ }
+ if (res == 2) return(1);
+ if (res == 5) {
+ return(0);
+ }
+ return(0);
+}
+/**
+ * xmlNanoFTPGetConnection:
+ * @ctx: an FTP context
+ *
+ * Try to open a data connection to the server. Currently only
+ * passive mode is supported.
+ *
+ * Returns -1 incase of error, 0 otherwise
+ */
+
+SOCKET
+xmlNanoFTPGetConnection(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[200], *cur;
+ int len, i;
+ int res;
+ unsigned char ad[6], *adp, *portp;
+ unsigned int temp[6];
+#ifdef SUPPORT_IP6
+ struct sockaddr_storage dataAddr;
+#else
+ struct sockaddr_in dataAddr;
+#endif
+ XML_SOCKLEN_T dataAddrLen;
+
+ if (ctxt == NULL) return INVALID_SOCKET;
+
+ memset (&dataAddr, 0, sizeof(dataAddr));
+#ifdef SUPPORT_IP6
+ if ((ctxt->ftpAddr).ss_family == AF_INET6) {
+ ctxt->dataFd = socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
+ ((struct sockaddr_in6 *)&dataAddr)->sin6_family = AF_INET6;
+ dataAddrLen = sizeof(struct sockaddr_in6);
+ } else
+#endif
+ {
+ ctxt->dataFd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ ((struct sockaddr_in *)&dataAddr)->sin_family = AF_INET;
+ dataAddrLen = sizeof (struct sockaddr_in);
+ }
+
+ if (ctxt->dataFd == INVALID_SOCKET) {
+ __xmlIOErr(XML_FROM_FTP, 0, "socket failed");
+ return INVALID_SOCKET;
+ }
+
+ if (ctxt->passive) {
+#ifdef SUPPORT_IP6
+ if ((ctxt->ftpAddr).ss_family == AF_INET6)
+ snprintf (buf, sizeof(buf), "EPSV\r\n");
+ else
+#endif
+ snprintf (buf, sizeof(buf), "PASV\r\n");
+ len = strlen (buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ res = xmlNanoFTPReadResponse(ctx);
+ if (res != 2) {
+ if (res == 5) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ } else {
+ /*
+ * retry with an active connection
+ */
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ ctxt->passive = 0;
+ }
+ }
+ cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
+ while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
+#ifdef SUPPORT_IP6
+ if ((ctxt->ftpAddr).ss_family == AF_INET6) {
+ if (sscanf (cur, "%u", &temp[0]) != 1) {
+ __xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
+ "Invalid answer to EPSV\n");
+ if (ctxt->dataFd != INVALID_SOCKET) {
+ closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ }
+ return INVALID_SOCKET;
+ }
+ memcpy (&((struct sockaddr_in6 *)&dataAddr)->sin6_addr, &((struct sockaddr_in6 *)&ctxt->ftpAddr)->sin6_addr, sizeof(struct in6_addr));
+ ((struct sockaddr_in6 *)&dataAddr)->sin6_port = htons (temp[0]);
+ }
+ else
+#endif
+ {
+ if (sscanf (cur, "%u,%u,%u,%u,%u,%u", &temp[0], &temp[1], &temp[2],
+ &temp[3], &temp[4], &temp[5]) != 6) {
+ __xmlIOErr(XML_FROM_FTP, XML_FTP_PASV_ANSWER,
+ "Invalid answer to PASV\n");
+ if (ctxt->dataFd != INVALID_SOCKET) {
+ closesocket (ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ }
+ return INVALID_SOCKET;
+ }
+ for (i=0; i<6; i++) ad[i] = (unsigned char) (temp[i] & 0xff);
+ memcpy (&((struct sockaddr_in *)&dataAddr)->sin_addr, &ad[0], 4);
+ memcpy (&((struct sockaddr_in *)&dataAddr)->sin_port, &ad[4], 2);
+ }
+
+ if (connect(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a data connection");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ } else {
+ getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
+#ifdef SUPPORT_IP6
+ if ((ctxt->ftpAddr).ss_family == AF_INET6)
+ ((struct sockaddr_in6 *)&dataAddr)->sin6_port = 0;
+ else
+#endif
+ ((struct sockaddr_in *)&dataAddr)->sin_port = 0;
+
+ if (bind(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "bind failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
+
+ if (listen(ctxt->dataFd, 1) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "listen failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+#ifdef SUPPORT_IP6
+ if ((ctxt->ftpAddr).ss_family == AF_INET6) {
+ char buf6[INET6_ADDRSTRLEN];
+ inet_ntop (AF_INET6, &((struct sockaddr_in6 *)&dataAddr)->sin6_addr,
+ buf6, INET6_ADDRSTRLEN);
+ adp = (unsigned char *) buf6;
+ portp = (unsigned char *) &((struct sockaddr_in6 *)&dataAddr)->sin6_port;
+ snprintf (buf, sizeof(buf), "EPRT |2|%s|%s|\r\n", adp, portp);
+ } else
+#endif
+ {
+ adp = (unsigned char *) &((struct sockaddr_in *)&dataAddr)->sin_addr;
+ portp = (unsigned char *) &((struct sockaddr_in *)&dataAddr)->sin_port;
+ snprintf (buf, sizeof(buf), "PORT %d,%d,%d,%d,%d,%d\r\n",
+ adp[0] & 0xff, adp[1] & 0xff, adp[2] & 0xff, adp[3] & 0xff,
+ portp[0] & 0xff, portp[1] & 0xff);
+ }
+
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res != 2) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ }
+ return(ctxt->dataFd);
+
+}
+
+/**
+ * xmlNanoFTPCloseConnection:
+ * @ctx: an FTP context
+ *
+ * Close the data connection from the server
+ *
+ * Returns -1 incase of error, 0 otherwise
+ */
+
+int
+xmlNanoFTPCloseConnection(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ int res;
+ fd_set rfd, efd;
+ struct timeval tv;
+
+ if ((ctxt == NULL) || (ctxt->controlFd == INVALID_SOCKET)) return(-1);
+
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ tv.tv_sec = 15;
+ tv.tv_usec = 0;
+ FD_ZERO(&rfd);
+ FD_SET(ctxt->controlFd, &rfd);
+ FD_ZERO(&efd);
+ FD_SET(ctxt->controlFd, &efd);
+ res = select(ctxt->controlFd + 1, &rfd, NULL, &efd, &tv);
+ if (res < 0) {
+#ifdef DEBUG_FTP
+ perror("select");
+#endif
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ if (res == 0) {
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoFTPCloseConnection: timeout\n");
+#endif
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ } else {
+ res = xmlNanoFTPGetResponse(ctxt);
+ if (res != 2) {
+ closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
+ return(-1);
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlNanoFTPParseList:
+ * @list: some data listing received from the server
+ * @callback: the user callback
+ * @userData: the user callback data
+ *
+ * Parse at most one entry from the listing.
+ *
+ * Returns -1 incase of error, the length of data parsed otherwise
+ */
+
+static int
+xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData) {
+ const char *cur = list;
+ char filename[151];
+ char attrib[11];
+ char owner[11];
+ char group[11];
+ char month[4];
+ int year = 0;
+ int minute = 0;
+ int hour = 0;
+ int day = 0;
+ unsigned long size = 0;
+ int links = 0;
+ int i;
+
+ if (!strncmp(cur, "total", 5)) {
+ cur += 5;
+ while (*cur == ' ') cur++;
+ while ((*cur >= '0') && (*cur <= '9'))
+ links = (links * 10) + (*cur++ - '0');
+ while ((*cur == ' ') || (*cur == '\n') || (*cur == '\r'))
+ cur++;
+ return(cur - list);
+ } else if (*list == '+') {
+ return(0);
+ } else {
+ while ((*cur == ' ') || (*cur == '\n') || (*cur == '\r'))
+ cur++;
+ if (*cur == 0) return(0);
+ i = 0;
+ while (*cur != ' ') {
+ if (i < 10)
+ attrib[i++] = *cur;
+ cur++;
+ if (*cur == 0) return(0);
+ }
+ attrib[10] = 0;
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ while ((*cur >= '0') && (*cur <= '9'))
+ links = (links * 10) + (*cur++ - '0');
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ i = 0;
+ while (*cur != ' ') {
+ if (i < 10)
+ owner[i++] = *cur;
+ cur++;
+ if (*cur == 0) return(0);
+ }
+ owner[i] = 0;
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ i = 0;
+ while (*cur != ' ') {
+ if (i < 10)
+ group[i++] = *cur;
+ cur++;
+ if (*cur == 0) return(0);
+ }
+ group[i] = 0;
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ while ((*cur >= '0') && (*cur <= '9'))
+ size = (size * 10) + (*cur++ - '0');
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ i = 0;
+ while (*cur != ' ') {
+ if (i < 3)
+ month[i++] = *cur;
+ cur++;
+ if (*cur == 0) return(0);
+ }
+ month[i] = 0;
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ while ((*cur >= '0') && (*cur <= '9'))
+ day = (day * 10) + (*cur++ - '0');
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ if ((cur[1] == 0) || (cur[2] == 0)) return(0);
+ if ((cur[1] == ':') || (cur[2] == ':')) {
+ while ((*cur >= '0') && (*cur <= '9'))
+ hour = (hour * 10) + (*cur++ - '0');
+ if (*cur == ':') cur++;
+ while ((*cur >= '0') && (*cur <= '9'))
+ minute = (minute * 10) + (*cur++ - '0');
+ } else {
+ while ((*cur >= '0') && (*cur <= '9'))
+ year = (year * 10) + (*cur++ - '0');
+ }
+ while (*cur == ' ') cur++;
+ if (*cur == 0) return(0);
+ i = 0;
+ while ((*cur != '\n') && (*cur != '\r')) {
+ if (i < 150)
+ filename[i++] = *cur;
+ cur++;
+ if (*cur == 0) return(0);
+ }
+ filename[i] = 0;
+ if ((*cur != '\n') && (*cur != '\r'))
+ return(0);
+ while ((*cur == '\n') || (*cur == '\r'))
+ cur++;
+ }
+ if (callback != NULL) {
+ callback(userData, filename, attrib, owner, group, size, links,
+ year, month, day, hour, minute);
+ }
+ return(cur - list);
+}
+
+/**
+ * xmlNanoFTPList:
+ * @ctx: an FTP context
+ * @callback: the user callback
+ * @userData: the user callback data
+ * @filename: optional files to list
+ *
+ * Do a listing on the server. All files info are passed back
+ * in the callbacks.
+ *
+ * Returns -1 incase of error, 0 otherwise
+ */
+
+int
+xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
+ const char *filename) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[4096 + 1];
+ int len, res;
+ int indx = 0, base;
+ fd_set rfd, efd;
+ struct timeval tv;
+
+ if (ctxt == NULL) return (-1);
+ if (filename == NULL) {
+ if (xmlNanoFTPCwd(ctxt, ctxt->path) < 1)
+ return(-1);
+ ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
+ if (ctxt->dataFd == INVALID_SOCKET)
+ return(-1);
+ snprintf(buf, sizeof(buf), "LIST -L\r\n");
+ } else {
+ if (filename[0] != '/') {
+ if (xmlNanoFTPCwd(ctxt, ctxt->path) < 1)
+ return(-1);
+ }
+ ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
+ if (ctxt->dataFd == INVALID_SOCKET)
+ return(-1);
+ snprintf(buf, sizeof(buf), "LIST -L %s\r\n", filename);
+ }
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(res);
+ }
+ res = xmlNanoFTPReadResponse(ctxt);
+ if (res != 1) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(-res);
+ }
+
+ do {
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+ FD_ZERO(&rfd);
+ FD_SET(ctxt->dataFd, &rfd);
+ FD_ZERO(&efd);
+ FD_SET(ctxt->dataFd, &efd);
+ res = select(ctxt->dataFd + 1, &rfd, NULL, &efd, &tv);
+ if (res < 0) {
+#ifdef DEBUG_FTP
+ perror("select");
+#endif
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+ if (res == 0) {
+ res = xmlNanoFTPCheckResponse(ctxt);
+ if (res < 0) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+ if (res == 2) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(0);
+ }
+
+ continue;
+ }
+
+ if ((len = recv(ctxt->dataFd, &buf[indx], sizeof(buf) - (indx + 1), 0)) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "recv");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+#ifdef DEBUG_FTP
+ write(1, &buf[indx], len);
+#endif
+ indx += len;
+ buf[indx] = 0;
+ base = 0;
+ do {
+ res = xmlNanoFTPParseList(&buf[base], callback, userData);
+ base += res;
+ } while (res > 0);
+
+ memmove(&buf[0], &buf[base], indx - base);
+ indx -= base;
+ } while (len != 0);
+ xmlNanoFTPCloseConnection(ctxt);
+ return(0);
+}
+
+/**
+ * xmlNanoFTPGetSocket:
+ * @ctx: an FTP context
+ * @filename: the file to retrieve (or NULL if path is in context).
+ *
+ * Initiate fetch of the given file from the server.
+ *
+ * Returns the socket for the data connection, or <0 in case of error
+ */
+
+
+SOCKET
+xmlNanoFTPGetSocket(void *ctx, const char *filename) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[300];
+ int res, len;
+ if (ctx == NULL)
+ return INVALID_SOCKET;
+ if ((filename == NULL) && (ctxt->path == NULL))
+ return INVALID_SOCKET;
+ ctxt->dataFd = xmlNanoFTPGetConnection(ctxt);
+ if (ctxt->dataFd == INVALID_SOCKET)
+ return INVALID_SOCKET;
+
+ snprintf(buf, sizeof(buf), "TYPE I\r\n");
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ res = xmlNanoFTPReadResponse(ctxt);
+ if (res != 2) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ if (filename == NULL)
+ snprintf(buf, sizeof(buf), "RETR %s\r\n", ctxt->path);
+ else
+ snprintf(buf, sizeof(buf), "RETR %s\r\n", filename);
+ buf[sizeof(buf) - 1] = 0;
+ len = strlen(buf);
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "%s", buf);
+#endif
+ res = send(ctxt->controlFd, SEND_ARG2_CAST buf, len, 0);
+ if (res < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "send failed");
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ res = xmlNanoFTPReadResponse(ctxt);
+ if (res != 1) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return INVALID_SOCKET;
+ }
+ return(ctxt->dataFd);
+}
+
+/**
+ * xmlNanoFTPGet:
+ * @ctx: an FTP context
+ * @callback: the user callback
+ * @userData: the user callback data
+ * @filename: the file to retrieve
+ *
+ * Fetch the given file from the server. All data are passed back
+ * in the callbacks. The last callback has a size of 0 block.
+ *
+ * Returns -1 incase of error, 0 otherwise
+ */
+
+int
+xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
+ const char *filename) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+ char buf[4096];
+ int len = 0, res;
+ fd_set rfd;
+ struct timeval tv;
+
+ if (ctxt == NULL) return(-1);
+ if ((filename == NULL) && (ctxt->path == NULL))
+ return(-1);
+ if (callback == NULL)
+ return(-1);
+ if (xmlNanoFTPGetSocket(ctxt, filename) == INVALID_SOCKET)
+ return(-1);
+
+ do {
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+ FD_ZERO(&rfd);
+ FD_SET(ctxt->dataFd, &rfd);
+ res = select(ctxt->dataFd + 1, &rfd, NULL, NULL, &tv);
+ if (res < 0) {
+#ifdef DEBUG_FTP
+ perror("select");
+#endif
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+ if (res == 0) {
+ res = xmlNanoFTPCheckResponse(ctxt);
+ if (res < 0) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+ if (res == 2) {
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(0);
+ }
+
+ continue;
+ }
+ if ((len = recv(ctxt->dataFd, buf, sizeof(buf), 0)) < 0) {
+ __xmlIOErr(XML_FROM_FTP, 0, "recv failed");
+ callback(userData, buf, len);
+ closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET;
+ return(-1);
+ }
+ callback(userData, buf, len);
+ } while (len != 0);
+
+ return(xmlNanoFTPCloseConnection(ctxt));
+}
+
+/**
+ * xmlNanoFTPRead:
+ * @ctx: the FTP context
+ * @dest: a buffer
+ * @len: the buffer length
+ *
+ * This function tries to read @len bytes from the existing FTP connection
+ * and saves them in @dest. This is a blocking call.
+ *
+ * Returns the number of byte read. 0 is an indication of an end of connection.
+ * -1 indicates a parameter error.
+ */
+int
+xmlNanoFTPRead(void *ctx, void *dest, int len) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+
+ if (ctx == NULL) return(-1);
+ if (ctxt->dataFd == INVALID_SOCKET) return(0);
+ if (dest == NULL) return(-1);
+ if (len <= 0) return(0);
+
+ len = recv(ctxt->dataFd, dest, len, 0);
+ if (len <= 0) {
+ if (len < 0)
+ __xmlIOErr(XML_FROM_FTP, 0, "recv failed");
+ xmlNanoFTPCloseConnection(ctxt);
+ }
+#ifdef DEBUG_FTP
+ xmlGenericError(xmlGenericErrorContext, "Recvd %d bytes\n", len);
+#endif
+ return(len);
+}
+
+/**
+ * xmlNanoFTPOpen:
+ * @URL: the URL to the resource
+ *
+ * Start to fetch the given ftp:// resource
+ *
+ * Returns an FTP context, or NULL
+ */
+
+void*
+xmlNanoFTPOpen(const char *URL) {
+ xmlNanoFTPCtxtPtr ctxt;
+ SOCKET sock;
+
+ xmlNanoFTPInit();
+ if (URL == NULL) return(NULL);
+ if (strncmp("ftp://", URL, 6)) return(NULL);
+
+ ctxt = (xmlNanoFTPCtxtPtr) xmlNanoFTPNewCtxt(URL);
+ if (ctxt == NULL) return(NULL);
+ if (xmlNanoFTPConnect(ctxt) < 0) {
+ xmlNanoFTPFreeCtxt(ctxt);
+ return(NULL);
+ }
+ sock = xmlNanoFTPGetSocket(ctxt, ctxt->path);
+ if (sock == INVALID_SOCKET) {
+ xmlNanoFTPFreeCtxt(ctxt);
+ return(NULL);
+ }
+ return(ctxt);
+}
+
+/**
+ * xmlNanoFTPClose:
+ * @ctx: an FTP context
+ *
+ * Close the connection and both control and transport
+ *
+ * Returns -1 incase of error, 0 otherwise
+ */
+
+int
+xmlNanoFTPClose(void *ctx) {
+ xmlNanoFTPCtxtPtr ctxt = (xmlNanoFTPCtxtPtr) ctx;
+
+ if (ctxt == NULL)
+ return(-1);
+
+ if (ctxt->dataFd != INVALID_SOCKET) {
+ closesocket(ctxt->dataFd);
+ ctxt->dataFd = INVALID_SOCKET;
+ }
+ if (ctxt->controlFd != INVALID_SOCKET) {
+ xmlNanoFTPQuit(ctxt);
+ closesocket(ctxt->controlFd);
+ ctxt->controlFd = INVALID_SOCKET;
+ }
+ xmlNanoFTPFreeCtxt(ctxt);
+ return(0);
+}
+
+#ifdef STANDALONE
+/************************************************************************
+ * *
+ * Basic test in Standalone mode *
+ * *
+ ************************************************************************/
+static
+void ftpList(void *userData, const char *filename, const char* attrib,
+ const char *owner, const char *group, unsigned long size, int links,
+ int year, const char *month, int day, int hour, int minute) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s %s %s %ld %s\n", attrib, owner, group, size, filename);
+}
+static
+void ftpData(void *userData, const char *data, int len) {
+ if (userData == NULL) return;
+ if (len <= 0) {
+ fclose((FILE*)userData);
+ return;
+ }
+ fwrite(data, len, 1, (FILE*)userData);
+}
+
+int main(int argc, char **argv) {
+ void *ctxt;
+ FILE *output;
+ char *tstfile = NULL;
+
+ xmlNanoFTPInit();
+ if (argc > 1) {
+ ctxt = xmlNanoFTPNewCtxt(argv[1]);
+ if (xmlNanoFTPConnect(ctxt) < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Couldn't connect to %s\n", argv[1]);
+ exit(1);
+ }
+ if (argc > 2)
+ tstfile = argv[2];
+ } else
+ ctxt = xmlNanoFTPConnectTo("localhost", 0);
+ if (ctxt == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Couldn't connect to localhost\n");
+ exit(1);
+ }
+ xmlNanoFTPList(ctxt, ftpList, NULL, tstfile);
+ output = fopen("/tmp/tstdata", "w");
+ if (output != NULL) {
+ if (xmlNanoFTPGet(ctxt, ftpData, (void *) output, tstfile) < 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to get file\n");
+
+ }
+ xmlNanoFTPClose(ctxt);
+ xmlMemoryDump();
+ exit(0);
+}
+#endif /* STANDALONE */
+#else /* !LIBXML_FTP_ENABLED */
+#ifdef STANDALONE
+#include <stdio.h>
+int main(int argc, char **argv) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s : FTP support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* STANDALONE */
+#endif /* LIBXML_FTP_ENABLED */
+#define bottom_nanoftp
+#include "elfgcchack.h"
diff --git a/nanohttp.c b/nanohttp.c
new file mode 100644
index 0000000..e109ad7
--- /dev/null
+++ b/nanohttp.c
@@ -0,0 +1,1890 @@
+/*
+ * nanohttp.c: minimalist HTTP GET implementation to fetch external subsets.
+ * focuses on size, streamability, reentrancy and portability
+ *
+ * This is clearly not a general purpose HTTP implementation
+ * If you look for one, check:
+ * http://www.w3.org/Library/
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define NEED_SOCKETS
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_HTTP_ENABLED
+#include <string.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_RESOLV_H
+#ifdef HAVE_ARPA_NAMESER_H
+#include <arpa/nameser.h>
+#endif
+#include <resolv.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifndef HAVE_POLL_H
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#else
+#include <poll.h>
+#endif
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+
+#ifdef VMS
+#include <stropts>
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_
+#endif
+#include <wsockcompat.h>
+#include <winsock2.h>
+#undef XML_SOCKLEN_T
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+#include <libxml/globals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h> /* for xmlStr(n)casecmp() */
+#include <libxml/nanohttp.h>
+#include <libxml/globals.h>
+#include <libxml/uri.h>
+
+/**
+ * A couple portability macros
+ */
+#ifndef _WINSOCKAPI_
+#if !defined(__BEOS__) || defined(__HAIKU__)
+#define closesocket(s) close(s)
+#endif
+#define SOCKET int
+#define INVALID_SOCKET (-1)
+#endif
+
+#ifdef __BEOS__
+#ifndef PF_INET
+#define PF_INET AF_INET
+#endif
+#endif
+
+#ifndef XML_SOCKLEN_T
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+#ifdef STANDALONE
+#define DEBUG_HTTP
+#define xmlStrncasecmp(a, b, n) strncasecmp((char *)a, (char *)b, n)
+#define xmlStrcasecmpi(a, b) strcasecmp((char *)a, (char *)b)
+#endif
+
+#define XML_NANO_HTTP_MAX_REDIR 10
+
+#define XML_NANO_HTTP_CHUNK 4096
+
+#define XML_NANO_HTTP_CLOSED 0
+#define XML_NANO_HTTP_WRITE 1
+#define XML_NANO_HTTP_READ 2
+#define XML_NANO_HTTP_NONE 4
+
+typedef struct xmlNanoHTTPCtxt {
+ char *protocol; /* the protocol name */
+ char *hostname; /* the host name */
+ int port; /* the port */
+ char *path; /* the path within the URL */
+ char *query; /* the query string */
+ SOCKET fd; /* the file descriptor for the socket */
+ int state; /* WRITE / READ / CLOSED */
+ char *out; /* buffer sent (zero terminated) */
+ char *outptr; /* index within the buffer sent */
+ char *in; /* the receiving buffer */
+ char *content; /* the start of the content */
+ char *inptr; /* the next byte to read from network */
+ char *inrptr; /* the next byte to give back to the client */
+ int inlen; /* len of the input buffer */
+ int last; /* return code for last operation */
+ int returnValue; /* the protocol return value */
+ int version; /* the protocol version */
+ int ContentLength; /* specified content length from HTTP header */
+ char *contentType; /* the MIME type for the input */
+ char *location; /* the new URL in case of redirect */
+ char *authHeader; /* contents of {WWW,Proxy}-Authenticate header */
+ char *encoding; /* encoding extracted from the contentType */
+ char *mimeType; /* Mime-Type extracted from the contentType */
+#ifdef HAVE_ZLIB_H
+ z_stream *strm; /* Zlib stream object */
+ int usesGzip; /* "Content-Encoding: gzip" was detected */
+#endif
+} xmlNanoHTTPCtxt, *xmlNanoHTTPCtxtPtr;
+
+static int initialized = 0;
+static char *proxy = NULL; /* the proxy name if any */
+static int proxyPort; /* the proxy port if any */
+static unsigned int timeout = 60;/* the select() timeout in seconds */
+
+static int xmlNanoHTTPFetchContent( void * ctx, char ** ptr, int * len );
+
+/**
+ * xmlHTTPErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlHTTPErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_HTTP, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * A portability function
+ */
+static int socket_errno(void) {
+#ifdef _WINSOCKAPI_
+ return(WSAGetLastError());
+#else
+ return(errno);
+#endif
+}
+
+#ifdef SUPPORT_IP6
+static
+int have_ipv6(void) {
+ SOCKET s;
+
+ s = socket (AF_INET6, SOCK_STREAM, 0);
+ if (s != INVALID_SOCKET) {
+ close (s);
+ return (1);
+ }
+ return (0);
+}
+#endif
+
+/**
+ * xmlNanoHTTPInit:
+ *
+ * Initialize the HTTP protocol layer.
+ * Currently it just checks for proxy informations
+ */
+
+void
+xmlNanoHTTPInit(void) {
+ const char *env;
+#ifdef _WINSOCKAPI_
+ WSADATA wsaData;
+#endif
+
+ if (initialized)
+ return;
+
+#ifdef _WINSOCKAPI_
+ if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
+ return;
+#endif
+
+ if (proxy == NULL) {
+ proxyPort = 80;
+ env = getenv("no_proxy");
+ if (env && ((env[0] == '*') && (env[1] == 0)))
+ goto done;
+ env = getenv("http_proxy");
+ if (env != NULL) {
+ xmlNanoHTTPScanProxy(env);
+ goto done;
+ }
+ env = getenv("HTTP_PROXY");
+ if (env != NULL) {
+ xmlNanoHTTPScanProxy(env);
+ goto done;
+ }
+ }
+done:
+ initialized = 1;
+}
+
+/**
+ * xmlNanoHTTPCleanup:
+ *
+ * Cleanup the HTTP protocol layer.
+ */
+
+void
+xmlNanoHTTPCleanup(void) {
+ if (proxy != NULL) {
+ xmlFree(proxy);
+ proxy = NULL;
+ }
+#ifdef _WINSOCKAPI_
+ if (initialized)
+ WSACleanup();
+#endif
+ initialized = 0;
+ return;
+}
+
+/**
+ * xmlNanoHTTPScanURL:
+ * @ctxt: an HTTP context
+ * @URL: The URL used to initialize the context
+ *
+ * (Re)Initialize an HTTP context by parsing the URL and finding
+ * the protocol host port and path it indicates.
+ */
+
+static void
+xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
+ xmlURIPtr uri;
+ int len;
+
+ /*
+ * Clear any existing data from the context
+ */
+ if (ctxt->protocol != NULL) {
+ xmlFree(ctxt->protocol);
+ ctxt->protocol = NULL;
+ }
+ if (ctxt->hostname != NULL) {
+ xmlFree(ctxt->hostname);
+ ctxt->hostname = NULL;
+ }
+ if (ctxt->path != NULL) {
+ xmlFree(ctxt->path);
+ ctxt->path = NULL;
+ }
+ if (ctxt->query != NULL) {
+ xmlFree(ctxt->query);
+ ctxt->query = NULL;
+ }
+ if (URL == NULL) return;
+
+ uri = xmlParseURIRaw(URL, 1);
+ if (uri == NULL)
+ return;
+
+ if ((uri->scheme == NULL) || (uri->server == NULL)) {
+ xmlFreeURI(uri);
+ return;
+ }
+
+ ctxt->protocol = xmlMemStrdup(uri->scheme);
+ /* special case of IPv6 addresses, the [] need to be removed */
+ if ((uri->server != NULL) && (*uri->server == '[')) {
+ len = strlen(uri->server);
+ if ((len > 2) && (uri->server[len - 1] == ']')) {
+ ctxt->hostname = (char *) xmlCharStrndup(uri->server + 1, len -2);
+ } else
+ ctxt->hostname = xmlMemStrdup(uri->server);
+ } else
+ ctxt->hostname = xmlMemStrdup(uri->server);
+ if (uri->path != NULL)
+ ctxt->path = xmlMemStrdup(uri->path);
+ else
+ ctxt->path = xmlMemStrdup("/");
+ if (uri->query != NULL)
+ ctxt->query = xmlMemStrdup(uri->query);
+ if (uri->port != 0)
+ ctxt->port = uri->port;
+
+ xmlFreeURI(uri);
+}
+
+/**
+ * xmlNanoHTTPScanProxy:
+ * @URL: The proxy URL used to initialize the proxy context
+ *
+ * (Re)Initialize the HTTP Proxy context by parsing the URL and finding
+ * the protocol host port it indicates.
+ * Should be like http://myproxy/ or http://myproxy:3128/
+ * A NULL URL cleans up proxy informations.
+ */
+
+void
+xmlNanoHTTPScanProxy(const char *URL) {
+ xmlURIPtr uri;
+
+ if (proxy != NULL) {
+ xmlFree(proxy);
+ proxy = NULL;
+ }
+ proxyPort = 0;
+
+#ifdef DEBUG_HTTP
+ if (URL == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Removing HTTP proxy info\n");
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Using HTTP proxy %s\n", URL);
+#endif
+ if (URL == NULL) return;
+
+ uri = xmlParseURIRaw(URL, 1);
+ if ((uri == NULL) || (uri->scheme == NULL) ||
+ (strcmp(uri->scheme, "http")) || (uri->server == NULL)) {
+ __xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Syntax Error\n");
+ if (uri != NULL)
+ xmlFreeURI(uri);
+ return;
+ }
+
+ proxy = xmlMemStrdup(uri->server);
+ if (uri->port != 0)
+ proxyPort = uri->port;
+
+ xmlFreeURI(uri);
+}
+
+/**
+ * xmlNanoHTTPNewCtxt:
+ * @URL: The URL used to initialize the context
+ *
+ * Allocate and initialize a new HTTP context.
+ *
+ * Returns an HTTP context or NULL in case of error.
+ */
+
+static xmlNanoHTTPCtxtPtr
+xmlNanoHTTPNewCtxt(const char *URL) {
+ xmlNanoHTTPCtxtPtr ret;
+
+ ret = (xmlNanoHTTPCtxtPtr) xmlMalloc(sizeof(xmlNanoHTTPCtxt));
+ if (ret == NULL) {
+ xmlHTTPErrMemory("allocating context");
+ return(NULL);
+ }
+
+ memset(ret, 0, sizeof(xmlNanoHTTPCtxt));
+ ret->port = 80;
+ ret->returnValue = 0;
+ ret->fd = INVALID_SOCKET;
+ ret->ContentLength = -1;
+
+ xmlNanoHTTPScanURL(ret, URL);
+
+ return(ret);
+}
+
+/**
+ * xmlNanoHTTPFreeCtxt:
+ * @ctxt: an HTTP context
+ *
+ * Frees the context after closing the connection.
+ */
+
+static void
+xmlNanoHTTPFreeCtxt(xmlNanoHTTPCtxtPtr ctxt) {
+ if (ctxt == NULL) return;
+ if (ctxt->hostname != NULL) xmlFree(ctxt->hostname);
+ if (ctxt->protocol != NULL) xmlFree(ctxt->protocol);
+ if (ctxt->path != NULL) xmlFree(ctxt->path);
+ if (ctxt->query != NULL) xmlFree(ctxt->query);
+ if (ctxt->out != NULL) xmlFree(ctxt->out);
+ if (ctxt->in != NULL) xmlFree(ctxt->in);
+ if (ctxt->contentType != NULL) xmlFree(ctxt->contentType);
+ if (ctxt->encoding != NULL) xmlFree(ctxt->encoding);
+ if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
+ if (ctxt->location != NULL) xmlFree(ctxt->location);
+ if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader);
+#ifdef HAVE_ZLIB_H
+ if (ctxt->strm != NULL) {
+ inflateEnd(ctxt->strm);
+ xmlFree(ctxt->strm);
+ }
+#endif
+
+ ctxt->state = XML_NANO_HTTP_NONE;
+ if (ctxt->fd != INVALID_SOCKET) closesocket(ctxt->fd);
+ ctxt->fd = INVALID_SOCKET;
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlNanoHTTPSend:
+ * @ctxt: an HTTP context
+ *
+ * Send the input needed to initiate the processing on the server side
+ * Returns number of bytes sent or -1 on error.
+ */
+
+static int
+xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char *xmt_ptr, int outlen)
+{
+ int total_sent = 0;
+#ifdef HAVE_POLL_H
+ struct pollfd p;
+#else
+ struct timeval tv;
+ fd_set wfd;
+#endif
+
+ if ((ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL)) {
+ while (total_sent < outlen) {
+ int nsent = send(ctxt->fd, SEND_ARG2_CAST (xmt_ptr + total_sent),
+ outlen - total_sent, 0);
+
+ if (nsent > 0)
+ total_sent += nsent;
+ else if ((nsent == -1) &&
+#if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
+ (socket_errno() != EAGAIN) &&
+#endif
+ (socket_errno() != EWOULDBLOCK)) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "send failed\n");
+ if (total_sent == 0)
+ total_sent = -1;
+ break;
+ } else {
+ /*
+ * No data sent
+ * Since non-blocking sockets are used, wait for
+ * socket to be writable or default timeout prior
+ * to retrying.
+ */
+#ifndef HAVE_POLL_H
+#ifndef _WINSOCKAPI_
+ if (ctxt->fd > FD_SETSIZE)
+ return -1;
+#endif
+
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
+ FD_ZERO(&wfd);
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4018)
+#endif
+ FD_SET(ctxt->fd, &wfd);
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+ (void) select(ctxt->fd + 1, NULL, &wfd, NULL, &tv);
+#else
+ p.fd = ctxt->fd;
+ p.events = POLLOUT;
+ (void) poll(&p, 1, timeout * 1000);
+#endif /* !HAVE_POLL_H */
+ }
+ }
+ }
+
+ return total_sent;
+}
+
+/**
+ * xmlNanoHTTPRecv:
+ * @ctxt: an HTTP context
+ *
+ * Read information coming from the HTTP connection.
+ * This is a blocking call (but it blocks in select(), not read()).
+ *
+ * Returns the number of byte read or -1 in case of error.
+ */
+
+static int
+xmlNanoHTTPRecv(xmlNanoHTTPCtxtPtr ctxt)
+{
+#ifdef HAVE_POLL_H
+ struct pollfd p;
+#else
+ fd_set rfd;
+ struct timeval tv;
+#endif
+
+
+ while (ctxt->state & XML_NANO_HTTP_READ) {
+ if (ctxt->in == NULL) {
+ ctxt->in = (char *) xmlMallocAtomic(65000 * sizeof(char));
+ if (ctxt->in == NULL) {
+ xmlHTTPErrMemory("allocating input");
+ ctxt->last = -1;
+ return (-1);
+ }
+ ctxt->inlen = 65000;
+ ctxt->inptr = ctxt->content = ctxt->inrptr = ctxt->in;
+ }
+ if (ctxt->inrptr > ctxt->in + XML_NANO_HTTP_CHUNK) {
+ int delta = ctxt->inrptr - ctxt->in;
+ int len = ctxt->inptr - ctxt->inrptr;
+
+ memmove(ctxt->in, ctxt->inrptr, len);
+ ctxt->inrptr -= delta;
+ ctxt->content -= delta;
+ ctxt->inptr -= delta;
+ }
+ if ((ctxt->in + ctxt->inlen) < (ctxt->inptr + XML_NANO_HTTP_CHUNK)) {
+ int d_inptr = ctxt->inptr - ctxt->in;
+ int d_content = ctxt->content - ctxt->in;
+ int d_inrptr = ctxt->inrptr - ctxt->in;
+ char *tmp_ptr = ctxt->in;
+
+ ctxt->inlen *= 2;
+ ctxt->in = (char *) xmlRealloc(tmp_ptr, ctxt->inlen);
+ if (ctxt->in == NULL) {
+ xmlHTTPErrMemory("allocating input buffer");
+ xmlFree(tmp_ptr);
+ ctxt->last = -1;
+ return (-1);
+ }
+ ctxt->inptr = ctxt->in + d_inptr;
+ ctxt->content = ctxt->in + d_content;
+ ctxt->inrptr = ctxt->in + d_inrptr;
+ }
+ ctxt->last = recv(ctxt->fd, ctxt->inptr, XML_NANO_HTTP_CHUNK, 0);
+ if (ctxt->last > 0) {
+ ctxt->inptr += ctxt->last;
+ return (ctxt->last);
+ }
+ if (ctxt->last == 0) {
+ return (0);
+ }
+ if (ctxt->last == -1) {
+ switch (socket_errno()) {
+ case EINPROGRESS:
+ case EWOULDBLOCK:
+#if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
+ case EAGAIN:
+#endif
+ break;
+
+ case ECONNRESET:
+ case ESHUTDOWN:
+ return (0);
+
+ default:
+ __xmlIOErr(XML_FROM_HTTP, 0, "recv failed\n");
+ return (-1);
+ }
+ }
+#ifdef HAVE_POLL_H
+ p.fd = ctxt->fd;
+ p.events = POLLIN;
+ if ((poll(&p, 1, timeout * 1000) < 1)
+#if defined(EINTR)
+ && (errno != EINTR)
+#endif
+ )
+ return (0);
+#else /* !HAVE_POLL_H */
+#ifndef _WINSOCKAPI_
+ if (ctxt->fd > FD_SETSIZE)
+ return 0;
+#endif
+
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
+ FD_ZERO(&rfd);
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4018)
+#endif
+
+ FD_SET(ctxt->fd, &rfd);
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+ if ((select(ctxt->fd + 1, &rfd, NULL, NULL, &tv) < 1)
+#if defined(EINTR)
+ && (errno != EINTR)
+#endif
+ )
+ return (0);
+#endif /* !HAVE_POLL_H */
+ }
+ return (0);
+}
+
+/**
+ * xmlNanoHTTPReadLine:
+ * @ctxt: an HTTP context
+ *
+ * Read one line in the HTTP server output, usually for extracting
+ * the HTTP protocol informations from the answer header.
+ *
+ * Returns a newly allocated string with a copy of the line, or NULL
+ * which indicate the end of the input.
+ */
+
+static char *
+xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) {
+ char buf[4096];
+ char *bp = buf;
+ int rc;
+
+ while (bp - buf < 4095) {
+ if (ctxt->inrptr == ctxt->inptr) {
+ if ( (rc = xmlNanoHTTPRecv(ctxt)) == 0) {
+ if (bp == buf)
+ return(NULL);
+ else
+ *bp = 0;
+ return(xmlMemStrdup(buf));
+ }
+ else if ( rc == -1 ) {
+ return ( NULL );
+ }
+ }
+ *bp = *ctxt->inrptr++;
+ if (*bp == '\n') {
+ *bp = 0;
+ return(xmlMemStrdup(buf));
+ }
+ if (*bp != '\r')
+ bp++;
+ }
+ buf[4095] = 0;
+ return(xmlMemStrdup(buf));
+}
+
+
+/**
+ * xmlNanoHTTPScanAnswer:
+ * @ctxt: an HTTP context
+ * @line: an HTTP header line
+ *
+ * Try to extract useful informations from the server answer.
+ * We currently parse and process:
+ * - The HTTP revision/ return code
+ * - The Content-Type, Mime-Type and charset used
+ * - The Location for redirect processing.
+ *
+ * Returns -1 in case of failure, the file descriptor number otherwise
+ */
+
+static void
+xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
+ const char *cur = line;
+
+ if (line == NULL) return;
+
+ if (!strncmp(line, "HTTP/", 5)) {
+ int version = 0;
+ int ret = 0;
+
+ cur += 5;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ version *= 10;
+ version += *cur - '0';
+ cur++;
+ }
+ if (*cur == '.') {
+ cur++;
+ if ((*cur >= '0') && (*cur <= '9')) {
+ version *= 10;
+ version += *cur - '0';
+ cur++;
+ }
+ while ((*cur >= '0') && (*cur <= '9'))
+ cur++;
+ } else
+ version *= 10;
+ if ((*cur != ' ') && (*cur != '\t')) return;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if ((*cur < '0') || (*cur > '9')) return;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret *= 10;
+ ret += *cur - '0';
+ cur++;
+ }
+ if ((*cur != 0) && (*cur != ' ') && (*cur != '\t')) return;
+ ctxt->returnValue = ret;
+ ctxt->version = version;
+ } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"Content-Type:", 13)) {
+ const xmlChar *charset, *last, *mime;
+ cur += 13;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (ctxt->contentType != NULL)
+ xmlFree(ctxt->contentType);
+ ctxt->contentType = xmlMemStrdup(cur);
+ mime = (const xmlChar *) cur;
+ last = mime;
+ while ((*last != 0) && (*last != ' ') && (*last != '\t') &&
+ (*last != ';') && (*last != ','))
+ last++;
+ if (ctxt->mimeType != NULL)
+ xmlFree(ctxt->mimeType);
+ ctxt->mimeType = (char *) xmlStrndup(mime, last - mime);
+ charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset=");
+ if (charset != NULL) {
+ charset += 8;
+ last = charset;
+ while ((*last != 0) && (*last != ' ') && (*last != '\t') &&
+ (*last != ';') && (*last != ','))
+ last++;
+ if (ctxt->encoding != NULL)
+ xmlFree(ctxt->encoding);
+ ctxt->encoding = (char *) xmlStrndup(charset, last - charset);
+ }
+ } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"ContentType:", 12)) {
+ const xmlChar *charset, *last, *mime;
+ cur += 12;
+ if (ctxt->contentType != NULL) return;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ ctxt->contentType = xmlMemStrdup(cur);
+ mime = (const xmlChar *) cur;
+ last = mime;
+ while ((*last != 0) && (*last != ' ') && (*last != '\t') &&
+ (*last != ';') && (*last != ','))
+ last++;
+ if (ctxt->mimeType != NULL)
+ xmlFree(ctxt->mimeType);
+ ctxt->mimeType = (char *) xmlStrndup(mime, last - mime);
+ charset = xmlStrstr(BAD_CAST ctxt->contentType, BAD_CAST "charset=");
+ if (charset != NULL) {
+ charset += 8;
+ last = charset;
+ while ((*last != 0) && (*last != ' ') && (*last != '\t') &&
+ (*last != ';') && (*last != ','))
+ last++;
+ if (ctxt->encoding != NULL)
+ xmlFree(ctxt->encoding);
+ ctxt->encoding = (char *) xmlStrndup(charset, last - charset);
+ }
+ } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"Location:", 9)) {
+ cur += 9;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (ctxt->location != NULL)
+ xmlFree(ctxt->location);
+ if (*cur == '/') {
+ xmlChar *tmp_http = xmlStrdup(BAD_CAST "http://");
+ xmlChar *tmp_loc =
+ xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname);
+ ctxt->location =
+ (char *) xmlStrcat (tmp_loc, (const xmlChar *) cur);
+ } else {
+ ctxt->location = xmlMemStrdup(cur);
+ }
+ } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"WWW-Authenticate:", 17)) {
+ cur += 17;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (ctxt->authHeader != NULL)
+ xmlFree(ctxt->authHeader);
+ ctxt->authHeader = xmlMemStrdup(cur);
+ } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"Proxy-Authenticate:", 19)) {
+ cur += 19;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (ctxt->authHeader != NULL)
+ xmlFree(ctxt->authHeader);
+ ctxt->authHeader = xmlMemStrdup(cur);
+#ifdef HAVE_ZLIB_H
+ } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Encoding:", 17) ) {
+ cur += 17;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if ( !xmlStrncasecmp( BAD_CAST cur, BAD_CAST"gzip", 4) ) {
+ ctxt->usesGzip = 1;
+
+ ctxt->strm = xmlMalloc(sizeof(z_stream));
+
+ if (ctxt->strm != NULL) {
+ ctxt->strm->zalloc = Z_NULL;
+ ctxt->strm->zfree = Z_NULL;
+ ctxt->strm->opaque = Z_NULL;
+ ctxt->strm->avail_in = 0;
+ ctxt->strm->next_in = Z_NULL;
+
+ inflateInit2( ctxt->strm, 31 );
+ }
+ }
+#endif
+ } else if ( !xmlStrncasecmp( BAD_CAST line, BAD_CAST"Content-Length:", 15) ) {
+ cur += 15;
+ ctxt->ContentLength = strtol( cur, NULL, 10 );
+ }
+}
+
+/**
+ * xmlNanoHTTPConnectAttempt:
+ * @addr: a socket address structure
+ *
+ * Attempt a connection to the given IP:port endpoint. It forces
+ * non-blocking semantic on the socket, and allow 60 seconds for
+ * the host to answer.
+ *
+ * Returns -1 in case of failure, the file descriptor number otherwise
+ */
+
+static SOCKET
+xmlNanoHTTPConnectAttempt(struct sockaddr *addr)
+{
+#ifndef HAVE_POLL_H
+ fd_set wfd;
+#ifdef _WINSOCKAPI_
+ fd_set xfd;
+#endif
+ struct timeval tv;
+#else /* !HAVE_POLL_H */
+ struct pollfd p;
+#endif /* !HAVE_POLL_H */
+ int status;
+
+ int addrlen;
+
+ SOCKET s;
+
+#ifdef SUPPORT_IP6
+ if (addr->sa_family == AF_INET6) {
+ s = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP);
+ addrlen = sizeof(struct sockaddr_in6);
+ } else
+#endif
+ {
+ s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ addrlen = sizeof(struct sockaddr_in);
+ }
+ if (s == INVALID_SOCKET) {
+#ifdef DEBUG_HTTP
+ perror("socket");
+#endif
+ __xmlIOErr(XML_FROM_HTTP, 0, "socket failed\n");
+ return INVALID_SOCKET;
+ }
+#ifdef _WINSOCKAPI_
+ {
+ u_long one = 1;
+
+ status = ioctlsocket(s, FIONBIO, &one) == SOCKET_ERROR ? -1 : 0;
+ }
+#else /* _WINSOCKAPI_ */
+#if defined(VMS)
+ {
+ int enable = 1;
+
+ status = ioctl(s, FIONBIO, &enable);
+ }
+#else /* VMS */
+#if defined(__BEOS__) && !defined(__HAIKU__)
+ {
+ bool noblock = true;
+
+ status =
+ setsockopt(s, SOL_SOCKET, SO_NONBLOCK, &noblock,
+ sizeof(noblock));
+ }
+#else /* __BEOS__ */
+ if ((status = fcntl(s, F_GETFL, 0)) != -1) {
+#ifdef O_NONBLOCK
+ status |= O_NONBLOCK;
+#else /* O_NONBLOCK */
+#ifdef F_NDELAY
+ status |= F_NDELAY;
+#endif /* F_NDELAY */
+#endif /* !O_NONBLOCK */
+ status = fcntl(s, F_SETFL, status);
+ }
+ if (status < 0) {
+#ifdef DEBUG_HTTP
+ perror("nonblocking");
+#endif
+ __xmlIOErr(XML_FROM_HTTP, 0, "error setting non-blocking IO\n");
+ closesocket(s);
+ return INVALID_SOCKET;
+ }
+#endif /* !__BEOS__ */
+#endif /* !VMS */
+#endif /* !_WINSOCKAPI_ */
+
+ if (connect(s, addr, addrlen) == -1) {
+ switch (socket_errno()) {
+ case EINPROGRESS:
+ case EWOULDBLOCK:
+ break;
+ default:
+ __xmlIOErr(XML_FROM_HTTP, 0,
+ "error connecting to HTTP server");
+ closesocket(s);
+ return INVALID_SOCKET;
+ }
+ }
+#ifndef HAVE_POLL_H
+ tv.tv_sec = timeout;
+ tv.tv_usec = 0;
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4018)
+#endif
+#ifndef _WINSOCKAPI_
+ if (s > FD_SETSIZE)
+ return INVALID_SOCKET;
+#endif
+ FD_ZERO(&wfd);
+ FD_SET(s, &wfd);
+
+#ifdef _WINSOCKAPI_
+ FD_ZERO(&xfd);
+ FD_SET(s, &xfd);
+
+ switch (select(s + 1, NULL, &wfd, &xfd, &tv))
+#else
+ switch (select(s + 1, NULL, &wfd, NULL, &tv))
+#endif
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#else /* !HAVE_POLL_H */
+ p.fd = s;
+ p.events = POLLOUT;
+ switch (poll(&p, 1, timeout * 1000))
+#endif /* !HAVE_POLL_H */
+
+ {
+ case 0:
+ /* Time out */
+ __xmlIOErr(XML_FROM_HTTP, 0, "Connect attempt timed out");
+ closesocket(s);
+ return INVALID_SOCKET;
+ case -1:
+ /* Ermm.. ?? */
+ __xmlIOErr(XML_FROM_HTTP, 0, "Connect failed");
+ closesocket(s);
+ return INVALID_SOCKET;
+ }
+
+#ifndef HAVE_POLL_H
+ if (FD_ISSET(s, &wfd)
+#ifdef _WINSOCKAPI_
+ || FD_ISSET(s, &xfd)
+#endif
+ )
+#else /* !HAVE_POLL_H */
+ if (p.revents == POLLOUT)
+#endif /* !HAVE_POLL_H */
+ {
+ XML_SOCKLEN_T len;
+
+ len = sizeof(status);
+#ifdef SO_ERROR
+ if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char *) &status, &len) <
+ 0) {
+ /* Solaris error code */
+ __xmlIOErr(XML_FROM_HTTP, 0, "getsockopt failed\n");
+ closesocket(s);
+ return INVALID_SOCKET;
+ }
+#endif
+ if (status) {
+ __xmlIOErr(XML_FROM_HTTP, 0,
+ "Error connecting to remote host");
+ closesocket(s);
+ errno = status;
+ return INVALID_SOCKET;
+ }
+ } else {
+ /* pbm */
+ __xmlIOErr(XML_FROM_HTTP, 0, "select failed\n");
+ closesocket(s);
+ return INVALID_SOCKET;
+ }
+
+ return (s);
+}
+
+/**
+ * xmlNanoHTTPConnectHost:
+ * @host: the host name
+ * @port: the port number
+ *
+ * Attempt a connection to the given host:port endpoint. It tries
+ * the multiple IP provided by the DNS if available.
+ *
+ * Returns -1 in case of failure, the file descriptor number otherwise
+ */
+
+static SOCKET
+xmlNanoHTTPConnectHost(const char *host, int port)
+{
+ struct hostent *h;
+ struct sockaddr *addr = NULL;
+ struct in_addr ia;
+ struct sockaddr_in sockin;
+
+#ifdef SUPPORT_IP6
+ struct in6_addr ia6;
+ struct sockaddr_in6 sockin6;
+#endif
+ int i;
+ SOCKET s;
+
+ memset (&sockin, 0, sizeof(sockin));
+#ifdef SUPPORT_IP6
+ memset (&sockin6, 0, sizeof(sockin6));
+#endif
+
+#if !defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && defined(RES_USE_INET6)
+ if (have_ipv6 ())
+ {
+ if (!(_res.options & RES_INIT))
+ res_init();
+ _res.options |= RES_USE_INET6;
+ }
+#endif
+
+#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
+ if (have_ipv6 ())
+#endif
+#if defined(HAVE_GETADDRINFO) && (defined(SUPPORT_IP6) || defined(_WIN32))
+ {
+ int status;
+ struct addrinfo hints, *res, *result;
+
+ result = NULL;
+ memset (&hints, 0,sizeof(hints));
+ hints.ai_socktype = SOCK_STREAM;
+
+ status = getaddrinfo (host, NULL, &hints, &result);
+ if (status) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "getaddrinfo failed\n");
+ return INVALID_SOCKET;
+ }
+
+ for (res = result; res; res = res->ai_next) {
+ if (res->ai_family == AF_INET) {
+ if (res->ai_addrlen > sizeof(sockin)) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+ freeaddrinfo (result);
+ return INVALID_SOCKET;
+ }
+ memcpy (&sockin, res->ai_addr, res->ai_addrlen);
+ sockin.sin_port = htons (port);
+ addr = (struct sockaddr *)&sockin;
+#ifdef SUPPORT_IP6
+ } else if (have_ipv6 () && (res->ai_family == AF_INET6)) {
+ if (res->ai_addrlen > sizeof(sockin6)) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+ freeaddrinfo (result);
+ return INVALID_SOCKET;
+ }
+ memcpy (&sockin6, res->ai_addr, res->ai_addrlen);
+ sockin6.sin6_port = htons (port);
+ addr = (struct sockaddr *)&sockin6;
+#endif
+ } else
+ continue; /* for */
+
+ s = xmlNanoHTTPConnectAttempt (addr);
+ if (s != INVALID_SOCKET) {
+ freeaddrinfo (result);
+ return (s);
+ }
+ }
+
+ if (result)
+ freeaddrinfo (result);
+ }
+#endif
+#if defined(HAVE_GETADDRINFO) && defined(SUPPORT_IP6) && !defined(_WIN32)
+ else
+#endif
+#if !defined(HAVE_GETADDRINFO) || !defined(_WIN32)
+ {
+ h = gethostbyname (GETHOSTBYNAME_ARG_CAST host);
+ if (h == NULL) {
+
+/*
+ * Okay, I got fed up by the non-portability of this error message
+ * extraction code. it work on Linux, if it work on your platform
+ * and one want to enable it, send me the defined(foobar) needed
+ */
+#if defined(HAVE_NETDB_H) && defined(HOST_NOT_FOUND) && defined(linux)
+ const char *h_err_txt = "";
+
+ switch (h_errno) {
+ case HOST_NOT_FOUND:
+ h_err_txt = "Authoritive host not found";
+ break;
+
+ case TRY_AGAIN:
+ h_err_txt =
+ "Non-authoritive host not found or server failure.";
+ break;
+
+ case NO_RECOVERY:
+ h_err_txt =
+ "Non-recoverable errors: FORMERR, REFUSED, or NOTIMP.";
+ break;
+
+#ifdef NO_ADDRESS
+ case NO_ADDRESS:
+ h_err_txt =
+ "Valid name, no data record of requested type.";
+ break;
+#endif
+
+ default:
+ h_err_txt = "No error text defined.";
+ break;
+ }
+ __xmlIOErr(XML_FROM_HTTP, 0, h_err_txt);
+#else
+ __xmlIOErr(XML_FROM_HTTP, 0, "Failed to resolve host");
+#endif
+ return INVALID_SOCKET;
+ }
+
+ for (i = 0; h->h_addr_list[i]; i++) {
+ if (h->h_addrtype == AF_INET) {
+ /* A records (IPv4) */
+ if ((unsigned int) h->h_length > sizeof(ia)) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+ return INVALID_SOCKET;
+ }
+ memcpy (&ia, h->h_addr_list[i], h->h_length);
+ sockin.sin_family = h->h_addrtype;
+ sockin.sin_addr = ia;
+ sockin.sin_port = (unsigned short)htons ((unsigned short)port);
+ addr = (struct sockaddr *) &sockin;
+#ifdef SUPPORT_IP6
+ } else if (have_ipv6 () && (h->h_addrtype == AF_INET6)) {
+ /* AAAA records (IPv6) */
+ if ((unsigned int) h->h_length > sizeof(ia6)) {
+ __xmlIOErr(XML_FROM_HTTP, 0, "address size mismatch\n");
+ return INVALID_SOCKET;
+ }
+ memcpy (&ia6, h->h_addr_list[i], h->h_length);
+ sockin6.sin6_family = h->h_addrtype;
+ sockin6.sin6_addr = ia6;
+ sockin6.sin6_port = htons (port);
+ addr = (struct sockaddr *) &sockin6;
+#endif
+ } else
+ break; /* for */
+
+ s = xmlNanoHTTPConnectAttempt (addr);
+ if (s != INVALID_SOCKET)
+ return (s);
+ }
+ }
+#endif
+
+#ifdef DEBUG_HTTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoHTTPConnectHost: unable to connect to '%s'.\n",
+ host);
+#endif
+ return INVALID_SOCKET;
+}
+
+
+/**
+ * xmlNanoHTTPOpen:
+ * @URL: The URL to load
+ * @contentType: if available the Content-Type information will be
+ * returned at that location
+ *
+ * This function try to open a connection to the indicated resource
+ * via HTTP GET.
+ *
+ * Returns NULL in case of failure, otherwise a request handler.
+ * The contentType, if provided must be freed by the caller
+ */
+
+void*
+xmlNanoHTTPOpen(const char *URL, char **contentType) {
+ if (contentType != NULL) *contentType = NULL;
+ return(xmlNanoHTTPMethod(URL, NULL, NULL, contentType, NULL, 0));
+}
+
+/**
+ * xmlNanoHTTPOpenRedir:
+ * @URL: The URL to load
+ * @contentType: if available the Content-Type information will be
+ * returned at that location
+ * @redir: if available the redirected URL will be returned
+ *
+ * This function try to open a connection to the indicated resource
+ * via HTTP GET.
+ *
+ * Returns NULL in case of failure, otherwise a request handler.
+ * The contentType, if provided must be freed by the caller
+ */
+
+void*
+xmlNanoHTTPOpenRedir(const char *URL, char **contentType, char **redir) {
+ if (contentType != NULL) *contentType = NULL;
+ if (redir != NULL) *redir = NULL;
+ return(xmlNanoHTTPMethodRedir(URL, NULL, NULL, contentType, redir, NULL,0));
+}
+
+/**
+ * xmlNanoHTTPRead:
+ * @ctx: the HTTP context
+ * @dest: a buffer
+ * @len: the buffer length
+ *
+ * This function tries to read @len bytes from the existing HTTP connection
+ * and saves them in @dest. This is a blocking call.
+ *
+ * Returns the number of byte read. 0 is an indication of an end of connection.
+ * -1 indicates a parameter error.
+ */
+int
+xmlNanoHTTPRead(void *ctx, void *dest, int len) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
+#ifdef HAVE_ZLIB_H
+ int bytes_read = 0;
+ int orig_avail_in;
+ int z_ret;
+#endif
+
+ if (ctx == NULL) return(-1);
+ if (dest == NULL) return(-1);
+ if (len <= 0) return(0);
+
+#ifdef HAVE_ZLIB_H
+ if (ctxt->usesGzip == 1) {
+ if (ctxt->strm == NULL) return(0);
+
+ ctxt->strm->next_out = dest;
+ ctxt->strm->avail_out = len;
+ ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr;
+
+ while (ctxt->strm->avail_out > 0 &&
+ (ctxt->strm->avail_in > 0 || xmlNanoHTTPRecv(ctxt) > 0)) {
+ orig_avail_in = ctxt->strm->avail_in =
+ ctxt->inptr - ctxt->inrptr - bytes_read;
+ ctxt->strm->next_in = BAD_CAST (ctxt->inrptr + bytes_read);
+
+ z_ret = inflate(ctxt->strm, Z_NO_FLUSH);
+ bytes_read += orig_avail_in - ctxt->strm->avail_in;
+
+ if (z_ret != Z_OK) break;
+ }
+
+ ctxt->inrptr += bytes_read;
+ return(len - ctxt->strm->avail_out);
+ }
+#endif
+
+ while (ctxt->inptr - ctxt->inrptr < len) {
+ if (xmlNanoHTTPRecv(ctxt) <= 0) break;
+ }
+ if (ctxt->inptr - ctxt->inrptr < len)
+ len = ctxt->inptr - ctxt->inrptr;
+ memcpy(dest, ctxt->inrptr, len);
+ ctxt->inrptr += len;
+ return(len);
+}
+
+/**
+ * xmlNanoHTTPClose:
+ * @ctx: the HTTP context
+ *
+ * This function closes an HTTP context, it ends up the connection and
+ * free all data related to it.
+ */
+void
+xmlNanoHTTPClose(void *ctx) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
+
+ if (ctx == NULL) return;
+
+ xmlNanoHTTPFreeCtxt(ctxt);
+}
+
+/**
+ * xmlNanoHTTPMethodRedir:
+ * @URL: The URL to load
+ * @method: the HTTP method to use
+ * @input: the input string if any
+ * @contentType: the Content-Type information IN and OUT
+ * @redir: the redirected URL OUT
+ * @headers: the extra headers
+ * @ilen: input length
+ *
+ * This function try to open a connection to the indicated resource
+ * via HTTP using the given @method, adding the given extra headers
+ * and the input buffer for the request content.
+ *
+ * Returns NULL in case of failure, otherwise a request handler.
+ * The contentType, or redir, if provided must be freed by the caller
+ */
+
+void*
+xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input,
+ char **contentType, char **redir,
+ const char *headers, int ilen ) {
+ xmlNanoHTTPCtxtPtr ctxt;
+ char *bp, *p;
+ int blen;
+ SOCKET ret;
+ int nbRedirects = 0;
+ char *redirURL = NULL;
+#ifdef DEBUG_HTTP
+ int xmt_bytes;
+#endif
+
+ if (URL == NULL) return(NULL);
+ if (method == NULL) method = "GET";
+ xmlNanoHTTPInit();
+
+retry:
+ if (redirURL == NULL) {
+ ctxt = xmlNanoHTTPNewCtxt(URL);
+ if (ctxt == NULL)
+ return(NULL);
+ } else {
+ ctxt = xmlNanoHTTPNewCtxt(redirURL);
+ if (ctxt == NULL)
+ return(NULL);
+ ctxt->location = xmlMemStrdup(redirURL);
+ }
+
+ if ((ctxt->protocol == NULL) || (strcmp(ctxt->protocol, "http"))) {
+ __xmlIOErr(XML_FROM_HTTP, XML_HTTP_URL_SYNTAX, "Not a valid HTTP URI");
+ xmlNanoHTTPFreeCtxt(ctxt);
+ if (redirURL != NULL) xmlFree(redirURL);
+ return(NULL);
+ }
+ if (ctxt->hostname == NULL) {
+ __xmlIOErr(XML_FROM_HTTP, XML_HTTP_UNKNOWN_HOST,
+ "Failed to identify host in URI");
+ xmlNanoHTTPFreeCtxt(ctxt);
+ if (redirURL != NULL) xmlFree(redirURL);
+ return(NULL);
+ }
+ if (proxy) {
+ blen = strlen(ctxt->hostname) * 2 + 16;
+ ret = xmlNanoHTTPConnectHost(proxy, proxyPort);
+ }
+ else {
+ blen = strlen(ctxt->hostname);
+ ret = xmlNanoHTTPConnectHost(ctxt->hostname, ctxt->port);
+ }
+ if (ret == INVALID_SOCKET) {
+ xmlNanoHTTPFreeCtxt(ctxt);
+ if (redirURL != NULL) xmlFree(redirURL);
+ return(NULL);
+ }
+ ctxt->fd = ret;
+
+ if (input == NULL)
+ ilen = 0;
+ else
+ blen += 36;
+
+ if (headers != NULL)
+ blen += strlen(headers) + 2;
+ if (contentType && *contentType)
+ /* reserve for string plus 'Content-Type: \r\n" */
+ blen += strlen(*contentType) + 16;
+ if (ctxt->query != NULL)
+ /* 1 for '?' */
+ blen += strlen(ctxt->query) + 1;
+ blen += strlen(method) + strlen(ctxt->path) + 24;
+#ifdef HAVE_ZLIB_H
+ /* reserve for possible 'Accept-Encoding: gzip' string */
+ blen += 23;
+#endif
+ if (ctxt->port != 80) {
+ /* reserve space for ':xxxxx', incl. potential proxy */
+ if (proxy)
+ blen += 12;
+ else
+ blen += 6;
+ }
+ bp = (char*)xmlMallocAtomic(blen);
+ if ( bp == NULL ) {
+ xmlNanoHTTPFreeCtxt( ctxt );
+ xmlHTTPErrMemory("allocating header buffer");
+ return ( NULL );
+ }
+
+ p = bp;
+
+ if (proxy) {
+ if (ctxt->port != 80) {
+ p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
+ method, ctxt->hostname,
+ ctxt->port, ctxt->path );
+ }
+ else
+ p += snprintf( p, blen - (p - bp), "%s http://%s%s", method,
+ ctxt->hostname, ctxt->path);
+ }
+ else
+ p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
+
+ if (ctxt->query != NULL)
+ p += snprintf( p, blen - (p - bp), "?%s", ctxt->query);
+
+ if (ctxt->port == 80) {
+ p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
+ ctxt->hostname);
+ } else {
+ p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s:%d\r\n",
+ ctxt->hostname, ctxt->port);
+ }
+
+#ifdef HAVE_ZLIB_H
+ p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
+#endif
+
+ if (contentType != NULL && *contentType)
+ p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
+
+ if (headers != NULL)
+ p += snprintf( p, blen - (p - bp), "%s", headers );
+
+ if (input != NULL)
+ snprintf(p, blen - (p - bp), "Content-Length: %d\r\n\r\n", ilen );
+ else
+ snprintf(p, blen - (p - bp), "\r\n");
+
+#ifdef DEBUG_HTTP
+ xmlGenericError(xmlGenericErrorContext,
+ "-> %s%s", proxy? "(Proxy) " : "", bp);
+ if ((blen -= strlen(bp)+1) < 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "ERROR: overflowed buffer by %d bytes\n", -blen);
+#endif
+ ctxt->outptr = ctxt->out = bp;
+ ctxt->state = XML_NANO_HTTP_WRITE;
+ blen = strlen( ctxt->out );
+#ifdef DEBUG_HTTP
+ xmt_bytes = xmlNanoHTTPSend(ctxt, ctxt->out, blen );
+ if ( xmt_bytes != blen )
+ xmlGenericError( xmlGenericErrorContext,
+ "xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
+ xmt_bytes, blen,
+ "bytes of HTTP headers sent to host",
+ ctxt->hostname );
+#else
+ xmlNanoHTTPSend(ctxt, ctxt->out, blen );
+#endif
+
+ if ( input != NULL ) {
+#ifdef DEBUG_HTTP
+ xmt_bytes = xmlNanoHTTPSend( ctxt, input, ilen );
+
+ if ( xmt_bytes != ilen )
+ xmlGenericError( xmlGenericErrorContext,
+ "xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
+ xmt_bytes, ilen,
+ "bytes of HTTP content sent to host",
+ ctxt->hostname );
+#else
+ xmlNanoHTTPSend( ctxt, input, ilen );
+#endif
+ }
+
+ ctxt->state = XML_NANO_HTTP_READ;
+
+ while ((p = xmlNanoHTTPReadLine(ctxt)) != NULL) {
+ if (*p == 0) {
+ ctxt->content = ctxt->inrptr;
+ xmlFree(p);
+ break;
+ }
+ xmlNanoHTTPScanAnswer(ctxt, p);
+
+#ifdef DEBUG_HTTP
+ xmlGenericError(xmlGenericErrorContext, "<- %s\n", p);
+#endif
+ xmlFree(p);
+ }
+
+ if ((ctxt->location != NULL) && (ctxt->returnValue >= 300) &&
+ (ctxt->returnValue < 400)) {
+#ifdef DEBUG_HTTP
+ xmlGenericError(xmlGenericErrorContext,
+ "\nRedirect to: %s\n", ctxt->location);
+#endif
+ while ( xmlNanoHTTPRecv(ctxt) > 0 ) ;
+ if (nbRedirects < XML_NANO_HTTP_MAX_REDIR) {
+ nbRedirects++;
+ if (redirURL != NULL)
+ xmlFree(redirURL);
+ redirURL = xmlMemStrdup(ctxt->location);
+ xmlNanoHTTPFreeCtxt(ctxt);
+ goto retry;
+ }
+ xmlNanoHTTPFreeCtxt(ctxt);
+ if (redirURL != NULL) xmlFree(redirURL);
+#ifdef DEBUG_HTTP
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNanoHTTPMethodRedir: Too many redirects, aborting ...\n");
+#endif
+ return(NULL);
+ }
+
+ if (contentType != NULL) {
+ if (ctxt->contentType != NULL)
+ *contentType = xmlMemStrdup(ctxt->contentType);
+ else
+ *contentType = NULL;
+ }
+
+ if ((redir != NULL) && (redirURL != NULL)) {
+ *redir = redirURL;
+ } else {
+ if (redirURL != NULL)
+ xmlFree(redirURL);
+ if (redir != NULL)
+ *redir = NULL;
+ }
+
+#ifdef DEBUG_HTTP
+ if (ctxt->contentType != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "\nCode %d, content-type '%s'\n\n",
+ ctxt->returnValue, ctxt->contentType);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "\nCode %d, no content-type\n\n",
+ ctxt->returnValue);
+#endif
+
+ return((void *) ctxt);
+}
+
+/**
+ * xmlNanoHTTPMethod:
+ * @URL: The URL to load
+ * @method: the HTTP method to use
+ * @input: the input string if any
+ * @contentType: the Content-Type information IN and OUT
+ * @headers: the extra headers
+ * @ilen: input length
+ *
+ * This function try to open a connection to the indicated resource
+ * via HTTP using the given @method, adding the given extra headers
+ * and the input buffer for the request content.
+ *
+ * Returns NULL in case of failure, otherwise a request handler.
+ * The contentType, if provided must be freed by the caller
+ */
+
+void*
+xmlNanoHTTPMethod(const char *URL, const char *method, const char *input,
+ char **contentType, const char *headers, int ilen) {
+ return(xmlNanoHTTPMethodRedir(URL, method, input, contentType,
+ NULL, headers, ilen));
+}
+
+/**
+ * xmlNanoHTTPFetch:
+ * @URL: The URL to load
+ * @filename: the filename where the content should be saved
+ * @contentType: if available the Content-Type information will be
+ * returned at that location
+ *
+ * This function try to fetch the indicated resource via HTTP GET
+ * and save it's content in the file.
+ *
+ * Returns -1 in case of failure, 0 incase of success. The contentType,
+ * if provided must be freed by the caller
+ */
+int
+xmlNanoHTTPFetch(const char *URL, const char *filename, char **contentType) {
+ void *ctxt = NULL;
+ char *buf = NULL;
+ int fd;
+ int len;
+ int ret = 0;
+
+ if (filename == NULL) return(-1);
+ ctxt = xmlNanoHTTPOpen(URL, contentType);
+ if (ctxt == NULL) return(-1);
+
+ if (!strcmp(filename, "-"))
+ fd = 0;
+ else {
+ fd = open(filename, O_CREAT | O_WRONLY, 00644);
+ if (fd < 0) {
+ xmlNanoHTTPClose(ctxt);
+ if ((contentType != NULL) && (*contentType != NULL)) {
+ xmlFree(*contentType);
+ *contentType = NULL;
+ }
+ return(-1);
+ }
+ }
+
+ xmlNanoHTTPFetchContent( ctxt, &buf, &len );
+ if ( len > 0 ) {
+ if (write(fd, buf, len) == -1) {
+ ret = -1;
+ }
+ }
+
+ xmlNanoHTTPClose(ctxt);
+ close(fd);
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlNanoHTTPSave:
+ * @ctxt: the HTTP context
+ * @filename: the filename where the content should be saved
+ *
+ * This function saves the output of the HTTP transaction to a file
+ * It closes and free the context at the end
+ *
+ * Returns -1 in case of failure, 0 incase of success.
+ */
+int
+xmlNanoHTTPSave(void *ctxt, const char *filename) {
+ char *buf = NULL;
+ int fd;
+ int len;
+ int ret = 0;
+
+ if ((ctxt == NULL) || (filename == NULL)) return(-1);
+
+ if (!strcmp(filename, "-"))
+ fd = 0;
+ else {
+ fd = open(filename, O_CREAT | O_WRONLY, 0666);
+ if (fd < 0) {
+ xmlNanoHTTPClose(ctxt);
+ return(-1);
+ }
+ }
+
+ xmlNanoHTTPFetchContent( ctxt, &buf, &len );
+ if ( len > 0 ) {
+ if (write(fd, buf, len) == -1) {
+ ret = -1;
+ }
+ }
+
+ xmlNanoHTTPClose(ctxt);
+ close(fd);
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlNanoHTTPReturnCode:
+ * @ctx: the HTTP context
+ *
+ * Get the latest HTTP return code received
+ *
+ * Returns the HTTP return code for the request.
+ */
+int
+xmlNanoHTTPReturnCode(void *ctx) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
+
+ if (ctxt == NULL) return(-1);
+
+ return(ctxt->returnValue);
+}
+
+/**
+ * xmlNanoHTTPAuthHeader:
+ * @ctx: the HTTP context
+ *
+ * Get the authentication header of an HTTP context
+ *
+ * Returns the stashed value of the WWW-Authenticate or Proxy-Authenticate
+ * header.
+ */
+const char *
+xmlNanoHTTPAuthHeader(void *ctx) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr) ctx;
+
+ if (ctxt == NULL) return(NULL);
+
+ return(ctxt->authHeader);
+}
+
+/**
+ * xmlNanoHTTPContentLength:
+ * @ctx: the HTTP context
+ *
+ * Provides the specified content length from the HTTP header.
+ *
+ * Return the specified content length from the HTTP header. Note that
+ * a value of -1 indicates that the content length element was not included in
+ * the response header.
+ */
+int
+xmlNanoHTTPContentLength( void * ctx ) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx;
+
+ return ( ( ctxt == NULL ) ? -1 : ctxt->ContentLength );
+}
+
+/**
+ * xmlNanoHTTPRedir:
+ * @ctx: the HTTP context
+ *
+ * Provides the specified redirection URL if available from the HTTP header.
+ *
+ * Return the specified redirection URL or NULL if not redirected.
+ */
+const char *
+xmlNanoHTTPRedir( void * ctx ) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx;
+
+ return ( ( ctxt == NULL ) ? NULL : ctxt->location );
+}
+
+/**
+ * xmlNanoHTTPEncoding:
+ * @ctx: the HTTP context
+ *
+ * Provides the specified encoding if specified in the HTTP headers.
+ *
+ * Return the specified encoding or NULL if not available
+ */
+const char *
+xmlNanoHTTPEncoding( void * ctx ) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx;
+
+ return ( ( ctxt == NULL ) ? NULL : ctxt->encoding );
+}
+
+/**
+ * xmlNanoHTTPMimeType:
+ * @ctx: the HTTP context
+ *
+ * Provides the specified Mime-Type if specified in the HTTP headers.
+ *
+ * Return the specified Mime-Type or NULL if not available
+ */
+const char *
+xmlNanoHTTPMimeType( void * ctx ) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx;
+
+ return ( ( ctxt == NULL ) ? NULL : ctxt->mimeType );
+}
+
+/**
+ * xmlNanoHTTPFetchContent:
+ * @ctx: the HTTP context
+ * @ptr: pointer to set to the content buffer.
+ * @len: integer pointer to hold the length of the content
+ *
+ * Check if all the content was read
+ *
+ * Returns 0 if all the content was read and available, returns
+ * -1 if received content length was less than specified or an error
+ * occurred.
+ */
+static int
+xmlNanoHTTPFetchContent( void * ctx, char ** ptr, int * len ) {
+ xmlNanoHTTPCtxtPtr ctxt = (xmlNanoHTTPCtxtPtr)ctx;
+
+ int rc = 0;
+ int cur_lgth;
+ int rcvd_lgth;
+ int dummy_int;
+ char * dummy_ptr = NULL;
+
+ /* Dummy up return input parameters if not provided */
+
+ if ( len == NULL )
+ len = &dummy_int;
+
+ if ( ptr == NULL )
+ ptr = &dummy_ptr;
+
+ /* But can't work without the context pointer */
+
+ if ( ( ctxt == NULL ) || ( ctxt->content == NULL ) ) {
+ *len = 0;
+ *ptr = NULL;
+ return ( -1 );
+ }
+
+ rcvd_lgth = ctxt->inptr - ctxt->content;
+
+ while ( (cur_lgth = xmlNanoHTTPRecv( ctxt )) > 0 ) {
+
+ rcvd_lgth += cur_lgth;
+ if ( (ctxt->ContentLength > 0) && (rcvd_lgth >= ctxt->ContentLength) )
+ break;
+ }
+
+ *ptr = ctxt->content;
+ *len = rcvd_lgth;
+
+ if ( ( ctxt->ContentLength > 0 ) && ( rcvd_lgth < ctxt->ContentLength ) )
+ rc = -1;
+ else if ( rcvd_lgth == 0 )
+ rc = -1;
+
+ return ( rc );
+}
+
+#ifdef STANDALONE
+int main(int argc, char **argv) {
+ char *contentType = NULL;
+
+ if (argv[1] != NULL) {
+ if (argv[2] != NULL)
+ xmlNanoHTTPFetch(argv[1], argv[2], &contentType);
+ else
+ xmlNanoHTTPFetch(argv[1], "-", &contentType);
+ if (contentType != NULL) xmlFree(contentType);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s: minimal HTTP GET implementation\n", argv[0]);
+ xmlGenericError(xmlGenericErrorContext,
+ "\tusage %s [ URL [ filename ] ]\n", argv[0]);
+ }
+ xmlNanoHTTPCleanup();
+ xmlMemoryDump();
+ return(0);
+}
+#endif /* STANDALONE */
+#else /* !LIBXML_HTTP_ENABLED */
+#ifdef STANDALONE
+#include <stdio.h>
+int main(int argc, char **argv) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%s : HTTP support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* STANDALONE */
+#endif /* LIBXML_HTTP_ENABLED */
+#define bottom_nanohttp
+#include "elfgcchack.h"
diff --git a/os400/README400 b/os400/README400
new file mode 100644
index 0000000..6c16de9
--- /dev/null
+++ b/os400/README400
@@ -0,0 +1,214 @@
+
+Implementation notes:
+
+ This is a true OS/400 implementation, not a PASE implementation (for PASE,
+use an AIX implementation).
+
+ The biggest problem with OS/400 is EBCDIC. The current libxml2 implementation
+uses UTF-8 internally. To ease encoding conversion between the calling
+applications and libxml2, supplementary "convert and latch" functions are
+provided (See below). To bind the EBCDIC OS/400 system calls and libxml2,
+an ASCII run-time environment (QADRT) has been used and wrapper functions have
+been designed.
+
+Other problems are:
+- Source code line length: to be stored in DB2 members, source files may not
+ have lines longer than 100 characters. Some header and documentation files
+ have been modified accordingly.
+- va_list dereferencing: the OS/400 implementation of va_list type is an array
+ but the compiler forbids explicit array dereferencing. Source files have
+ been updated accordingly.
+- Depending on the compilation/execution environment, it is possible that
+ stdin/stdout/stderr are not associated with a file descriptor; as a side
+ effect, open() may return a file descriptor value 0, 1 or 2 that is NOT
+ a C standard file. Thus using such a number may be inaccurate.
+- iconv_open() arguments: OS/400 uses non-standard encoding names and does not
+ support standard names. For this reason, a name wrapper has been designed.
+- dlopen() (support for xmodule): the function and its corollaries are not
+ provided by the OS/400 library. However a local implementation is provided.
+
+
+Compiling on OS/400:
+
+_ As a prerequisite, QADRT development environment must be installed.
+_ Install the libxml2 source directory in IFS.
+_ Enter shell (QSH)
+_ Change current directory to the libxml2 installation directory
+_ Change current directory to ./os400
+_ Edit file iniscript.sh. You may want to change tunable configuration
+ parameters, like debug info generation, optimisation level, listing option,
+ target library, zlib availability, etc.
+_ Copy any file in the current directory to makelog (i.e.:
+ cp initscript.sh makelog): this is intended to create the makelog file with
+ an ASCII CCSID!
+_ Enter the command "sh make.sh >makelog 2>&1'
+_ Examine the makelog file to check for compilation errors.
+
+ Leaving file initscript.sh unchanged, this will produce the following
+OS/400 objects:
+_ Library LIBXML2. All other objects will be stored in this library.
+_ Modules for all libxml2 units, with full debug info and no code optimization.
+_ Binding directory LIBXML2_A, to be used at calling program link time for
+ statically binding the modules (specify BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)
+ when creating a program using LIBXML2_A).
+_ Service program LIBXML2. To be used at calling program run-time
+ when this program has dynamically bound libxml2 at link time.
+_ Binding directory LIBXML2. To be used to dynamically bind libxml2 when
+ linking a calling program.
+_ Source file LIBXML. It contains all the header members needed to compile a
+ C/C++ module using libxml2.
+_ Standard and additional C/C++ libxml2 header members (possibly renamed) in
+ file LIBXML.
+_ IFS directory /libxml2 with subdirectory include/libxml containing all
+ C/C++ header files for IFS-based compilation.
+_ Source file LIBXMLRPG. It contains all the include members needed to compile a
+ ILE/RPG module/program using libxml2 (ILE/RPG binding).
+_ ILE/RPG binding include members (possibly renamed) in file LIBXMLRPG.
+_ IFS subdirectory /libxml2/include/libxmlrpg containing all ILE/RPG include
+ files for IFS-based compilation.
+
+
+Renamed header files in DB2 members:
+ DB2 member names are limited to 10 characters, thus the following C/C++
+header members are renamed as:
+ parserInternals.h --> PARSERINTE
+ schemasInternals.h --> SCHEMASINT
+ xmlautomata.h --> XMLAUTOMAT
+ xmlschemastype.h --> SCHMTYPES
+ xpathInternals.h --> XPATHINTER
+IFS header files are NOT renamed.
+ILE/RPG headers are processed likewise.
+
+
+Special programming consideration:
+
+QADRT being used, the following points must be considered:
+_ If static binding is used, service program QADRTTS must be linked too.
+_ The EBCDIC CCSID used by QADRT is 37 by default, NOT THE JOB'S CCSID. If
+ another EBCDIC CCSID is required, it must be set via a locale through a call
+ to setlocale_a (QADRT's setlocale() ASCII wrapper) with category LC_ALL or
+ LC_CTYPE, or by setting environment variable QADRT_ENV_LOCALE to the locale
+ object path before executing the program.
+_ Always use *IFSIO or *IFS64IO to compile calling programs.
+
+
+
+Supplementary (non libxml2 standard) support procedures for OS/400.
+
+ As cited above, there are some procedures to ease encoding conversion of
+libxml2 function arguments and results: the mechanism is based on
+dictionaries. The functions convert a string, latch the result in a dictionary
+to ensure its persistence and return its address. It is the caller's
+responsibility to clean the dictionary when it becomes too big or disappears.
+
+The procedures are:
+
+#include <libxml/transcode.h>
+
+const char * xmlTranscodeResult(const xmlChar * s,
+ const char * encoding,
+ xmlDictPtr * dict,
+ void (*freeproc)(const void *));
+
+const xmlChar * xmlTranscodeString(const char * s,
+ const char * encoding,
+ xmlDictPtr * dict);
+
+const xmlChar * xmlTranscodeWString(const char * s,
+ const char * encoding,
+ xmlDictPtr * dict);
+
+const xmlChar * xmlTranscodeWString(const char * s,
+ const char * encoding,
+ xmlDictPtr * dict);
+
+where:
+s is the string to translate.
+encoding is the alternate character encoding. If null, the current job's
+ encoding (CCSID) is used.
+dict is the address of the latching directory. If NULL, the procedure
+ functions as a simple non-latching encoding converter and
+ its result value should be freed by the caller.
+freeproc is a procedure to release the original string, or NULL.
+
+xmlTranscodeResult() converts from UTF-8 to the given alternate encoding.
+xmlTranscodeString() converts from the given 8-bit encoding to UTF-8 (note that
+ UTF-8 itself is considered as a 8-bit encoding).
+xmlTranscodeWString() converts from the given 16-bit encoding to UTF-8.
+xmlTranscodeHString() converts from the given 32-bit encoding to UTF-8.
+
+
+To shorten statements using these functions, shorthands are defined:
+
+xmlTR for xmlTranscodeResult
+xmlTS for xmlTranscodeString
+xmlTW for xmlTranscodeWString
+xmlTH for xmlTranscodeHstring
+
+These shorthands may be disabled by defining XML_NO_SHORT_NAMES before
+libxml/transcode.h inclusion.
+
+A directory pointer must be preset to NULL before the first call using it to
+one of the above procedure.
+
+To release a latching directory, use function
+
+void xmlZapDict(xmlDictPtr * dict);
+
+
+Example:
+
+#include <libxml/transcode.h>
+#include <libxml/tree.h>
+
+xmlDocPtr mySimpleXMLDoc(char * element, char * text)
+{
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ xmlDictPtr dict = NULL;
+
+ /* element and text are encoded in the current job's encoding. */
+
+ doc = xmlNewDoc();
+ xmlNewTextChild((xmlNodePtr) doc, NULL, xmlTS(element, NULL,
+ &dict), xmlTS(text, NULL, &dict));
+ xmlZapDict(&dict);
+ return doc;
+}
+
+
+Additionally, a formatter into latched/dynamic storage is provided:
+
+const char * xmlVasprintf(xmlDictPtr * dict,
+ const char * encoding,
+ const xmlChar * fmt,
+ va_list args);
+
+
+
+ILE/RPG binding:
+
+ All standard types and procedures are provided. Since ILE/RPG does not
+support macros, they have not been ported, with the exceptions of the more
+useful ones and the global/threaded variables access macros. These variables
+can be read with function get_xxx(void), where xxxx is the name of the
+variable; they may be set by calling function set_xxxx(value), where value is
+of the same type as the variable.
+
+ The C va_list is not implemented as such in ILE/RPG. Functions implementing
+va_list and associated methods are provided:
+
+ /include "libxmlrpg/xmlstdarg"
+
+ d xmlVaStart pr
+ d list like(xmlVaList)
+ d lastargaddr * value
+ d lastargsize 10u 0 value
+
+ d xmlVaArg pr
+ d list like(xmlVaList)
+ d dest * value
+ d argsize 10i 0 value
+
+ d xmlVaEnd pr
+ d list like(xmlVaList)
diff --git a/os400/dlfcn/dlfcn.c b/os400/dlfcn/dlfcn.c
new file mode 100644
index 0000000..1488e12
--- /dev/null
+++ b/os400/dlfcn/dlfcn.c
@@ -0,0 +1,1213 @@
+/**
+*** dlopen(), dlclose() dlsym(), dlerror() emulation for OS/400.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <dirent.h>
+#include <pthread.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <except.h> /* AS400 exceptions. */
+#include <miptrnam.h> /* MI pointers support. */
+#include <qusec.h> /* Error structures. */
+#include <qp0lstdi.h> /* Path to QSYS object name. */
+#include <qp0z1170.h> /* For Qp0zInitEnv(). */
+#include <qleawi.h> /* For QleActBndPgmLong() definitions. */
+#include <qsy.h> /* Qualified name structure. */
+#include <qmhrtvm.h> /* Retrieve message from message file. */
+
+#include <mih/rinzstat.h>
+#include <mih/matactex.h>
+
+#include "libxml/hash.h"
+#include "dlfcn.h"
+
+
+/**
+*** Maximum internal path length.
+**/
+
+#define MAXPATHLEN 5120
+
+
+/**
+*** Maximum error string length.
+**/
+
+#define MAX_ERR_STR 511
+
+
+/**
+*** Field address macro.
+**/
+
+#define offset_by(t, b, o) ((t *) ((char *) (b) + (unsigned int) (o)))
+
+
+/**
+*** Global flags.
+**/
+
+#define INITED 000001 /* Package has been initialized. */
+#define THREADS 000002 /* Multithreaded job. */
+#define MULTIBUF 000004 /* One error buffer per thread. */
+
+
+/**
+*** DLL handle private structure.
+**/
+
+typedef struct {
+ Qle_ABP_Info_Long_t actinfo; /* Activation information. */
+ _SYSPTR pointer; /* Pointer to DLL object. */
+ unsigned int actcount; /* Activation count. */
+} dlinfo;
+
+
+/**
+*** Per-thread structure.
+**/
+
+typedef struct {
+ unsigned int lockcount; /* Mutex lock count. */
+ unsigned int iserror; /* Flag error present. */
+ char str[MAX_ERR_STR + 1]; /* Error string buffer. */
+} dlts_t;
+
+
+static pthread_mutex_t dlmutex = PTHREAD_MUTEX_INITIALIZER;
+static xmlHashTablePtr dldir = (xmlHashTablePtr) NULL; /* DLL directory. */
+static unsigned int dlflags = 0; /* Package flags. */
+static pthread_key_t dlkey;
+static dlts_t static_buf; /* Static error buffer. */
+
+
+
+static void
+dlthreadterm(void * mem)
+
+{
+ free(mem);
+ pthread_setspecific(dlkey, NULL);
+}
+
+
+static void
+dlterm(void)
+
+{
+ void * p;
+
+ if (dlflags & MULTIBUF) {
+ p = pthread_getspecific(dlkey);
+
+ if (p)
+ dlthreadterm(p);
+ }
+
+ if (dlflags & THREADS)
+ pthread_mutex_lock(&dlmutex);
+
+ if (dldir) {
+ xmlHashFree(dldir, (xmlHashDeallocator) NULL);
+ dldir = NULL;
+ }
+
+ if (dlflags & MULTIBUF)
+ pthread_key_delete(dlkey);
+
+ dlflags |= ~(INITED | MULTIBUF);
+ pthread_mutex_unlock(&dlmutex);
+ pthread_mutex_destroy(&dlmutex);
+}
+
+
+static void
+dlinit(void)
+
+{
+ int locked;
+
+ /**
+ *** Initialize the package.
+ *** Should be call once per process.
+ **/
+
+ locked = !pthread_mutex_lock(&dlmutex);
+
+ if (!(dlflags & INITED)) {
+ dlflags &= ~THREADS;
+
+ if (locked)
+ dlflags |= THREADS;
+
+ Qp0zInitEnv();
+ dldir = xmlHashCreate(16);
+ dlflags &= ~MULTIBUF;
+
+ if (dlflags & THREADS)
+ if (!pthread_key_create(&dlkey, dlthreadterm))
+ dlflags |= MULTIBUF;
+
+ atexit(dlterm);
+ dlflags |= INITED;
+ }
+
+ if (locked)
+ pthread_mutex_unlock(&dlmutex);
+}
+
+
+static void
+dlthreadinit(void)
+
+{
+ dlts_t * p;
+
+ if (!(dlflags & INITED))
+ dlinit();
+
+ if (dlflags & MULTIBUF) {
+ p = pthread_getspecific(dlkey);
+
+ if (!p) {
+ p = (dlts_t *) malloc(sizeof *p);
+
+ if (p) {
+ p->lockcount = 0;
+ p->iserror = 0;
+
+ if (pthread_setspecific(dlkey, p))
+ free(p);
+ }
+ }
+ }
+}
+
+
+static void
+dllock(void)
+
+{
+ dlts_t * p;
+
+ if (!(dlflags & THREADS))
+ return;
+
+ if (dlflags & MULTIBUF) {
+ p = pthread_getspecific(dlkey);
+
+ if (p && p->lockcount) {
+ p->lockcount++;
+ return;
+ }
+ }
+ else
+ p = (dlts_t *) NULL;
+
+ if (pthread_mutex_lock(&dlmutex))
+ return;
+
+ if (p)
+ p->lockcount++;
+}
+
+
+static void
+dlunlock(void)
+
+{
+ dlts_t * p;
+
+ if (!(dlflags & THREADS))
+ return;
+
+ if (dlflags & MULTIBUF) {
+ p = pthread_getspecific(dlkey);
+
+ if (p && p->lockcount > 1) {
+ p->lockcount--;
+ return;
+ }
+ }
+ else
+ p = (dlts_t *) NULL;
+
+ if (pthread_mutex_unlock(&dlmutex))
+ return;
+
+ if (p)
+ p->lockcount--;
+}
+
+
+const char *
+dlerror(void)
+
+{
+ dlts_t * p;
+
+ dlthreadinit();
+
+ if (!(dlflags & MULTIBUF))
+ p = &static_buf;
+ else if (!(p = (dlts_t *) pthread_getspecific(dlkey)))
+ p = &static_buf;
+
+ if (!p->iserror)
+ return (const char *) NULL;
+
+ p->iserror = 0;
+ return p->str;
+}
+
+
+static void
+dlseterror_from_errno(unsigned int err_no)
+
+{
+ dlts_t * p;
+
+ if (!(dlflags & MULTIBUF))
+ p = &static_buf;
+ else if (!(p = (dlts_t *) pthread_getspecific(dlkey)))
+ p = &static_buf;
+
+ strcpy(p->str, strerror(err_no));
+ p->iserror = 1;
+}
+
+
+static void
+dlseterror_from_exception(volatile _INTRPT_Hndlr_Parms_T * excp)
+
+{
+ int i;
+ Qmh_Rtvm_RTVM0300_t * imp;
+ char * cp;
+ _INTRPT_Hndlr_Parms_T * p;
+ dlts_t * q;
+ char rtvmbuf[30000];
+ Qus_EC_t errinfo;
+
+ p = (_INTRPT_Hndlr_Parms_T *) excp;
+ errinfo.Bytes_Provided = 0; /* Exception on error. */
+ QMHRTVM(rtvmbuf, sizeof rtvmbuf, "RTVM0300", p->Msg_Id,
+ "QCPFMSG QSYS ", p->Ex_Data, p->Msg_Data_Len,
+ "*YES ", "*NO ", &errinfo);
+ imp = offset_by(Qmh_Rtvm_RTVM0300_t, rtvmbuf, 0);
+
+ if (!(dlflags & MULTIBUF))
+ q = &static_buf;
+ else if (!(q = (dlts_t *) pthread_getspecific(dlkey)))
+ q = &static_buf;
+
+ if (i = imp->Length_Message_Returned)
+ cp = offset_by(char, imp, imp->Offset_Message_Returned);
+ else if (i = imp->Length_Help_Returned)
+ cp = offset_by(char, imp, imp->Offset_Help_Returned);
+ else {
+ q->iserror = 0;
+ return;
+ }
+
+ q->iserror = 1;
+
+ if (i > sizeof q->str - 1)
+ i = sizeof q->str - 1;
+
+ memcpy(q->str, cp, i);
+ q->str[i] = '\0';
+}
+
+
+static int
+dlparentpath(const char * path, size_t len)
+
+{
+ if (len <= 1)
+ return len;
+
+ while (path[--len] != '/')
+ ;
+
+ return len? len: 1;
+}
+
+
+static int
+dlmakepath(char * path, size_t pathlen, const char * tail, size_t taillen)
+
+{
+ int i;
+
+ if (taillen && tail[0] == '/')
+ pathlen = 0;
+
+ for (;;) {
+ while (taillen && *tail == '/') {
+ tail++;
+ taillen--;
+ }
+
+ if (!taillen)
+ break;
+
+ for (i = 0; i < taillen; i++)
+ if (tail[i] == '/')
+ break;
+
+ if (*tail == '.')
+ switch (i) {
+
+ case 2:
+ if (tail[1] != '.')
+ break;
+
+ pathlen = dlparentpath(path, pathlen);
+
+ case 1:
+ tail += i;
+ taillen -= i;
+ continue;
+ }
+
+ if (pathlen + i + 1 >= MAXPATHLEN) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ path[pathlen++] = '/';
+ memcpy(path + pathlen, tail, i);
+ pathlen += i;
+ }
+
+ if (!pathlen)
+ path[pathlen++] = '/';
+
+ path[pathlen] = '\0';
+ return pathlen;
+}
+
+
+static int
+dlresolveLink(const char * path, char * buf, size_t bufsiz)
+
+{
+ int n;
+ int l1;
+ int l2;
+ struct stat sbuf;
+ char buf1[MAXPATHLEN + 1];
+ char buf2[MAXPATHLEN + 1];
+
+ /**
+ *** Resolve symbolic link to IFS object name.
+ **/
+
+ if (!buf) {
+ errno = EFAULT;
+ return -1;
+ }
+
+ if (!path || !*path || !bufsiz) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (*path != '/') {
+ if (!getcwd(buf1, sizeof buf1))
+ return -1;
+
+ l1 = strlen(buf1);
+ }
+ else
+ l1 = 0;
+
+ l1 = dlmakepath(buf1, l1, path, strlen(path));
+ n = 0;
+
+ for (;;) {
+ if (l1 < 0)
+ return -1;
+
+ if (n++ >= 256) {
+ errno = ELOOP;
+ return -1;
+ }
+
+ if (lstat(buf1, &sbuf)) {
+ if (errno == ENOENT)
+ break;
+
+ return -1;
+ }
+
+ if (!S_ISLNK(sbuf.st_mode))
+ break;
+
+ if (sbuf.st_size > MAXPATHLEN) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ l2 = readlink(buf1, buf2, MAXPATHLEN + 1);
+
+ if (l2 < 0)
+ return -1;
+
+ if (buf2[0] != '/')
+ l1 = dlparentpath(buf1, l1);
+
+ l1 = dlmakepath(buf1, l1, buf2, l2);
+ }
+
+ if (l1 >= bufsiz) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ memcpy(buf, buf1, l1 + 1);
+ return l1;
+}
+
+
+static int
+dlGetObjectName(Qp0l_QSYS_Info_t * qsysinfo, const char * dir,
+ int dirlen, const char * link)
+
+{
+ int n;
+ char * namebuf;
+ Qlg_Path_Name_T * qptp;
+ char pathbuf[sizeof(Qlg_Path_Name_T) + _QP0L_DIR_NAME_LG + 4];
+ Qus_EC_t errinfo;
+ struct stat sbuf;
+
+ /**
+ *** Get QSYS object library/name/member and type corresponding to
+ *** the symbolic `link' in directory `dir'.
+ **/
+
+ if (!qsysinfo) {
+ errno = EFAULT;
+ return -1;
+ }
+
+ if (!dir && !link) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ qptp = (Qlg_Path_Name_T *) pathbuf;
+ namebuf = pathbuf + sizeof(Qlg_Path_Name_T);
+ n = 0;
+
+ /**
+ *** Build full path.
+ **/
+
+ if (dir) {
+ if (dirlen < 0 || dirlen > _QP0L_DIR_NAME_LG + 4)
+ dirlen = _QP0L_DIR_NAME_LG + 4;
+
+ while (*dir && n < dirlen)
+ namebuf[n++] = *dir++;
+ }
+
+ if (n && namebuf[n - 1] == '/')
+ n--;
+
+ if (link) {
+ if (*link && *link != '/' && n < _QP0L_DIR_NAME_LG + 4)
+ namebuf[n++] = '/';
+
+ while (*link && n < _QP0L_DIR_NAME_LG + 4)
+ namebuf[n++] = *link++;
+ }
+
+ if (!n || n > _QP0L_DIR_NAME_LG) {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ namebuf[n] = '\0';
+ n = dlresolveLink(namebuf, namebuf, _QP0L_DIR_NAME_LG + 1);
+
+ if (n == -1)
+ return -1;
+
+ if (stat(namebuf, &sbuf))
+ return -1;
+
+ memset((char *) qptp, 0, sizeof *qptp);
+ qptp->Path_Length = n;
+ qptp->Path_Name_Delimiter[0] = '/';
+ errinfo.Bytes_Provided = sizeof errinfo;
+ Qp0lCvtPathToQSYSObjName(qptp, qsysinfo, "QSYS0100", sizeof *qsysinfo,
+ 0, &errinfo);
+ return errinfo.Bytes_Available? -1: 0;
+}
+
+
+static const char *
+getcomponent(char * dst, const char * src)
+
+{
+ int i;
+
+ /**
+ *** Get a path component of at most 10 characters and
+ *** map it to upper case.
+ *** Return the address of the next delimiter in source.
+ **/
+
+ for (i = 0;; src++) {
+ if (!*src || *src == ' ' || *src == '/') {
+ *dst = '\0';
+ return src;
+ }
+
+ if (i < 10) {
+ *dst++ = toupper(*src);
+ i++;
+ }
+ }
+}
+
+
+static int
+dlpath2QSYS(Qp0l_QSYS_Info_t * qsysinfo, const char * path, const char * dftlib)
+
+{
+ unsigned int flags;
+ char * cp;
+
+ /**
+ *** Convert the given path to a QSYS object name.
+ *** Syntax rules for paths are:
+ ***
+ *** '/'+ [ <library> [ '/'+ <file> [ '/'+ <member> ] ] '/'* ]
+ *** <library> '/'+ <file> [ '/'+ <member> ] '/'*
+ *** <file> '/'*
+ ***
+ *** If default library is not given, *LIBL is assumed.
+ *** Components may no contain spaces. They are translated to
+ *** uppercase. Only the first 10 characters are significant.
+ *** There is no check for the validity of the given components and
+ *** for the object existence.
+ *** Component types are not in the path, but generated internally.
+ *** CCSID is not processed.
+ ***
+ *** Return 0 upon success, else -1.
+ **/
+
+ if (!qsysinfo || !path) {
+ errno = EFAULT;
+ return -1;
+ }
+
+ /**
+ *** Strip leading spaces.
+ **/
+
+ while (*path == ' ')
+ path++;
+
+ /**
+ *** Check for null path.
+ **/
+
+ if (!*path) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /**
+ *** Preset the result structure.
+ **/
+
+ memset((char *) qsysinfo, 0, sizeof *qsysinfo);
+
+ /**
+ *** Determine the format.
+ **/
+
+ if (*path == '/') {
+ /**
+ *** Library component present.
+ **/
+
+ while (*++path == '/')
+ ;
+
+ if (!*path || *path == ' ')
+ strcpy(qsysinfo->Lib_Name, "QSYS");
+ else
+ path = getcomponent(qsysinfo->Lib_Name, path);
+
+ /**
+ *** Check for file component and get it.
+ **/
+
+ if (*path == '/') {
+ while (*++path == '/')
+ ;
+
+ if (*path && *path != ' ')
+ path = getcomponent(qsysinfo->Obj_Name, path);
+ }
+ }
+ else {
+ /**
+ *** The mandatory component is the <file>.
+ **/
+
+ path = getcomponent(qsysinfo->Obj_Name, path);
+
+ while (*path == '/')
+ path++;
+
+ /**
+ *** If there is a second component, move the first to
+ *** the library name and parse the file name.
+ **/
+
+ if (*path && *path != ' ') {
+ strcpy(qsysinfo->Lib_Name, qsysinfo->Obj_Name);
+ memset(qsysinfo->Obj_Name, 0,
+ sizeof qsysinfo->Obj_Name);
+ path = getcomponent(qsysinfo->Obj_Name, path);
+ }
+ else
+ strcpy(qsysinfo->Lib_Name, dftlib? dftlib: "*LIBL");
+ }
+
+ /**
+ *** Check and set-up member.
+ **/
+
+ while (*path == '/')
+ path++;
+
+ if (*path && *path != ' ') {
+ path = getcomponent(qsysinfo->Mbr_Name, path);
+ strcpy(qsysinfo->Mbr_Type, "*MBR");
+
+ while (*path == '/')
+ path++;
+ }
+
+ strcpy(qsysinfo->Lib_Type, "*LIB");
+
+ if (qsysinfo->Obj_Name[0])
+ strcpy(qsysinfo->Obj_Type, "*FILE");
+
+ qsysinfo->Bytes_Returned = sizeof *qsysinfo;
+ qsysinfo->Bytes_Available = sizeof *qsysinfo;
+
+ /**
+ *** Strip trailing spaces.
+ **/
+
+ while (*path == ' ')
+ path++;
+
+ if (*path) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int
+dl_ifs_link(Qp0l_QSYS_Info_t * qsysinfo, const char * pathname)
+
+{
+ /**
+ *** If `pathname' is a link found in IFS, set `qsysinfo' to its
+ *** DB2 name.
+ *** Return 0 if OK, else -1.
+ **/
+
+ return dlGetObjectName(qsysinfo, (const char *) NULL, 0, pathname);
+}
+
+
+static int
+dl_path_link(Qp0l_QSYS_Info_t * qsysinfo, const char * pathvar,
+ const char * filename, int (* testproc)(const Qp0l_QSYS_Info_t *))
+
+{
+ const char * p;
+ const char * q;
+ unsigned int i;
+ const char * path;
+
+ /**
+ *** If `filename' is not a path and is a link found in one of the
+ *** colon-separated paths in environment variable `pathvar',
+ *** set `qsysinfo' to its DB2 name.
+ *** Return 0 if OK, else -1.
+ **/
+
+ i = _QP0L_DIR_NAME_LG;
+
+ for (p = filename; *p; p++)
+ if (*p == '/' || !--i)
+ return -1; /* Too long or a path. */
+
+ /**
+ *** Make sure we have the LD_LIBRARY_PATH environment
+ *** variable value.
+ **/
+
+ path = getenv(pathvar);
+
+ if (!path)
+ return -1; /* No path list. */
+
+ /**
+ *** Try in each path listed.
+ **/
+
+ q = path;
+
+ if (!*q)
+ return -1; /* No path list. */
+
+ for (;;) {
+ for (p = q; *p && *p != ':'; p++)
+ ;
+
+ if (p > q) /* Ignore null path. */
+ if (!dlGetObjectName(qsysinfo, q, p - q, filename))
+ if (!testproc || (*testproc)(qsysinfo))
+ return 0; /* Found: return. */
+
+ if (!*p)
+ break;
+
+ q = p + 1;
+ }
+
+ errno = ENOENT;
+ return -1;
+}
+
+
+static int
+dl_DB2_path(Qp0l_QSYS_Info_t * qsysinfo, const char * pathname)
+
+{
+ if (dlpath2QSYS(qsysinfo, pathname, (const char *) NULL))
+ return -1;
+
+ if (qsysinfo->Mbr_Type[0])
+ return -1; /* Service program may not have members. */
+
+ if (!qsysinfo->Obj_Type[0])
+ return -1; /* Object must be specified. */
+
+ strcpy(qsysinfo->Obj_Type, "*SRVPGM"); /* Set our object type. */
+ return 0;
+}
+
+
+static int
+dl_DB2_name(char * dst, const char * name)
+
+{
+ int i;
+
+ for (i = 0; i < 10; i++) {
+ switch (*name) {
+
+ default:
+ if (!islower(*name))
+ break;
+
+ case '\0':
+ case '/':
+ case ' ':
+ return -1;
+ }
+
+ *dst++ = *name++;
+ }
+
+ if (!i)
+ return -1;
+
+ *dst = '\0';
+ return 0;
+}
+
+
+static int
+dl_qualified_object(Qp0l_QSYS_Info_t * qsysinfo, const char * pathname)
+
+{
+ memset((char *) qsysinfo, 0, sizeof *qsysinfo);
+
+ if (dl_DB2_name(qsysinfo->Obj_Name, pathname) ||
+ dl_DB2_name(qsysinfo->Lib_Name, pathname + 10))
+ return -1;
+
+ strcpy(qsysinfo->Lib_Type, "*LIB");
+ strcpy(qsysinfo->Obj_Type, "*SRVPGM");
+ return 0;
+}
+
+
+static int
+dl_lib_object(Qp0l_QSYS_Info_t * qsysinfo,
+ const char * libname, const char * pathname)
+
+{
+ int i;
+ char * cp;
+
+ strcpy(qsysinfo->Lib_Name, libname);
+ strcpy(qsysinfo->Lib_Type, "*LIB");
+ strcpy(qsysinfo->Obj_Type, "*SRVPGM");
+ cp = qsysinfo->Obj_Name;
+
+ while (*pathname == ' ')
+ pathname++;
+
+ for (i = 0;; pathname++) {
+ switch (*pathname) {
+
+ case '\0':
+ case ' ':
+ break;
+
+ case '/':
+ return -1;
+
+ default:
+ if (i < 10)
+ *cp++ = toupper(*pathname);
+
+ i++;
+ continue;
+ }
+
+ break;
+ }
+
+ while (*pathname == ' ')
+ pathname++;
+
+ if (!i || *pathname)
+ return -1;
+
+ *cp = '\0';
+ return 0;
+}
+
+
+static int
+dl_is_srvpgm(const Qp0l_QSYS_Info_t * qsysinfo)
+
+{
+ struct stat sbuf;
+ char namebuf[100];
+
+ if (!qsysinfo->Lib_Name[0] || strcmp(qsysinfo->Lib_Type, "*LIB") ||
+ !qsysinfo->Obj_Name[0] || strcmp(qsysinfo->Obj_Type, "*SRVPGM") ||
+ qsysinfo->Mbr_Name[0] || qsysinfo->Mbr_Type[0])
+ return 0;
+
+ /**
+ *** Build the IFS path name for the DB2 object.
+ **/
+
+ sprintf(namebuf, "%s/%s.LIB/%s.SRVPGM",
+ strcmp(qsysinfo->Lib_Name, "QSYS")? "/QSYS.LIB": "",
+ qsysinfo->Lib_Name, qsysinfo->Obj_Name);
+
+ return stat(namebuf, &sbuf) == 0;
+}
+
+
+static int
+dlreinit(dlinfo * dlip)
+
+{
+ RINZ_TEMPL_T t;
+ RINZ_TEMPL_T * p;
+ volatile _INTRPT_Hndlr_Parms_T excbuf;
+
+ if (dlip->actinfo.Flags & QLE_ABP_WAS_ACTIVE)
+ return 0;
+
+ /**
+ *** Attempt to reinitialize the service program that was loaded.
+ *** The service program must be created to allow re-initialization:
+ *** ALWRINZ(*YES) for this to work. The default is
+ *** ALWRINZ(*NO).
+ **/
+
+#pragma exception_handler(err, excbuf, 0, _C2_MH_ESCAPE, _CTLA_HANDLE_NO_MSG)
+ p = &t;
+ t.rinz_pgm = dlip->pointer;
+ t.rinz_agpmk = dlip->actinfo.Act_Grp_Mark;
+ _RINZSTAT(p);
+#pragma disable_handler
+
+ return 0;
+
+err:
+ if (!memcmp((char *) excbuf.Msg_Id, "MCH4421", 7))
+ return 0; /* Program cannot be reinitialized. */
+
+ dlseterror_from_exception(&excbuf);
+ return -1;
+}
+
+
+void *
+dlsym(void * handle, const char * symbol)
+
+{
+ dlinfo * dlip;
+ void * p;
+ int export_type;
+ Qus_EC_t errinfo;
+ volatile _INTRPT_Hndlr_Parms_T excbuf;
+ static int zero = 0;
+
+ dlthreadinit();
+
+ if (!handle || !symbol) {
+ dlseterror_from_errno(EFAULT);
+ return (void *) NULL;
+ }
+
+ dlip = (dlinfo *) handle;
+
+#pragma exception_handler(error, excbuf, 0, _C2_MH_ESCAPE, _CTLA_HANDLE_NO_MSG)
+ errinfo.Bytes_Provided = 0;
+ QleGetExpLong(&dlip->actinfo.Act_Mark, &zero, &zero,
+ (char *) symbol, &p, &export_type, &errinfo);
+ return p;
+#pragma disable_handler
+
+error:
+ dlseterror_from_exception(&excbuf);
+ return (void *) NULL;
+}
+
+
+int
+dlclose(void * handle)
+
+{
+ dlinfo * dlip;
+ void (* _fini)(void);
+
+ dlthreadinit();
+
+ if (!handle) {
+ dlseterror_from_errno(EFAULT);
+ return -1;
+ }
+
+ dlip = (dlinfo *) handle;
+
+ if (dlip->actcount) {
+ if (--(dlip->actcount))
+ return 0;
+
+ if (_fini = dlsym(handle, "_fini"))
+ (*_fini)();
+ }
+
+ return dlreinit(dlip);
+}
+
+
+static void *
+dlopenqsys(const Qp0l_QSYS_Info_t * dllinfo)
+
+{
+ dlinfo * dlip;
+ dlinfo * dlip2;
+ void (* _init)(void);
+ unsigned int i;
+ _SYSPTR pgmptr;
+ unsigned long long actmark;
+ Qus_EC_t errinfo;
+ char actmarkstr[2 * sizeof actmark + 1];
+ static int actinfo_size = sizeof dlip->actinfo;
+ volatile _INTRPT_Hndlr_Parms_T excbuf;
+
+ /**
+ *** Capture any type of error and if any occurs,
+ *** return not found.
+ **/
+
+#pragma exception_handler(error1, excbuf, 0, _C2_MH_ESCAPE, _CTLA_HANDLE_NO_MSG)
+ pgmptr = rslvsp(WLI_SRVPGM, (char *) dllinfo->Obj_Name,
+ (char *) dllinfo->Lib_Name ,_AUTH_NONE);
+
+ if (!pgmptr) {
+ errno = ENOENT;
+ return (void *) NULL;
+ }
+
+ /**
+ *** Create a new DLL info block.
+ **/
+
+ dlip = (dlinfo *) malloc(sizeof *dlip);
+
+ if (!dlip)
+ return (void *) NULL; /* Cannot create block. */
+#pragma disable_handler
+
+ dllock();
+
+#pragma exception_handler(error2, excbuf, 0, _C2_MH_ESCAPE, _CTLA_HANDLE_NO_MSG)
+ memset((char *) dlip, 0, sizeof *dlip);
+ dlip->pointer = pgmptr;
+
+ /**
+ *** Activate the DLL.
+ **/
+
+ errinfo.Bytes_Provided = 0;
+ QleActBndPgmLong(&pgmptr, &actmark,
+ &dlip->actinfo, &actinfo_size, &errinfo);
+ dlip->actinfo.Act_Mark = actmark;
+
+ /**
+ *** Dummy string encoding activation mark to use as hash table key.
+ **/
+
+ for (i = 0; actmark; actmark >>= 6)
+ actmarkstr[i++] = 0x40 + (actmark & 0x3F);
+
+ actmarkstr[i] = '\0';
+
+ /**
+ *** Check if already activated.
+ **/
+
+ dlip2 = (dlinfo *) xmlHashLookup(dldir, actmarkstr);
+
+ if (dlip2) {
+ free((char *) dlip);
+ dlip = dlip2;
+ }
+ else if (xmlHashAddEntry(dldir, (const xmlChar *) actmarkstr, dlip)) {
+ dlreinit(dlip);
+ free((char *) dlip);
+ dlunlock();
+ return (void *) NULL;
+ }
+#pragma disable_handler
+
+#pragma exception_handler(error2, excbuf, 0, _C2_MH_ESCAPE, _CTLA_HANDLE_NO_MSG)
+
+ /**
+ *** Bump activation counter.
+ **/
+
+ if (!(dlip->actcount++) && (_init = dlsym(dlip, "_init")))
+ (*_init)();
+
+ dlunlock();
+
+ /**
+ *** Return the handle.
+ **/
+
+ return (void *) dlip;
+#pragma disable_handler
+
+error2:
+ free((char *) dlip);
+ dlunlock();
+
+error1:
+ dlseterror_from_exception(&excbuf);
+ return (void *) NULL;
+}
+
+
+void *
+dlopen(const char * filename, int flag)
+
+{
+ void * dlhandle;
+ int sverrno;
+ Qp0l_QSYS_Info_t dllinfo;
+
+ sverrno = errno;
+ errno = 0;
+
+ dlthreadinit();
+
+ if (!filename) {
+ dlseterror_from_errno(EFAULT);
+ errno = sverrno;
+ return NULL;
+ }
+
+ /**
+ *** Try to locate the object in the following order:
+ *** _ `filename' is an IFS path.
+ *** _ `filename' is not a path and resides in one of
+ *** LD_LIBRARY_PATH colon-separated paths.
+ *** _ `filename' is not a path and resides in one of
+ *** PATH colon-separated paths.
+ *** _ `filename' is a DB2 path (as /library/object).
+ *** _ `filename' is a qualified object name.
+ *** _ `filename' is an object in *CURLIB.
+ *** _ `filename' is an object in *LIBL.
+ **/
+
+ if (!dl_ifs_link(&dllinfo, filename) && dl_is_srvpgm(&dllinfo))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_path_link(&dllinfo,
+ "LD_LIBRARY_PATH", filename, dl_is_srvpgm))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_path_link(&dllinfo, "PATH", filename, dl_is_srvpgm))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_DB2_path(&dllinfo, filename) && dl_is_srvpgm(&dllinfo))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_qualified_object(&dllinfo, filename) &&
+ dl_is_srvpgm(&dllinfo))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_lib_object(&dllinfo, "*CURLIB", filename) &&
+ dl_is_srvpgm(&dllinfo))
+ dlhandle = dlopenqsys(&dllinfo);
+ else if (!dl_lib_object(&dllinfo, "*LIBL", filename) &&
+ dl_is_srvpgm(&dllinfo))
+ dlhandle = dlopenqsys(&dllinfo);
+ else
+ dlhandle = NULL;
+
+ if (!dlhandle && errno)
+ dlseterror_from_errno(errno);
+
+ errno = sverrno;
+ return dlhandle;
+}
diff --git a/os400/dlfcn/dlfcn.h b/os400/dlfcn/dlfcn.h
new file mode 100644
index 0000000..0cf691e
--- /dev/null
+++ b/os400/dlfcn/dlfcn.h
@@ -0,0 +1,32 @@
+/**
+*** dlopen(), dlclose() dlsym(), dlerror() emulation for OS/400.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#ifndef _DLFCN_H_
+#define _DLFCN_H_
+
+
+/**
+*** Flags for dlopen().
+*** Ignored for OS400.
+**/
+
+#define RTLD_LAZY 000
+#define RTLD_NOW 001
+#define RTLD_GLOBAL 010
+
+
+/**
+*** Prototypes.
+**/
+
+extern void * dlopen(const char * filename, int flag);
+extern void * dlsym(void * handle, const char * symbol);
+extern const char * dlerror(void);
+extern int dlclose(void * handle);
+
+#endif
diff --git a/os400/iconv/README.iconv b/os400/iconv/README.iconv
new file mode 100644
index 0000000..4950d59
--- /dev/null
+++ b/os400/iconv/README.iconv
@@ -0,0 +1,47 @@
+IBM OS/400 implements iconv in an odd way:
+- Type iconv_t is a structure: therefore objects of this type cannot be
+ compared to (iconv_t) -1.
+- Supported character sets names are all of the form IBMCCSIDccsid..., where
+ ccsid is a decimal 5-digit integer identifying an IBM coded character set.
+ In addition, character set names have to be given in EBCDIC.
+ Standard character set names like "UTF-8" are NOT recognized.
+- The prototype of iconv_open() does not declare parameters as const, although
+ they are not altered.
+
+ Since libiconv does not support EBCDIC, use of this package here as a
+replacement is not a solution.
+
+ For these reasons, the code in this directory implements a wrapper to the
+OS/400 iconv implementation. The wrapper performs the following transformations:
+- Type iconv_t is an pointer. Although OS/400 pointers are odd, comparing
+ with (iconv_t) -1 is OK.
+- All IANA character set names are recognized in a coding- and case-insensitive
+ way, providing an equivalent CCSID exists. see
+ http://www.iana.org/assignments/character-sets/character-sets.xhtml
+- All CCSIDs from the association file can be expressed as IBMCCSIDxxxxx where
+ xxxxx is the 5 digit CCSID; no null terminator is required. Alternate codes
+ are of the form ibm-xxx (null-terminated), where xxx is the integer CCSID with
+ leading zeroes stripped.
+- If a IANA BIBenum is defined for a CCSID, the name iana-xxx can be used,
+ where xxx is the integer MIBenum without leading zeroes.
+- In addition, some aliases are also taken from the association file. Examples
+ are: ASCII, EBCDIC, UTF8.
+- Prototype of iconv_open() has const parameters.
+- Character code names can be given in any code.
+
+Character set names to CCSID conversion.
+- http://www.iana.org/assignments/character-sets/character-sets.xhtml provides
+ all IANA registered character set names and aliases associated with a
+ MIBenum, that is a unique character set identifier.
+- A hand-maintained file ccsid_mibenum.xml associates IBM CCSIDs to
+ IANA MBenums.
+- An OS/400 C program (in subdirectory bldcsndfa) generates a deterministic
+ finite automaton from the files mentioned above into a C file for all
+ possible character set name and associating each of them with its
+ corresponding CCSID. This program can only be run on OS/400 since it uses
+ the native iconv support for EBCDIC.
+- Since these operations are tedious and the table generation needs bootstraping
+ with libxml2, the generated automaton is stored within sources and need not
+ be rebuilt at each compilation. However, source is provided here to allow
+ new table generation with conversion tables that were not available at the
+ time of original generation.
diff --git a/os400/iconv/bldcsndfa/bldcsndfa.c b/os400/iconv/bldcsndfa/bldcsndfa.c
new file mode 100644
index 0000000..48afd54
--- /dev/null
+++ b/os400/iconv/bldcsndfa/bldcsndfa.c
@@ -0,0 +1,1953 @@
+/**
+*** Build a deterministic finite automaton to associate CCSIDs with
+*** character set names.
+***
+*** Compile on OS/400 with options SYSIFCOPT(*IFSIO).
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+#include <iconv.h>
+
+
+#ifdef OLDXML
+#include "xml.h"
+#else
+#include <libxml/hash.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#endif
+
+
+#ifdef __OS400__
+#define iconv_open_error(cd) ((cd).return_value == -1)
+#define set_iconv_open_error(cd) ((cd).return_value = -1)
+#else
+#define iconv_open_error(cd) ((cd) == (iconv_t) -1)
+#define set_iconv_open_error(cd) ((cd) = (iconv_t) -1)
+#endif
+
+
+#define C_SOURCE_CCSID 500
+#define C_UTF8_CCSID 1208
+
+
+#define UTF8_SPACE 0x20
+#define UTF8_HT 0x09
+#define UTF8_0 0x30
+#define UTF8_9 0x39
+#define UTF8_A 0x41
+#define UTF8_Z 0x5A
+#define UTF8_a 0x61
+#define UTF8_z 0x7A
+
+
+#define GRANULE 128 /* Memory allocation granule. */
+
+#define EPSILON 0x100 /* Token for empty transition. */
+
+
+#ifndef OFFSETOF
+#define OFFSETOF(t, f) ((unsigned int) ((char *) &((t *) 0)->f - (char *) 0))
+#endif
+
+#ifndef OFFSETBY
+#define OFFSETBY(t, p, o) ((t *) ((char *) (p) + (unsigned int) (o)))
+#endif
+
+
+typedef struct t_transition t_transition; /* NFA/DFA transition. */
+typedef struct t_state t_state; /* NFA/DFA state node. */
+typedef struct t_symlist t_symlist; /* Symbol (i.e.: name) list. */
+typedef struct t_chset t_chset; /* Character set. */
+typedef struct t_stategroup t_stategroup; /* Optimization group. */
+typedef unsigned char utf8char; /* UTF-8 character byte. */
+typedef unsigned char byte; /* Untyped data byte. */
+
+
+typedef struct { /* Set of pointers. */
+ unsigned int p_size; /* Current allocated size. */
+ unsigned int p_card; /* Current element count. */
+ void * p_set[1]; /* Element array. */
+} t_powerset;
+
+
+struct t_transition {
+ t_transition * t_forwprev; /* Head of forward transition list. */
+ t_transition * t_forwnext; /* Tail of forward transition list. */
+ t_transition * t_backprev; /* Head of backward transition list. */
+ t_transition * t_backnext; /* Tail of backward transition list. */
+ t_state * t_from; /* Incoming state. */
+ t_state * t_to; /* Destination state. */
+ unsigned short t_token; /* Transition token. */
+ unsigned int t_index; /* Transition array index. */
+};
+
+
+struct t_state {
+ t_state * s_next; /* Next state (for DFA construction). */
+ t_state * s_stack; /* Unprocessed DFA states stack. */
+ t_transition * s_forward; /* Forward transitions. */
+ t_transition * s_backward; /* Backward transitions. */
+ t_chset * s_final; /* Recognized character set. */
+ t_powerset * s_nfastates; /* Corresponding NFA states. */
+ unsigned int s_index; /* State index. */
+};
+
+
+struct t_symlist {
+ t_symlist * l_next; /* Next name in list. */
+ utf8char l_symbol[1]; /* Name bytes. */
+};
+
+
+struct t_chset {
+ t_chset * c_next; /* Next character set. */
+ t_symlist * c_names; /* Character set name list. */
+ iconv_t c_fromUTF8; /* Conversion from UTF-8. */
+ unsigned int c_ccsid; /* IBM character set code. */
+ unsigned int c_mibenum; /* IANA character code. */
+};
+
+
+struct t_stategroup {
+ t_stategroup * g_next; /* Next group. */
+ t_state * g_member; /* Group member (s_stack) list. */
+ unsigned int g_id; /* Group ident. */
+};
+
+
+
+t_chset * chset_list; /* Character set list. */
+t_state * initial_state; /* Initial NFA state. */
+iconv_t job2utf8; /* Job CCSID to UTF-8 conversion. */
+iconv_t utf82job; /* UTF-8 to job CCSID conversion. */
+t_state * dfa_states; /* List of DFA states. */
+unsigned int groupid; /* Group ident counter. */
+
+
+/**
+*** UTF-8 strings.
+**/
+
+#pragma convert(819)
+
+static const utf8char utf8_MIBenum[] = "MIBenum";
+static const utf8char utf8_mibenum[] = "mibenum";
+static const utf8char utf8_ibm_[] = "ibm-";
+static const utf8char utf8_IBMCCSID[] = "IBMCCSID";
+static const utf8char utf8_iana_[] = "iana-";
+static const utf8char utf8_Name[] = "Name";
+static const utf8char utf8_Pref_MIME_Name[] = "Preferred MIME Name";
+static const utf8char utf8_Aliases[] = "Aliases";
+static const utf8char utf8_html[] = "html";
+static const utf8char utf8_htmluri[] = "http://www.w3.org/1999/xhtml";
+static const utf8char utf8_A[] = "A";
+static const utf8char utf8_C[] = "C";
+static const utf8char utf8_M[] = "M";
+static const utf8char utf8_N[] = "N";
+static const utf8char utf8_P[] = "P";
+static const utf8char utf8_T[] = "T";
+static const utf8char utf8_ccsid[] = "ccsid";
+static const utf8char utf8_EBCDIC[] = "EBCDIC";
+static const utf8char utf8_ASCII[] = "ASCII";
+static const utf8char utf8_assocnodes[] = "/ccsid_mibenum/assoc[@ccsid]";
+static const utf8char utf8_aliastext[] =
+ "/ccsid_mibenum/assoc[@ccsid=$C]/alias/text()";
+#ifdef OLDXML
+static const utf8char utf8_tablerows[] =
+ "//table[@id='table-character-sets-1']/*/tr";
+static const utf8char utf8_headerpos[] =
+ "count(th[text()=$T]/preceding-sibling::th)+1";
+static const utf8char utf8_getmibenum[] = "number(td[$M])";
+static const utf8char utf8_getprefname[] = "string(td[$P])";
+static const utf8char utf8_getname[] = "string(td[$N])";
+static const utf8char utf8_getaliases[] = "td[$A]/text()";
+#else
+static const utf8char utf8_tablerows[] =
+ "//html:table[@id='table-character-sets-1']/*/html:tr";
+static const utf8char utf8_headerpos[] =
+ "count(html:th[text()=$T]/preceding-sibling::html:th)+1";
+static const utf8char utf8_getmibenum[] = "number(html:td[$M])";
+static const utf8char utf8_getprefname[] = "string(html:td[$P])";
+static const utf8char utf8_getname[] = "string(html:td[$N])";
+static const utf8char utf8_getaliases[] = "html:td[$A]/text()";
+#endif
+
+#pragma convert(0)
+
+
+/**
+*** UTF-8 character length table.
+***
+*** Index is first character byte, value is the character byte count.
+**/
+
+static signed char utf8_chlen[] = {
+/* 00-07 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 08-0F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 10-17 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 18-1F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 20-27 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 28-2F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 30-37 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 38-3F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 40-47 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 48-4F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 50-57 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 58-5F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 60-67 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 68-6F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 70-77 */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 78-7F */ 1, 1, 1, 1, 1, 1, 1, 1,
+/* 80-87 */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* 88-8F */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* 90-97 */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* 98-9F */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* A0-A7 */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* A8-AF */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* B0-B7 */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* B8-BF */ -1, -1, -1, -1, -1, -1, -1, -1,
+/* C0-C7 */ 2, 2, 2, 2, 2, 2, 2, 2,
+/* C8-CF */ 2, 2, 2, 2, 2, 2, 2, 2,
+/* D0-D7 */ 2, 2, 2, 2, 2, 2, 2, 2,
+/* D8-DF */ 2, 2, 2, 2, 2, 2, 2, 2,
+/* E0-E7 */ 3, 3, 3, 3, 3, 3, 3, 3,
+/* E8-EF */ 3, 3, 3, 3, 3, 3, 3, 3,
+/* F0-F7 */ 4, 4, 4, 4, 4, 4, 4, 4,
+/* F8-FF */ 5, 5, 5, 5, 6, 6, -1, -1
+};
+
+
+
+void
+chknull(void * p)
+
+{
+ if (p)
+ return;
+
+ fprintf(stderr, "Not enough memory\n");
+ exit(1);
+}
+
+
+void
+makecode(char * buf, unsigned int ccsid)
+
+{
+ ccsid &= 0xFFFF;
+ memset(buf, 0, 32);
+ sprintf(buf, "IBMCCSID%05u0000000", ccsid);
+}
+
+
+iconv_t
+iconv_open_ccsid(unsigned int ccsidout,
+ unsigned int ccsidin, unsigned int nullflag)
+
+{
+ char fromcode[33];
+ char tocode[33];
+
+ makecode(fromcode, ccsidin);
+ makecode(tocode, ccsidout);
+ memset(tocode + 13, 0, sizeof tocode - 13);
+
+ if (nullflag)
+ fromcode[18] = '1';
+
+ return iconv_open(tocode, fromcode);
+}
+
+
+unsigned int
+getnum(char * * cpp)
+
+{
+ unsigned int n;
+ char * cp;
+
+ cp = *cpp;
+ n = 0;
+
+ while (isdigit(*cp))
+ n = 10 * n + *cp++ - '0';
+
+ *cpp = cp;
+ return n;
+}
+
+
+const utf8char *
+hashBinaryKey(const byte * bytes, unsigned int len)
+
+{
+ const byte * bp;
+ utf8char * key;
+ utf8char * cp;
+ unsigned int n;
+ unsigned int n4;
+ unsigned int i;
+
+ /**
+ *** Encode binary data in character form to be used as hash
+ *** table key.
+ **/
+
+ n = (4 * len + 2) / 3;
+ key = (utf8char *) malloc(n + 1);
+ chknull(key);
+ bp = bytes;
+ cp = key;
+
+ for (n4 = n >> 2; n4; n4--) {
+ i = (bp[0] << 16) | (bp[1] << 8) | bp[2];
+ *cp++ = 0x21 + ((i >> 18) & 0x3F);
+ *cp++ = 0x21 + ((i >> 12) & 0x3F);
+ *cp++ = 0x21 + ((i >> 6) & 0x3F);
+ *cp++ = 0x21 + (i & 0x3F);
+ bp += 3;
+ }
+
+ switch (n & 0x3) {
+
+ case 2:
+ *cp++ = 0x21 + ((*bp >> 2) & 0x3F);
+ *cp++ = 0x21 + ((*bp << 4) & 0x3F);
+ break;
+
+ case 3:
+ i = (bp[0] << 8) | bp[1];
+ *cp++ = 0x21 + ((i >> 10) & 0x3F);
+ *cp++ = 0x21 + ((i >> 4) & 0x3F);
+ *cp++ = 0x21 + ((i << 2) & 0x3F);
+ break;
+ }
+
+ *cp = '\0';
+ return key;
+}
+
+
+void *
+hash_get(xmlHashTablePtr h, const void * binkey, unsigned int len)
+
+{
+ const utf8char * key;
+ void * result;
+
+ key = hashBinaryKey((const byte *) binkey, len);
+ result = xmlHashLookup(h, key);
+ free((char *) key);
+ return result;
+}
+
+
+int
+hash_add(xmlHashTablePtr h, const void * binkey, unsigned int len, void * data)
+
+{
+ const utf8char * key;
+ int result;
+
+ key = hashBinaryKey((const byte *) binkey, len);
+ result = xmlHashAddEntry(h, key, data);
+ free((char *) key);
+ return result;
+}
+
+
+xmlDocPtr
+loadXMLFile(const char * filename)
+
+{
+ struct stat sbuf;
+ byte * databuf;
+ int fd;
+ int i;
+ xmlDocPtr doc;
+
+ if (stat(filename, &sbuf))
+ return (xmlDocPtr) NULL;
+
+ databuf = malloc(sbuf.st_size + 4);
+
+ if (!databuf)
+ return (xmlDocPtr) NULL;
+
+ fd = open(filename, O_RDONLY
+#ifdef O_BINARY
+ | O_BINARY
+#endif
+ );
+
+ if (fd < 0) {
+ free((char *) databuf);
+ return (xmlDocPtr) NULL;
+ }
+
+ i = read(fd, (char *) databuf, sbuf.st_size);
+ close(fd);
+
+ if (i != sbuf.st_size) {
+ free((char *) databuf);
+ return (xmlDocPtr) NULL;
+ }
+
+ databuf[i] = databuf[i + 1] = databuf[i + 2] = databuf[i + 3] = 0;
+ doc = xmlParseMemory((xmlChar *) databuf, i);
+ free((char *) databuf);
+ return doc;
+}
+
+
+int
+match(char * * cpp, char * s)
+
+{
+ char * cp;
+ int c1;
+ int c2;
+
+ cp = *cpp;
+
+ for (cp = *cpp; c2 = *s++; cp++) {
+ c1 = *cp;
+
+ if (c1 != c2) {
+ if (isupper(c1))
+ c1 = tolower(c1);
+
+ if (isupper(c2))
+ c2 = tolower(c2);
+ }
+
+ if (c1 != c2)
+ return 0;
+ }
+
+ c1 = *cp;
+
+ while (c1 == ' ' || c1 == '\t')
+ c1 = *++cp;
+
+ *cpp = cp;
+ return 1;
+}
+
+
+t_state *
+newstate(void)
+
+{
+ t_state * s;
+
+ s = (t_state *) malloc(sizeof *s);
+ chknull(s);
+ memset((char *) s, 0, sizeof *s);
+ return s;
+}
+
+
+void
+unlink_transition(t_transition * t)
+
+{
+ if (t->t_backnext)
+ t->t_backnext->t_backprev = t->t_backprev;
+
+ if (t->t_backprev)
+ t->t_backprev->t_backnext = t->t_backnext;
+ else if (t->t_to)
+ t->t_to->s_backward = t->t_backnext;
+
+ if (t->t_forwnext)
+ t->t_forwnext->t_forwprev = t->t_forwprev;
+
+ if (t->t_forwprev)
+ t->t_forwprev->t_forwnext = t->t_forwnext;
+ else if (t->t_from)
+ t->t_from->s_forward = t->t_forwnext;
+
+ t->t_backprev = (t_transition *) NULL;
+ t->t_backnext = (t_transition *) NULL;
+ t->t_forwprev = (t_transition *) NULL;
+ t->t_forwnext = (t_transition *) NULL;
+ t->t_from = (t_state *) NULL;
+ t->t_to = (t_state *) NULL;
+}
+
+
+void
+link_transition(t_transition * t, t_state * from, t_state * to)
+
+{
+ if (!from)
+ from = t->t_from;
+
+ if (!to)
+ to = t->t_to;
+
+ unlink_transition(t);
+
+ if ((t->t_from = from)) {
+ if ((t->t_forwnext = from->s_forward))
+ t->t_forwnext->t_forwprev = t;
+
+ from->s_forward = t;
+ }
+
+ if ((t->t_to = to)) {
+ if ((t->t_backnext = to->s_backward))
+ t->t_backnext->t_backprev = t;
+
+ to->s_backward = t;
+ }
+}
+
+
+t_transition *
+newtransition(unsigned int token, t_state * from, t_state * to)
+
+{
+ t_transition * t;
+
+ t = (t_transition *) malloc(sizeof *t);
+ chknull(t);
+ memset((char *) t, 0, sizeof *t);
+ t->t_token = token;
+ link_transition(t, from, to);
+ return t;
+}
+
+
+t_transition *
+uniquetransition(unsigned int token, t_state * from, t_state * to)
+
+{
+ t_transition * t;
+
+ for (t = from->s_forward; t; t = t->t_forwnext)
+ if (t->t_token == token && (t->t_to == to || !to))
+ return t;
+
+ return to? newtransition(token, from, to): (t_transition *) NULL;
+}
+
+
+int
+set_position(t_powerset * s, void * e)
+
+{
+ unsigned int l;
+ unsigned int h;
+ unsigned int m;
+ int i;
+
+ l = 0;
+ h = s->p_card;
+
+ while (l < h) {
+ m = (l + h) >> 1;
+
+ /**
+ *** If both pointers belong to different allocation arenas,
+ *** native comparison may find them neither
+ *** equal, nor greater, nor smaller.
+ *** We thus compare using memcmp() to get an orthogonal
+ *** result.
+ **/
+
+ i = memcmp(&e, s->p_set + m, sizeof e);
+
+ if (i < 0)
+ h = m;
+ else if (!i)
+ return m;
+ else
+ l = m + 1;
+ }
+
+ return l;
+}
+
+
+t_powerset *
+set_include(t_powerset * s, void * e)
+
+{
+ unsigned int pos;
+ unsigned int n;
+
+ if (!s) {
+ s = (t_powerset *) malloc(sizeof *s +
+ GRANULE * sizeof s->p_set);
+ chknull(s);
+ s->p_size = GRANULE;
+ s->p_set[GRANULE] = (t_state *) NULL;
+ s->p_set[0] = e;
+ s->p_card = 1;
+ return s;
+ }
+
+ pos = set_position(s, e);
+
+ if (pos < s->p_card && s->p_set[pos] == e)
+ return s;
+
+ if (s->p_card >= s->p_size) {
+ s->p_size += GRANULE;
+ s = (t_powerset *) realloc(s,
+ sizeof *s + s->p_size * sizeof s->p_set);
+ chknull(s);
+ s->p_set[s->p_size] = (t_state *) NULL;
+ }
+
+ n = s->p_card - pos;
+
+ if (n)
+ memmove((char *) (s->p_set + pos + 1),
+ (char *) (s->p_set + pos), n * sizeof s->p_set[0]);
+
+ s->p_set[pos] = e;
+ s->p_card++;
+ return s;
+}
+
+
+t_state *
+nfatransition(t_state * to, byte token)
+
+{
+ t_state * from;
+
+ from = newstate();
+ newtransition(token, from, to);
+ return from;
+}
+
+
+static t_state * nfadevelop(t_state * from, t_state * final, iconv_t icc,
+ const utf8char * name, unsigned int len);
+
+
+void
+nfaslice(t_state * * from, t_state * * to, iconv_t icc,
+ const utf8char * chr, unsigned int chlen,
+ const utf8char * name, unsigned int len, t_state * final)
+
+{
+ char * srcp;
+ char * dstp;
+ size_t srcc;
+ size_t dstc;
+ unsigned int cnt;
+ t_state * f;
+ t_state * t;
+ t_transition * tp;
+ byte bytebuf[8];
+
+ srcp = (char *) chr;
+ srcc = chlen;
+ dstp = (char *) bytebuf;
+ dstc = sizeof bytebuf;
+ iconv(icc, &srcp, &srcc, &dstp, &dstc);
+ dstp = (char *) bytebuf;
+ cnt = sizeof bytebuf - dstc;
+ t = *to;
+ f = *from;
+
+ /**
+ *** Check for end of string.
+ **/
+
+ if (!len)
+ if (t && t != final)
+ uniquetransition(EPSILON, t, final);
+ else
+ t = final;
+
+ if (f)
+ while (cnt) {
+ tp = uniquetransition(*dstp, f, (t_state *) NULL);
+
+ if (!tp)
+ break;
+
+ f = tp->t_to;
+ dstp++;
+ cnt--;
+ }
+
+ if (!cnt) {
+ if (!t)
+ t = nfadevelop(f, final, icc, name, len);
+
+ *to = t;
+ return;
+ }
+
+ if (!t) {
+ t = nfadevelop((t_state *) NULL, final, icc, name, len);
+ *to = t;
+ }
+
+ if (!f)
+ *from = f = newstate();
+
+ while (cnt > 1)
+ t = nfatransition(t, dstp[--cnt]);
+
+ newtransition(*dstp, f, t);
+}
+
+
+t_state *
+nfadevelop(t_state * from, t_state * final, iconv_t icc,
+ const utf8char * name, unsigned int len)
+
+{
+ int chlen;
+ int i;
+ t_state * to;
+ int uccnt;
+ int lccnt;
+ utf8char chr;
+
+ chlen = utf8_chlen[*name];
+
+ for (i = 1; i < chlen; i++)
+ if ((name[i] & 0xC0) != 0x80)
+ break;
+
+ if (i != chlen) {
+ fprintf(stderr,
+ "Invalid UTF8 character in character set name\n");
+ return (t_state *) NULL;
+ }
+
+ to = (t_state *) NULL;
+ nfaslice(&from, &to,
+ icc, name, chlen, name + chlen, len - chlen, final);
+
+ if (*name >= UTF8_a && *name <= UTF8_z)
+ chr = *name - UTF8_a + UTF8_A;
+ else if (*name >= UTF8_A && *name <= UTF8_Z)
+ chr = *name - UTF8_A + UTF8_a;
+ else
+ return from;
+
+ nfaslice(&from, &to, icc, &chr, 1, name + chlen, len - chlen, final);
+ return from;
+}
+
+
+
+void
+nfaenter(const utf8char * name, int len, t_chset * charset)
+
+{
+ t_chset * s;
+ t_state * final;
+ t_state * sp;
+ t_symlist * lp;
+
+ /**
+ *** Enter case-insensitive `name' in NFA in all known
+ *** character codes.
+ *** Redundant shift state changes as well as shift state
+ *** differences between uppercase and lowercase are
+ *** not handled.
+ **/
+
+ if (len < 0)
+ len = strlen(name) + 1;
+
+ for (lp = charset->c_names; lp; lp = lp->l_next)
+ if (!memcmp(name, lp->l_symbol, len))
+ return; /* Already entered. */
+
+ lp = (t_symlist *) malloc(sizeof *lp + len);
+ chknull(lp);
+ memcpy(lp->l_symbol, name, len);
+ lp->l_symbol[len] = '\0';
+ lp->l_next = charset->c_names;
+ charset->c_names = lp;
+ final = newstate();
+ final->s_final = charset;
+
+ for (s = chset_list; s; s = s->c_next)
+ if (!iconv_open_error(s->c_fromUTF8))
+ sp = nfadevelop(initial_state, final,
+ s->c_fromUTF8, name, len);
+}
+
+
+unsigned int
+utf8_utostr(utf8char * s, unsigned int v)
+
+{
+ unsigned int d;
+ unsigned int i;
+
+ d = v / 10;
+ v -= d * 10;
+ i = d? utf8_utostr(s, d): 0;
+ s[i++] = v + UTF8_0;
+ s[i] = '\0';
+ return i;
+}
+
+
+unsigned int
+utf8_utostrpad(utf8char * s, unsigned int v, int digits)
+
+{
+ unsigned int i = utf8_utostr(s, v);
+ utf8char pad = UTF8_SPACE;
+
+ if (digits < 0) {
+ pad = UTF8_0;
+ digits = -digits;
+ }
+
+ if (i >= digits)
+ return i;
+
+ memmove(s + digits - i, s, i + 1);
+ memset(s, pad, digits - i);
+ return digits;
+}
+
+
+unsigned int
+utf8_strtou(const utf8char * s)
+
+{
+ unsigned int v;
+
+ while (*s == UTF8_SPACE || *s == UTF8_HT)
+ s++;
+
+ for (v = 0; *s >= UTF8_0 && *s <= UTF8_9;)
+ v = 10 * v + *s++ - UTF8_0;
+
+ return v;
+}
+
+
+unsigned int
+getNumAttr(xmlNodePtr node, const xmlChar * name)
+
+{
+ const xmlChar * s;
+ unsigned int val;
+
+ s = xmlGetProp(node, name);
+
+ if (!s)
+ return 0;
+
+ val = utf8_strtou(s);
+ xmlFree((xmlChar *) s);
+ return val;
+}
+
+
+void
+read_assocs(const char * filename)
+
+{
+ xmlDocPtr doc;
+ xmlXPathContextPtr ctxt;
+ xmlXPathObjectPtr obj;
+ xmlNodePtr node;
+ t_chset * sp;
+ int i;
+ unsigned int ccsid;
+ unsigned int mibenum;
+ utf8char symbuf[32];
+
+ doc = loadXMLFile(filename);
+
+ if (!doc) {
+ fprintf(stderr, "Cannot load file %s\n", filename);
+ exit(1);
+ }
+
+ ctxt = xmlXPathNewContext(doc);
+ obj = xmlXPathEval(utf8_assocnodes, ctxt);
+
+ if (!obj || obj->type != XPATH_NODESET || !obj->nodesetval ||
+ !obj->nodesetval->nodeTab || !obj->nodesetval->nodeNr) {
+ fprintf(stderr, "No association found in %s\n", filename);
+ exit(1);
+ }
+
+ for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+ node = obj->nodesetval->nodeTab[i];
+ ccsid = getNumAttr(node, utf8_ccsid);
+ mibenum = getNumAttr(node, utf8_mibenum);
+
+ /**
+ *** Check for duplicate.
+ **/
+
+ for (sp = chset_list; sp; sp = sp->c_next)
+ if (ccsid && ccsid == sp->c_ccsid ||
+ mibenum && mibenum == sp->c_mibenum) {
+ fprintf(stderr, "Duplicate character set: ");
+ fprintf(stderr, "CCSID = %u/%u, ",
+ ccsid, sp->c_ccsid);
+ fprintf(stderr, "MIBenum = %u/%u\n",
+ mibenum, sp->c_mibenum);
+ break;
+ }
+
+ if (sp)
+ continue;
+
+ /**
+ *** Allocate the new character set.
+ **/
+
+ sp = (t_chset *) malloc(sizeof *sp);
+ chknull(sp);
+ memset(sp, 0, sizeof *sp);
+
+ if (!ccsid) /* Do not attempt with current job CCSID. */
+ set_iconv_open_error(sp->c_fromUTF8);
+ else {
+ sp->c_fromUTF8 =
+ iconv_open_ccsid(ccsid, C_UTF8_CCSID, 0);
+
+ if (iconv_open_error(sp->c_fromUTF8) == -1)
+ fprintf(stderr,
+ "Cannot convert into CCSID %u: ignored\n",
+ ccsid);
+ }
+
+ sp->c_ccsid = ccsid;
+ sp->c_mibenum = mibenum;
+ sp->c_next = chset_list;
+ chset_list = sp;
+ }
+
+ xmlXPathFreeObject(obj);
+
+ /**
+ *** Enter aliases.
+ **/
+
+ for (sp = chset_list; sp; sp = sp->c_next) {
+ strcpy(symbuf, utf8_ibm_);
+ utf8_utostr(symbuf + 4, sp->c_ccsid);
+ nfaenter(symbuf, -1, sp);
+ strcpy(symbuf, utf8_IBMCCSID);
+ utf8_utostrpad(symbuf + 8, sp->c_ccsid, -5);
+ nfaenter(symbuf, 13, sp); /* Not null-terminated. */
+
+ if (sp->c_mibenum) {
+ strcpy(symbuf, utf8_iana_);
+ utf8_utostr(symbuf + 5, sp->c_mibenum);
+ nfaenter(symbuf, -1, sp);
+ }
+
+ xmlXPathRegisterVariable(ctxt, utf8_C,
+ xmlXPathNewFloat((double) sp->c_ccsid));
+ obj = xmlXPathEval(utf8_aliastext, ctxt);
+
+ if (!obj || obj->type != XPATH_NODESET) {
+ fprintf(stderr, "getAlias failed in %s\n", filename);
+ exit(1);
+ }
+
+ if (obj->nodesetval &&
+ obj->nodesetval->nodeTab && obj->nodesetval->nodeNr) {
+ for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+ node = obj->nodesetval->nodeTab[i];
+ nfaenter(node->content, -1, sp);
+ }
+ }
+
+ xmlXPathFreeObject(obj);
+ }
+
+ xmlXPathFreeContext(ctxt);
+ xmlFreeDoc(doc);
+}
+
+
+unsigned int
+columnPosition(xmlXPathContextPtr ctxt, const xmlChar * header)
+
+{
+ xmlXPathObjectPtr obj;
+ unsigned int res = 0;
+
+ xmlXPathRegisterVariable(ctxt, utf8_T, xmlXPathNewString(header));
+ obj = xmlXPathEval(utf8_headerpos, ctxt);
+
+ if (obj) {
+ if (obj->type == XPATH_NUMBER)
+ res = (unsigned int) obj->floatval;
+
+ xmlXPathFreeObject(obj);
+ }
+
+ return res;
+}
+
+
+void
+read_iana(const char * filename)
+
+{
+ xmlDocPtr doc;
+ xmlXPathContextPtr ctxt;
+ xmlXPathObjectPtr obj1;
+ xmlXPathObjectPtr obj2;
+ xmlNodePtr node;
+ int prefnamecol;
+ int namecol;
+ int mibenumcol;
+ int aliascol;
+ int mibenum;
+ t_chset * sp;
+ int n;
+ int i;
+
+ doc = loadXMLFile(filename);
+
+ if (!doc) {
+ fprintf(stderr, "Cannot load file %s\n", filename);
+ exit(1);
+ }
+
+ ctxt = xmlXPathNewContext(doc);
+
+#ifndef OLDXML
+ xmlXPathRegisterNs(ctxt, utf8_html, utf8_htmluri);
+#endif
+
+ obj1 = xmlXPathEval(utf8_tablerows, ctxt);
+
+ if (!obj1 || obj1->type != XPATH_NODESET || !obj1->nodesetval ||
+ !obj1->nodesetval->nodeTab || obj1->nodesetval->nodeNr <= 1) {
+ fprintf(stderr, "No data in %s\n", filename);
+ exit(1);
+ }
+
+ /**
+ *** Identify columns.
+ **/
+
+ xmlXPathSetContextNode(obj1->nodesetval->nodeTab[0], ctxt);
+ prefnamecol = columnPosition(ctxt, utf8_Pref_MIME_Name);
+ namecol = columnPosition(ctxt, utf8_Name);
+ mibenumcol = columnPosition(ctxt, utf8_MIBenum);
+ aliascol = columnPosition(ctxt, utf8_Aliases);
+
+ if (!prefnamecol || !namecol || !mibenumcol || !aliascol) {
+ fprintf(stderr, "Key column(s) missing in %s\n", filename);
+ exit(1);
+ }
+
+ xmlXPathRegisterVariable(ctxt, utf8_P,
+ xmlXPathNewFloat((double) prefnamecol));
+ xmlXPathRegisterVariable(ctxt, utf8_N,
+ xmlXPathNewFloat((double) namecol));
+ xmlXPathRegisterVariable(ctxt, utf8_M,
+ xmlXPathNewFloat((double) mibenumcol));
+ xmlXPathRegisterVariable(ctxt, utf8_A,
+ xmlXPathNewFloat((double) aliascol));
+
+ /**
+ *** Process each row.
+ **/
+
+ for (n = 1; n < obj1->nodesetval->nodeNr; n++) {
+ xmlXPathSetContextNode(obj1->nodesetval->nodeTab[n], ctxt);
+
+ /**
+ *** Get the MIBenum from current row.
+ */
+
+ obj2 = xmlXPathEval(utf8_getmibenum, ctxt);
+
+ if (!obj2 || obj2->type != XPATH_NUMBER) {
+ fprintf(stderr, "get MIBenum failed at row %u\n", n);
+ exit(1);
+ }
+
+ if (xmlXPathIsNaN(obj2->floatval) ||
+ obj2->floatval < 1.0 || obj2->floatval > 65535.0 ||
+ ((unsigned int) obj2->floatval) != obj2->floatval) {
+ fprintf(stderr, "invalid MIBenum at row %u\n", n);
+ xmlXPathFreeObject(obj2);
+ continue;
+ }
+
+ mibenum = obj2->floatval;
+ xmlXPathFreeObject(obj2);
+
+ /**
+ *** Search the associations for a corresponding CCSID.
+ **/
+
+ for (sp = chset_list; sp; sp = sp->c_next)
+ if (sp->c_mibenum == mibenum)
+ break;
+
+ if (!sp)
+ continue; /* No CCSID for this MIBenum. */
+
+ /**
+ *** Process preferred MIME name.
+ **/
+
+ obj2 = xmlXPathEval(utf8_getprefname, ctxt);
+
+ if (!obj2 || obj2->type != XPATH_STRING) {
+ fprintf(stderr,
+ "get Preferred_MIME_Name failed at row %u\n", n);
+ exit(1);
+ }
+
+ if (obj2->stringval && obj2->stringval[0])
+ nfaenter(obj2->stringval, -1, sp);
+
+ xmlXPathFreeObject(obj2);
+
+ /**
+ *** Process name.
+ **/
+
+ obj2 = xmlXPathEval(utf8_getname, ctxt);
+
+ if (!obj2 || obj2->type != XPATH_STRING) {
+ fprintf(stderr, "get name failed at row %u\n", n);
+ exit(1);
+ }
+
+ if (obj2->stringval && obj2->stringval[0])
+ nfaenter(obj2->stringval, -1, sp);
+
+ xmlXPathFreeObject(obj2);
+
+ /**
+ *** Process aliases.
+ **/
+
+ obj2 = xmlXPathEval(utf8_getaliases, ctxt);
+
+ if (!obj2 || obj2->type != XPATH_NODESET) {
+ fprintf(stderr, "get aliases failed at row %u\n", n);
+ exit(1);
+ }
+
+ if (obj2->nodesetval && obj2->nodesetval->nodeTab)
+ for (i = 0; i < obj2->nodesetval->nodeNr; i++) {
+ node = obj2->nodesetval->nodeTab[i];
+
+ if (node && node->content && node->content[0])
+ nfaenter(node->content, -1, sp);
+ }
+
+ xmlXPathFreeObject(obj2);
+ }
+
+ xmlXPathFreeObject(obj1);
+ xmlXPathFreeContext(ctxt);
+ xmlFreeDoc(doc);
+}
+
+
+t_powerset * closureset(t_powerset * dst, t_powerset * src);
+
+
+t_powerset *
+closure(t_powerset * dst, t_state * src)
+
+{
+ t_transition * t;
+ unsigned int oldcard;
+
+ if (src->s_nfastates) {
+ /**
+ *** Is a DFA state: return closure of set of equivalent
+ *** NFA states.
+ **/
+
+ return closureset(dst, src->s_nfastates);
+ }
+
+ /**
+ *** Compute closure of NFA state.
+ **/
+
+ dst = set_include(dst, src);
+
+ for (t = src->s_forward; t; t = t->t_forwnext)
+ if (t->t_token == EPSILON) {
+ oldcard = dst->p_card;
+ dst = set_include(dst, t->t_to);
+
+ if (oldcard != dst->p_card)
+ dst = closure(dst, t->t_to);
+ }
+
+ return dst;
+}
+
+
+t_powerset *
+closureset(t_powerset * dst, t_powerset * src)
+
+{
+ unsigned int i;
+
+ for (i = 0; i < src->p_card; i++)
+ dst = closure(dst, (t_state *) src->p_set[i]);
+
+ return dst;
+}
+
+
+t_state *
+get_dfa_state(t_state * * stack,
+ t_powerset * nfastates, xmlHashTablePtr sethash)
+
+{
+ t_state * s;
+
+ if (s = hash_get(sethash, nfastates->p_set,
+ nfastates->p_card * sizeof nfastates->p_set[0])) {
+ /**
+ *** DFA state already present.
+ *** Release the NFA state set and return
+ *** the address of the old DFA state.
+ **/
+
+ free((char *) nfastates);
+ return s;
+ }
+
+ /**
+ *** Build the new state.
+ **/
+
+ s = newstate();
+ s->s_nfastates = nfastates;
+ s->s_next = dfa_states;
+ dfa_states = s;
+ s->s_stack = *stack;
+ *stack = s;
+
+ /**
+ *** Enter it in hash.
+ **/
+
+ if (hash_add(sethash, nfastates->p_set,
+ nfastates->p_card * sizeof nfastates->p_set[0], s))
+ chknull(NULL); /* Memory allocation error. */
+
+ return s;
+}
+
+
+int
+transcmp(const void * p1, const void * p2)
+
+{
+ t_transition * t1;
+ t_transition * t2;
+
+ t1 = *(t_transition * *) p1;
+ t2 = *(t_transition * *) p2;
+ return ((int) t1->t_token) - ((int) t2->t_token);
+}
+
+
+void
+builddfa(void)
+
+{
+ t_powerset * transset;
+ t_powerset * stateset;
+ t_state * s;
+ t_state * s2;
+ unsigned int n;
+ unsigned int i;
+ unsigned int token;
+ t_transition * t;
+ t_state * stack;
+ xmlHashTablePtr sethash;
+ unsigned int nst;
+
+ transset = set_include(NULL, NULL);
+ chknull(transset);
+ stateset = set_include(NULL, NULL);
+ chknull(stateset);
+ sethash = xmlHashCreate(1);
+ chknull(sethash);
+ dfa_states = (t_state *) NULL;
+ stack = (t_state *) NULL;
+ nst = 0;
+
+ /**
+ *** Build the DFA initial state.
+ **/
+
+ get_dfa_state(&stack, closure(NULL, initial_state), sethash);
+
+ /**
+ *** Build the other DFA states by looking at each
+ *** possible transition from stacked DFA states.
+ **/
+
+ do {
+ if (!(++nst % 100))
+ fprintf(stderr, "%u DFA states\n", nst);
+
+ s = stack;
+ stack = s->s_stack;
+ s->s_stack = (t_state *) NULL;
+
+ /**
+ *** Build a set of all non-epsilon transitions from this
+ *** state.
+ **/
+
+ transset->p_card = 0;
+
+ for (n = 0; n < s->s_nfastates->p_card; n++) {
+ s2 = s->s_nfastates->p_set[n];
+
+ for (t = s2->s_forward; t; t = t->t_forwnext)
+ if (t->t_token != EPSILON) {
+ transset = set_include(transset, t);
+ chknull(transset);
+ }
+ }
+
+ /**
+ *** Sort transitions by token.
+ **/
+
+ qsort(transset->p_set, transset->p_card,
+ sizeof transset->p_set[0], transcmp);
+
+ /**
+ *** Process all transitions, grouping them by token.
+ **/
+
+ stateset->p_card = 0;
+ token = EPSILON;
+
+ for (i = 0; i < transset->p_card; i++) {
+ t = transset->p_set[i];
+
+ if (token != t->t_token) {
+ if (stateset->p_card) {
+ /**
+ *** Get the equivalent DFA state
+ *** and create transition.
+ **/
+
+ newtransition(token, s,
+ get_dfa_state(&stack,
+ closureset(NULL, stateset),
+ sethash));
+ stateset->p_card = 0;
+ }
+
+ token = t->t_token;
+ }
+
+ stateset = set_include(stateset, t->t_to);
+ }
+
+ if (stateset->p_card)
+ newtransition(token, s, get_dfa_state(&stack,
+ closureset(NULL, stateset), sethash));
+ } while (stack);
+
+ free((char *) transset);
+ free((char *) stateset);
+ xmlHashFree(sethash, NULL);
+
+ /**
+ *** Reverse the state list to get the initial state first,
+ *** check for ambiguous prefixes, determine final states,
+ *** destroy NFA state sets.
+ **/
+
+ while (s = dfa_states) {
+ dfa_states = s->s_next;
+ s->s_next = stack;
+ stack = s;
+ stateset = s->s_nfastates;
+ s->s_nfastates = (t_powerset *) NULL;
+
+ for (n = 0; n < stateset->p_card; n++) {
+ s2 = (t_state *) stateset->p_set[n];
+
+ if (s2->s_final) {
+ if (s->s_final && s->s_final != s2->s_final)
+ fprintf(stderr,
+ "Ambiguous name for CCSIDs %u/%u\n",
+ s->s_final->c_ccsid,
+ s2->s_final->c_ccsid);
+
+ s->s_final = s2->s_final;
+ }
+ }
+
+ free((char *) stateset);
+ }
+
+ dfa_states = stack;
+}
+
+
+void
+deletenfa(void)
+
+{
+ t_transition * t;
+ t_state * s;
+ t_state * u;
+ t_state * stack;
+
+ stack = initial_state;
+ stack->s_stack = (t_state *) NULL;
+
+ while ((s = stack)) {
+ stack = s->s_stack;
+
+ while ((t = s->s_forward)) {
+ u = t->t_to;
+ unlink_transition(t);
+ free((char *) t);
+
+ if (!u->s_backward) {
+ u->s_stack = stack;
+ stack = u;
+ }
+ }
+
+ free((char *) s);
+ }
+}
+
+
+t_stategroup *
+newgroup(void)
+
+{
+ t_stategroup * g;
+
+ g = (t_stategroup *) malloc(sizeof *g);
+ chknull(g);
+ memset((char *) g, 0, sizeof *g);
+ g->g_id = groupid++;
+ return g;
+}
+
+
+void
+optimizedfa(void)
+
+{
+ unsigned int i;
+ xmlHashTablePtr h;
+ t_state * s1;
+ t_state * s2;
+ t_state * finstates;
+ t_state * * sp;
+ t_stategroup * g1;
+ t_stategroup * g2;
+ t_stategroup * ghead;
+ t_transition * t1;
+ t_transition * t2;
+ unsigned int done;
+ unsigned int startgroup;
+ unsigned int gtrans[1 << (8 * sizeof(unsigned char))];
+
+ /**
+ *** Reduce DFA state count.
+ **/
+
+ groupid = 0;
+ ghead = (t_stategroup *) NULL;
+
+ /**
+ *** First split: non-final and each distinct final states.
+ **/
+
+ h = xmlHashCreate(4);
+ chknull(h);
+
+ for (s1 = dfa_states; s1; s1 = s1->s_next) {
+ if (!(g1 = hash_get(h, &s1->s_final, sizeof s1->s_final))) {
+ g1 = newgroup();
+ g1->g_next = ghead;
+ ghead = g1;
+
+ if (hash_add(h, &s1->s_final, sizeof s1->s_final, g1))
+ chknull(NULL); /* Memory allocation error. */
+ }
+
+ s1->s_index = g1->g_id;
+ s1->s_stack = g1->g_member;
+ g1->g_member = s1;
+ }
+
+ xmlHashFree(h, NULL);
+
+ /**
+ *** Subsequent splits: states that have the same forward
+ *** transition tokens to states in the same group.
+ **/
+
+ do {
+ done = 1;
+
+ for (g2 = ghead; g2; g2 = g2->g_next) {
+ s1 = g2->g_member;
+
+ if (!s1->s_stack)
+ continue;
+
+ h = xmlHashCreate(1);
+ chknull(h);
+
+ /**
+ *** Build the group transition map.
+ **/
+
+ memset((char *) gtrans, ~0, sizeof gtrans);
+
+ for (t1 = s1->s_forward; t1; t1 = t1->t_forwnext)
+ gtrans[t1->t_token] = t1->t_to->s_index;
+
+ if (hash_add(h, gtrans, sizeof gtrans, g2))
+ chknull(NULL);
+
+ /**
+ *** Process other states in group.
+ **/
+
+ sp = &s1->s_stack;
+ s1 = *sp;
+
+ do {
+ *sp = s1->s_stack;
+
+ /**
+ *** Build the transition map.
+ **/
+
+ memset((char *) gtrans, ~0, sizeof gtrans);
+
+ for (t1 = s1->s_forward;
+ t1; t1 = t1->t_forwnext)
+ gtrans[t1->t_token] = t1->t_to->s_index;
+
+ g1 = hash_get(h, gtrans, sizeof gtrans);
+
+ if (g1 == g2) {
+ *sp = s1;
+ sp = &s1->s_stack;
+ }
+ else {
+ if (!g1) {
+ g1 = newgroup();
+ g1->g_next = ghead;
+ ghead = g1;
+
+ if (hash_add(h, gtrans,
+ sizeof gtrans, g1))
+ chknull(NULL);
+ }
+
+ s1->s_index = g1->g_id;
+ s1->s_stack = g1->g_member;
+ g1->g_member = s1;
+ done = 0;
+ }
+ } while (s1 = *sp);
+
+ xmlHashFree(h, NULL);
+ }
+ } while (!done);
+
+ /**
+ *** Establish group leaders and remap transitions.
+ **/
+
+ startgroup = dfa_states->s_index;
+
+ for (g1 = ghead; g1; g1 = g1->g_next)
+ for (s1 = g1->g_member->s_stack; s1; s1 = s1->s_stack)
+ for (t1 = s1->s_backward; t1; t1 = t2) {
+ t2 = t1->t_backnext;
+ link_transition(t1, NULL, g1->g_member);
+ }
+
+ /**
+ *** Remove redundant states and transitions.
+ **/
+
+ for (g1 = ghead; g1; g1 = g1->g_next) {
+ g1->g_member->s_next = (t_state *) NULL;
+
+ while ((s1 = g1->g_member->s_stack)) {
+ g1->g_member->s_stack = s1->s_stack;
+
+ for (t1 = s1->s_forward; t1; t1 = t2) {
+ t2 = t1->t_forwnext;
+ unlink_transition(t1);
+ free((char *) t1);
+ }
+
+ free((char *) s1);
+ }
+ }
+
+ /**
+ *** Remove group support and relink DFA states.
+ **/
+
+ dfa_states = (t_state *) NULL;
+ s2 = (t_state *) NULL;
+ finstates = (t_state *) NULL;
+
+ while (g1 = ghead) {
+ ghead = g1->g_next;
+ s1 = g1->g_member;
+
+ if (g1->g_id == startgroup)
+ dfa_states = s1; /* Keep start state first. */
+ else if (s1->s_final) { /* Then final states. */
+ s1->s_next = finstates;
+ finstates = s1;
+ }
+ else { /* Finish with non-final states. */
+ s1->s_next = s2;
+ s2 = s1;
+ }
+
+ free((char *) g1);
+ }
+
+ for (dfa_states->s_next = finstates; finstates->s_next;)
+ finstates = finstates->s_next;
+
+ finstates->s_next = s2;
+}
+
+
+const char *
+inttype(unsigned long max)
+
+{
+ int i;
+
+ for (i = 0; max; i++)
+ max >>= 1;
+
+ if (i > 8 * sizeof(unsigned int))
+ return "unsigned long";
+
+ if (i > 8 * sizeof(unsigned short))
+ return "unsigned int";
+
+ if (i > 8 * sizeof(unsigned char))
+ return "unsigned short";
+
+ return "unsigned char";
+}
+
+
+listids(FILE * fp)
+
+{
+ unsigned int pos;
+ t_chset * cp;
+ t_symlist * lp;
+ char * srcp;
+ char * dstp;
+ size_t srcc;
+ size_t dstc;
+ char buf[80];
+
+ fprintf(fp, "/**\n*** CCSID For arg Recognized name.\n");
+ pos = 0;
+
+ for (cp = chset_list; cp; cp = cp->c_next) {
+ if (pos) {
+ fprintf(fp, "\n");
+ pos = 0;
+ }
+
+ if (!cp->c_names)
+ continue;
+
+ pos = fprintf(fp, "*** %5u %c ", cp->c_ccsid,
+ iconv_open_error(cp->c_fromUTF8)? ' ': 'X');
+
+ for (lp = cp->c_names; lp; lp = lp->l_next) {
+ srcp = (char *) lp->l_symbol;
+ srcc = strlen(srcp);
+ dstp = buf;
+ dstc = sizeof buf;
+ iconv(utf82job, &srcp, &srcc, &dstp, &dstc);
+ srcc = dstp - buf;
+
+ if (pos + srcc > 79) {
+ fprintf(fp, "\n***%22c", ' ');
+ pos = 25;
+ }
+
+ pos += fprintf(fp, " %.*s", srcc, buf);
+ }
+ }
+
+ if (pos)
+ fprintf(fp, "\n");
+
+ fprintf(fp, "**/\n\n");
+}
+
+
+void
+generate(FILE * fp)
+
+{
+ unsigned int nstates;
+ unsigned int ntrans;
+ unsigned int maxfinal;
+ t_state * s;
+ t_transition * t;
+ unsigned int i;
+ unsigned int pos;
+ char * ns;
+
+ /**
+ *** Assign indexes to states and transitions.
+ **/
+
+ nstates = 0;
+ ntrans = 0;
+ maxfinal = 0;
+
+ for (s = dfa_states; s; s = s->s_next) {
+ s->s_index = nstates++;
+
+ if (s->s_final)
+ maxfinal = nstates;
+
+ for (t = s->s_forward; t; t = t->t_forwnext)
+ t->t_index = ntrans++;
+ }
+
+ fprintf(fp,
+ "/**\n*** %u states, %u finals, %u transitions.\n**/\n\n",
+ nstates, maxfinal, ntrans);
+ fprintf(stderr, "%u states, %u finals, %u transitions.\n",
+ nstates, maxfinal, ntrans);
+
+ /**
+ *** Generate types.
+ **/
+
+ fprintf(fp, "typedef unsigned short t_ccsid;\n");
+ fprintf(fp, "typedef %-23s t_staterange;\n", inttype(nstates));
+ fprintf(fp, "typedef %-23s t_transrange;\n\n", inttype(ntrans));
+
+ /**
+ *** Generate first transition index for each state.
+ **/
+
+ fprintf(fp, "static t_transrange trans_array[] = {\n");
+ pos = 0;
+ ntrans = 0;
+
+ for (s = dfa_states; s; s = s->s_next) {
+ pos += fprintf(fp, " %u,", ntrans);
+
+ if (pos > 72) {
+ fprintf(fp, "\n");
+ pos = 0;
+ }
+
+ for (t = s->s_forward; t; t = t->t_forwnext)
+ ntrans++;
+ }
+
+ fprintf(fp, " %u\n};\n\n", ntrans);
+
+ /**
+ *** Generate final state info.
+ **/
+
+ fprintf(fp, "static t_ccsid final_array[] = {\n");
+ pos = 0;
+ ns ="";
+ i = 0;
+
+ for (s = dfa_states; s && i++ < maxfinal; s = s->s_next) {
+ pos += fprintf(fp, "%s", ns);
+ ns = ",";
+
+ if (pos > 72) {
+ fprintf(fp, "\n");
+ pos = 0;
+ }
+
+ pos += fprintf(fp, " %u",
+ s->s_final? s->s_final->c_ccsid + 1: 0);
+ }
+
+ fprintf(fp, "\n};\n\n");
+
+ /**
+ *** Generate goto table.
+ **/
+
+ fprintf(fp, "static t_staterange goto_array[] = {\n");
+ pos = 0;
+
+ for (s = dfa_states; s; s = s->s_next)
+ for (t = s->s_forward; t; t = t->t_forwnext) {
+ pos += fprintf(fp, " %u,", t->t_to->s_index);
+
+ if (pos > 72) {
+ fprintf(fp, "\n");
+ pos = 0;
+ }
+ }
+
+ fprintf(fp, " %u\n};\n\n", nstates);
+
+ /**
+ *** Generate transition label table.
+ **/
+
+ fprintf(fp, "static unsigned char label_array[] = {\n");
+ pos = 0;
+ ns ="";
+
+ for (s = dfa_states; s; s = s->s_next)
+ for (t = s->s_forward; t; t = t->t_forwnext) {
+ pos += fprintf(fp, "%s", ns);
+ ns = ",";
+
+ if (pos > 72) {
+ fprintf(fp, "\n");
+ pos = 0;
+ }
+
+ pos += fprintf(fp, " 0x%02X", t->t_token);
+ }
+
+ fprintf(fp, "\n};\n", nstates);
+}
+
+
+main(argc, argv)
+int argc;
+char * * argv;
+
+{
+ FILE * fp;
+ t_chset * csp;
+ char symbuf[20];
+
+ chset_list = (t_chset *) NULL;
+ initial_state = newstate();
+ job2utf8 = iconv_open_ccsid(C_UTF8_CCSID, C_SOURCE_CCSID, 0);
+ utf82job = iconv_open_ccsid(C_SOURCE_CCSID, C_UTF8_CCSID, 0);
+
+ if (argc != 4) {
+ fprintf(stderr, "Usage: %s <ccsid-mibenum file> ", *argv);
+ fprintf(stderr, "<iana-character-set file> <output file>\n");
+ exit(1);
+ }
+
+ /**
+ *** Read CCSID/MIBenum associations. Define special names.
+ **/
+
+ read_assocs(argv[1]);
+
+ /**
+ *** Read character set names and establish the case-independent
+ *** name DFA in all possible CCSIDs.
+ **/
+
+ read_iana(argv[2]);
+
+ /**
+ *** Build DFA from NFA.
+ **/
+
+ builddfa();
+
+ /**
+ *** Delete NFA.
+ **/
+
+ deletenfa();
+
+ /**
+ *** Minimize the DFA state count.
+ **/
+
+ optimizedfa();
+
+ /**
+ *** Generate the table.
+ **/
+
+ fp = fopen(argv[3], "w+");
+
+ if (!fp) {
+ perror(argv[3]);
+ exit(1);
+ }
+
+ fprintf(fp, "/**\n");
+ fprintf(fp, "*** Character set names table.\n");
+ fprintf(fp, "*** Generated by program BLDCSNDFA from");
+ fprintf(fp, " IANA character set assignment file\n");
+ fprintf(fp, "*** and CCSID/MIBenum equivalence file.\n");
+ fprintf(fp, "*** *** Do not edit by hand ***\n");
+ fprintf(fp, "**/\n\n");
+ listids(fp);
+ generate(fp);
+
+ if (ferror(fp)) {
+ perror(argv[3]);
+ fclose(fp);
+ exit(1);
+ }
+
+ fclose(fp);
+ iconv_close(job2utf8);
+ iconv_close(utf82job);
+ exit(0);
+}
diff --git a/os400/iconv/bldcsndfa/ccsid_mibenum.dtd b/os400/iconv/bldcsndfa/ccsid_mibenum.dtd
new file mode 100644
index 0000000..0c834ec
--- /dev/null
+++ b/os400/iconv/bldcsndfa/ccsid_mibenum.dtd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+--- DTD for CCSID/MIBEnum association documents.
+---
+--- See Copyright for the status of this software.
+---
+--- Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+-->
+<!ELEMENT ccsid_mibenum (assoc)*>
+<!ELEMENT assoc (alias)*>
+<!ATTLIST assoc
+ ccsid CDATA #IMPLIED
+ mibenum CDATA #IMPLIED
+>
+<!ELEMENT alias (#PCDATA)>
diff --git a/os400/iconv/bldcsndfa/ccsid_mibenum.xml b/os400/iconv/bldcsndfa/ccsid_mibenum.xml
new file mode 100644
index 0000000..8af38b4
--- /dev/null
+++ b/os400/iconv/bldcsndfa/ccsid_mibenum.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ccsid_mibenum SYSTEM "ccsid_mibenum.dtd">
+<!--
+--- CCSID/MIBEnum associations.
+---
+--- See Copyright for the status of this software.
+---
+--- Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+-->
+<ccsid_mibenum>
+ <assoc ccsid="0"><!-- Curent job's CCSID. --></assoc>
+ <assoc ccsid="37" mibenum="2028"><!-- EBCDIC-US -->
+ <alias>EBCDIC</alias>
+ </assoc>
+ <assoc ccsid="256"><!-- Netherlands ? --></assoc>
+ <assoc ccsid="273" mibenum="2030"><!-- EBCDIC-DE --></assoc>
+ <assoc ccsid="277" mibenum="2033"><!-- EBCDIC-DK/NO --></assoc>
+ <assoc ccsid="278" mibenum="2034"><!-- EBCDIC-FI/SE --></assoc>
+ <assoc ccsid="280" mibenum="2035"><!-- EBCDIC-IT --></assoc>
+ <assoc ccsid="284" mibenum="2037"><!-- EBCDIC-ES --></assoc>
+ <assoc ccsid="285" mibenum="2038"><!-- EBCDIC-GB --></assoc>
+ <assoc ccsid="290" mibenum="2039"><!-- EBCDIC-JP-Kana --></assoc>
+ <assoc ccsid="297" mibenum="2040"><!-- EBCDIC-FR --></assoc>
+ <assoc ccsid="300"><!-- Japan English ? --></assoc>
+ <assoc ccsid="301"><!-- PC DATA Japanese --></assoc>
+ <assoc ccsid="367" mibenum="3"><!-- ANSI X3.4 ASCII -->
+ <alias>ASCII</alias>
+ </assoc>
+ <assoc ccsid="420" mibenum="2041"><!-- EBCDIC-Arab --></assoc>
+ <assoc ccsid="423" mibenum="2042"><!-- EBCDIC-GR --></assoc>
+ <assoc ccsid="424" mibenum="2043"><!-- EBCDIC-Hebrew --></assoc>
+ <assoc ccsid="437" mibenum="2011"><!-- 8-bit PC ASCII --></assoc>
+ <assoc ccsid="500" mibenum="2044"><!-- EBCDIC-BE/CH international latin 1 --></assoc>
+ <assoc ccsid="720"><!-- MSDOS Arabic ? --></assoc>
+ <assoc ccsid="737"><!-- MSDOS Greek PC DATA ? --></assoc>
+ <assoc ccsid="775" mibenum="2087"><!-- MSDOS Baltic PC DATA --></assoc>
+ <assoc ccsid="813" mibenum="10"><!-- ISO-8859-7 --></assoc>
+ <assoc ccsid="819" mibenum="4"><!-- ISO-8859-1 --></assoc>
+ <assoc ccsid="833"><!-- Korea (extended range) --></assoc>
+ <assoc ccsid="835"><!-- Korea host double byte --></assoc>
+ <assoc ccsid="836"><!-- Simplified chinese (extended range) --></assoc>
+ <assoc ccsid="837"><!-- Simplified chinese --></assoc>
+ <assoc ccsid="838" mibenum="2016"><!-- IBM-Thai --></assoc>
+ <assoc ccsid="850" mibenum="2009"><!-- PC DATA international latin 1 --></assoc>
+ <assoc ccsid="851" mibenum="2045"><!-- PC DATA greek --></assoc>
+ <assoc ccsid="852" mibenum="2010"><!-- PC DATA latin-2 multilingual --></assoc>
+ <assoc ccsid="855" mibenum="2046"><!-- PC DATA ROECE cyrillic --></assoc>
+ <assoc ccsid="857" mibenum="2047"><!-- PC DATA Turkey latin-5 --></assoc>
+ <assoc ccsid="858" mibenum="2089"><!-- PC-Multilingual-850+Euro --></assoc>
+ <assoc ccsid="860" mibenum="2048"><!-- PC DATA Portugal --></assoc>
+ <assoc ccsid="861" mibenum="2049"><!-- PC DATA Iceland --></assoc>
+ <assoc ccsid="862" mibenum="2013"><!-- PC DATA Hebrew --></assoc>
+ <assoc ccsid="863" mibenum="2050"><!-- PC DATA Canada --></assoc>
+ <assoc ccsid="864" mibenum="2051"><!-- PC DATA Arabic --></assoc>
+ <assoc ccsid="865" mibenum="2052"><!-- PC DATA DK/NO --></assoc>
+ <assoc ccsid="866" mibenum="2086"><!-- PC DATA cyrillic 2 --></assoc>
+ <assoc ccsid="868" mibenum="2053"><!-- PC DATA Urdu --></assoc>
+ <assoc ccsid="869" mibenum="2054"><!-- PC DATA greek (2?) --></assoc>
+ <assoc ccsid="870" mibenum="2055"><!-- EBCDIC-Latin2-Multilingual --></assoc>
+ <assoc ccsid="871" mibenum="2056"><!-- EBCDIC-IS --></assoc>
+ <assoc ccsid="874" mibenum="2259"><!-- TIS-620 -->
+ <alias>EUC-TH></alias>
+ <alias>eucTH</alias>
+ <alias>csEUCTH</alias>
+ </assoc>
+ <assoc ccsid="875"><!-- Greece --></assoc>
+ <assoc ccsid="878" mibenum="2084"><!-- KOI8-R --></assoc>
+ <assoc ccsid="880" mibenum="2057"><!-- EBCDIC-Cyrillic --></assoc>
+ <assoc ccsid="891" mibenum="2058"><!-- PC DATA corean (non-extended) --></assoc>
+ <assoc ccsid="896"><!-- Japan 7-bit Katakana --></assoc>
+ <assoc ccsid="897" mibenum="15"><!-- JIS_X0201 --></assoc>
+ <assoc ccsid="903" mibenum="2059"><!-- PC DATA simplified chinese (non-extended) --></assoc>
+ <assoc ccsid="904" mibenum="2060"><!-- PC DATA traditional chinese --></assoc>
+ <assoc ccsid="905" mibenum="2061"><!-- EBCDIC-TR latin 3 --></assoc>
+ <assoc ccsid="912" mibenum="5"><!-- ISO-8859-2 --></assoc>
+ <assoc ccsid="913" mibenum="6"><!-- ISO-8859-3 --></assoc>
+ <assoc ccsid="914" mibenum="7"><!-- ISO-8859-4 --></assoc>
+ <assoc ccsid="915" mibenum="8"><!-- ISO-8859-5 --></assoc>
+ <assoc ccsid="916" mibenum="11"><!-- ISO-8859-8 --></assoc>
+ <assoc ccsid="918" mibenum="2062"><!-- IBM918 --></assoc>
+ <assoc ccsid="920" mibenum="12"><!-- ISO-8859-9 --></assoc>
+ <assoc ccsid="921" mibenum="109"><!-- ISO-8859-13 --></assoc>
+ <assoc ccsid="922"><!-- Estonia, 8-bit --></assoc>
+ <assoc ccsid="923" mibenum="111"><!-- ISO-8859-15 --></assoc>
+ <assoc ccsid="924" mibenum="2090"><!-- EBCDIC-Latin9+Euro --></assoc>
+ <assoc ccsid="926"><!-- Korean PC DATA DBCS, UDC 1880 --></assoc>
+ <assoc ccsid="927"><!-- Traditional chinese PC DATA DBCS, UDC 6204 --></assoc>
+ <assoc ccsid="928"><!-- Simplified chinese PC DATA DBCS, UDC 1880 --></assoc>
+ <assoc ccsid="930"><!-- Japan Katakana (extended range) 4370 UDC (User Defined Characters) --></assoc>
+ <assoc ccsid="932"><!-- Japan PC DATA Mixed --></assoc>
+ <assoc ccsid="933"><!-- Korea (extended range), 1880 UDC --></assoc>
+ <assoc ccsid="934"><!-- Korean PC DATA --></assoc>
+ <assoc ccsid="935"><!-- Simplified Chinese (extended range) --></assoc>
+ <assoc ccsid="936"><!-- Simplified Chinese (non-extended) --></assoc>
+ <assoc ccsid="937"><!-- Traditional Chinese (extended range) --></assoc>
+ <assoc ccsid="938"><!-- Traditional Chinese (non-extended) --></assoc>
+ <assoc ccsid="939"><!-- Japan English (extended range) 4370 UDC --></assoc>
+ <assoc ccsid="942"><!-- Japanese PC DATA Mixed --></assoc>
+ <assoc ccsid="943" mibenum="17"><!-- Shift_JIS --></assoc>
+ <assoc ccsid="944"><!-- Korean PC DATA Mixed --></assoc>
+ <assoc ccsid="946"><!-- Simplified Chinese PC DATA Mixed --></assoc>
+ <assoc ccsid="947"><!-- Traditional Chinese PC DATA Mixed 6204 UDC (User Defined Characters) --></assoc>
+ <assoc ccsid="949"><!-- Republic of Korea National Standard Graphic Character Set (KS). PC DATA mixed-byte including 1800 UDC --></assoc>
+ <assoc ccsid="950"><!-- Traditional Chinese PC DATA Mixed for Big5 --></assoc>
+ <assoc ccsid="951"><!-- Republic of Korea National Standard Graphic Character Set (KS). PC DATA double-byte including 1800 UDC --></assoc>
+ <assoc ccsid="956"><!-- JIS X201 Roman for CP 00895; JIS X208-1983 for CP 00952 --></assoc>
+ <assoc ccsid="957"><!-- JIS X201 Roman for CP 00895; JIS X208-1978 for CP 00955 --></assoc>
+ <assoc ccsid="958"><!-- ASCII for CP 00367; JIS X208-1983 for CP 00952 --></assoc>
+ <assoc ccsid="959"><!-- ASCII for CP 00367; JIS X208-1978 for CP 00955 --></assoc>
+ <assoc ccsid="964"><!-- G0 - ASCII for CP 00367; G1-CNS 11643 plane 1 for CP 960 --></assoc>
+ <assoc ccsid="965"><!-- ASCII for CP 00367; CNS 11643 plane 1 for CP 960 --></assoc>
+ <assoc ccsid="970" mibenum="38"><!-- EUC-KR --></assoc>
+ <assoc ccsid="1008"><!-- Arabic 8-bit ISO/ASCII --></assoc>
+ <assoc ccsid="1009"><!-- IRV --></assoc>
+ <assoc ccsid="1010"><!-- France --></assoc>
+ <assoc ccsid="1011"><!-- Germany --></assoc>
+ <assoc ccsid="1012"><!-- Italy --></assoc>
+ <assoc ccsid="1013"><!-- United Kingdom --></assoc>
+ <assoc ccsid="1014"><!-- Spain --></assoc>
+ <assoc ccsid="1015"><!-- Portugal --></assoc>
+ <assoc ccsid="1016"><!-- Norway --></assoc>
+ <assoc ccsid="1017"><!-- Denmark --></assoc>
+ <assoc ccsid="1018"><!-- Finland and Sweden --></assoc>
+ <assoc ccsid="1019"><!-- Belgium and Netherlands --></assoc>
+ <assoc ccsid="1025"><!-- Cyrillic Multilingual --></assoc>
+ <assoc ccsid="1026" mibenum="2063"><!-- Turkey latin 5 CECP --></assoc>
+ <assoc ccsid="1027"><!-- Japan english (extended range) --></assoc>
+ <assoc ccsid="1040"><!-- Korean Latin PC DATA extended --></assoc>
+ <assoc ccsid="1041"><!-- Japanese PC DATA extended --></assoc>
+ <assoc ccsid="1042"><!-- Simplified Chinese PC DATA extended --></assoc>
+ <assoc ccsid="1043"><!-- Traditional Chinese PC DATA extended --></assoc>
+ <assoc ccsid="1046"><!-- PC DATA - Arabic Extended --></assoc>
+ <assoc ccsid="1047" mibenum="2102"><!-- Latin open sys EBCDIC --></assoc>
+ <assoc ccsid="1051" mibenum="2004"><!-- hp-roman8 --></assoc>
+ <assoc ccsid="1088"><!-- Korean PC DATA single-byte --></assoc>
+ <assoc ccsid="1089" mibenum="9"><!-- ISO 8859-6: Arabic --></assoc>
+ <assoc ccsid="1097"><!-- Farsi --></assoc>
+ <assoc ccsid="1098"><!-- Farsi (IBM-PC) --></assoc>
+ <assoc ccsid="1112"><!-- Baltic, Multilingual --></assoc>
+ <assoc ccsid="1114"><!-- Traditional Chinese, Taiwan Industry Graphic Character Set (Big5) --></assoc>
+ <assoc ccsid="1115"><!-- Simplified Chinese, People&#x27;s Republic of China National. Standard (GB), personal computer SBCS --></assoc>
+ <assoc ccsid="1122"><!-- Estonia --></assoc>
+ <assoc ccsid="1123"/>
+ <assoc ccsid="1129"><!-- ISO-8 Vietnamese --></assoc>
+ <assoc ccsid="1130"><!-- EBCDIC Vietnamese --></assoc>
+ <assoc ccsid="1132"><!-- EBCDIC Lao --></assoc>
+ <assoc ccsid="1133"><!-- ISO-8 Lao --></assoc>
+ <assoc ccsid="1137"/>
+ <assoc ccsid="1140" mibenum="2091"><!-- EBCDIC-US-37+Euro --></assoc>
+ <assoc ccsid="1141" mibenum="2092"><!-- EBCDIC-DE-273+Euro --></assoc>
+ <assoc ccsid="1142" mibenum="2093"><!-- EBCDIC-DK/NO-277+Euro --></assoc>
+ <assoc ccsid="1143" mibenum="2094"><!-- EBCDIC-FI/SE-278+Euro --></assoc>
+ <assoc ccsid="1144" mibenum="2095"><!-- EBCDIC-IT-280+Euro --></assoc>
+ <assoc ccsid="1145" mibenum="2096"><!-- EBCDIC-ES-284+Euro --></assoc>
+ <assoc ccsid="1146" mibenum="2097"><!-- EBCDIC-GB-285+Euro --></assoc>
+ <assoc ccsid="1147" mibenum="2098"><!-- EBCDIC-FR-297+Euro --></assoc>
+ <assoc ccsid="1148" mibenum="2099"><!-- EBCDIC-INT-500+Euro --></assoc>
+ <assoc ccsid="1149" mibenum="2100"><!-- EBCDIC-IS-871+Euro --></assoc>
+ <assoc ccsid="1153"/>
+ <assoc ccsid="1154"/>
+ <assoc ccsid="1155"/>
+ <assoc ccsid="1156"/>
+ <assoc ccsid="1157"/>
+ <assoc ccsid="1158"/>
+ <assoc ccsid="1160"/>
+ <assoc ccsid="1164"/>
+ <assoc ccsid="1201" mibenum="1013"><!-- UTF-16BE -->
+ <alias>UTF16-BE</alias>
+ <alias>UTF16BE</alias>
+ <alias>UTF-16-BE</alias>
+ </assoc>
+ <assoc ccsid="1203" mibenum="1014"><!-- UTF-16LE -->
+ <alias>UTF16-LE</alias>
+ <alias>UTF16LE</alias>
+ <alias>UTF-16-LE</alias>
+ </assoc>
+ <assoc ccsid="1208" mibenum="106"><!-- UTF-8 -->
+ <alias>UTF8</alias>
+ </assoc>
+ <assoc ccsid="1233" mibenum="1018"><!-- UTF-32BE -->
+ <alias>UTF32-BE</alias>
+ <alias>UTF32BE</alias>
+ <alias>UTF-32-BE</alias>
+ </assoc>
+ <assoc ccsid="1235" mibenum="1019"><!-- UTF-32LE -->
+ <alias>UTF32-LE</alias>
+ <alias>UTF32LE</alias>
+ <alias>UTF-32-LE</alias>
+ </assoc>
+ <assoc ccsid="1250" mibenum="2002"><!-- Windows Latin 2 --></assoc>
+ <assoc ccsid="1251"><!-- Windows Cyrillic --></assoc>
+ <assoc ccsid="1252" mibenum="2001"><!-- Windows Latin 1 --></assoc>
+ <assoc ccsid="1253"><!-- Windows Greek --></assoc>
+ <assoc ccsid="1254"><!-- Windows Turkish --></assoc>
+ <assoc ccsid="1255"><!-- Windows Hebrew --></assoc>
+ <assoc ccsid="1256"><!-- Windows Arabic --></assoc>
+ <assoc ccsid="1257"><!-- Windows Baltic Rim --></assoc>
+ <assoc ccsid="1258"><!-- Windows Vietnamese --></assoc>
+ <assoc ccsid="1275"><!-- Apple, Latin-1 --></assoc>
+ <assoc ccsid="1276" mibenum="2005"><!-- Adobe-Standard-Encoding --></assoc>
+ <assoc ccsid="1280"><!-- Apple, Greek --></assoc>
+ <assoc ccsid="1281"><!-- Apple, Turkey --></assoc>
+ <assoc ccsid="1282"><!-- Apple, Central European (Latin-2) --></assoc>
+ <assoc ccsid="1283"><!-- Apple, Cyrillic --></assoc>
+ <assoc ccsid="1363" mibenum="36"><!-- KS_C_5601-1987 -->
+ <alias>korean</alias>
+ </assoc>
+ <assoc ccsid="1364"/>
+ <assoc ccsid="1373"><!-- Windows-950 --></assoc>
+ <assoc ccsid="1375" mibenum="2101"><!-- Big5-HKSCS --></assoc>
+ <assoc ccsid="1380"><!-- Simplified Chinese DBCS PC --></assoc>
+ <assoc ccsid="1381"><!-- Simplified Chinese PC DATA Mixed --></assoc>
+ <assoc ccsid="1383" mibenum="2025"><!-- GB2312 -->
+ <alias>EUC-CN</alias>
+ </assoc>
+ <assoc ccsid="1386" mibenum="113"><!-- GBK --></assoc>
+ <assoc ccsid="1388"><!-- Simplified Chinese DBCS-Host DATA GBK mixed --></assoc>
+ <assoc ccsid="1392"><!-- S-ch PC Dara mixed GB18030 --></assoc>
+ <assoc ccsid="1399" />
+ <assoc ccsid="4396"><!-- Japanese Host DB including 1880 --></assoc>
+ <assoc ccsid="4948"><!-- Latin 2 PC DATA Multilingual --></assoc>
+ <assoc ccsid="4951"><!-- Cyrillic PC DATA Multilingual --></assoc>
+ <assoc ccsid="4952"><!-- Hebrew PC DATA --></assoc>
+ <assoc ccsid="4953"><!-- Turkey PC DATA Latin 5 --></assoc>
+ <assoc ccsid="4960"><!-- Arabic PC DATA --></assoc>
+ <assoc ccsid="4965"><!-- Greek PC DATA --></assoc>
+ <assoc ccsid="4971"/>
+ <assoc ccsid="5026"><!-- Japan Katakana (extended range) 1880 UDC --></assoc>
+ <assoc ccsid="5035"><!-- Japan English (extended range) 1880 UDC --></assoc>
+ <assoc ccsid="5050"><!-- G0 - JIS X201 Roman for CP 895; G1 JIS X208-1990 for CP 952 --></assoc>
+ <assoc ccsid="5052"><!-- JIS X201 Roman for CP 895; JIS X208-1983 for CP 952 --></assoc>
+ <assoc ccsid="5053"><!-- JIS X201 Roman for CP 895; JIS X208-1978 for CP 955 --></assoc>
+ <assoc ccsid="5054"><!-- ASCII for CP 367; JIS X208-1983 for CP 952 --></assoc>
+ <assoc ccsid="5055"><!-- ASCII for CP 367; JIS X208-1978 for CP 955 --></assoc>
+ <assoc ccsid="5354" mibenum="2258"><!-- windows-1258 --></assoc>
+ <assoc ccsid="5346" mibenum="2250"><!-- windows-1250 --></assoc>
+ <assoc ccsid="5347" mibenum="2251"><!-- windows-1251 --></assoc>
+ <assoc ccsid="5348" mibenum="2252"><!-- windows-1252 --></assoc>
+ <assoc ccsid="5349" mibenum="2253"><!-- windows-1253 --></assoc>
+ <assoc ccsid="5350" mibenum="2254"><!-- windows-1254 --></assoc>
+ <assoc ccsid="5123"/>
+ <assoc ccsid="5478" mibenum="57"><!-- GB_2312-80 -->
+ <alias>chinese</alias>
+ </assoc>
+ <assoc ccsid="8612"><!-- Arabic (base shapes only) --></assoc>
+ <assoc ccsid="9030"><!-- Thai Host Extended SBCS --></assoc>
+ <assoc ccsid="9056"><!-- PC DATA: Arabic PC Storage/Interchange --></assoc>
+ <assoc ccsid="9066"><!-- Thai PC DATA Extended SBCS --></assoc>
+ <assoc ccsid="9447" mibenum="2255"><!-- windows-1255 --></assoc>
+ <assoc ccsid="9448" mibenum="2256"><!-- windows-1256 --></assoc>
+ <assoc ccsid="9449" mibenum="2257"><!-- windows-1257 --></assoc>
+ <assoc ccsid="12708"/>
+ <assoc ccsid="13121"/>
+ <assoc ccsid="13124"/>
+ <assoc ccsid="13488" mibenum="1000"><!-- ISO-10646-UCS-2 -->
+ <alias>UCS-2</alias>
+ <alias>UCS2</alias>
+ </assoc>
+ <assoc ccsid="17354"><!-- G0 - ASCII for CP 00367; G1 -KSC X5601-1989 (including 188 UDCs) for --></assoc>
+ <assoc ccsid="25546"><!-- Korean 2022-KR TCP ASCII --></assoc>
+ <assoc ccsid="28709"><!-- Traditional Chinese (extended range) --></assoc>
+ <assoc ccsid="33722" mibenum="18"><!-- EUC-JP --></assoc>
+ <assoc ccsid="57345"><!-- All Japanese 2022 characters --></assoc>
+ <assoc ccsid="61952"><!-- AS/400 specific UCS level 2. --></assoc>
+ <assoc ccsid="62211"/>
+ <assoc ccsid="62224"/>
+ <assoc ccsid="62235"/>
+ <assoc ccsid="62245"/>
+ <assoc mibenum="27"><!-- ISO-10646-UTF-1 --></assoc>
+</ccsid_mibenum>
diff --git a/os400/iconv/bldcsndfa/character-sets.xhtml b/os400/iconv/bldcsndfa/character-sets.xhtml
new file mode 100644
index 0000000..e1d5a3b
--- /dev/null
+++ b/os400/iconv/bldcsndfa/character-sets.xhtml
@@ -0,0 +1,3077 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:iana="http://www.iana.org/assignments">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ASCII" />
+ <link rel="stylesheet" href="../_support/iana-registry.css" type="text/css" />
+ <script type="text/javascript" src="../_support/jquery.js"></script>
+ <script type="text/javascript" src="../_support/sort.js"></script>
+ <title>Character Sets</title>
+ </head>
+ <body>
+ <h1>Character Sets</h1>
+ <dl>
+ <dt>Last Updated</dt>
+ <dd>2013-01-23</dd>
+ <dt>Registration Procedure(s)</dt>
+ <dd>
+ <pre>Expert Review</pre>
+ </dd>
+ <dt>Expert(s)</dt>
+ <dd>
+ <pre>Primary Expert Ned Freed and Secondary Expert Martin D&#252;rst</pre>
+ </dd>
+ <dt>Reference</dt>
+ <dd>[<a href="http://www.iana.org/go/rfc2978">RFC2978</a>]</dd>
+ <dt>Note</dt>
+ <dd>
+ <pre>These are the official names for character sets that may be used in
+the Internet and may be referred to in Internet documentation. These
+names are expressed in ANSI_X3.4-1968 which is commonly called
+US-ASCII or simply ASCII. The character set most commonly use in the
+Internet and used especially in protocol standards is US-ASCII, this
+is strongly encouraged. The use of the name US-ASCII is also
+encouraged.
+
+The character set names may be up to 40 characters taken from the
+printable characters of US-ASCII. However, no distinction is made
+between use of upper and lower case letters.
+
+The MIBenum value is a unique value for use in MIBs to identify coded
+character sets.
+
+The value space for MIBenum values has been divided into three
+regions. The first region (3-999) consists of coded character sets
+that have been standardized by some standard setting organization.
+This region is intended for standards that do not have subset
+implementations. The second region (1000-1999) is for the Unicode and
+ISO/IEC 10646 coded character sets together with a specification of a
+(set of) sub-repertoires that may occur. The third region (&gt;1999) is
+intended for vendor specific coded character sets.
+
+ Assigned MIB enum Numbers
+ -------------------------
+ 0-2 Reserved
+ 3-999 Set By Standards Organizations
+ 1000-1999 Unicode / 10646
+ 2000-2999 Vendor
+
+The aliases that start with "cs" have been added for use with the
+IANA-CHARSET-MIB as originally defined in [<a href="http://www.iana.org/go/rfc3808">RFC3808</a>], and as currently
+maintained by IANA at [<a href="http://www.iana.org/assignments/ianacharset-mib">IANA registry <i>ianacharset-mib</i></a>].
+Note that the ianacharset-mib needs to be kept in sync with this
+registry. These aliases that start with "cs" contain the standard
+numbers along with suggestive names in order to facilitate applications
+that want to display the names in user interfaces. The "cs" stands
+for character set and is provided for applications that need a lower
+case first letter but want to use mixed case thereafter that cannot
+contain any special characters, such as underbar ("_") and dash ("-").
+
+If the character set is from an ISO standard, its cs alias is the ISO
+standard number or name. If the character set is not from an ISO
+standard, but is registered with ISO (IPSJ/ITSCJ is the current ISO
+Registration Authority), the ISO Registry number is specified as
+ISOnnn followed by letters suggestive of the name or standards number
+of the code set. When a national or international standard is
+revised, the year of revision is added to the cs alias of the new
+character set entry in the IANA Registry in order to distinguish the
+revised character set from the original character set.</pre>
+ </dd>
+ <dt>Alternative Formats</dt>
+ <dd>
+ <a class="altformat" href="character-sets.txt"><img src="/_img/icons/text-plain.png" /><br />Plain text</a>
+ </dd>
+ </dl>
+ <dl>
+ <dt>Alternative Formats</dt>
+ <dd>
+ <a class="altformat" href="character-sets-1.csv"><img src="/_img/icons/text-csv.png" /><br />CSV</a>
+ </dd>
+ </dl>
+ <table id="table-character-sets-1" class="sortable">
+ <thead>
+ <tr>
+ <th>Preferred MIME Name</th>
+ <th>Name</th>
+ <th>MIBenum</th>
+ <th>Source</th>
+ <th>Reference</th>
+ <th>Aliases</th>
+ <th>Note</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>US-ASCII</td>
+ <td>US-ASCII</td>
+ <td>3</td>
+ <td>ANSI X3.4-1986</td>
+ <td>[<a href="http://www.iana.org/go/rfc2046">RFC2046</a>]</td>
+ <td>iso-ir-6<br />ANSI_X3.4-1968<br />ANSI_X3.4-1986<br />ISO_646.irv:1991<br />ISO646-US<br />US-ASCII<br />us<br />IBM367<br />cp367<br />csASCII</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-1</td>
+ <td>ISO_8859-1:1987</td>
+ <td>4</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-100<br />ISO_8859-1<br />ISO-8859-1<br />latin1<br />l1<br />IBM819<br />CP819<br />csISOLatin1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-2</td>
+ <td>ISO_8859-2:1987</td>
+ <td>5</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-101<br />ISO_8859-2<br />ISO-8859-2<br />latin2<br />l2<br />csISOLatin2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-3</td>
+ <td>ISO_8859-3:1988</td>
+ <td>6</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-109<br />ISO_8859-3<br />ISO-8859-3<br />latin3<br />l3<br />csISOLatin3</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-4</td>
+ <td>ISO_8859-4:1988</td>
+ <td>7</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-110<br />ISO_8859-4<br />ISO-8859-4<br />latin4<br />l4<br />csISOLatin4</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-5</td>
+ <td>ISO_8859-5:1988</td>
+ <td>8</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-144<br />ISO_8859-5<br />ISO-8859-5<br />cyrillic<br />csISOLatinCyrillic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-6</td>
+ <td>ISO_8859-6:1987</td>
+ <td>9</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-127<br />ISO_8859-6<br />ISO-8859-6<br />ECMA-114<br />ASMO-708<br />arabic<br />csISOLatinArabic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-7</td>
+ <td>ISO_8859-7:1987</td>
+ <td>10</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1947">RFC1947</a>][<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-126<br />ISO_8859-7<br />ISO-8859-7<br />ELOT_928<br />ECMA-118<br />greek<br />greek8<br />csISOLatinGreek</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-8</td>
+ <td>ISO_8859-8:1988</td>
+ <td>11</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-138<br />ISO_8859-8<br />ISO-8859-8<br />hebrew<br />csISOLatinHebrew</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-9</td>
+ <td>ISO_8859-9:1989</td>
+ <td>12</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-148<br />ISO_8859-9<br />ISO-8859-9<br />latin5<br />l5<br />csISOLatin5</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-10</td>
+ <td>ISO-8859-10</td>
+ <td>13</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-157<br />l6<br />ISO_8859-10:1992<br />csISOLatin6<br />latin6</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_6937-2-add</td>
+ <td>14</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>] and ISO 6937-2:1983<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-142<br />csISOTextComm</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_X0201</td>
+ <td>15</td>
+ <td>JIS X 0201-1976. One byte only, this is equivalent to
+JIS/Roman (similar to ASCII) plus eight-bit half-width
+Katakana</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>X0201<br />csHalfWidthKatakana</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_Encoding</td>
+ <td>16</td>
+ <td>JIS X 0202-1991. Uses ISO 2022 escape sequences to
+shift code sets as documented in JIS X 0202-1991.</td>
+ <td></td>
+ <td>csJISEncoding</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>Shift_JIS</td>
+ <td>Shift_JIS</td>
+ <td>17</td>
+ <td>This charset is an extension of csHalfWidthKatakana by
+adding graphic characters in JIS X 0208. The CCS's are
+JIS X0201:1997 and JIS X0208:1997. The
+complete definition is shown in Appendix 1 of JIS
+X0208:1997.
+This charset can be used for the top-level media type "text".</td>
+ <td></td>
+ <td>MS_Kanji<br />csShiftJIS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>EUC-JP</td>
+ <td>Extended_UNIX_Code_Packed_Format_for_Japanese</td>
+ <td>18</td>
+ <td>Standardized by OSF, UNIX International, and UNIX Systems
+Laboratories Pacific. Uses ISO 2022 rules to select
+code set 0: US-ASCII (a single 7-bit byte set)
+code set 1: JIS X0208-1990 (a double 8-bit byte set)
+restricted to A0-FF in both bytes
+code set 2: Half Width Katakana (a single 7-bit byte set)
+requiring SS2 as the character prefix
+code set 3: JIS X0212-1990 (a double 7-bit byte set)
+restricted to A0-FF in both bytes
+requiring SS3 as the character prefix</td>
+ <td></td>
+ <td>csEUCPkdFmtJapanese<br />EUC-JP</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Extended_UNIX_Code_Fixed_Width_for_Japanese</td>
+ <td>19</td>
+ <td>Used in Japan. Each character is 2 octets.
+code set 0: US-ASCII (a single 7-bit byte set)
+1st byte = 00
+2nd byte = 20-7E
+code set 1: JIS X0208-1990 (a double 7-bit byte set)
+restricted to A0-FF in both bytes
+code set 2: Half Width Katakana (a single 7-bit byte set)
+1st byte = 00
+2nd byte = A0-FF
+code set 3: JIS X0212-1990 (a double 7-bit byte set)
+restricted to A0-FF in
+the first byte
+and 21-7E in the second byte</td>
+ <td></td>
+ <td>csEUCFixWidJapanese</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>BS_4730</td>
+ <td>20</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-4<br />ISO646-GB<br />gb<br />uk<br />csISO4UnitedKingdom</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>SEN_850200_C</td>
+ <td>21</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-11<br />ISO646-SE2<br />se2<br />csISO11SwedishForNames</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IT</td>
+ <td>22</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-15<br />ISO646-IT<br />csISO15Italian</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ES</td>
+ <td>23</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-17<br />ISO646-ES<br />csISO17Spanish</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>DIN_66003</td>
+ <td>24</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-21<br />de<br />ISO646-DE<br />csISO21German</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NS_4551-1</td>
+ <td>25</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-60<br />ISO646-NO<br />no<br />csISO60DanishNorwegian<br />csISO60Norwegian1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NF_Z_62-010</td>
+ <td>26</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-69<br />ISO646-FR<br />fr<br />csISO69French</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-UTF-1</td>
+ <td>27</td>
+ <td>Universal Transfer Format (1), this is the multibyte
+encoding, that subsets ASCII-7. It does not have byte
+ordering issues.</td>
+ <td></td>
+ <td>csISO10646UTF1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_646.basic:1983</td>
+ <td>28</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>ref<br />csISO646basic1983</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>INVARIANT</td>
+ <td>29</td>
+ <td></td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csINVARIANT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_646.irv:1983</td>
+ <td>30</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-2<br />irv<br />csISO2IntlRefVersion</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NATS-SEFI</td>
+ <td>31</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-8-1<br />csNATSSEFI</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NATS-SEFI-ADD</td>
+ <td>32</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-8-2<br />csNATSSEFIADD</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NATS-DANO</td>
+ <td>33</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-9-1<br />csNATSDANO</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NATS-DANO-ADD</td>
+ <td>34</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-9-2<br />csNATSDANOADD</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>SEN_850200_B</td>
+ <td>35</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-10<br />FI<br />ISO646-FI<br />ISO646-SE<br />se<br />csISO10Swedish</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>KS_C_5601-1987</td>
+ <td>36</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-149<br />KS_C_5601-1989<br />KSC_5601<br />korean<br />csKSC56011987</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-2022-KR</td>
+ <td>ISO-2022-KR</td>
+ <td>37</td>
+ <td>[<a href="http://www.iana.org/go/rfc1557">RFC1557</a>] (see also KS_C_5601-1987)</td>
+ <td>[<a href="http://www.iana.org/go/rfc1557">RFC1557</a>][<a href="#Woohyong_Choi">Woohyong_Choi</a>]</td>
+ <td>csISO2022KR</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>EUC-KR</td>
+ <td>EUC-KR</td>
+ <td>38</td>
+ <td>[<a href="http://www.iana.org/go/rfc1557">RFC1557</a>] (see also KS_C_5861-1992)</td>
+ <td>[<a href="http://www.iana.org/go/rfc1557">RFC1557</a>][<a href="#Woohyong_Choi">Woohyong_Choi</a>]</td>
+ <td>csEUCKR</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-2022-JP</td>
+ <td>ISO-2022-JP</td>
+ <td>39</td>
+ <td>[<a href="http://www.iana.org/go/rfc1468">RFC1468</a>] (see also [<a href="http://www.iana.org/go/rfc2237">RFC2237</a>])</td>
+ <td>[<a href="http://www.iana.org/go/rfc1468">RFC1468</a>][<a href="#Jun_Murai">Jun_Murai</a>]</td>
+ <td>csISO2022JP</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-2022-JP-2</td>
+ <td>ISO-2022-JP-2</td>
+ <td>40</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1554">RFC1554</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1554">RFC1554</a>][<a href="#Masataka_Ohta">Masataka_Ohta</a>]</td>
+ <td>csISO2022JP2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6220-1969-jp</td>
+ <td>41</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>JIS_C6220-1969<br />iso-ir-13<br />katakana<br />x0201-7<br />csISO13JISC6220jp</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6220-1969-ro</td>
+ <td>42</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-14<br />jp<br />ISO646-JP<br />csISO14JISC6220ro</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>PT</td>
+ <td>43</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-16<br />ISO646-PT<br />csISO16Portuguese</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>greek7-old</td>
+ <td>44</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-18<br />csISO18Greek7Old</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>latin-greek</td>
+ <td>45</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-19<br />csISO19LatinGreek</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NF_Z_62-010_(1973)</td>
+ <td>46</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-25<br />ISO646-FR1<br />csISO25French</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Latin-greek-1</td>
+ <td>47</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-27<br />csISO27LatinGreek1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_5427</td>
+ <td>48</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-37<br />csISO5427Cyrillic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6226-1978</td>
+ <td>49</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-42<br />csISO42JISC62261978</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>BS_viewdata</td>
+ <td>50</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-47<br />csISO47BSViewdata</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>INIS</td>
+ <td>51</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-49<br />csISO49INIS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>INIS-8</td>
+ <td>52</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-50<br />csISO50INIS8</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>INIS-cyrillic</td>
+ <td>53</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-51<br />csISO51INISCyrillic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_5427:1981</td>
+ <td>54</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-54<br />ISO5427Cyrillic1981<br />csISO54271981</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_5428:1980</td>
+ <td>55</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-55<br />csISO5428Greek</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>GB_1988-80</td>
+ <td>56</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-57<br />cn<br />ISO646-CN<br />csISO57GB1988</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>GB_2312-80</td>
+ <td>57</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-58<br />chinese<br />csISO58GB231280</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NS_4551-2</td>
+ <td>58</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>ISO646-NO2<br />iso-ir-61<br />no2<br />csISO61Norwegian2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>videotex-suppl</td>
+ <td>59</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-70<br />csISO70VideotexSupp1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>PT2</td>
+ <td>60</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-84<br />ISO646-PT2<br />csISO84Portuguese2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ES2</td>
+ <td>61</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-85<br />ISO646-ES2<br />csISO85Spanish2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>MSZ_7795.3</td>
+ <td>62</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-86<br />ISO646-HU<br />hu<br />csISO86Hungarian</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6226-1983</td>
+ <td>63</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-87<br />x0208<br />JIS_X0208-1983<br />csISO87JISX0208</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>greek7</td>
+ <td>64</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-88<br />csISO88Greek7</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ASMO_449</td>
+ <td>65</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>ISO_9036<br />arabic7<br />iso-ir-89<br />csISO89ASMO449</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>iso-ir-90</td>
+ <td>66</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csISO90</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-a</td>
+ <td>67</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-91<br />jp-ocr-a<br />csISO91JISC62291984a</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-b</td>
+ <td>68</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-92<br />ISO646-JP-OCR-B<br />jp-ocr-b<br />csISO92JISC62991984b</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-b-add</td>
+ <td>69</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-93<br />jp-ocr-b-add<br />csISO93JIS62291984badd</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-hand</td>
+ <td>70</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-94<br />jp-ocr-hand<br />csISO94JIS62291984hand</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-hand-add</td>
+ <td>71</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-95<br />jp-ocr-hand-add<br />csISO95JIS62291984handadd</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_C6229-1984-kana</td>
+ <td>72</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-96<br />csISO96JISC62291984kana</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_2033-1983</td>
+ <td>73</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-98<br />e13b<br />csISO2033</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ANSI_X3.110-1983</td>
+ <td>74</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-99<br />CSA_T500-1983<br />NAPLPS<br />csISO99NAPLPS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>T.61-7bit</td>
+ <td>75</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-102<br />csISO102T617bit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>T.61-8bit</td>
+ <td>76</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>T.61<br />iso-ir-103<br />csISO103T618bit</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ECMA-cyrillic</td>
+ <td>77</td>
+ <td>[<a href="http://www.itscj.ipsj.or.jp/ISO-IR/111.pdf">ISO registry</a>]
+ (formerly [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ECMA
+ registry</a>])</td>
+ <td></td>
+ <td>iso-ir-111<br />KOI8-E<br />csISO111ECMACyrillic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CSA_Z243.4-1985-1</td>
+ <td>78</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-121<br />ISO646-CA<br />csa7-1<br />csa71<br />ca<br />csISO121Canadian1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CSA_Z243.4-1985-2</td>
+ <td>79</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-122<br />ISO646-CA2<br />csa7-2<br />csa72<br />csISO122Canadian2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CSA_Z243.4-1985-gr</td>
+ <td>80</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-123<br />csISO123CSAZ24341985gr</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-6-E</td>
+ <td>ISO_8859-6-E</td>
+ <td>81</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1556">RFC1556</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1556">RFC1556</a>][<a href="#IANA">IANA</a>]</td>
+ <td>csISO88596E<br />ISO-8859-6-E</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-6-I</td>
+ <td>ISO_8859-6-I</td>
+ <td>82</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1556">RFC1556</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1556">RFC1556</a>][<a href="#IANA">IANA</a>]</td>
+ <td>csISO88596I<br />ISO-8859-6-I</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>T.101-G2</td>
+ <td>83</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-128<br />csISO128T101G2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-8-E</td>
+ <td>ISO_8859-8-E</td>
+ <td>84</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1556">RFC1556</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1556">RFC1556</a>][<a href="#Hank_Nussbacher">Hank_Nussbacher</a>]</td>
+ <td>csISO88598E<br />ISO-8859-8-E</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>ISO-8859-8-I</td>
+ <td>ISO_8859-8-I</td>
+ <td>85</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1556">RFC1556</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1556">RFC1556</a>][<a href="#Hank_Nussbacher">Hank_Nussbacher</a>]</td>
+ <td>csISO88598I<br />ISO-8859-8-I</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CSN_369103</td>
+ <td>86</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-139<br />csISO139CSN369103</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JUS_I.B1.002</td>
+ <td>87</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-141<br />ISO646-YU<br />js<br />yu<br />csISO141JUSIB1002</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IEC_P27-1</td>
+ <td>88</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-143<br />csISO143IECP271</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JUS_I.B1.003-serb</td>
+ <td>89</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-146<br />serbian<br />csISO146Serbian</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JUS_I.B1.003-mac</td>
+ <td>90</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>macedonian<br />iso-ir-147<br />csISO147Macedonian</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>greek-ccitt</td>
+ <td>91</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-150<br />csISO150<br />csISO150GreekCCITT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>NC_NC00-10:81</td>
+ <td>92</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cuba<br />iso-ir-151<br />ISO646-CU<br />csISO151Cuba</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_6937-2-25</td>
+ <td>93</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-152<br />csISO6937Add</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>GOST_19768-74</td>
+ <td>94</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>ST_SEV_358-88<br />iso-ir-153<br />csISO153GOST1976874</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_8859-supp</td>
+ <td>95</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-154<br />latin1-2-5<br />csISO8859Supp</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO_10367-box</td>
+ <td>96</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>iso-ir-155<br />csISO10367Box</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>latin-lap</td>
+ <td>97</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>lap<br />iso-ir-158<br />csISO158Lap</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>JIS_X0212-1990</td>
+ <td>98</td>
+ <td>
+ [<a href="http://www.itscj.ipsj.or.jp/ISO-IR/">ISO-IR: International Register of Escape Sequences</a>]<br />
+ Note: The current registration authority is IPSJ/ITSCJ, Japan.
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>x0212<br />iso-ir-159<br />csISO159JISX02121990</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>DS_2089</td>
+ <td>99</td>
+ <td>Danish Standard, DS 2089, February 1974</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>DS2089<br />ISO646-DK<br />dk<br />csISO646Danish</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>us-dk</td>
+ <td>100</td>
+ <td></td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csUSDK</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>dk-us</td>
+ <td>101</td>
+ <td></td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csDKUS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>KSC5636</td>
+ <td>102</td>
+ <td></td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>ISO646-KR<br />csKSC5636</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UNICODE-1-1-UTF-7</td>
+ <td>103</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1642">RFC1642</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1642">RFC1642</a>]</td>
+ <td>csUnicode11UTF7</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-2022-CN</td>
+ <td>104</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1922">RFC1922</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1922">RFC1922</a>]</td>
+ <td>csISO2022CN</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-2022-CN-EXT</td>
+ <td>105</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1922">RFC1922</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1922">RFC1922</a>]</td>
+ <td>csISO2022CNEXT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-8</td>
+ <td>106</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc3629">RFC3629</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc3629">RFC3629</a>]</td>
+ <td>csUTF8</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-13</td>
+ <td>109</td>
+ <td>ISO See [<a href="http://www.iana.org/assignments/charset-reg/ISO-8859-13">http://www.iana.org/assignments/charset-reg/ISO-8859-13</a>][<a href="#Vladas_Tumasonis">Vladas_Tumasonis</a>]</td>
+ <td></td>
+ <td>csISO885913</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-14</td>
+ <td>110</td>
+ <td>ISO See [<a href="http://www.iana.org/assignments/charset-reg/ISO-8859-14">http://www.iana.org/assignments/charset-reg/ISO-8859-14</a>] [<a href="#Keld_Simonsen_2">Keld_Simonsen_2</a>]</td>
+ <td></td>
+ <td>iso-ir-199<br />ISO_8859-14:1998<br />ISO_8859-14<br />latin8<br />iso-celtic<br />l8<br />csISO885914</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-15</td>
+ <td>111</td>
+ <td>ISO
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/ISO-8859-15">http://www.iana.org/assignments/charset-reg/ISO-8859-15</a>]</td>
+ <td></td>
+ <td>ISO_8859-15<br />Latin-9<br />csISO885915</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-16</td>
+ <td>112</td>
+ <td>ISO</td>
+ <td></td>
+ <td>iso-ir-226<br />ISO_8859-16:2001<br />ISO_8859-16<br />latin10<br />l10<br />csISO885916</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>GBK</td>
+ <td>113</td>
+ <td>Chinese IT Standardization Technical Committee
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/GBK">http://www.iana.org/assignments/charset-reg/GBK</a>]</td>
+ <td></td>
+ <td>CP936<br />MS936<br />windows-936<br />csGBK</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>GB18030</td>
+ <td>114</td>
+ <td>Chinese IT Standardization Technical Committee
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/GB18030">http://www.iana.org/assignments/charset-reg/GB18030</a>]</td>
+ <td></td>
+ <td>csGB18030</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>OSD_EBCDIC_DF04_15</td>
+ <td>115</td>
+ <td>Fujitsu-Siemens standard mainframe EBCDIC encoding
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15">http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15</a>]</td>
+ <td></td>
+ <td>csOSDEBCDICDF0415</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>OSD_EBCDIC_DF03_IRV</td>
+ <td>116</td>
+ <td>Fujitsu-Siemens standard mainframe EBCDIC encoding
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV">http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV</a>]</td>
+ <td></td>
+ <td>csOSDEBCDICDF03IRV</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>OSD_EBCDIC_DF04_1</td>
+ <td>117</td>
+ <td>Fujitsu-Siemens standard mainframe EBCDIC encoding
+Please see: [<a href="http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1">http://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1</a>]</td>
+ <td></td>
+ <td>csOSDEBCDICDF041</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-11548-1</td>
+ <td>118</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/ISO-11548-1">http://www.iana.org/assignments/charset-reg/ISO-11548-1</a>] [<a href="#Samuel_Thibault">Samuel_Thibault</a>]</td>
+ <td></td>
+ <td>ISO_11548-1<br />ISO_TR_11548-1<br />csISO115481</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>KZ-1048</td>
+ <td>119</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/KZ-1048">http://www.iana.org/assignments/charset-reg/KZ-1048</a>] [<a href="#Sairan_M_Kikkarin">Sairan_M_Kikkarin</a>][<a href="#Alexei_Veremeev">Alexei_Veremeev</a>]</td>
+ <td></td>
+ <td>STRK1048-2002<br />RK1048<br />csKZ1048</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-UCS-2</td>
+ <td>1000</td>
+ <td>the 2-octet Basic Multilingual Plane, aka Unicode
+this needs to specify network byte order: the standard
+does not specify (it is a 16-bit integer space)</td>
+ <td></td>
+ <td>csUnicode</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-UCS-4</td>
+ <td>1001</td>
+ <td>the full code space. (same comment about byte order,
+these are 31-bit numbers.</td>
+ <td></td>
+ <td>csUCS4</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-UCS-Basic</td>
+ <td>1002</td>
+ <td>ASCII subset of Unicode. Basic Latin = collection 1
+See ISO 10646, Appendix A</td>
+ <td></td>
+ <td>csUnicodeASCII</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-Unicode-Latin1</td>
+ <td>1003</td>
+ <td>ISO Latin-1 subset of Unicode. Basic Latin and Latin-1
+Supplement = collections 1 and 2. See ISO 10646,
+Appendix A. See [<a href="http://www.iana.org/go/rfc1815">RFC1815</a>].</td>
+ <td></td>
+ <td>csUnicodeLatin1<br />ISO-10646</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-10646-J-1</td>
+ <td>1004</td>
+ <td>ISO 10646 Japanese, see [<a href="http://www.iana.org/go/rfc1815">RFC1815</a>].</td>
+ <td></td>
+ <td>csUnicodeJapanese</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-Unicode-IBM-1261</td>
+ <td>1005</td>
+ <td>IBM Latin-2, -3, -5, Extended Presentation Set, GCSGID: 1261</td>
+ <td></td>
+ <td>csUnicodeIBM1261</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-Unicode-IBM-1268</td>
+ <td>1006</td>
+ <td>IBM Latin-4 Extended Presentation Set, GCSGID: 1268</td>
+ <td></td>
+ <td>csUnicodeIBM1268</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-Unicode-IBM-1276</td>
+ <td>1007</td>
+ <td>IBM Cyrillic Greek Extended Presentation Set, GCSGID: 1276</td>
+ <td></td>
+ <td>csUnicodeIBM1276</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-Unicode-IBM-1264</td>
+ <td>1008</td>
+ <td>IBM Arabic Presentation Set, GCSGID: 1264</td>
+ <td></td>
+ <td>csUnicodeIBM1264</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-Unicode-IBM-1265</td>
+ <td>1009</td>
+ <td>IBM Hebrew Presentation Set, GCSGID: 1265</td>
+ <td></td>
+ <td>csUnicodeIBM1265</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UNICODE-1-1</td>
+ <td>1010</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1641">RFC1641</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1641">RFC1641</a>]</td>
+ <td>csUnicode11</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>SCSU</td>
+ <td>1011</td>
+ <td>SCSU See [<a href="http://www.iana.org/assignments/charset-reg/SCSU">http://www.iana.org/assignments/charset-reg/SCSU</a>] [<a href="#Markus_Scherer">Markus_Scherer</a>]</td>
+ <td></td>
+ <td>csSCSU</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-7</td>
+ <td>1012</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc2152">RFC2152</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc2152">RFC2152</a>]</td>
+ <td>csUTF7</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-16BE</td>
+ <td>1013</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]</td>
+ <td>csUTF16BE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-16LE</td>
+ <td>1014</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]</td>
+ <td>csUTF16LE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-16</td>
+ <td>1015</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc2781">RFC2781</a>]</td>
+ <td>csUTF16</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CESU-8</td>
+ <td>1016</td>
+ <td>
+ [<a href="http://www.unicode.org/unicode/reports/tr26">http://www.unicode.org/unicode/reports/tr26</a>]
+ </td>
+ <td>[<a href="#Toby_Phipps">Toby_Phipps</a>]</td>
+ <td>csCESU8<br />csCESU-8</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-32</td>
+ <td>1017</td>
+ <td>
+ [<a href="http://www.unicode.org/unicode/reports/tr19/">http://www.unicode.org/unicode/reports/tr19/</a>]
+ </td>
+ <td>[<a href="#Mark_Davis">Mark_Davis</a>]</td>
+ <td>csUTF32</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-32BE</td>
+ <td>1018</td>
+ <td>
+ [<a href="http://www.unicode.org/unicode/reports/tr19/">http://www.unicode.org/unicode/reports/tr19/</a>]
+ </td>
+ <td>[<a href="#Mark_Davis">Mark_Davis</a>]</td>
+ <td>csUTF32BE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UTF-32LE</td>
+ <td>1019</td>
+ <td>
+ [<a href="http://www.unicode.org/unicode/reports/tr19/">http://www.unicode.org/unicode/reports/tr19/</a>]
+ </td>
+ <td>[<a href="#Mark_Davis">Mark_Davis</a>]</td>
+ <td>csUTF32LE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>BOCU-1</td>
+ <td>1020</td>
+ <td>
+ [<a href="http://www.unicode.org/notes/tn6/">http://www.unicode.org/notes/tn6/</a>]
+ </td>
+ <td>[<a href="#Markus_Scherer">Markus_Scherer</a>]</td>
+ <td>csBOCU1<br />csBOCU-1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-1-Windows-3.0-Latin-1</td>
+ <td>2000</td>
+ <td>Extended ISO 8859-1 Latin-1 for Windows 3.0.
+PCL Symbol Set id: 9U</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csWindows30Latin1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-1-Windows-3.1-Latin-1</td>
+ <td>2001</td>
+ <td>Extended ISO 8859-1 Latin-1 for Windows 3.1.
+PCL Symbol Set id: 19U</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csWindows31Latin1</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-2-Windows-Latin-2</td>
+ <td>2002</td>
+ <td>Extended ISO 8859-2. Latin-2 for Windows 3.1.
+PCL Symbol Set id: 9E</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csWindows31Latin2</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>ISO-8859-9-Windows-Latin-5</td>
+ <td>2003</td>
+ <td>Extended ISO 8859-9. Latin-5 for Windows 3.1
+PCL Symbol Set id: 5T</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csWindows31Latin5</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>hp-roman8</td>
+ <td>2004</td>
+ <td>LaserJet IIP Printer User's Manual,
+HP part no 33471-90901, Hewlet-Packard, June 1989.</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.][<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>roman8<br />r8<br />csHPRoman8</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Adobe-Standard-Encoding</td>
+ <td>2005</td>
+ <td>PostScript Language Reference Manual
+PCL Symbol Set id: 10J</td>
+ <td>[Adobe Systems Incorporated, PostScript Language Reference
+Manual, second edition, Addison-Wesley Publishing Company,
+Inc., 1990.]</td>
+ <td>csAdobeStandardEncoding</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Ventura-US</td>
+ <td>2006</td>
+ <td>Ventura US. ASCII plus characters typically used in
+publishing, like pilcrow, copyright, registered, trade mark,
+section, dagger, and double dagger in the range A0 (hex)
+to FF (hex).
+PCL Symbol Set id: 14J</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csVenturaUS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Ventura-International</td>
+ <td>2007</td>
+ <td>Ventura International. ASCII plus coded characters similar
+to Roman8.
+PCL Symbol Set id: 13J</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csVenturaInternational</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>DEC-MCS</td>
+ <td>2008</td>
+ <td>VAX/VMS User's Manual,
+Order Number: AI-Y517A-TE, April 1986.</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>dec<br />csDECMCS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM850</td>
+ <td>2009</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp850<br />850<br />csPC850Multilingual</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>PC8-Danish-Norwegian</td>
+ <td>2012</td>
+ <td>PC Danish Norwegian
+8-bit PC set for Danish Norwegian
+PCL Symbol Set id: 11U</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csPC8DanishNorwegian</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM862</td>
+ <td>2013</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp862<br />862<br />csPC862LatinHebrew</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>PC8-Turkish</td>
+ <td>2014</td>
+ <td>PC Latin Turkish. PCL Symbol Set id: 9T</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csPC8Turkish</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM-Symbols</td>
+ <td>2015</td>
+ <td>Presentation Set, CPGID: 259</td>
+ <td>[IBM Corporation, "ABOUT TYPE: IBM's Technical Reference
+for Core Interchange Digitized Type", Publication number
+S544-3708-01]</td>
+ <td>csIBMSymbols</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM-Thai</td>
+ <td>2016</td>
+ <td>Presentation Set, CPGID: 838</td>
+ <td>[IBM Corporation, "ABOUT TYPE: IBM's Technical Reference
+for Core Interchange Digitized Type", Publication number
+S544-3708-01]</td>
+ <td>csIBMThai</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>HP-Legal</td>
+ <td>2017</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 1U</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csHPLegal</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>HP-Pi-font</td>
+ <td>2018</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 15U</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csHPPiFont</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>HP-Math8</td>
+ <td>2019</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 8M</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csHPMath8</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Adobe-Symbol-Encoding</td>
+ <td>2020</td>
+ <td>PostScript Language Reference Manual
+PCL Symbol Set id: 5M</td>
+ <td>[Adobe Systems Incorporated, PostScript Language Reference
+Manual, second edition, Addison-Wesley Publishing Company,
+Inc., 1990.]</td>
+ <td>csHPPSMath</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>HP-DeskTop</td>
+ <td>2021</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 7J</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csHPDesktop</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Ventura-Math</td>
+ <td>2022</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 6M</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csVenturaMath</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Microsoft-Publishing</td>
+ <td>2023</td>
+ <td>PCL 5 Comparison Guide, Hewlett-Packard,
+HP part number 5961-0510, October 1992
+PCL Symbol Set id: 6J</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>csMicrosoftPublishing</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Windows-31J</td>
+ <td>2024</td>
+ <td>Windows Japanese. A further extension of Shift_JIS
+to include NEC special characters (Row 13), NEC
+selection of IBM extensions (Rows 89 to 92), and IBM
+extensions (Rows 115 to 119). The CCS's are
+JIS X0201:1997, JIS X0208:1997, and these extensions.
+This charset can be used for the top-level media type "text",
+but it is of limited or specialized use (see [<a href="http://www.iana.org/go/rfc2278">RFC2278</a>]).
+PCL Symbol Set id: 19K</td>
+ <td></td>
+ <td>csWindows31J</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>GB2312</td>
+ <td>GB2312</td>
+ <td>2025</td>
+ <td>Chinese for People's Republic of China (PRC) mixed one byte,
+two byte set:
+20-7E = one byte ASCII
+A1-FE = two byte PRC Kanji
+See GB 2312-80
+PCL Symbol Set Id: 18C</td>
+ <td></td>
+ <td>csGB2312</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>Big5</td>
+ <td>Big5</td>
+ <td>2026</td>
+ <td>Chinese for Taiwan Multi-byte set.
+PCL Symbol Set Id: 18T</td>
+ <td></td>
+ <td>csBig5</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>macintosh</td>
+ <td>2027</td>
+ <td>The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>mac<br />csMacintosh</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM037</td>
+ <td>2028</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp037<br />ebcdic-cp-us<br />ebcdic-cp-ca<br />ebcdic-cp-wt<br />ebcdic-cp-nl<br />csIBM037</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM038</td>
+ <td>2029</td>
+ <td>IBM 3174 Character Set Ref, GA27-3831-02, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>EBCDIC-INT<br />cp038<br />csIBM038</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM273</td>
+ <td>2030</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP273<br />csIBM273</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM274</td>
+ <td>2031</td>
+ <td>IBM 3174 Character Set Ref, GA27-3831-02, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>EBCDIC-BE<br />CP274<br />csIBM274</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM275</td>
+ <td>2032</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>EBCDIC-BR<br />cp275<br />csIBM275</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM277</td>
+ <td>2033</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>EBCDIC-CP-DK<br />EBCDIC-CP-NO<br />csIBM277</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM278</td>
+ <td>2034</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP278<br />ebcdic-cp-fi<br />ebcdic-cp-se<br />csIBM278</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM280</td>
+ <td>2035</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP280<br />ebcdic-cp-it<br />csIBM280</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM281</td>
+ <td>2036</td>
+ <td>IBM 3174 Character Set Ref, GA27-3831-02, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>EBCDIC-JP-E<br />cp281<br />csIBM281</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM284</td>
+ <td>2037</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP284<br />ebcdic-cp-es<br />csIBM284</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM285</td>
+ <td>2038</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP285<br />ebcdic-cp-gb<br />csIBM285</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM290</td>
+ <td>2039</td>
+ <td>IBM 3174 Character Set Ref, GA27-3831-02, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp290<br />EBCDIC-JP-kana<br />csIBM290</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM297</td>
+ <td>2040</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp297<br />ebcdic-cp-fr<br />csIBM297</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM420</td>
+ <td>2041</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990,
+IBM NLS RM p 11-11</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp420<br />ebcdic-cp-ar1<br />csIBM420</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM423</td>
+ <td>2042</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp423<br />ebcdic-cp-gr<br />csIBM423</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM424</td>
+ <td>2043</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp424<br />ebcdic-cp-he<br />csIBM424</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM437</td>
+ <td>2011</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp437<br />437<br />csPC8CodePage437</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM500</td>
+ <td>2044</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP500<br />ebcdic-cp-be<br />ebcdic-cp-ch<br />csIBM500</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM851</td>
+ <td>2045</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp851<br />851<br />csIBM851</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM852</td>
+ <td>2010</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp852<br />852<br />csPCp852</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM855</td>
+ <td>2046</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp855<br />855<br />csIBM855</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM857</td>
+ <td>2047</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp857<br />857<br />csIBM857</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM860</td>
+ <td>2048</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp860<br />860<br />csIBM860</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM861</td>
+ <td>2049</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp861<br />861<br />cp-is<br />csIBM861</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM863</td>
+ <td>2050</td>
+ <td>IBM Keyboard layouts and code pages, PN 07G4586 June 1991</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp863<br />863<br />csIBM863</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM864</td>
+ <td>2051</td>
+ <td>IBM Keyboard layouts and code pages, PN 07G4586 June 1991</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp864<br />csIBM864</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM865</td>
+ <td>2052</td>
+ <td>IBM DOS 3.3 Ref (Abridged), 94X9575 (Feb 1987)</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp865<br />865<br />csIBM865</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM868</td>
+ <td>2053</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP868<br />cp-ar<br />csIBM868</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM869</td>
+ <td>2054</td>
+ <td>IBM Keyboard layouts and code pages, PN 07G4586 June 1991</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp869<br />869<br />cp-gr<br />csIBM869</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM870</td>
+ <td>2055</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP870<br />ebcdic-cp-roece<br />ebcdic-cp-yu<br />csIBM870</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM871</td>
+ <td>2056</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP871<br />ebcdic-cp-is<br />csIBM871</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM880</td>
+ <td>2057</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp880<br />EBCDIC-Cyrillic<br />csIBM880</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM891</td>
+ <td>2058</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp891<br />csIBM891</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM903</td>
+ <td>2059</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp903<br />csIBM903</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM904</td>
+ <td>2060</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>cp904<br />904<br />csIBBM904</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM905</td>
+ <td>2061</td>
+ <td>IBM 3174 Character Set Ref, GA27-3831-02, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP905<br />ebcdic-cp-tr<br />csIBM905</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM918</td>
+ <td>2062</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP918<br />ebcdic-cp-ar2<br />csIBM918</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM1026</td>
+ <td>2063</td>
+ <td>IBM NLS RM Vol2 SE09-8002-01, March 1990</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>CP1026<br />csIBM1026</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-AT-DE</td>
+ <td>2064</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csIBMEBCDICATDE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-AT-DE-A</td>
+ <td>2065</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICATDEA</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-CA-FR</td>
+ <td>2066</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICCAFR</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-DK-NO</td>
+ <td>2067</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICDKNO</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-DK-NO-A</td>
+ <td>2068</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICDKNOA</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-FI-SE</td>
+ <td>2069</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICFISE</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-FI-SE-A</td>
+ <td>2070</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICFISEA</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-FR</td>
+ <td>2071</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICFR</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-IT</td>
+ <td>2072</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICIT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-PT</td>
+ <td>2073</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICPT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-ES</td>
+ <td>2074</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICES</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-ES-A</td>
+ <td>2075</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICESA</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-ES-S</td>
+ <td>2076</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICESS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-UK</td>
+ <td>2077</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICUK</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>EBCDIC-US</td>
+ <td>2078</td>
+ <td>IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csEBCDICUS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>UNKNOWN-8BIT</td>
+ <td>2079</td>
+ <td></td>
+ <td>[<a href="http://www.iana.org/go/rfc1428">RFC1428</a>]</td>
+ <td>csUnknown8BiT</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>MNEMONIC</td>
+ <td>2080</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>], also known as "mnemonic+ascii+38"</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csMnemonic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>MNEM</td>
+ <td>2081</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>], also known as "mnemonic+ascii+8200"</td>
+ <td>[<a href="http://www.iana.org/go/rfc1345">RFC1345</a>][<a href="#Keld_Simonsen">Keld_Simonsen</a>]</td>
+ <td>csMnem</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>VISCII</td>
+ <td>2082</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1456">RFC1456</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1456">RFC1456</a>]</td>
+ <td>csVISCII</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>VIQR</td>
+ <td>2083</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc1456">RFC1456</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc1456">RFC1456</a>]</td>
+ <td>csVIQR</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>KOI8-R</td>
+ <td>KOI8-R</td>
+ <td>2084</td>
+ <td>[<a href="http://www.iana.org/go/rfc1489">RFC1489</a>], based on GOST-19768-74, ISO-6937/8,
+INIS-Cyrillic, ISO-5427.</td>
+ <td>[<a href="http://www.iana.org/go/rfc1489">RFC1489</a>]</td>
+ <td>csKOI8R</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>HZ-GB-2312</td>
+ <td>2085</td>
+ <td>[<a href="http://www.iana.org/go/rfc1842">RFC1842</a>], [<a href="http://www.iana.org/go/rfc1843">RFC1843</a>][<a href="http://www.iana.org/go/rfc1843">RFC1843</a>][<a href="http://www.iana.org/go/rfc1842">RFC1842</a>]</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM866</td>
+ <td>2086</td>
+ <td>IBM NLDG Volume 2 (SE09-8002-03) August 1994</td>
+ <td>[<a href="#Rick_Pond">Rick_Pond</a>]</td>
+ <td>cp866<br />866<br />csIBM866</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM775</td>
+ <td>2087</td>
+ <td>HP PCL 5 Comparison Guide (P/N 5021-0329) pp B-13, 1996</td>
+ <td>[Hewlett-Packard Company, "HP PCL 5 Comparison Guide",
+(P/N 5021-0329) pp B-13, 1996.]</td>
+ <td>cp775<br />csPC775Baltic</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>KOI8-U</td>
+ <td>2088</td>
+ <td>
+ [<a href="http://www.iana.org/go/rfc2319">RFC2319</a>]
+ </td>
+ <td>[<a href="http://www.iana.org/go/rfc2319">RFC2319</a>]</td>
+ <td>csKOI8U</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM00858</td>
+ <td>2089</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM00858">http://www.iana.org/assignments/charset-reg/IBM00858</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID00858<br />CP00858<br />PC-Multilingual-850+euro<br />csIBM00858</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM00924</td>
+ <td>2090</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM00924">http://www.iana.org/assignments/charset-reg/IBM00924</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID00924<br />CP00924<br />ebcdic-Latin9--euro<br />csIBM00924</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01140</td>
+ <td>2091</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01140">http://www.iana.org/assignments/charset-reg/IBM01140</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01140<br />CP01140<br />ebcdic-us-37+euro<br />csIBM01140</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01141</td>
+ <td>2092</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01141">http://www.iana.org/assignments/charset-reg/IBM01141</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01141<br />CP01141<br />ebcdic-de-273+euro<br />csIBM01141</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01142</td>
+ <td>2093</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01142">http://www.iana.org/assignments/charset-reg/IBM01142</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01142<br />CP01142<br />ebcdic-dk-277+euro<br />ebcdic-no-277+euro<br />csIBM01142</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01143</td>
+ <td>2094</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01143">http://www.iana.org/assignments/charset-reg/IBM01143</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01143<br />CP01143<br />ebcdic-fi-278+euro<br />ebcdic-se-278+euro<br />csIBM01143</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01144</td>
+ <td>2095</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01144">http://www.iana.org/assignments/charset-reg/IBM01144</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01144<br />CP01144<br />ebcdic-it-280+euro<br />csIBM01144</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01145</td>
+ <td>2096</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01145">http://www.iana.org/assignments/charset-reg/IBM01145</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01145<br />CP01145<br />ebcdic-es-284+euro<br />csIBM01145</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01146</td>
+ <td>2097</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01146">http://www.iana.org/assignments/charset-reg/IBM01146</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01146<br />CP01146<br />ebcdic-gb-285+euro<br />csIBM01146</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01147</td>
+ <td>2098</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01147">http://www.iana.org/assignments/charset-reg/IBM01147</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01147<br />CP01147<br />ebcdic-fr-297+euro<br />csIBM01147</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01148</td>
+ <td>2099</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01148">http://www.iana.org/assignments/charset-reg/IBM01148</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01148<br />CP01148<br />ebcdic-international-500+euro<br />csIBM01148</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM01149</td>
+ <td>2100</td>
+ <td>IBM See [<a href="http://www.iana.org/assignments/charset-reg/IBM01149">http://www.iana.org/assignments/charset-reg/IBM01149</a>] [<a href="#Tamer_Mahdi">Tamer_Mahdi</a>]</td>
+ <td></td>
+ <td>CCSID01149<br />CP01149<br />ebcdic-is-871+euro<br />csIBM01149</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Big5-HKSCS</td>
+ <td>2101</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/Big5-HKSCS">http://www.iana.org/assignments/charset-reg/Big5-HKSCS</a>]</td>
+ <td>[<a href="#Nicky_Yick">Nicky_Yick</a>]</td>
+ <td>csBig5HKSCS</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>IBM1047</td>
+ <td>2102</td>
+ <td>IBM1047 (EBCDIC Latin 1/Open Systems)
+[<a href="http://www-1.ibm.com/servers/eserver/iseries/software/globalization/pdf/cp01047z.pdf">http://www-1.ibm.com/servers/eserver/iseries/software/globalization/pdf/cp01047z.pdf</a>]</td>
+ <td>[<a href="#Reuel_Robrigado">Reuel_Robrigado</a>]</td>
+ <td>IBM-1047<br />csIBM1047</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>PTCP154</td>
+ <td>2103</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/PTCP154">http://www.iana.org/assignments/charset-reg/PTCP154</a>]</td>
+ <td>[<a href="#Alexander_Uskov">Alexander_Uskov</a>]</td>
+ <td>csPTCP154<br />PT154<br />CP154<br />Cyrillic-Asian<br />csPTCP154</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>Amiga-1251</td>
+ <td>2104</td>
+ <td>See [<a href="http://www.amiga.ultranet.ru/Amiga-1251.html">http://www.amiga.ultranet.ru/Amiga-1251.html</a>]</td>
+ <td></td>
+ <td>Ami1251<br />Amiga1251<br />Ami-1251<br />csAmiga1251
+(Aliases are provided for historical reasons and should not be used) [Malyshev]</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>KOI7-switched</td>
+ <td>2105</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/KOI7-switched">http://www.iana.org/assignments/charset-reg/KOI7-switched</a>]</td>
+ <td></td>
+ <td>csKOI7switched</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>BRF</td>
+ <td>2106</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/BRF">http://www.iana.org/assignments/charset-reg/BRF</a>] [<a href="#Samuel_Thibault">Samuel_Thibault</a>]</td>
+ <td></td>
+ <td>csBRF</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>TSCII</td>
+ <td>2107</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/TSCII">http://www.iana.org/assignments/charset-reg/TSCII</a>] [<a href="#Kuppuswamy_Kalyanasu">Kuppuswamy_Kalyanasu</a>]</td>
+ <td></td>
+ <td>csTSCII</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CP51932</td>
+ <td>2108</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/CP51932">http://www.iana.org/assignments/charset-reg/CP51932</a>] [<a href="#Yui_Naruse">Yui_Naruse</a>]</td>
+ <td></td>
+ <td>csCP51932</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-874</td>
+ <td>2109</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/windows-874">http://www.iana.org/assignments/charset-reg/windows-874</a>] [<a href="#Shawn_Steele">Shawn_Steele</a>]</td>
+ <td></td>
+ <td>cswindows874</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1250</td>
+ <td>2250</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1250">http://www.iana.org/assignments/charset-reg/windows-1250</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1250</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1251</td>
+ <td>2251</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1251">http://www.iana.org/assignments/charset-reg/windows-1251</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1251</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1252</td>
+ <td>2252</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1252">http://www.iana.org/assignments/charset-reg/windows-1252</a>] [<a href="#Chris_Wendt">Chris_Wendt</a>]</td>
+ <td></td>
+ <td>cswindows1252</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1253</td>
+ <td>2253</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1253">http://www.iana.org/assignments/charset-reg/windows-1253</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1253</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1254</td>
+ <td>2254</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1254">http://www.iana.org/assignments/charset-reg/windows-1254</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1254</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1255</td>
+ <td>2255</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1255">http://www.iana.org/assignments/charset-reg/windows-1255</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1255</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1256</td>
+ <td>2256</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1256">http://www.iana.org/assignments/charset-reg/windows-1256</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1256</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1257</td>
+ <td>2257</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1257">http://www.iana.org/assignments/charset-reg/windows-1257</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1257</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>windows-1258</td>
+ <td>2258</td>
+ <td>Microsoft [<a href="http://www.iana.org/assignments/charset-reg/windows-1258">http://www.iana.org/assignments/charset-reg/windows-1258</a>] [<a href="#Katya_Lazhintseva">Katya_Lazhintseva</a>]</td>
+ <td></td>
+ <td>cswindows1258</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>TIS-620</td>
+ <td>2259</td>
+ <td>Thai Industrial Standards Institute (TISI) [<a href="#Trin_Tantsetthi">Trin_Tantsetthi</a>]</td>
+ <td></td>
+ <td>csTIS620</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>CP50220</td>
+ <td>2260</td>
+ <td>See [<a href="http://www.iana.org/assignments/charset-reg/CP50220">http://www.iana.org/assignments/charset-reg/CP50220</a>] [<a href="#Yui_Naruse">Yui_Naruse</a>]</td>
+ <td></td>
+ <td>csCP50220</td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+ <h1 class="people">People</h1>
+ <table class="sortable">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>Name</th>
+ <th>Contact URI</th>
+ <th>Last Updated</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a name="Alexander_Uskov" id="Alexander_Uskov">[Alexander_Uskov]</a>
+ </td>
+ <td>Alexander Uskov</td>
+ <td>
+ <a href="mailto:auskov&amp;idc.kz">mailto:auskov&amp;idc.kz</a>
+ </td>
+ <td>2002-09</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Alexei_Veremeev" id="Alexei_Veremeev">[Alexei_Veremeev]</a>
+ </td>
+ <td>Alexei Veremeev</td>
+ <td>
+ <a href="mailto:Alexey.Veremeev&amp;oracle.com">mailto:Alexey.Veremeev&amp;oracle.com</a>
+ </td>
+ <td>2006-12-07</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Chris_Wendt" id="Chris_Wendt">[Chris_Wendt]</a>
+ </td>
+ <td>Chris Wendt</td>
+ <td>
+ <a href="mailto:christw&amp;microsoft.com">mailto:christw&amp;microsoft.com</a>
+ </td>
+ <td>1999-12</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Hank_Nussbacher" id="Hank_Nussbacher">[Hank_Nussbacher]</a>
+ </td>
+ <td>Hank Nussbacher</td>
+ <td>
+ <a href="mailto:hank&amp;vm.tau.ac.il">mailto:hank&amp;vm.tau.ac.il</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ <a name="IANA" id="IANA">[IANA]</a>
+ </td>
+ <td>Internet Assigned Numbers Authority</td>
+ <td>
+ <a href="mailto:iana&amp;iana.org">mailto:iana&amp;iana.org</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Jun_Murai" id="Jun_Murai">[Jun_Murai]</a>
+ </td>
+ <td>Jun Murai</td>
+ <td>
+ <a href="mailto:jun&amp;wide.ad.jp">mailto:jun&amp;wide.ad.jp</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Katya_Lazhintseva" id="Katya_Lazhintseva">[Katya_Lazhintseva]</a>
+ </td>
+ <td>Katya Lazhintseva</td>
+ <td>
+ <a href="mailto:katyal&amp;microsoft.com">mailto:katyal&amp;microsoft.com</a>
+ </td>
+ <td>1996-05</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Keld_Simonsen" id="Keld_Simonsen">[Keld_Simonsen]</a>
+ </td>
+ <td>Keld Simonsen</td>
+ <td>
+ <a href="mailto:Keld.Simonsen&amp;dkuug.dk">mailto:Keld.Simonsen&amp;dkuug.dk</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Keld_Simonsen_2" id="Keld_Simonsen_2">[Keld_Simonsen_2]</a>
+ </td>
+ <td>Keld Simonsen</td>
+ <td>
+ <a href="mailto:Keld.Simonsen&amp;rap.dk">mailto:Keld.Simonsen&amp;rap.dk</a>
+ </td>
+ <td>2000-08</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Kuppuswamy_Kalyanasu" id="Kuppuswamy_Kalyanasu">[Kuppuswamy_Kalyanasu]</a>
+ </td>
+ <td>Kuppuswamy Kalyanasundaram</td>
+ <td>
+ <a href="mailto:kalyan.geo&amp;yahoo.com">mailto:kalyan.geo&amp;yahoo.com</a>
+ </td>
+ <td>2007-05-14</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Mark_Davis" id="Mark_Davis">[Mark_Davis]</a>
+ </td>
+ <td>Mark Davis</td>
+ <td>
+ <a href="mailto:mark&amp;unicode.org">mailto:mark&amp;unicode.org</a>
+ </td>
+ <td>2002-04</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Markus_Scherer" id="Markus_Scherer">[Markus_Scherer]</a>
+ </td>
+ <td>Markus Scherer</td>
+ <td>
+ <a href="mailto:markus.scherer&amp;jtcsv.com">mailto:markus.scherer&amp;jtcsv.com</a>
+ </td>
+ <td>2002-09</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Masataka_Ohta" id="Masataka_Ohta">[Masataka_Ohta]</a>
+ </td>
+ <td>Masataka Ohta</td>
+ <td>
+ <a href="mailto:mohta&amp;cc.titech.ac.jp">mailto:mohta&amp;cc.titech.ac.jp</a>
+ </td>
+ <td>1995-07</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Nicky_Yick" id="Nicky_Yick">[Nicky_Yick]</a>
+ </td>
+ <td>Nicky Yick</td>
+ <td>
+ <a href="mailto:cliac&amp;itsd.gcn.gov.hk">mailto:cliac&amp;itsd.gcn.gov.hk</a>
+ </td>
+ <td>2000-10</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Reuel_Robrigado" id="Reuel_Robrigado">[Reuel_Robrigado]</a>
+ </td>
+ <td>Reuel Robrigado</td>
+ <td>
+ <a href="mailto:reuelr&amp;ca.ibm.com">mailto:reuelr&amp;ca.ibm.com</a>
+ </td>
+ <td>2002-09</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Rick_Pond" id="Rick_Pond">[Rick_Pond]</a>
+ </td>
+ <td>Rick Pond</td>
+ <td>
+ <a href="mailto:rickpond&amp;vnet.ibm.com">mailto:rickpond&amp;vnet.ibm.com</a>
+ </td>
+ <td>1997-03</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Sairan_M_Kikkarin" id="Sairan_M_Kikkarin">[Sairan_M_Kikkarin]</a>
+ </td>
+ <td>Sairan M. Kikkarin</td>
+ <td>
+ <a href="mailto:sairan&amp;sci.kz">mailto:sairan&amp;sci.kz</a>
+ </td>
+ <td>2006-12-07</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Samuel_Thibault" id="Samuel_Thibault">[Samuel_Thibault]</a>
+ </td>
+ <td>Samuel Thibault</td>
+ <td>
+ <a href="mailto:samuel.thibault&amp;ens-lyon.org">mailto:samuel.thibault&amp;ens-lyon.org</a>
+ </td>
+ <td>2006-12-07</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Shawn_Steele" id="Shawn_Steele">[Shawn_Steele]</a>
+ </td>
+ <td>Shawn Steele</td>
+ <td>
+ <a href="mailto:Shawn.Steele&amp;microsoft.com">mailto:Shawn.Steele&amp;microsoft.com</a>
+ </td>
+ <td>2010-11-04</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Tamer_Mahdi" id="Tamer_Mahdi">[Tamer_Mahdi]</a>
+ </td>
+ <td>Tamer Mahdi</td>
+ <td>
+ <a href="mailto:tamer&amp;ca.ibm.com">mailto:tamer&amp;ca.ibm.com</a>
+ </td>
+ <td>2000-08</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Toby_Phipps" id="Toby_Phipps">[Toby_Phipps]</a>
+ </td>
+ <td>Toby Phipps</td>
+ <td>
+ <a href="mailto:tphipps&amp;peoplesoft.com">mailto:tphipps&amp;peoplesoft.com</a>
+ </td>
+ <td>2002-03</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Trin_Tantsetthi" id="Trin_Tantsetthi">[Trin_Tantsetthi]</a>
+ </td>
+ <td>Trin Tantsetthi</td>
+ <td>
+ <a href="mailto:trin&amp;mozart.inet.co.th">mailto:trin&amp;mozart.inet.co.th</a>
+ </td>
+ <td>1998-09</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Vladas_Tumasonis" id="Vladas_Tumasonis">[Vladas_Tumasonis]</a>
+ </td>
+ <td>Vladas Tumasonis</td>
+ <td>
+ <a href="mailto:vladas.tumasonis&amp;maf.vu.lt">mailto:vladas.tumasonis&amp;maf.vu.lt</a>
+ </td>
+ <td>2000-08</td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Woohyong_Choi" id="Woohyong_Choi">[Woohyong_Choi]</a>
+ </td>
+ <td>Woohyong Choi</td>
+ <td>
+ <a href="mailto:whchoi&amp;cosmos.kaist.ac.kr">mailto:whchoi&amp;cosmos.kaist.ac.kr</a>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ <a name="Yui_Naruse" id="Yui_Naruse">[Yui_Naruse]</a>
+ </td>
+ <td>Yui Naruse</td>
+ <td>
+ <a href="mailto:naruse&amp;airemix.jp">mailto:naruse&amp;airemix.jp</a>
+ </td>
+ <td>2011-09-23</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/os400/iconv/ianatables.c b/os400/iconv/ianatables.c
new file mode 100644
index 0000000..44b29c6
--- /dev/null
+++ b/os400/iconv/ianatables.c
@@ -0,0 +1,4609 @@
+/**
+*** Character set names table.
+*** Generated by program BLDCSNDFA from IANA character set assignment file
+*** and CCSID/MIBenum equivalence file.
+*** *** Do not edit by hand ***
+**/
+
+/**
+*** CCSID For arg Recognized name.
+*** 62245 X IBMCCSID62245 ibm-62245
+*** 62235 X IBMCCSID62235 ibm-62235
+*** 62224 X IBMCCSID62224 ibm-62224
+*** 62211 X IBMCCSID62211 ibm-62211
+*** 61952 X IBMCCSID61952 ibm-61952
+*** 57345 IBMCCSID57345 ibm-57345
+*** 33722 X csEUCPkdFmtJapanese
+*** Extended_UNIX_Code_Packed_Format_for_Japanese EUC-JP
+*** iana-18 IBMCCSID33722 ibm-33722
+*** 28709 X IBMCCSID28709 ibm-28709
+*** 25546 IBMCCSID25546 ibm-25546
+*** 17354 X IBMCCSID17354 ibm-17354
+*** 13488 X csUnicode ISO-10646-UCS-2 UCS2 UCS-2 iana-1000
+*** IBMCCSID13488 ibm-13488
+*** 13124 X IBMCCSID13124 ibm-13124
+*** 13121 X IBMCCSID13121 ibm-13121
+*** 12708 X IBMCCSID12708 ibm-12708
+*** 9449 cswindows1257 windows-1257 iana-2257 IBMCCSID09449
+*** ibm-9449
+*** 9448 cswindows1256 windows-1256 iana-2256 IBMCCSID09448
+*** ibm-9448
+*** 9447 cswindows1255 windows-1255 iana-2255 IBMCCSID09447
+*** ibm-9447
+*** 9066 X IBMCCSID09066 ibm-9066
+*** 9056 X IBMCCSID09056 ibm-9056
+*** 9030 X IBMCCSID09030 ibm-9030
+*** 8612 X IBMCCSID08612 ibm-8612
+*** 5478 csISO58GB231280 iso-ir-58 GB_2312-80 chinese iana-57
+*** IBMCCSID05478 ibm-5478
+*** 5123 X IBMCCSID05123 ibm-5123
+*** 5350 X cswindows1254 windows-1254 iana-2254 IBMCCSID05350
+*** ibm-5350
+*** 5349 X cswindows1253 windows-1253 iana-2253 IBMCCSID05349
+*** ibm-5349
+*** 5348 X cswindows1252 windows-1252 iana-2252 IBMCCSID05348
+*** ibm-5348
+*** 5347 X cswindows1251 windows-1251 iana-2251 IBMCCSID05347
+*** ibm-5347
+*** 5346 X cswindows1250 windows-1250 iana-2250 IBMCCSID05346
+*** ibm-5346
+*** 5354 cswindows1258 windows-1258 iana-2258 IBMCCSID05354
+*** ibm-5354
+*** 5055 X IBMCCSID05055 ibm-5055
+*** 5054 X IBMCCSID05054 ibm-5054
+*** 5053 X IBMCCSID05053 ibm-5053
+*** 5052 X IBMCCSID05052 ibm-5052
+*** 5050 X IBMCCSID05050 ibm-5050
+*** 5035 X IBMCCSID05035 ibm-5035
+*** 5026 X IBMCCSID05026 ibm-5026
+*** 4971 X IBMCCSID04971 ibm-4971
+*** 4965 IBMCCSID04965 ibm-4965
+*** 4960 X IBMCCSID04960 ibm-4960
+*** 4953 IBMCCSID04953 ibm-4953
+*** 4952 X IBMCCSID04952 ibm-4952
+*** 4951 X IBMCCSID04951 ibm-4951
+*** 4948 X IBMCCSID04948 ibm-4948
+*** 4396 X IBMCCSID04396 ibm-4396
+*** 1399 X IBMCCSID01399 ibm-1399
+*** 1392 X IBMCCSID01392 ibm-1392
+*** 1388 X IBMCCSID01388 ibm-1388
+*** 1386 X csGBK windows-936 MS936 CP936 GBK iana-113
+*** IBMCCSID01386 ibm-1386
+*** 1383 X csGB2312 GB2312 EUC-CN iana-2025 IBMCCSID01383
+*** ibm-1383
+*** 1381 X IBMCCSID01381 ibm-1381
+*** 1380 X IBMCCSID01380 ibm-1380
+*** 1375 csBig5HKSCS Big5-HKSCS iana-2101 IBMCCSID01375
+*** ibm-1375
+*** 1373 IBMCCSID01373 ibm-1373
+*** 1364 X IBMCCSID01364 ibm-1364
+*** 1363 X csKSC56011987 KSC_5601 KS_C_5601-1989 iso-ir-149
+*** KS_C_5601-1987 korean iana-36 IBMCCSID01363 ibm-1363
+*** 1283 X IBMCCSID01283 ibm-1283
+*** 1282 X IBMCCSID01282 ibm-1282
+*** 1281 X IBMCCSID01281 ibm-1281
+*** 1280 X IBMCCSID01280 ibm-1280
+*** 1276 csAdobeStandardEncoding Adobe-Standard-Encoding
+*** iana-2005 IBMCCSID01276 ibm-1276
+*** 1275 X IBMCCSID01275 ibm-1275
+*** 1258 X IBMCCSID01258 ibm-1258
+*** 1257 X IBMCCSID01257 ibm-1257
+*** 1256 X IBMCCSID01256 ibm-1256
+*** 1255 X IBMCCSID01255 ibm-1255
+*** 1254 X IBMCCSID01254 ibm-1254
+*** 1253 X IBMCCSID01253 ibm-1253
+*** 1252 X csWindows31Latin1 ISO-8859-1-Windows-3.1-Latin-1
+*** iana-2001 IBMCCSID01252 ibm-1252
+*** 1251 X IBMCCSID01251 ibm-1251
+*** 1250 X csWindows31Latin2 ISO-8859-2-Windows-Latin-2 iana-2002
+*** IBMCCSID01250 ibm-1250
+*** 1235 csUTF32LE UTF-32LE UTF-32-LE UTF32LE UTF32-LE
+*** iana-1019 IBMCCSID01235 ibm-1235
+*** 1233 csUTF32BE UTF-32BE UTF-32-BE UTF32BE UTF32-BE
+*** iana-1018 IBMCCSID01233 ibm-1233
+*** 1208 X csUTF8 UTF-8 UTF8 iana-106 IBMCCSID01208 ibm-1208
+*** 1203 csUTF16LE UTF-16LE UTF-16-LE UTF16LE UTF16-LE
+*** iana-1014 IBMCCSID01203 ibm-1203
+*** 1201 csUTF16BE UTF-16BE UTF-16-BE UTF16BE UTF16-BE
+*** iana-1013 IBMCCSID01201 ibm-1201
+*** 1164 X IBMCCSID01164 ibm-1164
+*** 1160 X IBMCCSID01160 ibm-1160
+*** 1158 X IBMCCSID01158 ibm-1158
+*** 1157 X IBMCCSID01157 ibm-1157
+*** 1156 X IBMCCSID01156 ibm-1156
+*** 1155 X IBMCCSID01155 ibm-1155
+*** 1154 X IBMCCSID01154 ibm-1154
+*** 1153 X IBMCCSID01153 ibm-1153
+*** 1149 X csIBM01149 ebcdic-is-871+euro CP01149 CCSID01149
+*** IBM01149 iana-2100 IBMCCSID01149 ibm-1149
+*** 1148 X csIBM01148 ebcdic-international-500+euro CP01148
+*** CCSID01148 IBM01148 iana-2099 IBMCCSID01148 ibm-1148
+*** 1147 X csIBM01147 ebcdic-fr-297+euro CP01147 CCSID01147
+*** IBM01147 iana-2098 IBMCCSID01147 ibm-1147
+*** 1146 X csIBM01146 ebcdic-gb-285+euro CP01146 CCSID01146
+*** IBM01146 iana-2097 IBMCCSID01146 ibm-1146
+*** 1145 X csIBM01145 ebcdic-es-284+euro CP01145 CCSID01145
+*** IBM01145 iana-2096 IBMCCSID01145 ibm-1145
+*** 1144 X csIBM01144 ebcdic-it-280+euro CP01144 CCSID01144
+*** IBM01144 iana-2095 IBMCCSID01144 ibm-1144
+*** 1143 X csIBM01143 ebcdic-se-278+euro ebcdic-fi-278+euro
+*** CP01143 CCSID01143 IBM01143 iana-2094 IBMCCSID01143
+*** ibm-1143
+*** 1142 X csIBM01142 ebcdic-no-277+euro ebcdic-dk-277+euro
+*** CP01142 CCSID01142 IBM01142 iana-2093 IBMCCSID01142
+*** ibm-1142
+*** 1141 X csIBM01141 ebcdic-de-273+euro CP01141 CCSID01141
+*** IBM01141 iana-2092 IBMCCSID01141 ibm-1141
+*** 1140 X csIBM01140 ebcdic-us-37+euro CP01140 CCSID01140
+*** IBM01140 iana-2091 IBMCCSID01140 ibm-1140
+*** 1137 X IBMCCSID01137 ibm-1137
+*** 1133 IBMCCSID01133 ibm-1133
+*** 1132 X IBMCCSID01132 ibm-1132
+*** 1130 X IBMCCSID01130 ibm-1130
+*** 1129 X IBMCCSID01129 ibm-1129
+*** 1123 X IBMCCSID01123 ibm-1123
+*** 1122 X IBMCCSID01122 ibm-1122
+*** 1115 IBMCCSID01115 ibm-1115
+*** 1114 IBMCCSID01114 ibm-1114
+*** 1112 X IBMCCSID01112 ibm-1112
+*** 1098 X IBMCCSID01098 ibm-1098
+*** 1097 X IBMCCSID01097 ibm-1097
+*** 1089 X csISOLatinArabic arabic ASMO-708 ECMA-114 ISO_8859-6
+*** iso-ir-127 ISO_8859-6:1987 ISO-8859-6 iana-9
+*** IBMCCSID01089 ibm-1089
+*** 1088 IBMCCSID01088 ibm-1088
+*** 1051 X csHPRoman8 r8 roman8 hp-roman8 iana-2004 IBMCCSID01051
+*** ibm-1051
+*** 1047 X csIBM1047 IBM-1047 IBM1047 iana-2102 IBMCCSID01047
+*** ibm-1047
+*** 1046 X IBMCCSID01046 ibm-1046
+*** 1043 IBMCCSID01043 ibm-1043
+*** 1042 IBMCCSID01042 ibm-1042
+*** 1041 IBMCCSID01041 ibm-1041
+*** 1040 IBMCCSID01040 ibm-1040
+*** 1027 X IBMCCSID01027 ibm-1027
+*** 1026 X csIBM1026 CP1026 IBM1026 iana-2063 IBMCCSID01026
+*** ibm-1026
+*** 1025 X IBMCCSID01025 ibm-1025
+*** 1019 X IBMCCSID01019 ibm-1019
+*** 1018 X IBMCCSID01018 ibm-1018
+*** 1017 X IBMCCSID01017 ibm-1017
+*** 1016 X IBMCCSID01016 ibm-1016
+*** 1015 X IBMCCSID01015 ibm-1015
+*** 1014 X IBMCCSID01014 ibm-1014
+*** 1013 X IBMCCSID01013 ibm-1013
+*** 1012 X IBMCCSID01012 ibm-1012
+*** 1011 X IBMCCSID01011 ibm-1011
+*** 1010 X IBMCCSID01010 ibm-1010
+*** 1009 X IBMCCSID01009 ibm-1009
+*** 1008 IBMCCSID01008 ibm-1008
+*** 970 X csEUCKR EUC-KR iana-38 IBMCCSID00970 ibm-970
+*** 965 X IBMCCSID00965 ibm-965
+*** 964 X IBMCCSID00964 ibm-964
+*** 959 X IBMCCSID00959 ibm-959
+*** 958 X IBMCCSID00958 ibm-958
+*** 957 X IBMCCSID00957 ibm-957
+*** 956 X IBMCCSID00956 ibm-956
+*** 951 X IBMCCSID00951 ibm-951
+*** 950 X IBMCCSID00950 ibm-950
+*** 949 X IBMCCSID00949 ibm-949
+*** 947 X IBMCCSID00947 ibm-947
+*** 946 X IBMCCSID00946 ibm-946
+*** 944 X IBMCCSID00944 ibm-944
+*** 943 X csShiftJIS MS_Kanji Shift_JIS iana-17 IBMCCSID00943
+*** ibm-943
+*** 942 X IBMCCSID00942 ibm-942
+*** 939 X IBMCCSID00939 ibm-939
+*** 938 X IBMCCSID00938 ibm-938
+*** 937 X IBMCCSID00937 ibm-937
+*** 936 IBMCCSID00936 ibm-936
+*** 935 X IBMCCSID00935 ibm-935
+*** 934 X IBMCCSID00934 ibm-934
+*** 933 X IBMCCSID00933 ibm-933
+*** 932 X IBMCCSID00932 ibm-932
+*** 930 X IBMCCSID00930 ibm-930
+*** 928 X IBMCCSID00928 ibm-928
+*** 927 X IBMCCSID00927 ibm-927
+*** 926 X IBMCCSID00926 ibm-926
+*** 924 X csIBM00924 ebcdic-Latin9--euro CP00924 CCSID00924
+*** IBM00924 iana-2090 IBMCCSID00924 ibm-924
+*** 923 X csISO885915 Latin-9 ISO_8859-15 ISO-8859-15 iana-111
+*** IBMCCSID00923 ibm-923
+*** 922 X IBMCCSID00922 ibm-922
+*** 921 X csISO885913 ISO-8859-13 iana-109 IBMCCSID00921 ibm-921
+*** 920 X csISOLatin5 l5 latin5 ISO_8859-9 iso-ir-148
+*** ISO_8859-9:1989 ISO-8859-9 iana-12 IBMCCSID00920
+*** ibm-920
+*** 918 X csIBM918 ebcdic-cp-ar2 CP918 IBM918 iana-2062
+*** IBMCCSID00918 ibm-918
+*** 916 X csISOLatinHebrew hebrew ISO_8859-8 iso-ir-138
+*** ISO_8859-8:1988 ISO-8859-8 iana-11 IBMCCSID00916
+*** ibm-916
+*** 915 X csISOLatinCyrillic cyrillic ISO_8859-5 iso-ir-144
+*** ISO_8859-5:1988 ISO-8859-5 iana-8 IBMCCSID00915
+*** ibm-915
+*** 914 X csISOLatin4 l4 latin4 ISO_8859-4 iso-ir-110
+*** ISO_8859-4:1988 ISO-8859-4 iana-7 IBMCCSID00914
+*** ibm-914
+*** 913 csISOLatin3 l3 latin3 ISO_8859-3 iso-ir-109
+*** ISO_8859-3:1988 ISO-8859-3 iana-6 IBMCCSID00913
+*** ibm-913
+*** 912 X csISOLatin2 l2 latin2 ISO_8859-2 iso-ir-101
+*** ISO_8859-2:1987 ISO-8859-2 iana-5 IBMCCSID00912
+*** ibm-912
+*** 905 X csIBM905 ebcdic-cp-tr CP905 IBM905 iana-2061
+*** IBMCCSID00905 ibm-905
+*** 904 csIBBM904 904 cp904 IBM904 iana-2060 IBMCCSID00904
+*** ibm-904
+*** 903 csIBM903 cp903 IBM903 iana-2059 IBMCCSID00903 ibm-903
+*** 897 X csHalfWidthKatakana X0201 JIS_X0201 iana-15
+*** IBMCCSID00897 ibm-897
+*** 896 IBMCCSID00896 ibm-896
+*** 891 X csIBM891 cp891 IBM891 iana-2058 IBMCCSID00891 ibm-891
+*** 880 X csIBM880 EBCDIC-Cyrillic cp880 IBM880 iana-2057
+*** IBMCCSID00880 ibm-880
+*** 878 X csKOI8R KOI8-R iana-2084 IBMCCSID00878 ibm-878
+*** 875 X IBMCCSID00875 ibm-875
+*** 874 X csTIS620 TIS-620 csEUCTH eucTH EUC-TH> iana-2259
+*** IBMCCSID00874 ibm-874
+*** 871 X csIBM871 ebcdic-cp-is CP871 IBM871 iana-2056
+*** IBMCCSID00871 ibm-871
+*** 870 X csIBM870 ebcdic-cp-yu ebcdic-cp-roece CP870 IBM870
+*** iana-2055 IBMCCSID00870 ibm-870
+*** 869 X csIBM869 cp-gr 869 cp869 IBM869 iana-2054
+*** IBMCCSID00869 ibm-869
+*** 868 X csIBM868 cp-ar CP868 IBM868 iana-2053 IBMCCSID00868
+*** ibm-868
+*** 866 X csIBM866 866 cp866 IBM866 iana-2086 IBMCCSID00866
+*** ibm-866
+*** 865 X csIBM865 865 cp865 IBM865 iana-2052 IBMCCSID00865
+*** ibm-865
+*** 864 X csIBM864 cp864 IBM864 iana-2051 IBMCCSID00864 ibm-864
+*** 863 X csIBM863 863 cp863 IBM863 iana-2050 IBMCCSID00863
+*** ibm-863
+*** 862 X csPC862LatinHebrew 862 cp862 IBM862 iana-2013
+*** IBMCCSID00862 ibm-862
+*** 861 X csIBM861 cp-is 861 cp861 IBM861 iana-2049
+*** IBMCCSID00861 ibm-861
+*** 860 X csIBM860 860 cp860 IBM860 iana-2048 IBMCCSID00860
+*** ibm-860
+*** 858 csIBM00858 PC-Multilingual-850+euro CP00858 CCSID00858
+*** IBM00858 iana-2089 IBMCCSID00858 ibm-858
+*** 857 X csIBM857 857 cp857 IBM857 iana-2047 IBMCCSID00857
+*** ibm-857
+*** 855 X csIBM855 855 cp855 IBM855 iana-2046 IBMCCSID00855
+*** ibm-855
+*** 852 X csPCp852 852 cp852 IBM852 iana-2010 IBMCCSID00852
+*** ibm-852
+*** 851 X csIBM851 851 cp851 IBM851 iana-2045 IBMCCSID00851
+*** ibm-851
+*** 850 X csPC850Multilingual 850 cp850 IBM850 iana-2009
+*** IBMCCSID00850 ibm-850
+*** 838 X csIBMThai IBM-Thai iana-2016 IBMCCSID00838 ibm-838
+*** 837 X IBMCCSID00837 ibm-837
+*** 836 X IBMCCSID00836 ibm-836
+*** 835 X IBMCCSID00835 ibm-835
+*** 833 X IBMCCSID00833 ibm-833
+*** 819 X csISOLatin1 CP819 IBM819 l1 latin1 ISO_8859-1
+*** iso-ir-100 ISO_8859-1:1987 ISO-8859-1 iana-4
+*** IBMCCSID00819 ibm-819
+*** 813 X csISOLatinGreek greek8 greek ECMA-118 ELOT_928
+*** ISO_8859-7 iso-ir-126 ISO_8859-7:1987 ISO-8859-7
+*** iana-10 IBMCCSID00813 ibm-813
+*** 775 X csPC775Baltic cp775 IBM775 iana-2087 IBMCCSID00775
+*** ibm-775
+*** 737 X IBMCCSID00737 ibm-737
+*** 720 X IBMCCSID00720 ibm-720
+*** 500 X csIBM500 ebcdic-cp-ch ebcdic-cp-be CP500 IBM500
+*** iana-2044 IBMCCSID00500 ibm-500
+*** 437 X csPC8CodePage437 437 cp437 IBM437 iana-2011
+*** IBMCCSID00437 ibm-437
+*** 424 X csIBM424 ebcdic-cp-he cp424 IBM424 iana-2043
+*** IBMCCSID00424 ibm-424
+*** 423 X csIBM423 ebcdic-cp-gr cp423 IBM423 iana-2042
+*** IBMCCSID00423 ibm-423
+*** 420 X csIBM420 ebcdic-cp-ar1 cp420 IBM420 iana-2041
+*** IBMCCSID00420 ibm-420
+*** 367 X csASCII cp367 IBM367 us ISO646-US ISO_646.irv:1991
+*** ANSI_X3.4-1986 ANSI_X3.4-1968 iso-ir-6 US-ASCII ASCII
+*** iana-3 IBMCCSID00367 ibm-367
+*** 301 X IBMCCSID00301 ibm-301
+*** 300 X IBMCCSID00300 ibm-300
+*** 297 X csIBM297 ebcdic-cp-fr cp297 IBM297 iana-2040
+*** IBMCCSID00297 ibm-297
+*** 290 X csIBM290 EBCDIC-JP-kana cp290 IBM290 iana-2039
+*** IBMCCSID00290 ibm-290
+*** 285 X csIBM285 ebcdic-cp-gb CP285 IBM285 iana-2038
+*** IBMCCSID00285 ibm-285
+*** 284 X csIBM284 ebcdic-cp-es CP284 IBM284 iana-2037
+*** IBMCCSID00284 ibm-284
+*** 280 X csIBM280 ebcdic-cp-it CP280 IBM280 iana-2035
+*** IBMCCSID00280 ibm-280
+*** 278 X csIBM278 ebcdic-cp-se ebcdic-cp-fi CP278 IBM278
+*** iana-2034 IBMCCSID00278 ibm-278
+*** 277 X csIBM277 EBCDIC-CP-NO EBCDIC-CP-DK IBM277 iana-2033
+*** IBMCCSID00277 ibm-277
+*** 273 X csIBM273 CP273 IBM273 iana-2030 IBMCCSID00273 ibm-273
+*** 256 X IBMCCSID00256 ibm-256
+*** 37 X csIBM037 ebcdic-cp-nl ebcdic-cp-wt ebcdic-cp-ca
+*** ebcdic-cp-us cp037 IBM037 EBCDIC iana-2028
+*** IBMCCSID00037 ibm-37
+*** 0 IBMCCSID00000 ibm-0
+**/
+
+/**
+*** 13499 states, 229 finals, 20020 transitions.
+**/
+
+typedef unsigned short t_ccsid;
+typedef unsigned short t_staterange;
+typedef unsigned short t_transrange;
+
+static t_transrange trans_array[] = {
+ 0, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
+ 130, 137, 138, 139, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 153,
+ 154, 156, 157, 159, 160, 162, 163, 165, 166, 168, 169, 171, 172, 173, 174,
+ 176, 177, 179, 180, 182, 183, 185, 186, 188, 189, 191, 192, 194, 195, 197,
+ 198, 199, 200, 202, 203, 205, 206, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 233, 234, 235, 236, 238, 239, 241, 242, 243, 245, 246, 248, 249, 251, 252,
+ 254, 256, 257, 259, 260, 261, 262, 263, 264, 265, 266, 267, 269, 270, 271,
+ 275, 276, 277, 278, 279, 287, 288, 289, 291, 292, 294, 295, 297, 298, 300,
+ 301, 303, 304, 305, 306, 307, 308, 310, 311, 313, 314, 315, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 357, 358,
+ 359, 360, 361, 362, 363, 365, 366, 367, 368, 370, 371, 373, 374, 376, 377,
+ 378, 380, 381, 383, 384, 386, 387, 389, 390, 392, 393, 394, 396, 398, 400,
+ 401, 402, 403, 409, 410, 411, 412, 413, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 429, 430, 431, 432, 433, 434, 435, 438, 439, 440,
+ 441, 442, 444, 445, 446, 447, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 462, 463, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 489, 490, 491, 492, 493, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 512, 513, 514, 515, 516, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 551, 553, 554, 556, 557, 559, 560, 562, 563, 565, 566, 568, 569,
+ 571, 572, 574, 575, 577, 578, 580, 581, 583, 585, 586, 587, 591, 592, 593,
+ 595, 596, 598, 599, 600, 602, 603, 604, 606, 607, 609, 610, 612, 613, 615,
+ 616, 618, 619, 621, 622, 624, 625, 627, 628, 630, 631, 633, 634, 636, 637,
+ 639, 640, 642, 643, 644, 646, 647, 648, 649, 655, 656, 658, 659, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 672, 673, 675, 676, 677, 679, 680, 682,
+ 683, 685, 686, 688, 689, 691, 692, 694, 695, 697, 698, 700, 701, 703, 704,
+ 706, 707, 709, 710, 712, 713, 715, 716, 718, 719, 721, 722, 723, 724, 725,
+ 727, 728, 730, 731, 733, 734, 736, 737, 739, 740, 741, 745, 746, 747, 748,
+ 750, 751, 752, 753, 754, 756, 757, 758, 759, 760, 763, 764, 767, 768, 771,
+ 779, 780, 781, 786, 788, 789, 791, 792, 793, 795, 796, 798, 799, 801, 802,
+ 803, 804, 805, 806, 807, 816, 817, 818, 822, 823, 824, 825, 826, 827, 828,
+ 829, 830, 831, 832, 833, 834, 836, 837, 839, 840, 841, 842, 843, 844, 845,
+ 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 861, 862,
+ 863, 865, 866, 868, 869, 871, 872, 874, 875, 877, 878, 880, 881, 883, 884,
+ 885, 887, 888, 890, 891, 893, 894, 896, 897, 898, 900, 901, 903, 904, 906,
+ 907, 909, 910, 912, 913, 914, 915, 916, 917, 918, 919, 920, 933, 934, 936,
+ 937, 939, 940, 942, 943, 945, 946, 947, 948, 952, 953, 955, 956, 957, 961,
+ 962, 963, 965, 966, 967, 968, 970, 971, 972, 973, 974, 975, 976, 977, 978,
+ 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 990, 991, 992, 996, 998,
+ 999, 1001, 1002, 1004, 1005, 1007, 1008, 1010, 1011, 1013, 1014, 1015, 1016,
+ 1017, 1019, 1020, 1022, 1023, 1025, 1026, 1028, 1029, 1031, 1032, 1034, 1035,
+ 1037, 1038, 1040, 1041, 1043, 1044, 1046, 1047, 1049, 1050, 1052, 1053, 1054,
+ 1056, 1057, 1059, 1060, 1062, 1063, 1065, 1066, 1068, 1069, 1071, 1072, 1074,
+ 1075, 1077, 1078, 1080, 1081, 1083, 1084, 1086, 1087, 1088, 1089, 1090, 1091,
+ 1093, 1094, 1096, 1097, 1099, 1100, 1102, 1103, 1105, 1106, 1108, 1109, 1111,
+ 1112, 1113, 1114, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1130,
+ 1131, 1133, 1134, 1135, 1137, 1138, 1140, 1141, 1143, 1144, 1146, 1147, 1149,
+ 1150, 1152, 1153, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1163, 1164, 1166,
+ 1167, 1168, 1170, 1171, 1173, 1174, 1176, 1177, 1179, 1180, 1182, 1183, 1184,
+ 1186, 1187, 1188, 1190, 1191, 1192, 1196, 1197, 1198, 1199, 1200, 1202, 1203,
+ 1204, 1206, 1207, 1208, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1221, 1222,
+ 1224, 1225, 1226, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239,
+ 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1257, 1258, 1259, 1260,
+ 1261, 1262, 1263, 1264, 1265, 1267, 1268, 1270, 1271, 1273, 1274, 1276, 1277,
+ 1279, 1280, 1282, 1283, 1284, 1285, 1286, 1288, 1289, 1291, 1292, 1294, 1295,
+ 1297, 1298, 1300, 1301, 1303, 1304, 1306, 1307, 1308, 1309, 1310, 1311, 1312,
+ 1313, 1314, 1315, 1316, 1317, 1318, 1342, 1343, 1344, 1346, 1347, 1349, 1350,
+ 1352, 1353, 1355, 1356, 1358, 1359, 1361, 1362, 1363, 1364, 1365, 1366, 1376,
+ 1378, 1379, 1381, 1383, 1387, 1389, 1391, 1395, 1399, 1401, 1405, 1409, 1411,
+ 1412, 1414, 1415, 1417, 1418, 1420, 1422, 1424, 1426, 1428, 1430, 1431, 1432,
+ 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445,
+ 1446, 1478, 1479, 1480, 1482, 1483, 1485, 1486, 1488, 1489, 1491, 1492, 1494,
+ 1495, 1497, 1498, 1499, 1503, 1505, 1506, 1508, 1509, 1511, 1512, 1514, 1515,
+ 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1526, 1527, 1529, 1530,
+ 1532, 1533, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545,
+ 1546, 1547, 1551, 1553, 1554, 1556, 1557, 1559, 1560, 1562, 1563, 1564, 1565,
+ 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1575, 1577, 1578, 1580, 1581,
+ 1583, 1584, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596,
+ 1598, 1599, 1601, 1602, 1604, 1605, 1607, 1608, 1609, 1610, 1611, 1612, 1613,
+ 1614, 1615, 1616, 1617, 1618, 1619, 1623, 1625, 1626, 1628, 1629, 1631, 1632,
+ 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1647,
+ 1649, 1650, 1652, 1653, 1655, 1656, 1658, 1659, 1660, 1661, 1662, 1663, 1664,
+ 1665, 1666, 1667, 1668, 1669, 1671, 1672, 1674, 1675, 1677, 1678, 1680, 1681,
+ 1683, 1684, 1686, 1687, 1689, 1690, 1692, 1693, 1695, 1696, 1698, 1699, 1701,
+ 1703, 1704, 1706, 1707, 1709, 1710, 1712, 1713, 1714, 1715, 1716, 1717, 1718,
+ 1719, 1720, 1721, 1722, 1724, 1725, 1727, 1728, 1730, 1731, 1733, 1734, 1735,
+ 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1752, 1754,
+ 1755, 1757, 1758, 1760, 1761, 1763, 1764, 1765, 1766, 1768, 1770, 1771, 1773,
+ 1774, 1776, 1777, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1788, 1789,
+ 1791, 1792, 1794, 1795, 1797, 1799, 1801, 1803, 1804, 1806, 1807, 1809, 1810,
+ 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1823, 1824, 1825,
+ 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1856, 1857, 1859, 1860,
+ 1862, 1863, 1865, 1866, 1868, 1869, 1871, 1873, 1874, 1875, 1876, 1877, 1878,
+ 1879, 1880, 1882, 1883, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893,
+ 1895, 1896, 1898, 1900, 1902, 1903, 1904, 1906, 1907, 1908, 1909, 1917, 1918,
+ 1921, 1922, 1924, 1925, 1926, 1928, 1929, 1931, 1932, 1934, 1935, 1936, 1937,
+ 1939, 1940, 1942, 1943, 1945, 1946, 1948, 1949, 1951, 1952, 1954, 1955, 1956,
+ 1957, 1959, 1960, 1962, 1963, 1965, 1966, 1968, 1969, 1971, 1972, 1974, 1975,
+ 1976, 1977, 1979, 1980, 1982, 1983, 1985, 1986, 1988, 1989, 1990, 1991, 1993,
+ 1994, 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2010, 2011,
+ 2013, 2014, 2016, 2017, 2019, 2020, 2022, 2023, 2024, 2025, 2026, 2027, 2037,
+ 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2051, 2053, 2054,
+ 2056, 2057, 2059, 2060, 2062, 2063, 2064, 2068, 2069, 2070, 2074, 2075, 2079,
+ 2080, 2081, 2086, 2089, 2090, 2091, 2092, 2093, 2099, 2104, 2108, 2110, 2117,
+ 2127, 2137, 2141, 2145, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163,
+ 2164, 2173, 2176, 2177, 2178, 2188, 2189, 2190, 2191, 2192, 2193, 2196, 2199,
+ 2201, 2202, 2203, 2204, 2205, 2214, 2215, 2216, 2217, 2219, 2220, 2222, 2223,
+ 2224, 2225, 2226, 2227, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237,
+ 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2259,
+ 2260, 2261, 2262, 2263, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274,
+ 2275, 2276, 2282, 2283, 2284, 2285, 2287, 2288, 2289, 2290, 2291, 2293, 2294,
+ 2295, 2296, 2297, 2298, 2299, 2300, 2307, 2308, 2309, 2310, 2311, 2312, 2313,
+ 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2325, 2326, 2327, 2328, 2329, 2330,
+ 2331, 2332, 2333, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346,
+ 2347, 2348, 2349, 2355, 2356, 2357, 2358, 2359, 2361, 2362, 2363, 2364, 2365,
+ 2366, 2372, 2375, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386,
+ 2387, 2388, 2389, 2390, 2391, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2409,
+ 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2421, 2422, 2423, 2424, 2425,
+ 2426, 2431, 2432, 2433, 2434, 2435, 2437, 2438, 2439, 2440, 2441, 2442, 2443,
+ 2444, 2446, 2447, 2448, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2461, 2462,
+ 2463, 2464, 2465, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2479, 2480, 2481,
+ 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2496, 2497, 2498,
+ 2499, 2500, 2501, 2502, 2503, 2504, 2506, 2507, 2508, 2509, 2510, 2511, 2512,
+ 2516, 2517, 2518, 2522, 2523, 2524, 2525, 2526, 2528, 2529, 2530, 2531, 2532,
+ 2533, 2534, 2535, 2539, 2540, 2541, 2542, 2543, 2545, 2546, 2547, 2548, 2549,
+ 2550, 2551, 2552, 2553, 2554, 2557, 2558, 2559, 2560, 2561, 2563, 2564, 2565,
+ 2566, 2567, 2568, 2569, 2570, 2574, 2575, 2576, 2579, 2580, 2581, 2582, 2583,
+ 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2600,
+ 2601, 2602, 2603, 2607, 2608, 2609, 2610, 2611, 2612, 2616, 2618, 2619, 2620,
+ 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634,
+ 2635, 2636, 2637, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651,
+ 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664,
+ 2665, 2669, 2670, 2671, 2672, 2673, 2675, 2676, 2677, 2678, 2679, 2680, 2681,
+ 2682, 2683, 2686, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2701,
+ 2707, 2708, 2709, 2711, 2712, 2721, 2722, 2723, 2728, 2729, 2730, 2733, 2734,
+ 2735, 2736, 2737, 2738, 2739, 2746, 2747, 2748, 2750, 2751, 2752, 2754, 2755,
+ 2756, 2757, 2758, 2759, 2760, 2764, 2770, 2771, 2772, 2773, 2774, 2775, 2776,
+ 2777, 2778, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796,
+ 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2813, 2814, 2818, 2819, 2820,
+ 2821, 2822, 2823, 2824, 2825, 2826, 2832, 2833, 2834, 2835, 2836, 2837, 2838,
+ 2839, 2840, 2841, 2842, 2843, 2844, 2850, 2851, 2852, 2853, 2854, 2856, 2857,
+ 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2873, 2874, 2875, 2876, 2877,
+ 2878, 2879, 2880, 2881, 2882, 2883, 2895, 2897, 2898, 2899, 2900, 2901, 2903,
+ 2904, 2907, 2910, 2912, 2913, 2914, 2915, 2916, 2920, 2922, 2923, 2924, 2925,
+ 2927, 2930, 2931, 2932, 2933, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942,
+ 2943, 2944, 2947, 2949, 2954, 2960, 2969, 2974, 2975, 2978, 2979, 2980, 2981,
+ 2982, 2983, 2984, 2985, 2992, 2995, 3001, 3009, 3018, 3024, 3030, 3032, 3033,
+ 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3049, 3050, 3051, 3052, 3053,
+ 3054, 3055, 3056, 3057, 3065, 3067, 3077, 3080, 3086, 3087, 3089, 3091, 3092,
+ 3093, 3094, 3095, 3096, 3097, 3098, 3105, 3108, 3111, 3115, 3125, 3131, 3133,
+ 3134, 3135, 3136, 3137, 3138, 3139, 3145, 3148, 3150, 3159, 3161, 3165, 3166,
+ 3167, 3168, 3169, 3170, 3175, 3177, 3179, 3184, 3186, 3187, 3188, 3189, 3190,
+ 3194, 3195, 3196, 3197, 3198, 3202, 3203, 3204, 3205, 3206, 3209, 3211, 3212,
+ 3213, 3214, 3215, 3216, 3220, 3221, 3222, 3224, 3225, 3226, 3231, 3232, 3233,
+ 3234, 3237, 3238, 3239, 3240, 3244, 3246, 3247, 3248, 3250, 3251, 3252, 3253,
+ 3254, 3255, 3256, 3257, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269,
+ 3270, 3271, 3272, 3275, 3278, 3279, 3280, 3281, 3282, 3284, 3285, 3286, 3287,
+ 3288, 3289, 3290, 3296, 3297, 3298, 3299, 3300, 3301, 3303, 3304, 3305, 3306,
+ 3307, 3308, 3309, 3310, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320,
+ 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335,
+ 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349,
+ 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362,
+ 3363, 3364, 3368, 3369, 3370, 3371, 3372, 3374, 3375, 3376, 3377, 3378, 3379,
+ 3380, 3386, 3387, 3389, 3390, 3392, 3393, 3395, 3396, 3398, 3399, 3400, 3401,
+ 3413, 3414, 3416, 3417, 3418, 3419, 3420, 3422, 3423, 3425, 3426, 3428, 3429,
+ 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442,
+ 3444, 3445, 3447, 3448, 3450, 3451, 3453, 3454, 3456, 3457, 3458, 3459, 3460,
+ 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3469, 3470, 3472, 3473, 3475, 3476,
+ 3478, 3479, 3481, 3482, 3484, 3485, 3487, 3488, 3492, 3493, 3494, 3495, 3496,
+ 3498, 3499, 3501, 3502, 3504, 3505, 3507, 3508, 3510, 3511, 3512, 3513, 3515,
+ 3516, 3518, 3519, 3521, 3522, 3524, 3525, 3527, 3528, 3530, 3531, 3533, 3534,
+ 3536, 3537, 3538, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3558,
+ 3559, 3561, 3562, 3565, 3566, 3567, 3568, 3569, 3570, 3575, 3576, 3579, 3580,
+ 3581, 3582, 3584, 3585, 3586, 3587, 3591, 3593, 3594, 3596, 3597, 3598, 3599,
+ 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612,
+ 3614, 3615, 3617, 3618, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628,
+ 3629, 3630, 3631, 3632, 3633, 3634, 3637, 3638, 3639, 3640, 3641, 3642, 3643,
+ 3644, 3645, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3657, 3658,
+ 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3667, 3668, 3669, 3670, 3671, 3672,
+ 3673, 3674, 3675, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3687,
+ 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3697, 3698, 3699, 3700, 3701,
+ 3702, 3703, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3715, 3716,
+ 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3733, 3734, 3735, 3736, 3737,
+ 3738, 3739, 3740, 3741, 3742, 3743, 3745, 3746, 3747, 3748, 3751, 3752, 3754,
+ 3755, 3756, 3757, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3773,
+ 3774, 3775, 3776, 3778, 3779, 3781, 3782, 3783, 3784, 3786, 3787, 3789, 3790,
+ 3792, 3793, 3794, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807,
+ 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 3820, 3821,
+ 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3830, 3831, 3832, 3835, 3836, 3837,
+ 3841, 3842, 3843, 3849, 3850, 3852, 3853, 3855, 3856, 3858, 3859, 3866, 3867,
+ 3869, 3870, 3872, 3873, 3875, 3876, 3878, 3879, 3881, 3882, 3883, 3885, 3886,
+ 3888, 3890, 3891, 3893, 3894, 3896, 3897, 3899, 3900, 3901, 3902, 3903, 3904,
+ 3905, 3906, 3907, 3908, 3909, 3910, 3912, 3913, 3915, 3916, 3918, 3919, 3921,
+ 3922, 3924, 3925, 3927, 3928, 3930, 3931, 3933, 3934, 3936, 3937, 3939, 3940,
+ 3942, 3943, 3945, 3946, 3947, 3948, 3950, 3953, 3954, 3955, 3957, 3958, 3960,
+ 3961, 3963, 3964, 3966, 3967, 3968, 3970, 3971, 3973, 3975, 3976, 3978, 3980,
+ 3981, 3983, 3984, 3986, 3991, 3992, 3993, 3998, 3999, 4000, 4001, 4002, 4005,
+ 4006, 4010, 4011, 4013, 4014, 4015, 4016, 4022, 4024, 4025, 4026, 4027, 4029,
+ 4030, 4032, 4033, 4035, 4036, 4038, 4039, 4041, 4042, 4044, 4045, 4046, 4047,
+ 4048, 4049, 4050, 4051, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 4060,
+ 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 4074, 4075, 4076, 4083,
+ 4084, 4085, 4086, 4087, 4089, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097,
+ 4098, 4100, 4101, 4102, 4103, 4105, 4106, 4107, 4108, 4110, 4111, 4112, 4113,
+ 4115, 4116, 4117, 4118, 4120, 4121, 4122, 4123, 4125, 4126, 4127, 4128, 4130,
+ 4131, 4132, 4133, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4142, 4144, 4145,
+ 4146, 4147, 4149, 4150, 4151, 4152, 4154, 4155, 4156, 4157, 4159, 4160, 4161,
+ 4162, 4164, 4165, 4166, 4167, 4169, 4170, 4171, 4172, 4174, 4175, 4176, 4177,
+ 4179, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 4188, 4189, 4190, 4191, 4193,
+ 4194, 4195, 4196, 4198, 4199, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207,
+ 4208, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 4220, 4221,
+ 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234,
+ 4235, 4236, 4237, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4248, 4249,
+ 4250, 4251, 4253, 4254, 4255, 4257, 4258, 4259, 4260, 4262, 4263, 4264, 4265,
+ 4267, 4268, 4269, 4270, 4272, 4273, 4274, 4276, 4277, 4278, 4279, 4281, 4282,
+ 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295,
+ 4296, 4297, 4298, 4299, 4301, 4302, 4303, 4304, 4305, 4309, 4310, 4311, 4312,
+ 4313, 4314, 4315, 4323, 4324, 4325, 4327, 4328, 4329, 4330, 4332, 4333, 4334,
+ 4335, 4337, 4338, 4339, 4340, 4342, 4343, 4344, 4345, 4347, 4348, 4349, 4350,
+ 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4360, 4361, 4362, 4363, 4365,
+ 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378,
+ 4379, 4380, 4381, 4382, 4383, 4385, 4386, 4387, 4397, 4398, 4399, 4400, 4401,
+ 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4411, 4412, 4413, 4414, 4415,
+ 4416, 4417, 4418, 4420, 4421, 4422, 4423, 4425, 4426, 4427, 4428, 4430, 4431,
+ 4432, 4434, 4435, 4436, 4437, 4439, 4440, 4441, 4442, 4444, 4445, 4446, 4447,
+ 4449, 4450, 4451, 4452, 4454, 4455, 4456, 4458, 4459, 4460, 4462, 4463, 4464,
+ 4466, 4467, 4468, 4469, 4470, 4471, 4477, 4478, 4479, 4480, 4481, 4482, 4483,
+ 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498,
+ 4499, 4501, 4502, 4503, 4506, 4507, 4508, 4510, 4511, 4512, 4513, 4514, 4515,
+ 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4530, 4531, 4532,
+ 4533, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546,
+ 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4563, 4564, 4565, 4567, 4568,
+ 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4586,
+ 4587, 4588, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601,
+ 4602, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616,
+ 4617, 4627, 4628, 4629, 4631, 4632, 4633, 4634, 4636, 4637, 4638, 4639, 4641,
+ 4642, 4643, 4644, 4646, 4647, 4648, 4649, 4651, 4652, 4653, 4654, 4656, 4657,
+ 4658, 4659, 4661, 4662, 4663, 4664, 4666, 4667, 4668, 4669, 4671, 4672, 4673,
+ 4674, 4676, 4677, 4678, 4679, 4681, 4682, 4683, 4685, 4686, 4687, 4688, 4689,
+ 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4701, 4702, 4703, 4704, 4706, 4707,
+ 4708, 4710, 4711, 4712, 4714, 4715, 4716, 4717, 4719, 4720, 4721, 4722, 4724,
+ 4725, 4726, 4727, 4729, 4730, 4731, 4732, 4734, 4735, 4736, 4737, 4739, 4740,
+ 4741, 4742, 4744, 4745, 4746, 4747, 4749, 4750, 4751, 4752, 4754, 4755, 4756,
+ 4757, 4759, 4760, 4761, 4762, 4764, 4765, 4766, 4767, 4769, 4770, 4771, 4772,
+ 4774, 4775, 4776, 4778, 4779, 4780, 4781, 4782, 4783, 4789, 4790, 4791, 4792,
+ 4794, 4795, 4796, 4797, 4799, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807,
+ 4808, 4809, 4810, 4811, 4812, 4813, 4816, 4817, 4818, 4819, 4821, 4822, 4823,
+ 4825, 4826, 4827, 4828, 4830, 4831, 4832, 4833, 4835, 4836, 4837, 4838, 4840,
+ 4841, 4842, 4843, 4845, 4846, 4847, 4848, 4850, 4851, 4852, 4853, 4855, 4856,
+ 4857, 4858, 4860, 4861, 4862, 4863, 4865, 4866, 4867, 4868, 4870, 4871, 4872,
+ 4873, 4875, 4876, 4877, 4878, 4880, 4881, 4882, 4883, 4885, 4886, 4887, 4888,
+ 4890, 4891, 4892, 4893, 4895, 4896, 4897, 4898, 4899, 4900, 4901, 4903, 4904,
+ 4905, 4906, 4908, 4909, 4910, 4911, 4913, 4914, 4915, 4916, 4918, 4919, 4920,
+ 4921, 4923, 4924, 4925, 4926, 4927, 4931, 4932, 4933, 4934, 4935, 4936, 4937,
+ 4938, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4948, 4949, 4950, 4951, 4952,
+ 4953, 4954, 4957, 4958, 4959, 4960, 4963, 4964, 4965, 4966, 4967, 4968, 4971,
+ 4972, 4973, 4981, 4982, 4983, 4984, 4985, 4990, 4991, 4992, 4994, 4995, 4996,
+ 4997, 4999, 5000, 5001, 5003, 5004, 5005, 5006, 5008, 5009, 5010, 5011, 5013,
+ 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5030, 5031, 5032, 5033, 5034,
+ 5038, 5039, 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050,
+ 5051, 5052, 5053, 5054, 5055, 5056, 5057, 5058, 5059, 5060, 5061, 5062, 5063,
+ 5064, 5066, 5067, 5068, 5069, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5079,
+ 5080, 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 5090, 5091, 5092,
+ 5093, 5094, 5095, 5096, 5097, 5099, 5100, 5101, 5103, 5104, 5105, 5106, 5108,
+ 5109, 5110, 5111, 5113, 5114, 5115, 5116, 5118, 5119, 5120, 5121, 5123, 5124,
+ 5125, 5126, 5128, 5129, 5130, 5131, 5133, 5134, 5135, 5137, 5138, 5139, 5140,
+ 5142, 5143, 5144, 5145, 5147, 5148, 5149, 5150, 5152, 5153, 5154, 5156, 5157,
+ 5158, 5159, 5161, 5162, 5163, 5164, 5166, 5167, 5168, 5169, 5171, 5172, 5173,
+ 5174, 5176, 5177, 5178, 5179, 5180, 5181, 5182, 5195, 5196, 5197, 5198, 5200,
+ 5201, 5202, 5203, 5205, 5206, 5207, 5208, 5210, 5211, 5212, 5213, 5215, 5216,
+ 5217, 5218, 5219, 5220, 5224, 5225, 5226, 5227, 5229, 5230, 5231, 5232, 5233,
+ 5237, 5238, 5239, 5241, 5242, 5243, 5244, 5245, 5246, 5247, 5248, 5250, 5251,
+ 5252, 5253, 5254, 5255, 5256, 5257, 5258, 5259, 5260, 5261, 5262, 5263, 5264,
+ 5265, 5266, 5267, 5268, 5269, 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277,
+ 5278, 5279, 5280, 5281, 5282, 5283, 5284, 5286, 5287, 5288, 5289, 5290, 5294,
+ 5295, 5296, 5298, 5299, 5300, 5301, 5303, 5304, 5305, 5306, 5308, 5309, 5310,
+ 5311, 5313, 5314, 5315, 5316, 5318, 5319, 5320, 5321, 5323, 5324, 5325, 5326,
+ 5327, 5328, 5329, 5330, 5331, 5332, 5333, 5335, 5336, 5337, 5338, 5340, 5341,
+ 5342, 5343, 5345, 5346, 5347, 5348, 5350, 5351, 5352, 5353, 5355, 5356, 5357,
+ 5358, 5360, 5361, 5362, 5363, 5365, 5366, 5367, 5368, 5370, 5371, 5372, 5373,
+ 5375, 5376, 5377, 5378, 5380, 5381, 5382, 5383, 5385, 5386, 5387, 5388, 5390,
+ 5391, 5392, 5393, 5394, 5395, 5396, 5398, 5399, 5400, 5401, 5403, 5404, 5405,
+ 5406, 5408, 5409, 5410, 5411, 5413, 5414, 5415, 5416, 5418, 5419, 5420, 5421,
+ 5423, 5424, 5425, 5426, 5428, 5429, 5430, 5431, 5433, 5434, 5435, 5436, 5438,
+ 5439, 5440, 5441, 5443, 5444, 5445, 5446, 5448, 5449, 5450, 5451, 5452, 5453,
+ 5454, 5455, 5456, 5457, 5458, 5459, 5461, 5462, 5463, 5464, 5466, 5467, 5468,
+ 5469, 5471, 5472, 5473, 5474, 5476, 5477, 5478, 5479, 5481, 5482, 5483, 5484,
+ 5486, 5487, 5488, 5489, 5491, 5492, 5493, 5494, 5495, 5496, 5500, 5501, 5502,
+ 5503, 5504, 5505, 5506, 5507, 5508, 5509, 5510, 5511, 5512, 5513, 5514, 5515,
+ 5516, 5520, 5521, 5522, 5523, 5525, 5526, 5527, 5529, 5530, 5531, 5532, 5534,
+ 5535, 5536, 5537, 5539, 5540, 5541, 5542, 5544, 5545, 5546, 5547, 5549, 5550,
+ 5551, 5552, 5554, 5555, 5556, 5557, 5559, 5560, 5561, 5562, 5563, 5564, 5565,
+ 5566, 5567, 5568, 5569, 5570, 5571, 5572, 5573, 5575, 5576, 5577, 5578, 5580,
+ 5581, 5582, 5584, 5585, 5586, 5587, 5589, 5590, 5591, 5592, 5594, 5595, 5596,
+ 5597, 5599, 5600, 5601, 5602, 5604, 5605, 5606, 5608, 5609, 5610, 5612, 5613,
+ 5614, 5615, 5616, 5620, 5621, 5622, 5623, 5624, 5625, 5626, 5628, 5629, 5630,
+ 5632, 5633, 5634, 5635, 5636, 5640, 5641, 5642, 5643, 5644, 5645, 5646, 5647,
+ 5648, 5651, 5652, 5653, 5654, 5656, 5657, 5658, 5659, 5660, 5664, 5665, 5666,
+ 5675, 5676, 5677, 5678, 5679, 5680, 5681, 5682, 5683, 5684, 5685, 5687, 5688,
+ 5689, 5690, 5692, 5693, 5694, 5695, 5697, 5698, 5699, 5700, 5702, 5703, 5704,
+ 5705, 5707, 5708, 5709, 5710, 5712, 5713, 5714, 5715, 5716, 5717, 5718, 5719,
+ 5720, 5722, 5723, 5724, 5725, 5727, 5728, 5729, 5730, 5732, 5733, 5734, 5735,
+ 5737, 5738, 5739, 5740, 5742, 5743, 5744, 5745, 5747, 5748, 5749, 5750, 5752,
+ 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765,
+ 5766, 5790, 5791, 5792, 5794, 5795, 5796, 5797, 5799, 5800, 5801, 5802, 5804,
+ 5805, 5806, 5807, 5809, 5810, 5811, 5812, 5814, 5815, 5816, 5817, 5819, 5820,
+ 5821, 5822, 5823, 5824, 5825, 5826, 5836, 5837, 5838, 5840, 5841, 5842, 5843,
+ 5845, 5846, 5847, 5849, 5850, 5851, 5855, 5856, 5857, 5859, 5860, 5861, 5863,
+ 5864, 5865, 5869, 5870, 5871, 5875, 5876, 5877, 5879, 5880, 5881, 5885, 5886,
+ 5887, 5891, 5892, 5893, 5895, 5896, 5897, 5898, 5900, 5901, 5902, 5903, 5905,
+ 5906, 5907, 5908, 5910, 5911, 5912, 5914, 5915, 5916, 5918, 5919, 5920, 5922,
+ 5923, 5924, 5926, 5927, 5928, 5930, 5931, 5932, 5933, 5934, 5935, 5936, 5937,
+ 5938, 5939, 5940, 5941, 5942, 5943, 5944, 5945, 5946, 5947, 5948, 5980, 5981,
+ 5982, 5983, 5984, 5985, 5986, 5988, 5989, 5990, 5991, 5993, 5994, 5995, 5996,
+ 5998, 5999, 6000, 6001, 6003, 6004, 6005, 6006, 6008, 6009, 6010, 6011, 6013,
+ 6014, 6015, 6016, 6017, 6021, 6022, 6023, 6025, 6026, 6027, 6028, 6030, 6031,
+ 6032, 6033, 6035, 6036, 6037, 6038, 6040, 6041, 6042, 6043, 6044, 6045, 6046,
+ 6047, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 6055, 6056, 6057, 6058, 6059,
+ 6060, 6061, 6062, 6064, 6065, 6066, 6067, 6069, 6070, 6071, 6072, 6074, 6075,
+ 6076, 6077, 6079, 6080, 6081, 6082, 6083, 6084, 6085, 6086, 6087, 6088, 6089,
+ 6090, 6091, 6092, 6093, 6094, 6095, 6096, 6097, 6098, 6099, 6100, 6101, 6102,
+ 6103, 6107, 6108, 6109, 6111, 6112, 6113, 6114, 6116, 6117, 6118, 6119, 6121,
+ 6122, 6123, 6124, 6126, 6127, 6128, 6129, 6130, 6131, 6132, 6133, 6134, 6135,
+ 6136, 6137, 6138, 6139, 6140, 6141, 6142, 6143, 6144, 6145, 6146, 6147, 6148,
+ 6149, 6151, 6152, 6153, 6155, 6156, 6157, 6158, 6160, 6161, 6162, 6163, 6165,
+ 6166, 6167, 6168, 6170, 6171, 6172, 6173, 6174, 6175, 6176, 6177, 6178, 6179,
+ 6180, 6181, 6182, 6183, 6184, 6185, 6186, 6187, 6188, 6189, 6190, 6191, 6192,
+ 6194, 6195, 6196, 6197, 6199, 6200, 6201, 6202, 6204, 6205, 6206, 6207, 6209,
+ 6210, 6211, 6212, 6213, 6214, 6215, 6216, 6217, 6218, 6219, 6220, 6221, 6222,
+ 6223, 6224, 6225, 6226, 6227, 6228, 6229, 6230, 6231, 6232, 6233, 6237, 6238,
+ 6239, 6241, 6242, 6243, 6244, 6246, 6247, 6248, 6249, 6251, 6252, 6253, 6254,
+ 6256, 6257, 6258, 6259, 6260, 6261, 6262, 6263, 6264, 6265, 6266, 6267, 6268,
+ 6269, 6270, 6271, 6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6281, 6282,
+ 6283, 6285, 6286, 6287, 6288, 6290, 6291, 6292, 6293, 6295, 6296, 6297, 6298,
+ 6300, 6301, 6302, 6303, 6304, 6305, 6306, 6307, 6308, 6309, 6310, 6311, 6312,
+ 6313, 6314, 6315, 6316, 6317, 6318, 6319, 6320, 6321, 6322, 6323, 6325, 6326,
+ 6327, 6328, 6330, 6331, 6332, 6333, 6335, 6336, 6337, 6338, 6340, 6341, 6342,
+ 6343, 6345, 6346, 6347, 6348, 6350, 6351, 6352, 6353, 6355, 6356, 6357, 6358,
+ 6360, 6361, 6362, 6363, 6365, 6366, 6367, 6368, 6370, 6371, 6372, 6373, 6375,
+ 6376, 6377, 6379, 6380, 6381, 6382, 6384, 6385, 6386, 6387, 6389, 6390, 6391,
+ 6392, 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6401, 6402, 6403, 6404, 6405,
+ 6406, 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416, 6418, 6419,
+ 6420, 6421, 6423, 6424, 6425, 6426, 6428, 6429, 6430, 6431, 6433, 6434, 6435,
+ 6436, 6437, 6438, 6439, 6440, 6441, 6442, 6443, 6444, 6445, 6446, 6447, 6448,
+ 6449, 6450, 6451, 6452, 6453, 6454, 6455, 6456, 6457, 6458, 6464, 6465, 6466,
+ 6468, 6469, 6470, 6471, 6473, 6474, 6475, 6476, 6478, 6479, 6480, 6481, 6483,
+ 6484, 6485, 6486, 6487, 6488, 6489, 6490, 6492, 6493, 6494, 6496, 6497, 6498,
+ 6499, 6501, 6502, 6503, 6504, 6506, 6507, 6508, 6509, 6511, 6512, 6513, 6514,
+ 6515, 6516, 6517, 6518, 6519, 6520, 6521, 6522, 6523, 6524, 6525, 6526, 6528,
+ 6529, 6530, 6531, 6533, 6534, 6535, 6536, 6538, 6539, 6540, 6541, 6543, 6544,
+ 6545, 6547, 6548, 6549, 6551, 6552, 6553, 6555, 6556, 6557, 6558, 6560, 6561,
+ 6562, 6563, 6565, 6566, 6567, 6568, 6570, 6571, 6572, 6573, 6574, 6575, 6576,
+ 6577, 6578, 6579, 6580, 6581, 6582, 6583, 6584, 6585, 6586, 6587, 6588, 6589,
+ 6591, 6592, 6593, 6594, 6595, 6596, 6597, 6598, 6599, 6600, 6601, 6602, 6603,
+ 6604, 6626, 6627, 6628, 6629, 6630, 6631, 6632, 6634, 6636, 6637, 6638, 6639,
+ 6641, 6642, 6643, 6644, 6646, 6647, 6648, 6649, 6651, 6652, 6653, 6655, 6656,
+ 6657, 6658, 6659, 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669,
+ 6670, 6672, 6673, 6674, 6675, 6677, 6678, 6679, 6680, 6681, 6682, 6683, 6684,
+ 6685, 6686, 6687, 6688, 6689, 6690, 6691, 6692, 6693, 6694, 6695, 6697, 6698,
+ 6699, 6700, 6702, 6703, 6704, 6706, 6707, 6708, 6710, 6711, 6712, 6713, 6714,
+ 6715, 6716, 6718, 6719, 6720, 6721, 6722, 6723, 6731, 6732, 6733, 6734, 6737,
+ 6738, 6739, 6740, 6742, 6743, 6744, 6745, 6746, 6747, 6748, 6750, 6751, 6752,
+ 6753, 6755, 6756, 6757, 6758, 6760, 6761, 6762, 6763, 6764, 6765, 6766, 6767,
+ 6769, 6770, 6771, 6772, 6774, 6775, 6776, 6777, 6779, 6780, 6781, 6782, 6784,
+ 6785, 6786, 6787, 6789, 6790, 6791, 6792, 6794, 6795, 6796, 6797, 6798, 6799,
+ 6800, 6801, 6803, 6804, 6805, 6806, 6808, 6809, 6810, 6811, 6813, 6814, 6815,
+ 6816, 6818, 6819, 6820, 6821, 6823, 6824, 6825, 6826, 6828, 6829, 6830, 6831,
+ 6832, 6833, 6834, 6835, 6837, 6838, 6839, 6840, 6842, 6843, 6844, 6845, 6847,
+ 6848, 6849, 6850, 6852, 6853, 6854, 6855, 6856, 6857, 6858, 6859, 6861, 6862,
+ 6863, 6864, 6866, 6867, 6868, 6869, 6871, 6872, 6873, 6874, 6876, 6877, 6878,
+ 6879, 6880, 6881, 6882, 6883, 6885, 6886, 6887, 6888, 6890, 6891, 6892, 6893,
+ 6895, 6896, 6897, 6898, 6900, 6901, 6902, 6903, 6905, 6906, 6907, 6908, 6910,
+ 6911, 6912, 6913, 6914, 6915, 6916, 6917, 6927, 6928, 6929, 6930, 6931, 6932,
+ 6933, 6934, 6935, 6936, 6937, 6938, 6939, 6940, 6941, 6942, 6943, 6944, 6945,
+ 6946, 6947, 6948, 6949, 6953, 6954, 6955, 6957, 6959, 6960, 6961, 6962, 6964,
+ 6965, 6966, 6967, 6969, 6970, 6971, 6972, 6973, 6977, 6978, 6979, 6980, 6981,
+ 6982, 6983, 6987, 6988, 6989, 6990, 6991, 6992, 6996, 6997, 6998, 6999, 7000,
+ 7004, 7005, 7006, 7008, 7009, 7010, 7012, 7014, 7020, 7021, 7022, 7027, 7028,
+ 7029, 7033, 7034, 7035, 7037, 7038, 7039, 7046, 7047, 7048, 7058, 7059, 7060,
+ 7070, 7071, 7072, 7076, 7077, 7078, 7082, 7083, 7084, 7094, 7095, 7096, 7097,
+ 7098, 7099, 7100, 7101, 7102, 7103, 7104, 7105, 7114, 7115, 7116, 7119, 7120,
+ 7121, 7122, 7123, 7124, 7125, 7135, 7136, 7137, 7138, 7139, 7140, 7141, 7142,
+ 7143, 7144, 7147, 7148, 7149, 7151, 7152, 7153, 7154, 7155, 7156, 7158, 7160,
+ 7161, 7162, 7171, 7172, 7173, 7174, 7175, 7176, 7177, 7178, 7180, 7181, 7182,
+ 7183, 7185, 7186, 7187, 7189, 7190, 7191, 7201, 7202, 7203, 7206, 7207, 7208,
+ 7214, 7215, 7216, 7217, 7218, 7219, 7221, 7222, 7223, 7225, 7226, 7227, 7228,
+ 7229, 7230, 7231, 7232, 7233, 7234, 7241, 7242, 7243, 7246, 7247, 7248, 7251,
+ 7252, 7253, 7257, 7258, 7259, 7265, 7266, 7267, 7269, 7270, 7271, 7272, 7273,
+ 7274, 7275, 7276, 7282, 7283, 7284, 7287, 7288, 7289, 7291, 7292, 7293, 7302,
+ 7303, 7304, 7305, 7306, 7307, 7308, 7311, 7312, 7313, 7317, 7318, 7319, 7320,
+ 7321, 7322, 7323, 7324, 7329, 7330, 7331, 7333, 7334, 7335, 7336, 7337, 7338,
+ 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7348, 7349, 7350, 7352, 7353,
+ 7354, 7359, 7360, 7361, 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, 7371,
+ 7377, 7378, 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, 7387, 7388, 7389,
+ 7390, 7391, 7392, 7393, 7394, 7395, 7400, 7401, 7402, 7403, 7404, 7405, 7406,
+ 7407, 7408, 7409, 7410, 7412, 7413, 7414, 7415, 7416, 7417, 7418, 7419, 7420,
+ 7421, 7422, 7426, 7427, 7428, 7429, 7430, 7434, 7435, 7436, 7438, 7439, 7440,
+ 7441, 7442, 7443, 7444, 7445, 7446, 7447, 7448, 7449, 7450, 7451, 7452, 7453,
+ 7457, 7458, 7459, 7460, 7461, 7462, 7463, 7465, 7466, 7467, 7468, 7469, 7470,
+ 7473, 7474, 7475, 7477, 7478, 7479, 7480, 7481, 7482, 7483, 7484, 7485, 7486,
+ 7490, 7491, 7492, 7493, 7494, 7497, 7498, 7499, 7500, 7501, 7502, 7503, 7504,
+ 7505, 7510, 7511, 7512, 7513, 7514, 7515, 7519, 7520, 7521, 7522, 7523, 7524,
+ 7525, 7526, 7527, 7528, 7532, 7533, 7534, 7536, 7537, 7538, 7539, 7540, 7542,
+ 7543, 7544, 7545, 7546, 7547, 7548, 7549, 7550, 7551, 7552, 7553, 7554, 7555,
+ 7556, 7557, 7558, 7559, 7560, 7561, 7562, 7563, 7564, 7565, 7566, 7567, 7572,
+ 7573, 7574, 7575, 7576, 7577, 7578, 7579, 7580, 7581, 7582, 7583, 7584, 7585,
+ 7586, 7587, 7588, 7589, 7590, 7591, 7592, 7593, 7594, 7595, 7596, 7597, 7598,
+ 7599, 7600, 7601, 7605, 7606, 7607, 7608, 7609, 7610, 7611, 7612, 7613, 7615,
+ 7616, 7617, 7618, 7619, 7620, 7621, 7622, 7623, 7624, 7625, 7628, 7629, 7630,
+ 7632, 7633, 7634, 7639, 7640, 7641, 7647, 7648, 7649, 7650, 7651, 7652, 7654,
+ 7663, 7664, 7665, 7670, 7671, 7672, 7675, 7676, 7677, 7678, 7679, 7680, 7681,
+ 7682, 7683, 7690, 7691, 7692, 7693, 7694, 7695, 7696, 7697, 7698, 7699, 7700,
+ 7701, 7702, 7704, 7706, 7710, 7711, 7712, 7718, 7719, 7720, 7728, 7729, 7730,
+ 7739, 7740, 7741, 7744, 7745, 7746, 7748, 7754, 7755, 7756, 7762, 7763, 7764,
+ 7766, 7767, 7768, 7769, 7770, 7771, 7772, 7773, 7774, 7775, 7776, 7777, 7778,
+ 7779, 7787, 7788, 7789, 7790, 7791, 7792, 7793, 7794, 7795, 7796, 7797, 7798,
+ 7810, 7811, 7812, 7814, 7815, 7816, 7817, 7818, 7819, 7820, 7821, 7822, 7824,
+ 7825, 7826, 7827, 7828, 7829, 7830, 7831, 7832, 7833, 7834, 7835, 7836, 7837,
+ 7838, 7842, 7843, 7844, 7845, 7846, 7847, 7848, 7849, 7850, 7852, 7853, 7854,
+ 7855, 7856, 7857, 7858, 7859, 7860, 7862, 7863, 7864, 7865, 7866, 7867, 7868,
+ 7869, 7870, 7871, 7872, 7873, 7874, 7875, 7876, 7877, 7878, 7879, 7882, 7883,
+ 7884, 7885, 7886, 7887, 7888, 7889, 7890, 7891, 7892, 7893, 7894, 7895, 7896,
+ 7897, 7898, 7899, 7900, 7901, 7902, 7903, 7904, 7905, 7912, 7913, 7914, 7915,
+ 7916, 7917, 7918, 7919, 7920, 7921, 7922, 7923, 7924, 7925, 7926, 7927, 7928,
+ 7929, 7930, 7931, 7932, 7933, 7934, 7935, 7936, 7937, 7938, 7946, 7947, 7948,
+ 7949, 7950, 7951, 7952, 7953, 7954, 7955, 7956, 7964, 7965, 7966, 7967, 7968,
+ 7969, 7970, 7971, 7972, 7973, 7974, 7975, 7976, 7977, 7978, 7979, 7980, 7981,
+ 7982, 7983, 7984, 7985, 7986, 7987, 7994, 7995, 7996, 7997, 7998, 7999, 8000,
+ 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011, 8012, 8013,
+ 8014, 8020, 8021, 8022, 8023, 8024, 8025, 8026, 8027, 8028, 8029, 8030, 8031,
+ 8032, 8033, 8034, 8035, 8036, 8037, 8042, 8043, 8044, 8045, 8046, 8047, 8048,
+ 8049, 8050, 8051, 8052, 8053, 8054, 8055, 8056, 8060, 8061, 8062, 8063, 8064,
+ 8065, 8066, 8070, 8071, 8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 8080,
+ 8081, 8082, 8083, 8084, 8085, 8086, 8087, 8088, 8089, 8090, 8094, 8095, 8096,
+ 8097, 8098, 8100, 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8108, 8109, 8110,
+ 8111, 8114, 8115, 8116, 8117, 8118, 8119, 8120, 8121, 8122, 8123, 8124, 8125,
+ 8126, 8127, 8128, 8130, 8131, 8132, 8133, 8134, 8135, 8136, 8137, 8138, 8139,
+ 8140, 8141, 8142, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155,
+ 8156, 8157, 8158, 8159, 8160, 8161, 8162, 8163, 8164, 8165, 8166, 8167, 8170,
+ 8171, 8172, 8173, 8174, 8175, 8176, 8177, 8178, 8179, 8180, 8182, 8183, 8184,
+ 8185, 8186, 8187, 8188, 8189, 8190, 8196, 8197, 8198, 8199, 8200, 8201, 8202,
+ 8203, 8204, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215,
+ 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8227, 8228, 8229,
+ 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8242, 8243, 8244,
+ 8245, 8246, 8247, 8248, 8249, 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8257,
+ 8258, 8259, 8260, 8261, 8262, 8263, 8264, 8265, 8266, 8268, 8269, 8270, 8271,
+ 8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281, 8282, 8283, 8284,
+ 8285, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297,
+ 8298, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310,
+ 8311, 8312, 8313, 8314, 8315, 8316, 8317, 8318, 8319, 8320, 8324, 8325, 8326,
+ 8327, 8328, 8329, 8330, 8331, 8332, 8334, 8335, 8336, 8337, 8338, 8339, 8340,
+ 8341, 8342, 8348, 8349, 8350, 8351, 8353, 8354, 8355, 8356, 8358, 8359, 8360,
+ 8361, 8363, 8364, 8365, 8366, 8368, 8369, 8370, 8371, 8372, 8373, 8385, 8386,
+ 8387, 8388, 8390, 8391, 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400,
+ 8402, 8403, 8404, 8405, 8407, 8408, 8409, 8410, 8412, 8413, 8414, 8415, 8416,
+ 8417, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8425, 8426, 8427, 8428, 8429,
+ 8430, 8431, 8432, 8433, 8434, 8435, 8436, 8437, 8438, 8439, 8440, 8441, 8442,
+ 8444, 8445, 8446, 8447, 8449, 8450, 8451, 8452, 8454, 8455, 8456, 8457, 8459,
+ 8460, 8461, 8462, 8464, 8465, 8466, 8467, 8468, 8469, 8470, 8471, 8472, 8473,
+ 8474, 8475, 8476, 8477, 8478, 8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486,
+ 8487, 8489, 8490, 8491, 8492, 8494, 8495, 8496, 8497, 8499, 8500, 8501, 8502,
+ 8504, 8505, 8506, 8507, 8509, 8510, 8511, 8512, 8514, 8515, 8516, 8517, 8519,
+ 8520, 8521, 8522, 8525, 8526, 8527, 8528, 8529, 8530, 8531, 8532, 8533, 8534,
+ 8535, 8537, 8538, 8539, 8540, 8542, 8543, 8544, 8545, 8547, 8548, 8549, 8550,
+ 8552, 8553, 8554, 8555, 8557, 8558, 8559, 8560, 8561, 8562, 8563, 8564, 8566,
+ 8567, 8568, 8569, 8571, 8572, 8573, 8574, 8576, 8577, 8578, 8579, 8581, 8582,
+ 8583, 8584, 8586, 8587, 8588, 8589, 8591, 8592, 8593, 8594, 8596, 8597, 8598,
+ 8599, 8600, 8601, 8602, 8604, 8606, 8615, 8616, 8617, 8618, 8619, 8620, 8621,
+ 8622, 8623, 8624, 8625, 8626, 8627, 8628, 8629, 8630, 8631, 8632, 8633, 8636,
+ 8637, 8638, 8639, 8640, 8641, 8643, 8644, 8645, 8646, 8647, 8648, 8651, 8652,
+ 8653, 8654, 8655, 8656, 8657, 8658, 8663, 8664, 8665, 8666, 8669, 8670, 8671,
+ 8672, 8673, 8674, 8675, 8676, 8678, 8679, 8680, 8681, 8682, 8683, 8687, 8688,
+ 8689, 8691, 8692, 8693, 8694, 8696, 8697, 8698, 8699, 8700, 8701, 8702, 8703,
+ 8704, 8705, 8706, 8707, 8708, 8709, 8710, 8711, 8712, 8713, 8714, 8715, 8716,
+ 8717, 8718, 8719, 8720, 8721, 8722, 8723, 8724, 8725, 8726, 8727, 8728, 8729,
+ 8730, 8732, 8733, 8734, 8735, 8737, 8738, 8739, 8740, 8742, 8743, 8744, 8745,
+ 8746, 8747, 8748, 8749, 8750, 8751, 8752, 8753, 8754, 8755, 8756, 8757, 8758,
+ 8759, 8760, 8761, 8762, 8763, 8764, 8765, 8766, 8767, 8768, 8769, 8770, 8771,
+ 8772, 8774, 8775, 8776, 8777, 8778, 8779, 8780, 8781, 8782, 8783, 8784, 8785,
+ 8786, 8787, 8788, 8789, 8790, 8791, 8792, 8793, 8794, 8795, 8796, 8797, 8798,
+ 8799, 8800, 8801, 8802, 8803, 8804, 8805, 8806, 8807, 8808, 8809, 8810, 8811,
+ 8812, 8813, 8814, 8815, 8816, 8817, 8818, 8819, 8820, 8821, 8822, 8823, 8824,
+ 8825, 8826, 8827, 8828, 8829, 8830, 8831, 8832, 8833, 8834, 8835, 8836, 8837,
+ 8838, 8839, 8840, 8841, 8842, 8843, 8844, 8845, 8846, 8847, 8848, 8849, 8850,
+ 8851, 8852, 8853, 8854, 8855, 8856, 8857, 8858, 8859, 8860, 8861, 8862, 8863,
+ 8864, 8865, 8866, 8867, 8868, 8869, 8870, 8871, 8872, 8873, 8874, 8875, 8876,
+ 8877, 8878, 8879, 8880, 8881, 8882, 8883, 8884, 8885, 8886, 8887, 8888, 8889,
+ 8890, 8891, 8892, 8893, 8894, 8895, 8896, 8897, 8898, 8899, 8900, 8901, 8902,
+ 8903, 8904, 8905, 8906, 8907, 8908, 8909, 8910, 8911, 8912, 8913, 8914, 8915,
+ 8916, 8917, 8918, 8919, 8920, 8921, 8922, 8923, 8924, 8926, 8928, 8930, 8932,
+ 8934, 8936, 8938, 8940, 8942, 8951, 8952, 8953, 8954, 8955, 8956, 8957, 8958,
+ 8959, 8960, 8961, 8962, 8963, 8964, 8965, 8966, 8967, 8968, 8969, 8970, 8971,
+ 8973, 8974, 8975, 8976, 8977, 8978, 8981, 8982, 8983, 8984, 8986, 8987, 8988,
+ 8989, 8990, 8991, 8997, 8998, 8999, 9000, 9001, 9002, 9003, 9004, 9005, 9006,
+ 9007, 9008, 9009, 9010, 9011, 9012, 9013, 9014, 9015, 9017, 9018, 9019, 9020,
+ 9021, 9022, 9023, 9024, 9026, 9027, 9028, 9029, 9031, 9032, 9033, 9034, 9035,
+ 9036, 9037, 9038, 9039, 9040, 9042, 9043, 9044, 9045, 9047, 9048, 9049, 9050,
+ 9052, 9053, 9054, 9055, 9056, 9060, 9061, 9062, 9063, 9064, 9065, 9066, 9067,
+ 9068, 9069, 9070, 9071, 9072, 9073, 9074, 9075, 9076, 9077, 9078, 9079, 9080,
+ 9081, 9083, 9084, 9085, 9086, 9087, 9088, 9089, 9090, 9091, 9092, 9093, 9094,
+ 9095, 9096, 9097, 9098, 9099, 9100, 9101, 9102, 9103, 9104, 9105, 9106, 9107,
+ 9108, 9109, 9110, 9111, 9112, 9113, 9114, 9115, 9116, 9117, 9118, 9119, 9120,
+ 9121, 9122, 9124, 9125, 9126, 9127, 9128, 9131, 9132, 9133, 9134, 9135, 9139,
+ 9140, 9141, 9142, 9143, 9144, 9145, 9151, 9152, 9153, 9154, 9156, 9157, 9158,
+ 9159, 9161, 9162, 9163, 9164, 9166, 9167, 9168, 9169, 9176, 9177, 9178, 9179,
+ 9180, 9181, 9183, 9184, 9185, 9186, 9188, 9189, 9190, 9191, 9193, 9194, 9195,
+ 9196, 9198, 9199, 9200, 9201, 9203, 9204, 9205, 9206, 9207, 9209, 9210, 9211,
+ 9212, 9214, 9215, 9216, 9218, 9219, 9220, 9221, 9223, 9224, 9225, 9226, 9228,
+ 9229, 9230, 9231, 9233, 9234, 9235, 9236, 9237, 9238, 9239, 9240, 9241, 9242,
+ 9243, 9244, 9245, 9246, 9247, 9248, 9249, 9250, 9251, 9252, 9253, 9254, 9255,
+ 9256, 9258, 9259, 9260, 9261, 9263, 9264, 9265, 9266, 9268, 9269, 9270, 9271,
+ 9273, 9274, 9275, 9276, 9278, 9279, 9280, 9281, 9283, 9284, 9285, 9286, 9288,
+ 9289, 9290, 9291, 9293, 9294, 9295, 9296, 9298, 9299, 9300, 9301, 9303, 9304,
+ 9305, 9306, 9308, 9309, 9310, 9311, 9313, 9314, 9315, 9316, 9317, 9318, 9319,
+ 9320, 9322, 9323, 9324, 9327, 9328, 9329, 9330, 9331, 9332, 9333, 9335, 9336,
+ 9337, 9338, 9340, 9341, 9342, 9343, 9345, 9346, 9347, 9348, 9350, 9351, 9352,
+ 9353, 9354, 9355, 9356, 9358, 9359, 9360, 9361, 9363, 9364, 9365, 9367, 9368,
+ 9369, 9370, 9372, 9373, 9374, 9376, 9377, 9378, 9379, 9381, 9382, 9383, 9384,
+ 9385, 9386, 9387, 9392, 9393, 9394, 9395, 9396, 9397, 9398, 9403, 9404, 9405,
+ 9406, 9407, 9408, 9409, 9410, 9411, 9414, 9415, 9416, 9417, 9421, 9422, 9423,
+ 9424, 9426, 9427, 9428, 9429, 9431, 9432, 9438, 9439, 9440, 9442, 9443, 9444,
+ 9445, 9446, 9447, 9448, 9449, 9451, 9452, 9453, 9454, 9456, 9457, 9458, 9459,
+ 9461, 9462, 9463, 9464, 9466, 9467, 9468, 9469, 9471, 9472, 9473, 9474, 9476,
+ 9477, 9478, 9479, 9480, 9481, 9482, 9483, 9484, 9485, 9486, 9487, 9488, 9489,
+ 9490, 9491, 9492, 9493, 9494, 9495, 9496, 9497, 9498, 9499, 9500, 9501, 9502,
+ 9503, 9504, 9505, 9506, 9507, 9508, 9510, 9511, 9512, 9513, 9514, 9515, 9516,
+ 9517, 9518, 9519, 9520, 9521, 9523, 9524, 9525, 9526, 9528, 9529, 9530, 9531,
+ 9533, 9534, 9535, 9536, 9538, 9539, 9540, 9541, 9543, 9544, 9545, 9546, 9548,
+ 9549, 9550, 9551, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9562, 9563,
+ 9564, 9565, 9567, 9568, 9569, 9570, 9572, 9573, 9574, 9575, 9577, 9578, 9579,
+ 9580, 9582, 9583, 9584, 9585, 9587, 9588, 9589, 9590, 9592, 9593, 9594, 9595,
+ 9597, 9598, 9599, 9600, 9601, 9602, 9603, 9604, 9606, 9607, 9608, 9609, 9611,
+ 9612, 9613, 9614, 9616, 9617, 9618, 9619, 9620, 9621, 9622, 9623, 9624, 9626,
+ 9627, 9628, 9629, 9630, 9631, 9632, 9633, 9634, 9635, 9636, 9637, 9638, 9639,
+ 9640, 9641, 9642, 9643, 9644, 9645, 9646, 9647, 9648, 9649, 9650, 9651, 9652,
+ 9653, 9655, 9656, 9657, 9658, 9659, 9660, 9661, 9662, 9664, 9665, 9666, 9667,
+ 9669, 9670, 9671, 9672, 9673, 9674, 9676, 9677, 9678, 9679, 9681, 9682, 9683,
+ 9684, 9686, 9687, 9688, 9689, 9690, 9691, 9693, 9694, 9695, 9696, 9697, 9698,
+ 9699, 9700, 9701, 9702, 9703, 9704, 9705, 9706, 9707, 9708, 9709, 9710, 9712,
+ 9713, 9714, 9715, 9716, 9720, 9721, 9722, 9723, 9724, 9725, 9726, 9734, 9735,
+ 9736, 9737, 9738, 9739, 9741, 9742, 9743, 9744, 9746, 9747, 9748, 9749, 9751,
+ 9752, 9753, 9754, 9756, 9757, 9758, 9759, 9760, 9761, 9762, 9763, 9764, 9765,
+ 9766, 9767, 9769, 9770, 9771, 9772, 9774, 9775, 9776, 9777, 9778, 9779, 9780,
+ 9781, 9782, 9783, 9784, 9785, 9786, 9787, 9788, 9789, 9790, 9792, 9793, 9794,
+ 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9802, 9803, 9804, 9805, 9806, 9808,
+ 9809, 9810, 9811, 9812, 9813, 9814, 9815, 9817, 9818, 9819, 9820, 9822, 9823,
+ 9824, 9825, 9827, 9828, 9829, 9830, 9831, 9832, 9834, 9835, 9836, 9837, 9839,
+ 9840, 9841, 9842, 9844, 9845, 9846, 9847, 9849, 9850, 9851, 9852, 9853, 9854,
+ 9855, 9856, 9857, 9858, 9859, 9860, 9866, 9867, 9868, 9869, 9870, 9871, 9874,
+ 9875, 9876, 9877, 9878, 9879, 9880, 9881, 9882, 9883, 9884, 9885, 9886, 9887,
+ 9888, 9889, 9890, 9891, 9892, 9893, 9894, 9895, 9898, 9899, 9900, 9901, 9902,
+ 9903, 9904, 9905, 9906, 9907, 9908, 9909, 9911, 9912, 9913, 9914, 9915, 9916,
+ 9917, 9918, 9919, 9920, 9921, 9922, 9923, 9924, 9925, 9926, 9927, 9928, 9929,
+ 9930, 9931, 9932, 9933, 9934, 9935, 9936, 9937, 9938, 9939, 9940, 9946, 9947,
+ 9948, 9949, 9950, 9951, 9952, 9953, 9954, 9955, 9956, 9957, 9960, 9961, 9962,
+ 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9982, 9983, 9984,
+ 9986, 9987, 9988, 9989, 9991, 9992, 9993, 9994, 9996, 9997, 9998, 9999, 10001,
+ 10002, 10003, 10004, 10006, 10007, 10008, 10009, 10011, 10012, 10013, 10014,
+ 10016, 10017, 10018, 10019, 10021, 10022, 10023, 10024, 10026, 10027, 10028,
+ 10029, 10031, 10032, 10033, 10034, 10036, 10037, 10038, 10040, 10041, 10042,
+ 10043, 10044, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10056, 10057,
+ 10058, 10059, 10061, 10062, 10063, 10064, 10065, 10066, 10067, 10068, 10070,
+ 10071, 10072, 10073, 10075, 10076, 10077, 10078, 10080, 10081, 10082, 10083,
+ 10085, 10086, 10087, 10088, 10090, 10091, 10092, 10093, 10095, 10096, 10097,
+ 10098, 10100, 10101, 10102, 10103, 10105, 10106, 10107, 10108, 10110, 10111,
+ 10112, 10113, 10115, 10116, 10117, 10118, 10120, 10121, 10122, 10123, 10125,
+ 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10138, 10139, 10140, 10141,
+ 10143, 10144, 10145, 10146, 10148, 10149, 10150, 10151, 10152, 10153, 10154,
+ 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10164, 10165, 10166, 10167,
+ 10169, 10170, 10171, 10172, 10173, 10174, 10176, 10177, 10178, 10179, 10181,
+ 10182, 10183, 10184, 10186, 10187, 10188, 10189, 10191, 10192, 10193, 10194,
+ 10196, 10197, 10198, 10199, 10201, 10202, 10203, 10204, 10206, 10207, 10208,
+ 10209, 10211, 10212, 10213, 10214, 10216, 10217, 10218, 10219, 10221, 10222,
+ 10223, 10224, 10226, 10227, 10228, 10229, 10231, 10232, 10233, 10234, 10236,
+ 10237, 10238, 10239, 10241, 10242, 10243, 10244, 10245, 10246, 10248, 10249,
+ 10250, 10251, 10253, 10254, 10255, 10256, 10258, 10259, 10260, 10261, 10263,
+ 10264, 10265, 10266, 10268, 10269, 10270, 10271, 10272, 10276, 10277, 10278,
+ 10279, 10280, 10281, 10282, 10283, 10285, 10286, 10287, 10288, 10289, 10290,
+ 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10304,
+ 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315,
+ 10320, 10321, 10322, 10323, 10324, 10325, 10327, 10328, 10329, 10330, 10331,
+ 10332, 10334, 10335, 10336, 10337, 10339, 10340, 10341, 10342, 10343, 10344,
+ 10345, 10346, 10347, 10356, 10357, 10358, 10359, 10360, 10364, 10365, 10366,
+ 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377,
+ 10378, 10379, 10380, 10381, 10382, 10383, 10384, 10385, 10386, 10387, 10388,
+ 10389, 10391, 10392, 10393, 10394, 10396, 10397, 10398, 10399, 10400, 10401,
+ 10402, 10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412,
+ 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10422, 10423, 10424,
+ 10425, 10426, 10427, 10429, 10430, 10431, 10432, 10434, 10435, 10436, 10437,
+ 10439, 10440, 10441, 10442, 10444, 10445, 10446, 10447, 10449, 10450, 10451,
+ 10452, 10454, 10455, 10456, 10457, 10458, 10459, 10461, 10462, 10463, 10464,
+ 10466, 10467, 10468, 10469, 10471, 10472, 10473, 10474, 10475, 10476, 10478,
+ 10479, 10480, 10481, 10483, 10484, 10485, 10486, 10488, 10489, 10490, 10491,
+ 10493, 10494, 10495, 10496, 10497, 10498, 10499, 10512, 10513, 10514, 10515,
+ 10517, 10518, 10519, 10520, 10522, 10523, 10524, 10525, 10527, 10528, 10529,
+ 10530, 10532, 10533, 10534, 10535, 10536, 10537, 10541, 10542, 10543, 10544,
+ 10546, 10547, 10548, 10549, 10550, 10554, 10555, 10556, 10557, 10558, 10559,
+ 10560, 10561, 10562, 10563, 10565, 10566, 10567, 10568, 10569, 10570, 10571,
+ 10572, 10573, 10574, 10575, 10576, 10577, 10578, 10579, 10580, 10581, 10582,
+ 10583, 10584, 10585, 10586, 10587, 10588, 10589, 10590, 10591, 10592, 10593,
+ 10594, 10595, 10596, 10597, 10598, 10600, 10601, 10602, 10603, 10604, 10608,
+ 10609, 10610, 10611, 10612, 10613, 10615, 10616, 10617, 10618, 10620, 10621,
+ 10622, 10623, 10625, 10626, 10627, 10628, 10630, 10631, 10632, 10633, 10635,
+ 10636, 10637, 10638, 10639, 10640, 10641, 10642, 10643, 10644, 10645, 10646,
+ 10647, 10648, 10650, 10651, 10652, 10653, 10655, 10656, 10657, 10658, 10660,
+ 10661, 10662, 10663, 10665, 10666, 10667, 10668, 10670, 10671, 10672, 10673,
+ 10675, 10676, 10677, 10678, 10680, 10681, 10682, 10683, 10685, 10686, 10687,
+ 10688, 10690, 10691, 10692, 10693, 10695, 10696, 10697, 10698, 10700, 10701,
+ 10702, 10703, 10704, 10705, 10706, 10707, 10708, 10709, 10711, 10712, 10713,
+ 10714, 10716, 10717, 10718, 10719, 10721, 10722, 10723, 10724, 10726, 10727,
+ 10728, 10729, 10731, 10732, 10733, 10734, 10736, 10737, 10738, 10739, 10741,
+ 10742, 10743, 10744, 10746, 10747, 10748, 10749, 10751, 10752, 10753, 10754,
+ 10756, 10757, 10758, 10759, 10760, 10761, 10762, 10763, 10764, 10765, 10766,
+ 10767, 10769, 10770, 10771, 10772, 10774, 10775, 10776, 10777, 10779, 10780,
+ 10781, 10782, 10784, 10785, 10786, 10787, 10789, 10790, 10791, 10792, 10794,
+ 10795, 10796, 10797, 10799, 10800, 10801, 10802, 10803, 10804, 10808, 10809,
+ 10810, 10811, 10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 10820,
+ 10821, 10822, 10823, 10827, 10828, 10829, 10830, 10832, 10833, 10834, 10835,
+ 10836, 10837, 10839, 10840, 10841, 10842, 10844, 10845, 10846, 10847, 10849,
+ 10850, 10851, 10852, 10854, 10855, 10856, 10857, 10859, 10860, 10861, 10862,
+ 10864, 10865, 10866, 10867, 10868, 10869, 10870, 10871, 10872, 10873, 10874,
+ 10875, 10876, 10877, 10879, 10880, 10881, 10882, 10884, 10885, 10886, 10887,
+ 10888, 10889, 10891, 10892, 10893, 10894, 10896, 10897, 10898, 10899, 10901,
+ 10902, 10903, 10904, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913,
+ 10914, 10918, 10919, 10920, 10921, 10922, 10923, 10924, 10925, 10926, 10927,
+ 10928, 10929, 10930, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 10941,
+ 10942, 10945, 10946, 10947, 10948, 10950, 10951, 10952, 10953, 10954, 10958,
+ 10959, 10960, 10961, 10962, 10963, 10964, 10965, 10966, 10967, 10968, 10969,
+ 10970, 10971, 10972, 10973, 10975, 10976, 10977, 10978, 10980, 10981, 10982,
+ 10983, 10985, 10986, 10987, 10988, 10990, 10991, 10992, 10993, 10995, 10996,
+ 10997, 10998, 10999, 11000, 11001, 11002, 11003, 11005, 11006, 11007, 11008,
+ 11010, 11011, 11012, 11013, 11015, 11016, 11017, 11018, 11020, 11021, 11022,
+ 11023, 11025, 11026, 11027, 11028, 11030, 11031, 11032, 11033, 11035, 11036,
+ 11037, 11038, 11039, 11040, 11041, 11042, 11043, 11044, 11045, 11046, 11047,
+ 11048, 11049, 11073, 11074, 11075, 11076, 11077, 11078, 11080, 11081, 11082,
+ 11083, 11085, 11086, 11087, 11088, 11090, 11091, 11092, 11093, 11095, 11096,
+ 11097, 11098, 11100, 11101, 11102, 11103, 11104, 11105, 11106, 11107, 11117,
+ 11118, 11119, 11120, 11121, 11122, 11124, 11125, 11126, 11127, 11128, 11129,
+ 11130, 11131, 11132, 11133, 11134, 11135, 11136, 11137, 11138, 11139, 11140,
+ 11141, 11142, 11143, 11144, 11145, 11146, 11147, 11149, 11150, 11151, 11152,
+ 11154, 11155, 11156, 11157, 11159, 11160, 11161, 11162, 11163, 11164, 11165,
+ 11166, 11167, 11168, 11169, 11170, 11171, 11172, 11173, 11174, 11175, 11176,
+ 11177, 11178, 11179, 11180, 11181, 11182, 11183, 11184, 11185, 11186, 11187,
+ 11219, 11220, 11221, 11222, 11223, 11224, 11225, 11226, 11227, 11228, 11230,
+ 11231, 11232, 11233, 11235, 11236, 11237, 11238, 11240, 11241, 11242, 11243,
+ 11245, 11246, 11247, 11248, 11250, 11251, 11252, 11253, 11254, 11258, 11259,
+ 11260, 11261, 11262, 11263, 11265, 11266, 11267, 11268, 11270, 11271, 11272,
+ 11273, 11275, 11276, 11277, 11278, 11279, 11280, 11281, 11282, 11283, 11284,
+ 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295,
+ 11296, 11297, 11298, 11299, 11300, 11302, 11303, 11304, 11305, 11307, 11308,
+ 11309, 11310, 11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320,
+ 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331,
+ 11332, 11333, 11334, 11335, 11336, 11340, 11341, 11342, 11343, 11344, 11345,
+ 11347, 11348, 11349, 11350, 11352, 11353, 11354, 11355, 11357, 11358, 11359,
+ 11360, 11361, 11362, 11363, 11364, 11365, 11366, 11367, 11368, 11369, 11370,
+ 11371, 11372, 11373, 11374, 11375, 11376, 11377, 11378, 11379, 11380, 11382,
+ 11383, 11384, 11385, 11386, 11387, 11389, 11390, 11391, 11392, 11394, 11395,
+ 11396, 11397, 11399, 11400, 11401, 11402, 11403, 11404, 11405, 11406, 11407,
+ 11408, 11409, 11410, 11411, 11412, 11413, 11414, 11415, 11416, 11417, 11418,
+ 11419, 11420, 11421, 11422, 11423, 11424, 11426, 11427, 11428, 11429, 11431,
+ 11432, 11433, 11434, 11436, 11437, 11438, 11439, 11440, 11441, 11442, 11443,
+ 11444, 11445, 11446, 11447, 11448, 11449, 11450, 11451, 11452, 11453, 11454,
+ 11455, 11456, 11457, 11458, 11459, 11460, 11464, 11465, 11466, 11467, 11468,
+ 11469, 11471, 11472, 11473, 11474, 11476, 11477, 11478, 11479, 11481, 11482,
+ 11483, 11484, 11485, 11486, 11487, 11488, 11489, 11490, 11491, 11492, 11493,
+ 11494, 11495, 11496, 11497, 11498, 11499, 11500, 11501, 11502, 11503, 11504,
+ 11506, 11507, 11508, 11509, 11510, 11511, 11513, 11514, 11515, 11516, 11518,
+ 11519, 11520, 11521, 11523, 11524, 11525, 11526, 11527, 11528, 11529, 11530,
+ 11531, 11532, 11533, 11534, 11535, 11536, 11537, 11538, 11539, 11540, 11541,
+ 11542, 11543, 11544, 11545, 11546, 11548, 11549, 11550, 11551, 11553, 11554,
+ 11555, 11556, 11558, 11559, 11560, 11561, 11563, 11564, 11565, 11566, 11568,
+ 11569, 11570, 11571, 11573, 11574, 11575, 11576, 11578, 11579, 11580, 11581,
+ 11583, 11584, 11585, 11586, 11588, 11589, 11590, 11591, 11593, 11594, 11595,
+ 11596, 11598, 11599, 11600, 11601, 11602, 11603, 11605, 11606, 11607, 11608,
+ 11610, 11611, 11612, 11613, 11615, 11616, 11617, 11618, 11619, 11620, 11621,
+ 11622, 11623, 11624, 11625, 11626, 11627, 11628, 11629, 11630, 11631, 11632,
+ 11633, 11634, 11635, 11636, 11637, 11638, 11639, 11640, 11642, 11643, 11644,
+ 11645, 11647, 11648, 11649, 11650, 11652, 11653, 11654, 11655, 11656, 11657,
+ 11658, 11659, 11660, 11661, 11662, 11663, 11664, 11665, 11666, 11667, 11668,
+ 11669, 11670, 11671, 11672, 11673, 11674, 11675, 11676, 11677, 11683, 11684,
+ 11685, 11686, 11687, 11688, 11690, 11691, 11692, 11693, 11695, 11696, 11697,
+ 11698, 11700, 11701, 11702, 11703, 11704, 11705, 11706, 11707, 11709, 11710,
+ 11711, 11712, 11713, 11714, 11716, 11717, 11718, 11719, 11721, 11722, 11723,
+ 11724, 11726, 11727, 11728, 11729, 11730, 11731, 11732, 11733, 11734, 11735,
+ 11736, 11737, 11738, 11739, 11740, 11741, 11743, 11744, 11745, 11746, 11748,
+ 11749, 11750, 11751, 11753, 11754, 11755, 11756, 11758, 11759, 11760, 11762,
+ 11763, 11764, 11766, 11767, 11768, 11769, 11770, 11771, 11773, 11774, 11775,
+ 11776, 11778, 11779, 11780, 11781, 11783, 11784, 11785, 11786, 11787, 11788,
+ 11789, 11790, 11791, 11792, 11793, 11794, 11795, 11796, 11797, 11798, 11799,
+ 11800, 11801, 11802, 11804, 11805, 11806, 11807, 11808, 11809, 11810, 11811,
+ 11812, 11813, 11814, 11815, 11816, 11817, 11839, 11840, 11841, 11842, 11843,
+ 11844, 11845, 11847, 11849, 11850, 11851, 11852, 11854, 11855, 11856, 11857,
+ 11859, 11860, 11861, 11862, 11864, 11865, 11866, 11867, 11868, 11869, 11870,
+ 11871, 11872, 11873, 11874, 11875, 11876, 11877, 11878, 11879, 11880, 11881,
+ 11883, 11884, 11885, 11886, 11888, 11889, 11890, 11891, 11892, 11893, 11894,
+ 11895, 11896, 11897, 11898, 11899, 11900, 11901, 11902, 11903, 11904, 11905,
+ 11907, 11908, 11909, 11910, 11912, 11913, 11914, 11915, 11916, 11917, 11918,
+ 11919, 11920, 11921, 11923, 11924, 11925, 11926, 11927, 11928, 11936, 11937,
+ 11938, 11939, 11942, 11943, 11944, 11945, 11947, 11948, 11949, 11950, 11951,
+ 11952, 11953, 11955, 11956, 11957, 11958, 11960, 11961, 11962, 11963, 11965,
+ 11966, 11967, 11968, 11969, 11970, 11971, 11972, 11974, 11975, 11976, 11977,
+ 11979, 11980, 11981, 11982, 11984, 11985, 11986, 11987, 11989, 11990, 11991,
+ 11992, 11994, 11995, 11996, 11997, 11999, 12000, 12001, 12002, 12003, 12004,
+ 12005, 12006, 12008, 12009, 12010, 12011, 12013, 12014, 12015, 12016, 12018,
+ 12019, 12020, 12021, 12023, 12024, 12025, 12026, 12028, 12029, 12030, 12031,
+ 12033, 12034, 12035, 12036, 12037, 12038, 12039, 12040, 12042, 12043, 12044,
+ 12045, 12047, 12048, 12049, 12050, 12052, 12053, 12054, 12055, 12057, 12058,
+ 12059, 12060, 12061, 12062, 12063, 12064, 12066, 12067, 12068, 12069, 12071,
+ 12072, 12073, 12074, 12076, 12077, 12078, 12079, 12081, 12082, 12083, 12084,
+ 12085, 12086, 12087, 12088, 12090, 12091, 12092, 12093, 12095, 12096, 12097,
+ 12098, 12100, 12101, 12102, 12103, 12105, 12106, 12107, 12108, 12110, 12111,
+ 12112, 12113, 12115, 12116, 12117, 12118, 12119, 12120, 12121, 12122, 12132,
+ 12133, 12134, 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143,
+ 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154,
+ 12158, 12159, 12160, 12162, 12164, 12165, 12166, 12167, 12169, 12170, 12171,
+ 12172, 12174, 12175, 12176, 12177, 12178, 12182, 12183, 12184, 12185, 12186,
+ 12187, 12188, 12192, 12193, 12194, 12195, 12196, 12197, 12198, 12199, 12200,
+ 12204, 12205, 12206, 12207, 12208, 12210, 12212, 12218, 12219, 12220, 12221,
+ 12222, 12223, 12224, 12225, 12226, 12227, 12228, 12229, 12230, 12231, 12232,
+ 12233, 12234, 12235, 12236, 12237, 12238, 12239, 12240, 12241, 12242, 12243,
+ 12244, 12245, 12246, 12247, 12256, 12257, 12258, 12259, 12260, 12261, 12262,
+ 12263, 12264, 12265, 12266, 12267, 12268, 12269, 12270, 12271, 12272, 12273,
+ 12276, 12277, 12278, 12279, 12280, 12281, 12282, 12284, 12286, 12287, 12288,
+ 12297, 12298, 12299, 12300, 12301, 12302, 12303, 12304, 12306, 12307, 12308,
+ 12309, 12311, 12312, 12313, 12314, 12315, 12316, 12317, 12318, 12319, 12320,
+ 12321, 12322, 12323, 12324, 12325, 12326, 12327, 12328, 12329, 12330, 12331,
+ 12332, 12333, 12334, 12341, 12342, 12343, 12344, 12345, 12346, 12347, 12348,
+ 12349, 12350, 12351, 12352, 12353, 12354, 12355, 12356, 12357, 12358, 12364,
+ 12365, 12366, 12367, 12368, 12369, 12370, 12371, 12372, 12373, 12374, 12375,
+ 12378, 12379, 12380, 12381, 12382, 12383, 12384, 12385, 12386, 12387, 12392,
+ 12393, 12394, 12395, 12396, 12397, 12398, 12399, 12400, 12401, 12402, 12403,
+ 12404, 12405, 12406, 12407, 12408, 12409, 12410, 12411, 12412, 12413, 12414,
+ 12415, 12416, 12417, 12418, 12419, 12420, 12426, 12427, 12428, 12429, 12430,
+ 12431, 12432, 12433, 12434, 12435, 12436, 12437, 12438, 12439, 12440, 12441,
+ 12442, 12443, 12448, 12449, 12450, 12451, 12452, 12453, 12454, 12455, 12456,
+ 12457, 12459, 12460, 12461, 12462, 12463, 12464, 12465, 12466, 12467, 12468,
+ 12472, 12473, 12474, 12475, 12476, 12480, 12481, 12482, 12483, 12484, 12485,
+ 12486, 12487, 12488, 12489, 12490, 12491, 12492, 12493, 12494, 12495, 12496,
+ 12500, 12501, 12502, 12503, 12504, 12505, 12507, 12508, 12509, 12510, 12511,
+ 12512, 12513, 12514, 12515, 12516, 12517, 12518, 12519, 12520, 12521, 12525,
+ 12526, 12527, 12528, 12529, 12532, 12533, 12534, 12535, 12536, 12537, 12538,
+ 12539, 12540, 12541, 12542, 12543, 12547, 12548, 12549, 12550, 12551, 12552,
+ 12553, 12554, 12555, 12556, 12557, 12558, 12559, 12560, 12561, 12563, 12564,
+ 12565, 12566, 12567, 12568, 12569, 12570, 12571, 12572, 12573, 12574, 12575,
+ 12576, 12577, 12578, 12579, 12580, 12581, 12582, 12583, 12584, 12585, 12586,
+ 12591, 12592, 12593, 12594, 12595, 12596, 12597, 12598, 12599, 12600, 12601,
+ 12602, 12603, 12604, 12605, 12606, 12607, 12608, 12609, 12610, 12611, 12612,
+ 12613, 12614, 12615, 12619, 12620, 12621, 12622, 12623, 12624, 12625, 12626,
+ 12627, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12640,
+ 12641, 12642, 12643, 12644, 12645, 12646, 12647, 12648, 12649, 12650, 12652,
+ 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671,
+ 12672, 12673, 12680, 12681, 12682, 12683, 12684, 12685, 12686, 12687, 12688,
+ 12689, 12691, 12693, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704,
+ 12705, 12706, 12707, 12709, 12715, 12716, 12717, 12718, 12719, 12720, 12721,
+ 12722, 12723, 12724, 12725, 12726, 12727, 12728, 12729, 12730, 12731, 12739,
+ 12740, 12741, 12742, 12743, 12744, 12745, 12746, 12747, 12748, 12749, 12750,
+ 12762, 12763, 12764, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773,
+ 12774, 12776, 12777, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785,
+ 12786, 12787, 12788, 12789, 12790, 12794, 12795, 12796, 12797, 12798, 12799,
+ 12800, 12801, 12802, 12804, 12805, 12806, 12807, 12808, 12809, 12810, 12811,
+ 12812, 12814, 12815, 12816, 12817, 12818, 12819, 12820, 12821, 12822, 12823,
+ 12824, 12825, 12826, 12827, 12828, 12829, 12830, 12831, 12834, 12835, 12836,
+ 12837, 12838, 12839, 12840, 12841, 12842, 12843, 12844, 12845, 12846, 12847,
+ 12848, 12849, 12850, 12851, 12852, 12853, 12854, 12855, 12856, 12857, 12864,
+ 12865, 12866, 12867, 12868, 12869, 12870, 12871, 12872, 12873, 12874, 12875,
+ 12876, 12877, 12878, 12879, 12880, 12881, 12882, 12883, 12884, 12885, 12886,
+ 12887, 12888, 12889, 12890, 12898, 12899, 12900, 12901, 12902, 12903, 12904,
+ 12905, 12906, 12907, 12908, 12916, 12917, 12918, 12919, 12920, 12921, 12922,
+ 12923, 12924, 12925, 12926, 12927, 12928, 12929, 12930, 12931, 12932, 12933,
+ 12934, 12935, 12936, 12937, 12938, 12939, 12946, 12947, 12948, 12949, 12950,
+ 12951, 12952, 12953, 12954, 12955, 12956, 12957, 12958, 12959, 12960, 12961,
+ 12962, 12963, 12964, 12965, 12966, 12972, 12973, 12974, 12975, 12976, 12977,
+ 12978, 12979, 12980, 12981, 12982, 12983, 12984, 12985, 12986, 12987, 12988,
+ 12989, 12994, 12995, 12996, 12997, 12998, 12999, 13000, 13001, 13002, 13003,
+ 13004, 13005, 13006, 13007, 13008, 13012, 13013, 13014, 13015, 13016, 13017,
+ 13018, 13022, 13023, 13024, 13025, 13026, 13027, 13028, 13029, 13030, 13031,
+ 13032, 13033, 13034, 13035, 13036, 13037, 13038, 13039, 13040, 13041, 13042,
+ 13046, 13047, 13048, 13049, 13050, 13052, 13053, 13054, 13055, 13056, 13057,
+ 13058, 13059, 13060, 13061, 13062, 13063, 13066, 13067, 13068, 13069, 13070,
+ 13071, 13072, 13073, 13074, 13075, 13076, 13077, 13078, 13079, 13080, 13082,
+ 13083, 13084, 13085, 13086, 13087, 13088, 13089, 13090, 13091, 13092, 13093,
+ 13094, 13098, 13099, 13100, 13101, 13102, 13103, 13104, 13105, 13106, 13107,
+ 13108, 13109, 13110, 13111, 13112, 13113, 13114, 13115, 13116, 13117, 13118,
+ 13119, 13122, 13123, 13124, 13125, 13126, 13127, 13128, 13129, 13130, 13131,
+ 13132, 13134, 13135, 13136, 13137, 13138, 13139, 13140, 13141, 13142, 13148,
+ 13149, 13150, 13151, 13152, 13153, 13154, 13155, 13156, 13157, 13158, 13159,
+ 13160, 13161, 13162, 13163, 13164, 13165, 13166, 13167, 13168, 13169, 13170,
+ 13171, 13172, 13173, 13174, 13176, 13177, 13178, 13179, 13180, 13181, 13182,
+ 13183, 13184, 13185, 13186, 13187, 13188, 13189, 13190, 13191, 13194, 13195,
+ 13196, 13197, 13198, 13199, 13200, 13201, 13202, 13203, 13204, 13205, 13206,
+ 13207, 13208, 13209, 13210, 13211, 13212, 13213, 13214, 13215, 13216, 13217,
+ 13218, 13220, 13221, 13222, 13223, 13224, 13225, 13226, 13227, 13228, 13229,
+ 13230, 13231, 13232, 13233, 13234, 13235, 13236, 13237, 13238, 13239, 13240,
+ 13241, 13242, 13243, 13244, 13245, 13246, 13247, 13248, 13249, 13250, 13251,
+ 13252, 13253, 13254, 13255, 13256, 13257, 13258, 13259, 13260, 13261, 13262,
+ 13263, 13264, 13265, 13266, 13267, 13268, 13269, 13270, 13271, 13272, 13276,
+ 13277, 13278, 13279, 13280, 13281, 13282, 13283, 13284, 13286, 13287, 13288,
+ 13289, 13290, 13291, 13292, 13293, 13294, 13300, 13301, 13302, 13303, 13305,
+ 13306, 13307, 13308, 13310, 13311, 13312, 13313, 13315, 13316, 13317, 13318,
+ 13320, 13321, 13322, 13323, 13324, 13325, 13337, 13338, 13339, 13340, 13342,
+ 13343, 13344, 13345, 13346, 13347, 13348, 13349, 13350, 13351, 13353, 13354,
+ 13355, 13356, 13358, 13359, 13360, 13361, 13363, 13364, 13365, 13366, 13367,
+ 13368, 13369, 13370, 13371, 13372, 13373, 13374, 13375, 13376, 13377, 13378,
+ 13379, 13380, 13381, 13382, 13383, 13384, 13385, 13386, 13387, 13388, 13389,
+ 13390, 13391, 13392, 13394, 13395, 13396, 13397, 13399, 13400, 13401, 13402,
+ 13404, 13405, 13406, 13407, 13409, 13410, 13411, 13412, 13414, 13415, 13416,
+ 13417, 13418, 13419, 13420, 13421, 13422, 13423, 13424, 13425, 13426, 13427,
+ 13428, 13429, 13430, 13431, 13432, 13433, 13434, 13435, 13436, 13437, 13439,
+ 13440, 13441, 13442, 13444, 13445, 13446, 13447, 13449, 13450, 13451, 13452,
+ 13454, 13455, 13456, 13457, 13459, 13460, 13461, 13462, 13464, 13465, 13466,
+ 13467, 13469, 13470, 13471, 13472, 13475, 13476, 13477, 13478, 13479, 13480,
+ 13481, 13482, 13483, 13484, 13486, 13487, 13488, 13489, 13491, 13492, 13493,
+ 13494, 13496, 13497, 13498, 13499, 13501, 13502, 13503, 13504, 13506, 13507,
+ 13508, 13509, 13510, 13511, 13512, 13513, 13515, 13516, 13517, 13518, 13520,
+ 13521, 13522, 13523, 13525, 13526, 13527, 13528, 13530, 13531, 13532, 13533,
+ 13535, 13536, 13537, 13538, 13540, 13541, 13542, 13543, 13545, 13546, 13547,
+ 13548, 13549, 13550, 13551, 13553, 13555, 13564, 13565, 13566, 13567, 13568,
+ 13569, 13570, 13571, 13572, 13573, 13574, 13575, 13576, 13577, 13578, 13579,
+ 13580, 13581, 13582, 13583, 13584, 13585, 13586, 13587, 13588, 13589, 13590,
+ 13591, 13592, 13593, 13594, 13595, 13596, 13597, 13602, 13603, 13604, 13605,
+ 13608, 13609, 13610, 13611, 13612, 13613, 13614, 13615, 13617, 13618, 13619,
+ 13620, 13621, 13622, 13626, 13627, 13628, 13629, 13630, 13631, 13633, 13634,
+ 13635, 13636, 13637, 13638, 13639, 13640, 13641, 13642, 13643, 13644, 13645,
+ 13646, 13647, 13648, 13649, 13650, 13651, 13652, 13653, 13654, 13655, 13656,
+ 13657, 13658, 13659, 13660, 13661, 13662, 13663, 13664, 13665, 13666, 13668,
+ 13669, 13670, 13671, 13673, 13674, 13675, 13676, 13678, 13679, 13680, 13681,
+ 13682, 13683, 13684, 13685, 13686, 13687, 13688, 13689, 13690, 13691, 13692,
+ 13693, 13694, 13695, 13696, 13697, 13698, 13699, 13700, 13701, 13702, 13703,
+ 13704, 13705, 13706, 13707, 13709, 13710, 13711, 13712, 13713, 13714, 13715,
+ 13716, 13717, 13718, 13719, 13720, 13721, 13722, 13723, 13724, 13725, 13726,
+ 13727, 13728, 13729, 13730, 13731, 13732, 13733, 13734, 13735, 13736, 13737,
+ 13738, 13739, 13740, 13741, 13742, 13743, 13744, 13745, 13746, 13747, 13748,
+ 13749, 13750, 13751, 13752, 13753, 13754, 13755, 13756, 13757, 13758, 13759,
+ 13760, 13761, 13762, 13763, 13764, 13765, 13766, 13767, 13768, 13769, 13770,
+ 13771, 13772, 13773, 13774, 13775, 13776, 13777, 13778, 13779, 13780, 13781,
+ 13782, 13783, 13784, 13785, 13786, 13787, 13788, 13789, 13790, 13791, 13792,
+ 13793, 13794, 13795, 13796, 13797, 13798, 13799, 13800, 13801, 13802, 13803,
+ 13804, 13805, 13806, 13807, 13808, 13809, 13810, 13811, 13812, 13813, 13814,
+ 13815, 13816, 13817, 13818, 13819, 13820, 13821, 13822, 13823, 13824, 13825,
+ 13826, 13827, 13828, 13829, 13830, 13831, 13832, 13833, 13834, 13835, 13836,
+ 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847,
+ 13848, 13849, 13850, 13851, 13852, 13854, 13856, 13858, 13860, 13862, 13864,
+ 13866, 13868, 13870, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886,
+ 13887, 13888, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897,
+ 13898, 13899, 13901, 13902, 13903, 13904, 13905, 13906, 13909, 13910, 13911,
+ 13912, 13914, 13915, 13916, 13917, 13918, 13919, 13925, 13926, 13927, 13928,
+ 13929, 13930, 13931, 13932, 13933, 13934, 13935, 13936, 13937, 13938, 13939,
+ 13940, 13941, 13942, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951,
+ 13953, 13954, 13955, 13956, 13958, 13959, 13960, 13961, 13962, 13963, 13964,
+ 13965, 13966, 13967, 13968, 13969, 13970, 13972, 13973, 13974, 13975, 13977,
+ 13978, 13979, 13980, 13981, 13985, 13986, 13987, 13988, 13989, 13990, 13991,
+ 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002,
+ 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013,
+ 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024,
+ 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035,
+ 14036, 14037, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14046, 14047,
+ 14048, 14049, 14050, 14053, 14054, 14055, 14056, 14057, 14061, 14062, 14063,
+ 14064, 14065, 14066, 14072, 14073, 14074, 14075, 14077, 14078, 14079, 14080,
+ 14082, 14083, 14084, 14085, 14087, 14088, 14089, 14090, 14097, 14098, 14099,
+ 14100, 14101, 14102, 14103, 14104, 14105, 14107, 14108, 14109, 14110, 14112,
+ 14113, 14114, 14115, 14117, 14118, 14119, 14120, 14122, 14123, 14124, 14125,
+ 14126, 14128, 14129, 14130, 14131, 14133, 14134, 14135, 14136, 14137, 14138,
+ 14140, 14141, 14142, 14143, 14145, 14146, 14147, 14148, 14150, 14151, 14152,
+ 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163,
+ 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14171, 14172, 14173, 14175,
+ 14176, 14177, 14178, 14180, 14181, 14182, 14183, 14185, 14186, 14187, 14188,
+ 14190, 14191, 14192, 14193, 14195, 14196, 14197, 14198, 14200, 14201, 14202,
+ 14203, 14205, 14206, 14207, 14208, 14210, 14211, 14212, 14213, 14215, 14216,
+ 14217, 14218, 14220, 14221, 14222, 14223, 14225, 14226, 14227, 14228, 14230,
+ 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14239, 14240, 14241, 14244,
+ 14245, 14246, 14247, 14248, 14249, 14250, 14252, 14253, 14254, 14255, 14257,
+ 14258, 14259, 14260, 14262, 14263, 14264, 14265, 14267, 14268, 14269, 14270,
+ 14271, 14272, 14273, 14275, 14276, 14277, 14278, 14280, 14281, 14282, 14284,
+ 14285, 14286, 14287, 14289, 14290, 14291, 14293, 14294, 14295, 14296, 14298,
+ 14299, 14300, 14301, 14302, 14303, 14304, 14309, 14310, 14311, 14312, 14313,
+ 14314, 14315, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328,
+ 14331, 14332, 14333, 14334, 14338, 14339, 14340, 14341, 14343, 14344, 14345,
+ 14346, 14348, 14349, 14355, 14356, 14357, 14359, 14360, 14361, 14362, 14363,
+ 14364, 14365, 14366, 14368, 14369, 14370, 14371, 14373, 14374, 14375, 14376,
+ 14378, 14379, 14380, 14381, 14383, 14384, 14385, 14386, 14388, 14389, 14390,
+ 14391, 14393, 14394, 14395, 14396, 14397, 14398, 14399, 14400, 14401, 14402,
+ 14403, 14404, 14405, 14406, 14407, 14408, 14409, 14410, 14411, 14412, 14413,
+ 14452, 14491, 14493, 14495, 14497, 14499, 14501, 14503, 14505, 14507, 14508,
+ 14510, 14512, 14514, 14516, 14518, 14520, 14522, 14524, 14525, 14527, 14529,
+ 14531, 14532, 14533, 14534, 14535, 14536, 14537, 14539, 14540, 14542, 14544,
+ 14546, 14547, 14548, 14549, 14551, 14553, 14557, 14559, 14561, 14563, 14565,
+ 14567, 14569, 14571, 14572, 14573, 14575, 14576, 14577, 14578, 14579, 14581,
+ 14583, 14584, 14586, 14588, 14590, 14592, 14594, 14595, 14598, 14604, 14605,
+ 14606, 14608, 14609, 14612, 14613, 14616, 14622, 14624, 14626, 14628, 14630,
+ 14632, 14634, 14636, 14638, 14640, 14642, 14644, 14646, 14647, 14649, 14651,
+ 14653, 14655, 14657, 14659, 14661, 14663, 14665, 14667, 14669, 14671, 14673,
+ 14679, 14681, 14682, 14683, 14686, 14688, 14690, 14692, 14694, 14696, 14698,
+ 14700, 14702, 14704, 14706, 14708, 14710, 14712, 14714, 14716, 14718, 14720,
+ 14722, 14724, 14725, 14726, 14728, 14730, 14732, 14734, 14739, 14740, 14743,
+ 14744, 14753, 14755, 14756, 14757, 14758, 14759, 14760, 14762, 14764, 14765,
+ 14766, 14767, 14769, 14771, 14773, 14775, 14777, 14779, 14781, 14783, 14785,
+ 14787, 14789, 14791, 14793, 14795, 14808, 14810, 14812, 14814, 14816, 14817,
+ 14818, 14822, 14824, 14828, 14829, 14830, 14831, 14832, 14833, 14834, 14835,
+ 14836, 14838, 14840, 14842, 14844, 14846, 14848, 14850, 14851, 14853, 14855,
+ 14857, 14859, 14861, 14863, 14865, 14867, 14869, 14871, 14873, 14875, 14877,
+ 14879, 14881, 14883, 14885, 14887, 14889, 14891, 14893, 14894, 14895, 14897,
+ 14899, 14901, 14903, 14905, 14907, 14909, 14910, 14911, 14912, 14913, 14917,
+ 14918, 14922, 14924, 14926, 14928, 14930, 14932, 14933, 14934, 14936, 14938,
+ 14940, 14942, 14946, 14950, 14951, 14952, 14955, 14957, 14959, 14960, 14962,
+ 14964, 14966, 14968, 14970, 14971, 14972, 14974, 14976, 14978, 14980, 14982,
+ 14984, 14986, 14990, 14992, 14994, 14996, 15000, 15004, 15008, 15010, 15012,
+ 15014, 15018, 15020, 15022, 15024, 15026, 15028, 15052, 15062, 15064, 15066,
+ 15068, 15070, 15072, 15074, 15106, 15108, 15110, 15112, 15114, 15116, 15117,
+ 15119, 15121, 15123, 15124, 15125, 15126, 15127, 15129, 15131, 15133, 15134,
+ 15135, 15136, 15137, 15138, 15139, 15141, 15143, 15145, 15146, 15147, 15148,
+ 15149, 15150, 15152, 15154, 15156, 15157, 15158, 15159, 15160, 15162, 15164,
+ 15166, 15167, 15168, 15169, 15170, 15171, 15172, 15174, 15176, 15178, 15179,
+ 15180, 15181, 15182, 15183, 15185, 15187, 15189, 15190, 15191, 15192, 15193,
+ 15194, 15196, 15198, 15200, 15202, 15204, 15206, 15208, 15210, 15212, 15214,
+ 15216, 15218, 15220, 15221, 15222, 15223, 15224, 15226, 15228, 15230, 15231,
+ 15232, 15233, 15234, 15235, 15236, 15238, 15240, 15242, 15244, 15245, 15247,
+ 15249, 15251, 15252, 15253, 15254, 15256, 15258, 15260, 15262, 15264, 15266,
+ 15267, 15268, 15269, 15270, 15272, 15274, 15276, 15278, 15280, 15286, 15288,
+ 15292, 15294, 15298, 15302, 15324, 15326, 15328, 15330, 15332, 15333, 15334,
+ 15335, 15337, 15338, 15339, 15340, 15342, 15344, 15352, 15355, 15356, 15358,
+ 15360, 15362, 15363, 15365, 15367, 15369, 15371, 15373, 15375, 15376, 15378,
+ 15380, 15382, 15384, 15386, 15388, 15389, 15391, 15393, 15395, 15397, 15398,
+ 15400, 15402, 15404, 15406, 15407, 15409, 15411, 15413, 15415, 15417, 15419,
+ 15421, 15423, 15425, 15427, 15428, 15429, 15430, 15431, 15432, 15434, 15436,
+ 15438, 15440, 15444, 15446, 15448, 15450, 15452, 15453, 15456, 15461, 15462,
+ 15463, 15472, 15474, 15477, 15480, 15486, 15495, 15496, 15498, 15501, 15502,
+ 15503, 15504, 15505, 15511, 15516, 15522, 15529, 15530, 15531, 15535, 15537,
+ 15538, 15539, 15543, 15545, 15546, 15547, 15548, 15550, 15551, 15555, 15556,
+ 15560, 15561, 15562, 15564, 15573, 15575, 15577, 15581, 15587, 15591, 15599,
+ 15606, 15609, 15611, 15616, 15619, 15623, 15627, 15632, 15640, 15647, 15650,
+ 15651, 15653, 15655, 15659, 15661, 15665, 15670, 15676, 15683, 15687, 15688,
+ 15689, 15691, 15692, 15695, 15696, 15697, 15700, 15702, 15703, 15707, 15709,
+ 15713, 15721, 15722, 15723, 15724, 15725, 15726, 15728, 15729, 15730, 15731,
+ 15732, 15733, 15734, 15735, 15736, 15737, 15738, 15742, 15743, 15744, 15746,
+ 15747, 15748, 15750, 15753, 15759, 15765, 15767, 15769, 15771, 15773, 15775,
+ 15787, 15799, 15800, 15802, 15804, 15806, 15807, 15808, 15809, 15810, 15811,
+ 15813, 15815, 15817, 15819, 15821, 15822, 15823, 15824, 15825, 15826, 15828,
+ 15830, 15832, 15834, 15836, 15838, 15840, 15841, 15843, 15845, 15847, 15849,
+ 15851, 15852, 15854, 15856, 15858, 15860, 15862, 15864, 15866, 15868, 15872,
+ 15881, 15882, 15883, 15884, 15889, 15892, 15893, 15895, 15896, 15897, 15899,
+ 15900, 15901, 15902, 15903, 15904, 15905, 15907, 15909, 15911, 15912, 15913,
+ 15914, 15915, 15916, 15917, 15918, 15919, 15920, 15921, 15922, 15923, 15924,
+ 15925, 15926, 15927, 15928, 15929, 15930, 15931, 15932, 15933, 15934, 15935,
+ 15936, 15937, 15938, 15939, 15940, 15942, 15944, 15946, 15948, 15950, 15952,
+ 15954, 15956, 15959, 15968, 15969, 15970, 15971, 15972, 15973, 15975, 15976,
+ 15980, 15983, 15985, 15987, 15989, 15990, 15992, 15994, 15996, 15998, 16000,
+ 16001, 16003, 16005, 16007, 16009, 16010, 16011, 16012, 16014, 16015, 16017,
+ 16018, 16020, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030,
+ 16031, 16032, 16033, 16034, 16035, 16037, 16038, 16041, 16045, 16051, 16053,
+ 16055, 16057, 16059, 16061, 16063, 16065, 16066, 16068, 16070, 16072, 16074,
+ 16075, 16076, 16077, 16078, 16079, 16081, 16083, 16085, 16087, 16089, 16091,
+ 16093, 16095, 16097, 16099, 16101, 16103, 16104, 16105, 16106, 16107, 16108,
+ 16111, 16112, 16115, 16116, 16118, 16120, 16122, 16123, 16125, 16127, 16129,
+ 16131, 16136, 16141, 16142, 16143, 16146, 16150, 16152, 16154, 16156, 16158,
+ 16159, 16161, 16163, 16165, 16167, 16169, 16171, 16173, 16175, 16177, 16179,
+ 16181, 16183, 16185, 16186, 16188, 16190, 16192, 16194, 16196, 16198, 16200,
+ 16202, 16203, 16205, 16207, 16208, 16209, 16211, 16212, 16213, 16214, 16215,
+ 16216, 16217, 16220, 16221, 16224, 16226, 16228, 16230, 16232, 16234, 16236,
+ 16238, 16240, 16241, 16243, 16245, 16247, 16249, 16251, 16253, 16255, 16257,
+ 16258, 16260, 16262, 16264, 16266, 16268, 16270, 16272, 16274, 16277, 16278,
+ 16279, 16280, 16281, 16284, 16287, 16293, 16295, 16297, 16299, 16302, 16304,
+ 16306, 16308, 16310, 16312, 16314, 16316, 16318, 16319, 16321, 16322, 16323,
+ 16326, 16327, 16328, 16329, 16337, 16342, 16344, 16345, 16349, 16350, 16352,
+ 16353, 16354, 16355, 16361, 16363, 16365, 16367, 16369, 16371, 16373, 16375,
+ 16377, 16379, 16381, 16383, 16385, 16387, 16389, 16391, 16393, 16395, 16397,
+ 16399, 16400, 16402, 16404, 16406, 16408, 16410, 16412, 16414, 16416, 16418,
+ 16420, 16422, 16424, 16426, 16428, 16430, 16432, 16438, 16440, 16441, 16442,
+ 16443, 16446, 16448, 16450, 16452, 16454, 16456, 16458, 16460, 16462, 16464,
+ 16466, 16468, 16470, 16472, 16474, 16476, 16477, 16478, 16479, 16481, 16483,
+ 16484, 16485, 16486, 16487, 16497, 16498, 16499, 16501, 16502, 16503, 16505,
+ 16508, 16511, 16512, 16514, 16522, 16525, 16526, 16528, 16530, 16535, 16536,
+ 16537, 16540, 16541, 16544, 16546, 16555, 16557, 16559, 16561, 16563, 16565,
+ 16567, 16569, 16571, 16573, 16575, 16577, 16579, 16581, 16583, 16596, 16598,
+ 16600, 16602, 16603, 16604, 16605, 16606, 16607, 16608, 16610, 16612, 16614,
+ 16615, 16616, 16617, 16618, 16619, 16621, 16625, 16627, 16631, 16633, 16634,
+ 16635, 16636, 16637, 16638, 16639, 16640, 16641, 16642, 16644, 16646, 16647,
+ 16648, 16650, 16652, 16654, 16656, 16658, 16660, 16661, 16662, 16663, 16665,
+ 16667, 16669, 16671, 16673, 16675, 16677, 16679, 16681, 16683, 16685, 16687,
+ 16689, 16691, 16693, 16695, 16697, 16699, 16701, 16703, 16705, 16707, 16709,
+ 16711, 16713, 16715, 16717, 16719, 16721, 16722, 16723, 16725, 16729, 16730,
+ 16731, 16735, 16737, 16739, 16741, 16743, 16745, 16747, 16748, 16749, 16750,
+ 16752, 16754, 16756, 16758, 16760, 16762, 16764, 16768, 16770, 16772, 16776,
+ 16777, 16778, 16781, 16783, 16785, 16794, 16795, 16797, 16799, 16801, 16803,
+ 16805, 16807, 16808, 16809, 16811, 16813, 16815, 16817, 16819, 16821, 16823,
+ 16827, 16829, 16831, 16833, 16837, 16841, 16845, 16847, 16849, 16851, 16855,
+ 16857, 16859, 16861, 16863, 16865, 16867, 16891, 16899, 16901, 16903, 16905,
+ 16907, 16909, 16911, 16913, 16915, 16917, 16919, 16921, 16923, 16927, 16929,
+ 16933, 16937, 16939, 16943, 16945, 16947, 16977, 16978, 16980, 16982, 16984,
+ 16986, 16987, 16988, 16989, 16990, 16992, 16994, 16996, 16998, 16999, 17000,
+ 17001, 17002, 17003, 17004, 17006, 17008, 17010, 17012, 17013, 17014, 17015,
+ 17016, 17017, 17019, 17021, 17023, 17025, 17026, 17027, 17028, 17029, 17031,
+ 17033, 17035, 17037, 17038, 17039, 17040, 17041, 17042, 17043, 17045, 17047,
+ 17049, 17051, 17052, 17053, 17054, 17055, 17056, 17058, 17060, 17062, 17064,
+ 17065, 17066, 17067, 17068, 17069, 17071, 17073, 17075, 17077, 17079, 17081,
+ 17083, 17085, 17087, 17089, 17091, 17093, 17095, 17097, 17098, 17099, 17100,
+ 17101, 17103, 17105, 17107, 17109, 17110, 17111, 17112, 17113, 17114, 17115,
+ 17117, 17119, 17121, 17123, 17125, 17127, 17129, 17132, 17133, 17135, 17137,
+ 17139, 17141, 17142, 17143, 17144, 17146, 17148, 17150, 17152, 17154, 17156,
+ 17157, 17158, 17159, 17161, 17163, 17165, 17167, 17169, 17171, 17173, 17175,
+ 17177, 17179, 17181, 17183, 17185, 17189, 17191, 17195, 17199, 17201, 17205,
+ 17207, 17209, 17214, 17217, 17251, 17253, 17255, 17257, 17259, 17261, 17263,
+ 17265, 17267, 17269, 17271, 17273, 17275, 17276, 17278, 17280, 17282, 17284,
+ 17285, 17286, 17287, 17288, 17290, 17292, 17294, 17296, 17297, 17298, 17299,
+ 17300, 17301, 17302, 17304, 17306, 17308, 17310, 17311, 17312, 17313, 17314,
+ 17315, 17317, 17319, 17321, 17323, 17324, 17325, 17326, 17327, 17329, 17331,
+ 17333, 17335, 17336, 17337, 17338, 17339, 17340, 17341, 17343, 17345, 17347,
+ 17349, 17350, 17351, 17352, 17353, 17354, 17356, 17358, 17360, 17362, 17363,
+ 17364, 17365, 17366, 17367, 17369, 17371, 17373, 17375, 17377, 17379, 17381,
+ 17383, 17385, 17387, 17389, 17391, 17393, 17395, 17396, 17397, 17398, 17399,
+ 17401, 17403, 17405, 17407, 17408, 17409, 17410, 17411, 17412, 17413, 17415,
+ 17417, 17419, 17421, 17423, 17424, 17425, 17426, 17427, 17429, 17431, 17433,
+ 17435, 17436, 17437, 17438, 17439, 17441, 17443, 17445, 17447, 17449, 17455,
+ 17457, 17461, 17463, 17467, 17473, 17475, 17478, 17481, 17487, 17489, 17493,
+ 17495, 17499, 17501, 17534, 17536, 17539, 17542, 17545, 17547, 17548, 17549,
+ 17550, 17553, 17554, 17555, 17556, 17557, 17560, 17561, 17564, 17567, 17570,
+ 17573, 17576, 17588, 17592, 17594, 17596, 17598, 17600, 17602, 17604, 17606,
+ 17608, 17609, 17611, 17613, 17615, 17616, 17618, 17620, 17622, 17624, 17626,
+ 17628, 17629, 17631, 17633, 17635, 17637, 17639, 17641, 17642, 17644, 17646,
+ 17648, 17650, 17651, 17653, 17655, 17657, 17659, 17660, 17662, 17664, 17666,
+ 17668, 17670, 17671, 17673, 17675, 17677, 17678, 17680, 17682, 17684, 17686,
+ 17688, 17690, 17691, 17693, 17695, 17697, 17699, 17701, 17703, 17704, 17706,
+ 17708, 17710, 17712, 17713, 17715, 17717, 17719, 17721, 17722, 17724, 17726,
+ 17728, 17730, 17732, 17734, 17736, 17739, 17742, 17745, 17748, 17752, 17753,
+ 17756, 17761, 17771, 17775, 17779, 17789, 17799, 17806, 17808, 17812, 17817,
+ 17820, 17830, 17831, 17832, 17841, 17843, 17846, 17849, 17855, 17864, 17865,
+ 17867, 17869, 17871, 17872, 17878, 17881, 17891, 17893, 17895, 17901, 17905,
+ 17908, 17911, 17912, 17916, 17919, 17928, 17930, 17933, 17935, 17936, 17938,
+ 17943, 17945, 17947, 17948, 17949, 17950, 17951, 17952, 17958, 17963, 17969,
+ 17976, 17977, 17978, 17979, 17980, 17984, 17986, 17987, 17988, 17989, 17991,
+ 17992, 17993, 17995, 17998, 17999, 18003, 18005, 18010, 18011, 18012, 18013,
+ 18015, 18019, 18020, 18021, 18022, 18023, 18024, 18026, 18027, 18031, 18032,
+ 18033, 18034, 18035, 18036, 18037, 18041, 18042, 18043, 18044, 18045, 18047,
+ 18050, 18055, 18064, 18070, 18075, 18077, 18078, 18080, 18082, 18086, 18087,
+ 18089, 18095, 18101, 18110, 18118, 18124, 18128, 18136, 18143, 18146, 18148,
+ 18153, 18156, 18160, 18164, 18169, 18179, 18180, 18183, 18184, 18186, 18187,
+ 18190, 18195, 18198, 18199, 18201, 18203, 18204, 18206, 18208, 18210, 18212,
+ 18214, 18216, 18218, 18223, 18225, 18227, 18229, 18230, 18231, 18233, 18235,
+ 18237, 18239, 18241, 18242, 18243, 18245, 18247, 18249, 18250, 18253, 18256,
+ 18258, 18260, 18262, 18263, 18265, 18274, 18275, 18276, 18279, 18282, 18288,
+ 18291, 18292, 18298, 18300, 18302, 18304, 18306, 18308, 18310, 18312, 18314,
+ 18316, 18318, 18320, 18322, 18324, 18326, 18328, 18330, 18332, 18334, 18335,
+ 18337, 18339, 18341, 18343, 18345, 18347, 18349, 18351, 18357, 18359, 18362,
+ 18364, 18366, 18368, 18370, 18372, 18374, 18376, 18378, 18380, 18382, 18384,
+ 18386, 18388, 18390, 18392, 18394, 18396, 18398, 18400, 18402, 18404, 18406,
+ 18408, 18417, 18419, 18421, 18423, 18425, 18427, 18429, 18431, 18433, 18435,
+ 18437, 18439, 18441, 18443, 18445, 18447, 18449, 18451, 18453, 18466, 18468,
+ 18470, 18472, 18474, 18476, 18477, 18479, 18483, 18485, 18489, 18491, 18492,
+ 18494, 18496, 18498, 18500, 18502, 18504, 18506, 18508, 18509, 18511, 18513,
+ 18515, 18517, 18519, 18521, 18523, 18525, 18527, 18529, 18531, 18533, 18535,
+ 18537, 18539, 18541, 18543, 18545, 18547, 18549, 18551, 18553, 18555, 18557,
+ 18559, 18561, 18563, 18565, 18567, 18568, 18569, 18571, 18575, 18576, 18580,
+ 18582, 18584, 18586, 18588, 18590, 18592, 18594, 18596, 18598, 18600, 18602,
+ 18604, 18606, 18610, 18612, 18614, 18618, 18619, 18620, 18623, 18625, 18627,
+ 18629, 18631, 18633, 18635, 18637, 18638, 18640, 18642, 18644, 18646, 18648,
+ 18650, 18652, 18656, 18658, 18660, 18662, 18666, 18670, 18674, 18676, 18678,
+ 18680, 18684, 18686, 18688, 18690, 18692, 18694, 18696, 18720, 18722, 18732,
+ 18735, 18736, 18737, 18738, 18739, 18740, 18742, 18744, 18746, 18751, 18752,
+ 18755, 18756, 18757, 18759, 18762, 18765, 18766, 18767, 18769, 18770, 18773,
+ 18774, 18775, 18776, 18777, 18780, 18781, 18786, 18795, 18801, 18806, 18808,
+ 18809, 18811, 18817, 18823, 18832, 18840, 18846, 18849, 18857, 18864, 18867,
+ 18868, 18870, 18872, 18876, 18878, 18880, 18882, 18883, 18889, 18892, 18902,
+ 18904, 18906, 18912, 18922, 18926, 18929, 18932, 18936, 18938, 18947, 18949,
+ 18952, 18954, 18959, 18961, 18963, 18967, 18972, 18978, 18985, 18986, 18987,
+ 18989, 18992, 18993, 18997, 18998, 19003, 19004, 19005, 19006, 19008, 19012,
+ 19013, 19014, 19016, 19017, 19020, 19021, 19022, 19023, 19024, 19025, 19028,
+ 19029, 19032, 19034, 19035, 19039, 19041, 19045, 19053, 19054, 19055, 19057,
+ 19058, 19059, 19060, 19061, 19062, 19063, 19065, 19066, 19067, 19068, 19069,
+ 19070, 19071, 19072, 19073, 19074, 19075, 19076, 19077, 19078, 19079, 19080,
+ 19081, 19082, 19083, 19084, 19088, 19089, 19090, 19092, 19093, 19094, 19096,
+ 19099, 19105, 19111, 19114, 19117, 19120, 19122, 19125, 19138, 19151, 19153,
+ 19154, 19155, 19158, 19161, 19164, 19165, 19166, 19167, 19168, 19169, 19170,
+ 19172, 19174, 19176, 19178, 19180, 19181, 19182, 19183, 19184, 19185, 19187,
+ 19189, 19191, 19193, 19195, 19197, 19199, 19201, 19203, 19204, 19205, 19206,
+ 19207, 19208, 19210, 19212, 19214, 19216, 19218, 19220, 19223, 19226, 19227,
+ 19228, 19230, 19232, 19234, 19236, 19238, 19239, 19241, 19243, 19245, 19247,
+ 19249, 19251, 19253, 19255, 19257, 19258, 19260, 19262, 19264, 19266, 19268,
+ 19270, 19273, 19276, 19278, 19282, 19291, 19292, 19293, 19294, 19295, 19296,
+ 19298, 19299, 19300, 19301, 19302, 19303, 19305, 19307, 19309, 19311, 19314,
+ 19315, 19316, 19317, 19318, 19319, 19320, 19321, 19322, 19323, 19324, 19325,
+ 19326, 19327, 19328, 19329, 19330, 19331, 19332, 19333, 19334, 19335, 19336,
+ 19337, 19338, 19339, 19340, 19341, 19342, 19343, 19344, 19345, 19346, 19347,
+ 19348, 19349, 19350, 19351, 19353, 19355, 19357, 19359, 19361, 19363, 19365,
+ 19367, 19370, 19379, 19380, 19381, 19382, 19383, 19384, 19387, 19390, 19391,
+ 19392, 19393, 19395, 19399, 19402, 19405, 19407, 19410, 19413, 19414, 19416,
+ 19418, 19420, 19421, 19422, 19423, 19424, 19425, 19427, 19428, 19429, 19430,
+ 19431, 19432, 19433, 19434, 19435, 19436, 19439, 19440, 19444, 19449, 19450,
+ 19451, 19453, 19455, 19461, 19463, 19465, 19467, 19469, 19471, 19473, 19475,
+ 19477, 19479, 19481, 19484, 19485, 19488, 19490, 19492, 19494, 19496, 19498,
+ 19499, 19500, 19501, 19502, 19503, 19505, 19507, 19509, 19511, 19513, 19515,
+ 19517, 19519, 19521, 19523, 19525, 19527, 19529, 19530, 19531, 19532, 19533,
+ 19534, 19536, 19538, 19540, 19542, 19544, 19546, 19548, 19550, 19552, 19554,
+ 19556, 19559, 19562, 19563, 19564, 19566, 19568, 19569, 19571, 19573, 19575,
+ 19577, 19578, 19581, 19583, 19586, 19589, 19592, 19595, 19598, 19604, 19611,
+ 19614, 19617, 19623, 19630, 19631, 19632, 19635, 19639, 19642, 19644, 19647,
+ 19649, 19650, 19652, 19654, 19656, 19658, 19660, 19662, 19664, 19666, 19668,
+ 19670, 19677, 19678, 19679, 19680, 19681, 19682, 19683, 19684, 19685, 19686,
+ 19687, 19688, 19689, 19690, 19691, 19692, 19693, 19694, 19695, 19696, 19697,
+ 19698, 19699, 19700, 19701, 19702, 19703, 19704, 19705, 19706, 19707, 19708,
+ 19709, 19710, 19711, 19712, 19713, 19714, 19715, 19716, 19717, 19718, 19719,
+ 19720, 19721, 19722, 19723, 19724, 19725, 19726, 19727, 19728, 19729, 19730,
+ 19731, 19732, 19733, 19734, 19735, 19736, 19737, 19738, 19739, 19740, 19741,
+ 19742, 19743, 19744, 19745, 19746, 19747, 19748, 19749, 19750, 19751, 19752,
+ 19753, 19754, 19756, 19758, 19760, 19769, 19772, 19775, 19778, 19781, 19784,
+ 19787, 19795, 19801, 19809, 19813, 19818, 19830, 19833, 19840, 19842, 19848,
+ 19863, 19871, 19883, 19885, 19891, 19893, 19895, 19901, 19903, 19905, 19912,
+ 19916, 19918, 19928, 19934, 19938, 19948, 19958, 19960, 19968, 19970, 19971,
+ 20010, 20011, 20012, 20013, 20014, 20015, 20016, 20017, 20018, 20019, 20020
+};
+
+static t_ccsid final_array[] = {
+ 0, 62246, 368, 916, 898, 33723, 905, 870, 867, 866, 864, 863, 862, 861, 858,
+ 856, 853, 852, 851, 438, 1387, 5355, 9450, 9449, 9448, 5351, 5350, 5349,
+ 5348, 5347, 1209, 1236, 1234, 1204, 1202, 13489, 875, 944, 1052, 859, 921,
+ 915, 914, 913, 820, 924, 1364, 879, 917, 814, 1090, 1251, 922, 1253, 5479,
+ 971, 1048, 1376, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141,
+ 925, 776, 1027, 919, 906, 904, 892, 881, 872, 871, 869, 865, 501, 425, 424,
+ 421, 298, 291, 286, 285, 281, 279, 278, 274, 38, 1384, 839, 1277, 62236,
+ 62225, 62212, 61953, 57346, 28710, 25547, 17355, 13122, 13125, 12709, 9067,
+ 9057, 9031, 8613, 5124, 5051, 5053, 5054, 5055, 5056, 5036, 5027, 4972, 4961,
+ 4966, 4952, 4953, 4954, 4949, 4397, 1393, 1400, 1381, 1382, 1389, 1374, 1365,
+ 1281, 1282, 1283, 1284, 1276, 1252, 1254, 1255, 1256, 1257, 1258, 1259, 1161,
+ 1165, 1154, 1155, 1156, 1157, 1158, 1159, 1131, 1133, 1134, 1138, 1123, 1124,
+ 1130, 1113, 1115, 1116, 1098, 1099, 1089, 1041, 1042, 1043, 1044, 1047, 1026,
+ 1028, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1009, 1010,
+ 965, 966, 951, 952, 957, 958, 959, 960, 943, 945, 947, 948, 950, 931, 933,
+ 934, 935, 936, 937, 938, 939, 940, 923, 927, 928, 929, 897, 876, 834, 836,
+ 837, 838, 738, 721, 301, 302, 257, 1, 898, 916, 368, 368, 62246
+};
+
+static t_staterange goto_array[] = {
+ 13445, 11977, 13446, 12066, 11793, 13448, 13449, 13450, 13451, 13453, 13454,
+ 13455, 13456, 13457, 13473, 13458, 13459, 13460, 13466, 13461, 13462, 13468,
+ 11793, 13447, 13449, 13450, 13451, 11793, 13448, 13449, 13450, 13451, 13452,
+ 13453, 13454, 13455, 13456, 13457, 13473, 13458, 13459, 13460, 13466, 13461,
+ 13462, 13468, 11735, 13469, 13470, 13463, 13464, 13473, 13465, 13474, 13475,
+ 13476, 13477, 13478, 13479, 13480, 13481, 13466, 13482, 13467, 13483, 13468,
+ 13485, 11735, 13469, 13470, 13471, 13472, 13473, 13474, 13475, 13476, 13477,
+ 13478, 13479, 13480, 13481, 13482, 13483, 13484, 13485, 11147, 13486, 11230,
+ 13487, 13488, 13426, 13419, 13420, 13496, 13423, 13498, 19, 229, 230, 231,
+ 232, 18, 17, 16, 15, 14, 238, 237, 236, 235, 234, 239, 240, 241, 242, 243,
+ 13, 12, 11, 10, 9, 8, 7, 251, 250, 249, 248, 247, 246, 245, 252, 253, 254,
+ 255, 256, 257, 258, 259, 244, 261, 260, 6, 263, 264, 265, 266, 95, 268, 269,
+ 269, 270, 271, 271, 272, 273, 273, 274, 275, 275, 276, 277, 277, 278, 279,
+ 279, 280, 281, 281, 282, 283, 283, 284, 285, 286, 287, 287, 288, 289, 289,
+ 290, 291, 291, 292, 293, 293, 294, 295, 295, 296, 297, 297, 298, 299, 299,
+ 300, 301, 301, 302, 303, 304, 305, 305, 306, 307, 307, 308, 309, 309, 227,
+ 311, 13494, 2, 314, 315, 316, 313, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 332, 333, 334, 335, 336, 336, 337,
+ 338, 338, 50, 340, 341, 341, 342, 343, 343, 344, 345, 345, 346, 347, 347,
+ 315, 315, 349, 350, 350, 341, 352, 353, 354, 355, 356, 357, 358, 359, 359,
+ 360, 351, 362, 362, 361, 361, 363, 348, 339, 310, 365, 365, 364, 366, 367,
+ 364, 366, 367, 57, 369, 370, 370, 371, 372, 372, 373, 374, 374, 375, 376,
+ 376, 377, 378, 378, 379, 380, 381, 382, 383, 384, 384, 385, 386, 386, 39,
+ 388, 389, 390, 391, 68, 393, 394, 395, 396, 397, 392, 398, 399, 67, 66, 65,
+ 64, 63, 62, 61, 60, 59, 58, 410, 409, 408, 407, 406, 405, 404, 403, 402,
+ 401, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 400, 426, 427, 428, 429, 430, 431, 431, 432, 433, 433, 434, 435, 435,
+ 54, 437, 438, 438, 439, 440, 440, 441, 442, 442, 443, 444, 444, 445, 446,
+ 446, 78, 448, 449, 449, 252, 252, 257, 257, 452, 451, 450, 453, 454, 455,
+ 453, 454, 455, 92, 457, 458, 459, 460, 426, 427, 70, 462, 463, 464, 465,
+ 466, 467, 91, 89, 470, 469, 471, 472, 88, 87, 86, 476, 475, 474, 477, 478,
+ 479, 85, 84, 482, 481, 483, 484, 485, 480, 473, 486, 487, 488, 315, 490,
+ 491, 83, 82, 81, 495, 494, 493, 496, 497, 498, 499, 232, 500, 80, 502, 503,
+ 504, 505, 69, 507, 508, 509, 510, 44, 512, 513, 79, 515, 252, 449, 253, 254,
+ 516, 255, 256, 257, 258, 77, 76, 519, 518, 520, 521, 75, 523, 524, 74, 526,
+ 527, 528, 525, 522, 517, 514, 529, 530, 531, 532, 261, 533, 73, 72, 536,
+ 535, 537, 264, 538, 71, 540, 541, 20, 543, 544, 545, 542, 539, 546, 547,
+ 548, 549, 534, 511, 506, 501, 492, 489, 468, 461, 456, 551, 552, 553, 554,
+ 555, 558, 550, 556, 557, 559, 285, 285, 561, 562, 562, 563, 564, 564, 565,
+ 566, 566, 567, 568, 568, 569, 570, 570, 571, 572, 572, 573, 574, 574, 575,
+ 576, 576, 577, 578, 578, 579, 580, 580, 362, 362, 582, 581, 583, 583, 584,
+ 584, 380, 586, 587, 587, 588, 589, 589, 55, 591, 592, 592, 5, 594, 595, 595,
+ 596, 597, 597, 598, 599, 599, 600, 601, 601, 602, 603, 603, 604, 605, 605,
+ 606, 607, 607, 608, 609, 609, 610, 611, 611, 612, 613, 613, 614, 615, 615,
+ 616, 617, 617, 618, 619, 619, 36, 621, 622, 622, 623, 620, 593, 624, 624,
+ 626, 626, 625, 625, 627, 628, 628, 629, 630, 630, 93, 632, 633, 634, 635,
+ 636, 637, 638, 544, 544, 639, 640, 641, 641, 224, 643, 644, 644, 645, 646,
+ 646, 647, 648, 648, 649, 650, 650, 651, 652, 652, 653, 654, 654, 655, 656,
+ 656, 657, 658, 658, 659, 660, 660, 661, 662, 662, 663, 664, 664, 665, 666,
+ 666, 667, 668, 668, 669, 670, 670, 671, 672, 672, 38, 674, 675, 676, 677,
+ 677, 678, 679, 679, 680, 681, 681, 682, 683, 683, 684, 685, 685, 686, 673,
+ 687, 687, 688, 688, 267, 690, 691, 692, 692, 56, 694, 695, 696, 697, 465,
+ 698, 699, 90, 701, 471, 702, 472, 703, 486, 487, 704, 500, 239, 240, 242,
+ 252, 253, 254, 255, 257, 258, 449, 516, 708, 707, 529, 530, 531, 709, 710,
+ 537, 538, 712, 547, 713, 94, 715, 716, 716, 717, 718, 718, 719, 720, 720,
+ 721, 714, 711, 706, 705, 700, 553, 558, 722, 722, 726, 727, 723, 724, 725,
+ 728, 693, 729, 730, 729, 730, 438, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 743, 744, 745, 745, 746, 747, 52, 45, 750, 749, 751,
+ 752, 753, 754, 755, 756, 757, 758, 759, 760, 43, 42, 41, 40, 365, 365, 225,
+ 767, 768, 768, 769, 770, 770, 771, 772, 772, 773, 774, 774, 775, 776, 776,
+ 777, 778, 778, 779, 780, 780, 49, 782, 783, 783, 784, 785, 785, 786, 787,
+ 787, 788, 789, 789, 48, 791, 792, 792, 793, 794, 794, 795, 796, 796, 797,
+ 798, 798, 799, 800, 800, 801, 790, 781, 766, 765, 764, 763, 762, 513, 806,
+ 807, 808, 809, 802, 803, 804, 805, 802, 803, 804, 805, 810, 811, 811, 812,
+ 813, 813, 814, 815, 815, 816, 817, 817, 818, 761, 748, 819, 819, 820, 821,
+ 822, 823, 823, 824, 731, 825, 826, 825, 826, 47, 828, 829, 829, 830, 831,
+ 832, 833, 833, 46, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845,
+ 846, 847, 848, 849, 850, 851, 852, 852, 853, 834, 854, 855, 854, 855, 508,
+ 508, 857, 858, 858, 859, 860, 860, 861, 862, 862, 863, 864, 864, 865, 866,
+ 866, 867, 868, 869, 870, 243, 243, 872, 873, 873, 874, 875, 875, 876, 877,
+ 877, 878, 879, 879, 880, 881, 881, 882, 883, 883, 884, 885, 885, 886, 887,
+ 887, 888, 889, 889, 890, 891, 891, 892, 893, 893, 894, 895, 256, 256, 897,
+ 898, 898, 899, 900, 900, 901, 902, 902, 903, 904, 904, 905, 906, 906, 907,
+ 908, 908, 909, 910, 910, 911, 912, 912, 913, 914, 914, 915, 916, 916, 917,
+ 918, 233, 920, 921, 922, 922, 923, 924, 924, 925, 926, 926, 927, 928, 928,
+ 929, 930, 930, 931, 932, 932, 933, 934, 934, 935, 919, 896, 936, 936, 937,
+ 938, 241, 940, 941, 942, 943, 944, 939, 871, 945, 945, 946, 947, 948, 949,
+ 949, 37, 951, 952, 952, 953, 954, 954, 955, 956, 956, 957, 958, 958, 959,
+ 960, 960, 961, 962, 962, 963, 964, 964, 622, 966, 967, 968, 969, 970, 971,
+ 971, 972, 973, 973, 35, 975, 976, 976, 977, 978, 978, 979, 980, 980, 981,
+ 982, 982, 983, 984, 984, 34, 986, 987, 987, 33, 989, 990, 990, 991, 988,
+ 992, 992, 993, 993, 994, 995, 32, 997, 998, 998, 31, 1000, 1001, 1001, 1002,
+ 999, 1003, 1003, 1004, 1004, 1005, 1006, 30, 1008, 1007, 996, 1009, 1010,
+ 1011, 1012, 1013, 1013, 1014, 985, 1015, 1016, 1015, 1016, 29, 28, 27, 26,
+ 25, 24, 23, 22, 21, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018,
+ 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039,
+ 53, 51, 1042, 1041, 1043, 1044, 1045, 1046, 1046, 1047, 1048, 1048, 1049,
+ 1050, 1050, 1051, 1052, 1052, 1053, 1054, 1054, 1055, 1056, 1057, 1040, 1059,
+ 1058, 1060, 1061, 1061, 1062, 1063, 1063, 1064, 1065, 1065, 1066, 1067, 1067,
+ 1068, 1069, 1069, 1070, 1071, 1071, 1072, 1017, 974, 965, 950, 856, 827,
+ 689, 642, 631, 590, 585, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080,
+ 1081, 1082, 1083, 1084, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081,
+ 1082, 1083, 1084, 3, 1086, 1087, 1087, 1088, 1089, 1089, 1090, 1091, 1091,
+ 1092, 1093, 1093, 1094, 1095, 1095, 1096, 1097, 1097, 1098, 1085, 560, 447,
+ 436, 1099, 1100, 1101, 1102, 1103, 1099, 1100, 1101, 1102, 1103, 498, 541,
+ 1105, 1106, 1106, 503, 503, 458, 458, 503, 503, 702, 702, 478, 478, 471,
+ 471, 483, 483, 477, 477, 497, 497, 496, 496, 479, 479, 520, 520, 458, 458,
+ 702, 702, 521, 521, 1117, 1118, 1118, 1119, 1120, 1120, 1121, 1122, 1122,
+ 471, 471, 537, 537, 458, 458, 458, 458, 521, 521, 1128, 1127, 1126, 1125,
+ 1124, 1123, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1129,
+ 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142,
+ 1143, 1144, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139,
+ 1140, 1141, 1142, 1143, 1144, 1145, 1146, 524, 524, 1148, 1149, 1149, 1150,
+ 1151, 1151, 1152, 1153, 1153, 1154, 1155, 1155, 1156, 1157, 1157, 1158, 1147,
+ 1159, 1160, 1159, 1160, 419, 419, 1162, 1163, 1163, 1164, 1165, 1165, 1166,
+ 1167, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 418,
+ 418, 1179, 1180, 1180, 1181, 1182, 1182, 1183, 1184, 1184, 1185, 1186, 1187,
+ 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1178, 1196, 1196, 1197, 1197,
+ 415, 415, 1199, 1200, 1200, 1201, 1202, 1202, 1203, 1204, 1204, 1205, 1206,
+ 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1216, 417, 417,
+ 1218, 1219, 1219, 1220, 1221, 1221, 1222, 1223, 1223, 1224, 1225, 1226, 1227,
+ 1228, 1229, 1230, 1231, 1232, 1233, 413, 413, 1235, 1236, 1236, 1237, 1238,
+ 1238, 1239, 1240, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249,
+ 1250, 1251, 1234, 1253, 1253, 1252, 1252, 414, 414, 1255, 1256, 1256, 1257,
+ 1258, 1258, 1259, 1260, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268,
+ 1269, 1270, 1271, 1272, 1272, 412, 412, 1274, 1275, 1275, 1276, 1277, 1277,
+ 1278, 1279, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289,
+ 1290, 1291, 1291, 1292, 1293, 1293, 1294, 1295, 1295, 1296, 1297, 1297, 1298,
+ 1299, 1299, 1300, 1301, 1301, 1302, 1303, 1303, 1304, 1305, 1305, 1306, 1307,
+ 1307, 1308, 1309, 1309, 1310, 1311, 1311, 411, 411, 1313, 1314, 1314, 1315,
+ 1316, 1316, 1317, 1318, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326,
+ 1327, 1328, 416, 416, 1330, 1331, 1331, 1332, 1333, 1333, 1334, 1335, 1335,
+ 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1329, 1312,
+ 1347, 1348, 1349, 1347, 1348, 1349, 484, 484, 1351, 1352, 1352, 1353, 1354,
+ 1354, 1355, 1356, 1356, 1357, 1358, 1359, 1360, 1360, 394, 394, 1362, 1363,
+ 1363, 1364, 1365, 1365, 1366, 1367, 1367, 1368, 1369, 1370, 1371, 1372, 1373,
+ 1374, 1375, 1375, 1376, 1377, 1377, 1378, 1379, 1379, 1380, 1381, 1381, 1196,
+ 1196, 1253, 1253, 420, 420, 1385, 1386, 1386, 1387, 1388, 1388, 1389, 1390,
+ 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1400, 1401,
+ 1384, 1383, 1382, 1361, 1350, 1273, 1254, 1217, 1198, 1161, 1402, 1403, 1404,
+ 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1402, 1403, 1404, 1405, 1406,
+ 1407, 1408, 1409, 1410, 1411, 1412, 1413, 92, 1414, 1415, 1416, 1416, 1417,
+ 1418, 1418, 1419, 1420, 1420, 1421, 1422, 1422, 341, 783, 1424, 1425, 1426,
+ 1427, 1428, 1429, 1430, 1431, 1431, 1432, 1433, 1433, 783, 1435, 1436, 1437,
+ 1438, 1439, 1440, 1441, 1442, 1442, 1443, 1444, 1444, 633, 633, 595, 595,
+ 622, 1448, 1449, 1449, 1450, 1447, 1446, 1451, 626, 1452, 1453, 1451, 626,
+ 1452, 1453, 1454, 624, 624, 1455, 1456, 1457, 1457, 611, 1459, 1460, 1460,
+ 1461, 1462, 1462, 1463, 1464, 1464, 1465, 1466, 1467, 1468, 1468, 1469, 1470,
+ 1470, 1471, 1472, 1472, 1473, 1474, 1474, 1475, 1476, 1476, 1477, 1478, 1478,
+ 1479, 1480, 1481, 1482, 1482, 1483, 1484, 1484, 1485, 1486, 1486, 1487, 1488,
+ 1488, 1489, 1490, 1490, 1491, 1492, 1492, 1493, 1494, 1495, 1496, 1496, 1497,
+ 1498, 1498, 1499, 1500, 1500, 1501, 1502, 1502, 1503, 1504, 1505, 1506, 1506,
+ 1507, 1508, 1508, 1509, 1510, 1510, 1511, 1512, 1512, 1513, 1514, 1515, 1516,
+ 1516, 1517, 1518, 1518, 1519, 1520, 1520, 1521, 1522, 1522, 1523, 1524, 1524,
+ 1525, 1526, 1526, 1527, 1458, 1445, 1434, 1423, 1528, 1529, 1530, 1531, 1532,
+ 1528, 1529, 1530, 1531, 1532, 735, 1534, 1535, 1536, 1537, 1538, 1539, 1540,
+ 1541, 1542, 544, 544, 1543, 639, 49, 783, 1545, 1546, 1546, 1547, 1548, 1548,
+ 1549, 1550, 1550, 1551, 1544, 1552, 1553, 1552, 1553, 687, 1555, 1556, 800,
+ 1556, 800, 976, 987, 990, 998, 1001, 1559, 1558, 49, 752, 1009, 1560, 1561,
+ 48, 544, 751, 4, 1564, 1563, 1562, 595, 806, 952, 1565, 1566, 1567, 243,
+ 269, 675, 1043, 1044, 230, 241, 256, 716, 458, 633, 471, 472, 477, 478, 479,
+ 484, 702, 239, 240, 242, 257, 258, 483, 496, 497, 498, 503, 252, 254, 255,
+ 449, 516, 520, 521, 524, 527, 538, 264, 463, 537, 541, 253, 389, 508, 829,
+ 394, 412, 413, 414, 415, 416, 417, 418, 419, 420, 1577, 1576, 1575, 1574,
+ 1573, 1572, 1571, 1570, 1569, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585,
+ 1586, 370, 411, 695, 1588, 1589, 622, 1027, 1028, 1029, 1030, 1031, 1032,
+ 1033, 1034, 1035, 1591, 1592, 1593, 1590, 1587, 1594, 1595, 1596, 2, 592,
+ 836, 43, 438, 1599, 1598, 1597, 1568, 341, 513, 807, 808, 1087, 1600, 1601,
+ 1602, 1603, 1604, 1605, 1606, 1607, 1607, 1608, 1609, 1609, 223, 184, 185,
+ 1613, 1612, 1614, 1615, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1627, 1628, 1629,
+ 1630, 1631, 1632, 1633, 1634, 1635, 1636, 172, 173, 1639, 1638, 463, 1640,
+ 1641, 167, 168, 169, 170, 171, 1647, 1646, 1645, 1644, 1643, 695, 1648, 1649,
+ 1650, 1651, 1652, 675, 166, 1655, 341, 1656, 164, 165, 1659, 1658, 1660,
+ 1661, 1662, 1657, 1654, 1653, 1642, 1637, 1616, 1663, 1664, 1665, 1666, 1667,
+ 1668, 1669, 161, 162, 163, 1673, 1672, 1671, 1674, 1675, 1676, 158, 159,
+ 160, 1680, 1679, 1678, 1681, 1682, 1683, 154, 155, 156, 157, 1688, 1687,
+ 1686, 1685, 1689, 1690, 1691, 1692, 148, 149, 150, 151, 152, 153, 1699, 1698,
+ 1697, 1696, 1695, 1694, 1700, 1701, 1702, 1703, 1704, 1705, 146, 147, 1708,
+ 1707, 1709, 1710, 1711, 1706, 1693, 1684, 1677, 422, 1712, 1713, 1714, 1715,
+ 1716, 987, 990, 1009, 998, 1001, 139, 140, 141, 142, 143, 144, 145, 1726,
+ 1725, 1724, 1723, 1722, 1721, 1720, 1043, 1044, 1727, 1728, 1729, 1730, 1731,
+ 1732, 1733, 106, 1735, 1736, 138, 1738, 1737, 269, 1739, 1740, 134, 135,
+ 136, 137, 1745, 1744, 1743, 1742, 1746, 1747, 1748, 1749, 1750, 1741, 1734,
+ 1719, 1718, 1751, 1752, 1753, 1754, 1755, 104, 105, 1758, 1757, 1759, 1760,
+ 1761, 1762, 976, 1764, 1765, 133, 1767, 836, 1768, 132, 1770, 370, 1771,
+ 129, 130, 131, 1775, 1774, 1773, 544, 1776, 633, 1777, 1778, 127, 128, 1781,
+ 1780, 1782, 1783, 1784, 1779, 1772, 1769, 1766, 1763, 1785, 1786, 1787, 1788,
+ 1789, 1790, 103, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1791, 1756, 1717,
+ 1670, 1799, 1800, 1801, 1802, 1803, 102, 1805, 1806, 1807, 1808, 222, 1810,
+ 1809, 1811, 1812, 101, 1814, 1815, 1816, 1817, 1818, 477, 478, 479, 1819,
+ 1820, 1813, 486, 704, 1821, 1822, 220, 221, 1825, 1824, 1826, 1827, 595,
+ 1829, 1830, 1831, 1832, 1833, 1828, 458, 491, 1834, 1835, 126, 1837, 1838,
+ 1839, 230, 1840, 125, 1842, 1843, 122, 123, 124, 1847, 1846, 1845, 1848,
+ 1849, 1850, 120, 121, 1853, 1852, 1854, 1855, 119, 1857, 1858, 1859, 1856,
+ 1851, 1844, 1860, 1861, 1862, 1863, 1864, 1841, 500, 1865, 1866, 118, 1868,
+ 1869, 117, 1871, 1872, 112, 113, 114, 115, 116, 1878, 1877, 1876, 1875, 1874,
+ 1879, 1880, 1881, 1882, 1883, 1884, 1873, 1870, 503, 1885, 1886, 1887, 111,
+ 1889, 1890, 1891, 1892, 1032, 1033, 1034, 1035, 1027, 1031, 1895, 1894, 1896,
+ 1897, 438, 1899, 1900, 100, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1901,
+ 1898, 1893, 1888, 1909, 1910, 1911, 1912, 1913, 99, 1915, 1916, 1917, 1918,
+ 1919, 1920, 98, 1922, 1923, 97, 1925, 1926, 96, 1928, 1929, 228, 1931, 1932,
+ 1933, 1930, 1927, 1924, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1921, 1941,
+ 1942, 219, 1944, 1945, 218, 1947, 1948, 1949, 1946, 510, 1950, 1951, 513,
+ 783, 214, 215, 216, 217, 1957, 1956, 1955, 1954, 716, 1958, 1959, 1960, 1961,
+ 239, 240, 241, 242, 243, 389, 110, 1964, 12, 1965, 1966, 252, 253, 254, 255,
+ 256, 258, 449, 516, 1967, 213, 1969, 520, 521, 622, 829, 1970, 212, 1972,
+ 527, 1565, 1973, 1974, 1971, 1968, 1963, 1962, 1953, 530, 1975, 1976, 1977,
+ 1978, 1979, 1980, 109, 1982, 73, 1983, 108, 1985, 72, 1986, 107, 1988, 1989,
+ 1990, 1987, 1984, 264, 1991, 1992, 1993, 541, 792, 807, 808, 809, 1087, 208,
+ 209, 210, 211, 1999, 1998, 1997, 1996, 394, 751, 752, 806, 2000, 2001, 2002,
+ 2003, 199, 200, 201, 202, 203, 204, 205, 206, 207, 2013, 2012, 2011, 2010,
+ 2009, 2008, 2007, 2006, 2005, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
+ 2022, 194, 1028, 1029, 1030, 195, 196, 197, 198, 2028, 2027, 2026, 2025,
+ 2024, 952, 2029, 2030, 2031, 2032, 2033, 188, 189, 190, 191, 192, 193, 2040,
+ 2039, 2038, 2037, 2036, 2035, 2041, 2042, 2043, 2044, 2045, 2046, 186, 187,
+ 2049, 2048, 2050, 2051, 592, 2053, 2052, 2047, 2034, 2023, 2004, 1995, 1994,
+ 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 1981, 1952, 1943, 1914,
+ 1867, 1836, 1823, 1804, 1611, 722, 722, 2063, 2064, 2065, 2066, 2067, 2068,
+ 2069, 2070, 2071, 2072, 547, 548, 223, 92, 2076, 2075, 2077, 2078, 222, 89,
+ 90, 91, 86, 87, 88, 84, 85, 2083, 2082, 2081, 2080, 2084, 2085, 2086, 2087,
+ 220, 221, 2, 2090, 2089, 2091, 2092, 81, 82, 83, 19, 2095, 2094, 2096, 2097,
+ 80, 2099, 2100, 219, 218, 69, 2104, 2103, 2102, 2105, 2106, 2107, 44, 49,
+ 94, 214, 215, 216, 217, 14, 15, 16, 17, 18, 39, 7, 8, 9, 10, 11, 12, 13,
+ 78, 79, 36, 47, 76, 77, 213, 75, 4, 74, 212, 2115, 2114, 2113, 2112, 2111,
+ 2110, 2109, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 6, 72, 73, 3, 41, 42,
+ 43, 48, 71, 40, 45, 52, 68, 208, 209, 210, 211, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 37, 194, 195, 196, 197, 198, 188, 189, 190, 191, 192,
+ 193, 186, 187, 55, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2132,
+ 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2123, 2108, 2101, 2098, 2093,
+ 2088, 2079, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 184, 185, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 70, 172, 173, 56, 167, 168,
+ 169, 170, 171, 38, 50, 166, 164, 165, 2156, 2155, 2154, 2153, 2152, 2151,
+ 2150, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 161, 162, 163, 158, 159,
+ 160, 154, 155, 156, 157, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 148, 149,
+ 150, 151, 152, 153, 146, 147, 2170, 2169, 2168, 2167, 2166, 2165, 2171, 2172,
+ 2173, 2174, 2175, 2176, 30, 33, 34, 31, 32, 51, 53, 139, 140, 141, 142, 143,
+ 144, 145, 95, 138, 134, 135, 136, 137, 2182, 2181, 2180, 2179, 2178, 2183,
+ 2184, 2185, 2186, 2187, 46, 133, 57, 132, 20, 93, 129, 130, 131, 127, 128,
+ 2192, 2191, 2190, 2189, 2193, 2194, 2195, 2196, 2197, 2188, 2177, 2164, 2198,
+ 2199, 2200, 2201, 126, 2203, 2204, 125, 122, 123, 124, 120, 121, 119, 2209,
+ 2208, 2207, 2206, 2210, 2211, 2212, 2213, 2214, 2205, 2215, 2216, 118, 117,
+ 112, 113, 114, 115, 116, 2220, 2219, 2218, 2221, 2222, 2223, 111, 2225, 2226,
+ 26, 27, 28, 29, 21, 25, 2229, 2228, 2230, 2231, 54, 2233, 2234, 2235, 2232,
+ 2227, 2224, 2236, 2237, 2238, 2239, 110, 2241, 2242, 2243, 2244, 109, 108,
+ 107, 2248, 2247, 2246, 2249, 2250, 2251, 22, 23, 24, 2253, 2254, 2255, 2252,
+ 2256, 2257, 2258, 2245, 2240, 2217, 2202, 2149, 2259, 2260, 2261, 2262, 2263,
+ 2264, 106, 2266, 2267, 2268, 2269, 104, 105, 2271, 2272, 35, 2274, 2275,
+ 2276, 2273, 2277, 2278, 103, 2280, 2281, 2282, 2283, 2284, 2279, 2270, 2285,
+ 2286, 2287, 102, 2289, 2290, 2291, 2292, 101, 2294, 2295, 2296, 2297, 2298,
+ 2293, 2299, 2300, 5, 2302, 2303, 2304, 2305, 2306, 2307, 100, 2309, 2310,
+ 2311, 2312, 2313, 2314, 99, 2316, 2317, 2318, 2319, 98, 97, 96, 1, 2324,
+ 2323, 2322, 2321, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2320, 2332, 2333,
+ 2334, 2315, 2308, 2301, 2288, 2265, 2335, 2336, 2337, 2338, 2339, 2340, 2341,
+ 2342, 2342, 2343, 2344, 2344, 2345, 2346, 2346, 2347, 2348, 2348, 2349, 2074,
+ 2073, 2350, 2350, 2351, 551, 552, 553, 554, 555, 726, 727, 558, 2352, 2353,
+ 2354, 2354, 976, 2356, 2357, 2358, 2359, 2359, 2360, 2361, 2361, 2362, 2363,
+ 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 1044, 2375,
+ 2376, 2377, 2378, 2378, 2379, 2380, 2380, 2381, 2382, 2382, 2383, 2384, 2384,
+ 2385, 2386, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396,
+ 2397, 2398, 2398, 2399, 2400, 2400, 2401, 2402, 2402, 2403, 2404, 2404, 2405,
+ 2406, 2406, 2407, 2408, 2408, 2409, 2410, 2410, 2411, 44, 751, 752, 2412,
+ 1043, 2414, 2415, 2416, 2417, 2417, 2418, 2419, 2419, 2420, 2421, 2421, 2422,
+ 2423, 2423, 2424, 2425, 2425, 2426, 2427, 2428, 2429, 2429, 2430, 2431, 2431,
+ 2432, 2433, 2433, 2434, 2435, 2435, 2436, 2437, 2437, 2438, 2439, 2439, 2440,
+ 2441, 2441, 2442, 43, 2443, 2444, 2413, 341, 783, 792, 806, 807, 808, 1087,
+ 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 513, 808, 809,
+ 807, 341, 783, 792, 806, 836, 1087, 2460, 2459, 2458, 2457, 2456, 2462, 2461,
+ 2463, 2464, 2465, 2466, 315, 1900, 2467, 2468, 2469, 2470, 2471, 2471, 2472,
+ 2455, 2374, 2473, 2473, 2474, 2475, 315, 315, 2477, 2478, 2478, 2479, 2480,
+ 2481, 2482, 2483, 2484, 312, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493,
+ 2494, 2495, 2495, 2496, 2497, 2497, 2498, 2499, 2499, 2500, 2501, 2502, 2503,
+ 2504, 2505, 513, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 44, 751, 2514,
+ 809, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 43, 2523, 808, 2525, 2526,
+ 2527, 2528, 2529, 2530, 2531, 42, 2532, 807, 2534, 2535, 2536, 2537, 2538,
+ 2539, 2540, 41, 2541, 1087, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 3,
+ 2550, 341, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 50, 2559, 783, 2561,
+ 2562, 2563, 2564, 2565, 2566, 2567, 49, 2568, 2462, 2570, 2571, 2572, 2573,
+ 2574, 48, 2575, 806, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 40, 2584,
+ 2585, 2576, 2569, 2560, 2551, 2542, 2533, 2524, 2515, 2586, 2587, 2588, 2589,
+ 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602,
+ 2603, 2506, 2604, 2605, 2606, 2485, 2476, 2607, 2608, 2609, 2610, 2611, 2611,
+ 2612, 2355, 1610, 2613, 2614, 2615, 2613, 2614, 2615, 1565, 2617, 2618, 2619,
+ 2620, 2621, 2622, 2623, 2624, 2624, 2625, 2626, 2627, 2628, 2628, 2629, 2630,
+ 2630, 831, 2632, 2633, 836, 836, 2635, 2636, 2636, 2637, 2638, 2638, 2639,
+ 2634, 2640, 2641, 2640, 2641, 836, 2643, 2644, 2645, 2646, 2647, 2648, 2649,
+ 2650, 836, 836, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661,
+ 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2671, 2672, 2651,
+ 2674, 2673, 2674, 2675, 2642, 2676, 2677, 2676, 2677, 751, 2679, 513, 806,
+ 807, 808, 809, 2680, 2681, 2682, 2682, 2683, 2684, 2684, 2685, 2686, 2686,
+ 2687, 2688, 2688, 806, 807, 808, 809, 513, 546, 952, 952, 2691, 2692, 2692,
+ 2693, 2694, 2694, 2695, 2696, 2696, 2697, 2698, 2698, 2699, 2690, 2701, 2700,
+ 2702, 2703, 2703, 389, 389, 2705, 2706, 2706, 2707, 2708, 2708, 2709, 2710,
+ 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722,
+ 2722, 2723, 2724, 2724, 2725, 2726, 2726, 2727, 2728, 2728, 2729, 2730, 2730,
+ 2731, 2732, 2732, 2733, 2734, 2734, 2735, 2736, 2736, 2737, 2738, 2738, 2739,
+ 2740, 2740, 2741, 2742, 2742, 2743, 2744, 2744, 2745, 2746, 2747, 2748, 2748,
+ 683, 683, 675, 958, 2751, 2752, 2752, 2753, 2754, 2754, 2755, 2756, 2756,
+ 2757, 2758, 2758, 971, 2760, 2761, 2761, 2762, 2763, 2763, 976, 2357, 2765,
+ 2766, 2766, 583, 583, 2768, 2769, 2769, 2770, 2, 2771, 992, 993, 992, 993,
+ 995, 2773, 2774, 1003, 1004, 1003, 1004, 1006, 2776, 2777, 2778, 2775, 1009,
+ 2779, 2780, 2781, 1009, 2779, 2780, 2782, 2783, 2784, 2784, 2785, 2772, 2767,
+ 2786, 2787, 2788, 2786, 2787, 2788, 2701, 1059, 2790, 2791, 2792, 2793, 2793,
+ 2794, 2795, 2795, 2796, 2797, 2797, 2798, 2799, 2799, 2800, 2801, 2801, 2802,
+ 2803, 2803, 2804, 2789, 2764, 2759, 2750, 2749, 2704, 2689, 2678, 2631, 2616,
+ 1557, 1554, 1533, 1104, 387, 368, 262, 229, 2823, 2824, 2825, 2826, 2827,
+ 2828, 234, 235, 236, 237, 238, 2830, 2831, 245, 246, 247, 248, 249, 250,
+ 251, 2833, 2834, 2835, 2832, 2837, 2836, 2838, 2839, 263, 2841, 2842, 2843,
+ 2844, 2845, 2846, 268, 268, 2848, 2849, 2850, 2851, 2851, 2852, 2853, 2854,
+ 2855, 2855, 2856, 2857, 2858, 2859, 2859, 2860, 2861, 2862, 2863, 2863, 2864,
+ 2865, 2866, 2867, 2867, 2868, 2869, 2870, 2871, 2871, 2872, 2873, 2874, 2875,
+ 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2883, 2884, 2885, 2886,
+ 2887, 2887, 2888, 2889, 2890, 2891, 2891, 2892, 2893, 2894, 2895, 2895, 2896,
+ 2897, 2898, 2899, 2899, 2900, 2901, 2902, 2903, 2903, 2904, 2905, 2906, 2907,
+ 2907, 2908, 2909, 2910, 2911, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918,
+ 2919, 2919, 2920, 2921, 2922, 2923, 2923, 2924, 2925, 2926, 2927, 2927, 2928,
+ 2929, 13491, 2931, 2932, 314, 2934, 2935, 2936, 2933, 2937, 2938, 2939, 2940,
+ 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953,
+ 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966,
+ 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2974, 2975, 2976, 2977,
+ 2978, 2978, 2979, 2980, 340, 340, 2982, 2983, 2984, 2985, 2985, 2986, 2987,
+ 2988, 2989, 2989, 2990, 2991, 2992, 2993, 2993, 2994, 2995, 314, 314, 2997,
+ 2998, 2999, 3000, 3000, 3001, 3002, 340, 3004, 3005, 3006, 3007, 3008, 3009,
+ 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3019, 3020, 3021,
+ 3022, 3003, 3024, 3024, 3023, 3023, 3025, 3026, 3027, 2996, 2981, 2930, 3029,
+ 3029, 3028, 3030, 3031, 3028, 3030, 3031, 3032, 3033, 369, 369, 3035, 3036,
+ 3037, 3038, 3038, 3039, 3040, 3041, 3042, 3042, 3043, 3044, 3045, 3046, 3046,
+ 3047, 3048, 3049, 3050, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058,
+ 3059, 3060, 3061, 3062, 3062, 3063, 3064, 3065, 3066, 3066, 3067, 3068, 388,
+ 3070, 3071, 3072, 3073, 3074, 3075, 393, 3077, 3078, 3079, 3080, 3081, 3082,
+ 3083, 3076, 3084, 3085, 3086, 3087, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099,
+ 3088, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3109, 3110,
+ 3111, 3112, 3113, 3113, 3114, 3115, 3116, 3117, 3117, 3118, 3119, 437, 437,
+ 3121, 3122, 3123, 3124, 3124, 3125, 3126, 3127, 3128, 3128, 3129, 3130, 3131,
+ 3132, 3132, 3133, 3134, 3135, 3136, 3136, 3137, 3138, 448, 448, 3140, 3141,
+ 251, 251, 3143, 3144, 246, 246, 3146, 3147, 3148, 3145, 3142, 3149, 3150,
+ 3151, 3149, 3150, 3151, 3152, 3153, 457, 3155, 3156, 3157, 3158, 3100, 3101,
+ 3159, 3160, 462, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171,
+ 469, 470, 3173, 3174, 474, 475, 476, 3176, 3177, 481, 482, 3179, 3180, 3181,
+ 3178, 3175, 3182, 3183, 3184, 3185, 3186, 314, 3188, 3189, 3190, 3191, 3192,
+ 3193, 493, 494, 495, 3195, 3196, 3197, 2826, 3198, 3199, 3200, 502, 3202,
+ 3203, 3204, 3205, 3206, 3207, 507, 3209, 3210, 3211, 3212, 3213, 3214, 512,
+ 3216, 3217, 245, 246, 247, 248, 249, 250, 251, 448, 515, 3219, 3220, 518,
+ 519, 3222, 3223, 523, 3225, 3226, 526, 3228, 3229, 3230, 3227, 3224, 3221,
+ 3218, 3231, 3232, 3233, 3234, 2837, 3235, 3236, 3237, 263, 535, 536, 3239,
+ 3240, 540, 3242, 3243, 543, 3245, 3246, 3247, 3244, 3241, 3248, 3249, 3250,
+ 3251, 3252, 3253, 3238, 3215, 3208, 3201, 3194, 3187, 3172, 3161, 3154, 3255,
+ 3256, 3257, 3258, 3259, 3262, 3254, 3260, 3261, 3263, 3264, 3265, 2879, 2879,
+ 3267, 3268, 3269, 3270, 3270, 3271, 3272, 3273, 3274, 3274, 3275, 3276, 3277,
+ 3278, 3278, 3279, 3280, 3281, 3282, 3282, 3283, 3284, 3285, 3286, 3286, 3287,
+ 3288, 3289, 3290, 3290, 3291, 3292, 3293, 3294, 3294, 3295, 3296, 3297, 3298,
+ 3298, 3299, 3300, 3301, 3302, 3302, 3303, 3304, 3305, 3306, 3306, 3307, 3308,
+ 3024, 3024, 3310, 3311, 3312, 3309, 3313, 3313, 3314, 3314, 3315, 3316, 3054,
+ 3318, 3319, 3320, 3321, 3321, 3322, 3323, 3324, 3325, 3325, 3326, 3327, 591,
+ 591, 3329, 3330, 594, 594, 3332, 3333, 3334, 3335, 3335, 3336, 3337, 3338,
+ 3339, 3339, 3340, 3341, 3342, 3343, 3343, 3344, 3345, 3346, 3347, 3347, 3348,
+ 3349, 3350, 3351, 3351, 3352, 3353, 3354, 3355, 3355, 3356, 3357, 3358, 3359,
+ 3359, 3360, 3361, 3362, 3363, 3363, 3364, 3365, 3366, 3367, 3367, 3368, 3369,
+ 3370, 3371, 3371, 3372, 3373, 3374, 3375, 3375, 3376, 3377, 3378, 3379, 3379,
+ 3380, 3381, 621, 621, 3383, 3384, 3385, 3382, 3331, 3386, 3386, 3388, 3388,
+ 3387, 3387, 3389, 3390, 3391, 3392, 3392, 3393, 3394, 3395, 3396, 3396, 3397,
+ 3398, 632, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410,
+ 543, 543, 3411, 3412, 3413, 3414, 3415, 3415, 3416, 3417, 643, 643, 3419,
+ 3420, 3421, 3422, 3422, 3423, 3424, 3425, 3426, 3426, 3427, 3428, 3429, 3430,
+ 3430, 3431, 3432, 3433, 3434, 3434, 3435, 3436, 3437, 3438, 3438, 3439, 3440,
+ 3441, 3442, 3442, 3443, 3444, 3445, 3446, 3446, 3447, 3448, 3449, 3450, 3450,
+ 3451, 3452, 3453, 3454, 3454, 3455, 3456, 3457, 3458, 3458, 3459, 3460, 3461,
+ 3462, 3462, 3463, 3464, 3465, 3466, 3466, 3467, 3468, 3469, 3470, 3470, 3471,
+ 3472, 3473, 3474, 3474, 3475, 3476, 674, 3478, 3479, 3480, 3481, 3481, 3482,
+ 3483, 3484, 3485, 3485, 3486, 3487, 3488, 3489, 3489, 3490, 3491, 3492, 3493,
+ 3493, 3494, 3495, 3496, 3497, 3497, 3498, 3499, 3500, 3477, 3501, 3501, 3502,
+ 3502, 3503, 3504, 2847, 3506, 3507, 3508, 3509, 3510, 3510, 3511, 3512, 694,
+ 3514, 3515, 3516, 3517, 3165, 3518, 3519, 3520, 3521, 3522, 3523, 469, 470,
+ 701, 3525, 3526, 3527, 3182, 3183, 3528, 3529, 3530, 3198, 3532, 3533, 235,
+ 237, 238, 3535, 3536, 245, 246, 248, 249, 250, 251, 448, 515, 3538, 3539,
+ 3540, 3537, 3231, 3232, 3233, 3541, 3542, 3543, 3544, 535, 536, 3546, 3547,
+ 3548, 3249, 3549, 3550, 3551, 715, 715, 3553, 3554, 3555, 3556, 3556, 3557,
+ 3558, 3559, 3560, 3560, 3561, 3562, 3563, 3552, 3545, 3534, 3531, 3524, 3257,
+ 3262, 3564, 3564, 3568, 3569, 3565, 3566, 3567, 3570, 3571, 3572, 3513, 3573,
+ 3574, 3573, 3574, 3575, 3576, 437, 3578, 3579, 3580, 3581, 3582, 3583, 3584,
+ 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597,
+ 3598, 3599, 3600, 3601, 3601, 3602, 3603, 3604, 3605, 3605, 3606, 3607, 3608,
+ 3609, 3610, 3611, 749, 750, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620,
+ 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3029, 3029, 3632,
+ 3633, 767, 767, 3635, 3636, 3637, 3638, 3638, 3639, 3640, 3641, 3642, 3642,
+ 3643, 3644, 3645, 3646, 3646, 3647, 3648, 3649, 3650, 3650, 3651, 3652, 3653,
+ 3654, 3654, 3655, 3656, 3657, 3658, 3658, 3659, 3660, 782, 782, 3662, 3663,
+ 3664, 3665, 3665, 3666, 3667, 3668, 3669, 3669, 3670, 3671, 3672, 3673, 3673,
+ 3674, 3675, 791, 791, 3677, 3678, 3679, 3680, 3680, 3681, 3682, 3683, 3684,
+ 3684, 3685, 3686, 3687, 3688, 3688, 3689, 3690, 3691, 3692, 3692, 3693, 3694,
+ 3695, 3676, 3661, 3634, 512, 762, 763, 764, 765, 3696, 3697, 3698, 3699,
+ 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3703, 3704, 3705, 3706, 3707,
+ 3707, 3708, 3709, 3710, 3711, 3711, 3712, 3713, 3714, 3715, 3715, 3716, 3717,
+ 3718, 3631, 3612, 3719, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3725, 3726,
+ 3727, 3728, 3577, 3729, 3730, 3729, 3730, 3731, 3732, 828, 828, 3734, 3735,
+ 3736, 3737, 3738, 3739, 3740, 3741, 3741, 3742, 3743, 835, 3745, 3746, 3747,
+ 3748, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 3760,
+ 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772, 3773,
+ 3774, 3775, 3776, 3776, 3777, 3778, 3779, 3744, 3780, 3781, 3780, 3781, 3782,
+ 3783, 507, 507, 3785, 3786, 3787, 3788, 3788, 3789, 3790, 3791, 3792, 3792,
+ 3793, 3794, 3795, 3796, 3796, 3797, 3798, 3799, 3800, 3800, 3801, 3802, 3803,
+ 3804, 3804, 3805, 3806, 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 234,
+ 234, 3816, 3817, 3818, 3819, 3819, 3820, 3821, 3822, 3823, 3823, 3824, 3825,
+ 3826, 3827, 3827, 3828, 3829, 3830, 3831, 3831, 3832, 3833, 3834, 3835, 3835,
+ 3836, 3837, 3838, 3839, 3839, 3840, 3841, 3842, 3843, 3843, 3844, 3845, 3846,
+ 3847, 3847, 3848, 3849, 3850, 3851, 3851, 3852, 3853, 3854, 3855, 3855, 3856,
+ 3857, 3858, 3859, 3859, 3860, 3861, 3862, 3863, 3864, 3865, 247, 247, 3867,
+ 3868, 3869, 3870, 3870, 3871, 3872, 3873, 3874, 3874, 3875, 3876, 3877, 3878,
+ 3878, 3879, 3880, 3881, 3882, 3882, 3883, 3884, 3885, 3886, 3886, 3887, 3888,
+ 3889, 3890, 3890, 3891, 3892, 3893, 3894, 3894, 3895, 3896, 3897, 3898, 3898,
+ 3899, 3900, 3901, 3902, 3902, 3903, 3904, 3905, 3906, 3906, 3907, 3908, 3909,
+ 3910, 3911, 3912, 2829, 3914, 3915, 3916, 3917, 3918, 3918, 3919, 3920, 3921,
+ 3922, 3922, 3923, 3924, 3925, 3926, 3926, 3927, 3928, 3929, 3930, 3930, 3931,
+ 3932, 3933, 3934, 3934, 3935, 3936, 3937, 3938, 3938, 3939, 3940, 3941, 3942,
+ 3942, 3943, 3944, 3945, 3913, 3866, 3946, 3946, 3947, 3948, 3949, 3950, 236,
+ 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 3960, 3961, 3962, 3951, 3815,
+ 3963, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 3969, 3970, 3971, 951, 951,
+ 3973, 3974, 3975, 3976, 3976, 3977, 3978, 3979, 3980, 3980, 3981, 3982, 3983,
+ 3984, 3984, 3985, 3986, 3987, 3988, 3988, 3989, 3990, 3991, 3992, 3992, 3993,
+ 3994, 3995, 3996, 3996, 3997, 3998, 621, 4000, 4001, 4002, 4003, 4004, 4005,
+ 4006, 4007, 4008, 4009, 4010, 4011, 4011, 4012, 4013, 4014, 4015, 4015, 4016,
+ 4017, 975, 975, 4019, 4020, 4021, 4022, 4022, 4023, 4024, 4025, 4026, 4026,
+ 4027, 4028, 4029, 4030, 4030, 4031, 4032, 4033, 4034, 4034, 4035, 4036, 986,
+ 986, 4038, 4039, 989, 989, 4041, 4042, 4043, 4040, 4044, 4044, 4045, 4045,
+ 4046, 4047, 4048, 4049, 4050, 4051, 997, 997, 4053, 4054, 1000, 1000, 4056,
+ 4057, 4058, 4055, 4059, 4059, 4060, 4060, 4061, 4062, 4063, 4064, 4065, 4066,
+ 4067, 4052, 1008, 4068, 4069, 4070, 4071, 4072, 4073, 4073, 4074, 4075, 4076,
+ 4037, 4077, 4078, 4077, 4078, 4079, 4080, 1018, 1019, 1020, 1021, 1022, 1023,
+ 1024, 1025, 1026, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 4090, 4091,
+ 1041, 1042, 4093, 4094, 4095, 4096, 4096, 4097, 4098, 4099, 4100, 4100, 4101,
+ 4102, 4103, 4104, 4104, 4105, 4106, 4107, 4108, 4108, 4109, 4110, 4111, 4112,
+ 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4092, 4121, 4120, 4122, 4123,
+ 4124, 4125, 4125, 4126, 4127, 4128, 4129, 4129, 4130, 4131, 4132, 4133, 4133,
+ 4134, 4135, 4136, 4137, 4137, 4138, 4139, 4140, 4141, 4141, 4142, 4143, 4144,
+ 4145, 4145, 4146, 4147, 4148, 4081, 4018, 3999, 3972, 3784, 3733, 3505, 3418,
+ 3399, 3328, 3317, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158,
+ 4159, 4160, 4149, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159,
+ 4160, 4161, 4162, 1086, 1086, 4164, 4165, 4166, 4167, 4167, 4168, 4169, 4170,
+ 4171, 4171, 4172, 4173, 4174, 4175, 4175, 4176, 4177, 4178, 4179, 4179, 4180,
+ 4181, 4182, 4183, 4183, 4184, 4185, 4186, 4163, 3266, 3139, 3120, 4187, 4188,
+ 4189, 4190, 4191, 4187, 4188, 4189, 4190, 4191, 4192, 4193, 493, 540, 4195,
+ 4196, 4197, 4198, 4198, 4199, 4200, 502, 502, 4202, 4203, 457, 457, 502,
+ 502, 4205, 4206, 701, 701, 4208, 4209, 475, 475, 4211, 4212, 470, 470, 482,
+ 482, 4214, 4215, 476, 476, 494, 494, 4217, 4218, 495, 495, 4220, 4221, 474,
+ 474, 519, 519, 4223, 4224, 457, 457, 701, 701, 4226, 4227, 518, 518, 4229,
+ 4230, 4231, 4232, 4232, 4233, 4234, 4235, 4236, 4236, 4237, 4238, 4239, 4240,
+ 4240, 4241, 4242, 470, 470, 4244, 4245, 536, 536, 4247, 4248, 457, 457, 4250,
+ 4251, 457, 457, 4253, 4254, 518, 518, 4256, 4257, 4258, 4255, 4252, 4249,
+ 4246, 4243, 4228, 4225, 4222, 4219, 4216, 4213, 4210, 4207, 4204, 4201, 4259,
+ 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272,
+ 4273, 4274, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269,
+ 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 523, 523,
+ 4282, 4283, 4284, 4285, 4285, 4286, 4287, 4288, 4289, 4289, 4290, 4291, 4292,
+ 4293, 4293, 4294, 4295, 4296, 4297, 4297, 4298, 4299, 4300, 4301, 4301, 4302,
+ 4303, 4304, 4281, 4305, 4306, 4305, 4306, 4307, 4308, 402, 402, 4310, 4311,
+ 4312, 4313, 4313, 4314, 4315, 4316, 4317, 4317, 4318, 4319, 4320, 4321, 4321,
+ 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334,
+ 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 403, 403, 4345, 4346,
+ 4347, 4348, 4348, 4349, 4350, 4351, 4352, 4352, 4353, 4354, 4355, 4356, 4356,
+ 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369,
+ 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4344, 4380, 4380,
+ 4381, 4381, 4382, 4383, 406, 406, 4385, 4386, 4387, 4388, 4388, 4389, 4390,
+ 4391, 4392, 4392, 4393, 4394, 4395, 4396, 4396, 4397, 4398, 4399, 4400, 4401,
+ 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414,
+ 4415, 4416, 4417, 4418, 4419, 4420, 4420, 4421, 4422, 404, 404, 4424, 4425,
+ 4426, 4427, 4427, 4428, 4429, 4430, 4431, 4431, 4432, 4433, 4434, 4435, 4435,
+ 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448,
+ 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 408, 408, 4459, 4460,
+ 4461, 4462, 4462, 4463, 4464, 4465, 4466, 4466, 4467, 4468, 4469, 4470, 4470,
+ 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483,
+ 4484, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4458, 4495, 4495,
+ 4494, 4494, 4496, 4497, 407, 407, 4499, 4500, 4501, 4502, 4502, 4503, 4504,
+ 4505, 4506, 4506, 4507, 4508, 4509, 4510, 4510, 4511, 4512, 4513, 4514, 4515,
+ 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528,
+ 4529, 4530, 4531, 4532, 4533, 4534, 4534, 4535, 4536, 409, 409, 4538, 4539,
+ 4540, 4541, 4541, 4542, 4543, 4544, 4545, 4545, 4546, 4547, 4548, 4549, 4549,
+ 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562,
+ 4563, 4564, 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4573, 4574,
+ 4575, 4576, 4577, 4577, 4578, 4579, 4580, 4581, 4581, 4582, 4583, 4584, 4585,
+ 4585, 4586, 4587, 4588, 4589, 4589, 4590, 4591, 4592, 4593, 4593, 4594, 4595,
+ 4596, 4597, 4597, 4598, 4599, 4600, 4601, 4601, 4602, 4603, 4604, 4605, 4605,
+ 4606, 4607, 4608, 4609, 4609, 4610, 4611, 4612, 4613, 4613, 4614, 4615, 410,
+ 410, 4617, 4618, 4619, 4620, 4620, 4621, 4622, 4623, 4624, 4624, 4625, 4626,
+ 4627, 4628, 4628, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638,
+ 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 405,
+ 405, 4652, 4653, 4654, 4655, 4655, 4656, 4657, 4658, 4659, 4659, 4660, 4661,
+ 4662, 4663, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673,
+ 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686,
+ 4651, 4616, 4687, 4688, 4689, 4687, 4688, 4689, 4690, 4691, 481, 481, 4693,
+ 4694, 4695, 4696, 4696, 4697, 4698, 4699, 4700, 4700, 4701, 4702, 4703, 4704,
+ 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4712, 4713, 4714, 393,
+ 393, 4716, 4717, 4718, 4719, 4719, 4720, 4721, 4722, 4723, 4723, 4724, 4725,
+ 4726, 4727, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737,
+ 4738, 4739, 4740, 4741, 4742, 4743, 4743, 4744, 4745, 4746, 4747, 4747, 4748,
+ 4749, 4750, 4751, 4751, 4752, 4753, 4754, 4755, 4755, 4756, 4757, 4380, 4380,
+ 4759, 4760, 4495, 4495, 4762, 4763, 401, 401, 4765, 4766, 4767, 4768, 4768,
+ 4769, 4770, 4771, 4772, 4772, 4773, 4774, 4775, 4776, 4776, 4777, 4778, 4779,
+ 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4791, 4792,
+ 4793, 4794, 4795, 4796, 4796, 4797, 4798, 4799, 4764, 4761, 4758, 4715, 4692,
+ 4537, 4498, 4423, 4384, 4309, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807,
+ 4808, 4809, 4810, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807, 4808, 4809,
+ 4810, 4811, 4812, 4813, 4814, 4815, 4816, 92, 4817, 4818, 4818, 4819, 4820,
+ 4821, 4822, 4822, 4823, 4824, 4825, 4826, 4826, 4827, 4828, 4829, 4830, 4830,
+ 4831, 4832, 340, 782, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841, 4842,
+ 4843, 4844, 4845, 4846, 4847, 4848, 4849, 4849, 4850, 4851, 4852, 4853, 4853,
+ 4854, 4855, 782, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4865, 4866,
+ 4867, 4868, 4869, 4870, 4871, 4872, 4872, 4873, 4874, 4875, 4876, 4876, 4877,
+ 4878, 632, 632, 4880, 4881, 594, 594, 4883, 4884, 621, 4886, 4887, 4888,
+ 4889, 4889, 4890, 4891, 4892, 4885, 4882, 4893, 3388, 4894, 4895, 4893, 3388,
+ 4894, 4895, 4896, 4897, 4898, 3386, 3386, 4899, 4900, 4901, 4902, 4903, 4903,
+ 4904, 4905, 3363, 4907, 4908, 4909, 4910, 4910, 4911, 4912, 4913, 4914, 4914,
+ 4915, 4916, 4917, 4918, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926,
+ 4926, 4927, 4928, 4929, 4930, 4930, 4931, 4932, 4933, 4934, 4934, 4935, 4936,
+ 4937, 4938, 4938, 4939, 4940, 4941, 4942, 4942, 4943, 4944, 4945, 4946, 4946,
+ 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4954, 4955, 4956, 4957, 4958,
+ 4958, 4959, 4960, 4961, 4962, 4962, 4963, 4964, 4965, 4966, 4966, 4967, 4968,
+ 4969, 4970, 4970, 4971, 4972, 4973, 4974, 4974, 4975, 4976, 4977, 4978, 4979,
+ 4980, 4981, 4982, 4982, 4983, 4984, 4985, 4986, 4986, 4987, 4988, 4989, 4990,
+ 4990, 4991, 4992, 4993, 4994, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001,
+ 5002, 5002, 5003, 5004, 5005, 5006, 5006, 5007, 5008, 5009, 5010, 5010, 5011,
+ 5012, 5013, 5014, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5022,
+ 5023, 5024, 5025, 5026, 5026, 5027, 5028, 5029, 5030, 5030, 5031, 5032, 5033,
+ 5034, 5034, 5035, 5036, 5037, 5038, 5038, 5039, 5040, 5041, 5042, 5042, 5043,
+ 5044, 5045, 4906, 4879, 4856, 4833, 5046, 5047, 5048, 5049, 5050, 5046, 5047,
+ 5048, 5049, 5050, 5051, 5052, 3585, 5054, 5055, 5056, 5057, 5058, 5059, 5060,
+ 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, 543,
+ 543, 5073, 3411, 5074, 5075, 49, 4859, 5077, 5077, 5078, 5079, 5080, 5081,
+ 5081, 5082, 5083, 5084, 5085, 5085, 5086, 5087, 5088, 5076, 5089, 5090, 5089,
+ 5090, 5091, 5092, 3501, 5094, 5095, 5096, 5097, 3692, 5097, 3692, 5098, 5099,
+ 975, 5101, 5102, 986, 989, 997, 1000, 5104, 5105, 5106, 5103, 749, 1008,
+ 5107, 5108, 5109, 5110, 543, 750, 5112, 5113, 48, 5114, 49, 5111, 594, 765,
+ 951, 1564, 5115, 5116, 5117, 5118, 234, 268, 674, 1041, 1042, 5120, 5121,
+ 229, 236, 247, 715, 5123, 5124, 457, 632, 5126, 5127, 469, 470, 474, 475,
+ 476, 481, 701, 5129, 5130, 235, 237, 238, 245, 246, 482, 493, 494, 495, 502,
+ 5132, 5133, 248, 249, 251, 448, 515, 518, 519, 523, 526, 535, 5135, 5136,
+ 263, 462, 536, 540, 5138, 5139, 250, 388, 507, 828, 5141, 5142, 393, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 5144, 5145, 5146, 5143, 5140, 5137,
+ 5134, 5131, 5128, 5125, 5122, 5147, 5148, 5149, 5150, 5151, 5152, 5153, 5154,
+ 5155, 5156, 5157, 369, 410, 694, 5159, 5160, 5161, 5162, 5163, 5164, 621,
+ 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 5166, 5167, 5168, 5169,
+ 5170, 5171, 5172, 5165, 5158, 5173, 5174, 5175, 5176, 5177, 591, 835, 5179,
+ 5180, 437, 5182, 5183, 43, 5184, 2, 5181, 5178, 5119, 340, 512, 763, 764,
+ 1086, 5185, 5186, 5187, 5188, 5189, 5190, 5191, 5192, 5193, 5194, 5195, 5196,
+ 5196, 5197, 5198, 5199, 5200, 5200, 5201, 5202, 1612, 1613, 5204, 5205, 1617,
+ 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 5207, 5208, 462, 1638,
+ 1639, 5210, 5211, 694, 1643, 1644, 1645, 1646, 1647, 5213, 5214, 674, 5216,
+ 5217, 340, 1655, 5219, 5220, 1658, 1659, 5222, 5223, 5224, 5221, 5218, 5215,
+ 5212, 5209, 5206, 5225, 5226, 5227, 5228, 5229, 5230, 5231, 5232, 5233, 1671,
+ 1672, 1673, 5235, 5236, 1678, 1679, 1680, 5238, 5239, 1685, 1686, 1687, 1688,
+ 5241, 5242, 1694, 1695, 1696, 1697, 1698, 1699, 5244, 5245, 1707, 1708, 5247,
+ 5248, 5249, 5246, 5243, 5240, 5237, 3092, 5250, 5251, 5252, 5253, 5254, 5255,
+ 5256, 986, 989, 1008, 5258, 5259, 997, 1000, 5261, 5262, 1041, 1042, 1720,
+ 1721, 1722, 1723, 1724, 1725, 1726, 5264, 5265, 1735, 5267, 5268, 5269, 268,
+ 1738, 5270, 5271, 5272, 1742, 1743, 1744, 1745, 5274, 5275, 5276, 5273, 5266,
+ 5263, 5260, 5277, 5278, 5279, 5280, 5281, 5282, 5283, 1757, 1758, 5285, 5286,
+ 5287, 5288, 5289, 5290, 975, 5292, 5293, 5294, 5295, 5296, 5297, 835, 1767,
+ 5299, 5300, 369, 1770, 5302, 5303, 543, 632, 1773, 1774, 1775, 5305, 5306,
+ 1780, 1781, 5308, 5309, 5310, 5307, 5304, 5301, 5298, 5291, 5311, 5312, 5313,
+ 5314, 5315, 5316, 5317, 5318, 1792, 5320, 5321, 5322, 5323, 5324, 5325, 5326,
+ 5327, 5328, 5329, 5330, 5319, 5284, 5257, 5234, 5331, 5332, 5333, 5334, 5335,
+ 5336, 5337, 1805, 5339, 5340, 5341, 5342, 5343, 5344, 5345, 1810, 5346, 5347,
+ 5348, 1814, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 474, 475, 476, 5357,
+ 5358, 5359, 5360, 5349, 3182, 3528, 5361, 5362, 5363, 5364, 1824, 1825, 5366,
+ 5367, 594, 5369, 5370, 5371, 5372, 5373, 5374, 5375, 5376, 5377, 5378, 5379,
+ 5368, 457, 3191, 5380, 5381, 5382, 5383, 1837, 5385, 5386, 5387, 229, 5388,
+ 5389, 5390, 1842, 5392, 5393, 1845, 1846, 1847, 5395, 5396, 1852, 1853, 5398,
+ 5399, 1857, 5401, 5402, 5403, 5400, 5397, 5394, 5404, 5405, 5406, 5407, 5408,
+ 5409, 5410, 5391, 3198, 5411, 5412, 5413, 5414, 1868, 5416, 5417, 1871, 5419,
+ 5420, 1874, 1875, 1876, 1877, 1878, 5422, 5423, 5424, 5421, 5418, 502, 5425,
+ 5426, 5427, 5428, 5429, 1889, 5431, 5432, 5433, 5434, 5435, 5436, 1018, 1019,
+ 1020, 1021, 5438, 5439, 1022, 1026, 5441, 5442, 5443, 5440, 5444, 5445, 5446,
+ 5447, 437, 5449, 5450, 5451, 5452, 5453, 5454, 1902, 5456, 5457, 5458, 5459,
+ 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5455, 5448, 5437, 5430, 5467, 5468,
+ 5469, 5470, 5471, 5472, 5473, 1915, 5475, 5476, 5477, 5478, 5479, 5480, 5481,
+ 5482, 5483, 5484, 1922, 5486, 5487, 1925, 5489, 5490, 1928, 5492, 5493, 1931,
+ 5495, 5496, 5497, 5494, 5491, 5488, 5498, 5499, 5500, 5501, 5502, 5503, 5504,
+ 5505, 5506, 5507, 5508, 5485, 5509, 5510, 5511, 5512, 1944, 5514, 5515, 1947,
+ 5517, 5518, 5519, 5516, 3212, 5520, 5521, 5522, 5523, 512, 782, 5525, 5526,
+ 715, 1954, 1955, 1956, 1957, 5528, 5529, 234, 235, 236, 237, 238, 388, 5531,
+ 5532, 1964, 5534, 5535, 12, 5536, 245, 247, 248, 249, 250, 251, 448, 515,
+ 5537, 5538, 5539, 518, 519, 621, 828, 1969, 5541, 5542, 526, 1564, 1972,
+ 5544, 5545, 5546, 5543, 5540, 5533, 5530, 5527, 3232, 5547, 5548, 5549, 5550,
+ 5551, 5552, 5553, 5554, 1982, 5556, 5557, 1985, 5559, 5560, 1988, 5562, 5563,
+ 5564, 72, 5561, 73, 5558, 263, 5565, 5566, 5567, 5568, 5569, 540, 762, 763,
+ 764, 791, 1086, 5571, 5572, 393, 749, 750, 765, 1996, 1997, 1998, 1999, 5574,
+ 5575, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 5577, 5578, 1023,
+ 1024, 1025, 5580, 5581, 5582, 195, 951, 2024, 2026, 2027, 2028, 5583, 5584,
+ 5585, 2035, 2036, 2037, 2038, 2039, 2040, 5587, 5588, 2048, 2049, 5590, 5591,
+ 591, 5593, 5594, 5595, 5592, 5589, 5586, 5579, 5576, 5573, 5570, 5596, 5597,
+ 5598, 5599, 5600, 5601, 5602, 5603, 5604, 5605, 5606, 5555, 5524, 5513, 5474,
+ 5415, 5384, 5365, 5338, 1611, 3564, 3564, 5607, 5608, 5609, 5610, 5611, 5612,
+ 5613, 5614, 5615, 5616, 5617, 3249, 3250, 5619, 5620, 2075, 5622, 2076, 5624,
+ 5625, 5623, 5626, 5627, 5628, 5629, 2080, 5631, 2081, 5633, 2082, 5635, 2083,
+ 5637, 5638, 5636, 5634, 5632, 5639, 5640, 5641, 5642, 5643, 5644, 2089, 5646,
+ 2090, 5648, 5649, 5647, 5650, 5651, 5652, 5653, 2094, 5655, 2095, 5657, 5658,
+ 5656, 5659, 5660, 5661, 5662, 2099, 5664, 5665, 5666, 5667, 5668, 2102, 5670,
+ 2103, 5672, 2104, 5674, 5675, 5673, 5671, 5676, 5677, 5678, 5679, 5680, 2109,
+ 5682, 2110, 5684, 2111, 5686, 2112, 5688, 2113, 5690, 2114, 5692, 2115, 5694,
+ 5695, 5693, 5691, 5689, 5687, 5685, 5683, 5696, 5697, 5698, 5699, 5700, 5701,
+ 5702, 5703, 5704, 2124, 5706, 2125, 5708, 2126, 5710, 2127, 5712, 2128, 5714,
+ 2129, 5716, 2130, 5718, 2131, 5720, 5721, 5719, 5717, 5715, 5713, 5711, 5709,
+ 5707, 5722, 5723, 5724, 5725, 5726, 5727, 5728, 5729, 5730, 5731, 5732, 5705,
+ 5681, 5669, 5663, 5654, 5645, 5630, 5733, 5734, 5735, 5736, 5737, 5738, 5739,
+ 5740, 5741, 5742, 2150, 5744, 2151, 5746, 2152, 5748, 2153, 5750, 2154, 5752,
+ 2155, 5754, 2156, 5756, 5757, 5755, 5753, 5751, 5749, 5747, 5745, 5758, 5759,
+ 5760, 5761, 5762, 5763, 5764, 5765, 5766, 2165, 5768, 2166, 5770, 2167, 5772,
+ 2168, 5774, 2169, 5776, 2170, 5778, 5779, 5777, 5775, 5773, 5771, 5769, 5780,
+ 5781, 5782, 5783, 5784, 5785, 5786, 5787, 2178, 5789, 2179, 5791, 2180, 5793,
+ 2181, 5795, 2182, 5797, 5798, 5796, 5794, 5792, 5790, 5799, 5800, 5801, 5802,
+ 5803, 5804, 5805, 2189, 5807, 2190, 5809, 2191, 5811, 2192, 5813, 5814, 5812,
+ 5810, 5808, 5815, 5816, 5817, 5818, 5819, 5820, 5821, 5806, 5788, 5767, 5822,
+ 5823, 5824, 5825, 5826, 5827, 2203, 5829, 5830, 5831, 5832, 5833, 2206, 5835,
+ 2207, 5837, 2208, 5839, 2209, 5841, 5842, 5840, 5838, 5836, 5843, 5844, 5845,
+ 5846, 5847, 5848, 5849, 5834, 5850, 5851, 5852, 5853, 2218, 5855, 2219, 5857,
+ 2220, 5859, 5860, 5858, 5856, 5861, 5862, 5863, 5864, 5865, 2225, 5867, 5868,
+ 5869, 5870, 5871, 2228, 5873, 2229, 5875, 5876, 5874, 5877, 5878, 5879, 5880,
+ 2233, 5882, 5883, 5884, 5885, 5886, 5887, 5881, 5872, 5866, 5888, 5889, 5890,
+ 5891, 5892, 5893, 2241, 5895, 5896, 5897, 5898, 5899, 5900, 5901, 5902, 5903,
+ 2246, 5905, 2247, 5907, 2248, 5909, 5910, 5908, 5906, 5911, 5912, 5913, 5914,
+ 5915, 2253, 5917, 5918, 5919, 5920, 5921, 5922, 5916, 5923, 5924, 5925, 5926,
+ 5927, 5904, 5894, 5854, 5828, 5743, 5928, 5929, 5930, 5931, 5932, 5933, 5934,
+ 5935, 2266, 5937, 5938, 5939, 5940, 5941, 5942, 5943, 5944, 5945, 2271, 5947,
+ 5948, 5949, 5950, 5951, 2274, 5953, 5954, 5955, 5956, 5957, 5958, 5952, 5959,
+ 5960, 5961, 5962, 2280, 5964, 5965, 5966, 5967, 5968, 5969, 5970, 5971, 5972,
+ 5973, 5963, 5946, 5974, 5975, 5976, 5977, 5978, 2289, 5980, 5981, 5982, 5983,
+ 5984, 5985, 5986, 5987, 5988, 2294, 5990, 5991, 5992, 5993, 5994, 5995, 5996,
+ 5997, 5998, 5999, 5989, 6000, 6001, 6002, 6003, 2302, 6005, 6006, 6007, 6008,
+ 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 2309, 6019, 6020, 6021,
+ 6022, 6023, 6024, 6025, 6026, 6027, 6028, 6029, 6030, 6031, 2316, 6033, 6034,
+ 6035, 6036, 6037, 6038, 6039, 6040, 6041, 2321, 6043, 2322, 6045, 2323, 6047,
+ 2324, 6049, 6050, 6048, 6046, 6044, 6051, 6052, 6053, 6054, 6055, 6056, 6057,
+ 6058, 6059, 6060, 6061, 6042, 6062, 6063, 6064, 6065, 6066, 6032, 6018, 6004,
+ 5979, 5936, 6067, 6068, 6069, 6070, 6071, 6072, 6073, 6074, 6075, 6076, 6076,
+ 6077, 6078, 6079, 6080, 6080, 6081, 6082, 6083, 6084, 6084, 6085, 6086, 6087,
+ 6088, 6088, 6089, 6090, 6091, 5621, 5618, 6092, 6092, 6093, 3255, 3256, 3257,
+ 3258, 3259, 3568, 3569, 3262, 6094, 6095, 6096, 6097, 6098, 6098, 6099, 6100,
+ 975, 6102, 6103, 6104, 6105, 6106, 6107, 6108, 6109, 6109, 6110, 6111, 6112,
+ 6113, 6113, 6114, 6115, 6116, 6117, 6117, 6118, 6119, 6120, 6121, 6122, 6123,
+ 6124, 6125, 6126, 6127, 6128, 6129, 6130, 6131, 6132, 6133, 6134, 6135, 6136,
+ 6137, 6138, 6139, 1041, 6141, 6142, 6143, 6144, 6145, 6146, 6147, 6148, 6148,
+ 6149, 6150, 6151, 6152, 6152, 6153, 6154, 6155, 6156, 6156, 6157, 6158, 6159,
+ 6160, 6160, 6161, 6162, 6163, 6164, 6164, 6165, 6166, 6167, 6168, 6169, 6170,
+ 6171, 6172, 6173, 6174, 6175, 6176, 6177, 6178, 6179, 6180, 6181, 6182, 6183,
+ 6184, 6185, 6186, 6187, 6188, 6188, 6189, 6190, 6191, 6192, 6192, 6193, 6194,
+ 6195, 6196, 6196, 6197, 6198, 6199, 6200, 6200, 6201, 6202, 6203, 6204, 6204,
+ 6205, 6206, 6207, 6208, 6208, 6209, 6210, 6211, 6212, 6212, 6213, 6214, 6215,
+ 749, 750, 6216, 6217, 6218, 1042, 6220, 6221, 6222, 6223, 6224, 6225, 6226,
+ 6227, 6227, 6228, 6229, 6230, 6231, 6231, 6232, 6233, 6234, 6235, 6235, 6236,
+ 6237, 6238, 6239, 6239, 6240, 6241, 6242, 6243, 6243, 6244, 6245, 6246, 6247,
+ 6248, 6249, 6250, 6251, 6251, 6252, 6253, 6254, 6255, 6255, 6256, 6257, 6258,
+ 6259, 6259, 6260, 6261, 6262, 6263, 6263, 6264, 6265, 6266, 6267, 6267, 6268,
+ 6269, 6270, 6271, 6271, 6272, 6273, 6274, 6275, 6275, 6276, 6277, 6278, 6279,
+ 6280, 6281, 43, 6282, 44, 6219, 340, 763, 764, 765, 782, 791, 1086, 6283,
+ 6284, 6285, 6286, 6287, 6288, 6289, 6290, 6291, 6292, 6293, 6294, 6295, 6296,
+ 6297, 6298, 6299, 6300, 6301, 6302, 512, 762, 763, 6304, 6305, 764, 6307,
+ 6308, 340, 782, 6310, 6311, 791, 6313, 6314, 765, 835, 1086, 6316, 6317,
+ 6318, 6315, 6312, 6309, 6306, 6320, 6319, 6321, 6322, 6323, 6324, 6325, 6326,
+ 314, 5452, 6327, 6328, 6329, 6330, 6331, 6332, 6333, 6334, 6335, 6335, 6336,
+ 6337, 6338, 6303, 6140, 6339, 6339, 6340, 6341, 6342, 6343, 314, 314, 6345,
+ 6346, 6347, 6348, 6348, 6349, 6350, 6351, 6352, 6353, 6354, 6355, 6356, 6357,
+ 6358, 6359, 6360, 6361, 6362, 311, 6364, 6365, 6366, 6367, 6368, 6369, 6370,
+ 6371, 6372, 6373, 6374, 6375, 6376, 6377, 6378, 6379, 6380, 6381, 6382, 6383,
+ 6383, 6384, 6385, 6386, 6387, 6387, 6388, 6389, 6390, 6391, 6391, 6392, 6393,
+ 6394, 6395, 6396, 6397, 6398, 6399, 6400, 6401, 6402, 6403, 6404, 6405, 512,
+ 6407, 6408, 6409, 6410, 6411, 6412, 6413, 6414, 6415, 6416, 6417, 6418, 6419,
+ 6420, 6421, 750, 6422, 6423, 6424, 762, 6426, 6427, 6428, 6429, 6430, 6431,
+ 6432, 6433, 6434, 6435, 6436, 6437, 6438, 6439, 6440, 6441, 6442, 6443, 763,
+ 6445, 6446, 6447, 6448, 6449, 6450, 6451, 6452, 6453, 6454, 6455, 6456, 6457,
+ 6458, 6459, 6460, 6461, 6462, 764, 6464, 6465, 6466, 6467, 6468, 6469, 6470,
+ 6471, 6472, 6473, 6474, 6475, 6476, 6477, 6478, 6479, 6480, 6481, 1086, 6483,
+ 6484, 6485, 6486, 6487, 6488, 6489, 6490, 6491, 6492, 6493, 6494, 6495, 6496,
+ 6497, 6498, 6499, 6500, 340, 6502, 6503, 6504, 6505, 6506, 6507, 6508, 6509,
+ 6510, 6511, 6512, 6513, 6514, 6515, 6516, 6517, 6518, 6519, 782, 6521, 6522,
+ 6523, 6524, 6525, 6526, 6527, 6528, 6529, 6530, 6531, 6532, 6533, 6534, 6535,
+ 6536, 6537, 6538, 6320, 6540, 6541, 6542, 6543, 6544, 6545, 6546, 6547, 6548,
+ 6549, 6550, 6551, 6552, 6553, 765, 6555, 6556, 6557, 6558, 6559, 6560, 6561,
+ 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6570, 6571, 6572, 40, 6573,
+ 48, 6554, 49, 6539, 50, 6520, 3, 6501, 41, 6482, 42, 6463, 43, 6444, 44,
+ 6425, 6574, 6575, 6576, 6577, 6578, 6579, 6580, 6581, 6582, 6583, 6584, 6585,
+ 6586, 6587, 6588, 6589, 6590, 6591, 6592, 6593, 6594, 6595, 6596, 6597, 6598,
+ 6599, 6600, 6601, 6406, 6602, 6603, 6604, 6605, 6606, 6363, 6344, 6607, 6608,
+ 6609, 6610, 6611, 6612, 6613, 6613, 6614, 6615, 6616, 6101, 5203, 6617, 6618,
+ 6619, 6617, 6618, 6619, 6620, 6621, 1564, 6623, 6624, 6625, 6626, 6627, 6628,
+ 6629, 6630, 6631, 6632, 6633, 6634, 6635, 6636, 6637, 6638, 6638, 6639, 6640,
+ 6641, 6642, 6643, 6644, 6645, 6646, 6646, 6647, 6648, 6649, 6650, 6650, 6651,
+ 6652, 3737, 6654, 6655, 6656, 6657, 6658, 6659, 835, 835, 6661, 6662, 6663,
+ 6664, 6664, 6665, 6666, 6667, 6668, 6668, 6669, 6670, 6671, 6660, 6672, 6673,
+ 6672, 6673, 6674, 6675, 835, 6677, 6678, 6679, 6680, 6681, 6682, 6683, 6684,
+ 6685, 6686, 6687, 6688, 6689, 6690, 6691, 6692, 6693, 6694, 835, 835, 6696,
+ 6697, 6698, 6699, 6700, 6701, 6702, 6703, 6704, 6705, 6706, 6707, 6708, 6709,
+ 6710, 6711, 6712, 6713, 6714, 6715, 6716, 6717, 6718, 6719, 6720, 6721, 6722,
+ 6723, 6724, 6725, 6726, 6727, 6728, 6729, 6730, 6731, 6732, 6733, 6734, 6735,
+ 6735, 6736, 6737, 6738, 6695, 6740, 6739, 6740, 6741, 6742, 6743, 6676, 6744,
+ 6745, 6744, 6745, 6746, 6747, 750, 6749, 6750, 6751, 512, 762, 763, 764,
+ 765, 6752, 6753, 6754, 6755, 6756, 6756, 6757, 6758, 6759, 6760, 6760, 6761,
+ 6762, 6763, 6764, 6764, 6765, 6766, 6767, 512, 762, 763, 764, 765, 6768,
+ 6768, 6769, 6770, 3248, 6772, 6773, 951, 951, 6775, 6776, 6777, 6778, 6778,
+ 6779, 6780, 6781, 6782, 6782, 6783, 6784, 6785, 6786, 6786, 6787, 6788, 6789,
+ 6790, 6790, 6791, 6792, 6793, 6774, 6795, 6794, 6796, 6797, 6798, 6799, 6799,
+ 6800, 6801, 388, 388, 6803, 6804, 6805, 6806, 6806, 6807, 6808, 6809, 6810,
+ 6810, 6811, 6812, 6813, 6814, 6814, 6815, 6816, 6817, 6818, 6819, 6820, 6821,
+ 6822, 6823, 6824, 6825, 6826, 6827, 6828, 6829, 6830, 6831, 6832, 6833, 6834,
+ 6835, 6836, 6837, 6838, 6838, 6839, 6840, 6841, 6842, 6842, 6843, 6844, 6845,
+ 6846, 6846, 6847, 6848, 6849, 6850, 6850, 6851, 6852, 6853, 6854, 6854, 6855,
+ 6856, 6857, 6858, 6858, 6859, 6860, 6861, 6862, 6862, 6863, 6864, 6865, 6866,
+ 6866, 6867, 6868, 6869, 6870, 6870, 6871, 6872, 6873, 6874, 6874, 6875, 6876,
+ 6877, 6878, 6878, 6879, 6880, 6881, 6882, 6882, 6883, 6884, 6885, 6886, 6887,
+ 6888, 6889, 6890, 6890, 6891, 6892, 674, 3493, 3493, 6894, 6895, 3984, 6897,
+ 6898, 6899, 6900, 6900, 6901, 6902, 6903, 6904, 6904, 6905, 6906, 6907, 6908,
+ 6908, 6909, 6910, 6911, 6912, 6912, 6913, 6914, 4011, 6916, 6917, 6918, 6919,
+ 6919, 6920, 6921, 6922, 6923, 6923, 6924, 6925, 975, 6105, 6927, 6928, 6929,
+ 6930, 6930, 6931, 6932, 3313, 3313, 6934, 6935, 6936, 6937, 6937, 6938, 6939,
+ 6940, 6941, 6942, 6943, 4044, 4045, 4044, 4045, 4049, 6945, 6946, 6947, 6948,
+ 6949, 6950, 4059, 4060, 4059, 4060, 4064, 6952, 6953, 6954, 6955, 6956, 6957,
+ 6958, 6951, 1008, 6959, 6960, 6961, 6962, 6963, 1008, 6959, 6960, 6964, 6965,
+ 6966, 6967, 6968, 6968, 6969, 6970, 6971, 2, 6944, 6933, 6972, 6973, 6974,
+ 6972, 6973, 6974, 6975, 6976, 6795, 4121, 6978, 6979, 6980, 6981, 6982, 6983,
+ 6984, 6985, 6985, 6986, 6987, 6988, 6989, 6989, 6990, 6991, 6992, 6993, 6993,
+ 6994, 6995, 6996, 6997, 6997, 6998, 6999, 7000, 7001, 7001, 7002, 7003, 7004,
+ 7005, 7005, 7006, 7007, 7008, 6977, 6926, 6915, 6896, 6893, 6802, 6771, 6748,
+ 6653, 6622, 5100, 5093, 5053, 4194, 3069, 3034, 2840, 2823, 7027, 7028, 7029,
+ 7030, 7031, 2830, 7033, 2833, 7035, 7036, 7034, 7038, 7037, 7039, 7040, 2841,
+ 7042, 7043, 7044, 7045, 7046, 2848, 7048, 7049, 7050, 7050, 7051, 7052, 7053,
+ 7054, 7054, 7055, 7056, 7057, 7058, 7058, 7059, 7060, 7061, 7062, 7062, 7063,
+ 7064, 7065, 7066, 7066, 7067, 7068, 7069, 7070, 7070, 7071, 7072, 7073, 7074,
+ 7074, 7075, 7076, 7077, 7078, 7079, 7080, 7081, 7082, 7082, 7083, 7084, 7085,
+ 7086, 7086, 7087, 7088, 7089, 7090, 7090, 7091, 7092, 7093, 7094, 7094, 7095,
+ 7096, 7097, 7098, 7098, 7099, 7100, 7101, 7102, 7102, 7103, 7104, 7105, 7106,
+ 7106, 7107, 7108, 7109, 7110, 7110, 7111, 7112, 7113, 7114, 7115, 7116, 7117,
+ 7118, 7118, 7119, 7120, 7121, 7122, 7122, 7123, 7124, 7125, 7126, 7126, 7127,
+ 7128, 2931, 7130, 2934, 7132, 7133, 7131, 7134, 7135, 7136, 7137, 7138, 7139,
+ 7140, 7141, 7142, 7143, 7144, 7145, 7146, 7147, 7148, 7149, 7150, 7151, 7152,
+ 7153, 7154, 7155, 7156, 7157, 7158, 7159, 7160, 7161, 7162, 7163, 7163, 7164,
+ 7165, 7166, 7167, 7168, 7169, 7170, 7171, 7171, 7172, 7173, 7174, 7175, 7175,
+ 7176, 7177, 2982, 7179, 7180, 7181, 7181, 7182, 7183, 7184, 7185, 7185, 7186,
+ 7187, 7188, 7189, 7189, 7190, 7191, 2997, 7193, 7194, 7195, 7195, 7196, 7197,
+ 3004, 7199, 7200, 7201, 7202, 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210,
+ 7211, 7212, 7213, 7213, 7214, 7215, 7216, 7198, 7218, 7218, 7217, 7217, 7219,
+ 7220, 7221, 7192, 7178, 7129, 7223, 7223, 7222, 7224, 7225, 7222, 7224, 7225,
+ 7226, 7227, 3035, 7229, 7230, 7231, 7231, 7232, 7233, 7234, 7235, 7235, 7236,
+ 7237, 7238, 7239, 7239, 7240, 7241, 7242, 7243, 7243, 7244, 7245, 7246, 7247,
+ 7248, 7249, 7250, 7251, 7252, 7253, 7254, 7255, 7255, 7256, 7257, 7258, 7259,
+ 7259, 7260, 7261, 3070, 7263, 7264, 7265, 7266, 7267, 3077, 7269, 7270, 7271,
+ 7272, 7273, 7274, 7268, 7275, 7276, 7277, 7278, 3089, 7280, 7281, 7282, 7283,
+ 7284, 7285, 7286, 7287, 7288, 7289, 7279, 7290, 7291, 7292, 7293, 7294, 7295,
+ 7296, 7297, 7298, 7299, 7299, 7300, 7301, 7302, 7303, 7303, 7304, 7305, 7306,
+ 7307, 7307, 7308, 7309, 3121, 7311, 7312, 7313, 7313, 7314, 7315, 7316, 7317,
+ 7317, 7318, 7319, 7320, 7321, 7321, 7322, 7323, 7324, 7325, 7325, 7326, 7327,
+ 3140, 7329, 3143, 7331, 3146, 7333, 7334, 7332, 7330, 7335, 7336, 7337, 7335,
+ 7336, 7337, 7338, 7339, 3155, 7341, 7342, 7343, 7290, 7291, 7344, 7345, 3162,
+ 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, 7355, 3173, 7357, 3176, 7359,
+ 3179, 7361, 7362, 7360, 7358, 7363, 7364, 7365, 7366, 7367, 3188, 7369, 7370,
+ 7371, 7372, 7373, 3195, 7375, 7376, 7029, 7377, 7378, 7379, 3202, 7381, 7382,
+ 7383, 7384, 7385, 3209, 7387, 7388, 7389, 7390, 7391, 3216, 7393, 3219, 7395,
+ 3222, 7397, 3225, 7399, 3228, 7401, 7402, 7400, 7398, 7396, 7394, 7403, 7404,
+ 7405, 7406, 7038, 7407, 7408, 7409, 3239, 7411, 3242, 7413, 3245, 7415, 7416,
+ 7414, 7412, 7417, 7418, 7419, 7420, 7421, 7422, 7410, 7392, 7386, 7380, 7374,
+ 7368, 7356, 7346, 7340, 7424, 7425, 7426, 7427, 7428, 7431, 7423, 7429, 7430,
+ 7432, 7433, 7434, 7078, 7078, 7436, 7437, 7438, 7439, 7439, 7440, 7441, 7442,
+ 7443, 7443, 7444, 7445, 7446, 7447, 7447, 7448, 7449, 7450, 7451, 7451, 7452,
+ 7453, 7454, 7455, 7455, 7456, 7457, 7458, 7459, 7459, 7460, 7461, 7462, 7463,
+ 7463, 7464, 7465, 7466, 7467, 7467, 7468, 7469, 7470, 7471, 7471, 7472, 7473,
+ 7474, 7475, 7475, 7476, 7477, 7218, 7218, 7479, 7480, 7481, 7478, 7482, 7482,
+ 7483, 7483, 7484, 7485, 7247, 7487, 7488, 7489, 7490, 7490, 7491, 7492, 7493,
+ 7494, 7494, 7495, 7496, 3329, 7498, 3332, 7500, 7501, 7502, 7502, 7503, 7504,
+ 7505, 7506, 7506, 7507, 7508, 7509, 7510, 7510, 7511, 7512, 7513, 7514, 7514,
+ 7515, 7516, 7517, 7518, 7518, 7519, 7520, 7521, 7522, 7522, 7523, 7524, 7525,
+ 7526, 7526, 7527, 7528, 7529, 7530, 7530, 7531, 7532, 7533, 7534, 7534, 7535,
+ 7536, 7537, 7538, 7538, 7539, 7540, 7541, 7542, 7542, 7543, 7544, 7545, 7546,
+ 7546, 7547, 7548, 3383, 7550, 7551, 7549, 7499, 7552, 7552, 7554, 7554, 7553,
+ 7553, 7555, 7556, 7557, 7558, 7558, 7559, 7560, 7561, 7562, 7562, 7563, 7564,
+ 3400, 7566, 7567, 7568, 7569, 7570, 7571, 7572, 7573, 7574, 7575, 543, 543,
+ 7576, 7577, 7578, 7579, 7580, 7580, 7581, 7582, 3419, 7584, 7585, 7586, 7586,
+ 7587, 7588, 7589, 7590, 7590, 7591, 7592, 7593, 7594, 7594, 7595, 7596, 7597,
+ 7598, 7598, 7599, 7600, 7601, 7602, 7602, 7603, 7604, 7605, 7606, 7606, 7607,
+ 7608, 7609, 7610, 7610, 7611, 7612, 7613, 7614, 7614, 7615, 7616, 7617, 7618,
+ 7618, 7619, 7620, 7621, 7622, 7622, 7623, 7624, 7625, 7626, 7626, 7627, 7628,
+ 7629, 7630, 7630, 7631, 7632, 7633, 7634, 7634, 7635, 7636, 7637, 7638, 7638,
+ 7639, 7640, 3478, 7642, 7643, 7644, 7644, 7645, 7646, 7647, 7648, 7648, 7649,
+ 7650, 7651, 7652, 7652, 7653, 7654, 7655, 7656, 7656, 7657, 7658, 7659, 7660,
+ 7660, 7661, 7662, 7663, 7641, 7664, 7664, 7665, 7665, 7666, 7667, 7047, 7669,
+ 7670, 7671, 7672, 7673, 7673, 7674, 7675, 3514, 7677, 7678, 7679, 7349, 7680,
+ 7681, 7682, 7683, 7684, 7685, 3525, 7687, 7688, 7363, 7364, 7689, 7690, 7691,
+ 7377, 7693, 7694, 3535, 7696, 3538, 7698, 7699, 7697, 7403, 7404, 7405, 7700,
+ 7701, 7702, 7703, 3546, 7705, 7706, 7418, 7707, 7708, 7709, 3553, 7711, 7712,
+ 7713, 7713, 7714, 7715, 7716, 7717, 7717, 7718, 7719, 7720, 7710, 7704, 7695,
+ 7692, 7686, 7426, 7431, 7721, 7721, 7725, 7726, 7722, 7723, 7724, 7727, 7728,
+ 7729, 7676, 7730, 7731, 7730, 7731, 7732, 7733, 3578, 7735, 7736, 7737, 7738,
+ 7739, 7740, 7741, 7742, 7743, 7744, 7745, 7746, 7747, 7748, 7749, 7750, 7751,
+ 7752, 7753, 7754, 7755, 7756, 7757, 7757, 7758, 7759, 7760, 7761, 7761, 7762,
+ 7763, 7764, 7765, 7766, 7767, 3613, 7769, 7770, 7771, 7772, 7773, 7774, 7775,
+ 7776, 7777, 7778, 7779, 7780, 7781, 7782, 7783, 7784, 7785, 7223, 7223, 7787,
+ 7788, 3635, 7790, 7791, 7792, 7792, 7793, 7794, 7795, 7796, 7796, 7797, 7798,
+ 7799, 7800, 7800, 7801, 7802, 7803, 7804, 7804, 7805, 7806, 7807, 7808, 7808,
+ 7809, 7810, 7811, 7812, 7812, 7813, 7814, 3662, 7816, 7817, 7818, 7818, 7819,
+ 7820, 7821, 7822, 7822, 7823, 7824, 7825, 7826, 7826, 7827, 7828, 3677, 7830,
+ 7831, 7832, 7832, 7833, 7834, 7835, 7836, 7836, 7837, 7838, 7839, 7840, 7840,
+ 7841, 7842, 7843, 7844, 7844, 7845, 7846, 7847, 7829, 7815, 7789, 512, 762,
+ 763, 764, 765, 7848, 7849, 7850, 7851, 7848, 7849, 7850, 7851, 7852, 7853,
+ 7854, 7855, 7855, 7856, 7857, 7858, 7859, 7859, 7860, 7861, 7862, 7863, 7863,
+ 7864, 7865, 7866, 7867, 7867, 7868, 7869, 7870, 7786, 7768, 7871, 7871, 7872,
+ 7873, 7874, 7875, 7876, 7877, 7877, 7878, 7879, 7880, 7734, 7881, 7882, 7881,
+ 7882, 7883, 7884, 3734, 7886, 7887, 7888, 7889, 7890, 7891, 7892, 7892, 7893,
+ 7894, 3745, 7896, 7897, 7898, 7899, 7900, 7901, 7902, 7903, 7904, 7905, 7906,
+ 7907, 7908, 7909, 7910, 7911, 7912, 7913, 7914, 7915, 7916, 7917, 7918, 7919,
+ 7920, 7921, 7922, 7923, 7924, 7925, 7926, 7926, 7927, 7928, 7929, 7895, 7930,
+ 7931, 7930, 7931, 7932, 7933, 3785, 7935, 7936, 7937, 7937, 7938, 7939, 7940,
+ 7941, 7941, 7942, 7943, 7944, 7945, 7945, 7946, 7947, 7948, 7949, 7949, 7950,
+ 7951, 7952, 7953, 7953, 7954, 7955, 7956, 7957, 7958, 7959, 7960, 7961, 7962,
+ 7963, 3816, 7965, 7966, 7967, 7967, 7968, 7969, 7970, 7971, 7971, 7972, 7973,
+ 7974, 7975, 7975, 7976, 7977, 7978, 7979, 7979, 7980, 7981, 7982, 7983, 7983,
+ 7984, 7985, 7986, 7987, 7987, 7988, 7989, 7990, 7991, 7991, 7992, 7993, 7994,
+ 7995, 7995, 7996, 7997, 7998, 7999, 7999, 8000, 8001, 8002, 8003, 8003, 8004,
+ 8005, 8006, 8007, 8007, 8008, 8009, 8010, 8011, 8012, 8013, 3867, 8015, 8016,
+ 8017, 8017, 8018, 8019, 8020, 8021, 8021, 8022, 8023, 8024, 8025, 8025, 8026,
+ 8027, 8028, 8029, 8029, 8030, 8031, 8032, 8033, 8033, 8034, 8035, 8036, 8037,
+ 8037, 8038, 8039, 8040, 8041, 8041, 8042, 8043, 8044, 8045, 8045, 8046, 8047,
+ 8048, 8049, 8049, 8050, 8051, 8052, 8053, 8053, 8054, 8055, 8056, 8057, 8058,
+ 8059, 7032, 8061, 8062, 8063, 8064, 8065, 8065, 8066, 8067, 8068, 8069, 8069,
+ 8070, 8071, 8072, 8073, 8073, 8074, 8075, 8076, 8077, 8077, 8078, 8079, 8080,
+ 8081, 8081, 8082, 8083, 8084, 8085, 8085, 8086, 8087, 8088, 8089, 8089, 8090,
+ 8091, 8092, 8060, 8014, 8093, 8093, 8094, 8095, 8096, 8097, 3952, 8099, 8100,
+ 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8108, 8098, 7964, 8109, 8109, 8110,
+ 8111, 8112, 8113, 8114, 8115, 8115, 8116, 8117, 3973, 8119, 8120, 8121, 8121,
+ 8122, 8123, 8124, 8125, 8125, 8126, 8127, 8128, 8129, 8129, 8130, 8131, 8132,
+ 8133, 8133, 8134, 8135, 8136, 8137, 8137, 8138, 8139, 8140, 8141, 8141, 8142,
+ 8143, 4000, 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154, 8155,
+ 8155, 8156, 8157, 8158, 8159, 8159, 8160, 8161, 4019, 8163, 8164, 8165, 8165,
+ 8166, 8167, 8168, 8169, 8169, 8170, 8171, 8172, 8173, 8173, 8174, 8175, 8176,
+ 8177, 8177, 8178, 8179, 4038, 8181, 4041, 8183, 8184, 8182, 8185, 8185, 8186,
+ 8186, 8187, 8188, 8189, 8190, 8191, 8192, 4053, 8194, 4056, 8196, 8197, 8195,
+ 8198, 8198, 8199, 8199, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8193, 1008,
+ 8207, 8208, 8209, 8210, 8211, 8212, 8212, 8213, 8214, 8215, 8180, 8216, 8217,
+ 8216, 8217, 8218, 8219, 4082, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228,
+ 8229, 4093, 8231, 8232, 8233, 8233, 8234, 8235, 8236, 8237, 8237, 8238, 8239,
+ 8240, 8241, 8241, 8242, 8243, 8244, 8245, 8245, 8246, 8247, 8248, 8249, 8249,
+ 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8230, 8258, 8257, 8259, 8260, 8261,
+ 8262, 8262, 8263, 8264, 8265, 8266, 8266, 8267, 8268, 8269, 8270, 8270, 8271,
+ 8272, 8273, 8274, 8274, 8275, 8276, 8277, 8278, 8278, 8279, 8280, 8281, 8282,
+ 8282, 8283, 8284, 8285, 8220, 8162, 8144, 8118, 7934, 7885, 7668, 7583, 7565,
+ 7497, 7486, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296,
+ 8297, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297,
+ 8298, 8299, 4164, 8301, 8302, 8303, 8303, 8304, 8305, 8306, 8307, 8307, 8308,
+ 8309, 8310, 8311, 8311, 8312, 8313, 8314, 8315, 8315, 8316, 8317, 8318, 8319,
+ 8319, 8320, 8321, 8322, 8300, 7435, 7328, 7310, 8323, 8324, 8325, 8326, 8327,
+ 8323, 8324, 8325, 8326, 8327, 8328, 8329, 4195, 8331, 8332, 8333, 8333, 8334,
+ 8335, 4202, 8337, 4205, 8339, 4208, 8341, 4211, 8343, 4214, 8345, 4217, 8347,
+ 4220, 8349, 4223, 8351, 4226, 8353, 4229, 8355, 8356, 8357, 8357, 8358, 8359,
+ 8360, 8361, 8361, 8362, 8363, 8364, 8365, 8365, 8366, 8367, 4244, 8369, 4247,
+ 8371, 4250, 8373, 4253, 8375, 4256, 8377, 8378, 8376, 8374, 8372, 8370, 8368,
+ 8354, 8352, 8350, 8348, 8346, 8344, 8342, 8340, 8338, 8336, 8379, 8380, 8381,
+ 8382, 8383, 8384, 8385, 8386, 8387, 8388, 8389, 8390, 8391, 8392, 8393, 8394,
+ 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8386, 8387, 8388, 8389, 8390, 8391,
+ 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400, 4282, 8402, 8403, 8404,
+ 8404, 8405, 8406, 8407, 8408, 8408, 8409, 8410, 8411, 8412, 8412, 8413, 8414,
+ 8415, 8416, 8416, 8417, 8418, 8419, 8420, 8420, 8421, 8422, 8423, 8401, 8424,
+ 8425, 8424, 8425, 8426, 8427, 4310, 8429, 8430, 8431, 8431, 8432, 8433, 8434,
+ 8435, 8435, 8436, 8437, 8438, 8439, 8439, 8440, 8441, 8442, 8443, 8444, 8445,
+ 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8453, 8454, 8455, 8456, 8457, 8458,
+ 8459, 8460, 8461, 4345, 8463, 8464, 8465, 8465, 8466, 8467, 8468, 8469, 8469,
+ 8470, 8471, 8472, 8473, 8473, 8474, 8475, 8476, 8477, 8478, 8479, 8480, 8481,
+ 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490, 8491, 8492, 8493, 8494,
+ 8495, 8496, 8462, 8497, 8497, 8498, 8498, 8499, 8500, 4385, 8502, 8503, 8504,
+ 8504, 8505, 8506, 8507, 8508, 8508, 8509, 8510, 8511, 8512, 8512, 8513, 8514,
+ 8515, 8516, 8517, 8518, 8519, 8520, 8521, 8522, 8523, 8524, 8525, 8526, 8527,
+ 8528, 8529, 8530, 8531, 8532, 8533, 8534, 8535, 8536, 8536, 8537, 8538, 4424,
+ 8540, 8541, 8542, 8542, 8543, 8544, 8545, 8546, 8546, 8547, 8548, 8549, 8550,
+ 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8560, 8561, 8562,
+ 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4459, 8574, 8575,
+ 8576, 8576, 8577, 8578, 8579, 8580, 8580, 8581, 8582, 8583, 8584, 8584, 8585,
+ 8586, 8587, 8588, 8589, 8590, 8591, 8592, 8593, 8594, 8595, 8596, 8597, 8598,
+ 8599, 8600, 8601, 8602, 8603, 8604, 8605, 8606, 8607, 8573, 8609, 8609, 8608,
+ 8608, 8610, 8611, 4499, 8613, 8614, 8615, 8615, 8616, 8617, 8618, 8619, 8619,
+ 8620, 8621, 8622, 8623, 8623, 8624, 8625, 8626, 8627, 8628, 8629, 8630, 8631,
+ 8632, 8633, 8634, 8635, 8636, 8637, 8638, 8639, 8640, 8641, 8642, 8643, 8644,
+ 8645, 8646, 8647, 8647, 8648, 8649, 4538, 8651, 8652, 8653, 8653, 8654, 8655,
+ 8656, 8657, 8657, 8658, 8659, 8660, 8661, 8661, 8662, 8663, 8664, 8665, 8666,
+ 8667, 8668, 8669, 8670, 8671, 8672, 8673, 8674, 8675, 8676, 8677, 8678, 8679,
+ 8680, 8681, 8682, 8683, 8684, 8685, 8685, 8686, 8687, 8688, 8689, 8689, 8690,
+ 8691, 8692, 8693, 8693, 8694, 8695, 8696, 8697, 8697, 8698, 8699, 8700, 8701,
+ 8701, 8702, 8703, 8704, 8705, 8705, 8706, 8707, 8708, 8709, 8709, 8710, 8711,
+ 8712, 8713, 8713, 8714, 8715, 8716, 8717, 8717, 8718, 8719, 8720, 8721, 8721,
+ 8722, 8723, 8724, 8725, 8725, 8726, 8727, 4617, 8729, 8730, 8731, 8731, 8732,
+ 8733, 8734, 8735, 8735, 8736, 8737, 8738, 8739, 8739, 8740, 8741, 8742, 8743,
+ 8744, 8745, 8746, 8747, 8748, 8749, 8750, 8751, 8752, 8753, 8754, 8755, 8756,
+ 8757, 8758, 8759, 8760, 8761, 4652, 8763, 8764, 8765, 8765, 8766, 8767, 8768,
+ 8769, 8769, 8770, 8771, 8772, 8773, 8773, 8774, 8775, 8776, 8777, 8778, 8779,
+ 8780, 8781, 8782, 8783, 8784, 8785, 8786, 8787, 8788, 8789, 8790, 8791, 8792,
+ 8793, 8794, 8795, 8796, 8762, 8728, 8797, 8798, 8799, 8797, 8798, 8799, 8800,
+ 8801, 4693, 8803, 8804, 8805, 8805, 8806, 8807, 8808, 8809, 8809, 8810, 8811,
+ 8812, 8813, 8813, 8814, 8815, 8816, 8817, 8818, 8819, 8820, 8821, 8821, 8822,
+ 8823, 4716, 8825, 8826, 8827, 8827, 8828, 8829, 8830, 8831, 8831, 8832, 8833,
+ 8834, 8835, 8835, 8836, 8837, 8838, 8839, 8840, 8841, 8842, 8843, 8844, 8845,
+ 8846, 8847, 8848, 8849, 8850, 8851, 8851, 8852, 8853, 8854, 8855, 8855, 8856,
+ 8857, 8858, 8859, 8859, 8860, 8861, 8862, 8863, 8863, 8864, 8865, 8497, 8497,
+ 8867, 8868, 8609, 8609, 8870, 8871, 4765, 8873, 8874, 8875, 8875, 8876, 8877,
+ 8878, 8879, 8879, 8880, 8881, 8882, 8883, 8883, 8884, 8885, 8886, 8887, 8888,
+ 8889, 8890, 8891, 8892, 8893, 8894, 8895, 8896, 8897, 8898, 8899, 8900, 8901,
+ 8902, 8903, 8903, 8904, 8905, 8906, 8872, 8869, 8866, 8824, 8802, 8650, 8612,
+ 8539, 8501, 8428, 8907, 8908, 8909, 8910, 8911, 8912, 8913, 8914, 8915, 8916,
+ 8917, 8907, 8908, 8909, 8910, 8911, 8912, 8913, 8914, 8915, 8916, 8917, 8918,
+ 8919, 8920, 8921, 8922, 8923, 92, 8924, 8925, 8925, 8926, 8927, 8928, 8929,
+ 8929, 8930, 8931, 8932, 8933, 8933, 8934, 8935, 8936, 8937, 8937, 8938, 8939,
+ 4834, 8941, 8942, 8943, 8944, 8945, 8946, 8947, 8948, 8949, 8950, 8951, 8952,
+ 8953, 8954, 8955, 8955, 8956, 8957, 8958, 8959, 8959, 8960, 8961, 4857, 8963,
+ 8964, 8965, 8966, 8967, 8968, 8969, 8970, 8971, 8972, 8973, 8974, 8975, 8976,
+ 8977, 8977, 8978, 8979, 8980, 8981, 8981, 8982, 8983, 4880, 8985, 4883, 8987,
+ 4886, 8989, 8990, 8991, 8991, 8992, 8993, 8994, 8988, 8986, 8995, 7554, 8996,
+ 8997, 8995, 7554, 8996, 8997, 8998, 8999, 9000, 7552, 7552, 9001, 9002, 9003,
+ 9004, 9005, 9005, 9006, 9007, 7530, 9009, 9010, 9011, 9012, 9012, 9013, 9014,
+ 9015, 9016, 9016, 9017, 9018, 9019, 9020, 9020, 9021, 9022, 9023, 9024, 9025,
+ 9026, 9027, 9028, 9028, 9029, 9030, 9031, 9032, 9032, 9033, 9034, 9035, 9036,
+ 9036, 9037, 9038, 9039, 9040, 9040, 9041, 9042, 9043, 9044, 9044, 9045, 9046,
+ 9047, 9048, 9048, 9049, 9050, 9051, 9052, 9053, 9054, 9055, 9056, 9056, 9057,
+ 9058, 9059, 9060, 9060, 9061, 9062, 9063, 9064, 9064, 9065, 9066, 9067, 9068,
+ 9068, 9069, 9070, 9071, 9072, 9072, 9073, 9074, 9075, 9076, 9076, 9077, 9078,
+ 9079, 9080, 9081, 9082, 9083, 9084, 9084, 9085, 9086, 9087, 9088, 9088, 9089,
+ 9090, 9091, 9092, 9092, 9093, 9094, 9095, 9096, 9096, 9097, 9098, 9099, 9100,
+ 9101, 9102, 9103, 9104, 9104, 9105, 9106, 9107, 9108, 9108, 9109, 9110, 9111,
+ 9112, 9112, 9113, 9114, 9115, 9116, 9116, 9117, 9118, 9119, 9120, 9121, 9122,
+ 9123, 9124, 9124, 9125, 9126, 9127, 9128, 9128, 9129, 9130, 9131, 9132, 9132,
+ 9133, 9134, 9135, 9136, 9136, 9137, 9138, 9139, 9140, 9140, 9141, 9142, 9143,
+ 9144, 9144, 9145, 9146, 9147, 9008, 8984, 8962, 8940, 9148, 9149, 9150, 9151,
+ 9152, 9148, 9149, 9150, 9151, 9152, 9153, 9154, 7741, 9156, 9157, 9158, 9159,
+ 9160, 9161, 9162, 9163, 9164, 9165, 9166, 9167, 9168, 9169, 9170, 9171, 9172,
+ 9173, 9174, 543, 543, 9175, 7576, 9176, 9177, 49, 8964, 9179, 9179, 9180,
+ 9181, 9182, 9183, 9183, 9184, 9185, 9186, 9187, 9187, 9188, 9189, 9190, 9178,
+ 9191, 9192, 9191, 9192, 9193, 9194, 7664, 9196, 9197, 9198, 9199, 7844, 9199,
+ 7844, 9200, 9201, 5101, 9203, 5104, 9205, 9206, 9204, 749, 1008, 9207, 9208,
+ 9209, 9210, 5112, 9212, 48, 9213, 49, 9211, 594, 765, 951, 1564, 9214, 9215,
+ 9216, 9217, 5120, 9219, 5123, 9221, 5126, 9223, 5129, 9225, 5132, 9227, 5135,
+ 9229, 5138, 9231, 5141, 9233, 5144, 9235, 9236, 9234, 9232, 9230, 9228, 9226,
+ 9224, 9222, 9220, 9237, 9238, 9239, 9240, 9241, 9242, 9243, 9244, 9245, 9246,
+ 9247, 5159, 9249, 9250, 9251, 9252, 9253, 5166, 9255, 9256, 9257, 9258, 9259,
+ 9260, 9254, 9248, 9261, 9262, 9263, 9264, 9265, 5179, 9267, 5182, 9269, 43,
+ 9270, 2, 9268, 9266, 9218, 340, 512, 763, 764, 1086, 9271, 9272, 9273, 9274,
+ 9275, 9276, 9277, 9278, 9279, 9280, 9281, 9282, 9282, 9283, 9284, 9285, 9286,
+ 9286, 9287, 9288, 5204, 9290, 5207, 9292, 5210, 9294, 5213, 9296, 5216, 9298,
+ 5219, 9300, 5222, 9302, 9303, 9301, 9299, 9297, 9295, 9293, 9291, 9304, 9305,
+ 9306, 9307, 9308, 9309, 9310, 9311, 9312, 5235, 9314, 5238, 9316, 5241, 9318,
+ 5244, 9320, 5247, 9322, 9323, 9321, 9319, 9317, 9315, 7282, 9324, 9325, 9326,
+ 9327, 9328, 9329, 9330, 5258, 9332, 5261, 9334, 5264, 9336, 5267, 9338, 9339,
+ 268, 1738, 9340, 9341, 9342, 5274, 9344, 9345, 9343, 9337, 9335, 9333, 9346,
+ 9347, 9348, 9349, 9350, 9351, 9352, 5285, 9354, 9355, 9356, 9357, 9358, 5292,
+ 9360, 9361, 9362, 9363, 9364, 5299, 9366, 5302, 9368, 5305, 9370, 5308, 9372,
+ 9373, 9371, 9369, 9367, 9365, 9359, 9374, 9375, 9376, 9377, 9378, 9379, 9380,
+ 9381, 5320, 9383, 9384, 9385, 9386, 9387, 9388, 9389, 9390, 9391, 9392, 9382,
+ 9353, 9331, 9313, 9393, 9394, 9395, 9396, 9397, 9398, 9399, 5339, 9401, 9402,
+ 9403, 9404, 9405, 9406, 1810, 9407, 9408, 9409, 5350, 9411, 9412, 9413, 9414,
+ 9415, 9416, 474, 475, 476, 9417, 9418, 9419, 9420, 9410, 7363, 7689, 9421,
+ 9422, 9423, 9424, 5366, 9426, 5369, 9428, 9429, 9430, 9431, 9432, 9433, 9434,
+ 9435, 9436, 9437, 9427, 457, 7371, 9438, 9439, 9440, 9441, 5385, 9443, 9444,
+ 229, 9445, 9446, 9447, 5392, 9449, 5395, 9451, 5398, 9453, 5401, 9455, 9456,
+ 9454, 9452, 9450, 9457, 9458, 9459, 9460, 9461, 9462, 9463, 9448, 7377, 9464,
+ 9465, 9466, 9467, 5416, 9469, 5419, 9471, 5422, 9473, 9474, 9472, 9470, 502,
+ 9475, 9476, 9477, 9478, 9479, 5431, 9481, 9482, 9483, 9484, 9485, 5438, 9487,
+ 5441, 9489, 9490, 9488, 9491, 9492, 9493, 9494, 5449, 9496, 9497, 9498, 9499,
+ 9500, 5456, 9502, 9503, 9504, 9505, 9506, 9507, 9508, 9509, 9510, 9511, 9501,
+ 9495, 9486, 9480, 9512, 9513, 9514, 9515, 9516, 9517, 9518, 5475, 9520, 9521,
+ 9522, 9523, 9524, 9525, 9526, 9527, 9528, 5486, 9530, 5489, 9532, 5492, 9534,
+ 5495, 9536, 9537, 9535, 9533, 9531, 9538, 9539, 9540, 9541, 9542, 9543, 9544,
+ 9545, 9546, 9547, 9548, 9529, 9549, 9550, 9551, 9552, 5514, 9554, 5517, 9556,
+ 9557, 9555, 7389, 9558, 9559, 9560, 9561, 5525, 9563, 5528, 9565, 5531, 9567,
+ 5534, 9569, 12, 9570, 245, 247, 248, 249, 250, 251, 448, 515, 9571, 9572,
+ 9573, 5541, 9575, 5544, 9577, 9578, 9576, 9574, 9568, 9566, 9564, 7404, 9579,
+ 9580, 9581, 9582, 9583, 9584, 9585, 9586, 5556, 9588, 5559, 9590, 5562, 9592,
+ 9593, 72, 9591, 73, 9589, 263, 9594, 9595, 9596, 9597, 9598, 5571, 9600,
+ 5574, 9602, 5577, 9604, 5580, 9606, 9607, 195, 951, 2024, 2026, 2027, 2028,
+ 9608, 9609, 9610, 5587, 9612, 5590, 9614, 5593, 9616, 9617, 9615, 9613, 9611,
+ 9605, 9603, 9601, 9599, 9618, 9619, 9620, 9621, 9622, 9623, 9624, 9625, 9626,
+ 9627, 9628, 9587, 9562, 9553, 9519, 9468, 9442, 9425, 9400, 1611, 7721, 7721,
+ 9629, 9630, 9631, 9632, 9633, 9634, 9635, 9636, 9637, 9638, 9639, 7418, 7419,
+ 9641, 9642, 2075, 9644, 2076, 9646, 9647, 9645, 9648, 9649, 9650, 9651, 2080,
+ 9653, 2081, 9655, 2082, 9657, 2083, 9659, 9660, 9658, 9656, 9654, 9661, 9662,
+ 9663, 9664, 9665, 9666, 2089, 9668, 2090, 9670, 9671, 9669, 9672, 9673, 9674,
+ 9675, 2094, 9677, 2095, 9679, 9680, 9678, 9681, 9682, 9683, 9684, 2099, 9686,
+ 9687, 9688, 9689, 9690, 2102, 9692, 2103, 9694, 2104, 9696, 9697, 9695, 9693,
+ 9698, 9699, 9700, 9701, 9702, 2109, 9704, 2110, 9706, 2111, 9708, 2112, 9710,
+ 2113, 9712, 2114, 9714, 2115, 9716, 9717, 9715, 9713, 9711, 9709, 9707, 9705,
+ 9718, 9719, 9720, 9721, 9722, 9723, 9724, 9725, 9726, 2124, 9728, 2125, 9730,
+ 2126, 9732, 2127, 9734, 2128, 9736, 2129, 9738, 2130, 9740, 2131, 9742, 9743,
+ 9741, 9739, 9737, 9735, 9733, 9731, 9729, 9744, 9745, 9746, 9747, 9748, 9749,
+ 9750, 9751, 9752, 9753, 9754, 9727, 9703, 9691, 9685, 9676, 9667, 9652, 9755,
+ 9756, 9757, 9758, 9759, 9760, 9761, 9762, 9763, 9764, 2150, 9766, 2151, 9768,
+ 2152, 9770, 2153, 9772, 2154, 9774, 2155, 9776, 2156, 9778, 9779, 9777, 9775,
+ 9773, 9771, 9769, 9767, 9780, 9781, 9782, 9783, 9784, 9785, 9786, 9787, 9788,
+ 2165, 9790, 2166, 9792, 2167, 9794, 2168, 9796, 2169, 9798, 2170, 9800, 9801,
+ 9799, 9797, 9795, 9793, 9791, 9802, 9803, 9804, 9805, 9806, 9807, 9808, 9809,
+ 2178, 9811, 2179, 9813, 2180, 9815, 2181, 9817, 2182, 9819, 9820, 9818, 9816,
+ 9814, 9812, 9821, 9822, 9823, 9824, 9825, 9826, 9827, 2189, 9829, 2190, 9831,
+ 2191, 9833, 2192, 9835, 9836, 9834, 9832, 9830, 9837, 9838, 9839, 9840, 9841,
+ 9842, 9843, 9828, 9810, 9789, 9844, 9845, 9846, 9847, 9848, 9849, 2203, 9851,
+ 9852, 9853, 9854, 9855, 2206, 9857, 2207, 9859, 2208, 9861, 2209, 9863, 9864,
+ 9862, 9860, 9858, 9865, 9866, 9867, 9868, 9869, 9870, 9871, 9856, 9872, 9873,
+ 9874, 9875, 2218, 9877, 2219, 9879, 2220, 9881, 9882, 9880, 9878, 9883, 9884,
+ 9885, 9886, 9887, 2225, 9889, 9890, 9891, 9892, 9893, 2228, 9895, 2229, 9897,
+ 9898, 9896, 9899, 9900, 9901, 9902, 2233, 9904, 9905, 9906, 9907, 9908, 9909,
+ 9903, 9894, 9888, 9910, 9911, 9912, 9913, 9914, 9915, 2241, 9917, 9918, 9919,
+ 9920, 9921, 9922, 9923, 9924, 9925, 2246, 9927, 2247, 9929, 2248, 9931, 9932,
+ 9930, 9928, 9933, 9934, 9935, 9936, 9937, 2253, 9939, 9940, 9941, 9942, 9943,
+ 9944, 9938, 9945, 9946, 9947, 9948, 9949, 9926, 9916, 9876, 9850, 9765, 9950,
+ 9951, 9952, 9953, 9954, 9955, 9956, 9957, 2266, 9959, 9960, 9961, 9962, 9963,
+ 9964, 9965, 9966, 9967, 2271, 9969, 9970, 9971, 9972, 9973, 2274, 9975, 9976,
+ 9977, 9978, 9979, 9980, 9974, 9981, 9982, 9983, 9984, 2280, 9986, 9987, 9988,
+ 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9985, 9968, 9996, 9997, 9998, 9999,
+ 10000, 2289, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009, 10010,
+ 2294, 10012, 10013, 10014, 10015, 10016, 10017, 10018, 10019, 10020, 10021,
+ 10011, 10022, 10023, 10024, 10025, 2302, 10027, 10028, 10029, 10030, 10031,
+ 10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 2309, 10041, 10042,
+ 10043, 10044, 10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053,
+ 2316, 10055, 10056, 10057, 10058, 10059, 10060, 10061, 10062, 10063, 2321,
+ 10065, 2322, 10067, 2323, 10069, 2324, 10071, 10072, 10070, 10068, 10066,
+ 10073, 10074, 10075, 10076, 10077, 10078, 10079, 10080, 10081, 10082, 10083,
+ 10064, 10084, 10085, 10086, 10087, 10088, 10054, 10040, 10026, 10001, 9958,
+ 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10098,
+ 10099, 10100, 10101, 10102, 10102, 10103, 10104, 10105, 10106, 10106, 10107,
+ 10108, 10109, 10110, 10110, 10111, 10112, 10113, 9643, 9640, 10114, 10114,
+ 10115, 7424, 7425, 7426, 7427, 7428, 7725, 7726, 7431, 10116, 10117, 10118,
+ 10119, 10120, 10120, 10121, 10122, 6102, 10124, 10125, 10126, 10127, 10128,
+ 10129, 10130, 10130, 10131, 10132, 10133, 10134, 10134, 10135, 10136, 10137,
+ 10138, 10138, 10139, 10140, 10141, 10142, 10143, 10144, 10145, 10146, 10147,
+ 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158,
+ 10159, 10160, 6141, 10162, 10163, 10164, 10165, 10166, 10167, 10168, 10168,
+ 10169, 10170, 10171, 10172, 10172, 10173, 10174, 10175, 10176, 10176, 10177,
+ 10178, 10179, 10180, 10180, 10181, 10182, 10183, 10184, 10184, 10185, 10186,
+ 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197,
+ 10198, 10199, 10200, 10201, 10202, 10203, 10204, 10205, 10206, 10207, 10208,
+ 10208, 10209, 10210, 10211, 10212, 10212, 10213, 10214, 10215, 10216, 10216,
+ 10217, 10218, 10219, 10220, 10220, 10221, 10222, 10223, 10224, 10224, 10225,
+ 10226, 10227, 10228, 10228, 10229, 10230, 10231, 10232, 10232, 10233, 10234,
+ 10235, 749, 750, 10236, 10237, 10238, 6220, 10240, 10241, 10242, 10243, 10244,
+ 10245, 10246, 10246, 10247, 10248, 10249, 10250, 10250, 10251, 10252, 10253,
+ 10254, 10254, 10255, 10256, 10257, 10258, 10258, 10259, 10260, 10261, 10262,
+ 10262, 10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10270, 10271,
+ 10272, 10273, 10274, 10274, 10275, 10276, 10277, 10278, 10278, 10279, 10280,
+ 10281, 10282, 10282, 10283, 10284, 10285, 10286, 10286, 10287, 10288, 10289,
+ 10290, 10290, 10291, 10292, 10293, 10294, 10294, 10295, 10296, 10297, 10298,
+ 10299, 10300, 43, 10301, 44, 10239, 340, 763, 764, 765, 782, 791, 1086, 10302,
+ 10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313,
+ 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 6304, 10323, 6307,
+ 10325, 6310, 10327, 6313, 10329, 6316, 10331, 10332, 10330, 10328, 10326,
+ 10324, 10334, 10333, 10335, 10336, 10337, 10338, 10339, 10340, 314, 9498,
+ 10341, 10342, 10343, 10344, 10345, 10346, 10347, 10348, 10349, 10349, 10350,
+ 10351, 10352, 10322, 10161, 10353, 10353, 10354, 10355, 10356, 10357, 6345,
+ 10359, 10360, 10361, 10361, 10362, 10363, 10364, 10365, 10366, 10367, 10368,
+ 10369, 10370, 10371, 10372, 10373, 10374, 10375, 6364, 10377, 10378, 10379,
+ 10380, 10381, 10382, 10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390,
+ 10391, 10392, 10393, 10394, 10395, 10395, 10396, 10397, 10398, 10399, 10399,
+ 10400, 10401, 10402, 10403, 10403, 10404, 10405, 10406, 10407, 10408, 10409,
+ 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 6407, 10419, 10420,
+ 10421, 10422, 10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431,
+ 10432, 750, 10433, 10434, 10435, 6426, 10437, 10438, 10439, 10440, 10441,
+ 10442, 10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452,
+ 10453, 6445, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462, 10463,
+ 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 6464, 10473, 10474,
+ 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482, 10483, 10484, 10485,
+ 10486, 10487, 10488, 10489, 6483, 10491, 10492, 10493, 10494, 10495, 10496,
+ 10497, 10498, 10499, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 10507,
+ 6502, 10509, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10517, 10518,
+ 10519, 10520, 10521, 10522, 10523, 10524, 10525, 6521, 10527, 10528, 10529,
+ 10530, 10531, 10532, 10533, 10534, 10535, 10536, 10537, 10538, 10539, 10540,
+ 10541, 10542, 10543, 10334, 10545, 10546, 10547, 10548, 10549, 10550, 10551,
+ 10552, 10553, 10554, 10555, 10556, 10557, 10558, 6555, 10560, 10561, 10562,
+ 10563, 10564, 10565, 10566, 10567, 10568, 10569, 10570, 10571, 10572, 10573,
+ 10574, 10575, 10576, 40, 10577, 48, 10559, 49, 10544, 50, 10526, 3, 10508,
+ 41, 10490, 42, 10472, 43, 10454, 44, 10436, 10578, 10579, 10580, 10581, 10582,
+ 10583, 10584, 10585, 10586, 10587, 10588, 10589, 10590, 10591, 10592, 10593,
+ 10594, 10595, 10596, 10597, 10598, 10599, 10600, 10601, 10602, 10603, 10604,
+ 10605, 10418, 10606, 10607, 10608, 10609, 10610, 10376, 10358, 10611, 10612,
+ 10613, 10614, 10615, 10616, 10617, 10617, 10618, 10619, 10620, 10123, 9289,
+ 10621, 10622, 10623, 10621, 10622, 10623, 10624, 10625, 6623, 10627, 10628,
+ 10629, 10630, 10631, 10632, 10633, 10634, 10635, 10636, 10637, 10638, 10639,
+ 10640, 10641, 10641, 10642, 10643, 10644, 10645, 10646, 10647, 10648, 10649,
+ 10649, 10650, 10651, 10652, 10653, 10653, 10654, 10655, 7888, 10657, 10658,
+ 10659, 10660, 10661, 10662, 6661, 10664, 10665, 10666, 10666, 10667, 10668,
+ 10669, 10670, 10670, 10671, 10672, 10673, 10663, 10674, 10675, 10674, 10675,
+ 10676, 10677, 6677, 10679, 10680, 10681, 10682, 10683, 10684, 10685, 10686,
+ 10687, 10688, 10689, 10690, 10691, 10692, 10693, 10694, 10695, 6696, 10697,
+ 10698, 10699, 10700, 10701, 10702, 10703, 10704, 10705, 10706, 10707, 10708,
+ 10709, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10717, 10718, 10719,
+ 10720, 10721, 10722, 10723, 10724, 10725, 10726, 10727, 10728, 10729, 10730,
+ 10731, 10732, 10733, 10734, 10735, 10735, 10736, 10737, 10738, 10696, 10740,
+ 10739, 10740, 10741, 10742, 10743, 10678, 10744, 10745, 10744, 10745, 10746,
+ 10747, 6749, 10749, 10750, 512, 762, 763, 764, 765, 10751, 10752, 10753,
+ 10754, 10755, 10755, 10756, 10757, 10758, 10759, 10759, 10760, 10761, 10762,
+ 10763, 10763, 10764, 10765, 10766, 512, 762, 763, 764, 765, 10767, 10767,
+ 10768, 10769, 7417, 10771, 10772, 6775, 10774, 10775, 10776, 10776, 10777,
+ 10778, 10779, 10780, 10780, 10781, 10782, 10783, 10784, 10784, 10785, 10786,
+ 10787, 10788, 10788, 10789, 10790, 10791, 10773, 10793, 10792, 10794, 10795,
+ 10796, 10797, 10797, 10798, 10799, 6803, 10801, 10802, 10803, 10803, 10804,
+ 10805, 10806, 10807, 10807, 10808, 10809, 10810, 10811, 10811, 10812, 10813,
+ 10814, 10815, 10816, 10817, 10818, 10819, 10820, 10821, 10822, 10823, 10824,
+ 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10834, 10835,
+ 10835, 10836, 10837, 10838, 10839, 10839, 10840, 10841, 10842, 10843, 10843,
+ 10844, 10845, 10846, 10847, 10847, 10848, 10849, 10850, 10851, 10851, 10852,
+ 10853, 10854, 10855, 10855, 10856, 10857, 10858, 10859, 10859, 10860, 10861,
+ 10862, 10863, 10863, 10864, 10865, 10866, 10867, 10867, 10868, 10869, 10870,
+ 10871, 10871, 10872, 10873, 10874, 10875, 10875, 10876, 10877, 10878, 10879,
+ 10879, 10880, 10881, 10882, 10883, 10884, 10885, 10886, 10887, 10887, 10888,
+ 10889, 674, 7656, 7656, 10891, 10892, 8129, 10894, 10895, 10896, 10897, 10897,
+ 10898, 10899, 10900, 10901, 10901, 10902, 10903, 10904, 10905, 10905, 10906,
+ 10907, 10908, 10909, 10909, 10910, 10911, 8155, 10913, 10914, 10915, 10916,
+ 10916, 10917, 10918, 10919, 10920, 10920, 10921, 10922, 975, 10126, 10924,
+ 10925, 10926, 10927, 10927, 10928, 10929, 7482, 7482, 10931, 10932, 10933,
+ 10934, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 8185, 8186, 8185,
+ 8186, 8190, 10942, 10943, 10944, 10945, 10946, 10947, 8198, 8199, 8198, 8199,
+ 8203, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 10948, 1008, 10956,
+ 10957, 10958, 10959, 10960, 1008, 10956, 10957, 10961, 10962, 10963, 10964,
+ 10965, 10965, 10966, 10967, 10968, 2, 10941, 10930, 10969, 10970, 10971,
+ 10969, 10970, 10971, 10972, 10973, 10793, 8258, 10975, 10976, 10977, 10978,
+ 10979, 10980, 10981, 10982, 10982, 10983, 10984, 10985, 10986, 10986, 10987,
+ 10988, 10989, 10990, 10990, 10991, 10992, 10993, 10994, 10994, 10995, 10996,
+ 10997, 10998, 10998, 10999, 11000, 11001, 11002, 11002, 11003, 11004, 11005,
+ 10974, 10923, 10912, 10893, 10890, 10800, 10770, 10748, 10656, 10626, 9202,
+ 9195, 9155, 8330, 7262, 7228, 7041, 10641, 11006, 11007, 11008, 11009, 11010,
+ 11011, 11012, 11013, 11014, 11015, 11016, 11017, 11018, 11019, 11020, 11021,
+ 11022, 10641, 11006, 11007, 11008, 11009, 11010, 11011, 11012, 11013, 11014,
+ 11015, 11016, 11017, 11018, 11019, 11020, 11021, 11022, 7669, 11023, 8061,
+ 6638, 7009, 7010, 7011, 7012, 7013, 7014, 7015, 7016, 7017, 7018, 7019, 7020,
+ 7021, 7022, 7023, 7024, 7025, 6638, 7009, 7010, 7011, 7012, 7013, 7014, 7015,
+ 7016, 7017, 7018, 7019, 7020, 7021, 7022, 7023, 7024, 7025, 3506, 7026, 3914,
+ 11024, 11025, 2848, 2848, 11027, 11027, 11028, 11028, 11029, 11029, 11030,
+ 11030, 11031, 11031, 11032, 11032, 11033, 11034, 11034, 11035, 11035, 11036,
+ 11036, 11037, 11037, 11038, 11038, 11039, 11039, 11040, 11040, 11041, 11041,
+ 11042, 11043, 11043, 11044, 11044, 2934, 2931, 11046, 11047, 11048, 11049,
+ 11050, 11051, 11052, 11052, 11053, 11054, 11054, 2982, 2982, 11056, 11056,
+ 3004, 11058, 11059, 11060, 11060, 2997, 2997, 11062, 11062, 11061, 11061,
+ 11057, 11057, 11055, 11055, 11045, 11045, 3035, 3035, 11067, 11067, 11068,
+ 11068, 11069, 11069, 11070, 11071, 11072, 11072, 3077, 3070, 3089, 11076,
+ 11074, 11075, 11077, 11078, 11079, 11080, 11080, 11081, 11081, 3121, 3121,
+ 11083, 11083, 11084, 11084, 3162, 3239, 3242, 3245, 3228, 3225, 3222, 3219,
+ 2830, 3216, 3209, 3202, 2823, 3195, 3188, 3176, 3179, 3173, 11086, 3155,
+ 11077, 11078, 3146, 3143, 3140, 3146, 3143, 3140, 11033, 11033, 11097, 11097,
+ 11098, 11098, 11099, 11099, 11100, 11100, 11101, 11101, 11102, 11102, 11103,
+ 11103, 11104, 11104, 11105, 11105, 11062, 11062, 11106, 11106, 11070, 11109,
+ 11109, 3332, 3332, 11111, 11111, 11112, 11112, 11113, 11113, 11114, 11114,
+ 11115, 11115, 11116, 11116, 11117, 11117, 11118, 11118, 11119, 11119, 11120,
+ 11120, 11121, 11121, 3329, 3329, 3383, 3383, 11122, 11122, 11123, 11123,
+ 3400, 11125, 543, 543, 11126, 3419, 3419, 11128, 11128, 11129, 11129, 11130,
+ 11130, 11131, 11131, 11132, 11132, 11133, 11133, 11134, 11134, 11135, 11135,
+ 11136, 11136, 11137, 11137, 11138, 11138, 11139, 11139, 3478, 3478, 11141,
+ 11141, 11142, 11142, 11143, 11143, 11144, 11144, 11140, 11140, 2841, 11147,
+ 3514, 3162, 3553, 3553, 11150, 11150, 3242, 3546, 3222, 3225, 3228, 3538,
+ 3535, 3195, 3179, 3176, 3525, 11149, 11090, 11095, 11151, 11151, 11155, 11156,
+ 11152, 11153, 11154, 11148, 11148, 3578, 11159, 11160, 11161, 11162, 11163,
+ 11163, 11164, 11164, 3613, 11166, 11167, 3635, 3635, 11169, 11169, 11170,
+ 11170, 11171, 11171, 11172, 11172, 3662, 3662, 11174, 11174, 3677, 3677,
+ 11176, 11176, 11177, 11177, 11178, 11178, 11175, 11175, 11173, 11173, 11064,
+ 11064, 512, 762, 763, 764, 765, 11179, 11180, 11181, 11182, 11179, 11180,
+ 11181, 11182, 11183, 11183, 11184, 11184, 11185, 11185, 11186, 11186, 11168,
+ 11165, 11187, 11187, 11188, 11189, 11190, 11190, 11157, 11158, 11157, 11158,
+ 3734, 3745, 11194, 11195, 11196, 11197, 11198, 11199, 11200, 11200, 11193,
+ 11193, 3785, 3785, 11203, 11203, 11204, 11204, 11205, 11205, 11206, 11206,
+ 11207, 3816, 3816, 11209, 11209, 11210, 11210, 11211, 11211, 11212, 11212,
+ 11213, 11213, 11214, 11214, 11215, 11215, 11216, 11216, 11217, 11217, 11218,
+ 11218, 3867, 3867, 11220, 11220, 11221, 11221, 11222, 11222, 11223, 11223,
+ 11224, 11224, 11225, 11225, 11226, 11226, 11227, 11227, 11228, 11228, 2823,
+ 11230, 11231, 11231, 11232, 11232, 11233, 11233, 11234, 11234, 11235, 11235,
+ 11236, 11236, 11237, 11237, 11229, 11219, 3952, 11241, 11238, 11238, 11239,
+ 11240, 11208, 11242, 11242, 11243, 11244, 3973, 3973, 11246, 11246, 11247,
+ 11247, 11248, 11248, 11249, 11249, 4000, 11251, 11252, 11252, 4019, 4019,
+ 11254, 11254, 11255, 11255, 4038, 4038, 4041, 4041, 4053, 4053, 4056, 4056,
+ 11258, 11257, 1008, 11259, 11260, 11261, 11261, 11256, 11256, 4082, 4093,
+ 4093, 11265, 11265, 11266, 11266, 11267, 11267, 11268, 11268, 11269, 11264,
+ 11271, 11270, 11272, 11272, 11273, 11273, 11274, 11274, 11275, 11275, 11276,
+ 11276, 11277, 11277, 11262, 11263, 11262, 11263, 11253, 11253, 11250, 11250,
+ 11245, 11245, 11201, 11202, 11201, 11202, 11191, 11192, 11191, 11192, 11145,
+ 11145, 11146, 11146, 11127, 11127, 11124, 11124, 11110, 11110, 11107, 11107,
+ 11108, 11108, 4164, 4164, 11290, 11290, 11291, 11291, 11292, 11292, 11293,
+ 11293, 11278, 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287,
+ 11288, 11289, 11278, 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286,
+ 11287, 11288, 11289, 11088, 11089, 11090, 11091, 11092, 11095, 11087, 11093,
+ 11094, 11096, 11085, 11085, 11082, 11082, 4229, 4229, 11299, 11299, 11300,
+ 11300, 4195, 4195, 4256, 4253, 4250, 4247, 4244, 11301, 4226, 4223, 4220,
+ 4217, 4214, 4211, 4208, 4205, 4202, 11302, 4256, 4253, 4250, 4247, 4244,
+ 11301, 4226, 4223, 4220, 4217, 4214, 4211, 4208, 4205, 4202, 11302, 4282,
+ 4282, 11304, 11304, 11305, 11305, 11306, 11306, 11307, 11307, 11303, 4310,
+ 4310, 11310, 11310, 11311, 11311, 11312, 11313, 11314, 11315, 4345, 4345,
+ 11317, 11317, 11318, 11318, 11319, 11320, 11321, 11322, 11323, 11316, 4385,
+ 4385, 11326, 11326, 11327, 11327, 11328, 11329, 11330, 11331, 11332, 4424,
+ 4424, 11334, 11334, 11335, 11335, 11336, 11337, 11338, 11339, 4459, 4459,
+ 11341, 11341, 11342, 11342, 11343, 11344, 11345, 11346, 11347, 11340, 4499,
+ 4499, 11350, 11350, 11351, 11351, 11352, 11353, 11354, 11355, 11356, 4538,
+ 4538, 11358, 11358, 11359, 11359, 11360, 11361, 11362, 11363, 11364, 11365,
+ 11365, 11366, 11366, 11367, 11367, 11368, 11368, 11369, 11369, 11370, 11370,
+ 11371, 11371, 11372, 11372, 11373, 11373, 11374, 11374, 4617, 4617, 11376,
+ 11376, 11377, 11377, 11378, 11379, 11380, 11381, 4652, 4652, 11383, 11383,
+ 11384, 11384, 11385, 11386, 11387, 11388, 11389, 11382, 11375, 11375, 4693,
+ 4693, 11393, 11393, 11394, 11394, 11395, 4716, 4716, 11397, 11397, 11398,
+ 11398, 11399, 11400, 11401, 11402, 11402, 11403, 11403, 11404, 11404, 4765,
+ 4765, 11406, 11406, 11407, 11407, 11408, 11409, 11410, 11411, 11412, 11412,
+ 11349, 11349, 11324, 11324, 11405, 11405, 11396, 11396, 11390, 11391, 11392,
+ 11390, 11391, 11392, 11357, 11357, 11349, 11349, 11348, 11348, 11333, 11333,
+ 11324, 11324, 11325, 11325, 11308, 11309, 11308, 11309, 11413, 11414, 11415,
+ 11416, 11417, 11418, 11419, 11420, 11421, 11422, 11423, 11413, 11414, 11415,
+ 11416, 11417, 11418, 11419, 11420, 11421, 11422, 11423, 92, 11424, 11425,
+ 11425, 11426, 11426, 11427, 11427, 4834, 11429, 11430, 11431, 11431, 4857,
+ 11433, 11434, 11435, 11435, 4886, 4886, 11437, 3329, 4883, 4880, 11437, 3329,
+ 4883, 4880, 3383, 3383, 11438, 11117, 11440, 11440, 11441, 11441, 11442,
+ 11442, 11443, 11444, 11444, 11445, 11445, 11446, 11446, 11447, 11447, 11448,
+ 11448, 11449, 11449, 11450, 11451, 11451, 11452, 11452, 11453, 11453, 11454,
+ 11454, 11455, 11455, 11456, 11456, 11457, 11458, 11458, 11459, 11459, 11460,
+ 11460, 11461, 11461, 11462, 11463, 11463, 11464, 11464, 11465, 11465, 11466,
+ 11466, 11467, 11468, 11468, 11469, 11469, 11470, 11470, 11471, 11471, 11472,
+ 11472, 11473, 11473, 11439, 11439, 11436, 11436, 11432, 11432, 11428, 11428,
+ 11159, 11479, 11480, 11481, 11482, 49, 782, 11484, 11484, 11485, 11485, 11486,
+ 11486, 543, 543, 11483, 11126, 49, 782, 11489, 11489, 11490, 11490, 11491,
+ 11491, 11145, 48, 543, 750, 49, 749, 1008, 5104, 5101, 5166, 5159, 5144,
+ 5141, 5138, 5135, 5132, 5129, 5126, 5123, 5120, 43, 437, 2, 591, 835, 11496,
+ 11497, 11498, 594, 765, 951, 1564, 11494, 11495, 340, 512, 763, 764, 1086,
+ 11499, 11500, 11501, 11502, 11503, 11504, 11504, 268, 1738, 5267, 5292, 5285,
+ 5320, 11509, 5308, 5305, 5302, 5299, 11507, 11508, 5274, 11506, 5264, 5261,
+ 5258, 3089, 5247, 5244, 5241, 5238, 5235, 5222, 5219, 5216, 5213, 5210, 5207,
+ 5204, 5339, 5350, 474, 475, 476, 11516, 1810, 11515, 5369, 11519, 5401, 5398,
+ 5395, 5392, 229, 5385, 5456, 11523, 5449, 5441, 5438, 5431, 502, 5422, 5419,
+ 5416, 5475, 5495, 5492, 5489, 5486, 11530, 11529, 12, 1964, 245, 247, 248,
+ 249, 250, 251, 448, 515, 11533, 72, 1985, 73, 1982, 1023, 1024, 1025, 195,
+ 951, 2024, 2026, 2027, 2028, 11537, 263, 5562, 11535, 11536, 5593, 5590,
+ 5587, 11538, 5577, 5574, 5571, 11539, 3225, 5544, 5541, 11534, 5531, 5528,
+ 5525, 3209, 5517, 5514, 11531, 11532, 11524, 11525, 11526, 11527, 11528,
+ 3195, 11521, 11522, 457, 3188, 11520, 5366, 3179, 3525, 11517, 11518, 11510,
+ 11511, 11512, 11513, 11514, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124,
+ 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2104, 2103, 2102, 2099, 2095, 2094,
+ 2090, 2089, 2083, 2082, 2081, 2080, 2076, 2075, 2192, 2191, 2190, 2189, 2182,
+ 2181, 2180, 2179, 2178, 2170, 2169, 2168, 2167, 2166, 2165, 2156, 2155, 2154,
+ 2153, 2152, 2151, 2150, 2209, 2208, 2207, 2206, 2203, 2233, 2229, 2228, 2225,
+ 2220, 2219, 2218, 2241, 2253, 2248, 2247, 2246, 11568, 11569, 11567, 11563,
+ 11564, 11565, 11566, 11561, 11562, 11557, 11558, 11559, 11560, 11549, 11550,
+ 11551, 11552, 11553, 11554, 11555, 11556, 2266, 2274, 2271, 2280, 11579,
+ 11577, 11578, 11576, 2289, 2294, 11584, 11583, 2302, 11587, 2309, 11589,
+ 2316, 2324, 2323, 2322, 2321, 11592, 11591, 11593, 11594, 11590, 11588, 11585,
+ 11586, 11580, 11581, 11582, 11570, 11571, 11572, 11573, 11574, 11575, 11595,
+ 11596, 11597, 11598, 11599, 11600, 11601, 11601, 11602, 11602, 11603, 11603,
+ 11604, 11604, 3242, 3239, 1611, 11151, 11151, 11540, 11541, 11542, 11543,
+ 11544, 11545, 11546, 11547, 11548, 11605, 11605, 11606, 11088, 11089, 11090,
+ 11091, 11092, 11155, 11156, 11095, 11607, 6102, 11609, 11609, 11610, 11610,
+ 11611, 11611, 11612, 11613, 11614, 11615, 6141, 11617, 11617, 11618, 11618,
+ 11619, 11619, 11620, 11620, 11621, 11621, 11622, 11623, 11624, 11625, 11626,
+ 11627, 11627, 11628, 11628, 11629, 11629, 11630, 11630, 11631, 11631, 11632,
+ 11632, 11633, 11633, 6220, 11635, 11635, 11636, 11636, 11637, 11637, 11638,
+ 11638, 11639, 11639, 11640, 11641, 11641, 11642, 11642, 11643, 11643, 11644,
+ 11644, 11645, 11645, 11646, 11646, 11647, 11647, 43, 11648, 44, 749, 750,
+ 11634, 340, 763, 764, 765, 782, 791, 1086, 11649, 11650, 11651, 11652, 11653,
+ 6313, 6316, 6310, 6307, 6304, 314, 5449, 11655, 11656, 11657, 11657, 11654,
+ 11616, 6345, 6345, 11661, 11662, 6364, 11664, 11665, 11666, 11667, 11667,
+ 11668, 11668, 11669, 11669, 11670, 11671, 6407, 11673, 11674, 6426, 11676,
+ 11677, 6445, 11679, 11680, 6464, 11682, 11683, 6483, 11685, 11686, 6502,
+ 11688, 11689, 6521, 11691, 11692, 6313, 11694, 11695, 6555, 11697, 11698,
+ 40, 11699, 48, 11696, 49, 11693, 50, 11690, 3, 11687, 41, 11684, 42, 11681,
+ 43, 11678, 44, 750, 11675, 11700, 11701, 11702, 11703, 11704, 11705, 11706,
+ 11707, 11708, 11709, 11710, 11711, 11712, 11672, 11713, 11714, 11663, 11658,
+ 11658, 11659, 11660, 11715, 11716, 11717, 791, 791, 11719, 11719, 11720,
+ 11720, 674, 11722, 11722, 11723, 11723, 11724, 11724, 11725, 11725, 11726,
+ 11726, 11727, 11721, 11721, 11718, 11718, 11608, 11608, 11505, 11505, 6623,
+ 11733, 11734, 11735, 11735, 11736, 11737, 11737, 3734, 6661, 6661, 11740,
+ 11740, 11739, 6677, 11743, 11744, 6696, 11746, 11747, 11748, 11749, 11750,
+ 11751, 11752, 11753, 11754, 11754, 11745, 11756, 11755, 11756, 11741, 11742,
+ 11741, 11742, 512, 762, 763, 764, 765, 6749, 11759, 11759, 11760, 11760,
+ 11761, 11761, 6775, 6775, 11763, 11763, 11764, 11764, 11765, 11765, 3245,
+ 11767, 11766, 6803, 6803, 11769, 11769, 11770, 11770, 11771, 11772, 11773,
+ 11774, 11775, 11776, 11776, 11777, 11777, 11778, 11778, 11779, 11779, 11780,
+ 11780, 11781, 11781, 11782, 11782, 11783, 11783, 11784, 11784, 11785, 11785,
+ 11786, 11786, 11787, 11787, 11788, 1564, 11790, 11791, 11792, 11793, 11793,
+ 11793, 11794, 11795, 11795, 11795, 11247, 11797, 11797, 11798, 11798, 11799,
+ 11799, 11252, 11801, 11801, 975, 6102, 11107, 11107, 11804, 11804, 4041,
+ 4038, 4041, 4038, 11257, 4056, 4053, 4056, 4053, 11258, 11807, 11806, 1008,
+ 11808, 11809, 1008, 11808, 11809, 11810, 11811, 11811, 2, 11805, 11803, 11803,
+ 11767, 11271, 11815, 11816, 11816, 11817, 11817, 11818, 11818, 11819, 11819,
+ 11820, 11820, 268, 268, 11822, 11822, 11823, 11823, 11824, 11824, 11825,
+ 11825, 11826, 11826, 11827, 11827, 11828, 11828, 11829, 11830, 11830, 11831,
+ 11831, 11832, 11832, 11833, 11833, 11834, 11834, 11835, 11835, 11836, 11836,
+ 11837, 11837, 11838, 11839, 11839, 11840, 11840, 314, 13491, 11842, 11843,
+ 11844, 11845, 11846, 11847, 11848, 11849, 11850, 11850, 11850, 11851, 11852,
+ 11852, 11852, 268, 268, 11854, 11854, 11855, 11855, 11856, 11856, 11857,
+ 11857, 11858, 11858, 11859, 11859, 11860, 11860, 11861, 11862, 11862, 11863,
+ 11863, 11864, 11864, 11865, 11865, 11866, 11866, 11867, 11867, 11868, 11868,
+ 11869, 11869, 11870, 11871, 11871, 11872, 11872, 340, 340, 11874, 11874,
+ 11875, 11875, 340, 340, 11877, 11877, 11878, 11878, 314, 314, 314, 340, 11881,
+ 11882, 11883, 11884, 11884, 11884, 11880, 11880, 11880, 11886, 11886, 11886,
+ 11885, 11885, 11885, 11879, 11879, 11876, 11876, 11873, 11873, 11853, 11853,
+ 11853, 11841, 11841, 437, 437, 11893, 11893, 11894, 11894, 11895, 11895,
+ 246, 246, 251, 251, 448, 448, 457, 481, 482, 314, 229, 493, 494, 495, 507,
+ 526, 523, 245, 246, 247, 248, 249, 250, 251, 515, 238, 237, 236, 235, 234,
+ 263, 535, 11910, 11906, 11907, 11909, 11908, 11905, 11903, 11904, 11902,
+ 11901, 11900, 11897, 11898, 11899, 11897, 11898, 11899, 11829, 11829, 11919,
+ 11919, 11920, 11920, 11921, 11921, 11922, 11922, 11923, 11923, 11924, 11924,
+ 11925, 11925, 11926, 11926, 11927, 11927, 314, 314, 11929, 11929, 11930,
+ 11930, 11928, 11928, 369, 369, 11933, 11933, 11934, 11934, 11935, 11935,
+ 11936, 11936, 11937, 11938, 11938, 594, 594, 11940, 11940, 11941, 11941,
+ 11942, 11942, 11943, 11943, 11944, 11944, 11945, 11945, 11946, 11946, 11947,
+ 11947, 11948, 11948, 11949, 11949, 11950, 11950, 621, 621, 11951, 11951,
+ 591, 591, 11952, 11953, 11954, 11952, 11953, 11954, 11955, 11955, 632, 11957,
+ 11958, 543, 543, 11959, 643, 643, 11961, 11961, 11962, 11962, 11963, 11963,
+ 11964, 11964, 11965, 11965, 11966, 11966, 11967, 11967, 11968, 11968, 11969,
+ 11969, 11970, 11970, 11971, 11971, 11972, 11972, 11973, 11973, 11974, 11974,
+ 263, 11976, 11977, 715, 715, 11979, 11979, 388, 393, 11982, 11981, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 11985, 11986, 11983, 11984, 694,
+ 462, 11989, 11990, 474, 475, 476, 469, 470, 701, 502, 518, 519, 245, 246,
+ 248, 249, 250, 251, 448, 515, 235, 237, 238, 540, 535, 536, 11998, 11999,
+ 11906, 11907, 11995, 11996, 11997, 11994, 11904, 11901, 11992, 11993, 11991,
+ 11900, 11987, 11988, 11980, 11980, 12000, 12001, 12002, 12003, 12004, 12005,
+ 12006, 12007, 12007, 11978, 11978, 767, 767, 12010, 12010, 12011, 12011,
+ 12012, 12012, 12013, 12013, 12014, 12014, 782, 782, 12016, 12016, 12017,
+ 12017, 11729, 11729, 12018, 12018, 12015, 12015, 11888, 11888, 512, 762,
+ 763, 764, 765, 12019, 12020, 12021, 12022, 12019, 12020, 12021, 12022, 12023,
+ 12023, 12024, 12024, 12025, 12025, 437, 12027, 12028, 12029, 12030, 12031,
+ 12032, 12032, 12033, 12033, 749, 750, 12035, 12036, 12037, 12038, 12034,
+ 12026, 12026, 12039, 12040, 12041, 12041, 12042, 12042, 12008, 12009, 12008,
+ 12009, 828, 828, 12045, 835, 12047, 12048, 12049, 12050, 12051, 12052, 12053,
+ 12054, 12054, 12046, 12046, 236, 12057, 507, 507, 12059, 12059, 12060, 12060,
+ 12061, 12061, 12062, 12062, 12063, 12063, 12064, 11903, 12066, 12067, 12067,
+ 12068, 12068, 12069, 12069, 12070, 12070, 12071, 12071, 12072, 12072, 234,
+ 234, 12074, 12074, 12075, 12075, 12076, 12076, 12077, 12077, 12078, 12078,
+ 12079, 12079, 12080, 12080, 12081, 12081, 12082, 12082, 12083, 12083, 12084,
+ 12084, 247, 247, 12086, 12086, 12087, 12087, 12088, 12088, 12089, 12089,
+ 12090, 12090, 12091, 12091, 12092, 12092, 12093, 12093, 12094, 12094, 12095,
+ 12095, 12096, 12085, 12073, 12073, 12097, 12098, 12099, 12099, 12065, 12058,
+ 12102, 12102, 12100, 12101, 951, 951, 12104, 12104, 12105, 12105, 12106,
+ 12106, 12107, 12107, 12108, 12108, 621, 12110, 12111, 12112, 12112, 975,
+ 975, 12114, 12114, 12115, 12115, 12116, 12116, 989, 989, 986, 986, 12118,
+ 12119, 12118, 12119, 1000, 1000, 997, 997, 12121, 12122, 12121, 12122, 12123,
+ 12120, 1008, 12124, 12125, 12126, 12126, 12117, 12117, 1026, 1025, 1024,
+ 1023, 1022, 1021, 1020, 1019, 1018, 12129, 1041, 1042, 12131, 12131, 12132,
+ 12132, 12133, 12133, 12134, 12134, 12135, 12135, 12136, 12130, 12138, 12137,
+ 12139, 12139, 12140, 12140, 12141, 12141, 12142, 12142, 12143, 12143, 12144,
+ 12144, 12127, 12128, 12127, 12128, 12113, 12113, 12109, 12109, 12103, 12103,
+ 12055, 12056, 12055, 12056, 12043, 12044, 12043, 12044, 11727, 11975, 11727,
+ 11975, 11960, 11960, 11956, 11956, 11939, 11939, 11931, 11932, 11931, 11932,
+ 1086, 1086, 12157, 12157, 12158, 12158, 12159, 12159, 12160, 12160, 12161,
+ 12161, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154,
+ 12155, 12156, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153,
+ 12154, 12155, 12156, 11913, 11914, 11915, 11911, 11912, 11916, 11917, 11918,
+ 11896, 11896, 493, 540, 518, 518, 12167, 12167, 12168, 12168, 518, 518, 457,
+ 457, 457, 457, 536, 536, 470, 470, 12169, 12169, 457, 457, 474, 474, 519,
+ 519, 495, 495, 476, 476, 494, 494, 470, 470, 482, 482, 475, 475, 457, 457,
+ 502, 502, 502, 502, 12166, 12166, 12170, 12171, 12172, 12173, 12174, 12175,
+ 12176, 12177, 12178, 12179, 12180, 12181, 12182, 12183, 12184, 12170, 12171,
+ 12172, 12173, 12174, 12175, 12176, 12177, 12178, 12179, 12180, 12181, 12182,
+ 12183, 12184, 12185, 402, 402, 12187, 12187, 12188, 12188, 12189, 12189,
+ 12190, 12191, 12192, 12193, 403, 403, 12195, 12195, 12196, 12196, 12197,
+ 12197, 12198, 12199, 12200, 12201, 12202, 12194, 406, 406, 12205, 12205,
+ 12206, 12206, 12207, 12207, 12208, 12209, 12210, 12211, 12212, 404, 404,
+ 12214, 12214, 12215, 12215, 12216, 12216, 12217, 12218, 12219, 12220, 408,
+ 408, 12222, 12222, 12223, 12223, 12224, 12224, 12225, 12226, 12227, 12228,
+ 12229, 12221, 407, 407, 12232, 12232, 12233, 12233, 12234, 12234, 12235,
+ 12236, 12237, 12238, 12239, 409, 409, 12241, 12241, 12242, 12242, 12243,
+ 12243, 12244, 12245, 12246, 12247, 12248, 12249, 12249, 12250, 12250, 12251,
+ 12251, 12252, 12252, 12253, 12253, 12254, 12254, 12255, 12255, 12256, 12256,
+ 12257, 12257, 12258, 12258, 410, 410, 12260, 12260, 12261, 12261, 12262,
+ 12262, 12263, 12264, 12265, 12266, 405, 405, 12268, 12268, 12269, 12269,
+ 12270, 12270, 12271, 12272, 12273, 12274, 12275, 12267, 12259, 12259, 481,
+ 481, 12279, 12279, 481, 481, 12281, 12281, 12282, 12282, 12280, 12280, 12283,
+ 12283, 12284, 12285, 393, 393, 12287, 12287, 12288, 12288, 12289, 12289,
+ 12290, 12291, 12292, 12293, 12293, 12294, 12294, 393, 393, 12296, 12296,
+ 12297, 12297, 12298, 12298, 12299, 12300, 12301, 12302, 12302, 12303, 12303,
+ 12304, 12304, 12295, 12295, 518, 518, 12307, 12307, 12308, 12308, 518, 518,
+ 457, 457, 457, 457, 536, 536, 470, 470, 12309, 12309, 474, 474, 519, 519,
+ 495, 495, 476, 476, 494, 494, 470, 470, 482, 482, 475, 475, 457, 457, 502,
+ 502, 502, 502, 12166, 12166, 457, 457, 701, 701, 701, 701, 701, 701, 12310,
+ 12311, 12312, 12313, 12314, 12315, 12324, 12316, 12317, 12318, 12319, 12320,
+ 12325, 12321, 12322, 12323, 12310, 12311, 12312, 12313, 12314, 12315, 12324,
+ 12316, 12317, 12318, 12319, 12320, 12325, 12321, 12322, 12323, 12324, 12325,
+ 523, 523, 12327, 12327, 12328, 12328, 12329, 12329, 12330, 12330, 523, 523,
+ 12332, 12332, 12333, 12333, 12334, 12334, 12335, 12335, 12336, 12336, 12331,
+ 12331, 12326, 402, 402, 12340, 12340, 12341, 12341, 12342, 12342, 12343,
+ 12344, 12345, 12346, 403, 403, 12348, 12348, 12349, 12349, 12350, 12350,
+ 12351, 12352, 12353, 12354, 12355, 12347, 406, 406, 12358, 12358, 12359,
+ 12359, 12360, 12360, 12361, 12362, 12363, 12364, 12365, 404, 404, 12367,
+ 12367, 12368, 12368, 12369, 12369, 12370, 12371, 12372, 12373, 408, 408,
+ 12375, 12375, 12376, 12376, 12377, 12377, 12378, 12379, 12380, 12381, 12382,
+ 12374, 407, 407, 12385, 12385, 12386, 12386, 12387, 12387, 12388, 12389,
+ 12390, 12391, 12392, 409, 409, 12394, 12394, 12395, 12395, 12396, 12396,
+ 12397, 12398, 12399, 12400, 12401, 12402, 12402, 12403, 12403, 12404, 12404,
+ 12405, 12405, 12406, 12406, 12407, 12407, 12408, 12408, 12409, 12409, 12410,
+ 12410, 12411, 12411, 410, 410, 12413, 12413, 12414, 12414, 12415, 12415,
+ 12416, 12417, 12418, 12419, 405, 405, 12421, 12421, 12422, 12422, 12423,
+ 12423, 12424, 12425, 12426, 12427, 12428, 12420, 12412, 12412, 401, 401,
+ 12432, 12432, 12433, 12433, 12434, 12434, 12435, 12436, 12437, 12438, 401,
+ 401, 12440, 12440, 12441, 12441, 12442, 12442, 12443, 12444, 12445, 12446,
+ 12447, 12447, 12231, 12231, 12439, 12439, 12384, 12384, 12356, 12356, 12429,
+ 12430, 12431, 12429, 12430, 12431, 12393, 12393, 12384, 12384, 12383, 12383,
+ 12366, 12366, 12356, 12356, 12357, 12357, 12338, 12339, 12337, 12338, 12339,
+ 12339, 12203, 12203, 12305, 12305, 12306, 12286, 12286, 12286, 12276, 12277,
+ 12278, 12276, 12277, 12278, 12240, 12240, 12231, 12231, 12230, 12230, 12213,
+ 12213, 12203, 12203, 12204, 12204, 12186, 12186, 12450, 12451, 12452, 12460,
+ 12461, 12453, 12454, 12455, 12456, 12457, 12458, 12448, 12449, 12450, 12451,
+ 12452, 12460, 12461, 12453, 12454, 12455, 12456, 12457, 12458, 12459, 12460,
+ 12461, 12462, 12463, 12464, 12465, 12466, 12467, 92, 12468, 12469, 12469,
+ 12469, 12470, 12470, 12470, 12471, 12471, 12471, 340, 782, 12473, 12474,
+ 12475, 12476, 12476, 12476, 782, 12478, 12479, 12480, 12481, 12481, 12481,
+ 621, 12483, 12483, 12483, 591, 591, 591, 594, 594, 594, 632, 632, 632, 621,
+ 621, 621, 12484, 12485, 12486, 12487, 12484, 12484, 12485, 12486, 12487,
+ 12485, 12486, 12487, 12488, 12488, 12488, 12489, 594, 594, 12491, 12491,
+ 12492, 12492, 12493, 12493, 12494, 12494, 12495, 12495, 12496, 12496, 12497,
+ 12497, 12498, 12499, 12499, 12500, 12500, 12501, 12501, 12502, 12503, 12503,
+ 12504, 12504, 12505, 12505, 12506, 12506, 12507, 12507, 12508, 12508, 12509,
+ 12510, 12510, 12511, 12511, 12512, 12512, 12513, 12513, 12514, 12514, 12515,
+ 12515, 12516, 12517, 12517, 12518, 12518, 12519, 12519, 12520, 12520, 12521,
+ 12522, 12522, 12523, 12523, 12524, 12524, 12525, 12525, 12526, 12527, 12527,
+ 12528, 12528, 12529, 12529, 12530, 12530, 12531, 12531, 11947, 12533, 12533,
+ 12534, 12534, 12535, 12535, 12536, 12537, 12537, 12538, 12538, 12539, 12539,
+ 12540, 12540, 12541, 12541, 12542, 12542, 12543, 12544, 12544, 12545, 12545,
+ 12546, 12546, 12547, 12547, 12548, 12548, 12549, 12549, 12550, 12551, 12551,
+ 12552, 12552, 12553, 12553, 12554, 12554, 12555, 12556, 12556, 12557, 12557,
+ 12558, 12558, 12559, 12559, 12560, 12561, 12561, 12562, 12562, 12563, 12563,
+ 12564, 12564, 12565, 12565, 12566, 12566, 12532, 12532, 12490, 12490, 12490,
+ 12482, 12482, 12482, 12477, 12477, 12477, 12472, 12472, 12472, 986, 989,
+ 997, 1000, 975, 48, 543, 750, 49, 749, 1008, 12573, 12574, 409, 408, 407,
+ 406, 405, 404, 403, 402, 401, 393, 250, 388, 828, 507, 263, 462, 540, 536,
+ 248, 249, 251, 535, 526, 523, 519, 518, 448, 515, 235, 237, 238, 245, 246,
+ 502, 495, 494, 493, 482, 481, 476, 475, 474, 470, 701, 469, 457, 632, 229,
+ 236, 247, 715, 234, 674, 1041, 1042, 268, 694, 369, 410, 621, 1018, 1019,
+ 1020, 1021, 1022, 1023, 1024, 1025, 1026, 12587, 12586, 12577, 12578, 12579,
+ 12580, 12581, 12582, 12583, 12584, 12585, 43, 437, 2, 835, 591, 12588, 12589,
+ 12590, 765, 951, 1564, 594, 12575, 12576, 340, 512, 763, 764, 1086, 12591,
+ 12592, 12593, 12594, 12595, 12596, 12596, 1659, 1658, 340, 1655, 674, 694,
+ 1647, 1646, 1645, 1644, 1643, 462, 1639, 1638, 1626, 1625, 1624, 1623, 1622,
+ 1621, 1620, 1619, 1618, 1617, 1613, 1612, 1708, 1707, 1699, 1698, 1697, 1696,
+ 1695, 1694, 1688, 1687, 1686, 1685, 1680, 1679, 1678, 1673, 1672, 1671, 1735,
+ 1745, 1744, 1743, 1742, 268, 1738, 12610, 1041, 1042, 1726, 1725, 1724, 1723,
+ 1722, 1721, 1720, 997, 1000, 986, 989, 1008, 1758, 1757, 975, 1781, 1780,
+ 543, 632, 1775, 1774, 1773, 369, 1770, 835, 1767, 12617, 12616, 1792, 12624,
+ 12625, 12618, 12619, 12620, 12621, 12622, 12623, 12611, 12612, 12613, 12614,
+ 12615, 11985, 12605, 12606, 12607, 12608, 12609, 12598, 12599, 12600, 12601,
+ 12602, 12603, 12604, 1805, 12631, 1814, 12633, 474, 475, 476, 12634, 1810,
+ 12632, 594, 12637, 12638, 1825, 1824, 1837, 1857, 1853, 1852, 1847, 1846,
+ 1845, 1842, 12642, 12643, 12644, 12645, 229, 12641, 1878, 1877, 1876, 1875,
+ 1874, 1871, 1868, 1889, 1022, 1026, 1018, 1019, 1020, 1021, 437, 1902, 12655,
+ 12656, 12654, 12652, 12653, 12651, 502, 12648, 12649, 12650, 1915, 12662,
+ 1931, 1928, 1925, 1922, 12664, 12665, 12666, 12667, 12668, 12663, 1947, 1944,
+ 12, 1964, 526, 1564, 1972, 518, 519, 621, 828, 1969, 245, 247, 248, 249,
+ 250, 251, 448, 515, 12673, 234, 235, 236, 237, 238, 388, 715, 1957, 1956,
+ 1955, 1954, 512, 782, 1988, 72, 1985, 73, 1982, 1023, 1024, 1025, 195, 591,
+ 2049, 2048, 2040, 2039, 2038, 2037, 2036, 2035, 951, 2028, 2027, 2026, 12683,
+ 2024, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 393, 749, 750,
+ 765, 1999, 1998, 1997, 1996, 540, 762, 763, 764, 791, 1086, 263, 12680, 12681,
+ 12682, 12684, 12685, 12686, 12687, 12688, 12689, 12690, 12691, 11907, 12674,
+ 12675, 12676, 12677, 12678, 12679, 11905, 12671, 12672, 12669, 12670, 12657,
+ 12658, 12659, 12660, 12661, 11904, 12646, 12647, 457, 11902, 12639, 12640,
+ 11901, 11993, 12635, 12636, 12626, 12627, 12628, 12629, 12630, 1611, 12692,
+ 12693, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 765, 835,
+ 1086, 791, 340, 782, 764, 512, 762, 763, 12704, 12703, 12705, 12706, 12707,
+ 314, 12654, 12708, 12709, 12710, 12710, 12711, 12711, 12712, 12713, 12713,
+ 12702, 12702, 12597, 12597, 835, 835, 12717, 12717, 12718, 12718, 12719,
+ 12719, 512, 762, 763, 764, 765, 12721, 12721, 12722, 12722, 12723, 12723,
+ 11937, 12725, 369, 369, 12727, 12727, 12728, 12728, 12729, 12729, 12730,
+ 12730, 12731, 12732, 12733, 12733, 12726, 12726, 11987, 11988, 12736, 12737,
+ 12737, 12737, 12738, 12738, 12738, 246, 246, 251, 251, 448, 448, 11990, 469,
+ 470, 245, 246, 247, 248, 249, 250, 251, 448, 515, 512, 543, 263, 535, 536,
+ 11998, 12747, 12748, 11909, 11906, 11907, 11995, 12745, 12746, 11901, 11992,
+ 12744, 12743, 12740, 12741, 12742, 12740, 12741, 12742, 437, 437, 12754,
+ 12754, 12755, 12755, 12756, 12756, 11861, 11861, 12758, 12758, 12759, 12759,
+ 12760, 12760, 12761, 12761, 12762, 12762, 12763, 12763, 12764, 12764, 12765,
+ 12765, 12766, 12766, 314, 314, 12768, 12768, 12769, 12769, 12767, 12767,
+ 12731, 12772, 12772, 12498, 12498, 12774, 12774, 12775, 12775, 12776, 12776,
+ 621, 621, 12777, 12777, 591, 591, 12778, 12779, 12780, 12778, 12779, 12780,
+ 12781, 12781, 543, 543, 11959, 643, 643, 12784, 12784, 12785, 12785, 12786,
+ 12786, 12787, 12787, 12788, 12788, 12789, 12789, 12790, 12790, 12791, 12791,
+ 12792, 12792, 12793, 12793, 12794, 12794, 12795, 12795, 12796, 12796, 11722,
+ 11722, 12798, 12798, 12799, 12799, 12800, 12800, 12801, 12801, 12797, 12797,
+ 715, 715, 12804, 12804, 12805, 12805, 12002, 12004, 12005, 12006, 12000,
+ 12001, 12003, 12806, 12806, 11978, 11978, 767, 767, 12809, 12809, 12810,
+ 12810, 12811, 12811, 12812, 12812, 12813, 12813, 782, 782, 12815, 12815,
+ 12816, 12816, 791, 791, 12818, 12818, 12819, 12819, 12820, 12820, 12821,
+ 12821, 12817, 12817, 12814, 12814, 11889, 11889, 512, 762, 763, 764, 765,
+ 12822, 12823, 12824, 12825, 12822, 12823, 12824, 12825, 12826, 12826, 12827,
+ 12827, 12828, 12828, 12032, 12032, 12830, 12830, 12831, 12829, 12829, 12039,
+ 12832, 12833, 12833, 12834, 12834, 12807, 12808, 12807, 12808, 828, 828,
+ 12837, 12054, 12054, 12838, 12838, 507, 507, 12841, 12841, 12842, 12842,
+ 12843, 12843, 12844, 12844, 12845, 12845, 12846, 12067, 12067, 12848, 12848,
+ 12849, 12849, 12850, 12850, 12851, 12851, 12852, 12852, 234, 234, 12854,
+ 12854, 12855, 12855, 12856, 12856, 12857, 12857, 12858, 12858, 12859, 12859,
+ 12860, 12860, 12861, 12861, 12862, 12862, 12863, 12863, 12864, 12864, 247,
+ 247, 12866, 12866, 12867, 12867, 12868, 12868, 12869, 12869, 12870, 12870,
+ 12871, 12871, 12872, 12872, 12873, 12873, 12874, 12874, 12875, 12875, 12876,
+ 12865, 12853, 12853, 12877, 12878, 12879, 12879, 12847, 12880, 12881, 12102,
+ 12102, 951, 951, 12883, 12883, 12884, 12884, 12885, 12885, 12886, 12886,
+ 12887, 12887, 12112, 12112, 975, 975, 12890, 12890, 12891, 12891, 12892,
+ 12892, 989, 989, 986, 986, 12894, 12895, 12894, 12895, 1000, 1000, 997, 997,
+ 12897, 12898, 12897, 12898, 12899, 12896, 1008, 12900, 12901, 12902, 12902,
+ 12893, 12893, 12131, 12131, 12905, 12905, 12906, 12906, 12907, 12907, 12908,
+ 12908, 12909, 12138, 12910, 12911, 12911, 12912, 12912, 12913, 12913, 12914,
+ 12914, 12915, 12915, 12916, 12916, 12903, 12904, 12903, 12904, 12889, 12889,
+ 12888, 12888, 12882, 12882, 12839, 12840, 12839, 12840, 12835, 12836, 12835,
+ 12836, 12802, 12802, 12803, 12803, 12783, 12783, 12782, 12782, 12773, 12773,
+ 12770, 12771, 12770, 12771, 1086, 1086, 12929, 12929, 12930, 12930, 12931,
+ 12931, 12932, 12932, 12933, 12933, 12917, 12918, 12919, 12920, 12921, 12922,
+ 12923, 12924, 12925, 12926, 12927, 12928, 12917, 12918, 12919, 12920, 12921,
+ 12922, 12923, 12924, 12925, 12926, 12927, 12928, 12757, 12757, 11913, 11914,
+ 11915, 12002, 12006, 12750, 12749, 12751, 12752, 12753, 12739, 12739, 12739,
+ 12028, 12939, 12940, 12941, 12942, 11489, 11489, 12944, 12944, 12945, 12945,
+ 543, 543, 543, 11959, 12943, 12802, 12805, 12805, 11980, 92, 223, 84, 85,
+ 86, 87, 88, 89, 90, 91, 222, 2, 220, 221, 19, 81, 82, 83, 80, 69, 218, 219,
+ 4, 74, 212, 75, 36, 47, 76, 77, 213, 7, 8, 9, 10, 11, 12, 13, 78, 79, 14,
+ 15, 16, 17, 18, 39, 94, 214, 215, 216, 217, 44, 49, 55, 186, 187, 188, 189,
+ 190, 191, 192, 193, 37, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 40, 45, 52, 68, 208, 209, 210, 211, 3, 41, 42, 43, 48,
+ 71, 6, 72, 73, 12971, 12972, 12973, 12974, 12975, 12976, 12977, 12978, 12964,
+ 12965, 12966, 12967, 12968, 12969, 12970, 12961, 12962, 12963, 12960, 12958,
+ 12959, 12956, 12957, 12952, 12953, 12954, 12955, 12950, 12951, 164, 165,
+ 50, 166, 38, 56, 167, 168, 169, 170, 171, 70, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 146, 147, 148, 149, 150, 151, 152,
+ 153, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 134, 135, 136, 137, 95, 138, 51, 53, 139, 140, 141, 142,
+ 143, 144, 145, 31, 32, 30, 33, 34, 127, 128, 20, 93, 129, 130, 131, 57, 132,
+ 46, 133, 13005, 13006, 13007, 13008, 13000, 13001, 13002, 13003, 13004, 12994,
+ 12995, 12996, 12997, 12998, 12999, 12987, 12988, 12989, 12990, 12991, 12992,
+ 12993, 126, 119, 120, 121, 122, 123, 124, 125, 13014, 13015, 13016, 13017,
+ 13013, 112, 113, 114, 115, 116, 117, 118, 111, 21, 25, 26, 27, 28, 29, 54,
+ 13026, 13024, 13025, 13023, 13020, 13021, 13022, 110, 13031, 107, 108, 109,
+ 22, 23, 24, 13036, 13033, 13034, 13035, 13037, 13038, 13032, 13027, 13028,
+ 13029, 13030, 13018, 13019, 13009, 13010, 13011, 13012, 12979, 12980, 12981,
+ 12982, 12983, 12984, 12985, 12986, 106, 13045, 104, 105, 35, 13048, 13047,
+ 103, 13051, 13052, 13049, 13050, 13046, 102, 13056, 101, 13058, 13059, 13057,
+ 5, 13062, 13063, 100, 13065, 13066, 99, 13068, 1, 96, 97, 98, 13070, 13071,
+ 13072, 13073, 13074, 13069, 13075, 13076, 13067, 13064, 13060, 13061, 13053,
+ 13054, 13055, 13039, 13040, 13041, 13042, 13043, 13044, 13077, 13078, 13079,
+ 13080, 13081, 13082, 13083, 13083, 13083, 13084, 13084, 13084, 13085, 13085,
+ 13085, 11998, 12748, 13086, 13086, 13086, 12692, 12693, 12694, 12695, 12696,
+ 12697, 12698, 12699, 12700, 1611, 12949, 12949, 12949, 13087, 12750, 11913,
+ 12002, 11914, 11915, 12004, 12005, 12006, 13088, 13088, 13088, 13089, 12596,
+ 12596, 975, 13092, 13093, 13093, 13093, 13094, 13094, 13094, 13095, 13095,
+ 13095, 13096, 13097, 13098, 13099, 1041, 13101, 13102, 13102, 13103, 13103,
+ 13104, 13104, 13105, 13105, 13106, 13106, 13107, 13108, 13109, 13110, 13111,
+ 13112, 13112, 13113, 13113, 13114, 13114, 13115, 13115, 13102, 13102, 13117,
+ 13117, 13118, 13118, 13119, 13119, 13120, 13120, 13121, 13122, 13123, 13124,
+ 13125, 13126, 13126, 13127, 13127, 13128, 13128, 13129, 13129, 13130, 13130,
+ 13116, 13116, 13131, 13131, 13132, 13133, 13133, 13133, 1042, 13135, 13136,
+ 13136, 13137, 13137, 13138, 13138, 13139, 13139, 13140, 13140, 13141, 13142,
+ 13142, 13143, 13143, 13144, 13144, 13145, 13145, 13136, 13136, 13147, 13147,
+ 13148, 13148, 13149, 13149, 13150, 13150, 13151, 13152, 13152, 13153, 13153,
+ 13154, 13154, 13155, 13155, 13156, 13156, 13146, 13146, 13157, 13157, 13158,
+ 13159, 13159, 13159, 43, 13160, 44, 750, 749, 13134, 340, 763, 764, 765,
+ 782, 791, 1086, 13161, 13162, 13163, 13164, 13165, 13166, 13100, 12710, 12710,
+ 311, 13170, 13171, 13172, 13173, 13174, 13174, 13174, 13174, 13176, 13176,
+ 13175, 13175, 13177, 13177, 13178, 13179, 13180, 512, 13182, 13183, 13184,
+ 762, 13186, 13187, 13188, 763, 13190, 13191, 13192, 764, 13194, 13195, 13196,
+ 1086, 13198, 13199, 13200, 340, 13202, 13203, 13204, 782, 13206, 13207, 13208,
+ 12704, 13210, 13211, 765, 13213, 13214, 13215, 40, 13216, 48, 13212, 49,
+ 13209, 50, 13205, 3, 13201, 41, 13197, 42, 13193, 43, 13189, 44, 750, 13185,
+ 13217, 13218, 13219, 13220, 13221, 13222, 13223, 13224, 13225, 13226, 13227,
+ 13228, 13229, 13181, 314, 314, 314, 13232, 13232, 13232, 13233, 13234, 13235,
+ 13230, 13231, 13167, 13168, 13169, 13169, 13236, 13237, 13238, 13239, 13239,
+ 13239, 13091, 13091, 13090, 13090, 13090, 828, 828, 828, 13243, 835, 835,
+ 13245, 13245, 13246, 13246, 13244, 835, 13249, 13250, 13251, 835, 835, 13253,
+ 13254, 13255, 13256, 13257, 13258, 13259, 13260, 13261, 13262, 13262, 13262,
+ 13252, 13264, 13264, 13263, 13264, 13247, 13248, 13247, 13248, 13248, 750,
+ 13267, 13268, 13268, 13269, 13269, 512, 762, 763, 764, 765, 13267, 13271,
+ 13271, 13272, 13272, 13273, 13273, 13270, 13270, 951, 951, 13276, 13276,
+ 951, 951, 13278, 13278, 13279, 13279, 13277, 13277, 13280, 13280, 13281,
+ 12747, 13282, 13282, 13282, 13283, 13284, 388, 388, 13286, 13286, 13287,
+ 13287, 13288, 13288, 13289, 13290, 13291, 13292, 13293, 13294, 13294, 13295,
+ 13295, 13296, 13296, 13297, 13297, 13298, 13298, 13299, 13299, 13300, 13300,
+ 13301, 13301, 13302, 13302, 388, 388, 13304, 13304, 13305, 13305, 13306,
+ 13306, 13307, 13308, 13309, 13310, 13311, 13312, 13312, 13313, 13313, 13314,
+ 13314, 13315, 13315, 13316, 13316, 13317, 13317, 13318, 13318, 13319, 13319,
+ 13320, 13320, 13321, 13321, 13303, 13303, 13323, 13322, 13323, 13324, 13324,
+ 13324, 13325, 12106, 13327, 13327, 13328, 13328, 12885, 13330, 13330, 13331,
+ 13331, 13332, 13332, 13329, 13329, 12112, 13335, 13335, 13335, 975, 13092,
+ 11886, 11886, 11886, 13338, 13338, 13338, 13339, 13339, 13339, 989, 989,
+ 989, 986, 986, 986, 13341, 13341, 13341, 13342, 13342, 13342, 13341, 13342,
+ 13341, 13342, 13341, 13342, 13343, 1000, 1000, 1000, 997, 997, 997, 13345,
+ 13345, 13345, 13346, 13346, 13346, 13345, 13346, 13345, 13346, 13345, 13346,
+ 13347, 13348, 13344, 1008, 13349, 13350, 1008, 13349, 13350, 13351, 13352,
+ 13352, 13352, 2, 13340, 13337, 13337, 13337, 13283, 12138, 13356, 13357,
+ 13357, 13358, 13358, 13359, 13359, 13360, 13360, 13361, 13361, 13357, 13357,
+ 13363, 13363, 13364, 13364, 13365, 13365, 13366, 13366, 251, 250, 249, 248,
+ 247, 246, 245, 5, 13369, 13370, 13371, 13372, 13373, 13374, 13375, 13376,
+ 13377, 13378, 13379, 13380, 13381, 13382, 13383, 13384, 13385, 13386, 13387,
+ 13388, 13389, 13390, 13391, 13392, 13393, 13394, 13395, 13396, 13397, 13398,
+ 13399, 13400, 13401, 13402, 13403, 13404, 13405, 13406, 13407, 13408, 13409,
+ 13410, 13411, 13412, 13413, 13414, 13415, 13416, 13417, 13418, 224, 225,
+ 13421, 13422, 226, 13424, 13425, 228, 13427, 13428, 13429, 13430, 13431,
+ 13432, 13433, 13434, 13435, 13436, 13437, 13438, 13439, 13440, 13441, 13442,
+ 13443, 13444, 13368, 11909, 13367, 13367, 13362, 13362, 13353, 13354, 13355,
+ 13353, 13354, 13353, 13354, 13355, 13355, 13336, 13336, 13336, 13333, 13333,
+ 13334, 674, 11725, 11725, 674, 12800, 12800, 13326, 13326, 13326, 13285,
+ 13285, 13285, 765, 764, 763, 762, 512, 13274, 13274, 13275, 13265, 13266,
+ 13265, 13265, 13266, 13266, 13240, 13242, 13241, 13240, 13240, 13242, 13241,
+ 13242, 12948, 12821, 12948, 12821, 12946, 12947, 12946, 12947, 12947, 12934,
+ 12935, 12937, 12936, 12938, 12934, 12935, 12937, 12936, 12938, 12937, 12938,
+ 12734, 12734, 12735, 512, 762, 763, 764, 765, 12724, 12724, 12720, 12720,
+ 12714, 12715, 12716, 12714, 12715, 12716, 12568, 12569, 12570, 12571, 12572,
+ 12567, 12569, 12568, 12569, 12570, 12571, 12572, 12570, 12571, 12572, 12162,
+ 12163, 12164, 12165, 12162, 12163, 12164, 12165, 11888, 11889, 11889, 11887,
+ 11891, 11890, 11887, 11887, 11891, 11890, 11891, 11892, 11821, 11821, 11812,
+ 11813, 11814, 11812, 11813, 11814, 11802, 11802, 11800, 11800, 674, 11796,
+ 11796, 11796, 11143, 11143, 11789, 11789, 11768, 11768, 512, 762, 763, 764,
+ 765, 11762, 11762, 11757, 11758, 11757, 11758, 11738, 11738, 11729, 11729,
+ 11728, 11728, 11730, 11731, 11732, 11730, 11731, 11732, 11492, 11492, 11493,
+ 11178, 11493, 11178, 11487, 11488, 11487, 11488, 11474, 11475, 11476, 11477,
+ 11478, 11474, 11475, 11476, 11477, 11478, 11294, 11295, 11296, 11297, 11298,
+ 11294, 11295, 11296, 11297, 11298, 11073, 11073, 11064, 11064, 11063, 11065,
+ 11066, 11063, 11065, 11066, 2830, 2833, 11026, 2624, 2805, 2806, 2807, 2808,
+ 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821,
+ 2624, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816,
+ 2817, 2818, 2819, 2820, 2821, 690, 2822, 920, 1, 227, 226, 13489, 13490,
+ 13491, 13492, 13493, 13495, 13497, 13499
+};
+
+static unsigned char label_array[] = {
+ 0xFE, 0xF9, 0xF8, 0xF4, 0xE7, 0xE6, 0xE4, 0xE3, 0xE2, 0xD9, 0xD7, 0xD4, 0xD3,
+ 0xD2, 0xD1, 0xC9, 0xC8, 0xC7, 0xC5, 0xC3, 0xC2, 0xC1, 0xB7, 0xB6, 0xB4, 0xB3,
+ 0xAB, 0xA7, 0xA6, 0xA4, 0xA3, 0xA2, 0x9B, 0x99, 0x97, 0x94, 0x93, 0x92, 0x91,
+ 0x89, 0x88, 0x87, 0x85, 0x83, 0x82, 0x81, 0x78, 0x77, 0x75, 0x74, 0x73, 0x72,
+ 0x71, 0x70, 0x6D, 0x6C, 0x6B, 0x6A, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, 0x63,
+ 0x62, 0x61, 0x58, 0x57, 0x55, 0x54, 0x53, 0x52, 0x50, 0x4D, 0x4C, 0x4B, 0x4A,
+ 0x49, 0x48, 0x47, 0x45, 0x43, 0x42, 0x41, 0x39, 0x38, 0x34, 0x1B, 0x00, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x37, 0x00, 0x33, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x35, 0x32, 0x31, 0x30, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x39, 0x36, 0x35, 0x33, 0x32, 0x31, 0x30, 0x00, 0x00, 0x35, 0x36, 0x00, 0x00,
+ 0x34, 0x00, 0x30, 0x00, 0x00, 0x47, 0x67, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49,
+ 0x00, 0x64, 0x44, 0x00, 0x6F, 0x4F, 0x00, 0x63, 0x43, 0x00, 0x6E, 0x4E, 0x00,
+ 0x65, 0x45, 0x00, 0x2D, 0x00, 0x64, 0x44, 0x00, 0x72, 0x52, 0x00, 0x61, 0x41,
+ 0x00, 0x64, 0x44, 0x00, 0x6E, 0x4E, 0x00, 0x61, 0x41, 0x00, 0x74, 0x54, 0x00,
+ 0x73, 0x53, 0x00, 0x2D, 0x00, 0x65, 0x45, 0x00, 0x62, 0x42, 0x00, 0x6F, 0x4F,
+ 0x00, 0x00, 0x38, 0x00, 0x00, 0x36, 0x00, 0x00, 0x38, 0x36, 0x00, 0x39, 0x00,
+ 0x31, 0x00, 0x2D, 0x00, 0x34, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x78, 0x58, 0x00,
+ 0x5F, 0x00, 0x69, 0x49, 0x00, 0x73, 0x53, 0x00, 0x00, 0x43, 0x63, 0x00, 0x69,
+ 0x49, 0x00, 0x62, 0x42, 0x00, 0x61, 0x41, 0x69, 0x49, 0x00, 0x69, 0x49, 0x38,
+ 0x00, 0x30, 0x00, 0x37, 0x00, 0x2D, 0x00, 0x6F, 0x4F, 0x00, 0x00, 0x43, 0x63,
+ 0x6D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x72, 0x73, 0x6E, 0x64, 0x53, 0x4E,
+ 0x44, 0x00, 0x00, 0x53, 0x73, 0x00, 0x63, 0x43, 0x00, 0x73, 0x53, 0x00, 0x6B,
+ 0x4B, 0x00, 0x68, 0x48, 0x00, 0x2D, 0x00, 0x35, 0x00, 0x67, 0x47, 0x00, 0x69,
+ 0x49, 0x00, 0x00, 0x38, 0x00, 0x35, 0x00, 0x00, 0x34, 0x00, 0x32, 0x00, 0x00,
+ 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36,
+ 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x00, 0x34, 0x00, 0x31, 0x00, 0x00, 0x31,
+ 0x30, 0x00, 0x30, 0x00, 0x64, 0x44, 0x00, 0x69, 0x49, 0x00, 0x73, 0x53, 0x00,
+ 0x00, 0x45, 0x65, 0x00, 0x73, 0x53, 0x00, 0x65, 0x45, 0x00, 0x6E, 0x4E, 0x00,
+ 0x69, 0x49, 0x00, 0x00, 0x52, 0x72, 0x52, 0x72, 0x53, 0x73, 0x00, 0x00, 0x00,
+ 0x69, 0x67, 0x61, 0x49, 0x47, 0x41, 0x00, 0x00, 0x37, 0x00, 0x33, 0x31, 0x30,
+ 0x00, 0x00, 0x36, 0x00, 0x32, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x33,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x34, 0x30, 0x00, 0x00, 0x00, 0x00,
+ 0x37, 0x30, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x37, 0x00, 0x36, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x34, 0x33, 0x30, 0x00, 0x33, 0x32, 0x00, 0x00, 0x30,
+ 0x00, 0x30, 0x00, 0x00, 0x35, 0x00, 0x37, 0x00, 0x00, 0x39, 0x00, 0x00, 0x39,
+ 0x38, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x31,
+ 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39,
+ 0x38, 0x37, 0x36, 0x35, 0x31, 0x00, 0x00, 0x00, 0x00, 0x35, 0x34, 0x33, 0x00,
+ 0x00, 0x38, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x33, 0x31, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x37, 0x35, 0x34, 0x33,
+ 0x30, 0x39, 0x32, 0x31, 0x2D, 0x64, 0x44, 0x00, 0x72, 0x52, 0x00, 0x61, 0x41,
+ 0x00, 0x64, 0x44, 0x00, 0x6E, 0x4E, 0x00, 0x61, 0x41, 0x00, 0x74, 0x54, 0x00,
+ 0x73, 0x53, 0x00, 0x65, 0x45, 0x00, 0x62, 0x42, 0x00, 0x6F, 0x4F, 0x63, 0x43,
+ 0x00, 0x00, 0x53, 0x73, 0x64, 0x44, 0x35, 0x00, 0x67, 0x47, 0x00, 0x69, 0x49,
+ 0x00, 0x00, 0x52, 0x72, 0x00, 0x00, 0x45, 0x65, 0x00, 0x73, 0x53, 0x00, 0x65,
+ 0x45, 0x00, 0x6E, 0x4E, 0x00, 0x61, 0x41, 0x00, 0x70, 0x50, 0x00, 0x61, 0x41,
+ 0x00, 0x6A, 0x4A, 0x00, 0x54, 0x74, 0x00, 0x6D, 0x4D, 0x00, 0x66, 0x46, 0x00,
+ 0x64, 0x44, 0x00, 0x6B, 0x4B, 0x00, 0x00, 0x48, 0x68, 0x00, 0x00, 0x00, 0x54,
+ 0x74, 0x4B, 0x6B, 0x70, 0x50, 0x00, 0x63, 0x43, 0x00, 0x75, 0x55, 0x00, 0x00,
+ 0x32, 0x00, 0x31, 0x00, 0x33, 0x00, 0x4B, 0x6B, 0x32, 0x00, 0x62, 0x42, 0x00,
+ 0x00, 0x61, 0x41, 0x00, 0x6E, 0x4E, 0x00, 0x61, 0x41, 0x00, 0x6B, 0x4B, 0x00,
+ 0x61, 0x41, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x6B, 0x4B, 0x00, 0x68,
+ 0x48, 0x00, 0x74, 0x54, 0x00, 0x64, 0x44, 0x00, 0x69, 0x49, 0x00, 0x77, 0x57,
+ 0x00, 0x66, 0x46, 0x00, 0x6C, 0x4C, 0x00, 0x00, 0x38, 0x00, 0x6E, 0x4E, 0x00,
+ 0x61, 0x41, 0x00, 0x6D, 0x4D, 0x00, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x00,
+ 0x50, 0x70, 0x61, 0x41, 0x00, 0x39, 0x00, 0x6D, 0x4D, 0x00, 0x00, 0x37, 0x00,
+ 0x34, 0x32, 0x00, 0x30, 0x00, 0x00, 0x38, 0x37, 0x33, 0x00, 0x39, 0x38, 0x37,
+ 0x32, 0x37, 0x35, 0x31, 0x39, 0x36, 0x35, 0x33, 0x31, 0x30, 0x38, 0x34, 0x00,
+ 0x00, 0x39, 0x38, 0x37, 0x36, 0x35, 0x35, 0x33, 0x00, 0x31, 0x30, 0x00, 0x00,
+ 0x69, 0x49, 0x00, 0x61, 0x41, 0x00, 0x68, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x35, 0x30, 0x54, 0x74, 0x32, 0x31, 0x39, 0x38, 0x34, 0x00, 0x00, 0x6D,
+ 0x62, 0x4D, 0x42, 0x30, 0x00, 0x38, 0x00, 0x32, 0x00, 0x31, 0x00, 0x33, 0x00,
+ 0x32, 0x00, 0x62, 0x42, 0x00, 0x67, 0x47, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00,
+ 0x35, 0x33, 0x00, 0x31, 0x00, 0x39, 0x00, 0x35, 0x00, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x72, 0x52, 0x00, 0x00, 0x63, 0x43, 0x00, 0x69, 0x49, 0x00, 0x6C, 0x4C,
+ 0x00, 0x6C, 0x4C, 0x00, 0x69, 0x49, 0x00, 0x72, 0x52, 0x00, 0x79, 0x59, 0x00,
+ 0x00, 0x4B, 0x6B, 0x00, 0x65, 0x45, 0x00, 0x65, 0x45, 0x00, 0x72, 0x52, 0x00,
+ 0x00, 0x57, 0x77, 0x00, 0x65, 0x45, 0x00, 0x72, 0x52, 0x00, 0x62, 0x42, 0x00,
+ 0x45, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x35, 0x34,
+ 0x33, 0x32, 0x68, 0x67, 0x63, 0x61, 0x48, 0x47, 0x43, 0x41, 0x00, 0x6E, 0x4E,
+ 0x00, 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x00, 0x00, 0x6C,
+ 0x4C, 0x38, 0x35, 0x00, 0x6F, 0x4F, 0x00, 0x00, 0x73, 0x62, 0x53, 0x42, 0x00,
+ 0x00, 0x72, 0x52, 0x00, 0x38, 0x00, 0x69, 0x49, 0x00, 0x00, 0x37, 0x00, 0x38,
+ 0x00, 0x39, 0x00, 0x31, 0x00, 0x31, 0x00, 0x30, 0x00, 0x36, 0x00, 0x35, 0x00,
+ 0x63, 0x43, 0x00, 0x00, 0x73, 0x6F, 0x53, 0x4F, 0x43, 0x63, 0x00, 0x69, 0x49,
+ 0x00, 0x74, 0x54, 0x00, 0x6C, 0x4C, 0x00, 0x61, 0x41, 0x00, 0x62, 0x42, 0x00,
+ 0x35, 0x00, 0x37, 0x4C, 0x6C, 0x00, 0x61, 0x41, 0x00, 0x75, 0x55, 0x00, 0x67,
+ 0x47, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x6C, 0x4C, 0x00, 0x69, 0x49,
+ 0x00, 0x74, 0x54, 0x00, 0x6C, 0x4C, 0x00, 0x75, 0x55, 0x00, 0x6D, 0x4D, 0x00,
+ 0x30, 0x57, 0x77, 0x00, 0x65, 0x45, 0x00, 0x72, 0x52, 0x00, 0x62, 0x42, 0x00,
+ 0x65, 0x45, 0x00, 0x68, 0x48, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x74,
+ 0x54, 0x00, 0x61, 0x41, 0x00, 0x6C, 0x4C, 0x00, 0x32, 0x00, 0x34, 0x00, 0x65,
+ 0x45, 0x00, 0x67, 0x47, 0x00, 0x61, 0x41, 0x00, 0x70, 0x50, 0x00, 0x65, 0x45,
+ 0x00, 0x64, 0x44, 0x00, 0x6F, 0x4F, 0x00, 0x00, 0x00, 0x63, 0x43, 0x36, 0x35,
+ 0x32, 0x00, 0x35, 0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x50, 0x38, 0x37, 0x00,
+ 0x63, 0x43, 0x00, 0x00, 0x73, 0x53, 0x00, 0x69, 0x49, 0x00, 0x6A, 0x4A, 0x00,
+ 0x54, 0x74, 0x00, 0x66, 0x46, 0x00, 0x69, 0x49, 0x00, 0x68, 0x48, 0x30, 0x00,
+ 0x32, 0x00, 0x36, 0x00, 0x53, 0x73, 0x00, 0x69, 0x49, 0x00, 0x00, 0x45, 0x65,
+ 0x00, 0x64, 0x44, 0x00, 0x6F, 0x4F, 0x00, 0x63, 0x43, 0x00, 0x69, 0x49, 0x00,
+ 0x00, 0x65, 0x45, 0x00, 0x00, 0x65, 0x45, 0x00, 0x00, 0x4C, 0x6C, 0x42, 0x62,
+ 0x00, 0x36, 0x00, 0x00, 0x65, 0x45, 0x00, 0x00, 0x65, 0x45, 0x00, 0x00, 0x4C,
+ 0x6C, 0x42, 0x62, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x38, 0x33, 0x31, 0x00,
+ 0x66, 0x46, 0x00, 0x00, 0x74, 0x6E, 0x54, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x00, 0x35, 0x00, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x32, 0x31, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00,
+ 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x6C, 0x4C, 0x00, 0x31, 0x00, 0x00, 0x31,
+ 0x33, 0x00, 0x73, 0x53, 0x00, 0x77, 0x57, 0x00, 0x6F, 0x4F, 0x00, 0x64, 0x44,
+ 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x75, 0x74, 0x73, 0x70, 0x6B, 0x69, 0x68,
+ 0x67, 0x65, 0x62, 0x61, 0x57, 0x55, 0x54, 0x53, 0x50, 0x4B, 0x49, 0x48, 0x47,
+ 0x45, 0x42, 0x41, 0x00, 0x00, 0x43, 0x63, 0x00, 0x69, 0x49, 0x00, 0x6C, 0x4C,
+ 0x00, 0x6C, 0x4C, 0x00, 0x69, 0x49, 0x00, 0x72, 0x52, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x79, 0x73, 0x70, 0x68, 0x63, 0x59, 0x53, 0x50, 0x48, 0x43, 0x31, 0x32,
+ 0x00, 0x72, 0x52, 0x45, 0x65, 0x41, 0x61, 0x48, 0x68, 0x4B, 0x6B, 0x53, 0x73,
+ 0x49, 0x69, 0x52, 0x72, 0x42, 0x62, 0x52, 0x72, 0x45, 0x65, 0x54, 0x74, 0x53,
+ 0x73, 0x4C, 0x6C, 0x4F, 0x6F, 0x45, 0x65, 0x00, 0x63, 0x43, 0x00, 0x65, 0x45,
+ 0x00, 0x6F, 0x4F, 0x45, 0x65, 0x52, 0x72, 0x53, 0x73, 0x54, 0x74, 0x55, 0x75,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x79, 0x77, 0x75, 0x74, 0x73, 0x72, 0x6E, 0x69, 0x68, 0x67,
+ 0x66, 0x65, 0x64, 0x63, 0x62, 0x61, 0x59, 0x57, 0x55, 0x54, 0x53, 0x52, 0x4E,
+ 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41, 0x00, 0x2D, 0x43, 0x63,
+ 0x00, 0x69, 0x49, 0x00, 0x6C, 0x4C, 0x00, 0x6C, 0x4C, 0x00, 0x69, 0x49, 0x00,
+ 0x72, 0x52, 0x00, 0x00, 0x79, 0x70, 0x59, 0x50, 0x4F, 0x6F, 0x00, 0x72, 0x52,
+ 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x33, 0x00, 0x37, 0x00,
+ 0x32, 0x00, 0x2D, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65,
+ 0x45, 0x00, 0x2B, 0x00, 0x37, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2D, 0x00, 0x00,
+ 0x4B, 0x6B, 0x65, 0x45, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00,
+ 0x65, 0x45, 0x00, 0x2B, 0x00, 0x34, 0x00, 0x38, 0x00, 0x32, 0x00, 0x2D, 0x00,
+ 0x73, 0x53, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45,
+ 0x00, 0x2B, 0x00, 0x38, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2D, 0x4F, 0x6F, 0x00,
+ 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x37, 0x00,
+ 0x39, 0x00, 0x32, 0x00, 0x2D, 0x00, 0x00, 0x49, 0x69, 0x72, 0x52, 0x4F, 0x6F,
+ 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x35,
+ 0x00, 0x38, 0x00, 0x32, 0x00, 0x2D, 0x00, 0x62, 0x42, 0x4F, 0x6F, 0x00, 0x72,
+ 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x30, 0x00, 0x30,
+ 0x00, 0x35, 0x00, 0x2D, 0x00, 0x6C, 0x4C, 0x00, 0x61, 0x41, 0x00, 0x6E, 0x4E,
+ 0x00, 0x6F, 0x4F, 0x00, 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41, 0x00,
+ 0x6E, 0x4E, 0x00, 0x72, 0x52, 0x00, 0x65, 0x45, 0x00, 0x74, 0x54, 0x4F, 0x6F,
+ 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x31,
+ 0x00, 0x37, 0x00, 0x38, 0x00, 0x2D, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x75,
+ 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x30, 0x00, 0x38, 0x00, 0x32, 0x00,
+ 0x2D, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6E, 0x54, 0x53, 0x4E, 0x41, 0x61, 0x00,
+ 0x6E, 0x4E, 0x00, 0x61, 0x41, 0x00, 0x6B, 0x4B, 0x00, 0x2D, 0x00, 0x70, 0x50,
+ 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2D,
+ 0x00, 0x2D, 0x00, 0x39, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x74, 0x54,
+ 0x00, 0x61, 0x41, 0x6F, 0x4F, 0x65, 0x45, 0x4F, 0x6F, 0x00, 0x72, 0x52, 0x00,
+ 0x75, 0x55, 0x00, 0x65, 0x45, 0x00, 0x2B, 0x00, 0x37, 0x00, 0x33, 0x00, 0x2D,
+ 0x00, 0x73, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x75, 0x73, 0x6E, 0x6C, 0x6A, 0x69, 0x67, 0x66, 0x65, 0x64, 0x63, 0x55,
+ 0x53, 0x4E, 0x4C, 0x4A, 0x49, 0x47, 0x46, 0x45, 0x44, 0x43, 0x00, 0x00, 0x2D,
+ 0x00, 0x63, 0x43, 0x00, 0x69, 0x49, 0x00, 0x64, 0x44, 0x00, 0x63, 0x43, 0x34,
+ 0x38, 0x00, 0x31, 0x00, 0x31, 0x00, 0x2D, 0x00, 0x61, 0x41, 0x00, 0x6D, 0x4D,
+ 0x38, 0x00, 0x32, 0x00, 0x39, 0x00, 0x5F, 0x00, 0x74, 0x54, 0x00, 0x6F, 0x4F,
+ 0x4E, 0x6E, 0x50, 0x70, 0x3E, 0x00, 0x68, 0x48, 0x00, 0x00, 0x00, 0x74, 0x6B,
+ 0x6A, 0x63, 0x54, 0x4B, 0x4A, 0x43, 0x00, 0x74, 0x54, 0x2D, 0x00, 0x63, 0x43,
+ 0x5F, 0x00, 0x72, 0x52, 0x00, 0x6F, 0x4F, 0x00, 0x66, 0x46, 0x00, 0x5F, 0x00,
+ 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x6D, 0x4D, 0x00, 0x72, 0x52, 0x00, 0x6F,
+ 0x4F, 0x00, 0x66, 0x46, 0x00, 0x5F, 0x00, 0x64, 0x44, 0x00, 0x65, 0x45, 0x00,
+ 0x6B, 0x4B, 0x00, 0x63, 0x43, 0x00, 0x61, 0x41, 0x00, 0x70, 0x50, 0x00, 0x5F,
+ 0x00, 0x65, 0x45, 0x00, 0x64, 0x44, 0x00, 0x6F, 0x4F, 0x00, 0x63, 0x43, 0x00,
+ 0x5F, 0x00, 0x78, 0x58, 0x00, 0x69, 0x49, 0x00, 0x6E, 0x4E, 0x00, 0x75, 0x55,
+ 0x00, 0x5F, 0x00, 0x64, 0x44, 0x00, 0x65, 0x45, 0x00, 0x64, 0x44, 0x00, 0x6E,
+ 0x4E, 0x00, 0x65, 0x45, 0x00, 0x74, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
+ 0x75, 0x6C, 0x63, 0x62, 0x58, 0x55, 0x4C, 0x43, 0x42, 0x2D, 0x00, 0x32, 0x00,
+ 0x31, 0x00, 0x33, 0x00, 0x32, 0x00, 0x4B, 0x6B, 0x5F, 0x32, 0x00, 0x38, 0x00,
+ 0x6B, 0x4B, 0x00, 0x65, 0x45, 0x00, 0x65, 0x45, 0x00, 0x00, 0x72, 0x62, 0x52,
+ 0x42, 0x2D, 0x00, 0x70, 0x65, 0x50, 0x45, 0x30, 0x33, 0x34, 0x38, 0x39, 0x00,
+ 0x00, 0x00, 0x39, 0x36, 0x31, 0x30, 0x00, 0x33, 0x31, 0x00, 0x00, 0x00, 0x00,
+ 0x38, 0x32, 0x37, 0x35, 0x31, 0x30, 0x39, 0x35, 0x34, 0x32, 0x31, 0x31, 0x30,
+ 0x33, 0x36, 0x38, 0x35, 0x34, 0x30, 0x38, 0x37, 0x35, 0x39, 0x33, 0x37, 0x36,
+ 0x35, 0x39, 0x38, 0x30, 0x33, 0x32, 0x31, 0x34, 0x34, 0x32, 0x30, 0x33, 0x31,
+ 0x36, 0x35, 0x37, 0x38, 0x39, 0x30, 0x33, 0x31, 0x32, 0x36, 0x39, 0x37, 0x34,
+ 0x30, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x36, 0x35, 0x34, 0x33, 0x32,
+ 0x31, 0x30, 0x31, 0x30, 0x32, 0x00, 0x30, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34,
+ 0x33, 0x32, 0x31, 0x30, 0x00, 0x35, 0x00, 0x00, 0x00, 0x32, 0x31, 0x30, 0x00,
+ 0x38, 0x36, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x39, 0x34, 0x37, 0x36, 0x38,
+ 0x35, 0x33, 0x32, 0x31, 0x00, 0x2D, 0x00, 0x61, 0x41, 0x00, 0x6E, 0x4E, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x36, 0x37, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x37, 0x36, 0x33, 0x32, 0x31, 0x30, 0x31, 0x00, 0x00, 0x39, 0x38, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39,
+ 0x38, 0x35, 0x34, 0x32, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35,
+ 0x34, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x33, 0x32, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x33, 0x32, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x37, 0x36, 0x35,
+ 0x34, 0x33, 0x00, 0x00, 0x00, 0x00, 0x34, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x34, 0x36, 0x35, 0x33, 0x32, 0x31, 0x31, 0x33, 0x38, 0x33, 0x35, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+ 0x32, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x31, 0x00, 0x00, 0x38, 0x00, 0x00,
+ 0x00, 0x36, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33,
+ 0x32, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x37, 0x35, 0x33, 0x30,
+ 0x00, 0x00, 0x00, 0x00, 0x34, 0x31, 0x00, 0x32, 0x38, 0x00, 0x38, 0x00, 0x00,
+ 0x33, 0x34, 0x00, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36,
+ 0x38, 0x33, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x39, 0x32, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36, 0x34, 0x31, 0x00, 0x00, 0x34, 0x00,
+ 0x35, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x33, 0x32, 0x31, 0x30,
+ 0x00, 0x00, 0x36, 0x00, 0x34, 0x00, 0x00, 0x00, 0x36, 0x35, 0x00, 0x00, 0x39,
+ 0x00, 0x30, 0x00, 0x35, 0x34, 0x30, 0x37, 0x00, 0x00, 0x39, 0x37, 0x38, 0x35,
+ 0x00, 0x00, 0x00, 0x00, 0x31, 0x30, 0x32, 0x00, 0x32, 0x00, 0x37, 0x00, 0x00,
+ 0x37, 0x36, 0x33, 0x30, 0x00, 0x00, 0x36, 0x00, 0x37, 0x39, 0x00, 0x00, 0x38,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x32, 0x31, 0x00, 0x00, 0x00, 0x00,
+ 0x35, 0x30, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x37, 0x36, 0x35, 0x34,
+ 0x00, 0x00, 0x32, 0x39, 0x33, 0x00, 0x00, 0x36, 0x00, 0x00, 0x35, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x34, 0x33, 0x32, 0x30,
+ 0x00, 0x00, 0x00, 0x30, 0x35, 0x33, 0x32, 0x00, 0x00, 0x33, 0x00, 0x32, 0x39,
+ 0x38, 0x37, 0x36, 0x34, 0x30, 0x00, 0x00, 0x35, 0x34, 0x38, 0x00, 0x37, 0x00,
+ 0x00, 0x35, 0x00, 0x34, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x34,
+ 0x33, 0x31, 0x30, 0x00, 0x00, 0x32, 0x00, 0x35, 0x00, 0x39, 0x00, 0x00, 0x31,
+ 0x00, 0x00, 0x34, 0x00, 0x00, 0x35, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00,
+ 0x34, 0x33, 0x32, 0x31, 0x00, 0x32, 0x00, 0x00, 0x32, 0x31, 0x00, 0x00, 0x30,
+ 0x00, 0x00, 0x37, 0x00, 0x00, 0x37, 0x33, 0x32, 0x39, 0x33, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x37, 0x36, 0x35, 0x33, 0x37, 0x35, 0x32,
+ 0x31, 0x30, 0x38, 0x00, 0x00, 0x00, 0x32, 0x00, 0x39, 0x36, 0x35, 0x33, 0x32,
+ 0x30, 0x38, 0x34, 0x31, 0x00, 0x00, 0x31, 0x30, 0x34, 0x38, 0x35, 0x00, 0x00,
+ 0x31, 0x37, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x39, 0x37, 0x36,
+ 0x35, 0x33, 0x31, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00,
+ 0x36, 0x00, 0x00, 0x00, 0x34, 0x36, 0x35, 0x33, 0x38, 0x36, 0x34, 0x33, 0x32,
+ 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x33, 0x31, 0x30,
+ 0x38, 0x37, 0x36, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36,
+ 0x35, 0x34, 0x33, 0x32, 0x30, 0x00, 0x39, 0x38, 0x37, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x39, 0x37, 0x36, 0x34, 0x32, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37,
+ 0x36, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x35, 0x34, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x54, 0x39,
+ 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x31, 0x30, 0x30, 0x37,
+ 0x00, 0x00, 0x33, 0x30, 0x36, 0x38, 0x37, 0x33, 0x35, 0x34, 0x30, 0x37, 0x30,
+ 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x35, 0x30, 0x31, 0x37, 0x00, 0x00,
+ 0x36, 0x30, 0x34, 0x33, 0x30, 0x37, 0x00, 0x00, 0x33, 0x32, 0x30, 0x00, 0x30,
+ 0x30, 0x37, 0x35, 0x00, 0x00, 0x00, 0x37, 0x33, 0x32, 0x39, 0x33, 0x38, 0x33,
+ 0x35, 0x36, 0x37, 0x37, 0x35, 0x32, 0x31, 0x30, 0x38, 0x39, 0x36, 0x35, 0x33,
+ 0x32, 0x31, 0x30, 0x38, 0x34, 0x34, 0x38, 0x31, 0x30, 0x35, 0x30, 0x37, 0x31,
+ 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36, 0x35,
+ 0x33, 0x31, 0x34, 0x35, 0x33, 0x35, 0x34, 0x33, 0x32, 0x36, 0x38, 0x30, 0x33,
+ 0x31, 0x34, 0x32, 0x36, 0x37, 0x38, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x33, 0x32, 0x34, 0x36, 0x37, 0x39, 0x30, 0x31, 0x36, 0x37, 0x38,
+ 0x39, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37,
+ 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x30, 0x38, 0x39, 0x30,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x36, 0x35, 0x37, 0x37,
+ 0x30, 0x31, 0x32, 0x33, 0x36, 0x31, 0x39, 0x38, 0x37, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x35, 0x34, 0x32, 0x31, 0x30, 0x32, 0x34,
+ 0x35, 0x32, 0x33, 0x39, 0x30, 0x32, 0x33, 0x37, 0x39, 0x38, 0x37, 0x36, 0x35,
+ 0x34, 0x33, 0x32, 0x31, 0x30, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x30, 0x34,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x38,
+ 0x33, 0x31, 0x35, 0x33, 0x30, 0x32, 0x31, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
+ 0x36, 0x35, 0x30, 0x31, 0x32, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x37,
+ 0x35, 0x33, 0x30, 0x33, 0x34, 0x35, 0x33, 0x36, 0x33, 0x30, 0x31, 0x38, 0x32,
+ 0x39, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36, 0x00, 0x00, 0x00, 0x00,
+ 0x33, 0x32, 0x31, 0x30, 0x36, 0x00, 0x39, 0x38, 0x31, 0x32, 0x33, 0x30, 0x35,
+ 0x31, 0x00, 0x00, 0x00, 0x00, 0x37, 0x36, 0x35, 0x34, 0x00, 0x00, 0x39, 0x33,
+ 0x36, 0x35, 0x30, 0x32, 0x33, 0x34, 0x35, 0x00, 0x00, 0x00, 0x35, 0x33, 0x32,
+ 0x33, 0x00, 0x32, 0x39, 0x38, 0x37, 0x36, 0x34, 0x30, 0x00, 0x00, 0x35, 0x34,
+ 0x38, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x34, 0x33, 0x31, 0x30, 0x32, 0x00,
+ 0x31, 0x00, 0x36, 0x30, 0x36, 0x36, 0x00, 0x00, 0x00, 0x36, 0x35, 0x33, 0x39,
+ 0x38, 0x37, 0x00, 0x34, 0x00, 0x00, 0x34, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x39, 0x38, 0x35, 0x34, 0x31, 0x30, 0x38, 0x00, 0x30, 0x00, 0x37, 0x31,
+ 0x34, 0x00, 0x32, 0x38, 0x00, 0x38, 0x00, 0x00, 0x34, 0x31, 0x34, 0x00, 0x35,
+ 0x00, 0x33, 0x00, 0x00, 0x00, 0x37, 0x33, 0x32, 0x36, 0x00, 0x34, 0x00, 0x35,
+ 0x39, 0x00, 0x30, 0x00, 0x37, 0x00, 0x00, 0x38, 0x35, 0x32, 0x00, 0x32, 0x00,
+ 0x37, 0x00, 0x33, 0x35, 0x00, 0x34, 0x00, 0x33, 0x00, 0x37, 0x32, 0x00, 0x35,
+ 0x00, 0x39, 0x31, 0x34, 0x35, 0x35, 0x00, 0x00, 0x00, 0x00, 0x34, 0x33, 0x32,
+ 0x31, 0x00, 0x32, 0x00, 0x00, 0x32, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x36, 0x35, 0x33, 0x32, 0x31, 0x30, 0x00, 0x64, 0x44, 0x00, 0x69, 0x49, 0x00,
+ 0x73, 0x53, 0x00, 0x63, 0x43, 0x00, 0x00, 0x00, 0x63, 0x43, 0x39, 0x38, 0x37,
+ 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2D, 0x00, 0x6D, 0x4D, 0x32, 0x00, 0x2D,
+ 0x00, 0x73, 0x53, 0x00, 0x63, 0x43, 0x00, 0x75, 0x55, 0x00, 0x2D, 0x00, 0x36,
+ 0x00, 0x34, 0x00, 0x36, 0x00, 0x30, 0x31, 0x00, 0x2D, 0x00, 0x6E, 0x4E, 0x00,
+ 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x6C, 0x4C, 0x00, 0x2D,
+ 0x00, 0x31, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x2D, 0x00, 0x73, 0x53, 0x00, 0x77,
+ 0x57, 0x00, 0x6F, 0x4F, 0x00, 0x64, 0x44, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49,
+ 0x00, 0x77, 0x57, 0x00, 0x00, 0x35, 0x33, 0x2D, 0x32, 0x00, 0x2D, 0x00, 0x6E,
+ 0x4E, 0x00, 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41, 0x00, 0x6C, 0x4C,
+ 0x00, 0x2D, 0x00, 0x73, 0x53, 0x00, 0x77, 0x57, 0x00, 0x6F, 0x4F, 0x00, 0x64,
+ 0x44, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x77, 0x57, 0x00, 0x00, 0x2D,
+ 0x00, 0x00, 0x36, 0x37, 0x38, 0x39, 0x34, 0x33, 0x35, 0x32, 0x31, 0x00, 0x2D,
+ 0x00, 0x39, 0x00, 0x35, 0x00, 0x38, 0x30, 0x39, 0x31, 0x30, 0x37, 0x36, 0x38,
+ 0x38, 0x39, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x34, 0x32, 0x31, 0x30,
+ 0x00, 0x36, 0x35, 0x31, 0x00, 0x2D, 0x00, 0x72, 0x52, 0x00, 0x00, 0x00, 0x69,
+ 0x49, 0x38, 0x31, 0x53, 0x73, 0x00, 0x75, 0x55, 0x00, 0x2D, 0x00, 0x36, 0x00,
+ 0x34, 0x31, 0x00, 0x39, 0x00, 0x39, 0x00, 0x31, 0x00, 0x3A, 0x00, 0x76, 0x56,
+ 0x00, 0x72, 0x52, 0x00, 0x69, 0x49, 0x00, 0x2E, 0x00, 0x36, 0x00, 0x34, 0x37,
+ 0x00, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x35, 0x3A, 0x37, 0x00, 0x38,
+ 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x3A, 0x38, 0x00, 0x38, 0x00, 0x39, 0x00,
+ 0x31, 0x00, 0x00, 0x3A, 0x38, 0x00, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00,
+ 0x3A, 0x38, 0x00, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x3A, 0x37, 0x00,
+ 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x3A, 0x37, 0x00, 0x38, 0x00, 0x39,
+ 0x00, 0x31, 0x00, 0x00, 0x3A, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x3A,
+ 0x39, 0x00, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33,
+ 0x32, 0x31, 0x00, 0x2D, 0x00, 0x39, 0x00, 0x35, 0x00, 0x38, 0x00, 0x00, 0x38,
+ 0x36, 0x00, 0x00, 0x00, 0x5F, 0x36, 0x2D, 0x00, 0x6F, 0x4F, 0x00, 0x00, 0x00,
+ 0x73, 0x62, 0x61, 0x53, 0x42, 0x41, 0x31, 0x00, 0x30, 0x00, 0x32, 0x00, 0x30,
+ 0x00, 0x58, 0x78, 0x00, 0x5F, 0x00, 0x73, 0x53, 0x00, 0x69, 0x49, 0x2D, 0x00,
+ 0x38, 0x4E, 0x6E, 0x00, 0x61, 0x41, 0x00, 0x65, 0x45, 0x00, 0x00, 0x72, 0x69,
+ 0x52, 0x49, 0x31, 0x00, 0x30, 0x00, 0x36, 0x00, 0x35, 0x00, 0x5F, 0x39, 0x37,
+ 0x00, 0x38, 0x00, 0x39, 0x00, 0x31, 0x00, 0x2D, 0x00, 0x31, 0x00, 0x30, 0x00,
+ 0x36, 0x00, 0x35, 0x00, 0x5F, 0x00, 0x63, 0x43, 0x00, 0x00, 0x63, 0x5F, 0x43,
+ 0x00, 0x00, 0x73, 0x6F, 0x53, 0x4F, 0x39, 0x00, 0x31, 0x35, 0x34, 0x33, 0x32,
+ 0x2D, 0x00, 0x6E, 0x4E, 0x00, 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x61, 0x41,
+ 0x35, 0x34, 0x33, 0x32, 0x31, 0x33, 0x49, 0x69, 0x00, 0x6A, 0x4A, 0x00, 0x6E,
+ 0x4E, 0x00, 0x61, 0x41, 0x00, 0x6B, 0x4B, 0x00, 0x00, 0x39, 0x5F, 0x00, 0x73,
+ 0x53, 0x6F, 0x4F, 0x00, 0x72, 0x52, 0x00, 0x75, 0x55, 0x00, 0x65, 0x45, 0x00,
+ 0x2B, 0x00, 0x30, 0x00, 0x35, 0x00, 0x38, 0x00, 0x2D, 0x00, 0x6C, 0x4C, 0x00,
+ 0x61, 0x41, 0x00, 0x75, 0x55, 0x00, 0x67, 0x47, 0x00, 0x6E, 0x4E, 0x00, 0x69,
+ 0x49, 0x00, 0x6C, 0x4C, 0x00, 0x69, 0x49, 0x00, 0x74, 0x54, 0x00, 0x6C, 0x4C,
+ 0x00, 0x75, 0x55, 0x00, 0x6D, 0x4D, 0x00, 0x2D, 0x00, 0x63, 0x43, 0x6F, 0x4F,
+ 0x38, 0x5F, 0x00, 0x74, 0x54, 0x00, 0x66, 0x46, 0x00, 0x69, 0x49, 0x00, 0x68,
+ 0x48, 0x2D, 0x00, 0x73, 0x53, 0x00, 0x69, 0x49, 0x32, 0x2D, 0x00, 0x73, 0x53,
+ 0x73, 0x53, 0x00, 0x61, 0x41, 0x00, 0x00, 0x2D, 0x6C, 0x62, 0x4C, 0x42, 0x2D,
+ 0x00, 0x36, 0x6C, 0x62, 0x4C, 0x42, 0x2D, 0x00, 0x32, 0x00, 0x00, 0x38, 0x33,
+ 0x31, 0x00, 0x38, 0x33, 0x31, 0x2D, 0x00, 0x66, 0x46, 0x00, 0x00, 0x00, 0x74,
+ 0x73, 0x63, 0x54, 0x53, 0x43, 0x39, 0x31, 0x00, 0x2D, 0x00, 0x73, 0x53, 0x00,
+ 0x77, 0x57, 0x00, 0x6F, 0x4F, 0x00, 0x64, 0x44, 0x00, 0x6E, 0x4E, 0x00, 0x69,
+ 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28,
+ 0x30, 0x31, 0x32, 0x35, 0x37, 0x42, 0x28, 0x30, 0x31, 0x32, 0x33, 0x35, 0x36,
+ 0x39, 0x42, 0x28, 0x1B, 0x1B, 0x35, 0x36, 0x42, 0x28, 0x34, 0x42, 0x28, 0x1B,
+ 0x30, 0x42, 0x28, 0x47, 0x67, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B,
+ 0x69, 0x49, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42,
+ 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x65,
+ 0x45, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B,
+ 0x72, 0x52, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x74,
+ 0x54, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B,
+ 0x65, 0x45, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42,
+ 0x28, 0x38, 0x42, 0x28, 0x36, 0x42, 0x28, 0x1B, 0x1B, 0x38, 0x36, 0x42, 0x28,
+ 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B,
+ 0x34, 0x42, 0x28, 0x1B, 0x2E, 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x78,
+ 0x58, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B,
+ 0x73, 0x53, 0x42, 0x28, 0x43, 0x63, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x49, 0x69, 0x42,
+ 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28,
+ 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28,
+ 0x1B, 0x1B, 0x43, 0x63, 0x6D, 0x4D, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x52,
+ 0x72, 0x73, 0x6E, 0x64, 0x53, 0x4E, 0x44, 0x42, 0x28, 0x53, 0x73, 0x42, 0x28,
+ 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x6B, 0x4B,
+ 0x42, 0x28, 0x1B, 0x68, 0x48, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x35,
+ 0x42, 0x28, 0x1B, 0x67, 0x47, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x38,
+ 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x34, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28,
+ 0x1B, 0x1B, 0x39, 0x38, 0x42, 0x28, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x37, 0x38, 0x39, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28,
+ 0x1B, 0x1B, 0x31, 0x30, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x64, 0x44,
+ 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x45,
+ 0x65, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28,
+ 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x52, 0x72, 0x42,
+ 0x28, 0x52, 0x72, 0x42, 0x28, 0x53, 0x73, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x69,
+ 0x67, 0x61, 0x49, 0x47, 0x41, 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B, 0x33, 0x31,
+ 0x30, 0x42, 0x28, 0x36, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x30, 0x42,
+ 0x28, 0x33, 0x38, 0x42, 0x28, 0x30, 0x34, 0x35, 0x42, 0x28, 0x30, 0x37, 0x42,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B,
+ 0x36, 0x42, 0x28, 0x30, 0x33, 0x34, 0x42, 0x28, 0x1B, 0x33, 0x32, 0x42, 0x28,
+ 0x30, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x35, 0x42, 0x28, 0x1B, 0x37, 0x42,
+ 0x28, 0x39, 0x42, 0x28, 0x30, 0x31, 0x32, 0x33, 0x35, 0x36, 0x39, 0x38, 0x34,
+ 0x42, 0x28, 0x30, 0x31, 0x42, 0x28, 0x30, 0x42, 0x28, 0x31, 0x42, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x35, 0x31, 0x42, 0x28, 0x34,
+ 0x33, 0x35, 0x42, 0x28, 0x38, 0x42, 0x28, 0x36, 0x42, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x33, 0x31, 0x30, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x38, 0x37, 0x35, 0x34, 0x33, 0x30, 0x39, 0x32, 0x31, 0x2D, 0x42,
+ 0x28, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x61, 0x41,
+ 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B,
+ 0x61, 0x41, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42,
+ 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x6F,
+ 0x4F, 0x42, 0x28, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x1B, 0x53, 0x73, 0x64, 0x44,
+ 0x42, 0x28, 0x35, 0x42, 0x28, 0x1B, 0x67, 0x47, 0x42, 0x28, 0x1B, 0x69, 0x49,
+ 0x42, 0x28, 0x52, 0x72, 0x42, 0x28, 0x45, 0x65, 0x42, 0x28, 0x1B, 0x73, 0x53,
+ 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B,
+ 0x61, 0x41, 0x42, 0x28, 0x1B, 0x70, 0x50, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42,
+ 0x28, 0x1B, 0x6A, 0x4A, 0x42, 0x28, 0x1B, 0x54, 0x74, 0x42, 0x28, 0x1B, 0x6D,
+ 0x4D, 0x42, 0x28, 0x1B, 0x66, 0x46, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28,
+ 0x1B, 0x6B, 0x4B, 0x42, 0x28, 0x48, 0x68, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x54,
+ 0x74, 0x4B, 0x6B, 0x70, 0x50, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B,
+ 0x75, 0x55, 0x42, 0x28, 0x32, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x33,
+ 0x42, 0x28, 0x1B, 0x4B, 0x6B, 0x32, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28,
+ 0x41, 0x61, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42,
+ 0x28, 0x1B, 0x6B, 0x4B, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x74,
+ 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6B, 0x4B, 0x42, 0x28,
+ 0x1B, 0x68, 0x48, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x64, 0x44,
+ 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B,
+ 0x66, 0x46, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B,
+ 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42,
+ 0x28, 0x1B, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x1B,
+ 0x50, 0x70, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x6D, 0x4D,
+ 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B, 0x34, 0x32, 0x42, 0x28, 0x1B, 0x30, 0x42,
+ 0x28, 0x33, 0x38, 0x37, 0x42, 0x28, 0x1B, 0x39, 0x38, 0x37, 0x42, 0x28, 0x32,
+ 0x42, 0x28, 0x31, 0x35, 0x37, 0x42, 0x28, 0x30, 0x31, 0x33, 0x35, 0x36, 0x39,
+ 0x38, 0x34, 0x42, 0x28, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x35, 0x42, 0x28,
+ 0x33, 0x35, 0x42, 0x28, 0x1B, 0x31, 0x30, 0x42, 0x28, 0x49, 0x69, 0x42, 0x28,
+ 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x68, 0x48, 0x42, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x35, 0x30, 0x54, 0x74, 0x32, 0x31, 0x39, 0x38, 0x34, 0x42,
+ 0x28, 0x1B, 0x1B, 0x6D, 0x62, 0x4D, 0x42, 0x42, 0x28, 0x30, 0x42, 0x28, 0x1B,
+ 0x38, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x33,
+ 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x67,
+ 0x47, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x33, 0x35, 0x42, 0x28, 0x1B, 0x31,
+ 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x72, 0x52, 0x42, 0x28, 0x43, 0x63, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x79, 0x59, 0x42, 0x28,
+ 0x4B, 0x6B, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42,
+ 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x57, 0x77, 0x42, 0x28, 0x1B, 0x65, 0x45,
+ 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B,
+ 0x45, 0x65, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35,
+ 0x68, 0x67, 0x63, 0x61, 0x48, 0x47, 0x43, 0x41, 0x42, 0x28, 0x1B, 0x6E, 0x4E,
+ 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B,
+ 0x61, 0x41, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x6C, 0x4C, 0x38, 0x35, 0x42, 0x28,
+ 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x1B, 0x73, 0x62, 0x53, 0x42, 0x42, 0x28,
+ 0x52, 0x72, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x37, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31,
+ 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x36, 0x42,
+ 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x1B, 0x73,
+ 0x6F, 0x53, 0x4F, 0x42, 0x28, 0x43, 0x63, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x61,
+ 0x41, 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B,
+ 0x37, 0x42, 0x28, 0x4C, 0x6C, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B,
+ 0x75, 0x55, 0x42, 0x28, 0x1B, 0x67, 0x47, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42,
+ 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42, 0x28, 0x1B, 0x30, 0x42,
+ 0x28, 0x57, 0x77, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x72, 0x52,
+ 0x42, 0x28, 0x1B, 0x62, 0x42, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B,
+ 0x68, 0x48, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6C,
+ 0x4C, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B, 0x65,
+ 0x45, 0x42, 0x28, 0x1B, 0x67, 0x47, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28,
+ 0x1B, 0x70, 0x50, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x64, 0x44,
+ 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x63, 0x43, 0x36,
+ 0x35, 0x42, 0x28, 0x32, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x70, 0x50, 0x38, 0x37, 0x42, 0x28, 0x1B, 0x63, 0x43,
+ 0x42, 0x28, 0x53, 0x73, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x6A,
+ 0x4A, 0x42, 0x28, 0x1B, 0x54, 0x74, 0x42, 0x28, 0x1B, 0x66, 0x46, 0x42, 0x28,
+ 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x68, 0x48, 0x42, 0x28, 0x30, 0x42, 0x28,
+ 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x1B, 0x53, 0x73, 0x42, 0x28,
+ 0x1B, 0x69, 0x49, 0x42, 0x28, 0x45, 0x65, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42,
+ 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x45, 0x65, 0x42, 0x28, 0x45, 0x65, 0x42, 0x28, 0x1B, 0x1B,
+ 0x4C, 0x6C, 0x42, 0x62, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x45, 0x65, 0x42,
+ 0x28, 0x45, 0x65, 0x42, 0x28, 0x1B, 0x1B, 0x4C, 0x6C, 0x42, 0x62, 0x42, 0x28,
+ 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x1B, 0x38, 0x33, 0x31, 0x42, 0x28, 0x1B, 0x66,
+ 0x46, 0x42, 0x28, 0x1B, 0x1B, 0x74, 0x6E, 0x54, 0x4E, 0x42, 0x28, 0x30, 0x31,
+ 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28,
+ 0x1B, 0x32, 0x42, 0x28, 0x31, 0x32, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28,
+ 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41,
+ 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x1B,
+ 0x31, 0x33, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x77, 0x57, 0x42,
+ 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6E,
+ 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x77, 0x75, 0x74, 0x73, 0x70, 0x6B,
+ 0x69, 0x68, 0x67, 0x65, 0x62, 0x61, 0x57, 0x55, 0x54, 0x53, 0x50, 0x4B, 0x49,
+ 0x48, 0x47, 0x45, 0x42, 0x41, 0x42, 0x28, 0x43, 0x63, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28,
+ 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x79, 0x73, 0x70, 0x68, 0x63, 0x59, 0x53, 0x50, 0x48, 0x43, 0x42,
+ 0x28, 0x31, 0x32, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x45, 0x65, 0x42,
+ 0x28, 0x41, 0x61, 0x48, 0x68, 0x42, 0x28, 0x4B, 0x6B, 0x42, 0x28, 0x53, 0x73,
+ 0x42, 0x28, 0x49, 0x69, 0x52, 0x72, 0x42, 0x28, 0x42, 0x62, 0x52, 0x72, 0x42,
+ 0x28, 0x45, 0x65, 0x42, 0x28, 0x54, 0x74, 0x53, 0x73, 0x42, 0x28, 0x4C, 0x6C,
+ 0x4F, 0x6F, 0x42, 0x28, 0x45, 0x65, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28,
+ 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x45, 0x65, 0x42,
+ 0x28, 0x52, 0x72, 0x42, 0x28, 0x53, 0x73, 0x42, 0x28, 0x54, 0x74, 0x42, 0x28,
+ 0x55, 0x75, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x79, 0x77, 0x75, 0x74, 0x73, 0x72,
+ 0x6E, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, 0x63, 0x62, 0x61, 0x59, 0x57, 0x55,
+ 0x54, 0x53, 0x52, 0x4E, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41,
+ 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x43, 0x63, 0x42, 0x28, 0x1B, 0x69, 0x49,
+ 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B,
+ 0x69, 0x49, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x1B, 0x79, 0x70,
+ 0x59, 0x50, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42,
+ 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42,
+ 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x1B, 0x4B, 0x6B, 0x65, 0x45, 0x42, 0x28, 0x4F,
+ 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28,
+ 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28,
+ 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B,
+ 0x73, 0x53, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42,
+ 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42,
+ 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x1B, 0x49, 0x69, 0x72, 0x52, 0x42, 0x28, 0x4F,
+ 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28,
+ 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28,
+ 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B,
+ 0x62, 0x42, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42,
+ 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28,
+ 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x65, 0x45,
+ 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72,
+ 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28,
+ 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B,
+ 0x38, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72,
+ 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28,
+ 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B,
+ 0x32, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x74, 0x73, 0x6E,
+ 0x54, 0x53, 0x4E, 0x42, 0x28, 0x41, 0x61, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42,
+ 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6B, 0x4B, 0x42, 0x28, 0x1B, 0x2D,
+ 0x42, 0x28, 0x1B, 0x70, 0x50, 0x42, 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72,
+ 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B,
+ 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42,
+ 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x6F, 0x4F, 0x42, 0x28, 0x65, 0x45, 0x42,
+ 0x28, 0x4F, 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55,
+ 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x37,
+ 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53,
+ 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x75, 0x73, 0x6E, 0x6C, 0x6A, 0x69, 0x67, 0x66, 0x65, 0x64, 0x63, 0x55, 0x53,
+ 0x4E, 0x4C, 0x4A, 0x49, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x28, 0x1B, 0x2D,
+ 0x42, 0x28, 0x00, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x34, 0x38, 0x42,
+ 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28,
+ 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42, 0x28, 0x38, 0x42, 0x28,
+ 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B,
+ 0x74, 0x54, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x4E, 0x6E, 0x42, 0x28,
+ 0x50, 0x70, 0x42, 0x28, 0x3E, 0x42, 0x28, 0x1B, 0x68, 0x48, 0x42, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x74, 0x6B, 0x6A, 0x63, 0x54, 0x4B, 0x4A, 0x43, 0x42, 0x28, 0x1B,
+ 0x74, 0x54, 0x2D, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x5F, 0x42, 0x28,
+ 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x66, 0x46,
+ 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61,
+ 0x41, 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28,
+ 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x66, 0x46, 0x42, 0x28, 0x1B, 0x5F, 0x42,
+ 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x6B,
+ 0x4B, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28,
+ 0x1B, 0x70, 0x50, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42,
+ 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x63,
+ 0x43, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x78, 0x58, 0x42, 0x28, 0x1B,
+ 0x69, 0x49, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42,
+ 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x65, 0x45,
+ 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B,
+ 0x65, 0x45, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x78, 0x75, 0x6C, 0x63, 0x62, 0x58, 0x55, 0x4C, 0x43, 0x42, 0x42, 0x28,
+ 0x2D, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x33,
+ 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x4B, 0x6B, 0x5F, 0x32, 0x42, 0x28,
+ 0x00, 0x1B, 0x6B, 0x4B, 0x42, 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x65,
+ 0x45, 0x42, 0x28, 0x1B, 0x1B, 0x72, 0x62, 0x52, 0x42, 0x42, 0x28, 0x2D, 0x42,
+ 0x28, 0x1B, 0x70, 0x65, 0x50, 0x45, 0x42, 0x28, 0x30, 0x42, 0x28, 0x33, 0x34,
+ 0x38, 0x39, 0x42, 0x28, 0x1B, 0x1B, 0x39, 0x36, 0x31, 0x30, 0x42, 0x28, 0x33,
+ 0x31, 0x42, 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x38, 0x32, 0x37, 0x35, 0x31, 0x30,
+ 0x42, 0x28, 0x39, 0x35, 0x34, 0x31, 0x32, 0x42, 0x28, 0x31, 0x30, 0x33, 0x36,
+ 0x42, 0x28, 0x38, 0x35, 0x42, 0x28, 0x30, 0x34, 0x35, 0x37, 0x38, 0x39, 0x33,
+ 0x42, 0x28, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x42,
+ 0x28, 0x30, 0x32, 0x34, 0x33, 0x31, 0x35, 0x36, 0x37, 0x38, 0x39, 0x42, 0x28,
+ 0x30, 0x33, 0x31, 0x32, 0x42, 0x28, 0x36, 0x39, 0x37, 0x34, 0x42, 0x28, 0x30,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x36, 0x35, 0x34, 0x33,
+ 0x32, 0x31, 0x30, 0x42, 0x28, 0x31, 0x30, 0x32, 0x42, 0x28, 0x1B, 0x30, 0x42,
+ 0x28, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x42, 0x28,
+ 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x32, 0x31, 0x30, 0x42, 0x28, 0x38,
+ 0x36, 0x42, 0x28, 0x37, 0x42, 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x1B, 0x1B, 0x39,
+ 0x34, 0x36, 0x37, 0x38, 0x35, 0x33, 0x32, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42,
+ 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x38, 0x39,
+ 0x42, 0x28, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x42,
+ 0x28, 0x36, 0x35, 0x37, 0x42, 0x28, 0x37, 0x30, 0x31, 0x32, 0x33, 0x36, 0x42,
+ 0x28, 0x31, 0x42, 0x28, 0x39, 0x38, 0x42, 0x28, 0x37, 0x38, 0x42, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x35, 0x34, 0x32, 0x31, 0x30,
+ 0x42, 0x28, 0x32, 0x34, 0x35, 0x42, 0x28, 0x32, 0x33, 0x39, 0x42, 0x28, 0x30,
+ 0x32, 0x33, 0x37, 0x42, 0x28, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x42, 0x28,
+ 0x30, 0x34, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x36, 0x35, 0x33,
+ 0x32, 0x31, 0x42, 0x28, 0x31, 0x33, 0x38, 0x42, 0x28, 0x33, 0x35, 0x42, 0x28,
+ 0x32, 0x30, 0x31, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x42, 0x28, 0x38, 0x42,
+ 0x28, 0x1B, 0x36, 0x35, 0x30, 0x42, 0x28, 0x30, 0x31, 0x32, 0x33, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x38, 0x37, 0x35, 0x33, 0x30, 0x42, 0x28, 0x31,
+ 0x34, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x33, 0x34, 0x42, 0x28, 0x35, 0x33, 0x42, 0x28, 0x36, 0x33, 0x30, 0x31,
+ 0x38, 0x42, 0x28, 0x32, 0x39, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x39, 0x38, 0x37, 0x36, 0x34, 0x31, 0x42, 0x28, 0x34, 0x42, 0x28, 0x1B, 0x35,
+ 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x33,
+ 0x32, 0x31, 0x30, 0x42, 0x28, 0x36, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B,
+ 0x36, 0x35, 0x42, 0x28, 0x39, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x30,
+ 0x34, 0x35, 0x37, 0x42, 0x28, 0x1B, 0x1B, 0x39, 0x37, 0x38, 0x35, 0x42, 0x28,
+ 0x30, 0x31, 0x42, 0x28, 0x32, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x37,
+ 0x42, 0x28, 0x1B, 0x1B, 0x37, 0x36, 0x33, 0x30, 0x42, 0x28, 0x36, 0x42, 0x28,
+ 0x1B, 0x37, 0x39, 0x42, 0x28, 0x38, 0x42, 0x28, 0x31, 0x32, 0x33, 0x42, 0x28,
+ 0x30, 0x35, 0x42, 0x28, 0x31, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36,
+ 0x35, 0x34, 0x42, 0x28, 0x1B, 0x1B, 0x32, 0x39, 0x33, 0x42, 0x28, 0x36, 0x42,
+ 0x28, 0x35, 0x42, 0x28, 0x30, 0x32, 0x33, 0x34, 0x35, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x30, 0x35, 0x33, 0x32, 0x42, 0x28, 0x33, 0x42, 0x28, 0x1B, 0x32, 0x42,
+ 0x28, 0x36, 0x37, 0x38, 0x39, 0x42, 0x28, 0x30, 0x34, 0x42, 0x28, 0x1B, 0x1B,
+ 0x35, 0x34, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x35, 0x42,
+ 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x37, 0x34, 0x33, 0x31, 0x30, 0x42, 0x28, 0x32, 0x42, 0x28, 0x1B, 0x35,
+ 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x31, 0x42, 0x28, 0x34, 0x42, 0x28, 0x35,
+ 0x42, 0x28, 0x35, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x33, 0x32, 0x31,
+ 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x1B, 0x32, 0x31, 0x42, 0x28, 0x30,
+ 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B, 0x1B, 0x37, 0x33, 0x32, 0x42, 0x28, 0x39,
+ 0x33, 0x42, 0x28, 0x38, 0x33, 0x35, 0x36, 0x37, 0x42, 0x28, 0x30, 0x31, 0x32,
+ 0x35, 0x37, 0x38, 0x42, 0x28, 0x32, 0x42, 0x28, 0x00, 0x1B, 0x30, 0x32, 0x33,
+ 0x35, 0x36, 0x39, 0x38, 0x34, 0x31, 0x42, 0x28, 0x30, 0x31, 0x34, 0x38, 0x35,
+ 0x42, 0x28, 0x31, 0x37, 0x36, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x38, 0x39, 0x37, 0x36, 0x35, 0x33, 0x31, 0x42, 0x28, 0x30, 0x42, 0x28, 0x36,
+ 0x42, 0x28, 0x36, 0x42, 0x28, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x34, 0x36, 0x35,
+ 0x33, 0x42, 0x28, 0x38, 0x32, 0x33, 0x34, 0x36, 0x35, 0x42, 0x28, 0x34, 0x31,
+ 0x33, 0x30, 0x32, 0x36, 0x37, 0x38, 0x42, 0x28, 0x30, 0x32, 0x33, 0x34, 0x35,
+ 0x36, 0x37, 0x38, 0x39, 0x42, 0x28, 0x37, 0x38, 0x39, 0x42, 0x28, 0x1B, 0x00,
+ 0x33, 0x32, 0x36, 0x37, 0x39, 0x34, 0x42, 0x28, 0x30, 0x31, 0x36, 0x37, 0x38,
+ 0x39, 0x42, 0x28, 0x34, 0x35, 0x42, 0x28, 0x30, 0x42, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30,
+ 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x30, 0x74,
+ 0x54, 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x42, 0x28, 0x31,
+ 0x30, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x33, 0x30, 0x42, 0x28,
+ 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x39,
+ 0x38, 0x37, 0x35, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x36, 0x30,
+ 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x33, 0x32, 0x42, 0x28, 0x42,
+ 0x28, 0x1B, 0x30, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x37, 0x33, 0x32, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x39, 0x38, 0x37, 0x36, 0x35, 0x33, 0x31, 0x42, 0x28, 0x42, 0x28, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x33,
+ 0x32, 0x31, 0x30, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x30, 0x42, 0x28, 0x42, 0x28, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x35, 0x34, 0x32, 0x31, 0x30, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x38, 0x37, 0x35, 0x33, 0x30, 0x42, 0x28, 0x42, 0x28, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36,
+ 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x33, 0x32, 0x31, 0x30, 0x42, 0x28, 0x42,
+ 0x28, 0x1B, 0x39, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x42, 0x28, 0x1B, 0x1B, 0x39,
+ 0x33, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x35,
+ 0x33, 0x32, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x42, 0x28, 0x42,
+ 0x28, 0x1B, 0x1B, 0x35, 0x34, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x33, 0x31, 0x30, 0x42, 0x28, 0x42, 0x28, 0x1B,
+ 0x31, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x36, 0x35, 0x33, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x34, 0x42,
+ 0x28, 0x1B, 0x1B, 0x34, 0x30, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x39, 0x38, 0x35, 0x34, 0x31, 0x30, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x30, 0x42,
+ 0x28, 0x1B, 0x37, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x42, 0x28,
+ 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x1B, 0x34, 0x31, 0x42, 0x28, 0x42, 0x28, 0x1B,
+ 0x35, 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x37, 0x33, 0x32,
+ 0x42, 0x28, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x42,
+ 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B, 0x1B, 0x38, 0x35,
+ 0x42, 0x28, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x37, 0x42, 0x28, 0x1B,
+ 0x33, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28,
+ 0x1B, 0x37, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x39, 0x42,
+ 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x34, 0x33, 0x32, 0x31, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x1B, 0x32,
+ 0x31, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x36, 0x35, 0x33, 0x32,
+ 0x31, 0x30, 0x42, 0x28, 0x1B, 0x64, 0x44, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x63, 0x43, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2D,
+ 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42, 0x28, 0x32, 0x42, 0x28, 0x1B, 0x2D, 0x42,
+ 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28, 0x1B, 0x75,
+ 0x55, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x1B, 0x34,
+ 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x31, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6C,
+ 0x4C, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x2E,
+ 0x42, 0x28, 0x1B, 0x33, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53,
+ 0x42, 0x28, 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B,
+ 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B, 0x33, 0x35, 0x2D, 0x42, 0x28, 0x32,
+ 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28,
+ 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42,
+ 0x28, 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x64,
+ 0x44, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x00, 0x1B, 0x00, 0x1B,
+ 0x36, 0x33, 0x34, 0x39, 0x37, 0x38, 0x35, 0x32, 0x31, 0x42, 0x28, 0x1B, 0x2D,
+ 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x30, 0x31, 0x39, 0x42, 0x28, 0x30, 0x42, 0x28, 0x37, 0x36, 0x42, 0x28,
+ 0x38, 0x42, 0x28, 0x38, 0x39, 0x34, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x33, 0x34, 0x32, 0x31, 0x30, 0x42, 0x28, 0x1B, 0x36, 0x35, 0x31, 0x42, 0x28,
+ 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x69,
+ 0x49, 0x38, 0x31, 0x42, 0x28, 0x53, 0x73, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42,
+ 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28,
+ 0x31, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31,
+ 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x1B, 0x76, 0x56, 0x42, 0x28, 0x1B, 0x72,
+ 0x52, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x2E, 0x42, 0x28, 0x1B,
+ 0x36, 0x42, 0x28, 0x1B, 0x34, 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x35, 0x3A, 0x42,
+ 0x28, 0x37, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B,
+ 0x31, 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B, 0x38, 0x42,
+ 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28,
+ 0x38, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31,
+ 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x38, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28,
+ 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x37,
+ 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42,
+ 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x37, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B,
+ 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x38, 0x42,
+ 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28,
+ 0x39, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31,
+ 0x42, 0x28, 0x1B, 0x3A, 0x42, 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00,
+ 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x39, 0x38,
+ 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28,
+ 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B,
+ 0x1B, 0x38, 0x36, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x5F, 0x36, 0x2D, 0x42, 0x28,
+ 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B, 0x1B, 0x1B, 0x73, 0x62, 0x61, 0x53, 0x42,
+ 0x41, 0x42, 0x28, 0x31, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x32, 0x42,
+ 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x58, 0x78, 0x42, 0x28, 0x1B, 0x5F, 0x42,
+ 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x2D, 0x42,
+ 0x28, 0x1B, 0x38, 0x42, 0x28, 0x4E, 0x6E, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42,
+ 0x28, 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x1B, 0x72, 0x69, 0x52, 0x49, 0x42,
+ 0x28, 0x31, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x1B,
+ 0x35, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x39, 0x37, 0x42, 0x28, 0x1B, 0x38,
+ 0x42, 0x28, 0x1B, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42,
+ 0x28, 0x1B, 0x31, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28,
+ 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x5F, 0x42, 0x28, 0x1B, 0x63, 0x43, 0x42, 0x28,
+ 0x1B, 0x1B, 0x63, 0x5F, 0x43, 0x42, 0x28, 0x1B, 0x1B, 0x73, 0x6F, 0x53, 0x4F,
+ 0x42, 0x28, 0x39, 0x42, 0x28, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35, 0x2D, 0x42,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28, 0x1B, 0x74,
+ 0x54, 0x42, 0x28, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35, 0x61, 0x41, 0x42, 0x28,
+ 0x33, 0x42, 0x28, 0x49, 0x69, 0x42, 0x28, 0x1B, 0x6A, 0x4A, 0x42, 0x28, 0x1B,
+ 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x6B, 0x4B, 0x42,
+ 0x28, 0x1B, 0x1B, 0x39, 0x5F, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28, 0x4F,
+ 0x6F, 0x42, 0x28, 0x1B, 0x72, 0x52, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42, 0x28,
+ 0x1B, 0x65, 0x45, 0x42, 0x28, 0x1B, 0x2B, 0x42, 0x28, 0x1B, 0x30, 0x42, 0x28,
+ 0x1B, 0x35, 0x42, 0x28, 0x1B, 0x38, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B,
+ 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x75, 0x55, 0x42,
+ 0x28, 0x1B, 0x67, 0x47, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69,
+ 0x49, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x1B, 0x74, 0x54, 0x42, 0x28, 0x1B, 0x6C, 0x4C, 0x42, 0x28, 0x1B, 0x75, 0x55,
+ 0x42, 0x28, 0x1B, 0x6D, 0x4D, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x63,
+ 0x43, 0x42, 0x28, 0x38, 0x6F, 0x4F, 0x42, 0x28, 0x5F, 0x42, 0x28, 0x1B, 0x74,
+ 0x54, 0x42, 0x28, 0x1B, 0x66, 0x46, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42, 0x28,
+ 0x1B, 0x68, 0x48, 0x42, 0x28, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42, 0x28,
+ 0x1B, 0x69, 0x49, 0x42, 0x28, 0x32, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53, 0x42,
+ 0x28, 0x73, 0x53, 0x42, 0x28, 0x1B, 0x61, 0x41, 0x42, 0x28, 0x1B, 0x2D, 0x42,
+ 0x28, 0x6C, 0x62, 0x4C, 0x42, 0x2D, 0x42, 0x28, 0x1B, 0x36, 0x42, 0x28, 0x6C,
+ 0x62, 0x4C, 0x42, 0x2D, 0x42, 0x28, 0x1B, 0x32, 0x42, 0x28, 0x1B, 0x1B, 0x38,
+ 0x33, 0x31, 0x42, 0x28, 0x1B, 0x38, 0x33, 0x31, 0x2D, 0x42, 0x28, 0x1B, 0x66,
+ 0x46, 0x42, 0x28, 0x1B, 0x00, 0x1B, 0x1B, 0x74, 0x73, 0x63, 0x54, 0x53, 0x43,
+ 0x42, 0x28, 0x39, 0x31, 0x42, 0x28, 0x1B, 0x2D, 0x42, 0x28, 0x1B, 0x73, 0x53,
+ 0x42, 0x28, 0x1B, 0x77, 0x57, 0x42, 0x28, 0x1B, 0x6F, 0x4F, 0x42, 0x28, 0x1B,
+ 0x64, 0x44, 0x42, 0x28, 0x1B, 0x6E, 0x4E, 0x42, 0x28, 0x1B, 0x69, 0x49, 0x42,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x35, 0x36, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x30,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A,
+ 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x63,
+ 0x43, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28,
+ 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A,
+ 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6E,
+ 0x4E, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28,
+ 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A,
+ 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x38, 0x36, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x2E,
+ 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x78, 0x58, 0x4A, 0x28, 0x1B, 0x5F,
+ 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B, 0x61,
+ 0x41, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x30, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x6F,
+ 0x4F, 0x4A, 0x28, 0x1B, 0x1B, 0x43, 0x63, 0x6D, 0x4D, 0x4A, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x52, 0x72, 0x73, 0x6E, 0x64, 0x53, 0x4E, 0x44, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x6B,
+ 0x4B, 0x4A, 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B,
+ 0x35, 0x4A, 0x28, 0x1B, 0x67, 0x47, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x39, 0x38, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x31,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x31, 0x30, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B,
+ 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28,
+ 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x69, 0x67, 0x61, 0x49, 0x47, 0x41, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x33, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32,
+ 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x33, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x35,
+ 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x33,
+ 0x31, 0x30, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x38, 0x37, 0x35, 0x34, 0x33, 0x30, 0x39, 0x32, 0x31, 0x2D, 0x4A, 0x28,
+ 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A,
+ 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x61,
+ 0x41, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28,
+ 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B, 0x6F, 0x4F,
+ 0x4A, 0x28, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x1B, 0x53, 0x73, 0x64, 0x44, 0x4A,
+ 0x28, 0x35, 0x4A, 0x28, 0x1B, 0x67, 0x47, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x65, 0x45,
+ 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B,
+ 0x70, 0x50, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6A, 0x4A, 0x4A,
+ 0x28, 0x1B, 0x54, 0x74, 0x4A, 0x28, 0x1B, 0x6D, 0x4D, 0x4A, 0x28, 0x1B, 0x66,
+ 0x46, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6B, 0x4B, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x54, 0x74, 0x4B, 0x6B, 0x70, 0x50, 0x4A, 0x28,
+ 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x4B, 0x6B, 0x32, 0x4A, 0x28,
+ 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B,
+ 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6B, 0x4B, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A,
+ 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6B,
+ 0x4B, 0x4A, 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28,
+ 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x77, 0x57,
+ 0x4A, 0x28, 0x1B, 0x66, 0x46, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6D,
+ 0x4D, 0x4A, 0x28, 0x1B, 0x4F, 0x6F, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x50, 0x70, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B,
+ 0x6D, 0x4D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x34, 0x32, 0x4A, 0x28, 0x1B, 0x30,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x39, 0x38, 0x37, 0x4A, 0x28, 0x32, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x35, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A,
+ 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x35,
+ 0x30, 0x54, 0x74, 0x32, 0x31, 0x39, 0x38, 0x34, 0x4A, 0x28, 0x1B, 0x1B, 0x6D,
+ 0x62, 0x4D, 0x42, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x32,
+ 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x32, 0x4A,
+ 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B, 0x67, 0x47, 0x4A, 0x28, 0x1B, 0x38,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B,
+ 0x35, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x72, 0x52, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x6C, 0x4C,
+ 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B,
+ 0x79, 0x59, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x65,
+ 0x45, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x65, 0x45,
+ 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B,
+ 0x45, 0x65, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35,
+ 0x68, 0x67, 0x63, 0x61, 0x48, 0x47, 0x43, 0x41, 0x4A, 0x28, 0x1B, 0x6E, 0x4E,
+ 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B,
+ 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x6C, 0x4C, 0x38, 0x35, 0x4A, 0x28,
+ 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x1B, 0x73, 0x62, 0x53, 0x42, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x35,
+ 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x1B, 0x73, 0x6F, 0x53, 0x4F,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A,
+ 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x62,
+ 0x42, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x67, 0x47,
+ 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B,
+ 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A,
+ 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x6D,
+ 0x4D, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A,
+ 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x62, 0x42, 0x4A, 0x28, 0x1B, 0x65,
+ 0x45, 0x4A, 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28,
+ 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41,
+ 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x34,
+ 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x67, 0x47, 0x4A, 0x28, 0x1B,
+ 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x70, 0x50, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A,
+ 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x63, 0x43, 0x36, 0x35, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28,
+ 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x70, 0x50, 0x38, 0x37, 0x4A, 0x28,
+ 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B,
+ 0x6A, 0x4A, 0x4A, 0x28, 0x1B, 0x54, 0x74, 0x4A, 0x28, 0x1B, 0x66, 0x46, 0x4A,
+ 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x53, 0x73, 0x4A, 0x28,
+ 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B,
+ 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x4C, 0x6C, 0x42, 0x62, 0x4A, 0x28,
+ 0x1B, 0x36, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x4C, 0x6C, 0x42,
+ 0x62, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x1B, 0x38, 0x33, 0x31, 0x4A,
+ 0x28, 0x1B, 0x66, 0x46, 0x4A, 0x28, 0x1B, 0x1B, 0x74, 0x6E, 0x54, 0x4E, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54,
+ 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x1B, 0x31, 0x33, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A,
+ 0x28, 0x1B, 0x77, 0x57, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x64,
+ 0x44, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x77,
+ 0x75, 0x74, 0x73, 0x70, 0x6B, 0x69, 0x68, 0x67, 0x65, 0x62, 0x61, 0x57, 0x55,
+ 0x54, 0x53, 0x50, 0x4B, 0x49, 0x48, 0x47, 0x45, 0x42, 0x41, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x6C,
+ 0x4C, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x79, 0x73, 0x70, 0x68, 0x63, 0x59, 0x53, 0x50,
+ 0x48, 0x43, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x65, 0x45,
+ 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x79, 0x77, 0x75, 0x74, 0x73, 0x72,
+ 0x6E, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, 0x63, 0x62, 0x61, 0x59, 0x57, 0x55,
+ 0x54, 0x53, 0x52, 0x4E, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41,
+ 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x69, 0x49,
+ 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x1B, 0x79, 0x70, 0x59, 0x50,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A,
+ 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x33, 0x4A,
+ 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B,
+ 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B,
+ 0x37, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x1B,
+ 0x4B, 0x6B, 0x65, 0x45, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28,
+ 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A,
+ 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28,
+ 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72,
+ 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28,
+ 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B,
+ 0x32, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A,
+ 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B,
+ 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x32, 0x4A,
+ 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x1B, 0x49, 0x69, 0x72, 0x52, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B,
+ 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B,
+ 0x38, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x62,
+ 0x42, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55,
+ 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x30,
+ 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6E,
+ 0x4E, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6E, 0x4E,
+ 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B,
+ 0x74, 0x54, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75,
+ 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x2D,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A,
+ 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x30, 0x4A,
+ 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x1B, 0x74, 0x73, 0x6E, 0x54, 0x53, 0x4E, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6B, 0x4B,
+ 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x70, 0x50, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45,
+ 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x39, 0x4A,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74,
+ 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x6F, 0x4F, 0x4A, 0x28, 0x65,
+ 0x45, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75, 0x55,
+ 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B, 0x37,
+ 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x73, 0x53,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x75, 0x73, 0x6E, 0x6C, 0x6A, 0x69, 0x67, 0x66, 0x65, 0x64, 0x63, 0x55, 0x53,
+ 0x4E, 0x4C, 0x4A, 0x49, 0x47, 0x46, 0x45, 0x44, 0x43, 0x4A, 0x28, 0x1B, 0x2D,
+ 0x4A, 0x28, 0x00, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x61,
+ 0x41, 0x4A, 0x28, 0x1B, 0x6D, 0x4D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A,
+ 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x5F, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A,
+ 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x68, 0x48, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x74, 0x6B, 0x6A, 0x63, 0x54, 0x4B,
+ 0x4A, 0x43, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x2D, 0x4A, 0x28, 0x1B, 0x63, 0x43,
+ 0x4A, 0x28, 0x5F, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x6F, 0x4F,
+ 0x4A, 0x28, 0x1B, 0x66, 0x46, 0x4A, 0x28, 0x1B, 0x5F, 0x4A, 0x28, 0x1B, 0x74,
+ 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6D, 0x4D, 0x4A, 0x28,
+ 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x66, 0x46,
+ 0x4A, 0x28, 0x1B, 0x5F, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x65,
+ 0x45, 0x4A, 0x28, 0x1B, 0x6B, 0x4B, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28,
+ 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x70, 0x50, 0x4A, 0x28, 0x1B, 0x5F, 0x4A,
+ 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6F,
+ 0x4F, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x5F, 0x4A, 0x28, 0x1B,
+ 0x78, 0x58, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A,
+ 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x5F, 0x4A, 0x28, 0x1B, 0x64, 0x44,
+ 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B,
+ 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x78, 0x75, 0x6C, 0x63, 0x62, 0x58, 0x55,
+ 0x4C, 0x43, 0x42, 0x4A, 0x28, 0x2D, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x4B,
+ 0x6B, 0x5F, 0x32, 0x4A, 0x28, 0x00, 0x1B, 0x6B, 0x4B, 0x4A, 0x28, 0x1B, 0x65,
+ 0x45, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x1B, 0x72, 0x62, 0x52,
+ 0x42, 0x4A, 0x28, 0x2D, 0x4A, 0x28, 0x1B, 0x70, 0x65, 0x50, 0x45, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x39, 0x36, 0x31, 0x30, 0x4A, 0x28, 0x4A,
+ 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x38, 0x32, 0x37, 0x35, 0x31, 0x30, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x39, 0x38, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x00, 0x1B, 0x00,
+ 0x1B, 0x1B, 0x1B, 0x39, 0x34, 0x36, 0x37, 0x38, 0x35, 0x33, 0x32, 0x31, 0x4A,
+ 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6E, 0x4E,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x35,
+ 0x34, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x36, 0x35, 0x33, 0x32,
+ 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x36,
+ 0x35, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x38, 0x37,
+ 0x35, 0x33, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x38, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x34, 0x31, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x37, 0x33, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x34,
+ 0x4A, 0x28, 0x1B, 0x36, 0x35, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28,
+ 0x1B, 0x30, 0x34, 0x35, 0x37, 0x4A, 0x28, 0x1B, 0x1B, 0x39, 0x37, 0x38, 0x35,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x37, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x37, 0x36, 0x33, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x37,
+ 0x39, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x4A, 0x28, 0x1B, 0x1B, 0x32, 0x39, 0x33,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x30, 0x35,
+ 0x33, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x35, 0x34, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28,
+ 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x37, 0x34, 0x33, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x35,
+ 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x33, 0x32, 0x31, 0x4A, 0x28, 0x1B, 0x32,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x32, 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x37, 0x33, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x00, 0x1B, 0x30, 0x32, 0x33, 0x35, 0x36, 0x39, 0x38, 0x34, 0x31, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x38, 0x39,
+ 0x37, 0x36, 0x35, 0x33, 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x34, 0x36, 0x35, 0x33, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x00, 0x33, 0x32, 0x36, 0x37, 0x39,
+ 0x34, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x30, 0x74, 0x54,
+ 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x4A, 0x28, 0x31, 0x30,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x33, 0x30, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38,
+ 0x37, 0x35, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x36, 0x30, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x33, 0x32, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x37, 0x33, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x39, 0x38, 0x37, 0x36, 0x35, 0x33, 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32,
+ 0x31, 0x30, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39,
+ 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x35, 0x34, 0x32, 0x31, 0x30, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x38, 0x37, 0x35, 0x33, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x39, 0x38, 0x37, 0x36, 0x4A,
+ 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x33, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x39, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x37, 0x36, 0x35, 0x34, 0x4A, 0x28, 0x1B, 0x1B, 0x39, 0x33,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x35, 0x33,
+ 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x35, 0x34, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x34, 0x33, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x31,
+ 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x1B, 0x1B, 0x36, 0x35, 0x33, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x34, 0x30, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x39,
+ 0x38, 0x35, 0x34, 0x31, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28,
+ 0x1B, 0x37, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x38, 0x4A, 0x28, 0x1B, 0x1B, 0x34, 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x35,
+ 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x37, 0x33, 0x32, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x1B, 0x38, 0x35, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x37, 0x4A, 0x28, 0x1B, 0x33,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x1B, 0x33, 0x4A, 0x28, 0x1B,
+ 0x37, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28,
+ 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x34,
+ 0x33, 0x32, 0x31, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28, 0x1B, 0x1B, 0x32, 0x31,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x36, 0x35, 0x33, 0x32, 0x31,
+ 0x30, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28,
+ 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x1B, 0x1B,
+ 0x63, 0x43, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x6D, 0x4D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B,
+ 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A,
+ 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28,
+ 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74,
+ 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28,
+ 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x2E, 0x4A, 0x28, 0x1B,
+ 0x33, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B,
+ 0x77, 0x57, 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A,
+ 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x77,
+ 0x57, 0x4A, 0x28, 0x1B, 0x33, 0x35, 0x2D, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x2D,
+ 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B,
+ 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A,
+ 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x77, 0x57,
+ 0x4A, 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B,
+ 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x77, 0x57, 0x4A,
+ 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x36, 0x33, 0x34, 0x39,
+ 0x37, 0x38, 0x35, 0x32, 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x39,
+ 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x4A, 0x28, 0x4A,
+ 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x33,
+ 0x34, 0x32, 0x31, 0x30, 0x4A, 0x28, 0x1B, 0x36, 0x35, 0x31, 0x4A, 0x28, 0x1B,
+ 0x2D, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x69, 0x49,
+ 0x38, 0x31, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x2D,
+ 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x34, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x39, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A,
+ 0x4A, 0x28, 0x1B, 0x76, 0x56, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B,
+ 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x2E, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B,
+ 0x34, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28,
+ 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x35, 0x3A, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38,
+ 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A, 0x4A,
+ 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31,
+ 0x4A, 0x28, 0x1B, 0x3A, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B,
+ 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A, 0x4A, 0x28, 0x4A, 0x28,
+ 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B,
+ 0x3A, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28,
+ 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A,
+ 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A, 0x4A, 0x28,
+ 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x3A,
+ 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B,
+ 0x31, 0x4A, 0x28, 0x1B, 0x3A, 0x4A, 0x28, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B,
+ 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x1B, 0x39,
+ 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x39, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x38, 0x36, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x5F, 0x36, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x6F, 0x4F, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x73, 0x62, 0x61, 0x53,
+ 0x42, 0x41, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x32, 0x4A,
+ 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x58, 0x78, 0x4A, 0x28, 0x1B, 0x5F, 0x4A,
+ 0x28, 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B,
+ 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x1B, 0x72, 0x69, 0x52, 0x49, 0x4A, 0x28, 0x4A,
+ 0x28, 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28,
+ 0x1B, 0x5F, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x39, 0x4A,
+ 0x28, 0x1B, 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28, 0x1B, 0x31, 0x4A, 0x28,
+ 0x1B, 0x30, 0x4A, 0x28, 0x1B, 0x36, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B,
+ 0x5F, 0x4A, 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x1B, 0x1B, 0x63, 0x5F, 0x43,
+ 0x4A, 0x28, 0x1B, 0x1B, 0x73, 0x6F, 0x53, 0x4F, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x31, 0x32, 0x33, 0x34, 0x35, 0x2D, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28,
+ 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x31, 0x32,
+ 0x33, 0x34, 0x35, 0x61, 0x41, 0x4A, 0x28, 0x33, 0x4A, 0x28, 0x4A, 0x28, 0x1B,
+ 0x6A, 0x4A, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A,
+ 0x28, 0x1B, 0x6B, 0x4B, 0x4A, 0x28, 0x1B, 0x1B, 0x39, 0x5F, 0x4A, 0x28, 0x1B,
+ 0x73, 0x53, 0x4A, 0x28, 0x4A, 0x28, 0x1B, 0x72, 0x52, 0x4A, 0x28, 0x1B, 0x75,
+ 0x55, 0x4A, 0x28, 0x1B, 0x65, 0x45, 0x4A, 0x28, 0x1B, 0x2B, 0x4A, 0x28, 0x1B,
+ 0x30, 0x4A, 0x28, 0x1B, 0x35, 0x4A, 0x28, 0x1B, 0x38, 0x4A, 0x28, 0x1B, 0x2D,
+ 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28, 0x1B,
+ 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x67, 0x47, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A,
+ 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28, 0x1B, 0x69,
+ 0x49, 0x4A, 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x6C, 0x4C, 0x4A, 0x28,
+ 0x1B, 0x75, 0x55, 0x4A, 0x28, 0x1B, 0x6D, 0x4D, 0x4A, 0x28, 0x1B, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x63, 0x43, 0x4A, 0x28, 0x38, 0x6F, 0x4F, 0x4A, 0x28, 0x5F, 0x4A,
+ 0x28, 0x1B, 0x74, 0x54, 0x4A, 0x28, 0x1B, 0x66, 0x46, 0x4A, 0x28, 0x1B, 0x69,
+ 0x49, 0x4A, 0x28, 0x1B, 0x68, 0x48, 0x4A, 0x28, 0x2D, 0x4A, 0x28, 0x1B, 0x73,
+ 0x53, 0x4A, 0x28, 0x1B, 0x69, 0x49, 0x4A, 0x28, 0x32, 0x2D, 0x4A, 0x28, 0x1B,
+ 0x73, 0x53, 0x4A, 0x28, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x61, 0x41, 0x4A, 0x28,
+ 0x1B, 0x2D, 0x4A, 0x28, 0x6C, 0x62, 0x4C, 0x42, 0x2D, 0x4A, 0x28, 0x1B, 0x36,
+ 0x4A, 0x28, 0x6C, 0x62, 0x4C, 0x42, 0x2D, 0x4A, 0x28, 0x1B, 0x32, 0x4A, 0x28,
+ 0x1B, 0x1B, 0x38, 0x33, 0x31, 0x4A, 0x28, 0x1B, 0x38, 0x33, 0x31, 0x2D, 0x4A,
+ 0x28, 0x1B, 0x66, 0x46, 0x4A, 0x28, 0x1B, 0x00, 0x1B, 0x1B, 0x74, 0x73, 0x63,
+ 0x54, 0x53, 0x43, 0x4A, 0x28, 0x39, 0x31, 0x4A, 0x28, 0x1B, 0x2D, 0x4A, 0x28,
+ 0x1B, 0x73, 0x53, 0x4A, 0x28, 0x1B, 0x77, 0x57, 0x4A, 0x28, 0x1B, 0x6F, 0x4F,
+ 0x4A, 0x28, 0x1B, 0x64, 0x44, 0x4A, 0x28, 0x1B, 0x6E, 0x4E, 0x4A, 0x28, 0x1B,
+ 0x69, 0x49, 0x4A, 0x28, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B,
+ 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x78, 0x77, 0x75, 0x74,
+ 0x73, 0x72, 0x70, 0x6D, 0x6C, 0x6B, 0x6A, 0x69, 0x68, 0x67, 0x65, 0x63, 0x62,
+ 0x61, 0x58, 0x57, 0x55, 0x54, 0x53, 0x52, 0x50, 0x4D, 0x4C, 0x4B, 0x4A, 0x49,
+ 0x48, 0x47, 0x45, 0x43, 0x42, 0x41, 0x39, 0x38, 0x34, 0x78, 0x77, 0x75, 0x74,
+ 0x73, 0x72, 0x70, 0x6D, 0x6C, 0x6B, 0x6A, 0x69, 0x68, 0x67, 0x65, 0x63, 0x62,
+ 0x61, 0x58, 0x57, 0x55, 0x54, 0x53, 0x52, 0x50, 0x4D, 0x4C, 0x4B, 0x4A, 0x49,
+ 0x48, 0x47, 0x45, 0x43, 0x42, 0x41, 0x39, 0x38, 0x34, 0x4A, 0x42, 0x6E, 0x4E,
+ 0x69, 0x49, 0x64, 0x44, 0x6F, 0x4F, 0x63, 0x43, 0x6E, 0x4E, 0x65, 0x45, 0x2D,
+ 0x64, 0x44, 0x72, 0x52, 0x61, 0x41, 0x64, 0x44, 0x6E, 0x4E, 0x61, 0x41, 0x74,
+ 0x54, 0x73, 0x53, 0x2D, 0x65, 0x45, 0x62, 0x42, 0x38, 0x36, 0x39, 0x31, 0x2D,
+ 0x34, 0x2E, 0x33, 0x78, 0x58, 0x5F, 0x69, 0x49, 0x69, 0x49, 0x62, 0x42, 0x30,
+ 0x37, 0x2D, 0x6F, 0x4F, 0x69, 0x49, 0x43, 0x63, 0x6D, 0x4D, 0x61, 0x41, 0x73,
+ 0x53, 0x6F, 0x4F, 0x63, 0x43, 0x73, 0x53, 0x6B, 0x4B, 0x68, 0x48, 0x2D, 0x35,
+ 0x67, 0x47, 0x32, 0x35, 0x34, 0x31, 0x39, 0x38, 0x31, 0x30, 0x30, 0x64, 0x44,
+ 0x69, 0x49, 0x73, 0x53, 0x65, 0x45, 0x6E, 0x4E, 0x32, 0x30, 0x31, 0x33, 0x39,
+ 0x38, 0x37, 0x36, 0x35, 0x31, 0x37, 0x30, 0x33, 0x32, 0x36, 0x38, 0x39, 0x37,
+ 0x30, 0x33, 0x31, 0x30, 0x69, 0x67, 0x61, 0x49, 0x47, 0x41, 0x64, 0x44, 0x72,
+ 0x52, 0x61, 0x41, 0x64, 0x44, 0x6E, 0x4E, 0x61, 0x41, 0x74, 0x54, 0x73, 0x53,
+ 0x65, 0x45, 0x62, 0x42, 0x63, 0x43, 0x6F, 0x4F, 0x35, 0x67, 0x47, 0x73, 0x53,
+ 0x65, 0x45, 0x6E, 0x4E, 0x61, 0x41, 0x70, 0x50, 0x61, 0x41, 0x6A, 0x4A, 0x54,
+ 0x74, 0x6D, 0x4D, 0x66, 0x46, 0x64, 0x44, 0x6B, 0x4B, 0x4B, 0x6B, 0x54, 0x74,
+ 0x70, 0x50, 0x63, 0x43, 0x31, 0x33, 0x4B, 0x6B, 0x32, 0x6E, 0x4E, 0x61, 0x41,
+ 0x6B, 0x4B, 0x61, 0x41, 0x74, 0x54, 0x61, 0x41, 0x6B, 0x4B, 0x68, 0x48, 0x74,
+ 0x54, 0x64, 0x44, 0x69, 0x49, 0x77, 0x57, 0x66, 0x46, 0x6E, 0x4E, 0x61, 0x41,
+ 0x6D, 0x4D, 0x4F, 0x6F, 0x72, 0x52, 0x6C, 0x4C, 0x30, 0x39, 0x34, 0x32, 0x61,
+ 0x41, 0x68, 0x48, 0x31, 0x30, 0x37, 0x38, 0x39, 0x36, 0x35, 0x32, 0x39, 0x38,
+ 0x37, 0x30, 0x35, 0x30, 0x54, 0x74, 0x32, 0x31, 0x39, 0x38, 0x34, 0x6D, 0x4D,
+ 0x38, 0x32, 0x31, 0x33, 0x32, 0x62, 0x42, 0x67, 0x47, 0x31, 0x39, 0x35, 0x69,
+ 0x49, 0x6C, 0x4C, 0x6C, 0x4C, 0x69, 0x49, 0x72, 0x52, 0x65, 0x45, 0x65, 0x45,
+ 0x65, 0x45, 0x72, 0x52, 0x62, 0x42, 0x45, 0x65, 0x72, 0x52, 0x79, 0x59, 0x72,
+ 0x52, 0x31, 0x32, 0x33, 0x34, 0x35, 0x68, 0x67, 0x63, 0x61, 0x48, 0x47, 0x43,
+ 0x41, 0x6E, 0x4E, 0x69, 0x49, 0x74, 0x54, 0x61, 0x41, 0x38, 0x38, 0x6C, 0x4C,
+ 0x38, 0x35, 0x6F, 0x4F, 0x6D, 0x62, 0x4D, 0x42, 0x38, 0x38, 0x39, 0x31, 0x31,
+ 0x30, 0x36, 0x35, 0x63, 0x43, 0x69, 0x49, 0x69, 0x49, 0x74, 0x54, 0x6C, 0x4C,
+ 0x61, 0x41, 0x62, 0x42, 0x35, 0x61, 0x41, 0x75, 0x55, 0x67, 0x47, 0x6E, 0x4E,
+ 0x69, 0x49, 0x6C, 0x4C, 0x69, 0x49, 0x74, 0x54, 0x6C, 0x4C, 0x75, 0x55, 0x6D,
+ 0x4D, 0x65, 0x45, 0x72, 0x52, 0x62, 0x42, 0x65, 0x45, 0x68, 0x48, 0x6E, 0x4E,
+ 0x69, 0x49, 0x74, 0x54, 0x61, 0x41, 0x6C, 0x4C, 0x33, 0x34, 0x65, 0x45, 0x67,
+ 0x47, 0x61, 0x41, 0x70, 0x50, 0x65, 0x45, 0x64, 0x44, 0x6F, 0x4F, 0x32, 0x30,
+ 0x35, 0x38, 0x63, 0x43, 0x36, 0x35, 0x37, 0x70, 0x50, 0x38, 0x37, 0x69, 0x49,
+ 0x6A, 0x4A, 0x54, 0x74, 0x66, 0x46, 0x69, 0x49, 0x32, 0x36, 0x53, 0x73, 0x64,
+ 0x44, 0x6F, 0x4F, 0x63, 0x43, 0x42, 0x62, 0x4C, 0x6C, 0x42, 0x62, 0x4C, 0x6C,
+ 0x32, 0x36, 0x38, 0x33, 0x31, 0x66, 0x46, 0x69, 0x49, 0x35, 0x6E, 0x4E, 0x69,
+ 0x49, 0x74, 0x54, 0x61, 0x41, 0x6C, 0x4C, 0x31, 0x32, 0x31, 0x33, 0x73, 0x53,
+ 0x77, 0x57, 0x6F, 0x4F, 0x64, 0x44, 0x6E, 0x4E, 0x69, 0x49, 0x74, 0x6E, 0x54,
+ 0x4E, 0x69, 0x49, 0x68, 0x48, 0x63, 0x43, 0x73, 0x6F, 0x53, 0x4F, 0x73, 0x62,
+ 0x53, 0x42, 0x50, 0x70, 0x61, 0x41, 0x62, 0x42, 0x75, 0x55, 0x69, 0x49, 0x53,
+ 0x73, 0x64, 0x44, 0x69, 0x49, 0x6C, 0x4C, 0x6C, 0x4C, 0x69, 0x49, 0x72, 0x52,
+ 0x77, 0x75, 0x74, 0x73, 0x70, 0x6B, 0x69, 0x68, 0x67, 0x65, 0x62, 0x61, 0x57,
+ 0x55, 0x54, 0x53, 0x50, 0x4B, 0x49, 0x48, 0x47, 0x45, 0x42, 0x41, 0x38, 0x37,
+ 0x35, 0x34, 0x33, 0x30, 0x39, 0x32, 0x31, 0x2D, 0x69, 0x49, 0x73, 0x53, 0x63,
+ 0x43, 0x65, 0x45, 0x6F, 0x4F, 0x72, 0x52, 0x79, 0x77, 0x75, 0x74, 0x73, 0x72,
+ 0x6E, 0x69, 0x68, 0x67, 0x66, 0x65, 0x64, 0x63, 0x62, 0x61, 0x59, 0x57, 0x55,
+ 0x54, 0x53, 0x52, 0x4E, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41,
+ 0x69, 0x49, 0x6C, 0x4C, 0x6C, 0x4C, 0x69, 0x49, 0x72, 0x52, 0x2D, 0x72, 0x52,
+ 0x75, 0x55, 0x65, 0x45, 0x2B, 0x33, 0x37, 0x32, 0x72, 0x52, 0x75, 0x55, 0x65,
+ 0x45, 0x2B, 0x37, 0x37, 0x32, 0x2D, 0x2D, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45,
+ 0x2B, 0x34, 0x38, 0x32, 0x2D, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x38,
+ 0x37, 0x32, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x37, 0x39, 0x32, 0x2D,
+ 0x2D, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x35, 0x38, 0x32, 0x2D, 0x72,
+ 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x30, 0x30, 0x35, 0x2D, 0x6C, 0x4C, 0x61,
+ 0x41, 0x6E, 0x4E, 0x6F, 0x4F, 0x69, 0x49, 0x74, 0x54, 0x61, 0x41, 0x6E, 0x4E,
+ 0x72, 0x52, 0x65, 0x45, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x31, 0x37,
+ 0x38, 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x30, 0x38, 0x32, 0x2D, 0x2D,
+ 0x74, 0x54, 0x6E, 0x4E, 0x61, 0x41, 0x6B, 0x4B, 0x2D, 0x72, 0x52, 0x75, 0x55,
+ 0x65, 0x45, 0x2D, 0x2D, 0x39, 0x6E, 0x4E, 0x69, 0x49, 0x74, 0x54, 0x72, 0x52,
+ 0x75, 0x55, 0x65, 0x45, 0x2B, 0x37, 0x33, 0x2D, 0x73, 0x53, 0x65, 0x45, 0x6F,
+ 0x4F, 0x61, 0x41, 0x70, 0x50, 0x74, 0x73, 0x6E, 0x54, 0x53, 0x4E, 0x62, 0x42,
+ 0x49, 0x69, 0x72, 0x52, 0x73, 0x53, 0x4B, 0x6B, 0x65, 0x45, 0x79, 0x70, 0x59,
+ 0x50, 0x75, 0x73, 0x6E, 0x6C, 0x6A, 0x69, 0x67, 0x66, 0x65, 0x64, 0x63, 0x55,
+ 0x53, 0x4E, 0x4C, 0x4A, 0x49, 0x47, 0x46, 0x45, 0x44, 0x43, 0x00, 0x2D, 0x63,
+ 0x43, 0x69, 0x49, 0x64, 0x44, 0x31, 0x31, 0x2D, 0x61, 0x41, 0x32, 0x39, 0x5F,
+ 0x74, 0x54, 0x68, 0x48, 0x74, 0x6B, 0x6A, 0x63, 0x54, 0x4B, 0x4A, 0x43, 0x74,
+ 0x54, 0x2D, 0x5F, 0x72, 0x52, 0x6F, 0x4F, 0x66, 0x46, 0x5F, 0x74, 0x54, 0x61,
+ 0x41, 0x6D, 0x4D, 0x72, 0x52, 0x6F, 0x4F, 0x66, 0x46, 0x5F, 0x64, 0x44, 0x65,
+ 0x45, 0x6B, 0x4B, 0x63, 0x43, 0x61, 0x41, 0x70, 0x50, 0x5F, 0x65, 0x45, 0x64,
+ 0x44, 0x6F, 0x4F, 0x63, 0x43, 0x5F, 0x78, 0x58, 0x69, 0x49, 0x6E, 0x4E, 0x75,
+ 0x55, 0x5F, 0x64, 0x44, 0x65, 0x45, 0x64, 0x44, 0x6E, 0x4E, 0x65, 0x45, 0x74,
+ 0x54, 0x63, 0x43, 0x6F, 0x4F, 0x6D, 0x4D, 0x63, 0x43, 0x2D, 0x32, 0x31, 0x33,
+ 0x32, 0x00, 0x38, 0x6B, 0x4B, 0x65, 0x45, 0x65, 0x45, 0x4B, 0x6B, 0x5F, 0x32,
+ 0x00, 0xF8, 0x73, 0xD2, 0xC5, 0x66, 0xC5, 0x66, 0x2D, 0x00, 0x33, 0x31, 0x00,
+ 0x39, 0x36, 0x31, 0x30, 0x35, 0x30, 0x39, 0x38, 0x36, 0x35, 0x34, 0x33, 0x32,
+ 0x31, 0x30, 0x00, 0x37, 0x00, 0x38, 0x36, 0x32, 0x31, 0x30, 0x38, 0x32, 0x37,
+ 0x35, 0x31, 0x30, 0x39, 0x34, 0x36, 0x37, 0x38, 0x35, 0x33, 0x32, 0x31, 0x2D,
+ 0x61, 0x41, 0x36, 0x35, 0x30, 0x38, 0x32, 0x35, 0x33, 0x39, 0x38, 0x37, 0x36,
+ 0x34, 0x31, 0x38, 0x37, 0x35, 0x33, 0x30, 0x34, 0x36, 0x35, 0x33, 0x32, 0x31,
+ 0x39, 0x38, 0x35, 0x34, 0x32, 0x31, 0x30, 0x34, 0x30, 0x30, 0x34, 0x35, 0x37,
+ 0x36, 0x35, 0x32, 0x37, 0x37, 0x36, 0x35, 0x34, 0x37, 0x39, 0x34, 0x33, 0x37,
+ 0x35, 0x34, 0x32, 0x30, 0x35, 0x33, 0x32, 0x35, 0x34, 0x33, 0x32, 0x31, 0x32,
+ 0x39, 0x00, 0x32, 0x30, 0x32, 0x33, 0x35, 0x36, 0x39, 0x38, 0x34, 0x31, 0x00,
+ 0x36, 0x00, 0x30, 0x37, 0x38, 0x39, 0x00, 0x33, 0x32, 0x36, 0x37, 0x39, 0x34,
+ 0x34, 0x36, 0x35, 0x33, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, 0x38,
+ 0x39, 0x37, 0x36, 0x35, 0x33, 0x31, 0x37, 0x33, 0x32, 0x32, 0x31, 0x37, 0x34,
+ 0x33, 0x31, 0x30, 0x32, 0x39, 0x33, 0x37, 0x36, 0x33, 0x30, 0x39, 0x37, 0x38,
+ 0x35, 0x37, 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31,
+ 0x30, 0x39, 0x38, 0x37, 0x36, 0x35, 0x33, 0x31, 0x37, 0x33, 0x32, 0x30, 0x33,
+ 0x32, 0x36, 0x30, 0x39, 0x38, 0x37, 0x35, 0x33, 0x30, 0x39, 0x38, 0x37, 0x36,
+ 0x38, 0x37, 0x35, 0x33, 0x30, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x39, 0x38,
+ 0x35, 0x34, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, 0x39, 0x37, 0x35, 0x34,
+ 0x32, 0x35, 0x33, 0x32, 0x31, 0x34, 0x36, 0x35, 0x33, 0x34, 0x30, 0x36, 0x34,
+ 0x33, 0x31, 0x30, 0x39, 0x33, 0x33, 0x32, 0x31, 0x30, 0x39, 0x38, 0x37, 0x35,
+ 0x34, 0x33, 0x32, 0x30, 0x30, 0x38, 0x32, 0x35, 0x33, 0x34, 0x31, 0x37, 0x34,
+ 0x30, 0x37, 0x35, 0x32, 0x37, 0x34, 0x33, 0x35, 0x34, 0x33, 0x32, 0x31, 0x32,
+ 0x39, 0x32, 0x31, 0x37, 0x33, 0x38, 0x35, 0x37, 0x33, 0x32, 0x39, 0x38, 0x35,
+ 0x34, 0x31, 0x30, 0x36, 0x35, 0x33, 0x32, 0x31, 0x30, 0x64, 0x44, 0x69, 0x49,
+ 0x73, 0x53, 0x63, 0x43, 0x31, 0x30, 0x30, 0x74, 0x54, 0x39, 0x38, 0x37, 0x36,
+ 0x35, 0x34, 0x33, 0x32, 0x31, 0x63, 0x43, 0x39, 0x38, 0x37, 0x35, 0x34, 0x33,
+ 0x32, 0x31, 0x30, 0x2D, 0x2D, 0x73, 0x53, 0x63, 0x43, 0x75, 0x55, 0x2D, 0x36,
+ 0x34, 0x36, 0x2D, 0x6E, 0x4E, 0x69, 0x49, 0x74, 0x54, 0x61, 0x41, 0x6C, 0x4C,
+ 0x2D, 0x31, 0x2E, 0x33, 0x2D, 0x73, 0x53, 0x77, 0x57, 0x6F, 0x4F, 0x64, 0x44,
+ 0x6E, 0x4E, 0x69, 0x49, 0x77, 0x57, 0x2D, 0x6E, 0x4E, 0x69, 0x49, 0x74, 0x54,
+ 0x61, 0x41, 0x6C, 0x4C, 0x2D, 0x73, 0x53, 0x77, 0x57, 0x6F, 0x4F, 0x64, 0x44,
+ 0x6E, 0x4E, 0x69, 0x49, 0x77, 0x57, 0x00, 0x2D, 0x00, 0x33, 0x35, 0x2D, 0x36,
+ 0x33, 0x34, 0x39, 0x37, 0x38, 0x35, 0x32, 0x31, 0x2D, 0x39, 0x35, 0x33, 0x34,
+ 0x32, 0x31, 0x30, 0x36, 0x35, 0x31, 0x2D, 0x72, 0x52, 0x38, 0x30, 0x75, 0x55,
+ 0x2D, 0x36, 0x39, 0x39, 0x31, 0x3A, 0x76, 0x56, 0x72, 0x52, 0x69, 0x49, 0x2E,
+ 0x36, 0x38, 0x39, 0x31, 0x38, 0x39, 0x31, 0x38, 0x39, 0x31, 0x38, 0x39, 0x31,
+ 0x38, 0x39, 0x31, 0x38, 0x39, 0x31, 0x38, 0x39, 0x31, 0x38, 0x39, 0x31, 0x38,
+ 0x39, 0x31, 0x00, 0x3A, 0x00, 0x3A, 0x00, 0x3A, 0x00, 0x3A, 0x00, 0x3A, 0x00,
+ 0x3A, 0x00, 0x3A, 0x00, 0x3A, 0x00, 0x35, 0x3A, 0x39, 0x38, 0x37, 0x36, 0x35,
+ 0x34, 0x33, 0x32, 0x31, 0x2D, 0x39, 0x35, 0x38, 0x34, 0x38, 0x36, 0x34, 0x69,
+ 0x49, 0x38, 0x31, 0x5F, 0x36, 0x2D, 0xB6, 0xE6, 0xC5, 0x66, 0xD9, 0x9B, 0xF8,
+ 0xD5, 0x76, 0xC1, 0x62, 0xD4, 0x75, 0x77, 0xD6, 0xD9, 0x9B, 0x60, 0xC2, 0x63,
+ 0x6F, 0x4F, 0x6D, 0x4D, 0x6E, 0x4E, 0x30, 0x32, 0x30, 0x58, 0x78, 0x5F, 0x73,
+ 0x53, 0x2D, 0x61, 0x41, 0x65, 0x45, 0x38, 0x30, 0x36, 0x35, 0x38, 0x39, 0x31,
+ 0x2D, 0x31, 0x30, 0x36, 0x35, 0x5F, 0x63, 0x43, 0x5F, 0x63, 0x5F, 0x43, 0x72,
+ 0x69, 0x52, 0x49, 0x31, 0x32, 0x33, 0x34, 0x35, 0x2D, 0x6E, 0x4E, 0x69, 0x49,
+ 0x74, 0x54, 0x6A, 0x4A, 0x6E, 0x4E, 0x61, 0x41, 0x6B, 0x4B, 0x33, 0x39, 0x5F,
+ 0x72, 0x52, 0x75, 0x55, 0x65, 0x45, 0x2B, 0x30, 0x35, 0x38, 0x2D, 0x6C, 0x4C,
+ 0x61, 0x41, 0x75, 0x55, 0x67, 0x47, 0x6E, 0x4E, 0x69, 0x49, 0x6C, 0x4C, 0x69,
+ 0x49, 0x74, 0x54, 0x6C, 0x4C, 0x75, 0x55, 0x6D, 0x4D, 0x2D, 0xF1, 0xF0, 0xF2,
+ 0xF0, 0xA7, 0xB7, 0xE7, 0x6D, 0xE2, 0xAB, 0xA2, 0x5F, 0x74, 0x54, 0x66, 0x46,
+ 0x69, 0x49, 0x2D, 0x73, 0x53, 0x32, 0x2D, 0x73, 0x53, 0x61, 0x41, 0x6C, 0x62,
+ 0x4C, 0x42, 0x2D, 0x6C, 0x62, 0x4C, 0x42, 0x2D, 0x32, 0x36, 0x38, 0x33, 0x31,
+ 0x38, 0x33, 0x31, 0x2D, 0x66, 0x46, 0x00, 0x2D, 0x73, 0x53, 0x39, 0x31, 0x2D,
+ 0x73, 0x53, 0x77, 0x57, 0x6F, 0x4F, 0x64, 0x44, 0x6E, 0x4E, 0x68, 0xC7, 0xD5,
+ 0x76, 0xC9, 0x71, 0xC4, 0x65, 0xD6, 0x77, 0xC3, 0x64, 0xD5, 0x76, 0xC5, 0x66,
+ 0x60, 0xC4, 0x65, 0xD9, 0x9B, 0xC1, 0x62, 0xC4, 0x65, 0xD5, 0x76, 0xC1, 0x62,
+ 0xE3, 0xB3, 0xE2, 0xAB, 0x60, 0xC5, 0x66, 0xC2, 0x63, 0xF6, 0xF8, 0xF8, 0xF6,
+ 0xF9, 0xF1, 0x60, 0xF4, 0x4B, 0xF3, 0xE7, 0xB7, 0xA7, 0x6D, 0xC9, 0x89, 0x71,
+ 0x87, 0xC7, 0xD5, 0x95, 0xC9, 0x89, 0xC4, 0x84, 0xD6, 0x96, 0xC3, 0x83, 0xD5,
+ 0x95, 0xC5, 0x85, 0x60, 0xC4, 0x84, 0xD9, 0x99, 0xC1, 0x81, 0xC4, 0x84, 0xD5,
+ 0x95, 0xC1, 0x81, 0xE3, 0xA3, 0xE2, 0xA2, 0x60, 0xC5, 0x85, 0xC2, 0x82, 0x83,
+ 0xC3, 0xC9, 0x89, 0xC2, 0x82, 0x64, 0xC3, 0xC9, 0x71, 0xC2, 0x63, 0xC9, 0x89,
+ 0x71, 0xF8, 0xF0, 0xF7, 0x60, 0xD6, 0x96, 0x77, 0xC9, 0x89, 0x71, 0x64, 0x83,
+ 0xC3, 0xD4, 0x94, 0x75, 0xC1, 0x62, 0xC1, 0x81, 0xD6, 0x96, 0xE2, 0xAB, 0xA2,
+ 0xD6, 0x77, 0x66, 0xC5, 0xE2, 0xAB, 0xC5, 0x66, 0xD5, 0x76, 0xAB, 0xE2, 0x9B,
+ 0xD9, 0x9B, 0xD9, 0xF7, 0xF0, 0xF7, 0xF7, 0xF7, 0xF0, 0xF3, 0xF4, 0xF5, 0xF1,
+ 0xF0, 0xF0, 0xF1, 0xF2, 0xF3, 0xF5, 0xF6, 0xF9, 0xF4, 0xF7, 0xF5, 0xF2, 0xF1,
+ 0xF0, 0xF4, 0xF3, 0xF0, 0xF9, 0xF8, 0xF5, 0xF6, 0xF7, 0xF3, 0xF2, 0xF6, 0xF9,
+ 0xF3, 0xC9, 0xC7, 0xC1, 0x71, 0x68, 0x62, 0xC4, 0x65, 0xD9, 0x9B, 0xC1, 0x62,
+ 0xC4, 0x65, 0xD5, 0x76, 0xC1, 0x62, 0xE3, 0xB3, 0xE2, 0xAB, 0xC5, 0x66, 0xC2,
+ 0x63, 0x71, 0xC9, 0xC9, 0x71, 0xC3, 0x64, 0xD6, 0x77, 0xAB, 0xE2, 0xC3, 0x64,
+ 0xE2, 0xAB, 0xD2, 0x73, 0xC8, 0x69, 0xF5, 0xC7, 0x68, 0x66, 0xC5, 0xE2, 0xAB,
+ 0xC5, 0x66, 0xD5, 0x76, 0xC1, 0x62, 0xD7, 0x78, 0xC1, 0x62, 0xD1, 0x72, 0xB3,
+ 0xE3, 0xD4, 0x75, 0xC6, 0x67, 0xC4, 0x65, 0x69, 0xC8, 0xD2, 0x73, 0x9B, 0xD9,
+ 0xE3, 0xD7, 0xD2, 0xB3, 0x78, 0x73, 0xC3, 0x64, 0xF2, 0xF1, 0xF3, 0x73, 0xD2,
+ 0xF2, 0x62, 0xC1, 0xD5, 0x76, 0xC1, 0x62, 0xD2, 0x73, 0xC1, 0x62, 0xE3, 0xB3,
+ 0xC1, 0x62, 0xD2, 0x73, 0xC8, 0x69, 0xE3, 0xB3, 0xC4, 0x65, 0xC9, 0x71, 0xE6,
+ 0xB6, 0xC6, 0x67, 0xD3, 0x74, 0xF4, 0xF0, 0xF9, 0x71, 0xC9, 0xC1, 0x62, 0xF8,
+ 0xF4, 0xF2, 0xF5, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9,
+ 0xF4, 0xF1, 0xF9, 0xF8, 0xF7, 0xF6, 0xF4, 0xF2, 0xF0, 0xF4, 0xF5, 0xF3, 0xF8,
+ 0xF7, 0xF0, 0xF0, 0xF1, 0xF0, 0xF1, 0xF3, 0xF5, 0xF6, 0xF9, 0xF8, 0xF4, 0xF1,
+ 0xF5, 0xF7, 0xF8, 0xF3, 0xF5, 0xF1, 0xF0, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF0,
+ 0xF2, 0xF9, 0xF8, 0xF7, 0xF0, 0xF3, 0xF1, 0xF0, 0x69, 0xC8, 0xF9, 0xF8, 0xF5,
+ 0xF4, 0xF2, 0xF1, 0xF0, 0xE3, 0xB3, 0x75, 0xD4, 0x64, 0xC3, 0xC9, 0x71, 0xD3,
+ 0x74, 0xD3, 0x74, 0xC9, 0x71, 0xD9, 0x9B, 0x73, 0xD2, 0xC5, 0x66, 0xC5, 0x66,
+ 0xC5, 0x66, 0xD9, 0x9B, 0xE8, 0xB8, 0xD9, 0x9B, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5,
+ 0xC8, 0xC7, 0xC3, 0xC1, 0x69, 0x68, 0x64, 0x62, 0xD5, 0x76, 0xC9, 0x71, 0xE3,
+ 0xB3, 0xF0, 0xF8, 0xF2, 0xF1, 0xF3, 0xF2, 0x63, 0xC2, 0xC7, 0x68, 0xF3, 0xF5,
+ 0xF1, 0xF9, 0xF5, 0xF8, 0xF8, 0xC1, 0x62, 0xF8, 0xF5, 0xD3, 0x74, 0xD6, 0x77,
+ 0xD4, 0xC2, 0x75, 0x63, 0x9B, 0xD9, 0xF8, 0xF7, 0xF8, 0xF9, 0xF1, 0xF1, 0xF0,
+ 0xF6, 0xF5, 0x64, 0xC3, 0xC9, 0x71, 0xF2, 0xF5, 0x64, 0xC3, 0xC9, 0x71, 0xE3,
+ 0xB3, 0xD3, 0x74, 0xC1, 0x62, 0xC2, 0x63, 0xF5, 0xF3, 0xF4, 0x66, 0xC5, 0xC7,
+ 0x68, 0xC1, 0x62, 0xD7, 0x78, 0xC5, 0x66, 0xC4, 0x65, 0x74, 0xD3, 0xC1, 0x62,
+ 0xE4, 0xB4, 0xC7, 0x68, 0xD5, 0x76, 0xC9, 0x71, 0xD3, 0x74, 0xC9, 0x71, 0xE3,
+ 0xB3, 0xD3, 0x74, 0xE4, 0xB4, 0xD4, 0x75, 0xB6, 0xE6, 0xC5, 0x66, 0xD9, 0x9B,
+ 0xC2, 0x63, 0xC5, 0x66, 0xC8, 0x69, 0xD5, 0x76, 0xC9, 0x71, 0xE3, 0xB3, 0xC1,
+ 0x62, 0xD3, 0x74, 0xF2, 0xF0, 0xD6, 0x77, 0xF6, 0xF5, 0xC3, 0x64, 0xF7, 0xF8,
+ 0x78, 0xD7, 0xF8, 0xF7, 0xAB, 0xE2, 0xC9, 0x71, 0xD1, 0x72, 0xB3, 0xE3, 0xC6,
+ 0x67, 0xC9, 0x71, 0xF0, 0xF2, 0xF6, 0xAB, 0xE2, 0x66, 0xC5, 0xC4, 0x65, 0xD6,
+ 0x77, 0xC3, 0x64, 0x66, 0xC5, 0x66, 0xC5, 0xD3, 0xC2, 0x74, 0x63, 0x66, 0xC5,
+ 0x66, 0xC5, 0xD3, 0xC2, 0x74, 0x63, 0xF2, 0xF6, 0xF8, 0xF3, 0xF1, 0xC6, 0x67,
+ 0xC9, 0x71, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xF5, 0xF1,
+ 0xF2, 0x76, 0xD5, 0xC9, 0x71, 0xE3, 0xB3, 0xC1, 0x62, 0xD3, 0x74, 0xF1, 0xF2,
+ 0xF1, 0xF3, 0xE2, 0xAB, 0xE6, 0xB6, 0xD6, 0x77, 0xC4, 0x65, 0xD5, 0x76, 0xC9,
+ 0x71, 0xE3, 0xD5, 0xB3, 0x76, 0xC9, 0x71, 0xC8, 0x69, 0xC3, 0x64, 0xE2, 0xD6,
+ 0xAB, 0x77, 0xE2, 0xC2, 0xAB, 0x63, 0xD7, 0xC1, 0x78, 0x62, 0xC2, 0x63, 0xE4,
+ 0xB4, 0xC9, 0x71, 0xE2, 0xC4, 0xAB, 0x65, 0x64, 0xC3, 0xC9, 0x71, 0xD3, 0x74,
+ 0xD3, 0x74, 0xC9, 0x71, 0xD9, 0x9B, 0xE6, 0xE4, 0xE3, 0xE2, 0xD7, 0xD2, 0xC9,
+ 0xC8, 0xC7, 0xC5, 0xC2, 0xC1, 0xB6, 0xB4, 0xB3, 0xAB, 0x78, 0x73, 0x71, 0x69,
+ 0x68, 0x66, 0x63, 0x62, 0xF7, 0xF4, 0xF3, 0xF9, 0xF8, 0xF2, 0xF0, 0x60, 0xC9,
+ 0x71, 0xF1, 0xF2, 0x66, 0xC5, 0xC3, 0x64, 0xC5, 0x66, 0xB4, 0xE4, 0xB3, 0xE3,
+ 0xAB, 0xE2, 0x9B, 0xD9, 0x66, 0xC5, 0xD6, 0x77, 0x74, 0xD3, 0xB3, 0xE3, 0xAB,
+ 0xE2, 0x66, 0xC5, 0x63, 0xC2, 0x9B, 0xD9, 0x71, 0xC9, 0x9B, 0xD9, 0xAB, 0xE2,
+ 0x62, 0xC1, 0x69, 0xC8, 0x66, 0xC5, 0x9B, 0xD9, 0xE8, 0xE6, 0xE4, 0xE3, 0xE2,
+ 0xD9, 0xD5, 0xC9, 0xC8, 0xC7, 0xC6, 0xC5, 0xC3, 0xC2, 0xC1, 0xB8, 0xB6, 0xB4,
+ 0xB3, 0xAB, 0x9B, 0x76, 0x71, 0x69, 0x68, 0x67, 0x66, 0x64, 0x63, 0x62, 0x60,
+ 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF3, 0xF7, 0xF2, 0x77,
+ 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF7, 0xF7, 0xF2, 0x60, 0x60,
+ 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF4, 0xF8, 0xF2, 0x60,
+ 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF8, 0xF7, 0xF2, 0x77,
+ 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF7, 0xF9, 0xF2, 0x60, 0x60,
+ 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF5, 0xF8, 0xF2, 0x60,
+ 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x4E, 0xF0, 0xF0, 0xF5, 0x60,
+ 0xD3, 0x74, 0xC1, 0x62, 0xD5, 0x76, 0xD6, 0x77, 0xC9, 0x71, 0xE3, 0xB3, 0xC1,
+ 0x62, 0xD5, 0x76, 0xD9, 0x9B, 0xC5, 0x66, 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4,
+ 0xC5, 0x66, 0x4E, 0xF1, 0xF7, 0xF8, 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5,
+ 0x66, 0x4E, 0xF0, 0xF8, 0xF2, 0x60, 0x60, 0xE3, 0xB3, 0x62, 0xC1, 0xD5, 0x76,
+ 0x81, 0xC1, 0xD5, 0x95, 0xC1, 0x81, 0xC1, 0x62, 0xD2, 0x92, 0x73, 0x60, 0x77,
+ 0xD6, 0xD9, 0x9B, 0xE4, 0xB4, 0xC5, 0x66, 0x60, 0x60, 0xF9, 0xD5, 0x76, 0xC9,
+ 0x71, 0x96, 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x60, 0x60, 0xF9, 0xD5,
+ 0x95, 0xC9, 0x89, 0xE3, 0xA3, 0xE3, 0xB3, 0x85, 0xC5, 0xC3, 0x83, 0xC5, 0x85,
+ 0xA4, 0xE4, 0xA3, 0xE3, 0xA2, 0xE2, 0x99, 0xD9, 0x85, 0xC5, 0xD6, 0x96, 0xA3,
+ 0xE3, 0xA2, 0xE2, 0x85, 0xC5, 0x82, 0xC2, 0x99, 0xD9, 0x89, 0xC9, 0x99, 0xD9,
+ 0xA2, 0xE2, 0x81, 0xC1, 0x88, 0xC8, 0x85, 0xC5, 0xD9, 0x99, 0x93, 0xD3, 0x77,
+ 0x96, 0xD6, 0x73, 0x92, 0xD2, 0xE8, 0xE6, 0xE4, 0xE3, 0xE2, 0xD9, 0xD5, 0xC9,
+ 0xC8, 0xC7, 0xC6, 0xC5, 0xC4, 0xC3, 0xC2, 0xC1, 0xA8, 0xA6, 0xA4, 0xA3, 0xA2,
+ 0x99, 0x95, 0x89, 0x88, 0x87, 0x86, 0x85, 0x84, 0x83, 0x82, 0x81, 0x76, 0x65,
+ 0x83, 0xC3, 0xC9, 0x89, 0xD3, 0x93, 0xD3, 0x93, 0xC9, 0x89, 0x64, 0xC3, 0xC9,
+ 0x71, 0xD3, 0x74, 0xD3, 0x74, 0xC9, 0x71, 0xD9, 0x9B, 0xD9, 0x99, 0x60, 0x96,
+ 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF3, 0xF7, 0xF2, 0x96, 0xD6,
+ 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF7, 0xF7, 0xF2, 0x60, 0x60, 0x96,
+ 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF4, 0xF8, 0xF2, 0x60, 0x96,
+ 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF8, 0xF7, 0xF2, 0x96, 0xD6,
+ 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF7, 0xF9, 0xF2, 0x60, 0x60, 0x96,
+ 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF5, 0xF8, 0xF2, 0x60, 0x96,
+ 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF0, 0xF0, 0xF5, 0x60, 0xD3,
+ 0x93, 0xC1, 0x81, 0xD5, 0x95, 0xD6, 0x96, 0xC9, 0x89, 0xE3, 0xA3, 0xC1, 0x81,
+ 0xD5, 0x95, 0xD9, 0x99, 0xC5, 0x85, 0x96, 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5,
+ 0x85, 0x4E, 0xF1, 0xF7, 0xF8, 0x96, 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85,
+ 0x4E, 0xF0, 0xF8, 0xF2, 0x60, 0x60, 0xE3, 0xA3, 0x96, 0xD6, 0xD9, 0x99, 0xE4,
+ 0xA4, 0xC5, 0x85, 0x4E, 0xF7, 0xF3, 0x60, 0x77, 0xD6, 0xD9, 0x9B, 0xE4, 0xB4,
+ 0xC5, 0x66, 0x4E, 0xF7, 0xF3, 0x60, 0xE2, 0xAB, 0xC5, 0x66, 0xE2, 0xA2, 0xC5,
+ 0x85, 0xD6, 0x96, 0xE3, 0xE2, 0xD5, 0xA3, 0xA2, 0x95, 0xC2, 0x82, 0x89, 0xC9,
+ 0xD9, 0x99, 0xE2, 0xA2, 0x92, 0xD2, 0xC5, 0x85, 0xE8, 0xD7, 0xB8, 0xA8, 0x97,
+ 0x78, 0xD6, 0x77, 0xC1, 0x81, 0x62, 0xD7, 0x97, 0x78, 0xE3, 0xE2, 0xD5, 0xB3,
+ 0xAB, 0x76, 0xC2, 0x63, 0x71, 0xC9, 0xD9, 0x9B, 0xE2, 0xAB, 0x73, 0xD2, 0xC5,
+ 0x66, 0xD7, 0x78, 0xE4, 0xE2, 0xD5, 0xD3, 0xD1, 0xC9, 0xC7, 0xC6, 0xC5, 0xC4,
+ 0xC3, 0xB4, 0xAB, 0xA4, 0xA2, 0x95, 0x93, 0x91, 0x89, 0x87, 0x86, 0x85, 0x84,
+ 0x83, 0x76, 0x74, 0x72, 0x71, 0x68, 0x67, 0x66, 0x65, 0x64, 0x00, 0x60, 0xC3,
+ 0x83, 0x64, 0xC9, 0x89, 0x71, 0xC4, 0x84, 0x65, 0xF4, 0xF8, 0xF1, 0xF1, 0x60,
+ 0xC1, 0x81, 0x62, 0xF8, 0xF2, 0xF9, 0x6D, 0xE3, 0xB3, 0xA3, 0x6E, 0xC8, 0x88,
+ 0x69, 0x99, 0x9B, 0xD9, 0x78, 0x97, 0xD7, 0x76, 0x95, 0xD5, 0x69, 0x88, 0xC8,
+ 0xE3, 0xD2, 0xD1, 0xC3, 0xB3, 0xA3, 0x92, 0x91, 0x83, 0x73, 0x72, 0x64, 0xE3,
+ 0xB3, 0xA3, 0x60, 0x85, 0xC5, 0xE2, 0xA2, 0xC5, 0x85, 0xD5, 0x95, 0xC1, 0x81,
+ 0xD7, 0x97, 0xC1, 0x81, 0xD1, 0x91, 0x6D, 0xD9, 0x99, 0xD6, 0x96, 0xC6, 0x86,
+ 0x6D, 0xE3, 0xA3, 0xC1, 0x81, 0xD4, 0x94, 0xD9, 0x99, 0xD6, 0x96, 0xC6, 0x86,
+ 0x6D, 0xC4, 0x84, 0xC5, 0x85, 0xD2, 0x92, 0xC3, 0x83, 0xC1, 0x81, 0xD7, 0x97,
+ 0x6D, 0xC5, 0x85, 0xC4, 0x84, 0xD6, 0x96, 0xC3, 0x83, 0x6D, 0xE7, 0xA7, 0xC9,
+ 0x89, 0xD5, 0x95, 0xE4, 0xA4, 0x6D, 0xC4, 0x84, 0xC5, 0x85, 0xC4, 0x84, 0xD5,
+ 0x95, 0xC5, 0x85, 0x6D, 0xD9, 0x9B, 0xD6, 0x77, 0xC6, 0x67, 0x6D, 0xE3, 0xB3,
+ 0xC1, 0x62, 0xD4, 0x75, 0xD9, 0x9B, 0xD6, 0x77, 0xC6, 0x67, 0x6D, 0xC4, 0x65,
+ 0xC5, 0x66, 0xD2, 0x73, 0xC3, 0x64, 0xC1, 0x62, 0xD7, 0x78, 0x6D, 0xC5, 0x66,
+ 0xC4, 0x65, 0xD6, 0x77, 0xC3, 0x64, 0x6D, 0xE7, 0xB7, 0xC9, 0x71, 0xD5, 0x76,
+ 0xE4, 0xB4, 0x6D, 0xC4, 0x65, 0xC5, 0x66, 0xC4, 0x65, 0xD5, 0x76, 0xC5, 0x66,
+ 0xE3, 0xB3, 0xE3, 0xA3, 0xC3, 0x83, 0x64, 0xD6, 0x96, 0x77, 0xD4, 0x94, 0x75,
+ 0xC3, 0x83, 0x64, 0xF3, 0xF4, 0xF8, 0xF9, 0xF0, 0x00, 0xF3, 0xF1, 0x00, 0xF9,
+ 0xF6, 0xF1, 0xF0, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0,
+ 0xF6, 0xF9, 0xF4, 0xF7, 0xF0, 0xF3, 0xF2, 0xF1, 0xF0, 0xF2, 0xF4, 0xF9, 0xF8,
+ 0xF7, 0xF6, 0xF5, 0xF3, 0xF1, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xF4, 0xF3, 0xF2,
+ 0xF1, 0xF0, 0xF9, 0xF8, 0xF7, 0xF5, 0xF4, 0xF3, 0xF0, 0xF8, 0xF5, 0xF1, 0xF0,
+ 0xF3, 0xF6, 0xF9, 0xF4, 0xF1, 0xF2, 0xF5, 0xF2, 0xF1, 0xF0, 0xF9, 0xF0, 0xF1,
+ 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF5, 0xF0, 0xF9, 0xF8, 0xF6, 0xF5,
+ 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0x00, 0xF7, 0x00, 0xF6, 0xF8, 0xF2, 0xF1, 0xF0,
+ 0xF2, 0xF7, 0xF5, 0xF8, 0xF1, 0xF0, 0xF9, 0xF4, 0xF6, 0xF7, 0xF8, 0xF5, 0xF3,
+ 0xF2, 0xF1, 0x60, 0x62, 0xC1, 0xF8, 0xF7, 0xF9, 0xF8, 0xF1, 0xF7, 0xF6, 0xF3,
+ 0xF2, 0xF1, 0xF0, 0xF6, 0xF7, 0xF5, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3,
+ 0xF2, 0xF1, 0xF0, 0xF9, 0xF8, 0xF4, 0xF0, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3,
+ 0xF7, 0xF3, 0xF2, 0xF0, 0xF9, 0xF3, 0xF2, 0xF5, 0xF4, 0xF2, 0xF8, 0xF3, 0xF2,
+ 0xF1, 0xF0, 0xF6, 0xF5, 0xF0, 0xF2, 0xF0, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3,
+ 0xF1, 0xF3, 0xF5, 0xF1, 0xF3, 0xF8, 0xF4, 0xF1, 0xF8, 0xF9, 0xF2, 0xF6, 0xF3,
+ 0xF8, 0xF1, 0xF0, 0xF5, 0xF3, 0xF3, 0xF4, 0xF8, 0xF2, 0xF4, 0xF5, 0xF3, 0xF9,
+ 0xF8, 0xF7, 0xF6, 0xF4, 0xF1, 0xF8, 0xF7, 0xF5, 0xF3, 0xF0, 0xF4, 0xF6, 0xF5,
+ 0xF3, 0xF2, 0xF1, 0xF9, 0xF8, 0xF5, 0xF4, 0xF2, 0xF1, 0xF0, 0xF6, 0xF4, 0xF9,
+ 0xF0, 0xF0, 0xF4, 0xF5, 0xF7, 0xF6, 0xF5, 0xF2, 0xF2, 0xF7, 0xF1, 0xF0, 0xF6,
+ 0xF1, 0xF5, 0xF0, 0xF3, 0xF2, 0xF1, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF7, 0xF9,
+ 0xF5, 0xF4, 0xF3, 0xF2, 0xF0, 0xF5, 0xF6, 0xF3, 0xF0, 0xF4, 0xF6, 0xF7, 0xF8,
+ 0xF9, 0xF8, 0xF5, 0xF4, 0xF3, 0xF7, 0xF5, 0xF4, 0xF2, 0xF0, 0xF5, 0xF3, 0xF2,
+ 0xF2, 0xF5, 0xF5, 0xF5, 0xF4, 0xF1, 0xF4, 0xF3, 0xF2, 0xF1, 0xF2, 0xF9, 0xF7,
+ 0xF0, 0x00, 0xF2, 0xF1, 0xF7, 0xF6, 0xF0, 0xF1, 0xF4, 0xF8, 0xF5, 0xF0, 0xF2,
+ 0xF3, 0xF5, 0xF6, 0xF9, 0xF8, 0xF4, 0xF1, 0xF0, 0xF1, 0xF2, 0xF5, 0xF7, 0xF8,
+ 0xF8, 0xF7, 0xF6, 0xF5, 0xF3, 0xF9, 0xF3, 0xF6, 0x00, 0xF6, 0x00, 0xF0, 0xF7,
+ 0xF8, 0xF9, 0x00, 0xF0, 0xF5, 0xF4, 0xF9, 0xF8, 0xF7, 0xF6, 0xF1, 0xF0, 0xF3,
+ 0xF9, 0xF7, 0xF6, 0xF4, 0xF2, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2,
+ 0xF0, 0xF4, 0xF1, 0xF3, 0xF0, 0xF8, 0xF7, 0xF6, 0xF2, 0xF8, 0xF2, 0xF3, 0xF4,
+ 0xF6, 0xF5, 0xF4, 0xF6, 0xF5, 0xF3, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1,
+ 0xF0, 0xF8, 0xF9, 0xF7, 0xF6, 0xF5, 0xF3, 0xF1, 0xF7, 0xF3, 0xF2, 0xF2, 0xF1,
+ 0xF7, 0xF4, 0xF3, 0xF1, 0xF0, 0xF2, 0xF9, 0xF3, 0xF7, 0xF6, 0xF3, 0xF0, 0xF9,
+ 0xF7, 0xF8, 0xF5, 0xF7, 0xF3, 0xF2, 0xF1, 0xF0, 0xF0, 0xF9, 0xF8, 0xF7, 0xF6,
+ 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0x60, 0xF8, 0xF9, 0xF4, 0xF8, 0xF7, 0xF6, 0xF0,
+ 0xF0, 0xF1, 0xF9, 0xF3, 0xF4, 0xF2, 0xF1, 0xF0, 0xF6, 0xF5, 0xF1, 0x60, 0x9B,
+ 0xD9, 0xC9, 0x71, 0x60, 0xD6, 0x77, 0xD4, 0x75, 0xD5, 0x76, 0x76, 0xD5, 0xC1,
+ 0x62, 0xC5, 0x66, 0xD9, 0x9B, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xD5, 0x76, 0xC9,
+ 0x71, 0xE3, 0xB3, 0x60, 0xF5, 0xA2, 0xE2, 0xC3, 0x83, 0xE2, 0xA2, 0xD2, 0x92,
+ 0xC8, 0x88, 0x60, 0xF5, 0xC7, 0x87, 0xC7, 0x68, 0xF1, 0xF0, 0xF0, 0xC4, 0x84,
+ 0x65, 0xC9, 0x89, 0x71, 0xA2, 0xE2, 0x99, 0xD9, 0x99, 0xD9, 0xF2, 0xF3, 0xF8,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF5, 0xF6, 0xF9, 0xF8, 0xF4, 0xF9, 0xF6, 0xF4, 0xF3,
+ 0xF5, 0xF1, 0xF3, 0xF0, 0xF5, 0xF9, 0xF8, 0xF7, 0xF6, 0xF1, 0xF9, 0xF8, 0xF7,
+ 0xF0, 0xC9, 0xC7, 0xC1, 0x89, 0x87, 0x81, 0x85, 0xC5, 0xE2, 0xA2, 0xC5, 0x85,
+ 0xD5, 0x95, 0xC4, 0x84, 0xD9, 0x99, 0xC1, 0x81, 0xC4, 0x84, 0xD5, 0x95, 0xC1,
+ 0x81, 0xE3, 0xA3, 0xE2, 0xA2, 0xC5, 0x85, 0xC2, 0x82, 0x89, 0xC9, 0xC9, 0x89,
+ 0xC3, 0x83, 0xD6, 0x96, 0xF5, 0xC7, 0x87, 0xE3, 0xA3, 0xD4, 0x94, 0xC6, 0x86,
+ 0xC4, 0x84, 0x88, 0xC8, 0xD2, 0x92, 0x99, 0xD9, 0xE3, 0xD7, 0xD2, 0xA3, 0x97,
+ 0x92, 0xC3, 0x83, 0x92, 0xD2, 0xF2, 0xC1, 0x81, 0xD5, 0x95, 0xC1, 0x81, 0xD2,
+ 0x92, 0xC1, 0x81, 0xE3, 0xA3, 0xC1, 0x81, 0xD2, 0x92, 0xC8, 0x88, 0xE3, 0xA3,
+ 0xC4, 0x84, 0xC9, 0x89, 0xE6, 0xA6, 0xC6, 0x86, 0x95, 0xD5, 0xC1, 0x81, 0xD4,
+ 0x94, 0x96, 0xD6, 0xD9, 0x99, 0xD3, 0x93, 0x89, 0xC9, 0xC1, 0x81, 0x88, 0xC8,
+ 0xF5, 0xF2, 0xF1, 0xF0, 0xF9, 0xF8, 0xF4, 0xE3, 0xA3, 0xD4, 0x94, 0xC3, 0x83,
+ 0xC9, 0x89, 0xD3, 0x93, 0xD3, 0x93, 0xC9, 0x89, 0xD9, 0x99, 0x92, 0xD2, 0xC5,
+ 0x85, 0xC5, 0x85, 0xA6, 0xE6, 0xC5, 0x85, 0xD9, 0x99, 0xC2, 0x82, 0x85, 0xC5,
+ 0xD9, 0x99, 0xE8, 0xA8, 0xD9, 0x99, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xC8, 0xC7,
+ 0xC3, 0xC1, 0x88, 0x87, 0x83, 0x81, 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xA3, 0xC2,
+ 0x82, 0xC7, 0x87, 0xF8, 0xC1, 0x81, 0xF8, 0xF5, 0xD3, 0x93, 0xD6, 0x96, 0xD4,
+ 0xC2, 0x94, 0x82, 0x99, 0xD9, 0xF8, 0xC3, 0x83, 0xC9, 0x89, 0x83, 0xC3, 0xC9,
+ 0x89, 0xE3, 0xA3, 0xD3, 0x93, 0xC1, 0x81, 0xC2, 0x82, 0xF5, 0xC5, 0x85, 0xC7,
+ 0x87, 0xC1, 0x81, 0xD7, 0x97, 0xC5, 0x85, 0xC4, 0x84, 0x93, 0xD3, 0xC1, 0x81,
+ 0xE4, 0xA4, 0xC7, 0x87, 0xD5, 0x95, 0xC9, 0x89, 0xD3, 0x93, 0xC9, 0x89, 0xE3,
+ 0xA3, 0xD3, 0x93, 0xE4, 0xA4, 0xD4, 0x94, 0xA6, 0xE6, 0xC5, 0x85, 0xD9, 0x99,
+ 0xC2, 0x82, 0xC5, 0x85, 0xC8, 0x88, 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xA3, 0xC1,
+ 0x81, 0xD3, 0x93, 0xF2, 0xF0, 0xD6, 0x96, 0xF6, 0xF5, 0xC3, 0x83, 0xF7, 0xF8,
+ 0xF7, 0xD7, 0x97, 0xE2, 0xA2, 0xC9, 0x89, 0xD1, 0x91, 0xA3, 0xE3, 0xC6, 0x86,
+ 0xC9, 0x89, 0xA2, 0xE2, 0x85, 0xC5, 0xC4, 0x84, 0xD6, 0x96, 0xC3, 0x83, 0x85,
+ 0xC5, 0x85, 0xC5, 0xD3, 0xC2, 0x93, 0x82, 0x85, 0xC5, 0x85, 0xC5, 0xD3, 0xC2,
+ 0x93, 0x82, 0xF2, 0xF6, 0xF8, 0xF3, 0xF1, 0xC6, 0x86, 0xC9, 0x89, 0xD5, 0x95,
+ 0xC9, 0x89, 0xE3, 0xA3, 0xC1, 0x81, 0xD3, 0x93, 0xF1, 0xF1, 0xF3, 0xE2, 0xA2,
+ 0xE6, 0xA6, 0xD6, 0x96, 0xC4, 0x84, 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xD5, 0xA3,
+ 0x95, 0xC9, 0x89, 0xC8, 0x88, 0xC3, 0x83, 0xE2, 0xD6, 0xA2, 0x96, 0xE2, 0xC2,
+ 0xA2, 0x82, 0x97, 0xD7, 0xC1, 0x81, 0xC2, 0x82, 0xE4, 0xA4, 0xC9, 0x89, 0xE2,
+ 0xC4, 0xA2, 0x84, 0x83, 0xC3, 0xC9, 0x89, 0xD3, 0x93, 0xD3, 0x93, 0xC9, 0x89,
+ 0xD9, 0x99, 0xE6, 0xE4, 0xE3, 0xE2, 0xD7, 0xD2, 0xC9, 0xC8, 0xC7, 0xC5, 0xC2,
+ 0xC1, 0xA6, 0xA4, 0xA3, 0xA2, 0x97, 0x92, 0x89, 0x88, 0x87, 0x85, 0x82, 0x81,
+ 0xC9, 0x89, 0xF7, 0xF4, 0xF3, 0xF5, 0xF0, 0xF8, 0xF9, 0xF2, 0xF1, 0x60, 0xE2,
+ 0xAB, 0xA2, 0x60, 0xF2, 0xF1, 0xF3, 0xF2, 0xD2, 0x92, 0xC5, 0x85, 0xC5, 0x85,
+ 0x73, 0x92, 0xD2, 0xF2, 0x6D, 0x60, 0xC8, 0x88, 0x69, 0xF7, 0xF0, 0xF7, 0xF0,
+ 0xF5, 0xF4, 0xF0, 0xF8, 0xF7, 0xF3, 0xF6, 0xF7, 0xF0, 0xF1, 0xF7, 0xF4, 0xF3,
+ 0xF0, 0xF0, 0xF5, 0xF7, 0xF0, 0xF7, 0xF1, 0xF6, 0xF0, 0xF4, 0xF8, 0xF1, 0xF0,
+ 0xF5, 0xF9, 0xF6, 0xF5, 0xF3, 0xF2, 0xF1, 0xF0, 0xF8, 0xF4, 0xF7, 0xF5, 0xF2,
+ 0xF1, 0xF0, 0xF8, 0xF8, 0xF3, 0xF5, 0xF6, 0xF7, 0xF9, 0xF3, 0xF0, 0xF4, 0xF5,
+ 0xF0, 0xF1, 0xF6, 0xF7, 0xF8, 0xF9, 0xF3, 0xF2, 0xF4, 0xF6, 0xF7, 0xF9, 0xF0,
+ 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xF0, 0xF3, 0xF1, 0xF4, 0xF2,
+ 0xF6, 0xF7, 0xF8, 0xF5, 0xF4, 0xF3, 0xF2, 0xF6, 0xF8, 0xF4, 0xF5, 0xF3, 0xF7,
+ 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF3,
+ 0xF1, 0xF7, 0xF3, 0xF2, 0xF0, 0xF3, 0xF2, 0xF6, 0xF0, 0xF9, 0xF8, 0xF7, 0xF5,
+ 0xF3, 0xF0, 0xF7, 0xF8, 0xF9, 0xF8, 0xF1, 0xF7, 0xF0, 0xF1, 0xF2, 0xF3, 0xF6,
+ 0xF6, 0xF5, 0xF7, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9,
+ 0xF8, 0xF9, 0xF0, 0xF4, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xF8, 0xF7,
+ 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xF0, 0xF2, 0xF3, 0xF7, 0xF2, 0xF3,
+ 0xF9, 0xF2, 0xF4, 0xF5, 0xF0, 0xF1, 0xF2, 0xF3, 0xF6, 0xF5, 0xF0, 0xF2, 0xF1,
+ 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF5, 0xF3, 0xF8, 0xF3, 0xF1, 0xF2, 0xF9,
+ 0xF6, 0xF3, 0xF0, 0xF1, 0xF8, 0xF5, 0xF3, 0xF3, 0xF4, 0xF9, 0xF8, 0xF7, 0xF6,
+ 0xF8, 0xF7, 0xF5, 0xF3, 0xF0, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF9, 0xF8,
+ 0xF5, 0xF4, 0xF2, 0xF1, 0xF0, 0xF6, 0xF1, 0xF0, 0xF5, 0xF1, 0xF2, 0xF3, 0xF8,
+ 0xF7, 0xF6, 0xF5, 0xF4, 0xF9, 0xF0, 0xF2, 0xF3, 0xF4, 0xF5, 0xF5, 0xF6, 0xF3,
+ 0xF4, 0xF0, 0xF9, 0xF8, 0xF7, 0xF6, 0xF8, 0xF7, 0xF5, 0xF4, 0xF2, 0xF5, 0xF3,
+ 0xF2, 0xF2, 0xF1, 0xF6, 0xF6, 0xF0, 0xF9, 0xF8, 0xF7, 0xF4, 0xF6, 0xF5, 0xF3,
+ 0xF4, 0xF0, 0xF6, 0xF4, 0xF3, 0xF1, 0xF0, 0xF9, 0xF3, 0xF3, 0xF2, 0xF1, 0xF0,
+ 0xF9, 0xF8, 0xF7, 0xF5, 0xF4, 0xF3, 0xF2, 0xF0, 0xF8, 0xF0, 0xF1, 0xF4, 0xF8,
+ 0xF8, 0xF2, 0xF4, 0xF5, 0xF3, 0xF4, 0xF1, 0xF7, 0xF6, 0xF4, 0xF9, 0xF0, 0xF7,
+ 0xF5, 0xF2, 0xF2, 0xF7, 0xF5, 0xF4, 0xF3, 0xF2, 0xF5, 0xF5, 0xF5, 0xF4, 0xF1,
+ 0xF4, 0xF3, 0xF2, 0xF1, 0xF2, 0xF9, 0xF2, 0xF1, 0xF7, 0xF3, 0xF8, 0xF5, 0xF7,
+ 0xF3, 0xF2, 0xF9, 0xF8, 0xF5, 0xF4, 0xF1, 0xF0, 0xF6, 0xF5, 0xF3, 0xF2, 0xF1,
+ 0xF0, 0xC4, 0x84, 0x65, 0xC9, 0x89, 0x71, 0xE2, 0xAB, 0xA2, 0xF1, 0xF0, 0xC3,
+ 0x83, 0x64, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xE3,
+ 0xB3, 0xA3, 0xF9, 0xF8, 0xF7, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xC3, 0x83,
+ 0x64, 0x60, 0xC1, 0x81, 0xF2, 0x60, 0xE2, 0xAB, 0xA2, 0xC3, 0x83, 0x64, 0xE4,
+ 0xB4, 0xA4, 0x60, 0xF6, 0xF4, 0xF6, 0xF1, 0x60, 0x76, 0xD5, 0xC9, 0x71, 0xE3,
+ 0xB3, 0xC1, 0x62, 0xD3, 0x74, 0x60, 0xF1, 0x4B, 0xF3, 0x60, 0xE2, 0xAB, 0xE6,
+ 0xB6, 0xD6, 0x77, 0xC4, 0x65, 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xA3, 0xC1, 0x81,
+ 0xD3, 0x93, 0x60, 0xF1, 0x4B, 0xF3, 0x60, 0xE2, 0xA2, 0xE6, 0xA6, 0xD6, 0x96,
+ 0xC4, 0x84, 0xD5, 0x95, 0xD5, 0x76, 0xC9, 0x89, 0x71, 0xE6, 0xB6, 0xA6, 0xF2,
+ 0x60, 0x76, 0xD5, 0xC9, 0x71, 0xE3, 0xB3, 0xC1, 0x62, 0xD3, 0x74, 0x60, 0xE2,
+ 0xAB, 0xE6, 0xB6, 0xD6, 0x77, 0xC4, 0x65, 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xA3,
+ 0xC1, 0x81, 0xD3, 0x93, 0x60, 0xE2, 0xA2, 0xE6, 0xA6, 0xD6, 0x96, 0xC4, 0x84,
+ 0xD5, 0x95, 0xD5, 0x76, 0xC9, 0x89, 0x71, 0xE6, 0xB6, 0xA6, 0x00, 0x60, 0x00,
+ 0xF5, 0xF3, 0x60, 0xF6, 0xF3, 0xF4, 0xF9, 0xF7, 0xF8, 0xF5, 0xF2, 0xF1, 0x60,
+ 0xF9, 0xF5, 0xF8, 0xF0, 0xD9, 0x99, 0xF1, 0xF9, 0xF9, 0xF1, 0x7A, 0xB5, 0xE5,
+ 0xE5, 0xA5, 0xD9, 0x99, 0xD9, 0x9B, 0xC9, 0x89, 0x71, 0x4B, 0xF6, 0xF7, 0xF8,
+ 0xF9, 0xF1, 0xF7, 0xF8, 0xF9, 0xF1, 0xF8, 0xF8, 0xF9, 0xF1, 0xF8, 0xF8, 0xF9,
+ 0xF1, 0xF8, 0xF8, 0xF9, 0xF1, 0xF7, 0xF8, 0xF9, 0xF1, 0xF7, 0xF8, 0xF9, 0xF1,
+ 0xF8, 0xF9, 0xF1, 0xF9, 0xF8, 0xF9, 0xF1, 0x00, 0x7A, 0x00, 0x7A, 0x00, 0x7A,
+ 0x00, 0x7A, 0x00, 0x7A, 0x00, 0x7A, 0x00, 0x7A, 0x00, 0x7A, 0x00, 0xF5, 0x7A,
+ 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0x60, 0xF9, 0xF5, 0xF8,
+ 0xF4, 0xA2, 0xAB, 0xE2, 0xE4, 0xB4, 0xA4, 0x60, 0xF6, 0xF4, 0xF8, 0xF6, 0xF8,
+ 0xF1, 0xC9, 0x89, 0xF6, 0x6D, 0x60, 0xD6, 0x96, 0x77, 0xD5, 0x95, 0xD4, 0x94,
+ 0x75, 0xD9, 0x9B, 0x99, 0x60, 0x95, 0xD5, 0xC1, 0x81, 0xC5, 0x85, 0xF8, 0xF1,
+ 0xF0, 0xF6, 0xF5, 0xF9, 0xF7, 0xF8, 0xF9, 0xF1, 0x60, 0xF1, 0xF0, 0xF6, 0xF5,
+ 0x6D, 0xC3, 0x83, 0x64, 0x6D, 0xC3, 0x83, 0x6D, 0x64, 0xD9, 0xC9, 0x99, 0x89,
+ 0x71, 0xF9, 0x60, 0xD5, 0x76, 0xC9, 0x71, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0x60,
+ 0xD5, 0x95, 0xC9, 0x89, 0xE3, 0xA3, 0xE3, 0xB3, 0x71, 0xC9, 0xD1, 0x72, 0x89,
+ 0xC9, 0xD1, 0x91, 0xD5, 0x95, 0xD5, 0x76, 0xC1, 0x81, 0x62, 0xF3, 0xD2, 0x92,
+ 0x73, 0xF9, 0x6D, 0x96, 0xD6, 0xD9, 0x99, 0xE4, 0xA4, 0xC5, 0x85, 0x4E, 0xF0,
+ 0xF5, 0xF8, 0x60, 0xD3, 0x93, 0xC1, 0x81, 0xE4, 0xA4, 0xC7, 0x87, 0xD5, 0x95,
+ 0xC9, 0x89, 0xD3, 0x93, 0xC9, 0x89, 0xE3, 0xA3, 0xD6, 0x77, 0xD9, 0x9B, 0xE4,
+ 0xB4, 0xC5, 0x66, 0x4E, 0xF0, 0xF5, 0xF8, 0x60, 0xD3, 0x74, 0xC1, 0x62, 0xE4,
+ 0xB4, 0xC7, 0x68, 0xD5, 0x76, 0xC9, 0x71, 0xD3, 0x74, 0xC9, 0x71, 0xE3, 0xB3,
+ 0xD3, 0x74, 0xD3, 0x93, 0xE4, 0xB4, 0xA4, 0xD4, 0x94, 0x75, 0x60, 0x6D, 0xE3,
+ 0xB3, 0xC6, 0x67, 0x6D, 0xE3, 0xA3, 0xC6, 0x86, 0xC9, 0x89, 0xC9, 0x71, 0x60,
+ 0xE2, 0xAB, 0xA2, 0xF2, 0x60, 0xC3, 0x83, 0x64, 0xE2, 0xAB, 0xA2, 0xC1, 0x81,
+ 0x62, 0xC5, 0x85, 0x66, 0xC5, 0x85, 0x66, 0x74, 0x93, 0xD3, 0x63, 0x82, 0xC2,
+ 0xD3, 0xC2, 0x93, 0x82, 0x74, 0x63, 0x60, 0xC5, 0x85, 0x66, 0xC5, 0x85, 0x66,
+ 0x74, 0x93, 0xD3, 0x63, 0x82, 0xC2, 0xD3, 0xC2, 0x93, 0x82, 0x74, 0x63, 0x60,
+ 0xF2, 0xF6, 0xF8, 0xF3, 0xF1, 0xF8, 0xF3, 0xF1, 0x60, 0xC6, 0x86, 0x67, 0x00,
+ 0x60, 0xE2, 0xAB, 0xA2, 0xF9, 0xF1, 0x60, 0xA2, 0xE2, 0xE6, 0xA6, 0xD6, 0x96,
+ 0xC4, 0x84, 0xD5, 0x95, 0xE2, 0xAB, 0xE6, 0xB6, 0xD6, 0x77, 0xC4, 0x65, 0xD5,
+ 0x76, 0xF9, 0xF6, 0xF5, 0xF3, 0xF2, 0xF1, 0xF0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
+ 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xF6, 0xF5, 0xC9, 0x71, 0xC9, 0x89,
+ 0xE3, 0xE2, 0xC3, 0xB3, 0xAB, 0xA3, 0xA2, 0x83, 0x64, 0xC9, 0x89, 0x71, 0xC8,
+ 0x88, 0x69, 0xF8, 0xD6, 0x77, 0xF8, 0xD6, 0x96, 0xC3, 0x83, 0x64, 0xE2, 0xAB,
+ 0xA2, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xC1, 0x81, 0x62, 0xE2, 0xD6, 0xAB, 0xA2,
+ 0x96, 0x77, 0xE2, 0xC2, 0xC1, 0xAB, 0xA2, 0x82, 0x81, 0x63, 0xD7, 0xC5, 0x97,
+ 0x85, 0xD9, 0xC2, 0x99, 0x82, 0x63, 0xE8, 0xE2, 0xD7, 0xC8, 0xC3, 0xA8, 0xA2,
+ 0x97, 0x88, 0x83, 0x78, 0x64, 0xC9, 0x89, 0x71, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5,
+ 0xC1, 0x62, 0xD6, 0x77, 0xE2, 0xC2, 0xC1, 0xAB, 0x63, 0x62, 0xE7, 0xE4, 0xD3,
+ 0xC3, 0xC2, 0xB7, 0xB4, 0xA7, 0xA4, 0x93, 0x83, 0x82, 0x74, 0x64, 0x63, 0xE8,
+ 0xE2, 0xD7, 0xC8, 0xB8, 0xAB, 0x78, 0x69, 0x9B, 0x99, 0xD9, 0xE2, 0xD5, 0xC4,
+ 0xAB, 0xA2, 0x95, 0x84, 0x76, 0x65, 0x69, 0x49, 0x74, 0x73, 0x63, 0x54, 0x53,
+ 0x43, 0x69, 0x49, 0x68, 0x48, 0x38, 0xC9, 0x89, 0x71, 0x6F, 0x4F, 0x63, 0x43,
+ 0x73, 0x53, 0x31, 0x32, 0x33, 0x34, 0x35, 0x61, 0x41, 0x73, 0x6F, 0x53, 0x4F,
+ 0x69, 0x49, 0x66, 0xC5, 0xD7, 0x78, 0x73, 0x62, 0x61, 0x53, 0x42, 0x41, 0xD9,
+ 0x9B, 0x70, 0x65, 0x50, 0x45, 0x72, 0x62, 0x52, 0x42, 0x78, 0x75, 0x6C, 0x63,
+ 0x62, 0x58, 0x55, 0x4C, 0x43, 0x42, 0x79, 0x73, 0x70, 0x68, 0x63, 0x59, 0x53,
+ 0x50, 0x48, 0x43, 0x69, 0x49, 0x52, 0x72, 0x73, 0x6E, 0x64, 0x53, 0x4E, 0x44,
+ 0x35, 0x36, 0x28, 0x78, 0x77, 0x75, 0x74, 0x73, 0x72, 0x70, 0x6D, 0x6C, 0x6B,
+ 0x6A, 0x69, 0x68, 0x67, 0x65, 0x63, 0x62, 0x61, 0x58, 0x57, 0x55, 0x54, 0x53,
+ 0x52, 0x50, 0x4D, 0x4C, 0x4B, 0x4A, 0x49, 0x48, 0x47, 0x45, 0x43, 0x42, 0x41,
+ 0x39, 0x38, 0x34, 0xFE, 0xFE, 0x00, 0xFE, 0xFE, 0x00, 0xFE, 0xFE, 0xFE, 0xFE
+};
diff --git a/os400/iconv/iconv.c b/os400/iconv/iconv.c
new file mode 100644
index 0000000..c85c268
--- /dev/null
+++ b/os400/iconv/iconv.c
@@ -0,0 +1,154 @@
+/**
+*** iconv_open(), iconv(), iconv_close() wrappers for the OS/400.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "/QIBM/include/iconv.h" /* Force system definition. */
+
+#define USE_SYSTEM_ICONV
+#include "iconv.h" /* Use local definitions. */
+
+
+
+/**
+*** Bring-in the name-->CCSID mapping DFA tables.
+**/
+
+#include "ianatables.c"
+
+
+
+static int
+findEncoding(const unsigned char * * namep)
+
+{
+ t_staterange curstate;
+ t_ccsid ccsid;
+ t_ccsid final;
+ t_transrange l;
+ t_transrange h;
+ const unsigned char * name;
+
+ /**
+ *** Get the CCSID correspong to the name at *`namep'.
+ *** If success, update pointer at `namep' to 1st byte after matched
+ *** name and return the CCSID.
+ *** If failure, set errno and return -1.
+ **/
+
+ if (!namep || !(name = *namep)) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ curstate = 0;
+ final = 0;
+
+ for (;;) {
+ if (curstate < sizeof final_array / sizeof final_array[0])
+ if (final_array[curstate]) {
+ final = final_array[curstate];
+ *namep = name;
+ }
+
+ l = trans_array[curstate] - 1;
+ h = trans_array[curstate + 1];
+
+ do {
+ if (++l >= h) {
+ if (!final) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return final - 1;
+ }
+ } while (label_array[l] != *name);
+
+ curstate = goto_array[l];
+ name++;
+ }
+
+ /* NOTREACHED. */
+}
+
+
+static void
+makeos400codename(char * buf, unsigned int ccsid)
+
+{
+ ccsid &= 0xFFFF;
+ memset(buf, 0, 32);
+ sprintf(buf, "IBMCCSID%05u0000000", ccsid);
+}
+
+
+Iconv_t
+IconvOpen(const char * tocode, const char * fromcode)
+
+{
+ int toccsid = findEncoding(&tocode);
+ int fromccsid = findEncoding(&fromcode);
+ char fromibmccsid[33];
+ char toibmccsid[33];
+ iconv_t * cd;
+
+ if (toccsid < 0 || fromccsid < 0)
+ return (Iconv_t) -1;
+
+ makeos400codename(fromibmccsid, fromccsid);
+ makeos400codename(toibmccsid, toccsid);
+ memset(toibmccsid + 13, 0, sizeof toibmccsid - 13);
+
+ cd = (iconv_t *) malloc(sizeof *cd);
+
+ if (!cd)
+ return (Iconv_t) -1;
+
+ *cd = iconv_open(toibmccsid, fromibmccsid);
+
+ if (cd->return_value) {
+ free((char *) cd);
+ return (Iconv_t) -1;
+ }
+
+ return (Iconv_t) cd;
+}
+
+
+size_t
+Iconv(Iconv_t cd, char * * inbuf, size_t * inbytesleft,
+ char * * outbuf, size_t * outbytesleft)
+
+{
+ if (!cd || cd == (Iconv_t) -1) {
+ errno = EINVAL;
+ return (size_t) -1;
+ }
+
+ return iconv(*(iconv_t *) cd, inbuf, inbytesleft, outbuf, outbytesleft);
+}
+
+
+int
+IconvClose(Iconv_t cd)
+
+{
+ if (!cd || cd == (Iconv_t) -1) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (iconv_close(*(iconv_t *) cd))
+ return -1;
+
+ free((char *) cd);
+ return 0;
+}
diff --git a/os400/iconv/iconv.h b/os400/iconv/iconv.h
new file mode 100644
index 0000000..87a8bbc
--- /dev/null
+++ b/os400/iconv/iconv.h
@@ -0,0 +1,40 @@
+/**
+*** Declarations for the iconv wrappers.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#ifndef __ICONV_H_
+#define __ICONV_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stddef.h> /* For size_t. */
+
+
+typedef void * Iconv_t;
+
+
+Iconv_t IconvOpen(const char * tocode, const char * fromcode);
+size_t Iconv(Iconv_t cd, char * * inbuf, size_t * inbytesleft,
+ char * * outbuf, size_t * outbytesleft);
+int IconvClose(Iconv_t cd);
+
+
+#ifndef USE_SYSTEM_ICONV
+#define iconv_t Iconv_t
+#define iconv_open IconvOpen
+#define iconv Iconv
+#define iconv_close IconvClose
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/os400/initscript.sh b/os400/initscript.sh
new file mode 100644
index 0000000..fb80507
--- /dev/null
+++ b/os400/initscript.sh
@@ -0,0 +1,290 @@
+#!/bin/sh
+#
+# Compilation scripts initialization for the OS/400 implementation.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+
+case "${SCRIPTDIR}" in
+/*) ;;
+*) SCRIPTDIR="`pwd`/${SCRIPTDIR}"
+esac
+
+while true
+do case "${SCRIPTDIR}" in
+ */.) SCRIPTDIR="${SCRIPTDIR%/.}";;
+ *) break;;
+ esac
+done
+
+# The script directory is supposed to be in $TOPDIR/os400.
+
+TOPDIR=`dirname "${SCRIPTDIR}"`
+export SCRIPTDIR TOPDIR
+
+
+setenv()
+
+{
+ # Define and export.
+
+ eval ${1}="${2}"
+ export ${1}
+}
+
+
+################################################################################
+#
+# Tunable configuration parameters.
+#
+################################################################################
+
+setenv TARGETLIB 'LIBXML2' # Target OS/400 program library.
+setenv STATBNDDIR 'LIBXML2_A' # Static binding directory.
+setenv DYNBNDDIR 'LIBXML2' # Dynamic binding directory.
+setenv SRVPGM "LIBXML2" # Service program.
+setenv TGTCCSID '500' # Target CCSID of objects.
+setenv DEBUG '*ALL' # Debug level.
+setenv OPTIMIZE '10' # Optimisation level.
+setenv OUTPUT '*NONE' # Compilation output option.
+setenv TGTRLS 'V5R3M0' # Target OS release.
+setenv IFSDIR '/libxml2' # Installation IFS directory.
+
+
+################################################################################
+#
+# Conditional compilation parameters.
+#
+################################################################################
+
+setenv WITH_TRIO 1 # Configure trio support.
+setenv WITH_THREADS 1 # Configure thread support.
+setenv WITH_THREAD_ALLOC 1 # Whether allocation hooks are per-thread.
+setenv WITH_TREE 1 # Compile DOM tree API.
+setenv WITH_OUTPUT 1 # Compile serialization/saving support.
+setenv WITH_PUSH 1 # Compile push parser.
+setenv WITH_READER 1 # Compile parsing interface.
+setenv WITH_PATTERN 1 # Compile pattern node selection interface.
+setenv WITH_WRITER 1 # Compile saving interface.
+setenv WITH_SAX1 1 # Compile SAX version 1 interface.
+setenv WITH_FTP 1 # Compile FTP support.
+setenv WITH_HTTP 1 # Compile HTTP support.
+setenv WITH_VALID 1 # Compile DTD validation support.
+setenv WITH_HTML 1 # Compile HTML support.
+setenv WITH_LEGACY 1 # Compile deprecated API.
+setenv WITH_C14N 1 # Compile canonicalization support.
+setenv WITH_CATALOG 1 # Compile catalog support.
+setenv WITH_DOCB 1 # Compile SGML Docbook support.
+setenv WITH_XPATH 1 # Compile XPath support.
+setenv WITH_XPTR 1 # Compile XPointer support.
+setenv WITH_XINCLUDE 1 # Compile XInclude support.
+setenv WITH_ICONV 1 # Whether iconv support is available.
+setenv WITH_ICU 0 # Whether icu support is available.
+setenv WITH_ISO8859X 1 # Compile ISO-8859-* support if no iconv.
+setenv WITH_DEBUG 1 # Compile debugging module.
+setenv WITH_MEM_DEBUG 1 # Compile memory debugging module.
+setenv WITH_RUN_DEBUG 1 # Compile runtime debugging.
+setenv WITH_REGEXPS 1 # Compile regular expression interfaces.
+setenv WITH_SCHEMAS 1 # Compile schema validation interface.
+setenv WITH_SCHEMATRON 1 # Compile schematron validation interface.
+setenv WITH_MODULES 1 # Compile module interfaces.
+setenv WITH_ZLIB 0 # Whether zlib is available.
+setenv WITH_LZMA 0 # Whether LZMA is available.
+
+# Define ZLIB locations. This is ignored if WITH_ZLIB is 0.
+
+setenv ZLIB_INCLUDE '/zlib/include' # ZLIB include IFS directory.
+setenv ZLIB_LIB 'ZLIB' # ZLIB library.
+setenv ZLIB_BNDDIR 'ZLIB_A' # ZLIB binding directory.
+
+################################################################################
+#
+# OS/400 specific definitions.
+#
+################################################################################
+
+setenv LIBIFSNAME "/QSYS.LIB/${TARGETLIB}.LIB"
+setenv MODULE_EXTENSION '.SRVPGM'
+
+
+################################################################################
+#
+# Extract version information.
+#
+################################################################################
+
+
+# Transitional: get file name of configure script.
+
+AUTOCONFSCRIPT="${TOPDIR}/configure.ac"
+
+if [ ! -f "${AUTOCONFSCRIPT}" ]
+then AUTOCONFSCRIPT="${TOPDIR}/configure.in"
+fi
+
+# Need to get the version definitions.
+
+eval "`grep '^LIBXML_[A-Z]*_VERSION=' \"${AUTOCONFSCRIPT}\"`"
+eval "`grep '^LIBXML_MICRO_VERSION_SUFFIX=' \"${AUTOCONFSCRIPT}\"`"
+LIBXML_VERSION="${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}"
+LIBXML_VERSION="${LIBXML_VERSION}.${LIBXML_MICRO_VERSION}"
+LIBXML_VERSION="${LIBXML_VERSION}${LIBXML_MICRO_VERSION_SUFFIX}"
+LIBXML_VERSION_NUMBER=`expr "${LIBXML_MAJOR_VERSION}" \* 10000 + \
+ "${LIBXML_MINOR_VERSION}" \* 100 + \
+ "${LIBXML_MICRO_VERSION}"`
+export LIBXML_MAJOR_VERSION LIBXML_MINOR_VERSION
+export LIBXML_MICRO_VERSION LIBXML_MICROVERSION_SUFFIX
+export LIBXML_VERSION LIBXML_VERSION_NUMBER
+setenv LIBXML_VERSION_EXTRA ''
+setenv VERSION "${LIBXML_VERSION}"
+
+
+################################################################################
+#
+# Procedures.
+#
+################################################################################
+
+# action_needed dest [src]
+#
+# dest is an object to build
+# if specified, src is an object on which dest depends.
+#
+# exit 0 (succeeds) if some action has to be taken, else 1.
+
+action_needed()
+
+{
+ [ ! -e "${1}" ] && return 0
+ [ "${2}" ] || return 1
+ [ "${1}" -ot "${2}" ] && return 0
+ return 1
+}
+
+
+# make_module module_name source_name [additional_definitions]
+#
+# Compile source name into ASCII module if needed.
+# As side effect, append the module name to variable MODULES.
+# Set LINK to "YES" if the module has been compiled.
+
+make_module()
+
+{
+ MODULES="${MODULES} ${1}"
+ MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
+ action_needed "${MODIFSNAME}" "${2}" || return 0;
+
+ # #pragma convert has to be in the source file itself, i.e.
+ # putting it in an include file makes it only active
+ # for that include file.
+ # Thus we build a temporary file with the pragma prepended to
+ # the source file and we compile that temporary file.
+
+ rm -f __tmpsrcf.c
+ if [ "${4}" != 'ebcdic' ]
+ then echo "#line 1 \"${2}\"" >> __tmpsrcf.c
+ echo "#pragma convert(819)" >> __tmpsrcf.c
+ echo '#include "wrappers.h"' >> __tmpsrcf.c
+ fi
+ echo "#line 1 \"${2}\"" >> __tmpsrcf.c
+ cat "${2}" >> __tmpsrcf.c
+ CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('__tmpsrcf.c')"
+# CMD="${CMD} OPTION(*INCDIRFIRST *SHOWINC *SHOWSYS)"
+ CMD="${CMD} OPTION(*INCDIRFIRST)"
+ CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
+ CMD="${CMD} INCDIR("
+ CMD="${CMD} '${TOPDIR}/os400/iconv'"
+ if [ "${4}" != 'ebcdic' ]
+ then CMD="${CMD} '/qibm/proddata/qadrt/include'"
+ fi
+ CMD="${CMD} '${TOPDIR}/os400' '${TOPDIR}/os400/dlfcn'"
+ CMD="${CMD} '${IFSDIR}/include/libxml' '${IFSDIR}/include'"
+ if [ "${ZLIB_INCLUDE}" ]
+ then CMD="${CMD} '${ZLIB_INCLUDE}'"
+ fi
+ CMD="${CMD} '${TOPDIR}' ${INCLUDES})"
+ CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
+ CMD="${CMD} OUTPUT(${OUTPUT})"
+ CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
+ CMD="${CMD} DBGVIEW(${DEBUG})"
+ CMD="${CMD} DEFINE('_REENTRANT' 'TRIO_HAVE_CONFIG_H' 'NDEBUG' ${3})"
+
+ system "${CMD}"
+ rm -f __tmpsrcf.c
+ LINK=YES
+}
+
+
+# Determine DB2 object name from IFS name.
+
+db2_name()
+
+{
+ if [ "${2}" = 'nomangle' ]
+ then basename "${1}" |
+ tr 'a-z-' 'A-Z_' |
+ sed -e 's/\..*//' \
+ -e 's/^\(..........\).*$/\1/'
+ else basename "${1}" |
+ tr 'a-z-' 'A-Z_' |
+ sed -e 's/\..*//' \
+ -e 's/^TEST/T/' \
+ -e 's/^XML/X/' \
+ -e 's/^\(.\).*\(.........\)$/\1\2/'
+ fi
+}
+
+
+# Copy IFS file replacing version & configuration info.
+
+versioned_copy()
+
+{
+ sed -e "s/@LIBXML_VERSION@/${LIBXML_VERSION}/g" \
+ \
+ -e "s#@LIBXML_MAJOR_VERSION@#${LIBXML_MAJOR_VERSION}#g" \
+ -e "s#@LIBXML_MINOR_VERSION@#${LIBXML_MINOR_VERSION}#g" \
+ -e "s#@LIBXML_MICRO_VERSION@#${LIBXML_MICRO_VERSION}#g" \
+ -e "s#@LIBXML_MICRO_VERSION_SUFFIX@#${LIBXML_MICRO_VERSION_SUFFIX}#g" \
+ -e "s#@LIBXML_VERSION@#${LIBXML_VERSION}#g" \
+ -e "s#@LIBXML_VERSION_NUMBER@#${LIBXML_VERSION_NUMBER}#g" \
+ -e "s#@LIBXML_VERSION_EXTRA@#${LIBXML_VERSION_EXTRA}#g" \
+ -e "s#@VERSION@#${VERSION}#g" \
+ -e "s#@WITH_TRIO@#${WITH_TRIO}#g" \
+ -e "s#@WITH_THREADS@#${WITH_THREADS}#g" \
+ -e "s#@WITH_THREAD_ALLOC@#${WITH_THREAD_ALLOC}#g" \
+ -e "s#@WITH_TREE@#${WITH_TREE}#g" \
+ -e "s#@WITH_OUTPUT@#${WITH_OUTPUT}#g" \
+ -e "s#@WITH_PUSH@#${WITH_PUSH}#g" \
+ -e "s#@WITH_READER@#${WITH_READER}#g" \
+ -e "s#@WITH_PATTERN@#${WITH_PATTERN}#g" \
+ -e "s#@WITH_WRITER@#${WITH_WRITER}#g" \
+ -e "s#@WITH_SAX1@#${WITH_SAX1}#g" \
+ -e "s#@WITH_FTP@#${WITH_FTP}#g" \
+ -e "s#@WITH_HTTP@#${WITH_HTTP}#g" \
+ -e "s#@WITH_VALID@#${WITH_VALID}#g" \
+ -e "s#@WITH_HTML@#${WITH_HTML}#g" \
+ -e "s#@WITH_LEGACY@#${WITH_LEGACY}#g" \
+ -e "s#@WITH_C14N@#${WITH_C14N}#g" \
+ -e "s#@WITH_CATALOG@#${WITH_CATALOG}#g" \
+ -e "s#@WITH_DOCB@#${WITH_DOCB}#g" \
+ -e "s#@WITH_XPATH@#${WITH_XPATH}#g" \
+ -e "s#@WITH_XPTR@#${WITH_XPTR}#g" \
+ -e "s#@WITH_XINCLUDE@#${WITH_XINCLUDE}#g" \
+ -e "s#@WITH_ICONV@#${WITH_ICONV}#g" \
+ -e "s#@WITH_ICU@#${WITH_ICU}#g" \
+ -e "s#@WITH_ISO8859X@#${WITH_ISO8859X}#g" \
+ -e "s#@WITH_DEBUG@#${WITH_DEBUG}#g" \
+ -e "s#@WITH_MEM_DEBUG@#${WITH_MEM_DEBUG}#g" \
+ -e "s#@WITH_RUN_DEBUG@#${WITH_RUN_DEBUG}#g" \
+ -e "s#@WITH_REGEXPS@#${WITH_REGEXPS}#g" \
+ -e "s#@WITH_SCHEMAS@#${WITH_SCHEMAS}#g" \
+ -e "s#@WITH_SCHEMATRON@#${WITH_SCHEMATRON}#g" \
+ -e "s#@WITH_MODULES@#${WITH_MODULES}#g" \
+ -e "s#@WITH_ZLIB@#${WITH_ZLIB}#g" \
+ -e "s#@WITH_LZMA@#${WITH_LZMA}#g"
+}
diff --git a/os400/libxmlrpg/DOCBparser.rpgle b/os400/libxmlrpg/DOCBparser.rpgle
new file mode 100644
index 0000000..bf5aaa2
--- /dev/null
+++ b/os400/libxmlrpg/DOCBparser.rpgle
@@ -0,0 +1,116 @@
+ * Summary: old DocBook SGML parser
+ * Description: interface for a DocBook SGML non-verifying parser
+ * This code is DEPRECATED, and should not be used anymore.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(DOCB_PARSER_H__)
+ /define DOCB_PARSER_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_DOCB_ENABLED)
+
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/parserInternals"
+
+ * Most of the back-end structures from XML and SGML are shared.
+
+ d docbParserCtxtPtr...
+ d s based(######typedef######)
+ d like(xmlParserCtxtPtr)
+
+ d docbParserCtxt ds based(docbParserCtxtPtr)
+ d likeds(xmlParserCtxt)
+
+ d docbSAXHandlerPtr...
+ d s based(######typedef######)
+ d like(xmlSAXHandlerPtr)
+
+ d docbSAXHandler ds based(docbSAXHandlerPtr)
+ d likeds(xmlSAXHandler)
+
+ d docbParserInputPtr...
+ d s based(######typedef######)
+ d like(xmlParserInputPtr)
+
+ d docbParserInput...
+ d ds based(docbParserInputPtr)
+ d likeds(xmlParserInput)
+
+ d docbDocPtr s based(######typedef######)
+ d like(xmlDocPtr)
+
+ * There is only few public functions.
+
+ d docbEncodeEntities...
+ d pr 10i 0 extproc('docbEncodeEntities')
+ d out * value options(*string) unsigned char *
+ d outlen * value int *
+ d in * value options(*string) const unsigned char
+ d *
+ d inlen * value int *
+ d quoteChar 10i 0 value
+
+ d docbSAXParseDoc...
+ d pr extproc('docbSAXParseDoc')
+ d like(docbDocPtr)
+ d cur * value options(*string) xmlChar *
+ d encoding * value options(*string) const char *
+ d sax value like(docbSAXHandlerPtr)
+ d userData * value void *
+
+ d docbParseDoc pr extproc('docbParseDoc')
+ d like(docbDocPtr)
+ d cur * value options(*string) xmlChar *
+ d encoding * value options(*string) const char *
+
+ d docbSAXParseFile...
+ d pr extproc('docbSAXParseFile')
+ d like(docbDocPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d sax value like(docbSAXHandlerPtr)
+ d userData * value void *
+
+ d docbParseFile pr extproc('docbParseFile')
+ d like(docbDocPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+
+ * Interfaces for the Push mode.
+
+ d docbFreeParserCtxt...
+ d pr extproc('docbFreeParserCtxt')
+ d ctxt value like(docbParserCtxtPtr)
+
+ d docbCreatePushParserCtxt...
+ d pr extproc('docbCreatePushParserCtxt')
+ d like(docbParserCtxtPtr)
+ d sax value like(docbSAXHandlerPtr)
+ d user_data * value void *
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d filename * value options(*string) const char *
+ d enc value like(xmlCharEncoding)
+
+ d docbParseChunk pr 10i 0 extproc('docbParseChunk')
+ d ctxt value like(docbParserCtxtPtr)
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d terminate 10i 0 value
+
+ d docbCreateFileParserCtxt...
+ d pr extproc('docbCreateFileParserCtxt')
+ d like(docbParserCtxtPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+
+ d docbParseDocument...
+ d pr 10i 0 extproc('docbParseDocument')
+ d ctxt value like(docbParserCtxtPtr)
+
+ /endif LIBXML_DOCB_ENABLED
+ /endif DOCB_PARSER_H__
diff --git a/os400/libxmlrpg/HTMLparser.rpgle b/os400/libxmlrpg/HTMLparser.rpgle
new file mode 100644
index 0000000..7b4a626
--- /dev/null
+++ b/os400/libxmlrpg/HTMLparser.rpgle
@@ -0,0 +1,403 @@
+ * Summary: interface for an HTML 4.0 non-verifying parser
+ * Description: this module implements an HTML 4.0 non-verifying parser
+ * with API compatible with the XML parser ones. It should
+ * be able to parse "real world" HTML, even if severely
+ * broken from a specification point of view.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(HTML_PARSER_H__)
+ /define HTML_PARSER_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+
+ /if defined(LIBXML_HTML_ENABLED)
+
+ * Most of the back-end structures from XML and HTML are shared.
+
+ d htmlParserCtxtPtr...
+ d s based(######typedef######)
+ d like(xmlParserCtxtPtr)
+
+ d htmlParserCtxt ds based(htmlParserCtxtPtr)
+ d likeds(xmlParserCtxt)
+
+ d htmlParserNodeInfoPtr...
+ d s based(######typedef######)
+ d like(xmlParserNodeInfoPtr)
+
+ d htmlParserNodeInfo...
+ d ds based(htmlParserNodeInfoPtr)
+ d likeds(xmlParserNodeInfo)
+
+ d htmlSAXHandlerPtr...
+ d s based(######typedef######)
+ d like(xmlSAXHandlerPtr)
+
+ d htmlSAXHandler ds based(htmlSAXHandlerPtr)
+ d likeds(xmlSAXHandler)
+
+ d htmlParserInputPtr...
+ d s based(######typedef######)
+ d like(xmlParserInputPtr)
+
+ d htmlParserInput...
+ d ds based(htmlParserInputPtr)
+ d likeds(xmlParserInput)
+
+ d htmlDocPtr s based(######typedef######)
+ d like(xmlDocPtr)
+
+ d htmlNodePtr s based(######typedef######)
+ d like(xmlNodePtr)
+
+ * Internal description of an HTML element, representing HTML 4.01
+ * and XHTML 1.0 (which share the same structure).
+
+ d htmlElemDescPtr...
+ d s * based(######typedef######)
+
+ d htmlElemDesc ds based(htmlElemDescPtr)
+ d align qualified
+ d name * const char *
+ d startTag 3u 0 Start tag implied ?
+ d endTag 3u 0 End tag implied ?
+ d saveEndTag 3u 0 Save end tag ?
+ d empty 3u 0 Empty element ?
+ d depr 3u 0 Deprecated element ?
+ d dtd 3u 0 Loose DTD/Frameset
+ d isinline 3u 0 Block 0/inline elem?
+ d desc * const char *
+ *
+ * New fields encapsulating HTML structure
+ *
+ * Bugs:
+ * This is a very limited representation. It fails to tell us when
+ * an element *requires* subelements (we only have whether they're
+ * allowed or not), and it doesn't tell us where CDATA and PCDATA
+ * are allowed. Some element relationships are not fully represented:
+ * these are flagged with the word MODIFIER
+ *
+ d subelts * const char * *
+ d defaultsubelt * const char *
+ d attrs_opt * const char * *
+ d attrs_depr * const char * *
+ d attrs_req * const char * *
+
+ * Internal description of an HTML entity.
+
+ d htmlEntityDescPtr...
+ d s * based(######typedef######)
+
+ d htmlEntityDesc...
+ d ds based(htmlEntityDescPtr)
+ d align qualified
+ d value 10u 0 Unicode char value
+ d name * const char *
+ d desc * const char *
+
+ * There is only few public functions.
+
+ d htmlTagLookup pr extproc('htmlTagLookup')
+ d like(htmlElemDescPtr) const
+ d tag * value options(*string) const xmlChar *
+
+ d htmlEntityLookup...
+ d pr extproc('htmlEntityLookup')
+ d like(htmlEntityDescPtr) const
+ d name * value options(*string) const xmlChar *
+
+ d htmlEntityValueLookup...
+ d pr extproc('htmlEntityValueLookup')
+ d like(htmlEntityDescPtr) const
+ d value 10u 0 value
+
+ d htmlIsAutoClosed...
+ d pr 10i 0 extproc('htmlIsAutoClosed')
+ d doc value like(htmlDocPtr)
+ d elem value like(htmlNodePtr)
+
+ d htmlAutoCloseTag...
+ d pr 10i 0 extproc('htmlAutoCloseTag')
+ d doc value like(htmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d elem value like(htmlNodePtr)
+
+ d htmlParseEntityRef...
+ d pr extproc('htmlParseEntityRef')
+ d like(htmlEntityDescPtr) const
+ d ctxt value like(htmlParserCtxtPtr)
+ d str * const xmlChar *(*)
+
+ d htmlParseCharRef...
+ d pr 10i 0 extproc('htmlParseCharRef')
+ d ctxt value like(htmlParserCtxtPtr)
+
+ d htmlParseElement...
+ d pr extproc('htmlParseElement')
+ d ctxt value like(htmlParserCtxtPtr)
+
+ d htmlNewParserCtxt...
+ d pr extproc('htmlNewParserCtxt')
+ d like(htmlParserCtxtPtr)
+
+ d htmlCreateMemoryParserCtxt...
+ d pr extproc('htmlCreateMemoryParserCtxt')
+ d like(htmlParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d htmlParseDocument...
+ d pr 10i 0 extproc('htmlParseDocument')
+ d ctxt value like(htmlParserCtxtPtr)
+
+ d htmlSAXParseDoc...
+ d pr extproc('htmlSAXParseDoc')
+ d like(htmlDocPtr)
+ d cur * value options(*string) xmlChar *
+ d encoding * value options(*string) const char *
+ d sax value like(htmlSAXHandlerPtr)
+ d userData * value void *
+
+ d htmlParseDoc pr extproc('htmlParseDoc')
+ d like(htmlDocPtr)
+ d cur * value options(*string) xmlChar *
+ d encoding * value options(*string) const char *
+
+ d htmlSAXParseFile...
+ d pr extproc('htmlSAXParseFile')
+ d like(htmlDocPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d sax value like(htmlSAXHandlerPtr)
+ d userData * value void *
+
+ d htmlParseFile pr extproc('htmlParseFile')
+ d like(htmlDocPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+
+ d UTF8ToHtml pr 10i 0 extproc('UTF8ToHtml')
+ d out 65535 options(*varsize) unsigned char []
+ d outlen 10i 0
+ d in * value options(*string) const unsigned char*
+ d inlen 10i 0
+
+ d htmlEncodeEntities...
+ d pr 10i 0 extproc('htmlEncodeEntities')
+ d out 65535 options(*varsize) unsigned char []
+ d outlen 10i 0
+ d in * value options(*string) const unsigned char*
+ d inlen 10i 0
+ d quoteChar 10i 0 value
+
+ d htmlIsScriptAttribute...
+ d pr 10i 0 extproc('htmlIsScriptAttribute')
+ d name * value options(*string) const xmlChar *
+
+ d htmlHandleOmittedElem...
+ d pr 10i 0 extproc('htmlHandleOmittedElem')
+ d val 10i 0 value
+
+ /if defined(LIBXML_PUSH_ENABLED)
+
+ * Interfaces for the Push mode.
+
+ d htmlCreatePushParserCtxt...
+ d pr extproc('htmlCreatePushParserCtxt')
+ d like(htmlParserCtxtPtr)
+ d sax value like(htmlSAXHandlerPtr)
+ d user_data * value void *
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d filename * value options(*string) const char *
+ d enc value like(xmlCharEncoding)
+
+ d htmlParseChunk pr 10i 0 extproc('htmlParseChunk')
+ d ctxt value like(htmlParserCtxtPtr)
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d terminate 10i 0 value
+ /endif LIBXML_PUSH_ENABLED
+
+ d htmlFreeParserCtxt...
+ d pr extproc('htmlFreeParserCtxt')
+ d ctxt value like(htmlParserCtxtPtr)
+
+ * New set of simpler/more flexible APIs
+
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+
+ d htmlParserOption...
+ d s 10i 0 based(######typedef######) enum
+ d HTML_PARSE_RECOVER... Relaxed parsing
+ d c X'00000001'
+ d HTML_PARSE_NODEFDTD... No default doctype
+ d c X'00000004'
+ d HTML_PARSE_NOERROR... No error reports
+ d c X'00000020'
+ d HTML_PARSE_NOWARNING... No warning reports
+ d c X'00000040'
+ d HTML_PARSE_PEDANTIC... Pedantic err reports
+ d c X'00000080'
+ d HTML_PARSE_NOBLANKS... Remove blank nodes
+ d c X'00000100'
+ d HTML_PARSE_NONET... Forbid net access
+ d c X'00000800'
+ d HTML_PARSE_NOIMPLIED... No implied html/body
+ d c X'00002000'
+ d HTML_PARSE_COMPACT... compact small txtnod
+ d c X'00010000'
+ d HTML_PARSE_IGNORE_ENC... Ignore encoding hint
+ d c X'00200000'
+
+ d htmlCtxtReset pr extproc('htmlCtxtReset')
+ d ctxt value like(htmlParserCtxtPtr)
+
+ d htmlCtxtUseOptions...
+ d pr 10i 0 extproc('htmlCtxtUseOptions')
+ d ctxt value like(htmlParserCtxtPtr)
+ d options 10i 0 value
+
+ d htmlReadDoc pr extproc('htmlReadDoc')
+ d like(htmlDocPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlReadFile pr extproc('htmlReadFile')
+ d like(htmlDocPtr)
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlReadMemory pr extproc('htmlReadMemory')
+ d like(htmlDocPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlReadFd pr extproc('htmlReadFd')
+ d like(htmlDocPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlReadIO pr extproc('htmlReadIO')
+ d like(htmlDocPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlCtxtReadDoc...
+ d pr extproc('htmlCtxtReadDoc')
+ d like(htmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlCtxtReadFile...
+ d pr extproc('htmlCtxtReadFile')
+ d like(htmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlCtxtReadMemory...
+ d pr extproc('htmlCtxtReadMemory')
+ d like(htmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlCtxtReadFd pr extproc('htmlCtxtReadFd')
+ d like(htmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d htmlCtxtReadIO pr extproc('htmlCtxtReadIO')
+ d like(htmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ * Further knowledge of HTML structure
+
+ d htmlStatus s 10i 0 based(######typedef######) enum
+ d HTML_NA c X'0000' No check at all
+ d HTML_INVALID c X'0001'
+ d HTML_DEPRECATED...
+ d c X'0002'
+ d HTML_VALID c X'0004'
+ d HTML_REQUIRED c X'000C' HTML_VALID ored-in
+
+ * Using htmlElemDesc rather than name here, to emphasise the fact
+ * that otherwise there's a lookup overhead
+
+ d htmlAttrAllowed...
+ d pr extproc('htmlAttrAllowed')
+ d like(htmlStatus)
+ d #param1 value like(htmlElemDescPtr) const
+ d #param2 * value options(*string) const xmlChar *
+ d #param3 10i 0 value
+
+ d htmlElementAllowedHere...
+ d pr 10i 0 extproc('htmlElementAllowedHere')
+ d #param1 value like(htmlElemDescPtr) const
+ d #param2 * value options(*string) const xmlChar *
+
+ d htmlElementStatusHere...
+ d pr extproc('htmlElementStatusHere')
+ d like(htmlStatus)
+ d #param1 value like(htmlElemDescPtr) const
+ d #param2 value like(htmlElemDescPtr) const
+
+ d htmlNodeStatus pr extproc('htmlNodeStatus')
+ d like(htmlStatus)
+ d #param1 value like(htmlNodePtr)
+ d #param2 10i 0 value
+
+ * C macros implemented as procedures for ILE/RPG support.
+
+ d htmlDefaultSubelement...
+ d pr * extproc('__htmlDefaultSubelement') const char *
+ d elt * value const htmlElemDesc *
+
+ d htmlElementAllowedHereDesc...
+ d pr 10i 0 extproc(
+ d '__htmlElementAllowedHereDesc')
+ d parent * value const htmlElemDesc *
+ d elt * value const htmlElemDesc *
+
+ d htmlRequiredAttrs...
+ d pr * extproc('__htmlRequiredAttrs') const char * *
+ d elt * value const htmlElemDesc *
+
+ /endif LIBXML_HTML_ENABLED
+ /endif HTML_PARSER_H__
diff --git a/os400/libxmlrpg/HTMLtree.rpgle b/os400/libxmlrpg/HTMLtree.rpgle
new file mode 100644
index 0000000..82a11ca
--- /dev/null
+++ b/os400/libxmlrpg/HTMLtree.rpgle
@@ -0,0 +1,166 @@
+ * Summary: specific APIs to process HTML tree, especially serialization
+ * Description: this module implements a few function needed to process
+ * tree in an HTML specific way.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(HTML_TREE_H__)
+ /define HTML_TREE_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/HTMLparser"
+
+ /if defined(LIBXML_HTML_ENABLED)
+
+ * HTML_TEXT_NODE:
+ *
+ * Macro. A text node in a HTML document is really implemented
+ * the same way as a text node in an XML document.
+
+ d HTML_TEXT_NODE c 3
+
+ * HTML_ENTITY_REF_NODE:
+ *
+ * Macro. An entity reference in a HTML document is really implemented
+ * the same way as an entity reference in an XML document.
+
+ d HTML_ENTITY_REF_NODE...
+ d c 5
+
+ * HTML_COMMENT_NODE:
+ *
+ * Macro. A comment in a HTML document is really implemented
+ * the same way as a comment in an XML document.
+
+ d HTML_COMMENT_NODE...
+ d c 8
+
+ * HTML_PRESERVE_NODE:
+ *
+ * Macro. A preserved node in a HTML document is really implemented
+ * the same way as a CDATA section in an XML document.
+
+ d HTML_PRESERVE_NODE...
+ d c 4
+
+ * HTML_PI_NODE:
+ *
+ * Macro. A processing instruction in a HTML document is really implemented
+ * the same way as a processing instruction in an XML document.
+
+ d HTML_PI_NODE c 7
+
+ d htmlNewDoc pr extproc('htmlNewDoc')
+ d like(htmlDocPtr)
+ d URI * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+
+ d htmlNewDocNoDtD...
+ d pr extproc('htmlNewDocNoDtD')
+ d like(htmlDocPtr)
+ d URI * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+
+ d htmlGetMetaEncoding...
+ d pr * extproc('htmlGetMetaEncoding') const xmlChar *
+ d doc value like(htmlDocPtr)
+
+ d htmlSetMetaEncoding...
+ d pr 10i 0 extproc('htmlSetMetaEncoding')
+ d doc value like(htmlDocPtr)
+ d encoding * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d htmlDocDumpMemory...
+ d pr extproc('htmlDocDumpMemory')
+ d cur value like(xmlDocPtr)
+ d mem * value xmlChar * *
+ d size 10i 0
+
+ d htmlDocDumpMemoryFormat...
+ d pr extproc('htmlDocDumpMemoryFormat')
+ d cur value like(xmlDocPtr)
+ d mem * value xmlChar * *
+ d size 10i 0
+ d format 10i 0 value
+
+ d htmlDocDump pr 10i 0 extproc('htmlDocDump')
+ d f * value FILE *
+ d cur value like(xmlDocPtr)
+
+ d htmlSaveFile pr 10i 0 extproc('htmlSaveFile')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+
+ d htmlNodeDump pr 10i 0 extproc('htmlNodeDump')
+ d buf value like(xmlBufferPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+
+ d htmlNodeDumpFile...
+ d pr extproc('htmlNodeDumpFile')
+ d out * value FILE *
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+
+ d htmlNodeDumpFileFormat...
+ d pr 10i 0 extproc('htmlNodeDumpFileFormat')
+ d out * value FILE *
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d htmlSaveFileEnc...
+ d pr 10i 0 extproc('htmlSaveFileEnc')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+
+ d htmlSaveFileFormat...
+ d pr 10i 0 extproc('htmlSaveFileFormat')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d htmlNodeDumpFormatOutput...
+ d pr extproc('htmlNodeDumpFormatOutput')
+ d buf value like(xmlOutputBufferPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d htmlDocContentDumpOutput...
+ d pr extproc('htmlDocContentDumpOutput')
+ d buf value like(xmlOutputBufferPtr)
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+
+ d htmlDocContentDumpFormatOutput...
+ d pr extproc(
+ d 'htmlDocContentDumpFormatOutput')
+ d buf value like(xmlOutputBufferPtr)
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d htmlNodeDumpOutput...
+ d pr extproc('htmlNodeDumpOutput')
+ d buf value like(xmlOutputBufferPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d encoding * value options(*string) const char *
+
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d htmlIsBooleanAttr...
+ d pr 10i 0 extproc('htmlIsBooleanAttr')
+ d name * value options(*string) const xmlChar *
+
+ /endif LIBXML_HTML_ENABLED
+ /endif HTML_TREE_H__
diff --git a/os400/libxmlrpg/SAX.rpgle b/os400/libxmlrpg/SAX.rpgle
new file mode 100644
index 0000000..18f851d
--- /dev/null
+++ b/os400/libxmlrpg/SAX.rpgle
@@ -0,0 +1,207 @@
+ * Summary: Old SAX version 1 handler, deprecated
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
+ * build the DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SAX_H__)
+ /define XML_SAX_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/xlink"
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+
+ d getPublicId pr * extproc('getPublicId') const xmlChar *
+ d ctx * value void *
+
+ d getSystemId pr * extproc('getSystemId') const xmlChar *
+ d ctx * value void *
+
+ d setDocumentLocator...
+ d pr extproc('setDocumentLocator')
+ d ctx * value void *
+ d loc value like(xmlSAXLocatorPtr)
+
+ d getLineNumber pr 10i 0 extproc('getLineNumber')
+ d ctx * value void *
+
+ d getColumnNumber...
+ d pr 10i 0 extproc('getColumnNumber')
+ d ctx * value void *
+
+ d isStandalone pr 10i 0 extproc('isStandalone')
+ d ctx * value void *
+
+ d hasInternalSubset...
+ d pr 10i 0 extproc('hasInternalSubset')
+ d ctx * value void *
+
+ d hasExternalSubset...
+ d pr 10i 0 extproc('hasExternalSubset')
+ d ctx * value void *
+
+ d internalSubset pr extproc('internalSubset')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d externalSubset pr extproc('externalSubset')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d getEntity pr extproc('getEntity')
+ d like(xmlEntityPtr)
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d getParameterEntity...
+ d pr extproc('getParameterEntity')
+ d like(xmlEntityPtr)
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d resolveEntity pr extproc('resolveEntity')
+ d like(xmlParserInputPtr)
+ d ctx * value void *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+
+ d entityDecl pr extproc('entityDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+ d content * value options(*string) xmlChar *
+
+ d attributeDecl pr extproc('attributeDecl')
+ d ctx * value void *
+ d elem * value options(*string) const xmlChar *
+ d fullname * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d def 10i 0 value
+ d defaultValue * value options(*string) const xmlChar *
+ d tree value like(xmlEnumerationPtr)
+
+ d elementDecl pr extproc('elementDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d content value like(xmlElementContentPtr)
+
+ d notationDecl pr extproc('notationDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+
+ d unparsedEntityDecl...
+ d pr extproc('unparsedEntityDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+ d notationName * value options(*string) const xmlChar *
+
+ d startDocument pr extproc('startDocument')
+ d ctx * value void *
+
+ d endDocument pr extproc('endDocument')
+ d ctx * value void *
+
+ d attribute pr extproc('attribute')
+ d ctx * value void *
+ d fullname * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d startElement pr extproc('startElement')
+ d ctx * value void *
+ d fullname * value options(*string) const xmlChar *
+ d atts * const xmlChar *(*)
+
+ d endElement pr extproc('endElement')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d reference pr extproc('reference')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d characters pr extproc('characters')
+ d ctx * value void *
+ d ch * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d ignorableWhitespace...
+ d pr extproc('ignorableWhitespace')
+ d ctx * value void *
+ d ch * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d processingInstruction...
+ d pr extproc('processingInstruction')
+ d ctx * value void *
+ d target * value options(*string) const xmlChar *
+ d data * value options(*string) const xmlChar *
+
+ d globalNamespace...
+ d pr extproc('globalNamespace')
+ d ctx * value void *
+ d href * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d setNamespace pr extproc('setNamespace')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d getNamespace pr extproc('getNamespace')
+ d like(xmlNsPtr)
+ d ctx * value void *
+
+ d checkNamespace pr 10i 0 extproc('checkNamespace')
+ d ctx * value void *
+ d nameSpace * value options(*string) xmlChar *
+
+ d namespaceDecl pr extproc('namespaceDecl')
+ d ctx * value void *
+ d href * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d comment pr extproc('comment')
+ d ctx * value void *
+ d value * value options(*string) const xmlChar *
+
+ d cdataBlock pr extproc('cdataBlock')
+ d ctx * value void *
+ d value * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d initxmlDefaultSAXHandler...
+ d pr extproc('initxmlDefaultSAXHandler')
+ d hdlr like(xmlSAXHandlerV1)
+ d warning 10i 0 value
+
+ /if defined(LIBXML_HTML_ENABLED)
+ d inithtmlDefaultSAXHandler...
+ d pr extproc('inithtmlDefaultSAXHandler')
+ d hdlr like(xmlSAXHandlerV1)
+ /endif
+
+ /if defined(LIBXML_DOCB_ENABLED)
+ d initdocbDefaultSAXHandler...
+ d pr extproc('initdocbDefaultSAXHandler')
+ d hdlr like(xmlSAXHandlerV1)
+ /endif
+ /endif LIBXML_SAX1_ENABLED
+
+ /endif LIBXML_LEGACY_ENABLD
+
+ /endif XML_SAX_H__
diff --git a/os400/libxmlrpg/SAX2.rpgle b/os400/libxmlrpg/SAX2.rpgle
new file mode 100644
index 0000000..c9ab9d1
--- /dev/null
+++ b/os400/libxmlrpg/SAX2.rpgle
@@ -0,0 +1,248 @@
+ * Summary: SAX2 parser interface used to build the DOM tree
+ * Description: those are the default SAX2 interfaces used by
+ * the library when building DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SAX2_H__)
+ /define XML_SAX2_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/xlink"
+
+ d xmlSAX2GetPublicId...
+ d pr * extproc('xmlSAX2getPublicId') const xmlChar *
+ d ctx * value void *
+
+ d xmlSAX2GetSystemId...
+ d pr * extproc('xmlSAX2getSystemId') const xmlChar *
+ d ctx * value void *
+
+ d xmlSAX2SetDocumentLocator...
+ d pr extproc('xmlSAX2SetDocumentLocator')
+ d ctx * value void *
+ d loc value like(xmlSAXLocatorPtr)
+
+ d xmlSAX2GetLineNumber...
+ d pr 10i 0 extproc('xmlSAX2GetLineNumber')
+ d ctx * value void *
+
+ d xmlSAX2GetColumnNumber...
+ d pr 10i 0 extproc('xmlSAX2GetColumnNumber')
+ d ctx * value void *
+
+ d xmlSAX2IsStandalone...
+ d pr 10i 0 extproc('xmlSAX2IsStandalone')
+ d ctx * value void *
+
+ d xmlSAX2HasInternalSubset...
+ d pr 10i 0 extproc('xmlSAX2HasInternalSubset')
+ d ctx * value void *
+
+ d xmlSAX2HasExternalSubset...
+ d pr 10i 0 extproc('xmlSAX2HasExternalSubset')
+ d ctx * value void *
+
+ d xmlSAX2InternalSubset...
+ d pr extproc('xmlSAX2InternalSubset')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d xmlSAX2ExternalSubset...
+ d pr extproc('xmlSAX2ExternalSubset')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d xmlSAX2GetEntity...
+ d pr extproc('xmlSAX2GetEntity')
+ d like(xmlEntityPtr)
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d xmlSAX2GetParameterEntity...
+ d pr extproc('xmlSAX2GetParameterEntity')
+ d like(xmlEntityPtr)
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d xmlSAX2ResolveEntity...
+ d pr extproc('xmlSAX2ResolveEntity')
+ d like(xmlParserInputPtr)
+ d ctx * value void *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+
+ d xmlSAX2EntityDecl...
+ d pr extproc('xmlSAX2EntityDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+ d content * value options(*string) xmlChar *
+
+ d xmlSAX2AttributeDecl...
+ d pr extproc('xmlSAX2AttributeDecl')
+ d ctx * value void *
+ d elem * value options(*string) const xmlChar *
+ d fullname * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d def 10i 0 value
+ d defaultValue * value options(*string) const xmlChar *
+ d tree value like(xmlEnumerationPtr)
+
+ d xmlSAX2ElementDecl...
+ d pr extproc('xmlSAX2ElementDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d content value like(xmlElementContentPtr)
+
+ d xmlSAX2NotationDecl...
+ d pr extproc('xmlSAX2NotationDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+
+ d xmlSAX2UnparsedEntityDecl...
+ d pr extproc('xmlSAX2UnparsedEntityDecl')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+ d publicId * value options(*string) const xmlChar *
+ d systemId * value options(*string) const xmlChar *
+ d notationName * value options(*string) xmlChar *
+
+ d xmlSAX2StartDocument...
+ d pr extproc('xmlSAX2StartDocument')
+ d ctx * value void *
+
+ d xmlSAX2EndDocument...
+ d pr extproc('xmlSAX2EndDocument')
+ d ctx * value void *
+
+ /undefine XML_TESTVAL
+ /if defined(LIBXML_SAX1_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_WRITER_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_DOCB_ENABLED)
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlSAX2StartElement...
+ d pr extproc('xmlSAX2StartElement')
+ d ctx * value void *
+ d fullname * value options(*string) const xmlChar *
+ d atts * const xmlChar *(*)
+
+ d xmlSAX2EndElement...
+ d pr extproc('xmlSAX2EndElement')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlSAX2StartElementNs...
+ d pr extproc('xmlSAX2StartElementNs')
+ d ctx * value void *
+ d localname * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ d URI * value options(*string) const xmlChar *
+ d nb_namespaces 10i 0 value
+ d namespaces * value const xmlChar *(*)
+ d nb_attributes 10i 0 value
+ d nb_defaulted 10i 0 value
+ d attributes * const xmlChar *(*)
+
+ d xmlSAX2EndElementNs...
+ d pr extproc('xmlSAX2EndElementNs')
+ d ctx * value void *
+ d localname * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ d URI * value options(*string) const xmlChar *
+
+ d xmlSAX2Reference...
+ d pr extproc('xmlSAX2Reference')
+ d ctx * value void *
+ d name * value options(*string) const xmlChar *
+
+ d xmlSAX2Characters...
+ d pr extproc('xmlSAX2Characters')
+ d ctx * value void *
+ d ch * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlSAX2IgnorableWhitespace...
+ d pr extproc('xmlSAX2IgnorableWhitespace')
+ d ctx * value void *
+ d ch * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlSAX2ProcessingInstruction...
+ d pr extproc(
+ d 'xmlSAX2ProcessingInstruction')
+ d ctx * value void *
+ d target * value options(*string) const xmlChar *
+ d data * value options(*string) const xmlChar *
+
+ d xmlSAX2Comment...
+ d pr extproc('xmlSAX2Comment')
+ d ctx * value void *
+ d value * value options(*string) const xmlChar *
+
+ d xmlSAX2CDataBlock...
+ d pr extproc('xmlSAX2CDataBlock')
+ d ctx * value void *
+ d value * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlSAXDefaultVersion...
+ d pr 10i 0 extproc('xmlSAXDefaultVersion')
+ d version 10i 0 value
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlSAXVersion pr 10i 0 extproc('xmlSAXVersion')
+ d hdlr like(xmlSAXHandler)
+ d version 10i 0 value
+
+ d xmlSAX2InitDefaultSAXHandler...
+ d pr extproc(
+ d 'xmlSAX2InitDefaultSAXHandler')
+ d hdlr like(xmlSAXHandler)
+ d warning 10i 0 value
+
+ /if defined(LIBXML_HTML_ENABLED)
+ d xmlSAX2InitHtmlDefaultSAXHandler...
+ d pr extproc(
+ d 'xmlSAX2InitHtmlDefaultSAXHandler')
+ d hdlr like(xmlSAXHandler)
+
+ d htmlDefaultSAXHandlerInit...
+ d pr extproc('htmlDefaultSAXHandlerInit')
+ /endif
+
+ /if defined(LIBXML_DOCB_ENABLED)
+ d xmlSAX2InitDocbDefaultSAXHandler...
+ d pr extproc(
+ d 'xmlSAX2InitDocbDefaultSAXHandler')
+ d hdlr like(xmlSAXHandler)
+
+ d docbDefaultSAXHandlerInit...
+ d pr extproc('docbDefaultSAXHandlerInit')
+ /endif
+
+ d xmlDefaultSAXHandlerInit...
+ d pr extproc('xmlDefaultSAXHandlerInit')
+
+ /endif XML_SAX2_H__
diff --git a/os400/libxmlrpg/c14n.rpgle b/os400/libxmlrpg/c14n.rpgle
new file mode 100644
index 0000000..b64efb2
--- /dev/null
+++ b/os400/libxmlrpg/c14n.rpgle
@@ -0,0 +1,119 @@
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
+ * Description: the c14n modules provides a
+ *
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * and an
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_C14N_H__)
+ /define XML_C14N_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_C14N_ENABLED)
+ /if defined(LIBXML_OUTPUT_ENABLED)
+
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/xpath"
+
+ * XML Canonicazation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * Exclusive XML Canonicazation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Canonical form of an XML document could be created if and only if
+ * a) default attributes (if any) are added to all nodes
+ * b) all character and parsed entity references are resolved
+ * In order to achive this in libxml2 the document MUST be loaded with
+ * following global setings:
+ *
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
+ * xmlSubstituteEntitiesDefault(1);
+ *
+ * or corresponding parser context setting:
+ * xmlParserCtxtPtr ctxt;
+ *
+ * ...
+ * ctxt->loadsubset = XML_DETECT_IDS ã XML_COMPLETE_ATTRS;
+ * ctxt->replaceEntities = 1;
+ * ...
+
+ * xmlC14NMode:
+ *
+ * Predefined values for C14N modes
+
+ d xmlBufferAllocationScheme...
+ d xmlC14NMode s 10i 0 based(######typedef######) enum
+ d XML_C14N_1_0 c 0 Original C14N 1.0
+ d XML_C14N_EXCLUSIVE_1_0... Exclusive C14N 1.0
+ d c 1
+ d XML_C14N_1_1 c 2 C14N 1.1 spec
+
+ d xmlC14NDocSaveTo...
+ d pr 10i 0 extproc('xmlC14NDocSaveTo')
+ d doc value like(xmlDocPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d mode 10i 0 value
+ d inclusive_ns_prefixes...
+ d * xmlChar *(*)
+ d with_comments 10i 0 value
+ d buf value like(xmlOutputBufferPtr)
+
+ d xmlC14NDocDumpMemory...
+ d pr 10i 0 extproc('xmlC14NDocDumpMemory')
+ d doc value like(xmlDocPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d mode 10i 0 value
+ d inclusive_ns_prefixes...
+ d * xmlChar *(*)
+ d with_comments 10i 0 value
+ d doc_txt_ptr * xmlChar *(*)
+
+ d xmlC14NDocSave pr 10i 0 extproc('xmlC14NDocSave')
+ d doc value like(xmlDocPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d mode 10i 0 value
+ d inclusive_ns_prefixes...
+ d * xmlChar *(*)
+ d with_comments 10i 0 value
+ d filename * value options(*string) const char *
+ d compression 10i 0 value
+
+ * This is the core C14N function
+
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the curent node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+
+ d xmlC14NIsVisibleCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlC14NExecute pr 10i 0 extproc('xmlC14NExecute')
+ d doc value like(xmlDocPtr)
+ d is_visible_callback...
+ d value like(xmlC14NIsVisibleCallback)
+ d user_data * value void *
+ d mode 10i 0 value
+ d inclusive_ns_prefixes...
+ d * xmlChar *(*)
+ d with_comments 10i 0 value
+ d buf value like(xmlOutputBufferPtr)
+
+ /endif LIBXML_OUTPUT_ENABLD
+ /endif LIBXML_C14N_ENABLED
+ /endif XML_C14N_H__
diff --git a/os400/libxmlrpg/catalog.rpgle b/os400/libxmlrpg/catalog.rpgle
new file mode 100644
index 0000000..52baf4e
--- /dev/null
+++ b/os400/libxmlrpg/catalog.rpgle
@@ -0,0 +1,235 @@
+ * Summary: interfaces to the Catalog handling system
+ * Description: the catalog module implements the support for
+ * XML Catalogs and SGML catalogs
+ *
+ * SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_CATALOG_H__)
+ /define XML_CATALOG_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlstring"
+ /include "libxmlrpg/tree"
+
+ /if defined(LIBXML_CATALOG_ENABLED)
+
+ * XML_CATALOGS_NAMESPACE:
+ *
+ * The namespace for the XML Catalogs elements.
+
+ d XML_CATALOGS_NAMESPACE...
+ d c 'urn:oasis:names:+
+ d tc:entity:xmlns:xml:catalog'
+
+ * XML_CATALOG_PI:
+ *
+ * The specific XML Catalog Processing Instuction name.
+
+ d XML_CATALOG_PI c 'oasis-xml-catalog'
+
+ * The API is voluntarily limited to general cataloging.
+
+ d xmlCatalogPrefer...
+ d s 10u 0 based(######typedef######) enum type
+ d XML_CATA_PREFER_NONE...
+ d c 0
+ d XML_CATA_PREFER_PUBLIC...
+ d c 1
+ d XML_CATA_PREFER_SYSTEM...
+ d c 2
+
+ d xmlCatalogAllow...
+ d s 10u 0 based(######typedef######) enum type
+ d XML_CATA_ALLOW_NONE...
+ d c 0
+ d XML_CATA_ALLOW_GLOBAL...
+ d c 1
+ d XML_CATA_ALLOW_DOCUMENT...
+ d c 2
+ d XML_CATA_ALLOW_ALL...
+ d c 3
+
+ d xmlCatalogPtr s * based(######typedef######)
+
+ * Operations on a given catalog.
+
+ d xmlNewCatalog pr extproc('xmlNewCatalog')
+ d like(xmlCatalogPtr)
+ d sgml 10i 0 value
+
+ d xmlLoadACatalog...
+ d pr extproc('xmlLoadACatalog')
+ d like(xmlCatalogPtr)
+ d filename * value options(*string) const char *
+
+ d xmlLoadSGMLSuperCatalog...
+ d pr extproc('xmlLoadSGMLSuperCatalog')
+ d like(xmlCatalogPtr)
+ d filename * value options(*string) const char *
+
+ d xmlConvertSGMLCatalog...
+ d pr 10i 0 extproc('xmlConvertSGMLCatalog')
+ d catal value like(xmlCatalogPtr)
+
+ d xmlACatalogAdd pr 10i 0 extproc('xmlACatalogAdd')
+ d catal value like(xmlCatalogPtr)
+ d type * value options(*string) const xmlChar *
+ d orig * value options(*string) const xmlChar *
+ d replace * value options(*string) const xmlChar *
+
+ d xmlACatalogRemove...
+ d pr 10i 0 extproc('xmlACatalogRemove')
+ d catal value like(xmlCatalogPtr)
+ d value * value options(*string) const xmlChar *
+
+ d xmlACatalogResolve...
+ d pr * extproc('xmlACatalogResolve') xmlChar *
+ d catal value like(xmlCatalogPtr)
+ d pubID * value options(*string) const xmlChar *
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlACatalogResolveSystem...
+ d pr * extproc('xmlACatalogResolveSystem') xmlChar *
+ d catal value like(xmlCatalogPtr)
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlACatalogResolvePublic...
+ d pr * extproc('xmlACatalogResolvePublic') xmlChar *
+ d catal value like(xmlCatalogPtr)
+ d pubID * value options(*string) const xmlChar *
+
+ d xmlACatalogResolveURI...
+ d pr * extproc('xmlACatalogResolveURI') xmlChar *
+ d catal value like(xmlCatalogPtr)
+ d URI * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlACatalogDump...
+ d pr extproc('xmlACatalogDump')
+ d catal value like(xmlCatalogPtr)
+ d out * value FILE *
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d xmlFreeCatalog pr extproc('xmlFreeCatalog')
+ d catal value like(xmlCatalogPtr)
+
+ d xmlCatalogIsEmpty...
+ d pr 10i 0 extproc('xmlCatalogIsEmpty')
+ d catal value like(xmlCatalogPtr)
+
+ * Global operations.
+
+ d xmlInitializeCatalog...
+ d pr extproc('xmlInitializeCatalog')
+
+ d xmlLoadCatalog pr 10i 0 extproc('xmlLoadCatalog')
+ d filename * value options(*string) const char *
+
+ d xmlLoadCatalogs...
+ d pr extproc('xmlLoadCatalogs')
+ d paths * value options(*string) const char *
+
+ d xmlCatalogCleanup...
+ d pr extproc('xmlCatalogCleanup')
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlCatalogDump pr extproc('xmlCatalogDump')
+ d out * value FILE *
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d xmlCatalogResolve...
+ d pr * extproc('xmlCatalogResolve') xmlChar *
+ d pubID * value options(*string) const xmlChar *
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlCatalogResolveSystem...
+ d pr * extproc('xmlCatalogResolveSystem') xmlChar *
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlCatalogResolvePublic...
+ d pr * extproc('xmlCatalogResolvePublic') xmlChar *
+ d pubID * value options(*string) const xmlChar *
+
+ d xmlCatalogResolveURI...
+ d pr * extproc('xmlCatalogResolveURI') xmlChar *
+ d URI * value options(*string) const xmlChar *
+
+ d xmlCatalogAdd pr 10i 0 extproc('xmlCatalogAdd')
+ d type * value options(*string) const xmlChar *
+ d orig * value options(*string) const xmlChar *
+ d replace * value options(*string) const xmlChar *
+
+ d xmlCatalogRemove...
+ d pr 10i 0 extproc('xmlCatalogRemove')
+ d value * value options(*string) const xmlChar *
+
+ d xmlParseCatalogFile...
+ d pr extproc('xmlParseCatalogFile')
+ d like(xmlDocPtr)
+ d filename * value options(*string) const char *
+
+ d xmlCatalogConvert...
+ d pr 10i 0 extproc('xmlCatalogConvert')
+
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+
+ d xmlCatalogFreeLocal...
+ d pr extproc('xmlCatalogFreeLocal')
+ d catalogs * value void *
+
+ d xmlCatalogAddLocal...
+ d pr * extproc('xmlCatalogAddLocal') void *
+ d catalogs * value void *
+ d URL * value options(*string) const xmlChar *
+
+ d xmlCatalogLocalResolve...
+ d pr * extproc('xmlCatalogLocalResolve') xmlChar *
+ d catalogs * value void *
+ d pubID * value options(*string) const xmlChar *
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlCatalogLocalResolveURI...
+ d pr * extproc('xmlCatalogLocalResolveURI') xmlChar *
+ d catalogs * value void *
+ d URI * value options(*string) const xmlChar *
+
+ * Preference settings.
+
+ d xmlCatalogSetDebug...
+ d pr 10i 0 extproc('xmlCatalogSetDebug')
+ d level 10i 0 value
+
+ d xmlCatalogSetDefaultPrefer...
+ d pr extproc('xmlCatalogSetDefaultPrefer')
+ d like(xmlCatalogPrefer)
+ d prefer value like(xmlCatalogPrefer)
+
+ d xmlCatalogSetDefaults...
+ d pr extproc('xmlCatalogSetDefaults')
+ d allow value like(xmlCatalogAllow)
+
+ d xmlCatalogGetDefaults...
+ d pr extproc('xmlCatalogGetDefaults')
+ d like(xmlCatalogAllow)
+
+ * DEPRECATED interfaces
+
+ d xmlCatalogGetSystem...
+ d pr * extproc('xmlCatalogGetSystem') const xmlChar *
+ d sysID * value options(*string) const xmlChar *
+
+ d xmlCatalogGetPublic...
+ d pr * extproc('xmlCatalogGetPublic') const xmlChar *
+ d pubID * value options(*string) const xmlChar *
+
+ /endif LIBXML_CATALOG_ENBLD
+ /endif XML_CATALOG_H__
diff --git a/os400/libxmlrpg/chvalid.rpgle b/os400/libxmlrpg/chvalid.rpgle
new file mode 100644
index 0000000..33393f6
--- /dev/null
+++ b/os400/libxmlrpg/chvalid.rpgle
@@ -0,0 +1,97 @@
+ * Summary: Unicode character range checking
+ * Description: this module exports interfaces for the character
+ * range validation APIs
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_CHVALID_H__)
+ /define XML_CHVALID_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlstring"
+
+ * Define our typedefs and structures
+
+ d xmlChSRangePtr s * based(######typedef######)
+
+ d xmlChSRange ds based(xmlChSRangePtr)
+ d align qualified
+ d low 5u 0
+ d high 5u 0
+
+ d xmlChLRangePtr s * based(######typedef######)
+
+ d xmlChLRange ds based(xmlChLRangePtr)
+ d align qualified
+ d low 10u 0
+ d high 10u 0
+
+ d xmlChRangeGroupPtr...
+ d s * based(######typedef######)
+
+ d xmlChRangeGroup...
+ d ds based(xmlChRangeGroupPtr)
+ d align qualified
+ d nbShortRange 10i 0
+ d nbLongRange 10i 0
+ d shortRange like(xmlChSRangePtr)
+ d longRange like(xmlChLRangePtr)
+
+ * Range checking routine
+
+ d xmlCharInRange pr 10i 0 extproc('xmlCharInRange')
+ d val 10u 0 value
+ d group like(xmlChRangeGroupPtr) const
+
+ d xmlIsBaseCharGroup...
+ d ds import('xmlIsBaseCharGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsCharGroup...
+ d ds import('xmlIsCharGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsCombiningGroup...
+ d ds import('xmlIsCombiningGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsDigitGroup...
+ d ds import('xmlIsDigitGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsExtenderGroup...
+ d ds import('xmlIsExtenderGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsIdeographicGroup...
+ d ds import('xmlIsIdeographicGroup')
+ d likeds(xmlChRangeGroup) const
+
+ d xmlIsBaseChar pr 10i 0 extproc('xmlIsBaseChar')
+ d ch 10u 0 value
+
+ d xmlIsBlank pr 10i 0 extproc('xmlIsBlank')
+ d ch 10u 0 value
+
+ d xmlIsChar pr 10i 0 extproc('xmlIsChar')
+ d ch 10u 0 value
+
+ d xmlIsCombining pr 10i 0 extproc('xmlIsCombining')
+ d ch 10u 0 value
+
+ d xmlIsDigit pr 10i 0 extproc('xmlIsDigit')
+ d ch 10u 0 value
+
+ d xmlIsExtender pr 10i 0 extproc('xmlIsExtender')
+ d ch 10u 0 value
+
+ d xmlIsIdeographic...
+ d pr 10i 0 extproc('xmlIsIdeographic')
+ d ch 10u 0 value
+
+ d xmlIsPubidChar pr 10i 0 extproc('xmlIsPubidChar')
+ d ch 10u 0 value
+
+ /endif XML_CHVALID_H__
diff --git a/os400/libxmlrpg/debugXML.rpgle b/os400/libxmlrpg/debugXML.rpgle
new file mode 100644
index 0000000..5005a2d
--- /dev/null
+++ b/os400/libxmlrpg/debugXML.rpgle
@@ -0,0 +1,241 @@
+ * Summary: Tree debugging APIs
+ * Description: Interfaces to a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(DEBUG_XML__)
+ /define DEBUG_XML__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ /if defined(LIBXML_DEBUG_ENABLED)
+
+ /include "libxmlrpg/xpath"
+
+ * The standard Dump routines.
+
+ d xmlDebugDumpString...
+ d pr extproc('xmlDebugDumpString')
+ d output * value FILE *
+ d str * value options(*string) const xmlChar *
+
+ d xmlDebugDumpAttr...
+ d pr extproc('xmlDebugDumpAttr')
+ d output * value FILE *
+ d attr value like(xmlAttrPtr)
+ d depth 10i 0 value
+
+ d xmlDebugDumpAttrList...
+ d pr extproc('xmlDebugDumpAttrList')
+ d output * value FILE *
+ d attr value like(xmlAttrPtr)
+ d depth 10i 0 value
+
+ d xmlDebugDumpOneNode...
+ d pr extproc('xmlDebugDumpOneNode')
+ d output * value FILE *
+ d node value like(xmlNodePtr)
+ d depth 10i 0 value
+
+ d xmlDebugDumpNode...
+ d pr extproc('xmlDebugDumpNode')
+ d output * value FILE *
+ d node value like(xmlNodePtr)
+ d depth 10i 0 value
+
+ d xmlDebugDumpNodeList...
+ d pr extproc('xmlDebugDumpNodeList')
+ d output * value FILE *
+ d node value like(xmlNodePtr)
+ d depth 10i 0 value
+
+ d xmlDebugDumpDocumentHead...
+ d pr extproc('xmlDebugDumpDocumentHead')
+ d output * value FILE *
+ d doc value like(xmlDocPtr)
+
+ d xmlDebugDumpDocument...
+ d pr extproc('xmlDebugDumpDocument')
+ d output * value FILE *
+ d doc value like(xmlDocPtr)
+
+ d xmlDebugDumpDTD...
+ d pr extproc('xmlDebugDumpDTD')
+ d output * value FILE *
+ d dtd value like(xmlDtdPtr)
+
+ d xmlDebugDumpEntities...
+ d pr extproc('xmlDebugDumpEntities')
+ d output * value FILE *
+ d doc value like(xmlDocPtr)
+
+ ****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************
+
+ d xmlDebugCheckDocument...
+ d pr 10i 0 extproc('xmlDebugCheckDocument')
+ d output * value FILE *
+ d doc value like(xmlDocPtr)
+
+ ****************************************************************
+ * *
+ * XML shell helpers *
+ * *
+ ****************************************************************
+
+ d xmlLsOneNode pr extproc('xmlLsOneNode')
+ d output * value FILE *
+ d node value like(xmlNodePtr)
+
+ d xmlLsCountNode pr 10i 0 extproc('xmlLsCountNode')
+ d node value like(xmlNodePtr)
+
+ d xmlBoolToText pr * extproc('xmlBoolToText') const char *
+ d boolval 10i 0 value
+
+ ****************************************************************
+ * *
+ * The XML shell related structures and functions *
+ * *
+ ****************************************************************
+
+ /if defined(LIBXML_XPATH_ENABLED)
+
+ * xmlShellReadlineFunc:
+ * @prompt: a string prompt
+ *
+ * This is a generic signature for the XML shell input function.
+ *
+ * Returns a string which will be freed by the Shell.
+
+ d xmlShellReadlineFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlShellCtxt:
+ *
+ * A debugging shell context.
+ * TODO: add the defined function tables.
+
+ d xmlShellCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlSchellCtxt ds based(xmlShellCtxtPtr)
+ d align qualified
+ d filename * char *
+ d doc like(xmlDocPtr)
+ d node like(xmlNodePtr)
+ d pctxt like(xmlXPathContextPtr)
+ d loaded 10i 0
+ d output * FILE *
+ d input like(xmlShellReadlineFunc)
+
+ * xmlShellCmd:
+ * @ctxt: a shell context
+ * @arg: a string argument
+ * @node: a first node
+ * @node2: a second node
+ *
+ * This is a generic signature for the XML shell functions.
+ *
+ * Returns an int, negative returns indicating errors.
+
+ d xmlShellCmd s * based(######typedef######)
+ d procptr
+
+ d xmlShellPrintXPathError...
+ d pr extproc('xmlShellPrintXPathError')
+ d errorType 10i 0 value
+ d arg * value options(*string) const char *
+
+ d xmlShellPrintXPathResult...
+ d pr extproc('xmlShellPrintXPathResult')
+ d list value like(xmlXPathObjectPtr)
+
+ d xmlShellList pr 10i 0 extproc('xmlShellList')
+ d ctxt value like(xmlShellCtxtPtr)
+ d arg * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellBase pr 10i 0 extproc('xmlShellBase')
+ d ctxt value like(xmlShellCtxtPtr)
+ d arg * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellDir pr 10i 0 extproc('xmlShellDir')
+ d ctxt value like(xmlShellCtxtPtr)
+ d arg * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellLoad pr 10i 0 extproc('xmlShellLoad')
+ d ctxt value like(xmlShellCtxtPtr)
+ d filename * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlShellPrintNode...
+ d pr extproc('xmlShellPrintNode')
+ d node value like(xmlNodePtr)
+
+ d xmlShellCat pr 10i 0 extproc('xmlShellCat')
+ d ctxt value like(xmlShellCtxtPtr)
+ d arg * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellWrite pr 10i 0 extproc('xmlShellWrite')
+ d ctxt value like(xmlShellCtxtPtr)
+ d filename * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellSave pr 10i 0 extproc('xmlShellSave')
+ d ctxt value like(xmlShellCtxtPtr)
+ d filename * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ /if defined(LIBXML_VALID_ENABLED)
+ d xmlShellValidate...
+ d pr 10i 0 extproc('xmlShellValidate')
+ d ctxt value like(xmlShellCtxtPtr)
+ d dtd * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+ /endif LIBXML_VALID_ENABLED
+
+ d xmlShellDu pr 10i 0 extproc('xmlShellDu')
+ d ctxt value like(xmlShellCtxtPtr)
+ d arg * value options(*string) char *
+ d tree value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ d xmlShellPwd pr 10i 0 extproc('xmlShellPwd')
+ d ctxt value like(xmlShellCtxtPtr)
+ d buffer * value options(*string) char *
+ d node value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ * The Shell interface.
+
+ d xmlShell pr extproc('xmlShell')
+ d doc value like(xmlDocPtr)
+ d filename * value options(*string) char *
+ d input value like(xmlShellReadlineFunc)
+ d output * value FILE *
+
+ /endif LIBXML_XPATH_ENABLED
+ /endif LIBXML_DEBUG_ENABLED
+ /endif DEBUG_XML__
diff --git a/os400/libxmlrpg/dict.rpgle b/os400/libxmlrpg/dict.rpgle
new file mode 100644
index 0000000..cd36f50
--- /dev/null
+++ b/os400/libxmlrpg/dict.rpgle
@@ -0,0 +1,78 @@
+ * Summary: string dictionary
+ * Description: dictionary of reusable strings, just used to avoid
+ * allocation and freeing operations.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_DICT_H__)
+ /define XML_DICT_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ * The dictionary.
+
+ d xmlDictPtr s * based(######typedef######)
+
+ * Initializer
+
+ d xmlInitializeDict...
+ d pr 10i 0 extproc('xmlInitializeDict')
+
+ * Constructor and destructor.
+
+ d xmlDictCreate pr extproc('xmlDictCreate')
+ d like(xmlDictPtr)
+
+ d xmlDictSetLimit...
+ d pr 10u 0 extproc('xmlDictSetLimit') size_t
+ d dict value like(xmlDictPtr)
+ d limit 10u 0 value size_t
+
+ d xmlDictGetUsage...
+ d pr 10u 0 extproc('xmlDictGetUsage') size_t
+ d dict value like(xmlDictPtr)
+
+ d xmlDictCreateSub...
+ d pr extproc('xmlDictCreateSub')
+ d like(xmlDictPtr)
+ d sub value like(xmlDictPtr)
+
+ d xmlDictReference...
+ d pr 10i 0 extproc('xmlDictGetReference')
+ d dict value like(xmlDictPtr)
+
+ d xmlDictFree pr extproc('xmlDictFree')
+ d dict value like(xmlDictPtr)
+
+ * Lookup of entry in the dictionary.
+
+ d xmlDictLookup pr * extproc('xmlDictLookup') const xmlChar *
+ d dict value like(xmlDictPtr)
+ d name * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlDictExists pr * extproc('xmlDictExists') const xmlChar *
+ d dict value like(xmlDictPtr)
+ d name * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlDictQLookup pr * extproc('xmlDictQLookup') const xmlChar *
+ d dict value like(xmlDictPtr)
+ d name * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+
+ d xmlDictOwns pr 10i 0 extproc('xmlDictOwns')
+ d dict value like(xmlDictPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlDictSize pr 10i 0 extproc('xmlDictSize')
+ d dict value like(xmlDictPtr)
+
+ * Cleanup function
+
+ d xmlDictCleanup pr extproc('xmlDictCleanup')
+
+ /endif ! XML_DICT_H__
diff --git a/os400/libxmlrpg/encoding.rpgle b/os400/libxmlrpg/encoding.rpgle
new file mode 100644
index 0000000..80970fb
--- /dev/null
+++ b/os400/libxmlrpg/encoding.rpgle
@@ -0,0 +1,274 @@
+ * Summary: interface for the encoding conversion functions
+ * Description: interface for the encoding conversion functions needed for
+ * XML basic encoding and iconv() support.
+ *
+ * Related specs are
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_CHAR_ENCODING_H__)
+ /define XML_CHAR_ENCODING_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ * xmlCharEncoding:
+ *
+ * Predefined values for some standard encodings.
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
+ *
+ * Anything else would have to be translated to UTF8 before being
+ * given to the parser itself. The BOM for UTF16 and the encoding
+ * declaration are looked at and a converter is looked for at that
+ * point. If not found the parser stops here as asked by the XML REC. A
+ * converter can be registered by the user
+ * xmlRegisterCharEncodingHandler but the current form doesn't allow
+ * stateful transcoding (a serious problem agreed !). If iconv has been
+ * found it will be used automatically and allow stateful transcoding,
+ * the simplest is then to be sure to enable iconv and to provide iconv
+ * libs for the encoding support needed.
+ *
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
+ * the specific UTF-16LE and UTF-16BE are present.
+
+ d xmlCharEncoding...
+ d s 10i 0 based(######typedef######) enum
+ d XML_CHAR_ENCODING_ERROR... No encoding detected
+ d c -1
+ d XML_CHAR_ENCODING_NONE... No encoding detected
+ d c 0
+ d XML_CHAR_ENCODING_UTF8... UTF-8
+ d c 1
+ d XML_CHAR_ENCODING_UTF16LE... UTF-16 little endian
+ d c 2
+ d XML_CHAR_ENCODING_UTF16BE... UTF-16 big endian
+ d c 3
+ d XML_CHAR_ENCODING_UCS4LE... UCS-4 little endian
+ d c 4
+ d XML_CHAR_ENCODING_UCS4BE... UCS-4 big endian
+ d c 5
+ d XML_CHAR_ENCODING_EBCDIC... EBCDIC uh!
+ d c 6
+ d XML_CHAR_ENCODING_UCS4_2143... UCS-4 unusual order
+ d c 7
+ d XML_CHAR_ENCODING_UCS4_3412... UCS-4 unusual order
+ d c 8
+ d XML_CHAR_ENCODING_UCS2... UCS-2
+ d c 9
+ d XML_CHAR_ENCODING_8859_1... ISO-8859-1 ISOLatin1
+ d c 10
+ d XML_CHAR_ENCODING_8859_2... ISO-8859-2 ISOLatin2
+ d c 11
+ d XML_CHAR_ENCODING_8859_3... ISO-8859-3
+ d c 12
+ d XML_CHAR_ENCODING_8859_4... ISO-8859-4
+ d c 13
+ d XML_CHAR_ENCODING_8859_5... ISO-8859-5
+ d c 14
+ d XML_CHAR_ENCODING_8859_6... ISO-8859-6
+ d c 15
+ d XML_CHAR_ENCODING_8859_7... ISO-8859-7
+ d c 16
+ d XML_CHAR_ENCODING_8859_8... ISO-8859-8
+ d c 17
+ d XML_CHAR_ENCODING_8859_9... ISO-8859-9
+ d c 18
+ d XML_CHAR_ENCODING_2022_JP... ISO-2022-JP
+ d c 19
+ d XML_CHAR_ENCODING_SHIFT_JIS... Shift_JIS
+ d c 20
+ d XML_CHAR_ENCODING_EUC_JP... EUC-JP
+ d c 21
+ d XML_CHAR_ENCODING_ASCII... Pure ASCII
+ d c 22
+
+ * xmlCharEncodingInputFunc:
+ * @out: a pointer to an array of bytes to store the UTF-8 result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of chars in the original encoding
+ * @inlen: the length of @in
+ *
+ * Take a block of chars in the original encoding and try to convert
+ * it to an UTF-8 block of chars out.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets consumed.
+
+ d xmlCharEncodingInputFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlCharEncodingOutputFunc:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to another
+ * encoding.
+ * Note: a first call designed to produce heading info is called with
+ * in = NULL. If stateful this should also initialize the encoder state.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets produced.
+
+ d xmlCharEncodingOutputFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Block defining the handlers for non UTF-8 encodings.
+ * If iconv is supported, there are two extra fields.
+
+ /if defined(LIBXML_ICU_ENABLED)
+ d uconv_t ds based(######typedef######)
+ d align qualified
+ d uconv * UConverter *
+ d utf8 * UConverter *
+ /endif
+
+ d xmlCharEncodingHandlerPtr...
+ d s * based(######typedef######)
+
+ d xmlCharEncodingHandler...
+ d ds based(xmlCharEncodingHandlerPtr)
+ d align qualified
+ d name * char *
+ d input like(xmlCharEncodingInputFunc)
+ d output like(xmlCharEncodingOutputFunc)
+ *
+ /if defined(LIBXML_ICONV_ENABLED)
+ d iconv_in * iconv_t
+ d iconv_out * iconv_t
+ /endif LIBXML_ICONV_ENABLED
+ *
+ /if defined(LIBXML_ICU_ENABLED)
+ d uconv_in * uconv_t *
+ d uconv_out * uconv_t *
+ /endif LIBXML_ICU_ENABLED
+
+ /include "libxmlrpg/tree"
+
+ * Interfaces for encoding handlers.
+
+ d xmlInitCharEncodingHandlers...
+ d pr extproc(
+ d 'xmlInitCharEncodingHandlers')
+
+ d xmlCleanupCharEncodingHandlers...
+ d pr extproc(
+ d 'xmlCleanupCharEncodingHandlers')
+
+ d xmlRegisterCharEncodingHandler...
+ d pr extproc(
+ d 'xmlRegisterCharEncodingHandler')
+ d handler value like(xmlCharEncodingHandlerPtr)
+
+ d xmlGetCharEncodingHandler...
+ d pr extproc('xmlGetCharEncodingHandler')
+ d like(xmlCharEncodingHandlerPtr)
+ d enc value like(xmlCharEncoding)
+
+ d xmlFindCharEncodingHandler...
+ d pr extproc('xmlFindCharEncodingHandler')
+ d like(xmlCharEncodingHandlerPtr)
+ d name * value options(*string) const char *
+
+ d xmlNewCharEncodingHandler...
+ d pr extproc('xmlNewCharEncodingHandler')
+ d like(xmlCharEncodingHandlerPtr)
+ d name * value options(*string) const char *
+ d input value like(xmlCharEncodingInputFunc)
+ d output value like(xmlCharEncodingOutputFunc)
+
+ * Interfaces for encoding names and aliases.
+
+ d xmlAddEncodingAlias...
+ d pr 10i 0 extproc('xmlAddEncodingAlias')
+ d name * value options(*string) const char *
+ d alias * value options(*string) const char *
+
+ d xmlDelEncodingAlias...
+ d pr 10i 0 extproc('xmlDelEncodingAlias')
+ d alias * value options(*string) const char *
+
+ d xmlGetEncodingAlias...
+ d pr * extproc('xmlGetEncodingAlias') const char *
+ d alias * value options(*string) const char *
+
+ d xmlCleanupEncodingAliases...
+ d pr extproc('xmlCleanupEncodingAliases')
+
+ d xmlParseCharEncoding...
+ d pr extproc('xmlParseCharEncoding')
+ d like(xmlCharEncoding)
+ d name * value options(*string) const char *
+
+ d xmlGetCharEncodingName...
+ d pr * extproc('xmlGetCharEncodingName') const char *
+ d enc value like(xmlCharEncoding)
+
+ * Interfaces directly used by the parsers.
+
+ d xmlDetectCharEncoding...
+ d pr extproc('xmlDetectCharEncoding')
+ d like(xmlCharEncoding)
+ d in * value options(*string) const unsigned char*
+ d len 10i 0 value
+
+ d xmlCharEncOutFunc...
+ d pr 10i 0 extproc('xmlCharEncOutFunc')
+ d handler like(xmlCharEncodingHandler)
+ d out value like(xmlBufferPtr)
+ d in value like(xmlBufferPtr)
+
+ d xmlCharEncInFunc...
+ d pr 10i 0 extproc('xmlCharEncInFunc')
+ d handler like(xmlCharEncodingHandler)
+ d out value like(xmlBufferPtr)
+ d in value like(xmlBufferPtr)
+
+ d xmlCharEncFirstLine...
+ d pr 10i 0 extproc('xmlCharEncFirstLine')
+ d handler like(xmlCharEncodingHandler)
+ d out value like(xmlBufferPtr)
+ d in value like(xmlBufferPtr)
+
+ d xmlCharEncCloseFunc...
+ d pr 10i 0 extproc('xmlCharEncCloseFunc')
+ d handler like(xmlCharEncodingHandler)
+
+ * Export a few useful functions
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d UTF8Toisolat1 pr 10i 0 extproc('UTF8Toisolat1')
+ d out 65535 options(*varsize) unsigned char (*)
+ d outlen 10i 0
+ d in * value options(*string) const unsigned char*
+ d inlen 10i 0
+
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d isolat1ToUTF8 pr 10i 0 extproc('isolat1ToUTF8')
+ d out 65535 options(*varsize) unsigned char (*)
+ d outlen 10i 0
+ d in * value options(*string) const unsigned char*
+ d inlen 10i 0
+
+ /endif XML_CHAR_ENCODING_H
diff --git a/os400/libxmlrpg/entities.rpgle b/os400/libxmlrpg/entities.rpgle
new file mode 100644
index 0000000..8d97915
--- /dev/null
+++ b/os400/libxmlrpg/entities.rpgle
@@ -0,0 +1,174 @@
+ * Summary: interface for the XML entities handling
+ * Description: this module provides some of the entity API needed
+ * for the parser and applications.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_ENTITIES_H__)
+ /define XML_ENTITIES_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ * The different valid entity types.
+
+ d xmlEntityType s 10i 0 based(######typedef######) enum
+ d XML_INTERNAL_GENERAL_ENTITY...
+ d c 1
+ d XML_EXTERNAL_GENERAL_PARSED_ENTITY...
+ d c 2
+ d XML_EXTERNAL_GENERAL_UNPARSED_ENTITY...
+ d c 3
+ d XML_INTERNAL_PARAMETER_ENTITY...
+ d c 4
+ d XML_EXTERNAL_PARAMETER_ENTITY...
+ d c 5
+ d XML_INTERNAL_PREDEFINED_ENTITY...
+ d c 6
+
+ * An unit of storage for an entity, contains the string, the value
+ * and the linkind data needed for the linking in the hash table.
+
+ d xmlEntity ds based(xmlEntityPtr)
+ d align qualified
+ d #private * void *
+ d type like(xmlElementType) XML_ENTITY_DECL
+ d name * const xmlChar *
+ d children like(xmlNodePtr) First child link
+ d last like(xmlNodePtr) Last child link
+ d parent like(xmlDtdPtr) -> DTD
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) prev sibling link
+ d doc like(xmlDocPtr) containing document
+ d orig * xmlChar *
+ d content * xmlChar *
+ d length 10i 0 content length
+ d etype like(xmlEntityType) The entity type
+ d ExternalID * const xmlChar *
+ d SystemlID * const xmlChar *
+ d nexte like(xmlEntityPtr) unused
+ d URI * const xmlChar *
+ d owner 10i 0 Owns children ?
+ d checked 10i 0 Content checked ?
+
+ * All entities are stored in an hash table.
+ * There is 2 separate hash tables for global and parameter entities.
+
+ d xmlEntitiesTablePtr...
+ d s * based(######typedef######)
+
+ * External functions:
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ d xmlInitializePredefinedEntities...
+ d pr extproc(
+ d 'xmlInitializePredefinedEntities')
+ /endif LIBXML_LEGACY_ENABLD
+
+ d xmlNewEntity pr extproc('xmlNewEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlAddDocEntity...
+ d pr extproc('xmlAddDocEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlAddDtdEntity...
+ d pr extproc('xmlAddDtdEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d type 10i 0 value
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlGetPredefinedEntity...
+ d pr extproc('xmlGetPredefinedEntity')
+ d like(xmlEntityPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetDocEntity...
+ d pr extproc('xmlGetDocEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetDtdEntity...
+ d pr extproc('xmlGetDtdEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetParameterEntity...
+ d pr extproc('xmlGetParameterEntity')
+ d like(xmlEntityPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ d xmlEncodeEntities...
+ d pr * extproc('xmlEncodeEntities') xmlChar *
+ d doc value like(xmlDocPtr)
+ d input * value options(*string) const xmlChar *
+ /endif LIBXML_LEGACY_ENABLD
+
+ d xmlEncodeEntitiesReentrant...
+ d pr * extproc( xmlChar *
+ d 'xmlEncodeEntitiesReentrant')
+ d doc value like(xmlDocPtr)
+ d input * value options(*string) const xmlChar *
+XMLPU
+ d xmlEncodeSpecialChars...
+ d pr * extproc('xmlSpecialChars') xmlChar *
+ d doc value like(xmlDocPtr)
+ d input * value options(*string) const xmlChar *
+XMLPU
+ d xmlCreateEntitiesTable...
+ d pr extproc('xmlCreateEntitiesTable')
+ d like(xmlEntitiesTablePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyEntitiesTable...
+ d pr extproc('xmlCopyEntitiesTable')
+ d like(xmlEntitiesTablePtr)
+ d table value like(xmlEntitiesTablePtr)
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlFreeEntitiesTable...
+ d pr extproc('xmlFreeEntitiesTable')
+ d table value like(xmlEntitiesTablePtr)
+XMLPU
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlDumpEntitiesTable...
+ d pr extproc('xmlDumpEntitiesTable')
+ d buf value like(xmlBufferPtr)
+ d table value like(xmlEntitiesTablePtr)
+XMLPU
+ d xmlDumpEntityDecl...
+ d pr extproc('xmlDumpEntityDecl')
+ d buf value like(xmlBufferPtr)
+ d ent value like(xmlEntityPtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ d xmlCleanupPredefinedEntities...
+ d pr extproc(
+XMLPUd 'xmlCleanupPredefinedEntities')
+ /endif LIBXML_LEGACY_ENABLD
+
+ /endif XML_ENTITIES_H__
diff --git a/os400/libxmlrpg/globals.rpgle b/os400/libxmlrpg/globals.rpgle
new file mode 100644
index 0000000..80dadca
--- /dev/null
+++ b/os400/libxmlrpg/globals.rpgle
@@ -0,0 +1,557 @@
+ * Summary: interface for all global variables of the library
+ * Description: all the global variables and thread handling for
+ * those variables is handled by this module.
+ *
+ * The bottom of this file is automatically generated by build_glob.py
+ * based on the description file global.data
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_GLOBALS_H)
+ /define XML_GLOBALS_H
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/xmlerror"
+ /include "libxmlrpg/SAX"
+ /include "libxmlrpg/SAX2"
+ /include "libxmlrpg/xmlmemory"
+
+ d xmlInitGlobals pr extproc('xmlInitGlobals')
+
+ d xmlCleanupGlobals...
+ d pr extproc('xmlCleanupGlobals')
+
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+
+ d xmlParserInputBufferCreateFilenameFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+
+ d xmlOutputBufferCreateFilenameFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlParserInputBufferCreateFilenameDefault...
+ d pr extproc('xmlParserInputBufferCreate+
+ d FilenameDefault')
+ d like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+ d func value like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+
+ d xmlOutputBufferCreateFilenameDefault...
+ d pr extproc('xmlOutputBufferCreate+
+ d FilenameDefault')
+ d like(xmlOutputBuffer...
+ d CreateFilenameFunc)
+ d func value like(xmlOutputBuffer...
+ d CreateFilenameFunc)
+
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+
+ d xmlRegisterNodeFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+
+ d xmlDeregisterNodeFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlGlobalStatePtr...
+ d s * based(######typedef######)
+
+ d xmlGlobalState ds based(xmlGlobalStatePtr)
+ d align qualified
+ d xmlParserVersion...
+ d * const char *
+ d xmlDefaultSAXLocator...
+ d like(xmlSAXLocator)
+ d xmlDefaultSAXHandler...
+ d like(xmlSAXHandlerV1)
+ d docbDefaultSAXHandler...
+ d like(xmlSAXHandlerV1)
+ d htmlDefaultSAXHandler...
+ d like(xmlSAXHandlerV1)
+ d xmlFree like(xmlFreeFunc)
+ d xmlMalloc like(xmlMallocFunc)
+ d xmlMemStrdup like(xmlStrdupFunc)
+ d xmlRealloc like(xmlReallocFunc)
+ d xmlGenericError...
+ d like(xmlGenericErrorFunc)
+ d xmlStructuredError...
+ d like(xmlStructuredErrorFunc)
+ d xmlGenericErrorContext...
+ d * void *
+ d oldXMLWDcompatibility...
+ d 10i 0
+ d xmlBufferAllocScheme...
+ d like(xmlBufferAllocationScheme)
+ d xmlDefaultBufferSize...
+ d 10i 0
+ d xmlSubstituteEntitiesDefaultValue...
+ d 10i 0
+ d xmlDoValidityCheckingDefaultValue...
+ d 10i 0
+ d xmlGetWarningsDefaultValue...
+ d 10i 0
+ d xmlKeepBlanksDefaultValue...
+ d 10i 0
+ d xmlLineNumbersDefaultValue...
+ d 10i 0
+ d xmlLoadExtDtdDefaultValue...
+ d 10i 0
+ d xmlParserDebugEntities...
+ d 10i 0
+ d xmlPedanticParserDefaultValue...
+ d 10i 0
+ d xmlSaveNoEmptyTags...
+ d 10i 0
+ d xmlIndentTreeOutput...
+ d 10i 0
+ d xmlTreeIndentString...
+ d * const char *
+ d xmlRegisterNodeDefaultValue...
+ d like(xmlRegisterNodeFunc)
+ d xmlDeregisterNodeDefaultValue...
+ d like(xmlDeregisterNodeFunc)
+ d xmlMallocAtomic...
+ d like(xmlMallocFunc)
+ d xmlLastError like(xmlError)
+ d xmlParserInputBufferCreateFilenameValue...
+ d like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+ d xmlOutputBufferCreateFilenameValue...
+ d like(xmlOutputBuffer...
+ d CreateFilenameFunc)
+ d xmlStructuredErrorContext...
+ d * void *
+
+ /include "libxmlrpg/threads"
+
+ d xmlInitializeGlobalState...
+ d pr extproc('xmlInitializeGlobalState')
+ d qs value like(xmlGlobalStatePtr)
+
+ d xmlThrDefSetGenericErrorFunc...
+ d pr extproc(
+ d 'xmlThrDefSetGenericErrorFunc')
+ d ctx * value void *
+ d handler value like(xmlGenericErrorFunc)
+
+ d xmlThrDefSetStructuredErrorFunc...
+ d pr extproc(
+ d 'xmlThrDefSetStructuredErrorFunc')
+ d ctx * value void *
+ d handler value like(xmlStructuredErrorFunc)
+
+ d xmlRegisterNodeDefault...
+ d pr extproc('xmlRegisterNodeDefault')
+ d like(xmlRegisterNodeFunc)
+ d func value like(xmlRegisterNodeFunc)
+
+ d xmlThrDefRegisterNodeDefault...
+ d pr extproc(
+ d 'xmlThrDefRegisterNodeDefault')
+ d like(xmlRegisterNodeFunc)
+ d func value like(xmlRegisterNodeFunc)
+
+ d xmlDeregisterNodeDefault...
+ d pr extproc('xmlDeregisterNodeDefault')
+ d like(xmlDeregisterNodeFunc)
+ d func value like(xmlDeregisterNodeFunc)
+
+ d xmlThrDefDeregisterNodeDefault...
+ d pr extproc(
+ d 'xmlThrDefDeregisterNodeDefault')
+ d like(xmlDeregisterNodeFunc)
+ d func value like(xmlDeregisterNodeFunc)
+
+ d xmlThrDefOutputBufferCreateFilenameDefault...
+ d pr extproc('xmlThrDefOutputBuffer+
+ d CreateFilenameDefault')
+ d like(xmlOutputBuffer...
+ d CreateFilenameFunc)
+ d func value like(xmlOutputBuffer...
+ d CreateFilenameFunc)
+
+ d xmlThrDefParserInputBufferCreateFilenameDefault...
+ d pr extproc('xmlThrDefParserInputBuffer+
+ d CreateFilenameDefault')
+ d like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+ d func value like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+
+ /if defined(LIBXML_DOCB_ENABLED)
+ d get_docbDefaultSAXHandler...
+ d pr extproc(
+ d '__get_docbDefaultSAXHandler')
+ d like(xmlSAXHandlerV1)
+
+ d set_docbDefaultSAXHandler...
+ d pr extproc(
+ d '__set_docbDefaultSAXHandler')
+ d value value like(xmlSAXHandlerV1)
+ /endif
+
+ /if defined(LIBXML_HTML_ENABLED)
+ d get_htmlDefaultSAXHandler...
+ d pr extproc(
+ d '__get_htmlDefaultSAXHandler')
+ d like(xmlSAXHandlerV1)
+
+ d set_htmlDefaultSAXHandler...
+ d pr extproc(
+ d '__set_htmlDefaultSAXHandler')
+ d value value like(xmlSAXHandlerV1)
+ /endif
+
+ d get_xmlLastError...
+ d pr extproc('__get_xmlLastError')
+ d like(xmlError)
+
+ d set_xmlLastError...
+ d pr extproc('__set_xmlLastError')
+ d value value like(xmlError)
+
+ d get_oldXMLWDcompatibility...
+ d pr 10i 0 extproc(
+ d '__get_oldXMLWDcompatibility')
+
+ d set_oldXMLWDcompatibility...
+ d pr extproc(
+ d '__set_oldXMLWDcompatibility')
+ d value 10i 0 value
+
+ d get_xmlBufferAllocScheme...
+ d pr extproc('__get_xmlBufferAllocScheme')
+ d like(xmlBufferAllocationScheme)
+
+ d set_xmlBufferAllocScheme...
+ d pr extproc('__set_xmlBufferAllocScheme')
+ d value value like(xmlBufferAllocationScheme)
+
+ d xmlThrDefBufferAllocScheme...
+ d pr extproc('xmlThrDefBufferAllocScheme')
+ d like(xmlBufferAllocationScheme)
+ d v value like(xmlBufferAllocationScheme)
+
+ d get_xmlDefaultBufferSize...
+ d pr 10i 0 extproc('__get_xmlDefaultBufferSize')
+
+ d set_xmlDefaultBufferSize...
+ d pr extproc('__set_xmlDefaultBufferSize')
+ d value 10i 0 value
+
+ d xmlThrDefDefaultBufferSize...
+ d pr 10i 0 extproc('xmlThrDefDefaultBufferSize')
+ d v 10i 0 value
+
+ d get_xmlDefaultSAXHandler...
+ d pr extproc('__get_xmlDefaultSAXHandler')
+ d like(xmlSAXHandlerV1)
+
+ d set_xmlDefaultSAXHandler...
+ d pr extproc('__set_xmlDefaultSAXHandler')
+ d value value like(xmlSAXHandlerV1)
+
+ d get_xmlDefaultSAXLocator...
+ d pr extproc('__get_xmlDefaultSAXLocator')
+ d like(xmlSAXLocator)
+
+ d set_xmlDefaultSAXLocator...
+ d pr extproc('__set_xmlDefaultSAXLocator')
+ d value value like(xmlSAXLocator)
+
+ d get_xmlDoValidityCheckingDefaultValue...
+ d pr 10i 0 extproc('__get_xmlDoValidity+
+ d CheckingDefaultValue')
+
+ d set_xmlDoValidityCheckingDefaultValue...
+ d pr extproc('__set_xmlDoValidity+
+ d CheckingDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefDoValidityCheckingDefaultValue...
+ d pr 10i 0 extproc('xmlThrDefDoValidity+
+ d CheckingDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlGenericError...
+ d pr extproc('__get_xmlGenericError')
+ d like(xmlGenericErrorFunc)
+
+ d set_xmlGenericError...
+ d pr extproc('__set_xmlGenericError')
+ d func value like(xmlGenericErrorFunc)
+
+ d get_xmlStructuredError...
+ d pr extproc('__get_xmlStructuredError')
+ d like(xmlStructuredErrorFunc)
+
+ d set_xmlStructuredError...
+ d pr extproc('__set_xmlStructuredError')
+ d func value like(xmlStructuredErrorFunc)
+
+ d xmlStructuredError...
+ d pr extproc('__call_xmlStructuredError')
+ d userData * value options(*string) void *
+ d error value like(xmlErrorPtr)
+
+ d get_xmlGenericErrorContext...
+ d pr extproc(
+ d '__get_xmlGenericErrorContext')
+ d * void *
+
+ d set_xmlGenericErrorContext...
+ d pr extproc(
+ d '__set_xmlGenericErrorContext')
+ d value * value options(*string) void *
+
+ d get_xmlStructuredErrorContext...
+ d pr extproc(
+ d '__get_xmlStructuredErrorContext')
+ d * void *
+
+ d set_xmlStructuredErrorContext...
+ d pr extproc(
+ d '__set_xmlStructuredErrorContext')
+ d value * value options(*string) void *
+
+ d get_xmlGetWarningsDefaultValue...
+ d pr 10i 0 extproc(
+ d '__get_xmlGetWarningsDefaultValue')
+
+ d set_xmlGetWarningsDefaultValue...
+ d pr extproc(
+ d '__set_xmlGetWarningsDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefGetWarningsDefaultValue...
+ d pr 10i 0 extproc(
+ d 'xmlThrDefGetWarningsDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlIndentTreeOutput...
+ d pr 10i 0 extproc('__get_xmlIndentTreeOutput')
+
+ d set_xmlIndentTreeOutput...
+ d pr extproc('__set_xmlIndentTreeOutput')
+ d value 10i 0 value
+
+ d xmlThrDefIndentTreeOutput...
+ d pr 10i 0 extproc('xmlThrDefIndentTreeOutput')
+ d v 10i 0 value
+
+ d get_xmlTreeIndentString...
+ d pr * extproc('__get_xmlTreeIndentString') const char *
+
+ d set_xmlTreeIndentString...
+ d pr extproc('__set_xmlTreeIndentString')
+ d value * value options(*string) const char *
+
+ d xmlThrDefTreeIndentString...
+ d pr * extproc('xmlThrDefTreeIndentString') const char *
+ d v * value options(*string) const char *
+
+ d get_xmlKeepBlanksDefaultValue...
+ d pr 10i 0 extproc(
+ d '__get_xmlKeepBlanksDefaultValue')
+
+ d set_xmlKeepBlanksDefaultValue...
+ d pr extproc(
+ d '__set_xmlKeepBlanksDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefKeepBlanksDefaultValue...
+ d pr 10i 0 extproc(
+ d 'xmlThrDefKeepBlanksDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlLineNumbersDefaultValue...
+ d pr 10i 0 extproc(
+ d '__get_xmlLineNumbersDefaultValue')
+
+ d set_xmlLineNumbersDefaultValue...
+ d pr extproc(
+ d '__set_xmlLineNumbersDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefLineNumbersDefaultValue...
+ d pr 10i 0 extproc(
+ d 'xmlThrDefLineNumbersDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlLoadExtDtdDefaultValue...
+ d pr 10i 0 extproc(
+ d '__get_xmlLoadExtDtdDefaultValue')
+
+ d set_xmlLoadExtDtdDefaultValue...
+ d pr extproc(
+ d '__set_xmlLoadExtDtdDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefLoadExtDtdDefaultValue...
+ d pr 10i 0 extproc(
+ d 'xmlThrDefLoadExtDtdDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlParserDebugEntities...
+ d pr 10i 0 extproc(
+ d '__get_xmlParserDebugEntities')
+
+ d set_xmlParserDebugEntities...
+ d pr extproc(
+ d '__set_xmlParserDebugEntities')
+ d value 10i 0 value
+
+ d xmlThrDefParserDebugEntities...
+ d pr 10i 0 extproc(
+ d 'xmlThrDefParserDebugEntities')
+ d v 10i 0 value
+
+ d get_xmlParserVersion...
+ d pr * extproc('__get_xmlParserVersion') const char *
+
+ d set_xmlParserVersion...
+ d pr extproc('__set_xmlParserVersion')
+ d value * value options(*string) const char *
+
+ d get_xmlPedanticParserDefaultValue...
+ d pr 10i 0 extproc('__get_xmlPedantic+
+ d ParserDefaultValue')
+
+ d set_xmlPedanticParserDefaultValue...
+ d pr extproc('__set_xmlPedantic+
+ d ParserDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefPedanticParserDefaultValue...
+ d pr 10i 0 extproc('xmlThrDefPedantic+
+ d ParserDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlSaveNoEmptyTags...
+ d pr 10i 0 extproc('__get_xmlSaveNoEmptyTags')
+
+ d set_xmlSaveNoEmptyTags...
+ d pr extproc('__set_xmlSaveNoEmptyTags')
+ d value 10i 0 value
+
+ d xmlThrDefSaveNoEmptyTags...
+ d pr 10i 0 extproc('xmlThrDefSaveNoEmptyTags')
+ d v 10i 0 value
+
+ d get_xmlSubstituteEntitiesDefaultValue...
+ d pr 10i 0 extproc('__get_xmlSubstitute+
+ d EntitiesDefaultValue')
+
+ d set_xmlSubstituteEntitiesDefaultValue...
+ d pr extproc('__set_xmlSubstitute+
+ d EntitiesDefaultValue')
+ d value 10i 0 value
+
+ d xmlThrDefSubstituteEntitiesDefaultValue...
+ d pr 10i 0 extproc('xmlThrDefSubstitute+
+ d EntitiesDefaultValue')
+ d v 10i 0 value
+
+ d get_xmlRegisterNodeDefaultValue...
+ d pr extproc('__get_xmlRegisterNode+
+ d DefaultValue')
+ d like(xmlRegisterNodeFunc)
+
+ d set_xmlRegisterNodeDefaultValue...
+ d pr extproc('__set_xmlRegisterNode+
+ d DefaultValue')
+ d value value like(xmlRegisterNodeFunc)
+
+ d xmlRegisterNodeDefaultValue...
+ d pr extproc('__call_xmlRegisterNode+
+ d DefaultValue')
+ d node value like(xmlNodePtr)
+
+ d get_xmlDeregisterNodeDefaultValue...
+ d pr extproc('__get_xmlDeregisterNode+
+ d DefaultValue')
+ d like(xmlDeregisterNodeFunc)
+
+ d set_xmlDeregisterNodeDefaultValue...
+ d pr extproc('__set_xmlDeregisterNode+
+ d DefaultValue')
+ d value value like(xmlDeregisterNodeFunc)
+
+ d xmlDeregisterNodeDefaultValue...
+ d pr extproc('__call_xmlDeregisterNode+
+ d DefaultValue')
+ d node value like(xmlNodePtr)
+
+ d get_xmlParserInputBufferCreateFilenameValue...
+ d pr extproc('__get_xmlParserInputBuffer+
+ d CreateFilenameValue')
+ d like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+
+ d set_xmlParserInputBufferCreateFilenameValue...
+ d pr extproc('__set_xmlParserInputBuffer+
+ d CreateFilenameValue')
+ d value value like(xmlParserInputBuffer...
+ d CreateFilenameFunc)
+
+ d xmlParserInputBufferCreateFilenameValue...
+ d pr extproc('__call_xmlParserInputBuffer+
+ d CreateFilenameValue')
+ d like(xmlParserInputBufferPtr)
+ d URI * value options(*string) const char *
+ d enc value like(xmlCharEncoding)
+
+ d get_xmlOutputBufferCreateFilenameValue...
+ d pr extproc('__get_xmlOutputBuffer+
+ d CreateFilenameValue')
+ d like(
+ d xmlOutputBufferCreateFilenameFunc)
+
+ d set_xmlOutputBufferCreateFilenameValue...
+ d pr extproc('__set_xmlOutputBuffer+
+ d CreateFilenameValue')
+ d value value like(
+ d xmlOutputBufferCreateFilenameFunc)
+
+ d xmlOutputBufferCreateFilenameValue...
+ d pr extproc('__call_xmlOutputBuffer+
+ d CreateFilenameValue')
+ d like(xmlOutputBufferPtr)
+ d URI * value options(*string) const char *
+ d encoder value like(xmlCharEncodingHandlerPtr)
+ d compression 10i 0 value
+
+ /endif XML_GLOBALS_H
diff --git a/os400/libxmlrpg/hash.rpgle b/os400/libxmlrpg/hash.rpgle
new file mode 100644
index 0000000..867f98f
--- /dev/null
+++ b/os400/libxmlrpg/hash.rpgle
@@ -0,0 +1,231 @@
+ * Summary: Chained hash tables
+ * Description: This module implements the hash table support used in
+ * various places in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_HASH_H__)
+ /define XML_HASH_H__
+
+ * The hash table.
+
+ d xmlHashTablePtr...
+ d s * based(######typedef######)
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/dict"
+
+ * function types:
+
+ * xmlHashDeallocator:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to free data from a hash.
+
+ d xmlHashDeallocator...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlHashCopier:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to copy data from a hash.
+ *
+ * Returns a copy of the data or NULL in case of error.
+
+ d xmlHashCopier s * based(######typedef######)
+ d procptr
+
+ * xmlHashScanner:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ *
+ * Callback when scanning data in a hash with the simple scanner.
+
+ d xmlHashScanner s * based(######typedef######)
+ d procptr
+
+ * xmlHashScannerFull:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ * @name2: the second name associated
+ * @name3: the third name associated
+ *
+ * Callback when scanning data in a hash with the full scanner.
+
+ d xmlHashScannerFull...
+ d s * based(######typedef######)
+ d procptr
+
+ * Constructor and destructor.
+
+ d xmlHashCreate pr extproc('xmlHashCreate')
+ d like(xmlHashTablePtr)
+ d size 10i 0 value
+
+ d xmlHashCreateDict...
+ d pr extproc('xmlHashCreateDict')
+ d like(xmlHashTablePtr)
+ d size 10i 0 value
+ d dict value like(xmlDictPtr)
+
+ d xmlHashFree pr extproc('xmlHashFree')
+ d table value like(xmlHashTablePtr)
+ d f value like(xmlHashDeallocator)
+
+ * Add a new entry to the hash table.
+
+ d xmlHashAddEntry...
+ d pr 10i 0 extproc('xmlHashAddEntry')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+
+ d xmlHashUpdateEntry...
+ d pr 10i 0 extproc('xmlHashUpdateEntry')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+ d f value like(xmlHashDeallocator)
+
+ d xmlHashAddEntry2...
+ d pr 10i 0 extproc('xmlHashAddEntry2')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+
+ d xmlHashUpdateEntry2...
+ d pr 10i 0 extproc('xmlHashUpdateEntry2')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+ d f value like(xmlHashDeallocator)
+
+ d xmlHashAddEntry3...
+ d pr 10i 0 extproc('xmlHashAddEntry3')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+
+ d xmlHashUpdateEntry3...
+ d pr 10i 0 extproc('xmlHashUpdateEntry3')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d userdata * value options(*string) void *
+ d f value like(xmlHashDeallocator)
+
+ * Remove an entry from the hash table.
+
+ d xmlHashRemoveEntry...
+ d pr 10i 0 extproc('xmlHashRemoveEntry')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d f value like(xmlHashDeallocator)
+
+ d xmlHashRemoveEntry2...
+ d pr 10i 0 extproc('xmlHashRemoveEntry2')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d f value like(xmlHashDeallocator)
+
+ d xmlHashRemoveEntry3...
+ d pr 10i 0 extproc('xmlHashRemoveEntry3')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d f value like(xmlHashDeallocator)
+
+ * Retrieve the userdata.
+
+ d xmlHashLookup pr * extproc('xmlHashLookup') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlHashLookup2 pr * extproc('xmlHashLookup2') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+
+ d xmlHashLookup3 pr * extproc('xmlHashLookup3') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+
+ d xmlHashQLookup pr * extproc('xmlHashQLookup') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlHashQLookup2...
+ d pr * extproc('xmlHashQLookup2') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d prefix2 * value options(*string) const xmlChar *
+
+ d xmlHashQLookup3...
+ d pr * extproc('xmlHashQLookup3') void *
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d prefix2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d prefix3 * value options(*string) const xmlChar *
+
+ * Helpers.
+
+ d xmlHashCopy pr extproc('xmlHashCopy')
+ d like(xmlHashTablePtr)
+ d table value like(xmlHashTablePtr)
+ d f value like(xmlHashCopier)
+
+ d xmlHashSize pr 10i 0 extproc('xmlHashSize')
+ d table value like(xmlHashTablePtr)
+
+ d xmlHashScan pr extproc('xmlHashScan')
+ d table value like(xmlHashTablePtr)
+ d f value like(xmlHashScanner)
+ d data * value options(*string) void *
+
+ d xmlHashScan3 pr extproc('xmlHashScan3')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d f value like(xmlHashScanner)
+ d data * value options(*string) void *
+
+ d xmlHashScanFull...
+ d pr extproc('xmlHashScanFull')
+ d table value like(xmlHashTablePtr)
+ d f value like(xmlHashScannerFull)
+ d data * value options(*string) void *
+
+ d xmlHashScanFull3...
+ d pr extproc('xmlHashScanFull3')
+ d table value like(xmlHashTablePtr)
+ d name * value options(*string) const xmlChar *
+ d name2 * value options(*string) const xmlChar *
+ d name3 * value options(*string) const xmlChar *
+ d f value like(xmlHashScannerFull)
+ d data * value options(*string) void *
+
+ /endif XML_HASH_H__
diff --git a/os400/libxmlrpg/list.rpgle b/os400/libxmlrpg/list.rpgle
new file mode 100644
index 0000000..c62fcbd
--- /dev/null
+++ b/os400/libxmlrpg/list.rpgle
@@ -0,0 +1,168 @@
+ * Summary: lists interfaces
+ * Description: this module implement the list support used in
+ * various place in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_LINK_INCLUDE__)
+ /define XML_LINK_INCLUDE__
+
+ /include "libxmlrpg/xmlversion"
+
+ d xmlLinkPtr s * based(######typedef######)
+
+ d xmlListPtr s * based(######typedef######)
+
+ * xmlListDeallocator:
+ * @lk: the data to deallocate
+ *
+ * Callback function used to free data from a list.
+
+ d xmlListDeallocator...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlListDataCompare:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Callback function used to compare 2 data.
+ *
+ * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
+
+ d xmlListDataCompare...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlListWalker:
+ * @data: the data found in the list
+ * @user: extra user provided data to the walker
+ *
+ * Callback function used when walking a list with xmlListWalk().
+ *
+ * Returns 0 to stop walking the list, 1 otherwise.
+
+ d xmlListWalker s * based(######typedef######)
+ d procptr
+
+ * Creation/Deletion
+
+ d xmlListCreate pr extproc('xmlListCreate')
+ d like(xmlListPtr)
+ d deallocator value like(xmlListDeallocator)
+ d compare value like(xmlListDataCompare)
+
+ d xmlListDelete pr extproc('xmlListDelete')
+ d l value like(xmlListPtr)
+
+ * Basic Operators
+
+ d xmlListSearch pr * extproc('xmlListSearch') void *
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListReverseSearch...
+ d pr * extproc('xmlListReverseSearch') void *
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListInsert pr 10i 0 extproc('xmlListInsert')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListAppend pr 10i 0 extproc('xmlListAppend')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListRemoveFirst...
+ d pr 10i 0 extproc('xmlListRemoveFirst')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListRemoveLast...
+ d pr 10i 0 extproc('xmlListRemoveLast')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListRemoveAll...
+ d pr 10i 0 extproc('xmlListRemoveAll')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListClear pr extproc('xmlListClear')
+ d l value like(xmlListPtr)
+
+ d xmlListEmpty pr 10i 0 extproc('xmlListEmpty')
+ d l value like(xmlListPtr)
+
+ d xmlListFront pr extproc('xmlListFront')
+ d like(xmlLinkPtr)
+ d l value like(xmlListPtr)
+
+ d xmlListEnd pr extproc('xmlListEnd')
+ d like(xmlLinkPtr)
+ d l value like(xmlListPtr)
+
+ d xmlListSize pr 10i 0 extproc('xmlListSize')
+ d l value like(xmlListPtr)
+
+ d xmlListPopFront...
+ d pr extproc('xmlListPopFront')
+ d l value like(xmlListPtr)
+
+ d xmlListPopBack...
+ d pr extproc('xmlListPopBack')
+ d l value like(xmlListPtr)
+
+ d xmlListPushFront...
+ d pr 10i 0 extproc('xmlListPushFront')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ d xmlListPushBack...
+ d pr 10i 0 extproc('xmlListPushBack')
+ d l value like(xmlListPtr)
+ d data * value void *
+
+ * Advanced Operators
+
+ d xmlListReverse pr extproc('xmlListReverse')
+ d l value like(xmlListPtr)
+
+ d xmlListSort pr extproc('xmlListSort')
+ d l value like(xmlListPtr)
+
+ d xmlListWalk pr extproc('xmlListWalk')
+ d l value like(xmlListPtr)
+ d walker value like(xmlListWalker)
+ d user * value const void *
+
+ d xmlListReverseWalk...
+ d pr extproc('xmlListReverseWalk')
+ d l value like(xmlListPtr)
+ d walker value like(xmlListWalker)
+ d user * value const void *
+
+ d xmlListMerge pr extproc('xmlListMerge')
+ d l1 value like(xmlListPtr)
+ d l2 value like(xmlListPtr)
+
+ d xmlListDup pr extproc('xmlListDup')
+ d like(xmlListPtr)
+ d old value like(xmlListPtr)
+
+ d xmlListCopy pr 10i 0 extproc('xmlListCopy')
+ d cur value like(xmlListPtr)
+ d old value like(xmlListPtr) const
+
+ * Link operators
+
+ d xmlListGetData pr * extproc('xmlListGetData') void *
+ d lk value like(xmlLinkPtr)
+
+ * xmlListUnique()
+ * xmlListSwap
+
+ /endif XML_LINK_INCLUDE__
diff --git a/os400/libxmlrpg/nanoftp.rpgle b/os400/libxmlrpg/nanoftp.rpgle
new file mode 100644
index 0000000..0637562
--- /dev/null
+++ b/os400/libxmlrpg/nanoftp.rpgle
@@ -0,0 +1,156 @@
+ * Summary: minimal FTP implementation
+ * Description: minimal FTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(NANO_FTP_H__)
+ /define NANO_FTP_H__
+
+ /include /libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_FTP_ENABLED)
+
+ d INVALID_SOCKET c -1
+
+ * ftpListCallback:
+ * @userData: user provided data for the callback
+ * @filename: the file name (including "->" when links are shown)
+ * @attrib: the attribute string
+ * @owner: the owner string
+ * @group: the group string
+ * @size: the file size
+ * @links: the link count
+ * @year: the year
+ * @month: the month
+ * @day: the day
+ * @hour: the hour
+ * @minute: the minute
+ *
+ * A callback for the xmlNanoFTPList command.
+ * Note that only one of year and day:minute are specified.
+
+ d ftpListCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * ftpDataCallback:
+ * @userData: the user provided context
+ * @data: the data received
+ * @len: its size in bytes
+ *
+ * A callback for the xmlNanoFTPGet command.
+
+ d ftpDataCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * Init
+
+ d xmlNanoFTPInit pr extproc('xmlNanoFTPInit')
+
+ d xmlNanoFTPCleanup...
+ d pr extproc('xmlNanoFTPCleanup')
+
+ * Creating/freeing contexts.
+
+ d xmlNanoFTPNewCtxt...
+ d pr * extproc('xmlNanoFTPNewCtxt') void *
+ d URL * value options(*string) const char *
+
+ d xmlNanoFTPFreeCtxt...
+ d pr extproc('xmlNanoFTPFreeCtxt')
+ d ctx * value void *
+
+ d xmlNanoFTPConnectTo...
+ d pr * extproc('xmlNanoFTPConnectTo') void *
+ d server * value options(*string) const char *
+ d port 10i 0 value
+
+ * Opening/closing session connections.
+
+ d xmlNanoFTPOpen pr * extproc('xmlNanoFTPOpen') void *
+ d URL * value options(*string) const char *
+
+ d xmlNanoFTPConnect...
+ d pr 10i 0 extproc('xmlNanoFTPConnect')
+ d ctx * value void *
+
+ d xmlNanoFTPClose...
+ d pr 10i 0 extproc('xmlNanoFTPClose')
+ d ctx * value void *
+
+ d xmlNanoFTPQuit pr 10i 0 extproc('xmlNanoFTPQuit')
+ d ctx * value void *
+
+ d xmlNanoFTPScanProxy...
+ d pr extproc('xmlNanoFTPScanProxy')
+ d URL * value options(*string) const char *
+
+ d xmlNanoFTPProxy...
+ d pr extproc('xmlNanoFTPProxy')
+ d host * value options(*string) const char *
+ d port 10i 0 value
+ d user * value options(*string) const char *
+ d passwd * value options(*string) const char *
+ d type 10i 0 value
+
+ d xmlNanoFTPUpdateURL...
+ d pr 10i 0 extproc('xmlNanoFTPUpdateURL')
+ d ctx * value void *
+ d URL * value options(*string) const char *
+
+ * Rather internal commands.
+
+ d xmlNanoFTPGetResponse...
+ d pr 10i 0 extproc('xmlNanoFTPGetResponse')
+ d ctx * value void *
+
+ d xmlNanoFTPCheckResponse...
+ d pr 10i 0 extproc('xmlNanoFTPCheckResponse')
+ d ctx * value void *
+
+ * CD/DIR/GET handlers.
+
+ d xmlNanoFTPCwd pr 10i 0 extproc('xmlNanoFTPCwd')
+ d ctx * value void *
+ d directory * value options(*string) const char *
+
+ d xmlNanoFTPDele pr 10i 0 extproc('xmlNanoFTPDele')
+ d ctx * value void *
+ d file * value options(*string) const char *
+
+ d xmlNanoFTPGetConnection...
+ d pr 10i 0 extproc('xmlNanoFTPGetConnection') Socket descriptor
+ d ctx * value void *
+
+ d xmlNanoFTPCloseConnection...
+ d pr 10i 0 extproc('xmlNanoFTPCloseConnection')
+ d ctx * value void *
+
+ d xmlNanoFTPList pr 10i 0 extproc('xmlNanoFTPList')
+ d ctx * value void *
+ d callback value like(ftpListCallback)
+ d userData * value void *
+ d filename * value options(*string) const char *
+
+ d xmlNanoFTPGetSocket...
+ d pr 10i 0 extproc('xmlNanoFTPGetSocket') Socket descriptor
+ d ctx * value void *
+ d filename * value options(*string) const char *
+
+ d xmlNanoFTPGet pr 10i 0 extproc('xmlNanoFTPGet')
+ d ctx * value void *
+ d callback value like(ftpDataCallback)
+ d userData * value void *
+ d filename * value options(*string) const char *
+
+ d xmlNanoFTPRead pr 10i 0 extproc('xmlNanoFTPRead')
+ d ctx * value void *
+ d dest * value void *
+ d len 10i 0 value
+
+ /endif LIBXML_FTP_ENABLED
+ /endif NANO_FTP_H__
diff --git a/os400/libxmlrpg/nanohttp.rpgle b/os400/libxmlrpg/nanohttp.rpgle
new file mode 100644
index 0000000..4a076d2
--- /dev/null
+++ b/os400/libxmlrpg/nanohttp.rpgle
@@ -0,0 +1,103 @@
+ * Summary: minimal HTTP implementation
+ * Description: minimal HTTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(NANO_HTTP_H__)
+ /define NANO_HTTP_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_HTTP_ENABLED)
+
+ d xmlNanoHTTPInit...
+ d pr extproc('xmlNanoHTTPInit')
+
+ d xmlNanoHTTPCleanup...
+ d pr extproc('xmlNanoHTTPCleanup')
+
+ d xmlNanoHTTPScanProxy...
+ d pr extproc('xmlNanoHTTPScanProxy')
+ d URL * value options(*string) const char *
+
+ d xmlNanoHTTPFetch...
+ d pr 10i 0 extproc('xmlNanoHTTPFetch')
+ d URL * value options(*string) const char *
+ d filename * value options(*string) const char *
+
+ d xmlNanoHTTPMethod...
+ d pr * extproc('xmlNanoHTTPMethod') void *
+ d URL * value options(*string) const char *
+ d method * value options(*string) const char *
+ d input * value options(*string) const char *
+ d contentType * value char * *
+ d headers * value options(*string) const char *
+ d ilen 10i 0 value
+
+ d xmlNanoHTTPMethodRedir...
+ d pr * extproc('xmlNanoHTTPMethodRedir') void *
+ d URL * value options(*string) const char *
+ d method * value options(*string) const char *
+ d input * value options(*string) const char *
+ d contentType * value char * *
+ d redir * value char * *
+ d headers * value options(*string) const char *
+ d ilen 10i 0 value
+
+ d xmlNanoHTTPOpen...
+ d pr * extproc('xmlNanoHTTPOpen') void *
+ d URL * value options(*string) const char *
+ d contentType * char *(*)
+
+ d xmlNanoHTTPOpenRedir...
+ d pr * extproc('xmlNanoHTTPOpenRedir') void *
+ d URL * value options(*string) const char *
+ d contentType * value char * *
+ d redir * value char * *
+
+ d xmlNanoHTTPReturnCode...
+ d pr 10i 0 extproc('xmlNanoHTTPReturnCode')
+ d ctx * value void *
+
+ d xmlNanoHTTPAuthHeader...
+ d pr * extproc('xmlNanoHTTPAuthHeader') const char *
+ d ctx * value void *
+
+ d xmlNanoHTTPRedir...
+ d pr * extproc('xmlNanoHTTPRedir') const char *
+ d ctx * value void *
+
+ d xmlNanoHTTPContentLength...
+ d pr 10i 0 extproc('xmlNanoHTTPContentLength')
+ d ctx * value void *
+
+ d xmlNanoHTTPEncoding...
+ d pr * extproc('xmlNanoHTTPEncoding') const char *
+ d ctx * value void *
+
+ d xmlNanoHTTPMimeType...
+ d pr * extproc('xmlNanoHTTPMimeType') const char *
+ d ctx * value void *
+
+ d xmlNanoHTTPRead...
+ d pr 10i 0 extproc('xmlNanoHTTPRead')
+ d ctx * value void *
+ d dest * value void *
+ d len 10i 0 value
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlNanoHTTPSave...
+ d pr 10i 0 extproc('xmlNanoHTTPSave')
+ d ctxt * value void *
+ d filename * value options(*string) const char *
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d xmlNanoHTTPClose...
+ d pr extproc('xmlNanoHTTPClose')
+ d ctx * value void *
+
+ /endif LIBXML_HTTP_ENABLED
+ /endif NANO_HTTP_H__
diff --git a/os400/libxmlrpg/parser.rpgle b/os400/libxmlrpg/parser.rpgle
new file mode 100644
index 0000000..7f29e31
--- /dev/null
+++ b/os400/libxmlrpg/parser.rpgle
@@ -0,0 +1,1407 @@
+ * Summary: the core parser module
+ * Description: Interfaces, constants and types related to the XML parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_PARSER_H__)
+ /define XML_PARSER_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/dict"
+ /include "libxmlrpg/hash"
+ /include "libxmlrpg/valid"
+ /include "libxmlrpg/entities"
+ /include "libxmlrpg/xmlerror"
+ /include "libxmlrpg/xmlstring"
+
+ * XML_DEFAULT_VERSION:
+ *
+ * The default version of XML used: 1.0
+
+ d XML_DEFAULT_VERSION...
+ d c '1.0'
+
+ * xmlParserInput:
+ *
+ * An xmlParserInput is an input flow for the XML processor.
+ * Each entity parsed is associated an xmlParserInput (except the
+ * few predefined ones). This is the case both for internal entities
+ * - in which case the flow is already completely in memory - or
+ * external entities - in which case we use the buf structure for
+ * progressive reading and I18N conversions to the internal UTF-8 format.
+
+ * xmlParserInputDeallocate:
+ * @str: the string to deallocate
+ *
+ * Callback for freeing some parser input allocations.
+
+ d xmlParserInputDeallocate...
+ d s * based(######typedef######)
+ d procptr
+
+ * Input buffer
+
+ d xmlParserInput ds based(xmlParserInputPtr)
+ d align qualified
+ d buf like(xmlParserInputBufferPtr) UTF-8 encoded buffer
+ d filename * const char *
+ d directory * const char *
+ d base * const char *
+ d cur * const char *
+ d end * const char *
+ d length 10i 0 Length if known
+ d line 10i 0 Current line
+ d col 10i 0 Current column
+ *
+ * NOTE: consumed is only tested for equality in the parser code,
+ * so even if there is an overflow this should not give troubles
+ * for parsing very large instances.
+ *
+ d consumed 20u 0 # consumed xmlChars
+ d free like(xmlParserInputDeallocate) base deallocator
+ d encoding * const xmlChar *
+ d version * const xmlChar *
+ d standalone 10i 0 Standalone entity ?
+ d id 10i 0 Entity unique ID
+
+ * xmlParserNodeInfo:
+ *
+ * The parser can be asked to collect Node informations, i.e. at what
+ * place in the file they were detected.
+ * NOTE: This is off by default and not very well tested.
+
+ d xmlParserNodeInfoPtr...
+ d s * based(######typedef######)
+
+ d xmlParserNodeInfo...
+ d ds based(xmlParserNodeInfoPtr)
+ d align qualified
+ d node like(xmlNodePtr) const
+ * Position & line # that text that created the node begins & ends on
+ d begin_pos 20u 0
+ d begin_line 20u 0
+ d end_pos 20u 0
+ d end_line 20u 0
+
+ d xmlParserNodeInfoSeqPtr...
+ d s * based(######typedef######)
+
+ d xmlParserNodeInfoSeq...
+ d ds based(xmlParserNodeInfoSeqPtr)
+ d align qualified
+ d maximum 20u 0
+ d length 20u 0
+ d buffer like(xmlParserNodeInfoPtr)
+
+ * xmlParserInputState:
+ *
+ * The parser is now working also as a state based parser.
+ * The recursive one use the state info for entities processing.
+
+ d xmlParserInputState...
+ d s 10i 0 based(######typedef######) enum
+ d XML_PARSER_EOF... Nothing to parse
+ d c -1
+ d XML_PARSER_START... Nothing parsed
+ d c 0
+ d XML_PARSER_MISC... Misc* b4 int subset
+ d c 1
+ d XML_PARSER_PI c 2 In proc instr
+ d XML_PARSER_DTD... In some DTD content
+ d c 3
+ d XML_PARSER_PROLOG... Misc* after int sbst
+ d c 4
+ d XML_PARSER_COMMENT... Within a comment
+ d c 5
+ d XML_PARSER_START_TAG... Within a start tag
+ d c 6
+ d XML_PARSER_CONTENT... Within the content
+ d c 7
+ d XML_PARSER_CDATA_SECTION... Within a CDATA
+ d c 8
+ d XML_PARSER_END_TAG... Within a closing tag
+ d c 9
+ d XML_PARSER_ENTITY_DECL... In an entity decl
+ d c 10
+ d XML_PARSER_ENTITY_VALUE... In entity decl value
+ d c 11
+ d XML_PARSER_ATTRIBUTE_VALUE... In attribute value
+ d c 12
+ d XML_PARSER_SYSTEM_LITERAL... In a SYSTEM value
+ d c 13
+ d XML_PARSER_EPILOG... Last end tag Misc*
+ d c 14
+ d XML_PARSER_IGNORE... In IGNORED section
+ d c 15
+ d XML_PARSER_PUBLIC_LITERAL... In a PUBLIC value
+ d c 16
+
+ * XML_DETECT_IDS:
+ *
+ * Bit in the loadsubset context field to tell to do ID/REFs lookups.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+
+ d XML_DETECT_IDS c 2
+
+ * XML_COMPLETE_ATTRS:
+ *
+ * Bit in the loadsubset context field to tell to do complete the
+ * elements attributes lists with the ones defaulted from the DTDs.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+
+ d XML_COMPLETE_ATTRS...
+ d c 4
+
+ * XML_SKIP_IDS:
+ *
+ * Bit in the loadsubset context field to tell to not do ID/REFs
+ * registration.
+ * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
+
+ d XML_SKIP_IDS c 8
+
+ * xmlParserMode:
+ *
+ * A parser can operate in various modes
+
+ d xmlParserMode s 10i 0 based(######typedef######) enum
+ d XML_PARSE_UNKNOWN...
+ d c 0
+ d XML_PARSE_DOM...
+ d c 1
+ d XML_PARSE_SAX...
+ d c 2
+ d XML_PARSE_PUSH_DOM...
+ d c 3
+ d XML_PARSE_PUSH_SAX...
+ d c 4
+ d XML_PARSE_READER...
+ d c 5
+
+ * xmlParserCtxt:
+ *
+ * The parser context.
+ * NOTE This doesn't completely define the parser state, the (current ?)
+ * design of the parser uses recursive function calls since this allow
+ * and easy mapping from the production rules of the specification
+ * to the actual code. The drawback is that the actual function call
+ * also reflect the parser state. However most of the parsing routines
+ * takes as the only argument the parser context pointer, so migrating
+ * to a state based parser for progressive parsing shouldn't be too
+ * hard.
+
+ d xmlParserCtxt ds based(xmlParserCtxtPtr)
+ d align qualified
+ d sax like(xmlSAXHandlerPtr) The SAX handler
+ d userData * SAX only-4 DOM build
+ d myDoc like(xmlDocPtr) Document being built
+ d wellFormed 10i 0 Well formed doc ?
+ d replaceEntities... Replace entities ?
+ d 10i 0
+ d version * const xmlChar *
+ d encoding * const xmlChar *
+ d standalone 10i 0 Standalone document
+ d html 10i 0 HTML state/type
+ *
+ * Input stream stack
+ *
+ d input like(xmlParserInputPtr) Current input stream
+ d inputNr 10i 0 # current in streams
+ d inputMax 10i 0 Max # of in streams
+ d inputTab * xmlParserInputPtr *
+ *
+ * Node analysis stack only used for DOM building
+ *
+ d node like(xmlNodePtr) Current parsed node
+ d nodeNr 10i 0 Parsing stack depth
+ d nodeMax 10i 0 Max stack depth
+ d nodeTab * xmlNodePtr *
+ *
+ d record_info 10i 0 Keep node info ?
+ d node_seq like(xmlParserNodeInfoSeq) Parsed nodes info
+ *
+ d errNo 10i 0 Error code
+ *
+ d hasExternalSubset...
+ d 10i 0
+ d hashPErefs 10i 0
+ d external 10i 0 Parsing ext. entity?
+ *
+ d valid 10i 0 Valid document ?
+ d validate 10i 0 Try to validate ?
+ d vctxt like(xmlValidCtxt) Validity context
+ *
+ d instate like(xmlParserInputState) Current input type
+ d token 10i 0 Next look-ahead char
+ *
+ d directory * char *
+ *
+ * Node name stack
+ *
+ d name * const xmlChar *
+ d nameNr 10i 0 Parsing stack depth
+ d nameMax 10i 0 Max stack depth
+ d nameTab * const xmlChar * *
+ *
+ d nbChars 20i 0 # xmlChars processed
+ d checkIndex 20i 0 4 progressive parse
+ d keepBlanks 10i 0 Ugly but ...
+ d disableSAX 10i 0 Disable SAX cllbacks
+ d inSubset 10i 0 In int 1/ext 2 sbset
+ d intSubName * const xmlChar *
+ d extSubURI * const xmlChar *
+ d extSubSytem * const xmlChar *
+ *
+ * xml:space values
+ *
+ d space * int *
+ d spaceNr 10i 0 Parsing stack depth
+ d spaceMax 10i 0 Max stack depth
+ d spaceTab * int *
+ *
+ d depth 10i 0 To detect loops
+ d entity like(xmlParserInputPtr) To check boundaries
+ d charset 10i 0 In-memory content
+ d nodelen 10i 0 Speed up parsing
+ d nodemem 10i 0 Speed up parsing
+ d pedantic 10i 0 Enb. pedantic warng
+ d #private * void *
+ *
+ d loadsubset 10i 0 Load ext. subset ?
+ d linenumbers 10i 0 Set line numbers ?
+ d catalogs * void *
+ d recovery 10i 0 Run in recovery mode
+ d progressive 10i 0 Progressive parsing?
+ d dict like(xmlDictPtr) Parser dictionary
+ d atts * const xmlChar *
+ d maxatts 10i 0 Above array size
+ d docdict 10i 0 Use dictionary ?
+ *
+ * pre-interned strings
+ *
+ d str_xml * const xmlChar *
+ d str_xmlns * const xmlChar *
+ d str_xml_ms * const xmlChar *
+ *
+ * Everything below is used only by the new SAX mode
+ *
+ d sax2 10i 0 New SAX mode ?
+ d nsNr 10i 0 # inherited nmspaces
+ d nsMax 10i 0 Array size
+ d nsTab * const xmlChar *
+ d attallocs * int *
+ d pushTab * void *
+ d attsDefault like(xmlHashTablePtr) Defaulted attrs
+ d attsSpecial like(xmlHashTablePtr) non-CDATA attrs
+ d nsWellFormed 10i 0 Doc namespace OK ?
+ d options 10i 0 Extra options
+ *
+ * Those fields are needed only for treaming parsing so far
+ *
+ d dictNames 10i 0 Dict names in tree ?
+ d freeElemsNr 10i 0 # free element nodes
+ d freeElems like(xmlNodePtr) Free elem nodes list
+ d freeAttrsNr 10i 0 # free attr. nodes
+ d freeAttrs like(xmlAttrPtr) Free attr noes list
+ *
+ * the complete error informations for the last error.
+ *
+ d lastError like(xmlError)
+ d parseMode like(xmlParserMode) The parser mode
+ d nbentities 20u 0 # entity references
+ d sizeentities 20u 0 Parsed entities size
+ *
+ * for use by HTML non-recursive parser
+ *
+ d nodeInfo like(xmlParserNodeInfo) Current NodeInfo
+ d nodeInfoNr 10i 0 Parsing stack depth
+ d nodeInfoMax 10i 0 Max stack depth
+ d nodeInfoTab * xmlParserNodeInfo *
+ *
+ d input_id 10i 0 Label inputs ?
+ d sizeentcopy 20u 0 Entity copy volume
+
+ * xmlSAXLocator:
+ *
+ * A SAX Locator.
+
+ d xmlSAXLocator ds based(xmlSAXLocatorPtr)
+ d align qualified
+ d getPublicId * procptr
+ d getSystemId * procptr
+ d getLineNumber * procptr
+ d getColumnNumber...
+ d * procptr
+
+ * xmlSAXHandler:
+ *
+ * A SAX handler is bunch of callbacks called by the parser when
+ * processing of the input generate data or structure informations.
+
+ * resolveEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Callback:
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+
+ d resolveEntitySAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * internalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+
+ d internalSubsetSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * externalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+
+ d externalSubsetSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * getEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+
+ d getEntitySAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * getParameterEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+
+ d getParameterEntitySAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * entityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed.
+
+ d entityDeclSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * notationDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+
+ d notationDeclSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * attributeDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed.
+
+ d attributeDeclSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * elementDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed.
+
+ d elementDeclSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * unparsedEntityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed.
+
+ d unparsedEntityDeclSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * setDocumentLocatorSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
+ * Everything is available on the context, so this is useless in our case.
+
+ d setDocumentLocatorSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * startDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document start being processed.
+
+ d startDocumentSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * endDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document end has been detected.
+
+ d endDocumentSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * startElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * Called when an opening tag has been processed.
+
+ d startElementSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * endElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * Called when the end of an element has been detected.
+
+ d endElementSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * attributeSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+
+ d attributeSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * referenceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Called when an entity reference is detected.
+
+ d referenceSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * charactersSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some chars from the parser.
+
+ d charactersSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * ignorableWhitespaceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters.
+
+ d ignorableWhitespaceSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * processingInstructionSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+
+ d processingInstructionSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * commentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+
+ d commentSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * cdataBlockSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * Called when a pcdata block has been parsed.
+
+ d cdataBlockSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * warningSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, callback.
+
+ d warningSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, callback.
+
+ d errorSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format fatal error messages, callback.
+ * Note: so far fatalError() SAX callbacks are not used, error()
+ * get all the callbacks for errors.
+
+ d fatalErrorSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone?
+ *
+ * Returns 1 if true
+
+ d isStandaloneSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * hasInternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset.
+ *
+ * Returns 1 if true
+
+ d hasInternalSubsetSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * hasExternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset?
+ *
+ * Returns 1 if true
+
+ d hasExternalSubsetSAXFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ ************************************************************************
+ * *
+ * The SAX version 2 API extensions *
+ * *
+ ************************************************************************
+
+ * XML_SAX2_MAGIC:
+ *
+ * Special constant found in SAX2 blocks initialized fields
+
+ d XML_SAX2_MAGIC c X'DEEDBEAF'
+
+ * startElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace
+ * definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
+ * ones are at the end of the array
+ * @attributes: pointer to the array of
+ * (localname/prefix/URI/value/end) attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace informations for the element, as well as
+ * the new namespace declarations on the element.
+
+ d startElementNsSAX2Func...
+ d s * based(######typedef######)
+ d procptr
+
+ * endElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace informations for the element.
+
+ d endElementNsSAX2Func...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlSAXHandler ds based(xmlSAXHandlerPtr)
+ d align qualified
+ d internalSubset...
+ d like(internalSubsetSAXFunc)
+ d isStandalone like(isStandaloneSAXFunc)
+ d hasInternalSubset...
+ d like(hasInternalSubsetSAXFunc)
+ d hasExternalSubset...
+ d like(hasExternalSubsetSAXFunc)
+ d resolveEntity like(resolveEntitySAXFunc)
+ d getEntity like(getEntitySAXFunc)
+ d entityDecl like(entityDeclSAXFunc)
+ d notationDecl like(notationDeclSAXFunc)
+ d attributeDecl like(attributeDeclSAXFunc)
+ d elementDecl like(elementDeclSAXFunc)
+ d unparsedEntityDecl...
+ d like(unparsedEntityDeclSAXFunc)
+ d setDocumentLocator...
+ d like(setDocumentLocatorSAXFunc)
+ d startDocument like(startDocumentSAXFunc)
+ d endDocument like(endDocumentSAXFunc)
+ d startElement like(startElementSAXFunc)
+ d endElement like(endElementSAXFunc)
+ d reference like(referenceSAXFunc)
+ d characters like(charactersSAXFunc)
+ d ignorableWhitespace...
+ d like(ignorableWhitespaceSAXFunc)
+ d processingInstruction...
+ d like(processingInstructionSAXFunc)
+ d comment like(commentSAXFunc)
+ d warning like(warningSAXFunc)
+ d error like(errorSAXFunc)
+ d fatalError like(fatalErrorSAXFunc)
+ d getParameterEntity...
+ d like(getParameterEntitySAXFunc)
+ d cdataBlock like(cdataBlockSAXFunc)
+ d externalSubset...
+ d like(externalSubsetSAXFunc)
+ d initialized 10u 0
+ *
+ * The following fields are extensions available only on version 2
+ *
+ d #private * void *
+ d startElementNs...
+ d like(startElementNsSAX2Func)
+ d endELementNs like(endElementNsSAX2Func)
+ d serror like(xmlStructuredErrorFunc)
+
+ * SAX Version 1
+
+ d xmlSAXHandlerV1Ptr...
+ d s * based(######typedef######)
+
+ d xmlSAXHandlerV1...
+ d ds based(xmlSAXHandlerV1Ptr)
+ d align qualified
+ d internalSubset...
+ d like(internalSubsetSAXFunc)
+ d isStandalone like(isStandaloneSAXFunc)
+ d hasInternalSubset...
+ d like(hasInternalSubsetSAXFunc)
+ d hasExternalSubset...
+ d like(hasExternalSubsetSAXFunc)
+ d resolveEntity like(resolveEntitySAXFunc)
+ d getEntity like(getEntitySAXFunc)
+ d entityDecl like(entityDeclSAXFunc)
+ d notationDecl like(notationDeclSAXFunc)
+ d attributeDecl like(attributeDeclSAXFunc)
+ d elementDecl like(elementDeclSAXFunc)
+ d unparsedEntityDecl...
+ d like(unparsedEntityDeclSAXFunc)
+ d setDocumentLocator...
+ d like(setDocumentLocatorSAXFunc)
+ d startDocument like(startDocumentSAXFunc)
+ d endDocument like(endDocumentSAXFunc)
+ d startElement like(startElementSAXFunc)
+ d endElement like(endElementSAXFunc)
+ d reference like(referenceSAXFunc)
+ d characters like(charactersSAXFunc)
+ d ignorableWhitespace...
+ d like(ignorableWhitespaceSAXFunc)
+ d processingInstruction...
+ d like(processingInstructionSAXFunc)
+ d comment like(commentSAXFunc)
+ d warning like(warningSAXFunc)
+ d error like(errorSAXFunc)
+ d fatalError like(fatalErrorSAXFunc)
+ d getParameterEntity...
+ d like(getParameterEntitySAXFunc)
+ d cdataBlock like(cdataBlockSAXFunc)
+ d externalSubset...
+ d like(externalSubsetSAXFunc)
+ d initialized 10u 0
+
+ * xmlExternalEntityLoader:
+ * @URL: The System ID of the resource requested
+ * @ID: The Public ID of the resource requested
+ * @context: the XML parser context
+ *
+ * External entity loaders types.
+ *
+ * Returns the entity input parser.
+
+ d xmlExternalEntityLoader...
+ d s * based(######typedef######)
+ d procptr
+
+ /include "libxmlrpg/encoding"
+ /include "libxmlrpg/xmlIO"
+ /include "libxmlrpg/globals"
+
+ * Init/Cleanup
+
+ d xmlInitParser pr extproc('xmlInitParser')
+
+ d xmlCleanupParser...
+ d pr extproc('xmlCleanupParser')
+
+ * Input functions
+
+ d xmlParserInputRead...
+ d pr 10i 0 extproc('xmlParserInputRead')
+ d in value like(xmlParserInputPtr)
+ d len 10i 0 value
+
+ d xmlParserInputGrow...
+ d pr 10i 0 extproc('xmlParserInputGrow')
+ d in value like(xmlParserInputPtr)
+ d len 10i 0 value
+
+ * Basic parsing Interfaces
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlParseDoc pr extproc('xmlParseDoc')
+ d like(xmlDocPtr)
+ d cur * value options(*string) const xmlChar *
+
+ d xmlParseFile pr extproc('xmlParseFile')
+ d like(xmlDocPtr)
+ d filename * value options(*string) const char *
+
+ d xmlParseMemory pr extproc('xmlParseMemory')
+ d like(xmlDocPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlSubstituteEntitiesDefault...
+ d pr 10i 0 extproc(
+ d 'xmlSubstituteEntitiesDefault')
+ d val 10i 0 value
+
+ d xmlKeepBlanksDefault...
+ d pr 10i 0 extproc('xmlKeepBlanksDefault')
+ d val 10i 0 value
+
+ d xmlStopParser pr extproc('xmlStopParser')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlPedanticParserDefault...
+ d pr 10i 0 extproc('xmlPedanticParserDefault')
+ d val 10i 0 value
+
+ d xmlLineNumbersDefault...
+ d pr 10i 0 extproc('xmlLineNumbersDefault')
+ d val 10i 0 value
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ * Recovery mode
+
+ d xmlRecoverDoc pr extproc('xmlRecoverDoc')
+ d like(xmlDocPtr)
+ d cur * value options(*string) const xmlChar *
+
+ d xmlRecoverMemory...
+ d pr extproc('xmlRecoverMemory')
+ d like(xmlDocPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlRecoverFile pr extproc('xmlRecoverFile')
+ d like(xmlDocPtr)
+ d filename * value options(*string) const char *
+ /endif LIBXML_SAX1_ENABLED
+
+ * Less common routines and SAX interfaces
+
+ d xmlParseDocument...
+ d pr 10i 0 extproc('xmlParseDocument')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseExtParsedEnt...
+ d pr 10i 0 extproc('xmlParseExtParsedEnt')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlSAXUserParseFile...
+ d pr 10i 0 extproc('xmlSAXUserParseFile')
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d filename * value options(*string) const char *
+
+ d xmlSAXUserParseMemory...
+ d pr 10i 0 extproc('xmlSAXUserParseMemory')
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlSAXParseDoc pr extproc('xmlSAXParseDoc')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d cur * value options(*string) const xmlChar *
+ d recovery 10i 0 value
+
+ d xmlSAXParseMemory...
+ d pr extproc('xmlSAXParseMemory')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d recovery 10i 0 value
+
+ d xmlSAXParseMemoryWithData...
+ d pr extproc('xmlSAXParseMemoryWithData')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d recovery 10i 0 value
+ d data * value void *
+
+ d xmlSAXParseFile...
+ d pr extproc('xmlSAXParseFile')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d filename * value options(*string) const char *
+ d recovery 10i 0 value
+
+ d xmlSAXParseFileWithData...
+ d pr extproc('xmlSAXParseFileWithData')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d filename * value options(*string) const char *
+ d recovery 10i 0 value
+ d data * value void *
+
+ d xmlSAXParseEntity...
+ d pr extproc('xmlSAXParseEntity')
+ d like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d filename * value options(*string) const char *
+
+ d xmlParseEntity...
+ d pr extproc('xmlParseEntity')
+ d like(xmlDocPtr)
+ d filename * value options(*string) const char *
+ /endif LIBXML_SAX1_ENABLED
+
+ /if defined(LIBXML_VALID_ENABLED)
+ d xmlSAXParseDTD pr extproc('xmlSAXParseDTD')
+ d like(xmlDtdPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d xmlParseDTD pr extproc('xmlParseDTD')
+ d like(xmlDtdPtr)
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ d xmlIOParseDTD pr extproc('xmlIOParseDTD')
+ d like(xmlDtdPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d input value like(xmlParserInputBufferPtr)
+ d enc value like(xmlCharEncoding)
+ /endif LIBXML_VALID_ENABLED
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlParseBalancedChunkMemory...
+ d pr 10i 0 extproc(
+ d 'xmlParseBalancedChunkMemory')
+ d doc value like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d depth 10i 0 value
+ d user_data * value void *
+ d string * value options(*string) const xmlChar *
+ d lst * value xmlNodePtr *
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlParseInNodeContext...
+ d pr extproc('xmlParseInNodeContext')
+ d like(xmlParserErrors)
+ d node value like(xmlNodePtr)
+ d data * value options(*string) const char *
+ d datalen 10i 0 value
+ d options 10i 0 value
+ d lst * value xmlNodePtr *
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlParseBalancedChunkMemoryRecover...
+ d pr 10i 0 extproc(
+ d 'xmlParseBalancedChunkMemoryRecover')
+ d doc value like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d depth 10i 0 value
+ d string * value options(*string) const xmlChar *
+ d lst * value xmlNodePtr *
+ d recover 10i 0 value
+
+ d xmlParseExternalEntity...
+ d pr 10i 0 extproc('xmlParseExternalEntity')
+ d doc value like(xmlDocPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d depth 10i 0 value
+ d URL * value options(*string) const xmlChar *
+ d ID * value options(*string) const xmlChar *
+ d lst * value xmlNodePtr *
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlParseCtxtExternalEntity...
+ d pr 10i 0 extproc('xmlParseCtxtExternalEntity')
+ d sax value like(xmlSAXHandlerPtr)
+ d URL * value options(*string) const xmlChar *
+ d ID * value options(*string) const xmlChar *
+ d lst * value xmlNodePtr *
+
+ * Parser contexts handling.
+
+ d xmlNewParserCtxt...
+ d pr extproc('xmlNewParserCtxt')
+ d like(xmlParserCtxtPtr)
+
+ d xmlInitParserCtxt...
+ d pr 10i 0 extproc('xmlInitParserCtxt')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlClearParserCtxt...
+ d pr extproc('xmlClearParserCtxt')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlFreeParserCtxt...
+ d pr extproc('xmlFreeParserCtxt')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlSetupParserForBuffer...
+ d pr extproc('xmlSetupParserForBuffer')
+ d ctxt value like(xmlParserCtxtPtr)
+ d buffer * value options(*string) const xmlChar *
+ d filename * value options(*string) const char *
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlCreateDocParserCtxt...
+ d pr extproc('xmlCreateDocParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d cur * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ * Reading/setting optional parsing features.
+
+ d xmlGetFeaturesList...
+ d pr 10i 0 extproc('xmlGetFeaturesList')
+ d len 10i 0
+ d result * const char *(*)
+
+ d xmlGetFeature pr 10i 0 extproc('xmlGetFeature')
+ d ctxt value like(xmlParserCtxtPtr)
+ d name * value options(*string) const char *
+ d result * value void *
+
+ d xmlSetFeature pr 10i 0 extproc('xmlSetFeature')
+ d ctxt value like(xmlParserCtxtPtr)
+ d name * value options(*string) const char *
+ d result * value void *
+ /endif LIBXML_LEGACY_ENABLD
+
+ /if defined(LIBXML_PUSH_ENABLED)
+ * Interfaces for the Push mode.
+
+ d xmlCreatePushParserCtxt...
+ d pr extproc('xmlCreatePushParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d filename * value options(*string) const char *
+
+ d xmlParseChunk pr 10i 0 extproc('xmlParseChunk')
+ d ctxt value like(xmlParserCtxtPtr)
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d terminate 10i 0 value
+ /endif LIBXML_PUSH_ENABLED
+
+ * Special I/O mode.
+
+ d xmlCreateIOParserCtxt...
+ d pr extproc('xmlCreateIOParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d enc value like(xmlCharEncoding)
+
+ d xmlNewIOInputStream...
+ d pr extproc('xmlNewIOInputStream')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d input value like(xmlParserInputBufferPtr)
+ d enc value like(xmlCharEncoding)
+
+ * Node infos.
+
+ d xmlParserFindNodeInfo...
+ d pr * extproc('xmlParserFindNodeInfo') xmlParserNodeInfo *
+ d ctxt value like(xmlParserCtxtPtr)
+ d node value like(xmlNodePtr) const
+
+ d xmlInitNodeInfoSeq...
+ d pr extproc('xmlInitNodeInfoSeq')
+ d seq value like(xmlParserNodeInfoSeqPtr)
+
+ d xmlClearNodeInfoSeq...
+ d pr extproc('xmlClearNodeInfoSeq')
+ d seq value like(xmlParserNodeInfoSeqPtr)
+
+ d xmlParserFindNodeInfoIndex...
+ d pr 20u 0 extproc('xmlParserFindNodeInfoIndex')
+ d seq value like(xmlParserNodeInfoSeqPtr)
+ d node value like(xmlNodePtr) const
+
+ d xmlParserAddNodeInfo...
+ d pr extproc('xmlParserAddNodeInfo')
+ d ctxt value like(xmlParserCtxtPtr)
+ d info value like(xmlParserNodeInfoPtr) const
+
+ * External entities handling actually implemented in xmlIO.
+
+ d xmlSetExternalEntityLoader...
+ d pr extproc('xmlSetExternalEntityLoader')
+ d f value like(xmlExternalEntityLoader)
+
+ d xmlGetExternalEntityLoader...
+ d pr extproc('xmlGetExternalEntityLoader')
+ d like(xmlExternalEntityLoader)
+
+ d xmlLoadExternalEntity...
+ d pr extproc('xmlLoadExternalEntity')
+ d like(xmlParserInputPtr)
+ d URL * value options(*string) const char *
+ d ID * value options(*string) const char *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ * Index lookup, actually implemented in the encoding module
+
+ d xmlByteConsumed...
+ d pr 20i 0 extproc('xmlByteConsumed')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ * New set of simpler/more flexible APIs
+
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+
+ d xmlParserOption...
+ d s 10i 0 based(######typedef######) enum
+ d XML_PARSE_RECOVER... Recover on errors
+ d c X'00000001'
+ d XML_PARSE_NOENT... Substitute entities
+ d c X'00000002'
+ d XML_PARSE_DTDLOAD... Load external subset
+ d c X'00000004'
+ d XML_PARSE_DTDATTR... Default DTD attrs
+ d c X'00000008'
+ d XML_PARSE_DTDVALID... Validate with DTD
+ d c X'00000010'
+ d XML_PARSE_NOERROR... Suppress err reports
+ d c X'00000020'
+ d XML_PARSE_NOWARNING... Suppr warn reports
+ d c X'00000040'
+ d XML_PARSE_PEDANTIC... Pedantic err report
+ d c X'00000080'
+ d XML_PARSE_NOBLANKS... Remove blank nodes
+ d c X'00000100'
+ d XML_PARSE_SAX1... Use SAX1 internally
+ d c X'00000200'
+ d XML_PARSE_XINCLUDE... Impl XInclude subst
+ d c X'00000400'
+ d XML_PARSE_NONET... Forbid netwrk access
+ d c X'00000800'
+ d XML_PARSE_NODICT... No contxt dict reuse
+ d c X'00001000'
+ d XML_PARSE_NSCLEAN... Rmv redndnt ns decls
+ d c X'00002000'
+ d XML_PARSE_NOCDATA... CDATA as text nodes
+ d c X'00004000'
+ d XML_PARSE_NOXINCNODE... No XINCL START/END
+ d c X'00008000'
+ d XML_PARSE_COMPACT... Compact text nodes
+ d c X'00010000'
+ d XML_PARSE_OLD10... B4 upd5 compatible
+ d c X'00020000'
+ d XML_PARSE_NOBASEFIX... No XINC xml:base fix
+ d c X'00040000'
+ d XML_PARSE_HUGE... No parsing limit
+ d c X'00080000'
+ d XML_PARSE_OLDSAX... Use SAX2 b4 2.7.0
+ d c X'00100000'
+ d XML_PARSE_IGNORE_ENC... No int doc code hint
+ d c X'00200000'
+ d XML_PARSE_BIG_LINES... Big line#-->PSVI fld
+ d c X'00400000'
+
+ d xmlCtxtReset pr extproc('xmlCtxtReset')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlCtxtResetPush...
+ d pr 10i 0 extproc('xmlCtxtResetPush')
+ d ctxt value like(xmlParserCtxtPtr)
+ d chunk * value options(*string) const char *
+ d size 10i 0 value
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+
+ d xmlCtxtUseOptions...
+ d pr 10i 0 extproc('xmlCtxtUseOptions')
+ d ctxt value like(xmlParserCtxtPtr)
+ d options 10i 0 value
+
+ d xmlReadDoc pr extproc('xmlReadDoc')
+ d like(xmlDocPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReadFile pr extproc('xmlReadFile')
+ d like(xmlDocPtr)
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReadMemory pr extproc('xmlReadMemory')
+ d like(xmlDocPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReadFd pr extproc('xmlReadFd')
+ d like(xmlDocPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReadIO pr extproc('xmlReadIO')
+ d like(xmlDocPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCtxtReadDoc pr extproc('xmlCtxtReadDoc')
+ d like(xmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCtxtReadFile...
+ d pr extproc('xmlCtxtReadFile')
+ d like(xmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCtxtReadMemory...
+ d pr extproc('xmlCtxtReadMemory')
+ d like(xmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCtxtReadFd pr extproc('xmlCtxtReadFd')
+ d like(xmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCtxtReadIO pr extproc('xmlCtxtReadIO')
+ d like(xmlDocPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ * Library wide options
+
+ * xmlFeature:
+ *
+ * Used to examine the existance of features that can be enabled
+ * or disabled at compile-time.
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
+
+ d xmlFeature s 10i 0 based(######typedef######) enum
+ d XML_WITH_THREAD...
+ d c 1
+ d XML_WITH_TREE c 2
+ d XML_WITH_OUTPUT...
+ d c 3
+ d XML_WITH_PUSH c 4
+ d XML_WITH_READER...
+ d c 5
+ d XML_WITH_PATTERN...
+ d c 6
+ d XML_WITH_WRITER...
+ d c 7
+ d XML_WITH_SAX1 c 8
+ d XML_WITH_FTP c 9
+ d XML_WITH_HTTP c 10
+ d XML_WITH_VALID...
+ d c 11
+ d XML_WITH_HTML c 12
+ d XML_WITH_LEGACY...
+ d c 13
+ d XML_WITH_C14N c 14
+ d XML_WITH_CATALOG...
+ d c 15
+ d XML_WITH_XPATH...
+ d c 16
+ d XML_WITH_XPTR c 17
+ d XML_WITH_XINCLUDE...
+ d c 18
+ d XML_WITH_ICONV...
+ d c 19
+ d XML_WITH_ISO8859X...
+ d c 20
+ d XML_WITH_UNICODE...
+ d c 21
+ d XML_WITH_REGEXP...
+ d c 22
+ d XML_WITH_AUTOMATA...
+ d c 23
+ d XML_WITH_EXPR c 24
+ d XML_WITH_SCHEMAS...
+ d c 25
+ d XML_WITH_SCHEMATRON...
+ d c 26
+ d XML_WITH_MODULES...
+ d c 27
+ d XML_WITH_DEBUG...
+ d c 28
+ d XML_WITH_DEBUG_MEM...
+ d c 29
+ d XML_WITH_DEBUG_RUN...
+ d c 30
+ d XML_WITH_ZLIB c 31
+ d XML_WITH_ICU c 32
+ d XML_WITH_LZMA c 33
+ d XML_WITH_NONE c 99999
+
+ d xmlHasFeature pr 10i 0 extproc('xmlHasFeature')
+ d feature value like(xmlFeature)
+
+ /endif XML_PARSER_H__
diff --git a/os400/libxmlrpg/parserInternals.rpgle b/os400/libxmlrpg/parserInternals.rpgle
new file mode 100644
index 0000000..6942b7d
--- /dev/null
+++ b/os400/libxmlrpg/parserInternals.rpgle
@@ -0,0 +1,575 @@
+ * Summary: internals routines and limits exported by the parser.
+ * Description: this module exports a number of internal parsing routines
+ * they are not really all intended for applications but
+ * can prove useful doing low level processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_PARSER_INTERNALS_H__)
+ /define XML_PARSER_INTERNALS_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/HTMLparser"
+ /include "libxmlrpg/chvalid"
+
+ * xmlParserMaxDepth:
+ *
+ * arbitrary depth limit for the XML documents that we allow to
+ * process. This is not a limitation of the parser but a safety
+ * boundary feature, use XML_PARSE_HUGE option to override it.
+
+ d xmlParserMaxDepth...
+ d s 10u 0 import('xmlParserMaxDepth')
+
+ * XML_MAX_TEXT_LENGTH:
+ *
+ * Maximum size allowed for a single text node when building a tree.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+
+ d XML_MAX_TEXT_LENGTH...
+ d c 10000000
+
+ * XML_MAX_NAME_LENGTH:
+ *
+ * Maximum size allowed for a markup identitier
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Note that with the use of parsing dictionaries overriding the limit
+ * may result in more runtime memory usage in face of "unfriendly' content
+ * Introduced in 2.9.0
+
+ d XML_MAX_NAME_LENGTH...
+ d c 50000
+
+ * XML_MAX_DICTIONARY_LIMIT:
+ *
+ * Maximum size allowed by the parser for a dictionary by default
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+
+ d XML_MAX_DICTIONARY_LIMIT...
+ d c 10000000
+
+ * XML_MAX_LOOKUP_LIMIT:
+ *
+ * Maximum size allowed by the parser for ahead lookup
+ * This is an upper boundary enforced by the parser to avoid bad
+ * behaviour on "unfriendly' content
+ * Introduced in 2.9.0
+
+ d XML_MAX_LOOKUP_LIMIT...
+ d c 10000000
+
+ * XML_MAX_NAMELEN:
+ *
+ * Identifiers can be longer, but this will be more costly
+ * at runtime.
+
+ d XML_MAX_NAMELEN...
+ d c 100
+
+ * INPUT_CHUNK:
+ *
+ * The parser tries to always have that amount of input ready.
+ * One of the point is providing context when reporting errors.
+
+ d INPUT_CHUNK c 250
+
+ * Global variables used for predefined strings.
+
+ d xmlStringText s 4 import('xmlStringText') \0 in 5th byte
+
+ d xmlStringTextNoenc...
+ d s 9 import('xmlStringTextNoenc') \0 in 10th byte
+
+ d xmlStringComment...
+ d s 7 import('xmlStringTextComment') \0 in 8th byte
+
+ * Function to finish the work of the macros where needed.
+
+ d xmlIsLetter pr 10i 0 extproc('xmlIsLetter')
+ d c 10i 0 value
+
+ * Parser context.
+
+ d xmlCreateFileParserCtxt...
+ d pr extproc('xmlCreateFileParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+
+ d xmlCreateURLParserCtxt...
+ d pr extproc('xmlCreateURLParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlCreateMemoryParserCtxt...
+ d pr extproc('xmlCreateMemoryParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlCreateEntityParserCtxt...
+ d pr extproc('xmlCreateEntityParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d URL * value options(*string) const xmlChar *
+ d ID * value options(*string) const xmlChar *
+ d base * value options(*string) const xmlChar *
+
+ d xmlSwitchEncoding...
+ d pr 10i 0 extproc('xmlSwitchEncoding')
+ d ctxt value like(xmlParserCtxtPtr)
+ d enc value like(xmlCharEncoding)
+
+ d xmlSwitchToEncoding...
+ d pr 10i 0 extproc('xmlSwitchToEncoding')
+ d ctxt value like(xmlParserCtxtPtr)
+ d handler value like(xmlCharEncodingHandlerPtr)
+
+ d xmlSwitchInputEncoding...
+ d pr 10i 0 extproc('xmlSwitchInputEncoding')
+ d ctxt value like(xmlParserCtxtPtr)
+ d input value like(xmlParserInputPtr)
+ d handler value like(xmlCharEncodingHandlerPtr)
+
+ * Input Streams.
+
+ d xmlNewStringInputStream...
+ d pr extproc('xmlNewStringInputStream')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d buffer * value options(*string) const xmlChar *
+
+ d xmlNewEntityInputStream...
+ d pr extproc('xmlNewEntityInputStream')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d entity value like(xmlEntityPtr)
+
+ d xmlPushInput pr 10i 0 extproc('xmlPushInput')
+ d ctxt value like(xmlParserCtxtPtr)
+ d input value like(xmlParserInputPtr)
+
+ d xmlPopInput pr extproc('xmlPopInput')
+ d like(xmlChar)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlFreeInputStream...
+ d pr extproc('xmlFreeInputStream')
+ d input value like(xmlParserInputPtr)
+
+ d xmlNewInputFromFile...
+ d pr extproc('xmlNewInputFromFile')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+
+ d xmlNewInputStream...
+ d pr extproc('xmlNewInputStream')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ * Namespaces.
+
+ d xmlSplitQName pr * extproc('xmlSplitQName') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d prefix * xmlChar *(*)
+
+ * Generic production rules.
+
+ d xmlParseName pr * extproc('xmlParseName') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseNmtoken...
+ d pr * extproc('xmlParseNmtoken') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEntityValue...
+ d pr * extproc('xmlParseEntityValue') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d orig * xmlChar *(*)
+
+ d xmlParseAttValue...
+ d pr * extproc('xmlParseAttValue') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseSystemLiteral...
+ d pr * extproc('xmlParseSystemLiteral') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParsePubidLiteral...
+ d pr * extproc('xmlParsePubidLiteral') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseCharData...
+ d pr extproc('xmlParseCharData')
+ d ctxt value like(xmlParserCtxtPtr)
+ d cdata 10i 0 value
+
+ d xmlParseExternalID...
+ d pr * extproc('xmlParseExternalID') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d publicID * xmlChar *(*)
+ d strict 10i 0 value
+
+ d xmlParseComment...
+ d pr extproc('xmlParseComment')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParsePITarget...
+ d pr * extproc('xmlParsePITarget') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParsePI pr extproc('xmlParsePI')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseNotationDecl...
+ d pr extproc('xmlParseNotationDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEntityDecl...
+ d pr extproc('xmlParseEntityDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseDefaultDecl...
+ d pr 10i 0 extproc('xmlParseDefaultDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+ d value * xmlChar *(*)
+
+ d xmlParseNotationType...
+ d pr extproc('xmlParseNotationType')
+ d like(xmlEnumerationPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEnumerationType...
+ d pr extproc('xmlParseEnumerationType')
+ d like(xmlEnumerationPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEnumeratedType...
+ d pr 10i 0 extproc('xmlParseEnumeratedType')
+ d ctxt value like(xmlParserCtxtPtr)
+ d tree * value xmlEnumerationPtr *
+
+ d xmlParseAttributeType...
+ d pr 10i 0 extproc('xmlParseAttributeType')
+ d ctxt value like(xmlParserCtxtPtr)
+ d tree * value xmlEnumerationPtr *
+
+ d xmlParseAttributeListDecl...
+ d pr extproc('xmlParseAttributeListDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseElementMixedContentDecl...
+ d pr extproc(
+ d 'xmlParseElementMixedContentDecl')
+ d like(xmlElementContentPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d inputchk 10i 0 value
+
+ d xmlParseElementChildrenContentDecl...
+ d pr extproc(
+ d 'xmlParseElementChildrenContentDecl')
+ d like(xmlElementContentPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d inputchk 10i 0 value
+
+ d xmlParseElementContentDecl...
+ d pr 10i 0 extproc('xmlParseElementContentDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d result * value xmlElementContentPtr
+ d *
+
+ d xmlParseElementDecl...
+ d pr 10i 0 extproc('xmlParseElementDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseMarkupDecl...
+ d pr extproc('xmlParseMarkupDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseCharRef...
+ d pr 10i 0 extproc('xmlParseCharRef')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEntityRef...
+ d pr extproc('xmlParseEntityRef')
+ d like(xmlEntityPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseReference...
+ d pr extproc('xmlParseReference')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParsePEReference...
+ d pr extproc('xmlParsePEReference')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseDocTypeDecl...
+ d pr extproc('xmlParseDocTypeDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ /if defined(LIBXML_SAX1_ENABLED)
+ d xmlParseAttribute...
+ d pr * extproc('xmlParseAttribute') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d value * xmlChar *(*)
+
+ d xmlParseStartTag...
+ d pr * extproc('xmlParseStartTag') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEndTag pr extproc('xmlParseEndTag')
+ d ctxt value like(xmlParserCtxtPtr)
+ /endif LIBXML_SAX1_ENABLED
+
+ d xmlParseCDSect pr extproc('xmlParseCDSect')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseContent...
+ d pr extproc('xmlParseContent')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseElement...
+ d pr extproc('xmlParseElement')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseVersionNum...
+ d pr * extproc('xmlParseVersionNum') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseVersionInfo...
+ d pr * extproc('xmlParseVersionInfo') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEncName...
+ d pr * extproc('xmlParseEncName') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseEncodingDecl...
+ d pr * extproc('xmlParseEncodingDecl') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseSDDecl pr 10i 0 extproc('xmlParseSDDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseXMLDecl...
+ d pr extproc('xmlParseXMLDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseTextDecl...
+ d pr extproc('xmlParseTextDecl')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseMisc pr extproc('xmlParseMisc')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseExternalSubset...
+ d pr extproc('xmlParseExternalSubset')
+ d ctxt value like(xmlParserCtxtPtr)
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ * XML_SUBSTITUTE_NONE:
+ *
+ * If no entities need to be substituted.
+
+ d XML_SUBSTITUTE_NONE...
+ d c 0
+
+ * XML_SUBSTITUTE_REF:
+ *
+ * Whether general entities need to be substituted.
+
+ d XML_SUBSTITUTE_REF...
+ d c 1
+
+ * XML_SUBSTITUTE_PEREF:
+ *
+ * Whether parameter entities need to be substituted.
+
+ d XML_SUBSTITUTE_PEREF...
+ d c 2
+
+ * XML_SUBSTITUTE_BOTH:
+ *
+ * Both general and parameter entities need to be substituted.
+
+ d XML_SUBSTITUTE_BOTH...
+ d c 3
+
+ d xmlStringDecodeEntities...
+ d pr * extproc('xmlStringDecodeEntities') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d str * value options(*string) const xmlChar *
+ d what 10i 0 value
+ d end value like(xmlChar)
+ d end2 value like(xmlChar)
+ d end3 value like(xmlChar)
+
+ d xmlStringLenDecodeEntities...
+ d pr * extproc('xmlStringLenDecodeEntities')xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d str * value options(*string) const xmlChar *
+ d len 10i 0 value
+ d what 10i 0 value
+ d end value like(xmlChar)
+ d end2 value like(xmlChar)
+ d end3 value like(xmlChar)
+
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
+
+ d nodePush pr 10i 0 extproc('nodePush')
+ d ctxt value like(xmlParserCtxtPtr)
+ d value value like(xmlNodePtr)
+
+ d nodePop pr extproc('nodePop')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d inputPush pr 10i 0 extproc('inputPush')
+ d ctxt value like(xmlParserCtxtPtr)
+ d value value like(xmlParserInputPtr)
+
+ d inputPop pr extproc('inputPop')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d namePop pr * extproc('namePop') const xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d namePush pr 10i 0 extproc('namePush')
+ d ctxt value like(xmlParserCtxtPtr)
+ d value * value options(*string) const xmlChar *
+
+ * other commodities shared between parser.c and parserInternals.
+
+ d xmlSkipBlankChars...
+ d pr 10i 0 extproc('xmlSkipBlankChars')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlStringCurrentChar...
+ d pr 10i 0 extproc('xmlStringCurrentChar')
+ d ctxt value like(xmlParserCtxtPtr)
+ d cur * value options(*string) const xmlChar *
+ d len * value int *
+
+ d xmlParserHandlePEReference...
+ d pr extproc('xmlParserHandlePEReference')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlCheckLanguageID...
+ d pr 10i 0 extproc('xmlCheckLanguageID')
+ d lang * value options(*string) const xmlChar *
+
+ * Really core function shared with HTML parser.
+
+ d xmlCurrentChar pr 10i 0 extproc('xmlCurrentChar')
+ d ctxt value like(xmlParserCtxtPtr)
+ d len * value int *
+
+ d xmlCopyCharMultiByte...
+ d pr 10i 0 extproc('xmlCopyCharMultiByte')
+ d out * value options(*string) xmlChar *
+ d val 10i 0 value
+
+ d xmlCopyChar pr 10i 0 extproc('xmlCopyChar')
+ d len 10i 0 value
+ d out * value options(*string) xmlChar *
+ d val 10i 0 value
+
+ d xmlNextChar pr extproc('xmlNextChar')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParserInputShrink...
+ d pr extproc('xmlParserInputShrink')
+ d in value like(xmlParserInputPtr)
+
+ /if defined(LIBXML_HTML_ENABLED)
+
+ * Actually comes from the HTML parser but launched from the init stuff.
+
+ d htmlInitAutoClose...
+ d pr extproc('htmlInitAutoClose')
+
+ d htmlCreateFileParserCtxt...
+ d pr extproc('htmlCreateFileParserCtxt')
+ d like(htmlParserCtxtPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ /endif
+
+ * Specific function to keep track of entities references
+ * and used by the XSLT debugger.
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ * xmlEntityReferenceFunc:
+ * @ent: the entity
+ * @firstNode: the fist node in the chunk
+ * @lastNode: the last nod in the chunk
+ *
+ * Callback function used when one needs to be able to track back the
+ * provenance of a chunk of nodes inherited from an entity replacement.
+
+ d xmlEntityReferenceFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlSetEntityReferenceFunc...
+ d pr extproc('xmlSetEntityReferenceFunc')
+ d func value like(xmlEntityReferenceFunc)
+
+ d xmlParseQuotedString...
+ d pr * extproc('xmlParseQuotedString') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParseNamespace...
+ d pr extproc('xmlParseNamespace')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlNamespaceParseNSDef...
+ d pr * extproc('xmlNamespaceParseNSDef') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlScanName pr * extproc('xmlScanName') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlNamespaceParseNCName...
+ d pr * extproc('xmlNamespaceParseNCName') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlParserHandleReference...
+ d pr extproc('xmlParserHandleReference')
+ d ctxt value like(xmlParserCtxtPtr)
+
+ d xmlNamespaceParseQName...
+ d pr * extproc('xmlNamespaceParseQName') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d prefix * xmlChar *(*)
+
+ * Entities
+
+ d xmlDecodeEntities...
+ d pr * extproc('xmlDecodeEntities') xmlChar *
+ d ctxt value like(xmlParserCtxtPtr)
+ d len 10i 0 value
+ d what 10i 0 value
+ d end value like(xmlChar)
+ d end2 value like(xmlChar)
+ d end3 value like(xmlChar)
+
+ d xmlHandleEntity...
+ d pr extproc('xmlHandleEntity')
+ d ctxt value like(xmlParserCtxtPtr)
+ d entity value like(xmlEntityPtr)
+ /endif LIBXML_LEGACY_ENABLD
+
+ /endif
diff --git a/os400/libxmlrpg/pattern.rpgle b/os400/libxmlrpg/pattern.rpgle
new file mode 100644
index 0000000..2e881e5
--- /dev/null
+++ b/os400/libxmlrpg/pattern.rpgle
@@ -0,0 +1,117 @@
+ * Summary: pattern expression handling
+ * Description: allows to compile and test pattern expressions for nodes
+ * either in a tree or based on a parser state.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_PATTERN_H__)
+ /define XML_PATTERN_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/dict"
+
+ /if defined(LIBXML_PATTERN_ENABLED)
+
+ * xmlPattern:
+ *
+ * A compiled (XPath based) pattern to select nodes
+
+ d xmlPatternPtr...
+ d s * based(######typedef######)
+
+ * xmlPatternFlags:
+ *
+ * This is the set of options affecting the behaviour of pattern
+ * matching with this module
+
+ d xmlPatternFlags...
+ d s 10i 0 based(######typedef######) enum
+ d XML_PATTERN_DEFAULT... Simple pattern match
+ d c X'0000'
+ d XML_PATTERN_XPATH... Std XPath pattern
+ d c X'0001'
+ d XML_PATTERN_XSSEL... Schm sel XPth subset
+ d c X'0002'
+ d XML_PATTERN_XSFIELD... Schm fld XPth subset
+ d c X'0004'
+
+ d xmlFreePattern pr extproc('xmlFreePattern')
+ d comp value like(xmlPatternPtr)
+
+ d xmlFreePatternList...
+ d pr extproc('xmlFreePatternList')
+ d comp value like(xmlPatternPtr)
+
+ d xmlPatterncompile...
+ d pr extproc('xmlPatterncompile')
+ d like(xmlPatternPtr)
+ d pattern * value options(*string) const xmlChar *
+ d dict * value xmlDict *
+ d flags 10i 0 value
+ d namespaces * const xmlChar *(*)
+
+ d xmlPatternMatch...
+ d pr 10i 0 extproc('xmlPatternMatch')
+ d comp value like(xmlPatternPtr)
+ d node value like(xmlNodePtr)
+
+ * streaming interfaces
+
+ d xmlStreamCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlPatternStreamable...
+ d pr 10i 0 extproc('xmlPatternStreamable')
+ d comp value like(xmlPatternPtr)
+
+ d xmlPatternMaxDepth...
+ d pr 10i 0 extproc('xmlPatternMaxDepth')
+ d comp value like(xmlPatternPtr)
+
+ d xmlPatternMinDepth...
+ d pr 10i 0 extproc('xmlPatternMinDepth')
+ d comp value like(xmlPatternPtr)
+
+ d xmlPatternFromRoot...
+ d pr 10i 0 extproc('xmlPatternFromRoot')
+ d comp value like(xmlPatternPtr)
+
+ d xmlPatternGetStreamCtxt...
+ d pr extproc('xmlPatternGetStreamCtxt')
+ d like(xmlStreamCtxtPtr)
+ d comp value like(xmlPatternPtr)
+
+ d xmlFreeStreamCtxt...
+ d pr extproc('xmlFreeStreamCtxt')
+ d stream value like(xmlStreamCtxtPtr)
+
+ d xmlStreamPushNode...
+ d pr 10i 0 extproc('xmlStreamPushNode')
+ d stream value like(xmlStreamCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+ d nodeType 10i 0 value
+
+ d xmlStreamPush pr 10i 0 extproc('xmlStreamPush')
+ d stream value like(xmlStreamCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+
+ d xmlStreamPushAttr...
+ d pr 10i 0 extproc('xmlStreamPushAttr')
+ d stream value like(xmlStreamCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+
+ d xmlStreamPop pr 10i 0 extproc('xmlStreamPop')
+ d stream value like(xmlStreamCtxtPtr)
+
+ d xmlStreamWantsAnyNode...
+ d pr 10i 0 extproc('xmlStreamWantsAnyNode')
+ d stream value like(xmlStreamCtxtPtr)
+
+ /endif LIBXML_PATTERN_ENBLD
+ /endif XML_PATTERN_H__
diff --git a/os400/libxmlrpg/relaxng.rpgle b/os400/libxmlrpg/relaxng.rpgle
new file mode 100644
index 0000000..af662aa
--- /dev/null
+++ b/os400/libxmlrpg/relaxng.rpgle
@@ -0,0 +1,297 @@
+ * Summary: implementation of the Relax-NG validation
+ * Description: implementation of the Relax-NG validation
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_RELAX_NG__)
+ /define XML_RELAX_NG__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/hash"
+ /include "libxmlrpg/xmlstring"
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+
+ d xmlRelaxNGPtr s * based(######typedef######)
+
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
+
+ d xmlRelaxNGValidityErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+
+ d xmlRelaxNGValidityWarningFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * A schemas validation context
+
+ d xmlRelaxNGParserCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlRelaxNGValidCtxtPtr...
+ d s * based(######typedef######)
+
+ * xmlRelaxNGValidErr:
+ *
+ * List of possible Relax NG validation errors
+
+ d xmlRelaxNGValidErr...
+ d s 10i 0 based(######typedef######) enum
+ d XML_RELAXNG_OK...
+ d c 0
+ d XML_RELAXNG_ERR_MEMORY...
+ d c 1
+ d XML_RELAXNG_ERR_TYPE...
+ d c 2
+ d XML_RELAXNG_ERR_TYPEVAL...
+ d c 3
+ d XML_RELAXNG_ERR_DUPID...
+ d c 4
+ d XML_RELAXNG_ERR_TYPECMP...
+ d c 5
+ d XML_RELAXNG_ERR_NOSTATE...
+ d c 6
+ d XML_RELAXNG_ERR_NODEFINE...
+ d c 7
+ d XML_RELAXNG_ERR_LISTEXTRA...
+ d c 8
+ d XML_RELAXNG_ERR_LISTEMPTY...
+ d c 9
+ d XML_RELAXNG_ERR_INTERNODATA...
+ d c 10
+ d XML_RELAXNG_ERR_INTERSEQ...
+ d c 11
+ d XML_RELAXNG_ERR_INTEREXTRA...
+ d c 12
+ d XML_RELAXNG_ERR_ELEMNAME...
+ d c 13
+ d XML_RELAXNG_ERR_ATTRNAME...
+ d c 14
+ d XML_RELAXNG_ERR_ELEMNONS...
+ d c 15
+ d XML_RELAXNG_ERR_ATTRNONS...
+ d c 16
+ d XML_RELAXNG_ERR_ELEMWRONGNS...
+ d c 17
+ d XML_RELAXNG_ERR_ATTRWRONGNS...
+ d c 18
+ d XML_RELAXNG_ERR_ELEMEXTRANS...
+ d c 19
+ d XML_RELAXNG_ERR_ATTREXTRANS...
+ d c 20
+ d XML_RELAXNG_ERR_ELEMNOTEMPTY...
+ d c 21
+ d XML_RELAXNG_ERR_NOELEM...
+ d c 22
+ d XML_RELAXNG_ERR_NOTELEM...
+ d c 23
+ d XML_RELAXNG_ERR_ATTRVALID...
+ d c 24
+ d XML_RELAXNG_ERR_CONTENTVALID...
+ d c 25
+ d XML_RELAXNG_ERR_EXTRACONTENT...
+ d c 26
+ d XML_RELAXNG_ERR_INVALIDATTR...
+ d c 27
+ d XML_RELAXNG_ERR_DATAELEM...
+ d c 28
+ d XML_RELAXNG_ERR_VALELEM...
+ d c 29
+ d XML_RELAXNG_ERR_LISTELEM...
+ d c 30
+ d XML_RELAXNG_ERR_DATATYPE...
+ d c 31
+ d XML_RELAXNG_ERR_VALUE...
+ d c 32
+ d XML_RELAXNG_ERR_LIST...
+ d c 33
+ d XML_RELAXNG_ERR_NOGRAMMAR...
+ d c 34
+ d XML_RELAXNG_ERR_EXTRADATA...
+ d c 35
+ d XML_RELAXNG_ERR_LACKDATA...
+ d c 36
+ d XML_RELAXNG_ERR_INTERNAL...
+ d c 37
+ d XML_RELAXNG_ERR_ELEMWRONG...
+ d c 38
+ d XML_RELAXNG_ERR_TEXTWRONG...
+ d c 39
+
+ * xmlRelaxNGParserFlags:
+ *
+ * List of possible Relax NG Parser flags
+
+ d xmlRelaxNGParserFlag...
+ d s 10i 0 based(######typedef######) enum
+ d XML_RELAXNGP_NONE...
+ d c 0
+ d XML_RELAXNGP_FREE_DOC...
+ d c 1
+ d XML_RELAXNGP_CRNG...
+ d c 2
+
+ d xmlRelaxNGInitTypes...
+ d pr 10i 0 extproc('xmlRelaxNGInitTypes')
+
+ d xmlRelaxNGCleanupTypes...
+ d pr extproc('xmlRelaxNGCleanupTypes')
+
+
+ * Interfaces for parsing.
+
+ d xmlRelaxNGNewParserCtxt...
+ d pr extproc('xmlRelaxNGNewParserCtxt')
+ d like(xmlRelaxNGParserCtxtPtr)
+ d URL * value options(*string) const char *
+
+ d xmlRelaxNGNewMemParserCtxt...
+ d pr extproc('xmlRelaxNGNewMemParserCtxt')
+ d like(xmlRelaxNGParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlRelaxNGNewDocParserCtxt...
+ d pr extproc('xmlRelaxNGNewDocParserCtxt')
+ d like(xmlRelaxNGParserCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlRelaxParserSetFlag...
+ d pr 10i 0 extproc('xmlRelaxParserSetFlag')
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+ d flag 10i 0 value
+
+ d xmlRelaxNGFreeParserCtxt...
+ d pr extproc('xmlRelaxNGFreeParserCtxt')
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+
+ d xmlRelaxNGSetParserErrors...
+ d pr extproc('xmlRelaxNGSetParserErrors')
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+ d err value
+ d like(xmlRelaxNGValidityErrorFunc)
+ d warn value
+ d like(xmlRelaxNGValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlRelaxNGGetParserErrors...
+ d pr 10i 0 extproc('xmlRelaxNGGetParserErrors')
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+ d err like(xmlRelaxNGValidityErrorFunc)
+ d warn like(xmlRelaxNGValidityWarningFunc)
+ d ctx * void *(*)
+
+ d xmlRelaxNGSetParserStructuredErrors...
+ d pr extproc(
+ d 'xmlRelaxNGSetParserStructuredErrors'
+ d )
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+ d serror value like(xmlStructuredErrorFunc)
+ d ctx * value void *
+
+ d xmlRelaxNGParse...
+ d pr extproc('xmlRelaxNGParse')
+ d like(xmlRelaxNGPtr)
+ d ctxt value like(xmlRelaxNGParserCtxtPtr)
+
+ d xmlRelaxNGFree pr extproc('xmlRelaxNGFree')
+ d schema value like(xmlRelaxNGPtr)
+
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlRelaxNGDump pr extproc('xmlRelaxNGDump')
+ d output * value FILE *
+ d schema value like(xmlRelaxNGPtr)
+
+ d xmlRelaxNGDumpTree...
+ d pr extproc('xmlRelaxNGDumpTree')
+ d output * value FILE *
+ d schema value like(xmlRelaxNGPtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * Interfaces for validating
+
+ d xmlRelaxNGSetValidErrors...
+ d pr extproc('xmlRelaxNGSetValidErrors')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d err value
+ d like(xmlRelaxNGValidityErrorFunc)
+ d warn value
+ d like(xmlRelaxNGValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlRelaxNGGetValidErrors...
+ d pr 10i 0 extproc('xmlRelaxNGGetValidErrors')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d err like(xmlRelaxNGValidityErrorFunc)
+ d warn like(xmlRelaxNGValidityWarningFunc)
+ d ctx * value void * *
+
+ d xmlRelaxNGSetValidStructuredErrors...
+ d pr extproc(
+ d 'xmlRelaxNGSetValidStructuredErrors')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d serror value like(xmlStructuredErrorFunc)
+ d ctx * value void *
+
+ d xmlRelaxNGNewValidCtxt...
+ d pr extproc('xmlRelaxNGNewValidCtxt')
+ d like(xmlRelaxNGValidCtxtPtr)
+ d schema value like(xmlRelaxNGPtr)
+
+ d xmlRelaxNGFreeValidCtxt...
+ d pr extproc('xmlRelaxNGFreeValidCtxt')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+
+ d xmlRelaxNGValidateDoc...
+ d pr 10i 0 extproc('xmlRelaxNGValidateDoc')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ * Interfaces for progressive validation when possible
+
+ d xmlRelaxNGValidatePushElement...
+ d pr 10i 0 extproc(
+ d 'xmlRelaxNGValidatePushElement')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlRelaxNGValidatePushCData...
+ d pr 10i 0 extproc(
+ d 'xmlRelaxNGValidatePushCData')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d data * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlRelaxNGValidatePopElement...
+ d pr 10i 0 extproc(
+ d 'xmlRelaxNGValidatePopElement')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlRelaxNGValidateFullElement...
+ d pr 10i 0 extproc(
+ d 'xmlRelaxNGValidateFullElement')
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+
+ /endif LIBXML_SCHEMAS_ENBLD
+ /endif XML_RELAX_NG__
diff --git a/os400/libxmlrpg/schemasInternals.rpgle b/os400/libxmlrpg/schemasInternals.rpgle
new file mode 100644
index 0000000..edeea5b
--- /dev/null
+++ b/os400/libxmlrpg/schemasInternals.rpgle
@@ -0,0 +1,1137 @@
+ * Summary: internal interfaces for XML Schemas
+ * Description: internal interfaces for the XML Schemas handling
+ * and schema validity checking
+ * The Schemas development is a Work In Progress.
+ * Some of those interfaces are not garanteed to be API or
+ * ABI stable !
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SCHEMA_INTERNALS_H__)
+ /define XML_SCHEMA_INTERNALS_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+ /include "libxmlrpg/xmlregexp"
+ /include "libxmlrpg/hash"
+ /include "libxmlrpg/dict"
+
+ d xmlSchemaValType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMAS_UNKNOWN...
+ d c 0
+ d XML_SCHEMAS_STRING...
+ d c 1
+ d XML_SCHEMAS_NORMSTRING...
+ d c 2
+ d XML_SCHEMAS_DECIMAL...
+ d c 3
+ d XML_SCHEMAS_TIME...
+ d c 4
+ d XML_SCHEMAS_GDAY...
+ d c 5
+ d XML_SCHEMAS_GMONTH...
+ d c 6
+ d XML_SCHEMAS_GMONTHDAY...
+ d c 7
+ d XML_SCHEMAS_GYEAR...
+ d c 8
+ d XML_SCHEMAS_GYEARMONTH...
+ d c 9
+ d XML_SCHEMAS_DATE...
+ d c 10
+ d XML_SCHEMAS_DATETIME...
+ d c 11
+ d XML_SCHEMAS_DURATION...
+ d c 12
+ d XML_SCHEMAS_FLOAT...
+ d c 13
+ d XML_SCHEMAS_DOUBLE...
+ d c 14
+ d XML_SCHEMAS_BOOLEAN...
+ d c 15
+ d XML_SCHEMAS_TOKEN...
+ d c 16
+ d XML_SCHEMAS_LANGUAGE...
+ d c 17
+ d XML_SCHEMAS_NMTOKEN...
+ d c 18
+ d XML_SCHEMAS_NMTOKENS...
+ d c 19
+ d XML_SCHEMAS_NAME...
+ d c 20
+ d XML_SCHEMAS_QNAME...
+ d c 21
+ d XML_SCHEMAS_NCNAME...
+ d c 22
+ d XML_SCHEMAS_ID...
+ d c 23
+ d XML_SCHEMAS_IDREF...
+ d c 24
+ d XML_SCHEMAS_IDREFS...
+ d c 25
+ d XML_SCHEMAS_ENTITY...
+ d c 26
+ d XML_SCHEMAS_ENTITIES...
+ d c 27
+ d XML_SCHEMAS_NOTATION...
+ d c 28
+ d XML_SCHEMAS_ANYURI...
+ d c 29
+ d XML_SCHEMAS_INTEGER...
+ d c 30
+ d XML_SCHEMAS_NPINTEGER...
+ d c 31
+ d XML_SCHEMAS_NINTEGER...
+ d c 32
+ d XML_SCHEMAS_NNINTEGER...
+ d c 33
+ d XML_SCHEMAS_PINTEGER...
+ d c 34
+ d XML_SCHEMAS_INT...
+ d c 35
+ d XML_SCHEMAS_UINT...
+ d c 36
+ d XML_SCHEMAS_LONG...
+ d c 37
+ d XML_SCHEMAS_ULONG...
+ d c 38
+ d XML_SCHEMAS_SHORT...
+ d c 39
+ d XML_SCHEMAS_USHORT...
+ d c 40
+ d XML_SCHEMAS_BYTE...
+ d c 41
+ d XML_SCHEMAS_UBYTE...
+ d c 42
+ d XML_SCHEMAS_HEXBINARY...
+ d c 43
+ d XML_SCHEMAS_BASE64BINARY...
+ d c 44
+ d XML_SCHEMAS_ANYTYPE...
+ d c 45
+ d XML_SCHEMAS_ANYSIMPLETYPE...
+ d c 46
+
+ * XML Schemas defines multiple type of types.
+
+ d xmlSchemaTypeType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMA_TYPE_BASIC... A builtin datatype
+ d c 1
+ d XML_SCHEMA_TYPE_ANY...
+ d c 2
+ d XML_SCHEMA_TYPE_FACET...
+ d c 3
+ d XML_SCHEMA_TYPE_SIMPLE...
+ d c 4
+ d XML_SCHEMA_TYPE_COMPLEX...
+ d c 5
+ d XML_SCHEMA_TYPE_SEQUENCE...
+ d c 6
+ d XML_SCHEMA_TYPE_CHOICE...
+ d c 7
+ d XML_SCHEMA_TYPE_ALL...
+ d c 8
+ d XML_SCHEMA_TYPE_SIMPLE_CONTENT...
+ d c 9
+ d XML_SCHEMA_TYPE_COMPLEX_CONTENT...
+ d c 10
+ d XML_SCHEMA_TYPE_UR...
+ d c 11
+ d XML_SCHEMA_TYPE_RESTRICTION...
+ d c 12
+ d XML_SCHEMA_TYPE_EXTENSION...
+ d c 13
+ d XML_SCHEMA_TYPE_ELEMENT...
+ d c 14
+ d XML_SCHEMA_TYPE_ATTRIBUTE...
+ d c 15
+ d XML_SCHEMA_TYPE_ATTRIBUTEGROUP...
+ d c 16
+ d XML_SCHEMA_TYPE_GROUP...
+ d c 17
+ d XML_SCHEMA_TYPE_NOTATION...
+ d c 18
+ d XML_SCHEMA_TYPE_LIST...
+ d c 19
+ d XML_SCHEMA_TYPE_UNION...
+ d c 20
+ d XML_SCHEMA_TYPE_ANY_ATTRIBUTE...
+ d c 21
+ d XML_SCHEMA_TYPE_IDC_UNIQUE...
+ d c 22
+ d XML_SCHEMA_TYPE_IDC_KEY...
+ d c 23
+ d XML_SCHEMA_TYPE_IDC_KEYREF...
+ d c 24
+ d XML_SCHEMA_TYPE_PARTICLE...
+ d c 25
+ d XML_SCHEMA_TYPE_ATTRIBUTE_USE...
+ d c 26
+ d XML_SCHEMA_FACET_MININCLUSIVE...
+ d c 1000
+ d XML_SCHEMA_FACET_MINEXCLUSIVE...
+ d c 1001
+ d XML_SCHEMA_FACET_MAXINCLUSIVE...
+ d c 1002
+ d XML_SCHEMA_FACET_MAXEXCLUSIVE...
+ d c 1003
+ d XML_SCHEMA_FACET_TOTALDIGITS...
+ d c 1004
+ d XML_SCHEMA_FACET_FRACTIONDIGITS...
+ d c 1005
+ d XML_SCHEMA_FACET_PATTERN...
+ d c 1006
+ d XML_SCHEMA_FACET_ENUMERATION...
+ d c 1007
+ d XML_SCHEMA_FACET_WHITESPACE...
+ d c 1008
+ d XML_SCHEMA_FACET_LENGTH...
+ d c 1009
+ d XML_SCHEMA_FACET_MAXLENGTH...
+ d c 1010
+ d XML_SCHEMA_FACET_MINLENGTH...
+ d c 1011
+ d XML_SCHEMA_EXTRA_QNAMEREF...
+ d c 2000
+ d XML_SCHEMA_EXTRA_ATTR_USE_PROHIB...
+ d c 2001
+
+ d xmlSchemaContentType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMA_CONTENT_UNKNOWN...
+ d c 0
+ d XML_SCHEMA_CONTENT_EMPTY...
+ d c 1
+ d XML_SCHEMA_CONTENT_ELEMENTS...
+ d c 2
+ d XML_SCHEMA_CONTENT_MIXED...
+ d c 3
+ d XML_SCHEMA_CONTENT_SIMPLE...
+ d c 4
+ d XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS... Obsolete
+ d c 5
+ d XML_SCHEMA_CONTENT_BASIC...
+ d c 6
+ d XML_SCHEMA_CONTENT_ANY...
+ d c 7
+
+ d xmlSchemaValPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaTypePtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaFacetPtr...
+ d s * based(######typedef######)
+
+ * Annotation
+
+ d xmlSchemaAnnotPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaAnnot ds based(xmlSchemaAnnotPtr)
+ d align qualified
+ d next like(xmlSchemaAnnotPtr)
+ d content like(xmlNodePtr) The annotation
+
+ * XML_SCHEMAS_ANYATTR_SKIP:
+ *
+ * Skip unknown attribute from validation
+ * Obsolete, not used anymore.
+
+ d XML_SCHEMAS_ANYATTR_SKIP...
+ d c 1
+
+ * XML_SCHEMAS_ANYATTR_LAX:
+ *
+ * Ignore validation non definition on attributes
+ * Obsolete, not used anymore.
+
+ d XML_SCHEMAS_ANYATTR_LAX...
+ d c 2
+
+ * XML_SCHEMAS_ANYATTR_STRICT:
+ *
+ * Apply strict validation rules on attributes
+ * Obsolete, not used anymore.
+
+ d XML_SCHEMAS_ANYATTR_STRICT...
+ d c 3
+
+ * XML_SCHEMAS_ANY_SKIP:
+ *
+ * Skip unknown attribute from validation
+
+ d XML_SCHEMAS_ANY_SKIP...
+ d c 1
+
+ * XML_SCHEMAS_ANY_LAX:
+ *
+ * Used by wildcards.
+ * Validate if type found, don't worry if not found
+
+ d XML_SCHEMAS_ANY_LAX...
+ d c 2
+
+ * XML_SCHEMAS_ANY_STRICT:
+ *
+ * Used by wildcards.
+ * Apply strict validation rules
+
+ d XML_SCHEMAS_ANY_STRICT...
+ d c 3
+
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * Used by wildcards.
+ * The attribute is prohibited.
+
+ d XML_SCHEMAS_ATTR_USE_PROHIBITED...
+ d c 0
+
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+
+ d XML_SCHEMAS_ATTR_USE_REQUIRED...
+ d c 1
+
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+
+ d XML_SCHEMAS_ATTR_USE_OPTIONAL...
+ d c 2
+
+ * XML_SCHEMAS_ATTR_GLOBAL:
+ *
+ * allow elements in no namespace
+
+ d XML_SCHEMAS_ATTR_GLOBAL...
+ d c X'0001'
+
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
+ *
+ * allow elements in no namespace
+
+ d XML_SCHEMAS_ATTR_NSDEFAULT...
+ d c X'0080'
+
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
+ *
+ * this is set when the "type" and "ref" references
+ * have been resolved.
+
+ d XML_SCHEMAS_ATTR_INTERNAL_RESOLVED...
+ d c X'0100'
+
+ * XML_SCHEMAS_ATTR_FIXED:
+ *
+ * the attribute has a fixed value
+
+ d XML_SCHEMAS_ATTR_FIXED...
+ d c X'0200'
+
+ * xmlSchemaAttribute:
+ * An attribute definition.
+
+ d xmlSchemaAttributePtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaAttribute...
+ d ds based(xmlSchemaAttributePtr)
+ d align qualified
+ d type like(xmlSchemaTypeType)
+ d next like(xmlSchemaAttributePtr) Next attribute
+ d name * const xmlChar *
+ d id * const xmlChar *
+ d ref * const xmlChar *
+ d refNs * const xmlChar *
+ d typeName * const xmlChar *
+ d typeNs * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ *
+ d base like(xmlSchemaTypePtr) Deprecated
+ d occurs 10i 0 Deprecated
+ d defValue * const xmlChar *
+ d subtypes like(xmlSchemaTypePtr) The type definition
+ d node like(xmlNodePtr)
+ d targetNamespace... const xmlChar *
+ d *
+ d flags 10i 0
+ d refPrefix * const xmlChar *
+ d defVal like(xmlSchemaValPtr) Compiled constraint
+ d refDecl like(xmlSchemaAttributePtr) Deprecated
+
+ * xmlSchemaAttributeLink:
+ * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
+
+ d xmlSchemaAttributeLinkPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaAttributeLink...
+ d ds based(xmlSchemaAttributeLinkPtr)
+ d align qualified
+ d next like(xmlSchemaAttributeLinkPtr) The next link
+ d attr like(xmlSchemaAttributePtr) The linked attribute
+
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
+ *
+ * If the wildcard is complete.
+
+ d XML_SCHEMAS_WILDCARD_COMPLETE...
+ d c X'0001'
+
+ * xmlSchemaCharValueLink:
+ * Used to build a list of namespaces on wildcards.
+
+ d xmlSchemaWildcardNsPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaWildcardNs...
+ d ds based(xmlSchemaWildcardNsPtr)
+ d align qualified
+ d next like(xmlSchemaWildcardNsPtr) The next link
+ d value * const xmlChar *
+
+ * xmlSchemaWildcard.
+ * A wildcard.
+
+ d xmlSchemaWildcardPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaWildcard...
+ d ds based(xmlSchemaWildcardPtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d id * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ d node like(xmlNodePtr)
+ d minOccurs 10i 0 Deprecated; not used
+ d maxOccurs 10i 0 Deprecated; not used
+ d processContents...
+ d 10i 0
+ d any 10i 0 Ns constraint ##any?
+ d nsSet like(xmlSchemaWildcardNsPtr) Allowed namspce list
+ d negNsSet like(xmlSchemaWildcardNsPtr) Negated namespace
+ d flags 10i 0 Deprecated; not used
+
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
+ *
+ * The attribute wildcard has been already builded.
+
+ d XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED...
+ d c X'0001'
+
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
+ *
+ * The attribute wildcard has been already builded.
+
+ d XML_SCHEMAS_ATTRGROUP_GLOBAL...
+ d c X'0002'
+
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
+ *
+ * Marks the attr group as marked; used for circular checks.
+
+ d XML_SCHEMAS_ATTRGROUP_MARKED...
+ d c X'0004'
+
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+
+ d XML_SCHEMAS_ATTRGROUP_REDEFINED...
+ d c X'0008'
+
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+
+ d XML_SCHEMAS_ATTRGROUP_HAS_REFS...
+ d c X'0010'
+
+ * An attribute group definition.
+ *
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
+ * must be kept similar
+
+ d xmlSchemaAttributeGroupPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaAttributeGroup...
+ d ds based(xmlSchemaAttributeGroupPtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d next like(xmlSchemaAttributePtr) Next attribute
+ d name * const xmlChar *
+ d id * const xmlChar *
+ d ref * const xmlChar *
+ d refNs * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ *
+ d attributes like(xmlSchemaAttributePtr) Deprecated; not used
+ d node like(xmlNodePtr)
+ d flags 10i 0
+ d attributeWildcard...
+ d like(xmlSchemaWildcardPtr)
+ d refPrefix * const xmlChar *
+ d refItem like(xmlSchemaAttributeGroupPtr) Deprecated; not used
+ d targetNamespace...
+ d * const xmlChar *
+ d attrUses * void *
+
+ * xmlSchemaTypeLink:
+ * Used to build a list of types (e.g. member types of
+ * simpleType with variety "union").
+
+ d xmlSchemaTypeLinkPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaTypeLink...
+ d ds based(xmlSchemaTypeLinkPtr)
+ d align qualified
+ d next like(xmlSchemaTypeLinkPtr) Next type link
+ d type like(xmlSchemaTypePtr) Linked type
+
+ * xmlSchemaFacetLink:
+ * Used to build a list of facets.
+
+ d xmlSchemaFacetLinkPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaFacetLink...
+ d ds based(xmlSchemaFacetLinkPtr)
+ d align qualified
+ d next like(xmlSchemaFacetLinkPtr) Next facet link
+ d facet like(xmlSchemaFacetPtr) Linked facet
+
+ * XML_SCHEMAS_TYPE_MIXED:
+ *
+ * the element content type is mixed
+
+ d XML_SCHEMAS_TYPE_MIXED...
+ d c X'00000001'
+
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
+ *
+ * the simple or complex type has a derivation method of "extension".
+
+ d XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION...
+ d c X'00000002'
+
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
+ *
+ * the simple or complex type has a derivation method of "restriction".
+
+ d XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION...
+ d c X'00000004'
+
+ * XML_SCHEMAS_TYPE_GLOBAL:
+ *
+ * the type is global
+
+ d XML_SCHEMAS_TYPE_GLOBAL...
+ d c X'00000008'
+
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
+ *
+ * the complexType owns an attribute wildcard, i.e.
+ * it can be freed by the complexType
+
+ d XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD... Obsolete.
+ d c X'00000010'
+
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
+ *
+ * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
+
+ d XML_SCHEMAS_TYPE_VARIETY_ABSENT...
+ d c X'00000020'
+
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
+ *
+ * the simpleType has a variety of "list".
+
+ d XML_SCHEMAS_TYPE_VARIETY_LIST...
+ d c X'00000040'
+
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
+ *
+ * the simpleType has a variety of "union".
+
+ d XML_SCHEMAS_TYPE_VARIETY_UNION...
+ d c X'00000080'
+
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
+ *
+ * the simpleType has a variety of "union".
+
+ d XML_SCHEMAS_TYPE_VARIETY_ATOMIC...
+ d c X'00000100'
+
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
+ *
+ * the complexType has a final of "extension".
+
+ d XML_SCHEMAS_TYPE_FINAL_EXTENSION...
+ d c X'00000200'
+
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the simpleType/complexType has a final of "restriction".
+
+ d XML_SCHEMAS_TYPE_FINAL_RESTRICTION...
+ d c X'00000400'
+
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
+ *
+ * the simpleType has a final of "list".
+
+ d XML_SCHEMAS_TYPE_FINAL_LIST...
+ d c X'00000800'
+
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
+ *
+ * the simpleType has a final of "union".
+
+ d XML_SCHEMAS_TYPE_FINAL_UNION...
+ d c X'00001000'
+
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
+ *
+ * the simpleType has a final of "default".
+
+ d XML_SCHEMAS_TYPE_FINAL_DEFAULT...
+ d c X'00002000'
+
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
+ *
+ * Marks the item as a builtin primitive.
+
+ d XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE...
+ d c X'00004000'
+
+ * XML_SCHEMAS_TYPE_MARKED:
+ *
+ * Marks the item as marked; used for circular checks.
+
+ d XML_SCHEMAS_TYPE_MARKED...
+ d c X'00010000'
+
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * <schema> item.
+
+ d XML_SCHEMAS_TYPE_BLOCK_DEFAULT...
+ d c X'00020000'
+
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+
+ d XML_SCHEMAS_TYPE_BLOCK_EXTENSION...
+ d c X'00040000'
+
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+
+ d XML_SCHEMAS_TYPE_BLOCK_RESTRICTION...
+ d c X'00080000'
+
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+
+ d XML_SCHEMAS_TYPE_ABSTRACT...
+ d c X'00100000'
+
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
+ *
+ * indicates if the facets need a computed value
+
+ d XML_SCHEMAS_TYPE_FACETSNEEDVALUE...
+ d c X'00200000'
+
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
+ *
+ * indicates that the type was typefixed
+
+ d XML_SCHEMAS_TYPE_INTERNAL_RESOLVED...
+ d c X'00400000'
+
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
+ *
+ * indicates that the type is invalid
+
+ d XML_SCHEMAS_TYPE_INTERNAL_INVALID...
+ d c X'00800000'
+
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
+ *
+ * a whitespace-facet value of "preserve"
+
+ d XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE...
+ d c X'01000000'
+
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
+ *
+ * a whitespace-facet value of "replace"
+
+ d XML_SCHEMAS_TYPE_WHITESPACE_REPLACE...
+ d c X'02000000'
+
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
+ *
+ * a whitespace-facet value of "collapse"
+
+ d XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE...
+ d c X'04000000'
+
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
+ *
+ * has facets
+
+ d XML_SCHEMAS_TYPE_HAS_FACETS...
+ d c X'08000000'
+
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
+ *
+ * indicates if the facets (pattern) need a normalized value
+
+ d XML_SCHEMAS_TYPE_NORMVALUENEEDED...
+ d c X'10000000'
+
+ * XML_SCHEMAS_TYPE_FIXUP_1:
+ *
+ * First stage of fixup was done.
+
+ d XML_SCHEMAS_TYPE_FIXUP_1...
+ d c X'20000000'
+
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+
+ d XML_SCHEMAS_TYPE_REDEFINED...
+ d c X'40000000'
+
+ /if defined(DISABLED)
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+
+ d XML_SCHEMAS_TYPE_REDEFINING...
+ d c X'80000000'
+ /endif
+
+ * _xmlSchemaType:
+ *
+ * Schemas type definition.
+
+ d xmlSchemaType...
+ d ds based(xmlSchemaTypePtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d next like(xmlSchemaTypePtr) Next type
+ d name * const xmlChar *
+ d id * const xmlChar *
+ d ref * const xmlChar *
+ d refNs * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ d subtypes like(xmlSchemaTypePtr)
+ d attributes like(xmlSchemaAttributePtr) Deprecated; not used
+ d node like(xmlNodePtr)
+ d minOccurs 10i 0 Deprecated; not used
+ d maxOccurs 10i 0 Deprecated; not used
+ *
+ d flags 10i 0
+ d contentType like(xmlSchemaContentType)
+ d base * const xmlChar *
+ d baseNs * const xmlChar *
+ d baseType like(xmlSchemaTypePtr) Base type component
+ d facets like(xmlSchemaFacetPtr) Local facets
+ d redef like(xmlSchemaTypePtr) Deprecated; not used
+ d recurse 10i 0 Obsolete
+ d attributeUses like(xmlSchemaAttributeLinkPtr) Deprecated; not used
+ d attributeWildcard...
+ d like(xmlSchemaWildcardPtr)
+ d builtInType 10i 0 Built-in types type
+ d memberTypes like(xmlSchemaTypeLinkPtr) Union member-types
+ d facetSet like(xmlSchemaFacetLinkPtr) All facets
+ d refPrefix * const xmlChar *
+ d contentTypeDef...
+ d like(xmlSchemaTypePtr)
+ d contModel like(xmlRegexpPtr) Content model autom.
+ d targetNamespace...
+ d * const xmlChar *
+ d attrUses * void *
+
+ * xmlSchemaElement:
+ * An element definition.
+ *
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
+ * structures must be kept similar
+
+ * XML_SCHEMAS_ELEM_NILLABLE:
+ *
+ * the element is nillable
+
+ d XML_SCHEMAS_ELEM_NILLABLE...
+ d c X'00000001'
+
+ * XML_SCHEMAS_ELEM_GLOBAL:
+ *
+ * the element is global
+
+ d XML_SCHEMAS_ELEM_GLOBAL...
+ d c X'00000002'
+
+ * XML_SCHEMAS_ELEM_DEFAULT:
+ *
+ * the element has a default value
+
+ d XML_SCHEMAS_ELEM_DEFAULT...
+ d c X'00000004'
+
+ * XML_SCHEMAS_ELEM_FIXED:
+ *
+ * the element has a fixed value
+
+ d XML_SCHEMAS_ELEM_FIXED...
+ d c X'00000008'
+
+ * XML_SCHEMAS_ELEM_ABSTRACT:
+ *
+ * the element is abstract
+
+ d XML_SCHEMAS_ELEM_ABSTRACT...
+ d c X'00000010'
+
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
+ *
+ * the element is top level
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
+
+ d XML_SCHEMAS_ELEM_TOPLEVEL...
+ d c X'00000020'
+
+ * XML_SCHEMAS_ELEM_REF:
+ *
+ * the element is a reference to a type
+
+ d XML_SCHEMAS_ELEM_REF...
+ d c X'00000040'
+
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ * Obsolete, not used anymore.
+
+ d XML_SCHEMAS_ELEM_NSDEFAULT...
+ d c X'00000080'
+
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
+ *
+ * this is set when "type", "ref", "substitutionGroup"
+ * references have been resolved.
+
+ d XML_SCHEMAS_ELEM_INTERNAL_RESOLVED...
+ d c X'00000100'
+
+ * XML_SCHEMAS_ELEM_CIRCULAR:
+ *
+ * a helper flag for the search of circular references.
+
+ d XML_SCHEMAS_ELEM_CIRCULAR...
+ d c X'00000200'
+
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
+ *
+ * the "block" attribute is absent
+
+ d XML_SCHEMAS_ELEM_BLOCK_ABSENT...
+ d c X'00000400'
+
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
+ *
+ * disallowed substitutions are absent
+
+ d XML_SCHEMAS_ELEM_BLOCK_EXTENSION...
+ d c X'00000800'
+
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
+ *
+ * disallowed substitutions: "restriction"
+
+ d XML_SCHEMAS_ELEM_BLOCK_RESTRICTION...
+ d c X'00001000'
+
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
+ *
+ * disallowed substitutions: "substituion"
+
+ d XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION...
+ d c X'00002000'
+
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
+ *
+ * substitution group exclusions are absent
+
+ d XML_SCHEMAS_ELEM_FINAL_ABSENT...
+ d c X'00004000'
+
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
+ *
+ * substitution group exclusions: "extension"
+
+ d XML_SCHEMAS_ELEM_FINAL_EXTENSION...
+ d c X'00008000'
+
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
+ *
+ * substitution group exclusions: "restriction"
+
+ d XML_SCHEMAS_ELEM_FINAL_RESTRICTION...
+ d c X'00010000'
+
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
+ *
+ * the declaration is a substitution group head
+
+ d XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD...
+ d c X'00020000'
+
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
+ *
+ * this is set when the elem decl has been checked against
+ * all constraints
+
+ d XML_SCHEMAS_ELEM_INTERNAL_CHECKED...
+ d c X'00040000'
+
+ d xmlSchemaElementPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaElement...
+ d ds based(xmlSchemaElementPtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d next like(xmlSchemaElementPtr) Not used ?
+ d name * const xmlChar *
+ d id * const xmlChar *
+ d ref * const xmlChar *
+ d refNs * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ d subtypes like(xmlSchemaTypePtr)
+ d attributes like(xmlSchemaAttributePtr) Deprecated; not used
+ d node like(xmlNodePtr)
+ d minOccurs 10i 0 Deprecated; not used
+ d maxOccurs 10i 0 Deprecated; not used
+ *
+ d flags 10i 0
+ d targetNamespace...
+ d * const xmlChar *
+ d namedType * const xmlChar *
+ d namedTypeNs * const xmlChar *
+ d substGroup * const xmlChar *
+ d substGroupNs * const xmlChar *
+ d scope * const xmlChar *
+ d value * const xmlChar *
+ d refDecl like(xmlSchemaElementPtr)
+ d contModel like(xmlRegexpPtr)
+ d contentType like(xmlSchemaContentType)
+ d refPrefix * const xmlChar *
+ d devVal like(xmlSchemaValPtr) Comp val constraint
+ d idcs * void *
+
+ * XML_SCHEMAS_FACET_UNKNOWN:
+ *
+ * unknown facet handling
+
+ d XML_SCHEMAS_FACET_UNKNOWN...
+ d c 0
+
+ * XML_SCHEMAS_FACET_PRESERVE:
+ *
+ * preserve the type of the facet
+
+ d XML_SCHEMAS_FACET_PRESERVE...
+ d c 1
+
+ * XML_SCHEMAS_FACET_REPLACE:
+ *
+ * replace the type of the facet
+
+ d XML_SCHEMAS_FACET_REPLACE...
+ d c 2
+
+ * XML_SCHEMAS_FACET_COLLAPSE:
+ *
+ * collapse the types of the facet
+
+ d XML_SCHEMAS_FACET_COLLAPSE...
+ d c 3
+
+ * A facet definition.
+
+ d xmlSchemaFacet...
+ d ds based(xmlSchemaFacetPtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d next like(xmlSchemaFacetPtr) Next type in seq.
+ d value * const xmlChar *
+ d id * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ d node like(xmlNodePtr)
+ d fixed 10i 0 _FACET_PRESERVE, etc
+ d whitespace 10i 0
+ d val like(xmlSchemaValPtr) Compiled value
+ d regexp like(xmlRegexpPtr) Regexp for patterns
+
+ * A notation definition.
+
+ d xmlSchemaNotationPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaNotation...
+ d ds based(xmlSchemaNotationPtr)
+ d align qualified
+ d type like(xmlSchemaTypeType) Kind of type
+ d name * const xmlChar *
+ d annot like(xmlSchemaAnnotPtr)
+ d identifier * const xmlChar *
+ d targetNamespace...
+ d * const xmlChar *
+
+ * TODO: Actually all those flags used for the schema should sit
+ * on the schema parser context, since they are used only
+ * during parsing an XML schema document, and not available
+ * on the component level as per spec.
+
+ * XML_SCHEMAS_QUALIF_ELEM:
+ *
+ * Reflects elementFormDefault == qualified in
+ * an XML schema document.
+
+ d XML_SCHEMAS_QUALIF_ELEM...
+ d c X'00000001'
+
+ * XML_SCHEMAS_QUALIF_ATTR:
+ *
+ * Reflects attributeFormDefault == qualified in
+ * an XML schema document.
+
+ d XML_SCHEMAS_QUALIF_ATTR...
+ d c X'00000002'
+
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of finalDefault.
+
+ d XML_SCHEMAS_FINAL_DEFAULT_EXTENSION...
+ d c X'00000004'
+
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of finalDefault.
+
+ d XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION...
+ d c X'00000008'
+
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
+ *
+ * the cshema has "list" in the set of finalDefault.
+
+ d XML_SCHEMAS_FINAL_DEFAULT_LIST...
+ d c X'00000010'
+
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
+ *
+ * the schema has "union" in the set of finalDefault.
+
+ d XML_SCHEMAS_FINAL_DEFAULT_UNION...
+ d c X'00000020'
+
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of blockDefault.
+
+ d XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION...
+ d c X'00000040'
+
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of blockDefault.
+
+ d XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION...
+ d c X'00000080'
+
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
+ *
+ * the schema has "substitution" in the set of blockDefault.
+
+ d XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION...
+ d c X'00000100'
+
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
+ *
+ * the schema is currently including an other schema with
+ * no target namespace.
+
+ d XML_SCHEMAS_INCLUDING_CONVERT_NS...
+ d c X'00000200'
+
+ * _xmlSchema:
+ *
+ * A Schemas definition
+
+ d xmlSchema ds based(xmlSchemaPtr)
+ d align qualified
+ d name * const xmlChar *
+ d targetNamespace...
+ d * const xmlChar *
+ d version * const xmlChar *
+ d id * const xmlChar *
+ d doc like(xmlDocPtr)
+ d annot like(xmlSchemaAnnotPtr)
+ d flags 10i 0
+ *
+ d typeDecl like(xmlHashTablePtr)
+ d attrDecl like(xmlHashTablePtr)
+ d attrGrpDecl like(xmlHashTablePtr)
+ d elemDecl like(xmlHashTablePtr)
+ d notaDecl like(xmlHashTablePtr)
+ d schemasImports...
+ d like(xmlHashTablePtr)
+ *
+ d #private * void *
+ d groupDecl like(xmlHashTablePtr)
+ d dict like(xmlDictPtr)
+ d includes * void *
+ d preserve 10i 0 Do not free doc ?
+ d counter 10i 0 For name uniqueness
+ d idcDef like(xmlHashTablePtr) All id-constr. defs
+ d volatiles * void *
+
+ d xmlSchemaFreeType...
+ d pr extproc('xmlSchemaFreeType')
+ d type value like(xmlSchemaTypePtr)
+
+ d xmlSchemaFreeWildcard...
+ d pr extproc('xmlSchemaFreeWildcard')
+ d wildcard value like(xmlSchemaWildcardPtr)
+
+ /endif LIBXML_SCHEMAS_ENBLD
+ /endif SCHEMA_INTERNALS_H__
diff --git a/os400/libxmlrpg/schematron.rpgle b/os400/libxmlrpg/schematron.rpgle
new file mode 100644
index 0000000..ff8ea62
--- /dev/null
+++ b/os400/libxmlrpg/schematron.rpgle
@@ -0,0 +1,195 @@
+ * Summary: XML Schemastron implementation
+ * Description: interface to the XML Schematron validity checking.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SCHEMATRON_H__)
+ /define XML_SCHEMATRON_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_SCHEMATRON_ENABLED)
+
+ /include "libxmlrpg/tree"
+
+ d xmlSchematronValidOptions...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMATRON_OUT_QUIET... Quiet no report
+ d c X'0001'
+ d XML_SCHEMATRON_OUT_TEXT... Build textual report
+ d c X'0002'
+ d XML_SCHEMATRON_OUT_XML... Output SVRL
+ d c X'0004'
+ d XML_SCHEMATRON_OUT_ERROR... Output to error func
+ d c X'0008'
+ d XML_SCHEMATRON_OUT_FILE... Output to file descr
+ d c X'0100'
+ d XML_SCHEMATRON_OUT_BUFFER... Output to a buffer
+ d c X'0200'
+ d XML_SCHEMATRON_OUT_IO... Output to I/O mech
+ d c X'0400'
+
+ * The schemas related types are kept internal
+
+ d xmlSchematronPtr...
+ d s * based(######typedef######)
+
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
+
+ d xmlSchematronValidityErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+
+ d xmlSchematronValidityWarningFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * A schemas validation context
+
+ d xmlSchematronParserCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlSchematronValidCtxtPtr...
+ d s * based(######typedef######)
+
+ * Interfaces for parsing.
+
+ d xmlSchematronNewParserCtxt...
+ d pr extproc('xmlSchematronNewParserCtxt')
+ d like(xmlSchematronParserCtxtPtr)
+ d URL * value options(*string) const char *
+
+ d xmlSchematronNewMemParserCtxt...
+ d pr extproc(
+ d 'xmlSchematronNewMemParserCtxt')
+ d like(xmlSchematronParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlSchematronNewDocParserCtxt...
+ d pr extproc(
+ d 'xmlSchematronNewDocParserCtxt')
+ d like(xmlSchematronParserCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlSchematronFreeParserCtxt...
+ d pr extproc(
+ d 'xmlSchematronFreeParserCtxt')
+ d ctxt value
+ d like(xmlSchematronParserCtxtPtr)
+
+ /if defined(DISABLED)
+ d xmlSchematronSetParserErrors...
+ d pr extproc(
+ d 'xmlSchematronSetParserErrors')
+ d ctxt value
+ d like(xmlSchematronParserCtxtPtr)
+ d err value
+ d like(xmlSchematronValidityErrorFunc)
+ d warn value like(
+ d xmlSchematronValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlSchematronGetParserErrors...
+ d pr 10i 0 extproc(
+ d 'xmlSchematronGetParserErrors')
+ d ctxt value
+ d like(xmlSchematronParserCtxtPtr)
+ d err like(xmlSchematronValidityErrorFunc)
+ d warn like(
+ d xmlSchematronValidityWarningFunc)
+ d ctx * void *(*)
+
+ d xmlSchematronIsValid...
+ d pr 10i 0 extproc('xmlSchematronIsValid')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ /endif
+
+ d xmlSchematronParse...
+ d pr extproc('xmlSchematronParse')
+ d like(xmlSchematronPtr)
+ d ctxt value
+ d like(xmlSchematronParserCtxtPtr)
+
+ d xmlSchematronFree...
+ d pr extproc('xmlSchematronFree')
+ d schema value like(xmlSchematronPtr)
+
+ * Interfaces for validating
+
+ d xmlSchematronSetValidStructuredErrors...
+ d pr extproc('xmlSchematronSetValidStruct-
+ d uredErrors')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d serror value like(xmlStructuredErrorFunc)
+ d ctx * value void *
+
+ /if defined(DISABLED)
+ d xmlSchematronSetValidErrors...
+ d pr extproc(
+ d 'xmlSchematronSetValidErrors')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d err value
+ d like(xmlSchematronValidityErrorFunc)
+ d warn value like(
+ d xmlSchematronValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlSchematronGetValidErrors...
+ d pr 10i 0 extproc(
+ d 'xmlSchematronGetValidErrors')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d err like(xmlSchematronValidityErrorFunc)
+ d warn like(
+ d xmlSchematronValidityWarningFunc)
+ d ctx * void *(*)
+
+ d xmlSchematronSetValidOptions...
+ d pr 10i 0 extproc(
+ d 'xmlSchematronSetValidOptions')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d options 10i 0 value
+
+ d xmlSchematronValidCtxtGetOptions...
+ d pr 10i 0 extproc(
+ d 'xmlSchematronValidCtxtGetOptions')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+
+ d xmlSchematronValidateOneElement...
+ d pr 10i 0 extproc(
+ d 'xmlSchematronValidateOneElement')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d elem value like(xmlNodePtr)
+ /endif
+
+ d xmlSchematronNewValidCtxt...
+ d pr extproc('xmlSchematronNewValidCtxt')
+ d like(xmlSchematronValidCtxtPtr)
+ d schema value like(xmlSchematronPtr)
+ d options 10i 0 value
+
+ d xmlSchematronFreeValidCtxt...
+ d pr extproc('xmlSchematronFreeValidCtxt')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+
+ d xmlSchematronValidateDoc...
+ d pr 10i 0 extproc('xmlSchematronValidateDoc')
+ d ctxt value like(xmlSchematronValidCtxtPtr)
+ d instance value like(xmlDocPtr)
+
+ /endif _SCHEMATRON_ENABLED
+ /endif XML_SCHEMATRON_H__
diff --git a/os400/libxmlrpg/threads.rpgle b/os400/libxmlrpg/threads.rpgle
new file mode 100644
index 0000000..07d4278
--- /dev/null
+++ b/os400/libxmlrpg/threads.rpgle
@@ -0,0 +1,70 @@
+ * Summary: interfaces for thread handling
+ * Description: set of generic threading related routines
+ * should work with pthreads, Windows native or TLS threads
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_THREADS_H__)
+ /define XML_THREADS_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ * xmlMutex are a simple mutual exception locks.
+
+ d xmlMutexPtr s * based(######typedef######)
+
+ * xmlRMutex are reentrant mutual exception locks.
+
+ d xmlRMutexPtr s * based(######typedef######)
+
+ /include "libxmlrpg/globals"
+
+ d xmlNewMutex pr extproc('xmlNewMutex')
+ d like(xmlMutexPtr)
+
+ d xmlMutexLock pr extproc('xmlMutexLock')
+ d tok value like(xmlMutexPtr)
+
+ d xmlMutexUnlock pr extproc('xmlMutexUnlock')
+ d tok value like(xmlMutexPtr)
+
+ d xmlFreeMutex pr extproc('xmlFreeMutex')
+ d tok value like(xmlMutexPtr)
+
+ d xmlNewRMutex pr extproc('xmlNewRMutex')
+ d like(xmlRMutexPtr)
+
+ d xmlRMutexLock pr extproc('xmlRMutexLock')
+ d tok value like(xmlRMutexPtr)
+
+ d xmlRMutexUnlock...
+ d pr extproc('xmlRMutexUnlock')
+ d tok value like(xmlRMutexPtr)
+
+ d xmlFreeRMutex pr extproc('xmlFreeRMutex')
+ d tok value like(xmlRMutexPtr)
+
+ * Library wide APIs.
+
+ d xmlInitThreads pr extproc('xmlInitThreads')
+
+ d xmlLockLibrary pr extproc('xmlLockLibrary')
+
+ d xmlUnlockLibrary...
+ d pr extproc('xmlUnlockLibrary')
+
+ d xmlGetThreadId pr 10i 0 extproc('xmlGetThreadId')
+
+ d xmlIsMainThread...
+ d pr 10i 0 extproc('xmlIsMainThread')
+
+ d xmlCleanupThreads...
+ d pr extproc('xmlCleanupThreads')
+
+ d xmlGetGlobalState...
+ d pr extproc('xmlGetGlobalState')
+ d like(xmlGlobalStatePtr)
+
+ /endif XML_THREADS_H__
diff --git a/os400/libxmlrpg/transcode.rpgle b/os400/libxmlrpg/transcode.rpgle
new file mode 100644
index 0000000..b96e4e8
--- /dev/null
+++ b/os400/libxmlrpg/transcode.rpgle
@@ -0,0 +1,71 @@
+ * Supplementary character code conversion functions for
+ * EBCDIC environments.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(TRANSCODE_H__)
+ /define TRANSCODE_H__
+
+ /include "libxmlrpg/dict"
+ /include "libxmlrpg/xmlstdarg"
+
+ d xmlZapDict pr extproc('xmlZapDict')
+ d dict like(xmlDictPtr)
+
+ d xmlTranscodeResult...
+ d pr * extproc('xmlTranscodeResult') const char *
+ d s * value options(*string) const xmlChar *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+ d freeproc * value procptr
+
+ d xmlTranscodeString...
+ d pr * extproc('xmlTranscodeString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+
+ d xmlTranscodeWString...
+ d pr * extproc('xmlTranscodeWString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+
+ d xmlTranscodeHString...
+ d pr * extproc('xmlTranscodeHString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+
+ /if not defined(XML_NO_SHORT_NAMES)
+ d xmlTR pr * extproc('xmlTranscodeResult') const char *
+ d s * value options(*string) const xmlChar *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+ d freeproc * value procptr
+
+ d xmlTS pr * extproc('xmlTranscodeString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+
+ d xmlTW pr * extproc('xmlTranscodeWString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+
+ d xmlTH pr * extproc('xmlTranscodeHString') const xmlChar *
+ d s * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d dict like(xmlDictPtr) options(*omit)
+ /endif
+
+ d xmlVasprintf pr * extproc('xmlVasprintf')
+ d dict like(xmlDictPtr) options(*omit)
+ d encoding * value options(*string) const char *
+ d fmt * value options(*string) const xmlChar *
+ d args likeds(xmlVaList)
+
+ /endif
diff --git a/os400/libxmlrpg/tree.rpgle b/os400/libxmlrpg/tree.rpgle
new file mode 100644
index 0000000..8b4981a
--- /dev/null
+++ b/os400/libxmlrpg/tree.rpgle
@@ -0,0 +1,1628 @@
+ * Summary: interfaces for tree manipulation
+ * Description: this module describes the structures found in an tree
+ * resulting from an XML or HTML parsing, as well as the API
+ * provided for various processing on that tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_TREE_H__)
+ /define XML_TREE_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlstring"
+
+
+ * Some of the basic types pointer to structures:
+
+ * xmlIO.h
+
+ d xmlParserInputBufferPtr...
+ d s * based(######typedef######)
+
+ d xmlOutputBufferPtr...
+ d s * based(######typedef######)
+
+ * parser.h
+
+ d xmlParserInputPtr...
+ d s * based(######typedef######)
+
+ d xmlParserCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlSAXLocatorPtr...
+ d s * based(######typedef######)
+
+ d xmlSAXHandlerPtr...
+ d s * based(######typedef######)
+
+ * entities.h
+
+ d xmlEntityPtr s * based(######typedef######)
+
+
+ * BASE_BUFFER_SIZE:
+ *
+ * default buffer size 4000.
+
+ d BASE_BUFFER_SIZE...
+ d c 4096
+
+ * LIBXML_NAMESPACE_DICT:
+ *
+ * Defines experimental behaviour:
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
+
+ /if defined(DO_NOT_COMPILE)
+ /define LIBXML_NAMESPACE_DICT
+ /endif
+
+ * xmlBufferAllocationScheme:
+ *
+ * A buffer allocation scheme can be defined to either match exactly the
+ * need or double it's allocated size each time it is found too small.
+
+ d xmlBufferAllocationScheme...
+ d s 10i 0 based(######typedef######) enum
+ d XML_BUFFER_ALLOC_DOUBLEIT...
+ d c 0
+ d XML_BUFFER_ALLOC_EXACT...
+ d c 1
+ d XML_BUFFER_ALLOC_IMMUTABLE...
+ d c 2
+ d XML_BUFFER_ALLOC_IO...
+ d c 3
+ d XML_BUFFER_ALLOC_HYBRID...
+ d c 4
+
+ * xmlBuffer:
+ *
+ * A buffer structure, this old construct is limited to 2GB and
+ * is being deprecated, use API with xmlBuf instead
+
+ d xmlBufferPtr s * based(######typedef######)
+
+ d xmlBuffer ds based(xmlBufferPtr)
+ d align qualified
+ d content * xmlChar *
+ d use 10u 0 The buffer size used
+ d size 10u 0 The buffer size
+ d alloc like(xmlBufferAllocationScheme) The realloc method
+ d contentIO * xmlChar *
+
+ * xmlBufPtr:
+ *
+ * A pointer to a buffer structure, the actual structure internals are not
+ * public
+
+ d xmlBufPtr s * based(######typedef######)
+
+ * A few public routines for xmlBuf. As those are expected to be used
+ * mostly internally the bulk of the routines are internal in buf.h
+
+ d xmlBufContent pr * extproc('xmlBufContent') xmlChar *
+ d buf value like(xmlBufPtr) const
+
+ d xmlBufEnd pr * extproc('xmlBufEnd') xmlChar *
+ d buf value like(xmlBufPtr) const
+
+ d xmlBufUse pr 10u 0 extproc('xmlBufUse') size_t
+ d buf value like(xmlBufPtr) const
+
+ d xmlBufShrink pr 10u 0 extproc('xmlBufShrink') size_t
+ d buf value like(xmlBufPtr)
+ d len 10u 0 value size_t
+
+ * LIBXML2_NEW_BUFFER:
+ *
+ * Macro used to express that the API use the new buffers for
+ * xmlParserInputBuffer and xmlOutputBuffer. The change was
+ * introduced in 2.9.0.
+
+ /define LIBXML2_NEW_BUFFER
+
+ * XML_XML_NAMESPACE:
+ *
+ * This is the namespace for the special xml: prefix predefined in the
+ * XML Namespace specification.
+
+ d XML_XML_NAMESPACE...
+ d c 'http://www.w3.org/XML/1998/+
+ d namespace'
+
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+
+ d XML_XML_ID c 'xml:id'
+
+ * The different element types carried by an XML tree.
+ *
+ * NOTE: This is synchronized with DOM Level1 values
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
+
+ d xmlElementType s 10i 0 based(######typedef######) enum
+ d XML_ELEMENT_NODE...
+ d c 1
+ d XML_ATTRIBUTE_NODE...
+ d c 2
+ d XML_TEXT_NODE c 3
+ d XML_CDATA_SECTION_NODE...
+ d c 4
+ d XML_ENTITY_REF_NODE...
+ d c 5
+ d XML_ENTITY_NODE...
+ d c 6
+ d XML_PI_NODE c 7
+ d XML_COMMENT_NODE...
+ d c 8
+ d XML_DOCUMENT_NODE...
+ d c 9
+ d XML_DOCUMENT_TYPE_NODE...
+ d c 10
+ d XML_DOCUMENT_FRAG_NODE...
+ d c 11
+ d XML_NOTATION_NODE...
+ d c 12
+ d XML_HTML_DOCUMENT_NODE...
+ d c 13
+ d XML_DTD_NODE c 14
+ d XML_ELEMENT_DECL...
+ d c 15
+ d XML_ATTRIBUTE_DECL...
+ d c 16
+ d XML_ENTITY_DECL...
+ d c 17
+ d XML_NAMESPACE_DECL...
+ d c 18
+ d XML_LOCAL_NAMESPACE...
+ d c 18 Alias
+ d XML_XINCLUDE_START...
+ d c 19
+ d XML_XINCLUDE_END...
+ d c 20
+ /if defined(LIBXML_DOCB_ENABLED)
+ d XML_DOCB_DOCUMENT_NODE...
+ d c 21
+ /endif
+
+ * xmlNotation:
+ *
+ * A DTD Notation definition.
+
+ d xmlNotationPtr s * based(######typedef######)
+
+ d xmlNotation ds based(xmlNotationPtr)
+ d align qualified
+ d name * const xmlChar *
+ d PublicID * const xmlChar *
+ d SystemID * const xmlChar *
+
+ * xmlAttributeType:
+ *
+ * A DTD Attribute type definition.
+
+ d xmlAttributeType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ATTRIBUTE_CDATA...
+ d c 1
+ d XML_ATTRIBUTE_ID...
+ d c 2
+ d XML_ATTRIBUTE_IDREF...
+ d c 3
+ d XML_ATTRIBUTE_IDREFS...
+ d c 4
+ d XML_ATTRIBUTE_ENTITY...
+ d c 5
+ d XML_ATTRIBUTE_ENTITIES...
+ d c 6
+ d XML_ATTRIBUTE_NMTOKEN...
+ d c 7
+ d XML_ATTRIBUTE_NMTOKENS...
+ d c 8
+ d XML_ATTRIBUTE_ENUMERATION...
+ d c 9
+ d XML_ATTRIBUTE_NOTATION...
+ d c 10
+
+ * xmlAttributeDefault:
+ *
+ * A DTD Attribute default definition.
+
+ d xmlAttributeDefault...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ATTRIBUTE_NONE...
+ d c 1
+ d XML_ATTRIBUTE_REQUIRED...
+ d c 2
+ d XML_ATTRIBUTE_IMPLIED...
+ d c 3
+ d XML_ATTRIBUTE_FIXED...
+ d c 4
+
+ * xmlEnumeration:
+ *
+ * List structure used when there is an enumeration in DTDs.
+
+ d xmlEnumerationPtr...
+ d s * based(######typedef######)
+
+ d xmlEnumeration ds based(xmlEnumerationPtr)
+ d align qualified
+ d next like(xmlEnumerationPtr) Next one
+ d name * const xmlChar *
+
+ * Forward pointer declarations.
+
+ d xmlNodePtr s * based(######typedef######)
+ d xmlDocPtr s * based(######typedef######)
+ d xmlDtdPtr s * based(######typedef######)
+
+ * xmlAttribute:
+ *
+ * An Attribute declaration in a DTD.
+
+ d xmlAttributePtr...
+ d s * based(######typedef######)
+
+ d xmlAttribute ds based(xmlAttributePtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType) XML_ATTRIBUTE_DECL
+ d name * const xmlChar *
+ d children like(xmlNodePtr) NULL
+ d last like(xmlNodePtr) NULL
+ d parent like(xmlDtdPtr) -> DTD
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) previous sibling lnk
+ d doc like(xmlDocPtr) The containing doc
+ d nexth like(xmlAttributePtr) Next in hash table
+ d atype like(xmlAttributeType) The attribute type
+ d def like(xmlAttributeDefault) The default
+ d defaultValue * or const xmlChar *
+ d tree like(xmlEnumerationPtr) or enum tree
+ d prefix * const xmlChar *
+ d elem * const xmlChar *
+
+ * xmlElementContentType:
+ *
+ * Possible definitions of element content types.
+
+ d xmlElementContentType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ELEMENT_CONTENT_PCDATA...
+ d c 1
+ d XML_ELEMENT_CONTENT_ELEMENT...
+ d c 2
+ d XML_ELEMENT_CONTENT_SEQ...
+ d c 3
+ d XML_ELEMENT_CONTENT_OR...
+ d c 4
+
+ * xmlElementContentOccur:
+ *
+ * Possible definitions of element content occurrences.
+
+ d xmlElementContentOccur...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ELEMENT_CONTENT_ONCE...
+ d c 1
+ d XML_ELEMENT_CONTENT_OPT...
+ d c 2
+ d XML_ELEMENT_CONTENT_MULT...
+ d c 3
+ d XML_ELEMENT_CONTENT_PLUS...
+ d c 4
+
+ * xmlElementContent:
+ *
+ * An XML Element content as stored after parsing an element definition
+ * in a DTD.
+
+ d xmlElementContentPtr...
+ d s * based(######typedef######)
+
+ d xmlElementContent...
+ d ds based(xmlElementContentPtr)
+ d align qualified
+ d type like(xmlElementContentType)
+ d ocur like(xmlElementContentOccur)
+ d name * const xmlChar *
+ d c1 like(xmlElementContentPtr) First child
+ d c2 like(xmlElementContentPtr) Second child
+ d parent like(xmlElementContentPtr) Parent
+ d prefix * const xmlChar *
+
+ * xmlElementTypeVal:
+ *
+ * The different possibilities for an element content type.
+
+ d xmlElementTypeVal...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ELEMENT_TYPE_UNDEFINED...
+ d c 0
+ d XML_ELEMENT_TYPE_EMPTY...
+ d c 1
+ d XML_ELEMENT_TYPE_ANY...
+ d c 2
+ d XML_ELEMENT_TYPE_MIXED...
+ d c 3
+ d XML_ELEMENT_TYPE_ELEMENT...
+ d c 4
+
+ /include "libxmlrpg/xmlregexp"
+
+ * xmlElement:
+ *
+ * An XML Element declaration from a DTD.
+
+ d xmlElementPtr s * based(######typedef######)
+
+ d xmlElement ds based(xmlElementPtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType) XML_ELEMENT_DECL
+ d name * const xmlChar *
+ d children like(xmlNodePtr) NULL
+ d last like(xmlNodePtr) NULL
+ d parent like(xmlDtdPtr) -> DTD
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) previous sibling lnk
+ d doc like(xmlDocPtr) The containing doc
+ d etype like(xmlElementTypeVal) The type
+ d content like(xmlElementContentPtr) Allowed elem content
+ d attributes like(xmlAttributePtr) Declared attributes
+ d prefix * const xmlChar *
+ /if defined(LIBXML_REGEXP_ENABLED)
+ d contModel like(xmlRegexpPtr) Validating regexp
+ /else
+ d contModel *
+ /endif
+
+ * XML_LOCAL_NAMESPACE:
+ *
+ * A namespace declaration node.
+
+ * xmlNs:
+ *
+ * An XML namespace.
+ * Note that prefix == NULL is valid, it defines the default namespace
+ * within the subtree (until overridden).
+ *
+ * xmlNsType is unified with xmlElementType.
+
+ d xmlNsType s based(######typedef######) enum
+ d like(xmlElementType)
+
+ d xmlNsPtr s * based(######typedef######)
+
+ d xmlNs ds based(xmlNsPtr)
+ d align qualified
+ d next like(xmlNsPtr) next Ns link
+ d type like(xmlNsType) Global or local
+ d href * const xmlChar *
+ d prefix * const xmlChar *
+ d #private * Application data
+ d context like(xmlDocPtr) normally an xmlDoc
+
+ * xmlDtd:
+ *
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
+ * the internal subset and for the external subset.
+
+ d xmlDtd ds based(xmlDtdPtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType) XML_DTD_NODE
+ d name * const xmlChar *
+ d children like(xmlNodePtr) Property link value
+ d last like(xmlNodePtr) Last child link
+ d parent like(xmlDocPtr) Child->parent link
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) previous sibling lnk
+ d doc like(xmlDocPtr) The containing doc
+ d notations * notations hash table
+ d elements * elements hash table
+ d entities * entities hash table
+ d ExternalID * const xmlChar *
+ d SystemID * const xmlChar *
+ d pentities * param. ent. h table
+
+ * xmlAttr:
+ *
+ * An attribute on an XML node.
+
+ d xmlAttrPtr s * based(######typedef######)
+
+ d xmlAttr ds based(xmlAttrPtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType) XML_ATTRIBUTE_NODE
+ d name * const xmlChar *
+ d children like(xmlNodePtr) Property link value
+ d last like(xmlNodePtr) NULL
+ d parent like(xmlNodePtr) Child->parent link
+ d next like(xmlAttrPtr) next sibling link
+ d prev like(xmlAttrPtr) previous sibling lnk
+ d doc like(xmlDocPtr) The containing doc
+ d ns like(xmlNsPtr) Associated namespace
+ d atype like(xmlAttributeType) For validation
+ d psvi * Type/PSVI info
+
+ * xmlID:
+ *
+ * An XML ID instance.
+
+ d xmlIdPtr s * based(######typedef######)
+
+ d xmlID ds based(xmlIdPtr)
+ d align qualified
+ d next like(xmlIdPtr) Next ID
+ d attr like(xmlAttrPtr) Attribute holding it
+ d name * const xmlChar *
+ d lineno 10i 0 Line # if not avail
+ d doc like(xmlDocPtr) Doc holding ID
+
+ * xmlRef:
+ *
+ * An XML IDREF instance.
+
+ d xmlRefPtr s * based(######typedef######)
+
+ d xmlRef ds based(xmlRefPtr)
+ d align qualified
+ d next like(xmlRefPtr) Next Ref
+ d value * const xmlChar *
+ d attr like(xmlAttrPtr) Attribute holding it
+ d name * const xmlChar *
+ d lineno 10i 0 Line # if not avail
+
+ * xmlNode:
+ *
+ * A node in an XML tree.
+
+ d xmlNode ds based(xmlNodePtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType)
+ d name * const xmlChar *
+ d children like(xmlNodePtr) Parent->children lnk
+ d last like(xmlNodePtr) Last child link
+ d parent like(xmlNodePtr) Child->parent link
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) previous sibling lnk
+ d doc like(xmlDocPtr) The containing doc
+ d ns like(xmlNsPtr) Associated namespace
+ d content * xmlChar *
+ d properties like(xmlAttrPtr) Properties list
+ d nsDef like(xmlNsPtr) Node ns definitions
+ d psvi * Type/PSVI info
+ d line 5u 0 Line number
+ d extra 5u 0 Data for XPath/XSLT
+
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similary named xmlParserOption
+
+ d xmlDocProperties...
+ d s 10i 0 based(######typedef######) enum
+ d XML_DOC_WELLFORMED...
+ d c X'00000001'
+ d XML_DOC_NSVALID...
+ d c X'00000002'
+ d XML_DOC_OLD10 c X'00000004'
+ d XML_DOC_DTDVALID...
+ d c X'00000008'
+ d XML_DOC_XINCLUDE...
+ d c X'00000010'
+ d XML_DOC_USERBUILT...
+ d c X'00000020'
+ d XML_DOC_INTERNAL...
+ d c X'00000030'
+ d XML_DOC_HTML c X'00000080'
+
+ * xmlDoc:
+ *
+ * An XML document.
+
+ d xmlDoc ds based(xmlDocPtr)
+ d align qualified
+ d #private * Application data
+ d type like(xmlElementType) XML_DOCUMENT_NODE
+ d name * const xmlChar *
+ d children like(xmlNodePtr) The document tree
+ d last like(xmlNodePtr) Last child link
+ d parent like(xmlNodePtr) Child->parent link
+ d next like(xmlNodePtr) next sibling link
+ d prev like(xmlNodePtr) previous sibling lnk
+ d doc like(xmlDocPtr) Reference to itself
+ d compression 10i 0 zlib compression lev
+ d standalone 10i 0
+ d intSubset like(xmlDtdPtr) Internal subset
+ d extSubset like(xmlDtdPtr) External subset
+ d oldns like(xmlNsPtr) Global namespace
+ d version * const xmlChar *
+ d encoding * const xmlChar *
+ d ids * IDs hash table
+ d refs * IDREFs hash table
+ d URL * const xmlChar *
+ d charset 10i 0 In-memory encoding
+ d dict * xmlDictPtr for names
+ d psvi * Type/PSVI ino
+ d parseFlags 10i 0 xmlParserOption's
+ d properties 10i 0 xmlDocProperties
+
+ * xmlDOMWrapAcquireNsFunction:
+ * @ctxt: a DOM wrapper context
+ * @node: the context node (element or attribute)
+ * @nsName: the requested namespace name
+ * @nsPrefix: the requested namespace prefix
+ *
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
+ *
+ * Returns an xmlNsPtr or NULL in case of an error.
+
+ d xmlDOMWrapAcquireNsFunction...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlDOMWrapCtxt:
+ *
+ * Context for DOM wrapper-operations.
+
+ d xmlDOMWrapCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlDOMWrapCtxt...
+ d ds based(xmlDOMWrapCtxtPtr)
+ d align qualified
+ d #private * void *
+ d type 10i 0
+ d namespaceMap * void *
+ d getNsForNodeFunc...
+ d like(xmlDOMWrapAcquireNsFunction)
+
+
+ * Variables.
+
+ * Some helper functions
+
+ /undefine XML_TESTVAL
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_XPATH_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_DEBUG_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SAX1_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_WRITER_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_DOCB_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlValidateNCName...
+ d pr 10i 0 extproc('xmlValidateNCName')
+ d value * value options(*string) const xmlChar *
+ d space 10i 0 value
+
+ /undefine XML_TESTVAL
+ /endif
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlValidateQName...
+ d pr 10i 0 extproc('xmlValidateQName')
+ d value * value options(*string) const xmlChar *
+ d space 10i 0 value
+
+ d xmlValidateName...
+ d pr 10i 0 extproc('xmlValidateName')
+ d value * value options(*string) const xmlChar *
+ d space 10i 0 value
+
+ d xmlValidateNMToken...
+ d pr 10i 0 extproc('xmlValidateNMToken')
+ d value * value options(*string) const xmlChar *
+ d space 10i 0 value
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlBuildQName pr * extproc('xmlBuildQName') xmlChar *
+ d ncname * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ d memory 65535 options(*varsize: *omit) xmlChar[]
+ d len 10i 0 value memory length
+
+ d xmlSplitQName2 pr * extproc('xmlSplitQName2') xmlChar *
+ d name * value options(*string) const xmlChar *
+ d prefix * xmlChar *
+
+ d xmlSplitQName3 pr * extproc('xmlSplitQName3') const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d len 10i 0
+
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
+
+ d xmlSetBufferAllocationScheme...
+ d pr extproc(
+ d 'xmlSetBufferAllocationScheme')
+ d scheme value
+ d like(xmlBufferAllocationScheme)
+
+ d xmlGetBufferAllocationScheme...
+ d pr extproc(
+ d 'xmlGetBufferAllocationScheme')
+ d like(xmlBufferAllocationScheme)
+
+ d xmlBufferCreate...
+ d pr extproc('xmlBufferCreate')
+ d like(xmlBufferPtr)
+
+ d xmlBufferCreateSize...
+ d pr extproc('xmlBufferCreateSize')
+ d like(xmlBufferPtr)
+ d size 10u 0 value size_t
+
+ d xmlBufferCreateStatic...
+ d pr extproc('xmlBufferCreateStatic')
+ d like(xmlBufferPtr)
+ d mem * value
+ d size 10u 0 value size_t
+
+ d xmlBufferResize...
+ d pr 10i 0 extproc('xmlBufferResize')
+ d buf value like(xmlBufferPtr)
+ d size 10u 0 value size_t
+
+ d xmlBufferFree pr extproc('xmlBufferFree')
+ d buf value like(xmlBufferPtr)
+
+ d xmlBufferDump pr 10i 0 extproc('xmlBufferDump')
+ d file * value FILE *
+ d buf value like(xmlBufferPtr)
+
+ d xmlBufferAdd pr 10i 0 extproc('xmlBufferAdd')
+ d buf value like(xmlBufferPtr)
+ d str * value options(*string) const xmlChar *
+ d len 10i 0 value str length
+
+ d xmlBufferAddHead...
+ d pr 10i 0 extproc('xmlBufferAddHead')
+ d buf value like(xmlBufferPtr)
+ d str * value options(*string) const xmlChar *
+ d len 10i 0 value str length
+
+ d xmlBufferCat pr 10i 0 extproc('xmlBufferCat')
+ d buf value like(xmlBufferPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlBufferCCat pr 10i 0 extproc('xmlBufferCCat')
+ d buf value like(xmlBufferPtr)
+ d str * value options(*string) const char *
+
+ d xmlBufferShrink...
+ d pr 10i 0 extproc('xmlBufferShrink')
+ d buf value like(xmlBufferPtr)
+ d len 10u 0 value str length
+
+ d xmlBufferGrow pr 10i 0 extproc('xmlBufferGrow')
+ d buf value like(xmlBufferPtr)
+ d len 10u 0 value str length
+
+ d xmlBufferEmpty pr extproc('xmlBufferEmpty')
+ d buf value like(xmlBufferPtr)
+
+ d xmlBufferContent...
+ d pr * extproc('xmlBufferContent') const xmlChar *
+ d buf value like(xmlBufferPtr)
+
+ d xmlBufferDetach...
+ d pr * extproc('xmlBufferDetach') xmlChar *
+ d buf value like(xmlBufferPtr)
+
+ d xmlBufferSetAllocationScheme...
+ d pr extproc(
+ d 'xmlBufferSetAllocationScheme')
+ d buf value like(xmlBufferPtr)
+ d scheme value
+ d like(xmlBufferAllocationScheme)
+
+ d xmlBufferLength...
+ d pr 10i 0 extproc('xmlBufferLength')
+ d buf value like(xmlBufferPtr)
+
+ * Creating/freeing new structures.
+
+ d xmlCreateIntSubset...
+ d pr extproc('xmlCreateIntSubset')
+ d like(xmlDtdPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemlID * value options(*string) const xmlChar *
+
+ d xmlNewDtd pr extproc('xmlNewDtd')
+ d like(xmlDtdPtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d ExternalID * value options(*string) const xmlChar *
+ d SystemlID * value options(*string) const xmlChar *
+
+ d xmlGetIntSubset...
+ d pr extproc('xmlGetIntSubset')
+ d like(xmlDtdPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlFreeDtd pr extproc('xmlFreeDtd')
+ d cur value like(xmlDtdPtr)
+
+ /if defined(LIBXML_LEGACY_ENABLED)
+ d xmlNewGlobalNs pr extproc('xmlNewGlobalNs')
+ d like(xmlNsPtr)
+ d doc value like(xmlDocPtr)
+ d href * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+ /endif LIBXML_LEGACY_ENABLD
+
+ d xmlNewNs pr extproc('xmlNewNs')
+ d like(xmlNsPtr)
+ d node value like(xmlNodePtr)
+ d href * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlFreeNs pr extproc('xmlFreeNs')
+ d cur value like(xmlNsPtr)
+
+ d xmlFreeNsList pr extproc('xmlFreeNsList')
+ d cur value like(xmlNsPtr)
+
+ d xmlNewDoc pr extproc('xmlNewDoc')
+ d like(xmlDocPtr)
+ d version * value options(*string) const xmlChar *
+
+ d xmlFreeDoc pr extproc('xmlFreeDoc')
+ d cur value like(xmlDocPtr)
+
+ d xmlNewDocProp pr extproc('xmlNewDocProp')
+ d like(xmlAttrPtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlNewProp pr extproc('xmlNewProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlNewNsProp pr extproc('xmlNewNsProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlNewNsPropEatName...
+ d pr extproc('xmlNewNsPropEatName')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlFreePropList...
+ d pr extproc('xmlFreePropList')
+ d cur value like(xmlAttrPtr)
+
+ d xmlFreeProp pr extproc('xmlFreeProp')
+ d cur value like(xmlAttrPtr)
+
+ d xmlCopyProp pr extproc('xmlCopyProp')
+ d like(xmlAttrPtr)
+ d target value like(xmlNodePtr)
+ d cur value like(xmlAttrPtr)
+
+ d xmlCopyPropList...
+ d pr extproc('xmlCopyPropList')
+ d like(xmlAttrPtr)
+ d target value like(xmlNodePtr)
+ d cur value like(xmlAttrPtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyDtd pr extproc('xmlCopyDtd')
+ d like(xmlDtdPtr)
+ d dtd value like(xmlDtdPtr)
+ /endif LIBXML_TREE_ENABLED
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlCopyDoc pr extproc('xmlCopyDoc')
+ d like(xmlDocPtr)
+ d doc value like(xmlDocPtr)
+ d recursive 10i 0 value
+
+ /undefine XML_TESTVAL
+ /endif
+
+ * Creating new nodes.
+
+ d xmlNewDocNode pr extproc('xmlNewDocNode')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewDocNodeEatName...
+ d pr extproc('xmlNewDocNodeEatName')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d ns value like(xmlNsPtr)
+ d name * value xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewNode pr extproc('xmlNewNode')
+ d like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlNewNodeEatName...
+ d pr extproc('xmlNewNodeEatName')
+ d like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value xmlChar *
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlNewChild pr extproc('xmlNewChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlNewDocText pr extproc('xmlNewDocText')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewText pr extproc('xmlNewText')
+ d like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewDocPI pr extproc('xmlNewDocPI')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewPI pr extproc('xmlNewPI')
+ d like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewDocTextLen...
+ d pr extproc('xmlNewDocTextLen')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlNewTextLen pr extproc('xmlNewTextLen')
+ d like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlNewDocComment...
+ d pr extproc('xmlNewDocComment')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewComment pr extproc('xmlNewComment')
+ d like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewCDataBlock...
+ d pr extproc('xmlNewCDataBlock')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlNewCharRef pr extproc('xmlNewCharRef')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlNewReference...
+ d pr extproc('xmlNewReference')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlCopyNode pr extproc('xmlCopyNode')
+ d like(xmlNodePtr)
+ d node value like(xmlNodePtr)
+ d recursive 10i 0 value
+
+ d xmlDocCopyNode pr extproc('xmlDocCopyNode')
+ d like(xmlNodePtr)
+ d node value like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d recursive 10i 0 value
+
+ d xmlDocCopyNodeList...
+ d pr extproc('xmlDocCopyNodeList')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlCopyNodeList...
+ d pr extproc('xmlCopyNodeList')
+ d like(xmlNodePtr)
+ d node value like(xmlNodePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlNewTextChild...
+ d pr extproc('xmlNewTextChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewDocRawNode...
+ d pr extproc('xmlNewDocRawNode')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlNewDocFragment...
+ d pr extproc('xmlNewDocFragment')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ /endif LIBXML_TREE_ENABLED
+
+ * Navigating.
+
+ d xmlNewDocFragment...
+ d xmlGetLineNo pr 20i 0 extproc('xmlGetLineNo')
+ d node value like(xmlNodePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_DEBUG_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlGetNodePath pr * extproc('xmlGetNodePath') xmlChar *
+ d node value like(xmlNodePtr)
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlDocGetRootElement...
+ d pr extproc('xmlDocGetRootElement')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlGetLastChild...
+ d pr extproc('xmlGetLastChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+
+ d xmlNodeIsText pr 10i 0 extproc('xmlNodeIsText')
+ d node value like(xmlNodePtr)
+
+ d xmlIsBlankNode pr 10i 0 extproc('xmlIsBlankNode')
+ d node value like(xmlNodePtr)
+
+ * Changing the structure.
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_WRITER_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlDocSetRootElement...
+ d pr extproc('xmlDocSetRootElement')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d root value like(xmlNodePtr)
+
+ /undefine XML_TESTVAL
+ /endif
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlNodeSetName pr extproc('xmlNodeSetName')
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlAddChild pr extproc('xmlAddChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlAddChildList...
+ d pr extproc('xmlAddChildList')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_WRITER_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlReplaceNode pr extproc('xmlReplaceNode')
+ d like(xmlNodePtr)
+ d old value like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+
+ /undefine XML_TESTVAL
+ /endif
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlAddPrevSibling...
+ d pr extproc('xmlAddPrevSibling')
+ d like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+ d elem value like(xmlNodePtr)
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlAddSibling pr extproc('xmlAddSibling')
+ d like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlAddNextSibling...
+ d pr extproc('xmlAddNextSibling')
+ d like(xmlNodePtr)
+ d cur value like(xmlNodePtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlUnlinkNode pr extproc('xmlUnlinkNode')
+ d cur value like(xmlNodePtr)
+
+ d xmlTextMerge pr extproc('xmlTextMerge')
+ d like(xmlNodePtr)
+ d first value like(xmlNodePtr)
+ d second value like(xmlNodePtr)
+
+ d xmlTextConcat pr 10i 0 extproc('xmlTextConcat')
+ d node value like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlFreeNodeList...
+ d pr extproc('xmlFreeNodeList')
+ d cur value like(xmlNodePtr)
+
+ d xmlFreeNode pr extproc('xmlFreeNode')
+ d cur value like(xmlNodePtr)
+
+ d xmlSetTreeDoc pr extproc('xmlSetTreeDoc')
+ d tree value like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlSetListDoc pr extproc('xmlSetListDoc')
+ d list value like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+
+ * Namespaces.
+
+ d xmlSearchNs pr extproc('xmlSearchNs')
+ d like(xmlNsPtr)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d nameSpace * value options(*string) const xmlChar *
+
+ d xmlSearchNsByHref...
+ d pr extproc('xmlSearchNsByHref')
+ d like(xmlNsPtr)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d href * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_XPATH_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlGetNsList pr * extproc('xmlGetNsList') xmlNsPtr *
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlSetNs pr extproc('xmlSetNs')
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+
+ d xmlCopyNamespace...
+ d pr extproc('xmlCopyNamespace')
+ d like(xmlNsPtr)
+ d cur value like(xmlNsPtr)
+
+ d xmlCopyNamespaceList...
+ d pr extproc('xmlCopyNamespaceList')
+ d like(xmlNsPtr)
+ d cur value like(xmlNsPtr)
+
+ * Changing the content.
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_XINCLUDE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_HTML_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlSetProp pr extproc('xmlSetProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlSetNsProp pr extproc('xmlSetNsProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlGetNoNsProp pr * extproc('xmlGetNoNsProp') xmlChar *
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetProp pr * extproc('xmlGetProp') xmlChar *
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlHasProp pr extproc('xmlHasProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlHasNsProp pr extproc('xmlHasNsProp')
+ d like(xmlAttrPtr)
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d nameSpace * value options(*string) const xmlChar *
+
+ d xmlGetNsProp pr * extproc('xmlGetNsProp') xmlChar *
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d nameSpace * value options(*string) const xmlChar *
+
+ d xmlStringGetNodeList...
+ d pr extproc('xmlStringGetNodeList')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d value * value options(*string) const xmlChar *
+
+ d xmlStringLenGetNodeList...
+ d pr extproc('xmlStringLenGetNodeList')
+ d like(xmlNodePtr)
+ d doc value like(xmlDocPtr)
+ d value * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlNodeListGetString...
+ d pr * extproc('xmlNodeListGetString') xmlChar *
+ d doc value like(xmlDocPtr)
+ d list value like(xmlNodePtr)
+ d inLine 10i 0 value
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlNodeListGetRawString...
+ d pr * extproc('xmlNodeListGetRawString') xmlChar *
+ d doc value like(xmlDocPtr)
+ d list value like(xmlNodePtr)
+ d inLine 10i 0 value
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlNodeSetContent...
+ d pr extproc('xmlNodeSetContent')
+ d cur value like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlNodeSetContentLen...
+ d pr extproc('xmlNodeSetContentLen')
+ d cur value like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlNodeAddContent...
+ d pr extproc('xmlNodeAddContent')
+ d cur value like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlNodeAddContentLen...
+ d pr extproc('xmlNodeAddContentLen')
+ d cur value like(xmlNodePtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlNodeGetContent...
+ d pr * extproc('xmlNodeGetContent') xmlChar *
+ d cur value like(xmlNodePtr)
+
+ d xmlNodeBufGetContent...
+ d pr 10i 0 extproc('xmlNodeBufGetContent')
+ d buffer value like(xmlBufferPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlBufGetNodeContent...
+ d pr 10i 0 extproc('xmlBufGetNodeContent')
+ d buf value like(xmlBufPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlNodeGetLang pr * extproc('xmlNodeGetLang') xmlChar *
+ d cur value like(xmlNodePtr)
+
+ d xmlNodeGetSpacePreserve...
+ d pr 10i 0 extproc('xmlNodeGetSpacePreserve')
+ d cur value like(xmlNodePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlNodeSetLang pr extproc('xmlNodeSetLang')
+ d cur value like(xmlNodePtr)
+ d lang * value options(*string) const xmlChar *
+
+ d xmlNodeSetSpacePreserve...
+ d pr extproc('xmlNodeSetSpacePreserve')
+ d cur value like(xmlNodePtr)
+ d val 10i 0 value
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlNodeGetBase pr * extproc('xmlNodeGetBase') xmlChar *
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_XINCLUDE_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlNodeSetBase pr extproc('xmlNodeSetBase')
+ d node value like(xmlNodePtr)
+ d uri * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ * Removing content.
+
+ d xmlRemoveProp pr 10i 0 extproc('xmlRemoveProp')
+ d cur value like(xmlAttrPtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlUnsetNsProp pr 10i 0 extproc('xmlUnsetNsProp')
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlUnsetProp pr 10i 0 extproc('xmlUnsetProp')
+ d node value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ * Internal, don't use.
+
+ d xmlBufferWriteCharacter... Warning: renamed
+ d pr extproc('xmlBufferWriteCHAR')
+ d buf value like(xmlBufferPtr)
+ d string * value options(*string) const xmlChar *
+
+ d xmlBufferWriteChar...
+ d pr extproc('xmlBufferWriteChar')
+ d buf value like(xmlBufferPtr)
+ d string * value options(*string) const xmlChar *
+
+ d xmlBufferWriteQuotedString...
+ d pr extproc('xmlBufferWriteQuotedString')
+ d buf value like(xmlBufferPtr)
+ d string * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlAttrSerializeTxtContent...
+ d pr extproc('xmlAttrSerializeTxtContent')
+ d buf value like(xmlBufferPtr)
+ d attr value like(xmlAttrPtr)
+ d string * value options(*string) const xmlChar *
+ /endif LIBXML_OUTPUT_ENABLD
+
+ /if defined(LIBXML_TREE_ENABLED)
+
+ * Namespace handling.
+
+ d xmlReconciliateNs...
+ d pr 10i 0 extproc('xmlReconciliateNs')
+ d doc value like(xmlDocPtr)
+ d tree value like(xmlNodePtr)
+ /endif
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+
+ * Saving.
+
+ d xmlDocDumpFormatMemory...
+ d pr extproc('xmlDocDumpFormatMemory')
+ d cur value like(xmlDocPtr)
+ d mem * xmlChar * (*)
+ d size 10i 0
+ d format 10i 0 value
+
+ d xmlDocDumpMemory...
+ d pr extproc('xmlDocDumpMemory')
+ d cur value like(xmlDocPtr)
+ d mem * xmlChar * (*)
+ d size 10i 0
+
+ d xmlDocDumpMemoryEnc...
+ d pr extproc('xmlDocDumpMemoryEnc')
+ d out_doc value like(xmlDocPtr)
+ d doc_txt_ptr * xmlChar * (*)
+ d doc_txt_len 10i 0
+ d txt_encoding * value options(*string) const char *
+
+ d xmlDocDumpFormatMemoryEnc...
+ d pr extproc('xmlDocDumpFormatMemoryEnc')
+ d out_doc value like(xmlDocPtr)
+ d doc_txt_ptr * xmlChar * (*)
+ d doc_txt_len 10i 0
+ d txt_encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d xmlDocFormatDump...
+ d pr 10i 0 extproc('xmlDocFormatDump')
+ d f * value FILE *
+ d cur value like(xmlDocPtr)
+ d format 10i 0 value
+
+ d xmlDocDump pr 10i 0 extproc('xmlDocDump')
+ d f * value FILE *
+ d cur value like(xmlDocPtr)
+
+ d xmlElemDump pr extproc('xmlElemDump')
+ d f * value FILE *
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlSaveFile pr 10i 0 extproc('xmlSaveFile')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+
+ d xmlSaveFormatFile...
+ d pr 10i 0 extproc('xmlSaveFormatFile')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+ d format 10i 0 value
+
+ d xmlBufNodeDump pr 10u 0 extproc('xmlBufNodeDump') size_t
+ d buf value like(xmlBufPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d level 10i 0 value
+ d format 10i 0 value
+
+ d xmlNodeDump pr 10i 0 extproc('xmlNodeDump')
+ d buf value like(xmlBufferPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d level 10i 0 value
+ d format 10i 0 value
+
+ d xmlSaveFileTo pr 10i 0 extproc('xmlSaveFileTo')
+ d buf value like(xmlOutputBufferPtr)
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+
+ d xmlSaveFormatFileTo...
+ d pr 10i 0 extproc('xmlSaveFormatFileTo')
+ d buf value like(xmlOutputBufferPtr)
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d xmlNodeDumpOutput...
+ d pr extproc('xmlNodeDumpOutput')
+ d buf value like(xmlOutputBufferPtr)
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlNodePtr)
+ d level 10i 0 value
+ d format 10i 0 value
+ d encoding * value options(*string) const char *
+
+ d xmlSaveFormatFileEnc...
+ d pr 10i 0 extproc('xmlSaveFormatFileEnc')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+ d format 10i 0 value
+
+ d xmlSaveFileEnc pr 10i 0 extproc('xmlSaveFileEnc')
+ d filename * value options(*string) const char *
+ d cur value like(xmlDocPtr)
+ d encoding * value options(*string) const char *
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * XHTML
+
+ d xmlIsXHTML pr 10i 0 extproc('xmlIsXHTML')
+ d systemID * value options(*string) const xmlChar *
+ d publicID * value options(*string) const xmlChar *
+
+ * Compression.
+
+ d xmlGetDocCompressMode...
+ d pr 10i 0 extproc('xmlGetDocCompressMode')
+ d doc value like(xmlDocPtr)
+
+ d xmlSetDocCompressMode...
+ d pr extproc('xmlSetDocCompressMode')
+ d doc value like(xmlDocPtr)
+ d mode 10i 0 value
+
+ d xmlGetCompressMode...
+ d pr 10i 0 extproc('xmlGetCompressMode')
+
+ d xmlSetCompressMode...
+ d pr extproc('xmlSetCompressMode')
+ d mode 10i 0 value
+
+ * DOM-wrapper helper functions.
+
+ d xmlDOMWrapNewCtxt...
+ d pr extproc('xmlDOMWrapNewCtxt')
+ d like(xmlDOMWrapCtxtPtr)
+
+ d xmlDOMWrapFreeCtxt...
+ d pr extproc('xmlDOMWrapFreeCtxt')
+ d ctxt value like(xmlDOMWrapCtxtPtr)
+
+ d xmlDOMWrapReconcileNamespaces...
+ d pr 10i 0 extproc(
+ d 'xmlDOMWrapReconcileNamespaces')
+ d ctxt value like(xmlDOMWrapCtxtPtr)
+ d elem value like(xmlNodePtr)
+ d options 10i 0 value
+
+ d xmlDOMWrapAdoptNode...
+ d pr 10i 0 extproc('xmlDOMWrapAdoptNode')
+ d ctxt value like(xmlDOMWrapCtxtPtr)
+ d sourceDoc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d destDoc value like(xmlDocPtr)
+ d destParent value like(xmlNodePtr)
+ d options 10i 0 value
+
+ d xmlDOMWrapRemoveNode...
+ d pr 10i 0 extproc('xmlDOMWrapRemoveNode')
+ d ctxt value like(xmlDOMWrapCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d options 10i 0 value
+
+ d xmlDOMWrapCloneNode...
+ d pr 10i 0 extproc('xmlDOMWrapCloneNode')
+ d ctxt value like(xmlDOMWrapCtxtPtr)
+ d sourceDoc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d clonedNode like(xmlNodePtr)
+ d destDoc value like(xmlDocPtr)
+ d destParent value like(xmlNodePtr)
+ d options 10i 0 value
+
+ /if defined(LIBXML_TREE_ENABLED)
+
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+
+ d xmlChildElementCount...
+ d pr 20u 0 extproc('xmlChildElementCount')
+ d parent value like(xmlNodePtr)
+
+ d xmlNextElementSibling...
+ d pr extproc('xmlNextElementSibling')
+ d like(xmlNodePtr)
+ d node value like(xmlNodePtr)
+
+ d xmlFirstElementChild...
+ d pr extproc('xmlFirstElementChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+
+ d xmlLastElementChild...
+ d pr extproc('xmlLastElementChild')
+ d like(xmlNodePtr)
+ d parent value like(xmlNodePtr)
+
+ d xmlPreviousElementSibling...
+ d pr extproc('xmlPreviousElementSibling')
+ d like(xmlNodePtr)
+ d node value like(xmlNodePtr)
+ /endif
+
+ /if not defined(XML_PARSER_H__)
+ /include "libxmlrpg/xmlmemory"
+ /endif
+
+ /endif XML_TREE_H__
diff --git a/os400/libxmlrpg/uri.rpgle b/os400/libxmlrpg/uri.rpgle
new file mode 100644
index 0000000..9a23d80
--- /dev/null
+++ b/os400/libxmlrpg/uri.rpgle
@@ -0,0 +1,100 @@
+ * Summary: library of generic URI related routines
+ * Description: library of generic URI related routines
+ * Implements RFC 2396
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_URI_H__)
+ /define XML_URI_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ * xmlURI:
+ *
+ * A parsed URI reference. This is a struct containing the various fields
+ * as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
+
+ d xmlURIPtr s * based(######typedef######)
+
+ d xmlURI ds based(xmlURIPtr)
+ d align qualified
+ d scheme * char *
+ d opaque * char *
+ d authority * char *
+ d server * char *
+ d user * char *
+ d port 10i 0
+ d path * char *
+ d query * char *
+ d fragment * char *
+ d cleanup 10i 0
+ d query_raw * char *
+
+ d xmlCreateURI pr extproc('xmlCreateURI')
+ d like(xmlURIPtr)
+
+ d xmlBuildURI pr * extproc('xmlBuildURI') xmlChar *
+ d URI * value options(*string) const xmlChar *
+ d base * value options(*string) const xmlChar *
+
+ d xmlBuildRelativeURI...
+ d pr * extproc('xmlBuildRelativeURI') xmlChar *
+ d URI * value options(*string) const xmlChar *
+ d base * value options(*string) const xmlChar *
+
+ d xmlParseURI pr extproc('xmlParseURI')
+ d like(xmlURIPtr)
+ d str * value options(*string) const char *
+
+ d xmlParseURIRaw pr extproc('xmlParseURIRaw')
+ d like(xmlURIPtr)
+ d str * value options(*string) const char *
+ d raw 10i 0 value
+
+ d xmlParseURIReference...
+ d pr 10i 0 extproc('xmlParseURIReference')
+ d uri value like(xmlURIPtr)
+ d str * value options(*string) const char *
+
+ d xmlSaveUri pr * extproc('xmlSaveUri') xmlChar *
+ d uri value like(xmlURIPtr)
+
+ d xmlPrintURI pr extproc('xmlPrintURI')
+ d stream * value FILE *
+ d uri value like(xmlURIPtr)
+
+ d xmlURIEscapeStr...
+ d pr * extproc('xmlURIEscapeStr') xmlChar *
+ d str * value options(*string) const xmlChar *
+ d list * value options(*string) const xmlChar *
+
+ d xmlURIUnescapeString...
+ d pr * extproc('xmlURIUnescapeString') char *
+ d str * value options(*string) const char *
+ d len 10i 0 value
+ d target * value options(*string) char *
+
+ d xmlNormalizeURIPath...
+ d pr 10i 0 extproc('xmlNormalizeURIPath')
+ d path * value options(*string) char *
+
+ d xmlURIEscape pr * extproc('xmlURIEscape') xmlChar *
+ d str * value options(*string) const xmlChar *
+
+ d xmlFreeURI pr extproc('xmlFreeURI')
+ d uri value like(xmlURIPtr)
+
+ d xmlCanonicPath pr * extproc('xmlCanonicPath') xmlChar *
+ d path * value options(*string) const xmlChar *
+
+ d xmlPathToURI pr * extproc('xmlPathToURI') xmlChar *
+ d path * value options(*string) const xmlChar *
+
+ /endif XML_URI_H__
diff --git a/os400/libxmlrpg/valid.rpgle b/os400/libxmlrpg/valid.rpgle
new file mode 100644
index 0000000..722b89d
--- /dev/null
+++ b/os400/libxmlrpg/valid.rpgle
@@ -0,0 +1,575 @@
+ * Summary: The DTD validation
+ * Description: API for the DTD handling and the validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_VALID_H__)
+ /define XML_VALID_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlerror"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/list"
+ /include "libxmlrpg/xmlautomata"
+ /include "libxmlrpg/xmlregexp"
+
+ * Validation state added for non-determinist content model.
+
+ d xmlValidStatePtr...
+ d s * based(######typedef######)
+
+ * xmlValidityErrorFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity error is found. This is a message
+ * oriented function similar to an *printf function.
+
+ d xmlValidityErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlValidityWarningFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity warning is found. This is a message
+ * oriented function similar to an *printf function.
+
+ d xmlValidityWarningFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlValidCtxt:
+ * An xmlValidCtxt is used for error reporting when validating.
+
+ d xmlValidCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlValidCtxt ds based(xmlValidCtxtPtr)
+ d align qualified
+ d userdata * void *
+ d error like(xmlValidityErrorFunc) Error callback
+ d warning like(xmlValidityWarningFunc) Warning callback
+ *
+ * Node analysis stack used when validating within entities
+ *
+ d node like(xmlNodePtr) Current parsed Node
+ d nodeNr 10i 0 Parsing stack depth
+ d nodeMax 10i 0 Max stack depth
+ d nodeTab * xmlNodePtr *
+ *
+ d finishDtd 10u 0 Finish validtng DTD?
+ d doc like(xmlDocPtr) The document
+ d valid 10i 0 Temp check result
+ *
+ * state state used for non-determinist content validation
+ *
+ d vstate * xmlValidState *
+ d vstateNr 10i 0 Validat. stack depth
+ d vstateMax 10i 0 Max stack depth
+ d vstateTab * xmlValidState *
+ *
+ /if defined(LIBXML_REGEXP_ENABLED)
+ d am like(xmlAutomataPtr) The automata
+ d state like(xmlAutomataStatePtr) Automata build state
+ /else
+ d am *
+ d state *
+ /endif
+
+ * ALL notation declarations are stored in a table.
+ * There is one table per DTD.
+
+ d xmlNotationTablePtr...
+ d s * based(######typedef######)
+
+ * ALL element declarations are stored in a table.
+ * There is one table per DTD.
+
+ d xmlElementTablePtr...
+ d s * based(######typedef######)
+
+ * ALL attribute declarations are stored in a table.
+ * There is one table per DTD.
+
+ d xmlAttributeTablePtr...
+ d s * based(######typedef######)
+
+ * ALL IDs attributes are stored in a table.
+ * There is one table per document.
+
+ d xmlIDTablePtr s * based(######typedef######)
+
+ * ALL Refs attributes are stored in a table.
+ * There is one table per document.
+
+ d xmlRefTablePtr s * based(######typedef######)
+
+ * Notation
+
+ d xmlAddNotationDecl...
+ d pr extproc('xmlAddNotationDecl')
+ d like(xmlNotationPtr)
+ d ctxt value like(xmlValidCtxtPtr)
+ d dtd value like(xmlDtdPtr)
+ d name * value options(*string) const xmlChar *
+ d PublicID * value options(*string) const xmlChar *
+ d SystemID * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyNotationTable...
+ d pr extproc('xmlCopyNotationTable')
+ d like(xmlNotationPtr)
+ d table value like(xmlNotationTablePtr)
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlFreeNotationTable...
+ d pr extproc('xmlFreeNotationTable')
+ d table value like(xmlNotationTablePtr)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlDumpNotationDecl...
+ d pr extproc('xmlDumpNotationDecl')
+ d buf value like(xmlBufferPtr)
+ d nota value like(xmlNotationPtr)
+
+ d xmlDumpNotationTable...
+ d pr extproc('xmlDumpNotationTable')
+ d buf value like(xmlBufferPtr)
+ d table value like(xmlNotationTablePtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * Element Content
+ * the non Doc version are being deprecated
+
+ d xmlNewElementContent...
+ d pr extproc('xmlNewElementContent')
+ d like(xmlElementContentPtr)
+ d name * value const xmlChar *
+ d type value like(xmlElementContentType)
+
+ d xmlCopyElementContent...
+ d pr extproc('xmlCopyElementContent')
+ d like(xmlElementContentPtr)
+ d content value like(xmlElementContentPtr)
+
+ d xmlFreeElementContent...
+ d pr extproc('xmlFreeElementContent')
+ d cur value like(xmlElementContentPtr)
+
+ * the new versions with doc argument
+
+ d xmlNewDocElementContent...
+ d pr extproc('xmlNewDocElementContent')
+ d like(xmlElementContentPtr)
+ d doc value like(xmlDocPtr)
+ d name * value const xmlChar *
+ d type value like(xmlElementContentType)
+
+ d xmlCopyDocElementContent...
+ d pr extproc('xmlCopyDocElementContent')
+ d like(xmlElementContentPtr)
+ d doc value like(xmlDocPtr)
+ d content value like(xmlElementContentPtr)
+
+ d xmlFreeDocElementContent...
+ d pr extproc('xmlFreeDocElementContent')
+ d doc value like(xmlDocPtr)
+ d cur value like(xmlElementContentPtr)
+
+ d xmlSnprintfElementContent...
+ d pr extproc('xmlSnprintfElementContent')
+ d buf 65535 options(*varsize)
+ d size 10i 0 value
+ d content value like(xmlElementContentPtr)
+ d englob 10i 0 value
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ * DEPRECATED
+ d xmlSprintfElementContent...
+ d pr extproc('xmlSprintfElementContent')
+ d buf 65535 options(*varsize)
+ d content value like(xmlElementContentPtr)
+ d englob 10i 0 value
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * DEPRECATED
+
+ * Element
+
+ d xmlAddElementDecl...
+ d pr extproc('xmlAddElementDecl')
+ d like(xmlElementPtr)
+ d ctxt value like(xmlValidCtxtPtr)
+ d dtd value like(xmlDtdPtr)
+ d name * value options(*string) const xmlChar *
+ d type value like(xmlElementTypeVal)
+ d content value like(xmlElementContentPtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyElementTable...
+ d pr extproc('xmlCopyElementTable')
+ d like(xmlElementTablePtr)
+ d table value like(xmlElementTablePtr)
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlFreeElementTable...
+ d pr extproc('xmlFreeElementTable')
+ d table value like(xmlElementTablePtr)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlDumpElementTable...
+ d pr extproc('xmlDumpElementTable')
+ d buf value like(xmlBufferPtr)
+ d table value like(xmlElementTablePtr)
+
+ d xmlDumpElementDecl...
+ d pr extproc('xmlDumpElementDecl')
+ d buf value like(xmlBufferPtr)
+ d elem value like(xmlElementPtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * Enumeration
+
+ d xmlCreateEnumeration...
+ d pr extproc('xmlCreateEnumeration')
+ d like(xmlEnumerationPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlFreeEnumeration...
+ d pr extproc('xmlFreeEnumeration')
+ d cur value like(xmlEnumerationPtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyEnumeration...
+ d pr extproc('xmlCopyEnumeration')
+ d like(xmlEnumerationPtr)
+ d cur value like(xmlEnumerationPtr)
+ /endif LIBXML_TREE_ENABLED
+
+ * Attribute
+
+ d xmlAddAttributeDecl...
+ d pr extproc('xmlAddAttributeDecl')
+ d like(xmlAttributePtr)
+ d ctxt value like(xmlValidCtxtPtr)
+ d dtd value like(xmlDtdPtr)
+ d elem * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+ d type value like(xmlAttributeType)
+ d def value like(xmlAttributeDefault)
+ d defaultValue * value options(*string) const xmlChar *
+ d tree value like(xmlEnumerationPtr)
+
+ /if defined(LIBXML_TREE_ENABLED)
+ d xmlCopyAttributeTable...
+ d pr extproc('xmlCopyAttributeTable')
+ d like(xmlAttributeTablePtr)
+ d table value like(xmlAttributeTablePtr)
+ /endif LIBXML_TREE_ENABLED
+
+ d xmlFreeAttributeTable...
+ d pr extproc('xmlFreeAttributeTable')
+ d table value like(xmlAttributeTablePtr)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlDumpAttributeTable...
+ d pr extproc('xmlDumpAttributeTable')
+ d buf value like(xmlBufferPtr)
+ d table value like(xmlAttributeTablePtr)
+
+ d xmlDumpAttributeDecl...
+ d pr extproc('xmlDumpAttributeDecl')
+ d buf value like(xmlBufferPtr)
+ d attr value like(xmlAttributePtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * IDs
+
+ d xmlAddID pr extproc('xmlAddID')
+ d like(xmlIDPtr)
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d value * value options(*string) const xmlChar *
+ d attr value like(xmlAttrPtr)
+
+ d xmlFreeIdTable pr extproc('xmlFreeIDTable')
+ d table value like(xmlIDTablePtr)
+
+ d xmlGetID pr extproc('xmlGetID')
+ d like(xmlAttrPtr)
+ d doc value like(xmlDocPtr)
+ d ID * value options(*string) const xmlChar *
+
+ d xmlIsID pr 10i 0 extproc('xmlIsID')
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d attr value like(xmlAttrPtr)
+
+ d xmlRemoveID pr 10i 0 extproc('xmlRemoveID')
+ d doc value like(xmlDocPtr)
+ d attr value like(xmlAttrPtr)
+
+ * IDREFs
+
+ d xmlAddRef pr extproc('xmlAddRef')
+ d like(xmlRefPtr)
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d value * value options(*string) const xmlChar *
+ d attr value like(xmlAttrPtr)
+
+ d xmlFreeRefTable...
+ d pr extproc('xmlFreeRefTable')
+ d table value like(xmlRefTablePtr)
+
+ d xmlIsRef pr 10i 0 extproc('xmlIsRef')
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d attr value like(xmlAttrPtr)
+
+ d xmlRemoveRef pr 10i 0 extproc('xmlRemoveRef')
+ d doc value like(xmlDocPtr)
+ d attr value like(xmlAttrPtr)
+
+ d xmlGetRefs pr extproc('xmlGetRefs')
+ d like(xmlListPtr)
+ d doc value like(xmlDocPtr)
+ d ID * value options(*string) const xmlChar *
+
+ * The public function calls related to validity checking.
+
+ /if defined(LIBXML_VALID_ENABLED)
+ * Allocate/Release Validation Contexts
+
+ d xmlNewValidCtxt...
+ d pr extproc('xmlNewValidCtxt')
+ d like(xmlValidCtxtPtr)
+
+ d xmlFreeValidCtxt...
+ d pr extproc('xmlFreeValidCtxt')
+ d ctxt value like(xmlValidCtxtPtr)
+
+ d xmlValidateRoot...
+ d pr 10i 0 extproc('xmlValidateRoot')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlValidateElementDecl...
+ d pr 10i 0 extproc('xmlValidateElementDecl')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlElementPtr)
+
+ d xmlValidNormalizeAttributeValue...
+ d pr * extproc( xmlChar *
+ d 'xmlValidNormalizeAttributeValue')
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidCtxtNormalizeAttributeValue...
+ d pr * extproc('xmlValidCtxt+ xmlChar *
+ d NormalizeAttributeValue')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d name * value options(*string) const xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateAttributeDecl...
+ d pr 10i 0 extproc('xmlValidateAttributeDecl')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d attr value like(xmlAttributePtr)
+
+ d xmlValidateAttributeValue...
+ d pr 10i 0 extproc('xmlValidateAttributeValue')
+ d type value like(xmlAttributeType)
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateNotationDecl...
+ d pr 10i 0 extproc('xmlValidateNotationDecl')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d nota value like(xmlNotationPtr)
+
+ d xmlValidateDtd pr 10i 0 extproc('xmlValidateDtd')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d dtd value like(xmlDtdPtr)
+
+ d xmlValidateDtdFinal...
+ d pr 10i 0 extproc('xmlValidateDtdFinal')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlValidateDocument...
+ d pr 10i 0 extproc('xmlValidateDocument')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlValidateElement...
+ d pr 10i 0 extproc('xmlValidateElement')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlValidateOneElement...
+ d pr 10i 0 extproc('xmlValidateOneElement')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlValidateOneAttribute...
+ d pr 10i 0 extproc('xmlValidateOneAttribute')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d attr value like(xmlAttrPtr)
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateOneNamespace...
+ d pr 10i 0 extproc('xmlValidateOneNamespace')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d prefix * value options(*string) const xmlChar *
+ d ns value like(xmlNsPtr)
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateDocumentFinal...
+ d pr 10i 0 extproc('xmlValidateDocumentFinal')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ /endif LIBXML_VALID_ENABLED
+
+ /undefine XML_TESTVAL
+ /if defined(LIBXML_VALID_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlValidateNotationUse...
+ d pr 10i 0 extproc('xmlValidateNotationUse')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d notationName * value options(*string) const xmlChar *
+
+ /undefine XML_TESTVAL
+ /endif
+
+ d xmlIsMixedElement...
+ d pr 10i 0 extproc('xmlIsMixedElement')
+ d doc value like(xmlDocPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetDtdAttrDesc...
+ d pr extproc('xmlGetDtdAttrDesc')
+ d like(xmlAttributePtr)
+ d dtd value like(xmlDtdPtr)
+ d elem * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetDtdQAttrDesc...
+ d pr extproc('xmlGetDtdQAttrDesc')
+ d like(xmlAttributePtr)
+ d dtd value like(xmlDtdPtr)
+ d elem * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlGetDtdNotationDesc...
+ d pr extproc('xmlGetDtdNotationDesc')
+ d like(xmlNotationPtr)
+ d dtd value like(xmlDtdPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlGetDtdQElementDesc...
+ d pr extproc('xmlGetDtdQElementDesc')
+ d like(xmlElementPtr)
+ d dtd value like(xmlDtdPtr)
+ d name * value options(*string) const xmlChar *
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlGetDtdElementDesc...
+ d pr extproc('xmlGetDtdElementDesc')
+ d like(xmlElementPtr)
+ d dtd value like(xmlDtdPtr)
+ d name * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_VALID_ENABLED)
+ d xmlValidGetPotentialChildren...
+ d pr 10i 0 extproc(
+ d 'xmlValidGetPotentialChildren')
+ d ctree * value xmlElementContent *
+ d names * const xmlChar *(*)
+ d len 10i 0
+ d max 10i 0 value
+
+ d xmlValidGetValidElements...
+ d pr 10i 0 extproc('xmlValidGetValidElements')
+ d prev like(xmlNodePtr)
+ d next like(xmlNodePtr)
+ d names * const xmlChar *(*)
+ d max 10i 0 value
+
+ d xmlValidateNameValue...
+ d pr 10i 0 extproc('xmlValidateNameValue')
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateNamesValue...
+ d pr 10i 0 extproc('xmlValidateNamesValue')
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateNmtokenValue...
+ d pr 10i 0 extproc('xmlValidateNmtokenValue')
+ d value * value options(*string) const xmlChar *
+
+ d xmlValidateNmtokensValue...
+ d pr 10i 0 extproc('xmlValidateNmtokensValue')
+ d value * value options(*string) const xmlChar *
+
+ /if defined(LIBXML_REGEXP_ENABLED)
+ * Validation based on the regexp support
+
+ d xmlValidBuildContentModel...
+ d pr 10i 0 extproc('xmlValidBuildContentModel')
+ d ctxt value like(xmlValidCtxtPtr)
+ d elem value like(xmlElementPtr)
+
+ d xmlValidatePushElement...
+ d pr 10i 0 extproc('xmlValidatePushElement')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d qname * value options(*string) const xmlChar *
+
+ d xmlValidatePushCData...
+ d pr 10i 0 extproc('xmlValidatePushCData')
+ d ctxt value like(xmlValidCtxtPtr)
+ d data * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlValidatePopElement...
+ d pr 10i 0 extproc('xmlValidatePopElement')
+ d ctxt value like(xmlValidCtxtPtr)
+ d doc value like(xmlDocPtr)
+ d elem value like(xmlNodePtr)
+ d qname * value options(*string) const xmlChar *
+
+ /endif LIBXML_REGEXP_ENABLD
+ /endif LIBXML_VALID_ENABLED
+ /endif XML_VALID_H__
diff --git a/os400/libxmlrpg/xinclude.rpgle b/os400/libxmlrpg/xinclude.rpgle
new file mode 100644
index 0000000..c0b68ff
--- /dev/null
+++ b/os400/libxmlrpg/xinclude.rpgle
@@ -0,0 +1,147 @@
+ * Summary: implementation of XInclude
+ * Description: API to handle XInclude processing,
+ * implements the
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XINCLUDE_H__)
+ /define XML_XINCLUDE_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ /if defined(LIBXML_XINCLUDE_ENABLED)
+
+ * XINCLUDE_NS:
+ *
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
+
+ d XINCLUDE_NS c 'http://www.w3.org/2003/XInclude'
+
+
+ * XINCLUDE_OLD_NS:
+ *
+ * Define the draft Xinclude namespace: http://www.w3.org/2001/XInclude
+
+ d XINCLUDE_OLD_NS...
+ d c 'http://www.w3.org/2001/XInclude'
+
+ * XINCLUDE_NODE:
+ *
+ * Macro defining "include"
+
+ d XINCLUDE_NODE c 'include'
+
+ * XINCLUDE_FALLBACK:
+ *
+ * Macro defining "fallback"
+
+ d XINCLUDE_FALLBACK...
+ d c 'fallback'
+
+ * XINCLUDE_HREF:
+ *
+ * Macro defining "href"
+
+ d XINCLUDE_HREF c 'href'
+
+ * XINCLUDE_PARSE:
+ *
+ * Macro defining "parse"
+
+ d XINCLUDE_PARSE c 'parse'
+
+ * XINCLUDE_PARSE_XML:
+ *
+ * Macro defining "xml"
+
+ d XINCLUDE_PARSE_XML...
+ d c 'xml'
+
+ * XINCLUDE_PARSE_TEXT:
+ *
+ * Macro defining "text"
+
+ d XINCLUDE_PARSE_TEXT...
+ d c 'text'
+
+ * XINCLUDE_PARSE_ENCODING:
+ *
+ * Macro defining "encoding"
+
+ d XINCLUDE_PARSE_ENCODING...
+ d c 'encoding'
+
+ * XINCLUDE_PARSE_XPOINTER:
+ *
+ * Macro defining "xpointer"
+
+ d XINCLUDE_PARSE_XPOINTER...
+ d c 'xpointer'
+
+ d xmlXIncludeCtxtPtr...
+ d s * based(######typedef######)
+
+ * standalone processing
+
+ d xmlXIncludeProcess...
+ d pr 10i 0 extproc('xmlXIncludeProcess')
+ d doc value like(xmlDocPtr)
+
+ d xmlXIncludeProcessFlags...
+ d pr 10i 0 extproc('xmlXIncludeProcessFlags')
+ d doc value like(xmlDocPtr)
+ d flags 10i 0 value
+
+ d xmlXIncludeProcessFlagsData...
+ d pr 10i 0 extproc(
+ d 'xmlXIncludeProcessFlagsData')
+ d doc value like(xmlDocPtr)
+ d flags 10i 0 value
+ d data * value void *
+
+ d xmlXIncludeProcessTreeFlagsData...
+ d pr 10i 0 extproc(
+ d 'xmlXIncludeProcessTreeFlagsData')
+ d tree value like(xmlNodePtr)
+ d flags 10i 0 value
+ d data * value void *
+
+ d xmlXIncludeProcessTree...
+ d pr 10i 0 extproc('xmlXIncludeProcessTree')
+ d tree value like(xmlNodePtr)
+
+ d xmlXIncludeProcessTreeFlags...
+ d pr 10i 0 extproc(
+ d 'xmlXIncludeProcessTreeFlags')
+ d tree value like(xmlNodePtr)
+ d flags 10i 0 value
+
+
+ * contextual processing
+
+ d xmlXIncludeNewContext...
+ d pr extproc('xmlXIncludeNewContext')
+ d like(xmlXIncludeCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlXIncludeSetFlags...
+ d pr 10i 0 extproc('xmlXIncludeSetFlags')
+ d ctxt value like(xmlXIncludeCtxtPtr)
+ d flags 10i 0 value
+
+ d xmlXIncludeFreeContext...
+ d pr extproc('xmlXIncludeFreeContext')
+ d ctxt value like(xmlXIncludeCtxtPtr)
+
+ d xmlXIncludeProcessNode...
+ d pr 10i 0 extproc('xmlXIncludeProcessNode')
+ d ctxt value like(xmlXIncludeCtxtPtr)
+ d tree value like(xmlNodePtr)
+
+ /endif XINCLUDE_ENABLED
+ /endif XML_XINCLUDE_H__
diff --git a/os400/libxmlrpg/xlink.rpgle b/os400/libxmlrpg/xlink.rpgle
new file mode 100644
index 0000000..964e605
--- /dev/null
+++ b/os400/libxmlrpg/xlink.rpgle
@@ -0,0 +1,164 @@
+ * Summary: unfinished XLink detection module
+ * Description: unfinished XLink detection module
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XLINK_H__)
+ /define XML_XLINK_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ /if defined(LIBXML_XPTR_ENABLED)
+
+ * Various defines for the various Link properties.
+ *
+ * NOTE: the link detection layer will try to resolve QName expansion
+ * of namespaces. If "foo" is the prefix for "http://foo.com/"
+ * then the link detection layer will expand role="foo:myrole"
+ * to "http://foo.com/:myrole".
+ * NOTE: the link detection layer will expand URI-Refences found on
+ * href attributes by using the base mechanism if found.
+
+ d xlinkRef s * based(######typedef######) xmlChar *
+ d xlinkRole s * based(######typedef######) xmlChar *
+ d xlinkTitle s * based(######typedef######) xmlChar *
+
+ d xlinkType s 10i 0 based(######typedef######) enum
+ d XLINK_TYPE_NONE...
+ d c 0
+ d XLINK_TYPE_SIMPLE...
+ d c 1
+ d XLINK_TYPE_EXTENDED...
+ d c 2
+ d XLINK_TYPE_EXTENDED_SET...
+ d c 3
+
+ d xlinkShow s 10i 0 based(######typedef######) enum
+ d XLINK_SHOW_NONE...
+ d c 0
+ d XLINK_SHOW_NEW...
+ d c 1
+ d XLINK_SHOW_EMBED...
+ d c 2
+ d XLINK_SHOW_REPLACE...
+ d c 3
+
+ d xlinkActuate s 10i 0 based(######typedef######) enum
+ d XLINK_ACTUATE_NONE...
+ d c 0
+ d XLINK_ACTUATE_AUTO...
+ d c 1
+ d XLINK_ACTUATE_ONREQUEST...
+ d c 2
+
+ * xlinkNodeDetectFunc:
+ * @ctx: user data pointer
+ * @node: the node to check
+ *
+ * This is the prototype for the link detection routine.
+ * It calls the default link detection callbacks upon link detection.
+
+ d xlinkNodeDetectFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * The link detection module interact with the upper layers using
+ * a set of callback registered at parsing time.
+
+ * xlinkSimpleLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @href: the target of the link
+ * @role: the role string
+ * @title: the link title
+ *
+ * This is the prototype for a simple link detection callback.
+
+ d xlinkSimpleLinkFunk...
+ d s * based(######typedef######)
+ d procptr
+
+ * xlinkExtendedLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbArcs: the number of arcs detected on the link
+ * @from: pointer to the array of source roles found on the arcs
+ * @to: pointer to the array of target roles found on the arcs
+ * @show: array of values for the show attributes found on the arcs
+ * @actuate: array of values for the actuate attributes found on the arcs
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link detection callback.
+
+ d xlinkExtendedLinkFunk...
+ d s * based(######typedef######)
+ d procptr
+
+ * xlinkExtendedLinkSetFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link set detection callback.
+
+ d xlinkExtendedLinkSetFunk...
+ d s * based(######typedef######)
+ d procptr
+
+ * This is the structure containing a set of Links detection callbacks.
+ *
+ * There is no default xlink callbacks, if one want to get link
+ * recognition activated, those call backs must be provided before parsing.
+
+ d xlinkHandlerPtr...
+ d s * based(######typedef######) xmlChar *
+
+ d xlinkHandler ds based(xlinkHandlerPtr)
+ d align qualified
+ d simple like(xlinkSimpleLinkFunk)
+ d extended like(xlinkExtendedLinkFunk)
+ d set like(xlinkExtendedLinkSetFunk)
+
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+
+ d xlinkGetDefaultDetect...
+ d pr extproc('xlinkGetDefaultDetect')
+ d like(xlinkNodeDetectFunc)
+
+ d xlinkSetDefaultDetect...
+ d pr extproc('xlinkSetDefaultDetect')
+ d func value like(xlinkNodeDetectFunc)
+
+ * Routines to set/get the default handlers.
+
+ d xlinkGetDefaultHandler...
+ d pr extproc('xlinkGetDefaultHandler')
+ d like(xlinkHandlerPtr)
+
+ d xlinkSetDefaultHandler...
+ d pr extproc('xlinkSetDefaultHandler')
+ d handler value like(xlinkHandlerPtr)
+
+ * Link detection module itself.
+
+ d xlinkIsLink pr extproc('xlinkIsLink')
+ d like(xlinkType)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+
+ /endif LIBXML_XPTR_ENABLED
+ /endif XML_XLINK_H__
diff --git a/os400/libxmlrpg/xmlIO.rpgle b/os400/libxmlrpg/xmlIO.rpgle
new file mode 100644
index 0000000..72911bc
--- /dev/null
+++ b/os400/libxmlrpg/xmlIO.rpgle
@@ -0,0 +1,441 @@
+ * Summary: interface for the I/O interfaces used by the parser
+ * Description: interface for the I/O interfaces used by the parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_IO_H__)
+ /define XML_IO_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ * Those are the functions and datatypes for the parser input
+ * I/O structures.
+
+ * xmlInputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to detect if the current handler
+ * can provide input fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+
+ d xmlInputMatchCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlInputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to open the resource
+ *
+ * Returns an Input context or NULL in case or error
+
+ d xmlInputOpenCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlInputReadCallback:
+ * @context: an Input context
+ * @buffer: the buffer to store data read
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Input API to read the resource
+ *
+ * Returns the number of bytes read or -1 in case of error
+
+ d xmlInputReadCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlInputCloseCallback:
+ * @context: an Input context
+ *
+ * Callback used in the I/O Input API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+
+ d xmlInputCloseCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+
+ * Those are the functions and datatypes for the library output
+ * I/O structures.
+
+ * xmlOutputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to detect if the current handler
+ * can provide output fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Output module should be used
+
+ d xmlOutputMatchCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlOutputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to open the resource
+ *
+ * Returns an Output context or NULL in case or error
+
+ d xmlOutputOpenCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlOutputWriteCallback:
+ * @context: an Output context
+ * @buffer: the buffer of data to write
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Output API to write to the resource
+ *
+ * Returns the number of bytes written or -1 in case of error
+
+ d xmlOutputWriteCallback...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlOutputCloseCallback:
+ * @context: an Output context
+ *
+ * Callback used in the I/O Output API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+
+ d xmlOutputCloseCallback...
+ d s * based(######typedef######)
+ d procptr
+ /endif LIBXML_OUTPUT_ENABLD
+
+ /include "libxmlrpg/globals"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/parser"
+ /include "libxmlrpg/encoding"
+
+ d xmlParserInputBuffer...
+ d ds based(xmlParserInputBufferPtr)
+ d align qualified
+ d context * void *
+ d readcallback like(xmlInputReadCallback)
+ d closecallback like(xmlInputCloseCallback)
+ *
+ d encoder like(xmlCharEncodingHandlerPtr) Conversions --> UTF8
+ *
+ d buffer like(xmlBufPtr) UTF-8 local buffer
+ d raw like(xmlBufPtr) Raw input buffer
+ d compressed 10i 0
+ d error 10i 0
+ d rawconsumed 20u 0
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlOutputBuffer...
+ d ds based(xmlOutputBufferPtr)
+ d align qualified
+ d context * void *
+ d writecallback like(xmlOutputWriteCallback)
+ d closecallback like(xmlOutputCloseCallback)
+ *
+ d encoder like(xmlCharEncodingHandlerPtr) Conversions --> UTF8
+ *
+ d buffer like(xmlBufPtr) UTF-8/ISOLatin local
+ d conv like(xmlBufPtr) Buffer for output
+ d written 10i 0 Total # byte written
+ d error 10i 0
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * Interfaces for input
+
+ d xmlCleanupInputCallbacks...
+ d pr extproc('xmlCleanupInputCallbacks')
+
+ d xmlPopInputCallbacks...
+ d pr 10i 0 extproc('xmlPopInputCallbacks')
+
+ d xmlRegisterDefaultInputCallbacks...
+ d pr extproc(
+ d 'xmlRegisterDefaultInputCallbacks')
+
+ d xmlAllocParserInputBuffer...
+ d pr extproc('xmlAllocParserInputBuffer')
+ d like(xmlParserInputBufferPtr)
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateFilename...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateFilename')
+ d like(xmlParserInputBufferPtr)
+ d URI * value options(*string) const char *
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateFile...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateFile')
+ d like(xmlParserInputBufferPtr)
+ d file * value FILE *
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateFd...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateFd')
+ d like(xmlParserInputBufferPtr)
+ d fd 10i 0 value
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateMem...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateMem')
+ d like(xmlParserInputBufferPtr)
+ d mem * value options(*string) const char *
+ d size 10i 0 value
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateStatic...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateStatic')
+ d like(xmlParserInputBufferPtr)
+ d mem * value options(*string) const char *
+ d size 10i 0 value
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferCreateIO...
+ d pr extproc(
+ d 'xmlParserInputBufferCreateIO')
+ d like(xmlParserInputBufferPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d enc value like(xmlCharEncoding)
+
+ d xmlParserInputBufferRead...
+ d pr 10i 0 extproc('xmlParserInputBufferRead')
+ d in value like(xmlParserInputBufferPtr)
+ d len 10i 0 value
+
+ d xmlParserInputBufferGrow...
+ d pr 10i 0 extproc('xmlParserInputBufferGrow')
+ d in value like(xmlParserInputBufferPtr)
+ d len 10i 0 value
+
+ d xmlParserInputBufferPush...
+ d pr 10i 0 extproc('xmlParserInputBufferPush')
+ d in value like(xmlParserInputBufferPtr)
+ d len 10i 0 value
+ d buf * value options(*string) const char *
+
+ d xmlFreeParserInputBuffer...
+ d pr extproc('xmlFreeParserInputBuffer')
+ d in value like(xmlParserInputBufferPtr)
+
+ d xmlParserGetDirectory...
+ d pr * extproc('xmlParserGetDirectory') char *
+ d filename * value options(*string) const char *
+
+ d xmlRegisterInputCallbacks...
+ d pr 10i 0 extproc('xmlRegisterInputCallbacks')
+ d matchFunc value like(xmlInputMatchCallback)
+ d openFunc value like(xmlInputOpenCallback)
+ d readFunc value like(xmlInputReadCallback)
+ d closeFunc value like(xmlInputCloseCallback)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+
+ * Interfaces for output
+
+ d xmlCleanupOutputCallbacks...
+ d pr extproc('xmlCleanupOutputCallbacks')
+
+ d xmlRegisterDefaultOutputCallbacks...
+ d pr extproc(
+ d 'xmlRegisterDefaultOuputCallbacks')
+
+ d xmlAllocOutputBuffer...
+ d pr extproc('xmlAllocOutputBuffer')
+ d like(xmlOutputBufferPtr)
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+
+ d xmlOutputBufferCreateFilename...
+ d pr extproc(
+ d 'xmlOutputBufferCreateFilename')
+ d like(xmlOutputBufferPtr)
+ d URI * value options(*string) const char *
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+ d compression 10i 0 value
+
+ d xmlOutputBufferCreateFile...
+ d pr extproc('xmlOutputBufferCreateFile')
+ d like(xmlOutputBufferPtr)
+ d file * value FILE *
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+
+ d xmlOutputBufferCreateBuffer...
+ d pr extproc(
+ d 'xmlOutputBufferCreateBuffer')
+ d like(xmlOutputBufferPtr)
+ d buffer value like(xmlBufferPtr)
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+
+ d xmlOutputBufferCreateFd...
+ d pr extproc('xmlOutputBufferCreateFd')
+ d like(xmlOutputBufferPtr)
+ d fd 10i 0 value
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+
+ d xmlOutputBufferCreateIO...
+ d pr extproc('xmlOutputBufferCreateIO')
+ d like(xmlOutputBufferPtr)
+ d iowrite value like(xmlOutputWriteCallback)
+ d ioclose value like(xmlOutputCloseCallback)
+ d ioctx * value void *
+ d encoder value
+ d like(xmlCharEncodingHandlerPtr)
+
+ * Couple of APIs to get the output without digging into the buffers
+
+ d xmlOutputBufferGetContent...
+ d pr * extproc('xmlOutputBufferGetContent') const xmlChar *
+ d out value like(xmlOutputBufferPtr)
+
+ d xmlOutputBufferGetSize...
+ d pr 10u 0 extproc('xmlOutputBufferGetSize') size_t
+ d out value like(xmlOutputBufferPtr)
+
+ d xmlOutputBufferWrite...
+ d pr 10i 0 extproc('xmlOutputBufferWrite')
+ d out value like(xmlOutputBufferPtr)
+ d len 10i 0 value
+ d buf * value options(*string) const char *
+
+ d xmlOutputBufferWriteString...
+ d pr 10i 0 extproc('xmlOutputBufferWriteString')
+ d out value like(xmlOutputBufferPtr)
+ d str * value options(*string) const char *
+
+ d xmlOutputBufferWriteEscape...
+ d pr 10i 0 extproc('xmlOutputBufferWriteEscape')
+ d out value like(xmlOutputBufferPtr)
+ d str * value options(*string) const xmlChar *
+ d escaping value like(xmlCharEncodingOutputFunc)
+
+ d xmlOutputBufferFlush...
+ d pr 10i 0 extproc('xmlOutputBufferFlush')
+ d out value like(xmlOutputBufferPtr)
+
+ d xmlOutputBufferClose...
+ d pr 10i 0 extproc('xmlOutputBufferClose')
+ d out value like(xmlOutputBufferPtr)
+
+ d xmlRegisterOutputCallbacks...
+ d pr 10i 0 extproc('xmlRegisterOutputCallbacks')
+ d matchFunc value like(xmlOutputMatchCallback)
+ d openFunc value like(xmlOutputOpenCallback)
+ d writeFunc value like(xmlOutputWriteCallback)
+ d closeFunc value like(xmlOutputCloseCallback)
+
+ /if defined(LIBXML_HTTP_ENABLED)
+
+ * This function only exists if HTTP support built into the library
+
+ d xmlRegisterHTTPPostCallbacks...
+ d pr extproc(
+ d 'xmlRegisterHTTPPostCallbacks')
+
+ /endif LIBXML_HTTP_ENABLED
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d xmlCheckHTTPInput...
+ d pr extproc('xmlCheckHTTPInput')
+ d like(xmlParserInputPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d ret value like(xmlParserInputPtr)
+
+ * A predefined entity loader disabling network accesses
+
+ d xmlNoNetExternalEntityLoader...
+ d pr extproc(
+ d 'xmlNoNetExternalEntityLoader')
+ d like(xmlParserInputPtr)
+ d URL * value options(*string) const char *
+ d ID * value options(*string) const char *
+ d ctxt value like(xmlParserCtxtPtr)
+
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
+ * Check xmlCanonicPath in uri.h for a better alternative.
+
+ d xmlNormalizeWindowsPath...
+ d pr * extproc('xmlNormalizeWindowsPath') xmlChar *
+ d path * value options(*string) const xmlChar *
+
+ d xmlCheckFilename...
+ d pr 10i 0 extproc('xmlCheckFilename')
+ d path * value options(*string) const char *
+
+ * Default 'file://' protocol callbacks
+
+ d xmlFileMatch pr 10i 0 extproc('xmlFileMatch')
+ d filename * value options(*string) const char *
+
+ d xmlFileOpen pr * extproc('xmlFileOpen') void *
+ d filename * value options(*string) const char *
+
+ d xmlFileRead pr 10i 0 extproc('xmlFileRead')
+ d context * value void *
+ d buffer 65535 options(*varsize)
+ d len 10i 0 value
+
+ d xmlFileClose pr 10i 0 extproc('xmlFileClose')
+ d context * value void *
+
+ * Default 'http://' protocol callbacks
+
+ /if defined(LIBXML_HTTP_ENABLED)
+ d xmlIOHTTPMatch pr 10i 0 extproc('xmlIOHTTPMatch')
+ d filename * value options(*string) const char *
+
+ d xmlIOHTTPOpen pr * extproc('xmlIOHTTPOpen') void *
+ d filename * value options(*string) const char *
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlIOHTTPOpenW pr * extproc('xmlIOHTTPOpenW') void *
+ d post_uri * value options(*string) const char *
+ d compression 10i 0 value
+ /endif LIBXML_OUTPUT_ENABLD
+
+ d xmlIOHTTPRead pr 10i 0 extproc('xmlIOHTTPRead')
+ d context * value void *
+ d buffer 65535 options(*varsize)
+ d len 10i 0 value
+
+ d xmlIOHTTPClose pr 10i 0 extproc('xmlIOHTTPClose')
+ d context * value void *
+ /endif LIBXML_HTTP_ENABLED
+
+ * Default 'ftp://' protocol callbacks
+
+ /if defined(LIBXML_FTP_ENABLED)
+ d xmlIOFTPMatch pr 10i 0 extproc('xmlIOFTPMatch')
+ d filename * value options(*string) const char *
+
+ d xmlIOFTPOpen pr * extproc('xmlIOFTPOpen') void *
+ d filename * value options(*string) const char *
+
+ d xmlIOFTPRead pr 10i 0 extproc('xmlIOFTPRead')
+ d context * value void *
+ d buffer 65535 options(*varsize)
+ d len 10i 0 value
+
+ d xmlIOFTPClose pr 10i 0 extproc('xmlIOFTPClose')
+ d context * value void *
+ /endif LIBXML_FTP_ENABLED
+
+ /endif XML_IO_H__
diff --git a/os400/libxmlrpg/xmlautomata.rpgle b/os400/libxmlrpg/xmlautomata.rpgle
new file mode 100644
index 0000000..4979725
--- /dev/null
+++ b/os400/libxmlrpg/xmlautomata.rpgle
@@ -0,0 +1,179 @@
+ * Summary: API to build regexp automata
+ * Description: the API to build regexp automata
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_AUTOMATA_H__)
+ /define XML_AUTOMATA_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+
+ /if defined(LIBXML_REGEXP_ENABLED)
+ /if defined(LIBXML_AUTOMATA_ENABLED)
+
+ /include "libxmlrpg/xmlregexp"
+
+ * xmlAutomataPtr:
+ *
+ * A libxml automata description, It can be compiled into a regexp
+
+ d xmlAutomataPtr s * based(######typedef######)
+
+ * xmlAutomataStatePtr:
+ *
+ * A state int the automata description,
+
+ d xmlAutomataStatePtr...
+ d s * based(######typedef######)
+
+ * Building API
+
+ d xmlNewAutomata pr extproc('xmlNewAutomata')
+ d like(xmlAutomataPtr)
+
+ d xmlFreeAutomata...
+ d pr extproc('xmlFreeAutomata')
+ d am value like(xmlAutomataPtr)
+
+ d xmlAutomataGetInitState...
+ d pr extproc('xmlAutomataGetInitState')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+
+ d xmlAutomataSetFinalState...
+ d pr 10i 0 extproc('xmlAutomataSetFinalState')
+ d am value like(xmlAutomataPtr)
+ d state value like(xmlAutomataStatePtr)
+
+ d xmlAutomataNewState...
+ d pr extproc('xmlAutomataNewState')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+
+ d xmlAutomataNewTransition...
+ d pr extproc('xmlAutomataNewTransition')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d data * value options(*string) void *
+
+ d xmlAutomataNewTransition2...
+ d pr extproc('xmlAutomataNewTransition2')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d token2 * value options(*string) const xmlChar *
+ d data * value options(*string) void *
+
+ d xmlAutomataNewNegTrans...
+ d pr extproc('xmlAutomataNewNegTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d token2 * value options(*string) const xmlChar *
+ d data * value options(*string) void *
+
+ d xmlAutomataNewCountTrans...
+ d pr extproc('xmlAutomataNewCountTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d min 10i 0 value
+ d max 10i 0 value
+ d data * value options(*string) void *
+
+ d xmlAutomataNewCountTrans2...
+ d pr extproc('xmlAutomataNewCountTrans2')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d token2 * value options(*string) const xmlChar *
+ d min 10i 0 value
+ d max 10i 0 value
+ d data * value options(*string) void *
+
+ d xmlAutomataNewOnceTrans...
+ d pr extproc('xmlAutomataNewOnceTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d min 10i 0 value
+ d max 10i 0 value
+ d data * value options(*string) void *
+
+ d xmlAutomataNewOnceTrans2...
+ d pr extproc('xmlAutomataNewOnceTrans2')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d token * value options(*string) const xmlChar *
+ d token2 * value options(*string) const xmlChar *
+ d min 10i 0 value
+ d max 10i 0 value
+ d data * value options(*string) void *
+
+ d xmlAutomataNewAllTrans...
+ d pr extproc('xmlAutomataNewAllTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d lax 10i 0 value
+
+ d xmlAutomataNewEpsilon...
+ d pr extproc('xmlAutomataNewEpsilon')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+
+ d xmlAutomataNewCountedTrans...
+ d pr extproc('xmlAutomataNewCountedTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d counter 10i 0 value
+
+ d xmlAutomataNewCounterTrans...
+ d pr extproc('xmlAutomataNewCounterTrans')
+ d like(xmlAutomataStatePtr)
+ d am value like(xmlAutomataPtr)
+ d from value like(xmlAutomataStatePtr)
+ d to value like(xmlAutomataStatePtr)
+ d counter 10i 0 value
+
+ d xmlAutomataNewCounter...
+ d pr 10i 0 extproc('xmlAutomataNewCounter')
+ d am value like(xmlAutomataPtr)
+ d min 10i 0 value
+ d max 10i 0 value
+
+ d xmlAutomataCompile...
+ d pr extproc('xmlAutomataCompile')
+ d like(xmlRegexpPtr)
+ d am value like(xmlAutomataPtr)
+
+ d xmlAutomataIsDeterminist...
+ d pr 10i 0 extproc('xmlAutomataIsDeterminist')
+ d am value like(xmlAutomataPtr)
+
+ /endif AUTOMATA_ENABLED
+ /endif LIBXML_REGEXP_ENABLD
+ /endif XML_AUTOMATA_H__
diff --git a/os400/libxmlrpg/xmlerror.rpgle b/os400/libxmlrpg/xmlerror.rpgle
new file mode 100644
index 0000000..b77caad
--- /dev/null
+++ b/os400/libxmlrpg/xmlerror.rpgle
@@ -0,0 +1,1681 @@
+ * Summary: error handling
+ * Description: the API used to report errors
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /include "libxmlrpg/parser"
+
+ /if not defined(XML_ERROR_H__)
+ /define XML_ERROR_H__
+
+ * xmlErrorLevel:
+ *
+ * Indicates the level of an error
+
+ d xmlErrorLevel s 10i 0 based(######typedef######) enum
+ d XML_ERR_NONE c 0
+ d XML_ERR_WARNING... A simple warning
+ d c 1
+ d XML_ERR_ERROR c 2 A recoverable error
+ d XML_ERR_FATAL c 3 A fatal error
+
+ * xmlErrorDomain:
+ *
+ * Indicates where an error may have come from
+
+ d xmlErrorDomain s 10i 0 based(######typedef######) enum
+ d XML_FROM_NONE c 0
+ d XML_FROM_PARSER... XML parser
+ d c 1
+ d XML_FROM_TREE c 2 Tree module
+ d XML_FROM_NAMESPACE... XML Namespace module
+ d c 3
+ d XML_FROM_DTD c 4 DTD validation
+ d XML_FROM_HTML c 5 HTML parser
+ d XML_FROM_MEMORY... Memory allocator
+ d c 6
+ d XML_FROM_OUTPUT... serialization code
+ d c 7
+ d XML_FROM_IO c 8 Input/Output stack
+ d XML_FROM_FTP c 9 FTP module
+ d XML_FROM_HTTP c 10 HTTP module
+ d XML_FROM_XINCLUDE... XInclude processing
+ d c 11
+ d XML_FROM_XPATH... XPath module
+ d c 12
+ d XML_FROM_XPOINTER... XPointer module
+ d c 13
+ d XML_FROM_REGEXP... Regexp module
+ d c 14
+ d XML_FROM_DATATYPE... W3C XML Schm Dtatype
+ d c 15
+ d XML_FROM_SCHEMASP... W3C XML Schm parser
+ d c 16
+ d XML_FROM_SCHEMASV... W3C XML Schm valid.
+ d c 17
+ d XML_FROM_RELAXNGP... Relax-NG parser
+ d c 18
+ d XML_FROM_RELAXNGV... Relax-NG validator
+ d c 19
+ d XML_FROM_CATALOG... Catalog module
+ d c 20
+ d XML_FROM_C14N c 21 Canonicalization
+ d XML_FROM_XSLT c 22 Engine from libxslt
+ d XML_FROM_VALID... DTD valid. w/ ctxt
+ d c 23
+ d XML_FROM_CHECK... Error check module
+ d c 24
+ d XML_FROM_WRITER... xmlwriter module
+ d c 25
+ d XML_FROM_MODULE... Dyn. loaded module
+ d c 26
+ d XML_FROM_I18N c 27 Mod hdlg char conv
+ d XML_FROM_SCHEMATRONV... Schematron valid
+ d c 28
+ d XML_FROM_BUFFER... Buffers module
+ d c 29
+ d XML_FROM_URI c 30 URI module
+
+ * xmlError:
+ *
+ * An XML Error instance.
+
+ d xmlErrorPtr s * based(######typedef######)
+
+ d xmlError ds based(xmlErrorPtr)
+ d align qualified
+ d domain 10i 0 Libpart raising err
+ d code 10i 0 Error code
+ d message * char *
+ d level like(xmlErrorLevel) Error severity
+ d file * File name
+ d line 10i 0 Line number
+ d str1 * char *
+ d str2 * char *
+ d str3 * char *
+ d int1 10i 0 Extra number info
+ d int2 10i 0 Error column
+ d ctxt * void *
+ d node * void *
+
+ * xmlParserError:
+ *
+ * This is an error that the XML (or HTML) parser can generate
+
+ d xmlParserErrors...
+ d s 10i 0 based(######typedef######) enum
+ d XML_ERR_OK c 0
+ d XML_ERR_INTERNAL_ERROR...
+ d c 1
+ d XML_ERR_NO_MEMORY...
+ d c 2
+ d XML_ERR_DOCUMENT_START...
+ d c 3
+ d XML_ERR_DOCUMENT_EMPTY...
+ d c 4
+ d XML_ERR_DOCUMENT_END...
+ d c 5
+ d XML_ERR_INVALID_HEX_CHARREF...
+ d c 6
+ d XML_ERR_INVALID_DEC_CHARREF...
+ d c 7
+ d XML_ERR_INVALID_CHARREF...
+ d c 8
+ d XML_ERR_INVALID_CHAR...
+ d c 9
+ d XML_ERR_CHARREF_AT_EOF...
+ d c 10
+ d XML_ERR_CHARREF_IN_PROLOG...
+ d c 11
+ d XML_ERR_CHARREF_IN_EPILOG...
+ d c 12
+ d XML_ERR_CHARREF_IN_DTD...
+ d c 13
+ d XML_ERR_ENTITYREF_AT_EOF...
+ d c 14
+ d XML_ERR_ENTITYREF_IN_PROLOG...
+ d c 15
+ d XML_ERR_ENTITYREF_IN_EPILOG...
+ d c 16
+ d XML_ERR_ENTITYREF_IN_DTD...
+ d c 17
+ d XML_ERR_PEREF_AT_EOF...
+ d c 18
+ d XML_ERR_PEREF_IN_PROLOG...
+ d c 19
+ d XML_ERR_PEREF_IN_EPILOG...
+ d c 20
+ d XML_ERR_PEREF_IN_INT_SUBSET...
+ d c 21
+ d XML_ERR_ENTITYREF_NO_NAME...
+ d c 22
+ d XML_ERR_ENTITYREF_SEMICOL_MISSING...
+ d c 23
+ d XML_ERR_PEREF_NO_NAME...
+ d c 24
+ d XML_ERR_PEREF_SEMICOL_MISSING...
+ d c 25
+ d XML_ERR_UNDECLARED_ENTITY...
+ d c 26
+ d XML_WAR_UNDECLARED_ENTITY...
+ d c 27
+ d XML_ERR_UNPARSED_ENTITY...
+ d c 28
+ d XML_ERR_ENTITY_IS_EXTERNAL...
+ d c 29
+ d XML_ERR_ENTITY_IS_PARAMETER...
+ d c 30
+ d XML_ERR_UNKNOWN_ENCODING...
+ d c 31
+ d XML_ERR_UNSUPPORTED_ENCODING...
+ d c 32
+ d XML_ERR_STRING_NOT_STARTED...
+ d c 33
+ d XML_ERR_STRING_NOT_CLOSED...
+ d c 34
+ d XML_ERR_NS_DECL_ERROR...
+ d c 35
+ d XML_ERR_ENTITY_NOT_STARTED...
+ d c 36
+ d XML_ERR_ENTITY_NOT_FINISHED...
+ d c 37
+ d XML_ERR_LT_IN_ATTRIBUTE...
+ d c 38
+ d XML_ERR_ATTRIBUTE_NOT_STARTED...
+ d c 39
+ d XML_ERR_ATTRIBUTE_NOT_FINISHED...
+ d c 40
+ d XML_ERR_ATTRIBUTE_WITHOUT_VALUE...
+ d c 41
+ d XML_ERR_ATTRIBUTE_REDEFINED...
+ d c 42
+ d XML_ERR_LITERAL_NOT_STARTED...
+ d c 43
+ d XML_ERR_LITERAL_NOT_FINISHED...
+ d c 44
+ d XML_ERR_COMMENT_NOT_FINISHED...
+ d c 45
+ d XML_ERR_PI_NOT_STARTED...
+ d c 46
+ d XML_ERR_PI_NOT_FINISHED...
+ d c 47
+ d XML_ERR_NOTATION_NOT_STARTED...
+ d c 48
+ d XML_ERR_NOTATION_NOT_FINISHED...
+ d c 49
+ d XML_ERR_ATTLIST_NOT_STARTED...
+ d c 50
+ d XML_ERR_ATTLIST_NOT_FINISHED...
+ d c 51
+ d XML_ERR_MIXED_NOT_STARTED...
+ d c 52
+ d XML_ERR_MIXED_NOT_FINISHED...
+ d c 53
+ d XML_ERR_ELEMCONTENT_NOT_STARTED...
+ d c 54
+ d XML_ERR_ELEMCONTENT_NOT_FINISHED...
+ d c 55
+ d XML_ERR_XMLDECL_NOT_STARTED...
+ d c 56
+ d XML_ERR_XMLDECL_NOT_FINISHED...
+ d c 57
+ d XML_ERR_CONDSEC_NOT_STARTED...
+ d c 58
+ d XML_ERR_CONDSEC_NOT_FINISHED...
+ d c 59
+ d XML_ERR_EXT_SUBSET_NOT_FINISHED...
+ d c 60
+ d XML_ERR_DOCTYPE_NOT_FINISHED...
+ d c 61
+ d XML_ERR_MISPLACED_CDATA_END...
+ d c 62
+ d XML_ERR_CDATA_NOT_FINISHED...
+ d c 63
+ d XML_ERR_RESERVED_XML_NAME...
+ d c 64
+ d XML_ERR_SPACE_REQUIRED...
+ d c 65
+ d XML_ERR_SEPARATOR_REQUIRED...
+ d c 66
+ d XML_ERR_NMTOKEN_REQUIRED...
+ d c 67
+ d XML_ERR_NAME_REQUIRED...
+ d c 68
+ d XML_ERR_PCDATA_REQUIRED...
+ d c 69
+ d XML_ERR_URI_REQUIRED...
+ d c 70
+ d XML_ERR_PUBID_REQUIRED...
+ d c 71
+ d XML_ERR_LT_REQUIRED...
+ d c 72
+ d XML_ERR_GT_REQUIRED...
+ d c 73
+ d XML_ERR_LTSLASH_REQUIRED...
+ d c 74
+ d XML_ERR_EQUAL_REQUIRED...
+ d c 75
+ d XML_ERR_TAG_NAME_MISMATCH...
+ d c 76
+ d XML_ERR_TAG_NOT_FINISHED...
+ d c 77
+ d XML_ERR_STANDALONE_VALUE...
+ d c 78
+ d XML_ERR_ENCODING_NAME...
+ d c 79
+ d XML_ERR_HYPHEN_IN_COMMENT...
+ d c 80
+ d XML_ERR_INVALID_ENCODING...
+ d c 81
+ d XML_ERR_EXT_ENTITY_STANDALONE...
+ d c 82
+ d XML_ERR_CONDSEC_INVALID...
+ d c 83
+ d XML_ERR_VALUE_REQUIRED...
+ d c 84
+ d XML_ERR_NOT_WELL_BALANCED...
+ d c 85
+ d XML_ERR_EXTRA_CONTENT...
+ d c 86
+ d XML_ERR_ENTITY_CHAR_ERROR...
+ d c 87
+ d XML_ERR_ENTITY_PE_INTERNAL...
+ d c 88
+ d XML_ERR_ENTITY_LOOP...
+ d c 89
+ d XML_ERR_ENTITY_BOUNDARY...
+ d c 90
+ d XML_ERR_INVALID_URI...
+ d c 91
+ d XML_ERR_URI_FRAGMENT...
+ d c 92
+ d XML_WAR_CATALOG_PI...
+ d c 93
+ d XML_ERR_NO_DTD...
+ d c 94
+ d XML_ERR_CONDSEC_INVALID_KEYWORD...
+ d c 95
+ d XML_ERR_VERSION_MISSING...
+ d c 96
+ d XML_WAR_UNKNOWN_VERSION...
+ d c 97
+ d XML_WAR_LANG_VALUE...
+ d c 98
+ d XML_WAR_NS_URI...
+ d c 99
+ d XML_WAR_NS_URI_RELATIVE...
+ d c 100
+ d XML_ERR_MISSING_ENCODING...
+ d c 101
+ d XML_WAR_SPACE_VALUE...
+ d c 102
+ d XML_ERR_NOT_STANDALONE...
+ d c 103
+ d XML_ERR_ENTITY_PROCESSING...
+ d c 104
+ d XML_ERR_NOTATION_PROCESSING...
+ d c 105
+ d XML_WAR_NS_COLUMN...
+ d c 106
+ d XML_WAR_ENTITY_REDEFINED...
+ d c 107
+ d XML_ERR_UNKNOWN_VERSION...
+ d c 108
+ d XML_ERR_VERSION_MISMATCH...
+ d c 109
+ d XML_ERR_NAME_TOO_LONG...
+ d c 110
+ d XML_ERR_USER_STOP...
+ d c 111
+ d XML_NS_ERR_XML_NAMESPACE...
+ d c 200
+ d XML_NS_ERR_UNDEFINED_NAMESPACE...
+ d c 201
+ d XML_NS_ERR_QNAME...
+ d c 202
+ d XML_NS_ERR_ATTRIBUTE_REDEFINED...
+ d c 203
+ d XML_NS_ERR_EMPTY...
+ d c 204
+ d XML_NS_ERR_COLON...
+ d c 205
+ d XML_DTD_ATTRIBUTE_DEFAULT...
+ d c 500
+ d XML_DTD_ATTRIBUTE_REDEFINED...
+ d c 501
+ d XML_DTD_ATTRIBUTE_VALUE...
+ d c 502
+ d XML_DTD_CONTENT_ERROR...
+ d c 503
+ d XML_DTD_CONTENT_MODEL...
+ d c 504
+ d XML_DTD_CONTENT_NOT_DETERMINIST...
+ d c 505
+ d XML_DTD_DIFFERENT_PREFIX...
+ d c 506
+ d XML_DTD_ELEM_DEFAULT_NAMESPACE...
+ d c 507
+ d XML_DTD_ELEM_NAMESPACE...
+ d c 508
+ d XML_DTD_ELEM_REDEFINED...
+ d c 509
+ d XML_DTD_EMPTY_NOTATION...
+ d c 510
+ d XML_DTD_ENTITY_TYPE...
+ d c 511
+ d XML_DTD_ID_FIXED...
+ d c 512
+ d XML_DTD_ID_REDEFINED...
+ d c 513
+ d XML_DTD_ID_SUBSET...
+ d c 514
+ d XML_DTD_INVALID_CHILD...
+ d c 515
+ d XML_DTD_INVALID_DEFAULT...
+ d c 516
+ d XML_DTD_LOAD_ERROR...
+ d c 517
+ d XML_DTD_MISSING_ATTRIBUTE...
+ d c 518
+ d XML_DTD_MIXED_CORRUPT...
+ d c 519
+ d XML_DTD_MULTIPLE_ID...
+ d c 520
+ d XML_DTD_NO_DOC...
+ d c 521
+ d XML_DTD_NO_DTD...
+ d c 522
+ d XML_DTD_NO_ELEM_NAME...
+ d c 523
+ d XML_DTD_NO_PREFIX...
+ d c 524
+ d XML_DTD_NO_ROOT...
+ d c 525
+ d XML_DTD_NOTATION_REDEFINED...
+ d c 526
+ d XML_DTD_NOTATION_VALUE...
+ d c 527
+ d XML_DTD_NOT_EMPTY...
+ d c 528
+ d XML_DTD_NOT_PCDATA...
+ d c 529
+ d XML_DTD_NOT_STANDALONE...
+ d c 530
+ d XML_DTD_ROOT_NAME...
+ d c 531
+ d XML_DTD_STANDALONE_WHITE_SPACE...
+ d c 532
+ d XML_DTD_UNKNOWN_ATTRIBUTE...
+ d c 533
+ d XML_DTD_UNKNOWN_ELEM...
+ d c 534
+ d XML_DTD_UNKNOWN_ENTITY...
+ d c 535
+ d XML_DTD_UNKNOWN_ID...
+ d c 536
+ d XML_DTD_UNKNOWN_NOTATION...
+ d c 537
+ d XML_DTD_STANDALONE_DEFAULTED...
+ d c 538
+ d XML_DTD_XMLID_VALUE...
+ d c 539
+ d XML_DTD_XMLID_TYPE...
+ d c 540
+ d XML_DTD_DUP_TOKEN...
+ d c 541
+ d XML_HTML_STRUCURE_ERROR...
+ d c 800
+ d XML_HTML_UNKNOWN_TAG...
+ d c 801
+ d XML_RNGP_ANYNAME_ATTR_ANCESTOR...
+ d c 1000
+ d XML_RNGP_ATTR_CONFLICT...
+ d c 1001
+ d XML_RNGP_ATTRIBUTE_CHILDREN...
+ d c 1002
+ d XML_RNGP_ATTRIBUTE_CONTENT...
+ d c 1003
+ d XML_RNGP_ATTRIBUTE_EMPTY...
+ d c 1004
+ d XML_RNGP_ATTRIBUTE_NOOP...
+ d c 1005
+ d XML_RNGP_CHOICE_CONTENT...
+ d c 1006
+ d XML_RNGP_CHOICE_EMPTY...
+ d c 1007
+ d XML_RNGP_CREATE_FAILURE...
+ d c 1008
+ d XML_RNGP_DATA_CONTENT...
+ d c 1009
+ d XML_RNGP_DEF_CHOICE_AND_INTERLEAVE...
+ d c 1010
+ d XML_RNGP_DEFINE_CREATE_FAILED...
+ d c 1011
+ d XML_RNGP_DEFINE_EMPTY...
+ d c 1012
+ d XML_RNGP_DEFINE_MISSING...
+ d c 1013
+ d XML_RNGP_DEFINE_NAME_MISSING...
+ d c 1014
+ d XML_RNGP_ELEM_CONTENT_EMPTY...
+ d c 1015
+ d XML_RNGP_ELEM_CONTENT_ERROR...
+ d c 1016
+ d XML_RNGP_ELEMENT_EMPTY...
+ d c 1017
+ d XML_RNGP_ELEMENT_CONTENT...
+ d c 1018
+ d XML_RNGP_ELEMENT_NAME...
+ d c 1019
+ d XML_RNGP_ELEMENT_NO_CONTENT...
+ d c 1020
+ d XML_RNGP_ELEM_TEXT_CONFLICT...
+ d c 1021
+ d XML_RNGP_EMPTY...
+ d c 1022
+ d XML_RNGP_EMPTY_CONSTRUCT...
+ d c 1023
+ d XML_RNGP_EMPTY_CONTENT...
+ d c 1024
+ d XML_RNGP_EMPTY_NOT_EMPTY...
+ d c 1025
+ d XML_RNGP_ERROR_TYPE_LIB...
+ d c 1026
+ d XML_RNGP_EXCEPT_EMPTY...
+ d c 1027
+ d XML_RNGP_EXCEPT_MISSING...
+ d c 1028
+ d XML_RNGP_EXCEPT_MULTIPLE...
+ d c 1029
+ d XML_RNGP_EXCEPT_NO_CONTENT...
+ d c 1030
+ d XML_RNGP_EXTERNALREF_EMTPY...
+ d c 1031
+ d XML_RNGP_EXTERNAL_REF_FAILURE...
+ d c 1032
+ d XML_RNGP_EXTERNALREF_RECURSE...
+ d c 1033
+ d XML_RNGP_FORBIDDEN_ATTRIBUTE...
+ d c 1034
+ d XML_RNGP_FOREIGN_ELEMENT...
+ d c 1035
+ d XML_RNGP_GRAMMAR_CONTENT...
+ d c 1036
+ d XML_RNGP_GRAMMAR_EMPTY...
+ d c 1037
+ d XML_RNGP_GRAMMAR_MISSING...
+ d c 1038
+ d XML_RNGP_GRAMMAR_NO_START...
+ d c 1039
+ d XML_RNGP_GROUP_ATTR_CONFLICT...
+ d c 1040
+ d XML_RNGP_HREF_ERROR...
+ d c 1041
+ d XML_RNGP_INCLUDE_EMPTY...
+ d c 1042
+ d XML_RNGP_INCLUDE_FAILURE...
+ d c 1043
+ d XML_RNGP_INCLUDE_RECURSE...
+ d c 1044
+ d XML_RNGP_INTERLEAVE_ADD...
+ d c 1045
+ d XML_RNGP_INTERLEAVE_CREATE_FAILED...
+ d c 1046
+ d XML_RNGP_INTERLEAVE_EMPTY...
+ d c 1047
+ d XML_RNGP_INTERLEAVE_NO_CONTENT...
+ d c 1048
+ d XML_RNGP_INVALID_DEFINE_NAME...
+ d c 1049
+ d XML_RNGP_INVALID_URI...
+ d c 1050
+ d XML_RNGP_INVALID_VALUE...
+ d c 1051
+ d XML_RNGP_MISSING_HREF...
+ d c 1052
+ d XML_RNGP_NAME_MISSING...
+ d c 1053
+ d XML_RNGP_NEED_COMBINE...
+ d c 1054
+ d XML_RNGP_NOTALLOWED_NOT_EMPTY...
+ d c 1055
+ d XML_RNGP_NSNAME_ATTR_ANCESTOR...
+ d c 1056
+ d XML_RNGP_NSNAME_NO_NS...
+ d c 1057
+ d XML_RNGP_PARAM_FORBIDDEN...
+ d c 1058
+ d XML_RNGP_PARAM_NAME_MISSING...
+ d c 1059
+ d XML_RNGP_PARENTREF_CREATE_FAILED...
+ d c 1060
+ d XML_RNGP_PARENTREF_NAME_INVALID...
+ d c 1061
+ d XML_RNGP_PARENTREF_NO_NAME...
+ d c 1062
+ d XML_RNGP_PARENTREF_NO_PARENT...
+ d c 1063
+ d XML_RNGP_PARENTREF_NOT_EMPTY...
+ d c 1064
+ d XML_RNGP_PARSE_ERROR...
+ d c 1065
+ d XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME...
+ d c 1066
+ d XML_RNGP_PAT_ATTR_ATTR...
+ d c 1067
+ d XML_RNGP_PAT_ATTR_ELEM...
+ d c 1068
+ d XML_RNGP_PAT_DATA_EXCEPT_ATTR...
+ d c 1069
+ d XML_RNGP_PAT_DATA_EXCEPT_ELEM...
+ d c 1070
+ d XML_RNGP_PAT_DATA_EXCEPT_EMPTY...
+ d c 1071
+ d XML_RNGP_PAT_DATA_EXCEPT_GROUP...
+ d c 1072
+ d XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE...
+ d c 1073
+ d XML_RNGP_PAT_DATA_EXCEPT_LIST...
+ d c 1074
+ d XML_RNGP_PAT_DATA_EXCEPT_ONEMORE...
+ d c 1075
+ d XML_RNGP_PAT_DATA_EXCEPT_REF...
+ d c 1076
+ d XML_RNGP_PAT_DATA_EXCEPT_TEXT...
+ d c 1077
+ d XML_RNGP_PAT_LIST_ATTR...
+ d c 1078
+ d XML_RNGP_PAT_LIST_ELEM...
+ d c 1079
+ d XML_RNGP_PAT_LIST_INTERLEAVE...
+ d c 1080
+ d XML_RNGP_PAT_LIST_LIST...
+ d c 1081
+ d XML_RNGP_PAT_LIST_REF...
+ d c 1082
+ d XML_RNGP_PAT_LIST_TEXT...
+ d c 1083
+ d XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME...
+ d c 1084
+ d XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME...
+ d c 1085
+ d XML_RNGP_PAT_ONEMORE_GROUP_ATTR...
+ d c 1086
+ d XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR...
+ d c 1087
+ d XML_RNGP_PAT_START_ATTR...
+ d c 1088
+ d XML_RNGP_PAT_START_DATA...
+ d c 1089
+ d XML_RNGP_PAT_START_EMPTY...
+ d c 1090
+ d XML_RNGP_PAT_START_GROUP...
+ d c 1091
+ d XML_RNGP_PAT_START_INTERLEAVE...
+ d c 1092
+ d XML_RNGP_PAT_START_LIST...
+ d c 1093
+ d XML_RNGP_PAT_START_ONEMORE...
+ d c 1094
+ d XML_RNGP_PAT_START_TEXT...
+ d c 1095
+ d XML_RNGP_PAT_START_VALUE...
+ d c 1096
+ d XML_RNGP_PREFIX_UNDEFINED...
+ d c 1097
+ d XML_RNGP_REF_CREATE_FAILED...
+ d c 1098
+ d XML_RNGP_REF_CYCLE...
+ d c 1099
+ d XML_RNGP_REF_NAME_INVALID...
+ d c 1100
+ d XML_RNGP_REF_NO_DEF...
+ d c 1101
+ d XML_RNGP_REF_NO_NAME...
+ d c 1102
+ d XML_RNGP_REF_NOT_EMPTY...
+ d c 1103
+ d XML_RNGP_START_CHOICE_AND_INTERLEAVE...
+ d c 1104
+ d XML_RNGP_START_CONTENT...
+ d c 1105
+ d XML_RNGP_START_EMPTY...
+ d c 1106
+ d XML_RNGP_START_MISSING...
+ d c 1107
+ d XML_RNGP_TEXT_EXPECTED...
+ d c 1108
+ d XML_RNGP_TEXT_HAS_CHILD...
+ d c 1109
+ d XML_RNGP_TYPE_MISSING...
+ d c 1110
+ d XML_RNGP_TYPE_NOT_FOUND...
+ d c 1111
+ d XML_RNGP_TYPE_VALUE...
+ d c 1112
+ d XML_RNGP_UNKNOWN_ATTRIBUTE...
+ d c 1113
+ d XML_RNGP_UNKNOWN_COMBINE...
+ d c 1114
+ d XML_RNGP_UNKNOWN_CONSTRUCT...
+ d c 1115
+ d XML_RNGP_UNKNOWN_TYPE_LIB...
+ d c 1116
+ d XML_RNGP_URI_FRAGMENT...
+ d c 1117
+ d XML_RNGP_URI_NOT_ABSOLUTE...
+ d c 1118
+ d XML_RNGP_VALUE_EMPTY...
+ d c 1119
+ d XML_RNGP_VALUE_NO_CONTENT...
+ d c 1120
+ d XML_RNGP_XMLNS_NAME...
+ d c 1121
+ d XML_RNGP_XML_NS...
+ d c 1122
+ d XML_XPATH_EXPRESSION_OK...
+ d c 1200
+ d XML_XPATH_NUMBER_ERROR...
+ d c 1201
+ d XML_XPATH_UNFINISHED_LITERAL_ERROR...
+ d c 1202
+ d XML_XPATH_START_LITERAL_ERROR...
+ d c 1203
+ d XML_XPATH_VARIABLE_REF_ERROR...
+ d c 1204
+ d XML_XPATH_UNDEF_VARIABLE_ERROR...
+ d c 1205
+ d XML_XPATH_INVALID_PREDICATE_ERROR...
+ d c 1206
+ d XML_XPATH_EXPR_ERROR...
+ d c 1207
+ d XML_XPATH_UNCLOSED_ERROR...
+ d c 1208
+ d XML_XPATH_UNKNOWN_FUNC_ERROR...
+ d c 1209
+ d XML_XPATH_INVALID_OPERAND...
+ d c 1210
+ d XML_XPATH_INVALID_TYPE...
+ d c 1211
+ d XML_XPATH_INVALID_ARITY...
+ d c 1212
+ d XML_XPATH_INVALID_CTXT_SIZE...
+ d c 1213
+ d XML_XPATH_INVALID_CTXT_POSITION...
+ d c 1214
+ d XML_XPATH_MEMORY_ERROR...
+ d c 1215
+ d XML_XPTR_SYNTAX_ERROR...
+ d c 1216
+ d XML_XPTR_RESOURCE_ERROR...
+ d c 1217
+ d XML_XPTR_SUB_RESOURCE_ERROR...
+ d c 1218
+ d XML_XPATH_UNDEF_PREFIX_ERROR...
+ d c 1219
+ d XML_XPATH_ENCODING_ERROR...
+ d c 1220
+ d XML_XPATH_INVALID_CHAR_ERROR...
+ d c 1231
+ d XML_TREE_INVALID_HEX...
+ d c 1300
+ d XML_TREE_INVALID_DEC...
+ d c 1301
+ d XML_TREE_UNTERMINATED_ENTITY...
+ d c 1302
+ d XML_TREE_NOT_UTF8...
+ d c 1303
+ d XML_SAVE_NOT_UTF8...
+ d c 1400
+ d XML_SAVE_CHAR_INVALID...
+ d c 1401
+ d XML_SAVE_NO_DOCTYPE...
+ d c 1402
+ d XML_SAVE_UNKNOWN_ENCODING...
+ d c 1403
+ d XML_REGEXP_COMPILE_ERROR...
+ d c 1403
+ d XML_IO_UNKNOWN...
+ d c 1500
+ d XML_IO_EACCES c 1501
+ d XML_IO_EAGAIN c 1502
+ d XML_IO_EBADF c 1503
+ d XML_IO_EBADMSG...
+ d c 1504
+ d XML_IO_EBUSY c 1505
+ d XML_IO_ECANCELED...
+ d c 1506
+ d XML_IO_ECHILD c 1507
+ d XML_IO_EDEADLK...
+ d c 1508
+ d XML_IO_EDOM c 1509
+ d XML_IO_EEXIST c 1510
+ d XML_IO_EFAULT c 1511
+ d XML_IO_EFBIG c 1512
+ d XML_IO_EINPROGRESS...
+ d c 1513
+ d XML_IO_EINTR c 1514
+ d XML_IO_EINVAL c 1515
+ d XML_IO_EIO c 1516
+ d XML_IO_EISDIR c 1517
+ d XML_IO_EMFILE c 1518
+ d XML_IO_EMLINK c 1519
+ d XML_IO_EMSGSIZE...
+ d c 1520
+ d XML_IO_ENAMETOOLONG...
+ d c 1521
+ d XML_IO_ENFILE c 1522
+ d XML_IO_ENODEV c 1523
+ d XML_IO_ENOENT c 1524
+ d XML_IO_ENOEXEC...
+ d c 1525
+ d XML_IO_ENOLCK c 1526
+ d XML_IO_ENOMEM c 1527
+ d XML_IO_ENOSPC c 1528
+ d XML_IO_ENOSYS c 1529
+ d XML_IO_ENOTDIR...
+ d c 1530
+ d XML_IO_ENOTEMPTY...
+ d c 1531
+ d XML_IO_ENOTSUP...
+ d c 1532
+ d XML_IO_ENOTTY c 1533
+ d XML_IO_ENXIO c 1534
+ d XML_IO_EPERM c 1535
+ d XML_IO_EPIPE c 1536
+ d XML_IO_ERANGE c 1537
+ d XML_IO_EROFS c 1538
+ d XML_IO_ESPIPE c 1539
+ d XML_IO_ESRCH c 1540
+ d XML_IO_ETIMEDOUT...
+ d c 1541
+ d XML_IO_EXDEV c 1542
+ d XML_IO_NETWORK_ATTEMPT...
+ d c 1543
+ d XML_IO_ENCODER...
+ d c 1544
+ d XML_IO_FLUSH c 1545
+ d XML_IO_WRITE c 1546
+ d XML_IO_NO_INPUT...
+ d c 1547
+ d XML_IO_BUFFER_FULL...
+ d c 1548
+ d XML_IO_LOAD_ERROR...
+ d c 1549
+ d XML_IO_ENOTSOCK...
+ d c 1550
+ d XML_IO_EISCONN...
+ d c 1551
+ d XML_IO_ECONNREFUSED...
+ d c 1552
+ d XML_IO_ENETUNREACH...
+ d c 1553
+ d XML_IO_EADDRINUSE...
+ d c 1554
+ d XML_IO_EALREADY...
+ d c 1555
+ d XML_IO_EAFNOSUPPORT...
+ d c 1556
+ d XML_XINCLUDE_RECURSION...
+ d c 1600
+ d XML_XINCLUDE_PARSE_VALUE...
+ d c 1601
+ d XML_XINCLUDE_ENTITY_DEF_MISMATCH...
+ d c 1602
+ d XML_XINCLUDE_NO_HREF...
+ d c 1603
+ d XML_XINCLUDE_NO_FALLBACK...
+ d c 1604
+ d XML_XINCLUDE_HREF_URI...
+ d c 1605
+ d XML_XINCLUDE_TEXT_FRAGMENT...
+ d c 1606
+ d XML_XINCLUDE_TEXT_DOCUMENT...
+ d c 1607
+ d XML_XINCLUDE_INVALID_CHAR...
+ d c 1608
+ d XML_XINCLUDE_BUILD_FAILED...
+ d c 1609
+ d XML_XINCLUDE_UNKNOWN_ENCODING...
+ d c 1610
+ d XML_XINCLUDE_MULTIPLE_ROOT...
+ d c 1611
+ d XML_XINCLUDE_XPTR_FAILED...
+ d c 1612
+ d XML_XINCLUDE_XPTR_RESULT...
+ d c 1613
+ d XML_XINCLUDE_INCLUDE_IN_INCLUDE...
+ d c 1614
+ d XML_XINCLUDE_FALLBACKS_IN_INCLUDE...
+ d c 1615
+ d XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE...
+ d c 1616
+ d XML_XINCLUDE_DEPRECATED_NS...
+ d c 1617
+ d XML_XINCLUDE_FRAGMENT_ID...
+ d c 1618
+ d XML_CATALOG_MISSING_ATTR...
+ d c 1650
+ d XML_CATALOG_ENTRY_BROKEN...
+ d c 1651
+ d XML_CATALOG_PREFER_VALUE...
+ d c 1652
+ d XML_CATALOG_NOT_CATALOG...
+ d c 1653
+ d XML_CATALOG_RECURSION...
+ d c 1654
+ d XML_SCHEMAP_PREFIX_UNDEFINED...
+ d c 1700
+ d XML_SCHEMAP_ATTRFORMDEFAULT_VALUE...
+ d c 1701
+ d XML_SCHEMAP_ATTRGRP_NONAME_NOREF...
+ d c 1702
+ d XML_SCHEMAP_ATTR_NONAME_NOREF...
+ d c 1703
+ d XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF...
+ d c 1704
+ d XML_SCHEMAP_ELEMFORMDEFAULT_VALUE...
+ d c 1705
+ d XML_SCHEMAP_ELEM_NONAME_NOREF...
+ d c 1706
+ d XML_SCHEMAP_EXTENSION_NO_BASE...
+ d c 1707
+ d XML_SCHEMAP_FACET_NO_VALUE...
+ d c 1708
+ d XML_SCHEMAP_FAILED_BUILD_IMPORT...
+ d c 1709
+ d XML_SCHEMAP_GROUP_NONAME_NOREF...
+ d c 1710
+ d XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI...
+ d c 1711
+ d XML_SCHEMAP_IMPORT_REDEFINE_NSNAME...
+ d c 1712
+ d XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI...
+ d c 1713
+ d XML_SCHEMAP_INVALID_BOOLEAN...
+ d c 1714
+ d XML_SCHEMAP_INVALID_ENUM...
+ d c 1715
+ d XML_SCHEMAP_INVALID_FACET...
+ d c 1716
+ d XML_SCHEMAP_INVALID_FACET_VALUE...
+ d c 1717
+ d XML_SCHEMAP_INVALID_MAXOCCURS...
+ d c 1718
+ d XML_SCHEMAP_INVALID_MINOCCURS...
+ d c 1719
+ d XML_SCHEMAP_INVALID_REF_AND_SUBTYPE...
+ d c 1720
+ d XML_SCHEMAP_INVALID_WHITE_SPACE...
+ d c 1721
+ d XML_SCHEMAP_NOATTR_NOREF...
+ d c 1722
+ d XML_SCHEMAP_NOTATION_NO_NAME...
+ d c 1723
+ d XML_SCHEMAP_NOTYPE_NOREF...
+ d c 1724
+ d XML_SCHEMAP_REF_AND_SUBTYPE...
+ d c 1725
+ d XML_SCHEMAP_RESTRICTION_NONAME_NOREF...
+ d c 1726
+ d XML_SCHEMAP_SIMPLETYPE_NONAME...
+ d c 1727
+ d XML_SCHEMAP_TYPE_AND_SUBTYPE...
+ d c 1728
+ d XML_SCHEMAP_UNKNOWN_ALL_CHILD...
+ d c 1729
+ d XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD...
+ d c 1730
+ d XML_SCHEMAP_UNKNOWN_ATTR_CHILD...
+ d c 1731
+ d XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD...
+ d c 1732
+ d XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP...
+ d c 1733
+ d XML_SCHEMAP_UNKNOWN_BASE_TYPE...
+ d c 1734
+ d XML_SCHEMAP_UNKNOWN_CHOICE_CHILD...
+ d c 1735
+ d XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD...
+ d c 1736
+ d XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD...
+ d c 1737
+ d XML_SCHEMAP_UNKNOWN_ELEM_CHILD...
+ d c 1738
+ d XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD...
+ d c 1739
+ d XML_SCHEMAP_UNKNOWN_FACET_CHILD...
+ d c 1740
+ d XML_SCHEMAP_UNKNOWN_FACET_TYPE...
+ d c 1741
+ d XML_SCHEMAP_UNKNOWN_GROUP_CHILD...
+ d c 1742
+ d XML_SCHEMAP_UNKNOWN_IMPORT_CHILD...
+ d c 1743
+ d XML_SCHEMAP_UNKNOWN_LIST_CHILD...
+ d c 1744
+ d XML_SCHEMAP_UNKNOWN_NOTATION_CHILD...
+ d c 1745
+ d XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD...
+ d c 1746
+ d XML_SCHEMAP_UNKNOWN_REF...
+ d c 1747
+ d XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD...
+ d c 1748
+ d XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD...
+ d c 1749
+ d XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD...
+ d c 1750
+ d XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD...
+ d c 1751
+ d XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD...
+ d c 1752
+ d XML_SCHEMAP_UNKNOWN_TYPE...
+ d c 1753
+ d XML_SCHEMAP_UNKNOWN_UNION_CHILD...
+ d c 1754
+ d XML_SCHEMAP_ELEM_DEFAULT_FIXED...
+ d c 1755
+ d XML_SCHEMAP_REGEXP_INVALID...
+ d c 1756
+ d XML_SCHEMAP_FAILED_LOAD...
+ d c 1757
+ d XML_SCHEMAP_NOTHING_TO_PARSE...
+ d c 1758
+ d XML_SCHEMAP_NOROOT...
+ d c 1759
+ d XML_SCHEMAP_REDEFINED_GROUP...
+ d c 1760
+ d XML_SCHEMAP_REDEFINED_TYPE...
+ d c 1761
+ d XML_SCHEMAP_REDEFINED_ELEMENT...
+ d c 1762
+ d XML_SCHEMAP_REDEFINED_ATTRGROUP...
+ d c 1763
+ d XML_SCHEMAP_REDEFINED_ATTR...
+ d c 1764
+ d XML_SCHEMAP_REDEFINED_NOTATION...
+ d c 1765
+ d XML_SCHEMAP_FAILED_PARSE...
+ d c 1766
+ d XML_SCHEMAP_UNKNOWN_PREFIX...
+ d c 1767
+ d XML_SCHEMAP_DEF_AND_PREFIX...
+ d c 1768
+ d XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD...
+ d c 1769
+ d XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI...
+ d c 1770
+ d XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI...
+ d c 1771
+ d XML_SCHEMAP_NOT_SCHEMA...
+ d c 1772
+ d XML_SCHEMAP_UNKNOWN_MEMBER_TYPE...
+ d c 1773
+ d XML_SCHEMAP_INVALID_ATTR_USE...
+ d c 1774
+ d XML_SCHEMAP_RECURSIVE...
+ d c 1775
+ d XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE...
+ d c 1776
+ d XML_SCHEMAP_INVALID_ATTR_COMBINATION...
+ d c 1777
+ d XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION...
+ d c 1778
+ d XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD...
+ d c 1779
+ d XML_SCHEMAP_INVALID_ATTR_NAME...
+ d c 1780
+ d XML_SCHEMAP_REF_AND_CONTENT...
+ d c 1781
+ d XML_SCHEMAP_CT_PROPS_CORRECT_1...
+ d c 1782
+ d XML_SCHEMAP_CT_PROPS_CORRECT_2...
+ d c 1783
+ d XML_SCHEMAP_CT_PROPS_CORRECT_3...
+ d c 1784
+ d XML_SCHEMAP_CT_PROPS_CORRECT_4...
+ d c 1785
+ d XML_SCHEMAP_CT_PROPS_CORRECT_5...
+ d c 1786
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1...
+ d c 1787
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1...
+ d c 1788
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2...
+ d c 1789
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2...
+ d c 1790
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3...
+ d c 1791
+ d XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER...
+ d c 1792
+ d XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE...
+ d c 1793
+ d XML_SCHEMAP_UNION_NOT_EXPRESSIBLE...
+ d c 1794
+ d XML_SCHEMAP_SRC_IMPORT_3_1...
+ d c 1795
+ d XML_SCHEMAP_SRC_IMPORT_3_2...
+ d c 1796
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1...
+ d c 1797
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2...
+ d c 1798
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3...
+ d c 1799
+ d XML_SCHEMAP_COS_CT_EXTENDS_1_3...
+ d c 1800
+ d XML_SCHEMAV_NOROOT...
+ d c 1801
+ d XML_SCHEMAV_UNDECLAREDELEM...
+ d c 1802
+ d XML_SCHEMAV_NOTTOPLEVEL...
+ d c 1803
+ d XML_SCHEMAV_MISSING...
+ d c 1804
+ d XML_SCHEMAV_WRONGELEM...
+ d c 1805
+ d XML_SCHEMAV_NOTYPE...
+ d c 1806
+ d XML_SCHEMAV_NOROLLBACK...
+ d c 1807
+ d XML_SCHEMAV_ISABSTRACT...
+ d c 1808
+ d XML_SCHEMAV_NOTEMPTY...
+ d c 1809
+ d XML_SCHEMAV_ELEMCONT...
+ d c 1810
+ d XML_SCHEMAV_HAVEDEFAULT...
+ d c 1811
+ d XML_SCHEMAV_NOTNILLABLE...
+ d c 1812
+ d XML_SCHEMAV_EXTRACONTENT...
+ d c 1813
+ d XML_SCHEMAV_INVALIDATTR...
+ d c 1814
+ d XML_SCHEMAV_INVALIDELEM...
+ d c 1815
+ d XML_SCHEMAV_NOTDETERMINIST...
+ d c 1816
+ d XML_SCHEMAV_CONSTRUCT...
+ d c 1817
+ d XML_SCHEMAV_INTERNAL...
+ d c 1818
+ d XML_SCHEMAV_NOTSIMPLE...
+ d c 1819
+ d XML_SCHEMAV_ATTRUNKNOWN...
+ d c 1820
+ d XML_SCHEMAV_ATTRINVALID...
+ d c 1821
+ d XML_SCHEMAV_VALUE...
+ d c 1822
+ d XML_SCHEMAV_FACET...
+ d c 1823
+ d XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1...
+ d c 1824
+ d XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2...
+ d c 1825
+ d XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3...
+ d c 1826
+ d XML_SCHEMAV_CVC_TYPE_3_1_1...
+ d c 1827
+ d XML_SCHEMAV_CVC_TYPE_3_1_2...
+ d c 1828
+ d XML_SCHEMAV_CVC_FACET_VALID...
+ d c 1829
+ d XML_SCHEMAV_CVC_LENGTH_VALID...
+ d c 1830
+ d XML_SCHEMAV_CVC_MINLENGTH_VALID...
+ d c 1831
+ d XML_SCHEMAV_CVC_MAXLENGTH_VALID...
+ d c 1832
+ d XML_SCHEMAV_CVC_MININCLUSIVE_VALID...
+ d c 1833
+ d XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID...
+ d c 1834
+ d XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID...
+ d c 1835
+ d XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID...
+ d c 1836
+ d XML_SCHEMAV_CVC_TOTALDIGITS_VALID...
+ d c 1837
+ d XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID...
+ d c 1838
+ d XML_SCHEMAV_CVC_PATTERN_VALID...
+ d c 1839
+ d XML_SCHEMAV_CVC_ENUMERATION_VALID...
+ d c 1840
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1...
+ d c 1841
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2...
+ d c 1842
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3...
+ d c 1843
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4...
+ d c 1844
+ d XML_SCHEMAV_CVC_ELT_1...
+ d c 1845
+ d XML_SCHEMAV_CVC_ELT_2...
+ d c 1846
+ d XML_SCHEMAV_CVC_ELT_3_1...
+ d c 1847
+ d XML_SCHEMAV_CVC_ELT_3_2_1...
+ d c 1848
+ d XML_SCHEMAV_CVC_ELT_3_2_2...
+ d c 1849
+ d XML_SCHEMAV_CVC_ELT_4_1...
+ d c 1850
+ d XML_SCHEMAV_CVC_ELT_4_2...
+ d c 1851
+ d XML_SCHEMAV_CVC_ELT_4_3...
+ d c 1852
+ d XML_SCHEMAV_CVC_ELT_5_1_1...
+ d c 1853
+ d XML_SCHEMAV_CVC_ELT_5_1_2...
+ d c 1854
+ d XML_SCHEMAV_CVC_ELT_5_2_1...
+ d c 1855
+ d XML_SCHEMAV_CVC_ELT_5_2_2_1...
+ d c 1856
+ d XML_SCHEMAV_CVC_ELT_5_2_2_2_1...
+ d c 1857
+ d XML_SCHEMAV_CVC_ELT_5_2_2_2_2...
+ d c 1858
+ d XML_SCHEMAV_CVC_ELT_6...
+ d c 1859
+ d XML_SCHEMAV_CVC_ELT_7...
+ d c 1860
+ d XML_SCHEMAV_CVC_ATTRIBUTE_1...
+ d c 1861
+ d XML_SCHEMAV_CVC_ATTRIBUTE_2...
+ d c 1862
+ d XML_SCHEMAV_CVC_ATTRIBUTE_3...
+ d c 1863
+ d XML_SCHEMAV_CVC_ATTRIBUTE_4...
+ d c 1864
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1...
+ d c 1865
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1...
+ d c 1866
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2...
+ d c 1867
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_4...
+ d c 1868
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1...
+ d c 1869
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2...
+ d c 1870
+ d XML_SCHEMAV_ELEMENT_CONTENT...
+ d c 1871
+ d XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING...
+ d c 1872
+ d XML_SCHEMAV_CVC_COMPLEX_TYPE_1...
+ d c 1873
+ d XML_SCHEMAV_CVC_AU...
+ d c 1874
+ d XML_SCHEMAV_CVC_TYPE_1...
+ d c 1875
+ d XML_SCHEMAV_CVC_TYPE_2...
+ d c 1876
+ d XML_SCHEMAV_CVC_IDC...
+ d c 1877
+ d XML_SCHEMAV_CVC_WILDCARD...
+ d c 1878
+ d XML_SCHEMAV_MISC...
+ d c 1879
+ d XML_XPTR_UNKNOWN_SCHEME...
+ d c 1900
+ d XML_XPTR_CHILDSEQ_START...
+ d c 1901
+ d XML_XPTR_EVAL_FAILED...
+ d c 1902
+ d XML_XPTR_EXTRA_OBJECTS...
+ d c 1903
+ d XML_C14N_CREATE_CTXT...
+ d c 1950
+ d XML_C14N_REQUIRES_UTF8...
+ d c 1951
+ d XML_C14N_CREATE_STACK...
+ d c 1952
+ d XML_C14N_INVALID_NODE...
+ d c 1953
+ d XML_C14N_UNKNOW_NODE...
+ d c 1954
+ d XML_C14N_RELATIVE_NAMESPACE...
+ d c 1955
+ d XML_FTP_PASV_ANSWER...
+ d c 2000
+ d XML_FTP_EPSV_ANSWER...
+ d c 2001
+ d XML_FTP_ACCNT...
+ d c 2002
+ d XML_FTP_URL_SYNTAX...
+ d c 2003
+ d XML_HTTP_URL_SYNTAX...
+ d c 2020
+ d XML_HTTP_USE_IP...
+ d c 2021
+ d XML_HTTP_UNKNOWN_HOST...
+ d c 2022
+ d XML_SCHEMAP_SRC_SIMPLE_TYPE_1...
+ d c 3000
+ d XML_SCHEMAP_SRC_SIMPLE_TYPE_2...
+ d c 3001
+ d XML_SCHEMAP_SRC_SIMPLE_TYPE_3...
+ d c 3002
+ d XML_SCHEMAP_SRC_SIMPLE_TYPE_4...
+ d c 3003
+ d XML_SCHEMAP_SRC_RESOLVE...
+ d c 3004
+ d XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE...
+ d c 3005
+ d XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE...
+ d c 3006
+ d XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES...
+ d c 3007
+ d XML_SCHEMAP_ST_PROPS_CORRECT_1...
+ d c 3008
+ d XML_SCHEMAP_ST_PROPS_CORRECT_2...
+ d c 3009
+ d XML_SCHEMAP_ST_PROPS_CORRECT_3...
+ d c 3010
+ d XML_SCHEMAP_COS_ST_RESTRICTS_1_1...
+ d c 3011
+ d XML_SCHEMAP_COS_ST_RESTRICTS_1_2...
+ d c 3012
+ d XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1...
+ d c 3013
+ d XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2...
+ d c 3014
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_1...
+ d c 3015
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1...
+ d c 3016
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2...
+ d c 3017
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1...
+ d c 3018
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2...
+ d c 3019
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3...
+ d c 3020
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4...
+ d c 3021
+ d XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5...
+ d c 3022
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_1...
+ d c 3023
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1...
+ d c 3024
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2...
+ d c 3025
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2...
+ d c 3026
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1...
+ d c 3027
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3...
+ d c 3028
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4...
+ d c 3029
+ d XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5...
+ d c 3030
+ d XML_SCHEMAP_COS_ST_DERIVED_OK_2_1...
+ d c 3031
+ d XML_SCHEMAP_COS_ST_DERIVED_OK_2_2...
+ d c 3032
+ d XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED...
+ d c 3033
+ d XML_SCHEMAP_S4S_ELEM_MISSING...
+ d c 3034
+ d XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED...
+ d c 3035
+ d XML_SCHEMAP_S4S_ATTR_MISSING...
+ d c 3036
+ d XML_SCHEMAP_S4S_ATTR_INVALID_VALUE...
+ d c 3037
+ d XML_SCHEMAP_SRC_ELEMENT_1...
+ d c 3038
+ d XML_SCHEMAP_SRC_ELEMENT_2_1...
+ d c 3039
+ d XML_SCHEMAP_SRC_ELEMENT_2_2...
+ d c 3040
+ d XML_SCHEMAP_SRC_ELEMENT_3...
+ d c 3041
+ d XML_SCHEMAP_P_PROPS_CORRECT_1...
+ d c 3042
+ d XML_SCHEMAP_P_PROPS_CORRECT_2_1...
+ d c 3043
+ d XML_SCHEMAP_P_PROPS_CORRECT_2_2...
+ d c 3044
+ d XML_SCHEMAP_E_PROPS_CORRECT_2...
+ d c 3045
+ d XML_SCHEMAP_E_PROPS_CORRECT_3...
+ d c 3046
+ d XML_SCHEMAP_E_PROPS_CORRECT_4...
+ d c 3047
+ d XML_SCHEMAP_E_PROPS_CORRECT_5...
+ d c 3048
+ d XML_SCHEMAP_E_PROPS_CORRECT_6...
+ d c 3049
+ d XML_SCHEMAP_SRC_INCLUDE...
+ d c 3050
+ d XML_SCHEMAP_SRC_ATTRIBUTE_1...
+ d c 3051
+ d XML_SCHEMAP_SRC_ATTRIBUTE_2...
+ d c 3052
+ d XML_SCHEMAP_SRC_ATTRIBUTE_3_1...
+ d c 3053
+ d XML_SCHEMAP_SRC_ATTRIBUTE_3_2...
+ d c 3054
+ d XML_SCHEMAP_SRC_ATTRIBUTE_4...
+ d c 3055
+ d XML_SCHEMAP_NO_XMLNS...
+ d c 3056
+ d XML_SCHEMAP_NO_XSI...
+ d c 3057
+ d XML_SCHEMAP_COS_VALID_DEFAULT_1...
+ d c 3058
+ d XML_SCHEMAP_COS_VALID_DEFAULT_2_1...
+ d c 3059
+ d XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1...
+ d c 3060
+ d XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2...
+ d c 3061
+ d XML_SCHEMAP_CVC_SIMPLE_TYPE...
+ d c 3062
+ d XML_SCHEMAP_COS_CT_EXTENDS_1_1...
+ d c 3063
+ d XML_SCHEMAP_SRC_IMPORT_1_1...
+ d c 3064
+ d XML_SCHEMAP_SRC_IMPORT_1_2...
+ d c 3065
+ d XML_SCHEMAP_SRC_IMPORT_2...
+ d c 3066
+ d XML_SCHEMAP_SRC_IMPORT_2_1...
+ d c 3067
+ d XML_SCHEMAP_SRC_IMPORT_2_2...
+ d c 3068
+ d XML_SCHEMAP_INTERNAL... Non W3C
+ d c 3069
+ d XML_SCHEMAP_NOT_DETERMINISTIC...
+ d c 3070
+ d XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1...
+ d c 3071
+ d XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2...
+ d c 3072
+ d XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3...
+ d c 3073
+ d XML_SCHEMAP_MG_PROPS_CORRECT_1...
+ d c 3074
+ d XML_SCHEMAP_MG_PROPS_CORRECT_2...
+ d c 3075
+ d XML_SCHEMAP_SRC_CT_1...
+ d c 3076
+ d XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3...
+ d c 3077
+ d XML_SCHEMAP_AU_PROPS_CORRECT_2...
+ d c 3078
+ d XML_SCHEMAP_A_PROPS_CORRECT_2...
+ d c 3079
+ d XML_SCHEMAP_C_PROPS_CORRECT...
+ d c 3080
+ d XML_SCHEMAP_SRC_REDEFINE...
+ d c 3081
+ d XML_SCHEMAP_SRC_IMPORT...
+ d c 3082
+ d XML_SCHEMAP_WARN_SKIP_SCHEMA...
+ d c 3083
+ d XML_SCHEMAP_WARN_UNLOCATED_SCHEMA...
+ d c 3084
+ d XML_SCHEMAP_WARN_ATTR_REDECL_PROH...
+ d c 3085
+ d XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH...
+ d c 3086
+ d XML_SCHEMAP_AG_PROPS_CORRECT...
+ d c 3087
+ d XML_SCHEMAP_COS_CT_EXTENDS_1_2...
+ d c 3088
+ d XML_SCHEMAP_AU_PROPS_CORRECT...
+ d c 3089
+ d XML_SCHEMAP_A_PROPS_CORRECT_3...
+ d c 3090
+ d XML_SCHEMAP_COS_ALL_LIMITED...
+ d c 3091
+ d XML_SCHEMATRONV_ASSERT...
+ d c 4000
+ d XML_SCHEMATRONV_REPORT...
+ d c 4001
+ d XML_MODULE_OPEN...
+ d c 4900
+ d XML_MODULE_CLOSE...
+ d c 4901
+ d XML_CHECK_FOUND_ELEMENT...
+ d c 5000
+ d XML_CHECK_FOUND_ATTRIBUTE...
+ d c 5001
+ d XML_CHECK_FOUND_TEXT...
+ d c 5002
+ d XML_CHECK_FOUND_CDATA...
+ d c 5003
+ d XML_CHECK_FOUND_ENTITYREF...
+ d c 5004
+ d XML_CHECK_FOUND_ENTITY...
+ d c 5005
+ d XML_CHECK_FOUND_PI...
+ d c 5006
+ d XML_CHECK_FOUND_COMMENT...
+ d c 5007
+ d XML_CHECK_FOUND_DOCTYPE...
+ d c 5008
+ d XML_CHECK_FOUND_FRAGMENT...
+ d c 5009
+ d XML_CHECK_FOUND_NOTATION...
+ d c 5010
+ d XML_CHECK_UNKNOWN_NODE...
+ d c 5011
+ d XML_CHECK_ENTITY_TYPE...
+ d c 5012
+ d XML_CHECK_NO_PARENT...
+ d c 5013
+ d XML_CHECK_NO_DOC...
+ d c 5014
+ d XML_CHECK_NO_NAME...
+ d c 5015
+ d XML_CHECK_NO_ELEM...
+ d c 5016
+ d XML_CHECK_WRONG_DOC...
+ d c 5017
+ d XML_CHECK_NO_PREV...
+ d c 5018
+ d XML_CHECK_WRONG_PREV...
+ d c 5019
+ d XML_CHECK_NO_NEXT...
+ d c 5020
+ d XML_CHECK_WRONG_NEXT...
+ d c 5021
+ d XML_CHECK_NOT_DTD...
+ d c 5022
+ d XML_CHECK_NOT_ATTR...
+ d c 5023
+ d XML_CHECK_NOT_ATTR_DECL...
+ d c 5024
+ d XML_CHECK_NOT_ELEM_DECL...
+ d c 5025
+ d XML_CHECK_NOT_ENTITY_DECL...
+ d c 5026
+ d XML_CHECK_NOT_NS_DECL...
+ d c 5027
+ d XML_CHECK_NO_HREF...
+ d c 5028
+ d XML_CHECK_WRONG_PARENT...
+ d c 5029
+ d XML_CHECK_NS_SCOPE...
+ d c 5030
+ d XML_CHECK_NS_ANCESTOR...
+ d c 5031
+ d XML_CHECK_NOT_UTF8...
+ d c 5032
+ d XML_CHECK_NO_DICT...
+ d c 5033
+ d XML_CHECK_NOT_NCNAME...
+ d c 5034
+ d XML_CHECK_OUTSIDE_DICT...
+ d c 5035
+ d XML_CHECK_WRONG_NAME...
+ d c 5036
+ d XML_CHECK_NAME_NOT_NULL...
+ d c 5037
+ d XML_I18N_NO_NAME...
+ d c 6000
+ d XML_I18N_NO_HANDLER...
+ d c 6001
+ d XML_I18N_EXCESS_HANDLER...
+ d c 6002
+ d XML_I18N_CONV_FAILED...
+ d c 6003
+ d XML_I18N_NO_OUTPUT...
+ d c 6004
+ d XML_BUF_OVERFLOW...
+ d c 7000
+
+ * xmlGenericErrorFunc:
+ * @ctx: a parsing context
+ * @msg: the message
+ * @...: the extra arguments of the varags to format the message
+ *
+ * Signature of the function to use when there is an error and
+ * no parsing or validity context available .
+
+ d xmlGenericErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+ * @error: the error being raised.
+ *
+ * Signature of the function to use when there is an error and
+ * the module handles the new error reporting mechanism.
+
+ d xmlStructuredErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+
+ d xmlSetGenericErrorFunc...
+ d pr extproc('xmlSetGenericErrorFunc')
+ d ctx * value void *
+ d handler value like(xmlGenericErrorFunc)
+
+ d initGenericErrorDefaultFunc...
+ d pr extproc(
+ d 'initGenericErrorDefaultFunc')
+ d handler like(xmlGenericErrorFunc)
+
+ d xmlSetStructuredErrorFunc...
+ d pr extproc('xmlSetStructuredErrorFunc')
+ d ctx * value void *
+ d handler value like(xmlGenericErrorFunc)
+
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ *
+ * These are vararg functions.
+ * The following prototypes support up to 8 pointer arguments.
+ * Other argument signature can be achieved by defining alternate
+ * prototypes redirected to the same function.
+
+ d xmlParserError pr extproc('xmlParserError')
+ d ctx * value void *
+ d msg * value options(*string) const char *
+ d handler value like(xmlGenericErrorFunc)
+ d arg1 * value options(*string: *nopass)
+ d arg2 * value options(*string: *nopass)
+ d arg3 * value options(*string: *nopass)
+ d arg4 * value options(*string: *nopass)
+ d arg5 * value options(*string: *nopass)
+ d arg6 * value options(*string: *nopass)
+ d arg7 * value options(*string: *nopass)
+ d arg8 * value options(*string: *nopass)
+
+ d xmlParserWarning...
+ d pr extproc('xmlParserWarning')
+ d ctx * value void *
+ d msg * value options(*string) const char *
+ d handler value like(xmlGenericErrorFunc)
+ d arg1 * value options(*string: *nopass)
+ d arg2 * value options(*string: *nopass)
+ d arg3 * value options(*string: *nopass)
+ d arg4 * value options(*string: *nopass)
+ d arg5 * value options(*string: *nopass)
+ d arg6 * value options(*string: *nopass)
+ d arg7 * value options(*string: *nopass)
+ d arg8 * value options(*string: *nopass)
+
+ d xmlParserValidityError...
+ d pr extproc('xmlParserValidityError')
+ d ctx * value void *
+ d msg * value options(*string) const char *
+ d handler value like(xmlGenericErrorFunc)
+ d arg1 * value options(*string: *nopass)
+ d arg2 * value options(*string: *nopass)
+ d arg3 * value options(*string: *nopass)
+ d arg4 * value options(*string: *nopass)
+ d arg5 * value options(*string: *nopass)
+ d arg6 * value options(*string: *nopass)
+ d arg7 * value options(*string: *nopass)
+ d arg8 * value options(*string: *nopass)
+
+ d xmlParserValidityWarning...
+ d pr extproc('xmlParserValidityWarning')
+ d ctx * value void *
+ d msg * value options(*string) const char *
+ d handler value like(xmlGenericErrorFunc)
+ d arg1 * value options(*string: *nopass)
+ d arg2 * value options(*string: *nopass)
+ d arg3 * value options(*string: *nopass)
+ d arg4 * value options(*string: *nopass)
+ d arg5 * value options(*string: *nopass)
+ d arg6 * value options(*string: *nopass)
+ d arg7 * value options(*string: *nopass)
+ d arg8 * value options(*string: *nopass)
+
+ d xmlParserPrintFileInfo...
+ d pr extproc('xmlParserPrintFileInfo')
+ d input value like(xmlParserInputPtr)
+
+ d xmlParserPrintFileContext...
+ d pr extproc('xmlParserPrintFileContext')
+ d input value like(xmlParserInputPtr)
+
+ * Extended error information routines
+
+ d xmlGetLastError...
+ d pr extproc('xmlGetLastError')
+ d like(xmlErrorPtr)
+
+ d xmlResetLastError...
+ d pr extproc('xmlResetLastError')
+
+ d xmlCtxtGetLastError...
+ d pr extproc('xmlCtxtGetLastError')
+ d like(xmlErrorPtr)
+ d ctx * value void *
+
+ d xmlCtxtResetLastError...
+ d pr extproc('xmlCtxtResetLastError')
+ d ctx * value void *
+
+ d xmlResetError pr extproc('xmlResetError')
+ d err value like(xmlErrorPtr)
+
+ d xmlCopyError pr 10i 0 extproc('xmlCopyError')
+ d from value like(xmlErrorPtr)
+ d to value like(xmlErrorPtr)
+
+ /endif XML_ERROR_H__
diff --git a/os400/libxmlrpg/xmlexports.rpgle b/os400/libxmlrpg/xmlexports.rpgle
new file mode 100644
index 0000000..9a6fd10
--- /dev/null
+++ b/os400/libxmlrpg/xmlexports.rpgle
@@ -0,0 +1,15 @@
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_EXPORTS_H__)
+ /define XML_EXPORTS_H__
+
+ * The definition in the original C header file are not appliable to
+ * ILE/RPG.
+ * Therefore this file is intentionally empty.
+
+ /endif XML_EXPORTS_H__
diff --git a/os400/libxmlrpg/xmlmemory.rpgle b/os400/libxmlrpg/xmlmemory.rpgle
new file mode 100644
index 0000000..165eaca
--- /dev/null
+++ b/os400/libxmlrpg/xmlmemory.rpgle
@@ -0,0 +1,239 @@
+ * Summary: interface for the memory allocator
+ * Description: provides interfaces for the memory allocator,
+ * including debugging capabilities.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(DEBUG_MEMORY_ALLOC__)
+ /define DEBUG_MEMORY_ALLOC__
+
+ /include "libxmlrpg/xmlversion"
+
+ * DEBUG_MEMORY:
+ *
+ * DEBUG_MEMORY replaces the allocator with a collect and debug
+ * shell to the libc allocator.
+ * DEBUG_MEMORY should only be activated when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+
+ * /define DEBUG_MEMORY_FREED
+ * /define DEBUG_MEMORY_LOCATION
+
+ /if defined(DEBUG)
+ /if not defined(DEBUG_MEMORY)
+ /define DEBUG_MEMORY
+ /endif
+ /endif
+
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * DEBUG_MEMORY_LOCATION should be activated only when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+
+ /if defined(DEBUG_MEMORY_LOCATION)
+ /endif
+
+ * The XML memory wrapper support 4 basic overloadable functions.
+
+ * xmlFreeFunc:
+ * @mem: an already allocated block of memory
+ *
+ * Signature for a free() implementation.
+
+ d xmlFreeFunc s * based(######typedef######)
+ d procptr
+
+ * xmlMallocFunc:
+ * @size: the size requested in bytes
+ *
+ * Signature for a malloc() implementation.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error.
+
+ d xmlMallocFunc s * based(######typedef######)
+ d procptr
+
+ * xmlReallocFunc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * Signature for a realloc() implementation.
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
+
+ d xmlReallocFunc s * based(######typedef######)
+ d procptr
+
+ * xmlStrdupFunc:
+ * @str: a zero terminated string
+ *
+ * Signature for an strdup() implementation.
+ *
+ * Returns the copy of the string or NULL in case of error.
+
+ d xmlStrdupFunc s * based(######typedef######)
+ d procptr
+
+ * The 5 interfaces used for all memory handling within libxml.
+ * Since indirect calls are only supported via a based prototype,
+ * storage is accessed via functions.
+
+ d get_xmlFree pr extproc('__get_xmlFree')
+ d like(xmlFreeFunc)
+
+ d set_xmlFree pr extproc('__set_xmlFree')
+ d func value like(xmlFreeFunc)
+
+ d xmlFree pr extproc('__call_xmlFree')
+ d mem * value void *
+
+ d get_xmlMalloc pr extproc('__get_xmlMalloc')
+ d like(xmlMallocFunc)
+
+ d set_xmlMalloc pr extproc('__set_xmlMalloc')
+ d func value like(xmlMallocFunc)
+
+ d xmlMalloc pr * extproc('__call_xmlMalloc') void *
+ d size 10u 0 value size_t
+
+ d get_xmlMallocAtomic...
+ d pr extproc('__get_xmlMallocAtomic')
+ d like(xmlMallocFunc)
+
+ d set_xmlMallocAtomic...
+ d pr extproc('__set_xmlMallocAtomic')
+ d func value like(xmlMallocFunc)
+
+ d xmlMallocAtomic...
+ d pr * extproc('__call_xmlMallocAtomic') void *
+ d size 10u 0 value size_t
+
+ d get_xmlRealloc pr extproc('__get_xmlRealloc')
+ d like(xmlReallocFunc)
+
+ d set_xmlRealloc pr extproc('__set_xmlRealloc')
+ d func value like(xmlReallocFunc)
+
+ d xmlRealloc pr * extproc('__call_xmlRealloc') void *
+ d mem * value void *
+ d size 10u 0 value size_t
+
+ d get_xmlMemStrdup...
+ d pr extproc('__get_xmlMemStrdup')
+ d like(xmlStrdupFunc)
+
+ d set_xmlMemStrdup...
+ d pr extproc('__set_xmlMemstrdup')
+ d func value like(xmlStrdupFunc)
+
+ d xmlMemStrdup pr * extproc('__call_xmlMemStrdup') void *
+ d str * value options(*string) const char *
+
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+
+ d xmlMemSetup pr 10i 0 extproc('xmlMemSetup')
+ d freeFunc value like(xmlFreeFunc)
+ d mallocFunc value like(xmlMallocFunc)
+ d reallocFunc value like(xmlReallocFunc)
+ d strdupFunc value like(xmlStrdupFunc)
+
+ d xmlMemGet pr 10i 0 extproc('xmlMemGet')
+ d freeFunc like(xmlFreeFunc)
+ d mallocFunc like(xmlMallocFunc)
+ d reallocFunc like(xmlReallocFunc)
+ d strdupFunc like(xmlStrdupFunc)
+
+ d xmlGcMemSetup pr 10i 0 extproc('xmlGcMemSetup')
+ d freeFunc value like(xmlFreeFunc)
+ d mallocFunc value like(xmlMallocFunc)
+ d mallocAtomicFunc...
+ d value like(xmlMallocFunc)
+ d reallocFunc value like(xmlReallocFunc)
+ d strdupFunc value like(xmlStrdupFunc)
+
+ d xmlGcMemGet pr 10i 0 extproc('xmlGcMemGet')
+ d freeFunc like(xmlFreeFunc)
+ d mallocFunc like(xmlMallocFunc)
+ d mallocAtomicFunc...
+ d like(xmlMallocFunc)
+ d reallocFunc like(xmlReallocFunc)
+ d strdupFunc like(xmlStrdupFunc)
+
+ * Initialization of the memory layer.
+
+ d xmlInitMemory pr 10i 0 extproc('xmlInitMemory')
+
+ * Cleanup of the memory layer.
+
+ d xmlCleanupMemory...
+ d pr extproc('xmlCleanupMemory')
+
+ * These are specific to the XML debug memory wrapper.
+
+ d xmlMemUsed pr 10i 0 extproc('xmlMemUsed')
+
+ d xmlMemBlocks pr 10i 0 extproc('xmlMemBlocks')
+
+ d xmlMemDisplay pr extproc('xmlMemDisplay')
+ d fp * value FILE *
+
+ d xmlMmDisplayLast...
+ d pr extproc('xmlMemDisplayLast')
+ d fp * value FILE *
+ d nbBytes 20i 0 value
+
+ d xmlMemShow pr extproc('xmlMemShow')
+ d fp * value FILE *
+ d nr 10i 0 value
+
+ d xmlMemoryDump pr extproc('xmlMemoryDump')
+
+ d xmlMemMalloc pr * extproc('xmlMemMalloc') void *
+ d size 10u 0 value size_t
+
+ d xmlMemRealloc pr * extproc('xmlMemRealloc') void *
+ d ptr * value void *
+ d size 10u 0 value size_t
+
+ d xmlMemFree pr extproc('xmlMemFree')
+ d ptr * value void *
+
+ d xmlMemoryStrdup...
+ d pr * extproc('xmlMemoryStrdup') char *
+ d str * value options(*string) const char *
+
+ d xmlMallocLoc pr * extproc('xmlMallocLoc') void *
+ d size 10u 0 value size_t
+ d file * value options(*string) const char *
+ d line 10i 0 value
+
+ d xmlReallocLoc pr * extproc('xmlReallocLoc') void *
+ d ptr * value void *
+ d size 10u 0 value size_t
+ d file * value options(*string) const char *
+ d line 10i 0 value
+
+ d xmlMallocAtomicLoc...
+ d pr * extproc('xmlMallocAtomicLoc') void *
+ d size 10u 0 value size_t
+ d file * value options(*string) const char *
+ d line 10i 0 value
+
+ d xmlMemStrdupLoc...
+ d pr * extproc('xmlMemStrdupLoc') char *
+ d str * value options(*string) const char *
+ d file * value options(*string) const char *
+ d line 10i 0 value
+
+ /if not defined(XML_GLOBALS_H)
+ /if not defined(XML_THREADS_H__)
+ /include "libxmlrpg/threads"
+ /include "libxmlrpg/globals"
+ /endif
+ /endif
+
+ /endif DEBUG_MEMORY_ALLOC__
diff --git a/os400/libxmlrpg/xmlmodule.rpgle b/os400/libxmlrpg/xmlmodule.rpgle
new file mode 100644
index 0000000..09592a6
--- /dev/null
+++ b/os400/libxmlrpg/xmlmodule.rpgle
@@ -0,0 +1,51 @@
+ * Summary: dynamic module loading
+ * Description: basic API for dynamic module loading, used by
+ * libexslt added in 2.6.17
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_MODULE_H__)
+ /define XML_MODULE_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_MODULES_ENABLED)
+
+ * xmlModulePtr:
+ *
+ * A handle to a dynamically loaded module
+
+ d xmlModulePtr s * based(######typedef######)
+
+ * xmlModuleOption:
+ *
+ * enumeration of options that can be passed down to xmlModuleOpen()
+
+ d xmlModuleOption...
+ d s 10i 0 based(######typedef######) enum
+ d XML_MODULE_LAZY... Lazy binding
+ d c 1
+ d XML_MODULE_LOCAL... Local binding
+ d c 2
+
+ d xmlModuleOpen pr extproc('xmlModuleOpen')
+ d like(xmlModulePtr)
+ d filename * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlModuleSymbol...
+ d pr 10i 0 extproc('xmlModuleSymbol')
+ d module value like(xmlModulePtr)
+ d name * value options(*string) const char *
+ d result * void *(*)
+
+ d xmlModuleClose pr 10i 0 extproc('xmlModuleClose')
+ d module value like(xmlModulePtr)
+
+ d xmlModuleFree pr 10i 0 extproc('xmlModuleFree')
+ d module value like(xmlModulePtr)
+
+ /endif LIBXML_MODULES_ENBLD
+ /endif XML_MODULE_H__
diff --git a/os400/libxmlrpg/xmlreader.rpgle b/os400/libxmlrpg/xmlreader.rpgle
new file mode 100644
index 0000000..eccd37c
--- /dev/null
+++ b/os400/libxmlrpg/xmlreader.rpgle
@@ -0,0 +1,619 @@
+ * Summary: the XMLReader implementation
+ * Description: API of the XML streaming API based on C# interfaces.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XMLREADER_H__)
+ /define XML_XMLREADER_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/xmlIO"
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+ /include "libxmlrpg/relaxng"
+ /include "libxmlrpg/xmlschemas"
+ /endif
+
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+
+ d xmlParserSeverities...
+ d s 10i 0 based(######typedef######) enum
+ d XML_PARSER_SEVERITY_VALIDITY_WARNING...
+ d c 1
+ d XML_PARSER_SEVERITY_VALIDITY_ERROR...
+ d c 2
+ d XML_PARSER_SEVERITY_WARNING...
+ d c 3
+ d XML_PARSER_SEVERITY_ERROR...
+ d c 4
+
+ /if defined(LIBXML_READER_ENABLED)
+
+ * xmlTextReaderMode:
+ *
+ * Internal state values for the reader.
+
+ d xmlTextReaderMode...
+ d s 10i 0 based(######typedef######) enum
+ d XML_TEXTREADER_MODE_INITIAL...
+ d c 0
+ d XML_TEXTREADER_MODE_INTERACTIVE...
+ d c 1
+ d XML_TEXTREADER_MODE_ERROR...
+ d c 2
+ d XML_TEXTREADER_MODE_EOF...
+ d c 3
+ d XML_TEXTREADER_MODE_CLOSED...
+ d c 4
+ d XML_TEXTREADER_MODE_READING...
+ d c 5
+
+ * xmlParserProperties:
+ *
+ * Some common options to use with xmlTextReaderSetParserProp, but it
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * xmlReaderForxxx APIs now.
+
+ d xmlParserProperties...
+ d s 10i 0 based(######typedef######) enum
+ d XML_PARSER_LOADDTD...
+ d c 1
+ d XML_PARSER_DEFAULTATTRS...
+ d c 2
+ d XML_PARSER_VALIDATE...
+ d c 3
+ d XML_PARSER_SUBST_ENTITIES...
+ d c 4
+
+ * xmlReaderTypes:
+ *
+ * Predefined constants for the different types of nodes.
+
+ d xmlReaderTypes s 10i 0 based(######typedef######) enum
+ d XML_READER_TYPE_NONE...
+ d c 0
+ d XML_READER_TYPE_ELEMENT...
+ d c 1
+ d XML_READER_TYPE_ATTRIBUTE...
+ d c 2
+ d XML_READER_TYPE_TEXT...
+ d c 3
+ d XML_READER_TYPE_CDATA...
+ d c 4
+ d XML_READER_TYPE_ENTITY_REFERENCE...
+ d c 5
+ d XML_READER_TYPE_ENTITY...
+ d c 6
+ d XML_READER_TYPE_PROCESSING_INSTRUCTION...
+ d c 7
+ d XML_READER_TYPE_COMMENT...
+ d c 8
+ d XML_READER_TYPE_DOCUMENT...
+ d c 9
+ d XML_READER_TYPE_DOCUMENT_TYPE...
+ d c 10
+ d XML_READER_TYPE_DOCUMENT_FRAGMENT...
+ d c 11
+ d XML_READER_TYPE_NOTATION...
+ d c 12
+ d XML_READER_TYPE_WHITESPACE...
+ d c 13
+ d XML_READER_TYPE_SIGNIFICANT_WHITESPACE...
+ d c 14
+ d XML_READER_TYPE_END_ELEMENT...
+ d c 15
+ d XML_READER_TYPE_END_ENTITY...
+ d c 16
+ d XML_READER_TYPE_XML_DECLARATION...
+ d c 17
+
+ * xmlTextReaderPtr:
+ *
+ * Pointer to an xmlReader context.
+
+ d xmlTextReaderPtr...
+ d s * based(######typedef######)
+
+ * Constructors & Destructor
+
+ d xmlNewTextReader...
+ d pr extproc('xmlNewTextReader')
+ d like(xmlTextReaderPtr)
+ d input value like(xmlParserInputBufferPtr)
+ d URI * value options(*string) const char *
+
+ d xmlNewTextReaderFilename...
+ d pr extproc('xmlNewTextReaderFilename')
+ d like(xmlTextReaderPtr)
+ d URI * value options(*string) const char *
+
+ d xmlFreeTextReader...
+ d pr extproc('xmlFreeTextReader')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderSetup...
+ d pr 10i 0 extproc('xmlTextReaderSetup')
+ d reader value like(xmlTextReaderPtr)
+ d input value like(xmlParserInputBufferPtr)
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ * Iterators
+
+ d xmlTextReaderRead...
+ d pr 10i 0 extproc('xmlTextReaderRead')
+ d reader value like(xmlTextReaderPtr)
+
+ /if defined(LIBXML_WRITER_ENABLED)
+ d xmlTextReaderReadInnerXml...
+ d pr * extproc('xmlTextReaderReadInnerXml') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderReadOuterXml...
+ d pr * extproc('xmlTextReaderReadOuterXml') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+ /endif
+
+ d xmlTextReaderReadString...
+ d pr * extproc('xmlTextReaderReadString') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderReadAttributeValue...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderReadAttributeValue')
+ d reader value like(xmlTextReaderPtr)
+
+ * Attributes of the node
+
+ d xmlTextReaderAttributeCount...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderAttributeCount')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderDepth...
+ d pr 10i 0 extproc('xmlTextReaderDepth')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderHasAttributes...
+ d pr 10i 0 extproc('xmlTextReaderHasAttributes')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderHasValue...
+ d pr 10i 0 extproc('xmlTextReaderHasValue')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderIsDefault...
+ d pr 10i 0 extproc('xmlTextReaderIsDefault')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderIsEmptyElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderIsEmptyElement')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderNodeType...
+ d pr 10i 0 extproc('xmlTextReaderNodeType')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderQuoteChar...
+ d pr 10i 0 extproc('xmlTextReaderQuoteChar')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderReadState...
+ d pr 10i 0 extproc('xmlTextReaderReadState')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderIsNamespaceDecl...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderIsNamespaceDecl')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstBaseUri...
+ d pr * extproc('xmlTextReaderConstBaseUri') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstLocalName...
+ d pr * extproc( const xmlChar *
+ d 'xmlTextReaderConstLocalName')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstName...
+ d pr * extproc('xmlTextReaderConstName') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstNamespaceUri...
+ d pr * extproc( const xmlChar *
+ d 'xmlTextReaderConstNamespaceUri')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstPrefix...
+ d pr * extproc('xmlTextReaderConstPrefix') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstXmlLang...
+ d pr * extproc('xmlTextReaderConstXmlLang') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstString...
+ d pr * extproc('xmlTextReaderConstString') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlTextReaderConstValue...
+ d pr * extproc('xmlTextReaderConstValue') const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ * use the Const version of the routine for
+ * better performance and simpler code
+
+ d xmlTextReaderBaseUri...
+ d pr * extproc('xmlTextReaderBaseUri') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderLocalName...
+ d pr * extproc('xmlTextReaderLocalName') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderName...
+ d pr * extproc('xmlTextReaderName') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderNamespaceUri...
+ d pr * extproc('xmlTextReaderNamespaceUri') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderPrefix...
+ d pr * extproc('xmlTextReaderPrefix') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderXmlLang...
+ d pr * extproc('xmlTextReaderXmlLang') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderValue...
+ d pr * extproc('xmlTextReaderValue') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ * Methods of the XmlTextReader
+
+ d xmlTextReaderClose...
+ d pr 10i 0 extproc('xmlTextReaderClose')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderGetAttributeNo...
+ d pr * extproc( xmlChar *
+ d 'xmlTextReaderGetAttributeNo')
+ d reader value like(xmlTextReaderPtr)
+ d no 10i 0 value
+
+ d xmlTextReaderGetAttribute...
+ d pr * extproc('xmlTextReaderGetAttribute') xmlChar *
+ d reader value like(xmlTextReaderPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextReaderGetAttributeNs...
+ d pr * extproc( xmlChar *
+ d 'xmlTextReaderGetAttributeNs')
+ d reader value like(xmlTextReaderPtr)
+ d localName * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+
+ d xmlTextReaderGetRemainder...
+ d pr extproc('xmlTextReaderGetRemainder')
+ d like(xmlParserInputBufferPtr)
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderLookupNamespace...
+ d pr * extproc( xmlChar *
+ d 'xmlTextReaderLookupNamespace')
+ d reader value like(xmlTextReaderPtr)
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlTextReaderMoveToAttributeNo...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderMoveToAttributeNo')
+ d reader value like(xmlTextReaderPtr)
+ d no 10i 0 value
+
+ d xmlTextReaderMoveToAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderMoveToAttribute')
+ d reader value like(xmlTextReaderPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextReaderMoveToAttributeNs...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderMoveToAttributeNs')
+ d reader value like(xmlTextReaderPtr)
+ d localName * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+
+ d xmlTextReaderMoveToFirstAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderMoveToFirstAttribute')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderMoveToNextAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderMoveToNextAttribute')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderMoveToElement...
+ d pr 10i 0 extproc('xmlTextReaderMoveToElement')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderNormalization...
+ d pr 10i 0 extproc('xmlTextReaderNormalization')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderConstEncoding...
+ d pr * extproc('xmlTextReaderConstEncoding')const xmlChar *
+ d reader value like(xmlTextReaderPtr)
+
+ * Extensions
+
+ d xmlTextReaderSetParserProp...
+ d pr 10i 0 extproc('xmlTextReaderSetParserProp')
+ d reader value like(xmlTextReaderPtr)
+ d prop 10i 0 value
+ d value 10i 0 value
+
+ d xmlTextReaderGetParserProp...
+ d pr 10i 0 extproc('xmlTextReaderGetParserProp')
+ d reader value like(xmlTextReaderPtr)
+ d prop 10i 0 value
+
+ d xmlTextReaderCurrentNode...
+ d pr extproc('xmlTextReaderCurrentNode')
+ d like(xmlNodePtr)
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderGetParserLineNumber...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderGetParserLineNumber')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderGetParserColumnNumber...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderGetParserColumnNumber')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderPreserve...
+ d pr extproc('xmlTextReaderPreserve')
+ d like(xmlNodePtr)
+ d reader value like(xmlTextReaderPtr)
+
+ /if defined(LIBXML_PATTERN_ENABLED)
+ d xmlTextReaderPreservePattern...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderPreservePattern')
+ d reader value like(xmlTextReaderPtr)
+ d pattern * value options(*string) const xmlChar *
+ d namespaces * const xmlChar *(*)
+ /endif LIBXML_PATTERN_ENBLD
+
+ d xmlTextReaderCurrentDoc...
+ d pr extproc('xmlTextReaderCurrentDoc')
+ d like(xmlDocPtr)
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderExpand...
+ d pr extproc('xmlTextReaderExpand')
+ d like(xmlNodePtr)
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderNext...
+ d pr 10i 0 extproc('xmlTextReaderNext')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderNextSibling...
+ d pr 10i 0 extproc('xmlTextReaderNextSibling')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderIsValid...
+ d pr 10i 0 extproc('xmlTextReaderIsValid')
+ d reader value like(xmlTextReaderPtr)
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+ d xmlTextReaderRelaxNGValidate...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderRelaxNGValidate')
+ d reader value like(xmlTextReaderPtr)
+ d rng * value options(*string) const char *
+
+ d xmlTextReaderRelaxNGValidateCtxt...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderRelaxNGValidateCtxt')
+ d reader value like(xmlTextReaderPtr)
+ d ctxt value like(xmlRelaxNGValidCtxtPtr)
+ d options 10i 0 value
+
+ d xmlTextReaderRelaxNGSetSchema...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderRelaxNGSetSchema')
+ d reader value like(xmlTextReaderPtr)
+ d schema value like(xmlRelaxNGPtr)
+
+ d xmlTextReaderSchemaValidate...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderSchemaValidate')
+ d reader value like(xmlTextReaderPtr)
+ d xsd * value options(*string) const char *
+
+ d xmlTextReaderSchemaValidateCtxt...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderSchemaValidateCtxt')
+ d reader value like(xmlTextReaderPtr)
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d options 10i 0 value
+
+ d xmlTextReaderSetSchema...
+ d pr 10i 0 extproc('xmlTextReaderSetSchema')
+ d reader value like(xmlTextReaderPtr)
+ d schema value like(xmlSchemaPtr)
+ /endif
+
+ d xmlTextReaderConstXmlVersion...
+ d pr * extproc( const xmlChar *
+ d 'xmlTextReaderConstXmlVersion')
+ d reader value like(xmlTextReaderPtr)
+
+ d xmlTextReaderStandalone...
+ d pr 10i 0 extproc('xmlTextReaderStandalone')
+ d reader value like(xmlTextReaderPtr)
+
+ * Index lookup
+
+ d xmlTextReaderByteConsumed...
+ d pr 20i 0 extproc('xmlTextReaderByteConsumed')
+ d reader value like(xmlTextReaderPtr)
+
+ * New more complete APIs for simpler creation and reuse of readers
+
+ d xmlReaderWalker...
+ d pr extproc('xmlReaderWalker')
+ d like(xmlTextReaderPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlReaderForDoc...
+ d pr extproc('xmlReaderForDoc')
+ d like(xmlTextReaderPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderForFile...
+ d pr extproc('xmlReaderForFile')
+ d like(xmlTextReaderPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderForMemory...
+ d pr extproc('xmlReaderForMemory')
+ d like(xmlTextReaderPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderForFd pr extproc('xmlReaderForFd')
+ d like(xmlTextReaderPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderForIO pr extproc('xmlReaderForIO')
+ d like(xmlTextReaderPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderNewWalker...
+ d pr 10i 0 extproc('xmlReaderNewWalker')
+ d reader value like(xmlTextReaderPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlReaderNewDoc...
+ d pr 10i 0 extproc('xmlReaderNewDoc')
+ d reader value like(xmlTextReaderPtr)
+ d cur * value options(*string) const xmlChar *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderNewFile...
+ d pr 10i 0 extproc('xmlReaderNewFile')
+ d reader value like(xmlTextReaderPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderNewMemory...
+ d pr 10i 0 extproc('xmlReaderNewMemory')
+ d reader value like(xmlTextReaderPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderNewFd pr 10i 0 extproc('xmlReaderNewFd')
+ d reader value like(xmlTextReaderPtr)
+ d fd 10i 0 value
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlReaderNewIO pr 10i 0 extproc('xmlReaderNewIO')
+ d reader value like(xmlTextReaderPtr)
+ d ioread value like(xmlInputReadCallback)
+ d ioclose value like(xmlInputCloseCallback)
+ d ioctx * value void *
+ d URL * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ * Error handling extensions
+
+ d xmlTextReaderLocatorPtr...
+ d s * based(######typedef######) void *
+
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occured
+ *
+ * Signature of an error callback from a reader parser
+
+ d xmlTextReaderErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ d xmlTextReaderLocatorLineNumber...
+ d pr 10i 0 extproc(
+ d 'xmlTextReaderLocatorLineNumber')
+ d locator value like(xmlTextReaderLocatorPtr)
+
+ d xmlTextReaderLocatorBaseURI...
+ d pr * extproc( xmlChar *
+ d 'xmlTextReaderLocatorBaseURI')
+ d locator value like(xmlTextReaderLocatorPtr)
+
+ d xmlTextReaderSetErrorHandler...
+ d pr extproc(
+ d 'xmlTextReaderSetErrorHandler')
+ d reader value like(xmlTextReaderPtr)
+ d f value like(xmlTextReaderErrorFunc)
+ d arg * value void *
+
+ d xmlTextReaderSetStructuredErrorHandler...
+ d pr extproc('xmlTextReaderSetStructuredE-
+ d rrorHandler')
+ d reader value like(xmlTextReaderPtr)
+ d f value like(xmlStructuredErrorFunc)
+ d arg * value void *
+
+ d xmlTextReaderGetErrorHandler...
+ d pr extproc(
+ d 'xmlTextReaderGetErrorHandler')
+ d reader value like(xmlTextReaderPtr)
+ d f like(xmlTextReaderErrorFunc)
+ d arg * void *(*)
+
+ /endif LIBXML_READER_ENABLD
+ /endif XML_XMLREADER_H__
diff --git a/os400/libxmlrpg/xmlregexp.rpgle b/os400/libxmlrpg/xmlregexp.rpgle
new file mode 100644
index 0000000..65c2d07
--- /dev/null
+++ b/os400/libxmlrpg/xmlregexp.rpgle
@@ -0,0 +1,246 @@
+ * Summary: regular expressions handling
+ * Description: basic API for libxml regular expressions handling used
+ * for XML Schemas and validation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_REGEXP_H__)
+ /define XML_REGEXP_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_REGEXP_ENABLED)
+
+ * xmlRegexpPtr:
+ *
+ * A libxml regular expression, they can actually be far more complex
+ * thank the POSIX regex expressions.
+
+ d xmlRegexpPtr s * based(######typedef######)
+
+ * xmlRegExecCtxtPtr:
+ *
+ * A libxml progressive regular expression evaluation context
+
+ d xmlRegExecCtxtPtr...
+ d s * based(######typedef######)
+
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/dict"
+
+ * The POSIX like API
+
+ d xmlRegexpCompile...
+ d pr extproc('xmlRegexpCompile')
+ d like(xmlRegexpPtr)
+ d regexp * value options(*string) const xmlChar *
+
+ d xmlRegFreeRegexp...
+ d pr extproc('xmlRegFreeRegexp')
+ d regexp value like(xmlRegexpPtr)
+
+ d xmlRegexpExec pr 10i 0 extproc('xmlRegexpExec')
+ d comp value like(xmlRegexpPtr)
+ d value * value options(*string) const xmlChar *
+
+ d xmlRegexpPrint pr extproc('xmlRegexpPrint')
+ d output * value FILE *
+ d regexp value like(xmlRegexpPtr)
+
+ d xmlRegexpIsDeterminist...
+ d pr 10i 0 extproc('xmlRegexpIsDeterminist')
+ d comp value like(xmlRegexpPtr)
+
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
+ * Callback function when doing a transition in the automata
+
+ d xmlRegExecCallbacks...
+ d s * based(######typedef######)
+ d procptr
+
+ * The progressive API
+
+ d xmlRegNewExecCtxt...
+ d pr extproc('xmlRegNewExecCtxt')
+ d like(xmlRegExecCtxtPtr)
+ d comp value like(xmlRegexpPtr)
+ d callback value like(xmlRegExecCallbacks)
+ d data * value void *
+
+ d xmlRegFreeExecCtxt...
+ d pr extproc('xmlRegFreeExecCtxt')
+ d exec value like(xmlRegExecCtxtPtr)
+
+ d xmlRegExecPushString...
+ d pr 10i 0 extproc('xmlRegExecPushString')
+ d exec value like(xmlRegExecCtxtPtr)
+ d value * value options(*string) const xmlChar *
+ d data * value void *
+
+ d xmlRegExecPushString2...
+ d pr 10i 0 extproc('xmlRegExecPushString2')
+ d exec value like(xmlRegExecCtxtPtr)
+ d value * value options(*string) const xmlChar *
+ d value2 * value options(*string) const xmlChar *
+ d data * value void *
+
+ d xmlRegExecNextValues...
+ d pr 10i 0 extproc('xmlRegExecNextValues')
+ d exec value like(xmlRegExecCtxtPtr)
+ d nbval 10i 0
+ d nbneg 10i 0
+ d values * xmlChar * (*)
+ d terminal 10i 0
+
+ d xmlRegExecErrInfo...
+ d pr 10i 0 extproc('xmlRegExecErrInfo')
+ d exec value like(xmlRegExecCtxtPtr)
+ d string * const xmlChar * (*)
+ d nbval 10i 0
+ d nbneg 10i 0
+ d values * xmlChar * (*)
+ d terminal 10i 0
+
+ /if defined(LIBXML_EXPR_ENABLED)
+
+ * Formal regular expression handling
+ * Its goal is to do some formal work on content models
+
+ * expressions are used within a context
+
+ d xmlExpCtxtPtr s * based(######typedef######)
+
+ d xmlExpFreeCtxt pr extproc('xmlExpFreeCtxt')
+ d ctxt value like(xmlExpCtxtPtr)
+
+ d xmlExpNewCtxt pr extproc('xmlExpNewCtxt')
+ d like(xmlExpCtxtPtr)
+ d maxNodes 10i 0 value
+ d dict value like(xmlDictPtr)
+
+ d xmlExpCtxtNbNodes...
+ d pr 10i 0 extproc('xmlExpCtxtNbNodes')
+ d ctxt value like(xmlExpCtxtPtr)
+
+ d xmlExpCtxtNbCons...
+ d pr 10i 0 extproc('xmlExpCtxtNbCons')
+ d ctxt value like(xmlExpCtxtPtr)
+
+ * Expressions are trees but the tree is opaque
+
+ d xmlExpNodePtr s * based(######typedef######)
+
+ d xmlExpNodeType s 10i 0 based(######typedef######) enum
+ d XML_EXP_EMPTY c 0
+ d XML_EXP_FORBID...
+ d c 1
+ d XML_EXP_ATOM c 2
+ d XML_EXP_SEQ c 3
+ d XML_EXP_OR c 4
+ d XML_EXP_COUNT c 5
+
+ * 2 core expressions shared by all for the empty language set
+ * and for the set with just the empty token
+
+ d forbiddenExp s import('forbiddenExp')
+ d like(xmlExpNodePtr)
+
+ d emptyExp s import('emptyExp')
+ d like(xmlExpNodePtr)
+
+
+ * Expressions are reference counted internally
+
+ d xmlExpFree pr extproc('xmlExpFree')
+ d expr value like(xmlExpNodePtr)
+
+ d xmlExpRef pr extproc('xmlExpRef')
+ d expr value like(xmlExpNodePtr)
+
+ * constructors can be either manual or from a string
+
+ d xmlExpParse pr extproc('xmlExpParse')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr * value options(*string) const char *
+
+ d xmlExpNewAtom pr extproc('xmlExpNewAtom')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d name * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlExpNewOr pr extproc('xmlExpNewOr')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d left value like(xmlExpNodePtr)
+ d right value like(xmlExpNodePtr)
+
+ d xmlExpNewSeq pr extproc('xmlExpNewSeq')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d left value like(xmlExpNodePtr)
+ d right value like(xmlExpNodePtr)
+
+ d xmlExpNewRange pr extproc('xmlExpNewRange')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d subset value like(xmlExpNodePtr)
+ d min 10i 0 value
+ d max 10i 0 value
+
+ * The really interesting APIs
+
+ d xmlExpIsNillable...
+ d pr 10i 0 extproc('xmlExpIsNillable')
+ d expr value like(xmlExpNodePtr)
+
+ d xmlExpMaxToken pr 10i 0 extproc('xmlExpMaxToken')
+ d expr value like(xmlExpNodePtr)
+
+ d xmlExpGetLanguage...
+ d pr 10i 0 extproc('xmlExpGetLanguage')
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr value like(xmlExpNodePtr)
+ d langList * const xmlChar *(*)
+ d len 10i 0 value
+
+ d xmlExpGetStart pr 10i 0 extproc('xmlExpGetStart')
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr value like(xmlExpNodePtr)
+ d tokList * const xmlChar *(*)
+ d len 10i 0 value
+
+ d xmlExpStringDerive...
+ d pr extproc('xmlExpStringDerive')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr value like(xmlExpNodePtr)
+ d str * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlExpExpDerive...
+ d pr extproc('xmlExpExpDerive')
+ d like(xmlExpNodePtr)
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr value like(xmlExpNodePtr)
+ d sub value like(xmlExpNodePtr)
+
+ d xmlExpSubsume pr 10i 0 extproc('xmlExpSubsume')
+ d ctxt value like(xmlExpCtxtPtr)
+ d expr value like(xmlExpNodePtr)
+ d sub value like(xmlExpNodePtr)
+
+ d xmlExpDump pr extproc('xmlExpDump')
+ d buf value like(xmlBufferPtr)
+ d expr value like(xmlExpNodePtr)
+ /endif LIBXML_EXPR_ENABLED
+ /endif LIBXML_REGEXP_ENABLD
+ /endif XML_REGEXP_H__
diff --git a/os400/libxmlrpg/xmlsave.rpgle b/os400/libxmlrpg/xmlsave.rpgle
new file mode 100644
index 0000000..efcb09f
--- /dev/null
+++ b/os400/libxmlrpg/xmlsave.rpgle
@@ -0,0 +1,96 @@
+ * Summary: the XML document serializer
+ * Description: API to save document or subtree of document
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XMLSAVE_H__)
+ /define XML_XMLSAVE_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/encoding"
+ /include "libxmlrpg/xmlIO"
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+
+ * xmlSaveOption:
+ *
+ * This is the set of XML save options that can be passed down
+ * to the xmlSaveToFd() and similar calls.
+
+ d xmlSaveOption s 10i 0 based(######typedef######) enum
+ d XML_SAVE_FORMAT... Format save output
+ d c X'0001'
+ d XML_SAVE_NO_DECL... Drop xml declaration
+ d c X'0002'
+ d XML_SAVE_NO_EMPTY... No empty tags
+ d c X'0004'
+ d XML_SAVE_NO_XHTML... No XHTML1 specific
+ d c X'0008'
+ d XML_SAVE_XHTML... Frce XHTML1 specific
+ d c X'0010'
+ d XML_SAVE_AS_XML... Frce XML on HTML doc
+ d c X'0020'
+ d XML_SAVE_AS_HTML... Frce HTML on XML doc
+ d c X'0040'
+ d XML_SAVE_WSNONSIG... Fmt w/ non-sig space
+ d c X'0080'
+
+ d xmlSaveCtxtPtr s * based(######typedef######)
+
+ d xmlSaveToFd pr extproc('xmlSaveToFd')
+ d like(xmlSaveCtxtPtr)
+ d fd 10i 0 value
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlSaveToFilename...
+ d pr extproc('xmlSaveToFilename')
+ d like(xmlSaveCtxtPtr)
+ d filename * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlSaveToBuffer...
+ d pr extproc('xmlSaveToBuffer')
+ d like(xmlSaveCtxtPtr)
+ d buffer value like(xmlBufferPtr)
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlSaveToIO pr extproc('xmlSaveToIO')
+ d like(xmlSaveCtxtPtr)
+ d iowrite value like(xmlOutputWriteCallback)
+ d ioclose value like(xmlOutputCloseCallback)
+ d ioctx * value void *
+ d encoding * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlSaveDoc pr 20i 0 extproc('xmlSaveDoc')
+ d ctxt value like(xmlSaveCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlSaveTree pr 20i 0 extproc('xmlSaveTree')
+ d ctxt value like(xmlSaveCtxtPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlSaveFlush pr 10i 0 extproc('xmlSaveFlush')
+ d ctxt value like(xmlSaveCtxtPtr)
+
+ d xmlSaveClose pr 10i 0 extproc('xmlSaveClose')
+ d ctxt value like(xmlSaveCtxtPtr)
+
+ d xmlSaveSetEscape...
+ d pr 10i 0 extproc('xmlSaveSetEscape')
+ d ctxt value like(xmlSaveCtxtPtr)
+ d escape value like(xmlCharEncodingOutputFunc)
+
+ d xmlSaveSetAttrEscape...
+ d pr 10i 0 extproc('xmlSaveSetAttrEscape')
+ d ctxt value like(xmlSaveCtxtPtr)
+ d escape value like(xmlCharEncodingOutputFunc)
+
+ /endif LIBXML_OUTPUT_ENABLD
+ /endif XML_XMLSAVE_H__
diff --git a/os400/libxmlrpg/xmlschemas.rpgle b/os400/libxmlrpg/xmlschemas.rpgle
new file mode 100644
index 0000000..865dd26
--- /dev/null
+++ b/os400/libxmlrpg/xmlschemas.rpgle
@@ -0,0 +1,318 @@
+ * Summary: incomplete XML Schemas structure implementation
+ * Description: interface to the XML Schemas handling and schema validity
+ * checking, it is incomplete right now.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SCHEMA_H__)
+ /define XML_SCHEMA_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+
+ /include "libxmlrpg/tree"
+
+ * This error codes are obsolete; not used any more.
+
+ d xmlSchemaValidError...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMAS_ERR_OK...
+ d c 0
+ d XML_SCHEMAS_ERR_NOROOT...
+ d c 1
+ d XML_SCHEMAS_ERR_UNDECLAREDELEM...
+ d c 2
+ d XML_SCHEMAS_ERR_NOTTOPLEVEL...
+ d c 3
+ d XML_SCHEMAS_ERR_MISSING...
+ d c 4
+ d XML_SCHEMAS_ERR_WRONGELEM...
+ d c 5
+ d XML_SCHEMAS_ERR_NOTYPE...
+ d c 6
+ d XML_SCHEMAS_ERR_NOROLLBACK...
+ d c 7
+ d XML_SCHEMAS_ERR_ISABSTRACT...
+ d c 8
+ d XML_SCHEMAS_ERR_NOTEMPTY...
+ d c 9
+ d XML_SCHEMAS_ERR_ELEMCONT...
+ d c 10
+ d XML_SCHEMAS_ERR_HAVEDEFAULT...
+ d c 11
+ d XML_SCHEMAS_ERR_NOTNILLABLE...
+ d c 12
+ d XML_SCHEMAS_ERR_EXTRACONTENT...
+ d c 13
+ d XML_SCHEMAS_ERR_INVALIDATTR...
+ d c 14
+ d XML_SCHEMAS_ERR_INVALIDELEM...
+ d c 15
+ d XML_SCHEMAS_ERR_NOTDETERMINIST...
+ d c 16
+ d XML_SCHEMAS_ERR_CONSTRUCT...
+ d c 17
+ d XML_SCHEMAS_ERR_INTERNAL...
+ d c 18
+ d XML_SCHEMAS_ERR_NOTSIMPLE...
+ d c 19
+ d XML_SCHEMAS_ERR_ATTRUNKNOWN...
+ d c 20
+ d XML_SCHEMAS_ERR_ATTRINVALID...
+ d c 21
+ d XML_SCHEMAS_ERR_VALUE...
+ d c 22
+ d XML_SCHEMAS_ERR_FACET...
+ d c 23
+ d XML_SCHEMAS_ERR_...
+ d c 24
+ d XML_SCHEMAS_ERR_XXX...
+ d c 25
+
+ * ATTENTION: Change xmlSchemaSetValidOptions's check
+ * for invalid values, if adding to the validation
+ * options below.
+
+ * xmlSchemaValidOption:
+ *
+ * This is the set of XML Schema validation options.
+
+ d xmlSchemaValidOption...
+ d s 10i 0 based(######typedef######) enum
+ *
+ * Default/fixed: create an attribute node
+ * or an element's text node on the instance.
+ *
+ d XML_SCHEMA_VAL_VC_I_CREATE...
+ d c X'0001'
+ /if defined(DISABLED)
+ *
+ * assemble schemata using
+ * xsi:schemaLocation and
+ * xsi:noNamespaceSchemaLocation
+ *
+ d XML_SCHEMA_VAL_XSI_ASSEMBLE...
+ d c X'0002'
+ /endif
+
+ * The schemas related types are kept internal
+
+ d xmlSchemaPtr s * based(######typedef######)
+
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
+
+ d xmlSchemaValidityErrorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+
+ d xmlSchemaValidityWarningFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * A schemas validation context
+
+ d xmlSchemaParserCtxtPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaValidCtxtPtr...
+ d s * based(######typedef######)
+
+ * xmlSchemaValidityLocatorFunc:
+ * @ctx: user provided context
+ * @file: returned file information
+ * @line: returned line information
+ *
+ * A schemas validation locator, a callback called by the validator.
+ * This is used when file or node informations are not available
+ * to find out what file and line number are affected
+ *
+ * Returns: 0 in case of success and -1 in case of error
+
+ d xmlSchemaValidityLocatorFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Interfaces for parsing.
+
+ d xmlSchemaNewParserCtxt...
+ d pr extproc('xmlSchemaNewParserCtxt')
+ d like(xmlSchemaParserCtxtPtr)
+ d URL * value options(*string) const char *
+
+ d xmlSchemaNewMemParserCtxt...
+ d pr extproc('xmlSchemaNewMemParserCtxt')
+ d like(xmlSchemaParserCtxtPtr)
+ d buffer * value options(*string) const char *
+ d size 10i 0 value
+
+ d xmlSchemaNewDocParserCtxt...
+ d pr extproc('xmlSchemaNewDocParserCtxt')
+ d like(xmlSchemaParserCtxtPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlSchemaFreeParserCtxt...
+ d pr extproc('xmlSchemaFreeParserCtxt')
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+
+ d xmlSchemaSetParserErrors...
+ d pr extproc('xmlSchemaSetParserErrors')
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+ d err value
+ d like(xmlSchemaValidityErrorFunc)
+ d warn value
+ d like(xmlSchemaValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlSchemaSetParserStructuredErrors...
+ d pr extproc(
+ d 'xmlSchemaSetParserStructuredErrors')
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+ d serror value like(xmlStructuredErrorFunc)
+ d ctx * value void *
+
+ d xmlSchemaGetParserErrors...
+ d pr 10i 0 extproc('xmlSchemaGetParserErrors')
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+ d err like(xmlSchemaValidityErrorFunc)
+ d warn like(xmlSchemaValidityWarningFunc)
+ d ctx * void *(*)
+
+ d xmlSchemaIsValid...
+ d pr 10i 0 extproc('xmlSchemaIsValid')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+
+ d xmlSchemaParse pr extproc('xmlSchemaParse')
+ d like(xmlSchemaPtr)
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+
+ d xmlSchemaFree pr extproc('xmlSchemaFree')
+ d schema value like(xmlSchemaPtr)
+
+ /if defined(LIBXML_OUTPUT_ENABLED)
+ d xmlSchemaDump pr extproc('xmlSchemaDump')
+ d output * value FILE *
+ d schema value like(xmlSchemaPtr)
+ /endif LIBXML_OUTPUT_ENABLD
+
+ * Interfaces for validating
+
+ d xmlSchemaSetValidErrors...
+ d pr extproc('xmlSchemaSetValidErrors')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d err value
+ d like(xmlSchemaValidityErrorFunc)
+ d warn value
+ d like(xmlSchemaValidityWarningFunc)
+ d ctx * value void *
+
+ d xmlSchemaSetValidStructuredErrors...
+ d pr extproc(
+ d 'xmlSchemaSetValidStructuredErrors')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d serror value like(xmlStructuredErrorFunc)
+ d ctx * value void *
+
+ d xmlSchemaGetValidErrors...
+ d pr 10i 0 extproc('xmlSchemaGetValidErrors')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d err like(xmlSchemaValidityErrorFunc)
+ d warn like(xmlSchemaValidityWarningFunc)
+ d ctx * void *(*)
+
+ d xmlSchemaSetValidOptions...
+ d pr 10i 0 extproc('xmlSchemaSetValidOptions')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d options 10i 0 value
+
+ d xmlSchemaValidateSetFilename...
+ d pr extproc(
+ d 'xmlSchemaValidateSetFilename')
+ d vctxt value like(xmlSchemaValidCtxtPtr)
+ d filename * value options(*string) const char *
+
+ d xmlSchemaValidCtxtGetOptions...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidCtxtGetOptions')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+
+ d xmlSchemaNewValidCtxt...
+ d pr extproc('xmlSchemaNewValidCtxt')
+ d like(xmlSchemaValidCtxtPtr)
+ d schema value like(xmlSchemaPtr)
+
+ d xmlSchemaFreeValidCtxt...
+ d pr extproc('xmlSchemaFreeValidCtxt')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+
+ d xmlSchemaValidateDoc...
+ d pr 10i 0 extproc('xmlSchemaValidateDoc')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d instance value like(xmlDocPtr)
+
+ d xmlSchemaValidateOneElement...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidateOneElement')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d elem value like(xmlNodePtr)
+
+ d xmlSchemaValidateStream...
+ d pr 10i 0 extproc('xmlSchemaValidateStream')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d input value like(xmlParserInputBufferPtr)
+ d enc value like(xmlCharEncoding)
+ d sax value like(xmlSAXHandlerPtr)
+ d user_data * value void *
+
+ d xmlSchemaValidateFile...
+ d pr 10i 0 extproc('xmlSchemaValidateFile')
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d filename * value options(*string) const char *
+ d options 10i 0 value
+
+ d xmlSchemaValidCtxtGetParserCtxt...
+ d pr extproc(
+ d 'xmlSchemaValidCtxtGetParserCtxt')
+ d like(xmlParserCtxtPtr)
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+
+ * Interface to insert Schemas SAX validation in a SAX stream
+
+ d xmlSchemaSAXPlugPtr...
+ d s * based(######typedef######)
+
+ d xmlSchemaSAXPlug...
+ d pr extproc('xmlSchemaSAXPlug')
+ d like(xmlSchemaSAXPlugPtr)
+ d ctxt value like(xmlSchemaValidCtxtPtr)
+ d sax like(xmlSAXHandlerPtr)
+ d user_data * void *(*)
+
+ d xmlSchemaSAXUnplug...
+ d pr 10i 0 extproc('xmlSchemaSAXUnplug')
+ d plug value like(xmlSchemaSAXPlugPtr)
+
+ d xmlSchemaValidateSetLocator...
+ d pr extproc(
+ d 'xmlSchemaValidateSetLocator')
+ d vctxt value like(xmlSchemaValidCtxtPtr)
+ d f value
+ d like(xmlSchemaValidityLocatorFunc)
+ d ctxt * value void *
+
+ /endif LIBXML_SCHEMAS_ENBLD
+ /endif XML_SCHEMA_H__
diff --git a/os400/libxmlrpg/xmlschemastypes.rpgle b/os400/libxmlrpg/xmlschemastypes.rpgle
new file mode 100644
index 0000000..6433c32
--- /dev/null
+++ b/os400/libxmlrpg/xmlschemastypes.rpgle
@@ -0,0 +1,235 @@
+ * Summary: implementation of XML Schema Datatypes
+ * Description: module providing the XML Schema Datatypes implementation
+ * both definition and validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_SCHEMA_TYPES_H__)
+ /define XML_SCHEMA_TYPES_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_SCHEMAS_ENABLED)
+
+ /include "libxmlrpg/schemasInternals"
+ /include "libxmlrpg/xmlschemas"
+
+ d xmlSchemaWhitespaceValueType...
+ d s 10i 0 based(######typedef######) enum
+ d XML_SCHEMA_WHITESPACE_UNKNOWN...
+ d c 0
+ d XML_SCHEMA_WHITESPACE_PRESERVE...
+ d c 1
+ d XML_SCHEMA_WHITESPACE_REPLACE...
+ d c 2
+ d XML_SCHEMA_WHITESPACE_COLLAPSE...
+ d c 3
+
+ d xmlSchemaInitTypes...
+ d pr extproc('xmlSchemaInitTypes')
+
+ d xmlSchemaCleanupTypes...
+ d pr extproc('xmlSchemaCleanupTypes')
+
+ d xmlSchemaGetPredefinedType...
+ d pr extproc('xmlSchemaGetPredefinedType')
+ d like(xmlSchemaTypePtr)
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+
+ d xmlSchemaValidatePredefinedType...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidatePredefinedType')
+ d type value like(xmlSchemaTypePtr)
+ d value * value options(*string) const xmlChar *
+ d val * value xmlSchemaValPtr *
+
+ d xmlSchemaValPredefTypeNode...
+ d pr 10i 0 extproc('xmlSchemaValPredefTypeNode')
+ d type value like(xmlSchemaTypePtr)
+ d value * value options(*string) const xmlChar *
+ d val * value xmlSchemaValPtr *
+ d node value like(xmlNodePtr)
+
+ d xmlSchemaValidateFacet...
+ d pr 10i 0 extproc('xmlSchemaValidateFacet')
+ d base value like(xmlSchemaTypePtr)
+ d facet value like(xmlSchemaFacetPtr)
+ d value * value options(*string) const xmlChar *
+ d val value like(xmlSchemaValPtr)
+
+ d xmlSchemaValidateFacetWhtsp...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidateFacetWhtsp')
+ d facet value like(xmlSchemaFacetPtr)
+ d fws value
+ d like(xmlSchemaWhitespaceValueType)
+ d valType value like(xmlSchemaValType)
+ d value * value options(*string) const xmlChar *
+ d val value like(xmlSchemaValPtr)
+ d ws value
+ d like(xmlSchemaWhitespaceValueType)
+
+ d xmlSchemaFreeValue...
+ d pr extproc('xmlSchemaFreeValue')
+ d val value like(xmlSchemaValPtr)
+
+ d xmlSchemaNewFacet...
+ d pr extproc('xmlSchemaNewFacet')
+ d like(xmlSchemaFacetPtr)
+
+ d xmlSchemaCheckFacet...
+ d pr 10i 0 extproc('xmlSchemaCheckFacet')
+ d facet value like(xmlSchemaFacetPtr)
+ d typeDecl value like(xmlSchemaTypePtr)
+ d ctxt value like(xmlSchemaParserCtxtPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlSchemaFreeFacet...
+ d pr extproc('xmlSchemaFreeFacet')
+ d facet value like(xmlSchemaFacetPtr)
+
+ d xmlSchemaCompareValues...
+ d pr 10i 0 extproc('xmlSchemaCompareValues')
+ d x value like(xmlSchemaValPtr)
+ d y value like(xmlSchemaValPtr)
+
+ d xmlSchemaGetBuiltInListSimpleTypeItemType...
+ d pr extproc('xmlSchemaGetBuiltInListSimp-
+ d leTypeItemType')
+ d like(xmlSchemaTypePtr)
+ d type value like(xmlSchemaTypePtr)
+
+ d xmlSchemaValidateListSimpleTypeFacet...
+ d pr 10i 0 extproc('xmlSchemaValidateListSimple-
+ d TypeFacet')
+ d facet value like(xmlSchemaFacetPtr)
+ d value * value options(*string) const xmlChar *
+ d actualLen 20u 0 value
+ d expectedLen * value unsigned long *
+
+ d xmlSchemaGetBuiltInType...
+ d pr extproc('xmlSchemaGetBuiltInType')
+ d like(xmlSchemaTypePtr)
+ d type value like(xmlSchemaValType)
+
+ d xmlSchemaIsBuiltInTypeFacet...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaIsBuiltInTypeFacet')
+ d type value like(xmlSchemaTypePtr)
+ d facetType 10i 0 value
+
+ d xmlSchemaCollapseString...
+ d pr * extproc('xmlSchemaCollapseString') xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlSchemaWhiteSpaceReplace...
+ d pr * extproc('xmlSchemaWhiteSpaceReplace')xmlChar *
+ d value * value options(*string) const xmlChar *
+
+ d xmlSchemaGetFacetValueAsULong...
+ d pr 20u 0 extproc(
+ d 'xmlSchemaGetFacetValueAsULong')
+ d facet value like(xmlSchemaFacetPtr)
+
+ d xmlSchemaValidateLengthFacet...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidateLengthFacet')
+ d type value like(xmlSchemaTypePtr)
+ d facet value like(xmlSchemaFacetPtr)
+ d value * value options(*string) const xmlChar *
+ d val value like(xmlSchemaValPtr)
+ d length 20u 0
+
+ d xmlSchemaValidateLengthFacetWhtsp...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValidateLengthFacetWhtsp')
+ d facet value like(xmlSchemaFacetPtr)
+ d valType value like(xmlSchemaValType)
+ d value * value options(*string) const xmlChar *
+ d val value like(xmlSchemaValPtr)
+ d length 20u 0
+ d ws value
+ d like(xmlSchemaWhitespaceValueType)
+
+ d xmlSchemaValPredefTypeNodeNoNorm...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaValPredefTypeNodeNoNorm')
+ d type value like(xmlSchemaTypePtr)
+ d value * value options(*string) const xmlChar *
+ d val like(xmlSchemaValPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlSchemaGetCanonValue...
+ d pr 10i 0 extproc('xmlSchemaGetCanonValue')
+ d val value like(xmlSchemaValPtr)
+ d retValue * value const xmlChar * *
+
+ d xmlSchemaGetCanonValueWhtsp...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaGetCanonValueWhtsp')
+ d val value like(xmlSchemaValPtr)
+ d retValue * value const xmlChar * *
+ d ws value
+ d like(xmlSchemaWhitespaceValueType)
+
+ d xmlSchemaValueAppend...
+ d pr 10i 0 extproc('xmlSchemaValueAppend')
+ d prev value like(xmlSchemaValPtr)
+ d cur value like(xmlSchemaValPtr)
+
+ d xmlSchemaValueGetNext...
+ d pr extproc('xmlSchemaValueGetNext')
+ d like(xmlSchemaValPtr)
+ d cur value like(xmlSchemaValPtr)
+
+ d xmlSchemaValueGetAsString...
+ d pr * extproc('xmlSchemaValueGetAsString') const xmlChar *
+ d val value like(xmlSchemaValPtr)
+
+ d xmlSchemaValueGetAsBoolean...
+ d pr 10i 0 extproc('xmlSchemaValueGetAsBoolean')
+ d val value like(xmlSchemaValPtr)
+
+ d xmlSchemaNewStringValue...
+ d pr extproc('xmlSchemaNewStringValue')
+ d like(xmlSchemaValPtr)
+ d type value like(xmlSchemaValType)
+ d value * value options(*string) const xmlChar *
+
+ d xmlSchemaNewNOTATIONValue...
+ d pr extproc('xmlSchemaNewNOTATIONValue')
+ d like(xmlSchemaValPtr)
+ d name * value options(*string) const xmlChar *
+ d ns * value options(*string) const xmlChar *
+
+ d xmlSchemaNewQNameValue...
+ d pr extproc('xmlSchemaNewQNameValue')
+ d like(xmlSchemaValPtr)
+ d namespaceName * value options(*string) const xmlChar *
+ d localName * value options(*string) const xmlChar *
+
+ d xmlSchemaCompareValuesWhtsp...
+ d pr 10i 0 extproc(
+ d 'xmlSchemaCompareValuesWhtsp')
+ d x value like(xmlSchemaValPtr)
+ d xws value
+ d like(xmlSchemaWhitespaceValueType)
+ d y value like(xmlSchemaValPtr)
+ d yws value
+ d like(xmlSchemaWhitespaceValueType)
+
+ d xmlSchemaCopyValue...
+ d pr extproc('xmlSchemaCopyValue')
+ d like(xmlSchemaValPtr)
+ d val value like(xmlSchemaValPtr)
+
+ d xmlSchemaGetValType...
+ d pr extproc('xmlSchemaGetValType')
+ d like(xmlSchemaValType)
+ d val value like(xmlSchemaValPtr)
+
+ /endif LIBXML_SCHEMAS_ENBLD
+ /endif XML_SCHEMA_TYPES_H__
diff --git a/os400/libxmlrpg/xmlstdarg.rpgle b/os400/libxmlrpg/xmlstdarg.rpgle
new file mode 100644
index 0000000..4e6f121
--- /dev/null
+++ b/os400/libxmlrpg/xmlstdarg.rpgle
@@ -0,0 +1,34 @@
+ * Summary: va_list support for ILE/RPG.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_STDARG_H__)
+ /define XML_STDARG_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ * The va_list object.
+
+ d xmlVaList ds based(######typedef######)
+ d align qualified
+ d current *
+ d next *
+
+ * Procedures.
+
+ d xmlVaStart pr extproc('__xmlVaStart')
+ d list like(xmlVaList)
+ d lastargaddr * value
+ d lastargsize 10u 0 value
+
+ d xmlVaArg pr * extproc('__xmlVaArg')
+ d list like(xmlVaList)
+ d dest * value
+ d argsize 10i 0 value
+
+ d xmlVaEnd pr extproc('__xmlVaEnd')
+ d list like(xmlVaList)
+
+ /endif XML_STDARG_H__
diff --git a/os400/libxmlrpg/xmlstring.rpgle b/os400/libxmlrpg/xmlstring.rpgle
new file mode 100644
index 0000000..41e9eb5
--- /dev/null
+++ b/os400/libxmlrpg/xmlstring.rpgle
@@ -0,0 +1,162 @@
+ * Summary: set of routines to process strings
+ * Description: type and interfaces needed for the internal string
+ * handling of the library, especially UTF8 processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_STRING_H__)
+ /define XML_STRING_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xmlstdarg"
+
+ * xmlChar:
+ *
+ * This is a basic byte in an UTF-8 encoded string.
+ * It's unsigned allowing to pinpoint case where char * are assigned
+ * to xmlChar * (possibly making serialization back impossible).
+
+ d xmlChar s 3u 0 based(######typedef######)
+
+ * xmlChar handling
+
+ d xmlStrdup pr * extproc('xmlStrdup') xmlChar *
+ d cur * value options(*string) const xmlChar *
+
+ d xmlStrndup pr * extproc('xmlStrndup') xmlChar *
+ d cur * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlCharStrndup pr * extproc('xmlCharStrndup') xmlChar *
+ d cur * value options(*string) const char *
+ d len 10i 0 value
+
+ d xmlCharStrdup pr * extproc('xmlCharStrdup') xmlChar *
+ d cur * value options(*string) const char *
+
+ d xmlStrsub pr * extproc('xmlStrsub') const xmlChar *
+ d str * value options(*string) const xmlChar *
+ d start 10i 0 value
+ d len 10i 0 value
+
+ d xmlStrchr pr * extproc('xmlStrchr') const xmlChar *
+ d str * value options(*string) const xmlChar *
+ d val value like(xmlChar)
+
+ d xmlStrstr pr * extproc('xmlStrstr') const xmlChar *
+ d str * value options(*string) const xmlChar *
+ d val * value options(*string) const xmlChar *
+
+ d xmlStrcasestr pr * extproc('xmlStrcasestr') const xmlChar *
+ d str * value options(*string) const xmlChar *
+ d val * value options(*string) const xmlChar *
+
+ d xmlStrcmp pr 10i 0 extproc('xmlStrcmp')
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+
+ d xmlStrncmp pr 10i 0 extproc('xmlStrncmp')
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlStrcasecmp pr 10i 0 extproc('xmlStrcasecmp')
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+
+ d xmlStrncasecmp pr 10i 0 extproc('xmlStrncasecmp')
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlStrEqual pr 10i 0 extproc('xmlStrEqual')
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+
+ d xmlStrQEqual pr 10i 0 extproc('xmlStrQEqual')
+ d pref * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d stre * value options(*string) const xmlChar *
+
+ d xmlStrlen pr 10i 0 extproc('xmlStrlen')
+ d str * value options(*string) const xmlChar *
+
+ d xmlStrcat pr * extproc('xmlStrcat') xmlChar *
+ d cur * value options(*string) xmlChar *
+ d add * value options(*string) const xmlChar *
+
+ d xmlStrncat pr * extproc('xmlStrncat') xmlChar *
+ d cur * value options(*string) xmlChar *
+ d add * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlStrncatNew pr * extproc('xmlStrncatNew') xmlChar *
+ d str1 * value options(*string) const xmlChar *
+ d str2 * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ * xmlStrPrintf() is a vararg function.
+ * The following prototype supports up to 8 pointer arguments.
+ * Other argument signature can be achieved by defining alternate
+ * prototypes redirected to the same function.
+
+ d xmlStrPrintf pr 10i 0 extproc('xmlStrPrintf')
+ d buf * value options(*string) xmlChar *
+ d len 10i 0 value
+ d msg * value options(*string) const xmlChar *
+ d arg1 * value options(*string: *nopass)
+ d arg2 * value options(*string: *nopass)
+ d arg3 * value options(*string: *nopass)
+ d arg4 * value options(*string: *nopass)
+ d arg5 * value options(*string: *nopass)
+ d arg6 * value options(*string: *nopass)
+ d arg7 * value options(*string: *nopass)
+ d arg8 * value options(*string: *nopass)
+
+ d xmlStrVPrintf pr 10i 0 extproc('xmlStrVPrintf')
+ d buf * value options(*string) xmlChar *
+ d len 10i 0 value
+ d msg * value options(*string) const xmlChar *
+ d ap likeds(xmlVaList)
+
+ d xmlGetUTF8Char pr 10i 0 extproc('xmlGetUTF8Char')
+ d utf * value options(*string) const uns. char *
+ d len 10i 0
+
+ d xmlCheckUTF8 pr 10i 0 extproc('xmlCheckUTF8')
+ d utf * value options(*string) const uns. char *
+
+ d xmlUTF8Strsize pr 10i 0 extproc('xmlUTF8Strsize')
+ d utf * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlUTF8Strndup pr * extproc('xmlUTF8Strndup') xmlChar *
+ d utf * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlUTF8Strpos pr * extproc('xmlUTF8Strpos') const xmlChar *
+ d utf * value options(*string) const xmlChar *
+ d pos 10i 0 value
+
+ d xmlUTF8Strloc pr 10i 0 extproc('xmlUTF8Strloc')
+ d utf * value options(*string) const xmlChar *
+ d utfchar * value options(*string) const xmlChar *
+
+ d xmlUTF8Strsub pr * extproc('xmlUTF8Strsub') xmlChar *
+ d utf * value options(*string) const xmlChar *
+ d start 10i 0 value
+ d len 10i 0 value
+
+ d xmlUTF8Strlen pr 10i 0 extproc('xmlUTF8Strlen')
+ d utf * value options(*string) const xmlChar *
+
+ d xmlUTF8Size pr 10i 0 extproc('xmlUTF8Size')
+ d utf * value options(*string) const xmlChar *
+
+ d xmlUTF8Charcmp pr 10i 0 extproc('xmlUTF8Charcmp')
+ d utf1 * value options(*string) const xmlChar *
+ d utf2 * value options(*string) const xmlChar *
+
+ /endif XML_STRING_H__
diff --git a/os400/libxmlrpg/xmlunicode.rpgle b/os400/libxmlrpg/xmlunicode.rpgle
new file mode 100644
index 0000000..64f7abf
--- /dev/null
+++ b/os400/libxmlrpg/xmlunicode.rpgle
@@ -0,0 +1,668 @@
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_UNICODE_H__)
+ /define XML_UNICODE_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_UNICODE_ENABLED)
+
+ d xmlUCSIsAegeanNumbers...
+ d pr 10i 0 extproc('xmlUCSIsAegeanNumbers')
+ d code 10i 0 value
+
+ d xmlUCSIsAlphabeticPresentationForms...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsAlphabeticPresentationForms'
+ d )
+ d code 10i 0 value
+
+ d xmlUCSIsArabic pr 10i 0 extproc('xmlUCSIsArabic')
+ d code 10i 0 value
+
+ d xmlUCSIsArabicPresentationFormsA...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsArabicPresentationFormsA')
+ d code 10i 0 value
+
+ d xmlUCSIsArabicPresentationFormsB...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsArabicPresentationFormsB')
+ d code 10i 0 value
+
+ d xmlUCSIsArmenian...
+ d pr 10i 0 extproc('xmlUCSIsArmenian')
+ d code 10i 0 value
+
+ d xmlUCSIsArrows pr 10i 0 extproc('xmlUCSIsArrows')
+ d code 10i 0 value
+
+ d xmlUCSIsBasicLatin...
+ d pr 10i 0 extproc('xmlUCSIsBasicLatin')
+ d code 10i 0 value
+
+ d xmlUCSIsBengali...
+ d pr 10i 0 extproc('xmlUCSIsBengali')
+ d code 10i 0 value
+
+ d xmlUCSIsBlockElements...
+ d pr 10i 0 extproc('xmlUCSIsBlockElements')
+ d code 10i 0 value
+
+ d xmlUCSIsBopomofo...
+ d pr 10i 0 extproc('xmlUCSIsBopomofo')
+ d code 10i 0 value
+
+ d xmlUCSIsBopomofoExtended...
+ d pr 10i 0 extproc('xmlUCSIsBopomofoExtended')
+ d code 10i 0 value
+
+ d xmlUCSIsBoxDrawing...
+ d pr 10i 0 extproc('xmlUCSIsBoxDrawing')
+ d code 10i 0 value
+
+ d xmlUCSIsBraillePatterns...
+ d pr 10i 0 extproc('xmlUCSIsBraillePatterns')
+ d code 10i 0 value
+
+ d xmlUCSIsBuhid pr 10i 0 extproc('xmlUCSIsBuhid')
+ d code 10i 0 value
+
+ d xmlUCSIsByzantineMusicalSymbols...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsByzantineMusicalSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKCompatibility...
+ d pr 10i 0 extproc('xmlUCSIsCJKCompatibility')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKCompatibilityForms...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCJKCompatibilityForms')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKCompatibilityIdeographs...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCJKCompatibilityIdeographs')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKCompatibilityIdeographsSupplement...
+ d pr 10i 0 extproc('xmlUCSIsCJKCompatibilityIde-
+ d ographsSupplement')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKRadicalsSupplement...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCJKRadicalsSupplement')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKSymbolsandPunctuation...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCJKSymbolsandPunctuation')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKUnifiedIdeographs...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCJKUnifiedIdeographs')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKUnifiedIdeographsExtensionA...
+ d pr 10i 0 extproc('xmlUCSIsCJKUnifiedIdeograph-
+ d sExtensionA')
+ d code 10i 0 value
+
+ d xmlUCSIsCJKUnifiedIdeographsExtensionB...
+ d pr 10i 0 extproc('xmlUCSIsCJKUnifiedIdeograph-
+ d sExtensionB')
+ d code 10i 0 value
+
+ d xmlUCSIsCherokee...
+ d pr 10i 0 extproc('xmlUCSIsCherokee')
+ d code 10i 0 value
+
+ d xmlUCSIsCombiningDiacriticalMarks...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCombiningDiacriticalMarks')
+ d code 10i 0 value
+
+ d xmlUCSIsCombiningDiacriticalMarksforSymbols...
+ d pr 10i 0 extproc('xmlUCSIsCombiningDiacritica-
+ d lMarksforSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsCombiningHalfMarks...
+ d pr 10i 0 extproc('xmlUCSIsCombiningHalfMarks')
+ d code 10i 0 value
+
+ d xmlUCSIsCombiningMarksforSymbols...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsCombiningMarksforSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsControlPictures...
+ d pr 10i 0 extproc('xmlUCSIsControlPictures')
+ d code 10i 0 value
+
+ d xmlUCSIsCurrencySymbols...
+ d pr 10i 0 extproc('xmlUCSIsCurrencySymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsCypriotSyllabary...
+ d pr 10i 0 extproc('xmlUCSIsCypriotSyllabary')
+ d code 10i 0 value
+
+ d xmlUCSIsCyrillic...
+ d pr 10i 0 extproc('xmlUCSIsCyrillic')
+ d code 10i 0 value
+
+ d xmlUCSIsCyrillicSupplement...
+ d pr 10i 0 extproc('xmlUCSIsCyrillicSupplement')
+ d code 10i 0 value
+
+ d xmlUCSIsDeseret...
+ d pr 10i 0 extproc('xmlUCSIsDeseret')
+ d code 10i 0 value
+
+ d xmlUCSIsDevanagari...
+ d pr 10i 0 extproc('xmlUCSIsDevanagari')
+ d code 10i 0 value
+
+ d xmlUCSIsDingbats...
+ d pr 10i 0 extproc('xmlUCSIsDingbats')
+ d code 10i 0 value
+
+ d xmlUCSIsEnclosedAlphanumerics...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsEnclosedAlphanumerics')
+ d code 10i 0 value
+
+ d xmlUCSIsEnclosedCJKLettersandMonths...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsEnclosedCJKLettersandMonths'
+ d )
+ d code 10i 0 value
+
+ d xmlUCSIsEthiopic...
+ d pr 10i 0 extproc('xmlUCSIsEthiopic')
+ d code 10i 0 value
+
+ d xmlUCSIsGeneralPunctuation...
+ d pr 10i 0 extproc('xmlUCSIsGeneralPunctuation')
+ d code 10i 0 value
+
+ d xmlUCSIsGeometricShapes...
+ d pr 10i 0 extproc('xmlUCSIsGeometricShapes')
+ d code 10i 0 value
+
+ d xmlUCSIsGeorgian...
+ d pr 10i 0 extproc('xmlUCSIsGeorgian')
+ d code 10i 0 value
+
+ d xmlUCSIsGothic pr 10i 0 extproc('xmlUCSIsGothic')
+ d code 10i 0 value
+
+ d xmlUCSIsGreek pr 10i 0 extproc('xmlUCSIsGreek')
+ d code 10i 0 value
+
+ d xmlUCSIsGreekExtended...
+ d pr 10i 0 extproc('xmlUCSIsGreekExtended')
+ d code 10i 0 value
+
+ d xmlUCSIsGreekandCoptic...
+ d pr 10i 0 extproc('xmlUCSIsGreekandCoptic')
+ d code 10i 0 value
+
+ d xmlUCSIsGujarati...
+ d pr 10i 0 extproc('xmlUCSIsGujarati')
+ d code 10i 0 value
+
+ d xmlUCSIsGurmukhi...
+ d pr 10i 0 extproc('xmlUCSIsGurmukhi')
+ d code 10i 0 value
+
+ d xmlUCSIsHalfwidthandFullwidthForms...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsHalfwidthandFullwidthForms')
+ d code 10i 0 value
+
+ d xmlUCSIsHangulCompatibilityJamo...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsHangulCompatibilityJamo')
+ d code 10i 0 value
+
+ d xmlUCSIsHangulJamo...
+ d pr 10i 0 extproc('xmlUCSIsHangulJamo')
+ d code 10i 0 value
+
+ d xmlUCSIsHangulSyllables...
+ d pr 10i 0 extproc('xmlUCSIsHangulSyllables')
+ d code 10i 0 value
+
+ d xmlUCSIsHanunoo...
+ d pr 10i 0 extproc('xmlUCSIsHanunoo')
+ d code 10i 0 value
+
+ d xmlUCSIsHebrew pr 10i 0 extproc('xmlUCSIsHebrew')
+ d code 10i 0 value
+
+ d xmlUCSIsHighPrivateUseSurrogates...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsHighPrivateUseSurrogates')
+ d code 10i 0 value
+
+ d xmlUCSIsHighSurrogates...
+ d pr 10i 0 extproc('xmlUCSIsHighSurrogates')
+ d code 10i 0 value
+
+ d xmlUCSIsHiragana...
+ d pr 10i 0 extproc('xmlUCSIsHiragana')
+ d code 10i 0 value
+
+ d xmlUCSIsIPAExtensions...
+ d pr 10i 0 extproc('xmlUCSIsIPAExtensions')
+ d code 10i 0 value
+
+ d xmlUCSIsIdeographicDescriptionCharacters...
+ d pr 10i 0 extproc('xmlUCSIsIdeographicDescript-
+ d ionCharacters')
+ d code 10i 0 value
+
+ d xmlUCSIsKanbun pr 10i 0 extproc('xmlUCSIsKanbun')
+ d code 10i 0 value
+
+ d xmlUCSIsKangxiRadicals...
+ d pr 10i 0 extproc('xmlUCSIsKangxiRadicals')
+ d code 10i 0 value
+
+ d xmlUCSIsKannada...
+ d pr 10i 0 extproc('xmlUCSIsKannada')
+ d code 10i 0 value
+
+ d xmlUCSIsKatakana...
+ d pr 10i 0 extproc('xmlUCSIsKatakana')
+ d code 10i 0 value
+
+ d xmlUCSIsKatakanaPhoneticExtensions...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsKatakanaPhoneticExtensions')
+ d code 10i 0 value
+
+ d xmlUCSIsKhmer pr 10i 0 extproc('xmlUCSIsKhmer')
+ d code 10i 0 value
+
+ d xmlUCSIsKhmerSymbols...
+ d pr 10i 0 extproc('xmlUCSIsKhmerSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsLao pr 10i 0 extproc('xmlUCSIsLao')
+ d code 10i 0 value
+
+ d xmlUCSIsLatin1Supplement...
+ d pr 10i 0 extproc('xmlUCSIsLatin1Supplement')
+ d code 10i 0 value
+
+ d xmlUCSIsLatinExtendedA...
+ d pr 10i 0 extproc('xmlUCSIsLatinExtendedA')
+ d code 10i 0 value
+
+ d xmlUCSIsLatinExtendedB...
+ d pr 10i 0 extproc('xmlUCSIsLatinExtendedB')
+ d code 10i 0 value
+
+ d xmlUCSIsLatinExtendedAdditional...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsLatinExtendedAdditional')
+ d code 10i 0 value
+
+ d xmlUCSIsLetterlikeSymbols...
+ d pr 10i 0 extproc('xmlUCSIsLetterlikeSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsLimbu pr 10i 0 extproc('xmlUCSIsLimbu')
+ d code 10i 0 value
+
+ d xmlUCSIsLinearBIdeograms...
+ d pr 10i 0 extproc('xmlUCSIsLinearBIdeograms')
+ d code 10i 0 value
+
+ d xmlUCSIsLinearBSyllabary...
+ d pr 10i 0 extproc('xmlUCSIsLinearBSyllabary')
+ d code 10i 0 value
+
+ d xmlUCSIsLowSurrogates...
+ d pr 10i 0 extproc('xmlUCSIsLowSurrogates')
+ d code 10i 0 value
+
+ d xmlUCSIsMalayalam...
+ d pr 10i 0 extproc('xmlUCSIsMalayalam')
+ d code 10i 0 value
+
+ d xmlUCSIsMathematicalAlphanumericSymbols...
+ d pr 10i 0 extproc('xmlUCSIsMathematicalAlphanu-
+ d mericSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsMathematicalOperators...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsMathematicalOperators')
+ d code 10i 0 value
+
+ d xmlUCSIsMiscellaneousMathematicalSymbolsA...
+ d pr 10i 0 extproc('xmlUCSIsMiscellaneousMathem-
+ d aticalSymbolsA')
+ d code 10i 0 value
+
+ d xmlUCSIsMiscellaneousMathematicalSymbolsB...
+ d pr 10i 0 extproc('xmlUCSIsMiscellaneousMathem-
+ d aticalSymbolsB')
+ d code 10i 0 value
+
+ d xmlUCSIsMiscellaneousSymbols...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsMiscellaneousSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsMiscellaneousSymbolsandArrows...
+ d pr 10i 0 extproc('xmlUCSIsMiscellaneousSymbol-
+ d sandArrows')
+ d code 10i 0 value
+
+ d xmlUCSIsMiscellaneousTechnical...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsMiscellaneousTechnical')
+ d code 10i 0 value
+
+ d xmlUCSIsMongolian...
+ d pr 10i 0 extproc('xmlUCSIsMongolian')
+ d code 10i 0 value
+
+ d xmlUCSIsMusicalSymbols...
+ d pr 10i 0 extproc('xmlUCSIsMusicalSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsMyanmar...
+ d pr 10i 0 extproc('xmlUCSIsMyanmar')
+ d code 10i 0 value
+
+ d xmlUCSIsNumberForms...
+ d pr 10i 0 extproc('xmlUCSIsNumberForms')
+ d code 10i 0 value
+
+ d xmlUCSIsOgham pr 10i 0 extproc('xmlUCSIsOgham')
+ d code 10i 0 value
+
+ d xmlUCSIsOldItalic...
+ d pr 10i 0 extproc('xmlUCSIsOldItalic')
+ d code 10i 0 value
+
+ d xmlUCSIsOpticalCharacterRecognition...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsOpticalCharacterRecognition'
+ d )
+ d code 10i 0 value
+
+ d xmlUCSIsOriya pr 10i 0 extproc('xmlUCSIsOriya')
+ d code 10i 0 value
+
+ d xmlUCSIsOsmanya...
+ d pr 10i 0 extproc('xmlUCSIsOsmanya')
+ d code 10i 0 value
+
+ d xmlUCSIsPhoneticExtensions...
+ d pr 10i 0 extproc('xmlUCSIsPhoneticExtensions')
+ d code 10i 0 value
+
+ d xmlUCSIsPrivateUse...
+ d pr 10i 0 extproc('xmlUCSIsPrivateUse')
+ d code 10i 0 value
+
+ d xmlUCSIsPrivateUseArea...
+ d pr 10i 0 extproc('xmlUCSIsPrivateUseArea')
+ d code 10i 0 value
+
+ d xmlUCSIsRunic pr 10i 0 extproc('xmlUCSIsRunic')
+ d code 10i 0 value
+
+ d xmlUCSIsShavian...
+ d pr 10i 0 extproc('xmlUCSIsShavian')
+ d code 10i 0 value
+
+ d xmlUCSIsSinhala...
+ d pr 10i 0 extproc('xmlUCSIsSinhala')
+ d code 10i 0 value
+
+ d xmlUCSIsSmallFormVariants...
+ d pr 10i 0 extproc('xmlUCSIsSmallFormVariants')
+ d code 10i 0 value
+
+ d xmlUCSIsSpacingModifierLetters...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsSpacingModifierLetters')
+ d code 10i 0 value
+
+ d xmlUCSIsSpecials...
+ d pr 10i 0 extproc('xmlUCSIsSpecials')
+ d code 10i 0 value
+
+ d xmlUCSIsSuperscriptsandSubscripts...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsSuperscriptsandSubscripts')
+ d code 10i 0 value
+
+ d xmlUCSIsSupplementalArrowsA...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsSupplementalArrowsA')
+ d code 10i 0 value
+
+ d xmlUCSIsSupplementalArrowsB...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsSupplementalArrowsB')
+ d code 10i 0 value
+
+ d xmlUCSIsSupplementalMathematicalOperators...
+ d pr 10i 0 extproc('xmlUCSIsSupplementalMathema-
+ d ticalOperators')
+ d code 10i 0 value
+
+ d xmlUCSIsSupplementaryPrivateUseAreaA...
+ d pr 10i 0 extproc('xmlUCSIsSupplementaryPrivat-
+ d eUseAreaA')
+ d code 10i 0 value
+
+ d xmlUCSIsSupplementaryPrivateUseAreaB...
+ d pr 10i 0 extproc('xmlUCSIsSupplementaryPrivat-
+ d eUseAreaB')
+ d code 10i 0 value
+
+ d xmlUCSIsSyriac pr 10i 0 extproc('xmlUCSIsSyriac')
+ d code 10i 0 value
+
+ d xmlUCSIsTagalog...
+ d pr 10i 0 extproc('xmlUCSIsTagalog')
+ d code 10i 0 value
+
+ d xmlUCSIsTagbanwa...
+ d pr 10i 0 extproc('xmlUCSIsTagbanwa')
+ d code 10i 0 value
+
+ d xmlUCSIsTags pr 10i 0 extproc('xmlUCSIsTags')
+ d code 10i 0 value
+
+ d xmlUCSIsTaiLe pr 10i 0 extproc('xmlUCSIsTaiLe')
+ d code 10i 0 value
+
+ d xmlUCSIsTaiXuanJingSymbols...
+ d pr 10i 0 extproc('xmlUCSIsTaiXuanJingSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsTamil pr 10i 0 extproc('xmlUCSIsTamil')
+ d code 10i 0 value
+
+ d xmlUCSIsTelugu pr 10i 0 extproc('xmlUCSIsTelugu')
+ d code 10i 0 value
+
+ d xmlUCSIsThaana pr 10i 0 extproc('xmlUCSIsThaana')
+ d code 10i 0 value
+
+ d xmlUCSIsThai pr 10i 0 extproc('xmlUCSIsThai')
+ d code 10i 0 value
+
+ d xmlUCSIsTibetan...
+ d pr 10i 0 extproc('xmlUCSIsTibetan')
+ d code 10i 0 value
+
+ d xmlUCSIsUgaritic...
+ d pr 10i 0 extproc('xmlUCSIsUgaritic')
+ d code 10i 0 value
+
+ d xmlUCSIsUnifiedCanadianAboriginalSyllabics...
+ d pr 10i 0 extproc('xmlUCSIsUnifiedCanadianAbor-
+ d iginalSyllabics')
+ d code 10i 0 value
+
+ d xmlUCSIsVariationSelectors...
+ d pr 10i 0 extproc('xmlUCSIsVariationSelectors')
+ d code 10i 0 value
+
+ d xmlUCSIsVariationSelectorsSupplement...
+ d pr 10i 0 extproc('xmlUCSIsVariationSelectorsS-
+ d upplement')
+ d code 10i 0 value
+
+ d xmlUCSIsYiRadicals...
+ d pr 10i 0 extproc('xmlUCSIsYiRadicals')
+ d code 10i 0 value
+
+ d xmlUCSIsYiSyllables...
+ d pr 10i 0 extproc('xmlUCSIsYiSyllables')
+ d code 10i 0 value
+
+ d xmlUCSIsYijingHexagramSymbols...
+ d pr 10i 0 extproc(
+ d 'xmlUCSIsYijingHexagramSymbols')
+ d code 10i 0 value
+
+ d xmlUCSIsBlock pr 10i 0 extproc('xmlUCSIsBlock')
+ d code 10i 0 value
+ d block * value options(*string) const char *
+
+ d xmlUCSIsCatC pr 10i 0 extproc('xmlUCSIsCatC')
+ d code 10i 0 value
+
+ d xmlUCSIsCatCc pr 10i 0 extproc('xmlUCSIsCatCc')
+ d code 10i 0 value
+
+ d xmlUCSIsCatCf pr 10i 0 extproc('xmlUCSIsCatCf')
+ d code 10i 0 value
+
+ d xmlUCSIsCatCo pr 10i 0 extproc('xmlUCSIsCatCo')
+ d code 10i 0 value
+
+ d xmlUCSIsCatCs pr 10i 0 extproc('xmlUCSIsCatCs')
+ d code 10i 0 value
+
+ d xmlUCSIsCatL pr 10i 0 extproc('xmlUCSIsCatL')
+ d code 10i 0 value
+
+ d xmlUCSIsCatLl pr 10i 0 extproc('xmlUCSIsCatLl')
+ d code 10i 0 value
+
+ d xmlUCSIsCatLm pr 10i 0 extproc('xmlUCSIsCatLm')
+ d code 10i 0 value
+
+ d xmlUCSIsCatLo pr 10i 0 extproc('xmlUCSIsCatLo')
+ d code 10i 0 value
+
+ d xmlUCSIsCatLt pr 10i 0 extproc('xmlUCSIsCatLt')
+ d code 10i 0 value
+
+ d xmlUCSIsCatLu pr 10i 0 extproc('xmlUCSIsCatLu')
+ d code 10i 0 value
+
+ d xmlUCSIsCatM pr 10i 0 extproc('xmlUCSIsCatM')
+ d code 10i 0 value
+
+ d xmlUCSIsCatMc pr 10i 0 extproc('xmlUCSIsCatMc')
+ d code 10i 0 value
+
+ d xmlUCSIsCatMe pr 10i 0 extproc('xmlUCSIsCatMe')
+ d code 10i 0 value
+
+ d xmlUCSIsCatMn pr 10i 0 extproc('xmlUCSIsCatMn')
+ d code 10i 0 value
+
+ d xmlUCSIsCatN pr 10i 0 extproc('xmlUCSIsCatN')
+ d code 10i 0 value
+
+ d xmlUCSIsCatNd pr 10i 0 extproc('xmlUCSIsCatNd')
+ d code 10i 0 value
+
+ d xmlUCSIsCatNl pr 10i 0 extproc('xmlUCSIsCatNl')
+ d code 10i 0 value
+
+ d xmlUCSIsCatNo pr 10i 0 extproc('xmlUCSIsCatNo')
+ d code 10i 0 value
+
+ d xmlUCSIsCatP pr 10i 0 extproc('xmlUCSIsCatP')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPc pr 10i 0 extproc('xmlUCSIsCatPc')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPd pr 10i 0 extproc('xmlUCSIsCatPd')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPe pr 10i 0 extproc('xmlUCSIsCatPe')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPf pr 10i 0 extproc('xmlUCSIsCatPf')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPi pr 10i 0 extproc('xmlUCSIsCatPi')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPo pr 10i 0 extproc('xmlUCSIsCatPo')
+ d code 10i 0 value
+
+ d xmlUCSIsCatPs pr 10i 0 extproc('xmlUCSIsCatPs')
+ d code 10i 0 value
+
+ d xmlUCSIsCatS pr 10i 0 extproc('xmlUCSIsCatS')
+ d code 10i 0 value
+
+ d xmlUCSIsCatSc pr 10i 0 extproc('xmlUCSIsCatSc')
+ d code 10i 0 value
+
+ d xmlUCSIsCatSk pr 10i 0 extproc('xmlUCSIsCatSk')
+ d code 10i 0 value
+
+ d xmlUCSIsCatSm pr 10i 0 extproc('xmlUCSIsCatSm')
+ d code 10i 0 value
+
+ d xmlUCSIsCatSo pr 10i 0 extproc('xmlUCSIsCatSo')
+ d code 10i 0 value
+
+ d xmlUCSIsCatZ pr 10i 0 extproc('xmlUCSIsCatZ')
+ d code 10i 0 value
+
+ d xmlUCSIsCatZl pr 10i 0 extproc('xmlUCSIsCatZl')
+ d code 10i 0 value
+
+ d xmlUCSIsCatZp pr 10i 0 extproc('xmlUCSIsCatZp')
+ d code 10i 0 value
+
+ d xmlUCSIsCatZs pr 10i 0 extproc('xmlUCSIsCatZs')
+ d code 10i 0 value
+
+ d xmlUCSIsCat pr 10i 0 extproc('xmlUCSIsCat')
+ d code 10i 0 value
+ d cat * value options(*string) const char *
+
+ /endif LIBXML_UNICODE_ENBLD
+ /endif XML_UNICODE_H__
diff --git a/os400/libxmlrpg/xmlversion.rpgle.in b/os400/libxmlrpg/xmlversion.rpgle.in
new file mode 100644
index 0000000..81676be
--- /dev/null
+++ b/os400/libxmlrpg/xmlversion.rpgle.in
@@ -0,0 +1,352 @@
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_VERSION_H__)
+ /define XML_VERSION_H__
+
+ /include "libxmlrpg/xmlexports"
+
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+
+
+ d xmlCheckVersion...
+ d pr extproc('xmlCheckVersion')
+ d version 10i 0 value
+
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+
+ d LIBXML_DOTTED_VERSION...
+ d c '@VERSION@'
+
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+
+ d LIBXML_VERSION c @LIBXML_VERSION_NUMBER@
+
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+
+ d LIBXML_VERSION_STRING...
+ d c '@LIBXML_VERSION_NUMBER@'
+
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+
+ d LIBXML_VERSION_EXTRA...
+ d c '@LIBXML_VERSION_EXTRA@'
+
+ * For conditional compilation
+ /define DEFINED_1
+ /undefine DEFINED_0
+
+ /if defined(DEFINED_@WITH_TRIO@)
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+
+ /define WITH_TRIO
+ /else
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+
+ /define WITHOUT_TRIO
+ /endif
+
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+
+ /if defined(DEFINED_@WITH_THREADS@)
+ /define LIBXML_THREAD_ENABLED
+ /endif
+
+ * LIBXML_THREAD_ALLOC_ENABLED:
+ *
+ * Whether the allocation hooks are per-thread
+
+ /if defined(DEFINED_@WITH_THREAD_ALLOC@)
+ /define LIBXML_THREAD_ALLOC_ENABLED
+ /endif
+
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+
+ /if defined(DEFINED_@WITH_TREE@)
+ /define LIBXML_TREE_ENABLED
+ /endif
+
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+
+ /if defined(DEFINED_@WITH_OUTPUT@)
+ /define LIBXML_OUTPUT_ENABLED
+ /endif
+
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+
+ /if defined(DEFINED_@WITH_PUSH@)
+ /define LIBXML_PUSH_ENABLED
+ /endif
+
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+
+ /if defined(DEFINED_@WITH_READER@)
+ /define LIBXML_READER_ENABLED
+ /endif
+
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+
+ /if defined(DEFINED_@WITH_PATTERN@)
+ /define LIBXML_PATTERN_ENABLED
+ /endif
+
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+
+ /if defined(DEFINED_@WITH_WRITER@)
+ /define LIBXML_WRITER_ENABLED
+ /endif
+
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+
+ /if defined(DEFINED_@WITH_SAX1@)
+ /define LIBXML_SAX1_ENABLED
+ /endif
+
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+
+ /if defined(DEFINED_@WITH_FTP@)
+ /define LIBXML_FTP_ENABLED
+ /endif
+
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+
+ /if defined(DEFINED_@WITH_HTTP@)
+ /define LIBXML_HTTP_ENABLED
+ /endif
+
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+
+ /if defined(DEFINED_@WITH_VALID@)
+ /define LIBXML_VALID_ENABLED
+ /endif
+
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+
+ /if defined(DEFINED_@WITH_HTML@)
+ /define LIBXML_HTML_ENABLED
+ /endif
+
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+
+ /if defined(DEFINED_@WITH_LEGACY@)
+ /define LIBXML_LEGACY_ENABLED
+ /endif
+
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+
+ /if defined(DEFINED_@WITH_C14N@)
+ /define LIBXML_C14N_ENABLED
+ /endif
+
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+
+ /if defined(DEFINED_@WITH_CATALOG@)
+ /define LIBXML_CATALOG_ENABLED
+ /endif
+
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+
+ /if defined(DEFINED_@WITH_DOCB@)
+ /define LIBXML_DOCB_ENABLED
+ /endif
+
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+
+ /if defined(DEFINED_@WITH_XPATH@)
+ /define LIBXML_XPATH_ENABLED
+ /endif
+
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+
+ /if defined(DEFINED_@WITH_XPTR@)
+ /define LIBXML_XPTR_ENABLED
+ /endif
+
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+
+ /if defined(DEFINED_@WITH_XINCLUDE@)
+ /define LIBXML_XINCLUDE_ENABLED
+ /endif
+
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+
+ /if defined(DEFINED_@WITH_ICONV@)
+ /define LIBXML_ICONV_ENABLED
+ /endif
+
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+
+ /if defined(DEFINED_@WITH_ICU@)
+ /define LIBXML_ICU_ENABLED
+ /endif
+
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+
+ /if defined(DEFINED_@WITH_ISO8859X@)
+ /define LIBXML_ISO8859X_ENABLED
+ /endif
+
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+
+ /if defined(DEFINED_@WITH_DEBUG@)
+ /define LIBXML_DEBUG_ENABLED
+ /endif
+
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+
+ /if defined(DEFINED_@WITH_MEM_DEBUG@)
+ /define DEBUG_MEMORY_LOCATION
+ /endif
+
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+
+ /if defined(DEFINED_@WITH_RUN_DEBUG@)
+ /define LIBXML_DEBUG_RUNTIME
+ /endif
+
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_REGEXPS@)
+ /define LIBXML_UNICODE_ENABLED
+ /endif
+
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_REGEXPS@)
+ /define LIBXML_REGEXP_ENABLED
+ /endif
+
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_REGEXPS@)
+ /define LIBXML_AUTOMATA_ENABLED
+ /endif
+
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_SCHEMAS@)
+ /define LIBXML_EXPR_ENABLED
+ /endif
+
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_SCHEMAS@)
+ /define LIBXML_SCHEMAS_ENABLED
+ /endif
+
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_SCHEMATRON@)
+ /define LIBXML_SCHEMATRON_ENABLED
+ /endif
+
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+
+ /if defined(DEFINED_@WITH_MODULES@)
+ /define LIBXML_MODULES_ENABLED
+
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+
+ d LIBXML_MODULE_EXTENSION...
+ d c '.SRVPGM'
+ /endif
+
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+
+ /if defined(DEFINED_@WITH_ZLIB@)
+ /define LIBXML_ZLIB_ENABLED
+ /endif
+
+ * LIBXML_LZMA_ENABLED:
+ *
+ * Whether the Lzma support is compiled in
+
+ /if defined(DEFINED_@WITH_LZMA@)
+ /define LIBXML_LZMA_ENABLED
+ /endif
+ /endif
diff --git a/os400/libxmlrpg/xmlwriter.rpgle b/os400/libxmlrpg/xmlwriter.rpgle
new file mode 100644
index 0000000..f2d3d30
--- /dev/null
+++ b/os400/libxmlrpg/xmlwriter.rpgle
@@ -0,0 +1,725 @@
+ * Summary: text writing API for XML
+ * Description: text writing API for XML
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XMLWRITER_H__)
+ /define XML_XMLWRITER_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_WRITER_ENABLED)
+
+ /include "libxmlrpg/xmlstdarg"
+ /include "libxmlrpg/xmlIO"
+ /include "libxmlrpg/list"
+ /include "libxmlrpg/xmlstring"
+
+ d xmlTextWriterPtr...
+ d s * based(######typedef######)
+
+ * Constructors & Destructor
+
+ d xmlNewTextWriter...
+ d pr extproc('xmlNewTextWriter')
+ d like(xmlTextWriterPtr)
+ d out value like(xmlOutputBufferPtr)
+
+ d xmlNewTextWriterFilename...
+ d pr extproc('xmlNewTextWriterFilename')
+ d like(xmlTextWriterPtr)
+ d uri * value options(*string) const char *
+ d compression 10i 0 value
+
+ d xmlNewTextWriterMemory...
+ d pr extproc('xmlNewTextWriterMemory')
+ d like(xmlTextWriterPtr)
+ d buf value like(xmlBufferPtr)
+ d compression 10i 0 value
+
+ d xmlNewTextWriterPushParser...
+ d pr extproc('xmlNewTextWriterPushParser')
+ d like(xmlTextWriterPtr)
+ d ctxt value like(xmlParserCtxtPtr)
+ d compression 10i 0 value
+
+ d xmlNewTextWriterDoc...
+ d pr extproc('xmlNewTextWriterDoc')
+ d like(xmlTextWriterPtr)
+ d doc like(xmlDocPtr)
+ d compression 10i 0 value
+
+ d xmlNewTextWriterTree...
+ d pr extproc('xmlNewTextWriterTree')
+ d like(xmlTextWriterPtr)
+ d doc value like(xmlDocPtr)
+ d node value like(xmlNodePtr)
+ d compression 10i 0 value
+
+ d xmlFreeTextWriter...
+ d pr extproc('xmlFreeTextWriter')
+ d writer value like(xmlTextWriterPtr)
+
+ * Functions
+
+ * Document
+
+ d xmlTextWriterStartDocument...
+ d pr 10i 0 extproc('xmlTextWriterStartDocument')
+ d writer value like(xmlTextWriterPtr)
+ d version * value options(*string) const char *
+ d encoding * value options(*string) const char *
+ d standalone * value options(*string) const char *
+
+ d xmlTextWriterEndDocument...
+ d pr 10i 0 extproc('xmlTextWriterEndDocument')
+ d writer value like(xmlTextWriterPtr)
+
+ * Comments
+
+ d xmlTextWriterStartComment...
+ d pr 10i 0 extproc('xmlTextWriterStartComment')
+ d writer value like(xmlTextWriterPtr)
+
+ d xmlTextWriterEndComment...
+ d pr 10i 0 extproc('xmlTextWriterEndComment')
+ d writer value like(xmlTextWriterPtr)
+
+ d xmlTextWriterWriteFormatComment...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatComment')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string: *nopass) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatComment...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatComment')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteComment...
+ d pr 10i 0 extproc('xmlTextWriterWriteComment')
+ d writer value like(xmlTextWriterPtr)
+ d content * value options(*string) const xmlChar *
+
+ * Elements
+
+ d xmlTextWriterStartElement...
+ d pr 10i 0 extproc('xmlTextWriterStartElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextWriterStartElementNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartElementNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndElement...
+ d pr 10i 0 extproc('xmlTextWriterEndElement')
+ d writer value like(xmlTextWriterPtr)
+
+ d xmlTextWriterFullEndElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterFullEndElement')
+ d writer value like(xmlTextWriterPtr)
+
+ * Elements conveniency functions
+
+ d xmlTextWriterWriteFormatElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteElement...
+ d pr 10i 0 extproc('xmlTextWriterWriteElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteFormatElementNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatElementNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatElementNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatElementNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteElementNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteElementNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * Text
+
+ d xmlTextWriterWriteFormatRaw...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatRaw')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatRaw...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatRaw')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteRawLen...
+ d pr 10i 0 extproc('xmlTextWriterWriteRawLen')
+ d writer value like(xmlTextWriterPtr)
+ d content * value options(*string) const xmlChar *
+ d len 10i 0 value
+
+ d xmlTextWriterWriteRaw...
+ d pr 10i 0 extproc('xmlTextWriterWriteRaw')
+ d writer value like(xmlTextWriterPtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteFormatString...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatString')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatString...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatString')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteString...
+ d pr 10i 0 extproc('xmlTextWriterWriteString')
+ d writer value like(xmlTextWriterPtr)
+ d content * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteBase64...
+ d pr 10i 0 extproc('xmlTextWriterWriteBase64')
+ d writer value like(xmlTextWriterPtr)
+ d data * value options(*string) const char *
+ d start 10i 0 value
+ d len 10i 0 value
+
+ d xmlTextWriterWriteBinHex...
+ d pr 10i 0 extproc('xmlTextWriterWriteBinHex')
+ d writer value like(xmlTextWriterPtr)
+ d data * value options(*string) const char *
+ d start 10i 0 value
+ d len 10i 0 value
+
+ * Attributes
+
+ d xmlTextWriterStartAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartAttribute')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextWriterStartAttributeNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartAttributeNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndAttribute...
+ d pr 10i 0 extproc('xmlTextWriterEndAttribute')
+ d writer value like(xmlTextWriterPtr)
+
+ * Attributes conveniency functions
+
+ d xmlTextWriterWriteFormatAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatAttribute')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatAttribute')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteAttribute...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteAttribute')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteFormatAttributeNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatAttributeNS'
+ d )
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatAttributeNS...
+ d pr 10i 0 extproc('xmlTextWriterWriteVFormatAt-
+ d tributeNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteAttributeNS...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteAttributeNS')
+ d writer value like(xmlTextWriterPtr)
+ d prefix * value options(*string) const xmlChar *
+ d name * value options(*string) const xmlChar *
+ d namespaceURI * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * PI's
+
+ d xmlTextWriterStartPI...
+ d pr 10i 0 extproc('xmlTextWriterStartPI')
+ d writer value like(xmlTextWriterPtr)
+ d target * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndPI...
+ d pr 10i 0 extproc('xmlTextWriterEndPI')
+ d writer value like(xmlTextWriterPtr)
+
+ * PI conveniency functions
+
+ d xmlTextWriterWriteFormatPI...
+ d pr 10i 0 extproc('xmlTextWriterWriteFormatPI')
+ d writer value like(xmlTextWriterPtr)
+ d target * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatPI...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatPI')
+ d writer value like(xmlTextWriterPtr)
+ d target * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWritePI...
+ d pr 10i 0 extproc('xmlTextWriterWritePI')
+ d writer value like(xmlTextWriterPtr)
+ d target * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * xmlTextWriterWriteProcessingInstruction:
+ *
+ * This macro maps to xmlTextWriterWritePI
+
+ d xmlTextWriterWriteProcessingInstruction...
+ d pr 10i 0 extproc('xmlTextWriterWritePI')
+ d writer value like(xmlTextWriterPtr)
+ d target * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * CDATA
+
+ d xmlTextWriterStartCDATA...
+ d pr 10i 0 extproc('xmlTextWriterStartCDATA')
+ d writer value like(xmlTextWriterPtr)
+
+ d xmlTextWriterEndCDATA...
+ d pr 10i 0 extproc('xmlTextWriterEndCDATA')
+ d writer value like(xmlTextWriterPtr)
+
+ * CDATA conveniency functions
+
+ d xmlTextWriterWriteFormatCDATA...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatCDATA')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatCDATA...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatCDATA')
+ d writer value like(xmlTextWriterPtr)
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteCDATA...
+ d pr 10i 0 extproc('xmlTextWriterWriteCDATA')
+ d writer value like(xmlTextWriterPtr)
+ d content * value options(*string) const xmlChar *
+
+ * DTD
+
+ d xmlTextWriterStartDTD...
+ d pr 10i 0 extproc('xmlTextWriterStartDTD')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndDTD...
+ d pr 10i 0 extproc('xmlTextWriterEndDTD')
+ d writer value like(xmlTextWriterPtr)
+
+ * DTD conveniency functions
+
+ d xmlTextWriterWriteFormatDTD...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatDTD')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatDTD...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatDTD')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteDTD...
+ d pr 10i 0 extproc('xmlTextWriterWriteDTD')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d subset * value options(*string) const xmlChar *
+
+ * xmlTextWriterWriteDocType:
+ *
+ * this macro maps to xmlTextWriterWriteDTD
+
+ d xmlTextWriterWriteDocType...
+ d pr 10i 0 extproc('xmlTextWriterWriteDTD')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d subset * value options(*string) const xmlChar *
+
+ * DTD element definition
+
+ d xmlTextWriterStartDTDElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartDTDElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndDTDElement...
+ d pr 10i 0 extproc('xmlTextWriterEndDTDElement')
+ d writer value like(xmlTextWriterPtr)
+
+ * DTD element definition conveniency functions
+
+ d xmlTextWriterWriteFormatDTDElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatDTDElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatDTDElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatDTDElement'
+ d )
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteDTDElement...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDElement')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * DTD attribute list definition
+
+ d xmlTextWriterStartDTDAttlist...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartDTDAttlist')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndDTDAttlist...
+ d pr 10i 0 extproc('xmlTextWriterEndDTDAttlist')
+ d writer value like(xmlTextWriterPtr)
+
+ * DTD attribute list definition conveniency functions
+
+ d xmlTextWriterWriteFormatDTDAttlist...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteFormatDTDAttlist')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatDTDAttlist...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteVFormatDTDAttlist'
+ d )
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteDTDAttlist...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDAttlist')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * DTD entity definition
+
+ d xmlTextWriterStartDTDEntity...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterStartDTDEntity')
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+
+ d xmlTextWriterEndDTDEntity...
+ d pr 10i 0 extproc('xmlTextWriterEndDTDEntity')
+ d writer value like(xmlTextWriterPtr)
+
+ * DTD entity definition conveniency functions
+
+ d xmlTextWriterWriteFormatDTDInternalEntity...
+ d pr 10i 0 extproc('xmlTextWriterWriteFormatDTD-
+ d InternalEntity')
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d #vararg1 * value options(*string: *nopass) void *
+ d #vararg2 * value options(*string: *nopass) void *
+ d #vararg3 * value options(*string: *nopass) void *
+ d #vararg4 * value options(*string: *nopass) void *
+ d #vararg5 * value options(*string: *nopass) void *
+ d #vararg6 * value options(*string: *nopass) void *
+ d #vararg7 * value options(*string: *nopass) void *
+ d #vararg8 * value options(*string: *nopass) void *
+
+ d xmlTextWriterWriteVFormatDTDInternalEntity...
+ d pr 10i 0 extproc('xmlTextWriterWriteVFormatDT-
+ d DInternalEntity')
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+ d format * value options(*string) const char *
+ d argptr likeds(xmlVaList)
+
+ d xmlTextWriterWriteDTDInternalEntity...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDInternalEntity'
+ d )
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteDTDExternalEntity...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDExternalEntity'
+ d )
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d ndataid * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteDTDExternalEntityContents...
+ d pr 10i 0 extproc('xmlTextWriterWriteDTDExtern-
+ d alEntityContents')
+ d writer value like(xmlTextWriterPtr)
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d ndataid * value options(*string) const xmlChar *
+
+ d xmlTextWriterWriteDTDEntity...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDEntity')
+ d writer value like(xmlTextWriterPtr)
+ d pe 10i 0 value
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+ d ndataid * value options(*string) const xmlChar *
+ d content * value options(*string) const xmlChar *
+
+ * DTD notation definition
+
+ d xmlTextWriterWriteDTDNotation...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterWriteDTDNotation')
+ d writer value like(xmlTextWriterPtr)
+ d name * value options(*string) const xmlChar *
+ d pubid * value options(*string) const xmlChar *
+ d sysid * value options(*string) const xmlChar *
+
+ * Indentation
+
+ d xmlTextWriterSetIndent...
+ d pr 10i 0 extproc('xmlTextWriterSetIndent')
+ d writer value like(xmlTextWriterPtr)
+ d indent 10i 0 value
+
+ d xmlTextWriterSetIndentString...
+ d pr 10i 0 extproc(
+ d 'xmlTextWriterSetIndentString')
+ d writer value like(xmlTextWriterPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlTextWriterSetQuoteChar...
+ d pr 10i 0 extproc('xmlTextWriterSetQuoteChar')
+ d writer value like(xmlTextWriterPtr)
+ d quotechar value like(xmlChar)
+
+ * misc
+
+ d xmlTextWriterFlush...
+ d pr 10i 0 extproc('xmlTextWriterFlush')
+ d writer value like(xmlTextWriterPtr)
+
+ /endif LIBXML_WRITER_ENABLD
+ /endif XML_XMLWRITER_H__
diff --git a/os400/libxmlrpg/xpath.rpgle b/os400/libxmlrpg/xpath.rpgle
new file mode 100644
index 0000000..3f3be32
--- /dev/null
+++ b/os400/libxmlrpg/xpath.rpgle
@@ -0,0 +1,649 @@
+ * Summary: XML Path Language implementation
+ * Description: API for the XML Path Language implementation
+ *
+ * XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ * http://www.w3.org/TR/xpath
+ *
+ * Implements
+ * W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XPATH_H__)
+ /define XML_XPATH_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_XPATH_ENABLED)
+
+ /include "libxmlrpg/xmlerror"
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/hash"
+ /endif LIBXML_XPATH_ENABLED
+
+ /if defined(LIBXML_XPATH_ENABLED)
+
+ d xmlXPathContextPtr...
+ d s * based(######typedef######)
+
+ d xmlXPathParserContextPtr...
+ d s * based(######typedef######)
+
+ * The set of XPath error codes.
+
+ d xmlXPathError s 10i 0 based(######typedef######) enum
+ d XPATH_EXPRESSION_OK...
+ d c 0
+ d XPATH_NUMBER_ERROR...
+ d c 1
+ d XPATH_UNFINISHED_LITERAL_ERROR...
+ d c 2
+ d XPATH_START_LITERAL_ERROR...
+ d c 3
+ d XPATH_VARIABLE_REF_ERROR...
+ d c 4
+ d XPATH_UNDEF_VARIABLE_ERROR...
+ d c 5
+ d XPATH_INVALID_PREDICATE_ERROR...
+ d c 6
+ d XPATH_EXPR_ERROR...
+ d c 7
+ d XPATH_UNCLOSED_ERROR...
+ d c 8
+ d XPATH_UNKNOWN_FUNC_ERROR...
+ d c 9
+ d XPATH_INVALID_OPERAND...
+ d c 10
+ d XPATH_INVALID_TYPE...
+ d c 11
+ d XPATH_INVALID_ARITY...
+ d c 12
+ d XPATH_INVALID_CTXT_SIZE...
+ d c 13
+ d XPATH_INVALID_CTXT_POSITION...
+ d c 14
+ d XPATH_MEMORY_ERROR...
+ d c 15
+ d XPTR_SYNTAX_ERROR...
+ d c 16
+ d XPTR_RESOURCE_ERROR...
+ d c 17
+ d XPTR_SUB_RESOURCE_ERROR...
+ d c 18
+ d XPATH_UNDEF_PREFIX_ERROR...
+ d c 19
+ d XPATH_ENCODING_ERROR...
+ d c 20
+ d XPATH_INVALID_CHAR_ERROR...
+ d c 21
+ d XPATH_INVALID_CTXT...
+ d c 22
+ d XPATH_STACK_ERROR...
+ d c 23
+ d XPATH_FORBID_VARIABLE_ERROR...
+ d c 24
+
+ * A node-set (an unordered collection of nodes without duplicates).
+
+ d xmlNodeSetPtr s * based(######typedef######)
+
+ d xmlNodeSet ds based(xmlNodeSetPtr)
+ d align qualified
+ d nodeNr 10i 0 Set node count
+ d nodeMax 10i 0 Max # nodes in set
+ d nodeTab * xmlNodePtr *
+
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ * - node-set
+ * - boolean
+ * - number
+ * - string
+ *
+ * @@ XPointer will add more types !
+
+ d xmlXPathObjectType...
+ d s 10i 0 based(######typedef######) enum
+ d XPATH_UNDEFINED...
+ d c 0
+ d XPATH_NODESET c 1
+ d XPATH_BOOLEAN c 2
+ d XPATH_NUMBER c 3
+ d XPATH_STRING c 4
+ d XPATH_POINT c 5
+ d XPATH_RANGE c 6
+ d XPATH_LOCATIONSET...
+ d c 7
+ d XPATH_USERS c 8
+ d XPATH_XSLT_TREE... R/O XSLT value tree
+ d c 9
+
+ d xmlXPathObjectPtr...
+ d s * based(######typedef######)
+
+ d xmlXPathObject ds based(xmlXPathObjectPtr)
+ d align qualified
+ d type like(xmlXPathObjectType)
+ d nodesetval like(xmlNodeSetPtr)
+ d boolval 10i 0
+ d floatval 8f
+ d stringval * xmlChar *
+ d user * void *
+ d index 10i 0
+ d user2 * void *
+ d index2 10i 0
+
+ * xmlXPathConvertFunc:
+ * @obj: an XPath object
+ * @type: the number of the target type
+ *
+ * A conversion function is associated to a type and used to cast
+ * the new type to primitive values.
+ *
+ * Returns -1 in case of error, 0 otherwise
+
+ d xmlXPathConvertFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Extra type: a name and a conversion function.
+
+ d xmlXPathTypePtr...
+ d s * based(######typedef######)
+
+ d xmlXPathType ds based(xmlXPathTypePtr)
+ d align qualified
+ d name * The type name
+ d func like(xmlXPathConvertFunc) Conversion function
+
+ * Extra variable: a name and a value.
+
+ d xmlXPathVariablePtr...
+ d s * based(######typedef######)
+
+ d xmlXPathVariable...
+ d ds based(xmlXPathVariablePtr)
+ d align qualified
+ d name * The variable name
+ d value like(xmlXPathObjectPtr) The value
+
+ * xmlXPathEvalFunc:
+ * @ctxt: an XPath parser context
+ * @nargs: the number of arguments passed to the function
+ *
+ * An XPath evaluation function, the parameters are on the XPath
+ * context stack.
+
+ d xmlXPathEvalFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Extra function: a name and an evaluation function.
+
+ d xmlXPathFuncPtr...
+ d s * based(######typedef######)
+
+ d xmlXPathFunct ds based(xmlXPathFuncPtr)
+ d align qualified
+ d name * The function name
+ d func like(xmlXPathEvalFunc) Evaluation function
+
+ * xmlXPathAxisFunc:
+ * @ctxt: the XPath interpreter context
+ * @cur: the previous node being explored on that axis
+ *
+ * An axis traversal function. To traverse an axis, the engine calls
+ * the first time with cur == NULL and repeat until the function returns
+ * NULL indicating the end of the axis traversal.
+ *
+ * Returns the next node in that axis or NULL if at the end of the axis.
+
+ d xmlXPathAxisFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * Extra axis: a name and an axis function.
+
+ d xmlXPathAxisPtr...
+ d s * based(######typedef######)
+
+ d xmlXPathAxis ds based(xmlXPathAxisPtr)
+ d align qualified
+ d name * The axis name
+ d func like(xmlXPathAxisFunc) The search function
+
+ * xmlXPathFunction:
+ * @ctxt: the XPath interprestation context
+ * @nargs: the number of arguments
+ *
+ * An XPath function.
+ * The arguments (if any) are popped out from the context stack
+ * and the result is pushed on the stack.
+
+ d xmlXPathFunction...
+ d s * based(######typedef######)
+ d procptr
+
+ * Function and Variable Lookup.
+
+ * xmlXPathVariableLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the variable
+ * @ns_uri: the namespace name hosting this variable
+ *
+ * Prototype for callbacks used to plug variable lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath object value or NULL if not found.
+
+ d xmlXPathVariableLookupFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlXPathFuncLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the function
+ * @ns_uri: the namespace name hosting this function
+ *
+ * Prototype for callbacks used to plug function lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath function or NULL if not found.
+
+ d xmlXPathFuncLookupFunc...
+ d s * based(######typedef######)
+ d procptr
+
+ * xmlXPathFlags:
+ * Flags for XPath engine compilation and runtime
+
+ * XML_XPATH_CHECKNS:
+ *
+ * check namespaces at compilation
+
+ d XML_XPATH_CHECKNS...
+ d c X'0001'
+
+ * XML_XPATH_NOVAR:
+ *
+ * forbid variables in expression
+
+ d XML_XPATH_NOVAR...
+ d c X'0002'
+
+ * xmlXPathContext:
+ *
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ * - a node (the context node)
+ * - a node list (the context node list)
+ * - a set of variable bindings
+ * - a function library
+ * - the set of namespace declarations in scope for the expression
+ * Following the switch to hash tables, this need to be trimmed up at
+ * the next binary incompatible release.
+ * The node may be modified when the context is passed to libxml2
+ * for an XPath evaluation so you may need to initialize it again
+ * before the next call.
+
+ d xmlXPathContext...
+ d ds based(xmlXPathContextPtr)
+ d align qualified
+ d doc like(xmlDocPtr) Current document
+ d node like(xmlNodePtr) Current node
+ *
+ d nb_variables_unused... Unused (hash table)
+ d 10i 0
+ d max_variables_unused... Unused (hash table)
+ d 10i 0
+ d varHash like(xmlHashTablePtr) Defined variables
+ *
+ d nb_types 10i 0 # of defined types
+ d max_types 10i 0 Max number of types
+ d types like(xmlXPathTypePtr) Defined types array
+ *
+ d nb_funcs_unused... Unused (hash table)
+ d 10i 0
+ d max_funcs_unused... Unused (hash table)
+ d 10i 0
+ d funcHash like(xmlHashTablePtr) Defined functions
+ *
+ d nb_axis 10i 0 # of defined axis
+ d max_axis 10i 0 Max number of axis
+ d axis like(xmlXPathAxisPtr) Defined axis array
+ *
+ * the namespace nodes of the context node
+ *
+ d namespaces * xmlNsPtr *
+ d nsNr 10i 0 # scope namespaces
+ d user * procptr Function to free
+ *
+ * extra variables
+ *
+ d contextSize 10i 0 The context size
+ d proximityPosition...
+ d 10i 0
+ *
+ * extra stuff for XPointer
+ *
+ d xptr 10i 0 XPointer context ?
+ d here like(xmlNodePtr) For here()
+ d origin like(xmlNodePtr) For origin()
+ *
+ * the set of namespace declarations in scope for the expression
+ *
+ d nsHash like(xmlHashTablePtr) Namespace hashtable
+ d varLookupFunc like(xmlXPathVariableLookupFunc) Var lookup function
+ d varLookupData * void *
+ *
+ * Possibility to link in an extra item
+ *
+ d extra * void *
+ *
+ * The function name and URI when calling a function
+ *
+ d function * const xmlChar *
+ d functionURI * const xmlChar *
+ *
+ * function lookup function and data
+ *
+ d funcLookupFunc... Func lookup func
+ d like(xmlXPathVariableLookupFunc)
+ d funcLookupData... void *
+ d *
+ *
+ * temporary namespace lists kept for walking the namespace axis
+ *
+ d tmpNsList * xmlNsPtr *
+ d tmpNsNr 10i 0 # scope namespaces
+ *
+ * error reporting mechanism
+ *
+ d userData * void *
+ d error like(xmlStructuredErrorFunc) Error callback
+ d lastError like(xmlError) The last error
+ d debugNode like(xmlNodePtr) XSLT source node
+ *
+ * dictionary
+ *
+ d dict like(xmlDictPtr) Dictionary if any
+ *
+ d flags 10i 0 Compilation control
+ *
+ * Cache for reusal of XPath objects
+ *
+ d cache * void *
+
+ * The structure of a compiled expression form is not public.
+
+ d xmlXPathCompExprPtr...
+ d s * based(######typedef######)
+
+ * xmlXPathParserContext:
+ *
+ * An XPath parser context. It contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+
+ d xmlXPathParserContext...
+ d ds based(xmlXPathParserContextPtr)
+ d align qualified
+ d cur * const xmlChar *
+ d base * const xmlChar *
+ *
+ d error 10i 0 Error code
+ *
+ d context like(xmlXPathContextPtr) Evaluation context
+ d value like(xmlXPathObjectPtr) The current value
+ d valueNr 10i 0 Value stack depth
+ d valueMax 10i 0 Max stack depth
+ d valueTab * xmlXPathObjectPtr *
+ *
+ d comp like(xmlXPathCompExprPtr) Precompiled expr.
+ d xptr 10i 0 XPointer expression?
+ d ancestor like(xmlNodePtr) To walk prec. axis
+ *
+ d valueFrame 10i 0 Limit stack pop
+
+ **************************************************************************
+ * *
+ * Public API *
+ * *
+ **************************************************************************
+
+ * Objects and Nodesets handling
+
+ d xmlXPathNAN s 8f import('xmlXPathNAN')
+ d xmlXPathPINF s 8f import('xmlXPathPINF')
+ d xmlXPathNINF s 8f import('xmlXPathNINF')
+
+ d xmlXPathFreeObject...
+ d pr extproc('xmlXPathFreeObject')
+ d obj value like(xmlXPathObjectPtr)
+
+ d xmlXPathNodeSetCreate...
+ d pr extproc('xmlXPathNodeSetCreate')
+ d like(xmlNodeSetPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathFreeNodeSetList...
+ d pr extproc('xmlXPathFreeNodeSetList')
+ d obj value like(xmlXPathObjectPtr)
+
+ d xmlXPathFreeNodeSet...
+ d pr extproc('xmlXPathFreeNodeSet')
+ d obj value like(xmlNodeSetPtr)
+
+ d xmlXPathObjectCopy...
+ d pr extproc('xmlXPathObjectCopy')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathCmpNodes...
+ d pr 10i 0 extproc('xmlXPathCmpNodes')
+ d node1 value like(xmlNodePtr)
+ d node2 value like(xmlNodePtr)
+
+ * Conversion functions to basic types.
+
+ d xmlXPathCastNumberToBoolean...
+ d pr 10i 0 extproc(
+ d 'xmlXPathCastNumberToBoolean')
+ d val 8f value
+
+ d xmlXPathCastStringToBoolean...
+ d pr 10i 0 extproc(
+ d 'xmlXPathCastStringToBoolean')
+ d val * value options(*string) const xmlChar *
+
+ d xmlXPathCastNodeSetToBoolean...
+ d pr 10i 0 extproc(
+ d 'xmlXPathCastNodeSetToBoolean')
+ d ns value like(xmlNodeSetPtr)
+
+ d xmlXPathCastToBoolean...
+ d pr 10i 0 extproc('xmlXPathCastToBoolean')
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathCastBooleanToNumber...
+ d pr extproc(
+ d 'xmlXPathCastBooleanToNumber')
+ d 8f
+ d val 10i 0 value
+
+ d xmlXPathCastStringToNumber...
+ d pr 8f extproc('xmlXPathCastStringToNumber')
+ d val * value options(*string) const xmlChar *
+
+ d xmlXPathCastNodeToNumber...
+ d pr 8f extproc('xmlXPathCastNodeToNumber')
+ d node value like(xmlNodePtr)
+
+ d xmlXPathCastNodeSetToNumber...
+ d pr 8f extproc(
+ d 'xmlXPathCastNodeSetToNumber')
+ d ns value like(xmlNodeSetPtr)
+
+ d xmlXPathCastToNumber...
+ d pr 8f extproc('xmlXPathCastToNumber')
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathCastBooleanToString...
+ d pr * extproc( xmlChar *
+ d 'xmlXPathCastBooleanToString')
+ d val 10i 0 value
+
+ d xmlXPathCastNumberToString...
+ d pr * extproc('xmlXPathCastNumberToString')xmlChar *
+ d val 8f value
+
+ d xmlXPathCastNodeToString...
+ d pr * extproc('xmlXPathCastNodeToString') xmlChar *
+ d node value like(xmlNodePtr)
+
+ d xmlXPathCastNodeSetToString...
+ d pr * extproc('xmlXPathCastNodeSetToString'xmlChar *
+ d )
+ d ns value like(xmlNodeSetPtr)
+
+ d xmlXPathCastToString...
+ d pr * extproc('xmlXPathCastToString') xmlChar *
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathConvertBoolean...
+ d pr extproc('xmlXPathConvertBoolean')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathConvertNumber...
+ d pr extproc('xmlXPathConvertNumber')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPathConvertString...
+ d pr extproc('xmlXPathConvertString')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ * Context handling.
+
+ d xmlXPathNewContext...
+ d pr extproc('xmlXPathNewContext')
+ d like(xmlXPathContextPtr)
+ d doc value like(xmlDocPtr)
+
+ d xmlXPathFreeContext...
+ d pr extproc('xmlXPathFreeContext')
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathContextSetCache...
+ d pr 10i 0 extproc('xmlXPathContextSetCache')
+ d ctxt value like(xmlXPathContextPtr)
+ d active 10i 0 value
+ d value 10i 0 value
+ d options 10i 0 value
+
+ * Evaluation functions.
+
+ d xmlXPathOrderDocElems...
+ d pr 20i 0 extproc('xmlXPathOrderDocElems')
+ d doc value like(xmlDocPtr)
+
+ d xmlXPathSetContextNode...
+ d pr 10i 0 extproc('xmlXPathSetContextNode')
+ d node value like(xmlNodePtr)
+ d ctx value like(xmlXPathContextPtr)
+
+ d xmlXPathNodeEval...
+ d pr extproc('xmlXPathNodeEval')
+ d like(xmlXPathObjectPtr)
+ d node value like(xmlNodePtr)
+ d str * value options(*string) const xmlChar *
+ d ctx value like(xmlXPathContextPtr)
+
+ d xmlXPathEval pr extproc('xmlXPathEval')
+ d like(xmlXPathObjectPtr)
+ d str * value options(*string) const xmlChar *
+ d ctx value like(xmlXPathContextPtr)
+
+ d xmlXPathEvalExpression...
+ d pr extproc('xmlXPathEvalExpression')
+ d like(xmlXPathObjectPtr)
+ d str * value options(*string) const xmlChar *
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathEvalPredicate...
+ d pr 10i 0 extproc('xmlXPathEvalPredicate')
+ d ctxt value like(xmlXPathContextPtr)
+ d res value like(xmlXPathObjectPtr)
+
+ * Separate compilation/evaluation entry points.
+
+ d xmlXPathCompile...
+ d pr extproc('xmlXPathCompile')
+ d like(xmlXPathCompExprPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlXPathCtxtCompile...
+ d pr extproc('xmlXPathCtxtCompile')
+ d like(xmlXPathCompExprPtr)
+ d ctxt value like(xmlXPathContextPtr)
+ d str * value options(*string) const xmlChar *
+
+ d xmlXPathCompiledEval...
+ d pr extproc('xmlXPathCompiledEval')
+ d like(xmlXPathObjectPtr)
+ d comp value like(xmlXPathCompExprPtr)
+ d ctx value like(xmlXPathContextPtr)
+
+ d xmlXPathCompiledEvalToBoolean...
+ d pr 10i 0 extproc(
+ d 'xmlXPathCompiledEvalToBoolean')
+ d comp value like(xmlXPathCompExprPtr)
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathFreeCompExpr...
+ d pr extproc('xmlXPathFreeCompExpr')
+ d comp value like(xmlXPathCompExprPtr)
+ /endif LIBXML_XPATH_ENABLED
+
+ /undefine XML_TESTVAL
+ /if defined(LIBXML_XPATH_ENABLED)
+ /define XML_TESTVAL
+ /elseif defined(LIBXML_SCHEMAS_ENABLED)
+ /define XML_TESTVAL
+ /endif
+ /if defined(XML_TESTVAL)
+ d xmlXPathInit pr extproc('xmlXPathInit')
+
+ d xmlXPathIsNaN pr 10i 0 extproc('xmlXPathIsNaN')
+ d val 8f value
+
+ d xmlXPathIsInf pr 10i 0 extproc('xmlXPathIsInf')
+ d val 8f value
+
+ /undefine XML_TESTVAL
+ /endif
+
+ * C macros implemented as procedures for ILE/RPG support.
+
+ /if defined(LIBXML_XPATH_ENABLED)
+ d xmlXPathNodeSetGetLength...
+ d pr 10i 0 extproc('__xmlXPathNodeSetGetLength')
+ d ns value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeSetItem...
+ d pr extproc('__xmlXPathNodeSetItem')
+ d like(xmlNodePtr)
+ d ns value like(xmlNodeSetPtr)
+ d index 10i 0 value
+
+ d xmlXPathNodeSetIsEmpty...
+ d pr 10i 0 extproc('__xmlXPathNodeSetIsEmpty')
+ d ns value like(xmlNodeSetPtr)
+ /endif LIBXML_XPATH_ENABLED
+ /endif XML_XPATH_H__
diff --git a/os400/libxmlrpg/xpathInternals.rpgle b/os400/libxmlrpg/xpathInternals.rpgle
new file mode 100644
index 0000000..69f3ae0
--- /dev/null
+++ b/os400/libxmlrpg/xpathInternals.rpgle
@@ -0,0 +1,672 @@
+ * Summary: internal interfaces for XML Path Language implementation
+ * Description: internal interfaces for XML Path Language implementation
+ * used to build new modules on top of XPath like XPointer and
+ * XSLT
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XPATH_INTERNALS_H__)
+ /define XML_XPATH_INTERNALS_H__
+
+ /include "libxmlrpg/xmlversion"
+ /include "libxmlrpg/xpath"
+
+ /if defined(LIBXML_XPATH_ENABLED)
+
+ ************************************************************************
+ * *
+ * Helpers *
+ * *
+ ************************************************************************
+
+ * Many of these macros may later turn into functions. They
+ * shouldn't be used in #ifdef's preprocessor instructions.
+
+ d xmlXPathPopBoolean...
+ d pr 10i 0 extproc('xmlXPathPopBoolean')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathPopNumber...
+ d pr 8f extproc('xmlXPathPopNumber')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathPopString...
+ d pr * extproc('xmlXPathPopString') xmlChar *
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathPopNodeSet...
+ d pr extproc('xmlXPathPopNodeSet')
+ d like(xmlNodeSetPtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathPopExternal...
+ d pr * extproc('xmlXPathPopExternal') void *
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ * Variable Lookup forwarding.
+
+ d xmlXPathRegisterVariableLookup...
+ d pr extproc(
+ d 'xmlXPathRegisterVariableLookup')
+ d ctxt value like(xmlXPathContextPtr)
+ d f value
+ d like(xmlXPathVariableLookupFunc)
+ d data * value void *
+
+ * Function Lookup forwarding.
+
+ d xmlXPathRegisterFuncLookup...
+ d pr extproc('xmlXPathRegisterFuncLookup')
+ d ctxt value like(xmlXPathContextPtr)
+ d f value like(xmlXPathFuncLookupFunc)
+ d funcCtxt * value void *
+
+ * Error reporting.
+ * Note this procedure is renamed in RPG to avoid character case clash with
+ * data type xmlXPathError.
+
+ d xmlXPathReportError...
+ d pr extproc('xmlXPatherror')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d file * value options(*string) const char *
+ d line 10i 0 value
+ d no 10i 0 value
+
+ d xmlXPathErr pr extproc('xmlXPathErr')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d error 10i 0 value
+
+ /if defined(LIBXML_DEBUG_ENABLED)
+ d xmlXPathDebugDumpObject...
+ d pr extproc('xmlXPathDebugDumpObject')
+ d output * value FILE *
+ d cur value like(xmlXPathObjectPtr)
+ d depth 10i 0 value
+
+ d xmlXPathDebugDumpCompExpr...
+ d pr extproc('xmlXPathDebugDumpCompExpr')
+ d output * value FILE *
+ d comp value like(xmlXPathCompExprPtr)
+ d depth 10i 0 value
+ /endif
+
+ * NodeSet handling.
+
+ d xmlXPathNodeSetContains...
+ d pr 10i 0 extproc('xmlXPathNodeSetContains')
+ d cur value like(xmlNodeSetPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathDifference...
+ d pr extproc('xmlXPathDifference')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathIntersection...
+ d pr extproc('xmlXPathIntersection')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathDistinctSorted...
+ d pr extproc('xmlXPathDistinctSorted')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+
+ d xmlXPathDistinct...
+ d pr extproc('xmlXPathDistinct')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+
+ d xmlXPathHasSameNodes...
+ d pr 10i 0 extproc('xmlXPathHasSameNodes')
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeLeadingSorted...
+ d pr extproc('xmlXPathNodeLeadingSorted')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlXPathLeadingSorted...
+ d pr extproc('xmlXPathLeadingSorted')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeLeading...
+ d pr extproc('xmlXPathNodeLeading')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlXPathLeading...
+ d pr extproc('xmlXPathLeading')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeTrailingSorted...
+ d pr extproc('xmlXPathNodeTrailingSorted')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlXPathTrailingSorted...
+ d pr extproc('xmlXPathTrailingSorted')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeTrailing...
+ d pr extproc('xmlXPathNodeTrailing')
+ d like(xmlNodeSetPtr)
+ d nodes value like(xmlNodeSetPtr)
+ d node value like(xmlNodePtr)
+
+ d xmlXPathTrailing...
+ d pr extproc('xmlXPathTrailing')
+ d like(xmlNodeSetPtr)
+ d nodes1 value like(xmlNodeSetPtr)
+ d nodes2 value like(xmlNodeSetPtr)
+
+ * Extending a context.
+
+ d xmlXPathRegisterNs...
+ d pr 10i 0 extproc('xmlXPathRegisterNs')
+ d ctxt value like(xmlXPathContextPtr)
+ d prefix * value options(*string) const xmlChar *
+ d ns_uri * value options(*string) const xmlChar *
+
+ d xmlXPathNsLookup...
+ d pr * extproc('xmlXPathNsLookup') const xmlChar *
+ d ctxt value like(xmlXPathContextPtr)
+ d prefix * value options(*string) const xmlChar *
+
+ d xmlXPathRegisteredNsCleanup...
+ d pr extproc(
+ d 'xmlXPathRegisteredNsCleanup')
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathRegisterFunc...
+ d pr 10i 0 extproc('xmlXPathRegisterFunc')
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d f value like(xmlXPathFunction)
+
+ d xmlXPathRegisterFuncNS...
+ d pr 10i 0 extproc('xmlXPathRegisterFuncNS')
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d ns_uri * value options(*string) const xmlChar *
+ d f value like(xmlXPathFunction)
+
+ d xmlXPathRegisterVariable...
+ d pr 10i 0 extproc('xmlXPathRegisterVariable')
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d value value like(xmlXPathObjectPtr)
+
+ d xmlXPathRegisterVariableNS...
+ d pr 10i 0 extproc('xmlXPathRegisterVariableNS')
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d ns_uri * value options(*string) const xmlChar *
+ d value value like(xmlXPathObjectPtr)
+
+ d xmlXPathFunctionLookup...
+ d pr extproc('xmlXPathFunctionLookup')
+ d like(xmlXPathFunction)
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlXPathFunctionLookupNS...
+ d pr extproc('xmlXPathFunctionLookupNS')
+ d like(xmlXPathFunction)
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d ns_uri * value options(*string) const xmlChar *
+
+ d xmlXPathRegisteredFuncsCleanup...
+ d pr extproc(
+ d 'xmlXPathRegisteredFuncsCleanup')
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathVariableLookup...
+ d pr extproc('xmlXPathVariableLookup')
+ d like(xmlXPathObjectPtr)
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+
+ d xmlXPathVariableLookupNS...
+ d pr extproc('xmlXPathVariableLookupNS')
+ d like(xmlXPathObjectPtr)
+ d ctxt value like(xmlXPathContextPtr)
+ d name * value options(*string) const xmlChar *
+ d ns_uri * value options(*string) const xmlChar *
+
+ d xmlXPathRegisteredVariablesCleanup...
+ d pr extproc(
+ d 'xmlXPathRegisteredVariablesCleanup')
+ d ctxt value like(xmlXPathContextPtr)
+
+ * Utilities to extend XPath.
+
+ d xmlXPathNewParserContext...
+ d pr extproc('xmlXPathNewParserContext')
+ d like(xmlXPathParserContextPtr)
+ d str * value options(*string) const xmlChar *
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathFreeParserContext...
+ d pr extproc('xmlXPathFreeParserContext')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+
+ * TODO: remap to xmlXPathValuePop and Push.
+
+ d valuePop pr extproc('valuePop')
+ d like(xmlXPathObjectPtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d valuePush pr 10i 0 extproc('valuePush')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d value value like(xmlXPathObjectPtr)
+
+ d xmlXPathNewString...
+ d pr extproc('xmlXPathNewString')
+ d like(xmlXPathObjectPtr)
+ d val * value options(*string) const xmlChar *
+
+ d xmlXPathNewCString...
+ d pr extproc('xmlXPathNewCString')
+ d like(xmlXPathObjectPtr)
+ d val * value options(*string) const char *
+
+ d xmlXPathWrapString...
+ d pr extproc('xmlXPathWrapString')
+ d like(xmlXPathObjectPtr)
+ d val * value options(*string) xmlChar *
+
+ d xmlXPathWrapCString...
+ d pr extproc('xmlXPathWrapCString')
+ d like(xmlXPathObjectPtr)
+ d val * value options(*string) char *
+
+ d xmlXPathNewFloat...
+ d pr extproc('xmlXPathNewFloat')
+ d like(xmlXPathObjectPtr)
+ d val 8f value
+
+ d xmlXPathNewBoolean...
+ d pr extproc('xmlXPathNewBoolean')
+ d like(xmlXPathObjectPtr)
+ d val 10i 0 value
+
+ d xmlXPathNewNodeSet...
+ d pr extproc('xmlXPathNewNodeSet')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathNewValueTree...
+ d pr extproc('xmlXPathNewValueTree')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathNodeSetAdd...
+ d pr 10i 0 extproc('xmlXPathNodeSetAdd')
+ d cur value like(xmlNodeSetPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathNodeSetAddUnique...
+ d pr 10i 0 extproc('xmlXPathNodeSetAddUnique')
+ d cur value like(xmlNodeSetPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathNodeSetAddNs...
+ d pr 10i 0 extproc('xmlXPathNodeSetAddNs')
+ d cur value like(xmlNodeSetPtr)
+ d node value like(xmlNodePtr)
+ d ns value like(xmlNsPtr)
+
+ d xmlXPathNodeSetSort...
+ d pr extproc('xmlXPathNodeSetSort')
+ d set value like(xmlNodeSetPtr)
+
+ d xmlXPathRoot pr extproc('xmlXPathRoot')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathEvalExpr...
+ d pr extproc('xmlXPathEvalExpr')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathParseName...
+ d pr * extproc('xmlXPathParseName') xmlChar *
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathParseNCName...
+ d pr * extproc('xmlXPathParseNCName') xmlChar *
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ * Existing functions.
+
+ d xmlXPathStringEvalNumber...
+ d pr 8f extproc('xmlXPathStringEvalNumber')
+ d str * value options(*string) const xmlChar *
+
+ d xmlXPathEvaluatePredicateResult...
+ d pr 10i 0 extproc(
+ d 'xmlXPathEvaluatePredicateResult')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d res value like(xmlXPathObjectPtr)
+
+ d xmlXPathRegisterAllFunctions...
+ d pr extproc(
+ d 'xmlXPathRegisterAllFunctions')
+ d ctxt value like(xmlXPathContextPtr)
+
+ d xmlXPathNodeSetMerge...
+ d pr extproc('xmlXPathNodeSetMerge')
+ d like(xmlNodeSetPtr)
+ d val1 value like(xmlNodeSetPtr)
+ d val2 value like(xmlNodeSetPtr)
+
+ d xmlXPathNodeSetDel...
+ d pr extproc('xmlXPathNodeSetDel')
+ d cur value like(xmlNodeSetPtr)
+ d val value like(xmlNodePtr)
+
+ d xmlXPathNodeSetRemove...
+ d pr extproc('xmlXPathNodeSetRemove')
+ d cur value like(xmlNodeSetPtr)
+ d val 10i 0 value
+
+ d xmlXPathNewNodeSetList...
+ d pr extproc('xmlXPathNewNodeSetList')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlNodeSetPtr)
+
+ d xmlXPathWrapNodeSet...
+ d pr extproc('xmlXPathWrapNodeSet')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlNodeSetPtr)
+
+ d xmlXPathWrapExternal...
+ d pr extproc('xmlXPathWrapExternal')
+ d like(xmlXPathObjectPtr)
+ d val * value void *
+
+ d xmlXPathEqualValues...
+ d pr 10i 0 extproc('xmlXPathEqualValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathNotEqualValues...
+ d pr 10i 0 extproc('xmlXPathNotEqualValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathCompareValues...
+ d pr 10i 0 extproc('xmlXPathCompareValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d inf 10i 0 value
+ d strict 10i 0 value
+
+ d xmlXPathValueFlipSign...
+ d pr extproc('xmlXPathValueFlipSign')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathAddValues...
+ d pr extproc('xmlXPathAddValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathSubValues...
+ d pr extproc('xmlXPathSubValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathMultValues...
+ d pr extproc('xmlXPathMultValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathDivValues...
+ d pr extproc('xmlXPathDivValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathModValues...
+ d pr extproc('xmlXPathModValues')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ d xmlXPathIsNodeType...
+ d pr 10i 0 extproc('xmlXPathIsNodeType')
+ d name * value options(*string) const xmlChar *
+
+ * Some of the axis navigation routines.
+
+ d xmlXPathNextSelf...
+ d pr extproc('xmlXPathNextSelf')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextChild...
+ d pr extproc('xmlXPathNextChild')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextDescendant...
+ d pr extproc('xmlXPathNextDescendant')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextDescendantOrSelf...
+ d pr extproc(
+ d 'xmlXPathNextDescendantOrSelf')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextParent...
+ d pr extproc('xmlXPathNextParent')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextAncestorOrSelf...
+ d pr extproc('xmlXPathNextAncestorOrSelf')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextFollowingSibling...
+ d pr extproc(
+ d 'xmlXPathNextFollowingSibling')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextFollowing...
+ d pr extproc('xmlXPathNextFollowing')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextNamespace...
+ d pr extproc('xmlXPathNextNamespace')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextAttribute...
+ d pr extproc('xmlXPathNextAttribute')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextPreceding...
+ d pr extproc('xmlXPathNextPreceding')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextAncestor...
+ d pr extproc('xmlXPathNextAncestor')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ d xmlXPathNextPrecedingSibling...
+ d pr extproc(
+ d 'xmlXPathNextPrecedingSibling')
+ d like(xmlNodePtr)
+ d ctxt value like(xmlXPathParserContextPtr)
+ d cur value like(xmlNodePtr)
+
+ * The official core of XPath functions.
+
+ d xmlXPathLastFunction...
+ d pr extproc('xmlXPathLastFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathPositionFunction...
+ d pr extproc('xmlXPathPositionFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathCountFunction...
+ d pr extproc('xmlXPathCountFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathIdFunction...
+ d pr extproc('xmlXPathIdFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathLocalNameFunction...
+ d pr extproc('xmlXPathLocalNameFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathNamespaceURIFunction...
+ d pr extproc(
+ d 'xmlXPathNamespaceURIFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathStringFunction...
+ d pr extproc('xmlXPathStringFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathStringLengthFunction...
+ d pr extproc(
+ d 'xmlXPathStringLengthFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathConcatFunction...
+ d pr extproc('xmlXPathConcatFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathContainsFunction...
+ d pr extproc('xmlXPathContainsFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathStartsWithFunction...
+ d pr extproc('xmlXPathStartsWithFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathSubstringFunction...
+ d pr extproc('xmlXPathSubstringFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathSubstringBeforeFunction...
+ d pr extproc(
+ d 'xmlXPathSubstringBeforeFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathSubstringAfterFunction...
+ d pr extproc(
+ d 'xmlXPathSubstringAfterFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+
+ d xmlXPathNormalizeFunction...
+ d pr extproc('xmlXPathNormalizeFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathTranslateFunction...
+ d pr extproc('xmlXPathTranslateFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathNotFunction...
+ d pr extproc('xmlXPathNotFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathTrueFunction...
+ d pr extproc('xmlXPathTrueFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathFalseFunction...
+ d pr extproc('xmlXPathFalseFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathLangFunction...
+ d pr extproc('xmlXPathLangFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathNumberFunction...
+ d pr extproc('xmlXPathNumberFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathSumFunction...
+ d pr extproc('xmlXPathSumFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathFloorFunction...
+ d pr extproc('xmlXPathFloorFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathCeilingFunction...
+ d pr extproc('xmlXPathCeilingFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathRoundFunction...
+ d pr extproc('xmlXPathRoundFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPathBooleanFunction...
+ d pr extproc('xmlXPathBooleanFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ * Really internal functions
+
+ d xmlXPathNodeSetFreeNs...
+ d pr extproc('xmlXPathNodeSetFreeNs')
+ d ns value like(xmlNsPtr)
+
+ /endif LIBXML_XPATH_ENABLED
+ /endif XPATH_INTERNALS_H__
diff --git a/os400/libxmlrpg/xpointer.rpgle b/os400/libxmlrpg/xpointer.rpgle
new file mode 100644
index 0000000..6f43314
--- /dev/null
+++ b/os400/libxmlrpg/xpointer.rpgle
@@ -0,0 +1,157 @@
+ * Summary: API to handle XML Pointers
+ * Description: API to handle XML Pointers
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+
+ /if not defined(XML_XPTR_H__)
+ /define XML_XPTR_H__
+
+ /include "libxmlrpg/xmlversion"
+
+ /if defined(LIBXML_XPTR_ENABLED)
+
+ /include "libxmlrpg/tree"
+ /include "libxmlrpg/xpath"
+
+ * A Location Set
+
+ d xmlLocationSetPtr...
+ d s * based(######typedef######)
+
+ d xmlLocationSet ds based(xmlLocationSetPtr)
+ d align qualified
+ d locNr 10i 0 # locations in set
+ d locMax 10i 0 Max locations in set
+ d locTab * xmlXPathObjectPtr *
+
+ * Handling of location sets.
+
+ d xmlXPtrLocationSetCreate...
+ d pr extproc('xmlXPtrLocationSetCreate')
+ d like(xmlLocationSetPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPtrFreeLocationSet...
+ d pr extproc('xmlXPtrFreeLocationSet')
+ d obj value like(xmlLocationSetPtr)
+
+ d xmlXPtrLocationSetMerge...
+ d pr extproc('xmlXPtrLocationSetMerge')
+ d like(xmlLocationSetPtr)
+ d val1 value like(xmlLocationSetPtr)
+ d val2 value like(xmlLocationSetPtr)
+
+ d xmlXPtrNewRange...
+ d pr extproc('xmlXPtrNewRange')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+ d startindex 10i 0 value
+ d end value like(xmlNodePtr)
+ d endindex 10i 0 value
+
+ d xmlXPtrNewRangePoints...
+ d pr extproc('xmlXPtrNewRangePoints')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlXPathObjectPtr)
+ d end value like(xmlXPathObjectPtr)
+
+ d xmlXPtrNewRangeNodePoint...
+ d pr extproc('xmlXPtrNewRangeNodePoint')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+ d end value like(xmlXPathObjectPtr)
+
+ d xmlXPtrNewRangePointNode...
+ d pr extproc('xmlXPtrNewRangePointNode')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlXPathObjectPtr)
+ d end value like(xmlNodePtr)
+
+ d xmlXPtrNewRangeNodes...
+ d pr extproc('xmlXPtrNewRangeNodes')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+ d end value like(xmlNodePtr)
+
+ d xmlXPtrNewLocationSetNodes...
+ d pr extproc('xmlXPtrNewLocationSetNodes')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+ d end value like(xmlNodePtr)
+
+ d xmlXPtrNewLocationSetNodeSet...
+ d pr extproc(
+ d 'xmlXPtrNewLocationSetNodeSet')
+ d like(xmlXPathObjectPtr)
+ d set value like(xmlNodeSetPtr)
+
+ d xmlXPtrNewRangeNodeObject...
+ d pr extproc('xmlXPtrNewRangeNodeObject')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+ d end value like(xmlXPathObjectPtr)
+
+ d xmlXPtrNewCollapsedRange...
+ d pr extproc('xmlXPtrNewCollapsedRange')
+ d like(xmlXPathObjectPtr)
+ d start value like(xmlNodePtr)
+
+ d xmlXPtrLocationSetAdd...
+ d pr extproc('xmlXPtrLocationSetAdd')
+ d cur value like(xmlLocationSetPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPtrWrapLocationSet...
+ d pr extproc('xmlXPtrWrapLocationSet')
+ d like(xmlXPathObjectPtr)
+ d val value like(xmlLocationSetPtr)
+
+ d xmlXPtrLocationSetDel...
+ d pr extproc('xmlXPtrLocationSetDel')
+ d cur value like(xmlLocationSetPtr)
+ d val value like(xmlXPathObjectPtr)
+
+ d xmlXPtrLocationSetRemove...
+ d pr extproc('xmlXPtrLocationSetRemove')
+ d cur value like(xmlLocationSetPtr)
+ d val 10i 0 value
+
+ * Functions.
+
+ d xmlXPtrNewContext...
+ d pr extproc('xmlXPtrNewContext')
+ d like(xmlXPathContextPtr)
+ d doc value like(xmlDocPtr)
+ d here value like(xmlNodePtr)
+ d origin value like(xmlNodePtr)
+
+ d xmlXPtrEval pr extproc('xmlXPtrEval')
+ d like(xmlXPathObjectPtr)
+ d str * value options(*string) const xmlChar *
+ d ctx value like(xmlXPathContextPtr)
+
+ d xmlXPtrRangeToFunction...
+ d pr extproc('xmlXPtrRangeToFunction')
+ d ctxt value like(xmlXPathParserContextPtr)
+ d nargs 10i 0 value
+
+ d xmlXPtrBuildNodeList...
+ d pr extproc('xmlXPtrBuildNodeList')
+ d like(xmlNodePtr)
+ d obj value like(xmlXPathObjectPtr)
+
+ d xmlXPtrEvalRangePredicate...
+ d pr extproc('xmlXPtrEvalRangePredicate')
+ d ctxt value like(xmlXPathParserContextPtr)
+
+ /endif LIBXML_XPTR_ENABLED
+ /endif XML_XPTR_H__
diff --git a/os400/make-bldcsndfa.sh b/os400/make-bldcsndfa.sh
new file mode 100644
index 0000000..57cf012
--- /dev/null
+++ b/os400/make-bldcsndfa.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Compilation script for the iconv names DFA builer.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+SCRIPTDIR=`dirname "${0}"`
+. "${SCRIPTDIR}/initscript.sh"
+cd "${TOPDIR}/os400/iconv/bldcsndfa"
+
+
+# This is for old XML library (bootstrapping).
+#rm -rf xml.h xml
+#ln -s /QSYS.LIB/XML.LIB/H.FILE/XML.MBR xml.h
+#mkdir xml
+#mkdir xml/h
+#ln -s /QSYS.LIB/XML.LIB/H.FILE/UTF8.MBR xml/h/utf8
+
+
+# Compile.
+
+CMD="CRTCMOD MODULE(${TARGETLIB}/BLDCSNDFA) SRCSTMF('bldcsndfa.c')"
+CMD="${CMD} SYSIFCOPT(*IFS64IO) LANGLVL(*EXTENDED) LOCALETYPE(*LOCALE)"
+CMD="${CMD} INCDIR("
+CMD="${CMD} '${IFSDIR}/include' ${INCLUDES})"
+CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
+CMD="${CMD} OUTPUT(${OUTPUT})"
+CMD="${CMD} OPTIMIZE(10)"
+CMD="${CMD} DBGVIEW(${DEBUG})"
+#CMD="${CMD} DEFINE('OLDXML' 'xmlXPathSetContextNode=xmlXPathSetCurrentNode')"
+
+system "${CMD}"
+
+# Link
+
+CMD="CRTPGM PGM(${TARGETLIB}/BLDCSNDFA) MODULE(${TARGETLIB}/BLDCSNDFA)"
+CMD="${CMD} BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
+#CMD="${CMD} BNDDIR(XML/XML)"
+CMD="${CMD} TGTRLS(${TGTRLS})"
+system "${CMD}"
diff --git a/os400/make-include.sh b/os400/make-include.sh
new file mode 100644
index 0000000..4e5b058
--- /dev/null
+++ b/os400/make-include.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# Installation of the C header files in the OS/400 library.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+SCRIPTDIR=`dirname "${0}"`
+. "${SCRIPTDIR}/initscript.sh"
+cd "${TOPDIR}/include"
+
+
+# Create the OS/400 source program file for the C header files.
+
+SRCPF="${LIBIFSNAME}/LIBXML.FILE"
+
+if action_needed "${SRCPF}"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/LIBXML) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('libxml2: C/C++ header files')"
+ system "${CMD}"
+fi
+
+
+# Create the IFS directory for the C header files.
+
+if action_needed "${IFSDIR}/include/libxml"
+then mkdir -p "${IFSDIR}/include/libxml"
+fi
+
+
+
+# Enumeration values may be used as va_arg tagfields, so they MUST be
+# integers.
+
+copy_hfile()
+
+{
+ sed -e '1i\
+#pragma enum(int)\
+' "${@}" -e '$a\
+#pragma enum(pop)\
+'
+}
+
+# Copy the header files to DB2 library. Link from IFS include directory.
+
+for HFILE in "${TOPDIR}/os400/transcode.h" libxml/*.h libxml/*.h.in
+do CMD="cat \"${HFILE}\""
+ DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
+
+ case "`basename \"${HFILE}\"`" in
+
+ xmlwin32version.h*)
+ continue;; # Not on M$W !
+
+ *.in) CMD="${CMD} | versioned_copy";;
+
+ xmlschemastypes.h) # Special case: rename colliding file.
+ DEST="${SRCPF}/SCHMTYPES.MBR";;
+
+ esac
+
+ if action_needed "${DEST}" "${HFILE}"
+ then eval "${CMD}" | copy_hfile > tmphdrfile
+
+ # Need to translate to target CCSID.
+
+ CMD="CPY OBJ('`pwd`/tmphdrfile') TOOBJ('${DEST}')"
+ CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ fi
+
+ IFSFILE="${IFSDIR}/include/libxml/`basename \"${HFILE}\" .in`"
+
+ if action_needed "${IFSFILE}" "${DEST}"
+ then rm -f "${IFSFILE}"
+ ln -s "${DEST}" "${IFSFILE}"
+ fi
+done
diff --git a/os400/make-rpg.sh b/os400/make-rpg.sh
new file mode 100644
index 0000000..95d3249
--- /dev/null
+++ b/os400/make-rpg.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+#
+# Installation of the ILE/RPG header files in the OS/400 library.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+SCRIPTDIR=`dirname "${0}"`
+. "${SCRIPTDIR}/initscript.sh"
+cd "${TOPDIR}/os400/libxmlrpg"
+
+
+# Create the OS/400 source program file for the ILE/RPG header files.
+
+SRCPF="${LIBIFSNAME}/LIBXMLRPG.FILE"
+
+if action_needed "${SRCPF}"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/LIBXMLRPG) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('libxml2: ILE/RPG header files')"
+ system "${CMD}"
+fi
+
+
+# Map file names to DB2 name syntax.
+
+> tmpsubstfile
+
+for HFILE in *.rpgle *.rpgle.in
+do NAME="`basename \"${HFILE}\" .in`"
+ VAR="`basename \"${NAME}\" .rpgle`"
+ VAL="`db2_name \"${NAME}\" nomangle`"
+
+ if [ "${VAR}" = 'xmlschemastypes' ]
+ then VAL=SCHMTYPES
+ fi
+
+ echo "s/${VAR}/${VAL}/g" >> tmpsubstfile
+ eval "VAR_${VAR}=\"${VAL}\""
+done
+
+
+change_include()
+
+{
+ sed -e '\#^....../include *"libxmlrpg/#{' \
+ -e 's///' \
+ -e 's/".*//' \
+ -f tmpsubstfile \
+ -e 's#.*# /include libxmlrpg,&#' \
+ -e '}'
+}
+
+
+# Create the IFS directory for the ILE/RPG header files.
+
+RPGIFSDIR="${IFSDIR}/include/libxmlrpg"
+
+if action_needed "${RPGIFSDIR}"
+then mkdir -p "${RPGIFSDIR}"
+fi
+
+# Copy the header files to IFS ILE/RPG include directory.
+# Copy them with include path editing to the DB2 library.
+
+for HFILE in *.rpgle *.rpgle.in
+do IFSCMD="cat \"${HFILE}\""
+ DB2CMD="change_include < \"${HFILE}\""
+ IFSFILE="`basename \"${HFILE}\" .in`"
+
+ case "${HFILE}" in
+
+ *.in) IFSCMD="${IFSCMD} | versioned_copy"
+ DB2CMD="${DB2CMD} | versioned_copy"
+ ;;
+ esac
+
+ IFSDEST="${RPGIFSDIR}/${IFSFILE}"
+
+ if action_needed "${IFSDEST}" "${HFILE}"
+ then eval "${IFSCMD}" > "${IFSDEST}"
+ fi
+
+ eval DB2MBR="\"\${VAR_`basename \"${IFSDEST}\" .rpgle`}\""
+ DB2DEST="${SRCPF}/${DB2MBR}.MBR"
+
+ if action_needed "${DB2DEST}" "${HFILE}"
+ then eval "${DB2CMD}" | change_include > tmphdrfile
+
+ # Need to translate to target CCSID.
+
+ CMD="CPY OBJ('`pwd`/tmphdrfile') TOOBJ('${DB2DEST}')"
+ CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ fi
+done
diff --git a/os400/make-src.sh b/os400/make-src.sh
new file mode 100644
index 0000000..f06cfaf
--- /dev/null
+++ b/os400/make-src.sh
@@ -0,0 +1,241 @@
+#!/bin/sh
+#
+# libxml compilation script for the OS/400.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+SCRIPTDIR=`dirname "${0}"`
+. "${SCRIPTDIR}/initscript.sh"
+cd "${TOPDIR}"
+
+
+# Create and compile the identification source file.
+
+echo '#pragma comment(user, "libxml2 version '"${LIBXML_VERSION}"'")' > os400.c
+echo '#pragma comment(user, __DATE__)' >> os400.c
+echo '#pragma comment(user, __TIME__)' >> os400.c
+echo '#pragma comment(copyright, "Copyright (C) 1998-2014 Daniel Veillard. OS/400 version by P. Monnerat.")' >> os400.c
+make_module OS400 os400.c
+LINK= # No need to rebuild service program yet.
+MODULES=
+
+
+# Get source list.
+
+foldlines()
+
+{
+ sed -e ':begin' \
+ -e '/\\$/{' \
+ -e 's/\\$/ /' \
+ -e 'N' \
+ -e 'bbegin' \
+ -e '}' \
+ -e 's/\n//g' \
+ -e 's/[[:space:]]*$//'
+}
+
+
+get_make_var()
+
+{
+ foldlines < Makefile.am |
+ sed -e "/^${1}[[:space:]]*=[[:space:]]*/{" \
+ -e 's///' \
+ -e 'q' \
+ -e '}' \
+ -e 'd'
+}
+
+
+docb_sources=`get_make_var docb_sources`
+trio_sources=`get_make_var trio_sources`
+CSOURCES=`eval echo "\`get_make_var libxml2_la_SOURCES | tr '()' '{}'\`"`
+
+
+# Compile the sources into modules.
+
+INCLUDES="'`pwd`'"
+
+# OS/400 specific modules first.
+
+make_module DLFCN "${SCRIPTDIR}/dlfcn/dlfcn.c" '' ebcdic
+make_module ICONV "${SCRIPTDIR}/iconv/iconv.c" '' ebcdic
+make_module WRAPPERS "${SCRIPTDIR}/wrappers.c" '' ebcdic
+make_module TRANSCODE "${SCRIPTDIR}/transcode.c"
+make_module RPGSUPPORT "${SCRIPTDIR}/rpgsupport.c"
+
+# Regular libxml2 modules.
+
+for SRC in ${CSOURCES}
+do MODULE=`db2_name "${SRC}"`
+ make_module "${MODULE}" "${SRC}"
+done
+
+
+# If needed, (re)create the static binding directory.
+
+if action_needed "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then rm -rf "${LIBIFSNAME}/${STATBNDDIR}.BNDDIR"
+ CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} TEXT('libxml2 static binding directory')"
+ system "${CMD}"
+
+ for MODULE in ${MODULES}
+ do CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+ CMD="${CMD} OBJ((${TARGETLIB}/${MODULE} *MODULE))"
+ system "${CMD}"
+ done
+fi
+
+
+# The exportation file for service program creation must be in a DB2
+# source file, so make sure it exists.
+
+if action_needed "${LIBIFSNAME}/TOOLS.FILE"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/TOOLS) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('libxml2: build tools')"
+ system "${CMD}"
+fi
+
+
+# Generate all exported symbol table versions in a binding source file.
+
+BSF="${LIBIFSNAME}/TOOLS.FILE/BNDSRC.MBR"
+PGMEXPS=
+
+OS400SYMS=`cat os400/transcode.h os400/rpgsupport.h |
+ sed -e 'H' \
+ -e 'g' \
+ -e 's/\n/ /' \
+ -e 's/\\$/ /' \
+ -e 's/.*/& /' \
+ -e 's/\/\*.*\*\// /g' \
+ -e 'h' \
+ -e ':loop' \
+ -e 'g' \
+ -e '/\/\*/d' \
+ -e '/;/!d' \
+ -e 's/[^;]*;//' \
+ -e 'x' \
+ -e 's/[[:space:]]*;.*$//' \
+ -e '/XMLPUBFUN/{' \
+ -e 's/[[:space:]]*(.*$//' \
+ -e 's/.*[[:space:]*]//' \
+ -e 'p' \
+ -e 'bloop' \
+ -e '}' \
+ -e '/XMLPUBVAR/!bloop' \
+ -e ':loop2' \
+ -e '/\[[^][]*\]/{' \
+ -e 's///' \
+ -e 'bloop2' \
+ -e '}' \
+ -e 's/[[:space:]]*,[[:space:]]*/,/g' \
+ -e 's/[^,]*[[:space:]*]//' \
+ -e 's/[^[:alnum:]_,]//g' \
+ -e 's/,/\n/g' \
+ -e 'p' \
+ -e 'bloop'`
+
+sed -e 's/#.*//' \
+ -e 's/[[:space:]]*$//' \
+ -e 's/^[[:space:]]*//' \
+ -e '/^*global:$/d' \
+ -e '/^$/d' \
+ -e '/[[:space:]]*{$/{' \
+ -e 's///' \
+ -e 'h' \
+ -e 's/[^A-Za-z0-9]/_/g' \
+ -e 's/^[0-9]/_&/' \
+ -e 'x' \
+ -e 'G' \
+ -e 's/\(.*\)\n\(.*\)/\2_SIGNATURE="\1"/' \
+ -e 'p' \
+ -e 's/.*//' \
+ -e 'x' \
+ -e "s/.*/SONAME='&'/" \
+ -e 'b' \
+ -e '}' \
+ -e '/[[:space:]]*;$/!d' \
+ -e 's///' \
+ -e '/^xmlDllMain$/d' \
+ -e '/^}[[:space:]]*/!{' \
+ -e 'H' \
+ -e 'd' \
+ -e '}' \
+ -e 's///' \
+ -e '/^$/!{' \
+ -e 's/[^A-Za-z0-9]/_/g' \
+ -e 's/^[0-9]/_&/' \
+ -e 's/.*/${&}/' \
+ -e 'x' \
+ -e 'H' \
+ -e 's/.*//' \
+ -e '}' \
+ -e 'x' \
+ -e 's/\n/ /g' \
+ -e 's/^[[:space:]]*//' \
+ -e 's/.*/declare ${SONAME}="&"/' \
+ -e 's/.*/&; PGMEXPS="${SONAME} ${PGMEXPS}"/' \
+ < "${TOPDIR}/libxml2.syms" > bndvars
+. ./bndvars
+
+PGMLVL=CURRENT
+for PGMEXP in ${PGMEXPS}
+do SIGNATURE=`echo "${PGMEXP}" | sed 's/^LIBXML2_//'`
+ eval ENTRIES=\"\${${PGMEXP}}\"
+ echo " STRPGMEXP PGMLVL(*${PGMLVL}) SIGNATURE('${SIGNATURE}')"
+ for ENTRY in ${ENTRIES} ${OS400SYMS}
+ do echo " EXPORT SYMBOL('${ENTRY}')"
+ done
+ echo ' ENDPGMEXP'
+ PGMLVL=PRV
+done > "${BSF}"
+
+
+# Build the service program if needed.
+
+if action_needed "${LIBIFSNAME}/${SRVPGM}.SRVPGM"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
+ CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
+ CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
+ CMD="${CMD} BNDDIR((${TARGETLIB}/${STATBNDDIR})"
+ if [ "${WITH_ZLIB}" -ne 0 ]
+ then CMD="${CMD} (${ZLIB_LIB}/${ZLIB_BNDDIR})"
+ fi
+ CMD="${CMD})"
+ CMD="${CMD} BNDSRVPGM(QADRTTS)"
+ CMD="${CMD} TEXT('libxml2 dynamic library')"
+ CMD="${CMD} TGTRLS(${TGTRLS})"
+ system "${CMD}"
+ LINK=YES
+fi
+
+
+# If needed, (re)create the dynamic binding directory.
+
+if action_needed "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
+then LINK=YES
+fi
+
+if [ "${LINK}" ]
+then rm -rf "${LIBIFSNAME}/${DYNBNDDIR}.BNDDIR"
+ CMD="CRTBNDDIR BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
+ CMD="${CMD} TEXT('libxml2 dynamic binding directory')"
+ system "${CMD}"
+ CMD="ADDBNDDIRE BNDDIR(${TARGETLIB}/${DYNBNDDIR})"
+ CMD="${CMD} OBJ((*LIBL/${SRVPGM} *SRVPGM))"
+ system "${CMD}"
+fi
diff --git a/os400/make.sh b/os400/make.sh
new file mode 100644
index 0000000..864e72b
--- /dev/null
+++ b/os400/make.sh
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# libxml2 compilation script for the OS/400.
+# This is a shell script since make is not a standard component of OS/400.
+#
+# See Copyright for the status of this software.
+#
+# Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+#
+
+SCRIPTDIR=`dirname "${0}"`
+. "${SCRIPTDIR}/initscript.sh"
+cd "${TOPDIR}"
+
+
+# Create the OS/400 library if it does not exist.
+
+if action_needed "${LIBIFSNAME}"
+then CMD="CRTLIB LIB(${TARGETLIB})"
+ CMD="${CMD} TEXT('libxml2: XML parser and toolkit API')"
+ system "${CMD}"
+fi
+
+
+# Create the DOCS source file if it does not exist.
+
+if action_needed "${LIBIFSNAME}/DOCS.FILE"
+then CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
+ CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
+ system "${CMD}"
+fi
+
+
+# Copy some documentation files if needed.
+
+for TEXT in "${TOPDIR}/AUTHORS" "${TOPDIR}/ChangeLog" \
+ "${TOPDIR}/Copyright" "${TOPDIR}/HACKING" "${TOPDIR}/README" \
+ "${TOPDIR}/MAINTAINERS" "${TOPDIR}/NEWS" "${TOPDIR}/TODO" \
+ "${TOPDIR}/TODO_SCHEMAS" "${TOPDIR}/os400/README400"
+do if [ -f "${TEXT}" ]
+ then MEMBER="`basename \"${TEXT}\" .OS400`"
+ MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
+
+ if action_needed "${MEMBER}" "${TEXT}"
+ then CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}')"
+ CMD="${CMD} TOCCSID(${TGTCCSID})"
+ CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"
+ system "${CMD}"
+ fi
+ fi
+done
+
+
+# Build files from template.
+
+configFile()
+
+{
+ args=`set | sed -e '/^[A-Za-z_][A-Za-z0-9_]*=/!d' \
+ -e 's/[\/\\\\&]/\\\\&/g' \
+ -e "s/'/'\\\\\\''/g" \
+ -e 's/^\([^=]*\)=\(.*\)$/-e '\''s\/@\1@\/\2\/g'\'/`
+ eval sed ${args} < "${1}".in > "${1}"
+}
+
+configFile include/libxml/xmlversion.h
+configFile os400/os400config.h
+mv os400/os400config.h config.h
+
+
+# Build in each directory.
+
+for SUBDIR in include rpg src
+do "${SCRIPTDIR}/make-${SUBDIR}.sh"
+done
diff --git a/os400/os400config.h.in b/os400/os400config.h.in
new file mode 100644
index 0000000..3966ac8
--- /dev/null
+++ b/os400/os400config.h.in
@@ -0,0 +1,353 @@
+/**
+*** Configuration parameters for the OS/400 implementation.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+/* Define to 1 if you have the <ansidecl.h> header file. */
+#undef HAVE_ANSIDECL_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H 1
+
+/* Whether struct sockaddr::__ss_family exists */
+#undef HAVE_BROKEN_SS_FAMILY
+
+/* Define to 1 if you have the `class' function. */
+#undef HAVE_CLASS
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1 /* Locally emulated. */
+
+/* Have dlopen based dso */
+#define HAVE_DLOPEN 1 /* Locally emulated. */
+
+/* Define to 1 if you have the <dl.h> header file. */
+#undef HAVE_DL_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define to 1 if you have the `fprintf' function. */
+#undef HAVE_FPRINTF /* Use trio. */
+
+/* Define to 1 if you have the `fp_class' function. */
+#undef HAVE_FP_CLASS
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+#undef HAVE_FP_CLASS_H
+
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
+/* Define if getaddrinfo is there */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
+/* Define if isinf is there */
+#undef HAVE_ISINF
+
+/* Define if isnan is there */
+#undef HAVE_ISNAN
+
+/* Define to 1 if you have the `isnand' function. */
+#undef HAVE_ISNAND
+
+/* Define if history library is there (-lhistory) */
+#undef HAVE_LIBHISTORY
+
+/* Have compression library */
+#undef HAVE_LIBLZMA
+
+/* Define if pthread library is there (-lpthread) */
+#undef HAVE_LIBPTHREAD
+
+/* Define if readline library is there (-lreadline) */
+#undef HAVE_LIBREADLINE
+
+/* Have compression library */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the `localtime' function. */
+#define HAVE_LOCALTIME 1
+
+/* Define to 1 if you have the <lzma.h> header file. */
+#undef HAVE_LZMA_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* mmap() is no good without munmap() */
+#if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP)
+# undef /**/ HAVE_MMAP
+#endif
+
+/* Define to 1 if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define to 1 if you have the `printf' function. */
+#undef HAVE_PRINTF /* Use trio. */
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF /* Use trio. */
+
+/* Define if <pthread.h> is there */
+#define HAVE_PTHREAD_H 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if you have the `rand_r' function. */
+#define HAVE_RAND_R 1
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H 1
+
+/* Have shl_load based dso */
+#undef HAVE_SHLLOAD
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF /* Use trio. */
+
+/* Define to 1 if you have the `sprintf' function. */
+#undef HAVE_SPRINTF /* Use trio. */
+
+/* Define to 1 if you have the `srand' function. */
+#define HAVE_SRAND 1
+
+/* Define to 1 if you have the `scanf' function. */
+#undef HAVE_SCANF /* Use trio. */
+
+/* Define to 1 if you have the `fscanf' function. */
+#undef HAVE_FSCANF /* Use trio. */
+
+/* Define to 1 if you have the `sscanf' function. */
+#undef HAVE_SSCANF /* Use trio. */
+
+/* Define to 1 if you have the `stat' function. */
+#define HAVE_STAT 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1 /* Overloaded */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `time' function. */
+#define HAVE_TIME 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Whether va_copy() is available */
+#undef HAVE_VA_COPY
+
+/* Define to 1 if you have the `vfprintf' function. */
+#undef HAVE_VFPRINTF /* Use trio. */
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF /* Use trio. */
+
+/* Define to 1 if you have the `vsprintf' function. */
+#undef HAVE_VSPRINTF /* Use trio. */
+
+/* Define to 1 if you have the <zlib.h> header file. */
+/* Actually dependent on the compilation script. */
+#if @WITH_ZLIB@
+#define HAVE_ZLIB_H 1
+#else
+#undef HAVE_ZLIB_H
+#endif
+
+/* Define to 1 if you have the `_stat' function. */
+#undef HAVE__STAT
+
+/* Whether __va_copy() is available */
+#undef HAVE___VA_COPY
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#define PACKAGE "libxml2"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Support for IPv6 */
+#define SUPPORT_IP6
+
+/* Version number of package */
+#define VERSION "@VERSION@"
+
+/* Determine what socket length (socklen_t) data type is */
+#define XML_SOCKLEN_T socklen_t
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Using the Win32 Socket implementation */
+#undef _WINSOCKAPI_
+
+/* ss_family is not defined here, use __ss_family instead */
+#undef ss_family
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Type cast for the send() function 2nd arg */
+#define SEND_ARG2_CAST (char *)
+
+/* Type cast for the gethostbyname() argument */
+#define GETHOSTBYNAME_ARG_CAST (char *)
+
+/* Define if va_list is an array type */
+#define VA_LIST_IS_ARRAY 1
diff --git a/os400/rpgsupport.c b/os400/rpgsupport.c
new file mode 100644
index 0000000..a3609c0
--- /dev/null
+++ b/os400/rpgsupport.c
@@ -0,0 +1,270 @@
+/**
+*** Additional procedures for ILE/RPG support.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <sys/types.h>
+
+#include <stdarg.h>
+
+#include "libxml/xmlmemory.h"
+#include "libxml/xpath.h"
+#include "libxml/parser.h"
+#include "libxml/HTMLparser.h"
+
+#include "rpgsupport.h"
+
+
+/**
+*** ILE/RPG cannot directly derefence a pointer and has no macros.
+*** The following additional procedures supply these functions.
+*** In addition, the following code is adjusted for threads control at
+*** compile time via the C macros.
+**/
+
+#define THREADED_VAR(name, type) \
+ type __get_##name(void) { return name; } \
+ void __set_##name(type arg) { name = arg; }
+
+
+THREADED_VAR(xmlFree, xmlFreeFunc)
+
+void
+__call_xmlFree(void * mem)
+
+{
+ xmlFree(mem);
+}
+
+
+THREADED_VAR(xmlMalloc, xmlMallocFunc)
+
+void *
+__call_xmlMalloc(size_t size)
+
+{
+ return xmlMalloc(size);
+}
+
+
+THREADED_VAR(xmlMallocAtomic, xmlMallocFunc)
+
+void *
+__call_xmlMallocAtomic(size_t size)
+
+{
+ return xmlMallocAtomic(size);
+}
+
+
+THREADED_VAR(xmlRealloc, xmlReallocFunc)
+
+void *
+__call_xmlRealloc(void * mem, size_t size)
+
+{
+ return xmlRealloc(mem, size);
+}
+
+
+THREADED_VAR(xmlMemStrdup, xmlStrdupFunc)
+
+char *
+__call_xmlMemStrdup(const char * str)
+
+{
+ return xmlMemStrdup(str);
+}
+
+
+#ifdef LIBXML_DOCB_ENABLED
+THREADED_VAR(docbDefaultSAXHandler, xmlSAXHandlerV1)
+#endif
+
+
+#ifdef LIBXML_HTML_ENABLED
+THREADED_VAR(htmlDefaultSAXHandler, xmlSAXHandlerV1)
+#endif
+
+
+THREADED_VAR(xmlLastError, xmlError)
+
+THREADED_VAR(oldXMLWDcompatibility, int)
+THREADED_VAR(xmlBufferAllocScheme, xmlBufferAllocationScheme)
+THREADED_VAR(xmlDefaultBufferSize, int)
+THREADED_VAR(xmlDefaultSAXHandler, xmlSAXHandlerV1)
+THREADED_VAR(xmlDefaultSAXLocator, xmlSAXLocator)
+THREADED_VAR(xmlDoValidityCheckingDefaultValue, int)
+
+/* No caller to xmlGenericError() because the argument list is unknown. */
+THREADED_VAR(xmlGenericError, xmlGenericErrorFunc)
+
+
+THREADED_VAR(xmlStructuredError, xmlStructuredErrorFunc)
+
+void
+__call_xmlStructuredError(void * userData, xmlErrorPtr error)
+
+{
+ xmlStructuredError(userData, error);
+}
+
+THREADED_VAR(xmlGenericErrorContext, void *)
+THREADED_VAR(xmlStructuredErrorContext, void *)
+THREADED_VAR(xmlGetWarningsDefaultValue, int)
+THREADED_VAR(xmlIndentTreeOutput, int)
+THREADED_VAR(xmlTreeIndentString, const char *)
+THREADED_VAR(xmlKeepBlanksDefaultValue, int)
+THREADED_VAR(xmlLineNumbersDefaultValue, int)
+THREADED_VAR(xmlLoadExtDtdDefaultValue, int)
+THREADED_VAR(xmlParserDebugEntities, int)
+THREADED_VAR(xmlParserVersion, const char *)
+THREADED_VAR(xmlPedanticParserDefaultValue, int)
+THREADED_VAR(xmlSaveNoEmptyTags, int)
+THREADED_VAR(xmlSubstituteEntitiesDefaultValue, int)
+
+
+THREADED_VAR(xmlRegisterNodeDefaultValue, xmlRegisterNodeFunc)
+
+void
+__call_xmlRegisterNodeDefaultValue(xmlNodePtr node)
+
+{
+ xmlRegisterNodeDefaultValue(node);
+}
+
+
+THREADED_VAR(xmlDeregisterNodeDefaultValue, xmlDeregisterNodeFunc)
+
+void
+__call_xmlDeregisterNodeDefaultValue(xmlNodePtr node)
+
+{
+ xmlDeregisterNodeDefaultValue(node);
+}
+
+
+THREADED_VAR(xmlParserInputBufferCreateFilenameValue, xmlParserInputBufferCreateFilenameFunc)
+
+xmlParserInputBufferPtr
+__call_xmlParserInputBufferCreateFilenameValue(const char *URI,
+ xmlCharEncoding enc)
+
+{
+ return xmlParserInputBufferCreateFilenameValue(URI, enc);
+}
+
+
+THREADED_VAR(xmlOutputBufferCreateFilenameValue, xmlOutputBufferCreateFilenameFunc)
+
+xmlOutputBufferPtr
+__call_xmlOutputBufferCreateFilenameValue(const char *URI,
+ xmlCharEncodingHandlerPtr encoder, int compression)
+
+{
+ return xmlOutputBufferCreateFilenameValue(URI, encoder, compression);
+}
+
+
+
+/**
+*** va_list support.
+**/
+
+void
+__xmlVaStart(char * * list, char * lastargaddr, size_t lastargsize)
+
+{
+ list[1] = lastargaddr + lastargsize;
+}
+
+
+void *
+__xmlVaArg(char * * list, void * dest, size_t argsize)
+
+{
+ size_t align;
+
+ if (!argsize)
+ return (void *) NULL;
+
+ for (align = 16; align > argsize; align >>= 1)
+ ;
+
+ align--;
+ list[0] = list[1] + (align - (((size_t) list[0] - 1) & align));
+ list[1] = list[0] + argsize;
+
+ if (dest)
+ memcpy(dest, list[0], argsize);
+
+ return (void *) list[0];
+}
+
+
+void
+__xmlVaEnd(char * * list)
+
+{
+ /* Nothing to do. */
+}
+
+
+#ifdef LIBXML_XPATH_ENABLED
+
+int
+__xmlXPathNodeSetGetLength(const xmlNodeSet * ns)
+
+{
+ return xmlXPathNodeSetGetLength(ns);
+}
+
+
+xmlNodePtr
+__xmlXPathNodeSetItem(const xmlNodeSet * ns, int index)
+
+{
+ return xmlXPathNodeSetItem(ns, index);
+}
+
+
+int
+__xmlXPathNodeSetIsEmpty(const xmlNodeSet * ns)
+
+{
+ return xmlXPathNodeSetIsEmpty(ns);
+}
+
+#endif
+
+
+#ifdef LIBXML_HTML_ENABLED
+
+const char *
+__htmlDefaultSubelement(const htmlElemDesc * elt)
+
+{
+ return htmlDefaultSubelement(elt);
+}
+
+
+int
+__htmlElementAllowedHereDesc(const htmlElemDesc * parent,
+ const htmlElemDesc * elt)
+
+{
+ return htmlElementAllowedHereDesc(parent, elt);
+}
+
+
+const char * *
+__htmlRequiredAttrs(const htmlElemDesc * elt)
+
+{
+ return htmlRequiredAttrs(elt);
+}
+
+#endif
diff --git a/os400/rpgsupport.h b/os400/rpgsupport.h
new file mode 100644
index 0000000..6725b59
--- /dev/null
+++ b/os400/rpgsupport.h
@@ -0,0 +1,157 @@
+/**
+*** Additional delarations for ILE/RPG support.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#ifndef __RPGSUPPORT_H__
+#define __RPGSUPPORT_H__
+
+#include <sys/types.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/xpath.h>
+#include "libxml/HTMLparser.h"
+
+
+XMLPUBFUN xmlFreeFunc __get_xmlFree(void);
+XMLPUBFUN void __set_xmlFree(xmlFreeFunc freefunc);
+XMLPUBFUN void __call_xmlFree(void * mem);
+XMLPUBFUN xmlMallocFunc __get_xmlMalloc(void);
+XMLPUBFUN void __set_xmlMalloc(xmlMallocFunc allocfunc);
+XMLPUBFUN void * __call_xmlMalloc(size_t size);
+XMLPUBFUN xmlMallocFunc __get_xmlMallocAtomic(void);
+XMLPUBFUN void __set_xmlMallocAtomic(xmlMallocFunc allocfunc);
+XMLPUBFUN void * __call_xmlMallocAtomic(size_t size);
+XMLPUBFUN xmlReallocFunc __get_xmlRealloc(void);
+XMLPUBFUN void __set_xmlRealloc(xmlReallocFunc reallocfunc);
+XMLPUBFUN void * __call_xmlRealloc(void * mem, size_t size);
+XMLPUBFUN xmlStrdupFunc __get_xmlMemStrdup(void);
+XMLPUBFUN void __set_xmlMemStrdup(xmlStrdupFunc strdupfunc);
+XMLPUBFUN char * __call_xmlMemStrdup(const char * str);
+
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 __get_docbDefaultSAXHandler(void);
+XMLPUBFUN void __set_docbDefaultSAXHandler(xmlSAXHandlerV1 hdlr);
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 __get_htmlDefaultSAXHandler(void);
+XMLPUBFUN void __set_htmlDefaultSAXHandler(xmlSAXHandlerV1 hdlr);
+#endif
+
+XMLPUBFUN xmlError __get_xmlLastError(void);
+XMLPUBFUN void __set_xmlLastError(xmlError err);
+
+XMLPUBFUN int __get_oldXMLWDcompatibility(void);
+XMLPUBFUN void __set_oldXMLWDcompatibility(int val);
+
+XMLPUBFUN xmlBufferAllocationScheme __get_xmlBufferAllocScheme(void);
+XMLPUBFUN void __set_xmlBufferAllocScheme(xmlBufferAllocationScheme val);
+
+XMLPUBFUN int __get_xmlDefaultBufferSize(void);
+XMLPUBFUN void __set_xmlDefaultBufferSize(int val);
+
+XMLPUBFUN xmlSAXHandlerV1 __get_xmlDefaultSAXHandler(void);
+XMLPUBFUN void __set_xmlDefaultSAXHandler(xmlSAXHandlerV1 val);
+
+XMLPUBFUN xmlSAXLocator __get_xmlDefaultSAXLocator(void);
+XMLPUBFUN void __set_xmlDefaultSAXLocator(xmlSAXLocator val);
+
+XMLPUBFUN int __get_xmlDoValidityCheckingDefaultValue(void);
+XMLPUBFUN void __set_xmlDoValidityCheckingDefaultValue(int val);
+
+XMLPUBFUN xmlGenericErrorFunc __get_xmlGenericError(void);
+XMLPUBFUN void __set_xmlGenericError(xmlGenericErrorFunc val);
+
+XMLPUBFUN xmlStructuredErrorFunc __get_xmlStructuredError(void);
+XMLPUBFUN void __set_xmlStructuredError(xmlStructuredErrorFunc val);
+XMLPUBFUN void __call_xmlStructuredError(void *userData, xmlErrorPtr error);
+
+XMLPUBFUN void * __get_xmlGenericErrorContext(void);
+XMLPUBFUN void __set_xmlGenericErrorContext(void * val);
+
+XMLPUBFUN void * __get_xmlStructuredErrorContext(void);
+XMLPUBFUN void __set_xmlStructuredErrorContext(void * val);
+
+XMLPUBFUN int __get_xmlGetWarningsDefaultValue(void);
+XMLPUBFUN void __set_xmlGetWarningsDefaultValue(int val);
+
+XMLPUBFUN int __get_xmlIndentTreeOutput(void);
+XMLPUBFUN void __set_xmlIndentTreeOutput(int val);
+
+XMLPUBFUN const char * __get_xmlTreeIndentString(void);
+XMLPUBFUN void __set_xmlTreeIndentString(const char * val);
+
+XMLPUBFUN int __get_xmlKeepBlanksDefaultValue(void);
+XMLPUBFUN void __set_xmlKeepBlanksDefaultValue(int val);
+
+XMLPUBFUN int __get_xmlLineNumbersDefaultValue(void);
+XMLPUBFUN void __set_xmlLineNumbersDefaultValue(int val);
+
+XMLPUBFUN int __get_xmlLoadExtDtdDefaultValue(void);
+XMLPUBFUN void __set_xmlLoadExtDtdDefaultValue(int val);
+
+XMLPUBFUN int __get_xmlParserDebugEntities(void);
+XMLPUBFUN void __set_xmlParserDebugEntities(int val);
+
+XMLPUBFUN const char * __get_xmlParserVersion(void);
+XMLPUBFUN void __set_xmlParserVersion(const char * val);
+
+XMLPUBFUN int __get_xmlPedanticParserDefaultValue(void);
+XMLPUBFUN void __set_xmlPedanticParserDefaultValue(int val);
+
+XMLPUBFUN int __get_xmlSaveNoEmptyTags(void);
+XMLPUBFUN void __set_xmlSaveNoEmptyTags(int val);
+
+XMLPUBFUN int __get_xmlSubstituteEntitiesDefaultValue(void);
+XMLPUBFUN void __set_xmlSubstituteEntitiesDefaultValue(int val);
+
+XMLPUBFUN xmlRegisterNodeFunc __get_xmlRegisterNodeDefaultValue(void);
+XMLPUBFUN void __set_xmlRegisterNodeDefaultValue(xmlRegisterNodeFunc val);
+XMLPUBFUN void __call_xmlRegisterNodeDefaultValue(xmlNodePtr node);
+
+XMLPUBFUN xmlDeregisterNodeFunc __get_xmlDeregisterNodeDefaultValue(void);
+XMLPUBFUN void __set_xmlDeregisterNodeDefaultValue(xmlDeregisterNodeFunc val);
+XMLPUBFUN void __call_xmlDeregisterNodeDefaultValue(xmlNodePtr node);
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+ __get_xmlParserInputBufferCreateFilenameValue(void);
+XMLPUBFUN void __set_xmlParserInputBufferCreateFilenameValue(
+ xmlParserInputBufferCreateFilenameFunc val);
+XMLPUBFUN xmlParserInputBufferPtr
+ __call_xmlParserInputBufferCreateFilenameValue(const char *URI,
+ xmlCharEncoding enc);
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+ __get_xmlOutputBufferCreateFilenameValue(void);
+XMLPUBFUN void __set_xmlOutputBufferCreateFilenameValue(
+ xmlOutputBufferCreateFilenameFunc val);
+XMLPUBFUN xmlOutputBufferPtr
+ __call_xmlOutputBufferCreateFilenameValue(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+
+XMLPUBFUN void __xmlVaStart(char * * list,
+ char * lastargaddr, size_t lastargsize);
+XMLPUBFUN void * __xmlVaArg(char * * list, void * dest, size_t argsize);
+XMLPUBFUN void __xmlVaEnd(char * * list);
+
+#ifdef LIBXML_XPATH_ENABLED
+XMLPUBFUN int __xmlXPathNodeSetGetLength(xmlNodeSetPtr ns);
+XMLPUBFUN xmlNodePtr __xmlXPathNodeSetItem(xmlNodeSetPtr ns, int index);
+XMLPUBFUN int __xmlXPathNodeSetIsEmpty(xmlNodeSetPtr ns);
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN const char * __htmlDefaultSubelement(const htmlElemDesc * elt);
+XMLPUBFUN int __htmlElementAllowedHereDesc(const htmlElemDesc * parent,
+ const htmlElemDesc * elt);
+XMLPUBFUN const char * *
+ __htmlRequiredAttrs(const htmlElemDesc * elt);
+#endif
+
+#endif
diff --git a/os400/transcode.c b/os400/transcode.c
new file mode 100644
index 0000000..bae6187
--- /dev/null
+++ b/os400/transcode.c
@@ -0,0 +1,268 @@
+/**
+*** Transcoding support and wrappers.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <sys/types.h>
+#include <iconv.h>
+#include "libxml/xmlmemory.h"
+#include "libxml/dict.h"
+#include "transcode.h"
+
+
+/**
+*** Destroy a dictionary and mark as destroyed.
+**/
+
+void
+xmlZapDict(xmlDictPtr * dict)
+
+{
+ if (dict && *dict) {
+ xmlDictFree(*dict);
+ *dict = (xmlDictPtr) NULL;
+ }
+}
+
+
+/**
+*** Support for inline conversion from/to UTF-8.
+*** This is targetted to function parameter encoding conversion.
+*** Method is:
+*** - Convert string from/to UTF-8.
+*** - Keep it in a dictionary.
+*** - Free original string if a release procedure is provided.
+*** Can also be called without dictionary to convert a string from/to UTF-8
+*** into xmlMalloc'ed dynamic storage.
+**/
+
+const char *
+xmlTranscodeResult(const xmlChar * s, const char * encoding,
+ xmlDictPtr * dict, void (*freeproc)(const void *))
+
+{
+ size_t l;
+ iconv_t cd;
+ char * srcp;
+ char * dstp;
+ size_t srcc;
+ size_t dstc;
+ char * ts;
+ const char * ret;
+ int err;
+ static const int nullstring[] = { 0 };
+
+ /* Convert from UTF-8. */
+
+ if (!s)
+ return (const char *) NULL;
+
+ ret = (const char *) NULL;
+ ts = (char *) NULL;
+ err = 0;
+ l = xmlStrlen(s);
+
+ if (!l && dict)
+ ret = (const char *) nullstring;
+ else {
+ if (dict && !*dict)
+ err = !(*dict = xmlDictCreate());
+
+ if (!err)
+ err = !(ts = xmlMalloc(4 * l + 4));
+
+ dstp = ts;
+ dstc = 4 * l;
+
+ if (!err && l) {
+ if (!encoding)
+ encoding = "ibm-0"; /* Job's encoding. */
+
+ cd = iconv_open(encoding, "UTF-8");
+
+ if (cd == (iconv_t) -1)
+ err = 1;
+ else {
+ srcp = (char *) s;
+ srcc = l;
+ srcc = iconv(cd, &srcp, &srcc, &dstp, &dstc);
+ iconv_close(cd);
+ err = srcc == (size_t) -1;
+ }
+ }
+
+ if (!err) {
+ dstp[0] = dstp[1] = dstp[2] = dstp[3] = '\0';
+
+ if (!dict) {
+ if (dstc)
+ ts = xmlRealloc(ts, (dstp - ts) + 4);
+
+ ret = (const char *) ts;
+ ts = (char *) NULL;
+ }
+ else
+ ret = (char *) xmlDictLookup(*dict,
+ (xmlChar *) ts, dstp - ts + 1);
+ }
+ }
+
+ if (ts)
+ xmlFree(ts);
+
+ if (freeproc)
+ (*freeproc)(s);
+
+ return ret;
+}
+
+
+/**
+*** Support for inline conversion to UTF-8.
+*** Method is:
+*** - Convert string to UTF-8.
+*** - Keep it in a dictionary.
+*** Can also be called without dictionary to convert a string to UTF-8 into
+*** xmlMalloc'ed dynamic storage.
+**/
+
+static const xmlChar *
+inTranscode(const char * s, size_t l, const char * encoding, xmlDictPtr * dict)
+
+{
+ iconv_t cd;
+ char * srcp;
+ char * dstp;
+ size_t srcc;
+ size_t dstc;
+ xmlChar * ts;
+ const xmlChar * ret;
+ static const xmlChar nullstring[] = { 0 };
+
+ if (!l && dict)
+ return nullstring;
+
+ if (dict && !*dict)
+ if (!(*dict = xmlDictCreate()))
+ return (const xmlChar *) NULL;
+
+ ts = (xmlChar *) xmlMalloc(6 * l + 1);
+
+ if (!ts)
+ return (const xmlChar *) NULL;
+
+ dstp = (char *) ts;
+ dstc = 6 * l;
+
+ if (l) {
+ if (!encoding)
+ encoding = "ibm-0"; /* Use job's encoding. */
+
+ cd = iconv_open("UTF-8", encoding);
+
+ if (cd == (iconv_t) -1) {
+ xmlFree((char *) ts);
+ return (const xmlChar *) NULL;
+ }
+
+ srcp = (char *) s;
+ srcc = l;
+ srcc = iconv(cd, &srcp, &srcc, &dstp, &dstc);
+ iconv_close(cd);
+
+ if (srcc == (size_t) -1) {
+ xmlFree((char *) ts);
+ return (const xmlChar *) NULL;
+ }
+ }
+
+ *dstp = '\0';
+
+ if (!dict) {
+ if (dstc)
+ ts = xmlRealloc(ts, (dstp - ts) + 1);
+
+ return ts;
+ }
+
+ ret = xmlDictLookup(*dict, ts, dstp - ts + 1);
+ xmlFree((char *) ts);
+ return ret;
+}
+
+
+/**
+*** Input 8-bit character string parameter.
+**/
+
+const xmlChar *
+xmlTranscodeString(const char * s, const char * encoding, xmlDictPtr * dict)
+
+{
+ if (!s)
+ return (const xmlChar *) NULL;
+
+ return inTranscode(s, xmlStrlen(s), encoding, dict);
+}
+
+
+/**
+*** Input 16-bit character string parameter.
+**/
+
+const xmlChar *
+xmlTranscodeWString(const char * s, const char * encoding, xmlDictPtr * dict)
+
+{
+ size_t i;
+
+ if (!s)
+ return (const xmlChar *) NULL;
+
+ for (i = 0; s[i] && s[i + 1]; i += 2)
+ ;
+
+ return inTranscode(s, i, encoding, dict);
+}
+
+
+/**
+*** Input 32-bit character string parameter.
+**/
+
+const xmlChar *
+xmlTranscodeHString(const char * s, const char * encoding, xmlDictPtr * dict)
+
+{
+ size_t i;
+
+ if (!s)
+ return (const xmlChar *) NULL;
+
+ for (i = 0; s[i] && s[i + 1] && s[i + 2] && s[i + 3]; i += 4)
+ ;
+
+ return inTranscode(s, i, encoding, dict);
+}
+
+
+/**
+*** vasprintf() implementation with result transcoding.
+**/
+
+const char *
+xmlVasprintf(xmlDictPtr * dict, const char * encoding,
+ const xmlChar * fmt, va_list args)
+
+{
+ char * s = NULL;
+
+ vasprintf(&s, fmt, args);
+ return xmlTranscodeResult((const xmlChar *) s, encoding, dict, free);
+}
diff --git a/os400/transcode.h b/os400/transcode.h
new file mode 100644
index 0000000..6ca5773
--- /dev/null
+++ b/os400/transcode.h
@@ -0,0 +1,43 @@
+/**
+*** Transcoding support declarations.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#ifndef _TRANSCODE_H_
+#define _TRANSCODE_H_
+
+#include <stdarg.h>
+#include <libxml/dict.h>
+
+
+XMLPUBFUN void xmlZapDict(xmlDictPtr * dict);
+XMLPUBFUN const char * xmlTranscodeResult(const xmlChar * s,
+ const char * encoding, xmlDictPtr * dict,
+ void (*freeproc)(const void *));
+XMLPUBFUN const xmlChar * xmlTranscodeString(const char * s,
+ const char * encoding, xmlDictPtr * dict);
+XMLPUBFUN const xmlChar * xmlTranscodeWString(const char * s,
+ const char * encoding, xmlDictPtr * dict);
+XMLPUBFUN const xmlChar * xmlTranscodeHString(const char * s,
+ const char * encoding, xmlDictPtr * dict);
+
+#ifndef XML_NO_SHORT_NAMES
+/**
+*** Since the above functions are generally called "inline" (i.e.: several
+*** times nested in a single expression), define shorthand names
+*** to minimize calling statement length.
+**/
+
+#define xmlTR xmlTranscodeResult
+#define xmlTS xmlTranscodeString
+#define xmlTW xmlTranscodeWString
+#define xmlTH xmlTranscodeHstring
+#endif
+
+XMLPUBFUN const char * xmlVasprintf(xmlDictPtr * dict, const char * encoding,
+ const xmlChar * fmt, va_list args);
+
+#endif
diff --git a/os400/wrappers.c b/os400/wrappers.c
new file mode 100644
index 0000000..9f592b7
--- /dev/null
+++ b/os400/wrappers.c
@@ -0,0 +1,170 @@
+/**
+*** UTF-8/EBCDIC wrappers to system and C library procedures.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <dlfcn.h>
+#include <netdb.h>
+#include <errno.h>
+
+#include "config.h"
+
+#include "libxml/xmlmemory.h"
+
+#include "transcode.h"
+
+
+static const char * lxdles = NULL;
+
+
+int
+_lx_getaddrinfo(const char * node, const char * service,
+ const struct addrinfo * hints, struct addrinfo * * res)
+
+{
+ xmlDictPtr d = NULL;
+ int i;
+
+ i = getaddrinfo(xmlTranscodeResult(node, NULL, &d, NULL),
+ xmlTranscodeResult(service, NULL, &d, NULL), hints, res);
+ xmlZapDict(&d);
+ return i;
+}
+
+
+const char *
+_lx_inet_ntop(int af, const void * src, char * dst, socklen_t size)
+
+{
+ const char * cp1 = inet_ntop(af, src, dst, size);
+ char const * cp2;
+ int i;
+
+ if (!cp1)
+ return cp1;
+
+ if (!(cp2 = xmlTranscodeString(cp1, NULL, NULL)))
+ return cp2;
+
+ i = strlen(cp2);
+
+ if (i >= size) {
+ xmlFree((char *) cp2);
+ errno = ENOSPC;
+ return (const char *) NULL;
+ }
+
+ memcpy(dst, cp2, i + 1);
+ xmlFree((char *) cp2);
+ return dst;
+}
+
+
+void *
+_lx_dlopen(const char * filename, int flag)
+
+{
+ xmlDictPtr d = NULL;
+ void * result;
+
+ result = dlopen(xmlTranscodeResult(filename, NULL, &d, NULL), flag);
+ xmlZapDict(&d);
+ return result;
+}
+
+
+void *
+_lx_dlsym(void * handle, const char * symbol)
+
+{
+ xmlDictPtr d = NULL;
+ void * result;
+
+ result = dlsym(handle, xmlTranscodeResult(symbol, NULL, &d, NULL));
+ xmlZapDict(&d);
+ return result;
+}
+
+
+char *
+_lx_dlerror(void)
+
+{
+ char * cp1 = (char *) dlerror();
+
+ if (!cp1)
+ return cp1;
+
+ if (lxdles)
+ xmlFree((char *) lxdles);
+
+ lxdles = (const char *) xmlTranscodeString(cp1, NULL, NULL);
+ return (char *) lxdles;
+}
+
+
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+
+gzFile
+_lx_gzopen(const char * path, const char * mode)
+
+{
+ xmlDictPtr d = NULL;
+ gzFile f;
+
+ f = gzopen(xmlTranscodeResult(path, NULL, &d, NULL),
+ xmlTranscodeResult(mode, NULL, &d, NULL));
+ xmlZapDict(&d);
+ return f;
+}
+
+
+gzFile
+_lx_gzdopen(int fd, const char * mode)
+
+{
+ xmlDictPtr d = NULL;
+ gzFile f;
+
+ f = gzdopen(fd, xmlTranscodeResult(mode, NULL, &d, NULL));
+ xmlZapDict(&d);
+ return f;
+}
+
+int
+_lx_inflateInit2_(z_streamp strm, int windowBits,
+ const char * version, int stream_size)
+
+{
+ xmlDictPtr d = NULL;
+ int r;
+
+ r = inflateInit2_(strm, windowBits,
+ xmlTranscodeResult(version, NULL, &d, NULL), stream_size);
+ xmlZapDict(&d);
+ return r;
+}
+
+int
+_lx_deflateInit2_(z_streamp strm, int level, int method, int windowBits,
+ int memLevel, int strategy, const char * version, int stream_size)
+
+{
+ xmlDictPtr d = NULL;
+ int r;
+
+ r = deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ xmlTranscodeResult(version, NULL, &d, NULL), stream_size);
+ xmlZapDict(&d);
+ return r;
+}
+
+#endif
diff --git a/os400/wrappers.h b/os400/wrappers.h
new file mode 100644
index 0000000..388ec8c
--- /dev/null
+++ b/os400/wrappers.h
@@ -0,0 +1,70 @@
+/**
+*** Replace system/C library calls by EBCDIC wrappers.
+*** This is a layer inserted between libxml2 itself and the EBCDIC
+*** environment.
+***
+*** See Copyright for the status of this software.
+***
+*** Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
+**/
+
+#ifndef __WRAPPERS_H_
+#define __WRAPPERS_H_
+
+/**
+*** OS/400 specific defines.
+**/
+
+#define __cplusplus__strings__
+
+/**
+*** Force header inclusions before renaming procedures to UTF-8 wrappers.
+**/
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include "dlfcn.h"
+
+
+/**
+*** UTF-8 wrappers prototypes.
+**/
+
+extern int _lx_getaddrinfo(const char * node, const char * service,
+ const struct addrinfo * hints, struct addrinfo * * res);
+extern const char *
+ _lx_inet_ntop(int af,
+ const void * src, char * dst, socklen_t size);
+extern void * _lx_dlopen(const char * filename, int flag);
+extern void * _lx_dlsym(void * handle, const char * symbol);
+extern char * _lx_dlerror(void);
+
+
+#ifdef HAVE_ZLIB_H
+
+#include <zlib.h>
+
+extern gzFile _lx_gzopen(const char * path, const char * mode);
+extern gzFile _lx_gzdopen(int fd, const char * mode);
+
+#endif
+
+
+/**
+*** Rename data/procedures to UTF-8 wrappers.
+**/
+
+#define getaddrinfo _lx_getaddrinfo
+#define inet_ntop _lx_inet_ntop
+#define dlopen _lx_dlopen
+#define dlsym _lx_dlsym
+#define dlerror _lx_dlerror
+#define gzopen _lx_gzopen
+#define gzdopen _lx_gzdopen
+#define inflateInit2_ _lx_inflateInit2_
+#define deflateInit2_ _lx_deflateInit2_
+
+#endif
diff --git a/parser.c b/parser.c
new file mode 100644
index 0000000..1d93967
--- /dev/null
+++ b/parser.c
@@ -0,0 +1,15683 @@
+/*
+ * parser.c : an XML 1.0 parser, namespaces and validity support are mostly
+ * implemented on top of the SAX interfaces
+ *
+ * References:
+ * The XML specification:
+ * http://www.w3.org/TR/REC-xml
+ * Original 1.0 version:
+ * http://www.w3.org/TR/1998/REC-xml-19980210
+ * XML second edition working draft
+ * http://www.w3.org/TR/2000/WD-xml-2e-20000814
+ *
+ * Okay this is a big file, the parser core is around 7000 lines, then it
+ * is followed by the progressive parser top routines, then the various
+ * high level APIs to call the parser and a few miscellaneous functions.
+ * A number of helper functions and deprecated ones have been moved to
+ * parserInternals.c to reduce this file size.
+ * As much as possible the functions are associated with their relative
+ * production in the XML specification. A few productions defining the
+ * different ranges of character are actually implanted either in
+ * parserInternals.h or parserInternals.c
+ * The DOM tree build is realized from the default SAX callbacks in
+ * the module SAX.c.
+ * The routines doing the validation checks are in valid.c and called either
+ * from the SAX callbacks or as standalone functions using a preparsed
+ * document.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#if defined(WIN32) && !defined (__CYGWIN__)
+#define XML_DIR_SEP '\\'
+#else
+#define XML_DIR_SEP '/'
+#endif
+
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <stdarg.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+#include <libxml/uri.h>
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/xmlschemastypes.h>
+#include <libxml/relaxng.h>
+#endif
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+#ifdef HAVE_LZMA_H
+#include <lzma.h>
+#endif
+
+#include "buf.h"
+#include "enc.h"
+
+static void
+xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info);
+
+static xmlParserCtxtPtr
+xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID,
+ const xmlChar *base, xmlParserCtxtPtr pctx);
+
+/************************************************************************
+ * *
+ * Arbitrary limits set in the parser. See XML_PARSE_HUGE *
+ * *
+ ************************************************************************/
+
+#define XML_PARSER_BIG_ENTITY 1000
+#define XML_PARSER_LOT_ENTITY 5000
+
+/*
+ * XML_PARSER_NON_LINEAR is the threshold where the ratio of parsed entity
+ * replacement over the size in byte of the input indicates that you have
+ * and eponential behaviour. A value of 10 correspond to at least 3 entity
+ * replacement per byte of input.
+ */
+#define XML_PARSER_NON_LINEAR 10
+
+/*
+ * xmlParserEntityCheck
+ *
+ * Function to check non-linear entity expansion behaviour
+ * This is here to detect and stop exponential linear entity expansion
+ * This is not a limitation of the parser but a safety
+ * boundary feature. It can be disabled with the XML_PARSE_HUGE
+ * parser option.
+ */
+static int
+xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
+ xmlEntityPtr ent, size_t replacement)
+{
+ size_t consumed = 0;
+
+ if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
+ return (0);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ return (1);
+
+ /*
+ * This may look absurd but is needed to detect
+ * entities problems
+ */
+ if ((ent != NULL) && (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
+ (ent->content != NULL) && (ent->checked == 0)) {
+ unsigned long oldnbent = ctxt->nbentities;
+ xmlChar *rep;
+
+ ent->checked = 1;
+
+ rep = xmlStringDecodeEntities(ctxt, ent->content,
+ XML_SUBSTITUTE_REF, 0, 0, 0);
+
+ ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
+ if (rep != NULL) {
+ if (xmlStrchr(rep, '<'))
+ ent->checked |= 1;
+ xmlFree(rep);
+ rep = NULL;
+ }
+ }
+ if (replacement != 0) {
+ if (replacement < XML_MAX_TEXT_LENGTH)
+ return(0);
+
+ /*
+ * If the volume of entity copy reaches 10 times the
+ * amount of parsed data and over the large text threshold
+ * then that's very likely to be an abuse.
+ */
+ if (ctxt->input != NULL) {
+ consumed = ctxt->input->consumed +
+ (ctxt->input->cur - ctxt->input->base);
+ }
+ consumed += ctxt->sizeentities;
+
+ if (replacement < XML_PARSER_NON_LINEAR * consumed)
+ return(0);
+ } else if (size != 0) {
+ /*
+ * Do the check based on the replacement size of the entity
+ */
+ if (size < XML_PARSER_BIG_ENTITY)
+ return(0);
+
+ /*
+ * A limit on the amount of text data reasonably used
+ */
+ if (ctxt->input != NULL) {
+ consumed = ctxt->input->consumed +
+ (ctxt->input->cur - ctxt->input->base);
+ }
+ consumed += ctxt->sizeentities;
+
+ if ((size < XML_PARSER_NON_LINEAR * consumed) &&
+ (ctxt->nbentities * 3 < XML_PARSER_NON_LINEAR * consumed))
+ return (0);
+ } else if (ent != NULL) {
+ /*
+ * use the number of parsed entities in the replacement
+ */
+ size = ent->checked / 2;
+
+ /*
+ * The amount of data parsed counting entities size only once
+ */
+ if (ctxt->input != NULL) {
+ consumed = ctxt->input->consumed +
+ (ctxt->input->cur - ctxt->input->base);
+ }
+ consumed += ctxt->sizeentities;
+
+ /*
+ * Check the density of entities for the amount of data
+ * knowing an entity reference will take at least 3 bytes
+ */
+ if (size * 3 < consumed * XML_PARSER_NON_LINEAR)
+ return (0);
+ } else {
+ /*
+ * strange we got no data for checking
+ */
+ if (((ctxt->lastError.code != XML_ERR_UNDECLARED_ENTITY) &&
+ (ctxt->lastError.code != XML_WAR_UNDECLARED_ENTITY)) ||
+ (ctxt->nbentities <= 10000))
+ return (0);
+ }
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ return (1);
+}
+
+/**
+ * xmlParserMaxDepth:
+ *
+ * arbitrary depth limit for the XML documents that we allow to
+ * process. This is not a limitation of the parser but a safety
+ * boundary feature. It can be disabled with the XML_PARSE_HUGE
+ * parser option.
+ */
+unsigned int xmlParserMaxDepth = 256;
+
+
+
+#define SAX2 1
+#define XML_PARSER_BIG_BUFFER_SIZE 300
+#define XML_PARSER_BUFFER_SIZE 100
+#define SAX_COMPAT_MODE BAD_CAST "SAX compatibility mode document"
+
+/**
+ * XML_PARSER_CHUNK_SIZE
+ *
+ * When calling GROW that's the minimal amount of data
+ * the parser expected to have received. It is not a hard
+ * limit but an optimization when reading strings like Names
+ * It is not strictly needed as long as inputs available characters
+ * are followed by 0, which should be provided by the I/O level
+ */
+#define XML_PARSER_CHUNK_SIZE 100
+
+/*
+ * List of XML prefixed PI allowed by W3C specs
+ */
+
+static const char *xmlW3CPIs[] = {
+ "xml-stylesheet",
+ "xml-model",
+ NULL
+};
+
+
+/* DEPR void xmlParserHandleReference(xmlParserCtxtPtr ctxt); */
+static xmlEntityPtr xmlParseStringPEReference(xmlParserCtxtPtr ctxt,
+ const xmlChar **str);
+
+static xmlParserErrors
+xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
+ xmlSAXHandlerPtr sax,
+ void *user_data, int depth, const xmlChar *URL,
+ const xmlChar *ID, xmlNodePtr *list);
+
+static int
+xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options,
+ const char *encoding);
+#ifdef LIBXML_LEGACY_ENABLED
+static void
+xmlAddEntityReference(xmlEntityPtr ent, xmlNodePtr firstNode,
+ xmlNodePtr lastNode);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+static xmlParserErrors
+xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
+ const xmlChar *string, void *user_data, xmlNodePtr *lst);
+
+static int
+xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity);
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlErrAttributeDup:
+ * @ctxt: an XML parser context
+ * @prefix: the attribute prefix
+ * @localname: the attribute localname
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlErrAttributeDup(xmlParserCtxtPtr ctxt, const xmlChar * prefix,
+ const xmlChar * localname)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = XML_ERR_ATTRIBUTE_REDEFINED;
+
+ if (prefix == NULL)
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_ATTRIBUTE_REDEFINED, XML_ERR_FATAL, NULL, 0,
+ (const char *) localname, NULL, NULL, 0, 0,
+ "Attribute %s redefined\n", localname);
+ else
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_ATTRIBUTE_REDEFINED, XML_ERR_FATAL, NULL, 0,
+ (const char *) prefix, (const char *) localname,
+ NULL, 0, 0, "Attribute %s:%s redefined\n", prefix,
+ localname);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlFatalErr:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @extra: extra information string
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info)
+{
+ const char *errmsg;
+ char errstr[129] = "";
+
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ switch (error) {
+ case XML_ERR_INVALID_HEX_CHARREF:
+ errmsg = "CharRef: invalid hexadecimal value";
+ break;
+ case XML_ERR_INVALID_DEC_CHARREF:
+ errmsg = "CharRef: invalid decimal value";
+ break;
+ case XML_ERR_INVALID_CHARREF:
+ errmsg = "CharRef: invalid value";
+ break;
+ case XML_ERR_INTERNAL_ERROR:
+ errmsg = "internal error";
+ break;
+ case XML_ERR_PEREF_AT_EOF:
+ errmsg = "PEReference at end of document";
+ break;
+ case XML_ERR_PEREF_IN_PROLOG:
+ errmsg = "PEReference in prolog";
+ break;
+ case XML_ERR_PEREF_IN_EPILOG:
+ errmsg = "PEReference in epilog";
+ break;
+ case XML_ERR_PEREF_NO_NAME:
+ errmsg = "PEReference: no name";
+ break;
+ case XML_ERR_PEREF_SEMICOL_MISSING:
+ errmsg = "PEReference: expecting ';'";
+ break;
+ case XML_ERR_ENTITY_LOOP:
+ errmsg = "Detected an entity reference loop";
+ break;
+ case XML_ERR_ENTITY_NOT_STARTED:
+ errmsg = "EntityValue: \" or ' expected";
+ break;
+ case XML_ERR_ENTITY_PE_INTERNAL:
+ errmsg = "PEReferences forbidden in internal subset";
+ break;
+ case XML_ERR_ENTITY_NOT_FINISHED:
+ errmsg = "EntityValue: \" or ' expected";
+ break;
+ case XML_ERR_ATTRIBUTE_NOT_STARTED:
+ errmsg = "AttValue: \" or ' expected";
+ break;
+ case XML_ERR_LT_IN_ATTRIBUTE:
+ errmsg = "Unescaped '<' not allowed in attributes values";
+ break;
+ case XML_ERR_LITERAL_NOT_STARTED:
+ errmsg = "SystemLiteral \" or ' expected";
+ break;
+ case XML_ERR_LITERAL_NOT_FINISHED:
+ errmsg = "Unfinished System or Public ID \" or ' expected";
+ break;
+ case XML_ERR_MISPLACED_CDATA_END:
+ errmsg = "Sequence ']]>' not allowed in content";
+ break;
+ case XML_ERR_URI_REQUIRED:
+ errmsg = "SYSTEM or PUBLIC, the URI is missing";
+ break;
+ case XML_ERR_PUBID_REQUIRED:
+ errmsg = "PUBLIC, the Public Identifier is missing";
+ break;
+ case XML_ERR_HYPHEN_IN_COMMENT:
+ errmsg = "Comment must not contain '--' (double-hyphen)";
+ break;
+ case XML_ERR_PI_NOT_STARTED:
+ errmsg = "xmlParsePI : no target name";
+ break;
+ case XML_ERR_RESERVED_XML_NAME:
+ errmsg = "Invalid PI name";
+ break;
+ case XML_ERR_NOTATION_NOT_STARTED:
+ errmsg = "NOTATION: Name expected here";
+ break;
+ case XML_ERR_NOTATION_NOT_FINISHED:
+ errmsg = "'>' required to close NOTATION declaration";
+ break;
+ case XML_ERR_VALUE_REQUIRED:
+ errmsg = "Entity value required";
+ break;
+ case XML_ERR_URI_FRAGMENT:
+ errmsg = "Fragment not allowed";
+ break;
+ case XML_ERR_ATTLIST_NOT_STARTED:
+ errmsg = "'(' required to start ATTLIST enumeration";
+ break;
+ case XML_ERR_NMTOKEN_REQUIRED:
+ errmsg = "NmToken expected in ATTLIST enumeration";
+ break;
+ case XML_ERR_ATTLIST_NOT_FINISHED:
+ errmsg = "')' required to finish ATTLIST enumeration";
+ break;
+ case XML_ERR_MIXED_NOT_STARTED:
+ errmsg = "MixedContentDecl : '|' or ')*' expected";
+ break;
+ case XML_ERR_PCDATA_REQUIRED:
+ errmsg = "MixedContentDecl : '#PCDATA' expected";
+ break;
+ case XML_ERR_ELEMCONTENT_NOT_STARTED:
+ errmsg = "ContentDecl : Name or '(' expected";
+ break;
+ case XML_ERR_ELEMCONTENT_NOT_FINISHED:
+ errmsg = "ContentDecl : ',' '|' or ')' expected";
+ break;
+ case XML_ERR_PEREF_IN_INT_SUBSET:
+ errmsg =
+ "PEReference: forbidden within markup decl in internal subset";
+ break;
+ case XML_ERR_GT_REQUIRED:
+ errmsg = "expected '>'";
+ break;
+ case XML_ERR_CONDSEC_INVALID:
+ errmsg = "XML conditional section '[' expected";
+ break;
+ case XML_ERR_EXT_SUBSET_NOT_FINISHED:
+ errmsg = "Content error in the external subset";
+ break;
+ case XML_ERR_CONDSEC_INVALID_KEYWORD:
+ errmsg =
+ "conditional section INCLUDE or IGNORE keyword expected";
+ break;
+ case XML_ERR_CONDSEC_NOT_FINISHED:
+ errmsg = "XML conditional section not closed";
+ break;
+ case XML_ERR_XMLDECL_NOT_STARTED:
+ errmsg = "Text declaration '<?xml' required";
+ break;
+ case XML_ERR_XMLDECL_NOT_FINISHED:
+ errmsg = "parsing XML declaration: '?>' expected";
+ break;
+ case XML_ERR_EXT_ENTITY_STANDALONE:
+ errmsg = "external parsed entities cannot be standalone";
+ break;
+ case XML_ERR_ENTITYREF_SEMICOL_MISSING:
+ errmsg = "EntityRef: expecting ';'";
+ break;
+ case XML_ERR_DOCTYPE_NOT_FINISHED:
+ errmsg = "DOCTYPE improperly terminated";
+ break;
+ case XML_ERR_LTSLASH_REQUIRED:
+ errmsg = "EndTag: '</' not found";
+ break;
+ case XML_ERR_EQUAL_REQUIRED:
+ errmsg = "expected '='";
+ break;
+ case XML_ERR_STRING_NOT_CLOSED:
+ errmsg = "String not closed expecting \" or '";
+ break;
+ case XML_ERR_STRING_NOT_STARTED:
+ errmsg = "String not started expecting ' or \"";
+ break;
+ case XML_ERR_ENCODING_NAME:
+ errmsg = "Invalid XML encoding name";
+ break;
+ case XML_ERR_STANDALONE_VALUE:
+ errmsg = "standalone accepts only 'yes' or 'no'";
+ break;
+ case XML_ERR_DOCUMENT_EMPTY:
+ errmsg = "Document is empty";
+ break;
+ case XML_ERR_DOCUMENT_END:
+ errmsg = "Extra content at the end of the document";
+ break;
+ case XML_ERR_NOT_WELL_BALANCED:
+ errmsg = "chunk is not well balanced";
+ break;
+ case XML_ERR_EXTRA_CONTENT:
+ errmsg = "extra content at the end of well balanced chunk";
+ break;
+ case XML_ERR_VERSION_MISSING:
+ errmsg = "Malformed declaration expecting version";
+ break;
+ case XML_ERR_NAME_TOO_LONG:
+ errmsg = "Name too long use XML_PARSE_HUGE option";
+ break;
+#if 0
+ case:
+ errmsg = "";
+ break;
+#endif
+ default:
+ errmsg = "Unregistered error message";
+ }
+ if (info == NULL)
+ snprintf(errstr, 128, "%s\n", errmsg);
+ else
+ snprintf(errstr, 128, "%s: %%s\n", errmsg);
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_FATAL, NULL, 0, info, NULL, NULL, 0, 0, &errstr[0],
+ info);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlFatalErrMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlWarningMsg:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ *
+ * Handle a warning.
+ */
+static void
+xmlWarningMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if ((ctxt != NULL) && (ctxt->sax != NULL) &&
+ (ctxt->sax->initialized == XML_SAX2_MAGIC))
+ schannel = ctxt->sax->serror;
+ if (ctxt != NULL) {
+ __xmlRaiseError(schannel,
+ (ctxt->sax) ? ctxt->sax->warning : NULL,
+ ctxt->userData,
+ ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_WARNING, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ } else {
+ __xmlRaiseError(schannel, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, error,
+ XML_ERR_WARNING, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ }
+}
+
+/**
+ * xmlValidityError:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: extra data
+ *
+ * Handle a validity error.
+ */
+static void
+xmlValidityError(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, const xmlChar *str2)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL) {
+ ctxt->errNo = error;
+ if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
+ schannel = ctxt->sax->serror;
+ }
+ if (ctxt != NULL) {
+ __xmlRaiseError(schannel,
+ ctxt->vctxt.error, ctxt->vctxt.userData,
+ ctxt, NULL, XML_FROM_DTD, error,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ ctxt->valid = 0;
+ } else {
+ __xmlRaiseError(schannel, NULL, NULL,
+ ctxt, NULL, XML_FROM_DTD, error,
+ XML_ERR_ERROR, NULL, 0, (const char *) str1,
+ (const char *) str2, NULL, 0, 0,
+ msg, (const char *) str1, (const char *) str2);
+ }
+}
+
+/**
+ * xmlFatalErrMsgInt:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @val: an integer value
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErrMsgInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, int val)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlFatalErrMsgStrIntStr:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @str1: an string info
+ * @val: an integer value
+ * @str2: an string info
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErrMsgStrIntStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar *str1, int val,
+ const xmlChar *str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_FATAL,
+ NULL, 0, (const char *) str1, (const char *) str2,
+ NULL, val, 0, msg, str1, val, str2);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlFatalErrMsgStr:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @val: a string value
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlFatalErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar * val)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL,
+ XML_FROM_PARSER, error, XML_ERR_FATAL,
+ NULL, 0, (const char *) val, NULL, NULL, 0, 0, msg,
+ val);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlErrMsgStr:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @val: a string value
+ *
+ * Handle a non fatal parser error
+ */
+static void
+xmlErrMsgStr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const xmlChar * val)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL,
+ XML_FROM_PARSER, error, XML_ERR_ERROR,
+ NULL, 0, (const char *) val, NULL, NULL, 0, 0, msg,
+ val);
+}
+
+/**
+ * xmlNsErr:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the message
+ * @info1: extra information string
+ * @info2: extra information string
+ *
+ * Handle a fatal parser error, i.e. violating Well-Formedness constraints
+ */
+static void
+xmlNsErr(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg,
+ const xmlChar * info1, const xmlChar * info2,
+ const xmlChar * info3)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
+ XML_ERR_ERROR, NULL, 0, (const char *) info1,
+ (const char *) info2, (const char *) info3, 0, 0, msg,
+ info1, info2, info3);
+ if (ctxt != NULL)
+ ctxt->nsWellFormed = 0;
+}
+
+/**
+ * xmlNsWarn
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the message
+ * @info1: extra information string
+ * @info2: extra information string
+ *
+ * Handle a namespace warning error
+ */
+static void
+xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg,
+ const xmlChar * info1, const xmlChar * info2,
+ const xmlChar * info3)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
+ XML_ERR_WARNING, NULL, 0, (const char *) info1,
+ (const char *) info2, (const char *) info3, 0, 0, msg,
+ info1, info2, info3);
+}
+
+/************************************************************************
+ * *
+ * Library wide options *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlHasFeature:
+ * @feature: the feature to be examined
+ *
+ * Examines if the library has been compiled with a given feature.
+ *
+ * Returns a non-zero value if the feature exist, otherwise zero.
+ * Returns zero (0) if the feature does not exist or an unknown
+ * unknown feature is requested, non-zero otherwise.
+ */
+int
+xmlHasFeature(xmlFeature feature)
+{
+ switch (feature) {
+ case XML_WITH_THREAD:
+#ifdef LIBXML_THREAD_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_TREE:
+#ifdef LIBXML_TREE_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_OUTPUT:
+#ifdef LIBXML_OUTPUT_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_PUSH:
+#ifdef LIBXML_PUSH_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_READER:
+#ifdef LIBXML_READER_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_PATTERN:
+#ifdef LIBXML_PATTERN_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_WRITER:
+#ifdef LIBXML_WRITER_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_SAX1:
+#ifdef LIBXML_SAX1_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_FTP:
+#ifdef LIBXML_FTP_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_HTTP:
+#ifdef LIBXML_HTTP_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_VALID:
+#ifdef LIBXML_VALID_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_HTML:
+#ifdef LIBXML_HTML_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_LEGACY:
+#ifdef LIBXML_LEGACY_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_C14N:
+#ifdef LIBXML_C14N_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_CATALOG:
+#ifdef LIBXML_CATALOG_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_XPATH:
+#ifdef LIBXML_XPATH_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_XPTR:
+#ifdef LIBXML_XPTR_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_XINCLUDE:
+#ifdef LIBXML_XINCLUDE_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_ICONV:
+#ifdef LIBXML_ICONV_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_ISO8859X:
+#ifdef LIBXML_ISO8859X_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_UNICODE:
+#ifdef LIBXML_UNICODE_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_REGEXP:
+#ifdef LIBXML_REGEXP_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_AUTOMATA:
+#ifdef LIBXML_AUTOMATA_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_EXPR:
+#ifdef LIBXML_EXPR_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_SCHEMAS:
+#ifdef LIBXML_SCHEMAS_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_SCHEMATRON:
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_MODULES:
+#ifdef LIBXML_MODULES_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_DEBUG:
+#ifdef LIBXML_DEBUG_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_DEBUG_MEM:
+#ifdef DEBUG_MEMORY_LOCATION
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_DEBUG_RUN:
+#ifdef LIBXML_DEBUG_RUNTIME
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_ZLIB:
+#ifdef LIBXML_ZLIB_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_LZMA:
+#ifdef LIBXML_LZMA_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ case XML_WITH_ICU:
+#ifdef LIBXML_ICU_ENABLED
+ return(1);
+#else
+ return(0);
+#endif
+ default:
+ break;
+ }
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * SAX2 defaulted attributes handling *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlDetectSAX2:
+ * @ctxt: an XML parser context
+ *
+ * Do the SAX2 detection and specific intialization
+ */
+static void
+xmlDetectSAX2(xmlParserCtxtPtr ctxt) {
+ if (ctxt == NULL) return;
+#ifdef LIBXML_SAX1_ENABLED
+ if ((ctxt->sax) && (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
+ ((ctxt->sax->startElementNs != NULL) ||
+ (ctxt->sax->endElementNs != NULL))) ctxt->sax2 = 1;
+#else
+ ctxt->sax2 = 1;
+#endif /* LIBXML_SAX1_ENABLED */
+
+ ctxt->str_xml = xmlDictLookup(ctxt->dict, BAD_CAST "xml", 3);
+ ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
+ ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
+ if ((ctxt->str_xml==NULL) || (ctxt->str_xmlns==NULL) ||
+ (ctxt->str_xml_ns == NULL)) {
+ xmlErrMemory(ctxt, NULL);
+ }
+}
+
+typedef struct _xmlDefAttrs xmlDefAttrs;
+typedef xmlDefAttrs *xmlDefAttrsPtr;
+struct _xmlDefAttrs {
+ int nbAttrs; /* number of defaulted attributes on that element */
+ int maxAttrs; /* the size of the array */
+ const xmlChar *values[5]; /* array of localname/prefix/values/external */
+};
+
+/**
+ * xmlAttrNormalizeSpace:
+ * @src: the source string
+ * @dst: the target string
+ *
+ * Normalize the space in non CDATA attribute values:
+ * If the attribute type is not CDATA, then the XML processor MUST further
+ * process the normalized attribute value by discarding any leading and
+ * trailing space (#x20) characters, and by replacing sequences of space
+ * (#x20) characters by a single space (#x20) character.
+ * Note that the size of dst need to be at least src, and if one doesn't need
+ * to preserve dst (and it doesn't come from a dictionary or read-only) then
+ * passing src as dst is just fine.
+ *
+ * Returns a pointer to the normalized value (dst) or NULL if no conversion
+ * is needed.
+ */
+static xmlChar *
+xmlAttrNormalizeSpace(const xmlChar *src, xmlChar *dst)
+{
+ if ((src == NULL) || (dst == NULL))
+ return(NULL);
+
+ while (*src == 0x20) src++;
+ while (*src != 0) {
+ if (*src == 0x20) {
+ while (*src == 0x20) src++;
+ if (*src != 0)
+ *dst++ = 0x20;
+ } else {
+ *dst++ = *src++;
+ }
+ }
+ *dst = 0;
+ if (dst == src)
+ return(NULL);
+ return(dst);
+}
+
+/**
+ * xmlAttrNormalizeSpace2:
+ * @src: the source string
+ *
+ * Normalize the space in non CDATA attribute values, a slightly more complex
+ * front end to avoid allocation problems when running on attribute values
+ * coming from the input.
+ *
+ * Returns a pointer to the normalized value (dst) or NULL if no conversion
+ * is needed.
+ */
+static const xmlChar *
+xmlAttrNormalizeSpace2(xmlParserCtxtPtr ctxt, xmlChar *src, int *len)
+{
+ int i;
+ int remove_head = 0;
+ int need_realloc = 0;
+ const xmlChar *cur;
+
+ if ((ctxt == NULL) || (src == NULL) || (len == NULL))
+ return(NULL);
+ i = *len;
+ if (i <= 0)
+ return(NULL);
+
+ cur = src;
+ while (*cur == 0x20) {
+ cur++;
+ remove_head++;
+ }
+ while (*cur != 0) {
+ if (*cur == 0x20) {
+ cur++;
+ if ((*cur == 0x20) || (*cur == 0)) {
+ need_realloc = 1;
+ break;
+ }
+ } else
+ cur++;
+ }
+ if (need_realloc) {
+ xmlChar *ret;
+
+ ret = xmlStrndup(src + remove_head, i - remove_head + 1);
+ if (ret == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ xmlAttrNormalizeSpace(ret, ret);
+ *len = (int) strlen((const char *)ret);
+ return(ret);
+ } else if (remove_head) {
+ *len -= remove_head;
+ memmove(src, src + remove_head, 1 + *len);
+ return(src);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlAddDefAttrs:
+ * @ctxt: an XML parser context
+ * @fullname: the element fullname
+ * @fullattr: the attribute fullname
+ * @value: the attribute value
+ *
+ * Add a defaulted attribute for an element
+ */
+static void
+xmlAddDefAttrs(xmlParserCtxtPtr ctxt,
+ const xmlChar *fullname,
+ const xmlChar *fullattr,
+ const xmlChar *value) {
+ xmlDefAttrsPtr defaults;
+ int len;
+ const xmlChar *name;
+ const xmlChar *prefix;
+
+ /*
+ * Allows to detect attribute redefinitions
+ */
+ if (ctxt->attsSpecial != NULL) {
+ if (xmlHashLookup2(ctxt->attsSpecial, fullname, fullattr) != NULL)
+ return;
+ }
+
+ if (ctxt->attsDefault == NULL) {
+ ctxt->attsDefault = xmlHashCreateDict(10, ctxt->dict);
+ if (ctxt->attsDefault == NULL)
+ goto mem_error;
+ }
+
+ /*
+ * split the element name into prefix:localname , the string found
+ * are within the DTD and then not associated to namespace names.
+ */
+ name = xmlSplitQName3(fullname, &len);
+ if (name == NULL) {
+ name = xmlDictLookup(ctxt->dict, fullname, -1);
+ prefix = NULL;
+ } else {
+ name = xmlDictLookup(ctxt->dict, name, -1);
+ prefix = xmlDictLookup(ctxt->dict, fullname, len);
+ }
+
+ /*
+ * make sure there is some storage
+ */
+ defaults = xmlHashLookup2(ctxt->attsDefault, name, prefix);
+ if (defaults == NULL) {
+ defaults = (xmlDefAttrsPtr) xmlMalloc(sizeof(xmlDefAttrs) +
+ (4 * 5) * sizeof(const xmlChar *));
+ if (defaults == NULL)
+ goto mem_error;
+ defaults->nbAttrs = 0;
+ defaults->maxAttrs = 4;
+ if (xmlHashUpdateEntry2(ctxt->attsDefault, name, prefix,
+ defaults, NULL) < 0) {
+ xmlFree(defaults);
+ goto mem_error;
+ }
+ } else if (defaults->nbAttrs >= defaults->maxAttrs) {
+ xmlDefAttrsPtr temp;
+
+ temp = (xmlDefAttrsPtr) xmlRealloc(defaults, sizeof(xmlDefAttrs) +
+ (2 * defaults->maxAttrs * 5) * sizeof(const xmlChar *));
+ if (temp == NULL)
+ goto mem_error;
+ defaults = temp;
+ defaults->maxAttrs *= 2;
+ if (xmlHashUpdateEntry2(ctxt->attsDefault, name, prefix,
+ defaults, NULL) < 0) {
+ xmlFree(defaults);
+ goto mem_error;
+ }
+ }
+
+ /*
+ * Split the element name into prefix:localname , the string found
+ * are within the DTD and hen not associated to namespace names.
+ */
+ name = xmlSplitQName3(fullattr, &len);
+ if (name == NULL) {
+ name = xmlDictLookup(ctxt->dict, fullattr, -1);
+ prefix = NULL;
+ } else {
+ name = xmlDictLookup(ctxt->dict, name, -1);
+ prefix = xmlDictLookup(ctxt->dict, fullattr, len);
+ }
+
+ defaults->values[5 * defaults->nbAttrs] = name;
+ defaults->values[5 * defaults->nbAttrs + 1] = prefix;
+ /* intern the string and precompute the end */
+ len = xmlStrlen(value);
+ value = xmlDictLookup(ctxt->dict, value, len);
+ defaults->values[5 * defaults->nbAttrs + 2] = value;
+ defaults->values[5 * defaults->nbAttrs + 3] = value + len;
+ if (ctxt->external)
+ defaults->values[5 * defaults->nbAttrs + 4] = BAD_CAST "external";
+ else
+ defaults->values[5 * defaults->nbAttrs + 4] = NULL;
+ defaults->nbAttrs++;
+
+ return;
+
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+ return;
+}
+
+/**
+ * xmlAddSpecialAttr:
+ * @ctxt: an XML parser context
+ * @fullname: the element fullname
+ * @fullattr: the attribute fullname
+ * @type: the attribute type
+ *
+ * Register this attribute type
+ */
+static void
+xmlAddSpecialAttr(xmlParserCtxtPtr ctxt,
+ const xmlChar *fullname,
+ const xmlChar *fullattr,
+ int type)
+{
+ if (ctxt->attsSpecial == NULL) {
+ ctxt->attsSpecial = xmlHashCreateDict(10, ctxt->dict);
+ if (ctxt->attsSpecial == NULL)
+ goto mem_error;
+ }
+
+ if (xmlHashLookup2(ctxt->attsSpecial, fullname, fullattr) != NULL)
+ return;
+
+ xmlHashAddEntry2(ctxt->attsSpecial, fullname, fullattr,
+ (void *) (long) type);
+ return;
+
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+ return;
+}
+
+/**
+ * xmlCleanSpecialAttrCallback:
+ *
+ * Removes CDATA attributes from the special attribute table
+ */
+static void
+xmlCleanSpecialAttrCallback(void *payload, void *data,
+ const xmlChar *fullname, const xmlChar *fullattr,
+ const xmlChar *unused ATTRIBUTE_UNUSED) {
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) data;
+
+ if (((long) payload) == XML_ATTRIBUTE_CDATA) {
+ xmlHashRemoveEntry2(ctxt->attsSpecial, fullname, fullattr, NULL);
+ }
+}
+
+/**
+ * xmlCleanSpecialAttr:
+ * @ctxt: an XML parser context
+ *
+ * Trim the list of attributes defined to remove all those of type
+ * CDATA as they are not special. This call should be done when finishing
+ * to parse the DTD and before starting to parse the document root.
+ */
+static void
+xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt)
+{
+ if (ctxt->attsSpecial == NULL)
+ return;
+
+ xmlHashScanFull(ctxt->attsSpecial, xmlCleanSpecialAttrCallback, ctxt);
+
+ if (xmlHashSize(ctxt->attsSpecial) == 0) {
+ xmlHashFree(ctxt->attsSpecial, NULL);
+ ctxt->attsSpecial = NULL;
+ }
+ return;
+}
+
+/**
+ * xmlCheckLanguageID:
+ * @lang: pointer to the string value
+ *
+ * Checks that the value conforms to the LanguageID production:
+ *
+ * NOTE: this is somewhat deprecated, those productions were removed from
+ * the XML Second edition.
+ *
+ * [33] LanguageID ::= Langcode ('-' Subcode)*
+ * [34] Langcode ::= ISO639Code | IanaCode | UserCode
+ * [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z])
+ * [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+
+ * [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+
+ * [38] Subcode ::= ([a-z] | [A-Z])+
+ *
+ * The current REC reference the sucessors of RFC 1766, currently 5646
+ *
+ * http://www.rfc-editor.org/rfc/rfc5646.txt
+ * langtag = language
+ * ["-" script]
+ * ["-" region]
+ * *("-" variant)
+ * *("-" extension)
+ * ["-" privateuse]
+ * language = 2*3ALPHA ; shortest ISO 639 code
+ * ["-" extlang] ; sometimes followed by
+ * ; extended language subtags
+ * / 4ALPHA ; or reserved for future use
+ * / 5*8ALPHA ; or registered language subtag
+ *
+ * extlang = 3ALPHA ; selected ISO 639 codes
+ * *2("-" 3ALPHA) ; permanently reserved
+ *
+ * script = 4ALPHA ; ISO 15924 code
+ *
+ * region = 2ALPHA ; ISO 3166-1 code
+ * / 3DIGIT ; UN M.49 code
+ *
+ * variant = 5*8alphanum ; registered variants
+ * / (DIGIT 3alphanum)
+ *
+ * extension = singleton 1*("-" (2*8alphanum))
+ *
+ * ; Single alphanumerics
+ * ; "x" reserved for private use
+ * singleton = DIGIT ; 0 - 9
+ * / %x41-57 ; A - W
+ * / %x59-5A ; Y - Z
+ * / %x61-77 ; a - w
+ * / %x79-7A ; y - z
+ *
+ * it sounds right to still allow Irregular i-xxx IANA and user codes too
+ * The parser below doesn't try to cope with extension or privateuse
+ * that could be added but that's not interoperable anyway
+ *
+ * Returns 1 if correct 0 otherwise
+ **/
+int
+xmlCheckLanguageID(const xmlChar * lang)
+{
+ const xmlChar *cur = lang, *nxt;
+
+ if (cur == NULL)
+ return (0);
+ if (((cur[0] == 'i') && (cur[1] == '-')) ||
+ ((cur[0] == 'I') && (cur[1] == '-')) ||
+ ((cur[0] == 'x') && (cur[1] == '-')) ||
+ ((cur[0] == 'X') && (cur[1] == '-'))) {
+ /*
+ * Still allow IANA code and user code which were coming
+ * from the previous version of the XML-1.0 specification
+ * it's deprecated but we should not fail
+ */
+ cur += 2;
+ while (((cur[0] >= 'A') && (cur[0] <= 'Z')) ||
+ ((cur[0] >= 'a') && (cur[0] <= 'z')))
+ cur++;
+ return(cur[0] == 0);
+ }
+ nxt = cur;
+ while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||
+ ((nxt[0] >= 'a') && (nxt[0] <= 'z')))
+ nxt++;
+ if (nxt - cur >= 4) {
+ /*
+ * Reserved
+ */
+ if ((nxt - cur > 8) || (nxt[0] != 0))
+ return(0);
+ return(1);
+ }
+ if (nxt - cur < 2)
+ return(0);
+ /* we got an ISO 639 code */
+ if (nxt[0] == 0)
+ return(1);
+ if (nxt[0] != '-')
+ return(0);
+
+ nxt++;
+ cur = nxt;
+ /* now we can have extlang or script or region or variant */
+ if ((nxt[0] >= '0') && (nxt[0] <= '9'))
+ goto region_m49;
+
+ while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||
+ ((nxt[0] >= 'a') && (nxt[0] <= 'z')))
+ nxt++;
+ if (nxt - cur == 4)
+ goto script;
+ if (nxt - cur == 2)
+ goto region;
+ if ((nxt - cur >= 5) && (nxt - cur <= 8))
+ goto variant;
+ if (nxt - cur != 3)
+ return(0);
+ /* we parsed an extlang */
+ if (nxt[0] == 0)
+ return(1);
+ if (nxt[0] != '-')
+ return(0);
+
+ nxt++;
+ cur = nxt;
+ /* now we can have script or region or variant */
+ if ((nxt[0] >= '0') && (nxt[0] <= '9'))
+ goto region_m49;
+
+ while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||
+ ((nxt[0] >= 'a') && (nxt[0] <= 'z')))
+ nxt++;
+ if (nxt - cur == 2)
+ goto region;
+ if ((nxt - cur >= 5) && (nxt - cur <= 8))
+ goto variant;
+ if (nxt - cur != 4)
+ return(0);
+ /* we parsed a script */
+script:
+ if (nxt[0] == 0)
+ return(1);
+ if (nxt[0] != '-')
+ return(0);
+
+ nxt++;
+ cur = nxt;
+ /* now we can have region or variant */
+ if ((nxt[0] >= '0') && (nxt[0] <= '9'))
+ goto region_m49;
+
+ while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||
+ ((nxt[0] >= 'a') && (nxt[0] <= 'z')))
+ nxt++;
+
+ if ((nxt - cur >= 5) && (nxt - cur <= 8))
+ goto variant;
+ if (nxt - cur != 2)
+ return(0);
+ /* we parsed a region */
+region:
+ if (nxt[0] == 0)
+ return(1);
+ if (nxt[0] != '-')
+ return(0);
+
+ nxt++;
+ cur = nxt;
+ /* now we can just have a variant */
+ while (((nxt[0] >= 'A') && (nxt[0] <= 'Z')) ||
+ ((nxt[0] >= 'a') && (nxt[0] <= 'z')))
+ nxt++;
+
+ if ((nxt - cur < 5) || (nxt - cur > 8))
+ return(0);
+
+ /* we parsed a variant */
+variant:
+ if (nxt[0] == 0)
+ return(1);
+ if (nxt[0] != '-')
+ return(0);
+ /* extensions and private use subtags not checked */
+ return (1);
+
+region_m49:
+ if (((nxt[1] >= '0') && (nxt[1] <= '9')) &&
+ ((nxt[2] >= '0') && (nxt[2] <= '9'))) {
+ nxt += 3;
+ goto region;
+ }
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Parser stacks related functions and macros *
+ * *
+ ************************************************************************/
+
+static xmlEntityPtr xmlParseStringEntityRef(xmlParserCtxtPtr ctxt,
+ const xmlChar ** str);
+
+#ifdef SAX2
+/**
+ * nsPush:
+ * @ctxt: an XML parser context
+ * @prefix: the namespace prefix or NULL
+ * @URL: the namespace name
+ *
+ * Pushes a new parser namespace on top of the ns stack
+ *
+ * Returns -1 in case of error, -2 if the namespace should be discarded
+ * and the index in the stack otherwise.
+ */
+static int
+nsPush(xmlParserCtxtPtr ctxt, const xmlChar *prefix, const xmlChar *URL)
+{
+ if (ctxt->options & XML_PARSE_NSCLEAN) {
+ int i;
+ for (i = ctxt->nsNr - 2;i >= 0;i -= 2) {
+ if (ctxt->nsTab[i] == prefix) {
+ /* in scope */
+ if (ctxt->nsTab[i + 1] == URL)
+ return(-2);
+ /* out of scope keep it */
+ break;
+ }
+ }
+ }
+ if ((ctxt->nsMax == 0) || (ctxt->nsTab == NULL)) {
+ ctxt->nsMax = 10;
+ ctxt->nsNr = 0;
+ ctxt->nsTab = (const xmlChar **)
+ xmlMalloc(ctxt->nsMax * sizeof(xmlChar *));
+ if (ctxt->nsTab == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ ctxt->nsMax = 0;
+ return (-1);
+ }
+ } else if (ctxt->nsNr >= ctxt->nsMax) {
+ const xmlChar ** tmp;
+ ctxt->nsMax *= 2;
+ tmp = (const xmlChar **) xmlRealloc((char *) ctxt->nsTab,
+ ctxt->nsMax * sizeof(ctxt->nsTab[0]));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ ctxt->nsMax /= 2;
+ return (-1);
+ }
+ ctxt->nsTab = tmp;
+ }
+ ctxt->nsTab[ctxt->nsNr++] = prefix;
+ ctxt->nsTab[ctxt->nsNr++] = URL;
+ return (ctxt->nsNr);
+}
+/**
+ * nsPop:
+ * @ctxt: an XML parser context
+ * @nr: the number to pop
+ *
+ * Pops the top @nr parser prefix/namespace from the ns stack
+ *
+ * Returns the number of namespaces removed
+ */
+static int
+nsPop(xmlParserCtxtPtr ctxt, int nr)
+{
+ int i;
+
+ if (ctxt->nsTab == NULL) return(0);
+ if (ctxt->nsNr < nr) {
+ xmlGenericError(xmlGenericErrorContext, "Pbm popping %d NS\n", nr);
+ nr = ctxt->nsNr;
+ }
+ if (ctxt->nsNr <= 0)
+ return (0);
+
+ for (i = 0;i < nr;i++) {
+ ctxt->nsNr--;
+ ctxt->nsTab[ctxt->nsNr] = NULL;
+ }
+ return(nr);
+}
+#endif
+
+static int
+xmlCtxtGrowAttrs(xmlParserCtxtPtr ctxt, int nr) {
+ const xmlChar **atts;
+ int *attallocs;
+ int maxatts;
+
+ if (ctxt->atts == NULL) {
+ maxatts = 55; /* allow for 10 attrs by default */
+ atts = (const xmlChar **)
+ xmlMalloc(maxatts * sizeof(xmlChar *));
+ if (atts == NULL) goto mem_error;
+ ctxt->atts = atts;
+ attallocs = (int *) xmlMalloc((maxatts / 5) * sizeof(int));
+ if (attallocs == NULL) goto mem_error;
+ ctxt->attallocs = attallocs;
+ ctxt->maxatts = maxatts;
+ } else if (nr + 5 > ctxt->maxatts) {
+ maxatts = (nr + 5) * 2;
+ atts = (const xmlChar **) xmlRealloc((void *) ctxt->atts,
+ maxatts * sizeof(const xmlChar *));
+ if (atts == NULL) goto mem_error;
+ ctxt->atts = atts;
+ attallocs = (int *) xmlRealloc((void *) ctxt->attallocs,
+ (maxatts / 5) * sizeof(int));
+ if (attallocs == NULL) goto mem_error;
+ ctxt->attallocs = attallocs;
+ ctxt->maxatts = maxatts;
+ }
+ return(ctxt->maxatts);
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+ return(-1);
+}
+
+/**
+ * inputPush:
+ * @ctxt: an XML parser context
+ * @value: the parser input
+ *
+ * Pushes a new parser input on top of the input stack
+ *
+ * Returns -1 in case of error, the index in the stack otherwise
+ */
+int
+inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)
+{
+ if ((ctxt == NULL) || (value == NULL))
+ return(-1);
+ if (ctxt->inputNr >= ctxt->inputMax) {
+ ctxt->inputMax *= 2;
+ ctxt->inputTab =
+ (xmlParserInputPtr *) xmlRealloc(ctxt->inputTab,
+ ctxt->inputMax *
+ sizeof(ctxt->inputTab[0]));
+ if (ctxt->inputTab == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFreeInputStream(value);
+ ctxt->inputMax /= 2;
+ value = NULL;
+ return (-1);
+ }
+ }
+ ctxt->inputTab[ctxt->inputNr] = value;
+ ctxt->input = value;
+ return (ctxt->inputNr++);
+}
+/**
+ * inputPop:
+ * @ctxt: an XML parser context
+ *
+ * Pops the top parser input from the input stack
+ *
+ * Returns the input just removed
+ */
+xmlParserInputPtr
+inputPop(xmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr ret;
+
+ if (ctxt == NULL)
+ return(NULL);
+ if (ctxt->inputNr <= 0)
+ return (NULL);
+ ctxt->inputNr--;
+ if (ctxt->inputNr > 0)
+ ctxt->input = ctxt->inputTab[ctxt->inputNr - 1];
+ else
+ ctxt->input = NULL;
+ ret = ctxt->inputTab[ctxt->inputNr];
+ ctxt->inputTab[ctxt->inputNr] = NULL;
+ return (ret);
+}
+/**
+ * nodePush:
+ * @ctxt: an XML parser context
+ * @value: the element node
+ *
+ * Pushes a new element node on top of the node stack
+ *
+ * Returns -1 in case of error, the index in the stack otherwise
+ */
+int
+nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
+{
+ if (ctxt == NULL) return(0);
+ if (ctxt->nodeNr >= ctxt->nodeMax) {
+ xmlNodePtr *tmp;
+
+ tmp = (xmlNodePtr *) xmlRealloc(ctxt->nodeTab,
+ ctxt->nodeMax * 2 *
+ sizeof(ctxt->nodeTab[0]));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return (-1);
+ }
+ ctxt->nodeTab = tmp;
+ ctxt->nodeMax *= 2;
+ }
+ if ((((unsigned int) ctxt->nodeNr) > xmlParserMaxDepth) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INTERNAL_ERROR,
+ "Excessive depth in document: %d use XML_PARSE_HUGE option\n",
+ xmlParserMaxDepth);
+ ctxt->instate = XML_PARSER_EOF;
+ return(-1);
+ }
+ ctxt->nodeTab[ctxt->nodeNr] = value;
+ ctxt->node = value;
+ return (ctxt->nodeNr++);
+}
+
+/**
+ * nodePop:
+ * @ctxt: an XML parser context
+ *
+ * Pops the top element node from the node stack
+ *
+ * Returns the node just removed
+ */
+xmlNodePtr
+nodePop(xmlParserCtxtPtr ctxt)
+{
+ xmlNodePtr ret;
+
+ if (ctxt == NULL) return(NULL);
+ if (ctxt->nodeNr <= 0)
+ return (NULL);
+ ctxt->nodeNr--;
+ if (ctxt->nodeNr > 0)
+ ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];
+ else
+ ctxt->node = NULL;
+ ret = ctxt->nodeTab[ctxt->nodeNr];
+ ctxt->nodeTab[ctxt->nodeNr] = NULL;
+ return (ret);
+}
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * nameNsPush:
+ * @ctxt: an XML parser context
+ * @value: the element name
+ * @prefix: the element prefix
+ * @URI: the element namespace name
+ *
+ * Pushes a new element name/prefix/URL on top of the name stack
+ *
+ * Returns -1 in case of error, the index in the stack otherwise
+ */
+static int
+nameNsPush(xmlParserCtxtPtr ctxt, const xmlChar * value,
+ const xmlChar *prefix, const xmlChar *URI, int nsNr)
+{
+ if (ctxt->nameNr >= ctxt->nameMax) {
+ const xmlChar * *tmp;
+ void **tmp2;
+ ctxt->nameMax *= 2;
+ tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab,
+ ctxt->nameMax *
+ sizeof(ctxt->nameTab[0]));
+ if (tmp == NULL) {
+ ctxt->nameMax /= 2;
+ goto mem_error;
+ }
+ ctxt->nameTab = tmp;
+ tmp2 = (void **) xmlRealloc((void * *)ctxt->pushTab,
+ ctxt->nameMax * 3 *
+ sizeof(ctxt->pushTab[0]));
+ if (tmp2 == NULL) {
+ ctxt->nameMax /= 2;
+ goto mem_error;
+ }
+ ctxt->pushTab = tmp2;
+ }
+ ctxt->nameTab[ctxt->nameNr] = value;
+ ctxt->name = value;
+ ctxt->pushTab[ctxt->nameNr * 3] = (void *) prefix;
+ ctxt->pushTab[ctxt->nameNr * 3 + 1] = (void *) URI;
+ ctxt->pushTab[ctxt->nameNr * 3 + 2] = (void *) (long) nsNr;
+ return (ctxt->nameNr++);
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+ return (-1);
+}
+/**
+ * nameNsPop:
+ * @ctxt: an XML parser context
+ *
+ * Pops the top element/prefix/URI name from the name stack
+ *
+ * Returns the name just removed
+ */
+static const xmlChar *
+nameNsPop(xmlParserCtxtPtr ctxt)
+{
+ const xmlChar *ret;
+
+ if (ctxt->nameNr <= 0)
+ return (NULL);
+ ctxt->nameNr--;
+ if (ctxt->nameNr > 0)
+ ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
+ else
+ ctxt->name = NULL;
+ ret = ctxt->nameTab[ctxt->nameNr];
+ ctxt->nameTab[ctxt->nameNr] = NULL;
+ return (ret);
+}
+#endif /* LIBXML_PUSH_ENABLED */
+
+/**
+ * namePush:
+ * @ctxt: an XML parser context
+ * @value: the element name
+ *
+ * Pushes a new element name on top of the name stack
+ *
+ * Returns -1 in case of error, the index in the stack otherwise
+ */
+int
+namePush(xmlParserCtxtPtr ctxt, const xmlChar * value)
+{
+ if (ctxt == NULL) return (-1);
+
+ if (ctxt->nameNr >= ctxt->nameMax) {
+ const xmlChar * *tmp;
+ tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab,
+ ctxt->nameMax * 2 *
+ sizeof(ctxt->nameTab[0]));
+ if (tmp == NULL) {
+ goto mem_error;
+ }
+ ctxt->nameTab = tmp;
+ ctxt->nameMax *= 2;
+ }
+ ctxt->nameTab[ctxt->nameNr] = value;
+ ctxt->name = value;
+ return (ctxt->nameNr++);
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+ return (-1);
+}
+/**
+ * namePop:
+ * @ctxt: an XML parser context
+ *
+ * Pops the top element name from the name stack
+ *
+ * Returns the name just removed
+ */
+const xmlChar *
+namePop(xmlParserCtxtPtr ctxt)
+{
+ const xmlChar *ret;
+
+ if ((ctxt == NULL) || (ctxt->nameNr <= 0))
+ return (NULL);
+ ctxt->nameNr--;
+ if (ctxt->nameNr > 0)
+ ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
+ else
+ ctxt->name = NULL;
+ ret = ctxt->nameTab[ctxt->nameNr];
+ ctxt->nameTab[ctxt->nameNr] = NULL;
+ return (ret);
+}
+
+static int spacePush(xmlParserCtxtPtr ctxt, int val) {
+ if (ctxt->spaceNr >= ctxt->spaceMax) {
+ int *tmp;
+
+ ctxt->spaceMax *= 2;
+ tmp = (int *) xmlRealloc(ctxt->spaceTab,
+ ctxt->spaceMax * sizeof(ctxt->spaceTab[0]));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ ctxt->spaceMax /=2;
+ return(-1);
+ }
+ ctxt->spaceTab = tmp;
+ }
+ ctxt->spaceTab[ctxt->spaceNr] = val;
+ ctxt->space = &ctxt->spaceTab[ctxt->spaceNr];
+ return(ctxt->spaceNr++);
+}
+
+static int spacePop(xmlParserCtxtPtr ctxt) {
+ int ret;
+ if (ctxt->spaceNr <= 0) return(0);
+ ctxt->spaceNr--;
+ if (ctxt->spaceNr > 0)
+ ctxt->space = &ctxt->spaceTab[ctxt->spaceNr - 1];
+ else
+ ctxt->space = &ctxt->spaceTab[0];
+ ret = ctxt->spaceTab[ctxt->spaceNr];
+ ctxt->spaceTab[ctxt->spaceNr] = -1;
+ return(ret);
+}
+
+/*
+ * Macros for accessing the content. Those should be used only by the parser,
+ * and not exported.
+ *
+ * Dirty macros, i.e. one often need to make assumption on the context to
+ * use them
+ *
+ * CUR_PTR return the current pointer to the xmlChar to be parsed.
+ * To be used with extreme caution since operations consuming
+ * characters may move the input buffer to a different location !
+ * CUR returns the current xmlChar value, i.e. a 8 bit value if compiled
+ * This should be used internally by the parser
+ * only to compare to ASCII values otherwise it would break when
+ * running with UTF-8 encoding.
+ * RAW same as CUR but in the input buffer, bypass any token
+ * extraction that may have been done
+ * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
+ * to compare on ASCII based substring.
+ * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
+ * strings without newlines within the parser.
+ * NEXT1(l) Skip 1 xmlChar, and must also be used only to skip 1 non-newline ASCII
+ * defined char within the parser.
+ * Clean macros, not dependent of an ASCII context, expect UTF-8 encoding
+ *
+ * NEXT Skip to the next character, this does the proper decoding
+ * in UTF-8 mode. It also pop-up unfinished entities on the fly.
+ * NEXTL(l) Skip the current unicode character of l xmlChars long.
+ * CUR_CHAR(l) returns the current unicode character (int), set l
+ * to the number of xmlChars used for the encoding [0-5].
+ * CUR_SCHAR same but operate on a string instead of the context
+ * COPY_BUF copy the current unicode char to the target buffer, increment
+ * the index
+ * GROW, SHRINK handling of input buffers
+ */
+
+#define RAW (*ctxt->input->cur)
+#define CUR (*ctxt->input->cur)
+#define NXT(val) ctxt->input->cur[(val)]
+#define CUR_PTR ctxt->input->cur
+
+#define CMP4( s, c1, c2, c3, c4 ) \
+ ( ((unsigned char *) s)[ 0 ] == c1 && ((unsigned char *) s)[ 1 ] == c2 && \
+ ((unsigned char *) s)[ 2 ] == c3 && ((unsigned char *) s)[ 3 ] == c4 )
+#define CMP5( s, c1, c2, c3, c4, c5 ) \
+ ( CMP4( s, c1, c2, c3, c4 ) && ((unsigned char *) s)[ 4 ] == c5 )
+#define CMP6( s, c1, c2, c3, c4, c5, c6 ) \
+ ( CMP5( s, c1, c2, c3, c4, c5 ) && ((unsigned char *) s)[ 5 ] == c6 )
+#define CMP7( s, c1, c2, c3, c4, c5, c6, c7 ) \
+ ( CMP6( s, c1, c2, c3, c4, c5, c6 ) && ((unsigned char *) s)[ 6 ] == c7 )
+#define CMP8( s, c1, c2, c3, c4, c5, c6, c7, c8 ) \
+ ( CMP7( s, c1, c2, c3, c4, c5, c6, c7 ) && ((unsigned char *) s)[ 7 ] == c8 )
+#define CMP9( s, c1, c2, c3, c4, c5, c6, c7, c8, c9 ) \
+ ( CMP8( s, c1, c2, c3, c4, c5, c6, c7, c8 ) && \
+ ((unsigned char *) s)[ 8 ] == c9 )
+#define CMP10( s, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10 ) \
+ ( CMP9( s, c1, c2, c3, c4, c5, c6, c7, c8, c9 ) && \
+ ((unsigned char *) s)[ 9 ] == c10 )
+
+#define SKIP(val) do { \
+ ctxt->nbChars += (val),ctxt->input->cur += (val),ctxt->input->col+=(val); \
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
+ if ((*ctxt->input->cur == 0) && \
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \
+ xmlPopInput(ctxt); \
+ } while (0)
+
+#define SKIPL(val) do { \
+ int skipl; \
+ for(skipl=0; skipl<val; skipl++) { \
+ if (*(ctxt->input->cur) == '\n') { \
+ ctxt->input->line++; ctxt->input->col = 1; \
+ } else ctxt->input->col++; \
+ ctxt->nbChars++; \
+ ctxt->input->cur++; \
+ } \
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
+ if ((*ctxt->input->cur == 0) && \
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0)) \
+ xmlPopInput(ctxt); \
+ } while (0)
+
+#define SHRINK if ((ctxt->progressive == 0) && \
+ (ctxt->input->cur - ctxt->input->base > 2 * INPUT_CHUNK) && \
+ (ctxt->input->end - ctxt->input->cur < 2 * INPUT_CHUNK)) \
+ xmlSHRINK (ctxt);
+
+static void xmlSHRINK (xmlParserCtxtPtr ctxt) {
+ xmlParserInputShrink(ctxt->input);
+ if ((*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
+ xmlPopInput(ctxt);
+ }
+
+#define GROW if ((ctxt->progressive == 0) && \
+ (ctxt->input->end - ctxt->input->cur < INPUT_CHUNK)) \
+ xmlGROW (ctxt);
+
+static void xmlGROW (xmlParserCtxtPtr ctxt) {
+ unsigned long curEnd = ctxt->input->end - ctxt->input->cur;
+ unsigned long curBase = ctxt->input->cur - ctxt->input->base;
+
+ if (((curEnd > (unsigned long) XML_MAX_LOOKUP_LIMIT) ||
+ (curBase > (unsigned long) XML_MAX_LOOKUP_LIMIT)) &&
+ ((ctxt->input->buf) && (ctxt->input->buf->readcallback != (xmlInputReadCallback) xmlNop)) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
+ ctxt->instate = XML_PARSER_EOF;
+ }
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ if ((ctxt->input->cur != NULL) && (*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
+ xmlPopInput(ctxt);
+}
+
+#define SKIP_BLANKS xmlSkipBlankChars(ctxt)
+
+#define NEXT xmlNextChar(ctxt)
+
+#define NEXT1 { \
+ ctxt->input->col++; \
+ ctxt->input->cur++; \
+ ctxt->nbChars++; \
+ if (*ctxt->input->cur == 0) \
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK); \
+ }
+
+#define NEXTL(l) do { \
+ if (*(ctxt->input->cur) == '\n') { \
+ ctxt->input->line++; ctxt->input->col = 1; \
+ } else ctxt->input->col++; \
+ ctxt->input->cur += l; \
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt); \
+ } while (0)
+
+#define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
+#define CUR_SCHAR(s, l) xmlStringCurrentChar(ctxt, s, &l)
+
+#define COPY_BUF(l,b,i,v) \
+ if (l == 1) b[i++] = (xmlChar) v; \
+ else i += xmlCopyCharMultiByte(&b[i],v)
+
+/**
+ * xmlSkipBlankChars:
+ * @ctxt: the XML parser context
+ *
+ * skip all blanks character found at that point in the input streams.
+ * It pops up finished entities in the process if allowable at that point.
+ *
+ * Returns the number of space chars skipped
+ */
+
+int
+xmlSkipBlankChars(xmlParserCtxtPtr ctxt) {
+ int res = 0;
+
+ /*
+ * It's Okay to use CUR/NEXT here since all the blanks are on
+ * the ASCII range.
+ */
+ if ((ctxt->inputNr == 1) && (ctxt->instate != XML_PARSER_DTD)) {
+ const xmlChar *cur;
+ /*
+ * if we are in the document content, go really fast
+ */
+ cur = ctxt->input->cur;
+ while (IS_BLANK_CH(*cur)) {
+ if (*cur == '\n') {
+ ctxt->input->line++; ctxt->input->col = 1;
+ } else {
+ ctxt->input->col++;
+ }
+ cur++;
+ res++;
+ if (*cur == 0) {
+ ctxt->input->cur = cur;
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ }
+ ctxt->input->cur = cur;
+ } else {
+ int cur;
+ do {
+ cur = CUR;
+ while (IS_BLANK_CH(cur)) { /* CHECKED tstblanks.xml */
+ NEXT;
+ cur = CUR;
+ res++;
+ }
+ while ((cur == 0) && (ctxt->inputNr > 1) &&
+ (ctxt->instate != XML_PARSER_COMMENT)) {
+ xmlPopInput(ctxt);
+ cur = CUR;
+ }
+ /*
+ * Need to handle support of entities branching here
+ */
+ if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);
+ } while (IS_BLANK(cur)); /* CHECKED tstblanks.xml */
+ }
+ return(res);
+}
+
+/************************************************************************
+ * *
+ * Commodity functions to handle entities *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlPopInput:
+ * @ctxt: an XML parser context
+ *
+ * xmlPopInput: the current input pointed by ctxt->input came to an end
+ * pop it and return the next char.
+ *
+ * Returns the current xmlChar in the parser context
+ */
+xmlChar
+xmlPopInput(xmlParserCtxtPtr ctxt) {
+ if ((ctxt == NULL) || (ctxt->inputNr <= 1)) return(0);
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "Popping input %d\n", ctxt->inputNr);
+ xmlFreeInputStream(inputPop(ctxt));
+ if ((*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
+ return(xmlPopInput(ctxt));
+ return(CUR);
+}
+
+/**
+ * xmlPushInput:
+ * @ctxt: an XML parser context
+ * @input: an XML parser input fragment (entity, XML fragment ...).
+ *
+ * xmlPushInput: switch to a new input stream which is stacked on top
+ * of the previous one(s).
+ * Returns -1 in case of error or the index in the input stack
+ */
+int
+xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
+ int ret;
+ if (input == NULL) return(-1);
+
+ if (xmlParserDebugEntities) {
+ if ((ctxt->input != NULL) && (ctxt->input->filename))
+ xmlGenericError(xmlGenericErrorContext,
+ "%s(%d): ", ctxt->input->filename,
+ ctxt->input->line);
+ xmlGenericError(xmlGenericErrorContext,
+ "Pushing input %d : %.30s\n", ctxt->inputNr+1, input->cur);
+ }
+ ret = inputPush(ctxt, input);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ GROW;
+ return(ret);
+}
+
+/**
+ * xmlParseCharRef:
+ * @ctxt: an XML parser context
+ *
+ * parse Reference declarations
+ *
+ * [66] CharRef ::= '&#' [0-9]+ ';' |
+ * '&#x' [0-9a-fA-F]+ ';'
+ *
+ * [ WFC: Legal Character ]
+ * Characters referred to using character references must match the
+ * production for Char.
+ *
+ * Returns the value parsed (as an int), 0 in case of error
+ */
+int
+xmlParseCharRef(xmlParserCtxtPtr ctxt) {
+ unsigned int val = 0;
+ int count = 0;
+ unsigned int outofrange = 0;
+
+ /*
+ * Using RAW/CUR/NEXT is okay since we are working on ASCII range here
+ */
+ if ((RAW == '&') && (NXT(1) == '#') &&
+ (NXT(2) == 'x')) {
+ SKIP(3);
+ GROW;
+ while (RAW != ';') { /* loop blocked by count */
+ if (count++ > 20) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(0);
+ }
+ if ((RAW >= '0') && (RAW <= '9'))
+ val = val * 16 + (CUR - '0');
+ else if ((RAW >= 'a') && (RAW <= 'f') && (count < 20))
+ val = val * 16 + (CUR - 'a') + 10;
+ else if ((RAW >= 'A') && (RAW <= 'F') && (count < 20))
+ val = val * 16 + (CUR - 'A') + 10;
+ else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_HEX_CHARREF, NULL);
+ val = 0;
+ break;
+ }
+ if (val > 0x10FFFF)
+ outofrange = val;
+
+ NEXT;
+ count++;
+ }
+ if (RAW == ';') {
+ /* on purpose to avoid reentrancy problems with NEXT and SKIP */
+ ctxt->input->col++;
+ ctxt->nbChars ++;
+ ctxt->input->cur++;
+ }
+ } else if ((RAW == '&') && (NXT(1) == '#')) {
+ SKIP(2);
+ GROW;
+ while (RAW != ';') { /* loop blocked by count */
+ if (count++ > 20) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(0);
+ }
+ if ((RAW >= '0') && (RAW <= '9'))
+ val = val * 10 + (CUR - '0');
+ else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, NULL);
+ val = 0;
+ break;
+ }
+ if (val > 0x10FFFF)
+ outofrange = val;
+
+ NEXT;
+ count++;
+ }
+ if (RAW == ';') {
+ /* on purpose to avoid reentrancy problems with NEXT and SKIP */
+ ctxt->input->col++;
+ ctxt->nbChars ++;
+ ctxt->input->cur++;
+ }
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_CHARREF, NULL);
+ }
+
+ /*
+ * [ WFC: Legal Character ]
+ * Characters referred to using character references must match the
+ * production for Char.
+ */
+ if ((IS_CHAR(val) && (outofrange == 0))) {
+ return(val);
+ } else {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlParseCharRef: invalid xmlChar value %d\n",
+ val);
+ }
+ return(0);
+}
+
+/**
+ * xmlParseStringCharRef:
+ * @ctxt: an XML parser context
+ * @str: a pointer to an index in the string
+ *
+ * parse Reference declarations, variant parsing from a string rather
+ * than an an input flow.
+ *
+ * [66] CharRef ::= '&#' [0-9]+ ';' |
+ * '&#x' [0-9a-fA-F]+ ';'
+ *
+ * [ WFC: Legal Character ]
+ * Characters referred to using character references must match the
+ * production for Char.
+ *
+ * Returns the value parsed (as an int), 0 in case of error, str will be
+ * updated to the current value of the index
+ */
+static int
+xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
+ const xmlChar *ptr;
+ xmlChar cur;
+ unsigned int val = 0;
+ unsigned int outofrange = 0;
+
+ if ((str == NULL) || (*str == NULL)) return(0);
+ ptr = *str;
+ cur = *ptr;
+ if ((cur == '&') && (ptr[1] == '#') && (ptr[2] == 'x')) {
+ ptr += 3;
+ cur = *ptr;
+ while (cur != ';') { /* Non input consuming loop */
+ if ((cur >= '0') && (cur <= '9'))
+ val = val * 16 + (cur - '0');
+ else if ((cur >= 'a') && (cur <= 'f'))
+ val = val * 16 + (cur - 'a') + 10;
+ else if ((cur >= 'A') && (cur <= 'F'))
+ val = val * 16 + (cur - 'A') + 10;
+ else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_HEX_CHARREF, NULL);
+ val = 0;
+ break;
+ }
+ if (val > 0x10FFFF)
+ outofrange = val;
+
+ ptr++;
+ cur = *ptr;
+ }
+ if (cur == ';')
+ ptr++;
+ } else if ((cur == '&') && (ptr[1] == '#')){
+ ptr += 2;
+ cur = *ptr;
+ while (cur != ';') { /* Non input consuming loops */
+ if ((cur >= '0') && (cur <= '9'))
+ val = val * 10 + (cur - '0');
+ else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_DEC_CHARREF, NULL);
+ val = 0;
+ break;
+ }
+ if (val > 0x10FFFF)
+ outofrange = val;
+
+ ptr++;
+ cur = *ptr;
+ }
+ if (cur == ';')
+ ptr++;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_INVALID_CHARREF, NULL);
+ return(0);
+ }
+ *str = ptr;
+
+ /*
+ * [ WFC: Legal Character ]
+ * Characters referred to using character references must match the
+ * production for Char.
+ */
+ if ((IS_CHAR(val) && (outofrange == 0))) {
+ return(val);
+ } else {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlParseStringCharRef: invalid xmlChar value %d\n",
+ val);
+ }
+ return(0);
+}
+
+/**
+ * xmlNewBlanksWrapperInputStream:
+ * @ctxt: an XML parser context
+ * @entity: an Entity pointer
+ *
+ * Create a new input stream for wrapping
+ * blanks around a PEReference
+ *
+ * Returns the new input stream or NULL
+ */
+
+static void deallocblankswrapper (xmlChar *str) {xmlFree(str);}
+
+static xmlParserInputPtr
+xmlNewBlanksWrapperInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
+ xmlParserInputPtr input;
+ xmlChar *buffer;
+ size_t length;
+ if (entity == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlNewBlanksWrapperInputStream entity\n");
+ return(NULL);
+ }
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "new blanks wrapper for entity: %s\n", entity->name);
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ return(NULL);
+ }
+ length = xmlStrlen(entity->name) + 5;
+ buffer = xmlMallocAtomic(length);
+ if (buffer == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(input);
+ return(NULL);
+ }
+ buffer [0] = ' ';
+ buffer [1] = '%';
+ buffer [length-3] = ';';
+ buffer [length-2] = ' ';
+ buffer [length-1] = 0;
+ memcpy(buffer + 2, entity->name, length - 5);
+ input->free = deallocblankswrapper;
+ input->base = buffer;
+ input->cur = buffer;
+ input->length = length;
+ input->end = &buffer[length];
+ return(input);
+}
+
+/**
+ * xmlParserHandlePEReference:
+ * @ctxt: the parser context
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * [ WFC: No Recursion ]
+ * A parsed entity must not contain a recursive
+ * reference to itself, either directly or indirectly.
+ *
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an internal DTD
+ * subset which contains no parameter entity references, or a document
+ * with "standalone='yes'", ... ... The declaration of a parameter
+ * entity must precede any reference to it...
+ *
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external parameter entities
+ * with "standalone='no'", ... ... The declaration of a parameter entity
+ * must precede any reference to it...
+ *
+ * [ WFC: In DTD ]
+ * Parameter-entity references may only appear in the DTD.
+ * NOTE: misleading but this is handled.
+ *
+ * A PEReference may have been detected in the current input stream
+ * the handling is done accordingly to
+ * http://www.w3.org/TR/REC-xml#entproc
+ * i.e.
+ * - Included in literal in entity values
+ * - Included as Parameter Entity reference within DTDs
+ */
+void
+xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlEntityPtr entity = NULL;
+ xmlParserInputPtr input;
+
+ if (RAW != '%') return;
+ switch(ctxt->instate) {
+ case XML_PARSER_CDATA_SECTION:
+ return;
+ case XML_PARSER_COMMENT:
+ return;
+ case XML_PARSER_START_TAG:
+ return;
+ case XML_PARSER_END_TAG:
+ return;
+ case XML_PARSER_EOF:
+ xmlFatalErr(ctxt, XML_ERR_PEREF_AT_EOF, NULL);
+ return;
+ case XML_PARSER_PROLOG:
+ case XML_PARSER_START:
+ case XML_PARSER_MISC:
+ xmlFatalErr(ctxt, XML_ERR_PEREF_IN_PROLOG, NULL);
+ return;
+ case XML_PARSER_ENTITY_DECL:
+ case XML_PARSER_CONTENT:
+ case XML_PARSER_ATTRIBUTE_VALUE:
+ case XML_PARSER_PI:
+ case XML_PARSER_SYSTEM_LITERAL:
+ case XML_PARSER_PUBLIC_LITERAL:
+ /* we just ignore it there */
+ return;
+ case XML_PARSER_EPILOG:
+ xmlFatalErr(ctxt, XML_ERR_PEREF_IN_EPILOG, NULL);
+ return;
+ case XML_PARSER_ENTITY_VALUE:
+ /*
+ * NOTE: in the case of entity values, we don't do the
+ * substitution here since we need the literal
+ * entity value to be able to save the internal
+ * subset of the document.
+ * This will be handled by xmlStringDecodeEntities
+ */
+ return;
+ case XML_PARSER_DTD:
+ /*
+ * [WFC: Well-Formedness Constraint: PEs in Internal Subset]
+ * In the internal DTD subset, parameter-entity references
+ * can occur only where markup declarations can occur, not
+ * within markup declarations.
+ * In that case this is handled in xmlParseMarkupDecl
+ */
+ if ((ctxt->external == 0) && (ctxt->inputNr == 1))
+ return;
+ if (IS_BLANK_CH(NXT(1)) || NXT(1) == 0)
+ return;
+ break;
+ case XML_PARSER_IGNORE:
+ return;
+ }
+
+ NEXT;
+ name = xmlParseName(ctxt);
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "PEReference: %s\n", name);
+ if (name == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_PEREF_NO_NAME, NULL);
+ } else {
+ if (RAW == ';') {
+ NEXT;
+ if ((ctxt->sax != NULL) && (ctxt->sax->getParameterEntity != NULL))
+ entity = ctxt->sax->getParameterEntity(ctxt->userData, name);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ if (entity == NULL) {
+
+ /*
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an
+ * internal DTD subset which contains no parameter entity
+ * references, or a document with "standalone='yes'", ...
+ * ... The declaration of a parameter entity must precede
+ * any reference to it...
+ */
+ if ((ctxt->standalone == 1) ||
+ ((ctxt->hasExternalSubset == 0) &&
+ (ctxt->hasPErefs == 0))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n", name);
+ } else {
+ /*
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external
+ * parameter entities with "standalone='no'", ...
+ * ... The declaration of a parameter entity must precede
+ * any reference to it...
+ */
+ if ((ctxt->validate) && (ctxt->vctxt.error != NULL)) {
+ xmlValidityError(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n",
+ name, NULL);
+ } else
+ xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n",
+ name, NULL);
+ ctxt->valid = 0;
+ }
+ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else if (ctxt->input->free != deallocblankswrapper) {
+ input = xmlNewBlanksWrapperInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+ return;
+ } else {
+ if ((entity->etype == XML_INTERNAL_PARAMETER_ENTITY) ||
+ (entity->etype == XML_EXTERNAL_PARAMETER_ENTITY)) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ /*
+ * Note: external parameter entities will not be loaded, it
+ * is not required for a non-validating parser, unless the
+ * option of validating, or substituting entities were
+ * given. Doing so is far more secure as the parser will
+ * only process data coming from the document entity by
+ * default.
+ */
+ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ ((ctxt->options & XML_PARSE_NOENT) == 0) &&
+ ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
+ ((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
+ ((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
+ (ctxt->replaceEntities == 0) &&
+ (ctxt->validate == 0))
+ return;
+
+ /*
+ * handle the extra spaces added before and after
+ * c.f. http://www.w3.org/TR/REC-xml#as-PE
+ * this is done independently.
+ */
+ input = xmlNewEntityInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+ return;
+
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ * Note that, since we may have some non-UTF8
+ * encoding (like UTF16, bug 135229), the 'length'
+ * is not known, but we can calculate based upon
+ * the amount of data in the buffer.
+ */
+ GROW
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ if ((ctxt->input->end - ctxt->input->cur)>=4) {
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ (CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l' )) &&
+ (IS_BLANK_CH(NXT(5)))) {
+ xmlParseTextDecl(ctxt);
+ }
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_IS_PARAMETER,
+ "PEReference: %s is not a parameter entity\n",
+ name);
+ }
+ }
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_PEREF_SEMICOL_MISSING, NULL);
+ }
+ }
+}
+
+/*
+ * Macro used to grow the current buffer.
+ * buffer##_size is expected to be a size_t
+ * mem_error: is expected to handle memory allocation failures
+ */
+#define growBuffer(buffer, n) { \
+ xmlChar *tmp; \
+ size_t new_size = buffer##_size * 2 + n; \
+ if (new_size < buffer##_size) goto mem_error; \
+ tmp = (xmlChar *) xmlRealloc(buffer, new_size); \
+ if (tmp == NULL) goto mem_error; \
+ buffer = tmp; \
+ buffer##_size = new_size; \
+}
+
+/**
+ * xmlStringLenDecodeEntities:
+ * @ctxt: the parser context
+ * @str: the input string
+ * @len: the string length
+ * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
+ * @end: an end marker xmlChar, 0 if none
+ * @end2: an end marker xmlChar, 0 if none
+ * @end3: an end marker xmlChar, 0 if none
+ *
+ * Takes a entity string content and process to do the adequate substitutions.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * Returns A newly allocated string with the substitution done. The caller
+ * must deallocate it !
+ */
+xmlChar *
+xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ int what, xmlChar end, xmlChar end2, xmlChar end3) {
+ xmlChar *buffer = NULL;
+ size_t buffer_size = 0;
+ size_t nbchars = 0;
+
+ xmlChar *current = NULL;
+ xmlChar *rep = NULL;
+ const xmlChar *last;
+ xmlEntityPtr ent;
+ int c,l;
+
+ if ((ctxt == NULL) || (str == NULL) || (len < 0))
+ return(NULL);
+ last = str + len;
+
+ if (((ctxt->depth > 40) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) ||
+ (ctxt->depth > 1024)) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ return(NULL);
+ }
+
+ /*
+ * allocate a translation buffer.
+ */
+ buffer_size = XML_PARSER_BIG_BUFFER_SIZE;
+ buffer = (xmlChar *) xmlMallocAtomic(buffer_size);
+ if (buffer == NULL) goto mem_error;
+
+ /*
+ * OK loop until we reach one of the ending char or a size limit.
+ * we are operating on already parsed values.
+ */
+ if (str < last)
+ c = CUR_SCHAR(str, l);
+ else
+ c = 0;
+ while ((c != 0) && (c != end) && /* non input consuming loop */
+ (c != end2) && (c != end3)) {
+
+ if (c == 0) break;
+ if ((c == '&') && (str[1] == '#')) {
+ int val = xmlParseStringCharRef(ctxt, &str);
+ if (val != 0) {
+ COPY_BUF(0,buffer,nbchars,val);
+ }
+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+ }
+ } else if ((c == '&') && (what & XML_SUBSTITUTE_REF)) {
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "String decoding Entity Reference: %.30s\n",
+ str);
+ ent = xmlParseStringEntityRef(ctxt, &str);
+ if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
+ (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
+ goto int_error;
+ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if ((ent != NULL) &&
+ (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
+ if (ent->content != NULL) {
+ COPY_BUF(0,buffer,nbchars,ent->content[0]);
+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+ }
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "predefined entity has no content\n");
+ }
+ } else if ((ent != NULL) && (ent->content != NULL)) {
+ ctxt->depth++;
+ rep = xmlStringDecodeEntities(ctxt, ent->content, what,
+ 0, 0, 0);
+ ctxt->depth--;
+
+ if (rep != NULL) {
+ current = rep;
+ while (*current != 0) { /* non input consuming loop */
+ buffer[nbchars++] = *current++;
+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
+ goto int_error;
+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+ }
+ }
+ xmlFree(rep);
+ rep = NULL;
+ }
+ } else if (ent != NULL) {
+ int i = xmlStrlen(ent->name);
+ const xmlChar *cur = ent->name;
+
+ buffer[nbchars++] = '&';
+ if (nbchars + i + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE);
+ }
+ for (;i > 0;i--)
+ buffer[nbchars++] = *cur++;
+ buffer[nbchars++] = ';';
+ }
+ } else if (c == '%' && (what & XML_SUBSTITUTE_PEREF)) {
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "String decoding PE Reference: %.30s\n", str);
+ ent = xmlParseStringPEReference(ctxt, &str);
+ if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
+ goto int_error;
+ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ if (ent != NULL)
+ ctxt->nbentities += ent->checked / 2;
+ if (ent != NULL) {
+ if (ent->content == NULL) {
+ xmlLoadEntityContent(ctxt, ent);
+ }
+ ctxt->depth++;
+ rep = xmlStringDecodeEntities(ctxt, ent->content, what,
+ 0, 0, 0);
+ ctxt->depth--;
+ if (rep != NULL) {
+ current = rep;
+ while (*current != 0) { /* non input consuming loop */
+ buffer[nbchars++] = *current++;
+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ if (xmlParserEntityCheck(ctxt, nbchars, ent, 0))
+ goto int_error;
+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+ }
+ }
+ xmlFree(rep);
+ rep = NULL;
+ }
+ }
+ } else {
+ COPY_BUF(l,buffer,nbchars,c);
+ str += l;
+ if (nbchars + XML_PARSER_BUFFER_SIZE > buffer_size) {
+ growBuffer(buffer, XML_PARSER_BUFFER_SIZE);
+ }
+ }
+ if (str < last)
+ c = CUR_SCHAR(str, l);
+ else
+ c = 0;
+ }
+ buffer[nbchars] = 0;
+ return(buffer);
+
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+int_error:
+ if (rep != NULL)
+ xmlFree(rep);
+ if (buffer != NULL)
+ xmlFree(buffer);
+ return(NULL);
+}
+
+/**
+ * xmlStringDecodeEntities:
+ * @ctxt: the parser context
+ * @str: the input string
+ * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
+ * @end: an end marker xmlChar, 0 if none
+ * @end2: an end marker xmlChar, 0 if none
+ * @end3: an end marker xmlChar, 0 if none
+ *
+ * Takes a entity string content and process to do the adequate substitutions.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * Returns A newly allocated string with the substitution done. The caller
+ * must deallocate it !
+ */
+xmlChar *
+xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what,
+ xmlChar end, xmlChar end2, xmlChar end3) {
+ if ((ctxt == NULL) || (str == NULL)) return(NULL);
+ return(xmlStringLenDecodeEntities(ctxt, str, xmlStrlen(str), what,
+ end, end2, end3));
+}
+
+/************************************************************************
+ * *
+ * Commodity functions, cleanup needed ? *
+ * *
+ ************************************************************************/
+
+/**
+ * areBlanks:
+ * @ctxt: an XML parser context
+ * @str: a xmlChar *
+ * @len: the size of @str
+ * @blank_chars: we know the chars are blanks
+ *
+ * Is this a sequence of blank chars that one can ignore ?
+ *
+ * Returns 1 if ignorable 0 otherwise.
+ */
+
+static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
+ int blank_chars) {
+ int i, ret;
+ xmlNodePtr lastChild;
+
+ /*
+ * Don't spend time trying to differentiate them, the same callback is
+ * used !
+ */
+ if (ctxt->sax->ignorableWhitespace == ctxt->sax->characters)
+ return(0);
+
+ /*
+ * Check for xml:space value.
+ */
+ if ((ctxt->space == NULL) || (*(ctxt->space) == 1) ||
+ (*(ctxt->space) == -2))
+ return(0);
+
+ /*
+ * Check that the string is made of blanks
+ */
+ if (blank_chars == 0) {
+ for (i = 0;i < len;i++)
+ if (!(IS_BLANK_CH(str[i]))) return(0);
+ }
+
+ /*
+ * Look if the element is mixed content in the DTD if available
+ */
+ if (ctxt->node == NULL) return(0);
+ if (ctxt->myDoc != NULL) {
+ ret = xmlIsMixedElement(ctxt->myDoc, ctxt->node->name);
+ if (ret == 0) return(1);
+ if (ret == 1) return(0);
+ }
+
+ /*
+ * Otherwise, heuristic :-\
+ */
+ if ((RAW != '<') && (RAW != 0xD)) return(0);
+ if ((ctxt->node->children == NULL) &&
+ (RAW == '<') && (NXT(1) == '/')) return(0);
+
+ lastChild = xmlGetLastChild(ctxt->node);
+ if (lastChild == NULL) {
+ if ((ctxt->node->type != XML_ELEMENT_NODE) &&
+ (ctxt->node->content != NULL)) return(0);
+ } else if (xmlNodeIsText(lastChild))
+ return(0);
+ else if ((ctxt->node->children != NULL) &&
+ (xmlNodeIsText(ctxt->node->children)))
+ return(0);
+ return(1);
+}
+
+/************************************************************************
+ * *
+ * Extra stuff for namespace support *
+ * Relates to http://www.w3.org/TR/WD-xml-names *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSplitQName:
+ * @ctxt: an XML parser context
+ * @name: an XML parser context
+ * @prefix: a xmlChar **
+ *
+ * parse an UTF8 encoded XML qualified name string
+ *
+ * [NS 5] QName ::= (Prefix ':')? LocalPart
+ *
+ * [NS 6] Prefix ::= NCName
+ *
+ * [NS 7] LocalPart ::= NCName
+ *
+ * Returns the local part, and prefix is updated
+ * to get the Prefix if any.
+ */
+
+xmlChar *
+xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) {
+ xmlChar buf[XML_MAX_NAMELEN + 5];
+ xmlChar *buffer = NULL;
+ int len = 0;
+ int max = XML_MAX_NAMELEN;
+ xmlChar *ret = NULL;
+ const xmlChar *cur = name;
+ int c;
+
+ if (prefix == NULL) return(NULL);
+ *prefix = NULL;
+
+ if (cur == NULL) return(NULL);
+
+#ifndef XML_XML_NAMESPACE
+ /* xml: prefix is not really a namespace */
+ if ((cur[0] == 'x') && (cur[1] == 'm') &&
+ (cur[2] == 'l') && (cur[3] == ':'))
+ return(xmlStrdup(name));
+#endif
+
+ /* nasty but well=formed */
+ if (cur[0] == ':')
+ return(xmlStrdup(name));
+
+ c = *cur++;
+ while ((c != 0) && (c != ':') && (len < max)) { /* tested bigname.xml */
+ buf[len++] = c;
+ c = *cur++;
+ }
+ if (len >= max) {
+ /*
+ * Okay someone managed to make a huge name, so he's ready to pay
+ * for the processing speed.
+ */
+ max = len * 2;
+
+ buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ memcpy(buffer, buf, len);
+ while ((c != 0) && (c != ':')) { /* tested bigname.xml */
+ if (len + 10 > max) {
+ xmlChar *tmp;
+
+ max *= 2;
+ tmp = (xmlChar *) xmlRealloc(buffer,
+ max * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlFree(buffer);
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ buffer = tmp;
+ }
+ buffer[len++] = c;
+ c = *cur++;
+ }
+ buffer[len] = 0;
+ }
+
+ if ((c == ':') && (*cur == 0)) {
+ if (buffer != NULL)
+ xmlFree(buffer);
+ *prefix = NULL;
+ return(xmlStrdup(name));
+ }
+
+ if (buffer == NULL)
+ ret = xmlStrndup(buf, len);
+ else {
+ ret = buffer;
+ buffer = NULL;
+ max = XML_MAX_NAMELEN;
+ }
+
+
+ if (c == ':') {
+ c = *cur;
+ *prefix = ret;
+ if (c == 0) {
+ return(xmlStrndup(BAD_CAST "", 0));
+ }
+ len = 0;
+
+ /*
+ * Check that the first character is proper to start
+ * a new name
+ */
+ if (!(((c >= 0x61) && (c <= 0x7A)) ||
+ ((c >= 0x41) && (c <= 0x5A)) ||
+ (c == '_') || (c == ':'))) {
+ int l;
+ int first = CUR_SCHAR(cur, l);
+
+ if (!IS_LETTER(first) && (first != '_')) {
+ xmlFatalErrMsgStr(ctxt, XML_NS_ERR_QNAME,
+ "Name %s is not XML Namespace compliant\n",
+ name);
+ }
+ }
+ cur++;
+
+ while ((c != 0) && (len < max)) { /* tested bigname2.xml */
+ buf[len++] = c;
+ c = *cur++;
+ }
+ if (len >= max) {
+ /*
+ * Okay someone managed to make a huge name, so he's ready to pay
+ * for the processing speed.
+ */
+ max = len * 2;
+
+ buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ memcpy(buffer, buf, len);
+ while (c != 0) { /* tested bigname2.xml */
+ if (len + 10 > max) {
+ xmlChar *tmp;
+
+ max *= 2;
+ tmp = (xmlChar *) xmlRealloc(buffer,
+ max * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buffer);
+ return(NULL);
+ }
+ buffer = tmp;
+ }
+ buffer[len++] = c;
+ c = *cur++;
+ }
+ buffer[len] = 0;
+ }
+
+ if (buffer == NULL)
+ ret = xmlStrndup(buf, len);
+ else {
+ ret = buffer;
+ }
+ }
+
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The parser itself *
+ * Relates to http://www.w3.org/TR/REC-xml *
+ * *
+ ************************************************************************/
+
+/************************************************************************
+ * *
+ * Routines to parse Name, NCName and NmToken *
+ * *
+ ************************************************************************/
+#ifdef DEBUG
+static unsigned long nbParseName = 0;
+static unsigned long nbParseNmToken = 0;
+static unsigned long nbParseNCName = 0;
+static unsigned long nbParseNCNameComplex = 0;
+static unsigned long nbParseNameComplex = 0;
+static unsigned long nbParseStringName = 0;
+#endif
+
+/*
+ * The two following functions are related to the change of accepted
+ * characters for Name and NmToken in the Revision 5 of XML-1.0
+ * They correspond to the modified production [4] and the new production [4a]
+ * changes in that revision. Also note that the macros used for the
+ * productions Letter, Digit, CombiningChar and Extender are not needed
+ * anymore.
+ * We still keep compatibility to pre-revision5 parsing semantic if the
+ * new XML_PARSE_OLD10 option is given to the parser.
+ */
+static int
+xmlIsNameStartChar(xmlParserCtxtPtr ctxt, int c) {
+ if ((ctxt->options & XML_PARSE_OLD10) == 0) {
+ /*
+ * Use the new checks of production [4] [4a] amd [5] of the
+ * Update 5 of XML-1.0
+ */
+ if ((c != ' ') && (c != '>') && (c != '/') && /* accelerators */
+ (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ (c == '_') || (c == ':') ||
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF))))
+ return(1);
+ } else {
+ if (IS_LETTER(c) || (c == '_') || (c == ':'))
+ return(1);
+ }
+ return(0);
+}
+
+static int
+xmlIsNameChar(xmlParserCtxtPtr ctxt, int c) {
+ if ((ctxt->options & XML_PARSE_OLD10) == 0) {
+ /*
+ * Use the new checks of production [4] [4a] amd [5] of the
+ * Update 5 of XML-1.0
+ */
+ if ((c != ' ') && (c != '>') && (c != '/') && /* accelerators */
+ (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ ((c >= '0') && (c <= '9')) || /* !start */
+ (c == '_') || (c == ':') ||
+ (c == '-') || (c == '.') || (c == 0xB7) || /* !start */
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x300) && (c <= 0x36F)) || /* !start */
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x203F) && (c <= 0x2040)) || /* !start */
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF))))
+ return(1);
+ } else {
+ if ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':') ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))
+ return(1);
+ }
+ return(0);
+}
+
+static xmlChar * xmlParseAttValueInternal(xmlParserCtxtPtr ctxt,
+ int *len, int *alloc, int normalize);
+
+static const xmlChar *
+xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
+ int len = 0, l;
+ int c;
+ int count = 0;
+
+#ifdef DEBUG
+ nbParseNameComplex++;
+#endif
+
+ /*
+ * Handler for more complex cases
+ */
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ c = CUR_CHAR(l);
+ if ((ctxt->options & XML_PARSE_OLD10) == 0) {
+ /*
+ * Use the new checks of production [4] [4a] amd [5] of the
+ * Update 5 of XML-1.0
+ */
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!(((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ (c == '_') || (c == ':') ||
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF))))) {
+ return(NULL);
+ }
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ while ((c != ' ') && (c != '>') && (c != '/') && /* accelerators */
+ (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ ((c >= '0') && (c <= '9')) || /* !start */
+ (c == '_') || (c == ':') ||
+ (c == '-') || (c == '.') || (c == 0xB7) || /* !start */
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x300) && (c <= 0x36F)) || /* !start */
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x203F) && (c <= 0x2040)) || /* !start */
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF))
+ )) {
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ }
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ }
+ } else {
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!IS_LETTER(c) && (c != '_') &&
+ (c != ':'))) {
+ return(NULL);
+ }
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+
+ while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
+ ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':') ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))) {
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ }
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ c = CUR_CHAR(l);
+ }
+ }
+ }
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
+ return(NULL);
+ }
+ if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
+ return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
+ return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
+}
+
+/**
+ * xmlParseName:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML name.
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * [6] Names ::= Name (#x20 Name)*
+ *
+ * Returns the Name parsed or NULL
+ */
+
+const xmlChar *
+xmlParseName(xmlParserCtxtPtr ctxt) {
+ const xmlChar *in;
+ const xmlChar *ret;
+ int count = 0;
+
+ GROW;
+
+#ifdef DEBUG
+ nbParseName++;
+#endif
+
+ /*
+ * Accelerator for simple ASCII names
+ */
+ in = ctxt->input->cur;
+ if (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ (*in == '_') || (*in == ':')) {
+ in++;
+ while (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ ((*in >= 0x30) && (*in <= 0x39)) ||
+ (*in == '_') || (*in == '-') ||
+ (*in == ':') || (*in == '.'))
+ in++;
+ if ((*in > 0) && (*in < 0x80)) {
+ count = in - ctxt->input->cur;
+ if ((count > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
+ return(NULL);
+ }
+ ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
+ ctxt->input->cur = in;
+ ctxt->nbChars += count;
+ ctxt->input->col += count;
+ if (ret == NULL)
+ xmlErrMemory(ctxt, NULL);
+ return(ret);
+ }
+ }
+ /* accelerator for special cases */
+ return(xmlParseNameComplex(ctxt));
+}
+
+static const xmlChar *
+xmlParseNCNameComplex(xmlParserCtxtPtr ctxt) {
+ int len = 0, l;
+ int c;
+ int count = 0;
+ const xmlChar *end; /* needed because CUR_CHAR() can move cur on \r\n */
+
+#ifdef DEBUG
+ nbParseNCNameComplex++;
+#endif
+
+ /*
+ * Handler for more complex cases
+ */
+ GROW;
+ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!xmlIsNameStartChar(ctxt, c) || (c == ':'))) {
+ return(NULL);
+ }
+
+ while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
+ (xmlIsNameChar(ctxt, c) && (c != ':'))) {
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ return(NULL);
+ }
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ }
+ len += l;
+ NEXTL(l);
+ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ end = ctxt->input->cur;
+ c = CUR_CHAR(l);
+ }
+ }
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ return(NULL);
+ }
+ return(xmlDictLookup(ctxt->dict, end - len, len));
+}
+
+/**
+ * xmlParseNCName:
+ * @ctxt: an XML parser context
+ * @len: length of the string parsed
+ *
+ * parse an XML name.
+ *
+ * [4NS] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
+ * CombiningChar | Extender
+ *
+ * [5NS] NCName ::= (Letter | '_') (NCNameChar)*
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static const xmlChar *
+xmlParseNCName(xmlParserCtxtPtr ctxt) {
+ const xmlChar *in;
+ const xmlChar *ret;
+ int count = 0;
+
+#ifdef DEBUG
+ nbParseNCName++;
+#endif
+
+ /*
+ * Accelerator for simple ASCII names
+ */
+ in = ctxt->input->cur;
+ if (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ (*in == '_')) {
+ in++;
+ while (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ ((*in >= 0x30) && (*in <= 0x39)) ||
+ (*in == '_') || (*in == '-') ||
+ (*in == '.'))
+ in++;
+ if ((*in > 0) && (*in < 0x80)) {
+ count = in - ctxt->input->cur;
+ if ((count > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ return(NULL);
+ }
+ ret = xmlDictLookup(ctxt->dict, ctxt->input->cur, count);
+ ctxt->input->cur = in;
+ ctxt->nbChars += count;
+ ctxt->input->col += count;
+ if (ret == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ }
+ return(ret);
+ }
+ }
+ return(xmlParseNCNameComplex(ctxt));
+}
+
+/**
+ * xmlParseNameAndCompare:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML name and compares for match
+ * (specialized for endtag parsing)
+ *
+ * Returns NULL for an illegal name, (xmlChar*) 1 for success
+ * and the name for mismatch
+ */
+
+static const xmlChar *
+xmlParseNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *other) {
+ register const xmlChar *cmp = other;
+ register const xmlChar *in;
+ const xmlChar *ret;
+
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+
+ in = ctxt->input->cur;
+ while (*in != 0 && *in == *cmp) {
+ ++in;
+ ++cmp;
+ ctxt->input->col++;
+ }
+ if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
+ /* success */
+ ctxt->input->cur = in;
+ return (const xmlChar*) 1;
+ }
+ /* failure (or end of input buffer), check with full function */
+ ret = xmlParseName (ctxt);
+ /* strings coming from the dictionnary direct compare possible */
+ if (ret == other) {
+ return (const xmlChar*) 1;
+ }
+ return ret;
+}
+
+/**
+ * xmlParseStringName:
+ * @ctxt: an XML parser context
+ * @str: a pointer to the string pointer (IN/OUT)
+ *
+ * parse an XML name.
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * [6] Names ::= Name (#x20 Name)*
+ *
+ * Returns the Name parsed or NULL. The @str pointer
+ * is updated to the current location in the string.
+ */
+
+static xmlChar *
+xmlParseStringName(xmlParserCtxtPtr ctxt, const xmlChar** str) {
+ xmlChar buf[XML_MAX_NAMELEN + 5];
+ const xmlChar *cur = *str;
+ int len = 0, l;
+ int c;
+
+#ifdef DEBUG
+ nbParseStringName++;
+#endif
+
+ c = CUR_SCHAR(cur, l);
+ if (!xmlIsNameStartChar(ctxt, c)) {
+ return(NULL);
+ }
+
+ COPY_BUF(l,buf,len,c);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (xmlIsNameChar(ctxt, c)) {
+ COPY_BUF(l,buf,len,c);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ if (len >= XML_MAX_NAMELEN) { /* test bigentname.xml */
+ /*
+ * Okay someone managed to make a huge name, so he's ready to pay
+ * for the processing speed.
+ */
+ xmlChar *buffer;
+ int max = len * 2;
+
+ buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ memcpy(buffer, buf, len);
+ while (xmlIsNameChar(ctxt, c)) {
+ if (len + 10 > max) {
+ xmlChar *tmp;
+
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ xmlFree(buffer);
+ return(NULL);
+ }
+ max *= 2;
+ tmp = (xmlChar *) xmlRealloc(buffer,
+ max * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buffer);
+ return(NULL);
+ }
+ buffer = tmp;
+ }
+ COPY_BUF(l,buffer,len,c);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ buffer[len] = 0;
+ *str = cur;
+ return(buffer);
+ }
+ }
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NCName");
+ return(NULL);
+ }
+ *str = cur;
+ return(xmlStrndup(buf, len));
+}
+
+/**
+ * xmlParseNmtoken:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML Nmtoken.
+ *
+ * [7] Nmtoken ::= (NameChar)+
+ *
+ * [8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
+ *
+ * Returns the Nmtoken parsed or NULL
+ */
+
+xmlChar *
+xmlParseNmtoken(xmlParserCtxtPtr ctxt) {
+ xmlChar buf[XML_MAX_NAMELEN + 5];
+ int len = 0, l;
+ int c;
+ int count = 0;
+
+#ifdef DEBUG
+ nbParseNmToken++;
+#endif
+
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ c = CUR_CHAR(l);
+
+ while (xmlIsNameChar(ctxt, c)) {
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ count = 0;
+ GROW;
+ }
+ COPY_BUF(l,buf,len,c);
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ c = CUR_CHAR(l);
+ }
+ if (len >= XML_MAX_NAMELEN) {
+ /*
+ * Okay someone managed to make a huge token, so he's ready to pay
+ * for the processing speed.
+ */
+ xmlChar *buffer;
+ int max = len * 2;
+
+ buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ memcpy(buffer, buf, len);
+ while (xmlIsNameChar(ctxt, c)) {
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buffer);
+ return(NULL);
+ }
+ }
+ if (len + 10 > max) {
+ xmlChar *tmp;
+
+ if ((max > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NmToken");
+ xmlFree(buffer);
+ return(NULL);
+ }
+ max *= 2;
+ tmp = (xmlChar *) xmlRealloc(buffer,
+ max * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buffer);
+ return(NULL);
+ }
+ buffer = tmp;
+ }
+ COPY_BUF(l,buffer,len,c);
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ }
+ buffer[len] = 0;
+ return(buffer);
+ }
+ }
+ if (len == 0)
+ return(NULL);
+ if ((len > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "NmToken");
+ return(NULL);
+ }
+ return(xmlStrndup(buf, len));
+}
+
+/**
+ * xmlParseEntityValue:
+ * @ctxt: an XML parser context
+ * @orig: if non-NULL store a copy of the original entity value
+ *
+ * parse a value for ENTITY declarations
+ *
+ * [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' |
+ * "'" ([^%&'] | PEReference | Reference)* "'"
+ *
+ * Returns the EntityValue parsed with reference substituted or NULL
+ */
+
+xmlChar *
+xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = XML_PARSER_BUFFER_SIZE;
+ int c, l;
+ xmlChar stop;
+ xmlChar *ret = NULL;
+ const xmlChar *cur = NULL;
+ xmlParserInputPtr input;
+
+ if (RAW == '"') stop = '"';
+ else if (RAW == '\'') stop = '\'';
+ else {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_NOT_STARTED, NULL);
+ return(NULL);
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+
+ /*
+ * The content of the entity definition is copied in a buffer.
+ */
+
+ ctxt->instate = XML_PARSER_ENTITY_VALUE;
+ input = ctxt->input;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ NEXT;
+ c = CUR_CHAR(l);
+ /*
+ * NOTE: 4.4.5 Included in Literal
+ * When a parameter entity reference appears in a literal entity
+ * value, ... a single or double quote character in the replacement
+ * text is always treated as a normal data character and will not
+ * terminate the literal.
+ * In practice it means we stop the loop only when back at parsing
+ * the initial entity and the quote is found
+ */
+ while (((IS_CHAR(c)) && ((c != stop) || /* checked */
+ (ctxt->input != input))) && (ctxt->instate != XML_PARSER_EOF)) {
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ COPY_BUF(l,buf,len,c);
+ NEXTL(l);
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1)) /* non input consuming */
+ xmlPopInput(ctxt);
+
+ GROW;
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ GROW;
+ c = CUR_CHAR(l);
+ }
+ }
+ buf[len] = 0;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return(NULL);
+ }
+
+ /*
+ * Raise problem w.r.t. '&' and '%' being used in non-entities
+ * reference constructs. Note Charref will be handled in
+ * xmlStringDecodeEntities()
+ */
+ cur = buf;
+ while (*cur != 0) { /* non input consuming */
+ if ((*cur == '%') || ((*cur == '&') && (cur[1] != '#'))) {
+ xmlChar *name;
+ xmlChar tmp = *cur;
+
+ cur++;
+ name = xmlParseStringName(ctxt, &cur);
+ if ((name == NULL) || (*cur != ';')) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_ENTITY_CHAR_ERROR,
+ "EntityValue: '%c' forbidden except for entities references\n",
+ tmp);
+ }
+ if ((tmp == '%') && (ctxt->inSubset == 1) &&
+ (ctxt->inputNr == 1)) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_PE_INTERNAL, NULL);
+ }
+ if (name != NULL)
+ xmlFree(name);
+ if (*cur == 0)
+ break;
+ }
+ cur++;
+ }
+
+ /*
+ * Then PEReference entities are substituted.
+ */
+ if (c != stop) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_NOT_FINISHED, NULL);
+ xmlFree(buf);
+ } else {
+ NEXT;
+ /*
+ * NOTE: 4.4.7 Bypassed
+ * When a general entity reference appears in the EntityValue in
+ * an entity declaration, it is bypassed and left as is.
+ * so XML_SUBSTITUTE_REF is not set here.
+ */
+ ret = xmlStringDecodeEntities(ctxt, buf, XML_SUBSTITUTE_PEREF,
+ 0, 0, 0);
+ if (orig != NULL)
+ *orig = buf;
+ else
+ xmlFree(buf);
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlParseAttValueComplex:
+ * @ctxt: an XML parser context
+ * @len: the resulting attribute len
+ * @normalize: wether to apply the inner normalization
+ *
+ * parse a value for an attribute, this is the fallback function
+ * of xmlParseAttValue() when the attribute parsing requires handling
+ * of non-ASCII characters, or normalization compaction.
+ *
+ * Returns the AttValue parsed or NULL. The value has to be freed by the caller.
+ */
+static xmlChar *
+xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
+ xmlChar limit = 0;
+ xmlChar *buf = NULL;
+ xmlChar *rep = NULL;
+ size_t len = 0;
+ size_t buf_size = 0;
+ int c, l, in_space = 0;
+ xmlChar *current = NULL;
+ xmlEntityPtr ent;
+
+ if (NXT(0) == '"') {
+ ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE;
+ limit = '"';
+ NEXT;
+ } else if (NXT(0) == '\'') {
+ limit = '\'';
+ ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE;
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_ATTRIBUTE_NOT_STARTED, NULL);
+ return(NULL);
+ }
+
+ /*
+ * allocate a translation buffer.
+ */
+ buf_size = XML_PARSER_BUFFER_SIZE;
+ buf = (xmlChar *) xmlMallocAtomic(buf_size);
+ if (buf == NULL) goto mem_error;
+
+ /*
+ * OK loop until we reach one of the ending char or a size limit.
+ */
+ c = CUR_CHAR(l);
+ while (((NXT(0) != limit) && /* checked */
+ (IS_CHAR(c)) && (c != '<')) &&
+ (ctxt->instate != XML_PARSER_EOF)) {
+ /*
+ * Impose a reasonable limit on attribute size, unless XML_PARSE_HUGE
+ * special option is given
+ */
+ if ((len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ goto mem_error;
+ }
+ if (c == 0) break;
+ if (c == '&') {
+ in_space = 0;
+ if (NXT(1) == '#') {
+ int val = xmlParseCharRef(ctxt);
+
+ if (val == '&') {
+ if (ctxt->replaceEntities) {
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ buf[len++] = '&';
+ } else {
+ /*
+ * The reparsing will be done in xmlStringGetNodeList()
+ * called by the attribute() function in SAX.c
+ */
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ buf[len++] = '&';
+ buf[len++] = '#';
+ buf[len++] = '3';
+ buf[len++] = '8';
+ buf[len++] = ';';
+ }
+ } else if (val != 0) {
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ len += xmlCopyChar(0, &buf[len], val);
+ }
+ } else {
+ ent = xmlParseEntityRef(ctxt);
+ ctxt->nbentities++;
+ if (ent != NULL)
+ ctxt->nbentities += ent->owner;
+ if ((ent != NULL) &&
+ (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ if ((ctxt->replaceEntities == 0) &&
+ (ent->content[0] == '&')) {
+ buf[len++] = '&';
+ buf[len++] = '#';
+ buf[len++] = '3';
+ buf[len++] = '8';
+ buf[len++] = ';';
+ } else {
+ buf[len++] = ent->content[0];
+ }
+ } else if ((ent != NULL) &&
+ (ctxt->replaceEntities != 0)) {
+ if (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) {
+ rep = xmlStringDecodeEntities(ctxt, ent->content,
+ XML_SUBSTITUTE_REF,
+ 0, 0, 0);
+ if (rep != NULL) {
+ current = rep;
+ while (*current != 0) { /* non input consuming */
+ if ((*current == 0xD) || (*current == 0xA) ||
+ (*current == 0x9)) {
+ buf[len++] = 0x20;
+ current++;
+ } else
+ buf[len++] = *current++;
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ }
+ xmlFree(rep);
+ rep = NULL;
+ }
+ } else {
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ if (ent->content != NULL)
+ buf[len++] = ent->content[0];
+ }
+ } else if (ent != NULL) {
+ int i = xmlStrlen(ent->name);
+ const xmlChar *cur = ent->name;
+
+ /*
+ * This may look absurd but is needed to detect
+ * entities problems
+ */
+ if ((ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
+ (ent->content != NULL) && (ent->checked == 0)) {
+ unsigned long oldnbent = ctxt->nbentities;
+
+ rep = xmlStringDecodeEntities(ctxt, ent->content,
+ XML_SUBSTITUTE_REF, 0, 0, 0);
+
+ ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
+ if (rep != NULL) {
+ if (xmlStrchr(rep, '<'))
+ ent->checked |= 1;
+ xmlFree(rep);
+ rep = NULL;
+ }
+ }
+
+ /*
+ * Just output the reference
+ */
+ buf[len++] = '&';
+ while (len + i + 10 > buf_size) {
+ growBuffer(buf, i + 10);
+ }
+ for (;i > 0;i--)
+ buf[len++] = *cur++;
+ buf[len++] = ';';
+ }
+ }
+ } else {
+ if ((c == 0x20) || (c == 0xD) || (c == 0xA) || (c == 0x9)) {
+ if ((len != 0) || (!normalize)) {
+ if ((!normalize) || (!in_space)) {
+ COPY_BUF(l,buf,len,0x20);
+ while (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ }
+ in_space = 1;
+ }
+ } else {
+ in_space = 0;
+ COPY_BUF(l,buf,len,c);
+ if (len + 10 > buf_size) {
+ growBuffer(buf, 10);
+ }
+ }
+ NEXTL(l);
+ }
+ GROW;
+ c = CUR_CHAR(l);
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto error;
+
+ if ((in_space) && (normalize)) {
+ while ((len > 0) && (buf[len - 1] == 0x20)) len--;
+ }
+ buf[len] = 0;
+ if (RAW == '<') {
+ xmlFatalErr(ctxt, XML_ERR_LT_IN_ATTRIBUTE, NULL);
+ } else if (RAW != limit) {
+ if ((c != 0) && (!IS_CHAR(c))) {
+ xmlFatalErrMsg(ctxt, XML_ERR_INVALID_CHAR,
+ "invalid character in attribute value\n");
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue: ' expected\n");
+ }
+ } else
+ NEXT;
+
+ /*
+ * There we potentially risk an overflow, don't allow attribute value of
+ * length more than INT_MAX it is a very reasonnable assumption !
+ */
+ if (len >= INT_MAX) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ goto mem_error;
+ }
+
+ if (attlen != NULL) *attlen = (int) len;
+ return(buf);
+
+mem_error:
+ xmlErrMemory(ctxt, NULL);
+error:
+ if (buf != NULL)
+ xmlFree(buf);
+ if (rep != NULL)
+ xmlFree(rep);
+ return(NULL);
+}
+
+/**
+ * xmlParseAttValue:
+ * @ctxt: an XML parser context
+ *
+ * parse a value for an attribute
+ * Note: the parser won't do substitution of entities here, this
+ * will be handled later in xmlStringGetNodeList
+ *
+ * [10] AttValue ::= '"' ([^<&"] | Reference)* '"' |
+ * "'" ([^<&'] | Reference)* "'"
+ *
+ * 3.3.3 Attribute-Value Normalization:
+ * Before the value of an attribute is passed to the application or
+ * checked for validity, the XML processor must normalize it as follows:
+ * - a character reference is processed by appending the referenced
+ * character to the attribute value
+ * - an entity reference is processed by recursively processing the
+ * replacement text of the entity
+ * - a whitespace character (#x20, #xD, #xA, #x9) is processed by
+ * appending #x20 to the normalized value, except that only a single
+ * #x20 is appended for a "#xD#xA" sequence that is part of an external
+ * parsed entity or the literal entity value of an internal parsed entity
+ * - other characters are processed by appending them to the normalized value
+ * If the declared value is not CDATA, then the XML processor must further
+ * process the normalized attribute value by discarding any leading and
+ * trailing space (#x20) characters, and by replacing sequences of space
+ * (#x20) characters by a single space (#x20) character.
+ * All attributes for which no declaration has been read should be treated
+ * by a non-validating parser as if declared CDATA.
+ *
+ * Returns the AttValue parsed or NULL. The value has to be freed by the caller.
+ */
+
+
+xmlChar *
+xmlParseAttValue(xmlParserCtxtPtr ctxt) {
+ if ((ctxt == NULL) || (ctxt->input == NULL)) return(NULL);
+ return(xmlParseAttValueInternal(ctxt, NULL, NULL, 0));
+}
+
+/**
+ * xmlParseSystemLiteral:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML Literal
+ *
+ * [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
+ *
+ * Returns the SystemLiteral parsed or NULL
+ */
+
+xmlChar *
+xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = XML_PARSER_BUFFER_SIZE;
+ int cur, l;
+ xmlChar stop;
+ int state = ctxt->instate;
+ int count = 0;
+
+ SHRINK;
+ if (RAW == '"') {
+ NEXT;
+ stop = '"';
+ } else if (RAW == '\'') {
+ NEXT;
+ stop = '\'';
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, NULL);
+ return(NULL);
+ }
+
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ ctxt->instate = XML_PARSER_SYSTEM_LITERAL;
+ cur = CUR_CHAR(l);
+ while ((IS_CHAR(cur)) && (cur != stop)) { /* checked */
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+
+ if ((size > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "SystemLiteral");
+ xmlFree(buf);
+ ctxt->instate = (xmlParserInputState) state;
+ return(NULL);
+ }
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlFree(buf);
+ xmlErrMemory(ctxt, NULL);
+ ctxt->instate = (xmlParserInputState) state;
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ count++;
+ if (count > 50) {
+ GROW;
+ count = 0;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ }
+ COPY_BUF(l,buf,len,cur);
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ GROW;
+ SHRINK;
+ cur = CUR_CHAR(l);
+ }
+ }
+ buf[len] = 0;
+ ctxt->instate = (xmlParserInputState) state;
+ if (!IS_CHAR(cur)) {
+ xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, NULL);
+ } else {
+ NEXT;
+ }
+ return(buf);
+}
+
+/**
+ * xmlParsePubidLiteral:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML public literal
+ *
+ * [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
+ *
+ * Returns the PubidLiteral parsed or NULL.
+ */
+
+xmlChar *
+xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = XML_PARSER_BUFFER_SIZE;
+ xmlChar cur;
+ xmlChar stop;
+ int count = 0;
+ xmlParserInputState oldstate = ctxt->instate;
+
+ SHRINK;
+ if (RAW == '"') {
+ NEXT;
+ stop = '"';
+ } else if (RAW == '\'') {
+ NEXT;
+ stop = '\'';
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_STARTED, NULL);
+ return(NULL);
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ ctxt->instate = XML_PARSER_PUBLIC_LITERAL;
+ cur = CUR;
+ while ((IS_PUBIDCHAR_CH(cur)) && (cur != stop)) { /* checked */
+ if (len + 1 >= size) {
+ xmlChar *tmp;
+
+ if ((size > XML_MAX_NAME_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Public ID");
+ xmlFree(buf);
+ return(NULL);
+ }
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ buf[len++] = cur;
+ count++;
+ if (count > 50) {
+ GROW;
+ count = 0;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ }
+ NEXT;
+ cur = CUR;
+ if (cur == 0) {
+ GROW;
+ SHRINK;
+ cur = CUR;
+ }
+ }
+ buf[len] = 0;
+ if (cur != stop) {
+ xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, NULL);
+ } else {
+ NEXT;
+ }
+ ctxt->instate = oldstate;
+ return(buf);
+}
+
+static void xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata);
+
+/*
+ * used for the test in the inner loop of the char data testing
+ */
+static const unsigned char test_char_data[256] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x9, CR/LF separated */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x00, 0x27, /* & */
+ 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3A, 0x3B, 0x00, 0x3D, 0x3E, 0x3F, /* < */
+ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+ 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
+ 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x00, 0x5E, 0x5F, /* ] */
+ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* non-ascii */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/**
+ * xmlParseCharData:
+ * @ctxt: an XML parser context
+ * @cdata: int indicating whether we are within a CDATA section
+ *
+ * parse a CharData section.
+ * if we are within a CDATA section ']]>' marks an end of section.
+ *
+ * The right angle bracket (>) may be represented using the string "&gt;",
+ * and must, for compatibility, be escaped using "&gt;" or a character
+ * reference when it appears in the string "]]>" in content, when that
+ * string is not marking the end of a CDATA section.
+ *
+ * [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
+ */
+
+void
+xmlParseCharData(xmlParserCtxtPtr ctxt, int cdata) {
+ const xmlChar *in;
+ int nbchar = 0;
+ int line = ctxt->input->line;
+ int col = ctxt->input->col;
+ int ccol;
+
+ SHRINK;
+ GROW;
+ /*
+ * Accelerated common case where input don't need to be
+ * modified before passing it to the handler.
+ */
+ if (!cdata) {
+ in = ctxt->input->cur;
+ do {
+get_more_space:
+ while (*in == 0x20) { in++; ctxt->input->col++; }
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ goto get_more_space;
+ }
+ if (*in == '<') {
+ nbchar = in - ctxt->input->cur;
+ if (nbchar > 0) {
+ const xmlChar *tmp = ctxt->input->cur;
+ ctxt->input->cur = in;
+
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->ignorableWhitespace !=
+ ctxt->sax->characters)) {
+ if (areBlanks(ctxt, tmp, nbchar, 1)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ tmp, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ if (*ctxt->space == -1)
+ *ctxt->space = -2;
+ }
+ } else if ((ctxt->sax != NULL) &&
+ (ctxt->sax->characters != NULL)) {
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ }
+ }
+ return;
+ }
+
+get_more:
+ ccol = ctxt->input->col;
+ while (test_char_data[*in]) {
+ in++;
+ ccol++;
+ }
+ ctxt->input->col = ccol;
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ goto get_more;
+ }
+ if (*in == ']') {
+ if ((in[1] == ']') && (in[2] == '>')) {
+ xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
+ ctxt->input->cur = in;
+ return;
+ }
+ in++;
+ ctxt->input->col++;
+ goto get_more;
+ }
+ nbchar = in - ctxt->input->cur;
+ if (nbchar > 0) {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->ignorableWhitespace !=
+ ctxt->sax->characters) &&
+ (IS_BLANK_CH(*ctxt->input->cur))) {
+ const xmlChar *tmp = ctxt->input->cur;
+ ctxt->input->cur = in;
+
+ if (areBlanks(ctxt, tmp, nbchar, 0)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ tmp, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ tmp, nbchar);
+ if (*ctxt->space == -1)
+ *ctxt->space = -2;
+ }
+ line = ctxt->input->line;
+ col = ctxt->input->col;
+ } else if (ctxt->sax != NULL) {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ ctxt->input->cur, nbchar);
+ line = ctxt->input->line;
+ col = ctxt->input->col;
+ }
+ /* something really bad happened in the SAX callback */
+ if (ctxt->instate != XML_PARSER_CONTENT)
+ return;
+ }
+ ctxt->input->cur = in;
+ if (*in == 0xD) {
+ in++;
+ if (*in == 0xA) {
+ ctxt->input->cur = in;
+ in++;
+ ctxt->input->line++; ctxt->input->col = 1;
+ continue; /* while */
+ }
+ in--;
+ }
+ if (*in == '<') {
+ return;
+ }
+ if (*in == '&') {
+ return;
+ }
+ SHRINK;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ in = ctxt->input->cur;
+ } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09));
+ nbchar = 0;
+ }
+ ctxt->input->line = line;
+ ctxt->input->col = col;
+ xmlParseCharDataComplex(ctxt, cdata);
+}
+
+/**
+ * xmlParseCharDataComplex:
+ * @ctxt: an XML parser context
+ * @cdata: int indicating whether we are within a CDATA section
+ *
+ * parse a CharData section.this is the fallback function
+ * of xmlParseCharData() when the parsing requires handling
+ * of non-ASCII characters.
+ */
+static void
+xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) {
+ xmlChar buf[XML_PARSER_BIG_BUFFER_SIZE + 5];
+ int nbchar = 0;
+ int cur, l;
+ int count = 0;
+
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ while ((cur != '<') && /* checked */
+ (cur != '&') &&
+ (IS_CHAR(cur))) /* test also done in xmlCurrentChar() */ {
+ if ((cur == ']') && (NXT(1) == ']') &&
+ (NXT(2) == '>')) {
+ if (cdata) break;
+ else {
+ xmlFatalErr(ctxt, XML_ERR_MISPLACED_CDATA_END, NULL);
+ }
+ }
+ COPY_BUF(l,buf,nbchar,cur);
+ if (nbchar >= XML_PARSER_BIG_BUFFER_SIZE) {
+ buf[nbchar] = 0;
+
+ /*
+ * OK the segment is to be consumed as chars.
+ */
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (areBlanks(ctxt, buf, nbchar, 0)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData,
+ buf, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ if ((ctxt->sax->characters !=
+ ctxt->sax->ignorableWhitespace) &&
+ (*ctxt->space == -1))
+ *ctxt->space = -2;
+ }
+ }
+ nbchar = 0;
+ /* something really bad happened in the SAX callback */
+ if (ctxt->instate != XML_PARSER_CONTENT)
+ return;
+ }
+ count++;
+ if (count > 50) {
+ GROW;
+ count = 0;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ }
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ }
+ if (nbchar != 0) {
+ buf[nbchar] = 0;
+ /*
+ * OK the segment is to be consumed as chars.
+ */
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (areBlanks(ctxt, buf, nbchar, 0)) {
+ if (ctxt->sax->ignorableWhitespace != NULL)
+ ctxt->sax->ignorableWhitespace(ctxt->userData, buf, nbchar);
+ } else {
+ if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, nbchar);
+ if ((ctxt->sax->characters != ctxt->sax->ignorableWhitespace) &&
+ (*ctxt->space == -1))
+ *ctxt->space = -2;
+ }
+ }
+ }
+ if ((cur != 0) && (!IS_CHAR(cur))) {
+ /* Generate the error and skip the offending character */
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "PCDATA invalid Char value %d\n",
+ cur);
+ NEXTL(l);
+ }
+}
+
+/**
+ * xmlParseExternalID:
+ * @ctxt: an XML parser context
+ * @publicID: a xmlChar** receiving PubidLiteral
+ * @strict: indicate whether we should restrict parsing to only
+ * production [75], see NOTE below
+ *
+ * Parse an External ID or a Public ID
+ *
+ * NOTE: Productions [75] and [83] interact badly since [75] can generate
+ * 'PUBLIC' S PubidLiteral S SystemLiteral
+ *
+ * [75] ExternalID ::= 'SYSTEM' S SystemLiteral
+ * | 'PUBLIC' S PubidLiteral S SystemLiteral
+ *
+ * [83] PublicID ::= 'PUBLIC' S PubidLiteral
+ *
+ * Returns the function returns SystemLiteral and in the second
+ * case publicID receives PubidLiteral, is strict is off
+ * it is possible to return NULL and have publicID set.
+ */
+
+xmlChar *
+xmlParseExternalID(xmlParserCtxtPtr ctxt, xmlChar **publicID, int strict) {
+ xmlChar *URI = NULL;
+
+ SHRINK;
+
+ *publicID = NULL;
+ if (CMP6(CUR_PTR, 'S', 'Y', 'S', 'T', 'E', 'M')) {
+ SKIP(6);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'SYSTEM'\n");
+ }
+ SKIP_BLANKS;
+ URI = xmlParseSystemLiteral(ctxt);
+ if (URI == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_URI_REQUIRED, NULL);
+ }
+ } else if (CMP6(CUR_PTR, 'P', 'U', 'B', 'L', 'I', 'C')) {
+ SKIP(6);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'PUBLIC'\n");
+ }
+ SKIP_BLANKS;
+ *publicID = xmlParsePubidLiteral(ctxt);
+ if (*publicID == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_PUBID_REQUIRED, NULL);
+ }
+ if (strict) {
+ /*
+ * We don't handle [83] so "S SystemLiteral" is required.
+ */
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the Public Identifier\n");
+ }
+ } else {
+ /*
+ * We handle [83] so we return immediately, if
+ * "S SystemLiteral" is not detected. From a purely parsing
+ * point of view that's a nice mess.
+ */
+ const xmlChar *ptr;
+ GROW;
+
+ ptr = CUR_PTR;
+ if (!IS_BLANK_CH(*ptr)) return(NULL);
+
+ while (IS_BLANK_CH(*ptr)) ptr++; /* TODO: dangerous, fix ! */
+ if ((*ptr != '\'') && (*ptr != '"')) return(NULL);
+ }
+ SKIP_BLANKS;
+ URI = xmlParseSystemLiteral(ctxt);
+ if (URI == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_URI_REQUIRED, NULL);
+ }
+ }
+ return(URI);
+}
+
+/**
+ * xmlParseCommentComplex:
+ * @ctxt: an XML parser context
+ * @buf: the already parsed part of the buffer
+ * @len: number of bytes filles in the buffer
+ * @size: allocated size of the buffer
+ *
+ * Skip an XML (SGML) comment <!-- .... -->
+ * The spec says that "For compatibility, the string "--" (double-hyphen)
+ * must not occur within comments. "
+ * This is the slow routine in case the accelerator for ascii didn't work
+ *
+ * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
+ */
+static void
+xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf,
+ size_t len, size_t size) {
+ int q, ql;
+ int r, rl;
+ int cur, l;
+ size_t count = 0;
+ int inputid;
+
+ inputid = ctxt->input->id;
+
+ if (buf == NULL) {
+ len = 0;
+ size = XML_PARSER_BUFFER_SIZE;
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return;
+ }
+ }
+ GROW; /* Assure there's enough input data */
+ q = CUR_CHAR(ql);
+ if (q == 0)
+ goto not_terminated;
+ if (!IS_CHAR(q)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlParseComment: invalid xmlChar value %d\n",
+ q);
+ xmlFree (buf);
+ return;
+ }
+ NEXTL(ql);
+ r = CUR_CHAR(rl);
+ if (r == 0)
+ goto not_terminated;
+ if (!IS_CHAR(r)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlParseComment: invalid xmlChar value %d\n",
+ q);
+ xmlFree (buf);
+ return;
+ }
+ NEXTL(rl);
+ cur = CUR_CHAR(l);
+ if (cur == 0)
+ goto not_terminated;
+ while (IS_CHAR(cur) && /* checked */
+ ((cur != '>') ||
+ (r != '-') || (q != '-'))) {
+ if ((r == '-') && (q == '-')) {
+ xmlFatalErr(ctxt, XML_ERR_HYPHEN_IN_COMMENT, NULL);
+ }
+ if ((len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment too big found", NULL);
+ xmlFree (buf);
+ return;
+ }
+ if (len + 5 >= size) {
+ xmlChar *new_buf;
+ size_t new_size;
+
+ new_size = size * 2;
+ new_buf = (xmlChar *) xmlRealloc(buf, new_size);
+ if (new_buf == NULL) {
+ xmlFree (buf);
+ xmlErrMemory(ctxt, NULL);
+ return;
+ }
+ buf = new_buf;
+ size = new_size;
+ }
+ COPY_BUF(ql,buf,len,q);
+ q = r;
+ ql = rl;
+ r = cur;
+ rl = l;
+
+ count++;
+ if (count > 50) {
+ GROW;
+ count = 0;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return;
+ }
+ }
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ }
+ }
+ buf[len] = 0;
+ if (cur == 0) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment not terminated \n<!--%.50s\n", buf);
+ } else if (!IS_CHAR(cur)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlParseComment: invalid xmlChar value %d\n",
+ cur);
+ } else {
+ if (inputid != ctxt->input->id) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "Comment doesn't start and stop in the same entity\n");
+ }
+ NEXT;
+ if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->comment(ctxt->userData, buf);
+ }
+ xmlFree(buf);
+ return;
+not_terminated:
+ xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment not terminated\n", NULL);
+ xmlFree(buf);
+ return;
+}
+
+/**
+ * xmlParseComment:
+ * @ctxt: an XML parser context
+ *
+ * Skip an XML (SGML) comment <!-- .... -->
+ * The spec says that "For compatibility, the string "--" (double-hyphen)
+ * must not occur within comments. "
+ *
+ * [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
+ */
+void
+xmlParseComment(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ size_t size = XML_PARSER_BUFFER_SIZE;
+ size_t len = 0;
+ xmlParserInputState state;
+ const xmlChar *in;
+ size_t nbchar = 0;
+ int ccol;
+ int inputid;
+
+ /*
+ * Check that there is a comment right here.
+ */
+ if ((RAW != '<') || (NXT(1) != '!') ||
+ (NXT(2) != '-') || (NXT(3) != '-')) return;
+ state = ctxt->instate;
+ ctxt->instate = XML_PARSER_COMMENT;
+ inputid = ctxt->input->id;
+ SKIP(4);
+ SHRINK;
+ GROW;
+
+ /*
+ * Accelerated common case where input don't need to be
+ * modified before passing it to the handler.
+ */
+ in = ctxt->input->cur;
+ do {
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ }
+get_more:
+ ccol = ctxt->input->col;
+ while (((*in > '-') && (*in <= 0x7F)) ||
+ ((*in >= 0x20) && (*in < '-')) ||
+ (*in == 0x09)) {
+ in++;
+ ccol++;
+ }
+ ctxt->input->col = ccol;
+ if (*in == 0xA) {
+ do {
+ ctxt->input->line++; ctxt->input->col = 1;
+ in++;
+ } while (*in == 0xA);
+ goto get_more;
+ }
+ nbchar = in - ctxt->input->cur;
+ /*
+ * save current set of data
+ */
+ if (nbchar > 0) {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->comment != NULL)) {
+ if (buf == NULL) {
+ if ((*in == '-') && (in[1] == '-'))
+ size = nbchar + 1;
+ else
+ size = XML_PARSER_BUFFER_SIZE + nbchar;
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ ctxt->instate = state;
+ return;
+ }
+ len = 0;
+ } else if (len + nbchar + 1 >= size) {
+ xmlChar *new_buf;
+ size += len + nbchar + XML_PARSER_BUFFER_SIZE;
+ new_buf = (xmlChar *) xmlRealloc(buf,
+ size * sizeof(xmlChar));
+ if (new_buf == NULL) {
+ xmlFree (buf);
+ xmlErrMemory(ctxt, NULL);
+ ctxt->instate = state;
+ return;
+ }
+ buf = new_buf;
+ }
+ memcpy(&buf[len], ctxt->input->cur, nbchar);
+ len += nbchar;
+ buf[len] = 0;
+ }
+ }
+ if ((len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment too big found", NULL);
+ xmlFree (buf);
+ return;
+ }
+ ctxt->input->cur = in;
+ if (*in == 0xA) {
+ in++;
+ ctxt->input->line++; ctxt->input->col = 1;
+ }
+ if (*in == 0xD) {
+ in++;
+ if (*in == 0xA) {
+ ctxt->input->cur = in;
+ in++;
+ ctxt->input->line++; ctxt->input->col = 1;
+ continue; /* while */
+ }
+ in--;
+ }
+ SHRINK;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return;
+ }
+ in = ctxt->input->cur;
+ if (*in == '-') {
+ if (in[1] == '-') {
+ if (in[2] == '>') {
+ if (ctxt->input->id != inputid) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "comment doesn't start and stop in the same entity\n");
+ }
+ SKIP(3);
+ if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
+ (!ctxt->disableSAX)) {
+ if (buf != NULL)
+ ctxt->sax->comment(ctxt->userData, buf);
+ else
+ ctxt->sax->comment(ctxt->userData, BAD_CAST "");
+ }
+ if (buf != NULL)
+ xmlFree(buf);
+ if (ctxt->instate != XML_PARSER_EOF)
+ ctxt->instate = state;
+ return;
+ }
+ if (buf != NULL) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+ "Double hyphen within comment: "
+ "<!--%.50s\n",
+ buf);
+ } else
+ xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+ "Double hyphen within comment\n", NULL);
+ in++;
+ ctxt->input->col++;
+ }
+ in++;
+ ctxt->input->col++;
+ goto get_more;
+ }
+ } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09));
+ xmlParseCommentComplex(ctxt, buf, len, size);
+ ctxt->instate = state;
+ return;
+}
+
+
+/**
+ * xmlParsePITarget:
+ * @ctxt: an XML parser context
+ *
+ * parse the name of a PI
+ *
+ * [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
+ *
+ * Returns the PITarget name or NULL
+ */
+
+const xmlChar *
+xmlParsePITarget(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+
+ name = xmlParseName(ctxt);
+ if ((name != NULL) &&
+ ((name[0] == 'x') || (name[0] == 'X')) &&
+ ((name[1] == 'm') || (name[1] == 'M')) &&
+ ((name[2] == 'l') || (name[2] == 'L'))) {
+ int i;
+ if ((name[0] == 'x') && (name[1] == 'm') &&
+ (name[2] == 'l') && (name[3] == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_RESERVED_XML_NAME,
+ "XML declaration allowed only at the start of the document\n");
+ return(name);
+ } else if (name[3] == 0) {
+ xmlFatalErr(ctxt, XML_ERR_RESERVED_XML_NAME, NULL);
+ return(name);
+ }
+ for (i = 0;;i++) {
+ if (xmlW3CPIs[i] == NULL) break;
+ if (xmlStrEqual(name, (const xmlChar *)xmlW3CPIs[i]))
+ return(name);
+ }
+ xmlWarningMsg(ctxt, XML_ERR_RESERVED_XML_NAME,
+ "xmlParsePITarget: invalid name prefix 'xml'\n",
+ NULL, NULL);
+ }
+ if ((name != NULL) && (xmlStrchr(name, ':') != NULL)) {
+ xmlNsErr(ctxt, XML_NS_ERR_COLON,
+ "colons are forbidden from PI names '%s'\n", name, NULL, NULL);
+ }
+ return(name);
+}
+
+#ifdef LIBXML_CATALOG_ENABLED
+/**
+ * xmlParseCatalogPI:
+ * @ctxt: an XML parser context
+ * @catalog: the PI value string
+ *
+ * parse an XML Catalog Processing Instruction.
+ *
+ * <?oasis-xml-catalog catalog="http://example.com/catalog.xml"?>
+ *
+ * Occurs only if allowed by the user and if happening in the Misc
+ * part of the document before any doctype informations
+ * This will add the given catalog to the parsing context in order
+ * to be used if there is a resolution need further down in the document
+ */
+
+static void
+xmlParseCatalogPI(xmlParserCtxtPtr ctxt, const xmlChar *catalog) {
+ xmlChar *URL = NULL;
+ const xmlChar *tmp, *base;
+ xmlChar marker;
+
+ tmp = catalog;
+ while (IS_BLANK_CH(*tmp)) tmp++;
+ if (xmlStrncmp(tmp, BAD_CAST"catalog", 7))
+ goto error;
+ tmp += 7;
+ while (IS_BLANK_CH(*tmp)) tmp++;
+ if (*tmp != '=') {
+ return;
+ }
+ tmp++;
+ while (IS_BLANK_CH(*tmp)) tmp++;
+ marker = *tmp;
+ if ((marker != '\'') && (marker != '"'))
+ goto error;
+ tmp++;
+ base = tmp;
+ while ((*tmp != 0) && (*tmp != marker)) tmp++;
+ if (*tmp == 0)
+ goto error;
+ URL = xmlStrndup(base, tmp - base);
+ tmp++;
+ while (IS_BLANK_CH(*tmp)) tmp++;
+ if (*tmp != 0)
+ goto error;
+
+ if (URL != NULL) {
+ ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
+ xmlFree(URL);
+ }
+ return;
+
+error:
+ xmlWarningMsg(ctxt, XML_WAR_CATALOG_PI,
+ "Catalog PI syntax error: %s\n",
+ catalog, NULL);
+ if (URL != NULL)
+ xmlFree(URL);
+}
+#endif
+
+/**
+ * xmlParsePI:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML Processing Instruction.
+ *
+ * [16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
+ *
+ * The processing is transfered to SAX once parsed.
+ */
+
+void
+xmlParsePI(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ size_t len = 0;
+ size_t size = XML_PARSER_BUFFER_SIZE;
+ int cur, l;
+ const xmlChar *target;
+ xmlParserInputState state;
+ int count = 0;
+
+ if ((RAW == '<') && (NXT(1) == '?')) {
+ xmlParserInputPtr input = ctxt->input;
+ state = ctxt->instate;
+ ctxt->instate = XML_PARSER_PI;
+ /*
+ * this is a Processing Instruction.
+ */
+ SKIP(2);
+ SHRINK;
+
+ /*
+ * Parse the target name and check for special support like
+ * namespace.
+ */
+ target = xmlParsePITarget(ctxt);
+ if (target != NULL) {
+ if ((RAW == '?') && (NXT(1) == '>')) {
+ if (input != ctxt->input) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "PI declaration doesn't start and stop in the same entity\n");
+ }
+ SKIP(2);
+
+ /*
+ * SAX: PI detected.
+ */
+ if ((ctxt->sax) && (!ctxt->disableSAX) &&
+ (ctxt->sax->processingInstruction != NULL))
+ ctxt->sax->processingInstruction(ctxt->userData,
+ target, NULL);
+ if (ctxt->instate != XML_PARSER_EOF)
+ ctxt->instate = state;
+ return;
+ }
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ ctxt->instate = state;
+ return;
+ }
+ cur = CUR;
+ if (!IS_BLANK(cur)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_SPACE_REQUIRED,
+ "ParsePI: PI %s space expected\n", target);
+ }
+ SKIP_BLANKS;
+ cur = CUR_CHAR(l);
+ while (IS_CHAR(cur) && /* checked */
+ ((cur != '?') || (NXT(1) != '>'))) {
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+ size_t new_size = size * 2;
+ tmp = (xmlChar *) xmlRealloc(buf, new_size);
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buf);
+ ctxt->instate = state;
+ return;
+ }
+ buf = tmp;
+ size = new_size;
+ }
+ count++;
+ if (count > 50) {
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return;
+ }
+ count = 0;
+ if ((len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_PI_NOT_FINISHED,
+ "PI %s too big found", target);
+ xmlFree(buf);
+ ctxt->instate = state;
+ return;
+ }
+ }
+ COPY_BUF(l,buf,len,cur);
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR_CHAR(l);
+ }
+ }
+ if ((len > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_PI_NOT_FINISHED,
+ "PI %s too big found", target);
+ xmlFree(buf);
+ ctxt->instate = state;
+ return;
+ }
+ buf[len] = 0;
+ if (cur != '?') {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_PI_NOT_FINISHED,
+ "ParsePI: PI %s never end ...\n", target);
+ } else {
+ if (input != ctxt->input) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "PI declaration doesn't start and stop in the same entity\n");
+ }
+ SKIP(2);
+
+#ifdef LIBXML_CATALOG_ENABLED
+ if (((state == XML_PARSER_MISC) ||
+ (state == XML_PARSER_START)) &&
+ (xmlStrEqual(target, XML_CATALOG_PI))) {
+ xmlCatalogAllow allow = xmlCatalogGetDefaults();
+ if ((allow == XML_CATA_ALLOW_DOCUMENT) ||
+ (allow == XML_CATA_ALLOW_ALL))
+ xmlParseCatalogPI(ctxt, buf);
+ }
+#endif
+
+
+ /*
+ * SAX: PI detected.
+ */
+ if ((ctxt->sax) && (!ctxt->disableSAX) &&
+ (ctxt->sax->processingInstruction != NULL))
+ ctxt->sax->processingInstruction(ctxt->userData,
+ target, buf);
+ }
+ xmlFree(buf);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_PI_NOT_STARTED, NULL);
+ }
+ if (ctxt->instate != XML_PARSER_EOF)
+ ctxt->instate = state;
+ }
+}
+
+/**
+ * xmlParseNotationDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse a notation declaration
+ *
+ * [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
+ *
+ * Hence there is actually 3 choices:
+ * 'PUBLIC' S PubidLiteral
+ * 'PUBLIC' S PubidLiteral S SystemLiteral
+ * and 'SYSTEM' S SystemLiteral
+ *
+ * See the NOTE on xmlParseExternalID().
+ */
+
+void
+xmlParseNotationDecl(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlChar *Pubid;
+ xmlChar *Systemid;
+
+ if (CMP10(CUR_PTR, '<', '!', 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N')) {
+ xmlParserInputPtr input = ctxt->input;
+ SHRINK;
+ SKIP(10);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after '<!NOTATION'\n");
+ return;
+ }
+ SKIP_BLANKS;
+
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_STARTED, NULL);
+ return;
+ }
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the NOTATION name'\n");
+ return;
+ }
+ if (xmlStrchr(name, ':') != NULL) {
+ xmlNsErr(ctxt, XML_NS_ERR_COLON,
+ "colons are forbidden from notation names '%s'\n",
+ name, NULL, NULL);
+ }
+ SKIP_BLANKS;
+
+ /*
+ * Parse the IDs.
+ */
+ Systemid = xmlParseExternalID(ctxt, &Pubid, 0);
+ SKIP_BLANKS;
+
+ if (RAW == '>') {
+ if (input != ctxt->input) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Notation declaration doesn't start and stop in the same entity\n");
+ }
+ NEXT;
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->notationDecl != NULL))
+ ctxt->sax->notationDecl(ctxt->userData, name, Pubid, Systemid);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL);
+ }
+ if (Systemid != NULL) xmlFree(Systemid);
+ if (Pubid != NULL) xmlFree(Pubid);
+ }
+}
+
+/**
+ * xmlParseEntityDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse <!ENTITY declarations
+ *
+ * [70] EntityDecl ::= GEDecl | PEDecl
+ *
+ * [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
+ *
+ * [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
+ *
+ * [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ *
+ * [74] PEDef ::= EntityValue | ExternalID
+ *
+ * [76] NDataDecl ::= S 'NDATA' S Name
+ *
+ * [ VC: Notation Declared ]
+ * The Name must match the declared name of a notation.
+ */
+
+void
+xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name = NULL;
+ xmlChar *value = NULL;
+ xmlChar *URI = NULL, *literal = NULL;
+ const xmlChar *ndata = NULL;
+ int isParameter = 0;
+ xmlChar *orig = NULL;
+ int skipped;
+
+ /* GROW; done in the caller */
+ if (CMP8(CUR_PTR, '<', '!', 'E', 'N', 'T', 'I', 'T', 'Y')) {
+ xmlParserInputPtr input = ctxt->input;
+ SHRINK;
+ SKIP(8);
+ skipped = SKIP_BLANKS;
+ if (skipped == 0) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after '<!ENTITY'\n");
+ }
+
+ if (RAW == '%') {
+ NEXT;
+ skipped = SKIP_BLANKS;
+ if (skipped == 0) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after '%'\n");
+ }
+ isParameter = 1;
+ }
+
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseEntityDecl: no name\n");
+ return;
+ }
+ if (xmlStrchr(name, ':') != NULL) {
+ xmlNsErr(ctxt, XML_NS_ERR_COLON,
+ "colons are forbidden from entities names '%s'\n",
+ name, NULL, NULL);
+ }
+ skipped = SKIP_BLANKS;
+ if (skipped == 0) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the entity name\n");
+ }
+
+ ctxt->instate = XML_PARSER_ENTITY_DECL;
+ /*
+ * handle the various case of definitions...
+ */
+ if (isParameter) {
+ if ((RAW == '"') || (RAW == '\'')) {
+ value = xmlParseEntityValue(ctxt, &orig);
+ if (value) {
+ if ((ctxt->sax != NULL) &&
+ (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL))
+ ctxt->sax->entityDecl(ctxt->userData, name,
+ XML_INTERNAL_PARAMETER_ENTITY,
+ NULL, NULL, value);
+ }
+ } else {
+ URI = xmlParseExternalID(ctxt, &literal, 1);
+ if ((URI == NULL) && (literal == NULL)) {
+ xmlFatalErr(ctxt, XML_ERR_VALUE_REQUIRED, NULL);
+ }
+ if (URI) {
+ xmlURIPtr uri;
+
+ uri = xmlParseURI((const char *) URI);
+ if (uri == NULL) {
+ xmlErrMsgStr(ctxt, XML_ERR_INVALID_URI,
+ "Invalid URI: %s\n", URI);
+ /*
+ * This really ought to be a well formedness error
+ * but the XML Core WG decided otherwise c.f. issue
+ * E26 of the XML erratas.
+ */
+ } else {
+ if (uri->fragment != NULL) {
+ /*
+ * Okay this is foolish to block those but not
+ * invalid URIs.
+ */
+ xmlFatalErr(ctxt, XML_ERR_URI_FRAGMENT, NULL);
+ } else {
+ if ((ctxt->sax != NULL) &&
+ (!ctxt->disableSAX) &&
+ (ctxt->sax->entityDecl != NULL))
+ ctxt->sax->entityDecl(ctxt->userData, name,
+ XML_EXTERNAL_PARAMETER_ENTITY,
+ literal, URI, NULL);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+ }
+ } else {
+ if ((RAW == '"') || (RAW == '\'')) {
+ value = xmlParseEntityValue(ctxt, &orig);
+ if ((ctxt->sax != NULL) &&
+ (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL))
+ ctxt->sax->entityDecl(ctxt->userData, name,
+ XML_INTERNAL_GENERAL_ENTITY,
+ NULL, NULL, value);
+ /*
+ * For expat compatibility in SAX mode.
+ */
+ if ((ctxt->myDoc == NULL) ||
+ (xmlStrEqual(ctxt->myDoc->version, SAX_COMPAT_MODE))) {
+ if (ctxt->myDoc == NULL) {
+ ctxt->myDoc = xmlNewDoc(SAX_COMPAT_MODE);
+ if (ctxt->myDoc == NULL) {
+ xmlErrMemory(ctxt, "New Doc failed");
+ return;
+ }
+ ctxt->myDoc->properties = XML_DOC_INTERNAL;
+ }
+ if (ctxt->myDoc->intSubset == NULL)
+ ctxt->myDoc->intSubset = xmlNewDtd(ctxt->myDoc,
+ BAD_CAST "fake", NULL, NULL);
+
+ xmlSAX2EntityDecl(ctxt, name, XML_INTERNAL_GENERAL_ENTITY,
+ NULL, NULL, value);
+ }
+ } else {
+ URI = xmlParseExternalID(ctxt, &literal, 1);
+ if ((URI == NULL) && (literal == NULL)) {
+ xmlFatalErr(ctxt, XML_ERR_VALUE_REQUIRED, NULL);
+ }
+ if (URI) {
+ xmlURIPtr uri;
+
+ uri = xmlParseURI((const char *)URI);
+ if (uri == NULL) {
+ xmlErrMsgStr(ctxt, XML_ERR_INVALID_URI,
+ "Invalid URI: %s\n", URI);
+ /*
+ * This really ought to be a well formedness error
+ * but the XML Core WG decided otherwise c.f. issue
+ * E26 of the XML erratas.
+ */
+ } else {
+ if (uri->fragment != NULL) {
+ /*
+ * Okay this is foolish to block those but not
+ * invalid URIs.
+ */
+ xmlFatalErr(ctxt, XML_ERR_URI_FRAGMENT, NULL);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+ if ((RAW != '>') && (!IS_BLANK_CH(CUR))) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required before 'NDATA'\n");
+ }
+ SKIP_BLANKS;
+ if (CMP5(CUR_PTR, 'N', 'D', 'A', 'T', 'A')) {
+ SKIP(5);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'NDATA'\n");
+ }
+ SKIP_BLANKS;
+ ndata = xmlParseName(ctxt);
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->unparsedEntityDecl != NULL))
+ ctxt->sax->unparsedEntityDecl(ctxt->userData, name,
+ literal, URI, ndata);
+ } else {
+ if ((ctxt->sax != NULL) &&
+ (!ctxt->disableSAX) && (ctxt->sax->entityDecl != NULL))
+ ctxt->sax->entityDecl(ctxt->userData, name,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY,
+ literal, URI, NULL);
+ /*
+ * For expat compatibility in SAX mode.
+ * assuming the entity repalcement was asked for
+ */
+ if ((ctxt->replaceEntities != 0) &&
+ ((ctxt->myDoc == NULL) ||
+ (xmlStrEqual(ctxt->myDoc->version, SAX_COMPAT_MODE)))) {
+ if (ctxt->myDoc == NULL) {
+ ctxt->myDoc = xmlNewDoc(SAX_COMPAT_MODE);
+ if (ctxt->myDoc == NULL) {
+ xmlErrMemory(ctxt, "New Doc failed");
+ return;
+ }
+ ctxt->myDoc->properties = XML_DOC_INTERNAL;
+ }
+
+ if (ctxt->myDoc->intSubset == NULL)
+ ctxt->myDoc->intSubset = xmlNewDtd(ctxt->myDoc,
+ BAD_CAST "fake", NULL, NULL);
+ xmlSAX2EntityDecl(ctxt, name,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY,
+ literal, URI, NULL);
+ }
+ }
+ }
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ SKIP_BLANKS;
+ if (RAW != '>') {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
+ "xmlParseEntityDecl: entity %s not terminated\n", name);
+ } else {
+ if (input != ctxt->input) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "Entity declaration doesn't start and stop in the same entity\n");
+ }
+ NEXT;
+ }
+ if (orig != NULL) {
+ /*
+ * Ugly mechanism to save the raw entity value.
+ */
+ xmlEntityPtr cur = NULL;
+
+ if (isParameter) {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->getParameterEntity != NULL))
+ cur = ctxt->sax->getParameterEntity(ctxt->userData, name);
+ } else {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->getEntity != NULL))
+ cur = ctxt->sax->getEntity(ctxt->userData, name);
+ if ((cur == NULL) && (ctxt->userData==ctxt)) {
+ cur = xmlSAX2GetEntity(ctxt, name);
+ }
+ }
+ if (cur != NULL) {
+ if (cur->orig != NULL)
+ xmlFree(orig);
+ else
+ cur->orig = orig;
+ } else
+ xmlFree(orig);
+ }
+ if (value != NULL) xmlFree(value);
+ if (URI != NULL) xmlFree(URI);
+ if (literal != NULL) xmlFree(literal);
+ }
+}
+
+/**
+ * xmlParseDefaultDecl:
+ * @ctxt: an XML parser context
+ * @value: Receive a possible fixed default value for the attribute
+ *
+ * Parse an attribute default declaration
+ *
+ * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
+ *
+ * [ VC: Required Attribute ]
+ * if the default declaration is the keyword #REQUIRED, then the
+ * attribute must be specified for all elements of the type in the
+ * attribute-list declaration.
+ *
+ * [ VC: Attribute Default Legal ]
+ * The declared default value must meet the lexical constraints of
+ * the declared attribute type c.f. xmlValidateAttributeDecl()
+ *
+ * [ VC: Fixed Attribute Default ]
+ * if an attribute has a default value declared with the #FIXED
+ * keyword, instances of that attribute must match the default value.
+ *
+ * [ WFC: No < in Attribute Values ]
+ * handled in xmlParseAttValue()
+ *
+ * returns: XML_ATTRIBUTE_NONE, XML_ATTRIBUTE_REQUIRED, XML_ATTRIBUTE_IMPLIED
+ * or XML_ATTRIBUTE_FIXED.
+ */
+
+int
+xmlParseDefaultDecl(xmlParserCtxtPtr ctxt, xmlChar **value) {
+ int val;
+ xmlChar *ret;
+
+ *value = NULL;
+ if (CMP9(CUR_PTR, '#', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D')) {
+ SKIP(9);
+ return(XML_ATTRIBUTE_REQUIRED);
+ }
+ if (CMP8(CUR_PTR, '#', 'I', 'M', 'P', 'L', 'I', 'E', 'D')) {
+ SKIP(8);
+ return(XML_ATTRIBUTE_IMPLIED);
+ }
+ val = XML_ATTRIBUTE_NONE;
+ if (CMP6(CUR_PTR, '#', 'F', 'I', 'X', 'E', 'D')) {
+ SKIP(6);
+ val = XML_ATTRIBUTE_FIXED;
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after '#FIXED'\n");
+ }
+ SKIP_BLANKS;
+ }
+ ret = xmlParseAttValue(ctxt);
+ ctxt->instate = XML_PARSER_DTD;
+ if (ret == NULL) {
+ xmlFatalErrMsg(ctxt, (xmlParserErrors)ctxt->errNo,
+ "Attribute default value declaration error\n");
+ } else
+ *value = ret;
+ return(val);
+}
+
+/**
+ * xmlParseNotationType:
+ * @ctxt: an XML parser context
+ *
+ * parse an Notation attribute type.
+ *
+ * Note: the leading 'NOTATION' S part has already being parsed...
+ *
+ * [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
+ *
+ * [ VC: Notation Attributes ]
+ * Values of this type must match one of the notation names included
+ * in the declaration; all notation names in the declaration must be declared.
+ *
+ * Returns: the notation attribute tree built while parsing
+ */
+
+xmlEnumerationPtr
+xmlParseNotationType(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlEnumerationPtr ret = NULL, last = NULL, cur, tmp;
+
+ if (RAW != '(') {
+ xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_STARTED, NULL);
+ return(NULL);
+ }
+ SHRINK;
+ do {
+ NEXT;
+ SKIP_BLANKS;
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "Name expected in NOTATION declaration\n");
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
+ tmp = ret;
+ while (tmp != NULL) {
+ if (xmlStrEqual(name, tmp->name)) {
+ xmlValidityError(ctxt, XML_DTD_DUP_TOKEN,
+ "standalone: attribute notation value token %s duplicated\n",
+ name, NULL);
+ if (!xmlDictOwns(ctxt->dict, name))
+ xmlFree((xmlChar *) name);
+ break;
+ }
+ tmp = tmp->next;
+ }
+ if (tmp == NULL) {
+ cur = xmlCreateEnumeration(name);
+ if (cur == NULL) {
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
+ if (last == NULL) ret = last = cur;
+ else {
+ last->next = cur;
+ last = cur;
+ }
+ }
+ SKIP_BLANKS;
+ } while (RAW == '|');
+ if (RAW != ')') {
+ xmlFatalErr(ctxt, XML_ERR_NOTATION_NOT_FINISHED, NULL);
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
+ NEXT;
+ return(ret);
+}
+
+/**
+ * xmlParseEnumerationType:
+ * @ctxt: an XML parser context
+ *
+ * parse an Enumeration attribute type.
+ *
+ * [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
+ *
+ * [ VC: Enumeration ]
+ * Values of this type must match one of the Nmtoken tokens in
+ * the declaration
+ *
+ * Returns: the enumeration attribute tree built while parsing
+ */
+
+xmlEnumerationPtr
+xmlParseEnumerationType(xmlParserCtxtPtr ctxt) {
+ xmlChar *name;
+ xmlEnumerationPtr ret = NULL, last = NULL, cur, tmp;
+
+ if (RAW != '(') {
+ xmlFatalErr(ctxt, XML_ERR_ATTLIST_NOT_STARTED, NULL);
+ return(NULL);
+ }
+ SHRINK;
+ do {
+ NEXT;
+ SKIP_BLANKS;
+ name = xmlParseNmtoken(ctxt);
+ if (name == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_NMTOKEN_REQUIRED, NULL);
+ return(ret);
+ }
+ tmp = ret;
+ while (tmp != NULL) {
+ if (xmlStrEqual(name, tmp->name)) {
+ xmlValidityError(ctxt, XML_DTD_DUP_TOKEN,
+ "standalone: attribute enumeration value token %s duplicated\n",
+ name, NULL);
+ if (!xmlDictOwns(ctxt->dict, name))
+ xmlFree(name);
+ break;
+ }
+ tmp = tmp->next;
+ }
+ if (tmp == NULL) {
+ cur = xmlCreateEnumeration(name);
+ if (!xmlDictOwns(ctxt->dict, name))
+ xmlFree(name);
+ if (cur == NULL) {
+ xmlFreeEnumeration(ret);
+ return(NULL);
+ }
+ if (last == NULL) ret = last = cur;
+ else {
+ last->next = cur;
+ last = cur;
+ }
+ }
+ SKIP_BLANKS;
+ } while (RAW == '|');
+ if (RAW != ')') {
+ xmlFatalErr(ctxt, XML_ERR_ATTLIST_NOT_FINISHED, NULL);
+ return(ret);
+ }
+ NEXT;
+ return(ret);
+}
+
+/**
+ * xmlParseEnumeratedType:
+ * @ctxt: an XML parser context
+ * @tree: the enumeration tree built while parsing
+ *
+ * parse an Enumerated attribute type.
+ *
+ * [57] EnumeratedType ::= NotationType | Enumeration
+ *
+ * [58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
+ *
+ *
+ * Returns: XML_ATTRIBUTE_ENUMERATION or XML_ATTRIBUTE_NOTATION
+ */
+
+int
+xmlParseEnumeratedType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
+ if (CMP8(CUR_PTR, 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N')) {
+ SKIP(8);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'NOTATION'\n");
+ return(0);
+ }
+ SKIP_BLANKS;
+ *tree = xmlParseNotationType(ctxt);
+ if (*tree == NULL) return(0);
+ return(XML_ATTRIBUTE_NOTATION);
+ }
+ *tree = xmlParseEnumerationType(ctxt);
+ if (*tree == NULL) return(0);
+ return(XML_ATTRIBUTE_ENUMERATION);
+}
+
+/**
+ * xmlParseAttributeType:
+ * @ctxt: an XML parser context
+ * @tree: the enumeration tree built while parsing
+ *
+ * parse the Attribute list def for an element
+ *
+ * [54] AttType ::= StringType | TokenizedType | EnumeratedType
+ *
+ * [55] StringType ::= 'CDATA'
+ *
+ * [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' |
+ * 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'
+ *
+ * Validity constraints for attribute values syntax are checked in
+ * xmlValidateAttributeValue()
+ *
+ * [ VC: ID ]
+ * Values of type ID must match the Name production. A name must not
+ * appear more than once in an XML document as a value of this type;
+ * i.e., ID values must uniquely identify the elements which bear them.
+ *
+ * [ VC: One ID per Element Type ]
+ * No element type may have more than one ID attribute specified.
+ *
+ * [ VC: ID Attribute Default ]
+ * An ID attribute must have a declared default of #IMPLIED or #REQUIRED.
+ *
+ * [ VC: IDREF ]
+ * Values of type IDREF must match the Name production, and values
+ * of type IDREFS must match Names; each IDREF Name must match the value
+ * of an ID attribute on some element in the XML document; i.e. IDREF
+ * values must match the value of some ID attribute.
+ *
+ * [ VC: Entity Name ]
+ * Values of type ENTITY must match the Name production, values
+ * of type ENTITIES must match Names; each Entity Name must match the
+ * name of an unparsed entity declared in the DTD.
+ *
+ * [ VC: Name Token ]
+ * Values of type NMTOKEN must match the Nmtoken production; values
+ * of type NMTOKENS must match Nmtokens.
+ *
+ * Returns the attribute type
+ */
+int
+xmlParseAttributeType(xmlParserCtxtPtr ctxt, xmlEnumerationPtr *tree) {
+ SHRINK;
+ if (CMP5(CUR_PTR, 'C', 'D', 'A', 'T', 'A')) {
+ SKIP(5);
+ return(XML_ATTRIBUTE_CDATA);
+ } else if (CMP6(CUR_PTR, 'I', 'D', 'R', 'E', 'F', 'S')) {
+ SKIP(6);
+ return(XML_ATTRIBUTE_IDREFS);
+ } else if (CMP5(CUR_PTR, 'I', 'D', 'R', 'E', 'F')) {
+ SKIP(5);
+ return(XML_ATTRIBUTE_IDREF);
+ } else if ((RAW == 'I') && (NXT(1) == 'D')) {
+ SKIP(2);
+ return(XML_ATTRIBUTE_ID);
+ } else if (CMP6(CUR_PTR, 'E', 'N', 'T', 'I', 'T', 'Y')) {
+ SKIP(6);
+ return(XML_ATTRIBUTE_ENTITY);
+ } else if (CMP8(CUR_PTR, 'E', 'N', 'T', 'I', 'T', 'I', 'E', 'S')) {
+ SKIP(8);
+ return(XML_ATTRIBUTE_ENTITIES);
+ } else if (CMP8(CUR_PTR, 'N', 'M', 'T', 'O', 'K', 'E', 'N', 'S')) {
+ SKIP(8);
+ return(XML_ATTRIBUTE_NMTOKENS);
+ } else if (CMP7(CUR_PTR, 'N', 'M', 'T', 'O', 'K', 'E', 'N')) {
+ SKIP(7);
+ return(XML_ATTRIBUTE_NMTOKEN);
+ }
+ return(xmlParseEnumeratedType(ctxt, tree));
+}
+
+/**
+ * xmlParseAttributeListDecl:
+ * @ctxt: an XML parser context
+ *
+ * : parse the Attribute list def for an element
+ *
+ * [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
+ *
+ * [53] AttDef ::= S Name S AttType S DefaultDecl
+ *
+ */
+void
+xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt) {
+ const xmlChar *elemName;
+ const xmlChar *attrName;
+ xmlEnumerationPtr tree;
+
+ if (CMP9(CUR_PTR, '<', '!', 'A', 'T', 'T', 'L', 'I', 'S', 'T')) {
+ xmlParserInputPtr input = ctxt->input;
+
+ SKIP(9);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after '<!ATTLIST'\n");
+ }
+ SKIP_BLANKS;
+ elemName = xmlParseName(ctxt);
+ if (elemName == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "ATTLIST: no name for Element\n");
+ return;
+ }
+ SKIP_BLANKS;
+ GROW;
+ while ((RAW != '>') && (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *check = CUR_PTR;
+ int type;
+ int def;
+ xmlChar *defaultValue = NULL;
+
+ GROW;
+ tree = NULL;
+ attrName = xmlParseName(ctxt);
+ if (attrName == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "ATTLIST: no name for Attribute\n");
+ break;
+ }
+ GROW;
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the attribute name\n");
+ break;
+ }
+ SKIP_BLANKS;
+
+ type = xmlParseAttributeType(ctxt, &tree);
+ if (type <= 0) {
+ break;
+ }
+
+ GROW;
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the attribute type\n");
+ if (tree != NULL)
+ xmlFreeEnumeration(tree);
+ break;
+ }
+ SKIP_BLANKS;
+
+ def = xmlParseDefaultDecl(ctxt, &defaultValue);
+ if (def <= 0) {
+ if (defaultValue != NULL)
+ xmlFree(defaultValue);
+ if (tree != NULL)
+ xmlFreeEnumeration(tree);
+ break;
+ }
+ if ((type != XML_ATTRIBUTE_CDATA) && (defaultValue != NULL))
+ xmlAttrNormalizeSpace(defaultValue, defaultValue);
+
+ GROW;
+ if (RAW != '>') {
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the attribute default value\n");
+ if (defaultValue != NULL)
+ xmlFree(defaultValue);
+ if (tree != NULL)
+ xmlFreeEnumeration(tree);
+ break;
+ }
+ SKIP_BLANKS;
+ }
+ if (check == CUR_PTR) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "in xmlParseAttributeListDecl\n");
+ if (defaultValue != NULL)
+ xmlFree(defaultValue);
+ if (tree != NULL)
+ xmlFreeEnumeration(tree);
+ break;
+ }
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->attributeDecl != NULL))
+ ctxt->sax->attributeDecl(ctxt->userData, elemName, attrName,
+ type, def, defaultValue, tree);
+ else if (tree != NULL)
+ xmlFreeEnumeration(tree);
+
+ if ((ctxt->sax2) && (defaultValue != NULL) &&
+ (def != XML_ATTRIBUTE_IMPLIED) &&
+ (def != XML_ATTRIBUTE_REQUIRED)) {
+ xmlAddDefAttrs(ctxt, elemName, attrName, defaultValue);
+ }
+ if (ctxt->sax2) {
+ xmlAddSpecialAttr(ctxt, elemName, attrName, type);
+ }
+ if (defaultValue != NULL)
+ xmlFree(defaultValue);
+ GROW;
+ }
+ if (RAW == '>') {
+ if (input != ctxt->input) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "Attribute list declaration doesn't start and stop in the same entity\n",
+ NULL, NULL);
+ }
+ NEXT;
+ }
+ }
+}
+
+/**
+ * xmlParseElementMixedContentDecl:
+ * @ctxt: an XML parser context
+ * @inputchk: the input used for the current entity, needed for boundary checks
+ *
+ * parse the declaration for a Mixed Element content
+ * The leading '(' and spaces have been skipped in xmlParseElementContentDecl
+ *
+ * [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' |
+ * '(' S? '#PCDATA' S? ')'
+ *
+ * [ VC: Proper Group/PE Nesting ] applies to [51] too (see [49])
+ *
+ * [ VC: No Duplicate Types ]
+ * The same name must not appear more than once in a single
+ * mixed-content declaration.
+ *
+ * returns: the list of the xmlElementContentPtr describing the element choices
+ */
+xmlElementContentPtr
+xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
+ xmlElementContentPtr ret = NULL, cur = NULL, n;
+ const xmlChar *elem = NULL;
+
+ GROW;
+ if (CMP7(CUR_PTR, '#', 'P', 'C', 'D', 'A', 'T', 'A')) {
+ SKIP(7);
+ SKIP_BLANKS;
+ SHRINK;
+ if (RAW == ')') {
+ if ((ctxt->validate) && (ctxt->input->id != inputchk)) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+"Element content declaration doesn't start and stop in the same entity\n",
+ NULL, NULL);
+ }
+ NEXT;
+ ret = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_PCDATA);
+ if (ret == NULL)
+ return(NULL);
+ if (RAW == '*') {
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ NEXT;
+ }
+ return(ret);
+ }
+ if ((RAW == '(') || (RAW == '|')) {
+ ret = cur = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_PCDATA);
+ if (ret == NULL) return(NULL);
+ }
+ while ((RAW == '|') && (ctxt->instate != XML_PARSER_EOF)) {
+ NEXT;
+ if (elem == NULL) {
+ ret = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR);
+ if (ret == NULL) return(NULL);
+ ret->c1 = cur;
+ if (cur != NULL)
+ cur->parent = ret;
+ cur = ret;
+ } else {
+ n = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR);
+ if (n == NULL) return(NULL);
+ n->c1 = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT);
+ if (n->c1 != NULL)
+ n->c1->parent = n;
+ cur->c2 = n;
+ if (n != NULL)
+ n->parent = cur;
+ cur = n;
+ }
+ SKIP_BLANKS;
+ elem = xmlParseName(ctxt);
+ if (elem == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseElementMixedContentDecl : Name expected\n");
+ xmlFreeDocElementContent(ctxt->myDoc, cur);
+ return(NULL);
+ }
+ SKIP_BLANKS;
+ GROW;
+ }
+ if ((RAW == ')') && (NXT(1) == '*')) {
+ if (elem != NULL) {
+ cur->c2 = xmlNewDocElementContent(ctxt->myDoc, elem,
+ XML_ELEMENT_CONTENT_ELEMENT);
+ if (cur->c2 != NULL)
+ cur->c2->parent = cur;
+ }
+ if (ret != NULL)
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ if ((ctxt->validate) && (ctxt->input->id != inputchk)) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+"Element content declaration doesn't start and stop in the same entity\n",
+ NULL, NULL);
+ }
+ SKIP(2);
+ } else {
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ xmlFatalErr(ctxt, XML_ERR_MIXED_NOT_STARTED, NULL);
+ return(NULL);
+ }
+
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_PCDATA_REQUIRED, NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlParseElementChildrenContentDeclPriv:
+ * @ctxt: an XML parser context
+ * @inputchk: the input used for the current entity, needed for boundary checks
+ * @depth: the level of recursion
+ *
+ * parse the declaration for a Mixed Element content
+ * The leading '(' and spaces have been skipped in xmlParseElementContentDecl
+ *
+ *
+ * [47] children ::= (choice | seq) ('?' | '*' | '+')?
+ *
+ * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
+ *
+ * [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'
+ *
+ * [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
+ *
+ * [ VC: Proper Group/PE Nesting ] applies to [49] and [50]
+ * TODO Parameter-entity replacement text must be properly nested
+ * with parenthesized groups. That is to say, if either of the
+ * opening or closing parentheses in a choice, seq, or Mixed
+ * construct is contained in the replacement text for a parameter
+ * entity, both must be contained in the same replacement text. For
+ * interoperability, if a parameter-entity reference appears in a
+ * choice, seq, or Mixed construct, its replacement text should not
+ * be empty, and neither the first nor last non-blank character of
+ * the replacement text should be a connector (| or ,).
+ *
+ * Returns the tree of xmlElementContentPtr describing the element
+ * hierarchy.
+ */
+static xmlElementContentPtr
+xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk,
+ int depth) {
+ xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL;
+ const xmlChar *elem;
+ xmlChar type = 0;
+
+ if (((depth > 128) && ((ctxt->options & XML_PARSE_HUGE) == 0)) ||
+ (depth > 2048)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED,
+"xmlParseElementChildrenContentDecl : depth %d too deep, use XML_PARSE_HUGE\n",
+ depth);
+ return(NULL);
+ }
+ SKIP_BLANKS;
+ GROW;
+ if (RAW == '(') {
+ int inputid = ctxt->input->id;
+
+ /* Recurse on first child */
+ NEXT;
+ SKIP_BLANKS;
+ cur = ret = xmlParseElementChildrenContentDeclPriv(ctxt, inputid,
+ depth + 1);
+ SKIP_BLANKS;
+ GROW;
+ } else {
+ elem = xmlParseName(ctxt);
+ if (elem == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED, NULL);
+ return(NULL);
+ }
+ cur = ret = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT);
+ if (cur == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ GROW;
+ if (RAW == '?') {
+ cur->ocur = XML_ELEMENT_CONTENT_OPT;
+ NEXT;
+ } else if (RAW == '*') {
+ cur->ocur = XML_ELEMENT_CONTENT_MULT;
+ NEXT;
+ } else if (RAW == '+') {
+ cur->ocur = XML_ELEMENT_CONTENT_PLUS;
+ NEXT;
+ } else {
+ cur->ocur = XML_ELEMENT_CONTENT_ONCE;
+ }
+ GROW;
+ }
+ SKIP_BLANKS;
+ SHRINK;
+ while ((RAW != ')') && (ctxt->instate != XML_PARSER_EOF)) {
+ /*
+ * Each loop we parse one separator and one element.
+ */
+ if (RAW == ',') {
+ if (type == 0) type = CUR;
+
+ /*
+ * Detect "Name | Name , Name" error
+ */
+ else if (type != CUR) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_SEPARATOR_REQUIRED,
+ "xmlParseElementChildrenContentDecl : '%c' expected\n",
+ type);
+ if ((last != NULL) && (last != ret))
+ xmlFreeDocElementContent(ctxt->myDoc, last);
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ NEXT;
+
+ op = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_SEQ);
+ if (op == NULL) {
+ if ((last != NULL) && (last != ret))
+ xmlFreeDocElementContent(ctxt->myDoc, last);
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ if (last == NULL) {
+ op->c1 = ret;
+ if (ret != NULL)
+ ret->parent = op;
+ ret = cur = op;
+ } else {
+ cur->c2 = op;
+ if (op != NULL)
+ op->parent = cur;
+ op->c1 = last;
+ if (last != NULL)
+ last->parent = op;
+ cur =op;
+ last = NULL;
+ }
+ } else if (RAW == '|') {
+ if (type == 0) type = CUR;
+
+ /*
+ * Detect "Name , Name | Name" error
+ */
+ else if (type != CUR) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_SEPARATOR_REQUIRED,
+ "xmlParseElementChildrenContentDecl : '%c' expected\n",
+ type);
+ if ((last != NULL) && (last != ret))
+ xmlFreeDocElementContent(ctxt->myDoc, last);
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ NEXT;
+
+ op = xmlNewDocElementContent(ctxt->myDoc, NULL, XML_ELEMENT_CONTENT_OR);
+ if (op == NULL) {
+ if ((last != NULL) && (last != ret))
+ xmlFreeDocElementContent(ctxt->myDoc, last);
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ if (last == NULL) {
+ op->c1 = ret;
+ if (ret != NULL)
+ ret->parent = op;
+ ret = cur = op;
+ } else {
+ cur->c2 = op;
+ if (op != NULL)
+ op->parent = cur;
+ op->c1 = last;
+ if (last != NULL)
+ last->parent = op;
+ cur =op;
+ last = NULL;
+ }
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_FINISHED, NULL);
+ if ((last != NULL) && (last != ret))
+ xmlFreeDocElementContent(ctxt->myDoc, last);
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ GROW;
+ SKIP_BLANKS;
+ GROW;
+ if (RAW == '(') {
+ int inputid = ctxt->input->id;
+ /* Recurse on second child */
+ NEXT;
+ SKIP_BLANKS;
+ last = xmlParseElementChildrenContentDeclPriv(ctxt, inputid,
+ depth + 1);
+ SKIP_BLANKS;
+ } else {
+ elem = xmlParseName(ctxt);
+ if (elem == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED, NULL);
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ last = xmlNewDocElementContent(ctxt->myDoc, elem, XML_ELEMENT_CONTENT_ELEMENT);
+ if (last == NULL) {
+ if (ret != NULL)
+ xmlFreeDocElementContent(ctxt->myDoc, ret);
+ return(NULL);
+ }
+ if (RAW == '?') {
+ last->ocur = XML_ELEMENT_CONTENT_OPT;
+ NEXT;
+ } else if (RAW == '*') {
+ last->ocur = XML_ELEMENT_CONTENT_MULT;
+ NEXT;
+ } else if (RAW == '+') {
+ last->ocur = XML_ELEMENT_CONTENT_PLUS;
+ NEXT;
+ } else {
+ last->ocur = XML_ELEMENT_CONTENT_ONCE;
+ }
+ }
+ SKIP_BLANKS;
+ GROW;
+ }
+ if ((cur != NULL) && (last != NULL)) {
+ cur->c2 = last;
+ if (last != NULL)
+ last->parent = cur;
+ }
+ if ((ctxt->validate) && (ctxt->input->id != inputchk)) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+"Element content declaration doesn't start and stop in the same entity\n",
+ NULL, NULL);
+ }
+ NEXT;
+ if (RAW == '?') {
+ if (ret != NULL) {
+ if ((ret->ocur == XML_ELEMENT_CONTENT_PLUS) ||
+ (ret->ocur == XML_ELEMENT_CONTENT_MULT))
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ else
+ ret->ocur = XML_ELEMENT_CONTENT_OPT;
+ }
+ NEXT;
+ } else if (RAW == '*') {
+ if (ret != NULL) {
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ cur = ret;
+ /*
+ * Some normalization:
+ * (a | b* | c?)* == (a | b | c)*
+ */
+ while ((cur != NULL) && (cur->type == XML_ELEMENT_CONTENT_OR)) {
+ if ((cur->c1 != NULL) &&
+ ((cur->c1->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (cur->c1->ocur == XML_ELEMENT_CONTENT_MULT)))
+ cur->c1->ocur = XML_ELEMENT_CONTENT_ONCE;
+ if ((cur->c2 != NULL) &&
+ ((cur->c2->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (cur->c2->ocur == XML_ELEMENT_CONTENT_MULT)))
+ cur->c2->ocur = XML_ELEMENT_CONTENT_ONCE;
+ cur = cur->c2;
+ }
+ }
+ NEXT;
+ } else if (RAW == '+') {
+ if (ret != NULL) {
+ int found = 0;
+
+ if ((ret->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (ret->ocur == XML_ELEMENT_CONTENT_MULT))
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ else
+ ret->ocur = XML_ELEMENT_CONTENT_PLUS;
+ /*
+ * Some normalization:
+ * (a | b*)+ == (a | b)*
+ * (a | b?)+ == (a | b)*
+ */
+ while ((cur != NULL) && (cur->type == XML_ELEMENT_CONTENT_OR)) {
+ if ((cur->c1 != NULL) &&
+ ((cur->c1->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (cur->c1->ocur == XML_ELEMENT_CONTENT_MULT))) {
+ cur->c1->ocur = XML_ELEMENT_CONTENT_ONCE;
+ found = 1;
+ }
+ if ((cur->c2 != NULL) &&
+ ((cur->c2->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (cur->c2->ocur == XML_ELEMENT_CONTENT_MULT))) {
+ cur->c2->ocur = XML_ELEMENT_CONTENT_ONCE;
+ found = 1;
+ }
+ cur = cur->c2;
+ }
+ if (found)
+ ret->ocur = XML_ELEMENT_CONTENT_MULT;
+ }
+ NEXT;
+ }
+ return(ret);
+}
+
+/**
+ * xmlParseElementChildrenContentDecl:
+ * @ctxt: an XML parser context
+ * @inputchk: the input used for the current entity, needed for boundary checks
+ *
+ * parse the declaration for a Mixed Element content
+ * The leading '(' and spaces have been skipped in xmlParseElementContentDecl
+ *
+ * [47] children ::= (choice | seq) ('?' | '*' | '+')?
+ *
+ * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
+ *
+ * [49] choice ::= '(' S? cp ( S? '|' S? cp )* S? ')'
+ *
+ * [50] seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
+ *
+ * [ VC: Proper Group/PE Nesting ] applies to [49] and [50]
+ * TODO Parameter-entity replacement text must be properly nested
+ * with parenthesized groups. That is to say, if either of the
+ * opening or closing parentheses in a choice, seq, or Mixed
+ * construct is contained in the replacement text for a parameter
+ * entity, both must be contained in the same replacement text. For
+ * interoperability, if a parameter-entity reference appears in a
+ * choice, seq, or Mixed construct, its replacement text should not
+ * be empty, and neither the first nor last non-blank character of
+ * the replacement text should be a connector (| or ,).
+ *
+ * Returns the tree of xmlElementContentPtr describing the element
+ * hierarchy.
+ */
+xmlElementContentPtr
+xmlParseElementChildrenContentDecl(xmlParserCtxtPtr ctxt, int inputchk) {
+ /* stub left for API/ABI compat */
+ return(xmlParseElementChildrenContentDeclPriv(ctxt, inputchk, 1));
+}
+
+/**
+ * xmlParseElementContentDecl:
+ * @ctxt: an XML parser context
+ * @name: the name of the element being defined.
+ * @result: the Element Content pointer will be stored here if any
+ *
+ * parse the declaration for an Element content either Mixed or Children,
+ * the cases EMPTY and ANY are handled directly in xmlParseElementDecl
+ *
+ * [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
+ *
+ * returns: the type of element content XML_ELEMENT_TYPE_xxx
+ */
+
+int
+xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, const xmlChar *name,
+ xmlElementContentPtr *result) {
+
+ xmlElementContentPtr tree = NULL;
+ int inputid = ctxt->input->id;
+ int res;
+
+ *result = NULL;
+
+ if (RAW != '(') {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED,
+ "xmlParseElementContentDecl : %s '(' expected\n", name);
+ return(-1);
+ }
+ NEXT;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ SKIP_BLANKS;
+ if (CMP7(CUR_PTR, '#', 'P', 'C', 'D', 'A', 'T', 'A')) {
+ tree = xmlParseElementMixedContentDecl(ctxt, inputid);
+ res = XML_ELEMENT_TYPE_MIXED;
+ } else {
+ tree = xmlParseElementChildrenContentDeclPriv(ctxt, inputid, 1);
+ res = XML_ELEMENT_TYPE_ELEMENT;
+ }
+ SKIP_BLANKS;
+ *result = tree;
+ return(res);
+}
+
+/**
+ * xmlParseElementDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse an Element declaration.
+ *
+ * [45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
+ *
+ * [ VC: Unique Element Type Declaration ]
+ * No element type may be declared more than once
+ *
+ * Returns the type of the element, or -1 in case of error
+ */
+int
+xmlParseElementDecl(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ int ret = -1;
+ xmlElementContentPtr content = NULL;
+
+ /* GROW; done in the caller */
+ if (CMP9(CUR_PTR, '<', '!', 'E', 'L', 'E', 'M', 'E', 'N', 'T')) {
+ xmlParserInputPtr input = ctxt->input;
+
+ SKIP(9);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after 'ELEMENT'\n");
+ }
+ SKIP_BLANKS;
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseElementDecl: no name for Element\n");
+ return(-1);
+ }
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space required after the element name\n");
+ }
+ SKIP_BLANKS;
+ if (CMP5(CUR_PTR, 'E', 'M', 'P', 'T', 'Y')) {
+ SKIP(5);
+ /*
+ * Element must always be empty.
+ */
+ ret = XML_ELEMENT_TYPE_EMPTY;
+ } else if ((RAW == 'A') && (NXT(1) == 'N') &&
+ (NXT(2) == 'Y')) {
+ SKIP(3);
+ /*
+ * Element is a generic container.
+ */
+ ret = XML_ELEMENT_TYPE_ANY;
+ } else if (RAW == '(') {
+ ret = xmlParseElementContentDecl(ctxt, name, &content);
+ } else {
+ /*
+ * [ WFC: PEs in Internal Subset ] error handling.
+ */
+ if ((RAW == '%') && (ctxt->external == 0) &&
+ (ctxt->inputNr == 1)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_PEREF_IN_INT_SUBSET,
+ "PEReference: forbidden within markup decl in internal subset\n");
+ } else {
+ xmlFatalErrMsg(ctxt, XML_ERR_ELEMCONTENT_NOT_STARTED,
+ "xmlParseElementDecl: 'EMPTY', 'ANY' or '(' expected\n");
+ }
+ return(-1);
+ }
+
+ SKIP_BLANKS;
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+ SKIP_BLANKS;
+
+ if (RAW != '>') {
+ xmlFatalErr(ctxt, XML_ERR_GT_REQUIRED, NULL);
+ if (content != NULL) {
+ xmlFreeDocElementContent(ctxt->myDoc, content);
+ }
+ } else {
+ if (input != ctxt->input) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "Element declaration doesn't start and stop in the same entity\n");
+ }
+
+ NEXT;
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->elementDecl != NULL)) {
+ if (content != NULL)
+ content->parent = NULL;
+ ctxt->sax->elementDecl(ctxt->userData, name, ret,
+ content);
+ if ((content != NULL) && (content->parent == NULL)) {
+ /*
+ * this is a trick: if xmlAddElementDecl is called,
+ * instead of copying the full tree it is plugged directly
+ * if called from the parser. Avoid duplicating the
+ * interfaces or change the API/ABI
+ */
+ xmlFreeDocElementContent(ctxt->myDoc, content);
+ }
+ } else if (content != NULL) {
+ xmlFreeDocElementContent(ctxt->myDoc, content);
+ }
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlParseConditionalSections
+ * @ctxt: an XML parser context
+ *
+ * [61] conditionalSect ::= includeSect | ignoreSect
+ * [62] includeSect ::= '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'
+ * [63] ignoreSect ::= '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'
+ * [64] ignoreSectContents ::= Ignore ('<![' ignoreSectContents ']]>' Ignore)*
+ * [65] Ignore ::= Char* - (Char* ('<![' | ']]>') Char*)
+ */
+
+static void
+xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
+ int id = ctxt->input->id;
+
+ SKIP(3);
+ SKIP_BLANKS;
+ if (CMP7(CUR_PTR, 'I', 'N', 'C', 'L', 'U', 'D', 'E')) {
+ SKIP(7);
+ SKIP_BLANKS;
+ if (RAW != '[') {
+ xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+ } else {
+ if (ctxt->input->id != id) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "All markup of the conditional section is not in the same entity\n",
+ NULL, NULL);
+ }
+ NEXT;
+ }
+ if (xmlParserDebugEntities) {
+ if ((ctxt->input != NULL) && (ctxt->input->filename))
+ xmlGenericError(xmlGenericErrorContext,
+ "%s(%d): ", ctxt->input->filename,
+ ctxt->input->line);
+ xmlGenericError(xmlGenericErrorContext,
+ "Entering INCLUDE Conditional Section\n");
+ }
+
+ while (((RAW != 0) && ((RAW != ']') || (NXT(1) != ']') ||
+ (NXT(2) != '>'))) && (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *check = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+
+ if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
+ xmlParseConditionalSections(ctxt);
+ } else if (IS_BLANK_CH(CUR)) {
+ NEXT;
+ } else if (RAW == '%') {
+ xmlParsePEReference(ctxt);
+ } else
+ xmlParseMarkupDecl(ctxt);
+
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+
+ if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
+ xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+ break;
+ }
+ }
+ if (xmlParserDebugEntities) {
+ if ((ctxt->input != NULL) && (ctxt->input->filename))
+ xmlGenericError(xmlGenericErrorContext,
+ "%s(%d): ", ctxt->input->filename,
+ ctxt->input->line);
+ xmlGenericError(xmlGenericErrorContext,
+ "Leaving INCLUDE Conditional Section\n");
+ }
+
+ } else if (CMP6(CUR_PTR, 'I', 'G', 'N', 'O', 'R', 'E')) {
+ int state;
+ xmlParserInputState instate;
+ int depth = 0;
+
+ SKIP(6);
+ SKIP_BLANKS;
+ if (RAW != '[') {
+ xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+ } else {
+ if (ctxt->input->id != id) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "All markup of the conditional section is not in the same entity\n",
+ NULL, NULL);
+ }
+ NEXT;
+ }
+ if (xmlParserDebugEntities) {
+ if ((ctxt->input != NULL) && (ctxt->input->filename))
+ xmlGenericError(xmlGenericErrorContext,
+ "%s(%d): ", ctxt->input->filename,
+ ctxt->input->line);
+ xmlGenericError(xmlGenericErrorContext,
+ "Entering IGNORE Conditional Section\n");
+ }
+
+ /*
+ * Parse up to the end of the conditional section
+ * But disable SAX event generating DTD building in the meantime
+ */
+ state = ctxt->disableSAX;
+ instate = ctxt->instate;
+ if (ctxt->recovery == 0) ctxt->disableSAX = 1;
+ ctxt->instate = XML_PARSER_IGNORE;
+
+ while (((depth >= 0) && (RAW != 0)) &&
+ (ctxt->instate != XML_PARSER_EOF)) {
+ if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
+ depth++;
+ SKIP(3);
+ continue;
+ }
+ if ((RAW == ']') && (NXT(1) == ']') && (NXT(2) == '>')) {
+ if (--depth >= 0) SKIP(3);
+ continue;
+ }
+ NEXT;
+ continue;
+ }
+
+ ctxt->disableSAX = state;
+ ctxt->instate = instate;
+
+ if (xmlParserDebugEntities) {
+ if ((ctxt->input != NULL) && (ctxt->input->filename))
+ xmlGenericError(xmlGenericErrorContext,
+ "%s(%d): ", ctxt->input->filename,
+ ctxt->input->line);
+ xmlGenericError(xmlGenericErrorContext,
+ "Leaving IGNORE Conditional Section\n");
+ }
+
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
+ }
+
+ if (RAW == 0)
+ SHRINK;
+
+ if (RAW == 0) {
+ xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL);
+ } else {
+ if (ctxt->input->id != id) {
+ xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
+ "All markup of the conditional section is not in the same entity\n",
+ NULL, NULL);
+ }
+ SKIP(3);
+ }
+}
+
+/**
+ * xmlParseMarkupDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse Markup declarations
+ *
+ * [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl |
+ * NotationDecl | PI | Comment
+ *
+ * [ VC: Proper Declaration/PE Nesting ]
+ * Parameter-entity replacement text must be properly nested with
+ * markup declarations. That is to say, if either the first character
+ * or the last character of a markup declaration (markupdecl above) is
+ * contained in the replacement text for a parameter-entity reference,
+ * both must be contained in the same replacement text.
+ *
+ * [ WFC: PEs in Internal Subset ]
+ * In the internal DTD subset, parameter-entity references can occur
+ * only where markup declarations can occur, not within markup declarations.
+ * (This does not apply to references that occur in external parameter
+ * entities or to the external subset.)
+ */
+void
+xmlParseMarkupDecl(xmlParserCtxtPtr ctxt) {
+ GROW;
+ if (CUR == '<') {
+ if (NXT(1) == '!') {
+ switch (NXT(2)) {
+ case 'E':
+ if (NXT(3) == 'L')
+ xmlParseElementDecl(ctxt);
+ else if (NXT(3) == 'N')
+ xmlParseEntityDecl(ctxt);
+ break;
+ case 'A':
+ xmlParseAttributeListDecl(ctxt);
+ break;
+ case 'N':
+ xmlParseNotationDecl(ctxt);
+ break;
+ case '-':
+ xmlParseComment(ctxt);
+ break;
+ default:
+ /* there is an error but it will be detected later */
+ break;
+ }
+ } else if (NXT(1) == '?') {
+ xmlParsePI(ctxt);
+ }
+ }
+ /*
+ * This is only for internal subset. On external entities,
+ * the replacement is done before parsing stage
+ */
+ if ((ctxt->external == 0) && (ctxt->inputNr == 1))
+ xmlParsePEReference(ctxt);
+
+ /*
+ * Conditional sections are allowed from entities included
+ * by PE References in the internal subset.
+ */
+ if ((ctxt->external == 0) && (ctxt->inputNr > 1)) {
+ if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
+ xmlParseConditionalSections(ctxt);
+ }
+ }
+
+ ctxt->instate = XML_PARSER_DTD;
+}
+
+/**
+ * xmlParseTextDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML declaration header for external entities
+ *
+ * [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
+ */
+
+void
+xmlParseTextDecl(xmlParserCtxtPtr ctxt) {
+ xmlChar *version;
+ const xmlChar *encoding;
+
+ /*
+ * We know that '<?xml' is here.
+ */
+ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) {
+ SKIP(5);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_STARTED, NULL);
+ return;
+ }
+
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space needed after '<?xml'\n");
+ }
+ SKIP_BLANKS;
+
+ /*
+ * We may have the VersionInfo here.
+ */
+ version = xmlParseVersionInfo(ctxt);
+ if (version == NULL)
+ version = xmlCharStrdup(XML_DEFAULT_VERSION);
+ else {
+ if (!IS_BLANK_CH(CUR)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Space needed here\n");
+ }
+ }
+ ctxt->input->version = version;
+
+ /*
+ * We must have the encoding declaration
+ */
+ encoding = xmlParseEncodingDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right here
+ */
+ return;
+ }
+ if ((encoding == NULL) && (ctxt->errNo == XML_ERR_OK)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_MISSING_ENCODING,
+ "Missing encoding in text declaration\n");
+ }
+
+ SKIP_BLANKS;
+ if ((RAW == '?') && (NXT(1) == '>')) {
+ SKIP(2);
+ } else if (RAW == '>') {
+ /* Deprecated old WD ... */
+ xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, NULL);
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, NULL);
+ MOVETO_ENDTAG(CUR_PTR);
+ NEXT;
+ }
+}
+
+/**
+ * xmlParseExternalSubset:
+ * @ctxt: an XML parser context
+ * @ExternalID: the external identifier
+ * @SystemID: the system identifier (or URL)
+ *
+ * parse Markup declarations from an external subset
+ *
+ * [30] extSubset ::= textDecl? extSubsetDecl
+ *
+ * [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) *
+ */
+void
+xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
+ const xmlChar *SystemID) {
+ xmlDetectSAX2(ctxt);
+ GROW;
+
+ if ((ctxt->encoding == NULL) &&
+ (ctxt->input->end - ctxt->input->cur >= 4)) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE)
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ if (CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) {
+ xmlParseTextDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right here
+ */
+ ctxt->instate = XML_PARSER_EOF;
+ return;
+ }
+ }
+ if (ctxt->myDoc == NULL) {
+ ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (ctxt->myDoc == NULL) {
+ xmlErrMemory(ctxt, "New Doc failed");
+ return;
+ }
+ ctxt->myDoc->properties = XML_DOC_INTERNAL;
+ }
+ if ((ctxt->myDoc != NULL) && (ctxt->myDoc->intSubset == NULL))
+ xmlCreateIntSubset(ctxt->myDoc, NULL, ExternalID, SystemID);
+
+ ctxt->instate = XML_PARSER_DTD;
+ ctxt->external = 1;
+ while (((RAW == '<') && (NXT(1) == '?')) ||
+ ((RAW == '<') && (NXT(1) == '!')) ||
+ (RAW == '%') || IS_BLANK_CH(CUR)) {
+ const xmlChar *check = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+
+ GROW;
+ if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
+ xmlParseConditionalSections(ctxt);
+ } else if (IS_BLANK_CH(CUR)) {
+ NEXT;
+ } else if (RAW == '%') {
+ xmlParsePEReference(ctxt);
+ } else
+ xmlParseMarkupDecl(ctxt);
+
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+
+ if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
+ xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+ break;
+ }
+ }
+
+ if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXT_SUBSET_NOT_FINISHED, NULL);
+ }
+
+}
+
+/**
+ * xmlParseReference:
+ * @ctxt: an XML parser context
+ *
+ * parse and handle entity references in content, depending on the SAX
+ * interface, this may end-up in a call to character() if this is a
+ * CharRef, a predefined entity, if there is no reference() callback.
+ * or if the parser was asked to switch to that mode.
+ *
+ * [67] Reference ::= EntityRef | CharRef
+ */
+void
+xmlParseReference(xmlParserCtxtPtr ctxt) {
+ xmlEntityPtr ent;
+ xmlChar *val;
+ int was_checked;
+ xmlNodePtr list = NULL;
+ xmlParserErrors ret = XML_ERR_OK;
+
+
+ if (RAW != '&')
+ return;
+
+ /*
+ * Simple case of a CharRef
+ */
+ if (NXT(1) == '#') {
+ int i = 0;
+ xmlChar out[10];
+ int hex = NXT(2);
+ int value = xmlParseCharRef(ctxt);
+
+ if (value == 0)
+ return;
+ if (ctxt->charset != XML_CHAR_ENCODING_UTF8) {
+ /*
+ * So we are using non-UTF-8 buffers
+ * Check that the char fit on 8bits, if not
+ * generate a CharRef.
+ */
+ if (value <= 0xFF) {
+ out[0] = value;
+ out[1] = 0;
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->characters(ctxt->userData, out, 1);
+ } else {
+ if ((hex == 'x') || (hex == 'X'))
+ snprintf((char *)out, sizeof(out), "#x%X", value);
+ else
+ snprintf((char *)out, sizeof(out), "#%d", value);
+ if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->reference(ctxt->userData, out);
+ }
+ } else {
+ /*
+ * Just encode the value in UTF-8
+ */
+ COPY_BUF(0 ,out, i, value);
+ out[i] = 0;
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->characters(ctxt->userData, out, i);
+ }
+ return;
+ }
+
+ /*
+ * We are seeing an entity reference
+ */
+ ent = xmlParseEntityRef(ctxt);
+ if (ent == NULL) return;
+ if (!ctxt->wellFormed)
+ return;
+ was_checked = ent->checked;
+
+ /* special case of predefined entities */
+ if ((ent->name == NULL) ||
+ (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
+ val = ent->content;
+ if (val == NULL) return;
+ /*
+ * inline the entity.
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->characters(ctxt->userData, val, xmlStrlen(val));
+ return;
+ }
+
+ /*
+ * The first reference to the entity trigger a parsing phase
+ * where the ent->children is filled with the result from
+ * the parsing.
+ * Note: external parsed entities will not be loaded, it is not
+ * required for a non-validating parser, unless the parsing option
+ * of validating, or substituting entities were given. Doing so is
+ * far more secure as the parser will only process data coming from
+ * the document entity by default.
+ */
+ if ((ent->checked == 0) &&
+ ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
+ (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
+ unsigned long oldnbent = ctxt->nbentities;
+
+ /*
+ * This is a bit hackish but this seems the best
+ * way to make sure both SAX and DOM entity support
+ * behaves okay.
+ */
+ void *user_data;
+ if (ctxt->userData == ctxt)
+ user_data = NULL;
+ else
+ user_data = ctxt->userData;
+
+ /*
+ * Check that this entity is well formed
+ * 4.3.2: An internal general parsed entity is well-formed
+ * if its replacement text matches the production labeled
+ * content.
+ */
+ if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseBalancedChunkMemoryInternal(ctxt, ent->content,
+ user_data, &list);
+ ctxt->depth--;
+
+ } else if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt, ctxt->sax,
+ user_data, ctxt->depth, ent->URI,
+ ent->ExternalID, &list);
+ ctxt->depth--;
+ } else {
+ ret = XML_ERR_ENTITY_PE_INTERNAL;
+ xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "invalid entity type found\n", NULL);
+ }
+
+ /*
+ * Store the number of entities needing parsing for this entity
+ * content and do checkings
+ */
+ ent->checked = (ctxt->nbentities - oldnbent + 1) * 2;
+ if ((ent->content != NULL) && (xmlStrchr(ent->content, '<')))
+ ent->checked |= 1;
+ if (ret == XML_ERR_ENTITY_LOOP) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ xmlFreeNodeList(list);
+ return;
+ }
+ if (xmlParserEntityCheck(ctxt, 0, ent, 0)) {
+ xmlFreeNodeList(list);
+ return;
+ }
+
+ if ((ret == XML_ERR_OK) && (list != NULL)) {
+ if (((ent->etype == XML_INTERNAL_GENERAL_ENTITY) ||
+ (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY))&&
+ (ent->children == NULL)) {
+ ent->children = list;
+ if (ctxt->replaceEntities) {
+ /*
+ * Prune it directly in the generated document
+ * except for single text nodes.
+ */
+ if (((list->type == XML_TEXT_NODE) &&
+ (list->next == NULL)) ||
+ (ctxt->parseMode == XML_PARSE_READER)) {
+ list->parent = (xmlNodePtr) ent;
+ list = NULL;
+ ent->owner = 1;
+ } else {
+ ent->owner = 0;
+ while (list != NULL) {
+ list->parent = (xmlNodePtr) ctxt->node;
+ list->doc = ctxt->myDoc;
+ if (list->next == NULL)
+ ent->last = list;
+ list = list->next;
+ }
+ list = ent->children;
+#ifdef LIBXML_LEGACY_ENABLED
+ if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
+ xmlAddEntityReference(ent, list, NULL);
+#endif /* LIBXML_LEGACY_ENABLED */
+ }
+ } else {
+ ent->owner = 1;
+ while (list != NULL) {
+ list->parent = (xmlNodePtr) ent;
+ xmlSetTreeDoc(list, ent->doc);
+ if (list->next == NULL)
+ ent->last = list;
+ list = list->next;
+ }
+ }
+ } else {
+ xmlFreeNodeList(list);
+ list = NULL;
+ }
+ } else if ((ret != XML_ERR_OK) &&
+ (ret != XML_WAR_UNDECLARED_ENTITY)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "Entity '%s' failed to parse\n", ent->name);
+ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ } else if (list != NULL) {
+ xmlFreeNodeList(list);
+ list = NULL;
+ }
+ if (ent->checked == 0)
+ ent->checked = 2;
+ } else if (ent->checked != 1) {
+ ctxt->nbentities += ent->checked / 2;
+ }
+
+ /*
+ * Now that the entity content has been gathered
+ * provide it to the application, this can take different forms based
+ * on the parsing modes.
+ */
+ if (ent->children == NULL) {
+ /*
+ * Probably running in SAX mode and the callbacks don't
+ * build the entity content. So unless we already went
+ * though parsing for first checking go though the entity
+ * content to generate callbacks associated to the entity
+ */
+ if (was_checked != 0) {
+ void *user_data;
+ /*
+ * This is a bit hackish but this seems the best
+ * way to make sure both SAX and DOM entity support
+ * behaves okay.
+ */
+ if (ctxt->userData == ctxt)
+ user_data = NULL;
+ else
+ user_data = ctxt->userData;
+
+ if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseBalancedChunkMemoryInternal(ctxt,
+ ent->content, user_data, NULL);
+ ctxt->depth--;
+ } else if (ent->etype ==
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
+ ctxt->depth++;
+ ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt,
+ ctxt->sax, user_data, ctxt->depth,
+ ent->URI, ent->ExternalID, NULL);
+ ctxt->depth--;
+ } else {
+ ret = XML_ERR_ENTITY_PE_INTERNAL;
+ xmlErrMsgStr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "invalid entity type found\n", NULL);
+ }
+ if (ret == XML_ERR_ENTITY_LOOP) {
+ xmlFatalErr(ctxt, XML_ERR_ENTITY_LOOP, NULL);
+ return;
+ }
+ }
+ if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) &&
+ (ctxt->replaceEntities == 0) && (!ctxt->disableSAX)) {
+ /*
+ * Entity reference callback comes second, it's somewhat
+ * superfluous but a compatibility to historical behaviour
+ */
+ ctxt->sax->reference(ctxt->userData, ent->name);
+ }
+ return;
+ }
+
+ /*
+ * If we didn't get any children for the entity being built
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->reference != NULL) &&
+ (ctxt->replaceEntities == 0) && (!ctxt->disableSAX)) {
+ /*
+ * Create a node.
+ */
+ ctxt->sax->reference(ctxt->userData, ent->name);
+ return;
+ }
+
+ if ((ctxt->replaceEntities) || (ent->children == NULL)) {
+ /*
+ * There is a problem on the handling of _private for entities
+ * (bug 155816): Should we copy the content of the field from
+ * the entity (possibly overwriting some value set by the user
+ * when a copy is created), should we leave it alone, or should
+ * we try to take care of different situations? The problem
+ * is exacerbated by the usage of this field by the xmlReader.
+ * To fix this bug, we look at _private on the created node
+ * and, if it's NULL, we copy in whatever was in the entity.
+ * If it's not NULL we leave it alone. This is somewhat of a
+ * hack - maybe we should have further tests to determine
+ * what to do.
+ */
+ if ((ctxt->node != NULL) && (ent->children != NULL)) {
+ /*
+ * Seems we are generating the DOM content, do
+ * a simple tree copy for all references except the first
+ * In the first occurrence list contains the replacement.
+ */
+ if (((list == NULL) && (ent->owner == 0)) ||
+ (ctxt->parseMode == XML_PARSE_READER)) {
+ xmlNodePtr nw = NULL, cur, firstChild = NULL;
+
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+ /*
+ * when operating on a reader, the entities definitions
+ * are always owning the entities subtree.
+ if (ctxt->parseMode == XML_PARSE_READER)
+ ent->owner = 1;
+ */
+
+ cur = ent->children;
+ while (cur != NULL) {
+ nw = xmlDocCopyNode(cur, ctxt->myDoc, 1);
+ if (nw != NULL) {
+ if (nw->_private == NULL)
+ nw->_private = cur->_private;
+ if (firstChild == NULL){
+ firstChild = nw;
+ }
+ nw = xmlAddChild(ctxt->node, nw);
+ }
+ if (cur == ent->last) {
+ /*
+ * needed to detect some strange empty
+ * node cases in the reader tests
+ */
+ if ((ctxt->parseMode == XML_PARSE_READER) &&
+ (nw != NULL) &&
+ (nw->type == XML_ELEMENT_NODE) &&
+ (nw->children == NULL))
+ nw->extra = 1;
+
+ break;
+ }
+ cur = cur->next;
+ }
+#ifdef LIBXML_LEGACY_ENABLED
+ if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
+ xmlAddEntityReference(ent, firstChild, nw);
+#endif /* LIBXML_LEGACY_ENABLED */
+ } else if ((list == NULL) || (ctxt->inputNr > 0)) {
+ xmlNodePtr nw = NULL, cur, next, last,
+ firstChild = NULL;
+
+ /*
+ * We are copying here, make sure there is no abuse
+ */
+ ctxt->sizeentcopy += ent->length + 5;
+ if (xmlParserEntityCheck(ctxt, 0, ent, ctxt->sizeentcopy))
+ return;
+
+ /*
+ * Copy the entity child list and make it the new
+ * entity child list. The goal is to make sure any
+ * ID or REF referenced will be the one from the
+ * document content and not the entity copy.
+ */
+ cur = ent->children;
+ ent->children = NULL;
+ last = ent->last;
+ ent->last = NULL;
+ while (cur != NULL) {
+ next = cur->next;
+ cur->next = NULL;
+ cur->parent = NULL;
+ nw = xmlDocCopyNode(cur, ctxt->myDoc, 1);
+ if (nw != NULL) {
+ if (nw->_private == NULL)
+ nw->_private = cur->_private;
+ if (firstChild == NULL){
+ firstChild = cur;
+ }
+ xmlAddChild((xmlNodePtr) ent, nw);
+ xmlAddChild(ctxt->node, cur);
+ }
+ if (cur == last)
+ break;
+ cur = next;
+ }
+ if (ent->owner == 0)
+ ent->owner = 1;
+#ifdef LIBXML_LEGACY_ENABLED
+ if (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)
+ xmlAddEntityReference(ent, firstChild, nw);
+#endif /* LIBXML_LEGACY_ENABLED */
+ } else {
+ const xmlChar *nbktext;
+
+ /*
+ * the name change is to avoid coalescing of the
+ * node with a possible previous text one which
+ * would make ent->children a dangling pointer
+ */
+ nbktext = xmlDictLookup(ctxt->dict, BAD_CAST "nbktext",
+ -1);
+ if (ent->children->type == XML_TEXT_NODE)
+ ent->children->name = nbktext;
+ if ((ent->last != ent->children) &&
+ (ent->last->type == XML_TEXT_NODE))
+ ent->last->name = nbktext;
+ xmlAddChildList(ctxt->node, ent->children);
+ }
+
+ /*
+ * This is to avoid a nasty side effect, see
+ * characters() in SAX.c
+ */
+ ctxt->nodemem = 0;
+ ctxt->nodelen = 0;
+ return;
+ }
+ }
+}
+
+/**
+ * xmlParseEntityRef:
+ * @ctxt: an XML parser context
+ *
+ * parse ENTITY references declarations
+ *
+ * [68] EntityRef ::= '&' Name ';'
+ *
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an internal DTD
+ * subset which contains no parameter entity references, or a document
+ * with "standalone='yes'", the Name given in the entity reference
+ * must match that in an entity declaration, except that well-formed
+ * documents need not declare any of the following entities: amp, lt,
+ * gt, apos, quot. The declaration of a parameter entity must precede
+ * any reference to it. Similarly, the declaration of a general entity
+ * must precede any reference to it which appears in a default value in an
+ * attribute-list declaration. Note that if entities are declared in the
+ * external subset or in external parameter entities, a non-validating
+ * processor is not obligated to read and process their declarations;
+ * for such documents, the rule that an entity must be declared is a
+ * well-formedness constraint only if standalone='yes'.
+ *
+ * [ WFC: Parsed Entity ]
+ * An entity reference must not contain the name of an unparsed entity
+ *
+ * Returns the xmlEntityPtr if found, or NULL otherwise.
+ */
+xmlEntityPtr
+xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ xmlEntityPtr ent = NULL;
+
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+
+ if (RAW != '&')
+ return(NULL);
+ NEXT;
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseEntityRef: no name\n");
+ return(NULL);
+ }
+ if (RAW != ';') {
+ xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
+ return(NULL);
+ }
+ NEXT;
+
+ /*
+ * Predefined entities override any extra definition
+ */
+ if ((ctxt->options & XML_PARSE_OLDSAX) == 0) {
+ ent = xmlGetPredefinedEntity(name);
+ if (ent != NULL)
+ return(ent);
+ }
+
+ /*
+ * Increase the number of entity references parsed
+ */
+ ctxt->nbentities++;
+
+ /*
+ * Ask first SAX for entity resolution, otherwise try the
+ * entities which may have stored in the parser context.
+ */
+ if (ctxt->sax != NULL) {
+ if (ctxt->sax->getEntity != NULL)
+ ent = ctxt->sax->getEntity(ctxt->userData, name);
+ if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
+ (ctxt->options & XML_PARSE_OLDSAX))
+ ent = xmlGetPredefinedEntity(name);
+ if ((ctxt->wellFormed == 1 ) && (ent == NULL) &&
+ (ctxt->userData==ctxt)) {
+ ent = xmlSAX2GetEntity(ctxt, name);
+ }
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ /*
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an
+ * internal DTD subset which contains no parameter entity
+ * references, or a document with "standalone='yes'", the
+ * Name given in the entity reference must match that in an
+ * entity declaration, except that well-formed documents
+ * need not declare any of the following entities: amp, lt,
+ * gt, apos, quot.
+ * The declaration of a parameter entity must precede any
+ * reference to it.
+ * Similarly, the declaration of a general entity must
+ * precede any reference to it which appears in a default
+ * value in an attribute-list declaration. Note that if
+ * entities are declared in the external subset or in
+ * external parameter entities, a non-validating processor
+ * is not obligated to read and process their declarations;
+ * for such documents, the rule that an entity must be
+ * declared is a well-formedness constraint only if
+ * standalone='yes'.
+ */
+ if (ent == NULL) {
+ if ((ctxt->standalone == 1) ||
+ ((ctxt->hasExternalSubset == 0) &&
+ (ctxt->hasPErefs == 0))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "Entity '%s' not defined\n", name);
+ } else {
+ xmlErrMsgStr(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "Entity '%s' not defined\n", name);
+ if ((ctxt->inSubset == 0) &&
+ (ctxt->sax != NULL) &&
+ (ctxt->sax->reference != NULL)) {
+ ctxt->sax->reference(ctxt->userData, name);
+ }
+ }
+ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ ctxt->valid = 0;
+ }
+
+ /*
+ * [ WFC: Parsed Entity ]
+ * An entity reference must not contain the name of an
+ * unparsed entity
+ */
+ else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNPARSED_ENTITY,
+ "Entity reference to unparsed entity %s\n", name);
+ }
+
+ /*
+ * [ WFC: No External Entity References ]
+ * Attribute values cannot contain direct or indirect
+ * entity references to external entities.
+ */
+ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
+ (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_IS_EXTERNAL,
+ "Attribute references external entity '%s'\n", name);
+ }
+ /*
+ * [ WFC: No < in Attribute Values ]
+ * The replacement text of any entity referred to directly or
+ * indirectly in an attribute value (other than "&lt;") must
+ * not contain a <.
+ */
+ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
+ (ent != NULL) &&
+ (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) {
+ if (((ent->checked & 1) || (ent->checked == 0)) &&
+ (ent->content != NULL) && (xmlStrchr(ent->content, '<'))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
+ "'<' in entity '%s' is not allowed in attributes values\n", name);
+ }
+ }
+
+ /*
+ * Internal check, no parameter entities here ...
+ */
+ else {
+ switch (ent->etype) {
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_IS_PARAMETER,
+ "Attempt to reference the parameter entity '%s'\n",
+ name);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /*
+ * [ WFC: No Recursion ]
+ * A parsed entity must not contain a recursive reference
+ * to itself, either directly or indirectly.
+ * Done somewhere else
+ */
+ return(ent);
+}
+
+/**
+ * xmlParseStringEntityRef:
+ * @ctxt: an XML parser context
+ * @str: a pointer to an index in the string
+ *
+ * parse ENTITY references declarations, but this version parses it from
+ * a string value.
+ *
+ * [68] EntityRef ::= '&' Name ';'
+ *
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an internal DTD
+ * subset which contains no parameter entity references, or a document
+ * with "standalone='yes'", the Name given in the entity reference
+ * must match that in an entity declaration, except that well-formed
+ * documents need not declare any of the following entities: amp, lt,
+ * gt, apos, quot. The declaration of a parameter entity must precede
+ * any reference to it. Similarly, the declaration of a general entity
+ * must precede any reference to it which appears in a default value in an
+ * attribute-list declaration. Note that if entities are declared in the
+ * external subset or in external parameter entities, a non-validating
+ * processor is not obligated to read and process their declarations;
+ * for such documents, the rule that an entity must be declared is a
+ * well-formedness constraint only if standalone='yes'.
+ *
+ * [ WFC: Parsed Entity ]
+ * An entity reference must not contain the name of an unparsed entity
+ *
+ * Returns the xmlEntityPtr if found, or NULL otherwise. The str pointer
+ * is updated to the current location in the string.
+ */
+static xmlEntityPtr
+xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) {
+ xmlChar *name;
+ const xmlChar *ptr;
+ xmlChar cur;
+ xmlEntityPtr ent = NULL;
+
+ if ((str == NULL) || (*str == NULL))
+ return(NULL);
+ ptr = *str;
+ cur = *ptr;
+ if (cur != '&')
+ return(NULL);
+
+ ptr++;
+ name = xmlParseStringName(ctxt, &ptr);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseStringEntityRef: no name\n");
+ *str = ptr;
+ return(NULL);
+ }
+ if (*ptr != ';') {
+ xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
+ xmlFree(name);
+ *str = ptr;
+ return(NULL);
+ }
+ ptr++;
+
+
+ /*
+ * Predefined entities override any extra definition
+ */
+ if ((ctxt->options & XML_PARSE_OLDSAX) == 0) {
+ ent = xmlGetPredefinedEntity(name);
+ if (ent != NULL) {
+ xmlFree(name);
+ *str = ptr;
+ return(ent);
+ }
+ }
+
+ /*
+ * Increate the number of entity references parsed
+ */
+ ctxt->nbentities++;
+
+ /*
+ * Ask first SAX for entity resolution, otherwise try the
+ * entities which may have stored in the parser context.
+ */
+ if (ctxt->sax != NULL) {
+ if (ctxt->sax->getEntity != NULL)
+ ent = ctxt->sax->getEntity(ctxt->userData, name);
+ if ((ent == NULL) && (ctxt->options & XML_PARSE_OLDSAX))
+ ent = xmlGetPredefinedEntity(name);
+ if ((ent == NULL) && (ctxt->userData==ctxt)) {
+ ent = xmlSAX2GetEntity(ctxt, name);
+ }
+ }
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(name);
+ return(NULL);
+ }
+
+ /*
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an
+ * internal DTD subset which contains no parameter entity
+ * references, or a document with "standalone='yes'", the
+ * Name given in the entity reference must match that in an
+ * entity declaration, except that well-formed documents
+ * need not declare any of the following entities: amp, lt,
+ * gt, apos, quot.
+ * The declaration of a parameter entity must precede any
+ * reference to it.
+ * Similarly, the declaration of a general entity must
+ * precede any reference to it which appears in a default
+ * value in an attribute-list declaration. Note that if
+ * entities are declared in the external subset or in
+ * external parameter entities, a non-validating processor
+ * is not obligated to read and process their declarations;
+ * for such documents, the rule that an entity must be
+ * declared is a well-formedness constraint only if
+ * standalone='yes'.
+ */
+ if (ent == NULL) {
+ if ((ctxt->standalone == 1) ||
+ ((ctxt->hasExternalSubset == 0) &&
+ (ctxt->hasPErefs == 0))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "Entity '%s' not defined\n", name);
+ } else {
+ xmlErrMsgStr(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "Entity '%s' not defined\n",
+ name);
+ }
+ xmlParserEntityCheck(ctxt, 0, ent, 0);
+ /* TODO ? check regressions ctxt->valid = 0; */
+ }
+
+ /*
+ * [ WFC: Parsed Entity ]
+ * An entity reference must not contain the name of an
+ * unparsed entity
+ */
+ else if (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNPARSED_ENTITY,
+ "Entity reference to unparsed entity %s\n", name);
+ }
+
+ /*
+ * [ WFC: No External Entity References ]
+ * Attribute values cannot contain direct or indirect
+ * entity references to external entities.
+ */
+ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
+ (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_IS_EXTERNAL,
+ "Attribute references external entity '%s'\n", name);
+ }
+ /*
+ * [ WFC: No < in Attribute Values ]
+ * The replacement text of any entity referred to directly or
+ * indirectly in an attribute value (other than "&lt;") must
+ * not contain a <.
+ */
+ else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
+ (ent != NULL) && (ent->content != NULL) &&
+ (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY) &&
+ (xmlStrchr(ent->content, '<'))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
+ "'<' in entity '%s' is not allowed in attributes values\n",
+ name);
+ }
+
+ /*
+ * Internal check, no parameter entities here ...
+ */
+ else {
+ switch (ent->etype) {
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_IS_PARAMETER,
+ "Attempt to reference the parameter entity '%s'\n",
+ name);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /*
+ * [ WFC: No Recursion ]
+ * A parsed entity must not contain a recursive reference
+ * to itself, either directly or indirectly.
+ * Done somewhere else
+ */
+
+ xmlFree(name);
+ *str = ptr;
+ return(ent);
+}
+
+/**
+ * xmlParsePEReference:
+ * @ctxt: an XML parser context
+ *
+ * parse PEReference declarations
+ * The entity content is handled directly by pushing it's content as
+ * a new input stream.
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * [ WFC: No Recursion ]
+ * A parsed entity must not contain a recursive
+ * reference to itself, either directly or indirectly.
+ *
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an internal DTD
+ * subset which contains no parameter entity references, or a document
+ * with "standalone='yes'", ... ... The declaration of a parameter
+ * entity must precede any reference to it...
+ *
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external parameter entities
+ * with "standalone='no'", ... ... The declaration of a parameter entity
+ * must precede any reference to it...
+ *
+ * [ WFC: In DTD ]
+ * Parameter-entity references may only appear in the DTD.
+ * NOTE: misleading but this is handled.
+ */
+void
+xmlParsePEReference(xmlParserCtxtPtr ctxt)
+{
+ const xmlChar *name;
+ xmlEntityPtr entity = NULL;
+ xmlParserInputPtr input;
+
+ if (RAW != '%')
+ return;
+ NEXT;
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParsePEReference: no name\n");
+ return;
+ }
+ if (RAW != ';') {
+ xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
+ return;
+ }
+
+ NEXT;
+
+ /*
+ * Increate the number of entity references parsed
+ */
+ ctxt->nbentities++;
+
+ /*
+ * Request the entity from SAX
+ */
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->getParameterEntity != NULL))
+ entity = ctxt->sax->getParameterEntity(ctxt->userData, name);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ if (entity == NULL) {
+ /*
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an
+ * internal DTD subset which contains no parameter entity
+ * references, or a document with "standalone='yes'", ...
+ * ... The declaration of a parameter entity must precede
+ * any reference to it...
+ */
+ if ((ctxt->standalone == 1) ||
+ ((ctxt->hasExternalSubset == 0) &&
+ (ctxt->hasPErefs == 0))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n",
+ name);
+ } else {
+ /*
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external
+ * parameter entities with "standalone='no'", ...
+ * ... The declaration of a parameter entity must
+ * precede any reference to it...
+ */
+ xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n",
+ name, NULL);
+ ctxt->valid = 0;
+ }
+ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+ */
+ if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) &&
+ (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) {
+ xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "Internal: %%%s; is not a parameter entity\n",
+ name, NULL);
+ } else if (ctxt->input->free != deallocblankswrapper) {
+ input = xmlNewBlanksWrapperInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+ return;
+ } else {
+ /*
+ * TODO !!!
+ * handle the extra spaces added before and after
+ * c.f. http://www.w3.org/TR/REC-xml#as-PE
+ */
+ input = xmlNewEntityInputStream(ctxt, entity);
+ if (xmlPushInput(ctxt, input) < 0)
+ return;
+ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
+ (CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) &&
+ (IS_BLANK_CH(NXT(5)))) {
+ xmlParseTextDecl(ctxt);
+ if (ctxt->errNo ==
+ XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing
+ * right here
+ */
+ ctxt->instate = XML_PARSER_EOF;
+ return;
+ }
+ }
+ }
+ }
+ ctxt->hasPErefs = 1;
+}
+
+/**
+ * xmlLoadEntityContent:
+ * @ctxt: an XML parser context
+ * @entity: an unloaded system entity
+ *
+ * Load the original content of the given system entity from the
+ * ExternalID/SystemID given. This is to be used for Included in Literal
+ * http://www.w3.org/TR/REC-xml/#inliteral processing of entities references
+ *
+ * Returns 0 in case of success and -1 in case of failure
+ */
+static int
+xmlLoadEntityContent(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
+ xmlParserInputPtr input;
+ xmlBufferPtr buf;
+ int l, c;
+ int count = 0;
+
+ if ((ctxt == NULL) || (entity == NULL) ||
+ ((entity->etype != XML_EXTERNAL_PARAMETER_ENTITY) &&
+ (entity->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY)) ||
+ (entity->content != NULL)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlLoadEntityContent parameter error");
+ return(-1);
+ }
+
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "Reading %s entity content input\n", entity->name);
+
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlLoadEntityContent parameter error");
+ return(-1);
+ }
+
+ input = xmlNewEntityInputStream(ctxt, entity);
+ if (input == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlLoadEntityContent input error");
+ xmlBufferFree(buf);
+ return(-1);
+ }
+
+ /*
+ * Push the entity as the current input, read char by char
+ * saving to the buffer until the end of the entity or an error
+ */
+ if (xmlPushInput(ctxt, input) < 0) {
+ xmlBufferFree(buf);
+ return(-1);
+ }
+
+ GROW;
+ c = CUR_CHAR(l);
+ while ((ctxt->input == input) && (ctxt->input->cur < ctxt->input->end) &&
+ (IS_CHAR(c))) {
+ xmlBufferAdd(buf, ctxt->input->cur, l);
+ if (count++ > XML_PARSER_CHUNK_SIZE) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlBufferFree(buf);
+ return(-1);
+ }
+ }
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ if (c == 0) {
+ count = 0;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlBufferFree(buf);
+ return(-1);
+ }
+ c = CUR_CHAR(l);
+ }
+ }
+
+ if ((ctxt->input == input) && (ctxt->input->cur >= ctxt->input->end)) {
+ xmlPopInput(ctxt);
+ } else if (!IS_CHAR(c)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
+ "xmlLoadEntityContent: invalid char value %d\n",
+ c);
+ xmlBufferFree(buf);
+ return(-1);
+ }
+ entity->content = buf->content;
+ buf->content = NULL;
+ xmlBufferFree(buf);
+
+ return(0);
+}
+
+/**
+ * xmlParseStringPEReference:
+ * @ctxt: an XML parser context
+ * @str: a pointer to an index in the string
+ *
+ * parse PEReference declarations
+ *
+ * [69] PEReference ::= '%' Name ';'
+ *
+ * [ WFC: No Recursion ]
+ * A parsed entity must not contain a recursive
+ * reference to itself, either directly or indirectly.
+ *
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an internal DTD
+ * subset which contains no parameter entity references, or a document
+ * with "standalone='yes'", ... ... The declaration of a parameter
+ * entity must precede any reference to it...
+ *
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external parameter entities
+ * with "standalone='no'", ... ... The declaration of a parameter entity
+ * must precede any reference to it...
+ *
+ * [ WFC: In DTD ]
+ * Parameter-entity references may only appear in the DTD.
+ * NOTE: misleading but this is handled.
+ *
+ * Returns the string of the entity content.
+ * str is updated to the current value of the index
+ */
+static xmlEntityPtr
+xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) {
+ const xmlChar *ptr;
+ xmlChar cur;
+ xmlChar *name;
+ xmlEntityPtr entity = NULL;
+
+ if ((str == NULL) || (*str == NULL)) return(NULL);
+ ptr = *str;
+ cur = *ptr;
+ if (cur != '%')
+ return(NULL);
+ ptr++;
+ name = xmlParseStringName(ctxt, &ptr);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseStringPEReference: no name\n");
+ *str = ptr;
+ return(NULL);
+ }
+ cur = *ptr;
+ if (cur != ';') {
+ xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
+ xmlFree(name);
+ *str = ptr;
+ return(NULL);
+ }
+ ptr++;
+
+ /*
+ * Increate the number of entity references parsed
+ */
+ ctxt->nbentities++;
+
+ /*
+ * Request the entity from SAX
+ */
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->getParameterEntity != NULL))
+ entity = ctxt->sax->getParameterEntity(ctxt->userData, name);
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(name);
+ return(NULL);
+ }
+ if (entity == NULL) {
+ /*
+ * [ WFC: Entity Declared ]
+ * In a document without any DTD, a document with only an
+ * internal DTD subset which contains no parameter entity
+ * references, or a document with "standalone='yes'", ...
+ * ... The declaration of a parameter entity must precede
+ * any reference to it...
+ */
+ if ((ctxt->standalone == 1) ||
+ ((ctxt->hasExternalSubset == 0) && (ctxt->hasPErefs == 0))) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n", name);
+ } else {
+ /*
+ * [ VC: Entity Declared ]
+ * In a document with an external subset or external
+ * parameter entities with "standalone='no'", ...
+ * ... The declaration of a parameter entity must
+ * precede any reference to it...
+ */
+ xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "PEReference: %%%s; not found\n",
+ name, NULL);
+ ctxt->valid = 0;
+ }
+ xmlParserEntityCheck(ctxt, 0, NULL, 0);
+ } else {
+ /*
+ * Internal checking in case the entity quest barfed
+ */
+ if ((entity->etype != XML_INTERNAL_PARAMETER_ENTITY) &&
+ (entity->etype != XML_EXTERNAL_PARAMETER_ENTITY)) {
+ xmlWarningMsg(ctxt, XML_WAR_UNDECLARED_ENTITY,
+ "%%%s; is not a parameter entity\n",
+ name, NULL);
+ }
+ }
+ ctxt->hasPErefs = 1;
+ xmlFree(name);
+ *str = ptr;
+ return(entity);
+}
+
+/**
+ * xmlParseDocTypeDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse a DOCTYPE declaration
+ *
+ * [28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S?
+ * ('[' (markupdecl | PEReference | S)* ']' S?)? '>'
+ *
+ * [ VC: Root Element Type ]
+ * The Name in the document type declaration must match the element
+ * type of the root element.
+ */
+
+void
+xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name = NULL;
+ xmlChar *ExternalID = NULL;
+ xmlChar *URI = NULL;
+
+ /*
+ * We know that '<!DOCTYPE' has been detected.
+ */
+ SKIP(9);
+
+ SKIP_BLANKS;
+
+ /*
+ * Parse the DOCTYPE name.
+ */
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseDocTypeDecl : no DOCTYPE name !\n");
+ }
+ ctxt->intSubName = name;
+
+ SKIP_BLANKS;
+
+ /*
+ * Check for SystemID and ExternalID
+ */
+ URI = xmlParseExternalID(ctxt, &ExternalID, 1);
+
+ if ((URI != NULL) || (ExternalID != NULL)) {
+ ctxt->hasExternalSubset = 1;
+ }
+ ctxt->extSubURI = URI;
+ ctxt->extSubSystem = ExternalID;
+
+ SKIP_BLANKS;
+
+ /*
+ * Create and update the internal subset.
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->internalSubset(ctxt->userData, name, ExternalID, URI);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+
+ /*
+ * Is there any internal subset declarations ?
+ * they are handled separately in xmlParseInternalSubset()
+ */
+ if (RAW == '[')
+ return;
+
+ /*
+ * We should be at the end of the DOCTYPE declaration.
+ */
+ if (RAW != '>') {
+ xmlFatalErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED, NULL);
+ }
+ NEXT;
+}
+
+/**
+ * xmlParseInternalSubset:
+ * @ctxt: an XML parser context
+ *
+ * parse the internal subset declaration
+ *
+ * [28 end] ('[' (markupdecl | PEReference | S)* ']' S?)? '>'
+ */
+
+static void
+xmlParseInternalSubset(xmlParserCtxtPtr ctxt) {
+ /*
+ * Is there any DTD definition ?
+ */
+ if (RAW == '[') {
+ ctxt->instate = XML_PARSER_DTD;
+ NEXT;
+ /*
+ * Parse the succession of Markup declarations and
+ * PEReferences.
+ * Subsequence (markupdecl | PEReference | S)*
+ */
+ while ((RAW != ']') && (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *check = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+
+ SKIP_BLANKS;
+ xmlParseMarkupDecl(ctxt);
+ xmlParsePEReference(ctxt);
+
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+
+ if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlParseInternalSubset: error detected in Markup declaration\n");
+ break;
+ }
+ }
+ if (RAW == ']') {
+ NEXT;
+ SKIP_BLANKS;
+ }
+ }
+
+ /*
+ * We should be at the end of the DOCTYPE declaration.
+ */
+ if (RAW != '>') {
+ xmlFatalErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED, NULL);
+ }
+ NEXT;
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlParseAttribute:
+ * @ctxt: an XML parser context
+ * @value: a xmlChar ** used to store the value of the attribute
+ *
+ * parse an attribute
+ *
+ * [41] Attribute ::= Name Eq AttValue
+ *
+ * [ WFC: No External Entity References ]
+ * Attribute values cannot contain direct or indirect entity references
+ * to external entities.
+ *
+ * [ WFC: No < in Attribute Values ]
+ * The replacement text of any entity referred to directly or indirectly in
+ * an attribute value (other than "&lt;") must not contain a <.
+ *
+ * [ VC: Attribute Value Type ]
+ * The attribute must have been declared; the value must be of the type
+ * declared for it.
+ *
+ * [25] Eq ::= S? '=' S?
+ *
+ * With namespace:
+ *
+ * [NS 11] Attribute ::= QName Eq AttValue
+ *
+ * Also the case QName == xmlns:??? is handled independently as a namespace
+ * definition.
+ *
+ * Returns the attribute name, and the value in *value.
+ */
+
+const xmlChar *
+xmlParseAttribute(xmlParserCtxtPtr ctxt, xmlChar **value) {
+ const xmlChar *name;
+ xmlChar *val;
+
+ *value = NULL;
+ GROW;
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "error parsing attribute name\n");
+ return(NULL);
+ }
+
+ /*
+ * read the value
+ */
+ SKIP_BLANKS;
+ if (RAW == '=') {
+ NEXT;
+ SKIP_BLANKS;
+ val = xmlParseAttValue(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
+ "Specification mandate value for attribute %s\n", name);
+ return(NULL);
+ }
+
+ /*
+ * Check that xml:lang conforms to the specification
+ * No more registered as an error, just generate a warning now
+ * since this was deprecated in XML second edition
+ */
+ if ((ctxt->pedantic) && (xmlStrEqual(name, BAD_CAST "xml:lang"))) {
+ if (!xmlCheckLanguageID(val)) {
+ xmlWarningMsg(ctxt, XML_WAR_LANG_VALUE,
+ "Malformed value for xml:lang : %s\n",
+ val, NULL);
+ }
+ }
+
+ /*
+ * Check that xml:space conforms to the specification
+ */
+ if (xmlStrEqual(name, BAD_CAST "xml:space")) {
+ if (xmlStrEqual(val, BAD_CAST "default"))
+ *(ctxt->space) = 0;
+ else if (xmlStrEqual(val, BAD_CAST "preserve"))
+ *(ctxt->space) = 1;
+ else {
+ xmlWarningMsg(ctxt, XML_WAR_SPACE_VALUE,
+"Invalid value \"%s\" for xml:space : \"default\" or \"preserve\" expected\n",
+ val, NULL);
+ }
+ }
+
+ *value = val;
+ return(name);
+}
+
+/**
+ * xmlParseStartTag:
+ * @ctxt: an XML parser context
+ *
+ * parse a start of tag either for rule element or
+ * EmptyElement. In both case we don't parse the tag closing chars.
+ *
+ * [40] STag ::= '<' Name (S Attribute)* S? '>'
+ *
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same start-tag or
+ * empty-element tag.
+ *
+ * [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
+ *
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same start-tag or
+ * empty-element tag.
+ *
+ * With namespace:
+ *
+ * [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ *
+ * [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
+ *
+ * Returns the element name parsed
+ */
+
+const xmlChar *
+xmlParseStartTag(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ const xmlChar *attname;
+ xmlChar *attvalue;
+ const xmlChar **atts = ctxt->atts;
+ int nbatts = 0;
+ int maxatts = ctxt->maxatts;
+ int i;
+
+ if (RAW != '<') return(NULL);
+ NEXT1;
+
+ name = xmlParseName(ctxt);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "xmlParseStartTag: invalid element name\n");
+ return(NULL);
+ }
+
+ /*
+ * Now parse the attributes, it ends up with the ending
+ *
+ * (S Attribute)* S?
+ */
+ SKIP_BLANKS;
+ GROW;
+
+ while (((RAW != '>') &&
+ ((RAW != '/') || (NXT(1) != '>')) &&
+ (IS_BYTE_CHAR(RAW))) && (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *q = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+
+ attname = xmlParseAttribute(ctxt, &attvalue);
+ if ((attname != NULL) && (attvalue != NULL)) {
+ /*
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same
+ * start-tag or empty-element tag.
+ */
+ for (i = 0; i < nbatts;i += 2) {
+ if (xmlStrEqual(atts[i], attname)) {
+ xmlErrAttributeDup(ctxt, NULL, attname);
+ xmlFree(attvalue);
+ goto failed;
+ }
+ }
+ /*
+ * Add the pair to atts
+ */
+ if (atts == NULL) {
+ maxatts = 22; /* allow for 10 attrs by default */
+ atts = (const xmlChar **)
+ xmlMalloc(maxatts * sizeof(xmlChar *));
+ if (atts == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ ctxt->atts = atts;
+ ctxt->maxatts = maxatts;
+ } else if (nbatts + 4 > maxatts) {
+ const xmlChar **n;
+
+ maxatts *= 2;
+ n = (const xmlChar **) xmlRealloc((void *) atts,
+ maxatts * sizeof(const xmlChar *));
+ if (n == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ atts = n;
+ ctxt->atts = atts;
+ ctxt->maxatts = maxatts;
+ }
+ atts[nbatts++] = attname;
+ atts[nbatts++] = attvalue;
+ atts[nbatts] = NULL;
+ atts[nbatts + 1] = NULL;
+ } else {
+ if (attvalue != NULL)
+ xmlFree(attvalue);
+ }
+
+failed:
+
+ GROW
+ if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
+ break;
+ if (!IS_BLANK_CH(RAW)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "attributes construct error\n");
+ }
+ SKIP_BLANKS;
+ if ((cons == ctxt->input->consumed) && (q == CUR_PTR) &&
+ (attname == NULL) && (attvalue == NULL)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlParseStartTag: problem parsing attributes\n");
+ break;
+ }
+ SHRINK;
+ GROW;
+ }
+
+ /*
+ * SAX: Start of Element !
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElement != NULL) &&
+ (!ctxt->disableSAX)) {
+ if (nbatts > 0)
+ ctxt->sax->startElement(ctxt->userData, name, atts);
+ else
+ ctxt->sax->startElement(ctxt->userData, name, NULL);
+ }
+
+ if (atts != NULL) {
+ /* Free only the content strings */
+ for (i = 1;i < nbatts;i+=2)
+ if (atts[i] != NULL)
+ xmlFree((xmlChar *) atts[i]);
+ }
+ return(name);
+}
+
+/**
+ * xmlParseEndTag1:
+ * @ctxt: an XML parser context
+ * @line: line of the start tag
+ * @nsNr: number of namespaces on the start tag
+ *
+ * parse an end of tag
+ *
+ * [42] ETag ::= '</' Name S? '>'
+ *
+ * With namespace
+ *
+ * [NS 9] ETag ::= '</' QName S? '>'
+ */
+
+static void
+xmlParseEndTag1(xmlParserCtxtPtr ctxt, int line) {
+ const xmlChar *name;
+
+ GROW;
+ if ((RAW != '<') || (NXT(1) != '/')) {
+ xmlFatalErrMsg(ctxt, XML_ERR_LTSLASH_REQUIRED,
+ "xmlParseEndTag: '</' not found\n");
+ return;
+ }
+ SKIP(2);
+
+ name = xmlParseNameAndCompare(ctxt,ctxt->name);
+
+ /*
+ * We should definitely be at the ending "S? '>'" part
+ */
+ GROW;
+ SKIP_BLANKS;
+ if ((!IS_BYTE_CHAR(RAW)) || (RAW != '>')) {
+ xmlFatalErr(ctxt, XML_ERR_GT_REQUIRED, NULL);
+ } else
+ NEXT1;
+
+ /*
+ * [ WFC: Element Type Match ]
+ * The Name in an element's end-tag must match the element type in the
+ * start-tag.
+ *
+ */
+ if (name != (xmlChar*)1) {
+ if (name == NULL) name = BAD_CAST "unparseable";
+ xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Opening and ending tag mismatch: %s line %d and %s\n",
+ ctxt->name, line, name);
+ }
+
+ /*
+ * SAX: End of Tag
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElement(ctxt->userData, ctxt->name);
+
+ namePop(ctxt);
+ spacePop(ctxt);
+ return;
+}
+
+/**
+ * xmlParseEndTag:
+ * @ctxt: an XML parser context
+ *
+ * parse an end of tag
+ *
+ * [42] ETag ::= '</' Name S? '>'
+ *
+ * With namespace
+ *
+ * [NS 9] ETag ::= '</' QName S? '>'
+ */
+
+void
+xmlParseEndTag(xmlParserCtxtPtr ctxt) {
+ xmlParseEndTag1(ctxt, 0);
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/************************************************************************
+ * *
+ * SAX 2 specific operations *
+ * *
+ ************************************************************************/
+
+/*
+ * xmlGetNamespace:
+ * @ctxt: an XML parser context
+ * @prefix: the prefix to lookup
+ *
+ * Lookup the namespace name for the @prefix (which ca be NULL)
+ * The prefix must come from the @ctxt->dict dictionnary
+ *
+ * Returns the namespace name or NULL if not bound
+ */
+static const xmlChar *
+xmlGetNamespace(xmlParserCtxtPtr ctxt, const xmlChar *prefix) {
+ int i;
+
+ if (prefix == ctxt->str_xml) return(ctxt->str_xml_ns);
+ for (i = ctxt->nsNr - 2;i >= 0;i-=2)
+ if (ctxt->nsTab[i] == prefix) {
+ if ((prefix == NULL) && (*ctxt->nsTab[i + 1] == 0))
+ return(NULL);
+ return(ctxt->nsTab[i + 1]);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlParseQName:
+ * @ctxt: an XML parser context
+ * @prefix: pointer to store the prefix part
+ *
+ * parse an XML Namespace QName
+ *
+ * [6] QName ::= (Prefix ':')? LocalPart
+ * [7] Prefix ::= NCName
+ * [8] LocalPart ::= NCName
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static const xmlChar *
+xmlParseQName(xmlParserCtxtPtr ctxt, const xmlChar **prefix) {
+ const xmlChar *l, *p;
+
+ GROW;
+
+ l = xmlParseNCName(ctxt);
+ if (l == NULL) {
+ if (CUR == ':') {
+ l = xmlParseName(ctxt);
+ if (l != NULL) {
+ xmlNsErr(ctxt, XML_NS_ERR_QNAME,
+ "Failed to parse QName '%s'\n", l, NULL, NULL);
+ *prefix = NULL;
+ return(l);
+ }
+ }
+ return(NULL);
+ }
+ if (CUR == ':') {
+ NEXT;
+ p = l;
+ l = xmlParseNCName(ctxt);
+ if (l == NULL) {
+ xmlChar *tmp;
+
+ xmlNsErr(ctxt, XML_NS_ERR_QNAME,
+ "Failed to parse QName '%s:'\n", p, NULL, NULL);
+ l = xmlParseNmtoken(ctxt);
+ if (l == NULL)
+ tmp = xmlBuildQName(BAD_CAST "", p, NULL, 0);
+ else {
+ tmp = xmlBuildQName(l, p, NULL, 0);
+ xmlFree((char *)l);
+ }
+ p = xmlDictLookup(ctxt->dict, tmp, -1);
+ if (tmp != NULL) xmlFree(tmp);
+ *prefix = NULL;
+ return(p);
+ }
+ if (CUR == ':') {
+ xmlChar *tmp;
+
+ xmlNsErr(ctxt, XML_NS_ERR_QNAME,
+ "Failed to parse QName '%s:%s:'\n", p, l, NULL);
+ NEXT;
+ tmp = (xmlChar *) xmlParseName(ctxt);
+ if (tmp != NULL) {
+ tmp = xmlBuildQName(tmp, l, NULL, 0);
+ l = xmlDictLookup(ctxt->dict, tmp, -1);
+ if (tmp != NULL) xmlFree(tmp);
+ *prefix = p;
+ return(l);
+ }
+ tmp = xmlBuildQName(BAD_CAST "", l, NULL, 0);
+ l = xmlDictLookup(ctxt->dict, tmp, -1);
+ if (tmp != NULL) xmlFree(tmp);
+ *prefix = p;
+ return(l);
+ }
+ *prefix = p;
+ } else
+ *prefix = NULL;
+ return(l);
+}
+
+/**
+ * xmlParseQNameAndCompare:
+ * @ctxt: an XML parser context
+ * @name: the localname
+ * @prefix: the prefix, if any.
+ *
+ * parse an XML name and compares for match
+ * (specialized for endtag parsing)
+ *
+ * Returns NULL for an illegal name, (xmlChar*) 1 for success
+ * and the name for mismatch
+ */
+
+static const xmlChar *
+xmlParseQNameAndCompare(xmlParserCtxtPtr ctxt, xmlChar const *name,
+ xmlChar const *prefix) {
+ const xmlChar *cmp;
+ const xmlChar *in;
+ const xmlChar *ret;
+ const xmlChar *prefix2;
+
+ if (prefix == NULL) return(xmlParseNameAndCompare(ctxt, name));
+
+ GROW;
+ in = ctxt->input->cur;
+
+ cmp = prefix;
+ while (*in != 0 && *in == *cmp) {
+ ++in;
+ ++cmp;
+ }
+ if ((*cmp == 0) && (*in == ':')) {
+ in++;
+ cmp = name;
+ while (*in != 0 && *in == *cmp) {
+ ++in;
+ ++cmp;
+ }
+ if (*cmp == 0 && (*in == '>' || IS_BLANK_CH (*in))) {
+ /* success */
+ ctxt->input->cur = in;
+ return((const xmlChar*) 1);
+ }
+ }
+ /*
+ * all strings coms from the dictionary, equality can be done directly
+ */
+ ret = xmlParseQName (ctxt, &prefix2);
+ if ((ret == name) && (prefix == prefix2))
+ return((const xmlChar*) 1);
+ return ret;
+}
+
+/**
+ * xmlParseAttValueInternal:
+ * @ctxt: an XML parser context
+ * @len: attribute len result
+ * @alloc: whether the attribute was reallocated as a new string
+ * @normalize: if 1 then further non-CDATA normalization must be done
+ *
+ * parse a value for an attribute.
+ * NOTE: if no normalization is needed, the routine will return pointers
+ * directly from the data buffer.
+ *
+ * 3.3.3 Attribute-Value Normalization:
+ * Before the value of an attribute is passed to the application or
+ * checked for validity, the XML processor must normalize it as follows:
+ * - a character reference is processed by appending the referenced
+ * character to the attribute value
+ * - an entity reference is processed by recursively processing the
+ * replacement text of the entity
+ * - a whitespace character (#x20, #xD, #xA, #x9) is processed by
+ * appending #x20 to the normalized value, except that only a single
+ * #x20 is appended for a "#xD#xA" sequence that is part of an external
+ * parsed entity or the literal entity value of an internal parsed entity
+ * - other characters are processed by appending them to the normalized value
+ * If the declared value is not CDATA, then the XML processor must further
+ * process the normalized attribute value by discarding any leading and
+ * trailing space (#x20) characters, and by replacing sequences of space
+ * (#x20) characters by a single space (#x20) character.
+ * All attributes for which no declaration has been read should be treated
+ * by a non-validating parser as if declared CDATA.
+ *
+ * Returns the AttValue parsed or NULL. The value has to be freed by the
+ * caller if it was copied, this can be detected by val[*len] == 0.
+ */
+
+static xmlChar *
+xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
+ int normalize)
+{
+ xmlChar limit = 0;
+ const xmlChar *in = NULL, *start, *end, *last;
+ xmlChar *ret = NULL;
+ int line, col;
+
+ GROW;
+ in = (xmlChar *) CUR_PTR;
+ line = ctxt->input->line;
+ col = ctxt->input->col;
+ if (*in != '"' && *in != '\'') {
+ xmlFatalErr(ctxt, XML_ERR_ATTRIBUTE_NOT_STARTED, NULL);
+ return (NULL);
+ }
+ ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE;
+
+ /*
+ * try to handle in this routine the most common case where no
+ * allocation of a new string is required and where content is
+ * pure ASCII.
+ */
+ limit = *in++;
+ col++;
+ end = ctxt->input->end;
+ start = in;
+ if (in >= end) {
+ const xmlChar *oldbase = ctxt->input->base;
+ GROW;
+ if (oldbase != ctxt->input->base) {
+ long delta = ctxt->input->base - oldbase;
+ start = start + delta;
+ in = in + delta;
+ }
+ end = ctxt->input->end;
+ }
+ if (normalize) {
+ /*
+ * Skip any leading spaces
+ */
+ while ((in < end) && (*in != limit) &&
+ ((*in == 0x20) || (*in == 0x9) ||
+ (*in == 0xA) || (*in == 0xD))) {
+ if (*in == 0xA) {
+ line++; col = 1;
+ } else {
+ col++;
+ }
+ in++;
+ start = in;
+ if (in >= end) {
+ const xmlChar *oldbase = ctxt->input->base;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ if (oldbase != ctxt->input->base) {
+ long delta = ctxt->input->base - oldbase;
+ start = start + delta;
+ in = in + delta;
+ }
+ end = ctxt->input->end;
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ }
+ }
+ while ((in < end) && (*in != limit) && (*in >= 0x20) &&
+ (*in <= 0x7f) && (*in != '&') && (*in != '<')) {
+ col++;
+ if ((*in++ == 0x20) && (*in == 0x20)) break;
+ if (in >= end) {
+ const xmlChar *oldbase = ctxt->input->base;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ if (oldbase != ctxt->input->base) {
+ long delta = ctxt->input->base - oldbase;
+ start = start + delta;
+ in = in + delta;
+ }
+ end = ctxt->input->end;
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ }
+ }
+ last = in;
+ /*
+ * skip the trailing blanks
+ */
+ while ((last[-1] == 0x20) && (last > start)) last--;
+ while ((in < end) && (*in != limit) &&
+ ((*in == 0x20) || (*in == 0x9) ||
+ (*in == 0xA) || (*in == 0xD))) {
+ if (*in == 0xA) {
+ line++, col = 1;
+ } else {
+ col++;
+ }
+ in++;
+ if (in >= end) {
+ const xmlChar *oldbase = ctxt->input->base;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ if (oldbase != ctxt->input->base) {
+ long delta = ctxt->input->base - oldbase;
+ start = start + delta;
+ in = in + delta;
+ last = last + delta;
+ }
+ end = ctxt->input->end;
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ }
+ }
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ if (*in != limit) goto need_complex;
+ } else {
+ while ((in < end) && (*in != limit) && (*in >= 0x20) &&
+ (*in <= 0x7f) && (*in != '&') && (*in != '<')) {
+ in++;
+ col++;
+ if (in >= end) {
+ const xmlChar *oldbase = ctxt->input->base;
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(NULL);
+ if (oldbase != ctxt->input->base) {
+ long delta = ctxt->input->base - oldbase;
+ start = start + delta;
+ in = in + delta;
+ }
+ end = ctxt->input->end;
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ }
+ }
+ last = in;
+ if (((in - start) > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_ATTRIBUTE_NOT_FINISHED,
+ "AttValue length too long\n");
+ return(NULL);
+ }
+ if (*in != limit) goto need_complex;
+ }
+ in++;
+ col++;
+ if (len != NULL) {
+ *len = last - start;
+ ret = (xmlChar *) start;
+ } else {
+ if (alloc) *alloc = 1;
+ ret = xmlStrndup(start, last - start);
+ }
+ CUR_PTR = in;
+ ctxt->input->line = line;
+ ctxt->input->col = col;
+ if (alloc) *alloc = 0;
+ return ret;
+need_complex:
+ if (alloc) *alloc = 1;
+ return xmlParseAttValueComplex(ctxt, len, normalize);
+}
+
+/**
+ * xmlParseAttribute2:
+ * @ctxt: an XML parser context
+ * @pref: the element prefix
+ * @elem: the element name
+ * @prefix: a xmlChar ** used to store the value of the attribute prefix
+ * @value: a xmlChar ** used to store the value of the attribute
+ * @len: an int * to save the length of the attribute
+ * @alloc: an int * to indicate if the attribute was allocated
+ *
+ * parse an attribute in the new SAX2 framework.
+ *
+ * Returns the attribute name, and the value in *value, .
+ */
+
+static const xmlChar *
+xmlParseAttribute2(xmlParserCtxtPtr ctxt,
+ const xmlChar * pref, const xmlChar * elem,
+ const xmlChar ** prefix, xmlChar ** value,
+ int *len, int *alloc)
+{
+ const xmlChar *name;
+ xmlChar *val, *internal_val = NULL;
+ int normalize = 0;
+
+ *value = NULL;
+ GROW;
+ name = xmlParseQName(ctxt, prefix);
+ if (name == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "error parsing attribute name\n");
+ return (NULL);
+ }
+
+ /*
+ * get the type if needed
+ */
+ if (ctxt->attsSpecial != NULL) {
+ int type;
+
+ type = (int) (long) xmlHashQLookup2(ctxt->attsSpecial,
+ pref, elem, *prefix, name);
+ if (type != 0)
+ normalize = 1;
+ }
+
+ /*
+ * read the value
+ */
+ SKIP_BLANKS;
+ if (RAW == '=') {
+ NEXT;
+ SKIP_BLANKS;
+ val = xmlParseAttValueInternal(ctxt, len, alloc, normalize);
+ if (normalize) {
+ /*
+ * Sometimes a second normalisation pass for spaces is needed
+ * but that only happens if charrefs or entities refernces
+ * have been used in the attribute value, i.e. the attribute
+ * value have been extracted in an allocated string already.
+ */
+ if (*alloc) {
+ const xmlChar *val2;
+
+ val2 = xmlAttrNormalizeSpace2(ctxt, val, len);
+ if ((val2 != NULL) && (val2 != val)) {
+ xmlFree(val);
+ val = (xmlChar *) val2;
+ }
+ }
+ }
+ ctxt->instate = XML_PARSER_CONTENT;
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_ATTRIBUTE_WITHOUT_VALUE,
+ "Specification mandate value for attribute %s\n",
+ name);
+ return (NULL);
+ }
+
+ if (*prefix == ctxt->str_xml) {
+ /*
+ * Check that xml:lang conforms to the specification
+ * No more registered as an error, just generate a warning now
+ * since this was deprecated in XML second edition
+ */
+ if ((ctxt->pedantic) && (xmlStrEqual(name, BAD_CAST "lang"))) {
+ internal_val = xmlStrndup(val, *len);
+ if (!xmlCheckLanguageID(internal_val)) {
+ xmlWarningMsg(ctxt, XML_WAR_LANG_VALUE,
+ "Malformed value for xml:lang : %s\n",
+ internal_val, NULL);
+ }
+ }
+
+ /*
+ * Check that xml:space conforms to the specification
+ */
+ if (xmlStrEqual(name, BAD_CAST "space")) {
+ internal_val = xmlStrndup(val, *len);
+ if (xmlStrEqual(internal_val, BAD_CAST "default"))
+ *(ctxt->space) = 0;
+ else if (xmlStrEqual(internal_val, BAD_CAST "preserve"))
+ *(ctxt->space) = 1;
+ else {
+ xmlWarningMsg(ctxt, XML_WAR_SPACE_VALUE,
+ "Invalid value \"%s\" for xml:space : \"default\" or \"preserve\" expected\n",
+ internal_val, NULL);
+ }
+ }
+ if (internal_val) {
+ xmlFree(internal_val);
+ }
+ }
+
+ *value = val;
+ return (name);
+}
+/**
+ * xmlParseStartTag2:
+ * @ctxt: an XML parser context
+ *
+ * parse a start of tag either for rule element or
+ * EmptyElement. In both case we don't parse the tag closing chars.
+ * This routine is called when running SAX2 parsing
+ *
+ * [40] STag ::= '<' Name (S Attribute)* S? '>'
+ *
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same start-tag or
+ * empty-element tag.
+ *
+ * [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
+ *
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same start-tag or
+ * empty-element tag.
+ *
+ * With namespace:
+ *
+ * [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ *
+ * [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>'
+ *
+ * Returns the element name parsed
+ */
+
+static const xmlChar *
+xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
+ const xmlChar **URI, int *tlen) {
+ const xmlChar *localname;
+ const xmlChar *prefix;
+ const xmlChar *attname;
+ const xmlChar *aprefix;
+ const xmlChar *nsname;
+ xmlChar *attvalue;
+ const xmlChar **atts = ctxt->atts;
+ int maxatts = ctxt->maxatts;
+ int nratts, nbatts, nbdef;
+ int i, j, nbNs, attval, oldline, oldcol;
+ const xmlChar *base;
+ unsigned long cur;
+ int nsNr = ctxt->nsNr;
+
+ if (RAW != '<') return(NULL);
+ NEXT1;
+
+ /*
+ * NOTE: it is crucial with the SAX2 API to never call SHRINK beyond that
+ * point since the attribute values may be stored as pointers to
+ * the buffer and calling SHRINK would destroy them !
+ * The Shrinking is only possible once the full set of attribute
+ * callbacks have been done.
+ */
+reparse:
+ SHRINK;
+ base = ctxt->input->base;
+ cur = ctxt->input->cur - ctxt->input->base;
+ oldline = ctxt->input->line;
+ oldcol = ctxt->input->col;
+ nbatts = 0;
+ nratts = 0;
+ nbdef = 0;
+ nbNs = 0;
+ attval = 0;
+ /* Forget any namespaces added during an earlier parse of this element. */
+ ctxt->nsNr = nsNr;
+
+ localname = xmlParseQName(ctxt, &prefix);
+ if (localname == NULL) {
+ xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
+ "StartTag: invalid element name\n");
+ return(NULL);
+ }
+ *tlen = ctxt->input->cur - ctxt->input->base - cur;
+
+ /*
+ * Now parse the attributes, it ends up with the ending
+ *
+ * (S Attribute)* S?
+ */
+ SKIP_BLANKS;
+ GROW;
+ if (ctxt->input->base != base) goto base_changed;
+
+ while (((RAW != '>') &&
+ ((RAW != '/') || (NXT(1) != '>')) &&
+ (IS_BYTE_CHAR(RAW))) && (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *q = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+ int len = -1, alloc = 0;
+
+ attname = xmlParseAttribute2(ctxt, prefix, localname,
+ &aprefix, &attvalue, &len, &alloc);
+ if (ctxt->input->base != base) {
+ if ((attvalue != NULL) && (alloc != 0))
+ xmlFree(attvalue);
+ attvalue = NULL;
+ goto base_changed;
+ }
+ if ((attname != NULL) && (attvalue != NULL)) {
+ if (len < 0) len = xmlStrlen(attvalue);
+ if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
+ xmlURIPtr uri;
+
+ if (URL == NULL) {
+ xmlErrMemory(ctxt, "dictionary allocation failure");
+ if ((attvalue != NULL) && (alloc != 0))
+ xmlFree(attvalue);
+ return(NULL);
+ }
+ if (*URL != 0) {
+ uri = xmlParseURI((const char *) URL);
+ if (uri == NULL) {
+ xmlNsErr(ctxt, XML_WAR_NS_URI,
+ "xmlns: '%s' is not a valid URI\n",
+ URL, NULL, NULL);
+ } else {
+ if (uri->scheme == NULL) {
+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
+ "xmlns: URI %s is not absolute\n",
+ URL, NULL, NULL);
+ }
+ xmlFreeURI(uri);
+ }
+ if (URL == ctxt->str_xml_ns) {
+ if (attname != ctxt->str_xml) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "xml namespace URI cannot be the default namespace\n",
+ NULL, NULL, NULL);
+ }
+ goto skip_default_ns;
+ }
+ if ((len == 29) &&
+ (xmlStrEqual(URL,
+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "reuse of the xmlns namespace name is forbidden\n",
+ NULL, NULL, NULL);
+ goto skip_default_ns;
+ }
+ }
+ /*
+ * check that it's not a defined namespace
+ */
+ for (j = 1;j <= nbNs;j++)
+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
+ break;
+ if (j <= nbNs)
+ xmlErrAttributeDup(ctxt, NULL, attname);
+ else
+ if (nsPush(ctxt, NULL, URL) > 0) nbNs++;
+skip_default_ns:
+ if (alloc != 0) xmlFree(attvalue);
+ if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
+ break;
+ if (!IS_BLANK_CH(RAW)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "attributes construct error\n");
+ break;
+ }
+ SKIP_BLANKS;
+ continue;
+ }
+ if (aprefix == ctxt->str_xmlns) {
+ const xmlChar *URL = xmlDictLookup(ctxt->dict, attvalue, len);
+ xmlURIPtr uri;
+
+ if (attname == ctxt->str_xml) {
+ if (URL != ctxt->str_xml_ns) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "xml namespace prefix mapped to wrong URI\n",
+ NULL, NULL, NULL);
+ }
+ /*
+ * Do not keep a namespace definition node
+ */
+ goto skip_ns;
+ }
+ if (URL == ctxt->str_xml_ns) {
+ if (attname != ctxt->str_xml) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "xml namespace URI mapped to wrong prefix\n",
+ NULL, NULL, NULL);
+ }
+ goto skip_ns;
+ }
+ if (attname == ctxt->str_xmlns) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "redefinition of the xmlns prefix is forbidden\n",
+ NULL, NULL, NULL);
+ goto skip_ns;
+ }
+ if ((len == 29) &&
+ (xmlStrEqual(URL,
+ BAD_CAST "http://www.w3.org/2000/xmlns/"))) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "reuse of the xmlns namespace name is forbidden\n",
+ NULL, NULL, NULL);
+ goto skip_ns;
+ }
+ if ((URL == NULL) || (URL[0] == 0)) {
+ xmlNsErr(ctxt, XML_NS_ERR_XML_NAMESPACE,
+ "xmlns:%s: Empty XML namespace is not allowed\n",
+ attname, NULL, NULL);
+ goto skip_ns;
+ } else {
+ uri = xmlParseURI((const char *) URL);
+ if (uri == NULL) {
+ xmlNsErr(ctxt, XML_WAR_NS_URI,
+ "xmlns:%s: '%s' is not a valid URI\n",
+ attname, URL, NULL);
+ } else {
+ if ((ctxt->pedantic) && (uri->scheme == NULL)) {
+ xmlNsWarn(ctxt, XML_WAR_NS_URI_RELATIVE,
+ "xmlns:%s: URI %s is not absolute\n",
+ attname, URL, NULL);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+
+ /*
+ * check that it's not a defined namespace
+ */
+ for (j = 1;j <= nbNs;j++)
+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
+ break;
+ if (j <= nbNs)
+ xmlErrAttributeDup(ctxt, aprefix, attname);
+ else
+ if (nsPush(ctxt, attname, URL) > 0) nbNs++;
+skip_ns:
+ if (alloc != 0) xmlFree(attvalue);
+ if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
+ break;
+ if (!IS_BLANK_CH(RAW)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "attributes construct error\n");
+ break;
+ }
+ SKIP_BLANKS;
+ if (ctxt->input->base != base) goto base_changed;
+ continue;
+ }
+
+ /*
+ * Add the pair to atts
+ */
+ if ((atts == NULL) || (nbatts + 5 > maxatts)) {
+ if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
+ if (attvalue[len] == 0)
+ xmlFree(attvalue);
+ goto failed;
+ }
+ maxatts = ctxt->maxatts;
+ atts = ctxt->atts;
+ }
+ ctxt->attallocs[nratts++] = alloc;
+ atts[nbatts++] = attname;
+ atts[nbatts++] = aprefix;
+ atts[nbatts++] = NULL; /* the URI will be fetched later */
+ atts[nbatts++] = attvalue;
+ attvalue += len;
+ atts[nbatts++] = attvalue;
+ /*
+ * tag if some deallocation is needed
+ */
+ if (alloc != 0) attval = 1;
+ } else {
+ if ((attvalue != NULL) && (attvalue[len] == 0))
+ xmlFree(attvalue);
+ }
+
+failed:
+
+ GROW
+ if (ctxt->instate == XML_PARSER_EOF)
+ break;
+ if (ctxt->input->base != base) goto base_changed;
+ if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
+ break;
+ if (!IS_BLANK_CH(RAW)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "attributes construct error\n");
+ break;
+ }
+ SKIP_BLANKS;
+ if ((cons == ctxt->input->consumed) && (q == CUR_PTR) &&
+ (attname == NULL) && (attvalue == NULL)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlParseStartTag: problem parsing attributes\n");
+ break;
+ }
+ GROW;
+ if (ctxt->input->base != base) goto base_changed;
+ }
+
+ /*
+ * The attributes defaulting
+ */
+ if (ctxt->attsDefault != NULL) {
+ xmlDefAttrsPtr defaults;
+
+ defaults = xmlHashLookup2(ctxt->attsDefault, localname, prefix);
+ if (defaults != NULL) {
+ for (i = 0;i < defaults->nbAttrs;i++) {
+ attname = defaults->values[5 * i];
+ aprefix = defaults->values[5 * i + 1];
+
+ /*
+ * special work for namespaces defaulted defs
+ */
+ if ((attname == ctxt->str_xmlns) && (aprefix == NULL)) {
+ /*
+ * check that it's not a defined namespace
+ */
+ for (j = 1;j <= nbNs;j++)
+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == NULL)
+ break;
+ if (j <= nbNs) continue;
+
+ nsname = xmlGetNamespace(ctxt, NULL);
+ if (nsname != defaults->values[5 * i + 2]) {
+ if (nsPush(ctxt, NULL,
+ defaults->values[5 * i + 2]) > 0)
+ nbNs++;
+ }
+ } else if (aprefix == ctxt->str_xmlns) {
+ /*
+ * check that it's not a defined namespace
+ */
+ for (j = 1;j <= nbNs;j++)
+ if (ctxt->nsTab[ctxt->nsNr - 2 * j] == attname)
+ break;
+ if (j <= nbNs) continue;
+
+ nsname = xmlGetNamespace(ctxt, attname);
+ if (nsname != defaults->values[2]) {
+ if (nsPush(ctxt, attname,
+ defaults->values[5 * i + 2]) > 0)
+ nbNs++;
+ }
+ } else {
+ /*
+ * check that it's not a defined attribute
+ */
+ for (j = 0;j < nbatts;j+=5) {
+ if ((attname == atts[j]) && (aprefix == atts[j+1]))
+ break;
+ }
+ if (j < nbatts) continue;
+
+ if ((atts == NULL) || (nbatts + 5 > maxatts)) {
+ if (xmlCtxtGrowAttrs(ctxt, nbatts + 5) < 0) {
+ return(NULL);
+ }
+ maxatts = ctxt->maxatts;
+ atts = ctxt->atts;
+ }
+ atts[nbatts++] = attname;
+ atts[nbatts++] = aprefix;
+ if (aprefix == NULL)
+ atts[nbatts++] = NULL;
+ else
+ atts[nbatts++] = xmlGetNamespace(ctxt, aprefix);
+ atts[nbatts++] = defaults->values[5 * i + 2];
+ atts[nbatts++] = defaults->values[5 * i + 3];
+ if ((ctxt->standalone == 1) &&
+ (defaults->values[5 * i + 4] != NULL)) {
+ xmlValidityError(ctxt, XML_DTD_STANDALONE_DEFAULTED,
+ "standalone: attribute %s on %s defaulted from external subset\n",
+ attname, localname);
+ }
+ nbdef++;
+ }
+ }
+ }
+ }
+
+ /*
+ * The attributes checkings
+ */
+ for (i = 0; i < nbatts;i += 5) {
+ /*
+ * The default namespace does not apply to attribute names.
+ */
+ if (atts[i + 1] != NULL) {
+ nsname = xmlGetNamespace(ctxt, atts[i + 1]);
+ if (nsname == NULL) {
+ xmlNsErr(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s for %s on %s is not defined\n",
+ atts[i + 1], atts[i], localname);
+ }
+ atts[i + 2] = nsname;
+ } else
+ nsname = NULL;
+ /*
+ * [ WFC: Unique Att Spec ]
+ * No attribute name may appear more than once in the same
+ * start-tag or empty-element tag.
+ * As extended by the Namespace in XML REC.
+ */
+ for (j = 0; j < i;j += 5) {
+ if (atts[i] == atts[j]) {
+ if (atts[i+1] == atts[j+1]) {
+ xmlErrAttributeDup(ctxt, atts[i+1], atts[i]);
+ break;
+ }
+ if ((nsname != NULL) && (atts[j + 2] == nsname)) {
+ xmlNsErr(ctxt, XML_NS_ERR_ATTRIBUTE_REDEFINED,
+ "Namespaced Attribute %s in '%s' redefined\n",
+ atts[i], nsname, NULL);
+ break;
+ }
+ }
+ }
+ }
+
+ nsname = xmlGetNamespace(ctxt, prefix);
+ if ((prefix != NULL) && (nsname == NULL)) {
+ xmlNsErr(ctxt, XML_NS_ERR_UNDEFINED_NAMESPACE,
+ "Namespace prefix %s on %s is not defined\n",
+ prefix, localname, NULL);
+ }
+ *pref = prefix;
+ *URI = nsname;
+
+ /*
+ * SAX: Start of Element !
+ */
+ if ((ctxt->sax != NULL) && (ctxt->sax->startElementNs != NULL) &&
+ (!ctxt->disableSAX)) {
+ if (nbNs > 0)
+ ctxt->sax->startElementNs(ctxt->userData, localname, prefix,
+ nsname, nbNs, &ctxt->nsTab[ctxt->nsNr - 2 * nbNs],
+ nbatts / 5, nbdef, atts);
+ else
+ ctxt->sax->startElementNs(ctxt->userData, localname, prefix,
+ nsname, 0, NULL, nbatts / 5, nbdef, atts);
+ }
+
+ /*
+ * Free up attribute allocated strings if needed
+ */
+ if (attval != 0) {
+ for (i = 3,j = 0; j < nratts;i += 5,j++)
+ if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
+ xmlFree((xmlChar *) atts[i]);
+ }
+
+ return(localname);
+
+base_changed:
+ /*
+ * the attribute strings are valid iif the base didn't changed
+ */
+ if (attval != 0) {
+ for (i = 3,j = 0; j < nratts;i += 5,j++)
+ if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
+ xmlFree((xmlChar *) atts[i]);
+ }
+ ctxt->input->cur = ctxt->input->base + cur;
+ ctxt->input->line = oldline;
+ ctxt->input->col = oldcol;
+ if (ctxt->wellFormed == 1) {
+ goto reparse;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlParseEndTag2:
+ * @ctxt: an XML parser context
+ * @line: line of the start tag
+ * @nsNr: number of namespaces on the start tag
+ *
+ * parse an end of tag
+ *
+ * [42] ETag ::= '</' Name S? '>'
+ *
+ * With namespace
+ *
+ * [NS 9] ETag ::= '</' QName S? '>'
+ */
+
+static void
+xmlParseEndTag2(xmlParserCtxtPtr ctxt, const xmlChar *prefix,
+ const xmlChar *URI, int line, int nsNr, int tlen) {
+ const xmlChar *name;
+
+ GROW;
+ if ((RAW != '<') || (NXT(1) != '/')) {
+ xmlFatalErr(ctxt, XML_ERR_LTSLASH_REQUIRED, NULL);
+ return;
+ }
+ SKIP(2);
+
+ if ((tlen > 0) && (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
+ if (ctxt->input->cur[tlen] == '>') {
+ ctxt->input->cur += tlen + 1;
+ ctxt->input->col += tlen + 1;
+ goto done;
+ }
+ ctxt->input->cur += tlen;
+ ctxt->input->col += tlen;
+ name = (xmlChar*)1;
+ } else {
+ if (prefix == NULL)
+ name = xmlParseNameAndCompare(ctxt, ctxt->name);
+ else
+ name = xmlParseQNameAndCompare(ctxt, ctxt->name, prefix);
+ }
+
+ /*
+ * We should definitely be at the ending "S? '>'" part
+ */
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ SKIP_BLANKS;
+ if ((!IS_BYTE_CHAR(RAW)) || (RAW != '>')) {
+ xmlFatalErr(ctxt, XML_ERR_GT_REQUIRED, NULL);
+ } else
+ NEXT1;
+
+ /*
+ * [ WFC: Element Type Match ]
+ * The Name in an element's end-tag must match the element type in the
+ * start-tag.
+ *
+ */
+ if (name != (xmlChar*)1) {
+ if (name == NULL) name = BAD_CAST "unparseable";
+ if ((line == 0) && (ctxt->node != NULL))
+ line = ctxt->node->line;
+ xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
+ "Opening and ending tag mismatch: %s line %d and %s\n",
+ ctxt->name, line, name);
+ }
+
+ /*
+ * SAX: End of Tag
+ */
+done:
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElementNs != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElementNs(ctxt->userData, ctxt->name, prefix, URI);
+
+ spacePop(ctxt);
+ if (nsNr != 0)
+ nsPop(ctxt, nsNr);
+ return;
+}
+
+/**
+ * xmlParseCDSect:
+ * @ctxt: an XML parser context
+ *
+ * Parse escaped pure raw content.
+ *
+ * [18] CDSect ::= CDStart CData CDEnd
+ *
+ * [19] CDStart ::= '<![CDATA['
+ *
+ * [20] Data ::= (Char* - (Char* ']]>' Char*))
+ *
+ * [21] CDEnd ::= ']]>'
+ */
+void
+xmlParseCDSect(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = XML_PARSER_BUFFER_SIZE;
+ int r, rl;
+ int s, sl;
+ int cur, l;
+ int count = 0;
+
+ /* Check 2.6.0 was NXT(0) not RAW */
+ if (CMP9(CUR_PTR, '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '[')) {
+ SKIP(9);
+ } else
+ return;
+
+ ctxt->instate = XML_PARSER_CDATA_SECTION;
+ r = CUR_CHAR(rl);
+ if (!IS_CHAR(r)) {
+ xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ return;
+ }
+ NEXTL(rl);
+ s = CUR_CHAR(sl);
+ if (!IS_CHAR(s)) {
+ xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
+ ctxt->instate = XML_PARSER_CONTENT;
+ return;
+ }
+ NEXTL(sl);
+ cur = CUR_CHAR(l);
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return;
+ }
+ while (IS_CHAR(cur) &&
+ ((r != ']') || (s != ']') || (cur != '>'))) {
+ if (len + 5 >= size) {
+ xmlChar *tmp;
+
+ if ((size > XML_MAX_TEXT_LENGTH) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_CDATA_NOT_FINISHED,
+ "CData section too big found", NULL);
+ xmlFree (buf);
+ return;
+ }
+ tmp = (xmlChar *) xmlRealloc(buf, size * 2 * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlFree(buf);
+ xmlErrMemory(ctxt, NULL);
+ return;
+ }
+ buf = tmp;
+ size *= 2;
+ }
+ COPY_BUF(rl,buf,len,r);
+ r = s;
+ rl = sl;
+ s = cur;
+ sl = l;
+ count++;
+ if (count > 50) {
+ GROW;
+ if (ctxt->instate == XML_PARSER_EOF) {
+ xmlFree(buf);
+ return;
+ }
+ count = 0;
+ }
+ NEXTL(l);
+ cur = CUR_CHAR(l);
+ }
+ buf[len] = 0;
+ ctxt->instate = XML_PARSER_CONTENT;
+ if (cur != '>') {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_CDATA_NOT_FINISHED,
+ "CData section not finished\n%.50s\n", buf);
+ xmlFree(buf);
+ return;
+ }
+ NEXTL(l);
+
+ /*
+ * OK the buffer is to be consumed as cdata.
+ */
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (ctxt->sax->cdataBlock != NULL)
+ ctxt->sax->cdataBlock(ctxt->userData, buf, len);
+ else if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData, buf, len);
+ }
+ xmlFree(buf);
+}
+
+/**
+ * xmlParseContent:
+ * @ctxt: an XML parser context
+ *
+ * Parse a content:
+ *
+ * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
+ */
+
+void
+xmlParseContent(xmlParserCtxtPtr ctxt) {
+ GROW;
+ while ((RAW != 0) &&
+ ((RAW != '<') || (NXT(1) != '/')) &&
+ (ctxt->instate != XML_PARSER_EOF)) {
+ const xmlChar *test = CUR_PTR;
+ unsigned int cons = ctxt->input->consumed;
+ const xmlChar *cur = ctxt->input->cur;
+
+ /*
+ * First case : a Processing Instruction.
+ */
+ if ((*cur == '<') && (cur[1] == '?')) {
+ xmlParsePI(ctxt);
+ }
+
+ /*
+ * Second case : a CDSection
+ */
+ /* 2.6.0 test was *cur not RAW */
+ else if (CMP9(CUR_PTR, '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '[')) {
+ xmlParseCDSect(ctxt);
+ }
+
+ /*
+ * Third case : a comment
+ */
+ else if ((*cur == '<') && (NXT(1) == '!') &&
+ (NXT(2) == '-') && (NXT(3) == '-')) {
+ xmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ }
+
+ /*
+ * Fourth case : a sub-element.
+ */
+ else if (*cur == '<') {
+ xmlParseElement(ctxt);
+ }
+
+ /*
+ * Fifth case : a reference. If if has not been resolved,
+ * parsing returns it's Name, create the node
+ */
+
+ else if (*cur == '&') {
+ xmlParseReference(ctxt);
+ }
+
+ /*
+ * Last case, text. Note that References are handled directly.
+ */
+ else {
+ xmlParseCharData(ctxt, 0);
+ }
+
+ GROW;
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+ SHRINK;
+
+ if ((cons == ctxt->input->consumed) && (test == CUR_PTR)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n");
+ ctxt->instate = XML_PARSER_EOF;
+ break;
+ }
+ }
+}
+
+/**
+ * xmlParseElement:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML element, this is highly recursive
+ *
+ * [39] element ::= EmptyElemTag | STag content ETag
+ *
+ * [ WFC: Element Type Match ]
+ * The Name in an element's end-tag must match the element type in the
+ * start-tag.
+ *
+ */
+
+void
+xmlParseElement(xmlParserCtxtPtr ctxt) {
+ const xmlChar *name;
+ const xmlChar *prefix = NULL;
+ const xmlChar *URI = NULL;
+ xmlParserNodeInfo node_info;
+ int line, tlen = 0;
+ xmlNodePtr ret;
+ int nsNr = ctxt->nsNr;
+
+ if (((unsigned int) ctxt->nameNr > xmlParserMaxDepth) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErrMsgInt(ctxt, XML_ERR_INTERNAL_ERROR,
+ "Excessive depth in document: %d use XML_PARSE_HUGE option\n",
+ xmlParserMaxDepth);
+ ctxt->instate = XML_PARSER_EOF;
+ return;
+ }
+
+ /* Capture start position */
+ if (ctxt->record_info) {
+ node_info.begin_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.begin_line = ctxt->input->line;
+ }
+
+ if (ctxt->spaceNr == 0)
+ spacePush(ctxt, -1);
+ else if (*ctxt->space == -2)
+ spacePush(ctxt, -1);
+ else
+ spacePush(ctxt, *ctxt->space);
+
+ line = ctxt->input->line;
+#ifdef LIBXML_SAX1_ENABLED
+ if (ctxt->sax2)
+#endif /* LIBXML_SAX1_ENABLED */
+ name = xmlParseStartTag2(ctxt, &prefix, &URI, &tlen);
+#ifdef LIBXML_SAX1_ENABLED
+ else
+ name = xmlParseStartTag(ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ if (name == NULL) {
+ spacePop(ctxt);
+ return;
+ }
+ namePush(ctxt, name);
+ ret = ctxt->node;
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * [ VC: Root Element Type ]
+ * The Name in the document type declaration must match the element
+ * type of the root element.
+ */
+ if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc &&
+ ctxt->node && (ctxt->node == ctxt->myDoc->children))
+ ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * Check for an Empty Element.
+ */
+ if ((RAW == '/') && (NXT(1) == '>')) {
+ SKIP(2);
+ if (ctxt->sax2) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElementNs != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElementNs(ctxt->userData, name, prefix, URI);
+#ifdef LIBXML_SAX1_ENABLED
+ } else {
+ if ((ctxt->sax != NULL) && (ctxt->sax->endElement != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElement(ctxt->userData, name);
+#endif /* LIBXML_SAX1_ENABLED */
+ }
+ namePop(ctxt);
+ spacePop(ctxt);
+ if (nsNr != ctxt->nsNr)
+ nsPop(ctxt, ctxt->nsNr - nsNr);
+ if ( ret != NULL && ctxt->record_info ) {
+ node_info.end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.end_line = ctxt->input->line;
+ node_info.node = ret;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+ return;
+ }
+ if (RAW == '>') {
+ NEXT1;
+ } else {
+ xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_GT_REQUIRED,
+ "Couldn't find end of Start Tag %s line %d\n",
+ name, line, NULL);
+
+ /*
+ * end of parsing of this node.
+ */
+ nodePop(ctxt);
+ namePop(ctxt);
+ spacePop(ctxt);
+ if (nsNr != ctxt->nsNr)
+ nsPop(ctxt, ctxt->nsNr - nsNr);
+
+ /*
+ * Capture end position and add node
+ */
+ if ( ret != NULL && ctxt->record_info ) {
+ node_info.end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.end_line = ctxt->input->line;
+ node_info.node = ret;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+ return;
+ }
+
+ /*
+ * Parse the content of the element:
+ */
+ xmlParseContent(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return;
+ if (!IS_BYTE_CHAR(RAW)) {
+ xmlFatalErrMsgStrIntStr(ctxt, XML_ERR_TAG_NOT_FINISHED,
+ "Premature end of data in tag %s line %d\n",
+ name, line, NULL);
+
+ /*
+ * end of parsing of this node.
+ */
+ nodePop(ctxt);
+ namePop(ctxt);
+ spacePop(ctxt);
+ if (nsNr != ctxt->nsNr)
+ nsPop(ctxt, ctxt->nsNr - nsNr);
+ return;
+ }
+
+ /*
+ * parse the end of tag: '</' should be here.
+ */
+ if (ctxt->sax2) {
+ xmlParseEndTag2(ctxt, prefix, URI, line, ctxt->nsNr - nsNr, tlen);
+ namePop(ctxt);
+ }
+#ifdef LIBXML_SAX1_ENABLED
+ else
+ xmlParseEndTag1(ctxt, line);
+#endif /* LIBXML_SAX1_ENABLED */
+
+ /*
+ * Capture end position and add node
+ */
+ if ( ret != NULL && ctxt->record_info ) {
+ node_info.end_pos = ctxt->input->consumed +
+ (CUR_PTR - ctxt->input->base);
+ node_info.end_line = ctxt->input->line;
+ node_info.node = ret;
+ xmlParserAddNodeInfo(ctxt, &node_info);
+ }
+}
+
+/**
+ * xmlParseVersionNum:
+ * @ctxt: an XML parser context
+ *
+ * parse the XML version value.
+ *
+ * [26] VersionNum ::= '1.' [0-9]+
+ *
+ * In practice allow [0-9].[0-9]+ at that level
+ *
+ * Returns the string giving the XML version number, or NULL
+ */
+xmlChar *
+xmlParseVersionNum(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = 10;
+ xmlChar cur;
+
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ cur = CUR;
+ if (!((cur >= '0') && (cur <= '9'))) {
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf[len++] = cur;
+ NEXT;
+ cur=CUR;
+ if (cur != '.') {
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf[len++] = cur;
+ NEXT;
+ cur=CUR;
+ while ((cur >= '0') && (cur <= '9')) {
+ if (len + 1 >= size) {
+ xmlChar *tmp;
+
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlFree(buf);
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ buf[len++] = cur;
+ NEXT;
+ cur=CUR;
+ }
+ buf[len] = 0;
+ return(buf);
+}
+
+/**
+ * xmlParseVersionInfo:
+ * @ctxt: an XML parser context
+ *
+ * parse the XML version.
+ *
+ * [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
+ *
+ * [25] Eq ::= S? '=' S?
+ *
+ * Returns the version string, e.g. "1.0"
+ */
+
+xmlChar *
+xmlParseVersionInfo(xmlParserCtxtPtr ctxt) {
+ xmlChar *version = NULL;
+
+ if (CMP7(CUR_PTR, 'v', 'e', 'r', 's', 'i', 'o', 'n')) {
+ SKIP(7);
+ SKIP_BLANKS;
+ if (RAW != '=') {
+ xmlFatalErr(ctxt, XML_ERR_EQUAL_REQUIRED, NULL);
+ return(NULL);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ if (RAW == '"') {
+ NEXT;
+ version = xmlParseVersionNum(ctxt);
+ if (RAW != '"') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else if (RAW == '\''){
+ NEXT;
+ version = xmlParseVersionNum(ctxt);
+ if (RAW != '\'') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_STARTED, NULL);
+ }
+ }
+ return(version);
+}
+
+/**
+ * xmlParseEncName:
+ * @ctxt: an XML parser context
+ *
+ * parse the XML encoding name
+ *
+ * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
+ *
+ * Returns the encoding name value or NULL
+ */
+xmlChar *
+xmlParseEncName(xmlParserCtxtPtr ctxt) {
+ xmlChar *buf = NULL;
+ int len = 0;
+ int size = 10;
+ xmlChar cur;
+
+ cur = CUR;
+ if (((cur >= 'a') && (cur <= 'z')) ||
+ ((cur >= 'A') && (cur <= 'Z'))) {
+ buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ return(NULL);
+ }
+
+ buf[len++] = cur;
+ NEXT;
+ cur = CUR;
+ while (((cur >= 'a') && (cur <= 'z')) ||
+ ((cur >= 'A') && (cur <= 'Z')) ||
+ ((cur >= '0') && (cur <= '9')) ||
+ (cur == '.') || (cur == '_') ||
+ (cur == '-')) {
+ if (len + 1 >= size) {
+ xmlChar *tmp;
+
+ size *= 2;
+ tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
+ if (tmp == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFree(buf);
+ return(NULL);
+ }
+ buf = tmp;
+ }
+ buf[len++] = cur;
+ NEXT;
+ cur = CUR;
+ if (cur == 0) {
+ SHRINK;
+ GROW;
+ cur = CUR;
+ }
+ }
+ buf[len] = 0;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_ENCODING_NAME, NULL);
+ }
+ return(buf);
+}
+
+/**
+ * xmlParseEncodingDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse the XML encoding declaration
+ *
+ * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'")
+ *
+ * this setups the conversion filters.
+ *
+ * Returns the encoding value or NULL
+ */
+
+const xmlChar *
+xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
+ xmlChar *encoding = NULL;
+
+ SKIP_BLANKS;
+ if (CMP8(CUR_PTR, 'e', 'n', 'c', 'o', 'd', 'i', 'n', 'g')) {
+ SKIP(8);
+ SKIP_BLANKS;
+ if (RAW != '=') {
+ xmlFatalErr(ctxt, XML_ERR_EQUAL_REQUIRED, NULL);
+ return(NULL);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ if (RAW == '"') {
+ NEXT;
+ encoding = xmlParseEncName(ctxt);
+ if (RAW != '"') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else if (RAW == '\''){
+ NEXT;
+ encoding = xmlParseEncName(ctxt);
+ if (RAW != '\'') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_STARTED, NULL);
+ }
+
+ /*
+ * Non standard parsing, allowing the user to ignore encoding
+ */
+ if (ctxt->options & XML_PARSE_IGNORE_ENC) {
+ xmlFree((xmlChar *) encoding);
+ return(NULL);
+ }
+
+ /*
+ * UTF-16 encoding stwich has already taken place at this stage,
+ * more over the little-endian/big-endian selection is already done
+ */
+ if ((encoding != NULL) &&
+ ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-16")) ||
+ (!xmlStrcasecmp(encoding, BAD_CAST "UTF16")))) {
+ /*
+ * If no encoding was passed to the parser, that we are
+ * using UTF-16 and no decoder is present i.e. the
+ * document is apparently UTF-8 compatible, then raise an
+ * encoding mismatch fatal error
+ */
+ if ((ctxt->encoding == NULL) &&
+ (ctxt->input->buf != NULL) &&
+ (ctxt->input->buf->encoder == NULL)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_INVALID_ENCODING,
+ "Document labelled UTF-16 but has UTF-8 content\n");
+ }
+ if (ctxt->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = encoding;
+ }
+ /*
+ * UTF-8 encoding is handled natively
+ */
+ else if ((encoding != NULL) &&
+ ((!xmlStrcasecmp(encoding, BAD_CAST "UTF-8")) ||
+ (!xmlStrcasecmp(encoding, BAD_CAST "UTF8")))) {
+ if (ctxt->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = encoding;
+ }
+ else if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr handler;
+
+ if (ctxt->input->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->input->encoding);
+ ctxt->input->encoding = encoding;
+
+ handler = xmlFindCharEncodingHandler((const char *) encoding);
+ if (handler != NULL) {
+ xmlSwitchToEncoding(ctxt, handler);
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "Unsupported encoding %s\n", encoding);
+ return(NULL);
+ }
+ }
+ }
+ return(encoding);
+}
+
+/**
+ * xmlParseSDDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse the XML standalone declaration
+ *
+ * [32] SDDecl ::= S 'standalone' Eq
+ * (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"'))
+ *
+ * [ VC: Standalone Document Declaration ]
+ * TODO The standalone document declaration must have the value "no"
+ * if any external markup declarations contain declarations of:
+ * - attributes with default values, if elements to which these
+ * attributes apply appear in the document without specifications
+ * of values for these attributes, or
+ * - entities (other than amp, lt, gt, apos, quot), if references
+ * to those entities appear in the document, or
+ * - attributes with values subject to normalization, where the
+ * attribute appears in the document with a value which will change
+ * as a result of normalization, or
+ * - element types with element content, if white space occurs directly
+ * within any instance of those types.
+ *
+ * Returns:
+ * 1 if standalone="yes"
+ * 0 if standalone="no"
+ * -2 if standalone attribute is missing or invalid
+ * (A standalone value of -2 means that the XML declaration was found,
+ * but no value was specified for the standalone attribute).
+ */
+
+int
+xmlParseSDDecl(xmlParserCtxtPtr ctxt) {
+ int standalone = -2;
+
+ SKIP_BLANKS;
+ if (CMP10(CUR_PTR, 's', 't', 'a', 'n', 'd', 'a', 'l', 'o', 'n', 'e')) {
+ SKIP(10);
+ SKIP_BLANKS;
+ if (RAW != '=') {
+ xmlFatalErr(ctxt, XML_ERR_EQUAL_REQUIRED, NULL);
+ return(standalone);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ if (RAW == '\''){
+ NEXT;
+ if ((RAW == 'n') && (NXT(1) == 'o')) {
+ standalone = 0;
+ SKIP(2);
+ } else if ((RAW == 'y') && (NXT(1) == 'e') &&
+ (NXT(2) == 's')) {
+ standalone = 1;
+ SKIP(3);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_STANDALONE_VALUE, NULL);
+ }
+ if (RAW != '\'') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else if (RAW == '"'){
+ NEXT;
+ if ((RAW == 'n') && (NXT(1) == 'o')) {
+ standalone = 0;
+ SKIP(2);
+ } else if ((RAW == 'y') && (NXT(1) == 'e') &&
+ (NXT(2) == 's')) {
+ standalone = 1;
+ SKIP(3);
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_STANDALONE_VALUE, NULL);
+ }
+ if (RAW != '"') {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_CLOSED, NULL);
+ } else
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_STRING_NOT_STARTED, NULL);
+ }
+ }
+ return(standalone);
+}
+
+/**
+ * xmlParseXMLDecl:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML declaration header
+ *
+ * [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
+ */
+
+void
+xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
+ xmlChar *version;
+
+ /*
+ * This value for standalone indicates that the document has an
+ * XML declaration but it does not have a standalone attribute.
+ * It will be overwritten later if a standalone attribute is found.
+ */
+ ctxt->input->standalone = -2;
+
+ /*
+ * We know that '<?xml' is here.
+ */
+ SKIP(5);
+
+ if (!IS_BLANK_CH(RAW)) {
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
+ "Blank needed after '<?xml'\n");
+ }
+ SKIP_BLANKS;
+
+ /*
+ * We must have the VersionInfo here.
+ */
+ version = xmlParseVersionInfo(ctxt);
+ if (version == NULL) {
+ xmlFatalErr(ctxt, XML_ERR_VERSION_MISSING, NULL);
+ } else {
+ if (!xmlStrEqual(version, (const xmlChar *) XML_DEFAULT_VERSION)) {
+ /*
+ * Changed here for XML-1.0 5th edition
+ */
+ if (ctxt->options & XML_PARSE_OLD10) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNKNOWN_VERSION,
+ "Unsupported version '%s'\n",
+ version);
+ } else {
+ if ((version[0] == '1') && ((version[1] == '.'))) {
+ xmlWarningMsg(ctxt, XML_WAR_UNKNOWN_VERSION,
+ "Unsupported version '%s'\n",
+ version, NULL);
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNKNOWN_VERSION,
+ "Unsupported version '%s'\n",
+ version);
+ }
+ }
+ }
+ if (ctxt->version != NULL)
+ xmlFree((void *) ctxt->version);
+ ctxt->version = version;
+ }
+
+ /*
+ * We may have the encoding declaration
+ */
+ if (!IS_BLANK_CH(RAW)) {
+ if ((RAW == '?') && (NXT(1) == '>')) {
+ SKIP(2);
+ return;
+ }
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, "Blank needed here\n");
+ }
+ xmlParseEncodingDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right here
+ */
+ return;
+ }
+
+ /*
+ * We may have the standalone status.
+ */
+ if ((ctxt->input->encoding != NULL) && (!IS_BLANK_CH(RAW))) {
+ if ((RAW == '?') && (NXT(1) == '>')) {
+ SKIP(2);
+ return;
+ }
+ xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, "Blank needed here\n");
+ }
+
+ /*
+ * We can grow the input buffer freely at that point
+ */
+ GROW;
+
+ SKIP_BLANKS;
+ ctxt->input->standalone = xmlParseSDDecl(ctxt);
+
+ SKIP_BLANKS;
+ if ((RAW == '?') && (NXT(1) == '>')) {
+ SKIP(2);
+ } else if (RAW == '>') {
+ /* Deprecated old WD ... */
+ xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, NULL);
+ NEXT;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_XMLDECL_NOT_FINISHED, NULL);
+ MOVETO_ENDTAG(CUR_PTR);
+ NEXT;
+ }
+}
+
+/**
+ * xmlParseMisc:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML Misc* optional field.
+ *
+ * [27] Misc ::= Comment | PI | S
+ */
+
+void
+xmlParseMisc(xmlParserCtxtPtr ctxt) {
+ while ((ctxt->instate != XML_PARSER_EOF) &&
+ (((RAW == '<') && (NXT(1) == '?')) ||
+ (CMP4(CUR_PTR, '<', '!', '-', '-')) ||
+ IS_BLANK_CH(CUR))) {
+ if ((RAW == '<') && (NXT(1) == '?')) {
+ xmlParsePI(ctxt);
+ } else if (IS_BLANK_CH(CUR)) {
+ NEXT;
+ } else
+ xmlParseComment(ctxt);
+ }
+}
+
+/**
+ * xmlParseDocument:
+ * @ctxt: an XML parser context
+ *
+ * parse an XML document (and build a tree if using the standard SAX
+ * interface).
+ *
+ * [1] document ::= prolog element Misc*
+ *
+ * [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
+ *
+ * Returns 0, -1 in case of error. the parser context is augmented
+ * as a result of the parsing.
+ */
+
+int
+xmlParseDocument(xmlParserCtxtPtr ctxt) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ xmlInitParser();
+
+ if ((ctxt == NULL) || (ctxt->input == NULL))
+ return(-1);
+
+ GROW;
+
+ /*
+ * SAX: detecting the level.
+ */
+ xmlDetectSAX2(ctxt);
+
+ /*
+ * SAX: beginning of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+
+ if ((ctxt->encoding == NULL) &&
+ ((ctxt->input->end - ctxt->input->cur) >= 4)) {
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(&start[0], 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+
+ if (CUR == 0) {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
+ }
+
+ /*
+ * Check for the XMLDecl in the Prolog.
+ * do not GROW here to avoid the detected encoder to decode more
+ * than just the first line, unless the amount of data is really
+ * too small to hold "<?xml version="1.0" encoding="foo"
+ */
+ if ((ctxt->input->end - ctxt->input->cur) < 35) {
+ GROW;
+ }
+ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) {
+
+ /*
+ * Note that we will switch encoding on the fly.
+ */
+ xmlParseXMLDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right here
+ */
+ return(-1);
+ }
+ ctxt->standalone = ctxt->input->standalone;
+ SKIP_BLANKS;
+ } else {
+ ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
+ }
+ if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ if ((ctxt->myDoc != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL) && (ctxt->input->buf->compressed >= 0)) {
+ ctxt->myDoc->compression = ctxt->input->buf->compressed;
+ }
+
+ /*
+ * The Misc part of the Prolog
+ */
+ GROW;
+ xmlParseMisc(ctxt);
+
+ /*
+ * Then possibly doc type declaration(s) and more Misc
+ * (doctypedecl Misc*)?
+ */
+ GROW;
+ if (CMP9(CUR_PTR, '<', '!', 'D', 'O', 'C', 'T', 'Y', 'P', 'E')) {
+
+ ctxt->inSubset = 1;
+ xmlParseDocTypeDecl(ctxt);
+ if (RAW == '[') {
+ ctxt->instate = XML_PARSER_DTD;
+ xmlParseInternalSubset(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ }
+
+ /*
+ * Create and update the external subset.
+ */
+ ctxt->inSubset = 2;
+ if ((ctxt->sax != NULL) && (ctxt->sax->externalSubset != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->externalSubset(ctxt->userData, ctxt->intSubName,
+ ctxt->extSubSystem, ctxt->extSubURI);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ ctxt->inSubset = 0;
+
+ xmlCleanSpecialAttr(ctxt);
+
+ ctxt->instate = XML_PARSER_PROLOG;
+ xmlParseMisc(ctxt);
+ }
+
+ /*
+ * Time to start parsing the tree itself
+ */
+ GROW;
+ if (RAW != '<') {
+ xmlFatalErrMsg(ctxt, XML_ERR_DOCUMENT_EMPTY,
+ "Start tag expected, '<' not found\n");
+ } else {
+ ctxt->instate = XML_PARSER_CONTENT;
+ xmlParseElement(ctxt);
+ ctxt->instate = XML_PARSER_EPILOG;
+
+
+ /*
+ * The Misc part at the end
+ */
+ xmlParseMisc(ctxt);
+
+ if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
+ }
+ ctxt->instate = XML_PARSER_EOF;
+ }
+
+ /*
+ * SAX: end of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+
+ /*
+ * Remove locally kept entity definitions if the tree was not built
+ */
+ if ((ctxt->myDoc != NULL) &&
+ (xmlStrEqual(ctxt->myDoc->version, SAX_COMPAT_MODE))) {
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+
+ if ((ctxt->wellFormed) && (ctxt->myDoc != NULL)) {
+ ctxt->myDoc->properties |= XML_DOC_WELLFORMED;
+ if (ctxt->valid)
+ ctxt->myDoc->properties |= XML_DOC_DTDVALID;
+ if (ctxt->nsWellFormed)
+ ctxt->myDoc->properties |= XML_DOC_NSVALID;
+ if (ctxt->options & XML_PARSE_OLD10)
+ ctxt->myDoc->properties |= XML_DOC_OLD10;
+ }
+ if (! ctxt->wellFormed) {
+ ctxt->valid = 0;
+ return(-1);
+ }
+ return(0);
+}
+
+/**
+ * xmlParseExtParsedEnt:
+ * @ctxt: an XML parser context
+ *
+ * parse a general parsed entity
+ * An external general parsed entity is well-formed if it matches the
+ * production labeled extParsedEnt.
+ *
+ * [78] extParsedEnt ::= TextDecl? content
+ *
+ * Returns 0, -1 in case of error. the parser context is augmented
+ * as a result of the parsing.
+ */
+
+int
+xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ if ((ctxt == NULL) || (ctxt->input == NULL))
+ return(-1);
+
+ xmlDefaultSAXHandlerInit();
+
+ xmlDetectSAX2(ctxt);
+
+ GROW;
+
+ /*
+ * SAX: beginning of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
+
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ if ((ctxt->input->end - ctxt->input->cur) >= 4) {
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+
+ if (CUR == 0) {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
+ }
+
+ /*
+ * Check for the XMLDecl in the Prolog.
+ */
+ GROW;
+ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) {
+
+ /*
+ * Note that we will switch encoding on the fly.
+ */
+ xmlParseXMLDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right here
+ */
+ return(-1);
+ }
+ SKIP_BLANKS;
+ } else {
+ ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
+ }
+ if ((ctxt->sax) && (ctxt->sax->startDocument) && (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+
+ /*
+ * Doing validity checking on chunk doesn't make sense
+ */
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->validate = 0;
+ ctxt->loadsubset = 0;
+ ctxt->depth = 0;
+
+ xmlParseContent(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+
+ /*
+ * SAX: end of the document processing.
+ */
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+
+ if (! ctxt->wellFormed) return(-1);
+ return(0);
+}
+
+#ifdef LIBXML_PUSH_ENABLED
+/************************************************************************
+ * *
+ * Progressive parsing interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlParseLookupSequence:
+ * @ctxt: an XML parser context
+ * @first: the first char to lookup
+ * @next: the next char to lookup or zero
+ * @third: the next char to lookup or zero
+ *
+ * Try to find if a sequence (first, next, third) or just (first next) or
+ * (first) is available in the input stream.
+ * This function has a side effect of (possibly) incrementing ctxt->checkIndex
+ * to avoid rescanning sequences of bytes, it DOES change the state of the
+ * parser, do not use liberally.
+ *
+ * Returns the index to the current parsing point if the full sequence
+ * is available, -1 otherwise.
+ */
+static int
+xmlParseLookupSequence(xmlParserCtxtPtr ctxt, xmlChar first,
+ xmlChar next, xmlChar third) {
+ int base, len;
+ xmlParserInputPtr in;
+ const xmlChar *buf;
+
+ in = ctxt->input;
+ if (in == NULL) return(-1);
+ base = in->cur - in->base;
+ if (base < 0) return(-1);
+ if (ctxt->checkIndex > base)
+ base = ctxt->checkIndex;
+ if (in->buf == NULL) {
+ buf = in->base;
+ len = in->length;
+ } else {
+ buf = xmlBufContent(in->buf->buffer);
+ len = xmlBufUse(in->buf->buffer);
+ }
+ /* take into account the sequence length */
+ if (third) len -= 2;
+ else if (next) len --;
+ for (;base < len;base++) {
+ if (buf[base] == first) {
+ if (third != 0) {
+ if ((buf[base + 1] != next) ||
+ (buf[base + 2] != third)) continue;
+ } else if (next != 0) {
+ if (buf[base + 1] != next) continue;
+ }
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ if (next == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c' found at %d\n",
+ first, base);
+ else if (third == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c%c' found at %d\n",
+ first, next, base);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c%c%c' found at %d\n",
+ first, next, third, base);
+#endif
+ return(base - (in->cur - in->base));
+ }
+ }
+ ctxt->checkIndex = base;
+#ifdef DEBUG_PUSH
+ if (next == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c' failed\n", first);
+ else if (third == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c%c' failed\n", first, next);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup '%c%c%c' failed\n", first, next, third);
+#endif
+ return(-1);
+}
+
+/**
+ * xmlParseGetLasts:
+ * @ctxt: an XML parser context
+ * @lastlt: pointer to store the last '<' from the input
+ * @lastgt: pointer to store the last '>' from the input
+ *
+ * Lookup the last < and > in the current chunk
+ */
+static void
+xmlParseGetLasts(xmlParserCtxtPtr ctxt, const xmlChar **lastlt,
+ const xmlChar **lastgt) {
+ const xmlChar *tmp;
+
+ if ((ctxt == NULL) || (lastlt == NULL) || (lastgt == NULL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Internal error: xmlParseGetLasts\n");
+ return;
+ }
+ if ((ctxt->progressive != 0) && (ctxt->inputNr == 1)) {
+ tmp = ctxt->input->end;
+ tmp--;
+ while ((tmp >= ctxt->input->base) && (*tmp != '<')) tmp--;
+ if (tmp < ctxt->input->base) {
+ *lastlt = NULL;
+ *lastgt = NULL;
+ } else {
+ *lastlt = tmp;
+ tmp++;
+ while ((tmp < ctxt->input->end) && (*tmp != '>')) {
+ if (*tmp == '\'') {
+ tmp++;
+ while ((tmp < ctxt->input->end) && (*tmp != '\'')) tmp++;
+ if (tmp < ctxt->input->end) tmp++;
+ } else if (*tmp == '"') {
+ tmp++;
+ while ((tmp < ctxt->input->end) && (*tmp != '"')) tmp++;
+ if (tmp < ctxt->input->end) tmp++;
+ } else
+ tmp++;
+ }
+ if (tmp < ctxt->input->end)
+ *lastgt = tmp;
+ else {
+ tmp = *lastlt;
+ tmp--;
+ while ((tmp >= ctxt->input->base) && (*tmp != '>')) tmp--;
+ if (tmp >= ctxt->input->base)
+ *lastgt = tmp;
+ else
+ *lastgt = NULL;
+ }
+ }
+ } else {
+ *lastlt = NULL;
+ *lastgt = NULL;
+ }
+}
+/**
+ * xmlCheckCdataPush:
+ * @cur: pointer to the bock of characters
+ * @len: length of the block in bytes
+ *
+ * Check that the block of characters is okay as SCdata content [20]
+ *
+ * Returns the number of bytes to pass if okay, a negative index where an
+ * UTF-8 error occured otherwise
+ */
+static int
+xmlCheckCdataPush(const xmlChar *utf, int len) {
+ int ix;
+ unsigned char c;
+ int codepoint;
+
+ if ((utf == NULL) || (len <= 0))
+ return(0);
+
+ for (ix = 0; ix < len;) { /* string is 0-terminated */
+ c = utf[ix];
+ if ((c & 0x80) == 0x00) { /* 1-byte code, starts with 10 */
+ if (c >= 0x20)
+ ix++;
+ else if ((c == 0xA) || (c == 0xD) || (c == 0x9))
+ ix++;
+ else
+ return(-ix);
+ } else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */
+ if (ix + 2 > len) return(ix);
+ if ((utf[ix+1] & 0xc0 ) != 0x80)
+ return(-ix);
+ codepoint = (utf[ix] & 0x1f) << 6;
+ codepoint |= utf[ix+1] & 0x3f;
+ if (!xmlIsCharQ(codepoint))
+ return(-ix);
+ ix += 2;
+ } else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */
+ if (ix + 3 > len) return(ix);
+ if (((utf[ix+1] & 0xc0) != 0x80) ||
+ ((utf[ix+2] & 0xc0) != 0x80))
+ return(-ix);
+ codepoint = (utf[ix] & 0xf) << 12;
+ codepoint |= (utf[ix+1] & 0x3f) << 6;
+ codepoint |= utf[ix+2] & 0x3f;
+ if (!xmlIsCharQ(codepoint))
+ return(-ix);
+ ix += 3;
+ } else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */
+ if (ix + 4 > len) return(ix);
+ if (((utf[ix+1] & 0xc0) != 0x80) ||
+ ((utf[ix+2] & 0xc0) != 0x80) ||
+ ((utf[ix+3] & 0xc0) != 0x80))
+ return(-ix);
+ codepoint = (utf[ix] & 0x7) << 18;
+ codepoint |= (utf[ix+1] & 0x3f) << 12;
+ codepoint |= (utf[ix+2] & 0x3f) << 6;
+ codepoint |= utf[ix+3] & 0x3f;
+ if (!xmlIsCharQ(codepoint))
+ return(-ix);
+ ix += 4;
+ } else /* unknown encoding */
+ return(-ix);
+ }
+ return(ix);
+}
+
+/**
+ * xmlParseTryOrFinish:
+ * @ctxt: an XML parser context
+ * @terminate: last chunk indicator
+ *
+ * Try to progress on parsing
+ *
+ * Returns zero if no parsing was possible
+ */
+static int
+xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
+ int ret = 0;
+ int avail, tlen;
+ xmlChar cur, next;
+ const xmlChar *lastlt, *lastgt;
+
+ if (ctxt->input == NULL)
+ return(0);
+
+#ifdef DEBUG_PUSH
+ switch (ctxt->instate) {
+ case XML_PARSER_EOF:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try EOF\n"); break;
+ case XML_PARSER_START:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try START\n"); break;
+ case XML_PARSER_MISC:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try MISC\n");break;
+ case XML_PARSER_COMMENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try COMMENT\n");break;
+ case XML_PARSER_PROLOG:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try PROLOG\n");break;
+ case XML_PARSER_START_TAG:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try START_TAG\n");break;
+ case XML_PARSER_CONTENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try CONTENT\n");break;
+ case XML_PARSER_CDATA_SECTION:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try CDATA_SECTION\n");break;
+ case XML_PARSER_END_TAG:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try END_TAG\n");break;
+ case XML_PARSER_ENTITY_DECL:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try ENTITY_DECL\n");break;
+ case XML_PARSER_ENTITY_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try ENTITY_VALUE\n");break;
+ case XML_PARSER_ATTRIBUTE_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try ATTRIBUTE_VALUE\n");break;
+ case XML_PARSER_DTD:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try DTD\n");break;
+ case XML_PARSER_EPILOG:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try EPILOG\n");break;
+ case XML_PARSER_PI:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try PI\n");break;
+ case XML_PARSER_IGNORE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: try IGNORE\n");break;
+ }
+#endif
+
+ if ((ctxt->input != NULL) &&
+ (ctxt->input->cur - ctxt->input->base > 4096)) {
+ xmlSHRINK(ctxt);
+ ctxt->checkIndex = 0;
+ }
+ xmlParseGetLasts(ctxt, &lastlt, &lastgt);
+
+ while (ctxt->instate != XML_PARSER_EOF) {
+ if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+ return(0);
+
+
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+
+ if (ctxt->input == NULL) break;
+ if (ctxt->input->buf == NULL)
+ avail = ctxt->input->length -
+ (ctxt->input->cur - ctxt->input->base);
+ else {
+ /*
+ * If we are operating on converted input, try to flush
+ * remainng chars to avoid them stalling in the non-converted
+ * buffer. But do not do this in document start where
+ * encoding="..." may not have been read and we work on a
+ * guessed encoding.
+ */
+ if ((ctxt->instate != XML_PARSER_START) &&
+ (ctxt->input->buf->raw != NULL) &&
+ (xmlBufIsEmpty(ctxt->input->buf->raw) == 0)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer,
+ ctxt->input);
+ size_t current = ctxt->input->cur - ctxt->input->base;
+
+ xmlParserInputBufferPush(ctxt->input->buf, 0, "");
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input,
+ base, current);
+ }
+ avail = xmlBufUse(ctxt->input->buf->buffer) -
+ (ctxt->input->cur - ctxt->input->base);
+ }
+ if (avail < 1)
+ goto done;
+ switch (ctxt->instate) {
+ case XML_PARSER_EOF:
+ /*
+ * Document parsing is done !
+ */
+ goto done;
+ case XML_PARSER_START:
+ if (ctxt->charset == XML_CHAR_ENCODING_NONE) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ /*
+ * Very first chars read from the document flow.
+ */
+ if (avail < 4)
+ goto done;
+
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines,
+ * else xmlSwitchEncoding will set to (default)
+ * UTF8.
+ */
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ xmlSwitchEncoding(ctxt, enc);
+ break;
+ }
+
+ if (avail < 2)
+ goto done;
+ cur = ctxt->input->cur[0];
+ next = ctxt->input->cur[1];
+ if (cur == 0) {
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData,
+ &xmlDefaultSAXLocator);
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
+ ctxt->instate = XML_PARSER_EOF;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering EOF\n");
+#endif
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ goto done;
+ }
+ if ((cur == '<') && (next == '?')) {
+ /* PI or XML decl */
+ if (avail < 5) return(ret);
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0))
+ return(ret);
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData,
+ &xmlDefaultSAXLocator);
+ if ((ctxt->input->cur[2] == 'x') &&
+ (ctxt->input->cur[3] == 'm') &&
+ (ctxt->input->cur[4] == 'l') &&
+ (IS_BLANK_CH(ctxt->input->cur[5]))) {
+ ret += 5;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing XML Decl\n");
+#endif
+ xmlParseXMLDecl(ctxt);
+ if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
+ /*
+ * The XML REC instructs us to stop parsing right
+ * here
+ */
+ ctxt->instate = XML_PARSER_EOF;
+ return(0);
+ }
+ ctxt->standalone = ctxt->input->standalone;
+ if ((ctxt->encoding == NULL) &&
+ (ctxt->input->encoding != NULL))
+ ctxt->encoding = xmlStrdup(ctxt->input->encoding);
+ if ((ctxt->sax) && (ctxt->sax->startDocument) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+ ctxt->instate = XML_PARSER_MISC;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering MISC\n");
+#endif
+ } else {
+ ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
+ if ((ctxt->sax) && (ctxt->sax->startDocument) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+ ctxt->instate = XML_PARSER_MISC;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering MISC\n");
+#endif
+ }
+ } else {
+ if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
+ ctxt->sax->setDocumentLocator(ctxt->userData,
+ &xmlDefaultSAXLocator);
+ ctxt->version = xmlCharStrdup(XML_DEFAULT_VERSION);
+ if (ctxt->version == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ break;
+ }
+ if ((ctxt->sax) && (ctxt->sax->startDocument) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->startDocument(ctxt->userData);
+ ctxt->instate = XML_PARSER_MISC;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering MISC\n");
+#endif
+ }
+ break;
+ case XML_PARSER_START_TAG: {
+ const xmlChar *name;
+ const xmlChar *prefix = NULL;
+ const xmlChar *URI = NULL;
+ int nsNr = ctxt->nsNr;
+
+ if ((avail < 2) && (ctxt->inputNr == 1))
+ goto done;
+ cur = ctxt->input->cur[0];
+ if (cur != '<') {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
+ ctxt->instate = XML_PARSER_EOF;
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ goto done;
+ }
+ if (!terminate) {
+ if (ctxt->progressive) {
+ /* > can be found unescaped in attribute values */
+ if ((lastgt == NULL) || (ctxt->input->cur >= lastgt))
+ goto done;
+ } else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) {
+ goto done;
+ }
+ }
+ if (ctxt->spaceNr == 0)
+ spacePush(ctxt, -1);
+ else if (*ctxt->space == -2)
+ spacePush(ctxt, -1);
+ else
+ spacePush(ctxt, *ctxt->space);
+#ifdef LIBXML_SAX1_ENABLED
+ if (ctxt->sax2)
+#endif /* LIBXML_SAX1_ENABLED */
+ name = xmlParseStartTag2(ctxt, &prefix, &URI, &tlen);
+#ifdef LIBXML_SAX1_ENABLED
+ else
+ name = xmlParseStartTag(ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ if (name == NULL) {
+ spacePop(ctxt);
+ ctxt->instate = XML_PARSER_EOF;
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ goto done;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * [ VC: Root Element Type ]
+ * The Name in the document type declaration must match
+ * the element type of the root element.
+ */
+ if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc &&
+ ctxt->node && (ctxt->node == ctxt->myDoc->children))
+ ctxt->valid &= xmlValidateRoot(&ctxt->vctxt, ctxt->myDoc);
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * Check for an Empty Element.
+ */
+ if ((RAW == '/') && (NXT(1) == '>')) {
+ SKIP(2);
+
+ if (ctxt->sax2) {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->endElementNs != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElementNs(ctxt->userData, name,
+ prefix, URI);
+ if (ctxt->nsNr - nsNr > 0)
+ nsPop(ctxt, ctxt->nsNr - nsNr);
+#ifdef LIBXML_SAX1_ENABLED
+ } else {
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax->endElement != NULL) &&
+ (!ctxt->disableSAX))
+ ctxt->sax->endElement(ctxt->userData, name);
+#endif /* LIBXML_SAX1_ENABLED */
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ spacePop(ctxt);
+ if (ctxt->nameNr == 0) {
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else {
+ ctxt->instate = XML_PARSER_CONTENT;
+ }
+ ctxt->progressive = 1;
+ break;
+ }
+ if (RAW == '>') {
+ NEXT;
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_GT_REQUIRED,
+ "Couldn't find end of Start Tag %s\n",
+ name);
+ nodePop(ctxt);
+ spacePop(ctxt);
+ }
+ if (ctxt->sax2)
+ nameNsPush(ctxt, name, prefix, URI, ctxt->nsNr - nsNr);
+#ifdef LIBXML_SAX1_ENABLED
+ else
+ namePush(ctxt, name);
+#endif /* LIBXML_SAX1_ENABLED */
+
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->progressive = 1;
+ break;
+ }
+ case XML_PARSER_CONTENT: {
+ const xmlChar *test;
+ unsigned int cons;
+ if ((avail < 2) && (ctxt->inputNr == 1))
+ goto done;
+ cur = ctxt->input->cur[0];
+ next = ctxt->input->cur[1];
+
+ test = CUR_PTR;
+ cons = ctxt->input->consumed;
+ if ((cur == '<') && (next == '/')) {
+ ctxt->instate = XML_PARSER_END_TAG;
+ break;
+ } else if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
+ ctxt->progressive = XML_PARSER_PI;
+ goto done;
+ }
+ xmlParsePI(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (next != '!')) {
+ ctxt->instate = XML_PARSER_START_TAG;
+ break;
+ } else if ((cur == '<') && (next == '!') &&
+ (ctxt->input->cur[2] == '-') &&
+ (ctxt->input->cur[3] == '-')) {
+ int term;
+
+ if (avail < 4)
+ goto done;
+ ctxt->input->cur += 4;
+ term = xmlParseLookupSequence(ctxt, '-', '-', '>');
+ ctxt->input->cur -= 4;
+ if ((!terminate) && (term < 0)) {
+ ctxt->progressive = XML_PARSER_COMMENT;
+ goto done;
+ }
+ xmlParseComment(ctxt);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (ctxt->input->cur[1] == '!') &&
+ (ctxt->input->cur[2] == '[') &&
+ (ctxt->input->cur[3] == 'C') &&
+ (ctxt->input->cur[4] == 'D') &&
+ (ctxt->input->cur[5] == 'A') &&
+ (ctxt->input->cur[6] == 'T') &&
+ (ctxt->input->cur[7] == 'A') &&
+ (ctxt->input->cur[8] == '[')) {
+ SKIP(9);
+ ctxt->instate = XML_PARSER_CDATA_SECTION;
+ break;
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 9)) {
+ goto done;
+ } else if (cur == '&') {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, ';', 0, 0) < 0))
+ goto done;
+ xmlParseReference(ctxt);
+ } else {
+ /* TODO Avoid the extra copy, handle directly !!! */
+ /*
+ * Goal of the following test is:
+ * - minimize calls to the SAX 'character' callback
+ * when they are mergeable
+ * - handle an problem for isBlank when we only parse
+ * a sequence of blank chars and the next one is
+ * not available to check against '<' presence.
+ * - tries to homogenize the differences in SAX
+ * callbacks between the push and pull versions
+ * of the parser.
+ */
+ if ((ctxt->inputNr == 1) &&
+ (avail < XML_PARSER_BIG_BUFFER_SIZE)) {
+ if (!terminate) {
+ if (ctxt->progressive) {
+ if ((lastlt == NULL) ||
+ (ctxt->input->cur > lastlt))
+ goto done;
+ } else if (xmlParseLookupSequence(ctxt,
+ '<', 0, 0) < 0) {
+ goto done;
+ }
+ }
+ }
+ ctxt->checkIndex = 0;
+ xmlParseCharData(ctxt, 0);
+ }
+ /*
+ * Pop-up of finished entities.
+ */
+ while ((RAW == 0) && (ctxt->inputNr > 1))
+ xmlPopInput(ctxt);
+ if ((cons == ctxt->input->consumed) && (test == CUR_PTR)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
+ "detected an error in element content\n");
+ ctxt->instate = XML_PARSER_EOF;
+ break;
+ }
+ break;
+ }
+ case XML_PARSER_END_TAG:
+ if (avail < 2)
+ goto done;
+ if (!terminate) {
+ if (ctxt->progressive) {
+ /* > can be found unescaped in attribute values */
+ if ((lastgt == NULL) || (ctxt->input->cur >= lastgt))
+ goto done;
+ } else if (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0) {
+ goto done;
+ }
+ }
+ if (ctxt->sax2) {
+ xmlParseEndTag2(ctxt,
+ (void *) ctxt->pushTab[ctxt->nameNr * 3 - 3],
+ (void *) ctxt->pushTab[ctxt->nameNr * 3 - 2], 0,
+ (int) (long) ctxt->pushTab[ctxt->nameNr * 3 - 1], 0);
+ nameNsPop(ctxt);
+ }
+#ifdef LIBXML_SAX1_ENABLED
+ else
+ xmlParseEndTag1(ctxt, 0);
+#endif /* LIBXML_SAX1_ENABLED */
+ if (ctxt->instate == XML_PARSER_EOF) {
+ /* Nothing */
+ } else if (ctxt->nameNr == 0) {
+ ctxt->instate = XML_PARSER_EPILOG;
+ } else {
+ ctxt->instate = XML_PARSER_CONTENT;
+ }
+ break;
+ case XML_PARSER_CDATA_SECTION: {
+ /*
+ * The Push mode need to have the SAX callback for
+ * cdataBlock merge back contiguous callbacks.
+ */
+ int base;
+
+ base = xmlParseLookupSequence(ctxt, ']', ']', '>');
+ if (base < 0) {
+ if (avail >= XML_PARSER_BIG_BUFFER_SIZE + 2) {
+ int tmp;
+
+ tmp = xmlCheckCdataPush(ctxt->input->cur,
+ XML_PARSER_BIG_BUFFER_SIZE);
+ if (tmp < 0) {
+ tmp = -tmp;
+ ctxt->input->cur += tmp;
+ goto encoding_error;
+ }
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+ if (ctxt->sax->cdataBlock != NULL)
+ ctxt->sax->cdataBlock(ctxt->userData,
+ ctxt->input->cur, tmp);
+ else if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ ctxt->input->cur, tmp);
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ SKIPL(tmp);
+ ctxt->checkIndex = 0;
+ }
+ goto done;
+ } else {
+ int tmp;
+
+ tmp = xmlCheckCdataPush(ctxt->input->cur, base);
+ if ((tmp < 0) || (tmp != base)) {
+ tmp = -tmp;
+ ctxt->input->cur += tmp;
+ goto encoding_error;
+ }
+ if ((ctxt->sax != NULL) && (base == 0) &&
+ (ctxt->sax->cdataBlock != NULL) &&
+ (!ctxt->disableSAX)) {
+ /*
+ * Special case to provide identical behaviour
+ * between pull and push parsers on enpty CDATA
+ * sections
+ */
+ if ((ctxt->input->cur - ctxt->input->base >= 9) &&
+ (!strncmp((const char *)&ctxt->input->cur[-9],
+ "<![CDATA[", 9)))
+ ctxt->sax->cdataBlock(ctxt->userData,
+ BAD_CAST "", 0);
+ } else if ((ctxt->sax != NULL) && (base > 0) &&
+ (!ctxt->disableSAX)) {
+ if (ctxt->sax->cdataBlock != NULL)
+ ctxt->sax->cdataBlock(ctxt->userData,
+ ctxt->input->cur, base);
+ else if (ctxt->sax->characters != NULL)
+ ctxt->sax->characters(ctxt->userData,
+ ctxt->input->cur, base);
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ SKIPL(base + 3);
+ ctxt->checkIndex = 0;
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering CONTENT\n");
+#endif
+ }
+ break;
+ }
+ case XML_PARSER_MISC:
+ SKIP_BLANKS;
+ if (ctxt->input->buf == NULL)
+ avail = ctxt->input->length -
+ (ctxt->input->cur - ctxt->input->base);
+ else
+ avail = xmlBufUse(ctxt->input->buf->buffer) -
+ (ctxt->input->cur - ctxt->input->base);
+ if (avail < 2)
+ goto done;
+ cur = ctxt->input->cur[0];
+ next = ctxt->input->cur[1];
+ if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
+ ctxt->progressive = XML_PARSER_PI;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing PI\n");
+#endif
+ xmlParsePI(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_MISC;
+ ctxt->progressive = 1;
+ ctxt->checkIndex = 0;
+ } else if ((cur == '<') && (next == '!') &&
+ (ctxt->input->cur[2] == '-') &&
+ (ctxt->input->cur[3] == '-')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
+ ctxt->progressive = XML_PARSER_COMMENT;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing Comment\n");
+#endif
+ xmlParseComment(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_MISC;
+ ctxt->progressive = 1;
+ ctxt->checkIndex = 0;
+ } else if ((cur == '<') && (next == '!') &&
+ (ctxt->input->cur[2] == 'D') &&
+ (ctxt->input->cur[3] == 'O') &&
+ (ctxt->input->cur[4] == 'C') &&
+ (ctxt->input->cur[5] == 'T') &&
+ (ctxt->input->cur[6] == 'Y') &&
+ (ctxt->input->cur[7] == 'P') &&
+ (ctxt->input->cur[8] == 'E')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '>', 0, 0) < 0)) {
+ ctxt->progressive = XML_PARSER_DTD;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing internal subset\n");
+#endif
+ ctxt->inSubset = 1;
+ ctxt->progressive = 0;
+ ctxt->checkIndex = 0;
+ xmlParseDocTypeDecl(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ if (RAW == '[') {
+ ctxt->instate = XML_PARSER_DTD;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering DTD\n");
+#endif
+ } else {
+ /*
+ * Create and update the external subset.
+ */
+ ctxt->inSubset = 2;
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->externalSubset != NULL))
+ ctxt->sax->externalSubset(ctxt->userData,
+ ctxt->intSubName, ctxt->extSubSystem,
+ ctxt->extSubURI);
+ ctxt->inSubset = 0;
+ xmlCleanSpecialAttr(ctxt);
+ ctxt->instate = XML_PARSER_PROLOG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering PROLOG\n");
+#endif
+ }
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 9)) {
+ goto done;
+ } else {
+ ctxt->instate = XML_PARSER_START_TAG;
+ ctxt->progressive = XML_PARSER_START_TAG;
+ xmlParseGetLasts(ctxt, &lastlt, &lastgt);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering START_TAG\n");
+#endif
+ }
+ break;
+ case XML_PARSER_PROLOG:
+ SKIP_BLANKS;
+ if (ctxt->input->buf == NULL)
+ avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
+ else
+ avail = xmlBufUse(ctxt->input->buf->buffer) -
+ (ctxt->input->cur - ctxt->input->base);
+ if (avail < 2)
+ goto done;
+ cur = ctxt->input->cur[0];
+ next = ctxt->input->cur[1];
+ if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
+ ctxt->progressive = XML_PARSER_PI;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing PI\n");
+#endif
+ xmlParsePI(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_PROLOG;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (next == '!') &&
+ (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
+ ctxt->progressive = XML_PARSER_COMMENT;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing Comment\n");
+#endif
+ xmlParseComment(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_PROLOG;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 4)) {
+ goto done;
+ } else {
+ ctxt->instate = XML_PARSER_START_TAG;
+ if (ctxt->progressive == 0)
+ ctxt->progressive = XML_PARSER_START_TAG;
+ xmlParseGetLasts(ctxt, &lastlt, &lastgt);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering START_TAG\n");
+#endif
+ }
+ break;
+ case XML_PARSER_EPILOG:
+ SKIP_BLANKS;
+ if (ctxt->input->buf == NULL)
+ avail = ctxt->input->length - (ctxt->input->cur - ctxt->input->base);
+ else
+ avail = xmlBufUse(ctxt->input->buf->buffer) -
+ (ctxt->input->cur - ctxt->input->base);
+ if (avail < 2)
+ goto done;
+ cur = ctxt->input->cur[0];
+ next = ctxt->input->cur[1];
+ if ((cur == '<') && (next == '?')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '?', '>', 0) < 0)) {
+ ctxt->progressive = XML_PARSER_PI;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing PI\n");
+#endif
+ xmlParsePI(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_EPILOG;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (next == '!') &&
+ (ctxt->input->cur[2] == '-') && (ctxt->input->cur[3] == '-')) {
+ if ((!terminate) &&
+ (xmlParseLookupSequence(ctxt, '-', '-', '>') < 0)) {
+ ctxt->progressive = XML_PARSER_COMMENT;
+ goto done;
+ }
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: Parsing Comment\n");
+#endif
+ xmlParseComment(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_EPILOG;
+ ctxt->progressive = 1;
+ } else if ((cur == '<') && (next == '!') &&
+ (avail < 4)) {
+ goto done;
+ } else {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
+ ctxt->instate = XML_PARSER_EOF;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering EOF\n");
+#endif
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ goto done;
+ }
+ break;
+ case XML_PARSER_DTD: {
+ /*
+ * Sorry but progressive parsing of the internal subset
+ * is not expected to be supported. We first check that
+ * the full content of the internal subset is available and
+ * the parsing is launched only at that point.
+ * Internal subset ends up with "']' S? '>'" in an unescaped
+ * section and not in a ']]>' sequence which are conditional
+ * sections (whoever argued to keep that crap in XML deserve
+ * a place in hell !).
+ */
+ int base, i;
+ xmlChar *buf;
+ xmlChar quote = 0;
+ size_t use;
+
+ base = ctxt->input->cur - ctxt->input->base;
+ if (base < 0) return(0);
+ if (ctxt->checkIndex > base)
+ base = ctxt->checkIndex;
+ buf = xmlBufContent(ctxt->input->buf->buffer);
+ use = xmlBufUse(ctxt->input->buf->buffer);
+ for (;(unsigned int) base < use; base++) {
+ if (quote != 0) {
+ if (buf[base] == quote)
+ quote = 0;
+ continue;
+ }
+ if ((quote == 0) && (buf[base] == '<')) {
+ int found = 0;
+ /* special handling of comments */
+ if (((unsigned int) base + 4 < use) &&
+ (buf[base + 1] == '!') &&
+ (buf[base + 2] == '-') &&
+ (buf[base + 3] == '-')) {
+ for (;(unsigned int) base + 3 < use; base++) {
+ if ((buf[base] == '-') &&
+ (buf[base + 1] == '-') &&
+ (buf[base + 2] == '>')) {
+ found = 1;
+ base += 2;
+ break;
+ }
+ }
+ if (!found) {
+#if 0
+ fprintf(stderr, "unfinished comment\n");
+#endif
+ break; /* for */
+ }
+ continue;
+ }
+ }
+ if (buf[base] == '"') {
+ quote = '"';
+ continue;
+ }
+ if (buf[base] == '\'') {
+ quote = '\'';
+ continue;
+ }
+ if (buf[base] == ']') {
+#if 0
+ fprintf(stderr, "%c%c%c%c: ", buf[base],
+ buf[base + 1], buf[base + 2], buf[base + 3]);
+#endif
+ if ((unsigned int) base +1 >= use)
+ break;
+ if (buf[base + 1] == ']') {
+ /* conditional crap, skip both ']' ! */
+ base++;
+ continue;
+ }
+ for (i = 1; (unsigned int) base + i < use; i++) {
+ if (buf[base + i] == '>') {
+#if 0
+ fprintf(stderr, "found\n");
+#endif
+ goto found_end_int_subset;
+ }
+ if (!IS_BLANK_CH(buf[base + i])) {
+#if 0
+ fprintf(stderr, "not found\n");
+#endif
+ goto not_end_of_int_subset;
+ }
+ }
+#if 0
+ fprintf(stderr, "end of stream\n");
+#endif
+ break;
+
+ }
+not_end_of_int_subset:
+ continue; /* for */
+ }
+ /*
+ * We didn't found the end of the Internal subset
+ */
+ if (quote == 0)
+ ctxt->checkIndex = base;
+ else
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ if (next == 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: lookup of int subset end filed\n");
+#endif
+ goto done;
+
+found_end_int_subset:
+ ctxt->checkIndex = 0;
+ xmlParseInternalSubset(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->inSubset = 2;
+ if ((ctxt->sax != NULL) && (!ctxt->disableSAX) &&
+ (ctxt->sax->externalSubset != NULL))
+ ctxt->sax->externalSubset(ctxt->userData, ctxt->intSubName,
+ ctxt->extSubSystem, ctxt->extSubURI);
+ ctxt->inSubset = 0;
+ xmlCleanSpecialAttr(ctxt);
+ if (ctxt->instate == XML_PARSER_EOF)
+ goto done;
+ ctxt->instate = XML_PARSER_PROLOG;
+ ctxt->checkIndex = 0;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering PROLOG\n");
+#endif
+ break;
+ }
+ case XML_PARSER_COMMENT:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == COMMENT\n");
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_IGNORE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == IGNORE");
+ ctxt->instate = XML_PARSER_DTD;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering DTD\n");
+#endif
+ break;
+ case XML_PARSER_PI:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == PI\n");
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering CONTENT\n");
+#endif
+ break;
+ case XML_PARSER_ENTITY_DECL:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == ENTITY_DECL\n");
+ ctxt->instate = XML_PARSER_DTD;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering DTD\n");
+#endif
+ break;
+ case XML_PARSER_ENTITY_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == ENTITY_VALUE\n");
+ ctxt->instate = XML_PARSER_CONTENT;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering DTD\n");
+#endif
+ break;
+ case XML_PARSER_ATTRIBUTE_VALUE:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == ATTRIBUTE_VALUE\n");
+ ctxt->instate = XML_PARSER_START_TAG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering START_TAG\n");
+#endif
+ break;
+ case XML_PARSER_SYSTEM_LITERAL:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == SYSTEM_LITERAL\n");
+ ctxt->instate = XML_PARSER_START_TAG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering START_TAG\n");
+#endif
+ break;
+ case XML_PARSER_PUBLIC_LITERAL:
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: internal error, state == PUBLIC_LITERAL\n");
+ ctxt->instate = XML_PARSER_START_TAG;
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext,
+ "PP: entering START_TAG\n");
+#endif
+ break;
+ }
+ }
+done:
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "PP: done %d\n", ret);
+#endif
+ return(ret);
+encoding_error:
+ {
+ char buffer[150];
+
+ snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ ctxt->input->cur[0], ctxt->input->cur[1],
+ ctxt->input->cur[2], ctxt->input->cur[3]);
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n%s",
+ BAD_CAST buffer, NULL);
+ }
+ return(0);
+}
+
+/**
+ * xmlParseCheckTransition:
+ * @ctxt: an XML parser context
+ * @chunk: a char array
+ * @size: the size in byte of the chunk
+ *
+ * Check depending on the current parser state if the chunk given must be
+ * processed immediately or one need more data to advance on parsing.
+ *
+ * Returns -1 in case of error, 0 if the push is not needed and 1 if needed
+ */
+static int
+xmlParseCheckTransition(xmlParserCtxtPtr ctxt, const char *chunk, int size) {
+ if ((ctxt == NULL) || (chunk == NULL) || (size < 0))
+ return(-1);
+ if (ctxt->instate == XML_PARSER_START_TAG) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ if (ctxt->progressive == XML_PARSER_COMMENT) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ if (ctxt->instate == XML_PARSER_CDATA_SECTION) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ if (ctxt->progressive == XML_PARSER_PI) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ if (ctxt->instate == XML_PARSER_END_TAG) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ if ((ctxt->progressive == XML_PARSER_DTD) ||
+ (ctxt->instate == XML_PARSER_DTD)) {
+ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+ return(1);
+}
+
+/**
+ * xmlParseChunk:
+ * @ctxt: an XML parser context
+ * @chunk: an char array
+ * @size: the size in byte of the chunk
+ * @terminate: last chunk indicator
+ *
+ * Parse a Chunk of memory
+ *
+ * Returns zero if no error, the xmlParserErrors otherwise.
+ */
+int
+xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
+ int terminate) {
+ int end_in_lf = 0;
+ int remain = 0;
+ size_t old_avail = 0;
+ size_t avail = 0;
+
+ if (ctxt == NULL)
+ return(XML_ERR_INTERNAL_ERROR);
+ if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+ return(ctxt->errNo);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(-1);
+ if (ctxt->instate == XML_PARSER_START)
+ xmlDetectSAX2(ctxt);
+ if ((size > 0) && (chunk != NULL) && (!terminate) &&
+ (chunk[size - 1] == '\r')) {
+ end_in_lf = 1;
+ size--;
+ }
+
+xmldecl_done:
+
+ if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
+ size_t cur = ctxt->input->cur - ctxt->input->base;
+ int res;
+
+ old_avail = xmlBufUse(ctxt->input->buf->buffer);
+ /*
+ * Specific handling if we autodetected an encoding, we should not
+ * push more than the first line ... which depend on the encoding
+ * And only push the rest once the final encoding was detected
+ */
+ if ((ctxt->instate == XML_PARSER_START) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL) && (ctxt->input->buf->encoder != NULL)) {
+ unsigned int len = 45;
+
+ if ((xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name,
+ BAD_CAST "UTF-16")) ||
+ (xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name,
+ BAD_CAST "UTF16")))
+ len = 90;
+ else if ((xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name,
+ BAD_CAST "UCS-4")) ||
+ (xmlStrcasestr(BAD_CAST ctxt->input->buf->encoder->name,
+ BAD_CAST "UCS4")))
+ len = 180;
+
+ if (ctxt->input->buf->rawconsumed < len)
+ len -= ctxt->input->buf->rawconsumed;
+
+ /*
+ * Change size for reading the initial declaration only
+ * if size is greater than len. Otherwise, memmove in xmlBufferAdd
+ * will blindly copy extra bytes from memory.
+ */
+ if ((unsigned int) size > len) {
+ remain = size - len;
+ size = len;
+ } else {
+ remain = 0;
+ }
+ }
+ res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+ if (res < 0) {
+ ctxt->errNo = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return (XML_PARSER_EOF);
+ }
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
+#endif
+
+ } else if (ctxt->instate != XML_PARSER_EOF) {
+ if ((ctxt->input != NULL) && ctxt->input->buf != NULL) {
+ xmlParserInputBufferPtr in = ctxt->input->buf;
+ if ((in->encoder != NULL) && (in->buffer != NULL) &&
+ (in->raw != NULL)) {
+ int nbchars;
+ size_t base = xmlBufGetInputBase(in->buffer, ctxt->input);
+ size_t current = ctxt->input->cur - ctxt->input->base;
+
+ nbchars = xmlCharEncInput(in, terminate);
+ if (nbchars < 0) {
+ /* TODO 2.6.0 */
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParseChunk: encoder error\n");
+ return(XML_ERR_INVALID_ENCODING);
+ }
+ xmlBufSetInputBaseCur(in->buffer, ctxt->input, base, current);
+ }
+ }
+ }
+ if (remain != 0) {
+ xmlParseTryOrFinish(ctxt, 0);
+ } else {
+ if ((ctxt->input != NULL) && (ctxt->input->buf != NULL))
+ avail = xmlBufUse(ctxt->input->buf->buffer);
+ /*
+ * Depending on the current state it may not be such
+ * a good idea to try parsing if there is nothing in the chunk
+ * which would be worth doing a parser state transition and we
+ * need to wait for more data
+ */
+ if ((terminate) || (avail > XML_MAX_TEXT_LENGTH) ||
+ (old_avail == 0) || (avail == 0) ||
+ (xmlParseCheckTransition(ctxt,
+ (const char *)&ctxt->input->base[old_avail],
+ avail - old_avail)))
+ xmlParseTryOrFinish(ctxt, terminate);
+ }
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(ctxt->errNo);
+
+ if ((ctxt->input != NULL) &&
+ (((ctxt->input->end - ctxt->input->cur) > XML_MAX_LOOKUP_LIMIT) ||
+ ((ctxt->input->cur - ctxt->input->base) > XML_MAX_LOOKUP_LIMIT)) &&
+ ((ctxt->options & XML_PARSE_HUGE) == 0)) {
+ xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
+ ctxt->instate = XML_PARSER_EOF;
+ }
+ if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+ return(ctxt->errNo);
+
+ if (remain != 0) {
+ chunk += size;
+ size = remain;
+ remain = 0;
+ goto xmldecl_done;
+ }
+ if ((end_in_lf == 1) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer,
+ ctxt->input);
+ size_t current = ctxt->input->cur - ctxt->input->base;
+
+ xmlParserInputBufferPush(ctxt->input->buf, 1, "\r");
+
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input,
+ base, current);
+ }
+ if (terminate) {
+ /*
+ * Check for termination
+ */
+ int cur_avail = 0;
+
+ if (ctxt->input != NULL) {
+ if (ctxt->input->buf == NULL)
+ cur_avail = ctxt->input->length -
+ (ctxt->input->cur - ctxt->input->base);
+ else
+ cur_avail = xmlBufUse(ctxt->input->buf->buffer) -
+ (ctxt->input->cur - ctxt->input->base);
+ }
+
+ if ((ctxt->instate != XML_PARSER_EOF) &&
+ (ctxt->instate != XML_PARSER_EPILOG)) {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
+ }
+ if ((ctxt->instate == XML_PARSER_EPILOG) && (cur_avail > 0)) {
+ xmlFatalErr(ctxt, XML_ERR_DOCUMENT_END, NULL);
+ }
+ if (ctxt->instate != XML_PARSER_EOF) {
+ if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
+ ctxt->sax->endDocument(ctxt->userData);
+ }
+ ctxt->instate = XML_PARSER_EOF;
+ }
+ if (ctxt->wellFormed == 0)
+ return((xmlParserErrors) ctxt->errNo);
+ else
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * I/O front end functions to the parser *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCreatePushParserCtxt:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @chunk: a pointer to an array of chars
+ * @size: number of chars in the array
+ * @filename: an optional file name or URI
+ *
+ * Create a parser context for using the XML parser in push mode.
+ * If @buffer and @size are non-NULL, the data is used to detect
+ * the encoding. The remaining characters will be parsed so they
+ * don't need to be fed in again through xmlParseChunk.
+ * To allow content encoding detection, @size should be >= 4
+ * The value of @filename is used for fetching external entities
+ * and error/warning reports.
+ *
+ * Returns the new parser context or NULL
+ */
+
+xmlParserCtxtPtr
+xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
+ const char *chunk, int size, const char *filename) {
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+ xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+
+ /*
+ * plug some encoding conversion routines
+ */
+ if ((chunk != NULL) && (size >= 4))
+ enc = xmlDetectCharEncoding((const xmlChar *) chunk, size);
+
+ buf = xmlAllocParserInputBuffer(enc);
+ if (buf == NULL) return(NULL);
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlErrMemory(NULL, "creating parser: out of memory\n");
+ xmlFreeParserInputBuffer(buf);
+ return(NULL);
+ }
+ ctxt->dictNames = 1;
+ ctxt->pushTab = (void **) xmlMalloc(ctxt->nameMax * 3 * sizeof(xmlChar *));
+ if (ctxt->pushTab == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFreeParserInputBuffer(buf);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ if (sax != NULL) {
+#ifdef LIBXML_SAX1_ENABLED
+ if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
+#endif /* LIBXML_SAX1_ENABLED */
+ xmlFree(ctxt->sax);
+ ctxt->sax = (xmlSAXHandlerPtr) xmlMalloc(sizeof(xmlSAXHandler));
+ if (ctxt->sax == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFreeParserInputBuffer(buf);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ memset(ctxt->sax, 0, sizeof(xmlSAXHandler));
+ if (sax->initialized == XML_SAX2_MAGIC)
+ memcpy(ctxt->sax, sax, sizeof(xmlSAXHandler));
+ else
+ memcpy(ctxt->sax, sax, sizeof(xmlSAXHandlerV1));
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ }
+ if (filename == NULL) {
+ ctxt->directory = NULL;
+ } else {
+ ctxt->directory = xmlParserGetDirectory(filename);
+ }
+
+ inputStream = xmlNewInputStream(ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ xmlFreeParserInputBuffer(buf);
+ return(NULL);
+ }
+
+ if (filename == NULL)
+ inputStream->filename = NULL;
+ else {
+ inputStream->filename = (char *)
+ xmlCanonicPath((const xmlChar *) filename);
+ if (inputStream->filename == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ xmlFreeParserInputBuffer(buf);
+ return(NULL);
+ }
+ }
+ inputStream->buf = buf;
+ xmlBufResetInput(inputStream->buf->buffer, inputStream);
+ inputPush(ctxt, inputStream);
+
+ /*
+ * If the caller didn't provide an initial 'chunk' for determining
+ * the encoding, we set the context to XML_CHAR_ENCODING_NONE so
+ * that it can be automatically determined later
+ */
+ if ((size == 0) || (chunk == NULL)) {
+ ctxt->charset = XML_CHAR_ENCODING_NONE;
+ } else if ((ctxt->input != NULL) && (ctxt->input->buf != NULL)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
+ size_t cur = ctxt->input->cur - ctxt->input->base;
+
+ xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
+#endif
+ }
+
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ return(ctxt);
+}
+#endif /* LIBXML_PUSH_ENABLED */
+
+/**
+ * xmlStopParser:
+ * @ctxt: an XML parser context
+ *
+ * Blocks further parser processing
+ */
+void
+xmlStopParser(xmlParserCtxtPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->errNo = XML_ERR_USER_STOP;
+ ctxt->disableSAX = 1;
+ if (ctxt->input != NULL) {
+ ctxt->input->cur = BAD_CAST"";
+ ctxt->input->base = ctxt->input->cur;
+ }
+}
+
+/**
+ * xmlCreateIOParserCtxt:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @enc: the charset encoding if known
+ *
+ * Create a parser context for using the XML parser with an existing
+ * I/O stream
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
+ xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
+ void *ioctx, xmlCharEncoding enc) {
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+
+ if (ioread == NULL) return(NULL);
+
+ buf = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx, enc);
+ if (buf == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return(NULL);
+ }
+ if (sax != NULL) {
+#ifdef LIBXML_SAX1_ENABLED
+ if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
+#endif /* LIBXML_SAX1_ENABLED */
+ xmlFree(ctxt->sax);
+ ctxt->sax = (xmlSAXHandlerPtr) xmlMalloc(sizeof(xmlSAXHandler));
+ if (ctxt->sax == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ memset(ctxt->sax, 0, sizeof(xmlSAXHandler));
+ if (sax->initialized == XML_SAX2_MAGIC)
+ memcpy(ctxt->sax, sax, sizeof(xmlSAXHandler));
+ else
+ memcpy(ctxt->sax, sax, sizeof(xmlSAXHandlerV1));
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ }
+
+ inputStream = xmlNewIOInputStream(ctxt, buf, enc);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ inputPush(ctxt, inputStream);
+
+ return(ctxt);
+}
+
+#ifdef LIBXML_VALID_ENABLED
+/************************************************************************
+ * *
+ * Front ends when parsing a DTD *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlIOParseDTD:
+ * @sax: the SAX handler block or NULL
+ * @input: an Input Buffer
+ * @enc: the charset encoding if known
+ *
+ * Load and parse a DTD
+ *
+ * Returns the resulting xmlDtdPtr or NULL in case of error.
+ * @input will be freed by the function in any case.
+ */
+
+xmlDtdPtr
+xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
+ xmlCharEncoding enc) {
+ xmlDtdPtr ret = NULL;
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr pinput = NULL;
+ xmlChar start[4];
+
+ if (input == NULL)
+ return(NULL);
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return(NULL);
+ }
+
+ /* We are loading a DTD */
+ ctxt->options |= XML_PARSE_DTDLOAD;
+
+ /*
+ * Set-up the SAX context
+ */
+ if (sax != NULL) {
+ if (ctxt->sax != NULL)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ ctxt->userData = ctxt;
+ }
+ xmlDetectSAX2(ctxt);
+
+ /*
+ * generate a parser input from the I/O handler
+ */
+
+ pinput = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (pinput == NULL) {
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserInputBuffer(input);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ /*
+ * plug some encoding conversion routines here.
+ */
+ if (xmlPushInput(ctxt, pinput) < 0) {
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ pinput->filename = NULL;
+ pinput->line = 1;
+ pinput->col = 1;
+ pinput->base = ctxt->input->cur;
+ pinput->cur = ctxt->input->cur;
+ pinput->free = NULL;
+
+ /*
+ * let's parse that entity knowing it's an external subset.
+ */
+ ctxt->inSubset = 2;
+ ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (ctxt->myDoc == NULL) {
+ xmlErrMemory(ctxt, "New Doc failed");
+ return(NULL);
+ }
+ ctxt->myDoc->properties = XML_DOC_INTERNAL;
+ ctxt->myDoc->extSubset = xmlNewDtd(ctxt->myDoc, BAD_CAST "none",
+ BAD_CAST "none", BAD_CAST "none");
+
+ if ((enc == XML_CHAR_ENCODING_NONE) &&
+ ((ctxt->input->end - ctxt->input->cur) >= 4)) {
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+ xmlParseExternalSubset(ctxt, BAD_CAST "none", BAD_CAST "none");
+
+ if (ctxt->myDoc != NULL) {
+ if (ctxt->wellFormed) {
+ ret = ctxt->myDoc->extSubset;
+ ctxt->myDoc->extSubset = NULL;
+ if (ret != NULL) {
+ xmlNodePtr tmp;
+
+ ret->doc = NULL;
+ tmp = ret->children;
+ while (tmp != NULL) {
+ tmp->doc = NULL;
+ tmp = tmp->next;
+ }
+ }
+ } else {
+ ret = NULL;
+ }
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlSAXParseDTD:
+ * @sax: the SAX handler block
+ * @ExternalID: a NAME* containing the External ID of the DTD
+ * @SystemID: a NAME* containing the URL to the DTD
+ *
+ * Load and parse an external subset.
+ *
+ * Returns the resulting xmlDtdPtr or NULL in case of error.
+ */
+
+xmlDtdPtr
+xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
+ const xmlChar *SystemID) {
+ xmlDtdPtr ret = NULL;
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr input = NULL;
+ xmlCharEncoding enc;
+ xmlChar* systemIdCanonic;
+
+ if ((ExternalID == NULL) && (SystemID == NULL)) return(NULL);
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ return(NULL);
+ }
+
+ /* We are loading a DTD */
+ ctxt->options |= XML_PARSE_DTDLOAD;
+
+ /*
+ * Set-up the SAX context
+ */
+ if (sax != NULL) {
+ if (ctxt->sax != NULL)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ ctxt->userData = ctxt;
+ }
+
+ /*
+ * Canonicalise the system ID
+ */
+ systemIdCanonic = xmlCanonicPath(SystemID);
+ if ((SystemID != NULL) && (systemIdCanonic == NULL)) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ /*
+ * Ask the Entity resolver to load the damn thing
+ */
+
+ if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL))
+ input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID,
+ systemIdCanonic);
+ if (input == NULL) {
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+ if (systemIdCanonic != NULL)
+ xmlFree(systemIdCanonic);
+ return(NULL);
+ }
+
+ /*
+ * plug some encoding conversion routines here.
+ */
+ if (xmlPushInput(ctxt, input) < 0) {
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+ if (systemIdCanonic != NULL)
+ xmlFree(systemIdCanonic);
+ return(NULL);
+ }
+ if ((ctxt->input->end - ctxt->input->cur) >= 4) {
+ enc = xmlDetectCharEncoding(ctxt->input->cur, 4);
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ if (input->filename == NULL)
+ input->filename = (char *) systemIdCanonic;
+ else
+ xmlFree(systemIdCanonic);
+ input->line = 1;
+ input->col = 1;
+ input->base = ctxt->input->cur;
+ input->cur = ctxt->input->cur;
+ input->free = NULL;
+
+ /*
+ * let's parse that entity knowing it's an external subset.
+ */
+ ctxt->inSubset = 2;
+ ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (ctxt->myDoc == NULL) {
+ xmlErrMemory(ctxt, "New Doc failed");
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ ctxt->myDoc->properties = XML_DOC_INTERNAL;
+ ctxt->myDoc->extSubset = xmlNewDtd(ctxt->myDoc, BAD_CAST "none",
+ ExternalID, SystemID);
+ xmlParseExternalSubset(ctxt, ExternalID, SystemID);
+
+ if (ctxt->myDoc != NULL) {
+ if (ctxt->wellFormed) {
+ ret = ctxt->myDoc->extSubset;
+ ctxt->myDoc->extSubset = NULL;
+ if (ret != NULL) {
+ xmlNodePtr tmp;
+
+ ret->doc = NULL;
+ tmp = ret->children;
+ while (tmp != NULL) {
+ tmp->doc = NULL;
+ tmp = tmp->next;
+ }
+ }
+ } else {
+ ret = NULL;
+ }
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL) ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+
+/**
+ * xmlParseDTD:
+ * @ExternalID: a NAME* containing the External ID of the DTD
+ * @SystemID: a NAME* containing the URL to the DTD
+ *
+ * Load and parse an external subset.
+ *
+ * Returns the resulting xmlDtdPtr or NULL in case of error.
+ */
+
+xmlDtdPtr
+xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) {
+ return(xmlSAXParseDTD(NULL, ExternalID, SystemID));
+}
+#endif /* LIBXML_VALID_ENABLED */
+
+/************************************************************************
+ * *
+ * Front ends when parsing an Entity *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlParseCtxtExternalEntity:
+ * @ctx: the existing parsing context
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @lst: the return value for the set of parsed nodes
+ *
+ * Parse an external general entity within an existing parsing context
+ * An external general parsed entity is well-formed if it matches the
+ * production labeled extParsedEnt.
+ *
+ * [78] extParsedEnt ::= TextDecl? content
+ *
+ * Returns 0 if the entity is well formed, -1 in case of args problem and
+ * the parser error code otherwise
+ */
+
+int
+xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL,
+ const xmlChar *ID, xmlNodePtr *lst) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr newDoc;
+ xmlNodePtr newRoot;
+ xmlSAXHandlerPtr oldsax = NULL;
+ int ret = 0;
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ if (ctx == NULL) return(-1);
+
+ if (((ctx->depth > 40) && ((ctx->options & XML_PARSE_HUGE) == 0)) ||
+ (ctx->depth > 1024)) {
+ return(XML_ERR_ENTITY_LOOP);
+ }
+
+ if (lst != NULL)
+ *lst = NULL;
+ if ((URL == NULL) && (ID == NULL))
+ return(-1);
+ if (ctx->myDoc == NULL) /* @@ relax but check for dereferences */
+ return(-1);
+
+ ctxt = xmlCreateEntityParserCtxtInternal(URL, ID, NULL, ctx);
+ if (ctxt == NULL) {
+ return(-1);
+ }
+
+ oldsax = ctxt->sax;
+ ctxt->sax = ctx->sax;
+ xmlDetectSAX2(ctxt);
+ newDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (newDoc == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(-1);
+ }
+ newDoc->properties = XML_DOC_INTERNAL;
+ if (ctx->myDoc->dict) {
+ newDoc->dict = ctx->myDoc->dict;
+ xmlDictReference(newDoc->dict);
+ }
+ if (ctx->myDoc != NULL) {
+ newDoc->intSubset = ctx->myDoc->intSubset;
+ newDoc->extSubset = ctx->myDoc->extSubset;
+ }
+ if (ctx->myDoc->URL != NULL) {
+ newDoc->URL = xmlStrdup(ctx->myDoc->URL);
+ }
+ newRoot = xmlNewDocNode(newDoc, NULL, BAD_CAST "pseudoroot", NULL);
+ if (newRoot == NULL) {
+ ctxt->sax = oldsax;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ xmlFreeDoc(newDoc);
+ return(-1);
+ }
+ xmlAddChild((xmlNodePtr) newDoc, newRoot);
+ nodePush(ctxt, newDoc->children);
+ if (ctx->myDoc == NULL) {
+ ctxt->myDoc = newDoc;
+ } else {
+ ctxt->myDoc = ctx->myDoc;
+ newDoc->children->doc = ctx->myDoc;
+ }
+
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ GROW
+ if ((ctxt->input->end - ctxt->input->cur) >= 4) {
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+ /*
+ * Parse a possible text declaration first
+ */
+ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) {
+ xmlParseTextDecl(ctxt);
+ /*
+ * An XML-1.0 document can't reference an entity not XML-1.0
+ */
+ if ((xmlStrEqual(ctx->version, BAD_CAST "1.0")) &&
+ (!xmlStrEqual(ctxt->input->version, BAD_CAST "1.0"))) {
+ xmlFatalErrMsg(ctxt, XML_ERR_VERSION_MISMATCH,
+ "Version mismatch between document and entity\n");
+ }
+ }
+
+ /*
+ * If the user provided its own SAX callbacks then reuse the
+ * useData callback field, otherwise the expected setup in a
+ * DOM builder is to have userData == ctxt
+ */
+ if (ctx->userData == ctx)
+ ctxt->userData = ctxt;
+ else
+ ctxt->userData = ctx->userData;
+
+ /*
+ * Doing validity checking on chunk doesn't make sense
+ */
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->validate = ctx->validate;
+ ctxt->valid = ctx->valid;
+ ctxt->loadsubset = ctx->loadsubset;
+ ctxt->depth = ctx->depth + 1;
+ ctxt->replaceEntities = ctx->replaceEntities;
+ if (ctxt->validate) {
+ ctxt->vctxt.error = ctx->vctxt.error;
+ ctxt->vctxt.warning = ctx->vctxt.warning;
+ } else {
+ ctxt->vctxt.error = NULL;
+ ctxt->vctxt.warning = NULL;
+ }
+ ctxt->vctxt.nodeTab = NULL;
+ ctxt->vctxt.nodeNr = 0;
+ ctxt->vctxt.nodeMax = 0;
+ ctxt->vctxt.node = NULL;
+ if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
+ ctxt->dict = ctx->dict;
+ ctxt->str_xml = xmlDictLookup(ctxt->dict, BAD_CAST "xml", 3);
+ ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
+ ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
+ ctxt->dictNames = ctx->dictNames;
+ ctxt->attsDefault = ctx->attsDefault;
+ ctxt->attsSpecial = ctx->attsSpecial;
+ ctxt->linenumbers = ctx->linenumbers;
+
+ xmlParseContent(ctxt);
+
+ ctx->validate = ctxt->validate;
+ ctx->valid = ctxt->valid;
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+ if (ctxt->node != newDoc->children) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ }
+
+ if (!ctxt->wellFormed) {
+ if (ctxt->errNo == 0)
+ ret = 1;
+ else
+ ret = ctxt->errNo;
+ } else {
+ if (lst != NULL) {
+ xmlNodePtr cur;
+
+ /*
+ * Return the newly created nodeset after unlinking it from
+ * they pseudo parent.
+ */
+ cur = newDoc->children->children;
+ *lst = cur;
+ while (cur != NULL) {
+ cur->parent = NULL;
+ cur = cur->next;
+ }
+ newDoc->children->children = NULL;
+ }
+ ret = 0;
+ }
+ ctxt->sax = oldsax;
+ ctxt->dict = NULL;
+ ctxt->attsDefault = NULL;
+ ctxt->attsSpecial = NULL;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ xmlFreeDoc(newDoc);
+
+ return(ret);
+}
+
+/**
+ * xmlParseExternalEntityPrivate:
+ * @doc: the document the chunk pertains to
+ * @oldctxt: the previous parser context if available
+ * @sax: the SAX handler bloc (possibly NULL)
+ * @user_data: The user data returned on SAX callbacks (possibly NULL)
+ * @depth: Used for loop detection, use 0
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @list: the return value for the set of parsed nodes
+ *
+ * Private version of xmlParseExternalEntity()
+ *
+ * Returns 0 if the entity is well formed, -1 in case of args problem and
+ * the parser error code otherwise
+ */
+
+static xmlParserErrors
+xmlParseExternalEntityPrivate(xmlDocPtr doc, xmlParserCtxtPtr oldctxt,
+ xmlSAXHandlerPtr sax,
+ void *user_data, int depth, const xmlChar *URL,
+ const xmlChar *ID, xmlNodePtr *list) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr newDoc;
+ xmlNodePtr newRoot;
+ xmlSAXHandlerPtr oldsax = NULL;
+ xmlParserErrors ret = XML_ERR_OK;
+ xmlChar start[4];
+ xmlCharEncoding enc;
+
+ if (((depth > 40) &&
+ ((oldctxt == NULL) || (oldctxt->options & XML_PARSE_HUGE) == 0)) ||
+ (depth > 1024)) {
+ return(XML_ERR_ENTITY_LOOP);
+ }
+
+ if (list != NULL)
+ *list = NULL;
+ if ((URL == NULL) && (ID == NULL))
+ return(XML_ERR_INTERNAL_ERROR);
+ if (doc == NULL)
+ return(XML_ERR_INTERNAL_ERROR);
+
+
+ ctxt = xmlCreateEntityParserCtxtInternal(URL, ID, NULL, oldctxt);
+ if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
+ ctxt->userData = ctxt;
+ if (oldctxt != NULL) {
+ ctxt->_private = oldctxt->_private;
+ ctxt->loadsubset = oldctxt->loadsubset;
+ ctxt->validate = oldctxt->validate;
+ ctxt->external = oldctxt->external;
+ ctxt->record_info = oldctxt->record_info;
+ ctxt->node_seq.maximum = oldctxt->node_seq.maximum;
+ ctxt->node_seq.length = oldctxt->node_seq.length;
+ ctxt->node_seq.buffer = oldctxt->node_seq.buffer;
+ } else {
+ /*
+ * Doing validity checking on chunk without context
+ * doesn't make sense
+ */
+ ctxt->_private = NULL;
+ ctxt->validate = 0;
+ ctxt->external = 2;
+ ctxt->loadsubset = 0;
+ }
+ if (sax != NULL) {
+ oldsax = ctxt->sax;
+ ctxt->sax = sax;
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ }
+ xmlDetectSAX2(ctxt);
+ newDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (newDoc == NULL) {
+ ctxt->node_seq.maximum = 0;
+ ctxt->node_seq.length = 0;
+ ctxt->node_seq.buffer = NULL;
+ xmlFreeParserCtxt(ctxt);
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ newDoc->properties = XML_DOC_INTERNAL;
+ newDoc->intSubset = doc->intSubset;
+ newDoc->extSubset = doc->extSubset;
+ newDoc->dict = doc->dict;
+ xmlDictReference(newDoc->dict);
+
+ if (doc->URL != NULL) {
+ newDoc->URL = xmlStrdup(doc->URL);
+ }
+ newRoot = xmlNewDocNode(newDoc, NULL, BAD_CAST "pseudoroot", NULL);
+ if (newRoot == NULL) {
+ if (sax != NULL)
+ ctxt->sax = oldsax;
+ ctxt->node_seq.maximum = 0;
+ ctxt->node_seq.length = 0;
+ ctxt->node_seq.buffer = NULL;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ xmlFreeDoc(newDoc);
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ xmlAddChild((xmlNodePtr) newDoc, newRoot);
+ nodePush(ctxt, newDoc->children);
+ ctxt->myDoc = doc;
+ newRoot->doc = doc;
+
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ GROW;
+ if ((ctxt->input->end - ctxt->input->cur) >= 4) {
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(start, 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
+ /*
+ * Parse a possible text declaration first
+ */
+ if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) {
+ xmlParseTextDecl(ctxt);
+ }
+
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->depth = depth;
+
+ xmlParseContent(ctxt);
+
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+ if (ctxt->node != newDoc->children) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ }
+
+ if (!ctxt->wellFormed) {
+ if (ctxt->errNo == 0)
+ ret = XML_ERR_INTERNAL_ERROR;
+ else
+ ret = (xmlParserErrors)ctxt->errNo;
+ } else {
+ if (list != NULL) {
+ xmlNodePtr cur;
+
+ /*
+ * Return the newly created nodeset after unlinking it from
+ * they pseudo parent.
+ */
+ cur = newDoc->children->children;
+ *list = cur;
+ while (cur != NULL) {
+ cur->parent = NULL;
+ cur = cur->next;
+ }
+ newDoc->children->children = NULL;
+ }
+ ret = XML_ERR_OK;
+ }
+
+ /*
+ * Record in the parent context the number of entities replacement
+ * done when parsing that reference.
+ */
+ if (oldctxt != NULL)
+ oldctxt->nbentities += ctxt->nbentities;
+
+ /*
+ * Also record the size of the entity parsed
+ */
+ if (ctxt->input != NULL) {
+ oldctxt->sizeentities += ctxt->input->consumed;
+ oldctxt->sizeentities += (ctxt->input->cur - ctxt->input->base);
+ }
+ /*
+ * And record the last error if any
+ */
+ if (ctxt->lastError.code != XML_ERR_OK)
+ xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
+
+ if (sax != NULL)
+ ctxt->sax = oldsax;
+ oldctxt->node_seq.maximum = ctxt->node_seq.maximum;
+ oldctxt->node_seq.length = ctxt->node_seq.length;
+ oldctxt->node_seq.buffer = ctxt->node_seq.buffer;
+ ctxt->node_seq.maximum = 0;
+ ctxt->node_seq.length = 0;
+ ctxt->node_seq.buffer = NULL;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ xmlFreeDoc(newDoc);
+
+ return(ret);
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlParseExternalEntity:
+ * @doc: the document the chunk pertains to
+ * @sax: the SAX handler bloc (possibly NULL)
+ * @user_data: The user data returned on SAX callbacks (possibly NULL)
+ * @depth: Used for loop detection, use 0
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @lst: the return value for the set of parsed nodes
+ *
+ * Parse an external general entity
+ * An external general parsed entity is well-formed if it matches the
+ * production labeled extParsedEnt.
+ *
+ * [78] extParsedEnt ::= TextDecl? content
+ *
+ * Returns 0 if the entity is well formed, -1 in case of args problem and
+ * the parser error code otherwise
+ */
+
+int
+xmlParseExternalEntity(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data,
+ int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst) {
+ return(xmlParseExternalEntityPrivate(doc, NULL, sax, user_data, depth, URL,
+ ID, lst));
+}
+
+/**
+ * xmlParseBalancedChunkMemory:
+ * @doc: the document the chunk pertains to
+ * @sax: the SAX handler bloc (possibly NULL)
+ * @user_data: The user data returned on SAX callbacks (possibly NULL)
+ * @depth: Used for loop detection, use 0
+ * @string: the input string in UTF8 or ISO-Latin (zero terminated)
+ * @lst: the return value for the set of parsed nodes
+ *
+ * Parse a well-balanced chunk of an XML document
+ * called by the parser
+ * The allowed sequence for the Well Balanced Chunk is the one defined by
+ * the content production in the XML grammar:
+ *
+ * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
+ *
+ * Returns 0 if the chunk is well balanced, -1 in case of args problem and
+ * the parser error code otherwise
+ */
+
+int
+xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlSAXHandlerPtr sax,
+ void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst) {
+ return xmlParseBalancedChunkMemoryRecover( doc, sax, user_data,
+ depth, string, lst, 0 );
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/**
+ * xmlParseBalancedChunkMemoryInternal:
+ * @oldctxt: the existing parsing context
+ * @string: the input string in UTF8 or ISO-Latin (zero terminated)
+ * @user_data: the user data field for the parser context
+ * @lst: the return value for the set of parsed nodes
+ *
+ *
+ * Parse a well-balanced chunk of an XML document
+ * called by the parser
+ * The allowed sequence for the Well Balanced Chunk is the one defined by
+ * the content production in the XML grammar:
+ *
+ * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
+ *
+ * Returns XML_ERR_OK if the chunk is well balanced, and the parser
+ * error code otherwise
+ *
+ * In case recover is set to 1, the nodelist will not be empty even if
+ * the parsed chunk is not well balanced.
+ */
+static xmlParserErrors
+xmlParseBalancedChunkMemoryInternal(xmlParserCtxtPtr oldctxt,
+ const xmlChar *string, void *user_data, xmlNodePtr *lst) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr newDoc = NULL;
+ xmlNodePtr newRoot;
+ xmlSAXHandlerPtr oldsax = NULL;
+ xmlNodePtr content = NULL;
+ xmlNodePtr last = NULL;
+ int size;
+ xmlParserErrors ret = XML_ERR_OK;
+#ifdef SAX2
+ int i;
+#endif
+
+ if (((oldctxt->depth > 40) && ((oldctxt->options & XML_PARSE_HUGE) == 0)) ||
+ (oldctxt->depth > 1024)) {
+ return(XML_ERR_ENTITY_LOOP);
+ }
+
+
+ if (lst != NULL)
+ *lst = NULL;
+ if (string == NULL)
+ return(XML_ERR_INTERNAL_ERROR);
+
+ size = xmlStrlen(string);
+
+ ctxt = xmlCreateMemoryParserCtxt((char *) string, size);
+ if (ctxt == NULL) return(XML_WAR_UNDECLARED_ENTITY);
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ else
+ ctxt->userData = ctxt;
+ if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
+ ctxt->dict = oldctxt->dict;
+ ctxt->str_xml = xmlDictLookup(ctxt->dict, BAD_CAST "xml", 3);
+ ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
+ ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
+
+#ifdef SAX2
+ /* propagate namespaces down the entity */
+ for (i = 0;i < oldctxt->nsNr;i += 2) {
+ nsPush(ctxt, oldctxt->nsTab[i], oldctxt->nsTab[i+1]);
+ }
+#endif
+
+ oldsax = ctxt->sax;
+ ctxt->sax = oldctxt->sax;
+ xmlDetectSAX2(ctxt);
+ ctxt->replaceEntities = oldctxt->replaceEntities;
+ ctxt->options = oldctxt->options;
+
+ ctxt->_private = oldctxt->_private;
+ if (oldctxt->myDoc == NULL) {
+ newDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (newDoc == NULL) {
+ ctxt->sax = oldsax;
+ ctxt->dict = NULL;
+ xmlFreeParserCtxt(ctxt);
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ newDoc->properties = XML_DOC_INTERNAL;
+ newDoc->dict = ctxt->dict;
+ xmlDictReference(newDoc->dict);
+ ctxt->myDoc = newDoc;
+ } else {
+ ctxt->myDoc = oldctxt->myDoc;
+ content = ctxt->myDoc->children;
+ last = ctxt->myDoc->last;
+ }
+ newRoot = xmlNewDocNode(ctxt->myDoc, NULL, BAD_CAST "pseudoroot", NULL);
+ if (newRoot == NULL) {
+ ctxt->sax = oldsax;
+ ctxt->dict = NULL;
+ xmlFreeParserCtxt(ctxt);
+ if (newDoc != NULL) {
+ xmlFreeDoc(newDoc);
+ }
+ return(XML_ERR_INTERNAL_ERROR);
+ }
+ ctxt->myDoc->children = NULL;
+ ctxt->myDoc->last = NULL;
+ xmlAddChild((xmlNodePtr) ctxt->myDoc, newRoot);
+ nodePush(ctxt, ctxt->myDoc->children);
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->depth = oldctxt->depth + 1;
+
+ ctxt->validate = 0;
+ ctxt->loadsubset = oldctxt->loadsubset;
+ if ((oldctxt->validate) || (oldctxt->replaceEntities != 0)) {
+ /*
+ * ID/IDREF registration will be done in xmlValidateElement below
+ */
+ ctxt->loadsubset |= XML_SKIP_IDS;
+ }
+ ctxt->dictNames = oldctxt->dictNames;
+ ctxt->attsDefault = oldctxt->attsDefault;
+ ctxt->attsSpecial = oldctxt->attsSpecial;
+
+ xmlParseContent(ctxt);
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+ if (ctxt->node != ctxt->myDoc->children) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ }
+
+ if (!ctxt->wellFormed) {
+ if (ctxt->errNo == 0)
+ ret = XML_ERR_INTERNAL_ERROR;
+ else
+ ret = (xmlParserErrors)ctxt->errNo;
+ } else {
+ ret = XML_ERR_OK;
+ }
+
+ if ((lst != NULL) && (ret == XML_ERR_OK)) {
+ xmlNodePtr cur;
+
+ /*
+ * Return the newly created nodeset after unlinking it from
+ * they pseudo parent.
+ */
+ cur = ctxt->myDoc->children->children;
+ *lst = cur;
+ while (cur != NULL) {
+#ifdef LIBXML_VALID_ENABLED
+ if ((oldctxt->validate) && (oldctxt->wellFormed) &&
+ (oldctxt->myDoc) && (oldctxt->myDoc->intSubset) &&
+ (cur->type == XML_ELEMENT_NODE)) {
+ oldctxt->valid &= xmlValidateElement(&oldctxt->vctxt,
+ oldctxt->myDoc, cur);
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ cur->parent = NULL;
+ cur = cur->next;
+ }
+ ctxt->myDoc->children->children = NULL;
+ }
+ if (ctxt->myDoc != NULL) {
+ xmlFreeNode(ctxt->myDoc->children);
+ ctxt->myDoc->children = content;
+ ctxt->myDoc->last = last;
+ }
+
+ /*
+ * Record in the parent context the number of entities replacement
+ * done when parsing that reference.
+ */
+ if (oldctxt != NULL)
+ oldctxt->nbentities += ctxt->nbentities;
+
+ /*
+ * Also record the last error if any
+ */
+ if (ctxt->lastError.code != XML_ERR_OK)
+ xmlCopyError(&ctxt->lastError, &oldctxt->lastError);
+
+ ctxt->sax = oldsax;
+ ctxt->dict = NULL;
+ ctxt->attsDefault = NULL;
+ ctxt->attsSpecial = NULL;
+ xmlFreeParserCtxt(ctxt);
+ if (newDoc != NULL) {
+ xmlFreeDoc(newDoc);
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlParseInNodeContext:
+ * @node: the context node
+ * @data: the input string
+ * @datalen: the input string length in bytes
+ * @options: a combination of xmlParserOption
+ * @lst: the return value for the set of parsed nodes
+ *
+ * Parse a well-balanced chunk of an XML document
+ * within the context (DTD, namespaces, etc ...) of the given node.
+ *
+ * The allowed sequence for the data is a Well Balanced Chunk defined by
+ * the content production in the XML grammar:
+ *
+ * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
+ *
+ * Returns XML_ERR_OK if the chunk is well balanced, and the parser
+ * error code otherwise
+ */
+xmlParserErrors
+xmlParseInNodeContext(xmlNodePtr node, const char *data, int datalen,
+ int options, xmlNodePtr *lst) {
+#ifdef SAX2
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc = NULL;
+ xmlNodePtr fake, cur;
+ int nsnr = 0;
+
+ xmlParserErrors ret = XML_ERR_OK;
+
+ /*
+ * check all input parameters, grab the document
+ */
+ if ((lst == NULL) || (node == NULL) || (data == NULL) || (datalen < 0))
+ return(XML_ERR_INTERNAL_ERROR);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ break;
+ default:
+ return(XML_ERR_INTERNAL_ERROR);
+
+ }
+ while ((node != NULL) && (node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_DOCUMENT_NODE) &&
+ (node->type != XML_HTML_DOCUMENT_NODE))
+ node = node->parent;
+ if (node == NULL)
+ return(XML_ERR_INTERNAL_ERROR);
+ if (node->type == XML_ELEMENT_NODE)
+ doc = node->doc;
+ else
+ doc = (xmlDocPtr) node;
+ if (doc == NULL)
+ return(XML_ERR_INTERNAL_ERROR);
+
+ /*
+ * allocate a context and set-up everything not related to the
+ * node position in the tree
+ */
+ if (doc->type == XML_DOCUMENT_NODE)
+ ctxt = xmlCreateMemoryParserCtxt((char *) data, datalen);
+#ifdef LIBXML_HTML_ENABLED
+ else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ ctxt = htmlCreateMemoryParserCtxt((char *) data, datalen);
+ /*
+ * When parsing in context, it makes no sense to add implied
+ * elements like html/body/etc...
+ */
+ options |= HTML_PARSE_NOIMPLIED;
+ }
+#endif
+ else
+ return(XML_ERR_INTERNAL_ERROR);
+
+ if (ctxt == NULL)
+ return(XML_ERR_NO_MEMORY);
+
+ /*
+ * Use input doc's dict if present, else assure XML_PARSE_NODICT is set.
+ * We need a dictionary for xmlDetectSAX2, so if there's no doc dict
+ * we must wait until the last moment to free the original one.
+ */
+ if (doc->dict != NULL) {
+ if (ctxt->dict != NULL)
+ xmlDictFree(ctxt->dict);
+ ctxt->dict = doc->dict;
+ } else
+ options |= XML_PARSE_NODICT;
+
+ if (doc->encoding != NULL) {
+ xmlCharEncodingHandlerPtr hdlr;
+
+ if (ctxt->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = xmlStrdup((const xmlChar *) doc->encoding);
+
+ hdlr = xmlFindCharEncodingHandler((const char *) doc->encoding);
+ if (hdlr != NULL) {
+ xmlSwitchToEncoding(ctxt, hdlr);
+ } else {
+ return(XML_ERR_UNSUPPORTED_ENCODING);
+ }
+ }
+
+ xmlCtxtUseOptionsInternal(ctxt, options, NULL);
+ xmlDetectSAX2(ctxt);
+ ctxt->myDoc = doc;
+ /* parsing in context, i.e. as within existing content */
+ ctxt->instate = XML_PARSER_CONTENT;
+
+ fake = xmlNewComment(NULL);
+ if (fake == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(XML_ERR_NO_MEMORY);
+ }
+ xmlAddChild(node, fake);
+
+ if (node->type == XML_ELEMENT_NODE) {
+ nodePush(ctxt, node);
+ /*
+ * initialize the SAX2 namespaces stack
+ */
+ cur = node;
+ while ((cur != NULL) && (cur->type == XML_ELEMENT_NODE)) {
+ xmlNsPtr ns = cur->nsDef;
+ const xmlChar *iprefix, *ihref;
+
+ while (ns != NULL) {
+ if (ctxt->dict) {
+ iprefix = xmlDictLookup(ctxt->dict, ns->prefix, -1);
+ ihref = xmlDictLookup(ctxt->dict, ns->href, -1);
+ } else {
+ iprefix = ns->prefix;
+ ihref = ns->href;
+ }
+
+ if (xmlGetNamespace(ctxt, iprefix) == NULL) {
+ nsPush(ctxt, iprefix, ihref);
+ nsnr++;
+ }
+ ns = ns->next;
+ }
+ cur = cur->parent;
+ }
+ }
+
+ if ((ctxt->validate) || (ctxt->replaceEntities != 0)) {
+ /*
+ * ID/IDREF registration will be done in xmlValidateElement below
+ */
+ ctxt->loadsubset |= XML_SKIP_IDS;
+ }
+
+#ifdef LIBXML_HTML_ENABLED
+ if (doc->type == XML_HTML_DOCUMENT_NODE)
+ __htmlParseContent(ctxt);
+ else
+#endif
+ xmlParseContent(ctxt);
+
+ nsPop(ctxt, nsnr);
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+ if ((ctxt->node != NULL) && (ctxt->node != node)) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ ctxt->wellFormed = 0;
+ }
+
+ if (!ctxt->wellFormed) {
+ if (ctxt->errNo == 0)
+ ret = XML_ERR_INTERNAL_ERROR;
+ else
+ ret = (xmlParserErrors)ctxt->errNo;
+ } else {
+ ret = XML_ERR_OK;
+ }
+
+ /*
+ * Return the newly created nodeset after unlinking it from
+ * the pseudo sibling.
+ */
+
+ cur = fake->next;
+ fake->next = NULL;
+ node->last = fake;
+
+ if (cur != NULL) {
+ cur->prev = NULL;
+ }
+
+ *lst = cur;
+
+ while (cur != NULL) {
+ cur->parent = NULL;
+ cur = cur->next;
+ }
+
+ xmlUnlinkNode(fake);
+ xmlFreeNode(fake);
+
+
+ if (ret != XML_ERR_OK) {
+ xmlFreeNodeList(*lst);
+ *lst = NULL;
+ }
+
+ if (doc->dict != NULL)
+ ctxt->dict = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+#else /* !SAX2 */
+ return(XML_ERR_INTERNAL_ERROR);
+#endif
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlParseBalancedChunkMemoryRecover:
+ * @doc: the document the chunk pertains to
+ * @sax: the SAX handler bloc (possibly NULL)
+ * @user_data: The user data returned on SAX callbacks (possibly NULL)
+ * @depth: Used for loop detection, use 0
+ * @string: the input string in UTF8 or ISO-Latin (zero terminated)
+ * @lst: the return value for the set of parsed nodes
+ * @recover: return nodes even if the data is broken (use 0)
+ *
+ *
+ * Parse a well-balanced chunk of an XML document
+ * called by the parser
+ * The allowed sequence for the Well Balanced Chunk is the one defined by
+ * the content production in the XML grammar:
+ *
+ * [43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
+ *
+ * Returns 0 if the chunk is well balanced, -1 in case of args problem and
+ * the parser error code otherwise
+ *
+ * In case recover is set to 1, the nodelist will not be empty even if
+ * the parsed chunk is not well balanced, assuming the parsing succeeded to
+ * some extent.
+ */
+int
+xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax,
+ void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst,
+ int recover) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr newDoc;
+ xmlSAXHandlerPtr oldsax = NULL;
+ xmlNodePtr content, newRoot;
+ int size;
+ int ret = 0;
+
+ if (depth > 40) {
+ return(XML_ERR_ENTITY_LOOP);
+ }
+
+
+ if (lst != NULL)
+ *lst = NULL;
+ if (string == NULL)
+ return(-1);
+
+ size = xmlStrlen(string);
+
+ ctxt = xmlCreateMemoryParserCtxt((char *) string, size);
+ if (ctxt == NULL) return(-1);
+ ctxt->userData = ctxt;
+ if (sax != NULL) {
+ oldsax = ctxt->sax;
+ ctxt->sax = sax;
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+ }
+ newDoc = xmlNewDoc(BAD_CAST "1.0");
+ if (newDoc == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(-1);
+ }
+ newDoc->properties = XML_DOC_INTERNAL;
+ if ((doc != NULL) && (doc->dict != NULL)) {
+ xmlDictFree(ctxt->dict);
+ ctxt->dict = doc->dict;
+ xmlDictReference(ctxt->dict);
+ ctxt->str_xml = xmlDictLookup(ctxt->dict, BAD_CAST "xml", 3);
+ ctxt->str_xmlns = xmlDictLookup(ctxt->dict, BAD_CAST "xmlns", 5);
+ ctxt->str_xml_ns = xmlDictLookup(ctxt->dict, XML_XML_NAMESPACE, 36);
+ ctxt->dictNames = 1;
+ } else {
+ xmlCtxtUseOptionsInternal(ctxt, XML_PARSE_NODICT, NULL);
+ }
+ if (doc != NULL) {
+ newDoc->intSubset = doc->intSubset;
+ newDoc->extSubset = doc->extSubset;
+ }
+ newRoot = xmlNewDocNode(newDoc, NULL, BAD_CAST "pseudoroot", NULL);
+ if (newRoot == NULL) {
+ if (sax != NULL)
+ ctxt->sax = oldsax;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ xmlFreeDoc(newDoc);
+ return(-1);
+ }
+ xmlAddChild((xmlNodePtr) newDoc, newRoot);
+ nodePush(ctxt, newRoot);
+ if (doc == NULL) {
+ ctxt->myDoc = newDoc;
+ } else {
+ ctxt->myDoc = newDoc;
+ newDoc->children->doc = doc;
+ /* Ensure that doc has XML spec namespace */
+ xmlSearchNsByHref(doc, (xmlNodePtr)doc, XML_XML_NAMESPACE);
+ newDoc->oldNs = doc->oldNs;
+ }
+ ctxt->instate = XML_PARSER_CONTENT;
+ ctxt->depth = depth;
+
+ /*
+ * Doing validity checking on chunk doesn't make sense
+ */
+ ctxt->validate = 0;
+ ctxt->loadsubset = 0;
+ xmlDetectSAX2(ctxt);
+
+ if ( doc != NULL ){
+ content = doc->children;
+ doc->children = NULL;
+ xmlParseContent(ctxt);
+ doc->children = content;
+ }
+ else {
+ xmlParseContent(ctxt);
+ }
+ if ((RAW == '<') && (NXT(1) == '/')) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ } else if (RAW != 0) {
+ xmlFatalErr(ctxt, XML_ERR_EXTRA_CONTENT, NULL);
+ }
+ if (ctxt->node != newDoc->children) {
+ xmlFatalErr(ctxt, XML_ERR_NOT_WELL_BALANCED, NULL);
+ }
+
+ if (!ctxt->wellFormed) {
+ if (ctxt->errNo == 0)
+ ret = 1;
+ else
+ ret = ctxt->errNo;
+ } else {
+ ret = 0;
+ }
+
+ if ((lst != NULL) && ((ret == 0) || (recover == 1))) {
+ xmlNodePtr cur;
+
+ /*
+ * Return the newly created nodeset after unlinking it from
+ * they pseudo parent.
+ */
+ cur = newDoc->children->children;
+ *lst = cur;
+ while (cur != NULL) {
+ xmlSetTreeDoc(cur, doc);
+ cur->parent = NULL;
+ cur = cur->next;
+ }
+ newDoc->children->children = NULL;
+ }
+
+ if (sax != NULL)
+ ctxt->sax = oldsax;
+ xmlFreeParserCtxt(ctxt);
+ newDoc->intSubset = NULL;
+ newDoc->extSubset = NULL;
+ newDoc->oldNs = NULL;
+ xmlFreeDoc(newDoc);
+
+ return(ret);
+}
+
+/**
+ * xmlSAXParseEntity:
+ * @sax: the SAX handler block
+ * @filename: the filename
+ *
+ * parse an XML external entity out of context and build a tree.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * [78] extParsedEnt ::= TextDecl? content
+ *
+ * This correspond to a "Well Balanced" chunk
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlSAXParseEntity(xmlSAXHandlerPtr sax, const char *filename) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr ctxt;
+
+ ctxt = xmlCreateFileParserCtxt(filename);
+ if (ctxt == NULL) {
+ return(NULL);
+ }
+ if (sax != NULL) {
+ if (ctxt->sax != NULL)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ ctxt->userData = NULL;
+ }
+
+ xmlParseExtParsedEnt(ctxt);
+
+ if (ctxt->wellFormed)
+ ret = ctxt->myDoc;
+ else {
+ ret = NULL;
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL)
+ ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlParseEntity:
+ * @filename: the filename
+ *
+ * parse an XML external entity out of context and build a tree.
+ *
+ * [78] extParsedEnt ::= TextDecl? content
+ *
+ * This correspond to a "Well Balanced" chunk
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlParseEntity(const char *filename) {
+ return(xmlSAXParseEntity(NULL, filename));
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/**
+ * xmlCreateEntityParserCtxtInternal:
+ * @URL: the entity URL
+ * @ID: the entity PUBLIC ID
+ * @base: a possible base for the target URI
+ * @pctx: parser context used to set options on new context
+ *
+ * Create a parser context for an external entity
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+static xmlParserCtxtPtr
+xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID,
+ const xmlChar *base, xmlParserCtxtPtr pctx) {
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr inputStream;
+ char *directory = NULL;
+ xmlChar *uri;
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ return(NULL);
+ }
+
+ if (pctx != NULL) {
+ ctxt->options = pctx->options;
+ ctxt->_private = pctx->_private;
+ }
+
+ uri = xmlBuildURI(URL, base);
+
+ if (uri == NULL) {
+ inputStream = xmlLoadExternalEntity((char *)URL, (char *)ID, ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputPush(ctxt, inputStream);
+
+ if ((ctxt->directory == NULL) && (directory == NULL))
+ directory = xmlParserGetDirectory((char *)URL);
+ if ((ctxt->directory == NULL) && (directory != NULL))
+ ctxt->directory = directory;
+ } else {
+ inputStream = xmlLoadExternalEntity((char *)uri, (char *)ID, ctxt);
+ if (inputStream == NULL) {
+ xmlFree(uri);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputPush(ctxt, inputStream);
+
+ if ((ctxt->directory == NULL) && (directory == NULL))
+ directory = xmlParserGetDirectory((char *)uri);
+ if ((ctxt->directory == NULL) && (directory != NULL))
+ ctxt->directory = directory;
+ xmlFree(uri);
+ }
+ return(ctxt);
+}
+
+/**
+ * xmlCreateEntityParserCtxt:
+ * @URL: the entity URL
+ * @ID: the entity PUBLIC ID
+ * @base: a possible base for the target URI
+ *
+ * Create a parser context for an external entity
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID,
+ const xmlChar *base) {
+ return xmlCreateEntityParserCtxtInternal(URL, ID, base, NULL);
+
+}
+
+/************************************************************************
+ * *
+ * Front ends when parsing from a file *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCreateURLParserCtxt:
+ * @filename: the filename or URL
+ * @options: a combination of xmlParserOption
+ *
+ * Create a parser context for a file or URL content.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time and for file accesses
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateURLParserCtxt(const char *filename, int options)
+{
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr inputStream;
+ char *directory = NULL;
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlErrMemory(NULL, "cannot allocate parser context");
+ return(NULL);
+ }
+
+ if (options)
+ xmlCtxtUseOptionsInternal(ctxt, options, NULL);
+ ctxt->linenumbers = 1;
+
+ inputStream = xmlLoadExternalEntity(filename, NULL, ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ inputPush(ctxt, inputStream);
+ if ((ctxt->directory == NULL) && (directory == NULL))
+ directory = xmlParserGetDirectory(filename);
+ if ((ctxt->directory == NULL) && (directory != NULL))
+ ctxt->directory = directory;
+
+ return(ctxt);
+}
+
+/**
+ * xmlCreateFileParserCtxt:
+ * @filename: the filename
+ *
+ * Create a parser context for a file content.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateFileParserCtxt(const char *filename)
+{
+ return(xmlCreateURLParserCtxt(filename, 0));
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlSAXParseFileWithData:
+ * @sax: the SAX handler block
+ * @filename: the filename
+ * @recovery: work in recovery mode, i.e. tries to read no Well Formed
+ * documents
+ * @data: the userdata
+ *
+ * parse an XML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * User data (void *) is stored within the parser context in the
+ * context's _private member, so it is available nearly everywhere in libxml
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename,
+ int recovery, void *data) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+
+ ctxt = xmlCreateFileParserCtxt(filename);
+ if (ctxt == NULL) {
+ return(NULL);
+ }
+ if (sax != NULL) {
+ if (ctxt->sax != NULL)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ }
+ xmlDetectSAX2(ctxt);
+ if (data!=NULL) {
+ ctxt->_private = data;
+ }
+
+ if (ctxt->directory == NULL)
+ ctxt->directory = xmlParserGetDirectory(filename);
+
+ ctxt->recovery = recovery;
+
+ xmlParseDocument(ctxt);
+
+ if ((ctxt->wellFormed) || recovery) {
+ ret = ctxt->myDoc;
+ if (ret != NULL) {
+ if (ctxt->input->buf->compressed > 0)
+ ret->compression = 9;
+ else
+ ret->compression = ctxt->input->buf->compressed;
+ }
+ }
+ else {
+ ret = NULL;
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL)
+ ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlSAXParseFile:
+ * @sax: the SAX handler block
+ * @filename: the filename
+ * @recovery: work in recovery mode, i.e. tries to read no Well Formed
+ * documents
+ *
+ * parse an XML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename,
+ int recovery) {
+ return(xmlSAXParseFileWithData(sax,filename,recovery,NULL));
+}
+
+/**
+ * xmlRecoverDoc:
+ * @cur: a pointer to an array of xmlChar
+ *
+ * parse an XML in-memory document and build a tree.
+ * In the case the document is not Well Formed, a attempt to build a
+ * tree is tried anyway
+ *
+ * Returns the resulting document tree or NULL in case of failure
+ */
+
+xmlDocPtr
+xmlRecoverDoc(const xmlChar *cur) {
+ return(xmlSAXParseDoc(NULL, cur, 1));
+}
+
+/**
+ * xmlParseFile:
+ * @filename: the filename
+ *
+ * parse an XML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ *
+ * Returns the resulting document tree if the file was wellformed,
+ * NULL otherwise.
+ */
+
+xmlDocPtr
+xmlParseFile(const char *filename) {
+ return(xmlSAXParseFile(NULL, filename, 0));
+}
+
+/**
+ * xmlRecoverFile:
+ * @filename: the filename
+ *
+ * parse an XML file and build a tree. Automatic support for ZLIB/Compress
+ * compressed document is provided by default if found at compile-time.
+ * In the case the document is not Well Formed, it attempts to build
+ * a tree anyway
+ *
+ * Returns the resulting document tree or NULL in case of failure
+ */
+
+xmlDocPtr
+xmlRecoverFile(const char *filename) {
+ return(xmlSAXParseFile(NULL, filename, 1));
+}
+
+
+/**
+ * xmlSetupParserForBuffer:
+ * @ctxt: an XML parser context
+ * @buffer: a xmlChar * buffer
+ * @filename: a file name
+ *
+ * Setup the parser context to parse a new buffer; Clears any prior
+ * contents from the parser context. The buffer parameter must not be
+ * NULL, but the filename parameter can be
+ */
+void
+xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
+ const char* filename)
+{
+ xmlParserInputPtr input;
+
+ if ((ctxt == NULL) || (buffer == NULL))
+ return;
+
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ xmlErrMemory(NULL, "parsing new buffer: out of memory\n");
+ xmlClearParserCtxt(ctxt);
+ return;
+ }
+
+ xmlClearParserCtxt(ctxt);
+ if (filename != NULL)
+ input->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
+ input->base = buffer;
+ input->cur = buffer;
+ input->end = &buffer[xmlStrlen(buffer)];
+ inputPush(ctxt, input);
+}
+
+/**
+ * xmlSAXUserParseFile:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @filename: a file name
+ *
+ * parse an XML file and call the given SAX handler routines.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ *
+ * Returns 0 in case of success or a error number otherwise
+ */
+int
+xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
+ const char *filename) {
+ int ret = 0;
+ xmlParserCtxtPtr ctxt;
+
+ ctxt = xmlCreateFileParserCtxt(filename);
+ if (ctxt == NULL) return -1;
+ if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ xmlDetectSAX2(ctxt);
+
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+
+ xmlParseDocument(ctxt);
+
+ if (ctxt->wellFormed)
+ ret = 0;
+ else {
+ if (ctxt->errNo != 0)
+ ret = ctxt->errNo;
+ else
+ ret = -1;
+ }
+ if (sax != NULL)
+ ctxt->sax = NULL;
+ if (ctxt->myDoc != NULL) {
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ xmlFreeParserCtxt(ctxt);
+
+ return ret;
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/************************************************************************
+ * *
+ * Front ends when parsing from memory *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCreateMemoryParserCtxt:
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ *
+ * Create a parser context for an XML in-memory document.
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateMemoryParserCtxt(const char *buffer, int size) {
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputPtr input;
+ xmlParserInputBufferPtr buf;
+
+ if (buffer == NULL)
+ return(NULL);
+ if (size <= 0)
+ return(NULL);
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL)
+ return(NULL);
+
+ /* TODO: xmlParserInputBufferCreateStatic, requires some serious changes */
+ buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+
+ input->filename = NULL;
+ input->buf = buf;
+ xmlBufResetInput(input->buf->buffer, input);
+
+ inputPush(ctxt, input);
+ return(ctxt);
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlSAXParseMemoryWithData:
+ * @sax: the SAX handler block
+ * @buffer: an pointer to a char array
+ * @size: the size of the array
+ * @recovery: work in recovery mode, i.e. tries to read no Well Formed
+ * documents
+ * @data: the userdata
+ *
+ * parse an XML in-memory block and use the given SAX function block
+ * to handle the parsing callback. If sax is NULL, fallback to the default
+ * DOM tree building routines.
+ *
+ * User data (void *) is stored within the parser context in the
+ * context's _private member, so it is available nearly everywhere in libxml
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer,
+ int size, int recovery, void *data) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+
+ ctxt = xmlCreateMemoryParserCtxt(buffer, size);
+ if (ctxt == NULL) return(NULL);
+ if (sax != NULL) {
+ if (ctxt->sax != NULL)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ }
+ xmlDetectSAX2(ctxt);
+ if (data!=NULL) {
+ ctxt->_private=data;
+ }
+
+ ctxt->recovery = recovery;
+
+ xmlParseDocument(ctxt);
+
+ if ((ctxt->wellFormed) || recovery) ret = ctxt->myDoc;
+ else {
+ ret = NULL;
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL)
+ ctxt->sax = NULL;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlSAXParseMemory:
+ * @sax: the SAX handler block
+ * @buffer: an pointer to a char array
+ * @size: the size of the array
+ * @recovery: work in recovery mode, i.e. tries to read not Well Formed
+ * documents
+ *
+ * parse an XML in-memory block and use the given SAX function block
+ * to handle the parsing callback. If sax is NULL, fallback to the default
+ * DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlSAXParseMemory(xmlSAXHandlerPtr sax, const char *buffer,
+ int size, int recovery) {
+ return xmlSAXParseMemoryWithData(sax, buffer, size, recovery, NULL);
+}
+
+/**
+ * xmlParseMemory:
+ * @buffer: an pointer to a char array
+ * @size: the size of the array
+ *
+ * parse an XML in-memory block and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr xmlParseMemory(const char *buffer, int size) {
+ return(xmlSAXParseMemory(NULL, buffer, size, 0));
+}
+
+/**
+ * xmlRecoverMemory:
+ * @buffer: an pointer to a char array
+ * @size: the size of the array
+ *
+ * parse an XML in-memory block and build a tree.
+ * In the case the document is not Well Formed, an attempt to
+ * build a tree is tried anyway
+ *
+ * Returns the resulting document tree or NULL in case of error
+ */
+
+xmlDocPtr xmlRecoverMemory(const char *buffer, int size) {
+ return(xmlSAXParseMemory(NULL, buffer, size, 1));
+}
+
+/**
+ * xmlSAXUserParseMemory:
+ * @sax: a SAX handler
+ * @user_data: The user data returned on SAX callbacks
+ * @buffer: an in-memory XML document input
+ * @size: the length of the XML document in bytes
+ *
+ * A better SAX parsing routine.
+ * parse an XML in-memory buffer and call the given SAX handler routines.
+ *
+ * Returns 0 in case of success or a error number otherwise
+ */
+int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data,
+ const char *buffer, int size) {
+ int ret = 0;
+ xmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+
+ ctxt = xmlCreateMemoryParserCtxt(buffer, size);
+ if (ctxt == NULL) return -1;
+ if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
+ xmlFree(ctxt->sax);
+ ctxt->sax = sax;
+ xmlDetectSAX2(ctxt);
+
+ if (user_data != NULL)
+ ctxt->userData = user_data;
+
+ xmlParseDocument(ctxt);
+
+ if (ctxt->wellFormed)
+ ret = 0;
+ else {
+ if (ctxt->errNo != 0)
+ ret = ctxt->errNo;
+ else
+ ret = -1;
+ }
+ if (sax != NULL)
+ ctxt->sax = NULL;
+ if (ctxt->myDoc != NULL) {
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ xmlFreeParserCtxt(ctxt);
+
+ return ret;
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+/**
+ * xmlCreateDocParserCtxt:
+ * @cur: a pointer to an array of xmlChar
+ *
+ * Creates a parser context for an XML in-memory document.
+ *
+ * Returns the new parser context or NULL
+ */
+xmlParserCtxtPtr
+xmlCreateDocParserCtxt(const xmlChar *cur) {
+ int len;
+
+ if (cur == NULL)
+ return(NULL);
+ len = xmlStrlen(cur);
+ return(xmlCreateMemoryParserCtxt((const char *)cur, len));
+}
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * xmlSAXParseDoc:
+ * @sax: the SAX handler block
+ * @cur: a pointer to an array of xmlChar
+ * @recovery: work in recovery mode, i.e. tries to read no Well Formed
+ * documents
+ *
+ * parse an XML in-memory document and build a tree.
+ * It use the given SAX function block to handle the parsing callback.
+ * If sax is NULL, fallback to the default DOM tree building routines.
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlSAXParseDoc(xmlSAXHandlerPtr sax, const xmlChar *cur, int recovery) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr ctxt;
+ xmlSAXHandlerPtr oldsax = NULL;
+
+ if (cur == NULL) return(NULL);
+
+
+ ctxt = xmlCreateDocParserCtxt(cur);
+ if (ctxt == NULL) return(NULL);
+ if (sax != NULL) {
+ oldsax = ctxt->sax;
+ ctxt->sax = sax;
+ ctxt->userData = NULL;
+ }
+ xmlDetectSAX2(ctxt);
+
+ xmlParseDocument(ctxt);
+ if ((ctxt->wellFormed) || recovery) ret = ctxt->myDoc;
+ else {
+ ret = NULL;
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ if (sax != NULL)
+ ctxt->sax = oldsax;
+ xmlFreeParserCtxt(ctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlParseDoc:
+ * @cur: a pointer to an array of xmlChar
+ *
+ * parse an XML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+
+xmlDocPtr
+xmlParseDoc(const xmlChar *cur) {
+ return(xmlSAXParseDoc(NULL, cur, 0));
+}
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef LIBXML_LEGACY_ENABLED
+/************************************************************************
+ * *
+ * Specific function to keep track of entities references *
+ * and used by the XSLT debugger *
+ * *
+ ************************************************************************/
+
+static xmlEntityReferenceFunc xmlEntityRefFunc = NULL;
+
+/**
+ * xmlAddEntityReference:
+ * @ent : A valid entity
+ * @firstNode : A valid first node for children of entity
+ * @lastNode : A valid last node of children entity
+ *
+ * Notify of a reference to an entity of type XML_EXTERNAL_GENERAL_PARSED_ENTITY
+ */
+static void
+xmlAddEntityReference(xmlEntityPtr ent, xmlNodePtr firstNode,
+ xmlNodePtr lastNode)
+{
+ if (xmlEntityRefFunc != NULL) {
+ (*xmlEntityRefFunc) (ent, firstNode, lastNode);
+ }
+}
+
+
+/**
+ * xmlSetEntityReferenceFunc:
+ * @func: A valid function
+ *
+ * Set the function to call call back when a xml reference has been made
+ */
+void
+xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func)
+{
+ xmlEntityRefFunc = func;
+}
+#endif /* LIBXML_LEGACY_ENABLED */
+
+/************************************************************************
+ * *
+ * Miscellaneous *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_XPATH_ENABLED
+#include <libxml/xpath.h>
+#endif
+
+extern void XMLCDECL xmlGenericErrorDefaultFunc(void *ctx, const char *msg, ...);
+static int xmlParserInitialized = 0;
+
+/**
+ * xmlInitParser:
+ *
+ * Initialization function for the XML parser.
+ * This is not reentrant. Call once before processing in case of
+ * use in multithreaded programs.
+ */
+
+void
+xmlInitParser(void) {
+ if (xmlParserInitialized != 0)
+ return;
+
+#ifdef LIBXML_THREAD_ENABLED
+ __xmlGlobalInitMutexLock();
+ if (xmlParserInitialized == 0) {
+#endif
+ xmlInitThreads();
+ xmlInitGlobals();
+ if ((xmlGenericError == xmlGenericErrorDefaultFunc) ||
+ (xmlGenericError == NULL))
+ initGenericErrorDefaultFunc(NULL);
+ xmlInitMemory();
+ xmlInitializeDict();
+ xmlInitCharEncodingHandlers();
+ xmlDefaultSAXHandlerInit();
+ xmlRegisterDefaultInputCallbacks();
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlRegisterDefaultOutputCallbacks();
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_HTML_ENABLED
+ htmlInitAutoClose();
+ htmlDefaultSAXHandlerInit();
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+ xmlXPathInit();
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+ xmlInitializeCatalog();
+#endif
+ xmlParserInitialized = 1;
+#ifdef LIBXML_THREAD_ENABLED
+ }
+ __xmlGlobalInitMutexUnlock();
+#endif
+}
+
+/**
+ * xmlCleanupParser:
+ *
+ * This function name is somewhat misleading. It does not clean up
+ * parser state, it cleans up memory allocated by the library itself.
+ * It is a cleanup function for the XML library. It tries to reclaim all
+ * related global memory allocated for the library processing.
+ * It doesn't deallocate any document related memory. One should
+ * call xmlCleanupParser() only when the process has finished using
+ * the library and all XML/HTML documents built with it.
+ * See also xmlInitParser() which has the opposite function of preparing
+ * the library for operations.
+ *
+ * WARNING: if your application is multithreaded or has plugin support
+ * calling this may crash the application if another thread or
+ * a plugin is still using libxml2. It's sometimes very hard to
+ * guess if libxml2 is in use in the application, some libraries
+ * or plugins may use it without notice. In case of doubt abstain
+ * from calling this function or do it just before calling exit()
+ * to avoid leak reports from valgrind !
+ */
+
+void
+xmlCleanupParser(void) {
+ if (!xmlParserInitialized)
+ return;
+
+ xmlCleanupCharEncodingHandlers();
+#ifdef LIBXML_CATALOG_ENABLED
+ xmlCatalogCleanup();
+#endif
+ xmlDictCleanup();
+ xmlCleanupInputCallbacks();
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlCleanupOutputCallbacks();
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+ xmlSchemaCleanupTypes();
+ xmlRelaxNGCleanupTypes();
+#endif
+ xmlResetLastError();
+ xmlCleanupGlobals();
+ xmlCleanupThreads(); /* must be last if called not from the main thread */
+ xmlCleanupMemory();
+ xmlParserInitialized = 0;
+}
+
+/************************************************************************
+ * *
+ * New set (2.6.0) of simpler and more flexible APIs *
+ * *
+ ************************************************************************/
+
+/**
+ * DICT_FREE:
+ * @str: a string
+ *
+ * Free a string if it is not owned by the "dict" dictionnary in the
+ * current scope
+ */
+#define DICT_FREE(str) \
+ if ((str) && ((!dict) || \
+ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
+ xmlFree((char *)(str));
+
+/**
+ * xmlCtxtReset:
+ * @ctxt: an XML parser context
+ *
+ * Reset a parser context
+ */
+void
+xmlCtxtReset(xmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr input;
+ xmlDictPtr dict;
+
+ if (ctxt == NULL)
+ return;
+
+ dict = ctxt->dict;
+
+ while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
+ xmlFreeInputStream(input);
+ }
+ ctxt->inputNr = 0;
+ ctxt->input = NULL;
+
+ ctxt->spaceNr = 0;
+ if (ctxt->spaceTab != NULL) {
+ ctxt->spaceTab[0] = -1;
+ ctxt->space = &ctxt->spaceTab[0];
+ } else {
+ ctxt->space = NULL;
+ }
+
+
+ ctxt->nodeNr = 0;
+ ctxt->node = NULL;
+
+ ctxt->nameNr = 0;
+ ctxt->name = NULL;
+
+ DICT_FREE(ctxt->version);
+ ctxt->version = NULL;
+ DICT_FREE(ctxt->encoding);
+ ctxt->encoding = NULL;
+ DICT_FREE(ctxt->directory);
+ ctxt->directory = NULL;
+ DICT_FREE(ctxt->extSubURI);
+ ctxt->extSubURI = NULL;
+ DICT_FREE(ctxt->extSubSystem);
+ ctxt->extSubSystem = NULL;
+ if (ctxt->myDoc != NULL)
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+
+ ctxt->standalone = -1;
+ ctxt->hasExternalSubset = 0;
+ ctxt->hasPErefs = 0;
+ ctxt->html = 0;
+ ctxt->external = 0;
+ ctxt->instate = XML_PARSER_START;
+ ctxt->token = 0;
+
+ ctxt->wellFormed = 1;
+ ctxt->nsWellFormed = 1;
+ ctxt->disableSAX = 0;
+ ctxt->valid = 1;
+#if 0
+ ctxt->vctxt.userData = ctxt;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+#endif
+ ctxt->record_info = 0;
+ ctxt->nbChars = 0;
+ ctxt->checkIndex = 0;
+ ctxt->inSubset = 0;
+ ctxt->errNo = XML_ERR_OK;
+ ctxt->depth = 0;
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->catalogs = NULL;
+ ctxt->nbentities = 0;
+ ctxt->sizeentities = 0;
+ ctxt->sizeentcopy = 0;
+ xmlInitNodeInfoSeq(&ctxt->node_seq);
+
+ if (ctxt->attsDefault != NULL) {
+ xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
+ ctxt->attsDefault = NULL;
+ }
+ if (ctxt->attsSpecial != NULL) {
+ xmlHashFree(ctxt->attsSpecial, NULL);
+ ctxt->attsSpecial = NULL;
+ }
+
+#ifdef LIBXML_CATALOG_ENABLED
+ if (ctxt->catalogs != NULL)
+ xmlCatalogFreeLocal(ctxt->catalogs);
+#endif
+ if (ctxt->lastError.code != XML_ERR_OK)
+ xmlResetError(&ctxt->lastError);
+}
+
+/**
+ * xmlCtxtResetPush:
+ * @ctxt: an XML parser context
+ * @chunk: a pointer to an array of chars
+ * @size: number of chars in the array
+ * @filename: an optional file name or URI
+ * @encoding: the document encoding, or NULL
+ *
+ * Reset a push parser context
+ *
+ * Returns 0 in case of success and 1 in case of error
+ */
+int
+xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk,
+ int size, const char *filename, const char *encoding)
+{
+ xmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+ xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+
+ if (ctxt == NULL)
+ return(1);
+
+ if ((encoding == NULL) && (chunk != NULL) && (size >= 4))
+ enc = xmlDetectCharEncoding((const xmlChar *) chunk, size);
+
+ buf = xmlAllocParserInputBuffer(enc);
+ if (buf == NULL)
+ return(1);
+
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return(1);
+ }
+
+ xmlCtxtReset(ctxt);
+
+ if (ctxt->pushTab == NULL) {
+ ctxt->pushTab = (void **) xmlMalloc(ctxt->nameMax * 3 *
+ sizeof(xmlChar *));
+ if (ctxt->pushTab == NULL) {
+ xmlErrMemory(ctxt, NULL);
+ xmlFreeParserInputBuffer(buf);
+ return(1);
+ }
+ }
+
+ if (filename == NULL) {
+ ctxt->directory = NULL;
+ } else {
+ ctxt->directory = xmlParserGetDirectory(filename);
+ }
+
+ inputStream = xmlNewInputStream(ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return(1);
+ }
+
+ if (filename == NULL)
+ inputStream->filename = NULL;
+ else
+ inputStream->filename = (char *)
+ xmlCanonicPath((const xmlChar *) filename);
+ inputStream->buf = buf;
+ xmlBufResetInput(buf->buffer, inputStream);
+
+ inputPush(ctxt, inputStream);
+
+ if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->buf != NULL)) {
+ size_t base = xmlBufGetInputBase(ctxt->input->buf->buffer, ctxt->input);
+ size_t cur = ctxt->input->cur - ctxt->input->base;
+
+ xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+
+ xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
+#ifdef DEBUG_PUSH
+ xmlGenericError(xmlGenericErrorContext, "PP: pushed %d\n", size);
+#endif
+ }
+
+ if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr hdlr;
+
+ if (ctxt->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = xmlStrdup((const xmlChar *) encoding);
+
+ hdlr = xmlFindCharEncodingHandler(encoding);
+ if (hdlr != NULL) {
+ xmlSwitchToEncoding(ctxt, hdlr);
+ } else {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "Unsupported encoding %s\n", BAD_CAST encoding);
+ }
+ } else if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ return(0);
+}
+
+
+/**
+ * xmlCtxtUseOptionsInternal:
+ * @ctxt: an XML parser context
+ * @options: a combination of xmlParserOption
+ * @encoding: the user provided encoding to use
+ *
+ * Applies the options to the parser context
+ *
+ * Returns 0 in case of success, the set of unknown or unimplemented options
+ * in case of error.
+ */
+static int
+xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encoding)
+{
+ if (ctxt == NULL)
+ return(-1);
+ if (encoding != NULL) {
+ if (ctxt->encoding != NULL)
+ xmlFree((xmlChar *) ctxt->encoding);
+ ctxt->encoding = xmlStrdup((const xmlChar *) encoding);
+ }
+ if (options & XML_PARSE_RECOVER) {
+ ctxt->recovery = 1;
+ options -= XML_PARSE_RECOVER;
+ ctxt->options |= XML_PARSE_RECOVER;
+ } else
+ ctxt->recovery = 0;
+ if (options & XML_PARSE_DTDLOAD) {
+ ctxt->loadsubset = XML_DETECT_IDS;
+ options -= XML_PARSE_DTDLOAD;
+ ctxt->options |= XML_PARSE_DTDLOAD;
+ } else
+ ctxt->loadsubset = 0;
+ if (options & XML_PARSE_DTDATTR) {
+ ctxt->loadsubset |= XML_COMPLETE_ATTRS;
+ options -= XML_PARSE_DTDATTR;
+ ctxt->options |= XML_PARSE_DTDATTR;
+ }
+ if (options & XML_PARSE_NOENT) {
+ ctxt->replaceEntities = 1;
+ /* ctxt->loadsubset |= XML_DETECT_IDS; */
+ options -= XML_PARSE_NOENT;
+ ctxt->options |= XML_PARSE_NOENT;
+ } else
+ ctxt->replaceEntities = 0;
+ if (options & XML_PARSE_PEDANTIC) {
+ ctxt->pedantic = 1;
+ options -= XML_PARSE_PEDANTIC;
+ ctxt->options |= XML_PARSE_PEDANTIC;
+ } else
+ ctxt->pedantic = 0;
+ if (options & XML_PARSE_NOBLANKS) {
+ ctxt->keepBlanks = 0;
+ ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ options -= XML_PARSE_NOBLANKS;
+ ctxt->options |= XML_PARSE_NOBLANKS;
+ } else
+ ctxt->keepBlanks = 1;
+ if (options & XML_PARSE_DTDVALID) {
+ ctxt->validate = 1;
+ if (options & XML_PARSE_NOWARNING)
+ ctxt->vctxt.warning = NULL;
+ if (options & XML_PARSE_NOERROR)
+ ctxt->vctxt.error = NULL;
+ options -= XML_PARSE_DTDVALID;
+ ctxt->options |= XML_PARSE_DTDVALID;
+ } else
+ ctxt->validate = 0;
+ if (options & XML_PARSE_NOWARNING) {
+ ctxt->sax->warning = NULL;
+ options -= XML_PARSE_NOWARNING;
+ }
+ if (options & XML_PARSE_NOERROR) {
+ ctxt->sax->error = NULL;
+ ctxt->sax->fatalError = NULL;
+ options -= XML_PARSE_NOERROR;
+ }
+#ifdef LIBXML_SAX1_ENABLED
+ if (options & XML_PARSE_SAX1) {
+ ctxt->sax->startElement = xmlSAX2StartElement;
+ ctxt->sax->endElement = xmlSAX2EndElement;
+ ctxt->sax->startElementNs = NULL;
+ ctxt->sax->endElementNs = NULL;
+ ctxt->sax->initialized = 1;
+ options -= XML_PARSE_SAX1;
+ ctxt->options |= XML_PARSE_SAX1;
+ }
+#endif /* LIBXML_SAX1_ENABLED */
+ if (options & XML_PARSE_NODICT) {
+ ctxt->dictNames = 0;
+ options -= XML_PARSE_NODICT;
+ ctxt->options |= XML_PARSE_NODICT;
+ } else {
+ ctxt->dictNames = 1;
+ }
+ if (options & XML_PARSE_NOCDATA) {
+ ctxt->sax->cdataBlock = NULL;
+ options -= XML_PARSE_NOCDATA;
+ ctxt->options |= XML_PARSE_NOCDATA;
+ }
+ if (options & XML_PARSE_NSCLEAN) {
+ ctxt->options |= XML_PARSE_NSCLEAN;
+ options -= XML_PARSE_NSCLEAN;
+ }
+ if (options & XML_PARSE_NONET) {
+ ctxt->options |= XML_PARSE_NONET;
+ options -= XML_PARSE_NONET;
+ }
+ if (options & XML_PARSE_COMPACT) {
+ ctxt->options |= XML_PARSE_COMPACT;
+ options -= XML_PARSE_COMPACT;
+ }
+ if (options & XML_PARSE_OLD10) {
+ ctxt->options |= XML_PARSE_OLD10;
+ options -= XML_PARSE_OLD10;
+ }
+ if (options & XML_PARSE_NOBASEFIX) {
+ ctxt->options |= XML_PARSE_NOBASEFIX;
+ options -= XML_PARSE_NOBASEFIX;
+ }
+ if (options & XML_PARSE_HUGE) {
+ ctxt->options |= XML_PARSE_HUGE;
+ options -= XML_PARSE_HUGE;
+ if (ctxt->dict != NULL)
+ xmlDictSetLimit(ctxt->dict, 0);
+ }
+ if (options & XML_PARSE_OLDSAX) {
+ ctxt->options |= XML_PARSE_OLDSAX;
+ options -= XML_PARSE_OLDSAX;
+ }
+ if (options & XML_PARSE_IGNORE_ENC) {
+ ctxt->options |= XML_PARSE_IGNORE_ENC;
+ options -= XML_PARSE_IGNORE_ENC;
+ }
+ if (options & XML_PARSE_BIG_LINES) {
+ ctxt->options |= XML_PARSE_BIG_LINES;
+ options -= XML_PARSE_BIG_LINES;
+ }
+ ctxt->linenumbers = 1;
+ return (options);
+}
+
+/**
+ * xmlCtxtUseOptions:
+ * @ctxt: an XML parser context
+ * @options: a combination of xmlParserOption
+ *
+ * Applies the options to the parser context
+ *
+ * Returns 0 in case of success, the set of unknown or unimplemented options
+ * in case of error.
+ */
+int
+xmlCtxtUseOptions(xmlParserCtxtPtr ctxt, int options)
+{
+ return(xmlCtxtUseOptionsInternal(ctxt, options, NULL));
+}
+
+/**
+ * xmlDoRead:
+ * @ctxt: an XML parser context
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ * @reuse: keep the context for reuse
+ *
+ * Common front-end for the xmlRead functions
+ *
+ * Returns the resulting document tree or NULL
+ */
+static xmlDocPtr
+xmlDoRead(xmlParserCtxtPtr ctxt, const char *URL, const char *encoding,
+ int options, int reuse)
+{
+ xmlDocPtr ret;
+
+ xmlCtxtUseOptionsInternal(ctxt, options, encoding);
+ if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr hdlr;
+
+ hdlr = xmlFindCharEncodingHandler(encoding);
+ if (hdlr != NULL)
+ xmlSwitchToEncoding(ctxt, hdlr);
+ }
+ if ((URL != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->filename == NULL))
+ ctxt->input->filename = (char *) xmlStrdup((const xmlChar *) URL);
+ xmlParseDocument(ctxt);
+ if ((ctxt->wellFormed) || ctxt->recovery)
+ ret = ctxt->myDoc;
+ else {
+ ret = NULL;
+ if (ctxt->myDoc != NULL) {
+ xmlFreeDoc(ctxt->myDoc);
+ }
+ }
+ ctxt->myDoc = NULL;
+ if (!reuse) {
+ xmlFreeParserCtxt(ctxt);
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlReadDoc:
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)
+{
+ xmlParserCtxtPtr ctxt;
+
+ if (cur == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ ctxt = xmlCreateDocParserCtxt(cur);
+ if (ctxt == NULL)
+ return (NULL);
+ return (xmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * xmlReadFile:
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML file from the filesystem or the network.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlReadFile(const char *filename, const char *encoding, int options)
+{
+ xmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+ ctxt = xmlCreateURLParserCtxt(filename, options);
+ if (ctxt == NULL)
+ return (NULL);
+ return (xmlDoRead(ctxt, NULL, encoding, options, 0));
+}
+
+/**
+ * xmlReadMemory:
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML in-memory document and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)
+{
+ xmlParserCtxtPtr ctxt;
+
+ xmlInitParser();
+ ctxt = xmlCreateMemoryParserCtxt(buffer, size);
+ if (ctxt == NULL)
+ return (NULL);
+ return (xmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * xmlReadFd:
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML from a file descriptor and build a tree.
+ * NOTE that the file descriptor will not be closed when the
+ * reader is closed or reset.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlReadFd(int fd, const char *URL, const char *encoding, int options)
+{
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (fd < 0)
+ return (NULL);
+ xmlInitParser();
+
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (NULL);
+ input->closecallback = NULL;
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ xmlFreeParserCtxt(ctxt);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * xmlReadIO:
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML document from I/O functions and source and build a tree.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
+ void *ioctx, const char *URL, const char *encoding, int options)
+{
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ioread == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ xmlFreeParserCtxt(ctxt);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 0));
+}
+
+/**
+ * xmlCtxtReadDoc:
+ * @ctxt: an XML parser context
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML in-memory document and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputPtr stream;
+
+ if (cur == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ xmlCtxtReset(ctxt);
+
+ stream = xmlNewStringInputStream(ctxt, cur);
+ if (stream == NULL) {
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * xmlCtxtReadFile:
+ * @ctxt: an XML parser context
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML file from the filesystem or the network.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename,
+ const char *encoding, int options)
+{
+ xmlParserInputPtr stream;
+
+ if (filename == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ xmlCtxtReset(ctxt);
+
+ stream = xmlLoadExternalEntity(filename, NULL, ctxt);
+ if (stream == NULL) {
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, NULL, encoding, options, 1));
+}
+
+/**
+ * xmlCtxtReadMemory:
+ * @ctxt: an XML parser context
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML in-memory document and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ctxt == NULL)
+ return (NULL);
+ if (buffer == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ xmlCtxtReset(ctxt);
+
+ input = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ return(NULL);
+ }
+
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return(NULL);
+ }
+
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * xmlCtxtReadFd:
+ * @ctxt: an XML parser context
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML from a file descriptor and build a tree.
+ * This reuses the existing @ctxt parser context
+ * NOTE that the file descriptor will not be closed when the
+ * reader is closed or reset.
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlCtxtReadFd(xmlParserCtxtPtr ctxt, int fd,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (fd < 0)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ xmlCtxtReset(ctxt);
+
+
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (NULL);
+ input->closecallback = NULL;
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+/**
+ * xmlCtxtReadIO:
+ * @ctxt: an XML parser context
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML document from I/O functions and source and build a tree.
+ * This reuses the existing @ctxt parser context
+ *
+ * Returns the resulting document tree
+ */
+xmlDocPtr
+xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose, void *ioctx,
+ const char *URL,
+ const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+ xmlParserInputPtr stream;
+
+ if (ioread == NULL)
+ return (NULL);
+ if (ctxt == NULL)
+ return (NULL);
+ xmlInitParser();
+
+ xmlCtxtReset(ctxt);
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+ stream = xmlNewIOInputStream(ctxt, input, XML_CHAR_ENCODING_NONE);
+ if (stream == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ inputPush(ctxt, stream);
+ return (xmlDoRead(ctxt, URL, encoding, options, 1));
+}
+
+#define bottom_parser
+#include "elfgcchack.h"
diff --git a/parserInternals.c b/parserInternals.c
new file mode 100644
index 0000000..df204fd
--- /dev/null
+++ b/parserInternals.c
@@ -0,0 +1,2140 @@
+/*
+ * parserInternals.c : Internal routines (and obsolete ones) needed for the
+ * XML and HTML parsers.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#if defined(WIN32) && !defined (__CYGWIN__)
+#define XML_DIR_SEP '\\'
+#else
+#define XML_DIR_SEP '/'
+#endif
+
+#include <string.h>
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/encoding.h>
+#include <libxml/valid.h>
+#include <libxml/xmlIO.h>
+#include <libxml/uri.h>
+#include <libxml/dict.h>
+#include <libxml/SAX.h>
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
+#include <libxml/globals.h>
+#include <libxml/chvalid.h>
+
+#include "buf.h"
+#include "enc.h"
+
+/*
+ * Various global defaults for parsing
+ */
+
+/**
+ * xmlCheckVersion:
+ * @version: the include version number
+ *
+ * check the compiled lib version against the include one.
+ * This can warn or immediately kill the application
+ */
+void
+xmlCheckVersion(int version) {
+ int myversion = (int) LIBXML_VERSION;
+
+ xmlInitParser();
+
+ if ((myversion / 10000) != (version / 10000)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Fatal: program compiled against libxml %d using libxml %d\n",
+ (version / 10000), (myversion / 10000));
+ fprintf(stderr,
+ "Fatal: program compiled against libxml %d using libxml %d\n",
+ (version / 10000), (myversion / 10000));
+ }
+ if ((myversion / 100) < (version / 100)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Warning: program compiled against libxml %d using older %d\n",
+ (version / 100), (myversion / 100));
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+
+/**
+ * xmlErrMemory:
+ * @ctxt: an XML parser context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+void
+xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL) {
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ }
+ if (extra)
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "Memory allocation failed\n");
+}
+
+/**
+ * __xmlErrEncoding:
+ * @ctxt: an XML parser context
+ * @xmlerr: the error number
+ * @msg: the error message
+ * @str1: an string info
+ * @str2: an string info
+ *
+ * Handle an encoding error
+ */
+void
+__xmlErrEncoding(xmlParserCtxtPtr ctxt, xmlParserErrors xmlerr,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = xmlerr;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, xmlerr, XML_ERR_FATAL,
+ NULL, 0, (const char *) str1, (const char *) str2,
+ NULL, 0, 0, msg, str1, str2);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlErrInternal:
+ * @ctxt: an XML parser context
+ * @msg: the error message
+ * @str: error informations
+ *
+ * Handle an internal error
+ */
+static void
+xmlErrInternal(xmlParserCtxtPtr ctxt, const char *msg, const xmlChar * str)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = XML_ERR_INTERNAL_ERROR;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, XML_ERR_INTERNAL_ERROR,
+ XML_ERR_FATAL, NULL, 0, (const char *) str, NULL, NULL,
+ 0, 0, msg, str);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlErrEncodingInt:
+ * @ctxt: an XML parser context
+ * @error: the error number
+ * @msg: the error message
+ * @val: an integer value
+ *
+ * n encoding error
+ */
+static void
+xmlErrEncodingInt(xmlParserCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, int val)
+{
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if (ctxt != NULL)
+ ctxt->errNo = error;
+ __xmlRaiseError(NULL, NULL, NULL,
+ ctxt, NULL, XML_FROM_PARSER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
+ if (ctxt != NULL) {
+ ctxt->wellFormed = 0;
+ if (ctxt->recovery == 0)
+ ctxt->disableSAX = 1;
+ }
+}
+
+/**
+ * xmlIsLetter:
+ * @c: an unicode character (int)
+ *
+ * Check whether the character is allowed by the production
+ * [84] Letter ::= BaseChar | Ideographic
+ *
+ * Returns 0 if not, non-zero otherwise
+ */
+int
+xmlIsLetter(int c) {
+ return(IS_BASECHAR(c) || IS_IDEOGRAPHIC(c));
+}
+
+/************************************************************************
+ * *
+ * Input handling functions for progressive parsing *
+ * *
+ ************************************************************************/
+
+/* #define DEBUG_INPUT */
+/* #define DEBUG_STACK */
+/* #define DEBUG_PUSH */
+
+
+/* we need to keep enough input to show errors in context */
+#define LINE_LEN 80
+
+#ifdef DEBUG_INPUT
+#define CHECK_BUFFER(in) check_buffer(in)
+
+static
+void check_buffer(xmlParserInputPtr in) {
+ if (in->base != xmlBufContent(in->buf->buffer)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParserInput: base mismatch problem\n");
+ }
+ if (in->cur < in->base) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParserInput: cur < base problem\n");
+ }
+ if (in->cur > in->base + xmlBufUse(in->buf->buffer)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlParserInput: cur > base + use problem\n");
+ }
+ xmlGenericError(xmlGenericErrorContext,"buffer %x : content %x, cur %d, use %d\n",
+ (int) in, (int) xmlBufContent(in->buf->buffer), in->cur - in->base,
+ xmlBufUse(in->buf->buffer));
+}
+
+#else
+#define CHECK_BUFFER(in)
+#endif
+
+
+/**
+ * xmlParserInputRead:
+ * @in: an XML parser input
+ * @len: an indicative size for the lookahead
+ *
+ * This function was internal and is deprecated.
+ *
+ * Returns -1 as this is an error to use it.
+ */
+int
+xmlParserInputRead(xmlParserInputPtr in ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED) {
+ return(-1);
+}
+
+/**
+ * xmlParserInputGrow:
+ * @in: an XML parser input
+ * @len: an indicative size for the lookahead
+ *
+ * This function increase the input for the parser. It tries to
+ * preserve pointers to the input buffer, and keep already read data
+ *
+ * Returns the amount of char read, or -1 in case of error, 0 indicate the
+ * end of this entity
+ */
+int
+xmlParserInputGrow(xmlParserInputPtr in, int len) {
+ size_t ret;
+ size_t indx;
+ const xmlChar *content;
+
+ if ((in == NULL) || (len < 0)) return(-1);
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext, "Grow\n");
+#endif
+ if (in->buf == NULL) return(-1);
+ if (in->base == NULL) return(-1);
+ if (in->cur == NULL) return(-1);
+ if (in->buf->buffer == NULL) return(-1);
+
+ CHECK_BUFFER(in);
+
+ indx = in->cur - in->base;
+ if (xmlBufUse(in->buf->buffer) > (unsigned int) indx + INPUT_CHUNK) {
+
+ CHECK_BUFFER(in);
+
+ return(0);
+ }
+ if (in->buf->readcallback != NULL) {
+ ret = xmlParserInputBufferGrow(in->buf, len);
+ } else
+ return(0);
+
+ /*
+ * NOTE : in->base may be a "dangling" i.e. freed pointer in this
+ * block, but we use it really as an integer to do some
+ * pointer arithmetic. Insure will raise it as a bug but in
+ * that specific case, that's not !
+ */
+
+ content = xmlBufContent(in->buf->buffer);
+ if (in->base != content) {
+ /*
+ * the buffer has been reallocated
+ */
+ indx = in->cur - in->base;
+ in->base = content;
+ in->cur = &content[indx];
+ }
+ in->end = xmlBufEnd(in->buf->buffer);
+
+ CHECK_BUFFER(in);
+
+ return(ret);
+}
+
+/**
+ * xmlParserInputShrink:
+ * @in: an XML parser input
+ *
+ * This function removes used input for the parser.
+ */
+void
+xmlParserInputShrink(xmlParserInputPtr in) {
+ size_t used;
+ size_t ret;
+ size_t indx;
+ const xmlChar *content;
+
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext, "Shrink\n");
+#endif
+ if (in == NULL) return;
+ if (in->buf == NULL) return;
+ if (in->base == NULL) return;
+ if (in->cur == NULL) return;
+ if (in->buf->buffer == NULL) return;
+
+ CHECK_BUFFER(in);
+
+ used = in->cur - xmlBufContent(in->buf->buffer);
+ /*
+ * Do not shrink on large buffers whose only a tiny fraction
+ * was consumed
+ */
+ if (used > INPUT_CHUNK) {
+ ret = xmlBufShrink(in->buf->buffer, used - LINE_LEN);
+ if (ret > 0) {
+ in->cur -= ret;
+ in->consumed += ret;
+ }
+ in->end = xmlBufEnd(in->buf->buffer);
+ }
+
+ CHECK_BUFFER(in);
+
+ if (xmlBufUse(in->buf->buffer) > INPUT_CHUNK) {
+ return;
+ }
+ xmlParserInputBufferRead(in->buf, 2 * INPUT_CHUNK);
+ content = xmlBufContent(in->buf->buffer);
+ if (in->base != content) {
+ /*
+ * the buffer has been reallocated
+ */
+ indx = in->cur - in->base;
+ in->base = content;
+ in->cur = &content[indx];
+ }
+ in->end = xmlBufEnd(in->buf->buffer);
+
+ CHECK_BUFFER(in);
+}
+
+/************************************************************************
+ * *
+ * UTF8 character input and related functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNextChar:
+ * @ctxt: the XML parser context
+ *
+ * Skip to the next char input char.
+ */
+
+void
+xmlNextChar(xmlParserCtxtPtr ctxt)
+{
+ if ((ctxt == NULL) || (ctxt->instate == XML_PARSER_EOF) ||
+ (ctxt->input == NULL))
+ return;
+
+ if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
+ if ((*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0) &&
+ (ctxt->instate != XML_PARSER_COMMENT)) {
+ /*
+ * If we are at the end of the current entity and
+ * the context allows it, we pop consumed entities
+ * automatically.
+ * the auto closing should be blocked in other cases
+ */
+ xmlPopInput(ctxt);
+ } else {
+ const unsigned char *cur;
+ unsigned char c;
+
+ /*
+ * 2.11 End-of-Line Handling
+ * the literal two-character sequence "#xD#xA" or a standalone
+ * literal #xD, an XML processor must pass to the application
+ * the single character #xA.
+ */
+ if (*(ctxt->input->cur) == '\n') {
+ ctxt->input->line++; ctxt->input->col = 1;
+ } else
+ ctxt->input->col++;
+
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ *
+ * Check for the 0x110000 limit too
+ */
+ cur = ctxt->input->cur;
+
+ c = *cur;
+ if (c & 0x80) {
+ if (c == 0xC0)
+ goto encoding_error;
+ if (cur[1] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[1] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xe0) == 0xe0) {
+ unsigned int val;
+
+ if (cur[2] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[2] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xf0) == 0xf0) {
+ if (cur[3] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if (((c & 0xf8) != 0xf0) ||
+ ((cur[3] & 0xc0) != 0x80))
+ goto encoding_error;
+ /* 4-byte code */
+ ctxt->input->cur += 4;
+ val = (cur[0] & 0x7) << 18;
+ val |= (cur[1] & 0x3f) << 12;
+ val |= (cur[2] & 0x3f) << 6;
+ val |= cur[3] & 0x3f;
+ } else {
+ /* 3-byte code */
+ ctxt->input->cur += 3;
+ val = (cur[0] & 0xf) << 12;
+ val |= (cur[1] & 0x3f) << 6;
+ val |= cur[2] & 0x3f;
+ }
+ if (((val > 0xd7ff) && (val < 0xe000)) ||
+ ((val > 0xfffd) && (val < 0x10000)) ||
+ (val >= 0x110000)) {
+ xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x%X out of allowed range\n",
+ val);
+ }
+ } else
+ /* 2-byte code */
+ ctxt->input->cur += 2;
+ } else
+ /* 1-byte code */
+ ctxt->input->cur++;
+
+ ctxt->nbChars++;
+ if (*ctxt->input->cur == 0)
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ }
+ } else {
+ /*
+ * Assume it's a fixed length encoding (1) with
+ * a compatible encoding for the ASCII set, since
+ * XML constructs only use < 128 chars
+ */
+
+ if (*(ctxt->input->cur) == '\n') {
+ ctxt->input->line++; ctxt->input->col = 1;
+ } else
+ ctxt->input->col++;
+ ctxt->input->cur++;
+ ctxt->nbChars++;
+ if (*ctxt->input->cur == 0)
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ }
+ if ((*ctxt->input->cur == '%') && (!ctxt->html))
+ xmlParserHandlePEReference(ctxt);
+ if ((*ctxt->input->cur == 0) &&
+ (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
+ xmlPopInput(ctxt);
+ return;
+encoding_error:
+ /*
+ * If we detect an UTF8 error that probably mean that the
+ * input encoding didn't get properly advertised in the
+ * declaration header. Report the error and switch the encoding
+ * to ISO-Latin-1 (if you don't like this policy, just declare the
+ * encoding !)
+ */
+ if ((ctxt == NULL) || (ctxt->input == NULL) ||
+ (ctxt->input->end - ctxt->input->cur < 4)) {
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n",
+ NULL, NULL);
+ } else {
+ char buffer[150];
+
+ snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ ctxt->input->cur[0], ctxt->input->cur[1],
+ ctxt->input->cur[2], ctxt->input->cur[3]);
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n%s",
+ BAD_CAST buffer, NULL);
+ }
+ ctxt->charset = XML_CHAR_ENCODING_8859_1;
+ ctxt->input->cur++;
+ return;
+}
+
+/**
+ * xmlCurrentChar:
+ * @ctxt: the XML parser context
+ * @len: pointer to the length of the char read
+ *
+ * The current char value, if using UTF-8 this may actually span multiple
+ * bytes in the input buffer. Implement the end of line normalization:
+ * 2.11 End-of-Line Handling
+ * Wherever an external parsed entity or the literal entity value
+ * of an internal parsed entity contains either the literal two-character
+ * sequence "#xD#xA" or a standalone literal #xD, an XML processor
+ * must pass to the application the single character #xA.
+ * This behavior can conveniently be produced by normalizing all
+ * line breaks to #xA on input, before parsing.)
+ *
+ * Returns the current char value and its length
+ */
+
+int
+xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
+ if ((ctxt == NULL) || (len == NULL) || (ctxt->input == NULL)) return(0);
+ if (ctxt->instate == XML_PARSER_EOF)
+ return(0);
+
+ if ((*ctxt->input->cur >= 0x20) && (*ctxt->input->cur <= 0x7F)) {
+ *len = 1;
+ return((int) *ctxt->input->cur);
+ }
+ if (ctxt->charset == XML_CHAR_ENCODING_UTF8) {
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ *
+ * Check for the 0x110000 limit too
+ */
+ const unsigned char *cur = ctxt->input->cur;
+ unsigned char c;
+ unsigned int val;
+
+ c = *cur;
+ if (c & 0x80) {
+ if (((c & 0x40) == 0) || (c == 0xC0))
+ goto encoding_error;
+ if (cur[1] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[1] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xe0) == 0xe0) {
+ if (cur[2] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if ((cur[2] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xf0) == 0xf0) {
+ if (cur[3] == 0) {
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ cur = ctxt->input->cur;
+ }
+ if (((c & 0xf8) != 0xf0) ||
+ ((cur[3] & 0xc0) != 0x80))
+ goto encoding_error;
+ /* 4-byte code */
+ *len = 4;
+ val = (cur[0] & 0x7) << 18;
+ val |= (cur[1] & 0x3f) << 12;
+ val |= (cur[2] & 0x3f) << 6;
+ val |= cur[3] & 0x3f;
+ if (val < 0x10000)
+ goto encoding_error;
+ } else {
+ /* 3-byte code */
+ *len = 3;
+ val = (cur[0] & 0xf) << 12;
+ val |= (cur[1] & 0x3f) << 6;
+ val |= cur[2] & 0x3f;
+ if (val < 0x800)
+ goto encoding_error;
+ }
+ } else {
+ /* 2-byte code */
+ *len = 2;
+ val = (cur[0] & 0x1f) << 6;
+ val |= cur[1] & 0x3f;
+ if (val < 0x80)
+ goto encoding_error;
+ }
+ if (!IS_CHAR(val)) {
+ xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x%X out of allowed range\n", val);
+ }
+ return(val);
+ } else {
+ /* 1-byte code */
+ *len = 1;
+ if (*ctxt->input->cur == 0)
+ xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
+ if ((*ctxt->input->cur == 0) &&
+ (ctxt->input->end > ctxt->input->cur)) {
+ xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x0 out of allowed range\n", 0);
+ }
+ if (*ctxt->input->cur == 0xD) {
+ if (ctxt->input->cur[1] == 0xA) {
+ ctxt->nbChars++;
+ ctxt->input->cur++;
+ }
+ return(0xA);
+ }
+ return((int) *ctxt->input->cur);
+ }
+ }
+ /*
+ * Assume it's a fixed length encoding (1) with
+ * a compatible encoding for the ASCII set, since
+ * XML constructs only use < 128 chars
+ */
+ *len = 1;
+ if (*ctxt->input->cur == 0xD) {
+ if (ctxt->input->cur[1] == 0xA) {
+ ctxt->nbChars++;
+ ctxt->input->cur++;
+ }
+ return(0xA);
+ }
+ return((int) *ctxt->input->cur);
+encoding_error:
+ /*
+ * An encoding problem may arise from a truncated input buffer
+ * splitting a character in the middle. In that case do not raise
+ * an error but return 0 to endicate an end of stream problem
+ */
+ if (ctxt->input->end - ctxt->input->cur < 4) {
+ *len = 0;
+ return(0);
+ }
+
+ /*
+ * If we detect an UTF8 error that probably mean that the
+ * input encoding didn't get properly advertised in the
+ * declaration header. Report the error and switch the encoding
+ * to ISO-Latin-1 (if you don't like this policy, just declare the
+ * encoding !)
+ */
+ {
+ char buffer[150];
+
+ snprintf(&buffer[0], 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ ctxt->input->cur[0], ctxt->input->cur[1],
+ ctxt->input->cur[2], ctxt->input->cur[3]);
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n%s",
+ BAD_CAST buffer, NULL);
+ }
+ ctxt->charset = XML_CHAR_ENCODING_8859_1;
+ *len = 1;
+ return((int) *ctxt->input->cur);
+}
+
+/**
+ * xmlStringCurrentChar:
+ * @ctxt: the XML parser context
+ * @cur: pointer to the beginning of the char
+ * @len: pointer to the length of the char read
+ *
+ * The current char value, if using UTF-8 this may actually span multiple
+ * bytes in the input buffer.
+ *
+ * Returns the current char value and its length
+ */
+
+int
+xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar * cur, int *len)
+{
+ if ((len == NULL) || (cur == NULL)) return(0);
+ if ((ctxt == NULL) || (ctxt->charset == XML_CHAR_ENCODING_UTF8)) {
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ *
+ * Check for the 0x110000 limit too
+ */
+ unsigned char c;
+ unsigned int val;
+
+ c = *cur;
+ if (c & 0x80) {
+ if ((cur[1] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xe0) == 0xe0) {
+
+ if ((cur[2] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xf0) == 0xf0) {
+ if (((c & 0xf8) != 0xf0) || ((cur[3] & 0xc0) != 0x80))
+ goto encoding_error;
+ /* 4-byte code */
+ *len = 4;
+ val = (cur[0] & 0x7) << 18;
+ val |= (cur[1] & 0x3f) << 12;
+ val |= (cur[2] & 0x3f) << 6;
+ val |= cur[3] & 0x3f;
+ } else {
+ /* 3-byte code */
+ *len = 3;
+ val = (cur[0] & 0xf) << 12;
+ val |= (cur[1] & 0x3f) << 6;
+ val |= cur[2] & 0x3f;
+ }
+ } else {
+ /* 2-byte code */
+ *len = 2;
+ val = (cur[0] & 0x1f) << 6;
+ val |= cur[1] & 0x3f;
+ }
+ if (!IS_CHAR(val)) {
+ xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
+ "Char 0x%X out of allowed range\n", val);
+ }
+ return (val);
+ } else {
+ /* 1-byte code */
+ *len = 1;
+ return ((int) *cur);
+ }
+ }
+ /*
+ * Assume it's a fixed length encoding (1) with
+ * a compatible encoding for the ASCII set, since
+ * XML constructs only use < 128 chars
+ */
+ *len = 1;
+ return ((int) *cur);
+encoding_error:
+
+ /*
+ * An encoding problem may arise from a truncated input buffer
+ * splitting a character in the middle. In that case do not raise
+ * an error but return 0 to endicate an end of stream problem
+ */
+ if ((ctxt == NULL) || (ctxt->input == NULL) ||
+ (ctxt->input->end - ctxt->input->cur < 4)) {
+ *len = 0;
+ return(0);
+ }
+ /*
+ * If we detect an UTF8 error that probably mean that the
+ * input encoding didn't get properly advertised in the
+ * declaration header. Report the error and switch the encoding
+ * to ISO-Latin-1 (if you don't like this policy, just declare the
+ * encoding !)
+ */
+ {
+ char buffer[150];
+
+ snprintf(buffer, 149, "Bytes: 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ ctxt->input->cur[0], ctxt->input->cur[1],
+ ctxt->input->cur[2], ctxt->input->cur[3]);
+ __xmlErrEncoding(ctxt, XML_ERR_INVALID_CHAR,
+ "Input is not proper UTF-8, indicate encoding !\n%s",
+ BAD_CAST buffer, NULL);
+ }
+ *len = 1;
+ return ((int) *cur);
+}
+
+/**
+ * xmlCopyCharMultiByte:
+ * @out: pointer to an array of xmlChar
+ * @val: the char value
+ *
+ * append the char value in the array
+ *
+ * Returns the number of xmlChar written
+ */
+int
+xmlCopyCharMultiByte(xmlChar *out, int val) {
+ if (out == NULL) return(0);
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ */
+ if (val >= 0x80) {
+ xmlChar *savedout = out;
+ int bits;
+ if (val < 0x800) { *out++= (val >> 6) | 0xC0; bits= 0; }
+ else if (val < 0x10000) { *out++= (val >> 12) | 0xE0; bits= 6;}
+ else if (val < 0x110000) { *out++= (val >> 18) | 0xF0; bits= 12; }
+ else {
+ xmlErrEncodingInt(NULL, XML_ERR_INVALID_CHAR,
+ "Internal error, xmlCopyCharMultiByte 0x%X out of bound\n",
+ val);
+ return(0);
+ }
+ for ( ; bits >= 0; bits-= 6)
+ *out++= ((val >> bits) & 0x3F) | 0x80 ;
+ return (out - savedout);
+ }
+ *out = (xmlChar) val;
+ return 1;
+}
+
+/**
+ * xmlCopyChar:
+ * @len: Ignored, compatibility
+ * @out: pointer to an array of xmlChar
+ * @val: the char value
+ *
+ * append the char value in the array
+ *
+ * Returns the number of xmlChar written
+ */
+
+int
+xmlCopyChar(int len ATTRIBUTE_UNUSED, xmlChar *out, int val) {
+ if (out == NULL) return(0);
+ /* the len parameter is ignored */
+ if (val >= 0x80) {
+ return(xmlCopyCharMultiByte (out, val));
+ }
+ *out = (xmlChar) val;
+ return 1;
+}
+
+/************************************************************************
+ * *
+ * Commodity functions to switch encodings *
+ * *
+ ************************************************************************/
+
+static int
+xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler, int len);
+static int
+xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler, int len);
+/**
+ * xmlSwitchEncoding:
+ * @ctxt: the parser context
+ * @enc: the encoding value (number)
+ *
+ * change the input functions when discovering the character encoding
+ * of a given entity.
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+int
+xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
+{
+ xmlCharEncodingHandlerPtr handler;
+ int len = -1;
+
+ if (ctxt == NULL) return(-1);
+ switch (enc) {
+ case XML_CHAR_ENCODING_ERROR:
+ __xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
+ "encoding unknown\n", NULL, NULL);
+ return(-1);
+ case XML_CHAR_ENCODING_NONE:
+ /* let's assume it's UTF-8 without the XML decl */
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ return(0);
+ case XML_CHAR_ENCODING_UTF8:
+ /* default encoding, no conversion should be needed */
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+
+ /*
+ * Errata on XML-1.0 June 20 2001
+ * Specific handling of the Byte Order Mark for
+ * UTF-8
+ */
+ if ((ctxt->input != NULL) &&
+ (ctxt->input->cur[0] == 0xEF) &&
+ (ctxt->input->cur[1] == 0xBB) &&
+ (ctxt->input->cur[2] == 0xBF)) {
+ ctxt->input->cur += 3;
+ }
+ return(0);
+ case XML_CHAR_ENCODING_UTF16LE:
+ case XML_CHAR_ENCODING_UTF16BE:
+ /*The raw input characters are encoded
+ *in UTF-16. As we expect this function
+ *to be called after xmlCharEncInFunc, we expect
+ *ctxt->input->cur to contain UTF-8 encoded characters.
+ *So the raw UTF16 Byte Order Mark
+ *has also been converted into
+ *an UTF-8 BOM. Let's skip that BOM.
+ */
+ if ((ctxt->input != NULL) && (ctxt->input->cur != NULL) &&
+ (ctxt->input->cur[0] == 0xEF) &&
+ (ctxt->input->cur[1] == 0xBB) &&
+ (ctxt->input->cur[2] == 0xBF)) {
+ ctxt->input->cur += 3;
+ }
+ len = 90;
+ break;
+ case XML_CHAR_ENCODING_UCS2:
+ len = 90;
+ break;
+ case XML_CHAR_ENCODING_UCS4BE:
+ case XML_CHAR_ENCODING_UCS4LE:
+ case XML_CHAR_ENCODING_UCS4_2143:
+ case XML_CHAR_ENCODING_UCS4_3412:
+ len = 180;
+ break;
+ case XML_CHAR_ENCODING_EBCDIC:
+ case XML_CHAR_ENCODING_8859_1:
+ case XML_CHAR_ENCODING_8859_2:
+ case XML_CHAR_ENCODING_8859_3:
+ case XML_CHAR_ENCODING_8859_4:
+ case XML_CHAR_ENCODING_8859_5:
+ case XML_CHAR_ENCODING_8859_6:
+ case XML_CHAR_ENCODING_8859_7:
+ case XML_CHAR_ENCODING_8859_8:
+ case XML_CHAR_ENCODING_8859_9:
+ case XML_CHAR_ENCODING_ASCII:
+ case XML_CHAR_ENCODING_2022_JP:
+ case XML_CHAR_ENCODING_SHIFT_JIS:
+ case XML_CHAR_ENCODING_EUC_JP:
+ len = 45;
+ break;
+ }
+ handler = xmlGetCharEncodingHandler(enc);
+ if (handler == NULL) {
+ /*
+ * Default handlers.
+ */
+ switch (enc) {
+ case XML_CHAR_ENCODING_ASCII:
+ /* default encoding, no conversion should be needed */
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ return(0);
+ case XML_CHAR_ENCODING_UTF16LE:
+ break;
+ case XML_CHAR_ENCODING_UTF16BE:
+ break;
+ case XML_CHAR_ENCODING_UCS4LE:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "USC4 little endian", NULL);
+ break;
+ case XML_CHAR_ENCODING_UCS4BE:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "USC4 big endian", NULL);
+ break;
+ case XML_CHAR_ENCODING_EBCDIC:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "EBCDIC", NULL);
+ break;
+ case XML_CHAR_ENCODING_UCS4_2143:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "UCS4 2143", NULL);
+ break;
+ case XML_CHAR_ENCODING_UCS4_3412:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "UCS4 3412", NULL);
+ break;
+ case XML_CHAR_ENCODING_UCS2:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "UCS2", NULL);
+ break;
+ case XML_CHAR_ENCODING_8859_1:
+ case XML_CHAR_ENCODING_8859_2:
+ case XML_CHAR_ENCODING_8859_3:
+ case XML_CHAR_ENCODING_8859_4:
+ case XML_CHAR_ENCODING_8859_5:
+ case XML_CHAR_ENCODING_8859_6:
+ case XML_CHAR_ENCODING_8859_7:
+ case XML_CHAR_ENCODING_8859_8:
+ case XML_CHAR_ENCODING_8859_9:
+ /*
+ * We used to keep the internal content in the
+ * document encoding however this turns being unmaintainable
+ * So xmlGetCharEncodingHandler() will return non-null
+ * values for this now.
+ */
+ if ((ctxt->inputNr == 1) &&
+ (ctxt->encoding == NULL) &&
+ (ctxt->input != NULL) &&
+ (ctxt->input->encoding != NULL)) {
+ ctxt->encoding = xmlStrdup(ctxt->input->encoding);
+ }
+ ctxt->charset = enc;
+ return(0);
+ case XML_CHAR_ENCODING_2022_JP:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "ISO-2022-JP", NULL);
+ break;
+ case XML_CHAR_ENCODING_SHIFT_JIS:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "Shift_JIS", NULL);
+ break;
+ case XML_CHAR_ENCODING_EUC_JP:
+ __xmlErrEncoding(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
+ "encoding not supported %s\n",
+ BAD_CAST "EUC-JP", NULL);
+ break;
+ default:
+ break;
+ }
+ }
+ if (handler == NULL)
+ return(-1);
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ return(xmlSwitchToEncodingInt(ctxt, handler, len));
+}
+
+/**
+ * xmlSwitchInputEncoding:
+ * @ctxt: the parser context
+ * @input: the input stream
+ * @handler: the encoding handler
+ * @len: the number of bytes to convert for the first line or -1
+ *
+ * change the input functions when discovering the character encoding
+ * of a given entity.
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+static int
+xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler, int len)
+{
+ int nbchars;
+
+ if (handler == NULL)
+ return (-1);
+ if (input == NULL)
+ return (-1);
+ if (input->buf != NULL) {
+ if (input->buf->encoder != NULL) {
+ /*
+ * Check in case the auto encoding detetection triggered
+ * in already.
+ */
+ if (input->buf->encoder == handler)
+ return (0);
+
+ /*
+ * "UTF-16" can be used for both LE and BE
+ if ((!xmlStrncmp(BAD_CAST input->buf->encoder->name,
+ BAD_CAST "UTF-16", 6)) &&
+ (!xmlStrncmp(BAD_CAST handler->name,
+ BAD_CAST "UTF-16", 6))) {
+ return(0);
+ }
+ */
+
+ /*
+ * Note: this is a bit dangerous, but that's what it
+ * takes to use nearly compatible signature for different
+ * encodings.
+ */
+ xmlCharEncCloseFunc(input->buf->encoder);
+ input->buf->encoder = handler;
+ return (0);
+ }
+ input->buf->encoder = handler;
+
+ /*
+ * Is there already some content down the pipe to convert ?
+ */
+ if (xmlBufIsEmpty(input->buf->buffer) == 0) {
+ int processed;
+ unsigned int use;
+
+ /*
+ * Specific handling of the Byte Order Mark for
+ * UTF-16
+ */
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-16LE") ||
+ !strcmp(handler->name, "UTF-16")) &&
+ (input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) {
+ input->cur += 2;
+ }
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-16BE")) &&
+ (input->cur[0] == 0xFE) && (input->cur[1] == 0xFF)) {
+ input->cur += 2;
+ }
+ /*
+ * Errata on XML-1.0 June 20 2001
+ * Specific handling of the Byte Order Mark for
+ * UTF-8
+ */
+ if ((handler->name != NULL) &&
+ (!strcmp(handler->name, "UTF-8")) &&
+ (input->cur[0] == 0xEF) &&
+ (input->cur[1] == 0xBB) && (input->cur[2] == 0xBF)) {
+ input->cur += 3;
+ }
+
+ /*
+ * Shrink the current input buffer.
+ * Move it as the raw buffer and create a new input buffer
+ */
+ processed = input->cur - input->base;
+ xmlBufShrink(input->buf->buffer, processed);
+ input->buf->raw = input->buf->buffer;
+ input->buf->buffer = xmlBufCreate();
+ input->buf->rawconsumed = processed;
+ use = xmlBufUse(input->buf->raw);
+
+ if (ctxt->html) {
+ /*
+ * convert as much as possible of the buffer
+ */
+ nbchars = xmlCharEncInput(input->buf, 1);
+ } else {
+ /*
+ * convert just enough to get
+ * '<?xml version="1.0" encoding="xxx"?>'
+ * parsed with the autodetected encoding
+ * into the parser reading buffer.
+ */
+ nbchars = xmlCharEncFirstLineInput(input->buf, len);
+ }
+ if (nbchars < 0) {
+ xmlErrInternal(ctxt,
+ "switching encoding: encoder error\n",
+ NULL);
+ return (-1);
+ }
+ input->buf->rawconsumed += use - xmlBufUse(input->buf->raw);
+ xmlBufResetInput(input->buf->buffer, input);
+ }
+ return (0);
+ } else if (input->length == 0) {
+ /*
+ * When parsing a static memory array one must know the
+ * size to be able to convert the buffer.
+ */
+ xmlErrInternal(ctxt, "switching encoding : no input\n", NULL);
+ return (-1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSwitchInputEncoding:
+ * @ctxt: the parser context
+ * @input: the input stream
+ * @handler: the encoding handler
+ *
+ * change the input functions when discovering the character encoding
+ * of a given entity.
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+int
+xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler) {
+ return(xmlSwitchInputEncodingInt(ctxt, input, handler, -1));
+}
+
+/**
+ * xmlSwitchToEncodingInt:
+ * @ctxt: the parser context
+ * @handler: the encoding handler
+ * @len: the length to convert or -1
+ *
+ * change the input functions when discovering the character encoding
+ * of a given entity, and convert only @len bytes of the output, this
+ * is needed on auto detect to allows any declared encoding later to
+ * convert the actual content after the xmlDecl
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+static int
+xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler, int len) {
+ int ret = 0;
+
+ if (handler != NULL) {
+ if (ctxt->input != NULL) {
+ ret = xmlSwitchInputEncodingInt(ctxt, ctxt->input, handler, len);
+ } else {
+ xmlErrInternal(ctxt, "xmlSwitchToEncoding : no input\n",
+ NULL);
+ return(-1);
+ }
+ /*
+ * The parsing is now done in UTF8 natively
+ */
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ } else
+ return(-1);
+ return(ret);
+}
+
+/**
+ * xmlSwitchToEncoding:
+ * @ctxt: the parser context
+ * @handler: the encoding handler
+ *
+ * change the input functions when discovering the character encoding
+ * of a given entity.
+ *
+ * Returns 0 in case of success, -1 otherwise
+ */
+int
+xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
+{
+ return (xmlSwitchToEncodingInt(ctxt, handler, -1));
+}
+
+/************************************************************************
+ * *
+ * Commodity functions to handle entities processing *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlFreeInputStream:
+ * @input: an xmlParserInputPtr
+ *
+ * Free up an input stream.
+ */
+void
+xmlFreeInputStream(xmlParserInputPtr input) {
+ if (input == NULL) return;
+
+ if (input->filename != NULL) xmlFree((char *) input->filename);
+ if (input->directory != NULL) xmlFree((char *) input->directory);
+ if (input->encoding != NULL) xmlFree((char *) input->encoding);
+ if (input->version != NULL) xmlFree((char *) input->version);
+ if ((input->free != NULL) && (input->base != NULL))
+ input->free((xmlChar *) input->base);
+ if (input->buf != NULL)
+ xmlFreeParserInputBuffer(input->buf);
+ xmlFree(input);
+}
+
+/**
+ * xmlNewInputStream:
+ * @ctxt: an XML parser context
+ *
+ * Create a new input stream structure.
+ *
+ * Returns the new input stream or NULL
+ */
+xmlParserInputPtr
+xmlNewInputStream(xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr input;
+
+ input = (xmlParserInputPtr) xmlMalloc(sizeof(xmlParserInput));
+ if (input == NULL) {
+ xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
+ return(NULL);
+ }
+ memset(input, 0, sizeof(xmlParserInput));
+ input->line = 1;
+ input->col = 1;
+ input->standalone = -1;
+
+ /*
+ * If the context is NULL the id cannot be initialized, but that
+ * should not happen while parsing which is the situation where
+ * the id is actually needed.
+ */
+ if (ctxt != NULL)
+ input->id = ctxt->input_id++;
+
+ return(input);
+}
+
+/**
+ * xmlNewIOInputStream:
+ * @ctxt: an XML parser context
+ * @input: an I/O Input
+ * @enc: the charset encoding if known
+ *
+ * Create a new input stream structure encapsulating the @input into
+ * a stream suitable for the parser.
+ *
+ * Returns the new input stream or NULL
+ */
+xmlParserInputPtr
+xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input,
+ xmlCharEncoding enc) {
+ xmlParserInputPtr inputStream;
+
+ if (input == NULL) return(NULL);
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext, "new input from I/O\n");
+ inputStream = xmlNewInputStream(ctxt);
+ if (inputStream == NULL) {
+ return(NULL);
+ }
+ inputStream->filename = NULL;
+ inputStream->buf = input;
+ xmlBufResetInput(inputStream->buf->buffer, inputStream);
+
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+
+ return(inputStream);
+}
+
+/**
+ * xmlNewEntityInputStream:
+ * @ctxt: an XML parser context
+ * @entity: an Entity pointer
+ *
+ * Create a new input stream based on an xmlEntityPtr
+ *
+ * Returns the new input stream or NULL
+ */
+xmlParserInputPtr
+xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
+ xmlParserInputPtr input;
+
+ if (entity == NULL) {
+ xmlErrInternal(ctxt, "xmlNewEntityInputStream entity = NULL\n",
+ NULL);
+ return(NULL);
+ }
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "new input from entity: %s\n", entity->name);
+ if (entity->content == NULL) {
+ switch (entity->etype) {
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ xmlErrInternal(ctxt, "Cannot parse entity %s\n",
+ entity->name);
+ break;
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ return(xmlLoadExternalEntity((char *) entity->URI,
+ (char *) entity->ExternalID, ctxt));
+ case XML_INTERNAL_GENERAL_ENTITY:
+ xmlErrInternal(ctxt,
+ "Internal entity %s without content !\n",
+ entity->name);
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ xmlErrInternal(ctxt,
+ "Internal parameter entity %s without content !\n",
+ entity->name);
+ break;
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ xmlErrInternal(ctxt,
+ "Predefined entity %s without content !\n",
+ entity->name);
+ break;
+ }
+ return(NULL);
+ }
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ return(NULL);
+ }
+ if (entity->URI != NULL)
+ input->filename = (char *) xmlStrdup((xmlChar *) entity->URI);
+ input->base = entity->content;
+ input->cur = entity->content;
+ input->length = entity->length;
+ input->end = &entity->content[input->length];
+ return(input);
+}
+
+/**
+ * xmlNewStringInputStream:
+ * @ctxt: an XML parser context
+ * @buffer: an memory buffer
+ *
+ * Create a new input stream based on a memory buffer.
+ * Returns the new input stream
+ */
+xmlParserInputPtr
+xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
+ xmlParserInputPtr input;
+
+ if (buffer == NULL) {
+ xmlErrInternal(ctxt, "xmlNewStringInputStream string = NULL\n",
+ NULL);
+ return(NULL);
+ }
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "new fixed input: %.30s\n", buffer);
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ xmlErrMemory(ctxt, "couldn't allocate a new input stream\n");
+ return(NULL);
+ }
+ input->base = buffer;
+ input->cur = buffer;
+ input->length = xmlStrlen(buffer);
+ input->end = &buffer[input->length];
+ return(input);
+}
+
+/**
+ * xmlNewInputFromFile:
+ * @ctxt: an XML parser context
+ * @filename: the filename to use as entity
+ *
+ * Create a new input stream based on a file or an URL.
+ *
+ * Returns the new input stream or NULL in case of error
+ */
+xmlParserInputPtr
+xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
+ xmlParserInputBufferPtr buf;
+ xmlParserInputPtr inputStream;
+ char *directory = NULL;
+ xmlChar *URI = NULL;
+
+ if (xmlParserDebugEntities)
+ xmlGenericError(xmlGenericErrorContext,
+ "new input from file: %s\n", filename);
+ if (ctxt == NULL) return(NULL);
+ buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ if (filename == NULL)
+ __xmlLoaderErr(ctxt,
+ "failed to load external entity: NULL filename \n",
+ NULL);
+ else
+ __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n",
+ (const char *) filename);
+ return(NULL);
+ }
+
+ inputStream = xmlNewInputStream(ctxt);
+ if (inputStream == NULL)
+ return(NULL);
+
+ inputStream->buf = buf;
+ inputStream = xmlCheckHTTPInput(ctxt, inputStream);
+ if (inputStream == NULL)
+ return(NULL);
+
+ if (inputStream->filename == NULL)
+ URI = xmlStrdup((xmlChar *) filename);
+ else
+ URI = xmlStrdup((xmlChar *) inputStream->filename);
+ directory = xmlParserGetDirectory((const char *) URI);
+ if (inputStream->filename != NULL) xmlFree((char *)inputStream->filename);
+ inputStream->filename = (char *) xmlCanonicPath((const xmlChar *) URI);
+ if (URI != NULL) xmlFree((char *) URI);
+ inputStream->directory = directory;
+
+ xmlBufResetInput(inputStream->buf->buffer, inputStream);
+ if ((ctxt->directory == NULL) && (directory != NULL))
+ ctxt->directory = (char *) xmlStrdup((const xmlChar *) directory);
+ return(inputStream);
+}
+
+/************************************************************************
+ * *
+ * Commodity functions to handle parser contexts *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlInitParserCtxt:
+ * @ctxt: an XML parser context
+ *
+ * Initialize a parser context
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+
+int
+xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr input;
+
+ if(ctxt==NULL) {
+ xmlErrInternal(NULL, "Got NULL parser context\n", NULL);
+ return(-1);
+ }
+
+ xmlDefaultSAXHandlerInit();
+
+ if (ctxt->dict == NULL)
+ ctxt->dict = xmlDictCreate();
+ if (ctxt->dict == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ return(-1);
+ }
+ xmlDictSetLimit(ctxt->dict, XML_MAX_DICTIONARY_LIMIT);
+
+ if (ctxt->sax == NULL)
+ ctxt->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
+ if (ctxt->sax == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ return(-1);
+ }
+ else
+ xmlSAXVersion(ctxt->sax, 2);
+
+ ctxt->maxatts = 0;
+ ctxt->atts = NULL;
+ /* Allocate the Input stack */
+ if (ctxt->inputTab == NULL) {
+ ctxt->inputTab = (xmlParserInputPtr *)
+ xmlMalloc(5 * sizeof(xmlParserInputPtr));
+ ctxt->inputMax = 5;
+ }
+ if (ctxt->inputTab == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ return(-1);
+ }
+ while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
+ xmlFreeInputStream(input);
+ }
+ ctxt->inputNr = 0;
+ ctxt->input = NULL;
+
+ ctxt->version = NULL;
+ ctxt->encoding = NULL;
+ ctxt->standalone = -1;
+ ctxt->hasExternalSubset = 0;
+ ctxt->hasPErefs = 0;
+ ctxt->html = 0;
+ ctxt->external = 0;
+ ctxt->instate = XML_PARSER_START;
+ ctxt->token = 0;
+ ctxt->directory = NULL;
+
+ /* Allocate the Node stack */
+ if (ctxt->nodeTab == NULL) {
+ ctxt->nodeTab = (xmlNodePtr *) xmlMalloc(10 * sizeof(xmlNodePtr));
+ ctxt->nodeMax = 10;
+ }
+ if (ctxt->nodeTab == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 0;
+ ctxt->node = NULL;
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ return(-1);
+ }
+ ctxt->nodeNr = 0;
+ ctxt->node = NULL;
+
+ /* Allocate the Name stack */
+ if (ctxt->nameTab == NULL) {
+ ctxt->nameTab = (const xmlChar **) xmlMalloc(10 * sizeof(xmlChar *));
+ ctxt->nameMax = 10;
+ }
+ if (ctxt->nameTab == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 0;
+ ctxt->node = NULL;
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ ctxt->nameNr = 0;
+ ctxt->nameMax = 0;
+ ctxt->name = NULL;
+ return(-1);
+ }
+ ctxt->nameNr = 0;
+ ctxt->name = NULL;
+
+ /* Allocate the space stack */
+ if (ctxt->spaceTab == NULL) {
+ ctxt->spaceTab = (int *) xmlMalloc(10 * sizeof(int));
+ ctxt->spaceMax = 10;
+ }
+ if (ctxt->spaceTab == NULL) {
+ xmlErrMemory(NULL, "cannot initialize parser context\n");
+ ctxt->nodeNr = 0;
+ ctxt->nodeMax = 0;
+ ctxt->node = NULL;
+ ctxt->inputNr = 0;
+ ctxt->inputMax = 0;
+ ctxt->input = NULL;
+ ctxt->nameNr = 0;
+ ctxt->nameMax = 0;
+ ctxt->name = NULL;
+ ctxt->spaceNr = 0;
+ ctxt->spaceMax = 0;
+ ctxt->space = NULL;
+ return(-1);
+ }
+ ctxt->spaceNr = 1;
+ ctxt->spaceMax = 10;
+ ctxt->spaceTab[0] = -1;
+ ctxt->space = &ctxt->spaceTab[0];
+ ctxt->userData = ctxt;
+ ctxt->myDoc = NULL;
+ ctxt->wellFormed = 1;
+ ctxt->nsWellFormed = 1;
+ ctxt->valid = 1;
+ ctxt->loadsubset = xmlLoadExtDtdDefaultValue;
+ if (ctxt->loadsubset) {
+ ctxt->options |= XML_PARSE_DTDLOAD;
+ }
+ ctxt->validate = xmlDoValidityCheckingDefaultValue;
+ ctxt->pedantic = xmlPedanticParserDefaultValue;
+ if (ctxt->pedantic) {
+ ctxt->options |= XML_PARSE_PEDANTIC;
+ }
+ ctxt->linenumbers = xmlLineNumbersDefaultValue;
+ ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
+ if (ctxt->keepBlanks == 0) {
+ ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
+ ctxt->options |= XML_PARSE_NOBLANKS;
+ }
+
+ ctxt->vctxt.finishDtd = XML_CTXT_FINISH_DTD_0;
+ ctxt->vctxt.userData = ctxt;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ if (ctxt->validate) {
+ if (xmlGetWarningsDefaultValue == 0)
+ ctxt->vctxt.warning = NULL;
+ else
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ ctxt->vctxt.nodeMax = 0;
+ ctxt->options |= XML_PARSE_DTDVALID;
+ }
+ ctxt->replaceEntities = xmlSubstituteEntitiesDefaultValue;
+ if (ctxt->replaceEntities) {
+ ctxt->options |= XML_PARSE_NOENT;
+ }
+ ctxt->record_info = 0;
+ ctxt->nbChars = 0;
+ ctxt->checkIndex = 0;
+ ctxt->inSubset = 0;
+ ctxt->errNo = XML_ERR_OK;
+ ctxt->depth = 0;
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+ ctxt->catalogs = NULL;
+ ctxt->nbentities = 0;
+ ctxt->sizeentities = 0;
+ ctxt->sizeentcopy = 0;
+ ctxt->input_id = 1;
+ xmlInitNodeInfoSeq(&ctxt->node_seq);
+ return(0);
+}
+
+/**
+ * xmlFreeParserCtxt:
+ * @ctxt: an XML parser context
+ *
+ * Free all the memory used by a parser context. However the parsed
+ * document in ctxt->myDoc is not freed.
+ */
+
+void
+xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr input;
+
+ if (ctxt == NULL) return;
+
+ while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
+ xmlFreeInputStream(input);
+ }
+ if (ctxt->spaceTab != NULL) xmlFree(ctxt->spaceTab);
+ if (ctxt->nameTab != NULL) xmlFree((xmlChar * *)ctxt->nameTab);
+ if (ctxt->nodeTab != NULL) xmlFree(ctxt->nodeTab);
+ if (ctxt->nodeInfoTab != NULL) xmlFree(ctxt->nodeInfoTab);
+ if (ctxt->inputTab != NULL) xmlFree(ctxt->inputTab);
+ if (ctxt->version != NULL) xmlFree((char *) ctxt->version);
+ if (ctxt->encoding != NULL) xmlFree((char *) ctxt->encoding);
+ if (ctxt->extSubURI != NULL) xmlFree((char *) ctxt->extSubURI);
+ if (ctxt->extSubSystem != NULL) xmlFree((char *) ctxt->extSubSystem);
+#ifdef LIBXML_SAX1_ENABLED
+ if ((ctxt->sax != NULL) &&
+ (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler))
+#else
+ if (ctxt->sax != NULL)
+#endif /* LIBXML_SAX1_ENABLED */
+ xmlFree(ctxt->sax);
+ if (ctxt->directory != NULL) xmlFree((char *) ctxt->directory);
+ if (ctxt->vctxt.nodeTab != NULL) xmlFree(ctxt->vctxt.nodeTab);
+ if (ctxt->atts != NULL) xmlFree((xmlChar * *)ctxt->atts);
+ if (ctxt->dict != NULL) xmlDictFree(ctxt->dict);
+ if (ctxt->nsTab != NULL) xmlFree((char *) ctxt->nsTab);
+ if (ctxt->pushTab != NULL) xmlFree(ctxt->pushTab);
+ if (ctxt->attallocs != NULL) xmlFree(ctxt->attallocs);
+ if (ctxt->attsDefault != NULL)
+ xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
+ if (ctxt->attsSpecial != NULL)
+ xmlHashFree(ctxt->attsSpecial, NULL);
+ if (ctxt->freeElems != NULL) {
+ xmlNodePtr cur, next;
+
+ cur = ctxt->freeElems;
+ while (cur != NULL) {
+ next = cur->next;
+ xmlFree(cur);
+ cur = next;
+ }
+ }
+ if (ctxt->freeAttrs != NULL) {
+ xmlAttrPtr cur, next;
+
+ cur = ctxt->freeAttrs;
+ while (cur != NULL) {
+ next = cur->next;
+ xmlFree(cur);
+ cur = next;
+ }
+ }
+ /*
+ * cleanup the error strings
+ */
+ if (ctxt->lastError.message != NULL)
+ xmlFree(ctxt->lastError.message);
+ if (ctxt->lastError.file != NULL)
+ xmlFree(ctxt->lastError.file);
+ if (ctxt->lastError.str1 != NULL)
+ xmlFree(ctxt->lastError.str1);
+ if (ctxt->lastError.str2 != NULL)
+ xmlFree(ctxt->lastError.str2);
+ if (ctxt->lastError.str3 != NULL)
+ xmlFree(ctxt->lastError.str3);
+
+#ifdef LIBXML_CATALOG_ENABLED
+ if (ctxt->catalogs != NULL)
+ xmlCatalogFreeLocal(ctxt->catalogs);
+#endif
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlNewParserCtxt:
+ *
+ * Allocate and initialize a new parser context.
+ *
+ * Returns the xmlParserCtxtPtr or NULL
+ */
+
+xmlParserCtxtPtr
+xmlNewParserCtxt(void)
+{
+ xmlParserCtxtPtr ctxt;
+
+ ctxt = (xmlParserCtxtPtr) xmlMalloc(sizeof(xmlParserCtxt));
+ if (ctxt == NULL) {
+ xmlErrMemory(NULL, "cannot allocate parser context\n");
+ return(NULL);
+ }
+ memset(ctxt, 0, sizeof(xmlParserCtxt));
+ if (xmlInitParserCtxt(ctxt) < 0) {
+ xmlFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ return(ctxt);
+}
+
+/************************************************************************
+ * *
+ * Handling of node informations *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlClearParserCtxt:
+ * @ctxt: an XML parser context
+ *
+ * Clear (release owned resources) and reinitialize a parser context
+ */
+
+void
+xmlClearParserCtxt(xmlParserCtxtPtr ctxt)
+{
+ if (ctxt==NULL)
+ return;
+ xmlClearNodeInfoSeq(&ctxt->node_seq);
+ xmlCtxtReset(ctxt);
+}
+
+
+/**
+ * xmlParserFindNodeInfo:
+ * @ctx: an XML parser context
+ * @node: an XML node within the tree
+ *
+ * Find the parser node info struct for a given node
+ *
+ * Returns an xmlParserNodeInfo block pointer or NULL
+ */
+const xmlParserNodeInfo *
+xmlParserFindNodeInfo(const xmlParserCtxtPtr ctx, const xmlNodePtr node)
+{
+ unsigned long pos;
+
+ if ((ctx == NULL) || (node == NULL))
+ return (NULL);
+ /* Find position where node should be at */
+ pos = xmlParserFindNodeInfoIndex(&ctx->node_seq, node);
+ if (pos < ctx->node_seq.length
+ && ctx->node_seq.buffer[pos].node == node)
+ return &ctx->node_seq.buffer[pos];
+ else
+ return NULL;
+}
+
+
+/**
+ * xmlInitNodeInfoSeq:
+ * @seq: a node info sequence pointer
+ *
+ * -- Initialize (set to initial state) node info sequence
+ */
+void
+xmlInitNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
+{
+ if (seq == NULL)
+ return;
+ seq->length = 0;
+ seq->maximum = 0;
+ seq->buffer = NULL;
+}
+
+/**
+ * xmlClearNodeInfoSeq:
+ * @seq: a node info sequence pointer
+ *
+ * -- Clear (release memory and reinitialize) node
+ * info sequence
+ */
+void
+xmlClearNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
+{
+ if (seq == NULL)
+ return;
+ if (seq->buffer != NULL)
+ xmlFree(seq->buffer);
+ xmlInitNodeInfoSeq(seq);
+}
+
+/**
+ * xmlParserFindNodeInfoIndex:
+ * @seq: a node info sequence pointer
+ * @node: an XML node pointer
+ *
+ *
+ * xmlParserFindNodeInfoIndex : Find the index that the info record for
+ * the given node is or should be at in a sorted sequence
+ *
+ * Returns a long indicating the position of the record
+ */
+unsigned long
+xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
+ const xmlNodePtr node)
+{
+ unsigned long upper, lower, middle;
+ int found = 0;
+
+ if ((seq == NULL) || (node == NULL))
+ return ((unsigned long) -1);
+
+ /* Do a binary search for the key */
+ lower = 1;
+ upper = seq->length;
+ middle = 0;
+ while (lower <= upper && !found) {
+ middle = lower + (upper - lower) / 2;
+ if (node == seq->buffer[middle - 1].node)
+ found = 1;
+ else if (node < seq->buffer[middle - 1].node)
+ upper = middle - 1;
+ else
+ lower = middle + 1;
+ }
+
+ /* Return position */
+ if (middle == 0 || seq->buffer[middle - 1].node < node)
+ return middle;
+ else
+ return middle - 1;
+}
+
+
+/**
+ * xmlParserAddNodeInfo:
+ * @ctxt: an XML parser context
+ * @info: a node info sequence pointer
+ *
+ * Insert node info record into the sorted sequence
+ */
+void
+xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
+ const xmlParserNodeInfoPtr info)
+{
+ unsigned long pos;
+
+ if ((ctxt == NULL) || (info == NULL)) return;
+
+ /* Find pos and check to see if node is already in the sequence */
+ pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
+ info->node);
+
+ if ((pos < ctxt->node_seq.length) &&
+ (ctxt->node_seq.buffer != NULL) &&
+ (ctxt->node_seq.buffer[pos].node == info->node)) {
+ ctxt->node_seq.buffer[pos] = *info;
+ }
+
+ /* Otherwise, we need to add new node to buffer */
+ else {
+ if ((ctxt->node_seq.length + 1 > ctxt->node_seq.maximum) ||
+ (ctxt->node_seq.buffer == NULL)) {
+ xmlParserNodeInfo *tmp_buffer;
+ unsigned int byte_size;
+
+ if (ctxt->node_seq.maximum == 0)
+ ctxt->node_seq.maximum = 2;
+ byte_size = (sizeof(*ctxt->node_seq.buffer) *
+ (2 * ctxt->node_seq.maximum));
+
+ if (ctxt->node_seq.buffer == NULL)
+ tmp_buffer = (xmlParserNodeInfo *) xmlMalloc(byte_size);
+ else
+ tmp_buffer =
+ (xmlParserNodeInfo *) xmlRealloc(ctxt->node_seq.buffer,
+ byte_size);
+
+ if (tmp_buffer == NULL) {
+ xmlErrMemory(ctxt, "failed to allocate buffer\n");
+ return;
+ }
+ ctxt->node_seq.buffer = tmp_buffer;
+ ctxt->node_seq.maximum *= 2;
+ }
+
+ /* If position is not at end, move elements out of the way */
+ if (pos != ctxt->node_seq.length) {
+ unsigned long i;
+
+ for (i = ctxt->node_seq.length; i > pos; i--)
+ ctxt->node_seq.buffer[i] = ctxt->node_seq.buffer[i - 1];
+ }
+
+ /* Copy element and increase length */
+ ctxt->node_seq.buffer[pos] = *info;
+ ctxt->node_seq.length++;
+ }
+}
+
+/************************************************************************
+ * *
+ * Defaults settings *
+ * *
+ ************************************************************************/
+/**
+ * xmlPedanticParserDefault:
+ * @val: int 0 or 1
+ *
+ * Set and return the previous value for enabling pedantic warnings.
+ *
+ * Returns the last value for 0 for no substitution, 1 for substitution.
+ */
+
+int
+xmlPedanticParserDefault(int val) {
+ int old = xmlPedanticParserDefaultValue;
+
+ xmlPedanticParserDefaultValue = val;
+ return(old);
+}
+
+/**
+ * xmlLineNumbersDefault:
+ * @val: int 0 or 1
+ *
+ * Set and return the previous value for enabling line numbers in elements
+ * contents. This may break on old application and is turned off by default.
+ *
+ * Returns the last value for 0 for no substitution, 1 for substitution.
+ */
+
+int
+xmlLineNumbersDefault(int val) {
+ int old = xmlLineNumbersDefaultValue;
+
+ xmlLineNumbersDefaultValue = val;
+ return(old);
+}
+
+/**
+ * xmlSubstituteEntitiesDefault:
+ * @val: int 0 or 1
+ *
+ * Set and return the previous value for default entity support.
+ * Initially the parser always keep entity references instead of substituting
+ * entity values in the output. This function has to be used to change the
+ * default parser behavior
+ * SAX::substituteEntities() has to be used for changing that on a file by
+ * file basis.
+ *
+ * Returns the last value for 0 for no substitution, 1 for substitution.
+ */
+
+int
+xmlSubstituteEntitiesDefault(int val) {
+ int old = xmlSubstituteEntitiesDefaultValue;
+
+ xmlSubstituteEntitiesDefaultValue = val;
+ return(old);
+}
+
+/**
+ * xmlKeepBlanksDefault:
+ * @val: int 0 or 1
+ *
+ * Set and return the previous value for default blanks text nodes support.
+ * The 1.x version of the parser used an heuristic to try to detect
+ * ignorable white spaces. As a result the SAX callback was generating
+ * xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when
+ * using the DOM output text nodes containing those blanks were not generated.
+ * The 2.x and later version will switch to the XML standard way and
+ * ignorableWhitespace() are only generated when running the parser in
+ * validating mode and when the current element doesn't allow CDATA or
+ * mixed content.
+ * This function is provided as a way to force the standard behavior
+ * on 1.X libs and to switch back to the old mode for compatibility when
+ * running 1.X client code on 2.X . Upgrade of 1.X code should be done
+ * by using xmlIsBlankNode() commodity function to detect the "empty"
+ * nodes generated.
+ * This value also affect autogeneration of indentation when saving code
+ * if blanks sections are kept, indentation is not generated.
+ *
+ * Returns the last value for 0 for no substitution, 1 for substitution.
+ */
+
+int
+xmlKeepBlanksDefault(int val) {
+ int old = xmlKeepBlanksDefaultValue;
+
+ xmlKeepBlanksDefaultValue = val;
+ if (!val) xmlIndentTreeOutput = 1;
+ return(old);
+}
+
+#define bottom_parserInternals
+#include "elfgcchack.h"
diff --git a/pattern.c b/pattern.c
new file mode 100644
index 0000000..33dee3a
--- /dev/null
+++ b/pattern.c
@@ -0,0 +1,2617 @@
+/*
+ * pattern.c: Implemetation of selectors for nodes
+ *
+ * Reference:
+ * http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
+ * to some extent
+ * http://www.w3.org/TR/1999/REC-xml-19991116
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+/*
+ * TODO:
+ * - compilation flags to check for specific syntaxes
+ * using flags of xmlPatterncompile()
+ * - making clear how pattern starting with / or . need to be handled,
+ * currently push(NULL, NULL) means a reset of the streaming context
+ * and indicating we are on / (the document node), probably need
+ * something similar for .
+ * - get rid of the "compile" starting with lowercase
+ * - DONE (2006-05-16): get rid of the Strdup/Strndup in case of dictionary
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/hash.h>
+#include <libxml/dict.h>
+#include <libxml/xmlerror.h>
+#include <libxml/parserInternals.h>
+#include <libxml/pattern.h>
+
+#ifdef LIBXML_PATTERN_ENABLED
+
+/* #define DEBUG_STREAMING */
+
+#ifdef ERROR
+#undef ERROR
+#endif
+#define ERROR(a, b, c, d)
+#define ERROR5(a, b, c, d, e)
+
+#define XML_STREAM_STEP_DESC 1
+#define XML_STREAM_STEP_FINAL 2
+#define XML_STREAM_STEP_ROOT 4
+#define XML_STREAM_STEP_ATTR 8
+#define XML_STREAM_STEP_NODE 16
+#define XML_STREAM_STEP_IN_SET 32
+
+/*
+* NOTE: Those private flags (XML_STREAM_xxx) are used
+* in _xmlStreamCtxt->flag. They extend the public
+* xmlPatternFlags, so be carefull not to interfere with the
+* reserved values for xmlPatternFlags.
+*/
+#define XML_STREAM_FINAL_IS_ANY_NODE 1<<14
+#define XML_STREAM_FROM_ROOT 1<<15
+#define XML_STREAM_DESC 1<<16
+
+/*
+* XML_STREAM_ANY_NODE is used for comparison against
+* xmlElementType enums, to indicate a node of any type.
+*/
+#define XML_STREAM_ANY_NODE 100
+
+#define XML_PATTERN_NOTPATTERN (XML_PATTERN_XPATH | \
+ XML_PATTERN_XSSEL | \
+ XML_PATTERN_XSFIELD)
+
+#define XML_STREAM_XS_IDC(c) ((c)->flags & \
+ (XML_PATTERN_XSSEL | XML_PATTERN_XSFIELD))
+
+#define XML_STREAM_XS_IDC_SEL(c) ((c)->flags & XML_PATTERN_XSSEL)
+
+#define XML_STREAM_XS_IDC_FIELD(c) ((c)->flags & XML_PATTERN_XSFIELD)
+
+#define XML_PAT_COPY_NSNAME(c, r, nsname) \
+ if ((c)->comp->dict) \
+ r = (xmlChar *) xmlDictLookup((c)->comp->dict, BAD_CAST nsname, -1); \
+ else r = xmlStrdup(BAD_CAST nsname);
+
+#define XML_PAT_FREE_STRING(c, r) if ((c)->comp->dict == NULL) xmlFree(r);
+
+typedef struct _xmlStreamStep xmlStreamStep;
+typedef xmlStreamStep *xmlStreamStepPtr;
+struct _xmlStreamStep {
+ int flags; /* properties of that step */
+ const xmlChar *name; /* first string value if NULL accept all */
+ const xmlChar *ns; /* second string value */
+ int nodeType; /* type of node */
+};
+
+typedef struct _xmlStreamComp xmlStreamComp;
+typedef xmlStreamComp *xmlStreamCompPtr;
+struct _xmlStreamComp {
+ xmlDict *dict; /* the dictionary if any */
+ int nbStep; /* number of steps in the automata */
+ int maxStep; /* allocated number of steps */
+ xmlStreamStepPtr steps; /* the array of steps */
+ int flags;
+};
+
+struct _xmlStreamCtxt {
+ struct _xmlStreamCtxt *next;/* link to next sub pattern if | */
+ xmlStreamCompPtr comp; /* the compiled stream */
+ int nbState; /* number of states in the automata */
+ int maxState; /* allocated number of states */
+ int level; /* how deep are we ? */
+ int *states; /* the array of step indexes */
+ int flags; /* validation options */
+ int blockLevel;
+};
+
+static void xmlFreeStreamComp(xmlStreamCompPtr comp);
+
+/*
+ * Types are private:
+ */
+
+typedef enum {
+ XML_OP_END=0,
+ XML_OP_ROOT,
+ XML_OP_ELEM,
+ XML_OP_CHILD,
+ XML_OP_ATTR,
+ XML_OP_PARENT,
+ XML_OP_ANCESTOR,
+ XML_OP_NS,
+ XML_OP_ALL
+} xmlPatOp;
+
+
+typedef struct _xmlStepState xmlStepState;
+typedef xmlStepState *xmlStepStatePtr;
+struct _xmlStepState {
+ int step;
+ xmlNodePtr node;
+};
+
+typedef struct _xmlStepStates xmlStepStates;
+typedef xmlStepStates *xmlStepStatesPtr;
+struct _xmlStepStates {
+ int nbstates;
+ int maxstates;
+ xmlStepStatePtr states;
+};
+
+typedef struct _xmlStepOp xmlStepOp;
+typedef xmlStepOp *xmlStepOpPtr;
+struct _xmlStepOp {
+ xmlPatOp op;
+ const xmlChar *value;
+ const xmlChar *value2; /* The namespace name */
+};
+
+#define PAT_FROM_ROOT (1<<8)
+#define PAT_FROM_CUR (1<<9)
+
+struct _xmlPattern {
+ void *data; /* the associated template */
+ xmlDictPtr dict; /* the optional dictionary */
+ struct _xmlPattern *next; /* next pattern if | is used */
+ const xmlChar *pattern; /* the pattern */
+ int flags; /* flags */
+ int nbStep;
+ int maxStep;
+ xmlStepOpPtr steps; /* ops for computation */
+ xmlStreamCompPtr stream; /* the streaming data if any */
+};
+
+typedef struct _xmlPatParserContext xmlPatParserContext;
+typedef xmlPatParserContext *xmlPatParserContextPtr;
+struct _xmlPatParserContext {
+ const xmlChar *cur; /* the current char being parsed */
+ const xmlChar *base; /* the full expression */
+ int error; /* error code */
+ xmlDictPtr dict; /* the dictionary if any */
+ xmlPatternPtr comp; /* the result */
+ xmlNodePtr elem; /* the current node if any */
+ const xmlChar **namespaces; /* the namespaces definitions */
+ int nb_namespaces; /* the number of namespaces */
+};
+
+/************************************************************************
+ * *
+ * Type functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNewPattern:
+ *
+ * Create a new XSLT Pattern
+ *
+ * Returns the newly allocated xmlPatternPtr or NULL in case of error
+ */
+static xmlPatternPtr
+xmlNewPattern(void) {
+ xmlPatternPtr cur;
+
+ cur = (xmlPatternPtr) xmlMalloc(sizeof(xmlPattern));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewPattern : malloc failed\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlPattern));
+ cur->maxStep = 10;
+ cur->steps = (xmlStepOpPtr) xmlMalloc(cur->maxStep * sizeof(xmlStepOp));
+ if (cur->steps == NULL) {
+ xmlFree(cur);
+ ERROR(NULL, NULL, NULL,
+ "xmlNewPattern : malloc failed\n");
+ return(NULL);
+ }
+ return(cur);
+}
+
+/**
+ * xmlFreePattern:
+ * @comp: an XSLT comp
+ *
+ * Free up the memory allocated by @comp
+ */
+void
+xmlFreePattern(xmlPatternPtr comp) {
+ xmlStepOpPtr op;
+ int i;
+
+ if (comp == NULL)
+ return;
+ if (comp->next != NULL)
+ xmlFreePattern(comp->next);
+ if (comp->stream != NULL)
+ xmlFreeStreamComp(comp->stream);
+ if (comp->pattern != NULL)
+ xmlFree((xmlChar *)comp->pattern);
+ if (comp->steps != NULL) {
+ if (comp->dict == NULL) {
+ for (i = 0;i < comp->nbStep;i++) {
+ op = &comp->steps[i];
+ if (op->value != NULL)
+ xmlFree((xmlChar *) op->value);
+ if (op->value2 != NULL)
+ xmlFree((xmlChar *) op->value2);
+ }
+ }
+ xmlFree(comp->steps);
+ }
+ if (comp->dict != NULL)
+ xmlDictFree(comp->dict);
+
+ memset(comp, -1, sizeof(xmlPattern));
+ xmlFree(comp);
+}
+
+/**
+ * xmlFreePatternList:
+ * @comp: an XSLT comp list
+ *
+ * Free up the memory allocated by all the elements of @comp
+ */
+void
+xmlFreePatternList(xmlPatternPtr comp) {
+ xmlPatternPtr cur;
+
+ while (comp != NULL) {
+ cur = comp;
+ comp = comp->next;
+ cur->next = NULL;
+ xmlFreePattern(cur);
+ }
+}
+
+/**
+ * xmlNewPatParserContext:
+ * @pattern: the pattern context
+ * @dict: the inherited dictionary or NULL
+ * @namespaces: the prefix definitions, array of [URI, prefix] terminated
+ * with [NULL, NULL] or NULL if no namespace is used
+ *
+ * Create a new XML pattern parser context
+ *
+ * Returns the newly allocated xmlPatParserContextPtr or NULL in case of error
+ */
+static xmlPatParserContextPtr
+xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict,
+ const xmlChar **namespaces) {
+ xmlPatParserContextPtr cur;
+
+ if (pattern == NULL)
+ return(NULL);
+
+ cur = (xmlPatParserContextPtr) xmlMalloc(sizeof(xmlPatParserContext));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewPatParserContext : malloc failed\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlPatParserContext));
+ cur->dict = dict;
+ cur->cur = pattern;
+ cur->base = pattern;
+ if (namespaces != NULL) {
+ int i;
+ for (i = 0;namespaces[2 * i] != NULL;i++)
+ ;
+ cur->nb_namespaces = i;
+ } else {
+ cur->nb_namespaces = 0;
+ }
+ cur->namespaces = namespaces;
+ return(cur);
+}
+
+/**
+ * xmlFreePatParserContext:
+ * @ctxt: an XSLT parser context
+ *
+ * Free up the memory allocated by @ctxt
+ */
+static void
+xmlFreePatParserContext(xmlPatParserContextPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+ memset(ctxt, -1, sizeof(xmlPatParserContext));
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlPatternAdd:
+ * @comp: the compiled match expression
+ * @op: an op
+ * @value: the first value
+ * @value2: the second value
+ *
+ * Add a step to an XSLT Compiled Match
+ *
+ * Returns -1 in case of failure, 0 otherwise.
+ */
+static int
+xmlPatternAdd(xmlPatParserContextPtr ctxt ATTRIBUTE_UNUSED,
+ xmlPatternPtr comp,
+ xmlPatOp op, xmlChar * value, xmlChar * value2)
+{
+ if (comp->nbStep >= comp->maxStep) {
+ xmlStepOpPtr temp;
+ temp = (xmlStepOpPtr) xmlRealloc(comp->steps, comp->maxStep * 2 *
+ sizeof(xmlStepOp));
+ if (temp == NULL) {
+ ERROR(ctxt, NULL, NULL,
+ "xmlPatternAdd: realloc failed\n");
+ return (-1);
+ }
+ comp->steps = temp;
+ comp->maxStep *= 2;
+ }
+ comp->steps[comp->nbStep].op = op;
+ comp->steps[comp->nbStep].value = value;
+ comp->steps[comp->nbStep].value2 = value2;
+ comp->nbStep++;
+ return (0);
+}
+
+#if 0
+/**
+ * xsltSwapTopPattern:
+ * @comp: the compiled match expression
+ *
+ * reverse the two top steps.
+ */
+static void
+xsltSwapTopPattern(xmlPatternPtr comp) {
+ int i;
+ int j = comp->nbStep - 1;
+
+ if (j > 0) {
+ register const xmlChar *tmp;
+ register xmlPatOp op;
+ i = j - 1;
+ tmp = comp->steps[i].value;
+ comp->steps[i].value = comp->steps[j].value;
+ comp->steps[j].value = tmp;
+ tmp = comp->steps[i].value2;
+ comp->steps[i].value2 = comp->steps[j].value2;
+ comp->steps[j].value2 = tmp;
+ op = comp->steps[i].op;
+ comp->steps[i].op = comp->steps[j].op;
+ comp->steps[j].op = op;
+ }
+}
+#endif
+
+/**
+ * xmlReversePattern:
+ * @comp: the compiled match expression
+ *
+ * reverse all the stack of expressions
+ *
+ * returns 0 in case of success and -1 in case of error.
+ */
+static int
+xmlReversePattern(xmlPatternPtr comp) {
+ int i, j;
+
+ /*
+ * remove the leading // for //a or .//a
+ */
+ if ((comp->nbStep > 0) && (comp->steps[0].op == XML_OP_ANCESTOR)) {
+ for (i = 0, j = 1;j < comp->nbStep;i++,j++) {
+ comp->steps[i].value = comp->steps[j].value;
+ comp->steps[i].value2 = comp->steps[j].value2;
+ comp->steps[i].op = comp->steps[j].op;
+ }
+ comp->nbStep--;
+ }
+ if (comp->nbStep >= comp->maxStep) {
+ xmlStepOpPtr temp;
+ temp = (xmlStepOpPtr) xmlRealloc(comp->steps, comp->maxStep * 2 *
+ sizeof(xmlStepOp));
+ if (temp == NULL) {
+ ERROR(ctxt, NULL, NULL,
+ "xmlReversePattern: realloc failed\n");
+ return (-1);
+ }
+ comp->steps = temp;
+ comp->maxStep *= 2;
+ }
+ i = 0;
+ j = comp->nbStep - 1;
+ while (j > i) {
+ register const xmlChar *tmp;
+ register xmlPatOp op;
+ tmp = comp->steps[i].value;
+ comp->steps[i].value = comp->steps[j].value;
+ comp->steps[j].value = tmp;
+ tmp = comp->steps[i].value2;
+ comp->steps[i].value2 = comp->steps[j].value2;
+ comp->steps[j].value2 = tmp;
+ op = comp->steps[i].op;
+ comp->steps[i].op = comp->steps[j].op;
+ comp->steps[j].op = op;
+ j--;
+ i++;
+ }
+ comp->steps[comp->nbStep].value = NULL;
+ comp->steps[comp->nbStep].value2 = NULL;
+ comp->steps[comp->nbStep++].op = XML_OP_END;
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * The interpreter for the precompiled patterns *
+ * *
+ ************************************************************************/
+
+static int
+xmlPatPushState(xmlStepStates *states, int step, xmlNodePtr node) {
+ if ((states->states == NULL) || (states->maxstates <= 0)) {
+ states->maxstates = 4;
+ states->nbstates = 0;
+ states->states = xmlMalloc(4 * sizeof(xmlStepState));
+ }
+ else if (states->maxstates <= states->nbstates) {
+ xmlStepState *tmp;
+
+ tmp = (xmlStepStatePtr) xmlRealloc(states->states,
+ 2 * states->maxstates * sizeof(xmlStepState));
+ if (tmp == NULL)
+ return(-1);
+ states->states = tmp;
+ states->maxstates *= 2;
+ }
+ states->states[states->nbstates].step = step;
+ states->states[states->nbstates++].node = node;
+#if 0
+ fprintf(stderr, "Push: %d, %s\n", step, node->name);
+#endif
+ return(0);
+}
+
+/**
+ * xmlPatMatch:
+ * @comp: the precompiled pattern
+ * @node: a node
+ *
+ * Test whether the node matches the pattern
+ *
+ * Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
+ */
+static int
+xmlPatMatch(xmlPatternPtr comp, xmlNodePtr node) {
+ int i;
+ xmlStepOpPtr step;
+ xmlStepStates states = {0, 0, NULL}; /* // may require backtrack */
+
+ if ((comp == NULL) || (node == NULL)) return(-1);
+ i = 0;
+restart:
+ for (;i < comp->nbStep;i++) {
+ step = &comp->steps[i];
+ switch (step->op) {
+ case XML_OP_END:
+ goto found;
+ case XML_OP_ROOT:
+ if (node->type == XML_NAMESPACE_DECL)
+ goto rollback;
+ node = node->parent;
+ if ((node->type == XML_DOCUMENT_NODE) ||
+#ifdef LIBXML_DOCB_ENABLED
+ (node->type == XML_DOCB_DOCUMENT_NODE) ||
+#endif
+ (node->type == XML_HTML_DOCUMENT_NODE))
+ continue;
+ goto rollback;
+ case XML_OP_ELEM:
+ if (node->type != XML_ELEMENT_NODE)
+ goto rollback;
+ if (step->value == NULL)
+ continue;
+ if (step->value[0] != node->name[0])
+ goto rollback;
+ if (!xmlStrEqual(step->value, node->name))
+ goto rollback;
+
+ /* Namespace test */
+ if (node->ns == NULL) {
+ if (step->value2 != NULL)
+ goto rollback;
+ } else if (node->ns->href != NULL) {
+ if (step->value2 == NULL)
+ goto rollback;
+ if (!xmlStrEqual(step->value2, node->ns->href))
+ goto rollback;
+ }
+ continue;
+ case XML_OP_CHILD: {
+ xmlNodePtr lst;
+
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_DOCUMENT_NODE) &&
+#ifdef LIBXML_DOCB_ENABLED
+ (node->type != XML_DOCB_DOCUMENT_NODE) &&
+#endif
+ (node->type != XML_HTML_DOCUMENT_NODE))
+ goto rollback;
+
+ lst = node->children;
+
+ if (step->value != NULL) {
+ while (lst != NULL) {
+ if ((lst->type == XML_ELEMENT_NODE) &&
+ (step->value[0] == lst->name[0]) &&
+ (xmlStrEqual(step->value, lst->name)))
+ break;
+ lst = lst->next;
+ }
+ if (lst != NULL)
+ continue;
+ }
+ goto rollback;
+ }
+ case XML_OP_ATTR:
+ if (node->type != XML_ATTRIBUTE_NODE)
+ goto rollback;
+ if (step->value != NULL) {
+ if (step->value[0] != node->name[0])
+ goto rollback;
+ if (!xmlStrEqual(step->value, node->name))
+ goto rollback;
+ }
+ /* Namespace test */
+ if (node->ns == NULL) {
+ if (step->value2 != NULL)
+ goto rollback;
+ } else if (step->value2 != NULL) {
+ if (!xmlStrEqual(step->value2, node->ns->href))
+ goto rollback;
+ }
+ continue;
+ case XML_OP_PARENT:
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE) ||
+#ifdef LIBXML_DOCB_ENABLED
+ (node->type == XML_DOCB_DOCUMENT_NODE) ||
+#endif
+ (node->type == XML_NAMESPACE_DECL))
+ goto rollback;
+ node = node->parent;
+ if (node == NULL)
+ goto rollback;
+ if (step->value == NULL)
+ continue;
+ if (step->value[0] != node->name[0])
+ goto rollback;
+ if (!xmlStrEqual(step->value, node->name))
+ goto rollback;
+ /* Namespace test */
+ if (node->ns == NULL) {
+ if (step->value2 != NULL)
+ goto rollback;
+ } else if (node->ns->href != NULL) {
+ if (step->value2 == NULL)
+ goto rollback;
+ if (!xmlStrEqual(step->value2, node->ns->href))
+ goto rollback;
+ }
+ continue;
+ case XML_OP_ANCESTOR:
+ /* TODO: implement coalescing of ANCESTOR/NODE ops */
+ if (step->value == NULL) {
+ i++;
+ step = &comp->steps[i];
+ if (step->op == XML_OP_ROOT)
+ goto found;
+ if (step->op != XML_OP_ELEM)
+ goto rollback;
+ if (step->value == NULL)
+ return(-1);
+ }
+ if (node == NULL)
+ goto rollback;
+ if ((node->type == XML_DOCUMENT_NODE) ||
+ (node->type == XML_HTML_DOCUMENT_NODE) ||
+#ifdef LIBXML_DOCB_ENABLED
+ (node->type == XML_DOCB_DOCUMENT_NODE) ||
+#endif
+ (node->type == XML_NAMESPACE_DECL))
+ goto rollback;
+ node = node->parent;
+ while (node != NULL) {
+ if ((node->type == XML_ELEMENT_NODE) &&
+ (step->value[0] == node->name[0]) &&
+ (xmlStrEqual(step->value, node->name))) {
+ /* Namespace test */
+ if (node->ns == NULL) {
+ if (step->value2 == NULL)
+ break;
+ } else if (node->ns->href != NULL) {
+ if ((step->value2 != NULL) &&
+ (xmlStrEqual(step->value2, node->ns->href)))
+ break;
+ }
+ }
+ node = node->parent;
+ }
+ if (node == NULL)
+ goto rollback;
+ /*
+ * prepare a potential rollback from here
+ * for ancestors of that node.
+ */
+ if (step->op == XML_OP_ANCESTOR)
+ xmlPatPushState(&states, i, node);
+ else
+ xmlPatPushState(&states, i - 1, node);
+ continue;
+ case XML_OP_NS:
+ if (node->type != XML_ELEMENT_NODE)
+ goto rollback;
+ if (node->ns == NULL) {
+ if (step->value != NULL)
+ goto rollback;
+ } else if (node->ns->href != NULL) {
+ if (step->value == NULL)
+ goto rollback;
+ if (!xmlStrEqual(step->value, node->ns->href))
+ goto rollback;
+ }
+ break;
+ case XML_OP_ALL:
+ if (node->type != XML_ELEMENT_NODE)
+ goto rollback;
+ break;
+ }
+ }
+found:
+ if (states.states != NULL) {
+ /* Free the rollback states */
+ xmlFree(states.states);
+ }
+ return(1);
+rollback:
+ /* got an error try to rollback */
+ if (states.states == NULL)
+ return(0);
+ if (states.nbstates <= 0) {
+ xmlFree(states.states);
+ return(0);
+ }
+ states.nbstates--;
+ i = states.states[states.nbstates].step;
+ node = states.states[states.nbstates].node;
+#if 0
+ fprintf(stderr, "Pop: %d, %s\n", i, node->name);
+#endif
+ goto restart;
+}
+
+/************************************************************************
+ * *
+ * Dedicated parser for templates *
+ * *
+ ************************************************************************/
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+#define CUR (*ctxt->cur)
+#define SKIP(val) ctxt->cur += (val)
+#define NXT(val) ctxt->cur[(val)]
+#define PEEKPREV(val) ctxt->cur[-(val)]
+#define CUR_PTR ctxt->cur
+
+#define SKIP_BLANKS \
+ while (IS_BLANK_CH(CUR)) NEXT
+
+#define CURRENT (*ctxt->cur)
+#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
+
+
+#define PUSH(op, val, val2) \
+ if (xmlPatternAdd(ctxt, ctxt->comp, (op), (val), (val2))) goto error;
+
+#define XSLT_ERROR(X) \
+ { xsltError(ctxt, __FILE__, __LINE__, X); \
+ ctxt->error = (X); return; }
+
+#define XSLT_ERROR0(X) \
+ { xsltError(ctxt, __FILE__, __LINE__, X); \
+ ctxt->error = (X); return(0); }
+
+#if 0
+/**
+ * xmlPatScanLiteral:
+ * @ctxt: the XPath Parser context
+ *
+ * Parse an XPath Litteral:
+ *
+ * [29] Literal ::= '"' [^"]* '"'
+ * | "'" [^']* "'"
+ *
+ * Returns the Literal parsed or NULL
+ */
+
+static xmlChar *
+xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
+ const xmlChar *q, *cur;
+ xmlChar *ret = NULL;
+ int val, len;
+
+ SKIP_BLANKS;
+ if (CUR == '"') {
+ NEXT;
+ cur = q = CUR_PTR;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ while ((IS_CHAR(val)) && (val != '"')) {
+ cur += len;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ }
+ if (!IS_CHAR(val)) {
+ ctxt->error = 1;
+ return(NULL);
+ } else {
+ if (ctxt->dict)
+ ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
+ else
+ ret = xmlStrndup(q, cur - q);
+ }
+ cur += len;
+ CUR_PTR = cur;
+ } else if (CUR == '\'') {
+ NEXT;
+ cur = q = CUR_PTR;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ while ((IS_CHAR(val)) && (val != '\'')) {
+ cur += len;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ }
+ if (!IS_CHAR(val)) {
+ ctxt->error = 1;
+ return(NULL);
+ } else {
+ if (ctxt->dict)
+ ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
+ else
+ ret = xmlStrndup(q, cur - q);
+ }
+ cur += len;
+ CUR_PTR = cur;
+ } else {
+ /* XP_ERROR(XPATH_START_LITERAL_ERROR); */
+ ctxt->error = 1;
+ return(NULL);
+ }
+ return(ret);
+}
+#endif
+
+/**
+ * xmlPatScanName:
+ * @ctxt: the XPath Parser context
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * [6] Names ::= Name (S Name)*
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static xmlChar *
+xmlPatScanName(xmlPatParserContextPtr ctxt) {
+ const xmlChar *q, *cur;
+ xmlChar *ret = NULL;
+ int val, len;
+
+ SKIP_BLANKS;
+
+ cur = q = CUR_PTR;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ if (!IS_LETTER(val) && (val != '_') && (val != ':'))
+ return(NULL);
+
+ while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
+ (val == '.') || (val == '-') ||
+ (val == '_') ||
+ (IS_COMBINING(val)) ||
+ (IS_EXTENDER(val))) {
+ cur += len;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ }
+ if (ctxt->dict)
+ ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
+ else
+ ret = xmlStrndup(q, cur - q);
+ CUR_PTR = cur;
+ return(ret);
+}
+
+/**
+ * xmlPatScanNCName:
+ * @ctxt: the XPath Parser context
+ *
+ * Parses a non qualified name
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static xmlChar *
+xmlPatScanNCName(xmlPatParserContextPtr ctxt) {
+ const xmlChar *q, *cur;
+ xmlChar *ret = NULL;
+ int val, len;
+
+ SKIP_BLANKS;
+
+ cur = q = CUR_PTR;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ if (!IS_LETTER(val) && (val != '_'))
+ return(NULL);
+
+ while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
+ (val == '.') || (val == '-') ||
+ (val == '_') ||
+ (IS_COMBINING(val)) ||
+ (IS_EXTENDER(val))) {
+ cur += len;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ }
+ if (ctxt->dict)
+ ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
+ else
+ ret = xmlStrndup(q, cur - q);
+ CUR_PTR = cur;
+ return(ret);
+}
+
+#if 0
+/**
+ * xmlPatScanQName:
+ * @ctxt: the XPath Parser context
+ * @prefix: the place to store the prefix
+ *
+ * Parse a qualified name
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static xmlChar *
+xmlPatScanQName(xmlPatParserContextPtr ctxt, xmlChar **prefix) {
+ xmlChar *ret = NULL;
+
+ *prefix = NULL;
+ ret = xmlPatScanNCName(ctxt);
+ if (CUR == ':') {
+ *prefix = ret;
+ NEXT;
+ ret = xmlPatScanNCName(ctxt);
+ }
+ return(ret);
+}
+#endif
+
+/**
+ * xmlCompileAttributeTest:
+ * @ctxt: the compilation context
+ *
+ * Compile an attribute test.
+ */
+static void
+xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
+ xmlChar *token = NULL;
+ xmlChar *name = NULL;
+ xmlChar *URL = NULL;
+
+ SKIP_BLANKS;
+ name = xmlPatScanNCName(ctxt);
+ if (name == NULL) {
+ if (CUR == '*') {
+ PUSH(XML_OP_ATTR, NULL, NULL);
+ NEXT;
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileAttributeTest : Name expected\n");
+ ctxt->error = 1;
+ }
+ return;
+ }
+ if (CUR == ':') {
+ int i;
+ xmlChar *prefix = name;
+
+ NEXT;
+
+ if (IS_BLANK_CH(CUR)) {
+ ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+ XML_PAT_FREE_STRING(ctxt, prefix);
+ ctxt->error = 1;
+ goto error;
+ }
+ /*
+ * This is a namespace match
+ */
+ token = xmlPatScanName(ctxt);
+ if ((prefix[0] == 'x') &&
+ (prefix[1] == 'm') &&
+ (prefix[2] == 'l') &&
+ (prefix[3] == 0))
+ {
+ XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE);
+ } else {
+ for (i = 0;i < ctxt->nb_namespaces;i++) {
+ if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
+ XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
+ break;
+ }
+ }
+ if (i >= ctxt->nb_namespaces) {
+ ERROR5(NULL, NULL, NULL,
+ "xmlCompileAttributeTest : no namespace bound to prefix %s\n",
+ prefix);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ XML_PAT_FREE_STRING(ctxt, prefix);
+ if (token == NULL) {
+ if (CUR == '*') {
+ NEXT;
+ PUSH(XML_OP_ATTR, NULL, URL);
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileAttributeTest : Name expected\n");
+ ctxt->error = 1;
+ goto error;
+ }
+ } else {
+ PUSH(XML_OP_ATTR, token, URL);
+ }
+ } else {
+ PUSH(XML_OP_ATTR, name, NULL);
+ }
+ return;
+error:
+ if (URL != NULL)
+ XML_PAT_FREE_STRING(ctxt, URL)
+ if (token != NULL)
+ XML_PAT_FREE_STRING(ctxt, token);
+}
+
+/**
+ * xmlCompileStepPattern:
+ * @ctxt: the compilation context
+ *
+ * Compile the Step Pattern and generates a precompiled
+ * form suitable for fast matching.
+ *
+ * [3] Step ::= '.' | NameTest
+ * [4] NameTest ::= QName | '*' | NCName ':' '*'
+ */
+
+static void
+xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
+ xmlChar *token = NULL;
+ xmlChar *name = NULL;
+ xmlChar *URL = NULL;
+ int hasBlanks = 0;
+
+ SKIP_BLANKS;
+ if (CUR == '.') {
+ /*
+ * Context node.
+ */
+ NEXT;
+ PUSH(XML_OP_ELEM, NULL, NULL);
+ return;
+ }
+ if (CUR == '@') {
+ /*
+ * Attribute test.
+ */
+ if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) {
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected attribute axis in '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ return;
+ }
+ NEXT;
+ xmlCompileAttributeTest(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ return;
+ }
+ name = xmlPatScanNCName(ctxt);
+ if (name == NULL) {
+ if (CUR == '*') {
+ NEXT;
+ PUSH(XML_OP_ALL, NULL, NULL);
+ return;
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileStepPattern : Name expected\n");
+ ctxt->error = 1;
+ return;
+ }
+ }
+ if (IS_BLANK_CH(CUR)) {
+ hasBlanks = 1;
+ SKIP_BLANKS;
+ }
+ if (CUR == ':') {
+ NEXT;
+ if (CUR != ':') {
+ xmlChar *prefix = name;
+ int i;
+
+ if (hasBlanks || IS_BLANK_CH(CUR)) {
+ ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+ ctxt->error = 1;
+ goto error;
+ }
+ /*
+ * This is a namespace match
+ */
+ token = xmlPatScanName(ctxt);
+ if ((prefix[0] == 'x') &&
+ (prefix[1] == 'm') &&
+ (prefix[2] == 'l') &&
+ (prefix[3] == 0))
+ {
+ XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE)
+ } else {
+ for (i = 0;i < ctxt->nb_namespaces;i++) {
+ if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
+ XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
+ break;
+ }
+ }
+ if (i >= ctxt->nb_namespaces) {
+ ERROR5(NULL, NULL, NULL,
+ "xmlCompileStepPattern : no namespace bound to prefix %s\n",
+ prefix);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ XML_PAT_FREE_STRING(ctxt, prefix);
+ name = NULL;
+ if (token == NULL) {
+ if (CUR == '*') {
+ NEXT;
+ PUSH(XML_OP_NS, URL, NULL);
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileStepPattern : Name expected\n");
+ ctxt->error = 1;
+ goto error;
+ }
+ } else {
+ PUSH(XML_OP_ELEM, token, URL);
+ }
+ } else {
+ NEXT;
+ if (xmlStrEqual(name, (const xmlChar *) "child")) {
+ XML_PAT_FREE_STRING(ctxt, name);
+ name = xmlPatScanName(ctxt);
+ if (name == NULL) {
+ if (CUR == '*') {
+ NEXT;
+ PUSH(XML_OP_ALL, NULL, NULL);
+ return;
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileStepPattern : QName expected\n");
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ if (CUR == ':') {
+ xmlChar *prefix = name;
+ int i;
+
+ NEXT;
+ if (IS_BLANK_CH(CUR)) {
+ ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
+ ctxt->error = 1;
+ goto error;
+ }
+ /*
+ * This is a namespace match
+ */
+ token = xmlPatScanName(ctxt);
+ if ((prefix[0] == 'x') &&
+ (prefix[1] == 'm') &&
+ (prefix[2] == 'l') &&
+ (prefix[3] == 0))
+ {
+ XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE)
+ } else {
+ for (i = 0;i < ctxt->nb_namespaces;i++) {
+ if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
+ XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
+ break;
+ }
+ }
+ if (i >= ctxt->nb_namespaces) {
+ ERROR5(NULL, NULL, NULL,
+ "xmlCompileStepPattern : no namespace bound "
+ "to prefix %s\n", prefix);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ XML_PAT_FREE_STRING(ctxt, prefix);
+ name = NULL;
+ if (token == NULL) {
+ if (CUR == '*') {
+ NEXT;
+ PUSH(XML_OP_NS, URL, NULL);
+ } else {
+ ERROR(NULL, NULL, NULL,
+ "xmlCompileStepPattern : Name expected\n");
+ ctxt->error = 1;
+ goto error;
+ }
+ } else {
+ PUSH(XML_OP_CHILD, token, URL);
+ }
+ } else
+ PUSH(XML_OP_CHILD, name, NULL);
+ return;
+ } else if (xmlStrEqual(name, (const xmlChar *) "attribute")) {
+ XML_PAT_FREE_STRING(ctxt, name)
+ name = NULL;
+ if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) {
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected attribute axis in '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ goto error;
+ }
+ xmlCompileAttributeTest(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ return;
+ } else {
+ ERROR5(NULL, NULL, NULL,
+ "The 'element' or 'attribute' axis is expected.\n", NULL);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ } else if (CUR == '*') {
+ if (name != NULL) {
+ ctxt->error = 1;
+ goto error;
+ }
+ NEXT;
+ PUSH(XML_OP_ALL, token, NULL);
+ } else {
+ PUSH(XML_OP_ELEM, name, NULL);
+ }
+ return;
+error:
+ if (URL != NULL)
+ XML_PAT_FREE_STRING(ctxt, URL)
+ if (token != NULL)
+ XML_PAT_FREE_STRING(ctxt, token)
+ if (name != NULL)
+ XML_PAT_FREE_STRING(ctxt, name)
+}
+
+/**
+ * xmlCompilePathPattern:
+ * @ctxt: the compilation context
+ *
+ * Compile the Path Pattern and generates a precompiled
+ * form suitable for fast matching.
+ *
+ * [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
+ */
+static void
+xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
+ SKIP_BLANKS;
+ if (CUR == '/') {
+ ctxt->comp->flags |= PAT_FROM_ROOT;
+ } else if ((CUR == '.') || (ctxt->comp->flags & XML_PATTERN_NOTPATTERN)) {
+ ctxt->comp->flags |= PAT_FROM_CUR;
+ }
+
+ if ((CUR == '/') && (NXT(1) == '/')) {
+ PUSH(XML_OP_ANCESTOR, NULL, NULL);
+ NEXT;
+ NEXT;
+ } else if ((CUR == '.') && (NXT(1) == '/') && (NXT(2) == '/')) {
+ PUSH(XML_OP_ANCESTOR, NULL, NULL);
+ NEXT;
+ NEXT;
+ NEXT;
+ /* Check for incompleteness. */
+ SKIP_BLANKS;
+ if (CUR == 0) {
+ ERROR5(NULL, NULL, NULL,
+ "Incomplete expression '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ if (CUR == '@') {
+ NEXT;
+ xmlCompileAttributeTest(ctxt);
+ SKIP_BLANKS;
+ /* TODO: check for incompleteness */
+ if (CUR != 0) {
+ xmlCompileStepPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ }
+ } else {
+ if (CUR == '/') {
+ PUSH(XML_OP_ROOT, NULL, NULL);
+ NEXT;
+ /* Check for incompleteness. */
+ SKIP_BLANKS;
+ if (CUR == 0) {
+ ERROR5(NULL, NULL, NULL,
+ "Incomplete expression '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ goto error;
+ }
+ }
+ xmlCompileStepPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ SKIP_BLANKS;
+ while (CUR == '/') {
+ if (NXT(1) == '/') {
+ PUSH(XML_OP_ANCESTOR, NULL, NULL);
+ NEXT;
+ NEXT;
+ SKIP_BLANKS;
+ xmlCompileStepPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ } else {
+ PUSH(XML_OP_PARENT, NULL, NULL);
+ NEXT;
+ SKIP_BLANKS;
+ if (CUR == 0) {
+ ERROR5(NULL, NULL, NULL,
+ "Incomplete expression '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ goto error;
+ }
+ xmlCompileStepPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ }
+ }
+ }
+ if (CUR != 0) {
+ ERROR5(NULL, NULL, NULL,
+ "Failed to compile pattern %s\n", ctxt->base);
+ ctxt->error = 1;
+ }
+error:
+ return;
+}
+
+/**
+ * xmlCompileIDCXPathPath:
+ * @ctxt: the compilation context
+ *
+ * Compile the Path Pattern and generates a precompiled
+ * form suitable for fast matching.
+ *
+ * [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
+ */
+static void
+xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
+ SKIP_BLANKS;
+ if (CUR == '/') {
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected selection of the document root in '%s'.\n",
+ ctxt->base);
+ goto error;
+ }
+ ctxt->comp->flags |= PAT_FROM_CUR;
+
+ if (CUR == '.') {
+ /* "." - "self::node()" */
+ NEXT;
+ SKIP_BLANKS;
+ if (CUR == 0) {
+ /*
+ * Selection of the context node.
+ */
+ PUSH(XML_OP_ELEM, NULL, NULL);
+ return;
+ }
+ if (CUR != '/') {
+ /* TODO: A more meaningful error message. */
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected token after '.' in '%s'.\n", ctxt->base);
+ goto error;
+ }
+ /* "./" - "self::node()/" */
+ NEXT;
+ SKIP_BLANKS;
+ if (CUR == '/') {
+ if (IS_BLANK_CH(PEEKPREV(1))) {
+ /*
+ * Disallow "./ /"
+ */
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected '/' token in '%s'.\n", ctxt->base);
+ goto error;
+ }
+ /* ".//" - "self:node()/descendant-or-self::node()/" */
+ PUSH(XML_OP_ANCESTOR, NULL, NULL);
+ NEXT;
+ SKIP_BLANKS;
+ }
+ if (CUR == 0)
+ goto error_unfinished;
+ }
+ /*
+ * Process steps.
+ */
+ do {
+ xmlCompileStepPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ SKIP_BLANKS;
+ if (CUR != '/')
+ break;
+ PUSH(XML_OP_PARENT, NULL, NULL);
+ NEXT;
+ SKIP_BLANKS;
+ if (CUR == '/') {
+ /*
+ * Disallow subsequent '//'.
+ */
+ ERROR5(NULL, NULL, NULL,
+ "Unexpected subsequent '//' in '%s'.\n",
+ ctxt->base);
+ goto error;
+ }
+ if (CUR == 0)
+ goto error_unfinished;
+
+ } while (CUR != 0);
+
+ if (CUR != 0) {
+ ERROR5(NULL, NULL, NULL,
+ "Failed to compile expression '%s'.\n", ctxt->base);
+ ctxt->error = 1;
+ }
+ return;
+error:
+ ctxt->error = 1;
+ return;
+
+error_unfinished:
+ ctxt->error = 1;
+ ERROR5(NULL, NULL, NULL,
+ "Unfinished expression '%s'.\n", ctxt->base);
+ return;
+}
+
+/************************************************************************
+ * *
+ * The streaming code *
+ * *
+ ************************************************************************/
+
+#ifdef DEBUG_STREAMING
+static void
+xmlDebugStreamComp(xmlStreamCompPtr stream) {
+ int i;
+
+ if (stream == NULL) {
+ printf("Stream: NULL\n");
+ return;
+ }
+ printf("Stream: %d steps\n", stream->nbStep);
+ for (i = 0;i < stream->nbStep;i++) {
+ if (stream->steps[i].ns != NULL) {
+ printf("{%s}", stream->steps[i].ns);
+ }
+ if (stream->steps[i].name == NULL) {
+ printf("* ");
+ } else {
+ printf("%s ", stream->steps[i].name);
+ }
+ if (stream->steps[i].flags & XML_STREAM_STEP_ROOT)
+ printf("root ");
+ if (stream->steps[i].flags & XML_STREAM_STEP_DESC)
+ printf("// ");
+ if (stream->steps[i].flags & XML_STREAM_STEP_FINAL)
+ printf("final ");
+ printf("\n");
+ }
+}
+static void
+xmlDebugStreamCtxt(xmlStreamCtxtPtr ctxt, int match) {
+ int i;
+
+ if (ctxt == NULL) {
+ printf("Stream: NULL\n");
+ return;
+ }
+ printf("Stream: level %d, %d states: ", ctxt->level, ctxt->nbState);
+ if (match)
+ printf("matches\n");
+ else
+ printf("\n");
+ for (i = 0;i < ctxt->nbState;i++) {
+ if (ctxt->states[2 * i] < 0)
+ printf(" %d: free\n", i);
+ else {
+ printf(" %d: step %d, level %d", i, ctxt->states[2 * i],
+ ctxt->states[(2 * i) + 1]);
+ if (ctxt->comp->steps[ctxt->states[2 * i]].flags &
+ XML_STREAM_STEP_DESC)
+ printf(" //\n");
+ else
+ printf("\n");
+ }
+ }
+}
+#endif
+/**
+ * xmlNewStreamComp:
+ * @size: the number of expected steps
+ *
+ * build a new compiled pattern for streaming
+ *
+ * Returns the new structure or NULL in case of error.
+ */
+static xmlStreamCompPtr
+xmlNewStreamComp(int size) {
+ xmlStreamCompPtr cur;
+
+ if (size < 4)
+ size = 4;
+
+ cur = (xmlStreamCompPtr) xmlMalloc(sizeof(xmlStreamComp));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamComp: malloc failed\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlStreamComp));
+ cur->steps = (xmlStreamStepPtr) xmlMalloc(size * sizeof(xmlStreamStep));
+ if (cur->steps == NULL) {
+ xmlFree(cur);
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamComp: malloc failed\n");
+ return(NULL);
+ }
+ cur->nbStep = 0;
+ cur->maxStep = size;
+ return(cur);
+}
+
+/**
+ * xmlFreeStreamComp:
+ * @comp: the compiled pattern for streaming
+ *
+ * Free the compiled pattern for streaming
+ */
+static void
+xmlFreeStreamComp(xmlStreamCompPtr comp) {
+ if (comp != NULL) {
+ if (comp->steps != NULL)
+ xmlFree(comp->steps);
+ if (comp->dict != NULL)
+ xmlDictFree(comp->dict);
+ xmlFree(comp);
+ }
+}
+
+/**
+ * xmlStreamCompAddStep:
+ * @comp: the compiled pattern for streaming
+ * @name: the first string, the name, or NULL for *
+ * @ns: the second step, the namespace name
+ * @flags: the flags for that step
+ *
+ * Add a new step to the compiled pattern
+ *
+ * Returns -1 in case of error or the step index if successful
+ */
+static int
+xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name,
+ const xmlChar *ns, int nodeType, int flags) {
+ xmlStreamStepPtr cur;
+
+ if (comp->nbStep >= comp->maxStep) {
+ cur = (xmlStreamStepPtr) xmlRealloc(comp->steps,
+ comp->maxStep * 2 * sizeof(xmlStreamStep));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamComp: malloc failed\n");
+ return(-1);
+ }
+ comp->steps = cur;
+ comp->maxStep *= 2;
+ }
+ cur = &comp->steps[comp->nbStep++];
+ cur->flags = flags;
+ cur->name = name;
+ cur->ns = ns;
+ cur->nodeType = nodeType;
+ return(comp->nbStep - 1);
+}
+
+/**
+ * xmlStreamCompile:
+ * @comp: the precompiled pattern
+ *
+ * Tries to stream compile a pattern
+ *
+ * Returns -1 in case of failure and 0 in case of success.
+ */
+static int
+xmlStreamCompile(xmlPatternPtr comp) {
+ xmlStreamCompPtr stream;
+ int i, s = 0, root = 0, flags = 0, prevs = -1;
+ xmlStepOp step;
+
+ if ((comp == NULL) || (comp->steps == NULL))
+ return(-1);
+ /*
+ * special case for .
+ */
+ if ((comp->nbStep == 1) &&
+ (comp->steps[0].op == XML_OP_ELEM) &&
+ (comp->steps[0].value == NULL) &&
+ (comp->steps[0].value2 == NULL)) {
+ stream = xmlNewStreamComp(0);
+ if (stream == NULL)
+ return(-1);
+ /* Note that the stream will have no steps in this case. */
+ stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
+ comp->stream = stream;
+ return(0);
+ }
+
+ stream = xmlNewStreamComp((comp->nbStep / 2) + 1);
+ if (stream == NULL)
+ return(-1);
+ if (comp->dict != NULL) {
+ stream->dict = comp->dict;
+ xmlDictReference(stream->dict);
+ }
+
+ i = 0;
+ if (comp->flags & PAT_FROM_ROOT)
+ stream->flags |= XML_STREAM_FROM_ROOT;
+
+ for (;i < comp->nbStep;i++) {
+ step = comp->steps[i];
+ switch (step.op) {
+ case XML_OP_END:
+ break;
+ case XML_OP_ROOT:
+ if (i != 0)
+ goto error;
+ root = 1;
+ break;
+ case XML_OP_NS:
+ s = xmlStreamCompAddStep(stream, NULL, step.value,
+ XML_ELEMENT_NODE, flags);
+ if (s < 0)
+ goto error;
+ prevs = s;
+ flags = 0;
+ break;
+ case XML_OP_ATTR:
+ flags |= XML_STREAM_STEP_ATTR;
+ prevs = -1;
+ s = xmlStreamCompAddStep(stream,
+ step.value, step.value2, XML_ATTRIBUTE_NODE, flags);
+ flags = 0;
+ if (s < 0)
+ goto error;
+ break;
+ case XML_OP_ELEM:
+ if ((step.value == NULL) && (step.value2 == NULL)) {
+ /*
+ * We have a "." or "self::node()" here.
+ * Eliminate redundant self::node() tests like in "/./."
+ * or "//./"
+ * The only case we won't eliminate is "//.", i.e. if
+ * self::node() is the last node test and we had
+ * continuation somewhere beforehand.
+ */
+ if ((comp->nbStep == i + 1) &&
+ (flags & XML_STREAM_STEP_DESC)) {
+ /*
+ * Mark the special case where the expression resolves
+ * to any type of node.
+ */
+ if (comp->nbStep == i + 1) {
+ stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
+ }
+ flags |= XML_STREAM_STEP_NODE;
+ s = xmlStreamCompAddStep(stream, NULL, NULL,
+ XML_STREAM_ANY_NODE, flags);
+ if (s < 0)
+ goto error;
+ flags = 0;
+ /*
+ * If there was a previous step, mark it to be added to
+ * the result node-set; this is needed since only
+ * the last step will be marked as "final" and only
+ * "final" nodes are added to the resulting set.
+ */
+ if (prevs != -1) {
+ stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET;
+ prevs = -1;
+ }
+ break;
+
+ } else {
+ /* Just skip this one. */
+ continue;
+ }
+ }
+ /* An element node. */
+ s = xmlStreamCompAddStep(stream, step.value, step.value2,
+ XML_ELEMENT_NODE, flags);
+ if (s < 0)
+ goto error;
+ prevs = s;
+ flags = 0;
+ break;
+ case XML_OP_CHILD:
+ /* An element node child. */
+ s = xmlStreamCompAddStep(stream, step.value, step.value2,
+ XML_ELEMENT_NODE, flags);
+ if (s < 0)
+ goto error;
+ prevs = s;
+ flags = 0;
+ break;
+ case XML_OP_ALL:
+ s = xmlStreamCompAddStep(stream, NULL, NULL,
+ XML_ELEMENT_NODE, flags);
+ if (s < 0)
+ goto error;
+ prevs = s;
+ flags = 0;
+ break;
+ case XML_OP_PARENT:
+ break;
+ case XML_OP_ANCESTOR:
+ /* Skip redundant continuations. */
+ if (flags & XML_STREAM_STEP_DESC)
+ break;
+ flags |= XML_STREAM_STEP_DESC;
+ /*
+ * Mark the expression as having "//".
+ */
+ if ((stream->flags & XML_STREAM_DESC) == 0)
+ stream->flags |= XML_STREAM_DESC;
+ break;
+ }
+ }
+ if ((! root) && (comp->flags & XML_PATTERN_NOTPATTERN) == 0) {
+ /*
+ * If this should behave like a real pattern, we will mark
+ * the first step as having "//", to be reentrant on every
+ * tree level.
+ */
+ if ((stream->flags & XML_STREAM_DESC) == 0)
+ stream->flags |= XML_STREAM_DESC;
+
+ if (stream->nbStep > 0) {
+ if ((stream->steps[0].flags & XML_STREAM_STEP_DESC) == 0)
+ stream->steps[0].flags |= XML_STREAM_STEP_DESC;
+ }
+ }
+ if (stream->nbStep <= s)
+ goto error;
+ stream->steps[s].flags |= XML_STREAM_STEP_FINAL;
+ if (root)
+ stream->steps[0].flags |= XML_STREAM_STEP_ROOT;
+#ifdef DEBUG_STREAMING
+ xmlDebugStreamComp(stream);
+#endif
+ comp->stream = stream;
+ return(0);
+error:
+ xmlFreeStreamComp(stream);
+ return(0);
+}
+
+/**
+ * xmlNewStreamCtxt:
+ * @size: the number of expected states
+ *
+ * build a new stream context
+ *
+ * Returns the new structure or NULL in case of error.
+ */
+static xmlStreamCtxtPtr
+xmlNewStreamCtxt(xmlStreamCompPtr stream) {
+ xmlStreamCtxtPtr cur;
+
+ cur = (xmlStreamCtxtPtr) xmlMalloc(sizeof(xmlStreamCtxt));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamCtxt: malloc failed\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlStreamCtxt));
+ cur->states = (int *) xmlMalloc(4 * 2 * sizeof(int));
+ if (cur->states == NULL) {
+ xmlFree(cur);
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamCtxt: malloc failed\n");
+ return(NULL);
+ }
+ cur->nbState = 0;
+ cur->maxState = 4;
+ cur->level = 0;
+ cur->comp = stream;
+ cur->blockLevel = -1;
+ return(cur);
+}
+
+/**
+ * xmlFreeStreamCtxt:
+ * @stream: the stream context
+ *
+ * Free the stream context
+ */
+void
+xmlFreeStreamCtxt(xmlStreamCtxtPtr stream) {
+ xmlStreamCtxtPtr next;
+
+ while (stream != NULL) {
+ next = stream->next;
+ if (stream->states != NULL)
+ xmlFree(stream->states);
+ xmlFree(stream);
+ stream = next;
+ }
+}
+
+/**
+ * xmlStreamCtxtAddState:
+ * @comp: the stream context
+ * @idx: the step index for that streaming state
+ *
+ * Add a new state to the stream context
+ *
+ * Returns -1 in case of error or the state index if successful
+ */
+static int
+xmlStreamCtxtAddState(xmlStreamCtxtPtr comp, int idx, int level) {
+ int i;
+ for (i = 0;i < comp->nbState;i++) {
+ if (comp->states[2 * i] < 0) {
+ comp->states[2 * i] = idx;
+ comp->states[2 * i + 1] = level;
+ return(i);
+ }
+ }
+ if (comp->nbState >= comp->maxState) {
+ int *cur;
+
+ cur = (int *) xmlRealloc(comp->states,
+ comp->maxState * 4 * sizeof(int));
+ if (cur == NULL) {
+ ERROR(NULL, NULL, NULL,
+ "xmlNewStreamCtxt: malloc failed\n");
+ return(-1);
+ }
+ comp->states = cur;
+ comp->maxState *= 2;
+ }
+ comp->states[2 * comp->nbState] = idx;
+ comp->states[2 * comp->nbState++ + 1] = level;
+ return(comp->nbState - 1);
+}
+
+/**
+ * xmlStreamPushInternal:
+ * @stream: the stream context
+ * @name: the current name
+ * @ns: the namespace name
+ * @nodeType: the type of the node
+ *
+ * Push new data onto the stream. NOTE: if the call xmlPatterncompile()
+ * indicated a dictionary, then strings for name and ns will be expected
+ * to come from the dictionary.
+ * Both @name and @ns being NULL means the / i.e. the root of the document.
+ * This can also act as a reset.
+ *
+ * Returns: -1 in case of error, 1 if the current state in the stream is a
+ * match and 0 otherwise.
+ */
+static int
+xmlStreamPushInternal(xmlStreamCtxtPtr stream,
+ const xmlChar *name, const xmlChar *ns,
+ int nodeType) {
+ int ret = 0, err = 0, final = 0, tmp, i, m, match, stepNr, desc;
+ xmlStreamCompPtr comp;
+ xmlStreamStep step;
+#ifdef DEBUG_STREAMING
+ xmlStreamCtxtPtr orig = stream;
+#endif
+
+ if ((stream == NULL) || (stream->nbState < 0))
+ return(-1);
+
+ while (stream != NULL) {
+ comp = stream->comp;
+
+ if ((nodeType == XML_ELEMENT_NODE) &&
+ (name == NULL) && (ns == NULL)) {
+ /* We have a document node here (or a reset). */
+ stream->nbState = 0;
+ stream->level = 0;
+ stream->blockLevel = -1;
+ if (comp->flags & XML_STREAM_FROM_ROOT) {
+ if (comp->nbStep == 0) {
+ /* TODO: We have a "/." here? */
+ ret = 1;
+ } else {
+ if ((comp->nbStep == 1) &&
+ (comp->steps[0].nodeType == XML_STREAM_ANY_NODE) &&
+ (comp->steps[0].flags & XML_STREAM_STEP_DESC))
+ {
+ /*
+ * In the case of "//." the document node will match
+ * as well.
+ */
+ ret = 1;
+ } else if (comp->steps[0].flags & XML_STREAM_STEP_ROOT) {
+ /* TODO: Do we need this ? */
+ tmp = xmlStreamCtxtAddState(stream, 0, 0);
+ if (tmp < 0)
+ err++;
+ }
+ }
+ }
+ stream = stream->next;
+ continue; /* while */
+ }
+
+ /*
+ * Fast check for ".".
+ */
+ if (comp->nbStep == 0) {
+ /*
+ * / and . are handled at the XPath node set creation
+ * level by checking min depth
+ */
+ if (stream->flags & XML_PATTERN_XPATH) {
+ stream = stream->next;
+ continue; /* while */
+ }
+ /*
+ * For non-pattern like evaluation like XML Schema IDCs
+ * or traditional XPath expressions, this will match if
+ * we are at the first level only, otherwise on every level.
+ */
+ if ((nodeType != XML_ATTRIBUTE_NODE) &&
+ (((stream->flags & XML_PATTERN_NOTPATTERN) == 0) ||
+ (stream->level == 0))) {
+ ret = 1;
+ }
+ stream->level++;
+ goto stream_next;
+ }
+ if (stream->blockLevel != -1) {
+ /*
+ * Skip blocked expressions.
+ */
+ stream->level++;
+ goto stream_next;
+ }
+
+ if ((nodeType != XML_ELEMENT_NODE) &&
+ (nodeType != XML_ATTRIBUTE_NODE) &&
+ ((comp->flags & XML_STREAM_FINAL_IS_ANY_NODE) == 0)) {
+ /*
+ * No need to process nodes of other types if we don't
+ * resolve to those types.
+ * TODO: Do we need to block the context here?
+ */
+ stream->level++;
+ goto stream_next;
+ }
+
+ /*
+ * Check evolution of existing states
+ */
+ i = 0;
+ m = stream->nbState;
+ while (i < m) {
+ if ((comp->flags & XML_STREAM_DESC) == 0) {
+ /*
+ * If there is no "//", then only the last
+ * added state is of interest.
+ */
+ stepNr = stream->states[2 * (stream->nbState -1)];
+ /*
+ * TODO: Security check, should not happen, remove it.
+ */
+ if (stream->states[(2 * (stream->nbState -1)) + 1] <
+ stream->level) {
+ return (-1);
+ }
+ desc = 0;
+ /* loop-stopper */
+ i = m;
+ } else {
+ /*
+ * If there are "//", then we need to process every "//"
+ * occuring in the states, plus any other state for this
+ * level.
+ */
+ stepNr = stream->states[2 * i];
+
+ /* TODO: should not happen anymore: dead states */
+ if (stepNr < 0)
+ goto next_state;
+
+ tmp = stream->states[(2 * i) + 1];
+
+ /* skip new states just added */
+ if (tmp > stream->level)
+ goto next_state;
+
+ /* skip states at ancestor levels, except if "//" */
+ desc = comp->steps[stepNr].flags & XML_STREAM_STEP_DESC;
+ if ((tmp < stream->level) && (!desc))
+ goto next_state;
+ }
+ /*
+ * Check for correct node-type.
+ */
+ step = comp->steps[stepNr];
+ if (step.nodeType != nodeType) {
+ if (step.nodeType == XML_ATTRIBUTE_NODE) {
+ /*
+ * Block this expression for deeper evaluation.
+ */
+ if ((comp->flags & XML_STREAM_DESC) == 0)
+ stream->blockLevel = stream->level +1;
+ goto next_state;
+ } else if (step.nodeType != XML_STREAM_ANY_NODE)
+ goto next_state;
+ }
+ /*
+ * Compare local/namespace-name.
+ */
+ match = 0;
+ if (step.nodeType == XML_STREAM_ANY_NODE) {
+ match = 1;
+ } else if (step.name == NULL) {
+ if (step.ns == NULL) {
+ /*
+ * This lets through all elements/attributes.
+ */
+ match = 1;
+ } else if (ns != NULL)
+ match = xmlStrEqual(step.ns, ns);
+ } else if (((step.ns != NULL) == (ns != NULL)) &&
+ (name != NULL) &&
+ (step.name[0] == name[0]) &&
+ xmlStrEqual(step.name, name) &&
+ ((step.ns == ns) || xmlStrEqual(step.ns, ns)))
+ {
+ match = 1;
+ }
+#if 0
+/*
+* TODO: Pointer comparison won't work, since not guaranteed that the given
+* values are in the same dict; especially if it's the namespace name,
+* normally coming from ns->href. We need a namespace dict mechanism !
+*/
+ } else if (comp->dict) {
+ if (step.name == NULL) {
+ if (step.ns == NULL)
+ match = 1;
+ else
+ match = (step.ns == ns);
+ } else {
+ match = ((step.name == name) && (step.ns == ns));
+ }
+#endif /* if 0 ------------------------------------------------------- */
+ if (match) {
+ final = step.flags & XML_STREAM_STEP_FINAL;
+ if (desc) {
+ if (final) {
+ ret = 1;
+ } else {
+ /* descending match create a new state */
+ xmlStreamCtxtAddState(stream, stepNr + 1,
+ stream->level + 1);
+ }
+ } else {
+ if (final) {
+ ret = 1;
+ } else {
+ xmlStreamCtxtAddState(stream, stepNr + 1,
+ stream->level + 1);
+ }
+ }
+ if ((ret != 1) && (step.flags & XML_STREAM_STEP_IN_SET)) {
+ /*
+ * Check if we have a special case like "foo/bar//.", where
+ * "foo" is selected as well.
+ */
+ ret = 1;
+ }
+ }
+ if (((comp->flags & XML_STREAM_DESC) == 0) &&
+ ((! match) || final)) {
+ /*
+ * Mark this expression as blocked for any evaluation at
+ * deeper levels. Note that this includes "/foo"
+ * expressions if the *pattern* behaviour is used.
+ */
+ stream->blockLevel = stream->level +1;
+ }
+next_state:
+ i++;
+ }
+
+ stream->level++;
+
+ /*
+ * Re/enter the expression.
+ * Don't reenter if it's an absolute expression like "/foo",
+ * except "//foo".
+ */
+ step = comp->steps[0];
+ if (step.flags & XML_STREAM_STEP_ROOT)
+ goto stream_next;
+
+ desc = step.flags & XML_STREAM_STEP_DESC;
+ if (stream->flags & XML_PATTERN_NOTPATTERN) {
+ /*
+ * Re/enter the expression if it is a "descendant" one,
+ * or if we are at the 1st level of evaluation.
+ */
+
+ if (stream->level == 1) {
+ if (XML_STREAM_XS_IDC(stream)) {
+ /*
+ * XS-IDC: The missing "self::node()" will always
+ * match the first given node.
+ */
+ goto stream_next;
+ } else
+ goto compare;
+ }
+ /*
+ * A "//" is always reentrant.
+ */
+ if (desc)
+ goto compare;
+
+ /*
+ * XS-IDC: Process the 2nd level, since the missing
+ * "self::node()" is responsible for the 2nd level being
+ * the real start level.
+ */
+ if ((stream->level == 2) && XML_STREAM_XS_IDC(stream))
+ goto compare;
+
+ goto stream_next;
+ }
+
+compare:
+ /*
+ * Check expected node-type.
+ */
+ if (step.nodeType != nodeType) {
+ if (nodeType == XML_ATTRIBUTE_NODE)
+ goto stream_next;
+ else if (step.nodeType != XML_STREAM_ANY_NODE)
+ goto stream_next;
+ }
+ /*
+ * Compare local/namespace-name.
+ */
+ match = 0;
+ if (step.nodeType == XML_STREAM_ANY_NODE) {
+ match = 1;
+ } else if (step.name == NULL) {
+ if (step.ns == NULL) {
+ /*
+ * This lets through all elements/attributes.
+ */
+ match = 1;
+ } else if (ns != NULL)
+ match = xmlStrEqual(step.ns, ns);
+ } else if (((step.ns != NULL) == (ns != NULL)) &&
+ (name != NULL) &&
+ (step.name[0] == name[0]) &&
+ xmlStrEqual(step.name, name) &&
+ ((step.ns == ns) || xmlStrEqual(step.ns, ns)))
+ {
+ match = 1;
+ }
+ final = step.flags & XML_STREAM_STEP_FINAL;
+ if (match) {
+ if (final)
+ ret = 1;
+ else
+ xmlStreamCtxtAddState(stream, 1, stream->level);
+ if ((ret != 1) && (step.flags & XML_STREAM_STEP_IN_SET)) {
+ /*
+ * Check if we have a special case like "foo//.", where
+ * "foo" is selected as well.
+ */
+ ret = 1;
+ }
+ }
+ if (((comp->flags & XML_STREAM_DESC) == 0) &&
+ ((! match) || final)) {
+ /*
+ * Mark this expression as blocked for any evaluation at
+ * deeper levels.
+ */
+ stream->blockLevel = stream->level;
+ }
+
+stream_next:
+ stream = stream->next;
+ } /* while stream != NULL */
+
+ if (err > 0)
+ ret = -1;
+#ifdef DEBUG_STREAMING
+ xmlDebugStreamCtxt(orig, ret);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlStreamPush:
+ * @stream: the stream context
+ * @name: the current name
+ * @ns: the namespace name
+ *
+ * Push new data onto the stream. NOTE: if the call xmlPatterncompile()
+ * indicated a dictionary, then strings for name and ns will be expected
+ * to come from the dictionary.
+ * Both @name and @ns being NULL means the / i.e. the root of the document.
+ * This can also act as a reset.
+ * Otherwise the function will act as if it has been given an element-node.
+ *
+ * Returns: -1 in case of error, 1 if the current state in the stream is a
+ * match and 0 otherwise.
+ */
+int
+xmlStreamPush(xmlStreamCtxtPtr stream,
+ const xmlChar *name, const xmlChar *ns) {
+ return (xmlStreamPushInternal(stream, name, ns, (int) XML_ELEMENT_NODE));
+}
+
+/**
+ * xmlStreamPushNode:
+ * @stream: the stream context
+ * @name: the current name
+ * @ns: the namespace name
+ * @nodeType: the type of the node being pushed
+ *
+ * Push new data onto the stream. NOTE: if the call xmlPatterncompile()
+ * indicated a dictionary, then strings for name and ns will be expected
+ * to come from the dictionary.
+ * Both @name and @ns being NULL means the / i.e. the root of the document.
+ * This can also act as a reset.
+ * Different from xmlStreamPush() this function can be fed with nodes of type:
+ * element-, attribute-, text-, cdata-section-, comment- and
+ * processing-instruction-node.
+ *
+ * Returns: -1 in case of error, 1 if the current state in the stream is a
+ * match and 0 otherwise.
+ */
+int
+xmlStreamPushNode(xmlStreamCtxtPtr stream,
+ const xmlChar *name, const xmlChar *ns,
+ int nodeType)
+{
+ return (xmlStreamPushInternal(stream, name, ns,
+ nodeType));
+}
+
+/**
+* xmlStreamPushAttr:
+* @stream: the stream context
+* @name: the current name
+* @ns: the namespace name
+*
+* Push new attribute data onto the stream. NOTE: if the call xmlPatterncompile()
+* indicated a dictionary, then strings for name and ns will be expected
+* to come from the dictionary.
+* Both @name and @ns being NULL means the / i.e. the root of the document.
+* This can also act as a reset.
+* Otherwise the function will act as if it has been given an attribute-node.
+*
+* Returns: -1 in case of error, 1 if the current state in the stream is a
+* match and 0 otherwise.
+*/
+int
+xmlStreamPushAttr(xmlStreamCtxtPtr stream,
+ const xmlChar *name, const xmlChar *ns) {
+ return (xmlStreamPushInternal(stream, name, ns, (int) XML_ATTRIBUTE_NODE));
+}
+
+/**
+ * xmlStreamPop:
+ * @stream: the stream context
+ *
+ * push one level from the stream.
+ *
+ * Returns: -1 in case of error, 0 otherwise.
+ */
+int
+xmlStreamPop(xmlStreamCtxtPtr stream) {
+ int i, lev;
+
+ if (stream == NULL)
+ return(-1);
+ while (stream != NULL) {
+ /*
+ * Reset block-level.
+ */
+ if (stream->blockLevel == stream->level)
+ stream->blockLevel = -1;
+
+ /*
+ * stream->level can be zero when XML_FINAL_IS_ANY_NODE is set
+ * (see the thread at
+ * http://mail.gnome.org/archives/xslt/2008-July/msg00027.html)
+ */
+ if (stream->level)
+ stream->level--;
+ /*
+ * Check evolution of existing states
+ */
+ for (i = stream->nbState -1; i >= 0; i--) {
+ /* discard obsoleted states */
+ lev = stream->states[(2 * i) + 1];
+ if (lev > stream->level)
+ stream->nbState--;
+ if (lev <= stream->level)
+ break;
+ }
+ stream = stream->next;
+ }
+ return(0);
+}
+
+/**
+ * xmlStreamWantsAnyNode:
+ * @streamCtxt: the stream context
+ *
+ * Query if the streaming pattern additionally needs to be fed with
+ * text-, cdata-section-, comment- and processing-instruction-nodes.
+ * If the result is 0 then only element-nodes and attribute-nodes
+ * need to be pushed.
+ *
+ * Returns: 1 in case of need of nodes of the above described types,
+ * 0 otherwise. -1 on API errors.
+ */
+int
+xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt)
+{
+ if (streamCtxt == NULL)
+ return(-1);
+ while (streamCtxt != NULL) {
+ if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)
+ return(1);
+ streamCtxt = streamCtxt->next;
+ }
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * The public interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlPatterncompile:
+ * @pattern: the pattern to compile
+ * @dict: an optional dictionary for interned strings
+ * @flags: compilation flags, see xmlPatternFlags
+ * @namespaces: the prefix definitions, array of [URI, prefix] or NULL
+ *
+ * Compile a pattern.
+ *
+ * Returns the compiled form of the pattern or NULL in case of error
+ */
+xmlPatternPtr
+xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags,
+ const xmlChar **namespaces) {
+ xmlPatternPtr ret = NULL, cur;
+ xmlPatParserContextPtr ctxt = NULL;
+ const xmlChar *or, *start;
+ xmlChar *tmp = NULL;
+ int type = 0;
+ int streamable = 1;
+
+ if (pattern == NULL)
+ return(NULL);
+
+ start = pattern;
+ or = start;
+ while (*or != 0) {
+ tmp = NULL;
+ while ((*or != 0) && (*or != '|')) or++;
+ if (*or == 0)
+ ctxt = xmlNewPatParserContext(start, dict, namespaces);
+ else {
+ tmp = xmlStrndup(start, or - start);
+ if (tmp != NULL) {
+ ctxt = xmlNewPatParserContext(tmp, dict, namespaces);
+ }
+ or++;
+ }
+ if (ctxt == NULL) goto error;
+ cur = xmlNewPattern();
+ if (cur == NULL) goto error;
+ /*
+ * Assign string dict.
+ */
+ if (dict) {
+ cur->dict = dict;
+ xmlDictReference(dict);
+ }
+ if (ret == NULL)
+ ret = cur;
+ else {
+ cur->next = ret->next;
+ ret->next = cur;
+ }
+ cur->flags = flags;
+ ctxt->comp = cur;
+
+ if (XML_STREAM_XS_IDC(cur))
+ xmlCompileIDCXPathPath(ctxt);
+ else
+ xmlCompilePathPattern(ctxt);
+ if (ctxt->error != 0)
+ goto error;
+ xmlFreePatParserContext(ctxt);
+ ctxt = NULL;
+
+
+ if (streamable) {
+ if (type == 0) {
+ type = cur->flags & (PAT_FROM_ROOT | PAT_FROM_CUR);
+ } else if (type == PAT_FROM_ROOT) {
+ if (cur->flags & PAT_FROM_CUR)
+ streamable = 0;
+ } else if (type == PAT_FROM_CUR) {
+ if (cur->flags & PAT_FROM_ROOT)
+ streamable = 0;
+ }
+ }
+ if (streamable)
+ xmlStreamCompile(cur);
+ if (xmlReversePattern(cur) < 0)
+ goto error;
+ if (tmp != NULL) {
+ xmlFree(tmp);
+ tmp = NULL;
+ }
+ start = or;
+ }
+ if (streamable == 0) {
+ cur = ret;
+ while (cur != NULL) {
+ if (cur->stream != NULL) {
+ xmlFreeStreamComp(cur->stream);
+ cur->stream = NULL;
+ }
+ cur = cur->next;
+ }
+ }
+
+ return(ret);
+error:
+ if (ctxt != NULL) xmlFreePatParserContext(ctxt);
+ if (ret != NULL) xmlFreePattern(ret);
+ if (tmp != NULL) xmlFree(tmp);
+ return(NULL);
+}
+
+/**
+ * xmlPatternMatch:
+ * @comp: the precompiled pattern
+ * @node: a node
+ *
+ * Test whether the node matches the pattern
+ *
+ * Returns 1 if it matches, 0 if it doesn't and -1 in case of failure
+ */
+int
+xmlPatternMatch(xmlPatternPtr comp, xmlNodePtr node)
+{
+ int ret = 0;
+
+ if ((comp == NULL) || (node == NULL))
+ return(-1);
+
+ while (comp != NULL) {
+ ret = xmlPatMatch(comp, node);
+ if (ret != 0)
+ return(ret);
+ comp = comp->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlPatternGetStreamCtxt:
+ * @comp: the precompiled pattern
+ *
+ * Get a streaming context for that pattern
+ * Use xmlFreeStreamCtxt to free the context.
+ *
+ * Returns a pointer to the context or NULL in case of failure
+ */
+xmlStreamCtxtPtr
+xmlPatternGetStreamCtxt(xmlPatternPtr comp)
+{
+ xmlStreamCtxtPtr ret = NULL, cur;
+
+ if ((comp == NULL) || (comp->stream == NULL))
+ return(NULL);
+
+ while (comp != NULL) {
+ if (comp->stream == NULL)
+ goto failed;
+ cur = xmlNewStreamCtxt(comp->stream);
+ if (cur == NULL)
+ goto failed;
+ if (ret == NULL)
+ ret = cur;
+ else {
+ cur->next = ret->next;
+ ret->next = cur;
+ }
+ cur->flags = comp->flags;
+ comp = comp->next;
+ }
+ return(ret);
+failed:
+ xmlFreeStreamCtxt(ret);
+ return(NULL);
+}
+
+/**
+ * xmlPatternStreamable:
+ * @comp: the precompiled pattern
+ *
+ * Check if the pattern is streamable i.e. xmlPatternGetStreamCtxt()
+ * should work.
+ *
+ * Returns 1 if streamable, 0 if not and -1 in case of error.
+ */
+int
+xmlPatternStreamable(xmlPatternPtr comp) {
+ if (comp == NULL)
+ return(-1);
+ while (comp != NULL) {
+ if (comp->stream == NULL)
+ return(0);
+ comp = comp->next;
+ }
+ return(1);
+}
+
+/**
+ * xmlPatternMaxDepth:
+ * @comp: the precompiled pattern
+ *
+ * Check the maximum depth reachable by a pattern
+ *
+ * Returns -2 if no limit (using //), otherwise the depth,
+ * and -1 in case of error
+ */
+int
+xmlPatternMaxDepth(xmlPatternPtr comp) {
+ int ret = 0, i;
+ if (comp == NULL)
+ return(-1);
+ while (comp != NULL) {
+ if (comp->stream == NULL)
+ return(-1);
+ for (i = 0;i < comp->stream->nbStep;i++)
+ if (comp->stream->steps[i].flags & XML_STREAM_STEP_DESC)
+ return(-2);
+ if (comp->stream->nbStep > ret)
+ ret = comp->stream->nbStep;
+ comp = comp->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlPatternMinDepth:
+ * @comp: the precompiled pattern
+ *
+ * Check the minimum depth reachable by a pattern, 0 mean the / or . are
+ * part of the set.
+ *
+ * Returns -1 in case of error otherwise the depth,
+ *
+ */
+int
+xmlPatternMinDepth(xmlPatternPtr comp) {
+ int ret = 12345678;
+ if (comp == NULL)
+ return(-1);
+ while (comp != NULL) {
+ if (comp->stream == NULL)
+ return(-1);
+ if (comp->stream->nbStep < ret)
+ ret = comp->stream->nbStep;
+ if (ret == 0)
+ return(0);
+ comp = comp->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlPatternFromRoot:
+ * @comp: the precompiled pattern
+ *
+ * Check if the pattern must be looked at from the root.
+ *
+ * Returns 1 if true, 0 if false and -1 in case of error
+ */
+int
+xmlPatternFromRoot(xmlPatternPtr comp) {
+ if (comp == NULL)
+ return(-1);
+ while (comp != NULL) {
+ if (comp->stream == NULL)
+ return(-1);
+ if (comp->flags & PAT_FROM_ROOT)
+ return(1);
+ comp = comp->next;
+ }
+ return(0);
+
+}
+
+#define bottom_pattern
+#include "elfgcchack.h"
+#endif /* LIBXML_PATTERN_ENABLED */
diff --git a/python/Makefile.am b/python/Makefile.am
new file mode 100644
index 0000000..34aed96
--- /dev/null
+++ b/python/Makefile.am
@@ -0,0 +1,54 @@
+# Makefile for libxml2 python library
+AUTOMAKE_OPTIONS = 1.4 foreign
+
+SUBDIRS = . tests
+
+docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
+dist_docs_DATA = TODO
+
+EXTRA_DIST = \
+ setup.py \
+ generator.py \
+ libxml.py \
+ libxml2-export.c \
+ libxml2-python-api.xml \
+ libxml2class.py \
+ libxml2class.txt
+
+if WITH_PYTHON
+AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(PYTHON_INCLUDES)
+
+python_LTLIBRARIES = libxml2mod.la
+
+libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
+libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
+ $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
+
+BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
+
+# libxml.c #includes libxml2-export.c
+libxml.$(OBJEXT): libxml2-export.c
+
+libxml2.py: $(srcdir)/libxml.py libxml2class.py
+ cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
+
+dist_python_DATA = \
+ drv_libxml2.py \
+ libxml2.py
+
+CLEANFILES = *.pyc
+
+MAINTAINERCLEANFILES = libxml2.py libxml2class.*
+
+API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+
+$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+ $(PYTHON) $(srcdir)/generator.py $(srcdir)
+endif
+
+tests test: all
+ cd tests && $(MAKE) tests
diff --git a/python/Makefile.in b/python/Makefile.in
new file mode 100644
index 0000000..03fbd5b
--- /dev/null
+++ b/python/Makefile.in
@@ -0,0 +1,969 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = python
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(srcdir)/setup.py.in $(top_srcdir)/depcomp $(dist_docs_DATA) \
+ $(am__dist_python_DATA_DIST) README TODO
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = setup.py
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" \
+ "$(DESTDIR)$(pythondir)"
+LTLIBRARIES = $(python_LTLIBRARIES)
+libxml2mod_la_LIBADD =
+am__libxml2mod_la_SOURCES_DIST = libxml.c libxml_wrap.h libxml2-py.h \
+ libxml2-py.c types.c
+@WITH_PYTHON_TRUE@am_libxml2mod_la_OBJECTS = libxml.lo libxml2-py.lo \
+@WITH_PYTHON_TRUE@ types.lo
+libxml2mod_la_OBJECTS = $(am_libxml2mod_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libxml2mod_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libxml2mod_la_LDFLAGS) $(LDFLAGS) -o $@
+@WITH_PYTHON_TRUE@am_libxml2mod_la_rpath = -rpath $(pythondir)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libxml2mod_la_SOURCES)
+DIST_SOURCES = $(am__libxml2mod_la_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__dist_python_DATA_DIST = drv_libxml2.py libxml2.py
+DATA = $(dist_docs_DATA) $(dist_python_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Makefile for libxml2 python library
+AUTOMAKE_OPTIONS = 1.4 foreign
+SUBDIRS = . tests
+docsdir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)
+dist_docs_DATA = TODO
+EXTRA_DIST = \
+ setup.py \
+ generator.py \
+ libxml.py \
+ libxml2-export.c \
+ libxml2-python-api.xml \
+ libxml2class.py \
+ libxml2class.txt
+
+@WITH_PYTHON_TRUE@AM_CPPFLAGS = \
+@WITH_PYTHON_TRUE@ -I$(top_builddir)/include \
+@WITH_PYTHON_TRUE@ -I$(top_srcdir)/include \
+@WITH_PYTHON_TRUE@ -I$(PYTHON_INCLUDES)
+
+@WITH_PYTHON_TRUE@python_LTLIBRARIES = libxml2mod.la
+@WITH_PYTHON_TRUE@libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c
+@WITH_PYTHON_TRUE@libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \
+@WITH_PYTHON_TRUE@ $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS)
+
+@WITH_PYTHON_TRUE@BUILT_SOURCES = libxml2-export.c libxml2-py.h libxml2-py.c
+@WITH_PYTHON_TRUE@dist_python_DATA = \
+@WITH_PYTHON_TRUE@ drv_libxml2.py \
+@WITH_PYTHON_TRUE@ libxml2.py
+
+@WITH_PYTHON_TRUE@CLEANFILES = *.pyc
+@WITH_PYTHON_TRUE@MAINTAINERCLEANFILES = libxml2.py libxml2class.*
+@WITH_PYTHON_TRUE@API_DESC = $(top_srcdir)/doc/libxml2-api.xml $(srcdir)/libxml2-python-api.xml
+@WITH_PYTHON_TRUE@GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign python/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign python/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+setup.py: $(top_builddir)/config.status $(srcdir)/setup.py.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+install-pythonLTLIBRARIES: $(python_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pythondir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pythondir)"; \
+ }
+
+uninstall-pythonLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(python_LTLIBRARIES)'; test -n "$(pythondir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pythondir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pythondir)/$$f"; \
+ done
+
+clean-pythonLTLIBRARIES:
+ -test -z "$(python_LTLIBRARIES)" || rm -f $(python_LTLIBRARIES)
+ @list='$(python_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libxml2mod.la: $(libxml2mod_la_OBJECTS) $(libxml2mod_la_DEPENDENCIES) $(EXTRA_libxml2mod_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libxml2mod_la_LINK) $(am_libxml2mod_la_rpath) $(libxml2mod_la_OBJECTS) $(libxml2mod_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxml2-py.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-dist_docsDATA: $(dist_docs_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docsdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docsdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docsdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docsdir)" || exit $$?; \
+ done
+
+uninstall-dist_docsDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_docs_DATA)'; test -n "$(docsdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(docsdir)'; $(am__uninstall_files_from_dir)
+install-dist_pythonDATA: $(dist_python_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pythondir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pythondir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pythondir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondir)" || exit $$?; \
+ done
+
+uninstall-dist_pythonDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_python_DATA)'; test -n "$(pythondir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pythondir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(docsdir)" "$(DESTDIR)$(pythondir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_docsDATA install-dist_pythonDATA \
+ install-pythonLTLIBRARIES
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_docsDATA uninstall-dist_pythonDATA \
+ uninstall-pythonLTLIBRARIES
+
+.MAKE: $(am__recursive_targets) all check install install-am \
+ install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool \
+ clean-pythonLTLIBRARIES cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docsDATA install-dist_pythonDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-pythonLTLIBRARIES install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-dist_docsDATA \
+ uninstall-dist_pythonDATA uninstall-pythonLTLIBRARIES
+
+
+# libxml.c #includes libxml2-export.c
+@WITH_PYTHON_TRUE@libxml.$(OBJEXT): libxml2-export.c
+
+@WITH_PYTHON_TRUE@libxml2.py: $(srcdir)/libxml.py libxml2class.py
+@WITH_PYTHON_TRUE@ cat $(srcdir)/libxml.py `test -f libxml2class.py || echo $(srcdir)/`libxml2class.py > $@
+
+@WITH_PYTHON_TRUE@$(GENERATED): $(srcdir)/generator.py $(API_DESC)
+@WITH_PYTHON_TRUE@ $(PYTHON) $(srcdir)/generator.py $(srcdir)
+
+tests test: all
+ cd tests && $(MAKE) tests
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/python/README b/python/README
new file mode 100644
index 0000000..b46eee4
--- /dev/null
+++ b/python/README
@@ -0,0 +1,34 @@
+ Module libxml2-python
+ =====================
+
+This is the libxml2 python module, providing access to the
+libxml2 and libxslt (if available) libraries. For general
+informationss on those XML and XSLT libraries check their
+web pages at :
+ http://xmlsoft.org/
+ and
+ http://xmlsoft.org/XSLT/
+
+The latest version of the sources for this module and the
+associated libraries can be found at:
+ ftp://xmlsoft.org/
+
+Binaries packages of the libxml2 and libxslt libraries can
+be found either on the FTP site for Linux, from external
+sources linked from the web pages, or as part of your set of
+packages provided with your operating system.
+
+NOTE:
+this module distribution is not the primary distribution
+of the libxml2 and libxslt Python binding code, but as
+the Python way of packaging those for non-Linux systems.
+The main sources are the libxml2 and libxslt tar.gz found on
+the site. One side effect is that the official RPM packages for
+those modules are not generated from the libxml2-python
+distributions but as part of the normal RPM packaging of
+those two libraries.
+The RPM packages can be found at:
+ http://rpmfind.net/linux/rpm2html/search.php?query=libxml2-python
+ http://rpmfind.net/linux/rpm2html/search.php?query=libxslt-python
+
+Daniel Veillard
diff --git a/python/TODO b/python/TODO
new file mode 100644
index 0000000..f446f6e
--- /dev/null
+++ b/python/TODO
@@ -0,0 +1,57 @@
+ TODO for the libxml2 Python wrappers
+
+ $Id$
+
+Things to do:
+-------------
+
+- SAX interfaces
+ - push is done but no generic interface
+ - elementDecl need some work
+ - need more testing and check full callbacks for xmllib/sgmlop replacement
+- enums -> libxml.py
+- access to XPath variables
+- xmlBuffer exposure
+- xpathContext, being able to set/get info and clean it up
+- more work needed on context handling for function lookup
+ and use of an hash table.
+- add regression tests
+ - SAX flow
+- DTD element and attributes content accesses
+ - attribute handled in SAX
+ - element needed in both
+
+
+Done:
+-----
+- class hierarchy:
+ + make specific node type inherit from xmlNode
+ done, had to sort the classes in the output
+ + get the generator to output a classes.txt description
+ done libxml2class.txt
+- add regression tests
+ - tests/Makefile.am: export the Python class path
+ - xpath queries
+ - xpath extension
+ - check memory
+ - build tree
+ - saving
+- extensions based on a python.xml description of the new specific
+ interfaces
+ file libxml2-python-api.xml , first entry is xmlRegisterXPathFunction
+- spec file: automatically generate for pythonX.Y if found
+ Done, a bit ugly by running new makes in %install for each level
+ found.
+- error redirections and preformat
+- handling of node.content
+- access to xmlParserCtxt and push mode
+ - needed for SAX too
+ - entry points
+ - wrappers
+ - decent interface for setting/getting behaviour
+- memory debug interfaces
+- SAX interfaces
+ - basic stuff with push is available
+ - basic xmllib replacement
+
+Daniel Veillard
diff --git a/python/drv_libxml2.py b/python/drv_libxml2.py
new file mode 100644
index 0000000..c2ec3e2
--- /dev/null
+++ b/python/drv_libxml2.py
@@ -0,0 +1,377 @@
+# -*- coding: iso-8859-1 -*-
+""" A SAX2 driver for libxml2, on top of it's XmlReader API
+
+USAGE
+ # put this file (drv_libxml2.py) in PYTHONPATH
+ import xml.sax
+ reader = xml.sax.make_parser(["drv_libxml2"])
+ # ...and the rest is standard python sax.
+
+CAVEATS
+ - Lexical handlers are supported, except for start/endEntity
+ (waiting for XmlReader.ResolveEntity) and start/endDTD
+ - Error callbacks are not exactly synchronous, they tend
+ to be invoked before the corresponding content callback,
+ because the underlying reader interface parses
+ data by chunks of 512 bytes
+
+TODO
+ - search for TODO
+ - some ErrorHandler events (warning)
+ - some ContentHandler events (setDocumentLocator, skippedEntity)
+ - EntityResolver (using libxml2.?)
+ - DTDHandler (if/when libxml2 exposes such node types)
+ - DeclHandler (if/when libxml2 exposes such node types)
+ - property_xml_string?
+ - feature_string_interning?
+ - Incremental parser
+ - additional performance tuning:
+ - one might cache callbacks to avoid some name lookups
+ - one might implement a smarter way to pass attributes to startElement
+ (some kind of lazy evaluation?)
+ - there might be room for improvement in start/endPrefixMapping
+ - other?
+
+"""
+
+__author__ = "Stéphane Bidoul <sbi@skynet.be>"
+__version__ = "0.3"
+
+import sys
+import codecs
+
+if sys.version_info[0] < 3:
+ __author__ = codecs.unicode_escape_decode(__author__)[0]
+
+ StringTypes = (str, unicode)
+else:
+ StringTypes = str
+
+from xml.sax._exceptions import *
+from xml.sax import xmlreader, saxutils
+from xml.sax.handler import \
+ feature_namespaces, \
+ feature_namespace_prefixes, \
+ feature_string_interning, \
+ feature_validation, \
+ feature_external_ges, \
+ feature_external_pes, \
+ property_lexical_handler, \
+ property_declaration_handler, \
+ property_dom_node, \
+ property_xml_string
+
+# libxml2 returns strings as UTF8
+_decoder = codecs.lookup("utf8")[1]
+def _d(s):
+ if s is None:
+ return s
+ else:
+ return _decoder(s)[0]
+
+try:
+ import libxml2
+except ImportError:
+ raise SAXReaderNotAvailable("libxml2 not available: " \
+ "import error was: %s" % sys.exc_info()[1])
+
+class Locator(xmlreader.Locator):
+ """SAX Locator adapter for libxml2.xmlTextReaderLocator"""
+
+ def __init__(self,locator):
+ self.__locator = locator
+
+ def getColumnNumber(self):
+ "Return the column number where the current event ends."
+ return -1
+
+ def getLineNumber(self):
+ "Return the line number where the current event ends."
+ return self.__locator.LineNumber()
+
+ def getPublicId(self):
+ "Return the public identifier for the current event."
+ return None
+
+ def getSystemId(self):
+ "Return the system identifier for the current event."
+ return self.__locator.BaseURI()
+
+class LibXml2Reader(xmlreader.XMLReader):
+
+ def __init__(self):
+ xmlreader.XMLReader.__init__(self)
+ # features
+ self.__ns = 0
+ self.__nspfx = 0
+ self.__validate = 0
+ self.__extparams = 1
+ # parsing flag
+ self.__parsing = 0
+ # additional handlers
+ self.__lex_handler = None
+ self.__decl_handler = None
+ # error messages accumulator
+ self.__errors = None
+
+ def _errorHandler(self,arg,msg,severity,locator):
+ if self.__errors is None:
+ self.__errors = []
+ self.__errors.append((severity,
+ SAXParseException(msg,None,
+ Locator(locator))))
+
+ def _reportErrors(self,fatal):
+ for severity,exception in self.__errors:
+ if severity in (libxml2.PARSER_SEVERITY_VALIDITY_WARNING,
+ libxml2.PARSER_SEVERITY_WARNING):
+ self._err_handler.warning(exception)
+ else:
+ # when fatal is set, the parse will stop;
+ # we consider that the last error reported
+ # is the fatal one.
+ if fatal and exception is self.__errors[-1][1]:
+ self._err_handler.fatalError(exception)
+ else:
+ self._err_handler.error(exception)
+ self.__errors = None
+
+ def parse(self, source):
+ self.__parsing = 1
+ try:
+ # prepare source and create reader
+ if isinstance(source, StringTypes):
+ reader = libxml2.newTextReaderFilename(source)
+ else:
+ source = saxutils.prepare_input_source(source)
+ input = libxml2.inputBuffer(source.getByteStream())
+ reader = input.newTextReader(source.getSystemId())
+ reader.SetErrorHandler(self._errorHandler,None)
+ # configure reader
+ if self.__extparams:
+ reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+ reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+ reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+ reader.SetParserProp(libxml2.PARSER_VALIDATE,self.__validate)
+ else:
+ reader.SetParserProp(libxml2.PARSER_LOADDTD, 0)
+ # we reuse attribute maps (for a slight performance gain)
+ if self.__ns:
+ attributesNSImpl = xmlreader.AttributesNSImpl({},{})
+ else:
+ attributesImpl = xmlreader.AttributesImpl({})
+ # prefixes to pop (for endPrefixMapping)
+ prefixes = []
+ # start loop
+ self._cont_handler.startDocument()
+ while 1:
+ r = reader.Read()
+ # check for errors
+ if r == 1:
+ if not self.__errors is None:
+ self._reportErrors(0)
+ elif r == 0:
+ if not self.__errors is None:
+ self._reportErrors(0)
+ break # end of parse
+ else:
+ if not self.__errors is None:
+ self._reportErrors(1)
+ else:
+ self._err_handler.fatalError(\
+ SAXException("Read failed (no details available)"))
+ break # fatal parse error
+ # get node type
+ nodeType = reader.NodeType()
+ # Element
+ if nodeType == 1:
+ if self.__ns:
+ eltName = (_d(reader.NamespaceUri()),\
+ _d(reader.LocalName()))
+ eltQName = _d(reader.Name())
+ attributesNSImpl._attrs = attrs = {}
+ attributesNSImpl._qnames = qnames = {}
+ newPrefixes = []
+ while reader.MoveToNextAttribute():
+ qname = _d(reader.Name())
+ value = _d(reader.Value())
+ if qname.startswith("xmlns"):
+ if len(qname) > 5:
+ newPrefix = qname[6:]
+ else:
+ newPrefix = None
+ newPrefixes.append(newPrefix)
+ self._cont_handler.startPrefixMapping(\
+ newPrefix,value)
+ if not self.__nspfx:
+ continue # don't report xmlns attribute
+ attName = (_d(reader.NamespaceUri()),
+ _d(reader.LocalName()))
+ qnames[attName] = qname
+ attrs[attName] = value
+ reader.MoveToElement()
+ self._cont_handler.startElementNS( \
+ eltName,eltQName,attributesNSImpl)
+ if reader.IsEmptyElement():
+ self._cont_handler.endElementNS(eltName,eltQName)
+ for newPrefix in newPrefixes:
+ self._cont_handler.endPrefixMapping(newPrefix)
+ else:
+ prefixes.append(newPrefixes)
+ else:
+ eltName = _d(reader.Name())
+ attributesImpl._attrs = attrs = {}
+ while reader.MoveToNextAttribute():
+ attName = _d(reader.Name())
+ attrs[attName] = _d(reader.Value())
+ reader.MoveToElement()
+ self._cont_handler.startElement( \
+ eltName,attributesImpl)
+ if reader.IsEmptyElement():
+ self._cont_handler.endElement(eltName)
+ # EndElement
+ elif nodeType == 15:
+ if self.__ns:
+ self._cont_handler.endElementNS( \
+ (_d(reader.NamespaceUri()),_d(reader.LocalName())),
+ _d(reader.Name()))
+ for prefix in prefixes.pop():
+ self._cont_handler.endPrefixMapping(prefix)
+ else:
+ self._cont_handler.endElement(_d(reader.Name()))
+ # Text
+ elif nodeType == 3:
+ self._cont_handler.characters(_d(reader.Value()))
+ # Whitespace
+ elif nodeType == 13:
+ self._cont_handler.ignorableWhitespace(_d(reader.Value()))
+ # SignificantWhitespace
+ elif nodeType == 14:
+ self._cont_handler.characters(_d(reader.Value()))
+ # CDATA
+ elif nodeType == 4:
+ if not self.__lex_handler is None:
+ self.__lex_handler.startCDATA()
+ self._cont_handler.characters(_d(reader.Value()))
+ if not self.__lex_handler is None:
+ self.__lex_handler.endCDATA()
+ # EntityReference
+ elif nodeType == 5:
+ if not self.__lex_handler is None:
+ self.startEntity(_d(reader.Name()))
+ reader.ResolveEntity()
+ # EndEntity
+ elif nodeType == 16:
+ if not self.__lex_handler is None:
+ self.endEntity(_d(reader.Name()))
+ # ProcessingInstruction
+ elif nodeType == 7:
+ self._cont_handler.processingInstruction( \
+ _d(reader.Name()),_d(reader.Value()))
+ # Comment
+ elif nodeType == 8:
+ if not self.__lex_handler is None:
+ self.__lex_handler.comment(_d(reader.Value()))
+ # DocumentType
+ elif nodeType == 10:
+ #if not self.__lex_handler is None:
+ # self.__lex_handler.startDTD()
+ pass # TODO (how to detect endDTD? on first non-dtd event?)
+ # XmlDeclaration
+ elif nodeType == 17:
+ pass # TODO
+ # Entity
+ elif nodeType == 6:
+ pass # TODO (entity decl)
+ # Notation (decl)
+ elif nodeType == 12:
+ pass # TODO
+ # Attribute (never in this loop)
+ #elif nodeType == 2:
+ # pass
+ # Document (not exposed)
+ #elif nodeType == 9:
+ # pass
+ # DocumentFragment (never returned by XmlReader)
+ #elif nodeType == 11:
+ # pass
+ # None
+ #elif nodeType == 0:
+ # pass
+ # -
+ else:
+ raise SAXException("Unexpected node type %d" % nodeType)
+ if r == 0:
+ self._cont_handler.endDocument()
+ reader.Close()
+ finally:
+ self.__parsing = 0
+
+ def setDTDHandler(self, handler):
+ # TODO (when supported, the inherited method works just fine)
+ raise SAXNotSupportedException("DTDHandler not supported")
+
+ def setEntityResolver(self, resolver):
+ # TODO (when supported, the inherited method works just fine)
+ raise SAXNotSupportedException("EntityResolver not supported")
+
+ def getFeature(self, name):
+ if name == feature_namespaces:
+ return self.__ns
+ elif name == feature_namespace_prefixes:
+ return self.__nspfx
+ elif name == feature_validation:
+ return self.__validate
+ elif name == feature_external_ges:
+ return 1 # TODO (does that relate to PARSER_LOADDTD)?
+ elif name == feature_external_pes:
+ return self.__extparams
+ else:
+ raise SAXNotRecognizedException("Feature '%s' not recognized" % \
+ name)
+
+ def setFeature(self, name, state):
+ if self.__parsing:
+ raise SAXNotSupportedException("Cannot set feature %s " \
+ "while parsing" % name)
+ if name == feature_namespaces:
+ self.__ns = state
+ elif name == feature_namespace_prefixes:
+ self.__nspfx = state
+ elif name == feature_validation:
+ self.__validate = state
+ elif name == feature_external_ges:
+ if state == 0:
+ # TODO (does that relate to PARSER_LOADDTD)?
+ raise SAXNotSupportedException("Feature '%s' not supported" % \
+ name)
+ elif name == feature_external_pes:
+ self.__extparams = state
+ else:
+ raise SAXNotRecognizedException("Feature '%s' not recognized" % \
+ name)
+
+ def getProperty(self, name):
+ if name == property_lexical_handler:
+ return self.__lex_handler
+ elif name == property_declaration_handler:
+ return self.__decl_handler
+ else:
+ raise SAXNotRecognizedException("Property '%s' not recognized" % \
+ name)
+
+ def setProperty(self, name, value):
+ if name == property_lexical_handler:
+ self.__lex_handler = value
+ elif name == property_declaration_handler:
+ # TODO: remove if/when libxml2 supports dtd events
+ raise SAXNotSupportedException("Property '%s' not supported" % \
+ name)
+ self.__decl_handler = value
+ else:
+ raise SAXNotRecognizedException("Property '%s' not recognized" % \
+ name)
+
+def create_parser():
+ return LibXml2Reader()
+
diff --git a/python/generator.py b/python/generator.py
new file mode 100755
index 0000000..c0cb3ad
--- /dev/null
+++ b/python/generator.py
@@ -0,0 +1,1228 @@
+#!/usr/bin/python -u
+#
+# generate python wrappers from the XML API description
+#
+
+functions = {}
+enums = {} # { enumType: { enumConstant: enumValue } }
+
+import os
+import sys
+import string
+
+if __name__ == "__main__":
+ # launched as a script
+ srcPref = os.path.dirname(sys.argv[0])
+else:
+ # imported
+ srcPref = os.path.dirname(__file__)
+
+#######################################################################
+#
+# That part if purely the API acquisition phase from the
+# XML API description
+#
+#######################################################################
+import os
+import xml.sax
+
+debug = 0
+
+def getparser():
+ # Attach parser to an unmarshalling object. return both objects.
+ target = docParser()
+ parser = xml.sax.make_parser()
+ parser.setContentHandler(target)
+ return parser, target
+
+class docParser(xml.sax.handler.ContentHandler):
+ def __init__(self):
+ self._methodname = None
+ self._data = []
+ self.in_function = 0
+
+ self.startElement = self.start
+ self.endElement = self.end
+ self.characters = self.data
+
+ def close(self):
+ if debug:
+ print("close")
+
+ def getmethodname(self):
+ return self._methodname
+
+ def data(self, text):
+ if debug:
+ print("data %s" % text)
+ self._data.append(text)
+
+ def start(self, tag, attrs):
+ if debug:
+ print("start %s, %s" % (tag, attrs))
+ if tag == 'function':
+ self._data = []
+ self.in_function = 1
+ self.function = None
+ self.function_cond = None
+ self.function_args = []
+ self.function_descr = None
+ self.function_return = None
+ self.function_file = None
+ if 'name' in attrs.keys():
+ self.function = attrs['name']
+ if 'file' in attrs.keys():
+ self.function_file = attrs['file']
+ elif tag == 'cond':
+ self._data = []
+ elif tag == 'info':
+ self._data = []
+ elif tag == 'arg':
+ if self.in_function == 1:
+ self.function_arg_name = None
+ self.function_arg_type = None
+ self.function_arg_info = None
+ if 'name' in attrs.keys():
+ self.function_arg_name = attrs['name']
+ if 'type' in attrs.keys():
+ self.function_arg_type = attrs['type']
+ if 'info' in attrs.keys():
+ self.function_arg_info = attrs['info']
+ elif tag == 'return':
+ if self.in_function == 1:
+ self.function_return_type = None
+ self.function_return_info = None
+ self.function_return_field = None
+ if 'type' in attrs.keys():
+ self.function_return_type = attrs['type']
+ if 'info' in attrs.keys():
+ self.function_return_info = attrs['info']
+ if 'field' in attrs.keys():
+ self.function_return_field = attrs['field']
+ elif tag == 'enum':
+ enum(attrs['type'],attrs['name'],attrs['value'])
+
+ def end(self, tag):
+ if debug:
+ print("end %s" % tag)
+ if tag == 'function':
+ if self.function != None:
+ function(self.function, self.function_descr,
+ self.function_return, self.function_args,
+ self.function_file, self.function_cond)
+ self.in_function = 0
+ elif tag == 'arg':
+ if self.in_function == 1:
+ self.function_args.append([self.function_arg_name,
+ self.function_arg_type,
+ self.function_arg_info])
+ elif tag == 'return':
+ if self.in_function == 1:
+ self.function_return = [self.function_return_type,
+ self.function_return_info,
+ self.function_return_field]
+ elif tag == 'info':
+ str = ''
+ for c in self._data:
+ str = str + c
+ if self.in_function == 1:
+ self.function_descr = str
+ elif tag == 'cond':
+ str = ''
+ for c in self._data:
+ str = str + c
+ if self.in_function == 1:
+ self.function_cond = str
+
+
+def function(name, desc, ret, args, file, cond):
+ functions[name] = (desc, ret, args, file, cond)
+
+def enum(type, name, value):
+ if type not in enums:
+ enums[type] = {}
+ enums[type][name] = value
+
+#######################################################################
+#
+# Some filtering rukes to drop functions/types which should not
+# be exposed as-is on the Python interface
+#
+#######################################################################
+
+skipped_modules = {
+ 'xmlmemory': None,
+ 'DOCBparser': None,
+ 'SAX': None,
+ 'hash': None,
+ 'list': None,
+ 'threads': None,
+# 'xpointer': None,
+}
+skipped_types = {
+ 'int *': "usually a return type",
+ 'xmlSAXHandlerPtr': "not the proper interface for SAX",
+ 'htmlSAXHandlerPtr': "not the proper interface for SAX",
+ 'xmlRMutexPtr': "thread specific, skipped",
+ 'xmlMutexPtr': "thread specific, skipped",
+ 'xmlGlobalStatePtr': "thread specific, skipped",
+ 'xmlListPtr': "internal representation not suitable for python",
+ 'xmlBufferPtr': "internal representation not suitable for python",
+ 'FILE *': None,
+}
+
+#######################################################################
+#
+# Table of remapping to/from the python type or class to the C
+# counterpart.
+#
+#######################################################################
+
+py_types = {
+ 'void': (None, None, None, None),
+ 'int': ('i', None, "int", "int"),
+ 'long': ('l', None, "long", "long"),
+ 'double': ('d', None, "double", "double"),
+ 'unsigned int': ('i', None, "int", "int"),
+ 'xmlChar': ('c', None, "int", "int"),
+ 'unsigned char *': ('z', None, "charPtr", "char *"),
+ 'char *': ('z', None, "charPtr", "char *"),
+ 'const char *': ('z', None, "charPtrConst", "const char *"),
+ 'xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *"),
+ 'const xmlChar *': ('z', None, "xmlCharPtrConst", "const xmlChar *"),
+ 'xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlDtdPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlDtdPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlDtd *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlDtd *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlAttrPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlAttrPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlAttr *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlAttr *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlEntityPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlEntityPtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlEntity *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const xmlEntity *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlElementPtr': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'const xmlElementPtr': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'xmlElement *': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'const xmlElement *': ('O', "xmlElement", "xmlElementPtr", "xmlElementPtr"),
+ 'xmlAttributePtr': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'const xmlAttributePtr': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'xmlAttribute *': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'const xmlAttribute *': ('O', "xmlAttribute", "xmlAttributePtr", "xmlAttributePtr"),
+ 'xmlNsPtr': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'const xmlNsPtr': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'xmlNs *': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'const xmlNs *': ('O', "xmlNode", "xmlNsPtr", "xmlNsPtr"),
+ 'xmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const xmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'xmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const xmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const htmlDocPtr': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'const htmlDoc *': ('O', "xmlNode", "xmlDocPtr", "xmlDocPtr"),
+ 'htmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const htmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'const htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
+ 'xmlXPathContextPtr': ('O', "xmlXPathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
+ 'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr"),
+ 'xmlXPathParserContextPtr': ('O', "xmlXPathParserContext", "xmlXPathParserContextPtr", "xmlXPathParserContextPtr"),
+ 'xmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'xmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'htmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'htmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr"),
+ 'xmlValidCtxtPtr': ('O', "ValidCtxt", "xmlValidCtxtPtr", "xmlValidCtxtPtr"),
+ 'xmlCatalogPtr': ('O', "catalog", "xmlCatalogPtr", "xmlCatalogPtr"),
+ 'FILE *': ('O', "File", "FILEPtr", "FILE *"),
+ 'xmlURIPtr': ('O', "URI", "xmlURIPtr", "xmlURIPtr"),
+ 'xmlErrorPtr': ('O', "Error", "xmlErrorPtr", "xmlErrorPtr"),
+ 'xmlOutputBufferPtr': ('O', "outputBuffer", "xmlOutputBufferPtr", "xmlOutputBufferPtr"),
+ 'xmlParserInputBufferPtr': ('O', "inputBuffer", "xmlParserInputBufferPtr", "xmlParserInputBufferPtr"),
+ 'xmlRegexpPtr': ('O', "xmlReg", "xmlRegexpPtr", "xmlRegexpPtr"),
+ 'xmlTextReaderLocatorPtr': ('O', "xmlTextReaderLocator", "xmlTextReaderLocatorPtr", "xmlTextReaderLocatorPtr"),
+ 'xmlTextReaderPtr': ('O', "xmlTextReader", "xmlTextReaderPtr", "xmlTextReaderPtr"),
+ 'xmlRelaxNGPtr': ('O', "relaxNgSchema", "xmlRelaxNGPtr", "xmlRelaxNGPtr"),
+ 'xmlRelaxNGParserCtxtPtr': ('O', "relaxNgParserCtxt", "xmlRelaxNGParserCtxtPtr", "xmlRelaxNGParserCtxtPtr"),
+ 'xmlRelaxNGValidCtxtPtr': ('O', "relaxNgValidCtxt", "xmlRelaxNGValidCtxtPtr", "xmlRelaxNGValidCtxtPtr"),
+ 'xmlSchemaPtr': ('O', "Schema", "xmlSchemaPtr", "xmlSchemaPtr"),
+ 'xmlSchemaParserCtxtPtr': ('O', "SchemaParserCtxt", "xmlSchemaParserCtxtPtr", "xmlSchemaParserCtxtPtr"),
+ 'xmlSchemaValidCtxtPtr': ('O', "SchemaValidCtxt", "xmlSchemaValidCtxtPtr", "xmlSchemaValidCtxtPtr"),
+}
+
+py_return_types = {
+ 'xmlXPathObjectPtr': ('O', "foo", "xmlXPathObjectPtr", "xmlXPathObjectPtr"),
+}
+
+unknown_types = {}
+
+foreign_encoding_args = (
+ 'htmlCreateMemoryParserCtxt',
+ 'htmlCtxtReadMemory',
+ 'htmlParseChunk',
+ 'htmlReadMemory',
+ 'xmlCreateMemoryParserCtxt',
+ 'xmlCtxtReadMemory',
+ 'xmlCtxtResetPush',
+ 'xmlParseChunk',
+ 'xmlParseMemory',
+ 'xmlReadMemory',
+ 'xmlRecoverMemory',
+)
+
+#######################################################################
+#
+# This part writes the C <-> Python stubs libxml2-py.[ch] and
+# the table libxml2-export.c to add when registrering the Python module
+#
+#######################################################################
+
+# Class methods which are written by hand in libxml.c but the Python-level
+# code is still automatically generated (so they are not in skip_function()).
+skip_impl = (
+ 'xmlSaveFileTo',
+ 'xmlSaveFormatFileTo',
+)
+
+def skip_function(name):
+ if name[0:12] == "xmlXPathWrap":
+ return 1
+ if name == "xmlFreeParserCtxt":
+ return 1
+ if name == "xmlCleanupParser":
+ return 1
+ if name == "xmlFreeTextReader":
+ return 1
+# if name[0:11] == "xmlXPathNew":
+# return 1
+ # the next function is defined in libxml.c
+ if name == "xmlRelaxNGFreeValidCtxt":
+ return 1
+ if name == "xmlFreeValidCtxt":
+ return 1
+ if name == "xmlSchemaFreeValidCtxt":
+ return 1
+
+#
+# Those are skipped because the Const version is used of the bindings
+# instead.
+#
+ if name == "xmlTextReaderBaseUri":
+ return 1
+ if name == "xmlTextReaderLocalName":
+ return 1
+ if name == "xmlTextReaderName":
+ return 1
+ if name == "xmlTextReaderNamespaceUri":
+ return 1
+ if name == "xmlTextReaderPrefix":
+ return 1
+ if name == "xmlTextReaderXmlLang":
+ return 1
+ if name == "xmlTextReaderValue":
+ return 1
+ if name == "xmlOutputBufferClose": # handled by by the superclass
+ return 1
+ if name == "xmlOutputBufferFlush": # handled by by the superclass
+ return 1
+ if name == "xmlErrMemory":
+ return 1
+
+ if name == "xmlValidBuildContentModel":
+ return 1
+ if name == "xmlValidateElementDecl":
+ return 1
+ if name == "xmlValidateAttributeDecl":
+ return 1
+ if name == "xmlPopInputCallbacks":
+ return 1
+
+ return 0
+
+def print_function_wrapper(name, output, export, include):
+ global py_types
+ global unknown_types
+ global functions
+ global skipped_modules
+
+ try:
+ (desc, ret, args, file, cond) = functions[name]
+ except:
+ print("failed to get function %s infos")
+ return
+
+ if file in skipped_modules:
+ return 0
+ if skip_function(name) == 1:
+ return 0
+ if name in skip_impl:
+ # Don't delete the function entry in the caller.
+ return 1
+
+ c_call = ""
+ format=""
+ format_args=""
+ c_args=""
+ c_return=""
+ c_convert=""
+ c_release=""
+ num_bufs=0
+ for arg in args:
+ # This should be correct
+ if arg[1][0:6] == "const ":
+ arg[1] = arg[1][6:]
+ c_args = c_args + " %s %s;\n" % (arg[1], arg[0])
+ if arg[1] in py_types:
+ (f, t, n, c) = py_types[arg[1]]
+ if (f == 'z') and (name in foreign_encoding_args) and (num_bufs == 0):
+ f = 's#'
+ if f != None:
+ format = format + f
+ if t != None:
+ format_args = format_args + ", &pyobj_%s" % (arg[0])
+ c_args = c_args + " PyObject *pyobj_%s;\n" % (arg[0])
+ c_convert = c_convert + \
+ " %s = (%s) Py%s_Get(pyobj_%s);\n" % (arg[0],
+ arg[1], t, arg[0])
+ else:
+ format_args = format_args + ", &%s" % (arg[0])
+ if f == 's#':
+ format_args = format_args + ", &py_buffsize%d" % num_bufs
+ c_args = c_args + " int py_buffsize%d;\n" % num_bufs
+ num_bufs = num_bufs + 1
+ if c_call != "":
+ c_call = c_call + ", "
+ c_call = c_call + "%s" % (arg[0])
+ if t == "File":
+ c_release = c_release + \
+ " PyFile_Release(%s);\n" % (arg[0])
+ else:
+ if arg[1] in skipped_types:
+ return 0
+ if arg[1] in unknown_types:
+ lst = unknown_types[arg[1]]
+ lst.append(name)
+ else:
+ unknown_types[arg[1]] = [name]
+ return -1
+ if format != "":
+ format = format + ":%s" % (name)
+
+ if ret[0] == 'void':
+ if file == "python_accessor":
+ if args[1][1] == "char *" or args[1][1] == "xmlChar *":
+ c_call = "\n if (%s->%s != NULL) xmlFree(%s->%s);\n" % (
+ args[0][0], args[1][0], args[0][0], args[1][0])
+ c_call = c_call + " %s->%s = (%s)xmlStrdup((const xmlChar *)%s);\n" % (args[0][0],
+ args[1][0], args[1][1], args[1][0])
+ else:
+ c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0],
+ args[1][0])
+ else:
+ c_call = "\n %s(%s);\n" % (name, c_call)
+ ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n"
+ elif ret[0] in py_types:
+ (f, t, n, c) = py_types[ret[0]]
+ c_return = c_return + " %s c_retval;\n" % (ret[0])
+ if file == "python_accessor" and ret[2] != None:
+ c_call = "\n c_retval = %s->%s;\n" % (args[0][0], ret[2])
+ else:
+ c_call = "\n c_retval = %s(%s);\n" % (name, c_call)
+ ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c)
+ ret_convert = ret_convert + " return(py_retval);\n"
+ elif ret[0] in py_return_types:
+ (f, t, n, c) = py_return_types[ret[0]]
+ c_return = c_return + " %s c_retval;\n" % (ret[0])
+ c_call = "\n c_retval = %s(%s);\n" % (name, c_call)
+ ret_convert = " py_retval = libxml_%sWrap((%s) c_retval);\n" % (n,c)
+ ret_convert = ret_convert + " return(py_retval);\n"
+ else:
+ if ret[0] in skipped_types:
+ return 0
+ if ret[0] in unknown_types:
+ lst = unknown_types[ret[0]]
+ lst.append(name)
+ else:
+ unknown_types[ret[0]] = [name]
+ return -1
+
+ if cond != None and cond != "":
+ include.write("#if %s\n" % cond)
+ export.write("#if %s\n" % cond)
+ output.write("#if %s\n" % cond)
+
+ include.write("PyObject * ")
+ include.write("libxml_%s(PyObject *self, PyObject *args);\n" % (name))
+
+ export.write(" { (char *)\"%s\", libxml_%s, METH_VARARGS, NULL },\n" %
+ (name, name))
+
+ if file == "python":
+ # Those have been manually generated
+ if cond != None and cond != "":
+ include.write("#endif\n")
+ export.write("#endif\n")
+ output.write("#endif\n")
+ return 1
+ if file == "python_accessor" and ret[0] != "void" and ret[2] is None:
+ # Those have been manually generated
+ if cond != None and cond != "":
+ include.write("#endif\n")
+ export.write("#endif\n")
+ output.write("#endif\n")
+ return 1
+
+ output.write("PyObject *\n")
+ output.write("libxml_%s(PyObject *self ATTRIBUTE_UNUSED," % (name))
+ output.write(" PyObject *args")
+ if format == "":
+ output.write(" ATTRIBUTE_UNUSED")
+ output.write(") {\n")
+ if ret[0] != 'void':
+ output.write(" PyObject *py_retval;\n")
+ if c_return != "":
+ output.write(c_return)
+ if c_args != "":
+ output.write(c_args)
+ if format != "":
+ output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" %
+ (format, format_args))
+ output.write(" return(NULL);\n")
+ if c_convert != "":
+ output.write(c_convert)
+
+ output.write(c_call)
+ if c_release != "":
+ output.write(c_release)
+ output.write(ret_convert)
+ output.write("}\n\n")
+ if cond != None and cond != "":
+ include.write("#endif /* %s */\n" % cond)
+ export.write("#endif /* %s */\n" % cond)
+ output.write("#endif /* %s */\n" % cond)
+ return 1
+
+def buildStubs():
+ global py_types
+ global py_return_types
+ global unknown_types
+
+ try:
+ f = open(os.path.join(srcPref,"libxml2-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ try:
+ f = open(os.path.join(srcPref,"..","doc","libxml2-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ print(file, ":", msg)
+ sys.exit(1)
+
+ n = len(list(functions.keys()))
+ print("Found %d functions in libxml2-api.xml" % (n))
+
+ py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
+ try:
+ f = open(os.path.join(srcPref,"libxml2-python-api.xml"))
+ data = f.read()
+ (parser, target) = getparser()
+ parser.feed(data)
+ parser.close()
+ except IOError as msg:
+ print(file, ":", msg)
+
+
+ print("Found %d functions in libxml2-python-api.xml" % (
+ len(list(functions.keys())) - n))
+ nb_wrap = 0
+ failed = 0
+ skipped = 0
+
+ include = open("libxml2-py.h", "w")
+ include.write("/* Generated */\n\n")
+ export = open("libxml2-export.c", "w")
+ export.write("/* Generated */\n\n")
+ wrapper = open("libxml2-py.c", "w")
+ wrapper.write("/* Generated */\n\n")
+ wrapper.write("#include <Python.h>\n")
+ wrapper.write("#include <libxml/xmlversion.h>\n")
+ wrapper.write("#include <libxml/tree.h>\n")
+ wrapper.write("#include <libxml/xmlschemastypes.h>\n")
+ wrapper.write("#include \"libxml_wrap.h\"\n")
+ wrapper.write("#include \"libxml2-py.h\"\n\n")
+ for function in sorted(functions.keys()):
+ ret = print_function_wrapper(function, wrapper, export, include)
+ if ret < 0:
+ failed = failed + 1
+ del functions[function]
+ if ret == 0:
+ skipped = skipped + 1
+ del functions[function]
+ if ret == 1:
+ nb_wrap = nb_wrap + 1
+ include.close()
+ export.close()
+ wrapper.close()
+
+ print("Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap,
+ failed, skipped))
+ print("Missing type converters: ")
+ for type in list(unknown_types.keys()):
+ print("%s:%d " % (type, len(unknown_types[type])))
+ print()
+
+#######################################################################
+#
+# This part writes part of the Python front-end classes based on
+# mapping rules between types and classes and also based on function
+# renaming to get consistent function names at the Python level
+#
+#######################################################################
+
+#
+# The type automatically remapped to generated classes
+#
+classes_type = {
+ "xmlNodePtr": ("._o", "xmlNode(_obj=%s)", "xmlNode"),
+ "xmlNode *": ("._o", "xmlNode(_obj=%s)", "xmlNode"),
+ "xmlDocPtr": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "xmlDoc *": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "htmlDocPtr": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "htmlxmlDocPtr *": ("._o", "xmlDoc(_obj=%s)", "xmlDoc"),
+ "xmlAttrPtr": ("._o", "xmlAttr(_obj=%s)", "xmlAttr"),
+ "xmlAttr *": ("._o", "xmlAttr(_obj=%s)", "xmlAttr"),
+ "xmlNsPtr": ("._o", "xmlNs(_obj=%s)", "xmlNs"),
+ "xmlNs *": ("._o", "xmlNs(_obj=%s)", "xmlNs"),
+ "xmlDtdPtr": ("._o", "xmlDtd(_obj=%s)", "xmlDtd"),
+ "xmlDtd *": ("._o", "xmlDtd(_obj=%s)", "xmlDtd"),
+ "xmlEntityPtr": ("._o", "xmlEntity(_obj=%s)", "xmlEntity"),
+ "xmlEntity *": ("._o", "xmlEntity(_obj=%s)", "xmlEntity"),
+ "xmlElementPtr": ("._o", "xmlElement(_obj=%s)", "xmlElement"),
+ "xmlElement *": ("._o", "xmlElement(_obj=%s)", "xmlElement"),
+ "xmlAttributePtr": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
+ "xmlAttribute *": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"),
+ "xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
+ "xmlXPathContext *": ("._o", "xpathContext(_obj=%s)", "xpathContext"),
+ "xmlXPathParserContext *": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
+ "xmlXPathParserContextPtr": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"),
+ "xmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "xmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "htmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "htmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"),
+ "xmlValidCtxtPtr": ("._o", "ValidCtxt(_obj=%s)", "ValidCtxt"),
+ "xmlCatalogPtr": ("._o", "catalog(_obj=%s)", "catalog"),
+ "xmlURIPtr": ("._o", "URI(_obj=%s)", "URI"),
+ "xmlErrorPtr": ("._o", "Error(_obj=%s)", "Error"),
+ "xmlOutputBufferPtr": ("._o", "outputBuffer(_obj=%s)", "outputBuffer"),
+ "xmlParserInputBufferPtr": ("._o", "inputBuffer(_obj=%s)", "inputBuffer"),
+ "xmlRegexpPtr": ("._o", "xmlReg(_obj=%s)", "xmlReg"),
+ "xmlTextReaderLocatorPtr": ("._o", "xmlTextReaderLocator(_obj=%s)", "xmlTextReaderLocator"),
+ "xmlTextReaderPtr": ("._o", "xmlTextReader(_obj=%s)", "xmlTextReader"),
+ 'xmlRelaxNGPtr': ('._o', "relaxNgSchema(_obj=%s)", "relaxNgSchema"),
+ 'xmlRelaxNGParserCtxtPtr': ('._o', "relaxNgParserCtxt(_obj=%s)", "relaxNgParserCtxt"),
+ 'xmlRelaxNGValidCtxtPtr': ('._o', "relaxNgValidCtxt(_obj=%s)", "relaxNgValidCtxt"),
+ 'xmlSchemaPtr': ("._o", "Schema(_obj=%s)", "Schema"),
+ 'xmlSchemaParserCtxtPtr': ("._o", "SchemaParserCtxt(_obj=%s)", "SchemaParserCtxt"),
+ 'xmlSchemaValidCtxtPtr': ("._o", "SchemaValidCtxt(_obj=%s)", "SchemaValidCtxt"),
+}
+
+converter_type = {
+ "xmlXPathObjectPtr": "xpathObjectRet(%s)",
+}
+
+primary_classes = ["xmlNode", "xmlDoc"]
+
+classes_ancestor = {
+ "xmlNode" : "xmlCore",
+ "xmlDtd" : "xmlNode",
+ "xmlDoc" : "xmlNode",
+ "xmlAttr" : "xmlNode",
+ "xmlNs" : "xmlNode",
+ "xmlEntity" : "xmlNode",
+ "xmlElement" : "xmlNode",
+ "xmlAttribute" : "xmlNode",
+ "outputBuffer": "ioWriteWrapper",
+ "inputBuffer": "ioReadWrapper",
+ "parserCtxt": "parserCtxtCore",
+ "xmlTextReader": "xmlTextReaderCore",
+ "ValidCtxt": "ValidCtxtCore",
+ "SchemaValidCtxt": "SchemaValidCtxtCore",
+ "relaxNgValidCtxt": "relaxNgValidCtxtCore",
+}
+classes_destructors = {
+ "parserCtxt": "xmlFreeParserCtxt",
+ "catalog": "xmlFreeCatalog",
+ "URI": "xmlFreeURI",
+# "outputBuffer": "xmlOutputBufferClose",
+ "inputBuffer": "xmlFreeParserInputBuffer",
+ "xmlReg": "xmlRegFreeRegexp",
+ "xmlTextReader": "xmlFreeTextReader",
+ "relaxNgSchema": "xmlRelaxNGFree",
+ "relaxNgParserCtxt": "xmlRelaxNGFreeParserCtxt",
+ "relaxNgValidCtxt": "xmlRelaxNGFreeValidCtxt",
+ "Schema": "xmlSchemaFree",
+ "SchemaParserCtxt": "xmlSchemaFreeParserCtxt",
+ "SchemaValidCtxt": "xmlSchemaFreeValidCtxt",
+ "ValidCtxt": "xmlFreeValidCtxt",
+}
+
+functions_noexcept = {
+ "xmlHasProp": 1,
+ "xmlHasNsProp": 1,
+ "xmlDocSetRootElement": 1,
+ "xmlNodeGetNs": 1,
+ "xmlNodeGetNsDefs": 1,
+ "xmlNextElementSibling": 1,
+ "xmlPreviousElementSibling": 1,
+ "xmlFirstElementChild": 1,
+ "xmlLastElementChild": 1,
+}
+
+reference_keepers = {
+ "xmlTextReader": [('inputBuffer', 'input')],
+ "relaxNgValidCtxt": [('relaxNgSchema', 'schema')],
+ "SchemaValidCtxt": [('Schema', 'schema')],
+}
+
+function_classes = {}
+
+function_classes["None"] = []
+
+def nameFixup(name, classe, type, file):
+ listname = classe + "List"
+ ll = len(listname)
+ l = len(classe)
+ if name[0:l] == listname:
+ func = name[l:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:12] == "xmlParserGet" and file == "python_accessor":
+ func = name[12:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:12] == "xmlParserSet" and file == "python_accessor":
+ func = name[12:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
+ func = name[10:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlURIGet" and file == "python_accessor":
+ func = name[9:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlURISet" and file == "python_accessor":
+ func = name[6:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlErrorGet" and file == "python_accessor":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:17] == "xmlXPathParserGet" and file == "python_accessor":
+ func = name[17:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlXPathGet" and file == "python_accessor":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:11] == "xmlXPathSet" and file == "python_accessor":
+ func = name[8:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:15] == "xmlOutputBuffer" and file != "python":
+ func = name[15:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:20] == "xmlParserInputBuffer" and file != "python":
+ func = name[20:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:9] == "xmlRegexp" and file == "xmlregexp":
+ func = "regexp" + name[9:]
+ elif name[0:6] == "xmlReg" and file == "xmlregexp":
+ func = "regexp" + name[6:]
+ elif name[0:20] == "xmlTextReaderLocator" and file == "xmlreader":
+ func = name[20:]
+ elif name[0:18] == "xmlTextReaderConst" and file == "xmlreader":
+ func = name[18:]
+ elif name[0:13] == "xmlTextReader" and file == "xmlreader":
+ func = name[13:]
+ elif name[0:12] == "xmlReaderNew" and file == "xmlreader":
+ func = name[9:]
+ elif name[0:11] == "xmlACatalog":
+ func = name[11:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:l] == classe:
+ func = name[l:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:7] == "libxml_":
+ func = name[7:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:6] == "xmlGet":
+ func = name[6:]
+ func = func[0:1].lower() + func[1:]
+ elif name[0:3] == "xml":
+ func = name[3:]
+ func = func[0:1].lower() + func[1:]
+ else:
+ func = name
+ if func[0:5] == "xPath":
+ func = "xpath" + func[5:]
+ elif func[0:4] == "xPtr":
+ func = "xpointer" + func[4:]
+ elif func[0:8] == "xInclude":
+ func = "xinclude" + func[8:]
+ elif func[0:2] == "iD":
+ func = "ID" + func[2:]
+ elif func[0:3] == "uRI":
+ func = "URI" + func[3:]
+ elif func[0:4] == "uTF8":
+ func = "UTF8" + func[4:]
+ elif func[0:3] == 'sAX':
+ func = "SAX" + func[3:]
+ return func
+
+
+def functionCompare(info1, info2):
+ (index1, func1, name1, ret1, args1, file1) = info1
+ (index2, func2, name2, ret2, args2, file2) = info2
+ if file1 == file2:
+ if func1 < func2:
+ return -1
+ if func1 > func2:
+ return 1
+ if file1 == "python_accessor":
+ return -1
+ if file2 == "python_accessor":
+ return 1
+ if file1 < file2:
+ return -1
+ if file1 > file2:
+ return 1
+ return 0
+
+def cmp_to_key(mycmp):
+ 'Convert a cmp= function into a key= function'
+ class K(object):
+ def __init__(self, obj, *args):
+ self.obj = obj
+ def __lt__(self, other):
+ return mycmp(self.obj, other.obj) < 0
+ def __gt__(self, other):
+ return mycmp(self.obj, other.obj) > 0
+ def __eq__(self, other):
+ return mycmp(self.obj, other.obj) == 0
+ def __le__(self, other):
+ return mycmp(self.obj, other.obj) <= 0
+ def __ge__(self, other):
+ return mycmp(self.obj, other.obj) >= 0
+ def __ne__(self, other):
+ return mycmp(self.obj, other.obj) != 0
+ return K
+def writeDoc(name, args, indent, output):
+ if functions[name][0] is None or functions[name][0] == "":
+ return
+ val = functions[name][0]
+ val = val.replace("NULL", "None")
+ output.write(indent)
+ output.write('"""')
+ while len(val) > 60:
+ if val[0] == " ":
+ val = val[1:]
+ continue
+ str = val[0:60]
+ i = str.rfind(" ")
+ if i < 0:
+ i = 60
+ str = val[0:i]
+ val = val[i:]
+ output.write(str)
+ output.write('\n ')
+ output.write(indent)
+ output.write(val)
+ output.write(' """\n')
+
+def buildWrappers():
+ global ctypes
+ global py_types
+ global py_return_types
+ global unknown_types
+ global functions
+ global function_classes
+ global classes_type
+ global classes_list
+ global converter_type
+ global primary_classes
+ global converter_type
+ global classes_ancestor
+ global converter_type
+ global primary_classes
+ global classes_ancestor
+ global classes_destructors
+ global functions_noexcept
+
+ for type in classes_type.keys():
+ function_classes[classes_type[type][2]] = []
+
+ #
+ # Build the list of C types to look for ordered to start
+ # with primary classes
+ #
+ ctypes = []
+ classes_list = []
+ ctypes_processed = {}
+ classes_processed = {}
+ for classe in primary_classes:
+ classes_list.append(classe)
+ classes_processed[classe] = ()
+ for type in classes_type.keys():
+ tinfo = classes_type[type]
+ if tinfo[2] == classe:
+ ctypes.append(type)
+ ctypes_processed[type] = ()
+ for type in sorted(classes_type.keys()):
+ if type in ctypes_processed:
+ continue
+ tinfo = classes_type[type]
+ if tinfo[2] not in classes_processed:
+ classes_list.append(tinfo[2])
+ classes_processed[tinfo[2]] = ()
+
+ ctypes.append(type)
+ ctypes_processed[type] = ()
+
+ for name in functions.keys():
+ found = 0
+ (desc, ret, args, file, cond) = functions[name]
+ for type in ctypes:
+ classe = classes_type[type][2]
+
+ if name[0:3] == "xml" and len(args) >= 1 and args[0][1] == type:
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (0, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:3] == "xml" and len(args) >= 2 and args[1][1] == type \
+ and file != "python_accessor":
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (1, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:4] == "html" and len(args) >= 1 and args[0][1] == type:
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (0, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ elif name[0:4] == "html" and len(args) >= 2 and args[1][1] == type \
+ and file != "python_accessor":
+ found = 1
+ func = nameFixup(name, classe, type, file)
+ info = (1, func, name, ret, args, file)
+ function_classes[classe].append(info)
+ if found == 1:
+ continue
+ if name[0:8] == "xmlXPath":
+ continue
+ if name[0:6] == "xmlStr":
+ continue
+ if name[0:10] == "xmlCharStr":
+ continue
+ func = nameFixup(name, "None", file, file)
+ info = (0, func, name, ret, args, file)
+ function_classes['None'].append(info)
+
+ classes = open("libxml2class.py", "w")
+ txt = open("libxml2class.txt", "w")
+ txt.write(" Generated Classes for libxml2-python\n\n")
+
+ txt.write("#\n# Global functions of the module\n#\n\n")
+ if "None" in function_classes:
+ flist = function_classes["None"]
+ flist = sorted(flist, key=cmp_to_key(functionCompare))
+ oldfile = ""
+ for info in flist:
+ (index, func, name, ret, args, file) = info
+ if file != oldfile:
+ classes.write("#\n# Functions from module %s\n#\n\n" % file)
+ txt.write("\n# functions from module %s\n" % file)
+ oldfile = file
+ classes.write("def %s(" % func)
+ txt.write("%s()\n" % func)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ classes.write("%s" % arg[0])
+ n = n + 1
+ classes.write("):\n")
+ writeDoc(name, args, ' ', classes)
+
+ for arg in args:
+ if arg[1] in classes_type:
+ classes.write(" if %s is None: %s__o = None\n" %
+ (arg[0], arg[0]))
+ classes.write(" else: %s__o = %s%s\n" %
+ (arg[0], arg[0], classes_type[arg[1]][0]))
+ if arg[1] in py_types:
+ (f, t, n, c) = py_types[arg[1]]
+ if t == "File":
+ classes.write(" if %s is not None: %s.flush()\n" % (
+ arg[0], arg[0]))
+
+ if ret[0] != "void":
+ classes.write(" ret = ")
+ else:
+ classes.write(" ")
+ classes.write("libxml2mod.%s(" % name)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ classes.write("%s" % arg[0])
+ if arg[1] in classes_type:
+ classes.write("__o")
+ n = n + 1
+ classes.write(")\n")
+
+# This may be needed to reposition the I/O, but likely to cause more harm
+# than good. Those changes in Python3 really break the model.
+# for arg in args:
+# if arg[1] in py_types:
+# (f, t, n, c) = py_types[arg[1]]
+# if t == "File":
+# classes.write(" if %s is not None: %s.seek(0,0)\n"%(
+# arg[0], arg[0]))
+
+ if ret[0] != "void":
+ if ret[0] in classes_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(" if ret is None:return None\n")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+ classes.write(" return ")
+ classes.write(classes_type[ret[0]][1] % ("ret"))
+ classes.write("\n")
+ else:
+ classes.write(" return ret\n")
+ classes.write("\n")
+
+ txt.write("\n\n#\n# Set of classes of the module\n#\n\n")
+ for classname in classes_list:
+ if classname == "None":
+ pass
+ else:
+ if classname in classes_ancestor:
+ txt.write("\n\nClass %s(%s)\n" % (classname,
+ classes_ancestor[classname]))
+ classes.write("class %s(%s):\n" % (classname,
+ classes_ancestor[classname]))
+ classes.write(" def __init__(self, _obj=None):\n")
+ if classes_ancestor[classname] == "xmlCore" or \
+ classes_ancestor[classname] == "xmlNode":
+ classes.write(" if checkWrapper(_obj) != 0:")
+ classes.write(" raise TypeError")
+ classes.write("('%s got a wrong wrapper object type')\n" % \
+ classname)
+ if classname in reference_keepers:
+ rlist = reference_keepers[classname]
+ for ref in rlist:
+ classes.write(" self.%s = None\n" % ref[1])
+ classes.write(" self._o = _obj\n")
+ classes.write(" %s.__init__(self, _obj=_obj)\n\n" % (
+ classes_ancestor[classname]))
+ if classes_ancestor[classname] == "xmlCore" or \
+ classes_ancestor[classname] == "xmlNode":
+ classes.write(" def __repr__(self):\n")
+ format = "<%s (%%s) object at 0x%%x>" % (classname)
+ classes.write(" return \"%s\" %% (self.name, int(pos_id (self)))\n\n" % (
+ format))
+ else:
+ txt.write("Class %s()\n" % (classname))
+ classes.write("class %s:\n" % (classname))
+ classes.write(" def __init__(self, _obj=None):\n")
+ if classname in reference_keepers:
+ list = reference_keepers[classname]
+ for ref in list:
+ classes.write(" self.%s = None\n" % ref[1])
+ classes.write(" if _obj != None:self._o = _obj;return\n")
+ classes.write(" self._o = None\n\n")
+ destruct=None
+ if classname in classes_destructors:
+ classes.write(" def __del__(self):\n")
+ classes.write(" if self._o != None:\n")
+ classes.write(" libxml2mod.%s(self._o)\n" %
+ classes_destructors[classname])
+ classes.write(" self._o = None\n\n")
+ destruct=classes_destructors[classname]
+ flist = function_classes[classname]
+ flist = sorted(flist, key=cmp_to_key(functionCompare))
+ oldfile = ""
+ for info in flist:
+ (index, func, name, ret, args, file) = info
+ #
+ # Do not provide as method the destructors for the class
+ # to avoid double free
+ #
+ if name == destruct:
+ continue
+ if file != oldfile:
+ if file == "python_accessor":
+ classes.write(" # accessors for %s\n" % (classname))
+ txt.write(" # accessors\n")
+ else:
+ classes.write(" #\n")
+ classes.write(" # %s functions from module %s\n" % (
+ classname, file))
+ txt.write("\n # functions from module %s\n" % file)
+ classes.write(" #\n\n")
+ oldfile = file
+ classes.write(" def %s(self" % func)
+ txt.write(" %s()\n" % func)
+ n = 0
+ for arg in args:
+ if n != index:
+ classes.write(", %s" % arg[0])
+ n = n + 1
+ classes.write("):\n")
+ writeDoc(name, args, ' ', classes)
+ n = 0
+ for arg in args:
+ if arg[1] in classes_type:
+ if n != index:
+ classes.write(" if %s is None: %s__o = None\n" %
+ (arg[0], arg[0]))
+ classes.write(" else: %s__o = %s%s\n" %
+ (arg[0], arg[0], classes_type[arg[1]][0]))
+ n = n + 1
+ if ret[0] != "void":
+ classes.write(" ret = ")
+ else:
+ classes.write(" ")
+ classes.write("libxml2mod.%s(" % name)
+ n = 0
+ for arg in args:
+ if n != 0:
+ classes.write(", ")
+ if n != index:
+ classes.write("%s" % arg[0])
+ if arg[1] in classes_type:
+ classes.write("__o")
+ else:
+ classes.write("self")
+ if arg[1] in classes_type:
+ classes.write(classes_type[arg[1]][0])
+ n = n + 1
+ classes.write(")\n")
+ if ret[0] != "void":
+ if ret[0] in classes_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(
+ " if ret is None:return None\n")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+
+ #
+ # generate the returned class wrapper for the object
+ #
+ classes.write(" __tmp = ")
+ classes.write(classes_type[ret[0]][1] % ("ret"))
+ classes.write("\n")
+
+ #
+ # Sometime one need to keep references of the source
+ # class in the returned class object.
+ # See reference_keepers for the list
+ #
+ tclass = classes_type[ret[0]][2]
+ if tclass in reference_keepers:
+ list = reference_keepers[tclass]
+ for pref in list:
+ if pref[0] == classname:
+ classes.write(" __tmp.%s = self\n" %
+ pref[1])
+ #
+ # return the class
+ #
+ classes.write(" return __tmp\n")
+ elif ret[0] in converter_type:
+ #
+ # Raise an exception
+ #
+ if name in functions_noexcept:
+ classes.write(
+ " if ret is None:return None")
+ elif name.find("URI") >= 0:
+ classes.write(
+ " if ret is None:raise uriError('%s() failed')\n"
+ % (name))
+ elif name.find("XPath") >= 0:
+ classes.write(
+ " if ret is None:raise xpathError('%s() failed')\n"
+ % (name))
+ elif name.find("Parse") >= 0:
+ classes.write(
+ " if ret is None:raise parserError('%s() failed')\n"
+ % (name))
+ else:
+ classes.write(
+ " if ret is None:raise treeError('%s() failed')\n"
+ % (name))
+ classes.write(" return ")
+ classes.write(converter_type[ret[0]] % ("ret"))
+ classes.write("\n")
+ else:
+ classes.write(" return ret\n")
+ classes.write("\n")
+
+ #
+ # Generate enum constants
+ #
+ for type,enum in enums.items():
+ classes.write("# %s\n" % type)
+ items = enum.items()
+ items = sorted(items, key=(lambda i: int(i[1])))
+ for name,value in items:
+ classes.write("%s = %s\n" % (name,value))
+ classes.write("\n")
+
+ txt.close()
+ classes.close()
+
+buildStubs()
+buildWrappers()
diff --git a/python/libxml.c b/python/libxml.c
new file mode 100644
index 0000000..30b71f3
--- /dev/null
+++ b/python/libxml.c
@@ -0,0 +1,3934 @@
+/*
+ * libxml.c: this modules implements the main part of the glue of the
+ * libxml2 library and the Python interpreter. It provides the
+ * entry points where an automatically generated stub is either
+ * unpractical or would not match cleanly the Python model.
+ *
+ * If compiled with MERGED_MODULES, the entry point will be used to
+ * initialize both the libxml2 and the libxslt wrappers
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+#include <Python.h>
+#include <fileobject.h>
+/* #include "config.h" */
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlIO.h>
+#include <libxml/c14n.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlsave.h>
+#include "libxml_wrap.h"
+#include "libxml2-py.h"
+
+#if defined(WITH_TRIO)
+#include "trio.h"
+#define vsnprintf trio_vsnprintf
+#endif
+
+/* #define DEBUG */
+/* #define DEBUG_SAX */
+/* #define DEBUG_XPATH */
+/* #define DEBUG_ERROR */
+/* #define DEBUG_MEMORY */
+/* #define DEBUG_FILES */
+/* #define DEBUG_LOADER */
+
+#if PY_MAJOR_VERSION >= 3
+PyObject *PyInit_libxml2mod(void);
+
+#define PY_IMPORT_STRING_SIZE PyUnicode_FromStringAndSize
+#define PY_IMPORT_STRING PyUnicode_FromString
+#else
+void initlibxml2mod(void);
+#define PY_IMPORT_STRING_SIZE PyString_FromStringAndSize
+#define PY_IMPORT_STRING PyString_FromString
+#endif
+
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+/*
+ * the following vars are used for XPath extensions, but
+ * are also referenced within the parser cleanup routine.
+ */
+static int libxml_xpathCallbacksInitialized = 0;
+
+typedef struct libxml_xpathCallback {
+ xmlXPathContextPtr ctx;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ PyObject *function;
+} libxml_xpathCallback, *libxml_xpathCallbackPtr;
+typedef libxml_xpathCallback libxml_xpathCallbackArray[];
+static int libxml_xpathCallbacksAllocd = 10;
+static libxml_xpathCallbackArray *libxml_xpathCallbacks = NULL;
+static int libxml_xpathCallbacksNb = 0;
+
+/************************************************************************
+ * *
+ * Memory debug interface *
+ * *
+ ************************************************************************/
+
+#if 0
+extern void xmlMemFree(void *ptr);
+extern void *xmlMemMalloc(size_t size);
+extern void *xmlMemRealloc(void *ptr, size_t size);
+extern char *xmlMemoryStrdup(const char *str);
+#endif
+
+static int libxmlMemoryDebugActivated = 0;
+static long libxmlMemoryAllocatedBase = 0;
+
+static int libxmlMemoryDebug = 0;
+static xmlFreeFunc freeFunc = NULL;
+static xmlMallocFunc mallocFunc = NULL;
+static xmlReallocFunc reallocFunc = NULL;
+static xmlStrdupFunc strdupFunc = NULL;
+
+static void
+libxml_xmlErrorInitialize(void); /* forward declare */
+
+PyObject *
+libxml_xmlMemoryUsed(PyObject * self ATTRIBUTE_UNUSED,
+ PyObject * args ATTRIBUTE_UNUSED)
+{
+ long ret;
+ PyObject *py_retval;
+
+ ret = xmlMemUsed();
+
+ py_retval = libxml_longWrap(ret);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlDebugMemory(PyObject * self ATTRIBUTE_UNUSED, PyObject * args)
+{
+ int activate;
+ PyObject *py_retval;
+ long ret;
+
+ if (!PyArg_ParseTuple(args, (char *) "i:xmlDebugMemory", &activate))
+ return (NULL);
+
+#ifdef DEBUG_MEMORY
+ printf("libxml_xmlDebugMemory(%d) called\n", activate);
+#endif
+
+ if (activate != 0) {
+ if (libxmlMemoryDebug == 0) {
+ /*
+ * First initialize the library and grab the old memory handlers
+ * and switch the library to memory debugging
+ */
+ xmlMemGet((xmlFreeFunc *) & freeFunc,
+ (xmlMallocFunc *) & mallocFunc,
+ (xmlReallocFunc *) & reallocFunc,
+ (xmlStrdupFunc *) & strdupFunc);
+ if ((freeFunc == xmlMemFree) && (mallocFunc == xmlMemMalloc) &&
+ (reallocFunc == xmlMemRealloc) &&
+ (strdupFunc == xmlMemoryStrdup)) {
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ } else {
+ /*
+ * cleanup first, because some memory has been
+ * allocated with the non-debug malloc in xmlInitParser
+ * when the python module was imported
+ */
+ xmlCleanupParser();
+ ret = (long) xmlMemSetup(xmlMemFree, xmlMemMalloc,
+ xmlMemRealloc, xmlMemoryStrdup);
+ if (ret < 0)
+ goto error;
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ /* reinitialize */
+ xmlInitParser();
+ libxml_xmlErrorInitialize();
+ }
+ ret = 0;
+ } else if (libxmlMemoryDebugActivated == 0) {
+ libxmlMemoryAllocatedBase = xmlMemUsed();
+ ret = 0;
+ } else {
+ ret = xmlMemUsed() - libxmlMemoryAllocatedBase;
+ }
+ libxmlMemoryDebug = 1;
+ libxmlMemoryDebugActivated = 1;
+ } else {
+ if (libxmlMemoryDebugActivated == 1)
+ ret = xmlMemUsed() - libxmlMemoryAllocatedBase;
+ else
+ ret = 0;
+ libxmlMemoryDebugActivated = 0;
+ }
+ error:
+ py_retval = libxml_longWrap(ret);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlPythonCleanupParser(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args ATTRIBUTE_UNUSED) {
+
+ int ix;
+ long freed = -1;
+
+ if (libxmlMemoryDebug) {
+ freed = xmlMemUsed();
+ }
+
+ xmlCleanupParser();
+ /*
+ * Need to confirm whether we really want to do this (required for
+ * memcheck) in all cases...
+ */
+
+ if (libxml_xpathCallbacks != NULL) { /* if ext funcs declared */
+ for (ix=0; ix<libxml_xpathCallbacksNb; ix++) {
+ if ((*libxml_xpathCallbacks)[ix].name != NULL)
+ xmlFree((*libxml_xpathCallbacks)[ix].name);
+ if ((*libxml_xpathCallbacks)[ix].ns_uri != NULL)
+ xmlFree((*libxml_xpathCallbacks)[ix].ns_uri);
+ }
+ libxml_xpathCallbacksNb = 0;
+ xmlFree(libxml_xpathCallbacks);
+ libxml_xpathCallbacks = NULL;
+ }
+
+ if (libxmlMemoryDebug) {
+ freed -= xmlMemUsed();
+ libxmlMemoryAllocatedBase -= freed;
+ if (libxmlMemoryAllocatedBase < 0)
+ libxmlMemoryAllocatedBase = 0;
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
+ ATTRIBUTE_UNUSED PyObject * args)
+{
+
+ if (libxmlMemoryDebug != 0)
+ xmlMemoryDump();
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+/************************************************************************
+ * *
+ * Handling Python FILE I/O at the C level *
+ * The raw I/O attack diectly the File objects, while the *
+ * other routines address the ioWrapper instance instead *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlPythonFileCloseUnref:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ */
+static int
+xmlPythonFileCloseRaw (void * context) {
+ PyObject *file, *ret;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileCloseUnref\n");
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
+ if (ret != NULL) {
+ Py_DECREF(ret);
+ }
+ Py_DECREF(file);
+ return(0);
+}
+
+/**
+ * xmlPythonFileReadRaw:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the Python file in the I/O channel
+ *
+ * Returns the number of bytes read
+ */
+static int
+xmlPythonFileReadRaw (void * context, char * buffer, int len) {
+ PyObject *file;
+ PyObject *ret;
+ int lenread = -1;
+ char *data;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileReadRaw: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
+ if (ret == NULL) {
+ printf("xmlPythonFileReadRaw: result is NULL\n");
+ return(-1);
+ } else if (PyBytes_Check(ret)) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (ret) {
+#if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(ret, &size);
+
+ lenread = (int) size;
+ data = (char *) tmp;
+#else
+ PyObject *b;
+ b = PyUnicode_AsUTF8String(ret);
+ if (b == NULL) {
+ printf("xmlPythonFileReadRaw: failed to convert to UTF-8\n");
+ return(-1);
+ }
+ lenread = PyBytes_Size(b);
+ data = PyBytes_AsString(b);
+ Py_DECREF(b);
+#endif
+#endif
+ } else {
+ printf("xmlPythonFileReadRaw: result is not a String\n");
+ Py_DECREF(ret);
+ return(-1);
+ }
+ if (lenread > len)
+ memcpy(buffer, data, len);
+ else
+ memcpy(buffer, data, lenread);
+ Py_DECREF(ret);
+ return(lenread);
+}
+
+/**
+ * xmlPythonFileRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes read
+ */
+static int
+xmlPythonFileRead (void * context, char * buffer, int len) {
+ PyObject *file;
+ PyObject *ret;
+ int lenread = -1;
+ char *data;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileRead: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len);
+ if (ret == NULL) {
+ printf("xmlPythonFileRead: result is NULL\n");
+ return(-1);
+ } else if (PyBytes_Check(ret)) {
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (ret) {
+#if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(ret, &size);
+
+ lenread = (int) size;
+ data = (char *) tmp;
+#else
+ PyObject *b;
+ b = PyUnicode_AsUTF8String(ret);
+ if (b == NULL) {
+ printf("xmlPythonFileRead: failed to convert to UTF-8\n");
+ return(-1);
+ }
+ lenread = PyBytes_Size(b);
+ data = PyBytes_AsString(b);
+ Py_DECREF(b);
+#endif
+#endif
+ } else {
+ printf("xmlPythonFileRead: result is not a String\n");
+ Py_DECREF(ret);
+ return(-1);
+ }
+ if (lenread > len)
+ memcpy(buffer, data, len);
+ else
+ memcpy(buffer, data, lenread);
+ Py_DECREF(ret);
+ return(lenread);
+}
+
+/**
+ * xmlFileWrite:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlPythonFileWrite (void * context, const char * buffer, int len) {
+ PyObject *file;
+ PyObject *string;
+ PyObject *ret = NULL;
+ int written = -1;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileWrite: %d\n", len);
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ string = PY_IMPORT_STRING_SIZE(buffer, len);
+ if (string == NULL) return(-1);
+ if (PyObject_HasAttrString(file, (char *) "io_write")) {
+ ret = PyEval_CallMethod(file, (char *) "io_write", (char *) "(O)",
+ string);
+ } else if (PyObject_HasAttrString(file, (char *) "write")) {
+ ret = PyEval_CallMethod(file, (char *) "write", (char *) "(O)",
+ string);
+ }
+ Py_DECREF(string);
+ if (ret == NULL) {
+ printf("xmlPythonFileWrite: result is NULL\n");
+ return(-1);
+ } else if (PyLong_Check(ret)) {
+ written = (int) PyLong_AsLong(ret);
+ Py_DECREF(ret);
+ } else if (ret == Py_None) {
+ written = len;
+ Py_DECREF(ret);
+ } else {
+ printf("xmlPythonFileWrite: result is not an Int nor None\n");
+ Py_DECREF(ret);
+ }
+ return(written);
+}
+
+/**
+ * xmlPythonFileClose:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ */
+static int
+xmlPythonFileClose (void * context) {
+ PyObject *file, *ret = NULL;
+
+#ifdef DEBUG_FILES
+ printf("xmlPythonFileClose\n");
+#endif
+ file = (PyObject *) context;
+ if (file == NULL) return(-1);
+ if (PyObject_HasAttrString(file, (char *) "io_close")) {
+ ret = PyEval_CallMethod(file, (char *) "io_close", (char *) "()");
+ } else if (PyObject_HasAttrString(file, (char *) "flush")) {
+ ret = PyEval_CallMethod(file, (char *) "flush", (char *) "()");
+ }
+ if (ret != NULL) {
+ Py_DECREF(ret);
+ }
+ return(0);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferCreatePythonFile:
+ * @file: a PyFile_Type
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a PyFile_Type
+ * buffered C I/O
+ *
+ * Returns the new parser output or NULL
+ */
+static xmlOutputBufferPtr
+xmlOutputBufferCreatePythonFile(PyObject *file,
+ xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocOutputBuffer(encoder);
+ if (ret != NULL) {
+ ret->context = file;
+ /* Py_INCREF(file); */
+ ret->writecallback = xmlPythonFileWrite;
+ ret->closecallback = xmlPythonFileClose;
+ }
+
+ return(ret);
+}
+
+PyObject *
+libxml_xmlCreateOutputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *file;
+ xmlChar *encoding;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ xmlOutputBufferPtr buffer;
+
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlOutputBufferCreate",
+ &file, &encoding))
+ return(NULL);
+ if ((encoding != NULL) && (encoding[0] != 0)) {
+ handler = xmlFindCharEncodingHandler((const char *) encoding);
+ }
+ buffer = xmlOutputBufferCreatePythonFile(file, handler);
+ if (buffer == NULL)
+ printf("libxml_xmlCreateOutputBuffer: buffer == NULL\n");
+ py_retval = libxml_xmlOutputBufferPtrWrap(buffer);
+ return(py_retval);
+}
+
+/**
+ * libxml_outputBufferGetPythonFile:
+ * @buffer: the I/O buffer
+ *
+ * read the Python I/O from the CObject
+ *
+ * Returns the new parser output or NULL
+ */
+static PyObject *
+libxml_outputBufferGetPythonFile(ATTRIBUTE_UNUSED PyObject *self,
+ PyObject *args) {
+ PyObject *buffer;
+ PyObject *file;
+ xmlOutputBufferPtr obj;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:outputBufferGetPythonFile",
+ &buffer))
+ return(NULL);
+
+ obj = PyoutputBuffer_Get(buffer);
+ if (obj == NULL) {
+ fprintf(stderr,
+ "outputBufferGetPythonFile: obj == NULL\n");
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ if (obj->closecallback != xmlPythonFileClose) {
+ fprintf(stderr,
+ "outputBufferGetPythonFile: not a python file wrapper\n");
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ file = (PyObject *) obj->context;
+ if (file == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ Py_INCREF(file);
+ return(file);
+}
+
+static PyObject *
+libxml_xmlOutputBufferClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferClose", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+ /* Buffer may already have been destroyed elsewhere. This is harmless. */
+ if (out == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+
+ c_retval = xmlOutputBufferClose(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlOutputBufferFlush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferFlush", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferFlush(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSaveFileTo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSaveFileTo", &pyobj_buf, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFileTo(buf, cur, encoding);
+ /* xmlSaveTo() freed the memory pointed to by buf, so record that in the
+ * Python object. */
+ ((PyoutputBuffer_Object *)(pyobj_buf))->obj = NULL;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSaveFormatFileTo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzi:xmlSaveFormatFileTo", &pyobj_buf, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFileTo(buf, cur, encoding, format);
+ /* xmlSaveFormatFileTo() freed the memory pointed to by buf, so record that
+ * in the Python object */
+ ((PyoutputBuffer_Object *)(pyobj_buf))->obj = NULL;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+
+/**
+ * xmlParserInputBufferCreatePythonFile:
+ * @file: a PyFile_Type
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a PyFile_Type
+ * buffered C I/O
+ *
+ * Returns the new parser output or NULL
+ */
+static xmlParserInputBufferPtr
+xmlParserInputBufferCreatePythonFile(PyObject *file,
+ xmlCharEncoding encoding) {
+ xmlParserInputBufferPtr ret;
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(encoding);
+ if (ret != NULL) {
+ ret->context = file;
+ /* Py_INCREF(file); */
+ ret->readcallback = xmlPythonFileRead;
+ ret->closecallback = xmlPythonFileClose;
+ }
+
+ return(ret);
+}
+
+PyObject *
+libxml_xmlCreateInputBuffer(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *file;
+ xmlChar *encoding;
+ xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+ xmlParserInputBufferPtr buffer;
+
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlParserInputBufferCreate",
+ &file, &encoding))
+ return(NULL);
+ if ((encoding != NULL) && (encoding[0] != 0)) {
+ enc = xmlParseCharEncoding((const char *) encoding);
+ }
+ buffer = xmlParserInputBufferCreatePythonFile(file, enc);
+ if (buffer == NULL)
+ printf("libxml_xmlParserInputBufferCreate: buffer == NULL\n");
+ py_retval = libxml_xmlParserInputBufferPtrWrap(buffer);
+ return(py_retval);
+}
+
+/************************************************************************
+ * *
+ * Providing the resolver at the Python level *
+ * *
+ ************************************************************************/
+
+static xmlExternalEntityLoader defaultExternalEntityLoader = NULL;
+static PyObject *pythonExternalEntityLoaderObjext;
+
+static xmlParserInputPtr
+pythonExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr result = NULL;
+ if (pythonExternalEntityLoaderObjext != NULL) {
+ PyObject *ret;
+ PyObject *ctxtobj;
+
+ ctxtobj = libxml_xmlParserCtxtPtrWrap(ctxt);
+#ifdef DEBUG_LOADER
+ printf("pythonExternalEntityLoader: ready to call\n");
+#endif
+
+ ret = PyObject_CallFunction(pythonExternalEntityLoaderObjext,
+ (char *) "(ssO)", URL, ID, ctxtobj);
+ Py_XDECREF(ctxtobj);
+#ifdef DEBUG_LOADER
+ printf("pythonExternalEntityLoader: result ");
+ PyObject_Print(ret, stdout, 0);
+ printf("\n");
+#endif
+
+ if (ret != NULL) {
+ if (PyObject_HasAttrString(ret, (char *) "read")) {
+ xmlParserInputBufferPtr buf;
+
+ buf = xmlAllocParserInputBuffer(XML_CHAR_ENCODING_NONE);
+ if (buf != NULL) {
+ buf->context = ret;
+ buf->readcallback = xmlPythonFileReadRaw;
+ buf->closecallback = xmlPythonFileCloseRaw;
+ result = xmlNewIOInputStream(ctxt, buf,
+ XML_CHAR_ENCODING_NONE);
+ }
+#if 0
+ } else {
+ if (URL != NULL)
+ printf("pythonExternalEntityLoader: can't read %s\n",
+ URL);
+#endif
+ }
+ if (result == NULL) {
+ Py_DECREF(ret);
+ } else if (URL != NULL) {
+ result->filename = (char *) xmlStrdup((const xmlChar *)URL);
+ result->directory = xmlParserGetDirectory((const char *) URL);
+ }
+ }
+ }
+ if ((result == NULL) && (defaultExternalEntityLoader != NULL)) {
+ result = defaultExternalEntityLoader(URL, ID, ctxt);
+ }
+ return(result);
+}
+
+PyObject *
+libxml_xmlSetEntityLoader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ PyObject *py_retval;
+ PyObject *loader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:libxml_xmlSetEntityLoader",
+ &loader))
+ return(NULL);
+
+ if (!PyCallable_Check(loader)) {
+ PyErr_SetString(PyExc_ValueError, "entity loader is not callable");
+ return(NULL);
+ }
+
+#ifdef DEBUG_LOADER
+ printf("libxml_xmlSetEntityLoader\n");
+#endif
+ if (defaultExternalEntityLoader == NULL)
+ defaultExternalEntityLoader = xmlGetExternalEntityLoader();
+
+ Py_XDECREF(pythonExternalEntityLoaderObjext);
+ pythonExternalEntityLoaderObjext = loader;
+ Py_XINCREF(pythonExternalEntityLoaderObjext);
+ xmlSetExternalEntityLoader(pythonExternalEntityLoader);
+
+ py_retval = PyLong_FromLong(0);
+ return(py_retval);
+}
+
+/************************************************************************
+ * *
+ * Input callback registration *
+ * *
+ ************************************************************************/
+static PyObject *pythonInputOpenCallbackObject;
+static int pythonInputCallbackID = -1;
+
+static int
+pythonInputMatchCallback(ATTRIBUTE_UNUSED const char *URI)
+{
+ /* Always return success, real decision whether URI is supported will be
+ * made in open callback. */
+ return 1;
+}
+
+static void *
+pythonInputOpenCallback(const char *URI)
+{
+ PyObject *ret;
+
+ ret = PyObject_CallFunction(pythonInputOpenCallbackObject,
+ (char *)"s", URI);
+ if (ret == Py_None) {
+ Py_DECREF(Py_None);
+ return NULL;
+ }
+ return ret;
+}
+
+PyObject *
+libxml_xmlRegisterInputCallback(ATTRIBUTE_UNUSED PyObject *self,
+ PyObject *args) {
+ PyObject *cb;
+
+ if (!PyArg_ParseTuple(args,
+ (const char *)"O:libxml_xmlRegisterInputCallback", &cb))
+ return(NULL);
+
+ if (!PyCallable_Check(cb)) {
+ PyErr_SetString(PyExc_ValueError, "input callback is not callable");
+ return(NULL);
+ }
+
+ /* Python module registers a single callback and manages the list of
+ * all callbacks internally. This is necessitated by xmlInputMatchCallback
+ * API, which does not allow for passing of data objects to discriminate
+ * different Python methods. */
+ if (pythonInputCallbackID == -1) {
+ pythonInputCallbackID = xmlRegisterInputCallbacks(
+ pythonInputMatchCallback, pythonInputOpenCallback,
+ xmlPythonFileReadRaw, xmlPythonFileCloseRaw);
+ if (pythonInputCallbackID == -1)
+ return PyErr_NoMemory();
+ pythonInputOpenCallbackObject = cb;
+ Py_INCREF(pythonInputOpenCallbackObject);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlUnregisterInputCallback(ATTRIBUTE_UNUSED PyObject *self,
+ ATTRIBUTE_UNUSED PyObject *args) {
+ int ret;
+
+ ret = xmlPopInputCallbacks();
+ if (pythonInputCallbackID != -1) {
+ /* Assert that the right input callback was popped. libxml's API does not
+ * allow removal by ID, so all that could be done is an assert. */
+ if (pythonInputCallbackID == ret) {
+ pythonInputCallbackID = -1;
+ Py_DECREF(pythonInputOpenCallbackObject);
+ pythonInputOpenCallbackObject = NULL;
+ } else {
+ PyErr_SetString(PyExc_AssertionError, "popped non-python input callback");
+ return(NULL);
+ }
+ } else if (ret == -1) {
+ /* No more callbacks to pop */
+ PyErr_SetString(PyExc_IndexError, "no input callbacks to pop");
+ return(NULL);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+/************************************************************************
+ * *
+ * Handling SAX/xmllib/sgmlop callback interfaces *
+ * *
+ ************************************************************************/
+
+static void
+pythonStartElement(void *user_data, const xmlChar * name,
+ const xmlChar ** attrs)
+{
+ int i;
+ PyObject *handler;
+ PyObject *dict;
+ PyObject *attrname;
+ PyObject *attrvalue;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonStartElement(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "startElement"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "start"))
+ type = 2;
+ if (type != 0) {
+ /*
+ * the xmllib interface always generate a dictionnary,
+ * possibly empty
+ */
+ if ((attrs == NULL) && (type == 1)) {
+ Py_XINCREF(Py_None);
+ dict = Py_None;
+ } else if (attrs == NULL) {
+ dict = PyDict_New();
+ } else {
+ dict = PyDict_New();
+ for (i = 0; attrs[i] != NULL; i++) {
+ attrname = PY_IMPORT_STRING((char *) attrs[i]);
+ i++;
+ if (attrs[i] != NULL) {
+ attrvalue = PY_IMPORT_STRING((char *) attrs[i]);
+ } else {
+ Py_XINCREF(Py_None);
+ attrvalue = Py_None;
+ }
+ PyDict_SetItem(dict, attrname, attrvalue);
+ Py_DECREF(attrname);
+ Py_DECREF(attrvalue);
+ }
+ }
+
+ if (type == 1)
+ result = PyObject_CallMethod(handler, (char *) "startElement",
+ (char *) "sO", name, dict);
+ else if (type == 2)
+ result = PyObject_CallMethod(handler, (char *) "start",
+ (char *) "sO", name, dict);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(dict);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonStartDocument(void *user_data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonStartDocument() called\n");
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "startDocument")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "startDocument", NULL);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonEndDocument(void *user_data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonEndDocument() called\n");
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "endDocument")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "endDocument", NULL);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+ /*
+ * The reference to the handler is released there
+ */
+ Py_XDECREF(handler);
+}
+
+static void
+pythonEndElement(void *user_data, const xmlChar * name)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonEndElement(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "endElement")) {
+ result = PyObject_CallMethod(handler, (char *) "endElement",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ } else if (PyObject_HasAttrString(handler, (char *) "end")) {
+ result = PyObject_CallMethod(handler, (char *) "end",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonReference(void *user_data, const xmlChar * name)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonReference(%s) called\n", name);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "reference")) {
+ result = PyObject_CallMethod(handler, (char *) "reference",
+ (char *) "s", name);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonCharacters(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonCharacters(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "characters"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "data"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result = PyObject_CallMethod(handler, (char *) "characters",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result = PyObject_CallMethod(handler, (char *) "data",
+ (char *) "s#", ch, len);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonIgnorableWhitespace(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonIgnorableWhitespace(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "ignorableWhitespace"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "data"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result =
+ PyObject_CallMethod(handler,
+ (char *) "ignorableWhitespace",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result =
+ PyObject_CallMethod(handler, (char *) "data",
+ (char *) "s#", ch, len);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonProcessingInstruction(void *user_data,
+ const xmlChar * target, const xmlChar * data)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonProcessingInstruction(%s, %s) called\n", target, data);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "processingInstruction")) {
+ result = PyObject_CallMethod(handler, (char *)
+ "processingInstruction",
+ (char *) "ss", target, data);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonComment(void *user_data, const xmlChar * value)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonComment(%s) called\n", value);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "comment")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "comment", (char *) "s",
+ value);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonWarning(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonWarning(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "warning")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "warning", (char *) "s",
+ buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonError(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonError(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "error")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "error", (char *) "s",
+ buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonFatalError(void *user_data, const char *msg, ...)
+{
+ PyObject *handler;
+ PyObject *result;
+ va_list args;
+ char buf[1024];
+
+#ifdef DEBUG_SAX
+ printf("pythonFatalError(%s) called\n", msg);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "fatalError")) {
+ va_start(args, msg);
+ vsnprintf(buf, 1023, msg, args);
+ va_end(args);
+ buf[1023] = 0;
+ result =
+ PyObject_CallMethod(handler, (char *) "fatalError",
+ (char *) "s", buf);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonCdataBlock(void *user_data, const xmlChar * ch, int len)
+{
+ PyObject *handler;
+ PyObject *result = NULL;
+ int type = 0;
+
+#ifdef DEBUG_SAX
+ printf("pythonCdataBlock(%s, %d) called\n", ch, len);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "cdataBlock"))
+ type = 1;
+ else if (PyObject_HasAttrString(handler, (char *) "cdata"))
+ type = 2;
+ if (type != 0) {
+ if (type == 1)
+ result =
+ PyObject_CallMethod(handler, (char *) "cdataBlock",
+ (char *) "s#", ch, len);
+ else if (type == 2)
+ result =
+ PyObject_CallMethod(handler, (char *) "cdata",
+ (char *) "s#", ch, len);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonExternalSubset(void *user_data,
+ const xmlChar * name,
+ const xmlChar * externalID, const xmlChar * systemID)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonExternalSubset(%s, %s, %s) called\n",
+ name, externalID, systemID);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "externalSubset")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "externalSubset",
+ (char *) "sss", name, externalID,
+ systemID);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonEntityDecl(void *user_data,
+ const xmlChar * name,
+ int type,
+ const xmlChar * publicId,
+ const xmlChar * systemId, xmlChar * content)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "entityDecl")) {
+ result = PyObject_CallMethod(handler, (char *) "entityDecl",
+ (char *) "sisss", name, type,
+ publicId, systemId, content);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+
+
+static void
+
+pythonNotationDecl(void *user_data,
+ const xmlChar * name,
+ const xmlChar * publicId, const xmlChar * systemId)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "notationDecl")) {
+ result = PyObject_CallMethod(handler, (char *) "notationDecl",
+ (char *) "sss", name, publicId,
+ systemId);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonAttributeDecl(void *user_data,
+ const xmlChar * elem,
+ const xmlChar * name,
+ int type,
+ int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ PyObject *handler;
+ PyObject *nameList;
+ PyObject *newName;
+ xmlEnumerationPtr node;
+ PyObject *result;
+ int count;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "attributeDecl")) {
+ count = 0;
+ for (node = tree; node != NULL; node = node->next) {
+ count++;
+ }
+ nameList = PyList_New(count);
+ count = 0;
+ for (node = tree; node != NULL; node = node->next) {
+ newName = PY_IMPORT_STRING((char *) node->name);
+ PyList_SetItem(nameList, count, newName);
+ Py_DECREF(newName);
+ count++;
+ }
+ result = PyObject_CallMethod(handler, (char *) "attributeDecl",
+ (char *) "ssiisO", elem, name, type,
+ def, defaultValue, nameList);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(nameList);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonElementDecl(void *user_data,
+ const xmlChar * name,
+ int type, ATTRIBUTE_UNUSED xmlElementContentPtr content)
+{
+ PyObject *handler;
+ PyObject *obj;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "elementDecl")) {
+ /* TODO: wrap in an elementContent object */
+ printf
+ ("pythonElementDecl: xmlElementContentPtr wrapper missing !\n");
+ obj = Py_None;
+ /* Py_XINCREF(Py_None); isn't the reference just borrowed ??? */
+ result = PyObject_CallMethod(handler, (char *) "elementDecl",
+ (char *) "siO", name, type, obj);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonUnparsedEntityDecl(void *user_data,
+ const xmlChar * name,
+ const xmlChar * publicId,
+ const xmlChar * systemId,
+ const xmlChar * notationName)
+{
+ PyObject *handler;
+ PyObject *result;
+
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "unparsedEntityDecl")) {
+ result =
+ PyObject_CallMethod(handler, (char *) "unparsedEntityDecl",
+ (char *) "ssss", name, publicId, systemId,
+ notationName);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static void
+pythonInternalSubset(void *user_data, const xmlChar * name,
+ const xmlChar * ExternalID, const xmlChar * SystemID)
+{
+ PyObject *handler;
+ PyObject *result;
+
+#ifdef DEBUG_SAX
+ printf("pythonInternalSubset(%s, %s, %s) called\n",
+ name, ExternalID, SystemID);
+#endif
+ handler = (PyObject *) user_data;
+ if (PyObject_HasAttrString(handler, (char *) "internalSubset")) {
+ result = PyObject_CallMethod(handler, (char *) "internalSubset",
+ (char *) "sss", name, ExternalID,
+ SystemID);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ Py_XDECREF(result);
+ }
+}
+
+static xmlSAXHandler pythonSaxHandler = {
+ pythonInternalSubset,
+ NULL, /* TODO pythonIsStandalone, */
+ NULL, /* TODO pythonHasInternalSubset, */
+ NULL, /* TODO pythonHasExternalSubset, */
+ NULL, /* TODO pythonResolveEntity, */
+ NULL, /* TODO pythonGetEntity, */
+ pythonEntityDecl,
+ pythonNotationDecl,
+ pythonAttributeDecl,
+ pythonElementDecl,
+ pythonUnparsedEntityDecl,
+ NULL, /* OBSOLETED pythonSetDocumentLocator, */
+ pythonStartDocument,
+ pythonEndDocument,
+ pythonStartElement,
+ pythonEndElement,
+ pythonReference,
+ pythonCharacters,
+ pythonIgnorableWhitespace,
+ pythonProcessingInstruction,
+ pythonComment,
+ pythonWarning,
+ pythonError,
+ pythonFatalError,
+ NULL, /* TODO pythonGetParameterEntity, */
+ pythonCdataBlock,
+ pythonExternalSubset,
+ 1,
+ NULL, /* TODO mograte to SAX2 */
+ NULL,
+ NULL,
+ NULL
+};
+
+/************************************************************************
+ * *
+ * Handling of specific parser context *
+ * *
+ ************************************************************************/
+
+PyObject *
+libxml_xmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ const char *chunk;
+ int size;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+ xmlParserCtxtPtr ret;
+ PyObject *pyret;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oziz:xmlCreatePushParser", &pyobj_SAX, &chunk,
+ &size, &URI))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_xmlCreatePushParser(%p, %s, %d, %s) called\n",
+ pyobj_SAX, chunk, size, URI);
+#endif
+ if (pyobj_SAX != Py_None) {
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ }
+ ret = xmlCreatePushParserCtxt(SAX, pyobj_SAX, chunk, size, URI);
+ pyret = libxml_xmlParserCtxtPtrWrap(ret);
+ return (pyret);
+}
+
+PyObject *
+libxml_htmlCreatePushParser(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+#ifdef LIBXML_HTML_ENABLED
+ const char *chunk;
+ int size;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+ xmlParserCtxtPtr ret;
+ PyObject *pyret;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oziz:htmlCreatePushParser", &pyobj_SAX, &chunk,
+ &size, &URI))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_htmlCreatePushParser(%p, %s, %d, %s) called\n",
+ pyobj_SAX, chunk, size, URI);
+#endif
+ if (pyobj_SAX != Py_None) {
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ }
+ ret = htmlCreatePushParserCtxt(SAX, pyobj_SAX, chunk, size, URI,
+ XML_CHAR_ENCODING_NONE);
+ pyret = libxml_xmlParserCtxtPtrWrap(ret);
+ return (pyret);
+#else
+ Py_INCREF(Py_None);
+ return (Py_None);
+#endif /* LIBXML_HTML_ENABLED */
+}
+
+PyObject *
+libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+#ifdef LIBXML_SAX1_ENABLED
+ int recover;
+ const char *URI;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "Osi:xmlSAXParseFile", &pyobj_SAX,
+ &URI, &recover))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_xmlSAXParseFile(%p, %s, %d) called\n",
+ pyobj_SAX, URI, recover);
+#endif
+ if (pyobj_SAX == Py_None) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ xmlSAXUserParseFile(SAX, pyobj_SAX, URI);
+#endif /* LIBXML_SAX1_ENABLED */
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+PyObject *
+libxml_htmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+#ifdef LIBXML_HTML_ENABLED
+ const char *URI;
+ const char *encoding;
+ PyObject *pyobj_SAX = NULL;
+ xmlSAXHandlerPtr SAX = NULL;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Osz:htmlSAXParseFile", &pyobj_SAX, &URI,
+ &encoding))
+ return (NULL);
+
+#ifdef DEBUG
+ printf("libxml_htmlSAXParseFile(%p, %s, %s) called\n",
+ pyobj_SAX, URI, encoding);
+#endif
+ if (pyobj_SAX == Py_None) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ SAX = &pythonSaxHandler;
+ Py_INCREF(pyobj_SAX);
+ /* The reference is released in pythonEndDocument() */
+ htmlSAXParseFile(URI, encoding, SAX, pyobj_SAX);
+ Py_INCREF(Py_None);
+ return (Py_None);
+#else
+ Py_INCREF(Py_None);
+ return (Py_None);
+#endif /* LIBXML_HTML_ENABLED */
+}
+
+/************************************************************************
+ * *
+ * Error message callback *
+ * *
+ ************************************************************************/
+
+static PyObject *libxml_xmlPythonErrorFuncHandler = NULL;
+static PyObject *libxml_xmlPythonErrorFuncCtxt = NULL;
+
+/* helper to build a xmlMalloc'ed string from a format and va_list */
+/*
+ * disabled the loop, the repeated call to vsnprintf without reset of ap
+ * in case the initial buffer was too small segfaulted on x86_64
+ * we now directly vsnprintf on a large buffer.
+ */
+static char *
+libxml_buildMessage(const char *msg, va_list ap)
+{
+ int chars;
+ char *str;
+
+ str = (char *) xmlMalloc(1000);
+ if (str == NULL)
+ return NULL;
+
+ chars = vsnprintf(str, 999, msg, ap);
+ if (chars >= 998)
+ str[999] = 0;
+
+ return str;
+}
+
+static void
+libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
+ ...)
+{
+ va_list ap;
+ PyObject *list;
+ PyObject *message;
+ PyObject *result;
+ char str[1000];
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
+#endif
+
+
+ if (libxml_xmlPythonErrorFuncHandler == NULL) {
+ va_start(ap, msg);
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+ } else {
+ va_start(ap, msg);
+ if (vsnprintf(str, 999, msg, ap) >= 998)
+ str[999] = 0;
+ va_end(ap);
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt);
+ Py_XINCREF(libxml_xmlPythonErrorFuncCtxt);
+ message = libxml_charPtrConstWrap(str);
+ PyTuple_SetItem(list, 1, message);
+ result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+ }
+}
+
+static void
+libxml_xmlErrorInitialize(void)
+{
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlErrorInitialize() called\n");
+#endif
+ xmlSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
+ xmlThrDefSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
+}
+
+static PyObject *
+libxml_xmlRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_f;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OO:xmlRegisterErrorHandler", &pyobj_f,
+ &pyobj_ctx))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRegisterErrorHandler(%p, %p) called\n", pyobj_ctx,
+ pyobj_f);
+#endif
+
+ if (libxml_xmlPythonErrorFuncHandler != NULL) {
+ Py_XDECREF(libxml_xmlPythonErrorFuncHandler);
+ }
+ if (libxml_xmlPythonErrorFuncCtxt != NULL) {
+ Py_XDECREF(libxml_xmlPythonErrorFuncCtxt);
+ }
+
+ Py_XINCREF(pyobj_ctx);
+ Py_XINCREF(pyobj_f);
+
+ /* TODO: check f is a function ! */
+ libxml_xmlPythonErrorFuncHandler = pyobj_f;
+ libxml_xmlPythonErrorFuncCtxt = pyobj_ctx;
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+
+/************************************************************************
+ * *
+ * Per parserCtxt error handler *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *f;
+ PyObject *arg;
+} xmlParserCtxtPyCtxt;
+typedef xmlParserCtxtPyCtxt *xmlParserCtxtPyCtxtPtr;
+
+static void
+libxml_xmlParserCtxtGenericErrorFuncHandler(void *ctx, int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlParserCtxtGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ ctxt = (xmlParserCtxtPtr)ctx;
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+
+ list = PyTuple_New(4);
+ PyTuple_SetItem(list, 0, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ PyTuple_SetItem(list, 1, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 2, libxml_intWrap(severity));
+ PyTuple_SetItem(list, 3, Py_None);
+ Py_INCREF(Py_None);
+ result = PyEval_CallObject(pyCtxt->f, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlParserCtxtErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtValidityErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlParserCtxtValidityWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlParserCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlParserCtxtSetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ PyObject *py_retval;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+ PyObject *pyobj_f;
+ PyObject *pyobj_arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlParserCtxtSetErrorHandler",
+ &pyobj_ctxt, &pyobj_f, &pyobj_arg))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ if (ctxt->_private == NULL) {
+ pyCtxt = xmlMalloc(sizeof(xmlParserCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt,0,sizeof(xmlParserCtxtPyCtxt));
+ ctxt->_private = pyCtxt;
+ }
+ else {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+ }
+ /* TODO: check f is a function ! */
+ Py_XDECREF(pyCtxt->f);
+ Py_XINCREF(pyobj_f);
+ pyCtxt->f = pyobj_f;
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ if (pyobj_f != Py_None) {
+ ctxt->sax->error = libxml_xmlParserCtxtErrorFuncHandler;
+ ctxt->sax->warning = libxml_xmlParserCtxtWarningFuncHandler;
+ ctxt->vctxt.error = libxml_xmlParserCtxtValidityErrorFuncHandler;
+ ctxt->vctxt.warning = libxml_xmlParserCtxtValidityWarningFuncHandler;
+ }
+ else {
+ ctxt->sax->error = xmlParserError;
+ ctxt->vctxt.error = xmlParserValidityError;
+ ctxt->sax->warning = xmlParserWarning;
+ ctxt->vctxt.warning = xmlParserValidityWarning;
+ }
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlParserCtxtGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ PyObject *py_retval;
+ xmlParserCtxtPtr ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserCtxtGetErrorHandler",
+ &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ py_retval = PyTuple_New(2);
+ if (ctxt->_private != NULL) {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
+
+ PyTuple_SetItem(py_retval, 0, pyCtxt->f);
+ Py_XINCREF(pyCtxt->f);
+ PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ }
+ else {
+ /* no python error handler registered */
+ PyTuple_SetItem(py_retval, 0, Py_None);
+ Py_XINCREF(Py_None);
+ PyTuple_SetItem(py_retval, 1, Py_None);
+ Py_XINCREF(Py_None);
+ }
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlFreeParserCtxt(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlParserCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ if (ctxt != NULL) {
+ pyCtxt = (xmlParserCtxtPyCtxtPtr)((xmlParserCtxtPtr)ctxt)->_private;
+ if (pyCtxt) {
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ xmlFreeParserCtxt(ctxt);
+ }
+
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+/***
+ * xmlValidCtxt stuff
+ */
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlValidCtxtPyCtxt;
+typedef xmlValidCtxtPyCtxt *xmlValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlValidCtxtGenericErrorFuncHandler(void *ctx, ATTRIBUTE_UNUSED int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlValidCtxtGenericErrorFuncHandler(%p, %d, %s, ...) called\n", ctx, severity, str);
+#endif
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlValidCtxtGenericWarningFuncHandler(void *ctx, ATTRIBUTE_UNUSED int severity, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlValidCtxtGenericWarningFuncHandler(%p, %d, %s, ...) called\n", ctx, severity, str);
+#endif
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlValidCtxtErrorFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlValidCtxtGenericErrorFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_ERROR,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlValidCtxtWarningFuncHandler(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlValidCtxtGenericWarningFuncHandler(ctx,XML_PARSER_SEVERITY_VALIDITY_WARNING,libxml_buildMessage(msg,ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlValidCtxtPtr ctxt;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PyValidCtxt_Get(pyobj_ctx);
+ pyCtxt = xmlMalloc(sizeof(xmlValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlValidCtxtPyCtxt));
+
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ ctxt->error = libxml_xmlValidCtxtErrorFuncHandler;
+ ctxt->warning = libxml_xmlValidCtxtWarningFuncHandler;
+ ctxt->userData = pyCtxt;
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+
+static PyObject *
+libxml_xmlFreeValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlValidCtxtPtr cur;
+ xmlValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeValidCtxt", &pyobj_cur))
+ return(NULL);
+ cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur);
+
+ pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData);
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+
+ xmlFreeValidCtxt(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#ifdef LIBXML_READER_ENABLED
+/************************************************************************
+ * *
+ * Per xmlTextReader error handler *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *f;
+ PyObject *arg;
+} xmlTextReaderPyCtxt;
+typedef xmlTextReaderPyCtxt *xmlTextReaderPyCtxtPtr;
+
+static void
+libxml_xmlTextReaderErrorCallback(void *arg,
+ const char *msg,
+ int severity,
+ xmlTextReaderLocatorPtr locator)
+{
+ xmlTextReaderPyCtxt *pyCtxt = (xmlTextReaderPyCtxt *)arg;
+ PyObject *list;
+ PyObject *result;
+
+ list = PyTuple_New(4);
+ PyTuple_SetItem(list, 0, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ PyTuple_SetItem(list, 1, libxml_charPtrConstWrap(msg));
+ PyTuple_SetItem(list, 2, libxml_intWrap(severity));
+ PyTuple_SetItem(list, 3, libxml_xmlTextReaderLocatorPtrWrap(locator));
+ result = PyEval_CallObject(pyCtxt->f, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static PyObject *
+libxml_xmlTextReaderSetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ xmlTextReaderPtr reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+ PyObject *pyobj_reader;
+ PyObject *pyobj_f;
+ PyObject *pyobj_arg;
+ PyObject *py_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlTextReaderSetErrorHandler", &pyobj_reader, &pyobj_f, &pyobj_arg))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ /* clear previous error handler */
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ if (arg != NULL) {
+ if (f == (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ else {
+ /*
+ * there already an arg, and it's not ours,
+ * there is definitely something wrong going on here...
+ * we don't know how to free it, so we bail out...
+ */
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ }
+ xmlTextReaderSetErrorHandler(reader,NULL,NULL);
+ /* set new error handler */
+ if (pyobj_f != Py_None)
+ {
+ pyCtxt = (xmlTextReaderPyCtxtPtr)xmlMalloc(sizeof(xmlTextReaderPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ Py_XINCREF(pyobj_f);
+ pyCtxt->f = pyobj_f;
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+ xmlTextReaderSetErrorHandler(reader,
+ (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback,
+ pyCtxt);
+ }
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlTextReaderGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
+{
+ xmlTextReaderPtr reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+ PyObject *pyobj_reader;
+ PyObject *py_retval;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderSetErrorHandler", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ py_retval = PyTuple_New(2);
+ if (f == (xmlTextReaderErrorFunc)libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ PyTuple_SetItem(py_retval, 0, pyCtxt->f);
+ Py_XINCREF(pyCtxt->f);
+ PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ }
+ else
+ {
+ /* f is null or it's not our error handler */
+ PyTuple_SetItem(py_retval, 0, Py_None);
+ Py_XINCREF(Py_None);
+ PyTuple_SetItem(py_retval, 1, Py_None);
+ Py_XINCREF(Py_None);
+ }
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlTextReaderPyCtxtPtr pyCtxt;
+ xmlTextReaderErrorFunc f;
+ void *arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
+ return(NULL);
+ if (!PyCapsule_CheckExact(pyobj_reader)) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ if (reader == NULL) {
+ Py_INCREF(Py_None);
+ return(Py_None);
+ }
+
+ xmlTextReaderGetErrorHandler(reader,&f,&arg);
+ if (arg != NULL) {
+ if (f == (xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback) {
+ /* ok, it's our error handler! */
+ pyCtxt = (xmlTextReaderPyCtxtPtr)arg;
+ Py_XDECREF(pyCtxt->f);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ /*
+ * else, something wrong happened, because the error handler is
+ * not owned by the python bindings...
+ */
+ }
+
+ xmlFreeTextReader(reader);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+#endif
+
+/************************************************************************
+ * *
+ * XPath extensions *
+ * *
+ ************************************************************************/
+
+static void
+libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs)
+{
+ PyObject *list, *cur, *result;
+ xmlXPathObjectPtr obj;
+ xmlXPathContextPtr rctxt;
+ PyObject *current_function = NULL;
+ const xmlChar *name;
+ const xmlChar *ns_uri;
+ int i;
+
+ if (ctxt == NULL)
+ return;
+ rctxt = ctxt->context;
+ if (rctxt == NULL)
+ return;
+ name = rctxt->function;
+ ns_uri = rctxt->functionURI;
+#ifdef DEBUG_XPATH
+ printf("libxml_xmlXPathFuncCallback called name %s URI %s\n", name,
+ ns_uri);
+#endif
+
+ /*
+ * Find the function, it should be there it was there at lookup
+ */
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ( /* TODO (ctxt == libxml_xpathCallbacks[i].ctx) && */
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ current_function = (*libxml_xpathCallbacks)[i].function;
+ }
+ }
+ if (current_function == NULL) {
+ printf
+ ("libxml_xmlXPathFuncCallback: internal error %s not found !\n",
+ name);
+ return;
+ }
+
+ list = PyTuple_New(nargs + 1);
+ PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
+ for (i = nargs - 1; i >= 0; i--) {
+ obj = valuePop(ctxt);
+ cur = libxml_xmlXPathObjectPtrWrap(obj);
+ PyTuple_SetItem(list, i + 1, cur);
+ }
+ result = PyEval_CallObject(current_function, list);
+ Py_DECREF(list);
+
+ obj = libxml_xmlXPathObjectPtrConvert(result);
+ valuePush(ctxt, obj);
+}
+
+static xmlXPathFunction
+libxml_xmlXPathFuncLookupFunc(void *ctxt, const xmlChar * name,
+ const xmlChar * ns_uri)
+{
+ int i;
+
+#ifdef DEBUG_XPATH
+ printf("libxml_xmlXPathFuncLookupFunc(%p, %s, %s) called\n",
+ ctxt, name, ns_uri);
+#endif
+ /*
+ * This is called once only. The address is then stored in the
+ * XPath expression evaluation, the proper object to call can
+ * then still be found using the execution context function
+ * and functionURI fields.
+ */
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ((ctxt == (*libxml_xpathCallbacks)[i].ctx) &&
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ return (libxml_xmlXPathFuncCallback);
+ }
+ }
+ return (NULL);
+}
+
+static void
+libxml_xpathCallbacksInitialize(void)
+{
+ int i;
+
+ if (libxml_xpathCallbacksInitialized != 0)
+ return;
+
+#ifdef DEBUG_XPATH
+ printf("libxml_xpathCallbacksInitialized called\n");
+#endif
+ libxml_xpathCallbacks = (libxml_xpathCallbackArray*)xmlMalloc(
+ libxml_xpathCallbacksAllocd*sizeof(libxml_xpathCallback));
+
+ for (i = 0; i < libxml_xpathCallbacksAllocd; i++) {
+ (*libxml_xpathCallbacks)[i].ctx = NULL;
+ (*libxml_xpathCallbacks)[i].name = NULL;
+ (*libxml_xpathCallbacks)[i].ns_uri = NULL;
+ (*libxml_xpathCallbacks)[i].function = NULL;
+ }
+ libxml_xpathCallbacksInitialized = 1;
+}
+
+PyObject *
+libxml_xmlRegisterXPathFunction(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ int c_retval = 0;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_f;
+ int i;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OszO:registerXPathFunction", &pyobj_ctx, &name,
+ &ns_uri, &pyobj_f))
+ return (NULL);
+
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+ if (libxml_xpathCallbacksInitialized == 0)
+ libxml_xpathCallbacksInitialize();
+ xmlXPathRegisterFuncLookup(ctx, libxml_xmlXPathFuncLookupFunc, ctx);
+
+ if ((pyobj_ctx == NULL) || (name == NULL) || (pyobj_f == NULL)) {
+ py_retval = libxml_intWrap(-1);
+ return (py_retval);
+ }
+#ifdef DEBUG_XPATH
+ printf("libxml_registerXPathFunction(%p, %s, %s) called\n",
+ ctx, name, ns_uri);
+#endif
+ for (i = 0; i < libxml_xpathCallbacksNb; i++) {
+ if ((ctx == (*libxml_xpathCallbacks)[i].ctx) &&
+ (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
+ (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
+ Py_XINCREF(pyobj_f);
+ Py_XDECREF((*libxml_xpathCallbacks)[i].function);
+ (*libxml_xpathCallbacks)[i].function = pyobj_f;
+ c_retval = 1;
+ goto done;
+ }
+ }
+ if (libxml_xpathCallbacksNb >= libxml_xpathCallbacksAllocd) {
+ libxml_xpathCallbacksAllocd+=10;
+ libxml_xpathCallbacks = (libxml_xpathCallbackArray*)xmlRealloc(
+ libxml_xpathCallbacks,
+ libxml_xpathCallbacksAllocd*sizeof(libxml_xpathCallback));
+ }
+ i = libxml_xpathCallbacksNb++;
+ Py_XINCREF(pyobj_f);
+ (*libxml_xpathCallbacks)[i].ctx = ctx;
+ (*libxml_xpathCallbacks)[i].name = xmlStrdup(name);
+ (*libxml_xpathCallbacks)[i].ns_uri = xmlStrdup(ns_uri);
+ (*libxml_xpathCallbacks)[i].function = pyobj_f;
+ c_retval = 1;
+
+ done:
+ py_retval = libxml_intWrap((int) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlXPathRegisterVariable(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval;
+ int c_retval = 0;
+ xmlChar *name;
+ xmlChar *ns_uri;
+ xmlXPathContextPtr ctx;
+ xmlXPathObjectPtr val;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_value;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OszO:xpathRegisterVariable", &pyobj_ctx, &name,
+ &ns_uri, &pyobj_value))
+ return (NULL);
+
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+ val = libxml_xmlXPathObjectPtrConvert(pyobj_value);
+
+ c_retval = xmlXPathRegisterVariableNS(ctx, name, ns_uri, val);
+ py_retval = libxml_intWrap(c_retval);
+ return (py_retval);
+}
+
+/************************************************************************
+ * *
+ * Global properties access *
+ * *
+ ************************************************************************/
+static PyObject *
+libxml_name(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ const xmlChar *res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:name", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_name: cur = %p type %d\n", cur, cur->type);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:{
+ xmlDocPtr doc = (xmlDocPtr) cur;
+
+ res = doc->URL;
+ break;
+ }
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->name;
+ break;
+ }
+ case XML_NAMESPACE_DECL:{
+ xmlNsPtr ns = (xmlNsPtr) cur;
+
+ res = ns->prefix;
+ break;
+ }
+ default:
+ res = cur->name;
+ break;
+ }
+ resultobj = libxml_constxmlCharPtrWrap(res);
+
+ return resultobj;
+}
+
+static PyObject *
+libxml_doc(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlDocPtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:doc", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_doc: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->doc;
+ break;
+ }
+ case XML_NAMESPACE_DECL:
+ res = NULL;
+ break;
+ default:
+ res = cur->doc;
+ break;
+ }
+ resultobj = libxml_xmlDocPtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_properties(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlAttrPtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:properties", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+ if ((cur != NULL) && (cur->type == XML_ELEMENT_NODE))
+ res = cur->properties;
+ else
+ res = NULL;
+ resultobj = libxml_xmlAttrPtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_next(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:next", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_next: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = (xmlNodePtr) attr->next;
+ break;
+ }
+ case XML_NAMESPACE_DECL:{
+ xmlNsPtr ns = (xmlNsPtr) cur;
+
+ res = (xmlNodePtr) ns->next;
+ break;
+ }
+ default:
+ res = cur->next;
+ break;
+
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_prev(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:prev", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_prev: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = (xmlNodePtr) attr->prev;
+ }
+ break;
+ case XML_NAMESPACE_DECL:
+ res = NULL;
+ break;
+ default:
+ res = cur->prev;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_children(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:children", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_children: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ res = cur->children;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->children;
+ break;
+ }
+ default:
+ res = NULL;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_last(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:last", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_last: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ res = cur->last;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->last;
+ break;
+ }
+ default:
+ res = NULL;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_parent(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ xmlNodePtr res;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:parent", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+
+#ifdef DEBUG
+ printf("libxml_parent: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ res = NULL;
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ res = attr->parent;
+ }
+ break;
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ res = NULL;
+ break;
+ default:
+ res = cur->parent;
+ break;
+ }
+ resultobj = libxml_xmlNodePtrWrap(res);
+ return resultobj;
+}
+
+static PyObject *
+libxml_type(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *resultobj, *obj;
+ xmlNodePtr cur;
+ const xmlChar *res = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:last", &obj))
+ return NULL;
+ cur = PyxmlNode_Get(obj);
+ if (cur == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+#ifdef DEBUG
+ printf("libxml_type: cur = %p\n", cur);
+#endif
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ res = (const xmlChar *) "element";
+ break;
+ case XML_ATTRIBUTE_NODE:
+ res = (const xmlChar *) "attribute";
+ break;
+ case XML_TEXT_NODE:
+ res = (const xmlChar *) "text";
+ break;
+ case XML_CDATA_SECTION_NODE:
+ res = (const xmlChar *) "cdata";
+ break;
+ case XML_ENTITY_REF_NODE:
+ res = (const xmlChar *) "entity_ref";
+ break;
+ case XML_ENTITY_NODE:
+ res = (const xmlChar *) "entity";
+ break;
+ case XML_PI_NODE:
+ res = (const xmlChar *) "pi";
+ break;
+ case XML_COMMENT_NODE:
+ res = (const xmlChar *) "comment";
+ break;
+ case XML_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_xml";
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ res = (const xmlChar *) "doctype";
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ res = (const xmlChar *) "fragment";
+ break;
+ case XML_NOTATION_NODE:
+ res = (const xmlChar *) "notation";
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_html";
+ break;
+ case XML_DTD_NODE:
+ res = (const xmlChar *) "dtd";
+ break;
+ case XML_ELEMENT_DECL:
+ res = (const xmlChar *) "elem_decl";
+ break;
+ case XML_ATTRIBUTE_DECL:
+ res = (const xmlChar *) "attribute_decl";
+ break;
+ case XML_ENTITY_DECL:
+ res = (const xmlChar *) "entity_decl";
+ break;
+ case XML_NAMESPACE_DECL:
+ res = (const xmlChar *) "namespace";
+ break;
+ case XML_XINCLUDE_START:
+ res = (const xmlChar *) "xinclude_start";
+ break;
+ case XML_XINCLUDE_END:
+ res = (const xmlChar *) "xinclude_end";
+ break;
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+ res = (const xmlChar *) "document_docbook";
+ break;
+#endif
+ }
+#ifdef DEBUG
+ printf("libxml_type: cur = %p: %s\n", cur, res);
+#endif
+
+ resultobj = libxml_constxmlCharPtrWrap(res);
+ return resultobj;
+}
+
+/************************************************************************
+ * *
+ * Specific accessor functions *
+ * *
+ ************************************************************************/
+PyObject *
+libxml_xmlNodeGetNsDefs(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "O:xmlNodeGetNsDefs", &pyobj_node))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE)) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ c_retval = node->nsDef;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlNodeRemoveNsDef(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr ns, prev;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar *href;
+ xmlNsPtr c_retval;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "Oz:xmlNodeRemoveNsDef", &pyobj_node, &href))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = NULL;
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE)) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ if (href == NULL) {
+ ns = node->nsDef;
+ node->nsDef = NULL;
+ c_retval = 0;
+ }
+ else {
+ prev = NULL;
+ ns = node->nsDef;
+ while (ns != NULL) {
+ if (xmlStrEqual(ns->href, href)) {
+ if (prev != NULL)
+ prev->next = ns->next;
+ else
+ node->nsDef = ns->next;
+ ns->next = NULL;
+ c_retval = 0;
+ break;
+ }
+ prev = ns;
+ ns = ns->next;
+ }
+ }
+
+ c_retval = ns;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetNs(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *) "O:xmlNodeGetNs", &pyobj_node))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if ((node == NULL) ||
+ ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ c_retval = node->ns;
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return (py_retval);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/************************************************************************
+ * *
+ * Serialization front-end *
+ * *
+ ************************************************************************/
+
+static PyObject *
+libxml_serializeNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval = NULL;
+ xmlChar *c_retval;
+ PyObject *pyobj_node;
+ xmlNodePtr node;
+ xmlDocPtr doc;
+ const char *encoding;
+ int format;
+ xmlSaveCtxtPtr ctxt;
+ xmlBufferPtr buf;
+ int options = 0;
+
+ if (!PyArg_ParseTuple(args, (char *) "Ozi:serializeNode", &pyobj_node,
+ &encoding, &format))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (node->type == XML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ node = NULL;
+#ifdef LIBXML_HTML_ENABLED
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ node = NULL;
+#endif
+ } else {
+ if (node->type == XML_NAMESPACE_DECL)
+ doc = NULL;
+ else
+ doc = node->doc;
+ if ((doc == NULL) || (doc->type == XML_DOCUMENT_NODE)) {
+#ifdef LIBXML_HTML_ENABLED
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ }
+
+
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (format) options |= XML_SAVE_FORMAT;
+ ctxt = xmlSaveToBuffer(buf, encoding, options);
+ if (ctxt == NULL) {
+ xmlBufferFree(buf);
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ if (node == NULL)
+ xmlSaveDoc(ctxt, doc);
+ else
+ xmlSaveTree(ctxt, node);
+ xmlSaveClose(ctxt);
+
+ c_retval = buf->content;
+ buf->content = NULL;
+
+ xmlBufferFree(buf);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+
+ return (py_retval);
+}
+
+static PyObject *
+libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_file = NULL;
+ FILE *output;
+ PyObject *pyobj_node;
+ xmlNodePtr node;
+ xmlDocPtr doc;
+ const char *encoding;
+ int format;
+ int len;
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOzi:serializeNode", &pyobj_node,
+ &py_file, &encoding, &format))
+ return (NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ if (node == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+ output = PyFile_Get(py_file);
+ if (output == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+
+ if (node->type == XML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ doc = (xmlDocPtr) node;
+ } else {
+ doc = node->doc;
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ if (encoding == NULL)
+ encoding = (const char *) htmlGetMetaEncoding(doc);
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ if (encoding != NULL) {
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL) {
+ return (PyLong_FromLong((long) -1));
+ }
+ }
+ if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("HTML");
+ if (handler == NULL)
+ handler = xmlFindCharEncodingHandler("ascii");
+ }
+
+ buf = xmlOutputBufferCreateFile(output, handler);
+ if (node->type == XML_DOCUMENT_NODE) {
+ len = xmlSaveFormatFileTo(buf, doc, encoding, format);
+#ifdef LIBXML_HTML_ENABLED
+ } else if (node->type == XML_HTML_DOCUMENT_NODE) {
+ htmlDocContentDumpFormatOutput(buf, doc, encoding, format);
+ len = xmlOutputBufferClose(buf);
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ htmlNodeDumpFormatOutput(buf, doc, node, encoding, format);
+ len = xmlOutputBufferClose(buf);
+#endif /* LIBXML_HTML_ENABLED */
+ } else {
+ xmlNodeDumpOutput(buf, doc, node, 0, format, encoding);
+ len = xmlOutputBufferClose(buf);
+ }
+ PyFile_Release(output);
+ return (PyLong_FromLong((long) len));
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Extra stuff *
+ * *
+ ************************************************************************/
+PyObject *
+libxml_xmlNewNode(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ xmlChar *name;
+ xmlNodePtr node;
+
+ if (!PyArg_ParseTuple(args, (char *) "s:xmlNewNode", &name))
+ return (NULL);
+ node = (xmlNodePtr) xmlNewNode(NULL, name);
+#ifdef DEBUG
+ printf("NewNode: %s : %p\n", name, (void *) node);
+#endif
+
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ py_retval = libxml_xmlNodePtrWrap(node);
+ return (py_retval);
+}
+
+
+/************************************************************************
+ * *
+ * Local Catalog stuff *
+ * *
+ ************************************************************************/
+static PyObject *
+libxml_addLocalCatalog(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ xmlChar *URL;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os:addLocalCatalog", &pyobj_ctxt, &URL))
+ return(NULL);
+
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ if (URL != NULL) {
+ ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
+ }
+
+#ifdef DEBUG
+ printf("LocalCatalog: %s\n", URL);
+#endif
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+/************************************************************************
+ * *
+ * RelaxNG error handler registration *
+ * *
+ ************************************************************************/
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlRelaxNGValidCtxtPyCtxt;
+typedef xmlRelaxNGValidCtxtPyCtxt *xmlRelaxNGValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlRelaxNGValidityGenericErrorFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGValidityGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlRelaxNGValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlRelaxNGValidityGenericWarningFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGValidityGenericWarningFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlRelaxNGValidCtxtPyCtxtPtr)ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlRelaxNGValidityErrorFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlRelaxNGValidityGenericErrorFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlRelaxNGValidityWarningFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlRelaxNGValidityGenericWarningFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static PyObject *
+libxml_xmlRelaxNGSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlRelaxNGSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlRelaxNGSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PyrelaxNgValidCtxt_Get(pyobj_ctx);
+ if (xmlRelaxNGGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == -1)
+ {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+
+ if (pyCtxt == NULL)
+ {
+ /* first time to set the error handlers */
+ pyCtxt = xmlMalloc(sizeof(xmlRelaxNGValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlRelaxNGValidCtxtPyCtxt));
+ }
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ xmlRelaxNGSetValidErrors(ctxt, &libxml_xmlRelaxNGValidityErrorFunc, &libxml_xmlRelaxNGValidityWarningFunc, pyCtxt);
+
+ py_retval = libxml_intWrap(1);
+ return (py_retval);
+}
+
+static PyObject *
+libxml_xmlRelaxNGFreeValidCtxt(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
+ xmlRelaxNGValidCtxtPtr ctxt;
+ xmlRelaxNGValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFreeValidCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ if (xmlRelaxNGGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == 0)
+ {
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ }
+
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+typedef struct
+{
+ PyObject *warn;
+ PyObject *error;
+ PyObject *arg;
+} xmlSchemaValidCtxtPyCtxt;
+typedef xmlSchemaValidCtxtPyCtxt *xmlSchemaValidCtxtPyCtxtPtr;
+
+static void
+libxml_xmlSchemaValidityGenericErrorFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaValiditiyGenericErrorFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlSchemaValidCtxtPyCtxtPtr) ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->error, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlSchemaValidityGenericWarningFuncHandler(void *ctx, char *str)
+{
+ PyObject *list;
+ PyObject *result;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaValidityGenericWarningFuncHandler(%p, %s, ...) called\n", ctx, str);
+#endif
+
+ pyCtxt = (xmlSchemaValidCtxtPyCtxtPtr) ctx;
+
+ list = PyTuple_New(2);
+ PyTuple_SetItem(list, 0, libxml_charPtrWrap(str));
+ PyTuple_SetItem(list, 1, pyCtxt->arg);
+ Py_XINCREF(pyCtxt->arg);
+ result = PyEval_CallObject(pyCtxt->warn, list);
+ if (result == NULL)
+ {
+ /* TODO: manage for the exception to be propagated... */
+ PyErr_Print();
+ }
+ Py_XDECREF(list);
+ Py_XDECREF(result);
+}
+
+static void
+libxml_xmlSchemaValidityErrorFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlSchemaValidityGenericErrorFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+static void
+libxml_xmlSchemaValidityWarningFunc(void *ctx, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ libxml_xmlSchemaValidityGenericWarningFuncHandler(ctx, libxml_buildMessage(msg, ap));
+ va_end(ap);
+}
+
+PyObject *
+libxml_xmlSchemaSetValidErrors(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ PyObject *py_retval;
+ PyObject *pyobj_error;
+ PyObject *pyobj_warn;
+ PyObject *pyobj_ctx;
+ PyObject *pyobj_arg = Py_None;
+ xmlSchemaValidCtxtPtr ctxt;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+
+ if (!PyArg_ParseTuple
+ (args, (char *) "OOO|O:xmlSchemaSetValidErrors", &pyobj_ctx, &pyobj_error, &pyobj_warn, &pyobj_arg))
+ return (NULL);
+
+#ifdef DEBUG_ERROR
+ printf("libxml_xmlSchemaSetValidErrors(%p, %p, %p) called\n", pyobj_ctx, pyobj_error, pyobj_warn);
+#endif
+
+ ctxt = PySchemaValidCtxt_Get(pyobj_ctx);
+ if (xmlSchemaGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == -1)
+ {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+
+ if (pyCtxt == NULL)
+ {
+ /* first time to set the error handlers */
+ pyCtxt = xmlMalloc(sizeof(xmlSchemaValidCtxtPyCtxt));
+ if (pyCtxt == NULL) {
+ py_retval = libxml_intWrap(-1);
+ return(py_retval);
+ }
+ memset(pyCtxt, 0, sizeof(xmlSchemaValidCtxtPyCtxt));
+ }
+
+ /* TODO: check warn and error is a function ! */
+ Py_XDECREF(pyCtxt->error);
+ Py_XINCREF(pyobj_error);
+ pyCtxt->error = pyobj_error;
+
+ Py_XDECREF(pyCtxt->warn);
+ Py_XINCREF(pyobj_warn);
+ pyCtxt->warn = pyobj_warn;
+
+ Py_XDECREF(pyCtxt->arg);
+ Py_XINCREF(pyobj_arg);
+ pyCtxt->arg = pyobj_arg;
+
+ xmlSchemaSetValidErrors(ctxt, &libxml_xmlSchemaValidityErrorFunc, &libxml_xmlSchemaValidityWarningFunc, pyCtxt);
+
+ py_retval = libxml_intWrap(1);
+ return(py_retval);
+}
+
+static PyObject *
+libxml_xmlSchemaFreeValidCtxt(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
+{
+ xmlSchemaValidCtxtPtr ctxt;
+ xmlSchemaValidCtxtPyCtxtPtr pyCtxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFreeValidCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ if (xmlSchemaGetValidErrors(ctxt, NULL, NULL, (void **) &pyCtxt) == 0)
+ {
+ if (pyCtxt != NULL)
+ {
+ Py_XDECREF(pyCtxt->error);
+ Py_XDECREF(pyCtxt->warn);
+ Py_XDECREF(pyCtxt->arg);
+ xmlFree(pyCtxt);
+ }
+ }
+
+ xmlSchemaFreeValidCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif
+
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+/************************************************************************
+ * *
+ * XML Canonicalization c14n *
+ * *
+ ************************************************************************/
+
+static int
+PyxmlNodeSet_Convert(PyObject *py_nodeset, xmlNodeSetPtr *result)
+{
+ xmlNodeSetPtr nodeSet;
+ int is_tuple = 0;
+
+ if (PyTuple_Check(py_nodeset))
+ is_tuple = 1;
+ else if (PyList_Check(py_nodeset))
+ is_tuple = 0;
+ else if (py_nodeset == Py_None) {
+ *result = NULL;
+ return 0;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of nodes.");
+ return -1;
+ }
+
+ nodeSet = (xmlNodeSetPtr) xmlMalloc(sizeof(xmlNodeSet));
+ if (nodeSet == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+
+ nodeSet->nodeNr = 0;
+ nodeSet->nodeMax = (is_tuple
+ ? PyTuple_GET_SIZE(py_nodeset)
+ : PyList_GET_SIZE(py_nodeset));
+ nodeSet->nodeTab
+ = (xmlNodePtr *) xmlMalloc (nodeSet->nodeMax
+ * sizeof(xmlNodePtr));
+ if (nodeSet->nodeTab == NULL) {
+ xmlFree(nodeSet);
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+ memset(nodeSet->nodeTab, 0 ,
+ nodeSet->nodeMax * sizeof(xmlNodePtr));
+
+ {
+ int idx;
+ for (idx=0; idx < nodeSet->nodeMax; ++idx) {
+ xmlNodePtr pynode =
+ PyxmlNode_Get (is_tuple
+ ? PyTuple_GET_ITEM(py_nodeset, idx)
+ : PyList_GET_ITEM(py_nodeset, idx));
+ if (pynode)
+ nodeSet->nodeTab[nodeSet->nodeNr++] = pynode;
+ }
+ }
+ *result = nodeSet;
+ return 0;
+}
+
+static int
+PystringSet_Convert(PyObject *py_strings, xmlChar *** result)
+{
+ /* NOTE: the array should be freed, but the strings are shared
+ with the python strings and so must not be freed. */
+
+ xmlChar ** strings;
+ int is_tuple = 0;
+ int count;
+ int init_index = 0;
+
+ if (PyTuple_Check(py_strings))
+ is_tuple = 1;
+ else if (PyList_Check(py_strings))
+ is_tuple = 0;
+ else if (py_strings == Py_None) {
+ *result = NULL;
+ return 0;
+ }
+ else {
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of strings.");
+ return -1;
+ }
+
+ count = (is_tuple
+ ? PyTuple_GET_SIZE(py_strings)
+ : PyList_GET_SIZE(py_strings));
+
+ strings = (xmlChar **) xmlMalloc(sizeof(xmlChar *) * count);
+
+ if (strings == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "");
+ return -1;
+ }
+
+ memset(strings, 0 , sizeof(xmlChar *) * count);
+
+ {
+ int idx;
+ for (idx=0; idx < count; ++idx) {
+ char* s = PyBytes_AsString
+ (is_tuple
+ ? PyTuple_GET_ITEM(py_strings, idx)
+ : PyList_GET_ITEM(py_strings, idx));
+ if (s)
+ strings[init_index++] = (xmlChar *)s;
+ else {
+ xmlFree(strings);
+ PyErr_SetString(PyExc_TypeError,
+ "must be a tuple or list of strings.");
+ return -1;
+ }
+ }
+ }
+
+ *result = strings;
+ return 0;
+}
+
+static PyObject *
+libxml_C14NDocDumpMemory(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *py_retval = NULL;
+
+ PyObject *pyobj_doc;
+ PyObject *pyobj_nodes;
+ int exclusive;
+ PyObject *pyobj_prefixes;
+ int with_comments;
+
+ xmlDocPtr doc;
+ xmlNodeSetPtr nodes;
+ xmlChar **prefixes = NULL;
+ xmlChar *doc_txt;
+
+ int result;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOiOi:C14NDocDumpMemory",
+ &pyobj_doc,
+ &pyobj_nodes,
+ &exclusive,
+ &pyobj_prefixes,
+ &with_comments))
+ return (NULL);
+
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ if (!doc) {
+ PyErr_SetString(PyExc_TypeError, "bad document.");
+ return NULL;
+ }
+
+ result = PyxmlNodeSet_Convert(pyobj_nodes, &nodes);
+ if (result < 0) return NULL;
+
+ if (exclusive) {
+ result = PystringSet_Convert(pyobj_prefixes, &prefixes);
+ if (result < 0) {
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ return NULL;
+ }
+ }
+
+ result = xmlC14NDocDumpMemory(doc,
+ nodes,
+ exclusive,
+ prefixes,
+ with_comments,
+ &doc_txt);
+
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ if (prefixes) {
+ xmlChar ** idx = prefixes;
+ while (*idx) xmlFree(*(idx++));
+ xmlFree(prefixes);
+ }
+
+ if (result < 0) {
+ PyErr_SetString(PyExc_Exception,
+ "libxml2 xmlC14NDocDumpMemory failure.");
+ return NULL;
+ }
+ else {
+ py_retval = PY_IMPORT_STRING_SIZE((const char *) doc_txt,
+ result);
+ xmlFree(doc_txt);
+ return py_retval;
+ }
+}
+
+static PyObject *
+libxml_C14NDocSaveTo(ATTRIBUTE_UNUSED PyObject * self,
+ PyObject * args)
+{
+ PyObject *pyobj_doc;
+ PyObject *py_file;
+ PyObject *pyobj_nodes;
+ int exclusive;
+ PyObject *pyobj_prefixes;
+ int with_comments;
+
+ xmlDocPtr doc;
+ xmlNodeSetPtr nodes;
+ xmlChar **prefixes = NULL;
+ FILE * output;
+ xmlOutputBufferPtr buf;
+
+ int result;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *) "OOiOiO:C14NDocSaveTo",
+ &pyobj_doc,
+ &pyobj_nodes,
+ &exclusive,
+ &pyobj_prefixes,
+ &with_comments,
+ &py_file))
+ return (NULL);
+
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ if (!doc) {
+ PyErr_SetString(PyExc_TypeError, "bad document.");
+ return NULL;
+ }
+
+ output = PyFile_Get(py_file);
+ if (output == NULL) {
+ PyErr_SetString(PyExc_TypeError, "bad file.");
+ return NULL;
+ }
+ buf = xmlOutputBufferCreateFile(output, NULL);
+
+ result = PyxmlNodeSet_Convert(pyobj_nodes, &nodes);
+ if (result < 0) return NULL;
+
+ if (exclusive) {
+ result = PystringSet_Convert(pyobj_prefixes, &prefixes);
+ if (result < 0) {
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ return NULL;
+ }
+ }
+
+ result = xmlC14NDocSaveTo(doc,
+ nodes,
+ exclusive,
+ prefixes,
+ with_comments,
+ buf);
+
+ if (nodes) {
+ xmlFree(nodes->nodeTab);
+ xmlFree(nodes);
+ }
+ if (prefixes) {
+ xmlChar ** idx = prefixes;
+ while (*idx) xmlFree(*(idx++));
+ xmlFree(prefixes);
+ }
+
+ PyFile_Release(output);
+ len = xmlOutputBufferClose(buf);
+
+ if (result < 0) {
+ PyErr_SetString(PyExc_Exception,
+ "libxml2 xmlC14NDocSaveTo failure.");
+ return NULL;
+ }
+ else
+ return PyLong_FromLong((long) len);
+}
+
+#endif
+#endif
+
+static PyObject *
+libxml_getObjDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *obj;
+ char *str;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:getObjDesc", &obj))
+ return NULL;
+ str = PyCapsule_GetPointer(obj, PyCapsule_GetName(obj));
+ return Py_BuildValue((char *)"s", str);
+}
+
+static PyObject *
+libxml_compareNodesEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *py_node1, *py_node2;
+ xmlNodePtr node1, node2;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:compareNodesEqual",
+ &py_node1, &py_node2))
+ return NULL;
+ /* To compare two node objects, we compare their pointer addresses */
+ node1 = PyxmlNode_Get(py_node1);
+ node2 = PyxmlNode_Get(py_node2);
+ if ( node1 == node2 )
+ return Py_BuildValue((char *)"i", 1);
+ else
+ return Py_BuildValue((char *)"i", 0);
+
+}
+
+static PyObject *
+libxml_nodeHash(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+
+ PyObject *py_node1;
+ xmlNodePtr node1;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:nodeHash", &py_node1))
+ return NULL;
+ /* For simplicity, we use the node pointer address as a hash value */
+ node1 = PyxmlNode_Get(py_node1);
+
+ return PyLong_FromVoidPtr(node1);
+
+}
+
+/************************************************************************
+ * *
+ * The registration stuff *
+ * *
+ ************************************************************************/
+static PyMethodDef libxmlMethods[] = {
+#include "libxml2-export.c"
+ {(char *) "name", libxml_name, METH_VARARGS, NULL},
+ {(char *) "children", libxml_children, METH_VARARGS, NULL},
+ {(char *) "properties", libxml_properties, METH_VARARGS, NULL},
+ {(char *) "last", libxml_last, METH_VARARGS, NULL},
+ {(char *) "prev", libxml_prev, METH_VARARGS, NULL},
+ {(char *) "next", libxml_next, METH_VARARGS, NULL},
+ {(char *) "parent", libxml_parent, METH_VARARGS, NULL},
+ {(char *) "type", libxml_type, METH_VARARGS, NULL},
+ {(char *) "doc", libxml_doc, METH_VARARGS, NULL},
+ {(char *) "xmlNewNode", libxml_xmlNewNode, METH_VARARGS, NULL},
+ {(char *) "xmlNodeRemoveNsDef", libxml_xmlNodeRemoveNsDef, METH_VARARGS, NULL},
+ {(char *)"xmlSetValidErrors", libxml_xmlSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlFreeValidCtxt", libxml_xmlFreeValidCtxt, METH_VARARGS, NULL},
+#ifdef LIBXML_OUTPUT_ENABLED
+ {(char *) "serializeNode", libxml_serializeNode, METH_VARARGS, NULL},
+ {(char *) "saveNodeTo", libxml_saveNodeTo, METH_VARARGS, NULL},
+ {(char *) "outputBufferCreate", libxml_xmlCreateOutputBuffer, METH_VARARGS, NULL},
+ {(char *) "outputBufferGetPythonFile", libxml_outputBufferGetPythonFile, METH_VARARGS, NULL},
+ {(char *) "xmlOutputBufferClose", libxml_xmlOutputBufferClose, METH_VARARGS, NULL},
+ { (char *)"xmlOutputBufferFlush", libxml_xmlOutputBufferFlush, METH_VARARGS, NULL },
+ { (char *)"xmlSaveFileTo", libxml_xmlSaveFileTo, METH_VARARGS, NULL },
+ { (char *)"xmlSaveFormatFileTo", libxml_xmlSaveFormatFileTo, METH_VARARGS, NULL },
+#endif /* LIBXML_OUTPUT_ENABLED */
+ {(char *) "inputBufferCreate", libxml_xmlCreateInputBuffer, METH_VARARGS, NULL},
+ {(char *) "setEntityLoader", libxml_xmlSetEntityLoader, METH_VARARGS, NULL},
+ {(char *)"xmlRegisterErrorHandler", libxml_xmlRegisterErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlParserCtxtSetErrorHandler", libxml_xmlParserCtxtSetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlParserCtxtGetErrorHandler", libxml_xmlParserCtxtGetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlFreeParserCtxt", libxml_xmlFreeParserCtxt, METH_VARARGS, NULL },
+#ifdef LIBXML_READER_ENABLED
+ {(char *)"xmlTextReaderSetErrorHandler", libxml_xmlTextReaderSetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlTextReaderGetErrorHandler", libxml_xmlTextReaderGetErrorHandler, METH_VARARGS, NULL },
+ {(char *)"xmlFreeTextReader", libxml_xmlFreeTextReader, METH_VARARGS, NULL },
+#endif
+ {(char *)"addLocalCatalog", libxml_addLocalCatalog, METH_VARARGS, NULL },
+#ifdef LIBXML_SCHEMAS_ENABLED
+ {(char *)"xmlRelaxNGSetValidErrors", libxml_xmlRelaxNGSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlRelaxNGFreeValidCtxt", libxml_xmlRelaxNGFreeValidCtxt, METH_VARARGS, NULL},
+ {(char *)"xmlSchemaSetValidErrors", libxml_xmlSchemaSetValidErrors, METH_VARARGS, NULL},
+ {(char *)"xmlSchemaFreeValidCtxt", libxml_xmlSchemaFreeValidCtxt, METH_VARARGS, NULL},
+#endif
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+ {(char *)"xmlC14NDocDumpMemory", libxml_C14NDocDumpMemory, METH_VARARGS, NULL},
+ {(char *)"xmlC14NDocSaveTo", libxml_C14NDocSaveTo, METH_VARARGS, NULL},
+#endif
+#endif
+ {(char *) "getObjDesc", libxml_getObjDesc, METH_VARARGS, NULL},
+ {(char *) "compareNodesEqual", libxml_compareNodesEqual, METH_VARARGS, NULL},
+ {(char *) "nodeHash", libxml_nodeHash, METH_VARARGS, NULL},
+ {(char *) "xmlRegisterInputCallback", libxml_xmlRegisterInputCallback, METH_VARARGS, NULL},
+ {(char *) "xmlUnregisterInputCallback", libxml_xmlUnregisterInputCallback, METH_VARARGS, NULL},
+ {NULL, NULL, 0, NULL}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#define INITERROR return NULL
+
+static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "libxml2mod",
+ NULL,
+ -1,
+ libxmlMethods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+#else
+#define INITERROR return
+
+#ifdef MERGED_MODULES
+extern void initlibxsltmod(void);
+#endif
+
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+PyObject *PyInit_libxml2mod(void)
+#else
+void initlibxml2mod(void)
+#endif
+{
+ PyObject *module;
+
+#if PY_MAJOR_VERSION >= 3
+ module = PyModule_Create(&moduledef);
+#else
+ /* intialize the python extension module */
+ module = Py_InitModule((char *) "libxml2mod", libxmlMethods);
+#endif
+ if (module == NULL)
+ INITERROR;
+
+ /* initialize libxml2 */
+ xmlInitParser();
+ /* TODO this probably need to be revamped for Python3 */
+ libxml_xmlErrorInitialize();
+
+#if PY_MAJOR_VERSION < 3
+#ifdef MERGED_MODULES
+ initlibxsltmod();
+#endif
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+ return module;
+#endif
+}
diff --git a/python/libxml.py b/python/libxml.py
new file mode 100644
index 0000000..2466cc9
--- /dev/null
+++ b/python/libxml.py
@@ -0,0 +1,788 @@
+import libxml2mod
+import types
+import sys
+
+# The root of all libxml2 errors.
+class libxmlError(Exception): pass
+
+# Type of the wrapper class for the C objects wrappers
+def checkWrapper(obj):
+ try:
+ n = type(_obj).__name__
+ if n != 'PyCObject' and n != 'PyCapsule':
+ return 1
+ except:
+ return 0
+ return 0
+
+#
+# id() is sometimes negative ...
+#
+def pos_id(o):
+ i = id(o)
+ if (i < 0):
+ return (sys.maxsize - i)
+ return i
+
+#
+# Errors raised by the wrappers when some tree handling failed.
+#
+class treeError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class parserError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class uriError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class xpathError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class ioWrapper:
+ def __init__(self, _obj):
+ self.__io = _obj
+ self._o = None
+
+ def io_close(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.close()
+ self.__io = None
+ return(0)
+
+ def io_flush(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.flush()
+ return(0)
+
+ def io_read(self, len = -1):
+ if self.__io == None:
+ return(-1)
+ try:
+ if len < 0:
+ ret = self.__io.read()
+ else:
+ ret = self.__io.read(len)
+ except Exception:
+ import sys
+ e = sys.exc_info()[1]
+ print("failed to read from Python:", type(e))
+ print("on IO:", self.__io)
+ self.__io == None
+ return(-1)
+
+ return(ret)
+
+ def io_write(self, str, len = -1):
+ if self.__io == None:
+ return(-1)
+ if len < 0:
+ return(self.__io.write(str))
+ return(self.__io.write(str, len))
+
+class ioReadWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+ ioWrapper.__init__(self, _obj)
+ self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
+
+ def __del__(self):
+ print("__del__")
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+class ioWriteWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+# print "ioWriteWrapper.__init__", _obj
+ if type(_obj) == type(''):
+ print("write io from a string")
+ self.o = None
+ elif type(_obj).__name__ == 'PyCapsule':
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+# elif type(_obj) == types.InstanceType:
+# print(("write io from instance of %s" % (_obj.__class__)))
+# ioWrapper.__init__(self, _obj)
+# self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
+ else:
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+
+ def __del__(self):
+# print "__del__"
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def flush(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+#
+# Example of a class to handle SAX events
+#
+class SAXCallback:
+ """Base class for SAX handlers"""
+ def startDocument(self):
+ """called at the start of the document"""
+ pass
+
+ def endDocument(self):
+ """called at the end of the document"""
+ pass
+
+ def startElement(self, tag, attrs):
+ """called at the start of every element, tag is the name of
+ the element, attrs is a dictionary of the element's attributes"""
+ pass
+
+ def endElement(self, tag):
+ """called at the start of every element, tag is the name of
+ the element"""
+ pass
+
+ def characters(self, data):
+ """called when character data have been read, data is the string
+ containing the data, multiple consecutive characters() callback
+ are possible."""
+ pass
+
+ def cdataBlock(self, data):
+ """called when CDATA section have been read, data is the string
+ containing the data, multiple consecutive cdataBlock() callback
+ are possible."""
+ pass
+
+ def reference(self, name):
+ """called when an entity reference has been found"""
+ pass
+
+ def ignorableWhitespace(self, data):
+ """called when potentially ignorable white spaces have been found"""
+ pass
+
+ def processingInstruction(self, target, data):
+ """called when a PI has been found, target contains the PI name and
+ data is the associated data in the PI"""
+ pass
+
+ def comment(self, content):
+ """called when a comment has been found, content contains the comment"""
+ pass
+
+ def externalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTd if available"""
+ pass
+
+ def internalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTD if available"""
+ pass
+
+ def entityDecl(self, name, type, externalID, systemID, content):
+ """called when an ENTITY declaration has been found, name is the
+ entity name and externalID, systemID are the entity public and
+ system identifier for that entity if available, type indicates
+ the entity type, and content reports it's string content"""
+ pass
+
+ def notationDecl(self, name, externalID, systemID):
+ """called when an NOTATION declaration has been found, name is the
+ notation name and externalID, systemID are the notation public and
+ system identifier for that notation if available"""
+ pass
+
+ def attributeDecl(self, elem, name, type, defi, defaultValue, nameList):
+ """called when an ATTRIBUTE definition has been found"""
+ pass
+
+ def elementDecl(self, name, type, content):
+ """called when an ELEMENT definition has been found"""
+ pass
+
+ def entityDecl(self, name, publicId, systemID, notationName):
+ """called when an unparsed ENTITY declaration has been found,
+ name is the entity name and publicId,, systemID are the entity
+ public and system identifier for that entity if available,
+ and notationName indicate the associated NOTATION"""
+ pass
+
+ def warning(self, msg):
+ #print msg
+ pass
+
+ def error(self, msg):
+ raise parserError(msg)
+
+ def fatalError(self, msg):
+ raise parserError(msg)
+
+#
+# This class is the ancestor of all the Node classes. It provides
+# the basic functionalities shared by all nodes (and handle
+# gracefylly the exception), like name, navigation in the tree,
+# doc reference, content access and serializing to a string or URI
+#
+class xmlCore:
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __eq__(self, other):
+ if other == None:
+ return False
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ if ret == None:
+ return False
+ return ret == True
+ def __ne__(self, other):
+ if other == None:
+ return True
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ return not ret
+ def __hash__(self):
+ ret = libxml2mod.nodeHash(self._o)
+ return ret
+
+ def __str__(self):
+ return self.serialize()
+ def get_parent(self):
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_children(self):
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_last(self):
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_next(self):
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_properties(self):
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ def get_prev(self):
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_content(self):
+ return libxml2mod.xmlNodeGetContent(self._o)
+ getContent = get_content # why is this duplicate naming needed ?
+ def get_name(self):
+ return libxml2mod.name(self._o)
+ def get_type(self):
+ return libxml2mod.type(self._o)
+ def get_doc(self):
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type in ["document_xml", "document_html"]:
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ #
+ # Those are common attributes to nearly all type of nodes
+ # defined as python2 properties
+ #
+ import sys
+ if float(sys.version[0:3]) < 2.2:
+ def __getattr__(self, attr):
+ if attr == "parent":
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "properties":
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ elif attr == "children":
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "last":
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "next":
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "prev":
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "content":
+ return libxml2mod.xmlNodeGetContent(self._o)
+ elif attr == "name":
+ return libxml2mod.name(self._o)
+ elif attr == "type":
+ return libxml2mod.type(self._o)
+ elif attr == "doc":
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type == "document_xml" or self.type == "document_html":
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ raise AttributeError(attr)
+ else:
+ parent = property(get_parent, None, None, "Parent node")
+ children = property(get_children, None, None, "First child node")
+ last = property(get_last, None, None, "Last sibling node")
+ next = property(get_next, None, None, "Next sibling node")
+ prev = property(get_prev, None, None, "Previous sibling node")
+ properties = property(get_properties, None, None, "List of properies")
+ content = property(get_content, None, None, "Content of this node")
+ name = property(get_name, None, None, "Node name")
+ type = property(get_type, None, None, "Node type")
+ doc = property(get_doc, None, None, "The document this node belongs to")
+
+ #
+ # Serialization routines, the optional arguments have the following
+ # meaning:
+ # encoding: string to ask saving in a specific encoding
+ # indent: if 1 the serializer is asked to indent the output
+ #
+ def serialize(self, encoding = None, format = 0):
+ return libxml2mod.serializeNode(self._o, encoding, format)
+ def saveTo(self, file, encoding = None, format = 0):
+ return libxml2mod.saveNodeTo(self._o, file, encoding, format)
+
+ #
+ # Canonicalization routines:
+ #
+ # nodes: the node set (tuple or list) to be included in the
+ # canonized image or None if all document nodes should be
+ # included.
+ # exclusive: the exclusive flag (0 - non-exclusive
+ # canonicalization; otherwise - exclusive canonicalization)
+ # prefixes: the list of inclusive namespace prefixes (strings),
+ # or None if there is no inclusive namespaces (only for
+ # exclusive canonicalization, ignored otherwise)
+ # with_comments: include comments in the result (!=0) or not
+ # (==0)
+ def c14nMemory(self,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocDumpMemory(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0)
+ def c14nSaveTo(self,
+ file,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocSaveTo(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0,
+ file)
+
+ #
+ # Selecting nodes using XPath, a bit slow because the context
+ # is allocated/freed every time but convenient.
+ #
+ def xpathEval(self, expr):
+ doc = self.doc
+ if doc == None:
+ return None
+ ctxt = doc.xpathNewContext()
+ ctxt.setContextNode(self)
+ res = ctxt.xpathEval(expr)
+ ctxt.xpathFreeContext()
+ return res
+
+# #
+# # Selecting nodes using XPath, faster because the context
+# # is allocated just once per xmlDoc.
+# #
+# # Removed: DV memleaks c.f. #126735
+# #
+# def xpathEval2(self, expr):
+# doc = self.doc
+# if doc == None:
+# return None
+# try:
+# doc._ctxt.setContextNode(self)
+# except:
+# doc._ctxt = doc.xpathNewContext()
+# doc._ctxt.setContextNode(self)
+# res = doc._ctxt.xpathEval(expr)
+# return res
+ def xpathEval2(self, expr):
+ return self.xpathEval(expr)
+
+ # Remove namespaces
+ def removeNsDef(self, href):
+ """
+ Remove a namespace definition from a node. If href is None,
+ remove all of the ns definitions on that node. The removed
+ namespaces are returned as a linked list.
+
+ Note: If any child nodes referred to the removed namespaces,
+ they will be left with dangling links. You should call
+ renconciliateNs() to fix those pointers.
+
+ Note: This method does not free memory taken by the ns
+ definitions. You will need to free it manually with the
+ freeNsList() method on the returns xmlNs object.
+ """
+
+ ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ # support for python2 iterators
+ def walk_depth_first(self):
+ return xmlCoreDepthFirstItertor(self)
+ def walk_breadth_first(self):
+ return xmlCoreBreadthFirstItertor(self)
+ __iter__ = walk_depth_first
+
+ def free(self):
+ try:
+ self.doc._ctxt.xpathFreeContext()
+ except:
+ pass
+ libxml2mod.xmlFreeDoc(self._o)
+
+
+#
+# implements the depth-first iterator for libxml2 DOM tree
+#
+class xmlCoreDepthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.children
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.next
+ next = __next__
+
+#
+# implements the breadth-first iterator for libxml2 DOM tree
+#
+class xmlCoreBreadthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.next
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.children
+ next = __next__
+
+#
+# converters to present a nicer view of the XPath returns
+#
+def nodeWrap(o):
+ # TODO try to cast to the most appropriate node class
+ name = libxml2mod.type(o)
+ if name == "element" or name == "text":
+ return xmlNode(_obj=o)
+ if name == "attribute":
+ return xmlAttr(_obj=o)
+ if name[0:8] == "document":
+ return xmlDoc(_obj=o)
+ if name == "namespace":
+ return xmlNs(_obj=o)
+ if name == "elem_decl":
+ return xmlElement(_obj=o)
+ if name == "attribute_decl":
+ return xmlAttribute(_obj=o)
+ if name == "entity_decl":
+ return xmlEntity(_obj=o)
+ if name == "dtd":
+ return xmlDtd(_obj=o)
+ return xmlNode(_obj=o)
+
+def xpathObjectRet(o):
+ otype = type(o)
+ if otype == type([]):
+ ret = list(map(xpathObjectRet, o))
+ return ret
+ elif otype == type(()):
+ ret = list(map(xpathObjectRet, o))
+ return tuple(ret)
+ elif otype == type('') or otype == type(0) or otype == type(0.0):
+ return o
+ else:
+ return nodeWrap(o)
+
+#
+# register an XPath function
+#
+def registerXPathFunction(ctxt, name, ns_uri, f):
+ ret = libxml2mod.xmlRegisterXPathFunction(ctxt, name, ns_uri, f)
+
+#
+# For the xmlTextReader parser configuration
+#
+PARSER_LOADDTD=1
+PARSER_DEFAULTATTRS=2
+PARSER_VALIDATE=3
+PARSER_SUBST_ENTITIES=4
+
+#
+# For the error callback severities
+#
+PARSER_SEVERITY_VALIDITY_WARNING=1
+PARSER_SEVERITY_VALIDITY_ERROR=2
+PARSER_SEVERITY_WARNING=3
+PARSER_SEVERITY_ERROR=4
+
+#
+# register the libxml2 error handler
+#
+def registerErrorHandler(f, ctx):
+ """Register a Python written function to for error reporting.
+ The function is called back as f(ctx, error). """
+ import sys
+ if 'libxslt' not in sys.modules:
+ # normal behaviour when libxslt is not imported
+ ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
+ else:
+ # when libxslt is already imported, one must
+ # use libxst's error handler instead
+ import libxslt
+ ret = libxslt.registerErrorHandler(f,ctx)
+ return ret
+
+class parserCtxtCore:
+
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ def setErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,reserved).
+
+ @reserved is currently always None."""
+ libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
+
+ def getErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ return libxml2mod.xmlParserCtxtGetErrorHandler(self._o)
+
+ def addLocalCatalog(self, uri):
+ """Register a local catalog with the parser"""
+ return libxml2mod.addLocalCatalog(self._o, uri)
+
+
+class ValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for DTD validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class SchemaValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for Schema validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class relaxNgValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for RelaxNG validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
+ """Intermediate callback to wrap the locator"""
+ (f,arg) = xxx_todo_changeme
+ return f(arg,msg,severity,xmlTextReaderLocator(locator))
+
+class xmlTextReaderCore:
+
+ def __init__(self, _obj=None):
+ self.input = None
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ def SetErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,locator)."""
+ if f is None:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,None,None)
+ else:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,_xmlTextReaderErrorFunc,(f,arg))
+
+ def GetErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
+ if f is None:
+ return None,None
+ else:
+ # assert f is _xmlTextReaderErrorFunc
+ return arg
+
+#
+# The cleanup now goes though a wrapper in libxml.c
+#
+def cleanupParser():
+ libxml2mod.xmlPythonCleanupParser()
+
+#
+# The interface to xmlRegisterInputCallbacks.
+# Since this API does not allow to pass a data object along with
+# match/open callbacks, it is necessary to maintain a list of all
+# Python callbacks.
+#
+__input_callbacks = []
+def registerInputCallback(func):
+ def findOpenCallback(URI):
+ for cb in reversed(__input_callbacks):
+ o = cb(URI)
+ if o is not None:
+ return o
+ libxml2mod.xmlRegisterInputCallback(findOpenCallback)
+ __input_callbacks.append(func)
+
+def popInputCallbacks():
+ # First pop python-level callbacks, when no more available - start
+ # popping built-in ones.
+ if len(__input_callbacks) > 0:
+ __input_callbacks.pop()
+ if len(__input_callbacks) == 0:
+ libxml2mod.xmlUnregisterInputCallback()
+
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# Everything before this line comes from libxml.py
+# Everything after this line is automatically generated
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
diff --git a/python/libxml2-export.c b/python/libxml2-export.c
new file mode 100644
index 0000000..84073ea
--- /dev/null
+++ b/python/libxml2-export.c
@@ -0,0 +1,2063 @@
+/* Generated */
+
+#if defined(LIBXML_DOCB_ENABLED)
+ { (char *)"docbDefaultSAXHandlerInit", libxml_docbDefaultSAXHandlerInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlAutoCloseTag", libxml_htmlAutoCloseTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreateFileParserCtxt", libxml_htmlCreateFileParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreateMemoryParserCtxt", libxml_htmlCreateMemoryParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCreatePushParser", libxml_htmlCreatePushParser, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadDoc", libxml_htmlCtxtReadDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadFd", libxml_htmlCtxtReadFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadFile", libxml_htmlCtxtReadFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReadMemory", libxml_htmlCtxtReadMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtReset", libxml_htmlCtxtReset, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlCtxtUseOptions", libxml_htmlCtxtUseOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlDefaultSAXHandlerInit", libxml_htmlDefaultSAXHandlerInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocContentDumpFormatOutput", libxml_htmlDocContentDumpFormatOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocContentDumpOutput", libxml_htmlDocContentDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlDocDump", libxml_htmlDocDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlFreeParserCtxt", libxml_htmlFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlGetMetaEncoding", libxml_htmlGetMetaEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlHandleOmittedElem", libxml_htmlHandleOmittedElem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlInitAutoClose", libxml_htmlInitAutoClose, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsAutoClosed", libxml_htmlIsAutoClosed, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsBooleanAttr", libxml_htmlIsBooleanAttr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlIsScriptAttribute", libxml_htmlIsScriptAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewDoc", libxml_htmlNewDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewDocNoDtD", libxml_htmlNewDocNoDtD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlNewParserCtxt", libxml_htmlNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFile", libxml_htmlNodeDumpFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFileFormat", libxml_htmlNodeDumpFileFormat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpFormatOutput", libxml_htmlNodeDumpFormatOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlNodeDumpOutput", libxml_htmlNodeDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseCharRef", libxml_htmlParseCharRef, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+ { (char *)"htmlParseChunk", libxml_htmlParseChunk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseDoc", libxml_htmlParseDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseDocument", libxml_htmlParseDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseElement", libxml_htmlParseElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlParseFile", libxml_htmlParseFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadDoc", libxml_htmlReadDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadFd", libxml_htmlReadFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadFile", libxml_htmlReadFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlReadMemory", libxml_htmlReadMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlSAXParseFile", libxml_htmlSAXParseFile, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFile", libxml_htmlSaveFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFileEnc", libxml_htmlSaveFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"htmlSaveFileFormat", libxml_htmlSaveFileFormat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+ { (char *)"htmlSetMetaEncoding", libxml_htmlSetMetaEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTML_ENABLED) */
+ { (char *)"namePop", libxml_namePop, METH_VARARGS, NULL },
+ { (char *)"namePush", libxml_namePush, METH_VARARGS, NULL },
+ { (char *)"nodePop", libxml_nodePop, METH_VARARGS, NULL },
+ { (char *)"nodePush", libxml_nodePush, METH_VARARGS, NULL },
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"valuePop", libxml_valuePop, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogAdd", libxml_xmlACatalogAdd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlACatalogDump", libxml_xmlACatalogDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogRemove", libxml_xmlACatalogRemove, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolve", libxml_xmlACatalogResolve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolvePublic", libxml_xmlACatalogResolvePublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolveSystem", libxml_xmlACatalogResolveSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlACatalogResolveURI", libxml_xmlACatalogResolveURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlAddChild", libxml_xmlAddChild, METH_VARARGS, NULL },
+ { (char *)"xmlAddChildList", libxml_xmlAddChildList, METH_VARARGS, NULL },
+ { (char *)"xmlAddDocEntity", libxml_xmlAddDocEntity, METH_VARARGS, NULL },
+ { (char *)"xmlAddDtdEntity", libxml_xmlAddDtdEntity, METH_VARARGS, NULL },
+ { (char *)"xmlAddEncodingAlias", libxml_xmlAddEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlAddNextSibling", libxml_xmlAddNextSibling, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlAddPrevSibling", libxml_xmlAddPrevSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+ { (char *)"xmlAddSibling", libxml_xmlAddSibling, METH_VARARGS, NULL },
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlBoolToText", libxml_xmlBoolToText, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlBuildQName", libxml_xmlBuildQName, METH_VARARGS, NULL },
+ { (char *)"xmlBuildRelativeURI", libxml_xmlBuildRelativeURI, METH_VARARGS, NULL },
+ { (char *)"xmlBuildURI", libxml_xmlBuildURI, METH_VARARGS, NULL },
+ { (char *)"xmlByteConsumed", libxml_xmlByteConsumed, METH_VARARGS, NULL },
+ { (char *)"xmlCanonicPath", libxml_xmlCanonicPath, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogAdd", libxml_xmlCatalogAdd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogCleanup", libxml_xmlCatalogCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogConvert", libxml_xmlCatalogConvert, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlCatalogDump", libxml_xmlCatalogDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogGetPublic", libxml_xmlCatalogGetPublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogGetSystem", libxml_xmlCatalogGetSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogIsEmpty", libxml_xmlCatalogIsEmpty, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogRemove", libxml_xmlCatalogRemove, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolve", libxml_xmlCatalogResolve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolvePublic", libxml_xmlCatalogResolvePublic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolveSystem", libxml_xmlCatalogResolveSystem, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogResolveURI", libxml_xmlCatalogResolveURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlCatalogSetDebug", libxml_xmlCatalogSetDebug, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlCharStrdup", libxml_xmlCharStrdup, METH_VARARGS, NULL },
+ { (char *)"xmlCharStrndup", libxml_xmlCharStrndup, METH_VARARGS, NULL },
+ { (char *)"xmlCheckFilename", libxml_xmlCheckFilename, METH_VARARGS, NULL },
+ { (char *)"xmlCheckLanguageID", libxml_xmlCheckLanguageID, METH_VARARGS, NULL },
+ { (char *)"xmlCheckUTF8", libxml_xmlCheckUTF8, METH_VARARGS, NULL },
+ { (char *)"xmlCheckVersion", libxml_xmlCheckVersion, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupCharEncodingHandlers", libxml_xmlCleanupCharEncodingHandlers, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupEncodingAliases", libxml_xmlCleanupEncodingAliases, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupGlobals", libxml_xmlCleanupGlobals, METH_VARARGS, NULL },
+ { (char *)"xmlCleanupInputCallbacks", libxml_xmlCleanupInputCallbacks, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlCleanupOutputCallbacks", libxml_xmlCleanupOutputCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlCleanupPredefinedEntities", libxml_xmlCleanupPredefinedEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlClearParserCtxt", libxml_xmlClearParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlConvertSGMLCatalog", libxml_xmlConvertSGMLCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlCopyChar", libxml_xmlCopyChar, METH_VARARGS, NULL },
+ { (char *)"xmlCopyCharMultiByte", libxml_xmlCopyCharMultiByte, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlCopyDoc", libxml_xmlCopyDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlCopyDtd", libxml_xmlCopyDtd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlCopyError", libxml_xmlCopyError, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNamespace", libxml_xmlCopyNamespace, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNamespaceList", libxml_xmlCopyNamespaceList, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNode", libxml_xmlCopyNode, METH_VARARGS, NULL },
+ { (char *)"xmlCopyNodeList", libxml_xmlCopyNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlCopyProp", libxml_xmlCopyProp, METH_VARARGS, NULL },
+ { (char *)"xmlCopyPropList", libxml_xmlCopyPropList, METH_VARARGS, NULL },
+ { (char *)"xmlCreateDocParserCtxt", libxml_xmlCreateDocParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateEntityParserCtxt", libxml_xmlCreateEntityParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateFileParserCtxt", libxml_xmlCreateFileParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateInputBuffer", libxml_xmlCreateInputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlCreateIntSubset", libxml_xmlCreateIntSubset, METH_VARARGS, NULL },
+ { (char *)"xmlCreateMemoryParserCtxt", libxml_xmlCreateMemoryParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCreateOutputBuffer", libxml_xmlCreateOutputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlCreatePushParser", libxml_xmlCreatePushParser, METH_VARARGS, NULL },
+ { (char *)"xmlCreateURI", libxml_xmlCreateURI, METH_VARARGS, NULL },
+ { (char *)"xmlCreateURLParserCtxt", libxml_xmlCreateURLParserCtxt, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadDoc", libxml_xmlCtxtReadDoc, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadFd", libxml_xmlCtxtReadFd, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadFile", libxml_xmlCtxtReadFile, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReadMemory", libxml_xmlCtxtReadMemory, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtReset", libxml_xmlCtxtReset, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtResetPush", libxml_xmlCtxtResetPush, METH_VARARGS, NULL },
+ { (char *)"xmlCtxtUseOptions", libxml_xmlCtxtUseOptions, METH_VARARGS, NULL },
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugCheckDocument", libxml_xmlDebugCheckDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpAttr", libxml_xmlDebugDumpAttr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpAttrList", libxml_xmlDebugDumpAttrList, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDTD", libxml_xmlDebugDumpDTD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDocument", libxml_xmlDebugDumpDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpDocumentHead", libxml_xmlDebugDumpDocumentHead, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpEntities", libxml_xmlDebugDumpEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpNode", libxml_xmlDebugDumpNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpNodeList", libxml_xmlDebugDumpNodeList, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpOneNode", libxml_xmlDebugDumpOneNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlDebugDumpString", libxml_xmlDebugDumpString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlDebugMemory", libxml_xmlDebugMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlDecodeEntities", libxml_xmlDecodeEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlDefaultSAXHandlerInit", libxml_xmlDefaultSAXHandlerInit, METH_VARARGS, NULL },
+ { (char *)"xmlDelEncodingAlias", libxml_xmlDelEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlDictCleanup", libxml_xmlDictCleanup, METH_VARARGS, NULL },
+ { (char *)"xmlDocCopyNode", libxml_xmlDocCopyNode, METH_VARARGS, NULL },
+ { (char *)"xmlDocCopyNodeList", libxml_xmlDocCopyNodeList, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlDocDump", libxml_xmlDocDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlDocFormatDump", libxml_xmlDocFormatDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlDocGetRootElement", libxml_xmlDocGetRootElement, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlDocSetRootElement", libxml_xmlDocSetRootElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+ { (char *)"xmlDumpMemory", libxml_xmlDumpMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlElemDump", libxml_xmlElemDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlEncodeEntities", libxml_xmlEncodeEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlEncodeEntitiesReentrant", libxml_xmlEncodeEntitiesReentrant, METH_VARARGS, NULL },
+ { (char *)"xmlEncodeSpecialChars", libxml_xmlEncodeSpecialChars, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetCode", libxml_xmlErrorGetCode, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetDomain", libxml_xmlErrorGetDomain, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetFile", libxml_xmlErrorGetFile, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetLevel", libxml_xmlErrorGetLevel, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetLine", libxml_xmlErrorGetLine, METH_VARARGS, NULL },
+ { (char *)"xmlErrorGetMessage", libxml_xmlErrorGetMessage, METH_VARARGS, NULL },
+ { (char *)"xmlFileMatch", libxml_xmlFileMatch, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlFirstElementChild", libxml_xmlFirstElementChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlFreeCatalog", libxml_xmlFreeCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlFreeDoc", libxml_xmlFreeDoc, METH_VARARGS, NULL },
+ { (char *)"xmlFreeDtd", libxml_xmlFreeDtd, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNode", libxml_xmlFreeNode, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNodeList", libxml_xmlFreeNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNs", libxml_xmlFreeNs, METH_VARARGS, NULL },
+ { (char *)"xmlFreeNsList", libxml_xmlFreeNsList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeParserInputBuffer", libxml_xmlFreeParserInputBuffer, METH_VARARGS, NULL },
+ { (char *)"xmlFreeProp", libxml_xmlFreeProp, METH_VARARGS, NULL },
+ { (char *)"xmlFreePropList", libxml_xmlFreePropList, METH_VARARGS, NULL },
+ { (char *)"xmlFreeURI", libxml_xmlFreeURI, METH_VARARGS, NULL },
+ { (char *)"xmlGetCompressMode", libxml_xmlGetCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlGetDocCompressMode", libxml_xmlGetDocCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlGetDocEntity", libxml_xmlGetDocEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdAttrDesc", libxml_xmlGetDtdAttrDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdElementDesc", libxml_xmlGetDtdElementDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdEntity", libxml_xmlGetDtdEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdQAttrDesc", libxml_xmlGetDtdQAttrDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetDtdQElementDesc", libxml_xmlGetDtdQElementDesc, METH_VARARGS, NULL },
+ { (char *)"xmlGetEncodingAlias", libxml_xmlGetEncodingAlias, METH_VARARGS, NULL },
+ { (char *)"xmlGetID", libxml_xmlGetID, METH_VARARGS, NULL },
+ { (char *)"xmlGetIntSubset", libxml_xmlGetIntSubset, METH_VARARGS, NULL },
+ { (char *)"xmlGetLastChild", libxml_xmlGetLastChild, METH_VARARGS, NULL },
+ { (char *)"xmlGetLastError", libxml_xmlGetLastError, METH_VARARGS, NULL },
+ { (char *)"xmlGetLineNo", libxml_xmlGetLineNo, METH_VARARGS, NULL },
+ { (char *)"xmlGetNoNsProp", libxml_xmlGetNoNsProp, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlGetNodePath", libxml_xmlGetNodePath, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlGetNsProp", libxml_xmlGetNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlGetParameterEntity", libxml_xmlGetParameterEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetPredefinedEntity", libxml_xmlGetPredefinedEntity, METH_VARARGS, NULL },
+ { (char *)"xmlGetProp", libxml_xmlGetProp, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlHandleEntity", libxml_xmlHandleEntity, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlHasNsProp", libxml_xmlHasNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlHasProp", libxml_xmlHasProp, METH_VARARGS, NULL },
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlIOFTPMatch", libxml_xmlIOFTPMatch, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlIOHTTPMatch", libxml_xmlIOHTTPMatch, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+ { (char *)"xmlInitCharEncodingHandlers", libxml_xmlInitCharEncodingHandlers, METH_VARARGS, NULL },
+ { (char *)"xmlInitGlobals", libxml_xmlInitGlobals, METH_VARARGS, NULL },
+ { (char *)"xmlInitParser", libxml_xmlInitParser, METH_VARARGS, NULL },
+ { (char *)"xmlInitParserCtxt", libxml_xmlInitParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlInitializeCatalog", libxml_xmlInitializeCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlInitializeDict", libxml_xmlInitializeDict, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlInitializePredefinedEntities", libxml_xmlInitializePredefinedEntities, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlIsBaseChar", libxml_xmlIsBaseChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsBlank", libxml_xmlIsBlank, METH_VARARGS, NULL },
+ { (char *)"xmlIsBlankNode", libxml_xmlIsBlankNode, METH_VARARGS, NULL },
+ { (char *)"xmlIsChar", libxml_xmlIsChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsCombining", libxml_xmlIsCombining, METH_VARARGS, NULL },
+ { (char *)"xmlIsDigit", libxml_xmlIsDigit, METH_VARARGS, NULL },
+ { (char *)"xmlIsExtender", libxml_xmlIsExtender, METH_VARARGS, NULL },
+ { (char *)"xmlIsID", libxml_xmlIsID, METH_VARARGS, NULL },
+ { (char *)"xmlIsIdeographic", libxml_xmlIsIdeographic, METH_VARARGS, NULL },
+ { (char *)"xmlIsLetter", libxml_xmlIsLetter, METH_VARARGS, NULL },
+ { (char *)"xmlIsMixedElement", libxml_xmlIsMixedElement, METH_VARARGS, NULL },
+ { (char *)"xmlIsPubidChar", libxml_xmlIsPubidChar, METH_VARARGS, NULL },
+ { (char *)"xmlIsRef", libxml_xmlIsRef, METH_VARARGS, NULL },
+ { (char *)"xmlIsXHTML", libxml_xmlIsXHTML, METH_VARARGS, NULL },
+ { (char *)"xmlKeepBlanksDefault", libxml_xmlKeepBlanksDefault, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlLastElementChild", libxml_xmlLastElementChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlLineNumbersDefault", libxml_xmlLineNumbersDefault, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadACatalog", libxml_xmlLoadACatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadCatalog", libxml_xmlLoadCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadCatalogs", libxml_xmlLoadCatalogs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlLoadSGMLSuperCatalog", libxml_xmlLoadSGMLSuperCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlLsCountNode", libxml_xmlLsCountNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+ { (char *)"xmlLsOneNode", libxml_xmlLsOneNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+ { (char *)"xmlMemoryUsed", libxml_xmlMemoryUsed, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNamespaceParseNCName", libxml_xmlNamespaceParseNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNamespaceParseNSDef", libxml_xmlNamespaceParseNSDef, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPCleanup", libxml_xmlNanoFTPCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPInit", libxml_xmlNanoFTPInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPProxy", libxml_xmlNanoFTPProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+ { (char *)"xmlNanoFTPScanProxy", libxml_xmlNanoFTPScanProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPCleanup", libxml_xmlNanoHTTPCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPInit", libxml_xmlNanoHTTPInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlNanoHTTPScanProxy", libxml_xmlNanoHTTPScanProxy, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+ { (char *)"xmlNewCDataBlock", libxml_xmlNewCDataBlock, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlNewCatalog", libxml_xmlNewCatalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlNewCharRef", libxml_xmlNewCharRef, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlNewChild", libxml_xmlNewChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlNewComment", libxml_xmlNewComment, METH_VARARGS, NULL },
+ { (char *)"xmlNewDoc", libxml_xmlNewDoc, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocComment", libxml_xmlNewDocComment, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewDocFragment", libxml_xmlNewDocFragment, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewDocNode", libxml_xmlNewDocNode, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocNodeEatName", libxml_xmlNewDocNodeEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocPI", libxml_xmlNewDocPI, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocProp", libxml_xmlNewDocProp, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewDocRawNode", libxml_xmlNewDocRawNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewDocText", libxml_xmlNewDocText, METH_VARARGS, NULL },
+ { (char *)"xmlNewDocTextLen", libxml_xmlNewDocTextLen, METH_VARARGS, NULL },
+ { (char *)"xmlNewDtd", libxml_xmlNewDtd, METH_VARARGS, NULL },
+ { (char *)"xmlNewEntity", libxml_xmlNewEntity, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlNewGlobalNs", libxml_xmlNewGlobalNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlNewNode", libxml_xmlNewNode, METH_VARARGS, NULL },
+ { (char *)"xmlNewNodeEatName", libxml_xmlNewNodeEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewNs", libxml_xmlNewNs, METH_VARARGS, NULL },
+ { (char *)"xmlNewNsProp", libxml_xmlNewNsProp, METH_VARARGS, NULL },
+ { (char *)"xmlNewNsPropEatName", libxml_xmlNewNsPropEatName, METH_VARARGS, NULL },
+ { (char *)"xmlNewPI", libxml_xmlNewPI, METH_VARARGS, NULL },
+ { (char *)"xmlNewParserCtxt", libxml_xmlNewParserCtxt, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlNewProp", libxml_xmlNewProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlNewReference", libxml_xmlNewReference, METH_VARARGS, NULL },
+ { (char *)"xmlNewText", libxml_xmlNewText, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNewTextChild", libxml_xmlNewTextChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNewTextLen", libxml_xmlNewTextLen, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlNewTextReader", libxml_xmlNewTextReader, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlNewTextReaderFilename", libxml_xmlNewTextReaderFilename, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlNewValidCtxt", libxml_xmlNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+ { (char *)"xmlNextChar", libxml_xmlNextChar, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNextElementSibling", libxml_xmlNextElementSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNodeAddContent", libxml_xmlNodeAddContent, METH_VARARGS, NULL },
+ { (char *)"xmlNodeAddContentLen", libxml_xmlNodeAddContentLen, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlNodeDumpOutput", libxml_xmlNodeDumpOutput, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlNodeGetBase", libxml_xmlNodeGetBase, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetContent", libxml_xmlNodeGetContent, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetLang", libxml_xmlNodeGetLang, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetNs", libxml_xmlNodeGetNs, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetNsDefs", libxml_xmlNodeGetNsDefs, METH_VARARGS, NULL },
+ { (char *)"xmlNodeGetSpacePreserve", libxml_xmlNodeGetSpacePreserve, METH_VARARGS, NULL },
+ { (char *)"xmlNodeIsText", libxml_xmlNodeIsText, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeListGetRawString", libxml_xmlNodeListGetRawString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNodeListGetString", libxml_xmlNodeListGetString, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlNodeSetBase", libxml_xmlNodeSetBase, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+ { (char *)"xmlNodeSetContent", libxml_xmlNodeSetContent, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetContentLen", libxml_xmlNodeSetContentLen, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetLang", libxml_xmlNodeSetLang, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetName", libxml_xmlNodeSetName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlNodeSetSpacePreserve", libxml_xmlNodeSetSpacePreserve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlNormalizeURIPath", libxml_xmlNormalizeURIPath, METH_VARARGS, NULL },
+ { (char *)"xmlNormalizeWindowsPath", libxml_xmlNormalizeWindowsPath, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferGetContent", libxml_xmlOutputBufferGetContent, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferWrite", libxml_xmlOutputBufferWrite, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlOutputBufferWriteString", libxml_xmlOutputBufferWriteString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlParseAttValue", libxml_xmlParseAttValue, METH_VARARGS, NULL },
+ { (char *)"xmlParseAttributeListDecl", libxml_xmlParseAttributeListDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseCDSect", libxml_xmlParseCDSect, METH_VARARGS, NULL },
+#if defined(LIBXML_CATALOG_ENABLED)
+ { (char *)"xmlParseCatalogFile", libxml_xmlParseCatalogFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+ { (char *)"xmlParseCharData", libxml_xmlParseCharData, METH_VARARGS, NULL },
+ { (char *)"xmlParseCharRef", libxml_xmlParseCharRef, METH_VARARGS, NULL },
+#if defined(LIBXML_PUSH_ENABLED)
+ { (char *)"xmlParseChunk", libxml_xmlParseChunk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+ { (char *)"xmlParseComment", libxml_xmlParseComment, METH_VARARGS, NULL },
+ { (char *)"xmlParseContent", libxml_xmlParseContent, METH_VARARGS, NULL },
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlParseDTD", libxml_xmlParseDTD, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseDoc", libxml_xmlParseDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseDocTypeDecl", libxml_xmlParseDocTypeDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseDocument", libxml_xmlParseDocument, METH_VARARGS, NULL },
+ { (char *)"xmlParseElement", libxml_xmlParseElement, METH_VARARGS, NULL },
+ { (char *)"xmlParseElementDecl", libxml_xmlParseElementDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseEncName", libxml_xmlParseEncName, METH_VARARGS, NULL },
+ { (char *)"xmlParseEncodingDecl", libxml_xmlParseEncodingDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseEndTag", libxml_xmlParseEndTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseEntity", libxml_xmlParseEntity, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseEntityDecl", libxml_xmlParseEntityDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseEntityRef", libxml_xmlParseEntityRef, METH_VARARGS, NULL },
+ { (char *)"xmlParseExtParsedEnt", libxml_xmlParseExtParsedEnt, METH_VARARGS, NULL },
+ { (char *)"xmlParseExternalSubset", libxml_xmlParseExternalSubset, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseFile", libxml_xmlParseFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseMarkupDecl", libxml_xmlParseMarkupDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseMemory", libxml_xmlParseMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseMisc", libxml_xmlParseMisc, METH_VARARGS, NULL },
+ { (char *)"xmlParseName", libxml_xmlParseName, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParseNamespace", libxml_xmlParseNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParseNmtoken", libxml_xmlParseNmtoken, METH_VARARGS, NULL },
+ { (char *)"xmlParseNotationDecl", libxml_xmlParseNotationDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParsePEReference", libxml_xmlParsePEReference, METH_VARARGS, NULL },
+ { (char *)"xmlParsePI", libxml_xmlParsePI, METH_VARARGS, NULL },
+ { (char *)"xmlParsePITarget", libxml_xmlParsePITarget, METH_VARARGS, NULL },
+ { (char *)"xmlParsePubidLiteral", libxml_xmlParsePubidLiteral, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParseQuotedString", libxml_xmlParseQuotedString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParseReference", libxml_xmlParseReference, METH_VARARGS, NULL },
+ { (char *)"xmlParseSDDecl", libxml_xmlParseSDDecl, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlParseStartTag", libxml_xmlParseStartTag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlParseSystemLiteral", libxml_xmlParseSystemLiteral, METH_VARARGS, NULL },
+ { (char *)"xmlParseTextDecl", libxml_xmlParseTextDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParseURI", libxml_xmlParseURI, METH_VARARGS, NULL },
+ { (char *)"xmlParseURIRaw", libxml_xmlParseURIRaw, METH_VARARGS, NULL },
+ { (char *)"xmlParseURIReference", libxml_xmlParseURIReference, METH_VARARGS, NULL },
+ { (char *)"xmlParseVersionInfo", libxml_xmlParseVersionInfo, METH_VARARGS, NULL },
+ { (char *)"xmlParseVersionNum", libxml_xmlParseVersionNum, METH_VARARGS, NULL },
+ { (char *)"xmlParseXMLDecl", libxml_xmlParseXMLDecl, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetDirectory", libxml_xmlParserGetDirectory, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetDoc", libxml_xmlParserGetDoc, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetIsValid", libxml_xmlParserGetIsValid, METH_VARARGS, NULL },
+ { (char *)"xmlParserGetWellFormed", libxml_xmlParserGetWellFormed, METH_VARARGS, NULL },
+ { (char *)"xmlParserHandlePEReference", libxml_xmlParserHandlePEReference, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlParserHandleReference", libxml_xmlParserHandleReference, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+ { (char *)"xmlParserInputBufferGrow", libxml_xmlParserInputBufferGrow, METH_VARARGS, NULL },
+ { (char *)"xmlParserInputBufferPush", libxml_xmlParserInputBufferPush, METH_VARARGS, NULL },
+ { (char *)"xmlParserInputBufferRead", libxml_xmlParserInputBufferRead, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetLineNumbers", libxml_xmlParserSetLineNumbers, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetLoadSubset", libxml_xmlParserSetLoadSubset, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetPedantic", libxml_xmlParserSetPedantic, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetReplaceEntities", libxml_xmlParserSetReplaceEntities, METH_VARARGS, NULL },
+ { (char *)"xmlParserSetValidate", libxml_xmlParserSetValidate, METH_VARARGS, NULL },
+ { (char *)"xmlPathToURI", libxml_xmlPathToURI, METH_VARARGS, NULL },
+ { (char *)"xmlPedanticParserDefault", libxml_xmlPedanticParserDefault, METH_VARARGS, NULL },
+ { (char *)"xmlPopInput", libxml_xmlPopInput, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlPreviousElementSibling", libxml_xmlPreviousElementSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+ { (char *)"xmlPrintURI", libxml_xmlPrintURI, METH_VARARGS, NULL },
+ { (char *)"xmlPythonCleanupParser", libxml_xmlPythonCleanupParser, METH_VARARGS, NULL },
+ { (char *)"xmlReadDoc", libxml_xmlReadDoc, METH_VARARGS, NULL },
+ { (char *)"xmlReadFd", libxml_xmlReadFd, METH_VARARGS, NULL },
+ { (char *)"xmlReadFile", libxml_xmlReadFile, METH_VARARGS, NULL },
+ { (char *)"xmlReadMemory", libxml_xmlReadMemory, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForDoc", libxml_xmlReaderForDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForFd", libxml_xmlReaderForFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForFile", libxml_xmlReaderForFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderForMemory", libxml_xmlReaderForMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewDoc", libxml_xmlReaderNewDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewFd", libxml_xmlReaderNewFd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewFile", libxml_xmlReaderNewFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewMemory", libxml_xmlReaderNewMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderNewWalker", libxml_xmlReaderNewWalker, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlReaderWalker", libxml_xmlReaderWalker, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+ { (char *)"xmlReconciliateNs", libxml_xmlReconciliateNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverDoc", libxml_xmlRecoverDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverFile", libxml_xmlRecoverFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlRecoverMemory", libxml_xmlRecoverMemory, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegFreeRegexp", libxml_xmlRegFreeRegexp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpCompile", libxml_xmlRegexpCompile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpExec", libxml_xmlRegexpExec, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpIsDeterminist", libxml_xmlRegexpIsDeterminist, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlRegexpPrint", libxml_xmlRegexpPrint, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+ { (char *)"xmlRegisterDefaultInputCallbacks", libxml_xmlRegisterDefaultInputCallbacks, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRegisterDefaultOutputCallbacks", libxml_xmlRegisterDefaultOutputCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+ { (char *)"xmlRegisterHTTPPostCallbacks", libxml_xmlRegisterHTTPPostCallbacks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlRegisterXPathFunction", libxml_xmlRegisterXPathFunction, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGCleanupTypes", libxml_xmlRelaxNGCleanupTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRelaxNGDump", libxml_xmlRelaxNGDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlRelaxNGDumpTree", libxml_xmlRelaxNGDumpTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGFree", libxml_xmlRelaxNGFree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGFreeParserCtxt", libxml_xmlRelaxNGFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGInitTypes", libxml_xmlRelaxNGInitTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewDocParserCtxt", libxml_xmlRelaxNGNewDocParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewMemParserCtxt", libxml_xmlRelaxNGNewMemParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewParserCtxt", libxml_xmlRelaxNGNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGNewValidCtxt", libxml_xmlRelaxNGNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGParse", libxml_xmlRelaxNGParse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidateDoc", libxml_xmlRelaxNGValidateDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidateFullElement", libxml_xmlRelaxNGValidateFullElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePopElement", libxml_xmlRelaxNGValidatePopElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePushCData", libxml_xmlRelaxNGValidatePushCData, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxNGValidatePushElement", libxml_xmlRelaxNGValidatePushElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlRelaxParserSetFlag", libxml_xmlRelaxParserSetFlag, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlRemoveID", libxml_xmlRemoveID, METH_VARARGS, NULL },
+ { (char *)"xmlRemoveProp", libxml_xmlRemoveProp, METH_VARARGS, NULL },
+ { (char *)"xmlRemoveRef", libxml_xmlRemoveRef, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlReplaceNode", libxml_xmlReplaceNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+ { (char *)"xmlResetError", libxml_xmlResetError, METH_VARARGS, NULL },
+ { (char *)"xmlResetLastError", libxml_xmlResetLastError, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlSAXDefaultVersion", libxml_xmlSAXDefaultVersion, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+ { (char *)"xmlSAXParseFile", libxml_xmlSAXParseFile, METH_VARARGS, NULL },
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFile", libxml_xmlSaveFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFileEnc", libxml_xmlSaveFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFormatFile", libxml_xmlSaveFormatFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSaveFormatFileEnc", libxml_xmlSaveFormatFileEnc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+ { (char *)"xmlSaveUri", libxml_xmlSaveUri, METH_VARARGS, NULL },
+#if defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlScanName", libxml_xmlScanName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaCleanupTypes", libxml_xmlSchemaCleanupTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaCollapseString", libxml_xmlSchemaCollapseString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlSchemaDump", libxml_xmlSchemaDump, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaFree", libxml_xmlSchemaFree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaFreeParserCtxt", libxml_xmlSchemaFreeParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaInitTypes", libxml_xmlSchemaInitTypes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaIsValid", libxml_xmlSchemaIsValid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewDocParserCtxt", libxml_xmlSchemaNewDocParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewMemParserCtxt", libxml_xmlSchemaNewMemParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewParserCtxt", libxml_xmlSchemaNewParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaNewValidCtxt", libxml_xmlSchemaNewValidCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaParse", libxml_xmlSchemaParse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaSetValidOptions", libxml_xmlSchemaSetValidOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidCtxtGetOptions", libxml_xmlSchemaValidCtxtGetOptions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidCtxtGetParserCtxt", libxml_xmlSchemaValidCtxtGetParserCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateDoc", libxml_xmlSchemaValidateDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateFile", libxml_xmlSchemaValidateFile, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateOneElement", libxml_xmlSchemaValidateOneElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaValidateSetFilename", libxml_xmlSchemaValidateSetFilename, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlSchemaWhiteSpaceReplace", libxml_xmlSchemaWhiteSpaceReplace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+ { (char *)"xmlSearchNs", libxml_xmlSearchNs, METH_VARARGS, NULL },
+ { (char *)"xmlSearchNsByHref", libxml_xmlSearchNsByHref, METH_VARARGS, NULL },
+ { (char *)"xmlSetCompressMode", libxml_xmlSetCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlSetDocCompressMode", libxml_xmlSetDocCompressMode, METH_VARARGS, NULL },
+ { (char *)"xmlSetEntityLoader", libxml_xmlSetEntityLoader, METH_VARARGS, NULL },
+ { (char *)"xmlSetListDoc", libxml_xmlSetListDoc, METH_VARARGS, NULL },
+ { (char *)"xmlSetNs", libxml_xmlSetNs, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ { (char *)"xmlSetNsProp", libxml_xmlSetNsProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ { (char *)"xmlSetProp", libxml_xmlSetProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+ { (char *)"xmlSetTreeDoc", libxml_xmlSetTreeDoc, METH_VARARGS, NULL },
+#if defined(LIBXML_SAX1_ENABLED)
+ { (char *)"xmlSetupParserForBuffer", libxml_xmlSetupParserForBuffer, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ { (char *)"xmlShellPrintNode", libxml_xmlShellPrintNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlShellPrintXPathError", libxml_xmlShellPrintXPathError, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+ { (char *)"xmlSkipBlankChars", libxml_xmlSkipBlankChars, METH_VARARGS, NULL },
+ { (char *)"xmlStopParser", libxml_xmlStopParser, METH_VARARGS, NULL },
+ { (char *)"xmlStrEqual", libxml_xmlStrEqual, METH_VARARGS, NULL },
+ { (char *)"xmlStrQEqual", libxml_xmlStrQEqual, METH_VARARGS, NULL },
+ { (char *)"xmlStrcasecmp", libxml_xmlStrcasecmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrcasestr", libxml_xmlStrcasestr, METH_VARARGS, NULL },
+ { (char *)"xmlStrcat", libxml_xmlStrcat, METH_VARARGS, NULL },
+ { (char *)"xmlStrchr", libxml_xmlStrchr, METH_VARARGS, NULL },
+ { (char *)"xmlStrcmp", libxml_xmlStrcmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrdup", libxml_xmlStrdup, METH_VARARGS, NULL },
+ { (char *)"xmlStringDecodeEntities", libxml_xmlStringDecodeEntities, METH_VARARGS, NULL },
+ { (char *)"xmlStringGetNodeList", libxml_xmlStringGetNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlStringLenDecodeEntities", libxml_xmlStringLenDecodeEntities, METH_VARARGS, NULL },
+ { (char *)"xmlStringLenGetNodeList", libxml_xmlStringLenGetNodeList, METH_VARARGS, NULL },
+ { (char *)"xmlStrlen", libxml_xmlStrlen, METH_VARARGS, NULL },
+ { (char *)"xmlStrncasecmp", libxml_xmlStrncasecmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrncat", libxml_xmlStrncat, METH_VARARGS, NULL },
+ { (char *)"xmlStrncatNew", libxml_xmlStrncatNew, METH_VARARGS, NULL },
+ { (char *)"xmlStrncmp", libxml_xmlStrncmp, METH_VARARGS, NULL },
+ { (char *)"xmlStrndup", libxml_xmlStrndup, METH_VARARGS, NULL },
+ { (char *)"xmlStrstr", libxml_xmlStrstr, METH_VARARGS, NULL },
+ { (char *)"xmlStrsub", libxml_xmlStrsub, METH_VARARGS, NULL },
+ { (char *)"xmlSubstituteEntitiesDefault", libxml_xmlSubstituteEntitiesDefault, METH_VARARGS, NULL },
+ { (char *)"xmlTextConcat", libxml_xmlTextConcat, METH_VARARGS, NULL },
+ { (char *)"xmlTextMerge", libxml_xmlTextMerge, METH_VARARGS, NULL },
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderAttributeCount", libxml_xmlTextReaderAttributeCount, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderByteConsumed", libxml_xmlTextReaderByteConsumed, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderClose", libxml_xmlTextReaderClose, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstBaseUri", libxml_xmlTextReaderConstBaseUri, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstEncoding", libxml_xmlTextReaderConstEncoding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstLocalName", libxml_xmlTextReaderConstLocalName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstName", libxml_xmlTextReaderConstName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstNamespaceUri", libxml_xmlTextReaderConstNamespaceUri, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstPrefix", libxml_xmlTextReaderConstPrefix, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstString", libxml_xmlTextReaderConstString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstValue", libxml_xmlTextReaderConstValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstXmlLang", libxml_xmlTextReaderConstXmlLang, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderConstXmlVersion", libxml_xmlTextReaderConstXmlVersion, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderCurrentDoc", libxml_xmlTextReaderCurrentDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderCurrentNode", libxml_xmlTextReaderCurrentNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderDepth", libxml_xmlTextReaderDepth, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderExpand", libxml_xmlTextReaderExpand, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttribute", libxml_xmlTextReaderGetAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttributeNo", libxml_xmlTextReaderGetAttributeNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetAttributeNs", libxml_xmlTextReaderGetAttributeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserColumnNumber", libxml_xmlTextReaderGetParserColumnNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserLineNumber", libxml_xmlTextReaderGetParserLineNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetParserProp", libxml_xmlTextReaderGetParserProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderGetRemainder", libxml_xmlTextReaderGetRemainder, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderHasAttributes", libxml_xmlTextReaderHasAttributes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderHasValue", libxml_xmlTextReaderHasValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsDefault", libxml_xmlTextReaderIsDefault, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsEmptyElement", libxml_xmlTextReaderIsEmptyElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsNamespaceDecl", libxml_xmlTextReaderIsNamespaceDecl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderIsValid", libxml_xmlTextReaderIsValid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLocatorBaseURI", libxml_xmlTextReaderLocatorBaseURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLocatorLineNumber", libxml_xmlTextReaderLocatorLineNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderLookupNamespace", libxml_xmlTextReaderLookupNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttribute", libxml_xmlTextReaderMoveToAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttributeNo", libxml_xmlTextReaderMoveToAttributeNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToAttributeNs", libxml_xmlTextReaderMoveToAttributeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToElement", libxml_xmlTextReaderMoveToElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToFirstAttribute", libxml_xmlTextReaderMoveToFirstAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderMoveToNextAttribute", libxml_xmlTextReaderMoveToNextAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNext", libxml_xmlTextReaderNext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNextSibling", libxml_xmlTextReaderNextSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNodeType", libxml_xmlTextReaderNodeType, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderNormalization", libxml_xmlTextReaderNormalization, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderPreserve", libxml_xmlTextReaderPreserve, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderQuoteChar", libxml_xmlTextReaderQuoteChar, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderRead", libxml_xmlTextReaderRead, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadAttributeValue", libxml_xmlTextReaderReadAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlTextReaderReadInnerXml", libxml_xmlTextReaderReadInnerXml, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+ { (char *)"xmlTextReaderReadOuterXml", libxml_xmlTextReaderReadOuterXml, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadState", libxml_xmlTextReaderReadState, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderReadString", libxml_xmlTextReaderReadString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGSetSchema", libxml_xmlTextReaderRelaxNGSetSchema, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGValidate", libxml_xmlTextReaderRelaxNGValidate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderRelaxNGValidateCtxt", libxml_xmlTextReaderRelaxNGValidateCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSchemaValidate", libxml_xmlTextReaderSchemaValidate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSchemaValidateCtxt", libxml_xmlTextReaderSchemaValidateCtxt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderSetParserProp", libxml_xmlTextReaderSetParserProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlTextReaderSetSchema", libxml_xmlTextReaderSetSchema, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderSetup", libxml_xmlTextReaderSetup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+ { (char *)"xmlTextReaderStandalone", libxml_xmlTextReaderStandalone, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_READER_ENABLED) */
+ { (char *)"xmlThrDefDefaultBufferSize", libxml_xmlThrDefDefaultBufferSize, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefDoValidityCheckingDefaultValue", libxml_xmlThrDefDoValidityCheckingDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefGetWarningsDefaultValue", libxml_xmlThrDefGetWarningsDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefIndentTreeOutput", libxml_xmlThrDefIndentTreeOutput, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefKeepBlanksDefaultValue", libxml_xmlThrDefKeepBlanksDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefLineNumbersDefaultValue", libxml_xmlThrDefLineNumbersDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefLoadExtDtdDefaultValue", libxml_xmlThrDefLoadExtDtdDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefParserDebugEntities", libxml_xmlThrDefParserDebugEntities, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefPedanticParserDefaultValue", libxml_xmlThrDefPedanticParserDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefSaveNoEmptyTags", libxml_xmlThrDefSaveNoEmptyTags, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefSubstituteEntitiesDefaultValue", libxml_xmlThrDefSubstituteEntitiesDefaultValue, METH_VARARGS, NULL },
+ { (char *)"xmlThrDefTreeIndentString", libxml_xmlThrDefTreeIndentString, METH_VARARGS, NULL },
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsAegeanNumbers", libxml_xmlUCSIsAegeanNumbers, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsAlphabeticPresentationForms", libxml_xmlUCSIsAlphabeticPresentationForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabic", libxml_xmlUCSIsArabic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabicPresentationFormsA", libxml_xmlUCSIsArabicPresentationFormsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArabicPresentationFormsB", libxml_xmlUCSIsArabicPresentationFormsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArmenian", libxml_xmlUCSIsArmenian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsArrows", libxml_xmlUCSIsArrows, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBasicLatin", libxml_xmlUCSIsBasicLatin, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBengali", libxml_xmlUCSIsBengali, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBlock", libxml_xmlUCSIsBlock, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBlockElements", libxml_xmlUCSIsBlockElements, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBopomofo", libxml_xmlUCSIsBopomofo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBopomofoExtended", libxml_xmlUCSIsBopomofoExtended, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBoxDrawing", libxml_xmlUCSIsBoxDrawing, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBraillePatterns", libxml_xmlUCSIsBraillePatterns, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsBuhid", libxml_xmlUCSIsBuhid, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsByzantineMusicalSymbols", libxml_xmlUCSIsByzantineMusicalSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibility", libxml_xmlUCSIsCJKCompatibility, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityForms", libxml_xmlUCSIsCJKCompatibilityForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityIdeographs", libxml_xmlUCSIsCJKCompatibilityIdeographs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKCompatibilityIdeographsSupplement", libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKRadicalsSupplement", libxml_xmlUCSIsCJKRadicalsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKSymbolsandPunctuation", libxml_xmlUCSIsCJKSymbolsandPunctuation, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographs", libxml_xmlUCSIsCJKUnifiedIdeographs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographsExtensionA", libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCJKUnifiedIdeographsExtensionB", libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCat", libxml_xmlUCSIsCat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatC", libxml_xmlUCSIsCatC, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCc", libxml_xmlUCSIsCatCc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCf", libxml_xmlUCSIsCatCf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCo", libxml_xmlUCSIsCatCo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatCs", libxml_xmlUCSIsCatCs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatL", libxml_xmlUCSIsCatL, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLl", libxml_xmlUCSIsCatLl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLm", libxml_xmlUCSIsCatLm, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLo", libxml_xmlUCSIsCatLo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLt", libxml_xmlUCSIsCatLt, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatLu", libxml_xmlUCSIsCatLu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatM", libxml_xmlUCSIsCatM, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMc", libxml_xmlUCSIsCatMc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMe", libxml_xmlUCSIsCatMe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatMn", libxml_xmlUCSIsCatMn, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatN", libxml_xmlUCSIsCatN, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNd", libxml_xmlUCSIsCatNd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNl", libxml_xmlUCSIsCatNl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatNo", libxml_xmlUCSIsCatNo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatP", libxml_xmlUCSIsCatP, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPc", libxml_xmlUCSIsCatPc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPd", libxml_xmlUCSIsCatPd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPe", libxml_xmlUCSIsCatPe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPf", libxml_xmlUCSIsCatPf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPi", libxml_xmlUCSIsCatPi, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPo", libxml_xmlUCSIsCatPo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatPs", libxml_xmlUCSIsCatPs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatS", libxml_xmlUCSIsCatS, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSc", libxml_xmlUCSIsCatSc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSk", libxml_xmlUCSIsCatSk, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSm", libxml_xmlUCSIsCatSm, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatSo", libxml_xmlUCSIsCatSo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZ", libxml_xmlUCSIsCatZ, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZl", libxml_xmlUCSIsCatZl, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZp", libxml_xmlUCSIsCatZp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCatZs", libxml_xmlUCSIsCatZs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCherokee", libxml_xmlUCSIsCherokee, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningDiacriticalMarks", libxml_xmlUCSIsCombiningDiacriticalMarks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningDiacriticalMarksforSymbols", libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningHalfMarks", libxml_xmlUCSIsCombiningHalfMarks, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCombiningMarksforSymbols", libxml_xmlUCSIsCombiningMarksforSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsControlPictures", libxml_xmlUCSIsControlPictures, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCurrencySymbols", libxml_xmlUCSIsCurrencySymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCypriotSyllabary", libxml_xmlUCSIsCypriotSyllabary, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCyrillic", libxml_xmlUCSIsCyrillic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsCyrillicSupplement", libxml_xmlUCSIsCyrillicSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDeseret", libxml_xmlUCSIsDeseret, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDevanagari", libxml_xmlUCSIsDevanagari, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsDingbats", libxml_xmlUCSIsDingbats, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEnclosedAlphanumerics", libxml_xmlUCSIsEnclosedAlphanumerics, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEnclosedCJKLettersandMonths", libxml_xmlUCSIsEnclosedCJKLettersandMonths, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsEthiopic", libxml_xmlUCSIsEthiopic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeneralPunctuation", libxml_xmlUCSIsGeneralPunctuation, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeometricShapes", libxml_xmlUCSIsGeometricShapes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGeorgian", libxml_xmlUCSIsGeorgian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGothic", libxml_xmlUCSIsGothic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreek", libxml_xmlUCSIsGreek, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreekExtended", libxml_xmlUCSIsGreekExtended, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGreekandCoptic", libxml_xmlUCSIsGreekandCoptic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGujarati", libxml_xmlUCSIsGujarati, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsGurmukhi", libxml_xmlUCSIsGurmukhi, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHalfwidthandFullwidthForms", libxml_xmlUCSIsHalfwidthandFullwidthForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulCompatibilityJamo", libxml_xmlUCSIsHangulCompatibilityJamo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulJamo", libxml_xmlUCSIsHangulJamo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHangulSyllables", libxml_xmlUCSIsHangulSyllables, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHanunoo", libxml_xmlUCSIsHanunoo, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHebrew", libxml_xmlUCSIsHebrew, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHighPrivateUseSurrogates", libxml_xmlUCSIsHighPrivateUseSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHighSurrogates", libxml_xmlUCSIsHighSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsHiragana", libxml_xmlUCSIsHiragana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsIPAExtensions", libxml_xmlUCSIsIPAExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsIdeographicDescriptionCharacters", libxml_xmlUCSIsIdeographicDescriptionCharacters, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKanbun", libxml_xmlUCSIsKanbun, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKangxiRadicals", libxml_xmlUCSIsKangxiRadicals, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKannada", libxml_xmlUCSIsKannada, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKatakana", libxml_xmlUCSIsKatakana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKatakanaPhoneticExtensions", libxml_xmlUCSIsKatakanaPhoneticExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKhmer", libxml_xmlUCSIsKhmer, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsKhmerSymbols", libxml_xmlUCSIsKhmerSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLao", libxml_xmlUCSIsLao, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatin1Supplement", libxml_xmlUCSIsLatin1Supplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedA", libxml_xmlUCSIsLatinExtendedA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedAdditional", libxml_xmlUCSIsLatinExtendedAdditional, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLatinExtendedB", libxml_xmlUCSIsLatinExtendedB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLetterlikeSymbols", libxml_xmlUCSIsLetterlikeSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLimbu", libxml_xmlUCSIsLimbu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLinearBIdeograms", libxml_xmlUCSIsLinearBIdeograms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLinearBSyllabary", libxml_xmlUCSIsLinearBSyllabary, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsLowSurrogates", libxml_xmlUCSIsLowSurrogates, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMalayalam", libxml_xmlUCSIsMalayalam, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMathematicalAlphanumericSymbols", libxml_xmlUCSIsMathematicalAlphanumericSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMathematicalOperators", libxml_xmlUCSIsMathematicalOperators, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousMathematicalSymbolsA", libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousMathematicalSymbolsB", libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousSymbols", libxml_xmlUCSIsMiscellaneousSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousSymbolsandArrows", libxml_xmlUCSIsMiscellaneousSymbolsandArrows, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMiscellaneousTechnical", libxml_xmlUCSIsMiscellaneousTechnical, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMongolian", libxml_xmlUCSIsMongolian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMusicalSymbols", libxml_xmlUCSIsMusicalSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsMyanmar", libxml_xmlUCSIsMyanmar, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsNumberForms", libxml_xmlUCSIsNumberForms, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOgham", libxml_xmlUCSIsOgham, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOldItalic", libxml_xmlUCSIsOldItalic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOpticalCharacterRecognition", libxml_xmlUCSIsOpticalCharacterRecognition, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOriya", libxml_xmlUCSIsOriya, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsOsmanya", libxml_xmlUCSIsOsmanya, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPhoneticExtensions", libxml_xmlUCSIsPhoneticExtensions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPrivateUse", libxml_xmlUCSIsPrivateUse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsPrivateUseArea", libxml_xmlUCSIsPrivateUseArea, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsRunic", libxml_xmlUCSIsRunic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsShavian", libxml_xmlUCSIsShavian, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSinhala", libxml_xmlUCSIsSinhala, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSmallFormVariants", libxml_xmlUCSIsSmallFormVariants, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSpacingModifierLetters", libxml_xmlUCSIsSpacingModifierLetters, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSpecials", libxml_xmlUCSIsSpecials, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSuperscriptsandSubscripts", libxml_xmlUCSIsSuperscriptsandSubscripts, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalArrowsA", libxml_xmlUCSIsSupplementalArrowsA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalArrowsB", libxml_xmlUCSIsSupplementalArrowsB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementalMathematicalOperators", libxml_xmlUCSIsSupplementalMathematicalOperators, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementaryPrivateUseAreaA", libxml_xmlUCSIsSupplementaryPrivateUseAreaA, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSupplementaryPrivateUseAreaB", libxml_xmlUCSIsSupplementaryPrivateUseAreaB, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsSyriac", libxml_xmlUCSIsSyriac, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTagalog", libxml_xmlUCSIsTagalog, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTagbanwa", libxml_xmlUCSIsTagbanwa, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTags", libxml_xmlUCSIsTags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTaiLe", libxml_xmlUCSIsTaiLe, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTaiXuanJingSymbols", libxml_xmlUCSIsTaiXuanJingSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTamil", libxml_xmlUCSIsTamil, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTelugu", libxml_xmlUCSIsTelugu, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsThaana", libxml_xmlUCSIsThaana, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsThai", libxml_xmlUCSIsThai, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsTibetan", libxml_xmlUCSIsTibetan, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsUgaritic", libxml_xmlUCSIsUgaritic, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsUnifiedCanadianAboriginalSyllabics", libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsVariationSelectors", libxml_xmlUCSIsVariationSelectors, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsVariationSelectorsSupplement", libxml_xmlUCSIsVariationSelectorsSupplement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYiRadicals", libxml_xmlUCSIsYiRadicals, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYiSyllables", libxml_xmlUCSIsYiSyllables, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+ { (char *)"xmlUCSIsYijingHexagramSymbols", libxml_xmlUCSIsYijingHexagramSymbols, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+ { (char *)"xmlURIEscape", libxml_xmlURIEscape, METH_VARARGS, NULL },
+ { (char *)"xmlURIEscapeStr", libxml_xmlURIEscapeStr, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetAuthority", libxml_xmlURIGetAuthority, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetFragment", libxml_xmlURIGetFragment, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetOpaque", libxml_xmlURIGetOpaque, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetPath", libxml_xmlURIGetPath, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetPort", libxml_xmlURIGetPort, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetQuery", libxml_xmlURIGetQuery, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetQueryRaw", libxml_xmlURIGetQueryRaw, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetScheme", libxml_xmlURIGetScheme, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetServer", libxml_xmlURIGetServer, METH_VARARGS, NULL },
+ { (char *)"xmlURIGetUser", libxml_xmlURIGetUser, METH_VARARGS, NULL },
+ { (char *)"xmlURISetAuthority", libxml_xmlURISetAuthority, METH_VARARGS, NULL },
+ { (char *)"xmlURISetFragment", libxml_xmlURISetFragment, METH_VARARGS, NULL },
+ { (char *)"xmlURISetOpaque", libxml_xmlURISetOpaque, METH_VARARGS, NULL },
+ { (char *)"xmlURISetPath", libxml_xmlURISetPath, METH_VARARGS, NULL },
+ { (char *)"xmlURISetPort", libxml_xmlURISetPort, METH_VARARGS, NULL },
+ { (char *)"xmlURISetQuery", libxml_xmlURISetQuery, METH_VARARGS, NULL },
+ { (char *)"xmlURISetQueryRaw", libxml_xmlURISetQueryRaw, METH_VARARGS, NULL },
+ { (char *)"xmlURISetScheme", libxml_xmlURISetScheme, METH_VARARGS, NULL },
+ { (char *)"xmlURISetServer", libxml_xmlURISetServer, METH_VARARGS, NULL },
+ { (char *)"xmlURISetUser", libxml_xmlURISetUser, METH_VARARGS, NULL },
+ { (char *)"xmlURIUnescapeString", libxml_xmlURIUnescapeString, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Charcmp", libxml_xmlUTF8Charcmp, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Size", libxml_xmlUTF8Size, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strlen", libxml_xmlUTF8Strlen, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strloc", libxml_xmlUTF8Strloc, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strndup", libxml_xmlUTF8Strndup, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strpos", libxml_xmlUTF8Strpos, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strsize", libxml_xmlUTF8Strsize, METH_VARARGS, NULL },
+ { (char *)"xmlUTF8Strsub", libxml_xmlUTF8Strsub, METH_VARARGS, NULL },
+ { (char *)"xmlUnlinkNode", libxml_xmlUnlinkNode, METH_VARARGS, NULL },
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlUnsetNsProp", libxml_xmlUnsetNsProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlUnsetProp", libxml_xmlUnsetProp, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidCtxtNormalizeAttributeValue", libxml_xmlValidCtxtNormalizeAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidNormalizeAttributeValue", libxml_xmlValidNormalizeAttributeValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDocument", libxml_xmlValidateDocument, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDocumentFinal", libxml_xmlValidateDocumentFinal, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDtd", libxml_xmlValidateDtd, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateDtdFinal", libxml_xmlValidateDtdFinal, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateElement", libxml_xmlValidateElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+ { (char *)"xmlValidateNCName", libxml_xmlValidateNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateNMToken", libxml_xmlValidateNMToken, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateName", libxml_xmlValidateName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNameValue", libxml_xmlValidateNameValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNamesValue", libxml_xmlValidateNamesValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNmtokenValue", libxml_xmlValidateNmtokenValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateNmtokensValue", libxml_xmlValidateNmtokensValue, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateNotationUse", libxml_xmlValidateNotationUse, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneAttribute", libxml_xmlValidateOneAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneElement", libxml_xmlValidateOneElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateOneNamespace", libxml_xmlValidateOneNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePopElement", libxml_xmlValidatePopElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePushCData", libxml_xmlValidatePushCData, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ { (char *)"xmlValidatePushElement", libxml_xmlValidatePushElement, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlValidateQName", libxml_xmlValidateQName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+ { (char *)"xmlValidateRoot", libxml_xmlValidateRoot, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcess", libxml_xmlXIncludeProcess, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessFlags", libxml_xmlXIncludeProcessFlags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessTree", libxml_xmlXIncludeProcessTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ { (char *)"xmlXIncludeProcessTreeFlags", libxml_xmlXIncludeProcessTreeFlags, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathAddValues", libxml_xmlXPathAddValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathBooleanFunction", libxml_xmlXPathBooleanFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastBooleanToNumber", libxml_xmlXPathCastBooleanToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastBooleanToString", libxml_xmlXPathCastBooleanToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNodeToNumber", libxml_xmlXPathCastNodeToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNodeToString", libxml_xmlXPathCastNodeToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNumberToBoolean", libxml_xmlXPathCastNumberToBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastNumberToString", libxml_xmlXPathCastNumberToString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastStringToBoolean", libxml_xmlXPathCastStringToBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCastStringToNumber", libxml_xmlXPathCastStringToNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCeilingFunction", libxml_xmlXPathCeilingFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCmpNodes", libxml_xmlXPathCmpNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCompareValues", libxml_xmlXPathCompareValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathConcatFunction", libxml_xmlXPathConcatFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathContainsFunction", libxml_xmlXPathContainsFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathContextSetCache", libxml_xmlXPathContextSetCache, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathCountFunction", libxml_xmlXPathCountFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathDivValues", libxml_xmlXPathDivValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEqualValues", libxml_xmlXPathEqualValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathErr", libxml_xmlXPathErr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEval", libxml_xmlXPathEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEvalExpr", libxml_xmlXPathEvalExpr, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathEvalExpression", libxml_xmlXPathEvalExpression, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFalseFunction", libxml_xmlXPathFalseFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFloorFunction", libxml_xmlXPathFloorFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFreeContext", libxml_xmlXPathFreeContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathFreeParserContext", libxml_xmlXPathFreeParserContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextDoc", libxml_xmlXPathGetContextDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextNode", libxml_xmlXPathGetContextNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextPosition", libxml_xmlXPathGetContextPosition, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetContextSize", libxml_xmlXPathGetContextSize, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetFunction", libxml_xmlXPathGetFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathGetFunctionURI", libxml_xmlXPathGetFunctionURI, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathIdFunction", libxml_xmlXPathIdFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathInit", libxml_xmlXPathInit, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathIsInf", libxml_xmlXPathIsInf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ { (char *)"xmlXPathIsNaN", libxml_xmlXPathIsNaN, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathIsNodeType", libxml_xmlXPathIsNodeType, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLangFunction", libxml_xmlXPathLangFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLastFunction", libxml_xmlXPathLastFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathLocalNameFunction", libxml_xmlXPathLocalNameFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathModValues", libxml_xmlXPathModValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathMultValues", libxml_xmlXPathMultValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNamespaceURIFunction", libxml_xmlXPathNamespaceURIFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewBoolean", libxml_xmlXPathNewBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewCString", libxml_xmlXPathNewCString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewContext", libxml_xmlXPathNewContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewFloat", libxml_xmlXPathNewFloat, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewNodeSet", libxml_xmlXPathNewNodeSet, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewParserContext", libxml_xmlXPathNewParserContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewString", libxml_xmlXPathNewString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNewValueTree", libxml_xmlXPathNewValueTree, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAncestor", libxml_xmlXPathNextAncestor, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAncestorOrSelf", libxml_xmlXPathNextAncestorOrSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextAttribute", libxml_xmlXPathNextAttribute, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextChild", libxml_xmlXPathNextChild, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextDescendant", libxml_xmlXPathNextDescendant, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextDescendantOrSelf", libxml_xmlXPathNextDescendantOrSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextFollowing", libxml_xmlXPathNextFollowing, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextFollowingSibling", libxml_xmlXPathNextFollowingSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextNamespace", libxml_xmlXPathNextNamespace, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextParent", libxml_xmlXPathNextParent, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextPreceding", libxml_xmlXPathNextPreceding, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextPrecedingSibling", libxml_xmlXPathNextPrecedingSibling, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNextSelf", libxml_xmlXPathNextSelf, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNodeEval", libxml_xmlXPathNodeEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNodeSetFreeNs", libxml_xmlXPathNodeSetFreeNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNormalizeFunction", libxml_xmlXPathNormalizeFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNotEqualValues", libxml_xmlXPathNotEqualValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNotFunction", libxml_xmlXPathNotFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNsLookup", libxml_xmlXPathNsLookup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathNumberFunction", libxml_xmlXPathNumberFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathOrderDocElems", libxml_xmlXPathOrderDocElems, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParseNCName", libxml_xmlXPathParseNCName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParseName", libxml_xmlXPathParseName, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathParserGetContext", libxml_xmlXPathParserGetContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopBoolean", libxml_xmlXPathPopBoolean, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopNumber", libxml_xmlXPathPopNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPopString", libxml_xmlXPathPopString, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathPositionFunction", libxml_xmlXPathPositionFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterAllFunctions", libxml_xmlXPathRegisterAllFunctions, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterNs", libxml_xmlXPathRegisterNs, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisterVariable", libxml_xmlXPathRegisterVariable, METH_VARARGS, NULL },
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredFuncsCleanup", libxml_xmlXPathRegisteredFuncsCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredNsCleanup", libxml_xmlXPathRegisteredNsCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRegisteredVariablesCleanup", libxml_xmlXPathRegisteredVariablesCleanup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRoot", libxml_xmlXPathRoot, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathRoundFunction", libxml_xmlXPathRoundFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSetContextDoc", libxml_xmlXPathSetContextDoc, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSetContextNode", libxml_xmlXPathSetContextNode, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStartsWithFunction", libxml_xmlXPathStartsWithFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringEvalNumber", libxml_xmlXPathStringEvalNumber, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringFunction", libxml_xmlXPathStringFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathStringLengthFunction", libxml_xmlXPathStringLengthFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubValues", libxml_xmlXPathSubValues, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringAfterFunction", libxml_xmlXPathSubstringAfterFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringBeforeFunction", libxml_xmlXPathSubstringBeforeFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSubstringFunction", libxml_xmlXPathSubstringFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathSumFunction", libxml_xmlXPathSumFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathTranslateFunction", libxml_xmlXPathTranslateFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathTrueFunction", libxml_xmlXPathTrueFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathValueFlipSign", libxml_xmlXPathValueFlipSign, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathVariableLookup", libxml_xmlXPathVariableLookup, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPathVariableLookupNS", libxml_xmlXPathVariableLookupNS, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+ { (char *)"xmlXPatherror", libxml_xmlXPatherror, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrEval", libxml_xmlXPtrEval, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrEvalRangePredicate", libxml_xmlXPtrEvalRangePredicate, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewCollapsedRange", libxml_xmlXPtrNewCollapsedRange, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewContext", libxml_xmlXPtrNewContext, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewLocationSetNodes", libxml_xmlXPtrNewLocationSetNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewRange", libxml_xmlXPtrNewRange, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrNewRangeNodes", libxml_xmlXPtrNewRangeNodes, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+ { (char *)"xmlXPtrRangeToFunction", libxml_xmlXPtrRangeToFunction, METH_VARARGS, NULL },
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/python/libxml2-py.c b/python/libxml2-py.c
new file mode 100644
index 0000000..705c171
--- /dev/null
+++ b/python/libxml2-py.c
@@ -0,0 +1,14789 @@
+/* Generated */
+
+#include <Python.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xmlschemastypes.h>
+#include "libxml_wrap.h"
+#include "libxml2-py.h"
+
+#if defined(LIBXML_DOCB_ENABLED)
+PyObject *
+libxml_docbDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ docbDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlAutoCloseTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ htmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OzO:htmlAutoCloseTag", &pyobj_doc, &name, &pyobj_elem))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (htmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = htmlAutoCloseTag(doc, name, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCreateFileParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlCreateFileParserCtxt", &filename, &encoding))
+ return(NULL);
+
+ c_retval = htmlCreateFileParserCtxt(filename, encoding);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCreateMemoryParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:htmlCreateMemoryParserCtxt", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = htmlCreateMemoryParserCtxt(buffer, size);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:htmlCtxtReadDoc", &pyobj_ctxt, &cur, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:htmlCtxtReadFd", &pyobj_ctxt, &fd, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadFd(ctxt, fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:htmlCtxtReadFile", &pyobj_ctxt, &filename, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadFile(ctxt, filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izzi:htmlCtxtReadMemory", &pyobj_ctxt, &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtReset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlCtxtReset", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlCtxtReset(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlCtxtUseOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:htmlCtxtUseOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlCtxtUseOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ htmlDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocContentDumpFormatOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzi:htmlDocContentDumpFormatOutput", &pyobj_buf, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocContentDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:htmlDocContentDumpOutput", &pyobj_buf, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlDocContentDumpOutput(buf, cur, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlDocDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:htmlDocDump", &pyobj_f, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlDocDump(f, cur);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlGetMetaEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlGetMetaEncoding", &pyobj_doc))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = htmlGetMetaEncoding(doc);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlHandleOmittedElem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:htmlHandleOmittedElem", &val))
+ return(NULL);
+
+ c_retval = htmlHandleOmittedElem(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlInitAutoClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ htmlInitAutoClose();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsAutoClosed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ htmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:htmlIsAutoClosed", &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (htmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = htmlIsAutoClosed(doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsBooleanAttr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:htmlIsBooleanAttr", &name))
+ return(NULL);
+
+ c_retval = htmlIsBooleanAttr(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlIsScriptAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:htmlIsScriptAttribute", &name))
+ return(NULL);
+
+ c_retval = htmlIsScriptAttribute(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * URI;
+ xmlChar * ExternalID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlNewDoc", &URI, &ExternalID))
+ return(NULL);
+
+ c_retval = htmlNewDoc(URI, ExternalID);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewDocNoDtD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * URI;
+ xmlChar * ExternalID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlNewDocNoDtD", &URI, &ExternalID))
+ return(NULL);
+
+ c_retval = htmlNewDocNoDtD(URI, ExternalID);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+
+ c_retval = htmlNewParserCtxt();
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * out;
+ PyObject *pyobj_out;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:htmlNodeDumpFile", &pyobj_out, &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpFile(out, doc, cur);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFileFormat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * out;
+ PyObject *pyobj_out;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzi:htmlNodeDumpFileFormat", &pyobj_out, &pyobj_doc, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlNodeDumpFileFormat(out, doc, cur, encoding, format);
+ PyFile_Release(out);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpFormatOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzi:htmlNodeDumpFormatOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlNodeDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:htmlNodeDumpOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ htmlNodeDumpOutput(buf, doc, cur, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseCharRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseCharRef(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+PyObject *
+libxml_htmlParseChunk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ int terminate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#ii:htmlParseChunk", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &terminate))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseChunk(ctxt, chunk, size, terminate);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlParseDoc", &cur, &encoding))
+ return(NULL);
+
+ c_retval = htmlParseDoc(cur, encoding);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseDocument", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = htmlParseDocument(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ htmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:htmlParseElement", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (htmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ htmlParseElement(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlParseFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:htmlParseFile", &filename, &encoding))
+ return(NULL);
+
+ c_retval = htmlParseFile(filename, encoding);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:htmlReadDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:htmlReadFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:htmlReadFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadFile(filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ htmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#izzi:htmlReadMemory", &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = htmlReadMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:htmlSaveFile", &filename, &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFile(filename, cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOz:htmlSaveFileEnc", &filename, &pyobj_cur, &encoding))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFileEnc(filename, cur, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_htmlSaveFileFormat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOzi:htmlSaveFileFormat", &filename, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = htmlSaveFileFormat(filename, cur, encoding, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlSetMetaEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ htmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:htmlSetMetaEncoding", &pyobj_doc, &encoding))
+ return(NULL);
+ doc = (htmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = htmlSetMetaEncoding(doc, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
+PyObject *
+libxml_namePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:namePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = namePop(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_namePush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:namePush", &pyobj_ctxt, &value))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = namePush(ctxt, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_nodePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:nodePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = nodePop(ctxt);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_nodePush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr value;
+ PyObject *pyobj_value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:nodePush", &pyobj_ctxt, &pyobj_value))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ value = (xmlNodePtr) PyxmlNode_Get(pyobj_value);
+
+ c_retval = nodePush(ctxt, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_valuePop(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:valuePop", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = valuePop(ctxt);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogAdd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * type;
+ xmlChar * orig;
+ xmlChar * replace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlACatalogAdd", &pyobj_catal, &type, &orig, &replace))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogAdd(catal, type, orig, replace);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlACatalogDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ FILE * out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlACatalogDump", &pyobj_catal, &pyobj_out))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+ out = (FILE *) PyFile_Get(pyobj_out);
+
+ xmlACatalogDump(catal, out);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogRemove(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogRemove", &pyobj_catal, &value))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogRemove(catal, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * pubID;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlACatalogResolve", &pyobj_catal, &pubID, &sysID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolve(catal, pubID, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolvePublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolvePublic", &pyobj_catal, &pubID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolvePublic(catal, pubID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolveSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolveSystem", &pyobj_catal, &sysID))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolveSystem(catal, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlACatalogResolveURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+ xmlChar * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlACatalogResolveURI", &pyobj_catal, &URI))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlACatalogResolveURI(catal, URI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlAddChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddChild", &pyobj_parent, &pyobj_cur))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlAddChild(parent, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddChildList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddChildList", &pyobj_parent, &pyobj_cur))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlAddChildList(parent, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddDocEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlAddDocEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlAddDocEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddDtdEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlAddDtdEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlAddDtdEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * name;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlAddEncodingAlias", &name, &alias))
+ return(NULL);
+
+ c_retval = xmlAddEncodingAlias(name, alias);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlAddNextSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddNextSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddNextSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlAddPrevSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddPrevSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddPrevSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject *
+libxml_xmlAddSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlAddSibling", &pyobj_cur, &pyobj_elem))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlAddSibling(cur, elem);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlBoolToText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ int boolval;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlBoolToText", &boolval))
+ return(NULL);
+
+ c_retval = xmlBoolToText(boolval);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject *
+libxml_xmlBuildQName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * ncname;
+ xmlChar * prefix;
+ xmlChar * memory;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlBuildQName", &ncname, &prefix, &memory, &len))
+ return(NULL);
+
+ c_retval = xmlBuildQName(ncname, prefix, memory, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlBuildRelativeURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlBuildRelativeURI", &URI, &base))
+ return(NULL);
+
+ c_retval = xmlBuildRelativeURI(URI, base);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlBuildURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlBuildURI", &URI, &base))
+ return(NULL);
+
+ c_retval = xmlBuildURI(URI, base);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlByteConsumed", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlByteConsumed(ctxt);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCanonicPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCanonicPath", &path))
+ return(NULL);
+
+ c_retval = xmlCanonicPath(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogAdd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * type;
+ xmlChar * orig;
+ xmlChar * replace;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlCatalogAdd", &type, &orig, &replace))
+ return(NULL);
+
+ c_retval = xmlCatalogAdd(type, orig, replace);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCatalogCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogConvert(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlCatalogConvert();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlCatalogDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCatalogDump", &pyobj_out))
+ return(NULL);
+ out = (FILE *) PyFile_Get(pyobj_out);
+
+ xmlCatalogDump(out);
+ PyFile_Release(out);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogGetPublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogGetPublic", &pubID))
+ return(NULL);
+
+ c_retval = xmlCatalogGetPublic(pubID);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogGetSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogGetSystem", &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogGetSystem(sysID);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogIsEmpty(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCatalogIsEmpty", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlCatalogIsEmpty(catal);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogRemove(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogRemove", &value))
+ return(NULL);
+
+ c_retval = xmlCatalogRemove(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * pubID;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlCatalogResolve", &pubID, &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolve(pubID, sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolvePublic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * pubID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolvePublic", &pubID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolvePublic(pubID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolveSystem(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * sysID;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolveSystem", &sysID))
+ return(NULL);
+
+ c_retval = xmlCatalogResolveSystem(sysID);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogResolveURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCatalogResolveURI", &URI))
+ return(NULL);
+
+ c_retval = xmlCatalogResolveURI(URI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlCatalogSetDebug(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int level;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlCatalogSetDebug", &level))
+ return(NULL);
+
+ c_retval = xmlCatalogSetDebug(level);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlCharStrdup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ char * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCharStrdup", &cur))
+ return(NULL);
+
+ c_retval = xmlCharStrdup(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCharStrndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ char * cur;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCharStrndup", &cur, &len))
+ return(NULL);
+
+ c_retval = xmlCharStrndup(cur, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckFilename", &path))
+ return(NULL);
+
+ c_retval = xmlCheckFilename(path);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckLanguageID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * lang;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckLanguageID", &lang))
+ return(NULL);
+
+ c_retval = xmlCheckLanguageID(lang);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckUTF8(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned char * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCheckUTF8", &utf))
+ return(NULL);
+
+ c_retval = xmlCheckUTF8(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCheckVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int version;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlCheckVersion", &version))
+ return(NULL);
+
+ xmlCheckVersion(version);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupCharEncodingHandlers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupCharEncodingHandlers();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupEncodingAliases(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupEncodingAliases();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupGlobals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupGlobals();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCleanupInputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupInputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlCleanupOutputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupOutputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlCleanupPredefinedEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlCleanupPredefinedEntities();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlClearParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlClearParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlClearParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlConvertSGMLCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlConvertSGMLCatalog", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ c_retval = xmlConvertSGMLCatalog(catal);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlCopyChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int len;
+ xmlChar * out;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"izi:xmlCopyChar", &len, &out, &val))
+ return(NULL);
+
+ c_retval = xmlCopyChar(len, out, val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyCharMultiByte(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * out;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCopyCharMultiByte", &out, &val))
+ return(NULL);
+
+ c_retval = xmlCopyCharMultiByte(out, val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlCopyDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int recursive;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCopyDoc", &pyobj_doc, &recursive))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlCopyDoc(doc, recursive);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlCopyDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyDtd", &pyobj_dtd))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlCopyDtd(dtd);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlCopyError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr from;
+ PyObject *pyobj_from;
+ xmlErrorPtr to;
+ PyObject *pyobj_to;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyError", &pyobj_from, &pyobj_to))
+ return(NULL);
+ from = (xmlErrorPtr) PyError_Get(pyobj_from);
+ to = (xmlErrorPtr) PyError_Get(pyobj_to);
+
+ c_retval = xmlCopyError(from, to);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNamespace", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyNamespace(cur);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNamespaceList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNamespaceList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyNamespaceList(cur);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int extended;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCopyNode", &pyobj_node, &extended))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlCopyNode(node, extended);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCopyNodeList", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlCopyNodeList(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr target;
+ PyObject *pyobj_target;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyProp", &pyobj_target, &pyobj_cur))
+ return(NULL);
+ target = (xmlNodePtr) PyxmlNode_Get(pyobj_target);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyProp(target, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCopyPropList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr target;
+ PyObject *pyobj_target;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlCopyPropList", &pyobj_target, &pyobj_cur))
+ return(NULL);
+ target = (xmlNodePtr) PyxmlNode_Get(pyobj_target);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlCopyPropList(target, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCreateDocParserCtxt", &cur))
+ return(NULL);
+
+ c_retval = xmlCreateDocParserCtxt(cur);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateEntityParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlChar * URL;
+ xmlChar * ID;
+ xmlChar * base;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlCreateEntityParserCtxt", &URL, &ID, &base))
+ return(NULL);
+
+ c_retval = xmlCreateEntityParserCtxt(URL, ID, base);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateFileParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlCreateFileParserCtxt", &filename))
+ return(NULL);
+
+ c_retval = xmlCreateFileParserCtxt(filename);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateIntSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlCreateIntSubset", &pyobj_doc, &name, &ExternalID, &SystemID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlCreateIntSubset(doc, name, ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateMemoryParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlCreateMemoryParserCtxt", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlCreateMemoryParserCtxt(buffer, size);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+
+ c_retval = xmlCreateURI();
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCreateURLParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ char * filename;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlCreateURLParserCtxt", &filename, &options))
+ return(NULL);
+
+ c_retval = xmlCreateURLParserCtxt(filename, options);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:xmlCtxtReadDoc", &pyobj_ctxt, &cur, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadDoc(ctxt, cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:xmlCtxtReadFd", &pyobj_ctxt, &fd, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadFd(ctxt, fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:xmlCtxtReadFile", &pyobj_ctxt, &filename, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadFile(ctxt, filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izzi:xmlCtxtReadMemory", &pyobj_ctxt, &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtReadMemory(ctxt, buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtReset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlCtxtReset", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlCtxtReset(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlCtxtResetPush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ char * filename;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#izz:xmlCtxtResetPush", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &filename, &encoding))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtResetPush(ctxt, chunk, size, filename, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlCtxtUseOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlCtxtUseOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlCtxtUseOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugCheckDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugCheckDocument", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDebugCheckDocument(output, doc);
+ PyFile_Release(output);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpAttr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpAttr", &pyobj_output, &pyobj_attr, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ xmlDebugDumpAttr(output, attr, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpAttrList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpAttrList", &pyobj_output, &pyobj_attr, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ xmlDebugDumpAttrList(output, attr, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDTD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDTD", &pyobj_output, &pyobj_dtd))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ xmlDebugDumpDTD(output, dtd);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDocument", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpDocument(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpDocumentHead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpDocumentHead", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpDocumentHead(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDebugDumpEntities", &pyobj_output, &pyobj_doc))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlDebugDumpEntities(output, doc);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpNode", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpNode(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpNodeList", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpNodeList(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpOneNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ int depth;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDebugDumpOneNode", &pyobj_output, &pyobj_node, &depth))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlDebugDumpOneNode(output, node, depth);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlDebugDumpString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlDebugDumpString", &pyobj_output, &str))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+
+ xmlDebugDumpString(output, str);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int len;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiiccc:xmlDecodeEntities", &pyobj_ctxt, &len, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlDecodeEntities(ctxt, len, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlDefaultSAXHandlerInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlDefaultSAXHandlerInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDelEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlDelEncodingAlias", &alias))
+ return(NULL);
+
+ c_retval = xmlDelEncodingAlias(alias);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlDictCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlDictCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlDocCopyNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int extended;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDocCopyNode", &pyobj_node, &pyobj_doc, &extended))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDocCopyNode(node, doc, extended);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlDocCopyNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocCopyNodeList", &pyobj_doc, &pyobj_node))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlDocCopyNodeList(doc, node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlDocDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocDump", &pyobj_f, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlDocDump(f, cur);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlDocFormatDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlDocFormatDump", &pyobj_f, &pyobj_cur, &format))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlDocFormatDump(f, cur, format);
+ PyFile_Release(f);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlDocGetRootElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlDocGetRootElement", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlDocGetRootElement(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlDocSetRootElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr root;
+ PyObject *pyobj_root;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlDocSetRootElement", &pyobj_doc, &pyobj_root))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ root = (xmlNodePtr) PyxmlNode_Get(pyobj_root);
+
+ c_retval = xmlDocSetRootElement(doc, root);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlElemDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * f;
+ PyObject *pyobj_f;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlElemDump", &pyobj_f, &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ f = (FILE *) PyFile_Get(pyobj_f);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlElemDump(f, doc, cur);
+ PyFile_Release(f);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlEncodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeEntities", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeEntities(doc, input);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlEncodeEntitiesReentrant(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeEntitiesReentrant", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeEntitiesReentrant(doc, input);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlEncodeSpecialChars(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * input;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlEncodeSpecialChars", &pyobj_doc, &input))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlEncodeSpecialChars(doc, input);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetCode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetCode", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->code;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetDomain(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetDomain", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->domain;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetFile", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->file;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetLevel(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetLevel", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->level;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetLine(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetLine", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->line;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlErrorGetMessage(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlErrorPtr Error;
+ PyObject *pyobj_Error;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlErrorGetMessage", &pyobj_Error))
+ return(NULL);
+ Error = (xmlErrorPtr) PyError_Get(pyobj_Error);
+
+ c_retval = Error->message;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlFileMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlFileMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlFileMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlFirstElementChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFirstElementChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlFirstElementChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlFreeCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlCatalogPtr catal;
+ PyObject *pyobj_catal;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeCatalog", &pyobj_catal))
+ return(NULL);
+ catal = (xmlCatalogPtr) Pycatalog_Get(pyobj_catal);
+
+ xmlFreeCatalog(catal);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlFreeDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeDoc", &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeDoc(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDtdPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeDtd", &pyobj_cur))
+ return(NULL);
+ cur = (xmlDtdPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeDtd(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNode", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNode(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNodeList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNodeList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNs", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNs(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeNsList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeNsList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNsPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeNsList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeParserInputBuffer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeParserInputBuffer", &pyobj_in))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ xmlFreeParserInputBuffer(in);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeProp", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreeProp(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreePropList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreePropList", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlFreePropList(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlFreeURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeURI", &pyobj_uri))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ xmlFreeURI(uri);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlGetCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlGetCompressMode();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDocCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetDocCompressMode", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDocCompressMode(doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDocEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDocEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDocEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdAttrDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttributePtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * elem;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetDtdAttrDesc", &pyobj_dtd, &elem, &name))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdAttrDesc(dtd, elem, name);
+ py_retval = libxml_xmlAttributePtrWrap((xmlAttributePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdElementDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlElementPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDtdElementDesc", &pyobj_dtd, &name))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdElementDesc(dtd, name);
+ py_retval = libxml_xmlElementPtrWrap((xmlElementPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetDtdEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetDtdEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdQAttrDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttributePtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * elem;
+ xmlChar * name;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlGetDtdQAttrDesc", &pyobj_dtd, &elem, &name, &prefix))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdQAttrDesc(dtd, elem, name, prefix);
+ py_retval = libxml_xmlAttributePtrWrap((xmlAttributePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetDtdQElementDesc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlElementPtr c_retval;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+ xmlChar * name;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetDtdQElementDesc", &pyobj_dtd, &name, &prefix))
+ return(NULL);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlGetDtdQElementDesc(dtd, name, prefix);
+ py_retval = libxml_xmlElementPtrWrap((xmlElementPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetEncodingAlias(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ char * alias;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlGetEncodingAlias", &alias))
+ return(NULL);
+
+ c_retval = xmlGetEncodingAlias(alias);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * ID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetID", &pyobj_doc, &ID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetID(doc, ID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetIntSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetIntSubset", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetIntSubset(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLastChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNode * parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLastChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNode *) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlGetLastChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlErrorPtr c_retval;
+
+ c_retval = xmlGetLastError();
+ py_retval = libxml_xmlErrorPtrWrap((xmlErrorPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetLineNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetLineNo", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetLineNo(node);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetNoNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetNoNsProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNoNsProp(node, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlGetNodePath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlGetNodePath", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNodePath(node);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+PyObject *
+libxml_xmlGetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlGetNsProp", &pyobj_node, &name, &nameSpace))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetNsProp(node, name, nameSpace);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetParameterEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetParameterEntity", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlGetParameterEntity(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetPredefinedEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlGetPredefinedEntity", &name))
+ return(NULL);
+
+ c_retval = xmlGetPredefinedEntity(name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlGetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlGetProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlGetProp(node, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlHandleEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlEntityPtr entity;
+ PyObject *pyobj_entity;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlHandleEntity", &pyobj_ctxt, &pyobj_entity))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+ entity = (xmlEntityPtr) PyxmlNode_Get(pyobj_entity);
+
+ xmlHandleEntity(ctxt, entity);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlHasNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlHasNsProp", &pyobj_node, &name, &nameSpace))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlHasNsProp(node, name, nameSpace);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlHasProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlHasProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlHasProp(node, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlIOFTPMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlIOFTPMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlIOFTPMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlIOHTTPMatch(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlIOHTTPMatch", &filename))
+ return(NULL);
+
+ c_retval = xmlIOHTTPMatch(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject *
+libxml_xmlInitCharEncodingHandlers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitCharEncodingHandlers();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitGlobals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitGlobals();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitParser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitParser();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlInitParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlInitParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlInitParserCtxt(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlInitializeCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitializeCatalog();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlInitializeDict(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlInitializeDict();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlInitializePredefinedEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlInitializePredefinedEntities();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlIsBaseChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsBaseChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsBaseChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsBlank(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsBlank", &ch))
+ return(NULL);
+
+ c_retval = xmlIsBlank(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsBlankNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlIsBlankNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlIsBlankNode(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsCombining(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsCombining", &ch))
+ return(NULL);
+
+ c_retval = xmlIsCombining(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsDigit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsDigit", &ch))
+ return(NULL);
+
+ c_retval = xmlIsDigit(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsExtender(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsExtender", &ch))
+ return(NULL);
+
+ c_retval = xmlIsExtender(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlIsID", &pyobj_doc, &pyobj_elem, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlIsID(doc, elem, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsIdeographic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsIdeographic", &ch))
+ return(NULL);
+
+ c_retval = xmlIsIdeographic(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsLetter(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int c;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsLetter", &c))
+ return(NULL);
+
+ c_retval = xmlIsLetter(c);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsMixedElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlIsMixedElement", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlIsMixedElement(doc, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsPubidChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ unsigned int ch;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlIsPubidChar", &ch))
+ return(NULL);
+
+ c_retval = xmlIsPubidChar(ch);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlIsRef", &pyobj_doc, &pyobj_elem, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlIsRef(doc, elem, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlIsXHTML(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * systemID;
+ xmlChar * publicID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlIsXHTML", &systemID, &publicID))
+ return(NULL);
+
+ c_retval = xmlIsXHTML(systemID, publicID);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlKeepBlanksDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlKeepBlanksDefault", &val))
+ return(NULL);
+
+ c_retval = xmlKeepBlanksDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlLastElementChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlLastElementChild", &pyobj_parent))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+
+ c_retval = xmlLastElementChild(parent);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlLineNumbersDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlLineNumbersDefault", &val))
+ return(NULL);
+
+ c_retval = xmlLineNumbersDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadACatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadACatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadACatalog(filename);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadCatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadCatalog(filename);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadCatalogs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * pathss;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadCatalogs", &pathss))
+ return(NULL);
+
+ xmlLoadCatalogs(pathss);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlLoadSGMLSuperCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlLoadSGMLSuperCatalog", &filename))
+ return(NULL);
+
+ c_retval = xmlLoadSGMLSuperCatalog(filename);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlLsCountNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlLsCountNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlLsCountNode(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject *
+libxml_xmlLsOneNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlLsOneNode", &pyobj_output, &pyobj_node))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlLsOneNode(output, node);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNamespaceParseNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNamespaceParseNCName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlNamespaceParseNCName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNamespaceParseNSDef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNamespaceParseNSDef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlNamespaceParseNSDef(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoFTPCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoFTPInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * host;
+ int port;
+ char * user;
+ char * passwd;
+ int type;
+
+ if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlNanoFTPProxy", &host, &port, &user, &passwd, &type))
+ return(NULL);
+
+ xmlNanoFTPProxy(host, port, user, passwd, type);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject *
+libxml_xmlNanoFTPScanProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNanoFTPScanProxy", &URL))
+ return(NULL);
+
+ xmlNanoFTPScanProxy(URL);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoHTTPCleanup();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlNanoHTTPInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlNanoHTTPScanProxy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNanoHTTPScanProxy", &URL))
+ return(NULL);
+
+ xmlNanoHTTPScanProxy(URL);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject *
+libxml_xmlNewCDataBlock(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNewCDataBlock", &pyobj_doc, &content, &len))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewCDataBlock(doc, content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlNewCatalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlCatalogPtr c_retval;
+ int sgml;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlNewCatalog", &sgml))
+ return(NULL);
+
+ c_retval = xmlNewCatalog(sgml);
+ py_retval = libxml_xmlCatalogPtrWrap((xmlCatalogPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlNewCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewCharRef", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewCharRef(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlNewChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewChild", &pyobj_parent, &pyobj_ns, &name, &content))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewChild(parent, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlNewComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewComment", &content))
+ return(NULL);
+
+ c_retval = xmlNewComment(content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * version;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewDoc", &version))
+ return(NULL);
+
+ c_retval = xmlNewDoc(version);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewDocComment", &pyobj_doc, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocComment(doc, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewDocFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNewDocFragment", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocFragment(doc);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewDocNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocNode", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocNode(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocNodeEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocNodeEatName", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocNodeEatName(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocPI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewDocPI", &pyobj_doc, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocPI(doc, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewDocProp", &pyobj_doc, &name, &value))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocProp(doc, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewDocRawNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewDocRawNode", &pyobj_doc, &pyobj_ns, &name, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewDocRawNode(doc, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewDocText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewDocText", &pyobj_doc, &content))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocText(doc, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDocTextLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNewDocTextLen", &pyobj_doc, &content, &len))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDocTextLen(doc, content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzz:xmlNewDtd", &pyobj_doc, &name, &ExternalID, &SystemID))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewDtd(doc, name, ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+ int type;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzz:xmlNewEntity", &pyobj_doc, &name, &type, &ExternalID, &SystemID, &content))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewEntity(doc, name, type, ExternalID, SystemID, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlNewGlobalNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * href;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewGlobalNs", &pyobj_doc, &href, &prefix))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewGlobalNs(doc, href, prefix);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlNewNodeEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewNodeEatName", &pyobj_ns, &name))
+ return(NULL);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNodeEatName(ns, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * href;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewNs", &pyobj_node, &href, &prefix))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNewNs(node, href, prefix);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewNsProp", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNsProp(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewNsPropEatName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewNsPropEatName", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewNsPropEatName(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewPI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlNewPI", &name, &content))
+ return(NULL);
+
+ c_retval = xmlNewPI(name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+
+ c_retval = xmlNewParserCtxt();
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlNewProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlNewProp", &pyobj_node, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNewProp(node, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlNewReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewReference", &pyobj_doc, &name))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlNewReference(doc, name);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNewText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewText", &content))
+ return(NULL);
+
+ c_retval = xmlNewText(content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNewTextChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr parent;
+ PyObject *pyobj_parent;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlNewTextChild", &pyobj_parent, &pyobj_ns, &name, &content))
+ return(NULL);
+ parent = (xmlNodePtr) PyxmlNode_Get(pyobj_parent);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlNewTextChild(parent, ns, name, content);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNewTextLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlNewTextLen", &content, &len))
+ return(NULL);
+
+ c_retval = xmlNewTextLen(content, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlNewTextReader(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlParserInputBufferPtr input;
+ PyObject *pyobj_input;
+ char * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNewTextReader", &pyobj_input, &URI))
+ return(NULL);
+ input = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_input);
+
+ c_retval = xmlNewTextReader(input, URI);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlNewTextReaderFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNewTextReaderFilename", &URI))
+ return(NULL);
+
+ c_retval = xmlNewTextReaderFilename(URI);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ xmlValidCtxtPtr c_retval;
+
+ c_retval = xmlNewValidCtxt();
+ py_retval = libxml_xmlValidCtxtPtrWrap((xmlValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+PyObject *
+libxml_xmlNextChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNextChar", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlNextChar(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNextElementSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNextElementSibling", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNextElementSibling(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNodeAddContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeAddContent", &pyobj_cur, &content))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeAddContent(cur, content);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlNodeAddContentLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNodeAddContentLen", &pyobj_cur, &content, &len))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeAddContentLen(cur, content, len);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlNodeDumpOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlOutputBufferPtr buf;
+ PyObject *pyobj_buf;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ int level;
+ int format;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOiiz:xmlNodeDumpOutput", &pyobj_buf, &pyobj_doc, &pyobj_cur, &level, &format, &encoding))
+ return(NULL);
+ buf = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_buf);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeDumpOutput(buf, doc, cur, level, format, encoding);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlNodeGetBase(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlNodeGetBase", &pyobj_doc, &pyobj_cur))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetBase(doc, cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetContent", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetContent(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetLang", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetLang(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeGetSpacePreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeGetSpacePreserve", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNode *) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlNodeGetSpacePreserve(cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNodeIsText(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNode * node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlNodeIsText", &pyobj_node))
+ return(NULL);
+ node = (xmlNode *) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlNodeIsText(node);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeListGetRawString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlNode * list;
+ PyObject *pyobj_list;
+ int inLine;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlNodeListGetRawString", &pyobj_doc, &pyobj_list, &inLine))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+ list = (xmlNode *) PyxmlNode_Get(pyobj_list);
+
+ c_retval = xmlNodeListGetRawString(doc, list, inLine);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNodeListGetString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNode * list;
+ PyObject *pyobj_list;
+ int inLine;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlNodeListGetString", &pyobj_doc, &pyobj_list, &inLine))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ list = (xmlNode *) PyxmlNode_Get(pyobj_list);
+
+ c_retval = xmlNodeListGetString(doc, list, inLine);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlNodeSetBase(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetBase", &pyobj_cur, &uri))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetBase(cur, uri);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject *
+libxml_xmlNodeSetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetContent", &pyobj_cur, &content))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetContent(cur, content);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetContentLen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlNodeSetContentLen", &pyobj_cur, &content, &len))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetContentLen(cur, content, len);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * lang;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetLang", &pyobj_cur, &lang))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetLang(cur, lang);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlNodeSetName", &pyobj_cur, &name))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetName(cur, name);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlNodeSetSpacePreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlNodeSetSpacePreserve", &pyobj_cur, &val))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlNodeSetSpacePreserve(cur, val);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlNormalizeURIPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNormalizeURIPath", &path))
+ return(NULL);
+
+ c_retval = xmlNormalizeURIPath(path);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlNormalizeWindowsPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlNormalizeWindowsPath", &path))
+ return(NULL);
+
+ c_retval = xmlNormalizeWindowsPath(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferGetContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlOutputBufferGetContent", &pyobj_out))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferGetContent(out);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferWrite(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+ int len;
+ char * buf;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiz:xmlOutputBufferWrite", &pyobj_out, &len, &buf))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferWrite(out, len, buf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlOutputBufferWriteString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlOutputBufferPtr out;
+ PyObject *pyobj_out;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlOutputBufferWriteString", &pyobj_out, &str))
+ return(NULL);
+ out = (xmlOutputBufferPtr) PyoutputBuffer_Get(pyobj_out);
+
+ c_retval = xmlOutputBufferWriteString(out, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlParseAttValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseAttValue", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseAttValue(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseAttributeListDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseAttributeListDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseAttributeListDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseCDSect(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseCDSect", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseCDSect(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject *
+libxml_xmlParseCatalogFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseCatalogFile", &filename))
+ return(NULL);
+
+ c_retval = xmlParseCatalogFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject *
+libxml_xmlParseCharData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int cdata;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParseCharData", &pyobj_ctxt, &cdata))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseCharData(ctxt, cdata);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseCharRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseCharRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseCharRef(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_PUSH_ENABLED)
+PyObject *
+libxml_xmlParseChunk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * chunk;
+ int py_buffsize0;
+ int size;
+ int terminate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Os#ii:xmlParseChunk", &pyobj_ctxt, &chunk, &py_buffsize0, &size, &terminate))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseChunk(ctxt, chunk, size, terminate);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+PyObject *
+libxml_xmlParseComment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseComment", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseComment(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseContent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseContent", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseContent(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlParseDTD(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDtdPtr c_retval;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlParseDTD", &ExternalID, &SystemID))
+ return(NULL);
+
+ c_retval = xmlParseDTD(ExternalID, SystemID);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseDoc", &cur))
+ return(NULL);
+
+ c_retval = xmlParseDoc(cur);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseDocTypeDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseDocTypeDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseDocTypeDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseDocument", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseDocument(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseElement", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseElement(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseElementDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseElementDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseElementDecl(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseEncName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEncName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEncName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseEncodingDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEncodingDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEncodingDecl(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseEndTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEndTag", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseEndTag(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseEntity", &filename))
+ return(NULL);
+
+ c_retval = xmlParseEntity(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseEntityDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEntityDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseEntityDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseEntityRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlEntityPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseEntityRef", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseEntityRef(ctxt);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseExtParsedEnt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseExtParsedEnt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseExtParsedEnt(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseExternalSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * ExternalID;
+ xmlChar * SystemID;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlParseExternalSubset", &pyobj_ctxt, &ExternalID, &SystemID))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseExternalSubset(ctxt, ExternalID, SystemID);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseFile", &filename))
+ return(NULL);
+
+ c_retval = xmlParseFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseMarkupDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseMarkupDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseMarkupDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlParseMemory", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlParseMemory(buffer, size);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseMisc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseMisc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseMisc(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseName(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParseNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNamespace", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseNamespace(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParseNmtoken(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNmtoken", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseNmtoken(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseNotationDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseNotationDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseNotationDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePEReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePEReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParsePEReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePI", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParsePI(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParsePITarget(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePITarget", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParsePITarget(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParsePubidLiteral(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParsePubidLiteral", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParsePubidLiteral(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParseQuotedString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseQuotedString", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseQuotedString(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParseReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseSDDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseSDDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseSDDecl(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlParseStartTag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseStartTag", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseStartTag(ctxt);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject *
+libxml_xmlParseSystemLiteral(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseSystemLiteral", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseSystemLiteral(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseTextDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseTextDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseTextDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParseURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParseURI", &str))
+ return(NULL);
+
+ c_retval = xmlParseURI(str);
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseURIRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlURIPtr c_retval;
+ char * str;
+ int raw;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlParseURIRaw", &str, &raw))
+ return(NULL);
+
+ c_retval = xmlParseURIRaw(str, raw);
+ py_retval = libxml_xmlURIPtrWrap((xmlURIPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseURIReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+ char * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlParseURIReference", &pyobj_uri, &str))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ c_retval = xmlParseURIReference(uri, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseVersionInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseVersionInfo", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseVersionInfo(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseVersionNum(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseVersionNum", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlParseVersionNum(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParseXMLDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParseXMLDecl", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParseXMLDecl(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserGetDirectory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ char * c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlParserGetDirectory", &filename))
+ return(NULL);
+
+ c_retval = xmlParserGetDirectory(filename);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetDoc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->myDoc;
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetIsValid", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->valid;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserGetWellFormed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserGetWellFormed", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = ctxt->wellFormed;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserHandlePEReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserHandlePEReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParserHandlePEReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlParserHandleReference(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlParserHandleReference", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlParserHandleReference(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject *
+libxml_xmlParserInputBufferGrow(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserInputBufferGrow", &pyobj_in, &len))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferGrow(in, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserInputBufferPush(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+ char * buf;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiz:xmlParserInputBufferPush", &pyobj_in, &len, &buf))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferPush(in, len, buf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserInputBufferRead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserInputBufferPtr in;
+ PyObject *pyobj_in;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserInputBufferRead", &pyobj_in, &len))
+ return(NULL);
+ in = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_in);
+
+ c_retval = xmlParserInputBufferRead(in, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlParserSetLineNumbers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int linenumbers;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetLineNumbers", &pyobj_ctxt, &linenumbers))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->linenumbers = linenumbers;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetLoadSubset(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int loadsubset;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetLoadSubset", &pyobj_ctxt, &loadsubset))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->loadsubset = loadsubset;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetPedantic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int pedantic;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetPedantic", &pyobj_ctxt, &pedantic))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->pedantic = pedantic;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetReplaceEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int replaceEntities;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetReplaceEntities", &pyobj_ctxt, &replaceEntities))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->replaceEntities = replaceEntities;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlParserSetValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int validate;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlParserSetValidate", &pyobj_ctxt, &validate))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ ctxt->validate = validate;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlPathToURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlPathToURI", &path))
+ return(NULL);
+
+ c_retval = xmlPathToURI(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlPedanticParserDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlPedanticParserDefault", &val))
+ return(NULL);
+
+ c_retval = xmlPedanticParserDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlPopInput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlPopInput", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlPopInput(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlPreviousElementSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlPreviousElementSibling", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlPreviousElementSibling(node);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject *
+libxml_xmlPrintURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * stream;
+ PyObject *pyobj_stream;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlPrintURI", &pyobj_stream, &pyobj_uri))
+ return(NULL);
+ stream = (FILE *) PyFile_Get(pyobj_stream);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ xmlPrintURI(stream, uri);
+ PyFile_Release(stream);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlReadDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlReadDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:xmlReadFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlReadFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadFile(filename, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlReadMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#izzi:xmlReadMemory", &buffer, &py_buffsize0, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReadMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzzi:xmlReaderForDoc", &cur, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForDoc(cur, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"izzi:xmlReaderForFd", &fd, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForFd(fd, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlReaderForFile", &filename, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForFile(filename, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderForMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ char * buffer;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"zizzi:xmlReaderForMemory", &buffer, &size, &URL, &encoding, &options))
+ return(NULL);
+
+ c_retval = xmlReaderForMemory(buffer, size, URL, encoding, options);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * cur;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzzi:xmlReaderNewDoc", &pyobj_reader, &cur, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewDoc(reader, cur, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewFd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int fd;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oizzi:xmlReaderNewFd", &pyobj_reader, &fd, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewFd(reader, fd, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * filename;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozzi:xmlReaderNewFile", &pyobj_reader, &filename, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewFile(reader, filename, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * buffer;
+ int size;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozizzi:xmlReaderNewMemory", &pyobj_reader, &buffer, &size, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlReaderNewMemory(reader, buffer, size, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderNewWalker(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReaderNewWalker", &pyobj_reader, &pyobj_doc))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlReaderNewWalker(reader, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlReaderWalker(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlTextReaderPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlReaderWalker", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlReaderWalker(doc);
+ py_retval = libxml_xmlTextReaderPtrWrap((xmlTextReaderPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject *
+libxml_xmlReconciliateNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReconciliateNs", &pyobj_doc, &pyobj_tree))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlReconciliateNs(doc, tree);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverDoc", &cur))
+ return(NULL);
+
+ c_retval = xmlRecoverDoc(cur);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRecoverFile", &filename))
+ return(NULL);
+
+ c_retval = xmlRecoverFile(filename);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlRecoverMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ char * buffer;
+ int py_buffsize0;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"s#i:xmlRecoverMemory", &buffer, &py_buffsize0, &size))
+ return(NULL);
+
+ c_retval = xmlRecoverMemory(buffer, size);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegFreeRegexp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRegexpPtr regexp;
+ PyObject *pyobj_regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRegFreeRegexp", &pyobj_regexp))
+ return(NULL);
+ regexp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_regexp);
+
+ xmlRegFreeRegexp(regexp);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpCompile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRegexpPtr c_retval;
+ xmlChar * regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRegexpCompile", &regexp))
+ return(NULL);
+
+ c_retval = xmlRegexpCompile(regexp);
+ py_retval = libxml_xmlRegexpPtrWrap((xmlRegexpPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpExec(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRegexpPtr comp;
+ PyObject *pyobj_comp;
+ xmlChar * content;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlRegexpExec", &pyobj_comp, &content))
+ return(NULL);
+ comp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_comp);
+
+ c_retval = xmlRegexpExec(comp, content);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpIsDeterminist(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRegexpPtr comp;
+ PyObject *pyobj_comp;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRegexpIsDeterminist", &pyobj_comp))
+ return(NULL);
+ comp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_comp);
+
+ c_retval = xmlRegexpIsDeterminist(comp);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlRegexpPrint(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRegexpPtr regexp;
+ PyObject *pyobj_regexp;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRegexpPrint", &pyobj_output, &pyobj_regexp))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ regexp = (xmlRegexpPtr) PyxmlReg_Get(pyobj_regexp);
+
+ xmlRegexpPrint(output, regexp);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+PyObject *
+libxml_xmlRegisterDefaultInputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterDefaultInputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRegisterDefaultOutputCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterDefaultOutputCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+PyObject *
+libxml_xmlRegisterHTTPPostCallbacks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRegisterHTTPPostCallbacks();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGCleanupTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlRelaxNGCleanupTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRelaxNGDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGDump", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGDump(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlRelaxNGDumpTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGDumpTree", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGDumpTree(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFree", &pyobj_schema))
+ return(NULL);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ xmlRelaxNGFree(schema);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGInitTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ int c_retval;
+
+ c_retval = xmlRelaxNGInitTypes();
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGNewDocParserCtxt", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlRelaxNGNewDocParserCtxt(doc);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewMemParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ char * buffer;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlRelaxNGNewMemParserCtxt", &buffer, &size))
+ return(NULL);
+
+ c_retval = xmlRelaxNGNewMemParserCtxt(buffer, size);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGParserCtxtPtr c_retval;
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlRelaxNGNewParserCtxt", &URL))
+ return(NULL);
+
+ c_retval = xmlRelaxNGNewParserCtxt(URL);
+ py_retval = libxml_xmlRelaxNGParserCtxtPtrWrap((xmlRelaxNGParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGValidCtxtPtr c_retval;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGNewValidCtxt", &pyobj_schema))
+ return(NULL);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ c_retval = xmlRelaxNGNewValidCtxt(schema);
+ py_retval = libxml_xmlRelaxNGValidCtxtPtrWrap((xmlRelaxNGValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlRelaxNGPtr c_retval;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGParse", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxNGParse(ctxt);
+ py_retval = libxml_xmlRelaxNGPtrWrap((xmlRelaxNGPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRelaxNGValidateDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlRelaxNGValidateDoc(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidateFullElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidateFullElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidateFullElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePopElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidatePopElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidatePopElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePushCData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * data;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlRelaxNGValidatePushCData", &pyobj_ctxt, &data, &len))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxNGValidatePushCData(ctxt, data, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxNGValidatePushElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlRelaxNGValidatePushElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlRelaxNGValidatePushElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlRelaxParserSetFlag(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlRelaxParserSetFlag", &pyobj_ctxt, &flags))
+ return(NULL);
+ ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlRelaxParserSetFlag(ctxt, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlRemoveID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveID", &pyobj_doc, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlRemoveID(doc, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlRemoveProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlAttrPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlRemoveProp", &pyobj_cur))
+ return(NULL);
+ cur = (xmlAttrPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlRemoveProp(cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlRemoveRef(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlRemoveRef", &pyobj_doc, &pyobj_attr))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlRemoveRef(doc, attr);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlReplaceNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr old;
+ PyObject *pyobj_old;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlReplaceNode", &pyobj_old, &pyobj_cur))
+ return(NULL);
+ old = (xmlNodePtr) PyxmlNode_Get(pyobj_old);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlReplaceNode(old, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject *
+libxml_xmlResetError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlErrorPtr err;
+ PyObject *pyobj_err;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlResetError", &pyobj_err))
+ return(NULL);
+ err = (xmlErrorPtr) PyError_Get(pyobj_err);
+
+ xmlResetError(err);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlResetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlResetLastError();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlSAXDefaultVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int version;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSAXDefaultVersion", &version))
+ return(NULL);
+
+ c_retval = xmlSAXDefaultVersion(version);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlSaveFile", &filename, &pyobj_cur))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFile(filename, cur);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOz:xmlSaveFileEnc", &filename, &pyobj_cur, &encoding))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFileEnc(filename, cur, encoding);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFormatFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOi:xmlSaveFormatFile", &filename, &pyobj_cur, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFile(filename, cur, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSaveFormatFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ char * filename;
+ xmlDocPtr cur;
+ PyObject *pyobj_cur;
+ char * encoding;
+ int format;
+
+ if (!PyArg_ParseTuple(args, (char *)"zOzi:xmlSaveFormatFileEnc", &filename, &pyobj_cur, &encoding, &format))
+ return(NULL);
+ cur = (xmlDocPtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlSaveFormatFileEnc(filename, cur, encoding, format);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject *
+libxml_xmlSaveUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlURIPtr uri;
+ PyObject *pyobj_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSaveUri", &pyobj_uri))
+ return(NULL);
+ uri = (xmlURIPtr) PyURI_Get(pyobj_uri);
+
+ c_retval = xmlSaveUri(uri);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlScanName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlScanName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlScanName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaCleanupTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlSchemaCleanupTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaCollapseString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaCollapseString", &value))
+ return(NULL);
+
+ c_retval = xmlSchemaCollapseString(value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlSchemaDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ FILE * output;
+ PyObject *pyobj_output;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaDump", &pyobj_output, &pyobj_schema))
+ return(NULL);
+ output = (FILE *) PyFile_Get(pyobj_output);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ xmlSchemaDump(output, schema);
+ PyFile_Release(output);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFree", &pyobj_schema))
+ return(NULL);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ xmlSchemaFree(schema);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaFreeParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaFreeParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaParserCtxtPtr) PySchemaParserCtxt_Get(pyobj_ctxt);
+
+ xmlSchemaFreeParserCtxt(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaInitTypes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlSchemaInitTypes();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaIsValid", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaIsValid(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewDocParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaNewDocParserCtxt", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlSchemaNewDocParserCtxt(doc);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewMemParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ char * buffer;
+ int size;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlSchemaNewMemParserCtxt", &buffer, &size))
+ return(NULL);
+
+ c_retval = xmlSchemaNewMemParserCtxt(buffer, size);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaParserCtxtPtr c_retval;
+ char * URL;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaNewParserCtxt", &URL))
+ return(NULL);
+
+ c_retval = xmlSchemaNewParserCtxt(URL);
+ py_retval = libxml_xmlSchemaParserCtxtPtrWrap((xmlSchemaParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaNewValidCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaValidCtxtPtr c_retval;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaNewValidCtxt", &pyobj_schema))
+ return(NULL);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ c_retval = xmlSchemaNewValidCtxt(schema);
+ py_retval = libxml_xmlSchemaValidCtxtPtrWrap((xmlSchemaValidCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlSchemaPtr c_retval;
+ xmlSchemaParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaParse", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaParserCtxtPtr) PySchemaParserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaParse(ctxt);
+ py_retval = libxml_xmlSchemaPtrWrap((xmlSchemaPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaSetValidOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlSchemaSetValidOptions", &pyobj_ctxt, &options))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaSetValidOptions(ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidCtxtGetOptions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaValidCtxtGetOptions", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidCtxtGetOptions(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidCtxtGetParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserCtxtPtr c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSchemaValidCtxtGetParserCtxt", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidCtxtGetParserCtxt(ctxt);
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlSchemaValidateDoc(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * filename;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlSchemaValidateFile", &pyobj_ctxt, &filename, &options))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSchemaValidateFile(ctxt, filename, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateOneElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSchemaValidateOneElement", &pyobj_ctxt, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlSchemaValidateOneElement(ctxt, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaValidateSetFilename(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlSchemaValidCtxtPtr vctxt;
+ PyObject *pyobj_vctxt;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlSchemaValidateSetFilename", &pyobj_vctxt, &filename))
+ return(NULL);
+ vctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_vctxt);
+
+ xmlSchemaValidateSetFilename(vctxt, filename);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlSchemaWhiteSpaceReplace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlSchemaWhiteSpaceReplace", &value))
+ return(NULL);
+
+ c_retval = xmlSchemaWhiteSpaceReplace(value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject *
+libxml_xmlSearchNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * nameSpace;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSearchNs", &pyobj_doc, &pyobj_node, &nameSpace))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSearchNs(doc, node, nameSpace);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSearchNsByHref(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNsPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * href;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlSearchNsByHref", &pyobj_doc, &pyobj_node, &href))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSearchNsByHref(doc, node, href);
+ py_retval = libxml_xmlNsPtrWrap((xmlNsPtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSetCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int mode;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSetCompressMode", &mode))
+ return(NULL);
+
+ xmlSetCompressMode(mode);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetDocCompressMode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int mode;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlSetDocCompressMode", &pyobj_doc, &mode))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetDocCompressMode(doc, mode);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetListDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr list;
+ PyObject *pyobj_list;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetListDoc", &pyobj_list, &pyobj_doc))
+ return(NULL);
+ list = (xmlNodePtr) PyxmlNode_Get(pyobj_list);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetListDoc(list, doc);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlSetNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetNs", &pyobj_node, &pyobj_ns))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ xmlSetNs(node, ns);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_xmlSetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlSetNsProp", &pyobj_node, &pyobj_ns, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlSetNsProp(node, ns, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_xmlSetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlAttrPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlSetProp", &pyobj_node, &name, &value))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlSetProp(node, name, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+PyObject *
+libxml_xmlSetTreeDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlSetTreeDoc", &pyobj_tree, &pyobj_doc))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ xmlSetTreeDoc(tree, doc);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject *
+libxml_xmlSetupParserForBuffer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * buffer;
+ char * filename;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlSetupParserForBuffer", &pyobj_ctxt, &buffer, &filename))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlSetupParserForBuffer(ctxt, buffer, filename);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject *
+libxml_xmlShellPrintNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlShellPrintNode", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ xmlShellPrintNode(node);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlShellPrintXPathError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ int errorType;
+ char * arg;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlShellPrintXPathError", &errorType, &arg))
+ return(NULL);
+
+ xmlShellPrintXPathError(errorType, arg);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+PyObject *
+libxml_xmlSkipBlankChars(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlSkipBlankChars", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlSkipBlankChars(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStopParser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlStopParser", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ xmlStopParser(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlStrEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrEqual", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrEqual(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrQEqual(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * pref;
+ xmlChar * name;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzz:xmlStrQEqual", &pref, &name, &str))
+ return(NULL);
+
+ c_retval = xmlStrQEqual(pref, name, str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcasecmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcasecmp", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrcasecmp(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcasestr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcasestr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrcasestr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ xmlChar * add;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcat", &cur, &add))
+ return(NULL);
+
+ c_retval = xmlStrcat(cur, add);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrchr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zc:xmlStrchr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrchr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrcmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrcmp", &str1, &str2))
+ return(NULL);
+
+ c_retval = xmlStrcmp(str1, str2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrdup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlStrdup", &cur))
+ return(NULL);
+
+ c_retval = xmlStrdup(cur);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * str;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oziccc:xmlStringDecodeEntities", &pyobj_ctxt, &str, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlStringDecodeEntities(ctxt, str, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringGetNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlStringGetNodeList", &pyobj_doc, &value))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlStringGetNodeList(doc, value);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringLenDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlParserCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * str;
+ int len;
+ int what;
+ xmlChar end;
+ xmlChar end2;
+ xmlChar end3;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oziiccc:xmlStringLenDecodeEntities", &pyobj_ctxt, &str, &len, &what, &end, &end2, &end3))
+ return(NULL);
+ ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlStringLenDecodeEntities(ctxt, str, len, what, end, end2, end3);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStringLenGetNodeList(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlDoc * doc;
+ PyObject *pyobj_doc;
+ xmlChar * value;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlStringLenGetNodeList", &pyobj_doc, &value, &len))
+ return(NULL);
+ doc = (xmlDoc *) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlStringLenGetNodeList(doc, value, len);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrlen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlStrlen", &str))
+ return(NULL);
+
+ c_retval = xmlStrlen(str);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncasecmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncasecmp", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncasecmp(str1, str2, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ xmlChar * add;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncat", &cur, &add, &len))
+ return(NULL);
+
+ c_retval = xmlStrncat(cur, add, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncatNew(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncatNew", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncatNew(str1, str2, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrncmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * str1;
+ xmlChar * str2;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zzi:xmlStrncmp", &str1, &str2, &len))
+ return(NULL);
+
+ c_retval = xmlStrncmp(str1, str2, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * cur;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlStrndup", &cur, &len))
+ return(NULL);
+
+ c_retval = xmlStrndup(cur, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrstr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlStrstr", &str, &val))
+ return(NULL);
+
+ c_retval = xmlStrstr(str, val);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlStrsub(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+ int start;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zii:xmlStrsub", &str, &start, &len))
+ return(NULL);
+
+ c_retval = xmlStrsub(str, start, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlSubstituteEntitiesDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlSubstituteEntitiesDefault", &val))
+ return(NULL);
+
+ c_retval = xmlSubstituteEntitiesDefault(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlTextConcat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * content;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlTextConcat", &pyobj_node, &content, &len))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlTextConcat(node, content, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlTextMerge(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlNodePtr first;
+ PyObject *pyobj_first;
+ xmlNodePtr second;
+ PyObject *pyobj_second;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextMerge", &pyobj_first, &pyobj_second))
+ return(NULL);
+ first = (xmlNodePtr) PyxmlNode_Get(pyobj_first);
+ second = (xmlNodePtr) PyxmlNode_Get(pyobj_second);
+
+ c_retval = xmlTextMerge(first, second);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderAttributeCount(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderAttributeCount", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderAttributeCount(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderByteConsumed", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderByteConsumed(reader);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderClose", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderClose(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstBaseUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstBaseUri", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstBaseUri(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstEncoding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstEncoding", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstEncoding(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstLocalName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstLocalName", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstLocalName(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstName", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstName(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstNamespaceUri(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstNamespaceUri", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstNamespaceUri(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstPrefix(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstPrefix", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstPrefix(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderConstString", &pyobj_reader, &str))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstString(reader, str);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstValue(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstXmlLang(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstXmlLang", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstXmlLang(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderConstXmlVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderConstXmlVersion", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderConstXmlVersion(reader);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderCurrentDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderCurrentDoc", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderCurrentDoc(reader);
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderCurrentNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderCurrentNode", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderCurrentNode(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderDepth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderDepth", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderDepth(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderExpand(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderExpand", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderExpand(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderGetAttribute", &pyobj_reader, &name))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttribute(reader, name);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttributeNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderGetAttributeNo", &pyobj_reader, &no))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttributeNo(reader, no);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * localName;
+ xmlChar * namespaceURI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderGetAttributeNs", &pyobj_reader, &localName, &namespaceURI))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetAttributeNs(reader, localName, namespaceURI);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserColumnNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetParserColumnNumber", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserColumnNumber(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserLineNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetParserLineNumber", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserLineNumber(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetParserProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int prop;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderGetParserProp", &pyobj_reader, &prop))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetParserProp(reader, prop);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderGetRemainder(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlParserInputBufferPtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderGetRemainder", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderGetRemainder(reader);
+ py_retval = libxml_xmlParserInputBufferPtrWrap((xmlParserInputBufferPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderHasAttributes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderHasAttributes", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderHasAttributes(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderHasValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderHasValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderHasValue(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsDefault(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsDefault", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsDefault(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsEmptyElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsEmptyElement", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsEmptyElement(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsNamespaceDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsNamespaceDecl", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsNamespaceDecl(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderIsValid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderIsValid", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderIsValid(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLocatorBaseURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderLocatorPtr locator;
+ PyObject *pyobj_locator;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderLocatorBaseURI", &pyobj_locator))
+ return(NULL);
+ locator = (xmlTextReaderLocatorPtr) PyxmlTextReaderLocator_Get(pyobj_locator);
+
+ c_retval = xmlTextReaderLocatorBaseURI(locator);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLocatorLineNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderLocatorPtr locator;
+ PyObject *pyobj_locator;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderLocatorLineNumber", &pyobj_locator))
+ return(NULL);
+ locator = (xmlTextReaderLocatorPtr) PyxmlTextReaderLocator_Get(pyobj_locator);
+
+ c_retval = xmlTextReaderLocatorLineNumber(locator);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderLookupNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderLookupNamespace", &pyobj_reader, &prefix))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderLookupNamespace(reader, prefix);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderMoveToAttribute", &pyobj_reader, &name))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttribute(reader, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttributeNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlTextReaderMoveToAttributeNo", &pyobj_reader, &no))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttributeNo(reader, no);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToAttributeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlChar * localName;
+ xmlChar * namespaceURI;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlTextReaderMoveToAttributeNs", &pyobj_reader, &localName, &namespaceURI))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToAttributeNs(reader, localName, namespaceURI);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToElement", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToElement(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToFirstAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToFirstAttribute", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToFirstAttribute(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderMoveToNextAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderMoveToNextAttribute", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderMoveToNextAttribute(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNext", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNext(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNextSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNextSibling", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNextSibling(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNodeType(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNodeType", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNodeType(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderNormalization(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderNormalization", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderNormalization(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderPreserve(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderPreserve", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderPreserve(reader);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderQuoteChar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderQuoteChar", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderQuoteChar(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderRead(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderRead", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderRead(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadAttributeValue", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadAttributeValue(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadInnerXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadInnerXml", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadInnerXml(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadOuterXml(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadOuterXml", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadOuterXml(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadState(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadState", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadState(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderReadString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderReadString", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderReadString(reader);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGSetSchema(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlRelaxNGPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextReaderRelaxNGSetSchema", &pyobj_reader, &pyobj_schema))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ schema = (xmlRelaxNGPtr) PyrelaxNgSchema_Get(pyobj_schema);
+
+ c_retval = xmlTextReaderRelaxNGSetSchema(reader, schema);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * rng;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderRelaxNGValidate", &pyobj_reader, &rng))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderRelaxNGValidate(reader, rng);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderRelaxNGValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderRelaxNGValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ ctxt = (xmlRelaxNGValidCtxtPtr) PyrelaxNgValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSchemaValidate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ char * xsd;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlTextReaderSchemaValidate", &pyobj_reader, &xsd))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderSchemaValidate(reader, xsd);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlSchemaValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOi:xmlTextReaderSchemaValidateCtxt", &pyobj_reader, &pyobj_ctxt, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ ctxt = (xmlSchemaValidCtxtPtr) PySchemaValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetParserProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ int prop;
+ int value;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oii:xmlTextReaderSetParserProp", &pyobj_reader, &prop, &value))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderSetParserProp(reader, prop, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetSchema(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlSchemaPtr schema;
+ PyObject *pyobj_schema;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlTextReaderSetSchema", &pyobj_reader, &pyobj_schema))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ schema = (xmlSchemaPtr) PySchema_Get(pyobj_schema);
+
+ c_retval = xmlTextReaderSetSchema(reader, schema);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderSetup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+ xmlParserInputBufferPtr input;
+ PyObject *pyobj_input;
+ char * URL;
+ char * encoding;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzzi:xmlTextReaderSetup", &pyobj_reader, &pyobj_input, &URL, &encoding, &options))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+ input = (xmlParserInputBufferPtr) PyinputBuffer_Get(pyobj_input);
+
+ c_retval = xmlTextReaderSetup(reader, input, URL, encoding, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject *
+libxml_xmlTextReaderStandalone(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlTextReaderPtr reader;
+ PyObject *pyobj_reader;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlTextReaderStandalone", &pyobj_reader))
+ return(NULL);
+ reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
+
+ c_retval = xmlTextReaderStandalone(reader);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_READER_ENABLED) */
+PyObject *
+libxml_xmlThrDefDefaultBufferSize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefDefaultBufferSize", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefDefaultBufferSize(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefDoValidityCheckingDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefDoValidityCheckingDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefDoValidityCheckingDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefGetWarningsDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefGetWarningsDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefIndentTreeOutput(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefIndentTreeOutput", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefIndentTreeOutput(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefKeepBlanksDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefKeepBlanksDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefLineNumbersDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefLineNumbersDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefLineNumbersDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefLoadExtDtdDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefLoadExtDtdDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefLoadExtDtdDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefParserDebugEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefParserDebugEntities", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefParserDebugEntities(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefPedanticParserDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefPedanticParserDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefPedanticParserDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefSaveNoEmptyTags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefSaveNoEmptyTags", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefSaveNoEmptyTags(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefSubstituteEntitiesDefaultValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlThrDefSubstituteEntitiesDefaultValue", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefSubstituteEntitiesDefaultValue(v);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlThrDefTreeIndentString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ char * v;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlThrDefTreeIndentString", &v))
+ return(NULL);
+
+ c_retval = xmlThrDefTreeIndentString(v);
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsAegeanNumbers(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsAegeanNumbers", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsAegeanNumbers(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsAlphabeticPresentationForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsAlphabeticPresentationForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsAlphabeticPresentationForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabicPresentationFormsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabicPresentationFormsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabicPresentationFormsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArabicPresentationFormsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArabicPresentationFormsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArabicPresentationFormsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArmenian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArmenian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArmenian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsArrows(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsArrows", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsArrows(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBasicLatin(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBasicLatin", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBasicLatin(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBengali(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBengali", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBengali(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBlock(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+ char * block;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlUCSIsBlock", &code, &block))
+ return(NULL);
+
+ c_retval = xmlUCSIsBlock(code, block);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBlockElements(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBlockElements", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBlockElements(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBopomofo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBopomofo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBopomofo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBopomofoExtended(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBopomofoExtended", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBopomofoExtended(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBoxDrawing(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBoxDrawing", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBoxDrawing(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBraillePatterns(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBraillePatterns", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBraillePatterns(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsBuhid(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsBuhid", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsBuhid(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsByzantineMusicalSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsByzantineMusicalSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibility(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibility", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibility(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityIdeographs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityIdeographs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityIdeographs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKCompatibilityIdeographsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKRadicalsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKRadicalsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKRadicalsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKSymbolsandPunctuation(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKSymbolsandPunctuation", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKSymbolsandPunctuation(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographsExtensionA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCJKUnifiedIdeographsExtensionB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+ char * cat;
+
+ if (!PyArg_ParseTuple(args, (char *)"iz:xmlUCSIsCat", &code, &cat))
+ return(NULL);
+
+ c_retval = xmlUCSIsCat(code, cat);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatC(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatC", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatC(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCf", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCf(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatCs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatCs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatCs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatL(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatL", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatL(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLm(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLm", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLm(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLt", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLt(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatLu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatLu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatLu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatM(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatM", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatM(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatMn(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatMn", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatMn(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatN(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatN", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatN(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNd", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNd(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatNo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatNo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatP(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatP", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatP(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPd", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPd(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPf", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPf(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPi(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPi", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPi(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatPs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatPs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatPs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatS(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatS", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatS(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSc", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSc(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSk(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSk", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSk(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSm(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSm", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSm(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatSo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatSo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatSo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZ(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZ", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZ(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZl", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZl(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZp", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZp(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCatZs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCatZs", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCatZs(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCherokee(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCherokee", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCherokee(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningDiacriticalMarks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningDiacriticalMarks", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningDiacriticalMarks(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningDiacriticalMarksforSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningHalfMarks(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningHalfMarks", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningHalfMarks(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCombiningMarksforSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCombiningMarksforSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCombiningMarksforSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsControlPictures(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsControlPictures", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsControlPictures(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCurrencySymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCurrencySymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCurrencySymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCypriotSyllabary(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCypriotSyllabary", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCypriotSyllabary(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCyrillic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCyrillic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCyrillic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsCyrillicSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsCyrillicSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsCyrillicSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDeseret(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDeseret", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDeseret(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDevanagari(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDevanagari", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDevanagari(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsDingbats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsDingbats", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsDingbats(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEnclosedAlphanumerics", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEnclosedAlphanumerics(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEnclosedCJKLettersandMonths(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEnclosedCJKLettersandMonths", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEnclosedCJKLettersandMonths(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsEthiopic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsEthiopic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsEthiopic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeneralPunctuation(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeneralPunctuation", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeneralPunctuation(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeometricShapes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeometricShapes", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeometricShapes(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGeorgian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGeorgian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGeorgian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGothic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGothic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGothic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreek(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreek", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreek(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreekExtended(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreekExtended", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreekExtended(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGreekandCoptic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGreekandCoptic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGreekandCoptic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGujarati(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGujarati", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGujarati(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsGurmukhi(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsGurmukhi", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsGurmukhi(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHalfwidthandFullwidthForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHalfwidthandFullwidthForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHalfwidthandFullwidthForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulCompatibilityJamo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulCompatibilityJamo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulCompatibilityJamo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulJamo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulJamo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulJamo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHangulSyllables(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHangulSyllables", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHangulSyllables(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHanunoo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHanunoo", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHanunoo(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHebrew(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHebrew", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHebrew(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHighPrivateUseSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHighPrivateUseSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHighPrivateUseSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHighSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHighSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHighSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsHiragana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsHiragana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsHiragana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsIPAExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsIPAExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsIPAExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsIdeographicDescriptionCharacters(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsIdeographicDescriptionCharacters", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsIdeographicDescriptionCharacters(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKanbun(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKanbun", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKanbun(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKangxiRadicals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKangxiRadicals", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKangxiRadicals(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKannada(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKannada", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKannada(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKatakana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKatakana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKatakana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKatakanaPhoneticExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKatakanaPhoneticExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKatakanaPhoneticExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKhmer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKhmer", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKhmer(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsKhmerSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsKhmerSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsKhmerSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLao(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLao", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLao(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatin1Supplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatin1Supplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatin1Supplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedAdditional(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedAdditional", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedAdditional(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLatinExtendedB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLatinExtendedB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLatinExtendedB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLetterlikeSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLetterlikeSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLetterlikeSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLimbu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLimbu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLimbu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLinearBIdeograms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLinearBIdeograms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLinearBIdeograms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLinearBSyllabary(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLinearBSyllabary", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLinearBSyllabary(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsLowSurrogates(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsLowSurrogates", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsLowSurrogates(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMalayalam(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMalayalam", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMalayalam(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMathematicalAlphanumericSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMathematicalAlphanumericSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMathematicalAlphanumericSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMathematicalOperators(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMathematicalOperators", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMathematicalOperators(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousMathematicalSymbolsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousMathematicalSymbolsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousSymbolsandArrows(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousSymbolsandArrows", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousSymbolsandArrows(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMiscellaneousTechnical(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMiscellaneousTechnical", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMiscellaneousTechnical(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMongolian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMongolian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMongolian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMusicalSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMusicalSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMusicalSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsMyanmar(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsMyanmar", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsMyanmar(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsNumberForms(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsNumberForms", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsNumberForms(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOgham(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOgham", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOgham(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOldItalic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOldItalic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOldItalic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOpticalCharacterRecognition(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOpticalCharacterRecognition", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOpticalCharacterRecognition(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOriya(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOriya", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOriya(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsOsmanya(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsOsmanya", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsOsmanya(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPhoneticExtensions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPhoneticExtensions", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPhoneticExtensions(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPrivateUse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPrivateUse", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPrivateUse(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsPrivateUseArea(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsPrivateUseArea", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsPrivateUseArea(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsRunic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsRunic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsRunic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsShavian(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsShavian", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsShavian(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSinhala(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSinhala", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSinhala(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSmallFormVariants(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSmallFormVariants", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSmallFormVariants(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSpacingModifierLetters(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSpacingModifierLetters", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSpacingModifierLetters(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSpecials(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSpecials", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSpecials(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSuperscriptsandSubscripts(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSuperscriptsandSubscripts", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSuperscriptsandSubscripts(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalArrowsA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalArrowsA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalArrowsA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalArrowsB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalArrowsB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalArrowsB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementalMathematicalOperators(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementalMathematicalOperators", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementalMathematicalOperators(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementaryPrivateUseAreaA(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementaryPrivateUseAreaA", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementaryPrivateUseAreaA(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSupplementaryPrivateUseAreaB", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSupplementaryPrivateUseAreaB(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsSyriac(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsSyriac", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsSyriac(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTagalog(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTagalog", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTagalog(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTagbanwa(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTagbanwa", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTagbanwa(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTags", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTags(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTaiLe(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTaiLe", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTaiLe(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTaiXuanJingSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTaiXuanJingSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTaiXuanJingSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTamil(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTamil", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTamil(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTelugu(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTelugu", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTelugu(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsThaana(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsThaana", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsThaana(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsThai(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsThai", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsThai(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsTibetan(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsTibetan", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsTibetan(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsUgaritic(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsUgaritic", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsUgaritic(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsUnifiedCanadianAboriginalSyllabics", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsVariationSelectors(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsVariationSelectors", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsVariationSelectors(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsVariationSelectorsSupplement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsVariationSelectorsSupplement", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsVariationSelectorsSupplement(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYiRadicals(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYiRadicals", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYiRadicals(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYiSyllables(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYiSyllables", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYiSyllables(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject *
+libxml_xmlUCSIsYijingHexagramSymbols(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ int code;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlUCSIsYijingHexagramSymbols", &code))
+ return(NULL);
+
+ c_retval = xmlUCSIsYijingHexagramSymbols(code);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+PyObject *
+libxml_xmlURIEscape(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlURIEscape", &str))
+ return(NULL);
+
+ c_retval = xmlURIEscape(str);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIEscapeStr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * str;
+ xmlChar * list;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlURIEscapeStr", &str, &list))
+ return(NULL);
+
+ c_retval = xmlURIEscapeStr(str, list);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetAuthority(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetAuthority", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->authority;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetFragment", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->fragment;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetOpaque(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetOpaque", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->opaque;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetPath", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->path;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetPort(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetPort", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->port;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetQuery(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetQuery", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->query;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetQueryRaw", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->query_raw;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetScheme(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetScheme", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->scheme;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetServer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetServer", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->server;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURIGetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const char * c_retval;
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlURIGetUser", &pyobj_URI))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ c_retval = URI->user;
+ py_retval = libxml_charPtrConstWrap((const char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlURISetAuthority(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * authority;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetAuthority", &pyobj_URI, &authority))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->authority != NULL) xmlFree(URI->authority);
+ URI->authority = (char *)xmlStrdup((const xmlChar *)authority);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetFragment(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * fragment;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetFragment", &pyobj_URI, &fragment))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->fragment != NULL) xmlFree(URI->fragment);
+ URI->fragment = (char *)xmlStrdup((const xmlChar *)fragment);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetOpaque(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * opaque;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetOpaque", &pyobj_URI, &opaque))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->opaque != NULL) xmlFree(URI->opaque);
+ URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetPath(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetPath", &pyobj_URI, &path))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->path != NULL) xmlFree(URI->path);
+ URI->path = (char *)xmlStrdup((const xmlChar *)path);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetPort(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ int port;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlURISetPort", &pyobj_URI, &port))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ URI->port = port;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetQuery(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * query;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetQuery", &pyobj_URI, &query))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->query != NULL) xmlFree(URI->query);
+ URI->query = (char *)xmlStrdup((const xmlChar *)query);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetQueryRaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * query_raw;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetQueryRaw", &pyobj_URI, &query_raw))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->query_raw != NULL) xmlFree(URI->query_raw);
+ URI->query_raw = (char *)xmlStrdup((const xmlChar *)query_raw);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetScheme(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * scheme;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetScheme", &pyobj_URI, &scheme))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->scheme != NULL) xmlFree(URI->scheme);
+ URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetServer(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * server;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetServer", &pyobj_URI, &server))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->server != NULL) xmlFree(URI->server);
+ URI->server = (char *)xmlStrdup((const xmlChar *)server);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURISetUser(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlURIPtr URI;
+ PyObject *pyobj_URI;
+ char * user;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlURISetUser", &pyobj_URI, &user))
+ return(NULL);
+ URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
+
+ if (URI->user != NULL) xmlFree(URI->user);
+ URI->user = (char *)xmlStrdup((const xmlChar *)user);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+PyObject *
+libxml_xmlURIUnescapeString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ char * c_retval;
+ char * str;
+ int len;
+ char * target;
+
+ if (!PyArg_ParseTuple(args, (char *)"ziz:xmlURIUnescapeString", &str, &len, &target))
+ return(NULL);
+
+ c_retval = xmlURIUnescapeString(str, len, target);
+ py_retval = libxml_charPtrWrap((char *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Charcmp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf1;
+ xmlChar * utf2;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlUTF8Charcmp", &utf1, &utf2))
+ return(NULL);
+
+ c_retval = xmlUTF8Charcmp(utf1, utf2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Size(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlUTF8Size", &utf))
+ return(NULL);
+
+ c_retval = xmlUTF8Size(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strlen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlUTF8Strlen", &utf))
+ return(NULL);
+
+ c_retval = xmlUTF8Strlen(utf);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strloc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+ xmlChar * utfchar;
+
+ if (!PyArg_ParseTuple(args, (char *)"zz:xmlUTF8Strloc", &utf, &utfchar))
+ return(NULL);
+
+ c_retval = xmlUTF8Strloc(utf, utfchar);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strndup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * utf;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strndup", &utf, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strndup(utf, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strpos(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlChar * utf;
+ int pos;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strpos", &utf, &pos))
+ return(NULL);
+
+ c_retval = xmlUTF8Strpos(utf, pos);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strsize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * utf;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlUTF8Strsize", &utf, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strsize(utf, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUTF8Strsub(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * utf;
+ int start;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"zii:xmlUTF8Strsub", &utf, &start, &len))
+ return(NULL);
+
+ c_retval = xmlUTF8Strsub(utf, start, len);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
+libxml_xmlUnlinkNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlUnlinkNode", &pyobj_cur))
+ return(NULL);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ xmlUnlinkNode(cur);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlUnsetNsProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlUnsetNsProp", &pyobj_node, &pyobj_ns, &name))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlUnsetNsProp(node, ns, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlUnsetProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlUnsetProp", &pyobj_node, &name))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlUnsetProp(node, name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidCtxtNormalizeAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzz:xmlValidCtxtNormalizeAttributeValue", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &name, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, name, value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidNormalizeAttributeValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * name;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOzz:xmlValidNormalizeAttributeValue", &pyobj_doc, &pyobj_elem, &name, &value))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidNormalizeAttributeValue(doc, elem, name, value);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDocument(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDocument", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDocument(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDocumentFinal(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDocumentFinal", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDocumentFinal(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDtd(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlDtdPtr dtd;
+ PyObject *pyobj_dtd;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateDtd", &pyobj_ctxt, &pyobj_doc, &pyobj_dtd))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ dtd = (xmlDtdPtr) PyxmlNode_Get(pyobj_dtd);
+
+ c_retval = xmlValidateDtd(ctxt, doc, dtd);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateDtdFinal(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateDtdFinal", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateDtdFinal(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidateElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+PyObject *
+libxml_xmlValidateNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateNCName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateNCName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateNMToken(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateNMToken", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateNMToken(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNameValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNameValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNameValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNamesValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNamesValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNamesValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNmtokenValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNmtokenValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNmtokenValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateNmtokensValue(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlValidateNmtokensValue", &value))
+ return(NULL);
+
+ c_retval = xmlValidateNmtokensValue(value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateNotationUse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlChar * notationName;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOz:xmlValidateNotationUse", &pyobj_ctxt, &pyobj_doc, &notationName))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateNotationUse(ctxt, doc, notationName);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlAttrPtr attr;
+ PyObject *pyobj_attr;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOOz:xmlValidateOneAttribute", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &pyobj_attr, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ attr = (xmlAttrPtr) PyxmlNode_Get(pyobj_attr);
+
+ c_retval = xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlValidateOneElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidateOneElement(ctxt, doc, elem);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateOneNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * prefix;
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+ xmlChar * value;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOzOz:xmlValidateOneNamespace", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &prefix, &pyobj_ns, &value))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ c_retval = xmlValidateOneNamespace(ctxt, doc, elem, prefix, ns, value);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePopElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * qname;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:xmlValidatePopElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &qname))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidatePopElement(ctxt, doc, elem, qname);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePushCData(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * data;
+ int len;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozi:xmlValidatePushCData", &pyobj_ctxt, &data, &len))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+
+ c_retval = xmlValidatePushCData(ctxt, data, len);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject *
+libxml_xmlValidatePushElement(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr elem;
+ PyObject *pyobj_elem;
+ xmlChar * qname;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOOz:xmlValidatePushElement", &pyobj_ctxt, &pyobj_doc, &pyobj_elem, &qname))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ elem = (xmlNodePtr) PyxmlNode_Get(pyobj_elem);
+
+ c_retval = xmlValidatePushElement(ctxt, doc, elem, qname);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlValidateQName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * value;
+ int space;
+
+ if (!PyArg_ParseTuple(args, (char *)"zi:xmlValidateQName", &value, &space))
+ return(NULL);
+
+ c_retval = xmlValidateQName(value, space);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject *
+libxml_xmlValidateRoot(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlValidCtxtPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlValidateRoot", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlValidateRoot(ctxt, doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcess(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXIncludeProcess", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXIncludeProcess(doc);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessFlags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXIncludeProcessFlags", &pyobj_doc, &flags))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXIncludeProcessFlags(doc, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXIncludeProcessTree", &pyobj_tree))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlXIncludeProcessTree(tree);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject *
+libxml_xmlXIncludeProcessTreeFlags(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr tree;
+ PyObject *pyobj_tree;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXIncludeProcessTreeFlags", &pyobj_tree, &flags))
+ return(NULL);
+ tree = (xmlNodePtr) PyxmlNode_Get(pyobj_tree);
+
+ c_retval = xmlXIncludeProcessTreeFlags(tree, flags);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathAddValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathAddValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathAddValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathBooleanFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathBooleanFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathBooleanFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastBooleanToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathCastBooleanToNumber", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastBooleanToNumber(val);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastBooleanToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathCastBooleanToString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastBooleanToString(val);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNodeToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathCastNodeToNumber", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlXPathCastNodeToNumber(node);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNodeToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathCastNodeToString", &pyobj_node))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ c_retval = xmlXPathCastNodeToString(node);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNumberToBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathCastNumberToBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastNumberToBoolean(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastNumberToString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathCastNumberToString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastNumberToString(val);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastStringToBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathCastStringToBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastStringToBoolean(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCastStringToNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathCastStringToNumber", &val))
+ return(NULL);
+
+ c_retval = xmlXPathCastStringToNumber(val);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCeilingFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathCeilingFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathCeilingFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCmpNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlNodePtr node1;
+ PyObject *pyobj_node1;
+ xmlNodePtr node2;
+ PyObject *pyobj_node2;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathCmpNodes", &pyobj_node1, &pyobj_node2))
+ return(NULL);
+ node1 = (xmlNodePtr) PyxmlNode_Get(pyobj_node1);
+ node2 = (xmlNodePtr) PyxmlNode_Get(pyobj_node2);
+
+ c_retval = xmlXPathCmpNodes(node1, node2);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCompareValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int inf;
+ int strict;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oii:xmlXPathCompareValues", &pyobj_ctxt, &inf, &strict))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathCompareValues(ctxt, inf, strict);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathConcatFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathConcatFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathConcatFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathContainsFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathContainsFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathContainsFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathContextSetCache(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int active;
+ int value;
+ int options;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oiii:xmlXPathContextSetCache", &pyobj_ctxt, &active, &value, &options))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathContextSetCache(ctxt, active, value, options);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathCountFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathCountFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathCountFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathDivValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathDivValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathDivValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEqualValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathEqualValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathEqualValues(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathErr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int error;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathErr", &pyobj_ctxt, &error))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathErr(ctxt, error);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathEval", &str, &pyobj_ctx))
+ return(NULL);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPathEval(str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEvalExpr(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathEvalExpr", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathEvalExpr(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathEvalExpression(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathEvalExpression", &str, &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathEvalExpression(str, ctxt);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFalseFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathFalseFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFalseFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFloorFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathFloorFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFloorFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFreeContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathFreeContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathFreeContext(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathFreeParserContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathFreeParserContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathFreeParserContext(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlDocPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextDoc", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->doc;
+ py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextNode", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->node;
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextPosition(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextPosition", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->proximityPosition;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetContextSize(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetContextSize", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->contextSize;
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetFunction", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->function;
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathGetFunctionURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathGetFunctionURI", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->functionURI;
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathIdFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathIdFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathIdFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathInit(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+
+ xmlXPathInit();
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathIsInf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathIsInf", &val))
+ return(NULL);
+
+ c_retval = xmlXPathIsInf(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject *
+libxml_xmlXPathIsNaN(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathIsNaN", &val))
+ return(NULL);
+
+ c_retval = xmlXPathIsNaN(val);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathIsNodeType(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathIsNodeType", &name))
+ return(NULL);
+
+ c_retval = xmlXPathIsNodeType(name);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLangFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLangFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLangFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLastFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLastFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLastFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathLocalNameFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathLocalNameFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathLocalNameFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathModValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathModValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathModValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathMultValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathMultValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathMultValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNamespaceURIFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNamespaceURIFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNamespaceURIFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ int val;
+
+ if (!PyArg_ParseTuple(args, (char *)"i:xmlXPathNewBoolean", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewBoolean(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewCString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ char * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathNewCString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewCString(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewContext", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXPathNewContext(doc);
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewFloat(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ double val;
+
+ if (!PyArg_ParseTuple(args, (char *)"d:xmlXPathNewFloat", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewFloat(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewNodeSet(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr val;
+ PyObject *pyobj_val;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewNodeSet", &pyobj_val))
+ return(NULL);
+ val = (xmlNodePtr) PyxmlNode_Get(pyobj_val);
+
+ c_retval = xmlXPathNewNodeSet(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewParserContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathParserContextPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPathNewParserContext", &str, &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNewParserContext(str, ctxt);
+ py_retval = libxml_xmlXPathParserContextPtrWrap((xmlXPathParserContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * val;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathNewString", &val))
+ return(NULL);
+
+ c_retval = xmlXPathNewString(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNewValueTree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr val;
+ PyObject *pyobj_val;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNewValueTree", &pyobj_val))
+ return(NULL);
+ val = (xmlNodePtr) PyxmlNode_Get(pyobj_val);
+
+ c_retval = xmlXPathNewValueTree(val);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAncestor(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAncestor", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAncestor(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAncestorOrSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAncestorOrSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAncestorOrSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextAttribute(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextAttribute", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextAttribute(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextChild(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextChild", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextChild(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextDescendant(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextDescendant", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextDescendant(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextDescendantOrSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextDescendantOrSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextDescendantOrSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextFollowing(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextFollowing", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextFollowing(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextFollowingSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextFollowingSibling", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextFollowingSibling(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextNamespace(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextNamespace", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextNamespace(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextParent(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextParent", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextParent(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextPreceding(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextPreceding", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextPreceding(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextPrecedingSibling(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextPrecedingSibling", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextPrecedingSibling(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNextSelf(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlNodePtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr cur;
+ PyObject *pyobj_cur;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathNextSelf", &pyobj_ctxt, &pyobj_cur))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+ cur = (xmlNodePtr) PyxmlNode_Get(pyobj_cur);
+
+ c_retval = xmlXPathNextSelf(ctxt, cur);
+ py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNodeEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"OzO:xmlXPathNodeEval", &pyobj_node, &str, &pyobj_ctx))
+ return(NULL);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPathNodeEval(node, str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNodeSetFreeNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlNsPtr ns;
+ PyObject *pyobj_ns;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNodeSetFreeNs", &pyobj_ns))
+ return(NULL);
+ ns = (xmlNsPtr) PyxmlNode_Get(pyobj_ns);
+
+ xmlXPathNodeSetFreeNs(ns);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNormalizeFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNormalizeFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNormalizeFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNotEqualValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathNotEqualValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNotEqualValues(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNotFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNotFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNotFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNsLookup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ const xmlChar * c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * prefix;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlXPathNsLookup", &pyobj_ctxt, &prefix))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathNsLookup(ctxt, prefix);
+ py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathNumberFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathNumberFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathNumberFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathOrderDocElems(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ long c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathOrderDocElems", &pyobj_doc))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ c_retval = xmlXPathOrderDocElems(doc);
+ py_retval = libxml_longWrap((long) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParseNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParseNCName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathParseNCName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParseName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParseName", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathParseName(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathParserGetContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathParserGetContext", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = ctxt->context;
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopBoolean(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopBoolean", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopBoolean(ctxt);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopNumber", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopNumber(ctxt);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPopString(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathPopString", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathPopString(ctxt);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathPositionFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathPositionFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathPositionFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisterAllFunctions(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisterAllFunctions", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisterAllFunctions(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisterNs(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ int c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * prefix;
+ xmlChar * ns_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlXPathRegisterNs", &pyobj_ctxt, &prefix, &ns_uri))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathRegisterNs(ctxt, prefix, ns_uri);
+ py_retval = libxml_intWrap((int) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredFuncsCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredFuncsCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredFuncsCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredNsCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredNsCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredNsCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRegisteredVariablesCleanup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRegisteredVariablesCleanup", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ xmlXPathRegisteredVariablesCleanup(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRoot(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathRoot", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathRoot(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathRoundFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathRoundFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathRoundFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSetContextDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathSetContextDoc", &pyobj_ctxt, &pyobj_doc))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+
+ ctxt->doc = doc;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSetContextNode(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlNodePtr node;
+ PyObject *pyobj_node;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPathSetContextNode", &pyobj_ctxt, &pyobj_node))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+ node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
+
+ ctxt->node = node;
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStartsWithFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStartsWithFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStartsWithFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringEvalNumber(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ double c_retval;
+ xmlChar * str;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlXPathStringEvalNumber", &str))
+ return(NULL);
+
+ c_retval = xmlXPathStringEvalNumber(str);
+ py_retval = libxml_doubleWrap((double) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStringFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStringFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathStringLengthFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathStringLengthFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathStringLengthFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubValues(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathSubValues", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubValues(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringAfterFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringAfterFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringAfterFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringBeforeFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringBeforeFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringBeforeFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSubstringFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSubstringFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSubstringFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathSumFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathSumFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathSumFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathTranslateFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathTranslateFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathTranslateFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathTrueFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPathTrueFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathTrueFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathValueFlipSign(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPathValueFlipSign", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPathValueFlipSign(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathVariableLookup(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * name;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oz:xmlXPathVariableLookup", &pyobj_ctxt, &name))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathVariableLookup(ctxt, name);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPathVariableLookupNS(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlXPathContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ xmlChar * name;
+ xmlChar * ns_uri;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozz:xmlXPathVariableLookupNS", &pyobj_ctxt, &name, &ns_uri))
+ return(NULL);
+ ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt);
+
+ c_retval = xmlXPathVariableLookupNS(ctxt, name, ns_uri);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject *
+libxml_xmlXPatherror(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ char * file;
+ int line;
+ int no;
+
+ if (!PyArg_ParseTuple(args, (char *)"Ozii:xmlXPatherror", &pyobj_ctxt, &file, &line, &no))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPatherror(ctxt, file, line, no);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrEval(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlChar * str;
+ xmlXPathContextPtr ctx;
+ PyObject *pyobj_ctx;
+
+ if (!PyArg_ParseTuple(args, (char *)"zO:xmlXPtrEval", &str, &pyobj_ctx))
+ return(NULL);
+ ctx = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctx);
+
+ c_retval = xmlXPtrEval(str, ctx);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrEvalRangePredicate(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPtrEvalRangePredicate", &pyobj_ctxt))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPtrEvalRangePredicate(ctxt);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewCollapsedRange(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+
+ if (!PyArg_ParseTuple(args, (char *)"O:xmlXPtrNewCollapsedRange", &pyobj_start))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+
+ c_retval = xmlXPtrNewCollapsedRange(start);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewContext(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathContextPtr c_retval;
+ xmlDocPtr doc;
+ PyObject *pyobj_doc;
+ xmlNodePtr here;
+ PyObject *pyobj_here;
+ xmlNodePtr origin;
+ PyObject *pyobj_origin;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOO:xmlXPtrNewContext", &pyobj_doc, &pyobj_here, &pyobj_origin))
+ return(NULL);
+ doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
+ here = (xmlNodePtr) PyxmlNode_Get(pyobj_here);
+ origin = (xmlNodePtr) PyxmlNode_Get(pyobj_origin);
+
+ c_retval = xmlXPtrNewContext(doc, here, origin);
+ py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewLocationSetNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPtrNewLocationSetNodes", &pyobj_start, &pyobj_end))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewLocationSetNodes(start, end);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewRange(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ int startindex;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+ int endindex;
+
+ if (!PyArg_ParseTuple(args, (char *)"OiOi:xmlXPtrNewRange", &pyobj_start, &startindex, &pyobj_end, &endindex))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewRange(start, startindex, end, endindex);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrNewRangeNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlXPathObjectPtr c_retval;
+ xmlNodePtr start;
+ PyObject *pyobj_start;
+ xmlNodePtr end;
+ PyObject *pyobj_end;
+
+ if (!PyArg_ParseTuple(args, (char *)"OO:xmlXPtrNewRangeNodes", &pyobj_start, &pyobj_end))
+ return(NULL);
+ start = (xmlNodePtr) PyxmlNode_Get(pyobj_start);
+ end = (xmlNodePtr) PyxmlNode_Get(pyobj_end);
+
+ c_retval = xmlXPtrNewRangeNodes(start, end);
+ py_retval = libxml_xmlXPathObjectPtrWrap((xmlXPathObjectPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject *
+libxml_xmlXPtrRangeToFunction(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ xmlXPathParserContextPtr ctxt;
+ PyObject *pyobj_ctxt;
+ int nargs;
+
+ if (!PyArg_ParseTuple(args, (char *)"Oi:xmlXPtrRangeToFunction", &pyobj_ctxt, &nargs))
+ return(NULL);
+ ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt);
+
+ xmlXPtrRangeToFunction(ctxt, nargs);
+ Py_INCREF(Py_None);
+ return(Py_None);
+}
+
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/python/libxml2-py.h b/python/libxml2-py.h
new file mode 100644
index 0000000..9787b0d
--- /dev/null
+++ b/python/libxml2-py.h
@@ -0,0 +1,2063 @@
+/* Generated */
+
+#if defined(LIBXML_DOCB_ENABLED)
+PyObject * libxml_docbDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DOCB_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlAutoCloseTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreateFileParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreateMemoryParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCreatePushParser(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReadMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtReset(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlCtxtUseOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocContentDumpFormatOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocContentDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlDocDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlGetMetaEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlHandleOmittedElem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlInitAutoClose(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsAutoClosed(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsBooleanAttr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlIsScriptAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewDocNoDtD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFileFormat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpFormatOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlNodeDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseCharRef(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+PyObject * libxml_htmlParseChunk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlParseFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlReadMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlSAXParseFile(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_htmlSaveFileFormat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_htmlSetMetaEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTML_ENABLED) */
+PyObject * libxml_namePop(PyObject *self, PyObject *args);
+PyObject * libxml_namePush(PyObject *self, PyObject *args);
+PyObject * libxml_nodePop(PyObject *self, PyObject *args);
+PyObject * libxml_nodePush(PyObject *self, PyObject *args);
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_valuePop(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogAdd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlACatalogDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogRemove(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolvePublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolveSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlACatalogResolveURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlAddChild(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddChildList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddDocEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddDtdEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlAddNextSibling(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlAddPrevSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject * libxml_xmlAddSibling(PyObject *self, PyObject *args);
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlBoolToText(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlBuildQName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlBuildRelativeURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlBuildURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlByteConsumed(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCanonicPath(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogAdd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogConvert(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlCatalogDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogGetPublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogGetSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogIsEmpty(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogRemove(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolvePublic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolveSystem(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogResolveURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlCatalogSetDebug(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlCharStrdup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCharStrndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckFilename(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckLanguageID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckUTF8(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCheckVersion(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupCharEncodingHandlers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupEncodingAliases(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupGlobals(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCleanupInputCallbacks(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlCleanupOutputCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlCleanupPredefinedEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlClearParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlConvertSGMLCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlCopyChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyCharMultiByte(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlCopyDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlCopyDtd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlCopyError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNamespace(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNamespaceList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCopyPropList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateDocParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateEntityParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateFileParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateInputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateIntSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateMemoryParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateOutputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreatePushParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCreateURLParserCtxt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadFd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReadMemory(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtReset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtResetPush(PyObject *self, PyObject *args);
+PyObject * libxml_xmlCtxtUseOptions(PyObject *self, PyObject *args);
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugCheckDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpAttr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpAttrList(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDTD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpDocumentHead(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpNodeList(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpOneNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlDebugDumpString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlDebugMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlDecodeEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlDefaultSAXHandlerInit(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDelEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDictCleanup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDocCopyNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlDocCopyNodeList(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlDocDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlDocFormatDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlDocGetRootElement(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlDocSetRootElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject * libxml_xmlDumpMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlElemDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlEncodeEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlEncodeEntitiesReentrant(PyObject *self, PyObject *args);
+PyObject * libxml_xmlEncodeSpecialChars(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetCode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetDomain(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetLevel(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetLine(PyObject *self, PyObject *args);
+PyObject * libxml_xmlErrorGetMessage(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFileMatch(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlFirstElementChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlFreeCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlFreeDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeDtd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeNsList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeParserInputBuffer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreePropList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlFreeURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDocCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDocEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdAttrDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdElementDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdQAttrDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetDtdQElementDesc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetEncodingAlias(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetIntSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLastChild(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLastError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetLineNo(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetNoNsProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlGetNodePath(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlGetNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetParameterEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetPredefinedEntity(PyObject *self, PyObject *args);
+PyObject * libxml_xmlGetProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlHandleEntity(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlHasNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlHasProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlIOFTPMatch(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlIOHTTPMatch(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject * libxml_xmlInitCharEncodingHandlers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitGlobals(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlInitParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlInitializeCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlInitializeDict(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlInitializePredefinedEntities(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlIsBaseChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsBlank(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsBlankNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsCombining(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsDigit(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsExtender(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsIdeographic(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsLetter(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsMixedElement(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsPubidChar(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsRef(PyObject *self, PyObject *args);
+PyObject * libxml_xmlIsXHTML(PyObject *self, PyObject *args);
+PyObject * libxml_xmlKeepBlanksDefault(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlLastElementChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlLineNumbersDefault(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadACatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadCatalogs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlLoadSGMLSuperCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlLsCountNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED)
+PyObject * libxml_xmlLsOneNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) */
+PyObject * libxml_xmlMemoryUsed(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNamespaceParseNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNamespaceParseNSDef(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_FTP_ENABLED)
+PyObject * libxml_xmlNanoFTPScanProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_FTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlNanoHTTPScanProxy(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_HTTP_ENABLED) */
+PyObject * libxml_xmlNewCDataBlock(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlNewCatalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlNewCharRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlNewChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlNewComment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocComment(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewDocFragment(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewDocNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocNodeEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocPI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocProp(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewDocRawNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewDocText(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDocTextLen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewDtd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewEntity(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlNewGlobalNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlNewNode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNodeEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNsProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewNsPropEatName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewPI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewParserCtxt(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlNewProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlNewReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNewText(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNewTextChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNewTextLen(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlNewTextReader(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlNewTextReaderFilename(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+PyObject * libxml_xmlNextChar(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNextElementSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNodeAddContent(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeAddContentLen(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlNodeDumpOutput(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlNodeGetBase(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetContent(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetLang(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetNsDefs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeGetSpacePreserve(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeIsText(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeListGetRawString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNodeListGetString(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlNodeSetBase(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) */
+PyObject * libxml_xmlNodeSetContent(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetContentLen(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetLang(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlNodeSetSpacePreserve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlNormalizeURIPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNormalizeWindowsPath(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferGetContent(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferWrite(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlOutputBufferWriteString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlParseAttValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseAttributeListDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseCDSect(PyObject *self, PyObject *args);
+#if defined(LIBXML_CATALOG_ENABLED)
+PyObject * libxml_xmlParseCatalogFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_CATALOG_ENABLED) */
+PyObject * libxml_xmlParseCharData(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseCharRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_PUSH_ENABLED)
+PyObject * libxml_xmlParseChunk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_PUSH_ENABLED) */
+PyObject * libxml_xmlParseComment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseContent(PyObject *self, PyObject *args);
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlParseDTD(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseDocTypeDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseDocument(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseElement(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseElementDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEncName(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEncodingDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseEndTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseEntity(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseEntityDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseEntityRef(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseExtParsedEnt(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseExternalSubset(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseMarkupDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseMisc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseName(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParseNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParseNmtoken(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseNotationDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePEReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePITarget(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParsePubidLiteral(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParseQuotedString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParseReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseSDDecl(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlParseStartTag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlParseSystemLiteral(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseTextDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURIRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseURIReference(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseVersionInfo(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseVersionNum(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParseXMLDecl(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetDirectory(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetIsValid(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserGetWellFormed(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserHandlePEReference(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlParserHandleReference(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+PyObject * libxml_xmlParserInputBufferGrow(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserInputBufferPush(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserInputBufferRead(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetLineNumbers(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetLoadSubset(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetPedantic(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetReplaceEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlParserSetValidate(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPathToURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPedanticParserDefault(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPopInput(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlPreviousElementSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+PyObject * libxml_xmlPrintURI(PyObject *self, PyObject *args);
+PyObject * libxml_xmlPythonCleanupParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadFd(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadFile(PyObject *self, PyObject *args);
+PyObject * libxml_xmlReadMemory(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderForMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewFd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderNewWalker(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlReaderWalker(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED)
+PyObject * libxml_xmlReconciliateNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlRecoverMemory(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegFreeRegexp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpCompile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpExec(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpIsDeterminist(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlRegexpPrint(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_REGEXP_ENABLED) */
+PyObject * libxml_xmlRegisterDefaultInputCallbacks(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRegisterDefaultOutputCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+PyObject * libxml_xmlRegisterHTTPPostCallbacks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlRegisterXPathFunction(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGCleanupTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRelaxNGDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlRelaxNGDumpTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGFree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGInitTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewDocParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewMemParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGParse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidateDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidateFullElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePopElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePushCData(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxNGValidatePushElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlRelaxParserSetFlag(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlRemoveID(PyObject *self, PyObject *args);
+PyObject * libxml_xmlRemoveProp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlRemoveRef(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlReplaceNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+PyObject * libxml_xmlResetError(PyObject *self, PyObject *args);
+PyObject * libxml_xmlResetLastError(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlSAXDefaultVersion(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+PyObject * libxml_xmlSAXParseFile(PyObject *self, PyObject *args);
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFormatFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSaveFormatFileEnc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_OUTPUT_ENABLED) */
+PyObject * libxml_xmlSaveUri(PyObject *self, PyObject *args);
+#if defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlScanName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaCleanupTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaCollapseString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlSchemaDump(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaFree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaFreeParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaInitTypes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaIsValid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewDocParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewMemParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaNewValidCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaParse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaSetValidOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidCtxtGetOptions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidCtxtGetParserCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateFile(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateOneElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaValidateSetFilename(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlSchemaWhiteSpaceReplace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SCHEMAS_ENABLED) */
+PyObject * libxml_xmlSearchNs(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSearchNsByHref(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetDocCompressMode(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetEntityLoader(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetListDoc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSetNs(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_xmlSetNsProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+PyObject * libxml_xmlSetProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+PyObject * libxml_xmlSetTreeDoc(PyObject *self, PyObject *args);
+#if defined(LIBXML_SAX1_ENABLED)
+PyObject * libxml_xmlSetupParserForBuffer(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_SAX1_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+PyObject * libxml_xmlShellPrintNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) */
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlShellPrintXPathError(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) */
+PyObject * libxml_xmlSkipBlankChars(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStopParser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrEqual(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrQEqual(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcasecmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcasestr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrchr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrcmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrdup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringDecodeEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringGetNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringLenDecodeEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStringLenGetNodeList(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrlen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncasecmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncatNew(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrncmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrstr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlStrsub(PyObject *self, PyObject *args);
+PyObject * libxml_xmlSubstituteEntitiesDefault(PyObject *self, PyObject *args);
+PyObject * libxml_xmlTextConcat(PyObject *self, PyObject *args);
+PyObject * libxml_xmlTextMerge(PyObject *self, PyObject *args);
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderAttributeCount(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderByteConsumed(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderClose(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstBaseUri(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstEncoding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstLocalName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstNamespaceUri(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstPrefix(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstXmlLang(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderConstXmlVersion(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderCurrentDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderCurrentNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderDepth(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderExpand(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttributeNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetAttributeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserColumnNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserLineNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetParserProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderGetRemainder(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderHasAttributes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderHasValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsDefault(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsEmptyElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsNamespaceDecl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderIsValid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLocatorBaseURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLocatorLineNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderLookupNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttributeNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToAttributeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToFirstAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderMoveToNextAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNextSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNodeType(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderNormalization(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderPreserve(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderQuoteChar(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderRead(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlTextReaderReadInnerXml(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED)
+PyObject * libxml_xmlTextReaderReadOuterXml(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadState(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderReadString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGSetSchema(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGValidate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderRelaxNGValidateCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSchemaValidate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSchemaValidateCtxt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderSetParserProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlTextReaderSetSchema(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderSetup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+#if defined(LIBXML_READER_ENABLED)
+PyObject * libxml_xmlTextReaderStandalone(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_READER_ENABLED) */
+PyObject * libxml_xmlThrDefDefaultBufferSize(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefDoValidityCheckingDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefGetWarningsDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefIndentTreeOutput(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefKeepBlanksDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefLineNumbersDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefLoadExtDtdDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefParserDebugEntities(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefPedanticParserDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefSaveNoEmptyTags(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefSubstituteEntitiesDefaultValue(PyObject *self, PyObject *args);
+PyObject * libxml_xmlThrDefTreeIndentString(PyObject *self, PyObject *args);
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsAegeanNumbers(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsAlphabeticPresentationForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabicPresentationFormsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArabicPresentationFormsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArmenian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsArrows(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBasicLatin(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBengali(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBlock(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBlockElements(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBopomofo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBopomofoExtended(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBoxDrawing(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBraillePatterns(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsBuhid(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsByzantineMusicalSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibility(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityIdeographs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKCompatibilityIdeographsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKRadicalsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKSymbolsandPunctuation(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCJKUnifiedIdeographsExtensionB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatC(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatCs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatL(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLm(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLt(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatLu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatM(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatMn(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatN(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatNo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatP(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPi(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatPs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatS(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSk(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSm(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatSo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZ(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZl(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCatZs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCherokee(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningDiacriticalMarks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningDiacriticalMarksforSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningHalfMarks(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCombiningMarksforSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsControlPictures(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCurrencySymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCypriotSyllabary(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCyrillic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsCyrillicSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDeseret(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDevanagari(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsDingbats(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEnclosedAlphanumerics(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEnclosedCJKLettersandMonths(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsEthiopic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeneralPunctuation(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeometricShapes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGeorgian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGothic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreek(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreekExtended(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGreekandCoptic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGujarati(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsGurmukhi(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHalfwidthandFullwidthForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulCompatibilityJamo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulJamo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHangulSyllables(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHanunoo(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHebrew(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHighPrivateUseSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHighSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsHiragana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsIPAExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsIdeographicDescriptionCharacters(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKanbun(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKangxiRadicals(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKannada(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKatakana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKatakanaPhoneticExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKhmer(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsKhmerSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLao(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatin1Supplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedAdditional(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLatinExtendedB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLetterlikeSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLimbu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLinearBIdeograms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLinearBSyllabary(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsLowSurrogates(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMalayalam(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMathematicalAlphanumericSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMathematicalOperators(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousMathematicalSymbolsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousMathematicalSymbolsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousSymbolsandArrows(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMiscellaneousTechnical(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMongolian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMusicalSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsMyanmar(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsNumberForms(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOgham(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOldItalic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOpticalCharacterRecognition(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOriya(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsOsmanya(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPhoneticExtensions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPrivateUse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsPrivateUseArea(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsRunic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsShavian(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSinhala(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSmallFormVariants(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSpacingModifierLetters(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSpecials(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSuperscriptsandSubscripts(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalArrowsA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalArrowsB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementalMathematicalOperators(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementaryPrivateUseAreaA(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSupplementaryPrivateUseAreaB(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsSyriac(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTagalog(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTagbanwa(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTaiLe(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTaiXuanJingSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTamil(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTelugu(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsThaana(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsThai(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsTibetan(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsUgaritic(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsUnifiedCanadianAboriginalSyllabics(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsVariationSelectors(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsVariationSelectorsSupplement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYiRadicals(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYiSyllables(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+#if defined(LIBXML_UNICODE_ENABLED)
+PyObject * libxml_xmlUCSIsYijingHexagramSymbols(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_UNICODE_ENABLED) */
+PyObject * libxml_xmlURIEscape(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIEscapeStr(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetAuthority(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetFragment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetOpaque(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetPort(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetQuery(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetQueryRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetScheme(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetServer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIGetUser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetAuthority(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetFragment(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetOpaque(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetPath(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetPort(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetQuery(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetQueryRaw(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetScheme(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetServer(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURISetUser(PyObject *self, PyObject *args);
+PyObject * libxml_xmlURIUnescapeString(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Charcmp(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Size(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strlen(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strloc(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strndup(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strpos(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strsize(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUTF8Strsub(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUnlinkNode(PyObject *self, PyObject *args);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlUnsetNsProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlUnsetProp(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidCtxtNormalizeAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidNormalizeAttributeValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDocument(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDocumentFinal(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDtd(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateDtdFinal(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+PyObject * libxml_xmlValidateNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateNMToken(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNameValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNamesValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNmtokenValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateNmtokensValue(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateNotationUse(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateOneNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePopElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePushCData(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+PyObject * libxml_xmlValidatePushElement(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlValidateQName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_VALID_ENABLED)
+PyObject * libxml_xmlValidateRoot(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_VALID_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcess(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessFlags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XINCLUDE_ENABLED)
+PyObject * libxml_xmlXIncludeProcessTreeFlags(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XINCLUDE_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathAddValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathBooleanFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastBooleanToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastBooleanToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNodeToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNodeToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNumberToBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastNumberToString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastStringToBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCastStringToNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCeilingFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCmpNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCompareValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathConcatFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathContainsFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathContextSetCache(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathCountFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathDivValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEqualValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathErr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEvalExpr(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathEvalExpression(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFalseFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFloorFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFreeContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathFreeParserContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextPosition(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetContextSize(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathGetFunctionURI(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathIdFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathInit(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathIsInf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+PyObject * libxml_xmlXPathIsNaN(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathIsNodeType(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLangFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLastFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathLocalNameFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathModValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathMultValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNamespaceURIFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewCString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewFloat(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewNodeSet(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewParserContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNewValueTree(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAncestor(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAncestorOrSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextAttribute(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextChild(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextDescendant(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextDescendantOrSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextFollowing(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextFollowingSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextNamespace(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextParent(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextPreceding(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextPrecedingSibling(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNextSelf(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNodeEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNodeSetFreeNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNormalizeFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNotEqualValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNotFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNsLookup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathNumberFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathOrderDocElems(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParseNCName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParseName(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathParserGetContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopBoolean(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPopString(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathPositionFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterAllFunctions(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterNs(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisterVariable(PyObject *self, PyObject *args);
+#endif
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredFuncsCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredNsCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRegisteredVariablesCleanup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRoot(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathRoundFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSetContextDoc(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSetContextNode(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStartsWithFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringEvalNumber(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathStringLengthFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubValues(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringAfterFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringBeforeFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSubstringFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathSumFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathTranslateFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathTrueFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathValueFlipSign(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathVariableLookup(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPathVariableLookupNS(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPATH_ENABLED)
+PyObject * libxml_xmlXPatherror(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPATH_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrEval(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrEvalRangePredicate(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewCollapsedRange(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewContext(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewLocationSetNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewRange(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrNewRangeNodes(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_XPTR_ENABLED)
+PyObject * libxml_xmlXPtrRangeToFunction(PyObject *self, PyObject *args);
+#endif /* defined(LIBXML_XPTR_ENABLED) */
diff --git a/python/libxml2-python-api.xml b/python/libxml2-python-api.xml
new file mode 100644
index 0000000..032b44b
--- /dev/null
+++ b/python/libxml2-python-api.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<api name='libxml2-python'>
+ <symbols>
+ <function name='xmlRegisterXPathFunction' file='python'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a Python written function to the XPath interpreter</info>
+ <return type='int' info="1 in case of success, 0 or -1 in case of error"/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
+ <arg name='name' type='xmlChar *' info='the function name'/>
+ <arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
+ <arg name='f' type='pythonObject' info='the python function'/>
+ </function>
+ <function name='xmlXPathRegisterVariable' file='python'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Register a variable with the XPath context</info>
+ <return type='int' info="1 in case of success, 0 or -1 in case of error"/>
+ <arg name='ctx' type='xmlXPathContextPtr' info='the xpathContext'/>
+ <arg name='name' type='xmlChar *' info='the variable name'/>
+ <arg name='ns_uri' type='xmlChar *' info='the namespace or NULL'/>
+ <arg name='value' type='pythonObject' info='the value'/>
+ </function>
+ <function name='xmlNewNode' file='python'>
+ <info>Create a new Node</info>
+ <return type='xmlNodePtr' info="A new element node"/>
+ <arg name='name' type='xmlChar *' info='the node name'/>
+ </function>
+ <function name='xmlCreatePushParser' file='python'>
+ <info>Create a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
+ <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='chunk' type='xmlChar *' info='the initial data'/>
+ <arg name='size' type='int' info='the size of the initial data'/>
+ <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
+ </function>
+ <function name='htmlCreatePushParser' file='python'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.</info>
+ <return type='xmlParserCtxtPtr' info="the parser context or None in case of error"/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='chunk' type='xmlChar *' info='the initial data'/>
+ <arg name='size' type='int' info='the size of the initial data'/>
+ <arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
+ </function>
+ <function name='xmlSAXParseFile' file='python'>
+ <info>Interface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object</info>
+ <return type='void'/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
+ <arg name='recover' type='int' info='allow recovery in case of error'/>
+ </function>
+ <function name='htmlSAXParseFile' file='python'>
+ <cond>defined(LIBXML_HTML_ENABLED)</cond>
+ <info>Interface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object</info>
+ <return type='void'/>
+ <arg name='SAX' type='pythonObject' info='the SAX callback object or None'/>
+ <arg name='URI' type='xmlChar *' info='The URI of the resource'/>
+ <arg name='encoding' type='const char *' info='encoding or None'/>
+ </function>
+ <function name='xmlCreateOutputBuffer' file='python'>
+ <info>Create a libxml2 output buffer from a Python file</info>
+ <return type='xmlOutputBufferPtr' info="the output buffer"/>
+ <arg name='file' type='pythonObject' info='the Python file'/>
+ <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
+ </function>
+ <function name='xmlCreateInputBuffer' file='python'>
+ <info>Create a libxml2 input buffer from a Python file</info>
+ <return type='xmlParserInputBufferPtr' info="the input buffer"/>
+ <arg name='file' type='pythonObject' info='the Python file'/>
+ <arg name='encoding' type='xmlChar *' info='an optionnal encoding'/>
+ </function>
+ <function name='xmlSetEntityLoader' file='python'>
+ <info>Set the entity resolver as a python function</info>
+ <return type='int' info="0 in case of success, -1 for error"/>
+ <arg name='resolver' type='pythonObject' info='the Python function'/>
+ </function>
+ <!-- xmlParserCtxtPtr accessors -->
+ <function name='xmlParserGetDoc' file='python_accessor'>
+ <info>Get the document tree from a parser context.</info>
+ <return type='xmlDocPtr' info="the document tree" field="myDoc"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserGetWellFormed' file='python_accessor'>
+ <info>Get the well formed information from a parser context.</info>
+ <return type='int' info="the wellFormed field" field="wellFormed"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserGetIsValid' file='python_accessor'>
+ <info>Get the validity information from a parser context.</info>
+ <return type='int' info="the valid field" field="valid"/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ </function>
+ <function name='xmlParserSetValidate' file='python_accessor'>
+ <info>Switch the parser to validation mode.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='validate' type='int' info='1 to activate validation'/>
+ </function>
+ <function name='xmlParserSetReplaceEntities' file='python_accessor'>
+ <info>Switch the parser to replace entities.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='replaceEntities' type='int' info='1 to replace entities'/>
+ </function>
+ <function name='xmlParserSetPedantic' file='python_accessor'>
+ <info>Switch the parser to be pedantic.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='pedantic' type='int' info='1 to run in pedantic mode'/>
+ </function>
+ <function name='xmlParserSetLoadSubset' file='python_accessor'>
+ <info>Switch the parser to load the DTD without validating.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='loadsubset' type='int' info='1 to load the DTD'/>
+ </function>
+ <function name='xmlParserSetLineNumbers' file='python_accessor'>
+ <info>Switch on the generation of line number for elements nodes.</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlParserCtxtPtr' info='the parser context'/>
+ <arg name='linenumbers' type='int' info='1 to save line numbers'/>
+ </function>
+ <function name='xmlDebugMemory' file='python'>
+ <info>Switch on the generation of line number for elements nodes. Also returns the number of bytes allocated and not freed by libxml2 since memory debugging was switched on.</info>
+ <return type='int' info="returns the number of bytes allocated and not freed"/>
+ <arg name='activate' type='int' info='1 switch on memory debugging 0 switch it off'/>
+ </function>
+ <function name='xmlDumpMemory' file='python'>
+ <info>dump the memory allocated in the file .memdump</info>
+ <return type='void'/>
+ </function>
+ <!-- xmlNsPtr accessors -->
+ <function name='xmlNodeGetNs' file='python_accessor'>
+ <info>Get the namespace of a node</info>
+ <return type='xmlNsPtr' info="The namespace or None"/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ </function>
+ <function name='xmlNodeGetNsDefs' file='python_accessor'>
+ <info>Get the namespace of a node</info>
+ <return type='xmlNsPtr' info="The namespace or None"/>
+ <arg name='node' type='xmlNodePtr' info='the node'/>
+ </function>
+ <!-- xmlXPathContextPtr accessors -->
+ <function name='xmlXPathParserGetContext' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the xpathContext from an xpathParserContext</info>
+ <return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
+ <arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
+ </function>
+ <function name='xmlXPathGetContextDoc' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the doc from an xpathContext</info>
+ <return type='xmlDocPtr' info="The doc context" field="doc"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetContextNode' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='xmlNodePtr' info="The node context" field="node"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathSetContextDoc' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Set the doc of an xpathContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name="doc" type='xmlDocPtr' info="The doc context"/>
+ </function>
+ <function name='xmlXPathSetContextNode' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Set the current node of an xpathContext</info>
+ <return type='void'/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ <arg name="node" type='xmlNodePtr' info="The node context"/>
+ </function>
+ <function name='xmlXPathGetContextPosition' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='int' info="The node context" field="proximityPosition"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetContextSize' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current node from an xpathContext</info>
+ <return type='int' info="The node context" field="contextSize"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetFunction' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current function name xpathContext</info>
+ <return type='const xmlChar *' info="The function name" field="function"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <function name='xmlXPathGetFunctionURI' file='python_accessor'>
+ <cond>defined(LIBXML_XPATH_ENABLED)</cond>
+ <info>Get the current function name URI xpathContext</info>
+ <return type='const xmlChar *' info="The function name URI" field="functionURI"/>
+ <arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
+ </function>
+ <!-- xmlURIPtr accessors -->
+ <function name='xmlURIGetScheme' file='python_accessor'>
+ <info>Get the scheme part from an URI</info>
+ <return type='const char *' info="The URI scheme" field="scheme"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetScheme' file='python_accessor'>
+ <info>Set the scheme part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='scheme' type='char *' info='The URI scheme part'/>
+ </function>
+ <function name='xmlURIGetOpaque' file='python_accessor'>
+ <info>Get the opaque part from an URI</info>
+ <return type='const char *' info="The URI opaque" field="opaque"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetOpaque' file='python_accessor'>
+ <info>Set the opaque part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='opaque' type='char *' info='The URI opaque part'/>
+ </function>
+ <function name='xmlURIGetAuthority' file='python_accessor'>
+ <info>Get the authority part from an URI</info>
+ <return type='const char *' info="The URI authority" field="authority"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetAuthority' file='python_accessor'>
+ <info>Set the authority part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='authority' type='char *' info='The URI authority part'/>
+ </function>
+ <function name='xmlURIGetServer' file='python_accessor'>
+ <info>Get the server part from an URI</info>
+ <return type='const char *' info="The URI server" field="server"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetServer' file='python_accessor'>
+ <info>Set the server part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='server' type='char *' info='The URI server part'/>
+ </function>
+ <function name='xmlURIGetUser' file='python_accessor'>
+ <info>Get the user part from an URI</info>
+ <return type='const char *' info="The URI user" field="user"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetUser' file='python_accessor'>
+ <info>Set the user part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='user' type='char *' info='The URI user part'/>
+ </function>
+ <function name='xmlURIGetPath' file='python_accessor'>
+ <info>Get the path part from an URI</info>
+ <return type='const char *' info="The URI path" field="path"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetPath' file='python_accessor'>
+ <info>Set the path part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='path' type='char *' info='The URI path part'/>
+ </function>
+ <function name='xmlURIGetQuery' file='python_accessor'>
+ <info>Get the query part from an URI</info>
+ <return type='const char *' info="The URI query" field="query"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetQuery' file='python_accessor'>
+ <info>Set the query part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='query' type='char *' info='The URI query part'/>
+ </function>
+ <function name='xmlURIGetQueryRaw' file='python_accessor'>
+ <info>Get the raw query part from an URI (i.e. the unescaped form).</info>
+ <return type='const char *' info="The URI query" field="query_raw"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetQueryRaw' file='python_accessor'>
+ <info>Set the raw query part of an URI (i.e. the unescaped form).</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='query_raw' type='char *' info='The raw URI query part'/>
+ </function>
+ <function name='xmlURIGetFragment' file='python_accessor'>
+ <info>Get the fragment part from an URI</info>
+ <return type='const char *' info="The URI fragment" field="fragment"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetFragment' file='python_accessor'>
+ <info>Set the fragment part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='fragment' type='char *' info='The URI fragment part'/>
+ </function>
+ <function name='xmlURIGetPort' file='python_accessor'>
+ <info>Get the port part from an URI</info>
+ <return type='int' info="The URI port" field="port"/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ </function>
+ <function name='xmlURISetPort' file='python_accessor'>
+ <info>Set the port part of an URI.</info>
+ <return type='void'/>
+ <arg name='URI' type='xmlURIPtr' info='the URI'/>
+ <arg name='port' type='int' info='The URI port part'/>
+ </function>
+ <!-- xmlErrorPtr accessors -->
+ <function name='xmlErrorGetDomain' file='python_accessor'>
+ <info>What part of the library raised this error</info>
+ <return type='int' info="The error domain" field="domain"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetCode' file='python_accessor'>
+ <info>The error code, e.g. an xmlParserError</info>
+ <return type='int' info="The error code" field="code"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetMessage' file='python_accessor'>
+ <info>human-readable informative error message</info>
+ <return type='const char *' info="The error message" field="message"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetLevel' file='python_accessor'>
+ <info>how consequent is the error</info>
+ <return type='int' info="The error level" field="level"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetFile' file='python_accessor'>
+ <info>the filename</info>
+ <return type='const char *' info="The error file" field="file"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlErrorGetLine' file='python_accessor'>
+ <info>the line number if available</info>
+ <return type='int' info="The error line" field="line"/>
+ <arg name='Error' type='xmlErrorPtr' info='the Error'/>
+ </function>
+ <function name='xmlPythonCleanupParser' file='python'>
+ <info>Cleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it.</info>
+ <return type='void'/>
+ </function>
+ <function name='xmlMemoryUsed' file='python'>
+ <info>Returns the total amount of memory allocated by libxml2</info>
+ <return type='int' info='number of bytes allocated'/>
+ </function>
+ </symbols>
+</api>
diff --git a/python/libxml2.py b/python/libxml2.py
new file mode 100644
index 0000000..76b8dcd
--- /dev/null
+++ b/python/libxml2.py
@@ -0,0 +1,9319 @@
+import libxml2mod
+import types
+import sys
+
+# The root of all libxml2 errors.
+class libxmlError(Exception): pass
+
+# Type of the wrapper class for the C objects wrappers
+def checkWrapper(obj):
+ try:
+ n = type(_obj).__name__
+ if n != 'PyCObject' and n != 'PyCapsule':
+ return 1
+ except:
+ return 0
+ return 0
+
+#
+# id() is sometimes negative ...
+#
+def pos_id(o):
+ i = id(o)
+ if (i < 0):
+ return (sys.maxsize - i)
+ return i
+
+#
+# Errors raised by the wrappers when some tree handling failed.
+#
+class treeError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class parserError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class uriError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class xpathError(libxmlError):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return self.msg
+
+class ioWrapper:
+ def __init__(self, _obj):
+ self.__io = _obj
+ self._o = None
+
+ def io_close(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.close()
+ self.__io = None
+ return(0)
+
+ def io_flush(self):
+ if self.__io == None:
+ return(-1)
+ self.__io.flush()
+ return(0)
+
+ def io_read(self, len = -1):
+ if self.__io == None:
+ return(-1)
+ try:
+ if len < 0:
+ ret = self.__io.read()
+ else:
+ ret = self.__io.read(len)
+ except Exception:
+ import sys
+ e = sys.exc_info()[1]
+ print("failed to read from Python:", type(e))
+ print("on IO:", self.__io)
+ self.__io == None
+ return(-1)
+
+ return(ret)
+
+ def io_write(self, str, len = -1):
+ if self.__io == None:
+ return(-1)
+ if len < 0:
+ return(self.__io.write(str))
+ return(self.__io.write(str, len))
+
+class ioReadWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+ ioWrapper.__init__(self, _obj)
+ self._o = libxml2mod.xmlCreateInputBuffer(self, enc)
+
+ def __del__(self):
+ print("__del__")
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+class ioWriteWrapper(ioWrapper):
+ def __init__(self, _obj, enc = ""):
+# print "ioWriteWrapper.__init__", _obj
+ if type(_obj) == type(''):
+ print("write io from a string")
+ self.o = None
+ elif type(_obj).__name__ == 'PyCapsule':
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+# elif type(_obj) == types.InstanceType:
+# print(("write io from instance of %s" % (_obj.__class__)))
+# ioWrapper.__init__(self, _obj)
+# self._o = libxml2mod.xmlCreateOutputBuffer(self, enc)
+ else:
+ file = libxml2mod.outputBufferGetPythonFile(_obj)
+ if file != None:
+ ioWrapper.__init__(self, file)
+ else:
+ ioWrapper.__init__(self, _obj)
+ self._o = _obj
+
+ def __del__(self):
+# print "__del__"
+ self.io_close()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def flush(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+ def close(self):
+ self.io_flush()
+ if self._o != None:
+ libxml2mod.xmlOutputBufferClose(self._o)
+ self._o = None
+
+#
+# Example of a class to handle SAX events
+#
+class SAXCallback:
+ """Base class for SAX handlers"""
+ def startDocument(self):
+ """called at the start of the document"""
+ pass
+
+ def endDocument(self):
+ """called at the end of the document"""
+ pass
+
+ def startElement(self, tag, attrs):
+ """called at the start of every element, tag is the name of
+ the element, attrs is a dictionary of the element's attributes"""
+ pass
+
+ def endElement(self, tag):
+ """called at the start of every element, tag is the name of
+ the element"""
+ pass
+
+ def characters(self, data):
+ """called when character data have been read, data is the string
+ containing the data, multiple consecutive characters() callback
+ are possible."""
+ pass
+
+ def cdataBlock(self, data):
+ """called when CDATA section have been read, data is the string
+ containing the data, multiple consecutive cdataBlock() callback
+ are possible."""
+ pass
+
+ def reference(self, name):
+ """called when an entity reference has been found"""
+ pass
+
+ def ignorableWhitespace(self, data):
+ """called when potentially ignorable white spaces have been found"""
+ pass
+
+ def processingInstruction(self, target, data):
+ """called when a PI has been found, target contains the PI name and
+ data is the associated data in the PI"""
+ pass
+
+ def comment(self, content):
+ """called when a comment has been found, content contains the comment"""
+ pass
+
+ def externalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTd if available"""
+ pass
+
+ def internalSubset(self, name, externalID, systemID):
+ """called when a DOCTYPE declaration has been found, name is the
+ DTD name and externalID, systemID are the DTD public and system
+ identifier for that DTD if available"""
+ pass
+
+ def entityDecl(self, name, type, externalID, systemID, content):
+ """called when an ENTITY declaration has been found, name is the
+ entity name and externalID, systemID are the entity public and
+ system identifier for that entity if available, type indicates
+ the entity type, and content reports it's string content"""
+ pass
+
+ def notationDecl(self, name, externalID, systemID):
+ """called when an NOTATION declaration has been found, name is the
+ notation name and externalID, systemID are the notation public and
+ system identifier for that notation if available"""
+ pass
+
+ def attributeDecl(self, elem, name, type, defi, defaultValue, nameList):
+ """called when an ATTRIBUTE definition has been found"""
+ pass
+
+ def elementDecl(self, name, type, content):
+ """called when an ELEMENT definition has been found"""
+ pass
+
+ def entityDecl(self, name, publicId, systemID, notationName):
+ """called when an unparsed ENTITY declaration has been found,
+ name is the entity name and publicId,, systemID are the entity
+ public and system identifier for that entity if available,
+ and notationName indicate the associated NOTATION"""
+ pass
+
+ def warning(self, msg):
+ #print msg
+ pass
+
+ def error(self, msg):
+ raise parserError(msg)
+
+ def fatalError(self, msg):
+ raise parserError(msg)
+
+#
+# This class is the ancestor of all the Node classes. It provides
+# the basic functionalities shared by all nodes (and handle
+# gracefylly the exception), like name, navigation in the tree,
+# doc reference, content access and serializing to a string or URI
+#
+class xmlCore:
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __eq__(self, other):
+ if other == None:
+ return False
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ if ret == None:
+ return False
+ return ret == True
+ def __ne__(self, other):
+ if other == None:
+ return True
+ ret = libxml2mod.compareNodesEqual(self._o, other._o)
+ return not ret
+ def __hash__(self):
+ ret = libxml2mod.nodeHash(self._o)
+ return ret
+
+ def __str__(self):
+ return self.serialize()
+ def get_parent(self):
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_children(self):
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_last(self):
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_next(self):
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_properties(self):
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ def get_prev(self):
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ def get_content(self):
+ return libxml2mod.xmlNodeGetContent(self._o)
+ getContent = get_content # why is this duplicate naming needed ?
+ def get_name(self):
+ return libxml2mod.name(self._o)
+ def get_type(self):
+ return libxml2mod.type(self._o)
+ def get_doc(self):
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type in ["document_xml", "document_html"]:
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ #
+ # Those are common attributes to nearly all type of nodes
+ # defined as python2 properties
+ #
+ import sys
+ if float(sys.version[0:3]) < 2.2:
+ def __getattr__(self, attr):
+ if attr == "parent":
+ ret = libxml2mod.parent(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "properties":
+ ret = libxml2mod.properties(self._o)
+ if ret == None:
+ return None
+ return xmlAttr(_obj=ret)
+ elif attr == "children":
+ ret = libxml2mod.children(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "last":
+ ret = libxml2mod.last(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "next":
+ ret = libxml2mod.next(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "prev":
+ ret = libxml2mod.prev(self._o)
+ if ret == None:
+ return None
+ return nodeWrap(ret)
+ elif attr == "content":
+ return libxml2mod.xmlNodeGetContent(self._o)
+ elif attr == "name":
+ return libxml2mod.name(self._o)
+ elif attr == "type":
+ return libxml2mod.type(self._o)
+ elif attr == "doc":
+ ret = libxml2mod.doc(self._o)
+ if ret == None:
+ if self.type == "document_xml" or self.type == "document_html":
+ return xmlDoc(_obj=self._o)
+ else:
+ return None
+ return xmlDoc(_obj=ret)
+ raise AttributeError(attr)
+ else:
+ parent = property(get_parent, None, None, "Parent node")
+ children = property(get_children, None, None, "First child node")
+ last = property(get_last, None, None, "Last sibling node")
+ next = property(get_next, None, None, "Next sibling node")
+ prev = property(get_prev, None, None, "Previous sibling node")
+ properties = property(get_properties, None, None, "List of properies")
+ content = property(get_content, None, None, "Content of this node")
+ name = property(get_name, None, None, "Node name")
+ type = property(get_type, None, None, "Node type")
+ doc = property(get_doc, None, None, "The document this node belongs to")
+
+ #
+ # Serialization routines, the optional arguments have the following
+ # meaning:
+ # encoding: string to ask saving in a specific encoding
+ # indent: if 1 the serializer is asked to indent the output
+ #
+ def serialize(self, encoding = None, format = 0):
+ return libxml2mod.serializeNode(self._o, encoding, format)
+ def saveTo(self, file, encoding = None, format = 0):
+ return libxml2mod.saveNodeTo(self._o, file, encoding, format)
+
+ #
+ # Canonicalization routines:
+ #
+ # nodes: the node set (tuple or list) to be included in the
+ # canonized image or None if all document nodes should be
+ # included.
+ # exclusive: the exclusive flag (0 - non-exclusive
+ # canonicalization; otherwise - exclusive canonicalization)
+ # prefixes: the list of inclusive namespace prefixes (strings),
+ # or None if there is no inclusive namespaces (only for
+ # exclusive canonicalization, ignored otherwise)
+ # with_comments: include comments in the result (!=0) or not
+ # (==0)
+ def c14nMemory(self,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocDumpMemory(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0)
+ def c14nSaveTo(self,
+ file,
+ nodes=None,
+ exclusive=0,
+ prefixes=None,
+ with_comments=0):
+ if nodes:
+ nodes = [n._o for n in nodes]
+ return libxml2mod.xmlC14NDocSaveTo(
+ self.get_doc()._o,
+ nodes,
+ exclusive != 0,
+ prefixes,
+ with_comments != 0,
+ file)
+
+ #
+ # Selecting nodes using XPath, a bit slow because the context
+ # is allocated/freed every time but convenient.
+ #
+ def xpathEval(self, expr):
+ doc = self.doc
+ if doc == None:
+ return None
+ ctxt = doc.xpathNewContext()
+ ctxt.setContextNode(self)
+ res = ctxt.xpathEval(expr)
+ ctxt.xpathFreeContext()
+ return res
+
+# #
+# # Selecting nodes using XPath, faster because the context
+# # is allocated just once per xmlDoc.
+# #
+# # Removed: DV memleaks c.f. #126735
+# #
+# def xpathEval2(self, expr):
+# doc = self.doc
+# if doc == None:
+# return None
+# try:
+# doc._ctxt.setContextNode(self)
+# except:
+# doc._ctxt = doc.xpathNewContext()
+# doc._ctxt.setContextNode(self)
+# res = doc._ctxt.xpathEval(expr)
+# return res
+ def xpathEval2(self, expr):
+ return self.xpathEval(expr)
+
+ # Remove namespaces
+ def removeNsDef(self, href):
+ """
+ Remove a namespace definition from a node. If href is None,
+ remove all of the ns definitions on that node. The removed
+ namespaces are returned as a linked list.
+
+ Note: If any child nodes referred to the removed namespaces,
+ they will be left with dangling links. You should call
+ renconciliateNs() to fix those pointers.
+
+ Note: This method does not free memory taken by the ns
+ definitions. You will need to free it manually with the
+ freeNsList() method on the returns xmlNs object.
+ """
+
+ ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ # support for python2 iterators
+ def walk_depth_first(self):
+ return xmlCoreDepthFirstItertor(self)
+ def walk_breadth_first(self):
+ return xmlCoreBreadthFirstItertor(self)
+ __iter__ = walk_depth_first
+
+ def free(self):
+ try:
+ self.doc._ctxt.xpathFreeContext()
+ except:
+ pass
+ libxml2mod.xmlFreeDoc(self._o)
+
+
+#
+# implements the depth-first iterator for libxml2 DOM tree
+#
+class xmlCoreDepthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.children
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.next
+ next = __next__
+
+#
+# implements the breadth-first iterator for libxml2 DOM tree
+#
+class xmlCoreBreadthFirstItertor:
+ def __init__(self, node):
+ self.node = node
+ self.parents = []
+ def __iter__(self):
+ return self
+ def __next__(self):
+ while 1:
+ if self.node:
+ ret = self.node
+ self.parents.append(self.node)
+ self.node = self.node.next
+ return ret
+ try:
+ parent = self.parents.pop()
+ except IndexError:
+ raise StopIteration
+ self.node = parent.children
+ next = __next__
+
+#
+# converters to present a nicer view of the XPath returns
+#
+def nodeWrap(o):
+ # TODO try to cast to the most appropriate node class
+ name = libxml2mod.type(o)
+ if name == "element" or name == "text":
+ return xmlNode(_obj=o)
+ if name == "attribute":
+ return xmlAttr(_obj=o)
+ if name[0:8] == "document":
+ return xmlDoc(_obj=o)
+ if name == "namespace":
+ return xmlNs(_obj=o)
+ if name == "elem_decl":
+ return xmlElement(_obj=o)
+ if name == "attribute_decl":
+ return xmlAttribute(_obj=o)
+ if name == "entity_decl":
+ return xmlEntity(_obj=o)
+ if name == "dtd":
+ return xmlDtd(_obj=o)
+ return xmlNode(_obj=o)
+
+def xpathObjectRet(o):
+ otype = type(o)
+ if otype == type([]):
+ ret = list(map(xpathObjectRet, o))
+ return ret
+ elif otype == type(()):
+ ret = list(map(xpathObjectRet, o))
+ return tuple(ret)
+ elif otype == type('') or otype == type(0) or otype == type(0.0):
+ return o
+ else:
+ return nodeWrap(o)
+
+#
+# register an XPath function
+#
+def registerXPathFunction(ctxt, name, ns_uri, f):
+ ret = libxml2mod.xmlRegisterXPathFunction(ctxt, name, ns_uri, f)
+
+#
+# For the xmlTextReader parser configuration
+#
+PARSER_LOADDTD=1
+PARSER_DEFAULTATTRS=2
+PARSER_VALIDATE=3
+PARSER_SUBST_ENTITIES=4
+
+#
+# For the error callback severities
+#
+PARSER_SEVERITY_VALIDITY_WARNING=1
+PARSER_SEVERITY_VALIDITY_ERROR=2
+PARSER_SEVERITY_WARNING=3
+PARSER_SEVERITY_ERROR=4
+
+#
+# register the libxml2 error handler
+#
+def registerErrorHandler(f, ctx):
+ """Register a Python written function to for error reporting.
+ The function is called back as f(ctx, error). """
+ import sys
+ if 'libxslt' not in sys.modules:
+ # normal behaviour when libxslt is not imported
+ ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
+ else:
+ # when libxslt is already imported, one must
+ # use libxst's error handler instead
+ import libxslt
+ ret = libxslt.registerErrorHandler(f,ctx)
+ return ret
+
+class parserCtxtCore:
+
+ def __init__(self, _obj=None):
+ if _obj != None:
+ self._o = _obj;
+ return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ def setErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,reserved).
+
+ @reserved is currently always None."""
+ libxml2mod.xmlParserCtxtSetErrorHandler(self._o,f,arg)
+
+ def getErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ return libxml2mod.xmlParserCtxtGetErrorHandler(self._o)
+
+ def addLocalCatalog(self, uri):
+ """Register a local catalog with the parser"""
+ return libxml2mod.addLocalCatalog(self._o, uri)
+
+
+class ValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for DTD validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class SchemaValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for Schema validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlSchemaSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+class relaxNgValidCtxtCore:
+
+ def __init__(self, *args, **kw):
+ pass
+
+ def setValidityErrorHandler(self, err_func, warn_func, arg=None):
+ """
+ Register error and warning handlers for RelaxNG validation.
+ These will be called back as f(msg,arg)
+ """
+ libxml2mod.xmlRelaxNGSetValidErrors(self._o, err_func, warn_func, arg)
+
+
+def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
+ """Intermediate callback to wrap the locator"""
+ (f,arg) = xxx_todo_changeme
+ return f(arg,msg,severity,xmlTextReaderLocator(locator))
+
+class xmlTextReaderCore:
+
+ def __init__(self, _obj=None):
+ self.input = None
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ def SetErrorHandler(self,f,arg):
+ """Register an error handler that will be called back as
+ f(arg,msg,severity,locator)."""
+ if f is None:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,None,None)
+ else:
+ libxml2mod.xmlTextReaderSetErrorHandler(\
+ self._o,_xmlTextReaderErrorFunc,(f,arg))
+
+ def GetErrorHandler(self):
+ """Return (f,arg) as previously registered with setErrorHandler
+ or (None,None)."""
+ f,arg = libxml2mod.xmlTextReaderGetErrorHandler(self._o)
+ if f is None:
+ return None,None
+ else:
+ # assert f is _xmlTextReaderErrorFunc
+ return arg
+
+#
+# The cleanup now goes though a wrapper in libxml.c
+#
+def cleanupParser():
+ libxml2mod.xmlPythonCleanupParser()
+
+#
+# The interface to xmlRegisterInputCallbacks.
+# Since this API does not allow to pass a data object along with
+# match/open callbacks, it is necessary to maintain a list of all
+# Python callbacks.
+#
+__input_callbacks = []
+def registerInputCallback(func):
+ def findOpenCallback(URI):
+ for cb in reversed(__input_callbacks):
+ o = cb(URI)
+ if o is not None:
+ return o
+ libxml2mod.xmlRegisterInputCallback(findOpenCallback)
+ __input_callbacks.append(func)
+
+def popInputCallbacks():
+ # First pop python-level callbacks, when no more available - start
+ # popping built-in ones.
+ if len(__input_callbacks) > 0:
+ __input_callbacks.pop()
+ if len(__input_callbacks) == 0:
+ libxml2mod.xmlUnregisterInputCallback()
+
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# Everything before this line comes from libxml.py
+# Everything after this line is automatically generated
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+#
+# Functions from module HTMLparser
+#
+
+def htmlCreateMemoryParserCtxt(buffer, size):
+ """Create a parser context for an HTML in-memory document. """
+ ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlHandleOmittedElem(val):
+ """Set and return the previous value for handling HTML omitted
+ tags. """
+ ret = libxml2mod.htmlHandleOmittedElem(val)
+ return ret
+
+def htmlIsScriptAttribute(name):
+ """Check if an attribute is of content type Script """
+ ret = libxml2mod.htmlIsScriptAttribute(name)
+ return ret
+
+def htmlNewParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.htmlNewParserCtxt()
+ if ret is None:raise parserError('htmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlParseDoc(cur, encoding):
+ """parse an HTML in-memory document and build a tree. """
+ ret = libxml2mod.htmlParseDoc(cur, encoding)
+ if ret is None:raise parserError('htmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlParseFile(filename, encoding):
+ """parse an HTML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.htmlParseFile(filename, encoding)
+ if ret is None:raise parserError('htmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. """
+ ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.htmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('htmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module HTMLtree
+#
+
+def htmlIsBooleanAttr(name):
+ """Determine if a given attribute is a boolean attribute. """
+ ret = libxml2mod.htmlIsBooleanAttr(name)
+ return ret
+
+def htmlNewDoc(URI, ExternalID):
+ """Creates a new HTML document """
+ ret = libxml2mod.htmlNewDoc(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlNewDocNoDtD(URI, ExternalID):
+ """Creates a new HTML document without a DTD node if @URI and
+ @ExternalID are None """
+ ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDocNoDtD() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module SAX2
+#
+
+def SAXDefaultVersion(version):
+ """Set the default version of SAX used globally by the
+ library. By default, during initialization the default is
+ set to 2. Note that it is generally a better coding style
+ to use xmlSAXVersion() to set up the version explicitly for
+ a given parsing context. """
+ ret = libxml2mod.xmlSAXDefaultVersion(version)
+ return ret
+
+def defaultSAXHandlerInit():
+ """Initialize the default SAX2 handler """
+ libxml2mod.xmlDefaultSAXHandlerInit()
+
+def docbDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.docbDefaultSAXHandlerInit()
+
+def htmlDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.htmlDefaultSAXHandlerInit()
+
+#
+# Functions from module catalog
+#
+
+def catalogAdd(type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. If called before any other catalog
+ routine, allows to override the default shared catalog put
+ in place by xmlInitializeCatalog(); """
+ ret = libxml2mod.xmlCatalogAdd(type, orig, replace)
+ return ret
+
+def catalogCleanup():
+ """Free up all the memory associated with catalogs """
+ libxml2mod.xmlCatalogCleanup()
+
+def catalogConvert():
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlCatalogConvert()
+ return ret
+
+def catalogDump(out):
+ """Dump all the global catalog content to the given file. """
+ if out is not None: out.flush()
+ libxml2mod.xmlCatalogDump(out)
+
+def catalogGetPublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID DEPRECATED, use xmlCatalogResolvePublic() """
+ ret = libxml2mod.xmlCatalogGetPublic(pubID)
+ return ret
+
+def catalogGetSystem(sysID):
+ """Try to lookup the catalog reference associated to a system
+ ID DEPRECATED, use xmlCatalogResolveSystem() """
+ ret = libxml2mod.xmlCatalogGetSystem(sysID)
+ return ret
+
+def catalogRemove(value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlCatalogRemove(value)
+ return ret
+
+def catalogResolve(pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlCatalogResolve(pubID, sysID)
+ return ret
+
+def catalogResolvePublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID """
+ ret = libxml2mod.xmlCatalogResolvePublic(pubID)
+ return ret
+
+def catalogResolveSystem(sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlCatalogResolveSystem(sysID)
+ return ret
+
+def catalogResolveURI(URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlCatalogResolveURI(URI)
+ return ret
+
+def catalogSetDebug(level):
+ """Used to set the debug level for catalog operation, 0
+ disable debugging, 1 enable it """
+ ret = libxml2mod.xmlCatalogSetDebug(level)
+ return ret
+
+def initializeCatalog():
+ """Do the catalog initialization. this function is not thread
+ safe, catalog initialization should preferably be done once
+ at startup """
+ libxml2mod.xmlInitializeCatalog()
+
+def loadACatalog(filename):
+ """Load the catalog and build the associated data structures.
+ This can be either an XML Catalog or an SGML Catalog It
+ will recurse in SGML CATALOG entries. On the other hand XML
+ Catalogs are not handled recursively. """
+ ret = libxml2mod.xmlLoadACatalog(filename)
+ if ret is None:raise treeError('xmlLoadACatalog() failed')
+ return catalog(_obj=ret)
+
+def loadCatalog(filename):
+ """Load the catalog and makes its definitions effective for
+ the default external entity loader. It will recurse in SGML
+ CATALOG entries. this function is not thread safe, catalog
+ initialization should preferably be done once at startup """
+ ret = libxml2mod.xmlLoadCatalog(filename)
+ return ret
+
+def loadCatalogs(pathss):
+ """Load the catalogs and makes their definitions effective for
+ the default external entity loader. this function is not
+ thread safe, catalog initialization should preferably be
+ done once at startup """
+ libxml2mod.xmlLoadCatalogs(pathss)
+
+def loadSGMLSuperCatalog(filename):
+ """Load an SGML super catalog. It won't expand CATALOG or
+ DELEGATE references. This is only needed for manipulating
+ SGML Super Catalogs like adding and removing CATALOG or
+ DELEGATE entries. """
+ ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
+ if ret is None:raise treeError('xmlLoadSGMLSuperCatalog() failed')
+ return catalog(_obj=ret)
+
+def newCatalog(sgml):
+ """create a new Catalog. """
+ ret = libxml2mod.xmlNewCatalog(sgml)
+ if ret is None:raise treeError('xmlNewCatalog() failed')
+ return catalog(_obj=ret)
+
+def parseCatalogFile(filename):
+ """parse an XML file and build a tree. It's like
+ xmlParseFile() except it bypass all catalog lookups. """
+ ret = libxml2mod.xmlParseCatalogFile(filename)
+ if ret is None:raise parserError('xmlParseCatalogFile() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module chvalid
+#
+
+def isBaseChar(ch):
+ """This function is DEPRECATED. Use xmlIsBaseChar_ch or
+ xmlIsBaseCharQ instead """
+ ret = libxml2mod.xmlIsBaseChar(ch)
+ return ret
+
+def isBlank(ch):
+ """This function is DEPRECATED. Use xmlIsBlank_ch or
+ xmlIsBlankQ instead """
+ ret = libxml2mod.xmlIsBlank(ch)
+ return ret
+
+def isChar(ch):
+ """This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
+ instead """
+ ret = libxml2mod.xmlIsChar(ch)
+ return ret
+
+def isCombining(ch):
+ """This function is DEPRECATED. Use xmlIsCombiningQ instead """
+ ret = libxml2mod.xmlIsCombining(ch)
+ return ret
+
+def isDigit(ch):
+ """This function is DEPRECATED. Use xmlIsDigit_ch or
+ xmlIsDigitQ instead """
+ ret = libxml2mod.xmlIsDigit(ch)
+ return ret
+
+def isExtender(ch):
+ """This function is DEPRECATED. Use xmlIsExtender_ch or
+ xmlIsExtenderQ instead """
+ ret = libxml2mod.xmlIsExtender(ch)
+ return ret
+
+def isIdeographic(ch):
+ """This function is DEPRECATED. Use xmlIsIdeographicQ instead """
+ ret = libxml2mod.xmlIsIdeographic(ch)
+ return ret
+
+def isPubidChar(ch):
+ """This function is DEPRECATED. Use xmlIsPubidChar_ch or
+ xmlIsPubidCharQ instead """
+ ret = libxml2mod.xmlIsPubidChar(ch)
+ return ret
+
+#
+# Functions from module debugXML
+#
+
+def boolToText(boolval):
+ """Convenient way to turn bool into text """
+ ret = libxml2mod.xmlBoolToText(boolval)
+ return ret
+
+def debugDumpString(output, str):
+ """Dumps informations about the string, shorten it if necessary """
+ if output is not None: output.flush()
+ libxml2mod.xmlDebugDumpString(output, str)
+
+def shellPrintXPathError(errorType, arg):
+ """Print the xpath error to libxml default error channel """
+ libxml2mod.xmlShellPrintXPathError(errorType, arg)
+
+#
+# Functions from module dict
+#
+
+def dictCleanup():
+ """Free the dictionary mutex. Do not call unless sure the
+ library is not in use anymore ! """
+ libxml2mod.xmlDictCleanup()
+
+def initializeDict():
+ """Do the dictionary mutex initialization. this function is
+ deprecated """
+ ret = libxml2mod.xmlInitializeDict()
+ return ret
+
+#
+# Functions from module encoding
+#
+
+def addEncodingAlias(name, alias):
+ """Registers an alias @alias for an encoding named @name.
+ Existing alias will be overwritten. """
+ ret = libxml2mod.xmlAddEncodingAlias(name, alias)
+ return ret
+
+def cleanupCharEncodingHandlers():
+ """Cleanup the memory allocated for the char encoding support,
+ it unregisters all the encoding handlers and the aliases. """
+ libxml2mod.xmlCleanupCharEncodingHandlers()
+
+def cleanupEncodingAliases():
+ """Unregisters all aliases """
+ libxml2mod.xmlCleanupEncodingAliases()
+
+def delEncodingAlias(alias):
+ """Unregisters an encoding alias @alias """
+ ret = libxml2mod.xmlDelEncodingAlias(alias)
+ return ret
+
+def encodingAlias(alias):
+ """Lookup an encoding name for the given alias. """
+ ret = libxml2mod.xmlGetEncodingAlias(alias)
+ return ret
+
+def initCharEncodingHandlers():
+ """Initialize the char encoding support, it registers the
+ default encoding supported. NOTE: while public, this
+ function usually doesn't need to be called in normal
+ processing. """
+ libxml2mod.xmlInitCharEncodingHandlers()
+
+#
+# Functions from module entities
+#
+
+def cleanupPredefinedEntities():
+ """Cleanup up the predefined entities table. Deprecated call """
+ libxml2mod.xmlCleanupPredefinedEntities()
+
+def initializePredefinedEntities():
+ """Set up the predefined entities. Deprecated call """
+ libxml2mod.xmlInitializePredefinedEntities()
+
+def predefinedEntity(name):
+ """Check whether this name is an predefined entity. """
+ ret = libxml2mod.xmlGetPredefinedEntity(name)
+ if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
+ return xmlEntity(_obj=ret)
+
+#
+# Functions from module globals
+#
+
+def cleanupGlobals():
+ """Additional cleanup for multi-threading """
+ libxml2mod.xmlCleanupGlobals()
+
+def initGlobals():
+ """Additional initialisation for multi-threading """
+ libxml2mod.xmlInitGlobals()
+
+def thrDefDefaultBufferSize(v):
+ ret = libxml2mod.xmlThrDefDefaultBufferSize(v)
+ return ret
+
+def thrDefDoValidityCheckingDefaultValue(v):
+ ret = libxml2mod.xmlThrDefDoValidityCheckingDefaultValue(v)
+ return ret
+
+def thrDefGetWarningsDefaultValue(v):
+ ret = libxml2mod.xmlThrDefGetWarningsDefaultValue(v)
+ return ret
+
+def thrDefIndentTreeOutput(v):
+ ret = libxml2mod.xmlThrDefIndentTreeOutput(v)
+ return ret
+
+def thrDefKeepBlanksDefaultValue(v):
+ ret = libxml2mod.xmlThrDefKeepBlanksDefaultValue(v)
+ return ret
+
+def thrDefLineNumbersDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLineNumbersDefaultValue(v)
+ return ret
+
+def thrDefLoadExtDtdDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLoadExtDtdDefaultValue(v)
+ return ret
+
+def thrDefParserDebugEntities(v):
+ ret = libxml2mod.xmlThrDefParserDebugEntities(v)
+ return ret
+
+def thrDefPedanticParserDefaultValue(v):
+ ret = libxml2mod.xmlThrDefPedanticParserDefaultValue(v)
+ return ret
+
+def thrDefSaveNoEmptyTags(v):
+ ret = libxml2mod.xmlThrDefSaveNoEmptyTags(v)
+ return ret
+
+def thrDefSubstituteEntitiesDefaultValue(v):
+ ret = libxml2mod.xmlThrDefSubstituteEntitiesDefaultValue(v)
+ return ret
+
+def thrDefTreeIndentString(v):
+ ret = libxml2mod.xmlThrDefTreeIndentString(v)
+ return ret
+
+#
+# Functions from module nanoftp
+#
+
+def nanoFTPCleanup():
+ """Cleanup the FTP protocol layer. This cleanup proxy
+ informations. """
+ libxml2mod.xmlNanoFTPCleanup()
+
+def nanoFTPInit():
+ """Initialize the FTP protocol layer. Currently it just checks
+ for proxy informations, and get the hostname """
+ libxml2mod.xmlNanoFTPInit()
+
+def nanoFTPProxy(host, port, user, passwd, type):
+ """Setup the FTP proxy informations. This can also be done by
+ using ftp_proxy ftp_proxy_user and ftp_proxy_password
+ environment variables. """
+ libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type)
+
+def nanoFTPScanProxy(URL):
+ """(Re)Initialize the FTP Proxy context by parsing the URL and
+ finding the protocol host port it indicates. Should be like
+ ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up
+ proxy informations. """
+ libxml2mod.xmlNanoFTPScanProxy(URL)
+
+#
+# Functions from module nanohttp
+#
+
+def nanoHTTPCleanup():
+ """Cleanup the HTTP protocol layer. """
+ libxml2mod.xmlNanoHTTPCleanup()
+
+def nanoHTTPInit():
+ """Initialize the HTTP protocol layer. Currently it just
+ checks for proxy informations """
+ libxml2mod.xmlNanoHTTPInit()
+
+def nanoHTTPScanProxy(URL):
+ """(Re)Initialize the HTTP Proxy context by parsing the URL
+ and finding the protocol host port it indicates. Should be
+ like http://myproxy/ or http://myproxy:3128/ A None URL
+ cleans up proxy informations. """
+ libxml2mod.xmlNanoHTTPScanProxy(URL)
+
+#
+# Functions from module parser
+#
+
+def createDocParserCtxt(cur):
+ """Creates a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateDocParserCtxt(cur)
+ if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def initParser():
+ """Initialization function for the XML parser. This is not
+ reentrant. Call once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.xmlInitParser()
+
+def keepBlanksDefault(val):
+ """Set and return the previous value for default blanks text
+ nodes support. The 1.x version of the parser used an
+ heuristic to try to detect ignorable white spaces. As a
+ result the SAX callback was generating
+ xmlSAX2IgnorableWhitespace() callbacks instead of
+ characters() one, and when using the DOM output text nodes
+ containing those blanks were not generated. The 2.x and
+ later version will switch to the XML standard way and
+ ignorableWhitespace() are only generated when running the
+ parser in validating mode and when the current element
+ doesn't allow CDATA or mixed content. This function is
+ provided as a way to force the standard behavior on 1.X
+ libs and to switch back to the old mode for compatibility
+ when running 1.X client code on 2.X . Upgrade of 1.X code
+ should be done by using xmlIsBlankNode() commodity function
+ to detect the "empty" nodes generated. This value also
+ affect autogeneration of indentation when saving code if
+ blanks sections are kept, indentation is not generated. """
+ ret = libxml2mod.xmlKeepBlanksDefault(val)
+ return ret
+
+def lineNumbersDefault(val):
+ """Set and return the previous value for enabling line numbers
+ in elements contents. This may break on old application and
+ is turned off by default. """
+ ret = libxml2mod.xmlLineNumbersDefault(val)
+ return ret
+
+def newParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.xmlNewParserCtxt()
+ if ret is None:raise parserError('xmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def parseDTD(ExternalID, SystemID):
+ """Load and parse an external subset. """
+ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
+ if ret is None:raise parserError('xmlParseDTD() failed')
+ return xmlDtd(_obj=ret)
+
+def parseDoc(cur):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlParseDoc(cur)
+ if ret is None:raise parserError('xmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def parseEntity(filename):
+ """parse an XML external entity out of context and build a
+ tree. [78] extParsedEnt ::= TextDecl? content This
+ correspond to a "Well Balanced" chunk """
+ ret = libxml2mod.xmlParseEntity(filename)
+ if ret is None:raise parserError('xmlParseEntity() failed')
+ return xmlDoc(_obj=ret)
+
+def parseFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.xmlParseFile(filename)
+ if ret is None:raise parserError('xmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def parseMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. """
+ ret = libxml2mod.xmlParseMemory(buffer, size)
+ if ret is None:raise parserError('xmlParseMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def pedanticParserDefault(val):
+ """Set and return the previous value for enabling pedantic
+ warnings. """
+ ret = libxml2mod.xmlPedanticParserDefault(val)
+ return ret
+
+def readDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def readFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. NOTE
+ that the file descriptor will not be closed when the reader
+ is closed or reset. """
+ ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def readFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.xmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def readMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverDoc(cur):
+ """parse an XML in-memory document and build a tree. In the
+ case the document is not Well Formed, a attempt to build a
+ tree is tried anyway """
+ ret = libxml2mod.xmlRecoverDoc(cur)
+ if ret is None:raise treeError('xmlRecoverDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. In the case the document is not Well
+ Formed, it attempts to build a tree anyway """
+ ret = libxml2mod.xmlRecoverFile(filename)
+ if ret is None:raise treeError('xmlRecoverFile() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. In the case
+ the document is not Well Formed, an attempt to build a tree
+ is tried anyway """
+ ret = libxml2mod.xmlRecoverMemory(buffer, size)
+ if ret is None:raise treeError('xmlRecoverMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def substituteEntitiesDefault(val):
+ """Set and return the previous value for default entity
+ support. Initially the parser always keep entity references
+ instead of substituting entity values in the output. This
+ function has to be used to change the default parser
+ behavior SAX::substituteEntities() has to be used for
+ changing that on a file by file basis. """
+ ret = libxml2mod.xmlSubstituteEntitiesDefault(val)
+ return ret
+
+#
+# Functions from module parserInternals
+#
+
+def checkLanguageID(lang):
+ """Checks that the value conforms to the LanguageID
+ production: NOTE: this is somewhat deprecated, those
+ productions were removed from the XML Second edition. [33]
+ LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::=
+ ISO639Code | IanaCode | UserCode [35] ISO639Code ::=
+ ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' |
+ 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-'
+ ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The
+ current REC reference the sucessors of RFC 1766, currently
+ 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag
+ = language ["-" script] ["-" region] *("-" variant) *("-"
+ extension) ["-" privateuse] language = 2*3ALPHA
+ ; shortest ISO 639 code ["-" extlang] ; sometimes
+ followed by ; extended language subtags / 4ALPHA
+ ; or reserved for future use / 5*8ALPHA ; or
+ registered language subtag extlang = 3ALPHA
+ ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently
+ reserved script = 4ALPHA ; ISO 15924
+ code region = 2ALPHA ; ISO 3166-1 code
+ / 3DIGIT ; UN M.49 code variant =
+ 5*8alphanum ; registered variants / (DIGIT
+ 3alphanum) extension = singleton 1*("-" (2*8alphanum))
+ ; Single alphanumerics ; "x" reserved for private use
+ singleton = DIGIT ; 0 - 9 / %x41-57
+ ; A - W / %x59-5A ; Y - Z / %x61-77
+ ; a - w / %x79-7A ; y - z it sounds right to
+ still allow Irregular i-xxx IANA and user codes too The
+ parser below doesn't try to cope with extension or
+ privateuse that could be added but that's not interoperable
+ anyway """
+ ret = libxml2mod.xmlCheckLanguageID(lang)
+ return ret
+
+def copyChar(len, out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyChar(len, out, val)
+ return ret
+
+def copyCharMultiByte(out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyCharMultiByte(out, val)
+ return ret
+
+def createEntityParserCtxt(URL, ID, base):
+ """Create a parser context for an external entity Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
+ if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createFileParserCtxt(filename):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateFileParserCtxt(filename)
+ if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createMemoryParserCtxt(buffer, size):
+ """Create a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createURLParserCtxt(filename, options):
+ """Create a parser context for a file or URL content.
+ Automatic support for ZLIB/Compress compressed document is
+ provided by default if found at compile-time and for file
+ accesses """
+ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
+ if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlCreateFileParserCtxt(filename, encoding):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
+ if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlInitAutoClose():
+ """Initialize the htmlStartCloseIndex for fast lookup of
+ closing tags names. This is not reentrant. Call
+ xmlInitParser() once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.htmlInitAutoClose()
+
+def isLetter(c):
+ """Check whether the character is allowed by the production
+ [84] Letter ::= BaseChar | Ideographic """
+ ret = libxml2mod.xmlIsLetter(c)
+ return ret
+
+def namePop(ctxt):
+ """Pops the top element name from the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePop(ctxt__o)
+ return ret
+
+def namePush(ctxt, value):
+ """Pushes a new element name on top of the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePush(ctxt__o, value)
+ return ret
+
+def nodePop(ctxt):
+ """Pops the top element node from the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.nodePop(ctxt__o)
+ if ret is None:raise treeError('nodePop() failed')
+ return xmlNode(_obj=ret)
+
+def nodePush(ctxt, value):
+ """Pushes a new element node on top of the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if value is None: value__o = None
+ else: value__o = value._o
+ ret = libxml2mod.nodePush(ctxt__o, value__o)
+ return ret
+
+#
+# Functions from module python
+#
+
+def SAXParseFile(SAX, URI, recover):
+ """Interface to parse an XML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.xmlSAXParseFile(SAX, URI, recover)
+
+def createInputBuffer(file, encoding):
+ """Create a libxml2 input buffer from a Python file """
+ ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateInputBuffer() failed')
+ return inputBuffer(_obj=ret)
+
+def createOutputBuffer(file, encoding):
+ """Create a libxml2 output buffer from a Python file """
+ ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
+ return outputBuffer(_obj=ret)
+
+def createPushParser(SAX, chunk, size, URI):
+ """Create a progressive XML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('xmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def debugMemory(activate):
+ """Switch on the generation of line number for elements nodes.
+ Also returns the number of bytes allocated and not freed by
+ libxml2 since memory debugging was switched on. """
+ ret = libxml2mod.xmlDebugMemory(activate)
+ return ret
+
+def dumpMemory():
+ """dump the memory allocated in the file .memdump """
+ libxml2mod.xmlDumpMemory()
+
+def htmlCreatePushParser(SAX, chunk, size, URI):
+ """Create a progressive HTML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('htmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlSAXParseFile(SAX, URI, encoding):
+ """Interface to parse an HTML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.htmlSAXParseFile(SAX, URI, encoding)
+
+def memoryUsed():
+ """Returns the total amount of memory allocated by libxml2 """
+ ret = libxml2mod.xmlMemoryUsed()
+ return ret
+
+def newNode(name):
+ """Create a new Node """
+ ret = libxml2mod.xmlNewNode(name)
+ if ret is None:raise treeError('xmlNewNode() failed')
+ return xmlNode(_obj=ret)
+
+def pythonCleanupParser():
+ """Cleanup function for the XML library. It tries to reclaim
+ all parsing related global memory allocated for the library
+ processing. It doesn't deallocate any document related
+ memory. Calling this function should not prevent reusing
+ the library but one should call xmlCleanupParser() only
+ when the process has finished using the library or XML
+ document built with it. """
+ libxml2mod.xmlPythonCleanupParser()
+
+def setEntityLoader(resolver):
+ """Set the entity resolver as a python function """
+ ret = libxml2mod.xmlSetEntityLoader(resolver)
+ return ret
+
+#
+# Functions from module relaxng
+#
+
+def relaxNGCleanupTypes():
+ """Cleanup the default Schemas type library associated to
+ RelaxNG """
+ libxml2mod.xmlRelaxNGCleanupTypes()
+
+def relaxNGInitTypes():
+ """Initilize the default type libraries. """
+ ret = libxml2mod.xmlRelaxNGInitTypes()
+ return ret
+
+def relaxNGNewMemParserCtxt(buffer, size):
+ """Create an XML RelaxNGs parse context for that memory buffer
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+def relaxNGNewParserCtxt(URL):
+ """Create an XML RelaxNGs parse context for that file/resource
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+#
+# Functions from module tree
+#
+
+def buildQName(ncname, prefix, memory, len):
+ """Builds the QName @prefix:@ncname in @memory if there is
+ enough space and prefix is not None nor empty, otherwise
+ allocate a new string. If prefix is None or empty it
+ returns ncname. """
+ ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
+ return ret
+
+def compressMode():
+ """get the default compression mode used, ZLIB based. """
+ ret = libxml2mod.xmlGetCompressMode()
+ return ret
+
+def isXHTML(systemID, publicID):
+ """Try to find if the document correspond to an XHTML DTD """
+ ret = libxml2mod.xmlIsXHTML(systemID, publicID)
+ return ret
+
+def newComment(content):
+ """Creation of a new node containing a comment. """
+ ret = libxml2mod.xmlNewComment(content)
+ if ret is None:raise treeError('xmlNewComment() failed')
+ return xmlNode(_obj=ret)
+
+def newDoc(version):
+ """Creates a new XML document """
+ ret = libxml2mod.xmlNewDoc(version)
+ if ret is None:raise treeError('xmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def newPI(name, content):
+ """Creation of a processing instruction element. Use
+ xmlDocNewPI preferably to get string interning """
+ ret = libxml2mod.xmlNewPI(name, content)
+ if ret is None:raise treeError('xmlNewPI() failed')
+ return xmlNode(_obj=ret)
+
+def newText(content):
+ """Creation of a new text node. """
+ ret = libxml2mod.xmlNewText(content)
+ if ret is None:raise treeError('xmlNewText() failed')
+ return xmlNode(_obj=ret)
+
+def newTextLen(content, len):
+ """Creation of a new text node with an extra parameter for the
+ content's length """
+ ret = libxml2mod.xmlNewTextLen(content, len)
+ if ret is None:raise treeError('xmlNewTextLen() failed')
+ return xmlNode(_obj=ret)
+
+def setCompressMode(mode):
+ """set the default compression mode used, ZLIB based Correct
+ values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetCompressMode(mode)
+
+def validateNCName(value, space):
+ """Check that a value conforms to the lexical space of NCName """
+ ret = libxml2mod.xmlValidateNCName(value, space)
+ return ret
+
+def validateNMToken(value, space):
+ """Check that a value conforms to the lexical space of NMToken """
+ ret = libxml2mod.xmlValidateNMToken(value, space)
+ return ret
+
+def validateName(value, space):
+ """Check that a value conforms to the lexical space of Name """
+ ret = libxml2mod.xmlValidateName(value, space)
+ return ret
+
+def validateQName(value, space):
+ """Check that a value conforms to the lexical space of QName """
+ ret = libxml2mod.xmlValidateQName(value, space)
+ return ret
+
+#
+# Functions from module uri
+#
+
+def URIEscape(str):
+ """Escaping routine, does not do validity checks ! It will try
+ to escape the chars needing this, but this is heuristic
+ based it's impossible to be sure. """
+ ret = libxml2mod.xmlURIEscape(str)
+ return ret
+
+def URIEscapeStr(str, list):
+ """This routine escapes a string to hex, ignoring reserved
+ characters (a-z) and the characters in the exception list. """
+ ret = libxml2mod.xmlURIEscapeStr(str, list)
+ return ret
+
+def URIUnescapeString(str, len, target):
+ """Unescaping routine, but does not check that the string is
+ an URI. The output is a direct unsigned char translation of
+ %XX values (no encoding) Note that the length of the result
+ can only be smaller or same size as the input string. """
+ ret = libxml2mod.xmlURIUnescapeString(str, len, target)
+ return ret
+
+def buildRelativeURI(URI, base):
+ """Expresses the URI of the reference in terms relative to the
+ base. Some examples of this operation include: base =
+ "http://site1.com/docs/book1.html" URI input
+ URI returned docs/pic1.gif pic1.gif
+ docs/img/pic1.gif img/pic1.gif img/pic1.gif
+ ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif
+ http://site2.com/docs/pic1.gif
+ http://site2.com/docs/pic1.gif base = "docs/book1.html"
+ URI input URI returned docs/pic1.gif
+ pic1.gif docs/img/pic1.gif img/pic1.gif
+ img/pic1.gif ../img/pic1.gif
+ http://site1.com/docs/pic1.gif
+ http://site1.com/docs/pic1.gif Note: if the URI reference
+ is really wierd or complicated, it may be worthwhile to
+ first convert it into a "nice" one by calling xmlBuildURI
+ (using 'base') before calling this routine, since this
+ routine (for reasonable efficiency) assumes URI has already
+ been through some validation. """
+ ret = libxml2mod.xmlBuildRelativeURI(URI, base)
+ return ret
+
+def buildURI(URI, base):
+ """Computes he final URI of the reference done by checking
+ that the given URI is valid, and building the final URI
+ using the base URI. This is processed according to section
+ 5.2 of the RFC 2396 5.2. Resolving Relative References to
+ Absolute Form """
+ ret = libxml2mod.xmlBuildURI(URI, base)
+ return ret
+
+def canonicPath(path):
+ """Constructs a canonic path from the specified path. """
+ ret = libxml2mod.xmlCanonicPath(path)
+ return ret
+
+def createURI():
+ """Simply creates an empty xmlURI """
+ ret = libxml2mod.xmlCreateURI()
+ if ret is None:raise uriError('xmlCreateURI() failed')
+ return URI(_obj=ret)
+
+def normalizeURIPath(path):
+ """Applies the 5 normalization steps to a path string--that
+ is, RFC 2396 Section 5.2, steps 6.c through 6.g.
+ Normalization occurs directly on the string, no new
+ allocation is done """
+ ret = libxml2mod.xmlNormalizeURIPath(path)
+ return ret
+
+def parseURI(str):
+ """Parse an URI based on RFC 3986 URI-reference = [
+ absoluteURI | relativeURI ] [ "#" fragment ] """
+ ret = libxml2mod.xmlParseURI(str)
+ if ret is None:raise uriError('xmlParseURI() failed')
+ return URI(_obj=ret)
+
+def parseURIRaw(str, raw):
+ """Parse an URI but allows to keep intact the original
+ fragments. URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIRaw(str, raw)
+ if ret is None:raise uriError('xmlParseURIRaw() failed')
+ return URI(_obj=ret)
+
+def pathToURI(path):
+ """Constructs an URI expressing the existing path """
+ ret = libxml2mod.xmlPathToURI(path)
+ return ret
+
+#
+# Functions from module valid
+#
+
+def newValidCtxt():
+ """Allocate a validation context structure. """
+ ret = libxml2mod.xmlNewValidCtxt()
+ if ret is None:raise treeError('xmlNewValidCtxt() failed')
+ return ValidCtxt(_obj=ret)
+
+def validateNameValue(value):
+ """Validate that the given value match Name production """
+ ret = libxml2mod.xmlValidateNameValue(value)
+ return ret
+
+def validateNamesValue(value):
+ """Validate that the given value match Names production """
+ ret = libxml2mod.xmlValidateNamesValue(value)
+ return ret
+
+def validateNmtokenValue(value):
+ """Validate that the given value match Nmtoken production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokenValue(value)
+ return ret
+
+def validateNmtokensValue(value):
+ """Validate that the given value match Nmtokens production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokensValue(value)
+ return ret
+
+#
+# Functions from module xmlIO
+#
+
+def checkFilename(path):
+ """function checks to see if @path is a valid source (file,
+ socket...) for XML. if stat is not available on the target
+ machine, """
+ ret = libxml2mod.xmlCheckFilename(path)
+ return ret
+
+def cleanupInputCallbacks():
+ """clears the entire input callback table. this includes the
+ compiled-in I/O. """
+ libxml2mod.xmlCleanupInputCallbacks()
+
+def cleanupOutputCallbacks():
+ """clears the entire output callback table. this includes the
+ compiled-in I/O callbacks. """
+ libxml2mod.xmlCleanupOutputCallbacks()
+
+def fileMatch(filename):
+ """input from FILE * """
+ ret = libxml2mod.xmlFileMatch(filename)
+ return ret
+
+def iOFTPMatch(filename):
+ """check if the URI matches an FTP one """
+ ret = libxml2mod.xmlIOFTPMatch(filename)
+ return ret
+
+def iOHTTPMatch(filename):
+ """check if the URI matches an HTTP one """
+ ret = libxml2mod.xmlIOHTTPMatch(filename)
+ return ret
+
+def normalizeWindowsPath(path):
+ """This function is obsolete. Please see xmlURIFromPath in
+ uri.c for a better solution. """
+ ret = libxml2mod.xmlNormalizeWindowsPath(path)
+ return ret
+
+def parserGetDirectory(filename):
+ """lookup the directory for that file """
+ ret = libxml2mod.xmlParserGetDirectory(filename)
+ return ret
+
+def registerDefaultInputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultInputCallbacks()
+
+def registerDefaultOutputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultOutputCallbacks()
+
+def registerHTTPPostCallbacks():
+ """By default, libxml submits HTTP output requests using the
+ "PUT" method. Calling this method changes the HTTP output
+ method to use the "POST" method instead. """
+ libxml2mod.xmlRegisterHTTPPostCallbacks()
+
+#
+# Functions from module xmlerror
+#
+
+def lastError():
+ """Get the last global error registered. This is per thread if
+ compiled with thread support. """
+ ret = libxml2mod.xmlGetLastError()
+ if ret is None:raise treeError('xmlGetLastError() failed')
+ return Error(_obj=ret)
+
+def resetLastError():
+ """Cleanup the last global error registered. For parsing error
+ this does not change the well-formedness result. """
+ libxml2mod.xmlResetLastError()
+
+#
+# Functions from module xmlreader
+#
+
+def newTextReaderFilename(URI):
+ """Create an xmlTextReader structure fed with the resource at
+ @URI """
+ ret = libxml2mod.xmlNewTextReaderFilename(URI)
+ if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForDoc(cur, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForDoc() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFd(fd, URL, encoding, options):
+ """Create an xmltextReader for an XML from a file descriptor.
+ The parsing flags @options are a combination of
+ xmlParserOption. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. """
+ ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFd() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFile() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForMemory(buffer, size, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForMemory() failed')
+ return xmlTextReader(_obj=ret)
+
+#
+# Functions from module xmlregexp
+#
+
+def regexpCompile(regexp):
+ """Parses a regular expression conforming to XML Schemas Part
+ 2 Datatype Appendix F and builds an automata suitable for
+ testing strings against that regular expression """
+ ret = libxml2mod.xmlRegexpCompile(regexp)
+ if ret is None:raise treeError('xmlRegexpCompile() failed')
+ return xmlReg(_obj=ret)
+
+#
+# Functions from module xmlschemas
+#
+
+def schemaNewMemParserCtxt(buffer, size):
+ """Create an XML Schemas parse context for that memory buffer
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+def schemaNewParserCtxt(URL):
+ """Create an XML Schemas parse context for that file/resource
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+#
+# Functions from module xmlschemastypes
+#
+
+def schemaCleanupTypes():
+ """Cleanup the default XML Schemas type library """
+ libxml2mod.xmlSchemaCleanupTypes()
+
+def schemaCollapseString(value):
+ """Removes and normalize white spaces in the string """
+ ret = libxml2mod.xmlSchemaCollapseString(value)
+ return ret
+
+def schemaInitTypes():
+ """Initialize the default XML Schemas type library """
+ libxml2mod.xmlSchemaInitTypes()
+
+def schemaWhiteSpaceReplace(value):
+ """Replaces 0xd, 0x9 and 0xa with a space. """
+ ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value)
+ return ret
+
+#
+# Functions from module xmlstring
+#
+
+def UTF8Charcmp(utf1, utf2):
+ """compares the two UCS4 values """
+ ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2)
+ return ret
+
+def UTF8Size(utf):
+ """calculates the internal size of a UTF8 character """
+ ret = libxml2mod.xmlUTF8Size(utf)
+ return ret
+
+def UTF8Strlen(utf):
+ """compute the length of an UTF8 string, it doesn't do a full
+ UTF8 checking of the content of the string. """
+ ret = libxml2mod.xmlUTF8Strlen(utf)
+ return ret
+
+def UTF8Strloc(utf, utfchar):
+ """a function to provide the relative location of a UTF8 char """
+ ret = libxml2mod.xmlUTF8Strloc(utf, utfchar)
+ return ret
+
+def UTF8Strndup(utf, len):
+ """a strndup for array of UTF8's """
+ ret = libxml2mod.xmlUTF8Strndup(utf, len)
+ return ret
+
+def UTF8Strpos(utf, pos):
+ """a function to provide the equivalent of fetching a
+ character from a string array """
+ ret = libxml2mod.xmlUTF8Strpos(utf, pos)
+ return ret
+
+def UTF8Strsize(utf, len):
+ """storage size of an UTF8 string the behaviour is not
+ garanteed if the input string is not UTF-8 """
+ ret = libxml2mod.xmlUTF8Strsize(utf, len)
+ return ret
+
+def UTF8Strsub(utf, start, len):
+ """Create a substring from a given UTF-8 string Note:
+ positions are given in units of UTF-8 chars """
+ ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
+ return ret
+
+def checkUTF8(utf):
+ """Checks @utf for being valid UTF-8. @utf is assumed to be
+ null-terminated. This function is not super-strict, as it
+ will allow longer UTF-8 sequences than necessary. Note that
+ Java is capable of producing these sequences if provoked.
+ Also note, this routine checks for the 4-byte maximum size,
+ but does not check for 0x10ffff maximum value. """
+ ret = libxml2mod.xmlCheckUTF8(utf)
+ return ret
+
+#
+# Functions from module xmlunicode
+#
+
+def uCSIsAegeanNumbers(code):
+ """Check whether the character is part of AegeanNumbers UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsAegeanNumbers(code)
+ return ret
+
+def uCSIsAlphabeticPresentationForms(code):
+ """Check whether the character is part of
+ AlphabeticPresentationForms UCS Block """
+ ret = libxml2mod.xmlUCSIsAlphabeticPresentationForms(code)
+ return ret
+
+def uCSIsArabic(code):
+ """Check whether the character is part of Arabic UCS Block """
+ ret = libxml2mod.xmlUCSIsArabic(code)
+ return ret
+
+def uCSIsArabicPresentationFormsA(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-A UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsA(code)
+ return ret
+
+def uCSIsArabicPresentationFormsB(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-B UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsB(code)
+ return ret
+
+def uCSIsArmenian(code):
+ """Check whether the character is part of Armenian UCS Block """
+ ret = libxml2mod.xmlUCSIsArmenian(code)
+ return ret
+
+def uCSIsArrows(code):
+ """Check whether the character is part of Arrows UCS Block """
+ ret = libxml2mod.xmlUCSIsArrows(code)
+ return ret
+
+def uCSIsBasicLatin(code):
+ """Check whether the character is part of BasicLatin UCS Block """
+ ret = libxml2mod.xmlUCSIsBasicLatin(code)
+ return ret
+
+def uCSIsBengali(code):
+ """Check whether the character is part of Bengali UCS Block """
+ ret = libxml2mod.xmlUCSIsBengali(code)
+ return ret
+
+def uCSIsBlock(code, block):
+ """Check whether the character is part of the UCS Block """
+ ret = libxml2mod.xmlUCSIsBlock(code, block)
+ return ret
+
+def uCSIsBlockElements(code):
+ """Check whether the character is part of BlockElements UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBlockElements(code)
+ return ret
+
+def uCSIsBopomofo(code):
+ """Check whether the character is part of Bopomofo UCS Block """
+ ret = libxml2mod.xmlUCSIsBopomofo(code)
+ return ret
+
+def uCSIsBopomofoExtended(code):
+ """Check whether the character is part of BopomofoExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBopomofoExtended(code)
+ return ret
+
+def uCSIsBoxDrawing(code):
+ """Check whether the character is part of BoxDrawing UCS Block """
+ ret = libxml2mod.xmlUCSIsBoxDrawing(code)
+ return ret
+
+def uCSIsBraillePatterns(code):
+ """Check whether the character is part of BraillePatterns UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBraillePatterns(code)
+ return ret
+
+def uCSIsBuhid(code):
+ """Check whether the character is part of Buhid UCS Block """
+ ret = libxml2mod.xmlUCSIsBuhid(code)
+ return ret
+
+def uCSIsByzantineMusicalSymbols(code):
+ """Check whether the character is part of
+ ByzantineMusicalSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsByzantineMusicalSymbols(code)
+ return ret
+
+def uCSIsCJKCompatibility(code):
+ """Check whether the character is part of CJKCompatibility UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibility(code)
+ return ret
+
+def uCSIsCJKCompatibilityForms(code):
+ """Check whether the character is part of
+ CJKCompatibilityForms UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityForms(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographs(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographs UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographs(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographsSupplement(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographsSupplement(code)
+ return ret
+
+def uCSIsCJKRadicalsSupplement(code):
+ """Check whether the character is part of
+ CJKRadicalsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKRadicalsSupplement(code)
+ return ret
+
+def uCSIsCJKSymbolsandPunctuation(code):
+ """Check whether the character is part of
+ CJKSymbolsandPunctuation UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKSymbolsandPunctuation(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographs(code):
+ """Check whether the character is part of CJKUnifiedIdeographs
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographs(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionA(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionA UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionA(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionB(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionB UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionB(code)
+ return ret
+
+def uCSIsCat(code, cat):
+ """Check whether the character is part of the UCS Category """
+ ret = libxml2mod.xmlUCSIsCat(code, cat)
+ return ret
+
+def uCSIsCatC(code):
+ """Check whether the character is part of C UCS Category """
+ ret = libxml2mod.xmlUCSIsCatC(code)
+ return ret
+
+def uCSIsCatCc(code):
+ """Check whether the character is part of Cc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCc(code)
+ return ret
+
+def uCSIsCatCf(code):
+ """Check whether the character is part of Cf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCf(code)
+ return ret
+
+def uCSIsCatCo(code):
+ """Check whether the character is part of Co UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCo(code)
+ return ret
+
+def uCSIsCatCs(code):
+ """Check whether the character is part of Cs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCs(code)
+ return ret
+
+def uCSIsCatL(code):
+ """Check whether the character is part of L UCS Category """
+ ret = libxml2mod.xmlUCSIsCatL(code)
+ return ret
+
+def uCSIsCatLl(code):
+ """Check whether the character is part of Ll UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLl(code)
+ return ret
+
+def uCSIsCatLm(code):
+ """Check whether the character is part of Lm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLm(code)
+ return ret
+
+def uCSIsCatLo(code):
+ """Check whether the character is part of Lo UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLo(code)
+ return ret
+
+def uCSIsCatLt(code):
+ """Check whether the character is part of Lt UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLt(code)
+ return ret
+
+def uCSIsCatLu(code):
+ """Check whether the character is part of Lu UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLu(code)
+ return ret
+
+def uCSIsCatM(code):
+ """Check whether the character is part of M UCS Category """
+ ret = libxml2mod.xmlUCSIsCatM(code)
+ return ret
+
+def uCSIsCatMc(code):
+ """Check whether the character is part of Mc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMc(code)
+ return ret
+
+def uCSIsCatMe(code):
+ """Check whether the character is part of Me UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMe(code)
+ return ret
+
+def uCSIsCatMn(code):
+ """Check whether the character is part of Mn UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMn(code)
+ return ret
+
+def uCSIsCatN(code):
+ """Check whether the character is part of N UCS Category """
+ ret = libxml2mod.xmlUCSIsCatN(code)
+ return ret
+
+def uCSIsCatNd(code):
+ """Check whether the character is part of Nd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNd(code)
+ return ret
+
+def uCSIsCatNl(code):
+ """Check whether the character is part of Nl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNl(code)
+ return ret
+
+def uCSIsCatNo(code):
+ """Check whether the character is part of No UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNo(code)
+ return ret
+
+def uCSIsCatP(code):
+ """Check whether the character is part of P UCS Category """
+ ret = libxml2mod.xmlUCSIsCatP(code)
+ return ret
+
+def uCSIsCatPc(code):
+ """Check whether the character is part of Pc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPc(code)
+ return ret
+
+def uCSIsCatPd(code):
+ """Check whether the character is part of Pd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPd(code)
+ return ret
+
+def uCSIsCatPe(code):
+ """Check whether the character is part of Pe UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPe(code)
+ return ret
+
+def uCSIsCatPf(code):
+ """Check whether the character is part of Pf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPf(code)
+ return ret
+
+def uCSIsCatPi(code):
+ """Check whether the character is part of Pi UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPi(code)
+ return ret
+
+def uCSIsCatPo(code):
+ """Check whether the character is part of Po UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPo(code)
+ return ret
+
+def uCSIsCatPs(code):
+ """Check whether the character is part of Ps UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPs(code)
+ return ret
+
+def uCSIsCatS(code):
+ """Check whether the character is part of S UCS Category """
+ ret = libxml2mod.xmlUCSIsCatS(code)
+ return ret
+
+def uCSIsCatSc(code):
+ """Check whether the character is part of Sc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSc(code)
+ return ret
+
+def uCSIsCatSk(code):
+ """Check whether the character is part of Sk UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSk(code)
+ return ret
+
+def uCSIsCatSm(code):
+ """Check whether the character is part of Sm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSm(code)
+ return ret
+
+def uCSIsCatSo(code):
+ """Check whether the character is part of So UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSo(code)
+ return ret
+
+def uCSIsCatZ(code):
+ """Check whether the character is part of Z UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZ(code)
+ return ret
+
+def uCSIsCatZl(code):
+ """Check whether the character is part of Zl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZl(code)
+ return ret
+
+def uCSIsCatZp(code):
+ """Check whether the character is part of Zp UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZp(code)
+ return ret
+
+def uCSIsCatZs(code):
+ """Check whether the character is part of Zs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZs(code)
+ return ret
+
+def uCSIsCherokee(code):
+ """Check whether the character is part of Cherokee UCS Block """
+ ret = libxml2mod.xmlUCSIsCherokee(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarks(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarks UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarks(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code)
+ return ret
+
+def uCSIsCombiningHalfMarks(code):
+ """Check whether the character is part of CombiningHalfMarks
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code)
+ return ret
+
+def uCSIsCombiningMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningMarksforSymbols(code)
+ return ret
+
+def uCSIsControlPictures(code):
+ """Check whether the character is part of ControlPictures UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsControlPictures(code)
+ return ret
+
+def uCSIsCurrencySymbols(code):
+ """Check whether the character is part of CurrencySymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCurrencySymbols(code)
+ return ret
+
+def uCSIsCypriotSyllabary(code):
+ """Check whether the character is part of CypriotSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCypriotSyllabary(code)
+ return ret
+
+def uCSIsCyrillic(code):
+ """Check whether the character is part of Cyrillic UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillic(code)
+ return ret
+
+def uCSIsCyrillicSupplement(code):
+ """Check whether the character is part of CyrillicSupplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillicSupplement(code)
+ return ret
+
+def uCSIsDeseret(code):
+ """Check whether the character is part of Deseret UCS Block """
+ ret = libxml2mod.xmlUCSIsDeseret(code)
+ return ret
+
+def uCSIsDevanagari(code):
+ """Check whether the character is part of Devanagari UCS Block """
+ ret = libxml2mod.xmlUCSIsDevanagari(code)
+ return ret
+
+def uCSIsDingbats(code):
+ """Check whether the character is part of Dingbats UCS Block """
+ ret = libxml2mod.xmlUCSIsDingbats(code)
+ return ret
+
+def uCSIsEnclosedAlphanumerics(code):
+ """Check whether the character is part of
+ EnclosedAlphanumerics UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedAlphanumerics(code)
+ return ret
+
+def uCSIsEnclosedCJKLettersandMonths(code):
+ """Check whether the character is part of
+ EnclosedCJKLettersandMonths UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedCJKLettersandMonths(code)
+ return ret
+
+def uCSIsEthiopic(code):
+ """Check whether the character is part of Ethiopic UCS Block """
+ ret = libxml2mod.xmlUCSIsEthiopic(code)
+ return ret
+
+def uCSIsGeneralPunctuation(code):
+ """Check whether the character is part of GeneralPunctuation
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsGeneralPunctuation(code)
+ return ret
+
+def uCSIsGeometricShapes(code):
+ """Check whether the character is part of GeometricShapes UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGeometricShapes(code)
+ return ret
+
+def uCSIsGeorgian(code):
+ """Check whether the character is part of Georgian UCS Block """
+ ret = libxml2mod.xmlUCSIsGeorgian(code)
+ return ret
+
+def uCSIsGothic(code):
+ """Check whether the character is part of Gothic UCS Block """
+ ret = libxml2mod.xmlUCSIsGothic(code)
+ return ret
+
+def uCSIsGreek(code):
+ """Check whether the character is part of Greek UCS Block """
+ ret = libxml2mod.xmlUCSIsGreek(code)
+ return ret
+
+def uCSIsGreekExtended(code):
+ """Check whether the character is part of GreekExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekExtended(code)
+ return ret
+
+def uCSIsGreekandCoptic(code):
+ """Check whether the character is part of GreekandCoptic UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekandCoptic(code)
+ return ret
+
+def uCSIsGujarati(code):
+ """Check whether the character is part of Gujarati UCS Block """
+ ret = libxml2mod.xmlUCSIsGujarati(code)
+ return ret
+
+def uCSIsGurmukhi(code):
+ """Check whether the character is part of Gurmukhi UCS Block """
+ ret = libxml2mod.xmlUCSIsGurmukhi(code)
+ return ret
+
+def uCSIsHalfwidthandFullwidthForms(code):
+ """Check whether the character is part of
+ HalfwidthandFullwidthForms UCS Block """
+ ret = libxml2mod.xmlUCSIsHalfwidthandFullwidthForms(code)
+ return ret
+
+def uCSIsHangulCompatibilityJamo(code):
+ """Check whether the character is part of
+ HangulCompatibilityJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulCompatibilityJamo(code)
+ return ret
+
+def uCSIsHangulJamo(code):
+ """Check whether the character is part of HangulJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulJamo(code)
+ return ret
+
+def uCSIsHangulSyllables(code):
+ """Check whether the character is part of HangulSyllables UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHangulSyllables(code)
+ return ret
+
+def uCSIsHanunoo(code):
+ """Check whether the character is part of Hanunoo UCS Block """
+ ret = libxml2mod.xmlUCSIsHanunoo(code)
+ return ret
+
+def uCSIsHebrew(code):
+ """Check whether the character is part of Hebrew UCS Block """
+ ret = libxml2mod.xmlUCSIsHebrew(code)
+ return ret
+
+def uCSIsHighPrivateUseSurrogates(code):
+ """Check whether the character is part of
+ HighPrivateUseSurrogates UCS Block """
+ ret = libxml2mod.xmlUCSIsHighPrivateUseSurrogates(code)
+ return ret
+
+def uCSIsHighSurrogates(code):
+ """Check whether the character is part of HighSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHighSurrogates(code)
+ return ret
+
+def uCSIsHiragana(code):
+ """Check whether the character is part of Hiragana UCS Block """
+ ret = libxml2mod.xmlUCSIsHiragana(code)
+ return ret
+
+def uCSIsIPAExtensions(code):
+ """Check whether the character is part of IPAExtensions UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsIPAExtensions(code)
+ return ret
+
+def uCSIsIdeographicDescriptionCharacters(code):
+ """Check whether the character is part of
+ IdeographicDescriptionCharacters UCS Block """
+ ret = libxml2mod.xmlUCSIsIdeographicDescriptionCharacters(code)
+ return ret
+
+def uCSIsKanbun(code):
+ """Check whether the character is part of Kanbun UCS Block """
+ ret = libxml2mod.xmlUCSIsKanbun(code)
+ return ret
+
+def uCSIsKangxiRadicals(code):
+ """Check whether the character is part of KangxiRadicals UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKangxiRadicals(code)
+ return ret
+
+def uCSIsKannada(code):
+ """Check whether the character is part of Kannada UCS Block """
+ ret = libxml2mod.xmlUCSIsKannada(code)
+ return ret
+
+def uCSIsKatakana(code):
+ """Check whether the character is part of Katakana UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakana(code)
+ return ret
+
+def uCSIsKatakanaPhoneticExtensions(code):
+ """Check whether the character is part of
+ KatakanaPhoneticExtensions UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakanaPhoneticExtensions(code)
+ return ret
+
+def uCSIsKhmer(code):
+ """Check whether the character is part of Khmer UCS Block """
+ ret = libxml2mod.xmlUCSIsKhmer(code)
+ return ret
+
+def uCSIsKhmerSymbols(code):
+ """Check whether the character is part of KhmerSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKhmerSymbols(code)
+ return ret
+
+def uCSIsLao(code):
+ """Check whether the character is part of Lao UCS Block """
+ ret = libxml2mod.xmlUCSIsLao(code)
+ return ret
+
+def uCSIsLatin1Supplement(code):
+ """Check whether the character is part of Latin-1Supplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLatin1Supplement(code)
+ return ret
+
+def uCSIsLatinExtendedA(code):
+ """Check whether the character is part of LatinExtended-A UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedA(code)
+ return ret
+
+def uCSIsLatinExtendedAdditional(code):
+ """Check whether the character is part of
+ LatinExtendedAdditional UCS Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code)
+ return ret
+
+def uCSIsLatinExtendedB(code):
+ """Check whether the character is part of LatinExtended-B UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedB(code)
+ return ret
+
+def uCSIsLetterlikeSymbols(code):
+ """Check whether the character is part of LetterlikeSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code)
+ return ret
+
+def uCSIsLimbu(code):
+ """Check whether the character is part of Limbu UCS Block """
+ ret = libxml2mod.xmlUCSIsLimbu(code)
+ return ret
+
+def uCSIsLinearBIdeograms(code):
+ """Check whether the character is part of LinearBIdeograms UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBIdeograms(code)
+ return ret
+
+def uCSIsLinearBSyllabary(code):
+ """Check whether the character is part of LinearBSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBSyllabary(code)
+ return ret
+
+def uCSIsLowSurrogates(code):
+ """Check whether the character is part of LowSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLowSurrogates(code)
+ return ret
+
+def uCSIsMalayalam(code):
+ """Check whether the character is part of Malayalam UCS Block """
+ ret = libxml2mod.xmlUCSIsMalayalam(code)
+ return ret
+
+def uCSIsMathematicalAlphanumericSymbols(code):
+ """Check whether the character is part of
+ MathematicalAlphanumericSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code)
+ return ret
+
+def uCSIsMathematicalOperators(code):
+ """Check whether the character is part of
+ MathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalOperators(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsA(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-A UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsA(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsB(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-B UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsB(code)
+ return ret
+
+def uCSIsMiscellaneousSymbols(code):
+ """Check whether the character is part of MiscellaneousSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbols(code)
+ return ret
+
+def uCSIsMiscellaneousSymbolsandArrows(code):
+ """Check whether the character is part of
+ MiscellaneousSymbolsandArrows UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbolsandArrows(code)
+ return ret
+
+def uCSIsMiscellaneousTechnical(code):
+ """Check whether the character is part of
+ MiscellaneousTechnical UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousTechnical(code)
+ return ret
+
+def uCSIsMongolian(code):
+ """Check whether the character is part of Mongolian UCS Block """
+ ret = libxml2mod.xmlUCSIsMongolian(code)
+ return ret
+
+def uCSIsMusicalSymbols(code):
+ """Check whether the character is part of MusicalSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsMusicalSymbols(code)
+ return ret
+
+def uCSIsMyanmar(code):
+ """Check whether the character is part of Myanmar UCS Block """
+ ret = libxml2mod.xmlUCSIsMyanmar(code)
+ return ret
+
+def uCSIsNumberForms(code):
+ """Check whether the character is part of NumberForms UCS Block """
+ ret = libxml2mod.xmlUCSIsNumberForms(code)
+ return ret
+
+def uCSIsOgham(code):
+ """Check whether the character is part of Ogham UCS Block """
+ ret = libxml2mod.xmlUCSIsOgham(code)
+ return ret
+
+def uCSIsOldItalic(code):
+ """Check whether the character is part of OldItalic UCS Block """
+ ret = libxml2mod.xmlUCSIsOldItalic(code)
+ return ret
+
+def uCSIsOpticalCharacterRecognition(code):
+ """Check whether the character is part of
+ OpticalCharacterRecognition UCS Block """
+ ret = libxml2mod.xmlUCSIsOpticalCharacterRecognition(code)
+ return ret
+
+def uCSIsOriya(code):
+ """Check whether the character is part of Oriya UCS Block """
+ ret = libxml2mod.xmlUCSIsOriya(code)
+ return ret
+
+def uCSIsOsmanya(code):
+ """Check whether the character is part of Osmanya UCS Block """
+ ret = libxml2mod.xmlUCSIsOsmanya(code)
+ return ret
+
+def uCSIsPhoneticExtensions(code):
+ """Check whether the character is part of PhoneticExtensions
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsPhoneticExtensions(code)
+ return ret
+
+def uCSIsPrivateUse(code):
+ """Check whether the character is part of PrivateUse UCS Block """
+ ret = libxml2mod.xmlUCSIsPrivateUse(code)
+ return ret
+
+def uCSIsPrivateUseArea(code):
+ """Check whether the character is part of PrivateUseArea UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsPrivateUseArea(code)
+ return ret
+
+def uCSIsRunic(code):
+ """Check whether the character is part of Runic UCS Block """
+ ret = libxml2mod.xmlUCSIsRunic(code)
+ return ret
+
+def uCSIsShavian(code):
+ """Check whether the character is part of Shavian UCS Block """
+ ret = libxml2mod.xmlUCSIsShavian(code)
+ return ret
+
+def uCSIsSinhala(code):
+ """Check whether the character is part of Sinhala UCS Block """
+ ret = libxml2mod.xmlUCSIsSinhala(code)
+ return ret
+
+def uCSIsSmallFormVariants(code):
+ """Check whether the character is part of SmallFormVariants
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSmallFormVariants(code)
+ return ret
+
+def uCSIsSpacingModifierLetters(code):
+ """Check whether the character is part of
+ SpacingModifierLetters UCS Block """
+ ret = libxml2mod.xmlUCSIsSpacingModifierLetters(code)
+ return ret
+
+def uCSIsSpecials(code):
+ """Check whether the character is part of Specials UCS Block """
+ ret = libxml2mod.xmlUCSIsSpecials(code)
+ return ret
+
+def uCSIsSuperscriptsandSubscripts(code):
+ """Check whether the character is part of
+ SuperscriptsandSubscripts UCS Block """
+ ret = libxml2mod.xmlUCSIsSuperscriptsandSubscripts(code)
+ return ret
+
+def uCSIsSupplementalArrowsA(code):
+ """Check whether the character is part of SupplementalArrows-A
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsA(code)
+ return ret
+
+def uCSIsSupplementalArrowsB(code):
+ """Check whether the character is part of SupplementalArrows-B
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsB(code)
+ return ret
+
+def uCSIsSupplementalMathematicalOperators(code):
+ """Check whether the character is part of
+ SupplementalMathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalMathematicalOperators(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaA(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-A UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaA(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaB(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-B UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaB(code)
+ return ret
+
+def uCSIsSyriac(code):
+ """Check whether the character is part of Syriac UCS Block """
+ ret = libxml2mod.xmlUCSIsSyriac(code)
+ return ret
+
+def uCSIsTagalog(code):
+ """Check whether the character is part of Tagalog UCS Block """
+ ret = libxml2mod.xmlUCSIsTagalog(code)
+ return ret
+
+def uCSIsTagbanwa(code):
+ """Check whether the character is part of Tagbanwa UCS Block """
+ ret = libxml2mod.xmlUCSIsTagbanwa(code)
+ return ret
+
+def uCSIsTags(code):
+ """Check whether the character is part of Tags UCS Block """
+ ret = libxml2mod.xmlUCSIsTags(code)
+ return ret
+
+def uCSIsTaiLe(code):
+ """Check whether the character is part of TaiLe UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiLe(code)
+ return ret
+
+def uCSIsTaiXuanJingSymbols(code):
+ """Check whether the character is part of TaiXuanJingSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code)
+ return ret
+
+def uCSIsTamil(code):
+ """Check whether the character is part of Tamil UCS Block """
+ ret = libxml2mod.xmlUCSIsTamil(code)
+ return ret
+
+def uCSIsTelugu(code):
+ """Check whether the character is part of Telugu UCS Block """
+ ret = libxml2mod.xmlUCSIsTelugu(code)
+ return ret
+
+def uCSIsThaana(code):
+ """Check whether the character is part of Thaana UCS Block """
+ ret = libxml2mod.xmlUCSIsThaana(code)
+ return ret
+
+def uCSIsThai(code):
+ """Check whether the character is part of Thai UCS Block """
+ ret = libxml2mod.xmlUCSIsThai(code)
+ return ret
+
+def uCSIsTibetan(code):
+ """Check whether the character is part of Tibetan UCS Block """
+ ret = libxml2mod.xmlUCSIsTibetan(code)
+ return ret
+
+def uCSIsUgaritic(code):
+ """Check whether the character is part of Ugaritic UCS Block """
+ ret = libxml2mod.xmlUCSIsUgaritic(code)
+ return ret
+
+def uCSIsUnifiedCanadianAboriginalSyllabics(code):
+ """Check whether the character is part of
+ UnifiedCanadianAboriginalSyllabics UCS Block """
+ ret = libxml2mod.xmlUCSIsUnifiedCanadianAboriginalSyllabics(code)
+ return ret
+
+def uCSIsVariationSelectors(code):
+ """Check whether the character is part of VariationSelectors
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectors(code)
+ return ret
+
+def uCSIsVariationSelectorsSupplement(code):
+ """Check whether the character is part of
+ VariationSelectorsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectorsSupplement(code)
+ return ret
+
+def uCSIsYiRadicals(code):
+ """Check whether the character is part of YiRadicals UCS Block """
+ ret = libxml2mod.xmlUCSIsYiRadicals(code)
+ return ret
+
+def uCSIsYiSyllables(code):
+ """Check whether the character is part of YiSyllables UCS Block """
+ ret = libxml2mod.xmlUCSIsYiSyllables(code)
+ return ret
+
+def uCSIsYijingHexagramSymbols(code):
+ """Check whether the character is part of
+ YijingHexagramSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code)
+ return ret
+
+#
+# Functions from module xmlversion
+#
+
+def checkVersion(version):
+ """check the compiled lib version against the include one.
+ This can warn or immediately kill the application """
+ libxml2mod.xmlCheckVersion(version)
+
+#
+# Functions from module xpathInternals
+#
+
+def valuePop(ctxt):
+ """Pops the top XPath object from the value stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.valuePop(ctxt__o)
+ return ret
+
+class xmlNode(xmlCore):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNode got a wrong wrapper object type')
+ self._o = _obj
+ xmlCore.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNode (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ # accessors for xmlNode
+ def ns(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def nsDefs(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNsDefs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module debugXML
+ #
+
+ def debugDumpNode(self, output, depth):
+ """Dumps debug information for the element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNode(output, self._o, depth)
+
+ def debugDumpNodeList(self, output, depth):
+ """Dumps debug information for the list of element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNodeList(output, self._o, depth)
+
+ def debugDumpOneNode(self, output, depth):
+ """Dumps debug information for the element node, it is not
+ recursive """
+ libxml2mod.xmlDebugDumpOneNode(output, self._o, depth)
+
+ def lsCountNode(self):
+ """Count the children of @node. """
+ ret = libxml2mod.xmlLsCountNode(self._o)
+ return ret
+
+ def lsOneNode(self, output):
+ """Dump to @output the type and name of @node. """
+ libxml2mod.xmlLsOneNode(output, self._o)
+
+ def shellPrintNode(self):
+ """Print node to the output FILE """
+ libxml2mod.xmlShellPrintNode(self._o)
+
+ #
+ # xmlNode functions from module tree
+ #
+
+ def addChild(self, cur):
+ """Add a new node to @parent, at the end of the child (or
+ property) list merging adjacent TEXT nodes (in which case
+ @cur is freed) If the new node is ATTRIBUTE, it is added
+ into properties instead of children. If there is an
+ attribute with equal name, it is first destroyed. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChild(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addChildList(self, cur):
+ """Add a list of node at the end of the child list of the
+ parent merging adjacent TEXT nodes (@cur may be freed) """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChildList(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChildList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addContent(self, content):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContent(), @content is supposed to be
+ raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContent(self._o, content)
+
+ def addContentLen(self, content, len):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContentLen(), @content is supposed to
+ be raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContentLen(self._o, content, len)
+
+ def addNextSibling(self, elem):
+ """Add a new node @elem as the next sibling of @cur If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. As a result of text
+ merging @elem may be freed. If the new node is ATTRIBUTE,
+ it is added into properties instead of children. If there
+ is an attribute with equal name, it is first destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddNextSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addPrevSibling(self, elem):
+ """Add a new node @elem as the previous sibling of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. If the new node is
+ ATTRIBUTE, it is added into properties instead of children.
+ If there is an attribute with equal name, it is first
+ destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddPrevSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addSibling(self, elem):
+ """Add a new element @elem to the list of siblings of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ element was already inserted in a document it is first
+ unlinked from its existing context. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNode(self, extended):
+ """Do a copy of the node. """
+ ret = libxml2mod.xmlCopyNode(self._o, extended)
+ if ret is None:raise treeError('xmlCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self):
+ """Do a recursive copy of the node list. Use
+ xmlDocCopyNodeList() if possible to ensure string interning. """
+ ret = libxml2mod.xmlCopyNodeList(self._o)
+ if ret is None:raise treeError('xmlCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyProp(self, cur):
+ """Do a copy of the attribute. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyProp(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, cur):
+ """Do a copy of an attribute list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def docCopyNode(self, doc, extended):
+ """Do a copy of the node to a given document. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docCopyNodeList(self, doc):
+ """Do a recursive copy of the node list. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docSetRootElement(self, doc):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def firstElementChild(self):
+ """Finds the first child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlFirstElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def freeNode(self):
+ """Free a node, this is a recursive behaviour, all the
+ children are freed too. This doesn't unlink the child from
+ the list, use xmlUnlinkNode() first. """
+ libxml2mod.xmlFreeNode(self._o)
+
+ def freeNodeList(self):
+ """Free a node and all its siblings, this is a recursive
+ behaviour, all the children are freed too. """
+ libxml2mod.xmlFreeNodeList(self._o)
+
+ def getBase(self, doc):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
+ return ret
+
+ def getContent(self):
+ """Read the value of a node, this can be either the text
+ carried directly by this node if it's a TEXT node or the
+ aggregate string of the values carried by this node child's
+ (TEXT and ENTITY_REF). Entity references are substituted. """
+ ret = libxml2mod.xmlNodeGetContent(self._o)
+ return ret
+
+ def getLang(self):
+ """Searches the language of a node, i.e. the values of the
+ xml:lang attribute or the one carried by the nearest
+ ancestor. """
+ ret = libxml2mod.xmlNodeGetLang(self._o)
+ return ret
+
+ def getSpacePreserve(self):
+ """Searches the space preserving behaviour of a node, i.e. the
+ values of the xml:space attribute or the one carried by the
+ nearest ancestor. """
+ ret = libxml2mod.xmlNodeGetSpacePreserve(self._o)
+ return ret
+
+ def hasNsProp(self, name, nameSpace):
+ """Search for an attribute associated to a node This attribute
+ has to be anchored in the namespace specified. This does
+ the entity substitution. This function looks in DTD
+ attribute declaration for #FIXED or default declaration
+ values unless DTD use has been turned off. Note that a
+ namespace of None indicates to use the default namespace. """
+ ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def hasProp(self, name):
+ """Search an attribute associated to a node This function also
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlHasProp(self._o, name)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isBlankNode(self):
+ """Checks whether this node is an empty or whitespace only
+ (and possibly ignorable) text-node. """
+ ret = libxml2mod.xmlIsBlankNode(self._o)
+ return ret
+
+ def isText(self):
+ """Is this node a Text node ? """
+ ret = libxml2mod.xmlNodeIsText(self._o)
+ return ret
+
+ def lastChild(self):
+ """Search the last child of a node. """
+ ret = libxml2mod.xmlGetLastChild(self._o)
+ if ret is None:raise treeError('xmlGetLastChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lastElementChild(self):
+ """Finds the last child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlLastElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lineNo(self):
+ """Get line number of @node. Try to override the limitation of
+ lines being store in 16 bits ints if XML_PARSE_BIG_LINES
+ parser option was used """
+ ret = libxml2mod.xmlGetLineNo(self._o)
+ return ret
+
+ def listGetRawString(self, doc, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
+ return ret
+
+ def listGetString(self, doc, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
+ return ret
+
+ def newChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNs(self, href, prefix):
+ """Creation of a new Namespace. This function will refuse to
+ create a namespace with a similar prefix than an existing
+ one present on this node. Note that for a default
+ namespace, @prefix should be None. We use href==None in
+ the case of an element creation where the namespace was not
+ defined. """
+ ret = libxml2mod.xmlNewNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newProp(self, name, value):
+ """Create a new property carried by a node. """
+ ret = libxml2mod.xmlNewProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nextElementSibling(self):
+ """Finds the first closest next sibling of the node which is
+ an element node. Note the handling of entities references
+ is different than in the W3C DOM element traversal spec
+ since we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlNextElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def noNsProp(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. This
+ function is similar to xmlGetProp except it will accept
+ only an attribute in no namespace. """
+ ret = libxml2mod.xmlGetNoNsProp(self._o, name)
+ return ret
+
+ def nodePath(self):
+ """Build a structure based Path for the given node """
+ ret = libxml2mod.xmlGetNodePath(self._o)
+ return ret
+
+ def nsProp(self, name, nameSpace):
+ """Search and get the value of an attribute associated to a
+ node This attribute has to be anchored in the namespace
+ specified. This does the entity substitution. This function
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
+ return ret
+
+ def previousElementSibling(self):
+ """Finds the first closest previous sibling of the node which
+ is an element node. Note the handling of entities
+ references is different than in the W3C DOM element
+ traversal spec since we don't have back reference from
+ entities content to entities references. """
+ ret = libxml2mod.xmlPreviousElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def prop(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off.
+ NOTE: this function acts independently of namespaces
+ associated to the attribute. Use xmlGetNsProp() or
+ xmlGetNoNsProp() for namespace aware processing. """
+ ret = libxml2mod.xmlGetProp(self._o, name)
+ return ret
+
+ def reconciliateNs(self, doc):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
+ return ret
+
+ def replaceNode(self, cur):
+ """Unlink the old node from its current context, prune the new
+ one at the same place. If @cur was already inserted in a
+ document it is first unlinked from its existing context. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
+ if ret is None:raise treeError('xmlReplaceNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def searchNs(self, doc, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, doc, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setBase(self, uri):
+ """Set (or reset) the base URI of a node, i.e. the value of
+ the xml:base attribute. """
+ libxml2mod.xmlNodeSetBase(self._o, uri)
+
+ def setContent(self, content):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContent(self._o, content)
+
+ def setContentLen(self, content, len):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContentLen(self._o, content, len)
+
+ def setLang(self, lang):
+ """Set the language of a node, i.e. the values of the xml:lang
+ attribute. """
+ libxml2mod.xmlNodeSetLang(self._o, lang)
+
+ def setListDoc(self, doc):
+ """update all nodes in the list to point to the right document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetListDoc(self._o, doc__o)
+
+ def setName(self, name):
+ """Set (or reset) the name of a node. """
+ libxml2mod.xmlNodeSetName(self._o, name)
+
+ def setNs(self, ns):
+ """Associate a namespace to a node, a posteriori. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ libxml2mod.xmlSetNs(self._o, ns__o)
+
+ def setNsProp(self, ns, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setProp(self, name, value):
+ """Set (or reset) an attribute carried by a node. If @name has
+ a prefix, then the corresponding namespace-binding will be
+ used, if in scope; it is an error it there's no such
+ ns-binding for the prefix in scope. """
+ ret = libxml2mod.xmlSetProp(self._o, name, value)
+ if ret is None:raise treeError('xmlSetProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setSpacePreserve(self, val):
+ """Set (or reset) the space preserving behaviour of a node,
+ i.e. the value of the xml:space attribute. """
+ libxml2mod.xmlNodeSetSpacePreserve(self._o, val)
+
+ def setTreeDoc(self, doc):
+ """update all nodes under the tree to point to the right
+ document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetTreeDoc(self._o, doc__o)
+
+ def textConcat(self, content, len):
+ """Concat the given string at the end of the existing node
+ content """
+ ret = libxml2mod.xmlTextConcat(self._o, content, len)
+ return ret
+
+ def textMerge(self, second):
+ """Merge two text nodes into one """
+ if second is None: second__o = None
+ else: second__o = second._o
+ ret = libxml2mod.xmlTextMerge(self._o, second__o)
+ if ret is None:raise treeError('xmlTextMerge() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def unlinkNode(self):
+ """Unlink a node from it's current context, the node is not
+ freed If one need to free the node, use xmlFreeNode()
+ routine after the unlink to discard it. Note that namespace
+ nodes can't be unlinked as they do not have pointer to
+ their parent. """
+ libxml2mod.xmlUnlinkNode(self._o)
+
+ def unsetNsProp(self, ns, name):
+ """Remove an attribute carried by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
+ return ret
+
+ def unsetProp(self, name):
+ """Remove an attribute carried by a node. This handles only
+ attributes in no namespace. """
+ ret = libxml2mod.xmlUnsetProp(self._o, name)
+ return ret
+
+ #
+ # xmlNode functions from module valid
+ #
+
+ def isID(self, doc, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
+ return ret
+
+ def isRef(self, doc, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
+ return ret
+
+ def validNormalizeAttributeValue(self, doc, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
+ return ret
+
+ #
+ # xmlNode functions from module xinclude
+ #
+
+ def xincludeProcessTree(self):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTree(self._o)
+ return ret
+
+ def xincludeProcessTreeFlags(self, flags):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlNode functions from module xmlschemas
+ #
+
+ def schemaValidateOneElement(self, ctxt):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlNode functions from module xpath
+ #
+
+ def xpathCastNodeToNumber(self):
+ """Converts a node to its number value """
+ ret = libxml2mod.xmlXPathCastNodeToNumber(self._o)
+ return ret
+
+ def xpathCastNodeToString(self):
+ """Converts a node to its string value. """
+ ret = libxml2mod.xmlXPathCastNodeToString(self._o)
+ return ret
+
+ def xpathCmpNodes(self, node2):
+ """Compare two nodes w.r.t document order """
+ if node2 is None: node2__o = None
+ else: node2__o = node2._o
+ ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
+ return ret
+
+ def xpathNodeEval(self, str, ctx):
+ """Evaluate the XPath Location Path in the given context. The
+ node 'node' is set as the context node. The context node is
+ not restored. """
+ if ctx is None: ctx__o = None
+ else: ctx__o = ctx._o
+ ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
+ if ret is None:raise xpathError('xmlXPathNodeEval() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xmlNode functions from module xpathInternals
+ #
+
+ def xpathNewNodeSet(self):
+ """Create a new xmlXPathObjectPtr of type NodeSet and
+ initialize it with the single Node @val """
+ ret = libxml2mod.xmlXPathNewNodeSet(self._o)
+ if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNewValueTree(self):
+ """Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
+ and initialize it with the tree root @val """
+ ret = libxml2mod.xmlXPathNewValueTree(self._o)
+ if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNextAncestor(self, ctxt):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, ctxt):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, ctxt):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, ctxt):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, ctxt):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, ctxt):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, ctxt):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, ctxt):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, ctxt):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, ctxt):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, ctxt):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, ctxt):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, ctxt):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module xpointer
+ #
+
+ def xpointerNewCollapsedRange(self):
+ """Create a new xmlXPathObjectPtr of type range using a single
+ nodes """
+ ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
+ if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewContext(self, doc, origin):
+ """Create a new XPointer context """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpointerNewLocationSetNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type LocationSet and
+ initialize it with the single range made of the two nodes
+ @start and @end """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRange(self, startindex, end, endindex):
+ """Create a new xmlXPathObjectPtr of type range """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
+ if ret is None:raise treeError('xmlXPtrNewRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRangeNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type range using 2 nodes """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
+ return xpathObjectRet(ret)
+
+class xmlDoc(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDoc got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDoc (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDoc functions from module HTMLparser
+ #
+
+ def htmlAutoCloseTag(self, name, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if the element or one of it's children would
+ autoclose the given tag. """
+ ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
+ return ret
+
+ def htmlIsAutoClosed(self, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if a tag is autoclosed by one of it's child """
+ ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
+ return ret
+
+ #
+ # xmlDoc functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
+ """Dump an HTML document. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, buf, encoding):
+ """Dump an HTML document. Formating return/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding)
+
+ def htmlDocDump(self, f):
+ """Dump an HTML document to an open FILE. """
+ ret = libxml2mod.htmlDocDump(f, self._o)
+ return ret
+
+ def htmlGetMetaEncoding(self):
+ """Encoding definition lookup in the Meta tags """
+ ret = libxml2mod.htmlGetMetaEncoding(self._o)
+ return ret
+
+ def htmlNodeDumpFile(self, out, cur):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFile(out, self._o, cur__o)
+
+ def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. TODO: if encoding == None try to save in the doc
+ encoding """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
+ return ret
+
+ def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, buf, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding)
+
+ def htmlSaveFile(self, filename):
+ """Dump an HTML document to a file. If @filename is "-" the
+ stdout file is used. """
+ ret = libxml2mod.htmlSaveFile(filename, self._o)
+ return ret
+
+ def htmlSaveFileEnc(self, filename, encoding):
+ """Dump an HTML document to a file using a given encoding and
+ formatting returns/spaces are added. """
+ ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def htmlSaveFileFormat(self, filename, encoding, format):
+ """Dump an HTML document to a file using a given encoding. """
+ ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
+ return ret
+
+ def htmlSetMetaEncoding(self, encoding):
+ """Sets the current encoding in the Meta tags NOTE: this will
+ not change the document content encoding, just the META
+ flag associated. """
+ ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
+ return ret
+
+ #
+ # xmlDoc functions from module debugXML
+ #
+
+ def debugCheckDocument(self, output):
+ """Check the document for potential content problems, and
+ output the errors to @output """
+ ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
+ return ret
+
+ def debugDumpDocument(self, output):
+ """Dumps debug information for the document, it's recursive """
+ libxml2mod.xmlDebugDumpDocument(output, self._o)
+
+ def debugDumpDocumentHead(self, output):
+ """Dumps debug information cncerning the document, not
+ recursive """
+ libxml2mod.xmlDebugDumpDocumentHead(output, self._o)
+
+ def debugDumpEntities(self, output):
+ """Dumps debug information for all the entities in use by the
+ document """
+ libxml2mod.xmlDebugDumpEntities(output, self._o)
+
+ #
+ # xmlDoc functions from module entities
+ #
+
+ def addDocEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document. """
+ ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def addDtdEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document DTD external subset. """
+ ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def docEntity(self, name):
+ """Do an entity lookup in the document entity hash table and """
+ ret = libxml2mod.xmlGetDocEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def dtdEntity(self, name):
+ """Do an entity lookup in the DTD entity hash table and """
+ ret = libxml2mod.xmlGetDtdEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def encodeEntities(self, input):
+ """TODO: remove xmlEncodeEntities, once we are not afraid of
+ breaking binary compatibility People must migrate their
+ code to xmlEncodeEntitiesReentrant ! This routine will
+ issue a warning when encountered. """
+ ret = libxml2mod.xmlEncodeEntities(self._o, input)
+ return ret
+
+ def encodeEntitiesReentrant(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities and non ASCII values with their entities and
+ CharRef counterparts. Contrary to xmlEncodeEntities, this
+ routine is reentrant, and result must be deallocated. """
+ ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
+ return ret
+
+ def encodeSpecialChars(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities this routine is reentrant, and result must be
+ deallocated. """
+ ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
+ return ret
+
+ def newEntity(self, name, type, ExternalID, SystemID, content):
+ """Create a new entity, this differs from xmlAddDocEntity()
+ that if the document is None or has no internal subset
+ defined, then an unlinked entity structure will be
+ returned, it is then the responsability of the caller to
+ link it to the document later or free it when not needed
+ anymore. """
+ ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlNewEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parameterEntity(self, name):
+ """Do an entity lookup in the internal and external subsets and """
+ ret = libxml2mod.xmlGetParameterEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetParameterEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module relaxng
+ #
+
+ def relaxNGNewDocParserCtxt(self):
+ """Create an XML RelaxNGs parser context for that document.
+ Note: since the process of compiling a RelaxNG schemas
+ modifies the document, the @doc parameter is duplicated
+ internally. """
+ ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
+ __tmp = relaxNgParserCtxt(_obj=ret)
+ return __tmp
+
+ def relaxNGValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
+ return ret
+
+ def relaxNGValidateFullElement(self, ctxt, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, ctxt, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePushElement(self, ctxt, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ #
+ # xmlDoc functions from module tree
+ #
+
+ def copyDoc(self, recursive):
+ """Do a copy of the document info. If recursive, the content
+ tree will be copied too as well as DTD, namespaces and
+ entities. """
+ ret = libxml2mod.xmlCopyDoc(self._o, recursive)
+ if ret is None:raise treeError('xmlCopyDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def copyNode(self, node, extended):
+ """Do a copy of the node to a given document. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self, node):
+ """Do a recursive copy of the node list. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def createIntSubset(self, name, ExternalID, SystemID):
+ """Create the internal subset of a document """
+ ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlCreateIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def docCompressMode(self):
+ """get the compression ratio for a document, ZLIB based """
+ ret = libxml2mod.xmlGetDocCompressMode(self._o)
+ return ret
+
+ def dump(self, f):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocDump(f, self._o)
+ return ret
+
+ def elemDump(self, f, cur):
+ """Dump an XML/HTML node, recursive behaviour, children are
+ printed too. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlElemDump(f, self._o, cur__o)
+
+ def formatDump(self, f, format):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
+ return ret
+
+ def freeDoc(self):
+ """Free up all the structures used by a document, tree
+ included. """
+ libxml2mod.xmlFreeDoc(self._o)
+
+ def getRootElement(self):
+ """Get the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ ret = libxml2mod.xmlDocGetRootElement(self._o)
+ if ret is None:raise treeError('xmlDocGetRootElement() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def intSubset(self):
+ """Get the internal subset of a document """
+ ret = libxml2mod.xmlGetIntSubset(self._o)
+ if ret is None:raise treeError('xmlGetIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newCDataBlock(self, content, len):
+ """Creation of a new node containing a CDATA block. """
+ ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
+ if ret is None:raise treeError('xmlNewCDataBlock() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newCharRef(self, name):
+ """Creation of a new character reference node. """
+ ret = libxml2mod.xmlNewCharRef(self._o, name)
+ if ret is None:raise treeError('xmlNewCharRef() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocComment(self, content):
+ """Creation of a new node containing a comment within a
+ document. """
+ ret = libxml2mod.xmlNewDocComment(self._o, content)
+ if ret is None:raise treeError('xmlNewDocComment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocFragment(self):
+ """Creation of a new Fragment node. """
+ ret = libxml2mod.xmlNewDocFragment(self._o)
+ if ret is None:raise treeError('xmlNewDocFragment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocPI(self, name, content):
+ """Creation of a processing instruction element. """
+ ret = libxml2mod.xmlNewDocPI(self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocPI() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocProp(self, name, value):
+ """Create a new property carried by a document. """
+ ret = libxml2mod.xmlNewDocProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewDocProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocText(self, content):
+ """Creation of a new text node within a document. """
+ ret = libxml2mod.xmlNewDocText(self._o, content)
+ if ret is None:raise treeError('xmlNewDocText() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocTextLen(self, content, len):
+ """Creation of a new text node with an extra content length
+ parameter. The text node pertain to a given document. """
+ ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
+ if ret is None:raise treeError('xmlNewDocTextLen() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDtd(self, name, ExternalID, SystemID):
+ """Creation of a new DTD for the external subset. To create an
+ internal subset, use xmlCreateIntSubset(). """
+ ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlNewDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newGlobalNs(self, href, prefix):
+ """Creation of a Namespace, the old way using PI and without
+ scoping DEPRECATED !!! """
+ ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewGlobalNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newReference(self, name):
+ """Creation of a new reference node. """
+ ret = libxml2mod.xmlNewReference(self._o, name)
+ if ret is None:raise treeError('xmlNewReference() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nodeDumpOutput(self, buf, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding)
+
+ def nodeGetBase(self, cur):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
+ return ret
+
+ def nodeListGetRawString(self, list, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
+ return ret
+
+ def nodeListGetString(self, list, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
+ return ret
+
+ def reconciliateNs(self, tree):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
+ return ret
+
+ def saveFile(self, filename):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. """
+ ret = libxml2mod.xmlSaveFile(filename, self._o)
+ return ret
+
+ def saveFileEnc(self, filename, encoding):
+ """Dump an XML document, converting it to the given encoding """
+ ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def saveFileTo(self, buf, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
+ return ret
+
+ def saveFormatFile(self, filename, format):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. If @format is set then the document will be
+ indented on output. Note that @format = 1 provide node
+ indenting only if xmlIndentTreeOutput = 1 or
+ xmlKeepBlanksDefault(0) was called """
+ ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
+ return ret
+
+ def saveFormatFileEnc(self, filename, encoding, format):
+ """Dump an XML document to a file or an URL. """
+ ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
+ return ret
+
+ def saveFormatFileTo(self, buf, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
+ return ret
+
+ def searchNs(self, node, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, node, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setDocCompressMode(self, mode):
+ """set the compression ratio for a document, ZLIB based
+ Correct values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetDocCompressMode(self._o, mode)
+
+ def setListDoc(self, list):
+ """update all nodes in the list to point to the right document """
+ if list is None: list__o = None
+ else: list__o = list._o
+ libxml2mod.xmlSetListDoc(list__o, self._o)
+
+ def setRootElement(self, root):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if root is None: root__o = None
+ else: root__o = root._o
+ ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setTreeDoc(self, tree):
+ """update all nodes under the tree to point to the right
+ document """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ libxml2mod.xmlSetTreeDoc(tree__o, self._o)
+
+ def stringGetNodeList(self, value):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringGetNodeList(self._o, value)
+ if ret is None:raise treeError('xmlStringGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def stringLenGetNodeList(self, value, len):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
+ if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module valid
+ #
+
+ def ID(self, ID):
+ """Search the attribute declaring the given ID """
+ ret = libxml2mod.xmlGetID(self._o, ID)
+ if ret is None:raise treeError('xmlGetID() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isID(self, elem, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
+ return ret
+
+ def isMixedElement(self, name):
+ """Search in the DtDs whether an element accept Mixed content
+ (or ANY) basically if it is supposed to accept text childs """
+ ret = libxml2mod.xmlIsMixedElement(self._o, name)
+ return ret
+
+ def isRef(self, elem, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
+ return ret
+
+ def removeID(self, attr):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveID(self._o, attr__o)
+ return ret
+
+ def removeRef(self, attr):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveRef(self._o, attr__o)
+ return ret
+
+ def validCtxtNormalizeAttributeValue(self, ctxt, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(ctxt__o, self._o, elem__o, name, value)
+ return ret
+
+ def validNormalizeAttributeValue(self, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(self._o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, ctxt):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocument(ctxt__o, self._o)
+ return ret
+
+ def validateDocumentFinal(self, ctxt):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocumentFinal(ctxt__o, self._o)
+ return ret
+
+ def validateDtd(self, ctxt, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(ctxt__o, self._o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, ctxt):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDtdFinal(ctxt__o, self._o)
+ return ret
+
+ def validateElement(self, ctxt, elem):
+ """Try to validate the subtree under an element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateNotationUse(self, ctxt, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
+ return ret
+
+ def validateOneAttribute(self, ctxt, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(ctxt__o, self._o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, ctxt, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, ctxt, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(ctxt__o, self._o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, ctxt, elem, qname):
+ """Pop the element end from the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validatePushElement(self, ctxt, elem, qname):
+ """Push a new element start on the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, ctxt):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateRoot(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xinclude
+ #
+
+ def xincludeProcess(self):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcess(self._o)
+ return ret
+
+ def xincludeProcessFlags(self, flags):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlDoc functions from module xmlreader
+ #
+
+ def NewWalker(self, reader):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
+ return ret
+
+ def readerWalker(self):
+ """Create an xmltextReader for a preparsed document. """
+ ret = libxml2mod.xmlReaderWalker(self._o)
+ if ret is None:raise treeError('xmlReaderWalker() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module xmlschemas
+ #
+
+ def schemaNewDocParserCtxt(self):
+ """Create an XML Schemas parse context for that document. NB.
+ The document may be modified during the parsing process. """
+ ret = libxml2mod.xmlSchemaNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaNewDocParserCtxt() failed')
+ __tmp = SchemaParserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateDoc(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpath
+ #
+
+ def xpathNewContext(self):
+ """Create a new xmlXPathContext """
+ ret = libxml2mod.xmlXPathNewContext(self._o)
+ if ret is None:raise xpathError('xmlXPathNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpathOrderDocElems(self):
+ """Call this routine to speed up XPath computation on static
+ documents. This stamps all the element nodes with the
+ document order Like for line information, the order is kept
+ in the element->content field, the value stored is actually
+ - the node number (starting at -1) to be able to
+ differentiate from line numbers. """
+ ret = libxml2mod.xmlXPathOrderDocElems(self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpointer
+ #
+
+ def xpointerNewContext(self, here, origin):
+ """Create a new XPointer context """
+ if here is None: here__o = None
+ else: here__o = here._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(self._o, here__o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+class parserCtxt(parserCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ parserCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ # accessors for parserCtxt
+ def doc(self):
+ """Get the document tree from a parser context. """
+ ret = libxml2mod.xmlParserGetDoc(self._o)
+ if ret is None:raise parserError('xmlParserGetDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def isValid(self):
+ """Get the validity information from a parser context. """
+ ret = libxml2mod.xmlParserGetIsValid(self._o)
+ return ret
+
+ def lineNumbers(self, linenumbers):
+ """Switch on the generation of line number for elements nodes. """
+ libxml2mod.xmlParserSetLineNumbers(self._o, linenumbers)
+
+ def loadSubset(self, loadsubset):
+ """Switch the parser to load the DTD without validating. """
+ libxml2mod.xmlParserSetLoadSubset(self._o, loadsubset)
+
+ def pedantic(self, pedantic):
+ """Switch the parser to be pedantic. """
+ libxml2mod.xmlParserSetPedantic(self._o, pedantic)
+
+ def replaceEntities(self, replaceEntities):
+ """Switch the parser to replace entities. """
+ libxml2mod.xmlParserSetReplaceEntities(self._o, replaceEntities)
+
+ def validate(self, validate):
+ """Switch the parser to validation mode. """
+ libxml2mod.xmlParserSetValidate(self._o, validate)
+
+ def wellFormed(self):
+ """Get the well formed information from a parser context. """
+ ret = libxml2mod.xmlParserGetWellFormed(self._o)
+ return ret
+
+ #
+ # parserCtxt functions from module HTMLparser
+ #
+
+ def htmlCtxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReset(self):
+ """Reset a parser context """
+ libxml2mod.htmlCtxtReset(self._o)
+
+ def htmlCtxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def htmlFreeParserCtxt(self):
+ """Free all the memory used by a parser context. However the
+ parsed document in ctxt->myDoc is not freed. """
+ libxml2mod.htmlFreeParserCtxt(self._o)
+
+ def htmlParseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' """
+ ret = libxml2mod.htmlParseCharRef(self._o)
+ return ret
+
+ def htmlParseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def htmlParseDocument(self):
+ """parse an HTML document (and build a tree if using the
+ standard SAX interface). """
+ ret = libxml2mod.htmlParseDocument(self._o)
+ return ret
+
+ def htmlParseElement(self):
+ """parse an HTML element, this is highly recursive this is
+ kept for compatibility with previous code versions [39]
+ element ::= EmptyElemTag | STag content ETag [41]
+ Attribute ::= Name Eq AttValue """
+ libxml2mod.htmlParseElement(self._o)
+
+ #
+ # parserCtxt functions from module parser
+ #
+
+ def byteConsumed(self):
+ """This function provides the current index of the parser
+ relative to the start of the current entity. This function
+ is computed in bytes from the beginning starting at zero
+ and finishing at the size in byte of the file if parsing a
+ file. The function is of constant cost if the input is
+ UTF-8 but can be costly if run on non-UTF-8 input. """
+ ret = libxml2mod.xmlByteConsumed(self._o)
+ return ret
+
+ def clearParserCtxt(self):
+ """Clear (release owned resources) and reinitialize a parser
+ context """
+ libxml2mod.xmlClearParserCtxt(self._o)
+
+ def ctxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context NOTE that the file
+ descriptor will not be closed when the reader is closed or
+ reset. """
+ ret = libxml2mod.xmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReset(self):
+ """Reset a parser context """
+ libxml2mod.xmlCtxtReset(self._o)
+
+ def ctxtResetPush(self, chunk, size, filename, encoding):
+ """Reset a push parser context """
+ ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
+ return ret
+
+ def ctxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def initParserCtxt(self):
+ """Initialize a parser context """
+ ret = libxml2mod.xmlInitParserCtxt(self._o)
+ return ret
+
+ def parseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def parseDocument(self):
+ """parse an XML document (and build a tree if using the
+ standard SAX interface). [1] document ::= prolog element
+ Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? """
+ ret = libxml2mod.xmlParseDocument(self._o)
+ return ret
+
+ def parseExtParsedEnt(self):
+ """parse a general parsed entity An external general parsed
+ entity is well-formed if it matches the production labeled
+ extParsedEnt. [78] extParsedEnt ::= TextDecl? content """
+ ret = libxml2mod.xmlParseExtParsedEnt(self._o)
+ return ret
+
+ def setupParserForBuffer(self, buffer, filename):
+ """Setup the parser context to parse a new buffer; Clears any
+ prior contents from the parser context. The buffer
+ parameter must not be None, but the filename parameter can
+ be """
+ libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)
+
+ def stopParser(self):
+ """Blocks further parser processing """
+ libxml2mod.xmlStopParser(self._o)
+
+ #
+ # parserCtxt functions from module parserInternals
+ #
+
+ def decodeEntities(self, len, what, end, end2, end3):
+ """This function is deprecated, we now always process entities
+ content through xmlStringDecodeEntities TODO: remove it in
+ next major release. [67] Reference ::= EntityRef | CharRef
+ [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlDecodeEntities(self._o, len, what, end, end2, end3)
+ return ret
+
+ def handleEntity(self, entity):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if entity is None: entity__o = None
+ else: entity__o = entity._o
+ libxml2mod.xmlHandleEntity(self._o, entity__o)
+
+ def namespaceParseNCName(self):
+ """parse an XML namespace name. TODO: this seems not in use
+ anymore, the namespace handling is done on top of the SAX
+ interfaces, i.e. not on raw input. [NS 3] NCName ::=
+ (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter
+ | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlNamespaceParseNCName(self._o)
+ return ret
+
+ def namespaceParseNSDef(self):
+ """parse a namespace prefix declaration TODO: this seems not
+ in use anymore, the namespace handling is done on top of
+ the SAX interfaces, i.e. not on raw input. [NS 1] NSDef
+ ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::=
+ 'xmlns' (':' NCName)? """
+ ret = libxml2mod.xmlNamespaceParseNSDef(self._o)
+ return ret
+
+ def nextChar(self):
+ """Skip to the next char input char. """
+ libxml2mod.xmlNextChar(self._o)
+
+ def parseAttValue(self):
+ """parse a value for an attribute Note: the parser won't do
+ substitution of entities here, this will be handled later
+ in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] |
+ Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3
+ Attribute-Value Normalization: Before the value of an
+ attribute is passed to the application or checked for
+ validity, the XML processor must normalize it as follows: -
+ a character reference is processed by appending the
+ referenced character to the attribute value - an entity
+ reference is processed by recursively processing the
+ replacement text of the entity - a whitespace character
+ (#x20, #xD, #xA, #x9) is processed by appending #x20 to the
+ normalized value, except that only a single #x20 is
+ appended for a "#xD#xA" sequence that is part of an
+ external parsed entity or the literal entity value of an
+ internal parsed entity - other characters are processed by
+ appending them to the normalized value If the declared
+ value is not CDATA, then the XML processor must further
+ process the normalized attribute value by discarding any
+ leading and trailing space (#x20) characters, and by
+ replacing sequences of space (#x20) characters by a single
+ space (#x20) character. All attributes for which no
+ declaration has been read should be treated by a
+ non-validating parser as if declared CDATA. """
+ ret = libxml2mod.xmlParseAttValue(self._o)
+ return ret
+
+ def parseAttributeListDecl(self):
+ """: parse the Attribute list def for an element [52]
+ AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53]
+ AttDef ::= S Name S AttType S DefaultDecl """
+ libxml2mod.xmlParseAttributeListDecl(self._o)
+
+ def parseCDSect(self):
+ """Parse escaped pure raw content. [18] CDSect ::= CDStart
+ CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::=
+ (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' """
+ libxml2mod.xmlParseCDSect(self._o)
+
+ def parseCharData(self, cdata):
+ """parse a CharData section. if we are within a CDATA section
+ ']]>' marks an end of section. The right angle bracket (>)
+ may be represented using the string "&gt;", and must, for
+ compatibility, be escaped using "&gt;" or a character
+ reference when it appears in the string "]]>" in content,
+ when that string is not marking the end of a CDATA section.
+ [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) """
+ libxml2mod.xmlParseCharData(self._o, cdata)
+
+ def parseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ]
+ Characters referred to using character references must
+ match the production for Char. """
+ ret = libxml2mod.xmlParseCharRef(self._o)
+ return ret
+
+ def parseComment(self):
+ """Skip an XML (SGML) comment <!-- .... --> The spec says that
+ "For compatibility, the string "--" (double-hyphen) must
+ not occur within comments. " [15] Comment ::= '<!--'
+ ((Char - '-') | ('-' (Char - '-')))* '-->' """
+ libxml2mod.xmlParseComment(self._o)
+
+ def parseContent(self):
+ """Parse a content: [43] content ::= (element | CharData |
+ Reference | CDSect | PI | Comment)* """
+ libxml2mod.xmlParseContent(self._o)
+
+ def parseDocTypeDecl(self):
+ """parse a DOCTYPE declaration [28] doctypedecl ::=
+ '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
+ PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ]
+ The Name in the document type declaration must match the
+ element type of the root element. """
+ libxml2mod.xmlParseDocTypeDecl(self._o)
+
+ def parseElement(self):
+ """parse an XML element, this is highly recursive [39]
+ element ::= EmptyElemTag | STag content ETag [ WFC:
+ Element Type Match ] The Name in an element's end-tag must
+ match the element type in the start-tag. """
+ libxml2mod.xmlParseElement(self._o)
+
+ def parseElementDecl(self):
+ """parse an Element declaration. [45] elementdecl ::=
+ '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique
+ Element Type Declaration ] No element type may be declared
+ more than once """
+ ret = libxml2mod.xmlParseElementDecl(self._o)
+ return ret
+
+ def parseEncName(self):
+ """parse the XML encoding name [81] EncName ::= [A-Za-z]
+ ([A-Za-z0-9._] | '-')* """
+ ret = libxml2mod.xmlParseEncName(self._o)
+ return ret
+
+ def parseEncodingDecl(self):
+ """parse the XML encoding declaration [80] EncodingDecl ::= S
+ 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this
+ setups the conversion filters. """
+ ret = libxml2mod.xmlParseEncodingDecl(self._o)
+ return ret
+
+ def parseEndTag(self):
+ """parse an end of tag [42] ETag ::= '</' Name S? '>' With
+ namespace [NS 9] ETag ::= '</' QName S? '>' """
+ libxml2mod.xmlParseEndTag(self._o)
+
+ def parseEntityDecl(self):
+ """parse <!ENTITY declarations [70] EntityDecl ::= GEDecl |
+ PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
+ '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
+ [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::=
+ S 'NDATA' S Name [ VC: Notation Declared ] The Name must
+ match the declared name of a notation. """
+ libxml2mod.xmlParseEntityDecl(self._o)
+
+ def parseEntityRef(self):
+ """parse ENTITY references declarations [68] EntityRef ::=
+ '&' Name ';' [ WFC: Entity Declared ] In a document
+ without any DTD, a document with only an internal DTD
+ subset which contains no parameter entity references, or a
+ document with "standalone='yes'", the Name given in the
+ entity reference must match that in an entity declaration,
+ except that well-formed documents need not declare any of
+ the following entities: amp, lt, gt, apos, quot. The
+ declaration of a parameter entity must precede any
+ reference to it. Similarly, the declaration of a general
+ entity must precede any reference to it which appears in a
+ default value in an attribute-list declaration. Note that
+ if entities are declared in the external subset or in
+ external parameter entities, a non-validating processor is
+ not obligated to read and process their declarations; for
+ such documents, the rule that an entity must be declared is
+ a well-formedness constraint only if standalone='yes'. [
+ WFC: Parsed Entity ] An entity reference must not contain
+ the name of an unparsed entity """
+ ret = libxml2mod.xmlParseEntityRef(self._o)
+ if ret is None:raise parserError('xmlParseEntityRef() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parseExternalSubset(self, ExternalID, SystemID):
+ """parse Markup declarations from an external subset [30]
+ extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
+ ::= (markupdecl | conditionalSect | PEReference | S) * """
+ libxml2mod.xmlParseExternalSubset(self._o, ExternalID, SystemID)
+
+ def parseMarkupDecl(self):
+ """parse Markup declarations [29] markupdecl ::= elementdecl
+ | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [
+ VC: Proper Declaration/PE Nesting ] Parameter-entity
+ replacement text must be properly nested with markup
+ declarations. That is to say, if either the first character
+ or the last character of a markup declaration (markupdecl
+ above) is contained in the replacement text for a
+ parameter-entity reference, both must be contained in the
+ same replacement text. [ WFC: PEs in Internal Subset ] In
+ the internal DTD subset, parameter-entity references can
+ occur only where markup declarations can occur, not within
+ markup declarations. (This does not apply to references
+ that occur in external parameter entities or to the
+ external subset.) """
+ libxml2mod.xmlParseMarkupDecl(self._o)
+
+ def parseMisc(self):
+ """parse an XML Misc* optional field. [27] Misc ::= Comment |
+ PI | S """
+ libxml2mod.xmlParseMisc(self._o)
+
+ def parseName(self):
+ """parse an XML name. [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20
+ Name)* """
+ ret = libxml2mod.xmlParseName(self._o)
+ return ret
+
+ def parseNamespace(self):
+ """xmlParseNamespace: parse specific PI '<?namespace ...'
+ constructs. This is what the older xml-name Working Draft
+ specified, a bunch of other stuff may still rely on it, so
+ support is still here as if it was declared on the root of
+ the Tree:-( TODO: remove from library To be removed at
+ next drop of binary compatibility """
+ libxml2mod.xmlParseNamespace(self._o)
+
+ def parseNmtoken(self):
+ """parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8]
+ Nmtokens ::= Nmtoken (#x20 Nmtoken)* """
+ ret = libxml2mod.xmlParseNmtoken(self._o)
+ return ret
+
+ def parseNotationDecl(self):
+ """parse a notation declaration [82] NotationDecl ::=
+ '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
+ Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
+ 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
+ SystemLiteral See the NOTE on xmlParseExternalID(). """
+ libxml2mod.xmlParseNotationDecl(self._o)
+
+ def parsePEReference(self):
+ """parse PEReference declarations The entity content is
+ handled directly by pushing it's content as a new input
+ stream. [69] PEReference ::= '%' Name ';' [ WFC: No
+ Recursion ] A parsed entity must not contain a recursive
+ reference to itself, either directly or indirectly. [ WFC:
+ Entity Declared ] In a document without any DTD, a document
+ with only an internal DTD subset which contains no
+ parameter entity references, or a document with
+ "standalone='yes'", ... ... The declaration of a parameter
+ entity must precede any reference to it... [ VC: Entity
+ Declared ] In a document with an external subset or
+ external parameter entities with "standalone='no'", ...
+ ... The declaration of a parameter entity must precede any
+ reference to it... [ WFC: In DTD ] Parameter-entity
+ references may only appear in the DTD. NOTE: misleading but
+ this is handled. """
+ libxml2mod.xmlParsePEReference(self._o)
+
+ def parsePI(self):
+ """parse an XML Processing Instruction. [16] PI ::= '<?'
+ PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The
+ processing is transfered to SAX once parsed. """
+ libxml2mod.xmlParsePI(self._o)
+
+ def parsePITarget(self):
+ """parse the name of a PI [17] PITarget ::= Name - (('X' |
+ 'x') ('M' | 'm') ('L' | 'l')) """
+ ret = libxml2mod.xmlParsePITarget(self._o)
+ return ret
+
+ def parsePubidLiteral(self):
+ """parse an XML public literal [12] PubidLiteral ::= '"'
+ PubidChar* '"' | "'" (PubidChar - "'")* "'" """
+ ret = libxml2mod.xmlParsePubidLiteral(self._o)
+ return ret
+
+ def parseQuotedString(self):
+ """Parse and return a string between quotes or doublequotes
+ TODO: Deprecated, to be removed at next drop of binary
+ compatibility """
+ ret = libxml2mod.xmlParseQuotedString(self._o)
+ return ret
+
+ def parseReference(self):
+ """parse and handle entity references in content, depending on
+ the SAX interface, this may end-up in a call to character()
+ if this is a CharRef, a predefined entity, if there is no
+ reference() callback. or if the parser was asked to switch
+ to that mode. [67] Reference ::= EntityRef | CharRef """
+ libxml2mod.xmlParseReference(self._o)
+
+ def parseSDDecl(self):
+ """parse the XML standalone declaration [32] SDDecl ::= S
+ 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
+ 'no')'"')) [ VC: Standalone Document Declaration ] TODO
+ The standalone document declaration must have the value
+ "no" if any external markup declarations contain
+ declarations of: - attributes with default values, if
+ elements to which these attributes apply appear in the
+ document without specifications of values for these
+ attributes, or - entities (other than amp, lt, gt, apos,
+ quot), if references to those entities appear in the
+ document, or - attributes with values subject to
+ normalization, where the attribute appears in the document
+ with a value which will change as a result of
+ normalization, or - element types with element content, if
+ white space occurs directly within any instance of those
+ types. """
+ ret = libxml2mod.xmlParseSDDecl(self._o)
+ return ret
+
+ def parseStartTag(self):
+ """parse a start of tag either for rule element or
+ EmptyElement. In both case we don't parse the tag closing
+ chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [
+ WFC: Unique Att Spec ] No attribute name may appear more
+ than once in the same start-tag or empty-element tag. [44]
+ EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC:
+ Unique Att Spec ] No attribute name may appear more than
+ once in the same start-tag or empty-element tag. With
+ namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' """
+ ret = libxml2mod.xmlParseStartTag(self._o)
+ return ret
+
+ def parseSystemLiteral(self):
+ """parse an XML Literal [11] SystemLiteral ::= ('"' [^"]*
+ '"') | ("'" [^']* "'") """
+ ret = libxml2mod.xmlParseSystemLiteral(self._o)
+ return ret
+
+ def parseTextDecl(self):
+ """parse an XML declaration header for external entities [77]
+ TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' """
+ libxml2mod.xmlParseTextDecl(self._o)
+
+ def parseVersionInfo(self):
+ """parse the XML version. [24] VersionInfo ::= S 'version' Eq
+ (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? """
+ ret = libxml2mod.xmlParseVersionInfo(self._o)
+ return ret
+
+ def parseVersionNum(self):
+ """parse the XML version value. [26] VersionNum ::= '1.'
+ [0-9]+ In practice allow [0-9].[0-9]+ at that level """
+ ret = libxml2mod.xmlParseVersionNum(self._o)
+ return ret
+
+ def parseXMLDecl(self):
+ """parse an XML declaration header [23] XMLDecl ::= '<?xml'
+ VersionInfo EncodingDecl? SDDecl? S? '?>' """
+ libxml2mod.xmlParseXMLDecl(self._o)
+
+ def parserHandlePEReference(self):
+ """[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A
+ parsed entity must not contain a recursive reference to
+ itself, either directly or indirectly. [ WFC: Entity
+ Declared ] In a document without any DTD, a document with
+ only an internal DTD subset which contains no parameter
+ entity references, or a document with "standalone='yes'",
+ ... ... The declaration of a parameter entity must precede
+ any reference to it... [ VC: Entity Declared ] In a
+ document with an external subset or external parameter
+ entities with "standalone='no'", ... ... The declaration
+ of a parameter entity must precede any reference to it...
+ [ WFC: In DTD ] Parameter-entity references may only appear
+ in the DTD. NOTE: misleading but this is handled. A
+ PEReference may have been detected in the current input
+ stream the handling is done accordingly to
+ http://www.w3.org/TR/REC-xml#entproc i.e. - Included in
+ literal in entity values - Included as Parameter Entity
+ reference within DTDs """
+ libxml2mod.xmlParserHandlePEReference(self._o)
+
+ def parserHandleReference(self):
+ """TODO: Remove, now deprecated ... the test is done directly
+ in the content parsing routines. [67] Reference ::=
+ EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [
+ WFC: Entity Declared ] the Name given in the entity
+ reference must match that in an entity declaration, except
+ that well-formed documents need not declare any of the
+ following entities: amp, lt, gt, apos, quot. [ WFC: Parsed
+ Entity ] An entity reference must not contain the name of
+ an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' |
+ '&#x' [0-9a-fA-F]+ ';' A PEReference may have been
+ detected in the current input stream the handling is done
+ accordingly to http://www.w3.org/TR/REC-xml#entproc """
+ libxml2mod.xmlParserHandleReference(self._o)
+
+ def popInput(self):
+ """xmlPopInput: the current input pointed by ctxt->input came
+ to an end pop it and return the next char. """
+ ret = libxml2mod.xmlPopInput(self._o)
+ return ret
+
+ def scanName(self):
+ """Trickery: parse an XML name but without consuming the input
+ flow Needed for rollback cases. Used only when parsing
+ entities references. TODO: seems deprecated now, only used
+ in the default part of xmlParserHandleReference [4]
+ NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ CombiningChar | Extender [5] Name ::= (Letter | '_' | ':')
+ (NameChar)* [6] Names ::= Name (S Name)* """
+ ret = libxml2mod.xmlScanName(self._o)
+ return ret
+
+ def skipBlankChars(self):
+ """skip all blanks character found at that point in the input
+ streams. It pops up finished entities in the process if
+ allowable at that point. """
+ ret = libxml2mod.xmlSkipBlankChars(self._o)
+ return ret
+
+ def stringDecodeEntities(self, str, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end, end2, end3)
+ return ret
+
+ def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str, len, what, end, end2, end3)
+ return ret
+
+class xmlAttr(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttr got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttr (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlAttr functions from module debugXML
+ #
+
+ def debugDumpAttr(self, output, depth):
+ """Dumps debug information for the attribute """
+ libxml2mod.xmlDebugDumpAttr(output, self._o, depth)
+
+ def debugDumpAttrList(self, output, depth):
+ """Dumps debug information for the attribute list """
+ libxml2mod.xmlDebugDumpAttrList(output, self._o, depth)
+
+ #
+ # xmlAttr functions from module tree
+ #
+
+ def copyProp(self, target):
+ """Do a copy of the attribute. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyProp(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, target):
+ """Do a copy of an attribute list. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyPropList(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def freeProp(self):
+ """Free one attribute, all the content is freed too """
+ libxml2mod.xmlFreeProp(self._o)
+
+ def freePropList(self):
+ """Free a property and all its siblings, all the children are
+ freed too. """
+ libxml2mod.xmlFreePropList(self._o)
+
+ def removeProp(self):
+ """Unlink and free one attribute, all the content is freed too
+ Note this doesn't work for namespace definition attributes """
+ ret = libxml2mod.xmlRemoveProp(self._o)
+ return ret
+
+ #
+ # xmlAttr functions from module valid
+ #
+
+ def removeID(self, doc):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveID(doc__o, self._o)
+ return ret
+
+ def removeRef(self, doc):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
+ return ret
+
+class xmlAttribute(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttribute got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttribute (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class catalog:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeCatalog(self._o)
+ self._o = None
+
+ #
+ # catalog functions from module catalog
+ #
+
+ def add(self, type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. """
+ ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
+ return ret
+
+ def catalogIsEmpty(self):
+ """Check is a catalog is empty """
+ ret = libxml2mod.xmlCatalogIsEmpty(self._o)
+ return ret
+
+ def convertSGMLCatalog(self):
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlConvertSGMLCatalog(self._o)
+ return ret
+
+ def dump(self, out):
+ """Dump the given catalog to the given file. """
+ libxml2mod.xmlACatalogDump(self._o, out)
+
+ def remove(self, value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlACatalogRemove(self._o, value)
+ return ret
+
+ def resolve(self, pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
+ return ret
+
+ def resolvePublic(self, pubID):
+ """Try to lookup the catalog local reference associated to a
+ public ID in that catalog """
+ ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
+ return ret
+
+ def resolveSystem(self, sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
+ return ret
+
+ def resolveURI(self, URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
+ return ret
+
+class xmlDtd(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDtd got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDtd (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDtd functions from module debugXML
+ #
+
+ def debugDumpDTD(self, output):
+ """Dumps debug information for the DTD """
+ libxml2mod.xmlDebugDumpDTD(output, self._o)
+
+ #
+ # xmlDtd functions from module tree
+ #
+
+ def copyDtd(self):
+ """Do a copy of the dtd. """
+ ret = libxml2mod.xmlCopyDtd(self._o)
+ if ret is None:raise treeError('xmlCopyDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def freeDtd(self):
+ """Free a DTD structure. """
+ libxml2mod.xmlFreeDtd(self._o)
+
+ #
+ # xmlDtd functions from module valid
+ #
+
+ def dtdAttrDesc(self, elem, name):
+ """Search the DTD for the description of this attribute on
+ this element. """
+ ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
+ if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdElementDesc(self, name):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+ def dtdQAttrDesc(self, elem, name, prefix):
+ """Search the DTD for the description of this qualified
+ attribute on this element. """
+ ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdQElementDesc(self, name, prefix):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+class xmlElement(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlElement got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlElement (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class xmlEntity(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlEntity got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlEntity (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlEntity functions from module parserInternals
+ #
+
+ def handleEntity(self, ctxt):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ libxml2mod.xmlHandleEntity(ctxt__o, self._o)
+
+class Error:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for Error
+ def code(self):
+ """The error code, e.g. an xmlParserError """
+ ret = libxml2mod.xmlErrorGetCode(self._o)
+ return ret
+
+ def domain(self):
+ """What part of the library raised this error """
+ ret = libxml2mod.xmlErrorGetDomain(self._o)
+ return ret
+
+ def file(self):
+ """the filename """
+ ret = libxml2mod.xmlErrorGetFile(self._o)
+ return ret
+
+ def level(self):
+ """how consequent is the error """
+ ret = libxml2mod.xmlErrorGetLevel(self._o)
+ return ret
+
+ def line(self):
+ """the line number if available """
+ ret = libxml2mod.xmlErrorGetLine(self._o)
+ return ret
+
+ def message(self):
+ """human-readable informative error message """
+ ret = libxml2mod.xmlErrorGetMessage(self._o)
+ return ret
+
+ #
+ # Error functions from module xmlerror
+ #
+
+ def copyError(self, to):
+ """Save the original error to the new place. """
+ if to is None: to__o = None
+ else: to__o = to._o
+ ret = libxml2mod.xmlCopyError(self._o, to__o)
+ return ret
+
+ def resetError(self):
+ """Cleanup the error. """
+ libxml2mod.xmlResetError(self._o)
+
+class xmlNs(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNs got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNs (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlNs functions from module tree
+ #
+
+ def copyNamespace(self):
+ """Do a copy of the namespace. """
+ ret = libxml2mod.xmlCopyNamespace(self._o)
+ if ret is None:raise treeError('xmlCopyNamespace() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def copyNamespaceList(self):
+ """Do a copy of an namespace list. """
+ ret = libxml2mod.xmlCopyNamespaceList(self._o)
+ if ret is None:raise treeError('xmlCopyNamespaceList() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def freeNs(self):
+ """Free up the structures associated to a namespace """
+ libxml2mod.xmlFreeNs(self._o)
+
+ def freeNsList(self):
+ """Free up all the structures associated to the chained
+ namespaces. """
+ libxml2mod.xmlFreeNsList(self._o)
+
+ def newChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNodeEatName(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNodeEatName(self, name):
+ """Creation of a new node element. @ns is optional (None). """
+ ret = libxml2mod.xmlNewNodeEatName(self._o, name)
+ if ret is None:raise treeError('xmlNewNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewTextChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setNs(self, node):
+ """Associate a namespace to a node, a posteriori. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlSetNs(node__o, self._o)
+
+ def setNsProp(self, node, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def unsetNsProp(self, node, name):
+ """Remove an attribute carried by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
+ return ret
+
+ #
+ # xmlNs functions from module xpathInternals
+ #
+
+ def xpathNodeSetFreeNs(self):
+ """Namespace nodes in libxml don't match the XPath semantic.
+ In a node set the namespace nodes are duplicated and the
+ next pointer is set to the parent node in the XPath
+ semantic. Check if such a node needs to be freed """
+ libxml2mod.xmlXPathNodeSetFreeNs(self._o)
+
+class outputBuffer(ioWriteWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioWriteWrapper.__init__(self, _obj=_obj)
+
+ #
+ # outputBuffer functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
+ """Dump an HTML document. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, cur, encoding):
+ """Dump an HTML document. Formating return/spaces are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding)
+
+ def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(self._o, doc__o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, doc, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(self._o, doc__o, cur__o, encoding)
+
+ #
+ # outputBuffer functions from module tree
+ #
+
+ def nodeDumpOutput(self, doc, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(self._o, doc__o, cur__o, level, format, encoding)
+
+ def saveFileTo(self, cur, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFileTo(self._o, cur__o, encoding)
+ return ret
+
+ def saveFormatFileTo(self, cur, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
+ return ret
+
+ #
+ # outputBuffer functions from module xmlIO
+ #
+
+ def getContent(self):
+ """Gives a pointer to the data currently held in the output
+ buffer """
+ ret = libxml2mod.xmlOutputBufferGetContent(self._o)
+ return ret
+
+ def write(self, len, buf):
+ """Write the content of the array in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
+ return ret
+
+ def writeString(self, str):
+ """Write the content of the string in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
+ return ret
+
+class inputBuffer(ioReadWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioReadWrapper.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ #
+ # inputBuffer functions from module xmlIO
+ #
+
+ def grow(self, len):
+ """Grow up the content of the input buffer, the old data are
+ preserved This routine handle the I18N transcoding to
+ internal UTF-8 This routine is used when operating the
+ parser in normal (pull) mode TODO: one should be able to
+ remove one extra copy by copying directly onto in->buffer
+ or in->raw """
+ ret = libxml2mod.xmlParserInputBufferGrow(self._o, len)
+ return ret
+
+ def push(self, len, buf):
+ """Push the content of the arry in the input buffer This
+ routine handle the I18N transcoding to internal UTF-8 This
+ is used when operating the parser in progressive (push)
+ mode. """
+ ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
+ return ret
+
+ def read(self, len):
+ """Refresh the content of the input buffer, the old data are
+ considered consumed This routine handle the I18N
+ transcoding to internal UTF-8 """
+ ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
+ return ret
+
+ #
+ # inputBuffer functions from module xmlreader
+ #
+
+ def Setup(self, reader, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
+ return ret
+
+ def newTextReader(self, URI):
+ """Create an xmlTextReader structure fed with @input """
+ ret = libxml2mod.xmlNewTextReader(self._o, URI)
+ if ret is None:raise treeError('xmlNewTextReader() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ __tmp.input = self
+ return __tmp
+
+class xmlReg:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRegFreeRegexp(self._o)
+ self._o = None
+
+ #
+ # xmlReg functions from module xmlregexp
+ #
+
+ def regexpExec(self, content):
+ """Check if the regular expression generates the value """
+ ret = libxml2mod.xmlRegexpExec(self._o, content)
+ return ret
+
+ def regexpIsDeterminist(self):
+ """Check if the regular expression is determinist """
+ ret = libxml2mod.xmlRegexpIsDeterminist(self._o)
+ return ret
+
+ def regexpPrint(self, output):
+ """Print the content of the compiled regular expression """
+ libxml2mod.xmlRegexpPrint(output, self._o)
+
+class relaxNgParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgParserCtxt functions from module relaxng
+ #
+
+ def relaxNGParse(self):
+ """parse a schema definition resource and build an internal
+ XML Shema struture which can be used to validate instances. """
+ ret = libxml2mod.xmlRelaxNGParse(self._o)
+ if ret is None:raise parserError('xmlRelaxNGParse() failed')
+ __tmp = relaxNgSchema(_obj=ret)
+ return __tmp
+
+ def relaxParserSetFlag(self, flags):
+ """Semi private function used to pass informations to a parser
+ context which are a combination of xmlRelaxNGParserFlag . """
+ ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
+ return ret
+
+class relaxNgSchema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFree(self._o)
+ self._o = None
+
+ #
+ # relaxNgSchema functions from module relaxng
+ #
+
+ def relaxNGDump(self, output):
+ """Dump a RelaxNG structure back """
+ libxml2mod.xmlRelaxNGDump(output, self._o)
+
+ def relaxNGDumpTree(self, output):
+ """Dump the transformed RelaxNG tree. """
+ libxml2mod.xmlRelaxNGDumpTree(output, self._o)
+
+ def relaxNGNewValidCtxt(self):
+ """Create an XML RelaxNGs validation context based on the
+ given schema """
+ ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
+ __tmp = relaxNgValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+ #
+ # relaxNgSchema functions from module xmlreader
+ #
+
+ def RelaxNGSetSchema(self, reader):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(reader__o, self._o)
+ return ret
+
+class relaxNgValidCtxt(relaxNgValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ relaxNgValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgValidCtxt functions from module relaxng
+ #
+
+ def relaxNGValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
+ return ret
+
+ def relaxNGValidateFullElement(self, doc, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, doc, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
+ return ret
+
+ def relaxNGValidatePushElement(self, doc, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(self._o, doc__o, elem__o)
+ return ret
+
+ #
+ # relaxNgValidCtxt functions from module xmlreader
+ #
+
+ def RelaxNGValidateCtxt(self, reader, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options)
+ return ret
+
+class SchemaParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaParserCtxt functions from module xmlschemas
+ #
+
+ def schemaParse(self):
+ """parse a schema definition resource and build an internal
+ XML Shema struture which can be used to validate instances. """
+ ret = libxml2mod.xmlSchemaParse(self._o)
+ if ret is None:raise parserError('xmlSchemaParse() failed')
+ __tmp = Schema(_obj=ret)
+ return __tmp
+
+class Schema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFree(self._o)
+ self._o = None
+
+ #
+ # Schema functions from module xmlreader
+ #
+
+ def SetSchema(self, reader):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetSchema(reader__o, self._o)
+ return ret
+
+ #
+ # Schema functions from module xmlschemas
+ #
+
+ def schemaDump(self, output):
+ """Dump a Schema structure. """
+ libxml2mod.xmlSchemaDump(output, self._o)
+
+ def schemaNewValidCtxt(self):
+ """Create an XML Schemas validation context based on the given
+ schema. """
+ ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
+ __tmp = SchemaValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+class SchemaValidCtxt(SchemaValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ SchemaValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaValidCtxt functions from module xmlreader
+ #
+
+ def SchemaValidateCtxt(self, reader, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(reader__o, self._o, options)
+ return ret
+
+ #
+ # SchemaValidCtxt functions from module xmlschemas
+ #
+
+ def schemaIsValid(self):
+ """Check if any error was detected during validation. """
+ ret = libxml2mod.xmlSchemaIsValid(self._o)
+ return ret
+
+ def schemaSetValidOptions(self, options):
+ """Sets the options to be used during the validation. """
+ ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
+ return ret
+
+ def schemaValidCtxtGetOptions(self):
+ """Get the validation context options. """
+ ret = libxml2mod.xmlSchemaValidCtxtGetOptions(self._o)
+ return ret
+
+ def schemaValidCtxtGetParserCtxt(self):
+ """allow access to the parser context of the schema validation
+ context """
+ ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
+ __tmp = parserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
+ return ret
+
+ def schemaValidateFile(self, filename, options):
+ """Do a schemas validation of the given resource, it will use
+ the SAX streamable validation internally. """
+ ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
+ return ret
+
+ def schemaValidateOneElement(self, elem):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
+ return ret
+
+ def schemaValidateSetFilename(self, filename):
+ """Workaround to provide file error reporting information when
+ this is not provided by current APIs """
+ libxml2mod.xmlSchemaValidateSetFilename(self._o, filename)
+
+class xmlTextReaderLocator:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ #
+ # xmlTextReaderLocator functions from module xmlreader
+ #
+
+ def BaseURI(self):
+ """Obtain the base URI for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o)
+ return ret
+
+ def LineNumber(self):
+ """Obtain the line number for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorLineNumber(self._o)
+ return ret
+
+class xmlTextReader(xmlTextReaderCore):
+ def __init__(self, _obj=None):
+ self.input = None
+ self._o = _obj
+ xmlTextReaderCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ #
+ # xmlTextReader functions from module xmlreader
+ #
+
+ def AttributeCount(self):
+ """Provides the number of attributes of the current node """
+ ret = libxml2mod.xmlTextReaderAttributeCount(self._o)
+ return ret
+
+ def BaseUri(self):
+ """The base URI of the node. """
+ ret = libxml2mod.xmlTextReaderConstBaseUri(self._o)
+ return ret
+
+ def ByteConsumed(self):
+ """This function provides the current index of the parser used
+ by the reader, relative to the start of the current entity.
+ This function actually just wraps a call to
+ xmlBytesConsumed() for the parser context associated with
+ the reader. See xmlBytesConsumed() for more information. """
+ ret = libxml2mod.xmlTextReaderByteConsumed(self._o)
+ return ret
+
+ def Close(self):
+ """This method releases any resources allocated by the current
+ instance changes the state to Closed and close any
+ underlying input. """
+ ret = libxml2mod.xmlTextReaderClose(self._o)
+ return ret
+
+ def CurrentDoc(self):
+ """Hacking interface allowing to get the xmlDocPtr
+ correponding to the current document being accessed by the
+ xmlTextReader. NOTE: as a result of this call, the reader
+ will not destroy the associated XML document and calling
+ xmlFreeDoc() on the result is needed once the reader
+ parsing has finished. """
+ ret = libxml2mod.xmlTextReaderCurrentDoc(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def CurrentNode(self):
+ """Hacking interface allowing to get the xmlNodePtr
+ correponding to the current node being accessed by the
+ xmlTextReader. This is dangerous because the underlying
+ node may be destroyed on the next Reads. """
+ ret = libxml2mod.xmlTextReaderCurrentNode(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def Depth(self):
+ """The depth of the node in the tree. """
+ ret = libxml2mod.xmlTextReaderDepth(self._o)
+ return ret
+
+ def Encoding(self):
+ """Determine the encoding of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstEncoding(self._o)
+ return ret
+
+ def Expand(self):
+ """Reads the contents of the current node and the full
+ subtree. It then makes the subtree available until the next
+ xmlTextReaderRead() call """
+ ret = libxml2mod.xmlTextReaderExpand(self._o)
+ if ret is None:raise treeError('xmlTextReaderExpand() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def GetAttribute(self, name):
+ """Provides the value of the attribute with the specified
+ qualified name. """
+ ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
+ return ret
+
+ def GetAttributeNo(self, no):
+ """Provides the value of the attribute with the specified
+ index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
+ return ret
+
+ def GetAttributeNs(self, localName, namespaceURI):
+ """Provides the value of the specified attribute """
+ ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def GetParserColumnNumber(self):
+ """Provide the column number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserColumnNumber(self._o)
+ return ret
+
+ def GetParserLineNumber(self):
+ """Provide the line number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserLineNumber(self._o)
+ return ret
+
+ def GetParserProp(self, prop):
+ """Read the parser internal property. """
+ ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
+ return ret
+
+ def GetRemainder(self):
+ """Method to get the remainder of the buffered XML. this
+ method stops the parser, set its state to End Of File and
+ return the input stream with what is left that the parser
+ did not use. The implementation is not good, the parser
+ certainly procgressed past what's left in reader->input,
+ and there is an allocation problem. Best would be to
+ rewrite it differently. """
+ ret = libxml2mod.xmlTextReaderGetRemainder(self._o)
+ if ret is None:raise treeError('xmlTextReaderGetRemainder() failed')
+ __tmp = inputBuffer(_obj=ret)
+ return __tmp
+
+ def HasAttributes(self):
+ """Whether the node has attributes. """
+ ret = libxml2mod.xmlTextReaderHasAttributes(self._o)
+ return ret
+
+ def HasValue(self):
+ """Whether the node can have a text value. """
+ ret = libxml2mod.xmlTextReaderHasValue(self._o)
+ return ret
+
+ def IsDefault(self):
+ """Whether an Attribute node was generated from the default
+ value defined in the DTD or schema. """
+ ret = libxml2mod.xmlTextReaderIsDefault(self._o)
+ return ret
+
+ def IsEmptyElement(self):
+ """Check if the current node is empty """
+ ret = libxml2mod.xmlTextReaderIsEmptyElement(self._o)
+ return ret
+
+ def IsNamespaceDecl(self):
+ """Determine whether the current node is a namespace
+ declaration rather than a regular attribute. """
+ ret = libxml2mod.xmlTextReaderIsNamespaceDecl(self._o)
+ return ret
+
+ def IsValid(self):
+ """Retrieve the validity status from the parser context """
+ ret = libxml2mod.xmlTextReaderIsValid(self._o)
+ return ret
+
+ def LocalName(self):
+ """The local name of the node. """
+ ret = libxml2mod.xmlTextReaderConstLocalName(self._o)
+ return ret
+
+ def LookupNamespace(self, prefix):
+ """Resolves a namespace prefix in the scope of the current
+ element. """
+ ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
+ return ret
+
+ def MoveToAttribute(self, name):
+ """Moves the position of the current instance to the attribute
+ with the specified qualified name. """
+ ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
+ return ret
+
+ def MoveToAttributeNo(self, no):
+ """Moves the position of the current instance to the attribute
+ with the specified index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
+ return ret
+
+ def MoveToAttributeNs(self, localName, namespaceURI):
+ """Moves the position of the current instance to the attribute
+ with the specified local name and namespace URI. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def MoveToElement(self):
+ """Moves the position of the current instance to the node that
+ contains the current Attribute node. """
+ ret = libxml2mod.xmlTextReaderMoveToElement(self._o)
+ return ret
+
+ def MoveToFirstAttribute(self):
+ """Moves the position of the current instance to the first
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToFirstAttribute(self._o)
+ return ret
+
+ def MoveToNextAttribute(self):
+ """Moves the position of the current instance to the next
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToNextAttribute(self._o)
+ return ret
+
+ def Name(self):
+ """The qualified name of the node, equal to Prefix :LocalName. """
+ ret = libxml2mod.xmlTextReaderConstName(self._o)
+ return ret
+
+ def NamespaceUri(self):
+ """The URI defining the namespace associated with the node. """
+ ret = libxml2mod.xmlTextReaderConstNamespaceUri(self._o)
+ return ret
+
+ def NewDoc(self, cur, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
+ return ret
+
+ def NewFd(self, fd, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML from a file
+ descriptor. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. The parsing
+ flags @options are a combination of xmlParserOption. This
+ reuses the existing @reader xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFd(self._o, fd, URL, encoding, options)
+ return ret
+
+ def NewFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFile(self._o, filename, encoding, options)
+ return ret
+
+ def NewMemory(self, buffer, size, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewMemory(self._o, buffer, size, URL, encoding, options)
+ return ret
+
+ def NewWalker(self, doc):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
+ return ret
+
+ def Next(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. """
+ ret = libxml2mod.xmlTextReaderNext(self._o)
+ return ret
+
+ def NextSibling(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. Currently
+ implemented only for Readers built on a document """
+ ret = libxml2mod.xmlTextReaderNextSibling(self._o)
+ return ret
+
+ def NodeType(self):
+ """Get the node type of the current node Reference:
+ http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
+ lNodeType.html """
+ ret = libxml2mod.xmlTextReaderNodeType(self._o)
+ return ret
+
+ def Normalization(self):
+ """The value indicating whether to normalize white space and
+ attribute values. Since attribute value and end of line
+ normalizations are a MUST in the XML specification only the
+ value true is accepted. The broken bahaviour of accepting
+ out of range character entities like &#0; is of course not
+ supported either. """
+ ret = libxml2mod.xmlTextReaderNormalization(self._o)
+ return ret
+
+ def Prefix(self):
+ """A shorthand reference to the namespace associated with the
+ node. """
+ ret = libxml2mod.xmlTextReaderConstPrefix(self._o)
+ return ret
+
+ def Preserve(self):
+ """This tells the XML Reader to preserve the current node. The
+ caller must also use xmlTextReaderCurrentDoc() to keep an
+ handle on the resulting document once parsing has finished """
+ ret = libxml2mod.xmlTextReaderPreserve(self._o)
+ if ret is None:raise treeError('xmlTextReaderPreserve() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def QuoteChar(self):
+ """The quotation mark character used to enclose the value of
+ an attribute. """
+ ret = libxml2mod.xmlTextReaderQuoteChar(self._o)
+ return ret
+
+ def Read(self):
+ """Moves the position of the current instance to the next node
+ in the stream, exposing its properties. """
+ ret = libxml2mod.xmlTextReaderRead(self._o)
+ return ret
+
+ def ReadAttributeValue(self):
+ """Parses an attribute value into one or more Text and
+ EntityReference nodes. """
+ ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
+ return ret
+
+ def ReadInnerXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadInnerXml(self._o)
+ return ret
+
+ def ReadOuterXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadOuterXml(self._o)
+ return ret
+
+ def ReadState(self):
+ """Gets the read state of the reader. """
+ ret = libxml2mod.xmlTextReaderReadState(self._o)
+ return ret
+
+ def ReadString(self):
+ """Reads the contents of an element or a text node as a string. """
+ ret = libxml2mod.xmlTextReaderReadString(self._o)
+ return ret
+
+ def RelaxNGSetSchema(self, schema):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(self._o, schema__o)
+ return ret
+
+ def RelaxNGValidate(self, rng):
+ """Use RelaxNG schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @rng is None, then RelaxNG schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderRelaxNGValidate(self._o, rng)
+ return ret
+
+ def RelaxNGValidateCtxt(self, ctxt, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SchemaValidate(self, xsd):
+ """Use W3C XSD schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @xsd is None, then XML Schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderSchemaValidate(self._o, xsd)
+ return ret
+
+ def SchemaValidateCtxt(self, ctxt, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SetParserProp(self, prop, value):
+ """Change the parser processing behaviour by changing some of
+ its internal properties. Note that some properties can only
+ be changed before any read has been done. """
+ ret = libxml2mod.xmlTextReaderSetParserProp(self._o, prop, value)
+ return ret
+
+ def SetSchema(self, schema):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderSetSchema(self._o, schema__o)
+ return ret
+
+ def Setup(self, input, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if input is None: input__o = None
+ else: input__o = input._o
+ ret = libxml2mod.xmlTextReaderSetup(self._o, input__o, URL, encoding, options)
+ return ret
+
+ def Standalone(self):
+ """Determine the standalone status of the document being read. """
+ ret = libxml2mod.xmlTextReaderStandalone(self._o)
+ return ret
+
+ def String(self, str):
+ """Get an interned string from the reader, allows for example
+ to speedup string name comparisons """
+ ret = libxml2mod.xmlTextReaderConstString(self._o, str)
+ return ret
+
+ def Value(self):
+ """Provides the text value of the node if present """
+ ret = libxml2mod.xmlTextReaderConstValue(self._o)
+ return ret
+
+ def XmlLang(self):
+ """The xml:lang scope within which the node resides. """
+ ret = libxml2mod.xmlTextReaderConstXmlLang(self._o)
+ return ret
+
+ def XmlVersion(self):
+ """Determine the XML version of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstXmlVersion(self._o)
+ return ret
+
+class URI:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeURI(self._o)
+ self._o = None
+
+ # accessors for URI
+ def authority(self):
+ """Get the authority part from an URI """
+ ret = libxml2mod.xmlURIGetAuthority(self._o)
+ return ret
+
+ def fragment(self):
+ """Get the fragment part from an URI """
+ ret = libxml2mod.xmlURIGetFragment(self._o)
+ return ret
+
+ def opaque(self):
+ """Get the opaque part from an URI """
+ ret = libxml2mod.xmlURIGetOpaque(self._o)
+ return ret
+
+ def path(self):
+ """Get the path part from an URI """
+ ret = libxml2mod.xmlURIGetPath(self._o)
+ return ret
+
+ def port(self):
+ """Get the port part from an URI """
+ ret = libxml2mod.xmlURIGetPort(self._o)
+ return ret
+
+ def query(self):
+ """Get the query part from an URI """
+ ret = libxml2mod.xmlURIGetQuery(self._o)
+ return ret
+
+ def queryRaw(self):
+ """Get the raw query part from an URI (i.e. the unescaped
+ form). """
+ ret = libxml2mod.xmlURIGetQueryRaw(self._o)
+ return ret
+
+ def scheme(self):
+ """Get the scheme part from an URI """
+ ret = libxml2mod.xmlURIGetScheme(self._o)
+ return ret
+
+ def server(self):
+ """Get the server part from an URI """
+ ret = libxml2mod.xmlURIGetServer(self._o)
+ return ret
+
+ def setAuthority(self, authority):
+ """Set the authority part of an URI. """
+ libxml2mod.xmlURISetAuthority(self._o, authority)
+
+ def setFragment(self, fragment):
+ """Set the fragment part of an URI. """
+ libxml2mod.xmlURISetFragment(self._o, fragment)
+
+ def setOpaque(self, opaque):
+ """Set the opaque part of an URI. """
+ libxml2mod.xmlURISetOpaque(self._o, opaque)
+
+ def setPath(self, path):
+ """Set the path part of an URI. """
+ libxml2mod.xmlURISetPath(self._o, path)
+
+ def setPort(self, port):
+ """Set the port part of an URI. """
+ libxml2mod.xmlURISetPort(self._o, port)
+
+ def setQuery(self, query):
+ """Set the query part of an URI. """
+ libxml2mod.xmlURISetQuery(self._o, query)
+
+ def setQueryRaw(self, query_raw):
+ """Set the raw query part of an URI (i.e. the unescaped form). """
+ libxml2mod.xmlURISetQueryRaw(self._o, query_raw)
+
+ def setScheme(self, scheme):
+ """Set the scheme part of an URI. """
+ libxml2mod.xmlURISetScheme(self._o, scheme)
+
+ def setServer(self, server):
+ """Set the server part of an URI. """
+ libxml2mod.xmlURISetServer(self._o, server)
+
+ def setUser(self, user):
+ """Set the user part of an URI. """
+ libxml2mod.xmlURISetUser(self._o, user)
+
+ def user(self):
+ """Get the user part from an URI """
+ ret = libxml2mod.xmlURIGetUser(self._o)
+ return ret
+
+ #
+ # URI functions from module uri
+ #
+
+ def parseURIReference(self, str):
+ """Parse an URI reference string based on RFC 3986 and fills
+ in the appropriate fields of the @uri structure
+ URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIReference(self._o, str)
+ return ret
+
+ def printURI(self, stream):
+ """Prints the URI in the stream @stream. """
+ libxml2mod.xmlPrintURI(stream, self._o)
+
+ def saveUri(self):
+ """Save the URI as an escaped string """
+ ret = libxml2mod.xmlSaveUri(self._o)
+ return ret
+
+class ValidCtxt(ValidCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # ValidCtxt functions from module valid
+ #
+
+ def validCtxtNormalizeAttributeValue(self, doc, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(self._o, doc__o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, doc):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
+ return ret
+
+ def validateDocumentFinal(self, doc):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocumentFinal(self._o, doc__o)
+ return ret
+
+ def validateDtd(self, doc, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(self._o, doc__o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, doc):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDtdFinal(self._o, doc__o)
+ return ret
+
+ def validateElement(self, doc, elem):
+ """Try to validate the subtree under an element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateNotationUse(self, doc, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateNotationUse(self._o, doc__o, notationName)
+ return ret
+
+ def validateOneAttribute(self, doc, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(self._o, doc__o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, doc, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, doc, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(self._o, doc__o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, doc, elem, qname):
+ """Pop the element end from the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlValidatePushCData(self._o, data, len)
+ return ret
+
+ def validatePushElement(self, doc, elem, qname):
+ """Push a new element start on the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, doc):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateRoot(self._o, doc__o)
+ return ret
+
+class xpathContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathContext
+ def contextDoc(self):
+ """Get the doc from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextDoc(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def contextNode(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextNode(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def contextPosition(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextPosition(self._o)
+ return ret
+
+ def contextSize(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextSize(self._o)
+ return ret
+
+ def function(self):
+ """Get the current function name xpathContext """
+ ret = libxml2mod.xmlXPathGetFunction(self._o)
+ return ret
+
+ def functionURI(self):
+ """Get the current function name URI xpathContext """
+ ret = libxml2mod.xmlXPathGetFunctionURI(self._o)
+ return ret
+
+ def setContextDoc(self, doc):
+ """Set the doc of an xpathContext """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlXPathSetContextDoc(self._o, doc__o)
+
+ def setContextNode(self, node):
+ """Set the current node of an xpathContext """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlXPathSetContextNode(self._o, node__o)
+
+ #
+ # xpathContext functions from module python
+ #
+
+ def registerXPathFunction(self, name, ns_uri, f):
+ """Register a Python written function to the XPath interpreter """
+ ret = libxml2mod.xmlRegisterXPathFunction(self._o, name, ns_uri, f)
+ return ret
+
+ def xpathRegisterVariable(self, name, ns_uri, value):
+ """Register a variable with the XPath context """
+ ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
+ return ret
+
+ #
+ # xpathContext functions from module xpath
+ #
+
+ def xpathContextSetCache(self, active, value, options):
+ """Creates/frees an object cache on the XPath context. If
+ activates XPath objects (xmlXPathObject) will be cached
+ internally to be reused. @options: 0: This will set the
+ XPath object caching: @value: This will set the maximum
+ number of XPath objects to be cached per slot There are 5
+ slots for: node-set, string, number, boolean, and misc
+ objects. Use <0 for the default number (100). Other values
+ for @options have currently no effect. """
+ ret = libxml2mod.xmlXPathContextSetCache(self._o, active, value, options)
+ return ret
+
+ def xpathEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPathEval(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEval() failed')
+ return xpathObjectRet(ret)
+
+ def xpathEvalExpression(self, str):
+ """Evaluate the XPath expression in the given context. """
+ ret = libxml2mod.xmlXPathEvalExpression(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEvalExpression() failed')
+ return xpathObjectRet(ret)
+
+ def xpathFreeContext(self):
+ """Free up an xmlXPathContext """
+ libxml2mod.xmlXPathFreeContext(self._o)
+
+ #
+ # xpathContext functions from module xpathInternals
+ #
+
+ def xpathNewParserContext(self, str):
+ """Create a new xmlXPathParserContext """
+ ret = libxml2mod.xmlXPathNewParserContext(str, self._o)
+ if ret is None:raise xpathError('xmlXPathNewParserContext() failed')
+ __tmp = xpathParserContext(_obj=ret)
+ return __tmp
+
+ def xpathNsLookup(self, prefix):
+ """Search in the namespace declaration array of the context
+ for the given namespace name associated to the given prefix """
+ ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
+ return ret
+
+ def xpathRegisterAllFunctions(self):
+ """Registers all default XPath functions in this context """
+ libxml2mod.xmlXPathRegisterAllFunctions(self._o)
+
+ def xpathRegisterNs(self, prefix, ns_uri):
+ """Register a new namespace. If @ns_uri is None it unregisters
+ the namespace """
+ ret = libxml2mod.xmlXPathRegisterNs(self._o, prefix, ns_uri)
+ return ret
+
+ def xpathRegisteredFuncsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ functions """
+ libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)
+
+ def xpathRegisteredNsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredNsCleanup(self._o)
+
+ def xpathRegisteredVariablesCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredVariablesCleanup(self._o)
+
+ def xpathVariableLookup(self, name):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
+ if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
+ return xpathObjectRet(ret)
+
+ def xpathVariableLookupNS(self, name, ns_uri):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookupNS(self._o, name, ns_uri)
+ if ret is None:raise xpathError('xmlXPathVariableLookupNS() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xpathContext functions from module xpointer
+ #
+
+ def xpointerEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPtrEval(str, self._o)
+ if ret is None:raise treeError('xmlXPtrEval() failed')
+ return xpathObjectRet(ret)
+
+class xpathParserContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathParserContext
+ def context(self):
+ """Get the xpathContext from an xpathParserContext """
+ ret = libxml2mod.xmlXPathParserGetContext(self._o)
+ if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ #
+ # xpathParserContext functions from module xpathInternals
+ #
+
+ def xpathAddValues(self):
+ """Implement the add operation on XPath objects: The numeric
+ operators convert their operands to numbers as if by
+ calling the number function. """
+ libxml2mod.xmlXPathAddValues(self._o)
+
+ def xpathBooleanFunction(self, nargs):
+ """Implement the boolean() XPath function boolean
+ boolean(object) The boolean function converts its argument
+ to a boolean as follows: - a number is true if and only if
+ it is neither positive or negative zero nor NaN - a
+ node-set is true if and only if it is non-empty - a string
+ is true if and only if its length is non-zero """
+ libxml2mod.xmlXPathBooleanFunction(self._o, nargs)
+
+ def xpathCeilingFunction(self, nargs):
+ """Implement the ceiling() XPath function number
+ ceiling(number) The ceiling function returns the smallest
+ (closest to negative infinity) number that is not less than
+ the argument and that is an integer. """
+ libxml2mod.xmlXPathCeilingFunction(self._o, nargs)
+
+ def xpathCompareValues(self, inf, strict):
+ """Implement the compare operation on XPath objects: @arg1 <
+ @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 >
+ @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When
+ neither object to be compared is a node-set and the
+ operator is <=, <, >=, >, then the objects are compared by
+ converted both objects to numbers and comparing the numbers
+ according to IEEE 754. The < comparison will be true if and
+ only if the first number is less than the second number.
+ The <= comparison will be true if and only if the first
+ number is less than or equal to the second number. The >
+ comparison will be true if and only if the first number is
+ greater than the second number. The >= comparison will be
+ true if and only if the first number is greater than or
+ equal to the second number. """
+ ret = libxml2mod.xmlXPathCompareValues(self._o, inf, strict)
+ return ret
+
+ def xpathConcatFunction(self, nargs):
+ """Implement the concat() XPath function string concat(string,
+ string, string*) The concat function returns the
+ concatenation of its arguments. """
+ libxml2mod.xmlXPathConcatFunction(self._o, nargs)
+
+ def xpathContainsFunction(self, nargs):
+ """Implement the contains() XPath function boolean
+ contains(string, string) The contains function returns true
+ if the first argument string contains the second argument
+ string, and otherwise returns false. """
+ libxml2mod.xmlXPathContainsFunction(self._o, nargs)
+
+ def xpathCountFunction(self, nargs):
+ """Implement the count() XPath function number count(node-set) """
+ libxml2mod.xmlXPathCountFunction(self._o, nargs)
+
+ def xpathDivValues(self):
+ """Implement the div operation on XPath objects @arg1 / @arg2:
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathDivValues(self._o)
+
+ def xpathEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathEqualValues(self._o)
+ return ret
+
+ def xpathErr(self, error):
+ """Handle an XPath error """
+ libxml2mod.xmlXPathErr(self._o, error)
+
+ def xpathEvalExpr(self):
+ """Parse and evaluate an XPath expression in the given
+ context, then push the result on the context stack """
+ libxml2mod.xmlXPathEvalExpr(self._o)
+
+ def xpathFalseFunction(self, nargs):
+ """Implement the false() XPath function boolean false() """
+ libxml2mod.xmlXPathFalseFunction(self._o, nargs)
+
+ def xpathFloorFunction(self, nargs):
+ """Implement the floor() XPath function number floor(number)
+ The floor function returns the largest (closest to positive
+ infinity) number that is not greater than the argument and
+ that is an integer. """
+ libxml2mod.xmlXPathFloorFunction(self._o, nargs)
+
+ def xpathFreeParserContext(self):
+ """Free up an xmlXPathParserContext """
+ libxml2mod.xmlXPathFreeParserContext(self._o)
+
+ def xpathIdFunction(self, nargs):
+ """Implement the id() XPath function node-set id(object) The
+ id function selects elements by their unique ID (see [5.2.1
+ Unique IDs]). When the argument to id is of type node-set,
+ then the result is the union of the result of applying id
+ to the string value of each of the nodes in the argument
+ node-set. When the argument to id is of any other type, the
+ argument is converted to a string as if by a call to the
+ string function; the string is split into a
+ whitespace-separated list of tokens (whitespace is any
+ sequence of characters matching the production S); the
+ result is a node-set containing the elements in the same
+ document as the context node that have a unique ID equal to
+ any of the tokens in the list. """
+ libxml2mod.xmlXPathIdFunction(self._o, nargs)
+
+ def xpathLangFunction(self, nargs):
+ """Implement the lang() XPath function boolean lang(string)
+ The lang function returns true or false depending on
+ whether the language of the context node as specified by
+ xml:lang attributes is the same as or is a sublanguage of
+ the language specified by the argument string. The language
+ of the context node is determined by the value of the
+ xml:lang attribute on the context node, or, if the context
+ node has no xml:lang attribute, by the value of the
+ xml:lang attribute on the nearest ancestor of the context
+ node that has an xml:lang attribute. If there is no such
+ attribute, then lang """
+ libxml2mod.xmlXPathLangFunction(self._o, nargs)
+
+ def xpathLastFunction(self, nargs):
+ """Implement the last() XPath function number last() The last
+ function returns the number of nodes in the context node
+ list. """
+ libxml2mod.xmlXPathLastFunction(self._o, nargs)
+
+ def xpathLocalNameFunction(self, nargs):
+ """Implement the local-name() XPath function string
+ local-name(node-set?) The local-name function returns a
+ string containing the local part of the name of the node in
+ the argument node-set that is first in document order. If
+ the node-set is empty or the first node has no name, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathLocalNameFunction(self._o, nargs)
+
+ def xpathModValues(self):
+ """Implement the mod operation on XPath objects: @arg1 / @arg2
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathModValues(self._o)
+
+ def xpathMultValues(self):
+ """Implement the multiply operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathMultValues(self._o)
+
+ def xpathNamespaceURIFunction(self, nargs):
+ """Implement the namespace-uri() XPath function string
+ namespace-uri(node-set?) The namespace-uri function returns
+ a string containing the namespace URI of the expanded name
+ of the node in the argument node-set that is first in
+ document order. If the node-set is empty, the first node
+ has no name, or the expanded name has no namespace URI, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathNamespaceURIFunction(self._o, nargs)
+
+ def xpathNextAncestor(self, cur):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestor(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, cur):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, cur):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAttribute(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, cur):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextChild(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, cur):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, cur):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, cur):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowing(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, cur):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, cur):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextNamespace(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, cur):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextParent(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, cur):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPreceding(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, cur):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, cur):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNormalizeFunction(self, nargs):
+ """Implement the normalize-space() XPath function string
+ normalize-space(string?) The normalize-space function
+ returns the argument string with white space normalized by
+ stripping leading and trailing whitespace and replacing
+ sequences of whitespace characters by a single space.
+ Whitespace characters are the same allowed by the S
+ production in XML. If the argument is omitted, it defaults
+ to the context node converted to a string, in other words
+ the value of the context node. """
+ libxml2mod.xmlXPathNormalizeFunction(self._o, nargs)
+
+ def xpathNotEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathNotEqualValues(self._o)
+ return ret
+
+ def xpathNotFunction(self, nargs):
+ """Implement the not() XPath function boolean not(boolean) The
+ not function returns true if its argument is false, and
+ false otherwise. """
+ libxml2mod.xmlXPathNotFunction(self._o, nargs)
+
+ def xpathNumberFunction(self, nargs):
+ """Implement the number() XPath function number number(object?) """
+ libxml2mod.xmlXPathNumberFunction(self._o, nargs)
+
+ def xpathParseNCName(self):
+ """parse an XML namespace non qualified name. [NS 3] NCName
+ ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::=
+ Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlXPathParseNCName(self._o)
+ return ret
+
+ def xpathParseName(self):
+ """parse an XML name [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* """
+ ret = libxml2mod.xmlXPathParseName(self._o)
+ return ret
+
+ def xpathPopBoolean(self):
+ """Pops a boolean from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopBoolean(self._o)
+ return ret
+
+ def xpathPopNumber(self):
+ """Pops a number from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopNumber(self._o)
+ return ret
+
+ def xpathPopString(self):
+ """Pops a string from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopString(self._o)
+ return ret
+
+ def xpathPositionFunction(self, nargs):
+ """Implement the position() XPath function number position()
+ The position function returns the position of the context
+ node in the context node list. The first position is 1, and
+ so the last position will be equal to last(). """
+ libxml2mod.xmlXPathPositionFunction(self._o, nargs)
+
+ def xpathRoot(self):
+ """Initialize the context to the root of the document """
+ libxml2mod.xmlXPathRoot(self._o)
+
+ def xpathRoundFunction(self, nargs):
+ """Implement the round() XPath function number round(number)
+ The round function returns the number that is closest to
+ the argument and that is an integer. If there are two such
+ numbers, then the one that is even is returned. """
+ libxml2mod.xmlXPathRoundFunction(self._o, nargs)
+
+ def xpathStartsWithFunction(self, nargs):
+ """Implement the starts-with() XPath function boolean
+ starts-with(string, string) The starts-with function
+ returns true if the first argument string starts with the
+ second argument string, and otherwise returns false. """
+ libxml2mod.xmlXPathStartsWithFunction(self._o, nargs)
+
+ def xpathStringFunction(self, nargs):
+ """Implement the string() XPath function string
+ string(object?) The string function converts an object to a
+ string as follows: - A node-set is converted to a string by
+ returning the value of the node in the node-set that is
+ first in document order. If the node-set is empty, an empty
+ string is returned. - A number is converted to a string as
+ follows + NaN is converted to the string NaN + positive
+ zero is converted to the string 0 + negative zero is
+ converted to the string 0 + positive infinity is converted
+ to the string Infinity + negative infinity is converted to
+ the string -Infinity + if the number is an integer, the
+ number is represented in decimal form as a Number with no
+ decimal point and no leading zeros, preceded by a minus
+ sign (-) if the number is negative + otherwise, the number
+ is represented in decimal form as a Number including a
+ decimal point with at least one digit before the decimal
+ point and at least one digit after the decimal point,
+ preceded by a minus sign (-) if the number is negative;
+ there must be no leading zeros before the decimal point
+ apart possibly from the one required digit immediately
+ before the decimal point; beyond the one required digit
+ after the decimal point there must be as many, but only as
+ many, more digits as are needed to uniquely distinguish the
+ number from all other IEEE 754 numeric values. - The
+ boolean false value is converted to the string false. The
+ boolean true value is converted to the string true. If the
+ argument is omitted, it defaults to a node-set with the
+ context node as its only member. """
+ libxml2mod.xmlXPathStringFunction(self._o, nargs)
+
+ def xpathStringLengthFunction(self, nargs):
+ """Implement the string-length() XPath function number
+ string-length(string?) The string-length returns the number
+ of characters in the string (see [3.6 Strings]). If the
+ argument is omitted, it defaults to the context node
+ converted to a string, in other words the value of the
+ context node. """
+ libxml2mod.xmlXPathStringLengthFunction(self._o, nargs)
+
+ def xpathSubValues(self):
+ """Implement the subtraction operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathSubValues(self._o)
+
+ def xpathSubstringAfterFunction(self, nargs):
+ """Implement the substring-after() XPath function string
+ substring-after(string, string) The substring-after
+ function returns the substring of the first argument string
+ that follows the first occurrence of the second argument
+ string in the first argument string, or the empty stringi
+ if the first argument string does not contain the second
+ argument string. For example,
+ substring-after("1999/04/01","/") returns 04/01, and
+ substring-after("1999/04/01","19") returns 99/04/01. """
+ libxml2mod.xmlXPathSubstringAfterFunction(self._o, nargs)
+
+ def xpathSubstringBeforeFunction(self, nargs):
+ """Implement the substring-before() XPath function string
+ substring-before(string, string) The substring-before
+ function returns the substring of the first argument string
+ that precedes the first occurrence of the second argument
+ string in the first argument string, or the empty string if
+ the first argument string does not contain the second
+ argument string. For example,
+ substring-before("1999/04/01","/") returns 1999. """
+ libxml2mod.xmlXPathSubstringBeforeFunction(self._o, nargs)
+
+ def xpathSubstringFunction(self, nargs):
+ """Implement the substring() XPath function string
+ substring(string, number, number?) The substring function
+ returns the substring of the first argument starting at the
+ position specified in the second argument with length
+ specified in the third argument. For example,
+ substring("12345",2,3) returns "234". If the third argument
+ is not specified, it returns the substring starting at the
+ position specified in the second argument and continuing to
+ the end of the string. For example, substring("12345",2)
+ returns "2345". More precisely, each character in the
+ string (see [3.6 Strings]) is considered to have a numeric
+ position: the position of the first character is 1, the
+ position of the second character is 2 and so on. The
+ returned substring contains those characters for which the
+ position of the character is greater than or equal to the
+ second argument and, if the third argument is specified,
+ less than the sum of the second and third arguments; the
+ comparisons and addition used for the above follow the
+ standard IEEE 754 rules. Thus: - substring("12345", 1.5,
+ 2.6) returns "234" - substring("12345", 0, 3) returns "12"
+ - substring("12345", 0 div 0, 3) returns "" -
+ substring("12345", 1, 0 div 0) returns "" -
+ substring("12345", -42, 1 div 0) returns "12345" -
+ substring("12345", -1 div 0, 1 div 0) returns "" """
+ libxml2mod.xmlXPathSubstringFunction(self._o, nargs)
+
+ def xpathSumFunction(self, nargs):
+ """Implement the sum() XPath function number sum(node-set) The
+ sum function returns the sum of the values of the nodes in
+ the argument node-set. """
+ libxml2mod.xmlXPathSumFunction(self._o, nargs)
+
+ def xpathTranslateFunction(self, nargs):
+ """Implement the translate() XPath function string
+ translate(string, string, string) The translate function
+ returns the first argument string with occurrences of
+ characters in the second argument string replaced by the
+ character at the corresponding position in the third
+ argument string. For example, translate("bar","abc","ABC")
+ returns the string BAr. If there is a character in the
+ second argument string with no character at a corresponding
+ position in the third argument string (because the second
+ argument string is longer than the third argument string),
+ then occurrences of that character in the first argument
+ string are removed. For example,
+ translate("--aaa--","abc-","ABC") """
+ libxml2mod.xmlXPathTranslateFunction(self._o, nargs)
+
+ def xpathTrueFunction(self, nargs):
+ """Implement the true() XPath function boolean true() """
+ libxml2mod.xmlXPathTrueFunction(self._o, nargs)
+
+ def xpathValueFlipSign(self):
+ """Implement the unary - operation on an XPath object The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathValueFlipSign(self._o)
+
+ def xpatherror(self, file, line, no):
+ """Formats an error message. """
+ libxml2mod.xmlXPatherror(self._o, file, line, no)
+
+ #
+ # xpathParserContext functions from module xpointer
+ #
+
+ def xpointerEvalRangePredicate(self):
+ """[8] Predicate ::= '[' PredicateExpr ']' [9]
+ PredicateExpr ::= Expr Evaluate a predicate as in
+ xmlXPathEvalPredicate() but for a Location Set instead of a
+ node set """
+ libxml2mod.xmlXPtrEvalRangePredicate(self._o)
+
+ def xpointerRangeToFunction(self, nargs):
+ """Implement the range-to() XPointer function """
+ libxml2mod.xmlXPtrRangeToFunction(self._o, nargs)
+
+# xlinkShow
+XLINK_SHOW_NONE = 0
+XLINK_SHOW_NEW = 1
+XLINK_SHOW_EMBED = 2
+XLINK_SHOW_REPLACE = 3
+
+# xmlRelaxNGParserFlag
+XML_RELAXNGP_NONE = 0
+XML_RELAXNGP_FREE_DOC = 1
+XML_RELAXNGP_CRNG = 2
+
+# xmlBufferAllocationScheme
+XML_BUFFER_ALLOC_DOUBLEIT = 1
+XML_BUFFER_ALLOC_EXACT = 2
+XML_BUFFER_ALLOC_IMMUTABLE = 3
+XML_BUFFER_ALLOC_IO = 4
+XML_BUFFER_ALLOC_HYBRID = 5
+
+# xmlParserSeverities
+XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
+XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
+XML_PARSER_SEVERITY_WARNING = 3
+XML_PARSER_SEVERITY_ERROR = 4
+
+# xmlAttributeDefault
+XML_ATTRIBUTE_NONE = 1
+XML_ATTRIBUTE_REQUIRED = 2
+XML_ATTRIBUTE_IMPLIED = 3
+XML_ATTRIBUTE_FIXED = 4
+
+# xmlSchemaValType
+XML_SCHEMAS_UNKNOWN = 0
+XML_SCHEMAS_STRING = 1
+XML_SCHEMAS_NORMSTRING = 2
+XML_SCHEMAS_DECIMAL = 3
+XML_SCHEMAS_TIME = 4
+XML_SCHEMAS_GDAY = 5
+XML_SCHEMAS_GMONTH = 6
+XML_SCHEMAS_GMONTHDAY = 7
+XML_SCHEMAS_GYEAR = 8
+XML_SCHEMAS_GYEARMONTH = 9
+XML_SCHEMAS_DATE = 10
+XML_SCHEMAS_DATETIME = 11
+XML_SCHEMAS_DURATION = 12
+XML_SCHEMAS_FLOAT = 13
+XML_SCHEMAS_DOUBLE = 14
+XML_SCHEMAS_BOOLEAN = 15
+XML_SCHEMAS_TOKEN = 16
+XML_SCHEMAS_LANGUAGE = 17
+XML_SCHEMAS_NMTOKEN = 18
+XML_SCHEMAS_NMTOKENS = 19
+XML_SCHEMAS_NAME = 20
+XML_SCHEMAS_QNAME = 21
+XML_SCHEMAS_NCNAME = 22
+XML_SCHEMAS_ID = 23
+XML_SCHEMAS_IDREF = 24
+XML_SCHEMAS_IDREFS = 25
+XML_SCHEMAS_ENTITY = 26
+XML_SCHEMAS_ENTITIES = 27
+XML_SCHEMAS_NOTATION = 28
+XML_SCHEMAS_ANYURI = 29
+XML_SCHEMAS_INTEGER = 30
+XML_SCHEMAS_NPINTEGER = 31
+XML_SCHEMAS_NINTEGER = 32
+XML_SCHEMAS_NNINTEGER = 33
+XML_SCHEMAS_PINTEGER = 34
+XML_SCHEMAS_INT = 35
+XML_SCHEMAS_UINT = 36
+XML_SCHEMAS_LONG = 37
+XML_SCHEMAS_ULONG = 38
+XML_SCHEMAS_SHORT = 39
+XML_SCHEMAS_USHORT = 40
+XML_SCHEMAS_BYTE = 41
+XML_SCHEMAS_UBYTE = 42
+XML_SCHEMAS_HEXBINARY = 43
+XML_SCHEMAS_BASE64BINARY = 44
+XML_SCHEMAS_ANYTYPE = 45
+XML_SCHEMAS_ANYSIMPLETYPE = 46
+
+# xmlParserInputState
+XML_PARSER_EOF = -1
+XML_PARSER_START = 0
+XML_PARSER_MISC = 1
+XML_PARSER_PI = 2
+XML_PARSER_DTD = 3
+XML_PARSER_PROLOG = 4
+XML_PARSER_COMMENT = 5
+XML_PARSER_START_TAG = 6
+XML_PARSER_CONTENT = 7
+XML_PARSER_CDATA_SECTION = 8
+XML_PARSER_END_TAG = 9
+XML_PARSER_ENTITY_DECL = 10
+XML_PARSER_ENTITY_VALUE = 11
+XML_PARSER_ATTRIBUTE_VALUE = 12
+XML_PARSER_SYSTEM_LITERAL = 13
+XML_PARSER_EPILOG = 14
+XML_PARSER_IGNORE = 15
+XML_PARSER_PUBLIC_LITERAL = 16
+
+# xmlEntityType
+XML_INTERNAL_GENERAL_ENTITY = 1
+XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2
+XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3
+XML_INTERNAL_PARAMETER_ENTITY = 4
+XML_EXTERNAL_PARAMETER_ENTITY = 5
+XML_INTERNAL_PREDEFINED_ENTITY = 6
+
+# xmlSaveOption
+XML_SAVE_FORMAT = 1
+XML_SAVE_NO_DECL = 2
+XML_SAVE_NO_EMPTY = 4
+XML_SAVE_NO_XHTML = 8
+XML_SAVE_XHTML = 16
+XML_SAVE_AS_XML = 32
+XML_SAVE_AS_HTML = 64
+XML_SAVE_WSNONSIG = 128
+
+# xmlPatternFlags
+XML_PATTERN_DEFAULT = 0
+XML_PATTERN_XPATH = 1
+XML_PATTERN_XSSEL = 2
+XML_PATTERN_XSFIELD = 4
+
+# xmlParserErrors
+XML_ERR_OK = 0
+XML_ERR_INTERNAL_ERROR = 1
+XML_ERR_NO_MEMORY = 2
+XML_ERR_DOCUMENT_START = 3
+XML_ERR_DOCUMENT_EMPTY = 4
+XML_ERR_DOCUMENT_END = 5
+XML_ERR_INVALID_HEX_CHARREF = 6
+XML_ERR_INVALID_DEC_CHARREF = 7
+XML_ERR_INVALID_CHARREF = 8
+XML_ERR_INVALID_CHAR = 9
+XML_ERR_CHARREF_AT_EOF = 10
+XML_ERR_CHARREF_IN_PROLOG = 11
+XML_ERR_CHARREF_IN_EPILOG = 12
+XML_ERR_CHARREF_IN_DTD = 13
+XML_ERR_ENTITYREF_AT_EOF = 14
+XML_ERR_ENTITYREF_IN_PROLOG = 15
+XML_ERR_ENTITYREF_IN_EPILOG = 16
+XML_ERR_ENTITYREF_IN_DTD = 17
+XML_ERR_PEREF_AT_EOF = 18
+XML_ERR_PEREF_IN_PROLOG = 19
+XML_ERR_PEREF_IN_EPILOG = 20
+XML_ERR_PEREF_IN_INT_SUBSET = 21
+XML_ERR_ENTITYREF_NO_NAME = 22
+XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
+XML_ERR_PEREF_NO_NAME = 24
+XML_ERR_PEREF_SEMICOL_MISSING = 25
+XML_ERR_UNDECLARED_ENTITY = 26
+XML_WAR_UNDECLARED_ENTITY = 27
+XML_ERR_UNPARSED_ENTITY = 28
+XML_ERR_ENTITY_IS_EXTERNAL = 29
+XML_ERR_ENTITY_IS_PARAMETER = 30
+XML_ERR_UNKNOWN_ENCODING = 31
+XML_ERR_UNSUPPORTED_ENCODING = 32
+XML_ERR_STRING_NOT_STARTED = 33
+XML_ERR_STRING_NOT_CLOSED = 34
+XML_ERR_NS_DECL_ERROR = 35
+XML_ERR_ENTITY_NOT_STARTED = 36
+XML_ERR_ENTITY_NOT_FINISHED = 37
+XML_ERR_LT_IN_ATTRIBUTE = 38
+XML_ERR_ATTRIBUTE_NOT_STARTED = 39
+XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
+XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
+XML_ERR_ATTRIBUTE_REDEFINED = 42
+XML_ERR_LITERAL_NOT_STARTED = 43
+XML_ERR_LITERAL_NOT_FINISHED = 44
+XML_ERR_COMMENT_NOT_FINISHED = 45
+XML_ERR_PI_NOT_STARTED = 46
+XML_ERR_PI_NOT_FINISHED = 47
+XML_ERR_NOTATION_NOT_STARTED = 48
+XML_ERR_NOTATION_NOT_FINISHED = 49
+XML_ERR_ATTLIST_NOT_STARTED = 50
+XML_ERR_ATTLIST_NOT_FINISHED = 51
+XML_ERR_MIXED_NOT_STARTED = 52
+XML_ERR_MIXED_NOT_FINISHED = 53
+XML_ERR_ELEMCONTENT_NOT_STARTED = 54
+XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
+XML_ERR_XMLDECL_NOT_STARTED = 56
+XML_ERR_XMLDECL_NOT_FINISHED = 57
+XML_ERR_CONDSEC_NOT_STARTED = 58
+XML_ERR_CONDSEC_NOT_FINISHED = 59
+XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
+XML_ERR_DOCTYPE_NOT_FINISHED = 61
+XML_ERR_MISPLACED_CDATA_END = 62
+XML_ERR_CDATA_NOT_FINISHED = 63
+XML_ERR_RESERVED_XML_NAME = 64
+XML_ERR_SPACE_REQUIRED = 65
+XML_ERR_SEPARATOR_REQUIRED = 66
+XML_ERR_NMTOKEN_REQUIRED = 67
+XML_ERR_NAME_REQUIRED = 68
+XML_ERR_PCDATA_REQUIRED = 69
+XML_ERR_URI_REQUIRED = 70
+XML_ERR_PUBID_REQUIRED = 71
+XML_ERR_LT_REQUIRED = 72
+XML_ERR_GT_REQUIRED = 73
+XML_ERR_LTSLASH_REQUIRED = 74
+XML_ERR_EQUAL_REQUIRED = 75
+XML_ERR_TAG_NAME_MISMATCH = 76
+XML_ERR_TAG_NOT_FINISHED = 77
+XML_ERR_STANDALONE_VALUE = 78
+XML_ERR_ENCODING_NAME = 79
+XML_ERR_HYPHEN_IN_COMMENT = 80
+XML_ERR_INVALID_ENCODING = 81
+XML_ERR_EXT_ENTITY_STANDALONE = 82
+XML_ERR_CONDSEC_INVALID = 83
+XML_ERR_VALUE_REQUIRED = 84
+XML_ERR_NOT_WELL_BALANCED = 85
+XML_ERR_EXTRA_CONTENT = 86
+XML_ERR_ENTITY_CHAR_ERROR = 87
+XML_ERR_ENTITY_PE_INTERNAL = 88
+XML_ERR_ENTITY_LOOP = 89
+XML_ERR_ENTITY_BOUNDARY = 90
+XML_ERR_INVALID_URI = 91
+XML_ERR_URI_FRAGMENT = 92
+XML_WAR_CATALOG_PI = 93
+XML_ERR_NO_DTD = 94
+XML_ERR_CONDSEC_INVALID_KEYWORD = 95
+XML_ERR_VERSION_MISSING = 96
+XML_WAR_UNKNOWN_VERSION = 97
+XML_WAR_LANG_VALUE = 98
+XML_WAR_NS_URI = 99
+XML_WAR_NS_URI_RELATIVE = 100
+XML_ERR_MISSING_ENCODING = 101
+XML_WAR_SPACE_VALUE = 102
+XML_ERR_NOT_STANDALONE = 103
+XML_ERR_ENTITY_PROCESSING = 104
+XML_ERR_NOTATION_PROCESSING = 105
+XML_WAR_NS_COLUMN = 106
+XML_WAR_ENTITY_REDEFINED = 107
+XML_ERR_UNKNOWN_VERSION = 108
+XML_ERR_VERSION_MISMATCH = 109
+XML_ERR_NAME_TOO_LONG = 110
+XML_ERR_USER_STOP = 111
+XML_NS_ERR_XML_NAMESPACE = 200
+XML_NS_ERR_UNDEFINED_NAMESPACE = 201
+XML_NS_ERR_QNAME = 202
+XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
+XML_NS_ERR_EMPTY = 204
+XML_NS_ERR_COLON = 205
+XML_DTD_ATTRIBUTE_DEFAULT = 500
+XML_DTD_ATTRIBUTE_REDEFINED = 501
+XML_DTD_ATTRIBUTE_VALUE = 502
+XML_DTD_CONTENT_ERROR = 503
+XML_DTD_CONTENT_MODEL = 504
+XML_DTD_CONTENT_NOT_DETERMINIST = 505
+XML_DTD_DIFFERENT_PREFIX = 506
+XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
+XML_DTD_ELEM_NAMESPACE = 508
+XML_DTD_ELEM_REDEFINED = 509
+XML_DTD_EMPTY_NOTATION = 510
+XML_DTD_ENTITY_TYPE = 511
+XML_DTD_ID_FIXED = 512
+XML_DTD_ID_REDEFINED = 513
+XML_DTD_ID_SUBSET = 514
+XML_DTD_INVALID_CHILD = 515
+XML_DTD_INVALID_DEFAULT = 516
+XML_DTD_LOAD_ERROR = 517
+XML_DTD_MISSING_ATTRIBUTE = 518
+XML_DTD_MIXED_CORRUPT = 519
+XML_DTD_MULTIPLE_ID = 520
+XML_DTD_NO_DOC = 521
+XML_DTD_NO_DTD = 522
+XML_DTD_NO_ELEM_NAME = 523
+XML_DTD_NO_PREFIX = 524
+XML_DTD_NO_ROOT = 525
+XML_DTD_NOTATION_REDEFINED = 526
+XML_DTD_NOTATION_VALUE = 527
+XML_DTD_NOT_EMPTY = 528
+XML_DTD_NOT_PCDATA = 529
+XML_DTD_NOT_STANDALONE = 530
+XML_DTD_ROOT_NAME = 531
+XML_DTD_STANDALONE_WHITE_SPACE = 532
+XML_DTD_UNKNOWN_ATTRIBUTE = 533
+XML_DTD_UNKNOWN_ELEM = 534
+XML_DTD_UNKNOWN_ENTITY = 535
+XML_DTD_UNKNOWN_ID = 536
+XML_DTD_UNKNOWN_NOTATION = 537
+XML_DTD_STANDALONE_DEFAULTED = 538
+XML_DTD_XMLID_VALUE = 539
+XML_DTD_XMLID_TYPE = 540
+XML_DTD_DUP_TOKEN = 541
+XML_HTML_STRUCURE_ERROR = 800
+XML_HTML_UNKNOWN_TAG = 801
+XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
+XML_RNGP_ATTR_CONFLICT = 1001
+XML_RNGP_ATTRIBUTE_CHILDREN = 1002
+XML_RNGP_ATTRIBUTE_CONTENT = 1003
+XML_RNGP_ATTRIBUTE_EMPTY = 1004
+XML_RNGP_ATTRIBUTE_NOOP = 1005
+XML_RNGP_CHOICE_CONTENT = 1006
+XML_RNGP_CHOICE_EMPTY = 1007
+XML_RNGP_CREATE_FAILURE = 1008
+XML_RNGP_DATA_CONTENT = 1009
+XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
+XML_RNGP_DEFINE_CREATE_FAILED = 1011
+XML_RNGP_DEFINE_EMPTY = 1012
+XML_RNGP_DEFINE_MISSING = 1013
+XML_RNGP_DEFINE_NAME_MISSING = 1014
+XML_RNGP_ELEM_CONTENT_EMPTY = 1015
+XML_RNGP_ELEM_CONTENT_ERROR = 1016
+XML_RNGP_ELEMENT_EMPTY = 1017
+XML_RNGP_ELEMENT_CONTENT = 1018
+XML_RNGP_ELEMENT_NAME = 1019
+XML_RNGP_ELEMENT_NO_CONTENT = 1020
+XML_RNGP_ELEM_TEXT_CONFLICT = 1021
+XML_RNGP_EMPTY = 1022
+XML_RNGP_EMPTY_CONSTRUCT = 1023
+XML_RNGP_EMPTY_CONTENT = 1024
+XML_RNGP_EMPTY_NOT_EMPTY = 1025
+XML_RNGP_ERROR_TYPE_LIB = 1026
+XML_RNGP_EXCEPT_EMPTY = 1027
+XML_RNGP_EXCEPT_MISSING = 1028
+XML_RNGP_EXCEPT_MULTIPLE = 1029
+XML_RNGP_EXCEPT_NO_CONTENT = 1030
+XML_RNGP_EXTERNALREF_EMTPY = 1031
+XML_RNGP_EXTERNAL_REF_FAILURE = 1032
+XML_RNGP_EXTERNALREF_RECURSE = 1033
+XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
+XML_RNGP_FOREIGN_ELEMENT = 1035
+XML_RNGP_GRAMMAR_CONTENT = 1036
+XML_RNGP_GRAMMAR_EMPTY = 1037
+XML_RNGP_GRAMMAR_MISSING = 1038
+XML_RNGP_GRAMMAR_NO_START = 1039
+XML_RNGP_GROUP_ATTR_CONFLICT = 1040
+XML_RNGP_HREF_ERROR = 1041
+XML_RNGP_INCLUDE_EMPTY = 1042
+XML_RNGP_INCLUDE_FAILURE = 1043
+XML_RNGP_INCLUDE_RECURSE = 1044
+XML_RNGP_INTERLEAVE_ADD = 1045
+XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
+XML_RNGP_INTERLEAVE_EMPTY = 1047
+XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
+XML_RNGP_INVALID_DEFINE_NAME = 1049
+XML_RNGP_INVALID_URI = 1050
+XML_RNGP_INVALID_VALUE = 1051
+XML_RNGP_MISSING_HREF = 1052
+XML_RNGP_NAME_MISSING = 1053
+XML_RNGP_NEED_COMBINE = 1054
+XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
+XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
+XML_RNGP_NSNAME_NO_NS = 1057
+XML_RNGP_PARAM_FORBIDDEN = 1058
+XML_RNGP_PARAM_NAME_MISSING = 1059
+XML_RNGP_PARENTREF_CREATE_FAILED = 1060
+XML_RNGP_PARENTREF_NAME_INVALID = 1061
+XML_RNGP_PARENTREF_NO_NAME = 1062
+XML_RNGP_PARENTREF_NO_PARENT = 1063
+XML_RNGP_PARENTREF_NOT_EMPTY = 1064
+XML_RNGP_PARSE_ERROR = 1065
+XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
+XML_RNGP_PAT_ATTR_ATTR = 1067
+XML_RNGP_PAT_ATTR_ELEM = 1068
+XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
+XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
+XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
+XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
+XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
+XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
+XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
+XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
+XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
+XML_RNGP_PAT_LIST_ATTR = 1078
+XML_RNGP_PAT_LIST_ELEM = 1079
+XML_RNGP_PAT_LIST_INTERLEAVE = 1080
+XML_RNGP_PAT_LIST_LIST = 1081
+XML_RNGP_PAT_LIST_REF = 1082
+XML_RNGP_PAT_LIST_TEXT = 1083
+XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
+XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
+XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
+XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
+XML_RNGP_PAT_START_ATTR = 1088
+XML_RNGP_PAT_START_DATA = 1089
+XML_RNGP_PAT_START_EMPTY = 1090
+XML_RNGP_PAT_START_GROUP = 1091
+XML_RNGP_PAT_START_INTERLEAVE = 1092
+XML_RNGP_PAT_START_LIST = 1093
+XML_RNGP_PAT_START_ONEMORE = 1094
+XML_RNGP_PAT_START_TEXT = 1095
+XML_RNGP_PAT_START_VALUE = 1096
+XML_RNGP_PREFIX_UNDEFINED = 1097
+XML_RNGP_REF_CREATE_FAILED = 1098
+XML_RNGP_REF_CYCLE = 1099
+XML_RNGP_REF_NAME_INVALID = 1100
+XML_RNGP_REF_NO_DEF = 1101
+XML_RNGP_REF_NO_NAME = 1102
+XML_RNGP_REF_NOT_EMPTY = 1103
+XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
+XML_RNGP_START_CONTENT = 1105
+XML_RNGP_START_EMPTY = 1106
+XML_RNGP_START_MISSING = 1107
+XML_RNGP_TEXT_EXPECTED = 1108
+XML_RNGP_TEXT_HAS_CHILD = 1109
+XML_RNGP_TYPE_MISSING = 1110
+XML_RNGP_TYPE_NOT_FOUND = 1111
+XML_RNGP_TYPE_VALUE = 1112
+XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
+XML_RNGP_UNKNOWN_COMBINE = 1114
+XML_RNGP_UNKNOWN_CONSTRUCT = 1115
+XML_RNGP_UNKNOWN_TYPE_LIB = 1116
+XML_RNGP_URI_FRAGMENT = 1117
+XML_RNGP_URI_NOT_ABSOLUTE = 1118
+XML_RNGP_VALUE_EMPTY = 1119
+XML_RNGP_VALUE_NO_CONTENT = 1120
+XML_RNGP_XMLNS_NAME = 1121
+XML_RNGP_XML_NS = 1122
+XML_XPATH_EXPRESSION_OK = 1200
+XML_XPATH_NUMBER_ERROR = 1201
+XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
+XML_XPATH_START_LITERAL_ERROR = 1203
+XML_XPATH_VARIABLE_REF_ERROR = 1204
+XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
+XML_XPATH_INVALID_PREDICATE_ERROR = 1206
+XML_XPATH_EXPR_ERROR = 1207
+XML_XPATH_UNCLOSED_ERROR = 1208
+XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
+XML_XPATH_INVALID_OPERAND = 1210
+XML_XPATH_INVALID_TYPE = 1211
+XML_XPATH_INVALID_ARITY = 1212
+XML_XPATH_INVALID_CTXT_SIZE = 1213
+XML_XPATH_INVALID_CTXT_POSITION = 1214
+XML_XPATH_MEMORY_ERROR = 1215
+XML_XPTR_SYNTAX_ERROR = 1216
+XML_XPTR_RESOURCE_ERROR = 1217
+XML_XPTR_SUB_RESOURCE_ERROR = 1218
+XML_XPATH_UNDEF_PREFIX_ERROR = 1219
+XML_XPATH_ENCODING_ERROR = 1220
+XML_XPATH_INVALID_CHAR_ERROR = 1221
+XML_TREE_INVALID_HEX = 1300
+XML_TREE_INVALID_DEC = 1301
+XML_TREE_UNTERMINATED_ENTITY = 1302
+XML_TREE_NOT_UTF8 = 1303
+XML_SAVE_NOT_UTF8 = 1400
+XML_SAVE_CHAR_INVALID = 1401
+XML_SAVE_NO_DOCTYPE = 1402
+XML_SAVE_UNKNOWN_ENCODING = 1403
+XML_REGEXP_COMPILE_ERROR = 1450
+XML_IO_UNKNOWN = 1500
+XML_IO_EACCES = 1501
+XML_IO_EAGAIN = 1502
+XML_IO_EBADF = 1503
+XML_IO_EBADMSG = 1504
+XML_IO_EBUSY = 1505
+XML_IO_ECANCELED = 1506
+XML_IO_ECHILD = 1507
+XML_IO_EDEADLK = 1508
+XML_IO_EDOM = 1509
+XML_IO_EEXIST = 1510
+XML_IO_EFAULT = 1511
+XML_IO_EFBIG = 1512
+XML_IO_EINPROGRESS = 1513
+XML_IO_EINTR = 1514
+XML_IO_EINVAL = 1515
+XML_IO_EIO = 1516
+XML_IO_EISDIR = 1517
+XML_IO_EMFILE = 1518
+XML_IO_EMLINK = 1519
+XML_IO_EMSGSIZE = 1520
+XML_IO_ENAMETOOLONG = 1521
+XML_IO_ENFILE = 1522
+XML_IO_ENODEV = 1523
+XML_IO_ENOENT = 1524
+XML_IO_ENOEXEC = 1525
+XML_IO_ENOLCK = 1526
+XML_IO_ENOMEM = 1527
+XML_IO_ENOSPC = 1528
+XML_IO_ENOSYS = 1529
+XML_IO_ENOTDIR = 1530
+XML_IO_ENOTEMPTY = 1531
+XML_IO_ENOTSUP = 1532
+XML_IO_ENOTTY = 1533
+XML_IO_ENXIO = 1534
+XML_IO_EPERM = 1535
+XML_IO_EPIPE = 1536
+XML_IO_ERANGE = 1537
+XML_IO_EROFS = 1538
+XML_IO_ESPIPE = 1539
+XML_IO_ESRCH = 1540
+XML_IO_ETIMEDOUT = 1541
+XML_IO_EXDEV = 1542
+XML_IO_NETWORK_ATTEMPT = 1543
+XML_IO_ENCODER = 1544
+XML_IO_FLUSH = 1545
+XML_IO_WRITE = 1546
+XML_IO_NO_INPUT = 1547
+XML_IO_BUFFER_FULL = 1548
+XML_IO_LOAD_ERROR = 1549
+XML_IO_ENOTSOCK = 1550
+XML_IO_EISCONN = 1551
+XML_IO_ECONNREFUSED = 1552
+XML_IO_ENETUNREACH = 1553
+XML_IO_EADDRINUSE = 1554
+XML_IO_EALREADY = 1555
+XML_IO_EAFNOSUPPORT = 1556
+XML_XINCLUDE_RECURSION = 1600
+XML_XINCLUDE_PARSE_VALUE = 1601
+XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
+XML_XINCLUDE_NO_HREF = 1603
+XML_XINCLUDE_NO_FALLBACK = 1604
+XML_XINCLUDE_HREF_URI = 1605
+XML_XINCLUDE_TEXT_FRAGMENT = 1606
+XML_XINCLUDE_TEXT_DOCUMENT = 1607
+XML_XINCLUDE_INVALID_CHAR = 1608
+XML_XINCLUDE_BUILD_FAILED = 1609
+XML_XINCLUDE_UNKNOWN_ENCODING = 1610
+XML_XINCLUDE_MULTIPLE_ROOT = 1611
+XML_XINCLUDE_XPTR_FAILED = 1612
+XML_XINCLUDE_XPTR_RESULT = 1613
+XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
+XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
+XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
+XML_XINCLUDE_DEPRECATED_NS = 1617
+XML_XINCLUDE_FRAGMENT_ID = 1618
+XML_CATALOG_MISSING_ATTR = 1650
+XML_CATALOG_ENTRY_BROKEN = 1651
+XML_CATALOG_PREFER_VALUE = 1652
+XML_CATALOG_NOT_CATALOG = 1653
+XML_CATALOG_RECURSION = 1654
+XML_SCHEMAP_PREFIX_UNDEFINED = 1700
+XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
+XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
+XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
+XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
+XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
+XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
+XML_SCHEMAP_EXTENSION_NO_BASE = 1707
+XML_SCHEMAP_FACET_NO_VALUE = 1708
+XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
+XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
+XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
+XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
+XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
+XML_SCHEMAP_INVALID_BOOLEAN = 1714
+XML_SCHEMAP_INVALID_ENUM = 1715
+XML_SCHEMAP_INVALID_FACET = 1716
+XML_SCHEMAP_INVALID_FACET_VALUE = 1717
+XML_SCHEMAP_INVALID_MAXOCCURS = 1718
+XML_SCHEMAP_INVALID_MINOCCURS = 1719
+XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
+XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
+XML_SCHEMAP_NOATTR_NOREF = 1722
+XML_SCHEMAP_NOTATION_NO_NAME = 1723
+XML_SCHEMAP_NOTYPE_NOREF = 1724
+XML_SCHEMAP_REF_AND_SUBTYPE = 1725
+XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
+XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
+XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
+XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
+XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
+XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
+XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
+XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
+XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
+XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
+XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
+XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
+XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
+XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
+XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
+XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
+XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
+XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
+XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
+XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
+XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
+XML_SCHEMAP_UNKNOWN_REF = 1747
+XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
+XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
+XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
+XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
+XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
+XML_SCHEMAP_UNKNOWN_TYPE = 1753
+XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
+XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
+XML_SCHEMAP_REGEXP_INVALID = 1756
+XML_SCHEMAP_FAILED_LOAD = 1757
+XML_SCHEMAP_NOTHING_TO_PARSE = 1758
+XML_SCHEMAP_NOROOT = 1759
+XML_SCHEMAP_REDEFINED_GROUP = 1760
+XML_SCHEMAP_REDEFINED_TYPE = 1761
+XML_SCHEMAP_REDEFINED_ELEMENT = 1762
+XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
+XML_SCHEMAP_REDEFINED_ATTR = 1764
+XML_SCHEMAP_REDEFINED_NOTATION = 1765
+XML_SCHEMAP_FAILED_PARSE = 1766
+XML_SCHEMAP_UNKNOWN_PREFIX = 1767
+XML_SCHEMAP_DEF_AND_PREFIX = 1768
+XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
+XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
+XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
+XML_SCHEMAP_NOT_SCHEMA = 1772
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
+XML_SCHEMAP_INVALID_ATTR_USE = 1774
+XML_SCHEMAP_RECURSIVE = 1775
+XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
+XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
+XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
+XML_SCHEMAP_INVALID_ATTR_NAME = 1780
+XML_SCHEMAP_REF_AND_CONTENT = 1781
+XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
+XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
+XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
+XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
+XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
+XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
+XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
+XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
+XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
+XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
+XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
+XML_SCHEMAV_NOROOT = 1801
+XML_SCHEMAV_UNDECLAREDELEM = 1802
+XML_SCHEMAV_NOTTOPLEVEL = 1803
+XML_SCHEMAV_MISSING = 1804
+XML_SCHEMAV_WRONGELEM = 1805
+XML_SCHEMAV_NOTYPE = 1806
+XML_SCHEMAV_NOROLLBACK = 1807
+XML_SCHEMAV_ISABSTRACT = 1808
+XML_SCHEMAV_NOTEMPTY = 1809
+XML_SCHEMAV_ELEMCONT = 1810
+XML_SCHEMAV_HAVEDEFAULT = 1811
+XML_SCHEMAV_NOTNILLABLE = 1812
+XML_SCHEMAV_EXTRACONTENT = 1813
+XML_SCHEMAV_INVALIDATTR = 1814
+XML_SCHEMAV_INVALIDELEM = 1815
+XML_SCHEMAV_NOTDETERMINIST = 1816
+XML_SCHEMAV_CONSTRUCT = 1817
+XML_SCHEMAV_INTERNAL = 1818
+XML_SCHEMAV_NOTSIMPLE = 1819
+XML_SCHEMAV_ATTRUNKNOWN = 1820
+XML_SCHEMAV_ATTRINVALID = 1821
+XML_SCHEMAV_VALUE = 1822
+XML_SCHEMAV_FACET = 1823
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
+XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
+XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
+XML_SCHEMAV_CVC_FACET_VALID = 1829
+XML_SCHEMAV_CVC_LENGTH_VALID = 1830
+XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
+XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
+XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
+XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
+XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
+XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
+XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
+XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
+XML_SCHEMAV_CVC_PATTERN_VALID = 1839
+XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
+XML_SCHEMAV_CVC_ELT_1 = 1845
+XML_SCHEMAV_CVC_ELT_2 = 1846
+XML_SCHEMAV_CVC_ELT_3_1 = 1847
+XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
+XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
+XML_SCHEMAV_CVC_ELT_4_1 = 1850
+XML_SCHEMAV_CVC_ELT_4_2 = 1851
+XML_SCHEMAV_CVC_ELT_4_3 = 1852
+XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
+XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
+XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
+XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
+XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
+XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
+XML_SCHEMAV_CVC_ELT_6 = 1859
+XML_SCHEMAV_CVC_ELT_7 = 1860
+XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
+XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
+XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
+XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
+XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
+XML_SCHEMAV_ELEMENT_CONTENT = 1871
+XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
+XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
+XML_SCHEMAV_CVC_AU = 1874
+XML_SCHEMAV_CVC_TYPE_1 = 1875
+XML_SCHEMAV_CVC_TYPE_2 = 1876
+XML_SCHEMAV_CVC_IDC = 1877
+XML_SCHEMAV_CVC_WILDCARD = 1878
+XML_SCHEMAV_MISC = 1879
+XML_XPTR_UNKNOWN_SCHEME = 1900
+XML_XPTR_CHILDSEQ_START = 1901
+XML_XPTR_EVAL_FAILED = 1902
+XML_XPTR_EXTRA_OBJECTS = 1903
+XML_C14N_CREATE_CTXT = 1950
+XML_C14N_REQUIRES_UTF8 = 1951
+XML_C14N_CREATE_STACK = 1952
+XML_C14N_INVALID_NODE = 1953
+XML_C14N_UNKNOW_NODE = 1954
+XML_C14N_RELATIVE_NAMESPACE = 1955
+XML_FTP_PASV_ANSWER = 2000
+XML_FTP_EPSV_ANSWER = 2001
+XML_FTP_ACCNT = 2002
+XML_FTP_URL_SYNTAX = 2003
+XML_HTTP_URL_SYNTAX = 2020
+XML_HTTP_USE_IP = 2021
+XML_HTTP_UNKNOWN_HOST = 2022
+XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
+XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
+XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
+XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
+XML_SCHEMAP_SRC_RESOLVE = 3004
+XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
+XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
+XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
+XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
+XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
+XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
+XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
+XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
+XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
+XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
+XML_SCHEMAP_S4S_ELEM_MISSING = 3034
+XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
+XML_SCHEMAP_S4S_ATTR_MISSING = 3036
+XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
+XML_SCHEMAP_SRC_ELEMENT_1 = 3038
+XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
+XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
+XML_SCHEMAP_SRC_ELEMENT_3 = 3041
+XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
+XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
+XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
+XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
+XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
+XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
+XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
+XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
+XML_SCHEMAP_SRC_INCLUDE = 3050
+XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
+XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
+XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
+XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
+XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
+XML_SCHEMAP_NO_XMLNS = 3056
+XML_SCHEMAP_NO_XSI = 3057
+XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
+XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
+XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
+XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
+XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
+XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
+XML_SCHEMAP_SRC_IMPORT_2 = 3066
+XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
+XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
+XML_SCHEMAP_INTERNAL = 3069
+XML_SCHEMAP_NOT_DETERMINISTIC = 3070
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
+XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
+XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
+XML_SCHEMAP_SRC_CT_1 = 3076
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
+XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
+XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
+XML_SCHEMAP_C_PROPS_CORRECT = 3080
+XML_SCHEMAP_SRC_REDEFINE = 3081
+XML_SCHEMAP_SRC_IMPORT = 3082
+XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
+XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
+XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
+XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
+XML_SCHEMAP_AG_PROPS_CORRECT = 3087
+XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
+XML_SCHEMAP_AU_PROPS_CORRECT = 3089
+XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
+XML_SCHEMAP_COS_ALL_LIMITED = 3091
+XML_SCHEMATRONV_ASSERT = 4000
+XML_SCHEMATRONV_REPORT = 4001
+XML_MODULE_OPEN = 4900
+XML_MODULE_CLOSE = 4901
+XML_CHECK_FOUND_ELEMENT = 5000
+XML_CHECK_FOUND_ATTRIBUTE = 5001
+XML_CHECK_FOUND_TEXT = 5002
+XML_CHECK_FOUND_CDATA = 5003
+XML_CHECK_FOUND_ENTITYREF = 5004
+XML_CHECK_FOUND_ENTITY = 5005
+XML_CHECK_FOUND_PI = 5006
+XML_CHECK_FOUND_COMMENT = 5007
+XML_CHECK_FOUND_DOCTYPE = 5008
+XML_CHECK_FOUND_FRAGMENT = 5009
+XML_CHECK_FOUND_NOTATION = 5010
+XML_CHECK_UNKNOWN_NODE = 5011
+XML_CHECK_ENTITY_TYPE = 5012
+XML_CHECK_NO_PARENT = 5013
+XML_CHECK_NO_DOC = 5014
+XML_CHECK_NO_NAME = 5015
+XML_CHECK_NO_ELEM = 5016
+XML_CHECK_WRONG_DOC = 5017
+XML_CHECK_NO_PREV = 5018
+XML_CHECK_WRONG_PREV = 5019
+XML_CHECK_NO_NEXT = 5020
+XML_CHECK_WRONG_NEXT = 5021
+XML_CHECK_NOT_DTD = 5022
+XML_CHECK_NOT_ATTR = 5023
+XML_CHECK_NOT_ATTR_DECL = 5024
+XML_CHECK_NOT_ELEM_DECL = 5025
+XML_CHECK_NOT_ENTITY_DECL = 5026
+XML_CHECK_NOT_NS_DECL = 5027
+XML_CHECK_NO_HREF = 5028
+XML_CHECK_WRONG_PARENT = 5029
+XML_CHECK_NS_SCOPE = 5030
+XML_CHECK_NS_ANCESTOR = 5031
+XML_CHECK_NOT_UTF8 = 5032
+XML_CHECK_NO_DICT = 5033
+XML_CHECK_NOT_NCNAME = 5034
+XML_CHECK_OUTSIDE_DICT = 5035
+XML_CHECK_WRONG_NAME = 5036
+XML_CHECK_NAME_NOT_NULL = 5037
+XML_I18N_NO_NAME = 6000
+XML_I18N_NO_HANDLER = 6001
+XML_I18N_EXCESS_HANDLER = 6002
+XML_I18N_CONV_FAILED = 6003
+XML_I18N_NO_OUTPUT = 6004
+XML_BUF_OVERFLOW = 7000
+
+# xmlExpNodeType
+XML_EXP_EMPTY = 0
+XML_EXP_FORBID = 1
+XML_EXP_ATOM = 2
+XML_EXP_SEQ = 3
+XML_EXP_OR = 4
+XML_EXP_COUNT = 5
+
+# xmlElementContentType
+XML_ELEMENT_CONTENT_PCDATA = 1
+XML_ELEMENT_CONTENT_ELEMENT = 2
+XML_ELEMENT_CONTENT_SEQ = 3
+XML_ELEMENT_CONTENT_OR = 4
+
+# xmlParserProperties
+XML_PARSER_LOADDTD = 1
+XML_PARSER_DEFAULTATTRS = 2
+XML_PARSER_VALIDATE = 3
+XML_PARSER_SUBST_ENTITIES = 4
+
+# xmlReaderTypes
+XML_READER_TYPE_NONE = 0
+XML_READER_TYPE_ELEMENT = 1
+XML_READER_TYPE_ATTRIBUTE = 2
+XML_READER_TYPE_TEXT = 3
+XML_READER_TYPE_CDATA = 4
+XML_READER_TYPE_ENTITY_REFERENCE = 5
+XML_READER_TYPE_ENTITY = 6
+XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
+XML_READER_TYPE_COMMENT = 8
+XML_READER_TYPE_DOCUMENT = 9
+XML_READER_TYPE_DOCUMENT_TYPE = 10
+XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
+XML_READER_TYPE_NOTATION = 12
+XML_READER_TYPE_WHITESPACE = 13
+XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
+XML_READER_TYPE_END_ELEMENT = 15
+XML_READER_TYPE_END_ENTITY = 16
+XML_READER_TYPE_XML_DECLARATION = 17
+
+# xmlCatalogPrefer
+XML_CATA_PREFER_NONE = 0
+XML_CATA_PREFER_PUBLIC = 1
+XML_CATA_PREFER_SYSTEM = 2
+
+# xmlElementType
+XML_ELEMENT_NODE = 1
+XML_ATTRIBUTE_NODE = 2
+XML_TEXT_NODE = 3
+XML_CDATA_SECTION_NODE = 4
+XML_ENTITY_REF_NODE = 5
+XML_ENTITY_NODE = 6
+XML_PI_NODE = 7
+XML_COMMENT_NODE = 8
+XML_DOCUMENT_NODE = 9
+XML_DOCUMENT_TYPE_NODE = 10
+XML_DOCUMENT_FRAG_NODE = 11
+XML_NOTATION_NODE = 12
+XML_HTML_DOCUMENT_NODE = 13
+XML_DTD_NODE = 14
+XML_ELEMENT_DECL = 15
+XML_ATTRIBUTE_DECL = 16
+XML_ENTITY_DECL = 17
+XML_NAMESPACE_DECL = 18
+XML_XINCLUDE_START = 19
+XML_XINCLUDE_END = 20
+XML_DOCB_DOCUMENT_NODE = 21
+
+# xlinkActuate
+XLINK_ACTUATE_NONE = 0
+XLINK_ACTUATE_AUTO = 1
+XLINK_ACTUATE_ONREQUEST = 2
+
+# xmlFeature
+XML_WITH_THREAD = 1
+XML_WITH_TREE = 2
+XML_WITH_OUTPUT = 3
+XML_WITH_PUSH = 4
+XML_WITH_READER = 5
+XML_WITH_PATTERN = 6
+XML_WITH_WRITER = 7
+XML_WITH_SAX1 = 8
+XML_WITH_FTP = 9
+XML_WITH_HTTP = 10
+XML_WITH_VALID = 11
+XML_WITH_HTML = 12
+XML_WITH_LEGACY = 13
+XML_WITH_C14N = 14
+XML_WITH_CATALOG = 15
+XML_WITH_XPATH = 16
+XML_WITH_XPTR = 17
+XML_WITH_XINCLUDE = 18
+XML_WITH_ICONV = 19
+XML_WITH_ISO8859X = 20
+XML_WITH_UNICODE = 21
+XML_WITH_REGEXP = 22
+XML_WITH_AUTOMATA = 23
+XML_WITH_EXPR = 24
+XML_WITH_SCHEMAS = 25
+XML_WITH_SCHEMATRON = 26
+XML_WITH_MODULES = 27
+XML_WITH_DEBUG = 28
+XML_WITH_DEBUG_MEM = 29
+XML_WITH_DEBUG_RUN = 30
+XML_WITH_ZLIB = 31
+XML_WITH_ICU = 32
+XML_WITH_LZMA = 33
+XML_WITH_NONE = 99999
+
+# xmlElementContentOccur
+XML_ELEMENT_CONTENT_ONCE = 1
+XML_ELEMENT_CONTENT_OPT = 2
+XML_ELEMENT_CONTENT_MULT = 3
+XML_ELEMENT_CONTENT_PLUS = 4
+
+# xmlXPathError
+XPATH_EXPRESSION_OK = 0
+XPATH_NUMBER_ERROR = 1
+XPATH_UNFINISHED_LITERAL_ERROR = 2
+XPATH_START_LITERAL_ERROR = 3
+XPATH_VARIABLE_REF_ERROR = 4
+XPATH_UNDEF_VARIABLE_ERROR = 5
+XPATH_INVALID_PREDICATE_ERROR = 6
+XPATH_EXPR_ERROR = 7
+XPATH_UNCLOSED_ERROR = 8
+XPATH_UNKNOWN_FUNC_ERROR = 9
+XPATH_INVALID_OPERAND = 10
+XPATH_INVALID_TYPE = 11
+XPATH_INVALID_ARITY = 12
+XPATH_INVALID_CTXT_SIZE = 13
+XPATH_INVALID_CTXT_POSITION = 14
+XPATH_MEMORY_ERROR = 15
+XPTR_SYNTAX_ERROR = 16
+XPTR_RESOURCE_ERROR = 17
+XPTR_SUB_RESOURCE_ERROR = 18
+XPATH_UNDEF_PREFIX_ERROR = 19
+XPATH_ENCODING_ERROR = 20
+XPATH_INVALID_CHAR_ERROR = 21
+XPATH_INVALID_CTXT = 22
+XPATH_STACK_ERROR = 23
+XPATH_FORBID_VARIABLE_ERROR = 24
+
+# xmlTextReaderMode
+XML_TEXTREADER_MODE_INITIAL = 0
+XML_TEXTREADER_MODE_INTERACTIVE = 1
+XML_TEXTREADER_MODE_ERROR = 2
+XML_TEXTREADER_MODE_EOF = 3
+XML_TEXTREADER_MODE_CLOSED = 4
+XML_TEXTREADER_MODE_READING = 5
+
+# xmlErrorLevel
+XML_ERR_NONE = 0
+XML_ERR_WARNING = 1
+XML_ERR_ERROR = 2
+XML_ERR_FATAL = 3
+
+# xmlCharEncoding
+XML_CHAR_ENCODING_ERROR = -1
+XML_CHAR_ENCODING_NONE = 0
+XML_CHAR_ENCODING_UTF8 = 1
+XML_CHAR_ENCODING_UTF16LE = 2
+XML_CHAR_ENCODING_UTF16BE = 3
+XML_CHAR_ENCODING_UCS4LE = 4
+XML_CHAR_ENCODING_UCS4BE = 5
+XML_CHAR_ENCODING_EBCDIC = 6
+XML_CHAR_ENCODING_UCS4_2143 = 7
+XML_CHAR_ENCODING_UCS4_3412 = 8
+XML_CHAR_ENCODING_UCS2 = 9
+XML_CHAR_ENCODING_8859_1 = 10
+XML_CHAR_ENCODING_8859_2 = 11
+XML_CHAR_ENCODING_8859_3 = 12
+XML_CHAR_ENCODING_8859_4 = 13
+XML_CHAR_ENCODING_8859_5 = 14
+XML_CHAR_ENCODING_8859_6 = 15
+XML_CHAR_ENCODING_8859_7 = 16
+XML_CHAR_ENCODING_8859_8 = 17
+XML_CHAR_ENCODING_8859_9 = 18
+XML_CHAR_ENCODING_2022_JP = 19
+XML_CHAR_ENCODING_SHIFT_JIS = 20
+XML_CHAR_ENCODING_EUC_JP = 21
+XML_CHAR_ENCODING_ASCII = 22
+
+# xmlErrorDomain
+XML_FROM_NONE = 0
+XML_FROM_PARSER = 1
+XML_FROM_TREE = 2
+XML_FROM_NAMESPACE = 3
+XML_FROM_DTD = 4
+XML_FROM_HTML = 5
+XML_FROM_MEMORY = 6
+XML_FROM_OUTPUT = 7
+XML_FROM_IO = 8
+XML_FROM_FTP = 9
+XML_FROM_HTTP = 10
+XML_FROM_XINCLUDE = 11
+XML_FROM_XPATH = 12
+XML_FROM_XPOINTER = 13
+XML_FROM_REGEXP = 14
+XML_FROM_DATATYPE = 15
+XML_FROM_SCHEMASP = 16
+XML_FROM_SCHEMASV = 17
+XML_FROM_RELAXNGP = 18
+XML_FROM_RELAXNGV = 19
+XML_FROM_CATALOG = 20
+XML_FROM_C14N = 21
+XML_FROM_XSLT = 22
+XML_FROM_VALID = 23
+XML_FROM_CHECK = 24
+XML_FROM_WRITER = 25
+XML_FROM_MODULE = 26
+XML_FROM_I18N = 27
+XML_FROM_SCHEMATRONV = 28
+XML_FROM_BUFFER = 29
+XML_FROM_URI = 30
+
+# htmlStatus
+HTML_NA = 0
+HTML_INVALID = 1
+HTML_DEPRECATED = 2
+HTML_VALID = 4
+HTML_REQUIRED = 12
+
+# xmlSchemaValidOption
+XML_SCHEMA_VAL_VC_I_CREATE = 1
+
+# xmlSchemaWhitespaceValueType
+XML_SCHEMA_WHITESPACE_UNKNOWN = 0
+XML_SCHEMA_WHITESPACE_PRESERVE = 1
+XML_SCHEMA_WHITESPACE_REPLACE = 2
+XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+
+# htmlParserOption
+HTML_PARSE_RECOVER = 1
+HTML_PARSE_NODEFDTD = 4
+HTML_PARSE_NOERROR = 32
+HTML_PARSE_NOWARNING = 64
+HTML_PARSE_PEDANTIC = 128
+HTML_PARSE_NOBLANKS = 256
+HTML_PARSE_NONET = 2048
+HTML_PARSE_NOIMPLIED = 8192
+HTML_PARSE_COMPACT = 65536
+HTML_PARSE_IGNORE_ENC = 2097152
+
+# xmlRelaxNGValidErr
+XML_RELAXNG_OK = 0
+XML_RELAXNG_ERR_MEMORY = 1
+XML_RELAXNG_ERR_TYPE = 2
+XML_RELAXNG_ERR_TYPEVAL = 3
+XML_RELAXNG_ERR_DUPID = 4
+XML_RELAXNG_ERR_TYPECMP = 5
+XML_RELAXNG_ERR_NOSTATE = 6
+XML_RELAXNG_ERR_NODEFINE = 7
+XML_RELAXNG_ERR_LISTEXTRA = 8
+XML_RELAXNG_ERR_LISTEMPTY = 9
+XML_RELAXNG_ERR_INTERNODATA = 10
+XML_RELAXNG_ERR_INTERSEQ = 11
+XML_RELAXNG_ERR_INTEREXTRA = 12
+XML_RELAXNG_ERR_ELEMNAME = 13
+XML_RELAXNG_ERR_ATTRNAME = 14
+XML_RELAXNG_ERR_ELEMNONS = 15
+XML_RELAXNG_ERR_ATTRNONS = 16
+XML_RELAXNG_ERR_ELEMWRONGNS = 17
+XML_RELAXNG_ERR_ATTRWRONGNS = 18
+XML_RELAXNG_ERR_ELEMEXTRANS = 19
+XML_RELAXNG_ERR_ATTREXTRANS = 20
+XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
+XML_RELAXNG_ERR_NOELEM = 22
+XML_RELAXNG_ERR_NOTELEM = 23
+XML_RELAXNG_ERR_ATTRVALID = 24
+XML_RELAXNG_ERR_CONTENTVALID = 25
+XML_RELAXNG_ERR_EXTRACONTENT = 26
+XML_RELAXNG_ERR_INVALIDATTR = 27
+XML_RELAXNG_ERR_DATAELEM = 28
+XML_RELAXNG_ERR_VALELEM = 29
+XML_RELAXNG_ERR_LISTELEM = 30
+XML_RELAXNG_ERR_DATATYPE = 31
+XML_RELAXNG_ERR_VALUE = 32
+XML_RELAXNG_ERR_LIST = 33
+XML_RELAXNG_ERR_NOGRAMMAR = 34
+XML_RELAXNG_ERR_EXTRADATA = 35
+XML_RELAXNG_ERR_LACKDATA = 36
+XML_RELAXNG_ERR_INTERNAL = 37
+XML_RELAXNG_ERR_ELEMWRONG = 38
+XML_RELAXNG_ERR_TEXTWRONG = 39
+
+# xmlCatalogAllow
+XML_CATA_ALLOW_NONE = 0
+XML_CATA_ALLOW_GLOBAL = 1
+XML_CATA_ALLOW_DOCUMENT = 2
+XML_CATA_ALLOW_ALL = 3
+
+# xmlAttributeType
+XML_ATTRIBUTE_CDATA = 1
+XML_ATTRIBUTE_ID = 2
+XML_ATTRIBUTE_IDREF = 3
+XML_ATTRIBUTE_IDREFS = 4
+XML_ATTRIBUTE_ENTITY = 5
+XML_ATTRIBUTE_ENTITIES = 6
+XML_ATTRIBUTE_NMTOKEN = 7
+XML_ATTRIBUTE_NMTOKENS = 8
+XML_ATTRIBUTE_ENUMERATION = 9
+XML_ATTRIBUTE_NOTATION = 10
+
+# xmlSchematronValidOptions
+XML_SCHEMATRON_OUT_QUIET = 1
+XML_SCHEMATRON_OUT_TEXT = 2
+XML_SCHEMATRON_OUT_XML = 4
+XML_SCHEMATRON_OUT_ERROR = 8
+XML_SCHEMATRON_OUT_FILE = 256
+XML_SCHEMATRON_OUT_BUFFER = 512
+XML_SCHEMATRON_OUT_IO = 1024
+
+# xmlSchemaContentType
+XML_SCHEMA_CONTENT_UNKNOWN = 0
+XML_SCHEMA_CONTENT_EMPTY = 1
+XML_SCHEMA_CONTENT_ELEMENTS = 2
+XML_SCHEMA_CONTENT_MIXED = 3
+XML_SCHEMA_CONTENT_SIMPLE = 4
+XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5
+XML_SCHEMA_CONTENT_BASIC = 6
+XML_SCHEMA_CONTENT_ANY = 7
+
+# xmlSchemaTypeType
+XML_SCHEMA_TYPE_BASIC = 1
+XML_SCHEMA_TYPE_ANY = 2
+XML_SCHEMA_TYPE_FACET = 3
+XML_SCHEMA_TYPE_SIMPLE = 4
+XML_SCHEMA_TYPE_COMPLEX = 5
+XML_SCHEMA_TYPE_SEQUENCE = 6
+XML_SCHEMA_TYPE_CHOICE = 7
+XML_SCHEMA_TYPE_ALL = 8
+XML_SCHEMA_TYPE_SIMPLE_CONTENT = 9
+XML_SCHEMA_TYPE_COMPLEX_CONTENT = 10
+XML_SCHEMA_TYPE_UR = 11
+XML_SCHEMA_TYPE_RESTRICTION = 12
+XML_SCHEMA_TYPE_EXTENSION = 13
+XML_SCHEMA_TYPE_ELEMENT = 14
+XML_SCHEMA_TYPE_ATTRIBUTE = 15
+XML_SCHEMA_TYPE_ATTRIBUTEGROUP = 16
+XML_SCHEMA_TYPE_GROUP = 17
+XML_SCHEMA_TYPE_NOTATION = 18
+XML_SCHEMA_TYPE_LIST = 19
+XML_SCHEMA_TYPE_UNION = 20
+XML_SCHEMA_TYPE_ANY_ATTRIBUTE = 21
+XML_SCHEMA_TYPE_IDC_UNIQUE = 22
+XML_SCHEMA_TYPE_IDC_KEY = 23
+XML_SCHEMA_TYPE_IDC_KEYREF = 24
+XML_SCHEMA_TYPE_PARTICLE = 25
+XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
+XML_SCHEMA_FACET_MININCLUSIVE = 1000
+XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
+XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
+XML_SCHEMA_FACET_MAXEXCLUSIVE = 1003
+XML_SCHEMA_FACET_TOTALDIGITS = 1004
+XML_SCHEMA_FACET_FRACTIONDIGITS = 1005
+XML_SCHEMA_FACET_PATTERN = 1006
+XML_SCHEMA_FACET_ENUMERATION = 1007
+XML_SCHEMA_FACET_WHITESPACE = 1008
+XML_SCHEMA_FACET_LENGTH = 1009
+XML_SCHEMA_FACET_MAXLENGTH = 1010
+XML_SCHEMA_FACET_MINLENGTH = 1011
+XML_SCHEMA_EXTRA_QNAMEREF = 2000
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
+
+# xmlModuleOption
+XML_MODULE_LAZY = 1
+XML_MODULE_LOCAL = 2
+
+# xmlParserMode
+XML_PARSE_UNKNOWN = 0
+XML_PARSE_DOM = 1
+XML_PARSE_SAX = 2
+XML_PARSE_PUSH_DOM = 3
+XML_PARSE_PUSH_SAX = 4
+XML_PARSE_READER = 5
+
+# xmlC14NMode
+XML_C14N_1_0 = 0
+XML_C14N_EXCLUSIVE_1_0 = 1
+XML_C14N_1_1 = 2
+
+# xmlParserOption
+XML_PARSE_RECOVER = 1
+XML_PARSE_NOENT = 2
+XML_PARSE_DTDLOAD = 4
+XML_PARSE_DTDATTR = 8
+XML_PARSE_DTDVALID = 16
+XML_PARSE_NOERROR = 32
+XML_PARSE_NOWARNING = 64
+XML_PARSE_PEDANTIC = 128
+XML_PARSE_NOBLANKS = 256
+XML_PARSE_SAX1 = 512
+XML_PARSE_XINCLUDE = 1024
+XML_PARSE_NONET = 2048
+XML_PARSE_NODICT = 4096
+XML_PARSE_NSCLEAN = 8192
+XML_PARSE_NOCDATA = 16384
+XML_PARSE_NOXINCNODE = 32768
+XML_PARSE_COMPACT = 65536
+XML_PARSE_OLD10 = 131072
+XML_PARSE_NOBASEFIX = 262144
+XML_PARSE_HUGE = 524288
+XML_PARSE_OLDSAX = 1048576
+XML_PARSE_IGNORE_ENC = 2097152
+XML_PARSE_BIG_LINES = 4194304
+
+# xmlElementTypeVal
+XML_ELEMENT_TYPE_UNDEFINED = 0
+XML_ELEMENT_TYPE_EMPTY = 1
+XML_ELEMENT_TYPE_ANY = 2
+XML_ELEMENT_TYPE_MIXED = 3
+XML_ELEMENT_TYPE_ELEMENT = 4
+
+# xmlDocProperties
+XML_DOC_WELLFORMED = 1
+XML_DOC_NSVALID = 2
+XML_DOC_OLD10 = 4
+XML_DOC_DTDVALID = 8
+XML_DOC_XINCLUDE = 16
+XML_DOC_USERBUILT = 32
+XML_DOC_INTERNAL = 64
+XML_DOC_HTML = 128
+
+# xlinkType
+XLINK_TYPE_NONE = 0
+XLINK_TYPE_SIMPLE = 1
+XLINK_TYPE_EXTENDED = 2
+XLINK_TYPE_EXTENDED_SET = 3
+
+# xmlXPathObjectType
+XPATH_UNDEFINED = 0
+XPATH_NODESET = 1
+XPATH_BOOLEAN = 2
+XPATH_NUMBER = 3
+XPATH_STRING = 4
+XPATH_POINT = 5
+XPATH_RANGE = 6
+XPATH_LOCATIONSET = 7
+XPATH_USERS = 8
+XPATH_XSLT_TREE = 9
+
+# xmlSchemaValidError
+XML_SCHEMAS_ERR_OK = 0
+XML_SCHEMAS_ERR_NOROOT = 1
+XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
+XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
+XML_SCHEMAS_ERR_MISSING = 4
+XML_SCHEMAS_ERR_WRONGELEM = 5
+XML_SCHEMAS_ERR_NOTYPE = 6
+XML_SCHEMAS_ERR_NOROLLBACK = 7
+XML_SCHEMAS_ERR_ISABSTRACT = 8
+XML_SCHEMAS_ERR_NOTEMPTY = 9
+XML_SCHEMAS_ERR_ELEMCONT = 10
+XML_SCHEMAS_ERR_HAVEDEFAULT = 11
+XML_SCHEMAS_ERR_NOTNILLABLE = 12
+XML_SCHEMAS_ERR_EXTRACONTENT = 13
+XML_SCHEMAS_ERR_INVALIDATTR = 14
+XML_SCHEMAS_ERR_INVALIDELEM = 15
+XML_SCHEMAS_ERR_NOTDETERMINIST = 16
+XML_SCHEMAS_ERR_CONSTRUCT = 17
+XML_SCHEMAS_ERR_INTERNAL = 18
+XML_SCHEMAS_ERR_NOTSIMPLE = 19
+XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
+XML_SCHEMAS_ERR_ATTRINVALID = 21
+XML_SCHEMAS_ERR_VALUE = 22
+XML_SCHEMAS_ERR_FACET = 23
+XML_SCHEMAS_ERR_ = 24
+XML_SCHEMAS_ERR_XXX = 25
+
diff --git a/python/libxml2class.py b/python/libxml2class.py
new file mode 100644
index 0000000..4b718dc
--- /dev/null
+++ b/python/libxml2class.py
@@ -0,0 +1,8531 @@
+#
+# Functions from module HTMLparser
+#
+
+def htmlCreateMemoryParserCtxt(buffer, size):
+ """Create a parser context for an HTML in-memory document. """
+ ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlHandleOmittedElem(val):
+ """Set and return the previous value for handling HTML omitted
+ tags. """
+ ret = libxml2mod.htmlHandleOmittedElem(val)
+ return ret
+
+def htmlIsScriptAttribute(name):
+ """Check if an attribute is of content type Script """
+ ret = libxml2mod.htmlIsScriptAttribute(name)
+ return ret
+
+def htmlNewParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.htmlNewParserCtxt()
+ if ret is None:raise parserError('htmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlParseDoc(cur, encoding):
+ """parse an HTML in-memory document and build a tree. """
+ ret = libxml2mod.htmlParseDoc(cur, encoding)
+ if ret is None:raise parserError('htmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlParseFile(filename, encoding):
+ """parse an HTML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.htmlParseFile(filename, encoding)
+ if ret is None:raise parserError('htmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. """
+ ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.htmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('htmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlReadMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module HTMLtree
+#
+
+def htmlIsBooleanAttr(name):
+ """Determine if a given attribute is a boolean attribute. """
+ ret = libxml2mod.htmlIsBooleanAttr(name)
+ return ret
+
+def htmlNewDoc(URI, ExternalID):
+ """Creates a new HTML document """
+ ret = libxml2mod.htmlNewDoc(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def htmlNewDocNoDtD(URI, ExternalID):
+ """Creates a new HTML document without a DTD node if @URI and
+ @ExternalID are None """
+ ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
+ if ret is None:raise treeError('htmlNewDocNoDtD() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module SAX2
+#
+
+def SAXDefaultVersion(version):
+ """Set the default version of SAX used globally by the
+ library. By default, during initialization the default is
+ set to 2. Note that it is generally a better coding style
+ to use xmlSAXVersion() to set up the version explicitly for
+ a given parsing context. """
+ ret = libxml2mod.xmlSAXDefaultVersion(version)
+ return ret
+
+def defaultSAXHandlerInit():
+ """Initialize the default SAX2 handler """
+ libxml2mod.xmlDefaultSAXHandlerInit()
+
+def docbDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.docbDefaultSAXHandlerInit()
+
+def htmlDefaultSAXHandlerInit():
+ """Initialize the default SAX handler """
+ libxml2mod.htmlDefaultSAXHandlerInit()
+
+#
+# Functions from module catalog
+#
+
+def catalogAdd(type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. If called before any other catalog
+ routine, allows to override the default shared catalog put
+ in place by xmlInitializeCatalog(); """
+ ret = libxml2mod.xmlCatalogAdd(type, orig, replace)
+ return ret
+
+def catalogCleanup():
+ """Free up all the memory associated with catalogs """
+ libxml2mod.xmlCatalogCleanup()
+
+def catalogConvert():
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlCatalogConvert()
+ return ret
+
+def catalogDump(out):
+ """Dump all the global catalog content to the given file. """
+ if out is not None: out.flush()
+ libxml2mod.xmlCatalogDump(out)
+
+def catalogGetPublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID DEPRECATED, use xmlCatalogResolvePublic() """
+ ret = libxml2mod.xmlCatalogGetPublic(pubID)
+ return ret
+
+def catalogGetSystem(sysID):
+ """Try to lookup the catalog reference associated to a system
+ ID DEPRECATED, use xmlCatalogResolveSystem() """
+ ret = libxml2mod.xmlCatalogGetSystem(sysID)
+ return ret
+
+def catalogRemove(value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlCatalogRemove(value)
+ return ret
+
+def catalogResolve(pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlCatalogResolve(pubID, sysID)
+ return ret
+
+def catalogResolvePublic(pubID):
+ """Try to lookup the catalog reference associated to a public
+ ID """
+ ret = libxml2mod.xmlCatalogResolvePublic(pubID)
+ return ret
+
+def catalogResolveSystem(sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlCatalogResolveSystem(sysID)
+ return ret
+
+def catalogResolveURI(URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlCatalogResolveURI(URI)
+ return ret
+
+def catalogSetDebug(level):
+ """Used to set the debug level for catalog operation, 0
+ disable debugging, 1 enable it """
+ ret = libxml2mod.xmlCatalogSetDebug(level)
+ return ret
+
+def initializeCatalog():
+ """Do the catalog initialization. this function is not thread
+ safe, catalog initialization should preferably be done once
+ at startup """
+ libxml2mod.xmlInitializeCatalog()
+
+def loadACatalog(filename):
+ """Load the catalog and build the associated data structures.
+ This can be either an XML Catalog or an SGML Catalog It
+ will recurse in SGML CATALOG entries. On the other hand XML
+ Catalogs are not handled recursively. """
+ ret = libxml2mod.xmlLoadACatalog(filename)
+ if ret is None:raise treeError('xmlLoadACatalog() failed')
+ return catalog(_obj=ret)
+
+def loadCatalog(filename):
+ """Load the catalog and makes its definitions effective for
+ the default external entity loader. It will recurse in SGML
+ CATALOG entries. this function is not thread safe, catalog
+ initialization should preferably be done once at startup """
+ ret = libxml2mod.xmlLoadCatalog(filename)
+ return ret
+
+def loadCatalogs(pathss):
+ """Load the catalogs and makes their definitions effective for
+ the default external entity loader. this function is not
+ thread safe, catalog initialization should preferably be
+ done once at startup """
+ libxml2mod.xmlLoadCatalogs(pathss)
+
+def loadSGMLSuperCatalog(filename):
+ """Load an SGML super catalog. It won't expand CATALOG or
+ DELEGATE references. This is only needed for manipulating
+ SGML Super Catalogs like adding and removing CATALOG or
+ DELEGATE entries. """
+ ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
+ if ret is None:raise treeError('xmlLoadSGMLSuperCatalog() failed')
+ return catalog(_obj=ret)
+
+def newCatalog(sgml):
+ """create a new Catalog. """
+ ret = libxml2mod.xmlNewCatalog(sgml)
+ if ret is None:raise treeError('xmlNewCatalog() failed')
+ return catalog(_obj=ret)
+
+def parseCatalogFile(filename):
+ """parse an XML file and build a tree. It's like
+ xmlParseFile() except it bypass all catalog lookups. """
+ ret = libxml2mod.xmlParseCatalogFile(filename)
+ if ret is None:raise parserError('xmlParseCatalogFile() failed')
+ return xmlDoc(_obj=ret)
+
+#
+# Functions from module chvalid
+#
+
+def isBaseChar(ch):
+ """This function is DEPRECATED. Use xmlIsBaseChar_ch or
+ xmlIsBaseCharQ instead """
+ ret = libxml2mod.xmlIsBaseChar(ch)
+ return ret
+
+def isBlank(ch):
+ """This function is DEPRECATED. Use xmlIsBlank_ch or
+ xmlIsBlankQ instead """
+ ret = libxml2mod.xmlIsBlank(ch)
+ return ret
+
+def isChar(ch):
+ """This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
+ instead """
+ ret = libxml2mod.xmlIsChar(ch)
+ return ret
+
+def isCombining(ch):
+ """This function is DEPRECATED. Use xmlIsCombiningQ instead """
+ ret = libxml2mod.xmlIsCombining(ch)
+ return ret
+
+def isDigit(ch):
+ """This function is DEPRECATED. Use xmlIsDigit_ch or
+ xmlIsDigitQ instead """
+ ret = libxml2mod.xmlIsDigit(ch)
+ return ret
+
+def isExtender(ch):
+ """This function is DEPRECATED. Use xmlIsExtender_ch or
+ xmlIsExtenderQ instead """
+ ret = libxml2mod.xmlIsExtender(ch)
+ return ret
+
+def isIdeographic(ch):
+ """This function is DEPRECATED. Use xmlIsIdeographicQ instead """
+ ret = libxml2mod.xmlIsIdeographic(ch)
+ return ret
+
+def isPubidChar(ch):
+ """This function is DEPRECATED. Use xmlIsPubidChar_ch or
+ xmlIsPubidCharQ instead """
+ ret = libxml2mod.xmlIsPubidChar(ch)
+ return ret
+
+#
+# Functions from module debugXML
+#
+
+def boolToText(boolval):
+ """Convenient way to turn bool into text """
+ ret = libxml2mod.xmlBoolToText(boolval)
+ return ret
+
+def debugDumpString(output, str):
+ """Dumps informations about the string, shorten it if necessary """
+ if output is not None: output.flush()
+ libxml2mod.xmlDebugDumpString(output, str)
+
+def shellPrintXPathError(errorType, arg):
+ """Print the xpath error to libxml default error channel """
+ libxml2mod.xmlShellPrintXPathError(errorType, arg)
+
+#
+# Functions from module dict
+#
+
+def dictCleanup():
+ """Free the dictionary mutex. Do not call unless sure the
+ library is not in use anymore ! """
+ libxml2mod.xmlDictCleanup()
+
+def initializeDict():
+ """Do the dictionary mutex initialization. this function is
+ deprecated """
+ ret = libxml2mod.xmlInitializeDict()
+ return ret
+
+#
+# Functions from module encoding
+#
+
+def addEncodingAlias(name, alias):
+ """Registers an alias @alias for an encoding named @name.
+ Existing alias will be overwritten. """
+ ret = libxml2mod.xmlAddEncodingAlias(name, alias)
+ return ret
+
+def cleanupCharEncodingHandlers():
+ """Cleanup the memory allocated for the char encoding support,
+ it unregisters all the encoding handlers and the aliases. """
+ libxml2mod.xmlCleanupCharEncodingHandlers()
+
+def cleanupEncodingAliases():
+ """Unregisters all aliases """
+ libxml2mod.xmlCleanupEncodingAliases()
+
+def delEncodingAlias(alias):
+ """Unregisters an encoding alias @alias """
+ ret = libxml2mod.xmlDelEncodingAlias(alias)
+ return ret
+
+def encodingAlias(alias):
+ """Lookup an encoding name for the given alias. """
+ ret = libxml2mod.xmlGetEncodingAlias(alias)
+ return ret
+
+def initCharEncodingHandlers():
+ """Initialize the char encoding support, it registers the
+ default encoding supported. NOTE: while public, this
+ function usually doesn't need to be called in normal
+ processing. """
+ libxml2mod.xmlInitCharEncodingHandlers()
+
+#
+# Functions from module entities
+#
+
+def cleanupPredefinedEntities():
+ """Cleanup up the predefined entities table. Deprecated call """
+ libxml2mod.xmlCleanupPredefinedEntities()
+
+def initializePredefinedEntities():
+ """Set up the predefined entities. Deprecated call """
+ libxml2mod.xmlInitializePredefinedEntities()
+
+def predefinedEntity(name):
+ """Check whether this name is an predefined entity. """
+ ret = libxml2mod.xmlGetPredefinedEntity(name)
+ if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
+ return xmlEntity(_obj=ret)
+
+#
+# Functions from module globals
+#
+
+def cleanupGlobals():
+ """Additional cleanup for multi-threading """
+ libxml2mod.xmlCleanupGlobals()
+
+def initGlobals():
+ """Additional initialisation for multi-threading """
+ libxml2mod.xmlInitGlobals()
+
+def thrDefDefaultBufferSize(v):
+ ret = libxml2mod.xmlThrDefDefaultBufferSize(v)
+ return ret
+
+def thrDefDoValidityCheckingDefaultValue(v):
+ ret = libxml2mod.xmlThrDefDoValidityCheckingDefaultValue(v)
+ return ret
+
+def thrDefGetWarningsDefaultValue(v):
+ ret = libxml2mod.xmlThrDefGetWarningsDefaultValue(v)
+ return ret
+
+def thrDefIndentTreeOutput(v):
+ ret = libxml2mod.xmlThrDefIndentTreeOutput(v)
+ return ret
+
+def thrDefKeepBlanksDefaultValue(v):
+ ret = libxml2mod.xmlThrDefKeepBlanksDefaultValue(v)
+ return ret
+
+def thrDefLineNumbersDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLineNumbersDefaultValue(v)
+ return ret
+
+def thrDefLoadExtDtdDefaultValue(v):
+ ret = libxml2mod.xmlThrDefLoadExtDtdDefaultValue(v)
+ return ret
+
+def thrDefParserDebugEntities(v):
+ ret = libxml2mod.xmlThrDefParserDebugEntities(v)
+ return ret
+
+def thrDefPedanticParserDefaultValue(v):
+ ret = libxml2mod.xmlThrDefPedanticParserDefaultValue(v)
+ return ret
+
+def thrDefSaveNoEmptyTags(v):
+ ret = libxml2mod.xmlThrDefSaveNoEmptyTags(v)
+ return ret
+
+def thrDefSubstituteEntitiesDefaultValue(v):
+ ret = libxml2mod.xmlThrDefSubstituteEntitiesDefaultValue(v)
+ return ret
+
+def thrDefTreeIndentString(v):
+ ret = libxml2mod.xmlThrDefTreeIndentString(v)
+ return ret
+
+#
+# Functions from module nanoftp
+#
+
+def nanoFTPCleanup():
+ """Cleanup the FTP protocol layer. This cleanup proxy
+ informations. """
+ libxml2mod.xmlNanoFTPCleanup()
+
+def nanoFTPInit():
+ """Initialize the FTP protocol layer. Currently it just checks
+ for proxy informations, and get the hostname """
+ libxml2mod.xmlNanoFTPInit()
+
+def nanoFTPProxy(host, port, user, passwd, type):
+ """Setup the FTP proxy informations. This can also be done by
+ using ftp_proxy ftp_proxy_user and ftp_proxy_password
+ environment variables. """
+ libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type)
+
+def nanoFTPScanProxy(URL):
+ """(Re)Initialize the FTP Proxy context by parsing the URL and
+ finding the protocol host port it indicates. Should be like
+ ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up
+ proxy informations. """
+ libxml2mod.xmlNanoFTPScanProxy(URL)
+
+#
+# Functions from module nanohttp
+#
+
+def nanoHTTPCleanup():
+ """Cleanup the HTTP protocol layer. """
+ libxml2mod.xmlNanoHTTPCleanup()
+
+def nanoHTTPInit():
+ """Initialize the HTTP protocol layer. Currently it just
+ checks for proxy informations """
+ libxml2mod.xmlNanoHTTPInit()
+
+def nanoHTTPScanProxy(URL):
+ """(Re)Initialize the HTTP Proxy context by parsing the URL
+ and finding the protocol host port it indicates. Should be
+ like http://myproxy/ or http://myproxy:3128/ A None URL
+ cleans up proxy informations. """
+ libxml2mod.xmlNanoHTTPScanProxy(URL)
+
+#
+# Functions from module parser
+#
+
+def createDocParserCtxt(cur):
+ """Creates a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateDocParserCtxt(cur)
+ if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def initParser():
+ """Initialization function for the XML parser. This is not
+ reentrant. Call once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.xmlInitParser()
+
+def keepBlanksDefault(val):
+ """Set and return the previous value for default blanks text
+ nodes support. The 1.x version of the parser used an
+ heuristic to try to detect ignorable white spaces. As a
+ result the SAX callback was generating
+ xmlSAX2IgnorableWhitespace() callbacks instead of
+ characters() one, and when using the DOM output text nodes
+ containing those blanks were not generated. The 2.x and
+ later version will switch to the XML standard way and
+ ignorableWhitespace() are only generated when running the
+ parser in validating mode and when the current element
+ doesn't allow CDATA or mixed content. This function is
+ provided as a way to force the standard behavior on 1.X
+ libs and to switch back to the old mode for compatibility
+ when running 1.X client code on 2.X . Upgrade of 1.X code
+ should be done by using xmlIsBlankNode() commodity function
+ to detect the "empty" nodes generated. This value also
+ affect autogeneration of indentation when saving code if
+ blanks sections are kept, indentation is not generated. """
+ ret = libxml2mod.xmlKeepBlanksDefault(val)
+ return ret
+
+def lineNumbersDefault(val):
+ """Set and return the previous value for enabling line numbers
+ in elements contents. This may break on old application and
+ is turned off by default. """
+ ret = libxml2mod.xmlLineNumbersDefault(val)
+ return ret
+
+def newParserCtxt():
+ """Allocate and initialize a new parser context. """
+ ret = libxml2mod.xmlNewParserCtxt()
+ if ret is None:raise parserError('xmlNewParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def parseDTD(ExternalID, SystemID):
+ """Load and parse an external subset. """
+ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
+ if ret is None:raise parserError('xmlParseDTD() failed')
+ return xmlDtd(_obj=ret)
+
+def parseDoc(cur):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlParseDoc(cur)
+ if ret is None:raise parserError('xmlParseDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def parseEntity(filename):
+ """parse an XML external entity out of context and build a
+ tree. [78] extParsedEnt ::= TextDecl? content This
+ correspond to a "Well Balanced" chunk """
+ ret = libxml2mod.xmlParseEntity(filename)
+ if ret is None:raise parserError('xmlParseEntity() failed')
+ return xmlDoc(_obj=ret)
+
+def parseFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. """
+ ret = libxml2mod.xmlParseFile(filename)
+ if ret is None:raise parserError('xmlParseFile() failed')
+ return xmlDoc(_obj=ret)
+
+def parseMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. """
+ ret = libxml2mod.xmlParseMemory(buffer, size)
+ if ret is None:raise parserError('xmlParseMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def pedanticParserDefault(val):
+ """Set and return the previous value for enabling pedantic
+ warnings. """
+ ret = libxml2mod.xmlPedanticParserDefault(val)
+ return ret
+
+def readDoc(cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def readFd(fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. NOTE
+ that the file descriptor will not be closed when the reader
+ is closed or reset. """
+ ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadFd() failed')
+ return xmlDoc(_obj=ret)
+
+def readFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. """
+ ret = libxml2mod.xmlReadFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReadFile() failed')
+ return xmlDoc(_obj=ret)
+
+def readMemory(buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. """
+ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReadMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverDoc(cur):
+ """parse an XML in-memory document and build a tree. In the
+ case the document is not Well Formed, a attempt to build a
+ tree is tried anyway """
+ ret = libxml2mod.xmlRecoverDoc(cur)
+ if ret is None:raise treeError('xmlRecoverDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverFile(filename):
+ """parse an XML file and build a tree. Automatic support for
+ ZLIB/Compress compressed document is provided by default if
+ found at compile-time. In the case the document is not Well
+ Formed, it attempts to build a tree anyway """
+ ret = libxml2mod.xmlRecoverFile(filename)
+ if ret is None:raise treeError('xmlRecoverFile() failed')
+ return xmlDoc(_obj=ret)
+
+def recoverMemory(buffer, size):
+ """parse an XML in-memory block and build a tree. In the case
+ the document is not Well Formed, an attempt to build a tree
+ is tried anyway """
+ ret = libxml2mod.xmlRecoverMemory(buffer, size)
+ if ret is None:raise treeError('xmlRecoverMemory() failed')
+ return xmlDoc(_obj=ret)
+
+def substituteEntitiesDefault(val):
+ """Set and return the previous value for default entity
+ support. Initially the parser always keep entity references
+ instead of substituting entity values in the output. This
+ function has to be used to change the default parser
+ behavior SAX::substituteEntities() has to be used for
+ changing that on a file by file basis. """
+ ret = libxml2mod.xmlSubstituteEntitiesDefault(val)
+ return ret
+
+#
+# Functions from module parserInternals
+#
+
+def checkLanguageID(lang):
+ """Checks that the value conforms to the LanguageID
+ production: NOTE: this is somewhat deprecated, those
+ productions were removed from the XML Second edition. [33]
+ LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::=
+ ISO639Code | IanaCode | UserCode [35] ISO639Code ::=
+ ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' |
+ 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-'
+ ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The
+ current REC reference the sucessors of RFC 1766, currently
+ 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag
+ = language ["-" script] ["-" region] *("-" variant) *("-"
+ extension) ["-" privateuse] language = 2*3ALPHA
+ ; shortest ISO 639 code ["-" extlang] ; sometimes
+ followed by ; extended language subtags / 4ALPHA
+ ; or reserved for future use / 5*8ALPHA ; or
+ registered language subtag extlang = 3ALPHA
+ ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently
+ reserved script = 4ALPHA ; ISO 15924
+ code region = 2ALPHA ; ISO 3166-1 code
+ / 3DIGIT ; UN M.49 code variant =
+ 5*8alphanum ; registered variants / (DIGIT
+ 3alphanum) extension = singleton 1*("-" (2*8alphanum))
+ ; Single alphanumerics ; "x" reserved for private use
+ singleton = DIGIT ; 0 - 9 / %x41-57
+ ; A - W / %x59-5A ; Y - Z / %x61-77
+ ; a - w / %x79-7A ; y - z it sounds right to
+ still allow Irregular i-xxx IANA and user codes too The
+ parser below doesn't try to cope with extension or
+ privateuse that could be added but that's not interoperable
+ anyway """
+ ret = libxml2mod.xmlCheckLanguageID(lang)
+ return ret
+
+def copyChar(len, out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyChar(len, out, val)
+ return ret
+
+def copyCharMultiByte(out, val):
+ """append the char value in the array """
+ ret = libxml2mod.xmlCopyCharMultiByte(out, val)
+ return ret
+
+def createEntityParserCtxt(URL, ID, base):
+ """Create a parser context for an external entity Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base)
+ if ret is None:raise parserError('xmlCreateEntityParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createFileParserCtxt(filename):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.xmlCreateFileParserCtxt(filename)
+ if ret is None:raise parserError('xmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createMemoryParserCtxt(buffer, size):
+ """Create a parser context for an XML in-memory document. """
+ ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def createURLParserCtxt(filename, options):
+ """Create a parser context for a file or URL content.
+ Automatic support for ZLIB/Compress compressed document is
+ provided by default if found at compile-time and for file
+ accesses """
+ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options)
+ if ret is None:raise parserError('xmlCreateURLParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlCreateFileParserCtxt(filename, encoding):
+ """Create a parser context for a file content. Automatic
+ support for ZLIB/Compress compressed document is provided
+ by default if found at compile-time. """
+ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding)
+ if ret is None:raise parserError('htmlCreateFileParserCtxt() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlInitAutoClose():
+ """Initialize the htmlStartCloseIndex for fast lookup of
+ closing tags names. This is not reentrant. Call
+ xmlInitParser() once before processing in case of use in
+ multithreaded programs. """
+ libxml2mod.htmlInitAutoClose()
+
+def isLetter(c):
+ """Check whether the character is allowed by the production
+ [84] Letter ::= BaseChar | Ideographic """
+ ret = libxml2mod.xmlIsLetter(c)
+ return ret
+
+def namePop(ctxt):
+ """Pops the top element name from the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePop(ctxt__o)
+ return ret
+
+def namePush(ctxt, value):
+ """Pushes a new element name on top of the name stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.namePush(ctxt__o, value)
+ return ret
+
+def nodePop(ctxt):
+ """Pops the top element node from the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.nodePop(ctxt__o)
+ if ret is None:raise treeError('nodePop() failed')
+ return xmlNode(_obj=ret)
+
+def nodePush(ctxt, value):
+ """Pushes a new element node on top of the node stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if value is None: value__o = None
+ else: value__o = value._o
+ ret = libxml2mod.nodePush(ctxt__o, value__o)
+ return ret
+
+#
+# Functions from module python
+#
+
+def SAXParseFile(SAX, URI, recover):
+ """Interface to parse an XML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.xmlSAXParseFile(SAX, URI, recover)
+
+def createInputBuffer(file, encoding):
+ """Create a libxml2 input buffer from a Python file """
+ ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateInputBuffer() failed')
+ return inputBuffer(_obj=ret)
+
+def createOutputBuffer(file, encoding):
+ """Create a libxml2 output buffer from a Python file """
+ ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
+ if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
+ return outputBuffer(_obj=ret)
+
+def createPushParser(SAX, chunk, size, URI):
+ """Create a progressive XML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('xmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def debugMemory(activate):
+ """Switch on the generation of line number for elements nodes.
+ Also returns the number of bytes allocated and not freed by
+ libxml2 since memory debugging was switched on. """
+ ret = libxml2mod.xmlDebugMemory(activate)
+ return ret
+
+def dumpMemory():
+ """dump the memory allocated in the file .memdump """
+ libxml2mod.xmlDumpMemory()
+
+def htmlCreatePushParser(SAX, chunk, size, URI):
+ """Create a progressive HTML parser context to build either an
+ event flow if the SAX object is not None, or a DOM tree
+ otherwise. """
+ ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
+ if ret is None:raise parserError('htmlCreatePushParser() failed')
+ return parserCtxt(_obj=ret)
+
+def htmlSAXParseFile(SAX, URI, encoding):
+ """Interface to parse an HTML file or resource pointed by an
+ URI to build an event flow to the SAX object """
+ libxml2mod.htmlSAXParseFile(SAX, URI, encoding)
+
+def memoryUsed():
+ """Returns the total amount of memory allocated by libxml2 """
+ ret = libxml2mod.xmlMemoryUsed()
+ return ret
+
+def newNode(name):
+ """Create a new Node """
+ ret = libxml2mod.xmlNewNode(name)
+ if ret is None:raise treeError('xmlNewNode() failed')
+ return xmlNode(_obj=ret)
+
+def pythonCleanupParser():
+ """Cleanup function for the XML library. It tries to reclaim
+ all parsing related global memory allocated for the library
+ processing. It doesn't deallocate any document related
+ memory. Calling this function should not prevent reusing
+ the library but one should call xmlCleanupParser() only
+ when the process has finished using the library or XML
+ document built with it. """
+ libxml2mod.xmlPythonCleanupParser()
+
+def setEntityLoader(resolver):
+ """Set the entity resolver as a python function """
+ ret = libxml2mod.xmlSetEntityLoader(resolver)
+ return ret
+
+#
+# Functions from module relaxng
+#
+
+def relaxNGCleanupTypes():
+ """Cleanup the default Schemas type library associated to
+ RelaxNG """
+ libxml2mod.xmlRelaxNGCleanupTypes()
+
+def relaxNGInitTypes():
+ """Initilize the default type libraries. """
+ ret = libxml2mod.xmlRelaxNGInitTypes()
+ return ret
+
+def relaxNGNewMemParserCtxt(buffer, size):
+ """Create an XML RelaxNGs parse context for that memory buffer
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+def relaxNGNewParserCtxt(URL):
+ """Create an XML RelaxNGs parse context for that file/resource
+ expected to contain an XML RelaxNGs file. """
+ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed')
+ return relaxNgParserCtxt(_obj=ret)
+
+#
+# Functions from module tree
+#
+
+def buildQName(ncname, prefix, memory, len):
+ """Builds the QName @prefix:@ncname in @memory if there is
+ enough space and prefix is not None nor empty, otherwise
+ allocate a new string. If prefix is None or empty it
+ returns ncname. """
+ ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)
+ return ret
+
+def compressMode():
+ """get the default compression mode used, ZLIB based. """
+ ret = libxml2mod.xmlGetCompressMode()
+ return ret
+
+def isXHTML(systemID, publicID):
+ """Try to find if the document correspond to an XHTML DTD """
+ ret = libxml2mod.xmlIsXHTML(systemID, publicID)
+ return ret
+
+def newComment(content):
+ """Creation of a new node containing a comment. """
+ ret = libxml2mod.xmlNewComment(content)
+ if ret is None:raise treeError('xmlNewComment() failed')
+ return xmlNode(_obj=ret)
+
+def newDoc(version):
+ """Creates a new XML document """
+ ret = libxml2mod.xmlNewDoc(version)
+ if ret is None:raise treeError('xmlNewDoc() failed')
+ return xmlDoc(_obj=ret)
+
+def newPI(name, content):
+ """Creation of a processing instruction element. Use
+ xmlDocNewPI preferably to get string interning """
+ ret = libxml2mod.xmlNewPI(name, content)
+ if ret is None:raise treeError('xmlNewPI() failed')
+ return xmlNode(_obj=ret)
+
+def newText(content):
+ """Creation of a new text node. """
+ ret = libxml2mod.xmlNewText(content)
+ if ret is None:raise treeError('xmlNewText() failed')
+ return xmlNode(_obj=ret)
+
+def newTextLen(content, len):
+ """Creation of a new text node with an extra parameter for the
+ content's length """
+ ret = libxml2mod.xmlNewTextLen(content, len)
+ if ret is None:raise treeError('xmlNewTextLen() failed')
+ return xmlNode(_obj=ret)
+
+def setCompressMode(mode):
+ """set the default compression mode used, ZLIB based Correct
+ values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetCompressMode(mode)
+
+def validateNCName(value, space):
+ """Check that a value conforms to the lexical space of NCName """
+ ret = libxml2mod.xmlValidateNCName(value, space)
+ return ret
+
+def validateNMToken(value, space):
+ """Check that a value conforms to the lexical space of NMToken """
+ ret = libxml2mod.xmlValidateNMToken(value, space)
+ return ret
+
+def validateName(value, space):
+ """Check that a value conforms to the lexical space of Name """
+ ret = libxml2mod.xmlValidateName(value, space)
+ return ret
+
+def validateQName(value, space):
+ """Check that a value conforms to the lexical space of QName """
+ ret = libxml2mod.xmlValidateQName(value, space)
+ return ret
+
+#
+# Functions from module uri
+#
+
+def URIEscape(str):
+ """Escaping routine, does not do validity checks ! It will try
+ to escape the chars needing this, but this is heuristic
+ based it's impossible to be sure. """
+ ret = libxml2mod.xmlURIEscape(str)
+ return ret
+
+def URIEscapeStr(str, list):
+ """This routine escapes a string to hex, ignoring reserved
+ characters (a-z) and the characters in the exception list. """
+ ret = libxml2mod.xmlURIEscapeStr(str, list)
+ return ret
+
+def URIUnescapeString(str, len, target):
+ """Unescaping routine, but does not check that the string is
+ an URI. The output is a direct unsigned char translation of
+ %XX values (no encoding) Note that the length of the result
+ can only be smaller or same size as the input string. """
+ ret = libxml2mod.xmlURIUnescapeString(str, len, target)
+ return ret
+
+def buildRelativeURI(URI, base):
+ """Expresses the URI of the reference in terms relative to the
+ base. Some examples of this operation include: base =
+ "http://site1.com/docs/book1.html" URI input
+ URI returned docs/pic1.gif pic1.gif
+ docs/img/pic1.gif img/pic1.gif img/pic1.gif
+ ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif
+ http://site2.com/docs/pic1.gif
+ http://site2.com/docs/pic1.gif base = "docs/book1.html"
+ URI input URI returned docs/pic1.gif
+ pic1.gif docs/img/pic1.gif img/pic1.gif
+ img/pic1.gif ../img/pic1.gif
+ http://site1.com/docs/pic1.gif
+ http://site1.com/docs/pic1.gif Note: if the URI reference
+ is really wierd or complicated, it may be worthwhile to
+ first convert it into a "nice" one by calling xmlBuildURI
+ (using 'base') before calling this routine, since this
+ routine (for reasonable efficiency) assumes URI has already
+ been through some validation. """
+ ret = libxml2mod.xmlBuildRelativeURI(URI, base)
+ return ret
+
+def buildURI(URI, base):
+ """Computes he final URI of the reference done by checking
+ that the given URI is valid, and building the final URI
+ using the base URI. This is processed according to section
+ 5.2 of the RFC 2396 5.2. Resolving Relative References to
+ Absolute Form """
+ ret = libxml2mod.xmlBuildURI(URI, base)
+ return ret
+
+def canonicPath(path):
+ """Constructs a canonic path from the specified path. """
+ ret = libxml2mod.xmlCanonicPath(path)
+ return ret
+
+def createURI():
+ """Simply creates an empty xmlURI """
+ ret = libxml2mod.xmlCreateURI()
+ if ret is None:raise uriError('xmlCreateURI() failed')
+ return URI(_obj=ret)
+
+def normalizeURIPath(path):
+ """Applies the 5 normalization steps to a path string--that
+ is, RFC 2396 Section 5.2, steps 6.c through 6.g.
+ Normalization occurs directly on the string, no new
+ allocation is done """
+ ret = libxml2mod.xmlNormalizeURIPath(path)
+ return ret
+
+def parseURI(str):
+ """Parse an URI based on RFC 3986 URI-reference = [
+ absoluteURI | relativeURI ] [ "#" fragment ] """
+ ret = libxml2mod.xmlParseURI(str)
+ if ret is None:raise uriError('xmlParseURI() failed')
+ return URI(_obj=ret)
+
+def parseURIRaw(str, raw):
+ """Parse an URI but allows to keep intact the original
+ fragments. URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIRaw(str, raw)
+ if ret is None:raise uriError('xmlParseURIRaw() failed')
+ return URI(_obj=ret)
+
+def pathToURI(path):
+ """Constructs an URI expressing the existing path """
+ ret = libxml2mod.xmlPathToURI(path)
+ return ret
+
+#
+# Functions from module valid
+#
+
+def newValidCtxt():
+ """Allocate a validation context structure. """
+ ret = libxml2mod.xmlNewValidCtxt()
+ if ret is None:raise treeError('xmlNewValidCtxt() failed')
+ return ValidCtxt(_obj=ret)
+
+def validateNameValue(value):
+ """Validate that the given value match Name production """
+ ret = libxml2mod.xmlValidateNameValue(value)
+ return ret
+
+def validateNamesValue(value):
+ """Validate that the given value match Names production """
+ ret = libxml2mod.xmlValidateNamesValue(value)
+ return ret
+
+def validateNmtokenValue(value):
+ """Validate that the given value match Nmtoken production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokenValue(value)
+ return ret
+
+def validateNmtokensValue(value):
+ """Validate that the given value match Nmtokens production [
+ VC: Name Token ] """
+ ret = libxml2mod.xmlValidateNmtokensValue(value)
+ return ret
+
+#
+# Functions from module xmlIO
+#
+
+def checkFilename(path):
+ """function checks to see if @path is a valid source (file,
+ socket...) for XML. if stat is not available on the target
+ machine, """
+ ret = libxml2mod.xmlCheckFilename(path)
+ return ret
+
+def cleanupInputCallbacks():
+ """clears the entire input callback table. this includes the
+ compiled-in I/O. """
+ libxml2mod.xmlCleanupInputCallbacks()
+
+def cleanupOutputCallbacks():
+ """clears the entire output callback table. this includes the
+ compiled-in I/O callbacks. """
+ libxml2mod.xmlCleanupOutputCallbacks()
+
+def fileMatch(filename):
+ """input from FILE * """
+ ret = libxml2mod.xmlFileMatch(filename)
+ return ret
+
+def iOFTPMatch(filename):
+ """check if the URI matches an FTP one """
+ ret = libxml2mod.xmlIOFTPMatch(filename)
+ return ret
+
+def iOHTTPMatch(filename):
+ """check if the URI matches an HTTP one """
+ ret = libxml2mod.xmlIOHTTPMatch(filename)
+ return ret
+
+def normalizeWindowsPath(path):
+ """This function is obsolete. Please see xmlURIFromPath in
+ uri.c for a better solution. """
+ ret = libxml2mod.xmlNormalizeWindowsPath(path)
+ return ret
+
+def parserGetDirectory(filename):
+ """lookup the directory for that file """
+ ret = libxml2mod.xmlParserGetDirectory(filename)
+ return ret
+
+def registerDefaultInputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultInputCallbacks()
+
+def registerDefaultOutputCallbacks():
+ """Registers the default compiled-in I/O handlers. """
+ libxml2mod.xmlRegisterDefaultOutputCallbacks()
+
+def registerHTTPPostCallbacks():
+ """By default, libxml submits HTTP output requests using the
+ "PUT" method. Calling this method changes the HTTP output
+ method to use the "POST" method instead. """
+ libxml2mod.xmlRegisterHTTPPostCallbacks()
+
+#
+# Functions from module xmlerror
+#
+
+def lastError():
+ """Get the last global error registered. This is per thread if
+ compiled with thread support. """
+ ret = libxml2mod.xmlGetLastError()
+ if ret is None:raise treeError('xmlGetLastError() failed')
+ return Error(_obj=ret)
+
+def resetLastError():
+ """Cleanup the last global error registered. For parsing error
+ this does not change the well-formedness result. """
+ libxml2mod.xmlResetLastError()
+
+#
+# Functions from module xmlreader
+#
+
+def newTextReaderFilename(URI):
+ """Create an xmlTextReader structure fed with the resource at
+ @URI """
+ ret = libxml2mod.xmlNewTextReaderFilename(URI)
+ if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForDoc(cur, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForDoc(cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForDoc() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFd(fd, URL, encoding, options):
+ """Create an xmltextReader for an XML from a file descriptor.
+ The parsing flags @options are a combination of
+ xmlParserOption. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. """
+ ret = libxml2mod.xmlReaderForFd(fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFd() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForFile(filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForFile(filename, encoding, options)
+ if ret is None:raise treeError('xmlReaderForFile() failed')
+ return xmlTextReader(_obj=ret)
+
+def readerForMemory(buffer, size, URL, encoding, options):
+ """Create an xmltextReader for an XML in-memory document. The
+ parsing flags @options are a combination of xmlParserOption. """
+ ret = libxml2mod.xmlReaderForMemory(buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlReaderForMemory() failed')
+ return xmlTextReader(_obj=ret)
+
+#
+# Functions from module xmlregexp
+#
+
+def regexpCompile(regexp):
+ """Parses a regular expression conforming to XML Schemas Part
+ 2 Datatype Appendix F and builds an automata suitable for
+ testing strings against that regular expression """
+ ret = libxml2mod.xmlRegexpCompile(regexp)
+ if ret is None:raise treeError('xmlRegexpCompile() failed')
+ return xmlReg(_obj=ret)
+
+#
+# Functions from module xmlschemas
+#
+
+def schemaNewMemParserCtxt(buffer, size):
+ """Create an XML Schemas parse context for that memory buffer
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
+ if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+def schemaNewParserCtxt(URL):
+ """Create an XML Schemas parse context for that file/resource
+ expected to contain an XML Schemas file. """
+ ret = libxml2mod.xmlSchemaNewParserCtxt(URL)
+ if ret is None:raise parserError('xmlSchemaNewParserCtxt() failed')
+ return SchemaParserCtxt(_obj=ret)
+
+#
+# Functions from module xmlschemastypes
+#
+
+def schemaCleanupTypes():
+ """Cleanup the default XML Schemas type library """
+ libxml2mod.xmlSchemaCleanupTypes()
+
+def schemaCollapseString(value):
+ """Removes and normalize white spaces in the string """
+ ret = libxml2mod.xmlSchemaCollapseString(value)
+ return ret
+
+def schemaInitTypes():
+ """Initialize the default XML Schemas type library """
+ libxml2mod.xmlSchemaInitTypes()
+
+def schemaWhiteSpaceReplace(value):
+ """Replaces 0xd, 0x9 and 0xa with a space. """
+ ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value)
+ return ret
+
+#
+# Functions from module xmlstring
+#
+
+def UTF8Charcmp(utf1, utf2):
+ """compares the two UCS4 values """
+ ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2)
+ return ret
+
+def UTF8Size(utf):
+ """calculates the internal size of a UTF8 character """
+ ret = libxml2mod.xmlUTF8Size(utf)
+ return ret
+
+def UTF8Strlen(utf):
+ """compute the length of an UTF8 string, it doesn't do a full
+ UTF8 checking of the content of the string. """
+ ret = libxml2mod.xmlUTF8Strlen(utf)
+ return ret
+
+def UTF8Strloc(utf, utfchar):
+ """a function to provide the relative location of a UTF8 char """
+ ret = libxml2mod.xmlUTF8Strloc(utf, utfchar)
+ return ret
+
+def UTF8Strndup(utf, len):
+ """a strndup for array of UTF8's """
+ ret = libxml2mod.xmlUTF8Strndup(utf, len)
+ return ret
+
+def UTF8Strpos(utf, pos):
+ """a function to provide the equivalent of fetching a
+ character from a string array """
+ ret = libxml2mod.xmlUTF8Strpos(utf, pos)
+ return ret
+
+def UTF8Strsize(utf, len):
+ """storage size of an UTF8 string the behaviour is not
+ garanteed if the input string is not UTF-8 """
+ ret = libxml2mod.xmlUTF8Strsize(utf, len)
+ return ret
+
+def UTF8Strsub(utf, start, len):
+ """Create a substring from a given UTF-8 string Note:
+ positions are given in units of UTF-8 chars """
+ ret = libxml2mod.xmlUTF8Strsub(utf, start, len)
+ return ret
+
+def checkUTF8(utf):
+ """Checks @utf for being valid UTF-8. @utf is assumed to be
+ null-terminated. This function is not super-strict, as it
+ will allow longer UTF-8 sequences than necessary. Note that
+ Java is capable of producing these sequences if provoked.
+ Also note, this routine checks for the 4-byte maximum size,
+ but does not check for 0x10ffff maximum value. """
+ ret = libxml2mod.xmlCheckUTF8(utf)
+ return ret
+
+#
+# Functions from module xmlunicode
+#
+
+def uCSIsAegeanNumbers(code):
+ """Check whether the character is part of AegeanNumbers UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsAegeanNumbers(code)
+ return ret
+
+def uCSIsAlphabeticPresentationForms(code):
+ """Check whether the character is part of
+ AlphabeticPresentationForms UCS Block """
+ ret = libxml2mod.xmlUCSIsAlphabeticPresentationForms(code)
+ return ret
+
+def uCSIsArabic(code):
+ """Check whether the character is part of Arabic UCS Block """
+ ret = libxml2mod.xmlUCSIsArabic(code)
+ return ret
+
+def uCSIsArabicPresentationFormsA(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-A UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsA(code)
+ return ret
+
+def uCSIsArabicPresentationFormsB(code):
+ """Check whether the character is part of
+ ArabicPresentationForms-B UCS Block """
+ ret = libxml2mod.xmlUCSIsArabicPresentationFormsB(code)
+ return ret
+
+def uCSIsArmenian(code):
+ """Check whether the character is part of Armenian UCS Block """
+ ret = libxml2mod.xmlUCSIsArmenian(code)
+ return ret
+
+def uCSIsArrows(code):
+ """Check whether the character is part of Arrows UCS Block """
+ ret = libxml2mod.xmlUCSIsArrows(code)
+ return ret
+
+def uCSIsBasicLatin(code):
+ """Check whether the character is part of BasicLatin UCS Block """
+ ret = libxml2mod.xmlUCSIsBasicLatin(code)
+ return ret
+
+def uCSIsBengali(code):
+ """Check whether the character is part of Bengali UCS Block """
+ ret = libxml2mod.xmlUCSIsBengali(code)
+ return ret
+
+def uCSIsBlock(code, block):
+ """Check whether the character is part of the UCS Block """
+ ret = libxml2mod.xmlUCSIsBlock(code, block)
+ return ret
+
+def uCSIsBlockElements(code):
+ """Check whether the character is part of BlockElements UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBlockElements(code)
+ return ret
+
+def uCSIsBopomofo(code):
+ """Check whether the character is part of Bopomofo UCS Block """
+ ret = libxml2mod.xmlUCSIsBopomofo(code)
+ return ret
+
+def uCSIsBopomofoExtended(code):
+ """Check whether the character is part of BopomofoExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBopomofoExtended(code)
+ return ret
+
+def uCSIsBoxDrawing(code):
+ """Check whether the character is part of BoxDrawing UCS Block """
+ ret = libxml2mod.xmlUCSIsBoxDrawing(code)
+ return ret
+
+def uCSIsBraillePatterns(code):
+ """Check whether the character is part of BraillePatterns UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsBraillePatterns(code)
+ return ret
+
+def uCSIsBuhid(code):
+ """Check whether the character is part of Buhid UCS Block """
+ ret = libxml2mod.xmlUCSIsBuhid(code)
+ return ret
+
+def uCSIsByzantineMusicalSymbols(code):
+ """Check whether the character is part of
+ ByzantineMusicalSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsByzantineMusicalSymbols(code)
+ return ret
+
+def uCSIsCJKCompatibility(code):
+ """Check whether the character is part of CJKCompatibility UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibility(code)
+ return ret
+
+def uCSIsCJKCompatibilityForms(code):
+ """Check whether the character is part of
+ CJKCompatibilityForms UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityForms(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographs(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographs UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographs(code)
+ return ret
+
+def uCSIsCJKCompatibilityIdeographsSupplement(code):
+ """Check whether the character is part of
+ CJKCompatibilityIdeographsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKCompatibilityIdeographsSupplement(code)
+ return ret
+
+def uCSIsCJKRadicalsSupplement(code):
+ """Check whether the character is part of
+ CJKRadicalsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKRadicalsSupplement(code)
+ return ret
+
+def uCSIsCJKSymbolsandPunctuation(code):
+ """Check whether the character is part of
+ CJKSymbolsandPunctuation UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKSymbolsandPunctuation(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographs(code):
+ """Check whether the character is part of CJKUnifiedIdeographs
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographs(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionA(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionA UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionA(code)
+ return ret
+
+def uCSIsCJKUnifiedIdeographsExtensionB(code):
+ """Check whether the character is part of
+ CJKUnifiedIdeographsExtensionB UCS Block """
+ ret = libxml2mod.xmlUCSIsCJKUnifiedIdeographsExtensionB(code)
+ return ret
+
+def uCSIsCat(code, cat):
+ """Check whether the character is part of the UCS Category """
+ ret = libxml2mod.xmlUCSIsCat(code, cat)
+ return ret
+
+def uCSIsCatC(code):
+ """Check whether the character is part of C UCS Category """
+ ret = libxml2mod.xmlUCSIsCatC(code)
+ return ret
+
+def uCSIsCatCc(code):
+ """Check whether the character is part of Cc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCc(code)
+ return ret
+
+def uCSIsCatCf(code):
+ """Check whether the character is part of Cf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCf(code)
+ return ret
+
+def uCSIsCatCo(code):
+ """Check whether the character is part of Co UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCo(code)
+ return ret
+
+def uCSIsCatCs(code):
+ """Check whether the character is part of Cs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatCs(code)
+ return ret
+
+def uCSIsCatL(code):
+ """Check whether the character is part of L UCS Category """
+ ret = libxml2mod.xmlUCSIsCatL(code)
+ return ret
+
+def uCSIsCatLl(code):
+ """Check whether the character is part of Ll UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLl(code)
+ return ret
+
+def uCSIsCatLm(code):
+ """Check whether the character is part of Lm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLm(code)
+ return ret
+
+def uCSIsCatLo(code):
+ """Check whether the character is part of Lo UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLo(code)
+ return ret
+
+def uCSIsCatLt(code):
+ """Check whether the character is part of Lt UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLt(code)
+ return ret
+
+def uCSIsCatLu(code):
+ """Check whether the character is part of Lu UCS Category """
+ ret = libxml2mod.xmlUCSIsCatLu(code)
+ return ret
+
+def uCSIsCatM(code):
+ """Check whether the character is part of M UCS Category """
+ ret = libxml2mod.xmlUCSIsCatM(code)
+ return ret
+
+def uCSIsCatMc(code):
+ """Check whether the character is part of Mc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMc(code)
+ return ret
+
+def uCSIsCatMe(code):
+ """Check whether the character is part of Me UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMe(code)
+ return ret
+
+def uCSIsCatMn(code):
+ """Check whether the character is part of Mn UCS Category """
+ ret = libxml2mod.xmlUCSIsCatMn(code)
+ return ret
+
+def uCSIsCatN(code):
+ """Check whether the character is part of N UCS Category """
+ ret = libxml2mod.xmlUCSIsCatN(code)
+ return ret
+
+def uCSIsCatNd(code):
+ """Check whether the character is part of Nd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNd(code)
+ return ret
+
+def uCSIsCatNl(code):
+ """Check whether the character is part of Nl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNl(code)
+ return ret
+
+def uCSIsCatNo(code):
+ """Check whether the character is part of No UCS Category """
+ ret = libxml2mod.xmlUCSIsCatNo(code)
+ return ret
+
+def uCSIsCatP(code):
+ """Check whether the character is part of P UCS Category """
+ ret = libxml2mod.xmlUCSIsCatP(code)
+ return ret
+
+def uCSIsCatPc(code):
+ """Check whether the character is part of Pc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPc(code)
+ return ret
+
+def uCSIsCatPd(code):
+ """Check whether the character is part of Pd UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPd(code)
+ return ret
+
+def uCSIsCatPe(code):
+ """Check whether the character is part of Pe UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPe(code)
+ return ret
+
+def uCSIsCatPf(code):
+ """Check whether the character is part of Pf UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPf(code)
+ return ret
+
+def uCSIsCatPi(code):
+ """Check whether the character is part of Pi UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPi(code)
+ return ret
+
+def uCSIsCatPo(code):
+ """Check whether the character is part of Po UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPo(code)
+ return ret
+
+def uCSIsCatPs(code):
+ """Check whether the character is part of Ps UCS Category """
+ ret = libxml2mod.xmlUCSIsCatPs(code)
+ return ret
+
+def uCSIsCatS(code):
+ """Check whether the character is part of S UCS Category """
+ ret = libxml2mod.xmlUCSIsCatS(code)
+ return ret
+
+def uCSIsCatSc(code):
+ """Check whether the character is part of Sc UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSc(code)
+ return ret
+
+def uCSIsCatSk(code):
+ """Check whether the character is part of Sk UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSk(code)
+ return ret
+
+def uCSIsCatSm(code):
+ """Check whether the character is part of Sm UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSm(code)
+ return ret
+
+def uCSIsCatSo(code):
+ """Check whether the character is part of So UCS Category """
+ ret = libxml2mod.xmlUCSIsCatSo(code)
+ return ret
+
+def uCSIsCatZ(code):
+ """Check whether the character is part of Z UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZ(code)
+ return ret
+
+def uCSIsCatZl(code):
+ """Check whether the character is part of Zl UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZl(code)
+ return ret
+
+def uCSIsCatZp(code):
+ """Check whether the character is part of Zp UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZp(code)
+ return ret
+
+def uCSIsCatZs(code):
+ """Check whether the character is part of Zs UCS Category """
+ ret = libxml2mod.xmlUCSIsCatZs(code)
+ return ret
+
+def uCSIsCherokee(code):
+ """Check whether the character is part of Cherokee UCS Block """
+ ret = libxml2mod.xmlUCSIsCherokee(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarks(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarks UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarks(code)
+ return ret
+
+def uCSIsCombiningDiacriticalMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningDiacriticalMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code)
+ return ret
+
+def uCSIsCombiningHalfMarks(code):
+ """Check whether the character is part of CombiningHalfMarks
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code)
+ return ret
+
+def uCSIsCombiningMarksforSymbols(code):
+ """Check whether the character is part of
+ CombiningMarksforSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsCombiningMarksforSymbols(code)
+ return ret
+
+def uCSIsControlPictures(code):
+ """Check whether the character is part of ControlPictures UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsControlPictures(code)
+ return ret
+
+def uCSIsCurrencySymbols(code):
+ """Check whether the character is part of CurrencySymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCurrencySymbols(code)
+ return ret
+
+def uCSIsCypriotSyllabary(code):
+ """Check whether the character is part of CypriotSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsCypriotSyllabary(code)
+ return ret
+
+def uCSIsCyrillic(code):
+ """Check whether the character is part of Cyrillic UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillic(code)
+ return ret
+
+def uCSIsCyrillicSupplement(code):
+ """Check whether the character is part of CyrillicSupplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsCyrillicSupplement(code)
+ return ret
+
+def uCSIsDeseret(code):
+ """Check whether the character is part of Deseret UCS Block """
+ ret = libxml2mod.xmlUCSIsDeseret(code)
+ return ret
+
+def uCSIsDevanagari(code):
+ """Check whether the character is part of Devanagari UCS Block """
+ ret = libxml2mod.xmlUCSIsDevanagari(code)
+ return ret
+
+def uCSIsDingbats(code):
+ """Check whether the character is part of Dingbats UCS Block """
+ ret = libxml2mod.xmlUCSIsDingbats(code)
+ return ret
+
+def uCSIsEnclosedAlphanumerics(code):
+ """Check whether the character is part of
+ EnclosedAlphanumerics UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedAlphanumerics(code)
+ return ret
+
+def uCSIsEnclosedCJKLettersandMonths(code):
+ """Check whether the character is part of
+ EnclosedCJKLettersandMonths UCS Block """
+ ret = libxml2mod.xmlUCSIsEnclosedCJKLettersandMonths(code)
+ return ret
+
+def uCSIsEthiopic(code):
+ """Check whether the character is part of Ethiopic UCS Block """
+ ret = libxml2mod.xmlUCSIsEthiopic(code)
+ return ret
+
+def uCSIsGeneralPunctuation(code):
+ """Check whether the character is part of GeneralPunctuation
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsGeneralPunctuation(code)
+ return ret
+
+def uCSIsGeometricShapes(code):
+ """Check whether the character is part of GeometricShapes UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGeometricShapes(code)
+ return ret
+
+def uCSIsGeorgian(code):
+ """Check whether the character is part of Georgian UCS Block """
+ ret = libxml2mod.xmlUCSIsGeorgian(code)
+ return ret
+
+def uCSIsGothic(code):
+ """Check whether the character is part of Gothic UCS Block """
+ ret = libxml2mod.xmlUCSIsGothic(code)
+ return ret
+
+def uCSIsGreek(code):
+ """Check whether the character is part of Greek UCS Block """
+ ret = libxml2mod.xmlUCSIsGreek(code)
+ return ret
+
+def uCSIsGreekExtended(code):
+ """Check whether the character is part of GreekExtended UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekExtended(code)
+ return ret
+
+def uCSIsGreekandCoptic(code):
+ """Check whether the character is part of GreekandCoptic UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsGreekandCoptic(code)
+ return ret
+
+def uCSIsGujarati(code):
+ """Check whether the character is part of Gujarati UCS Block """
+ ret = libxml2mod.xmlUCSIsGujarati(code)
+ return ret
+
+def uCSIsGurmukhi(code):
+ """Check whether the character is part of Gurmukhi UCS Block """
+ ret = libxml2mod.xmlUCSIsGurmukhi(code)
+ return ret
+
+def uCSIsHalfwidthandFullwidthForms(code):
+ """Check whether the character is part of
+ HalfwidthandFullwidthForms UCS Block """
+ ret = libxml2mod.xmlUCSIsHalfwidthandFullwidthForms(code)
+ return ret
+
+def uCSIsHangulCompatibilityJamo(code):
+ """Check whether the character is part of
+ HangulCompatibilityJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulCompatibilityJamo(code)
+ return ret
+
+def uCSIsHangulJamo(code):
+ """Check whether the character is part of HangulJamo UCS Block """
+ ret = libxml2mod.xmlUCSIsHangulJamo(code)
+ return ret
+
+def uCSIsHangulSyllables(code):
+ """Check whether the character is part of HangulSyllables UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHangulSyllables(code)
+ return ret
+
+def uCSIsHanunoo(code):
+ """Check whether the character is part of Hanunoo UCS Block """
+ ret = libxml2mod.xmlUCSIsHanunoo(code)
+ return ret
+
+def uCSIsHebrew(code):
+ """Check whether the character is part of Hebrew UCS Block """
+ ret = libxml2mod.xmlUCSIsHebrew(code)
+ return ret
+
+def uCSIsHighPrivateUseSurrogates(code):
+ """Check whether the character is part of
+ HighPrivateUseSurrogates UCS Block """
+ ret = libxml2mod.xmlUCSIsHighPrivateUseSurrogates(code)
+ return ret
+
+def uCSIsHighSurrogates(code):
+ """Check whether the character is part of HighSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsHighSurrogates(code)
+ return ret
+
+def uCSIsHiragana(code):
+ """Check whether the character is part of Hiragana UCS Block """
+ ret = libxml2mod.xmlUCSIsHiragana(code)
+ return ret
+
+def uCSIsIPAExtensions(code):
+ """Check whether the character is part of IPAExtensions UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsIPAExtensions(code)
+ return ret
+
+def uCSIsIdeographicDescriptionCharacters(code):
+ """Check whether the character is part of
+ IdeographicDescriptionCharacters UCS Block """
+ ret = libxml2mod.xmlUCSIsIdeographicDescriptionCharacters(code)
+ return ret
+
+def uCSIsKanbun(code):
+ """Check whether the character is part of Kanbun UCS Block """
+ ret = libxml2mod.xmlUCSIsKanbun(code)
+ return ret
+
+def uCSIsKangxiRadicals(code):
+ """Check whether the character is part of KangxiRadicals UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKangxiRadicals(code)
+ return ret
+
+def uCSIsKannada(code):
+ """Check whether the character is part of Kannada UCS Block """
+ ret = libxml2mod.xmlUCSIsKannada(code)
+ return ret
+
+def uCSIsKatakana(code):
+ """Check whether the character is part of Katakana UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakana(code)
+ return ret
+
+def uCSIsKatakanaPhoneticExtensions(code):
+ """Check whether the character is part of
+ KatakanaPhoneticExtensions UCS Block """
+ ret = libxml2mod.xmlUCSIsKatakanaPhoneticExtensions(code)
+ return ret
+
+def uCSIsKhmer(code):
+ """Check whether the character is part of Khmer UCS Block """
+ ret = libxml2mod.xmlUCSIsKhmer(code)
+ return ret
+
+def uCSIsKhmerSymbols(code):
+ """Check whether the character is part of KhmerSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsKhmerSymbols(code)
+ return ret
+
+def uCSIsLao(code):
+ """Check whether the character is part of Lao UCS Block """
+ ret = libxml2mod.xmlUCSIsLao(code)
+ return ret
+
+def uCSIsLatin1Supplement(code):
+ """Check whether the character is part of Latin-1Supplement
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLatin1Supplement(code)
+ return ret
+
+def uCSIsLatinExtendedA(code):
+ """Check whether the character is part of LatinExtended-A UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedA(code)
+ return ret
+
+def uCSIsLatinExtendedAdditional(code):
+ """Check whether the character is part of
+ LatinExtendedAdditional UCS Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code)
+ return ret
+
+def uCSIsLatinExtendedB(code):
+ """Check whether the character is part of LatinExtended-B UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLatinExtendedB(code)
+ return ret
+
+def uCSIsLetterlikeSymbols(code):
+ """Check whether the character is part of LetterlikeSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code)
+ return ret
+
+def uCSIsLimbu(code):
+ """Check whether the character is part of Limbu UCS Block """
+ ret = libxml2mod.xmlUCSIsLimbu(code)
+ return ret
+
+def uCSIsLinearBIdeograms(code):
+ """Check whether the character is part of LinearBIdeograms UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBIdeograms(code)
+ return ret
+
+def uCSIsLinearBSyllabary(code):
+ """Check whether the character is part of LinearBSyllabary UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLinearBSyllabary(code)
+ return ret
+
+def uCSIsLowSurrogates(code):
+ """Check whether the character is part of LowSurrogates UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsLowSurrogates(code)
+ return ret
+
+def uCSIsMalayalam(code):
+ """Check whether the character is part of Malayalam UCS Block """
+ ret = libxml2mod.xmlUCSIsMalayalam(code)
+ return ret
+
+def uCSIsMathematicalAlphanumericSymbols(code):
+ """Check whether the character is part of
+ MathematicalAlphanumericSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code)
+ return ret
+
+def uCSIsMathematicalOperators(code):
+ """Check whether the character is part of
+ MathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsMathematicalOperators(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsA(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-A UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsA(code)
+ return ret
+
+def uCSIsMiscellaneousMathematicalSymbolsB(code):
+ """Check whether the character is part of
+ MiscellaneousMathematicalSymbols-B UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousMathematicalSymbolsB(code)
+ return ret
+
+def uCSIsMiscellaneousSymbols(code):
+ """Check whether the character is part of MiscellaneousSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbols(code)
+ return ret
+
+def uCSIsMiscellaneousSymbolsandArrows(code):
+ """Check whether the character is part of
+ MiscellaneousSymbolsandArrows UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousSymbolsandArrows(code)
+ return ret
+
+def uCSIsMiscellaneousTechnical(code):
+ """Check whether the character is part of
+ MiscellaneousTechnical UCS Block """
+ ret = libxml2mod.xmlUCSIsMiscellaneousTechnical(code)
+ return ret
+
+def uCSIsMongolian(code):
+ """Check whether the character is part of Mongolian UCS Block """
+ ret = libxml2mod.xmlUCSIsMongolian(code)
+ return ret
+
+def uCSIsMusicalSymbols(code):
+ """Check whether the character is part of MusicalSymbols UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsMusicalSymbols(code)
+ return ret
+
+def uCSIsMyanmar(code):
+ """Check whether the character is part of Myanmar UCS Block """
+ ret = libxml2mod.xmlUCSIsMyanmar(code)
+ return ret
+
+def uCSIsNumberForms(code):
+ """Check whether the character is part of NumberForms UCS Block """
+ ret = libxml2mod.xmlUCSIsNumberForms(code)
+ return ret
+
+def uCSIsOgham(code):
+ """Check whether the character is part of Ogham UCS Block """
+ ret = libxml2mod.xmlUCSIsOgham(code)
+ return ret
+
+def uCSIsOldItalic(code):
+ """Check whether the character is part of OldItalic UCS Block """
+ ret = libxml2mod.xmlUCSIsOldItalic(code)
+ return ret
+
+def uCSIsOpticalCharacterRecognition(code):
+ """Check whether the character is part of
+ OpticalCharacterRecognition UCS Block """
+ ret = libxml2mod.xmlUCSIsOpticalCharacterRecognition(code)
+ return ret
+
+def uCSIsOriya(code):
+ """Check whether the character is part of Oriya UCS Block """
+ ret = libxml2mod.xmlUCSIsOriya(code)
+ return ret
+
+def uCSIsOsmanya(code):
+ """Check whether the character is part of Osmanya UCS Block """
+ ret = libxml2mod.xmlUCSIsOsmanya(code)
+ return ret
+
+def uCSIsPhoneticExtensions(code):
+ """Check whether the character is part of PhoneticExtensions
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsPhoneticExtensions(code)
+ return ret
+
+def uCSIsPrivateUse(code):
+ """Check whether the character is part of PrivateUse UCS Block """
+ ret = libxml2mod.xmlUCSIsPrivateUse(code)
+ return ret
+
+def uCSIsPrivateUseArea(code):
+ """Check whether the character is part of PrivateUseArea UCS
+ Block """
+ ret = libxml2mod.xmlUCSIsPrivateUseArea(code)
+ return ret
+
+def uCSIsRunic(code):
+ """Check whether the character is part of Runic UCS Block """
+ ret = libxml2mod.xmlUCSIsRunic(code)
+ return ret
+
+def uCSIsShavian(code):
+ """Check whether the character is part of Shavian UCS Block """
+ ret = libxml2mod.xmlUCSIsShavian(code)
+ return ret
+
+def uCSIsSinhala(code):
+ """Check whether the character is part of Sinhala UCS Block """
+ ret = libxml2mod.xmlUCSIsSinhala(code)
+ return ret
+
+def uCSIsSmallFormVariants(code):
+ """Check whether the character is part of SmallFormVariants
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSmallFormVariants(code)
+ return ret
+
+def uCSIsSpacingModifierLetters(code):
+ """Check whether the character is part of
+ SpacingModifierLetters UCS Block """
+ ret = libxml2mod.xmlUCSIsSpacingModifierLetters(code)
+ return ret
+
+def uCSIsSpecials(code):
+ """Check whether the character is part of Specials UCS Block """
+ ret = libxml2mod.xmlUCSIsSpecials(code)
+ return ret
+
+def uCSIsSuperscriptsandSubscripts(code):
+ """Check whether the character is part of
+ SuperscriptsandSubscripts UCS Block """
+ ret = libxml2mod.xmlUCSIsSuperscriptsandSubscripts(code)
+ return ret
+
+def uCSIsSupplementalArrowsA(code):
+ """Check whether the character is part of SupplementalArrows-A
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsA(code)
+ return ret
+
+def uCSIsSupplementalArrowsB(code):
+ """Check whether the character is part of SupplementalArrows-B
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalArrowsB(code)
+ return ret
+
+def uCSIsSupplementalMathematicalOperators(code):
+ """Check whether the character is part of
+ SupplementalMathematicalOperators UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementalMathematicalOperators(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaA(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-A UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaA(code)
+ return ret
+
+def uCSIsSupplementaryPrivateUseAreaB(code):
+ """Check whether the character is part of
+ SupplementaryPrivateUseArea-B UCS Block """
+ ret = libxml2mod.xmlUCSIsSupplementaryPrivateUseAreaB(code)
+ return ret
+
+def uCSIsSyriac(code):
+ """Check whether the character is part of Syriac UCS Block """
+ ret = libxml2mod.xmlUCSIsSyriac(code)
+ return ret
+
+def uCSIsTagalog(code):
+ """Check whether the character is part of Tagalog UCS Block """
+ ret = libxml2mod.xmlUCSIsTagalog(code)
+ return ret
+
+def uCSIsTagbanwa(code):
+ """Check whether the character is part of Tagbanwa UCS Block """
+ ret = libxml2mod.xmlUCSIsTagbanwa(code)
+ return ret
+
+def uCSIsTags(code):
+ """Check whether the character is part of Tags UCS Block """
+ ret = libxml2mod.xmlUCSIsTags(code)
+ return ret
+
+def uCSIsTaiLe(code):
+ """Check whether the character is part of TaiLe UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiLe(code)
+ return ret
+
+def uCSIsTaiXuanJingSymbols(code):
+ """Check whether the character is part of TaiXuanJingSymbols
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code)
+ return ret
+
+def uCSIsTamil(code):
+ """Check whether the character is part of Tamil UCS Block """
+ ret = libxml2mod.xmlUCSIsTamil(code)
+ return ret
+
+def uCSIsTelugu(code):
+ """Check whether the character is part of Telugu UCS Block """
+ ret = libxml2mod.xmlUCSIsTelugu(code)
+ return ret
+
+def uCSIsThaana(code):
+ """Check whether the character is part of Thaana UCS Block """
+ ret = libxml2mod.xmlUCSIsThaana(code)
+ return ret
+
+def uCSIsThai(code):
+ """Check whether the character is part of Thai UCS Block """
+ ret = libxml2mod.xmlUCSIsThai(code)
+ return ret
+
+def uCSIsTibetan(code):
+ """Check whether the character is part of Tibetan UCS Block """
+ ret = libxml2mod.xmlUCSIsTibetan(code)
+ return ret
+
+def uCSIsUgaritic(code):
+ """Check whether the character is part of Ugaritic UCS Block """
+ ret = libxml2mod.xmlUCSIsUgaritic(code)
+ return ret
+
+def uCSIsUnifiedCanadianAboriginalSyllabics(code):
+ """Check whether the character is part of
+ UnifiedCanadianAboriginalSyllabics UCS Block """
+ ret = libxml2mod.xmlUCSIsUnifiedCanadianAboriginalSyllabics(code)
+ return ret
+
+def uCSIsVariationSelectors(code):
+ """Check whether the character is part of VariationSelectors
+ UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectors(code)
+ return ret
+
+def uCSIsVariationSelectorsSupplement(code):
+ """Check whether the character is part of
+ VariationSelectorsSupplement UCS Block """
+ ret = libxml2mod.xmlUCSIsVariationSelectorsSupplement(code)
+ return ret
+
+def uCSIsYiRadicals(code):
+ """Check whether the character is part of YiRadicals UCS Block """
+ ret = libxml2mod.xmlUCSIsYiRadicals(code)
+ return ret
+
+def uCSIsYiSyllables(code):
+ """Check whether the character is part of YiSyllables UCS Block """
+ ret = libxml2mod.xmlUCSIsYiSyllables(code)
+ return ret
+
+def uCSIsYijingHexagramSymbols(code):
+ """Check whether the character is part of
+ YijingHexagramSymbols UCS Block """
+ ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code)
+ return ret
+
+#
+# Functions from module xmlversion
+#
+
+def checkVersion(version):
+ """check the compiled lib version against the include one.
+ This can warn or immediately kill the application """
+ libxml2mod.xmlCheckVersion(version)
+
+#
+# Functions from module xpathInternals
+#
+
+def valuePop(ctxt):
+ """Pops the top XPath object from the value stack """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.valuePop(ctxt__o)
+ return ret
+
+class xmlNode(xmlCore):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNode got a wrong wrapper object type')
+ self._o = _obj
+ xmlCore.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNode (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ # accessors for xmlNode
+ def ns(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def nsDefs(self):
+ """Get the namespace of a node """
+ ret = libxml2mod.xmlNodeGetNsDefs(self._o)
+ if ret is None:return None
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module debugXML
+ #
+
+ def debugDumpNode(self, output, depth):
+ """Dumps debug information for the element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNode(output, self._o, depth)
+
+ def debugDumpNodeList(self, output, depth):
+ """Dumps debug information for the list of element node, it is
+ recursive """
+ libxml2mod.xmlDebugDumpNodeList(output, self._o, depth)
+
+ def debugDumpOneNode(self, output, depth):
+ """Dumps debug information for the element node, it is not
+ recursive """
+ libxml2mod.xmlDebugDumpOneNode(output, self._o, depth)
+
+ def lsCountNode(self):
+ """Count the children of @node. """
+ ret = libxml2mod.xmlLsCountNode(self._o)
+ return ret
+
+ def lsOneNode(self, output):
+ """Dump to @output the type and name of @node. """
+ libxml2mod.xmlLsOneNode(output, self._o)
+
+ def shellPrintNode(self):
+ """Print node to the output FILE """
+ libxml2mod.xmlShellPrintNode(self._o)
+
+ #
+ # xmlNode functions from module tree
+ #
+
+ def addChild(self, cur):
+ """Add a new node to @parent, at the end of the child (or
+ property) list merging adjacent TEXT nodes (in which case
+ @cur is freed) If the new node is ATTRIBUTE, it is added
+ into properties instead of children. If there is an
+ attribute with equal name, it is first destroyed. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChild(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addChildList(self, cur):
+ """Add a list of node at the end of the child list of the
+ parent merging adjacent TEXT nodes (@cur may be freed) """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlAddChildList(self._o, cur__o)
+ if ret is None:raise treeError('xmlAddChildList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addContent(self, content):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContent(), @content is supposed to be
+ raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContent(self._o, content)
+
+ def addContentLen(self, content, len):
+ """Append the extra substring to the node content. NOTE: In
+ contrast to xmlNodeSetContentLen(), @content is supposed to
+ be raw text, so unescaped XML special chars are allowed,
+ entity references are not supported. """
+ libxml2mod.xmlNodeAddContentLen(self._o, content, len)
+
+ def addNextSibling(self, elem):
+ """Add a new node @elem as the next sibling of @cur If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. As a result of text
+ merging @elem may be freed. If the new node is ATTRIBUTE,
+ it is added into properties instead of children. If there
+ is an attribute with equal name, it is first destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddNextSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddNextSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addPrevSibling(self, elem):
+ """Add a new node @elem as the previous sibling of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ node was already inserted in a document it is first
+ unlinked from its existing context. If the new node is
+ ATTRIBUTE, it is added into properties instead of children.
+ If there is an attribute with equal name, it is first
+ destroyed. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddPrevSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddPrevSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def addSibling(self, elem):
+ """Add a new element @elem to the list of siblings of @cur
+ merging adjacent TEXT nodes (@elem may be freed) If the new
+ element was already inserted in a document it is first
+ unlinked from its existing context. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlAddSibling(self._o, elem__o)
+ if ret is None:raise treeError('xmlAddSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNode(self, extended):
+ """Do a copy of the node. """
+ ret = libxml2mod.xmlCopyNode(self._o, extended)
+ if ret is None:raise treeError('xmlCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self):
+ """Do a recursive copy of the node list. Use
+ xmlDocCopyNodeList() if possible to ensure string interning. """
+ ret = libxml2mod.xmlCopyNodeList(self._o)
+ if ret is None:raise treeError('xmlCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyProp(self, cur):
+ """Do a copy of the attribute. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyProp(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, cur):
+ """Do a copy of an attribute list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlCopyPropList(self._o, cur__o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def docCopyNode(self, doc, extended):
+ """Do a copy of the node to a given document. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNode(self._o, doc__o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docCopyNodeList(self, doc):
+ """Do a recursive copy of the node list. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocCopyNodeList(doc__o, self._o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def docSetRootElement(self, doc):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlDocSetRootElement(doc__o, self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def firstElementChild(self):
+ """Finds the first child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlFirstElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def freeNode(self):
+ """Free a node, this is a recursive behaviour, all the
+ children are freed too. This doesn't unlink the child from
+ the list, use xmlUnlinkNode() first. """
+ libxml2mod.xmlFreeNode(self._o)
+
+ def freeNodeList(self):
+ """Free a node and all its siblings, this is a recursive
+ behaviour, all the children are freed too. """
+ libxml2mod.xmlFreeNodeList(self._o)
+
+ def getBase(self, doc):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeGetBase(doc__o, self._o)
+ return ret
+
+ def getContent(self):
+ """Read the value of a node, this can be either the text
+ carried directly by this node if it's a TEXT node or the
+ aggregate string of the values carried by this node child's
+ (TEXT and ENTITY_REF). Entity references are substituted. """
+ ret = libxml2mod.xmlNodeGetContent(self._o)
+ return ret
+
+ def getLang(self):
+ """Searches the language of a node, i.e. the values of the
+ xml:lang attribute or the one carried by the nearest
+ ancestor. """
+ ret = libxml2mod.xmlNodeGetLang(self._o)
+ return ret
+
+ def getSpacePreserve(self):
+ """Searches the space preserving behaviour of a node, i.e. the
+ values of the xml:space attribute or the one carried by the
+ nearest ancestor. """
+ ret = libxml2mod.xmlNodeGetSpacePreserve(self._o)
+ return ret
+
+ def hasNsProp(self, name, nameSpace):
+ """Search for an attribute associated to a node This attribute
+ has to be anchored in the namespace specified. This does
+ the entity substitution. This function looks in DTD
+ attribute declaration for #FIXED or default declaration
+ values unless DTD use has been turned off. Note that a
+ namespace of None indicates to use the default namespace. """
+ ret = libxml2mod.xmlHasNsProp(self._o, name, nameSpace)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def hasProp(self, name):
+ """Search an attribute associated to a node This function also
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlHasProp(self._o, name)
+ if ret is None:return None
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isBlankNode(self):
+ """Checks whether this node is an empty or whitespace only
+ (and possibly ignorable) text-node. """
+ ret = libxml2mod.xmlIsBlankNode(self._o)
+ return ret
+
+ def isText(self):
+ """Is this node a Text node ? """
+ ret = libxml2mod.xmlNodeIsText(self._o)
+ return ret
+
+ def lastChild(self):
+ """Search the last child of a node. """
+ ret = libxml2mod.xmlGetLastChild(self._o)
+ if ret is None:raise treeError('xmlGetLastChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lastElementChild(self):
+ """Finds the last child node of that element which is a
+ Element node Note the handling of entities references is
+ different than in the W3C DOM element traversal spec since
+ we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlLastElementChild(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def lineNo(self):
+ """Get line number of @node. Try to override the limitation of
+ lines being store in 16 bits ints if XML_PARSE_BIG_LINES
+ parser option was used """
+ ret = libxml2mod.xmlGetLineNo(self._o)
+ return ret
+
+ def listGetRawString(self, doc, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetRawString(doc__o, self._o, inLine)
+ return ret
+
+ def listGetString(self, doc, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNodeListGetString(doc__o, self._o, inLine)
+ return ret
+
+ def newChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNs(self, href, prefix):
+ """Creation of a new Namespace. This function will refuse to
+ create a namespace with a similar prefix than an existing
+ one present on this node. Note that for a default
+ namespace, @prefix should be None. We use href==None in
+ the case of an element creation where the namespace was not
+ defined. """
+ ret = libxml2mod.xmlNewNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, ns, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newProp(self, name, value):
+ """Create a new property carried by a node. """
+ ret = libxml2mod.xmlNewProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, ns, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewTextChild(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nextElementSibling(self):
+ """Finds the first closest next sibling of the node which is
+ an element node. Note the handling of entities references
+ is different than in the W3C DOM element traversal spec
+ since we don't have back reference from entities content to
+ entities references. """
+ ret = libxml2mod.xmlNextElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def noNsProp(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. This
+ function is similar to xmlGetProp except it will accept
+ only an attribute in no namespace. """
+ ret = libxml2mod.xmlGetNoNsProp(self._o, name)
+ return ret
+
+ def nodePath(self):
+ """Build a structure based Path for the given node """
+ ret = libxml2mod.xmlGetNodePath(self._o)
+ return ret
+
+ def nsProp(self, name, nameSpace):
+ """Search and get the value of an attribute associated to a
+ node This attribute has to be anchored in the namespace
+ specified. This does the entity substitution. This function
+ looks in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off. """
+ ret = libxml2mod.xmlGetNsProp(self._o, name, nameSpace)
+ return ret
+
+ def previousElementSibling(self):
+ """Finds the first closest previous sibling of the node which
+ is an element node. Note the handling of entities
+ references is different than in the W3C DOM element
+ traversal spec since we don't have back reference from
+ entities content to entities references. """
+ ret = libxml2mod.xmlPreviousElementSibling(self._o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def prop(self, name):
+ """Search and get the value of an attribute associated to a
+ node This does the entity substitution. This function looks
+ in DTD attribute declaration for #FIXED or default
+ declaration values unless DTD use has been turned off.
+ NOTE: this function acts independently of namespaces
+ associated to the attribute. Use xmlGetNsProp() or
+ xmlGetNoNsProp() for namespace aware processing. """
+ ret = libxml2mod.xmlGetProp(self._o, name)
+ return ret
+
+ def reconciliateNs(self, doc):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReconciliateNs(doc__o, self._o)
+ return ret
+
+ def replaceNode(self, cur):
+ """Unlink the old node from its current context, prune the new
+ one at the same place. If @cur was already inserted in a
+ document it is first unlinked from its existing context. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlReplaceNode(self._o, cur__o)
+ if ret is None:raise treeError('xmlReplaceNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def searchNs(self, doc, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNs(doc__o, self._o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, doc, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSearchNsByHref(doc__o, self._o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setBase(self, uri):
+ """Set (or reset) the base URI of a node, i.e. the value of
+ the xml:base attribute. """
+ libxml2mod.xmlNodeSetBase(self._o, uri)
+
+ def setContent(self, content):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContent(self._o, content)
+
+ def setContentLen(self, content, len):
+ """Replace the content of a node. NOTE: @content is supposed
+ to be a piece of XML CDATA, so it allows entity references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). """
+ libxml2mod.xmlNodeSetContentLen(self._o, content, len)
+
+ def setLang(self, lang):
+ """Set the language of a node, i.e. the values of the xml:lang
+ attribute. """
+ libxml2mod.xmlNodeSetLang(self._o, lang)
+
+ def setListDoc(self, doc):
+ """update all nodes in the list to point to the right document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetListDoc(self._o, doc__o)
+
+ def setName(self, name):
+ """Set (or reset) the name of a node. """
+ libxml2mod.xmlNodeSetName(self._o, name)
+
+ def setNs(self, ns):
+ """Associate a namespace to a node, a posteriori. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ libxml2mod.xmlSetNs(self._o, ns__o)
+
+ def setNsProp(self, ns, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setProp(self, name, value):
+ """Set (or reset) an attribute carried by a node. If @name has
+ a prefix, then the corresponding namespace-binding will be
+ used, if in scope; it is an error it there's no such
+ ns-binding for the prefix in scope. """
+ ret = libxml2mod.xmlSetProp(self._o, name, value)
+ if ret is None:raise treeError('xmlSetProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def setSpacePreserve(self, val):
+ """Set (or reset) the space preserving behaviour of a node,
+ i.e. the value of the xml:space attribute. """
+ libxml2mod.xmlNodeSetSpacePreserve(self._o, val)
+
+ def setTreeDoc(self, doc):
+ """update all nodes under the tree to point to the right
+ document """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlSetTreeDoc(self._o, doc__o)
+
+ def textConcat(self, content, len):
+ """Concat the given string at the end of the existing node
+ content """
+ ret = libxml2mod.xmlTextConcat(self._o, content, len)
+ return ret
+
+ def textMerge(self, second):
+ """Merge two text nodes into one """
+ if second is None: second__o = None
+ else: second__o = second._o
+ ret = libxml2mod.xmlTextMerge(self._o, second__o)
+ if ret is None:raise treeError('xmlTextMerge() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def unlinkNode(self):
+ """Unlink a node from it's current context, the node is not
+ freed If one need to free the node, use xmlFreeNode()
+ routine after the unlink to discard it. Note that namespace
+ nodes can't be unlinked as they do not have pointer to
+ their parent. """
+ libxml2mod.xmlUnlinkNode(self._o)
+
+ def unsetNsProp(self, ns, name):
+ """Remove an attribute carried by a node. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlUnsetNsProp(self._o, ns__o, name)
+ return ret
+
+ def unsetProp(self, name):
+ """Remove an attribute carried by a node. This handles only
+ attributes in no namespace. """
+ ret = libxml2mod.xmlUnsetProp(self._o, name)
+ return ret
+
+ #
+ # xmlNode functions from module valid
+ #
+
+ def isID(self, doc, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(doc__o, self._o, attr__o)
+ return ret
+
+ def isRef(self, doc, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(doc__o, self._o, attr__o)
+ return ret
+
+ def validNormalizeAttributeValue(self, doc, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(doc__o, self._o, name, value)
+ return ret
+
+ #
+ # xmlNode functions from module xinclude
+ #
+
+ def xincludeProcessTree(self):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTree(self._o)
+ return ret
+
+ def xincludeProcessTreeFlags(self, flags):
+ """Implement the XInclude substitution for the given subtree """
+ ret = libxml2mod.xmlXIncludeProcessTreeFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlNode functions from module xmlschemas
+ #
+
+ def schemaValidateOneElement(self, ctxt):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlNode functions from module xpath
+ #
+
+ def xpathCastNodeToNumber(self):
+ """Converts a node to its number value """
+ ret = libxml2mod.xmlXPathCastNodeToNumber(self._o)
+ return ret
+
+ def xpathCastNodeToString(self):
+ """Converts a node to its string value. """
+ ret = libxml2mod.xmlXPathCastNodeToString(self._o)
+ return ret
+
+ def xpathCmpNodes(self, node2):
+ """Compare two nodes w.r.t document order """
+ if node2 is None: node2__o = None
+ else: node2__o = node2._o
+ ret = libxml2mod.xmlXPathCmpNodes(self._o, node2__o)
+ return ret
+
+ def xpathNodeEval(self, str, ctx):
+ """Evaluate the XPath Location Path in the given context. The
+ node 'node' is set as the context node. The context node is
+ not restored. """
+ if ctx is None: ctx__o = None
+ else: ctx__o = ctx._o
+ ret = libxml2mod.xmlXPathNodeEval(self._o, str, ctx__o)
+ if ret is None:raise xpathError('xmlXPathNodeEval() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xmlNode functions from module xpathInternals
+ #
+
+ def xpathNewNodeSet(self):
+ """Create a new xmlXPathObjectPtr of type NodeSet and
+ initialize it with the single Node @val """
+ ret = libxml2mod.xmlXPathNewNodeSet(self._o)
+ if ret is None:raise xpathError('xmlXPathNewNodeSet() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNewValueTree(self):
+ """Create a new xmlXPathObjectPtr of type Value Tree (XSLT)
+ and initialize it with the tree root @val """
+ ret = libxml2mod.xmlXPathNewValueTree(self._o)
+ if ret is None:raise xpathError('xmlXPathNewValueTree() failed')
+ return xpathObjectRet(ret)
+
+ def xpathNextAncestor(self, ctxt):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestor(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, ctxt):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, ctxt):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextAttribute(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, ctxt):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextChild(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, ctxt):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, ctxt):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, ctxt):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowing(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, ctxt):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, ctxt):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextNamespace(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, ctxt):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextParent(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, ctxt):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPreceding(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, ctxt):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, ctxt):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlXPathNextSelf(ctxt__o, self._o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlNode functions from module xpointer
+ #
+
+ def xpointerNewCollapsedRange(self):
+ """Create a new xmlXPathObjectPtr of type range using a single
+ nodes """
+ ret = libxml2mod.xmlXPtrNewCollapsedRange(self._o)
+ if ret is None:raise treeError('xmlXPtrNewCollapsedRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewContext(self, doc, origin):
+ """Create a new XPointer context """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(doc__o, self._o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpointerNewLocationSetNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type LocationSet and
+ initialize it with the single range made of the two nodes
+ @start and @end """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewLocationSetNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewLocationSetNodes() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRange(self, startindex, end, endindex):
+ """Create a new xmlXPathObjectPtr of type range """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRange(self._o, startindex, end__o, endindex)
+ if ret is None:raise treeError('xmlXPtrNewRange() failed')
+ return xpathObjectRet(ret)
+
+ def xpointerNewRangeNodes(self, end):
+ """Create a new xmlXPathObjectPtr of type range using 2 nodes """
+ if end is None: end__o = None
+ else: end__o = end._o
+ ret = libxml2mod.xmlXPtrNewRangeNodes(self._o, end__o)
+ if ret is None:raise treeError('xmlXPtrNewRangeNodes() failed')
+ return xpathObjectRet(ret)
+
+class xmlDoc(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDoc got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDoc (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDoc functions from module HTMLparser
+ #
+
+ def htmlAutoCloseTag(self, name, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if the element or one of it's children would
+ autoclose the given tag. """
+ ret = libxml2mod.htmlAutoCloseTag(self._o, name, elem)
+ return ret
+
+ def htmlIsAutoClosed(self, elem):
+ """The HTML DTD allows a tag to implicitly close other tags.
+ The list is kept in htmlStartClose array. This function
+ checks if a tag is autoclosed by one of it's child """
+ ret = libxml2mod.htmlIsAutoClosed(self._o, elem)
+ return ret
+
+ #
+ # xmlDoc functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, buf, encoding, format):
+ """Dump an HTML document. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpFormatOutput(buf__o, self._o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, buf, encoding):
+ """Dump an HTML document. Formating return/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ libxml2mod.htmlDocContentDumpOutput(buf__o, self._o, encoding)
+
+ def htmlDocDump(self, f):
+ """Dump an HTML document to an open FILE. """
+ ret = libxml2mod.htmlDocDump(f, self._o)
+ return ret
+
+ def htmlGetMetaEncoding(self):
+ """Encoding definition lookup in the Meta tags """
+ ret = libxml2mod.htmlGetMetaEncoding(self._o)
+ return ret
+
+ def htmlNodeDumpFile(self, out, cur):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFile(out, self._o, cur__o)
+
+ def htmlNodeDumpFileFormat(self, out, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. TODO: if encoding == None try to save in the doc
+ encoding """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.htmlNodeDumpFileFormat(out, self._o, cur__o, encoding, format)
+ return ret
+
+ def htmlNodeDumpFormatOutput(self, buf, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(buf__o, self._o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, buf, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(buf__o, self._o, cur__o, encoding)
+
+ def htmlSaveFile(self, filename):
+ """Dump an HTML document to a file. If @filename is "-" the
+ stdout file is used. """
+ ret = libxml2mod.htmlSaveFile(filename, self._o)
+ return ret
+
+ def htmlSaveFileEnc(self, filename, encoding):
+ """Dump an HTML document to a file using a given encoding and
+ formatting returns/spaces are added. """
+ ret = libxml2mod.htmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def htmlSaveFileFormat(self, filename, encoding, format):
+ """Dump an HTML document to a file using a given encoding. """
+ ret = libxml2mod.htmlSaveFileFormat(filename, self._o, encoding, format)
+ return ret
+
+ def htmlSetMetaEncoding(self, encoding):
+ """Sets the current encoding in the Meta tags NOTE: this will
+ not change the document content encoding, just the META
+ flag associated. """
+ ret = libxml2mod.htmlSetMetaEncoding(self._o, encoding)
+ return ret
+
+ #
+ # xmlDoc functions from module debugXML
+ #
+
+ def debugCheckDocument(self, output):
+ """Check the document for potential content problems, and
+ output the errors to @output """
+ ret = libxml2mod.xmlDebugCheckDocument(output, self._o)
+ return ret
+
+ def debugDumpDocument(self, output):
+ """Dumps debug information for the document, it's recursive """
+ libxml2mod.xmlDebugDumpDocument(output, self._o)
+
+ def debugDumpDocumentHead(self, output):
+ """Dumps debug information cncerning the document, not
+ recursive """
+ libxml2mod.xmlDebugDumpDocumentHead(output, self._o)
+
+ def debugDumpEntities(self, output):
+ """Dumps debug information for all the entities in use by the
+ document """
+ libxml2mod.xmlDebugDumpEntities(output, self._o)
+
+ #
+ # xmlDoc functions from module entities
+ #
+
+ def addDocEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document. """
+ ret = libxml2mod.xmlAddDocEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def addDtdEntity(self, name, type, ExternalID, SystemID, content):
+ """Register a new entity for this document DTD external subset. """
+ ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlAddDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def docEntity(self, name):
+ """Do an entity lookup in the document entity hash table and """
+ ret = libxml2mod.xmlGetDocEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDocEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def dtdEntity(self, name):
+ """Do an entity lookup in the DTD entity hash table and """
+ ret = libxml2mod.xmlGetDtdEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def encodeEntities(self, input):
+ """TODO: remove xmlEncodeEntities, once we are not afraid of
+ breaking binary compatibility People must migrate their
+ code to xmlEncodeEntitiesReentrant ! This routine will
+ issue a warning when encountered. """
+ ret = libxml2mod.xmlEncodeEntities(self._o, input)
+ return ret
+
+ def encodeEntitiesReentrant(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities and non ASCII values with their entities and
+ CharRef counterparts. Contrary to xmlEncodeEntities, this
+ routine is reentrant, and result must be deallocated. """
+ ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
+ return ret
+
+ def encodeSpecialChars(self, input):
+ """Do a global encoding of a string, replacing the predefined
+ entities this routine is reentrant, and result must be
+ deallocated. """
+ ret = libxml2mod.xmlEncodeSpecialChars(self._o, input)
+ return ret
+
+ def newEntity(self, name, type, ExternalID, SystemID, content):
+ """Create a new entity, this differs from xmlAddDocEntity()
+ that if the document is None or has no internal subset
+ defined, then an unlinked entity structure will be
+ returned, it is then the responsability of the caller to
+ link it to the document later or free it when not needed
+ anymore. """
+ ret = libxml2mod.xmlNewEntity(self._o, name, type, ExternalID, SystemID, content)
+ if ret is None:raise treeError('xmlNewEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parameterEntity(self, name):
+ """Do an entity lookup in the internal and external subsets and """
+ ret = libxml2mod.xmlGetParameterEntity(self._o, name)
+ if ret is None:raise treeError('xmlGetParameterEntity() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module relaxng
+ #
+
+ def relaxNGNewDocParserCtxt(self):
+ """Create an XML RelaxNGs parser context for that document.
+ Note: since the process of compiling a RelaxNG schemas
+ modifies the document, the @doc parameter is duplicated
+ internally. """
+ ret = libxml2mod.xmlRelaxNGNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlRelaxNGNewDocParserCtxt() failed')
+ __tmp = relaxNgParserCtxt(_obj=ret)
+ return __tmp
+
+ def relaxNGValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(ctxt__o, self._o)
+ return ret
+
+ def relaxNGValidateFullElement(self, ctxt, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, ctxt, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def relaxNGValidatePushElement(self, ctxt, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ #
+ # xmlDoc functions from module tree
+ #
+
+ def copyDoc(self, recursive):
+ """Do a copy of the document info. If recursive, the content
+ tree will be copied too as well as DTD, namespaces and
+ entities. """
+ ret = libxml2mod.xmlCopyDoc(self._o, recursive)
+ if ret is None:raise treeError('xmlCopyDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def copyNode(self, node, extended):
+ """Do a copy of the node to a given document. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNode(node__o, self._o, extended)
+ if ret is None:raise treeError('xmlDocCopyNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def copyNodeList(self, node):
+ """Do a recursive copy of the node list. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlDocCopyNodeList(self._o, node__o)
+ if ret is None:raise treeError('xmlDocCopyNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def createIntSubset(self, name, ExternalID, SystemID):
+ """Create the internal subset of a document """
+ ret = libxml2mod.xmlCreateIntSubset(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlCreateIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def docCompressMode(self):
+ """get the compression ratio for a document, ZLIB based """
+ ret = libxml2mod.xmlGetDocCompressMode(self._o)
+ return ret
+
+ def dump(self, f):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocDump(f, self._o)
+ return ret
+
+ def elemDump(self, f, cur):
+ """Dump an XML/HTML node, recursive behaviour, children are
+ printed too. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlElemDump(f, self._o, cur__o)
+
+ def formatDump(self, f, format):
+ """Dump an XML document to an open FILE. """
+ ret = libxml2mod.xmlDocFormatDump(f, self._o, format)
+ return ret
+
+ def freeDoc(self):
+ """Free up all the structures used by a document, tree
+ included. """
+ libxml2mod.xmlFreeDoc(self._o)
+
+ def getRootElement(self):
+ """Get the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ ret = libxml2mod.xmlDocGetRootElement(self._o)
+ if ret is None:raise treeError('xmlDocGetRootElement() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def intSubset(self):
+ """Get the internal subset of a document """
+ ret = libxml2mod.xmlGetIntSubset(self._o)
+ if ret is None:raise treeError('xmlGetIntSubset() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newCDataBlock(self, content, len):
+ """Creation of a new node containing a CDATA block. """
+ ret = libxml2mod.xmlNewCDataBlock(self._o, content, len)
+ if ret is None:raise treeError('xmlNewCDataBlock() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newCharRef(self, name):
+ """Creation of a new character reference node. """
+ ret = libxml2mod.xmlNewCharRef(self._o, name)
+ if ret is None:raise treeError('xmlNewCharRef() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocComment(self, content):
+ """Creation of a new node containing a comment within a
+ document. """
+ ret = libxml2mod.xmlNewDocComment(self._o, content)
+ if ret is None:raise treeError('xmlNewDocComment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocFragment(self):
+ """Creation of a new Fragment node. """
+ ret = libxml2mod.xmlNewDocFragment(self._o)
+ if ret is None:raise treeError('xmlNewDocFragment() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocNodeEatName(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocPI(self, name, content):
+ """Creation of a processing instruction element. """
+ ret = libxml2mod.xmlNewDocPI(self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocPI() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocProp(self, name, value):
+ """Create a new property carried by a document. """
+ ret = libxml2mod.xmlNewDocProp(self._o, name, value)
+ if ret is None:raise treeError('xmlNewDocProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, ns, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocText(self, content):
+ """Creation of a new text node within a document. """
+ ret = libxml2mod.xmlNewDocText(self._o, content)
+ if ret is None:raise treeError('xmlNewDocText() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocTextLen(self, content, len):
+ """Creation of a new text node with an extra content length
+ parameter. The text node pertain to a given document. """
+ ret = libxml2mod.xmlNewDocTextLen(self._o, content, len)
+ if ret is None:raise treeError('xmlNewDocTextLen() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDtd(self, name, ExternalID, SystemID):
+ """Creation of a new DTD for the external subset. To create an
+ internal subset, use xmlCreateIntSubset(). """
+ ret = libxml2mod.xmlNewDtd(self._o, name, ExternalID, SystemID)
+ if ret is None:raise treeError('xmlNewDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def newGlobalNs(self, href, prefix):
+ """Creation of a Namespace, the old way using PI and without
+ scoping DEPRECATED !!! """
+ ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)
+ if ret is None:raise treeError('xmlNewGlobalNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def newReference(self, name):
+ """Creation of a new reference node. """
+ ret = libxml2mod.xmlNewReference(self._o, name)
+ if ret is None:raise treeError('xmlNewReference() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def nodeDumpOutput(self, buf, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(buf__o, self._o, cur__o, level, format, encoding)
+
+ def nodeGetBase(self, cur):
+ """Searches for the BASE URL. The code should work on both XML
+ and HTML document even if base mechanisms are completely
+ different. It returns the base as defined in RFC 2396
+ sections 5.1.1. Base URI within Document Content and 5.1.2.
+ Base URI from the Encapsulating Entity However it does not
+ return the document base (5.1.3), use doc->URL in this case """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlNodeGetBase(self._o, cur__o)
+ return ret
+
+ def nodeListGetRawString(self, list, inLine):
+ """Builds the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs, contrary to
+ xmlNodeListGetString() this function doesn't do any
+ character encoding handling. """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
+ return ret
+
+ def nodeListGetString(self, list, inLine):
+ """Build the string equivalent to the text contained in the
+ Node list made of TEXTs and ENTITY_REFs """
+ if list is None: list__o = None
+ else: list__o = list._o
+ ret = libxml2mod.xmlNodeListGetString(self._o, list__o, inLine)
+ return ret
+
+ def reconciliateNs(self, tree):
+ """This function checks that all the namespaces declared
+ within the given tree are properly declared. This is needed
+ for example after Copy or Cut and then paste operations.
+ The subtree may still hold pointers to namespace
+ declarations outside the subtree or invalid/masked. As much
+ as possible the function try to reuse the existing
+ namespaces found in the new environment. If not possible
+ the new namespaces are redeclared on @tree at the top of
+ the given subtree. """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ ret = libxml2mod.xmlReconciliateNs(self._o, tree__o)
+ return ret
+
+ def saveFile(self, filename):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. """
+ ret = libxml2mod.xmlSaveFile(filename, self._o)
+ return ret
+
+ def saveFileEnc(self, filename, encoding):
+ """Dump an XML document, converting it to the given encoding """
+ ret = libxml2mod.xmlSaveFileEnc(filename, self._o, encoding)
+ return ret
+
+ def saveFileTo(self, buf, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFileTo(buf__o, self._o, encoding)
+ return ret
+
+ def saveFormatFile(self, filename, format):
+ """Dump an XML document to a file. Will use compression if
+ compiled in and enabled. If @filename is "-" the stdout
+ file is used. If @format is set then the document will be
+ indented on output. Note that @format = 1 provide node
+ indenting only if xmlIndentTreeOutput = 1 or
+ xmlKeepBlanksDefault(0) was called """
+ ret = libxml2mod.xmlSaveFormatFile(filename, self._o, format)
+ return ret
+
+ def saveFormatFileEnc(self, filename, encoding, format):
+ """Dump an XML document to a file or an URL. """
+ ret = libxml2mod.xmlSaveFormatFileEnc(filename, self._o, encoding, format)
+ return ret
+
+ def saveFormatFileTo(self, buf, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if buf is None: buf__o = None
+ else: buf__o = buf._o
+ ret = libxml2mod.xmlSaveFormatFileTo(buf__o, self._o, encoding, format)
+ return ret
+
+ def searchNs(self, node, nameSpace):
+ """Search a Ns registered under a given name space for a
+ document. recurse on the parents until it finds the defined
+ namespace or return None otherwise. @nameSpace can be None,
+ this is a search for the default namespace. We don't allow
+ to cross entities boundaries. If you don't declare the
+ namespace within those you will be in troubles !!! A
+ warning is generated to cover this case. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNs(self._o, node__o, nameSpace)
+ if ret is None:raise treeError('xmlSearchNs() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def searchNsByHref(self, node, href):
+ """Search a Ns aliasing a given URI. Recurse on the parents
+ until it finds the defined namespace or return None
+ otherwise. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSearchNsByHref(self._o, node__o, href)
+ if ret is None:raise treeError('xmlSearchNsByHref() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def setDocCompressMode(self, mode):
+ """set the compression ratio for a document, ZLIB based
+ Correct values: 0 (uncompressed) to 9 (max compression) """
+ libxml2mod.xmlSetDocCompressMode(self._o, mode)
+
+ def setListDoc(self, list):
+ """update all nodes in the list to point to the right document """
+ if list is None: list__o = None
+ else: list__o = list._o
+ libxml2mod.xmlSetListDoc(list__o, self._o)
+
+ def setRootElement(self, root):
+ """Set the root element of the document (doc->children is a
+ list containing possibly comments, PIs, etc ...). """
+ if root is None: root__o = None
+ else: root__o = root._o
+ ret = libxml2mod.xmlDocSetRootElement(self._o, root__o)
+ if ret is None:return None
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setTreeDoc(self, tree):
+ """update all nodes under the tree to point to the right
+ document """
+ if tree is None: tree__o = None
+ else: tree__o = tree._o
+ libxml2mod.xmlSetTreeDoc(tree__o, self._o)
+
+ def stringGetNodeList(self, value):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringGetNodeList(self._o, value)
+ if ret is None:raise treeError('xmlStringGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def stringLenGetNodeList(self, value, len):
+ """Parse the value string and build the node list associated.
+ Should produce a flat tree with only TEXTs and ENTITY_REFs. """
+ ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len)
+ if ret is None:raise treeError('xmlStringLenGetNodeList() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module valid
+ #
+
+ def ID(self, ID):
+ """Search the attribute declaring the given ID """
+ ret = libxml2mod.xmlGetID(self._o, ID)
+ if ret is None:raise treeError('xmlGetID() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def isID(self, elem, attr):
+ """Determine whether an attribute is of type ID. In case we
+ have DTD(s) then this is done if DTD loading has been
+ requested. In the case of HTML documents parsed with the
+ HTML parser, then ID detection is done systematically. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsID(self._o, elem__o, attr__o)
+ return ret
+
+ def isMixedElement(self, name):
+ """Search in the DtDs whether an element accept Mixed content
+ (or ANY) basically if it is supposed to accept text childs """
+ ret = libxml2mod.xmlIsMixedElement(self._o, name)
+ return ret
+
+ def isRef(self, elem, attr):
+ """Determine whether an attribute is of type Ref. In case we
+ have DTD(s) then this is simple, otherwise we use an
+ heuristic: name Ref (upper or lowercase). """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlIsRef(self._o, elem__o, attr__o)
+ return ret
+
+ def removeID(self, attr):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveID(self._o, attr__o)
+ return ret
+
+ def removeRef(self, attr):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlRemoveRef(self._o, attr__o)
+ return ret
+
+ def validCtxtNormalizeAttributeValue(self, ctxt, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(ctxt__o, self._o, elem__o, name, value)
+ return ret
+
+ def validNormalizeAttributeValue(self, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidNormalizeAttributeValue(self._o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, ctxt):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocument(ctxt__o, self._o)
+ return ret
+
+ def validateDocumentFinal(self, ctxt):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDocumentFinal(ctxt__o, self._o)
+ return ret
+
+ def validateDtd(self, ctxt, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(ctxt__o, self._o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, ctxt):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateDtdFinal(ctxt__o, self._o)
+ return ret
+
+ def validateElement(self, ctxt, elem):
+ """Try to validate the subtree under an element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateNotationUse(self, ctxt, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateNotationUse(ctxt__o, self._o, notationName)
+ return ret
+
+ def validateOneAttribute(self, ctxt, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(ctxt__o, self._o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, ctxt, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(ctxt__o, self._o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, ctxt, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(ctxt__o, self._o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, ctxt, elem, qname):
+ """Pop the element end from the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validatePushElement(self, ctxt, elem, qname):
+ """Push a new element start on the validation stack. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(ctxt__o, self._o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, ctxt):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlValidateRoot(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xinclude
+ #
+
+ def xincludeProcess(self):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcess(self._o)
+ return ret
+
+ def xincludeProcessFlags(self, flags):
+ """Implement the XInclude substitution on the XML document @doc """
+ ret = libxml2mod.xmlXIncludeProcessFlags(self._o, flags)
+ return ret
+
+ #
+ # xmlDoc functions from module xmlreader
+ #
+
+ def NewWalker(self, reader):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
+ return ret
+
+ def readerWalker(self):
+ """Create an xmltextReader for a preparsed document. """
+ ret = libxml2mod.xmlReaderWalker(self._o)
+ if ret is None:raise treeError('xmlReaderWalker() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ return __tmp
+
+ #
+ # xmlDoc functions from module xmlschemas
+ #
+
+ def schemaNewDocParserCtxt(self):
+ """Create an XML Schemas parse context for that document. NB.
+ The document may be modified during the parsing process. """
+ ret = libxml2mod.xmlSchemaNewDocParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaNewDocParserCtxt() failed')
+ __tmp = SchemaParserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, ctxt):
+ """Validate a document tree in memory. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlSchemaValidateDoc(ctxt__o, self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpath
+ #
+
+ def xpathNewContext(self):
+ """Create a new xmlXPathContext """
+ ret = libxml2mod.xmlXPathNewContext(self._o)
+ if ret is None:raise xpathError('xmlXPathNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ def xpathOrderDocElems(self):
+ """Call this routine to speed up XPath computation on static
+ documents. This stamps all the element nodes with the
+ document order Like for line information, the order is kept
+ in the element->content field, the value stored is actually
+ - the node number (starting at -1) to be able to
+ differentiate from line numbers. """
+ ret = libxml2mod.xmlXPathOrderDocElems(self._o)
+ return ret
+
+ #
+ # xmlDoc functions from module xpointer
+ #
+
+ def xpointerNewContext(self, here, origin):
+ """Create a new XPointer context """
+ if here is None: here__o = None
+ else: here__o = here._o
+ if origin is None: origin__o = None
+ else: origin__o = origin._o
+ ret = libxml2mod.xmlXPtrNewContext(self._o, here__o, origin__o)
+ if ret is None:raise treeError('xmlXPtrNewContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+class parserCtxt(parserCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ parserCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserCtxt(self._o)
+ self._o = None
+
+ # accessors for parserCtxt
+ def doc(self):
+ """Get the document tree from a parser context. """
+ ret = libxml2mod.xmlParserGetDoc(self._o)
+ if ret is None:raise parserError('xmlParserGetDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def isValid(self):
+ """Get the validity information from a parser context. """
+ ret = libxml2mod.xmlParserGetIsValid(self._o)
+ return ret
+
+ def lineNumbers(self, linenumbers):
+ """Switch on the generation of line number for elements nodes. """
+ libxml2mod.xmlParserSetLineNumbers(self._o, linenumbers)
+
+ def loadSubset(self, loadsubset):
+ """Switch the parser to load the DTD without validating. """
+ libxml2mod.xmlParserSetLoadSubset(self._o, loadsubset)
+
+ def pedantic(self, pedantic):
+ """Switch the parser to be pedantic. """
+ libxml2mod.xmlParserSetPedantic(self._o, pedantic)
+
+ def replaceEntities(self, replaceEntities):
+ """Switch the parser to replace entities. """
+ libxml2mod.xmlParserSetReplaceEntities(self._o, replaceEntities)
+
+ def validate(self, validate):
+ """Switch the parser to validation mode. """
+ libxml2mod.xmlParserSetValidate(self._o, validate)
+
+ def wellFormed(self):
+ """Get the well formed information from a parser context. """
+ ret = libxml2mod.xmlParserGetWellFormed(self._o)
+ return ret
+
+ #
+ # parserCtxt functions from module HTMLparser
+ #
+
+ def htmlCtxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.htmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('htmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def htmlCtxtReset(self):
+ """Reset a parser context """
+ libxml2mod.htmlCtxtReset(self._o)
+
+ def htmlCtxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.htmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def htmlFreeParserCtxt(self):
+ """Free all the memory used by a parser context. However the
+ parsed document in ctxt->myDoc is not freed. """
+ libxml2mod.htmlFreeParserCtxt(self._o)
+
+ def htmlParseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' """
+ ret = libxml2mod.htmlParseCharRef(self._o)
+ return ret
+
+ def htmlParseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.htmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def htmlParseDocument(self):
+ """parse an HTML document (and build a tree if using the
+ standard SAX interface). """
+ ret = libxml2mod.htmlParseDocument(self._o)
+ return ret
+
+ def htmlParseElement(self):
+ """parse an HTML element, this is highly recursive this is
+ kept for compatibility with previous code versions [39]
+ element ::= EmptyElemTag | STag content ETag [41]
+ Attribute ::= Name Eq AttValue """
+ libxml2mod.htmlParseElement(self._o)
+
+ #
+ # parserCtxt functions from module parser
+ #
+
+ def byteConsumed(self):
+ """This function provides the current index of the parser
+ relative to the start of the current entity. This function
+ is computed in bytes from the beginning starting at zero
+ and finishing at the size in byte of the file if parsing a
+ file. The function is of constant cost if the input is
+ UTF-8 but can be costly if run on non-UTF-8 input. """
+ ret = libxml2mod.xmlByteConsumed(self._o)
+ return ret
+
+ def clearParserCtxt(self):
+ """Clear (release owned resources) and reinitialize a parser
+ context """
+ libxml2mod.xmlClearParserCtxt(self._o)
+
+ def ctxtReadDoc(self, cur, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadDoc(self._o, cur, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFd(self, fd, URL, encoding, options):
+ """parse an XML from a file descriptor and build a tree. This
+ reuses the existing @ctxt parser context NOTE that the file
+ descriptor will not be closed when the reader is closed or
+ reset. """
+ ret = libxml2mod.xmlCtxtReadFd(self._o, fd, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFd() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadFile(self._o, filename, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadFile() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReadMemory(self, buffer, size, URL, encoding, options):
+ """parse an XML in-memory document and build a tree. This
+ reuses the existing @ctxt parser context """
+ ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options)
+ if ret is None:raise treeError('xmlCtxtReadMemory() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def ctxtReset(self):
+ """Reset a parser context """
+ libxml2mod.xmlCtxtReset(self._o)
+
+ def ctxtResetPush(self, chunk, size, filename, encoding):
+ """Reset a push parser context """
+ ret = libxml2mod.xmlCtxtResetPush(self._o, chunk, size, filename, encoding)
+ return ret
+
+ def ctxtUseOptions(self, options):
+ """Applies the options to the parser context """
+ ret = libxml2mod.xmlCtxtUseOptions(self._o, options)
+ return ret
+
+ def initParserCtxt(self):
+ """Initialize a parser context """
+ ret = libxml2mod.xmlInitParserCtxt(self._o)
+ return ret
+
+ def parseChunk(self, chunk, size, terminate):
+ """Parse a Chunk of memory """
+ ret = libxml2mod.xmlParseChunk(self._o, chunk, size, terminate)
+ return ret
+
+ def parseDocument(self):
+ """parse an XML document (and build a tree if using the
+ standard SAX interface). [1] document ::= prolog element
+ Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? """
+ ret = libxml2mod.xmlParseDocument(self._o)
+ return ret
+
+ def parseExtParsedEnt(self):
+ """parse a general parsed entity An external general parsed
+ entity is well-formed if it matches the production labeled
+ extParsedEnt. [78] extParsedEnt ::= TextDecl? content """
+ ret = libxml2mod.xmlParseExtParsedEnt(self._o)
+ return ret
+
+ def setupParserForBuffer(self, buffer, filename):
+ """Setup the parser context to parse a new buffer; Clears any
+ prior contents from the parser context. The buffer
+ parameter must not be None, but the filename parameter can
+ be """
+ libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)
+
+ def stopParser(self):
+ """Blocks further parser processing """
+ libxml2mod.xmlStopParser(self._o)
+
+ #
+ # parserCtxt functions from module parserInternals
+ #
+
+ def decodeEntities(self, len, what, end, end2, end3):
+ """This function is deprecated, we now always process entities
+ content through xmlStringDecodeEntities TODO: remove it in
+ next major release. [67] Reference ::= EntityRef | CharRef
+ [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlDecodeEntities(self._o, len, what, end, end2, end3)
+ return ret
+
+ def handleEntity(self, entity):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if entity is None: entity__o = None
+ else: entity__o = entity._o
+ libxml2mod.xmlHandleEntity(self._o, entity__o)
+
+ def namespaceParseNCName(self):
+ """parse an XML namespace name. TODO: this seems not in use
+ anymore, the namespace handling is done on top of the SAX
+ interfaces, i.e. not on raw input. [NS 3] NCName ::=
+ (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter
+ | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlNamespaceParseNCName(self._o)
+ return ret
+
+ def namespaceParseNSDef(self):
+ """parse a namespace prefix declaration TODO: this seems not
+ in use anymore, the namespace handling is done on top of
+ the SAX interfaces, i.e. not on raw input. [NS 1] NSDef
+ ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::=
+ 'xmlns' (':' NCName)? """
+ ret = libxml2mod.xmlNamespaceParseNSDef(self._o)
+ return ret
+
+ def nextChar(self):
+ """Skip to the next char input char. """
+ libxml2mod.xmlNextChar(self._o)
+
+ def parseAttValue(self):
+ """parse a value for an attribute Note: the parser won't do
+ substitution of entities here, this will be handled later
+ in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] |
+ Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3
+ Attribute-Value Normalization: Before the value of an
+ attribute is passed to the application or checked for
+ validity, the XML processor must normalize it as follows: -
+ a character reference is processed by appending the
+ referenced character to the attribute value - an entity
+ reference is processed by recursively processing the
+ replacement text of the entity - a whitespace character
+ (#x20, #xD, #xA, #x9) is processed by appending #x20 to the
+ normalized value, except that only a single #x20 is
+ appended for a "#xD#xA" sequence that is part of an
+ external parsed entity or the literal entity value of an
+ internal parsed entity - other characters are processed by
+ appending them to the normalized value If the declared
+ value is not CDATA, then the XML processor must further
+ process the normalized attribute value by discarding any
+ leading and trailing space (#x20) characters, and by
+ replacing sequences of space (#x20) characters by a single
+ space (#x20) character. All attributes for which no
+ declaration has been read should be treated by a
+ non-validating parser as if declared CDATA. """
+ ret = libxml2mod.xmlParseAttValue(self._o)
+ return ret
+
+ def parseAttributeListDecl(self):
+ """: parse the Attribute list def for an element [52]
+ AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53]
+ AttDef ::= S Name S AttType S DefaultDecl """
+ libxml2mod.xmlParseAttributeListDecl(self._o)
+
+ def parseCDSect(self):
+ """Parse escaped pure raw content. [18] CDSect ::= CDStart
+ CData CDEnd [19] CDStart ::= '<![CDATA[' [20] Data ::=
+ (Char* - (Char* ']]>' Char*)) [21] CDEnd ::= ']]>' """
+ libxml2mod.xmlParseCDSect(self._o)
+
+ def parseCharData(self, cdata):
+ """parse a CharData section. if we are within a CDATA section
+ ']]>' marks an end of section. The right angle bracket (>)
+ may be represented using the string "&gt;", and must, for
+ compatibility, be escaped using "&gt;" or a character
+ reference when it appears in the string "]]>" in content,
+ when that string is not marking the end of a CDATA section.
+ [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) """
+ libxml2mod.xmlParseCharData(self._o, cdata)
+
+ def parseCharRef(self):
+ """parse Reference declarations [66] CharRef ::= '&#' [0-9]+
+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ]
+ Characters referred to using character references must
+ match the production for Char. """
+ ret = libxml2mod.xmlParseCharRef(self._o)
+ return ret
+
+ def parseComment(self):
+ """Skip an XML (SGML) comment <!-- .... --> The spec says that
+ "For compatibility, the string "--" (double-hyphen) must
+ not occur within comments. " [15] Comment ::= '<!--'
+ ((Char - '-') | ('-' (Char - '-')))* '-->' """
+ libxml2mod.xmlParseComment(self._o)
+
+ def parseContent(self):
+ """Parse a content: [43] content ::= (element | CharData |
+ Reference | CDSect | PI | Comment)* """
+ libxml2mod.xmlParseContent(self._o)
+
+ def parseDocTypeDecl(self):
+ """parse a DOCTYPE declaration [28] doctypedecl ::=
+ '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
+ PEReference | S)* ']' S?)? '>' [ VC: Root Element Type ]
+ The Name in the document type declaration must match the
+ element type of the root element. """
+ libxml2mod.xmlParseDocTypeDecl(self._o)
+
+ def parseElement(self):
+ """parse an XML element, this is highly recursive [39]
+ element ::= EmptyElemTag | STag content ETag [ WFC:
+ Element Type Match ] The Name in an element's end-tag must
+ match the element type in the start-tag. """
+ libxml2mod.xmlParseElement(self._o)
+
+ def parseElementDecl(self):
+ """parse an Element declaration. [45] elementdecl ::=
+ '<!ELEMENT' S Name S contentspec S? '>' [ VC: Unique
+ Element Type Declaration ] No element type may be declared
+ more than once """
+ ret = libxml2mod.xmlParseElementDecl(self._o)
+ return ret
+
+ def parseEncName(self):
+ """parse the XML encoding name [81] EncName ::= [A-Za-z]
+ ([A-Za-z0-9._] | '-')* """
+ ret = libxml2mod.xmlParseEncName(self._o)
+ return ret
+
+ def parseEncodingDecl(self):
+ """parse the XML encoding declaration [80] EncodingDecl ::= S
+ 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this
+ setups the conversion filters. """
+ ret = libxml2mod.xmlParseEncodingDecl(self._o)
+ return ret
+
+ def parseEndTag(self):
+ """parse an end of tag [42] ETag ::= '</' Name S? '>' With
+ namespace [NS 9] ETag ::= '</' QName S? '>' """
+ libxml2mod.xmlParseEndTag(self._o)
+
+ def parseEntityDecl(self):
+ """parse <!ENTITY declarations [70] EntityDecl ::= GEDecl |
+ PEDecl [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
+ '>' [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
+ [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::=
+ S 'NDATA' S Name [ VC: Notation Declared ] The Name must
+ match the declared name of a notation. """
+ libxml2mod.xmlParseEntityDecl(self._o)
+
+ def parseEntityRef(self):
+ """parse ENTITY references declarations [68] EntityRef ::=
+ '&' Name ';' [ WFC: Entity Declared ] In a document
+ without any DTD, a document with only an internal DTD
+ subset which contains no parameter entity references, or a
+ document with "standalone='yes'", the Name given in the
+ entity reference must match that in an entity declaration,
+ except that well-formed documents need not declare any of
+ the following entities: amp, lt, gt, apos, quot. The
+ declaration of a parameter entity must precede any
+ reference to it. Similarly, the declaration of a general
+ entity must precede any reference to it which appears in a
+ default value in an attribute-list declaration. Note that
+ if entities are declared in the external subset or in
+ external parameter entities, a non-validating processor is
+ not obligated to read and process their declarations; for
+ such documents, the rule that an entity must be declared is
+ a well-formedness constraint only if standalone='yes'. [
+ WFC: Parsed Entity ] An entity reference must not contain
+ the name of an unparsed entity """
+ ret = libxml2mod.xmlParseEntityRef(self._o)
+ if ret is None:raise parserError('xmlParseEntityRef() failed')
+ __tmp = xmlEntity(_obj=ret)
+ return __tmp
+
+ def parseExternalSubset(self, ExternalID, SystemID):
+ """parse Markup declarations from an external subset [30]
+ extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl
+ ::= (markupdecl | conditionalSect | PEReference | S) * """
+ libxml2mod.xmlParseExternalSubset(self._o, ExternalID, SystemID)
+
+ def parseMarkupDecl(self):
+ """parse Markup declarations [29] markupdecl ::= elementdecl
+ | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [
+ VC: Proper Declaration/PE Nesting ] Parameter-entity
+ replacement text must be properly nested with markup
+ declarations. That is to say, if either the first character
+ or the last character of a markup declaration (markupdecl
+ above) is contained in the replacement text for a
+ parameter-entity reference, both must be contained in the
+ same replacement text. [ WFC: PEs in Internal Subset ] In
+ the internal DTD subset, parameter-entity references can
+ occur only where markup declarations can occur, not within
+ markup declarations. (This does not apply to references
+ that occur in external parameter entities or to the
+ external subset.) """
+ libxml2mod.xmlParseMarkupDecl(self._o)
+
+ def parseMisc(self):
+ """parse an XML Misc* optional field. [27] Misc ::= Comment |
+ PI | S """
+ libxml2mod.xmlParseMisc(self._o)
+
+ def parseName(self):
+ """parse an XML name. [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20
+ Name)* """
+ ret = libxml2mod.xmlParseName(self._o)
+ return ret
+
+ def parseNamespace(self):
+ """xmlParseNamespace: parse specific PI '<?namespace ...'
+ constructs. This is what the older xml-name Working Draft
+ specified, a bunch of other stuff may still rely on it, so
+ support is still here as if it was declared on the root of
+ the Tree:-( TODO: remove from library To be removed at
+ next drop of binary compatibility """
+ libxml2mod.xmlParseNamespace(self._o)
+
+ def parseNmtoken(self):
+ """parse an XML Nmtoken. [7] Nmtoken ::= (NameChar)+ [8]
+ Nmtokens ::= Nmtoken (#x20 Nmtoken)* """
+ ret = libxml2mod.xmlParseNmtoken(self._o)
+ return ret
+
+ def parseNotationDecl(self):
+ """parse a notation declaration [82] NotationDecl ::=
+ '<!NOTATION' S Name S (ExternalID | PublicID) S? '>'
+ Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
+ 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
+ SystemLiteral See the NOTE on xmlParseExternalID(). """
+ libxml2mod.xmlParseNotationDecl(self._o)
+
+ def parsePEReference(self):
+ """parse PEReference declarations The entity content is
+ handled directly by pushing it's content as a new input
+ stream. [69] PEReference ::= '%' Name ';' [ WFC: No
+ Recursion ] A parsed entity must not contain a recursive
+ reference to itself, either directly or indirectly. [ WFC:
+ Entity Declared ] In a document without any DTD, a document
+ with only an internal DTD subset which contains no
+ parameter entity references, or a document with
+ "standalone='yes'", ... ... The declaration of a parameter
+ entity must precede any reference to it... [ VC: Entity
+ Declared ] In a document with an external subset or
+ external parameter entities with "standalone='no'", ...
+ ... The declaration of a parameter entity must precede any
+ reference to it... [ WFC: In DTD ] Parameter-entity
+ references may only appear in the DTD. NOTE: misleading but
+ this is handled. """
+ libxml2mod.xmlParsePEReference(self._o)
+
+ def parsePI(self):
+ """parse an XML Processing Instruction. [16] PI ::= '<?'
+ PITarget (S (Char* - (Char* '?>' Char*)))? '?>' The
+ processing is transfered to SAX once parsed. """
+ libxml2mod.xmlParsePI(self._o)
+
+ def parsePITarget(self):
+ """parse the name of a PI [17] PITarget ::= Name - (('X' |
+ 'x') ('M' | 'm') ('L' | 'l')) """
+ ret = libxml2mod.xmlParsePITarget(self._o)
+ return ret
+
+ def parsePubidLiteral(self):
+ """parse an XML public literal [12] PubidLiteral ::= '"'
+ PubidChar* '"' | "'" (PubidChar - "'")* "'" """
+ ret = libxml2mod.xmlParsePubidLiteral(self._o)
+ return ret
+
+ def parseQuotedString(self):
+ """Parse and return a string between quotes or doublequotes
+ TODO: Deprecated, to be removed at next drop of binary
+ compatibility """
+ ret = libxml2mod.xmlParseQuotedString(self._o)
+ return ret
+
+ def parseReference(self):
+ """parse and handle entity references in content, depending on
+ the SAX interface, this may end-up in a call to character()
+ if this is a CharRef, a predefined entity, if there is no
+ reference() callback. or if the parser was asked to switch
+ to that mode. [67] Reference ::= EntityRef | CharRef """
+ libxml2mod.xmlParseReference(self._o)
+
+ def parseSDDecl(self):
+ """parse the XML standalone declaration [32] SDDecl ::= S
+ 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
+ 'no')'"')) [ VC: Standalone Document Declaration ] TODO
+ The standalone document declaration must have the value
+ "no" if any external markup declarations contain
+ declarations of: - attributes with default values, if
+ elements to which these attributes apply appear in the
+ document without specifications of values for these
+ attributes, or - entities (other than amp, lt, gt, apos,
+ quot), if references to those entities appear in the
+ document, or - attributes with values subject to
+ normalization, where the attribute appears in the document
+ with a value which will change as a result of
+ normalization, or - element types with element content, if
+ white space occurs directly within any instance of those
+ types. """
+ ret = libxml2mod.xmlParseSDDecl(self._o)
+ return ret
+
+ def parseStartTag(self):
+ """parse a start of tag either for rule element or
+ EmptyElement. In both case we don't parse the tag closing
+ chars. [40] STag ::= '<' Name (S Attribute)* S? '>' [
+ WFC: Unique Att Spec ] No attribute name may appear more
+ than once in the same start-tag or empty-element tag. [44]
+ EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC:
+ Unique Att Spec ] No attribute name may appear more than
+ once in the same start-tag or empty-element tag. With
+ namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>'
+ [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' """
+ ret = libxml2mod.xmlParseStartTag(self._o)
+ return ret
+
+ def parseSystemLiteral(self):
+ """parse an XML Literal [11] SystemLiteral ::= ('"' [^"]*
+ '"') | ("'" [^']* "'") """
+ ret = libxml2mod.xmlParseSystemLiteral(self._o)
+ return ret
+
+ def parseTextDecl(self):
+ """parse an XML declaration header for external entities [77]
+ TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' """
+ libxml2mod.xmlParseTextDecl(self._o)
+
+ def parseVersionInfo(self):
+ """parse the XML version. [24] VersionInfo ::= S 'version' Eq
+ (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? """
+ ret = libxml2mod.xmlParseVersionInfo(self._o)
+ return ret
+
+ def parseVersionNum(self):
+ """parse the XML version value. [26] VersionNum ::= '1.'
+ [0-9]+ In practice allow [0-9].[0-9]+ at that level """
+ ret = libxml2mod.xmlParseVersionNum(self._o)
+ return ret
+
+ def parseXMLDecl(self):
+ """parse an XML declaration header [23] XMLDecl ::= '<?xml'
+ VersionInfo EncodingDecl? SDDecl? S? '?>' """
+ libxml2mod.xmlParseXMLDecl(self._o)
+
+ def parserHandlePEReference(self):
+ """[69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A
+ parsed entity must not contain a recursive reference to
+ itself, either directly or indirectly. [ WFC: Entity
+ Declared ] In a document without any DTD, a document with
+ only an internal DTD subset which contains no parameter
+ entity references, or a document with "standalone='yes'",
+ ... ... The declaration of a parameter entity must precede
+ any reference to it... [ VC: Entity Declared ] In a
+ document with an external subset or external parameter
+ entities with "standalone='no'", ... ... The declaration
+ of a parameter entity must precede any reference to it...
+ [ WFC: In DTD ] Parameter-entity references may only appear
+ in the DTD. NOTE: misleading but this is handled. A
+ PEReference may have been detected in the current input
+ stream the handling is done accordingly to
+ http://www.w3.org/TR/REC-xml#entproc i.e. - Included in
+ literal in entity values - Included as Parameter Entity
+ reference within DTDs """
+ libxml2mod.xmlParserHandlePEReference(self._o)
+
+ def parserHandleReference(self):
+ """TODO: Remove, now deprecated ... the test is done directly
+ in the content parsing routines. [67] Reference ::=
+ EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [
+ WFC: Entity Declared ] the Name given in the entity
+ reference must match that in an entity declaration, except
+ that well-formed documents need not declare any of the
+ following entities: amp, lt, gt, apos, quot. [ WFC: Parsed
+ Entity ] An entity reference must not contain the name of
+ an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' |
+ '&#x' [0-9a-fA-F]+ ';' A PEReference may have been
+ detected in the current input stream the handling is done
+ accordingly to http://www.w3.org/TR/REC-xml#entproc """
+ libxml2mod.xmlParserHandleReference(self._o)
+
+ def popInput(self):
+ """xmlPopInput: the current input pointed by ctxt->input came
+ to an end pop it and return the next char. """
+ ret = libxml2mod.xmlPopInput(self._o)
+ return ret
+
+ def scanName(self):
+ """Trickery: parse an XML name but without consuming the input
+ flow Needed for rollback cases. Used only when parsing
+ entities references. TODO: seems deprecated now, only used
+ in the default part of xmlParserHandleReference [4]
+ NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ CombiningChar | Extender [5] Name ::= (Letter | '_' | ':')
+ (NameChar)* [6] Names ::= Name (S Name)* """
+ ret = libxml2mod.xmlScanName(self._o)
+ return ret
+
+ def skipBlankChars(self):
+ """skip all blanks character found at that point in the input
+ streams. It pops up finished entities in the process if
+ allowable at that point. """
+ ret = libxml2mod.xmlSkipBlankChars(self._o)
+ return ret
+
+ def stringDecodeEntities(self, str, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringDecodeEntities(self._o, str, what, end, end2, end3)
+ return ret
+
+ def stringLenDecodeEntities(self, str, len, what, end, end2, end3):
+ """Takes a entity string content and process to do the
+ adequate substitutions. [67] Reference ::= EntityRef |
+ CharRef [69] PEReference ::= '%' Name ';' """
+ ret = libxml2mod.xmlStringLenDecodeEntities(self._o, str, len, what, end, end2, end3)
+ return ret
+
+class xmlAttr(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttr got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttr (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlAttr functions from module debugXML
+ #
+
+ def debugDumpAttr(self, output, depth):
+ """Dumps debug information for the attribute """
+ libxml2mod.xmlDebugDumpAttr(output, self._o, depth)
+
+ def debugDumpAttrList(self, output, depth):
+ """Dumps debug information for the attribute list """
+ libxml2mod.xmlDebugDumpAttrList(output, self._o, depth)
+
+ #
+ # xmlAttr functions from module tree
+ #
+
+ def copyProp(self, target):
+ """Do a copy of the attribute. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyProp(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def copyPropList(self, target):
+ """Do a copy of an attribute list. """
+ if target is None: target__o = None
+ else: target__o = target._o
+ ret = libxml2mod.xmlCopyPropList(target__o, self._o)
+ if ret is None:raise treeError('xmlCopyPropList() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def freeProp(self):
+ """Free one attribute, all the content is freed too """
+ libxml2mod.xmlFreeProp(self._o)
+
+ def freePropList(self):
+ """Free a property and all its siblings, all the children are
+ freed too. """
+ libxml2mod.xmlFreePropList(self._o)
+
+ def removeProp(self):
+ """Unlink and free one attribute, all the content is freed too
+ Note this doesn't work for namespace definition attributes """
+ ret = libxml2mod.xmlRemoveProp(self._o)
+ return ret
+
+ #
+ # xmlAttr functions from module valid
+ #
+
+ def removeID(self, doc):
+ """Remove the given attribute from the ID table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveID(doc__o, self._o)
+ return ret
+
+ def removeRef(self, doc):
+ """Remove the given attribute from the Ref table maintained
+ internally. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRemoveRef(doc__o, self._o)
+ return ret
+
+class xmlAttribute(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlAttribute got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlAttribute (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class catalog:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeCatalog(self._o)
+ self._o = None
+
+ #
+ # catalog functions from module catalog
+ #
+
+ def add(self, type, orig, replace):
+ """Add an entry in the catalog, it may overwrite existing but
+ different entries. """
+ ret = libxml2mod.xmlACatalogAdd(self._o, type, orig, replace)
+ return ret
+
+ def catalogIsEmpty(self):
+ """Check is a catalog is empty """
+ ret = libxml2mod.xmlCatalogIsEmpty(self._o)
+ return ret
+
+ def convertSGMLCatalog(self):
+ """Convert all the SGML catalog entries as XML ones """
+ ret = libxml2mod.xmlConvertSGMLCatalog(self._o)
+ return ret
+
+ def dump(self, out):
+ """Dump the given catalog to the given file. """
+ libxml2mod.xmlACatalogDump(self._o, out)
+
+ def remove(self, value):
+ """Remove an entry from the catalog """
+ ret = libxml2mod.xmlACatalogRemove(self._o, value)
+ return ret
+
+ def resolve(self, pubID, sysID):
+ """Do a complete resolution lookup of an External Identifier """
+ ret = libxml2mod.xmlACatalogResolve(self._o, pubID, sysID)
+ return ret
+
+ def resolvePublic(self, pubID):
+ """Try to lookup the catalog local reference associated to a
+ public ID in that catalog """
+ ret = libxml2mod.xmlACatalogResolvePublic(self._o, pubID)
+ return ret
+
+ def resolveSystem(self, sysID):
+ """Try to lookup the catalog resource for a system ID """
+ ret = libxml2mod.xmlACatalogResolveSystem(self._o, sysID)
+ return ret
+
+ def resolveURI(self, URI):
+ """Do a complete resolution lookup of an URI """
+ ret = libxml2mod.xmlACatalogResolveURI(self._o, URI)
+ return ret
+
+class xmlDtd(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlDtd got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlDtd (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlDtd functions from module debugXML
+ #
+
+ def debugDumpDTD(self, output):
+ """Dumps debug information for the DTD """
+ libxml2mod.xmlDebugDumpDTD(output, self._o)
+
+ #
+ # xmlDtd functions from module tree
+ #
+
+ def copyDtd(self):
+ """Do a copy of the dtd. """
+ ret = libxml2mod.xmlCopyDtd(self._o)
+ if ret is None:raise treeError('xmlCopyDtd() failed')
+ __tmp = xmlDtd(_obj=ret)
+ return __tmp
+
+ def freeDtd(self):
+ """Free a DTD structure. """
+ libxml2mod.xmlFreeDtd(self._o)
+
+ #
+ # xmlDtd functions from module valid
+ #
+
+ def dtdAttrDesc(self, elem, name):
+ """Search the DTD for the description of this attribute on
+ this element. """
+ ret = libxml2mod.xmlGetDtdAttrDesc(self._o, elem, name)
+ if ret is None:raise treeError('xmlGetDtdAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdElementDesc(self, name):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
+ if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+ def dtdQAttrDesc(self, elem, name, prefix):
+ """Search the DTD for the description of this qualified
+ attribute on this element. """
+ ret = libxml2mod.xmlGetDtdQAttrDesc(self._o, elem, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQAttrDesc() failed')
+ __tmp = xmlAttribute(_obj=ret)
+ return __tmp
+
+ def dtdQElementDesc(self, name, prefix):
+ """Search the DTD for the description of this element """
+ ret = libxml2mod.xmlGetDtdQElementDesc(self._o, name, prefix)
+ if ret is None:raise treeError('xmlGetDtdQElementDesc() failed')
+ __tmp = xmlElement(_obj=ret)
+ return __tmp
+
+class xmlElement(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlElement got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlElement (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+class xmlEntity(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlEntity got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlEntity (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlEntity functions from module parserInternals
+ #
+
+ def handleEntity(self, ctxt):
+ """Default handling of defined entities, when should we define
+ a new input stream ? When do we just handle that as a set
+ of chars ? OBSOLETE: to be removed at some point. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ libxml2mod.xmlHandleEntity(ctxt__o, self._o)
+
+class Error:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for Error
+ def code(self):
+ """The error code, e.g. an xmlParserError """
+ ret = libxml2mod.xmlErrorGetCode(self._o)
+ return ret
+
+ def domain(self):
+ """What part of the library raised this error """
+ ret = libxml2mod.xmlErrorGetDomain(self._o)
+ return ret
+
+ def file(self):
+ """the filename """
+ ret = libxml2mod.xmlErrorGetFile(self._o)
+ return ret
+
+ def level(self):
+ """how consequent is the error """
+ ret = libxml2mod.xmlErrorGetLevel(self._o)
+ return ret
+
+ def line(self):
+ """the line number if available """
+ ret = libxml2mod.xmlErrorGetLine(self._o)
+ return ret
+
+ def message(self):
+ """human-readable informative error message """
+ ret = libxml2mod.xmlErrorGetMessage(self._o)
+ return ret
+
+ #
+ # Error functions from module xmlerror
+ #
+
+ def copyError(self, to):
+ """Save the original error to the new place. """
+ if to is None: to__o = None
+ else: to__o = to._o
+ ret = libxml2mod.xmlCopyError(self._o, to__o)
+ return ret
+
+ def resetError(self):
+ """Cleanup the error. """
+ libxml2mod.xmlResetError(self._o)
+
+class xmlNs(xmlNode):
+ def __init__(self, _obj=None):
+ if checkWrapper(_obj) != 0: raise TypeError('xmlNs got a wrong wrapper object type')
+ self._o = _obj
+ xmlNode.__init__(self, _obj=_obj)
+
+ def __repr__(self):
+ return "<xmlNs (%s) object at 0x%x>" % (self.name, int(pos_id (self)))
+
+ #
+ # xmlNs functions from module tree
+ #
+
+ def copyNamespace(self):
+ """Do a copy of the namespace. """
+ ret = libxml2mod.xmlCopyNamespace(self._o)
+ if ret is None:raise treeError('xmlCopyNamespace() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def copyNamespaceList(self):
+ """Do a copy of an namespace list. """
+ ret = libxml2mod.xmlCopyNamespaceList(self._o)
+ if ret is None:raise treeError('xmlCopyNamespaceList() failed')
+ __tmp = xmlNs(_obj=ret)
+ return __tmp
+
+ def freeNs(self):
+ """Free up the structures associated to a namespace """
+ libxml2mod.xmlFreeNs(self._o)
+
+ def freeNsList(self):
+ """Free up all the structures associated to the chained
+ namespaces. """
+ libxml2mod.xmlFreeNsList(self._o)
+
+ def newChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child list containing the TEXTs and ENTITY_REFs node will
+ be created. NOTE: @content is supposed to be a piece of XML
+ CDATA, so it allows entity references. XML special chars
+ must be escaped first by using
+ xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
+ be used. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocNodeEatName(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). NOTE: @content is supposed to
+ be a piece of XML CDATA, so it allow entities references,
+ but XML special chars need to be escaped first by using
+ xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
+ don't need entities support. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocNodeEatName(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newDocRawNode(self, doc, name, content):
+ """Creation of a new node element within a document. @ns and
+ @content are optional (None). """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlNewDocRawNode(doc__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewDocRawNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNodeEatName(self, name):
+ """Creation of a new node element. @ns is optional (None). """
+ ret = libxml2mod.xmlNewNodeEatName(self._o, name)
+ if ret is None:raise treeError('xmlNewNodeEatName() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def newNsProp(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newNsPropEatName(self, node, name, value):
+ """Create a new property tagged with a namespace and carried
+ by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlNewNsPropEatName() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def newTextChild(self, parent, name, content):
+ """Creation of a new child element, added at the end of
+ @parent children list. @ns and @content parameters are
+ optional (None). If @ns is None, the newly created element
+ inherits the namespace of @parent. If @content is non None,
+ a child TEXT node will be created containing the string
+ @content. NOTE: Use xmlNewChild() if @content will contain
+ entities that need to be preserved. Use this function,
+ xmlNewTextChild(), if you need to ensure that reserved XML
+ chars that might appear in @content, such as the ampersand,
+ greater-than or less-than signs, are automatically replaced
+ by their XML escaped entity representations. """
+ if parent is None: parent__o = None
+ else: parent__o = parent._o
+ ret = libxml2mod.xmlNewTextChild(parent__o, self._o, name, content)
+ if ret is None:raise treeError('xmlNewTextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def setNs(self, node):
+ """Associate a namespace to a node, a posteriori. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlSetNs(node__o, self._o)
+
+ def setNsProp(self, node, name, value):
+ """Set (or reset) an attribute carried by a node. The ns
+ structure must be in scope, this is not checked """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlSetNsProp(node__o, self._o, name, value)
+ if ret is None:raise treeError('xmlSetNsProp() failed')
+ __tmp = xmlAttr(_obj=ret)
+ return __tmp
+
+ def unsetNsProp(self, node, name):
+ """Remove an attribute carried by a node. """
+ if node is None: node__o = None
+ else: node__o = node._o
+ ret = libxml2mod.xmlUnsetNsProp(node__o, self._o, name)
+ return ret
+
+ #
+ # xmlNs functions from module xpathInternals
+ #
+
+ def xpathNodeSetFreeNs(self):
+ """Namespace nodes in libxml don't match the XPath semantic.
+ In a node set the namespace nodes are duplicated and the
+ next pointer is set to the parent node in the XPath
+ semantic. Check if such a node needs to be freed """
+ libxml2mod.xmlXPathNodeSetFreeNs(self._o)
+
+class outputBuffer(ioWriteWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioWriteWrapper.__init__(self, _obj=_obj)
+
+ #
+ # outputBuffer functions from module HTMLtree
+ #
+
+ def htmlDocContentDumpFormatOutput(self, cur, encoding, format):
+ """Dump an HTML document. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpFormatOutput(self._o, cur__o, encoding, format)
+
+ def htmlDocContentDumpOutput(self, cur, encoding):
+ """Dump an HTML document. Formating return/spaces are added. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlDocContentDumpOutput(self._o, cur__o, encoding)
+
+ def htmlNodeDumpFormatOutput(self, doc, cur, encoding, format):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpFormatOutput(self._o, doc__o, cur__o, encoding, format)
+
+ def htmlNodeDumpOutput(self, doc, cur, encoding):
+ """Dump an HTML node, recursive behaviour,children are printed
+ too, and formatting returns/spaces are added. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.htmlNodeDumpOutput(self._o, doc__o, cur__o, encoding)
+
+ #
+ # outputBuffer functions from module tree
+ #
+
+ def nodeDumpOutput(self, doc, cur, level, format, encoding):
+ """Dump an XML node, recursive behaviour, children are printed
+ too. Note that @format = 1 provide node indenting only if
+ xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
+ called """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ libxml2mod.xmlNodeDumpOutput(self._o, doc__o, cur__o, level, format, encoding)
+
+ def saveFileTo(self, cur, encoding):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFileTo(self._o, cur__o, encoding)
+ return ret
+
+ def saveFormatFileTo(self, cur, encoding, format):
+ """Dump an XML document to an I/O buffer. Warning ! This call
+ xmlOutputBufferClose() on buf which is not available after
+ this call. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlSaveFormatFileTo(self._o, cur__o, encoding, format)
+ return ret
+
+ #
+ # outputBuffer functions from module xmlIO
+ #
+
+ def getContent(self):
+ """Gives a pointer to the data currently held in the output
+ buffer """
+ ret = libxml2mod.xmlOutputBufferGetContent(self._o)
+ return ret
+
+ def write(self, len, buf):
+ """Write the content of the array in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
+ return ret
+
+ def writeString(self, str):
+ """Write the content of the string in the output I/O buffer
+ This routine handle the I18N transcoding from internal
+ UTF-8 The buffer is lossless, i.e. will store in case of
+ partial or delayed writes. """
+ ret = libxml2mod.xmlOutputBufferWriteString(self._o, str)
+ return ret
+
+class inputBuffer(ioReadWrapper):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ioReadWrapper.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeParserInputBuffer(self._o)
+ self._o = None
+
+ #
+ # inputBuffer functions from module xmlIO
+ #
+
+ def grow(self, len):
+ """Grow up the content of the input buffer, the old data are
+ preserved This routine handle the I18N transcoding to
+ internal UTF-8 This routine is used when operating the
+ parser in normal (pull) mode TODO: one should be able to
+ remove one extra copy by copying directly onto in->buffer
+ or in->raw """
+ ret = libxml2mod.xmlParserInputBufferGrow(self._o, len)
+ return ret
+
+ def push(self, len, buf):
+ """Push the content of the arry in the input buffer This
+ routine handle the I18N transcoding to internal UTF-8 This
+ is used when operating the parser in progressive (push)
+ mode. """
+ ret = libxml2mod.xmlParserInputBufferPush(self._o, len, buf)
+ return ret
+
+ def read(self, len):
+ """Refresh the content of the input buffer, the old data are
+ considered consumed This routine handle the I18N
+ transcoding to internal UTF-8 """
+ ret = libxml2mod.xmlParserInputBufferRead(self._o, len)
+ return ret
+
+ #
+ # inputBuffer functions from module xmlreader
+ #
+
+ def Setup(self, reader, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)
+ return ret
+
+ def newTextReader(self, URI):
+ """Create an xmlTextReader structure fed with @input """
+ ret = libxml2mod.xmlNewTextReader(self._o, URI)
+ if ret is None:raise treeError('xmlNewTextReader() failed')
+ __tmp = xmlTextReader(_obj=ret)
+ __tmp.input = self
+ return __tmp
+
+class xmlReg:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRegFreeRegexp(self._o)
+ self._o = None
+
+ #
+ # xmlReg functions from module xmlregexp
+ #
+
+ def regexpExec(self, content):
+ """Check if the regular expression generates the value """
+ ret = libxml2mod.xmlRegexpExec(self._o, content)
+ return ret
+
+ def regexpIsDeterminist(self):
+ """Check if the regular expression is determinist """
+ ret = libxml2mod.xmlRegexpIsDeterminist(self._o)
+ return ret
+
+ def regexpPrint(self, output):
+ """Print the content of the compiled regular expression """
+ libxml2mod.xmlRegexpPrint(output, self._o)
+
+class relaxNgParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgParserCtxt functions from module relaxng
+ #
+
+ def relaxNGParse(self):
+ """parse a schema definition resource and build an internal
+ XML Shema struture which can be used to validate instances. """
+ ret = libxml2mod.xmlRelaxNGParse(self._o)
+ if ret is None:raise parserError('xmlRelaxNGParse() failed')
+ __tmp = relaxNgSchema(_obj=ret)
+ return __tmp
+
+ def relaxParserSetFlag(self, flags):
+ """Semi private function used to pass informations to a parser
+ context which are a combination of xmlRelaxNGParserFlag . """
+ ret = libxml2mod.xmlRelaxParserSetFlag(self._o, flags)
+ return ret
+
+class relaxNgSchema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFree(self._o)
+ self._o = None
+
+ #
+ # relaxNgSchema functions from module relaxng
+ #
+
+ def relaxNGDump(self, output):
+ """Dump a RelaxNG structure back """
+ libxml2mod.xmlRelaxNGDump(output, self._o)
+
+ def relaxNGDumpTree(self, output):
+ """Dump the transformed RelaxNG tree. """
+ libxml2mod.xmlRelaxNGDumpTree(output, self._o)
+
+ def relaxNGNewValidCtxt(self):
+ """Create an XML RelaxNGs validation context based on the
+ given schema """
+ ret = libxml2mod.xmlRelaxNGNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlRelaxNGNewValidCtxt() failed')
+ __tmp = relaxNgValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+ #
+ # relaxNgSchema functions from module xmlreader
+ #
+
+ def RelaxNGSetSchema(self, reader):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(reader__o, self._o)
+ return ret
+
+class relaxNgValidCtxt(relaxNgValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ relaxNgValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlRelaxNGFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # relaxNgValidCtxt functions from module relaxng
+ #
+
+ def relaxNGValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlRelaxNGValidateDoc(self._o, doc__o)
+ return ret
+
+ def relaxNGValidateFullElement(self, doc, elem):
+ """Validate a full subtree when
+ xmlRelaxNGValidatePushElement() returned 0 and the content
+ of the node has been expanded. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidateFullElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePopElement(self, doc, elem):
+ """Pop the element end from the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePopElement(self._o, doc__o, elem__o)
+ return ret
+
+ def relaxNGValidatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlRelaxNGValidatePushCData(self._o, data, len)
+ return ret
+
+ def relaxNGValidatePushElement(self, doc, elem):
+ """Push a new element start on the RelaxNG validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlRelaxNGValidatePushElement(self._o, doc__o, elem__o)
+ return ret
+
+ #
+ # relaxNgValidCtxt functions from module xmlreader
+ #
+
+ def RelaxNGValidateCtxt(self, reader, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options)
+ return ret
+
+class SchemaParserCtxt:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeParserCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaParserCtxt functions from module xmlschemas
+ #
+
+ def schemaParse(self):
+ """parse a schema definition resource and build an internal
+ XML Shema struture which can be used to validate instances. """
+ ret = libxml2mod.xmlSchemaParse(self._o)
+ if ret is None:raise parserError('xmlSchemaParse() failed')
+ __tmp = Schema(_obj=ret)
+ return __tmp
+
+class Schema:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFree(self._o)
+ self._o = None
+
+ #
+ # Schema functions from module xmlreader
+ #
+
+ def SetSchema(self, reader):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSetSchema(reader__o, self._o)
+ return ret
+
+ #
+ # Schema functions from module xmlschemas
+ #
+
+ def schemaDump(self, output):
+ """Dump a Schema structure. """
+ libxml2mod.xmlSchemaDump(output, self._o)
+
+ def schemaNewValidCtxt(self):
+ """Create an XML Schemas validation context based on the given
+ schema. """
+ ret = libxml2mod.xmlSchemaNewValidCtxt(self._o)
+ if ret is None:raise treeError('xmlSchemaNewValidCtxt() failed')
+ __tmp = SchemaValidCtxt(_obj=ret)
+ __tmp.schema = self
+ return __tmp
+
+class SchemaValidCtxt(SchemaValidCtxtCore):
+ def __init__(self, _obj=None):
+ self.schema = None
+ self._o = _obj
+ SchemaValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlSchemaFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # SchemaValidCtxt functions from module xmlreader
+ #
+
+ def SchemaValidateCtxt(self, reader, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if reader is None: reader__o = None
+ else: reader__o = reader._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(reader__o, self._o, options)
+ return ret
+
+ #
+ # SchemaValidCtxt functions from module xmlschemas
+ #
+
+ def schemaIsValid(self):
+ """Check if any error was detected during validation. """
+ ret = libxml2mod.xmlSchemaIsValid(self._o)
+ return ret
+
+ def schemaSetValidOptions(self, options):
+ """Sets the options to be used during the validation. """
+ ret = libxml2mod.xmlSchemaSetValidOptions(self._o, options)
+ return ret
+
+ def schemaValidCtxtGetOptions(self):
+ """Get the validation context options. """
+ ret = libxml2mod.xmlSchemaValidCtxtGetOptions(self._o)
+ return ret
+
+ def schemaValidCtxtGetParserCtxt(self):
+ """allow access to the parser context of the schema validation
+ context """
+ ret = libxml2mod.xmlSchemaValidCtxtGetParserCtxt(self._o)
+ if ret is None:raise parserError('xmlSchemaValidCtxtGetParserCtxt() failed')
+ __tmp = parserCtxt(_obj=ret)
+ return __tmp
+
+ def schemaValidateDoc(self, doc):
+ """Validate a document tree in memory. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlSchemaValidateDoc(self._o, doc__o)
+ return ret
+
+ def schemaValidateFile(self, filename, options):
+ """Do a schemas validation of the given resource, it will use
+ the SAX streamable validation internally. """
+ ret = libxml2mod.xmlSchemaValidateFile(self._o, filename, options)
+ return ret
+
+ def schemaValidateOneElement(self, elem):
+ """Validate a branch of a tree, starting with the given @elem. """
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlSchemaValidateOneElement(self._o, elem__o)
+ return ret
+
+ def schemaValidateSetFilename(self, filename):
+ """Workaround to provide file error reporting information when
+ this is not provided by current APIs """
+ libxml2mod.xmlSchemaValidateSetFilename(self._o, filename)
+
+class xmlTextReaderLocator:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ #
+ # xmlTextReaderLocator functions from module xmlreader
+ #
+
+ def BaseURI(self):
+ """Obtain the base URI for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o)
+ return ret
+
+ def LineNumber(self):
+ """Obtain the line number for the given locator. """
+ ret = libxml2mod.xmlTextReaderLocatorLineNumber(self._o)
+ return ret
+
+class xmlTextReader(xmlTextReaderCore):
+ def __init__(self, _obj=None):
+ self.input = None
+ self._o = _obj
+ xmlTextReaderCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeTextReader(self._o)
+ self._o = None
+
+ #
+ # xmlTextReader functions from module xmlreader
+ #
+
+ def AttributeCount(self):
+ """Provides the number of attributes of the current node """
+ ret = libxml2mod.xmlTextReaderAttributeCount(self._o)
+ return ret
+
+ def BaseUri(self):
+ """The base URI of the node. """
+ ret = libxml2mod.xmlTextReaderConstBaseUri(self._o)
+ return ret
+
+ def ByteConsumed(self):
+ """This function provides the current index of the parser used
+ by the reader, relative to the start of the current entity.
+ This function actually just wraps a call to
+ xmlBytesConsumed() for the parser context associated with
+ the reader. See xmlBytesConsumed() for more information. """
+ ret = libxml2mod.xmlTextReaderByteConsumed(self._o)
+ return ret
+
+ def Close(self):
+ """This method releases any resources allocated by the current
+ instance changes the state to Closed and close any
+ underlying input. """
+ ret = libxml2mod.xmlTextReaderClose(self._o)
+ return ret
+
+ def CurrentDoc(self):
+ """Hacking interface allowing to get the xmlDocPtr
+ correponding to the current document being accessed by the
+ xmlTextReader. NOTE: as a result of this call, the reader
+ will not destroy the associated XML document and calling
+ xmlFreeDoc() on the result is needed once the reader
+ parsing has finished. """
+ ret = libxml2mod.xmlTextReaderCurrentDoc(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def CurrentNode(self):
+ """Hacking interface allowing to get the xmlNodePtr
+ correponding to the current node being accessed by the
+ xmlTextReader. This is dangerous because the underlying
+ node may be destroyed on the next Reads. """
+ ret = libxml2mod.xmlTextReaderCurrentNode(self._o)
+ if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def Depth(self):
+ """The depth of the node in the tree. """
+ ret = libxml2mod.xmlTextReaderDepth(self._o)
+ return ret
+
+ def Encoding(self):
+ """Determine the encoding of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstEncoding(self._o)
+ return ret
+
+ def Expand(self):
+ """Reads the contents of the current node and the full
+ subtree. It then makes the subtree available until the next
+ xmlTextReaderRead() call """
+ ret = libxml2mod.xmlTextReaderExpand(self._o)
+ if ret is None:raise treeError('xmlTextReaderExpand() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def GetAttribute(self, name):
+ """Provides the value of the attribute with the specified
+ qualified name. """
+ ret = libxml2mod.xmlTextReaderGetAttribute(self._o, name)
+ return ret
+
+ def GetAttributeNo(self, no):
+ """Provides the value of the attribute with the specified
+ index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no)
+ return ret
+
+ def GetAttributeNs(self, localName, namespaceURI):
+ """Provides the value of the specified attribute """
+ ret = libxml2mod.xmlTextReaderGetAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def GetParserColumnNumber(self):
+ """Provide the column number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserColumnNumber(self._o)
+ return ret
+
+ def GetParserLineNumber(self):
+ """Provide the line number of the current parsing point. """
+ ret = libxml2mod.xmlTextReaderGetParserLineNumber(self._o)
+ return ret
+
+ def GetParserProp(self, prop):
+ """Read the parser internal property. """
+ ret = libxml2mod.xmlTextReaderGetParserProp(self._o, prop)
+ return ret
+
+ def GetRemainder(self):
+ """Method to get the remainder of the buffered XML. this
+ method stops the parser, set its state to End Of File and
+ return the input stream with what is left that the parser
+ did not use. The implementation is not good, the parser
+ certainly procgressed past what's left in reader->input,
+ and there is an allocation problem. Best would be to
+ rewrite it differently. """
+ ret = libxml2mod.xmlTextReaderGetRemainder(self._o)
+ if ret is None:raise treeError('xmlTextReaderGetRemainder() failed')
+ __tmp = inputBuffer(_obj=ret)
+ return __tmp
+
+ def HasAttributes(self):
+ """Whether the node has attributes. """
+ ret = libxml2mod.xmlTextReaderHasAttributes(self._o)
+ return ret
+
+ def HasValue(self):
+ """Whether the node can have a text value. """
+ ret = libxml2mod.xmlTextReaderHasValue(self._o)
+ return ret
+
+ def IsDefault(self):
+ """Whether an Attribute node was generated from the default
+ value defined in the DTD or schema. """
+ ret = libxml2mod.xmlTextReaderIsDefault(self._o)
+ return ret
+
+ def IsEmptyElement(self):
+ """Check if the current node is empty """
+ ret = libxml2mod.xmlTextReaderIsEmptyElement(self._o)
+ return ret
+
+ def IsNamespaceDecl(self):
+ """Determine whether the current node is a namespace
+ declaration rather than a regular attribute. """
+ ret = libxml2mod.xmlTextReaderIsNamespaceDecl(self._o)
+ return ret
+
+ def IsValid(self):
+ """Retrieve the validity status from the parser context """
+ ret = libxml2mod.xmlTextReaderIsValid(self._o)
+ return ret
+
+ def LocalName(self):
+ """The local name of the node. """
+ ret = libxml2mod.xmlTextReaderConstLocalName(self._o)
+ return ret
+
+ def LookupNamespace(self, prefix):
+ """Resolves a namespace prefix in the scope of the current
+ element. """
+ ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)
+ return ret
+
+ def MoveToAttribute(self, name):
+ """Moves the position of the current instance to the attribute
+ with the specified qualified name. """
+ ret = libxml2mod.xmlTextReaderMoveToAttribute(self._o, name)
+ return ret
+
+ def MoveToAttributeNo(self, no):
+ """Moves the position of the current instance to the attribute
+ with the specified index relative to the containing element. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNo(self._o, no)
+ return ret
+
+ def MoveToAttributeNs(self, localName, namespaceURI):
+ """Moves the position of the current instance to the attribute
+ with the specified local name and namespace URI. """
+ ret = libxml2mod.xmlTextReaderMoveToAttributeNs(self._o, localName, namespaceURI)
+ return ret
+
+ def MoveToElement(self):
+ """Moves the position of the current instance to the node that
+ contains the current Attribute node. """
+ ret = libxml2mod.xmlTextReaderMoveToElement(self._o)
+ return ret
+
+ def MoveToFirstAttribute(self):
+ """Moves the position of the current instance to the first
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToFirstAttribute(self._o)
+ return ret
+
+ def MoveToNextAttribute(self):
+ """Moves the position of the current instance to the next
+ attribute associated with the current node. """
+ ret = libxml2mod.xmlTextReaderMoveToNextAttribute(self._o)
+ return ret
+
+ def Name(self):
+ """The qualified name of the node, equal to Prefix :LocalName. """
+ ret = libxml2mod.xmlTextReaderConstName(self._o)
+ return ret
+
+ def NamespaceUri(self):
+ """The URI defining the namespace associated with the node. """
+ ret = libxml2mod.xmlTextReaderConstNamespaceUri(self._o)
+ return ret
+
+ def NewDoc(self, cur, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewDoc(self._o, cur, URL, encoding, options)
+ return ret
+
+ def NewFd(self, fd, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML from a file
+ descriptor. NOTE that the file descriptor will not be
+ closed when the reader is closed or reset. The parsing
+ flags @options are a combination of xmlParserOption. This
+ reuses the existing @reader xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFd(self._o, fd, URL, encoding, options)
+ return ret
+
+ def NewFile(self, filename, encoding, options):
+ """parse an XML file from the filesystem or the network. The
+ parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewFile(self._o, filename, encoding, options)
+ return ret
+
+ def NewMemory(self, buffer, size, URL, encoding, options):
+ """Setup an xmltextReader to parse an XML in-memory document.
+ The parsing flags @options are a combination of
+ xmlParserOption. This reuses the existing @reader
+ xmlTextReader. """
+ ret = libxml2mod.xmlReaderNewMemory(self._o, buffer, size, URL, encoding, options)
+ return ret
+
+ def NewWalker(self, doc):
+ """Setup an xmltextReader to parse a preparsed XML document.
+ This reuses the existing @reader xmlTextReader. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o)
+ return ret
+
+ def Next(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. """
+ ret = libxml2mod.xmlTextReaderNext(self._o)
+ return ret
+
+ def NextSibling(self):
+ """Skip to the node following the current one in document
+ order while avoiding the subtree if any. Currently
+ implemented only for Readers built on a document """
+ ret = libxml2mod.xmlTextReaderNextSibling(self._o)
+ return ret
+
+ def NodeType(self):
+ """Get the node type of the current node Reference:
+ http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
+ lNodeType.html """
+ ret = libxml2mod.xmlTextReaderNodeType(self._o)
+ return ret
+
+ def Normalization(self):
+ """The value indicating whether to normalize white space and
+ attribute values. Since attribute value and end of line
+ normalizations are a MUST in the XML specification only the
+ value true is accepted. The broken bahaviour of accepting
+ out of range character entities like &#0; is of course not
+ supported either. """
+ ret = libxml2mod.xmlTextReaderNormalization(self._o)
+ return ret
+
+ def Prefix(self):
+ """A shorthand reference to the namespace associated with the
+ node. """
+ ret = libxml2mod.xmlTextReaderConstPrefix(self._o)
+ return ret
+
+ def Preserve(self):
+ """This tells the XML Reader to preserve the current node. The
+ caller must also use xmlTextReaderCurrentDoc() to keep an
+ handle on the resulting document once parsing has finished """
+ ret = libxml2mod.xmlTextReaderPreserve(self._o)
+ if ret is None:raise treeError('xmlTextReaderPreserve() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def QuoteChar(self):
+ """The quotation mark character used to enclose the value of
+ an attribute. """
+ ret = libxml2mod.xmlTextReaderQuoteChar(self._o)
+ return ret
+
+ def Read(self):
+ """Moves the position of the current instance to the next node
+ in the stream, exposing its properties. """
+ ret = libxml2mod.xmlTextReaderRead(self._o)
+ return ret
+
+ def ReadAttributeValue(self):
+ """Parses an attribute value into one or more Text and
+ EntityReference nodes. """
+ ret = libxml2mod.xmlTextReaderReadAttributeValue(self._o)
+ return ret
+
+ def ReadInnerXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadInnerXml(self._o)
+ return ret
+
+ def ReadOuterXml(self):
+ """Reads the contents of the current node, including child
+ nodes and markup. """
+ ret = libxml2mod.xmlTextReaderReadOuterXml(self._o)
+ return ret
+
+ def ReadState(self):
+ """Gets the read state of the reader. """
+ ret = libxml2mod.xmlTextReaderReadState(self._o)
+ return ret
+
+ def ReadString(self):
+ """Reads the contents of an element or a text node as a string. """
+ ret = libxml2mod.xmlTextReaderReadString(self._o)
+ return ret
+
+ def RelaxNGSetSchema(self, schema):
+ """Use RelaxNG to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then RelaxNG validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderRelaxNGSetSchema(self._o, schema__o)
+ return ret
+
+ def RelaxNGValidate(self, rng):
+ """Use RelaxNG schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @rng is None, then RelaxNG schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderRelaxNGValidate(self._o, rng)
+ return ret
+
+ def RelaxNGValidateCtxt(self, ctxt, options):
+ """Use RelaxNG schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then RelaxNG schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SchemaValidate(self, xsd):
+ """Use W3C XSD schema to validate the document as it is
+ processed. Activation is only possible before the first
+ Read(). If @xsd is None, then XML Schema validation is
+ deactivated. """
+ ret = libxml2mod.xmlTextReaderSchemaValidate(self._o, xsd)
+ return ret
+
+ def SchemaValidateCtxt(self, ctxt, options):
+ """Use W3C XSD schema context to validate the document as it
+ is processed. Activation is only possible before the first
+ Read(). If @ctxt is None, then XML Schema validation is
+ deactivated. """
+ if ctxt is None: ctxt__o = None
+ else: ctxt__o = ctxt._o
+ ret = libxml2mod.xmlTextReaderSchemaValidateCtxt(self._o, ctxt__o, options)
+ return ret
+
+ def SetParserProp(self, prop, value):
+ """Change the parser processing behaviour by changing some of
+ its internal properties. Note that some properties can only
+ be changed before any read has been done. """
+ ret = libxml2mod.xmlTextReaderSetParserProp(self._o, prop, value)
+ return ret
+
+ def SetSchema(self, schema):
+ """Use XSD Schema to validate the document as it is processed.
+ Activation is only possible before the first Read(). if
+ @schema is None, then Schema validation is desactivated. @
+ The @schema should not be freed until the reader is
+ deallocated or its use has been deactivated. """
+ if schema is None: schema__o = None
+ else: schema__o = schema._o
+ ret = libxml2mod.xmlTextReaderSetSchema(self._o, schema__o)
+ return ret
+
+ def Setup(self, input, URL, encoding, options):
+ """Setup an XML reader with new options """
+ if input is None: input__o = None
+ else: input__o = input._o
+ ret = libxml2mod.xmlTextReaderSetup(self._o, input__o, URL, encoding, options)
+ return ret
+
+ def Standalone(self):
+ """Determine the standalone status of the document being read. """
+ ret = libxml2mod.xmlTextReaderStandalone(self._o)
+ return ret
+
+ def String(self, str):
+ """Get an interned string from the reader, allows for example
+ to speedup string name comparisons """
+ ret = libxml2mod.xmlTextReaderConstString(self._o, str)
+ return ret
+
+ def Value(self):
+ """Provides the text value of the node if present """
+ ret = libxml2mod.xmlTextReaderConstValue(self._o)
+ return ret
+
+ def XmlLang(self):
+ """The xml:lang scope within which the node resides. """
+ ret = libxml2mod.xmlTextReaderConstXmlLang(self._o)
+ return ret
+
+ def XmlVersion(self):
+ """Determine the XML version of the document being read. """
+ ret = libxml2mod.xmlTextReaderConstXmlVersion(self._o)
+ return ret
+
+class URI:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeURI(self._o)
+ self._o = None
+
+ # accessors for URI
+ def authority(self):
+ """Get the authority part from an URI """
+ ret = libxml2mod.xmlURIGetAuthority(self._o)
+ return ret
+
+ def fragment(self):
+ """Get the fragment part from an URI """
+ ret = libxml2mod.xmlURIGetFragment(self._o)
+ return ret
+
+ def opaque(self):
+ """Get the opaque part from an URI """
+ ret = libxml2mod.xmlURIGetOpaque(self._o)
+ return ret
+
+ def path(self):
+ """Get the path part from an URI """
+ ret = libxml2mod.xmlURIGetPath(self._o)
+ return ret
+
+ def port(self):
+ """Get the port part from an URI """
+ ret = libxml2mod.xmlURIGetPort(self._o)
+ return ret
+
+ def query(self):
+ """Get the query part from an URI """
+ ret = libxml2mod.xmlURIGetQuery(self._o)
+ return ret
+
+ def queryRaw(self):
+ """Get the raw query part from an URI (i.e. the unescaped
+ form). """
+ ret = libxml2mod.xmlURIGetQueryRaw(self._o)
+ return ret
+
+ def scheme(self):
+ """Get the scheme part from an URI """
+ ret = libxml2mod.xmlURIGetScheme(self._o)
+ return ret
+
+ def server(self):
+ """Get the server part from an URI """
+ ret = libxml2mod.xmlURIGetServer(self._o)
+ return ret
+
+ def setAuthority(self, authority):
+ """Set the authority part of an URI. """
+ libxml2mod.xmlURISetAuthority(self._o, authority)
+
+ def setFragment(self, fragment):
+ """Set the fragment part of an URI. """
+ libxml2mod.xmlURISetFragment(self._o, fragment)
+
+ def setOpaque(self, opaque):
+ """Set the opaque part of an URI. """
+ libxml2mod.xmlURISetOpaque(self._o, opaque)
+
+ def setPath(self, path):
+ """Set the path part of an URI. """
+ libxml2mod.xmlURISetPath(self._o, path)
+
+ def setPort(self, port):
+ """Set the port part of an URI. """
+ libxml2mod.xmlURISetPort(self._o, port)
+
+ def setQuery(self, query):
+ """Set the query part of an URI. """
+ libxml2mod.xmlURISetQuery(self._o, query)
+
+ def setQueryRaw(self, query_raw):
+ """Set the raw query part of an URI (i.e. the unescaped form). """
+ libxml2mod.xmlURISetQueryRaw(self._o, query_raw)
+
+ def setScheme(self, scheme):
+ """Set the scheme part of an URI. """
+ libxml2mod.xmlURISetScheme(self._o, scheme)
+
+ def setServer(self, server):
+ """Set the server part of an URI. """
+ libxml2mod.xmlURISetServer(self._o, server)
+
+ def setUser(self, user):
+ """Set the user part of an URI. """
+ libxml2mod.xmlURISetUser(self._o, user)
+
+ def user(self):
+ """Get the user part from an URI """
+ ret = libxml2mod.xmlURIGetUser(self._o)
+ return ret
+
+ #
+ # URI functions from module uri
+ #
+
+ def parseURIReference(self, str):
+ """Parse an URI reference string based on RFC 3986 and fills
+ in the appropriate fields of the @uri structure
+ URI-reference = URI / relative-ref """
+ ret = libxml2mod.xmlParseURIReference(self._o, str)
+ return ret
+
+ def printURI(self, stream):
+ """Prints the URI in the stream @stream. """
+ libxml2mod.xmlPrintURI(stream, self._o)
+
+ def saveUri(self):
+ """Save the URI as an escaped string """
+ ret = libxml2mod.xmlSaveUri(self._o)
+ return ret
+
+class ValidCtxt(ValidCtxtCore):
+ def __init__(self, _obj=None):
+ self._o = _obj
+ ValidCtxtCore.__init__(self, _obj=_obj)
+
+ def __del__(self):
+ if self._o != None:
+ libxml2mod.xmlFreeValidCtxt(self._o)
+ self._o = None
+
+ #
+ # ValidCtxt functions from module valid
+ #
+
+ def validCtxtNormalizeAttributeValue(self, doc, elem, name, value):
+ """Does the validation related extra step of the normalization
+ of attribute values: If the declared value is not CDATA,
+ then the XML processor must further process the normalized
+ attribute value by discarding any leading and trailing
+ space (#x20) characters, and by replacing sequences of
+ space (#x20) characters by single space (#x20) character.
+ Also check VC: Standalone Document Declaration in P32, and
+ update ctxt->valid accordingly """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidCtxtNormalizeAttributeValue(self._o, doc__o, elem__o, name, value)
+ return ret
+
+ def validateDocument(self, doc):
+ """Try to validate the document instance basically it does
+ the all the checks described by the XML Rec i.e. validates
+ the internal and external subset (if present) and validate
+ the document tree. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocument(self._o, doc__o)
+ return ret
+
+ def validateDocumentFinal(self, doc):
+ """Does the final step for the document validation once all
+ the incremental validation steps have been completed
+ basically it does the following checks described by the XML
+ Rec Check all the IDREF/IDREFS attributes definition for
+ validity """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDocumentFinal(self._o, doc__o)
+ return ret
+
+ def validateDtd(self, doc, dtd):
+ """Try to validate the document against the dtd instance
+ Basically it does check all the definitions in the DtD.
+ Note the the internal subset (if present) is de-coupled
+ (i.e. not used), which could give problems if ID or IDREF
+ is present. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if dtd is None: dtd__o = None
+ else: dtd__o = dtd._o
+ ret = libxml2mod.xmlValidateDtd(self._o, doc__o, dtd__o)
+ return ret
+
+ def validateDtdFinal(self, doc):
+ """Does the final step for the dtds validation once all the
+ subsets have been parsed basically it does the following
+ checks described by the XML Rec - check that ENTITY and
+ ENTITIES type attributes default or possible values matches
+ one of the defined entities. - check that NOTATION type
+ attributes default or possible values matches one of the
+ defined notations. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateDtdFinal(self._o, doc__o)
+ return ret
+
+ def validateElement(self, doc, elem):
+ """Try to validate the subtree under an element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateNotationUse(self, doc, notationName):
+ """Validate that the given name match a notation declaration.
+ - [ VC: Notation Declared ] """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateNotationUse(self._o, doc__o, notationName)
+ return ret
+
+ def validateOneAttribute(self, doc, elem, attr, value):
+ """Try to validate a single attribute for an element basically
+ it does the following checks as described by the XML-1.0
+ recommendation: - [ VC: Attribute Value Type ] - [ VC:
+ Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
+ Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
+ Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if attr is None: attr__o = None
+ else: attr__o = attr._o
+ ret = libxml2mod.xmlValidateOneAttribute(self._o, doc__o, elem__o, attr__o, value)
+ return ret
+
+ def validateOneElement(self, doc, elem):
+ """Try to validate a single element and it's attributes,
+ basically it does the following checks as described by the
+ XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
+ Required Attribute ] Then call xmlValidateOneAttribute()
+ for each attribute present. The ID/IDREF checkings are
+ done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidateOneElement(self._o, doc__o, elem__o)
+ return ret
+
+ def validateOneNamespace(self, doc, elem, prefix, ns, value):
+ """Try to validate a single namespace declaration for an
+ element basically it does the following checks as described
+ by the XML-1.0 recommendation: - [ VC: Attribute Value Type
+ ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
+ [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
+ Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF
+ uniqueness and matching are done separately """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ if ns is None: ns__o = None
+ else: ns__o = ns._o
+ ret = libxml2mod.xmlValidateOneNamespace(self._o, doc__o, elem__o, prefix, ns__o, value)
+ return ret
+
+ def validatePopElement(self, doc, elem, qname):
+ """Pop the element end from the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePopElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validatePushCData(self, data, len):
+ """check the CData parsed for validation in the current stack """
+ ret = libxml2mod.xmlValidatePushCData(self._o, data, len)
+ return ret
+
+ def validatePushElement(self, doc, elem, qname):
+ """Push a new element start on the validation stack. """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ if elem is None: elem__o = None
+ else: elem__o = elem._o
+ ret = libxml2mod.xmlValidatePushElement(self._o, doc__o, elem__o, qname)
+ return ret
+
+ def validateRoot(self, doc):
+ """Try to validate a the root element basically it does the
+ following check as described by the XML-1.0 recommendation:
+ - [ VC: Root Element Type ] it doesn't try to recurse or
+ apply other check to the element """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ ret = libxml2mod.xmlValidateRoot(self._o, doc__o)
+ return ret
+
+class xpathContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathContext
+ def contextDoc(self):
+ """Get the doc from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextDoc(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextDoc() failed')
+ __tmp = xmlDoc(_obj=ret)
+ return __tmp
+
+ def contextNode(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextNode(self._o)
+ if ret is None:raise xpathError('xmlXPathGetContextNode() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def contextPosition(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextPosition(self._o)
+ return ret
+
+ def contextSize(self):
+ """Get the current node from an xpathContext """
+ ret = libxml2mod.xmlXPathGetContextSize(self._o)
+ return ret
+
+ def function(self):
+ """Get the current function name xpathContext """
+ ret = libxml2mod.xmlXPathGetFunction(self._o)
+ return ret
+
+ def functionURI(self):
+ """Get the current function name URI xpathContext """
+ ret = libxml2mod.xmlXPathGetFunctionURI(self._o)
+ return ret
+
+ def setContextDoc(self, doc):
+ """Set the doc of an xpathContext """
+ if doc is None: doc__o = None
+ else: doc__o = doc._o
+ libxml2mod.xmlXPathSetContextDoc(self._o, doc__o)
+
+ def setContextNode(self, node):
+ """Set the current node of an xpathContext """
+ if node is None: node__o = None
+ else: node__o = node._o
+ libxml2mod.xmlXPathSetContextNode(self._o, node__o)
+
+ #
+ # xpathContext functions from module python
+ #
+
+ def registerXPathFunction(self, name, ns_uri, f):
+ """Register a Python written function to the XPath interpreter """
+ ret = libxml2mod.xmlRegisterXPathFunction(self._o, name, ns_uri, f)
+ return ret
+
+ def xpathRegisterVariable(self, name, ns_uri, value):
+ """Register a variable with the XPath context """
+ ret = libxml2mod.xmlXPathRegisterVariable(self._o, name, ns_uri, value)
+ return ret
+
+ #
+ # xpathContext functions from module xpath
+ #
+
+ def xpathContextSetCache(self, active, value, options):
+ """Creates/frees an object cache on the XPath context. If
+ activates XPath objects (xmlXPathObject) will be cached
+ internally to be reused. @options: 0: This will set the
+ XPath object caching: @value: This will set the maximum
+ number of XPath objects to be cached per slot There are 5
+ slots for: node-set, string, number, boolean, and misc
+ objects. Use <0 for the default number (100). Other values
+ for @options have currently no effect. """
+ ret = libxml2mod.xmlXPathContextSetCache(self._o, active, value, options)
+ return ret
+
+ def xpathEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPathEval(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEval() failed')
+ return xpathObjectRet(ret)
+
+ def xpathEvalExpression(self, str):
+ """Evaluate the XPath expression in the given context. """
+ ret = libxml2mod.xmlXPathEvalExpression(str, self._o)
+ if ret is None:raise xpathError('xmlXPathEvalExpression() failed')
+ return xpathObjectRet(ret)
+
+ def xpathFreeContext(self):
+ """Free up an xmlXPathContext """
+ libxml2mod.xmlXPathFreeContext(self._o)
+
+ #
+ # xpathContext functions from module xpathInternals
+ #
+
+ def xpathNewParserContext(self, str):
+ """Create a new xmlXPathParserContext """
+ ret = libxml2mod.xmlXPathNewParserContext(str, self._o)
+ if ret is None:raise xpathError('xmlXPathNewParserContext() failed')
+ __tmp = xpathParserContext(_obj=ret)
+ return __tmp
+
+ def xpathNsLookup(self, prefix):
+ """Search in the namespace declaration array of the context
+ for the given namespace name associated to the given prefix """
+ ret = libxml2mod.xmlXPathNsLookup(self._o, prefix)
+ return ret
+
+ def xpathRegisterAllFunctions(self):
+ """Registers all default XPath functions in this context """
+ libxml2mod.xmlXPathRegisterAllFunctions(self._o)
+
+ def xpathRegisterNs(self, prefix, ns_uri):
+ """Register a new namespace. If @ns_uri is None it unregisters
+ the namespace """
+ ret = libxml2mod.xmlXPathRegisterNs(self._o, prefix, ns_uri)
+ return ret
+
+ def xpathRegisteredFuncsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ functions """
+ libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)
+
+ def xpathRegisteredNsCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredNsCleanup(self._o)
+
+ def xpathRegisteredVariablesCleanup(self):
+ """Cleanup the XPath context data associated to registered
+ variables """
+ libxml2mod.xmlXPathRegisteredVariablesCleanup(self._o)
+
+ def xpathVariableLookup(self, name):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookup(self._o, name)
+ if ret is None:raise xpathError('xmlXPathVariableLookup() failed')
+ return xpathObjectRet(ret)
+
+ def xpathVariableLookupNS(self, name, ns_uri):
+ """Search in the Variable array of the context for the given
+ variable value. """
+ ret = libxml2mod.xmlXPathVariableLookupNS(self._o, name, ns_uri)
+ if ret is None:raise xpathError('xmlXPathVariableLookupNS() failed')
+ return xpathObjectRet(ret)
+
+ #
+ # xpathContext functions from module xpointer
+ #
+
+ def xpointerEval(self, str):
+ """Evaluate the XPath Location Path in the given context. """
+ ret = libxml2mod.xmlXPtrEval(str, self._o)
+ if ret is None:raise treeError('xmlXPtrEval() failed')
+ return xpathObjectRet(ret)
+
+class xpathParserContext:
+ def __init__(self, _obj=None):
+ if _obj != None:self._o = _obj;return
+ self._o = None
+
+ # accessors for xpathParserContext
+ def context(self):
+ """Get the xpathContext from an xpathParserContext """
+ ret = libxml2mod.xmlXPathParserGetContext(self._o)
+ if ret is None:raise xpathError('xmlXPathParserGetContext() failed')
+ __tmp = xpathContext(_obj=ret)
+ return __tmp
+
+ #
+ # xpathParserContext functions from module xpathInternals
+ #
+
+ def xpathAddValues(self):
+ """Implement the add operation on XPath objects: The numeric
+ operators convert their operands to numbers as if by
+ calling the number function. """
+ libxml2mod.xmlXPathAddValues(self._o)
+
+ def xpathBooleanFunction(self, nargs):
+ """Implement the boolean() XPath function boolean
+ boolean(object) The boolean function converts its argument
+ to a boolean as follows: - a number is true if and only if
+ it is neither positive or negative zero nor NaN - a
+ node-set is true if and only if it is non-empty - a string
+ is true if and only if its length is non-zero """
+ libxml2mod.xmlXPathBooleanFunction(self._o, nargs)
+
+ def xpathCeilingFunction(self, nargs):
+ """Implement the ceiling() XPath function number
+ ceiling(number) The ceiling function returns the smallest
+ (closest to negative infinity) number that is not less than
+ the argument and that is an integer. """
+ libxml2mod.xmlXPathCeilingFunction(self._o, nargs)
+
+ def xpathCompareValues(self, inf, strict):
+ """Implement the compare operation on XPath objects: @arg1 <
+ @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 >
+ @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When
+ neither object to be compared is a node-set and the
+ operator is <=, <, >=, >, then the objects are compared by
+ converted both objects to numbers and comparing the numbers
+ according to IEEE 754. The < comparison will be true if and
+ only if the first number is less than the second number.
+ The <= comparison will be true if and only if the first
+ number is less than or equal to the second number. The >
+ comparison will be true if and only if the first number is
+ greater than the second number. The >= comparison will be
+ true if and only if the first number is greater than or
+ equal to the second number. """
+ ret = libxml2mod.xmlXPathCompareValues(self._o, inf, strict)
+ return ret
+
+ def xpathConcatFunction(self, nargs):
+ """Implement the concat() XPath function string concat(string,
+ string, string*) The concat function returns the
+ concatenation of its arguments. """
+ libxml2mod.xmlXPathConcatFunction(self._o, nargs)
+
+ def xpathContainsFunction(self, nargs):
+ """Implement the contains() XPath function boolean
+ contains(string, string) The contains function returns true
+ if the first argument string contains the second argument
+ string, and otherwise returns false. """
+ libxml2mod.xmlXPathContainsFunction(self._o, nargs)
+
+ def xpathCountFunction(self, nargs):
+ """Implement the count() XPath function number count(node-set) """
+ libxml2mod.xmlXPathCountFunction(self._o, nargs)
+
+ def xpathDivValues(self):
+ """Implement the div operation on XPath objects @arg1 / @arg2:
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathDivValues(self._o)
+
+ def xpathEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathEqualValues(self._o)
+ return ret
+
+ def xpathErr(self, error):
+ """Handle an XPath error """
+ libxml2mod.xmlXPathErr(self._o, error)
+
+ def xpathEvalExpr(self):
+ """Parse and evaluate an XPath expression in the given
+ context, then push the result on the context stack """
+ libxml2mod.xmlXPathEvalExpr(self._o)
+
+ def xpathFalseFunction(self, nargs):
+ """Implement the false() XPath function boolean false() """
+ libxml2mod.xmlXPathFalseFunction(self._o, nargs)
+
+ def xpathFloorFunction(self, nargs):
+ """Implement the floor() XPath function number floor(number)
+ The floor function returns the largest (closest to positive
+ infinity) number that is not greater than the argument and
+ that is an integer. """
+ libxml2mod.xmlXPathFloorFunction(self._o, nargs)
+
+ def xpathFreeParserContext(self):
+ """Free up an xmlXPathParserContext """
+ libxml2mod.xmlXPathFreeParserContext(self._o)
+
+ def xpathIdFunction(self, nargs):
+ """Implement the id() XPath function node-set id(object) The
+ id function selects elements by their unique ID (see [5.2.1
+ Unique IDs]). When the argument to id is of type node-set,
+ then the result is the union of the result of applying id
+ to the string value of each of the nodes in the argument
+ node-set. When the argument to id is of any other type, the
+ argument is converted to a string as if by a call to the
+ string function; the string is split into a
+ whitespace-separated list of tokens (whitespace is any
+ sequence of characters matching the production S); the
+ result is a node-set containing the elements in the same
+ document as the context node that have a unique ID equal to
+ any of the tokens in the list. """
+ libxml2mod.xmlXPathIdFunction(self._o, nargs)
+
+ def xpathLangFunction(self, nargs):
+ """Implement the lang() XPath function boolean lang(string)
+ The lang function returns true or false depending on
+ whether the language of the context node as specified by
+ xml:lang attributes is the same as or is a sublanguage of
+ the language specified by the argument string. The language
+ of the context node is determined by the value of the
+ xml:lang attribute on the context node, or, if the context
+ node has no xml:lang attribute, by the value of the
+ xml:lang attribute on the nearest ancestor of the context
+ node that has an xml:lang attribute. If there is no such
+ attribute, then lang """
+ libxml2mod.xmlXPathLangFunction(self._o, nargs)
+
+ def xpathLastFunction(self, nargs):
+ """Implement the last() XPath function number last() The last
+ function returns the number of nodes in the context node
+ list. """
+ libxml2mod.xmlXPathLastFunction(self._o, nargs)
+
+ def xpathLocalNameFunction(self, nargs):
+ """Implement the local-name() XPath function string
+ local-name(node-set?) The local-name function returns a
+ string containing the local part of the name of the node in
+ the argument node-set that is first in document order. If
+ the node-set is empty or the first node has no name, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathLocalNameFunction(self._o, nargs)
+
+ def xpathModValues(self):
+ """Implement the mod operation on XPath objects: @arg1 / @arg2
+ The numeric operators convert their operands to numbers as
+ if by calling the number function. """
+ libxml2mod.xmlXPathModValues(self._o)
+
+ def xpathMultValues(self):
+ """Implement the multiply operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathMultValues(self._o)
+
+ def xpathNamespaceURIFunction(self, nargs):
+ """Implement the namespace-uri() XPath function string
+ namespace-uri(node-set?) The namespace-uri function returns
+ a string containing the namespace URI of the expanded name
+ of the node in the argument node-set that is first in
+ document order. If the node-set is empty, the first node
+ has no name, or the expanded name has no namespace URI, an
+ empty string is returned. If the argument is omitted it
+ defaults to the context node. """
+ libxml2mod.xmlXPathNamespaceURIFunction(self._o, nargs)
+
+ def xpathNextAncestor(self, cur):
+ """Traversal function for the "ancestor" direction the
+ ancestor axis contains the ancestors of the context node;
+ the ancestors of the context node consist of the parent of
+ context node and the parent's parent and so on; the nodes
+ are ordered in reverse document order; thus the parent is
+ the first node on the axis, and the parent's parent is the
+ second node on the axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestor(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestor() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAncestorOrSelf(self, cur):
+ """Traversal function for the "ancestor-or-self" direction he
+ ancestor-or-self axis contains the context node and
+ ancestors of the context node in reverse document order;
+ thus the context node is the first node on the axis, and
+ the context node's parent the second; parent here is
+ defined the same as with the parent axis. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAncestorOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAncestorOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextAttribute(self, cur):
+ """Traversal function for the "attribute" direction TODO:
+ support DTD inherited default attributes """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextAttribute(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextAttribute() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextChild(self, cur):
+ """Traversal function for the "child" direction The child axis
+ contains the children of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextChild(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextChild() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendant(self, cur):
+ """Traversal function for the "descendant" direction the
+ descendant axis contains the descendants of the context
+ node in document order; a descendant is a child or a child
+ of a child and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendant() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextDescendantOrSelf(self, cur):
+ """Traversal function for the "descendant-or-self" direction
+ the descendant-or-self axis contains the context node and
+ the descendants of the context node in document order; thus
+ the context node is the first node on the axis, and the
+ first child of the context node is the second node on the
+ axis """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextDescendantOrSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextDescendantOrSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowing(self, cur):
+ """Traversal function for the "following" direction The
+ following axis contains all nodes in the same document as
+ the context node that are after the context node in
+ document order, excluding any descendants and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowing(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowing() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextFollowingSibling(self, cur):
+ """Traversal function for the "following-sibling" direction
+ The following-sibling axis contains the following siblings
+ of the context node in document order. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextFollowingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextFollowingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextNamespace(self, cur):
+ """Traversal function for the "namespace" direction the
+ namespace axis contains the namespace nodes of the context
+ node; the order of nodes on this axis is
+ implementation-defined; the axis will be empty unless the
+ context node is an element We keep the XML namespace node
+ at the end of the list. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextNamespace(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextNamespace() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextParent(self, cur):
+ """Traversal function for the "parent" direction The parent
+ axis contains the parent of the context node, if there is
+ one. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextParent(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextParent() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPreceding(self, cur):
+ """Traversal function for the "preceding" direction the
+ preceding axis contains all nodes in the same document as
+ the context node that are before the context node in
+ document order, excluding any ancestors and excluding
+ attribute nodes and namespace nodes; the nodes are ordered
+ in reverse document order """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPreceding(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPreceding() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextPrecedingSibling(self, cur):
+ """Traversal function for the "preceding-sibling" direction
+ The preceding-sibling axis contains the preceding siblings
+ of the context node in reverse document order; the first
+ preceding sibling is first on the axis; the sibling
+ preceding that node is the second on the axis and so on. """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextPrecedingSibling(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextPrecedingSibling() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNextSelf(self, cur):
+ """Traversal function for the "self" direction The self axis
+ contains just the context node itself """
+ if cur is None: cur__o = None
+ else: cur__o = cur._o
+ ret = libxml2mod.xmlXPathNextSelf(self._o, cur__o)
+ if ret is None:raise xpathError('xmlXPathNextSelf() failed')
+ __tmp = xmlNode(_obj=ret)
+ return __tmp
+
+ def xpathNormalizeFunction(self, nargs):
+ """Implement the normalize-space() XPath function string
+ normalize-space(string?) The normalize-space function
+ returns the argument string with white space normalized by
+ stripping leading and trailing whitespace and replacing
+ sequences of whitespace characters by a single space.
+ Whitespace characters are the same allowed by the S
+ production in XML. If the argument is omitted, it defaults
+ to the context node converted to a string, in other words
+ the value of the context node. """
+ libxml2mod.xmlXPathNormalizeFunction(self._o, nargs)
+
+ def xpathNotEqualValues(self):
+ """Implement the equal operation on XPath objects content:
+ @arg1 == @arg2 """
+ ret = libxml2mod.xmlXPathNotEqualValues(self._o)
+ return ret
+
+ def xpathNotFunction(self, nargs):
+ """Implement the not() XPath function boolean not(boolean) The
+ not function returns true if its argument is false, and
+ false otherwise. """
+ libxml2mod.xmlXPathNotFunction(self._o, nargs)
+
+ def xpathNumberFunction(self, nargs):
+ """Implement the number() XPath function number number(object?) """
+ libxml2mod.xmlXPathNumberFunction(self._o, nargs)
+
+ def xpathParseNCName(self):
+ """parse an XML namespace non qualified name. [NS 3] NCName
+ ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::=
+ Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender """
+ ret = libxml2mod.xmlXPathParseNCName(self._o)
+ return ret
+
+ def xpathParseName(self):
+ """parse an XML name [4] NameChar ::= Letter | Digit | '.' |
+ '-' | '_' | ':' | CombiningChar | Extender [5] Name ::=
+ (Letter | '_' | ':') (NameChar)* """
+ ret = libxml2mod.xmlXPathParseName(self._o)
+ return ret
+
+ def xpathPopBoolean(self):
+ """Pops a boolean from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopBoolean(self._o)
+ return ret
+
+ def xpathPopNumber(self):
+ """Pops a number from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopNumber(self._o)
+ return ret
+
+ def xpathPopString(self):
+ """Pops a string from the stack, handling conversion if
+ needed. Check error with #xmlXPathCheckError. """
+ ret = libxml2mod.xmlXPathPopString(self._o)
+ return ret
+
+ def xpathPositionFunction(self, nargs):
+ """Implement the position() XPath function number position()
+ The position function returns the position of the context
+ node in the context node list. The first position is 1, and
+ so the last position will be equal to last(). """
+ libxml2mod.xmlXPathPositionFunction(self._o, nargs)
+
+ def xpathRoot(self):
+ """Initialize the context to the root of the document """
+ libxml2mod.xmlXPathRoot(self._o)
+
+ def xpathRoundFunction(self, nargs):
+ """Implement the round() XPath function number round(number)
+ The round function returns the number that is closest to
+ the argument and that is an integer. If there are two such
+ numbers, then the one that is even is returned. """
+ libxml2mod.xmlXPathRoundFunction(self._o, nargs)
+
+ def xpathStartsWithFunction(self, nargs):
+ """Implement the starts-with() XPath function boolean
+ starts-with(string, string) The starts-with function
+ returns true if the first argument string starts with the
+ second argument string, and otherwise returns false. """
+ libxml2mod.xmlXPathStartsWithFunction(self._o, nargs)
+
+ def xpathStringFunction(self, nargs):
+ """Implement the string() XPath function string
+ string(object?) The string function converts an object to a
+ string as follows: - A node-set is converted to a string by
+ returning the value of the node in the node-set that is
+ first in document order. If the node-set is empty, an empty
+ string is returned. - A number is converted to a string as
+ follows + NaN is converted to the string NaN + positive
+ zero is converted to the string 0 + negative zero is
+ converted to the string 0 + positive infinity is converted
+ to the string Infinity + negative infinity is converted to
+ the string -Infinity + if the number is an integer, the
+ number is represented in decimal form as a Number with no
+ decimal point and no leading zeros, preceded by a minus
+ sign (-) if the number is negative + otherwise, the number
+ is represented in decimal form as a Number including a
+ decimal point with at least one digit before the decimal
+ point and at least one digit after the decimal point,
+ preceded by a minus sign (-) if the number is negative;
+ there must be no leading zeros before the decimal point
+ apart possibly from the one required digit immediately
+ before the decimal point; beyond the one required digit
+ after the decimal point there must be as many, but only as
+ many, more digits as are needed to uniquely distinguish the
+ number from all other IEEE 754 numeric values. - The
+ boolean false value is converted to the string false. The
+ boolean true value is converted to the string true. If the
+ argument is omitted, it defaults to a node-set with the
+ context node as its only member. """
+ libxml2mod.xmlXPathStringFunction(self._o, nargs)
+
+ def xpathStringLengthFunction(self, nargs):
+ """Implement the string-length() XPath function number
+ string-length(string?) The string-length returns the number
+ of characters in the string (see [3.6 Strings]). If the
+ argument is omitted, it defaults to the context node
+ converted to a string, in other words the value of the
+ context node. """
+ libxml2mod.xmlXPathStringLengthFunction(self._o, nargs)
+
+ def xpathSubValues(self):
+ """Implement the subtraction operation on XPath objects: The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathSubValues(self._o)
+
+ def xpathSubstringAfterFunction(self, nargs):
+ """Implement the substring-after() XPath function string
+ substring-after(string, string) The substring-after
+ function returns the substring of the first argument string
+ that follows the first occurrence of the second argument
+ string in the first argument string, or the empty stringi
+ if the first argument string does not contain the second
+ argument string. For example,
+ substring-after("1999/04/01","/") returns 04/01, and
+ substring-after("1999/04/01","19") returns 99/04/01. """
+ libxml2mod.xmlXPathSubstringAfterFunction(self._o, nargs)
+
+ def xpathSubstringBeforeFunction(self, nargs):
+ """Implement the substring-before() XPath function string
+ substring-before(string, string) The substring-before
+ function returns the substring of the first argument string
+ that precedes the first occurrence of the second argument
+ string in the first argument string, or the empty string if
+ the first argument string does not contain the second
+ argument string. For example,
+ substring-before("1999/04/01","/") returns 1999. """
+ libxml2mod.xmlXPathSubstringBeforeFunction(self._o, nargs)
+
+ def xpathSubstringFunction(self, nargs):
+ """Implement the substring() XPath function string
+ substring(string, number, number?) The substring function
+ returns the substring of the first argument starting at the
+ position specified in the second argument with length
+ specified in the third argument. For example,
+ substring("12345",2,3) returns "234". If the third argument
+ is not specified, it returns the substring starting at the
+ position specified in the second argument and continuing to
+ the end of the string. For example, substring("12345",2)
+ returns "2345". More precisely, each character in the
+ string (see [3.6 Strings]) is considered to have a numeric
+ position: the position of the first character is 1, the
+ position of the second character is 2 and so on. The
+ returned substring contains those characters for which the
+ position of the character is greater than or equal to the
+ second argument and, if the third argument is specified,
+ less than the sum of the second and third arguments; the
+ comparisons and addition used for the above follow the
+ standard IEEE 754 rules. Thus: - substring("12345", 1.5,
+ 2.6) returns "234" - substring("12345", 0, 3) returns "12"
+ - substring("12345", 0 div 0, 3) returns "" -
+ substring("12345", 1, 0 div 0) returns "" -
+ substring("12345", -42, 1 div 0) returns "12345" -
+ substring("12345", -1 div 0, 1 div 0) returns "" """
+ libxml2mod.xmlXPathSubstringFunction(self._o, nargs)
+
+ def xpathSumFunction(self, nargs):
+ """Implement the sum() XPath function number sum(node-set) The
+ sum function returns the sum of the values of the nodes in
+ the argument node-set. """
+ libxml2mod.xmlXPathSumFunction(self._o, nargs)
+
+ def xpathTranslateFunction(self, nargs):
+ """Implement the translate() XPath function string
+ translate(string, string, string) The translate function
+ returns the first argument string with occurrences of
+ characters in the second argument string replaced by the
+ character at the corresponding position in the third
+ argument string. For example, translate("bar","abc","ABC")
+ returns the string BAr. If there is a character in the
+ second argument string with no character at a corresponding
+ position in the third argument string (because the second
+ argument string is longer than the third argument string),
+ then occurrences of that character in the first argument
+ string are removed. For example,
+ translate("--aaa--","abc-","ABC") """
+ libxml2mod.xmlXPathTranslateFunction(self._o, nargs)
+
+ def xpathTrueFunction(self, nargs):
+ """Implement the true() XPath function boolean true() """
+ libxml2mod.xmlXPathTrueFunction(self._o, nargs)
+
+ def xpathValueFlipSign(self):
+ """Implement the unary - operation on an XPath object The
+ numeric operators convert their operands to numbers as if
+ by calling the number function. """
+ libxml2mod.xmlXPathValueFlipSign(self._o)
+
+ def xpatherror(self, file, line, no):
+ """Formats an error message. """
+ libxml2mod.xmlXPatherror(self._o, file, line, no)
+
+ #
+ # xpathParserContext functions from module xpointer
+ #
+
+ def xpointerEvalRangePredicate(self):
+ """[8] Predicate ::= '[' PredicateExpr ']' [9]
+ PredicateExpr ::= Expr Evaluate a predicate as in
+ xmlXPathEvalPredicate() but for a Location Set instead of a
+ node set """
+ libxml2mod.xmlXPtrEvalRangePredicate(self._o)
+
+ def xpointerRangeToFunction(self, nargs):
+ """Implement the range-to() XPointer function """
+ libxml2mod.xmlXPtrRangeToFunction(self._o, nargs)
+
+# xlinkShow
+XLINK_SHOW_NONE = 0
+XLINK_SHOW_NEW = 1
+XLINK_SHOW_EMBED = 2
+XLINK_SHOW_REPLACE = 3
+
+# xmlRelaxNGParserFlag
+XML_RELAXNGP_NONE = 0
+XML_RELAXNGP_FREE_DOC = 1
+XML_RELAXNGP_CRNG = 2
+
+# xmlBufferAllocationScheme
+XML_BUFFER_ALLOC_DOUBLEIT = 1
+XML_BUFFER_ALLOC_EXACT = 2
+XML_BUFFER_ALLOC_IMMUTABLE = 3
+XML_BUFFER_ALLOC_IO = 4
+XML_BUFFER_ALLOC_HYBRID = 5
+
+# xmlParserSeverities
+XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
+XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
+XML_PARSER_SEVERITY_WARNING = 3
+XML_PARSER_SEVERITY_ERROR = 4
+
+# xmlAttributeDefault
+XML_ATTRIBUTE_NONE = 1
+XML_ATTRIBUTE_REQUIRED = 2
+XML_ATTRIBUTE_IMPLIED = 3
+XML_ATTRIBUTE_FIXED = 4
+
+# xmlSchemaValType
+XML_SCHEMAS_UNKNOWN = 0
+XML_SCHEMAS_STRING = 1
+XML_SCHEMAS_NORMSTRING = 2
+XML_SCHEMAS_DECIMAL = 3
+XML_SCHEMAS_TIME = 4
+XML_SCHEMAS_GDAY = 5
+XML_SCHEMAS_GMONTH = 6
+XML_SCHEMAS_GMONTHDAY = 7
+XML_SCHEMAS_GYEAR = 8
+XML_SCHEMAS_GYEARMONTH = 9
+XML_SCHEMAS_DATE = 10
+XML_SCHEMAS_DATETIME = 11
+XML_SCHEMAS_DURATION = 12
+XML_SCHEMAS_FLOAT = 13
+XML_SCHEMAS_DOUBLE = 14
+XML_SCHEMAS_BOOLEAN = 15
+XML_SCHEMAS_TOKEN = 16
+XML_SCHEMAS_LANGUAGE = 17
+XML_SCHEMAS_NMTOKEN = 18
+XML_SCHEMAS_NMTOKENS = 19
+XML_SCHEMAS_NAME = 20
+XML_SCHEMAS_QNAME = 21
+XML_SCHEMAS_NCNAME = 22
+XML_SCHEMAS_ID = 23
+XML_SCHEMAS_IDREF = 24
+XML_SCHEMAS_IDREFS = 25
+XML_SCHEMAS_ENTITY = 26
+XML_SCHEMAS_ENTITIES = 27
+XML_SCHEMAS_NOTATION = 28
+XML_SCHEMAS_ANYURI = 29
+XML_SCHEMAS_INTEGER = 30
+XML_SCHEMAS_NPINTEGER = 31
+XML_SCHEMAS_NINTEGER = 32
+XML_SCHEMAS_NNINTEGER = 33
+XML_SCHEMAS_PINTEGER = 34
+XML_SCHEMAS_INT = 35
+XML_SCHEMAS_UINT = 36
+XML_SCHEMAS_LONG = 37
+XML_SCHEMAS_ULONG = 38
+XML_SCHEMAS_SHORT = 39
+XML_SCHEMAS_USHORT = 40
+XML_SCHEMAS_BYTE = 41
+XML_SCHEMAS_UBYTE = 42
+XML_SCHEMAS_HEXBINARY = 43
+XML_SCHEMAS_BASE64BINARY = 44
+XML_SCHEMAS_ANYTYPE = 45
+XML_SCHEMAS_ANYSIMPLETYPE = 46
+
+# xmlParserInputState
+XML_PARSER_EOF = -1
+XML_PARSER_START = 0
+XML_PARSER_MISC = 1
+XML_PARSER_PI = 2
+XML_PARSER_DTD = 3
+XML_PARSER_PROLOG = 4
+XML_PARSER_COMMENT = 5
+XML_PARSER_START_TAG = 6
+XML_PARSER_CONTENT = 7
+XML_PARSER_CDATA_SECTION = 8
+XML_PARSER_END_TAG = 9
+XML_PARSER_ENTITY_DECL = 10
+XML_PARSER_ENTITY_VALUE = 11
+XML_PARSER_ATTRIBUTE_VALUE = 12
+XML_PARSER_SYSTEM_LITERAL = 13
+XML_PARSER_EPILOG = 14
+XML_PARSER_IGNORE = 15
+XML_PARSER_PUBLIC_LITERAL = 16
+
+# xmlEntityType
+XML_INTERNAL_GENERAL_ENTITY = 1
+XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2
+XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3
+XML_INTERNAL_PARAMETER_ENTITY = 4
+XML_EXTERNAL_PARAMETER_ENTITY = 5
+XML_INTERNAL_PREDEFINED_ENTITY = 6
+
+# xmlSaveOption
+XML_SAVE_FORMAT = 1
+XML_SAVE_NO_DECL = 2
+XML_SAVE_NO_EMPTY = 4
+XML_SAVE_NO_XHTML = 8
+XML_SAVE_XHTML = 16
+XML_SAVE_AS_XML = 32
+XML_SAVE_AS_HTML = 64
+XML_SAVE_WSNONSIG = 128
+
+# xmlPatternFlags
+XML_PATTERN_DEFAULT = 0
+XML_PATTERN_XPATH = 1
+XML_PATTERN_XSSEL = 2
+XML_PATTERN_XSFIELD = 4
+
+# xmlParserErrors
+XML_ERR_OK = 0
+XML_ERR_INTERNAL_ERROR = 1
+XML_ERR_NO_MEMORY = 2
+XML_ERR_DOCUMENT_START = 3
+XML_ERR_DOCUMENT_EMPTY = 4
+XML_ERR_DOCUMENT_END = 5
+XML_ERR_INVALID_HEX_CHARREF = 6
+XML_ERR_INVALID_DEC_CHARREF = 7
+XML_ERR_INVALID_CHARREF = 8
+XML_ERR_INVALID_CHAR = 9
+XML_ERR_CHARREF_AT_EOF = 10
+XML_ERR_CHARREF_IN_PROLOG = 11
+XML_ERR_CHARREF_IN_EPILOG = 12
+XML_ERR_CHARREF_IN_DTD = 13
+XML_ERR_ENTITYREF_AT_EOF = 14
+XML_ERR_ENTITYREF_IN_PROLOG = 15
+XML_ERR_ENTITYREF_IN_EPILOG = 16
+XML_ERR_ENTITYREF_IN_DTD = 17
+XML_ERR_PEREF_AT_EOF = 18
+XML_ERR_PEREF_IN_PROLOG = 19
+XML_ERR_PEREF_IN_EPILOG = 20
+XML_ERR_PEREF_IN_INT_SUBSET = 21
+XML_ERR_ENTITYREF_NO_NAME = 22
+XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
+XML_ERR_PEREF_NO_NAME = 24
+XML_ERR_PEREF_SEMICOL_MISSING = 25
+XML_ERR_UNDECLARED_ENTITY = 26
+XML_WAR_UNDECLARED_ENTITY = 27
+XML_ERR_UNPARSED_ENTITY = 28
+XML_ERR_ENTITY_IS_EXTERNAL = 29
+XML_ERR_ENTITY_IS_PARAMETER = 30
+XML_ERR_UNKNOWN_ENCODING = 31
+XML_ERR_UNSUPPORTED_ENCODING = 32
+XML_ERR_STRING_NOT_STARTED = 33
+XML_ERR_STRING_NOT_CLOSED = 34
+XML_ERR_NS_DECL_ERROR = 35
+XML_ERR_ENTITY_NOT_STARTED = 36
+XML_ERR_ENTITY_NOT_FINISHED = 37
+XML_ERR_LT_IN_ATTRIBUTE = 38
+XML_ERR_ATTRIBUTE_NOT_STARTED = 39
+XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
+XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
+XML_ERR_ATTRIBUTE_REDEFINED = 42
+XML_ERR_LITERAL_NOT_STARTED = 43
+XML_ERR_LITERAL_NOT_FINISHED = 44
+XML_ERR_COMMENT_NOT_FINISHED = 45
+XML_ERR_PI_NOT_STARTED = 46
+XML_ERR_PI_NOT_FINISHED = 47
+XML_ERR_NOTATION_NOT_STARTED = 48
+XML_ERR_NOTATION_NOT_FINISHED = 49
+XML_ERR_ATTLIST_NOT_STARTED = 50
+XML_ERR_ATTLIST_NOT_FINISHED = 51
+XML_ERR_MIXED_NOT_STARTED = 52
+XML_ERR_MIXED_NOT_FINISHED = 53
+XML_ERR_ELEMCONTENT_NOT_STARTED = 54
+XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
+XML_ERR_XMLDECL_NOT_STARTED = 56
+XML_ERR_XMLDECL_NOT_FINISHED = 57
+XML_ERR_CONDSEC_NOT_STARTED = 58
+XML_ERR_CONDSEC_NOT_FINISHED = 59
+XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
+XML_ERR_DOCTYPE_NOT_FINISHED = 61
+XML_ERR_MISPLACED_CDATA_END = 62
+XML_ERR_CDATA_NOT_FINISHED = 63
+XML_ERR_RESERVED_XML_NAME = 64
+XML_ERR_SPACE_REQUIRED = 65
+XML_ERR_SEPARATOR_REQUIRED = 66
+XML_ERR_NMTOKEN_REQUIRED = 67
+XML_ERR_NAME_REQUIRED = 68
+XML_ERR_PCDATA_REQUIRED = 69
+XML_ERR_URI_REQUIRED = 70
+XML_ERR_PUBID_REQUIRED = 71
+XML_ERR_LT_REQUIRED = 72
+XML_ERR_GT_REQUIRED = 73
+XML_ERR_LTSLASH_REQUIRED = 74
+XML_ERR_EQUAL_REQUIRED = 75
+XML_ERR_TAG_NAME_MISMATCH = 76
+XML_ERR_TAG_NOT_FINISHED = 77
+XML_ERR_STANDALONE_VALUE = 78
+XML_ERR_ENCODING_NAME = 79
+XML_ERR_HYPHEN_IN_COMMENT = 80
+XML_ERR_INVALID_ENCODING = 81
+XML_ERR_EXT_ENTITY_STANDALONE = 82
+XML_ERR_CONDSEC_INVALID = 83
+XML_ERR_VALUE_REQUIRED = 84
+XML_ERR_NOT_WELL_BALANCED = 85
+XML_ERR_EXTRA_CONTENT = 86
+XML_ERR_ENTITY_CHAR_ERROR = 87
+XML_ERR_ENTITY_PE_INTERNAL = 88
+XML_ERR_ENTITY_LOOP = 89
+XML_ERR_ENTITY_BOUNDARY = 90
+XML_ERR_INVALID_URI = 91
+XML_ERR_URI_FRAGMENT = 92
+XML_WAR_CATALOG_PI = 93
+XML_ERR_NO_DTD = 94
+XML_ERR_CONDSEC_INVALID_KEYWORD = 95
+XML_ERR_VERSION_MISSING = 96
+XML_WAR_UNKNOWN_VERSION = 97
+XML_WAR_LANG_VALUE = 98
+XML_WAR_NS_URI = 99
+XML_WAR_NS_URI_RELATIVE = 100
+XML_ERR_MISSING_ENCODING = 101
+XML_WAR_SPACE_VALUE = 102
+XML_ERR_NOT_STANDALONE = 103
+XML_ERR_ENTITY_PROCESSING = 104
+XML_ERR_NOTATION_PROCESSING = 105
+XML_WAR_NS_COLUMN = 106
+XML_WAR_ENTITY_REDEFINED = 107
+XML_ERR_UNKNOWN_VERSION = 108
+XML_ERR_VERSION_MISMATCH = 109
+XML_ERR_NAME_TOO_LONG = 110
+XML_ERR_USER_STOP = 111
+XML_NS_ERR_XML_NAMESPACE = 200
+XML_NS_ERR_UNDEFINED_NAMESPACE = 201
+XML_NS_ERR_QNAME = 202
+XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
+XML_NS_ERR_EMPTY = 204
+XML_NS_ERR_COLON = 205
+XML_DTD_ATTRIBUTE_DEFAULT = 500
+XML_DTD_ATTRIBUTE_REDEFINED = 501
+XML_DTD_ATTRIBUTE_VALUE = 502
+XML_DTD_CONTENT_ERROR = 503
+XML_DTD_CONTENT_MODEL = 504
+XML_DTD_CONTENT_NOT_DETERMINIST = 505
+XML_DTD_DIFFERENT_PREFIX = 506
+XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
+XML_DTD_ELEM_NAMESPACE = 508
+XML_DTD_ELEM_REDEFINED = 509
+XML_DTD_EMPTY_NOTATION = 510
+XML_DTD_ENTITY_TYPE = 511
+XML_DTD_ID_FIXED = 512
+XML_DTD_ID_REDEFINED = 513
+XML_DTD_ID_SUBSET = 514
+XML_DTD_INVALID_CHILD = 515
+XML_DTD_INVALID_DEFAULT = 516
+XML_DTD_LOAD_ERROR = 517
+XML_DTD_MISSING_ATTRIBUTE = 518
+XML_DTD_MIXED_CORRUPT = 519
+XML_DTD_MULTIPLE_ID = 520
+XML_DTD_NO_DOC = 521
+XML_DTD_NO_DTD = 522
+XML_DTD_NO_ELEM_NAME = 523
+XML_DTD_NO_PREFIX = 524
+XML_DTD_NO_ROOT = 525
+XML_DTD_NOTATION_REDEFINED = 526
+XML_DTD_NOTATION_VALUE = 527
+XML_DTD_NOT_EMPTY = 528
+XML_DTD_NOT_PCDATA = 529
+XML_DTD_NOT_STANDALONE = 530
+XML_DTD_ROOT_NAME = 531
+XML_DTD_STANDALONE_WHITE_SPACE = 532
+XML_DTD_UNKNOWN_ATTRIBUTE = 533
+XML_DTD_UNKNOWN_ELEM = 534
+XML_DTD_UNKNOWN_ENTITY = 535
+XML_DTD_UNKNOWN_ID = 536
+XML_DTD_UNKNOWN_NOTATION = 537
+XML_DTD_STANDALONE_DEFAULTED = 538
+XML_DTD_XMLID_VALUE = 539
+XML_DTD_XMLID_TYPE = 540
+XML_DTD_DUP_TOKEN = 541
+XML_HTML_STRUCURE_ERROR = 800
+XML_HTML_UNKNOWN_TAG = 801
+XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
+XML_RNGP_ATTR_CONFLICT = 1001
+XML_RNGP_ATTRIBUTE_CHILDREN = 1002
+XML_RNGP_ATTRIBUTE_CONTENT = 1003
+XML_RNGP_ATTRIBUTE_EMPTY = 1004
+XML_RNGP_ATTRIBUTE_NOOP = 1005
+XML_RNGP_CHOICE_CONTENT = 1006
+XML_RNGP_CHOICE_EMPTY = 1007
+XML_RNGP_CREATE_FAILURE = 1008
+XML_RNGP_DATA_CONTENT = 1009
+XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
+XML_RNGP_DEFINE_CREATE_FAILED = 1011
+XML_RNGP_DEFINE_EMPTY = 1012
+XML_RNGP_DEFINE_MISSING = 1013
+XML_RNGP_DEFINE_NAME_MISSING = 1014
+XML_RNGP_ELEM_CONTENT_EMPTY = 1015
+XML_RNGP_ELEM_CONTENT_ERROR = 1016
+XML_RNGP_ELEMENT_EMPTY = 1017
+XML_RNGP_ELEMENT_CONTENT = 1018
+XML_RNGP_ELEMENT_NAME = 1019
+XML_RNGP_ELEMENT_NO_CONTENT = 1020
+XML_RNGP_ELEM_TEXT_CONFLICT = 1021
+XML_RNGP_EMPTY = 1022
+XML_RNGP_EMPTY_CONSTRUCT = 1023
+XML_RNGP_EMPTY_CONTENT = 1024
+XML_RNGP_EMPTY_NOT_EMPTY = 1025
+XML_RNGP_ERROR_TYPE_LIB = 1026
+XML_RNGP_EXCEPT_EMPTY = 1027
+XML_RNGP_EXCEPT_MISSING = 1028
+XML_RNGP_EXCEPT_MULTIPLE = 1029
+XML_RNGP_EXCEPT_NO_CONTENT = 1030
+XML_RNGP_EXTERNALREF_EMTPY = 1031
+XML_RNGP_EXTERNAL_REF_FAILURE = 1032
+XML_RNGP_EXTERNALREF_RECURSE = 1033
+XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
+XML_RNGP_FOREIGN_ELEMENT = 1035
+XML_RNGP_GRAMMAR_CONTENT = 1036
+XML_RNGP_GRAMMAR_EMPTY = 1037
+XML_RNGP_GRAMMAR_MISSING = 1038
+XML_RNGP_GRAMMAR_NO_START = 1039
+XML_RNGP_GROUP_ATTR_CONFLICT = 1040
+XML_RNGP_HREF_ERROR = 1041
+XML_RNGP_INCLUDE_EMPTY = 1042
+XML_RNGP_INCLUDE_FAILURE = 1043
+XML_RNGP_INCLUDE_RECURSE = 1044
+XML_RNGP_INTERLEAVE_ADD = 1045
+XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
+XML_RNGP_INTERLEAVE_EMPTY = 1047
+XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
+XML_RNGP_INVALID_DEFINE_NAME = 1049
+XML_RNGP_INVALID_URI = 1050
+XML_RNGP_INVALID_VALUE = 1051
+XML_RNGP_MISSING_HREF = 1052
+XML_RNGP_NAME_MISSING = 1053
+XML_RNGP_NEED_COMBINE = 1054
+XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
+XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
+XML_RNGP_NSNAME_NO_NS = 1057
+XML_RNGP_PARAM_FORBIDDEN = 1058
+XML_RNGP_PARAM_NAME_MISSING = 1059
+XML_RNGP_PARENTREF_CREATE_FAILED = 1060
+XML_RNGP_PARENTREF_NAME_INVALID = 1061
+XML_RNGP_PARENTREF_NO_NAME = 1062
+XML_RNGP_PARENTREF_NO_PARENT = 1063
+XML_RNGP_PARENTREF_NOT_EMPTY = 1064
+XML_RNGP_PARSE_ERROR = 1065
+XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
+XML_RNGP_PAT_ATTR_ATTR = 1067
+XML_RNGP_PAT_ATTR_ELEM = 1068
+XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
+XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
+XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
+XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
+XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
+XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
+XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
+XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
+XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
+XML_RNGP_PAT_LIST_ATTR = 1078
+XML_RNGP_PAT_LIST_ELEM = 1079
+XML_RNGP_PAT_LIST_INTERLEAVE = 1080
+XML_RNGP_PAT_LIST_LIST = 1081
+XML_RNGP_PAT_LIST_REF = 1082
+XML_RNGP_PAT_LIST_TEXT = 1083
+XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
+XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
+XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
+XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
+XML_RNGP_PAT_START_ATTR = 1088
+XML_RNGP_PAT_START_DATA = 1089
+XML_RNGP_PAT_START_EMPTY = 1090
+XML_RNGP_PAT_START_GROUP = 1091
+XML_RNGP_PAT_START_INTERLEAVE = 1092
+XML_RNGP_PAT_START_LIST = 1093
+XML_RNGP_PAT_START_ONEMORE = 1094
+XML_RNGP_PAT_START_TEXT = 1095
+XML_RNGP_PAT_START_VALUE = 1096
+XML_RNGP_PREFIX_UNDEFINED = 1097
+XML_RNGP_REF_CREATE_FAILED = 1098
+XML_RNGP_REF_CYCLE = 1099
+XML_RNGP_REF_NAME_INVALID = 1100
+XML_RNGP_REF_NO_DEF = 1101
+XML_RNGP_REF_NO_NAME = 1102
+XML_RNGP_REF_NOT_EMPTY = 1103
+XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
+XML_RNGP_START_CONTENT = 1105
+XML_RNGP_START_EMPTY = 1106
+XML_RNGP_START_MISSING = 1107
+XML_RNGP_TEXT_EXPECTED = 1108
+XML_RNGP_TEXT_HAS_CHILD = 1109
+XML_RNGP_TYPE_MISSING = 1110
+XML_RNGP_TYPE_NOT_FOUND = 1111
+XML_RNGP_TYPE_VALUE = 1112
+XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
+XML_RNGP_UNKNOWN_COMBINE = 1114
+XML_RNGP_UNKNOWN_CONSTRUCT = 1115
+XML_RNGP_UNKNOWN_TYPE_LIB = 1116
+XML_RNGP_URI_FRAGMENT = 1117
+XML_RNGP_URI_NOT_ABSOLUTE = 1118
+XML_RNGP_VALUE_EMPTY = 1119
+XML_RNGP_VALUE_NO_CONTENT = 1120
+XML_RNGP_XMLNS_NAME = 1121
+XML_RNGP_XML_NS = 1122
+XML_XPATH_EXPRESSION_OK = 1200
+XML_XPATH_NUMBER_ERROR = 1201
+XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
+XML_XPATH_START_LITERAL_ERROR = 1203
+XML_XPATH_VARIABLE_REF_ERROR = 1204
+XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
+XML_XPATH_INVALID_PREDICATE_ERROR = 1206
+XML_XPATH_EXPR_ERROR = 1207
+XML_XPATH_UNCLOSED_ERROR = 1208
+XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
+XML_XPATH_INVALID_OPERAND = 1210
+XML_XPATH_INVALID_TYPE = 1211
+XML_XPATH_INVALID_ARITY = 1212
+XML_XPATH_INVALID_CTXT_SIZE = 1213
+XML_XPATH_INVALID_CTXT_POSITION = 1214
+XML_XPATH_MEMORY_ERROR = 1215
+XML_XPTR_SYNTAX_ERROR = 1216
+XML_XPTR_RESOURCE_ERROR = 1217
+XML_XPTR_SUB_RESOURCE_ERROR = 1218
+XML_XPATH_UNDEF_PREFIX_ERROR = 1219
+XML_XPATH_ENCODING_ERROR = 1220
+XML_XPATH_INVALID_CHAR_ERROR = 1221
+XML_TREE_INVALID_HEX = 1300
+XML_TREE_INVALID_DEC = 1301
+XML_TREE_UNTERMINATED_ENTITY = 1302
+XML_TREE_NOT_UTF8 = 1303
+XML_SAVE_NOT_UTF8 = 1400
+XML_SAVE_CHAR_INVALID = 1401
+XML_SAVE_NO_DOCTYPE = 1402
+XML_SAVE_UNKNOWN_ENCODING = 1403
+XML_REGEXP_COMPILE_ERROR = 1450
+XML_IO_UNKNOWN = 1500
+XML_IO_EACCES = 1501
+XML_IO_EAGAIN = 1502
+XML_IO_EBADF = 1503
+XML_IO_EBADMSG = 1504
+XML_IO_EBUSY = 1505
+XML_IO_ECANCELED = 1506
+XML_IO_ECHILD = 1507
+XML_IO_EDEADLK = 1508
+XML_IO_EDOM = 1509
+XML_IO_EEXIST = 1510
+XML_IO_EFAULT = 1511
+XML_IO_EFBIG = 1512
+XML_IO_EINPROGRESS = 1513
+XML_IO_EINTR = 1514
+XML_IO_EINVAL = 1515
+XML_IO_EIO = 1516
+XML_IO_EISDIR = 1517
+XML_IO_EMFILE = 1518
+XML_IO_EMLINK = 1519
+XML_IO_EMSGSIZE = 1520
+XML_IO_ENAMETOOLONG = 1521
+XML_IO_ENFILE = 1522
+XML_IO_ENODEV = 1523
+XML_IO_ENOENT = 1524
+XML_IO_ENOEXEC = 1525
+XML_IO_ENOLCK = 1526
+XML_IO_ENOMEM = 1527
+XML_IO_ENOSPC = 1528
+XML_IO_ENOSYS = 1529
+XML_IO_ENOTDIR = 1530
+XML_IO_ENOTEMPTY = 1531
+XML_IO_ENOTSUP = 1532
+XML_IO_ENOTTY = 1533
+XML_IO_ENXIO = 1534
+XML_IO_EPERM = 1535
+XML_IO_EPIPE = 1536
+XML_IO_ERANGE = 1537
+XML_IO_EROFS = 1538
+XML_IO_ESPIPE = 1539
+XML_IO_ESRCH = 1540
+XML_IO_ETIMEDOUT = 1541
+XML_IO_EXDEV = 1542
+XML_IO_NETWORK_ATTEMPT = 1543
+XML_IO_ENCODER = 1544
+XML_IO_FLUSH = 1545
+XML_IO_WRITE = 1546
+XML_IO_NO_INPUT = 1547
+XML_IO_BUFFER_FULL = 1548
+XML_IO_LOAD_ERROR = 1549
+XML_IO_ENOTSOCK = 1550
+XML_IO_EISCONN = 1551
+XML_IO_ECONNREFUSED = 1552
+XML_IO_ENETUNREACH = 1553
+XML_IO_EADDRINUSE = 1554
+XML_IO_EALREADY = 1555
+XML_IO_EAFNOSUPPORT = 1556
+XML_XINCLUDE_RECURSION = 1600
+XML_XINCLUDE_PARSE_VALUE = 1601
+XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
+XML_XINCLUDE_NO_HREF = 1603
+XML_XINCLUDE_NO_FALLBACK = 1604
+XML_XINCLUDE_HREF_URI = 1605
+XML_XINCLUDE_TEXT_FRAGMENT = 1606
+XML_XINCLUDE_TEXT_DOCUMENT = 1607
+XML_XINCLUDE_INVALID_CHAR = 1608
+XML_XINCLUDE_BUILD_FAILED = 1609
+XML_XINCLUDE_UNKNOWN_ENCODING = 1610
+XML_XINCLUDE_MULTIPLE_ROOT = 1611
+XML_XINCLUDE_XPTR_FAILED = 1612
+XML_XINCLUDE_XPTR_RESULT = 1613
+XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
+XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
+XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
+XML_XINCLUDE_DEPRECATED_NS = 1617
+XML_XINCLUDE_FRAGMENT_ID = 1618
+XML_CATALOG_MISSING_ATTR = 1650
+XML_CATALOG_ENTRY_BROKEN = 1651
+XML_CATALOG_PREFER_VALUE = 1652
+XML_CATALOG_NOT_CATALOG = 1653
+XML_CATALOG_RECURSION = 1654
+XML_SCHEMAP_PREFIX_UNDEFINED = 1700
+XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
+XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
+XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
+XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
+XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
+XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
+XML_SCHEMAP_EXTENSION_NO_BASE = 1707
+XML_SCHEMAP_FACET_NO_VALUE = 1708
+XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
+XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
+XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
+XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
+XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
+XML_SCHEMAP_INVALID_BOOLEAN = 1714
+XML_SCHEMAP_INVALID_ENUM = 1715
+XML_SCHEMAP_INVALID_FACET = 1716
+XML_SCHEMAP_INVALID_FACET_VALUE = 1717
+XML_SCHEMAP_INVALID_MAXOCCURS = 1718
+XML_SCHEMAP_INVALID_MINOCCURS = 1719
+XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
+XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
+XML_SCHEMAP_NOATTR_NOREF = 1722
+XML_SCHEMAP_NOTATION_NO_NAME = 1723
+XML_SCHEMAP_NOTYPE_NOREF = 1724
+XML_SCHEMAP_REF_AND_SUBTYPE = 1725
+XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
+XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
+XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
+XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
+XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
+XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
+XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
+XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
+XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
+XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
+XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
+XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
+XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
+XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
+XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
+XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
+XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
+XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
+XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
+XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
+XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
+XML_SCHEMAP_UNKNOWN_REF = 1747
+XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
+XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
+XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
+XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
+XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
+XML_SCHEMAP_UNKNOWN_TYPE = 1753
+XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
+XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
+XML_SCHEMAP_REGEXP_INVALID = 1756
+XML_SCHEMAP_FAILED_LOAD = 1757
+XML_SCHEMAP_NOTHING_TO_PARSE = 1758
+XML_SCHEMAP_NOROOT = 1759
+XML_SCHEMAP_REDEFINED_GROUP = 1760
+XML_SCHEMAP_REDEFINED_TYPE = 1761
+XML_SCHEMAP_REDEFINED_ELEMENT = 1762
+XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
+XML_SCHEMAP_REDEFINED_ATTR = 1764
+XML_SCHEMAP_REDEFINED_NOTATION = 1765
+XML_SCHEMAP_FAILED_PARSE = 1766
+XML_SCHEMAP_UNKNOWN_PREFIX = 1767
+XML_SCHEMAP_DEF_AND_PREFIX = 1768
+XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
+XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
+XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
+XML_SCHEMAP_NOT_SCHEMA = 1772
+XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
+XML_SCHEMAP_INVALID_ATTR_USE = 1774
+XML_SCHEMAP_RECURSIVE = 1775
+XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
+XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
+XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
+XML_SCHEMAP_INVALID_ATTR_NAME = 1780
+XML_SCHEMAP_REF_AND_CONTENT = 1781
+XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
+XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
+XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
+XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
+XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
+XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
+XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
+XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
+XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
+XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
+XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
+XML_SCHEMAV_NOROOT = 1801
+XML_SCHEMAV_UNDECLAREDELEM = 1802
+XML_SCHEMAV_NOTTOPLEVEL = 1803
+XML_SCHEMAV_MISSING = 1804
+XML_SCHEMAV_WRONGELEM = 1805
+XML_SCHEMAV_NOTYPE = 1806
+XML_SCHEMAV_NOROLLBACK = 1807
+XML_SCHEMAV_ISABSTRACT = 1808
+XML_SCHEMAV_NOTEMPTY = 1809
+XML_SCHEMAV_ELEMCONT = 1810
+XML_SCHEMAV_HAVEDEFAULT = 1811
+XML_SCHEMAV_NOTNILLABLE = 1812
+XML_SCHEMAV_EXTRACONTENT = 1813
+XML_SCHEMAV_INVALIDATTR = 1814
+XML_SCHEMAV_INVALIDELEM = 1815
+XML_SCHEMAV_NOTDETERMINIST = 1816
+XML_SCHEMAV_CONSTRUCT = 1817
+XML_SCHEMAV_INTERNAL = 1818
+XML_SCHEMAV_NOTSIMPLE = 1819
+XML_SCHEMAV_ATTRUNKNOWN = 1820
+XML_SCHEMAV_ATTRINVALID = 1821
+XML_SCHEMAV_VALUE = 1822
+XML_SCHEMAV_FACET = 1823
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
+XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
+XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
+XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
+XML_SCHEMAV_CVC_FACET_VALID = 1829
+XML_SCHEMAV_CVC_LENGTH_VALID = 1830
+XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
+XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
+XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
+XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
+XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
+XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
+XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
+XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
+XML_SCHEMAV_CVC_PATTERN_VALID = 1839
+XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
+XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
+XML_SCHEMAV_CVC_ELT_1 = 1845
+XML_SCHEMAV_CVC_ELT_2 = 1846
+XML_SCHEMAV_CVC_ELT_3_1 = 1847
+XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
+XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
+XML_SCHEMAV_CVC_ELT_4_1 = 1850
+XML_SCHEMAV_CVC_ELT_4_2 = 1851
+XML_SCHEMAV_CVC_ELT_4_3 = 1852
+XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
+XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
+XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
+XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
+XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
+XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
+XML_SCHEMAV_CVC_ELT_6 = 1859
+XML_SCHEMAV_CVC_ELT_7 = 1860
+XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
+XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
+XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
+XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
+XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
+XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
+XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
+XML_SCHEMAV_ELEMENT_CONTENT = 1871
+XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
+XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
+XML_SCHEMAV_CVC_AU = 1874
+XML_SCHEMAV_CVC_TYPE_1 = 1875
+XML_SCHEMAV_CVC_TYPE_2 = 1876
+XML_SCHEMAV_CVC_IDC = 1877
+XML_SCHEMAV_CVC_WILDCARD = 1878
+XML_SCHEMAV_MISC = 1879
+XML_XPTR_UNKNOWN_SCHEME = 1900
+XML_XPTR_CHILDSEQ_START = 1901
+XML_XPTR_EVAL_FAILED = 1902
+XML_XPTR_EXTRA_OBJECTS = 1903
+XML_C14N_CREATE_CTXT = 1950
+XML_C14N_REQUIRES_UTF8 = 1951
+XML_C14N_CREATE_STACK = 1952
+XML_C14N_INVALID_NODE = 1953
+XML_C14N_UNKNOW_NODE = 1954
+XML_C14N_RELATIVE_NAMESPACE = 1955
+XML_FTP_PASV_ANSWER = 2000
+XML_FTP_EPSV_ANSWER = 2001
+XML_FTP_ACCNT = 2002
+XML_FTP_URL_SYNTAX = 2003
+XML_HTTP_URL_SYNTAX = 2020
+XML_HTTP_USE_IP = 2021
+XML_HTTP_UNKNOWN_HOST = 2022
+XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
+XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
+XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
+XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
+XML_SCHEMAP_SRC_RESOLVE = 3004
+XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
+XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
+XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
+XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
+XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
+XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
+XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
+XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
+XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
+XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
+XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
+XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
+XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
+XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
+XML_SCHEMAP_S4S_ELEM_MISSING = 3034
+XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
+XML_SCHEMAP_S4S_ATTR_MISSING = 3036
+XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
+XML_SCHEMAP_SRC_ELEMENT_1 = 3038
+XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
+XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
+XML_SCHEMAP_SRC_ELEMENT_3 = 3041
+XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
+XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
+XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
+XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
+XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
+XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
+XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
+XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
+XML_SCHEMAP_SRC_INCLUDE = 3050
+XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
+XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
+XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
+XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
+XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
+XML_SCHEMAP_NO_XMLNS = 3056
+XML_SCHEMAP_NO_XSI = 3057
+XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
+XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
+XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
+XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
+XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
+XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
+XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
+XML_SCHEMAP_SRC_IMPORT_2 = 3066
+XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
+XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
+XML_SCHEMAP_INTERNAL = 3069
+XML_SCHEMAP_NOT_DETERMINISTIC = 3070
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
+XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
+XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
+XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
+XML_SCHEMAP_SRC_CT_1 = 3076
+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
+XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
+XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
+XML_SCHEMAP_C_PROPS_CORRECT = 3080
+XML_SCHEMAP_SRC_REDEFINE = 3081
+XML_SCHEMAP_SRC_IMPORT = 3082
+XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
+XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
+XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
+XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086
+XML_SCHEMAP_AG_PROPS_CORRECT = 3087
+XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088
+XML_SCHEMAP_AU_PROPS_CORRECT = 3089
+XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090
+XML_SCHEMAP_COS_ALL_LIMITED = 3091
+XML_SCHEMATRONV_ASSERT = 4000
+XML_SCHEMATRONV_REPORT = 4001
+XML_MODULE_OPEN = 4900
+XML_MODULE_CLOSE = 4901
+XML_CHECK_FOUND_ELEMENT = 5000
+XML_CHECK_FOUND_ATTRIBUTE = 5001
+XML_CHECK_FOUND_TEXT = 5002
+XML_CHECK_FOUND_CDATA = 5003
+XML_CHECK_FOUND_ENTITYREF = 5004
+XML_CHECK_FOUND_ENTITY = 5005
+XML_CHECK_FOUND_PI = 5006
+XML_CHECK_FOUND_COMMENT = 5007
+XML_CHECK_FOUND_DOCTYPE = 5008
+XML_CHECK_FOUND_FRAGMENT = 5009
+XML_CHECK_FOUND_NOTATION = 5010
+XML_CHECK_UNKNOWN_NODE = 5011
+XML_CHECK_ENTITY_TYPE = 5012
+XML_CHECK_NO_PARENT = 5013
+XML_CHECK_NO_DOC = 5014
+XML_CHECK_NO_NAME = 5015
+XML_CHECK_NO_ELEM = 5016
+XML_CHECK_WRONG_DOC = 5017
+XML_CHECK_NO_PREV = 5018
+XML_CHECK_WRONG_PREV = 5019
+XML_CHECK_NO_NEXT = 5020
+XML_CHECK_WRONG_NEXT = 5021
+XML_CHECK_NOT_DTD = 5022
+XML_CHECK_NOT_ATTR = 5023
+XML_CHECK_NOT_ATTR_DECL = 5024
+XML_CHECK_NOT_ELEM_DECL = 5025
+XML_CHECK_NOT_ENTITY_DECL = 5026
+XML_CHECK_NOT_NS_DECL = 5027
+XML_CHECK_NO_HREF = 5028
+XML_CHECK_WRONG_PARENT = 5029
+XML_CHECK_NS_SCOPE = 5030
+XML_CHECK_NS_ANCESTOR = 5031
+XML_CHECK_NOT_UTF8 = 5032
+XML_CHECK_NO_DICT = 5033
+XML_CHECK_NOT_NCNAME = 5034
+XML_CHECK_OUTSIDE_DICT = 5035
+XML_CHECK_WRONG_NAME = 5036
+XML_CHECK_NAME_NOT_NULL = 5037
+XML_I18N_NO_NAME = 6000
+XML_I18N_NO_HANDLER = 6001
+XML_I18N_EXCESS_HANDLER = 6002
+XML_I18N_CONV_FAILED = 6003
+XML_I18N_NO_OUTPUT = 6004
+XML_BUF_OVERFLOW = 7000
+
+# xmlExpNodeType
+XML_EXP_EMPTY = 0
+XML_EXP_FORBID = 1
+XML_EXP_ATOM = 2
+XML_EXP_SEQ = 3
+XML_EXP_OR = 4
+XML_EXP_COUNT = 5
+
+# xmlElementContentType
+XML_ELEMENT_CONTENT_PCDATA = 1
+XML_ELEMENT_CONTENT_ELEMENT = 2
+XML_ELEMENT_CONTENT_SEQ = 3
+XML_ELEMENT_CONTENT_OR = 4
+
+# xmlParserProperties
+XML_PARSER_LOADDTD = 1
+XML_PARSER_DEFAULTATTRS = 2
+XML_PARSER_VALIDATE = 3
+XML_PARSER_SUBST_ENTITIES = 4
+
+# xmlReaderTypes
+XML_READER_TYPE_NONE = 0
+XML_READER_TYPE_ELEMENT = 1
+XML_READER_TYPE_ATTRIBUTE = 2
+XML_READER_TYPE_TEXT = 3
+XML_READER_TYPE_CDATA = 4
+XML_READER_TYPE_ENTITY_REFERENCE = 5
+XML_READER_TYPE_ENTITY = 6
+XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
+XML_READER_TYPE_COMMENT = 8
+XML_READER_TYPE_DOCUMENT = 9
+XML_READER_TYPE_DOCUMENT_TYPE = 10
+XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
+XML_READER_TYPE_NOTATION = 12
+XML_READER_TYPE_WHITESPACE = 13
+XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
+XML_READER_TYPE_END_ELEMENT = 15
+XML_READER_TYPE_END_ENTITY = 16
+XML_READER_TYPE_XML_DECLARATION = 17
+
+# xmlCatalogPrefer
+XML_CATA_PREFER_NONE = 0
+XML_CATA_PREFER_PUBLIC = 1
+XML_CATA_PREFER_SYSTEM = 2
+
+# xmlElementType
+XML_ELEMENT_NODE = 1
+XML_ATTRIBUTE_NODE = 2
+XML_TEXT_NODE = 3
+XML_CDATA_SECTION_NODE = 4
+XML_ENTITY_REF_NODE = 5
+XML_ENTITY_NODE = 6
+XML_PI_NODE = 7
+XML_COMMENT_NODE = 8
+XML_DOCUMENT_NODE = 9
+XML_DOCUMENT_TYPE_NODE = 10
+XML_DOCUMENT_FRAG_NODE = 11
+XML_NOTATION_NODE = 12
+XML_HTML_DOCUMENT_NODE = 13
+XML_DTD_NODE = 14
+XML_ELEMENT_DECL = 15
+XML_ATTRIBUTE_DECL = 16
+XML_ENTITY_DECL = 17
+XML_NAMESPACE_DECL = 18
+XML_XINCLUDE_START = 19
+XML_XINCLUDE_END = 20
+XML_DOCB_DOCUMENT_NODE = 21
+
+# xlinkActuate
+XLINK_ACTUATE_NONE = 0
+XLINK_ACTUATE_AUTO = 1
+XLINK_ACTUATE_ONREQUEST = 2
+
+# xmlFeature
+XML_WITH_THREAD = 1
+XML_WITH_TREE = 2
+XML_WITH_OUTPUT = 3
+XML_WITH_PUSH = 4
+XML_WITH_READER = 5
+XML_WITH_PATTERN = 6
+XML_WITH_WRITER = 7
+XML_WITH_SAX1 = 8
+XML_WITH_FTP = 9
+XML_WITH_HTTP = 10
+XML_WITH_VALID = 11
+XML_WITH_HTML = 12
+XML_WITH_LEGACY = 13
+XML_WITH_C14N = 14
+XML_WITH_CATALOG = 15
+XML_WITH_XPATH = 16
+XML_WITH_XPTR = 17
+XML_WITH_XINCLUDE = 18
+XML_WITH_ICONV = 19
+XML_WITH_ISO8859X = 20
+XML_WITH_UNICODE = 21
+XML_WITH_REGEXP = 22
+XML_WITH_AUTOMATA = 23
+XML_WITH_EXPR = 24
+XML_WITH_SCHEMAS = 25
+XML_WITH_SCHEMATRON = 26
+XML_WITH_MODULES = 27
+XML_WITH_DEBUG = 28
+XML_WITH_DEBUG_MEM = 29
+XML_WITH_DEBUG_RUN = 30
+XML_WITH_ZLIB = 31
+XML_WITH_ICU = 32
+XML_WITH_LZMA = 33
+XML_WITH_NONE = 99999
+
+# xmlElementContentOccur
+XML_ELEMENT_CONTENT_ONCE = 1
+XML_ELEMENT_CONTENT_OPT = 2
+XML_ELEMENT_CONTENT_MULT = 3
+XML_ELEMENT_CONTENT_PLUS = 4
+
+# xmlXPathError
+XPATH_EXPRESSION_OK = 0
+XPATH_NUMBER_ERROR = 1
+XPATH_UNFINISHED_LITERAL_ERROR = 2
+XPATH_START_LITERAL_ERROR = 3
+XPATH_VARIABLE_REF_ERROR = 4
+XPATH_UNDEF_VARIABLE_ERROR = 5
+XPATH_INVALID_PREDICATE_ERROR = 6
+XPATH_EXPR_ERROR = 7
+XPATH_UNCLOSED_ERROR = 8
+XPATH_UNKNOWN_FUNC_ERROR = 9
+XPATH_INVALID_OPERAND = 10
+XPATH_INVALID_TYPE = 11
+XPATH_INVALID_ARITY = 12
+XPATH_INVALID_CTXT_SIZE = 13
+XPATH_INVALID_CTXT_POSITION = 14
+XPATH_MEMORY_ERROR = 15
+XPTR_SYNTAX_ERROR = 16
+XPTR_RESOURCE_ERROR = 17
+XPTR_SUB_RESOURCE_ERROR = 18
+XPATH_UNDEF_PREFIX_ERROR = 19
+XPATH_ENCODING_ERROR = 20
+XPATH_INVALID_CHAR_ERROR = 21
+XPATH_INVALID_CTXT = 22
+XPATH_STACK_ERROR = 23
+XPATH_FORBID_VARIABLE_ERROR = 24
+
+# xmlTextReaderMode
+XML_TEXTREADER_MODE_INITIAL = 0
+XML_TEXTREADER_MODE_INTERACTIVE = 1
+XML_TEXTREADER_MODE_ERROR = 2
+XML_TEXTREADER_MODE_EOF = 3
+XML_TEXTREADER_MODE_CLOSED = 4
+XML_TEXTREADER_MODE_READING = 5
+
+# xmlErrorLevel
+XML_ERR_NONE = 0
+XML_ERR_WARNING = 1
+XML_ERR_ERROR = 2
+XML_ERR_FATAL = 3
+
+# xmlCharEncoding
+XML_CHAR_ENCODING_ERROR = -1
+XML_CHAR_ENCODING_NONE = 0
+XML_CHAR_ENCODING_UTF8 = 1
+XML_CHAR_ENCODING_UTF16LE = 2
+XML_CHAR_ENCODING_UTF16BE = 3
+XML_CHAR_ENCODING_UCS4LE = 4
+XML_CHAR_ENCODING_UCS4BE = 5
+XML_CHAR_ENCODING_EBCDIC = 6
+XML_CHAR_ENCODING_UCS4_2143 = 7
+XML_CHAR_ENCODING_UCS4_3412 = 8
+XML_CHAR_ENCODING_UCS2 = 9
+XML_CHAR_ENCODING_8859_1 = 10
+XML_CHAR_ENCODING_8859_2 = 11
+XML_CHAR_ENCODING_8859_3 = 12
+XML_CHAR_ENCODING_8859_4 = 13
+XML_CHAR_ENCODING_8859_5 = 14
+XML_CHAR_ENCODING_8859_6 = 15
+XML_CHAR_ENCODING_8859_7 = 16
+XML_CHAR_ENCODING_8859_8 = 17
+XML_CHAR_ENCODING_8859_9 = 18
+XML_CHAR_ENCODING_2022_JP = 19
+XML_CHAR_ENCODING_SHIFT_JIS = 20
+XML_CHAR_ENCODING_EUC_JP = 21
+XML_CHAR_ENCODING_ASCII = 22
+
+# xmlErrorDomain
+XML_FROM_NONE = 0
+XML_FROM_PARSER = 1
+XML_FROM_TREE = 2
+XML_FROM_NAMESPACE = 3
+XML_FROM_DTD = 4
+XML_FROM_HTML = 5
+XML_FROM_MEMORY = 6
+XML_FROM_OUTPUT = 7
+XML_FROM_IO = 8
+XML_FROM_FTP = 9
+XML_FROM_HTTP = 10
+XML_FROM_XINCLUDE = 11
+XML_FROM_XPATH = 12
+XML_FROM_XPOINTER = 13
+XML_FROM_REGEXP = 14
+XML_FROM_DATATYPE = 15
+XML_FROM_SCHEMASP = 16
+XML_FROM_SCHEMASV = 17
+XML_FROM_RELAXNGP = 18
+XML_FROM_RELAXNGV = 19
+XML_FROM_CATALOG = 20
+XML_FROM_C14N = 21
+XML_FROM_XSLT = 22
+XML_FROM_VALID = 23
+XML_FROM_CHECK = 24
+XML_FROM_WRITER = 25
+XML_FROM_MODULE = 26
+XML_FROM_I18N = 27
+XML_FROM_SCHEMATRONV = 28
+XML_FROM_BUFFER = 29
+XML_FROM_URI = 30
+
+# htmlStatus
+HTML_NA = 0
+HTML_INVALID = 1
+HTML_DEPRECATED = 2
+HTML_VALID = 4
+HTML_REQUIRED = 12
+
+# xmlSchemaValidOption
+XML_SCHEMA_VAL_VC_I_CREATE = 1
+
+# xmlSchemaWhitespaceValueType
+XML_SCHEMA_WHITESPACE_UNKNOWN = 0
+XML_SCHEMA_WHITESPACE_PRESERVE = 1
+XML_SCHEMA_WHITESPACE_REPLACE = 2
+XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+
+# htmlParserOption
+HTML_PARSE_RECOVER = 1
+HTML_PARSE_NODEFDTD = 4
+HTML_PARSE_NOERROR = 32
+HTML_PARSE_NOWARNING = 64
+HTML_PARSE_PEDANTIC = 128
+HTML_PARSE_NOBLANKS = 256
+HTML_PARSE_NONET = 2048
+HTML_PARSE_NOIMPLIED = 8192
+HTML_PARSE_COMPACT = 65536
+HTML_PARSE_IGNORE_ENC = 2097152
+
+# xmlRelaxNGValidErr
+XML_RELAXNG_OK = 0
+XML_RELAXNG_ERR_MEMORY = 1
+XML_RELAXNG_ERR_TYPE = 2
+XML_RELAXNG_ERR_TYPEVAL = 3
+XML_RELAXNG_ERR_DUPID = 4
+XML_RELAXNG_ERR_TYPECMP = 5
+XML_RELAXNG_ERR_NOSTATE = 6
+XML_RELAXNG_ERR_NODEFINE = 7
+XML_RELAXNG_ERR_LISTEXTRA = 8
+XML_RELAXNG_ERR_LISTEMPTY = 9
+XML_RELAXNG_ERR_INTERNODATA = 10
+XML_RELAXNG_ERR_INTERSEQ = 11
+XML_RELAXNG_ERR_INTEREXTRA = 12
+XML_RELAXNG_ERR_ELEMNAME = 13
+XML_RELAXNG_ERR_ATTRNAME = 14
+XML_RELAXNG_ERR_ELEMNONS = 15
+XML_RELAXNG_ERR_ATTRNONS = 16
+XML_RELAXNG_ERR_ELEMWRONGNS = 17
+XML_RELAXNG_ERR_ATTRWRONGNS = 18
+XML_RELAXNG_ERR_ELEMEXTRANS = 19
+XML_RELAXNG_ERR_ATTREXTRANS = 20
+XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
+XML_RELAXNG_ERR_NOELEM = 22
+XML_RELAXNG_ERR_NOTELEM = 23
+XML_RELAXNG_ERR_ATTRVALID = 24
+XML_RELAXNG_ERR_CONTENTVALID = 25
+XML_RELAXNG_ERR_EXTRACONTENT = 26
+XML_RELAXNG_ERR_INVALIDATTR = 27
+XML_RELAXNG_ERR_DATAELEM = 28
+XML_RELAXNG_ERR_VALELEM = 29
+XML_RELAXNG_ERR_LISTELEM = 30
+XML_RELAXNG_ERR_DATATYPE = 31
+XML_RELAXNG_ERR_VALUE = 32
+XML_RELAXNG_ERR_LIST = 33
+XML_RELAXNG_ERR_NOGRAMMAR = 34
+XML_RELAXNG_ERR_EXTRADATA = 35
+XML_RELAXNG_ERR_LACKDATA = 36
+XML_RELAXNG_ERR_INTERNAL = 37
+XML_RELAXNG_ERR_ELEMWRONG = 38
+XML_RELAXNG_ERR_TEXTWRONG = 39
+
+# xmlCatalogAllow
+XML_CATA_ALLOW_NONE = 0
+XML_CATA_ALLOW_GLOBAL = 1
+XML_CATA_ALLOW_DOCUMENT = 2
+XML_CATA_ALLOW_ALL = 3
+
+# xmlAttributeType
+XML_ATTRIBUTE_CDATA = 1
+XML_ATTRIBUTE_ID = 2
+XML_ATTRIBUTE_IDREF = 3
+XML_ATTRIBUTE_IDREFS = 4
+XML_ATTRIBUTE_ENTITY = 5
+XML_ATTRIBUTE_ENTITIES = 6
+XML_ATTRIBUTE_NMTOKEN = 7
+XML_ATTRIBUTE_NMTOKENS = 8
+XML_ATTRIBUTE_ENUMERATION = 9
+XML_ATTRIBUTE_NOTATION = 10
+
+# xmlSchematronValidOptions
+XML_SCHEMATRON_OUT_QUIET = 1
+XML_SCHEMATRON_OUT_TEXT = 2
+XML_SCHEMATRON_OUT_XML = 4
+XML_SCHEMATRON_OUT_ERROR = 8
+XML_SCHEMATRON_OUT_FILE = 256
+XML_SCHEMATRON_OUT_BUFFER = 512
+XML_SCHEMATRON_OUT_IO = 1024
+
+# xmlSchemaContentType
+XML_SCHEMA_CONTENT_UNKNOWN = 0
+XML_SCHEMA_CONTENT_EMPTY = 1
+XML_SCHEMA_CONTENT_ELEMENTS = 2
+XML_SCHEMA_CONTENT_MIXED = 3
+XML_SCHEMA_CONTENT_SIMPLE = 4
+XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS = 5
+XML_SCHEMA_CONTENT_BASIC = 6
+XML_SCHEMA_CONTENT_ANY = 7
+
+# xmlSchemaTypeType
+XML_SCHEMA_TYPE_BASIC = 1
+XML_SCHEMA_TYPE_ANY = 2
+XML_SCHEMA_TYPE_FACET = 3
+XML_SCHEMA_TYPE_SIMPLE = 4
+XML_SCHEMA_TYPE_COMPLEX = 5
+XML_SCHEMA_TYPE_SEQUENCE = 6
+XML_SCHEMA_TYPE_CHOICE = 7
+XML_SCHEMA_TYPE_ALL = 8
+XML_SCHEMA_TYPE_SIMPLE_CONTENT = 9
+XML_SCHEMA_TYPE_COMPLEX_CONTENT = 10
+XML_SCHEMA_TYPE_UR = 11
+XML_SCHEMA_TYPE_RESTRICTION = 12
+XML_SCHEMA_TYPE_EXTENSION = 13
+XML_SCHEMA_TYPE_ELEMENT = 14
+XML_SCHEMA_TYPE_ATTRIBUTE = 15
+XML_SCHEMA_TYPE_ATTRIBUTEGROUP = 16
+XML_SCHEMA_TYPE_GROUP = 17
+XML_SCHEMA_TYPE_NOTATION = 18
+XML_SCHEMA_TYPE_LIST = 19
+XML_SCHEMA_TYPE_UNION = 20
+XML_SCHEMA_TYPE_ANY_ATTRIBUTE = 21
+XML_SCHEMA_TYPE_IDC_UNIQUE = 22
+XML_SCHEMA_TYPE_IDC_KEY = 23
+XML_SCHEMA_TYPE_IDC_KEYREF = 24
+XML_SCHEMA_TYPE_PARTICLE = 25
+XML_SCHEMA_TYPE_ATTRIBUTE_USE = 26
+XML_SCHEMA_FACET_MININCLUSIVE = 1000
+XML_SCHEMA_FACET_MINEXCLUSIVE = 1001
+XML_SCHEMA_FACET_MAXINCLUSIVE = 1002
+XML_SCHEMA_FACET_MAXEXCLUSIVE = 1003
+XML_SCHEMA_FACET_TOTALDIGITS = 1004
+XML_SCHEMA_FACET_FRACTIONDIGITS = 1005
+XML_SCHEMA_FACET_PATTERN = 1006
+XML_SCHEMA_FACET_ENUMERATION = 1007
+XML_SCHEMA_FACET_WHITESPACE = 1008
+XML_SCHEMA_FACET_LENGTH = 1009
+XML_SCHEMA_FACET_MAXLENGTH = 1010
+XML_SCHEMA_FACET_MINLENGTH = 1011
+XML_SCHEMA_EXTRA_QNAMEREF = 2000
+XML_SCHEMA_EXTRA_ATTR_USE_PROHIB = 2001
+
+# xmlModuleOption
+XML_MODULE_LAZY = 1
+XML_MODULE_LOCAL = 2
+
+# xmlParserMode
+XML_PARSE_UNKNOWN = 0
+XML_PARSE_DOM = 1
+XML_PARSE_SAX = 2
+XML_PARSE_PUSH_DOM = 3
+XML_PARSE_PUSH_SAX = 4
+XML_PARSE_READER = 5
+
+# xmlC14NMode
+XML_C14N_1_0 = 0
+XML_C14N_EXCLUSIVE_1_0 = 1
+XML_C14N_1_1 = 2
+
+# xmlParserOption
+XML_PARSE_RECOVER = 1
+XML_PARSE_NOENT = 2
+XML_PARSE_DTDLOAD = 4
+XML_PARSE_DTDATTR = 8
+XML_PARSE_DTDVALID = 16
+XML_PARSE_NOERROR = 32
+XML_PARSE_NOWARNING = 64
+XML_PARSE_PEDANTIC = 128
+XML_PARSE_NOBLANKS = 256
+XML_PARSE_SAX1 = 512
+XML_PARSE_XINCLUDE = 1024
+XML_PARSE_NONET = 2048
+XML_PARSE_NODICT = 4096
+XML_PARSE_NSCLEAN = 8192
+XML_PARSE_NOCDATA = 16384
+XML_PARSE_NOXINCNODE = 32768
+XML_PARSE_COMPACT = 65536
+XML_PARSE_OLD10 = 131072
+XML_PARSE_NOBASEFIX = 262144
+XML_PARSE_HUGE = 524288
+XML_PARSE_OLDSAX = 1048576
+XML_PARSE_IGNORE_ENC = 2097152
+XML_PARSE_BIG_LINES = 4194304
+
+# xmlElementTypeVal
+XML_ELEMENT_TYPE_UNDEFINED = 0
+XML_ELEMENT_TYPE_EMPTY = 1
+XML_ELEMENT_TYPE_ANY = 2
+XML_ELEMENT_TYPE_MIXED = 3
+XML_ELEMENT_TYPE_ELEMENT = 4
+
+# xmlDocProperties
+XML_DOC_WELLFORMED = 1
+XML_DOC_NSVALID = 2
+XML_DOC_OLD10 = 4
+XML_DOC_DTDVALID = 8
+XML_DOC_XINCLUDE = 16
+XML_DOC_USERBUILT = 32
+XML_DOC_INTERNAL = 64
+XML_DOC_HTML = 128
+
+# xlinkType
+XLINK_TYPE_NONE = 0
+XLINK_TYPE_SIMPLE = 1
+XLINK_TYPE_EXTENDED = 2
+XLINK_TYPE_EXTENDED_SET = 3
+
+# xmlXPathObjectType
+XPATH_UNDEFINED = 0
+XPATH_NODESET = 1
+XPATH_BOOLEAN = 2
+XPATH_NUMBER = 3
+XPATH_STRING = 4
+XPATH_POINT = 5
+XPATH_RANGE = 6
+XPATH_LOCATIONSET = 7
+XPATH_USERS = 8
+XPATH_XSLT_TREE = 9
+
+# xmlSchemaValidError
+XML_SCHEMAS_ERR_OK = 0
+XML_SCHEMAS_ERR_NOROOT = 1
+XML_SCHEMAS_ERR_UNDECLAREDELEM = 2
+XML_SCHEMAS_ERR_NOTTOPLEVEL = 3
+XML_SCHEMAS_ERR_MISSING = 4
+XML_SCHEMAS_ERR_WRONGELEM = 5
+XML_SCHEMAS_ERR_NOTYPE = 6
+XML_SCHEMAS_ERR_NOROLLBACK = 7
+XML_SCHEMAS_ERR_ISABSTRACT = 8
+XML_SCHEMAS_ERR_NOTEMPTY = 9
+XML_SCHEMAS_ERR_ELEMCONT = 10
+XML_SCHEMAS_ERR_HAVEDEFAULT = 11
+XML_SCHEMAS_ERR_NOTNILLABLE = 12
+XML_SCHEMAS_ERR_EXTRACONTENT = 13
+XML_SCHEMAS_ERR_INVALIDATTR = 14
+XML_SCHEMAS_ERR_INVALIDELEM = 15
+XML_SCHEMAS_ERR_NOTDETERMINIST = 16
+XML_SCHEMAS_ERR_CONSTRUCT = 17
+XML_SCHEMAS_ERR_INTERNAL = 18
+XML_SCHEMAS_ERR_NOTSIMPLE = 19
+XML_SCHEMAS_ERR_ATTRUNKNOWN = 20
+XML_SCHEMAS_ERR_ATTRINVALID = 21
+XML_SCHEMAS_ERR_VALUE = 22
+XML_SCHEMAS_ERR_FACET = 23
+XML_SCHEMAS_ERR_ = 24
+XML_SCHEMAS_ERR_XXX = 25
+
diff --git a/python/libxml2class.txt b/python/libxml2class.txt
new file mode 100644
index 0000000..ca88544
--- /dev/null
+++ b/python/libxml2class.txt
@@ -0,0 +1,1177 @@
+ Generated Classes for libxml2-python
+
+#
+# Global functions of the module
+#
+
+
+# functions from module HTMLparser
+htmlCreateMemoryParserCtxt()
+htmlHandleOmittedElem()
+htmlIsScriptAttribute()
+htmlNewParserCtxt()
+htmlParseDoc()
+htmlParseFile()
+htmlReadDoc()
+htmlReadFd()
+htmlReadFile()
+htmlReadMemory()
+
+# functions from module HTMLtree
+htmlIsBooleanAttr()
+htmlNewDoc()
+htmlNewDocNoDtD()
+
+# functions from module SAX2
+SAXDefaultVersion()
+defaultSAXHandlerInit()
+docbDefaultSAXHandlerInit()
+htmlDefaultSAXHandlerInit()
+
+# functions from module catalog
+catalogAdd()
+catalogCleanup()
+catalogConvert()
+catalogDump()
+catalogGetPublic()
+catalogGetSystem()
+catalogRemove()
+catalogResolve()
+catalogResolvePublic()
+catalogResolveSystem()
+catalogResolveURI()
+catalogSetDebug()
+initializeCatalog()
+loadACatalog()
+loadCatalog()
+loadCatalogs()
+loadSGMLSuperCatalog()
+newCatalog()
+parseCatalogFile()
+
+# functions from module chvalid
+isBaseChar()
+isBlank()
+isChar()
+isCombining()
+isDigit()
+isExtender()
+isIdeographic()
+isPubidChar()
+
+# functions from module debugXML
+boolToText()
+debugDumpString()
+shellPrintXPathError()
+
+# functions from module dict
+dictCleanup()
+initializeDict()
+
+# functions from module encoding
+addEncodingAlias()
+cleanupCharEncodingHandlers()
+cleanupEncodingAliases()
+delEncodingAlias()
+encodingAlias()
+initCharEncodingHandlers()
+
+# functions from module entities
+cleanupPredefinedEntities()
+initializePredefinedEntities()
+predefinedEntity()
+
+# functions from module globals
+cleanupGlobals()
+initGlobals()
+thrDefDefaultBufferSize()
+thrDefDoValidityCheckingDefaultValue()
+thrDefGetWarningsDefaultValue()
+thrDefIndentTreeOutput()
+thrDefKeepBlanksDefaultValue()
+thrDefLineNumbersDefaultValue()
+thrDefLoadExtDtdDefaultValue()
+thrDefParserDebugEntities()
+thrDefPedanticParserDefaultValue()
+thrDefSaveNoEmptyTags()
+thrDefSubstituteEntitiesDefaultValue()
+thrDefTreeIndentString()
+
+# functions from module nanoftp
+nanoFTPCleanup()
+nanoFTPInit()
+nanoFTPProxy()
+nanoFTPScanProxy()
+
+# functions from module nanohttp
+nanoHTTPCleanup()
+nanoHTTPInit()
+nanoHTTPScanProxy()
+
+# functions from module parser
+createDocParserCtxt()
+initParser()
+keepBlanksDefault()
+lineNumbersDefault()
+newParserCtxt()
+parseDTD()
+parseDoc()
+parseEntity()
+parseFile()
+parseMemory()
+pedanticParserDefault()
+readDoc()
+readFd()
+readFile()
+readMemory()
+recoverDoc()
+recoverFile()
+recoverMemory()
+substituteEntitiesDefault()
+
+# functions from module parserInternals
+checkLanguageID()
+copyChar()
+copyCharMultiByte()
+createEntityParserCtxt()
+createFileParserCtxt()
+createMemoryParserCtxt()
+createURLParserCtxt()
+htmlCreateFileParserCtxt()
+htmlInitAutoClose()
+isLetter()
+namePop()
+namePush()
+nodePop()
+nodePush()
+
+# functions from module python
+SAXParseFile()
+createInputBuffer()
+createOutputBuffer()
+createPushParser()
+debugMemory()
+dumpMemory()
+htmlCreatePushParser()
+htmlSAXParseFile()
+memoryUsed()
+newNode()
+pythonCleanupParser()
+setEntityLoader()
+
+# functions from module relaxng
+relaxNGCleanupTypes()
+relaxNGInitTypes()
+relaxNGNewMemParserCtxt()
+relaxNGNewParserCtxt()
+
+# functions from module tree
+buildQName()
+compressMode()
+isXHTML()
+newComment()
+newDoc()
+newPI()
+newText()
+newTextLen()
+setCompressMode()
+validateNCName()
+validateNMToken()
+validateName()
+validateQName()
+
+# functions from module uri
+URIEscape()
+URIEscapeStr()
+URIUnescapeString()
+buildRelativeURI()
+buildURI()
+canonicPath()
+createURI()
+normalizeURIPath()
+parseURI()
+parseURIRaw()
+pathToURI()
+
+# functions from module valid
+newValidCtxt()
+validateNameValue()
+validateNamesValue()
+validateNmtokenValue()
+validateNmtokensValue()
+
+# functions from module xmlIO
+checkFilename()
+cleanupInputCallbacks()
+cleanupOutputCallbacks()
+fileMatch()
+iOFTPMatch()
+iOHTTPMatch()
+normalizeWindowsPath()
+parserGetDirectory()
+registerDefaultInputCallbacks()
+registerDefaultOutputCallbacks()
+registerHTTPPostCallbacks()
+
+# functions from module xmlerror
+lastError()
+resetLastError()
+
+# functions from module xmlreader
+newTextReaderFilename()
+readerForDoc()
+readerForFd()
+readerForFile()
+readerForMemory()
+
+# functions from module xmlregexp
+regexpCompile()
+
+# functions from module xmlschemas
+schemaNewMemParserCtxt()
+schemaNewParserCtxt()
+
+# functions from module xmlschemastypes
+schemaCleanupTypes()
+schemaCollapseString()
+schemaInitTypes()
+schemaWhiteSpaceReplace()
+
+# functions from module xmlstring
+UTF8Charcmp()
+UTF8Size()
+UTF8Strlen()
+UTF8Strloc()
+UTF8Strndup()
+UTF8Strpos()
+UTF8Strsize()
+UTF8Strsub()
+checkUTF8()
+
+# functions from module xmlunicode
+uCSIsAegeanNumbers()
+uCSIsAlphabeticPresentationForms()
+uCSIsArabic()
+uCSIsArabicPresentationFormsA()
+uCSIsArabicPresentationFormsB()
+uCSIsArmenian()
+uCSIsArrows()
+uCSIsBasicLatin()
+uCSIsBengali()
+uCSIsBlock()
+uCSIsBlockElements()
+uCSIsBopomofo()
+uCSIsBopomofoExtended()
+uCSIsBoxDrawing()
+uCSIsBraillePatterns()
+uCSIsBuhid()
+uCSIsByzantineMusicalSymbols()
+uCSIsCJKCompatibility()
+uCSIsCJKCompatibilityForms()
+uCSIsCJKCompatibilityIdeographs()
+uCSIsCJKCompatibilityIdeographsSupplement()
+uCSIsCJKRadicalsSupplement()
+uCSIsCJKSymbolsandPunctuation()
+uCSIsCJKUnifiedIdeographs()
+uCSIsCJKUnifiedIdeographsExtensionA()
+uCSIsCJKUnifiedIdeographsExtensionB()
+uCSIsCat()
+uCSIsCatC()
+uCSIsCatCc()
+uCSIsCatCf()
+uCSIsCatCo()
+uCSIsCatCs()
+uCSIsCatL()
+uCSIsCatLl()
+uCSIsCatLm()
+uCSIsCatLo()
+uCSIsCatLt()
+uCSIsCatLu()
+uCSIsCatM()
+uCSIsCatMc()
+uCSIsCatMe()
+uCSIsCatMn()
+uCSIsCatN()
+uCSIsCatNd()
+uCSIsCatNl()
+uCSIsCatNo()
+uCSIsCatP()
+uCSIsCatPc()
+uCSIsCatPd()
+uCSIsCatPe()
+uCSIsCatPf()
+uCSIsCatPi()
+uCSIsCatPo()
+uCSIsCatPs()
+uCSIsCatS()
+uCSIsCatSc()
+uCSIsCatSk()
+uCSIsCatSm()
+uCSIsCatSo()
+uCSIsCatZ()
+uCSIsCatZl()
+uCSIsCatZp()
+uCSIsCatZs()
+uCSIsCherokee()
+uCSIsCombiningDiacriticalMarks()
+uCSIsCombiningDiacriticalMarksforSymbols()
+uCSIsCombiningHalfMarks()
+uCSIsCombiningMarksforSymbols()
+uCSIsControlPictures()
+uCSIsCurrencySymbols()
+uCSIsCypriotSyllabary()
+uCSIsCyrillic()
+uCSIsCyrillicSupplement()
+uCSIsDeseret()
+uCSIsDevanagari()
+uCSIsDingbats()
+uCSIsEnclosedAlphanumerics()
+uCSIsEnclosedCJKLettersandMonths()
+uCSIsEthiopic()
+uCSIsGeneralPunctuation()
+uCSIsGeometricShapes()
+uCSIsGeorgian()
+uCSIsGothic()
+uCSIsGreek()
+uCSIsGreekExtended()
+uCSIsGreekandCoptic()
+uCSIsGujarati()
+uCSIsGurmukhi()
+uCSIsHalfwidthandFullwidthForms()
+uCSIsHangulCompatibilityJamo()
+uCSIsHangulJamo()
+uCSIsHangulSyllables()
+uCSIsHanunoo()
+uCSIsHebrew()
+uCSIsHighPrivateUseSurrogates()
+uCSIsHighSurrogates()
+uCSIsHiragana()
+uCSIsIPAExtensions()
+uCSIsIdeographicDescriptionCharacters()
+uCSIsKanbun()
+uCSIsKangxiRadicals()
+uCSIsKannada()
+uCSIsKatakana()
+uCSIsKatakanaPhoneticExtensions()
+uCSIsKhmer()
+uCSIsKhmerSymbols()
+uCSIsLao()
+uCSIsLatin1Supplement()
+uCSIsLatinExtendedA()
+uCSIsLatinExtendedAdditional()
+uCSIsLatinExtendedB()
+uCSIsLetterlikeSymbols()
+uCSIsLimbu()
+uCSIsLinearBIdeograms()
+uCSIsLinearBSyllabary()
+uCSIsLowSurrogates()
+uCSIsMalayalam()
+uCSIsMathematicalAlphanumericSymbols()
+uCSIsMathematicalOperators()
+uCSIsMiscellaneousMathematicalSymbolsA()
+uCSIsMiscellaneousMathematicalSymbolsB()
+uCSIsMiscellaneousSymbols()
+uCSIsMiscellaneousSymbolsandArrows()
+uCSIsMiscellaneousTechnical()
+uCSIsMongolian()
+uCSIsMusicalSymbols()
+uCSIsMyanmar()
+uCSIsNumberForms()
+uCSIsOgham()
+uCSIsOldItalic()
+uCSIsOpticalCharacterRecognition()
+uCSIsOriya()
+uCSIsOsmanya()
+uCSIsPhoneticExtensions()
+uCSIsPrivateUse()
+uCSIsPrivateUseArea()
+uCSIsRunic()
+uCSIsShavian()
+uCSIsSinhala()
+uCSIsSmallFormVariants()
+uCSIsSpacingModifierLetters()
+uCSIsSpecials()
+uCSIsSuperscriptsandSubscripts()
+uCSIsSupplementalArrowsA()
+uCSIsSupplementalArrowsB()
+uCSIsSupplementalMathematicalOperators()
+uCSIsSupplementaryPrivateUseAreaA()
+uCSIsSupplementaryPrivateUseAreaB()
+uCSIsSyriac()
+uCSIsTagalog()
+uCSIsTagbanwa()
+uCSIsTags()
+uCSIsTaiLe()
+uCSIsTaiXuanJingSymbols()
+uCSIsTamil()
+uCSIsTelugu()
+uCSIsThaana()
+uCSIsThai()
+uCSIsTibetan()
+uCSIsUgaritic()
+uCSIsUnifiedCanadianAboriginalSyllabics()
+uCSIsVariationSelectors()
+uCSIsVariationSelectorsSupplement()
+uCSIsYiRadicals()
+uCSIsYiSyllables()
+uCSIsYijingHexagramSymbols()
+
+# functions from module xmlversion
+checkVersion()
+
+# functions from module xpathInternals
+valuePop()
+
+
+#
+# Set of classes of the module
+#
+
+
+
+Class xmlNode(xmlCore)
+ # accessors
+ ns()
+ nsDefs()
+
+ # functions from module debugXML
+ debugDumpNode()
+ debugDumpNodeList()
+ debugDumpOneNode()
+ lsCountNode()
+ lsOneNode()
+ shellPrintNode()
+
+ # functions from module tree
+ addChild()
+ addChildList()
+ addContent()
+ addContentLen()
+ addNextSibling()
+ addPrevSibling()
+ addSibling()
+ copyNode()
+ copyNodeList()
+ copyProp()
+ copyPropList()
+ docCopyNode()
+ docCopyNodeList()
+ docSetRootElement()
+ firstElementChild()
+ freeNode()
+ freeNodeList()
+ getBase()
+ getContent()
+ getLang()
+ getSpacePreserve()
+ hasNsProp()
+ hasProp()
+ isBlankNode()
+ isText()
+ lastChild()
+ lastElementChild()
+ lineNo()
+ listGetRawString()
+ listGetString()
+ newChild()
+ newNs()
+ newNsProp()
+ newNsPropEatName()
+ newProp()
+ newTextChild()
+ nextElementSibling()
+ noNsProp()
+ nodePath()
+ nsProp()
+ previousElementSibling()
+ prop()
+ reconciliateNs()
+ replaceNode()
+ searchNs()
+ searchNsByHref()
+ setBase()
+ setContent()
+ setContentLen()
+ setLang()
+ setListDoc()
+ setName()
+ setNs()
+ setNsProp()
+ setProp()
+ setSpacePreserve()
+ setTreeDoc()
+ textConcat()
+ textMerge()
+ unlinkNode()
+ unsetNsProp()
+ unsetProp()
+
+ # functions from module valid
+ isID()
+ isRef()
+ validNormalizeAttributeValue()
+
+ # functions from module xinclude
+ xincludeProcessTree()
+ xincludeProcessTreeFlags()
+
+ # functions from module xmlschemas
+ schemaValidateOneElement()
+
+ # functions from module xpath
+ xpathCastNodeToNumber()
+ xpathCastNodeToString()
+ xpathCmpNodes()
+ xpathNodeEval()
+
+ # functions from module xpathInternals
+ xpathNewNodeSet()
+ xpathNewValueTree()
+ xpathNextAncestor()
+ xpathNextAncestorOrSelf()
+ xpathNextAttribute()
+ xpathNextChild()
+ xpathNextDescendant()
+ xpathNextDescendantOrSelf()
+ xpathNextFollowing()
+ xpathNextFollowingSibling()
+ xpathNextNamespace()
+ xpathNextParent()
+ xpathNextPreceding()
+ xpathNextPrecedingSibling()
+ xpathNextSelf()
+
+ # functions from module xpointer
+ xpointerNewCollapsedRange()
+ xpointerNewContext()
+ xpointerNewLocationSetNodes()
+ xpointerNewRange()
+ xpointerNewRangeNodes()
+
+
+Class xmlDoc(xmlNode)
+
+ # functions from module HTMLparser
+ htmlAutoCloseTag()
+ htmlIsAutoClosed()
+
+ # functions from module HTMLtree
+ htmlDocContentDumpFormatOutput()
+ htmlDocContentDumpOutput()
+ htmlDocDump()
+ htmlGetMetaEncoding()
+ htmlNodeDumpFile()
+ htmlNodeDumpFileFormat()
+ htmlNodeDumpFormatOutput()
+ htmlNodeDumpOutput()
+ htmlSaveFile()
+ htmlSaveFileEnc()
+ htmlSaveFileFormat()
+ htmlSetMetaEncoding()
+
+ # functions from module debugXML
+ debugCheckDocument()
+ debugDumpDocument()
+ debugDumpDocumentHead()
+ debugDumpEntities()
+
+ # functions from module entities
+ addDocEntity()
+ addDtdEntity()
+ docEntity()
+ dtdEntity()
+ encodeEntities()
+ encodeEntitiesReentrant()
+ encodeSpecialChars()
+ newEntity()
+ parameterEntity()
+
+ # functions from module relaxng
+ relaxNGNewDocParserCtxt()
+ relaxNGValidateDoc()
+ relaxNGValidateFullElement()
+ relaxNGValidatePopElement()
+ relaxNGValidatePushElement()
+
+ # functions from module tree
+ copyDoc()
+ copyNode()
+ copyNodeList()
+ createIntSubset()
+ docCompressMode()
+ dump()
+ elemDump()
+ formatDump()
+ freeDoc()
+ getRootElement()
+ intSubset()
+ newCDataBlock()
+ newCharRef()
+ newDocComment()
+ newDocFragment()
+ newDocNode()
+ newDocNodeEatName()
+ newDocPI()
+ newDocProp()
+ newDocRawNode()
+ newDocText()
+ newDocTextLen()
+ newDtd()
+ newGlobalNs()
+ newReference()
+ nodeDumpOutput()
+ nodeGetBase()
+ nodeListGetRawString()
+ nodeListGetString()
+ reconciliateNs()
+ saveFile()
+ saveFileEnc()
+ saveFileTo()
+ saveFormatFile()
+ saveFormatFileEnc()
+ saveFormatFileTo()
+ searchNs()
+ searchNsByHref()
+ setDocCompressMode()
+ setListDoc()
+ setRootElement()
+ setTreeDoc()
+ stringGetNodeList()
+ stringLenGetNodeList()
+
+ # functions from module valid
+ ID()
+ isID()
+ isMixedElement()
+ isRef()
+ removeID()
+ removeRef()
+ validCtxtNormalizeAttributeValue()
+ validNormalizeAttributeValue()
+ validateDocument()
+ validateDocumentFinal()
+ validateDtd()
+ validateDtdFinal()
+ validateElement()
+ validateNotationUse()
+ validateOneAttribute()
+ validateOneElement()
+ validateOneNamespace()
+ validatePopElement()
+ validatePushElement()
+ validateRoot()
+
+ # functions from module xinclude
+ xincludeProcess()
+ xincludeProcessFlags()
+
+ # functions from module xmlreader
+ NewWalker()
+ readerWalker()
+
+ # functions from module xmlschemas
+ schemaNewDocParserCtxt()
+ schemaValidateDoc()
+
+ # functions from module xpath
+ xpathNewContext()
+ xpathOrderDocElems()
+
+ # functions from module xpointer
+ xpointerNewContext()
+
+
+Class parserCtxt(parserCtxtCore)
+ # accessors
+ doc()
+ isValid()
+ lineNumbers()
+ loadSubset()
+ pedantic()
+ replaceEntities()
+ validate()
+ wellFormed()
+
+ # functions from module HTMLparser
+ htmlCtxtReadDoc()
+ htmlCtxtReadFd()
+ htmlCtxtReadFile()
+ htmlCtxtReadMemory()
+ htmlCtxtReset()
+ htmlCtxtUseOptions()
+ htmlFreeParserCtxt()
+ htmlParseCharRef()
+ htmlParseChunk()
+ htmlParseDocument()
+ htmlParseElement()
+
+ # functions from module parser
+ byteConsumed()
+ clearParserCtxt()
+ ctxtReadDoc()
+ ctxtReadFd()
+ ctxtReadFile()
+ ctxtReadMemory()
+ ctxtReset()
+ ctxtResetPush()
+ ctxtUseOptions()
+ initParserCtxt()
+ parseChunk()
+ parseDocument()
+ parseExtParsedEnt()
+ setupParserForBuffer()
+ stopParser()
+
+ # functions from module parserInternals
+ decodeEntities()
+ handleEntity()
+ namespaceParseNCName()
+ namespaceParseNSDef()
+ nextChar()
+ parseAttValue()
+ parseAttributeListDecl()
+ parseCDSect()
+ parseCharData()
+ parseCharRef()
+ parseComment()
+ parseContent()
+ parseDocTypeDecl()
+ parseElement()
+ parseElementDecl()
+ parseEncName()
+ parseEncodingDecl()
+ parseEndTag()
+ parseEntityDecl()
+ parseEntityRef()
+ parseExternalSubset()
+ parseMarkupDecl()
+ parseMisc()
+ parseName()
+ parseNamespace()
+ parseNmtoken()
+ parseNotationDecl()
+ parsePEReference()
+ parsePI()
+ parsePITarget()
+ parsePubidLiteral()
+ parseQuotedString()
+ parseReference()
+ parseSDDecl()
+ parseStartTag()
+ parseSystemLiteral()
+ parseTextDecl()
+ parseVersionInfo()
+ parseVersionNum()
+ parseXMLDecl()
+ parserHandlePEReference()
+ parserHandleReference()
+ popInput()
+ scanName()
+ skipBlankChars()
+ stringDecodeEntities()
+ stringLenDecodeEntities()
+
+
+Class xmlAttr(xmlNode)
+
+ # functions from module debugXML
+ debugDumpAttr()
+ debugDumpAttrList()
+
+ # functions from module tree
+ copyProp()
+ copyPropList()
+ freeProp()
+ freePropList()
+ removeProp()
+
+ # functions from module valid
+ removeID()
+ removeRef()
+
+
+Class xmlAttribute(xmlNode)
+Class catalog()
+
+ # functions from module catalog
+ add()
+ catalogIsEmpty()
+ convertSGMLCatalog()
+ dump()
+ remove()
+ resolve()
+ resolvePublic()
+ resolveSystem()
+ resolveURI()
+
+
+Class xmlDtd(xmlNode)
+
+ # functions from module debugXML
+ debugDumpDTD()
+
+ # functions from module tree
+ copyDtd()
+ freeDtd()
+
+ # functions from module valid
+ dtdAttrDesc()
+ dtdElementDesc()
+ dtdQAttrDesc()
+ dtdQElementDesc()
+
+
+Class xmlElement(xmlNode)
+
+
+Class xmlEntity(xmlNode)
+
+ # functions from module parserInternals
+ handleEntity()
+Class Error()
+ # accessors
+ code()
+ domain()
+ file()
+ level()
+ line()
+ message()
+
+ # functions from module xmlerror
+ copyError()
+ resetError()
+
+
+Class xmlNs(xmlNode)
+
+ # functions from module tree
+ copyNamespace()
+ copyNamespaceList()
+ freeNs()
+ freeNsList()
+ newChild()
+ newDocNode()
+ newDocNodeEatName()
+ newDocRawNode()
+ newNodeEatName()
+ newNsProp()
+ newNsPropEatName()
+ newTextChild()
+ setNs()
+ setNsProp()
+ unsetNsProp()
+
+ # functions from module xpathInternals
+ xpathNodeSetFreeNs()
+
+
+Class outputBuffer(ioWriteWrapper)
+
+ # functions from module HTMLtree
+ htmlDocContentDumpFormatOutput()
+ htmlDocContentDumpOutput()
+ htmlNodeDumpFormatOutput()
+ htmlNodeDumpOutput()
+
+ # functions from module tree
+ nodeDumpOutput()
+ saveFileTo()
+ saveFormatFileTo()
+
+ # functions from module xmlIO
+ getContent()
+ write()
+ writeString()
+
+
+Class inputBuffer(ioReadWrapper)
+
+ # functions from module xmlIO
+ grow()
+ push()
+ read()
+
+ # functions from module xmlreader
+ Setup()
+ newTextReader()
+Class xmlReg()
+
+ # functions from module xmlregexp
+ regexpExec()
+ regexpIsDeterminist()
+ regexpPrint()
+Class relaxNgParserCtxt()
+
+ # functions from module relaxng
+ relaxNGParse()
+ relaxParserSetFlag()
+Class relaxNgSchema()
+
+ # functions from module relaxng
+ relaxNGDump()
+ relaxNGDumpTree()
+ relaxNGNewValidCtxt()
+
+ # functions from module xmlreader
+ RelaxNGSetSchema()
+
+
+Class relaxNgValidCtxt(relaxNgValidCtxtCore)
+
+ # functions from module relaxng
+ relaxNGValidateDoc()
+ relaxNGValidateFullElement()
+ relaxNGValidatePopElement()
+ relaxNGValidatePushCData()
+ relaxNGValidatePushElement()
+
+ # functions from module xmlreader
+ RelaxNGValidateCtxt()
+Class SchemaParserCtxt()
+
+ # functions from module xmlschemas
+ schemaParse()
+Class Schema()
+
+ # functions from module xmlreader
+ SetSchema()
+
+ # functions from module xmlschemas
+ schemaDump()
+ schemaNewValidCtxt()
+
+
+Class SchemaValidCtxt(SchemaValidCtxtCore)
+
+ # functions from module xmlreader
+ SchemaValidateCtxt()
+
+ # functions from module xmlschemas
+ schemaIsValid()
+ schemaSetValidOptions()
+ schemaValidCtxtGetOptions()
+ schemaValidCtxtGetParserCtxt()
+ schemaValidateDoc()
+ schemaValidateFile()
+ schemaValidateOneElement()
+ schemaValidateSetFilename()
+Class xmlTextReaderLocator()
+
+ # functions from module xmlreader
+ BaseURI()
+ LineNumber()
+
+
+Class xmlTextReader(xmlTextReaderCore)
+
+ # functions from module xmlreader
+ AttributeCount()
+ BaseUri()
+ ByteConsumed()
+ Close()
+ CurrentDoc()
+ CurrentNode()
+ Depth()
+ Encoding()
+ Expand()
+ GetAttribute()
+ GetAttributeNo()
+ GetAttributeNs()
+ GetParserColumnNumber()
+ GetParserLineNumber()
+ GetParserProp()
+ GetRemainder()
+ HasAttributes()
+ HasValue()
+ IsDefault()
+ IsEmptyElement()
+ IsNamespaceDecl()
+ IsValid()
+ LocalName()
+ LookupNamespace()
+ MoveToAttribute()
+ MoveToAttributeNo()
+ MoveToAttributeNs()
+ MoveToElement()
+ MoveToFirstAttribute()
+ MoveToNextAttribute()
+ Name()
+ NamespaceUri()
+ NewDoc()
+ NewFd()
+ NewFile()
+ NewMemory()
+ NewWalker()
+ Next()
+ NextSibling()
+ NodeType()
+ Normalization()
+ Prefix()
+ Preserve()
+ QuoteChar()
+ Read()
+ ReadAttributeValue()
+ ReadInnerXml()
+ ReadOuterXml()
+ ReadState()
+ ReadString()
+ RelaxNGSetSchema()
+ RelaxNGValidate()
+ RelaxNGValidateCtxt()
+ SchemaValidate()
+ SchemaValidateCtxt()
+ SetParserProp()
+ SetSchema()
+ Setup()
+ Standalone()
+ String()
+ Value()
+ XmlLang()
+ XmlVersion()
+Class URI()
+ # accessors
+ authority()
+ fragment()
+ opaque()
+ path()
+ port()
+ query()
+ queryRaw()
+ scheme()
+ server()
+ setAuthority()
+ setFragment()
+ setOpaque()
+ setPath()
+ setPort()
+ setQuery()
+ setQueryRaw()
+ setScheme()
+ setServer()
+ setUser()
+ user()
+
+ # functions from module uri
+ parseURIReference()
+ printURI()
+ saveUri()
+
+
+Class ValidCtxt(ValidCtxtCore)
+
+ # functions from module valid
+ validCtxtNormalizeAttributeValue()
+ validateDocument()
+ validateDocumentFinal()
+ validateDtd()
+ validateDtdFinal()
+ validateElement()
+ validateNotationUse()
+ validateOneAttribute()
+ validateOneElement()
+ validateOneNamespace()
+ validatePopElement()
+ validatePushCData()
+ validatePushElement()
+ validateRoot()
+Class xpathContext()
+ # accessors
+ contextDoc()
+ contextNode()
+ contextPosition()
+ contextSize()
+ function()
+ functionURI()
+ setContextDoc()
+ setContextNode()
+
+ # functions from module python
+ registerXPathFunction()
+ xpathRegisterVariable()
+
+ # functions from module xpath
+ xpathContextSetCache()
+ xpathEval()
+ xpathEvalExpression()
+ xpathFreeContext()
+
+ # functions from module xpathInternals
+ xpathNewParserContext()
+ xpathNsLookup()
+ xpathRegisterAllFunctions()
+ xpathRegisterNs()
+ xpathRegisteredFuncsCleanup()
+ xpathRegisteredNsCleanup()
+ xpathRegisteredVariablesCleanup()
+ xpathVariableLookup()
+ xpathVariableLookupNS()
+
+ # functions from module xpointer
+ xpointerEval()
+Class xpathParserContext()
+ # accessors
+ context()
+
+ # functions from module xpathInternals
+ xpathAddValues()
+ xpathBooleanFunction()
+ xpathCeilingFunction()
+ xpathCompareValues()
+ xpathConcatFunction()
+ xpathContainsFunction()
+ xpathCountFunction()
+ xpathDivValues()
+ xpathEqualValues()
+ xpathErr()
+ xpathEvalExpr()
+ xpathFalseFunction()
+ xpathFloorFunction()
+ xpathFreeParserContext()
+ xpathIdFunction()
+ xpathLangFunction()
+ xpathLastFunction()
+ xpathLocalNameFunction()
+ xpathModValues()
+ xpathMultValues()
+ xpathNamespaceURIFunction()
+ xpathNextAncestor()
+ xpathNextAncestorOrSelf()
+ xpathNextAttribute()
+ xpathNextChild()
+ xpathNextDescendant()
+ xpathNextDescendantOrSelf()
+ xpathNextFollowing()
+ xpathNextFollowingSibling()
+ xpathNextNamespace()
+ xpathNextParent()
+ xpathNextPreceding()
+ xpathNextPrecedingSibling()
+ xpathNextSelf()
+ xpathNormalizeFunction()
+ xpathNotEqualValues()
+ xpathNotFunction()
+ xpathNumberFunction()
+ xpathParseNCName()
+ xpathParseName()
+ xpathPopBoolean()
+ xpathPopNumber()
+ xpathPopString()
+ xpathPositionFunction()
+ xpathRoot()
+ xpathRoundFunction()
+ xpathStartsWithFunction()
+ xpathStringFunction()
+ xpathStringLengthFunction()
+ xpathSubValues()
+ xpathSubstringAfterFunction()
+ xpathSubstringBeforeFunction()
+ xpathSubstringFunction()
+ xpathSumFunction()
+ xpathTranslateFunction()
+ xpathTrueFunction()
+ xpathValueFlipSign()
+ xpatherror()
+
+ # functions from module xpointer
+ xpointerEvalRangePredicate()
+ xpointerRangeToFunction()
diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h
new file mode 100644
index 0000000..53a0618
--- /dev/null
+++ b/python/libxml_wrap.h
@@ -0,0 +1,279 @@
+#include <Python.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/catalog.h>
+#include <libxml/threads.h>
+#include <libxml/nanoftp.h>
+#include <libxml/nanohttp.h>
+#include <libxml/uri.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xinclude.h>
+#include <libxml/xpointer.h>
+#include <libxml/xmlunicode.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlreader.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+
+/*
+ * for older versions of Python, we don't use PyBytes, but keep PyString
+ * and don't use Capsule but CObjects
+ */
+#if PY_VERSION_HEX < 0x02070000
+#ifndef PyBytes_Check
+#define PyBytes_Check PyString_Check
+#define PyBytes_Size PyString_Size
+#define PyBytes_AsString PyString_AsString
+#define PyBytes_AS_STRING PyString_AS_STRING
+#define PyBytes_GET_SIZE PyString_GET_SIZE
+#endif
+#ifndef PyCapsule_New
+#define PyCapsule_New PyCObject_FromVoidPtrAndDesc
+#define PyCapsule_CheckExact PyCObject_Check
+#define PyCapsule_GetPointer(o, n) PyCObject_GetDesc((o))
+#endif
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ * Repeated here since the definition is not available when
+ * compiled outside the libxml2 build tree.
+ */
+#ifdef __GNUC__
+#ifdef ATTRIBUTE_UNUSED
+#undef ATTRIBUTE_UNUSED
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#endif /* ATTRIBUTE_UNUSED */
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlNode_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlNodePtr obj;
+} PyxmlNode_Object;
+
+#define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlXPathContext_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlXPathContextPtr obj;
+} PyxmlXPathContext_Object;
+
+#define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlXPathParserContext_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlXPathParserContextPtr obj;
+} PyxmlXPathParserContext_Object;
+
+#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyparserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlParserCtxtPtr obj;
+} PyparserCtxt_Object;
+
+#define PyValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyValidCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlValidCtxtPtr obj;
+} PyValidCtxt_Object;
+
+#define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
+ (((Pycatalog_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlCatalogPtr obj;
+} Pycatalog_Object;
+
+#ifdef LIBXML_REGEXP_ENABLED
+#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlReg_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRegexpPtr obj;
+} PyxmlReg_Object;
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#ifdef LIBXML_READER_ENABLED
+#define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlTextReader_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlTextReaderPtr obj;
+} PyxmlTextReader_Object;
+
+#define PyxmlTextReaderLocator_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlTextReaderLocator_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlTextReaderLocatorPtr obj;
+} PyxmlTextReaderLocator_Object;
+#endif
+
+#define PyURI_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyURI_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlErrorPtr obj;
+} PyError_Object;
+
+#define PyError_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyError_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlOutputBufferPtr obj;
+} PyoutputBuffer_Object;
+
+#define PyoutputBuffer_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyoutputBuffer_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlParserInputBufferPtr obj;
+} PyinputBuffer_Object;
+
+#define PyinputBuffer_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyinputBuffer_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlURIPtr obj;
+} PyURI_Object;
+
+/* FILE * have their own internal representation */
+#if PY_MAJOR_VERSION >= 3
+FILE *libxml_PyFileGet(PyObject *f);
+void libxml_PyFileRelease(FILE *f);
+#define PyFile_Get(v) (((v) == Py_None) ? NULL : libxml_PyFileGet(v))
+#define PyFile_Release(f) libxml_PyFileRelease(f)
+#else
+#define PyFile_Get(v) (((v) == Py_None) ? NULL : \
+ (PyFile_Check(v) ? (PyFile_AsFile(v)) : stdout))
+#define PyFile_Release(f)
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGPtr obj;
+} PyrelaxNgSchema_Object;
+
+#define PyrelaxNgSchema_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgSchema_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGParserCtxtPtr obj;
+} PyrelaxNgParserCtxt_Object;
+
+#define PyrelaxNgParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgParserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlRelaxNGValidCtxtPtr obj;
+} PyrelaxNgValidCtxt_Object;
+
+#define PyrelaxNgValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyrelaxNgValidCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaPtr obj;
+} PySchema_Object;
+
+#define PySchema_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchema_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaParserCtxtPtr obj;
+} PySchemaParserCtxt_Object;
+
+#define PySchemaParserCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchemaParserCtxt_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlSchemaValidCtxtPtr obj;
+} PySchemaValidCtxt_Object;
+
+#define PySchemaValidCtxt_Get(v) (((v) == Py_None) ? NULL : \
+ (((PySchemaValidCtxt_Object *)(v))->obj))
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+PyObject * libxml_intWrap(int val);
+PyObject * libxml_longWrap(long val);
+PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
+PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str);
+PyObject * libxml_charPtrWrap(char *str);
+PyObject * libxml_constcharPtrWrap(const char *str);
+PyObject * libxml_charPtrConstWrap(const char *str);
+PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str);
+PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc);
+PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node);
+PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr);
+PyObject * libxml_xmlNsPtrWrap(xmlNsPtr ns);
+PyObject * libxml_xmlAttributePtrWrap(xmlAttributePtr ns);
+PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns);
+PyObject * libxml_doubleWrap(double val);
+PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
+PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
+PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
+PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
+PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid);
+PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
+PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
+PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
+PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
+#ifdef LIBXML_REGEXP_ENABLED
+PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
+#endif /* LIBXML_REGEXP_ENABLED */
+#ifdef LIBXML_READER_ENABLED
+PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
+PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
+#endif
+
+xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
+#ifdef LIBXML_SCHEMAS_ENABLED
+PyObject * libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt);
+PyObject * libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt);
+PyObject * libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid);
+PyObject * libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt);
+PyObject * libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt);
+PyObject * libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid);
+#endif /* LIBXML_SCHEMAS_ENABLED */
+PyObject * libxml_xmlErrorPtrWrap(xmlErrorPtr error);
+PyObject * libxml_xmlSchemaSetValidErrors(PyObject * self, PyObject * args);
+PyObject * libxml_xmlRegisterInputCallback(PyObject *self, PyObject *args);
+PyObject * libxml_xmlUnregisterInputCallback(PyObject *self, PyObject *args);
+PyObject * libxml_xmlNodeRemoveNsDef(PyObject * self, PyObject * args);
diff --git a/python/setup.py b/python/setup.py
new file mode 100755
index 0000000..e504323
--- /dev/null
+++ b/python/setup.py
@@ -0,0 +1,242 @@
+#!/usr/bin/python -u
+#
+# Setup script for libxml2 and libxslt if found
+#
+import sys, os
+from distutils.core import setup, Extension
+
+# Below ROOT, we expect to find include, include/libxml2, lib and bin.
+# On *nix, it is not needed (but should not harm),
+# on Windows, it is set by configure.js.
+ROOT = r'/usr'
+
+# Thread-enabled libxml2
+with_threads = 1
+
+# If this flag is set (windows only),
+# a private copy of the dlls are included in the package.
+# If this flag is not set, the libxml2 and libxslt
+# dlls must be found somewhere in the PATH at runtime.
+WITHDLLS = 1 and sys.platform.startswith('win')
+
+def missing(file):
+ if os.access(file, os.R_OK) == 0:
+ return 1
+ return 0
+
+try:
+ HOME = os.environ['HOME']
+except:
+ HOME="C:"
+
+if WITHDLLS:
+ # libxml dlls (expected in ROOT/bin)
+ dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
+ dlls = [os.path.join(ROOT,'bin',dll) for dll in dlls]
+
+ # create __init__.py for the libxmlmods package
+ if not os.path.exists("libxmlmods"):
+ os.mkdir("libxmlmods")
+ open("libxmlmods/__init__.py","w").close()
+
+ def altImport(s):
+ s = s.replace("import libxml2mod","from libxmlmods import libxml2mod")
+ s = s.replace("import libxsltmod","from libxmlmods import libxsltmod")
+ return s
+
+if sys.platform.startswith('win'):
+ libraryPrefix = 'lib'
+ platformLibs = []
+else:
+ libraryPrefix = ''
+ platformLibs = ["m","z"]
+
+# those are examined to find
+# - libxml2/libxml/tree.h
+# - iconv.h
+# - libxslt/xsltconfig.h
+includes_dir = [
+"/usr/include",
+"/usr/local/include",
+"/opt/include",
+os.path.join(ROOT,'include'),
+HOME
+];
+
+xml_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/libxml2/libxml/tree.h"):
+ xml_includes=dir + "/libxml2"
+ break;
+
+if xml_includes == "":
+ print("failed to find headers for libxml2: update includes_dir")
+ sys.exit(1)
+
+iconv_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/iconv.h"):
+ iconv_includes=dir
+ break;
+
+if iconv_includes == "":
+ print("failed to find headers for libiconv: update includes_dir")
+ sys.exit(1)
+
+# those are added in the linker search path for libraries
+libdirs = [
+os.path.join(ROOT,'lib'),
+]
+
+xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+ "libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
+ "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
+
+xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
+ "libxslt.c", "libxsl.py", "libxslt_wrap.h",
+ "xsltgenerator.py"]
+
+if missing("libxml2-py.c") or missing("libxml2.py"):
+ try:
+ try:
+ import xmlgenerator
+ except:
+ import generator
+ except:
+ print("failed to find and generate stubs for libxml2, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ sys.exit(1)
+
+ head = open("libxml.py", "r")
+ generated = open("libxml2class.py", "r")
+ result = open("libxml2.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+
+with_xslt=0
+if missing("libxslt-py.c") or missing("libxslt.py"):
+ if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
+ print("libxslt stub generator not found, libxslt not built")
+ else:
+ try:
+ import xsltgenerator
+ except:
+ print("failed to generate stubs for libxslt, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ else:
+ head = open("libxsl.py", "r")
+ generated = open("libxsltclass.py", "r")
+ result = open("libxslt.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+ with_xslt=1
+else:
+ with_xslt=1
+
+if with_xslt == 1:
+ xslt_includes=""
+ for dir in includes_dir:
+ if not missing(dir + "/libxslt/xsltconfig.h"):
+ xslt_includes=dir + "/libxslt"
+ break;
+
+ if xslt_includes == "":
+ print("failed to find headers for libxslt: update includes_dir")
+ with_xslt = 0
+
+
+descr = "libxml2 package"
+modules = [ 'libxml2', 'drv_libxml2' ]
+if WITHDLLS:
+ modules.append('libxmlmods.__init__')
+c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ]
+includes= [xml_includes, iconv_includes]
+libs = [libraryPrefix + "xml2"] + platformLibs
+macros = []
+if with_threads:
+ macros.append(('_REENTRANT','1'))
+if with_xslt == 1:
+ descr = "libxml2 and libxslt package"
+ if not sys.platform.startswith('win'):
+ #
+ # We are gonna build 2 identical shared libs with merge initializing
+ # both libxml2mod and libxsltmod
+ #
+ c_files = c_files + ['libxslt-py.c', 'libxslt.c']
+ xslt_c_files = c_files
+ macros.append(('MERGED_MODULES', '1'))
+ else:
+ #
+ # On windows the MERGED_MODULE option is not needed
+ # (and does not work)
+ #
+ xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
+ libs.insert(0, libraryPrefix + 'exslt')
+ libs.insert(0, libraryPrefix + 'xslt')
+ includes.append(xslt_includes)
+ modules.append('libxslt')
+
+
+extens=[Extension('libxml2mod', c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros)]
+if with_xslt == 1:
+ extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros))
+
+if missing("MANIFEST"):
+
+ manifest = open("MANIFEST", "w")
+ manifest.write("setup.py\n")
+ for file in xml_files:
+ manifest.write(file + "\n")
+ if with_xslt == 1:
+ for file in xslt_files:
+ manifest.write(file + "\n")
+ manifest.close()
+
+if WITHDLLS:
+ ext_package = "libxmlmods"
+ if sys.version >= "2.2":
+ base = "lib/site-packages/"
+ else:
+ base = ""
+ data_files = [(base+"libxmlmods",dlls)]
+else:
+ ext_package = None
+ data_files = []
+
+setup (name = "libxml2-python",
+ # On *nix, the version number is created from setup.py.in
+ # On windows, it is set by configure.js
+ version = "2.9.2",
+ description = descr,
+ author = "Daniel Veillard",
+ author_email = "veillard@redhat.com",
+ url = "http://xmlsoft.org/python.html",
+ licence="MIT Licence",
+ py_modules=modules,
+ ext_modules=extens,
+ ext_package=ext_package,
+ data_files=data_files,
+ )
+
+sys.exit(0)
+
diff --git a/python/setup.py.in b/python/setup.py.in
new file mode 100755
index 0000000..90c2114
--- /dev/null
+++ b/python/setup.py.in
@@ -0,0 +1,242 @@
+#!/usr/bin/python -u
+#
+# Setup script for libxml2 and libxslt if found
+#
+import sys, os
+from distutils.core import setup, Extension
+
+# Below ROOT, we expect to find include, include/libxml2, lib and bin.
+# On *nix, it is not needed (but should not harm),
+# on Windows, it is set by configure.js.
+ROOT = r'@prefix@'
+
+# Thread-enabled libxml2
+with_threads = @WITH_THREADS@
+
+# If this flag is set (windows only),
+# a private copy of the dlls are included in the package.
+# If this flag is not set, the libxml2 and libxslt
+# dlls must be found somewhere in the PATH at runtime.
+WITHDLLS = 1 and sys.platform.startswith('win')
+
+def missing(file):
+ if os.access(file, os.R_OK) == 0:
+ return 1
+ return 0
+
+try:
+ HOME = os.environ['HOME']
+except:
+ HOME="C:"
+
+if WITHDLLS:
+ # libxml dlls (expected in ROOT/bin)
+ dlls = [ 'iconv.dll','libxml2.dll','libxslt.dll','libexslt.dll' ]
+ dlls = [os.path.join(ROOT,'bin',dll) for dll in dlls]
+
+ # create __init__.py for the libxmlmods package
+ if not os.path.exists("libxmlmods"):
+ os.mkdir("libxmlmods")
+ open("libxmlmods/__init__.py","w").close()
+
+ def altImport(s):
+ s = s.replace("import libxml2mod","from libxmlmods import libxml2mod")
+ s = s.replace("import libxsltmod","from libxmlmods import libxsltmod")
+ return s
+
+if sys.platform.startswith('win'):
+ libraryPrefix = 'lib'
+ platformLibs = []
+else:
+ libraryPrefix = ''
+ platformLibs = ["m","z"]
+
+# those are examined to find
+# - libxml2/libxml/tree.h
+# - iconv.h
+# - libxslt/xsltconfig.h
+includes_dir = [
+"/usr/include",
+"/usr/local/include",
+"/opt/include",
+os.path.join(ROOT,'include'),
+HOME
+];
+
+xml_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/libxml2/libxml/tree.h"):
+ xml_includes=dir + "/libxml2"
+ break;
+
+if xml_includes == "":
+ print("failed to find headers for libxml2: update includes_dir")
+ sys.exit(1)
+
+iconv_includes=""
+for dir in includes_dir:
+ if not missing(dir + "/iconv.h"):
+ iconv_includes=dir
+ break;
+
+if iconv_includes == "":
+ print("failed to find headers for libiconv: update includes_dir")
+ sys.exit(1)
+
+# those are added in the linker search path for libraries
+libdirs = [
+os.path.join(ROOT,'lib'),
+]
+
+xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
+ "libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
+ "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
+
+xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
+ "libxslt.c", "libxsl.py", "libxslt_wrap.h",
+ "xsltgenerator.py"]
+
+if missing("libxml2-py.c") or missing("libxml2.py"):
+ try:
+ try:
+ import xmlgenerator
+ except:
+ import generator
+ except:
+ print("failed to find and generate stubs for libxml2, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ sys.exit(1)
+
+ head = open("libxml.py", "r")
+ generated = open("libxml2class.py", "r")
+ result = open("libxml2.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+
+with_xslt=0
+if missing("libxslt-py.c") or missing("libxslt.py"):
+ if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
+ print("libxslt stub generator not found, libxslt not built")
+ else:
+ try:
+ import xsltgenerator
+ except:
+ print("failed to generate stubs for libxslt, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ else:
+ head = open("libxsl.py", "r")
+ generated = open("libxsltclass.py", "r")
+ result = open("libxslt.py", "w")
+ for line in head.readlines():
+ if WITHDLLS:
+ result.write(altImport(line))
+ else:
+ result.write(line)
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+ with_xslt=1
+else:
+ with_xslt=1
+
+if with_xslt == 1:
+ xslt_includes=""
+ for dir in includes_dir:
+ if not missing(dir + "/libxslt/xsltconfig.h"):
+ xslt_includes=dir + "/libxslt"
+ break;
+
+ if xslt_includes == "":
+ print("failed to find headers for libxslt: update includes_dir")
+ with_xslt = 0
+
+
+descr = "libxml2 package"
+modules = [ 'libxml2', 'drv_libxml2' ]
+if WITHDLLS:
+ modules.append('libxmlmods.__init__')
+c_files = ['libxml2-py.c', 'libxml.c', 'types.c' ]
+includes= [xml_includes, iconv_includes]
+libs = [libraryPrefix + "xml2"] + platformLibs
+macros = []
+if with_threads:
+ macros.append(('_REENTRANT','1'))
+if with_xslt == 1:
+ descr = "libxml2 and libxslt package"
+ if not sys.platform.startswith('win'):
+ #
+ # We are gonna build 2 identical shared libs with merge initializing
+ # both libxml2mod and libxsltmod
+ #
+ c_files = c_files + ['libxslt-py.c', 'libxslt.c']
+ xslt_c_files = c_files
+ macros.append(('MERGED_MODULES', '1'))
+ else:
+ #
+ # On windows the MERGED_MODULE option is not needed
+ # (and does not work)
+ #
+ xslt_c_files = ['libxslt-py.c', 'libxslt.c', 'types.c']
+ libs.insert(0, libraryPrefix + 'exslt')
+ libs.insert(0, libraryPrefix + 'xslt')
+ includes.append(xslt_includes)
+ modules.append('libxslt')
+
+
+extens=[Extension('libxml2mod', c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros)]
+if with_xslt == 1:
+ extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
+ library_dirs=libdirs,
+ libraries=libs, define_macros=macros))
+
+if missing("MANIFEST"):
+
+ manifest = open("MANIFEST", "w")
+ manifest.write("setup.py\n")
+ for file in xml_files:
+ manifest.write(file + "\n")
+ if with_xslt == 1:
+ for file in xslt_files:
+ manifest.write(file + "\n")
+ manifest.close()
+
+if WITHDLLS:
+ ext_package = "libxmlmods"
+ if sys.version >= "2.2":
+ base = "lib/site-packages/"
+ else:
+ base = ""
+ data_files = [(base+"libxmlmods",dlls)]
+else:
+ ext_package = None
+ data_files = []
+
+setup (name = "libxml2-python",
+ # On *nix, the version number is created from setup.py.in
+ # On windows, it is set by configure.js
+ version = "@LIBXML_VERSION@",
+ description = descr,
+ author = "Daniel Veillard",
+ author_email = "veillard@redhat.com",
+ url = "http://xmlsoft.org/python.html",
+ licence="MIT Licence",
+ py_modules=modules,
+ ext_modules=extens,
+ ext_package=ext_package,
+ data_files=data_files,
+ )
+
+sys.exit(0)
+
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
new file mode 100644
index 0000000..95ebead
--- /dev/null
+++ b/python/tests/Makefile.am
@@ -0,0 +1,75 @@
+exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
+dist_example_DATA = $(PYTESTS) $(XMLS)
+
+PYTESTS= \
+ build.py \
+ attribs.py \
+ tst.py \
+ tstxpath.py \
+ xpathext.py \
+ push.py \
+ pushSAX.py \
+ pushSAXhtml.py \
+ error.py \
+ serialize.py\
+ validate.py \
+ tstURI.py \
+ cutnpaste.py\
+ xpathret.py \
+ xpath.py \
+ outbuf.py \
+ inbuf.py \
+ input_callback.py \
+ resolver.py \
+ regexp.py \
+ reader.py \
+ reader2.py \
+ reader3.py \
+ reader4.py \
+ reader5.py \
+ reader6.py \
+ reader7.py \
+ reader8.py \
+ readernext.py \
+ walker.py \
+ nsdel.py \
+ ctxterror.py\
+ readererr.py\
+ relaxng.py \
+ schema.py \
+ thread2.py \
+ sync.py \
+ tstLastError.py \
+ indexes.py \
+ dtdvalid.py \
+ tstmem.py \
+ validDTD.py \
+ validSchemas.py \
+ validRNG.py \
+ compareNodes.py \
+ xpathns.py \
+ xpathleak.py
+
+XMLS= \
+ tst.xml \
+ valid.xml \
+ invalid.xml \
+ test.dtd
+
+CLEANFILES = core tmp.xml *.pyc
+
+if WITH_PYTHON
+tests: $(PYTESTS)
+ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+ @echo "## running Python regression tests"
+ -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ for test in $(PYTESTS) ; \
+ do log=`$(PYTHON) $(srcdir)/$$test` ; \
+ if [ "`echo $$log | grep OK`" = "" ] ; then \
+ echo "-- $$test" ; echo "$$log" ; fi ; done)
+else
+tests:
+endif
diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in
new file mode 100644
index 0000000..ffda69b
--- /dev/null
+++ b/python/tests/Makefile.in
@@ -0,0 +1,664 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = python/tests
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(dist_example_DATA)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(exampledir)"
+DATA = $(dist_example_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+exampledir = $(datadir)/doc/libxml2-python-$(LIBXML_VERSION)/examples
+dist_example_DATA = $(PYTESTS) $(XMLS)
+PYTESTS = \
+ build.py \
+ attribs.py \
+ tst.py \
+ tstxpath.py \
+ xpathext.py \
+ push.py \
+ pushSAX.py \
+ pushSAXhtml.py \
+ error.py \
+ serialize.py\
+ validate.py \
+ tstURI.py \
+ cutnpaste.py\
+ xpathret.py \
+ xpath.py \
+ outbuf.py \
+ inbuf.py \
+ input_callback.py \
+ resolver.py \
+ regexp.py \
+ reader.py \
+ reader2.py \
+ reader3.py \
+ reader4.py \
+ reader5.py \
+ reader6.py \
+ reader7.py \
+ reader8.py \
+ readernext.py \
+ walker.py \
+ nsdel.py \
+ ctxterror.py\
+ readererr.py\
+ relaxng.py \
+ schema.py \
+ thread2.py \
+ sync.py \
+ tstLastError.py \
+ indexes.py \
+ dtdvalid.py \
+ tstmem.py \
+ validDTD.py \
+ validSchemas.py \
+ validRNG.py \
+ compareNodes.py \
+ xpathns.py \
+ xpathleak.py
+
+XMLS = \
+ tst.xml \
+ valid.xml \
+ invalid.xml \
+ test.dtd
+
+CLEANFILES = core tmp.xml *.pyc
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/tests/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu python/tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-dist_exampleDATA: $(dist_example_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(exampledir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(exampledir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
+ done
+
+uninstall-dist_exampleDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(exampledir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(exampledir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_exampleDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_exampleDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_exampleDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_exampleDATA
+
+
+@WITH_PYTHON_TRUE@tests: $(PYTESTS)
+@WITH_PYTHON_TRUE@ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+@WITH_PYTHON_TRUE@ @echo "## running Python regression tests"
+@WITH_PYTHON_TRUE@ -@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; \
+@WITH_PYTHON_TRUE@ export PYTHONPATH; \
+@WITH_PYTHON_TRUE@ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+@WITH_PYTHON_TRUE@ export LD_LIBRARY_PATH; \
+@WITH_PYTHON_TRUE@ for test in $(PYTESTS) ; \
+@WITH_PYTHON_TRUE@ do log=`$(PYTHON) $(srcdir)/$$test` ; \
+@WITH_PYTHON_TRUE@ if [ "`echo $$log | grep OK`" = "" ] ; then \
+@WITH_PYTHON_TRUE@ echo "-- $$test" ; echo "$$log" ; fi ; done)
+@WITH_PYTHON_FALSE@tests:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/python/tests/attribs.py b/python/tests/attribs.py
new file mode 100755
index 0000000..99132c2
--- /dev/null
+++ b/python/tests/attribs.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+doc = libxml2.parseDoc(
+"""<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE test [
+<!ELEMENT test (#PCDATA) >
+<!ATTLIST test xmlns:abc CDATA #FIXED "http://abc.org" >
+<!ATTLIST test abc:attr CDATA #FIXED "def" >
+]>
+<test />
+""")
+elem = doc.getRootElement()
+attr = elem.hasNsProp('attr', 'http://abc.org')
+if attr == None or attr.serialize()[:-1] != """<!ATTLIST test abc:attr CDATA #FIXED "def">""":
+ print("Failed to find defaulted attribute abc:attr")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/build.py b/python/tests/build.py
new file mode 100755
index 0000000..b2d3f78
--- /dev/null
+++ b/python/tests/build.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.newDoc("1.0")
+comment = doc.newDocComment("This is a generated document")
+doc.addChild(comment)
+pi = libxml2.newPI("test", "PI content")
+doc.addChild(pi)
+root = doc.newChild(None, "doc", None)
+ns = root.newNs("http://example.com/doc", "my")
+root.setNs(ns)
+elem = root.newChild(None, "foo", "bar")
+elem.setBase("http://example.com/imgs")
+elem.setProp("img", "image.gif")
+doc.saveFile("tmp.xml")
+doc.freeDoc()
+
+doc = libxml2.parseFile("tmp.xml")
+comment = doc.children
+if comment.type != "comment" or \
+ comment.content != "This is a generated document":
+ print("error rereading comment")
+ sys.exit(1)
+pi = comment.next
+if pi.type != "pi" or pi.name != "test" or pi.content != "PI content":
+ print("error rereading PI")
+ sys.exit(1)
+root = pi.next
+if root.name != "doc":
+ print("error rereading root")
+ sys.exit(1)
+ns = root.ns()
+if ns.name != "my" or ns.content != "http://example.com/doc":
+ print("error rereading namespace")
+ sys.exit(1)
+elem = root.children
+if elem.name != "foo":
+ print("error rereading elem")
+ sys.exit(1)
+if elem.getBase(None) != "http://example.com/imgs":
+ print("error rereading base")
+ sys.exit(1)
+if elem.prop("img") != "image.gif":
+ print("error rereading property")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/compareNodes.py b/python/tests/compareNodes.py
new file mode 100755
index 0000000..ca5a5a2
--- /dev/null
+++ b/python/tests/compareNodes.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML Node comparison and Node hash-value
+#
+doc = libxml2.parseDoc("""<root><foo/></root>""")
+root = doc.getRootElement()
+
+# Create two different objects which point to foo
+foonode1 = root.children
+foonode2 = root.children
+
+# Now check that [in]equality tests work ok
+if not ( foonode1 == foonode2 ):
+ print("Error comparing nodes with ==, nodes should be equal but are unequal")
+ sys.exit(1)
+if not ( foonode1 != root ):
+ print("Error comparing nodes with ==, nodes should not be equal but are equal")
+ sys.exit(1)
+if not ( foonode1 != root ):
+ print("Error comparing nodes with !=, nodes should not be equal but are equal")
+if ( foonode1 != foonode2 ):
+ print("Error comparing nodes with !=, nodes should be equal but are unequal")
+
+# Next check that the hash function for the objects also works ok
+if not (hash(foonode1) == hash(foonode2)):
+ print("Error hash values for two equal nodes are different")
+ sys.exit(1)
+if not (hash(foonode1) != hash(root)):
+ print("Error hash values for two unequal nodes are not different")
+ sys.exit(1)
+if hash(foonode1) == hash(root):
+ print("Error hash values for two unequal nodes are equal")
+ sys.exit(1)
+
+# Basic tests successful
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/ctxterror.py b/python/tests/ctxterror.py
new file mode 100755
index 0000000..416e384
--- /dev/null
+++ b/python/tests/ctxterror.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python -u
+#
+# This test exercise the redirection of error messages with a
+# functions defined in Python.
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""--> (3) xmlns: URI foo is not absolute
+--> (4) Opening and ending tag mismatch: x line 0 and y
+"""
+
+err=""
+def callback(arg,msg,severity,reserved):
+ global err
+ err = err + "%s (%d) %s" % (arg,severity,msg)
+
+s = """<x xmlns="foo"></y>"""
+
+parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
+parserCtxt.setErrorHandler(callback, "-->")
+if parserCtxt.getErrorHandler() != (callback,"-->"):
+ print("getErrorHandler failed")
+ sys.exit(1)
+parserCtxt.parseChunk(s,len(s),1)
+doc = parserCtxt.doc()
+doc.freeDoc()
+parserCtxt = None
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+i = 10000
+while i > 0:
+ parserCtxt = libxml2.createPushParser(None,"",0,"test.xml")
+ parserCtxt.setErrorHandler(callback, "-->")
+ parserCtxt.parseChunk(s,len(s),1)
+ doc = parserCtxt.doc()
+ doc.freeDoc()
+ parserCtxt = None
+ err = ""
+ i = i - 1
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/cutnpaste.py b/python/tests/cutnpaste.py
new file mode 100755
index 0000000..7787246
--- /dev/null
+++ b/python/tests/cutnpaste.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+source = libxml2.parseDoc("""<?xml version="1.0"?>
+<root xmlns:foo="http://example.org/foo"
+ xmlns:bar="http://example.org/bar">
+<include xmlns="http://example.org/include">
+<fragment><foo:elem bar="tricky"/></fragment>
+</include>
+</root>
+""")
+
+target = libxml2.parseDoc("""<?xml version="1.0"?>
+<root xmlns:foobar="http://example.org/bar"/>""")
+
+fragment = source.xpathEval("//*[name()='fragment']")[0]
+dest = target.getRootElement()
+
+# do a cut and paste operation
+fragment.unlinkNode()
+dest.addChild(fragment)
+# do the namespace fixup
+dest.reconciliateNs(target)
+
+# The source tree can be freed at that point
+source.freeDoc()
+
+# check the resulting tree
+str = dest.serialize()
+if str != """<root xmlns:foobar="http://example.org/bar" xmlns:default="http://example.org/include" xmlns:foo="http://example.org/foo"><default:fragment><foo:elem bar="tricky"/></default:fragment></root>""":
+ print("reconciliateNs() failed")
+ sys.exit(1)
+target.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/dtdvalid.py b/python/tests/dtdvalid.py
new file mode 100755
index 0000000..d4049b8
--- /dev/null
+++ b/python/tests/dtdvalid.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+instance="""<?xml version="1.0"?>
+<foo></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1:
+ print("error doing DTD validation")
+ sys.exit(1)
+
+doc.freeDoc()
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/error.py b/python/tests/error.py
new file mode 100755
index 0000000..530c2ee
--- /dev/null
+++ b/python/tests/error.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python -u
+#
+# This test exercise the redirection of error messages with a
+# functions defined in Python.
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect='--> I/O --> warning : --> failed to load external entity "missing.xml"\n'
+err=""
+def callback(ctx, str):
+ global err
+
+ err = err + "%s %s" % (ctx, str)
+
+got_exc = 0
+libxml2.registerErrorHandler(callback, "-->")
+try:
+ doc = libxml2.parseFile("missing.xml")
+except libxml2.parserError:
+ got_exc = 1
+
+if got_exc == 0:
+ print("Failed to get a parser exception")
+ sys.exit(1)
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+i = 10000
+while i > 0:
+ try:
+ doc = libxml2.parseFile("missing.xml")
+ except libxml2.parserError:
+ got_exc = 1
+ err = ""
+ i = i - 1
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/inbuf.py b/python/tests/inbuf.py
new file mode 100755
index 0000000..0c16674
--- /dev/null
+++ b/python/tests/inbuf.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+i = 0
+while i < 5000:
+ f = str_io("foobar")
+ buf = libxml2.inputBuffer(f)
+ i = i + 1
+
+del f
+del buf
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/indexes.py b/python/tests/indexes.py
new file mode 100755
index 0000000..e41a0d9
--- /dev/null
+++ b/python/tests/indexes.py
@@ -0,0 +1,113 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = None
+
+class callback:
+ def __init__(self, startd, starte, ende, delta, endd):
+ self.startd = startd
+ self.starte = starte
+ self.ende = ende
+ self.endd = endd
+ self.delta = delta
+ self.count = 0
+
+ def startDocument(self):
+ global ctxt
+ if ctxt.byteConsumed() != self.startd:
+ print("document start at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), self.startd))
+ sys.exit(1)
+
+ def endDocument(self):
+ global ctxt
+ expect = self.ende + self.delta * (self.count - 1) + self.endd
+ if ctxt.byteConsumed() != expect:
+ print("document end at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+
+ def startElement(self, tag, attrs):
+ global ctxt
+ if tag == "bar1":
+ expect = self.starte + self.delta * self.count
+ if ctxt.byteConsumed() != expect:
+ print("element start at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+
+
+ def endElement(self, tag):
+ global ctxt
+ if tag == "bar1":
+ expect = self.ende + self.delta * self.count
+ if ctxt.byteConsumed() != expect:
+ print("element end at wrong index: %d expecting %d\n" % (
+ ctxt.byteConsumed(), expect))
+ sys.exit(1)
+ self.count = self.count + 1
+
+ def characters(self, data):
+ pass
+
+#
+# First run a pure UTF-8 test
+#
+handler = callback(0, 13, 27, 198, 183)
+ctxt = libxml2.createPushParser(handler, "<foo>\n", 6, "test.xml")
+chunk = """ <bar1>chars1</bar1>
+ <bar2>chars2</bar2>
+ <bar3>chars3</bar3>
+ <bar4>chars4</bar4>
+ <bar5>chars5</bar5>
+ <bar6>&lt;s6</bar6>
+ <bar7>chars7</bar7>
+ <bar8>&#38;8</bar8>
+ <bar9>chars9</bar9>
+"""
+i = 0
+while i < 10000:
+ ctxt.parseChunk(chunk, len(chunk), 0)
+ i = i + 1
+chunk = "</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+#
+# Then run a test relying on ISO-Latin-1
+#
+handler = callback(43, 57, 71, 198, 183)
+chunk="""<?xml version="1.0" encoding="ISO-8859-1"?>
+<foo>
+"""
+ctxt = libxml2.createPushParser(handler, chunk, len(chunk), "test.xml")
+chunk = """ <bar1>chars1</bar1>
+ <bar2>chars2</bar2>
+ <bar3>chars3</bar3>
+ <bar4>chàrs4</bar4>
+ <bar5>chars5</bar5>
+ <bar6>&lt;s6</bar6>
+ <bar7>chars7</bar7>
+ <bar8>&#38;8</bar8>
+ <bar9>très 9</bar9>
+"""
+i = 0
+while i < 10000:
+ ctxt.parseChunk(chunk, len(chunk), 0)
+ i = i + 1
+chunk = "</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/input_callback.py b/python/tests/input_callback.py
new file mode 100755
index 0000000..495ab62
--- /dev/null
+++ b/python/tests/input_callback.py
@@ -0,0 +1,148 @@
+#!/usr/bin/python -u
+#
+# This tests custom input callbacks
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# We implement a new scheme, py://strings/ that will reference this dictionary
+pystrings = {
+ 'catalogs/catalog.xml' :
+'''<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <rewriteSystem systemIdStartString="http://example.com/dtds/" rewritePrefix="../dtds/"/>
+</catalog>''',
+
+ 'xml/sample.xml' :
+'''<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE root SYSTEM "http://example.com/dtds/sample.dtd">
+<root>&sample.entity;</root>''',
+
+ 'dtds/sample.dtd' :
+'''
+<!ELEMENT root (#PCDATA)>
+<!ENTITY sample.entity "replacement text">'''
+}
+
+prefix = "py://strings/"
+startURL = prefix + "xml/sample.xml"
+catURL = prefix + "catalogs/catalog.xml"
+
+def my_input_cb(URI):
+ if not(URI.startswith(prefix)):
+ return None
+ path = URI[len(prefix):]
+ if path not in pystrings:
+ return None
+ return str_io(pystrings[path])
+
+
+def run_test(desc, docpath, catalog, exp_status="verified", exp_err=[], test_callback=None,
+ root_name="root", root_content="replacement text"):
+ opts = libxml2.XML_PARSE_DTDLOAD | libxml2.XML_PARSE_NONET | libxml2.XML_PARSE_COMPACT
+ actual_err = []
+
+ def my_global_error_cb(ctx, msg):
+ actual_err.append((-1, msg))
+ def my_ctx_error_cb(arg, msg, severity, reserved):
+ actual_err.append((severity, msg))
+
+ libxml2.registerErrorHandler(my_global_error_cb, None)
+ try:
+ parser = libxml2.createURLParserCtxt(docpath, opts)
+ parser.setErrorHandler(my_ctx_error_cb, None)
+ if catalog is not None:
+ parser.addLocalCatalog(catalog)
+ if test_callback is not None:
+ test_callback()
+ parser.parseDocument()
+ doc = parser.doc()
+ actual_status = "loaded"
+ e = doc.getRootElement()
+ if e.name == root_name and e.content == root_content:
+ actual_status = "verified"
+ doc.freeDoc()
+ except libxml2.parserError:
+ actual_status = "not loaded"
+
+ if actual_status != exp_status:
+ print("Test '%s' failed: expect status '%s', actual '%s'" % (desc, exp_status, actual_status))
+ sys.exit(1)
+ elif actual_err != exp_err:
+ print("Test '%s' failed" % desc)
+ print("Expect errors:")
+ for s,m in exp_err: print(" [%2d] '%s'" % (s,m))
+ print("Actual errors:")
+ for s,m in actual_err: print(" [%2d] '%s'" % (s,m))
+ sys.exit(1)
+
+
+# Check that we cannot read custom schema without custom callback
+run_test(desc="Loading entity without custom callback",
+ docpath=startURL, catalog=None,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"py://strings/xml/sample.xml\"\n")
+ ])
+
+# Register handler and try to load the same entity
+libxml2.registerInputCallback(my_input_cb)
+run_test(desc="Loading entity with custom callback",
+ docpath=startURL, catalog=None,
+ exp_status="loaded", exp_err=[
+ (-1, "Attempt to load network entity http://example.com/dtds/sample.dtd"),
+ ( 4, "Entity 'sample.entity' not defined\n")
+ ])
+
+# Register a catalog (also accessible via pystr://) and retry
+run_test(desc="Loading entity with custom callback and catalog",
+ docpath=startURL, catalog=catURL)
+
+# Unregister custom callback when parser is already created
+run_test(desc="Loading entity and unregistering callback",
+ docpath=startURL, catalog=catURL,
+ test_callback=lambda: libxml2.popInputCallbacks(),
+ exp_status="loaded", exp_err=[
+ ( 3, "failed to load external entity \"py://strings/dtds/sample.dtd\"\n"),
+ ( 4, "Entity 'sample.entity' not defined\n")
+ ])
+
+# Try to load the document again
+run_test(desc="Retry loading document after unregistering callback",
+ docpath=startURL, catalog=catURL,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"py://strings/xml/sample.xml\"\n")
+ ])
+
+# But should be able to read standard I/O yet...
+run_test(desc="Loading using standard i/o after unregistering callback",
+ docpath="tst.xml", catalog=None,
+ root_name='doc', root_content='bar')
+
+# Now pop ALL input callbacks, should fail to load even standard I/O
+try:
+ while True:
+ libxml2.popInputCallbacks()
+except IndexError:
+ pass
+
+run_test(desc="Loading using standard i/o after unregistering all callbacks",
+ docpath="tst.xml", catalog=None,
+ exp_status="not loaded", exp_err=[
+ (-1, "I/O "),
+ (-1, "warning : "),
+ (-1, "failed to load external entity \"tst.xml\"\n")
+ ])
+
+print("OK")
+sys.exit(0);
diff --git a/python/tests/invalid.xml b/python/tests/invalid.xml
new file mode 100644
index 0000000..7c9b27e
--- /dev/null
+++ b/python/tests/invalid.xml
@@ -0,0 +1,6 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (a, b, a)>
+<!ELEMENT a EMPTY>
+<!ELEMENT b EMPTY>
+]>
+<doc><b/><a/><b/></doc>
diff --git a/python/tests/nsdel.py b/python/tests/nsdel.py
new file mode 100755
index 0000000..079399a
--- /dev/null
+++ b/python/tests/nsdel.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python -u
+#
+# this test exercise the XPath basic engine, parser, etc, and
+# allows to detect memory leaks
+#
+import sys
+import libxml2
+
+instance="""<?xml version="1.0"?>
+<tag xmlns:foo='urn:foo' xmlns:bar='urn:bar' xmlns:baz='urn:baz' />"""
+
+def namespaceDefs(node):
+ n = node.nsDefs()
+ while n:
+ yield n
+ n = n.next
+
+def checkNamespaceDefs(node, count):
+ nsList = list(namespaceDefs(node))
+ #print nsList
+ if len(nsList) != count :
+ raise Exception("Error: saw %d namespace declarations. Expected %d" % (len(nsList), count))
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+# Remove single namespace
+doc = libxml2.parseDoc(instance)
+node = doc.getRootElement()
+checkNamespaceDefs(node, 3)
+ns = node.removeNsDef('urn:bar')
+checkNamespaceDefs(node, 2)
+ns.freeNsList()
+doc.freeDoc()
+
+# Remove all namespaces
+doc = libxml2.parseDoc(instance)
+node = doc.getRootElement()
+checkNamespaceDefs(node, 3)
+ns = node.removeNsDef(None)
+checkNamespaceDefs(node, 0)
+ns.freeNsList()
+doc.freeDoc()
+
+# Remove a namespace refered to by a child
+doc = libxml2.newDoc("1.0")
+root = doc.newChild(None, "root", None)
+namespace = root.newNs("http://example.com/sample", "s")
+child = root.newChild(namespace, "child", None)
+root.removeNsDef("http://example.com/sample")
+doc.reconciliateNs(root)
+namespace.freeNsList()
+doc.serialize() # This should not segfault
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/outbuf.py b/python/tests/outbuf.py
new file mode 100755
index 0000000..62761cc
--- /dev/null
+++ b/python/tests/outbuf.py
@@ -0,0 +1,110 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+def testSimpleBufferWrites():
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, "ISO-8859-1")
+ buf.write(3, "foo")
+ buf.writeString("bar")
+ buf.close()
+
+ if f.getvalue() != "foobar":
+ print("Failed to save to StringIO")
+ sys.exit(1)
+
+def testSaveDocToBuffer():
+ """
+ Regression test for bug #154294.
+ """
+ input = '<foo>Hello</foo>'
+ expected = '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<foo>Hello</foo>
+'''
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ doc = libxml2.parseDoc(input)
+ doc.saveFileTo(buf, 'UTF-8')
+ doc.freeDoc()
+ if f.getvalue() != expected:
+ print('xmlDoc.saveFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+
+def testSaveFormattedDocToBuffer():
+ input = '<outer><inner>Some text</inner><inner/></outer>'
+ # The formatted and non-formatted versions of the output.
+ expected = ('''\
+<?xml version="1.0" encoding="UTF-8"?>
+<outer><inner>Some text</inner><inner/></outer>
+''', '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<outer>
+ <inner>Some text</inner>
+ <inner/>
+</outer>
+''')
+ doc = libxml2.parseDoc(input)
+ for i in (0, 1):
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ doc.saveFormatFileTo(buf, 'UTF-8', i)
+ if f.getvalue() != expected[i]:
+ print('xmlDoc.saveFormatFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected[i]))
+ sys.exit(1)
+ doc.freeDoc()
+
+def testSaveIntoOutputBuffer():
+ """
+ Similar to the previous two tests, except this time we invoke the save
+ methods on the output buffer object and pass in an XML node object.
+ """
+ input = '<foo>Hello</foo>'
+ expected = '''\
+<?xml version="1.0" encoding="UTF-8"?>
+<foo>Hello</foo>
+'''
+ f = str_io()
+ doc = libxml2.parseDoc(input)
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ buf.saveFileTo(doc, 'UTF-8')
+ if f.getvalue() != expected:
+ print('outputBuffer.saveFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+ f = str_io()
+ buf = libxml2.createOutputBuffer(f, 'UTF-8')
+ buf.saveFormatFileTo(doc, 'UTF-8', 1)
+ if f.getvalue() != expected:
+ print('outputBuffer.saveFormatFileTo() call failed.')
+ print(' got: %s' % repr(f.getvalue()))
+ print('expected: %s' % repr(expected))
+ sys.exit(1)
+ doc.freeDoc()
+
+if __name__ == '__main__':
+ # Memory debug specific
+ libxml2.debugMemory(1)
+
+ testSimpleBufferWrites()
+ testSaveDocToBuffer()
+ testSaveFormattedDocToBuffer()
+ testSaveIntoOutputBuffer()
+
+ libxml2.cleanupParser()
+ if libxml2.debugMemory(1) == 0:
+ print("OK")
+ else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/push.py b/python/tests/push.py
new file mode 100755
index 0000000..0edd61d
--- /dev/null
+++ b/python/tests/push.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
+ctxt.parseChunk("/>", 2, 1)
+doc = ctxt.doc()
+ctxt=None
+if doc.name != "test.xml":
+ print("document name error")
+ sys.exit(1)
+root = doc.children
+if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+doc.freeDoc()
+i = 10000
+while i > 0:
+ ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml")
+ ctxt.parseChunk("/>", 2, 1)
+ doc = ctxt.doc()
+ doc.freeDoc()
+ i = i -1
+ctxt=None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/pushSAX.py b/python/tests/pushSAX.py
new file mode 100755
index 0000000..48f6e82
--- /dev/null
+++ b/python/tests/pushSAX.py
@@ -0,0 +1,64 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml")
+chunk = " url='tst'>b"
+ctxt.parseChunk(chunk, len(chunk), 0)
+chunk = "ar</foo>"
+ctxt.parseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+reference = "startDocument:startElement foo {'url': 'tst'}:characters: bar:endElement foo:endDocument:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Exprected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/pushSAXhtml.py b/python/tests/pushSAXhtml.py
new file mode 100755
index 0000000..159d308
--- /dev/null
+++ b/python/tests/pushSAXhtml.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+ctxt = libxml2.htmlCreatePushParser(handler, "<foo", 4, "test.xml")
+chunk = " url='tst'>b"
+ctxt.htmlParseChunk(chunk, len(chunk), 0)
+chunk = "ar</foo>"
+ctxt.htmlParseChunk(chunk, len(chunk), 1)
+ctxt=None
+
+reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:error: Tag foo invalid
+:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
+if log != reference:
+ print("Error got: %s" % log)
+ print("Exprected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader.py b/python/tests/reader.py
new file mode 100755
index 0000000..173ce66
--- /dev/null
+++ b/python/tests/reader.py
@@ -0,0 +1,446 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+f = str_io("""<a><b b1="b1"/><c>content of c</c></a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test1")
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test1: Error reading the first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to second element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.IsEmptyElement() != 1 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 1:
+ print("test1: Error reading the second element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test1: Error reading the third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to text node")
+ sys.exit(1)
+if reader.Name() != "#text" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 3 or reader.HasAttributes() != 0 or \
+ reader.Value() != "content of c":
+ print("test1: Error reading the text node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to end of third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test1: Error reading the end of third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test1: Error reading to end of first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test1: Error reading the end of first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test1: Error reading to end of document")
+ sys.exit(1)
+
+#
+# example from the XmlTextReader docs
+#
+f = str_io("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test2")
+
+ret = reader.Read()
+if ret != 1:
+ print("Error reading test element")
+ sys.exit(1)
+if reader.GetAttributeNo(0) != "urn:datatypes" or \
+ reader.GetAttributeNo(1) != "int" or \
+ reader.GetAttributeNs("type", "urn:datatypes") != "int" or \
+ reader.GetAttribute("dt:type") != "int":
+ print("error reading test attributes")
+ sys.exit(1)
+
+#
+# example from the XmlTextReader docs
+#
+f = str_io("""<root xmlns:a="urn:456">
+<item>
+<ref href="a:b"/>
+</item>
+</root>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test3")
+
+ret = reader.Read()
+while ret == 1:
+ if reader.Name() == "ref":
+ if reader.LookupNamespace("a") != "urn:456":
+ print("error resolving namespace prefix")
+ sys.exit(1)
+ break
+ ret = reader.Read()
+if ret != 1:
+ print("Error finding the ref element")
+ sys.exit(1)
+
+#
+# Home made example for the various attribute access functions
+#
+f = str_io("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test4")
+ret = reader.Read()
+if ret != 1:
+ print("Error reading the testattr element")
+ sys.exit(1)
+#
+# Attribute exploration by index
+#
+if reader.MoveToAttributeNo(0) != 1:
+ print("Failed moveToAttribute(0)")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute(0)")
+ sys.exit(1)
+if reader.Name() != "xmlns":
+ print("Failed to read attribute(0) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(1) != 1:
+ print("Failed moveToAttribute(1)")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute(1)")
+ sys.exit(1)
+if reader.Name() != "xmlns:a":
+ print("Failed to read attribute(1) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(2) != 1:
+ print("Failed moveToAttribute(2)")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute(2)")
+ sys.exit(1)
+if reader.Name() != "b":
+ print("Failed to read attribute(2) name")
+ sys.exit(1)
+if reader.MoveToAttributeNo(3) != 1:
+ print("Failed moveToAttribute(3)")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute(3)")
+ sys.exit(1)
+if reader.Name() != "a:b":
+ print("Failed to read attribute(3) name")
+ sys.exit(1)
+#
+# Attribute exploration by name
+#
+if reader.MoveToAttribute("xmlns") != 1:
+ print("Failed moveToAttribute('xmlns')")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute('xmlns')")
+ sys.exit(1)
+if reader.MoveToAttribute("xmlns:a") != 1:
+ print("Failed moveToAttribute('xmlns')")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute('xmlns:a')")
+ sys.exit(1)
+if reader.MoveToAttribute("b") != 1:
+ print("Failed moveToAttribute('b')")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute('b')")
+ sys.exit(1)
+if reader.MoveToAttribute("a:b") != 1:
+ print("Failed moveToAttribute('a:b')")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute('a:b')")
+ sys.exit(1)
+if reader.MoveToAttributeNs("b", "urn:2") != 1:
+ print("Failed moveToAttribute('b', 'urn:2')")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute('b', 'urn:2')")
+ sys.exit(1)
+#
+# Go back and read in sequence
+#
+if reader.MoveToElement() != 1:
+ print("Failed to move back to element")
+ sys.exit(1)
+if reader.MoveToFirstAttribute() != 1:
+ print("Failed to move to first attribute")
+ sys.exit(1)
+if reader.Value() != "urn:1":
+ print("Failed to read attribute(0)")
+ sys.exit(1)
+if reader.Name() != "xmlns":
+ print("Failed to read attribute(0) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "urn:2":
+ print("Failed to read attribute(1)")
+ sys.exit(1)
+if reader.Name() != "xmlns:a":
+ print("Failed to read attribute(1) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "b":
+ print("Failed to read attribute(2)")
+ sys.exit(1)
+if reader.Name() != "b":
+ print("Failed to read attribute(2) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 1:
+ print("Failed to move to next attribute")
+ sys.exit(1)
+if reader.Value() != "a:b":
+ print("Failed to read attribute(3)")
+ sys.exit(1)
+if reader.Name() != "a:b":
+ print("Failed to read attribute(3) name")
+ sys.exit(1)
+if reader.MoveToNextAttribute() != 0:
+ print("Failed to detect last attribute")
+ sys.exit(1)
+
+
+#
+# a couple of tests for namespace nodes
+#
+f = str_io("""<a xmlns="http://example.com/foo"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test6")
+ret = reader.Read()
+if ret != 1:
+ print("test6: failed to Read()")
+ sys.exit(1)
+ret = reader.MoveToFirstAttribute()
+if ret != 1:
+ print("test6: failed to MoveToFirstAttribute()")
+ sys.exit(1)
+if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
+ reader.LocalName() != "xmlns" or reader.Name() != "xmlns" or \
+ reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
+ print("test6: failed to read the namespace node")
+ sys.exit(1)
+
+f = str_io("""<a xmlns:prefix="http://example.com/foo"/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test7")
+ret = reader.Read()
+if ret != 1:
+ print("test7: failed to Read()")
+ sys.exit(1)
+ret = reader.MoveToFirstAttribute()
+if ret != 1:
+ print("test7: failed to MoveToFirstAttribute()")
+ sys.exit(1)
+if reader.NamespaceUri() != "http://www.w3.org/2000/xmlns/" or \
+ reader.LocalName() != "prefix" or reader.Name() != "xmlns:prefix" or \
+ reader.Value() != "http://example.com/foo" or reader.NodeType() != 2:
+ print("test7: failed to read the namespace node")
+ sys.exit(1)
+
+#
+# Test for a limit case:
+#
+f = str_io("""<a/>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test8")
+ret = reader.Read()
+if ret != 1:
+ print("test8: failed to read the node")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 1:
+ print("test8: failed to analyze the node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test8: failed to detect the EOF")
+ sys.exit(1)
+
+#
+# Another test provided by Stéphane Bidoul and checked with C#
+#
+def tst_reader(s):
+ f = str_io(s)
+ input = libxml2.inputBuffer(f)
+ reader = input.newTextReader("tst")
+ res = ""
+ while reader.Read():
+ res=res + "%s (%s) [%s] %d %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Value(), reader.IsEmptyElement(),
+ reader.Depth())
+ if reader.NodeType() == 1: # Element
+ while reader.MoveToNextAttribute():
+ res = res + "-- %s (%s) [%s] %d %d\n" % (reader.NodeType(),
+ reader.Name(),reader.Value(),
+ reader.IsEmptyElement(), reader.Depth())
+ return res
+
+doc="""<a><b b1="b1"/><c>content of c</c></a>"""
+expect="""1 (a) [None] 0 0
+1 (b) [None] 1 1
+-- 2 (b1) [b1] 0 2
+1 (c) [None] 0 1
+3 (#text) [content of c] 0 2
+15 (c) [None] 0 1
+15 (a) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test5 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><b/><c/></test>"""
+expect="""1 (test) [None] 0 0
+1 (b) [None] 1 1
+1 (c) [None] 1 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test9 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<a><b>bbb</b><c>ccc</c></a>"""
+expect="""1 (a) [None] 0 0
+1 (b) [None] 0 1
+3 (#text) [bbb] 0 2
+15 (b) [None] 0 1
+1 (c) [None] 0 1
+3 (#text) [ccc] 0 2
+15 (c) [None] 0 1
+15 (a) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test10 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test a="a"/>"""
+expect="""1 (test) [None] 1 0
+-- 2 (a) [a] 0 1
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test11 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><a>aaa</a><b/></test>"""
+expect="""1 (test) [None] 0 0
+1 (a) [None] 0 1
+3 (#text) [aaa] 0 2
+15 (a) [None] 0 1
+1 (b) [None] 1 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test12 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<test><p></p></test>"""
+expect="""1 (test) [None] 0 0
+1 (p) [None] 0 1
+15 (p) [None] 0 1
+15 (test) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test13 failed")
+ print(res)
+ sys.exit(1)
+
+doc="""<p></p>"""
+expect="""1 (p) [None] 0 0
+15 (p) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test14 failed")
+ print(res)
+ sys.exit(1)
+
+#
+# test from bug #108801
+#
+doc="""<?xml version="1.0" standalone="no"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+
+<article>
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+</article>
+"""
+expect="""10 (article) [None] 0 0
+1 (article) [None] 0 0
+3 (#text) [
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+] 0 1
+15 (article) [None] 0 0
+"""
+res = tst_reader(doc)
+if res != expect:
+ print("test15 failed")
+ print(res)
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader2.py b/python/tests/reader2.py
new file mode 100755
index 0000000..8570575
--- /dev/null
+++ b/python/tests/reader2.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python -u
+#
+# this tests the DTD validation with the XmlTextReader interface
+#
+import sys
+import glob
+import string
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+err=""
+expect="""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version
+</rss>
+ ^
+../../test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined
+ <p><termdef id="dt-arc" term="Arc">An <ter
+ ^
+../../test/valid/xlink.xml:530: validity error : attribute def line 199 references an unknown ID "dt-xlg"
+
+^
+"""
+def callback(ctx, str):
+ global err
+ err = err + "%s" % (str)
+libxml2.registerErrorHandler(callback, "")
+
+valid_files = glob.glob("../../test/valid/*.x*")
+valid_files.sort()
+for file in valid_files:
+ if file.find("t8") != -1:
+ continue
+ if file == "../../test/valid/rss.xml":
+ continue
+ if file == "../../test/valid/xlink.xml":
+ continue
+ reader = libxml2.newTextReaderFilename(file)
+ #print "%s:" % (file)
+ reader.SetParserProp(libxml2.PARSER_VALIDATE, 1)
+ ret = reader.Read()
+ while ret == 1:
+ ret = reader.Read()
+ if ret != 0:
+ print("Error parsing and validating %s" % (file))
+ #sys.exit(1)
+
+if err != expect:
+ print(err)
+
+#
+# another separate test based on Stephane Bidoul one
+#
+s = """
+<!DOCTYPE test [
+<!ELEMENT test (x,b)>
+<!ELEMENT x (c)>
+<!ELEMENT b (#PCDATA)>
+<!ELEMENT c (#PCDATA)>
+<!ENTITY x "<x><c>xxx</c></x>">
+]>
+<test>
+ &x;
+ <b>bbb</b>
+</test>
+"""
+expect="""10,test
+1,test
+14,#text
+1,x
+1,c
+3,#text
+15,c
+15,x
+14,#text
+1,b
+3,#text
+15,b
+14,#text
+15,test
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test2")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s,%s\n" % (reader.NodeType(),reader.Name())
+
+if res != expect:
+ print("test2 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test2 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# Another test for external entity parsing and validation
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x)>
+<!ELEMENT x (#PCDATA)>
+<!ENTITY e SYSTEM "tst.ent">
+]>
+<test>
+ &e;
+</test>
+"""
+tst_ent = """<x>hello</x>"""
+expect="""10 test
+1 test
+14 #text
+1 x
+3 #text
+15 x
+14 #text
+15 test
+"""
+res=""
+
+def myResolver(URL, ID, ctxt):
+ if URL == "tst.ent":
+ return(str_io(tst_ent))
+ return None
+
+libxml2.setEntityLoader(myResolver)
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test3")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s\n" % (reader.NodeType(),reader.Name())
+
+if res != expect:
+ print("test3 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test3 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# Another test for recursive entity parsing, validation, and replacement of
+# entities, making sure the entity ref node doesn't show up in that case
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x, x)>
+<!ELEMENT x (y)>
+<!ELEMENT y (#PCDATA)>
+<!ENTITY x "<x>&y;</x>">
+<!ENTITY y "<y>yyy</y>">
+]>
+<test>
+ &x;
+ &x;
+</test>"""
+expect="""10 test 0
+1 test 0
+14 #text 1
+1 x 1
+1 y 2
+3 #text 3
+15 y 2
+15 x 1
+14 #text 1
+1 x 1
+1 y 2
+3 #text 3
+15 y 2
+15 x 1
+14 #text 1
+15 test 0
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test4")
+reader.SetParserProp(libxml2.PARSER_LOADDTD,1)
+reader.SetParserProp(libxml2.PARSER_DEFAULTATTRS,1)
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
+
+if res != expect:
+ print("test4 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+if err != "":
+ print("test4 failed: validation error found")
+ print(err)
+ sys.exit(1)
+
+#
+# The same test but without entity substitution this time
+#
+
+s = """<!DOCTYPE test [
+<!ELEMENT test (x, x)>
+<!ELEMENT x (y)>
+<!ELEMENT y (#PCDATA)>
+<!ENTITY x "<x>&y;</x>">
+<!ENTITY y "<y>yyy</y>">
+]>
+<test>
+ &x;
+ &x;
+</test>"""
+expect="""10 test 0
+1 test 0
+14 #text 1
+5 x 1
+14 #text 1
+5 x 1
+14 #text 1
+15 test 0
+"""
+res=""
+err=""
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test5")
+reader.SetParserProp(libxml2.PARSER_VALIDATE,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d\n" % (reader.NodeType(),reader.Name(),reader.Depth())
+
+if res != expect:
+ print("test5 failed: unexpected output")
+ print(res)
+if err != "":
+ print("test5 failed: validation error found")
+ print(err)
+
+#
+# cleanup
+#
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader3.py b/python/tests/reader3.py
new file mode 100755
index 0000000..4302b6c
--- /dev/null
+++ b/python/tests/reader3.py
@@ -0,0 +1,160 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+docstr="""<?xml version='1.0'?>
+<!DOCTYPE doc [
+<!ENTITY tst "<p>test</p>">
+]>
+<doc>&tst;</doc>"""
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# First test, normal don't substitute entities.
+#
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_noent")
+ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() == "doc" or reader.NodeType() == 10:
+ ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 1:
+ print("test_normal: Error reading the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_normal: Error reading to the entity")
+ sys.exit(1)
+if reader.Name() != "tst" or reader.NodeType() != 5:
+ print("test_normal: Error reading the entity")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_normal: Error reading to the end of root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 15:
+ print("test_normal: Error reading the end of the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_normal: Error detecting the end")
+ sys.exit(1)
+
+#
+# Second test, completely substitute the entities.
+#
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_noent")
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES, 1)
+ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() == "doc" or reader.NodeType() == 10:
+ ret = reader.Read()
+if ret != 1:
+ print("Error reading to root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 1:
+ print("test_noent: Error reading the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the entity content")
+ sys.exit(1)
+if reader.Name() != "p" or reader.NodeType() != 1:
+ print("test_noent: Error reading the p element from entity")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the text node")
+ sys.exit(1)
+if reader.NodeType() != 3 or reader.Value() != "test":
+ print("test_noent: Error reading the text node")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the end of p element")
+ sys.exit(1)
+if reader.Name() != "p" or reader.NodeType() != 15:
+ print("test_noent: Error reading the end of the p element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_noent: Error reading to the end of root")
+ sys.exit(1)
+if reader.Name() != "doc" or reader.NodeType() != 15:
+ print("test_noent: Error reading the end of the root element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_noent: Error detecting the end")
+ sys.exit(1)
+
+#
+# third test, crazy stuff about empty element in external parsed entities
+#
+s = """<!DOCTYPE struct [
+<!ENTITY simplestruct2.ent SYSTEM "simplestruct2.ent">
+]>
+<struct>&simplestruct2.ent;</struct>
+"""
+expect="""10 struct 0 0
+1 struct 0 0
+1 descr 1 1
+15 struct 0 0
+"""
+res=""
+simplestruct2_ent="""<descr/>"""
+
+def myResolver(URL, ID, ctxt):
+ if URL == "simplestruct2.ent":
+ return(str_io(simplestruct2_ent))
+ return None
+
+libxml2.setEntityLoader(myResolver)
+
+input = libxml2.inputBuffer(str_io(s))
+reader = input.newTextReader("test3")
+reader.SetParserProp(libxml2.PARSER_SUBST_ENTITIES,1)
+while reader.Read() == 1:
+ res = res + "%s %s %d %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Depth(),reader.IsEmptyElement())
+
+if res != expect:
+ print("test3 failed: unexpected output")
+ print(res)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader4.py b/python/tests/reader4.py
new file mode 100755
index 0000000..0bb3e3f
--- /dev/null
+++ b/python/tests/reader4.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python -u
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def tst_reader(s):
+ f = str_io(s)
+ input = libxml2.inputBuffer(f)
+ reader = input.newTextReader("tst")
+ res = ""
+ while reader.Read():
+ res=res + "%s (%s) [%s] %d\n" % (reader.NodeType(),reader.Name(),
+ reader.Value(), reader.IsEmptyElement())
+ if reader.NodeType() == 1: # Element
+ while reader.MoveToNextAttribute():
+ res = res + "-- %s (%s) [%s]\n" % (reader.NodeType(),
+ reader.Name(),reader.Value())
+ return res
+
+expect="""1 (test) [None] 0
+1 (b) [None] 1
+1 (c) [None] 1
+15 (test) [None] 0
+"""
+
+res = tst_reader("""<test><b/><c/></test>""")
+
+if res != expect:
+ print("Did not get the expected error message:")
+ print(res)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader5.py b/python/tests/reader5.py
new file mode 100755
index 0000000..82d0dae
--- /dev/null
+++ b/python/tests/reader5.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python -u
+#
+# this tests the Expand() API of the xmlTextReader interface
+# this extract the Dragon bibliography entries from the XML specification
+#
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""<bibl id="Aho" key="Aho/Ullman">Aho, Alfred V.,
+Ravi Sethi, and Jeffrey D. Ullman.
+<emph>Compilers: Principles, Techniques, and Tools</emph>.
+Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>"""
+
+f = open('../../test/valid/REC-xml-19980210.xml', 'rb')
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("REC")
+res=""
+while reader.Read() > 0:
+ while reader.Name() == 'bibl':
+ node = reader.Expand() # expand the subtree
+ if node.xpathEval("@id = 'Aho'"): # use XPath on it
+ res = res + node.serialize()
+ if reader.Next() != 1: # skip the subtree
+ break;
+
+if res != expect:
+ print("Error: didn't get the expected output")
+ print("got '%s'" % (res))
+ print("expected '%s'" % (expect))
+
+
+#
+# cleanup
+#
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader6.py b/python/tests/reader6.py
new file mode 100755
index 0000000..ef33b18
--- /dev/null
+++ b/python/tests/reader6.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+schema="""<element name="foo" xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <oneOrMore>
+ <element name="label">
+ <text/>
+ </element>
+ <optional>
+ <element name="opt">
+ <empty/>
+ </element>
+ </optional>
+ <element name="item">
+ <data type="byte"/>
+ </element>
+ </oneOrMore>
+</element>
+"""
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Parse the Relax NG Schemas
+#
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+del rngp
+
+#
+# Parse and validate the correct document
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("correct")
+reader.RelaxNGSetSchema(rngs)
+ret = reader.Read()
+while ret == 1:
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document")
+ sys.exit(1)
+
+if reader.IsValid() != 1:
+ print("Document failed to validate")
+ sys.exit(1)
+
+#
+# Parse and validate the incorrect document
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+
+err=""
+# RNG errors are not as good as before , TODO
+#expect="""RNG validity error: file error line 3 element text
+#Type byte doesn't allow value '1000'
+#RNG validity error: file error line 3 element text
+#Error validating datatype byte
+#RNG validity error: file error line 3 element text
+#Element item failed to validate content
+#"""
+expect="""Type byte doesn't allow value '1000'
+Error validating datatype byte
+Element item failed to validate content
+"""
+
+def callback(ctx, str):
+ global err
+ err = err + "%s" % (str)
+libxml2.registerErrorHandler(callback, "")
+
+f = str_io(docstr)
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("error")
+reader.RelaxNGSetSchema(rngs)
+ret = reader.Read()
+while ret == 1:
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document")
+ sys.exit(1)
+
+if reader.IsValid() != 0:
+ print("Document failed to detect the validation error")
+ sys.exit(1)
+
+if err != expect:
+ print("Did not get the expected error message:")
+ print(err)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del f
+del input
+del reader
+del rngs
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader7.py b/python/tests/reader7.py
new file mode 100755
index 0000000..c88e370
--- /dev/null
+++ b/python/tests/reader7.py
@@ -0,0 +1,101 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+result = ""
+def processNode(reader):
+ global result
+
+ result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement())
+
+#
+# Parse a document testing the readerForxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader = libxml2.readerForDoc(docstr, "test1", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test1")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test1")
+ print(result)
+ sys.exit(1)
+
+#
+# Reuse the reader for another document testing the ReaderNewxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader.NewDoc(docstr, "test2", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test2")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test2")
+ print(result)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/reader8.py b/python/tests/reader8.py
new file mode 100755
index 0000000..de2dcd6
--- /dev/null
+++ b/python/tests/reader8.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Parse a document testing the Close() API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+
+reader = libxml2.readerForDoc(docstr, "test1", None, 0)
+ret = reader.Read()
+ret = reader.Read()
+ret = reader.Close()
+
+if ret != 0:
+ print("Error closing the document test1")
+ sys.exit(1)
+
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/readererr.py b/python/tests/readererr.py
new file mode 100755
index 0000000..c8ceba5
--- /dev/null
+++ b/python/tests/readererr.py
@@ -0,0 +1,56 @@
+#!/usr/bin/python -u
+#
+# this tests the basic APIs of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+expect="""--> (3) test1:1:xmlns: URI foo is not absolute
+--> (4) test1:1:Opening and ending tag mismatch: c line 1 and a
+"""
+err=""
+def myErrorHandler(arg,msg,severity,locator):
+ global err
+ err = err + "%s (%d) %s:%d:%s" % (arg,severity,locator.BaseURI(),locator.LineNumber(),msg)
+
+f = str_io("""<a xmlns="foo"><b b1="b1"/><c>content of c</a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test1")
+reader.SetErrorHandler(myErrorHandler,"-->")
+while reader.Read() == 1:
+ pass
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+reader.SetErrorHandler(None,None)
+if reader.GetErrorHandler() != (None,None):
+ print("GetErrorHandler failed")
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/readernext.py b/python/tests/readernext.py
new file mode 100755
index 0000000..fcb9ae3
--- /dev/null
+++ b/python/tests/readernext.py
@@ -0,0 +1,86 @@
+#!/usr/bin/python -u
+# -*- coding: ISO-8859-1 -*-
+#
+# this tests the next API of the XmlTextReader interface
+#
+import libxml2
+import sys
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+f = str_io("""<a><b><c /></b><d>content of d</d></a>""")
+input = libxml2.inputBuffer(f)
+reader = input.newTextReader("test_next")
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to second element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the second element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to third element")
+ sys.exit(1)
+if reader.Name() != "c" or reader.NodeType() != 1 or \
+ reader.HasAttributes() != 0:
+ print("test_next: Error reading the third element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 1:
+ print("test_next: Error reading to end of third element")
+ sys.exit(1)
+if reader.Name() != "b" or reader.NodeType() != 15:
+ print("test_next: Error reading to end of second element")
+ sys.exit(1)
+ret = reader.Next()
+if ret != 1:
+ print("test_next: Error moving to third element")
+ sys.exit(1)
+if reader.Name() != "d" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 1 or reader.HasAttributes() != 0:
+ print("test_next: Error reading third element")
+ sys.exit(1)
+ret = reader.Next()
+if ret != 1:
+ print("test_next: Error reading to end of first element")
+ sys.exit(1)
+if reader.Name() != "a" or reader.IsEmptyElement() != 0 or \
+ reader.NodeType() != 15 or reader.HasAttributes() != 0:
+ print("test_next: Error reading the end of first element")
+ sys.exit(1)
+ret = reader.Read()
+if ret != 0:
+ print("test_next: Error reading to end of document")
+ sys.exit(1)
+
+#
+# cleanup for memory allocation counting
+#
+del f
+del input
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/regexp.py b/python/tests/regexp.py
new file mode 100755
index 0000000..a03e459
--- /dev/null
+++ b/python/tests/regexp.py
@@ -0,0 +1,32 @@
+#!/usr/bin/python -u
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+re = libxml2.regexpCompile("a|b")
+if re.regexpExec("a") != 1:
+ print("error checking 'a'")
+ sys.exit(1)
+if re.regexpExec("b") != 1:
+ print("error checking 'b'")
+ sys.exit(1)
+if re.regexpExec("ab") != 0:
+ print("error checking 'ab'")
+ sys.exit(1)
+if re.regexpExec("") != 0:
+ print("error checking 'ab'")
+ sys.exit(1)
+if re.regexpIsDeterminist() != 1:
+ print("error checking determinism")
+ sys.exit(1)
+del re
+
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/relaxng.py b/python/tests/relaxng.py
new file mode 100755
index 0000000..fa3d327
--- /dev/null
+++ b/python/tests/relaxng.py
@@ -0,0 +1,48 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0"?>
+<element name="foo"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/annotation/1.0"
+ xmlns:ex1="http://www.example.com/n1"
+ xmlns:ex2="http://www.example.com/n2">
+ <a:documentation>A foo element.</a:documentation>
+ <element name="ex1:bar1">
+ <empty/>
+ </element>
+ <element name="ex2:bar2">
+ <empty/>
+ </element>
+</element>
+"""
+instance="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+ctxt = rngs.relaxNGNewValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret != 0:
+ print("error doing RelaxNG validation")
+ sys.exit(1)
+
+doc.freeDoc()
+del rngp
+del rngs
+del ctxt
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/resolver.py b/python/tests/resolver.py
new file mode 100755
index 0000000..6f21f52
--- /dev/null
+++ b/python/tests/resolver.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+try:
+ import StringIO
+ str_io = StringIO.StringIO
+except:
+ import io
+ str_io = io.StringIO
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def myResolver(URL, ID, ctxt):
+ return(str_io("<foo/>"))
+
+libxml2.setEntityLoader(myResolver)
+
+doc = libxml2.parseFile("doesnotexist.xml")
+root = doc.children
+if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 0
+while i < 5000:
+ doc = libxml2.parseFile("doesnotexist.xml")
+ root = doc.children
+ if root.name != "foo":
+ print("root element name error")
+ sys.exit(1)
+ doc.freeDoc()
+ i = i + 1
+
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/schema.py b/python/tests/schema.py
new file mode 100755
index 0000000..8089272
--- /dev/null
+++ b/python/tests/schema.py
@@ -0,0 +1,52 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0" encoding="iso-8859-1"?>
+<schema xmlns = "http://www.w3.org/2001/XMLSchema">
+ <element name = "Customer">
+ <complexType>
+ <sequence>
+ <element name = "FirstName" type = "string" />
+ <element name = "MiddleInitial" type = "string" />
+ <element name = "LastName" type = "string" />
+ </sequence>
+ <attribute name = "customerID" type = "integer" />
+ </complexType>
+ </element>
+</schema>"""
+
+instance="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <FirstName>Raymond</FirstName>
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
+ctxt_schema = ctxt_parser.schemaParse()
+ctxt_valid = ctxt_schema.schemaNewValidCtxt()
+doc = libxml2.parseDoc(instance)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret != 0:
+ print("error doing schema validation")
+ sys.exit(1)
+
+doc.freeDoc()
+del ctxt_parser
+del ctxt_schema
+del ctxt_valid
+libxml2.schemaCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/serialize.py b/python/tests/serialize.py
new file mode 100755
index 0000000..80b901a
--- /dev/null
+++ b/python/tests/serialize.py
@@ -0,0 +1,150 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+#
+# Testing XML document serialization
+#
+doc = libxml2.parseDoc("""<root><foo>hello</foo></root>""")
+str = doc.serialize()
+if str != """<?xml version="1.0"?>
+<root><foo>hello</foo></root>
+""":
+ print("error serializing XML document 1")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1")
+if str != """<?xml version="1.0" encoding="iso-8859-1"?>
+<root><foo>hello</foo></root>
+""":
+ print("error serializing XML document 2")
+ sys.exit(1)
+str = doc.serialize(format=1)
+if str != """<?xml version="1.0"?>
+<root>
+ <foo>hello</foo>
+</root>
+""":
+ print("error serializing XML document 3")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1", 1)
+if str != """<?xml version="1.0" encoding="iso-8859-1"?>
+<root>
+ <foo>hello</foo>
+</root>
+""":
+ print("error serializing XML document 4")
+ sys.exit(1)
+
+#
+# Test serializing a subnode
+#
+root = doc.getRootElement()
+str = root.serialize()
+if str != """<root><foo>hello</foo></root>""":
+ print("error serializing XML root 1")
+ sys.exit(1)
+str = root.serialize("iso-8859-1")
+if str != """<root><foo>hello</foo></root>""":
+ print("error serializing XML root 2")
+ sys.exit(1)
+str = root.serialize(format=1)
+if str != """<root>
+ <foo>hello</foo>
+</root>""":
+ print("error serializing XML root 3")
+ sys.exit(1)
+str = root.serialize("iso-8859-1", 1)
+if str != """<root>
+ <foo>hello</foo>
+</root>""":
+ print("error serializing XML root 4")
+ sys.exit(1)
+doc.freeDoc()
+
+#
+# Testing HTML document serialization
+#
+doc = libxml2.htmlParseDoc("""<html><head><title>Hello</title><body><p>hello</body></html>""", None)
+str = doc.serialize()
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><title>Hello</title></head><body><p>hello</p></body></html>
+""":
+ print("error serializing HTML document 1")
+ sys.exit(1)
+str = doc.serialize("ISO-8859-1")
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>
+""":
+ print("error serializing HTML document 2")
+ sys.exit(1)
+str = doc.serialize(format=1)
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>
+""":
+ print("error serializing HTML document 3")
+ sys.exit(1)
+str = doc.serialize("iso-8859-1", 1)
+if str != """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>
+""":
+ print("error serializing HTML document 4")
+ sys.exit(1)
+
+#
+# Test serializing a subnode
+#
+doc.htmlSetMetaEncoding(None)
+root = doc.getRootElement()
+str = root.serialize()
+if str != """<html><head><title>Hello</title></head><body><p>hello</p></body></html>""":
+ print("error serializing HTML root 1")
+ sys.exit(1)
+str = root.serialize("ISO-8859-1")
+if str != """<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Hello</title></head><body><p>hello</p></body></html>""":
+ print("error serializing HTML root 2")
+ sys.exit(1)
+str = root.serialize(format=1)
+if str != """<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>""":
+ print("error serializing HTML root 3")
+ sys.exit(1)
+str = root.serialize("iso-8859-1", 1)
+if str != """<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Hello</title>
+</head>
+<body><p>hello</p></body>
+</html>""":
+ print("error serializing HTML root 4")
+ sys.exit(1)
+
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/sync.py b/python/tests/sync.py
new file mode 100755
index 0000000..5a8609e
--- /dev/null
+++ b/python/tests/sync.py
@@ -0,0 +1,138 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+log = ""
+
+class callback:
+ def startDocument(self):
+ global log
+ log = log + "startDocument:"
+
+ def endDocument(self):
+ global log
+ log = log + "endDocument:"
+
+ def startElement(self, tag, attrs):
+ global log
+ log = log + "startElement %s %s:" % (tag, attrs)
+
+ def endElement(self, tag):
+ global log
+ log = log + "endElement %s:" % (tag)
+
+ def characters(self, data):
+ global log
+ log = log + "characters: %s:" % (data)
+
+ def warning(self, msg):
+ global log
+ log = log + "warning: %s:" % (msg)
+
+ def error(self, msg):
+ global log
+ log = log + "error: %s:" % (msg)
+
+ def fatalError(self, msg):
+ global log
+ log = log + "fatalError: %s:" % (msg)
+
+handler = callback()
+
+log=""
+chunk="""<foo><bar2/>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2></bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:endElement bar2:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:startElement bar2 None:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' />"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:endElement bar2:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' >"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="1" b='2' ></bar2>"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference1 = "startDocument:startElement foo None:startElement bar2 {'a': '1', 'b': '2'}:endElement bar2:"
+reference2 = "startDocument:startElement foo None:startElement bar2 {'b': '2', 'a': '1'}:endElement bar2:"
+if log not in (reference1, reference2):
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+log=""
+chunk="""<foo><bar2 a="b='1' />"""
+ctxt = libxml2.createPushParser(handler, None, 0, "test.xml")
+ctxt.parseChunk(chunk, len(chunk), 0)
+ctxt=None
+
+reference = "startDocument:startElement foo None:"
+if log != reference:
+ print("Error got: %s" % log)
+ print("Expected: %s" % reference)
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/test.dtd b/python/tests/test.dtd
new file mode 100644
index 0000000..b61b438
--- /dev/null
+++ b/python/tests/test.dtd
@@ -0,0 +1 @@
+<!ELEMENT foo EMPTY>
diff --git a/python/tests/thread2.py b/python/tests/thread2.py
new file mode 100755
index 0000000..2749eb0
--- /dev/null
+++ b/python/tests/thread2.py
@@ -0,0 +1,99 @@
+#!/usr/bin/python -u
+import string, sys, time
+try:
+ from _thread import get_ident
+except:
+ from thread import get_ident
+from threading import Thread, Lock
+
+import libxml2
+
+THREADS_COUNT = 15
+
+failed = 0
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+ self.lock = Lock()
+
+ def handler(self,ctx,str):
+ self.lock.acquire()
+ self.errors.append(str)
+ self.lock.release()
+
+def getLineNumbersDefault():
+ old = libxml2.lineNumbersDefault(0)
+ libxml2.lineNumbersDefault(old)
+ return old
+
+def test(expectedLineNumbersDefault):
+ time.sleep(1)
+ global failed
+ # check a per thread-global
+ if expectedLineNumbersDefault != getLineNumbersDefault():
+ failed = 1
+ print("FAILED to obtain correct value for " \
+ "lineNumbersDefault in thread %d" % get_ident())
+ # check ther global error handler
+ # (which is NOT per-thread in the python bindings)
+ try:
+ doc = libxml2.parseFile("bad.xml")
+ except:
+ pass
+ else:
+ assert "failed"
+
+# global error handler
+eh = ErrorHandler()
+libxml2.registerErrorHandler(eh.handler,"")
+
+# set on the main thread only
+libxml2.lineNumbersDefault(1)
+test(1)
+ec = len(eh.errors)
+if ec == 0:
+ print("FAILED: should have obtained errors")
+ sys.exit(1)
+
+ts = []
+for i in range(THREADS_COUNT):
+ # expect 0 for lineNumbersDefault because
+ # the new value has been set on the main thread only
+ ts.append(Thread(target=test,args=(0,)))
+for t in ts:
+ t.start()
+for t in ts:
+ t.join()
+
+if len(eh.errors) != ec+THREADS_COUNT*ec:
+ print("FAILED: did not obtain the correct number of errors")
+ sys.exit(1)
+
+# set lineNumbersDefault for future new threads
+libxml2.thrDefLineNumbersDefaultValue(1)
+ts = []
+for i in range(THREADS_COUNT):
+ # expect 1 for lineNumbersDefault
+ ts.append(Thread(target=test,args=(1,)))
+for t in ts:
+ t.start()
+for t in ts:
+ t.join()
+
+if len(eh.errors) != ec+THREADS_COUNT*ec*2:
+ print("FAILED: did not obtain the correct number of errors")
+ sys.exit(1)
+
+if failed:
+ print("FAILED")
+ sys.exit(1)
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/tst.py b/python/tests/tst.py
new file mode 100755
index 0000000..57a7318
--- /dev/null
+++ b/python/tests/tst.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+child = root.children
+if child.name != "foo":
+ print("child.name failed")
+ sys.exit(1)
+doc.freeDoc()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/tst.xml b/python/tests/tst.xml
new file mode 100644
index 0000000..751d46d
--- /dev/null
+++ b/python/tests/tst.xml
@@ -0,0 +1 @@
+<doc><foo>bar</foo></doc>
diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
new file mode 100755
index 0000000..d5f9be7
--- /dev/null
+++ b/python/tests/tstLastError.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python -u
+import sys, unittest
+
+import libxml2
+
+class TestCase(unittest.TestCase):
+
+ def runTest(self):
+ self.test1()
+ self.test2()
+
+ def setUp(self):
+ libxml2.debugMemory(1)
+
+ def tearDown(self):
+ libxml2.cleanupParser()
+ if libxml2.debugMemory(1) != 0:
+ libxml2.dumpMemory()
+ self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
+ else:
+ print("OK")
+
+ def failUnlessXmlError(self,f,args,exc,domain,code,message,level,file,line):
+ """Run function f, with arguments args and expect an exception exc;
+ when the exception is raised, check the libxml2.lastError for
+ expected values."""
+ # disable the default error handler
+ libxml2.registerErrorHandler(None,None)
+ try:
+ f(*args)
+ except exc:
+ e = libxml2.lastError()
+ if e is None:
+ self.fail("lastError not set")
+ if 0:
+ print("domain = ",e.domain())
+ print("code = ",e.code())
+ print("message =",repr(e.message()))
+ print("level =",e.level())
+ print("file =",e.file())
+ print("line =",e.line())
+ print()
+ self.failUnlessEqual(domain,e.domain())
+ self.failUnlessEqual(code,e.code())
+ self.failUnlessEqual(message,e.message())
+ self.failUnlessEqual(level,e.level())
+ self.failUnlessEqual(file,e.file())
+ self.failUnlessEqual(line,e.line())
+ else:
+ self.fail("exception %s should have been raised" % exc)
+
+ def test1(self):
+ """Test readFile with a file that does not exist"""
+ self.failUnlessXmlError(libxml2.readFile,
+ ("dummy.xml",None,0),
+ libxml2.treeError,
+ domain=libxml2.XML_FROM_IO,
+ code=libxml2.XML_IO_LOAD_ERROR,
+ message='failed to load external entity "dummy.xml"\n',
+ level=libxml2.XML_ERR_WARNING,
+ file=None,
+ line=0)
+
+ def test2(self):
+ """Test a well-formedness error: we get the last error only"""
+ s = "<x>\n<a>\n</x>"
+ self.failUnlessXmlError(libxml2.readMemory,
+ (s,len(s),"dummy.xml",None,0),
+ libxml2.treeError,
+ domain=libxml2.XML_FROM_PARSER,
+ code=libxml2.XML_ERR_TAG_NOT_FINISHED,
+ message='Premature end of data in tag x line 1\n',
+ level=libxml2.XML_ERR_FATAL,
+ file='dummy.xml',
+ line=3)
+
+if __name__ == "__main__":
+ test = TestCase()
+ test.setUp()
+ test.test1()
+ test.test2()
+ test.tearDown()
diff --git a/python/tests/tstURI.py b/python/tests/tstURI.py
new file mode 100755
index 0000000..e4d58af
--- /dev/null
+++ b/python/tests/tstURI.py
@@ -0,0 +1,41 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+uri = libxml2.parseURI("http://example.org:8088/foo/bar?query=simple#fragid")
+if uri.scheme() != 'http':
+ print("Error parsing URI: wrong scheme")
+ sys.exit(1)
+if uri.server() != 'example.org':
+ print("Error parsing URI: wrong server")
+ sys.exit(1)
+if uri.port() != 8088:
+ print("Error parsing URI: wrong port")
+ sys.exit(1)
+if uri.path() != '/foo/bar':
+ print("Error parsing URI: wrong path")
+ sys.exit(1)
+if uri.query() != 'query=simple':
+ print("Error parsing URI: wrong query")
+ sys.exit(1)
+if uri.fragment() != 'fragid':
+ print("Error parsing URI: wrong query")
+ sys.exit(1)
+uri.setScheme("https")
+uri.setPort(223)
+uri.setFragment(None)
+result=uri.saveUri()
+if result != "https://example.org:223/foo/bar?query=simple":
+ print("Error modifying or saving the URI")
+uri = None
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/tstmem.py b/python/tests/tstmem.py
new file mode 100755
index 0000000..6b34cf3
--- /dev/null
+++ b/python/tests/tstmem.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python -u
+import libxml2
+import libxml2mod
+import sys
+
+def error(msg, data):
+ pass
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+instance="""<?xml version="1.0"?>
+<foo></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+libxml2mod.xmlSetValidErrors(ctxt._o, error, error)
+doc = libxml2.parseDoc(instance)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1:
+ print("error doing DTD validation")
+ sys.exit(1)
+
+doc.freeDoc()
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/tstxpath.py b/python/tests/tstxpath.py
new file mode 100755
index 0000000..0ba5a6d
--- /dev/null
+++ b/python/tests/tstxpath.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+#memory debug specific
+libxml2.debugMemory(1)
+
+called = ""
+
+def foo(ctx, x):
+ global called
+
+ #
+ # test that access to the XPath evaluation contexts
+ #
+ pctxt = libxml2.xpathParserContext(_obj=ctx)
+ ctxt = pctxt.context()
+ called = ctxt.function()
+ return x + 1
+
+def bar(ctxt, x):
+ return "%d" % (x + 2)
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("foo(1)")
+ if res != 2:
+ print("xpath extension failure")
+ sys.exit(1)
+ i = i - 1
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("bar(1)")
+ if res != "3":
+ print("xpath extension failure got %s expecting '3'")
+ sys.exit(1)
+ i = i - 1
+doc.freeDoc()
+ctxt.xpathFreeContext()
+
+if called != "foo":
+ print("xpath function: failed to access the context")
+ print("xpath function: %s" % (called))
+ sys.exit(1)
+
+#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/valid.xml b/python/tests/valid.xml
new file mode 100644
index 0000000..8a7f679
--- /dev/null
+++ b/python/tests/valid.xml
@@ -0,0 +1,4 @@
+<!DOCTYPE doc [
+<!ELEMENT doc EMPTY>
+]>
+<doc/>
diff --git a/python/tests/validDTD.py b/python/tests/validDTD.py
new file mode 100755
index 0000000..4b03b8e
--- /dev/null
+++ b/python/tests/validDTD.py
@@ -0,0 +1,59 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+dtd="""<!ELEMENT foo EMPTY>"""
+valid="""<?xml version="1.0"?>
+<foo></foo>"""
+
+invalid="""<?xml version="1.0"?>
+<foo><bar/></foo>"""
+
+dtd = libxml2.parseDTD(None, 'test.dtd')
+ctxt = libxml2.newValidCtxt()
+e = ErrorHandler()
+ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 1 or e.errors:
+ print("error doing DTD validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.validateDtd(ctxt, dtd)
+if ret != 0 or not e.errors:
+ print("Error: document supposed to be invalid")
+doc.freeDoc()
+
+dtd.freeDtd()
+del dtd
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/validRNG.py b/python/tests/validRNG.py
new file mode 100755
index 0000000..57f13a4
--- /dev/null
+++ b/python/tests/validRNG.py
@@ -0,0 +1,76 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0"?>
+<element name="foo"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/annotation/1.0"
+ xmlns:ex1="http://www.example.com/n1"
+ xmlns:ex2="http://www.example.com/n2">
+ <a:documentation>A foo element.</a:documentation>
+ <element name="ex1:bar1">
+ <empty/>
+ </element>
+ <element name="ex2:bar2">
+ <empty/>
+ </element>
+</element>
+"""
+
+valid="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+invalid="""<?xml version="1.0"?>
+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1">bad</pre1:bar1><pre2:bar2 xmlns:pre2="http://www.example.com/n2"/></foo>"""
+
+rngp = libxml2.relaxNGNewMemParserCtxt(schema, len(schema))
+rngs = rngp.relaxNGParse()
+ctxt = rngs.relaxNGNewValidCtxt()
+e = ErrorHandler()
+ctxt.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret != 0 or e.errors:
+ print("error doing RelaxNG validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.relaxNGValidateDoc(ctxt)
+if ret == 0 or not e.errors:
+ print("Error: document supposed to be RelaxNG invalid")
+ sys.exit(1)
+doc.freeDoc()
+
+del rngp
+del rngs
+del ctxt
+libxml2.relaxNGCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/validSchemas.py b/python/tests/validSchemas.py
new file mode 100755
index 0000000..cc543f3
--- /dev/null
+++ b/python/tests/validSchemas.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python -u
+import libxml2
+import sys
+
+ARG = 'test string'
+
+class ErrorHandler:
+
+ def __init__(self):
+ self.errors = []
+
+ def handler(self, msg, data):
+ if data != ARG:
+ raise Exception("Error handler did not receive correct argument")
+ self.errors.append(msg)
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+schema="""<?xml version="1.0" encoding="iso-8859-1"?>
+<schema xmlns = "http://www.w3.org/2001/XMLSchema">
+ <element name = "Customer">
+ <complexType>
+ <sequence>
+ <element name = "FirstName" type = "string" />
+ <element name = "MiddleInitial" type = "string" />
+ <element name = "LastName" type = "string" />
+ </sequence>
+ <attribute name = "customerID" type = "integer" />
+ </complexType>
+ </element>
+</schema>"""
+
+valid="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <FirstName>Raymond</FirstName>
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+invalid="""<?xml version="1.0" encoding="iso-8859-1"?>
+<Customer customerID = "24332">
+ <MiddleInitial>G</MiddleInitial>
+ <LastName>Bayliss</LastName>
+</Customer>
+"""
+
+e = ErrorHandler()
+ctxt_parser = libxml2.schemaNewMemParserCtxt(schema, len(schema))
+ctxt_schema = ctxt_parser.schemaParse()
+ctxt_valid = ctxt_schema.schemaNewValidCtxt()
+ctxt_valid.setValidityErrorHandler(e.handler, e.handler, ARG)
+
+# Test valid document
+doc = libxml2.parseDoc(valid)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret != 0 or e.errors:
+ print("error doing schema validation")
+ sys.exit(1)
+doc.freeDoc()
+
+# Test invalid document
+doc = libxml2.parseDoc(invalid)
+ret = doc.schemaValidateDoc(ctxt_valid)
+if ret == 0 or not e.errors:
+ print("Error: document supposer to be schema invalid")
+ sys.exit(1)
+doc.freeDoc()
+
+del ctxt_parser
+del ctxt_schema
+del ctxt_valid
+libxml2.schemaCleanupTypes()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
+
diff --git a/python/tests/validate.py b/python/tests/validate.py
new file mode 100755
index 0000000..16c0386
--- /dev/null
+++ b/python/tests/validate.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+ctxt = libxml2.createFileParserCtxt("valid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+
+if doc.name != "valid.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+if valid != 1:
+ print("validity chec failed")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 1000
+while i > 0:
+ ctxt = libxml2.createFileParserCtxt("valid.xml")
+ ctxt.validate(1)
+ ctxt.parseDocument()
+ doc = ctxt.doc()
+ valid = ctxt.isValid()
+ doc.freeDoc()
+ if valid != 1:
+ print("validity check failed")
+ sys.exit(1)
+ i = i - 1
+
+#desactivate error messages from the validation
+def noerr(ctx, str):
+ pass
+
+libxml2.registerErrorHandler(noerr, None)
+
+ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ctxt.validate(1)
+ctxt.parseDocument()
+doc = ctxt.doc()
+valid = ctxt.isValid()
+if doc.name != "invalid.xml":
+ print("doc.name failed")
+ sys.exit(1)
+root = doc.children
+if root.name != "doc":
+ print("root.name failed")
+ sys.exit(1)
+if valid != 0:
+ print("validity chec failed")
+ sys.exit(1)
+doc.freeDoc()
+
+i = 1000
+while i > 0:
+ ctxt = libxml2.createFileParserCtxt("invalid.xml")
+ ctxt.validate(1)
+ ctxt.parseDocument()
+ doc = ctxt.doc()
+ valid = ctxt.isValid()
+ doc.freeDoc()
+ if valid != 0:
+ print("validity check failed")
+ sys.exit(1)
+ i = i - 1
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/walker.py b/python/tests/walker.py
new file mode 100755
index 0000000..47f0557
--- /dev/null
+++ b/python/tests/walker.py
@@ -0,0 +1,144 @@
+#!/usr/bin/python -u
+#
+# this tests the entities substitutions with the XmlTextReader interface
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+result = ""
+def processNode(reader):
+ global result
+
+ result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),
+ reader.Name(), reader.IsEmptyElement())
+
+#
+# Parse a document testing the readerForxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>100</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+doc = libxml2.parseDoc(docstr)
+reader = doc.readerWalker();
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test1")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test1")
+ print(result)
+ sys.exit(1)
+
+doc.freeDoc()
+
+#
+# Reuse the reader for another document testing the ReaderNewWalker API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+doc = libxml2.parseDoc(docstr)
+reader.NewWalker(doc)
+
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test2")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test2")
+ print(result)
+ sys.exit(1)
+
+doc.freeDoc()
+
+#
+# Reuse the reader for another document testing the ReaderNewxxx API
+#
+docstr="""<foo>
+<label>some text</label>
+<item>1000</item>
+</foo>"""
+expect="""0 1 foo 0
+1 14 #text 0
+1 1 label 0
+2 3 #text 0
+1 15 label 0
+1 14 #text 0
+1 1 item 0
+2 3 #text 0
+1 15 item 0
+1 14 #text 0
+0 15 foo 0
+"""
+result = ""
+
+reader.NewDoc(docstr, "test3", None, 0)
+ret = reader.Read()
+while ret == 1:
+ processNode(reader)
+ ret = reader.Read()
+
+if ret != 0:
+ print("Error parsing the document test3")
+ sys.exit(1)
+
+if result != expect:
+ print("Unexpected result for test3")
+ print(result)
+ sys.exit(1)
+
+#
+# cleanup
+#
+del reader
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/xpath.py b/python/tests/xpath.py
new file mode 100755
index 0000000..72e6c9d
--- /dev/null
+++ b/python/tests/xpath.py
@@ -0,0 +1,51 @@
+#!/usr/bin/python -u
+#
+# this test exercise the XPath basic engine, parser, etc, and
+# allows to detect memory leaks
+#
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+doc = libxml2.parseFile("tst.xml")
+if doc.name != "tst.xml":
+ print("doc.name error")
+ sys.exit(1);
+
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+ctxt.setContextNode(res[0])
+res = ctxt.xpathEval("foo")
+if len(res) != 1:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+doc.freeDoc()
+ctxt.xpathFreeContext()
+i = 1000
+while i > 0:
+ doc = libxml2.parseFile("tst.xml")
+ ctxt = doc.xpathNewContext()
+ res = ctxt.xpathEval("//*")
+ doc.freeDoc()
+ ctxt.xpathFreeContext()
+ i = i -1
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/xpathext.py b/python/tests/xpathext.py
new file mode 100755
index 0000000..b83d283
--- /dev/null
+++ b/python/tests/xpathext.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+def foo(ctx, x):
+ return x + 1
+
+def bar(ctx, x):
+ return "%d" % (x + 2)
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+res = ctxt.xpathEval("//*")
+if len(res) != 2:
+ print("xpath query: wrong node set size")
+ sys.exit(1)
+if res[0].name != "doc" or res[1].name != "foo":
+ print("xpath query: wrong node set value")
+ sys.exit(1)
+
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("foo(1)")
+ if res != 2:
+ print("xpath extension failure")
+ sys.exit(1)
+ i = i - 1
+i = 10000
+while i > 0:
+ res = ctxt.xpathEval("bar(1)")
+ if res != "3":
+ print("xpath extension failure got %s expecting '3'")
+ sys.exit(1)
+ i = i - 1
+doc.freeDoc()
+ctxt.xpathFreeContext()
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/xpathleak.py b/python/tests/xpathleak.py
new file mode 100755
index 0000000..33ab61c
--- /dev/null
+++ b/python/tests/xpathleak.py
@@ -0,0 +1,65 @@
+#!/usr/bin/python
+import sys, libxml2
+
+libxml2.debugMemory(True)
+
+expect="""--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+--> Invalid expression
+--> xmlXPathEval: evaluation failed
+"""
+err=""
+def callback(ctx, str):
+ global err
+
+ err = err + "%s %s" % (ctx, str)
+
+libxml2.registerErrorHandler(callback, "-->")
+
+doc = libxml2.parseDoc("<fish/>")
+ctxt = doc.xpathNewContext()
+ctxt.setContextNode(doc)
+badexprs = (
+ ":false()", "bad:()", "bad(:)", ":bad(:)", "bad:(:)", "bad:bad(:)",
+ "a:/b", "/c:/d", "//e:/f", "g://h"
+ )
+for expr in badexprs:
+ try:
+ ctxt.xpathEval(expr)
+ except libxml2.xpathError:
+ pass
+ else:
+ print("Unexpectedly legal expression:", expr)
+ctxt.xpathFreeContext()
+doc.freeDoc()
+
+if err != expect:
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
+ sys.exit(1)
+
+libxml2.cleanupParser()
+leakedbytes = libxml2.debugMemory(True)
+if leakedbytes == 0:
+ print("OK")
+else:
+ print("Memory leak", leakedbytes, "bytes")
+ # drop file to .memdump file in cwd, but won't work if not compiled in
+ libxml2.dumpMemory()
diff --git a/python/tests/xpathns.py b/python/tests/xpathns.py
new file mode 100755
index 0000000..379535e
--- /dev/null
+++ b/python/tests/xpathns.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python -u
+#
+import libxml2
+
+expect=' xmlns:a="urn:whatevar"'
+
+# Memory debug specific
+libxml2.debugMemory(1)
+
+d = libxml2.parseDoc("<a:a xmlns:a='urn:whatevar'/>")
+res=""
+for n in d.xpathEval("//namespace::*"):
+ res = res + n.serialize()
+d.freeDoc()
+
+if res != expect:
+ print("test5 failed: unexpected output")
+ print(res)
+del res
+del d
+del n
+# Memory debug specific
+libxml2.cleanupParser()
+
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/tests/xpathret.py b/python/tests/xpathret.py
new file mode 100755
index 0000000..11c8b32
--- /dev/null
+++ b/python/tests/xpathret.py
@@ -0,0 +1,57 @@
+#!/usr/bin/python -u
+import sys
+import libxml2
+
+#memory debug specific
+libxml2.debugMemory(1)
+
+#
+# A document hosting the nodes returned from the extension function
+#
+mydoc = libxml2.newDoc("1.0")
+
+def foo(ctx, str):
+ global mydoc
+
+ #
+ # test returning a node set works as expected
+ #
+ parent = mydoc.newDocNode(None, 'p', None)
+ mydoc.addChild(parent)
+ node = mydoc.newDocText(str)
+ parent.addChild(node)
+ return [parent]
+
+doc = libxml2.parseFile("tst.xml")
+ctxt = doc.xpathNewContext()
+libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
+res = ctxt.xpathEval("foo('hello')")
+if type(res) != type([]):
+ print("Failed to return a nodeset")
+ sys.exit(1)
+if len(res) != 1:
+ print("Unexpected nodeset size")
+ sys.exit(1)
+node = res[0]
+if node.name != 'p':
+ print("Unexpected nodeset element result")
+ sys.exit(1)
+node = node.children
+if node.type != 'text':
+ print("Unexpected nodeset element children type")
+ sys.exit(1)
+if node.content != 'hello':
+ print("Unexpected nodeset element children content")
+ sys.exit(1)
+
+doc.freeDoc()
+mydoc.freeDoc()
+ctxt.xpathFreeContext()
+
+#memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print("OK")
+else:
+ print("Memory leak %d bytes" % (libxml2.debugMemory(1)))
+ libxml2.dumpMemory()
diff --git a/python/types.c b/python/types.c
new file mode 100644
index 0000000..f237677
--- /dev/null
+++ b/python/types.c
@@ -0,0 +1,957 @@
+/*
+ * types.c: converter functions between the internal representation
+ * and the Python objects
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+#include "libxml_wrap.h"
+#include <libxml/xpathInternals.h>
+
+#if PY_MAJOR_VERSION >= 3
+#define PY_IMPORT_STRING_SIZE PyUnicode_FromStringAndSize
+#define PY_IMPORT_STRING PyUnicode_FromString
+#define PY_IMPORT_INT PyLong_FromLong
+#else
+#define PY_IMPORT_STRING_SIZE PyString_FromStringAndSize
+#define PY_IMPORT_STRING PyString_FromString
+#define PY_IMPORT_INT PyInt_FromLong
+#endif
+
+#if PY_MAJOR_VERSION >= 3
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+FILE *
+libxml_PyFileGet(PyObject *f) {
+ int fd, flags;
+ FILE *res;
+ const char *mode;
+
+ fd = PyObject_AsFileDescriptor(f);
+ if (!_PyVerify_fd(fd))
+ return(NULL);
+ /*
+ * Get the flags on the fd to understand how it was opened
+ */
+ flags = fcntl(fd, F_GETFL, 0);
+ switch (flags & O_ACCMODE) {
+ case O_RDWR:
+ if (flags & O_APPEND)
+ mode = "a+";
+ else
+ mode = "rw";
+ break;
+ case O_RDONLY:
+ if (flags & O_APPEND)
+ mode = "r+";
+ else
+ mode = "r";
+ break;
+ case O_WRONLY:
+ if (flags & O_APPEND)
+ mode = "a";
+ else
+ mode = "w";
+ break;
+ default:
+ return(NULL);
+ }
+
+ /*
+ * the FILE struct gets a new fd, so that it can be closed
+ * independently of the file descriptor given. The risk though is
+ * lack of sync. So at the python level sync must be implemented
+ * before and after a conversion took place. No way around it
+ * in the Python3 infrastructure !
+ * The duplicated fd and FILE * will be released in the subsequent
+ * call to libxml_PyFileRelease() which must be genrated accodingly
+ */
+ fd = dup(fd);
+ if (fd == -1)
+ return(NULL);
+ res = fdopen(fd, mode);
+ if (res == NULL) {
+ close(fd);
+ return(NULL);
+ }
+ return(res);
+}
+
+void libxml_PyFileRelease(FILE *f) {
+ if (f != NULL)
+ fclose(f);
+}
+#endif
+
+PyObject *
+libxml_intWrap(int val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_intWrap: val = %d\n", val);
+#endif
+ ret = PY_IMPORT_INT((long) val);
+ return (ret);
+}
+
+PyObject *
+libxml_longWrap(long val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_longWrap: val = %ld\n", val);
+#endif
+ ret = PyLong_FromLong(val);
+ return (ret);
+}
+
+PyObject *
+libxml_doubleWrap(double val)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_doubleWrap: val = %f\n", val);
+#endif
+ ret = PyFloat_FromDouble((double) val);
+ return (ret);
+}
+
+PyObject *
+libxml_charPtrWrap(char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ xmlFree(str);
+ return (ret);
+}
+
+PyObject *
+libxml_charPtrConstWrap(const char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCharPtrWrap(xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ xmlFree(str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCharPtrConstWrap(const xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ return (ret);
+}
+
+PyObject *
+libxml_constcharPtrWrap(const char *str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlcharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING(str);
+ return (ret);
+}
+
+PyObject *
+libxml_constxmlCharPtrWrap(const xmlChar * str)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlCharPtrWrap: str = %s\n", str);
+#endif
+ if (str == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PY_IMPORT_STRING((char *) str);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlDocPtrWrap(xmlDocPtr doc)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlDocPtrWrap: doc = %p\n", doc);
+#endif
+ if (doc == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ /* TODO: look at deallocation */
+ ret = PyCapsule_New((void *) doc, (char *) "xmlDocPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlNodePtrWrap(xmlNodePtr node)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNodePtrWrap: node = %p\n", node);
+#endif
+ if (node == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) node, (char *) "xmlNodePtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlURIPtrWrap(xmlURIPtr uri)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlURIPtrWrap: uri = %p\n", uri);
+#endif
+ if (uri == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) uri, (char *) "xmlURIPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlNsPtrWrap(xmlNsPtr ns)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNsPtrWrap: node = %p\n", ns);
+#endif
+ if (ns == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) ns, (char *) "xmlNsPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlAttrPtrWrap(xmlAttrPtr attr)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlAttrNodePtrWrap: attr = %p\n", attr);
+#endif
+ if (attr == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) attr, (char *) "xmlAttrPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlAttributePtrWrap(xmlAttributePtr attr)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlAttributePtrWrap: attr = %p\n", attr);
+#endif
+ if (attr == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) attr, (char *) "xmlAttributePtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlElementPtrWrap(xmlElementPtr elem)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlElementNodePtrWrap: elem = %p\n", elem);
+#endif
+ if (elem == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) elem, (char *) "xmlElementPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathContextPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) ctxt, (char *) "xmlXPathContextPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathParserContextPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *)ctxt, (char *)"xmlXPathParserContextPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret = PyCapsule_New((void *) ctxt, (char *) "xmlParserCtxtPtr", NULL);
+ return (ret);
+}
+
+/**
+ * libxml_xmlXPathDestructNsNode:
+ * cap: xmlNsPtr namespace node capsule object
+ *
+ * This function is called if and when a namespace node returned in
+ * an XPath node set is to be destroyed. That's the only kind of
+ * object returned in node set not directly linked to the original
+ * xmlDoc document, see xmlXPathNodeSetDupNs.
+ */
+#if PY_VERSION_HEX < 0x02070000
+static void
+libxml_xmlXPathDestructNsNode(void *cap, void *desc ATTRIBUTE_UNUSED)
+#else
+static void
+libxml_xmlXPathDestructNsNode(PyObject *cap)
+#endif
+{
+#ifdef DEBUG
+ fprintf(stderr, "libxml_xmlXPathDestructNsNode called %p\n", cap);
+#endif
+#if PY_VERSION_HEX < 0x02070000
+ xmlXPathNodeSetFreeNs((xmlNsPtr) cap);
+#else
+ xmlXPathNodeSetFreeNs((xmlNsPtr) PyCapsule_GetPointer(cap, "xmlNsPtr"));
+#endif
+}
+
+PyObject *
+libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathObjectPtrWrap: ctxt = %p\n", obj);
+#endif
+ if (obj == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ switch (obj->type) {
+ case XPATH_XSLT_TREE: {
+ if ((obj->nodesetval == NULL) ||
+ (obj->nodesetval->nodeNr == 0) ||
+ (obj->nodesetval->nodeTab == NULL)) {
+ ret = PyList_New(0);
+ } else {
+ int i, len = 0;
+ xmlNodePtr node;
+
+ node = obj->nodesetval->nodeTab[0]->children;
+ while (node != NULL) {
+ len++;
+ node = node->next;
+ }
+ ret = PyList_New(len);
+ node = obj->nodesetval->nodeTab[0]->children;
+ for (i = 0;i < len;i++) {
+ PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
+ node = node->next;
+ }
+ }
+ /*
+ * Return now, do not free the object passed down
+ */
+ return (ret);
+ }
+ case XPATH_NODESET:
+ if ((obj->nodesetval == NULL)
+ || (obj->nodesetval->nodeNr == 0)) {
+ ret = PyList_New(0);
+ } else {
+ int i;
+ xmlNodePtr node;
+
+ ret = PyList_New(obj->nodesetval->nodeNr);
+ for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+ node = obj->nodesetval->nodeTab[i];
+ if (node->type == XML_NAMESPACE_DECL) {
+ PyObject *ns = PyCapsule_New((void *) node,
+ (char *) "xmlNsPtr",
+ libxml_xmlXPathDestructNsNode);
+ PyList_SetItem(ret, i, ns);
+ /* make sure the xmlNsPtr is not destroyed now */
+ obj->nodesetval->nodeTab[i] = NULL;
+ } else {
+ PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
+ }
+ }
+ }
+ break;
+ case XPATH_BOOLEAN:
+ ret = PY_IMPORT_INT((long) obj->boolval);
+ break;
+ case XPATH_NUMBER:
+ ret = PyFloat_FromDouble(obj->floatval);
+ break;
+ case XPATH_STRING:
+ ret = PY_IMPORT_STRING((char *) obj->stringval);
+ break;
+ case XPATH_POINT:
+ {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ ret = tuple;
+ break;
+ }
+ case XPATH_RANGE:
+ {
+ unsigned short bCollapsedRange;
+
+ bCollapsedRange = ( (obj->user2 == NULL) ||
+ ((obj->user2 == obj->user) && (obj->index == obj->index2)) );
+ if ( bCollapsedRange ) {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(1);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ ret = list;
+ } else {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(2);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ node = libxml_xmlNodePtrWrap(obj->user2);
+ indexIntoNode = PY_IMPORT_INT((long) obj->index2);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 1, tuple);
+
+ ret = list;
+ }
+ break;
+ }
+ case XPATH_LOCATIONSET:
+ {
+ xmlLocationSetPtr set;
+
+ set = obj->user;
+ if ( set && set->locNr > 0 ) {
+ int i;
+ PyObject *list;
+
+ list = PyList_New(set->locNr);
+
+ for (i=0; i<set->locNr; i++) {
+ xmlXPathObjectPtr setobj;
+ PyObject *pyobj;
+
+ setobj = set->locTab[i]; /*xmlXPathObjectPtr setobj*/
+
+ pyobj = libxml_xmlXPathObjectPtrWrap(setobj);
+ /* xmlXPathFreeObject(setobj) is called */
+ set->locTab[i] = NULL;
+
+ PyList_SetItem(list, i, pyobj);
+ }
+ set->locNr = 0;
+ ret = list;
+ } else {
+ Py_INCREF(Py_None);
+ ret = Py_None;
+ }
+ break;
+ }
+ default:
+#ifdef DEBUG
+ printf("Unable to convert XPath object type %d\n", obj->type);
+#endif
+ Py_INCREF(Py_None);
+ ret = Py_None;
+ }
+ xmlXPathFreeObject(obj);
+ return (ret);
+}
+
+xmlXPathObjectPtr
+libxml_xmlXPathObjectPtrConvert(PyObject *obj)
+{
+ xmlXPathObjectPtr ret = NULL;
+
+#ifdef DEBUG
+ printf("libxml_xmlXPathObjectPtrConvert: obj = %p\n", obj);
+#endif
+ if (obj == NULL) {
+ return (NULL);
+ }
+ if PyFloat_Check (obj) {
+ ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
+ } else if PyLong_Check(obj) {
+#ifdef PyLong_AS_LONG
+ ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
+#else
+ ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
+#endif
+#ifdef PyBool_Check
+ } else if PyBool_Check (obj) {
+
+ if (obj == Py_True) {
+ ret = xmlXPathNewBoolean(1);
+ }
+ else {
+ ret = xmlXPathNewBoolean(0);
+ }
+#endif
+ } else if PyBytes_Check (obj) {
+ xmlChar *str;
+
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+ PyBytes_GET_SIZE(obj));
+ ret = xmlXPathWrapString(str);
+#ifdef PyUnicode_Check
+ } else if PyUnicode_Check (obj) {
+#if PY_VERSION_HEX >= 0x03030000
+ xmlChar *str;
+ const char *tmp;
+ Py_ssize_t size;
+
+ /* tmp doesn't need to be deallocated */
+ tmp = PyUnicode_AsUTF8AndSize(obj, &size);
+ str = xmlStrndup((const xmlChar *) tmp, (int) size);
+ ret = xmlXPathWrapString(str);
+#else
+ xmlChar *str = NULL;
+ PyObject *b;
+
+ b = PyUnicode_AsUTF8String(obj);
+ if (b != NULL) {
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(b),
+ PyBytes_GET_SIZE(b));
+ Py_DECREF(b);
+ }
+ ret = xmlXPathWrapString(str);
+#endif
+#endif
+ } else if PyList_Check (obj) {
+ int i;
+ PyObject *node;
+ xmlNodePtr cur;
+ xmlNodeSetPtr set;
+
+ set = xmlXPathNodeSetCreate(NULL);
+
+ for (i = 0; i < PyList_Size(obj); i++) {
+ node = PyList_GetItem(obj, i);
+ if ((node == NULL) || (node->ob_type == NULL))
+ continue;
+
+ cur = NULL;
+ if (PyCapsule_CheckExact(node)) {
+#ifdef DEBUG
+ printf("Got a Capsule\n");
+#endif
+ cur = PyxmlNode_Get(node);
+ } else if ((PyObject_HasAttrString(node, (char *) "_o")) &&
+ (PyObject_HasAttrString(node, (char *) "get_doc"))) {
+ PyObject *wrapper;
+
+ wrapper = PyObject_GetAttrString(node, (char *) "_o");
+ if (wrapper != NULL)
+ cur = PyxmlNode_Get(wrapper);
+ } else {
+#ifdef DEBUG
+ printf("Unknown object in Python return list\n");
+#endif
+ }
+ if (cur != NULL) {
+ xmlXPathNodeSetAdd(set, cur);
+ }
+ }
+ ret = xmlXPathWrapNodeSet(set);
+ } else {
+#ifdef DEBUG
+ printf("Unable to convert Python Object to XPath");
+#endif
+ }
+ return (ret);
+}
+
+PyObject *
+libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlValidCtxtPtr", NULL);
+
+ return (ret);
+}
+
+PyObject *
+libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlNodePtrWrap: catal = %p\n", catal);
+#endif
+ if (catal == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) catal,
+ (char *) "xmlCatalogPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlOutputBufferPtrWrap: buffer = %p\n", buffer);
+#endif
+ if (buffer == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) buffer,
+ (char *) "xmlOutputBufferPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlParserInputBufferPtrWrap: buffer = %p\n", buffer);
+#endif
+ if (buffer == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) buffer,
+ (char *) "xmlParserInputBufferPtr", NULL);
+ return (ret);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+PyObject *
+libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRegexpPtrWrap: regexp = %p\n", regexp);
+#endif
+ if (regexp == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) regexp,
+ (char *) "xmlRegexpPtr", NULL);
+ return (ret);
+}
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#ifdef LIBXML_READER_ENABLED
+PyObject *
+libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlTextReaderPtrWrap: reader = %p\n", reader);
+#endif
+ if (reader == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) reader,
+ (char *) "xmlTextReaderPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlTextReaderLocatorPtrWrap: locator = %p\n", locator);
+#endif
+ if (locator == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) locator,
+ (char *) "xmlTextReaderLocatorPtr", NULL);
+ return (ret);
+}
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+PyObject *
+libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlRelaxNGPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlRelaxNGParserCtxtPtr", NULL);
+ return (ret);
+}
+PyObject *
+libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlRelaxNGValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlRelaxNGValidCtxtPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlSchemaPtr", NULL);
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaParserCtxtPtrWrap: ctxt = %p\n", ctxt);
+#endif
+ if (ctxt == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret =
+ PyCapsule_New((void *) ctxt,
+ (char *) "xmlSchemaParserCtxtPtr", NULL);
+
+ return (ret);
+}
+
+PyObject *
+libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlSchemaValidCtxtPtrWrap: valid = %p\n", valid);
+#endif
+ if (valid == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+
+ ret =
+ PyCapsule_New((void *) valid,
+ (char *) "xmlSchemaValidCtxtPtr", NULL);
+
+ return (ret);
+}
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+PyObject *
+libxml_xmlErrorPtrWrap(xmlErrorPtr error)
+{
+ PyObject *ret;
+
+#ifdef DEBUG
+ printf("libxml_xmlErrorPtrWrap: error = %p\n", error);
+#endif
+ if (error == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCapsule_New((void *) error, (char *) "xmlErrorPtr", NULL);
+ return (ret);
+}
diff --git a/regressions.py b/regressions.py
new file mode 100755
index 0000000..0e813c2
--- /dev/null
+++ b/regressions.py
@@ -0,0 +1,350 @@
+#!/usr/bin/python -u
+import glob, os, string, sys, thread, time
+# import difflib
+import libxml2
+
+###
+#
+# This is a "Work in Progress" attempt at a python script to run the
+# various regression tests. The rationale for this is that it should be
+# possible to run this on most major platforms, including those (such as
+# Windows) which don't support gnu Make.
+#
+# The script is driven by a parameter file which defines the various tests
+# to be run, together with the unique settings for each of these tests. A
+# script for Linux is included (regressions.xml), with comments indicating
+# the significance of the various parameters. To run the tests under Windows,
+# edit regressions.xml and remove the comment around the default parameter
+# "<execpath>" (i.e. make it point to the location of the binary executables).
+#
+# Note that this current version requires the Python bindings for libxml2 to
+# have been previously installed and accessible
+#
+# See Copyright for the status of this software.
+# William Brack (wbrack@mmm.com.hk)
+#
+###
+defaultParams = {} # will be used as a dictionary to hold the parsed params
+
+# This routine is used for comparing the expected stdout / stdin with the results.
+# The expected data has already been read in; the result is a file descriptor.
+# Within the two sets of data, lines may begin with a path string. If so, the
+# code "relativises" it by removing the path component. The first argument is a
+# list already read in by a separate thread; the second is a file descriptor.
+# The two 'base' arguments are to let me "relativise" the results files, allowing
+# the script to be run from any directory.
+def compFiles(res, expected, base1, base2):
+ l1 = len(base1)
+ exp = expected.readlines()
+ expected.close()
+ # the "relativisation" is done here
+ for i in range(len(res)):
+ j = string.find(res[i],base1)
+ if (j == 0) or ((j == 2) and (res[i][0:2] == './')):
+ col = string.find(res[i],':')
+ if col > 0:
+ start = string.rfind(res[i][:col], '/')
+ if start > 0:
+ res[i] = res[i][start+1:]
+
+ for i in range(len(exp)):
+ j = string.find(exp[i],base2)
+ if (j == 0) or ((j == 2) and (exp[i][0:2] == './')):
+ col = string.find(exp[i],':')
+ if col > 0:
+ start = string.rfind(exp[i][:col], '/')
+ if start > 0:
+ exp[i] = exp[i][start+1:]
+
+ ret = 0
+ # ideally we would like to use difflib functions here to do a
+ # nice comparison of the two sets. Unfortunately, during testing
+ # (using python 2.3.3 and 2.3.4) the following code went into
+ # a dead loop under windows. I'll pursue this later.
+# diff = difflib.ndiff(res, exp)
+# diff = list(diff)
+# for line in diff:
+# if line[:2] != ' ':
+# print string.strip(line)
+# ret = -1
+
+ # the following simple compare is fine for when the two data sets
+ # (actual result vs. expected result) are equal, which should be true for
+ # us. Unfortunately, if the test fails it's not nice at all.
+ rl = len(res)
+ el = len(exp)
+ if el != rl:
+ print 'Length of expected is %d, result is %d' % (el, rl)
+ ret = -1
+ for i in range(min(el, rl)):
+ if string.strip(res[i]) != string.strip(exp[i]):
+ print '+:%s-:%s' % (res[i], exp[i])
+ ret = -1
+ if el > rl:
+ for i in range(rl, el):
+ print '-:%s' % exp[i]
+ ret = -1
+ elif rl > el:
+ for i in range (el, rl):
+ print '+:%s' % res[i]
+ ret = -1
+ return ret
+
+# Separate threads to handle stdout and stderr are created to run this function
+def readPfile(file, list, flag):
+ data = file.readlines() # no call by reference, so I cheat
+ for l in data:
+ list.append(l)
+ file.close()
+ flag.append('ok')
+
+# This routine runs the test program (e.g. xmllint)
+def runOneTest(testDescription, filename, inbase, errbase):
+ if 'execpath' in testDescription:
+ dir = testDescription['execpath'] + '/'
+ else:
+ dir = ''
+ cmd = os.path.abspath(dir + testDescription['testprog'])
+ if 'flag' in testDescription:
+ for f in string.split(testDescription['flag']):
+ cmd += ' ' + f
+ if 'stdin' not in testDescription:
+ cmd += ' ' + inbase + filename
+ if 'extarg' in testDescription:
+ cmd += ' ' + testDescription['extarg']
+
+ noResult = 0
+ expout = None
+ if 'resext' in testDescription:
+ if testDescription['resext'] == 'None':
+ noResult = 1
+ else:
+ ext = '.' + testDescription['resext']
+ else:
+ ext = ''
+ if not noResult:
+ try:
+ fname = errbase + filename + ext
+ expout = open(fname, 'rt')
+ except:
+ print "Can't open result file %s - bypassing test" % fname
+ return
+
+ noErrors = 0
+ if 'reserrext' in testDescription:
+ if testDescription['reserrext'] == 'None':
+ noErrors = 1
+ else:
+ if len(testDescription['reserrext'])>0:
+ ext = '.' + testDescription['reserrext']
+ else:
+ ext = ''
+ else:
+ ext = ''
+ if not noErrors:
+ try:
+ fname = errbase + filename + ext
+ experr = open(fname, 'rt')
+ except:
+ experr = None
+ else:
+ experr = None
+
+ pin, pout, perr = os.popen3(cmd)
+ if 'stdin' in testDescription:
+ infile = open(inbase + filename, 'rt')
+ pin.writelines(infile.readlines())
+ infile.close()
+ pin.close()
+
+ # popen is great fun, but can lead to the old "deadly embrace", because
+ # synchronizing the writing (by the task being run) of stdout and stderr
+ # with respect to the reading (by this task) is basically impossible. I
+ # tried several ways to cheat, but the only way I have found which works
+ # is to do a *very* elementary multi-threading approach. We can only hope
+ # that Python threads are implemented on the target system (it's okay for
+ # Linux and Windows)
+
+ th1Flag = [] # flags to show when threads finish
+ th2Flag = []
+ outfile = [] # lists to contain the pipe data
+ errfile = []
+ th1 = thread.start_new_thread(readPfile, (pout, outfile, th1Flag))
+ th2 = thread.start_new_thread(readPfile, (perr, errfile, th2Flag))
+ while (len(th1Flag)==0) or (len(th2Flag)==0):
+ time.sleep(0.001)
+ if not noResult:
+ ret = compFiles(outfile, expout, inbase, 'test/')
+ if ret != 0:
+ print 'trouble with %s' % cmd
+ else:
+ if len(outfile) != 0:
+ for l in outfile:
+ print l
+ print 'trouble with %s' % cmd
+ if experr != None:
+ ret = compFiles(errfile, experr, inbase, 'test/')
+ if ret != 0:
+ print 'trouble with %s' % cmd
+ else:
+ if not noErrors:
+ if len(errfile) != 0:
+ for l in errfile:
+ print l
+ print 'trouble with %s' % cmd
+
+ if 'stdin' not in testDescription:
+ pin.close()
+
+# This routine is called by the parameter decoding routine whenever the end of a
+# 'test' section is encountered. Depending upon file globbing, a large number of
+# individual tests may be run.
+def runTest(description):
+ testDescription = defaultParams.copy() # set defaults
+ testDescription.update(description) # override with current ent
+ if 'testname' in testDescription:
+ print "## %s" % testDescription['testname']
+ if not 'file' in testDescription:
+ print "No file specified - can't run this test!"
+ return
+ # Set up the source and results directory paths from the decoded params
+ dir = ''
+ if 'srcdir' in testDescription:
+ dir += testDescription['srcdir'] + '/'
+ if 'srcsub' in testDescription:
+ dir += testDescription['srcsub'] + '/'
+
+ rdir = ''
+ if 'resdir' in testDescription:
+ rdir += testDescription['resdir'] + '/'
+ if 'ressub' in testDescription:
+ rdir += testDescription['ressub'] + '/'
+
+ testFiles = glob.glob(os.path.abspath(dir + testDescription['file']))
+ if testFiles == []:
+ print "No files result from '%s'" % testDescription['file']
+ return
+
+ # Some test programs just don't work (yet). For now we exclude them.
+ count = 0
+ excl = []
+ if 'exclfile' in testDescription:
+ for f in string.split(testDescription['exclfile']):
+ glb = glob.glob(dir + f)
+ for g in glb:
+ excl.append(os.path.abspath(g))
+
+ # Run the specified test program
+ for f in testFiles:
+ if not os.path.isdir(f):
+ if f not in excl:
+ count = count + 1
+ runOneTest(testDescription, os.path.basename(f), dir, rdir)
+
+#
+# The following classes are used with the xmlreader interface to interpret the
+# parameter file. Once a test section has been identified, runTest is called
+# with a dictionary containing the parsed results of the interpretation.
+#
+
+class testDefaults:
+ curText = '' # accumulates text content of parameter
+
+ def addToDict(self, key):
+ txt = string.strip(self.curText)
+# if txt == '':
+# return
+ if key not in defaultParams:
+ defaultParams[key] = txt
+ else:
+ defaultParams[key] += ' ' + txt
+
+ def processNode(self, reader, curClass):
+ if reader.Depth() == 2:
+ if reader.NodeType() == 1:
+ self.curText = '' # clear the working variable
+ elif reader.NodeType() == 15:
+ if (reader.Name() != '#text') and (reader.Name() != '#comment'):
+ self.addToDict(reader.Name())
+ elif reader.Depth() == 3:
+ if reader.Name() == '#text':
+ self.curText += reader.Value()
+
+ elif reader.NodeType() == 15: # end of element
+ print "Defaults have been set to:"
+ for k in defaultParams.keys():
+ print " %s : '%s'" % (k, defaultParams[k])
+ curClass = rootClass()
+ return curClass
+
+
+class testClass:
+ def __init__(self):
+ self.testParams = {} # start with an empty set of params
+ self.curText = '' # and empty text
+
+ def addToDict(self, key):
+ data = string.strip(self.curText)
+ if key not in self.testParams:
+ self.testParams[key] = data
+ else:
+ if self.testParams[key] != '':
+ data = ' ' + data
+ self.testParams[key] += data
+
+ def processNode(self, reader, curClass):
+ if reader.Depth() == 2:
+ if reader.NodeType() == 1:
+ self.curText = '' # clear the working variable
+ if reader.Name() not in self.testParams:
+ self.testParams[reader.Name()] = ''
+ elif reader.NodeType() == 15:
+ if (reader.Name() != '#text') and (reader.Name() != '#comment'):
+ self.addToDict(reader.Name())
+ elif reader.Depth() == 3:
+ if reader.Name() == '#text':
+ self.curText += reader.Value()
+
+ elif reader.NodeType() == 15: # end of element
+ runTest(self.testParams)
+ curClass = rootClass()
+ return curClass
+
+
+class rootClass:
+ def processNode(self, reader, curClass):
+ if reader.Depth() == 0:
+ return curClass
+ if reader.Depth() != 1:
+ print "Unexpected junk: Level %d, type %d, name %s" % (
+ reader.Depth(), reader.NodeType(), reader.Name())
+ return curClass
+ if reader.Name() == 'test':
+ curClass = testClass()
+ curClass.testParams = {}
+ elif reader.Name() == 'defaults':
+ curClass = testDefaults()
+ return curClass
+
+def streamFile(filename):
+ try:
+ reader = libxml2.newTextReaderFilename(filename)
+ except:
+ print "unable to open %s" % (filename)
+ return
+
+ curClass = rootClass()
+ ret = reader.Read()
+ while ret == 1:
+ curClass = curClass.processNode(reader, curClass)
+ ret = reader.Read()
+
+ if ret != 0:
+ print "%s : failed to parse" % (filename)
+
+# OK, we're finished with all the routines. Now for the main program:-
+if len(sys.argv) != 2:
+ print "Usage: maketest {filename}"
+ sys.exit(-1)
+
+streamFile(sys.argv[1])
diff --git a/regressions.xml b/regressions.xml
new file mode 100644
index 0000000..c78838a
--- /dev/null
+++ b/regressions.xml
@@ -0,0 +1,226 @@
+<RegressionTests>
+<!--
+ Within the following test descriptions the possible elements are:
+ Element Name Description
+ testname Plain text name of test
+ execpath pathname for test program(s)
+ testprog program to run for the test
+ flag flags for program (may have several)
+ file filename of input file (several, or glob ok)
+ exclfile filename to be excuded (several, or glob ok)
+ srcdir global source directory for input file(s)
+ srcsub subdirectory for input
+ resdir directory for results file(s)
+ ressub subdirectory for results
+ resext extension for expected result
+ reserrext extension for error result ('None' => no chk)
+ extarg additional argument for command
+ errexcl string to ignore when checking diffs
+ stdin pipe input file to stdin
+-->
+
+<!--
+ Note: These defaults are set to run from the root of the build directory
+-->
+ <defaults>
+ <testname>noname</testname>
+<!-- <execpath>win32/bin.msvc</execpath> -->
+ <execpath>.</execpath>
+ <testprog>xmllint</testprog>
+ <srcdir>test</srcdir>
+ <resdir>result</resdir>
+ <file>*.xml</file>
+ <reserrext>err</reserrext>
+ <errexcl/>
+ </defaults>
+
+ <test>
+ <testname>XML Regression Tests</testname>
+ <errexcl>failed to load external entity</errexcl>
+ </test>
+ <test>
+ <testname>XML Entity Subst Regression Tests</testname>
+ <ressub>noent</ressub>
+ <flag>--noent</flag>
+ </test>
+ <test>
+ <testname>XML Namespaces Regression Tests</testname>
+ <srcsub>namespaces</srcsub>
+ <ressub>namespaces</ressub>
+ </test>
+ <test>
+ <testname>xml:id Regression Tests</testname>
+ <testprog>testXPath</testprog>
+ <srcsub>xmlid</srcsub>
+ <ressub>xmlid</ressub>
+ <flag>-i</flag>
+ <file>id_*.xml</file>
+ <extarg>"id('bar')"</extarg>
+ </test>
+ <test>
+ <testname>Error Cases Regression Tests</testname>
+ <srcsub>errors</srcsub>
+ <ressub>errors</ressub>
+ </test>
+ <test>
+ <testname>Error Cases Stream Regression Tests</testname>
+ <srcsub>errors</srcsub>
+ <ressub>errors</ressub>
+ <reserrext>str</reserrext>
+ <flag>--stream</flag>
+ </test>
+ <test>
+ <testname>Reader Regression Tests</testname>
+ <resext>rdr</resext>
+ <flag>--nonet</flag>
+ <flag>--debug</flag>
+ <flag>--stream</flag>
+ <file>*</file>
+ <reserrext>None</reserrext>
+ </test>
+ <test>
+ <testname>Walker Regression Tests</testname>
+ <resext>rdr</resext>
+ <flag>--nonet</flag>
+ <flag>--debug</flag>
+ <flag>--walker</flag>
+ <file>*</file>
+ <reserrext>None</reserrext>
+ </test>
+ <test>
+ <testname>Reader Entities Substitution Regression Tests</testname>
+ <resext>rde</resext>
+ <flag>--nonet</flag>
+ <flag>--debug</flag>
+ <flag>--stream</flag>
+ <flag>--noent</flag>
+ <file>*</file>
+ <reserrext>None</reserrext>
+ </test>
+ <test>
+ <testname>SAX Callbacks Regression Tests</testname>
+ <testprog>testSAX</testprog>
+ <resext>sax</resext>
+ <file>*</file>
+ <exclfile>utf16*.xml</exclfile>
+ <reserrext>None</reserrext>
+ </test>
+ <test>
+ <testname>XML Push Regression Tests</testname>
+ <flag>--push</flag>
+ <errexcl>failed to load external entity</errexcl>
+ </test>
+ <test>
+ <testname>HTML Regression Tests</testname>
+ <testprog>testHTML</testprog>
+ <srcsub>HTML</srcsub>
+ <ressub>HTML</ressub>
+ <file>*</file>
+ <exclfile>wired.html</exclfile>
+ </test>
+ <test>
+ <testname>Push HTML Regression Tests</testname>
+ <testprog>testHTML</testprog>
+ <flag>--push</flag>
+ <srcsub>HTML</srcsub>
+ <ressub>HTML</ressub>
+ <file>*</file>
+ </test>
+ <test>
+ <testname>HTML SAX Regression Tests</testname>
+ <testprog>testHTML</testprog>
+ <flag>--sax</flag>
+ <srcsub>HTML</srcsub>
+ <ressub>HTML</ressub>
+ <resext>sax</resext>
+ <reserrext>None</reserrext>
+ <file>*</file>
+ </test>
+ <test>
+ <testname>Push HTML SAX Regression Tests</testname>
+ <testprog>testHTML</testprog>
+ <flag>--sax</flag>
+ <flag>--push</flag>
+ <srcsub>HTML</srcsub>
+ <ressub>HTML</ressub>
+ <resext>sax</resext>
+ <reserrext>None</reserrext>
+ <file>*</file>
+ </test>
+ <test>
+ <testname>Valid Documents Regression Tests</testname>
+ <srcsub>VCM</srcsub>
+ <ressub>VCM</ressub>
+ <resext>None</resext>
+ <reserrext>None</reserrext>
+ <file>*</file>
+ <flag>--valid</flag>
+ <flag>--noout</flag>
+ <flag>--nowarning</flag>
+ </test>
+ <test>
+ <testname>Validity Checking Regression Tests</testname>
+ <srcsub>VC</srcsub>
+ <ressub>VC</ressub>
+ <resext>None</resext>
+ <reserrext/>
+ <file>*</file>
+ <flag>--valid</flag>
+ <flag>--noout</flag>
+ </test>
+ <test>
+ <testname>General Documents Valid Regression Tests</testname>
+ <srcsub>valid</srcsub>
+ <ressub>valid</ressub>
+ <file>*</file>
+ <flag>--valid</flag>
+ </test>
+ <test>
+ <testname>URI Module Regression Tests (1)</testname>
+ <testprog>testURI</testprog>
+ <srcsub>URI</srcsub>
+ <stdin/>
+ <ressub>URI</ressub>
+ <reserrext>None</reserrext>
+ <file>*.data</file>
+ <!-- Note - the following arg needs to use ", not ' -->
+ <flag>-base "http://foo.com/path/to/index.html?orig#help"</flag>
+ </test>
+ <test>
+ <testname>URI Module Regression Tests (2)</testname>
+ <testprog>testURI</testprog>
+ <srcsub>URI</srcsub>
+ <stdin/>
+ <ressub>URI</ressub>
+ <reserrext>None</reserrext>
+ <file>*.uri</file>
+ </test>
+ <test>
+ <testname>XPath Regression Tests (1)</testname>
+ <testprog>testXPath</testprog>
+ <srcsub>XPath/expr</srcsub>
+ <ressub>XPath/expr</ressub>
+ <file>*</file>
+ <flag>-f</flag>
+ <flag>--expr</flag>
+ </test>
+ <test>
+ <testname>XInclude Regression Tests</testname>
+ <srcsub>XInclude/docs</srcsub>
+ <ressub>XInclude</ressub>
+ <file>*</file>
+ <flag>--nowarning</flag>
+ <flag>--xinclude</flag>
+ </test>
+ <test>
+ <testname>XInclude xmlReader Regression Tests</testname>
+ <srcsub>XInclude/docs</srcsub>
+ <ressub>XInclude</ressub>
+ <resext>rdr</resext>
+ <file>*</file>
+ <flag>--nowarning</flag>
+ <flag>--xinclude</flag>
+ <flag>--stream</flag>
+ <flag>--debug</flag>
+ </test>
+</RegressionTests>
diff --git a/relaxng.c b/relaxng.c
new file mode 100644
index 0000000..8d88e95
--- /dev/null
+++ b/relaxng.c
@@ -0,0 +1,11053 @@
+/*
+ * relaxng.c : implementation of the Relax-NG handling and validity checking
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+/**
+ * TODO:
+ * - add support for DTD compatibility spec
+ * http://www.oasis-open.org/committees/relax-ng/compatibility-20011203.html
+ * - report better mem allocations pbms at runtime and abort immediately.
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <string.h>
+#include <stdio.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/hash.h>
+#include <libxml/uri.h>
+
+#include <libxml/relaxng.h>
+
+#include <libxml/xmlschemastypes.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/xmlschemastypes.h>
+
+/*
+ * The Relax-NG namespace
+ */
+static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
+ "http://relaxng.org/ns/structure/1.0";
+
+#define IS_RELAXNG(node, typ) \
+ ((node != NULL) && (node->ns != NULL) && \
+ (node->type == XML_ELEMENT_NODE) && \
+ (xmlStrEqual(node->name, (const xmlChar *) typ)) && \
+ (xmlStrEqual(node->ns->href, xmlRelaxNGNs)))
+
+
+#if 0
+#define DEBUG 1
+
+#define DEBUG_GRAMMAR 1
+
+#define DEBUG_CONTENT 1
+
+#define DEBUG_TYPE 1
+
+#define DEBUG_VALID 1
+
+#define DEBUG_INTERLEAVE 1
+
+#define DEBUG_LIST 1
+
+#define DEBUG_INCLUDE 1
+
+#define DEBUG_ERROR 1
+
+#define DEBUG_COMPILE 1
+
+#define DEBUG_PROGRESSIVE 1
+#endif
+
+#define MAX_ERROR 5
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+typedef struct _xmlRelaxNGSchema xmlRelaxNGSchema;
+typedef xmlRelaxNGSchema *xmlRelaxNGSchemaPtr;
+
+typedef struct _xmlRelaxNGDefine xmlRelaxNGDefine;
+typedef xmlRelaxNGDefine *xmlRelaxNGDefinePtr;
+
+typedef struct _xmlRelaxNGDocument xmlRelaxNGDocument;
+typedef xmlRelaxNGDocument *xmlRelaxNGDocumentPtr;
+
+typedef struct _xmlRelaxNGInclude xmlRelaxNGInclude;
+typedef xmlRelaxNGInclude *xmlRelaxNGIncludePtr;
+
+typedef enum {
+ XML_RELAXNG_COMBINE_UNDEFINED = 0, /* undefined */
+ XML_RELAXNG_COMBINE_CHOICE, /* choice */
+ XML_RELAXNG_COMBINE_INTERLEAVE /* interleave */
+} xmlRelaxNGCombine;
+
+typedef enum {
+ XML_RELAXNG_CONTENT_ERROR = -1,
+ XML_RELAXNG_CONTENT_EMPTY = 0,
+ XML_RELAXNG_CONTENT_SIMPLE,
+ XML_RELAXNG_CONTENT_COMPLEX
+} xmlRelaxNGContentType;
+
+typedef struct _xmlRelaxNGGrammar xmlRelaxNGGrammar;
+typedef xmlRelaxNGGrammar *xmlRelaxNGGrammarPtr;
+
+struct _xmlRelaxNGGrammar {
+ xmlRelaxNGGrammarPtr parent; /* the parent grammar if any */
+ xmlRelaxNGGrammarPtr children; /* the children grammar if any */
+ xmlRelaxNGGrammarPtr next; /* the next grammar if any */
+ xmlRelaxNGDefinePtr start; /* <start> content */
+ xmlRelaxNGCombine combine; /* the default combine value */
+ xmlRelaxNGDefinePtr startList; /* list of <start> definitions */
+ xmlHashTablePtr defs; /* define* */
+ xmlHashTablePtr refs; /* references */
+};
+
+
+typedef enum {
+ XML_RELAXNG_NOOP = -1, /* a no operation from simplification */
+ XML_RELAXNG_EMPTY = 0, /* an empty pattern */
+ XML_RELAXNG_NOT_ALLOWED, /* not allowed top */
+ XML_RELAXNG_EXCEPT, /* except present in nameclass defs */
+ XML_RELAXNG_TEXT, /* textual content */
+ XML_RELAXNG_ELEMENT, /* an element */
+ XML_RELAXNG_DATATYPE, /* extenal data type definition */
+ XML_RELAXNG_PARAM, /* extenal data type parameter */
+ XML_RELAXNG_VALUE, /* value from an extenal data type definition */
+ XML_RELAXNG_LIST, /* a list of patterns */
+ XML_RELAXNG_ATTRIBUTE, /* an attrbute following a pattern */
+ XML_RELAXNG_DEF, /* a definition */
+ XML_RELAXNG_REF, /* reference to a definition */
+ XML_RELAXNG_EXTERNALREF, /* reference to an external def */
+ XML_RELAXNG_PARENTREF, /* reference to a def in the parent grammar */
+ XML_RELAXNG_OPTIONAL, /* optional patterns */
+ XML_RELAXNG_ZEROORMORE, /* zero or more non empty patterns */
+ XML_RELAXNG_ONEORMORE, /* one or more non empty patterns */
+ XML_RELAXNG_CHOICE, /* a choice between non empty patterns */
+ XML_RELAXNG_GROUP, /* a pair/group of non empty patterns */
+ XML_RELAXNG_INTERLEAVE, /* interleaving choice of non-empty patterns */
+ XML_RELAXNG_START /* Used to keep track of starts on grammars */
+} xmlRelaxNGType;
+
+#define IS_NULLABLE (1 << 0)
+#define IS_NOT_NULLABLE (1 << 1)
+#define IS_INDETERMINIST (1 << 2)
+#define IS_MIXED (1 << 3)
+#define IS_TRIABLE (1 << 4)
+#define IS_PROCESSED (1 << 5)
+#define IS_COMPILABLE (1 << 6)
+#define IS_NOT_COMPILABLE (1 << 7)
+#define IS_EXTERNAL_REF (1 << 8)
+
+struct _xmlRelaxNGDefine {
+ xmlRelaxNGType type; /* the type of definition */
+ xmlNodePtr node; /* the node in the source */
+ xmlChar *name; /* the element local name if present */
+ xmlChar *ns; /* the namespace local name if present */
+ xmlChar *value; /* value when available */
+ void *data; /* data lib or specific pointer */
+ xmlRelaxNGDefinePtr content; /* the expected content */
+ xmlRelaxNGDefinePtr parent; /* the parent definition, if any */
+ xmlRelaxNGDefinePtr next; /* list within grouping sequences */
+ xmlRelaxNGDefinePtr attrs; /* list of attributes for elements */
+ xmlRelaxNGDefinePtr nameClass; /* the nameClass definition if any */
+ xmlRelaxNGDefinePtr nextHash; /* next define in defs/refs hash tables */
+ short depth; /* used for the cycle detection */
+ short dflags; /* define related flags */
+ xmlRegexpPtr contModel; /* a compiled content model if available */
+};
+
+/**
+ * _xmlRelaxNG:
+ *
+ * A RelaxNGs definition
+ */
+struct _xmlRelaxNG {
+ void *_private; /* unused by the library for users or bindings */
+ xmlRelaxNGGrammarPtr topgrammar;
+ xmlDocPtr doc;
+
+ int idref; /* requires idref checking */
+
+ xmlHashTablePtr defs; /* define */
+ xmlHashTablePtr refs; /* references */
+ xmlRelaxNGDocumentPtr documents; /* all the documents loaded */
+ xmlRelaxNGIncludePtr includes; /* all the includes loaded */
+ int defNr; /* number of defines used */
+ xmlRelaxNGDefinePtr *defTab; /* pointer to the allocated definitions */
+
+};
+
+#define XML_RELAXNG_IN_ATTRIBUTE (1 << 0)
+#define XML_RELAXNG_IN_ONEORMORE (1 << 1)
+#define XML_RELAXNG_IN_LIST (1 << 2)
+#define XML_RELAXNG_IN_DATAEXCEPT (1 << 3)
+#define XML_RELAXNG_IN_START (1 << 4)
+#define XML_RELAXNG_IN_OOMGROUP (1 << 5)
+#define XML_RELAXNG_IN_OOMINTERLEAVE (1 << 6)
+#define XML_RELAXNG_IN_EXTERNALREF (1 << 7)
+#define XML_RELAXNG_IN_ANYEXCEPT (1 << 8)
+#define XML_RELAXNG_IN_NSEXCEPT (1 << 9)
+
+struct _xmlRelaxNGParserCtxt {
+ void *userData; /* user specific data block */
+ xmlRelaxNGValidityErrorFunc error; /* the callback in case of errors */
+ xmlRelaxNGValidityWarningFunc warning; /* the callback in case of warning */
+ xmlStructuredErrorFunc serror;
+ xmlRelaxNGValidErr err;
+
+ xmlRelaxNGPtr schema; /* The schema in use */
+ xmlRelaxNGGrammarPtr grammar; /* the current grammar */
+ xmlRelaxNGGrammarPtr parentgrammar; /* the parent grammar */
+ int flags; /* parser flags */
+ int nbErrors; /* number of errors at parse time */
+ int nbWarnings; /* number of warnings at parse time */
+ const xmlChar *define; /* the current define scope */
+ xmlRelaxNGDefinePtr def; /* the current define */
+
+ int nbInterleaves;
+ xmlHashTablePtr interleaves; /* keep track of all the interleaves */
+
+ xmlRelaxNGDocumentPtr documents; /* all the documents loaded */
+ xmlRelaxNGIncludePtr includes; /* all the includes loaded */
+ xmlChar *URL;
+ xmlDocPtr document;
+
+ int defNr; /* number of defines used */
+ int defMax; /* number of defines aloocated */
+ xmlRelaxNGDefinePtr *defTab; /* pointer to the allocated definitions */
+
+ const char *buffer;
+ int size;
+
+ /* the document stack */
+ xmlRelaxNGDocumentPtr doc; /* Current parsed external ref */
+ int docNr; /* Depth of the parsing stack */
+ int docMax; /* Max depth of the parsing stack */
+ xmlRelaxNGDocumentPtr *docTab; /* array of docs */
+
+ /* the include stack */
+ xmlRelaxNGIncludePtr inc; /* Current parsed include */
+ int incNr; /* Depth of the include parsing stack */
+ int incMax; /* Max depth of the parsing stack */
+ xmlRelaxNGIncludePtr *incTab; /* array of incs */
+
+ int idref; /* requires idref checking */
+
+ /* used to compile content models */
+ xmlAutomataPtr am; /* the automata */
+ xmlAutomataStatePtr state; /* used to build the automata */
+
+ int crng; /* compact syntax and other flags */
+ int freedoc; /* need to free the document */
+};
+
+#define FLAGS_IGNORABLE 1
+#define FLAGS_NEGATIVE 2
+#define FLAGS_MIXED_CONTENT 4
+#define FLAGS_NOERROR 8
+
+/**
+ * xmlRelaxNGInterleaveGroup:
+ *
+ * A RelaxNGs partition set associated to lists of definitions
+ */
+typedef struct _xmlRelaxNGInterleaveGroup xmlRelaxNGInterleaveGroup;
+typedef xmlRelaxNGInterleaveGroup *xmlRelaxNGInterleaveGroupPtr;
+struct _xmlRelaxNGInterleaveGroup {
+ xmlRelaxNGDefinePtr rule; /* the rule to satisfy */
+ xmlRelaxNGDefinePtr *defs; /* the array of element definitions */
+ xmlRelaxNGDefinePtr *attrs; /* the array of attributes definitions */
+};
+
+#define IS_DETERMINIST 1
+#define IS_NEEDCHECK 2
+
+/**
+ * xmlRelaxNGPartitions:
+ *
+ * A RelaxNGs partition associated to an interleave group
+ */
+typedef struct _xmlRelaxNGPartition xmlRelaxNGPartition;
+typedef xmlRelaxNGPartition *xmlRelaxNGPartitionPtr;
+struct _xmlRelaxNGPartition {
+ int nbgroups; /* number of groups in the partitions */
+ xmlHashTablePtr triage; /* hash table used to direct nodes to the
+ * right group when possible */
+ int flags; /* determinist ? */
+ xmlRelaxNGInterleaveGroupPtr *groups;
+};
+
+/**
+ * xmlRelaxNGValidState:
+ *
+ * A RelaxNGs validation state
+ */
+#define MAX_ATTR 20
+typedef struct _xmlRelaxNGValidState xmlRelaxNGValidState;
+typedef xmlRelaxNGValidState *xmlRelaxNGValidStatePtr;
+struct _xmlRelaxNGValidState {
+ xmlNodePtr node; /* the current node */
+ xmlNodePtr seq; /* the sequence of children left to validate */
+ int nbAttrs; /* the number of attributes */
+ int maxAttrs; /* the size of attrs */
+ int nbAttrLeft; /* the number of attributes left to validate */
+ xmlChar *value; /* the value when operating on string */
+ xmlChar *endvalue; /* the end value when operating on string */
+ xmlAttrPtr *attrs; /* the array of attributes */
+};
+
+/**
+ * xmlRelaxNGStates:
+ *
+ * A RelaxNGs container for validation state
+ */
+typedef struct _xmlRelaxNGStates xmlRelaxNGStates;
+typedef xmlRelaxNGStates *xmlRelaxNGStatesPtr;
+struct _xmlRelaxNGStates {
+ int nbState; /* the number of states */
+ int maxState; /* the size of the array */
+ xmlRelaxNGValidStatePtr *tabState;
+};
+
+#define ERROR_IS_DUP 1
+
+/**
+ * xmlRelaxNGValidError:
+ *
+ * A RelaxNGs validation error
+ */
+typedef struct _xmlRelaxNGValidError xmlRelaxNGValidError;
+typedef xmlRelaxNGValidError *xmlRelaxNGValidErrorPtr;
+struct _xmlRelaxNGValidError {
+ xmlRelaxNGValidErr err; /* the error number */
+ int flags; /* flags */
+ xmlNodePtr node; /* the current node */
+ xmlNodePtr seq; /* the current child */
+ const xmlChar *arg1; /* first arg */
+ const xmlChar *arg2; /* second arg */
+};
+
+/**
+ * xmlRelaxNGValidCtxt:
+ *
+ * A RelaxNGs validation context
+ */
+
+struct _xmlRelaxNGValidCtxt {
+ void *userData; /* user specific data block */
+ xmlRelaxNGValidityErrorFunc error; /* the callback in case of errors */
+ xmlRelaxNGValidityWarningFunc warning; /* the callback in case of warning */
+ xmlStructuredErrorFunc serror;
+ int nbErrors; /* number of errors in validation */
+
+ xmlRelaxNGPtr schema; /* The schema in use */
+ xmlDocPtr doc; /* the document being validated */
+ int flags; /* validation flags */
+ int depth; /* validation depth */
+ int idref; /* requires idref checking */
+ int errNo; /* the first error found */
+
+ /*
+ * Errors accumulated in branches may have to be stacked to be
+ * provided back when it's sure they affect validation.
+ */
+ xmlRelaxNGValidErrorPtr err; /* Last error */
+ int errNr; /* Depth of the error stack */
+ int errMax; /* Max depth of the error stack */
+ xmlRelaxNGValidErrorPtr errTab; /* stack of errors */
+
+ xmlRelaxNGValidStatePtr state; /* the current validation state */
+ xmlRelaxNGStatesPtr states; /* the accumulated state list */
+
+ xmlRelaxNGStatesPtr freeState; /* the pool of free valid states */
+ int freeStatesNr;
+ int freeStatesMax;
+ xmlRelaxNGStatesPtr *freeStates; /* the pool of free state groups */
+
+ /*
+ * This is used for "progressive" validation
+ */
+ xmlRegExecCtxtPtr elem; /* the current element regexp */
+ int elemNr; /* the number of element validated */
+ int elemMax; /* the max depth of elements */
+ xmlRegExecCtxtPtr *elemTab; /* the stack of regexp runtime */
+ int pstate; /* progressive state */
+ xmlNodePtr pnode; /* the current node */
+ xmlRelaxNGDefinePtr pdef; /* the non-streamable definition */
+ int perr; /* signal error in content model
+ * outside the regexp */
+};
+
+/**
+ * xmlRelaxNGInclude:
+ *
+ * Structure associated to a RelaxNGs document element
+ */
+struct _xmlRelaxNGInclude {
+ xmlRelaxNGIncludePtr next; /* keep a chain of includes */
+ xmlChar *href; /* the normalized href value */
+ xmlDocPtr doc; /* the associated XML document */
+ xmlRelaxNGDefinePtr content; /* the definitions */
+ xmlRelaxNGPtr schema; /* the schema */
+};
+
+/**
+ * xmlRelaxNGDocument:
+ *
+ * Structure associated to a RelaxNGs document element
+ */
+struct _xmlRelaxNGDocument {
+ xmlRelaxNGDocumentPtr next; /* keep a chain of documents */
+ xmlChar *href; /* the normalized href value */
+ xmlDocPtr doc; /* the associated XML document */
+ xmlRelaxNGDefinePtr content; /* the definitions */
+ xmlRelaxNGPtr schema; /* the schema */
+ int externalRef; /* 1 if an external ref */
+};
+
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRngPErrMemory:
+ * @ctxt: an Relax-NG parser context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlRngPErrMemory(xmlRelaxNGParserCtxtPtr ctxt, const char *extra)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->serror != NULL)
+ schannel = ctxt->serror;
+ else
+ channel = ctxt->error;
+ data = ctxt->userData;
+ ctxt->nbErrors++;
+ }
+ if (extra)
+ __xmlRaiseError(schannel, channel, data,
+ NULL, NULL, XML_FROM_RELAXNGP,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(schannel, channel, data,
+ NULL, NULL, XML_FROM_RELAXNGP,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "Memory allocation failed\n");
+}
+
+/**
+ * xmlRngVErrMemory:
+ * @ctxt: a Relax-NG validation context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->serror != NULL)
+ schannel = ctxt->serror;
+ else
+ channel = ctxt->error;
+ data = ctxt->userData;
+ ctxt->nbErrors++;
+ }
+ if (extra)
+ __xmlRaiseError(schannel, channel, data,
+ NULL, NULL, XML_FROM_RELAXNGV,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(schannel, channel, data,
+ NULL, NULL, XML_FROM_RELAXNGV,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "Memory allocation failed\n");
+}
+
+/**
+ * xmlRngPErr:
+ * @ctxt: a Relax-NG parser context
+ * @node: the node raising the error
+ * @error: the error code
+ * @msg: message
+ * @str1: extra info
+ * @str2: extra info
+ *
+ * Handle a Relax NG Parsing error
+ */
+static void
+xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->serror != NULL)
+ schannel = ctxt->serror;
+ else
+ channel = ctxt->error;
+ data = ctxt->userData;
+ ctxt->nbErrors++;
+ }
+ __xmlRaiseError(schannel, channel, data,
+ NULL, node, XML_FROM_RELAXNGP,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
+}
+
+/**
+ * xmlRngVErr:
+ * @ctxt: a Relax-NG validation context
+ * @node: the node raising the error
+ * @error: the error code
+ * @msg: message
+ * @str1: extra info
+ * @str2: extra info
+ *
+ * Handle a Relax NG Validation error
+ */
+static void
+xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->serror != NULL)
+ schannel = ctxt->serror;
+ else
+ channel = ctxt->error;
+ data = ctxt->userData;
+ ctxt->nbErrors++;
+ }
+ __xmlRaiseError(schannel, channel, data,
+ NULL, node, XML_FROM_RELAXNGV,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
+}
+
+/************************************************************************
+ * *
+ * Preliminary type checking interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRelaxNGTypeHave:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value: the value to check
+ *
+ * Function provided by a type library to check if a type is exported
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+typedef int (*xmlRelaxNGTypeHave) (void *data, const xmlChar * type);
+
+/**
+ * xmlRelaxNGTypeCheck:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value: the value to check
+ * @result: place to store the result if needed
+ *
+ * Function provided by a type library to check if a value match a type
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+typedef int (*xmlRelaxNGTypeCheck) (void *data, const xmlChar * type,
+ const xmlChar * value, void **result,
+ xmlNodePtr node);
+
+/**
+ * xmlRelaxNGFacetCheck:
+ * @data: data needed for the library
+ * @type: the type name
+ * @facet: the facet name
+ * @val: the facet value
+ * @strval: the string value
+ * @value: the value to check
+ *
+ * Function provided by a type library to check a value facet
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+typedef int (*xmlRelaxNGFacetCheck) (void *data, const xmlChar * type,
+ const xmlChar * facet,
+ const xmlChar * val,
+ const xmlChar * strval, void *value);
+
+/**
+ * xmlRelaxNGTypeFree:
+ * @data: data needed for the library
+ * @result: the value to free
+ *
+ * Function provided by a type library to free a returned result
+ */
+typedef void (*xmlRelaxNGTypeFree) (void *data, void *result);
+
+/**
+ * xmlRelaxNGTypeCompare:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value1: the first value
+ * @value2: the second value
+ *
+ * Function provided by a type library to compare two values accordingly
+ * to a type.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+typedef int (*xmlRelaxNGTypeCompare) (void *data, const xmlChar * type,
+ const xmlChar * value1,
+ xmlNodePtr ctxt1,
+ void *comp1,
+ const xmlChar * value2,
+ xmlNodePtr ctxt2);
+typedef struct _xmlRelaxNGTypeLibrary xmlRelaxNGTypeLibrary;
+typedef xmlRelaxNGTypeLibrary *xmlRelaxNGTypeLibraryPtr;
+struct _xmlRelaxNGTypeLibrary {
+ const xmlChar *namespace; /* the datatypeLibrary value */
+ void *data; /* data needed for the library */
+ xmlRelaxNGTypeHave have; /* the export function */
+ xmlRelaxNGTypeCheck check; /* the checking function */
+ xmlRelaxNGTypeCompare comp; /* the compare function */
+ xmlRelaxNGFacetCheck facet; /* the facet check function */
+ xmlRelaxNGTypeFree freef; /* the freeing function */
+};
+
+/************************************************************************
+ * *
+ * Allocation functions *
+ * *
+ ************************************************************************/
+static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar);
+static void xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define);
+static void xmlRelaxNGNormExtSpace(xmlChar * value);
+static void xmlRelaxNGFreeInnerSchema(xmlRelaxNGPtr schema);
+static int xmlRelaxNGEqualValidState(xmlRelaxNGValidCtxtPtr ctxt
+ ATTRIBUTE_UNUSED,
+ xmlRelaxNGValidStatePtr state1,
+ xmlRelaxNGValidStatePtr state2);
+static void xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidStatePtr state);
+
+/**
+ * xmlRelaxNGFreeDocument:
+ * @docu: a document structure
+ *
+ * Deallocate a RelaxNG document structure.
+ */
+static void
+xmlRelaxNGFreeDocument(xmlRelaxNGDocumentPtr docu)
+{
+ if (docu == NULL)
+ return;
+
+ if (docu->href != NULL)
+ xmlFree(docu->href);
+ if (docu->doc != NULL)
+ xmlFreeDoc(docu->doc);
+ if (docu->schema != NULL)
+ xmlRelaxNGFreeInnerSchema(docu->schema);
+ xmlFree(docu);
+}
+
+/**
+ * xmlRelaxNGFreeDocumentList:
+ * @docu: a list of document structure
+ *
+ * Deallocate a RelaxNG document structures.
+ */
+static void
+xmlRelaxNGFreeDocumentList(xmlRelaxNGDocumentPtr docu)
+{
+ xmlRelaxNGDocumentPtr next;
+
+ while (docu != NULL) {
+ next = docu->next;
+ xmlRelaxNGFreeDocument(docu);
+ docu = next;
+ }
+}
+
+/**
+ * xmlRelaxNGFreeInclude:
+ * @incl: a include structure
+ *
+ * Deallocate a RelaxNG include structure.
+ */
+static void
+xmlRelaxNGFreeInclude(xmlRelaxNGIncludePtr incl)
+{
+ if (incl == NULL)
+ return;
+
+ if (incl->href != NULL)
+ xmlFree(incl->href);
+ if (incl->doc != NULL)
+ xmlFreeDoc(incl->doc);
+ if (incl->schema != NULL)
+ xmlRelaxNGFree(incl->schema);
+ xmlFree(incl);
+}
+
+/**
+ * xmlRelaxNGFreeIncludeList:
+ * @incl: a include structure list
+ *
+ * Deallocate a RelaxNG include structure.
+ */
+static void
+xmlRelaxNGFreeIncludeList(xmlRelaxNGIncludePtr incl)
+{
+ xmlRelaxNGIncludePtr next;
+
+ while (incl != NULL) {
+ next = incl->next;
+ xmlRelaxNGFreeInclude(incl);
+ incl = next;
+ }
+}
+
+/**
+ * xmlRelaxNGNewRelaxNG:
+ * @ctxt: a Relax-NG validation context (optional)
+ *
+ * Allocate a new RelaxNG structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGPtr
+xmlRelaxNGNewRelaxNG(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ xmlRelaxNGPtr ret;
+
+ ret = (xmlRelaxNGPtr) xmlMalloc(sizeof(xmlRelaxNG));
+ if (ret == NULL) {
+ xmlRngPErrMemory(ctxt, NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNG));
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGFreeInnerSchema:
+ * @schema: a schema structure
+ *
+ * Deallocate a RelaxNG schema structure.
+ */
+static void
+xmlRelaxNGFreeInnerSchema(xmlRelaxNGPtr schema)
+{
+ if (schema == NULL)
+ return;
+
+ if (schema->doc != NULL)
+ xmlFreeDoc(schema->doc);
+ if (schema->defTab != NULL) {
+ int i;
+
+ for (i = 0; i < schema->defNr; i++)
+ xmlRelaxNGFreeDefine(schema->defTab[i]);
+ xmlFree(schema->defTab);
+ }
+
+ xmlFree(schema);
+}
+
+/**
+ * xmlRelaxNGFree:
+ * @schema: a schema structure
+ *
+ * Deallocate a RelaxNG structure.
+ */
+void
+xmlRelaxNGFree(xmlRelaxNGPtr schema)
+{
+ if (schema == NULL)
+ return;
+
+ if (schema->topgrammar != NULL)
+ xmlRelaxNGFreeGrammar(schema->topgrammar);
+ if (schema->doc != NULL)
+ xmlFreeDoc(schema->doc);
+ if (schema->documents != NULL)
+ xmlRelaxNGFreeDocumentList(schema->documents);
+ if (schema->includes != NULL)
+ xmlRelaxNGFreeIncludeList(schema->includes);
+ if (schema->defTab != NULL) {
+ int i;
+
+ for (i = 0; i < schema->defNr; i++)
+ xmlRelaxNGFreeDefine(schema->defTab[i]);
+ xmlFree(schema->defTab);
+ }
+
+ xmlFree(schema);
+}
+
+/**
+ * xmlRelaxNGNewGrammar:
+ * @ctxt: a Relax-NG validation context (optional)
+ *
+ * Allocate a new RelaxNG grammar.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGGrammarPtr
+xmlRelaxNGNewGrammar(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ xmlRelaxNGGrammarPtr ret;
+
+ ret = (xmlRelaxNGGrammarPtr) xmlMalloc(sizeof(xmlRelaxNGGrammar));
+ if (ret == NULL) {
+ xmlRngPErrMemory(ctxt, NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGGrammar));
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGFreeGrammar:
+ * @grammar: a grammar structure
+ *
+ * Deallocate a RelaxNG grammar structure.
+ */
+static void
+xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar)
+{
+ if (grammar == NULL)
+ return;
+
+ if (grammar->children != NULL) {
+ xmlRelaxNGFreeGrammar(grammar->children);
+ }
+ if (grammar->next != NULL) {
+ xmlRelaxNGFreeGrammar(grammar->next);
+ }
+ if (grammar->refs != NULL) {
+ xmlHashFree(grammar->refs, NULL);
+ }
+ if (grammar->defs != NULL) {
+ xmlHashFree(grammar->defs, NULL);
+ }
+
+ xmlFree(grammar);
+}
+
+/**
+ * xmlRelaxNGNewDefine:
+ * @ctxt: a Relax-NG validation context
+ * @node: the node in the input document.
+ *
+ * Allocate a new RelaxNG define.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGNewDefine(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr ret;
+
+ if (ctxt->defMax == 0) {
+ ctxt->defMax = 16;
+ ctxt->defNr = 0;
+ ctxt->defTab = (xmlRelaxNGDefinePtr *)
+ xmlMalloc(ctxt->defMax * sizeof(xmlRelaxNGDefinePtr));
+ if (ctxt->defTab == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating define\n");
+ return (NULL);
+ }
+ } else if (ctxt->defMax <= ctxt->defNr) {
+ xmlRelaxNGDefinePtr *tmp;
+
+ ctxt->defMax *= 2;
+ tmp = (xmlRelaxNGDefinePtr *) xmlRealloc(ctxt->defTab,
+ ctxt->defMax *
+ sizeof
+ (xmlRelaxNGDefinePtr));
+ if (tmp == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating define\n");
+ return (NULL);
+ }
+ ctxt->defTab = tmp;
+ }
+ ret = (xmlRelaxNGDefinePtr) xmlMalloc(sizeof(xmlRelaxNGDefine));
+ if (ret == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating define\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGDefine));
+ ctxt->defTab[ctxt->defNr++] = ret;
+ ret->node = node;
+ ret->depth = -1;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGFreePartition:
+ * @partitions: a partition set structure
+ *
+ * Deallocate RelaxNG partition set structures.
+ */
+static void
+xmlRelaxNGFreePartition(xmlRelaxNGPartitionPtr partitions)
+{
+ xmlRelaxNGInterleaveGroupPtr group;
+ int j;
+
+ if (partitions != NULL) {
+ if (partitions->groups != NULL) {
+ for (j = 0; j < partitions->nbgroups; j++) {
+ group = partitions->groups[j];
+ if (group != NULL) {
+ if (group->defs != NULL)
+ xmlFree(group->defs);
+ if (group->attrs != NULL)
+ xmlFree(group->attrs);
+ xmlFree(group);
+ }
+ }
+ xmlFree(partitions->groups);
+ }
+ if (partitions->triage != NULL) {
+ xmlHashFree(partitions->triage, NULL);
+ }
+ xmlFree(partitions);
+ }
+}
+
+/**
+ * xmlRelaxNGFreeDefine:
+ * @define: a define structure
+ *
+ * Deallocate a RelaxNG define structure.
+ */
+static void
+xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define)
+{
+ if (define == NULL)
+ return;
+
+ if ((define->type == XML_RELAXNG_VALUE) && (define->attrs != NULL)) {
+ xmlRelaxNGTypeLibraryPtr lib;
+
+ lib = (xmlRelaxNGTypeLibraryPtr) define->data;
+ if ((lib != NULL) && (lib->freef != NULL))
+ lib->freef(lib->data, (void *) define->attrs);
+ }
+ if ((define->data != NULL) && (define->type == XML_RELAXNG_INTERLEAVE))
+ xmlRelaxNGFreePartition((xmlRelaxNGPartitionPtr) define->data);
+ if ((define->data != NULL) && (define->type == XML_RELAXNG_CHOICE))
+ xmlHashFree((xmlHashTablePtr) define->data, NULL);
+ if (define->name != NULL)
+ xmlFree(define->name);
+ if (define->ns != NULL)
+ xmlFree(define->ns);
+ if (define->value != NULL)
+ xmlFree(define->value);
+ if (define->contModel != NULL)
+ xmlRegFreeRegexp(define->contModel);
+ xmlFree(define);
+}
+
+/**
+ * xmlRelaxNGNewStates:
+ * @ctxt: a Relax-NG validation context
+ * @size: the default size for the container
+ *
+ * Allocate a new RelaxNG validation state container
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGStatesPtr
+xmlRelaxNGNewStates(xmlRelaxNGValidCtxtPtr ctxt, int size)
+{
+ xmlRelaxNGStatesPtr ret;
+
+ if ((ctxt != NULL) &&
+ (ctxt->freeStates != NULL) && (ctxt->freeStatesNr > 0)) {
+ ctxt->freeStatesNr--;
+ ret = ctxt->freeStates[ctxt->freeStatesNr];
+ ret->nbState = 0;
+ return (ret);
+ }
+ if (size < 16)
+ size = 16;
+
+ ret = (xmlRelaxNGStatesPtr) xmlMalloc(sizeof(xmlRelaxNGStates) +
+ (size -
+ 1) *
+ sizeof(xmlRelaxNGValidStatePtr));
+ if (ret == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ return (NULL);
+ }
+ ret->nbState = 0;
+ ret->maxState = size;
+ ret->tabState = (xmlRelaxNGValidStatePtr *) xmlMalloc((size) *
+ sizeof
+ (xmlRelaxNGValidStatePtr));
+ if (ret->tabState == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ xmlFree(ret);
+ return (NULL);
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGAddStateUniq:
+ * @ctxt: a Relax-NG validation context
+ * @states: the states container
+ * @state: the validation state
+ *
+ * Add a RelaxNG validation state to the container without checking
+ * for unicity.
+ *
+ * Return 1 in case of success and 0 if this is a duplicate and -1 on error
+ */
+static int
+xmlRelaxNGAddStatesUniq(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGStatesPtr states,
+ xmlRelaxNGValidStatePtr state)
+{
+ if (state == NULL) {
+ return (-1);
+ }
+ if (states->nbState >= states->maxState) {
+ xmlRelaxNGValidStatePtr *tmp;
+ int size;
+
+ size = states->maxState * 2;
+ tmp = (xmlRelaxNGValidStatePtr *) xmlRealloc(states->tabState,
+ (size) *
+ sizeof
+ (xmlRelaxNGValidStatePtr));
+ if (tmp == NULL) {
+ xmlRngVErrMemory(ctxt, "adding states\n");
+ return (-1);
+ }
+ states->tabState = tmp;
+ states->maxState = size;
+ }
+ states->tabState[states->nbState++] = state;
+ return (1);
+}
+
+/**
+ * xmlRelaxNGAddState:
+ * @ctxt: a Relax-NG validation context
+ * @states: the states container
+ * @state: the validation state
+ *
+ * Add a RelaxNG validation state to the container
+ *
+ * Return 1 in case of success and 0 if this is a duplicate and -1 on error
+ */
+static int
+xmlRelaxNGAddStates(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGStatesPtr states,
+ xmlRelaxNGValidStatePtr state)
+{
+ int i;
+
+ if (state == NULL || states == NULL) {
+ return (-1);
+ }
+ if (states->nbState >= states->maxState) {
+ xmlRelaxNGValidStatePtr *tmp;
+ int size;
+
+ size = states->maxState * 2;
+ tmp = (xmlRelaxNGValidStatePtr *) xmlRealloc(states->tabState,
+ (size) *
+ sizeof
+ (xmlRelaxNGValidStatePtr));
+ if (tmp == NULL) {
+ xmlRngVErrMemory(ctxt, "adding states\n");
+ return (-1);
+ }
+ states->tabState = tmp;
+ states->maxState = size;
+ }
+ for (i = 0; i < states->nbState; i++) {
+ if (xmlRelaxNGEqualValidState(ctxt, state, states->tabState[i])) {
+ xmlRelaxNGFreeValidState(ctxt, state);
+ return (0);
+ }
+ }
+ states->tabState[states->nbState++] = state;
+ return (1);
+}
+
+/**
+ * xmlRelaxNGFreeStates:
+ * @ctxt: a Relax-NG validation context
+ * @states: teh container
+ *
+ * Free a RelaxNG validation state container
+ */
+static void
+xmlRelaxNGFreeStates(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGStatesPtr states)
+{
+ if (states == NULL)
+ return;
+ if ((ctxt != NULL) && (ctxt->freeStates == NULL)) {
+ ctxt->freeStatesMax = 40;
+ ctxt->freeStatesNr = 0;
+ ctxt->freeStates = (xmlRelaxNGStatesPtr *)
+ xmlMalloc(ctxt->freeStatesMax * sizeof(xmlRelaxNGStatesPtr));
+ if (ctxt->freeStates == NULL) {
+ xmlRngVErrMemory(ctxt, "storing states\n");
+ }
+ } else if ((ctxt != NULL)
+ && (ctxt->freeStatesNr >= ctxt->freeStatesMax)) {
+ xmlRelaxNGStatesPtr *tmp;
+
+ tmp = (xmlRelaxNGStatesPtr *) xmlRealloc(ctxt->freeStates,
+ 2 * ctxt->freeStatesMax *
+ sizeof
+ (xmlRelaxNGStatesPtr));
+ if (tmp == NULL) {
+ xmlRngVErrMemory(ctxt, "storing states\n");
+ xmlFree(states->tabState);
+ xmlFree(states);
+ return;
+ }
+ ctxt->freeStates = tmp;
+ ctxt->freeStatesMax *= 2;
+ }
+ if ((ctxt == NULL) || (ctxt->freeStates == NULL)) {
+ xmlFree(states->tabState);
+ xmlFree(states);
+ } else {
+ ctxt->freeStates[ctxt->freeStatesNr++] = states;
+ }
+}
+
+/**
+ * xmlRelaxNGNewValidState:
+ * @ctxt: a Relax-NG validation context
+ * @node: the current node or NULL for the document
+ *
+ * Allocate a new RelaxNG validation state
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGValidStatePtr
+xmlRelaxNGNewValidState(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGValidStatePtr ret;
+ xmlAttrPtr attr;
+ xmlAttrPtr attrs[MAX_ATTR];
+ int nbAttrs = 0;
+ xmlNodePtr root = NULL;
+
+ if (node == NULL) {
+ root = xmlDocGetRootElement(ctxt->doc);
+ if (root == NULL)
+ return (NULL);
+ } else {
+ attr = node->properties;
+ while (attr != NULL) {
+ if (nbAttrs < MAX_ATTR)
+ attrs[nbAttrs++] = attr;
+ else
+ nbAttrs++;
+ attr = attr->next;
+ }
+ }
+ if ((ctxt->freeState != NULL) && (ctxt->freeState->nbState > 0)) {
+ ctxt->freeState->nbState--;
+ ret = ctxt->freeState->tabState[ctxt->freeState->nbState];
+ } else {
+ ret =
+ (xmlRelaxNGValidStatePtr)
+ xmlMalloc(sizeof(xmlRelaxNGValidState));
+ if (ret == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGValidState));
+ }
+ ret->value = NULL;
+ ret->endvalue = NULL;
+ if (node == NULL) {
+ ret->node = (xmlNodePtr) ctxt->doc;
+ ret->seq = root;
+ } else {
+ ret->node = node;
+ ret->seq = node->children;
+ }
+ ret->nbAttrs = 0;
+ if (nbAttrs > 0) {
+ if (ret->attrs == NULL) {
+ if (nbAttrs < 4)
+ ret->maxAttrs = 4;
+ else
+ ret->maxAttrs = nbAttrs;
+ ret->attrs = (xmlAttrPtr *) xmlMalloc(ret->maxAttrs *
+ sizeof(xmlAttrPtr));
+ if (ret->attrs == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ return (ret);
+ }
+ } else if (ret->maxAttrs < nbAttrs) {
+ xmlAttrPtr *tmp;
+
+ tmp = (xmlAttrPtr *) xmlRealloc(ret->attrs, nbAttrs *
+ sizeof(xmlAttrPtr));
+ if (tmp == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ return (ret);
+ }
+ ret->attrs = tmp;
+ ret->maxAttrs = nbAttrs;
+ }
+ ret->nbAttrs = nbAttrs;
+ if (nbAttrs < MAX_ATTR) {
+ memcpy(ret->attrs, attrs, sizeof(xmlAttrPtr) * nbAttrs);
+ } else {
+ attr = node->properties;
+ nbAttrs = 0;
+ while (attr != NULL) {
+ ret->attrs[nbAttrs++] = attr;
+ attr = attr->next;
+ }
+ }
+ }
+ ret->nbAttrLeft = ret->nbAttrs;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCopyValidState:
+ * @ctxt: a Relax-NG validation context
+ * @state: a validation state
+ *
+ * Copy the validation state
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlRelaxNGValidStatePtr
+xmlRelaxNGCopyValidState(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidStatePtr state)
+{
+ xmlRelaxNGValidStatePtr ret;
+ unsigned int maxAttrs;
+ xmlAttrPtr *attrs;
+
+ if (state == NULL)
+ return (NULL);
+ if ((ctxt->freeState != NULL) && (ctxt->freeState->nbState > 0)) {
+ ctxt->freeState->nbState--;
+ ret = ctxt->freeState->tabState[ctxt->freeState->nbState];
+ } else {
+ ret =
+ (xmlRelaxNGValidStatePtr)
+ xmlMalloc(sizeof(xmlRelaxNGValidState));
+ if (ret == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGValidState));
+ }
+ attrs = ret->attrs;
+ maxAttrs = ret->maxAttrs;
+ memcpy(ret, state, sizeof(xmlRelaxNGValidState));
+ ret->attrs = attrs;
+ ret->maxAttrs = maxAttrs;
+ if (state->nbAttrs > 0) {
+ if (ret->attrs == NULL) {
+ ret->maxAttrs = state->maxAttrs;
+ ret->attrs = (xmlAttrPtr *) xmlMalloc(ret->maxAttrs *
+ sizeof(xmlAttrPtr));
+ if (ret->attrs == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ ret->nbAttrs = 0;
+ return (ret);
+ }
+ } else if (ret->maxAttrs < state->nbAttrs) {
+ xmlAttrPtr *tmp;
+
+ tmp = (xmlAttrPtr *) xmlRealloc(ret->attrs, state->maxAttrs *
+ sizeof(xmlAttrPtr));
+ if (tmp == NULL) {
+ xmlRngVErrMemory(ctxt, "allocating states\n");
+ ret->nbAttrs = 0;
+ return (ret);
+ }
+ ret->maxAttrs = state->maxAttrs;
+ ret->attrs = tmp;
+ }
+ memcpy(ret->attrs, state->attrs,
+ state->nbAttrs * sizeof(xmlAttrPtr));
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGEqualValidState:
+ * @ctxt: a Relax-NG validation context
+ * @state1: a validation state
+ * @state2: a validation state
+ *
+ * Compare the validation states for equality
+ *
+ * Returns 1 if equald, 0 otherwise
+ */
+static int
+xmlRelaxNGEqualValidState(xmlRelaxNGValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlRelaxNGValidStatePtr state1,
+ xmlRelaxNGValidStatePtr state2)
+{
+ int i;
+
+ if ((state1 == NULL) || (state2 == NULL))
+ return (0);
+ if (state1 == state2)
+ return (1);
+ if (state1->node != state2->node)
+ return (0);
+ if (state1->seq != state2->seq)
+ return (0);
+ if (state1->nbAttrLeft != state2->nbAttrLeft)
+ return (0);
+ if (state1->nbAttrs != state2->nbAttrs)
+ return (0);
+ if (state1->endvalue != state2->endvalue)
+ return (0);
+ if ((state1->value != state2->value) &&
+ (!xmlStrEqual(state1->value, state2->value)))
+ return (0);
+ for (i = 0; i < state1->nbAttrs; i++) {
+ if (state1->attrs[i] != state2->attrs[i])
+ return (0);
+ }
+ return (1);
+}
+
+/**
+ * xmlRelaxNGFreeValidState:
+ * @state: a validation state structure
+ *
+ * Deallocate a RelaxNG validation state structure.
+ */
+static void
+xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidStatePtr state)
+{
+ if (state == NULL)
+ return;
+
+ if ((ctxt != NULL) && (ctxt->freeState == NULL)) {
+ ctxt->freeState = xmlRelaxNGNewStates(ctxt, 40);
+ }
+ if ((ctxt == NULL) || (ctxt->freeState == NULL)) {
+ if (state->attrs != NULL)
+ xmlFree(state->attrs);
+ xmlFree(state);
+ } else {
+ xmlRelaxNGAddStatesUniq(ctxt, ctxt->freeState, state);
+ }
+}
+
+/************************************************************************
+ * *
+ * Semi internal functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRelaxParserSetFlag:
+ * @ctxt: a RelaxNG parser context
+ * @flags: a set of flags values
+ *
+ * Semi private function used to pass informations to a parser context
+ * which are a combination of xmlRelaxNGParserFlag .
+ *
+ * Returns 0 if success and -1 in case of error
+ */
+int
+xmlRelaxParserSetFlag(xmlRelaxNGParserCtxtPtr ctxt, int flags)
+{
+ if (ctxt == NULL) return(-1);
+ if (flags & XML_RELAXNGP_FREE_DOC) {
+ ctxt->crng |= XML_RELAXNGP_FREE_DOC;
+ flags -= XML_RELAXNGP_FREE_DOC;
+ }
+ if (flags & XML_RELAXNGP_CRNG) {
+ ctxt->crng |= XML_RELAXNGP_CRNG;
+ flags -= XML_RELAXNGP_CRNG;
+ }
+ if (flags != 0) return(-1);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Document functions *
+ * *
+ ************************************************************************/
+static xmlDocPtr xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlDocPtr doc);
+
+/**
+ * xmlRelaxNGIncludePush:
+ * @ctxt: the parser context
+ * @value: the element doc
+ *
+ * Pushes a new include on top of the include stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+xmlRelaxNGIncludePush(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGIncludePtr value)
+{
+ if (ctxt->incTab == NULL) {
+ ctxt->incMax = 4;
+ ctxt->incNr = 0;
+ ctxt->incTab =
+ (xmlRelaxNGIncludePtr *) xmlMalloc(ctxt->incMax *
+ sizeof(ctxt->incTab[0]));
+ if (ctxt->incTab == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating include\n");
+ return (0);
+ }
+ }
+ if (ctxt->incNr >= ctxt->incMax) {
+ ctxt->incMax *= 2;
+ ctxt->incTab =
+ (xmlRelaxNGIncludePtr *) xmlRealloc(ctxt->incTab,
+ ctxt->incMax *
+ sizeof(ctxt->incTab[0]));
+ if (ctxt->incTab == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating include\n");
+ return (0);
+ }
+ }
+ ctxt->incTab[ctxt->incNr] = value;
+ ctxt->inc = value;
+ return (ctxt->incNr++);
+}
+
+/**
+ * xmlRelaxNGIncludePop:
+ * @ctxt: the parser context
+ *
+ * Pops the top include from the include stack
+ *
+ * Returns the include just removed
+ */
+static xmlRelaxNGIncludePtr
+xmlRelaxNGIncludePop(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ xmlRelaxNGIncludePtr ret;
+
+ if (ctxt->incNr <= 0)
+ return (NULL);
+ ctxt->incNr--;
+ if (ctxt->incNr > 0)
+ ctxt->inc = ctxt->incTab[ctxt->incNr - 1];
+ else
+ ctxt->inc = NULL;
+ ret = ctxt->incTab[ctxt->incNr];
+ ctxt->incTab[ctxt->incNr] = NULL;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGRemoveRedefine:
+ * @ctxt: the parser context
+ * @URL: the normalized URL
+ * @target: the included target
+ * @name: the define name to eliminate
+ *
+ * Applies the elimination algorithm of 4.7
+ *
+ * Returns 0 in case of error, 1 in case of success.
+ */
+static int
+xmlRelaxNGRemoveRedefine(xmlRelaxNGParserCtxtPtr ctxt,
+ const xmlChar * URL ATTRIBUTE_UNUSED,
+ xmlNodePtr target, const xmlChar * name)
+{
+ int found = 0;
+ xmlNodePtr tmp, tmp2;
+ xmlChar *name2;
+
+#ifdef DEBUG_INCLUDE
+ if (name == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Elimination of <include> start from %s\n", URL);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Elimination of <include> define %s from %s\n",
+ name, URL);
+#endif
+ tmp = target;
+ while (tmp != NULL) {
+ tmp2 = tmp->next;
+ if ((name == NULL) && (IS_RELAXNG(tmp, "start"))) {
+ found = 1;
+ xmlUnlinkNode(tmp);
+ xmlFreeNode(tmp);
+ } else if ((name != NULL) && (IS_RELAXNG(tmp, "define"))) {
+ name2 = xmlGetProp(tmp, BAD_CAST "name");
+ xmlRelaxNGNormExtSpace(name2);
+ if (name2 != NULL) {
+ if (xmlStrEqual(name, name2)) {
+ found = 1;
+ xmlUnlinkNode(tmp);
+ xmlFreeNode(tmp);
+ }
+ xmlFree(name2);
+ }
+ } else if (IS_RELAXNG(tmp, "include")) {
+ xmlChar *href = NULL;
+ xmlRelaxNGDocumentPtr inc = tmp->psvi;
+
+ if ((inc != NULL) && (inc->doc != NULL) &&
+ (inc->doc->children != NULL)) {
+
+ if (xmlStrEqual
+ (inc->doc->children->name, BAD_CAST "grammar")) {
+#ifdef DEBUG_INCLUDE
+ href = xmlGetProp(tmp, BAD_CAST "href");
+#endif
+ if (xmlRelaxNGRemoveRedefine(ctxt, href,
+ xmlDocGetRootElement(inc->doc)->children,
+ name) == 1) {
+ found = 1;
+ }
+#ifdef DEBUG_INCLUDE
+ if (href != NULL)
+ xmlFree(href);
+#endif
+ }
+ }
+ }
+ tmp = tmp2;
+ }
+ return (found);
+}
+
+/**
+ * xmlRelaxNGLoadInclude:
+ * @ctxt: the parser context
+ * @URL: the normalized URL
+ * @node: the include node.
+ * @ns: the namespace passed from the context.
+ *
+ * First lookup if the document is already loaded into the parser context,
+ * check against recursion. If not found the resource is loaded and
+ * the content is preprocessed before being returned back to the caller.
+ *
+ * Returns the xmlRelaxNGIncludePtr or NULL in case of error
+ */
+static xmlRelaxNGIncludePtr
+xmlRelaxNGLoadInclude(xmlRelaxNGParserCtxtPtr ctxt, const xmlChar * URL,
+ xmlNodePtr node, const xmlChar * ns)
+{
+ xmlRelaxNGIncludePtr ret = NULL;
+ xmlDocPtr doc;
+ int i;
+ xmlNodePtr root, cur;
+
+#ifdef DEBUG_INCLUDE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGLoadInclude(%s)\n", URL);
+#endif
+
+ /*
+ * check against recursion in the stack
+ */
+ for (i = 0; i < ctxt->incNr; i++) {
+ if (xmlStrEqual(ctxt->incTab[i]->href, URL)) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_INCLUDE_RECURSE,
+ "Detected an Include recursion for %s\n", URL,
+ NULL);
+ return (NULL);
+ }
+ }
+
+ /*
+ * load the document
+ */
+ doc = xmlReadFile((const char *) URL,NULL,0);
+ if (doc == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARSE_ERROR,
+ "xmlRelaxNG: could not load %s\n", URL, NULL);
+ return (NULL);
+ }
+#ifdef DEBUG_INCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Parsed %s Okay\n", URL);
+#endif
+
+ /*
+ * Allocate the document structures and register it first.
+ */
+ ret = (xmlRelaxNGIncludePtr) xmlMalloc(sizeof(xmlRelaxNGInclude));
+ if (ret == NULL) {
+ xmlRngPErrMemory(ctxt, "allocating include\n");
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGInclude));
+ ret->doc = doc;
+ ret->href = xmlStrdup(URL);
+ ret->next = ctxt->includes;
+ ctxt->includes = ret;
+
+ /*
+ * transmit the ns if needed
+ */
+ if (ns != NULL) {
+ root = xmlDocGetRootElement(doc);
+ if (root != NULL) {
+ if (xmlHasProp(root, BAD_CAST "ns") == NULL) {
+ xmlSetProp(root, BAD_CAST "ns", ns);
+ }
+ }
+ }
+
+ /*
+ * push it on the stack
+ */
+ xmlRelaxNGIncludePush(ctxt, ret);
+
+ /*
+ * Some preprocessing of the document content, this include recursing
+ * in the include stack.
+ */
+#ifdef DEBUG_INCLUDE
+ xmlGenericError(xmlGenericErrorContext, "cleanup of %s\n", URL);
+#endif
+
+ doc = xmlRelaxNGCleanupDoc(ctxt, doc);
+ if (doc == NULL) {
+ ctxt->inc = NULL;
+ return (NULL);
+ }
+
+ /*
+ * Pop up the include from the stack
+ */
+ xmlRelaxNGIncludePop(ctxt);
+
+#ifdef DEBUG_INCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Checking of %s\n", URL);
+#endif
+ /*
+ * Check that the top element is a grammar
+ */
+ root = xmlDocGetRootElement(doc);
+ if (root == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY,
+ "xmlRelaxNG: included document is empty %s\n", URL,
+ NULL);
+ return (NULL);
+ }
+ if (!IS_RELAXNG(root, "grammar")) {
+ xmlRngPErr(ctxt, node, XML_RNGP_GRAMMAR_MISSING,
+ "xmlRelaxNG: included document %s root is not a grammar\n",
+ URL, NULL);
+ return (NULL);
+ }
+
+ /*
+ * Elimination of redefined rules in the include.
+ */
+ cur = node->children;
+ while (cur != NULL) {
+ if (IS_RELAXNG(cur, "start")) {
+ int found = 0;
+
+ found =
+ xmlRelaxNGRemoveRedefine(ctxt, URL, root->children, NULL);
+ if (!found) {
+ xmlRngPErr(ctxt, node, XML_RNGP_START_MISSING,
+ "xmlRelaxNG: include %s has a start but not the included grammar\n",
+ URL, NULL);
+ }
+ } else if (IS_RELAXNG(cur, "define")) {
+ xmlChar *name;
+
+ name = xmlGetProp(cur, BAD_CAST "name");
+ if (name == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_NAME_MISSING,
+ "xmlRelaxNG: include %s has define without name\n",
+ URL, NULL);
+ } else {
+ int found;
+
+ xmlRelaxNGNormExtSpace(name);
+ found = xmlRelaxNGRemoveRedefine(ctxt, URL,
+ root->children, name);
+ if (!found) {
+ xmlRngPErr(ctxt, node, XML_RNGP_DEFINE_MISSING,
+ "xmlRelaxNG: include %s has a define %s but not the included grammar\n",
+ URL, name);
+ }
+ xmlFree(name);
+ }
+ }
+ cur = cur->next;
+ }
+
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidErrorPush:
+ * @ctxt: the validation context
+ * @err: the error code
+ * @arg1: the first string argument
+ * @arg2: the second string argument
+ * @dup: arg need to be duplicated
+ *
+ * Pushes a new error on top of the error stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+xmlRelaxNGValidErrorPush(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidErr err, const xmlChar * arg1,
+ const xmlChar * arg2, int dup)
+{
+ xmlRelaxNGValidErrorPtr cur;
+
+#ifdef DEBUG_ERROR
+ xmlGenericError(xmlGenericErrorContext,
+ "Pushing error %d at %d on stack\n", err, ctxt->errNr);
+#endif
+ if (ctxt->errTab == NULL) {
+ ctxt->errMax = 8;
+ ctxt->errNr = 0;
+ ctxt->errTab =
+ (xmlRelaxNGValidErrorPtr) xmlMalloc(ctxt->errMax *
+ sizeof
+ (xmlRelaxNGValidError));
+ if (ctxt->errTab == NULL) {
+ xmlRngVErrMemory(ctxt, "pushing error\n");
+ return (0);
+ }
+ ctxt->err = NULL;
+ }
+ if (ctxt->errNr >= ctxt->errMax) {
+ ctxt->errMax *= 2;
+ ctxt->errTab =
+ (xmlRelaxNGValidErrorPtr) xmlRealloc(ctxt->errTab,
+ ctxt->errMax *
+ sizeof
+ (xmlRelaxNGValidError));
+ if (ctxt->errTab == NULL) {
+ xmlRngVErrMemory(ctxt, "pushing error\n");
+ return (0);
+ }
+ ctxt->err = &ctxt->errTab[ctxt->errNr - 1];
+ }
+ if ((ctxt->err != NULL) && (ctxt->state != NULL) &&
+ (ctxt->err->node == ctxt->state->node) && (ctxt->err->err == err))
+ return (ctxt->errNr);
+ cur = &ctxt->errTab[ctxt->errNr];
+ cur->err = err;
+ if (dup) {
+ cur->arg1 = xmlStrdup(arg1);
+ cur->arg2 = xmlStrdup(arg2);
+ cur->flags = ERROR_IS_DUP;
+ } else {
+ cur->arg1 = arg1;
+ cur->arg2 = arg2;
+ cur->flags = 0;
+ }
+ if (ctxt->state != NULL) {
+ cur->node = ctxt->state->node;
+ cur->seq = ctxt->state->seq;
+ } else {
+ cur->node = NULL;
+ cur->seq = NULL;
+ }
+ ctxt->err = cur;
+ return (ctxt->errNr++);
+}
+
+/**
+ * xmlRelaxNGValidErrorPop:
+ * @ctxt: the validation context
+ *
+ * Pops the top error from the error stack
+ */
+static void
+xmlRelaxNGValidErrorPop(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ xmlRelaxNGValidErrorPtr cur;
+
+ if (ctxt->errNr <= 0) {
+ ctxt->err = NULL;
+ return;
+ }
+ ctxt->errNr--;
+ if (ctxt->errNr > 0)
+ ctxt->err = &ctxt->errTab[ctxt->errNr - 1];
+ else
+ ctxt->err = NULL;
+ cur = &ctxt->errTab[ctxt->errNr];
+ if (cur->flags & ERROR_IS_DUP) {
+ if (cur->arg1 != NULL)
+ xmlFree((xmlChar *) cur->arg1);
+ cur->arg1 = NULL;
+ if (cur->arg2 != NULL)
+ xmlFree((xmlChar *) cur->arg2);
+ cur->arg2 = NULL;
+ cur->flags = 0;
+ }
+}
+
+/**
+ * xmlRelaxNGDocumentPush:
+ * @ctxt: the parser context
+ * @value: the element doc
+ *
+ * Pushes a new doc on top of the doc stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+xmlRelaxNGDocumentPush(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDocumentPtr value)
+{
+ if (ctxt->docTab == NULL) {
+ ctxt->docMax = 4;
+ ctxt->docNr = 0;
+ ctxt->docTab =
+ (xmlRelaxNGDocumentPtr *) xmlMalloc(ctxt->docMax *
+ sizeof(ctxt->docTab[0]));
+ if (ctxt->docTab == NULL) {
+ xmlRngPErrMemory(ctxt, "adding document\n");
+ return (0);
+ }
+ }
+ if (ctxt->docNr >= ctxt->docMax) {
+ ctxt->docMax *= 2;
+ ctxt->docTab =
+ (xmlRelaxNGDocumentPtr *) xmlRealloc(ctxt->docTab,
+ ctxt->docMax *
+ sizeof(ctxt->docTab[0]));
+ if (ctxt->docTab == NULL) {
+ xmlRngPErrMemory(ctxt, "adding document\n");
+ return (0);
+ }
+ }
+ ctxt->docTab[ctxt->docNr] = value;
+ ctxt->doc = value;
+ return (ctxt->docNr++);
+}
+
+/**
+ * xmlRelaxNGDocumentPop:
+ * @ctxt: the parser context
+ *
+ * Pops the top doc from the doc stack
+ *
+ * Returns the doc just removed
+ */
+static xmlRelaxNGDocumentPtr
+xmlRelaxNGDocumentPop(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ xmlRelaxNGDocumentPtr ret;
+
+ if (ctxt->docNr <= 0)
+ return (NULL);
+ ctxt->docNr--;
+ if (ctxt->docNr > 0)
+ ctxt->doc = ctxt->docTab[ctxt->docNr - 1];
+ else
+ ctxt->doc = NULL;
+ ret = ctxt->docTab[ctxt->docNr];
+ ctxt->docTab[ctxt->docNr] = NULL;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGLoadExternalRef:
+ * @ctxt: the parser context
+ * @URL: the normalized URL
+ * @ns: the inherited ns if any
+ *
+ * First lookup if the document is already loaded into the parser context,
+ * check against recursion. If not found the resource is loaded and
+ * the content is preprocessed before being returned back to the caller.
+ *
+ * Returns the xmlRelaxNGDocumentPtr or NULL in case of error
+ */
+static xmlRelaxNGDocumentPtr
+xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt,
+ const xmlChar * URL, const xmlChar * ns)
+{
+ xmlRelaxNGDocumentPtr ret = NULL;
+ xmlDocPtr doc;
+ xmlNodePtr root;
+ int i;
+
+ /*
+ * check against recursion in the stack
+ */
+ for (i = 0; i < ctxt->docNr; i++) {
+ if (xmlStrEqual(ctxt->docTab[i]->href, URL)) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_EXTERNALREF_RECURSE,
+ "Detected an externalRef recursion for %s\n", URL,
+ NULL);
+ return (NULL);
+ }
+ }
+
+ /*
+ * load the document
+ */
+ doc = xmlReadFile((const char *) URL,NULL,0);
+ if (doc == NULL) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_PARSE_ERROR,
+ "xmlRelaxNG: could not load %s\n", URL, NULL);
+ return (NULL);
+ }
+
+ /*
+ * Allocate the document structures and register it first.
+ */
+ ret = (xmlRelaxNGDocumentPtr) xmlMalloc(sizeof(xmlRelaxNGDocument));
+ if (ret == NULL) {
+ xmlRngPErr(ctxt, (xmlNodePtr) doc, XML_ERR_NO_MEMORY,
+ "xmlRelaxNG: allocate memory for doc %s\n", URL, NULL);
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGDocument));
+ ret->doc = doc;
+ ret->href = xmlStrdup(URL);
+ ret->next = ctxt->documents;
+ ret->externalRef = 1;
+ ctxt->documents = ret;
+
+ /*
+ * transmit the ns if needed
+ */
+ if (ns != NULL) {
+ root = xmlDocGetRootElement(doc);
+ if (root != NULL) {
+ if (xmlHasProp(root, BAD_CAST "ns") == NULL) {
+ xmlSetProp(root, BAD_CAST "ns", ns);
+ }
+ }
+ }
+
+ /*
+ * push it on the stack and register it in the hash table
+ */
+ xmlRelaxNGDocumentPush(ctxt, ret);
+
+ /*
+ * Some preprocessing of the document content
+ */
+ doc = xmlRelaxNGCleanupDoc(ctxt, doc);
+ if (doc == NULL) {
+ ctxt->doc = NULL;
+ return (NULL);
+ }
+
+ xmlRelaxNGDocumentPop(ctxt);
+
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Error functions *
+ * *
+ ************************************************************************/
+
+#define VALID_ERR(a) xmlRelaxNGAddValidError(ctxt, a, NULL, NULL, 0);
+#define VALID_ERR2(a, b) xmlRelaxNGAddValidError(ctxt, a, b, NULL, 0);
+#define VALID_ERR3(a, b, c) xmlRelaxNGAddValidError(ctxt, a, b, c, 0);
+#define VALID_ERR2P(a, b) xmlRelaxNGAddValidError(ctxt, a, b, NULL, 1);
+#define VALID_ERR3P(a, b, c) xmlRelaxNGAddValidError(ctxt, a, b, c, 1);
+
+static const char *
+xmlRelaxNGDefName(xmlRelaxNGDefinePtr def)
+{
+ if (def == NULL)
+ return ("none");
+ switch (def->type) {
+ case XML_RELAXNG_EMPTY:
+ return ("empty");
+ case XML_RELAXNG_NOT_ALLOWED:
+ return ("notAllowed");
+ case XML_RELAXNG_EXCEPT:
+ return ("except");
+ case XML_RELAXNG_TEXT:
+ return ("text");
+ case XML_RELAXNG_ELEMENT:
+ return ("element");
+ case XML_RELAXNG_DATATYPE:
+ return ("datatype");
+ case XML_RELAXNG_VALUE:
+ return ("value");
+ case XML_RELAXNG_LIST:
+ return ("list");
+ case XML_RELAXNG_ATTRIBUTE:
+ return ("attribute");
+ case XML_RELAXNG_DEF:
+ return ("def");
+ case XML_RELAXNG_REF:
+ return ("ref");
+ case XML_RELAXNG_EXTERNALREF:
+ return ("externalRef");
+ case XML_RELAXNG_PARENTREF:
+ return ("parentRef");
+ case XML_RELAXNG_OPTIONAL:
+ return ("optional");
+ case XML_RELAXNG_ZEROORMORE:
+ return ("zeroOrMore");
+ case XML_RELAXNG_ONEORMORE:
+ return ("oneOrMore");
+ case XML_RELAXNG_CHOICE:
+ return ("choice");
+ case XML_RELAXNG_GROUP:
+ return ("group");
+ case XML_RELAXNG_INTERLEAVE:
+ return ("interleave");
+ case XML_RELAXNG_START:
+ return ("start");
+ case XML_RELAXNG_NOOP:
+ return ("noop");
+ case XML_RELAXNG_PARAM:
+ return ("param");
+ }
+ return ("unknown");
+}
+
+/**
+ * xmlRelaxNGGetErrorString:
+ * @err: the error code
+ * @arg1: the first string argument
+ * @arg2: the second string argument
+ *
+ * computes a formatted error string for the given error code and args
+ *
+ * Returns the error string, it must be deallocated by the caller
+ */
+static xmlChar *
+xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1,
+ const xmlChar * arg2)
+{
+ char msg[1000];
+
+ if (arg1 == NULL)
+ arg1 = BAD_CAST "";
+ if (arg2 == NULL)
+ arg2 = BAD_CAST "";
+
+ msg[0] = 0;
+ switch (err) {
+ case XML_RELAXNG_OK:
+ return (NULL);
+ case XML_RELAXNG_ERR_MEMORY:
+ return (xmlCharStrdup("out of memory\n"));
+ case XML_RELAXNG_ERR_TYPE:
+ snprintf(msg, 1000, "failed to validate type %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_TYPEVAL:
+ snprintf(msg, 1000, "Type %s doesn't allow value '%s'\n", arg1,
+ arg2);
+ break;
+ case XML_RELAXNG_ERR_DUPID:
+ snprintf(msg, 1000, "ID %s redefined\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_TYPECMP:
+ snprintf(msg, 1000, "failed to compare type %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_NOSTATE:
+ return (xmlCharStrdup("Internal error: no state\n"));
+ case XML_RELAXNG_ERR_NODEFINE:
+ return (xmlCharStrdup("Internal error: no define\n"));
+ case XML_RELAXNG_ERR_INTERNAL:
+ snprintf(msg, 1000, "Internal error: %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_LISTEXTRA:
+ snprintf(msg, 1000, "Extra data in list: %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_INTERNODATA:
+ return (xmlCharStrdup
+ ("Internal: interleave block has no data\n"));
+ case XML_RELAXNG_ERR_INTERSEQ:
+ return (xmlCharStrdup("Invalid sequence in interleave\n"));
+ case XML_RELAXNG_ERR_INTEREXTRA:
+ snprintf(msg, 1000, "Extra element %s in interleave\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_ELEMNAME:
+ snprintf(msg, 1000, "Expecting element %s, got %s\n", arg1,
+ arg2);
+ break;
+ case XML_RELAXNG_ERR_ELEMNONS:
+ snprintf(msg, 1000, "Expecting a namespace for element %s\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_ELEMWRONGNS:
+ snprintf(msg, 1000,
+ "Element %s has wrong namespace: expecting %s\n", arg1,
+ arg2);
+ break;
+ case XML_RELAXNG_ERR_ELEMWRONG:
+ snprintf(msg, 1000, "Did not expect element %s there\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_TEXTWRONG:
+ snprintf(msg, 1000,
+ "Did not expect text in element %s content\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_ELEMEXTRANS:
+ snprintf(msg, 1000, "Expecting no namespace for element %s\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_ELEMNOTEMPTY:
+ snprintf(msg, 1000, "Expecting element %s to be empty\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_NOELEM:
+ snprintf(msg, 1000, "Expecting an element %s, got nothing\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_NOTELEM:
+ return (xmlCharStrdup("Expecting an element got text\n"));
+ case XML_RELAXNG_ERR_ATTRVALID:
+ snprintf(msg, 1000, "Element %s failed to validate attributes\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_CONTENTVALID:
+ snprintf(msg, 1000, "Element %s failed to validate content\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_EXTRACONTENT:
+ snprintf(msg, 1000, "Element %s has extra content: %s\n",
+ arg1, arg2);
+ break;
+ case XML_RELAXNG_ERR_INVALIDATTR:
+ snprintf(msg, 1000, "Invalid attribute %s for element %s\n",
+ arg1, arg2);
+ break;
+ case XML_RELAXNG_ERR_LACKDATA:
+ snprintf(msg, 1000, "Datatype element %s contains no data\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_DATAELEM:
+ snprintf(msg, 1000, "Datatype element %s has child elements\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_VALELEM:
+ snprintf(msg, 1000, "Value element %s has child elements\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_LISTELEM:
+ snprintf(msg, 1000, "List element %s has child elements\n",
+ arg1);
+ break;
+ case XML_RELAXNG_ERR_DATATYPE:
+ snprintf(msg, 1000, "Error validating datatype %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_VALUE:
+ snprintf(msg, 1000, "Error validating value %s\n", arg1);
+ break;
+ case XML_RELAXNG_ERR_LIST:
+ return (xmlCharStrdup("Error validating list\n"));
+ case XML_RELAXNG_ERR_NOGRAMMAR:
+ return (xmlCharStrdup("No top grammar defined\n"));
+ case XML_RELAXNG_ERR_EXTRADATA:
+ return (xmlCharStrdup("Extra data in the document\n"));
+ default:
+ return (xmlCharStrdup("Unknown error !\n"));
+ }
+ if (msg[0] == 0) {
+ snprintf(msg, 1000, "Unknown error code %d\n", err);
+ }
+ msg[1000 - 1] = 0;
+ return (xmlStrdup((xmlChar *) msg));
+}
+
+/**
+ * xmlRelaxNGShowValidError:
+ * @ctxt: the validation context
+ * @err: the error number
+ * @node: the node
+ * @child: the node child generating the problem.
+ * @arg1: the first argument
+ * @arg2: the second argument
+ *
+ * Show a validation error.
+ */
+static void
+xmlRelaxNGShowValidError(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidErr err, xmlNodePtr node,
+ xmlNodePtr child, const xmlChar * arg1,
+ const xmlChar * arg2)
+{
+ xmlChar *msg;
+
+ if (ctxt->flags & FLAGS_NOERROR)
+ return;
+
+#ifdef DEBUG_ERROR
+ xmlGenericError(xmlGenericErrorContext, "Show error %d\n", err);
+#endif
+ msg = xmlRelaxNGGetErrorString(err, arg1, arg2);
+ if (msg == NULL)
+ return;
+
+ if (ctxt->errNo == XML_RELAXNG_OK)
+ ctxt->errNo = err;
+ xmlRngVErr(ctxt, (child == NULL ? node : child), err,
+ (const char *) msg, arg1, arg2);
+ xmlFree(msg);
+}
+
+/**
+ * xmlRelaxNGPopErrors:
+ * @ctxt: the validation context
+ * @level: the error level in the stack
+ *
+ * pop and discard all errors until the given level is reached
+ */
+static void
+xmlRelaxNGPopErrors(xmlRelaxNGValidCtxtPtr ctxt, int level)
+{
+ int i;
+ xmlRelaxNGValidErrorPtr err;
+
+#ifdef DEBUG_ERROR
+ xmlGenericError(xmlGenericErrorContext,
+ "Pop errors till level %d\n", level);
+#endif
+ for (i = level; i < ctxt->errNr; i++) {
+ err = &ctxt->errTab[i];
+ if (err->flags & ERROR_IS_DUP) {
+ if (err->arg1 != NULL)
+ xmlFree((xmlChar *) err->arg1);
+ err->arg1 = NULL;
+ if (err->arg2 != NULL)
+ xmlFree((xmlChar *) err->arg2);
+ err->arg2 = NULL;
+ err->flags = 0;
+ }
+ }
+ ctxt->errNr = level;
+ if (ctxt->errNr <= 0)
+ ctxt->err = NULL;
+}
+
+/**
+ * xmlRelaxNGDumpValidError:
+ * @ctxt: the validation context
+ *
+ * Show all validation error over a given index.
+ */
+static void
+xmlRelaxNGDumpValidError(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ int i, j, k;
+ xmlRelaxNGValidErrorPtr err, dup;
+
+#ifdef DEBUG_ERROR
+ xmlGenericError(xmlGenericErrorContext,
+ "Dumping error stack %d errors\n", ctxt->errNr);
+#endif
+ for (i = 0, k = 0; i < ctxt->errNr; i++) {
+ err = &ctxt->errTab[i];
+ if (k < MAX_ERROR) {
+ for (j = 0; j < i; j++) {
+ dup = &ctxt->errTab[j];
+ if ((err->err == dup->err) && (err->node == dup->node) &&
+ (xmlStrEqual(err->arg1, dup->arg1)) &&
+ (xmlStrEqual(err->arg2, dup->arg2))) {
+ goto skip;
+ }
+ }
+ xmlRelaxNGShowValidError(ctxt, err->err, err->node, err->seq,
+ err->arg1, err->arg2);
+ k++;
+ }
+ skip:
+ if (err->flags & ERROR_IS_DUP) {
+ if (err->arg1 != NULL)
+ xmlFree((xmlChar *) err->arg1);
+ err->arg1 = NULL;
+ if (err->arg2 != NULL)
+ xmlFree((xmlChar *) err->arg2);
+ err->arg2 = NULL;
+ err->flags = 0;
+ }
+ }
+ ctxt->errNr = 0;
+}
+
+/**
+ * xmlRelaxNGAddValidError:
+ * @ctxt: the validation context
+ * @err: the error number
+ * @arg1: the first argument
+ * @arg2: the second argument
+ * @dup: need to dup the args
+ *
+ * Register a validation error, either generating it if it's sure
+ * or stacking it for later handling if unsure.
+ */
+static void
+xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidErr err, const xmlChar * arg1,
+ const xmlChar * arg2, int dup)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->flags & FLAGS_NOERROR)
+ return;
+
+#ifdef DEBUG_ERROR
+ xmlGenericError(xmlGenericErrorContext, "Adding error %d\n", err);
+#endif
+ /*
+ * generate the error directly
+ */
+ if (((ctxt->flags & FLAGS_IGNORABLE) == 0) ||
+ (ctxt->flags & FLAGS_NEGATIVE)) {
+ xmlNodePtr node, seq;
+
+ /*
+ * Flush first any stacked error which might be the
+ * real cause of the problem.
+ */
+ if (ctxt->errNr != 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ if (ctxt->state != NULL) {
+ node = ctxt->state->node;
+ seq = ctxt->state->seq;
+ } else {
+ node = seq = NULL;
+ }
+ if ((node == NULL) && (seq == NULL)) {
+ node = ctxt->pnode;
+ }
+ xmlRelaxNGShowValidError(ctxt, err, node, seq, arg1, arg2);
+ }
+ /*
+ * Stack the error for later processing if needed
+ */
+ else {
+ xmlRelaxNGValidErrorPush(ctxt, err, arg1, arg2, dup);
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Type library hooks *
+ * *
+ ************************************************************************/
+static xmlChar *xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar * str);
+
+/**
+ * xmlRelaxNGSchemaTypeHave:
+ * @data: data needed for the library
+ * @type: the type name
+ *
+ * Check if the given type is provided by
+ * the W3C XMLSchema Datatype library.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGSchemaTypeHave(void *data ATTRIBUTE_UNUSED, const xmlChar * type)
+{
+ xmlSchemaTypePtr typ;
+
+ if (type == NULL)
+ return (-1);
+ typ = xmlSchemaGetPredefinedType(type,
+ BAD_CAST
+ "http://www.w3.org/2001/XMLSchema");
+ if (typ == NULL)
+ return (0);
+ return (1);
+}
+
+/**
+ * xmlRelaxNGSchemaTypeCheck:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value: the value to check
+ * @node: the node
+ *
+ * Check if the given type and value are validated by
+ * the W3C XMLSchema Datatype library.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGSchemaTypeCheck(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type,
+ const xmlChar * value,
+ void **result, xmlNodePtr node)
+{
+ xmlSchemaTypePtr typ;
+ int ret;
+
+ if ((type == NULL) || (value == NULL))
+ return (-1);
+ typ = xmlSchemaGetPredefinedType(type,
+ BAD_CAST
+ "http://www.w3.org/2001/XMLSchema");
+ if (typ == NULL)
+ return (-1);
+ ret = xmlSchemaValPredefTypeNode(typ, value,
+ (xmlSchemaValPtr *) result, node);
+ if (ret == 2) /* special ID error code */
+ return (2);
+ if (ret == 0)
+ return (1);
+ if (ret > 0)
+ return (0);
+ return (-1);
+}
+
+/**
+ * xmlRelaxNGSchemaFacetCheck:
+ * @data: data needed for the library
+ * @type: the type name
+ * @facet: the facet name
+ * @val: the facet value
+ * @strval: the string value
+ * @value: the value to check
+ *
+ * Function provided by a type library to check a value facet
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGSchemaFacetCheck(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type, const xmlChar * facetname,
+ const xmlChar * val, const xmlChar * strval,
+ void *value)
+{
+ xmlSchemaFacetPtr facet;
+ xmlSchemaTypePtr typ;
+ int ret;
+
+ if ((type == NULL) || (strval == NULL))
+ return (-1);
+ typ = xmlSchemaGetPredefinedType(type,
+ BAD_CAST
+ "http://www.w3.org/2001/XMLSchema");
+ if (typ == NULL)
+ return (-1);
+
+ facet = xmlSchemaNewFacet();
+ if (facet == NULL)
+ return (-1);
+
+ if (xmlStrEqual(facetname, BAD_CAST "minInclusive")) {
+ facet->type = XML_SCHEMA_FACET_MININCLUSIVE;
+ } else if (xmlStrEqual(facetname, BAD_CAST "minExclusive")) {
+ facet->type = XML_SCHEMA_FACET_MINEXCLUSIVE;
+ } else if (xmlStrEqual(facetname, BAD_CAST "maxInclusive")) {
+ facet->type = XML_SCHEMA_FACET_MAXINCLUSIVE;
+ } else if (xmlStrEqual(facetname, BAD_CAST "maxExclusive")) {
+ facet->type = XML_SCHEMA_FACET_MAXEXCLUSIVE;
+ } else if (xmlStrEqual(facetname, BAD_CAST "totalDigits")) {
+ facet->type = XML_SCHEMA_FACET_TOTALDIGITS;
+ } else if (xmlStrEqual(facetname, BAD_CAST "fractionDigits")) {
+ facet->type = XML_SCHEMA_FACET_FRACTIONDIGITS;
+ } else if (xmlStrEqual(facetname, BAD_CAST "pattern")) {
+ facet->type = XML_SCHEMA_FACET_PATTERN;
+ } else if (xmlStrEqual(facetname, BAD_CAST "enumeration")) {
+ facet->type = XML_SCHEMA_FACET_ENUMERATION;
+ } else if (xmlStrEqual(facetname, BAD_CAST "whiteSpace")) {
+ facet->type = XML_SCHEMA_FACET_WHITESPACE;
+ } else if (xmlStrEqual(facetname, BAD_CAST "length")) {
+ facet->type = XML_SCHEMA_FACET_LENGTH;
+ } else if (xmlStrEqual(facetname, BAD_CAST "maxLength")) {
+ facet->type = XML_SCHEMA_FACET_MAXLENGTH;
+ } else if (xmlStrEqual(facetname, BAD_CAST "minLength")) {
+ facet->type = XML_SCHEMA_FACET_MINLENGTH;
+ } else {
+ xmlSchemaFreeFacet(facet);
+ return (-1);
+ }
+ facet->value = val;
+ ret = xmlSchemaCheckFacet(facet, typ, NULL, type);
+ if (ret != 0) {
+ xmlSchemaFreeFacet(facet);
+ return (-1);
+ }
+ ret = xmlSchemaValidateFacet(typ, facet, strval, value);
+ xmlSchemaFreeFacet(facet);
+ if (ret != 0)
+ return (-1);
+ return (0);
+}
+
+/**
+ * xmlRelaxNGSchemaFreeValue:
+ * @data: data needed for the library
+ * @value: the value to free
+ *
+ * Function provided by a type library to free a Schemas value
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static void
+xmlRelaxNGSchemaFreeValue(void *data ATTRIBUTE_UNUSED, void *value)
+{
+ xmlSchemaFreeValue(value);
+}
+
+/**
+ * xmlRelaxNGSchemaTypeCompare:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value1: the first value
+ * @value2: the second value
+ *
+ * Compare two values for equality accordingly a type from the W3C XMLSchema
+ * Datatype library.
+ *
+ * Returns 1 if equal, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGSchemaTypeCompare(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type,
+ const xmlChar * value1,
+ xmlNodePtr ctxt1,
+ void *comp1,
+ const xmlChar * value2, xmlNodePtr ctxt2)
+{
+ int ret;
+ xmlSchemaTypePtr typ;
+ xmlSchemaValPtr res1 = NULL, res2 = NULL;
+
+ if ((type == NULL) || (value1 == NULL) || (value2 == NULL))
+ return (-1);
+ typ = xmlSchemaGetPredefinedType(type,
+ BAD_CAST
+ "http://www.w3.org/2001/XMLSchema");
+ if (typ == NULL)
+ return (-1);
+ if (comp1 == NULL) {
+ ret = xmlSchemaValPredefTypeNode(typ, value1, &res1, ctxt1);
+ if (ret != 0)
+ return (-1);
+ if (res1 == NULL)
+ return (-1);
+ } else {
+ res1 = (xmlSchemaValPtr) comp1;
+ }
+ ret = xmlSchemaValPredefTypeNode(typ, value2, &res2, ctxt2);
+ if (ret != 0) {
+ if (res1 != (xmlSchemaValPtr) comp1)
+ xmlSchemaFreeValue(res1);
+ return (-1);
+ }
+ ret = xmlSchemaCompareValues(res1, res2);
+ if (res1 != (xmlSchemaValPtr) comp1)
+ xmlSchemaFreeValue(res1);
+ xmlSchemaFreeValue(res2);
+ if (ret == -2)
+ return (-1);
+ if (ret == 0)
+ return (1);
+ return (0);
+}
+
+/**
+ * xmlRelaxNGDefaultTypeHave:
+ * @data: data needed for the library
+ * @type: the type name
+ *
+ * Check if the given type is provided by
+ * the default datatype library.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGDefaultTypeHave(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type)
+{
+ if (type == NULL)
+ return (-1);
+ if (xmlStrEqual(type, BAD_CAST "string"))
+ return (1);
+ if (xmlStrEqual(type, BAD_CAST "token"))
+ return (1);
+ return (0);
+}
+
+/**
+ * xmlRelaxNGDefaultTypeCheck:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value: the value to check
+ * @node: the node
+ *
+ * Check if the given type and value are validated by
+ * the default datatype library.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGDefaultTypeCheck(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type ATTRIBUTE_UNUSED,
+ const xmlChar * value ATTRIBUTE_UNUSED,
+ void **result ATTRIBUTE_UNUSED,
+ xmlNodePtr node ATTRIBUTE_UNUSED)
+{
+ if (value == NULL)
+ return (-1);
+ if (xmlStrEqual(type, BAD_CAST "string"))
+ return (1);
+ if (xmlStrEqual(type, BAD_CAST "token")) {
+ return (1);
+ }
+
+ return (0);
+}
+
+/**
+ * xmlRelaxNGDefaultTypeCompare:
+ * @data: data needed for the library
+ * @type: the type name
+ * @value1: the first value
+ * @value2: the second value
+ *
+ * Compare two values accordingly a type from the default
+ * datatype library.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGDefaultTypeCompare(void *data ATTRIBUTE_UNUSED,
+ const xmlChar * type,
+ const xmlChar * value1,
+ xmlNodePtr ctxt1 ATTRIBUTE_UNUSED,
+ void *comp1 ATTRIBUTE_UNUSED,
+ const xmlChar * value2,
+ xmlNodePtr ctxt2 ATTRIBUTE_UNUSED)
+{
+ int ret = -1;
+
+ if (xmlStrEqual(type, BAD_CAST "string")) {
+ ret = xmlStrEqual(value1, value2);
+ } else if (xmlStrEqual(type, BAD_CAST "token")) {
+ if (!xmlStrEqual(value1, value2)) {
+ xmlChar *nval, *nvalue;
+
+ /*
+ * TODO: trivial optimizations are possible by
+ * computing at compile-time
+ */
+ nval = xmlRelaxNGNormalize(NULL, value1);
+ nvalue = xmlRelaxNGNormalize(NULL, value2);
+
+ if ((nval == NULL) || (nvalue == NULL))
+ ret = -1;
+ else if (xmlStrEqual(nval, nvalue))
+ ret = 1;
+ else
+ ret = 0;
+ if (nval != NULL)
+ xmlFree(nval);
+ if (nvalue != NULL)
+ xmlFree(nvalue);
+ } else
+ ret = 1;
+ }
+ return (ret);
+}
+
+static int xmlRelaxNGTypeInitialized = 0;
+static xmlHashTablePtr xmlRelaxNGRegisteredTypes = NULL;
+
+/**
+ * xmlRelaxNGFreeTypeLibrary:
+ * @lib: the type library structure
+ * @namespace: the URI bound to the library
+ *
+ * Free the structure associated to the type library
+ */
+static void
+xmlRelaxNGFreeTypeLibrary(xmlRelaxNGTypeLibraryPtr lib,
+ const xmlChar * namespace ATTRIBUTE_UNUSED)
+{
+ if (lib == NULL)
+ return;
+ if (lib->namespace != NULL)
+ xmlFree((xmlChar *) lib->namespace);
+ xmlFree(lib);
+}
+
+/**
+ * xmlRelaxNGRegisterTypeLibrary:
+ * @namespace: the URI bound to the library
+ * @data: data associated to the library
+ * @have: the provide function
+ * @check: the checking function
+ * @comp: the comparison function
+ *
+ * Register a new type library
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+static int
+xmlRelaxNGRegisterTypeLibrary(const xmlChar * namespace, void *data,
+ xmlRelaxNGTypeHave have,
+ xmlRelaxNGTypeCheck check,
+ xmlRelaxNGTypeCompare comp,
+ xmlRelaxNGFacetCheck facet,
+ xmlRelaxNGTypeFree freef)
+{
+ xmlRelaxNGTypeLibraryPtr lib;
+ int ret;
+
+ if ((xmlRelaxNGRegisteredTypes == NULL) || (namespace == NULL) ||
+ (check == NULL) || (comp == NULL))
+ return (-1);
+ if (xmlHashLookup(xmlRelaxNGRegisteredTypes, namespace) != NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Relax-NG types library '%s' already registered\n",
+ namespace);
+ return (-1);
+ }
+ lib =
+ (xmlRelaxNGTypeLibraryPtr)
+ xmlMalloc(sizeof(xmlRelaxNGTypeLibrary));
+ if (lib == NULL) {
+ xmlRngVErrMemory(NULL, "adding types library\n");
+ return (-1);
+ }
+ memset(lib, 0, sizeof(xmlRelaxNGTypeLibrary));
+ lib->namespace = xmlStrdup(namespace);
+ lib->data = data;
+ lib->have = have;
+ lib->comp = comp;
+ lib->check = check;
+ lib->facet = facet;
+ lib->freef = freef;
+ ret = xmlHashAddEntry(xmlRelaxNGRegisteredTypes, namespace, lib);
+ if (ret < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Relax-NG types library failed to register '%s'\n",
+ namespace);
+ xmlRelaxNGFreeTypeLibrary(lib, namespace);
+ return (-1);
+ }
+ return (0);
+}
+
+/**
+ * xmlRelaxNGInitTypes:
+ *
+ * Initilize the default type libraries.
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlRelaxNGInitTypes(void)
+{
+ if (xmlRelaxNGTypeInitialized != 0)
+ return (0);
+ xmlRelaxNGRegisteredTypes = xmlHashCreate(10);
+ if (xmlRelaxNGRegisteredTypes == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to allocate sh table for Relax-NG types\n");
+ return (-1);
+ }
+ xmlRelaxNGRegisterTypeLibrary(BAD_CAST
+ "http://www.w3.org/2001/XMLSchema-datatypes",
+ NULL, xmlRelaxNGSchemaTypeHave,
+ xmlRelaxNGSchemaTypeCheck,
+ xmlRelaxNGSchemaTypeCompare,
+ xmlRelaxNGSchemaFacetCheck,
+ xmlRelaxNGSchemaFreeValue);
+ xmlRelaxNGRegisterTypeLibrary(xmlRelaxNGNs, NULL,
+ xmlRelaxNGDefaultTypeHave,
+ xmlRelaxNGDefaultTypeCheck,
+ xmlRelaxNGDefaultTypeCompare, NULL,
+ NULL);
+ xmlRelaxNGTypeInitialized = 1;
+ return (0);
+}
+
+/**
+ * xmlRelaxNGCleanupTypes:
+ *
+ * Cleanup the default Schemas type library associated to RelaxNG
+ */
+void
+xmlRelaxNGCleanupTypes(void)
+{
+ xmlSchemaCleanupTypes();
+ if (xmlRelaxNGTypeInitialized == 0)
+ return;
+ xmlHashFree(xmlRelaxNGRegisteredTypes, (xmlHashDeallocator)
+ xmlRelaxNGFreeTypeLibrary);
+ xmlRelaxNGTypeInitialized = 0;
+}
+
+/************************************************************************
+ * *
+ * Compiling element content into regexp *
+ * *
+ * Sometime the element content can be compiled into a pure regexp, *
+ * This allows a faster execution and streamability at that level *
+ * *
+ ************************************************************************/
+
+/* from automata.c but not exported */
+void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
+
+
+static int xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr def);
+
+/**
+ * xmlRelaxNGIsCompileable:
+ * @define: the definition to check
+ *
+ * Check if a definition is nullable.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error
+ */
+static int
+xmlRelaxNGIsCompileable(xmlRelaxNGDefinePtr def)
+{
+ int ret = -1;
+
+ if (def == NULL) {
+ return (-1);
+ }
+ if ((def->type != XML_RELAXNG_ELEMENT) &&
+ (def->dflags & IS_COMPILABLE))
+ return (1);
+ if ((def->type != XML_RELAXNG_ELEMENT) &&
+ (def->dflags & IS_NOT_COMPILABLE))
+ return (0);
+ switch (def->type) {
+ case XML_RELAXNG_NOOP:
+ ret = xmlRelaxNGIsCompileable(def->content);
+ break;
+ case XML_RELAXNG_TEXT:
+ case XML_RELAXNG_EMPTY:
+ ret = 1;
+ break;
+ case XML_RELAXNG_ELEMENT:
+ /*
+ * Check if the element content is compileable
+ */
+ if (((def->dflags & IS_NOT_COMPILABLE) == 0) &&
+ ((def->dflags & IS_COMPILABLE) == 0)) {
+ xmlRelaxNGDefinePtr list;
+
+ list = def->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGIsCompileable(list);
+ if (ret != 1)
+ break;
+ list = list->next;
+ }
+ /*
+ * Because the routine is recursive, we must guard against
+ * discovering both COMPILABLE and NOT_COMPILABLE
+ */
+ if (ret == 0) {
+ def->dflags &= ~IS_COMPILABLE;
+ def->dflags |= IS_NOT_COMPILABLE;
+ }
+ if ((ret == 1) && !(def->dflags &= IS_NOT_COMPILABLE))
+ def->dflags |= IS_COMPILABLE;
+#ifdef DEBUG_COMPILE
+ if (ret == 1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "element content for %s is compilable\n",
+ def->name);
+ } else if (ret == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "element content for %s is not compilable\n",
+ def->name);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Problem in RelaxNGIsCompileable for element %s\n",
+ def->name);
+ }
+#endif
+ }
+ /*
+ * All elements return a compileable status unless they
+ * are generic like anyName
+ */
+ if ((def->nameClass != NULL) || (def->name == NULL))
+ ret = 0;
+ else
+ ret = 1;
+ return (ret);
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_PARENTREF:
+ if (def->depth == -20) {
+ return (1);
+ } else {
+ xmlRelaxNGDefinePtr list;
+
+ def->depth = -20;
+ list = def->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGIsCompileable(list);
+ if (ret != 1)
+ break;
+ list = list->next;
+ }
+ }
+ break;
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_OPTIONAL:
+ case XML_RELAXNG_ZEROORMORE:
+ case XML_RELAXNG_ONEORMORE:
+ case XML_RELAXNG_CHOICE:
+ case XML_RELAXNG_GROUP:
+ case XML_RELAXNG_DEF:{
+ xmlRelaxNGDefinePtr list;
+
+ list = def->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGIsCompileable(list);
+ if (ret != 1)
+ break;
+ list = list->next;
+ }
+ break;
+ }
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_ATTRIBUTE:
+ case XML_RELAXNG_INTERLEAVE:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_PARAM:
+ case XML_RELAXNG_VALUE:
+ case XML_RELAXNG_NOT_ALLOWED:
+ ret = 0;
+ break;
+ }
+ if (ret == 0)
+ def->dflags |= IS_NOT_COMPILABLE;
+ if (ret == 1)
+ def->dflags |= IS_COMPILABLE;
+#ifdef DEBUG_COMPILE
+ if (ret == 1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "RelaxNGIsCompileable %s : true\n",
+ xmlRelaxNGDefName(def));
+ } else if (ret == 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "RelaxNGIsCompileable %s : false\n",
+ xmlRelaxNGDefName(def));
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Problem in RelaxNGIsCompileable %s\n",
+ xmlRelaxNGDefName(def));
+ }
+#endif
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCompile:
+ * ctxt: the RelaxNG parser context
+ * @define: the definition tree to compile
+ *
+ * Compile the set of definitions, it works recursively, till the
+ * element boundaries, where it tries to compile the content if possible
+ *
+ * Returns 0 if success and -1 in case of error
+ */
+static int
+xmlRelaxNGCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
+{
+ int ret = 0;
+ xmlRelaxNGDefinePtr list;
+
+ if ((ctxt == NULL) || (def == NULL))
+ return (-1);
+
+ switch (def->type) {
+ case XML_RELAXNG_START:
+ if ((xmlRelaxNGIsCompileable(def) == 1) && (def->depth != -25)) {
+ xmlAutomataPtr oldam = ctxt->am;
+ xmlAutomataStatePtr oldstate = ctxt->state;
+
+ def->depth = -25;
+
+ list = def->content;
+ ctxt->am = xmlNewAutomata();
+ if (ctxt->am == NULL)
+ return (-1);
+
+ /*
+ * assume identical strings but not same pointer are different
+ * atoms, needed for non-determinism detection
+ * That way if 2 elements with the same name are in a choice
+ * branch the automata is found non-deterministic and
+ * we fallback to the normal validation which does the right
+ * thing of exploring both choices.
+ */
+ xmlAutomataSetFlags(ctxt->am, 1);
+
+ ctxt->state = xmlAutomataGetInitState(ctxt->am);
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ xmlAutomataSetFinalState(ctxt->am, ctxt->state);
+ if (xmlAutomataIsDeterminist(ctxt->am))
+ def->contModel = xmlAutomataCompile(ctxt->am);
+
+ xmlFreeAutomata(ctxt->am);
+ ctxt->state = oldstate;
+ ctxt->am = oldam;
+ }
+ break;
+ case XML_RELAXNG_ELEMENT:
+ if ((ctxt->am != NULL) && (def->name != NULL)) {
+ ctxt->state = xmlAutomataNewTransition2(ctxt->am,
+ ctxt->state, NULL,
+ def->name, def->ns,
+ def);
+ }
+ if ((def->dflags & IS_COMPILABLE) && (def->depth != -25)) {
+ xmlAutomataPtr oldam = ctxt->am;
+ xmlAutomataStatePtr oldstate = ctxt->state;
+
+ def->depth = -25;
+
+ list = def->content;
+ ctxt->am = xmlNewAutomata();
+ if (ctxt->am == NULL)
+ return (-1);
+ xmlAutomataSetFlags(ctxt->am, 1);
+ ctxt->state = xmlAutomataGetInitState(ctxt->am);
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ xmlAutomataSetFinalState(ctxt->am, ctxt->state);
+ def->contModel = xmlAutomataCompile(ctxt->am);
+ if (!xmlRegexpIsDeterminist(def->contModel)) {
+#ifdef DEBUG_COMPILE
+ xmlGenericError(xmlGenericErrorContext,
+ "Content model not determinist %s\n",
+ def->name);
+#endif
+ /*
+ * we can only use the automata if it is determinist
+ */
+ xmlRegFreeRegexp(def->contModel);
+ def->contModel = NULL;
+ }
+ xmlFreeAutomata(ctxt->am);
+ ctxt->state = oldstate;
+ ctxt->am = oldam;
+ } else {
+ xmlAutomataPtr oldam = ctxt->am;
+
+ /*
+ * we can't build the content model for this element content
+ * but it still might be possible to build it for some of its
+ * children, recurse.
+ */
+ ret = xmlRelaxNGTryCompile(ctxt, def);
+ ctxt->am = oldam;
+ }
+ break;
+ case XML_RELAXNG_NOOP:
+ ret = xmlRelaxNGCompile(ctxt, def->content);
+ break;
+ case XML_RELAXNG_OPTIONAL:{
+ xmlAutomataStatePtr oldstate = ctxt->state;
+
+ list = def->content;
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ break;
+ }
+ case XML_RELAXNG_ZEROORMORE:{
+ xmlAutomataStatePtr oldstate;
+
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, NULL);
+ oldstate = ctxt->state;
+ list = def->content;
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, oldstate);
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, NULL);
+ break;
+ }
+ case XML_RELAXNG_ONEORMORE:{
+ xmlAutomataStatePtr oldstate;
+
+ list = def->content;
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ oldstate = ctxt->state;
+ list = def->content;
+ while (list != NULL) {
+ xmlRelaxNGCompile(ctxt, list);
+ list = list->next;
+ }
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, oldstate);
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, NULL);
+ break;
+ }
+ case XML_RELAXNG_CHOICE:{
+ xmlAutomataStatePtr target = NULL;
+ xmlAutomataStatePtr oldstate = ctxt->state;
+
+ list = def->content;
+ while (list != NULL) {
+ ctxt->state = oldstate;
+ ret = xmlRelaxNGCompile(ctxt, list);
+ if (ret != 0)
+ break;
+ if (target == NULL)
+ target = ctxt->state;
+ else {
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state,
+ target);
+ }
+ list = list->next;
+ }
+ ctxt->state = target;
+
+ break;
+ }
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_PARENTREF:
+ case XML_RELAXNG_GROUP:
+ case XML_RELAXNG_DEF:
+ list = def->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGCompile(ctxt, list);
+ if (ret != 0)
+ break;
+ list = list->next;
+ }
+ break;
+ case XML_RELAXNG_TEXT:{
+ xmlAutomataStatePtr oldstate;
+
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, NULL);
+ oldstate = ctxt->state;
+ xmlRelaxNGCompile(ctxt, def->content);
+ xmlAutomataNewTransition(ctxt->am, ctxt->state,
+ ctxt->state, BAD_CAST "#text",
+ NULL);
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, NULL);
+ break;
+ }
+ case XML_RELAXNG_EMPTY:
+ ctxt->state =
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, NULL);
+ break;
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_ATTRIBUTE:
+ case XML_RELAXNG_INTERLEAVE:
+ case XML_RELAXNG_NOT_ALLOWED:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_PARAM:
+ case XML_RELAXNG_VALUE:
+ /* This should not happen and generate an internal error */
+ fprintf(stderr, "RNG internal error trying to compile %s\n",
+ xmlRelaxNGDefName(def));
+ break;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGTryCompile:
+ * ctxt: the RelaxNG parser context
+ * @define: the definition tree to compile
+ *
+ * Try to compile the set of definitions, it works recursively,
+ * possibly ignoring parts which cannot be compiled.
+ *
+ * Returns 0 if success and -1 in case of error
+ */
+static int
+xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
+{
+ int ret = 0;
+ xmlRelaxNGDefinePtr list;
+
+ if ((ctxt == NULL) || (def == NULL))
+ return (-1);
+
+ if ((def->type == XML_RELAXNG_START) ||
+ (def->type == XML_RELAXNG_ELEMENT)) {
+ ret = xmlRelaxNGIsCompileable(def);
+ if ((def->dflags & IS_COMPILABLE) && (def->depth != -25)) {
+ ctxt->am = NULL;
+ ret = xmlRelaxNGCompile(ctxt, def);
+#ifdef DEBUG_PROGRESSIVE
+ if (ret == 0) {
+ if (def->type == XML_RELAXNG_START)
+ xmlGenericError(xmlGenericErrorContext,
+ "compiled the start\n");
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "compiled element %s\n", def->name);
+ } else {
+ if (def->type == XML_RELAXNG_START)
+ xmlGenericError(xmlGenericErrorContext,
+ "failed to compile the start\n");
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "failed to compile element %s\n",
+ def->name);
+ }
+#endif
+ return (ret);
+ }
+ }
+ switch (def->type) {
+ case XML_RELAXNG_NOOP:
+ ret = xmlRelaxNGTryCompile(ctxt, def->content);
+ break;
+ case XML_RELAXNG_TEXT:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_PARAM:
+ case XML_RELAXNG_VALUE:
+ case XML_RELAXNG_EMPTY:
+ case XML_RELAXNG_ELEMENT:
+ ret = 0;
+ break;
+ case XML_RELAXNG_OPTIONAL:
+ case XML_RELAXNG_ZEROORMORE:
+ case XML_RELAXNG_ONEORMORE:
+ case XML_RELAXNG_CHOICE:
+ case XML_RELAXNG_GROUP:
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_PARENTREF:
+ list = def->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGTryCompile(ctxt, list);
+ if (ret != 0)
+ break;
+ list = list->next;
+ }
+ break;
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_ATTRIBUTE:
+ case XML_RELAXNG_INTERLEAVE:
+ case XML_RELAXNG_NOT_ALLOWED:
+ ret = 0;
+ break;
+ }
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Parsing functions *
+ * *
+ ************************************************************************/
+
+static xmlRelaxNGDefinePtr xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr node);
+static xmlRelaxNGDefinePtr xmlRelaxNGParseElement(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr node);
+static xmlRelaxNGDefinePtr xmlRelaxNGParsePatterns(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr nodes,
+ int group);
+static xmlRelaxNGDefinePtr xmlRelaxNGParsePattern(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr node);
+static xmlRelaxNGPtr xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlNodePtr node);
+static int xmlRelaxNGParseGrammarContent(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlNodePtr nodes);
+static xmlRelaxNGDefinePtr xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr node,
+ xmlRelaxNGDefinePtr
+ def);
+static xmlRelaxNGGrammarPtr xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr
+ ctxt, xmlNodePtr nodes);
+static int xmlRelaxNGElementMatch(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define,
+ xmlNodePtr elem);
+
+
+#define IS_BLANK_NODE(n) (xmlRelaxNGIsBlank((n)->content))
+
+/**
+ * xmlRelaxNGIsNullable:
+ * @define: the definition to verify
+ *
+ * Check if a definition is nullable.
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error
+ */
+static int
+xmlRelaxNGIsNullable(xmlRelaxNGDefinePtr define)
+{
+ int ret;
+
+ if (define == NULL)
+ return (-1);
+
+ if (define->dflags & IS_NULLABLE)
+ return (1);
+ if (define->dflags & IS_NOT_NULLABLE)
+ return (0);
+ switch (define->type) {
+ case XML_RELAXNG_EMPTY:
+ case XML_RELAXNG_TEXT:
+ ret = 1;
+ break;
+ case XML_RELAXNG_NOOP:
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_PARENTREF:
+ case XML_RELAXNG_ONEORMORE:
+ ret = xmlRelaxNGIsNullable(define->content);
+ break;
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_NOT_ALLOWED:
+ case XML_RELAXNG_ELEMENT:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_PARAM:
+ case XML_RELAXNG_VALUE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_ATTRIBUTE:
+ ret = 0;
+ break;
+ case XML_RELAXNG_CHOICE:{
+ xmlRelaxNGDefinePtr list = define->content;
+
+ while (list != NULL) {
+ ret = xmlRelaxNGIsNullable(list);
+ if (ret != 0)
+ goto done;
+ list = list->next;
+ }
+ ret = 0;
+ break;
+ }
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_INTERLEAVE:
+ case XML_RELAXNG_GROUP:{
+ xmlRelaxNGDefinePtr list = define->content;
+
+ while (list != NULL) {
+ ret = xmlRelaxNGIsNullable(list);
+ if (ret != 1)
+ goto done;
+ list = list->next;
+ }
+ return (1);
+ }
+ default:
+ return (-1);
+ }
+ done:
+ if (ret == 0)
+ define->dflags |= IS_NOT_NULLABLE;
+ if (ret == 1)
+ define->dflags |= IS_NULLABLE;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGIsBlank:
+ * @str: a string
+ *
+ * Check if a string is ignorable c.f. 4.2. Whitespace
+ *
+ * Returns 1 if the string is NULL or made of blanks chars, 0 otherwise
+ */
+static int
+xmlRelaxNGIsBlank(xmlChar * str)
+{
+ if (str == NULL)
+ return (1);
+ while (*str != 0) {
+ if (!(IS_BLANK_CH(*str)))
+ return (0);
+ str++;
+ }
+ return (1);
+}
+
+/**
+ * xmlRelaxNGGetDataTypeLibrary:
+ * @ctxt: a Relax-NG parser context
+ * @node: the current data or value element
+ *
+ * Applies algorithm from 4.3. datatypeLibrary attribute
+ *
+ * Returns the datatypeLibary value or NULL if not found
+ */
+static xmlChar *
+xmlRelaxNGGetDataTypeLibrary(xmlRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlNodePtr node)
+{
+ xmlChar *ret, *escape;
+
+ if (node == NULL)
+ return(NULL);
+
+ if ((IS_RELAXNG(node, "data")) || (IS_RELAXNG(node, "value"))) {
+ ret = xmlGetProp(node, BAD_CAST "datatypeLibrary");
+ if (ret != NULL) {
+ if (ret[0] == 0) {
+ xmlFree(ret);
+ return (NULL);
+ }
+ escape = xmlURIEscapeStr(ret, BAD_CAST ":/#?");
+ if (escape == NULL) {
+ return (ret);
+ }
+ xmlFree(ret);
+ return (escape);
+ }
+ }
+ node = node->parent;
+ while ((node != NULL) && (node->type == XML_ELEMENT_NODE)) {
+ ret = xmlGetProp(node, BAD_CAST "datatypeLibrary");
+ if (ret != NULL) {
+ if (ret[0] == 0) {
+ xmlFree(ret);
+ return (NULL);
+ }
+ escape = xmlURIEscapeStr(ret, BAD_CAST ":/#?");
+ if (escape == NULL) {
+ return (ret);
+ }
+ xmlFree(ret);
+ return (escape);
+ }
+ node = node->parent;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlRelaxNGParseValue:
+ * @ctxt: a Relax-NG parser context
+ * @node: the data node.
+ *
+ * parse the content of a RelaxNG value node.
+ *
+ * Returns the definition pointer or NULL in case of error
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseValue(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr def = NULL;
+ xmlRelaxNGTypeLibraryPtr lib = NULL;
+ xmlChar *type;
+ xmlChar *library;
+ int success = 0;
+
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_VALUE;
+
+ type = xmlGetProp(node, BAD_CAST "type");
+ if (type != NULL) {
+ xmlRelaxNGNormExtSpace(type);
+ if (xmlValidateNCName(type, 0)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TYPE_VALUE,
+ "value type '%s' is not an NCName\n", type, NULL);
+ }
+ library = xmlRelaxNGGetDataTypeLibrary(ctxt, node);
+ if (library == NULL)
+ library =
+ xmlStrdup(BAD_CAST "http://relaxng.org/ns/structure/1.0");
+
+ def->name = type;
+ def->ns = library;
+
+ lib = (xmlRelaxNGTypeLibraryPtr)
+ xmlHashLookup(xmlRelaxNGRegisteredTypes, library);
+ if (lib == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_UNKNOWN_TYPE_LIB,
+ "Use of unregistered type library '%s'\n", library,
+ NULL);
+ def->data = NULL;
+ } else {
+ def->data = lib;
+ if (lib->have == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ERROR_TYPE_LIB,
+ "Internal error with type library '%s': no 'have'\n",
+ library, NULL);
+ } else {
+ success = lib->have(lib->data, def->name);
+ if (success != 1) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TYPE_NOT_FOUND,
+ "Error type '%s' is not exported by type library '%s'\n",
+ def->name, library);
+ }
+ }
+ }
+ }
+ if (node->children == NULL) {
+ def->value = xmlStrdup(BAD_CAST "");
+ } else if (((node->children->type != XML_TEXT_NODE) &&
+ (node->children->type != XML_CDATA_SECTION_NODE)) ||
+ (node->children->next != NULL)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TEXT_EXPECTED,
+ "Expecting a single text value for <value>content\n",
+ NULL, NULL);
+ } else if (def != NULL) {
+ def->value = xmlNodeGetContent(node);
+ if (def->value == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_VALUE_NO_CONTENT,
+ "Element <value> has no content\n", NULL, NULL);
+ } else if ((lib != NULL) && (lib->check != NULL) && (success == 1)) {
+ void *val = NULL;
+
+ success =
+ lib->check(lib->data, def->name, def->value, &val, node);
+ if (success != 1) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INVALID_VALUE,
+ "Value '%s' is not acceptable for type '%s'\n",
+ def->value, def->name);
+ } else {
+ if (val != NULL)
+ def->attrs = val;
+ }
+ }
+ }
+ return (def);
+}
+
+/**
+ * xmlRelaxNGParseData:
+ * @ctxt: a Relax-NG parser context
+ * @node: the data node.
+ *
+ * parse the content of a RelaxNG data node.
+ *
+ * Returns the definition pointer or NULL in case of error
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseData(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr def = NULL, except;
+ xmlRelaxNGDefinePtr param, lastparam = NULL;
+ xmlRelaxNGTypeLibraryPtr lib;
+ xmlChar *type;
+ xmlChar *library;
+ xmlNodePtr content;
+ int tmp;
+
+ type = xmlGetProp(node, BAD_CAST "type");
+ if (type == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TYPE_MISSING, "data has no type\n", NULL,
+ NULL);
+ return (NULL);
+ }
+ xmlRelaxNGNormExtSpace(type);
+ if (xmlValidateNCName(type, 0)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TYPE_VALUE,
+ "data type '%s' is not an NCName\n", type, NULL);
+ }
+ library = xmlRelaxNGGetDataTypeLibrary(ctxt, node);
+ if (library == NULL)
+ library =
+ xmlStrdup(BAD_CAST "http://relaxng.org/ns/structure/1.0");
+
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL) {
+ xmlFree(type);
+ return (NULL);
+ }
+ def->type = XML_RELAXNG_DATATYPE;
+ def->name = type;
+ def->ns = library;
+
+ lib = (xmlRelaxNGTypeLibraryPtr)
+ xmlHashLookup(xmlRelaxNGRegisteredTypes, library);
+ if (lib == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_UNKNOWN_TYPE_LIB,
+ "Use of unregistered type library '%s'\n", library,
+ NULL);
+ def->data = NULL;
+ } else {
+ def->data = lib;
+ if (lib->have == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ERROR_TYPE_LIB,
+ "Internal error with type library '%s': no 'have'\n",
+ library, NULL);
+ } else {
+ tmp = lib->have(lib->data, def->name);
+ if (tmp != 1) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TYPE_NOT_FOUND,
+ "Error type '%s' is not exported by type library '%s'\n",
+ def->name, library);
+ } else
+ if ((xmlStrEqual
+ (library,
+ BAD_CAST
+ "http://www.w3.org/2001/XMLSchema-datatypes"))
+ && ((xmlStrEqual(def->name, BAD_CAST "IDREF"))
+ || (xmlStrEqual(def->name, BAD_CAST "IDREFS")))) {
+ ctxt->idref = 1;
+ }
+ }
+ }
+ content = node->children;
+
+ /*
+ * Handle optional params
+ */
+ while (content != NULL) {
+ if (!xmlStrEqual(content->name, BAD_CAST "param"))
+ break;
+ if (xmlStrEqual(library,
+ BAD_CAST "http://relaxng.org/ns/structure/1.0")) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARAM_FORBIDDEN,
+ "Type library '%s' does not allow type parameters\n",
+ library, NULL);
+ content = content->next;
+ while ((content != NULL) &&
+ (xmlStrEqual(content->name, BAD_CAST "param")))
+ content = content->next;
+ } else {
+ param = xmlRelaxNGNewDefine(ctxt, node);
+ if (param != NULL) {
+ param->type = XML_RELAXNG_PARAM;
+ param->name = xmlGetProp(content, BAD_CAST "name");
+ if (param->name == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARAM_NAME_MISSING,
+ "param has no name\n", NULL, NULL);
+ }
+ param->value = xmlNodeGetContent(content);
+ if (lastparam == NULL) {
+ def->attrs = lastparam = param;
+ } else {
+ lastparam->next = param;
+ lastparam = param;
+ }
+ if (lib != NULL) {
+ }
+ }
+ content = content->next;
+ }
+ }
+ /*
+ * Handle optional except
+ */
+ if ((content != NULL)
+ && (xmlStrEqual(content->name, BAD_CAST "except"))) {
+ xmlNodePtr child;
+ xmlRelaxNGDefinePtr tmp2, last = NULL;
+
+ except = xmlRelaxNGNewDefine(ctxt, node);
+ if (except == NULL) {
+ return (def);
+ }
+ except->type = XML_RELAXNG_EXCEPT;
+ child = content->children;
+ def->content = except;
+ if (child == NULL) {
+ xmlRngPErr(ctxt, content, XML_RNGP_EXCEPT_NO_CONTENT,
+ "except has no content\n", NULL, NULL);
+ }
+ while (child != NULL) {
+ tmp2 = xmlRelaxNGParsePattern(ctxt, child);
+ if (tmp2 != NULL) {
+ if (last == NULL) {
+ except->content = last = tmp2;
+ } else {
+ last->next = tmp2;
+ last = tmp2;
+ }
+ }
+ child = child->next;
+ }
+ content = content->next;
+ }
+ /*
+ * Check there is no unhandled data
+ */
+ if (content != NULL) {
+ xmlRngPErr(ctxt, content, XML_RNGP_DATA_CONTENT,
+ "Element data has unexpected content %s\n",
+ content->name, NULL);
+ }
+
+ return (def);
+}
+
+static const xmlChar *invalidName = BAD_CAST "\1";
+
+/**
+ * xmlRelaxNGCompareNameClasses:
+ * @defs1: the first element/attribute defs
+ * @defs2: the second element/attribute defs
+ * @name: the restriction on the name
+ * @ns: the restriction on the namespace
+ *
+ * Compare the 2 lists of element definitions. The comparison is
+ * that if both lists do not accept the same QNames, it returns 1
+ * If the 2 lists can accept the same QName the comparison returns 0
+ *
+ * Returns 1 disttinct, 0 if equal
+ */
+static int
+xmlRelaxNGCompareNameClasses(xmlRelaxNGDefinePtr def1,
+ xmlRelaxNGDefinePtr def2)
+{
+ int ret = 1;
+ xmlNode node;
+ xmlNs ns;
+ xmlRelaxNGValidCtxt ctxt;
+
+ memset(&ctxt, 0, sizeof(xmlRelaxNGValidCtxt));
+
+ ctxt.flags = FLAGS_IGNORABLE | FLAGS_NOERROR;
+
+ if ((def1->type == XML_RELAXNG_ELEMENT) ||
+ (def1->type == XML_RELAXNG_ATTRIBUTE)) {
+ if (def2->type == XML_RELAXNG_TEXT)
+ return (1);
+ if (def1->name != NULL) {
+ node.name = def1->name;
+ } else {
+ node.name = invalidName;
+ }
+ if (def1->ns != NULL) {
+ if (def1->ns[0] == 0) {
+ node.ns = NULL;
+ } else {
+ node.ns = &ns;
+ ns.href = def1->ns;
+ }
+ } else {
+ node.ns = NULL;
+ }
+ if (xmlRelaxNGElementMatch(&ctxt, def2, &node)) {
+ if (def1->nameClass != NULL) {
+ ret = xmlRelaxNGCompareNameClasses(def1->nameClass, def2);
+ } else {
+ ret = 0;
+ }
+ } else {
+ ret = 1;
+ }
+ } else if (def1->type == XML_RELAXNG_TEXT) {
+ if (def2->type == XML_RELAXNG_TEXT)
+ return (0);
+ return (1);
+ } else if (def1->type == XML_RELAXNG_EXCEPT) {
+ TODO ret = 0;
+ } else {
+ TODO ret = 0;
+ }
+ if (ret == 0)
+ return (ret);
+ if ((def2->type == XML_RELAXNG_ELEMENT) ||
+ (def2->type == XML_RELAXNG_ATTRIBUTE)) {
+ if (def2->name != NULL) {
+ node.name = def2->name;
+ } else {
+ node.name = invalidName;
+ }
+ node.ns = &ns;
+ if (def2->ns != NULL) {
+ if (def2->ns[0] == 0) {
+ node.ns = NULL;
+ } else {
+ ns.href = def2->ns;
+ }
+ } else {
+ ns.href = invalidName;
+ }
+ if (xmlRelaxNGElementMatch(&ctxt, def1, &node)) {
+ if (def2->nameClass != NULL) {
+ ret = xmlRelaxNGCompareNameClasses(def2->nameClass, def1);
+ } else {
+ ret = 0;
+ }
+ } else {
+ ret = 1;
+ }
+ } else {
+ TODO ret = 0;
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCompareElemDefLists:
+ * @ctxt: a Relax-NG parser context
+ * @defs1: the first list of element/attribute defs
+ * @defs2: the second list of element/attribute defs
+ *
+ * Compare the 2 lists of element or attribute definitions. The comparison
+ * is that if both lists do not accept the same QNames, it returns 1
+ * If the 2 lists can accept the same QName the comparison returns 0
+ *
+ * Returns 1 disttinct, 0 if equal
+ */
+static int
+xmlRelaxNGCompareElemDefLists(xmlRelaxNGParserCtxtPtr ctxt
+ ATTRIBUTE_UNUSED, xmlRelaxNGDefinePtr * def1,
+ xmlRelaxNGDefinePtr * def2)
+{
+ xmlRelaxNGDefinePtr *basedef2 = def2;
+
+ if ((def1 == NULL) || (def2 == NULL))
+ return (1);
+ if ((*def1 == NULL) || (*def2 == NULL))
+ return (1);
+ while (*def1 != NULL) {
+ while ((*def2) != NULL) {
+ if (xmlRelaxNGCompareNameClasses(*def1, *def2) == 0)
+ return (0);
+ def2++;
+ }
+ def2 = basedef2;
+ def1++;
+ }
+ return (1);
+}
+
+/**
+ * xmlRelaxNGGenerateAttributes:
+ * @ctxt: a Relax-NG parser context
+ * @def: the definition definition
+ *
+ * Check if the definition can only generate attributes
+ *
+ * Returns 1 if yes, 0 if no and -1 in case of error.
+ */
+static int
+xmlRelaxNGGenerateAttributes(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr def)
+{
+ xmlRelaxNGDefinePtr parent, cur, tmp;
+
+ /*
+ * Don't run that check in case of error. Infinite recursion
+ * becomes possible.
+ */
+ if (ctxt->nbErrors != 0)
+ return (-1);
+
+ parent = NULL;
+ cur = def;
+ while (cur != NULL) {
+ if ((cur->type == XML_RELAXNG_ELEMENT) ||
+ (cur->type == XML_RELAXNG_TEXT) ||
+ (cur->type == XML_RELAXNG_DATATYPE) ||
+ (cur->type == XML_RELAXNG_PARAM) ||
+ (cur->type == XML_RELAXNG_LIST) ||
+ (cur->type == XML_RELAXNG_VALUE) ||
+ (cur->type == XML_RELAXNG_EMPTY))
+ return (0);
+ if ((cur->type == XML_RELAXNG_CHOICE) ||
+ (cur->type == XML_RELAXNG_INTERLEAVE) ||
+ (cur->type == XML_RELAXNG_GROUP) ||
+ (cur->type == XML_RELAXNG_ONEORMORE) ||
+ (cur->type == XML_RELAXNG_ZEROORMORE) ||
+ (cur->type == XML_RELAXNG_OPTIONAL) ||
+ (cur->type == XML_RELAXNG_PARENTREF) ||
+ (cur->type == XML_RELAXNG_EXTERNALREF) ||
+ (cur->type == XML_RELAXNG_REF) ||
+ (cur->type == XML_RELAXNG_DEF)) {
+ if (cur->content != NULL) {
+ parent = cur;
+ cur = cur->content;
+ tmp = cur;
+ while (tmp != NULL) {
+ tmp->parent = parent;
+ tmp = tmp->next;
+ }
+ continue;
+ }
+ }
+ if (cur == def)
+ break;
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == def)
+ return (1);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ return (1);
+}
+
+/**
+ * xmlRelaxNGGetElements:
+ * @ctxt: a Relax-NG parser context
+ * @def: the definition definition
+ * @eora: gather elements (0) or attributes (1)
+ *
+ * Compute the list of top elements a definition can generate
+ *
+ * Returns a list of elements or NULL if none was found.
+ */
+static xmlRelaxNGDefinePtr *
+xmlRelaxNGGetElements(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr def, int eora)
+{
+ xmlRelaxNGDefinePtr *ret = NULL, parent, cur, tmp;
+ int len = 0;
+ int max = 0;
+
+ /*
+ * Don't run that check in case of error. Infinite recursion
+ * becomes possible.
+ */
+ if (ctxt->nbErrors != 0)
+ return (NULL);
+
+ parent = NULL;
+ cur = def;
+ while (cur != NULL) {
+ if (((eora == 0) && ((cur->type == XML_RELAXNG_ELEMENT) ||
+ (cur->type == XML_RELAXNG_TEXT))) ||
+ ((eora == 1) && (cur->type == XML_RELAXNG_ATTRIBUTE))) {
+ if (ret == NULL) {
+ max = 10;
+ ret = (xmlRelaxNGDefinePtr *)
+ xmlMalloc((max + 1) * sizeof(xmlRelaxNGDefinePtr));
+ if (ret == NULL) {
+ xmlRngPErrMemory(ctxt, "getting element list\n");
+ return (NULL);
+ }
+ } else if (max <= len) {
+ xmlRelaxNGDefinePtr *temp;
+
+ max *= 2;
+ temp = xmlRealloc(ret,
+ (max + 1) * sizeof(xmlRelaxNGDefinePtr));
+ if (temp == NULL) {
+ xmlRngPErrMemory(ctxt, "getting element list\n");
+ xmlFree(ret);
+ return (NULL);
+ }
+ ret = temp;
+ }
+ ret[len++] = cur;
+ ret[len] = NULL;
+ } else if ((cur->type == XML_RELAXNG_CHOICE) ||
+ (cur->type == XML_RELAXNG_INTERLEAVE) ||
+ (cur->type == XML_RELAXNG_GROUP) ||
+ (cur->type == XML_RELAXNG_ONEORMORE) ||
+ (cur->type == XML_RELAXNG_ZEROORMORE) ||
+ (cur->type == XML_RELAXNG_OPTIONAL) ||
+ (cur->type == XML_RELAXNG_PARENTREF) ||
+ (cur->type == XML_RELAXNG_REF) ||
+ (cur->type == XML_RELAXNG_DEF) ||
+ (cur->type == XML_RELAXNG_EXTERNALREF)) {
+ /*
+ * Don't go within elements or attributes or string values.
+ * Just gather the element top list
+ */
+ if (cur->content != NULL) {
+ parent = cur;
+ cur = cur->content;
+ tmp = cur;
+ while (tmp != NULL) {
+ tmp->parent = parent;
+ tmp = tmp->next;
+ }
+ continue;
+ }
+ }
+ if (cur == def)
+ break;
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == def)
+ return (ret);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCheckChoiceDeterminism:
+ * @ctxt: a Relax-NG parser context
+ * @def: the choice definition
+ *
+ * Also used to find indeterministic pattern in choice
+ */
+static void
+xmlRelaxNGCheckChoiceDeterminism(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr def)
+{
+ xmlRelaxNGDefinePtr **list;
+ xmlRelaxNGDefinePtr cur;
+ int nbchild = 0, i, j, ret;
+ int is_nullable = 0;
+ int is_indeterminist = 0;
+ xmlHashTablePtr triage = NULL;
+ int is_triable = 1;
+
+ if ((def == NULL) || (def->type != XML_RELAXNG_CHOICE))
+ return;
+
+ if (def->dflags & IS_PROCESSED)
+ return;
+
+ /*
+ * Don't run that check in case of error. Infinite recursion
+ * becomes possible.
+ */
+ if (ctxt->nbErrors != 0)
+ return;
+
+ is_nullable = xmlRelaxNGIsNullable(def);
+
+ cur = def->content;
+ while (cur != NULL) {
+ nbchild++;
+ cur = cur->next;
+ }
+
+ list = (xmlRelaxNGDefinePtr **) xmlMalloc(nbchild *
+ sizeof(xmlRelaxNGDefinePtr
+ *));
+ if (list == NULL) {
+ xmlRngPErrMemory(ctxt, "building choice\n");
+ return;
+ }
+ i = 0;
+ /*
+ * a bit strong but safe
+ */
+ if (is_nullable == 0) {
+ triage = xmlHashCreate(10);
+ } else {
+ is_triable = 0;
+ }
+ cur = def->content;
+ while (cur != NULL) {
+ list[i] = xmlRelaxNGGetElements(ctxt, cur, 0);
+ if ((list[i] == NULL) || (list[i][0] == NULL)) {
+ is_triable = 0;
+ } else if (is_triable == 1) {
+ xmlRelaxNGDefinePtr *tmp;
+ int res;
+
+ tmp = list[i];
+ while ((*tmp != NULL) && (is_triable == 1)) {
+ if ((*tmp)->type == XML_RELAXNG_TEXT) {
+ res = xmlHashAddEntry2(triage,
+ BAD_CAST "#text", NULL,
+ (void *) cur);
+ if (res != 0)
+ is_triable = -1;
+ } else if (((*tmp)->type == XML_RELAXNG_ELEMENT) &&
+ ((*tmp)->name != NULL)) {
+ if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
+ res = xmlHashAddEntry2(triage,
+ (*tmp)->name, NULL,
+ (void *) cur);
+ else
+ res = xmlHashAddEntry2(triage,
+ (*tmp)->name, (*tmp)->ns,
+ (void *) cur);
+ if (res != 0)
+ is_triable = -1;
+ } else if ((*tmp)->type == XML_RELAXNG_ELEMENT) {
+ if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
+ res = xmlHashAddEntry2(triage,
+ BAD_CAST "#any", NULL,
+ (void *) cur);
+ else
+ res = xmlHashAddEntry2(triage,
+ BAD_CAST "#any", (*tmp)->ns,
+ (void *) cur);
+ if (res != 0)
+ is_triable = -1;
+ } else {
+ is_triable = -1;
+ }
+ tmp++;
+ }
+ }
+ i++;
+ cur = cur->next;
+ }
+
+ for (i = 0; i < nbchild; i++) {
+ if (list[i] == NULL)
+ continue;
+ for (j = 0; j < i; j++) {
+ if (list[j] == NULL)
+ continue;
+ ret = xmlRelaxNGCompareElemDefLists(ctxt, list[i], list[j]);
+ if (ret == 0) {
+ is_indeterminist = 1;
+ }
+ }
+ }
+ for (i = 0; i < nbchild; i++) {
+ if (list[i] != NULL)
+ xmlFree(list[i]);
+ }
+
+ xmlFree(list);
+ if (is_indeterminist) {
+ def->dflags |= IS_INDETERMINIST;
+ }
+ if (is_triable == 1) {
+ def->dflags |= IS_TRIABLE;
+ def->data = triage;
+ } else if (triage != NULL) {
+ xmlHashFree(triage, NULL);
+ }
+ def->dflags |= IS_PROCESSED;
+}
+
+/**
+ * xmlRelaxNGCheckGroupAttrs:
+ * @ctxt: a Relax-NG parser context
+ * @def: the group definition
+ *
+ * Detects violations of rule 7.3
+ */
+static void
+xmlRelaxNGCheckGroupAttrs(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr def)
+{
+ xmlRelaxNGDefinePtr **list;
+ xmlRelaxNGDefinePtr cur;
+ int nbchild = 0, i, j, ret;
+
+ if ((def == NULL) ||
+ ((def->type != XML_RELAXNG_GROUP) &&
+ (def->type != XML_RELAXNG_ELEMENT)))
+ return;
+
+ if (def->dflags & IS_PROCESSED)
+ return;
+
+ /*
+ * Don't run that check in case of error. Infinite recursion
+ * becomes possible.
+ */
+ if (ctxt->nbErrors != 0)
+ return;
+
+ cur = def->attrs;
+ while (cur != NULL) {
+ nbchild++;
+ cur = cur->next;
+ }
+ cur = def->content;
+ while (cur != NULL) {
+ nbchild++;
+ cur = cur->next;
+ }
+
+ list = (xmlRelaxNGDefinePtr **) xmlMalloc(nbchild *
+ sizeof(xmlRelaxNGDefinePtr
+ *));
+ if (list == NULL) {
+ xmlRngPErrMemory(ctxt, "building group\n");
+ return;
+ }
+ i = 0;
+ cur = def->attrs;
+ while (cur != NULL) {
+ list[i] = xmlRelaxNGGetElements(ctxt, cur, 1);
+ i++;
+ cur = cur->next;
+ }
+ cur = def->content;
+ while (cur != NULL) {
+ list[i] = xmlRelaxNGGetElements(ctxt, cur, 1);
+ i++;
+ cur = cur->next;
+ }
+
+ for (i = 0; i < nbchild; i++) {
+ if (list[i] == NULL)
+ continue;
+ for (j = 0; j < i; j++) {
+ if (list[j] == NULL)
+ continue;
+ ret = xmlRelaxNGCompareElemDefLists(ctxt, list[i], list[j]);
+ if (ret == 0) {
+ xmlRngPErr(ctxt, def->node, XML_RNGP_GROUP_ATTR_CONFLICT,
+ "Attributes conflicts in group\n", NULL, NULL);
+ }
+ }
+ }
+ for (i = 0; i < nbchild; i++) {
+ if (list[i] != NULL)
+ xmlFree(list[i]);
+ }
+
+ xmlFree(list);
+ def->dflags |= IS_PROCESSED;
+}
+
+/**
+ * xmlRelaxNGComputeInterleaves:
+ * @def: the interleave definition
+ * @ctxt: a Relax-NG parser context
+ * @name: the definition name
+ *
+ * A lot of work for preprocessing interleave definitions
+ * is potentially needed to get a decent execution speed at runtime
+ * - trying to get a total order on the element nodes generated
+ * by the interleaves, order the list of interleave definitions
+ * following that order.
+ * - if <text/> is used to handle mixed content, it is better to
+ * flag this in the define and simplify the runtime checking
+ * algorithm
+ */
+static void
+xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def,
+ xmlRelaxNGParserCtxtPtr ctxt,
+ xmlChar * name ATTRIBUTE_UNUSED)
+{
+ xmlRelaxNGDefinePtr cur, *tmp;
+
+ xmlRelaxNGPartitionPtr partitions = NULL;
+ xmlRelaxNGInterleaveGroupPtr *groups = NULL;
+ xmlRelaxNGInterleaveGroupPtr group;
+ int i, j, ret, res;
+ int nbgroups = 0;
+ int nbchild = 0;
+ int is_mixed = 0;
+ int is_determinist = 1;
+
+ /*
+ * Don't run that check in case of error. Infinite recursion
+ * becomes possible.
+ */
+ if (ctxt->nbErrors != 0)
+ return;
+
+#ifdef DEBUG_INTERLEAVE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGComputeInterleaves(%s)\n", name);
+#endif
+ cur = def->content;
+ while (cur != NULL) {
+ nbchild++;
+ cur = cur->next;
+ }
+
+#ifdef DEBUG_INTERLEAVE
+ xmlGenericError(xmlGenericErrorContext, " %d child\n", nbchild);
+#endif
+ groups = (xmlRelaxNGInterleaveGroupPtr *)
+ xmlMalloc(nbchild * sizeof(xmlRelaxNGInterleaveGroupPtr));
+ if (groups == NULL)
+ goto error;
+ cur = def->content;
+ while (cur != NULL) {
+ groups[nbgroups] = (xmlRelaxNGInterleaveGroupPtr)
+ xmlMalloc(sizeof(xmlRelaxNGInterleaveGroup));
+ if (groups[nbgroups] == NULL)
+ goto error;
+ if (cur->type == XML_RELAXNG_TEXT)
+ is_mixed++;
+ groups[nbgroups]->rule = cur;
+ groups[nbgroups]->defs = xmlRelaxNGGetElements(ctxt, cur, 0);
+ groups[nbgroups]->attrs = xmlRelaxNGGetElements(ctxt, cur, 1);
+ nbgroups++;
+ cur = cur->next;
+ }
+#ifdef DEBUG_INTERLEAVE
+ xmlGenericError(xmlGenericErrorContext, " %d groups\n", nbgroups);
+#endif
+
+ /*
+ * Let's check that all rules makes a partitions according to 7.4
+ */
+ partitions = (xmlRelaxNGPartitionPtr)
+ xmlMalloc(sizeof(xmlRelaxNGPartition));
+ if (partitions == NULL)
+ goto error;
+ memset(partitions, 0, sizeof(xmlRelaxNGPartition));
+ partitions->nbgroups = nbgroups;
+ partitions->triage = xmlHashCreate(nbgroups);
+ for (i = 0; i < nbgroups; i++) {
+ group = groups[i];
+ for (j = i + 1; j < nbgroups; j++) {
+ if (groups[j] == NULL)
+ continue;
+
+ ret = xmlRelaxNGCompareElemDefLists(ctxt, group->defs,
+ groups[j]->defs);
+ if (ret == 0) {
+ xmlRngPErr(ctxt, def->node, XML_RNGP_ELEM_TEXT_CONFLICT,
+ "Element or text conflicts in interleave\n",
+ NULL, NULL);
+ }
+ ret = xmlRelaxNGCompareElemDefLists(ctxt, group->attrs,
+ groups[j]->attrs);
+ if (ret == 0) {
+ xmlRngPErr(ctxt, def->node, XML_RNGP_ATTR_CONFLICT,
+ "Attributes conflicts in interleave\n", NULL,
+ NULL);
+ }
+ }
+ tmp = group->defs;
+ if ((tmp != NULL) && (*tmp != NULL)) {
+ while (*tmp != NULL) {
+ if ((*tmp)->type == XML_RELAXNG_TEXT) {
+ res = xmlHashAddEntry2(partitions->triage,
+ BAD_CAST "#text", NULL,
+ (void *) (long) (i + 1));
+ if (res != 0)
+ is_determinist = -1;
+ } else if (((*tmp)->type == XML_RELAXNG_ELEMENT) &&
+ ((*tmp)->name != NULL)) {
+ if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
+ res = xmlHashAddEntry2(partitions->triage,
+ (*tmp)->name, NULL,
+ (void *) (long) (i + 1));
+ else
+ res = xmlHashAddEntry2(partitions->triage,
+ (*tmp)->name, (*tmp)->ns,
+ (void *) (long) (i + 1));
+ if (res != 0)
+ is_determinist = -1;
+ } else if ((*tmp)->type == XML_RELAXNG_ELEMENT) {
+ if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
+ res = xmlHashAddEntry2(partitions->triage,
+ BAD_CAST "#any", NULL,
+ (void *) (long) (i + 1));
+ else
+ res = xmlHashAddEntry2(partitions->triage,
+ BAD_CAST "#any", (*tmp)->ns,
+ (void *) (long) (i + 1));
+ if ((*tmp)->nameClass != NULL)
+ is_determinist = 2;
+ if (res != 0)
+ is_determinist = -1;
+ } else {
+ is_determinist = -1;
+ }
+ tmp++;
+ }
+ } else {
+ is_determinist = 0;
+ }
+ }
+ partitions->groups = groups;
+
+ /*
+ * and save the partition list back in the def
+ */
+ def->data = partitions;
+ if (is_mixed != 0)
+ def->dflags |= IS_MIXED;
+ if (is_determinist == 1)
+ partitions->flags = IS_DETERMINIST;
+ if (is_determinist == 2)
+ partitions->flags = IS_DETERMINIST | IS_NEEDCHECK;
+ return;
+
+ error:
+ xmlRngPErrMemory(ctxt, "in interleave computation\n");
+ if (groups != NULL) {
+ for (i = 0; i < nbgroups; i++)
+ if (groups[i] != NULL) {
+ if (groups[i]->defs != NULL)
+ xmlFree(groups[i]->defs);
+ xmlFree(groups[i]);
+ }
+ xmlFree(groups);
+ }
+ xmlRelaxNGFreePartition(partitions);
+}
+
+/**
+ * xmlRelaxNGParseInterleave:
+ * @ctxt: a Relax-NG parser context
+ * @node: the data node.
+ *
+ * parse the content of a RelaxNG interleave node.
+ *
+ * Returns the definition pointer or NULL in case of error
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseInterleave(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr def = NULL;
+ xmlRelaxNGDefinePtr last = NULL, cur;
+ xmlNodePtr child;
+
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL) {
+ return (NULL);
+ }
+ def->type = XML_RELAXNG_INTERLEAVE;
+
+ if (ctxt->interleaves == NULL)
+ ctxt->interleaves = xmlHashCreate(10);
+ if (ctxt->interleaves == NULL) {
+ xmlRngPErrMemory(ctxt, "create interleaves\n");
+ } else {
+ char name[32];
+
+ snprintf(name, 32, "interleave%d", ctxt->nbInterleaves++);
+ if (xmlHashAddEntry(ctxt->interleaves, BAD_CAST name, def) < 0) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INTERLEAVE_ADD,
+ "Failed to add %s to hash table\n",
+ (const xmlChar *) name, NULL);
+ }
+ }
+ child = node->children;
+ if (child == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INTERLEAVE_NO_CONTENT,
+ "Element interleave is empty\n", NULL, NULL);
+ }
+ while (child != NULL) {
+ if (IS_RELAXNG(child, "element")) {
+ cur = xmlRelaxNGParseElement(ctxt, child);
+ } else {
+ cur = xmlRelaxNGParsePattern(ctxt, child);
+ }
+ if (cur != NULL) {
+ cur->parent = def;
+ if (last == NULL) {
+ def->content = last = cur;
+ } else {
+ last->next = cur;
+ last = cur;
+ }
+ }
+ child = child->next;
+ }
+
+ return (def);
+}
+
+/**
+ * xmlRelaxNGParseInclude:
+ * @ctxt: a Relax-NG parser context
+ * @node: the include node
+ *
+ * Integrate the content of an include node in the current grammar
+ *
+ * Returns 0 in case of success or -1 in case of error
+ */
+static int
+xmlRelaxNGParseInclude(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGIncludePtr incl;
+ xmlNodePtr root;
+ int ret = 0, tmp;
+
+ incl = node->psvi;
+ if (incl == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INCLUDE_EMPTY,
+ "Include node has no data\n", NULL, NULL);
+ return (-1);
+ }
+ root = xmlDocGetRootElement(incl->doc);
+ if (root == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY, "Include document is empty\n",
+ NULL, NULL);
+ return (-1);
+ }
+ if (!xmlStrEqual(root->name, BAD_CAST "grammar")) {
+ xmlRngPErr(ctxt, node, XML_RNGP_GRAMMAR_MISSING,
+ "Include document root is not a grammar\n", NULL, NULL);
+ return (-1);
+ }
+
+ /*
+ * Merge the definition from both the include and the internal list
+ */
+ if (root->children != NULL) {
+ tmp = xmlRelaxNGParseGrammarContent(ctxt, root->children);
+ if (tmp != 0)
+ ret = -1;
+ }
+ if (node->children != NULL) {
+ tmp = xmlRelaxNGParseGrammarContent(ctxt, node->children);
+ if (tmp != 0)
+ ret = -1;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseDefine:
+ * @ctxt: a Relax-NG parser context
+ * @node: the define node
+ *
+ * parse the content of a RelaxNG define element node.
+ *
+ * Returns 0 in case of success or -1 in case of error
+ */
+static int
+xmlRelaxNGParseDefine(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlChar *name;
+ int ret = 0, tmp;
+ xmlRelaxNGDefinePtr def;
+ const xmlChar *olddefine;
+
+ name = xmlGetProp(node, BAD_CAST "name");
+ if (name == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_DEFINE_NAME_MISSING,
+ "define has no name\n", NULL, NULL);
+ } else {
+ xmlRelaxNGNormExtSpace(name);
+ if (xmlValidateNCName(name, 0)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INVALID_DEFINE_NAME,
+ "define name '%s' is not an NCName\n", name, NULL);
+ }
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL) {
+ xmlFree(name);
+ return (-1);
+ }
+ def->type = XML_RELAXNG_DEF;
+ def->name = name;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_DEFINE_EMPTY,
+ "define has no children\n", NULL, NULL);
+ } else {
+ olddefine = ctxt->define;
+ ctxt->define = name;
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 0);
+ ctxt->define = olddefine;
+ }
+ if (ctxt->grammar->defs == NULL)
+ ctxt->grammar->defs = xmlHashCreate(10);
+ if (ctxt->grammar->defs == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_DEFINE_CREATE_FAILED,
+ "Could not create definition hash\n", NULL, NULL);
+ ret = -1;
+ } else {
+ tmp = xmlHashAddEntry(ctxt->grammar->defs, name, def);
+ if (tmp < 0) {
+ xmlRelaxNGDefinePtr prev;
+
+ prev = xmlHashLookup(ctxt->grammar->defs, name);
+ if (prev == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_DEFINE_CREATE_FAILED,
+ "Internal error on define aggregation of %s\n",
+ name, NULL);
+ ret = -1;
+ } else {
+ while (prev->nextHash != NULL)
+ prev = prev->nextHash;
+ prev->nextHash = def;
+ }
+ }
+ }
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseImportRef:
+ * @payload: the parser context
+ * @data: the current grammar
+ * @name: the reference name
+ *
+ * Import import one references into the current grammar
+ */
+static void
+xmlRelaxNGParseImportRef(void *payload, void *data, xmlChar *name) {
+ xmlRelaxNGParserCtxtPtr ctxt = (xmlRelaxNGParserCtxtPtr) data;
+ xmlRelaxNGDefinePtr def = (xmlRelaxNGDefinePtr) payload;
+ int tmp;
+
+ def->dflags |= IS_EXTERNAL_REF;
+
+ tmp = xmlHashAddEntry(ctxt->grammar->refs, name, def);
+ if (tmp < 0) {
+ xmlRelaxNGDefinePtr prev;
+
+ prev = (xmlRelaxNGDefinePtr)
+ xmlHashLookup(ctxt->grammar->refs, def->name);
+ if (prev == NULL) {
+ if (def->name != NULL) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED,
+ "Error refs definitions '%s'\n",
+ def->name, NULL);
+ } else {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED,
+ "Error refs definitions\n",
+ NULL, NULL);
+ }
+ } else {
+ def->nextHash = prev->nextHash;
+ prev->nextHash = def;
+ }
+ }
+}
+
+/**
+ * xmlRelaxNGParseImportRefs:
+ * @ctxt: the parser context
+ * @grammar: the sub grammar
+ *
+ * Import references from the subgrammar into the current grammar
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlRelaxNGParseImportRefs(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGGrammarPtr grammar) {
+ if ((ctxt == NULL) || (grammar == NULL) || (ctxt->grammar == NULL))
+ return(-1);
+ if (grammar->refs == NULL)
+ return(0);
+ if (ctxt->grammar->refs == NULL)
+ ctxt->grammar->refs = xmlHashCreate(10);
+ if (ctxt->grammar->refs == NULL) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_REF_CREATE_FAILED,
+ "Could not create references hash\n", NULL, NULL);
+ return(-1);
+ }
+ xmlHashScan(grammar->refs, xmlRelaxNGParseImportRef, ctxt);
+ return(0);
+}
+
+/**
+ * xmlRelaxNGProcessExternalRef:
+ * @ctxt: the parser context
+ * @node: the externlRef node
+ *
+ * Process and compile an externlRef node
+ *
+ * Returns the xmlRelaxNGDefinePtr or NULL in case of error
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGProcessExternalRef(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDocumentPtr docu;
+ xmlNodePtr root, tmp;
+ xmlChar *ns;
+ int newNs = 0, oldflags;
+ xmlRelaxNGDefinePtr def;
+
+ docu = node->psvi;
+ if (docu != NULL) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_EXTERNALREF;
+
+ if (docu->content == NULL) {
+ /*
+ * Then do the parsing for good
+ */
+ root = xmlDocGetRootElement(docu->doc);
+ if (root == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EXTERNALREF_EMTPY,
+ "xmlRelaxNGParse: %s is empty\n", ctxt->URL,
+ NULL);
+ return (NULL);
+ }
+ /*
+ * ns transmission rules
+ */
+ ns = xmlGetProp(root, BAD_CAST "ns");
+ if (ns == NULL) {
+ tmp = node;
+ while ((tmp != NULL) && (tmp->type == XML_ELEMENT_NODE)) {
+ ns = xmlGetProp(tmp, BAD_CAST "ns");
+ if (ns != NULL) {
+ break;
+ }
+ tmp = tmp->parent;
+ }
+ if (ns != NULL) {
+ xmlSetProp(root, BAD_CAST "ns", ns);
+ newNs = 1;
+ xmlFree(ns);
+ }
+ } else {
+ xmlFree(ns);
+ }
+
+ /*
+ * Parsing to get a precompiled schemas.
+ */
+ oldflags = ctxt->flags;
+ ctxt->flags |= XML_RELAXNG_IN_EXTERNALREF;
+ docu->schema = xmlRelaxNGParseDocument(ctxt, root);
+ ctxt->flags = oldflags;
+ if ((docu->schema != NULL) &&
+ (docu->schema->topgrammar != NULL)) {
+ docu->content = docu->schema->topgrammar->start;
+ if (docu->schema->topgrammar->refs)
+ xmlRelaxNGParseImportRefs(ctxt, docu->schema->topgrammar);
+ }
+
+ /*
+ * the externalRef may be reused in a different ns context
+ */
+ if (newNs == 1) {
+ xmlUnsetProp(root, BAD_CAST "ns");
+ }
+ }
+ def->content = docu->content;
+ } else {
+ def = NULL;
+ }
+ return (def);
+}
+
+/**
+ * xmlRelaxNGParsePattern:
+ * @ctxt: a Relax-NG parser context
+ * @node: the pattern node.
+ *
+ * parse the content of a RelaxNG pattern node.
+ *
+ * Returns the definition pointer or NULL in case of error or if no
+ * pattern is generated.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParsePattern(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr def = NULL;
+
+ if (node == NULL) {
+ return (NULL);
+ }
+ if (IS_RELAXNG(node, "element")) {
+ def = xmlRelaxNGParseElement(ctxt, node);
+ } else if (IS_RELAXNG(node, "attribute")) {
+ def = xmlRelaxNGParseAttribute(ctxt, node);
+ } else if (IS_RELAXNG(node, "empty")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_EMPTY;
+ if (node->children != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_NOT_EMPTY,
+ "empty: had a child node\n", NULL, NULL);
+ }
+ } else if (IS_RELAXNG(node, "text")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_TEXT;
+ if (node->children != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_TEXT_HAS_CHILD,
+ "text: had a child node\n", NULL, NULL);
+ }
+ } else if (IS_RELAXNG(node, "zeroOrMore")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_ZEROORMORE;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 1);
+ }
+ } else if (IS_RELAXNG(node, "oneOrMore")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_ONEORMORE;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 1);
+ }
+ } else if (IS_RELAXNG(node, "optional")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_OPTIONAL;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 1);
+ }
+ } else if (IS_RELAXNG(node, "choice")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_CHOICE;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 0);
+ }
+ } else if (IS_RELAXNG(node, "group")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_GROUP;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 0);
+ }
+ } else if (IS_RELAXNG(node, "ref")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_REF;
+ def->name = xmlGetProp(node, BAD_CAST "name");
+ if (def->name == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_NO_NAME, "ref has no name\n",
+ NULL, NULL);
+ } else {
+ xmlRelaxNGNormExtSpace(def->name);
+ if (xmlValidateNCName(def->name, 0)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_NAME_INVALID,
+ "ref name '%s' is not an NCName\n", def->name,
+ NULL);
+ }
+ }
+ if (node->children != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_NOT_EMPTY, "ref is not empty\n",
+ NULL, NULL);
+ }
+ if (ctxt->grammar->refs == NULL)
+ ctxt->grammar->refs = xmlHashCreate(10);
+ if (ctxt->grammar->refs == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_CREATE_FAILED,
+ "Could not create references hash\n", NULL, NULL);
+ def = NULL;
+ } else {
+ int tmp;
+
+ tmp = xmlHashAddEntry(ctxt->grammar->refs, def->name, def);
+ if (tmp < 0) {
+ xmlRelaxNGDefinePtr prev;
+
+ prev = (xmlRelaxNGDefinePtr)
+ xmlHashLookup(ctxt->grammar->refs, def->name);
+ if (prev == NULL) {
+ if (def->name != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_CREATE_FAILED,
+ "Error refs definitions '%s'\n",
+ def->name, NULL);
+ } else {
+ xmlRngPErr(ctxt, node, XML_RNGP_REF_CREATE_FAILED,
+ "Error refs definitions\n",
+ NULL, NULL);
+ }
+ def = NULL;
+ } else {
+ def->nextHash = prev->nextHash;
+ prev->nextHash = def;
+ }
+ }
+ }
+ } else if (IS_RELAXNG(node, "data")) {
+ def = xmlRelaxNGParseData(ctxt, node);
+ } else if (IS_RELAXNG(node, "value")) {
+ def = xmlRelaxNGParseValue(ctxt, node);
+ } else if (IS_RELAXNG(node, "list")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_LIST;
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT,
+ "Element %s is empty\n", node->name, NULL);
+ } else {
+ def->content =
+ xmlRelaxNGParsePatterns(ctxt, node->children, 0);
+ }
+ } else if (IS_RELAXNG(node, "interleave")) {
+ def = xmlRelaxNGParseInterleave(ctxt, node);
+ } else if (IS_RELAXNG(node, "externalRef")) {
+ def = xmlRelaxNGProcessExternalRef(ctxt, node);
+ } else if (IS_RELAXNG(node, "notAllowed")) {
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_NOT_ALLOWED;
+ if (node->children != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_NOTALLOWED_NOT_EMPTY,
+ "xmlRelaxNGParse: notAllowed element is not empty\n",
+ NULL, NULL);
+ }
+ } else if (IS_RELAXNG(node, "grammar")) {
+ xmlRelaxNGGrammarPtr grammar, old;
+ xmlRelaxNGGrammarPtr oldparent;
+
+#ifdef DEBUG_GRAMMAR
+ xmlGenericError(xmlGenericErrorContext,
+ "Found <grammar> pattern\n");
+#endif
+
+ oldparent = ctxt->parentgrammar;
+ old = ctxt->grammar;
+ ctxt->parentgrammar = old;
+ grammar = xmlRelaxNGParseGrammar(ctxt, node->children);
+ if (old != NULL) {
+ ctxt->grammar = old;
+ ctxt->parentgrammar = oldparent;
+#if 0
+ if (grammar != NULL) {
+ grammar->next = old->next;
+ old->next = grammar;
+ }
+#endif
+ }
+ if (grammar != NULL)
+ def = grammar->start;
+ else
+ def = NULL;
+ } else if (IS_RELAXNG(node, "parentRef")) {
+ if (ctxt->parentgrammar == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_NO_PARENT,
+ "Use of parentRef without a parent grammar\n", NULL,
+ NULL);
+ return (NULL);
+ }
+ def = xmlRelaxNGNewDefine(ctxt, node);
+ if (def == NULL)
+ return (NULL);
+ def->type = XML_RELAXNG_PARENTREF;
+ def->name = xmlGetProp(node, BAD_CAST "name");
+ if (def->name == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_NO_NAME,
+ "parentRef has no name\n", NULL, NULL);
+ } else {
+ xmlRelaxNGNormExtSpace(def->name);
+ if (xmlValidateNCName(def->name, 0)) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_NAME_INVALID,
+ "parentRef name '%s' is not an NCName\n",
+ def->name, NULL);
+ }
+ }
+ if (node->children != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_NOT_EMPTY,
+ "parentRef is not empty\n", NULL, NULL);
+ }
+ if (ctxt->parentgrammar->refs == NULL)
+ ctxt->parentgrammar->refs = xmlHashCreate(10);
+ if (ctxt->parentgrammar->refs == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_CREATE_FAILED,
+ "Could not create references hash\n", NULL, NULL);
+ def = NULL;
+ } else if (def->name != NULL) {
+ int tmp;
+
+ tmp =
+ xmlHashAddEntry(ctxt->parentgrammar->refs, def->name, def);
+ if (tmp < 0) {
+ xmlRelaxNGDefinePtr prev;
+
+ prev = (xmlRelaxNGDefinePtr)
+ xmlHashLookup(ctxt->parentgrammar->refs, def->name);
+ if (prev == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_PARENTREF_CREATE_FAILED,
+ "Internal error parentRef definitions '%s'\n",
+ def->name, NULL);
+ def = NULL;
+ } else {
+ def->nextHash = prev->nextHash;
+ prev->nextHash = def;
+ }
+ }
+ }
+ } else if (IS_RELAXNG(node, "mixed")) {
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EMPTY_CONSTRUCT, "Mixed is empty\n",
+ NULL, NULL);
+ def = NULL;
+ } else {
+ def = xmlRelaxNGParseInterleave(ctxt, node);
+ if (def != NULL) {
+ xmlRelaxNGDefinePtr tmp;
+
+ if ((def->content != NULL) && (def->content->next != NULL)) {
+ tmp = xmlRelaxNGNewDefine(ctxt, node);
+ if (tmp != NULL) {
+ tmp->type = XML_RELAXNG_GROUP;
+ tmp->content = def->content;
+ def->content = tmp;
+ }
+ }
+
+ tmp = xmlRelaxNGNewDefine(ctxt, node);
+ if (tmp == NULL)
+ return (def);
+ tmp->type = XML_RELAXNG_TEXT;
+ tmp->next = def->content;
+ def->content = tmp;
+ }
+ }
+ } else {
+ xmlRngPErr(ctxt, node, XML_RNGP_UNKNOWN_CONSTRUCT,
+ "Unexpected node %s is not a pattern\n", node->name,
+ NULL);
+ def = NULL;
+ }
+ return (def);
+}
+
+/**
+ * xmlRelaxNGParseAttribute:
+ * @ctxt: a Relax-NG parser context
+ * @node: the element node
+ *
+ * parse the content of a RelaxNG attribute node.
+ *
+ * Returns the definition pointer or NULL in case of error.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr ret, cur;
+ xmlNodePtr child;
+ int old_flags;
+
+ ret = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret == NULL)
+ return (NULL);
+ ret->type = XML_RELAXNG_ATTRIBUTE;
+ ret->parent = ctxt->def;
+ child = node->children;
+ if (child == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ATTRIBUTE_EMPTY,
+ "xmlRelaxNGParseattribute: attribute has no children\n",
+ NULL, NULL);
+ return (ret);
+ }
+ old_flags = ctxt->flags;
+ ctxt->flags |= XML_RELAXNG_IN_ATTRIBUTE;
+ cur = xmlRelaxNGParseNameClass(ctxt, child, ret);
+ if (cur != NULL)
+ child = child->next;
+
+ if (child != NULL) {
+ cur = xmlRelaxNGParsePattern(ctxt, child);
+ if (cur != NULL) {
+ switch (cur->type) {
+ case XML_RELAXNG_EMPTY:
+ case XML_RELAXNG_NOT_ALLOWED:
+ case XML_RELAXNG_TEXT:
+ case XML_RELAXNG_ELEMENT:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_VALUE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_PARENTREF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_ONEORMORE:
+ case XML_RELAXNG_ZEROORMORE:
+ case XML_RELAXNG_OPTIONAL:
+ case XML_RELAXNG_CHOICE:
+ case XML_RELAXNG_GROUP:
+ case XML_RELAXNG_INTERLEAVE:
+ case XML_RELAXNG_ATTRIBUTE:
+ ret->content = cur;
+ cur->parent = ret;
+ break;
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_PARAM:
+ case XML_RELAXNG_EXCEPT:
+ xmlRngPErr(ctxt, node, XML_RNGP_ATTRIBUTE_CONTENT,
+ "attribute has invalid content\n", NULL,
+ NULL);
+ break;
+ case XML_RELAXNG_NOOP:
+ xmlRngPErr(ctxt, node, XML_RNGP_ATTRIBUTE_NOOP,
+ "RNG Internal error, noop found in attribute\n",
+ NULL, NULL);
+ break;
+ }
+ }
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ATTRIBUTE_CHILDREN,
+ "attribute has multiple children\n", NULL, NULL);
+ }
+ ctxt->flags = old_flags;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseExceptNameClass:
+ * @ctxt: a Relax-NG parser context
+ * @node: the except node
+ * @attr: 1 if within an attribute, 0 if within an element
+ *
+ * parse the content of a RelaxNG nameClass node.
+ *
+ * Returns the definition pointer or NULL in case of error.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseExceptNameClass(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlNodePtr node, int attr)
+{
+ xmlRelaxNGDefinePtr ret, cur, last = NULL;
+ xmlNodePtr child;
+
+ if (!IS_RELAXNG(node, "except")) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EXCEPT_MISSING,
+ "Expecting an except node\n", NULL, NULL);
+ return (NULL);
+ }
+ if (node->next != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EXCEPT_MULTIPLE,
+ "exceptNameClass allows only a single except node\n",
+ NULL, NULL);
+ }
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_EXCEPT_EMPTY, "except has no content\n",
+ NULL, NULL);
+ return (NULL);
+ }
+
+ ret = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret == NULL)
+ return (NULL);
+ ret->type = XML_RELAXNG_EXCEPT;
+ child = node->children;
+ while (child != NULL) {
+ cur = xmlRelaxNGNewDefine(ctxt, child);
+ if (cur == NULL)
+ break;
+ if (attr)
+ cur->type = XML_RELAXNG_ATTRIBUTE;
+ else
+ cur->type = XML_RELAXNG_ELEMENT;
+
+ if (xmlRelaxNGParseNameClass(ctxt, child, cur) != NULL) {
+ if (last == NULL) {
+ ret->content = cur;
+ } else {
+ last->next = cur;
+ }
+ last = cur;
+ }
+ child = child->next;
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseNameClass:
+ * @ctxt: a Relax-NG parser context
+ * @node: the nameClass node
+ * @def: the current definition
+ *
+ * parse the content of a RelaxNG nameClass node.
+ *
+ * Returns the definition pointer or NULL in case of error.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseNameClass(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node,
+ xmlRelaxNGDefinePtr def)
+{
+ xmlRelaxNGDefinePtr ret, tmp;
+ xmlChar *val;
+
+ ret = def;
+ if ((IS_RELAXNG(node, "name")) || (IS_RELAXNG(node, "anyName")) ||
+ (IS_RELAXNG(node, "nsName"))) {
+ if ((def->type != XML_RELAXNG_ELEMENT) &&
+ (def->type != XML_RELAXNG_ATTRIBUTE)) {
+ ret = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret == NULL)
+ return (NULL);
+ ret->parent = def;
+ if (ctxt->flags & XML_RELAXNG_IN_ATTRIBUTE)
+ ret->type = XML_RELAXNG_ATTRIBUTE;
+ else
+ ret->type = XML_RELAXNG_ELEMENT;
+ }
+ }
+ if (IS_RELAXNG(node, "name")) {
+ val = xmlNodeGetContent(node);
+ xmlRelaxNGNormExtSpace(val);
+ if (xmlValidateNCName(val, 0)) {
+ if (node->parent != NULL)
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_NAME,
+ "Element %s name '%s' is not an NCName\n",
+ node->parent->name, val);
+ else
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_NAME,
+ "name '%s' is not an NCName\n",
+ val, NULL);
+ }
+ ret->name = val;
+ val = xmlGetProp(node, BAD_CAST "ns");
+ ret->ns = val;
+ if ((ctxt->flags & XML_RELAXNG_IN_ATTRIBUTE) &&
+ (val != NULL) &&
+ (xmlStrEqual(val, BAD_CAST "http://www.w3.org/2000/xmlns"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_XML_NS,
+ "Attribute with namespace '%s' is not allowed\n",
+ val, NULL);
+ }
+ if ((ctxt->flags & XML_RELAXNG_IN_ATTRIBUTE) &&
+ (val != NULL) &&
+ (val[0] == 0) && (xmlStrEqual(ret->name, BAD_CAST "xmlns"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_XMLNS_NAME,
+ "Attribute with QName 'xmlns' is not allowed\n",
+ val, NULL);
+ }
+ } else if (IS_RELAXNG(node, "anyName")) {
+ ret->name = NULL;
+ ret->ns = NULL;
+ if (node->children != NULL) {
+ ret->nameClass =
+ xmlRelaxNGParseExceptNameClass(ctxt, node->children,
+ (def->type ==
+ XML_RELAXNG_ATTRIBUTE));
+ }
+ } else if (IS_RELAXNG(node, "nsName")) {
+ ret->name = NULL;
+ ret->ns = xmlGetProp(node, BAD_CAST "ns");
+ if (ret->ns == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_NSNAME_NO_NS,
+ "nsName has no ns attribute\n", NULL, NULL);
+ }
+ if ((ctxt->flags & XML_RELAXNG_IN_ATTRIBUTE) &&
+ (ret->ns != NULL) &&
+ (xmlStrEqual
+ (ret->ns, BAD_CAST "http://www.w3.org/2000/xmlns"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_XML_NS,
+ "Attribute with namespace '%s' is not allowed\n",
+ ret->ns, NULL);
+ }
+ if (node->children != NULL) {
+ ret->nameClass =
+ xmlRelaxNGParseExceptNameClass(ctxt, node->children,
+ (def->type ==
+ XML_RELAXNG_ATTRIBUTE));
+ }
+ } else if (IS_RELAXNG(node, "choice")) {
+ xmlNodePtr child;
+ xmlRelaxNGDefinePtr last = NULL;
+
+ ret = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret == NULL)
+ return (NULL);
+ ret->parent = def;
+ ret->type = XML_RELAXNG_CHOICE;
+
+ if (node->children == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_EMPTY,
+ "Element choice is empty\n", NULL, NULL);
+ } else {
+
+ child = node->children;
+ while (child != NULL) {
+ tmp = xmlRelaxNGParseNameClass(ctxt, child, ret);
+ if (tmp != NULL) {
+ if (last == NULL) {
+ last = ret->nameClass = tmp;
+ } else {
+ last->next = tmp;
+ last = tmp;
+ }
+ }
+ child = child->next;
+ }
+ }
+ } else {
+ xmlRngPErr(ctxt, node, XML_RNGP_CHOICE_CONTENT,
+ "expecting name, anyName, nsName or choice : got %s\n",
+ (node == NULL ? (const xmlChar *) "nothing" : node->name),
+ NULL);
+ return (NULL);
+ }
+ if (ret != def) {
+ if (def->nameClass == NULL) {
+ def->nameClass = ret;
+ } else {
+ tmp = def->nameClass;
+ while (tmp->next != NULL) {
+ tmp = tmp->next;
+ }
+ tmp->next = ret;
+ }
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseElement:
+ * @ctxt: a Relax-NG parser context
+ * @node: the element node
+ *
+ * parse the content of a RelaxNG element node.
+ *
+ * Returns the definition pointer or NULL in case of error.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParseElement(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGDefinePtr ret, cur, last;
+ xmlNodePtr child;
+ const xmlChar *olddefine;
+
+ ret = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret == NULL)
+ return (NULL);
+ ret->type = XML_RELAXNG_ELEMENT;
+ ret->parent = ctxt->def;
+ child = node->children;
+ if (child == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_EMPTY,
+ "xmlRelaxNGParseElement: element has no children\n",
+ NULL, NULL);
+ return (ret);
+ }
+ cur = xmlRelaxNGParseNameClass(ctxt, child, ret);
+ if (cur != NULL)
+ child = child->next;
+
+ if (child == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_NO_CONTENT,
+ "xmlRelaxNGParseElement: element has no content\n",
+ NULL, NULL);
+ return (ret);
+ }
+ olddefine = ctxt->define;
+ ctxt->define = NULL;
+ last = NULL;
+ while (child != NULL) {
+ cur = xmlRelaxNGParsePattern(ctxt, child);
+ if (cur != NULL) {
+ cur->parent = ret;
+ switch (cur->type) {
+ case XML_RELAXNG_EMPTY:
+ case XML_RELAXNG_NOT_ALLOWED:
+ case XML_RELAXNG_TEXT:
+ case XML_RELAXNG_ELEMENT:
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_VALUE:
+ case XML_RELAXNG_LIST:
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_PARENTREF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_ZEROORMORE:
+ case XML_RELAXNG_ONEORMORE:
+ case XML_RELAXNG_OPTIONAL:
+ case XML_RELAXNG_CHOICE:
+ case XML_RELAXNG_GROUP:
+ case XML_RELAXNG_INTERLEAVE:
+ if (last == NULL) {
+ ret->content = last = cur;
+ } else {
+ if ((last->type == XML_RELAXNG_ELEMENT) &&
+ (ret->content == last)) {
+ ret->content = xmlRelaxNGNewDefine(ctxt, node);
+ if (ret->content != NULL) {
+ ret->content->type = XML_RELAXNG_GROUP;
+ ret->content->content = last;
+ } else {
+ ret->content = last;
+ }
+ }
+ last->next = cur;
+ last = cur;
+ }
+ break;
+ case XML_RELAXNG_ATTRIBUTE:
+ cur->next = ret->attrs;
+ ret->attrs = cur;
+ break;
+ case XML_RELAXNG_START:
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_CONTENT,
+ "RNG Internal error, start found in element\n",
+ NULL, NULL);
+ break;
+ case XML_RELAXNG_PARAM:
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_CONTENT,
+ "RNG Internal error, param found in element\n",
+ NULL, NULL);
+ break;
+ case XML_RELAXNG_EXCEPT:
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_CONTENT,
+ "RNG Internal error, except found in element\n",
+ NULL, NULL);
+ break;
+ case XML_RELAXNG_NOOP:
+ xmlRngPErr(ctxt, node, XML_RNGP_ELEMENT_CONTENT,
+ "RNG Internal error, noop found in element\n",
+ NULL, NULL);
+ break;
+ }
+ }
+ child = child->next;
+ }
+ ctxt->define = olddefine;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParsePatterns:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: list of nodes
+ * @group: use an implicit <group> for elements
+ *
+ * parse the content of a RelaxNG start node.
+ *
+ * Returns the definition pointer or NULL in case of error.
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGParsePatterns(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes,
+ int group)
+{
+ xmlRelaxNGDefinePtr def = NULL, last = NULL, cur, parent;
+
+ parent = ctxt->def;
+ while (nodes != NULL) {
+ if (IS_RELAXNG(nodes, "element")) {
+ cur = xmlRelaxNGParseElement(ctxt, nodes);
+ if (def == NULL) {
+ def = last = cur;
+ } else {
+ if ((group == 1) && (def->type == XML_RELAXNG_ELEMENT) &&
+ (def == last)) {
+ def = xmlRelaxNGNewDefine(ctxt, nodes);
+ def->type = XML_RELAXNG_GROUP;
+ def->content = last;
+ }
+ last->next = cur;
+ last = cur;
+ }
+ cur->parent = parent;
+ } else {
+ cur = xmlRelaxNGParsePattern(ctxt, nodes);
+ if (cur != NULL) {
+ if (def == NULL) {
+ def = last = cur;
+ } else {
+ last->next = cur;
+ last = cur;
+ }
+ }
+ }
+ nodes = nodes->next;
+ }
+ return (def);
+}
+
+/**
+ * xmlRelaxNGParseStart:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: start children nodes
+ *
+ * parse the content of a RelaxNG start node.
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+static int
+xmlRelaxNGParseStart(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes)
+{
+ int ret = 0;
+ xmlRelaxNGDefinePtr def = NULL, last;
+
+ if (nodes == NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_START_EMPTY, "start has no children\n",
+ NULL, NULL);
+ return (-1);
+ }
+ if (IS_RELAXNG(nodes, "empty")) {
+ def = xmlRelaxNGNewDefine(ctxt, nodes);
+ if (def == NULL)
+ return (-1);
+ def->type = XML_RELAXNG_EMPTY;
+ if (nodes->children != NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_EMPTY_CONTENT,
+ "element empty is not empty\n", NULL, NULL);
+ }
+ } else if (IS_RELAXNG(nodes, "notAllowed")) {
+ def = xmlRelaxNGNewDefine(ctxt, nodes);
+ if (def == NULL)
+ return (-1);
+ def->type = XML_RELAXNG_NOT_ALLOWED;
+ if (nodes->children != NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_NOTALLOWED_NOT_EMPTY,
+ "element notAllowed is not empty\n", NULL, NULL);
+ }
+ } else {
+ def = xmlRelaxNGParsePatterns(ctxt, nodes, 1);
+ }
+ if (ctxt->grammar->start != NULL) {
+ last = ctxt->grammar->start;
+ while (last->next != NULL)
+ last = last->next;
+ last->next = def;
+ } else {
+ ctxt->grammar->start = def;
+ }
+ nodes = nodes->next;
+ if (nodes != NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_START_CONTENT,
+ "start more than one children\n", NULL, NULL);
+ return (-1);
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseGrammarContent:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: grammar children nodes
+ *
+ * parse the content of a RelaxNG grammar node.
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+static int
+xmlRelaxNGParseGrammarContent(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlNodePtr nodes)
+{
+ int ret = 0, tmp;
+
+ if (nodes == NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_GRAMMAR_EMPTY,
+ "grammar has no children\n", NULL, NULL);
+ return (-1);
+ }
+ while (nodes != NULL) {
+ if (IS_RELAXNG(nodes, "start")) {
+ if (nodes->children == NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_START_EMPTY,
+ "start has no children\n", NULL, NULL);
+ } else {
+ tmp = xmlRelaxNGParseStart(ctxt, nodes->children);
+ if (tmp != 0)
+ ret = -1;
+ }
+ } else if (IS_RELAXNG(nodes, "define")) {
+ tmp = xmlRelaxNGParseDefine(ctxt, nodes);
+ if (tmp != 0)
+ ret = -1;
+ } else if (IS_RELAXNG(nodes, "include")) {
+ tmp = xmlRelaxNGParseInclude(ctxt, nodes);
+ if (tmp != 0)
+ ret = -1;
+ } else {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_GRAMMAR_CONTENT,
+ "grammar has unexpected child %s\n", nodes->name,
+ NULL);
+ ret = -1;
+ }
+ nodes = nodes->next;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCheckReference:
+ * @ref: the ref
+ * @ctxt: a Relax-NG parser context
+ * @name: the name associated to the defines
+ *
+ * Applies the 4.17. combine attribute rule for all the define
+ * element of a given grammar using the same name.
+ */
+static void
+xmlRelaxNGCheckReference(xmlRelaxNGDefinePtr ref,
+ xmlRelaxNGParserCtxtPtr ctxt,
+ const xmlChar * name)
+{
+ xmlRelaxNGGrammarPtr grammar;
+ xmlRelaxNGDefinePtr def, cur;
+
+ /*
+ * Those rules don't apply to imported ref from xmlRelaxNGParseImportRef
+ */
+ if (ref->dflags & IS_EXTERNAL_REF)
+ return;
+
+ grammar = ctxt->grammar;
+ if (grammar == NULL) {
+ xmlRngPErr(ctxt, ref->node, XML_ERR_INTERNAL_ERROR,
+ "Internal error: no grammar in CheckReference %s\n",
+ name, NULL);
+ return;
+ }
+ if (ref->content != NULL) {
+ xmlRngPErr(ctxt, ref->node, XML_ERR_INTERNAL_ERROR,
+ "Internal error: reference has content in CheckReference %s\n",
+ name, NULL);
+ return;
+ }
+ if (grammar->defs != NULL) {
+ def = xmlHashLookup(grammar->defs, name);
+ if (def != NULL) {
+ cur = ref;
+ while (cur != NULL) {
+ cur->content = def;
+ cur = cur->nextHash;
+ }
+ } else {
+ xmlRngPErr(ctxt, ref->node, XML_RNGP_REF_NO_DEF,
+ "Reference %s has no matching definition\n", name,
+ NULL);
+ }
+ } else {
+ xmlRngPErr(ctxt, ref->node, XML_RNGP_REF_NO_DEF,
+ "Reference %s has no matching definition\n", name,
+ NULL);
+ }
+}
+
+/**
+ * xmlRelaxNGCheckCombine:
+ * @define: the define(s) list
+ * @ctxt: a Relax-NG parser context
+ * @name: the name associated to the defines
+ *
+ * Applies the 4.17. combine attribute rule for all the define
+ * element of a given grammar using the same name.
+ */
+static void
+xmlRelaxNGCheckCombine(xmlRelaxNGDefinePtr define,
+ xmlRelaxNGParserCtxtPtr ctxt, const xmlChar * name)
+{
+ xmlChar *combine;
+ int choiceOrInterleave = -1;
+ int missing = 0;
+ xmlRelaxNGDefinePtr cur, last, tmp, tmp2;
+
+ if (define->nextHash == NULL)
+ return;
+ cur = define;
+ while (cur != NULL) {
+ combine = xmlGetProp(cur->node, BAD_CAST "combine");
+ if (combine != NULL) {
+ if (xmlStrEqual(combine, BAD_CAST "choice")) {
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 1;
+ else if (choiceOrInterleave == 0) {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_DEF_CHOICE_AND_INTERLEAVE,
+ "Defines for %s use both 'choice' and 'interleave'\n",
+ name, NULL);
+ }
+ } else if (xmlStrEqual(combine, BAD_CAST "interleave")) {
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 0;
+ else if (choiceOrInterleave == 1) {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_DEF_CHOICE_AND_INTERLEAVE,
+ "Defines for %s use both 'choice' and 'interleave'\n",
+ name, NULL);
+ }
+ } else {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_UNKNOWN_COMBINE,
+ "Defines for %s use unknown combine value '%s''\n",
+ name, combine);
+ }
+ xmlFree(combine);
+ } else {
+ if (missing == 0)
+ missing = 1;
+ else {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_NEED_COMBINE,
+ "Some defines for %s needs the combine attribute\n",
+ name, NULL);
+ }
+ }
+
+ cur = cur->nextHash;
+ }
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGCheckCombine(): merging %s defines: %d\n",
+ name, choiceOrInterleave);
+#endif
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 0;
+ cur = xmlRelaxNGNewDefine(ctxt, define->node);
+ if (cur == NULL)
+ return;
+ if (choiceOrInterleave == 0)
+ cur->type = XML_RELAXNG_INTERLEAVE;
+ else
+ cur->type = XML_RELAXNG_CHOICE;
+ tmp = define;
+ last = NULL;
+ while (tmp != NULL) {
+ if (tmp->content != NULL) {
+ if (tmp->content->next != NULL) {
+ /*
+ * we need first to create a wrapper.
+ */
+ tmp2 = xmlRelaxNGNewDefine(ctxt, tmp->content->node);
+ if (tmp2 == NULL)
+ break;
+ tmp2->type = XML_RELAXNG_GROUP;
+ tmp2->content = tmp->content;
+ } else {
+ tmp2 = tmp->content;
+ }
+ if (last == NULL) {
+ cur->content = tmp2;
+ } else {
+ last->next = tmp2;
+ }
+ last = tmp2;
+ }
+ tmp->content = cur;
+ tmp = tmp->nextHash;
+ }
+ define->content = cur;
+ if (choiceOrInterleave == 0) {
+ if (ctxt->interleaves == NULL)
+ ctxt->interleaves = xmlHashCreate(10);
+ if (ctxt->interleaves == NULL) {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_INTERLEAVE_CREATE_FAILED,
+ "Failed to create interleaves hash table\n", NULL,
+ NULL);
+ } else {
+ char tmpname[32];
+
+ snprintf(tmpname, 32, "interleave%d", ctxt->nbInterleaves++);
+ if (xmlHashAddEntry(ctxt->interleaves, BAD_CAST tmpname, cur) <
+ 0) {
+ xmlRngPErr(ctxt, define->node, XML_RNGP_INTERLEAVE_CREATE_FAILED,
+ "Failed to add %s to hash table\n",
+ (const xmlChar *) tmpname, NULL);
+ }
+ }
+ }
+}
+
+/**
+ * xmlRelaxNGCombineStart:
+ * @ctxt: a Relax-NG parser context
+ * @grammar: the grammar
+ *
+ * Applies the 4.17. combine rule for all the start
+ * element of a given grammar.
+ */
+static void
+xmlRelaxNGCombineStart(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGGrammarPtr grammar)
+{
+ xmlRelaxNGDefinePtr starts;
+ xmlChar *combine;
+ int choiceOrInterleave = -1;
+ int missing = 0;
+ xmlRelaxNGDefinePtr cur;
+
+ starts = grammar->start;
+ if ((starts == NULL) || (starts->next == NULL))
+ return;
+ cur = starts;
+ while (cur != NULL) {
+ if ((cur->node == NULL) || (cur->node->parent == NULL) ||
+ (!xmlStrEqual(cur->node->parent->name, BAD_CAST "start"))) {
+ combine = NULL;
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_START_MISSING,
+ "Internal error: start element not found\n", NULL,
+ NULL);
+ } else {
+ combine = xmlGetProp(cur->node->parent, BAD_CAST "combine");
+ }
+
+ if (combine != NULL) {
+ if (xmlStrEqual(combine, BAD_CAST "choice")) {
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 1;
+ else if (choiceOrInterleave == 0) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_START_CHOICE_AND_INTERLEAVE,
+ "<start> use both 'choice' and 'interleave'\n",
+ NULL, NULL);
+ }
+ } else if (xmlStrEqual(combine, BAD_CAST "interleave")) {
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 0;
+ else if (choiceOrInterleave == 1) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_START_CHOICE_AND_INTERLEAVE,
+ "<start> use both 'choice' and 'interleave'\n",
+ NULL, NULL);
+ }
+ } else {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_UNKNOWN_COMBINE,
+ "<start> uses unknown combine value '%s''\n",
+ combine, NULL);
+ }
+ xmlFree(combine);
+ } else {
+ if (missing == 0)
+ missing = 1;
+ else {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_NEED_COMBINE,
+ "Some <start> element miss the combine attribute\n",
+ NULL, NULL);
+ }
+ }
+
+ cur = cur->next;
+ }
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGCombineStart(): merging <start>: %d\n",
+ choiceOrInterleave);
+#endif
+ if (choiceOrInterleave == -1)
+ choiceOrInterleave = 0;
+ cur = xmlRelaxNGNewDefine(ctxt, starts->node);
+ if (cur == NULL)
+ return;
+ if (choiceOrInterleave == 0)
+ cur->type = XML_RELAXNG_INTERLEAVE;
+ else
+ cur->type = XML_RELAXNG_CHOICE;
+ cur->content = grammar->start;
+ grammar->start = cur;
+ if (choiceOrInterleave == 0) {
+ if (ctxt->interleaves == NULL)
+ ctxt->interleaves = xmlHashCreate(10);
+ if (ctxt->interleaves == NULL) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_INTERLEAVE_CREATE_FAILED,
+ "Failed to create interleaves hash table\n", NULL,
+ NULL);
+ } else {
+ char tmpname[32];
+
+ snprintf(tmpname, 32, "interleave%d", ctxt->nbInterleaves++);
+ if (xmlHashAddEntry(ctxt->interleaves, BAD_CAST tmpname, cur) <
+ 0) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_INTERLEAVE_CREATE_FAILED,
+ "Failed to add %s to hash table\n",
+ (const xmlChar *) tmpname, NULL);
+ }
+ }
+ }
+}
+
+/**
+ * xmlRelaxNGCheckCycles:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: grammar children nodes
+ * @depth: the counter
+ *
+ * Check for cycles.
+ *
+ * Returns 0 if check passed, and -1 in case of error
+ */
+static int
+xmlRelaxNGCheckCycles(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr cur, int depth)
+{
+ int ret = 0;
+
+ while ((ret == 0) && (cur != NULL)) {
+ if ((cur->type == XML_RELAXNG_REF) ||
+ (cur->type == XML_RELAXNG_PARENTREF)) {
+ if (cur->depth == -1) {
+ cur->depth = depth;
+ ret = xmlRelaxNGCheckCycles(ctxt, cur->content, depth);
+ cur->depth = -2;
+ } else if (depth == cur->depth) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_REF_CYCLE,
+ "Detected a cycle in %s references\n",
+ cur->name, NULL);
+ return (-1);
+ }
+ } else if (cur->type == XML_RELAXNG_ELEMENT) {
+ ret = xmlRelaxNGCheckCycles(ctxt, cur->content, depth + 1);
+ } else {
+ ret = xmlRelaxNGCheckCycles(ctxt, cur->content, depth);
+ }
+ cur = cur->next;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGTryUnlink:
+ * @ctxt: a Relax-NG parser context
+ * @cur: the definition to unlink
+ * @parent: the parent definition
+ * @prev: the previous sibling definition
+ *
+ * Try to unlink a definition. If not possble make it a NOOP
+ *
+ * Returns the new prev definition
+ */
+static xmlRelaxNGDefinePtr
+xmlRelaxNGTryUnlink(xmlRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlRelaxNGDefinePtr cur,
+ xmlRelaxNGDefinePtr parent, xmlRelaxNGDefinePtr prev)
+{
+ if (prev != NULL) {
+ prev->next = cur->next;
+ } else {
+ if (parent != NULL) {
+ if (parent->content == cur)
+ parent->content = cur->next;
+ else if (parent->attrs == cur)
+ parent->attrs = cur->next;
+ else if (parent->nameClass == cur)
+ parent->nameClass = cur->next;
+ } else {
+ cur->type = XML_RELAXNG_NOOP;
+ prev = cur;
+ }
+ }
+ return (prev);
+}
+
+/**
+ * xmlRelaxNGSimplify:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: grammar children nodes
+ *
+ * Check for simplification of empty and notAllowed
+ */
+static void
+xmlRelaxNGSimplify(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr cur, xmlRelaxNGDefinePtr parent)
+{
+ xmlRelaxNGDefinePtr prev = NULL;
+
+ while (cur != NULL) {
+ if ((cur->type == XML_RELAXNG_REF) ||
+ (cur->type == XML_RELAXNG_PARENTREF)) {
+ if (cur->depth != -3) {
+ cur->depth = -3;
+ xmlRelaxNGSimplify(ctxt, cur->content, cur);
+ }
+ } else if (cur->type == XML_RELAXNG_NOT_ALLOWED) {
+ cur->parent = parent;
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_ATTRIBUTE) ||
+ (parent->type == XML_RELAXNG_LIST) ||
+ (parent->type == XML_RELAXNG_GROUP) ||
+ (parent->type == XML_RELAXNG_INTERLEAVE) ||
+ (parent->type == XML_RELAXNG_ONEORMORE) ||
+ (parent->type == XML_RELAXNG_ZEROORMORE))) {
+ parent->type = XML_RELAXNG_NOT_ALLOWED;
+ break;
+ }
+ if ((parent != NULL) && (parent->type == XML_RELAXNG_CHOICE)) {
+ prev = xmlRelaxNGTryUnlink(ctxt, cur, parent, prev);
+ } else
+ prev = cur;
+ } else if (cur->type == XML_RELAXNG_EMPTY) {
+ cur->parent = parent;
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_ONEORMORE) ||
+ (parent->type == XML_RELAXNG_ZEROORMORE))) {
+ parent->type = XML_RELAXNG_EMPTY;
+ break;
+ }
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_GROUP) ||
+ (parent->type == XML_RELAXNG_INTERLEAVE))) {
+ prev = xmlRelaxNGTryUnlink(ctxt, cur, parent, prev);
+ } else
+ prev = cur;
+ } else {
+ cur->parent = parent;
+ if (cur->content != NULL)
+ xmlRelaxNGSimplify(ctxt, cur->content, cur);
+ if ((cur->type != XML_RELAXNG_VALUE) && (cur->attrs != NULL))
+ xmlRelaxNGSimplify(ctxt, cur->attrs, cur);
+ if (cur->nameClass != NULL)
+ xmlRelaxNGSimplify(ctxt, cur->nameClass, cur);
+ /*
+ * On Elements, try to move attribute only generating rules on
+ * the attrs rules.
+ */
+ if (cur->type == XML_RELAXNG_ELEMENT) {
+ int attronly;
+ xmlRelaxNGDefinePtr tmp, pre;
+
+ while (cur->content != NULL) {
+ attronly =
+ xmlRelaxNGGenerateAttributes(ctxt, cur->content);
+ if (attronly == 1) {
+ /*
+ * migrate cur->content to attrs
+ */
+ tmp = cur->content;
+ cur->content = tmp->next;
+ tmp->next = cur->attrs;
+ cur->attrs = tmp;
+ } else {
+ /*
+ * cur->content can generate elements or text
+ */
+ break;
+ }
+ }
+ pre = cur->content;
+ while ((pre != NULL) && (pre->next != NULL)) {
+ tmp = pre->next;
+ attronly = xmlRelaxNGGenerateAttributes(ctxt, tmp);
+ if (attronly == 1) {
+ /*
+ * migrate tmp to attrs
+ */
+ pre->next = tmp->next;
+ tmp->next = cur->attrs;
+ cur->attrs = tmp;
+ } else {
+ pre = tmp;
+ }
+ }
+ }
+ /*
+ * This may result in a simplification
+ */
+ if ((cur->type == XML_RELAXNG_GROUP) ||
+ (cur->type == XML_RELAXNG_INTERLEAVE)) {
+ if (cur->content == NULL)
+ cur->type = XML_RELAXNG_EMPTY;
+ else if (cur->content->next == NULL) {
+ if ((parent == NULL) && (prev == NULL)) {
+ cur->type = XML_RELAXNG_NOOP;
+ } else if (prev == NULL) {
+ parent->content = cur->content;
+ cur->content->next = cur->next;
+ cur = cur->content;
+ } else {
+ cur->content->next = cur->next;
+ prev->next = cur->content;
+ cur = cur->content;
+ }
+ }
+ }
+ /*
+ * the current node may have been transformed back
+ */
+ if ((cur->type == XML_RELAXNG_EXCEPT) &&
+ (cur->content != NULL) &&
+ (cur->content->type == XML_RELAXNG_NOT_ALLOWED)) {
+ prev = xmlRelaxNGTryUnlink(ctxt, cur, parent, prev);
+ } else if (cur->type == XML_RELAXNG_NOT_ALLOWED) {
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_ATTRIBUTE) ||
+ (parent->type == XML_RELAXNG_LIST) ||
+ (parent->type == XML_RELAXNG_GROUP) ||
+ (parent->type == XML_RELAXNG_INTERLEAVE) ||
+ (parent->type == XML_RELAXNG_ONEORMORE) ||
+ (parent->type == XML_RELAXNG_ZEROORMORE))) {
+ parent->type = XML_RELAXNG_NOT_ALLOWED;
+ break;
+ }
+ if ((parent != NULL) &&
+ (parent->type == XML_RELAXNG_CHOICE)) {
+ prev = xmlRelaxNGTryUnlink(ctxt, cur, parent, prev);
+ } else
+ prev = cur;
+ } else if (cur->type == XML_RELAXNG_EMPTY) {
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_ONEORMORE) ||
+ (parent->type == XML_RELAXNG_ZEROORMORE))) {
+ parent->type = XML_RELAXNG_EMPTY;
+ break;
+ }
+ if ((parent != NULL) &&
+ ((parent->type == XML_RELAXNG_GROUP) ||
+ (parent->type == XML_RELAXNG_INTERLEAVE) ||
+ (parent->type == XML_RELAXNG_CHOICE))) {
+ prev = xmlRelaxNGTryUnlink(ctxt, cur, parent, prev);
+ } else
+ prev = cur;
+ } else {
+ prev = cur;
+ }
+ }
+ cur = cur->next;
+ }
+}
+
+/**
+ * xmlRelaxNGGroupContentType:
+ * @ct1: the first content type
+ * @ct2: the second content type
+ *
+ * Try to group 2 content types
+ *
+ * Returns the content type
+ */
+static xmlRelaxNGContentType
+xmlRelaxNGGroupContentType(xmlRelaxNGContentType ct1,
+ xmlRelaxNGContentType ct2)
+{
+ if ((ct1 == XML_RELAXNG_CONTENT_ERROR) ||
+ (ct2 == XML_RELAXNG_CONTENT_ERROR))
+ return (XML_RELAXNG_CONTENT_ERROR);
+ if (ct1 == XML_RELAXNG_CONTENT_EMPTY)
+ return (ct2);
+ if (ct2 == XML_RELAXNG_CONTENT_EMPTY)
+ return (ct1);
+ if ((ct1 == XML_RELAXNG_CONTENT_COMPLEX) &&
+ (ct2 == XML_RELAXNG_CONTENT_COMPLEX))
+ return (XML_RELAXNG_CONTENT_COMPLEX);
+ return (XML_RELAXNG_CONTENT_ERROR);
+}
+
+/**
+ * xmlRelaxNGMaxContentType:
+ * @ct1: the first content type
+ * @ct2: the second content type
+ *
+ * Compute the max content-type
+ *
+ * Returns the content type
+ */
+static xmlRelaxNGContentType
+xmlRelaxNGMaxContentType(xmlRelaxNGContentType ct1,
+ xmlRelaxNGContentType ct2)
+{
+ if ((ct1 == XML_RELAXNG_CONTENT_ERROR) ||
+ (ct2 == XML_RELAXNG_CONTENT_ERROR))
+ return (XML_RELAXNG_CONTENT_ERROR);
+ if ((ct1 == XML_RELAXNG_CONTENT_SIMPLE) ||
+ (ct2 == XML_RELAXNG_CONTENT_SIMPLE))
+ return (XML_RELAXNG_CONTENT_SIMPLE);
+ if ((ct1 == XML_RELAXNG_CONTENT_COMPLEX) ||
+ (ct2 == XML_RELAXNG_CONTENT_COMPLEX))
+ return (XML_RELAXNG_CONTENT_COMPLEX);
+ return (XML_RELAXNG_CONTENT_EMPTY);
+}
+
+/**
+ * xmlRelaxNGCheckRules:
+ * @ctxt: a Relax-NG parser context
+ * @cur: the current definition
+ * @flags: some accumulated flags
+ * @ptype: the parent type
+ *
+ * Check for rules in section 7.1 and 7.2
+ *
+ * Returns the content type of @cur
+ */
+static xmlRelaxNGContentType
+xmlRelaxNGCheckRules(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr cur, int flags,
+ xmlRelaxNGType ptype)
+{
+ int nflags;
+ xmlRelaxNGContentType ret, tmp, val = XML_RELAXNG_CONTENT_EMPTY;
+
+ while (cur != NULL) {
+ ret = XML_RELAXNG_CONTENT_EMPTY;
+ if ((cur->type == XML_RELAXNG_REF) ||
+ (cur->type == XML_RELAXNG_PARENTREF)) {
+ /*
+ * This should actually be caught by list//element(ref) at the
+ * element boundaries, c.f. Bug #159968 local refs are dropped
+ * in step 4.19.
+ */
+#if 0
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_REF,
+ "Found forbidden pattern list//ref\n", NULL,
+ NULL);
+ }
+#endif
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_REF,
+ "Found forbidden pattern data/except//ref\n",
+ NULL, NULL);
+ }
+ if (cur->content == NULL) {
+ if (cur->type == XML_RELAXNG_PARENTREF)
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_REF_NO_DEF,
+ "Internal found no define for parent refs\n",
+ NULL, NULL);
+ else
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_REF_NO_DEF,
+ "Internal found no define for ref %s\n",
+ (cur->name ? cur->name: BAD_CAST "null"), NULL);
+ }
+ if (cur->depth > -4) {
+ cur->depth = -4;
+ ret = xmlRelaxNGCheckRules(ctxt, cur->content,
+ flags, cur->type);
+ cur->depth = ret - 15;
+ } else if (cur->depth == -4) {
+ ret = XML_RELAXNG_CONTENT_COMPLEX;
+ } else {
+ ret = (xmlRelaxNGContentType) (cur->depth + 15);
+ }
+ } else if (cur->type == XML_RELAXNG_ELEMENT) {
+ /*
+ * The 7.3 Attribute derivation rule for groups is plugged there
+ */
+ xmlRelaxNGCheckGroupAttrs(ctxt, cur);
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_ELEM,
+ "Found forbidden pattern data/except//element(ref)\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_ELEM,
+ "Found forbidden pattern list//element(ref)\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_ATTR_ELEM,
+ "Found forbidden pattern attribute//element(ref)\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_ATTR_ELEM,
+ "Found forbidden pattern attribute//element(ref)\n",
+ NULL, NULL);
+ }
+ /*
+ * reset since in the simple form elements are only child
+ * of grammar/define
+ */
+ nflags = 0;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->attrs, nflags, cur->type);
+ if (ret != XML_RELAXNG_CONTENT_EMPTY) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_ELEM_CONTENT_EMPTY,
+ "Element %s attributes have a content type error\n",
+ cur->name, NULL);
+ }
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ if (ret == XML_RELAXNG_CONTENT_ERROR) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_ELEM_CONTENT_ERROR,
+ "Element %s has a content type error\n",
+ cur->name, NULL);
+ } else {
+ ret = XML_RELAXNG_CONTENT_COMPLEX;
+ }
+ } else if (cur->type == XML_RELAXNG_ATTRIBUTE) {
+ if (flags & XML_RELAXNG_IN_ATTRIBUTE) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_ATTR_ATTR,
+ "Found forbidden pattern attribute//attribute\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_ATTR,
+ "Found forbidden pattern list//attribute\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_OOMGROUP) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_ONEMORE_GROUP_ATTR,
+ "Found forbidden pattern oneOrMore//group//attribute\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_OOMINTERLEAVE) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR,
+ "Found forbidden pattern oneOrMore//interleave//attribute\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_ATTR,
+ "Found forbidden pattern data/except//attribute\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_ATTR,
+ "Found forbidden pattern start//attribute\n",
+ NULL, NULL);
+ }
+ if ((!(flags & XML_RELAXNG_IN_ONEORMORE))
+ && (cur->name == NULL)) {
+ if (cur->ns == NULL) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_ANYNAME_ATTR_ANCESTOR,
+ "Found anyName attribute without oneOrMore ancestor\n",
+ NULL, NULL);
+ } else {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_NSNAME_ATTR_ANCESTOR,
+ "Found nsName attribute without oneOrMore ancestor\n",
+ NULL, NULL);
+ }
+ }
+ nflags = flags | XML_RELAXNG_IN_ATTRIBUTE;
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags, cur->type);
+ ret = XML_RELAXNG_CONTENT_EMPTY;
+ } else if ((cur->type == XML_RELAXNG_ONEORMORE) ||
+ (cur->type == XML_RELAXNG_ZEROORMORE)) {
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_ONEMORE,
+ "Found forbidden pattern data/except//oneOrMore\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_ONEMORE,
+ "Found forbidden pattern start//oneOrMore\n",
+ NULL, NULL);
+ }
+ nflags = flags | XML_RELAXNG_IN_ONEORMORE;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ ret = xmlRelaxNGGroupContentType(ret, ret);
+ } else if (cur->type == XML_RELAXNG_LIST) {
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_LIST,
+ "Found forbidden pattern list//list\n", NULL,
+ NULL);
+ }
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_LIST,
+ "Found forbidden pattern data/except//list\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_LIST,
+ "Found forbidden pattern start//list\n", NULL,
+ NULL);
+ }
+ nflags = flags | XML_RELAXNG_IN_LIST;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ } else if (cur->type == XML_RELAXNG_GROUP) {
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_GROUP,
+ "Found forbidden pattern data/except//group\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_GROUP,
+ "Found forbidden pattern start//group\n", NULL,
+ NULL);
+ }
+ if (flags & XML_RELAXNG_IN_ONEORMORE)
+ nflags = flags | XML_RELAXNG_IN_OOMGROUP;
+ else
+ nflags = flags;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ /*
+ * The 7.3 Attribute derivation rule for groups is plugged there
+ */
+ xmlRelaxNGCheckGroupAttrs(ctxt, cur);
+ } else if (cur->type == XML_RELAXNG_INTERLEAVE) {
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_INTERLEAVE,
+ "Found forbidden pattern list//interleave\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE,
+ "Found forbidden pattern data/except//interleave\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE,
+ "Found forbidden pattern start//interleave\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_ONEORMORE)
+ nflags = flags | XML_RELAXNG_IN_OOMINTERLEAVE;
+ else
+ nflags = flags;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ } else if (cur->type == XML_RELAXNG_EXCEPT) {
+ if ((cur->parent != NULL) &&
+ (cur->parent->type == XML_RELAXNG_DATATYPE))
+ nflags = flags | XML_RELAXNG_IN_DATAEXCEPT;
+ else
+ nflags = flags;
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, nflags,
+ cur->type);
+ } else if (cur->type == XML_RELAXNG_DATATYPE) {
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_DATA,
+ "Found forbidden pattern start//data\n", NULL,
+ NULL);
+ }
+ xmlRelaxNGCheckRules(ctxt, cur->content, flags, cur->type);
+ ret = XML_RELAXNG_CONTENT_SIMPLE;
+ } else if (cur->type == XML_RELAXNG_VALUE) {
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_VALUE,
+ "Found forbidden pattern start//value\n", NULL,
+ NULL);
+ }
+ xmlRelaxNGCheckRules(ctxt, cur->content, flags, cur->type);
+ ret = XML_RELAXNG_CONTENT_SIMPLE;
+ } else if (cur->type == XML_RELAXNG_TEXT) {
+ if (flags & XML_RELAXNG_IN_LIST) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_LIST_TEXT,
+ "Found forbidden pattern list//text\n", NULL,
+ NULL);
+ }
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_TEXT,
+ "Found forbidden pattern data/except//text\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_TEXT,
+ "Found forbidden pattern start//text\n", NULL,
+ NULL);
+ }
+ ret = XML_RELAXNG_CONTENT_COMPLEX;
+ } else if (cur->type == XML_RELAXNG_EMPTY) {
+ if (flags & XML_RELAXNG_IN_DATAEXCEPT) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_DATA_EXCEPT_EMPTY,
+ "Found forbidden pattern data/except//empty\n",
+ NULL, NULL);
+ }
+ if (flags & XML_RELAXNG_IN_START) {
+ xmlRngPErr(ctxt, cur->node, XML_RNGP_PAT_START_EMPTY,
+ "Found forbidden pattern start//empty\n", NULL,
+ NULL);
+ }
+ ret = XML_RELAXNG_CONTENT_EMPTY;
+ } else if (cur->type == XML_RELAXNG_CHOICE) {
+ xmlRelaxNGCheckChoiceDeterminism(ctxt, cur);
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, flags, cur->type);
+ } else {
+ ret =
+ xmlRelaxNGCheckRules(ctxt, cur->content, flags, cur->type);
+ }
+ cur = cur->next;
+ if (ptype == XML_RELAXNG_GROUP) {
+ val = xmlRelaxNGGroupContentType(val, ret);
+ } else if (ptype == XML_RELAXNG_INTERLEAVE) {
+ /*
+ * TODO: scan complain that tmp is never used, seems on purpose
+ * need double-checking
+ */
+ tmp = xmlRelaxNGGroupContentType(val, ret);
+ if (tmp != XML_RELAXNG_CONTENT_ERROR)
+ tmp = xmlRelaxNGMaxContentType(val, ret);
+ } else if (ptype == XML_RELAXNG_CHOICE) {
+ val = xmlRelaxNGMaxContentType(val, ret);
+ } else if (ptype == XML_RELAXNG_LIST) {
+ val = XML_RELAXNG_CONTENT_SIMPLE;
+ } else if (ptype == XML_RELAXNG_EXCEPT) {
+ if (ret == XML_RELAXNG_CONTENT_ERROR)
+ val = XML_RELAXNG_CONTENT_ERROR;
+ else
+ val = XML_RELAXNG_CONTENT_SIMPLE;
+ } else {
+ val = xmlRelaxNGGroupContentType(val, ret);
+ }
+
+ }
+ return (val);
+}
+
+/**
+ * xmlRelaxNGParseGrammar:
+ * @ctxt: a Relax-NG parser context
+ * @nodes: grammar children nodes
+ *
+ * parse a Relax-NG <grammar> node
+ *
+ * Returns the internal xmlRelaxNGGrammarPtr built or
+ * NULL in case of error
+ */
+static xmlRelaxNGGrammarPtr
+xmlRelaxNGParseGrammar(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr nodes)
+{
+ xmlRelaxNGGrammarPtr ret, tmp, old;
+
+#ifdef DEBUG_GRAMMAR
+ xmlGenericError(xmlGenericErrorContext, "Parsing a new grammar\n");
+#endif
+
+ ret = xmlRelaxNGNewGrammar(ctxt);
+ if (ret == NULL)
+ return (NULL);
+
+ /*
+ * Link the new grammar in the tree
+ */
+ ret->parent = ctxt->grammar;
+ if (ctxt->grammar != NULL) {
+ tmp = ctxt->grammar->children;
+ if (tmp == NULL) {
+ ctxt->grammar->children = ret;
+ } else {
+ while (tmp->next != NULL)
+ tmp = tmp->next;
+ tmp->next = ret;
+ }
+ }
+
+ old = ctxt->grammar;
+ ctxt->grammar = ret;
+ xmlRelaxNGParseGrammarContent(ctxt, nodes);
+ ctxt->grammar = ret;
+ if (ctxt->grammar == NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_GRAMMAR_CONTENT,
+ "Failed to parse <grammar> content\n", NULL, NULL);
+ } else if (ctxt->grammar->start == NULL) {
+ xmlRngPErr(ctxt, nodes, XML_RNGP_GRAMMAR_NO_START,
+ "Element <grammar> has no <start>\n", NULL, NULL);
+ }
+
+ /*
+ * Apply 4.17 merging rules to defines and starts
+ */
+ xmlRelaxNGCombineStart(ctxt, ret);
+ if (ret->defs != NULL) {
+ xmlHashScan(ret->defs, (xmlHashScanner) xmlRelaxNGCheckCombine,
+ ctxt);
+ }
+
+ /*
+ * link together defines and refs in this grammar
+ */
+ if (ret->refs != NULL) {
+ xmlHashScan(ret->refs, (xmlHashScanner) xmlRelaxNGCheckReference,
+ ctxt);
+ }
+
+
+ /* @@@@ */
+
+ ctxt->grammar = old;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGParseDocument:
+ * @ctxt: a Relax-NG parser context
+ * @node: the root node of the RelaxNG schema
+ *
+ * parse a Relax-NG definition resource and build an internal
+ * xmlRelaxNG struture which can be used to validate instances.
+ *
+ * Returns the internal XML RelaxNG structure built or
+ * NULL in case of error
+ */
+static xmlRelaxNGPtr
+xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlRelaxNGPtr schema = NULL;
+ const xmlChar *olddefine;
+ xmlRelaxNGGrammarPtr old;
+
+ if ((ctxt == NULL) || (node == NULL))
+ return (NULL);
+
+ schema = xmlRelaxNGNewRelaxNG(ctxt);
+ if (schema == NULL)
+ return (NULL);
+
+ olddefine = ctxt->define;
+ ctxt->define = NULL;
+ if (IS_RELAXNG(node, "grammar")) {
+ schema->topgrammar = xmlRelaxNGParseGrammar(ctxt, node->children);
+ if (schema->topgrammar == NULL) {
+ xmlRelaxNGFree(schema);
+ return (NULL);
+ }
+ } else {
+ xmlRelaxNGGrammarPtr tmp, ret;
+
+ schema->topgrammar = ret = xmlRelaxNGNewGrammar(ctxt);
+ if (schema->topgrammar == NULL) {
+ xmlRelaxNGFree(schema);
+ return (NULL);
+ }
+ /*
+ * Link the new grammar in the tree
+ */
+ ret->parent = ctxt->grammar;
+ if (ctxt->grammar != NULL) {
+ tmp = ctxt->grammar->children;
+ if (tmp == NULL) {
+ ctxt->grammar->children = ret;
+ } else {
+ while (tmp->next != NULL)
+ tmp = tmp->next;
+ tmp->next = ret;
+ }
+ }
+ old = ctxt->grammar;
+ ctxt->grammar = ret;
+ xmlRelaxNGParseStart(ctxt, node);
+ if (old != NULL)
+ ctxt->grammar = old;
+ }
+ ctxt->define = olddefine;
+ if (schema->topgrammar->start != NULL) {
+ xmlRelaxNGCheckCycles(ctxt, schema->topgrammar->start, 0);
+ if ((ctxt->flags & XML_RELAXNG_IN_EXTERNALREF) == 0) {
+ xmlRelaxNGSimplify(ctxt, schema->topgrammar->start, NULL);
+ while ((schema->topgrammar->start != NULL) &&
+ (schema->topgrammar->start->type == XML_RELAXNG_NOOP) &&
+ (schema->topgrammar->start->next != NULL))
+ schema->topgrammar->start =
+ schema->topgrammar->start->content;
+ xmlRelaxNGCheckRules(ctxt, schema->topgrammar->start,
+ XML_RELAXNG_IN_START, XML_RELAXNG_NOOP);
+ }
+ }
+#ifdef DEBUG
+ if (schema == NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGParseDocument() failed\n");
+#endif
+
+ return (schema);
+}
+
+/************************************************************************
+ * *
+ * Reading RelaxNGs *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRelaxNGNewParserCtxt:
+ * @URL: the location of the schema
+ *
+ * Create an XML RelaxNGs parse context for that file/resource expected
+ * to contain an XML RelaxNGs file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlRelaxNGParserCtxtPtr
+xmlRelaxNGNewParserCtxt(const char *URL)
+{
+ xmlRelaxNGParserCtxtPtr ret;
+
+ if (URL == NULL)
+ return (NULL);
+
+ ret =
+ (xmlRelaxNGParserCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGParserCtxt));
+ if (ret == NULL) {
+ xmlRngPErrMemory(NULL, "building parser\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGParserCtxt));
+ ret->URL = xmlStrdup((const xmlChar *) URL);
+ ret->error = xmlGenericError;
+ ret->userData = xmlGenericErrorContext;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGNewMemParserCtxt:
+ * @buffer: a pointer to a char array containing the schemas
+ * @size: the size of the array
+ *
+ * Create an XML RelaxNGs parse context for that memory buffer expected
+ * to contain an XML RelaxNGs file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlRelaxNGParserCtxtPtr
+xmlRelaxNGNewMemParserCtxt(const char *buffer, int size)
+{
+ xmlRelaxNGParserCtxtPtr ret;
+
+ if ((buffer == NULL) || (size <= 0))
+ return (NULL);
+
+ ret =
+ (xmlRelaxNGParserCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGParserCtxt));
+ if (ret == NULL) {
+ xmlRngPErrMemory(NULL, "building parser\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGParserCtxt));
+ ret->buffer = buffer;
+ ret->size = size;
+ ret->error = xmlGenericError;
+ ret->userData = xmlGenericErrorContext;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGNewDocParserCtxt:
+ * @doc: a preparsed document tree
+ *
+ * Create an XML RelaxNGs parser context for that document.
+ * Note: since the process of compiling a RelaxNG schemas modifies the
+ * document, the @doc parameter is duplicated internally.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlRelaxNGParserCtxtPtr
+xmlRelaxNGNewDocParserCtxt(xmlDocPtr doc)
+{
+ xmlRelaxNGParserCtxtPtr ret;
+ xmlDocPtr copy;
+
+ if (doc == NULL)
+ return (NULL);
+ copy = xmlCopyDoc(doc, 1);
+ if (copy == NULL)
+ return (NULL);
+
+ ret =
+ (xmlRelaxNGParserCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGParserCtxt));
+ if (ret == NULL) {
+ xmlRngPErrMemory(NULL, "building parser\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGParserCtxt));
+ ret->document = copy;
+ ret->freedoc = 1;
+ ret->userData = xmlGenericErrorContext;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGFreeParserCtxt:
+ * @ctxt: the schema parser context
+ *
+ * Free the resources associated to the schema parser context
+ */
+void
+xmlRelaxNGFreeParserCtxt(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->URL != NULL)
+ xmlFree(ctxt->URL);
+ if (ctxt->doc != NULL)
+ xmlRelaxNGFreeDocument(ctxt->doc);
+ if (ctxt->interleaves != NULL)
+ xmlHashFree(ctxt->interleaves, NULL);
+ if (ctxt->documents != NULL)
+ xmlRelaxNGFreeDocumentList(ctxt->documents);
+ if (ctxt->includes != NULL)
+ xmlRelaxNGFreeIncludeList(ctxt->includes);
+ if (ctxt->docTab != NULL)
+ xmlFree(ctxt->docTab);
+ if (ctxt->incTab != NULL)
+ xmlFree(ctxt->incTab);
+ if (ctxt->defTab != NULL) {
+ int i;
+
+ for (i = 0; i < ctxt->defNr; i++)
+ xmlRelaxNGFreeDefine(ctxt->defTab[i]);
+ xmlFree(ctxt->defTab);
+ }
+ if ((ctxt->document != NULL) && (ctxt->freedoc))
+ xmlFreeDoc(ctxt->document);
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlRelaxNGNormExtSpace:
+ * @value: a value
+ *
+ * Removes the leading and ending spaces of the value
+ * The string is modified "in situ"
+ */
+static void
+xmlRelaxNGNormExtSpace(xmlChar * value)
+{
+ xmlChar *start = value;
+ xmlChar *cur = value;
+
+ if (value == NULL)
+ return;
+
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ if (cur == start) {
+ do {
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur)))
+ cur++;
+ if (*cur == 0)
+ return;
+ start = cur;
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ if (*cur == 0) {
+ *start = 0;
+ return;
+ }
+ } while (1);
+ } else {
+ do {
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur)))
+ *start++ = *cur++;
+ if (*cur == 0) {
+ *start = 0;
+ return;
+ }
+ /* don't try to normalize the inner spaces */
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ if (*cur == 0) {
+ *start = 0;
+ return;
+ }
+ *start++ = *cur++;
+ } while (1);
+ }
+}
+
+/**
+ * xmlRelaxNGCleanupAttributes:
+ * @ctxt: a Relax-NG parser context
+ * @node: a Relax-NG node
+ *
+ * Check all the attributes on the given node
+ */
+static void
+xmlRelaxNGCleanupAttributes(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlAttrPtr cur, next;
+
+ cur = node->properties;
+ while (cur != NULL) {
+ next = cur->next;
+ if ((cur->ns == NULL) ||
+ (xmlStrEqual(cur->ns->href, xmlRelaxNGNs))) {
+ if (xmlStrEqual(cur->name, BAD_CAST "name")) {
+ if ((!xmlStrEqual(node->name, BAD_CAST "element")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "attribute")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "ref")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "parentRef")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "param")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "define"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_FORBIDDEN_ATTRIBUTE,
+ "Attribute %s is not allowed on %s\n",
+ cur->name, node->name);
+ }
+ } else if (xmlStrEqual(cur->name, BAD_CAST "type")) {
+ if ((!xmlStrEqual(node->name, BAD_CAST "value")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "data"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_FORBIDDEN_ATTRIBUTE,
+ "Attribute %s is not allowed on %s\n",
+ cur->name, node->name);
+ }
+ } else if (xmlStrEqual(cur->name, BAD_CAST "href")) {
+ if ((!xmlStrEqual(node->name, BAD_CAST "externalRef")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "include"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_FORBIDDEN_ATTRIBUTE,
+ "Attribute %s is not allowed on %s\n",
+ cur->name, node->name);
+ }
+ } else if (xmlStrEqual(cur->name, BAD_CAST "combine")) {
+ if ((!xmlStrEqual(node->name, BAD_CAST "start")) &&
+ (!xmlStrEqual(node->name, BAD_CAST "define"))) {
+ xmlRngPErr(ctxt, node, XML_RNGP_FORBIDDEN_ATTRIBUTE,
+ "Attribute %s is not allowed on %s\n",
+ cur->name, node->name);
+ }
+ } else if (xmlStrEqual(cur->name, BAD_CAST "datatypeLibrary")) {
+ xmlChar *val;
+ xmlURIPtr uri;
+
+ val = xmlNodeListGetString(node->doc, cur->children, 1);
+ if (val != NULL) {
+ if (val[0] != 0) {
+ uri = xmlParseURI((const char *) val);
+ if (uri == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_INVALID_URI,
+ "Attribute %s contains invalid URI %s\n",
+ cur->name, val);
+ } else {
+ if (uri->scheme == NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_URI_NOT_ABSOLUTE,
+ "Attribute %s URI %s is not absolute\n",
+ cur->name, val);
+ }
+ if (uri->fragment != NULL) {
+ xmlRngPErr(ctxt, node, XML_RNGP_URI_FRAGMENT,
+ "Attribute %s URI %s has a fragment ID\n",
+ cur->name, val);
+ }
+ xmlFreeURI(uri);
+ }
+ }
+ xmlFree(val);
+ }
+ } else if (!xmlStrEqual(cur->name, BAD_CAST "ns")) {
+ xmlRngPErr(ctxt, node, XML_RNGP_UNKNOWN_ATTRIBUTE,
+ "Unknown attribute %s on %s\n", cur->name,
+ node->name);
+ }
+ }
+ cur = next;
+ }
+}
+
+/**
+ * xmlRelaxNGCleanupTree:
+ * @ctxt: a Relax-NG parser context
+ * @root: an xmlNodePtr subtree
+ *
+ * Cleanup the subtree from unwanted nodes for parsing, resolve
+ * Include and externalRef lookups.
+ */
+static void
+xmlRelaxNGCleanupTree(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr root)
+{
+ xmlNodePtr cur, delete;
+
+ delete = NULL;
+ cur = root;
+ while (cur != NULL) {
+ if (delete != NULL) {
+ xmlUnlinkNode(delete);
+ xmlFreeNode(delete);
+ delete = NULL;
+ }
+ if (cur->type == XML_ELEMENT_NODE) {
+ /*
+ * Simplification 4.1. Annotations
+ */
+ if ((cur->ns == NULL) ||
+ (!xmlStrEqual(cur->ns->href, xmlRelaxNGNs))) {
+ if ((cur->parent != NULL) &&
+ (cur->parent->type == XML_ELEMENT_NODE) &&
+ ((xmlStrEqual(cur->parent->name, BAD_CAST "name")) ||
+ (xmlStrEqual(cur->parent->name, BAD_CAST "value")) ||
+ (xmlStrEqual(cur->parent->name, BAD_CAST "param")))) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_FOREIGN_ELEMENT,
+ "element %s doesn't allow foreign elements\n",
+ cur->parent->name, NULL);
+ }
+ delete = cur;
+ goto skip_children;
+ } else {
+ xmlRelaxNGCleanupAttributes(ctxt, cur);
+ if (xmlStrEqual(cur->name, BAD_CAST "externalRef")) {
+ xmlChar *href, *ns, *base, *URL;
+ xmlRelaxNGDocumentPtr docu;
+ xmlNodePtr tmp;
+ xmlURIPtr uri;
+
+ ns = xmlGetProp(cur, BAD_CAST "ns");
+ if (ns == NULL) {
+ tmp = cur->parent;
+ while ((tmp != NULL) &&
+ (tmp->type == XML_ELEMENT_NODE)) {
+ ns = xmlGetProp(tmp, BAD_CAST "ns");
+ if (ns != NULL)
+ break;
+ tmp = tmp->parent;
+ }
+ }
+ href = xmlGetProp(cur, BAD_CAST "href");
+ if (href == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
+ "xmlRelaxNGParse: externalRef has no href attribute\n",
+ NULL, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
+ delete = cur;
+ goto skip_children;
+ }
+ uri = xmlParseURI((const char *) href);
+ if (uri == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
+ "Incorrect URI for externalRef %s\n",
+ href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
+ if (href != NULL)
+ xmlFree(href);
+ delete = cur;
+ goto skip_children;
+ }
+ if (uri->fragment != NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
+ "Fragment forbidden in URI for externalRef %s\n",
+ href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
+ xmlFreeURI(uri);
+ if (href != NULL)
+ xmlFree(href);
+ delete = cur;
+ goto skip_children;
+ }
+ xmlFreeURI(uri);
+ base = xmlNodeGetBase(cur->doc, cur);
+ URL = xmlBuildURI(href, base);
+ if (URL == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
+ "Failed to compute URL for externalRef %s\n",
+ href, NULL);
+ if (ns != NULL)
+ xmlFree(ns);
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ delete = cur;
+ goto skip_children;
+ }
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ docu = xmlRelaxNGLoadExternalRef(ctxt, URL, ns);
+ if (docu == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_EXTERNAL_REF_FAILURE,
+ "Failed to load externalRef %s\n", URL,
+ NULL);
+ if (ns != NULL)
+ xmlFree(ns);
+ xmlFree(URL);
+ delete = cur;
+ goto skip_children;
+ }
+ if (ns != NULL)
+ xmlFree(ns);
+ xmlFree(URL);
+ cur->psvi = docu;
+ } else if (xmlStrEqual(cur->name, BAD_CAST "include")) {
+ xmlChar *href, *ns, *base, *URL;
+ xmlRelaxNGIncludePtr incl;
+ xmlNodePtr tmp;
+
+ href = xmlGetProp(cur, BAD_CAST "href");
+ if (href == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_MISSING_HREF,
+ "xmlRelaxNGParse: include has no href attribute\n",
+ NULL, NULL);
+ delete = cur;
+ goto skip_children;
+ }
+ base = xmlNodeGetBase(cur->doc, cur);
+ URL = xmlBuildURI(href, base);
+ if (URL == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_HREF_ERROR,
+ "Failed to compute URL for include %s\n",
+ href, NULL);
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ delete = cur;
+ goto skip_children;
+ }
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ ns = xmlGetProp(cur, BAD_CAST "ns");
+ if (ns == NULL) {
+ tmp = cur->parent;
+ while ((tmp != NULL) &&
+ (tmp->type == XML_ELEMENT_NODE)) {
+ ns = xmlGetProp(tmp, BAD_CAST "ns");
+ if (ns != NULL)
+ break;
+ tmp = tmp->parent;
+ }
+ }
+ incl = xmlRelaxNGLoadInclude(ctxt, URL, cur, ns);
+ if (ns != NULL)
+ xmlFree(ns);
+ if (incl == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_INCLUDE_FAILURE,
+ "Failed to load include %s\n", URL,
+ NULL);
+ xmlFree(URL);
+ delete = cur;
+ goto skip_children;
+ }
+ xmlFree(URL);
+ cur->psvi = incl;
+ } else if ((xmlStrEqual(cur->name, BAD_CAST "element")) ||
+ (xmlStrEqual(cur->name, BAD_CAST "attribute")))
+ {
+ xmlChar *name, *ns;
+ xmlNodePtr text = NULL;
+
+ /*
+ * Simplification 4.8. name attribute of element
+ * and attribute elements
+ */
+ name = xmlGetProp(cur, BAD_CAST "name");
+ if (name != NULL) {
+ if (cur->children == NULL) {
+ text =
+ xmlNewChild(cur, cur->ns, BAD_CAST "name",
+ name);
+ } else {
+ xmlNodePtr node;
+
+ node = xmlNewDocNode(cur->doc, cur->ns,
+ BAD_CAST "name", NULL);
+ if (node != NULL) {
+ xmlAddPrevSibling(cur->children, node);
+ text = xmlNewText(name);
+ xmlAddChild(node, text);
+ text = node;
+ }
+ }
+ if (text == NULL) {
+ xmlRngPErr(ctxt, cur, XML_RNGP_CREATE_FAILURE,
+ "Failed to create a name %s element\n",
+ name, NULL);
+ }
+ xmlUnsetProp(cur, BAD_CAST "name");
+ xmlFree(name);
+ ns = xmlGetProp(cur, BAD_CAST "ns");
+ if (ns != NULL) {
+ if (text != NULL) {
+ xmlSetProp(text, BAD_CAST "ns", ns);
+ /* xmlUnsetProp(cur, BAD_CAST "ns"); */
+ }
+ xmlFree(ns);
+ } else if (xmlStrEqual(cur->name,
+ BAD_CAST "attribute")) {
+ xmlSetProp(text, BAD_CAST "ns", BAD_CAST "");
+ }
+ }
+ } else if ((xmlStrEqual(cur->name, BAD_CAST "name")) ||
+ (xmlStrEqual(cur->name, BAD_CAST "nsName")) ||
+ (xmlStrEqual(cur->name, BAD_CAST "value"))) {
+ /*
+ * Simplification 4.8. name attribute of element
+ * and attribute elements
+ */
+ if (xmlHasProp(cur, BAD_CAST "ns") == NULL) {
+ xmlNodePtr node;
+ xmlChar *ns = NULL;
+
+ node = cur->parent;
+ while ((node != NULL) &&
+ (node->type == XML_ELEMENT_NODE)) {
+ ns = xmlGetProp(node, BAD_CAST "ns");
+ if (ns != NULL) {
+ break;
+ }
+ node = node->parent;
+ }
+ if (ns == NULL) {
+ xmlSetProp(cur, BAD_CAST "ns", BAD_CAST "");
+ } else {
+ xmlSetProp(cur, BAD_CAST "ns", ns);
+ xmlFree(ns);
+ }
+ }
+ if (xmlStrEqual(cur->name, BAD_CAST "name")) {
+ xmlChar *name, *local, *prefix;
+
+ /*
+ * Simplification: 4.10. QNames
+ */
+ name = xmlNodeGetContent(cur);
+ if (name != NULL) {
+ local = xmlSplitQName2(name, &prefix);
+ if (local != NULL) {
+ xmlNsPtr ns;
+
+ ns = xmlSearchNs(cur->doc, cur, prefix);
+ if (ns == NULL) {
+ xmlRngPErr(ctxt, cur,
+ XML_RNGP_PREFIX_UNDEFINED,
+ "xmlRelaxNGParse: no namespace for prefix %s\n",
+ prefix, NULL);
+ } else {
+ xmlSetProp(cur, BAD_CAST "ns",
+ ns->href);
+ xmlNodeSetContent(cur, local);
+ }
+ xmlFree(local);
+ xmlFree(prefix);
+ }
+ xmlFree(name);
+ }
+ }
+ /*
+ * 4.16
+ */
+ if (xmlStrEqual(cur->name, BAD_CAST "nsName")) {
+ if (ctxt->flags & XML_RELAXNG_IN_NSEXCEPT) {
+ xmlRngPErr(ctxt, cur,
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME,
+ "Found nsName/except//nsName forbidden construct\n",
+ NULL, NULL);
+ }
+ }
+ } else if ((xmlStrEqual(cur->name, BAD_CAST "except")) &&
+ (cur != root)) {
+ int oldflags = ctxt->flags;
+
+ /*
+ * 4.16
+ */
+ if ((cur->parent != NULL) &&
+ (xmlStrEqual
+ (cur->parent->name, BAD_CAST "anyName"))) {
+ ctxt->flags |= XML_RELAXNG_IN_ANYEXCEPT;
+ xmlRelaxNGCleanupTree(ctxt, cur);
+ ctxt->flags = oldflags;
+ goto skip_children;
+ } else if ((cur->parent != NULL) &&
+ (xmlStrEqual
+ (cur->parent->name, BAD_CAST "nsName"))) {
+ ctxt->flags |= XML_RELAXNG_IN_NSEXCEPT;
+ xmlRelaxNGCleanupTree(ctxt, cur);
+ ctxt->flags = oldflags;
+ goto skip_children;
+ }
+ } else if (xmlStrEqual(cur->name, BAD_CAST "anyName")) {
+ /*
+ * 4.16
+ */
+ if (ctxt->flags & XML_RELAXNG_IN_ANYEXCEPT) {
+ xmlRngPErr(ctxt, cur,
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME,
+ "Found anyName/except//anyName forbidden construct\n",
+ NULL, NULL);
+ } else if (ctxt->flags & XML_RELAXNG_IN_NSEXCEPT) {
+ xmlRngPErr(ctxt, cur,
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME,
+ "Found nsName/except//anyName forbidden construct\n",
+ NULL, NULL);
+ }
+ }
+ /*
+ * This is not an else since "include" is transformed
+ * into a div
+ */
+ if (xmlStrEqual(cur->name, BAD_CAST "div")) {
+ xmlChar *ns;
+ xmlNodePtr child, ins, tmp;
+
+ /*
+ * implements rule 4.11
+ */
+
+ ns = xmlGetProp(cur, BAD_CAST "ns");
+
+ child = cur->children;
+ ins = cur;
+ while (child != NULL) {
+ if (ns != NULL) {
+ if (!xmlHasProp(child, BAD_CAST "ns")) {
+ xmlSetProp(child, BAD_CAST "ns", ns);
+ }
+ }
+ tmp = child->next;
+ xmlUnlinkNode(child);
+ ins = xmlAddNextSibling(ins, child);
+ child = tmp;
+ }
+ if (ns != NULL)
+ xmlFree(ns);
+ /*
+ * Since we are about to delete cur, if its nsDef is non-NULL we
+ * need to preserve it (it contains the ns definitions for the
+ * children we just moved). We'll just stick it on to the end
+ * of cur->parent's list, since it's never going to be re-serialized
+ * (bug 143738).
+ */
+ if ((cur->nsDef != NULL) && (cur->parent != NULL)) {
+ xmlNsPtr parDef = (xmlNsPtr)&cur->parent->nsDef;
+ while (parDef->next != NULL)
+ parDef = parDef->next;
+ parDef->next = cur->nsDef;
+ cur->nsDef = NULL;
+ }
+ delete = cur;
+ goto skip_children;
+ }
+ }
+ }
+ /*
+ * Simplification 4.2 whitespaces
+ */
+ else if ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ if (IS_BLANK_NODE(cur)) {
+ if ((cur->parent != NULL) &&
+ (cur->parent->type == XML_ELEMENT_NODE)) {
+ if ((!xmlStrEqual(cur->parent->name, BAD_CAST "value"))
+ &&
+ (!xmlStrEqual
+ (cur->parent->name, BAD_CAST "param")))
+ delete = cur;
+ } else {
+ delete = cur;
+ goto skip_children;
+ }
+ }
+ } else {
+ delete = cur;
+ goto skip_children;
+ }
+
+ /*
+ * Skip to next node
+ */
+ if (cur->children != NULL) {
+ if ((cur->children->type != XML_ENTITY_DECL) &&
+ (cur->children->type != XML_ENTITY_REF_NODE) &&
+ (cur->children->type != XML_ENTITY_NODE)) {
+ cur = cur->children;
+ continue;
+ }
+ }
+ skip_children:
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == root) {
+ cur = NULL;
+ break;
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ if (delete != NULL) {
+ xmlUnlinkNode(delete);
+ xmlFreeNode(delete);
+ delete = NULL;
+ }
+}
+
+/**
+ * xmlRelaxNGCleanupDoc:
+ * @ctxt: a Relax-NG parser context
+ * @doc: an xmldocPtr document pointer
+ *
+ * Cleanup the document from unwanted nodes for parsing, resolve
+ * Include and externalRef lookups.
+ *
+ * Returns the cleaned up document or NULL in case of error
+ */
+static xmlDocPtr
+xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc)
+{
+ xmlNodePtr root;
+
+ /*
+ * Extract the root
+ */
+ root = xmlDocGetRootElement(doc);
+ if (root == NULL) {
+ xmlRngPErr(ctxt, (xmlNodePtr) doc, XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
+ ctxt->URL, NULL);
+ return (NULL);
+ }
+ xmlRelaxNGCleanupTree(ctxt, root);
+ return (doc);
+}
+
+/**
+ * xmlRelaxNGParse:
+ * @ctxt: a Relax-NG parser context
+ *
+ * parse a schema definition resource and build an internal
+ * XML Shema struture which can be used to validate instances.
+ *
+ * Returns the internal XML RelaxNG structure built from the resource or
+ * NULL in case of error
+ */
+xmlRelaxNGPtr
+xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt)
+{
+ xmlRelaxNGPtr ret = NULL;
+ xmlDocPtr doc;
+ xmlNodePtr root;
+
+ xmlRelaxNGInitTypes();
+
+ if (ctxt == NULL)
+ return (NULL);
+
+ /*
+ * First step is to parse the input document into an DOM/Infoset
+ */
+ if (ctxt->URL != NULL) {
+ doc = xmlReadFile((const char *) ctxt->URL,NULL,0);
+ if (doc == NULL) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_PARSE_ERROR,
+ "xmlRelaxNGParse: could not load %s\n", ctxt->URL,
+ NULL);
+ return (NULL);
+ }
+ } else if (ctxt->buffer != NULL) {
+ doc = xmlReadMemory(ctxt->buffer, ctxt->size,NULL,NULL,0);
+ if (doc == NULL) {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_PARSE_ERROR,
+ "xmlRelaxNGParse: could not parse schemas\n", NULL,
+ NULL);
+ return (NULL);
+ }
+ doc->URL = xmlStrdup(BAD_CAST "in_memory_buffer");
+ ctxt->URL = xmlStrdup(BAD_CAST "in_memory_buffer");
+ } else if (ctxt->document != NULL) {
+ doc = ctxt->document;
+ } else {
+ xmlRngPErr(ctxt, NULL, XML_RNGP_EMPTY,
+ "xmlRelaxNGParse: nothing to parse\n", NULL, NULL);
+ return (NULL);
+ }
+ ctxt->document = doc;
+
+ /*
+ * Some preprocessing of the document content
+ */
+ doc = xmlRelaxNGCleanupDoc(ctxt, doc);
+ if (doc == NULL) {
+ xmlFreeDoc(ctxt->document);
+ ctxt->document = NULL;
+ return (NULL);
+ }
+
+ /*
+ * Then do the parsing for good
+ */
+ root = xmlDocGetRootElement(doc);
+ if (root == NULL) {
+ xmlRngPErr(ctxt, (xmlNodePtr) doc,
+ XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
+ (ctxt->URL ? ctxt->URL : BAD_CAST "schemas"), NULL);
+
+ xmlFreeDoc(ctxt->document);
+ ctxt->document = NULL;
+ return (NULL);
+ }
+ ret = xmlRelaxNGParseDocument(ctxt, root);
+ if (ret == NULL) {
+ xmlFreeDoc(ctxt->document);
+ ctxt->document = NULL;
+ return (NULL);
+ }
+
+ /*
+ * Check the ref/defines links
+ */
+ /*
+ * try to preprocess interleaves
+ */
+ if (ctxt->interleaves != NULL) {
+ xmlHashScan(ctxt->interleaves,
+ (xmlHashScanner) xmlRelaxNGComputeInterleaves, ctxt);
+ }
+
+ /*
+ * if there was a parsing error return NULL
+ */
+ if (ctxt->nbErrors > 0) {
+ xmlRelaxNGFree(ret);
+ ctxt->document = NULL;
+ xmlFreeDoc(doc);
+ return (NULL);
+ }
+
+ /*
+ * try to compile (parts of) the schemas
+ */
+ if ((ret->topgrammar != NULL) && (ret->topgrammar->start != NULL)) {
+ if (ret->topgrammar->start->type != XML_RELAXNG_START) {
+ xmlRelaxNGDefinePtr def;
+
+ def = xmlRelaxNGNewDefine(ctxt, NULL);
+ if (def != NULL) {
+ def->type = XML_RELAXNG_START;
+ def->content = ret->topgrammar->start;
+ ret->topgrammar->start = def;
+ }
+ }
+ xmlRelaxNGTryCompile(ctxt, ret->topgrammar->start);
+ }
+
+ /*
+ * Transfer the pointer for cleanup at the schema level.
+ */
+ ret->doc = doc;
+ ctxt->document = NULL;
+ ret->documents = ctxt->documents;
+ ctxt->documents = NULL;
+
+ ret->includes = ctxt->includes;
+ ctxt->includes = NULL;
+ ret->defNr = ctxt->defNr;
+ ret->defTab = ctxt->defTab;
+ ctxt->defTab = NULL;
+ if (ctxt->idref == 1)
+ ret->idref = 1;
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGSetParserErrors:
+ * @ctxt: a Relax-NG validation context
+ * @err: the error callback
+ * @warn: the warning callback
+ * @ctx: contextual data for the callbacks
+ *
+ * Set the callback functions used to handle errors for a validation context
+ */
+void
+xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->error = err;
+ ctxt->warning = warn;
+ ctxt->serror = NULL;
+ ctxt->userData = ctx;
+}
+
+/**
+ * xmlRelaxNGGetParserErrors:
+ * @ctxt: a Relax-NG validation context
+ * @err: the error callback result
+ * @warn: the warning callback result
+ * @ctx: contextual data for the callbacks result
+ *
+ * Get the callback information used to handle errors for a validation context
+ *
+ * Returns -1 in case of failure, 0 otherwise.
+ */
+int
+xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc * err,
+ xmlRelaxNGValidityWarningFunc * warn, void **ctx)
+{
+ if (ctxt == NULL)
+ return (-1);
+ if (err != NULL)
+ *err = ctxt->error;
+ if (warn != NULL)
+ *warn = ctxt->warning;
+ if (ctx != NULL)
+ *ctx = ctxt->userData;
+ return (0);
+}
+
+/**
+ * xmlRelaxNGSetParserStructuredErrors:
+ * @ctxt: a Relax-NG parser context
+ * @serror: the error callback
+ * @ctx: contextual data for the callbacks
+ *
+ * Set the callback functions used to handle errors for a parsing context
+ */
+void
+xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->serror = serror;
+ ctxt->error = NULL;
+ ctxt->warning = NULL;
+ ctxt->userData = ctx;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+
+/************************************************************************
+ * *
+ * Dump back a compiled form *
+ * *
+ ************************************************************************/
+static void xmlRelaxNGDumpDefine(FILE * output,
+ xmlRelaxNGDefinePtr define);
+
+/**
+ * xmlRelaxNGDumpDefines:
+ * @output: the file output
+ * @defines: a list of define structures
+ *
+ * Dump a RelaxNG structure back
+ */
+static void
+xmlRelaxNGDumpDefines(FILE * output, xmlRelaxNGDefinePtr defines)
+{
+ while (defines != NULL) {
+ xmlRelaxNGDumpDefine(output, defines);
+ defines = defines->next;
+ }
+}
+
+/**
+ * xmlRelaxNGDumpDefine:
+ * @output: the file output
+ * @define: a define structure
+ *
+ * Dump a RelaxNG structure back
+ */
+static void
+xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define)
+{
+ if (define == NULL)
+ return;
+ switch (define->type) {
+ case XML_RELAXNG_EMPTY:
+ fprintf(output, "<empty/>\n");
+ break;
+ case XML_RELAXNG_NOT_ALLOWED:
+ fprintf(output, "<notAllowed/>\n");
+ break;
+ case XML_RELAXNG_TEXT:
+ fprintf(output, "<text/>\n");
+ break;
+ case XML_RELAXNG_ELEMENT:
+ fprintf(output, "<element>\n");
+ if (define->name != NULL) {
+ fprintf(output, "<name");
+ if (define->ns != NULL)
+ fprintf(output, " ns=\"%s\"", define->ns);
+ fprintf(output, ">%s</name>\n", define->name);
+ }
+ xmlRelaxNGDumpDefines(output, define->attrs);
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</element>\n");
+ break;
+ case XML_RELAXNG_LIST:
+ fprintf(output, "<list>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</list>\n");
+ break;
+ case XML_RELAXNG_ONEORMORE:
+ fprintf(output, "<oneOrMore>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</oneOrMore>\n");
+ break;
+ case XML_RELAXNG_ZEROORMORE:
+ fprintf(output, "<zeroOrMore>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</zeroOrMore>\n");
+ break;
+ case XML_RELAXNG_CHOICE:
+ fprintf(output, "<choice>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</choice>\n");
+ break;
+ case XML_RELAXNG_GROUP:
+ fprintf(output, "<group>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</group>\n");
+ break;
+ case XML_RELAXNG_INTERLEAVE:
+ fprintf(output, "<interleave>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</interleave>\n");
+ break;
+ case XML_RELAXNG_OPTIONAL:
+ fprintf(output, "<optional>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</optional>\n");
+ break;
+ case XML_RELAXNG_ATTRIBUTE:
+ fprintf(output, "<attribute>\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</attribute>\n");
+ break;
+ case XML_RELAXNG_DEF:
+ fprintf(output, "<define");
+ if (define->name != NULL)
+ fprintf(output, " name=\"%s\"", define->name);
+ fprintf(output, ">\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</define>\n");
+ break;
+ case XML_RELAXNG_REF:
+ fprintf(output, "<ref");
+ if (define->name != NULL)
+ fprintf(output, " name=\"%s\"", define->name);
+ fprintf(output, ">\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</ref>\n");
+ break;
+ case XML_RELAXNG_PARENTREF:
+ fprintf(output, "<parentRef");
+ if (define->name != NULL)
+ fprintf(output, " name=\"%s\"", define->name);
+ fprintf(output, ">\n");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</parentRef>\n");
+ break;
+ case XML_RELAXNG_EXTERNALREF:
+ fprintf(output, "<externalRef>");
+ xmlRelaxNGDumpDefines(output, define->content);
+ fprintf(output, "</externalRef>\n");
+ break;
+ case XML_RELAXNG_DATATYPE:
+ case XML_RELAXNG_VALUE:
+ TODO break;
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_PARAM:
+ TODO break;
+ case XML_RELAXNG_NOOP:
+ xmlRelaxNGDumpDefines(output, define->content);
+ break;
+ }
+}
+
+/**
+ * xmlRelaxNGDumpGrammar:
+ * @output: the file output
+ * @grammar: a grammar structure
+ * @top: is this a top grammar
+ *
+ * Dump a RelaxNG structure back
+ */
+static void
+xmlRelaxNGDumpGrammar(FILE * output, xmlRelaxNGGrammarPtr grammar, int top)
+{
+ if (grammar == NULL)
+ return;
+
+ fprintf(output, "<grammar");
+ if (top)
+ fprintf(output, " xmlns=\"http://relaxng.org/ns/structure/1.0\"");
+ switch (grammar->combine) {
+ case XML_RELAXNG_COMBINE_UNDEFINED:
+ break;
+ case XML_RELAXNG_COMBINE_CHOICE:
+ fprintf(output, " combine=\"choice\"");
+ break;
+ case XML_RELAXNG_COMBINE_INTERLEAVE:
+ fprintf(output, " combine=\"interleave\"");
+ break;
+ default:
+ fprintf(output, " <!-- invalid combine value -->");
+ }
+ fprintf(output, ">\n");
+ if (grammar->start == NULL) {
+ fprintf(output, " <!-- grammar had no start -->");
+ } else {
+ fprintf(output, "<start>\n");
+ xmlRelaxNGDumpDefine(output, grammar->start);
+ fprintf(output, "</start>\n");
+ }
+ /* TODO ? Dump the defines ? */
+ fprintf(output, "</grammar>\n");
+}
+
+/**
+ * xmlRelaxNGDump:
+ * @output: the file output
+ * @schema: a schema structure
+ *
+ * Dump a RelaxNG structure back
+ */
+void
+xmlRelaxNGDump(FILE * output, xmlRelaxNGPtr schema)
+{
+ if (output == NULL)
+ return;
+ if (schema == NULL) {
+ fprintf(output, "RelaxNG empty or failed to compile\n");
+ return;
+ }
+ fprintf(output, "RelaxNG: ");
+ if (schema->doc == NULL) {
+ fprintf(output, "no document\n");
+ } else if (schema->doc->URL != NULL) {
+ fprintf(output, "%s\n", schema->doc->URL);
+ } else {
+ fprintf(output, "\n");
+ }
+ if (schema->topgrammar == NULL) {
+ fprintf(output, "RelaxNG has no top grammar\n");
+ return;
+ }
+ xmlRelaxNGDumpGrammar(output, schema->topgrammar, 1);
+}
+
+/**
+ * xmlRelaxNGDumpTree:
+ * @output: the file output
+ * @schema: a schema structure
+ *
+ * Dump the transformed RelaxNG tree.
+ */
+void
+xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema)
+{
+ if (output == NULL)
+ return;
+ if (schema == NULL) {
+ fprintf(output, "RelaxNG empty or failed to compile\n");
+ return;
+ }
+ if (schema->doc == NULL) {
+ fprintf(output, "no document\n");
+ } else {
+ xmlDocDump(output, schema->doc);
+ }
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Validation of compiled content *
+ * *
+ ************************************************************************/
+static int xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define);
+
+/**
+ * xmlRelaxNGValidateCompiledCallback:
+ * @exec: the regular expression instance
+ * @token: the token which matched
+ * @transdata: callback data, the define for the subelement if available
+ @ @inputdata: callback data, the Relax NG validation context
+ *
+ * Handle the callback and if needed validate the element children.
+ */
+static void
+xmlRelaxNGValidateCompiledCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
+ const xmlChar * token,
+ void *transdata, void *inputdata)
+{
+ xmlRelaxNGValidCtxtPtr ctxt = (xmlRelaxNGValidCtxtPtr) inputdata;
+ xmlRelaxNGDefinePtr define = (xmlRelaxNGDefinePtr) transdata;
+ int ret;
+
+#ifdef DEBUG_COMPILE
+ xmlGenericError(xmlGenericErrorContext,
+ "Compiled callback for: '%s'\n", token);
+#endif
+ if (ctxt == NULL) {
+ fprintf(stderr, "callback on %s missing context\n", token);
+ return;
+ }
+ if (define == NULL) {
+ if (token[0] == '#')
+ return;
+ fprintf(stderr, "callback on %s missing define\n", token);
+ if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ return;
+ }
+ if ((ctxt == NULL) || (define == NULL)) {
+ fprintf(stderr, "callback on %s missing info\n", token);
+ if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ return;
+ } else if (define->type != XML_RELAXNG_ELEMENT) {
+ fprintf(stderr, "callback on %s define is not element\n", token);
+ if (ctxt->errNo == XML_RELAXNG_OK)
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ return;
+ }
+ ret = xmlRelaxNGValidateDefinition(ctxt, define);
+ if (ret != 0)
+ ctxt->perr = ret;
+}
+
+/**
+ * xmlRelaxNGValidateCompiledContent:
+ * @ctxt: the RelaxNG validation context
+ * @regexp: the regular expression as compiled
+ * @content: list of children to test against the regexp
+ *
+ * Validate the content model of an element or start using the regexp
+ *
+ * Returns 0 in case of success, -1 in case of error.
+ */
+static int
+xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRegexpPtr regexp, xmlNodePtr content)
+{
+ xmlRegExecCtxtPtr exec;
+ xmlNodePtr cur;
+ int ret = 0;
+ int oldperr;
+
+ if ((ctxt == NULL) || (regexp == NULL))
+ return (-1);
+ oldperr = ctxt->perr;
+ exec = xmlRegNewExecCtxt(regexp,
+ xmlRelaxNGValidateCompiledCallback, ctxt);
+ ctxt->perr = 0;
+ cur = content;
+ while (cur != NULL) {
+ ctxt->state->seq = cur;
+ switch (cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ if (xmlIsBlankNode(cur))
+ break;
+ ret = xmlRegExecPushString(exec, BAD_CAST "#text", ctxt);
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_TEXTWRONG,
+ cur->parent->name);
+ }
+ break;
+ case XML_ELEMENT_NODE:
+ if (cur->ns != NULL) {
+ ret = xmlRegExecPushString2(exec, cur->name,
+ cur->ns->href, ctxt);
+ } else {
+ ret = xmlRegExecPushString(exec, cur->name, ctxt);
+ }
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMWRONG, cur->name);
+ }
+ break;
+ default:
+ break;
+ }
+ if (ret < 0)
+ break;
+ /*
+ * Switch to next element
+ */
+ cur = cur->next;
+ }
+ ret = xmlRegExecPushString(exec, NULL, NULL);
+ if (ret == 1) {
+ ret = 0;
+ ctxt->state->seq = NULL;
+ } else if (ret == 0) {
+ /*
+ * TODO: get some of the names needed to exit the current state of exec
+ */
+ VALID_ERR2(XML_RELAXNG_ERR_NOELEM, BAD_CAST "");
+ ret = -1;
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ } else {
+ ret = -1;
+ }
+ xmlRegFreeExecCtxt(exec);
+ /*
+ * There might be content model errors outside of the pure
+ * regexp validation, e.g. for attribute values.
+ */
+ if ((ret == 0) && (ctxt->perr != 0)) {
+ ret = ctxt->perr;
+ }
+ ctxt->perr = oldperr;
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Progressive validation of when possible *
+ * *
+ ************************************************************************/
+static int xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr defines);
+static int xmlRelaxNGValidateElementEnd(xmlRelaxNGValidCtxtPtr ctxt,
+ int dolog);
+static void xmlRelaxNGLogBestError(xmlRelaxNGValidCtxtPtr ctxt);
+
+/**
+ * xmlRelaxNGElemPush:
+ * @ctxt: the validation context
+ * @exec: the regexp runtime for the new content model
+ *
+ * Push a new regexp for the current node content model on the stack
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+static int
+xmlRelaxNGElemPush(xmlRelaxNGValidCtxtPtr ctxt, xmlRegExecCtxtPtr exec)
+{
+ if (ctxt->elemTab == NULL) {
+ ctxt->elemMax = 10;
+ ctxt->elemTab = (xmlRegExecCtxtPtr *) xmlMalloc(ctxt->elemMax *
+ sizeof
+ (xmlRegExecCtxtPtr));
+ if (ctxt->elemTab == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ return (-1);
+ }
+ }
+ if (ctxt->elemNr >= ctxt->elemMax) {
+ ctxt->elemMax *= 2;
+ ctxt->elemTab = (xmlRegExecCtxtPtr *) xmlRealloc(ctxt->elemTab,
+ ctxt->elemMax *
+ sizeof
+ (xmlRegExecCtxtPtr));
+ if (ctxt->elemTab == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ return (-1);
+ }
+ }
+ ctxt->elemTab[ctxt->elemNr++] = exec;
+ ctxt->elem = exec;
+ return (0);
+}
+
+/**
+ * xmlRelaxNGElemPop:
+ * @ctxt: the validation context
+ *
+ * Pop the regexp of the current node content model from the stack
+ *
+ * Returns the exec or NULL if empty
+ */
+static xmlRegExecCtxtPtr
+xmlRelaxNGElemPop(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ xmlRegExecCtxtPtr ret;
+
+ if (ctxt->elemNr <= 0)
+ return (NULL);
+ ctxt->elemNr--;
+ ret = ctxt->elemTab[ctxt->elemNr];
+ ctxt->elemTab[ctxt->elemNr] = NULL;
+ if (ctxt->elemNr > 0)
+ ctxt->elem = ctxt->elemTab[ctxt->elemNr - 1];
+ else
+ ctxt->elem = NULL;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateProgressiveCallback:
+ * @exec: the regular expression instance
+ * @token: the token which matched
+ * @transdata: callback data, the define for the subelement if available
+ @ @inputdata: callback data, the Relax NG validation context
+ *
+ * Handle the callback and if needed validate the element children.
+ * some of the in/out informations are passed via the context in @inputdata.
+ */
+static void
+xmlRelaxNGValidateProgressiveCallback(xmlRegExecCtxtPtr exec
+ ATTRIBUTE_UNUSED,
+ const xmlChar * token,
+ void *transdata, void *inputdata)
+{
+ xmlRelaxNGValidCtxtPtr ctxt = (xmlRelaxNGValidCtxtPtr) inputdata;
+ xmlRelaxNGDefinePtr define = (xmlRelaxNGDefinePtr) transdata;
+ xmlRelaxNGValidStatePtr state, oldstate;
+ xmlNodePtr node;
+ int ret = 0, oldflags;
+
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext,
+ "Progressive callback for: '%s'\n", token);
+#endif
+ if (ctxt == NULL) {
+ fprintf(stderr, "callback on %s missing context\n", token);
+ return;
+ }
+ node = ctxt->pnode;
+ ctxt->pstate = 1;
+ if (define == NULL) {
+ if (token[0] == '#')
+ return;
+ fprintf(stderr, "callback on %s missing define\n", token);
+ if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ ctxt->pstate = -1;
+ return;
+ }
+ if ((ctxt == NULL) || (define == NULL)) {
+ fprintf(stderr, "callback on %s missing info\n", token);
+ if ((ctxt != NULL) && (ctxt->errNo == XML_RELAXNG_OK))
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ ctxt->pstate = -1;
+ return;
+ } else if (define->type != XML_RELAXNG_ELEMENT) {
+ fprintf(stderr, "callback on %s define is not element\n", token);
+ if (ctxt->errNo == XML_RELAXNG_OK)
+ ctxt->errNo = XML_RELAXNG_ERR_INTERNAL;
+ ctxt->pstate = -1;
+ return;
+ }
+ if (node->type != XML_ELEMENT_NODE) {
+ VALID_ERR(XML_RELAXNG_ERR_NOTELEM);
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ ctxt->pstate = -1;
+ return;
+ }
+ if (define->contModel == NULL) {
+ /*
+ * this node cannot be validated in a streamable fashion
+ */
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext,
+ "Element '%s' validation is not streamable\n",
+ token);
+#endif
+ ctxt->pstate = 0;
+ ctxt->pdef = define;
+ return;
+ }
+ exec = xmlRegNewExecCtxt(define->contModel,
+ xmlRelaxNGValidateProgressiveCallback, ctxt);
+ if (exec == NULL) {
+ ctxt->pstate = -1;
+ return;
+ }
+ xmlRelaxNGElemPush(ctxt, exec);
+
+ /*
+ * Validate the attributes part of the content.
+ */
+ state = xmlRelaxNGNewValidState(ctxt, node);
+ if (state == NULL) {
+ ctxt->pstate = -1;
+ return;
+ }
+ oldstate = ctxt->state;
+ ctxt->state = state;
+ if (define->attrs != NULL) {
+ ret = xmlRelaxNGValidateAttributeList(ctxt, define->attrs);
+ if (ret != 0) {
+ ctxt->pstate = -1;
+ VALID_ERR2(XML_RELAXNG_ERR_ATTRVALID, node->name);
+ }
+ }
+ if (ctxt->state != NULL) {
+ ctxt->state->seq = NULL;
+ ret = xmlRelaxNGValidateElementEnd(ctxt, 1);
+ if (ret != 0) {
+ ctxt->pstate = -1;
+ }
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ } else if (ctxt->states != NULL) {
+ int tmp = -1, i;
+
+ oldflags = ctxt->flags;
+
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ state = ctxt->states->tabState[i];
+ ctxt->state = state;
+ ctxt->state->seq = NULL;
+
+ if (xmlRelaxNGValidateElementEnd(ctxt, 0) == 0) {
+ tmp = 0;
+ break;
+ }
+ }
+ if (tmp != 0) {
+ /*
+ * validation error, log the message for the "best" one
+ */
+ ctxt->flags |= FLAGS_IGNORABLE;
+ xmlRelaxNGLogBestError(ctxt);
+ }
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[i]);
+ }
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ if ((ret == 0) && (tmp == -1))
+ ctxt->pstate = -1;
+ ctxt->flags = oldflags;
+ }
+ if (ctxt->pstate == -1) {
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0) {
+ xmlRelaxNGDumpValidError(ctxt);
+ }
+ }
+ ctxt->state = oldstate;
+}
+
+/**
+ * xmlRelaxNGValidatePushElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Push a new element start on the RelaxNG validation stack.
+ *
+ * returns 1 if no validation problem was found or 0 if validating the
+ * element requires a full node, and -1 in case of error.
+ */
+int
+xmlRelaxNGValidatePushElement(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNodePtr elem)
+{
+ int ret = 1;
+
+ if ((ctxt == NULL) || (elem == NULL))
+ return (-1);
+
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext, "PushElem %s\n", elem->name);
+#endif
+ if (ctxt->elem == 0) {
+ xmlRelaxNGPtr schema;
+ xmlRelaxNGGrammarPtr grammar;
+ xmlRegExecCtxtPtr exec;
+ xmlRelaxNGDefinePtr define;
+
+ schema = ctxt->schema;
+ if (schema == NULL) {
+ VALID_ERR(XML_RELAXNG_ERR_NOGRAMMAR);
+ return (-1);
+ }
+ grammar = schema->topgrammar;
+ if ((grammar == NULL) || (grammar->start == NULL)) {
+ VALID_ERR(XML_RELAXNG_ERR_NOGRAMMAR);
+ return (-1);
+ }
+ define = grammar->start;
+ if (define->contModel == NULL) {
+ ctxt->pdef = define;
+ return (0);
+ }
+ exec = xmlRegNewExecCtxt(define->contModel,
+ xmlRelaxNGValidateProgressiveCallback,
+ ctxt);
+ if (exec == NULL) {
+ return (-1);
+ }
+ xmlRelaxNGElemPush(ctxt, exec);
+ }
+ ctxt->pnode = elem;
+ ctxt->pstate = 0;
+ if (elem->ns != NULL) {
+ ret =
+ xmlRegExecPushString2(ctxt->elem, elem->name, elem->ns->href,
+ ctxt);
+ } else {
+ ret = xmlRegExecPushString(ctxt->elem, elem->name, ctxt);
+ }
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMWRONG, elem->name);
+ } else {
+ if (ctxt->pstate == 0)
+ ret = 0;
+ else if (ctxt->pstate < 0)
+ ret = -1;
+ else
+ ret = 1;
+ }
+#ifdef DEBUG_PROGRESSIVE
+ if (ret < 0)
+ xmlGenericError(xmlGenericErrorContext, "PushElem %s failed\n",
+ elem->name);
+#endif
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidatePushCData:
+ * @ctxt: the RelaxNG validation context
+ * @data: some character data read
+ * @len: the length of the data
+ *
+ * check the CData parsed for validation in the current stack
+ *
+ * returns 1 if no validation problem was found or -1 otherwise
+ */
+int
+xmlRelaxNGValidatePushCData(xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar * data, int len ATTRIBUTE_UNUSED)
+{
+ int ret = 1;
+
+ if ((ctxt == NULL) || (ctxt->elem == NULL) || (data == NULL))
+ return (-1);
+
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext, "CDATA %s %d\n", data, len);
+#endif
+
+ while (*data != 0) {
+ if (!IS_BLANK_CH(*data))
+ break;
+ data++;
+ }
+ if (*data == 0)
+ return (1);
+
+ ret = xmlRegExecPushString(ctxt->elem, BAD_CAST "#text", ctxt);
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_TEXTWRONG, BAD_CAST " TODO ");
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext, "CDATA failed\n");
+#endif
+
+ return (-1);
+ }
+ return (1);
+}
+
+/**
+ * xmlRelaxNGValidatePopElement:
+ * @ctxt: the RelaxNG validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Pop the element end from the RelaxNG validation stack.
+ *
+ * returns 1 if no validation problem was found or 0 otherwise
+ */
+int
+xmlRelaxNGValidatePopElement(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNodePtr elem)
+{
+ int ret;
+ xmlRegExecCtxtPtr exec;
+
+ if ((ctxt == NULL) || (ctxt->elem == NULL) || (elem == NULL))
+ return (-1);
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext, "PopElem %s\n", elem->name);
+#endif
+ /*
+ * verify that we reached a terminal state of the content model.
+ */
+ exec = xmlRelaxNGElemPop(ctxt);
+ ret = xmlRegExecPushString(exec, NULL, NULL);
+ if (ret == 0) {
+ /*
+ * TODO: get some of the names needed to exit the current state of exec
+ */
+ VALID_ERR2(XML_RELAXNG_ERR_NOELEM, BAD_CAST "");
+ ret = -1;
+ } else if (ret < 0) {
+ ret = -1;
+ } else {
+ ret = 1;
+ }
+ xmlRegFreeExecCtxt(exec);
+#ifdef DEBUG_PROGRESSIVE
+ if (ret < 0)
+ xmlGenericError(xmlGenericErrorContext, "PopElem %s failed\n",
+ elem->name);
+#endif
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateFullElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Validate a full subtree when xmlRelaxNGValidatePushElement() returned
+ * 0 and the content of the node has been expanded.
+ *
+ * returns 1 if no validation problem was found or -1 in case of error.
+ */
+int
+xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNodePtr elem)
+{
+ int ret;
+ xmlRelaxNGValidStatePtr state;
+
+ if ((ctxt == NULL) || (ctxt->pdef == NULL) || (elem == NULL))
+ return (-1);
+#ifdef DEBUG_PROGRESSIVE
+ xmlGenericError(xmlGenericErrorContext, "FullElem %s\n", elem->name);
+#endif
+ state = xmlRelaxNGNewValidState(ctxt, elem->parent);
+ if (state == NULL) {
+ return (-1);
+ }
+ state->seq = elem;
+ ctxt->state = state;
+ ctxt->errNo = XML_RELAXNG_OK;
+ ret = xmlRelaxNGValidateDefinition(ctxt, ctxt->pdef);
+ if ((ret != 0) || (ctxt->errNo != XML_RELAXNG_OK))
+ ret = -1;
+ else
+ ret = 1;
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+#ifdef DEBUG_PROGRESSIVE
+ if (ret < 0)
+ xmlGenericError(xmlGenericErrorContext, "FullElem %s failed\n",
+ elem->name);
+#endif
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Generic interpreted validation implementation *
+ * *
+ ************************************************************************/
+static int xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define);
+
+/**
+ * xmlRelaxNGSkipIgnored:
+ * @ctxt: a schema validation context
+ * @node: the top node.
+ *
+ * Skip ignorable nodes in that context
+ *
+ * Returns the new sibling or NULL in case of error.
+ */
+static xmlNodePtr
+xmlRelaxNGSkipIgnored(xmlRelaxNGValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlNodePtr node)
+{
+ /*
+ * TODO complete and handle entities
+ */
+ while ((node != NULL) &&
+ ((node->type == XML_COMMENT_NODE) ||
+ (node->type == XML_PI_NODE) ||
+ (node->type == XML_XINCLUDE_START) ||
+ (node->type == XML_XINCLUDE_END) ||
+ (((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) &&
+ ((ctxt->flags & FLAGS_MIXED_CONTENT) ||
+ (IS_BLANK_NODE(node)))))) {
+ node = node->next;
+ }
+ return (node);
+}
+
+/**
+ * xmlRelaxNGNormalize:
+ * @ctxt: a schema validation context
+ * @str: the string to normalize
+ *
+ * Implements the normalizeWhiteSpace( s ) function from
+ * section 6.2.9 of the spec
+ *
+ * Returns the new string or NULL in case of error.
+ */
+static xmlChar *
+xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt, const xmlChar * str)
+{
+ xmlChar *ret, *p;
+ const xmlChar *tmp;
+ int len;
+
+ if (str == NULL)
+ return (NULL);
+ tmp = str;
+ while (*tmp != 0)
+ tmp++;
+ len = tmp - str;
+
+ ret = (xmlChar *) xmlMallocAtomic((len + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ return (NULL);
+ }
+ p = ret;
+ while (IS_BLANK_CH(*str))
+ str++;
+ while (*str != 0) {
+ if (IS_BLANK_CH(*str)) {
+ while (IS_BLANK_CH(*str))
+ str++;
+ if (*str == 0)
+ break;
+ *p++ = ' ';
+ } else
+ *p++ = *str++;
+ }
+ *p = 0;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateDatatype:
+ * @ctxt: a Relax-NG validation context
+ * @value: the string value
+ * @type: the datatype definition
+ * @node: the node
+ *
+ * Validate the given value against the dataype
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateDatatype(xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar * value,
+ xmlRelaxNGDefinePtr define, xmlNodePtr node)
+{
+ int ret, tmp;
+ xmlRelaxNGTypeLibraryPtr lib;
+ void *result = NULL;
+ xmlRelaxNGDefinePtr cur;
+
+ if ((define == NULL) || (define->data == NULL)) {
+ return (-1);
+ }
+ lib = (xmlRelaxNGTypeLibraryPtr) define->data;
+ if (lib->check != NULL) {
+ if ((define->attrs != NULL) &&
+ (define->attrs->type == XML_RELAXNG_PARAM)) {
+ ret =
+ lib->check(lib->data, define->name, value, &result, node);
+ } else {
+ ret = lib->check(lib->data, define->name, value, NULL, node);
+ }
+ } else
+ ret = -1;
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_TYPE, define->name);
+ if ((result != NULL) && (lib != NULL) && (lib->freef != NULL))
+ lib->freef(lib->data, result);
+ return (-1);
+ } else if (ret == 1) {
+ ret = 0;
+ } else if (ret == 2) {
+ VALID_ERR2P(XML_RELAXNG_ERR_DUPID, value);
+ } else {
+ VALID_ERR3P(XML_RELAXNG_ERR_TYPEVAL, define->name, value);
+ ret = -1;
+ }
+ cur = define->attrs;
+ while ((ret == 0) && (cur != NULL) && (cur->type == XML_RELAXNG_PARAM)) {
+ if (lib->facet != NULL) {
+ tmp = lib->facet(lib->data, define->name, cur->name,
+ cur->value, value, result);
+ if (tmp != 0)
+ ret = -1;
+ }
+ cur = cur->next;
+ }
+ if ((ret == 0) && (define->content != NULL)) {
+ const xmlChar *oldvalue, *oldendvalue;
+
+ oldvalue = ctxt->state->value;
+ oldendvalue = ctxt->state->endvalue;
+ ctxt->state->value = (xmlChar *) value;
+ ctxt->state->endvalue = NULL;
+ ret = xmlRelaxNGValidateValue(ctxt, define->content);
+ ctxt->state->value = (xmlChar *) oldvalue;
+ ctxt->state->endvalue = (xmlChar *) oldendvalue;
+ }
+ if ((result != NULL) && (lib != NULL) && (lib->freef != NULL))
+ lib->freef(lib->data, result);
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGNextValue:
+ * @ctxt: a Relax-NG validation context
+ *
+ * Skip to the next value when validating within a list
+ *
+ * Returns 0 if the operation succeeded or an error code.
+ */
+static int
+xmlRelaxNGNextValue(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ xmlChar *cur;
+
+ cur = ctxt->state->value;
+ if ((cur == NULL) || (ctxt->state->endvalue == NULL)) {
+ ctxt->state->value = NULL;
+ ctxt->state->endvalue = NULL;
+ return (0);
+ }
+ while (*cur != 0)
+ cur++;
+ while ((cur != ctxt->state->endvalue) && (*cur == 0))
+ cur++;
+ if (cur == ctxt->state->endvalue)
+ ctxt->state->value = NULL;
+ else
+ ctxt->state->value = cur;
+ return (0);
+}
+
+/**
+ * xmlRelaxNGValidateValueList:
+ * @ctxt: a Relax-NG validation context
+ * @defines: the list of definitions to verify
+ *
+ * Validate the given set of definitions for the current value
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateValueList(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr defines)
+{
+ int ret = 0;
+
+ while (defines != NULL) {
+ ret = xmlRelaxNGValidateValue(ctxt, defines);
+ if (ret != 0)
+ break;
+ defines = defines->next;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateValue:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to verify
+ *
+ * Validate the given definition for the current value
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define)
+{
+ int ret = 0, oldflags;
+ xmlChar *value;
+
+ value = ctxt->state->value;
+ switch (define->type) {
+ case XML_RELAXNG_EMPTY:{
+ if ((value != NULL) && (value[0] != 0)) {
+ int idx = 0;
+
+ while (IS_BLANK_CH(value[idx]))
+ idx++;
+ if (value[idx] != 0)
+ ret = -1;
+ }
+ break;
+ }
+ case XML_RELAXNG_TEXT:
+ break;
+ case XML_RELAXNG_VALUE:{
+ if (!xmlStrEqual(value, define->value)) {
+ if (define->name != NULL) {
+ xmlRelaxNGTypeLibraryPtr lib;
+
+ lib = (xmlRelaxNGTypeLibraryPtr) define->data;
+ if ((lib != NULL) && (lib->comp != NULL)) {
+ ret = lib->comp(lib->data, define->name,
+ define->value, define->node,
+ (void *) define->attrs,
+ value, ctxt->state->node);
+ } else
+ ret = -1;
+ if (ret < 0) {
+ VALID_ERR2(XML_RELAXNG_ERR_TYPECMP,
+ define->name);
+ return (-1);
+ } else if (ret == 1) {
+ ret = 0;
+ } else {
+ ret = -1;
+ }
+ } else {
+ xmlChar *nval, *nvalue;
+
+ /*
+ * TODO: trivial optimizations are possible by
+ * computing at compile-time
+ */
+ nval = xmlRelaxNGNormalize(ctxt, define->value);
+ nvalue = xmlRelaxNGNormalize(ctxt, value);
+
+ if ((nval == NULL) || (nvalue == NULL) ||
+ (!xmlStrEqual(nval, nvalue)))
+ ret = -1;
+ if (nval != NULL)
+ xmlFree(nval);
+ if (nvalue != NULL)
+ xmlFree(nvalue);
+ }
+ }
+ if (ret == 0)
+ xmlRelaxNGNextValue(ctxt);
+ break;
+ }
+ case XML_RELAXNG_DATATYPE:{
+ ret = xmlRelaxNGValidateDatatype(ctxt, value, define,
+ ctxt->state->seq);
+ if (ret == 0)
+ xmlRelaxNGNextValue(ctxt);
+
+ break;
+ }
+ case XML_RELAXNG_CHOICE:{
+ xmlRelaxNGDefinePtr list = define->content;
+ xmlChar *oldvalue;
+
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+
+ oldvalue = ctxt->state->value;
+ while (list != NULL) {
+ ret = xmlRelaxNGValidateValue(ctxt, list);
+ if (ret == 0) {
+ break;
+ }
+ ctxt->state->value = oldvalue;
+ list = list->next;
+ }
+ ctxt->flags = oldflags;
+ if (ret != 0) {
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ } else {
+ if (ctxt->errNr > 0)
+ xmlRelaxNGPopErrors(ctxt, 0);
+ }
+ break;
+ }
+ case XML_RELAXNG_LIST:{
+ xmlRelaxNGDefinePtr list = define->content;
+ xmlChar *oldvalue, *oldend, *val, *cur;
+
+#ifdef DEBUG_LIST
+ int nb_values = 0;
+#endif
+
+ oldvalue = ctxt->state->value;
+ oldend = ctxt->state->endvalue;
+
+ val = xmlStrdup(oldvalue);
+ if (val == NULL) {
+ val = xmlStrdup(BAD_CAST "");
+ }
+ if (val == NULL) {
+ VALID_ERR(XML_RELAXNG_ERR_NOSTATE);
+ return (-1);
+ }
+ cur = val;
+ while (*cur != 0) {
+ if (IS_BLANK_CH(*cur)) {
+ *cur = 0;
+ cur++;
+#ifdef DEBUG_LIST
+ nb_values++;
+#endif
+ while (IS_BLANK_CH(*cur))
+ *cur++ = 0;
+ } else
+ cur++;
+ }
+#ifdef DEBUG_LIST
+ xmlGenericError(xmlGenericErrorContext,
+ "list value: '%s' found %d items\n",
+ oldvalue, nb_values);
+ nb_values = 0;
+#endif
+ ctxt->state->endvalue = cur;
+ cur = val;
+ while ((*cur == 0) && (cur != ctxt->state->endvalue))
+ cur++;
+
+ ctxt->state->value = cur;
+
+ while (list != NULL) {
+ if (ctxt->state->value == ctxt->state->endvalue)
+ ctxt->state->value = NULL;
+ ret = xmlRelaxNGValidateValue(ctxt, list);
+ if (ret != 0) {
+#ifdef DEBUG_LIST
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to validate value: '%s' with %d rule\n",
+ ctxt->state->value, nb_values);
+#endif
+ break;
+ }
+#ifdef DEBUG_LIST
+ nb_values++;
+#endif
+ list = list->next;
+ }
+
+ if ((ret == 0) && (ctxt->state->value != NULL) &&
+ (ctxt->state->value != ctxt->state->endvalue)) {
+ VALID_ERR2(XML_RELAXNG_ERR_LISTEXTRA,
+ ctxt->state->value);
+ ret = -1;
+ }
+ xmlFree(val);
+ ctxt->state->value = oldvalue;
+ ctxt->state->endvalue = oldend;
+ break;
+ }
+ case XML_RELAXNG_ONEORMORE:
+ ret = xmlRelaxNGValidateValueList(ctxt, define->content);
+ if (ret != 0) {
+ break;
+ }
+ /* no break on purpose */
+ case XML_RELAXNG_ZEROORMORE:{
+ xmlChar *cur, *temp;
+
+ if ((ctxt->state->value == NULL) ||
+ (*ctxt->state->value == 0)) {
+ ret = 0;
+ break;
+ }
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ cur = ctxt->state->value;
+ temp = NULL;
+ while ((cur != NULL) && (cur != ctxt->state->endvalue) &&
+ (temp != cur)) {
+ temp = cur;
+ ret =
+ xmlRelaxNGValidateValueList(ctxt, define->content);
+ if (ret != 0) {
+ ctxt->state->value = temp;
+ ret = 0;
+ break;
+ }
+ cur = ctxt->state->value;
+ }
+ ctxt->flags = oldflags;
+ if (ctxt->errNr > 0)
+ xmlRelaxNGPopErrors(ctxt, 0);
+ break;
+ }
+ case XML_RELAXNG_OPTIONAL:{
+ xmlChar *temp;
+
+ if ((ctxt->state->value == NULL) ||
+ (*ctxt->state->value == 0)) {
+ ret = 0;
+ break;
+ }
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ temp = ctxt->state->value;
+ ret = xmlRelaxNGValidateValue(ctxt, define->content);
+ ctxt->flags = oldflags;
+ if (ret != 0) {
+ ctxt->state->value = temp;
+ if (ctxt->errNr > 0)
+ xmlRelaxNGPopErrors(ctxt, 0);
+ ret = 0;
+ break;
+ }
+ if (ctxt->errNr > 0)
+ xmlRelaxNGPopErrors(ctxt, 0);
+ break;
+ }
+ case XML_RELAXNG_EXCEPT:{
+ xmlRelaxNGDefinePtr list;
+
+ list = define->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGValidateValue(ctxt, list);
+ if (ret == 0) {
+ ret = -1;
+ break;
+ } else
+ ret = 0;
+ list = list->next;
+ }
+ break;
+ }
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_GROUP:{
+ xmlRelaxNGDefinePtr list;
+
+ list = define->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGValidateValue(ctxt, list);
+ if (ret != 0) {
+ ret = -1;
+ break;
+ } else
+ ret = 0;
+ list = list->next;
+ }
+ break;
+ }
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_PARENTREF:
+ if (define->content == NULL) {
+ VALID_ERR(XML_RELAXNG_ERR_NODEFINE);
+ ret = -1;
+ } else {
+ ret = xmlRelaxNGValidateValue(ctxt, define->content);
+ }
+ break;
+ default:
+ TODO ret = -1;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateValueContent:
+ * @ctxt: a Relax-NG validation context
+ * @defines: the list of definitions to verify
+ *
+ * Validate the given definitions for the current value
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateValueContent(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr defines)
+{
+ int ret = 0;
+
+ while (defines != NULL) {
+ ret = xmlRelaxNGValidateValue(ctxt, defines);
+ if (ret != 0)
+ break;
+ defines = defines->next;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGAttributeMatch:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to check
+ * @prop: the attribute
+ *
+ * Check if the attribute matches the definition nameClass
+ *
+ * Returns 1 if the attribute matches, 0 if no, or -1 in case of error
+ */
+static int
+xmlRelaxNGAttributeMatch(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define, xmlAttrPtr prop)
+{
+ int ret;
+
+ if (define->name != NULL) {
+ if (!xmlStrEqual(define->name, prop->name))
+ return (0);
+ }
+ if (define->ns != NULL) {
+ if (define->ns[0] == 0) {
+ if (prop->ns != NULL)
+ return (0);
+ } else {
+ if ((prop->ns == NULL) ||
+ (!xmlStrEqual(define->ns, prop->ns->href)))
+ return (0);
+ }
+ }
+ if (define->nameClass == NULL)
+ return (1);
+ define = define->nameClass;
+ if (define->type == XML_RELAXNG_EXCEPT) {
+ xmlRelaxNGDefinePtr list;
+
+ list = define->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGAttributeMatch(ctxt, list, prop);
+ if (ret == 1)
+ return (0);
+ if (ret < 0)
+ return (ret);
+ list = list->next;
+ }
+ } else if (define->type == XML_RELAXNG_CHOICE) {
+ xmlRelaxNGDefinePtr list;
+
+ list = define->nameClass;
+ while (list != NULL) {
+ ret = xmlRelaxNGAttributeMatch(ctxt, list, prop);
+ if (ret == 1)
+ return (1);
+ if (ret < 0)
+ return (ret);
+ list = list->next;
+ }
+ return (0);
+ } else {
+ TODO}
+ return (1);
+}
+
+/**
+ * xmlRelaxNGValidateAttribute:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to verify
+ *
+ * Validate the given attribute definition for that node
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateAttribute(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define)
+{
+ int ret = 0, i;
+ xmlChar *value, *oldvalue;
+ xmlAttrPtr prop = NULL, tmp;
+ xmlNodePtr oldseq;
+
+ if (ctxt->state->nbAttrLeft <= 0)
+ return (-1);
+ if (define->name != NULL) {
+ for (i = 0; i < ctxt->state->nbAttrs; i++) {
+ tmp = ctxt->state->attrs[i];
+ if ((tmp != NULL) && (xmlStrEqual(define->name, tmp->name))) {
+ if ((((define->ns == NULL) || (define->ns[0] == 0)) &&
+ (tmp->ns == NULL)) ||
+ ((tmp->ns != NULL) &&
+ (xmlStrEqual(define->ns, tmp->ns->href)))) {
+ prop = tmp;
+ break;
+ }
+ }
+ }
+ if (prop != NULL) {
+ value = xmlNodeListGetString(prop->doc, prop->children, 1);
+ oldvalue = ctxt->state->value;
+ oldseq = ctxt->state->seq;
+ ctxt->state->seq = (xmlNodePtr) prop;
+ ctxt->state->value = value;
+ ctxt->state->endvalue = NULL;
+ ret = xmlRelaxNGValidateValueContent(ctxt, define->content);
+ if (ctxt->state->value != NULL)
+ value = ctxt->state->value;
+ if (value != NULL)
+ xmlFree(value);
+ ctxt->state->value = oldvalue;
+ ctxt->state->seq = oldseq;
+ if (ret == 0) {
+ /*
+ * flag the attribute as processed
+ */
+ ctxt->state->attrs[i] = NULL;
+ ctxt->state->nbAttrLeft--;
+ }
+ } else {
+ ret = -1;
+ }
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGValidateAttribute(%s): %d\n",
+ define->name, ret);
+#endif
+ } else {
+ for (i = 0; i < ctxt->state->nbAttrs; i++) {
+ tmp = ctxt->state->attrs[i];
+ if ((tmp != NULL) &&
+ (xmlRelaxNGAttributeMatch(ctxt, define, tmp) == 1)) {
+ prop = tmp;
+ break;
+ }
+ }
+ if (prop != NULL) {
+ value = xmlNodeListGetString(prop->doc, prop->children, 1);
+ oldvalue = ctxt->state->value;
+ oldseq = ctxt->state->seq;
+ ctxt->state->seq = (xmlNodePtr) prop;
+ ctxt->state->value = value;
+ ret = xmlRelaxNGValidateValueContent(ctxt, define->content);
+ if (ctxt->state->value != NULL)
+ value = ctxt->state->value;
+ if (value != NULL)
+ xmlFree(value);
+ ctxt->state->value = oldvalue;
+ ctxt->state->seq = oldseq;
+ if (ret == 0) {
+ /*
+ * flag the attribute as processed
+ */
+ ctxt->state->attrs[i] = NULL;
+ ctxt->state->nbAttrLeft--;
+ }
+ } else {
+ ret = -1;
+ }
+#ifdef DEBUG
+ if (define->ns != NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGValidateAttribute(nsName ns = %s): %d\n",
+ define->ns, ret);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGValidateAttribute(anyName): %d\n",
+ ret);
+ }
+#endif
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateAttributeList:
+ * @ctxt: a Relax-NG validation context
+ * @define: the list of definition to verify
+ *
+ * Validate the given node against the list of attribute definitions
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr defines)
+{
+ int ret = 0, res;
+ int needmore = 0;
+ xmlRelaxNGDefinePtr cur;
+
+ cur = defines;
+ while (cur != NULL) {
+ if (cur->type == XML_RELAXNG_ATTRIBUTE) {
+ if (xmlRelaxNGValidateAttribute(ctxt, cur) != 0)
+ ret = -1;
+ } else
+ needmore = 1;
+ cur = cur->next;
+ }
+ if (!needmore)
+ return (ret);
+ cur = defines;
+ while (cur != NULL) {
+ if (cur->type != XML_RELAXNG_ATTRIBUTE) {
+ if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
+ res = xmlRelaxNGValidateDefinition(ctxt, cur);
+ if (res < 0)
+ ret = -1;
+ } else {
+ VALID_ERR(XML_RELAXNG_ERR_NOSTATE);
+ return (-1);
+ }
+ if (res == -1) /* continues on -2 */
+ break;
+ }
+ cur = cur->next;
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGNodeMatchesList:
+ * @node: the node
+ * @list: a NULL terminated array of definitions
+ *
+ * Check if a node can be matched by one of the definitions
+ *
+ * Returns 1 if matches 0 otherwise
+ */
+static int
+xmlRelaxNGNodeMatchesList(xmlNodePtr node, xmlRelaxNGDefinePtr * list)
+{
+ xmlRelaxNGDefinePtr cur;
+ int i = 0, tmp;
+
+ if ((node == NULL) || (list == NULL))
+ return (0);
+
+ cur = list[i++];
+ while (cur != NULL) {
+ if ((node->type == XML_ELEMENT_NODE) &&
+ (cur->type == XML_RELAXNG_ELEMENT)) {
+ tmp = xmlRelaxNGElementMatch(NULL, cur, node);
+ if (tmp == 1)
+ return (1);
+ } else if (((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) &&
+ (cur->type == XML_RELAXNG_TEXT)) {
+ return (1);
+ }
+ cur = list[i++];
+ }
+ return (0);
+}
+
+/**
+ * xmlRelaxNGValidateInterleave:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to verify
+ *
+ * Validate an interleave definition for a node.
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define)
+{
+ int ret = 0, i, nbgroups;
+ int errNr = ctxt->errNr;
+ int oldflags;
+
+ xmlRelaxNGValidStatePtr oldstate;
+ xmlRelaxNGPartitionPtr partitions;
+ xmlRelaxNGInterleaveGroupPtr group = NULL;
+ xmlNodePtr cur, start, last = NULL, lastchg = NULL, lastelem;
+ xmlNodePtr *list = NULL, *lasts = NULL;
+
+ if (define->data != NULL) {
+ partitions = (xmlRelaxNGPartitionPtr) define->data;
+ nbgroups = partitions->nbgroups;
+ } else {
+ VALID_ERR(XML_RELAXNG_ERR_INTERNODATA);
+ return (-1);
+ }
+ /*
+ * Optimizations for MIXED
+ */
+ oldflags = ctxt->flags;
+ if (define->dflags & IS_MIXED) {
+ ctxt->flags |= FLAGS_MIXED_CONTENT;
+ if (nbgroups == 2) {
+ /*
+ * this is a pure <mixed> case
+ */
+ if (ctxt->state != NULL)
+ ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt,
+ ctxt->state->seq);
+ if (partitions->groups[0]->rule->type == XML_RELAXNG_TEXT)
+ ret = xmlRelaxNGValidateDefinition(ctxt,
+ partitions->groups[1]->
+ rule);
+ else
+ ret = xmlRelaxNGValidateDefinition(ctxt,
+ partitions->groups[0]->
+ rule);
+ if (ret == 0) {
+ if (ctxt->state != NULL)
+ ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt,
+ ctxt->state->
+ seq);
+ }
+ ctxt->flags = oldflags;
+ return (ret);
+ }
+ }
+
+ /*
+ * Build arrays to store the first and last node of the chain
+ * pertaining to each group
+ */
+ list = (xmlNodePtr *) xmlMalloc(nbgroups * sizeof(xmlNodePtr));
+ if (list == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ return (-1);
+ }
+ memset(list, 0, nbgroups * sizeof(xmlNodePtr));
+ lasts = (xmlNodePtr *) xmlMalloc(nbgroups * sizeof(xmlNodePtr));
+ if (lasts == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ return (-1);
+ }
+ memset(lasts, 0, nbgroups * sizeof(xmlNodePtr));
+
+ /*
+ * Walk the sequence of children finding the right group and
+ * sorting them in sequences.
+ */
+ cur = ctxt->state->seq;
+ cur = xmlRelaxNGSkipIgnored(ctxt, cur);
+ start = cur;
+ while (cur != NULL) {
+ ctxt->state->seq = cur;
+ if ((partitions->triage != NULL) &&
+ (partitions->flags & IS_DETERMINIST)) {
+ void *tmp = NULL;
+
+ if ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ tmp = xmlHashLookup2(partitions->triage, BAD_CAST "#text",
+ NULL);
+ } else if (cur->type == XML_ELEMENT_NODE) {
+ if (cur->ns != NULL) {
+ tmp = xmlHashLookup2(partitions->triage, cur->name,
+ cur->ns->href);
+ if (tmp == NULL)
+ tmp = xmlHashLookup2(partitions->triage,
+ BAD_CAST "#any",
+ cur->ns->href);
+ } else
+ tmp =
+ xmlHashLookup2(partitions->triage, cur->name,
+ NULL);
+ if (tmp == NULL)
+ tmp =
+ xmlHashLookup2(partitions->triage, BAD_CAST "#any",
+ NULL);
+ }
+
+ if (tmp == NULL) {
+ i = nbgroups;
+ } else {
+ i = ((long) tmp) - 1;
+ if (partitions->flags & IS_NEEDCHECK) {
+ group = partitions->groups[i];
+ if (!xmlRelaxNGNodeMatchesList(cur, group->defs))
+ i = nbgroups;
+ }
+ }
+ } else {
+ for (i = 0; i < nbgroups; i++) {
+ group = partitions->groups[i];
+ if (group == NULL)
+ continue;
+ if (xmlRelaxNGNodeMatchesList(cur, group->defs))
+ break;
+ }
+ }
+ /*
+ * We break as soon as an element not matched is found
+ */
+ if (i >= nbgroups) {
+ break;
+ }
+ if (lasts[i] != NULL) {
+ lasts[i]->next = cur;
+ lasts[i] = cur;
+ } else {
+ list[i] = cur;
+ lasts[i] = cur;
+ }
+ if (cur->next != NULL)
+ lastchg = cur->next;
+ else
+ lastchg = cur;
+ cur = xmlRelaxNGSkipIgnored(ctxt, cur->next);
+ }
+ if (ret != 0) {
+ VALID_ERR(XML_RELAXNG_ERR_INTERSEQ);
+ ret = -1;
+ goto done;
+ }
+ lastelem = cur;
+ oldstate = ctxt->state;
+ for (i = 0; i < nbgroups; i++) {
+ ctxt->state = xmlRelaxNGCopyValidState(ctxt, oldstate);
+ if (ctxt->state == NULL) {
+ ret = -1;
+ break;
+ }
+ group = partitions->groups[i];
+ if (lasts[i] != NULL) {
+ last = lasts[i]->next;
+ lasts[i]->next = NULL;
+ }
+ ctxt->state->seq = list[i];
+ ret = xmlRelaxNGValidateDefinition(ctxt, group->rule);
+ if (ret != 0)
+ break;
+ if (ctxt->state != NULL) {
+ cur = ctxt->state->seq;
+ cur = xmlRelaxNGSkipIgnored(ctxt, cur);
+ xmlRelaxNGFreeValidState(ctxt, oldstate);
+ oldstate = ctxt->state;
+ ctxt->state = NULL;
+ if (cur != NULL) {
+ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
+ ret = -1;
+ ctxt->state = oldstate;
+ goto done;
+ }
+ } else if (ctxt->states != NULL) {
+ int j;
+ int found = 0;
+ int best = -1;
+ int lowattr = -1;
+
+ /*
+ * PBM: what happen if there is attributes checks in the interleaves
+ */
+
+ for (j = 0; j < ctxt->states->nbState; j++) {
+ cur = ctxt->states->tabState[j]->seq;
+ cur = xmlRelaxNGSkipIgnored(ctxt, cur);
+ if (cur == NULL) {
+ if (found == 0) {
+ lowattr = ctxt->states->tabState[j]->nbAttrLeft;
+ best = j;
+ }
+ found = 1;
+ if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
+ /* try to keep the latest one to mach old heuristic */
+ lowattr = ctxt->states->tabState[j]->nbAttrLeft;
+ best = j;
+ }
+ if (lowattr == 0)
+ break;
+ } else if (found == 0) {
+ if (lowattr == -1) {
+ lowattr = ctxt->states->tabState[j]->nbAttrLeft;
+ best = j;
+ } else
+ if (ctxt->states->tabState[j]->nbAttrLeft <= lowattr) {
+ /* try to keep the latest one to mach old heuristic */
+ lowattr = ctxt->states->tabState[j]->nbAttrLeft;
+ best = j;
+ }
+ }
+ }
+ /*
+ * BIG PBM: here we pick only one restarting point :-(
+ */
+ if (ctxt->states->nbState > 0) {
+ xmlRelaxNGFreeValidState(ctxt, oldstate);
+ if (best != -1) {
+ oldstate = ctxt->states->tabState[best];
+ ctxt->states->tabState[best] = NULL;
+ } else {
+ oldstate =
+ ctxt->states->tabState[ctxt->states->nbState - 1];
+ ctxt->states->tabState[ctxt->states->nbState - 1] = NULL;
+ ctxt->states->nbState--;
+ }
+ }
+ for (j = 0; j < ctxt->states->nbState ; j++) {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->states->tabState[j]);
+ }
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ if (found == 0) {
+ if (cur == NULL) {
+ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA,
+ (const xmlChar *) "noname");
+ } else {
+ VALID_ERR2(XML_RELAXNG_ERR_INTEREXTRA, cur->name);
+ }
+ ret = -1;
+ ctxt->state = oldstate;
+ goto done;
+ }
+ } else {
+ ret = -1;
+ break;
+ }
+ if (lasts[i] != NULL) {
+ lasts[i]->next = last;
+ }
+ }
+ if (ctxt->state != NULL)
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = oldstate;
+ ctxt->state->seq = lastelem;
+ if (ret != 0) {
+ VALID_ERR(XML_RELAXNG_ERR_INTERSEQ);
+ ret = -1;
+ goto done;
+ }
+
+ done:
+ ctxt->flags = oldflags;
+ /*
+ * builds the next links chain from the prev one
+ */
+ cur = lastchg;
+ while (cur != NULL) {
+ if ((cur == start) || (cur->prev == NULL))
+ break;
+ cur->prev->next = cur;
+ cur = cur->prev;
+ }
+ if (ret == 0) {
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ }
+
+ xmlFree(list);
+ xmlFree(lasts);
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateDefinitionList:
+ * @ctxt: a Relax-NG validation context
+ * @define: the list of definition to verify
+ *
+ * Validate the given node content against the (list) of definitions
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateDefinitionList(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr defines)
+{
+ int ret = 0, res;
+
+
+ if (defines == NULL) {
+ VALID_ERR2(XML_RELAXNG_ERR_INTERNAL,
+ BAD_CAST "NULL definition list");
+ return (-1);
+ }
+ while (defines != NULL) {
+ if ((ctxt->state != NULL) || (ctxt->states != NULL)) {
+ res = xmlRelaxNGValidateDefinition(ctxt, defines);
+ if (res < 0)
+ ret = -1;
+ } else {
+ VALID_ERR(XML_RELAXNG_ERR_NOSTATE);
+ return (-1);
+ }
+ if (res == -1) /* continues on -2 */
+ break;
+ defines = defines->next;
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGElementMatch:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to check
+ * @elem: the element
+ *
+ * Check if the element matches the definition nameClass
+ *
+ * Returns 1 if the element matches, 0 if no, or -1 in case of error
+ */
+static int
+xmlRelaxNGElementMatch(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define, xmlNodePtr elem)
+{
+ int ret = 0, oldflags = 0;
+
+ if (define->name != NULL) {
+ if (!xmlStrEqual(elem->name, define->name)) {
+ VALID_ERR3(XML_RELAXNG_ERR_ELEMNAME, define->name, elem->name);
+ return (0);
+ }
+ }
+ if ((define->ns != NULL) && (define->ns[0] != 0)) {
+ if (elem->ns == NULL) {
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMNONS, elem->name);
+ return (0);
+ } else if (!xmlStrEqual(elem->ns->href, define->ns)) {
+ VALID_ERR3(XML_RELAXNG_ERR_ELEMWRONGNS,
+ elem->name, define->ns);
+ return (0);
+ }
+ } else if ((elem->ns != NULL) && (define->ns != NULL) &&
+ (define->name == NULL)) {
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMEXTRANS, elem->name);
+ return (0);
+ } else if ((elem->ns != NULL) && (define->name != NULL)) {
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMEXTRANS, define->name);
+ return (0);
+ }
+
+ if (define->nameClass == NULL)
+ return (1);
+
+ define = define->nameClass;
+ if (define->type == XML_RELAXNG_EXCEPT) {
+ xmlRelaxNGDefinePtr list;
+
+ if (ctxt != NULL) {
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ }
+
+ list = define->content;
+ while (list != NULL) {
+ ret = xmlRelaxNGElementMatch(ctxt, list, elem);
+ if (ret == 1) {
+ if (ctxt != NULL)
+ ctxt->flags = oldflags;
+ return (0);
+ }
+ if (ret < 0) {
+ if (ctxt != NULL)
+ ctxt->flags = oldflags;
+ return (ret);
+ }
+ list = list->next;
+ }
+ ret = 1;
+ if (ctxt != NULL) {
+ ctxt->flags = oldflags;
+ }
+ } else if (define->type == XML_RELAXNG_CHOICE) {
+ xmlRelaxNGDefinePtr list;
+
+ if (ctxt != NULL) {
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ }
+
+ list = define->nameClass;
+ while (list != NULL) {
+ ret = xmlRelaxNGElementMatch(ctxt, list, elem);
+ if (ret == 1) {
+ if (ctxt != NULL)
+ ctxt->flags = oldflags;
+ return (1);
+ }
+ if (ret < 0) {
+ if (ctxt != NULL)
+ ctxt->flags = oldflags;
+ return (ret);
+ }
+ list = list->next;
+ }
+ if (ctxt != NULL) {
+ if (ret != 0) {
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ } else {
+ if (ctxt->errNr > 0)
+ xmlRelaxNGPopErrors(ctxt, 0);
+ }
+ }
+ ret = 0;
+ if (ctxt != NULL) {
+ ctxt->flags = oldflags;
+ }
+ } else {
+ TODO ret = -1;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGBestState:
+ * @ctxt: a Relax-NG validation context
+ *
+ * Find the "best" state in the ctxt->states list of states to report
+ * errors about. I.e. a state with no element left in the child list
+ * or the one with the less attributes left.
+ * This is called only if a falidation error was detected
+ *
+ * Returns the index of the "best" state or -1 in case of error
+ */
+static int
+xmlRelaxNGBestState(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ xmlRelaxNGValidStatePtr state;
+ int i, tmp;
+ int best = -1;
+ int value = 1000000;
+
+ if ((ctxt == NULL) || (ctxt->states == NULL) ||
+ (ctxt->states->nbState <= 0))
+ return (-1);
+
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ state = ctxt->states->tabState[i];
+ if (state == NULL)
+ continue;
+ if (state->seq != NULL) {
+ if ((best == -1) || (value > 100000)) {
+ value = 100000;
+ best = i;
+ }
+ } else {
+ tmp = state->nbAttrLeft;
+ if ((best == -1) || (value > tmp)) {
+ value = tmp;
+ best = i;
+ }
+ }
+ }
+ return (best);
+}
+
+/**
+ * xmlRelaxNGLogBestError:
+ * @ctxt: a Relax-NG validation context
+ *
+ * Find the "best" state in the ctxt->states list of states to report
+ * errors about and log it.
+ */
+static void
+xmlRelaxNGLogBestError(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ int best;
+
+ if ((ctxt == NULL) || (ctxt->states == NULL) ||
+ (ctxt->states->nbState <= 0))
+ return;
+
+ best = xmlRelaxNGBestState(ctxt);
+ if ((best >= 0) && (best < ctxt->states->nbState)) {
+ ctxt->state = ctxt->states->tabState[best];
+
+ xmlRelaxNGValidateElementEnd(ctxt, 1);
+ }
+}
+
+/**
+ * xmlRelaxNGValidateElementEnd:
+ * @ctxt: a Relax-NG validation context
+ * @dolog: indicate that error logging should be done
+ *
+ * Validate the end of the element, implements check that
+ * there is nothing left not consumed in the element content
+ * or in the attribute list.
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateElementEnd(xmlRelaxNGValidCtxtPtr ctxt, int dolog)
+{
+ int i;
+ xmlRelaxNGValidStatePtr state;
+
+ state = ctxt->state;
+ if (state->seq != NULL) {
+ state->seq = xmlRelaxNGSkipIgnored(ctxt, state->seq);
+ if (state->seq != NULL) {
+ if (dolog) {
+ VALID_ERR3(XML_RELAXNG_ERR_EXTRACONTENT,
+ state->node->name, state->seq->name);
+ }
+ return (-1);
+ }
+ }
+ for (i = 0; i < state->nbAttrs; i++) {
+ if (state->attrs[i] != NULL) {
+ if (dolog) {
+ VALID_ERR3(XML_RELAXNG_ERR_INVALIDATTR,
+ state->attrs[i]->name, state->node->name);
+ }
+ return (-1 - i);
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlRelaxNGValidateState:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to verify
+ *
+ * Validate the current state against the definition
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateState(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define)
+{
+ xmlNodePtr node;
+ int ret = 0, i, tmp, oldflags, errNr;
+ xmlRelaxNGValidStatePtr oldstate = NULL, state;
+
+ if (define == NULL) {
+ VALID_ERR(XML_RELAXNG_ERR_NODEFINE);
+ return (-1);
+ }
+
+ if (ctxt->state != NULL) {
+ node = ctxt->state->seq;
+ } else {
+ node = NULL;
+ }
+#ifdef DEBUG
+ for (i = 0; i < ctxt->depth; i++)
+ xmlGenericError(xmlGenericErrorContext, " ");
+ xmlGenericError(xmlGenericErrorContext,
+ "Start validating %s ", xmlRelaxNGDefName(define));
+ if (define->name != NULL)
+ xmlGenericError(xmlGenericErrorContext, "%s ", define->name);
+ if ((node != NULL) && (node->name != NULL))
+ xmlGenericError(xmlGenericErrorContext, "on %s\n", node->name);
+ else
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ ctxt->depth++;
+ switch (define->type) {
+ case XML_RELAXNG_EMPTY:
+ node = xmlRelaxNGSkipIgnored(ctxt, node);
+ ret = 0;
+ break;
+ case XML_RELAXNG_NOT_ALLOWED:
+ ret = -1;
+ break;
+ case XML_RELAXNG_TEXT:
+ while ((node != NULL) &&
+ ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_COMMENT_NODE) ||
+ (node->type == XML_PI_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)))
+ node = node->next;
+ ctxt->state->seq = node;
+ break;
+ case XML_RELAXNG_ELEMENT:
+ errNr = ctxt->errNr;
+ node = xmlRelaxNGSkipIgnored(ctxt, node);
+ if (node == NULL) {
+ VALID_ERR2(XML_RELAXNG_ERR_NOELEM, define->name);
+ ret = -1;
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ break;
+ }
+ if (node->type != XML_ELEMENT_NODE) {
+ VALID_ERR(XML_RELAXNG_ERR_NOTELEM);
+ ret = -1;
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ break;
+ }
+ /*
+ * This node was already validated successfully against
+ * this definition.
+ */
+ if (node->psvi == define) {
+ ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt, node->next);
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ if (ctxt->errNr != 0) {
+ while ((ctxt->err != NULL) &&
+ (((ctxt->err->err == XML_RELAXNG_ERR_ELEMNAME)
+ && (xmlStrEqual(ctxt->err->arg2, node->name)))
+ ||
+ ((ctxt->err->err ==
+ XML_RELAXNG_ERR_ELEMEXTRANS)
+ && (xmlStrEqual(ctxt->err->arg1, node->name)))
+ || (ctxt->err->err == XML_RELAXNG_ERR_NOELEM)
+ || (ctxt->err->err ==
+ XML_RELAXNG_ERR_NOTELEM)))
+ xmlRelaxNGValidErrorPop(ctxt);
+ }
+ break;
+ }
+
+ ret = xmlRelaxNGElementMatch(ctxt, define, node);
+ if (ret <= 0) {
+ ret = -1;
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ break;
+ }
+ ret = 0;
+ if (ctxt->errNr != 0) {
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ while ((ctxt->err != NULL) &&
+ (((ctxt->err->err == XML_RELAXNG_ERR_ELEMNAME) &&
+ (xmlStrEqual(ctxt->err->arg2, node->name))) ||
+ ((ctxt->err->err == XML_RELAXNG_ERR_ELEMEXTRANS) &&
+ (xmlStrEqual(ctxt->err->arg1, node->name))) ||
+ (ctxt->err->err == XML_RELAXNG_ERR_NOELEM) ||
+ (ctxt->err->err == XML_RELAXNG_ERR_NOTELEM)))
+ xmlRelaxNGValidErrorPop(ctxt);
+ }
+ errNr = ctxt->errNr;
+
+ oldflags = ctxt->flags;
+ if (ctxt->flags & FLAGS_MIXED_CONTENT) {
+ ctxt->flags -= FLAGS_MIXED_CONTENT;
+ }
+ state = xmlRelaxNGNewValidState(ctxt, node);
+ if (state == NULL) {
+ ret = -1;
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0)
+ xmlRelaxNGDumpValidError(ctxt);
+ break;
+ }
+
+ oldstate = ctxt->state;
+ ctxt->state = state;
+ if (define->attrs != NULL) {
+ tmp = xmlRelaxNGValidateAttributeList(ctxt, define->attrs);
+ if (tmp != 0) {
+ ret = -1;
+ VALID_ERR2(XML_RELAXNG_ERR_ATTRVALID, node->name);
+ }
+ }
+ if (define->contModel != NULL) {
+ xmlRelaxNGValidStatePtr nstate, tmpstate = ctxt->state;
+ xmlRelaxNGStatesPtr tmpstates = ctxt->states;
+ xmlNodePtr nseq;
+
+ nstate = xmlRelaxNGNewValidState(ctxt, node);
+ ctxt->state = nstate;
+ ctxt->states = NULL;
+
+ tmp = xmlRelaxNGValidateCompiledContent(ctxt,
+ define->contModel,
+ ctxt->state->seq);
+ nseq = ctxt->state->seq;
+ ctxt->state = tmpstate;
+ ctxt->states = tmpstates;
+ xmlRelaxNGFreeValidState(ctxt, nstate);
+
+#ifdef DEBUG_COMPILE
+ xmlGenericError(xmlGenericErrorContext,
+ "Validating content of '%s' : %d\n",
+ define->name, tmp);
+#endif
+ if (tmp != 0)
+ ret = -1;
+
+ if (ctxt->states != NULL) {
+ tmp = -1;
+
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ state = ctxt->states->tabState[i];
+ ctxt->state = state;
+ ctxt->state->seq = nseq;
+
+ if (xmlRelaxNGValidateElementEnd(ctxt, 0) == 0) {
+ tmp = 0;
+ break;
+ }
+ }
+ if (tmp != 0) {
+ /*
+ * validation error, log the message for the "best" one
+ */
+ ctxt->flags |= FLAGS_IGNORABLE;
+ xmlRelaxNGLogBestError(ctxt);
+ }
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ xmlRelaxNGFreeValidState(ctxt,
+ ctxt->states->
+ tabState[i]);
+ }
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->flags = oldflags;
+ ctxt->states = NULL;
+ if ((ret == 0) && (tmp == -1))
+ ret = -1;
+ } else {
+ state = ctxt->state;
+ if (ctxt->state != NULL)
+ ctxt->state->seq = nseq;
+ if (ret == 0)
+ ret = xmlRelaxNGValidateElementEnd(ctxt, 1);
+ xmlRelaxNGFreeValidState(ctxt, state);
+ }
+ } else {
+ if (define->content != NULL) {
+ tmp = xmlRelaxNGValidateDefinitionList(ctxt,
+ define->
+ content);
+ if (tmp != 0) {
+ ret = -1;
+ if (ctxt->state == NULL) {
+ ctxt->state = oldstate;
+ VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID,
+ node->name);
+ ctxt->state = NULL;
+ } else {
+ VALID_ERR2(XML_RELAXNG_ERR_CONTENTVALID,
+ node->name);
+ }
+
+ }
+ }
+ if (ctxt->states != NULL) {
+ tmp = -1;
+
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ state = ctxt->states->tabState[i];
+ ctxt->state = state;
+
+ if (xmlRelaxNGValidateElementEnd(ctxt, 0) == 0) {
+ tmp = 0;
+ break;
+ }
+ }
+ if (tmp != 0) {
+ /*
+ * validation error, log the message for the "best" one
+ */
+ ctxt->flags |= FLAGS_IGNORABLE;
+ xmlRelaxNGLogBestError(ctxt);
+ }
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ xmlRelaxNGFreeValidState(ctxt,
+ ctxt->states->tabState[i]);
+ ctxt->states->tabState[i] = NULL;
+ }
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->flags = oldflags;
+ ctxt->states = NULL;
+ if ((ret == 0) && (tmp == -1))
+ ret = -1;
+ } else {
+ state = ctxt->state;
+ if (ret == 0)
+ ret = xmlRelaxNGValidateElementEnd(ctxt, 1);
+ xmlRelaxNGFreeValidState(ctxt, state);
+ }
+ }
+ if (ret == 0) {
+ node->psvi = define;
+ }
+ ctxt->flags = oldflags;
+ ctxt->state = oldstate;
+ if (oldstate != NULL)
+ oldstate->seq = xmlRelaxNGSkipIgnored(ctxt, node->next);
+ if (ret != 0) {
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0) {
+ xmlRelaxNGDumpValidError(ctxt);
+ ret = 0;
+#if 0
+ } else {
+ ret = -2;
+#endif
+ }
+ } else {
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ }
+
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRelaxNGValidateDefinition(): validated %s : %d",
+ node->name, ret);
+ if (oldstate == NULL)
+ xmlGenericError(xmlGenericErrorContext, ": no state\n");
+ else if (oldstate->seq == NULL)
+ xmlGenericError(xmlGenericErrorContext, ": done\n");
+ else if (oldstate->seq->type == XML_ELEMENT_NODE)
+ xmlGenericError(xmlGenericErrorContext, ": next elem %s\n",
+ oldstate->seq->name);
+ else
+ xmlGenericError(xmlGenericErrorContext, ": next %s %d\n",
+ oldstate->seq->name, oldstate->seq->type);
+#endif
+ break;
+ case XML_RELAXNG_OPTIONAL:{
+ errNr = ctxt->errNr;
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ oldstate = xmlRelaxNGCopyValidState(ctxt, ctxt->state);
+ ret =
+ xmlRelaxNGValidateDefinitionList(ctxt,
+ define->content);
+ if (ret != 0) {
+ if (ctxt->state != NULL)
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = oldstate;
+ ctxt->flags = oldflags;
+ ret = 0;
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ break;
+ }
+ if (ctxt->states != NULL) {
+ xmlRelaxNGAddStates(ctxt, ctxt->states, oldstate);
+ } else {
+ ctxt->states = xmlRelaxNGNewStates(ctxt, 1);
+ if (ctxt->states == NULL) {
+ xmlRelaxNGFreeValidState(ctxt, oldstate);
+ ctxt->flags = oldflags;
+ ret = -1;
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ break;
+ }
+ xmlRelaxNGAddStates(ctxt, ctxt->states, oldstate);
+ xmlRelaxNGAddStates(ctxt, ctxt->states, ctxt->state);
+ ctxt->state = NULL;
+ }
+ ctxt->flags = oldflags;
+ ret = 0;
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ break;
+ }
+ case XML_RELAXNG_ONEORMORE:
+ errNr = ctxt->errNr;
+ ret = xmlRelaxNGValidateDefinitionList(ctxt, define->content);
+ if (ret != 0) {
+ break;
+ }
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ /* no break on purpose */
+ case XML_RELAXNG_ZEROORMORE:{
+ int progress;
+ xmlRelaxNGStatesPtr states = NULL, res = NULL;
+ int base, j;
+
+ errNr = ctxt->errNr;
+ res = xmlRelaxNGNewStates(ctxt, 1);
+ if (res == NULL) {
+ ret = -1;
+ break;
+ }
+ /*
+ * All the input states are also exit states
+ */
+ if (ctxt->state != NULL) {
+ xmlRelaxNGAddStates(ctxt, res,
+ xmlRelaxNGCopyValidState(ctxt,
+ ctxt->
+ state));
+ } else {
+ for (j = 0; j < ctxt->states->nbState; j++) {
+ xmlRelaxNGAddStates(ctxt, res,
+ xmlRelaxNGCopyValidState(ctxt,
+ ctxt->states->tabState[j]));
+ }
+ }
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ do {
+ progress = 0;
+ base = res->nbState;
+
+ if (ctxt->states != NULL) {
+ states = ctxt->states;
+ for (i = 0; i < states->nbState; i++) {
+ ctxt->state = states->tabState[i];
+ ctxt->states = NULL;
+ ret = xmlRelaxNGValidateDefinitionList(ctxt,
+ define->
+ content);
+ if (ret == 0) {
+ if (ctxt->state != NULL) {
+ tmp = xmlRelaxNGAddStates(ctxt, res,
+ ctxt->state);
+ ctxt->state = NULL;
+ if (tmp == 1)
+ progress = 1;
+ } else if (ctxt->states != NULL) {
+ for (j = 0; j < ctxt->states->nbState;
+ j++) {
+ tmp =
+ xmlRelaxNGAddStates(ctxt, res,
+ ctxt->states->tabState[j]);
+ if (tmp == 1)
+ progress = 1;
+ }
+ xmlRelaxNGFreeStates(ctxt,
+ ctxt->states);
+ ctxt->states = NULL;
+ }
+ } else {
+ if (ctxt->state != NULL) {
+ xmlRelaxNGFreeValidState(ctxt,
+ ctxt->state);
+ ctxt->state = NULL;
+ }
+ }
+ }
+ } else {
+ ret = xmlRelaxNGValidateDefinitionList(ctxt,
+ define->
+ content);
+ if (ret != 0) {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ } else {
+ base = res->nbState;
+ if (ctxt->state != NULL) {
+ tmp = xmlRelaxNGAddStates(ctxt, res,
+ ctxt->state);
+ ctxt->state = NULL;
+ if (tmp == 1)
+ progress = 1;
+ } else if (ctxt->states != NULL) {
+ for (j = 0; j < ctxt->states->nbState; j++) {
+ tmp = xmlRelaxNGAddStates(ctxt, res,
+ ctxt->states->tabState[j]);
+ if (tmp == 1)
+ progress = 1;
+ }
+ if (states == NULL) {
+ states = ctxt->states;
+ } else {
+ xmlRelaxNGFreeStates(ctxt,
+ ctxt->states);
+ }
+ ctxt->states = NULL;
+ }
+ }
+ }
+ if (progress) {
+ /*
+ * Collect all the new nodes added at that step
+ * and make them the new node set
+ */
+ if (res->nbState - base == 1) {
+ ctxt->state = xmlRelaxNGCopyValidState(ctxt,
+ res->
+ tabState
+ [base]);
+ } else {
+ if (states == NULL) {
+ xmlRelaxNGNewStates(ctxt,
+ res->nbState - base);
+ states = ctxt->states;
+ if (states == NULL) {
+ progress = 0;
+ break;
+ }
+ }
+ states->nbState = 0;
+ for (i = base; i < res->nbState; i++)
+ xmlRelaxNGAddStates(ctxt, states,
+ xmlRelaxNGCopyValidState
+ (ctxt, res->tabState[i]));
+ ctxt->states = states;
+ }
+ }
+ } while (progress == 1);
+ if (states != NULL) {
+ xmlRelaxNGFreeStates(ctxt, states);
+ }
+ ctxt->states = res;
+ ctxt->flags = oldflags;
+#if 0
+ /*
+ * errors may have to be propagated back...
+ */
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+#endif
+ ret = 0;
+ break;
+ }
+ case XML_RELAXNG_CHOICE:{
+ xmlRelaxNGDefinePtr list = NULL;
+ xmlRelaxNGStatesPtr states = NULL;
+
+ node = xmlRelaxNGSkipIgnored(ctxt, node);
+
+ errNr = ctxt->errNr;
+ if ((define->dflags & IS_TRIABLE) && (define->data != NULL) &&
+ (node != NULL)) {
+ /*
+ * node == NULL can't be optimized since IS_TRIABLE
+ * doesn't account for choice which may lead to
+ * only attributes.
+ */
+ xmlHashTablePtr triage =
+ (xmlHashTablePtr) define->data;
+
+ /*
+ * Something we can optimize cleanly there is only one
+ * possble branch out !
+ */
+ if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ list =
+ xmlHashLookup2(triage, BAD_CAST "#text", NULL);
+ } else if (node->type == XML_ELEMENT_NODE) {
+ if (node->ns != NULL) {
+ list = xmlHashLookup2(triage, node->name,
+ node->ns->href);
+ if (list == NULL)
+ list =
+ xmlHashLookup2(triage, BAD_CAST "#any",
+ node->ns->href);
+ } else
+ list =
+ xmlHashLookup2(triage, node->name, NULL);
+ if (list == NULL)
+ list =
+ xmlHashLookup2(triage, BAD_CAST "#any",
+ NULL);
+ }
+ if (list == NULL) {
+ ret = -1;
+ VALID_ERR2(XML_RELAXNG_ERR_ELEMWRONG, node->name);
+ break;
+ }
+ ret = xmlRelaxNGValidateDefinition(ctxt, list);
+ if (ret == 0) {
+ }
+ break;
+ }
+
+ list = define->content;
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+
+ while (list != NULL) {
+ oldstate = xmlRelaxNGCopyValidState(ctxt, ctxt->state);
+ ret = xmlRelaxNGValidateDefinition(ctxt, list);
+ if (ret == 0) {
+ if (states == NULL) {
+ states = xmlRelaxNGNewStates(ctxt, 1);
+ }
+ if (ctxt->state != NULL) {
+ xmlRelaxNGAddStates(ctxt, states, ctxt->state);
+ } else if (ctxt->states != NULL) {
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ xmlRelaxNGAddStates(ctxt, states,
+ ctxt->states->
+ tabState[i]);
+ }
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ } else {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ }
+ ctxt->state = oldstate;
+ list = list->next;
+ }
+ if (states != NULL) {
+ xmlRelaxNGFreeValidState(ctxt, oldstate);
+ ctxt->states = states;
+ ctxt->state = NULL;
+ ret = 0;
+ } else {
+ ctxt->states = NULL;
+ }
+ ctxt->flags = oldflags;
+ if (ret != 0) {
+ if ((ctxt->flags & FLAGS_IGNORABLE) == 0) {
+ xmlRelaxNGDumpValidError(ctxt);
+ }
+ } else {
+ if (ctxt->errNr > errNr)
+ xmlRelaxNGPopErrors(ctxt, errNr);
+ }
+ break;
+ }
+ case XML_RELAXNG_DEF:
+ case XML_RELAXNG_GROUP:
+ ret = xmlRelaxNGValidateDefinitionList(ctxt, define->content);
+ break;
+ case XML_RELAXNG_INTERLEAVE:
+ ret = xmlRelaxNGValidateInterleave(ctxt, define);
+ break;
+ case XML_RELAXNG_ATTRIBUTE:
+ ret = xmlRelaxNGValidateAttribute(ctxt, define);
+ break;
+ case XML_RELAXNG_START:
+ case XML_RELAXNG_NOOP:
+ case XML_RELAXNG_REF:
+ case XML_RELAXNG_EXTERNALREF:
+ case XML_RELAXNG_PARENTREF:
+ ret = xmlRelaxNGValidateDefinition(ctxt, define->content);
+ break;
+ case XML_RELAXNG_DATATYPE:{
+ xmlNodePtr child;
+ xmlChar *content = NULL;
+
+ child = node;
+ while (child != NULL) {
+ if (child->type == XML_ELEMENT_NODE) {
+ VALID_ERR2(XML_RELAXNG_ERR_DATAELEM,
+ node->parent->name);
+ ret = -1;
+ break;
+ } else if ((child->type == XML_TEXT_NODE) ||
+ (child->type == XML_CDATA_SECTION_NODE)) {
+ content = xmlStrcat(content, child->content);
+ }
+ /* TODO: handle entities ... */
+ child = child->next;
+ }
+ if (ret == -1) {
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ if (content == NULL) {
+ content = xmlStrdup(BAD_CAST "");
+ if (content == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ ret = -1;
+ break;
+ }
+ }
+ ret = xmlRelaxNGValidateDatatype(ctxt, content, define,
+ ctxt->state->seq);
+ if (ret == -1) {
+ VALID_ERR2(XML_RELAXNG_ERR_DATATYPE, define->name);
+ } else if (ret == 0) {
+ ctxt->state->seq = NULL;
+ }
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ case XML_RELAXNG_VALUE:{
+ xmlChar *content = NULL;
+ xmlChar *oldvalue;
+ xmlNodePtr child;
+
+ child = node;
+ while (child != NULL) {
+ if (child->type == XML_ELEMENT_NODE) {
+ VALID_ERR2(XML_RELAXNG_ERR_VALELEM,
+ node->parent->name);
+ ret = -1;
+ break;
+ } else if ((child->type == XML_TEXT_NODE) ||
+ (child->type == XML_CDATA_SECTION_NODE)) {
+ content = xmlStrcat(content, child->content);
+ }
+ /* TODO: handle entities ... */
+ child = child->next;
+ }
+ if (ret == -1) {
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ if (content == NULL) {
+ content = xmlStrdup(BAD_CAST "");
+ if (content == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ ret = -1;
+ break;
+ }
+ }
+ oldvalue = ctxt->state->value;
+ ctxt->state->value = content;
+ ret = xmlRelaxNGValidateValue(ctxt, define);
+ ctxt->state->value = oldvalue;
+ if (ret == -1) {
+ VALID_ERR2(XML_RELAXNG_ERR_VALUE, define->name);
+ } else if (ret == 0) {
+ ctxt->state->seq = NULL;
+ }
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ case XML_RELAXNG_LIST:{
+ xmlChar *content;
+ xmlNodePtr child;
+ xmlChar *oldvalue, *oldendvalue;
+ int len;
+
+ /*
+ * Make sure it's only text nodes
+ */
+
+ content = NULL;
+ child = node;
+ while (child != NULL) {
+ if (child->type == XML_ELEMENT_NODE) {
+ VALID_ERR2(XML_RELAXNG_ERR_LISTELEM,
+ node->parent->name);
+ ret = -1;
+ break;
+ } else if ((child->type == XML_TEXT_NODE) ||
+ (child->type == XML_CDATA_SECTION_NODE)) {
+ content = xmlStrcat(content, child->content);
+ }
+ /* TODO: handle entities ... */
+ child = child->next;
+ }
+ if (ret == -1) {
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ if (content == NULL) {
+ content = xmlStrdup(BAD_CAST "");
+ if (content == NULL) {
+ xmlRngVErrMemory(ctxt, "validating\n");
+ ret = -1;
+ break;
+ }
+ }
+ len = xmlStrlen(content);
+ oldvalue = ctxt->state->value;
+ oldendvalue = ctxt->state->endvalue;
+ ctxt->state->value = content;
+ ctxt->state->endvalue = content + len;
+ ret = xmlRelaxNGValidateValue(ctxt, define);
+ ctxt->state->value = oldvalue;
+ ctxt->state->endvalue = oldendvalue;
+ if (ret == -1) {
+ VALID_ERR(XML_RELAXNG_ERR_LIST);
+ } else if ((ret == 0) && (node != NULL)) {
+ ctxt->state->seq = node->next;
+ }
+ if (content != NULL)
+ xmlFree(content);
+ break;
+ }
+ case XML_RELAXNG_EXCEPT:
+ case XML_RELAXNG_PARAM:
+ TODO ret = -1;
+ break;
+ }
+ ctxt->depth--;
+#ifdef DEBUG
+ for (i = 0; i < ctxt->depth; i++)
+ xmlGenericError(xmlGenericErrorContext, " ");
+ xmlGenericError(xmlGenericErrorContext,
+ "Validating %s ", xmlRelaxNGDefName(define));
+ if (define->name != NULL)
+ xmlGenericError(xmlGenericErrorContext, "%s ", define->name);
+ if (ret == 0)
+ xmlGenericError(xmlGenericErrorContext, "suceeded\n");
+ else
+ xmlGenericError(xmlGenericErrorContext, "failed\n");
+#endif
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateDefinition:
+ * @ctxt: a Relax-NG validation context
+ * @define: the definition to verify
+ *
+ * Validate the current node lists against the definition
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGDefinePtr define)
+{
+ xmlRelaxNGStatesPtr states, res;
+ int i, j, k, ret, oldflags;
+
+ /*
+ * We should NOT have both ctxt->state and ctxt->states
+ */
+ if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
+ TODO xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ }
+
+ if ((ctxt->states == NULL) || (ctxt->states->nbState == 1)) {
+ if (ctxt->states != NULL) {
+ ctxt->state = ctxt->states->tabState[0];
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ ret = xmlRelaxNGValidateState(ctxt, define);
+ if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
+ TODO xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ }
+ if ((ctxt->states != NULL) && (ctxt->states->nbState == 1)) {
+ ctxt->state = ctxt->states->tabState[0];
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ return (ret);
+ }
+
+ states = ctxt->states;
+ ctxt->states = NULL;
+ res = NULL;
+ j = 0;
+ oldflags = ctxt->flags;
+ ctxt->flags |= FLAGS_IGNORABLE;
+ for (i = 0; i < states->nbState; i++) {
+ ctxt->state = states->tabState[i];
+ ctxt->states = NULL;
+ ret = xmlRelaxNGValidateState(ctxt, define);
+ /*
+ * We should NOT have both ctxt->state and ctxt->states
+ */
+ if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
+ TODO xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ }
+ if (ret == 0) {
+ if (ctxt->states == NULL) {
+ if (res != NULL) {
+ /* add the state to the container */
+ xmlRelaxNGAddStates(ctxt, res, ctxt->state);
+ ctxt->state = NULL;
+ } else {
+ /* add the state directly in states */
+ states->tabState[j++] = ctxt->state;
+ ctxt->state = NULL;
+ }
+ } else {
+ if (res == NULL) {
+ /* make it the new container and copy other results */
+ res = ctxt->states;
+ ctxt->states = NULL;
+ for (k = 0; k < j; k++)
+ xmlRelaxNGAddStates(ctxt, res,
+ states->tabState[k]);
+ } else {
+ /* add all the new results to res and reff the container */
+ for (k = 0; k < ctxt->states->nbState; k++)
+ xmlRelaxNGAddStates(ctxt, res,
+ ctxt->states->tabState[k]);
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ }
+ } else {
+ if (ctxt->state != NULL) {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ } else if (ctxt->states != NULL) {
+ for (k = 0; k < ctxt->states->nbState; k++)
+ xmlRelaxNGFreeValidState(ctxt,
+ ctxt->states->tabState[k]);
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ }
+ }
+ ctxt->flags = oldflags;
+ if (res != NULL) {
+ xmlRelaxNGFreeStates(ctxt, states);
+ ctxt->states = res;
+ ret = 0;
+ } else if (j > 1) {
+ states->nbState = j;
+ ctxt->states = states;
+ ret = 0;
+ } else if (j == 1) {
+ ctxt->state = states->tabState[0];
+ xmlRelaxNGFreeStates(ctxt, states);
+ ret = 0;
+ } else {
+ ret = -1;
+ xmlRelaxNGFreeStates(ctxt, states);
+ if (ctxt->states != NULL) {
+ xmlRelaxNGFreeStates(ctxt, ctxt->states);
+ ctxt->states = NULL;
+ }
+ }
+ if ((ctxt->state != NULL) && (ctxt->states != NULL)) {
+ TODO xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ }
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGValidateDocument:
+ * @ctxt: a Relax-NG validation context
+ * @doc: the document
+ *
+ * Validate the given document
+ *
+ * Returns 0 if the validation succeeded or an error code.
+ */
+static int
+xmlRelaxNGValidateDocument(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc)
+{
+ int ret;
+ xmlRelaxNGPtr schema;
+ xmlRelaxNGGrammarPtr grammar;
+ xmlRelaxNGValidStatePtr state;
+ xmlNodePtr node;
+
+ if ((ctxt == NULL) || (ctxt->schema == NULL) || (doc == NULL))
+ return (-1);
+
+ ctxt->errNo = XML_RELAXNG_OK;
+ schema = ctxt->schema;
+ grammar = schema->topgrammar;
+ if (grammar == NULL) {
+ VALID_ERR(XML_RELAXNG_ERR_NOGRAMMAR);
+ return (-1);
+ }
+ state = xmlRelaxNGNewValidState(ctxt, NULL);
+ ctxt->state = state;
+ ret = xmlRelaxNGValidateDefinition(ctxt, grammar->start);
+ if ((ctxt->state != NULL) && (state->seq != NULL)) {
+ state = ctxt->state;
+ node = state->seq;
+ node = xmlRelaxNGSkipIgnored(ctxt, node);
+ if (node != NULL) {
+ if (ret != -1) {
+ VALID_ERR(XML_RELAXNG_ERR_EXTRADATA);
+ ret = -1;
+ }
+ }
+ } else if (ctxt->states != NULL) {
+ int i;
+ int tmp = -1;
+
+ for (i = 0; i < ctxt->states->nbState; i++) {
+ state = ctxt->states->tabState[i];
+ node = state->seq;
+ node = xmlRelaxNGSkipIgnored(ctxt, node);
+ if (node == NULL)
+ tmp = 0;
+ xmlRelaxNGFreeValidState(ctxt, state);
+ }
+ if (tmp == -1) {
+ if (ret != -1) {
+ VALID_ERR(XML_RELAXNG_ERR_EXTRADATA);
+ ret = -1;
+ }
+ }
+ }
+ if (ctxt->state != NULL) {
+ xmlRelaxNGFreeValidState(ctxt, ctxt->state);
+ ctxt->state = NULL;
+ }
+ if (ret != 0)
+ xmlRelaxNGDumpValidError(ctxt);
+#ifdef DEBUG
+ else if (ctxt->errNr != 0) {
+ ctxt->error(ctxt->userData,
+ "%d Extra error messages left on stack !\n",
+ ctxt->errNr);
+ xmlRelaxNGDumpValidError(ctxt);
+ }
+#endif
+#ifdef LIBXML_VALID_ENABLED
+ if (ctxt->idref == 1) {
+ xmlValidCtxt vctxt;
+
+ memset(&vctxt, 0, sizeof(xmlValidCtxt));
+ vctxt.valid = 1;
+ vctxt.error = ctxt->error;
+ vctxt.warning = ctxt->warning;
+ vctxt.userData = ctxt->userData;
+
+ if (xmlValidateDocumentFinal(&vctxt, doc) != 1)
+ ret = -1;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ if ((ret == 0) && (ctxt->errNo != XML_RELAXNG_OK))
+ ret = -1;
+
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGCleanPSVI:
+ * @node: an input element or document
+ *
+ * Call this routine to speed up XPath computation on static documents.
+ * This stamps all the element nodes with the document order
+ * Like for line information, the order is kept in the element->content
+ * field, the value stored is actually - the node number (starting at -1)
+ * to be able to differentiate from line numbers.
+ *
+ * Returns the number of elements found in the document or -1 in case
+ * of error.
+ */
+static void
+xmlRelaxNGCleanPSVI(xmlNodePtr node) {
+ xmlNodePtr cur;
+
+ if ((node == NULL) ||
+ ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_DOCUMENT_NODE) &&
+ (node->type != XML_HTML_DOCUMENT_NODE)))
+ return;
+ if (node->type == XML_ELEMENT_NODE)
+ node->psvi = NULL;
+
+ cur = node->children;
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE) {
+ cur->psvi = NULL;
+ if (cur->children != NULL) {
+ cur = cur->children;
+ continue;
+ }
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == node) {
+ cur = NULL;
+ break;
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ return;
+}
+/************************************************************************
+ * *
+ * Validation interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRelaxNGNewValidCtxt:
+ * @schema: a precompiled XML RelaxNGs
+ *
+ * Create an XML RelaxNGs validation context based on the given schema
+ *
+ * Returns the validation context or NULL in case of error
+ */
+xmlRelaxNGValidCtxtPtr
+xmlRelaxNGNewValidCtxt(xmlRelaxNGPtr schema)
+{
+ xmlRelaxNGValidCtxtPtr ret;
+
+ ret = (xmlRelaxNGValidCtxtPtr) xmlMalloc(sizeof(xmlRelaxNGValidCtxt));
+ if (ret == NULL) {
+ xmlRngVErrMemory(NULL, "building context\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlRelaxNGValidCtxt));
+ ret->schema = schema;
+ ret->error = xmlGenericError;
+ ret->userData = xmlGenericErrorContext;
+ ret->errNr = 0;
+ ret->errMax = 0;
+ ret->err = NULL;
+ ret->errTab = NULL;
+ if (schema != NULL)
+ ret->idref = schema->idref;
+ ret->states = NULL;
+ ret->freeState = NULL;
+ ret->freeStates = NULL;
+ ret->errNo = XML_RELAXNG_OK;
+ return (ret);
+}
+
+/**
+ * xmlRelaxNGFreeValidCtxt:
+ * @ctxt: the schema validation context
+ *
+ * Free the resources associated to the schema validation context
+ */
+void
+xmlRelaxNGFreeValidCtxt(xmlRelaxNGValidCtxtPtr ctxt)
+{
+ int k;
+
+ if (ctxt == NULL)
+ return;
+ if (ctxt->states != NULL)
+ xmlRelaxNGFreeStates(NULL, ctxt->states);
+ if (ctxt->freeState != NULL) {
+ for (k = 0; k < ctxt->freeState->nbState; k++) {
+ xmlRelaxNGFreeValidState(NULL, ctxt->freeState->tabState[k]);
+ }
+ xmlRelaxNGFreeStates(NULL, ctxt->freeState);
+ }
+ if (ctxt->freeStates != NULL) {
+ for (k = 0; k < ctxt->freeStatesNr; k++) {
+ xmlRelaxNGFreeStates(NULL, ctxt->freeStates[k]);
+ }
+ xmlFree(ctxt->freeStates);
+ }
+ if (ctxt->errTab != NULL)
+ xmlFree(ctxt->errTab);
+ if (ctxt->elemTab != NULL) {
+ xmlRegExecCtxtPtr exec;
+
+ exec = xmlRelaxNGElemPop(ctxt);
+ while (exec != NULL) {
+ xmlRegFreeExecCtxt(exec);
+ exec = xmlRelaxNGElemPop(ctxt);
+ }
+ xmlFree(ctxt->elemTab);
+ }
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlRelaxNGSetValidErrors:
+ * @ctxt: a Relax-NG validation context
+ * @err: the error function
+ * @warn: the warning function
+ * @ctx: the functions context
+ *
+ * Set the error and warning callback informations
+ */
+void
+xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->error = err;
+ ctxt->warning = warn;
+ ctxt->userData = ctx;
+ ctxt->serror = NULL;
+}
+
+/**
+ * xmlRelaxNGSetValidStructuredErrors:
+ * @ctxt: a Relax-NG validation context
+ * @serror: the structured error function
+ * @ctx: the functions context
+ *
+ * Set the structured error callback
+ */
+void
+xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->serror = serror;
+ ctxt->error = NULL;
+ ctxt->warning = NULL;
+ ctxt->userData = ctx;
+}
+
+/**
+ * xmlRelaxNGGetValidErrors:
+ * @ctxt: a Relax-NG validation context
+ * @err: the error function result
+ * @warn: the warning function result
+ * @ctx: the functions context result
+ *
+ * Get the error and warning callback informations
+ *
+ * Returns -1 in case of error and 0 otherwise
+ */
+int
+xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc * err,
+ xmlRelaxNGValidityWarningFunc * warn, void **ctx)
+{
+ if (ctxt == NULL)
+ return (-1);
+ if (err != NULL)
+ *err = ctxt->error;
+ if (warn != NULL)
+ *warn = ctxt->warning;
+ if (ctx != NULL)
+ *ctx = ctxt->userData;
+ return (0);
+}
+
+/**
+ * xmlRelaxNGValidateDoc:
+ * @ctxt: a Relax-NG validation context
+ * @doc: a parsed document tree
+ *
+ * Validate a document tree in memory.
+ *
+ * Returns 0 if the document is valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+int
+xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc)
+{
+ int ret;
+
+ if ((ctxt == NULL) || (doc == NULL))
+ return (-1);
+
+ ctxt->doc = doc;
+
+ ret = xmlRelaxNGValidateDocument(ctxt, doc);
+ /*
+ * Remove all left PSVI
+ */
+ xmlRelaxNGCleanPSVI((xmlNodePtr) doc);
+
+ /*
+ * TODO: build error codes
+ */
+ if (ret == -1)
+ return (1);
+ return (ret);
+}
+
+#define bottom_relaxng
+#include "elfgcchack.h"
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/result/japancrlf.xml b/result/japancrlf.xml
new file mode 100644
index 0000000..60b307c
--- /dev/null
+++ b/result/japancrlf.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<入力メッセージ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
+ <c8c:Ele xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"/>
+</入力メッセージ>
diff --git a/result/japancrlf.xml.rde b/result/japancrlf.xml.rde
new file mode 100644
index 0000000..0bc5af7
--- /dev/null
+++ b/result/japancrlf.xml.rde
@@ -0,0 +1,7 @@
+0 1 入力メッセージ 0 0
+1 14 #text 0 1
+
+1 1 c8c:Ele 1 0
+1 14 #text 0 1
+
+0 15 入力メッセージ 0 0
diff --git a/result/japancrlf.xml.rdr b/result/japancrlf.xml.rdr
new file mode 100644
index 0000000..0bc5af7
--- /dev/null
+++ b/result/japancrlf.xml.rdr
@@ -0,0 +1,7 @@
+0 1 入力メッセージ 0 0
+1 14 #text 0 1
+
+1 1 c8c:Ele 1 0
+1 14 #text 0 1
+
+0 15 入力メッセージ 0 0
diff --git a/result/japancrlf.xml.sax b/result/japancrlf.xml.sax
new file mode 100644
index 0000000..c3bbdc6
--- /dev/null
+++ b/result/japancrlf.xml.sax
@@ -0,0 +1,11 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(入力メッセージ, xmlns='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
+SAX.characters(
+ , 2)
+SAX.startElement(c8c:Ele, xmlns:c8c='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
+SAX.endElement(c8c:Ele)
+SAX.characters(
+, 1)
+SAX.endElement(入力メッセージ)
+SAX.endDocument()
diff --git a/result/japancrlf.xml.sax2 b/result/japancrlf.xml.sax2
new file mode 100644
index 0000000..878eae4
--- /dev/null
+++ b/result/japancrlf.xml.sax2
@@ -0,0 +1,11 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElementNs(入力メッセージ, NULL, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 1, xmlns='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 0, 0)
+SAX.characters(
+ , 2)
+SAX.startElementNs(Ele, c8c, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 1, xmlns:c8c='http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826', 0, 0)
+SAX.endElementNs(Ele, c8c, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
+SAX.characters(
+, 1)
+SAX.endElementNs(入力メッセージ, NULL, 'http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826')
+SAX.endDocument()
diff --git a/result/noent/japancrlf.xml b/result/noent/japancrlf.xml
new file mode 100644
index 0000000..60b307c
--- /dev/null
+++ b/result/noent/japancrlf.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<入力メッセージ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
+ <c8c:Ele xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"/>
+</入力メッセージ>
diff --git a/result/relaxng/710744_1 b/result/relaxng/710744_1
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/710744_1
diff --git a/result/relaxng/710744_1.err b/result/relaxng/710744_1.err
new file mode 100644
index 0000000..77437eb
--- /dev/null
+++ b/result/relaxng/710744_1.err
@@ -0,0 +1 @@
+./test/relaxng/710744_1.xml validates
diff --git a/result/relaxng/710744_2 b/result/relaxng/710744_2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/710744_2
diff --git a/result/relaxng/710744_2.err b/result/relaxng/710744_2.err
new file mode 100644
index 0000000..ee8d8ac
--- /dev/null
+++ b/result/relaxng/710744_2.err
@@ -0,0 +1,2 @@
+./test/relaxng/710744_2.xml:3: element test: Relax-NG validity error : Invalid attribute foo for element test
+./test/relaxng/710744_2.xml fails to validate
diff --git a/runsuite.c b/runsuite.c
new file mode 100644
index 0000000..aaab13e
--- /dev/null
+++ b/runsuite.c
@@ -0,0 +1,1172 @@
+/*
+ * runsuite.c: C program to run libxml2 againts published testsuites
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+#include <libxml/xmlreader.h>
+
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
+
+#define LOGFILE "runsuite.log"
+static FILE *logfile = NULL;
+static int verbose = 0;
+
+
+/************************************************************************
+ * *
+ * File name and path utilities *
+ * *
+ ************************************************************************/
+
+static int checkTestFile(const char *filename) {
+ struct stat buf;
+
+ if (stat(filename, &buf) == -1)
+ return(0);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (!(buf.st_mode & _S_IFREG))
+ return(0);
+#else
+ if (!S_ISREG(buf.st_mode))
+ return(0);
+#endif
+
+ return(1);
+}
+
+static xmlChar *composeDir(const xmlChar *dir, const xmlChar *path) {
+ char buf[500];
+
+ if (dir == NULL) return(xmlStrdup(path));
+ if (path == NULL) return(NULL);
+
+ snprintf(buf, 500, "%s/%s", (const char *) dir, (const char *) path);
+ return(xmlStrdup((const xmlChar *) buf));
+}
+
+/************************************************************************
+ * *
+ * Libxml2 specific routines *
+ * *
+ ************************************************************************/
+
+static int nb_tests = 0;
+static int nb_errors = 0;
+static int nb_internals = 0;
+static int nb_schematas = 0;
+static int nb_unimplemented = 0;
+static int nb_leaks = 0;
+static int extraMemoryFromResolver = 0;
+
+static int
+fatalError(void) {
+ fprintf(stderr, "Exitting tests on fatal error\n");
+ exit(1);
+}
+
+/*
+ * that's needed to implement <resource>
+ */
+#define MAX_ENTITIES 20
+static char *testEntitiesName[MAX_ENTITIES];
+static char *testEntitiesValue[MAX_ENTITIES];
+static int nb_entities = 0;
+static void resetEntities(void) {
+ int i;
+
+ for (i = 0;i < nb_entities;i++) {
+ if (testEntitiesName[i] != NULL)
+ xmlFree(testEntitiesName[i]);
+ if (testEntitiesValue[i] != NULL)
+ xmlFree(testEntitiesValue[i]);
+ }
+ nb_entities = 0;
+}
+static int addEntity(char *name, char *content) {
+ if (nb_entities >= MAX_ENTITIES) {
+ fprintf(stderr, "Too many entities defined\n");
+ return(-1);
+ }
+ testEntitiesName[nb_entities] = name;
+ testEntitiesValue[nb_entities] = content;
+ nb_entities++;
+ return(0);
+}
+
+/*
+ * We need to trap calls to the resolver to not account memory for the catalog
+ * which is shared to the current running test. We also don't want to have
+ * network downloads modifying tests.
+ */
+static xmlParserInputPtr
+testExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+ int i;
+
+ for (i = 0;i < nb_entities;i++) {
+ if (!strcmp(testEntitiesName[i], URL)) {
+ ret = xmlNewStringInputStream(ctxt,
+ (const xmlChar *) testEntitiesValue[i]);
+ if (ret != NULL) {
+ ret->filename = (const char *)
+ xmlStrdup((xmlChar *)testEntitiesName[i]);
+ }
+ return(ret);
+ }
+ }
+ if (checkTestFile(URL)) {
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ } else {
+ int memused = xmlMemUsed();
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ extraMemoryFromResolver += xmlMemUsed() - memused;
+ }
+#if 0
+ if (ret == NULL) {
+ fprintf(stderr, "Failed to find resource %s\n", URL);
+ }
+#endif
+
+ return(ret);
+}
+
+/*
+ * Trapping the error messages at the generic level to grab the equivalent of
+ * stderr messages on CLI tools.
+ */
+static char testErrors[32769];
+static int testErrorsSize = 0;
+
+static void test_log(const char *msg, ...) {
+ va_list args;
+ if (logfile != NULL) {
+ fprintf(logfile, "\n------------\n");
+ va_start(args, msg);
+ vfprintf(logfile, msg, args);
+ va_end(args);
+ fprintf(logfile, "%s", testErrors);
+ testErrorsSize = 0; testErrors[0] = 0;
+ }
+ if (verbose) {
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+ }
+}
+
+static void
+testErrorHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ va_start(args, msg);
+ res = vsnprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ msg, args);
+ va_end(args);
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+static xmlXPathContextPtr ctxtXPath;
+
+static void
+initializeLibxml2(void) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlInitParser();
+ xmlSetExternalEntityLoader(testExternalEntityLoader);
+ ctxtXPath = xmlXPathNewContext(NULL);
+ /*
+ * Deactivate the cache if created; otherwise we have to create/free it
+ * for every test, since it will confuse the memory leak detection.
+ * Note that normally this need not be done, since the cache is not
+ * created until set explicitely with xmlXPathContextSetCache();
+ * but for test purposes it is sometimes usefull to activate the
+ * cache by default for the whole library.
+ */
+ if (ctxtXPath->cache != NULL)
+ xmlXPathContextSetCache(ctxtXPath, 0, -1, 0);
+ /* used as default nanemspace in xstc tests */
+ xmlXPathRegisterNs(ctxtXPath, BAD_CAST "ts", BAD_CAST "TestSuite");
+ xmlXPathRegisterNs(ctxtXPath, BAD_CAST "xlink",
+ BAD_CAST "http://www.w3.org/1999/xlink");
+ xmlSetGenericErrorFunc(NULL, testErrorHandler);
+#ifdef LIBXML_SCHEMAS_ENABLED
+ xmlSchemaInitTypes();
+ xmlRelaxNGInitTypes();
+#endif
+}
+
+static xmlNodePtr
+getNext(xmlNodePtr cur, const char *xpath) {
+ xmlNodePtr ret = NULL;
+ xmlXPathObjectPtr res;
+ xmlXPathCompExprPtr comp;
+
+ if ((cur == NULL) || (cur->doc == NULL) || (xpath == NULL))
+ return(NULL);
+ ctxtXPath->doc = cur->doc;
+ ctxtXPath->node = cur;
+ comp = xmlXPathCompile(BAD_CAST xpath);
+ if (comp == NULL) {
+ fprintf(stderr, "Failed to compile %s\n", xpath);
+ return(NULL);
+ }
+ res = xmlXPathCompiledEval(comp, ctxtXPath);
+ xmlXPathFreeCompExpr(comp);
+ if (res == NULL)
+ return(NULL);
+ if ((res->type == XPATH_NODESET) &&
+ (res->nodesetval != NULL) &&
+ (res->nodesetval->nodeNr > 0) &&
+ (res->nodesetval->nodeTab != NULL))
+ ret = res->nodesetval->nodeTab[0];
+ xmlXPathFreeObject(res);
+ return(ret);
+}
+
+static xmlChar *
+getString(xmlNodePtr cur, const char *xpath) {
+ xmlChar *ret = NULL;
+ xmlXPathObjectPtr res;
+ xmlXPathCompExprPtr comp;
+
+ if ((cur == NULL) || (cur->doc == NULL) || (xpath == NULL))
+ return(NULL);
+ ctxtXPath->doc = cur->doc;
+ ctxtXPath->node = cur;
+ comp = xmlXPathCompile(BAD_CAST xpath);
+ if (comp == NULL) {
+ fprintf(stderr, "Failed to compile %s\n", xpath);
+ return(NULL);
+ }
+ res = xmlXPathCompiledEval(comp, ctxtXPath);
+ xmlXPathFreeCompExpr(comp);
+ if (res == NULL)
+ return(NULL);
+ if (res->type == XPATH_STRING) {
+ ret = res->stringval;
+ res->stringval = NULL;
+ }
+ xmlXPathFreeObject(res);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Test test/xsdtest/xsdtestsuite.xml *
+ * *
+ ************************************************************************/
+
+static int
+xsdIncorectTestCase(xmlNodePtr cur) {
+ xmlNodePtr test;
+ xmlBufferPtr buf;
+ xmlRelaxNGParserCtxtPtr pctxt;
+ xmlRelaxNGPtr rng = NULL;
+ int ret = 0, memt;
+
+ cur = getNext(cur, "./incorrect[1]");
+ if (cur == NULL) {
+ return(0);
+ }
+
+ test = getNext(cur, "./*");
+ if (test == NULL) {
+ test_log("Failed to find test in correct line %ld\n",
+ xmlGetLineNo(cur));
+ return(1);
+ }
+
+ memt = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ /*
+ * dump the schemas to a buffer, then reparse it and compile the schemas
+ */
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ fprintf(stderr, "out of memory !\n");
+ fatalError();
+ }
+ xmlNodeDump(buf, test->doc, test, 0, 0);
+ pctxt = xmlRelaxNGNewMemParserCtxt((const char *)buf->content, buf->use);
+ xmlRelaxNGSetParserErrors(pctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ pctxt);
+ rng = xmlRelaxNGParse(pctxt);
+ xmlRelaxNGFreeParserCtxt(pctxt);
+ if (rng != NULL) {
+ test_log("Failed to detect incorect RNG line %ld\n",
+ xmlGetLineNo(test));
+ ret = 1;
+ goto done;
+ }
+
+done:
+ if (buf != NULL)
+ xmlBufferFree(buf);
+ if (rng != NULL)
+ xmlRelaxNGFree(rng);
+ xmlResetLastError();
+ if ((memt < xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
+ test_log("Validation of tests starting line %ld leaked %d\n",
+ xmlGetLineNo(cur), xmlMemUsed() - memt);
+ nb_leaks++;
+ }
+ return(ret);
+}
+
+static void
+installResources(xmlNodePtr tst, const xmlChar *base) {
+ xmlNodePtr test;
+ xmlBufferPtr buf;
+ xmlChar *name, *content, *res;
+
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ fprintf(stderr, "out of memory !\n");
+ fatalError();
+ }
+ xmlNodeDump(buf, tst->doc, tst, 0, 0);
+
+ while (tst != NULL) {
+ test = getNext(tst, "./*");
+ if (test != NULL) {
+ xmlBufferEmpty(buf);
+ xmlNodeDump(buf, test->doc, test, 0, 0);
+ name = getString(tst, "string(@name)");
+ content = xmlStrdup(buf->content);
+ if ((name != NULL) && (content != NULL)) {
+ res = composeDir(base, name);
+ xmlFree(name);
+ addEntity((char *) res, (char *) content);
+ } else {
+ if (name != NULL) xmlFree(name);
+ if (content != NULL) xmlFree(content);
+ }
+ }
+ tst = getNext(tst, "following-sibling::resource[1]");
+ }
+ if (buf != NULL)
+ xmlBufferFree(buf);
+}
+
+static void
+installDirs(xmlNodePtr tst, const xmlChar *base) {
+ xmlNodePtr test;
+ xmlChar *name, *res;
+
+ name = getString(tst, "string(@name)");
+ if (name == NULL)
+ return;
+ res = composeDir(base, name);
+ xmlFree(name);
+ if (res == NULL) {
+ return;
+ }
+ /* Now process resources and subdir recursively */
+ test = getNext(tst, "./resource[1]");
+ if (test != NULL) {
+ installResources(test, res);
+ }
+ test = getNext(tst, "./dir[1]");
+ while (test != NULL) {
+ installDirs(test, res);
+ test = getNext(test, "following-sibling::dir[1]");
+ }
+ xmlFree(res);
+}
+
+static int
+xsdTestCase(xmlNodePtr tst) {
+ xmlNodePtr test, tmp, cur;
+ xmlBufferPtr buf;
+ xmlDocPtr doc = NULL;
+ xmlRelaxNGParserCtxtPtr pctxt;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ xmlRelaxNGPtr rng = NULL;
+ int ret = 0, mem, memt;
+ xmlChar *dtd;
+
+ resetEntities();
+ testErrorsSize = 0; testErrors[0] = 0;
+
+ tmp = getNext(tst, "./dir[1]");
+ if (tmp != NULL) {
+ installDirs(tmp, NULL);
+ }
+ tmp = getNext(tst, "./resource[1]");
+ if (tmp != NULL) {
+ installResources(tmp, NULL);
+ }
+
+ cur = getNext(tst, "./correct[1]");
+ if (cur == NULL) {
+ return(xsdIncorectTestCase(tst));
+ }
+
+ test = getNext(cur, "./*");
+ if (test == NULL) {
+ fprintf(stderr, "Failed to find test in correct line %ld\n",
+ xmlGetLineNo(cur));
+ return(1);
+ }
+
+ memt = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ /*
+ * dump the schemas to a buffer, then reparse it and compile the schemas
+ */
+ buf = xmlBufferCreate();
+ if (buf == NULL) {
+ fprintf(stderr, "out of memory !\n");
+ fatalError();
+ }
+ xmlNodeDump(buf, test->doc, test, 0, 0);
+ pctxt = xmlRelaxNGNewMemParserCtxt((const char *)buf->content, buf->use);
+ xmlRelaxNGSetParserErrors(pctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ pctxt);
+ rng = xmlRelaxNGParse(pctxt);
+ xmlRelaxNGFreeParserCtxt(pctxt);
+ if (extraMemoryFromResolver)
+ memt = 0;
+
+ if (rng == NULL) {
+ test_log("Failed to parse RNGtest line %ld\n",
+ xmlGetLineNo(test));
+ nb_errors++;
+ ret = 1;
+ goto done;
+ }
+ /*
+ * now scan all the siblings of correct to process the <valid> tests
+ */
+ tmp = getNext(cur, "following-sibling::valid[1]");
+ while (tmp != NULL) {
+ dtd = xmlGetProp(tmp, BAD_CAST "dtd");
+ test = getNext(tmp, "./*");
+ if (test == NULL) {
+ fprintf(stderr, "Failed to find test in <valid> line %ld\n",
+ xmlGetLineNo(tmp));
+
+ } else {
+ xmlBufferEmpty(buf);
+ if (dtd != NULL)
+ xmlBufferAdd(buf, dtd, -1);
+ xmlNodeDump(buf, test->doc, test, 0, 0);
+
+ /*
+ * We are ready to run the test
+ */
+ mem = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ doc = xmlReadMemory((const char *)buf->content, buf->use,
+ "test", NULL, 0);
+ if (doc == NULL) {
+ test_log("Failed to parse valid instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ } else {
+ nb_tests++;
+ ctxt = xmlRelaxNGNewValidCtxt(rng);
+ xmlRelaxNGSetValidErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ ctxt);
+ ret = xmlRelaxNGValidateDoc(ctxt, doc);
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ if (ret > 0) {
+ test_log("Failed to validate valid instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ } else if (ret < 0) {
+ test_log("Internal error validating instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ }
+ xmlFreeDoc(doc);
+ }
+ xmlResetLastError();
+ if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
+ test_log("Validation of instance line %ld leaked %d\n",
+ xmlGetLineNo(tmp), xmlMemUsed() - mem);
+ xmlMemoryDump();
+ nb_leaks++;
+ }
+ }
+ if (dtd != NULL)
+ xmlFree(dtd);
+ tmp = getNext(tmp, "following-sibling::valid[1]");
+ }
+ /*
+ * now scan all the siblings of correct to process the <invalid> tests
+ */
+ tmp = getNext(cur, "following-sibling::invalid[1]");
+ while (tmp != NULL) {
+ test = getNext(tmp, "./*");
+ if (test == NULL) {
+ fprintf(stderr, "Failed to find test in <invalid> line %ld\n",
+ xmlGetLineNo(tmp));
+
+ } else {
+ xmlBufferEmpty(buf);
+ xmlNodeDump(buf, test->doc, test, 0, 0);
+
+ /*
+ * We are ready to run the test
+ */
+ mem = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ doc = xmlReadMemory((const char *)buf->content, buf->use,
+ "test", NULL, 0);
+ if (doc == NULL) {
+ test_log("Failed to parse valid instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ } else {
+ nb_tests++;
+ ctxt = xmlRelaxNGNewValidCtxt(rng);
+ xmlRelaxNGSetValidErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ ctxt);
+ ret = xmlRelaxNGValidateDoc(ctxt, doc);
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ if (ret == 0) {
+ test_log("Failed to detect invalid instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ } else if (ret < 0) {
+ test_log("Internal error validating instance line %ld\n",
+ xmlGetLineNo(tmp));
+ nb_errors++;
+ }
+ xmlFreeDoc(doc);
+ }
+ xmlResetLastError();
+ if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
+ test_log("Validation of instance line %ld leaked %d\n",
+ xmlGetLineNo(tmp), xmlMemUsed() - mem);
+ xmlMemoryDump();
+ nb_leaks++;
+ }
+ }
+ tmp = getNext(tmp, "following-sibling::invalid[1]");
+ }
+
+done:
+ if (buf != NULL)
+ xmlBufferFree(buf);
+ if (rng != NULL)
+ xmlRelaxNGFree(rng);
+ xmlResetLastError();
+ if ((memt != xmlMemUsed()) && (memt != 0)) {
+ test_log("Validation of tests starting line %ld leaked %d\n",
+ xmlGetLineNo(cur), xmlMemUsed() - memt);
+ nb_leaks++;
+ }
+ return(ret);
+}
+
+static int
+xsdTestSuite(xmlNodePtr cur) {
+ if (verbose) {
+ xmlChar *doc = getString(cur, "string(documentation)");
+
+ if (doc != NULL) {
+ printf("Suite %s\n", doc);
+ xmlFree(doc);
+ }
+ }
+ cur = getNext(cur, "./testCase[1]");
+ while (cur != NULL) {
+ xsdTestCase(cur);
+ cur = getNext(cur, "following-sibling::testCase[1]");
+ }
+
+ return(0);
+}
+
+static int
+xsdTest(void) {
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ const char *filename = "test/xsdtest/xsdtestsuite.xml";
+ int ret = 0;
+
+ doc = xmlReadFile(filename, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+ printf("## XML Schemas datatypes test suite from James Clark\n");
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+
+ cur = getNext(cur, "./testSuite[1]");
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+ while (cur != NULL) {
+ xsdTestSuite(cur);
+ cur = getNext(cur, "following-sibling::testSuite[1]");
+ }
+
+done:
+ if (doc != NULL)
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+static int
+rngTestSuite(xmlNodePtr cur) {
+ if (verbose) {
+ xmlChar *doc = getString(cur, "string(documentation)");
+
+ if (doc != NULL) {
+ printf("Suite %s\n", doc);
+ xmlFree(doc);
+ } else {
+ doc = getString(cur, "string(section)");
+ if (doc != NULL) {
+ printf("Section %s\n", doc);
+ xmlFree(doc);
+ }
+ }
+ }
+ cur = getNext(cur, "./testSuite[1]");
+ while (cur != NULL) {
+ xsdTestSuite(cur);
+ cur = getNext(cur, "following-sibling::testSuite[1]");
+ }
+
+ return(0);
+}
+
+static int
+rngTest1(void) {
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ const char *filename = "test/relaxng/OASIS/spectest.xml";
+ int ret = 0;
+
+ doc = xmlReadFile(filename, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+ printf("## Relax NG test suite from James Clark\n");
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+
+ cur = getNext(cur, "./testSuite[1]");
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+ while (cur != NULL) {
+ rngTestSuite(cur);
+ cur = getNext(cur, "following-sibling::testSuite[1]");
+ }
+
+done:
+ if (doc != NULL)
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+static int
+rngTest2(void) {
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ const char *filename = "test/relaxng/testsuite.xml";
+ int ret = 0;
+
+ doc = xmlReadFile(filename, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+ printf("## Relax NG test suite for libxml2\n");
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+
+ cur = getNext(cur, "./testSuite[1]");
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSuite"))) {
+ fprintf(stderr, "Unexpected format %s\n", filename);
+ ret = -1;
+ goto done;
+ }
+ while (cur != NULL) {
+ xsdTestSuite(cur);
+ cur = getNext(cur, "following-sibling::testSuite[1]");
+ }
+
+done:
+ if (doc != NULL)
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Schemas test suites from W3C/NIST/MS/Sun *
+ * *
+ ************************************************************************/
+
+static int
+xstcTestInstance(xmlNodePtr cur, xmlSchemaPtr schemas,
+ const xmlChar *spath, const char *base) {
+ xmlChar *href = NULL;
+ xmlChar *path = NULL;
+ xmlChar *validity = NULL;
+ xmlSchemaValidCtxtPtr ctxt = NULL;
+ xmlDocPtr doc = NULL;
+ int ret = 0, mem;
+
+ xmlResetLastError();
+ testErrorsSize = 0; testErrors[0] = 0;
+ mem = xmlMemUsed();
+ href = getString(cur,
+ "string(ts:instanceDocument/@xlink:href)");
+ if ((href == NULL) || (href[0] == 0)) {
+ test_log("testGroup line %ld misses href for schemaDocument\n",
+ xmlGetLineNo(cur));
+ ret = -1;
+ goto done;
+ }
+ path = xmlBuildURI(href, BAD_CAST base);
+ if (path == NULL) {
+ fprintf(stderr,
+ "Failed to build path to schemas testGroup line %ld : %s\n",
+ xmlGetLineNo(cur), href);
+ ret = -1;
+ goto done;
+ }
+ if (checkTestFile((const char *) path) <= 0) {
+ test_log("schemas for testGroup line %ld is missing: %s\n",
+ xmlGetLineNo(cur), path);
+ ret = -1;
+ goto done;
+ }
+ validity = getString(cur,
+ "string(ts:expected/@validity)");
+ if (validity == NULL) {
+ fprintf(stderr, "instanceDocument line %ld misses expected validity\n",
+ xmlGetLineNo(cur));
+ ret = -1;
+ goto done;
+ }
+ nb_tests++;
+ doc = xmlReadFile((const char *) path, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "instance %s fails to parse\n", path);
+ ret = -1;
+ nb_errors++;
+ goto done;
+ }
+
+ ctxt = xmlSchemaNewValidCtxt(schemas);
+ xmlSchemaSetValidErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) testErrorHandler,
+ (xmlSchemaValidityWarningFunc) testErrorHandler,
+ ctxt);
+ ret = xmlSchemaValidateDoc(ctxt, doc);
+
+ if (xmlStrEqual(validity, BAD_CAST "valid")) {
+ if (ret > 0) {
+ test_log("valid instance %s failed to validate against %s\n",
+ path, spath);
+ nb_errors++;
+ } else if (ret < 0) {
+ test_log("valid instance %s got internal error validating %s\n",
+ path, spath);
+ nb_internals++;
+ nb_errors++;
+ }
+ } else if (xmlStrEqual(validity, BAD_CAST "invalid")) {
+ if (ret == 0) {
+ test_log("Failed to detect invalid instance %s against %s\n",
+ path, spath);
+ nb_errors++;
+ }
+ } else {
+ test_log("instanceDocument line %ld has unexpected validity value%s\n",
+ xmlGetLineNo(cur), validity);
+ ret = -1;
+ goto done;
+ }
+
+done:
+ if (href != NULL) xmlFree(href);
+ if (path != NULL) xmlFree(path);
+ if (validity != NULL) xmlFree(validity);
+ if (ctxt != NULL) xmlSchemaFreeValidCtxt(ctxt);
+ if (doc != NULL) xmlFreeDoc(doc);
+ xmlResetLastError();
+ if (mem != xmlMemUsed()) {
+ test_log("Validation of tests starting line %ld leaked %d\n",
+ xmlGetLineNo(cur), xmlMemUsed() - mem);
+ nb_leaks++;
+ }
+ return(ret);
+}
+
+static int
+xstcTestGroup(xmlNodePtr cur, const char *base) {
+ xmlChar *href = NULL;
+ xmlChar *path = NULL;
+ xmlChar *validity = NULL;
+ xmlSchemaPtr schemas = NULL;
+ xmlSchemaParserCtxtPtr ctxt;
+ xmlNodePtr instance;
+ int ret = 0, mem;
+
+ xmlResetLastError();
+ testErrorsSize = 0; testErrors[0] = 0;
+ mem = xmlMemUsed();
+ href = getString(cur,
+ "string(ts:schemaTest/ts:schemaDocument/@xlink:href)");
+ if ((href == NULL) || (href[0] == 0)) {
+ test_log("testGroup line %ld misses href for schemaDocument\n",
+ xmlGetLineNo(cur));
+ ret = -1;
+ goto done;
+ }
+ path = xmlBuildURI(href, BAD_CAST base);
+ if (path == NULL) {
+ test_log("Failed to build path to schemas testGroup line %ld : %s\n",
+ xmlGetLineNo(cur), href);
+ ret = -1;
+ goto done;
+ }
+ if (checkTestFile((const char *) path) <= 0) {
+ test_log("schemas for testGroup line %ld is missing: %s\n",
+ xmlGetLineNo(cur), path);
+ ret = -1;
+ goto done;
+ }
+ validity = getString(cur,
+ "string(ts:schemaTest/ts:expected/@validity)");
+ if (validity == NULL) {
+ test_log("testGroup line %ld misses expected validity\n",
+ xmlGetLineNo(cur));
+ ret = -1;
+ goto done;
+ }
+ nb_tests++;
+ if (xmlStrEqual(validity, BAD_CAST "valid")) {
+ nb_schematas++;
+ ctxt = xmlSchemaNewParserCtxt((const char *) path);
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) testErrorHandler,
+ (xmlSchemaValidityWarningFunc) testErrorHandler,
+ ctxt);
+ schemas = xmlSchemaParse(ctxt);
+ xmlSchemaFreeParserCtxt(ctxt);
+ if (schemas == NULL) {
+ test_log("valid schemas %s failed to parse\n",
+ path);
+ ret = 1;
+ nb_errors++;
+ }
+ if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
+ test_log("valid schemas %s hit an unimplemented block\n",
+ path);
+ ret = 1;
+ nb_unimplemented++;
+ nb_errors++;
+ }
+ instance = getNext(cur, "./ts:instanceTest[1]");
+ while (instance != NULL) {
+ if (schemas != NULL) {
+ xstcTestInstance(instance, schemas, path, base);
+ } else {
+ /*
+ * We'll automatically mark the instances as failed
+ * if the schema was broken.
+ */
+ nb_errors++;
+ }
+ instance = getNext(instance,
+ "following-sibling::ts:instanceTest[1]");
+ }
+ } else if (xmlStrEqual(validity, BAD_CAST "invalid")) {
+ nb_schematas++;
+ ctxt = xmlSchemaNewParserCtxt((const char *) path);
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) testErrorHandler,
+ (xmlSchemaValidityWarningFunc) testErrorHandler,
+ ctxt);
+ schemas = xmlSchemaParse(ctxt);
+ xmlSchemaFreeParserCtxt(ctxt);
+ if (schemas != NULL) {
+ test_log("Failed to detect error in schemas %s\n",
+ path);
+ nb_errors++;
+ ret = 1;
+ }
+ if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
+ nb_unimplemented++;
+ test_log("invalid schemas %s hit an unimplemented block\n",
+ path);
+ ret = 1;
+ nb_errors++;
+ }
+ } else {
+ test_log("testGroup line %ld misses unexpected validity value%s\n",
+ xmlGetLineNo(cur), validity);
+ ret = -1;
+ goto done;
+ }
+
+done:
+ if (href != NULL) xmlFree(href);
+ if (path != NULL) xmlFree(path);
+ if (validity != NULL) xmlFree(validity);
+ if (schemas != NULL) xmlSchemaFree(schemas);
+ xmlResetLastError();
+ if ((mem != xmlMemUsed()) && (extraMemoryFromResolver == 0)) {
+ test_log("Processing test line %ld %s leaked %d\n",
+ xmlGetLineNo(cur), path, xmlMemUsed() - mem);
+ nb_leaks++;
+ }
+ return(ret);
+}
+
+static int
+xstcMetadata(const char *metadata, const char *base) {
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ xmlChar *contributor;
+ xmlChar *name;
+ int ret = 0;
+
+ doc = xmlReadFile(metadata, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", metadata);
+ return(-1);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testSet"))) {
+ fprintf(stderr, "Unexpected format %s\n", metadata);
+ return(-1);
+ }
+ contributor = xmlGetProp(cur, BAD_CAST "contributor");
+ if (contributor == NULL) {
+ contributor = xmlStrdup(BAD_CAST "Unknown");
+ }
+ name = xmlGetProp(cur, BAD_CAST "name");
+ if (name == NULL) {
+ name = xmlStrdup(BAD_CAST "Unknown");
+ }
+ printf("## %s test suite for Schemas version %s\n", contributor, name);
+ xmlFree(contributor);
+ xmlFree(name);
+
+ cur = getNext(cur, "./ts:testGroup[1]");
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "testGroup"))) {
+ fprintf(stderr, "Unexpected format %s\n", metadata);
+ ret = -1;
+ goto done;
+ }
+ while (cur != NULL) {
+ xstcTestGroup(cur, base);
+ cur = getNext(cur, "following-sibling::ts:testGroup[1]");
+ }
+
+done:
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The driver for the tests *
+ * *
+ ************************************************************************/
+
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ int ret = 0;
+ int old_errors, old_tests, old_leaks;
+
+ logfile = fopen(LOGFILE, "w");
+ if (logfile == NULL) {
+ fprintf(stderr,
+ "Could not open the log file, running in verbose mode\n");
+ verbose = 1;
+ }
+ initializeLibxml2();
+
+ if ((argc >= 2) && (!strcmp(argv[1], "-v")))
+ verbose = 1;
+
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ xsdTest();
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ rngTest1();
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ rngTest2();
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ nb_internals = 0;
+ nb_schematas = 0;
+ xstcMetadata("xstc/Tests/Metadata/NISTXMLSchemaDatatypes.testSet",
+ "xstc/Tests/Metadata/");
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests (%d schemata), no errors\n",
+ nb_tests - old_tests, nb_schematas);
+ else
+ printf("Ran %d tests (%d schemata), %d errors (%d internals), %d leaks\n",
+ nb_tests - old_tests,
+ nb_schematas,
+ nb_errors - old_errors,
+ nb_internals,
+ nb_leaks - old_leaks);
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ nb_internals = 0;
+ nb_schematas = 0;
+ xstcMetadata("xstc/Tests/Metadata/SunXMLSchema1-0-20020116.testSet",
+ "xstc/Tests/");
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests (%d schemata), no errors\n",
+ nb_tests - old_tests, nb_schematas);
+ else
+ printf("Ran %d tests (%d schemata), %d errors (%d internals), %d leaks\n",
+ nb_tests - old_tests,
+ nb_schematas,
+ nb_errors - old_errors,
+ nb_internals,
+ nb_leaks - old_leaks);
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ nb_internals = 0;
+ nb_schematas = 0;
+ xstcMetadata("xstc/Tests/Metadata/MSXMLSchema1-0-20020116.testSet",
+ "xstc/Tests/");
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests (%d schemata), no errors\n",
+ nb_tests - old_tests, nb_schematas);
+ else
+ printf("Ran %d tests (%d schemata), %d errors (%d internals), %d leaks\n",
+ nb_tests - old_tests,
+ nb_schematas,
+ nb_errors - old_errors,
+ nb_internals,
+ nb_leaks - old_leaks);
+
+ if ((nb_errors == 0) && (nb_leaks == 0)) {
+ ret = 0;
+ printf("Total %d tests, no errors\n",
+ nb_tests);
+ } else {
+ ret = 1;
+ printf("Total %d tests, %d errors, %d leaks\n",
+ nb_tests, nb_errors, nb_leaks);
+ }
+ xmlXPathFreeContext(ctxtXPath);
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ if (logfile != NULL)
+ fclose(logfile);
+ return(ret);
+}
+#else /* !SCHEMAS */
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ fprintf(stderr, "runsuite requires support for schemas and xpath in libxml2\n");
+}
+#endif
diff --git a/runtest.c b/runtest.c
new file mode 100644
index 0000000..02fe09a
--- /dev/null
+++ b/runtest.c
@@ -0,0 +1,4480 @@
+/*
+ * runtest.c: C program to run libxml2 regression tests without
+ * requiring make or Python, and reducing platform dependancies
+ * to a strict minimum.
+ *
+ * To compile on Unixes:
+ * cc -o runtest `xml2-config --cflags` runtest.c `xml2-config --libs` -lpthread
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef LIBXML_READER_ENABLED
+#include <libxml/xmlreader.h>
+#endif
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#ifdef LIBXML_XPTR_ENABLED
+#include <libxml/xpointer.h>
+#endif
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
+#endif
+
+#ifdef LIBXML_PATTERN_ENABLED
+#include <libxml/pattern.h>
+#endif
+
+#ifdef LIBXML_C14N_ENABLED
+#include <libxml/c14n.h>
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+
+/*
+ * pseudo flag for the unification of HTML and XML tests
+ */
+#define XML_PARSE_HTML 1 << 24
+#endif
+
+#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
+#include <libxml/globals.h>
+#include <libxml/threads.h>
+#include <libxml/parser.h>
+#include <libxml/catalog.h>
+#include <string.h>
+#endif
+
+/*
+ * O_BINARY is just for Windows compatibility - if it isn't defined
+ * on this system, avoid any compilation error
+ */
+#ifdef O_BINARY
+#define RD_FLAGS O_RDONLY | O_BINARY
+#else
+#define RD_FLAGS O_RDONLY
+#endif
+
+typedef int (*functest) (const char *filename, const char *result,
+ const char *error, int options);
+
+typedef struct testDesc testDesc;
+typedef testDesc *testDescPtr;
+struct testDesc {
+ const char *desc; /* descripton of the test */
+ functest func; /* function implementing the test */
+ const char *in; /* glob to path for input files */
+ const char *out; /* output directory */
+ const char *suffix;/* suffix for output files */
+ const char *err; /* suffix for error output files */
+ int options; /* parser options for the test */
+};
+
+static int checkTestFile(const char *filename);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
+#include <windows.h>
+#include <io.h>
+
+typedef struct
+{
+ size_t gl_pathc; /* Count of paths matched so far */
+ char **gl_pathv; /* List of matched pathnames. */
+ size_t gl_offs; /* Slots to reserve in 'gl_pathv'. */
+} glob_t;
+
+#define GLOB_DOOFFS 0
+static int glob(const char *pattern, int flags,
+ int errfunc(const char *epath, int eerrno),
+ glob_t *pglob) {
+ glob_t *ret;
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ unsigned int nb_paths = 0;
+ char directory[500];
+ int len;
+
+ if ((pattern == NULL) || (pglob == NULL)) return(-1);
+
+ strncpy(directory, pattern, 499);
+ for (len = strlen(directory);len >= 0;len--) {
+ if (directory[len] == '/') {
+ len++;
+ directory[len] = 0;
+ break;
+ }
+ }
+ if (len <= 0)
+ len = 0;
+
+
+ ret = pglob;
+ memset(ret, 0, sizeof(glob_t));
+
+ hFind = FindFirstFileA(pattern, &FindFileData);
+ if (hFind == INVALID_HANDLE_VALUE)
+ return(0);
+ nb_paths = 20;
+ ret->gl_pathv = (char **) malloc(nb_paths * sizeof(char *));
+ if (ret->gl_pathv == NULL) {
+ FindClose(hFind);
+ return(-1);
+ }
+ strncpy(directory + len, FindFileData.cFileName, 499 - len);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
+ if (ret->gl_pathv[ret->gl_pathc] == NULL)
+ goto done;
+ ret->gl_pathc++;
+ while(FindNextFileA(hFind, &FindFileData)) {
+ if (FindFileData.cFileName[0] == '.')
+ continue;
+ if (ret->gl_pathc + 2 > nb_paths) {
+ char **tmp = realloc(ret->gl_pathv, nb_paths * 2 * sizeof(char *));
+ if (tmp == NULL)
+ break;
+ ret->gl_pathv = tmp;
+ nb_paths *= 2;
+ }
+ strncpy(directory + len, FindFileData.cFileName, 499 - len);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
+ if (ret->gl_pathv[ret->gl_pathc] == NULL)
+ break;
+ ret->gl_pathc++;
+ }
+ ret->gl_pathv[ret->gl_pathc] = NULL;
+
+done:
+ FindClose(hFind);
+ return(0);
+}
+
+
+
+static void globfree(glob_t *pglob) {
+ unsigned int i;
+ if (pglob == NULL)
+ return;
+
+ for (i = 0;i < pglob->gl_pathc;i++) {
+ if (pglob->gl_pathv[i] != NULL)
+ free(pglob->gl_pathv[i]);
+ }
+}
+
+#else
+#include <glob.h>
+#endif
+
+/************************************************************************
+ * *
+ * Libxml2 specific routines *
+ * *
+ ************************************************************************/
+
+static int nb_tests = 0;
+static int nb_errors = 0;
+static int nb_leaks = 0;
+static int extraMemoryFromResolver = 0;
+
+static int
+fatalError(void) {
+ fprintf(stderr, "Exitting tests on fatal error\n");
+ exit(1);
+}
+
+/*
+ * We need to trap calls to the resolver to not account memory for the catalog
+ * which is shared to the current running test. We also don't want to have
+ * network downloads modifying tests.
+ */
+static xmlParserInputPtr
+testExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+
+ if (checkTestFile(URL)) {
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ } else {
+ int memused = xmlMemUsed();
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ extraMemoryFromResolver += xmlMemUsed() - memused;
+ }
+
+ return(ret);
+}
+
+/*
+ * Trapping the error messages at the generic level to grab the equivalent of
+ * stderr messages on CLI tools.
+ */
+static char testErrors[32769];
+static int testErrorsSize = 0;
+
+static void XMLCDECL
+testErrorHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ va_start(args, msg);
+ res = vsnprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ msg, args);
+ va_end(args);
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+static void XMLCDECL
+channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ va_start(args, msg);
+ res = vsnprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ msg, args);
+ va_end(args);
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+/**
+ * xmlParserPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+
+static void
+xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
+ xmlGenericErrorFunc chanl, void *data ) {
+ const xmlChar *cur, *base;
+ unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
+ xmlChar content[81]; /* space for 80 chars + line terminator */
+ xmlChar *ctnt;
+
+ if (input == NULL) return;
+ cur = input->cur;
+ base = input->base;
+ /* skip backwards over any end-of-lines */
+ while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
+ cur--;
+ }
+ n = 0;
+ /* search backwards for beginning-of-line (to max buff size) */
+ while ((n++ < (sizeof(content)-1)) && (cur > base) &&
+ (*(cur) != '\n') && (*(cur) != '\r'))
+ cur--;
+ if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ /* calculate the error position in terms of the current position */
+ col = input->cur - cur;
+ /* search forward for end-of-line (to max buff size) */
+ n = 0;
+ ctnt = content;
+ /* copy selected text to our buffer */
+ while ((*cur != 0) && (*(cur) != '\n') &&
+ (*(cur) != '\r') && (n < sizeof(content)-1)) {
+ *ctnt++ = *cur++;
+ n++;
+ }
+ *ctnt = 0;
+ /* print out the selected text */
+ chanl(data ,"%s\n", content);
+ /* create blank line with problem pointer */
+ n = 0;
+ ctnt = content;
+ /* (leave buffer space for pointer + line terminator) */
+ while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
+ if (*(ctnt) != '\t')
+ *(ctnt) = ' ';
+ ctnt++;
+ }
+ *ctnt++ = '^';
+ *ctnt = 0;
+ chanl(data ,"%s\n", content);
+}
+
+static void
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+ char *file = NULL;
+ int line = 0;
+ int code = -1;
+ int domain;
+ void *data = NULL;
+ const char *str;
+ const xmlChar *name = NULL;
+ xmlNodePtr node;
+ xmlErrorLevel level;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+ xmlParserCtxtPtr ctxt = NULL;
+
+ if (err == NULL)
+ return;
+
+ file = err->file;
+ line = err->line;
+ code = err->code;
+ domain = err->domain;
+ level = err->level;
+ node = err->node;
+ if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
+ (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
+ (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
+ ctxt = err->ctxt;
+ }
+ str = err->message;
+
+ if (code == XML_ERR_OK)
+ return;
+
+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
+ name = node->name;
+
+ /*
+ * Maintain the compatibility with the legacy error handling
+ */
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ if (input != NULL) {
+ if (input->filename)
+ channel(data, "%s:%d: ", input->filename, input->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", input->line);
+ }
+ } else {
+ if (file != NULL)
+ channel(data, "%s:%d: ", file, line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", line);
+ }
+ if (name != NULL) {
+ channel(data, "element %s: ", name);
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (domain) {
+ case XML_FROM_PARSER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_NAMESPACE:
+ channel(data, "namespace ");
+ break;
+ case XML_FROM_DTD:
+ case XML_FROM_VALID:
+ channel(data, "validity ");
+ break;
+ case XML_FROM_HTML:
+ channel(data, "HTML parser ");
+ break;
+ case XML_FROM_MEMORY:
+ channel(data, "memory ");
+ break;
+ case XML_FROM_OUTPUT:
+ channel(data, "output ");
+ break;
+ case XML_FROM_IO:
+ channel(data, "I/O ");
+ break;
+ case XML_FROM_XINCLUDE:
+ channel(data, "XInclude ");
+ break;
+ case XML_FROM_XPATH:
+ channel(data, "XPath ");
+ break;
+ case XML_FROM_XPOINTER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_REGEXP:
+ channel(data, "regexp ");
+ break;
+ case XML_FROM_MODULE:
+ channel(data, "module ");
+ break;
+ case XML_FROM_SCHEMASV:
+ channel(data, "Schemas validity ");
+ break;
+ case XML_FROM_SCHEMASP:
+ channel(data, "Schemas parser ");
+ break;
+ case XML_FROM_RELAXNGP:
+ channel(data, "Relax-NG parser ");
+ break;
+ case XML_FROM_RELAXNGV:
+ channel(data, "Relax-NG validity ");
+ break;
+ case XML_FROM_CATALOG:
+ channel(data, "Catalog ");
+ break;
+ case XML_FROM_C14N:
+ channel(data, "C14N ");
+ break;
+ case XML_FROM_XSLT:
+ channel(data, "XSLT ");
+ break;
+ default:
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (level) {
+ case XML_ERR_NONE:
+ channel(data, ": ");
+ break;
+ case XML_ERR_WARNING:
+ channel(data, "warning : ");
+ break;
+ case XML_ERR_ERROR:
+ channel(data, "error : ");
+ break;
+ case XML_ERR_FATAL:
+ channel(data, "error : ");
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ if (str != NULL) {
+ int len;
+ len = xmlStrlen((const xmlChar *)str);
+ if ((len > 0) && (str[len - 1] != '\n'))
+ channel(data, "%s\n", str);
+ else
+ channel(data, "%s", str);
+ } else {
+ channel(data, "%s\n", "out of memory error");
+ }
+ if (code == XML_ERR_OK)
+ return;
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContextInternal(input, channel, data);
+ if (cur != NULL) {
+ if (cur->filename)
+ channel(data, "%s:%d: \n", cur->filename, cur->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: \n", cur->line);
+ xmlParserPrintFileContextInternal(cur, channel, data);
+ }
+ }
+ if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
+ (err->int1 < 100) &&
+ (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
+ xmlChar buf[150];
+ int i;
+
+ channel(data, "%s\n", err->str1);
+ for (i=0;i < err->int1;i++)
+ buf[i] = ' ';
+ buf[i++] = '^';
+ buf[i] = 0;
+ channel(data, "%s\n", buf);
+ }
+}
+
+static void
+initializeLibxml2(void) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlInitParser();
+ xmlSetExternalEntityLoader(testExternalEntityLoader);
+ xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler);
+#ifdef LIBXML_SCHEMAS_ENABLED
+ xmlSchemaInitTypes();
+ xmlRelaxNGInitTypes();
+#endif
+}
+
+
+/************************************************************************
+ * *
+ * File name and path utilities *
+ * *
+ ************************************************************************/
+
+static const char *baseFilename(const char *filename) {
+ const char *cur;
+ if (filename == NULL)
+ return(NULL);
+ cur = &filename[strlen(filename)];
+ while ((cur > filename) && (*cur != '/'))
+ cur--;
+ if (*cur == '/')
+ return(cur + 1);
+ return(cur);
+}
+
+static char *resultFilename(const char *filename, const char *out,
+ const char *suffix) {
+ const char *base;
+ char res[500];
+ char suffixbuff[500];
+
+/*************
+ if ((filename[0] == 't') && (filename[1] == 'e') &&
+ (filename[2] == 's') && (filename[3] == 't') &&
+ (filename[4] == '/'))
+ filename = &filename[5];
+ *************/
+
+ base = baseFilename(filename);
+ if (suffix == NULL)
+ suffix = ".tmp";
+ if (out == NULL)
+ out = "";
+
+ strncpy(suffixbuff,suffix,499);
+#ifdef VMS
+ if(strstr(base,".") && suffixbuff[0]=='.')
+ suffixbuff[0]='_';
+#endif
+
+ snprintf(res, 499, "%s%s%s", out, base, suffixbuff);
+ res[499] = 0;
+ return(strdup(res));
+}
+
+static int checkTestFile(const char *filename) {
+ struct stat buf;
+
+ if (stat(filename, &buf) == -1)
+ return(0);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (!(buf.st_mode & _S_IFREG))
+ return(0);
+#else
+ if (!S_ISREG(buf.st_mode))
+ return(0);
+#endif
+
+ return(1);
+}
+
+static int compareFiles(const char *r1, const char *r2) {
+ int res1, res2;
+ int fd1, fd2;
+ char bytes1[4096];
+ char bytes2[4096];
+
+ fd1 = open(r1, RD_FLAGS);
+ if (fd1 < 0)
+ return(-1);
+ fd2 = open(r2, RD_FLAGS);
+ if (fd2 < 0) {
+ close(fd1);
+ return(-1);
+ }
+ while (1) {
+ res1 = read(fd1, bytes1, 4096);
+ res2 = read(fd2, bytes2, 4096);
+ if ((res1 != res2) || (res1 < 0)) {
+ close(fd1);
+ close(fd2);
+ return(1);
+ }
+ if (res1 == 0)
+ break;
+ if (memcmp(bytes1, bytes2, res1) != 0) {
+ close(fd1);
+ close(fd2);
+ return(1);
+ }
+ }
+ close(fd1);
+ close(fd2);
+ return(0);
+}
+
+static int compareFileMem(const char *filename, const char *mem, int size) {
+ int res;
+ int fd;
+ char bytes[4096];
+ int idx = 0;
+ struct stat info;
+
+ if (stat(filename, &info) < 0)
+ return(-1);
+ if (info.st_size != size)
+ return(-1);
+ fd = open(filename, RD_FLAGS);
+ if (fd < 0)
+ return(-1);
+ while (idx < size) {
+ res = read(fd, bytes, 4096);
+ if (res <= 0)
+ break;
+ if (res + idx > size)
+ break;
+ if (memcmp(bytes, &mem[idx], res) != 0) {
+ int ix;
+ for (ix=0; ix<res; ix++)
+ if (bytes[ix] != mem[idx+ix])
+ break;
+ fprintf(stderr,"Compare error at position %d\n", idx+ix);
+ close(fd);
+ return(1);
+ }
+ idx += res;
+ }
+ close(fd);
+ return(idx != size);
+}
+
+static int loadMem(const char *filename, const char **mem, int *size) {
+ int fd, res;
+ struct stat info;
+ char *base;
+ int siz = 0;
+ if (stat(filename, &info) < 0)
+ return(-1);
+ base = malloc(info.st_size + 1);
+ if (base == NULL)
+ return(-1);
+ if ((fd = open(filename, RD_FLAGS)) < 0) {
+ free(base);
+ return(-1);
+ }
+ while ((res = read(fd, &base[siz], info.st_size - siz)) > 0) {
+ siz += res;
+ }
+ close(fd);
+#if !defined(_WIN32)
+ if (siz != info.st_size) {
+ free(base);
+ return(-1);
+ }
+#endif
+ base[siz] = 0;
+ *mem = base;
+ *size = siz;
+ return(0);
+}
+
+static int unloadMem(const char *mem) {
+ free((char *)mem);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Tests implementations *
+ * *
+ ************************************************************************/
+
+/************************************************************************
+ * *
+ * Parse to SAX based tests *
+ * *
+ ************************************************************************/
+
+static FILE *SAXdebug = NULL;
+
+/*
+ * empty SAX block
+ */
+static xmlSAXHandler emptySAXHandlerStruct = {
+ NULL, /* internalSubset */
+ NULL, /* isStandalone */
+ NULL, /* hasInternalSubset */
+ NULL, /* hasExternalSubset */
+ NULL, /* resolveEntity */
+ NULL, /* getEntity */
+ NULL, /* entityDecl */
+ NULL, /* notationDecl */
+ NULL, /* attributeDecl */
+ NULL, /* elementDecl */
+ NULL, /* unparsedEntityDecl */
+ NULL, /* setDocumentLocator */
+ NULL, /* startDocument */
+ NULL, /* endDocument */
+ NULL, /* startElement */
+ NULL, /* endElement */
+ NULL, /* reference */
+ NULL, /* characters */
+ NULL, /* ignorableWhitespace */
+ NULL, /* processingInstruction */
+ NULL, /* comment */
+ NULL, /* xmlParserWarning */
+ NULL, /* xmlParserError */
+ NULL, /* xmlParserError */
+ NULL, /* getParameterEntity */
+ NULL, /* cdataBlock; */
+ NULL, /* externalSubset; */
+ 1,
+ NULL,
+ NULL, /* startElementNs */
+ NULL, /* endElementNs */
+ NULL /* xmlStructuredErrorFunc */
+};
+
+static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
+static int callbacks = 0;
+static int quiet = 0;
+
+/**
+ * isStandaloneDebug:
+ * @ctxt: An XML parser context
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+static int
+isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(SAXdebug, "SAX.isStandalone()\n");
+ return(0);
+}
+
+/**
+ * hasInternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(SAXdebug, "SAX.hasInternalSubset()\n");
+ return(0);
+}
+
+/**
+ * hasExternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(SAXdebug, "SAX.hasExternalSubset()\n");
+ return(0);
+}
+
+/**
+ * internalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ */
+static void
+internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.internalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(SAXdebug, " ,");
+ else
+ fprintf(SAXdebug, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(SAXdebug, " )\n");
+ else
+ fprintf(SAXdebug, " %s)\n", SystemID);
+}
+
+/**
+ * externalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ */
+static void
+externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.externalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(SAXdebug, " ,");
+ else
+ fprintf(SAXdebug, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(SAXdebug, " )\n");
+ else
+ fprintf(SAXdebug, " %s)\n", SystemID);
+}
+
+/**
+ * resolveEntityDebug:
+ * @ctxt: An XML parser context
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Special entity resolver, better left to the parser, it has
+ * more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlParserInputPtr
+resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+
+
+ fprintf(SAXdebug, "SAX.resolveEntity(");
+ if (publicId != NULL)
+ fprintf(SAXdebug, "%s", (char *)publicId);
+ else
+ fprintf(SAXdebug, " ");
+ if (systemId != NULL)
+ fprintf(SAXdebug, ", %s)\n", (char *)systemId);
+ else
+ fprintf(SAXdebug, ", )\n");
+/*********
+ if (systemId != NULL) {
+ return(xmlNewInputFromFile(ctxt, (char *) systemId));
+ }
+ *********/
+ return(NULL);
+}
+
+/**
+ * getEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlEntityPtr
+getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ fprintf(SAXdebug, "SAX.getEntity(%s)\n", name);
+ return(NULL);
+}
+
+/**
+ * getParameterEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlParserInputPtr
+ */
+static xmlEntityPtr
+getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ fprintf(SAXdebug, "SAX.getParameterEntity(%s)\n", name);
+ return(NULL);
+}
+
+
+/**
+ * entityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+static void
+entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+ /* not all libraries handle printing null pointers nicely */
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (content == NULL)
+ content = (xmlChar *)nullstr;
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
+ name, type, publicId, systemId, content);
+}
+
+/**
+ * attributeDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the attribute name
+ * @type: the attribute type
+ *
+ * An attribute definition has been parsed
+ */
+static void
+attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,
+ const xmlChar * name, int type, int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ if (defaultValue == NULL)
+ fprintf(SAXdebug, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n",
+ elem, name, type, def);
+ else
+ fprintf(SAXdebug, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
+ elem, name, type, def, defaultValue);
+ xmlFreeEnumeration(tree);
+}
+
+/**
+ * elementDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value (without processing).
+ *
+ * An element definition has been parsed
+ */
+static void
+elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.elementDecl(%s, %d, ...)\n",
+ name, type);
+}
+
+/**
+ * notationDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+static void
+notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.notationDecl(%s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId);
+}
+
+/**
+ * unparsedEntityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+static void
+unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (notationName == NULL)
+ notationName = nullstr;
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId,
+ (char *) notationName);
+}
+
+/**
+ * setDocumentLocatorDebug:
+ * @ctxt: An XML parser context
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+static void
+setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.setDocumentLocator()\n");
+}
+
+/**
+ * startDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document start being processed.
+ */
+static void
+startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.startDocument()\n");
+}
+
+/**
+ * endDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document end has been detected.
+ */
+static void
+endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.endDocument()\n");
+}
+
+/**
+ * startElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
+{
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.startElement(%s", (char *) name);
+ if (atts != NULL) {
+ for (i = 0;(atts[i] != NULL);i++) {
+ fprintf(SAXdebug, ", %s='", atts[i++]);
+ if (atts[i] != NULL)
+ fprintf(SAXdebug, "%s'", atts[i]);
+ }
+ }
+ fprintf(SAXdebug, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.endElement(%s)\n", (char *) name);
+}
+
+/**
+ * charactersDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char output[40];
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ output[i] = ch[i];
+ output[i] = 0;
+
+ fprintf(SAXdebug, "SAX.characters(%s, %d)\n", output, len);
+}
+
+/**
+ * referenceDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ */
+static void
+referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.reference(%s)\n", name);
+}
+
+/**
+ * ignorableWhitespaceDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @start: the first char in the string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * Question: how much at a time ???
+ */
+static void
+ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char output[40];
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ output[i] = ch[i];
+ output[i] = 0;
+ fprintf(SAXdebug, "SAX.ignorableWhitespace(%s, %d)\n", output, len);
+}
+
+/**
+ * processingInstructionDebug:
+ * @ctxt: An XML parser context
+ * @target: the target name
+ * @data: the PI data's
+ * @len: the number of xmlChar
+ *
+ * A processing instruction has been parsed.
+ */
+static void
+processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,
+ const xmlChar *data)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ if (data != NULL)
+ fprintf(SAXdebug, "SAX.processingInstruction(%s, %s)\n",
+ (char *) target, (char *) data);
+ else
+ fprintf(SAXdebug, "SAX.processingInstruction(%s, NULL)\n",
+ (char *) target);
+}
+
+/**
+ * cdataBlockDebug:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+static void
+cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.pcdata(%.20s, %d)\n",
+ (char *) value, len);
+}
+
+/**
+ * commentDebug:
+ * @ctxt: An XML parser context
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+static void
+commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.comment(%s)\n", value);
+}
+
+/**
+ * warningDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(SAXdebug, "SAX.warning: ");
+ vfprintf(SAXdebug, msg, args);
+ va_end(args);
+}
+
+/**
+ * errorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(SAXdebug, "SAX.error: ");
+ vfprintf(SAXdebug, msg, args);
+ va_end(args);
+}
+
+/**
+ * fatalErrorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a fatalError messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(SAXdebug, "SAX.fatalError: ");
+ vfprintf(SAXdebug, msg, args);
+ va_end(args);
+}
+
+static xmlSAXHandler debugSAXHandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ startElementDebug,
+ endElementDebug,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+static xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
+
+/*
+ * SAX2 specific callbacks
+ */
+/**
+ * startElementNsDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes)
+{
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.startElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(SAXdebug, ", NULL");
+ else
+ fprintf(SAXdebug, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(SAXdebug, ", NULL");
+ else
+ fprintf(SAXdebug, ", '%s'", (char *) URI);
+ fprintf(SAXdebug, ", %d", nb_namespaces);
+
+ if (namespaces != NULL) {
+ for (i = 0;i < nb_namespaces * 2;i++) {
+ fprintf(SAXdebug, ", xmlns");
+ if (namespaces[i] != NULL)
+ fprintf(SAXdebug, ":%s", namespaces[i]);
+ i++;
+ fprintf(SAXdebug, "='%s'", namespaces[i]);
+ }
+ }
+ fprintf(SAXdebug, ", %d, %d", nb_attributes, nb_defaulted);
+ if (attributes != NULL) {
+ for (i = 0;i < nb_attributes * 5;i += 5) {
+ if (attributes[i + 1] != NULL)
+ fprintf(SAXdebug, ", %s:%s='", attributes[i + 1], attributes[i]);
+ else
+ fprintf(SAXdebug, ", %s='", attributes[i]);
+ fprintf(SAXdebug, "%.4s...', %d", attributes[i + 3],
+ (int)(attributes[i + 4] - attributes[i + 3]));
+ }
+ }
+ fprintf(SAXdebug, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(SAXdebug, "SAX.endElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(SAXdebug, ", NULL");
+ else
+ fprintf(SAXdebug, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(SAXdebug, ", NULL)\n");
+ else
+ fprintf(SAXdebug, ", '%s')\n", (char *) URI);
+}
+
+static xmlSAXHandler debugSAX2HandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ NULL,
+ NULL,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ XML_SAX2_MAGIC,
+ NULL,
+ startElementNsDebug,
+ endElementNsDebug,
+ NULL
+};
+
+static xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;
+
+#ifdef LIBXML_HTML_ENABLED
+/**
+ * htmlstartElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+htmlstartElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
+{
+ int i;
+
+ fprintf(SAXdebug, "SAX.startElement(%s", (char *) name);
+ if (atts != NULL) {
+ for (i = 0;(atts[i] != NULL);i++) {
+ fprintf(SAXdebug, ", %s", atts[i++]);
+ if (atts[i] != NULL) {
+ unsigned char output[40];
+ const unsigned char *att = atts[i];
+ int outlen, attlen;
+ fprintf(SAXdebug, "='");
+ while ((attlen = strlen((char*)att)) > 0) {
+ outlen = sizeof output - 1;
+ htmlEncodeEntities(output, &outlen, att, &attlen, '\'');
+ output[outlen] = 0;
+ fprintf(SAXdebug, "%s", (char *) output);
+ att += attlen;
+ }
+ fprintf(SAXdebug, "'");
+ }
+ }
+ }
+ fprintf(SAXdebug, ")\n");
+}
+
+/**
+ * htmlcharactersDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+htmlcharactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ unsigned char output[40];
+ int inlen = len, outlen = 30;
+
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
+ output[outlen] = 0;
+
+ fprintf(SAXdebug, "SAX.characters(%s, %d)\n", output, len);
+}
+
+/**
+ * htmlcdataDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some cdata chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+htmlcdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ unsigned char output[40];
+ int inlen = len, outlen = 30;
+
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
+ output[outlen] = 0;
+
+ fprintf(SAXdebug, "SAX.cdata(%s, %d)\n", output, len);
+}
+
+static xmlSAXHandler debugHTMLSAXHandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ htmlstartElementDebug,
+ endElementDebug,
+ referenceDebug,
+ htmlcharactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ htmlcdataDebug,
+ externalSubsetDebug,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+static xmlSAXHandlerPtr debugHTMLSAXHandler = &debugHTMLSAXHandlerStruct;
+#endif /* LIBXML_HTML_ENABLED */
+
+#ifdef LIBXML_SAX1_ENABLED
+/**
+ * saxParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file using the SAX API and check for errors.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+saxParseTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ int ret;
+ char *temp;
+
+ nb_tests++;
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "out of memory\n");
+ fatalError();
+ }
+ SAXdebug = fopen(temp, "wb");
+ if (SAXdebug == NULL) {
+ fprintf(stderr, "Failed to write to %s\n", temp);
+ free(temp);
+ return(-1);
+ }
+
+ /* for SAX we really want the callbacks though the context handlers */
+ xmlSetStructuredErrorFunc(NULL, NULL);
+ xmlSetGenericErrorFunc(NULL, testErrorHandler);
+
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML) {
+ htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL);
+ ret = 0;
+ } else
+#endif
+ ret = xmlSAXUserParseFile(emptySAXHandler, NULL, filename);
+ if (ret == XML_WAR_UNDECLARED_ENTITY) {
+ fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret);
+ ret = 0;
+ }
+ if (ret != 0) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ ret = 1;
+ goto done;
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML) {
+ htmlSAXParseFile(filename, NULL, debugHTMLSAXHandler, NULL);
+ ret = 0;
+ } else
+#endif
+ if (options & XML_PARSE_SAX1) {
+ ret = xmlSAXUserParseFile(debugSAXHandler, NULL, filename);
+ } else {
+ ret = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename);
+ }
+ if (ret == XML_WAR_UNDECLARED_ENTITY) {
+ fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret);
+ ret = 0;
+ }
+ fclose(SAXdebug);
+ if (compareFiles(temp, result)) {
+ fprintf(stderr, "Got a difference for %s\n", filename);
+ ret = 1;
+ }
+
+done:
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+
+ /* switch back to structured error handling */
+ xmlSetGenericErrorFunc(NULL, NULL);
+ xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler);
+
+ return(ret);
+}
+#endif
+
+/************************************************************************
+ * *
+ * Parse to tree based tests *
+ * *
+ ************************************************************************/
+/**
+ * oldParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file using the old xmlParseFile API, then serialize back
+ * reparse the result and serialize again, then check for deviation
+ * in serialization.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+oldParseTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ xmlDocPtr doc;
+ char *temp;
+ int res = 0;
+
+ nb_tests++;
+ /*
+ * base of the test, parse with the old API
+ */
+#ifdef LIBXML_SAX1_ENABLED
+ doc = xmlParseFile(filename);
+#else
+ doc = xmlReadFile(filename, NULL, 0);
+#endif
+ if (doc == NULL)
+ return(1);
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "out of memory\n");
+ fatalError();
+ }
+ xmlSaveFile(temp, doc);
+ if (compareFiles(temp, result)) {
+ res = 1;
+ }
+ xmlFreeDoc(doc);
+
+ /*
+ * Parse the saved result to make sure the round trip is okay
+ */
+#ifdef LIBXML_SAX1_ENABLED
+ doc = xmlParseFile(temp);
+#else
+ doc = xmlReadFile(temp, NULL, 0);
+#endif
+ if (doc == NULL)
+ return(1);
+ xmlSaveFile(temp, doc);
+ if (compareFiles(temp, result)) {
+ res = 1;
+ }
+ xmlFreeDoc(doc);
+
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(res);
+}
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * pushParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file using the Push API, then serialize back
+ * to check for content.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+pushParseTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc;
+ const char *base;
+ int size, res;
+ int cur = 0;
+
+ nb_tests++;
+ /*
+ * load the document in memory and work from there.
+ */
+ if (loadMem(filename, &base, &size) != 0) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ ctxt = htmlCreatePushParserCtxt(NULL, NULL, base + cur, 4, filename,
+ XML_CHAR_ENCODING_NONE);
+ else
+#endif
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL, base + cur, 4, filename);
+ xmlCtxtUseOptions(ctxt, options);
+ cur += 4;
+ while (cur < size) {
+ if (cur + 1024 >= size) {
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ htmlParseChunk(ctxt, base + cur, size - cur, 1);
+ else
+#endif
+ xmlParseChunk(ctxt, base + cur, size - cur, 1);
+ break;
+ } else {
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ htmlParseChunk(ctxt, base + cur, 1024, 0);
+ else
+#endif
+ xmlParseChunk(ctxt, base + cur, 1024, 0);
+ cur += 1024;
+ }
+ }
+ doc = ctxt->myDoc;
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ res = 1;
+ else
+#endif
+ res = ctxt->wellFormed;
+ xmlFreeParserCtxt(ctxt);
+ free((char *)base);
+ if (!res) {
+ xmlFreeDoc(doc);
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML)
+ htmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ else
+#endif
+ xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ xmlFreeDoc(doc);
+ res = compareFileMem(result, base, size);
+ if ((base == NULL) || (res != 0)) {
+ if (base != NULL)
+ xmlFree((char *)base);
+ fprintf(stderr, "Result for %s failed\n", filename);
+ return(-1);
+ }
+ xmlFree((char *)base);
+ if (err != NULL) {
+ res = compareFileMem(err, testErrors, testErrorsSize);
+ if (res != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ return(-1);
+ }
+ }
+ return(0);
+}
+#endif
+
+/**
+ * memParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file using the old xmlReadMemory API, then serialize back
+ * reparse the result and serialize again, then check for deviation
+ * in serialization.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+memParseTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ xmlDocPtr doc;
+ const char *base;
+ int size, res;
+
+ nb_tests++;
+ /*
+ * load and parse the memory
+ */
+ if (loadMem(filename, &base, &size) != 0) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+ doc = xmlReadMemory(base, size, filename, NULL, 0);
+ unloadMem(base);
+ if (doc == NULL) {
+ return(1);
+ }
+ xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ xmlFreeDoc(doc);
+ res = compareFileMem(result, base, size);
+ if ((base == NULL) || (res != 0)) {
+ if (base != NULL)
+ xmlFree((char *)base);
+ fprintf(stderr, "Result for %s failed\n", filename);
+ return(-1);
+ }
+ xmlFree((char *)base);
+ return(0);
+}
+
+/**
+ * noentParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file with entity resolution, then serialize back
+ * reparse the result and serialize again, then check for deviation
+ * in serialization.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+noentParseTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ xmlDocPtr doc;
+ char *temp;
+ int res = 0;
+
+ nb_tests++;
+ /*
+ * base of the test, parse with the old API
+ */
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL)
+ return(1);
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ xmlSaveFile(temp, doc);
+ if (compareFiles(temp, result)) {
+ res = 1;
+ }
+ xmlFreeDoc(doc);
+
+ /*
+ * Parse the saved result to make sure the round trip is okay
+ */
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL)
+ return(1);
+ xmlSaveFile(temp, doc);
+ if (compareFiles(temp, result)) {
+ res = 1;
+ }
+ xmlFreeDoc(doc);
+
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(res);
+}
+
+/**
+ * errParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file using the xmlReadFile API and check for errors.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+errParseTest(const char *filename, const char *result, const char *err,
+ int options) {
+ xmlDocPtr doc;
+ const char *base = NULL;
+ int size, res = 0;
+
+ nb_tests++;
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML) {
+ doc = htmlReadFile(filename, NULL, options);
+ } else
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (options & XML_PARSE_XINCLUDE) {
+ doc = xmlReadFile(filename, NULL, options);
+ xmlXIncludeProcessFlags(doc, options);
+ } else
+#endif
+ {
+ xmlGetWarningsDefaultValue = 1;
+ doc = xmlReadFile(filename, NULL, options);
+ }
+ xmlGetWarningsDefaultValue = 0;
+ if (result) {
+ if (doc == NULL) {
+ base = "";
+ size = 0;
+ } else {
+#ifdef LIBXML_HTML_ENABLED
+ if (options & XML_PARSE_HTML) {
+ htmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ } else
+#endif
+ xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
+ }
+ res = compareFileMem(result, base, size);
+ }
+ if (doc != NULL) {
+ if (base != NULL)
+ xmlFree((char *)base);
+ xmlFreeDoc(doc);
+ }
+ if (res != 0) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ return(-1);
+ }
+ if (err != NULL) {
+ res = compareFileMem(err, testErrors, testErrorsSize);
+ if (res != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ return(-1);
+ }
+ } else if (options & XML_PARSE_DTDVALID) {
+ if (testErrorsSize != 0)
+ fprintf(stderr, "Validation for %s failed\n", filename);
+ }
+
+ return(0);
+}
+
+#ifdef LIBXML_READER_ENABLED
+/************************************************************************
+ * *
+ * Reader based tests *
+ * *
+ ************************************************************************/
+
+static void processNode(FILE *out, xmlTextReaderPtr reader) {
+ const xmlChar *name, *value;
+ int type, empty;
+
+ type = xmlTextReaderNodeType(reader);
+ empty = xmlTextReaderIsEmptyElement(reader);
+
+ name = xmlTextReaderConstName(reader);
+ if (name == NULL)
+ name = BAD_CAST "--";
+
+ value = xmlTextReaderConstValue(reader);
+
+
+ fprintf(out, "%d %d %s %d %d",
+ xmlTextReaderDepth(reader),
+ type,
+ name,
+ empty,
+ xmlTextReaderHasValue(reader));
+ if (value == NULL)
+ fprintf(out, "\n");
+ else {
+ fprintf(out, " %s\n", value);
+ }
+}
+static int
+streamProcessTest(const char *filename, const char *result, const char *err,
+ xmlTextReaderPtr reader, const char *rng, int options) {
+ int ret;
+ char *temp = NULL;
+ FILE *t = NULL;
+
+ if (reader == NULL)
+ return(-1);
+
+ nb_tests++;
+ if (result != NULL) {
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ t = fopen(temp, "wb");
+ if (t == NULL) {
+ fprintf(stderr, "Can't open temp file %s\n", temp);
+ free(temp);
+ return(-1);
+ }
+ }
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (rng != NULL) {
+ ret = xmlTextReaderRelaxNGValidate(reader, rng);
+ if (ret < 0) {
+ testErrorHandler(NULL, "Relax-NG schema %s failed to compile\n",
+ rng);
+ fclose(t);
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(0);
+ }
+ }
+#endif
+ xmlGetWarningsDefaultValue = 1;
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ if ((t != NULL) && (rng == NULL))
+ processNode(t, reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ if (ret != 0) {
+ testErrorHandler(NULL, "%s : failed to parse\n", filename);
+ }
+ if (rng != NULL) {
+ if (xmlTextReaderIsValid(reader) != 1) {
+ testErrorHandler(NULL, "%s fails to validate\n", filename);
+ } else {
+ testErrorHandler(NULL, "%s validates\n", filename);
+ }
+ }
+ xmlGetWarningsDefaultValue = 0;
+ if (t != NULL) {
+ fclose(t);
+ ret = compareFiles(temp, result);
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ if (ret) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ return(-1);
+ }
+ }
+ if (err != NULL) {
+ ret = compareFileMem(err, testErrors, testErrorsSize);
+ if (ret != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ printf("%s", testErrors);
+ return(-1);
+ }
+ }
+
+ return(0);
+}
+
+/**
+ * streamParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file using the reader API and check for errors.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+streamParseTest(const char *filename, const char *result, const char *err,
+ int options) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+ reader = xmlReaderForFile(filename, NULL, options);
+ ret = streamProcessTest(filename, result, err, reader, NULL, options);
+ xmlFreeTextReader(reader);
+ return(ret);
+}
+
+/**
+ * walkerParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file using the walker, i.e. a reader built from a atree.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+walkerParseTest(const char *filename, const char *result, const char *err,
+ int options) {
+ xmlDocPtr doc;
+ xmlTextReaderPtr reader;
+ int ret;
+
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", filename);
+ return(-1);
+ }
+ reader = xmlReaderWalker(doc);
+ ret = streamProcessTest(filename, result, err, reader, NULL, options);
+ xmlFreeTextReader(reader);
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+/**
+ * streamMemParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file using the reader API from memory and check for errors.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+streamMemParseTest(const char *filename, const char *result, const char *err,
+ int options) {
+ xmlTextReaderPtr reader;
+ int ret;
+ const char *base;
+ int size;
+
+ /*
+ * load and parse the memory
+ */
+ if (loadMem(filename, &base, &size) != 0) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+ reader = xmlReaderForMemory(base, size, filename, NULL, options);
+ ret = streamProcessTest(filename, result, err, reader, NULL, options);
+ free((char *)base);
+ xmlFreeTextReader(reader);
+ return(ret);
+}
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+/************************************************************************
+ * *
+ * XPath and XPointer based tests *
+ * *
+ ************************************************************************/
+
+static FILE *xpathOutput;
+static xmlDocPtr xpathDocument;
+
+static void
+testXPath(const char *str, int xptr, int expr) {
+ xmlXPathObjectPtr res;
+ xmlXPathContextPtr ctxt;
+
+ nb_tests++;
+#if defined(LIBXML_XPTR_ENABLED)
+ if (xptr) {
+ ctxt = xmlXPtrNewContext(xpathDocument, NULL, NULL);
+ res = xmlXPtrEval(BAD_CAST str, ctxt);
+ } else {
+#endif
+ ctxt = xmlXPathNewContext(xpathDocument);
+ ctxt->node = xmlDocGetRootElement(xpathDocument);
+ if (expr)
+ res = xmlXPathEvalExpression(BAD_CAST str, ctxt);
+ else {
+ /* res = xmlXPathEval(BAD_CAST str, ctxt); */
+ xmlXPathCompExprPtr comp;
+
+ comp = xmlXPathCompile(BAD_CAST str);
+ if (comp != NULL) {
+ res = xmlXPathCompiledEval(comp, ctxt);
+ xmlXPathFreeCompExpr(comp);
+ } else
+ res = NULL;
+ }
+#if defined(LIBXML_XPTR_ENABLED)
+ }
+#endif
+ xmlXPathDebugDumpObject(xpathOutput, res, 0);
+ xmlXPathFreeObject(res);
+ xmlXPathFreeContext(ctxt);
+}
+
+/**
+ * xpathExprTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing XPath standalone expressions and evaluate them
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+xpathCommonTest(const char *filename, const char *result,
+ int xptr, int expr) {
+ FILE *input;
+ char expression[5000];
+ int len, ret = 0;
+ char *temp;
+
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ xpathOutput = fopen(temp, "wb");
+ if (xpathOutput == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ free(temp);
+ return(-1);
+ }
+
+ input = fopen(filename, "rb");
+ if (input == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot open %s for reading\n", filename);
+ free(temp);
+ return(-1);
+ }
+ while (fgets(expression, 4500, input) != NULL) {
+ len = strlen(expression);
+ len--;
+ while ((len >= 0) &&
+ ((expression[len] == '\n') || (expression[len] == '\t') ||
+ (expression[len] == '\r') || (expression[len] == ' '))) len--;
+ expression[len + 1] = 0;
+ if (len >= 0) {
+ fprintf(xpathOutput,
+ "\n========================\nExpression: %s\n",
+ expression) ;
+ testXPath(expression, xptr, expr);
+ }
+ }
+
+ fclose(input);
+ fclose(xpathOutput);
+ if (result != NULL) {
+ ret = compareFiles(temp, result);
+ if (ret) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ }
+ }
+
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(ret);
+}
+
+/**
+ * xpathExprTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing XPath standalone expressions and evaluate them
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+xpathExprTest(const char *filename, const char *result,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(xpathCommonTest(filename, result, 0, 1));
+}
+
+/**
+ * xpathDocTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing XPath expressions and evaluate them against
+ * a set of corresponding documents.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+xpathDocTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+
+ char pattern[500];
+ char result[500];
+ glob_t globbuf;
+ size_t i;
+ int ret = 0, res;
+
+ xpathDocument = xmlReadFile(filename, NULL,
+ options | XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (xpathDocument == NULL) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+ snprintf(pattern, 499, "./test/XPath/tests/%s*", baseFilename(filename));
+ pattern[499] = 0;
+ globbuf.gl_offs = 0;
+ glob(pattern, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ snprintf(result, 499, "result/XPath/tests/%s",
+ baseFilename(globbuf.gl_pathv[i]));
+ res = xpathCommonTest(globbuf.gl_pathv[i], &result[0], 0, 0);
+ if (res != 0)
+ ret = res;
+ }
+ globfree(&globbuf);
+
+ xmlFreeDoc(xpathDocument);
+ return(ret);
+}
+
+#ifdef LIBXML_XPTR_ENABLED
+/**
+ * xptrDocTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing XPath expressions and evaluate them against
+ * a set of corresponding documents.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+xptrDocTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+
+ char pattern[500];
+ char result[500];
+ glob_t globbuf;
+ size_t i;
+ int ret = 0, res;
+
+ xpathDocument = xmlReadFile(filename, NULL,
+ options | XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (xpathDocument == NULL) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+ snprintf(pattern, 499, "./test/XPath/xptr/%s*", baseFilename(filename));
+ pattern[499] = 0;
+ globbuf.gl_offs = 0;
+ glob(pattern, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ snprintf(result, 499, "result/XPath/xptr/%s",
+ baseFilename(globbuf.gl_pathv[i]));
+ res = xpathCommonTest(globbuf.gl_pathv[i], &result[0], 1, 0);
+ if (res != 0)
+ ret = res;
+ }
+ globfree(&globbuf);
+
+ xmlFreeDoc(xpathDocument);
+ return(ret);
+}
+#endif /* LIBXML_XPTR_ENABLED */
+
+/**
+ * xmlidDocTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing xml:id and check for errors and verify
+ * that XPath queries will work on them as expected.
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+xmlidDocTest(const char *filename,
+ const char *result,
+ const char *err,
+ int options) {
+
+ int res = 0;
+ int ret = 0;
+ char *temp;
+
+ xpathDocument = xmlReadFile(filename, NULL,
+ options | XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (xpathDocument == NULL) {
+ fprintf(stderr, "Failed to load %s\n", filename);
+ return(-1);
+ }
+
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ xpathOutput = fopen(temp, "wb");
+ if (xpathOutput == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ xmlFreeDoc(xpathDocument);
+ free(temp);
+ return(-1);
+ }
+
+ testXPath("id('bar')", 0, 0);
+
+ fclose(xpathOutput);
+ if (result != NULL) {
+ ret = compareFiles(temp, result);
+ if (ret) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ res = 1;
+ }
+ }
+
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ xmlFreeDoc(xpathDocument);
+
+ if (err != NULL) {
+ ret = compareFileMem(err, testErrors, testErrorsSize);
+ if (ret != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ res = 1;
+ }
+ }
+ return(res);
+}
+
+#endif /* LIBXML_DEBUG_ENABLED */
+#endif /* XPATH */
+/************************************************************************
+ * *
+ * URI based tests *
+ * *
+ ************************************************************************/
+
+static void
+handleURI(const char *str, const char *base, FILE *o) {
+ int ret;
+ xmlURIPtr uri;
+ xmlChar *res = NULL;
+
+ uri = xmlCreateURI();
+
+ if (base == NULL) {
+ ret = xmlParseURIReference(uri, str);
+ if (ret != 0)
+ fprintf(o, "%s : error %d\n", str, ret);
+ else {
+ xmlNormalizeURIPath(uri->path);
+ xmlPrintURI(o, uri);
+ fprintf(o, "\n");
+ }
+ } else {
+ res = xmlBuildURI((xmlChar *)str, (xmlChar *) base);
+ if (res != NULL) {
+ fprintf(o, "%s\n", (char *) res);
+ }
+ else
+ fprintf(o, "::ERROR::\n");
+ }
+ if (res != NULL)
+ xmlFree(res);
+ xmlFreeURI(uri);
+}
+
+/**
+ * uriCommonTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing URI and check for errors
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+uriCommonTest(const char *filename,
+ const char *result,
+ const char *err,
+ const char *base) {
+ char *temp;
+ FILE *o, *f;
+ char str[1024];
+ int res = 0, i, ret;
+
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ o = fopen(temp, "wb");
+ if (o == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ free(temp);
+ return(-1);
+ }
+ f = fopen(filename, "rb");
+ if (f == NULL) {
+ fprintf(stderr, "failed to open input file %s\n", filename);
+ fclose(o);
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(-1);
+ }
+
+ while (1) {
+ /*
+ * read one line in string buffer.
+ */
+ if (fgets (&str[0], sizeof (str) - 1, f) == NULL)
+ break;
+
+ /*
+ * remove the ending spaces
+ */
+ i = strlen(str);
+ while ((i > 0) &&
+ ((str[i - 1] == '\n') || (str[i - 1] == '\r') ||
+ (str[i - 1] == ' ') || (str[i - 1] == '\t'))) {
+ i--;
+ str[i] = 0;
+ }
+ nb_tests++;
+ handleURI(str, base, o);
+ }
+
+ fclose(f);
+ fclose(o);
+
+ if (result != NULL) {
+ ret = compareFiles(temp, result);
+ if (ret) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ res = 1;
+ }
+ }
+ if (err != NULL) {
+ ret = compareFileMem(err, testErrors, testErrorsSize);
+ if (ret != 0) {
+ fprintf(stderr, "Error for %s failed\n", filename);
+ res = 1;
+ }
+ }
+
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(res);
+}
+
+/**
+ * uriParseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing URI and check for errors
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+uriParseTest(const char *filename,
+ const char *result,
+ const char *err,
+ int options ATTRIBUTE_UNUSED) {
+ return(uriCommonTest(filename, result, err, NULL));
+}
+
+/**
+ * uriBaseTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing URI, compose them against a fixed base and
+ * check for errors
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+uriBaseTest(const char *filename,
+ const char *result,
+ const char *err,
+ int options ATTRIBUTE_UNUSED) {
+ return(uriCommonTest(filename, result, err,
+ "http://foo.com/path/to/index.html?orig#help"));
+}
+
+static int urip_success = 1;
+static int urip_current = 0;
+static const char *urip_testURLs[] = {
+ "urip://example.com/a b.html",
+ "urip://example.com/a%20b.html",
+ "file:///path/to/a b.html",
+ "file:///path/to/a%20b.html",
+ "/path/to/a b.html",
+ "/path/to/a%20b.html",
+ "urip://example.com/r" "\xe9" "sum" "\xe9" ".html",
+ "urip://example.com/test?a=1&b=2%263&c=4#foo",
+ NULL
+};
+static const char *urip_rcvsURLs[] = {
+ /* it is an URI the strings must be escaped */
+ "urip://example.com/a%20b.html",
+ /* check that % escaping is not broken */
+ "urip://example.com/a%20b.html",
+ /* it's an URI path the strings must be escaped */
+ "file:///path/to/a%20b.html",
+ /* check that % escaping is not broken */
+ "file:///path/to/a%20b.html",
+ /* this is not an URI, this is a path, so this should not be escaped */
+ "/path/to/a b.html",
+ /* check that paths with % are not broken */
+ "/path/to/a%20b.html",
+ /* out of context the encoding can't be guessed byte by byte conversion */
+ "urip://example.com/r%E9sum%E9.html",
+ /* verify we don't destroy URIs especially the query part */
+ "urip://example.com/test?a=1&b=2%263&c=4#foo",
+ NULL
+};
+static const char *urip_res = "<list/>";
+static const char *urip_cur = NULL;
+static int urip_rlen;
+
+/**
+ * uripMatch:
+ * @URI: an URI to test
+ *
+ * Check for an urip: query
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+static int
+uripMatch(const char * URI) {
+ if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
+ return(0);
+ /* Verify we received the escaped URL */
+ if (strcmp(urip_rcvsURLs[urip_current], URI))
+ urip_success = 0;
+ return(1);
+}
+
+/**
+ * uripOpen:
+ * @URI: an URI to test
+ *
+ * Return a pointer to the urip: query handler, in this example simply
+ * the urip_current pointer...
+ *
+ * Returns an Input context or NULL in case or error
+ */
+static void *
+uripOpen(const char * URI) {
+ if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
+ return(NULL);
+ /* Verify we received the escaped URL */
+ if (strcmp(urip_rcvsURLs[urip_current], URI))
+ urip_success = 0;
+ urip_cur = urip_res;
+ urip_rlen = strlen(urip_res);
+ return((void *) urip_cur);
+}
+
+/**
+ * uripClose:
+ * @context: the read context
+ *
+ * Close the urip: query handler
+ *
+ * Returns 0 or -1 in case of error
+ */
+static int
+uripClose(void * context) {
+ if (context == NULL) return(-1);
+ urip_cur = NULL;
+ urip_rlen = 0;
+ return(0);
+}
+
+/**
+ * uripRead:
+ * @context: the read context
+ * @buffer: where to store data
+ * @len: number of bytes to read
+ *
+ * Implement an urip: query read.
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+static int
+uripRead(void * context, char * buffer, int len) {
+ const char *ptr = (const char *) context;
+
+ if ((context == NULL) || (buffer == NULL) || (len < 0))
+ return(-1);
+
+ if (len > urip_rlen) len = urip_rlen;
+ memcpy(buffer, ptr, len);
+ urip_rlen -= len;
+ return(len);
+}
+
+static int
+urip_checkURL(const char *URL) {
+ xmlDocPtr doc;
+
+ doc = xmlReadFile(URL, NULL, 0);
+ if (doc == NULL)
+ return(-1);
+ xmlFreeDoc(doc);
+ return(1);
+}
+
+/**
+ * uriPathTest:
+ * @filename: ignored
+ * @result: ignored
+ * @err: ignored
+ *
+ * Run a set of tests to check how Path and URI are handled before
+ * being passed to the I/O layer
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+uriPathTest(const char *filename ATTRIBUTE_UNUSED,
+ const char *result ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ int parsed;
+ int failures = 0;
+
+ /*
+ * register the new I/O handlers
+ */
+ if (xmlRegisterInputCallbacks(uripMatch, uripOpen, uripRead, uripClose) < 0)
+ {
+ fprintf(stderr, "failed to register HTTP handler\n");
+ return(-1);
+ }
+
+ for (urip_current = 0;urip_testURLs[urip_current] != NULL;urip_current++) {
+ urip_success = 1;
+ parsed = urip_checkURL(urip_testURLs[urip_current]);
+ if (urip_success != 1) {
+ fprintf(stderr, "failed the URL passing test for %s",
+ urip_testURLs[urip_current]);
+ failures++;
+ } else if (parsed != 1) {
+ fprintf(stderr, "failed the parsing test for %s",
+ urip_testURLs[urip_current]);
+ failures++;
+ }
+ nb_tests++;
+ }
+
+ xmlPopInputCallbacks();
+ return(failures);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+/************************************************************************
+ * *
+ * Schemas tests *
+ * *
+ ************************************************************************/
+static int
+schemasOneTest(const char *sch,
+ const char *filename,
+ const char *result,
+ const char *err,
+ int options,
+ xmlSchemaPtr schemas) {
+ xmlDocPtr doc;
+ xmlSchemaValidCtxtPtr ctxt;
+ int ret = 0;
+ int validResult = 0;
+ char *temp;
+ FILE *schemasOutput;
+
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL) {
+ fprintf(stderr, "failed to parse instance %s for %s\n", filename, sch);
+ return(-1);
+ }
+
+ temp = resultFilename(result, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ schemasOutput = fopen(temp, "wb");
+ if (schemasOutput == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ xmlFreeDoc(doc);
+ free(temp);
+ return(-1);
+ }
+
+ ctxt = xmlSchemaNewValidCtxt(schemas);
+ xmlSchemaSetValidErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) testErrorHandler,
+ (xmlSchemaValidityWarningFunc) testErrorHandler,
+ ctxt);
+ validResult = xmlSchemaValidateDoc(ctxt, doc);
+ if (validResult == 0) {
+ fprintf(schemasOutput, "%s validates\n", filename);
+ } else if (validResult > 0) {
+ fprintf(schemasOutput, "%s fails to validate\n", filename);
+ } else {
+ fprintf(schemasOutput, "%s validation generated an internal error\n",
+ filename);
+ }
+ fclose(schemasOutput);
+ if (result) {
+ if (compareFiles(temp, result)) {
+ fprintf(stderr, "Result for %s on %s failed\n", filename, sch);
+ ret = 1;
+ }
+ }
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+
+ if ((validResult != 0) && (err != NULL)) {
+ if (compareFileMem(err, testErrors, testErrorsSize)) {
+ fprintf(stderr, "Error for %s on %s failed\n", filename, sch);
+ ret = 1;
+ }
+ }
+
+ xmlSchemaFreeValidCtxt(ctxt);
+ xmlFreeDoc(doc);
+ return(ret);
+}
+/**
+ * schemasTest:
+ * @filename: the schemas file
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a file containing URI, compose them against a fixed base and
+ * check for errors
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+schemasTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *errr ATTRIBUTE_UNUSED,
+ int options) {
+ const char *base = baseFilename(filename);
+ const char *base2;
+ const char *instance;
+ xmlSchemaParserCtxtPtr ctxt;
+ xmlSchemaPtr schemas;
+ int res = 0, len, ret;
+ char pattern[500];
+ char prefix[500];
+ char result[500];
+ char err[500];
+ glob_t globbuf;
+ size_t i;
+ char count = 0;
+
+ /* first compile the schemas if possible */
+ ctxt = xmlSchemaNewParserCtxt(filename);
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) testErrorHandler,
+ (xmlSchemaValidityWarningFunc) testErrorHandler,
+ ctxt);
+ schemas = xmlSchemaParse(ctxt);
+ xmlSchemaFreeParserCtxt(ctxt);
+
+ /*
+ * most of the mess is about the output filenames generated by the Makefile
+ */
+ len = strlen(base);
+ if ((len > 499) || (len < 5)) {
+ xmlSchemaFree(schemas);
+ return(-1);
+ }
+ len -= 4; /* remove trailing .xsd */
+ if (base[len - 2] == '_') {
+ len -= 2; /* remove subtest number */
+ }
+ if (base[len - 2] == '_') {
+ len -= 2; /* remove subtest number */
+ }
+ memcpy(prefix, base, len);
+ prefix[len] = 0;
+
+ snprintf(pattern, 499, "./test/schemas/%s_?.xml", prefix);
+ pattern[499] = 0;
+
+ if (base[len] == '_') {
+ len += 2;
+ memcpy(prefix, base, len);
+ prefix[len] = 0;
+ }
+
+ globbuf.gl_offs = 0;
+ glob(pattern, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ instance = globbuf.gl_pathv[i];
+ base2 = baseFilename(instance);
+ len = strlen(base2);
+ if ((len > 6) && (base2[len - 6] == '_')) {
+ count = base2[len - 5];
+ snprintf(result, 499, "result/schemas/%s_%c",
+ prefix, count);
+ result[499] = 0;
+ snprintf(err, 499, "result/schemas/%s_%c.err",
+ prefix, count);
+ err[499] = 0;
+ } else {
+ fprintf(stderr, "don't know how to process %s\n", instance);
+ continue;
+ }
+ if (schemas == NULL) {
+ } else {
+ nb_tests++;
+ ret = schemasOneTest(filename, instance, result, err,
+ options, schemas);
+ if (ret != 0)
+ res = ret;
+ }
+ }
+ globfree(&globbuf);
+ xmlSchemaFree(schemas);
+
+ return(res);
+}
+
+/************************************************************************
+ * *
+ * Schemas tests *
+ * *
+ ************************************************************************/
+static int
+rngOneTest(const char *sch,
+ const char *filename,
+ const char *result,
+ const char *err,
+ int options,
+ xmlRelaxNGPtr schemas) {
+ xmlDocPtr doc;
+ xmlRelaxNGValidCtxtPtr ctxt;
+ int ret = 0;
+ char *temp;
+ FILE *schemasOutput;
+
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL) {
+ fprintf(stderr, "failed to parse instance %s for %s\n", filename, sch);
+ return(-1);
+ }
+
+ temp = resultFilename(result, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ schemasOutput = fopen(temp, "wb");
+ if (schemasOutput == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ xmlFreeDoc(doc);
+ free(temp);
+ return(-1);
+ }
+
+ ctxt = xmlRelaxNGNewValidCtxt(schemas);
+ xmlRelaxNGSetValidErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ ctxt);
+ ret = xmlRelaxNGValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ testErrorHandler(NULL, "%s validates\n", filename);
+ } else if (ret > 0) {
+ testErrorHandler(NULL, "%s fails to validate\n", filename);
+ } else {
+ testErrorHandler(NULL, "%s validation generated an internal error\n",
+ filename);
+ }
+ fclose(schemasOutput);
+ ret = 0;
+ if (result) {
+ if (compareFiles(temp, result)) {
+ fprintf(stderr, "Result for %s on %s failed\n", filename, sch);
+ ret = 1;
+ }
+ }
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+
+ if (err != NULL) {
+ if (compareFileMem(err, testErrors, testErrorsSize)) {
+ fprintf(stderr, "Error for %s on %s failed\n", filename, sch);
+ ret = 1;
+ printf("%s", testErrors);
+ }
+ }
+
+
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ xmlFreeDoc(doc);
+ return(ret);
+}
+/**
+ * rngTest:
+ * @filename: the schemas file
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse an RNG schemas and then apply it to the related .xml
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+rngTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *errr ATTRIBUTE_UNUSED,
+ int options) {
+ const char *base = baseFilename(filename);
+ const char *base2;
+ const char *instance;
+ xmlRelaxNGParserCtxtPtr ctxt;
+ xmlRelaxNGPtr schemas;
+ int res = 0, len, ret = 0;
+ char pattern[500];
+ char prefix[500];
+ char result[500];
+ char err[500];
+ glob_t globbuf;
+ size_t i;
+ char count = 0;
+
+ /* first compile the schemas if possible */
+ ctxt = xmlRelaxNGNewParserCtxt(filename);
+ xmlRelaxNGSetParserErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) testErrorHandler,
+ (xmlRelaxNGValidityWarningFunc) testErrorHandler,
+ ctxt);
+ schemas = xmlRelaxNGParse(ctxt);
+ xmlRelaxNGFreeParserCtxt(ctxt);
+
+ /*
+ * most of the mess is about the output filenames generated by the Makefile
+ */
+ len = strlen(base);
+ if ((len > 499) || (len < 5)) {
+ xmlRelaxNGFree(schemas);
+ return(-1);
+ }
+ len -= 4; /* remove trailing .rng */
+ memcpy(prefix, base, len);
+ prefix[len] = 0;
+
+ snprintf(pattern, 499, "./test/relaxng/%s_?.xml", prefix);
+ pattern[499] = 0;
+
+ globbuf.gl_offs = 0;
+ glob(pattern, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ instance = globbuf.gl_pathv[i];
+ base2 = baseFilename(instance);
+ len = strlen(base2);
+ if ((len > 6) && (base2[len - 6] == '_')) {
+ count = base2[len - 5];
+ snprintf(result, 499, "result/relaxng/%s_%c",
+ prefix, count);
+ result[499] = 0;
+ snprintf(err, 499, "result/relaxng/%s_%c.err",
+ prefix, count);
+ err[499] = 0;
+ } else {
+ fprintf(stderr, "don't know how to process %s\n", instance);
+ continue;
+ }
+ if (schemas == NULL) {
+ } else {
+ nb_tests++;
+ ret = rngOneTest(filename, instance, result, err,
+ options, schemas);
+ if (res != 0)
+ ret = res;
+ }
+ }
+ globfree(&globbuf);
+ xmlRelaxNGFree(schemas);
+
+ return(ret);
+}
+
+#ifdef LIBXML_READER_ENABLED
+/**
+ * rngStreamTest:
+ * @filename: the schemas file
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a set of files with streaming, applying an RNG schemas
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+rngStreamTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *errr ATTRIBUTE_UNUSED,
+ int options) {
+ const char *base = baseFilename(filename);
+ const char *base2;
+ const char *instance;
+ int res = 0, len, ret;
+ char pattern[500];
+ char prefix[500];
+ char result[500];
+ char err[500];
+ glob_t globbuf;
+ size_t i;
+ char count = 0;
+ xmlTextReaderPtr reader;
+ int disable_err = 0;
+
+ /*
+ * most of the mess is about the output filenames generated by the Makefile
+ */
+ len = strlen(base);
+ if ((len > 499) || (len < 5)) {
+ fprintf(stderr, "len(base) == %d !\n", len);
+ return(-1);
+ }
+ len -= 4; /* remove trailing .rng */
+ memcpy(prefix, base, len);
+ prefix[len] = 0;
+
+ /*
+ * strictly unifying the error messages is nearly impossible this
+ * hack is also done in the Makefile
+ */
+ if ((!strcmp(prefix, "tutor10_1")) || (!strcmp(prefix, "tutor10_2")) ||
+ (!strcmp(prefix, "tutor3_2")) || (!strcmp(prefix, "307377")) ||
+ (!strcmp(prefix, "tutor8_2")))
+ disable_err = 1;
+
+ snprintf(pattern, 499, "./test/relaxng/%s_?.xml", prefix);
+ pattern[499] = 0;
+
+ globbuf.gl_offs = 0;
+ glob(pattern, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ instance = globbuf.gl_pathv[i];
+ base2 = baseFilename(instance);
+ len = strlen(base2);
+ if ((len > 6) && (base2[len - 6] == '_')) {
+ count = base2[len - 5];
+ snprintf(result, 499, "result/relaxng/%s_%c",
+ prefix, count);
+ result[499] = 0;
+ snprintf(err, 499, "result/relaxng/%s_%c.err",
+ prefix, count);
+ err[499] = 0;
+ } else {
+ fprintf(stderr, "don't know how to process %s\n", instance);
+ continue;
+ }
+ reader = xmlReaderForFile(instance, NULL, options);
+ if (reader == NULL) {
+ fprintf(stderr, "Failed to build reder for %s\n", instance);
+ }
+ if (disable_err == 1)
+ ret = streamProcessTest(instance, result, NULL, reader, filename,
+ options);
+ else
+ ret = streamProcessTest(instance, result, err, reader, filename,
+ options);
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ fprintf(stderr, "instance %s failed\n", instance);
+ res = ret;
+ }
+ }
+ globfree(&globbuf);
+
+ return(res);
+}
+#endif /* READER */
+
+#endif
+
+#ifdef LIBXML_PATTERN_ENABLED
+#ifdef LIBXML_READER_ENABLED
+/************************************************************************
+ * *
+ * Patterns tests *
+ * *
+ ************************************************************************/
+static void patternNode(FILE *out, xmlTextReaderPtr reader,
+ const char *pattern, xmlPatternPtr patternc,
+ xmlStreamCtxtPtr patstream) {
+ xmlChar *path = NULL;
+ int match = -1;
+ int type, empty;
+
+ type = xmlTextReaderNodeType(reader);
+ empty = xmlTextReaderIsEmptyElement(reader);
+
+ if (type == XML_READER_TYPE_ELEMENT) {
+ /* do the check only on element start */
+ match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader));
+
+ if (match) {
+ path = xmlGetNodePath(xmlTextReaderCurrentNode(reader));
+ fprintf(out, "Node %s matches pattern %s\n", path, pattern);
+ }
+ }
+ if (patstream != NULL) {
+ int ret;
+
+ if (type == XML_READER_TYPE_ELEMENT) {
+ ret = xmlStreamPush(patstream,
+ xmlTextReaderConstLocalName(reader),
+ xmlTextReaderConstNamespaceUri(reader));
+ if (ret < 0) {
+ fprintf(out, "xmlStreamPush() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ } else if (ret != match) {
+ if (path == NULL) {
+ path = xmlGetNodePath(
+ xmlTextReaderCurrentNode(reader));
+ }
+ fprintf(out,
+ "xmlPatternMatch and xmlStreamPush disagree\n");
+ fprintf(out,
+ " pattern %s node %s\n",
+ pattern, path);
+ }
+
+
+ }
+ if ((type == XML_READER_TYPE_END_ELEMENT) ||
+ ((type == XML_READER_TYPE_ELEMENT) && (empty))) {
+ ret = xmlStreamPop(patstream);
+ if (ret < 0) {
+ fprintf(out, "xmlStreamPop() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+ }
+ }
+ if (path != NULL)
+ xmlFree(path);
+}
+
+/**
+ * patternTest:
+ * @filename: the schemas file
+ * @result: the file with expected result
+ * @err: the file with error messages
+ *
+ * Parse a set of files with streaming, applying an RNG schemas
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+patternTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options) {
+ xmlPatternPtr patternc = NULL;
+ xmlStreamCtxtPtr patstream = NULL;
+ FILE *o, *f;
+ char str[1024];
+ char xml[500];
+ char result[500];
+ int len, i;
+ int ret = 0, res;
+ char *temp;
+ xmlTextReaderPtr reader;
+ xmlDocPtr doc;
+
+ len = strlen(filename);
+ len -= 4;
+ memcpy(xml, filename, len);
+ xml[len] = 0;
+ snprintf(result, 499, "result/pattern/%s", baseFilename(xml));
+ result[499] = 0;
+ memcpy(xml + len, ".xml", 5);
+
+ if (!checkTestFile(xml)) {
+ fprintf(stderr, "Missing xml file %s\n", xml);
+ return(-1);
+ }
+ if (!checkTestFile(result)) {
+ fprintf(stderr, "Missing result file %s\n", result);
+ return(-1);
+ }
+ f = fopen(filename, "rb");
+ if (f == NULL) {
+ fprintf(stderr, "Failed to open %s\n", filename);
+ return(-1);
+ }
+ temp = resultFilename(filename, "", ".res");
+ if (temp == NULL) {
+ fprintf(stderr, "Out of memory\n");
+ fatalError();
+ }
+ o = fopen(temp, "wb");
+ if (o == NULL) {
+ fprintf(stderr, "failed to open output file %s\n", temp);
+ fclose(f);
+ free(temp);
+ return(-1);
+ }
+ while (1) {
+ /*
+ * read one line in string buffer.
+ */
+ if (fgets (&str[0], sizeof (str) - 1, f) == NULL)
+ break;
+
+ /*
+ * remove the ending spaces
+ */
+ i = strlen(str);
+ while ((i > 0) &&
+ ((str[i - 1] == '\n') || (str[i - 1] == '\r') ||
+ (str[i - 1] == ' ') || (str[i - 1] == '\t'))) {
+ i--;
+ str[i] = 0;
+ }
+ doc = xmlReadFile(xml, NULL, options);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse %s\n", xml);
+ ret = 1;
+ } else {
+ xmlNodePtr root;
+ const xmlChar *namespaces[22];
+ int j;
+ xmlNsPtr ns;
+
+ root = xmlDocGetRootElement(doc);
+ for (ns = root->nsDef, j = 0;ns != NULL && j < 20;ns=ns->next) {
+ namespaces[j++] = ns->href;
+ namespaces[j++] = ns->prefix;
+ }
+ namespaces[j++] = NULL;
+ namespaces[j] = NULL;
+
+ patternc = xmlPatterncompile((const xmlChar *) str, doc->dict,
+ 0, &namespaces[0]);
+ if (patternc == NULL) {
+ testErrorHandler(NULL,
+ "Pattern %s failed to compile\n", str);
+ xmlFreeDoc(doc);
+ ret = 1;
+ continue;
+ }
+ patstream = xmlPatternGetStreamCtxt(patternc);
+ if (patstream != NULL) {
+ ret = xmlStreamPush(patstream, NULL, NULL);
+ if (ret < 0) {
+ fprintf(stderr, "xmlStreamPush() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+ }
+ nb_tests++;
+
+ reader = xmlReaderWalker(doc);
+ res = xmlTextReaderRead(reader);
+ while (res == 1) {
+ patternNode(o, reader, str, patternc, patstream);
+ res = xmlTextReaderRead(reader);
+ }
+ if (res != 0) {
+ fprintf(o, "%s : failed to parse\n", filename);
+ }
+ xmlFreeTextReader(reader);
+ xmlFreeDoc(doc);
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ xmlFreePattern(patternc);
+
+ }
+ }
+
+ fclose(f);
+ fclose(o);
+
+ ret = compareFiles(temp, result);
+ if (ret) {
+ fprintf(stderr, "Result for %s failed\n", filename);
+ ret = 1;
+ }
+ if (temp != NULL) {
+ unlink(temp);
+ free(temp);
+ }
+ return(ret);
+}
+#endif /* READER */
+#endif /* PATTERN */
+#ifdef LIBXML_C14N_ENABLED
+/************************************************************************
+ * *
+ * Canonicalization tests *
+ * *
+ ************************************************************************/
+static xmlXPathObjectPtr
+load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
+ xmlXPathObjectPtr xpath;
+ xmlDocPtr doc;
+ xmlChar *expr;
+ xmlXPathContextPtr ctx;
+ xmlNodePtr node;
+ xmlNsPtr ns;
+
+ /*
+ * load XPath expr as a file
+ */
+ xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ xmlSubstituteEntitiesDefault(1);
+
+ doc = xmlReadFile(filename, NULL, XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
+ return(NULL);
+ }
+
+ /*
+ * Check the document is of the right kind
+ */
+ if(xmlDocGetRootElement(doc) == NULL) {
+ fprintf(stderr,"Error: empty document for file \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ node = doc->children;
+ while(node != NULL && !xmlStrEqual(node->name, (const xmlChar *)"XPath")) {
+ node = node->next;
+ }
+
+ if(node == NULL) {
+ fprintf(stderr,"Error: XPath element expected in the file \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ expr = xmlNodeGetContent(node);
+ if(expr == NULL) {
+ fprintf(stderr,"Error: XPath content element is NULL \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ ctx = xmlXPathNewContext(parent_doc);
+ if(ctx == NULL) {
+ fprintf(stderr,"Error: unable to create new context\n");
+ xmlFree(expr);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ /*
+ * Register namespaces
+ */
+ ns = node->nsDef;
+ while(ns != NULL) {
+ if(xmlXPathRegisterNs(ctx, ns->prefix, ns->href) != 0) {
+ fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", ns->prefix, ns->href);
+ xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ ns = ns->next;
+ }
+
+ /*
+ * Evaluate xpath
+ */
+ xpath = xmlXPathEvalExpression(expr, ctx);
+ if(xpath == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression\n");
+xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ /* print_xpath_nodes(xpath->nodesetval); */
+
+ xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(xpath);
+}
+
+/*
+ * Macro used to grow the current buffer.
+ */
+#define xxx_growBufferReentrant() { \
+ buffer_size *= 2; \
+ buffer = (xmlChar **) \
+ xmlRealloc(buffer, buffer_size * sizeof(xmlChar*)); \
+ if (buffer == NULL) { \
+ perror("realloc failed"); \
+ return(NULL); \
+ } \
+}
+
+static xmlChar **
+parse_list(xmlChar *str) {
+ xmlChar **buffer;
+ xmlChar **out = NULL;
+ int buffer_size = 0;
+ int len;
+
+ if(str == NULL) {
+ return(NULL);
+ }
+
+ len = xmlStrlen(str);
+ if((str[0] == '\'') && (str[len - 1] == '\'')) {
+ str[len - 1] = '\0';
+ str++;
+ }
+ /*
+ * allocate an translation buffer.
+ */
+ buffer_size = 1000;
+ buffer = (xmlChar **) xmlMalloc(buffer_size * sizeof(xmlChar*));
+ if (buffer == NULL) {
+ perror("malloc failed");
+ return(NULL);
+ }
+ out = buffer;
+
+ while(*str != '\0') {
+ if (out - buffer > buffer_size - 10) {
+ int indx = out - buffer;
+
+ xxx_growBufferReentrant();
+ out = &buffer[indx];
+ }
+ (*out++) = str;
+ while(*str != ',' && *str != '\0') ++str;
+ if(*str == ',') *(str++) = '\0';
+ }
+ (*out) = NULL;
+ return buffer;
+}
+
+static int
+c14nRunTest(const char* xml_filename, int with_comments, int mode,
+ const char* xpath_filename, const char *ns_filename,
+ const char* result_file) {
+ xmlDocPtr doc;
+ xmlXPathObjectPtr xpath = NULL;
+ xmlChar *result = NULL;
+ int ret;
+ xmlChar **inclusive_namespaces = NULL;
+ const char *nslist = NULL;
+ int nssize;
+
+
+ /*
+ * build an XML tree from a the file; we need to add default
+ * attributes and resolve all character and entities references
+ */
+ xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ xmlSubstituteEntitiesDefault(1);
+
+ doc = xmlReadFile(xml_filename, NULL, XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", xml_filename);
+ return(-1);
+ }
+
+ /*
+ * Check the document is of the right kind
+ */
+ if(xmlDocGetRootElement(doc) == NULL) {
+ fprintf(stderr,"Error: empty document for file \"%s\"\n", xml_filename);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /*
+ * load xpath file if specified
+ */
+ if(xpath_filename) {
+ xpath = load_xpath_expr(doc, xpath_filename);
+ if(xpath == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression\n");
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ }
+
+ if (ns_filename != NULL) {
+ if (loadMem(ns_filename, &nslist, &nssize)) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression\n");
+ if(xpath != NULL) xmlXPathFreeObject(xpath);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ inclusive_namespaces = parse_list((xmlChar *) nslist);
+ }
+
+ /*
+ * Canonical form
+ */
+ /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */
+ ret = xmlC14NDocDumpMemory(doc,
+ (xpath) ? xpath->nodesetval : NULL,
+ mode, inclusive_namespaces,
+ with_comments, &result);
+ if (ret >= 0) {
+ if(result != NULL) {
+ if (compareFileMem(result_file, (const char *) result, ret)) {
+ fprintf(stderr, "Result mismatch for %s\n", xml_filename);
+ fprintf(stderr, "RESULT:\n%s\n", (const char*)result);
+ ret = -1;
+ }
+ }
+ } else {
+ fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", xml_filename, ret);
+ ret = -1;
+ }
+
+ /*
+ * Cleanup
+ */
+ if (result != NULL) xmlFree(result);
+ if(xpath != NULL) xmlXPathFreeObject(xpath);
+ if (inclusive_namespaces != NULL) xmlFree(inclusive_namespaces);
+ if (nslist != NULL) free((char *) nslist);
+ xmlFreeDoc(doc);
+
+ return(ret);
+}
+
+static int
+c14nCommonTest(const char *filename, int with_comments, int mode,
+ const char *subdir) {
+ char buf[500];
+ char prefix[500];
+ const char *base;
+ int len;
+ char *result = NULL;
+ char *xpath = NULL;
+ char *ns = NULL;
+ int ret = 0;
+
+ base = baseFilename(filename);
+ len = strlen(base);
+ len -= 4;
+ memcpy(prefix, base, len);
+ prefix[len] = 0;
+
+ snprintf(buf, 499, "result/c14n/%s/%s", subdir,prefix);
+ if (!checkTestFile(buf)) {
+ fprintf(stderr, "Missing result file %s", buf);
+ return(-1);
+ }
+ result = strdup(buf);
+ snprintf(buf, 499, "test/c14n/%s/%s.xpath", subdir,prefix);
+ if (checkTestFile(buf)) {
+ xpath = strdup(buf);
+ }
+ snprintf(buf, 499, "test/c14n/%s/%s.ns", subdir,prefix);
+ if (checkTestFile(buf)) {
+ ns = strdup(buf);
+ }
+
+ nb_tests++;
+ if (c14nRunTest(filename, with_comments, mode,
+ xpath, ns, result) < 0)
+ ret = 1;
+
+ if (result != NULL) free(result);
+ if (xpath != NULL) free(xpath);
+ if (ns != NULL) free(ns);
+ return(ret);
+}
+
+static int
+c14nWithCommentTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(c14nCommonTest(filename, 1, XML_C14N_1_0, "with-comments"));
+}
+static int
+c14nWithoutCommentTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(c14nCommonTest(filename, 0, XML_C14N_1_0, "without-comments"));
+}
+static int
+c14nExcWithoutCommentTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(c14nCommonTest(filename, 0, XML_C14N_EXCLUSIVE_1_0, "exc-without-comments"));
+}
+static int
+c14n11WithoutCommentTest(const char *filename,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(c14nCommonTest(filename, 0, XML_C14N_1_1, "1-1-without-comments"));
+}
+#endif
+#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined (LIBXML_SAX1_ENABLED)
+/************************************************************************
+ * *
+ * Catalog and threads test *
+ * *
+ ************************************************************************/
+
+/*
+ * mostly a cut and paste from testThreads.c
+ */
+#define MAX_ARGC 20
+
+static const char *catalog = "test/threads/complex.xml";
+static const char *testfiles[] = {
+ "test/threads/abc.xml",
+ "test/threads/acb.xml",
+ "test/threads/bac.xml",
+ "test/threads/bca.xml",
+ "test/threads/cab.xml",
+ "test/threads/cba.xml",
+ "test/threads/invalid.xml",
+};
+
+static const char *Okay = "OK";
+static const char *Failed = "Failed";
+
+#ifndef xmlDoValidityCheckingDefaultValue
+#error xmlDoValidityCheckingDefaultValue is not a macro
+#endif
+#ifndef xmlGenericErrorContext
+#error xmlGenericErrorContext is not a macro
+#endif
+
+static void *
+thread_specific_data(void *private_data)
+{
+ xmlDocPtr myDoc;
+ const char *filename = (const char *) private_data;
+ int okay = 1;
+
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ xmlDoValidityCheckingDefaultValue = 0;
+ xmlGenericErrorContext = stdout;
+ } else {
+ xmlDoValidityCheckingDefaultValue = 1;
+ xmlGenericErrorContext = stderr;
+ }
+ myDoc = xmlParseFile(filename);
+ if (myDoc) {
+ xmlFreeDoc(myDoc);
+ } else {
+ printf("parse failed\n");
+ okay = 0;
+ }
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ if (xmlDoValidityCheckingDefaultValue != 0) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stdout) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ } else {
+ if (xmlDoValidityCheckingDefaultValue != 1) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stderr) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ }
+ if (okay == 0)
+ return ((void *) Failed);
+ return ((void *) Okay);
+}
+
+#if defined WIN32
+#include <windows.h>
+#include <string.h>
+
+#define TEST_REPEAT_COUNT 500
+
+static HANDLE tid[MAX_ARGC];
+
+static DWORD WINAPI
+win32_thread_specific_data(void *private_data)
+{
+ return((DWORD) thread_specific_data(private_data));
+}
+
+static int
+testThread(void)
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ DWORD results[MAX_ARGC];
+ BOOL ret;
+ int res = 0;
+
+ xmlInitParser();
+ for (repeat = 0; repeat < TEST_REPEAT_COUNT; repeat++) {
+ xmlLoadCatalog(catalog);
+ nb_tests++;
+
+ for (i = 0; i < num_threads; i++) {
+ results[i] = 0;
+ tid[i] = (HANDLE) - 1;
+ }
+
+ for (i = 0; i < num_threads; i++) {
+ DWORD useless;
+
+ tid[i] = CreateThread(NULL, 0,
+ win32_thread_specific_data,
+ (void *) testfiles[i], 0,
+ &useless);
+ if (tid[i] == NULL) {
+ fprintf(stderr, "CreateThread failed\n");
+ return(1);
+ }
+ }
+
+ if (WaitForMultipleObjects(num_threads, tid, TRUE, INFINITE) ==
+ WAIT_FAILED) {
+ fprintf(stderr, "WaitForMultipleObjects failed\n");
+ return(1);
+ }
+
+ for (i = 0; i < num_threads; i++) {
+ ret = GetExitCodeThread(tid[i], &results[i]);
+ if (ret == 0) {
+ fprintf(stderr, "GetExitCodeThread failed\n");
+ return(1);
+ }
+ CloseHandle(tid[i]);
+ }
+
+ xmlCatalogCleanup();
+ for (i = 0; i < num_threads; i++) {
+ if (results[i] != (DWORD) Okay) {
+ fprintf(stderr, "Thread %d handling %s failed\n",
+ i, testfiles[i]);
+ res = 1;
+ }
+ }
+ }
+
+ return (res);
+}
+
+#elif defined __BEOS__
+#include <OS.h>
+
+static thread_id tid[MAX_ARGC];
+
+static int
+testThread(void)
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ void *results[MAX_ARGC];
+ status_t ret;
+ int res = 0;
+
+ xmlInitParser();
+ for (repeat = 0; repeat < 500; repeat++) {
+ xmlLoadCatalog(catalog);
+ for (i = 0; i < num_threads; i++) {
+ results[i] = NULL;
+ tid[i] = (thread_id) - 1;
+ }
+ for (i = 0; i < num_threads; i++) {
+ tid[i] =
+ spawn_thread(thread_specific_data, "xmlTestThread",
+ B_NORMAL_PRIORITY, (void *) testfiles[i]);
+ if (tid[i] < B_OK) {
+ fprintf(stderr, "beos_thread_create failed\n");
+ return (1);
+ }
+ printf("beos_thread_create %d -> %d\n", i, tid[i]);
+ }
+ for (i = 0; i < num_threads; i++) {
+ ret = wait_for_thread(tid[i], &results[i]);
+ printf("beos_thread_wait %d -> %d\n", i, ret);
+ if (ret != B_OK) {
+ fprintf(stderr, "beos_thread_wait failed\n");
+ return (1);
+ }
+ }
+
+ xmlCatalogCleanup();
+ ret = B_OK;
+ for (i = 0; i < num_threads; i++)
+ if (results[i] != (void *) Okay) {
+ printf("Thread %d handling %s failed\n", i, testfiles[i]);
+ ret = B_ERROR;
+ }
+ }
+ if (ret != B_OK)
+ return(1);
+ return (0);
+}
+
+#elif defined HAVE_PTHREAD_H
+#include <pthread.h>
+
+static pthread_t tid[MAX_ARGC];
+
+static int
+testThread(void)
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ void *results[MAX_ARGC];
+ int ret;
+ int res = 0;
+
+ xmlInitParser();
+
+ for (repeat = 0; repeat < 500; repeat++) {
+ xmlLoadCatalog(catalog);
+ nb_tests++;
+
+ for (i = 0; i < num_threads; i++) {
+ results[i] = NULL;
+ tid[i] = (pthread_t) - 1;
+ }
+
+ for (i = 0; i < num_threads; i++) {
+ ret = pthread_create(&tid[i], 0, thread_specific_data,
+ (void *) testfiles[i]);
+ if (ret != 0) {
+ fprintf(stderr, "pthread_create failed\n");
+ return (1);
+ }
+ }
+ for (i = 0; i < num_threads; i++) {
+ ret = pthread_join(tid[i], &results[i]);
+ if (ret != 0) {
+ fprintf(stderr, "pthread_join failed\n");
+ return (1);
+ }
+ }
+
+ xmlCatalogCleanup();
+ for (i = 0; i < num_threads; i++)
+ if (results[i] != (void *) Okay) {
+ fprintf(stderr, "Thread %d handling %s failed\n",
+ i, testfiles[i]);
+ res = 1;
+ }
+ }
+ return (res);
+}
+
+#else
+static int
+testThread(void)
+{
+ fprintf(stderr,
+ "Specific platform thread support not detected\n");
+ return (-1);
+}
+#endif
+static int
+threadsTest(const char *filename ATTRIBUTE_UNUSED,
+ const char *resul ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ return(testThread());
+}
+#endif
+/************************************************************************
+ * *
+ * Tests Descriptions *
+ * *
+ ************************************************************************/
+
+static
+testDesc testDescriptions[] = {
+ { "XML regression tests" ,
+ oldParseTest, "./test/*", "result/", "", NULL,
+ 0 },
+ { "XML regression tests on memory" ,
+ memParseTest, "./test/*", "result/", "", NULL,
+ 0 },
+ { "XML entity subst regression tests" ,
+ noentParseTest, "./test/*", "result/noent/", "", NULL,
+ XML_PARSE_NOENT },
+ { "XML Namespaces regression tests",
+ errParseTest, "./test/namespaces/*", "result/namespaces/", "", ".err",
+ 0 },
+ { "Error cases regression tests",
+ errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
+ 0 },
+#ifdef LIBXML_READER_ENABLED
+ { "Error cases stream regression tests",
+ streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
+ 0 },
+ { "Reader regression tests",
+ streamParseTest, "./test/*", "result/", ".rdr", NULL,
+ 0 },
+ { "Reader entities substitution regression tests",
+ streamParseTest, "./test/*", "result/", ".rde", NULL,
+ XML_PARSE_NOENT },
+ { "Reader on memory regression tests",
+ streamMemParseTest, "./test/*", "result/", ".rdr", NULL,
+ 0 },
+ { "Walker regression tests",
+ walkerParseTest, "./test/*", "result/", ".rdr", NULL,
+ 0 },
+#endif
+#ifdef LIBXML_SAX1_ENABLED
+ { "SAX1 callbacks regression tests" ,
+ saxParseTest, "./test/*", "result/", ".sax", NULL,
+ XML_PARSE_SAX1 },
+ { "SAX2 callbacks regression tests" ,
+ saxParseTest, "./test/*", "result/", ".sax2", NULL,
+ 0 },
+#endif
+#ifdef LIBXML_PUSH_ENABLED
+ { "XML push regression tests" ,
+ pushParseTest, "./test/*", "result/", "", NULL,
+ 0 },
+#endif
+#ifdef LIBXML_HTML_ENABLED
+ { "HTML regression tests" ,
+ errParseTest, "./test/HTML/*", "result/HTML/", "", ".err",
+ XML_PARSE_HTML },
+#ifdef LIBXML_PUSH_ENABLED
+ { "Push HTML regression tests" ,
+ pushParseTest, "./test/HTML/*", "result/HTML/", "", ".err",
+ XML_PARSE_HTML },
+#endif
+#ifdef LIBXML_SAX1_ENABLED
+ { "HTML SAX regression tests" ,
+ saxParseTest, "./test/HTML/*", "result/HTML/", ".sax", NULL,
+ XML_PARSE_HTML },
+#endif
+#endif
+#ifdef LIBXML_VALID_ENABLED
+ { "Valid documents regression tests" ,
+ errParseTest, "./test/VCM/*", NULL, NULL, NULL,
+ XML_PARSE_DTDVALID },
+ { "Validity checking regression tests" ,
+ errParseTest, "./test/VC/*", "result/VC/", NULL, "",
+ XML_PARSE_DTDVALID },
+#ifdef LIBXML_READER_ENABLED
+ { "Streaming validity checking regression tests" ,
+ streamParseTest, "./test/valid/*.xml", "result/valid/", NULL, ".err.rdr",
+ XML_PARSE_DTDVALID },
+ { "Streaming validity error checking regression tests" ,
+ streamParseTest, "./test/VC/*", "result/VC/", NULL, ".rdr",
+ XML_PARSE_DTDVALID },
+#endif
+ { "General documents valid regression tests" ,
+ errParseTest, "./test/valid/*", "result/valid/", "", ".err",
+ XML_PARSE_DTDVALID },
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+ { "XInclude regression tests" ,
+ errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL,
+ /* Ignore errors at this point ".err", */
+ XML_PARSE_XINCLUDE },
+#ifdef LIBXML_READER_ENABLED
+ { "XInclude xmlReader regression tests",
+ streamParseTest, "./test/XInclude/docs/*", "result/XInclude/", ".rdr",
+ /* Ignore errors at this point ".err", */
+ NULL, XML_PARSE_XINCLUDE },
+#endif
+ { "XInclude regression tests stripping include nodes" ,
+ errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL,
+ /* Ignore errors at this point ".err", */
+ XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE },
+#ifdef LIBXML_READER_ENABLED
+ { "XInclude xmlReader regression tests stripping include nodes",
+ streamParseTest, "./test/XInclude/docs/*", "result/XInclude/", ".rdr",
+ /* Ignore errors at this point ".err", */
+ NULL, XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE },
+#endif
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+ { "XPath expressions regression tests" ,
+ xpathExprTest, "./test/XPath/expr/*", "result/XPath/expr/", "", NULL,
+ 0 },
+ { "XPath document queries regression tests" ,
+ xpathDocTest, "./test/XPath/docs/*", NULL, NULL, NULL,
+ 0 },
+#ifdef LIBXML_XPTR_ENABLED
+ { "XPointer document queries regression tests" ,
+ xptrDocTest, "./test/XPath/docs/*", NULL, NULL, NULL,
+ 0 },
+#endif
+ { "xml:id regression tests" ,
+ xmlidDocTest, "./test/xmlid/*", "result/xmlid/", "", ".err",
+ 0 },
+#endif
+#endif
+ { "URI parsing tests" ,
+ uriParseTest, "./test/URI/*.uri", "result/URI/", "", NULL,
+ 0 },
+ { "URI base composition tests" ,
+ uriBaseTest, "./test/URI/*.data", "result/URI/", "", NULL,
+ 0 },
+ { "Path URI conversion tests" ,
+ uriPathTest, NULL, NULL, NULL, NULL,
+ 0 },
+#ifdef LIBXML_SCHEMAS_ENABLED
+ { "Schemas regression tests" ,
+ schemasTest, "./test/schemas/*_*.xsd", NULL, NULL, NULL,
+ 0 },
+ { "Relax-NG regression tests" ,
+ rngTest, "./test/relaxng/*.rng", NULL, NULL, NULL,
+ XML_PARSE_DTDATTR | XML_PARSE_NOENT },
+#ifdef LIBXML_READER_ENABLED
+ { "Relax-NG streaming regression tests" ,
+ rngStreamTest, "./test/relaxng/*.rng", NULL, NULL, NULL,
+ XML_PARSE_DTDATTR | XML_PARSE_NOENT },
+#endif
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+#ifdef LIBXML_READER_ENABLED
+ { "Pattern regression tests" ,
+ patternTest, "./test/pattern/*.pat", "result/pattern/", NULL, NULL,
+ 0 },
+#endif
+#endif
+#ifdef LIBXML_C14N_ENABLED
+ { "C14N with comments regression tests" ,
+ c14nWithCommentTest, "./test/c14n/with-comments/*.xml", NULL, NULL, NULL,
+ 0 },
+ { "C14N without comments regression tests" ,
+ c14nWithoutCommentTest, "./test/c14n/without-comments/*.xml", NULL, NULL, NULL,
+ 0 },
+ { "C14N exclusive without comments regression tests" ,
+ c14nExcWithoutCommentTest, "./test/c14n/exc-without-comments/*.xml", NULL, NULL, NULL,
+ 0 },
+ { "C14N 1.1 without comments regression tests" ,
+ c14n11WithoutCommentTest, "./test/c14n/1-1-without-comments/*.xml", NULL, NULL, NULL,
+ 0 },
+#endif
+#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED)
+ { "Catalog and Threads regression tests" ,
+ threadsTest, NULL, NULL, NULL, NULL,
+ 0 },
+#endif
+ {NULL, NULL, NULL, NULL, NULL, NULL, 0}
+};
+
+/************************************************************************
+ * *
+ * The main code driving the tests *
+ * *
+ ************************************************************************/
+
+static int
+launchTests(testDescPtr tst) {
+ int res = 0, err = 0;
+ size_t i;
+ char *result;
+ char *error;
+ int mem;
+
+ if (tst == NULL) return(-1);
+ if (tst->in != NULL) {
+ glob_t globbuf;
+
+ globbuf.gl_offs = 0;
+ glob(tst->in, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ if (!checkTestFile(globbuf.gl_pathv[i]))
+ continue;
+ if (tst->suffix != NULL) {
+ result = resultFilename(globbuf.gl_pathv[i], tst->out,
+ tst->suffix);
+ if (result == NULL) {
+ fprintf(stderr, "Out of memory !\n");
+ fatalError();
+ }
+ } else {
+ result = NULL;
+ }
+ if (tst->err != NULL) {
+ error = resultFilename(globbuf.gl_pathv[i], tst->out,
+ tst->err);
+ if (error == NULL) {
+ fprintf(stderr, "Out of memory !\n");
+ fatalError();
+ }
+ } else {
+ error = NULL;
+ }
+ if ((result) &&(!checkTestFile(result))) {
+ fprintf(stderr, "Missing result file %s\n", result);
+ } else if ((error) &&(!checkTestFile(error))) {
+ fprintf(stderr, "Missing error file %s\n", error);
+ } else {
+ mem = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ res = tst->func(globbuf.gl_pathv[i], result, error,
+ tst->options | XML_PARSE_COMPACT);
+ xmlResetLastError();
+ if (res != 0) {
+ fprintf(stderr, "File %s generated an error\n",
+ globbuf.gl_pathv[i]);
+ nb_errors++;
+ err++;
+ }
+ else if (xmlMemUsed() != mem) {
+ if ((xmlMemUsed() != mem) &&
+ (extraMemoryFromResolver == 0)) {
+ fprintf(stderr, "File %s leaked %d bytes\n",
+ globbuf.gl_pathv[i], xmlMemUsed() - mem);
+ nb_leaks++;
+ err++;
+ }
+ }
+ testErrorsSize = 0;
+ }
+ if (result)
+ free(result);
+ if (error)
+ free(error);
+ }
+ globfree(&globbuf);
+ } else {
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ extraMemoryFromResolver = 0;
+ res = tst->func(NULL, NULL, NULL, tst->options);
+ if (res != 0) {
+ nb_errors++;
+ err++;
+ }
+ }
+ return(err);
+}
+
+static int verbose = 0;
+static int tests_quiet = 0;
+
+static int
+runtest(int i) {
+ int ret = 0, res;
+ int old_errors, old_tests, old_leaks;
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ if ((tests_quiet == 0) && (testDescriptions[i].desc != NULL))
+ printf("## %s\n", testDescriptions[i].desc);
+ res = launchTests(&testDescriptions[i]);
+ if (res != 0)
+ ret++;
+ if (verbose) {
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ }
+ return(ret);
+}
+
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ int i, a, ret = 0;
+ int subset = 0;
+
+ initializeLibxml2();
+
+ for (a = 1; a < argc;a++) {
+ if (!strcmp(argv[a], "-v"))
+ verbose = 1;
+ else if (!strcmp(argv[a], "-quiet"))
+ tests_quiet = 1;
+ else {
+ for (i = 0; testDescriptions[i].func != NULL; i++) {
+ if (strstr(testDescriptions[i].desc, argv[a])) {
+ ret += runtest(i);
+ subset++;
+ }
+ }
+ }
+ }
+ if (subset == 0) {
+ for (i = 0; testDescriptions[i].func != NULL; i++) {
+ ret += runtest(i);
+ }
+ }
+ if ((nb_errors == 0) && (nb_leaks == 0)) {
+ ret = 0;
+ printf("Total %d tests, no errors\n",
+ nb_tests);
+ } else {
+ ret = 1;
+ printf("Total %d tests, %d errors, %d leaks\n",
+ nb_tests, nb_errors, nb_leaks);
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(ret);
+}
+
+#else /* ! LIBXML_OUTPUT_ENABLED */
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ fprintf(stderr, "runtest requires output to be enabled in libxml2\n");
+ return(1);
+}
+#endif
diff --git a/runxmlconf.c b/runxmlconf.c
new file mode 100644
index 0000000..cef20f4
--- /dev/null
+++ b/runxmlconf.c
@@ -0,0 +1,607 @@
+/*
+ * runsuite.c: C program to run libxml2 againts published testsuites
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#include <libxml/xmlreader.h>
+
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#define LOGFILE "runxmlconf.log"
+static FILE *logfile = NULL;
+static int verbose = 0;
+
+#define NB_EXPECTED_ERRORS 15
+
+
+const char *skipped_tests[] = {
+/* http://lists.w3.org/Archives/Public/public-xml-testsuite/2008Jul/0000.html */
+ "rmt-ns10-035",
+ NULL
+};
+
+/************************************************************************
+ * *
+ * File name and path utilities *
+ * *
+ ************************************************************************/
+
+static int checkTestFile(const char *filename) {
+ struct stat buf;
+
+ if (stat(filename, &buf) == -1)
+ return(0);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (!(buf.st_mode & _S_IFREG))
+ return(0);
+#else
+ if (!S_ISREG(buf.st_mode))
+ return(0);
+#endif
+
+ return(1);
+}
+
+static xmlChar *composeDir(const xmlChar *dir, const xmlChar *path) {
+ char buf[500];
+
+ if (dir == NULL) return(xmlStrdup(path));
+ if (path == NULL) return(NULL);
+
+ snprintf(buf, 500, "%s/%s", (const char *) dir, (const char *) path);
+ return(xmlStrdup((const xmlChar *) buf));
+}
+
+/************************************************************************
+ * *
+ * Libxml2 specific routines *
+ * *
+ ************************************************************************/
+
+static int nb_skipped = 0;
+static int nb_tests = 0;
+static int nb_errors = 0;
+static int nb_leaks = 0;
+
+/*
+ * We need to trap calls to the resolver to not account memory for the catalog
+ * and not rely on any external resources.
+ */
+static xmlParserInputPtr
+testExternalEntityLoader(const char *URL, const char *ID ATTRIBUTE_UNUSED,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+
+ ret = xmlNewInputFromFile(ctxt, (const char *) URL);
+
+ return(ret);
+}
+
+/*
+ * Trapping the error messages at the generic level to grab the equivalent of
+ * stderr messages on CLI tools.
+ */
+static char testErrors[32769];
+static int testErrorsSize = 0;
+static int nbError = 0;
+static int nbFatal = 0;
+
+static void test_log(const char *msg, ...) {
+ va_list args;
+ if (logfile != NULL) {
+ fprintf(logfile, "\n------------\n");
+ va_start(args, msg);
+ vfprintf(logfile, msg, args);
+ va_end(args);
+ fprintf(logfile, "%s", testErrors);
+ testErrorsSize = 0; testErrors[0] = 0;
+ }
+ if (verbose) {
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+ }
+}
+
+static void
+testErrorHandler(void *userData ATTRIBUTE_UNUSED, xmlErrorPtr error) {
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ res = snprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ "%s:%d: %s\n", (error->file ? error->file : "entity"),
+ error->line, error->message);
+ if (error->level == XML_ERR_FATAL)
+ nbFatal++;
+ else if (error->level == XML_ERR_ERROR)
+ nbError++;
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+static xmlXPathContextPtr ctxtXPath;
+
+static void
+initializeLibxml2(void) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlInitParser();
+ xmlSetExternalEntityLoader(testExternalEntityLoader);
+ ctxtXPath = xmlXPathNewContext(NULL);
+ /*
+ * Deactivate the cache if created; otherwise we have to create/free it
+ * for every test, since it will confuse the memory leak detection.
+ * Note that normally this need not be done, since the cache is not
+ * created until set explicitely with xmlXPathContextSetCache();
+ * but for test purposes it is sometimes usefull to activate the
+ * cache by default for the whole library.
+ */
+ if (ctxtXPath->cache != NULL)
+ xmlXPathContextSetCache(ctxtXPath, 0, -1, 0);
+ xmlSetStructuredErrorFunc(NULL, testErrorHandler);
+}
+
+/************************************************************************
+ * *
+ * Run the xmlconf test if found *
+ * *
+ ************************************************************************/
+
+static int
+xmlconfTestInvalid(const char *id, const char *filename, int options) {
+ xmlDocPtr doc;
+ xmlParserCtxtPtr ctxt;
+ int ret = 1;
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ test_log("test %s : %s out of memory\n",
+ id, filename);
+ return(0);
+ }
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
+ if (doc == NULL) {
+ test_log("test %s : %s invalid document turned not well-formed too\n",
+ id, filename);
+ } else {
+ /* invalidity should be reported both in the context and in the document */
+ if ((ctxt->valid != 0) || (doc->properties & XML_DOC_DTDVALID)) {
+ test_log("test %s : %s failed to detect invalid document\n",
+ id, filename);
+ nb_errors++;
+ ret = 0;
+ }
+ xmlFreeDoc(doc);
+ }
+ xmlFreeParserCtxt(ctxt);
+ return(ret);
+}
+
+static int
+xmlconfTestValid(const char *id, const char *filename, int options) {
+ xmlDocPtr doc;
+ xmlParserCtxtPtr ctxt;
+ int ret = 1;
+
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ test_log("test %s : %s out of memory\n",
+ id, filename);
+ return(0);
+ }
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
+ if (doc == NULL) {
+ test_log("test %s : %s failed to parse a valid document\n",
+ id, filename);
+ nb_errors++;
+ ret = 0;
+ } else {
+ /* validity should be reported both in the context and in the document */
+ if ((ctxt->valid == 0) || ((doc->properties & XML_DOC_DTDVALID) == 0)) {
+ test_log("test %s : %s failed to validate a valid document\n",
+ id, filename);
+ nb_errors++;
+ ret = 0;
+ }
+ xmlFreeDoc(doc);
+ }
+ xmlFreeParserCtxt(ctxt);
+ return(ret);
+}
+
+static int
+xmlconfTestNotNSWF(const char *id, const char *filename, int options) {
+ xmlDocPtr doc;
+ int ret = 1;
+
+ /*
+ * In case of Namespace errors, libxml2 will still parse the document
+ * but log a Namesapce error.
+ */
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc == NULL) {
+ test_log("test %s : %s failed to parse the XML\n",
+ id, filename);
+ nb_errors++;
+ ret = 0;
+ } else {
+ if ((xmlLastError.code == XML_ERR_OK) ||
+ (xmlLastError.domain != XML_FROM_NAMESPACE)) {
+ test_log("test %s : %s failed to detect namespace error\n",
+ id, filename);
+ nb_errors++;
+ ret = 0;
+ }
+ xmlFreeDoc(doc);
+ }
+ return(ret);
+}
+
+static int
+xmlconfTestNotWF(const char *id, const char *filename, int options) {
+ xmlDocPtr doc;
+ int ret = 1;
+
+ doc = xmlReadFile(filename, NULL, options);
+ if (doc != NULL) {
+ test_log("test %s : %s failed to detect not well formedness\n",
+ id, filename);
+ nb_errors++;
+ xmlFreeDoc(doc);
+ ret = 0;
+ }
+ return(ret);
+}
+
+static int
+xmlconfTestItem(xmlDocPtr doc, xmlNodePtr cur) {
+ int ret = -1;
+ xmlChar *type = NULL;
+ xmlChar *filename = NULL;
+ xmlChar *uri = NULL;
+ xmlChar *base = NULL;
+ xmlChar *id = NULL;
+ xmlChar *rec = NULL;
+ xmlChar *version = NULL;
+ xmlChar *entities = NULL;
+ xmlChar *edition = NULL;
+ int options = 0;
+ int nstest = 0;
+ int mem, final;
+ int i;
+
+ testErrorsSize = 0; testErrors[0] = 0;
+ nbError = 0;
+ nbFatal = 0;
+ id = xmlGetProp(cur, BAD_CAST "ID");
+ if (id == NULL) {
+ test_log("test missing ID, line %ld\n", xmlGetLineNo(cur));
+ goto error;
+ }
+ for (i = 0;skipped_tests[i] != NULL;i++) {
+ if (!strcmp(skipped_tests[i], (char *) id)) {
+ test_log("Skipping test %s from skipped list\n", (char *) id);
+ ret = 0;
+ nb_skipped++;
+ goto error;
+ }
+ }
+ type = xmlGetProp(cur, BAD_CAST "TYPE");
+ if (type == NULL) {
+ test_log("test %s missing TYPE\n", (char *) id);
+ goto error;
+ }
+ uri = xmlGetProp(cur, BAD_CAST "URI");
+ if (uri == NULL) {
+ test_log("test %s missing URI\n", (char *) id);
+ goto error;
+ }
+ base = xmlNodeGetBase(doc, cur);
+ filename = composeDir(base, uri);
+ if (!checkTestFile((char *) filename)) {
+ test_log("test %s missing file %s \n", id,
+ (filename ? (char *)filename : "NULL"));
+ goto error;
+ }
+
+ version = xmlGetProp(cur, BAD_CAST "VERSION");
+
+ entities = xmlGetProp(cur, BAD_CAST "ENTITIES");
+ if (!xmlStrEqual(entities, BAD_CAST "none")) {
+ options |= XML_PARSE_DTDLOAD;
+ options |= XML_PARSE_NOENT;
+ }
+ rec = xmlGetProp(cur, BAD_CAST "RECOMMENDATION");
+ if ((rec == NULL) ||
+ (xmlStrEqual(rec, BAD_CAST "XML1.0")) ||
+ (xmlStrEqual(rec, BAD_CAST "XML1.0-errata2e")) ||
+ (xmlStrEqual(rec, BAD_CAST "XML1.0-errata3e")) ||
+ (xmlStrEqual(rec, BAD_CAST "XML1.0-errata4e"))) {
+ if ((version != NULL) && (!xmlStrEqual(version, BAD_CAST "1.0"))) {
+ test_log("Skipping test %s for %s\n", (char *) id,
+ (char *) version);
+ ret = 0;
+ nb_skipped++;
+ goto error;
+ }
+ ret = 1;
+ } else if ((xmlStrEqual(rec, BAD_CAST "NS1.0")) ||
+ (xmlStrEqual(rec, BAD_CAST "NS1.0-errata1e"))) {
+ ret = 1;
+ nstest = 1;
+ } else {
+ test_log("Skipping test %s for REC %s\n", (char *) id, (char *) rec);
+ ret = 0;
+ nb_skipped++;
+ goto error;
+ }
+ edition = xmlGetProp(cur, BAD_CAST "EDITION");
+ if ((edition != NULL) && (xmlStrchr(edition, '5') == NULL)) {
+ /* test limited to all versions before 5th */
+ options |= XML_PARSE_OLD10;
+ }
+
+ /*
+ * Reset errors and check memory usage before the test
+ */
+ xmlResetLastError();
+ testErrorsSize = 0; testErrors[0] = 0;
+ mem = xmlMemUsed();
+
+ if (xmlStrEqual(type, BAD_CAST "not-wf")) {
+ if (nstest == 0)
+ xmlconfTestNotWF((char *) id, (char *) filename, options);
+ else
+ xmlconfTestNotNSWF((char *) id, (char *) filename, options);
+ } else if (xmlStrEqual(type, BAD_CAST "valid")) {
+ options |= XML_PARSE_DTDVALID;
+ xmlconfTestValid((char *) id, (char *) filename, options);
+ } else if (xmlStrEqual(type, BAD_CAST "invalid")) {
+ options |= XML_PARSE_DTDVALID;
+ xmlconfTestInvalid((char *) id, (char *) filename, options);
+ } else if (xmlStrEqual(type, BAD_CAST "error")) {
+ test_log("Skipping error test %s \n", (char *) id);
+ ret = 0;
+ nb_skipped++;
+ goto error;
+ } else {
+ test_log("test %s unknown TYPE value %s\n", (char *) id, (char *)type);
+ ret = -1;
+ goto error;
+ }
+
+ /*
+ * Reset errors and check memory usage after the test
+ */
+ xmlResetLastError();
+ final = xmlMemUsed();
+ if (final > mem) {
+ test_log("test %s : %s leaked %d bytes\n",
+ id, filename, final - mem);
+ nb_leaks++;
+ xmlMemDisplayLast(logfile, final - mem);
+ }
+ nb_tests++;
+
+error:
+ if (type != NULL)
+ xmlFree(type);
+ if (entities != NULL)
+ xmlFree(entities);
+ if (edition != NULL)
+ xmlFree(edition);
+ if (version != NULL)
+ xmlFree(version);
+ if (filename != NULL)
+ xmlFree(filename);
+ if (uri != NULL)
+ xmlFree(uri);
+ if (base != NULL)
+ xmlFree(base);
+ if (id != NULL)
+ xmlFree(id);
+ if (rec != NULL)
+ xmlFree(rec);
+ return(ret);
+}
+
+static int
+xmlconfTestCases(xmlDocPtr doc, xmlNodePtr cur, int level) {
+ xmlChar *profile;
+ int ret = 0;
+ int tests = 0;
+ int output = 0;
+
+ if (level == 1) {
+ profile = xmlGetProp(cur, BAD_CAST "PROFILE");
+ if (profile != NULL) {
+ output = 1;
+ level++;
+ printf("Test cases: %s\n", (char *) profile);
+ xmlFree(profile);
+ }
+ }
+ cur = cur->children;
+ while (cur != NULL) {
+ /* look only at elements we ignore everything else */
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (xmlStrEqual(cur->name, BAD_CAST "TESTCASES")) {
+ ret += xmlconfTestCases(doc, cur, level);
+ } else if (xmlStrEqual(cur->name, BAD_CAST "TEST")) {
+ if (xmlconfTestItem(doc, cur) >= 0)
+ ret++;
+ tests++;
+ } else {
+ fprintf(stderr, "Unhandled element %s\n", (char *)cur->name);
+ }
+ }
+ cur = cur->next;
+ }
+ if (output == 1) {
+ if (tests > 0)
+ printf("Test cases: %d tests\n", tests);
+ }
+ return(ret);
+}
+
+static int
+xmlconfTestSuite(xmlDocPtr doc, xmlNodePtr cur) {
+ xmlChar *profile;
+ int ret = 0;
+
+ profile = xmlGetProp(cur, BAD_CAST "PROFILE");
+ if (profile != NULL) {
+ printf("Test suite: %s\n", (char *) profile);
+ xmlFree(profile);
+ } else
+ printf("Test suite\n");
+ cur = cur->children;
+ while (cur != NULL) {
+ /* look only at elements we ignore everything else */
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (xmlStrEqual(cur->name, BAD_CAST "TESTCASES")) {
+ ret += xmlconfTestCases(doc, cur, 1);
+ } else {
+ fprintf(stderr, "Unhandled element %s\n", (char *)cur->name);
+ }
+ }
+ cur = cur->next;
+ }
+ return(ret);
+}
+
+static void
+xmlconfInfo(void) {
+ fprintf(stderr, " you need to fetch and extract the\n");
+ fprintf(stderr, " latest XML Conformance Test Suites\n");
+ fprintf(stderr, " http://www.w3.org/XML/Test/xmlts20080827.tar.gz\n");
+ fprintf(stderr, " see http://www.w3.org/XML/Test/ for informations\n");
+}
+
+static int
+xmlconfTest(void) {
+ const char *confxml = "xmlconf/xmlconf.xml";
+ xmlDocPtr doc;
+ xmlNodePtr cur;
+ int ret = 0;
+
+ if (!checkTestFile(confxml)) {
+ fprintf(stderr, "%s is missing \n", confxml);
+ xmlconfInfo();
+ return(-1);
+ }
+ doc = xmlReadFile(confxml, NULL, XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "%s is corrupted \n", confxml);
+ xmlconfInfo();
+ return(-1);
+ }
+
+ cur = xmlDocGetRootElement(doc);
+ if ((cur == NULL) || (!xmlStrEqual(cur->name, BAD_CAST "TESTSUITE"))) {
+ fprintf(stderr, "Unexpected format %s\n", confxml);
+ xmlconfInfo();
+ ret = -1;
+ } else {
+ ret = xmlconfTestSuite(doc, cur);
+ }
+ xmlFreeDoc(doc);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The driver for the tests *
+ * *
+ ************************************************************************/
+
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ int ret = 0;
+ int old_errors, old_tests, old_leaks;
+
+ logfile = fopen(LOGFILE, "w");
+ if (logfile == NULL) {
+ fprintf(stderr,
+ "Could not open the log file, running in verbose mode\n");
+ verbose = 1;
+ }
+ initializeLibxml2();
+
+ if ((argc >= 2) && (!strcmp(argv[1], "-v")))
+ verbose = 1;
+
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ xmlconfTest();
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ if ((nb_errors == 0) && (nb_leaks == 0)) {
+ ret = 0;
+ printf("Total %d tests, no errors\n",
+ nb_tests);
+ } else {
+ ret = 1;
+ printf("Total %d tests, %d errors, %d leaks\n",
+ nb_tests, nb_errors, nb_leaks);
+ printf("See %s for detailed output\n", LOGFILE);
+ if ((nb_leaks == 0) && (nb_errors == NB_EXPECTED_ERRORS)) {
+ printf("%d errors were expected\n", nb_errors);
+ ret = 0;
+ }
+ }
+ xmlXPathFreeContext(ctxtXPath);
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ if (logfile != NULL)
+ fclose(logfile);
+ return(ret);
+}
+
+#else /* ! LIBXML_XPATH_ENABLED */
+#include <stdio.h>
+int
+main(int argc, char **argv) {
+ fprintf(stderr, "%s need XPath support\n", argv[0]);
+}
+#endif
diff --git a/save.h b/save.h
new file mode 100644
index 0000000..2c32a10
--- /dev/null
+++ b/save.h
@@ -0,0 +1,35 @@
+/*
+ * Summary: Internal Interfaces for saving in libxml2
+ * Description: this module describes a few interfaces which were
+ * addded along with the API changes in 2.9.0
+ * those are private routines at this point
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_SAVE_H__
+#define __XML_SAVE_H__
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+void xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
+ xmlAttrPtr attr, const xmlChar * string);
+void xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table);
+void xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem);
+void xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr);
+void xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent);
+xmlChar *xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_SAVE_H__ */
+
diff --git a/schematron.c b/schematron.c
new file mode 100644
index 0000000..eb4befe
--- /dev/null
+++ b/schematron.c
@@ -0,0 +1,1787 @@
+/*
+ * schematron.c : implementation of the Schematron schema validity checking
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <daniel@veillard.com>
+ */
+
+/*
+ * TODO:
+ * + double check the semantic, especially
+ * - multiple rules applying in a single pattern/node
+ * - the semantic of libxml2 patterns vs. XSLT production referenced
+ * by the spec.
+ * + export of results in SVRL
+ * + full parsing and coverage of the spec, conformance of the input to the
+ * spec
+ * + divergences between the draft and the ISO proposed standard :-(
+ * + hook and test include
+ * + try and compare with the XSLT version
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/pattern.h>
+#include <libxml/schematron.h>
+
+#define SCHEMATRON_PARSE_OPTIONS XML_PARSE_NOENT
+
+#define SCT_OLD_NS BAD_CAST "http://www.ascc.net/xml/schematron"
+
+#define XML_SCHEMATRON_NS BAD_CAST "http://purl.oclc.org/dsdl/schematron"
+
+
+static const xmlChar *xmlSchematronNs = XML_SCHEMATRON_NS;
+static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
+
+#define IS_SCHEMATRON(node, elem) \
+ ((node != NULL) && (node->type == XML_ELEMENT_NODE ) && \
+ (node->ns != NULL) && \
+ (xmlStrEqual(node->name, (const xmlChar *) elem)) && \
+ ((xmlStrEqual(node->ns->href, xmlSchematronNs)) || \
+ (xmlStrEqual(node->ns->href, xmlOldSchematronNs))))
+
+#define NEXT_SCHEMATRON(node) \
+ while (node != NULL) { \
+ if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
+ ((xmlStrEqual(node->ns->href, xmlSchematronNs)) || \
+ (xmlStrEqual(node->ns->href, xmlOldSchematronNs)))) \
+ break; \
+ node = node->next; \
+ }
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+typedef enum {
+ XML_SCHEMATRON_ASSERT=1,
+ XML_SCHEMATRON_REPORT=2
+} xmlSchematronTestType;
+
+/**
+ * _xmlSchematronTest:
+ *
+ * A Schematrons test, either an assert or a report
+ */
+typedef struct _xmlSchematronTest xmlSchematronTest;
+typedef xmlSchematronTest *xmlSchematronTestPtr;
+struct _xmlSchematronTest {
+ xmlSchematronTestPtr next; /* the next test in the list */
+ xmlSchematronTestType type; /* the test type */
+ xmlNodePtr node; /* the node in the tree */
+ xmlChar *test; /* the expression to test */
+ xmlXPathCompExprPtr comp; /* the compiled expression */
+ xmlChar *report; /* the message to report */
+};
+
+/**
+ * _xmlSchematronRule:
+ *
+ * A Schematrons rule
+ */
+typedef struct _xmlSchematronRule xmlSchematronRule;
+typedef xmlSchematronRule *xmlSchematronRulePtr;
+struct _xmlSchematronRule {
+ xmlSchematronRulePtr next; /* the next rule in the list */
+ xmlSchematronRulePtr patnext;/* the next rule in the pattern list */
+ xmlNodePtr node; /* the node in the tree */
+ xmlChar *context; /* the context evaluation rule */
+ xmlSchematronTestPtr tests; /* the list of tests */
+ xmlPatternPtr pattern; /* the compiled pattern associated */
+ xmlChar *report; /* the message to report */
+};
+
+/**
+ * _xmlSchematronPattern:
+ *
+ * A Schematrons pattern
+ */
+typedef struct _xmlSchematronPattern xmlSchematronPattern;
+typedef xmlSchematronPattern *xmlSchematronPatternPtr;
+struct _xmlSchematronPattern {
+ xmlSchematronPatternPtr next;/* the next pattern in the list */
+ xmlSchematronRulePtr rules; /* the list of rules */
+ xmlChar *name; /* the name of the pattern */
+};
+
+/**
+ * _xmlSchematron:
+ *
+ * A Schematrons definition
+ */
+struct _xmlSchematron {
+ const xmlChar *name; /* schema name */
+ int preserve; /* was the document passed by the user */
+ xmlDocPtr doc; /* pointer to the parsed document */
+ int flags; /* specific to this schematron */
+
+ void *_private; /* unused by the library */
+ xmlDictPtr dict; /* the dictionnary used internally */
+
+ const xmlChar *title; /* the title if any */
+
+ int nbNs; /* the number of namespaces */
+
+ int nbPattern; /* the number of patterns */
+ xmlSchematronPatternPtr patterns;/* the patterns found */
+ xmlSchematronRulePtr rules; /* the rules gathered */
+ int nbNamespaces; /* number of namespaces in the array */
+ int maxNamespaces; /* size of the array */
+ const xmlChar **namespaces; /* the array of namespaces */
+};
+
+/**
+ * xmlSchematronValidCtxt:
+ *
+ * A Schematrons validation context
+ */
+struct _xmlSchematronValidCtxt {
+ int type;
+ int flags; /* an or of xmlSchematronValidOptions */
+
+ xmlDictPtr dict;
+ int nberrors;
+ int err;
+
+ xmlSchematronPtr schema;
+ xmlXPathContextPtr xctxt;
+
+ FILE *outputFile; /* if using XML_SCHEMATRON_OUT_FILE */
+ xmlBufferPtr outputBuffer; /* if using XML_SCHEMATRON_OUT_BUFFER */
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlOutputWriteCallback iowrite; /* if using XML_SCHEMATRON_OUT_IO */
+ xmlOutputCloseCallback ioclose;
+#endif
+ void *ioctx;
+
+ /* error reporting data */
+ void *userData; /* user specific data block */
+ xmlSchematronValidityErrorFunc error;/* the callback in case of errors */
+ xmlSchematronValidityWarningFunc warning;/* callback in case of warning */
+ xmlStructuredErrorFunc serror; /* the structured function */
+};
+
+struct _xmlSchematronParserCtxt {
+ int type;
+ const xmlChar *URL;
+ xmlDocPtr doc;
+ int preserve; /* Whether the doc should be freed */
+ const char *buffer;
+ int size;
+
+ xmlDictPtr dict; /* dictionnary for interned string names */
+
+ int nberrors;
+ int err;
+ xmlXPathContextPtr xctxt; /* the XPath context used for compilation */
+ xmlSchematronPtr schema;
+
+ int nbNamespaces; /* number of namespaces in the array */
+ int maxNamespaces; /* size of the array */
+ const xmlChar **namespaces; /* the array of namespaces */
+
+ int nbIncludes; /* number of includes in the array */
+ int maxIncludes; /* size of the array */
+ xmlNodePtr *includes; /* the array of includes */
+
+ /* error reporting data */
+ void *userData; /* user specific data block */
+ xmlSchematronValidityErrorFunc error;/* the callback in case of errors */
+ xmlSchematronValidityWarningFunc warning;/* callback in case of warning */
+ xmlStructuredErrorFunc serror; /* the structured function */
+};
+
+#define XML_STRON_CTXT_PARSER 1
+#define XML_STRON_CTXT_VALIDATOR 2
+
+/************************************************************************
+ * *
+ * Error reporting *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchematronPErrMemory:
+ * @node: a context node
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSchematronPErrMemory(xmlSchematronParserCtxtPtr ctxt,
+ const char *extra, xmlNodePtr node)
+{
+ if (ctxt != NULL)
+ ctxt->nberrors++;
+ __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, node, NULL,
+ extra);
+}
+
+/**
+ * xmlSchematronPErr:
+ * @ctxt: the parsing context
+ * @node: the context node
+ * @error: the error code
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ *
+ * Handle a parser error
+ */
+static void
+xmlSchematronPErr(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ xmlGenericErrorFunc channel = NULL;
+ xmlStructuredErrorFunc schannel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ ctxt->nberrors++;
+ channel = ctxt->error;
+ data = ctxt->userData;
+ schannel = ctxt->serror;
+ }
+ __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
+}
+
+/**
+ * xmlSchematronVTypeErrMemory:
+ * @node: a context node
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSchematronVErrMemory(xmlSchematronValidCtxtPtr ctxt,
+ const char *extra, xmlNodePtr node)
+{
+ if (ctxt != NULL) {
+ ctxt->nberrors++;
+ ctxt->err = XML_SCHEMAV_INTERNAL;
+ }
+ __xmlSimpleError(XML_FROM_SCHEMASV, XML_ERR_NO_MEMORY, node, NULL,
+ extra);
+}
+
+/************************************************************************
+ * *
+ * Parsing and compilation of the Schematrontrons *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchematronAddTest:
+ * @ctxt: the schema parsing context
+ * @type: the type of test
+ * @rule: the parent rule
+ * @node: the node hosting the test
+ * @test: the associated test
+ * @report: the associated report string
+ *
+ * Add a test to a schematron
+ *
+ * Returns the new pointer or NULL in case of error
+ */
+static xmlSchematronTestPtr
+xmlSchematronAddTest(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronTestType type,
+ xmlSchematronRulePtr rule,
+ xmlNodePtr node, xmlChar *test, xmlChar *report)
+{
+ xmlSchematronTestPtr ret;
+ xmlXPathCompExprPtr comp;
+
+ if ((ctxt == NULL) || (rule == NULL) || (node == NULL) ||
+ (test == NULL))
+ return(NULL);
+
+ /*
+ * try first to compile the test expression
+ */
+ comp = xmlXPathCtxtCompile(ctxt->xctxt, test);
+ if (comp == NULL) {
+ xmlSchematronPErr(ctxt, node,
+ XML_SCHEMAP_NOROOT,
+ "Failed to compile test expression %s",
+ test, NULL);
+ return(NULL);
+ }
+
+ ret = (xmlSchematronTestPtr) xmlMalloc(sizeof(xmlSchematronTest));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(ctxt, "allocating schema test", node);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronTest));
+ ret->type = type;
+ ret->node = node;
+ ret->test = test;
+ ret->comp = comp;
+ ret->report = report;
+ ret->next = NULL;
+ if (rule->tests == NULL) {
+ rule->tests = ret;
+ } else {
+ xmlSchematronTestPtr prev = rule->tests;
+
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = ret;
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchematronFreeTests:
+ * @tests: a list of tests
+ *
+ * Free a list of tests.
+ */
+static void
+xmlSchematronFreeTests(xmlSchematronTestPtr tests) {
+ xmlSchematronTestPtr next;
+
+ while (tests != NULL) {
+ next = tests->next;
+ if (tests->test != NULL)
+ xmlFree(tests->test);
+ if (tests->comp != NULL)
+ xmlXPathFreeCompExpr(tests->comp);
+ if (tests->report != NULL)
+ xmlFree(tests->report);
+ xmlFree(tests);
+ tests = next;
+ }
+}
+
+/**
+ * xmlSchematronAddRule:
+ * @ctxt: the schema parsing context
+ * @schema: a schema structure
+ * @node: the node hosting the rule
+ * @context: the associated context string
+ * @report: the associated report string
+ *
+ * Add a rule to a schematron
+ *
+ * Returns the new pointer or NULL in case of error
+ */
+static xmlSchematronRulePtr
+xmlSchematronAddRule(xmlSchematronParserCtxtPtr ctxt, xmlSchematronPtr schema,
+ xmlSchematronPatternPtr pat, xmlNodePtr node,
+ xmlChar *context, xmlChar *report)
+{
+ xmlSchematronRulePtr ret;
+ xmlPatternPtr pattern;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
+ (context == NULL))
+ return(NULL);
+
+ /*
+ * Try first to compile the pattern
+ */
+ pattern = xmlPatterncompile(context, ctxt->dict, XML_PATTERN_XPATH,
+ ctxt->namespaces);
+ if (pattern == NULL) {
+ xmlSchematronPErr(ctxt, node,
+ XML_SCHEMAP_NOROOT,
+ "Failed to compile context expression %s",
+ context, NULL);
+ }
+
+ ret = (xmlSchematronRulePtr) xmlMalloc(sizeof(xmlSchematronRule));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(ctxt, "allocating schema rule", node);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronRule));
+ ret->node = node;
+ ret->context = context;
+ ret->pattern = pattern;
+ ret->report = report;
+ ret->next = NULL;
+ if (schema->rules == NULL) {
+ schema->rules = ret;
+ } else {
+ xmlSchematronRulePtr prev = schema->rules;
+
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = ret;
+ }
+ ret->patnext = NULL;
+ if (pat->rules == NULL) {
+ pat->rules = ret;
+ } else {
+ xmlSchematronRulePtr prev = pat->rules;
+
+ while (prev->patnext != NULL)
+ prev = prev->patnext;
+ prev->patnext = ret;
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchematronFreeRules:
+ * @rules: a list of rules
+ *
+ * Free a list of rules.
+ */
+static void
+xmlSchematronFreeRules(xmlSchematronRulePtr rules) {
+ xmlSchematronRulePtr next;
+
+ while (rules != NULL) {
+ next = rules->next;
+ if (rules->tests)
+ xmlSchematronFreeTests(rules->tests);
+ if (rules->context != NULL)
+ xmlFree(rules->context);
+ if (rules->pattern)
+ xmlFreePattern(rules->pattern);
+ if (rules->report != NULL)
+ xmlFree(rules->report);
+ xmlFree(rules);
+ rules = next;
+ }
+}
+
+/**
+ * xmlSchematronAddPattern:
+ * @ctxt: the schema parsing context
+ * @schema: a schema structure
+ * @node: the node hosting the pattern
+ * @id: the id or name of the pattern
+ *
+ * Add a pattern to a schematron
+ *
+ * Returns the new pointer or NULL in case of error
+ */
+static xmlSchematronPatternPtr
+xmlSchematronAddPattern(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronPtr schema, xmlNodePtr node, xmlChar *name)
+{
+ xmlSchematronPatternPtr ret;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL) || (name == NULL))
+ return(NULL);
+
+ ret = (xmlSchematronPatternPtr) xmlMalloc(sizeof(xmlSchematronPattern));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(ctxt, "allocating schema pattern", node);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronPattern));
+ ret->name = name;
+ ret->next = NULL;
+ if (schema->patterns == NULL) {
+ schema->patterns = ret;
+ } else {
+ xmlSchematronPatternPtr prev = schema->patterns;
+
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = ret;
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchematronFreePatterns:
+ * @patterns: a list of patterns
+ *
+ * Free a list of patterns.
+ */
+static void
+xmlSchematronFreePatterns(xmlSchematronPatternPtr patterns) {
+ xmlSchematronPatternPtr next;
+
+ while (patterns != NULL) {
+ next = patterns->next;
+ if (patterns->name != NULL)
+ xmlFree(patterns->name);
+ xmlFree(patterns);
+ patterns = next;
+ }
+}
+
+/**
+ * xmlSchematronNewSchematron:
+ * @ctxt: a schema validation context
+ *
+ * Allocate a new Schematron structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlSchematronPtr
+xmlSchematronNewSchematron(xmlSchematronParserCtxtPtr ctxt)
+{
+ xmlSchematronPtr ret;
+
+ ret = (xmlSchematronPtr) xmlMalloc(sizeof(xmlSchematron));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(ctxt, "allocating schema", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematron));
+ ret->dict = ctxt->dict;
+ xmlDictReference(ret->dict);
+
+ return (ret);
+}
+
+/**
+ * xmlSchematronFree:
+ * @schema: a schema structure
+ *
+ * Deallocate a Schematron structure.
+ */
+void
+xmlSchematronFree(xmlSchematronPtr schema)
+{
+ if (schema == NULL)
+ return;
+
+ if ((schema->doc != NULL) && (!(schema->preserve)))
+ xmlFreeDoc(schema->doc);
+
+ if (schema->namespaces != NULL)
+ xmlFree((char **) schema->namespaces);
+
+ xmlSchematronFreeRules(schema->rules);
+ xmlSchematronFreePatterns(schema->patterns);
+ xmlDictFree(schema->dict);
+ xmlFree(schema);
+}
+
+/**
+ * xmlSchematronNewParserCtxt:
+ * @URL: the location of the schema
+ *
+ * Create an XML Schematrons parse context for that file/resource expected
+ * to contain an XML Schematrons file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchematronParserCtxtPtr
+xmlSchematronNewParserCtxt(const char *URL)
+{
+ xmlSchematronParserCtxtPtr ret;
+
+ if (URL == NULL)
+ return (NULL);
+
+ ret =
+ (xmlSchematronParserCtxtPtr)
+ xmlMalloc(sizeof(xmlSchematronParserCtxt));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser context",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronParserCtxt));
+ ret->type = XML_STRON_CTXT_PARSER;
+ ret->dict = xmlDictCreate();
+ ret->URL = xmlDictLookup(ret->dict, (const xmlChar *) URL, -1);
+ ret->includes = NULL;
+ ret->xctxt = xmlXPathNewContext(NULL);
+ if (ret->xctxt == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
+ NULL);
+ xmlSchematronFreeParserCtxt(ret);
+ return (NULL);
+ }
+ ret->xctxt->flags = XML_XPATH_CHECKNS;
+ return (ret);
+}
+
+/**
+ * xmlSchematronNewMemParserCtxt:
+ * @buffer: a pointer to a char array containing the schemas
+ * @size: the size of the array
+ *
+ * Create an XML Schematrons parse context for that memory buffer expected
+ * to contain an XML Schematrons file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchematronParserCtxtPtr
+xmlSchematronNewMemParserCtxt(const char *buffer, int size)
+{
+ xmlSchematronParserCtxtPtr ret;
+
+ if ((buffer == NULL) || (size <= 0))
+ return (NULL);
+
+ ret =
+ (xmlSchematronParserCtxtPtr)
+ xmlMalloc(sizeof(xmlSchematronParserCtxt));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser context",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronParserCtxt));
+ ret->buffer = buffer;
+ ret->size = size;
+ ret->dict = xmlDictCreate();
+ ret->xctxt = xmlXPathNewContext(NULL);
+ if (ret->xctxt == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
+ NULL);
+ xmlSchematronFreeParserCtxt(ret);
+ return (NULL);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchematronNewDocParserCtxt:
+ * @doc: a preparsed document tree
+ *
+ * Create an XML Schematrons parse context for that document.
+ * NB. The document may be modified during the parsing process.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchematronParserCtxtPtr
+xmlSchematronNewDocParserCtxt(xmlDocPtr doc)
+{
+ xmlSchematronParserCtxtPtr ret;
+
+ if (doc == NULL)
+ return (NULL);
+
+ ret =
+ (xmlSchematronParserCtxtPtr)
+ xmlMalloc(sizeof(xmlSchematronParserCtxt));
+ if (ret == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser context",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronParserCtxt));
+ ret->doc = doc;
+ ret->dict = xmlDictCreate();
+ /* The application has responsibility for the document */
+ ret->preserve = 1;
+ ret->xctxt = xmlXPathNewContext(doc);
+ if (ret->xctxt == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
+ NULL);
+ xmlSchematronFreeParserCtxt(ret);
+ return (NULL);
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlSchematronFreeParserCtxt:
+ * @ctxt: the schema parser context
+ *
+ * Free the resources associated to the schema parser context
+ */
+void
+xmlSchematronFreeParserCtxt(xmlSchematronParserCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->doc != NULL && !ctxt->preserve)
+ xmlFreeDoc(ctxt->doc);
+ if (ctxt->xctxt != NULL) {
+ xmlXPathFreeContext(ctxt->xctxt);
+ }
+ if (ctxt->namespaces != NULL)
+ xmlFree((char **) ctxt->namespaces);
+ xmlDictFree(ctxt->dict);
+ xmlFree(ctxt);
+}
+
+#if 0
+/**
+ * xmlSchematronPushInclude:
+ * @ctxt: the schema parser context
+ * @doc: the included document
+ * @cur: the current include node
+ *
+ * Add an included document
+ */
+static void
+xmlSchematronPushInclude(xmlSchematronParserCtxtPtr ctxt,
+ xmlDocPtr doc, xmlNodePtr cur)
+{
+ if (ctxt->includes == NULL) {
+ ctxt->maxIncludes = 10;
+ ctxt->includes = (xmlNodePtr *)
+ xmlMalloc(ctxt->maxIncludes * 2 * sizeof(xmlNodePtr));
+ if (ctxt->includes == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating parser includes",
+ NULL);
+ return;
+ }
+ ctxt->nbIncludes = 0;
+ } else if (ctxt->nbIncludes + 2 >= ctxt->maxIncludes) {
+ xmlNodePtr *tmp;
+
+ tmp = (xmlNodePtr *)
+ xmlRealloc(ctxt->includes, ctxt->maxIncludes * 4 *
+ sizeof(xmlNodePtr));
+ if (tmp == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating parser includes",
+ NULL);
+ return;
+ }
+ ctxt->includes = tmp;
+ ctxt->maxIncludes *= 2;
+ }
+ ctxt->includes[2 * ctxt->nbIncludes] = cur;
+ ctxt->includes[2 * ctxt->nbIncludes + 1] = (xmlNodePtr) doc;
+ ctxt->nbIncludes++;
+}
+
+/**
+ * xmlSchematronPopInclude:
+ * @ctxt: the schema parser context
+ *
+ * Pop an include level. The included document is being freed
+ *
+ * Returns the node immediately following the include or NULL if the
+ * include list was empty.
+ */
+static xmlNodePtr
+xmlSchematronPopInclude(xmlSchematronParserCtxtPtr ctxt)
+{
+ xmlDocPtr doc;
+ xmlNodePtr ret;
+
+ if (ctxt->nbIncludes <= 0)
+ return(NULL);
+ ctxt->nbIncludes--;
+ doc = (xmlDocPtr) ctxt->includes[2 * ctxt->nbIncludes + 1];
+ ret = ctxt->includes[2 * ctxt->nbIncludes];
+ xmlFreeDoc(doc);
+ if (ret != NULL)
+ ret = ret->next;
+ if (ret == NULL)
+ return(xmlSchematronPopInclude(ctxt));
+ return(ret);
+}
+#endif
+
+/**
+ * xmlSchematronAddNamespace:
+ * @ctxt: the schema parser context
+ * @prefix: the namespace prefix
+ * @ns: the namespace name
+ *
+ * Add a namespace definition in the context
+ */
+static void
+xmlSchematronAddNamespace(xmlSchematronParserCtxtPtr ctxt,
+ const xmlChar *prefix, const xmlChar *ns)
+{
+ if (ctxt->namespaces == NULL) {
+ ctxt->maxNamespaces = 10;
+ ctxt->namespaces = (const xmlChar **)
+ xmlMalloc(ctxt->maxNamespaces * 2 * sizeof(const xmlChar *));
+ if (ctxt->namespaces == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
+ NULL);
+ return;
+ }
+ ctxt->nbNamespaces = 0;
+ } else if (ctxt->nbNamespaces + 2 >= ctxt->maxNamespaces) {
+ const xmlChar **tmp;
+
+ tmp = (const xmlChar **)
+ xmlRealloc((xmlChar **) ctxt->namespaces, ctxt->maxNamespaces * 4 *
+ sizeof(const xmlChar *));
+ if (tmp == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating parser namespaces",
+ NULL);
+ return;
+ }
+ ctxt->namespaces = tmp;
+ ctxt->maxNamespaces *= 2;
+ }
+ ctxt->namespaces[2 * ctxt->nbNamespaces] =
+ xmlDictLookup(ctxt->dict, ns, -1);
+ ctxt->namespaces[2 * ctxt->nbNamespaces + 1] =
+ xmlDictLookup(ctxt->dict, prefix, -1);
+ ctxt->nbNamespaces++;
+ ctxt->namespaces[2 * ctxt->nbNamespaces] = NULL;
+ ctxt->namespaces[2 * ctxt->nbNamespaces + 1] = NULL;
+
+}
+
+/**
+ * xmlSchematronParseRule:
+ * @ctxt: a schema validation context
+ * @rule: the rule node
+ *
+ * parse a rule element
+ */
+static void
+xmlSchematronParseRule(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronPatternPtr pattern,
+ xmlNodePtr rule)
+{
+ xmlNodePtr cur;
+ int nbChecks = 0;
+ xmlChar *test;
+ xmlChar *context;
+ xmlChar *report;
+ xmlSchematronRulePtr ruleptr;
+ xmlSchematronTestPtr testptr;
+
+ if ((ctxt == NULL) || (rule == NULL)) return;
+
+ context = xmlGetNoNsProp(rule, BAD_CAST "context");
+ if (context == NULL) {
+ xmlSchematronPErr(ctxt, rule,
+ XML_SCHEMAP_NOROOT,
+ "rule has no context attribute",
+ NULL, NULL);
+ return;
+ } else if (context[0] == 0) {
+ xmlSchematronPErr(ctxt, rule,
+ XML_SCHEMAP_NOROOT,
+ "rule has an empty context attribute",
+ NULL, NULL);
+ xmlFree(context);
+ return;
+ } else {
+ ruleptr = xmlSchematronAddRule(ctxt, ctxt->schema, pattern,
+ rule, context, NULL);
+ if (ruleptr == NULL) {
+ xmlFree(context);
+ return;
+ }
+ }
+
+ cur = rule->children;
+ NEXT_SCHEMATRON(cur);
+ while (cur != NULL) {
+ if (IS_SCHEMATRON(cur, "assert")) {
+ nbChecks++;
+ test = xmlGetNoNsProp(cur, BAD_CAST "test");
+ if (test == NULL) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "assert has no test attribute",
+ NULL, NULL);
+ } else if (test[0] == 0) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "assert has an empty test attribute",
+ NULL, NULL);
+ xmlFree(test);
+ } else {
+ /* TODO will need dynamic processing instead */
+ report = xmlNodeGetContent(cur);
+
+ testptr = xmlSchematronAddTest(ctxt, XML_SCHEMATRON_ASSERT,
+ ruleptr, cur, test, report);
+ if (testptr == NULL)
+ xmlFree(test);
+ }
+ } else if (IS_SCHEMATRON(cur, "report")) {
+ nbChecks++;
+ test = xmlGetNoNsProp(cur, BAD_CAST "test");
+ if (test == NULL) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "assert has no test attribute",
+ NULL, NULL);
+ } else if (test[0] == 0) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "assert has an empty test attribute",
+ NULL, NULL);
+ xmlFree(test);
+ } else {
+ /* TODO will need dynamic processing instead */
+ report = xmlNodeGetContent(cur);
+
+ testptr = xmlSchematronAddTest(ctxt, XML_SCHEMATRON_REPORT,
+ ruleptr, cur, test, report);
+ if (testptr == NULL)
+ xmlFree(test);
+ }
+ } else {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "Expecting an assert or a report element instead of %s",
+ cur->name, NULL);
+ }
+ cur = cur->next;
+ NEXT_SCHEMATRON(cur);
+ }
+ if (nbChecks == 0) {
+ xmlSchematronPErr(ctxt, rule,
+ XML_SCHEMAP_NOROOT,
+ "rule has no assert nor report element", NULL, NULL);
+ }
+}
+
+/**
+ * xmlSchematronParsePattern:
+ * @ctxt: a schema validation context
+ * @pat: the pattern node
+ *
+ * parse a pattern element
+ */
+static void
+xmlSchematronParsePattern(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr pat)
+{
+ xmlNodePtr cur;
+ xmlSchematronPatternPtr pattern;
+ int nbRules = 0;
+ xmlChar *id;
+
+ if ((ctxt == NULL) || (pat == NULL)) return;
+
+ id = xmlGetNoNsProp(pat, BAD_CAST "id");
+ if (id == NULL) {
+ id = xmlGetNoNsProp(pat, BAD_CAST "name");
+ }
+ pattern = xmlSchematronAddPattern(ctxt, ctxt->schema, pat, id);
+ if (pattern == NULL) {
+ if (id != NULL)
+ xmlFree(id);
+ return;
+ }
+ cur = pat->children;
+ NEXT_SCHEMATRON(cur);
+ while (cur != NULL) {
+ if (IS_SCHEMATRON(cur, "rule")) {
+ xmlSchematronParseRule(ctxt, pattern, cur);
+ nbRules++;
+ } else {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "Expecting a rule element instead of %s", cur->name, NULL);
+ }
+ cur = cur->next;
+ NEXT_SCHEMATRON(cur);
+ }
+ if (nbRules == 0) {
+ xmlSchematronPErr(ctxt, pat,
+ XML_SCHEMAP_NOROOT,
+ "Pattern has no rule element", NULL, NULL);
+ }
+}
+
+#if 0
+/**
+ * xmlSchematronLoadInclude:
+ * @ctxt: a schema validation context
+ * @cur: the include element
+ *
+ * Load the include document, Push the current pointer
+ *
+ * Returns the updated node pointer
+ */
+static xmlNodePtr
+xmlSchematronLoadInclude(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr cur)
+{
+ xmlNodePtr ret = NULL;
+ xmlDocPtr doc = NULL;
+ xmlChar *href = NULL;
+ xmlChar *base = NULL;
+ xmlChar *URI = NULL;
+
+ if ((ctxt == NULL) || (cur == NULL))
+ return(NULL);
+
+ href = xmlGetNoNsProp(cur, BAD_CAST "href");
+ if (href == NULL) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "Include has no href attribute", NULL, NULL);
+ return(cur->next);
+ }
+
+ /* do the URI base composition, load and find the root */
+ base = xmlNodeGetBase(cur->doc, cur);
+ URI = xmlBuildURI(href, base);
+ doc = xmlReadFile((const char *) URI, NULL, SCHEMATRON_PARSE_OPTIONS);
+ if (doc == NULL) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_FAILED_LOAD,
+ "could not load include '%s'.\n",
+ URI, NULL);
+ goto done;
+ }
+ ret = xmlDocGetRootElement(doc);
+ if (ret == NULL) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_FAILED_LOAD,
+ "could not find root from include '%s'.\n",
+ URI, NULL);
+ goto done;
+ }
+
+ /* Success, push the include for rollback on exit */
+ xmlSchematronPushInclude(ctxt, doc, cur);
+
+done:
+ if (ret == NULL) {
+ if (doc != NULL)
+ xmlFreeDoc(doc);
+ }
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ if (URI != NULL)
+ xmlFree(URI);
+ return(ret);
+}
+#endif
+
+/**
+ * xmlSchematronParse:
+ * @ctxt: a schema validation context
+ *
+ * parse a schema definition resource and build an internal
+ * XML Shema struture which can be used to validate instances.
+ *
+ * Returns the internal XML Schematron structure built from the resource or
+ * NULL in case of error
+ */
+xmlSchematronPtr
+xmlSchematronParse(xmlSchematronParserCtxtPtr ctxt)
+{
+ xmlSchematronPtr ret = NULL;
+ xmlDocPtr doc;
+ xmlNodePtr root, cur;
+ int preserve = 0;
+
+ if (ctxt == NULL)
+ return (NULL);
+
+ ctxt->nberrors = 0;
+
+ /*
+ * First step is to parse the input document into an DOM/Infoset
+ */
+ if (ctxt->URL != NULL) {
+ doc = xmlReadFile((const char *) ctxt->URL, NULL,
+ SCHEMATRON_PARSE_OPTIONS);
+ if (doc == NULL) {
+ xmlSchematronPErr(ctxt, NULL,
+ XML_SCHEMAP_FAILED_LOAD,
+ "xmlSchematronParse: could not load '%s'.\n",
+ ctxt->URL, NULL);
+ return (NULL);
+ }
+ ctxt->preserve = 0;
+ } else if (ctxt->buffer != NULL) {
+ doc = xmlReadMemory(ctxt->buffer, ctxt->size, NULL, NULL,
+ SCHEMATRON_PARSE_OPTIONS);
+ if (doc == NULL) {
+ xmlSchematronPErr(ctxt, NULL,
+ XML_SCHEMAP_FAILED_PARSE,
+ "xmlSchematronParse: could not parse.\n",
+ NULL, NULL);
+ return (NULL);
+ }
+ doc->URL = xmlStrdup(BAD_CAST "in_memory_buffer");
+ ctxt->URL = xmlDictLookup(ctxt->dict, BAD_CAST "in_memory_buffer", -1);
+ ctxt->preserve = 0;
+ } else if (ctxt->doc != NULL) {
+ doc = ctxt->doc;
+ preserve = 1;
+ ctxt->preserve = 1;
+ } else {
+ xmlSchematronPErr(ctxt, NULL,
+ XML_SCHEMAP_NOTHING_TO_PARSE,
+ "xmlSchematronParse: could not parse.\n",
+ NULL, NULL);
+ return (NULL);
+ }
+
+ /*
+ * Then extract the root and Schematron parse it
+ */
+ root = xmlDocGetRootElement(doc);
+ if (root == NULL) {
+ xmlSchematronPErr(ctxt, (xmlNodePtr) doc,
+ XML_SCHEMAP_NOROOT,
+ "The schema has no document element.\n", NULL, NULL);
+ if (!preserve) {
+ xmlFreeDoc(doc);
+ }
+ return (NULL);
+ }
+
+ if (!IS_SCHEMATRON(root, "schema")) {
+ xmlSchematronPErr(ctxt, root,
+ XML_SCHEMAP_NOROOT,
+ "The XML document '%s' is not a XML schematron document",
+ ctxt->URL, NULL);
+ goto exit;
+ }
+ ret = xmlSchematronNewSchematron(ctxt);
+ if (ret == NULL)
+ goto exit;
+ ctxt->schema = ret;
+
+ /*
+ * scan the schema elements
+ */
+ cur = root->children;
+ NEXT_SCHEMATRON(cur);
+ if (IS_SCHEMATRON(cur, "title")) {
+ xmlChar *title = xmlNodeGetContent(cur);
+ if (title != NULL) {
+ ret->title = xmlDictLookup(ret->dict, title, -1);
+ xmlFree(title);
+ }
+ cur = cur->next;
+ NEXT_SCHEMATRON(cur);
+ }
+ while (IS_SCHEMATRON(cur, "ns")) {
+ xmlChar *prefix = xmlGetNoNsProp(cur, BAD_CAST "prefix");
+ xmlChar *uri = xmlGetNoNsProp(cur, BAD_CAST "uri");
+ if ((uri == NULL) || (uri[0] == 0)) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "ns element has no uri", NULL, NULL);
+ }
+ if ((prefix == NULL) || (prefix[0] == 0)) {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "ns element has no prefix", NULL, NULL);
+ }
+ if ((prefix) && (uri)) {
+ xmlXPathRegisterNs(ctxt->xctxt, prefix, uri);
+ xmlSchematronAddNamespace(ctxt, prefix, uri);
+ ret->nbNs++;
+ }
+ if (uri)
+ xmlFree(uri);
+ if (prefix)
+ xmlFree(prefix);
+ cur = cur->next;
+ NEXT_SCHEMATRON(cur);
+ }
+ while (cur != NULL) {
+ if (IS_SCHEMATRON(cur, "pattern")) {
+ xmlSchematronParsePattern(ctxt, cur);
+ ret->nbPattern++;
+ } else {
+ xmlSchematronPErr(ctxt, cur,
+ XML_SCHEMAP_NOROOT,
+ "Expecting a pattern element instead of %s", cur->name, NULL);
+ }
+ cur = cur->next;
+ NEXT_SCHEMATRON(cur);
+ }
+ if (ret->nbPattern == 0) {
+ xmlSchematronPErr(ctxt, root,
+ XML_SCHEMAP_NOROOT,
+ "The schematron document '%s' has no pattern",
+ ctxt->URL, NULL);
+ goto exit;
+ }
+ /* the original document must be kept for reporting */
+ ret->doc = doc;
+ if (preserve) {
+ ret->preserve = 1;
+ }
+ preserve = 1;
+
+exit:
+ if (!preserve) {
+ xmlFreeDoc(doc);
+ }
+ if (ret != NULL) {
+ if (ctxt->nberrors != 0) {
+ xmlSchematronFree(ret);
+ ret = NULL;
+ } else {
+ ret->namespaces = ctxt->namespaces;
+ ret->nbNamespaces = ctxt->nbNamespaces;
+ ctxt->namespaces = NULL;
+ }
+ }
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Schematrontron Reports handler *
+ * *
+ ************************************************************************/
+
+static xmlNodePtr
+xmlSchematronGetNode(xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr cur, const xmlChar *xpath) {
+ xmlNodePtr node = NULL;
+ xmlXPathObjectPtr ret;
+
+ if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
+ return(NULL);
+
+ ctxt->xctxt->doc = cur->doc;
+ ctxt->xctxt->node = cur;
+ ret = xmlXPathEval(xpath, ctxt->xctxt);
+ if (ret == NULL)
+ return(NULL);
+
+ if ((ret->type == XPATH_NODESET) &&
+ (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
+ node = ret->nodesetval->nodeTab[0];
+
+ xmlXPathFreeObject(ret);
+ return(node);
+}
+
+/**
+ * xmlSchematronReportOutput:
+ * @ctxt: the validation context
+ * @cur: the current node tested
+ * @msg: the message output
+ *
+ * Output part of the report to whatever channel the user selected
+ */
+static void
+xmlSchematronReportOutput(xmlSchematronValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlNodePtr cur ATTRIBUTE_UNUSED,
+ const char *msg) {
+ /* TODO */
+ fprintf(stderr, "%s", msg);
+}
+
+/**
+ * xmlSchematronFormatReport:
+ * @ctxt: the validation context
+ * @test: the test node
+ * @cur: the current node tested
+ *
+ * Build the string being reported to the user.
+ *
+ * Returns a report string or NULL in case of error. The string needs
+ * to be deallocated by teh caller
+ */
+static xmlChar *
+xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr test, xmlNodePtr cur) {
+ xmlChar *ret = NULL;
+ xmlNodePtr child, node;
+
+ if ((test == NULL) || (cur == NULL))
+ return(ret);
+
+ child = test->children;
+ while (child != NULL) {
+ if ((child->type == XML_TEXT_NODE) ||
+ (child->type == XML_CDATA_SECTION_NODE))
+ ret = xmlStrcat(ret, child->content);
+ else if (IS_SCHEMATRON(child, "name")) {
+ xmlChar *path;
+
+ path = xmlGetNoNsProp(child, BAD_CAST "path");
+
+ node = cur;
+ if (path != NULL) {
+ node = xmlSchematronGetNode(ctxt, cur, path);
+ if (node == NULL)
+ node = cur;
+ xmlFree(path);
+ }
+
+ if ((node->ns == NULL) || (node->ns->prefix == NULL))
+ ret = xmlStrcat(ret, node->name);
+ else {
+ ret = xmlStrcat(ret, node->ns->prefix);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, node->name);
+ }
+ } else {
+ child = child->next;
+ continue;
+ }
+
+ /*
+ * remove superfluous \n
+ */
+ if (ret != NULL) {
+ int len = xmlStrlen(ret);
+ xmlChar c;
+
+ if (len > 0) {
+ c = ret[len - 1];
+ if ((c == ' ') || (c == '\n') || (c == '\r') || (c == '\t')) {
+ while ((c == ' ') || (c == '\n') ||
+ (c == '\r') || (c == '\t')) {
+ len--;
+ if (len == 0)
+ break;
+ c = ret[len - 1];
+ }
+ ret[len] = ' ';
+ ret[len + 1] = 0;
+ }
+ }
+ }
+
+ child = child->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlSchematronReportSuccess:
+ * @ctxt: the validation context
+ * @test: the compiled test
+ * @cur: the current node tested
+ * @success: boolean value for the result
+ *
+ * called from the validation engine when an assert or report test have
+ * been done.
+ */
+static void
+xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronTestPtr test, xmlNodePtr cur, xmlSchematronPatternPtr pattern, int success) {
+ if ((ctxt == NULL) || (cur == NULL) || (test == NULL))
+ return;
+ /* if quiet and not SVRL report only failures */
+ if ((ctxt->flags & XML_SCHEMATRON_OUT_QUIET) &&
+ ((ctxt->flags & XML_SCHEMATRON_OUT_XML) == 0) &&
+ (test->type == XML_SCHEMATRON_REPORT))
+ return;
+ if (ctxt->flags & XML_SCHEMATRON_OUT_XML) {
+ TODO
+ } else {
+ xmlChar *path;
+ char msg[1000];
+ long line;
+ const xmlChar *report = NULL;
+
+ if (((test->type == XML_SCHEMATRON_REPORT) & (!success)) ||
+ ((test->type == XML_SCHEMATRON_ASSERT) & (success)))
+ return;
+ line = xmlGetLineNo(cur);
+ path = xmlGetNodePath(cur);
+ if (path == NULL)
+ path = (xmlChar *) cur->name;
+#if 0
+ if ((test->report != NULL) && (test->report[0] != 0))
+ report = test->report;
+#endif
+ if (test->node != NULL)
+ report = xmlSchematronFormatReport(ctxt, test->node, cur);
+ if (report == NULL) {
+ if (test->type == XML_SCHEMATRON_ASSERT) {
+ report = xmlStrdup((const xmlChar *) "node failed assert");
+ } else {
+ report = xmlStrdup((const xmlChar *) "node failed report");
+ }
+ }
+ snprintf(msg, 999, "%s line %ld: %s\n", (const char *) path,
+ line, (const char *) report);
+
+ if (ctxt->flags & XML_SCHEMATRON_OUT_ERROR) {
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->serror != NULL)
+ schannel = ctxt->serror;
+ else
+ channel = ctxt->error;
+ data = ctxt->userData;
+ }
+
+ __xmlRaiseError(schannel, channel, data,
+ NULL, cur, XML_FROM_SCHEMATRONV,
+ (test->type == XML_SCHEMATRON_ASSERT)?XML_SCHEMATRONV_ASSERT:XML_SCHEMATRONV_REPORT,
+ XML_ERR_ERROR, NULL, line,
+ (pattern == NULL)?NULL:((const char *) pattern->name),
+ (const char *) path,
+ (const char *) report, 0, 0,
+ "%s", msg);
+ } else {
+ xmlSchematronReportOutput(ctxt, cur, &msg[0]);
+ }
+
+ xmlFree((char *) report);
+
+ if ((path != NULL) && (path != (xmlChar *) cur->name))
+ xmlFree(path);
+ }
+}
+
+/**
+ * xmlSchematronReportPattern:
+ * @ctxt: the validation context
+ * @pattern: the current pattern
+ *
+ * called from the validation engine when starting to check a pattern
+ */
+static void
+xmlSchematronReportPattern(xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronPatternPtr pattern) {
+ if ((ctxt == NULL) || (pattern == NULL))
+ return;
+ if ((ctxt->flags & XML_SCHEMATRON_OUT_QUIET) || (ctxt->flags & XML_SCHEMATRON_OUT_ERROR)) /* Error gives pattern name as part of error */
+ return;
+ if (ctxt->flags & XML_SCHEMATRON_OUT_XML) {
+ TODO
+ } else {
+ char msg[1000];
+
+ if (pattern->name == NULL)
+ return;
+ snprintf(msg, 999, "Pattern: %s\n", (const char *) pattern->name);
+ xmlSchematronReportOutput(ctxt, NULL, &msg[0]);
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Validation against a Schematrontron *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchematronSetValidStructuredErrors:
+ * @ctxt: a Schematron validation context
+ * @serror: the structured error function
+ * @ctx: the functions context
+ *
+ * Set the structured error callback
+ */
+void
+xmlSchematronSetValidStructuredErrors(xmlSchematronValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->serror = serror;
+ ctxt->error = NULL;
+ ctxt->warning = NULL;
+ ctxt->userData = ctx;
+}
+
+/**
+ * xmlSchematronNewValidCtxt:
+ * @schema: a precompiled XML Schematrons
+ * @options: a set of xmlSchematronValidOptions
+ *
+ * Create an XML Schematrons validation context based on the given schema.
+ *
+ * Returns the validation context or NULL in case of error
+ */
+xmlSchematronValidCtxtPtr
+xmlSchematronNewValidCtxt(xmlSchematronPtr schema, int options)
+{
+ int i;
+ xmlSchematronValidCtxtPtr ret;
+
+ ret = (xmlSchematronValidCtxtPtr) xmlMalloc(sizeof(xmlSchematronValidCtxt));
+ if (ret == NULL) {
+ xmlSchematronVErrMemory(NULL, "allocating validation context",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchematronValidCtxt));
+ ret->type = XML_STRON_CTXT_VALIDATOR;
+ ret->schema = schema;
+ ret->xctxt = xmlXPathNewContext(NULL);
+ ret->flags = options;
+ if (ret->xctxt == NULL) {
+ xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
+ NULL);
+ xmlSchematronFreeValidCtxt(ret);
+ return (NULL);
+ }
+ for (i = 0;i < schema->nbNamespaces;i++) {
+ if ((schema->namespaces[2 * i] == NULL) ||
+ (schema->namespaces[2 * i + 1] == NULL))
+ break;
+ xmlXPathRegisterNs(ret->xctxt, schema->namespaces[2 * i + 1],
+ schema->namespaces[2 * i]);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchematronFreeValidCtxt:
+ * @ctxt: the schema validation context
+ *
+ * Free the resources associated to the schema validation context
+ */
+void
+xmlSchematronFreeValidCtxt(xmlSchematronValidCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->xctxt != NULL)
+ xmlXPathFreeContext(ctxt->xctxt);
+ if (ctxt->dict != NULL)
+ xmlDictFree(ctxt->dict);
+ xmlFree(ctxt);
+}
+
+static xmlNodePtr
+xmlSchematronNextNode(xmlNodePtr cur) {
+ if (cur->children != NULL) {
+ /*
+ * Do not descend on entities declarations
+ */
+ if (cur->children->type != XML_ENTITY_DECL) {
+ cur = cur->children;
+ /*
+ * Skip DTDs
+ */
+ if (cur->type != XML_DTD_NODE)
+ return(cur);
+ }
+ }
+
+ while (cur->next != NULL) {
+ cur = cur->next;
+ if ((cur->type != XML_ENTITY_DECL) &&
+ (cur->type != XML_DTD_NODE))
+ return(cur);
+ }
+
+ do {
+ cur = cur->parent;
+ if (cur == NULL) break;
+ if (cur->type == XML_DOCUMENT_NODE) return(NULL);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ return(cur);
+ }
+ } while (cur != NULL);
+ return(cur);
+}
+
+/**
+ * xmlSchematronRunTest:
+ * @ctxt: the schema validation context
+ * @test: the current test
+ * @instance: the document instace tree
+ * @cur: the current node in the instance
+ *
+ * Validate a rule against a tree instance at a given position
+ *
+ * Returns 1 in case of success, 0 if error and -1 in case of internal error
+ */
+static int
+xmlSchematronRunTest(xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronTestPtr test, xmlDocPtr instance, xmlNodePtr cur, xmlSchematronPatternPtr pattern)
+{
+ xmlXPathObjectPtr ret;
+ int failed;
+
+ failed = 0;
+ ctxt->xctxt->doc = instance;
+ ctxt->xctxt->node = cur;
+ ret = xmlXPathCompiledEval(test->comp, ctxt->xctxt);
+ if (ret == NULL) {
+ failed = 1;
+ } else {
+ switch (ret->type) {
+ case XPATH_XSLT_TREE:
+ case XPATH_NODESET:
+ if ((ret->nodesetval == NULL) ||
+ (ret->nodesetval->nodeNr == 0))
+ failed = 1;
+ break;
+ case XPATH_BOOLEAN:
+ failed = !ret->boolval;
+ break;
+ case XPATH_NUMBER:
+ if ((xmlXPathIsNaN(ret->floatval)) ||
+ (ret->floatval == 0.0))
+ failed = 1;
+ break;
+ case XPATH_STRING:
+ if ((ret->stringval == NULL) ||
+ (ret->stringval[0] == 0))
+ failed = 1;
+ break;
+ case XPATH_UNDEFINED:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ case XPATH_USERS:
+ failed = 1;
+ break;
+ }
+ xmlXPathFreeObject(ret);
+ }
+ if ((failed) && (test->type == XML_SCHEMATRON_ASSERT))
+ ctxt->nberrors++;
+ else if ((!failed) && (test->type == XML_SCHEMATRON_REPORT))
+ ctxt->nberrors++;
+
+ xmlSchematronReportSuccess(ctxt, test, cur, pattern, !failed);
+
+ return(!failed);
+}
+
+/**
+ * xmlSchematronValidateDoc:
+ * @ctxt: the schema validation context
+ * @instance: the document instace tree
+ *
+ * Validate a tree instance against the schematron
+ *
+ * Returns 0 in case of success, -1 in case of internal error
+ * and an error count otherwise.
+ */
+int
+xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
+{
+ xmlNodePtr cur, root;
+ xmlSchematronPatternPtr pattern;
+ xmlSchematronRulePtr rule;
+ xmlSchematronTestPtr test;
+
+ if ((ctxt == NULL) || (ctxt->schema == NULL) ||
+ (ctxt->schema->rules == NULL) || (instance == NULL))
+ return(-1);
+ ctxt->nberrors = 0;
+ root = xmlDocGetRootElement(instance);
+ if (root == NULL) {
+ TODO
+ ctxt->nberrors++;
+ return(1);
+ }
+ if ((ctxt->flags & XML_SCHEMATRON_OUT_QUIET) ||
+ (ctxt->flags == 0)) {
+ /*
+ * we are just trying to assert the validity of the document,
+ * speed primes over the output, run in a single pass
+ */
+ cur = root;
+ while (cur != NULL) {
+ rule = ctxt->schema->rules;
+ while (rule != NULL) {
+ if (xmlPatternMatch(rule->pattern, cur) == 1) {
+ test = rule->tests;
+ while (test != NULL) {
+ xmlSchematronRunTest(ctxt, test, instance, cur, (xmlSchematronPatternPtr)rule->pattern);
+ test = test->next;
+ }
+ }
+ rule = rule->next;
+ }
+
+ cur = xmlSchematronNextNode(cur);
+ }
+ } else {
+ /*
+ * Process all contexts one at a time
+ */
+ pattern = ctxt->schema->patterns;
+
+ while (pattern != NULL) {
+ xmlSchematronReportPattern(ctxt, pattern);
+
+ /*
+ * TODO convert the pattern rule to a direct XPath and
+ * compute directly instead of using the pattern matching
+ * over the full document...
+ * Check the exact semantic
+ */
+ cur = root;
+ while (cur != NULL) {
+ rule = pattern->rules;
+ while (rule != NULL) {
+ if (xmlPatternMatch(rule->pattern, cur) == 1) {
+ test = rule->tests;
+ while (test != NULL) {
+ xmlSchematronRunTest(ctxt, test, instance, cur, pattern);
+ test = test->next;
+ }
+ }
+ rule = rule->patnext;
+ }
+
+ cur = xmlSchematronNextNode(cur);
+ }
+ pattern = pattern->next;
+ }
+ }
+ return(ctxt->nberrors);
+}
+
+#ifdef STANDALONE
+int
+main(void)
+{
+ int ret;
+ xmlDocPtr instance;
+ xmlSchematronParserCtxtPtr pctxt;
+ xmlSchematronValidCtxtPtr vctxt;
+ xmlSchematronPtr schema = NULL;
+
+ pctxt = xmlSchematronNewParserCtxt("tst.sct");
+ if (pctxt == NULL) {
+ fprintf(stderr, "failed to build schematron parser\n");
+ } else {
+ schema = xmlSchematronParse(pctxt);
+ if (schema == NULL) {
+ fprintf(stderr, "failed to compile schematron\n");
+ }
+ xmlSchematronFreeParserCtxt(pctxt);
+ }
+ instance = xmlReadFile("tst.sct", NULL,
+ XML_PARSE_NOENT | XML_PARSE_NOCDATA);
+ if (instance == NULL) {
+ fprintf(stderr, "failed to parse instance\n");
+ }
+ if ((schema != NULL) && (instance != NULL)) {
+ vctxt = xmlSchematronNewValidCtxt(schema);
+ if (vctxt == NULL) {
+ fprintf(stderr, "failed to build schematron validator\n");
+ } else {
+ ret = xmlSchematronValidateDoc(vctxt, instance);
+ xmlSchematronFreeValidCtxt(vctxt);
+ }
+ }
+ xmlSchematronFree(schema);
+ xmlFreeDoc(instance);
+
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return (0);
+}
+#endif
+#define bottom_schematron
+#include "elfgcchack.h"
+#endif /* LIBXML_SCHEMATRON_ENABLED */
diff --git a/test/japancrlf.xml b/test/japancrlf.xml
new file mode 100644
index 0000000..480cb2d
--- /dev/null
+++ b/test/japancrlf.xml
@@ -0,0 +1,6 @@
+<入力メッセージ
+ xmlns="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826">
+ <c8c:Ele
+ xmlns:c8c="http://schemas.cordys.com/webapps/1.0/bpm/c8c8b82a-0ac0-3d19-01e2-bda74af9b826"
+ />
+</入力メッセージ> \ No newline at end of file
diff --git a/test/relaxng/710744.rng b/test/relaxng/710744.rng
new file mode 100644
index 0000000..aeea0b8
--- /dev/null
+++ b/test/relaxng/710744.rng
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+ <start>
+ <element name="test" ns="http://example.com/1/">
+ <zeroOrMore>
+ <attribute>
+ <choice>
+ <nsName ns="http://example.com/1/"/>
+ <nsName ns="http://example.com/2/"/>
+ </choice>
+ <text/>
+ </attribute>
+ </zeroOrMore>
+ </element>
+ </start>
+</grammar>
diff --git a/test/relaxng/710744_1.xml b/test/relaxng/710744_1.xml
new file mode 100644
index 0000000..f17c808
--- /dev/null
+++ b/test/relaxng/710744_1.xml
@@ -0,0 +1,2 @@
+<ex1:test xmlns:ex1="http://example.com/1/"
+ ex1:foo="bar"/>
diff --git a/test/relaxng/710744_2.xml b/test/relaxng/710744_2.xml
new file mode 100644
index 0000000..1aef3a9
--- /dev/null
+++ b/test/relaxng/710744_2.xml
@@ -0,0 +1,3 @@
+<ex1:test xmlns:ex1="http://example.com/1/"
+ xmlns:ex3="http://example.com/3/"
+ ex3:foo="bar"/>
diff --git a/testAutomata.c b/testAutomata.c
new file mode 100644
index 0000000..6c4de90
--- /dev/null
+++ b/testAutomata.c
@@ -0,0 +1,309 @@
+/*
+ * testRegexp.c: simple module for testing regular expressions
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#include "libxml.h"
+#ifdef LIBXML_AUTOMATA_ENABLED
+#include <string.h>
+
+#include <libxml/tree.h>
+#include <libxml/xmlautomata.h>
+
+static int scanNumber(char **ptr) {
+ int ret = 0;
+ char *cur;
+
+ cur = *ptr;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret = ret * 10 + (*cur - '0');
+ cur++;
+ }
+ *ptr = cur;
+ return(ret);
+}
+
+static void
+testRegexpFile(const char *filename) {
+ FILE *input;
+ char expr[5000];
+ int len;
+ int ret;
+ int i;
+ xmlAutomataPtr am;
+ xmlAutomataStatePtr states[1000];
+ xmlRegexpPtr regexp = NULL;
+ xmlRegExecCtxtPtr exec = NULL;
+
+ for (i = 0;i<1000;i++)
+ states[i] = NULL;
+
+ input = fopen(filename, "r");
+ if (input == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot open %s for reading\n", filename);
+ return;
+ }
+
+ am = xmlNewAutomata();
+ if (am == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot create automata\n");
+ fclose(input);
+ return;
+ }
+ states[0] = xmlAutomataGetInitState(am);
+ if (states[0] == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot get start state\n");
+ xmlFreeAutomata(am);
+ fclose(input);
+ return;
+ }
+ ret = 0;
+
+ while (fgets(expr, 4500, input) != NULL) {
+ if (expr[0] == '#')
+ continue;
+ len = strlen(expr);
+ len--;
+ while ((len >= 0) &&
+ ((expr[len] == '\n') || (expr[len] == '\t') ||
+ (expr[len] == '\r') || (expr[len] == ' '))) len--;
+ expr[len + 1] = 0;
+ if (len >= 0) {
+ if ((am != NULL) && (expr[0] == 't') && (expr[1] == ' ')) {
+ char *ptr = &expr[2];
+ int from, to;
+
+ from = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ if (states[from] == NULL)
+ states[from] = xmlAutomataNewState(am);
+ ptr++;
+ to = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ if (states[to] == NULL)
+ states[to] = xmlAutomataNewState(am);
+ ptr++;
+ xmlAutomataNewTransition(am, states[from], states[to],
+ BAD_CAST ptr, NULL);
+ } else if ((am != NULL) && (expr[0] == 'e') && (expr[1] == ' ')) {
+ char *ptr = &expr[2];
+ int from, to;
+
+ from = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ if (states[from] == NULL)
+ states[from] = xmlAutomataNewState(am);
+ ptr++;
+ to = scanNumber(&ptr);
+ if (states[to] == NULL)
+ states[to] = xmlAutomataNewState(am);
+ xmlAutomataNewEpsilon(am, states[from], states[to]);
+ } else if ((am != NULL) && (expr[0] == 'f') && (expr[1] == ' ')) {
+ char *ptr = &expr[2];
+ int state;
+
+ state = scanNumber(&ptr);
+ if (states[state] == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad state %d : %s\n", state, expr);
+ break;
+ }
+ xmlAutomataSetFinalState(am, states[state]);
+ } else if ((am != NULL) && (expr[0] == 'c') && (expr[1] == ' ')) {
+ char *ptr = &expr[2];
+ int from, to;
+ int min, max;
+
+ from = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ if (states[from] == NULL)
+ states[from] = xmlAutomataNewState(am);
+ ptr++;
+ to = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ if (states[to] == NULL)
+ states[to] = xmlAutomataNewState(am);
+ ptr++;
+ min = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ ptr++;
+ max = scanNumber(&ptr);
+ if (*ptr != ' ') {
+ xmlGenericError(xmlGenericErrorContext,
+ "Bad line %s\n", expr);
+ break;
+ }
+ ptr++;
+ xmlAutomataNewCountTrans(am, states[from], states[to],
+ BAD_CAST ptr, min, max, NULL);
+ } else if ((am != NULL) && (expr[0] == '-') && (expr[1] == '-')) {
+ /* end of the automata */
+ regexp = xmlAutomataCompile(am);
+ xmlFreeAutomata(am);
+ am = NULL;
+ if (regexp == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Failed to compile the automata");
+ break;
+ }
+ } else if ((expr[0] == '=') && (expr[1] == '>')) {
+ if (regexp == NULL) {
+ printf("=> failed not compiled\n");
+ } else {
+ if (exec == NULL)
+ exec = xmlRegNewExecCtxt(regexp, NULL, NULL);
+ if (ret == 0) {
+ ret = xmlRegExecPushString(exec, NULL, NULL);
+ }
+ if (ret == 1)
+ printf("=> Passed\n");
+ else if ((ret == 0) || (ret == -1))
+ printf("=> Failed\n");
+ else if (ret < 0)
+ printf("=> Error\n");
+ xmlRegFreeExecCtxt(exec);
+ exec = NULL;
+ }
+ ret = 0;
+ } else if (regexp != NULL) {
+ if (exec == NULL)
+ exec = xmlRegNewExecCtxt(regexp, NULL, NULL);
+ ret = xmlRegExecPushString(exec, BAD_CAST expr, NULL);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Unexpected line %s\n", expr);
+ }
+ }
+ }
+ fclose(input);
+ if (regexp != NULL)
+ xmlRegFreeRegexp(regexp);
+ if (exec != NULL)
+ xmlRegFreeExecCtxt(exec);
+ if (am != NULL)
+ xmlFreeAutomata(am);
+}
+
+int main(int argc, char **argv) {
+
+ xmlInitMemory();
+
+ if (argc == 1) {
+ int ret;
+ xmlAutomataPtr am;
+ xmlAutomataStatePtr start, cur;
+ xmlRegexpPtr regexp;
+ xmlRegExecCtxtPtr exec;
+
+ am = xmlNewAutomata();
+ start = xmlAutomataGetInitState(am);
+
+ /* generate a[ba]*a */
+ cur = xmlAutomataNewTransition(am, start, NULL, BAD_CAST"a", NULL);
+ xmlAutomataNewTransition(am, cur, cur, BAD_CAST"b", NULL);
+ xmlAutomataNewTransition(am, cur, cur, BAD_CAST"a", NULL);
+ cur = xmlAutomataNewCountTrans(am, cur, NULL, BAD_CAST"a", 2, 3, NULL);
+ xmlAutomataSetFinalState(am, cur);
+
+ /* compile it in a regexp and free the automata */
+ regexp = xmlAutomataCompile(am);
+ xmlFreeAutomata(am);
+
+ /* test the regexp */
+ xmlRegexpPrint(stdout, regexp);
+ exec = xmlRegNewExecCtxt(regexp, NULL, NULL);
+ ret = xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"b", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ ret =xmlRegExecPushString(exec, BAD_CAST"a", NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ if (ret == 0) {
+ ret = xmlRegExecPushString(exec, NULL, NULL);
+ if (ret == 1)
+ printf("final\n");
+ else if (ret < 0)
+ printf("error\n");
+ }
+ xmlRegFreeExecCtxt(exec);
+
+ /* free the regexp */
+ xmlRegFreeRegexp(regexp);
+ } else {
+ int i;
+
+ for (i = 1;i < argc;i++)
+ testRegexpFile(argv[i]);
+ }
+
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : Automata support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_AUTOMATA_ENABLED */
diff --git a/testC14N.c b/testC14N.c
new file mode 100644
index 0000000..86e58f2
--- /dev/null
+++ b/testC14N.c
@@ -0,0 +1,370 @@
+/*
+ * Canonical XML implementation test program
+ * (http://www.w3.org/TR/2001/REC-xml-c14n-20010315)
+ *
+ * See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
+ */
+#include "libxml.h"
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+
+#include <stdio.h>
+#include <string.h>
+#ifndef STDOUT_FILENO
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#else
+#define STDOUT_FILENO fileno(stdout)
+#endif /* HAVE_UNISTD_H */
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#include <libxml/c14n.h>
+
+
+static void usage(const char *name) {
+ fprintf(stderr,
+ "Usage: %s <mode> <xml-file> [<xpath-expr>] [<inclusive-ns-list>]\n",
+ name);
+ fprintf(stderr, "where <mode> is one of following:\n");
+ fprintf(stderr,
+ "--with-comments \t XML file canonicalization v1.0 w comments \n");
+ fprintf(stderr,
+ "--without-comments \t XML file canonicalization v1.0 w/o comments\n");
+ fprintf(stderr,
+ "--1-1-with-comments \t XML file canonicalization v1.1 w comments\n");
+ fprintf(stderr,
+ "--1-1-without-comments \t XML file canonicalization v1.1 w/o comments\n");
+ fprintf(stderr,
+ "--exc-with-comments \t Exclusive XML file canonicalization v1.0 w comments\n");
+ fprintf(stderr,
+ "--exc-without-comments\t Exclusive XML file canonicalization v1.0 w/o comments\n");
+}
+
+static xmlXPathObjectPtr
+load_xpath_expr (xmlDocPtr parent_doc, const char* filename);
+
+static xmlChar **parse_list(xmlChar *str);
+
+/* static void print_xpath_nodes(xmlNodeSetPtr nodes); */
+
+static int
+test_c14n(const char* xml_filename, int with_comments, int mode,
+ const char* xpath_filename, xmlChar **inclusive_namespaces) {
+ xmlDocPtr doc;
+ xmlXPathObjectPtr xpath = NULL;
+ xmlChar *result = NULL;
+ int ret;
+
+ /*
+ * build an XML tree from a the file; we need to add default
+ * attributes and resolve all character and entities references
+ */
+ xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ xmlSubstituteEntitiesDefault(1);
+
+ doc = xmlReadFile(xml_filename, NULL, XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", xml_filename);
+ return(-1);
+ }
+
+ /*
+ * Check the document is of the right kind
+ */
+ if(xmlDocGetRootElement(doc) == NULL) {
+ fprintf(stderr,"Error: empty document for file \"%s\"\n", xml_filename);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /*
+ * load xpath file if specified
+ */
+ if(xpath_filename) {
+ xpath = load_xpath_expr(doc, xpath_filename);
+ if(xpath == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression\n");
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+ }
+
+ /*
+ * Canonical form
+ */
+ /* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */
+ ret = xmlC14NDocDumpMemory(doc,
+ (xpath) ? xpath->nodesetval : NULL,
+ mode, inclusive_namespaces,
+ with_comments, &result);
+ if(ret >= 0) {
+ if(result != NULL) {
+ if (write(STDOUT_FILENO, result, ret) == -1) {
+ fprintf(stderr, "Can't write data\n");
+ }
+ xmlFree(result);
+ }
+ } else {
+ fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", xml_filename, ret);
+ if(result != NULL) xmlFree(result);
+ xmlFreeDoc(doc);
+ return(-1);
+ }
+
+ /*
+ * Cleanup
+ */
+ if(xpath != NULL) xmlXPathFreeObject(xpath);
+ xmlFreeDoc(doc);
+
+ return(ret);
+}
+
+int main(int argc, char **argv) {
+ int ret = -1;
+
+ /*
+ * Init libxml
+ */
+ xmlInitParser();
+ LIBXML_TEST_VERSION
+
+ /*
+ * Parse command line and process file
+ */
+ if( argc < 3 ) {
+ fprintf(stderr, "Error: wrong number of arguments.\n");
+ usage(argv[0]);
+ } else if(strcmp(argv[1], "--with-comments") == 0) {
+ ret = test_c14n(argv[2], 1, XML_C14N_1_0, (argc > 3) ? argv[3] : NULL, NULL);
+ } else if(strcmp(argv[1], "--without-comments") == 0) {
+ ret = test_c14n(argv[2], 0, XML_C14N_1_0, (argc > 3) ? argv[3] : NULL, NULL);
+ } else if(strcmp(argv[1], "--1-1-with-comments") == 0) {
+ ret = test_c14n(argv[2], 1, XML_C14N_1_1, (argc > 3) ? argv[3] : NULL, NULL);
+ } else if(strcmp(argv[1], "--1-1-without-comments") == 0) {
+ ret = test_c14n(argv[2], 0, XML_C14N_1_1, (argc > 3) ? argv[3] : NULL, NULL);
+ } else if(strcmp(argv[1], "--exc-with-comments") == 0) {
+ xmlChar **list;
+
+ /* load exclusive namespace from command line */
+ list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL;
+ ret = test_c14n(argv[2], 1, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list);
+ if(list != NULL) xmlFree(list);
+ } else if(strcmp(argv[1], "--exc-without-comments") == 0) {
+ xmlChar **list;
+
+ /* load exclusive namespace from command line */
+ list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL;
+ ret = test_c14n(argv[2], 0, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list);
+ if(list != NULL) xmlFree(list);
+ } else {
+ fprintf(stderr, "Error: bad option.\n");
+ usage(argv[0]);
+ }
+
+ /*
+ * Shutdown libxml
+ */
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return((ret >= 0) ? 0 : 1);
+}
+
+/*
+ * Macro used to grow the current buffer.
+ */
+#define growBufferReentrant() { \
+ buffer_size *= 2; \
+ buffer = (xmlChar **) \
+ xmlRealloc(buffer, buffer_size * sizeof(xmlChar*)); \
+ if (buffer == NULL) { \
+ perror("realloc failed"); \
+ return(NULL); \
+ } \
+}
+
+static xmlChar **
+parse_list(xmlChar *str) {
+ xmlChar **buffer;
+ xmlChar **out = NULL;
+ int buffer_size = 0;
+ int len;
+
+ if(str == NULL) {
+ return(NULL);
+ }
+
+ len = xmlStrlen(str);
+ if((str[0] == '\'') && (str[len - 1] == '\'')) {
+ str[len - 1] = '\0';
+ str++;
+ }
+ /*
+ * allocate an translation buffer.
+ */
+ buffer_size = 1000;
+ buffer = (xmlChar **) xmlMalloc(buffer_size * sizeof(xmlChar*));
+ if (buffer == NULL) {
+ perror("malloc failed");
+ return(NULL);
+ }
+ out = buffer;
+
+ while(*str != '\0') {
+ if (out - buffer > buffer_size - 10) {
+ int indx = out - buffer;
+
+ growBufferReentrant();
+ out = &buffer[indx];
+ }
+ (*out++) = str;
+ while(*str != ',' && *str != '\0') ++str;
+ if(*str == ',') *(str++) = '\0';
+ }
+ (*out) = NULL;
+ return buffer;
+}
+
+static xmlXPathObjectPtr
+load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
+ xmlXPathObjectPtr xpath;
+ xmlDocPtr doc;
+ xmlChar *expr;
+ xmlXPathContextPtr ctx;
+ xmlNodePtr node;
+ xmlNsPtr ns;
+
+ /*
+ * load XPath expr as a file
+ */
+ xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ xmlSubstituteEntitiesDefault(1);
+
+ doc = xmlReadFile(filename, NULL, XML_PARSE_DTDATTR | XML_PARSE_NOENT);
+ if (doc == NULL) {
+ fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
+ return(NULL);
+ }
+
+ /*
+ * Check the document is of the right kind
+ */
+ if(xmlDocGetRootElement(doc) == NULL) {
+ fprintf(stderr,"Error: empty document for file \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ node = doc->children;
+ while(node != NULL && !xmlStrEqual(node->name, (const xmlChar *)"XPath")) {
+ node = node->next;
+ }
+
+ if(node == NULL) {
+ fprintf(stderr,"Error: XPath element expected in the file \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ expr = xmlNodeGetContent(node);
+ if(expr == NULL) {
+ fprintf(stderr,"Error: XPath content element is NULL \"%s\"\n", filename);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ ctx = xmlXPathNewContext(parent_doc);
+ if(ctx == NULL) {
+ fprintf(stderr,"Error: unable to create new context\n");
+ xmlFree(expr);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ /*
+ * Register namespaces
+ */
+ ns = node->nsDef;
+ while(ns != NULL) {
+ if(xmlXPathRegisterNs(ctx, ns->prefix, ns->href) != 0) {
+ fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", ns->prefix, ns->href);
+ xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+ ns = ns->next;
+ }
+
+ /*
+ * Evaluate xpath
+ */
+ xpath = xmlXPathEvalExpression(expr, ctx);
+ if(xpath == NULL) {
+ fprintf(stderr,"Error: unable to evaluate xpath expression\n");
+ xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(NULL);
+ }
+
+ /* print_xpath_nodes(xpath->nodesetval); */
+
+ xmlFree(expr);
+ xmlXPathFreeContext(ctx);
+ xmlFreeDoc(doc);
+ return(xpath);
+}
+
+/*
+static void
+print_xpath_nodes(xmlNodeSetPtr nodes) {
+ xmlNodePtr cur;
+ int i;
+
+ if(nodes == NULL ){
+ fprintf(stderr, "Error: no nodes set defined\n");
+ return;
+ }
+
+ fprintf(stderr, "Nodes Set:\n-----\n");
+ for(i = 0; i < nodes->nodeNr; ++i) {
+ if(nodes->nodeTab[i]->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns;
+
+ ns = (xmlNsPtr)nodes->nodeTab[i];
+ cur = (xmlNodePtr)ns->next;
+ fprintf(stderr, "namespace \"%s\"=\"%s\" for node %s:%s\n",
+ ns->prefix, ns->href,
+ (cur->ns) ? cur->ns->prefix : BAD_CAST "", cur->name);
+ } else if(nodes->nodeTab[i]->type == XML_ELEMENT_NODE) {
+ cur = nodes->nodeTab[i];
+ fprintf(stderr, "element node \"%s:%s\"\n",
+ (cur->ns) ? cur->ns->prefix : BAD_CAST "", cur->name);
+ } else {
+ cur = nodes->nodeTab[i];
+ fprintf(stderr, "node \"%s\": type %d\n", cur->name, cur->type);
+ }
+ }
+}
+*/
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : XPath/Canonicalization and output support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_C14N_ENABLED */
+
+
diff --git a/testHTML.c b/testHTML.c
new file mode 100644
index 0000000..9b42778
--- /dev/null
+++ b/testHTML.c
@@ -0,0 +1,880 @@
+/*
+ * testHTML.c : a small tester program for HTML input.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#ifdef LIBXML_HTML_ENABLED
+
+#include <string.h>
+#include <stdarg.h>
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+static int debug = 0;
+#endif
+static int copy = 0;
+static int sax = 0;
+static int repeat = 0;
+static int noout = 0;
+#ifdef LIBXML_PUSH_ENABLED
+static int push = 0;
+#endif /* LIBXML_PUSH_ENABLED */
+static char *encoding = NULL;
+static int options = 0;
+
+static xmlSAXHandler emptySAXHandlerStruct = {
+ NULL, /* internalSubset */
+ NULL, /* isStandalone */
+ NULL, /* hasInternalSubset */
+ NULL, /* hasExternalSubset */
+ NULL, /* resolveEntity */
+ NULL, /* getEntity */
+ NULL, /* entityDecl */
+ NULL, /* notationDecl */
+ NULL, /* attributeDecl */
+ NULL, /* elementDecl */
+ NULL, /* unparsedEntityDecl */
+ NULL, /* setDocumentLocator */
+ NULL, /* startDocument */
+ NULL, /* endDocument */
+ NULL, /* startElement */
+ NULL, /* endElement */
+ NULL, /* reference */
+ NULL, /* characters */
+ NULL, /* ignorableWhitespace */
+ NULL, /* processingInstruction */
+ NULL, /* comment */
+ NULL, /* xmlParserWarning */
+ NULL, /* xmlParserError */
+ NULL, /* xmlParserError */
+ NULL, /* getParameterEntity */
+ NULL, /* cdataBlock */
+ NULL, /* externalSubset */
+ 1, /* initialized */
+ NULL, /* private */
+ NULL, /* startElementNsSAX2Func */
+ NULL, /* endElementNsSAX2Func */
+ NULL /* xmlStructuredErrorFunc */
+};
+
+static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
+extern xmlSAXHandlerPtr debugSAXHandler;
+
+/************************************************************************
+ * *
+ * Debug Handlers *
+ * *
+ ************************************************************************/
+
+/**
+ * isStandaloneDebug:
+ * @ctxt: An XML parser context
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+static int
+isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.isStandalone()\n");
+ return(0);
+}
+
+/**
+ * hasInternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.hasInternalSubset()\n");
+ return(0);
+}
+
+/**
+ * hasExternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.hasExternalSubset()\n");
+ return(0);
+}
+
+/**
+ * hasInternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ */
+static void
+internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ fprintf(stdout, "SAX.internalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(stdout, " ,");
+ else
+ fprintf(stdout, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(stdout, " )\n");
+ else
+ fprintf(stdout, " %s)\n", SystemID);
+}
+
+/**
+ * resolveEntityDebug:
+ * @ctxt: An XML parser context
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Special entity resolver, better left to the parser, it has
+ * more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlParserInputPtr
+resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
+{
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+
+
+ fprintf(stdout, "SAX.resolveEntity(");
+ if (publicId != NULL)
+ fprintf(stdout, "%s", (char *)publicId);
+ else
+ fprintf(stdout, " ");
+ if (systemId != NULL)
+ fprintf(stdout, ", %s)\n", (char *)systemId);
+ else
+ fprintf(stdout, ", )\n");
+/*********
+ if (systemId != NULL) {
+ return(xmlNewInputFromFile(ctxt, (char *) systemId));
+ }
+ *********/
+ return(NULL);
+}
+
+/**
+ * getEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlEntityPtr
+getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ fprintf(stdout, "SAX.getEntity(%s)\n", name);
+ return(NULL);
+}
+
+/**
+ * getParameterEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlParserInputPtr
+ */
+static xmlEntityPtr
+getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);
+ return(NULL);
+}
+
+
+/**
+ * entityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+static void
+entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+ fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
+ name, type, publicId, systemId, content);
+}
+
+/**
+ * attributeDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the attribute name
+ * @type: the attribute type
+ *
+ * An attribute definition has been parsed
+ */
+static void
+attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlChar *name,
+ int type, int def, const xmlChar *defaultValue,
+ xmlEnumerationPtr tree ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
+ elem, name, type, def, defaultValue);
+}
+
+/**
+ * elementDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value (without processing).
+ *
+ * An element definition has been parsed
+ */
+static void
+elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",
+ name, type);
+}
+
+/**
+ * notationDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+static void
+notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId);
+}
+
+/**
+ * unparsedEntityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+static void
+unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+ fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId,
+ (char *) notationName);
+}
+
+/**
+ * setDocumentLocatorDebug:
+ * @ctxt: An XML parser context
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+static void
+setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.setDocumentLocator()\n");
+}
+
+/**
+ * startDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document start being processed.
+ */
+static void
+startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.startDocument()\n");
+}
+
+/**
+ * endDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document end has been detected.
+ */
+static void
+endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ fprintf(stdout, "SAX.endDocument()\n");
+}
+
+/**
+ * startElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
+{
+ int i;
+
+ fprintf(stdout, "SAX.startElement(%s", (char *) name);
+ if (atts != NULL) {
+ for (i = 0;(atts[i] != NULL);i++) {
+ fprintf(stdout, ", %s", atts[i++]);
+ if (atts[i] != NULL) {
+ unsigned char output[40];
+ const unsigned char *att = atts[i];
+ int outlen, attlen;
+ fprintf(stdout, "='");
+ while ((attlen = strlen((char*)att)) > 0) {
+ outlen = sizeof output - 1;
+ htmlEncodeEntities(output, &outlen, att, &attlen, '\'');
+ output[outlen] = 0;
+ fprintf(stdout, "%s", (char *) output);
+ att += attlen;
+ }
+ fprintf(stdout, "'");
+ }
+ }
+ }
+ fprintf(stdout, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);
+}
+
+/**
+ * charactersDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ unsigned char output[40];
+ int inlen = len, outlen = 30;
+
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
+ output[outlen] = 0;
+
+ fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);
+}
+
+/**
+ * cdataDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some cdata chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+cdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ unsigned char output[40];
+ int inlen = len, outlen = 30;
+
+ htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
+ output[outlen] = 0;
+
+ fprintf(stdout, "SAX.cdata(%s, %d)\n", output, len);
+}
+
+/**
+ * referenceDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ */
+static void
+referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ fprintf(stdout, "SAX.reference(%s)\n", name);
+}
+
+/**
+ * ignorableWhitespaceDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @start: the first char in the string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * Question: how much at a time ???
+ */
+static void
+ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char output[40];
+ int i;
+
+ for (i = 0;(i<len) && (i < 30);i++)
+ output[i] = ch[i];
+ output[i] = 0;
+
+ fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", output, len);
+}
+
+/**
+ * processingInstructionDebug:
+ * @ctxt: An XML parser context
+ * @target: the target name
+ * @data: the PI data's
+ * @len: the number of xmlChar
+ *
+ * A processing instruction has been parsed.
+ */
+static void
+processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,
+ const xmlChar *data)
+{
+ fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",
+ (char *) target, (char *) data);
+}
+
+/**
+ * commentDebug:
+ * @ctxt: An XML parser context
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+static void
+commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
+{
+ fprintf(stdout, "SAX.comment(%s)\n", value);
+}
+
+/**
+ * warningDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ va_start(args, msg);
+ fprintf(stdout, "SAX.warning: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * errorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ va_start(args, msg);
+ fprintf(stdout, "SAX.error: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * fatalErrorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a fatalError messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ va_start(args, msg);
+ fprintf(stdout, "SAX.fatalError: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+static xmlSAXHandler debugSAXHandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ startElementDebug,
+ endElementDebug,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataDebug,
+ NULL,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
+/************************************************************************
+ * *
+ * Debug *
+ * *
+ ************************************************************************/
+
+static void
+parseSAXFile(char *filename) {
+ htmlDocPtr doc = NULL;
+
+ /*
+ * Empty callbacks for checking
+ */
+#ifdef LIBXML_PUSH_ENABLED
+ if (push) {
+ FILE *f;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int res, size = 3;
+ char chars[4096];
+ htmlParserCtxtPtr ctxt;
+
+ /* if (repeat) */
+ size = 4096;
+ res = fread(chars, 1, 4, f);
+ if (res > 0) {
+ ctxt = htmlCreatePushParserCtxt(emptySAXHandler, NULL,
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
+ while ((res = fread(chars, 1, size, f)) > 0) {
+ htmlParseChunk(ctxt, chars, res, 0);
+ }
+ htmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt->myDoc;
+ htmlFreeParserCtxt(ctxt);
+ }
+ if (doc != NULL) {
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
+ xmlFreeDoc(doc);
+ }
+ fclose(f);
+ }
+ if (!noout) {
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int res, size = 3;
+ char chars[4096];
+ htmlParserCtxtPtr ctxt;
+
+ /* if (repeat) */
+ size = 4096;
+ res = fread(chars, 1, 4, f);
+ if (res > 0) {
+ ctxt = htmlCreatePushParserCtxt(debugSAXHandler, NULL,
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
+ while ((res = fread(chars, 1, size, f)) > 0) {
+ htmlParseChunk(ctxt, chars, res, 0);
+ }
+ htmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt->myDoc;
+ htmlFreeParserCtxt(ctxt);
+ }
+ if (doc != NULL) {
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
+ xmlFreeDoc(doc);
+ }
+ fclose(f);
+ }
+ }
+ } else {
+#endif /* LIBXML_PUSH_ENABLED */
+ doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL);
+ if (doc != NULL) {
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
+ xmlFreeDoc(doc);
+ }
+
+ if (!noout) {
+ /*
+ * Debug callback
+ */
+ doc = htmlSAXParseFile(filename, NULL, debugSAXHandler, NULL);
+ if (doc != NULL) {
+ fprintf(stdout, "htmlSAXParseFile returned non-NULL\n");
+ xmlFreeDoc(doc);
+ }
+ }
+#ifdef LIBXML_PUSH_ENABLED
+ }
+#endif /* LIBXML_PUSH_ENABLED */
+}
+
+static void
+parseAndPrintFile(char *filename) {
+ htmlDocPtr doc = NULL;
+
+ /*
+ * build an HTML tree from a string;
+ */
+#ifdef LIBXML_PUSH_ENABLED
+ if (push) {
+ FILE *f;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int res, size = 3;
+ char chars[4096];
+ htmlParserCtxtPtr ctxt;
+
+ /* if (repeat) */
+ size = 4096;
+ res = fread(chars, 1, 4, f);
+ if (res > 0) {
+ ctxt = htmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
+ while ((res = fread(chars, 1, size, f)) > 0) {
+ htmlParseChunk(ctxt, chars, res, 0);
+ }
+ htmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt->myDoc;
+ htmlFreeParserCtxt(ctxt);
+ }
+ fclose(f);
+ }
+ } else {
+ doc = htmlReadFile(filename, NULL, options);
+ }
+#else
+ doc = htmlReadFile(filename,NULL,options);
+#endif
+ if (doc == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Could not parse %s\n", filename);
+ }
+
+#ifdef LIBXML_TREE_ENABLED
+ /*
+ * test intermediate copy if needed.
+ */
+ if (copy) {
+ htmlDocPtr tmp;
+
+ tmp = doc;
+ doc = xmlCopyDoc(doc, 1);
+ xmlFreeDoc(tmp);
+ }
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+ /*
+ * print it.
+ */
+ if (!noout) {
+#ifdef LIBXML_DEBUG_ENABLED
+ if (!debug) {
+ if (encoding)
+ htmlSaveFileEnc("-", doc, encoding);
+ else
+ htmlDocDump(stdout, doc);
+ } else
+ xmlDebugDumpDocument(stdout, doc);
+#else
+ if (encoding)
+ htmlSaveFileEnc("-", doc, encoding);
+ else
+ htmlDocDump(stdout, doc);
+#endif
+ }
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+ /*
+ * free it.
+ */
+ xmlFreeDoc(doc);
+}
+
+int main(int argc, char **argv) {
+ int i, count;
+ int files = 0;
+
+ for (i = 1; i < argc ; i++) {
+#ifdef LIBXML_DEBUG_ENABLED
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else
+#endif
+ if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
+ copy++;
+#ifdef LIBXML_PUSH_ENABLED
+ else if ((!strcmp(argv[i], "-push")) || (!strcmp(argv[i], "--push")))
+ push++;
+#endif /* LIBXML_PUSH_ENABLED */
+ else if ((!strcmp(argv[i], "-sax")) || (!strcmp(argv[i], "--sax")))
+ sax++;
+ else if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout")))
+ noout++;
+ else if ((!strcmp(argv[i], "-repeat")) ||
+ (!strcmp(argv[i], "--repeat")))
+ repeat++;
+ else if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ encoding = argv[i];
+ }
+ }
+ for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ continue;
+ }
+ if (argv[i][0] != '-') {
+ if (repeat) {
+ for (count = 0;count < 100 * repeat;count++) {
+ if (sax)
+ parseSAXFile(argv[i]);
+ else
+ parseAndPrintFile(argv[i]);
+ }
+ } else {
+ if (sax)
+ parseSAXFile(argv[i]);
+ else
+ parseAndPrintFile(argv[i]);
+ }
+ files ++;
+ }
+ }
+ if (files == 0) {
+ printf("Usage : %s [--debug] [--copy] [--copy] HTMLfiles ...\n",
+ argv[0]);
+ printf("\tParse the HTML files and output the result of the parsing\n");
+#ifdef LIBXML_DEBUG_ENABLED
+ printf("\t--debug : dump a debug tree of the in-memory document\n");
+#endif
+ printf("\t--copy : used to test the internal copy implementation\n");
+ printf("\t--sax : debug the sequence of SAX callbacks\n");
+ printf("\t--repeat : parse the file 100 times, for timing\n");
+ printf("\t--noout : do not print the result\n");
+#ifdef LIBXML_PUSH_ENABLED
+ printf("\t--push : use the push mode parser\n");
+#endif /* LIBXML_PUSH_ENABLED */
+ printf("\t--encode encoding : output in the given encoding\n");
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+#else /* !LIBXML_HTML_ENABLED */
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : HTML support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif
diff --git a/testModule.c b/testModule.c
new file mode 100644
index 0000000..e399f5c
--- /dev/null
+++ b/testModule.c
@@ -0,0 +1,82 @@
+/*
+ * testModule.c : a small tester program for xmlModule
+ *
+ * See Copyright for the status of this software.
+ *
+ * joelwreed@comcast.net
+ */
+
+#include "libxml.h"
+#ifdef LIBXML_MODULES_ENABLED
+#include <libxml/xmlversion.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlmodule.h>
+
+#ifdef _WIN32
+#define MODULE_PATH "."
+#include <stdlib.h> /* for _MAX_PATH */
+#ifndef __MINGW32__
+#define PATH_MAX _MAX_PATH
+#endif
+#else
+#define MODULE_PATH ".libs"
+#endif
+
+/* Used for SCO Openserver*/
+#ifndef PATH_MAX
+#ifdef _POSIX_PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#else
+#define PATH_MAX 4096
+#endif
+#endif
+
+typedef int (*hello_world_t)(void);
+
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ xmlChar filename[PATH_MAX];
+ xmlModulePtr module = NULL;
+ hello_world_t hello_world = NULL;
+
+ /* build the module filename, and confirm the module exists */
+ xmlStrPrintf(filename, sizeof(filename),
+ (const xmlChar*) "%s/testdso%s",
+ (const xmlChar*)MODULE_PATH,
+ (const xmlChar*)LIBXML_MODULE_EXTENSION);
+
+ module = xmlModuleOpen((const char*)filename, 0);
+ if (module)
+ {
+ if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) {
+ fprintf(stderr, "Failure to lookup\n");
+ return(1);
+ }
+ if (hello_world == NULL) {
+ fprintf(stderr, "Lookup returned NULL\n");
+ return(1);
+ }
+
+ (*hello_world)();
+
+ xmlModuleClose(module);
+ }
+
+ xmlMemoryDump();
+
+ return(0);
+}
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : Module support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/testReader.c b/testReader.c
new file mode 100644
index 0000000..8f8e26d
--- /dev/null
+++ b/testReader.c
@@ -0,0 +1,145 @@
+/*
+ * testSAX.c : a small tester program for parsing using the SAX API.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#ifdef LIBXML_READER_ENABLED
+#include <string.h>
+#include <stdarg.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+
+#include <libxml/xmlreader.h>
+
+static int debug = 0;
+static int dump = 0;
+static int noent = 0;
+static int count = 0;
+static int valid = 0;
+static int consumed = 0;
+
+static void usage(const char *progname) {
+ printf("Usage : %s [options] XMLfiles ...\n", progname);
+ printf("\tParse the XML files using the xmlTextReader API\n");
+ printf("\t --count: count the number of attribute and elements\n");
+ printf("\t --valid: validate the document\n");
+ printf("\t --consumed: count the number of bytes consumed\n");
+ exit(1);
+}
+static int elem, attrs;
+
+static void processNode(xmlTextReaderPtr reader) {
+ int type;
+
+ type = xmlTextReaderNodeType(reader);
+ if (count) {
+ if (type == 1) {
+ elem++;
+ attrs += xmlTextReaderAttributeCount(reader);
+ }
+ }
+}
+
+static void handleFile(const char *filename) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+ if (count) {
+ elem = 0;
+ attrs = 0;
+ }
+
+ reader = xmlNewTextReaderFilename(filename);
+ if (reader != NULL) {
+ if (valid)
+ xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1);
+
+ /*
+ * Process all nodes in sequence
+ */
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+
+ /*
+ * Done, cleanup and status
+ */
+ if (consumed)
+ printf("%ld bytes consumed by parser\n", xmlTextReaderByteConsumed(reader));
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ printf("%s : failed to parse\n", filename);
+ } else if (count)
+ printf("%s : %d elements, %d attributes\n", filename, elem, attrs);
+ } else {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ }
+}
+
+int main(int argc, char **argv) {
+ int i;
+ int files = 0;
+
+ if (argc <= 1) {
+ usage(argv[0]);
+ return(1);
+ }
+ LIBXML_TEST_VERSION
+ for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else if ((!strcmp(argv[i], "-dump")) || (!strcmp(argv[i], "--dump")))
+ dump++;
+ else if ((!strcmp(argv[i], "-count")) || (!strcmp(argv[i], "--count")))
+ count++;
+ else if ((!strcmp(argv[i], "-consumed")) || (!strcmp(argv[i], "--consumed")))
+ consumed++;
+ else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid")))
+ valid++;
+ else if ((!strcmp(argv[i], "-noent")) ||
+ (!strcmp(argv[i], "--noent")))
+ noent++;
+ }
+ if (noent != 0) xmlSubstituteEntitiesDefault(1);
+ for (i = 1; i < argc ; i++) {
+ if (argv[i][0] != '-') {
+ handleFile(argv[i]);
+ files ++;
+ }
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+#else
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : xmlReader parser support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_READER_ENABLED */
diff --git a/testRegexp.c b/testRegexp.c
new file mode 100644
index 0000000..21dac94
--- /dev/null
+++ b/testRegexp.c
@@ -0,0 +1,402 @@
+/*
+ * testRegexp.c: simple module for testing regular expressions
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#include "libxml.h"
+#ifdef LIBXML_REGEXP_ENABLED
+#include <string.h>
+
+#include <libxml/tree.h>
+#include <libxml/xmlregexp.h>
+
+static int repeat = 0;
+static int debug = 0;
+
+static void testRegexp(xmlRegexpPtr comp, const char *value) {
+ int ret;
+
+ ret = xmlRegexpExec(comp, (const xmlChar *) value);
+ if (ret == 1)
+ printf("%s: Ok\n", value);
+ else if (ret == 0)
+ printf("%s: Fail\n", value);
+ else
+ printf("%s: Error: %d\n", value, ret);
+ if (repeat) {
+ int j;
+ for (j = 0;j < 999999;j++)
+ xmlRegexpExec(comp, (const xmlChar *) value);
+ }
+}
+
+static void
+testRegexpFile(const char *filename) {
+ xmlRegexpPtr comp = NULL;
+ FILE *input;
+ char expression[5000];
+ int len;
+
+ input = fopen(filename, "r");
+ if (input == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot open %s for reading\n", filename);
+ return;
+ }
+ while (fgets(expression, 4500, input) != NULL) {
+ len = strlen(expression);
+ len--;
+ while ((len >= 0) &&
+ ((expression[len] == '\n') || (expression[len] == '\t') ||
+ (expression[len] == '\r') || (expression[len] == ' '))) len--;
+ expression[len + 1] = 0;
+ if (len >= 0) {
+ if (expression[0] == '#')
+ continue;
+ if ((expression[0] == '=') && (expression[1] == '>')) {
+ char *pattern = &expression[2];
+
+ if (comp != NULL) {
+ xmlRegFreeRegexp(comp);
+ comp = NULL;
+ }
+ printf("Regexp: %s\n", pattern) ;
+ comp = xmlRegexpCompile((const xmlChar *) pattern);
+ if (comp == NULL) {
+ printf(" failed to compile\n");
+ break;
+ }
+ } else if (comp == NULL) {
+ printf("Regexp: %s\n", expression) ;
+ comp = xmlRegexpCompile((const xmlChar *) expression);
+ if (comp == NULL) {
+ printf(" failed to compile\n");
+ break;
+ }
+ } else if (comp != NULL) {
+ testRegexp(comp, expression);
+ }
+ }
+ }
+ fclose(input);
+ if (comp != NULL)
+ xmlRegFreeRegexp(comp);
+}
+
+#ifdef LIBXML_EXPR_ENABLED
+static void
+runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
+ xmlExpNodePtr expr = NULL, sub;
+ FILE *input;
+ char expression[5000];
+ int len;
+
+ input = fopen(filename, "r");
+ if (input == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot open %s for reading\n", filename);
+ return;
+ }
+ while (fgets(expression, 4500, input) != NULL) {
+ len = strlen(expression);
+ len--;
+ while ((len >= 0) &&
+ ((expression[len] == '\n') || (expression[len] == '\t') ||
+ (expression[len] == '\r') || (expression[len] == ' '))) len--;
+ expression[len + 1] = 0;
+ if (len >= 0) {
+ if (expression[0] == '#')
+ continue;
+ if ((expression[0] == '=') && (expression[1] == '>')) {
+ char *str = &expression[2];
+
+ if (expr != NULL) {
+ xmlExpFree(ctxt, expr);
+ if (xmlExpCtxtNbNodes(ctxt) != 0)
+ printf(" Parse/free of Expression leaked %d\n",
+ xmlExpCtxtNbNodes(ctxt));
+ expr = NULL;
+ }
+ printf("Expression: %s\n", str) ;
+ expr = xmlExpParse(ctxt, str);
+ if (expr == NULL) {
+ printf(" parsing Failed\n");
+ break;
+ }
+ } else if (expr != NULL) {
+ int expect = -1;
+ int nodes1, nodes2;
+
+ if (expression[0] == '0')
+ expect = 0;
+ if (expression[0] == '1')
+ expect = 1;
+ printf("Subexp: %s", expression + 2) ;
+ nodes1 = xmlExpCtxtNbNodes(ctxt);
+ sub = xmlExpParse(ctxt, expression + 2);
+ if (sub == NULL) {
+ printf(" parsing Failed\n");
+ break;
+ } else {
+ int ret;
+
+ nodes2 = xmlExpCtxtNbNodes(ctxt);
+ ret = xmlExpSubsume(ctxt, expr, sub);
+
+ if ((expect == 1) && (ret == 1)) {
+ printf(" => accept, Ok\n");
+ } else if ((expect == 0) && (ret == 0)) {
+ printf(" => reject, Ok\n");
+ } else if ((expect == 1) && (ret == 0)) {
+ printf(" => reject, Failed\n");
+ } else if ((expect == 0) && (ret == 1)) {
+ printf(" => accept, Failed\n");
+ } else {
+ printf(" => fail internally\n");
+ }
+ if (xmlExpCtxtNbNodes(ctxt) > nodes2) {
+ printf(" Subsume leaked %d\n",
+ xmlExpCtxtNbNodes(ctxt) - nodes2);
+ nodes1 += xmlExpCtxtNbNodes(ctxt) - nodes2;
+ }
+ xmlExpFree(ctxt, sub);
+ if (xmlExpCtxtNbNodes(ctxt) > nodes1) {
+ printf(" Parse/free leaked %d\n",
+ xmlExpCtxtNbNodes(ctxt) - nodes1);
+ }
+ }
+
+ }
+ }
+ }
+ if (expr != NULL) {
+ xmlExpFree(ctxt, expr);
+ if (xmlExpCtxtNbNodes(ctxt) != 0)
+ printf(" Parse/free of Expression leaked %d\n",
+ xmlExpCtxtNbNodes(ctxt));
+ }
+ fclose(input);
+}
+
+static void
+testReduce(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const char *tst) {
+ xmlBufferPtr xmlExpBuf;
+ xmlExpNodePtr sub, deriv;
+ xmlExpBuf = xmlBufferCreate();
+
+ sub = xmlExpParse(ctxt, tst);
+ if (sub == NULL) {
+ printf("Subset %s failed to parse\n", tst);
+ return;
+ }
+ xmlExpDump(xmlExpBuf, sub);
+ printf("Subset parsed as: %s\n",
+ (const char *) xmlBufferContent(xmlExpBuf));
+ deriv = xmlExpExpDerive(ctxt, expr, sub);
+ if (deriv == NULL) {
+ printf("Derivation led to an internal error, report this !\n");
+ return;
+ } else {
+ xmlBufferEmpty(xmlExpBuf);
+ xmlExpDump(xmlExpBuf, deriv);
+ if (xmlExpIsNillable(deriv))
+ printf("Resulting nillable derivation: %s\n",
+ (const char *) xmlBufferContent(xmlExpBuf));
+ else
+ printf("Resulting derivation: %s\n",
+ (const char *) xmlBufferContent(xmlExpBuf));
+ xmlExpFree(ctxt, deriv);
+ }
+ xmlExpFree(ctxt, sub);
+}
+
+static void
+exprDebug(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr) {
+ xmlBufferPtr xmlExpBuf;
+ xmlExpNodePtr deriv;
+ const char *list[40];
+ int ret;
+
+ xmlExpBuf = xmlBufferCreate();
+
+ if (expr == NULL) {
+ printf("Failed to parse\n");
+ return;
+ }
+ xmlExpDump(xmlExpBuf, expr);
+ printf("Parsed as: %s\n", (const char *) xmlBufferContent(xmlExpBuf));
+ printf("Max token input = %d\n", xmlExpMaxToken(expr));
+ if (xmlExpIsNillable(expr) == 1)
+ printf("Is nillable\n");
+ ret = xmlExpGetLanguage(ctxt, expr, (const xmlChar **) &list[0], 40);
+ if (ret < 0)
+ printf("Failed to get list: %d\n", ret);
+ else {
+ int i;
+
+ printf("Language has %d strings, testing string derivations\n", ret);
+ for (i = 0;i < ret;i++) {
+ deriv = xmlExpStringDerive(ctxt, expr, BAD_CAST list[i], -1);
+ if (deriv == NULL) {
+ printf(" %s -> derivation failed\n", list[i]);
+ } else {
+ xmlBufferEmpty(xmlExpBuf);
+ xmlExpDump(xmlExpBuf, deriv);
+ printf(" %s -> %s\n", list[i],
+ (const char *) xmlBufferContent(xmlExpBuf));
+ }
+ xmlExpFree(ctxt, deriv);
+ }
+ }
+ xmlBufferFree(xmlExpBuf);
+}
+#endif
+
+static void usage(const char *name) {
+ fprintf(stderr, "Usage: %s [flags]\n", name);
+ fprintf(stderr, "Testing tool for libxml2 string and pattern regexps\n");
+ fprintf(stderr, " --debug: switch on debugging\n");
+ fprintf(stderr, " --repeat: loop on the operation\n");
+#ifdef LIBXML_EXPR_ENABLED
+ fprintf(stderr, " --expr: test xmlExp and not xmlRegexp\n");
+#endif
+ fprintf(stderr, " --input filename: use the given filename for regexp\n");
+ fprintf(stderr, " --input filename: use the given filename for exp\n");
+}
+
+int main(int argc, char **argv) {
+ xmlRegexpPtr comp = NULL;
+#ifdef LIBXML_EXPR_ENABLED
+ xmlExpNodePtr expr = NULL;
+ int use_exp = 0;
+ xmlExpCtxtPtr ctxt = NULL;
+#endif
+ const char *pattern = NULL;
+ char *filename = NULL;
+ int i;
+
+ xmlInitMemory();
+
+ if (argc <= 1) {
+ usage(argv[0]);
+ return(1);
+ }
+ for (i = 1; i < argc ; i++) {
+ if (!strcmp(argv[i], "-"))
+ break;
+
+ if (argv[i][0] != '-')
+ continue;
+ if (!strcmp(argv[i], "--"))
+ break;
+
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) {
+ debug++;
+ } else if ((!strcmp(argv[i], "-repeat")) ||
+ (!strcmp(argv[i], "--repeat"))) {
+ repeat++;
+#ifdef LIBXML_EXPR_ENABLED
+ } else if ((!strcmp(argv[i], "-expr")) ||
+ (!strcmp(argv[i], "--expr"))) {
+ use_exp++;
+#endif
+ } else if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "-f")) ||
+ (!strcmp(argv[i], "--input")))
+ filename = argv[++i];
+ else {
+ fprintf(stderr, "Unknown option %s\n", argv[i]);
+ usage(argv[0]);
+ }
+ }
+
+#ifdef LIBXML_EXPR_ENABLED
+ if (use_exp)
+ ctxt = xmlExpNewCtxt(0, NULL);
+#endif
+
+ if (filename != NULL) {
+#ifdef LIBXML_EXPR_ENABLED
+ if (use_exp)
+ runFileTest(ctxt, filename);
+ else
+#endif
+ testRegexpFile(filename);
+ } else {
+ int data = 0;
+#ifdef LIBXML_EXPR_ENABLED
+
+ if (use_exp) {
+ for (i = 1; i < argc ; i++) {
+ if (strcmp(argv[i], "--") == 0)
+ data = 1;
+ else if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0) ||
+ (data == 1)) {
+ if (pattern == NULL) {
+ pattern = argv[i];
+ printf("Testing expr %s:\n", pattern);
+ expr = xmlExpParse(ctxt, pattern);
+ if (expr == NULL) {
+ printf(" failed to compile\n");
+ break;
+ }
+ if (debug) {
+ exprDebug(ctxt, expr);
+ }
+ } else {
+ testReduce(ctxt, expr, argv[i]);
+ }
+ }
+ }
+ if (expr != NULL) {
+ xmlExpFree(ctxt, expr);
+ expr = NULL;
+ }
+ } else
+#endif
+ {
+ for (i = 1; i < argc ; i++) {
+ if (strcmp(argv[i], "--") == 0)
+ data = 1;
+ else if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0) ||
+ (data == 1)) {
+ if (pattern == NULL) {
+ pattern = argv[i];
+ printf("Testing %s:\n", pattern);
+ comp = xmlRegexpCompile((const xmlChar *) pattern);
+ if (comp == NULL) {
+ printf(" failed to compile\n");
+ break;
+ }
+ if (debug)
+ xmlRegexpPrint(stdout, comp);
+ } else {
+ testRegexp(comp, argv[i]);
+ }
+ }
+ }
+ if (comp != NULL)
+ xmlRegFreeRegexp(comp);
+ }
+ }
+#ifdef LIBXML_EXPR_ENABLED
+ if (ctxt != NULL) {
+ printf("Ops: %d nodes, %d cons\n",
+ xmlExpCtxtNbNodes(ctxt), xmlExpCtxtNbCons(ctxt));
+ xmlExpFreeCtxt(ctxt);
+ }
+#endif
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return(0);
+}
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : Regexp support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_REGEXP_ENABLED */
diff --git a/testRelax.c b/testRelax.c
new file mode 100644
index 0000000..8e94a7a
--- /dev/null
+++ b/testRelax.c
@@ -0,0 +1,194 @@
+/*
+ * testRelax.c : a small tester program for RelaxNG validation
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel.Veillard@w3.org
+ */
+
+#include "libxml.h"
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+/* seems needed for Solaris */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *) -1)
+#endif
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/relaxng.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+static int debug = 0;
+#endif
+static int noout = 0;
+static int tree = 0;
+#ifdef HAVE_MMAP
+static int memory = 0;
+#endif
+
+
+int main(int argc, char **argv) {
+ int i;
+ int files = 0;
+ xmlRelaxNGPtr schema = NULL;
+
+ for (i = 1; i < argc ; i++) {
+#ifdef LIBXML_DEBUG_ENABLED
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else
+#endif
+#ifdef HAVE_MMAP
+ if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) {
+ memory++;
+ } else
+#endif
+ if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) {
+ noout++;
+ } else
+ if ((!strcmp(argv[i], "-tree")) || (!strcmp(argv[i], "--tree"))) {
+ tree++;
+ }
+ }
+ xmlLineNumbersDefault(1);
+ xmlSubstituteEntitiesDefault(1);
+ for (i = 1; i < argc ; i++) {
+ if (argv[i][0] != '-') {
+ if (schema == NULL) {
+ xmlRelaxNGParserCtxtPtr ctxt;
+
+#ifdef HAVE_MMAP
+ if (memory) {
+ int fd;
+ struct stat info;
+ const char *base;
+ if (stat(argv[i], &info) < 0)
+ break;
+ if ((fd = open(argv[i], O_RDONLY)) < 0)
+ break;
+ base = mmap(NULL, info.st_size, PROT_READ,
+ MAP_SHARED, fd, 0) ;
+ if (base == (void *) MAP_FAILED)
+ break;
+
+ ctxt = xmlRelaxNGNewMemParserCtxt((char *)base,info.st_size);
+
+ xmlRelaxNGSetParserErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ schema = xmlRelaxNGParse(ctxt);
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ munmap((char *) base, info.st_size);
+ } else
+#endif
+ {
+ ctxt = xmlRelaxNGNewParserCtxt(argv[i]);
+ xmlRelaxNGSetParserErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ schema = xmlRelaxNGParse(ctxt);
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ }
+ if (schema == NULL) {
+ printf("Relax-NG schema %s failed to compile\n", argv[i]);
+ files = -1;
+ break;
+ }
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+ if (debug)
+ xmlRelaxNGDump(stdout, schema);
+#endif
+ if (tree)
+ xmlRelaxNGDumpTree(stdout, schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+ } else {
+ xmlDocPtr doc;
+
+ doc = xmlReadFile(argv[i],NULL,0);
+
+ if (doc == NULL) {
+ fprintf(stderr, "Could not parse %s\n", argv[i]);
+ } else {
+ xmlRelaxNGValidCtxtPtr ctxt;
+ int ret;
+
+ ctxt = xmlRelaxNGNewValidCtxt(schema);
+ xmlRelaxNGSetValidErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ ret = xmlRelaxNGValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ printf("%s validates\n", argv[i]);
+ } else if (ret > 0) {
+ printf("%s fails to validate\n", argv[i]);
+ } else {
+ printf("%s validation generated an internal error\n",
+ argv[i]);
+ }
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ xmlFreeDoc(doc);
+ }
+ }
+ files ++;
+ }
+ }
+ if (schema != NULL)
+ xmlRelaxNGFree(schema);
+ if (files == 0) {
+ printf("Usage : %s [--debug] [--noout] schemas XMLfiles ...\n",
+ argv[0]);
+ printf("\tParse the HTML files and output the result of the parsing\n");
+#ifdef LIBXML_DEBUG_ENABLED
+ printf("\t--debug : dump a debug tree of the in-memory document\n");
+#endif
+ printf("\t--noout : do not print the result\n");
+ printf("\t--tree : print the intermediate Relax-NG document tree\n");
+#ifdef HAVE_MMAP
+ printf("\t--memory : test the schemas in memory parsing\n");
+#endif
+ }
+ xmlRelaxNGCleanupTypes();
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : RelaxNG support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/testSAX.c b/testSAX.c
new file mode 100644
index 0000000..81c4b93
--- /dev/null
+++ b/testSAX.c
@@ -0,0 +1,1198 @@
+/*
+ * testSAX.c : a small tester program for parsing using the SAX API.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TIMEB_H
+#include <sys/timeb.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+#ifdef LIBXML_SAX1_ENABLED
+#include <string.h>
+#include <stdarg.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+
+#include <libxml/globals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h> /* only for xmlNewInputFromFile() */
+#include <libxml/tree.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlmemory.h>
+
+static int debug = 0;
+static int copy = 0;
+static int recovery = 0;
+static int push = 0;
+static int speed = 0;
+static int noent = 0;
+static int quiet = 0;
+static int nonull = 0;
+static int sax2 = 0;
+static int repeat = 0;
+static int callbacks = 0;
+static int timing = 0;
+
+/*
+ * Timing routines.
+ */
+/*
+ * Internal timing routines to remove the necessity to have unix-specific
+ * function calls
+ */
+
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_SYS_TIMEB_H
+#ifdef HAVE_SYS_TIME_H
+#ifdef HAVE_FTIME
+
+static int
+my_gettimeofday(struct timeval *tvp, void *tzp)
+{
+ struct timeb timebuffer;
+
+ ftime(&timebuffer);
+ if (tvp) {
+ tvp->tv_sec = timebuffer.time;
+ tvp->tv_usec = timebuffer.millitm * 1000L;
+ }
+ return (0);
+}
+#define HAVE_GETTIMEOFDAY 1
+#define gettimeofday my_gettimeofday
+
+#endif /* HAVE_FTIME */
+#endif /* HAVE_SYS_TIME_H */
+#endif /* HAVE_SYS_TIMEB_H */
+#endif /* !HAVE_GETTIMEOFDAY */
+
+#if defined(HAVE_GETTIMEOFDAY)
+static struct timeval begin, end;
+
+/*
+ * startTimer: call where you want to start timing
+ */
+static void
+startTimer(void)
+{
+ gettimeofday(&begin, NULL);
+}
+
+/*
+ * endTimer: call where you want to stop timing and to print out a
+ * message about the timing performed; format is a printf
+ * type argument
+ */
+static void XMLCDECL
+endTimer(const char *fmt, ...)
+{
+ long msec;
+ va_list ap;
+
+ gettimeofday(&end, NULL);
+ msec = end.tv_sec - begin.tv_sec;
+ msec *= 1000;
+ msec += (end.tv_usec - begin.tv_usec) / 1000;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, " took %ld ms\n", msec);
+}
+#elif defined(HAVE_TIME_H)
+/*
+ * No gettimeofday function, so we have to make do with calling clock.
+ * This is obviously less accurate, but there's little we can do about
+ * that.
+ */
+#ifndef CLOCKS_PER_SEC
+#define CLOCKS_PER_SEC 100
+#endif
+
+static clock_t begin, end;
+static void
+startTimer(void)
+{
+ begin = clock();
+}
+static void XMLCDECL
+endTimer(const char *fmt, ...)
+{
+ long msec;
+ va_list ap;
+
+ end = clock();
+ msec = ((end - begin) * 1000) / CLOCKS_PER_SEC;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, " took %ld ms\n", msec);
+}
+#else
+
+/*
+ * We don't have a gettimeofday or time.h, so we just don't do timing
+ */
+static void
+startTimer(void)
+{
+ /*
+ * Do nothing
+ */
+}
+static void XMLCDECL
+endTimer(char *format, ...)
+{
+ /*
+ * We cannot do anything because we don't have a timing function
+ */
+#ifdef HAVE_STDARG_H
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ fprintf(stderr, " was not timed\n", msec);
+#else
+ /* We don't have gettimeofday, time or stdarg.h, what crazy world is
+ * this ?!
+ */
+#endif
+}
+#endif
+
+/*
+ * empty SAX block
+ */
+static xmlSAXHandler emptySAXHandlerStruct = {
+ NULL, /* internalSubset */
+ NULL, /* isStandalone */
+ NULL, /* hasInternalSubset */
+ NULL, /* hasExternalSubset */
+ NULL, /* resolveEntity */
+ NULL, /* getEntity */
+ NULL, /* entityDecl */
+ NULL, /* notationDecl */
+ NULL, /* attributeDecl */
+ NULL, /* elementDecl */
+ NULL, /* unparsedEntityDecl */
+ NULL, /* setDocumentLocator */
+ NULL, /* startDocument */
+ NULL, /* endDocument */
+ NULL, /* startElement */
+ NULL, /* endElement */
+ NULL, /* reference */
+ NULL, /* characters */
+ NULL, /* ignorableWhitespace */
+ NULL, /* processingInstruction */
+ NULL, /* comment */
+ NULL, /* xmlParserWarning */
+ NULL, /* xmlParserError */
+ NULL, /* xmlParserError */
+ NULL, /* getParameterEntity */
+ NULL, /* cdataBlock; */
+ NULL, /* externalSubset; */
+ 1,
+ NULL,
+ NULL, /* startElementNs */
+ NULL, /* endElementNs */
+ NULL /* xmlStructuredErrorFunc */
+};
+
+static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
+extern xmlSAXHandlerPtr debugSAXHandler;
+
+/************************************************************************
+ * *
+ * Debug Handlers *
+ * *
+ ************************************************************************/
+
+/**
+ * isStandaloneDebug:
+ * @ctxt: An XML parser context
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+static int
+isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(stdout, "SAX.isStandalone()\n");
+ return(0);
+}
+
+/**
+ * hasInternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(stdout, "SAX.hasInternalSubset()\n");
+ return(0);
+}
+
+/**
+ * hasExternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return(0);
+ fprintf(stdout, "SAX.hasExternalSubset()\n");
+ return(0);
+}
+
+/**
+ * internalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ */
+static void
+internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.internalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(stdout, " ,");
+ else
+ fprintf(stdout, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(stdout, " )\n");
+ else
+ fprintf(stdout, " %s)\n", SystemID);
+}
+
+/**
+ * externalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ */
+static void
+externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.externalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(stdout, " ,");
+ else
+ fprintf(stdout, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(stdout, " )\n");
+ else
+ fprintf(stdout, " %s)\n", SystemID);
+}
+
+/**
+ * resolveEntityDebug:
+ * @ctxt: An XML parser context
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Special entity resolver, better left to the parser, it has
+ * more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlParserInputPtr
+resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+
+
+ fprintf(stdout, "SAX.resolveEntity(");
+ if (publicId != NULL)
+ fprintf(stdout, "%s", (char *)publicId);
+ else
+ fprintf(stdout, " ");
+ if (systemId != NULL)
+ fprintf(stdout, ", %s)\n", (char *)systemId);
+ else
+ fprintf(stdout, ", )\n");
+/*********
+ if (systemId != NULL) {
+ return(xmlNewInputFromFile(ctxt, (char *) systemId));
+ }
+ *********/
+ return(NULL);
+}
+
+/**
+ * getEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlEntityPtr
+getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ fprintf(stdout, "SAX.getEntity(%s)\n", name);
+ return(NULL);
+}
+
+/**
+ * getParameterEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlParserInputPtr
+ */
+static xmlEntityPtr
+getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return(NULL);
+ fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);
+ return(NULL);
+}
+
+
+/**
+ * entityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+static void
+entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+ /* not all libraries handle printing null pointers nicely */
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (content == NULL)
+ content = (xmlChar *)nullstr;
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
+ name, type, publicId, systemId, content);
+}
+
+/**
+ * attributeDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the attribute name
+ * @type: the attribute type
+ *
+ * An attribute definition has been parsed
+ */
+static void
+attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,
+ const xmlChar * name, int type, int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ if (defaultValue == NULL)
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n",
+ elem, name, type, def);
+ else
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
+ elem, name, type, def, defaultValue);
+ xmlFreeEnumeration(tree);
+}
+
+/**
+ * elementDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value (without processing).
+ *
+ * An element definition has been parsed
+ */
+static void
+elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",
+ name, type);
+}
+
+/**
+ * notationDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+static void
+notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId);
+}
+
+/**
+ * unparsedEntityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+static void
+unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (notationName == NULL)
+ notationName = nullstr;
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId,
+ (char *) notationName);
+}
+
+/**
+ * setDocumentLocatorDebug:
+ * @ctxt: An XML parser context
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+static void
+setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.setDocumentLocator()\n");
+}
+
+/**
+ * startDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document start being processed.
+ */
+static void
+startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.startDocument()\n");
+}
+
+/**
+ * endDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document end has been detected.
+ */
+static void
+endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.endDocument()\n");
+}
+
+/**
+ * startElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
+{
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.startElement(%s", (char *) name);
+ if (atts != NULL) {
+ for (i = 0;(atts[i] != NULL);i++) {
+ fprintf(stdout, ", %s='", atts[i++]);
+ if (atts[i] != NULL)
+ fprintf(stdout, "%s'", atts[i]);
+ }
+ }
+ fprintf(stdout, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);
+}
+
+/**
+ * charactersDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char output[40];
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ output[i] = ch[i];
+ output[i] = 0;
+
+ fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);
+}
+
+/**
+ * referenceDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ */
+static void
+referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.reference(%s)\n", name);
+}
+
+/**
+ * ignorableWhitespaceDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @start: the first char in the string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * Question: how much at a time ???
+ */
+static void
+ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char output[40];
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ output[i] = ch[i];
+ output[i] = 0;
+ fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", output, len);
+}
+
+/**
+ * processingInstructionDebug:
+ * @ctxt: An XML parser context
+ * @target: the target name
+ * @data: the PI data's
+ * @len: the number of xmlChar
+ *
+ * A processing instruction has been parsed.
+ */
+static void
+processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,
+ const xmlChar *data)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ if (data != NULL)
+ fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",
+ (char *) target, (char *) data);
+ else
+ fprintf(stdout, "SAX.processingInstruction(%s, NULL)\n",
+ (char *) target);
+}
+
+/**
+ * cdataBlockDebug:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+static void
+cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.pcdata(%.20s, %d)\n",
+ (char *) value, len);
+}
+
+/**
+ * commentDebug:
+ * @ctxt: An XML parser context
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+static void
+commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.comment(%s)\n", value);
+}
+
+/**
+ * warningDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.warning: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * errorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.error: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * fatalErrorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a fatalError messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (quiet)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.fatalError: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+static xmlSAXHandler debugSAXHandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ startElementDebug,
+ endElementDebug,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
+
+/*
+ * SAX2 specific callbacks
+ */
+/**
+ * startElementNsDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes)
+{
+ int i;
+
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.startElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", '%s'", (char *) URI);
+ fprintf(stdout, ", %d", nb_namespaces);
+
+ if (namespaces != NULL) {
+ for (i = 0;i < nb_namespaces * 2;i++) {
+ fprintf(stdout, ", xmlns");
+ if (namespaces[i] != NULL)
+ fprintf(stdout, ":%s", namespaces[i]);
+ i++;
+ fprintf(stdout, "='%s'", namespaces[i]);
+ }
+ }
+ fprintf(stdout, ", %d, %d", nb_attributes, nb_defaulted);
+ if (attributes != NULL) {
+ for (i = 0;i < nb_attributes * 5;i += 5) {
+ if (attributes[i + 1] != NULL)
+ fprintf(stdout, ", %s:%s='", attributes[i + 1], attributes[i]);
+ else
+ fprintf(stdout, ", %s='", attributes[i]);
+ fprintf(stdout, "%.4s...', %d", attributes[i + 3],
+ (int)(attributes[i + 4] - attributes[i + 3]));
+ }
+ }
+ fprintf(stdout, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI)
+{
+ callbacks++;
+ if (quiet)
+ return;
+ fprintf(stdout, "SAX.endElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(stdout, ", NULL)\n");
+ else
+ fprintf(stdout, ", '%s')\n", (char *) URI);
+}
+
+static xmlSAXHandler debugSAX2HandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ NULL,
+ NULL,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ XML_SAX2_MAGIC,
+ NULL,
+ startElementNsDebug,
+ endElementNsDebug,
+ NULL
+};
+
+static xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;
+
+/************************************************************************
+ * *
+ * Debug *
+ * *
+ ************************************************************************/
+
+static void
+parseAndPrintFile(char *filename) {
+ int res;
+
+#ifdef LIBXML_PUSH_ENABLED
+ if (push) {
+ FILE *f;
+
+ if ((!quiet) && (!nonull)) {
+ /*
+ * Empty callbacks for checking
+ */
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int ret;
+ char chars[10];
+ xmlParserCtxtPtr ctxt;
+
+ ret = fread(chars, 1, 4, f);
+ if (ret > 0) {
+ ctxt = xmlCreatePushParserCtxt(emptySAXHandler, NULL,
+ chars, ret, filename);
+ while ((ret = fread(chars, 1, 3, f)) > 0) {
+ xmlParseChunk(ctxt, chars, ret, 0);
+ }
+ xmlParseChunk(ctxt, chars, 0, 1);
+ xmlFreeParserCtxt(ctxt);
+ }
+ fclose(f);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot read file %s\n", filename);
+ }
+ }
+ /*
+ * Debug callback
+ */
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int ret;
+ char chars[10];
+ xmlParserCtxtPtr ctxt;
+
+ ret = fread(chars, 1, 4, f);
+ if (ret > 0) {
+ if (sax2)
+ ctxt = xmlCreatePushParserCtxt(debugSAX2Handler, NULL,
+ chars, ret, filename);
+ else
+ ctxt = xmlCreatePushParserCtxt(debugSAXHandler, NULL,
+ chars, ret, filename);
+ while ((ret = fread(chars, 1, 3, f)) > 0) {
+ xmlParseChunk(ctxt, chars, ret, 0);
+ }
+ ret = xmlParseChunk(ctxt, chars, 0, 1);
+ xmlFreeParserCtxt(ctxt);
+ if (ret != 0) {
+ fprintf(stdout,
+ "xmlSAXUserParseFile returned error %d\n", ret);
+ }
+ }
+ fclose(f);
+ }
+ } else {
+#endif /* LIBXML_PUSH_ENABLED */
+ if (!speed) {
+ /*
+ * Empty callbacks for checking
+ */
+ if ((!quiet) && (!nonull)) {
+ res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename);
+ if (res != 0) {
+ fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);
+ }
+ }
+
+ /*
+ * Debug callback
+ */
+ callbacks = 0;
+ if (repeat) {
+ int i;
+ for (i = 0;i < 99;i++) {
+ if (sax2)
+ res = xmlSAXUserParseFile(debugSAX2Handler, NULL,
+ filename);
+ else
+ res = xmlSAXUserParseFile(debugSAXHandler, NULL,
+ filename);
+ }
+ }
+ if (sax2)
+ res = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename);
+ else
+ res = xmlSAXUserParseFile(debugSAXHandler, NULL, filename);
+ if (res != 0) {
+ fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);
+ }
+ if (quiet)
+ fprintf(stdout, "%d callbacks generated\n", callbacks);
+ } else {
+ /*
+ * test 100x the SAX parse
+ */
+ int i;
+
+ for (i = 0; i<100;i++)
+ res = xmlSAXUserParseFile(emptySAXHandler, NULL, filename);
+ if (res != 0) {
+ fprintf(stdout, "xmlSAXUserParseFile returned error %d\n", res);
+ }
+ }
+#ifdef LIBXML_PUSH_ENABLED
+ }
+#endif
+}
+
+
+int main(int argc, char **argv) {
+ int i;
+ int files = 0;
+
+ LIBXML_TEST_VERSION /* be safe, plus calls xmlInitParser */
+
+ for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
+ copy++;
+ else if ((!strcmp(argv[i], "-recover")) ||
+ (!strcmp(argv[i], "--recover")))
+ recovery++;
+ else if ((!strcmp(argv[i], "-push")) ||
+ (!strcmp(argv[i], "--push")))
+#ifdef LIBXML_PUSH_ENABLED
+ push++;
+#else
+ fprintf(stderr,"'push' not enabled in library - ignoring\n");
+#endif /* LIBXML_PUSH_ENABLED */
+ else if ((!strcmp(argv[i], "-speed")) ||
+ (!strcmp(argv[i], "--speed")))
+ speed++;
+ else if ((!strcmp(argv[i], "-timing")) ||
+ (!strcmp(argv[i], "--timing"))) {
+ nonull++;
+ timing++;
+ quiet++;
+ } else if ((!strcmp(argv[i], "-repeat")) ||
+ (!strcmp(argv[i], "--repeat"))) {
+ repeat++;
+ quiet++;
+ } else if ((!strcmp(argv[i], "-noent")) ||
+ (!strcmp(argv[i], "--noent")))
+ noent++;
+ else if ((!strcmp(argv[i], "-quiet")) ||
+ (!strcmp(argv[i], "--quiet")))
+ quiet++;
+ else if ((!strcmp(argv[i], "-sax2")) ||
+ (!strcmp(argv[i], "--sax2")))
+ sax2++;
+ else if ((!strcmp(argv[i], "-nonull")) ||
+ (!strcmp(argv[i], "--nonull")))
+ nonull++;
+ }
+ if (noent != 0) xmlSubstituteEntitiesDefault(1);
+ for (i = 1; i < argc ; i++) {
+ if (argv[i][0] != '-') {
+ if (timing) {
+ startTimer();
+ }
+ parseAndPrintFile(argv[i]);
+ if (timing) {
+ endTimer("Parsing");
+ }
+ files ++;
+ }
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+#else
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : SAX1 parsing support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_SAX1_ENABLED */
diff --git a/testSchemas.c b/testSchemas.c
new file mode 100644
index 0000000..b98e631
--- /dev/null
+++ b/testSchemas.c
@@ -0,0 +1,185 @@
+/*
+ * testSchemas.c : a small tester program for Schema validation
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel.Veillard@w3.org
+ */
+
+#include "libxml.h"
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+/* seems needed for Solaris */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *) -1)
+#endif
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+static int debug = 0;
+#endif
+static int noout = 0;
+#ifdef HAVE_MMAP
+static int memory = 0;
+#endif
+
+
+int main(int argc, char **argv) {
+ int i;
+ int files = 0;
+ xmlSchemaPtr schema = NULL;
+
+ for (i = 1; i < argc ; i++) {
+#ifdef LIBXML_DEBUG_ENABLED
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else
+#endif
+#ifdef HAVE_MMAP
+ if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) {
+ memory++;
+ } else
+#endif
+ if ((!strcmp(argv[i], "-noout")) || (!strcmp(argv[i], "--noout"))) {
+ noout++;
+ }
+ }
+ xmlLineNumbersDefault(1);
+ for (i = 1; i < argc ; i++) {
+ if (argv[i][0] != '-') {
+ if (schema == NULL) {
+ xmlSchemaParserCtxtPtr ctxt;
+
+#ifdef HAVE_MMAP
+ if (memory) {
+ int fd;
+ struct stat info;
+ const char *base;
+ if (stat(argv[i], &info) < 0)
+ break;
+ if ((fd = open(argv[i], O_RDONLY)) < 0)
+ break;
+ base = mmap(NULL, info.st_size, PROT_READ,
+ MAP_SHARED, fd, 0) ;
+ if (base == (void *) MAP_FAILED)
+ break;
+
+ ctxt = xmlSchemaNewMemParserCtxt((char *)base,info.st_size);
+
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ schema = xmlSchemaParse(ctxt);
+ xmlSchemaFreeParserCtxt(ctxt);
+ munmap((char *) base, info.st_size);
+ } else
+#endif
+ {
+ ctxt = xmlSchemaNewParserCtxt(argv[i]);
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ schema = xmlSchemaParse(ctxt);
+ xmlSchemaFreeParserCtxt(ctxt);
+ }
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+ if (debug)
+ xmlSchemaDump(stdout, schema);
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+ if (schema == NULL)
+ goto failed_schemas;
+ } else {
+ xmlDocPtr doc;
+
+ doc = xmlReadFile(argv[i],NULL,0);
+
+ if (doc == NULL) {
+ fprintf(stderr, "Could not parse %s\n", argv[i]);
+ } else {
+ xmlSchemaValidCtxtPtr ctxt;
+ int ret;
+
+ ctxt = xmlSchemaNewValidCtxt(schema);
+ xmlSchemaSetValidErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ ret = xmlSchemaValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ printf("%s validates\n", argv[i]);
+ } else if (ret > 0) {
+ printf("%s fails to validate\n", argv[i]);
+ } else {
+ printf("%s validation generated an internal error\n",
+ argv[i]);
+ }
+ xmlSchemaFreeValidCtxt(ctxt);
+ xmlFreeDoc(doc);
+ }
+ }
+ files ++;
+ }
+ }
+ if (schema != NULL)
+ xmlSchemaFree(schema);
+ if (files == 0) {
+ printf("Usage : %s [--debug] [--noout] schemas XMLfiles ...\n",
+ argv[0]);
+ printf("\tParse the HTML files and output the result of the parsing\n");
+#ifdef LIBXML_DEBUG_ENABLED
+ printf("\t--debug : dump a debug tree of the in-memory document\n");
+#endif
+ printf("\t--noout : do not print the result\n");
+#ifdef HAVE_MMAP
+ printf("\t--memory : test the schemas in memory parsing\n");
+#endif
+ }
+failed_schemas:
+ xmlSchemaCleanupTypes();
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : Schemas support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/testThreads.c b/testThreads.c
new file mode 100644
index 0000000..bff5391
--- /dev/null
+++ b/testThreads.c
@@ -0,0 +1,200 @@
+#include "libxml.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED)
+#include <libxml/globals.h>
+#include <libxml/threads.h>
+#include <libxml/parser.h>
+#include <libxml/catalog.h>
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#elif defined HAVE_BEOS_THREADS
+#include <OS.h>
+#endif
+#include <string.h>
+#if !defined(_MSC_VER)
+#include <unistd.h>
+#endif
+#include <assert.h>
+
+#define MAX_ARGC 20
+#ifdef HAVE_PTHREAD_H
+static pthread_t tid[MAX_ARGC];
+#elif defined HAVE_BEOS_THREADS
+static thread_id tid[MAX_ARGC];
+#endif
+
+static const char *catalog = "test/threads/complex.xml";
+static const char *testfiles[] = {
+ "test/threads/abc.xml",
+ "test/threads/acb.xml",
+ "test/threads/bac.xml",
+ "test/threads/bca.xml",
+ "test/threads/cab.xml",
+ "test/threads/cba.xml",
+ "test/threads/invalid.xml",
+};
+
+static const char *Okay = "OK";
+static const char *Failed = "Failed";
+
+#ifndef xmlDoValidityCheckingDefaultValue
+#error xmlDoValidityCheckingDefaultValue is not a macro
+#endif
+#ifndef xmlGenericErrorContext
+#error xmlGenericErrorContext is not a macro
+#endif
+
+static void *
+thread_specific_data(void *private_data)
+{
+ xmlDocPtr myDoc;
+ const char *filename = (const char *) private_data;
+ int okay = 1;
+
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ xmlDoValidityCheckingDefaultValue = 0;
+ xmlGenericErrorContext = stdout;
+ } else {
+ xmlDoValidityCheckingDefaultValue = 1;
+ xmlGenericErrorContext = stderr;
+ }
+ myDoc = xmlParseFile(filename);
+ if (myDoc) {
+ xmlFreeDoc(myDoc);
+ } else {
+ printf("parse failed\n");
+ okay = 0;
+ }
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ if (xmlDoValidityCheckingDefaultValue != 0) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stdout) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ } else {
+ if (xmlDoValidityCheckingDefaultValue != 1) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stderr) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ }
+ if (okay == 0)
+ return((void *) Failed);
+ return ((void *) Okay);
+}
+
+#ifdef HAVE_PTHREAD_H
+int
+main(void)
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ void *results[MAX_ARGC];
+ int ret;
+
+ xmlInitParser();
+ for (repeat = 0;repeat < 500;repeat++) {
+ xmlLoadCatalog(catalog);
+
+ memset(results, 0, sizeof(*results)*num_threads);
+ memset(tid, 0xff, sizeof(*tid)*num_threads);
+
+ for (i = 0; i < num_threads; i++) {
+ ret = pthread_create(&tid[i], NULL, thread_specific_data,
+ (void *) testfiles[i]);
+ if (ret != 0) {
+ perror("pthread_create");
+ exit(1);
+ }
+ }
+ for (i = 0; i < num_threads; i++) {
+ ret = pthread_join(tid[i], &results[i]);
+ if (ret != 0) {
+ perror("pthread_join");
+ exit(1);
+ }
+ }
+
+ xmlCatalogCleanup();
+ for (i = 0; i < num_threads; i++)
+ if (results[i] != (void *) Okay)
+ printf("Thread %d handling %s failed\n", i, testfiles[i]);
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return (0);
+}
+#elif defined HAVE_BEOS_THREADS
+int
+main(void)
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ void *results[MAX_ARGC];
+ status_t ret;
+
+ xmlInitParser();
+ printf("Parser initialized\n");
+ for (repeat = 0;repeat < 500;repeat++) {
+ printf("repeat: %d\n",repeat);
+ xmlLoadCatalog(catalog);
+ printf("loaded catalog: %s\n", catalog);
+ for (i = 0; i < num_threads; i++) {
+ results[i] = NULL;
+ tid[i] = (thread_id) -1;
+ }
+ printf("cleaned threads\n");
+ for (i = 0; i < num_threads; i++) {
+ tid[i] = spawn_thread(thread_specific_data, "xmlTestThread", B_NORMAL_PRIORITY, (void *) testfiles[i]);
+ if (tid[i] < B_OK) {
+ perror("beos_thread_create");
+ exit(1);
+ }
+ printf("beos_thread_create %d -> %d\n", i, tid[i]);
+ }
+ for (i = 0; i < num_threads; i++) {
+ ret = wait_for_thread(tid[i], &results[i]);
+ printf("beos_thread_wait %d -> %d\n", i, ret);
+ if (ret != B_OK) {
+ perror("beos_thread_wait");
+ exit(1);
+ }
+ }
+
+ xmlCatalogCleanup();
+ ret = B_OK;
+ for (i = 0; i < num_threads; i++)
+ if (results[i] != (void *) Okay) {
+ printf("Thread %d handling %s failed\n", i, testfiles[i]);
+ ret = B_ERROR;
+ }
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ if (ret == B_OK)
+ printf("testThread : BeOS : SUCCESS!\n");
+ else
+ printf("testThread : BeOS : FAILED!\n");
+
+ return (0);
+}
+#endif /* pthreads or BeOS threads */
+
+#else /* !LIBXML_THREADS_ENABLED */
+int
+main(void)
+{
+ fprintf(stderr, "libxml was not compiled with thread or catalog support\n");
+ return (0);
+}
+#endif
diff --git a/testThreadsWin32.c b/testThreadsWin32.c
new file mode 100644
index 0000000..3d1a5ba
--- /dev/null
+++ b/testThreadsWin32.c
@@ -0,0 +1,150 @@
+#include "libxml.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
+#include <libxml/globals.h>
+#include <libxml/threads.h>
+#include <libxml/parser.h>
+#include <libxml/catalog.h>
+#include <windows.h>
+#include <string.h>
+#include <assert.h>
+
+#define MAX_ARGC 20
+#define TEST_REPEAT_COUNT 500
+
+static HANDLE tid[MAX_ARGC];
+
+static const char *catalog = "test/threads/complex.xml";
+static char *testfiles[] = {
+ "test/threads/abc.xml",
+ "test/threads/acb.xml",
+ "test/threads/bac.xml",
+ "test/threads/bca.xml",
+ "test/threads/cab.xml",
+ "test/threads/cba.xml",
+ "test/threads/invalid.xml",
+};
+
+const char *Okay = "OK";
+const char *Failed = "Failed";
+
+#ifndef xmlDoValidityCheckingDefaultValue
+#error xmlDoValidityCheckingDefaultValue is not a macro
+#endif
+#ifndef xmlGenericErrorContext
+#error xmlGenericErrorContext is not a macro
+#endif
+
+static DWORD WINAPI
+thread_specific_data(void *private_data)
+{
+ xmlDocPtr myDoc;
+ const char *filename = (const char *) private_data;
+ int okay = 1;
+
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ xmlDoValidityCheckingDefaultValue = 0;
+ xmlGenericErrorContext = stdout;
+ } else {
+ xmlDoValidityCheckingDefaultValue = 1;
+ xmlGenericErrorContext = stderr;
+ }
+ myDoc = xmlParseFile(filename);
+ if (myDoc) {
+ xmlFreeDoc(myDoc);
+ } else {
+ printf("parse failed\n");
+ okay = 0;
+ }
+ if (!strcmp(filename, "test/threads/invalid.xml")) {
+ if (xmlDoValidityCheckingDefaultValue != 0) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stdout) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ } else {
+ if (xmlDoValidityCheckingDefaultValue != 1) {
+ printf("ValidityCheckingDefaultValue override failed\n");
+ okay = 0;
+ }
+ if (xmlGenericErrorContext != stderr) {
+ printf("xmlGenericErrorContext override failed\n");
+ okay = 0;
+ }
+ }
+ if (okay == 0)
+ return ((DWORD) Failed);
+ return ((DWORD) Okay);
+}
+
+int
+main()
+{
+ unsigned int i, repeat;
+ unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]);
+ DWORD results[MAX_ARGC];
+ BOOL ret;
+
+ xmlInitParser();
+ for (repeat = 0;repeat < TEST_REPEAT_COUNT;repeat++)
+ {
+ xmlLoadCatalog(catalog);
+
+ for (i = 0; i < num_threads; i++)
+ {
+ results[i] = 0;
+ tid[i] = (HANDLE) -1;
+ }
+
+ for (i = 0; i < num_threads; i++)
+ {
+ DWORD useless;
+ tid[i] = CreateThread(NULL, 0,
+ thread_specific_data, testfiles[i], 0, &useless);
+ if (tid[i] == NULL)
+ {
+ perror("CreateThread");
+ exit(1);
+ }
+ }
+
+ if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
+ perror ("WaitForMultipleObjects failed");
+
+ for (i = 0; i < num_threads; i++)
+ {
+ ret = GetExitCodeThread (tid[i], &results[i]);
+ if (ret == 0)
+ {
+ perror("GetExitCodeThread");
+ exit(1);
+ }
+ CloseHandle (tid[i]);
+ }
+
+ xmlCatalogCleanup();
+ for (i = 0; i < num_threads; i++) {
+ if (results[i] != (DWORD) Okay)
+ printf("Thread %d handling %s failed\n", i, testfiles[i]);
+ }
+ }
+
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return (0);
+}
+
+#else /* !LIBXML_THREADS_ENABLED */
+int
+main()
+{
+ fprintf(stderr, "libxml was not compiled with thread or catalog support\n");
+ return (0);
+}
+#endif
diff --git a/testURI.c b/testURI.c
new file mode 100644
index 0000000..d20989d
--- /dev/null
+++ b/testURI.c
@@ -0,0 +1,124 @@
+/*
+ * testURI.c : a small tester program for XML input.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/uri.h>
+#include <libxml/globals.h>
+
+static const char *base = NULL;
+static int escape = 0;
+static int debug = 0;
+
+static void handleURI(const char *str) {
+ int ret;
+ xmlURIPtr uri;
+ xmlChar *res = NULL, *parsed = NULL;
+
+ uri = xmlCreateURI();
+
+ if (base == NULL) {
+ ret = xmlParseURIReference(uri, str);
+ if (ret != 0)
+ printf("%s : error %d\n", str, ret);
+ else {
+ if (debug) {
+ if (uri->scheme) printf("scheme: %s\n", uri->scheme);
+ if (uri->opaque) printf("opaque: %s\n", uri->opaque);
+ if (uri->authority) printf("authority: %s\n", uri->authority);
+ if (uri->server) printf("server: %s\n", uri->server);
+ if (uri->user) printf("user: %s\n", uri->user);
+ if (uri->port != 0) printf("port: %d\n", uri->port);
+ if (uri->path) printf("path: %s\n", uri->path);
+ if (uri->query) printf("query: %s\n", uri->query);
+ if (uri->fragment) printf("fragment: %s\n", uri->fragment);
+ if (uri->query_raw) printf("query_raw: %s\n", uri->query_raw);
+ if (uri->cleanup != 0) printf("cleanup\n");
+ }
+ xmlNormalizeURIPath(uri->path);
+ if (escape != 0) {
+ parsed = xmlSaveUri(uri);
+ res = xmlURIEscape(parsed);
+ printf("%s\n", (char *) res);
+
+ } else {
+ xmlPrintURI(stdout, uri);
+ printf("\n");
+ }
+ }
+ } else {
+ res = xmlBuildURI((xmlChar *)str, (xmlChar *) base);
+ if (res != NULL) {
+ printf("%s\n", (char *) res);
+ }
+ else
+ printf("::ERROR::\n");
+ }
+ if (res != NULL)
+ xmlFree(res);
+ if (parsed != NULL)
+ xmlFree(parsed);
+ xmlFreeURI(uri);
+}
+
+int main(int argc, char **argv) {
+ int i, arg = 1;
+
+ if ((argc > arg) && (argv[arg] != NULL) &&
+ ((!strcmp(argv[arg], "-base")) || (!strcmp(argv[arg], "--base")))) {
+ arg++;
+ base = argv[arg];
+ if (base != NULL)
+ arg++;
+ }
+ if ((argc > arg) && (argv[arg] != NULL) &&
+ ((!strcmp(argv[arg], "-escape")) || (!strcmp(argv[arg], "--escape")))) {
+ arg++;
+ escape++;
+ }
+ if ((argc > arg) && (argv[arg] != NULL) &&
+ ((!strcmp(argv[arg], "-debug")) || (!strcmp(argv[arg], "--debug")))) {
+ arg++;
+ debug++;
+ }
+ if (argv[arg] == NULL) {
+ char str[1024];
+
+ while (1) {
+ /*
+ * read one line in string buffer.
+ */
+ if (fgets (&str[0], sizeof (str) - 1, stdin) == NULL)
+ break;
+
+ /*
+ * remove the ending spaces
+ */
+ i = strlen(str);
+ while ((i > 0) &&
+ ((str[i - 1] == '\n') || (str[i - 1] == '\r') ||
+ (str[i - 1] == ' ') || (str[i - 1] == '\t'))) {
+ i--;
+ str[i] = 0;
+ }
+ handleURI(str);
+ }
+ } else {
+ while (argv[arg] != NULL) {
+ handleURI(argv[arg]);
+ arg++;
+ }
+ }
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/testXPath.c b/testXPath.c
new file mode 100644
index 0000000..ebb9ff7
--- /dev/null
+++ b/testXPath.c
@@ -0,0 +1,229 @@
+/*
+ * testXPath.c : a small tester program for XPath.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
+
+#include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+
+#include <libxml/xpath.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+#if defined(LIBXML_XPTR_ENABLED)
+#include <libxml/xpointer.h>
+static int xptr = 0;
+#endif
+static int debug = 0;
+static int valid = 0;
+static int expr = 0;
+static int tree = 0;
+static int nocdata = 0;
+static xmlDocPtr document = NULL;
+
+/*
+ * Default document
+ */
+static xmlChar buffer[] =
+"<?xml version=\"1.0\"?>\n\
+<EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
+ <head>\n\
+ <title>Welcome to Gnome</title>\n\
+ </head>\n\
+ <chapter>\n\
+ <title>The Linux adventure</title>\n\
+ <p>bla bla bla ...</p>\n\
+ <image href=\"linus.gif\"/>\n\
+ <p>...</p>\n\
+ </chapter>\n\
+ <chapter>\n\
+ <title>Chapter 2</title>\n\
+ <p>this is chapter 2 ...</p>\n\
+ </chapter>\n\
+ <chapter>\n\
+ <title>Chapter 3</title>\n\
+ <p>this is chapter 3 ...</p>\n\
+ </chapter>\n\
+</EXAMPLE>\n\
+";
+
+
+static void
+testXPath(const char *str) {
+ xmlXPathObjectPtr res;
+ xmlXPathContextPtr ctxt;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ if (xptr) {
+ ctxt = xmlXPtrNewContext(document, NULL, NULL);
+ res = xmlXPtrEval(BAD_CAST str, ctxt);
+ } else {
+#endif
+ ctxt = xmlXPathNewContext(document);
+ ctxt->node = xmlDocGetRootElement(document);
+ if (expr)
+ res = xmlXPathEvalExpression(BAD_CAST str, ctxt);
+ else {
+ /* res = xmlXPathEval(BAD_CAST str, ctxt); */
+ xmlXPathCompExprPtr comp;
+
+ comp = xmlXPathCompile(BAD_CAST str);
+ if (comp != NULL) {
+ if (tree)
+ xmlXPathDebugDumpCompExpr(stdout, comp, 0);
+
+ res = xmlXPathCompiledEval(comp, ctxt);
+ xmlXPathFreeCompExpr(comp);
+ } else
+ res = NULL;
+ }
+#if defined(LIBXML_XPTR_ENABLED)
+ }
+#endif
+ xmlXPathDebugDumpObject(stdout, res, 0);
+ xmlXPathFreeObject(res);
+ xmlXPathFreeContext(ctxt);
+}
+
+static void
+testXPathFile(const char *filename) {
+ FILE *input;
+ char expression[5000];
+ int len;
+
+ input = fopen(filename, "r");
+ if (input == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot open %s for reading\n", filename);
+ return;
+ }
+ while (fgets(expression, 4500, input) != NULL) {
+ len = strlen(expression);
+ len--;
+ while ((len >= 0) &&
+ ((expression[len] == '\n') || (expression[len] == '\t') ||
+ (expression[len] == '\r') || (expression[len] == ' '))) len--;
+ expression[len + 1] = 0;
+ if (len >= 0) {
+ printf("\n========================\nExpression: %s\n", expression) ;
+ testXPath(expression);
+ }
+ }
+
+ fclose(input);
+}
+
+int main(int argc, char **argv) {
+ int i;
+ int strings = 0;
+ int usefile = 0;
+ char *filename = NULL;
+
+ for (i = 1; i < argc ; i++) {
+#if defined(LIBXML_XPTR_ENABLED)
+ if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr")))
+ xptr++;
+ else
+#endif
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else if ((!strcmp(argv[i], "-valid")) || (!strcmp(argv[i], "--valid")))
+ valid++;
+ else if ((!strcmp(argv[i], "-expr")) || (!strcmp(argv[i], "--expr")))
+ expr++;
+ else if ((!strcmp(argv[i], "-tree")) || (!strcmp(argv[i], "--tree")))
+ tree++;
+ else if ((!strcmp(argv[i], "-nocdata")) ||
+ (!strcmp(argv[i], "--nocdata")))
+ nocdata++;
+ else if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input")))
+ filename = argv[++i];
+ else if ((!strcmp(argv[i], "-f")) || (!strcmp(argv[i], "--file")))
+ usefile++;
+ }
+ if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
+ xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS;
+ xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
+ xmlSubstituteEntitiesDefaultValue = 1;
+#ifdef LIBXML_SAX1_ENABLED
+ if (nocdata != 0) {
+ xmlDefaultSAXHandlerInit();
+ xmlDefaultSAXHandler.cdataBlock = NULL;
+ }
+#endif
+ if (document == NULL) {
+ if (filename == NULL)
+ document = xmlReadDoc(buffer,NULL,NULL,XML_PARSE_COMPACT);
+ else
+ document = xmlReadFile(filename,NULL,XML_PARSE_COMPACT);
+ }
+ for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-i")) || (!strcmp(argv[i], "--input"))) {
+ i++; continue;
+ }
+ if (argv[i][0] != '-') {
+ if (usefile)
+ testXPathFile(argv[i]);
+ else
+ testXPath(argv[i]);
+ strings ++;
+ }
+ }
+ if (strings == 0) {
+ printf("Usage : %s [--debug] [--copy] stringsorfiles ...\n",
+ argv[0]);
+ printf("\tParse the XPath strings and output the result of the parsing\n");
+ printf("\t--debug : dump a debug version of the result\n");
+ printf("\t--valid : switch on DTD support in the parser\n");
+#if defined(LIBXML_XPTR_ENABLED)
+ printf("\t--xptr : expressions are XPointer expressions\n");
+#endif
+ printf("\t--expr : debug XPath expressions only\n");
+ printf("\t--tree : show the compiled XPath tree\n");
+ printf("\t--nocdata : do not generate CDATA nodes\n");
+ printf("\t--input filename : or\n");
+ printf("\t-i filename : read the document from filename\n");
+ printf("\t--file : or\n");
+ printf("\t-f : read queries from files, args\n");
+ }
+ if (document != NULL)
+ xmlFreeDoc(document);
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(0);
+}
+#else
+#include <stdio.h>
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ printf("%s : XPath/Debug support not compiled in\n", argv[0]);
+ return(0);
+}
+#endif /* LIBXML_XPATH_ENABLED */
diff --git a/testapi.c b/testapi.c
new file mode 100644
index 0000000..0367ffd
--- /dev/null
+++ b/testapi.c
@@ -0,0 +1,52172 @@
+/*
+ * testapi.c: libxml2 API tester program.
+ *
+ * Automatically generated by gentest.py from libxml2-api.xml
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#include <stdlib.h> /* for putenv() */
+#include <string.h>
+#include <libxml/xmlerror.h>
+#include <libxml/relaxng.h>
+
+
+static int testlibxml2(void);
+static int test_module(const char *module);
+
+static int generic_errors = 0;
+static int call_tests = 0;
+static int function_tests = 0;
+
+static xmlChar chartab[1024];
+static int inttab[1024];
+static unsigned long longtab[1024];
+
+static xmlDocPtr api_doc = NULL;
+static xmlDtdPtr api_dtd = NULL;
+static xmlNodePtr api_root = NULL;
+static xmlAttrPtr api_attr = NULL;
+static xmlNsPtr api_ns = NULL;
+
+static void
+structured_errors(void *userData ATTRIBUTE_UNUSED,
+ xmlErrorPtr error ATTRIBUTE_UNUSED) {
+ generic_errors++;
+}
+
+static void
+free_api_doc(void) {
+ xmlFreeDoc(api_doc);
+ api_doc = NULL;
+ api_dtd = NULL;
+ api_root = NULL;
+ api_attr = NULL;
+ api_ns = NULL;
+}
+
+static xmlDocPtr
+get_api_doc(void) {
+ if (api_doc == NULL) {
+ api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);
+ api_root = NULL;
+ api_attr = NULL;
+ }
+ return(api_doc);
+}
+
+static xmlDtdPtr
+get_api_dtd(void) {
+ if ((api_dtd == NULL) || (api_dtd->type != XML_DTD_NODE)) {
+ get_api_doc();
+ if ((api_doc != NULL) && (api_doc->children != NULL) &&
+ (api_doc->children->type == XML_DTD_NODE))
+ api_dtd = (xmlDtdPtr) api_doc->children;
+ }
+ return(api_dtd);
+}
+
+static xmlNodePtr
+get_api_root(void) {
+ if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
+ get_api_doc();
+ if ((api_doc != NULL) && (api_doc->children != NULL) &&
+ (api_doc->children->next != NULL) &&
+ (api_doc->children->next->type == XML_ELEMENT_NODE))
+ api_root = api_doc->children->next;
+ }
+ return(api_root);
+}
+
+static xmlNsPtr
+get_api_ns(void) {
+ get_api_root();
+ if (api_root != NULL)
+ api_ns = api_root->nsDef;
+ return(api_ns);
+}
+
+static xmlAttrPtr
+get_api_attr(void) {
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ static int nr = 0;
+ xmlChar name[20];
+#endif
+
+ if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
+ get_api_root();
+ }
+ if (api_root == NULL)
+ return(NULL);
+ if (api_root->properties != NULL) {
+ api_attr = api_root->properties;
+ return(api_root->properties);
+ }
+ api_attr = NULL;
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ snprintf((char *) name, 20, "foo%d", nr++);
+ api_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");
+#endif
+ return(api_attr);
+}
+
+static int quiet = 0;
+
+int main(int argc, char **argv) {
+ int ret;
+ int blocks, mem;
+
+#ifdef HAVE_PUTENV
+ /* access to the proxy can slow up regression tests a lot */
+ putenv((char *) "http_proxy=");
+#endif
+
+ memset(chartab, 0, sizeof(chartab));
+ strncpy((char *) chartab, " chartab\n", 20);
+ memset(inttab, 0, sizeof(inttab));
+ memset(longtab, 0, sizeof(longtab));
+
+ xmlInitParser();
+#ifdef LIBXML_SCHEMAS_ENABLED
+ xmlRelaxNGInitTypes();
+#endif
+
+ LIBXML_TEST_VERSION
+
+ xmlSetStructuredErrorFunc(NULL, structured_errors);
+
+ if (argc >= 2) {
+ if (!strcmp(argv[1], "-q")) {
+ quiet = 1;
+ if (argc >= 3)
+ ret = test_module(argv[2]);
+ else
+ ret = testlibxml2();
+ } else {
+ ret = test_module(argv[1]);
+ }
+ } else
+ ret = testlibxml2();
+
+ xmlCleanupParser();
+ blocks = xmlMemBlocks();
+ mem = xmlMemUsed();
+ if ((blocks != 0) || (mem != 0)) {
+ printf("testapi leaked %d bytes in %d blocks\n", mem, blocks);
+ }
+ xmlMemoryDump();
+
+ return (ret != 0);
+}
+
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/catalog.h>
+#include <libxml/chvalid.h>
+#include <libxml/dict.h>
+#include <libxml/encoding.h>
+#include <libxml/entities.h>
+#include <libxml/hash.h>
+#include <libxml/list.h>
+#include <libxml/nanoftp.h>
+#include <libxml/nanohttp.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/pattern.h>
+#include <libxml/relaxng.h>
+#include <libxml/schemasInternals.h>
+#include <libxml/schematron.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#include <libxml/valid.h>
+#include <libxml/xinclude.h>
+#include <libxml/xmlIO.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlsave.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
+#include <libxml/xmlstring.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xpath.h>
+#include <libxml/xpointer.h>
+#include <libxml/debugXML.h>
+
+/*
+ We manually define xmlErrMemory because it's normal declaration
+ is "hidden" by #ifdef IN_LIBXML
+*/
+void xmlErrMemory(xmlParserCtxtPtr ctxt, const char *extra);
+
+/*
+ We need some "remote" addresses, but want to avoid getting into
+ name resolution delays, so we use these
+*/
+#define REMOTE1GOOD "http://localhost/"
+#define REMOTE1BAD "http:http://http"
+#define REMOTE2GOOD "ftp://localhost/foo"
+
+#define gen_nb_void_ptr 2
+
+static void *gen_void_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_void_ptr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#if 0
+#define gen_nb_const_void_ptr 2
+
+static const void *gen_const_void_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return((const void *) "immutable string");
+ return(NULL);
+}
+static void des_const_void_ptr(int no ATTRIBUTE_UNUSED, const void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#define gen_nb_userdata 3
+
+static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return((void *) &call_tests);
+ if (no == 1) return((void *) -1);
+ return(NULL);
+}
+static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+
+#define gen_nb_int 4
+
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(0);
+ if (no == 1) return(1);
+ if (no == 2) return(-1);
+ if (no == 3) return(122);
+ return(-1);
+}
+
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_parseroptions 5
+
+static int gen_parseroptions(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER);
+ if (no == 1) return(XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_DTDVALID | XML_PARSE_NOCDATA);
+ if (no == 2) return(XML_PARSE_XINCLUDE | XML_PARSE_NOXINCNODE | XML_PARSE_NSCLEAN);
+ if (no == 3) return(XML_PARSE_XINCLUDE | XML_PARSE_NODICT);
+ return(XML_PARSE_SAX1);
+}
+
+static void des_parseroptions(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#if 0
+#define gen_nb_long 5
+
+static long gen_long(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(0);
+ if (no == 1) return(1);
+ if (no == 2) return(-1);
+ if (no == 3) return(122);
+ return(-1);
+}
+
+static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#define gen_nb_xmlChar 4
+
+static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return('a');
+ if (no == 1) return(' ');
+ if (no == 2) return((xmlChar) '\xf8');
+ return(0);
+}
+
+static void des_xmlChar(int no ATTRIBUTE_UNUSED, xmlChar val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_unsigned_int 3
+
+static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(0);
+ if (no == 1) return(1);
+ if (no == 2) return(122);
+ return((unsigned int) -1);
+}
+
+static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_unsigned_long 4
+
+static unsigned long gen_unsigned_long(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(0);
+ if (no == 1) return(1);
+ if (no == 2) return(122);
+ return((unsigned long) -1);
+}
+
+static void des_unsigned_long(int no ATTRIBUTE_UNUSED, unsigned long val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_double 4
+
+static double gen_double(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(0);
+ if (no == 1) return(-1.1);
+#if defined(LIBXML_XPATH_ENABLED)
+ if (no == 2) return(xmlXPathNAN);
+#endif
+ return(-1);
+}
+
+static void des_double(int no ATTRIBUTE_UNUSED, double val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_unsigned_long_ptr 2
+
+static unsigned long *gen_unsigned_long_ptr(int no, int nr) {
+ if (no == 0) return(&longtab[nr]);
+ return(NULL);
+}
+
+static void des_unsigned_long_ptr(int no ATTRIBUTE_UNUSED, unsigned long *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_int_ptr 2
+
+static int *gen_int_ptr(int no, int nr) {
+ if (no == 0) return(&inttab[nr]);
+ return(NULL);
+}
+
+static void des_int_ptr(int no ATTRIBUTE_UNUSED, int *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_const_char_ptr 4
+
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return((char *) "foo");
+ if (no == 1) return((char *) "<foo/>");
+ if (no == 2) return((char *) "test/ent2");
+ return(NULL);
+}
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlChar_ptr 2
+
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(&chartab[0]);
+ return(NULL);
+}
+static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_FILE_ptr 2
+
+static FILE *gen_FILE_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(fopen("test.out", "a+"));
+ return(NULL);
+}
+static void des_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) fclose(val);
+}
+
+#define gen_nb_debug_FILE_ptr 2
+static FILE *gen_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(fopen("test.out", "a+"));
+}
+static void des_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) fclose(val);
+}
+
+#define gen_nb_const_xmlChar_ptr 5
+
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return((xmlChar *) "foo");
+ if (no == 1) return((xmlChar *) "<foo/>");
+ if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
+ if (no == 3) return((xmlChar *) " 2ab ");
+ return(NULL);
+}
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_filepath 8
+
+static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return("missing.xml");
+ if (no == 1) return("<foo/>");
+ if (no == 2) return("test/ent2");
+ if (no == 3) return("test/valid/REC-xml-19980210.xml");
+ if (no == 4) return("test/valid/dtds/xhtml1-strict.dtd");
+ if (no == 5) return(REMOTE1GOOD);
+ if (no == 6) return(REMOTE1BAD);
+ return(NULL);
+}
+static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_eaten_name 2
+
+static xmlChar *gen_eaten_name(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlStrdup(BAD_CAST "eaten"));
+ return(NULL);
+}
+static void des_eaten_name(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_fileoutput 6
+
+static const char *gen_fileoutput(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return("/missing.xml");
+ if (no == 1) return("<foo/>");
+ if (no == 2) return(REMOTE2GOOD);
+ if (no == 3) return(REMOTE1GOOD);
+ if (no == 4) return(REMOTE1BAD);
+ return(NULL);
+}
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlParserCtxtPtr 3
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewParserCtxt());
+ if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));
+ return(NULL);
+}
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL)
+ xmlFreeParserCtxt(val);
+}
+
+#define gen_nb_xmlSAXHandlerPtr 2
+static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {
+#ifdef LIBXML_SAX1_ENABLED
+ if (no == 0) return((xmlSAXHandlerPtr) &xmlDefaultSAXHandler);
+#endif
+ return(NULL);
+}
+static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlValidCtxtPtr 2
+static xmlValidCtxtPtr gen_xmlValidCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
+#ifdef LIBXML_VALID_ENABLED
+ if (no == 0) return(xmlNewValidCtxt());
+#endif
+ return(NULL);
+}
+static void des_xmlValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlValidCtxtPtr val, int nr ATTRIBUTE_UNUSED) {
+#ifdef LIBXML_VALID_ENABLED
+ if (val != NULL)
+ xmlFreeValidCtxt(val);
+#endif
+}
+
+#define gen_nb_xmlParserInputBufferPtr 8
+
+static xmlParserInputBufferPtr gen_xmlParserInputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlParserInputBufferCreateFilename("missing.xml", XML_CHAR_ENCODING_NONE));
+ if (no == 1) return(xmlParserInputBufferCreateFilename("<foo/>", XML_CHAR_ENCODING_NONE));
+ if (no == 2) return(xmlParserInputBufferCreateFilename("test/ent2", XML_CHAR_ENCODING_NONE));
+ if (no == 3) return(xmlParserInputBufferCreateFilename("test/valid/REC-xml-19980210.xml", XML_CHAR_ENCODING_NONE));
+ if (no == 4) return(xmlParserInputBufferCreateFilename("test/valid/dtds/xhtml1-strict.dtd", XML_CHAR_ENCODING_NONE));
+ if (no == 5) return(xmlParserInputBufferCreateFilename(REMOTE1GOOD, XML_CHAR_ENCODING_NONE));
+ if (no == 6) return(xmlParserInputBufferCreateFilename(REMOTE1BAD, XML_CHAR_ENCODING_NONE));
+ return(NULL);
+}
+static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputBufferPtr val, int nr ATTRIBUTE_UNUSED) {
+ xmlFreeParserInputBuffer(val);
+}
+
+#define gen_nb_xmlDocPtr 4
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));
+ if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));
+ if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));
+ return(NULL);
+}
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {
+ if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
+ xmlFreeDoc(val);
+}
+
+#define gen_nb_xmlAttrPtr 2
+static xmlAttrPtr gen_xmlAttrPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(get_api_attr());
+ return(NULL);
+}
+static void des_xmlAttrPtr(int no, xmlAttrPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) free_api_doc();
+}
+
+#define gen_nb_xmlDictPtr 2
+static xmlDictPtr gen_xmlDictPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlDictCreate());
+ return(NULL);
+}
+static void des_xmlDictPtr(int no ATTRIBUTE_UNUSED, xmlDictPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL)
+ xmlDictFree(val);
+}
+
+#define gen_nb_xmlNodePtr 3
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
+ if (no == 1) return(get_api_root());
+ return(NULL);
+/* if (no == 2) return((xmlNodePtr) get_api_doc()); */
+}
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) {
+ free_api_doc();
+ } else if (val != NULL) {
+ xmlUnlinkNode(val);
+ xmlFreeNode(val);
+ }
+}
+
+#define gen_nb_xmlDtdPtr 3
+static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0)
+ return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
+ if (no == 1) return(get_api_dtd());
+ return(NULL);
+}
+static void des_xmlDtdPtr(int no, xmlDtdPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) free_api_doc();
+ else if (val != NULL) {
+ xmlUnlinkNode((xmlNodePtr) val);
+ xmlFreeNode((xmlNodePtr) val);
+ }
+}
+
+#define gen_nb_xmlNsPtr 2
+static xmlNsPtr gen_xmlNsPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(get_api_ns());
+ return(NULL);
+}
+static void des_xmlNsPtr(int no, xmlNsPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) free_api_doc();
+}
+
+#define gen_nb_xmlNodePtr_in 3
+static xmlNodePtr gen_xmlNodePtr_in(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));
+ if (no == 0) return(xmlNewText(BAD_CAST "text"));
+ return(NULL);
+}
+static void des_xmlNodePtr_in(int no ATTRIBUTE_UNUSED, xmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#ifdef LIBXML_WRITER_ENABLED
+#define gen_nb_xmlTextWriterPtr 2
+static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewTextWriterFilename("test.out", 0));
+ return(NULL);
+}
+static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) xmlFreeTextWriter(val);
+}
+#endif
+
+#ifdef LIBXML_READER_ENABLED
+#define gen_nb_xmlTextReaderPtr 4
+static xmlTextReaderPtr gen_xmlTextReaderPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewTextReaderFilename("test/ent2"));
+ if (no == 1) return(xmlNewTextReaderFilename("test/valid/REC-xml-19980210.xml"));
+ if (no == 2) return(xmlNewTextReaderFilename("test/valid/dtds/xhtml1-strict.dtd"));
+ return(NULL);
+}
+static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) xmlFreeTextReader(val);
+}
+#endif
+
+#define gen_nb_xmlBufferPtr 3
+static const xmlChar *static_buf_content = (xmlChar *)"a static buffer";
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlBufferCreate());
+ if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));
+ return(NULL);
+}
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlBufferFree(val);
+ }
+}
+
+#define gen_nb_xmlListPtr 2
+static xmlListPtr gen_xmlListPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlListCreate(NULL, NULL));
+ return(NULL);
+}
+static void des_xmlListPtr(int no ATTRIBUTE_UNUSED, xmlListPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlListDelete(val);
+ }
+}
+
+#define gen_nb_xmlHashTablePtr 2
+static xmlHashTablePtr gen_xmlHashTablePtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlHashCreate(10));
+ return(NULL);
+}
+static void des_xmlHashTablePtr(int no ATTRIBUTE_UNUSED, xmlHashTablePtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlHashFree(val, NULL);
+ }
+}
+
+#include <libxml/xpathInternals.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+#define gen_nb_xmlXPathObjectPtr 5
+static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlXPathNewString(BAD_CAST "string object"));
+ if (no == 1) return(xmlXPathNewFloat(1.1));
+ if (no == 2) return(xmlXPathNewBoolean(1));
+ if (no == 3) return(xmlXPathNewNodeSet(NULL));
+ return(NULL);
+}
+static void des_xmlXPathObjectPtr(int no ATTRIBUTE_UNUSED, xmlXPathObjectPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlXPathFreeObject(val);
+ }
+}
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#define gen_nb_xmlOutputBufferPtr 2
+static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlOutputBufferCreateFilename("test.out", NULL, 0));
+ return(NULL);
+}
+static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlOutputBufferClose(val);
+ }
+}
+#endif
+
+#ifdef LIBXML_FTP_ENABLED
+#define gen_nb_xmlNanoFTPCtxtPtr 4
+static void *gen_xmlNanoFTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNanoFTPNewCtxt(REMOTE2GOOD));
+ if (no == 1) return(xmlNanoFTPNewCtxt(REMOTE1GOOD));
+ if (no == 2) return(xmlNanoFTPNewCtxt("foo"));
+ return(NULL);
+}
+static void des_xmlNanoFTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlNanoFTPFreeCtxt(val);
+ }
+}
+#endif
+
+#ifdef LIBXML_HTTP_ENABLED
+#define gen_nb_xmlNanoHTTPCtxtPtr 1
+static void *gen_xmlNanoHTTPCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNanoHTTPOpen(REMOTE1GOOD, NULL));
+ if (no == 1) return(xmlNanoHTTPOpen(REMOTE2GOOD, NULL));
+ if (no == 2) return(xmlNanoHTTPOpen(REMOTE1BAD, NULL));
+ return(NULL);
+}
+static void des_xmlNanoHTTPCtxtPtr(int no ATTRIBUTE_UNUSED, void *val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL) {
+ xmlNanoHTTPClose(val);
+ }
+}
+#endif
+
+#define gen_nb_xmlCharEncoding 4
+static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(XML_CHAR_ENCODING_UTF8);
+ if (no == 1) return(XML_CHAR_ENCODING_NONE);
+ if (no == 2) return(XML_CHAR_ENCODING_8859_1);
+ return(XML_CHAR_ENCODING_ERROR);
+}
+static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+
+#define gen_nb_xmlExpCtxtPtr 1
+static xmlExpCtxtPtr gen_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlExpCtxtPtr(int no ATTRIBUTE_UNUSED, xmlExpCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlExpNodePtr 1
+static xmlExpNodePtr gen_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlExpNodePtr(int no ATTRIBUTE_UNUSED, xmlExpNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+#define gen_nb_xmlSchemaPtr 1
+static xmlSchemaPtr gen_xmlSchemaPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaPtr(int no ATTRIBUTE_UNUSED, xmlSchemaPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlSchemaValidCtxtPtr 1
+static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+#define gen_nb_xmlHashDeallocator 2
+static void
+test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
+}
+
+static xmlHashDeallocator gen_xmlHashDeallocator(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(test_xmlHashDeallocator);
+ return(NULL);
+}
+static void des_xmlHashDeallocator(int no ATTRIBUTE_UNUSED, xmlHashDeallocator val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+
+static void desret_int(int val ATTRIBUTE_UNUSED) {
+}
+static void desret_xmlChar(xmlChar val ATTRIBUTE_UNUSED) {
+}
+static void desret_long(long val ATTRIBUTE_UNUSED) {
+}
+static void desret_unsigned_long(unsigned long val ATTRIBUTE_UNUSED) {
+}
+static void desret_double(double val ATTRIBUTE_UNUSED) {
+}
+static void desret_xmlCharEncoding(xmlCharEncoding val ATTRIBUTE_UNUSED) {
+}
+#if 0
+static void desret_const_void_ptr(void *val ATTRIBUTE_UNUSED) {
+}
+#endif
+static void desret_void_ptr(void *val ATTRIBUTE_UNUSED) {
+}
+static void desret_const_char_ptr(const char *val ATTRIBUTE_UNUSED) {
+}
+static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {
+}
+static void desret_xmlChar_ptr(xmlChar *val) {
+ if (val != NULL)
+ xmlFree(val);
+}
+static void desret_xmlDocPtr(xmlDocPtr val) {
+ if (val != api_doc)
+ xmlFreeDoc(val);
+}
+static void desret_xmlDictPtr(xmlDictPtr val) {
+ xmlDictFree(val);
+}
+#ifdef LIBXML_OUTPUT_ENABLED
+static void desret_xmlOutputBufferPtr(xmlOutputBufferPtr val) {
+ xmlOutputBufferClose(val);
+}
+#endif
+#ifdef LIBXML_READER_ENABLED
+static void desret_xmlTextReaderPtr(xmlTextReaderPtr val) {
+ xmlFreeTextReader(val);
+}
+#endif
+static void desret_xmlNodePtr(xmlNodePtr val) {
+ if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc)) {
+ xmlUnlinkNode(val);
+ xmlFreeNode(val);
+ }
+}
+static void desret_xmlAttrPtr(xmlAttrPtr val) {
+ if (val != NULL) {
+ xmlUnlinkNode((xmlNodePtr) val);
+ xmlFreeNode((xmlNodePtr) val);
+ }
+}
+static void desret_xmlEntityPtr(xmlEntityPtr val) {
+ if (val != NULL) {
+ xmlUnlinkNode((xmlNodePtr) val);
+ xmlFreeNode((xmlNodePtr) val);
+ }
+}
+static void desret_xmlElementPtr(xmlElementPtr val) {
+ if (val != NULL) {
+ xmlUnlinkNode((xmlNodePtr) val);
+ }
+}
+static void desret_xmlAttributePtr(xmlAttributePtr val) {
+ if (val != NULL) {
+ xmlUnlinkNode((xmlNodePtr) val);
+ }
+}
+static void desret_xmlNsPtr(xmlNsPtr val ATTRIBUTE_UNUSED) {
+}
+static void desret_xmlDtdPtr(xmlDtdPtr val) {
+ desret_xmlNodePtr((xmlNodePtr)val);
+}
+#ifdef LIBXML_XPATH_ENABLED
+static void desret_xmlXPathObjectPtr(xmlXPathObjectPtr val) {
+ xmlXPathFreeObject(val);
+}
+static void desret_xmlNodeSetPtr(xmlNodeSetPtr val) {
+ xmlXPathFreeNodeSet(val);
+}
+#endif
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {
+ xmlFreeParserCtxt(val);
+}
+static void desret_xmlParserInputBufferPtr(xmlParserInputBufferPtr val) {
+ xmlFreeParserInputBuffer(val);
+}
+static void desret_xmlParserInputPtr(xmlParserInputPtr val) {
+ xmlFreeInputStream(val);
+}
+#ifdef LIBXML_WRITER_ENABLED
+static void desret_xmlTextWriterPtr(xmlTextWriterPtr val) {
+ xmlFreeTextWriter(val);
+}
+#endif
+static void desret_xmlBufferPtr(xmlBufferPtr val) {
+ xmlBufferFree(val);
+}
+#ifdef LIBXML_SCHEMAS_ENABLED
+static void desret_xmlSchemaParserCtxtPtr(xmlSchemaParserCtxtPtr val) {
+ xmlSchemaFreeParserCtxt(val);
+}
+static void desret_xmlSchemaTypePtr(xmlSchemaTypePtr val ATTRIBUTE_UNUSED) {
+}
+static void desret_xmlRelaxNGParserCtxtPtr(xmlRelaxNGParserCtxtPtr val) {
+ xmlRelaxNGFreeParserCtxt(val);
+}
+#endif
+#ifdef LIBXML_HTML_ENABLED
+static void desret_const_htmlEntityDesc_ptr(const htmlEntityDesc * val ATTRIBUTE_UNUSED) {
+}
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+static void desret_xmlNanoHTTPCtxtPtr(void *val) {
+ xmlNanoHTTPClose(val);
+}
+#endif
+#ifdef LIBXML_FTP_ENABLED
+static void desret_xmlNanoFTPCtxtPtr(void *val) {
+ xmlNanoFTPClose(val);
+}
+#endif
+/* cut and pasted from autogenerated to avoid troubles */
+#define gen_nb_const_xmlChar_ptr_ptr 1
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_unsigned_char_ptr 1
+static unsigned char * gen_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_const_unsigned_char_ptr 1
+static unsigned char * gen_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, const unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#ifdef LIBXML_HTML_ENABLED
+#define gen_nb_const_htmlNodePtr 1
+static htmlNodePtr gen_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, const htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+#define gen_nb_htmlDocPtr 3
+static htmlDocPtr gen_htmlDocPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(htmlNewDoc(NULL, NULL));
+ if (no == 1) return(htmlReadMemory("<html/>", 7, "test", NULL, 0));
+ return(NULL);
+}
+static void des_htmlDocPtr(int no ATTRIBUTE_UNUSED, htmlDocPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
+ xmlFreeDoc(val);
+}
+static void desret_htmlDocPtr(htmlDocPtr val) {
+ if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))
+ xmlFreeDoc(val);
+}
+#define gen_nb_htmlParserCtxtPtr 3
+static htmlParserCtxtPtr gen_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return(xmlNewParserCtxt());
+ if (no == 1) return(htmlCreateMemoryParserCtxt("<html/>", 7));
+ return(NULL);
+}
+static void des_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, htmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL)
+ htmlFreeParserCtxt(val);
+}
+static void desret_htmlParserCtxtPtr(htmlParserCtxtPtr val) {
+ if (val != NULL)
+ htmlFreeParserCtxt(val);
+}
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+#define gen_nb_xmlNodeSetPtr 1
+static xmlNodeSetPtr gen_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, xmlNodeSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_DEBUG_ENABLED
+#ifdef LIBXML_XPATH_ENABLED
+#define gen_nb_xmlShellCtxtPtr 1
+static xmlShellCtxtPtr gen_xmlShellCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlShellCtxtPtr(int no ATTRIBUTE_UNUSED, xmlShellCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+#endif
+
+#ifdef LIBXML_PATTERN_ENABLED
+#define gen_nb_xmlPatternPtr 1
+static xmlPatternPtr gen_xmlPatternPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlPatternPtr(int no ATTRIBUTE_UNUSED, xmlPatternPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#define gen_nb_xmlElementContentPtr 1
+static xmlElementContentPtr gen_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, xmlElementContentPtr val, int nr ATTRIBUTE_UNUSED) {
+ if (val != NULL)
+ xmlFreeElementContent(val);
+}
+static void desret_xmlElementContentPtr(xmlElementContentPtr val) {
+ if (val != NULL)
+ xmlFreeElementContent(val);
+}
+
+#define gen_nb_xmlParserNodeInfoSeqPtr 1
+static xmlParserNodeInfoSeqPtr gen_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, xmlParserNodeInfoSeqPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_const_xmlParserNodeInfo_ptr(const xmlParserNodeInfo *val ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_void_ptr_ptr 1
+static void ** gen_void_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_void_ptr_ptr(int no ATTRIBUTE_UNUSED, void ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+/************************************************************************
+ * *
+ * WARNING: end of the manually maintained part of the test code *
+ * do not remove or alter the CUT HERE line *
+ * *
+ ************************************************************************/
+
+/* CUT HERE: everything below that line is generated */
+#ifdef LIBXML_HTML_ENABLED
+static void desret_htmlStatus(htmlStatus val ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#define gen_nb_xmlAttributeDefault 4
+static xmlAttributeDefault gen_xmlAttributeDefault(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_ATTRIBUTE_FIXED);
+ if (no == 2) return(XML_ATTRIBUTE_IMPLIED);
+ if (no == 3) return(XML_ATTRIBUTE_NONE);
+ if (no == 4) return(XML_ATTRIBUTE_REQUIRED);
+ return(0);
+}
+
+static void des_xmlAttributeDefault(int no ATTRIBUTE_UNUSED, xmlAttributeDefault val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlAttributeType 4
+static xmlAttributeType gen_xmlAttributeType(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_ATTRIBUTE_CDATA);
+ if (no == 2) return(XML_ATTRIBUTE_ENTITIES);
+ if (no == 3) return(XML_ATTRIBUTE_ENTITY);
+ if (no == 4) return(XML_ATTRIBUTE_ENUMERATION);
+ return(0);
+}
+
+static void des_xmlAttributeType(int no ATTRIBUTE_UNUSED, xmlAttributeType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlBufferAllocationScheme 4
+static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);
+ if (no == 2) return(XML_BUFFER_ALLOC_EXACT);
+ if (no == 3) return(XML_BUFFER_ALLOC_HYBRID);
+ if (no == 4) return(XML_BUFFER_ALLOC_IMMUTABLE);
+ return(0);
+}
+
+static void des_xmlBufferAllocationScheme(int no ATTRIBUTE_UNUSED, xmlBufferAllocationScheme val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_xmlBufferAllocationScheme(xmlBufferAllocationScheme val ATTRIBUTE_UNUSED) {
+}
+
+#ifdef LIBXML_CATALOG_ENABLED
+#define gen_nb_xmlCatalogAllow 4
+static xmlCatalogAllow gen_xmlCatalogAllow(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_CATA_ALLOW_ALL);
+ if (no == 2) return(XML_CATA_ALLOW_DOCUMENT);
+ if (no == 3) return(XML_CATA_ALLOW_GLOBAL);
+ if (no == 4) return(XML_CATA_ALLOW_NONE);
+ return(0);
+}
+
+static void des_xmlCatalogAllow(int no ATTRIBUTE_UNUSED, xmlCatalogAllow val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_xmlCatalogAllow(xmlCatalogAllow val ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#ifdef LIBXML_CATALOG_ENABLED
+#define gen_nb_xmlCatalogPrefer 3
+static xmlCatalogPrefer gen_xmlCatalogPrefer(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_CATA_PREFER_NONE);
+ if (no == 2) return(XML_CATA_PREFER_PUBLIC);
+ if (no == 3) return(XML_CATA_PREFER_SYSTEM);
+ return(0);
+}
+
+static void des_xmlCatalogPrefer(int no ATTRIBUTE_UNUSED, xmlCatalogPrefer val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_xmlCatalogPrefer(xmlCatalogPrefer val ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#define gen_nb_xmlElementContentType 4
+static xmlElementContentType gen_xmlElementContentType(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_ELEMENT_CONTENT_ELEMENT);
+ if (no == 2) return(XML_ELEMENT_CONTENT_OR);
+ if (no == 3) return(XML_ELEMENT_CONTENT_PCDATA);
+ if (no == 4) return(XML_ELEMENT_CONTENT_SEQ);
+ return(0);
+}
+
+static void des_xmlElementContentType(int no ATTRIBUTE_UNUSED, xmlElementContentType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlElementTypeVal 4
+static xmlElementTypeVal gen_xmlElementTypeVal(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_ELEMENT_TYPE_ANY);
+ if (no == 2) return(XML_ELEMENT_TYPE_ELEMENT);
+ if (no == 3) return(XML_ELEMENT_TYPE_EMPTY);
+ if (no == 4) return(XML_ELEMENT_TYPE_MIXED);
+ return(0);
+}
+
+static void des_xmlElementTypeVal(int no ATTRIBUTE_UNUSED, xmlElementTypeVal val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_xmlFeature 4
+static xmlFeature gen_xmlFeature(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_WITH_AUTOMATA);
+ if (no == 2) return(XML_WITH_C14N);
+ if (no == 3) return(XML_WITH_CATALOG);
+ if (no == 4) return(XML_WITH_DEBUG);
+ return(0);
+}
+
+static void des_xmlFeature(int no ATTRIBUTE_UNUSED, xmlFeature val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_xmlParserErrors(xmlParserErrors val ATTRIBUTE_UNUSED) {
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+#define gen_nb_xmlSchemaValType 4
+static xmlSchemaValType gen_xmlSchemaValType(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_SCHEMAS_ANYSIMPLETYPE);
+ if (no == 2) return(XML_SCHEMAS_ANYTYPE);
+ if (no == 3) return(XML_SCHEMAS_ANYURI);
+ if (no == 4) return(XML_SCHEMAS_BASE64BINARY);
+ return(0);
+}
+
+static void des_xmlSchemaValType(int no ATTRIBUTE_UNUSED, xmlSchemaValType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static void desret_xmlSchemaValType(xmlSchemaValType val ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+#define gen_nb_xmlSchemaWhitespaceValueType 4
+static xmlSchemaWhitespaceValueType gen_xmlSchemaWhitespaceValueType(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 1) return(XML_SCHEMA_WHITESPACE_COLLAPSE);
+ if (no == 2) return(XML_SCHEMA_WHITESPACE_PRESERVE);
+ if (no == 3) return(XML_SCHEMA_WHITESPACE_REPLACE);
+ if (no == 4) return(XML_SCHEMA_WHITESPACE_UNKNOWN);
+ return(0);
+}
+
+static void des_xmlSchemaWhitespaceValueType(int no ATTRIBUTE_UNUSED, xmlSchemaWhitespaceValueType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#endif
+
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/SAX2.h>
+#include <libxml/c14n.h>
+#include <libxml/catalog.h>
+#include <libxml/chvalid.h>
+#include <libxml/debugXML.h>
+#include <libxml/dict.h>
+#include <libxml/encoding.h>
+#include <libxml/entities.h>
+#include <libxml/hash.h>
+#include <libxml/list.h>
+#include <libxml/nanoftp.h>
+#include <libxml/nanohttp.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/pattern.h>
+#include <libxml/relaxng.h>
+#include <libxml/schemasInternals.h>
+#include <libxml/schematron.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#include <libxml/valid.h>
+#include <libxml/xinclude.h>
+#include <libxml/xmlIO.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlmodule.h>
+#include <libxml/xmlreader.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/xmlsave.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/xmlschemastypes.h>
+#include <libxml/xmlstring.h>
+#include <libxml/xmlunicode.h>
+#include <libxml/xmlwriter.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/xpointer.h>
+static int test_HTMLparser(void);
+static int test_HTMLtree(void);
+static int test_SAX2(void);
+static int test_c14n(void);
+static int test_catalog(void);
+static int test_chvalid(void);
+static int test_debugXML(void);
+static int test_dict(void);
+static int test_encoding(void);
+static int test_entities(void);
+static int test_hash(void);
+static int test_list(void);
+static int test_nanoftp(void);
+static int test_nanohttp(void);
+static int test_parser(void);
+static int test_parserInternals(void);
+static int test_pattern(void);
+static int test_relaxng(void);
+static int test_schemasInternals(void);
+static int test_schematron(void);
+static int test_tree(void);
+static int test_uri(void);
+static int test_valid(void);
+static int test_xinclude(void);
+static int test_xmlIO(void);
+static int test_xmlautomata(void);
+static int test_xmlerror(void);
+static int test_xmlmodule(void);
+static int test_xmlreader(void);
+static int test_xmlregexp(void);
+static int test_xmlsave(void);
+static int test_xmlschemas(void);
+static int test_xmlschemastypes(void);
+static int test_xmlstring(void);
+static int test_xmlunicode(void);
+static int test_xmlwriter(void);
+static int test_xpath(void);
+static int test_xpathInternals(void);
+static int test_xpointer(void);
+
+/**
+ * testlibxml2:
+ *
+ * Main entry point of the tester for the full libxml2 module,
+ * it calls all the tester entry point for each module.
+ *
+ * Returns the number of error found
+ */
+static int
+testlibxml2(void)
+{
+ int test_ret = 0;
+
+ test_ret += test_HTMLparser();
+ test_ret += test_HTMLtree();
+ test_ret += test_SAX2();
+ test_ret += test_c14n();
+ test_ret += test_catalog();
+ test_ret += test_chvalid();
+ test_ret += test_debugXML();
+ test_ret += test_dict();
+ test_ret += test_encoding();
+ test_ret += test_entities();
+ test_ret += test_hash();
+ test_ret += test_list();
+ test_ret += test_nanoftp();
+ test_ret += test_nanohttp();
+ test_ret += test_parser();
+ test_ret += test_parserInternals();
+ test_ret += test_pattern();
+ test_ret += test_relaxng();
+ test_ret += test_schemasInternals();
+ test_ret += test_schematron();
+ test_ret += test_tree();
+ test_ret += test_uri();
+ test_ret += test_valid();
+ test_ret += test_xinclude();
+ test_ret += test_xmlIO();
+ test_ret += test_xmlautomata();
+ test_ret += test_xmlerror();
+ test_ret += test_xmlmodule();
+ test_ret += test_xmlreader();
+ test_ret += test_xmlregexp();
+ test_ret += test_xmlsave();
+ test_ret += test_xmlschemas();
+ test_ret += test_xmlschemastypes();
+ test_ret += test_xmlstring();
+ test_ret += test_xmlunicode();
+ test_ret += test_xmlwriter();
+ test_ret += test_xpath();
+ test_ret += test_xpathInternals();
+ test_ret += test_xpointer();
+
+ printf("Total: %d functions, %d tests, %d errors\n",
+ function_tests, call_tests, test_ret);
+ return(test_ret);
+}
+
+
+static int
+test_UTF8ToHtml(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ unsigned char * out; /* a pointer to an array of bytes to store the result */
+ int n_out;
+ int * outlen; /* the length of @out */
+ int n_outlen;
+ unsigned char * in; /* a pointer to an array of UTF-8 chars */
+ int n_in;
+ int * inlen; /* the length of @in */
+ int n_inlen;
+
+ for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
+ for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
+ for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
+ for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
+ mem_base = xmlMemBlocks();
+ out = gen_unsigned_char_ptr(n_out, 0);
+ outlen = gen_int_ptr(n_outlen, 1);
+ in = gen_const_unsigned_char_ptr(n_in, 2);
+ inlen = gen_int_ptr(n_inlen, 3);
+
+ ret_val = UTF8ToHtml(out, outlen, (const unsigned char *)in, inlen);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_char_ptr(n_out, out, 0);
+ des_int_ptr(n_outlen, outlen, 1);
+ des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
+ des_int_ptr(n_inlen, inlen, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in UTF8ToHtml",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_outlen);
+ printf(" %d", n_in);
+ printf(" %d", n_inlen);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_HTML_ENABLED
+
+#define gen_nb_const_htmlElemDesc_ptr 1
+static htmlElemDesc * gen_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, const htmlElemDesc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_htmlAttrAllowed(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlStatus ret_val;
+ htmlElemDesc * elt; /* HTML element */
+ int n_elt;
+ xmlChar * attr; /* HTML attribute */
+ int n_attr;
+ int legacy; /* whether to allow deprecated attributes */
+ int n_legacy;
+
+ for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
+ for (n_attr = 0;n_attr < gen_nb_const_xmlChar_ptr;n_attr++) {
+ for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
+ mem_base = xmlMemBlocks();
+ elt = gen_const_htmlElemDesc_ptr(n_elt, 0);
+ attr = gen_const_xmlChar_ptr(n_attr, 1);
+ legacy = gen_int(n_legacy, 2);
+
+ ret_val = htmlAttrAllowed((const htmlElemDesc *)elt, (const xmlChar *)attr, legacy);
+ desret_htmlStatus(ret_val);
+ call_tests++;
+ des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 0);
+ des_const_xmlChar_ptr(n_attr, (const xmlChar *)attr, 1);
+ des_int(n_legacy, legacy, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlAttrAllowed",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_elt);
+ printf(" %d", n_attr);
+ printf(" %d", n_legacy);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_HTML_ENABLED
+
+#define gen_nb_htmlNodePtr 1
+static htmlNodePtr gen_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_htmlNodePtr(int no ATTRIBUTE_UNUSED, htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_htmlAutoCloseTag(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlDocPtr doc; /* the HTML document */
+ int n_doc;
+ xmlChar * name; /* The tag name */
+ int n_name;
+ htmlNodePtr elem; /* the HTML element */
+ int n_elem;
+
+ for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_htmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ elem = gen_htmlNodePtr(n_elem, 2);
+
+ ret_val = htmlAutoCloseTag(doc, (const xmlChar *)name, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_htmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlAutoCloseTag",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCreateMemoryParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ret_val;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);
+ desret_htmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCreateMemoryParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_HTML_ENABLED
+
+#define gen_nb_htmlSAXHandlerPtr 1
+static htmlSAXHandlerPtr gen_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, htmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_htmlCreatePushParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ret_val;
+ htmlSAXHandlerPtr sax; /* a SAX handler */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks */
+ int n_user_data;
+ char * chunk; /* a pointer to an array of chars */
+ int n_chunk;
+ int size; /* number of chars in the array */
+ int n_size;
+ const char * filename; /* an optional file name or URI */
+ int n_filename;
+ xmlCharEncoding enc; /* an optional encoding */
+ int n_enc;
+
+ for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_htmlSAXHandlerPtr(n_sax, 0);
+ user_data = gen_userdata(n_user_data, 1);
+ chunk = gen_const_char_ptr(n_chunk, 2);
+ size = gen_int(n_size, 3);
+ filename = gen_fileoutput(n_filename, 4);
+ enc = gen_xmlCharEncoding(n_enc, 5);
+
+ ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);
+ desret_htmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_htmlSAXHandlerPtr(n_sax, sax, 0);
+ des_userdata(n_user_data, user_data, 1);
+ des_const_char_ptr(n_chunk, (const char *)chunk, 2);
+ des_int(n_size, size, 3);
+ des_fileoutput(n_filename, filename, 4);
+ des_xmlCharEncoding(n_enc, enc, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCreatePushParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_chunk);
+ printf(" %d", n_size);
+ printf(" %d", n_filename);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCtxtReadDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_int(n_options, 4);
+
+ ret_val = htmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_int(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCtxtReadDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCtxtReadFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ htmlDocPtr ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_int(n_options, 3);
+
+ ret_val = htmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_options, options, 3);
+ xmlResetLastError();
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCtxtReadMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ buffer = gen_const_char_ptr(n_buffer, 1);
+ size = gen_int(n_size, 2);
+ URL = gen_filepath(n_URL, 3);
+ encoding = gen_const_char_ptr(n_encoding, 4);
+ options = gen_int(n_options, 5);
+
+ ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 1);
+ des_int(n_size, size, 2);
+ des_filepath(n_URL, URL, 3);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 4);
+ des_int(n_options, options, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCtxtReadMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCtxtReset(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+
+ htmlCtxtReset(ctxt);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCtxtReset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlCtxtUseOptions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ options = gen_int(n_options, 1);
+
+ ret_val = htmlCtxtUseOptions(ctxt, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_int(n_options, options, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCtxtUseOptions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlElementAllowedHere(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlElemDesc * parent; /* HTML parent element */
+ int n_parent;
+ xmlChar * elt; /* HTML element */
+ int n_elt;
+
+ for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
+ for (n_elt = 0;n_elt < gen_nb_const_xmlChar_ptr;n_elt++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
+ elt = gen_const_xmlChar_ptr(n_elt, 1);
+
+ ret_val = htmlElementAllowedHere((const htmlElemDesc *)parent, (const xmlChar *)elt);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
+ des_const_xmlChar_ptr(n_elt, (const xmlChar *)elt, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlElementAllowedHere",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_elt);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlElementStatusHere(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlStatus ret_val;
+ htmlElemDesc * parent; /* HTML parent element */
+ int n_parent;
+ htmlElemDesc * elt; /* HTML element */
+ int n_elt;
+
+ for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {
+ for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_const_htmlElemDesc_ptr(n_parent, 0);
+ elt = gen_const_htmlElemDesc_ptr(n_elt, 1);
+
+ ret_val = htmlElementStatusHere((const htmlElemDesc *)parent, (const htmlElemDesc *)elt);
+ desret_htmlStatus(ret_val);
+ call_tests++;
+ des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);
+ des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlElementStatusHere",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_elt);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlEncodeEntities(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ unsigned char * out; /* a pointer to an array of bytes to store the result */
+ int n_out;
+ int * outlen; /* the length of @out */
+ int n_outlen;
+ unsigned char * in; /* a pointer to an array of UTF-8 chars */
+ int n_in;
+ int * inlen; /* the length of @in */
+ int n_inlen;
+ int quoteChar; /* the quote character to escape (' or ") or zero. */
+ int n_quoteChar;
+
+ for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
+ for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
+ for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
+ for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
+ for (n_quoteChar = 0;n_quoteChar < gen_nb_int;n_quoteChar++) {
+ mem_base = xmlMemBlocks();
+ out = gen_unsigned_char_ptr(n_out, 0);
+ outlen = gen_int_ptr(n_outlen, 1);
+ in = gen_const_unsigned_char_ptr(n_in, 2);
+ inlen = gen_int_ptr(n_inlen, 3);
+ quoteChar = gen_int(n_quoteChar, 4);
+
+ ret_val = htmlEncodeEntities(out, outlen, (const unsigned char *)in, inlen, quoteChar);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_char_ptr(n_out, out, 0);
+ des_int_ptr(n_outlen, outlen, 1);
+ des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
+ des_int_ptr(n_inlen, inlen, 3);
+ des_int(n_quoteChar, quoteChar, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlEncodeEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_outlen);
+ printf(" %d", n_in);
+ printf(" %d", n_inlen);
+ printf(" %d", n_quoteChar);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlEntityLookup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ const htmlEntityDesc * ret_val;
+ xmlChar * name; /* the entity name */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+
+ ret_val = htmlEntityLookup((const xmlChar *)name);
+ desret_const_htmlEntityDesc_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlEntityLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlEntityValueLookup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ const htmlEntityDesc * ret_val;
+ unsigned int value; /* the entity's unicode value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_unsigned_int;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_unsigned_int(n_value, 0);
+
+ ret_val = htmlEntityValueLookup(value);
+ desret_const_htmlEntityDesc_ptr(ret_val);
+ call_tests++;
+ des_unsigned_int(n_value, value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlEntityValueLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlHandleOmittedElem(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ int val; /* int 0 or 1 */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = htmlHandleOmittedElem(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlHandleOmittedElem",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlIsAutoClosed(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlDocPtr doc; /* the HTML document */
+ int n_doc;
+ htmlNodePtr elem; /* the HTML element */
+ int n_elem;
+
+ for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_htmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_htmlDocPtr(n_doc, 0);
+ elem = gen_htmlNodePtr(n_elem, 1);
+
+ ret_val = htmlIsAutoClosed(doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlDocPtr(n_doc, doc, 0);
+ des_htmlNodePtr(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlIsAutoClosed",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlIsScriptAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * name; /* an attribute name */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+
+ ret_val = htmlIsScriptAttribute((const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlIsScriptAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNewParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = htmlNewParserCtxt();
+ desret_htmlParserCtxtPtr(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNewParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeStatus(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlStatus ret_val;
+ htmlNodePtr node; /* an htmlNodePtr in a tree */
+ int n_node;
+ int legacy; /* whether to allow deprecated elements (YES is faster here for Element nodes) */
+ int n_legacy;
+
+ for (n_node = 0;n_node < gen_nb_const_htmlNodePtr;n_node++) {
+ for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_htmlNodePtr(n_node, 0);
+ legacy = gen_int(n_legacy, 1);
+
+ ret_val = htmlNodeStatus((const htmlNodePtr)node, legacy);
+ desret_htmlStatus(ret_val);
+ call_tests++;
+ des_const_htmlNodePtr(n_node, (const htmlNodePtr)node, 0);
+ des_int(n_legacy, legacy, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeStatus",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_legacy);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseCharRef(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = htmlParseCharRef(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseCharRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseChunk(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_PUSH_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ char * chunk; /* an char array */
+ int n_chunk;
+ int size; /* the size in byte of the chunk */
+ int n_size;
+ int terminate; /* last chunk indicator */
+ int n_terminate;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ chunk = gen_const_char_ptr(n_chunk, 1);
+ size = gen_int(n_size, 2);
+ terminate = gen_int(n_terminate, 3);
+
+ ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_chunk, (const char *)chunk, 1);
+ des_int(n_size, size, 2);
+ des_int(n_terminate, terminate, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseChunk",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_chunk);
+ printf(" %d", n_size);
+ printf(" %d", n_terminate);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+ char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
+ int n_encoding;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlChar_ptr(n_cur, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+
+ ret_val = htmlParseDoc(cur, (const char *)encoding);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlChar_ptr(n_cur, cur, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = htmlParseDocument(ctxt);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+
+ htmlParseElement(ctxt);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseEntityRef(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ const htmlEntityDesc * ret_val;
+ htmlParserCtxtPtr ctxt; /* an HTML parser context */
+ int n_ctxt;
+ xmlChar ** str; /* location to store the entity name */
+ int n_str;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
+ str = gen_const_xmlChar_ptr_ptr(n_str, 1);
+
+ ret_val = htmlParseEntityRef(ctxt, (const xmlChar **)str);
+ desret_const_htmlEntityDesc_ptr(ret_val);
+ call_tests++;
+ des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr_ptr(n_str, (const xmlChar **)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlParseEntityRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlParseFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ htmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+ char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
+ int n_encoding;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ filename = gen_filepath(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+
+ ret_val = htmlParseFile(filename, (const char *)encoding);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ xmlResetLastError();
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlReadDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+ URL = gen_filepath(n_URL, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_int(n_options, 3);
+
+ ret_val = htmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ des_filepath(n_URL, URL, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlReadDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlReadFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+ options = gen_int(n_options, 2);
+
+ ret_val = htmlReadFile(filename, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ des_int(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlReadFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlReadMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of htmlParserOption(s) */
+ int n_options;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_int(n_options, 4);
+
+ ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_int(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlReadMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSAXParseDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+ char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
+ int n_encoding;
+ htmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ void * userData; /* if using SAX, this pointer will be provided on callbacks. */
+ int n_userData;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
+ for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlChar_ptr(n_cur, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+ sax = gen_htmlSAXHandlerPtr(n_sax, 2);
+ userData = gen_userdata(n_userData, 3);
+
+ ret_val = htmlSAXParseDoc(cur, (const char *)encoding, sax, userData);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlChar_ptr(n_cur, cur, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ des_htmlSAXHandlerPtr(n_sax, sax, 2);
+ des_userdata(n_userData, userData, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSAXParseDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_sax);
+ printf(" %d", n_userData);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSAXParseFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+ char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
+ int n_encoding;
+ htmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ void * userData; /* if using SAX, this pointer will be provided on callbacks. */
+ int n_userData;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {
+ for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+ sax = gen_htmlSAXHandlerPtr(n_sax, 2);
+ userData = gen_userdata(n_userData, 3);
+
+ ret_val = htmlSAXParseFile(filename, (const char *)encoding, sax, userData);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ des_htmlSAXHandlerPtr(n_sax, sax, 2);
+ des_userdata(n_userData, userData, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSAXParseFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_sax);
+ printf(" %d", n_userData);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlTagLookup(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_HTMLparser(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing HTMLparser : 32 of 38 functions ...\n");
+ test_ret += test_UTF8ToHtml();
+ test_ret += test_htmlAttrAllowed();
+ test_ret += test_htmlAutoCloseTag();
+ test_ret += test_htmlCreateMemoryParserCtxt();
+ test_ret += test_htmlCreatePushParserCtxt();
+ test_ret += test_htmlCtxtReadDoc();
+ test_ret += test_htmlCtxtReadFile();
+ test_ret += test_htmlCtxtReadMemory();
+ test_ret += test_htmlCtxtReset();
+ test_ret += test_htmlCtxtUseOptions();
+ test_ret += test_htmlElementAllowedHere();
+ test_ret += test_htmlElementStatusHere();
+ test_ret += test_htmlEncodeEntities();
+ test_ret += test_htmlEntityLookup();
+ test_ret += test_htmlEntityValueLookup();
+ test_ret += test_htmlHandleOmittedElem();
+ test_ret += test_htmlIsAutoClosed();
+ test_ret += test_htmlIsScriptAttribute();
+ test_ret += test_htmlNewParserCtxt();
+ test_ret += test_htmlNodeStatus();
+ test_ret += test_htmlParseCharRef();
+ test_ret += test_htmlParseChunk();
+ test_ret += test_htmlParseDoc();
+ test_ret += test_htmlParseDocument();
+ test_ret += test_htmlParseElement();
+ test_ret += test_htmlParseEntityRef();
+ test_ret += test_htmlParseFile();
+ test_ret += test_htmlReadDoc();
+ test_ret += test_htmlReadFile();
+ test_ret += test_htmlReadMemory();
+ test_ret += test_htmlSAXParseDoc();
+ test_ret += test_htmlSAXParseFile();
+ test_ret += test_htmlTagLookup();
+
+ if (test_ret != 0)
+ printf("Module HTMLparser: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_htmlDocContentDumpFormatOutput(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr buf; /* the HTML buffer output */
+ int n_buf;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the encoding string */
+ int n_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ format = gen_int(n_format, 3);
+
+ htmlDocContentDumpFormatOutput(buf, cur, (const char *)encoding, format);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDocContentDumpFormatOutput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlDocContentDumpOutput(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr buf; /* the HTML buffer output */
+ int n_buf;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the encoding string */
+ int n_encoding;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+
+ htmlDocContentDumpOutput(buf, cur, (const char *)encoding);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDocContentDumpOutput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlDocDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ FILE * f; /* the FILE* */
+ int n_f;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+
+ for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ f = gen_FILE_ptr(n_f, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+
+ ret_val = htmlDocDump(f, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_f, f, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDocDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_f);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlChar_ptr_ptr 1
+static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_htmlDocDumpMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ xmlChar ** mem; /* OUT: the memory pointer */
+ int n_mem;
+ int * size; /* OUT: the memory length */
+ int n_size;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlDocPtr(n_cur, 0);
+ mem = gen_xmlChar_ptr_ptr(n_mem, 1);
+ size = gen_int_ptr(n_size, 2);
+
+ htmlDocDumpMemory(cur, mem, size);
+ call_tests++;
+ des_xmlDocPtr(n_cur, cur, 0);
+ des_xmlChar_ptr_ptr(n_mem, mem, 1);
+ des_int_ptr(n_size, size, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDocDumpMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlDocDumpMemoryFormat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ xmlChar ** mem; /* OUT: the memory pointer */
+ int n_mem;
+ int * size; /* OUT: the memory length */
+ int n_size;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlDocPtr(n_cur, 0);
+ mem = gen_xmlChar_ptr_ptr(n_mem, 1);
+ size = gen_int_ptr(n_size, 2);
+ format = gen_int(n_format, 3);
+
+ htmlDocDumpMemoryFormat(cur, mem, size, format);
+ call_tests++;
+ des_xmlDocPtr(n_cur, cur, 0);
+ des_xmlChar_ptr_ptr(n_mem, mem, 1);
+ des_int_ptr(n_size, size, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDocDumpMemoryFormat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlGetMetaEncoding(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ htmlDocPtr doc; /* the document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_htmlDocPtr(n_doc, 0);
+
+ ret_val = htmlGetMetaEncoding(doc);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_htmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlGetMetaEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlIsBooleanAttr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * name; /* the name of the attribute to check */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+
+ ret_val = htmlIsBooleanAttr((const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlIsBooleanAttr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNewDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ xmlChar * URI; /* URI for the dtd, or NULL */
+ int n_URI;
+ xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
+ int n_ExternalID;
+
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_const_xmlChar_ptr(n_URI, 0);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
+
+ ret_val = htmlNewDoc((const xmlChar *)URI, (const xmlChar *)ExternalID);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNewDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_ExternalID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNewDocNoDtD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlDocPtr ret_val;
+ xmlChar * URI; /* URI for the dtd, or NULL */
+ int n_URI;
+ xmlChar * ExternalID; /* the external ID of the DTD, or NULL */
+ int n_ExternalID;
+
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_const_xmlChar_ptr(n_URI, 0);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
+
+ ret_val = htmlNewDocNoDtD((const xmlChar *)URI, (const xmlChar *)ExternalID);
+ desret_htmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNewDocNoDtD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_ExternalID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the HTML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+
+ ret_val = htmlNodeDump(buf, doc, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeDumpFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * out; /* the FILE pointer */
+ int n_out;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+
+ for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ out = gen_FILE_ptr(n_out, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+
+ htmlNodeDumpFile(out, doc, cur);
+ call_tests++;
+ des_FILE_ptr(n_out, out, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeDumpFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeDumpFileFormat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ FILE * out; /* the FILE pointer */
+ int n_out;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+ char * encoding; /* the document encoding */
+ int n_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ out = gen_FILE_ptr(n_out, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ format = gen_int(n_format, 4);
+
+ ret_val = htmlNodeDumpFileFormat(out, doc, cur, (const char *)encoding, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_out, out, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_int(n_format, format, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeDumpFileFormat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeDumpFormatOutput(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr buf; /* the HTML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+ char * encoding; /* the encoding string */
+ int n_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ format = gen_int(n_format, 4);
+
+ htmlNodeDumpFormatOutput(buf, doc, cur, (const char *)encoding, format);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_int(n_format, format, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeDumpFormatOutput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlNodeDumpOutput(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr buf; /* the HTML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+ char * encoding; /* the encoding string */
+ int n_encoding;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+
+ htmlNodeDumpOutput(buf, doc, cur, (const char *)encoding);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlNodeDumpOutput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSaveFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename (or URL) */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+
+ ret_val = htmlSaveFile(filename, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSaveFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSaveFileEnc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the document encoding */
+ int n_encoding;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+
+ ret_val = htmlSaveFileEnc(filename, cur, (const char *)encoding);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSaveFileEnc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSaveFileFormat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the document encoding */
+ int n_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ format = gen_int(n_format, 3);
+
+ ret_val = htmlSaveFileFormat(filename, cur, (const char *)encoding, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSaveFileFormat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlSetMetaEncoding(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ int ret_val;
+ htmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * encoding; /* the encoding string */
+ int n_encoding;
+
+ for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_xmlChar_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_htmlDocPtr(n_doc, 0);
+ encoding = gen_const_xmlChar_ptr(n_encoding, 1);
+
+ ret_val = htmlSetMetaEncoding(doc, (const xmlChar *)encoding);
+ desret_int(ret_val);
+ call_tests++;
+ des_htmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_encoding, (const xmlChar *)encoding, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlSetMetaEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_HTMLtree(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing HTMLtree : 18 of 18 functions ...\n");
+ test_ret += test_htmlDocContentDumpFormatOutput();
+ test_ret += test_htmlDocContentDumpOutput();
+ test_ret += test_htmlDocDump();
+ test_ret += test_htmlDocDumpMemory();
+ test_ret += test_htmlDocDumpMemoryFormat();
+ test_ret += test_htmlGetMetaEncoding();
+ test_ret += test_htmlIsBooleanAttr();
+ test_ret += test_htmlNewDoc();
+ test_ret += test_htmlNewDocNoDtD();
+ test_ret += test_htmlNodeDump();
+ test_ret += test_htmlNodeDumpFile();
+ test_ret += test_htmlNodeDumpFileFormat();
+ test_ret += test_htmlNodeDumpFormatOutput();
+ test_ret += test_htmlNodeDumpOutput();
+ test_ret += test_htmlSaveFile();
+ test_ret += test_htmlSaveFileEnc();
+ test_ret += test_htmlSaveFileFormat();
+ test_ret += test_htmlSetMetaEncoding();
+
+ if (test_ret != 0)
+ printf("Module HTMLtree: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_docbDefaultSAXHandlerInit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DOCB_ENABLED)
+#ifdef LIBXML_DOCB_ENABLED
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ docbDefaultSAXHandlerInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in docbDefaultSAXHandlerInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlDefaultSAXHandlerInit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+#ifdef LIBXML_HTML_ENABLED
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ htmlDefaultSAXHandlerInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlDefaultSAXHandlerInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDefaultSAXHandlerInit(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlDefaultSAXHandlerInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDefaultSAXHandlerInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlEnumerationPtr 1
+static xmlEnumerationPtr gen_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, xmlEnumerationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlSAX2AttributeDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * elem; /* the name of the element */
+ int n_elem;
+ xmlChar * fullname; /* the attribute name */
+ int n_fullname;
+ int type; /* the attribute type */
+ int n_type;
+ int def; /* the type of default value */
+ int n_def;
+ xmlChar * defaultValue; /* the attribute default value */
+ int n_defaultValue;
+ xmlEnumerationPtr tree; /* the tree of enumerated value set */
+ int n_tree;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
+ for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_def = 0;n_def < gen_nb_int;n_def++) {
+ for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
+ for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ elem = gen_const_xmlChar_ptr(n_elem, 1);
+ fullname = gen_const_xmlChar_ptr(n_fullname, 2);
+ type = gen_int(n_type, 3);
+ def = gen_int(n_def, 4);
+ defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 5);
+ tree = gen_xmlEnumerationPtr(n_tree, 6);
+
+ xmlSAX2AttributeDecl(ctx, (const xmlChar *)elem, (const xmlChar *)fullname, type, def, (const xmlChar *)defaultValue, tree);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
+ des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 2);
+ des_int(n_type, type, 3);
+ des_int(n_def, def, 4);
+ des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 5);
+ des_xmlEnumerationPtr(n_tree, tree, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2AttributeDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_elem);
+ printf(" %d", n_fullname);
+ printf(" %d", n_type);
+ printf(" %d", n_def);
+ printf(" %d", n_defaultValue);
+ printf(" %d", n_tree);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2CDataBlock(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * value; /* The pcdata content */
+ int n_value;
+ int len; /* the block length */
+ int n_len;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ len = gen_int(n_len, 2);
+
+ xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2CDataBlock",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_value);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2Characters(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * ch; /* a xmlChar string */
+ int n_ch;
+ int len; /* the number of xmlChar */
+ int n_len;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ ch = gen_const_xmlChar_ptr(n_ch, 1);
+ len = gen_int(n_len, 2);
+
+ xmlSAX2Characters(ctx, (const xmlChar *)ch, len);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2Characters",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_ch);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2Comment(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * value; /* the xmlSAX2Comment content */
+ int n_value;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+
+ xmlSAX2Comment(ctx, (const xmlChar *)value);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2Comment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2ElementDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* the element name */
+ int n_name;
+ int type; /* the element type */
+ int n_type;
+ xmlElementContentPtr content; /* the element value tree */
+ int n_content;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_int(n_type, 2);
+ content = gen_xmlElementContentPtr(n_content, 3);
+
+ xmlSAX2ElementDecl(ctx, (const xmlChar *)name, type, content);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_type, type, 2);
+ des_xmlElementContentPtr(n_content, content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2ElementDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2EndDocument(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ xmlSAX2EndDocument(ctx);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2EndDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2EndElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The element name */
+ int n_name;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ xmlSAX2EndElement(ctx, (const xmlChar *)name);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2EndElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2EndElementNs(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * localname; /* the local name of the element */
+ int n_localname;
+ xmlChar * prefix; /* the element namespace prefix if available */
+ int n_prefix;
+ xmlChar * URI; /* the element namespace name if available */
+ int n_URI;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ localname = gen_const_xmlChar_ptr(n_localname, 1);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 2);
+ URI = gen_const_xmlChar_ptr(n_URI, 3);
+
+ xmlSAX2EndElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2EndElementNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_localname);
+ printf(" %d", n_prefix);
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2EntityDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* the entity name */
+ int n_name;
+ int type; /* the entity type */
+ int n_type;
+ xmlChar * publicId; /* The public ID of the entity */
+ int n_publicId;
+ xmlChar * systemId; /* The system ID of the entity */
+ int n_systemId;
+ xmlChar * content; /* the entity value (without processing). */
+ int n_content;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
+ for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
+ for (n_content = 0;n_content < gen_nb_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_int(n_type, 2);
+ publicId = gen_const_xmlChar_ptr(n_publicId, 3);
+ systemId = gen_const_xmlChar_ptr(n_systemId, 4);
+ content = gen_xmlChar_ptr(n_content, 5);
+
+ xmlSAX2EntityDecl(ctx, (const xmlChar *)name, type, (const xmlChar *)publicId, (const xmlChar *)systemId, content);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_type, type, 2);
+ des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 3);
+ des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 4);
+ des_xmlChar_ptr(n_content, content, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2EntityDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_publicId);
+ printf(" %d", n_systemId);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2ExternalSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* the root element name */
+ int n_name;
+ xmlChar * ExternalID; /* the external ID */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
+ int n_SystemID;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
+
+ xmlSAX2ExternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2ExternalSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetColumnNumber(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2GetColumnNumber(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetColumnNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The entity name */
+ int n_name;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlSAX2GetEntity(ctx, (const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetLineNumber(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2GetLineNumber(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetLineNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetParameterEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The entity name */
+ int n_name;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlSAX2GetParameterEntity(ctx, (const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetParameterEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetPublicId(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2GetPublicId(ctx);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetPublicId",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2GetSystemId(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2GetSystemId(ctx);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2GetSystemId",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2HasExternalSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2HasExternalSubset(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2HasExternalSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2HasInternalSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2HasInternalSubset(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2HasInternalSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2IgnorableWhitespace(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * ch; /* a xmlChar string */
+ int n_ch;
+ int len; /* the number of xmlChar */
+ int n_len;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ ch = gen_const_xmlChar_ptr(n_ch, 1);
+ len = gen_int(n_len, 2);
+
+ xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2IgnorableWhitespace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_ch);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlSAXHandler_ptr 1
+static xmlSAXHandler * gen_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlSAX2InitDefaultSAXHandler(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlSAXHandler * hdlr; /* the SAX handler */
+ int n_hdlr;
+ int warning; /* flag if non-zero sets the handler warning procedure */
+ int n_warning;
+
+ for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
+ for (n_warning = 0;n_warning < gen_nb_int;n_warning++) {
+ mem_base = xmlMemBlocks();
+ hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
+ warning = gen_int(n_warning, 1);
+
+ xmlSAX2InitDefaultSAXHandler(hdlr, warning);
+ call_tests++;
+ des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
+ des_int(n_warning, warning, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2InitDefaultSAXHandler",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_hdlr);
+ printf(" %d", n_warning);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2InitDocbDefaultSAXHandler(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DOCB_ENABLED)
+ int mem_base;
+ xmlSAXHandler * hdlr; /* the SAX handler */
+ int n_hdlr;
+
+ for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
+ mem_base = xmlMemBlocks();
+ hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
+
+ xmlSAX2InitDocbDefaultSAXHandler(hdlr);
+ call_tests++;
+ des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2InitDocbDefaultSAXHandler",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_hdlr);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2InitHtmlDefaultSAXHandler(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ xmlSAXHandler * hdlr; /* the SAX handler */
+ int n_hdlr;
+
+ for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
+ mem_base = xmlMemBlocks();
+ hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
+
+ xmlSAX2InitHtmlDefaultSAXHandler(hdlr);
+ call_tests++;
+ des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2InitHtmlDefaultSAXHandler",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_hdlr);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2InternalSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* the root element name */
+ int n_name;
+ xmlChar * ExternalID; /* the external ID */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */
+ int n_SystemID;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
+
+ xmlSAX2InternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2InternalSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2IsStandalone(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ ret_val = xmlSAX2IsStandalone(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2IsStandalone",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2NotationDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The name of the notation */
+ int n_name;
+ xmlChar * publicId; /* The public ID of the entity */
+ int n_publicId;
+ xmlChar * systemId; /* The system ID of the entity */
+ int n_systemId;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
+ for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ publicId = gen_const_xmlChar_ptr(n_publicId, 2);
+ systemId = gen_const_xmlChar_ptr(n_systemId, 3);
+
+ xmlSAX2NotationDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
+ des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2NotationDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_publicId);
+ printf(" %d", n_systemId);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2ProcessingInstruction(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * target; /* the target name */
+ int n_target;
+ xmlChar * data; /* the PI data's */
+ int n_data;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
+ for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ target = gen_const_xmlChar_ptr(n_target, 1);
+ data = gen_const_xmlChar_ptr(n_data, 2);
+
+ xmlSAX2ProcessingInstruction(ctx, (const xmlChar *)target, (const xmlChar *)data);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
+ des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2ProcessingInstruction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_target);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2Reference(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The entity name */
+ int n_name;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ xmlSAX2Reference(ctx, (const xmlChar *)name);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2Reference",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2ResolveEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * publicId; /* The public ID of the entity */
+ int n_publicId;
+ xmlChar * systemId; /* The system ID of the entity */
+ int n_systemId;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
+ for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ publicId = gen_const_xmlChar_ptr(n_publicId, 1);
+ systemId = gen_const_xmlChar_ptr(n_systemId, 2);
+
+ ret_val = xmlSAX2ResolveEntity(ctx, (const xmlChar *)publicId, (const xmlChar *)systemId);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 1);
+ des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2ResolveEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_publicId);
+ printf(" %d", n_systemId);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlSAXLocatorPtr 1
+static xmlSAXLocatorPtr gen_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, xmlSAXLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlSAX2SetDocumentLocator(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlSAXLocatorPtr loc; /* A SAX Locator */
+ int n_loc;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_loc = 0;n_loc < gen_nb_xmlSAXLocatorPtr;n_loc++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ loc = gen_xmlSAXLocatorPtr(n_loc, 1);
+
+ xmlSAX2SetDocumentLocator(ctx, loc);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_xmlSAXLocatorPtr(n_loc, loc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2SetDocumentLocator",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_loc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2StartDocument(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ xmlSAX2StartDocument(ctx);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2StartDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2StartElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * fullname; /* The element name, including namespace prefix */
+ int n_fullname;
+ xmlChar ** atts; /* An array of name/value attributes pairs, NULL terminated */
+ int n_atts;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {
+ for (n_atts = 0;n_atts < gen_nb_const_xmlChar_ptr_ptr;n_atts++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ fullname = gen_const_xmlChar_ptr(n_fullname, 1);
+ atts = gen_const_xmlChar_ptr_ptr(n_atts, 2);
+
+ xmlSAX2StartElement(ctx, (const xmlChar *)fullname, (const xmlChar **)atts);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 1);
+ des_const_xmlChar_ptr_ptr(n_atts, (const xmlChar **)atts, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2StartElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_fullname);
+ printf(" %d", n_atts);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2StartElementNs(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * localname; /* the local name of the element */
+ int n_localname;
+ xmlChar * prefix; /* the element namespace prefix if available */
+ int n_prefix;
+ xmlChar * URI; /* the element namespace name if available */
+ int n_URI;
+ int nb_namespaces; /* number of namespace definitions on that node */
+ int n_nb_namespaces;
+ xmlChar ** namespaces; /* pointer to the array of prefix/URI pairs namespace definitions */
+ int n_namespaces;
+ int nb_attributes; /* the number of attributes on that node */
+ int n_nb_attributes;
+ int nb_defaulted; /* the number of defaulted attributes. */
+ int n_nb_defaulted;
+ xmlChar ** attributes; /* pointer to the array of (localname/prefix/URI/value/end) attribute values. */
+ int n_attributes;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ for (n_nb_namespaces = 0;n_nb_namespaces < gen_nb_int;n_nb_namespaces++) {
+ for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
+ for (n_nb_attributes = 0;n_nb_attributes < gen_nb_int;n_nb_attributes++) {
+ for (n_nb_defaulted = 0;n_nb_defaulted < gen_nb_int;n_nb_defaulted++) {
+ for (n_attributes = 0;n_attributes < gen_nb_const_xmlChar_ptr_ptr;n_attributes++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ localname = gen_const_xmlChar_ptr(n_localname, 1);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 2);
+ URI = gen_const_xmlChar_ptr(n_URI, 3);
+ nb_namespaces = gen_int(n_nb_namespaces, 4);
+ namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 5);
+ nb_attributes = gen_int(n_nb_attributes, 6);
+ nb_defaulted = gen_int(n_nb_defaulted, 7);
+ attributes = gen_const_xmlChar_ptr_ptr(n_attributes, 8);
+
+ xmlSAX2StartElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI, nb_namespaces, (const xmlChar **)namespaces, nb_attributes, nb_defaulted, (const xmlChar **)attributes);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);
+ des_int(n_nb_namespaces, nb_namespaces, 4);
+ des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 5);
+ des_int(n_nb_attributes, nb_attributes, 6);
+ des_int(n_nb_defaulted, nb_defaulted, 7);
+ des_const_xmlChar_ptr_ptr(n_attributes, (const xmlChar **)attributes, 8);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2StartElementNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_localname);
+ printf(" %d", n_prefix);
+ printf(" %d", n_URI);
+ printf(" %d", n_nb_namespaces);
+ printf(" %d", n_namespaces);
+ printf(" %d", n_nb_attributes);
+ printf(" %d", n_nb_defaulted);
+ printf(" %d", n_attributes);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAX2UnparsedEntityDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* the user data (XML parser context) */
+ int n_ctx;
+ xmlChar * name; /* The name of the entity */
+ int n_name;
+ xmlChar * publicId; /* The public ID of the entity */
+ int n_publicId;
+ xmlChar * systemId; /* The system ID of the entity */
+ int n_systemId;
+ xmlChar * notationName; /* the name of the notation */
+ int n_notationName;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {
+ for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {
+ for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ publicId = gen_const_xmlChar_ptr(n_publicId, 2);
+ systemId = gen_const_xmlChar_ptr(n_systemId, 3);
+ notationName = gen_const_xmlChar_ptr(n_notationName, 4);
+
+ xmlSAX2UnparsedEntityDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId, (const xmlChar *)notationName);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);
+ des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);
+ des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAX2UnparsedEntityDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_name);
+ printf(" %d", n_publicId);
+ printf(" %d", n_systemId);
+ printf(" %d", n_notationName);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXDefaultVersion(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ int version; /* the version, 1 or 2 */
+ int n_version;
+
+ for (n_version = 0;n_version < gen_nb_int;n_version++) {
+ mem_base = xmlMemBlocks();
+ version = gen_int(n_version, 0);
+
+ ret_val = xmlSAXDefaultVersion(version);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_version, version, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXDefaultVersion",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_version);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXVersion(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlSAXHandler * hdlr; /* the SAX handler */
+ int n_hdlr;
+ int version; /* the version, 1 or 2 */
+ int n_version;
+
+ for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {
+ for (n_version = 0;n_version < gen_nb_int;n_version++) {
+ mem_base = xmlMemBlocks();
+ hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);
+ version = gen_int(n_version, 1);
+
+ ret_val = xmlSAXVersion(hdlr, version);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);
+ des_int(n_version, version, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXVersion",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_hdlr);
+ printf(" %d", n_version);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_SAX2(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing SAX2 : 38 of 38 functions ...\n");
+ test_ret += test_docbDefaultSAXHandlerInit();
+ test_ret += test_htmlDefaultSAXHandlerInit();
+ test_ret += test_xmlDefaultSAXHandlerInit();
+ test_ret += test_xmlSAX2AttributeDecl();
+ test_ret += test_xmlSAX2CDataBlock();
+ test_ret += test_xmlSAX2Characters();
+ test_ret += test_xmlSAX2Comment();
+ test_ret += test_xmlSAX2ElementDecl();
+ test_ret += test_xmlSAX2EndDocument();
+ test_ret += test_xmlSAX2EndElement();
+ test_ret += test_xmlSAX2EndElementNs();
+ test_ret += test_xmlSAX2EntityDecl();
+ test_ret += test_xmlSAX2ExternalSubset();
+ test_ret += test_xmlSAX2GetColumnNumber();
+ test_ret += test_xmlSAX2GetEntity();
+ test_ret += test_xmlSAX2GetLineNumber();
+ test_ret += test_xmlSAX2GetParameterEntity();
+ test_ret += test_xmlSAX2GetPublicId();
+ test_ret += test_xmlSAX2GetSystemId();
+ test_ret += test_xmlSAX2HasExternalSubset();
+ test_ret += test_xmlSAX2HasInternalSubset();
+ test_ret += test_xmlSAX2IgnorableWhitespace();
+ test_ret += test_xmlSAX2InitDefaultSAXHandler();
+ test_ret += test_xmlSAX2InitDocbDefaultSAXHandler();
+ test_ret += test_xmlSAX2InitHtmlDefaultSAXHandler();
+ test_ret += test_xmlSAX2InternalSubset();
+ test_ret += test_xmlSAX2IsStandalone();
+ test_ret += test_xmlSAX2NotationDecl();
+ test_ret += test_xmlSAX2ProcessingInstruction();
+ test_ret += test_xmlSAX2Reference();
+ test_ret += test_xmlSAX2ResolveEntity();
+ test_ret += test_xmlSAX2SetDocumentLocator();
+ test_ret += test_xmlSAX2StartDocument();
+ test_ret += test_xmlSAX2StartElement();
+ test_ret += test_xmlSAX2StartElementNs();
+ test_ret += test_xmlSAX2UnparsedEntityDecl();
+ test_ret += test_xmlSAXDefaultVersion();
+ test_ret += test_xmlSAXVersion();
+
+ if (test_ret != 0)
+ printf("Module SAX2: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlC14NDocDumpMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the XML document for canonization */
+ int n_doc;
+ xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
+ int n_nodes;
+ int mode; /* the c14n mode (see @xmlC14NMode) */
+ int n_mode;
+ xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
+ int n_inclusive_ns_prefixes;
+ int with_comments; /* include comments in the result (!=0) or not (==0) */
+ int n_with_comments;
+ xmlChar ** doc_txt_ptr; /* the memory pointer for allocated canonical XML text; the caller of this functions is responsible for calling xmlFree() to free allocated memory */
+ int n_doc_txt_ptr;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
+ for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
+ for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
+ for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ nodes = gen_xmlNodeSetPtr(n_nodes, 1);
+ mode = gen_int(n_mode, 2);
+ inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
+ with_comments = gen_int(n_with_comments, 4);
+ doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 5);
+
+ ret_val = xmlC14NDocDumpMemory(doc, nodes, mode, inclusive_ns_prefixes, with_comments, doc_txt_ptr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodeSetPtr(n_nodes, nodes, 1);
+ des_int(n_mode, mode, 2);
+ des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
+ des_int(n_with_comments, with_comments, 4);
+ des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlC14NDocDumpMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_nodes);
+ printf(" %d", n_mode);
+ printf(" %d", n_inclusive_ns_prefixes);
+ printf(" %d", n_with_comments);
+ printf(" %d", n_doc_txt_ptr);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlC14NDocSave(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the XML document for canonization */
+ int n_doc;
+ xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
+ int n_nodes;
+ int mode; /* the c14n mode (see @xmlC14NMode) */
+ int n_mode;
+ xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
+ int n_inclusive_ns_prefixes;
+ int with_comments; /* include comments in the result (!=0) or not (==0) */
+ int n_with_comments;
+ const char * filename; /* the filename to store canonical XML image */
+ int n_filename;
+ int compression; /* the compression level (zlib requred): -1 - libxml default, 0 - uncompressed, >0 - compression level */
+ int n_compression;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
+ for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
+ for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ nodes = gen_xmlNodeSetPtr(n_nodes, 1);
+ mode = gen_int(n_mode, 2);
+ inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
+ with_comments = gen_int(n_with_comments, 4);
+ filename = gen_fileoutput(n_filename, 5);
+ compression = gen_int(n_compression, 6);
+
+ ret_val = xmlC14NDocSave(doc, nodes, mode, inclusive_ns_prefixes, with_comments, filename, compression);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodeSetPtr(n_nodes, nodes, 1);
+ des_int(n_mode, mode, 2);
+ des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
+ des_int(n_with_comments, with_comments, 4);
+ des_fileoutput(n_filename, filename, 5);
+ des_int(n_compression, compression, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlC14NDocSave",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_nodes);
+ printf(" %d", n_mode);
+ printf(" %d", n_inclusive_ns_prefixes);
+ printf(" %d", n_with_comments);
+ printf(" %d", n_filename);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlC14NDocSaveTo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_C14N_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the XML document for canonization */
+ int n_doc;
+ xmlNodeSetPtr nodes; /* the nodes set to be included in the canonized image or NULL if all document nodes should be included */
+ int n_nodes;
+ int mode; /* the c14n mode (see @xmlC14NMode) */
+ int n_mode;
+ xmlChar ** inclusive_ns_prefixes; /* the list of inclusive namespace prefixes ended with a NULL or NULL if there is no inclusive namespaces (only for exclusive canonicalization, ignored otherwise) */
+ int n_inclusive_ns_prefixes;
+ int with_comments; /* include comments in the result (!=0) or not (==0) */
+ int n_with_comments;
+ xmlOutputBufferPtr buf; /* the output buffer to store canonical XML; this buffer MUST have encoder==NULL because C14N requires UTF-8 output */
+ int n_buf;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
+ for (n_inclusive_ns_prefixes = 0;n_inclusive_ns_prefixes < gen_nb_xmlChar_ptr_ptr;n_inclusive_ns_prefixes++) {
+ for (n_with_comments = 0;n_with_comments < gen_nb_int;n_with_comments++) {
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ nodes = gen_xmlNodeSetPtr(n_nodes, 1);
+ mode = gen_int(n_mode, 2);
+ inclusive_ns_prefixes = gen_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, 3);
+ with_comments = gen_int(n_with_comments, 4);
+ buf = gen_xmlOutputBufferPtr(n_buf, 5);
+
+ ret_val = xmlC14NDocSaveTo(doc, nodes, mode, inclusive_ns_prefixes, with_comments, buf);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodeSetPtr(n_nodes, nodes, 1);
+ des_int(n_mode, mode, 2);
+ des_xmlChar_ptr_ptr(n_inclusive_ns_prefixes, inclusive_ns_prefixes, 3);
+ des_int(n_with_comments, with_comments, 4);
+ des_xmlOutputBufferPtr(n_buf, buf, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlC14NDocSaveTo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_nodes);
+ printf(" %d", n_mode);
+ printf(" %d", n_inclusive_ns_prefixes);
+ printf(" %d", n_with_comments);
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlC14NExecute(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_c14n(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing c14n : 3 of 4 functions ...\n");
+ test_ret += test_xmlC14NDocDumpMemory();
+ test_ret += test_xmlC14NDocSave();
+ test_ret += test_xmlC14NDocSaveTo();
+ test_ret += test_xmlC14NExecute();
+
+ if (test_ret != 0)
+ printf("Module c14n: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_CATALOG_ENABLED
+
+#define gen_nb_xmlCatalogPtr 1
+static xmlCatalogPtr gen_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlCatalogPtr(int no ATTRIBUTE_UNUSED, xmlCatalogPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlACatalogAdd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * type; /* the type of record to add to the catalog */
+ int n_type;
+ xmlChar * orig; /* the system, public or prefix to match */
+ int n_orig;
+ xmlChar * replace; /* the replacement value for the match */
+ int n_replace;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
+ for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
+ for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ type = gen_const_xmlChar_ptr(n_type, 1);
+ orig = gen_const_xmlChar_ptr(n_orig, 2);
+ replace = gen_const_xmlChar_ptr(n_replace, 3);
+
+ ret_val = xmlACatalogAdd(catal, (const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 1);
+ des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 2);
+ des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogAdd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_type);
+ printf(" %d", n_orig);
+ printf(" %d", n_replace);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ FILE * out; /* the file. */
+ int n_out;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ out = gen_FILE_ptr(n_out, 1);
+
+ xmlACatalogDump(catal, out);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_FILE_ptr(n_out, out, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogRemove(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * value; /* the value to remove */
+ int n_value;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+
+ ret_val = xmlACatalogRemove(catal, (const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogRemove",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogResolve(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * pubID; /* the public ID string */
+ int n_pubID;
+ xmlChar * sysID; /* the system ID string */
+ int n_sysID;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
+ for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ pubID = gen_const_xmlChar_ptr(n_pubID, 1);
+ sysID = gen_const_xmlChar_ptr(n_sysID, 2);
+
+ ret_val = xmlACatalogResolve(catal, (const xmlChar *)pubID, (const xmlChar *)sysID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
+ des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogResolve",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_pubID);
+ printf(" %d", n_sysID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogResolvePublic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * pubID; /* the public ID string */
+ int n_pubID;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ pubID = gen_const_xmlChar_ptr(n_pubID, 1);
+
+ ret_val = xmlACatalogResolvePublic(catal, (const xmlChar *)pubID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogResolvePublic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_pubID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogResolveSystem(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * sysID; /* the system ID string */
+ int n_sysID;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ sysID = gen_const_xmlChar_ptr(n_sysID, 1);
+
+ ret_val = xmlACatalogResolveSystem(catal, (const xmlChar *)sysID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogResolveSystem",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_sysID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlACatalogResolveURI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlCatalogPtr catal; /* a Catalog */
+ int n_catal;
+ xmlChar * URI; /* the URI */
+ int n_URI;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+ URI = gen_const_xmlChar_ptr(n_URI, 1);
+
+ ret_val = xmlACatalogResolveURI(catal, (const xmlChar *)URI);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlACatalogResolveURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogAdd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * type; /* the type of record to add to the catalog */
+ int n_type;
+ xmlChar * orig; /* the system, public or prefix to match */
+ int n_orig;
+ xmlChar * replace; /* the replacement value for the match */
+ int n_replace;
+
+ for (n_type = 0;n_type < gen_nb_const_xmlChar_ptr;n_type++) {
+ for (n_orig = 0;n_orig < gen_nb_const_xmlChar_ptr;n_orig++) {
+ for (n_replace = 0;n_replace < gen_nb_const_xmlChar_ptr;n_replace++) {
+ mem_base = xmlMemBlocks();
+ type = gen_const_xmlChar_ptr(n_type, 0);
+ orig = gen_const_xmlChar_ptr(n_orig, 1);
+ replace = gen_const_xmlChar_ptr(n_replace, 2);
+
+ ret_val = xmlCatalogAdd((const xmlChar *)type, (const xmlChar *)orig, (const xmlChar *)replace);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_type, (const xmlChar *)type, 0);
+ des_const_xmlChar_ptr(n_orig, (const xmlChar *)orig, 1);
+ des_const_xmlChar_ptr(n_replace, (const xmlChar *)replace, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogAdd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_orig);
+ printf(" %d", n_replace);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+
+
+ xmlCatalogCleanup();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogConvert(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int ret_val;
+
+
+ ret_val = xmlCatalogConvert();
+ desret_int(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * out; /* the file. */
+ int n_out;
+
+ for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {
+ mem_base = xmlMemBlocks();
+ out = gen_FILE_ptr(n_out, 0);
+
+ xmlCatalogDump(out);
+ call_tests++;
+ des_FILE_ptr(n_out, out, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogGetDefaults(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlCatalogAllow ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlCatalogGetDefaults();
+ desret_xmlCatalogAllow(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogGetDefaults",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogIsEmpty(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlCatalogPtr catal; /* should this create an SGML catalog */
+ int n_catal;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+
+ ret_val = xmlCatalogIsEmpty(catal);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogIsEmpty",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogLocalResolve(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ void * catalogs; /* a document's list of catalogs */
+ int n_catalogs;
+ xmlChar * pubID; /* the public ID string */
+ int n_pubID;
+ xmlChar * sysID; /* the system ID string */
+ int n_sysID;
+
+ for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
+ for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
+ for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
+ mem_base = xmlMemBlocks();
+ catalogs = gen_void_ptr(n_catalogs, 0);
+ pubID = gen_const_xmlChar_ptr(n_pubID, 1);
+ sysID = gen_const_xmlChar_ptr(n_sysID, 2);
+
+ ret_val = xmlCatalogLocalResolve(catalogs, (const xmlChar *)pubID, (const xmlChar *)sysID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_void_ptr(n_catalogs, catalogs, 0);
+ des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 1);
+ des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogLocalResolve",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catalogs);
+ printf(" %d", n_pubID);
+ printf(" %d", n_sysID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogLocalResolveURI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ void * catalogs; /* a document's list of catalogs */
+ int n_catalogs;
+ xmlChar * URI; /* the URI */
+ int n_URI;
+
+ for (n_catalogs = 0;n_catalogs < gen_nb_void_ptr;n_catalogs++) {
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ mem_base = xmlMemBlocks();
+ catalogs = gen_void_ptr(n_catalogs, 0);
+ URI = gen_const_xmlChar_ptr(n_URI, 1);
+
+ ret_val = xmlCatalogLocalResolveURI(catalogs, (const xmlChar *)URI);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_void_ptr(n_catalogs, catalogs, 0);
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogLocalResolveURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catalogs);
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogRemove(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int ret_val;
+ xmlChar * value; /* the value to remove */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlCatalogRemove((const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogResolve(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ xmlChar * ret_val;
+ xmlChar * pubID; /* the public ID string */
+ int n_pubID;
+ xmlChar * sysID; /* the system ID string */
+ int n_sysID;
+
+ for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
+ for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
+ pubID = gen_const_xmlChar_ptr(n_pubID, 0);
+ sysID = gen_const_xmlChar_ptr(n_sysID, 1);
+
+ ret_val = xmlCatalogResolve((const xmlChar *)pubID, (const xmlChar *)sysID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
+ des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 1);
+ xmlResetLastError();
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogResolvePublic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * pubID; /* the public ID string */
+ int n_pubID;
+
+ for (n_pubID = 0;n_pubID < gen_nb_const_xmlChar_ptr;n_pubID++) {
+ mem_base = xmlMemBlocks();
+ pubID = gen_const_xmlChar_ptr(n_pubID, 0);
+
+ ret_val = xmlCatalogResolvePublic((const xmlChar *)pubID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_pubID, (const xmlChar *)pubID, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogResolvePublic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_pubID);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogResolveSystem(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * sysID; /* the system ID string */
+ int n_sysID;
+
+ for (n_sysID = 0;n_sysID < gen_nb_const_xmlChar_ptr;n_sysID++) {
+ mem_base = xmlMemBlocks();
+ sysID = gen_const_xmlChar_ptr(n_sysID, 0);
+
+ ret_val = xmlCatalogResolveSystem((const xmlChar *)sysID);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_sysID, (const xmlChar *)sysID, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogResolveSystem",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sysID);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogResolveURI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * URI; /* the URI */
+ int n_URI;
+
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_const_xmlChar_ptr(n_URI, 0);
+
+ ret_val = xmlCatalogResolveURI((const xmlChar *)URI);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogResolveURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogSetDefaultPrefer(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlCatalogPrefer ret_val;
+ xmlCatalogPrefer prefer; /* the default preference for delegation */
+ int n_prefer;
+
+ for (n_prefer = 0;n_prefer < gen_nb_xmlCatalogPrefer;n_prefer++) {
+ mem_base = xmlMemBlocks();
+ prefer = gen_xmlCatalogPrefer(n_prefer, 0);
+
+ ret_val = xmlCatalogSetDefaultPrefer(prefer);
+ desret_xmlCatalogPrefer(ret_val);
+ call_tests++;
+ des_xmlCatalogPrefer(n_prefer, prefer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogSetDefaultPrefer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_prefer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCatalogSetDefaults(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlCatalogAllow allow; /* what catalogs should be accepted */
+ int n_allow;
+
+ for (n_allow = 0;n_allow < gen_nb_xmlCatalogAllow;n_allow++) {
+ mem_base = xmlMemBlocks();
+ allow = gen_xmlCatalogAllow(n_allow, 0);
+
+ xmlCatalogSetDefaults(allow);
+ call_tests++;
+ des_xmlCatalogAllow(n_allow, allow, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCatalogSetDefaults",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_allow);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlConvertSGMLCatalog(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlCatalogPtr catal; /* the catalog */
+ int n_catal;
+
+ for (n_catal = 0;n_catal < gen_nb_xmlCatalogPtr;n_catal++) {
+ mem_base = xmlMemBlocks();
+ catal = gen_xmlCatalogPtr(n_catal, 0);
+
+ ret_val = xmlConvertSGMLCatalog(catal);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCatalogPtr(n_catal, catal, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlConvertSGMLCatalog",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_catal);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitializeCatalog(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlInitializeCatalog();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitializeCatalog",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLoadACatalog(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlLoadCatalog(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int ret_val;
+ const char * filename; /* a file path */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlLoadCatalog(filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLoadCatalogs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ char * pathss; /* a list of directories separated by a colon or a space. */
+ int n_pathss;
+
+ for (n_pathss = 0;n_pathss < gen_nb_const_char_ptr;n_pathss++) {
+ pathss = gen_const_char_ptr(n_pathss, 0);
+
+ xmlLoadCatalogs((const char *)pathss);
+ call_tests++;
+ des_const_char_ptr(n_pathss, (const char *)pathss, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLoadSGMLSuperCatalog(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewCatalog(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseCatalogFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_CATALOG_ENABLED)
+ int mem_base;
+ xmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlParseCatalogFile(filename);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseCatalogFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_catalog(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing catalog : 27 of 36 functions ...\n");
+ test_ret += test_xmlACatalogAdd();
+ test_ret += test_xmlACatalogDump();
+ test_ret += test_xmlACatalogRemove();
+ test_ret += test_xmlACatalogResolve();
+ test_ret += test_xmlACatalogResolvePublic();
+ test_ret += test_xmlACatalogResolveSystem();
+ test_ret += test_xmlACatalogResolveURI();
+ test_ret += test_xmlCatalogAdd();
+ test_ret += test_xmlCatalogCleanup();
+ test_ret += test_xmlCatalogConvert();
+ test_ret += test_xmlCatalogDump();
+ test_ret += test_xmlCatalogGetDefaults();
+ test_ret += test_xmlCatalogIsEmpty();
+ test_ret += test_xmlCatalogLocalResolve();
+ test_ret += test_xmlCatalogLocalResolveURI();
+ test_ret += test_xmlCatalogRemove();
+ test_ret += test_xmlCatalogResolve();
+ test_ret += test_xmlCatalogResolvePublic();
+ test_ret += test_xmlCatalogResolveSystem();
+ test_ret += test_xmlCatalogResolveURI();
+ test_ret += test_xmlCatalogSetDefaultPrefer();
+ test_ret += test_xmlCatalogSetDefaults();
+ test_ret += test_xmlConvertSGMLCatalog();
+ test_ret += test_xmlInitializeCatalog();
+ test_ret += test_xmlLoadACatalog();
+ test_ret += test_xmlLoadCatalog();
+ test_ret += test_xmlLoadCatalogs();
+ test_ret += test_xmlLoadSGMLSuperCatalog();
+ test_ret += test_xmlNewCatalog();
+ test_ret += test_xmlParseCatalogFile();
+
+ if (test_ret != 0)
+ printf("Module catalog: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+#define gen_nb_const_xmlChRangeGroup_ptr 1
+static xmlChRangeGroup * gen_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlChRangeGroup_ptr(int no ATTRIBUTE_UNUSED, const xmlChRangeGroup * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCharInRange(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int val; /* character to be validated */
+ int n_val;
+ xmlChRangeGroup * rptr; /* pointer to range to be used to validate */
+ int n_rptr;
+
+ for (n_val = 0;n_val < gen_nb_unsigned_int;n_val++) {
+ for (n_rptr = 0;n_rptr < gen_nb_const_xmlChRangeGroup_ptr;n_rptr++) {
+ mem_base = xmlMemBlocks();
+ val = gen_unsigned_int(n_val, 0);
+ rptr = gen_const_xmlChRangeGroup_ptr(n_rptr, 1);
+
+ ret_val = xmlCharInRange(val, (const xmlChRangeGroup *)rptr);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_val, val, 0);
+ des_const_xmlChRangeGroup_ptr(n_rptr, (const xmlChRangeGroup *)rptr, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharInRange",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf(" %d", n_rptr);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsBaseChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsBaseChar(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsBaseChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsBlank(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsBlank(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsBlank",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsChar(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsCombining(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsCombining(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsCombining",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsDigit(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsDigit(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsDigit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsExtender(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsExtender(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsExtender",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsIdeographic(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsIdeographic(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsIdeographic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsPubidChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned int ch; /* character to validate */
+ int n_ch;
+
+ for (n_ch = 0;n_ch < gen_nb_unsigned_int;n_ch++) {
+ mem_base = xmlMemBlocks();
+ ch = gen_unsigned_int(n_ch, 0);
+
+ ret_val = xmlIsPubidChar(ch);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_int(n_ch, ch, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsPubidChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ch);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_chvalid(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing chvalid : 9 of 9 functions ...\n");
+ test_ret += test_xmlCharInRange();
+ test_ret += test_xmlIsBaseChar();
+ test_ret += test_xmlIsBlank();
+ test_ret += test_xmlIsChar();
+ test_ret += test_xmlIsCombining();
+ test_ret += test_xmlIsDigit();
+ test_ret += test_xmlIsExtender();
+ test_ret += test_xmlIsIdeographic();
+ test_ret += test_xmlIsPubidChar();
+
+ if (test_ret != 0)
+ printf("Module chvalid: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlBoolToText(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ const char * ret_val;
+ int boolval; /* a bool to turn into text */
+ int n_boolval;
+
+ for (n_boolval = 0;n_boolval < gen_nb_int;n_boolval++) {
+ mem_base = xmlMemBlocks();
+ boolval = gen_int(n_boolval, 0);
+
+ ret_val = xmlBoolToText(boolval);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_int(n_boolval, boolval, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBoolToText",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_boolval);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugCheckDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ int ret_val;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlDebugCheckDocument(output, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugCheckDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpAttr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlAttrPtr attr; /* the attribute */
+ int n_attr;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ attr = gen_xmlAttrPtr(n_attr, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlDebugDumpAttr(output, attr, depth);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlAttrPtr(n_attr, attr, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpAttr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_attr);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpAttrList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlAttrPtr attr; /* the attribute list */
+ int n_attr;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ attr = gen_xmlAttrPtr(n_attr, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlDebugDumpAttrList(output, attr, depth);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlAttrPtr(n_attr, attr, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpAttrList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_attr);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlDtdPtr dtd; /* the DTD */
+ int n_dtd;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ dtd = gen_xmlDtdPtr(n_dtd, 1);
+
+ xmlDebugDumpDTD(output, dtd);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlDtdPtr(n_dtd, dtd, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_dtd);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ xmlDebugDumpDocument(output, doc);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpDocumentHead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ xmlDebugDumpDocumentHead(output, doc);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpDocumentHead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpEntities(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ xmlDebugDumpEntities(output, doc);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlDebugDumpNode(output, node, depth);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_node);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpNodeList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlNodePtr node; /* the node list */
+ int n_node;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlDebugDumpNodeList(output, node, depth);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_node);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpOneNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlDebugDumpOneNode(output, node, depth);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpOneNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_node);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDebugDumpString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlChar * str; /* the string */
+ int n_str;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+
+ xmlDebugDumpString(output, (const xmlChar *)str);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDebugDumpString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLsCountNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node to count */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlLsCountNode(node);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLsCountNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLsOneNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlNodePtr node; /* the node to dump */
+ int n_node;
+
+ for (n_output = 0;n_output < gen_nb_debug_FILE_ptr;n_output++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ output = gen_debug_FILE_ptr(n_output, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ xmlLsOneNode(output, node);
+ call_tests++;
+ des_debug_FILE_ptr(n_output, output, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLsOneNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_char_ptr 1
+static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlShell(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellBase(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * arg; /* unused */
+ int n_arg;
+ xmlNodePtr node; /* a node */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ arg = gen_char_ptr(n_arg, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellBase(ctxt, arg, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_arg, arg, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellBase",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_arg);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellCat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * arg; /* unused */
+ int n_arg;
+ xmlNodePtr node; /* a node */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ arg = gen_char_ptr(n_arg, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellCat(ctxt, arg, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_arg, arg, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellCat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_arg);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellDir(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * arg; /* unused */
+ int n_arg;
+ xmlNodePtr node; /* a node */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ arg = gen_char_ptr(n_arg, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellDir(ctxt, arg, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_arg, arg, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellDir",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_arg);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellDu(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * arg; /* unused */
+ int n_arg;
+ xmlNodePtr tree; /* a node defining a subtree */
+ int n_tree;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
+ for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ arg = gen_char_ptr(n_arg, 1);
+ tree = gen_xmlNodePtr(n_tree, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellDu(ctxt, arg, tree, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_arg, arg, 1);
+ des_xmlNodePtr(n_tree, tree, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellDu",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_arg);
+ printf(" %d", n_tree);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * arg; /* unused */
+ int n_arg;
+ xmlNodePtr node; /* a node */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_arg = 0;n_arg < gen_nb_char_ptr;n_arg++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ arg = gen_char_ptr(n_arg, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellList(ctxt, arg, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_arg, arg, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_arg);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellLoad(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * filename; /* the file name */
+ int n_filename;
+ xmlNodePtr node; /* unused */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ filename = gen_char_ptr(n_filename, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellLoad(ctxt, filename, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_filename, filename, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellLoad",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellPrintXPathResult(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr list; /* a valid result generated by an xpath evaluation */
+ int n_list;
+
+ for (n_list = 0;n_list < gen_nb_xmlXPathObjectPtr;n_list++) {
+ mem_base = xmlMemBlocks();
+ list = gen_xmlXPathObjectPtr(n_list, 0);
+
+ xmlShellPrintXPathResult(list);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_list, list, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellPrintXPathResult",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_list);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellPwd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * buffer; /* the output buffer */
+ int n_buffer;
+ xmlNodePtr node; /* a node */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ buffer = gen_char_ptr(n_buffer, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellPwd(ctxt, buffer, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_buffer, buffer, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellPwd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_buffer);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellSave(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * filename; /* the file name (optional) */
+ int n_filename;
+ xmlNodePtr node; /* unused */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ filename = gen_char_ptr(n_filename, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellSave(ctxt, filename, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_filename, filename, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellSave",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellValidate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * dtd; /* the DTD URI (optional) */
+ int n_dtd;
+ xmlNodePtr node; /* unused */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_dtd = 0;n_dtd < gen_nb_char_ptr;n_dtd++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ dtd = gen_char_ptr(n_dtd, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellValidate(ctxt, dtd, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_dtd, dtd, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellValidate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_dtd);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlShellWrite(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_DEBUG_ENABLED) && defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlShellCtxtPtr ctxt; /* the shell context */
+ int n_ctxt;
+ char * filename; /* the file name */
+ int n_filename;
+ xmlNodePtr node; /* a node in the tree */
+ int n_node;
+ xmlNodePtr node2; /* unused */
+ int n_node2;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlShellCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_char_ptr;n_filename++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlShellCtxtPtr(n_ctxt, 0);
+ filename = gen_char_ptr(n_filename, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ node2 = gen_xmlNodePtr(n_node2, 3);
+
+ ret_val = xmlShellWrite(ctxt, filename, node, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlShellCtxtPtr(n_ctxt, ctxt, 0);
+ des_char_ptr(n_filename, filename, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr(n_node2, node2, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlShellWrite",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf(" %d", n_node);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_debugXML(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing debugXML : 25 of 28 functions ...\n");
+ test_ret += test_xmlBoolToText();
+ test_ret += test_xmlDebugCheckDocument();
+ test_ret += test_xmlDebugDumpAttr();
+ test_ret += test_xmlDebugDumpAttrList();
+ test_ret += test_xmlDebugDumpDTD();
+ test_ret += test_xmlDebugDumpDocument();
+ test_ret += test_xmlDebugDumpDocumentHead();
+ test_ret += test_xmlDebugDumpEntities();
+ test_ret += test_xmlDebugDumpNode();
+ test_ret += test_xmlDebugDumpNodeList();
+ test_ret += test_xmlDebugDumpOneNode();
+ test_ret += test_xmlDebugDumpString();
+ test_ret += test_xmlLsCountNode();
+ test_ret += test_xmlLsOneNode();
+ test_ret += test_xmlShell();
+ test_ret += test_xmlShellBase();
+ test_ret += test_xmlShellCat();
+ test_ret += test_xmlShellDir();
+ test_ret += test_xmlShellDu();
+ test_ret += test_xmlShellList();
+ test_ret += test_xmlShellLoad();
+ test_ret += test_xmlShellPrintXPathResult();
+ test_ret += test_xmlShellPwd();
+ test_ret += test_xmlShellSave();
+ test_ret += test_xmlShellValidate();
+ test_ret += test_xmlShellWrite();
+
+ if (test_ret != 0)
+ printf("Module debugXML: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlDictCleanup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlDictCleanup();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictCreate(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDictPtr ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlDictCreate();
+ desret_xmlDictPtr(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictCreate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictCreateSub(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDictPtr ret_val;
+ xmlDictPtr sub; /* an existing dictionnary */
+ int n_sub;
+
+ for (n_sub = 0;n_sub < gen_nb_xmlDictPtr;n_sub++) {
+ mem_base = xmlMemBlocks();
+ sub = gen_xmlDictPtr(n_sub, 0);
+
+ ret_val = xmlDictCreateSub(sub);
+ desret_xmlDictPtr(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_sub, sub, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictCreateSub",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sub);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictExists(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ int len; /* the length of the name, if -1 it is recomputed */
+ int n_len;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlDictExists(dict, (const xmlChar *)name, len);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictExists",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf(" %d", n_name);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictGetUsage(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictLookup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ int len; /* the length of the name, if -1 it is recomputed */
+ int n_len;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlDictLookup(dict, (const xmlChar *)name, len);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf(" %d", n_name);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictOwns(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+ xmlChar * str; /* the string */
+ int n_str;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+
+ ret_val = xmlDictOwns(dict, (const xmlChar *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictOwns",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictQLookup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+ xmlChar * prefix; /* the prefix */
+ int n_prefix;
+ xmlChar * name; /* the name */
+ int n_name;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+
+ ret_val = xmlDictQLookup(dict, (const xmlChar *)prefix, (const xmlChar *)name);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictQLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictReference(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+
+ ret_val = xmlDictReference(dict);
+ xmlDictFree(dict);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictReference",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictSetLimit(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlDictSize(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDictPtr dict; /* the dictionnary */
+ int n_dict;
+
+ for (n_dict = 0;n_dict < gen_nb_xmlDictPtr;n_dict++) {
+ mem_base = xmlMemBlocks();
+ dict = gen_xmlDictPtr(n_dict, 0);
+
+ ret_val = xmlDictSize(dict);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDictPtr(n_dict, dict, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDictSize",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dict);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitializeDict(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlInitializeDict();
+ desret_int(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitializeDict",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_dict(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing dict : 10 of 13 functions ...\n");
+ test_ret += test_xmlDictCleanup();
+ test_ret += test_xmlDictCreate();
+ test_ret += test_xmlDictCreateSub();
+ test_ret += test_xmlDictExists();
+ test_ret += test_xmlDictGetUsage();
+ test_ret += test_xmlDictLookup();
+ test_ret += test_xmlDictOwns();
+ test_ret += test_xmlDictQLookup();
+ test_ret += test_xmlDictReference();
+ test_ret += test_xmlDictSetLimit();
+ test_ret += test_xmlDictSize();
+ test_ret += test_xmlInitializeDict();
+
+ if (test_ret != 0)
+ printf("Module dict: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_UTF8Toisolat1(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef LIBXML_OUTPUT_ENABLED
+ int mem_base;
+ int ret_val;
+ unsigned char * out; /* a pointer to an array of bytes to store the result */
+ int n_out;
+ int * outlen; /* the length of @out */
+ int n_outlen;
+ unsigned char * in; /* a pointer to an array of UTF-8 chars */
+ int n_in;
+ int * inlen; /* the length of @in */
+ int n_inlen;
+
+ for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
+ for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
+ for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
+ for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
+ mem_base = xmlMemBlocks();
+ out = gen_unsigned_char_ptr(n_out, 0);
+ outlen = gen_int_ptr(n_outlen, 1);
+ in = gen_const_unsigned_char_ptr(n_in, 2);
+ inlen = gen_int_ptr(n_inlen, 3);
+
+ ret_val = UTF8Toisolat1(out, outlen, (const unsigned char *)in, inlen);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_char_ptr(n_out, out, 0);
+ des_int_ptr(n_outlen, outlen, 1);
+ des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
+ des_int_ptr(n_inlen, inlen, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in UTF8Toisolat1",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_outlen);
+ printf(" %d", n_in);
+ printf(" %d", n_inlen);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_isolat1ToUTF8(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned char * out; /* a pointer to an array of bytes to store the result */
+ int n_out;
+ int * outlen; /* the length of @out */
+ int n_outlen;
+ unsigned char * in; /* a pointer to an array of ISO Latin 1 chars */
+ int n_in;
+ int * inlen; /* the length of @in */
+ int n_inlen;
+
+ for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {
+ for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {
+ for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
+ for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {
+ mem_base = xmlMemBlocks();
+ out = gen_unsigned_char_ptr(n_out, 0);
+ outlen = gen_int_ptr(n_outlen, 1);
+ in = gen_const_unsigned_char_ptr(n_in, 2);
+ inlen = gen_int_ptr(n_inlen, 3);
+
+ ret_val = isolat1ToUTF8(out, outlen, (const unsigned char *)in, inlen);
+ desret_int(ret_val);
+ call_tests++;
+ des_unsigned_char_ptr(n_out, out, 0);
+ des_int_ptr(n_outlen, outlen, 1);
+ des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);
+ des_int_ptr(n_inlen, inlen, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in isolat1ToUTF8",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_outlen);
+ printf(" %d", n_in);
+ printf(" %d", n_inlen);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddEncodingAlias(void) {
+ int test_ret = 0;
+
+ int ret_val;
+ char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
+ int n_name;
+ char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
+ int n_alias;
+
+ for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
+ for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
+ name = gen_const_char_ptr(n_name, 0);
+ alias = gen_const_char_ptr(n_alias, 1);
+
+ ret_val = xmlAddEncodingAlias((const char *)name, (const char *)alias);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_name, (const char *)name, 0);
+ des_const_char_ptr(n_alias, (const char *)alias, 1);
+ xmlResetLastError();
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlCharEncodingHandler_ptr 1
+static xmlCharEncodingHandler * gen_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlCharEncodingHandler_ptr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCharEncCloseFunc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+ int n_handler;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
+
+ ret_val = xmlCharEncCloseFunc(handler);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharEncCloseFunc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCharEncFirstLine(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+ int n_handler;
+ xmlBufferPtr out; /* an xmlBuffer for the output. */
+ int n_out;
+ xmlBufferPtr in; /* an xmlBuffer for the input */
+ int n_in;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
+ for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
+ for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
+ out = gen_xmlBufferPtr(n_out, 1);
+ in = gen_xmlBufferPtr(n_in, 2);
+
+ ret_val = xmlCharEncFirstLine(handler, out, in);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
+ des_xmlBufferPtr(n_out, out, 1);
+ des_xmlBufferPtr(n_in, in, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharEncFirstLine",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf(" %d", n_out);
+ printf(" %d", n_in);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCharEncInFunc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlCharEncodingHandler * handler; /* char encoding transformation data structure */
+ int n_handler;
+ xmlBufferPtr out; /* an xmlBuffer for the output. */
+ int n_out;
+ xmlBufferPtr in; /* an xmlBuffer for the input */
+ int n_in;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
+ for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
+ for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
+ out = gen_xmlBufferPtr(n_out, 1);
+ in = gen_xmlBufferPtr(n_in, 2);
+
+ ret_val = xmlCharEncInFunc(handler, out, in);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
+ des_xmlBufferPtr(n_out, out, 1);
+ des_xmlBufferPtr(n_in, in, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharEncInFunc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf(" %d", n_out);
+ printf(" %d", n_in);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCharEncOutFunc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlCharEncodingHandler * handler; /* char enconding transformation data structure */
+ int n_handler;
+ xmlBufferPtr out; /* an xmlBuffer for the output. */
+ int n_out;
+ xmlBufferPtr in; /* an xmlBuffer for the input */
+ int n_in;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandler_ptr;n_handler++) {
+ for (n_out = 0;n_out < gen_nb_xmlBufferPtr;n_out++) {
+ for (n_in = 0;n_in < gen_nb_xmlBufferPtr;n_in++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlCharEncodingHandler_ptr(n_handler, 0);
+ out = gen_xmlBufferPtr(n_out, 1);
+ in = gen_xmlBufferPtr(n_in, 2);
+
+ ret_val = xmlCharEncOutFunc(handler, out, in);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlCharEncodingHandler_ptr(n_handler, handler, 0);
+ des_xmlBufferPtr(n_out, out, 1);
+ des_xmlBufferPtr(n_in, in, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharEncOutFunc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf(" %d", n_out);
+ printf(" %d", n_in);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCleanupCharEncodingHandlers(void) {
+ int test_ret = 0;
+
+
+
+ xmlCleanupCharEncodingHandlers();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCleanupEncodingAliases(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlCleanupEncodingAliases();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCleanupEncodingAliases",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDelEncodingAlias(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
+ int n_alias;
+
+ for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
+ mem_base = xmlMemBlocks();
+ alias = gen_const_char_ptr(n_alias, 0);
+
+ ret_val = xmlDelEncodingAlias((const char *)alias);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_alias, (const char *)alias, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDelEncodingAlias",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_alias);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDetectCharEncoding(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlCharEncoding ret_val;
+ unsigned char * in; /* a pointer to the first bytes of the XML entity, must be at least 2 bytes long (at least 4 if encoding is UTF4 variant). */
+ int n_in;
+ int len; /* pointer to the length of the buffer */
+ int n_len;
+
+ for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ in = gen_const_unsigned_char_ptr(n_in, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlDetectCharEncoding((const unsigned char *)in, len);
+ desret_xmlCharEncoding(ret_val);
+ call_tests++;
+ des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDetectCharEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFindCharEncodingHandler(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetCharEncodingHandler(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetCharEncodingName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const char * ret_val;
+ xmlCharEncoding enc; /* the encoding */
+ int n_enc;
+
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ enc = gen_xmlCharEncoding(n_enc, 0);
+
+ ret_val = xmlGetCharEncodingName(enc);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_xmlCharEncoding(n_enc, enc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetCharEncodingName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetEncodingAlias(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const char * ret_val;
+ char * alias; /* the alias name as parsed, in UTF-8 format (ASCII actually) */
+ int n_alias;
+
+ for (n_alias = 0;n_alias < gen_nb_const_char_ptr;n_alias++) {
+ mem_base = xmlMemBlocks();
+ alias = gen_const_char_ptr(n_alias, 0);
+
+ ret_val = xmlGetEncodingAlias((const char *)alias);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_alias, (const char *)alias, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetEncodingAlias",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_alias);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitCharEncodingHandlers(void) {
+ int test_ret = 0;
+
+
+
+ xmlInitCharEncodingHandlers();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewCharEncodingHandler(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseCharEncoding(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlCharEncoding ret_val;
+ char * name; /* the encoding name as parsed, in UTF-8 format (ASCII actually) */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_char_ptr(n_name, 0);
+
+ ret_val = xmlParseCharEncoding((const char *)name);
+ desret_xmlCharEncoding(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_name, (const char *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseCharEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlCharEncodingHandlerPtr 1
+static xmlCharEncodingHandlerPtr gen_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlCharEncodingHandlerPtr(int no ATTRIBUTE_UNUSED, xmlCharEncodingHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlRegisterCharEncodingHandler(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlCharEncodingHandlerPtr handler; /* the xmlCharEncodingHandlerPtr handler block */
+ int n_handler;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlCharEncodingHandlerPtr(n_handler, 0);
+
+ xmlRegisterCharEncodingHandler(handler);
+ call_tests++;
+ des_xmlCharEncodingHandlerPtr(n_handler, handler, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegisterCharEncodingHandler",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_encoding(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing encoding : 16 of 19 functions ...\n");
+ test_ret += test_UTF8Toisolat1();
+ test_ret += test_isolat1ToUTF8();
+ test_ret += test_xmlAddEncodingAlias();
+ test_ret += test_xmlCharEncCloseFunc();
+ test_ret += test_xmlCharEncFirstLine();
+ test_ret += test_xmlCharEncInFunc();
+ test_ret += test_xmlCharEncOutFunc();
+ test_ret += test_xmlCleanupCharEncodingHandlers();
+ test_ret += test_xmlCleanupEncodingAliases();
+ test_ret += test_xmlDelEncodingAlias();
+ test_ret += test_xmlDetectCharEncoding();
+ test_ret += test_xmlFindCharEncodingHandler();
+ test_ret += test_xmlGetCharEncodingHandler();
+ test_ret += test_xmlGetCharEncodingName();
+ test_ret += test_xmlGetEncodingAlias();
+ test_ret += test_xmlInitCharEncodingHandlers();
+ test_ret += test_xmlNewCharEncodingHandler();
+ test_ret += test_xmlParseCharEncoding();
+ test_ret += test_xmlRegisterCharEncodingHandler();
+
+ if (test_ret != 0)
+ printf("Module encoding: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlAddDocEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+ int type; /* the entity type XML_xxx_yyy_ENTITY */
+ int n_type;
+ xmlChar * ExternalID; /* the entity external ID if available */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the entity system ID if available */
+ int n_SystemID;
+ xmlChar * content; /* the entity content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_int(n_type, 2);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
+ content = gen_const_xmlChar_ptr(n_content, 5);
+
+ ret_val = xmlAddDocEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_type, type, 2);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddDocEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddDtdEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+ int type; /* the entity type XML_xxx_yyy_ENTITY */
+ int n_type;
+ xmlChar * ExternalID; /* the entity external ID if available */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the entity system ID if available */
+ int n_SystemID;
+ xmlChar * content; /* the entity content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_int(n_type, 2);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
+ content = gen_const_xmlChar_ptr(n_content, 5);
+
+ ret_val = xmlAddDtdEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_type, type, 2);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddDtdEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCleanupPredefinedEntities(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_LEGACY_ENABLED
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlCleanupPredefinedEntities();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCleanupPredefinedEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlEntitiesTablePtr 1
+static xmlEntitiesTablePtr gen_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlEntitiesTablePtr(int no ATTRIBUTE_UNUSED, xmlEntitiesTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCopyEntitiesTable(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateEntitiesTable(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlDumpEntitiesTable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* An XML buffer. */
+ int n_buf;
+ xmlEntitiesTablePtr table; /* An entity table */
+ int n_table;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_table = 0;n_table < gen_nb_xmlEntitiesTablePtr;n_table++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ table = gen_xmlEntitiesTablePtr(n_table, 1);
+
+ xmlDumpEntitiesTable(buf, table);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlEntitiesTablePtr(n_table, table, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpEntitiesTable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_table);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlEntityPtr 1
+static xmlEntityPtr gen_xmlEntityPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlEntityPtr(int no ATTRIBUTE_UNUSED, xmlEntityPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlDumpEntityDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* An XML buffer. */
+ int n_buf;
+ xmlEntityPtr ent; /* An entity table */
+ int n_ent;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_ent = 0;n_ent < gen_nb_xmlEntityPtr;n_ent++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ ent = gen_xmlEntityPtr(n_ent, 1);
+
+ xmlDumpEntityDecl(buf, ent);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlEntityPtr(n_ent, ent, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpEntityDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_ent);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlEncodeEntitiesReentrant(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDocPtr doc; /* the document containing the string */
+ int n_doc;
+ xmlChar * input; /* A string to convert to XML. */
+ int n_input;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ input = gen_const_xmlChar_ptr(n_input, 1);
+
+ ret_val = xmlEncodeEntitiesReentrant(doc, (const xmlChar *)input);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlEncodeEntitiesReentrant",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_input);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlDoc_ptr 1
+static xmlDoc * gen_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlDoc_ptr(int no ATTRIBUTE_UNUSED, const xmlDoc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlEncodeSpecialChars(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDoc * doc; /* the document containing the string */
+ int n_doc;
+ xmlChar * input; /* A string to convert to XML. */
+ int n_input;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_input = 0;n_input < gen_nb_const_xmlChar_ptr;n_input++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ input = gen_const_xmlChar_ptr(n_input, 1);
+
+ ret_val = xmlEncodeSpecialChars((const xmlDoc *)doc, (const xmlChar *)input);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_input, (const xmlChar *)input, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlEncodeSpecialChars",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_input);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDocEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDoc * doc; /* the document referencing the entity */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetDocEntity((const xmlDoc *)doc, (const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDocEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDocPtr doc; /* the document referencing the entity */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetDtdEntity(doc, (const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDtdEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetParameterEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDocPtr doc; /* the document referencing the entity */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetParameterEntity(doc, (const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetParameterEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetPredefinedEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlChar * name; /* the entity name */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+
+ ret_val = xmlGetPredefinedEntity((const xmlChar *)name);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetPredefinedEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitializePredefinedEntities(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_LEGACY_ENABLED
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlInitializePredefinedEntities();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitializePredefinedEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlEntityPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the entity name */
+ int n_name;
+ int type; /* the entity type XML_xxx_yyy_ENTITY */
+ int n_type;
+ xmlChar * ExternalID; /* the entity external ID if available */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the entity system ID if available */
+ int n_SystemID;
+ xmlChar * content; /* the entity content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_int(n_type, 2);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 3);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 4);
+ content = gen_const_xmlChar_ptr(n_content, 5);
+
+ ret_val = xmlNewEntity(doc, (const xmlChar *)name, type, (const xmlChar *)ExternalID, (const xmlChar *)SystemID, (const xmlChar *)content);
+ desret_xmlEntityPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_int(n_type, type, 2);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 3);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 4);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_entities(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing entities : 13 of 17 functions ...\n");
+ test_ret += test_xmlAddDocEntity();
+ test_ret += test_xmlAddDtdEntity();
+ test_ret += test_xmlCleanupPredefinedEntities();
+ test_ret += test_xmlCopyEntitiesTable();
+ test_ret += test_xmlCreateEntitiesTable();
+ test_ret += test_xmlDumpEntitiesTable();
+ test_ret += test_xmlDumpEntityDecl();
+ test_ret += test_xmlEncodeEntitiesReentrant();
+ test_ret += test_xmlEncodeSpecialChars();
+ test_ret += test_xmlGetDocEntity();
+ test_ret += test_xmlGetDtdEntity();
+ test_ret += test_xmlGetParameterEntity();
+ test_ret += test_xmlGetPredefinedEntity();
+ test_ret += test_xmlInitializePredefinedEntities();
+ test_ret += test_xmlNewEntity();
+
+ if (test_ret != 0)
+ printf("Module entities: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlHashAddEntry(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ userdata = gen_userdata(n_userdata, 2);
+
+ ret_val = xmlHashAddEntry(table, (const xmlChar *)name, userdata);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_userdata(n_userdata, userdata, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashAddEntry",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_userdata);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashAddEntry2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ userdata = gen_userdata(n_userdata, 3);
+
+ ret_val = xmlHashAddEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_userdata(n_userdata, userdata, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashAddEntry2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_userdata);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashAddEntry3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlChar * name3; /* a third name of the userdata */
+ int n_name3;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ name3 = gen_const_xmlChar_ptr(n_name3, 3);
+ userdata = gen_userdata(n_userdata, 4);
+
+ ret_val = xmlHashAddEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
+ des_userdata(n_userdata, userdata, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashAddEntry3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_name3);
+ printf(" %d", n_userdata);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashCopy(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashCreate(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashCreateDict(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashLookup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlHashLookup(table, (const xmlChar *)name);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashLookup2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+
+ ret_val = xmlHashLookup2(table, (const xmlChar *)name, (const xmlChar *)name2);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashLookup2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashLookup3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlChar * name3; /* a third name of the userdata */
+ int n_name3;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ name3 = gen_const_xmlChar_ptr(n_name3, 3);
+
+ ret_val = xmlHashLookup3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashLookup3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_name3);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashQLookup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * prefix; /* the prefix of the userdata */
+ int n_prefix;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+
+ ret_val = xmlHashQLookup(table, (const xmlChar *)prefix, (const xmlChar *)name);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashQLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashQLookup2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * prefix; /* the prefix of the userdata */
+ int n_prefix;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * prefix2; /* the second prefix of the userdata */
+ int n_prefix2;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
+ name2 = gen_const_xmlChar_ptr(n_name2, 4);
+
+ ret_val = xmlHashQLookup2(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashQLookup2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_prefix2);
+ printf(" %d", n_name2);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashQLookup3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * prefix; /* the prefix of the userdata */
+ int n_prefix;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * prefix2; /* the second prefix of the userdata */
+ int n_prefix2;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlChar * prefix3; /* the third prefix of the userdata */
+ int n_prefix3;
+ xmlChar * name3; /* a third name of the userdata */
+ int n_name3;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_prefix3 = 0;n_prefix3 < gen_nb_const_xmlChar_ptr;n_prefix3++) {
+ for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);
+ name2 = gen_const_xmlChar_ptr(n_name2, 4);
+ prefix3 = gen_const_xmlChar_ptr(n_prefix3, 5);
+ name3 = gen_const_xmlChar_ptr(n_name3, 6);
+
+ ret_val = xmlHashQLookup3(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2, (const xmlChar *)prefix3, (const xmlChar *)name3);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);
+ des_const_xmlChar_ptr(n_prefix3, (const xmlChar *)prefix3, 5);
+ des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashQLookup3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_prefix2);
+ printf(" %d", n_name2);
+ printf(" %d", n_prefix3);
+ printf(" %d", n_name3);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashRemoveEntry(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ f = gen_xmlHashDeallocator(n_f, 2);
+
+ ret_val = xmlHashRemoveEntry(table, (const xmlChar *)name, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_xmlHashDeallocator(n_f, f, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashRemoveEntry",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashRemoveEntry2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ f = gen_xmlHashDeallocator(n_f, 3);
+
+ ret_val = xmlHashRemoveEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_xmlHashDeallocator(n_f, f, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashRemoveEntry2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashRemoveEntry3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlChar * name3; /* a third name of the userdata */
+ int n_name3;
+ xmlHashDeallocator f; /* the deallocator function for removed item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ name3 = gen_const_xmlChar_ptr(n_name3, 3);
+ f = gen_xmlHashDeallocator(n_f, 4);
+
+ ret_val = xmlHashRemoveEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
+ des_xmlHashDeallocator(n_f, f, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashRemoveEntry3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_name3);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashScan(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashScan3(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashScanFull(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashScanFull3(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashSize(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+
+ ret_val = xmlHashSize(table);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashSize",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashUpdateEntry(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+ xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ userdata = gen_userdata(n_userdata, 2);
+ f = gen_xmlHashDeallocator(n_f, 3);
+
+ ret_val = xmlHashUpdateEntry(table, (const xmlChar *)name, userdata, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_userdata(n_userdata, userdata, 2);
+ des_xmlHashDeallocator(n_f, f, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashUpdateEntry",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_userdata);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashUpdateEntry2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+ xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ userdata = gen_userdata(n_userdata, 3);
+ f = gen_xmlHashDeallocator(n_f, 4);
+
+ ret_val = xmlHashUpdateEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_userdata(n_userdata, userdata, 3);
+ des_xmlHashDeallocator(n_f, f, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashUpdateEntry2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_userdata);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHashUpdateEntry3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlHashTablePtr table; /* the hash table */
+ int n_table;
+ xmlChar * name; /* the name of the userdata */
+ int n_name;
+ xmlChar * name2; /* a second name of the userdata */
+ int n_name2;
+ xmlChar * name3; /* a third name of the userdata */
+ int n_name3;
+ void * userdata; /* a pointer to the userdata */
+ int n_userdata;
+ xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */
+ int n_f;
+
+ for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {
+ for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {
+ for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {
+ for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {
+ mem_base = xmlMemBlocks();
+ table = gen_xmlHashTablePtr(n_table, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ name2 = gen_const_xmlChar_ptr(n_name2, 2);
+ name3 = gen_const_xmlChar_ptr(n_name3, 3);
+ userdata = gen_userdata(n_userdata, 4);
+ f = gen_xmlHashDeallocator(n_f, 5);
+
+ ret_val = xmlHashUpdateEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata, f);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlHashTablePtr(n_table, table, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);
+ des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);
+ des_userdata(n_userdata, userdata, 4);
+ des_xmlHashDeallocator(n_f, f, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHashUpdateEntry3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_table);
+ printf(" %d", n_name);
+ printf(" %d", n_name2);
+ printf(" %d", n_name3);
+ printf(" %d", n_userdata);
+ printf(" %d", n_f);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_hash(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing hash : 16 of 24 functions ...\n");
+ test_ret += test_xmlHashAddEntry();
+ test_ret += test_xmlHashAddEntry2();
+ test_ret += test_xmlHashAddEntry3();
+ test_ret += test_xmlHashCopy();
+ test_ret += test_xmlHashCreate();
+ test_ret += test_xmlHashCreateDict();
+ test_ret += test_xmlHashLookup();
+ test_ret += test_xmlHashLookup2();
+ test_ret += test_xmlHashLookup3();
+ test_ret += test_xmlHashQLookup();
+ test_ret += test_xmlHashQLookup2();
+ test_ret += test_xmlHashQLookup3();
+ test_ret += test_xmlHashRemoveEntry();
+ test_ret += test_xmlHashRemoveEntry2();
+ test_ret += test_xmlHashRemoveEntry3();
+ test_ret += test_xmlHashScan();
+ test_ret += test_xmlHashScan3();
+ test_ret += test_xmlHashScanFull();
+ test_ret += test_xmlHashScanFull3();
+ test_ret += test_xmlHashSize();
+ test_ret += test_xmlHashUpdateEntry();
+ test_ret += test_xmlHashUpdateEntry2();
+ test_ret += test_xmlHashUpdateEntry3();
+
+ if (test_ret != 0)
+ printf("Module hash: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+#define gen_nb_xmlLinkPtr 1
+static xmlLinkPtr gen_xmlLinkPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlLinkPtr(int no ATTRIBUTE_UNUSED, xmlLinkPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlLinkGetData(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlLinkPtr lk; /* a link */
+ int n_lk;
+
+ for (n_lk = 0;n_lk < gen_nb_xmlLinkPtr;n_lk++) {
+ mem_base = xmlMemBlocks();
+ lk = gen_xmlLinkPtr(n_lk, 0);
+
+ ret_val = xmlLinkGetData(lk);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlLinkPtr(n_lk, lk, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLinkGetData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_lk);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListAppend(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* the data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListAppend(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListAppend",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListClear(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ xmlListClear(l);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListClear",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlListPtr 1
+static xmlListPtr gen_const_xmlListPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlListPtr(int no ATTRIBUTE_UNUSED, const xmlListPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlListCopy(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr cur; /* the new list */
+ int n_cur;
+ xmlListPtr old; /* the old list */
+ int n_old;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlListPtr;n_cur++) {
+ for (n_old = 0;n_old < gen_nb_const_xmlListPtr;n_old++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlListPtr(n_cur, 0);
+ old = gen_const_xmlListPtr(n_old, 1);
+
+ ret_val = xmlListCopy(cur, (const xmlListPtr)old);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_cur, cur, 0);
+ des_const_xmlListPtr(n_old, (const xmlListPtr)old, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListCopy",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_old);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListCreate(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlListDup(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlListEmpty(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ ret_val = xmlListEmpty(l);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListEmpty",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListEnd(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlListFront(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlListInsert(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* the data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListInsert(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListInsert",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListMerge(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l1; /* the original list */
+ int n_l1;
+ xmlListPtr l2; /* the new list */
+ int n_l2;
+
+ for (n_l1 = 0;n_l1 < gen_nb_xmlListPtr;n_l1++) {
+ for (n_l2 = 0;n_l2 < gen_nb_xmlListPtr;n_l2++) {
+ mem_base = xmlMemBlocks();
+ l1 = gen_xmlListPtr(n_l1, 0);
+ l2 = gen_xmlListPtr(n_l2, 1);
+
+ xmlListMerge(l1, l2);
+ call_tests++;
+ des_xmlListPtr(n_l1, l1, 0);
+ des_xmlListPtr(n_l2, l2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListMerge",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l1);
+ printf(" %d", n_l2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListPopBack(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ xmlListPopBack(l);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListPopBack",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListPopFront(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ xmlListPopFront(l);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListPopFront",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListPushBack(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* new data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListPushBack(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListPushBack",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListPushFront(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* new data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListPushFront(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListPushFront",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListRemoveAll(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* list data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListRemoveAll(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListRemoveAll",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListRemoveFirst(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* list data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListRemoveFirst(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListRemoveFirst",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListRemoveLast(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* list data */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListRemoveLast(l, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListRemoveLast",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListReverse(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ xmlListReverse(l);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListReverse",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListReverseSearch(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* a search value */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListReverseSearch(l, data);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListReverseSearch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListReverseWalk(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlListSearch(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+ void * data; /* a search value */
+ int n_data;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+ data = gen_userdata(n_data, 1);
+
+ ret_val = xmlListSearch(l, data);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ des_userdata(n_data, data, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListSearch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListSize(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ ret_val = xmlListSize(l);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListSize",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListSort(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlListPtr l; /* a list */
+ int n_l;
+
+ for (n_l = 0;n_l < gen_nb_xmlListPtr;n_l++) {
+ mem_base = xmlMemBlocks();
+ l = gen_xmlListPtr(n_l, 0);
+
+ xmlListSort(l);
+ call_tests++;
+ des_xmlListPtr(n_l, l, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlListSort",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_l);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlListWalk(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_list(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing list : 19 of 26 functions ...\n");
+ test_ret += test_xmlLinkGetData();
+ test_ret += test_xmlListAppend();
+ test_ret += test_xmlListClear();
+ test_ret += test_xmlListCopy();
+ test_ret += test_xmlListCreate();
+ test_ret += test_xmlListDup();
+ test_ret += test_xmlListEmpty();
+ test_ret += test_xmlListEnd();
+ test_ret += test_xmlListFront();
+ test_ret += test_xmlListInsert();
+ test_ret += test_xmlListMerge();
+ test_ret += test_xmlListPopBack();
+ test_ret += test_xmlListPopFront();
+ test_ret += test_xmlListPushBack();
+ test_ret += test_xmlListPushFront();
+ test_ret += test_xmlListRemoveAll();
+ test_ret += test_xmlListRemoveFirst();
+ test_ret += test_xmlListRemoveLast();
+ test_ret += test_xmlListReverse();
+ test_ret += test_xmlListReverseSearch();
+ test_ret += test_xmlListReverseWalk();
+ test_ret += test_xmlListSearch();
+ test_ret += test_xmlListSize();
+ test_ret += test_xmlListSort();
+ test_ret += test_xmlListWalk();
+
+ if (test_ret != 0)
+ printf("Module list: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlNanoFTPCheckResponse(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoFTPCheckResponse(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPCheckResponse",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlNanoFTPCleanup();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPCloseConnection(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoFTPCloseConnection(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPCloseConnection",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPCwd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+ char * directory; /* a directory on the server */
+ int n_directory;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ for (n_directory = 0;n_directory < gen_nb_const_char_ptr;n_directory++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+ directory = gen_const_char_ptr(n_directory, 1);
+
+ ret_val = xmlNanoFTPCwd(ctx, (const char *)directory);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ des_const_char_ptr(n_directory, (const char *)directory, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPCwd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_directory);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPDele(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+ const char * file; /* a file or directory on the server */
+ int n_file;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+ file = gen_filepath(n_file, 1);
+
+ ret_val = xmlNanoFTPDele(ctx, file);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ des_filepath(n_file, file, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPDele",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_file);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPGet(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPGetConnection(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPGetResponse(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoFTPGetResponse(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPGetResponse",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPGetSocket(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPInit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlNanoFTPInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPList(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPNewCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * URL; /* The URL used to initialize the context */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+
+ ret_val = xmlNanoFTPNewCtxt(URL);
+ desret_xmlNanoFTPCtxtPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPNewCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPOpen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * URL; /* the URL to the resource */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+
+ ret_val = xmlNanoFTPOpen(URL);
+ desret_xmlNanoFTPCtxtPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPOpen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPProxy(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ char * host; /* the proxy host name */
+ int n_host;
+ int port; /* the proxy port */
+ int n_port;
+ char * user; /* the proxy user name */
+ int n_user;
+ char * passwd; /* the proxy password */
+ int n_passwd;
+ int type; /* the type of proxy 1 for using SITE, 2 for USER a@b */
+ int n_type;
+
+ for (n_host = 0;n_host < gen_nb_const_char_ptr;n_host++) {
+ for (n_port = 0;n_port < gen_nb_int;n_port++) {
+ for (n_user = 0;n_user < gen_nb_const_char_ptr;n_user++) {
+ for (n_passwd = 0;n_passwd < gen_nb_const_char_ptr;n_passwd++) {
+ for (n_type = 0;n_type < gen_nb_int;n_type++) {
+ host = gen_const_char_ptr(n_host, 0);
+ port = gen_int(n_port, 1);
+ user = gen_const_char_ptr(n_user, 2);
+ passwd = gen_const_char_ptr(n_passwd, 3);
+ type = gen_int(n_type, 4);
+
+ xmlNanoFTPProxy((const char *)host, port, (const char *)user, (const char *)passwd, type);
+ call_tests++;
+ des_const_char_ptr(n_host, (const char *)host, 0);
+ des_int(n_port, port, 1);
+ des_const_char_ptr(n_user, (const char *)user, 2);
+ des_const_char_ptr(n_passwd, (const char *)passwd, 3);
+ des_int(n_type, type, 4);
+ xmlResetLastError();
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPQuit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoFTPQuit(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPQuit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPRead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the FTP context */
+ int n_ctx;
+ void * dest; /* a buffer */
+ int n_dest;
+ int len; /* the buffer length */
+ int n_len;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+ dest = gen_void_ptr(n_dest, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlNanoFTPRead(ctx, dest, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ des_void_ptr(n_dest, dest, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_dest);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPScanProxy(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ const char * URL; /* The proxy URL used to initialize the proxy context */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ URL = gen_filepath(n_URL, 0);
+
+ xmlNanoFTPScanProxy(URL);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoFTPUpdateURL(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* an FTP context */
+ int n_ctx;
+ const char * URL; /* The URL used to update the context */
+ int n_URL;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoFTPCtxtPtr;n_ctx++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoFTPCtxtPtr(n_ctx, 0);
+ URL = gen_filepath(n_URL, 1);
+
+ ret_val = xmlNanoFTPUpdateURL(ctx, URL);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoFTPCtxtPtr(n_ctx, ctx, 0);
+ des_filepath(n_URL, URL, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoFTPUpdateURL",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_URL);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_nanoftp(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing nanoftp : 14 of 22 functions ...\n");
+ test_ret += test_xmlNanoFTPCheckResponse();
+ test_ret += test_xmlNanoFTPCleanup();
+ test_ret += test_xmlNanoFTPCloseConnection();
+ test_ret += test_xmlNanoFTPCwd();
+ test_ret += test_xmlNanoFTPDele();
+ test_ret += test_xmlNanoFTPGet();
+ test_ret += test_xmlNanoFTPGetConnection();
+ test_ret += test_xmlNanoFTPGetResponse();
+ test_ret += test_xmlNanoFTPGetSocket();
+ test_ret += test_xmlNanoFTPInit();
+ test_ret += test_xmlNanoFTPList();
+ test_ret += test_xmlNanoFTPNewCtxt();
+ test_ret += test_xmlNanoFTPOpen();
+ test_ret += test_xmlNanoFTPProxy();
+ test_ret += test_xmlNanoFTPQuit();
+ test_ret += test_xmlNanoFTPRead();
+ test_ret += test_xmlNanoFTPScanProxy();
+ test_ret += test_xmlNanoFTPUpdateURL();
+
+ if (test_ret != 0)
+ printf("Module nanoftp: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlNanoHTTPAuthHeader(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ const char * ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoHTTPAuthHeader(ctx);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPAuthHeader",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlNanoHTTPCleanup();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPContentLength(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoHTTPContentLength(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPContentLength",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPEncoding(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ const char * ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoHTTPEncoding(ctx);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_char_ptr_ptr 1
+static char ** gen_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_char_ptr_ptr(int no ATTRIBUTE_UNUSED, char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlNanoHTTPFetch(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * URL; /* The URL to load */
+ int n_URL;
+ const char * filename; /* the filename where the content should be saved */
+ int n_filename;
+ char ** contentType; /* if available the Content-Type information will be returned at that location */
+ int n_contentType;
+
+ for (n_URL = 0;n_URL < gen_nb_fileoutput;n_URL++) {
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_fileoutput(n_URL, 0);
+ filename = gen_fileoutput(n_filename, 1);
+ contentType = gen_char_ptr_ptr(n_contentType, 2);
+
+ ret_val = xmlNanoHTTPFetch(URL, filename, contentType);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_URL, URL, 0);
+ des_fileoutput(n_filename, filename, 1);
+ des_char_ptr_ptr(n_contentType, contentType, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPFetch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_filename);
+ printf(" %d", n_contentType);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPInit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlNanoHTTPInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPMimeType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ const char * ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoHTTPMimeType(ctx);
+ desret_const_char_ptr(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPMimeType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPOpen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * URL; /* The URL to load */
+ int n_URL;
+ char ** contentType; /* if available the Content-Type information will be returned at that location */
+ int n_contentType;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+ contentType = gen_char_ptr_ptr(n_contentType, 1);
+
+ ret_val = xmlNanoHTTPOpen(URL, contentType);
+ desret_xmlNanoHTTPCtxtPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ des_char_ptr_ptr(n_contentType, contentType, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPOpen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_contentType);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPOpenRedir(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * URL; /* The URL to load */
+ int n_URL;
+ char ** contentType; /* if available the Content-Type information will be returned at that location */
+ int n_contentType;
+ char ** redir; /* if available the redirected URL will be returned */
+ int n_redir;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_contentType = 0;n_contentType < gen_nb_char_ptr_ptr;n_contentType++) {
+ for (n_redir = 0;n_redir < gen_nb_char_ptr_ptr;n_redir++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+ contentType = gen_char_ptr_ptr(n_contentType, 1);
+ redir = gen_char_ptr_ptr(n_redir, 2);
+
+ ret_val = xmlNanoHTTPOpenRedir(URL, contentType, redir);
+ desret_xmlNanoHTTPCtxtPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ des_char_ptr_ptr(n_contentType, contentType, 1);
+ des_char_ptr_ptr(n_redir, redir, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPOpenRedir",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_contentType);
+ printf(" %d", n_redir);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPRead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+ void * dest; /* a buffer */
+ int n_dest;
+ int len; /* the buffer length */
+ int n_len;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ for (n_dest = 0;n_dest < gen_nb_void_ptr;n_dest++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+ dest = gen_void_ptr(n_dest, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlNanoHTTPRead(ctx, dest, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ des_void_ptr(n_dest, dest, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_dest);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPRedir(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPReturnCode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctx; /* the HTTP context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlNanoHTTPCtxtPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlNanoHTTPCtxtPtr(n_ctx, 0);
+
+ ret_val = xmlNanoHTTPReturnCode(ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNanoHTTPCtxtPtr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPReturnCode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPSave(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * ctxt; /* the HTTP context */
+ int n_ctxt;
+ const char * filename; /* the filename where the content should be saved */
+ int n_filename;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_void_ptr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_void_ptr(n_ctxt, 0);
+ filename = gen_fileoutput(n_filename, 1);
+
+ ret_val = xmlNanoHTTPSave(ctxt, filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_ctxt, ctxt, 0);
+ des_fileoutput(n_filename, filename, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNanoHTTPSave",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNanoHTTPScanProxy(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ const char * URL; /* The proxy URL used to initialize the proxy context */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ URL = gen_filepath(n_URL, 0);
+
+ xmlNanoHTTPScanProxy(URL);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_nanohttp(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing nanohttp : 13 of 17 functions ...\n");
+ test_ret += test_xmlNanoHTTPAuthHeader();
+ test_ret += test_xmlNanoHTTPCleanup();
+ test_ret += test_xmlNanoHTTPContentLength();
+ test_ret += test_xmlNanoHTTPEncoding();
+ test_ret += test_xmlNanoHTTPFetch();
+ test_ret += test_xmlNanoHTTPInit();
+ test_ret += test_xmlNanoHTTPMimeType();
+ test_ret += test_xmlNanoHTTPOpen();
+ test_ret += test_xmlNanoHTTPOpenRedir();
+ test_ret += test_xmlNanoHTTPRead();
+ test_ret += test_xmlNanoHTTPRedir();
+ test_ret += test_xmlNanoHTTPReturnCode();
+ test_ret += test_xmlNanoHTTPSave();
+ test_ret += test_xmlNanoHTTPScanProxy();
+
+ if (test_ret != 0)
+ printf("Module nanohttp: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlByteConsumed(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ long ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlByteConsumed(ctxt);
+ desret_long(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlByteConsumed",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlClearNodeInfoSeq(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
+ int n_seq;
+
+ for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
+ mem_base = xmlMemBlocks();
+ seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
+
+ xmlClearNodeInfoSeq(seq);
+ call_tests++;
+ des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlClearNodeInfoSeq",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_seq);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlClearParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ xmlClearParserCtxt(ctxt);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlClearParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateDocParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+
+ ret_val = xmlCreateDocParserCtxt((const xmlChar *)cur);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateDocParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreatePushParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PUSH_ENABLED)
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ xmlSAXHandlerPtr sax; /* a SAX handler */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks */
+ int n_user_data;
+ char * chunk; /* a pointer to an array of chars */
+ int n_chunk;
+ int size; /* number of chars in the array */
+ int n_size;
+ const char * filename; /* an optional file name or URI */
+ int n_filename;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ user_data = gen_userdata(n_user_data, 1);
+ chunk = gen_const_char_ptr(n_chunk, 2);
+ size = gen_int(n_size, 3);
+ filename = gen_fileoutput(n_filename, 4);
+
+ ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_userdata(n_user_data, user_data, 1);
+ des_const_char_ptr(n_chunk, (const char *)chunk, 2);
+ des_int(n_size, size, 3);
+ des_fileoutput(n_filename, filename, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreatePushParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_chunk);
+ printf(" %d", n_size);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtReadDoc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_parseroptions(n_options, 4);
+
+ ret_val = xmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_parseroptions(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtReadDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtReadFile(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_parseroptions(n_options, 3);
+
+ ret_val = xmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_parseroptions(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtReadFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtReadMemory(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ buffer = gen_const_char_ptr(n_buffer, 1);
+ size = gen_int(n_size, 2);
+ URL = gen_filepath(n_URL, 3);
+ encoding = gen_const_char_ptr(n_encoding, 4);
+ options = gen_parseroptions(n_options, 5);
+
+ ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 1);
+ des_int(n_size, size, 2);
+ des_filepath(n_URL, URL, 3);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 4);
+ des_parseroptions(n_options, options, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtReadMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtReset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ xmlCtxtReset(ctxt);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtReset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtResetPush(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ char * chunk; /* a pointer to an array of chars */
+ int n_chunk;
+ int size; /* number of chars in the array */
+ int n_size;
+ const char * filename; /* an optional file name or URI */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ chunk = gen_const_char_ptr(n_chunk, 1);
+ size = gen_int(n_size, 2);
+ filename = gen_filepath(n_filename, 3);
+ encoding = gen_const_char_ptr(n_encoding, 4);
+
+ ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_chunk, (const char *)chunk, 1);
+ des_int(n_size, size, 2);
+ des_filepath(n_filename, filename, 3);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtResetPush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_chunk);
+ printf(" %d", n_size);
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtUseOptions(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ options = gen_parseroptions(n_options, 1);
+
+ ret_val = xmlCtxtUseOptions(ctxt, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_parseroptions(n_options, options, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtUseOptions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetExternalEntityLoader(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetFeature(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_LEGACY_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
+ int n_ctxt;
+ char * name; /* the feature name */
+ int n_name;
+ void * result; /* location to store the result */
+ int n_result;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
+ for (n_result = 0;n_result < gen_nb_void_ptr;n_result++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ name = gen_const_char_ptr(n_name, 1);
+ result = gen_void_ptr(n_result, 2);
+
+ ret_val = xmlGetFeature(ctxt, (const char *)name, result);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_name, (const char *)name, 1);
+ des_void_ptr(n_result, result, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetFeature",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_result);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_char_ptr_ptr 1
+static char ** gen_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_char_ptr_ptr(int no ATTRIBUTE_UNUSED, const char ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlGetFeaturesList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_LEGACY_ENABLED
+ int mem_base;
+ int ret_val;
+ int * len; /* the length of the features name array (input/output) */
+ int n_len;
+ char ** result; /* an array of string to be filled with the features name. */
+ int n_result;
+
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ for (n_result = 0;n_result < gen_nb_const_char_ptr_ptr;n_result++) {
+ mem_base = xmlMemBlocks();
+ len = gen_int_ptr(n_len, 0);
+ result = gen_const_char_ptr_ptr(n_result, 1);
+
+ ret_val = xmlGetFeaturesList(len, (const char **)result);
+ desret_int(ret_val);
+ call_tests++;
+ des_int_ptr(n_len, len, 0);
+ des_const_char_ptr_ptr(n_result, (const char **)result, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetFeaturesList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_len);
+ printf(" %d", n_result);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHasFeature(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlFeature feature; /* the feature to be examined */
+ int n_feature;
+
+ for (n_feature = 0;n_feature < gen_nb_xmlFeature;n_feature++) {
+ mem_base = xmlMemBlocks();
+ feature = gen_xmlFeature(n_feature, 0);
+
+ ret_val = xmlHasFeature(feature);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlFeature(n_feature, feature, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHasFeature",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_feature);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOParseDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef LIBXML_VALID_ENABLED
+ xmlDtdPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block or NULL */
+ int n_sax;
+ xmlParserInputBufferPtr input; /* an Input Buffer */
+ int n_input;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ input = gen_xmlParserInputBufferPtr(n_input, 1);
+ enc = gen_xmlCharEncoding(n_enc, 2);
+
+ ret_val = xmlIOParseDTD(sax, input, enc);
+ input = NULL;
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_xmlParserInputBufferPtr(n_input, input, 1);
+ des_xmlCharEncoding(n_enc, enc, 2);
+ xmlResetLastError();
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitNodeInfoSeq(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
+ int n_seq;
+
+ for (n_seq = 0;n_seq < gen_nb_xmlParserNodeInfoSeqPtr;n_seq++) {
+ mem_base = xmlMemBlocks();
+ seq = gen_xmlParserNodeInfoSeqPtr(n_seq, 0);
+
+ xmlInitNodeInfoSeq(seq);
+ call_tests++;
+ des_xmlParserNodeInfoSeqPtr(n_seq, seq, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitNodeInfoSeq",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_seq);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitParser(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlInitParser();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitParser",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlInitParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlInitParserCtxt(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlInitParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlKeepBlanksDefault(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int val; /* int 0 or 1 */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlKeepBlanksDefault(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlKeepBlanksDefault",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLineNumbersDefault(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int val; /* int 0 or 1 */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlLineNumbersDefault(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLineNumbersDefault",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLoadExternalEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ const char * URL; /* the URL for the entity to load */
+ int n_URL;
+ char * ID; /* the Public ID for the entity to load */
+ int n_ID;
+ xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
+ int n_ctxt;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+ ID = gen_const_char_ptr(n_ID, 1);
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
+
+ ret_val = xmlLoadExternalEntity(URL, (const char *)ID, ctxt);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ des_const_char_ptr(n_ID, (const char *)ID, 1);
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLoadExternalEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_ID);
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewIOInputStream(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlParserInputBufferPtr input; /* an I/O Input */
+ int n_input;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ input = gen_xmlParserInputBufferPtr(n_input, 1);
+ enc = gen_xmlCharEncoding(n_enc, 2);
+
+ ret_val = xmlNewIOInputStream(ctxt, input, enc);
+ if (ret_val != NULL) input = NULL;
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputBufferPtr(n_input, input, 1);
+ des_xmlCharEncoding(n_enc, enc, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewIOInputStream",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_input);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlNewParserCtxt();
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlNodePtr_ptr 1
+static xmlNodePtr * gen_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, xmlNodePtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParseBalancedChunkMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document the chunk pertains to */
+ int n_doc;
+ xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
+ int n_user_data;
+ int depth; /* Used for loop detection, use 0 */
+ int n_depth;
+ xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
+ int n_string;
+ xmlNodePtr * lst; /* the return value for the set of parsed nodes */
+ int n_lst;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
+ for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ sax = gen_xmlSAXHandlerPtr(n_sax, 1);
+ user_data = gen_userdata(n_user_data, 2);
+ depth = gen_int(n_depth, 3);
+ string = gen_const_xmlChar_ptr(n_string, 4);
+ lst = gen_xmlNodePtr_ptr(n_lst, 5);
+
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+
+
+ ret_val = xmlParseBalancedChunkMemory(doc, sax, user_data, depth, (const xmlChar *)string, lst);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlSAXHandlerPtr(n_sax, sax, 1);
+ des_userdata(n_user_data, user_data, 2);
+ des_int(n_depth, depth, 3);
+ des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
+ des_xmlNodePtr_ptr(n_lst, lst, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseBalancedChunkMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_depth);
+ printf(" %d", n_string);
+ printf(" %d", n_lst);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseBalancedChunkMemoryRecover(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document the chunk pertains to */
+ int n_doc;
+ xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
+ int n_user_data;
+ int depth; /* Used for loop detection, use 0 */
+ int n_depth;
+ xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */
+ int n_string;
+ xmlNodePtr * lst; /* the return value for the set of parsed nodes */
+ int n_lst;
+ int recover; /* return nodes even if the data is broken (use 0) */
+ int n_recover;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
+ for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
+ for (n_recover = 0;n_recover < gen_nb_int;n_recover++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ sax = gen_xmlSAXHandlerPtr(n_sax, 1);
+ user_data = gen_userdata(n_user_data, 2);
+ depth = gen_int(n_depth, 3);
+ string = gen_const_xmlChar_ptr(n_string, 4);
+ lst = gen_xmlNodePtr_ptr(n_lst, 5);
+ recover = gen_int(n_recover, 6);
+
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+
+
+ ret_val = xmlParseBalancedChunkMemoryRecover(doc, sax, user_data, depth, (const xmlChar *)string, lst, recover);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlSAXHandlerPtr(n_sax, sax, 1);
+ des_userdata(n_user_data, user_data, 2);
+ des_int(n_depth, depth, 3);
+ des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);
+ des_xmlNodePtr_ptr(n_lst, lst, 5);
+ des_int(n_recover, recover, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseBalancedChunkMemoryRecover",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_depth);
+ printf(" %d", n_string);
+ printf(" %d", n_lst);
+ printf(" %d", n_recover);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseChunk(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PUSH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ char * chunk; /* an char array */
+ int n_chunk;
+ int size; /* the size in byte of the chunk */
+ int n_size;
+ int terminate; /* last chunk indicator */
+ int n_terminate;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ chunk = gen_const_char_ptr(n_chunk, 1);
+ size = gen_int(n_size, 2);
+ terminate = gen_int(n_terminate, 3);
+
+ ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_chunk, (const char *)chunk, 1);
+ des_int(n_size, size, 2);
+ des_int(n_terminate, terminate, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseChunk",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_chunk);
+ printf(" %d", n_size);
+ printf(" %d", n_terminate);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseCtxtExternalEntity(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctx; /* the existing parsing context */
+ int n_ctx;
+ xmlChar * URL; /* the URL for the entity to load */
+ int n_URL;
+ xmlChar * ID; /* the System ID for the entity to load */
+ int n_ID;
+ xmlNodePtr * lst; /* the return value for the set of parsed nodes */
+ int n_lst;
+
+ for (n_ctx = 0;n_ctx < gen_nb_xmlParserCtxtPtr;n_ctx++) {
+ for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
+ for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
+ for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_xmlParserCtxtPtr(n_ctx, 0);
+ URL = gen_const_xmlChar_ptr(n_URL, 1);
+ ID = gen_const_xmlChar_ptr(n_ID, 2);
+ lst = gen_xmlNodePtr_ptr(n_lst, 3);
+
+ ret_val = xmlParseCtxtExternalEntity(ctx, (const xmlChar *)URL, (const xmlChar *)ID, lst);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctx, ctx, 0);
+ des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 1);
+ des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 2);
+ des_xmlNodePtr_ptr(n_lst, lst, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseCtxtExternalEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_URL);
+ printf(" %d", n_ID);
+ printf(" %d", n_lst);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef LIBXML_VALID_ENABLED
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
+ int n_ExternalID;
+ xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
+ int n_SystemID;
+
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 0);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 1);
+
+ ret_val = xmlParseDTD((const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 0);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+
+ ret_val = xmlParseDoc((const xmlChar *)cur);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseDocument(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlParseDocument(ctxt);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlParseEntity(filename);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseExtParsedEnt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlParseExtParsedEnt(ctxt);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseExtParsedEnt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseExternalEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document the chunk pertains to */
+ int n_doc;
+ xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */
+ int n_user_data;
+ int depth; /* Used for loop detection, use 0 */
+ int n_depth;
+ xmlChar * URL; /* the URL for the entity to load */
+ int n_URL;
+ xmlChar * ID; /* the System ID for the entity to load */
+ int n_ID;
+ xmlNodePtr * lst; /* the return value for the set of parsed nodes */
+ int n_lst;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
+ for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
+ for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ sax = gen_xmlSAXHandlerPtr(n_sax, 1);
+ user_data = gen_userdata(n_user_data, 2);
+ depth = gen_int(n_depth, 3);
+ URL = gen_const_xmlChar_ptr(n_URL, 4);
+ ID = gen_const_xmlChar_ptr(n_ID, 5);
+ lst = gen_xmlNodePtr_ptr(n_lst, 6);
+
+ ret_val = xmlParseExternalEntity(doc, sax, user_data, depth, (const xmlChar *)URL, (const xmlChar *)ID, lst);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlSAXHandlerPtr(n_sax, sax, 1);
+ des_userdata(n_user_data, user_data, 2);
+ des_int(n_depth, depth, 3);
+ des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 4);
+ des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 5);
+ des_xmlNodePtr_ptr(n_lst, lst, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseExternalEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_depth);
+ printf(" %d", n_URL);
+ printf(" %d", n_ID);
+ printf(" %d", n_lst);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlParseFile(filename);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseInNodeContext(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserErrors ret_val;
+ xmlNodePtr node; /* the context node */
+ int n_node;
+ char * data; /* the input string */
+ int n_data;
+ int datalen; /* the input string length in bytes */
+ int n_datalen;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+ xmlNodePtr * lst; /* the return value for the set of parsed nodes */
+ int n_lst;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
+ for (n_datalen = 0;n_datalen < gen_nb_int;n_datalen++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ data = gen_const_char_ptr(n_data, 1);
+ datalen = gen_int(n_datalen, 2);
+ options = gen_parseroptions(n_options, 3);
+ lst = gen_xmlNodePtr_ptr(n_lst, 4);
+
+ ret_val = xmlParseInNodeContext(node, (const char *)data, datalen, options, lst);
+ desret_xmlParserErrors(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_char_ptr(n_data, (const char *)data, 1);
+ des_int(n_datalen, datalen, 2);
+ des_parseroptions(n_options, options, 3);
+ des_xmlNodePtr_ptr(n_lst, lst, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseInNodeContext",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_data);
+ printf(" %d", n_datalen);
+ printf(" %d", n_options);
+ printf(" %d", n_lst);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ char * buffer; /* an pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = xmlParseMemory((const char *)buffer, size);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlParserNodeInfoPtr 1
+static xmlParserNodeInfoPtr gen_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlParserNodeInfoPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParserAddNodeInfo(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlParserNodeInfoPtr info; /* a node info sequence pointer */
+ int n_info;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_info = 0;n_info < gen_nb_const_xmlParserNodeInfoPtr;n_info++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ info = gen_const_xmlParserNodeInfoPtr(n_info, 1);
+
+ xmlParserAddNodeInfo(ctxt, (const xmlParserNodeInfoPtr)info);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlParserNodeInfoPtr(n_info, (const xmlParserNodeInfoPtr)info, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserAddNodeInfo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_info);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlParserCtxtPtr 1
+static xmlParserCtxtPtr gen_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, const xmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+#define gen_nb_const_xmlNodePtr 1
+static xmlNodePtr gen_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlNodePtr(int no ATTRIBUTE_UNUSED, const xmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParserFindNodeInfo(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlParserNodeInfo * ret_val;
+ xmlParserCtxtPtr ctx; /* an XML parser context */
+ int n_ctx;
+ xmlNodePtr node; /* an XML node within the tree */
+ int n_node;
+
+ for (n_ctx = 0;n_ctx < gen_nb_const_xmlParserCtxtPtr;n_ctx++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_const_xmlParserCtxtPtr(n_ctx, 0);
+ node = gen_const_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlParserFindNodeInfo((const xmlParserCtxtPtr)ctx, (const xmlNodePtr)node);
+ desret_const_xmlParserNodeInfo_ptr(ret_val);
+ call_tests++;
+ des_const_xmlParserCtxtPtr(n_ctx, (const xmlParserCtxtPtr)ctx, 0);
+ des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserFindNodeInfo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlParserNodeInfoSeqPtr 1
+static xmlParserNodeInfoSeqPtr gen_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, const xmlParserNodeInfoSeqPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParserFindNodeInfoIndex(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ unsigned long ret_val;
+ xmlParserNodeInfoSeqPtr seq; /* a node info sequence pointer */
+ int n_seq;
+ xmlNodePtr node; /* an XML node pointer */
+ int n_node;
+
+ for (n_seq = 0;n_seq < gen_nb_const_xmlParserNodeInfoSeqPtr;n_seq++) {
+ for (n_node = 0;n_node < gen_nb_const_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ seq = gen_const_xmlParserNodeInfoSeqPtr(n_seq, 0);
+ node = gen_const_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlParserFindNodeInfoIndex((const xmlParserNodeInfoSeqPtr)seq, (const xmlNodePtr)node);
+ desret_unsigned_long(ret_val);
+ call_tests++;
+ des_const_xmlParserNodeInfoSeqPtr(n_seq, (const xmlParserNodeInfoSeqPtr)seq, 0);
+ des_const_xmlNodePtr(n_node, (const xmlNodePtr)node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserFindNodeInfoIndex",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_seq);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlParserInputPtr 1
+static xmlParserInputPtr gen_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, xmlParserInputPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParserInputGrow(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserInputPtr in; /* an XML parser input */
+ int n_in;
+ int len; /* an indicative size for the lookahead */
+ int n_len;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputPtr(n_in, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlParserInputGrow(in, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserInputPtr(n_in, in, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputGrow",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputRead(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserInputPtr in; /* an XML parser input */
+ int n_in;
+ int len; /* an indicative size for the lookahead */
+ int n_len;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputPtr(n_in, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlParserInputRead(in, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserInputPtr(n_in, in, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPedanticParserDefault(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int val; /* int 0 or 1 */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlPedanticParserDefault(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPedanticParserDefault",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReadDoc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+ URL = gen_filepath(n_URL, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_parseroptions(n_options, 3);
+
+ ret_val = xmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ des_filepath(n_URL, URL, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_parseroptions(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReadDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReadFile(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+ options = gen_parseroptions(n_options, 2);
+
+ ret_val = xmlReadFile(filename, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ des_parseroptions(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReadFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReadMemory(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_parseroptions(n_options, 4);
+
+ ret_val = xmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_parseroptions(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReadMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRecoverDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+
+ ret_val = xmlRecoverDoc((const xmlChar *)cur);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRecoverDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRecoverFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlRecoverFile(filename);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRecoverFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRecoverMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ char * buffer; /* an pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = xmlRecoverMemory((const char *)buffer, size);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRecoverMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ xmlChar * ExternalID; /* a NAME* containing the External ID of the DTD */
+ int n_ExternalID;
+ xmlChar * SystemID; /* a NAME* containing the URL to the DTD */
+ int n_SystemID;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 2);
+
+ ret_val = xmlSAXParseDTD(sax, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ xmlChar * cur; /* a pointer to an array of xmlChar */
+ int n_cur;
+ int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
+ int n_recovery;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 1);
+ recovery = gen_int(n_recovery, 2);
+
+ ret_val = xmlSAXParseDoc(sax, (const xmlChar *)cur, recovery);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
+ des_int(n_recovery, recovery, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_cur);
+ printf(" %d", n_recovery);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ filename = gen_filepath(n_filename, 1);
+
+ ret_val = xmlSAXParseEntity(sax, filename);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_filepath(n_filename, filename, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ const char * filename; /* the filename */
+ int n_filename;
+ int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
+ int n_recovery;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ filename = gen_filepath(n_filename, 1);
+ recovery = gen_int(n_recovery, 2);
+
+ ret_val = xmlSAXParseFile(sax, filename, recovery);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_filepath(n_filename, filename, 1);
+ des_int(n_recovery, recovery, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_filename);
+ printf(" %d", n_recovery);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseFileWithData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ const char * filename; /* the filename */
+ int n_filename;
+ int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
+ int n_recovery;
+ void * data; /* the userdata */
+ int n_data;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ filename = gen_filepath(n_filename, 1);
+ recovery = gen_int(n_recovery, 2);
+ data = gen_userdata(n_data, 3);
+
+ ret_val = xmlSAXParseFileWithData(sax, filename, recovery, data);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_filepath(n_filename, filename, 1);
+ des_int(n_recovery, recovery, 2);
+ des_userdata(n_data, data, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseFileWithData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_filename);
+ printf(" %d", n_recovery);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ char * buffer; /* an pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ int recovery; /* work in recovery mode, i.e. tries to read not Well Formed documents */
+ int n_recovery;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ buffer = gen_const_char_ptr(n_buffer, 1);
+ size = gen_int(n_size, 2);
+ recovery = gen_int(n_recovery, 3);
+
+ ret_val = xmlSAXParseMemory(sax, (const char *)buffer, size, recovery);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 1);
+ des_int(n_size, size, 2);
+ des_int(n_recovery, recovery, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_recovery);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXParseMemoryWithData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlSAXHandlerPtr sax; /* the SAX handler block */
+ int n_sax;
+ char * buffer; /* an pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */
+ int n_recovery;
+ void * data; /* the userdata */
+ int n_data;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ buffer = gen_const_char_ptr(n_buffer, 1);
+ size = gen_int(n_size, 2);
+ recovery = gen_int(n_recovery, 3);
+ data = gen_userdata(n_data, 4);
+
+ ret_val = xmlSAXParseMemoryWithData(sax, (const char *)buffer, size, recovery, data);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 1);
+ des_int(n_size, size, 2);
+ des_int(n_recovery, recovery, 3);
+ des_userdata(n_data, data, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXParseMemoryWithData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_recovery);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXUserParseFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlSAXHandlerPtr sax; /* a SAX handler */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks */
+ int n_user_data;
+ const char * filename; /* a file name */
+ int n_filename;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ user_data = gen_userdata(n_user_data, 1);
+ filename = gen_filepath(n_filename, 2);
+
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+
+
+ ret_val = xmlSAXUserParseFile(sax, user_data, filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_userdata(n_user_data, user_data, 1);
+ des_filepath(n_filename, filename, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXUserParseFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSAXUserParseMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlSAXHandlerPtr sax; /* a SAX handler */
+ int n_sax;
+ void * user_data; /* The user data returned on SAX callbacks */
+ int n_user_data;
+ char * buffer; /* an in-memory XML document input */
+ int n_buffer;
+ int size; /* the length of the XML document in bytes */
+ int n_size;
+
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ sax = gen_xmlSAXHandlerPtr(n_sax, 0);
+ user_data = gen_userdata(n_user_data, 1);
+ buffer = gen_const_char_ptr(n_buffer, 2);
+ size = gen_int(n_size, 3);
+
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
+#endif
+
+
+ ret_val = xmlSAXUserParseMemory(sax, user_data, (const char *)buffer, size);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSAXHandlerPtr(n_sax, sax, 0);
+ des_userdata(n_user_data, user_data, 1);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 2);
+ des_int(n_size, size, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSAXUserParseMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetExternalEntityLoader(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetFeature(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_LEGACY_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML/HTML parser context */
+ int n_ctxt;
+ char * name; /* the feature name */
+ int n_name;
+ void * value; /* pointer to the location of the new value */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_void_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ name = gen_const_char_ptr(n_name, 1);
+ value = gen_void_ptr(n_value, 2);
+
+ ret_val = xmlSetFeature(ctxt, (const char *)name, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_name, (const char *)name, 1);
+ des_void_ptr(n_value, value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetFeature",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetupParserForBuffer(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SAX1_ENABLED)
+#ifdef LIBXML_SAX1_ENABLED
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlChar * buffer; /* a xmlChar * buffer */
+ int n_buffer;
+ const char * filename; /* a file name */
+ int n_filename;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ buffer = gen_const_xmlChar_ptr(n_buffer, 1);
+ filename = gen_filepath(n_filename, 2);
+
+ xmlSetupParserForBuffer(ctxt, (const xmlChar *)buffer, filename);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
+ des_filepath(n_filename, filename, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetupParserForBuffer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_buffer);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStopParser(void) {
+ int test_ret = 0;
+
+#ifdef LIBXML_PUSH_ENABLED
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ xmlStopParser(ctxt);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStopParser",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSubstituteEntitiesDefault(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int val; /* int 0 or 1 */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlSubstituteEntitiesDefault(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSubstituteEntitiesDefault",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_parser(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing parser : 61 of 70 functions ...\n");
+ test_ret += test_xmlByteConsumed();
+ test_ret += test_xmlClearNodeInfoSeq();
+ test_ret += test_xmlClearParserCtxt();
+ test_ret += test_xmlCreateDocParserCtxt();
+ test_ret += test_xmlCreatePushParserCtxt();
+ test_ret += test_xmlCtxtReadDoc();
+ test_ret += test_xmlCtxtReadFile();
+ test_ret += test_xmlCtxtReadMemory();
+ test_ret += test_xmlCtxtReset();
+ test_ret += test_xmlCtxtResetPush();
+ test_ret += test_xmlCtxtUseOptions();
+ test_ret += test_xmlGetExternalEntityLoader();
+ test_ret += test_xmlGetFeature();
+ test_ret += test_xmlGetFeaturesList();
+ test_ret += test_xmlHasFeature();
+ test_ret += test_xmlIOParseDTD();
+ test_ret += test_xmlInitNodeInfoSeq();
+ test_ret += test_xmlInitParser();
+ test_ret += test_xmlInitParserCtxt();
+ test_ret += test_xmlKeepBlanksDefault();
+ test_ret += test_xmlLineNumbersDefault();
+ test_ret += test_xmlLoadExternalEntity();
+ test_ret += test_xmlNewIOInputStream();
+ test_ret += test_xmlNewParserCtxt();
+ test_ret += test_xmlParseBalancedChunkMemory();
+ test_ret += test_xmlParseBalancedChunkMemoryRecover();
+ test_ret += test_xmlParseChunk();
+ test_ret += test_xmlParseCtxtExternalEntity();
+ test_ret += test_xmlParseDTD();
+ test_ret += test_xmlParseDoc();
+ test_ret += test_xmlParseDocument();
+ test_ret += test_xmlParseEntity();
+ test_ret += test_xmlParseExtParsedEnt();
+ test_ret += test_xmlParseExternalEntity();
+ test_ret += test_xmlParseFile();
+ test_ret += test_xmlParseInNodeContext();
+ test_ret += test_xmlParseMemory();
+ test_ret += test_xmlParserAddNodeInfo();
+ test_ret += test_xmlParserFindNodeInfo();
+ test_ret += test_xmlParserFindNodeInfoIndex();
+ test_ret += test_xmlParserInputGrow();
+ test_ret += test_xmlParserInputRead();
+ test_ret += test_xmlPedanticParserDefault();
+ test_ret += test_xmlReadDoc();
+ test_ret += test_xmlReadFile();
+ test_ret += test_xmlReadMemory();
+ test_ret += test_xmlRecoverDoc();
+ test_ret += test_xmlRecoverFile();
+ test_ret += test_xmlRecoverMemory();
+ test_ret += test_xmlSAXParseDTD();
+ test_ret += test_xmlSAXParseDoc();
+ test_ret += test_xmlSAXParseEntity();
+ test_ret += test_xmlSAXParseFile();
+ test_ret += test_xmlSAXParseFileWithData();
+ test_ret += test_xmlSAXParseMemory();
+ test_ret += test_xmlSAXParseMemoryWithData();
+ test_ret += test_xmlSAXUserParseFile();
+ test_ret += test_xmlSAXUserParseMemory();
+ test_ret += test_xmlSetExternalEntityLoader();
+ test_ret += test_xmlSetFeature();
+ test_ret += test_xmlSetupParserForBuffer();
+ test_ret += test_xmlStopParser();
+ test_ret += test_xmlSubstituteEntitiesDefault();
+
+ if (test_ret != 0)
+ printf("Module parser: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_htmlCreateFileParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ htmlParserCtxtPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+ char * encoding; /* a free form C string describing the HTML document encoding, or NULL */
+ int n_encoding;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+
+ ret_val = htmlCreateFileParserCtxt(filename, (const char *)encoding);
+ desret_htmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlCreateFileParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_htmlInitAutoClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ htmlInitAutoClose();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in htmlInitAutoClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_inputPop(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = inputPop(ctxt);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in inputPop",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_inputPush(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlParserInputPtr value; /* the parser input */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_value = 0;n_value < gen_nb_xmlParserInputPtr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ value = gen_xmlParserInputPtr(n_value, 1);
+
+ ret_val = inputPush(ctxt, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputPtr(n_value, value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in inputPush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_namePop(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = namePop(ctxt);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in namePop",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_namePush(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlChar * value; /* the element name */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+
+ ret_val = namePush(ctxt, (const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in namePush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_nodePop(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = nodePop(ctxt);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in nodePop",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_nodePush(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlNodePtr value; /* the element node */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_value = 0;n_value < gen_nb_xmlNodePtr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ value = gen_xmlNodePtr(n_value, 1);
+
+ ret_val = nodePush(ctxt, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_value, value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in nodePush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCheckLanguageID(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * lang; /* pointer to the string value */
+ int n_lang;
+
+ for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
+ mem_base = xmlMemBlocks();
+ lang = gen_const_xmlChar_ptr(n_lang, 0);
+
+ ret_val = xmlCheckLanguageID((const xmlChar *)lang);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCheckLanguageID",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_lang);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int len; /* Ignored, compatibility */
+ int n_len;
+ xmlChar * out; /* pointer to an array of xmlChar */
+ int n_out;
+ int val; /* the char value */
+ int n_val;
+
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ len = gen_int(n_len, 0);
+ out = gen_xmlChar_ptr(n_out, 1);
+ val = gen_int(n_val, 2);
+
+ ret_val = xmlCopyChar(len, out, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_len, len, 0);
+ des_xmlChar_ptr(n_out, out, 1);
+ des_int(n_val, val, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_len);
+ printf(" %d", n_out);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyCharMultiByte(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * out; /* pointer to an array of xmlChar */
+ int n_out;
+ int val; /* the char value */
+ int n_val;
+
+ for (n_out = 0;n_out < gen_nb_xmlChar_ptr;n_out++) {
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlChar_ptr(n_out, 0);
+ val = gen_int(n_val, 1);
+
+ ret_val = xmlCopyCharMultiByte(out, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlChar_ptr(n_out, out, 0);
+ des_int(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyCharMultiByte",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateEntityParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ xmlChar * URL; /* the entity URL */
+ int n_URL;
+ xmlChar * ID; /* the entity PUBLIC ID */
+ int n_ID;
+ xmlChar * base; /* a possible base for the target URI */
+ int n_base;
+
+ for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {
+ for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
+ for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_const_xmlChar_ptr(n_URL, 0);
+ ID = gen_const_xmlChar_ptr(n_ID, 1);
+ base = gen_const_xmlChar_ptr(n_base, 2);
+
+ ret_val = xmlCreateEntityParserCtxt((const xmlChar *)URL, (const xmlChar *)ID, (const xmlChar *)base);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 0);
+ des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
+ des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateEntityParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_ID);
+ printf(" %d", n_base);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateFileParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ const char * filename; /* the filename */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+
+ ret_val = xmlCreateFileParserCtxt(filename);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateFileParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateMemoryParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateMemoryParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateURLParserCtxt(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ const char * filename; /* the filename or URL */
+ int n_filename;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ options = gen_int(n_options, 1);
+
+ ret_val = xmlCreateURLParserCtxt(filename, options);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_int(n_options, options, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateURLParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCurrentChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* the XML parser context */
+ int n_ctxt;
+ int * len; /* pointer to the length of the char read */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ len = gen_int_ptr(n_len, 1);
+
+ ret_val = xmlCurrentChar(ctxt, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_int_ptr(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCurrentChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlErrMemory(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ char * extra; /* extra informations */
+ int n_extra;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_extra = 0;n_extra < gen_nb_const_char_ptr;n_extra++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ extra = gen_const_char_ptr(n_extra, 1);
+
+ xmlErrMemory(ctxt, (const char *)extra);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_char_ptr(n_extra, (const char *)extra, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlErrMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_extra);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsLetter(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ int c; /* an unicode character (int) */
+ int n_c;
+
+ for (n_c = 0;n_c < gen_nb_int;n_c++) {
+ mem_base = xmlMemBlocks();
+ c = gen_int(n_c, 0);
+
+ ret_val = xmlIsLetter(c);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_c, c, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsLetter",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_c);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewEntityInputStream(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlEntityPtr entity; /* an Entity pointer */
+ int n_entity;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_entity = 0;n_entity < gen_nb_xmlEntityPtr;n_entity++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ entity = gen_xmlEntityPtr(n_entity, 1);
+
+ ret_val = xmlNewEntityInputStream(ctxt, entity);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlEntityPtr(n_entity, entity, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewEntityInputStream",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_entity);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewInputFromFile(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ const char * filename; /* the filename to use as entity */
+ int n_filename;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+
+ ret_val = xmlNewInputFromFile(ctxt, filename);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewInputFromFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewInputStream(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlNewInputStream(ctxt);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewInputStream",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewStringInputStream(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlChar * buffer; /* an memory buffer */
+ int n_buffer;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ buffer = gen_const_xmlChar_ptr(n_buffer, 1);
+
+ ret_val = xmlNewStringInputStream(ctxt, (const xmlChar *)buffer);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewStringInputStream",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_buffer);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNextChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserCtxtPtr ctxt; /* the XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ xmlNextChar(ctxt);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNextChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputShrink(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr in; /* an XML parser input */
+ int n_in;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputPtr;n_in++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputPtr(n_in, 0);
+
+ xmlParserInputShrink(in);
+ call_tests++;
+ des_xmlParserInputPtr(n_in, in, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputShrink",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPopInput(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlPopInput(ctxt);
+ desret_xmlChar(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPopInput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPushInput(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlParserInputPtr input; /* an XML parser input fragment (entity, XML fragment ...). */
+ int n_input;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ input = gen_xmlParserInputPtr(n_input, 1);
+
+ ret_val = xmlPushInput(ctxt, input);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputPtr(n_input, input, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPushInput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_input);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetEntityReferenceFunc(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSplitQName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlChar * name; /* an XML parser context */
+ int n_name;
+ xmlChar ** prefix; /* a xmlChar ** */
+ int n_prefix;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ prefix = gen_xmlChar_ptr_ptr(n_prefix, 2);
+
+ ret_val = xmlSplitQName(ctxt, (const xmlChar *)name, prefix);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_xmlChar_ptr_ptr(n_prefix, prefix, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSplitQName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStringCurrentChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* the XML parser context */
+ int n_ctxt;
+ xmlChar * cur; /* pointer to the beginning of the char */
+ int n_cur;
+ int * len; /* pointer to the length of the char read */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 1);
+ len = gen_int_ptr(n_len, 2);
+
+ ret_val = xmlStringCurrentChar(ctxt, (const xmlChar *)cur, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
+ des_int_ptr(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStringCurrentChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStringDecodeEntities(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ int n_ctxt;
+ xmlChar * str; /* the input string */
+ int n_str;
+ int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
+ int n_what;
+ xmlChar end; /* an end marker xmlChar, 0 if none */
+ int n_end;
+ xmlChar end2; /* an end marker xmlChar, 0 if none */
+ int n_end2;
+ xmlChar end3; /* an end marker xmlChar, 0 if none */
+ int n_end3;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_what = 0;n_what < gen_nb_int;n_what++) {
+ for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
+ for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
+ for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ what = gen_int(n_what, 2);
+ end = gen_xmlChar(n_end, 3);
+ end2 = gen_xmlChar(n_end2, 4);
+ end3 = gen_xmlChar(n_end3, 5);
+
+ ret_val = xmlStringDecodeEntities(ctxt, (const xmlChar *)str, what, end, end2, end3);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_int(n_what, what, 2);
+ des_xmlChar(n_end, end, 3);
+ des_xmlChar(n_end2, end2, 4);
+ des_xmlChar(n_end3, end3, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStringDecodeEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_str);
+ printf(" %d", n_what);
+ printf(" %d", n_end);
+ printf(" %d", n_end2);
+ printf(" %d", n_end3);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStringLenDecodeEntities(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ int n_ctxt;
+ xmlChar * str; /* the input string */
+ int n_str;
+ int len; /* the string length */
+ int n_len;
+ int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */
+ int n_what;
+ xmlChar end; /* an end marker xmlChar, 0 if none */
+ int n_end;
+ xmlChar end2; /* an end marker xmlChar, 0 if none */
+ int n_end2;
+ xmlChar end3; /* an end marker xmlChar, 0 if none */
+ int n_end3;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ for (n_what = 0;n_what < gen_nb_int;n_what++) {
+ for (n_end = 0;n_end < gen_nb_xmlChar;n_end++) {
+ for (n_end2 = 0;n_end2 < gen_nb_xmlChar;n_end2++) {
+ for (n_end3 = 0;n_end3 < gen_nb_xmlChar;n_end3++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ len = gen_int(n_len, 2);
+ what = gen_int(n_what, 3);
+ end = gen_xmlChar(n_end, 4);
+ end2 = gen_xmlChar(n_end2, 5);
+ end3 = gen_xmlChar(n_end3, 6);
+
+ ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_int(n_len, len, 2);
+ des_int(n_what, what, 3);
+ des_xmlChar(n_end, end, 4);
+ des_xmlChar(n_end2, end2, 5);
+ des_xmlChar(n_end3, end3, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStringLenDecodeEntities",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_str);
+ printf(" %d", n_len);
+ printf(" %d", n_what);
+ printf(" %d", n_end);
+ printf(" %d", n_end2);
+ printf(" %d", n_end3);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSwitchEncoding(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ int n_ctxt;
+ xmlCharEncoding enc; /* the encoding value (number) */
+ int n_enc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ enc = gen_xmlCharEncoding(n_enc, 1);
+
+ ret_val = xmlSwitchEncoding(ctxt, enc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlCharEncoding(n_enc, enc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSwitchEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSwitchInputEncoding(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ int n_ctxt;
+ xmlParserInputPtr input; /* the input stream */
+ int n_input;
+ xmlCharEncodingHandlerPtr handler; /* the encoding handler */
+ int n_handler;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ input = gen_xmlParserInputPtr(n_input, 1);
+ handler = gen_xmlCharEncodingHandlerPtr(n_handler, 2);
+
+ ret_val = xmlSwitchInputEncoding(ctxt, input, handler);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputPtr(n_input, input, 1);
+ des_xmlCharEncodingHandlerPtr(n_handler, handler, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSwitchInputEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_input);
+ printf(" %d", n_handler);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSwitchToEncoding(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ int n_ctxt;
+ xmlCharEncodingHandlerPtr handler; /* the encoding handler */
+ int n_handler;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_handler = 0;n_handler < gen_nb_xmlCharEncodingHandlerPtr;n_handler++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ handler = gen_xmlCharEncodingHandlerPtr(n_handler, 1);
+
+ ret_val = xmlSwitchToEncoding(ctxt, handler);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlCharEncodingHandlerPtr(n_handler, handler, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSwitchToEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_handler);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_parserInternals(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing parserInternals : 33 of 90 functions ...\n");
+ test_ret += test_htmlCreateFileParserCtxt();
+ test_ret += test_htmlInitAutoClose();
+ test_ret += test_inputPop();
+ test_ret += test_inputPush();
+ test_ret += test_namePop();
+ test_ret += test_namePush();
+ test_ret += test_nodePop();
+ test_ret += test_nodePush();
+ test_ret += test_xmlCheckLanguageID();
+ test_ret += test_xmlCopyChar();
+ test_ret += test_xmlCopyCharMultiByte();
+ test_ret += test_xmlCreateEntityParserCtxt();
+ test_ret += test_xmlCreateFileParserCtxt();
+ test_ret += test_xmlCreateMemoryParserCtxt();
+ test_ret += test_xmlCreateURLParserCtxt();
+ test_ret += test_xmlCurrentChar();
+ test_ret += test_xmlErrMemory();
+ test_ret += test_xmlIsLetter();
+ test_ret += test_xmlNewEntityInputStream();
+ test_ret += test_xmlNewInputFromFile();
+ test_ret += test_xmlNewInputStream();
+ test_ret += test_xmlNewStringInputStream();
+ test_ret += test_xmlNextChar();
+ test_ret += test_xmlParserInputShrink();
+ test_ret += test_xmlPopInput();
+ test_ret += test_xmlPushInput();
+ test_ret += test_xmlSetEntityReferenceFunc();
+ test_ret += test_xmlSplitQName();
+ test_ret += test_xmlStringCurrentChar();
+ test_ret += test_xmlStringDecodeEntities();
+ test_ret += test_xmlStringLenDecodeEntities();
+ test_ret += test_xmlSwitchEncoding();
+ test_ret += test_xmlSwitchInputEncoding();
+ test_ret += test_xmlSwitchToEncoding();
+
+ if (test_ret != 0)
+ printf("Module parserInternals: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlPatternFromRoot(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlPatternPtr comp; /* the precompiled pattern */
+ int n_comp;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlPatternPtr(n_comp, 0);
+
+ ret_val = xmlPatternFromRoot(comp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlPatternPtr(n_comp, comp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPatternFromRoot",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatternGetStreamCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatternMatch(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlPatternPtr comp; /* the precompiled pattern */
+ int n_comp;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlPatternPtr(n_comp, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlPatternMatch(comp, node);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlPatternPtr(n_comp, comp, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPatternMatch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatternMaxDepth(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlPatternPtr comp; /* the precompiled pattern */
+ int n_comp;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlPatternPtr(n_comp, 0);
+
+ ret_val = xmlPatternMaxDepth(comp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlPatternPtr(n_comp, comp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPatternMaxDepth",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatternMinDepth(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlPatternPtr comp; /* the precompiled pattern */
+ int n_comp;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlPatternPtr(n_comp, 0);
+
+ ret_val = xmlPatternMinDepth(comp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlPatternPtr(n_comp, comp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPatternMinDepth",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatternStreamable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlPatternPtr comp; /* the precompiled pattern */
+ int n_comp;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlPatternPtr(n_comp, 0);
+
+ ret_val = xmlPatternStreamable(comp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlPatternPtr(n_comp, comp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPatternStreamable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPatterncompile(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_PATTERN_ENABLED
+
+#define gen_nb_xmlStreamCtxtPtr 1
+static xmlStreamCtxtPtr gen_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlStreamCtxtPtr(int no ATTRIBUTE_UNUSED, xmlStreamCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlStreamPop(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlStreamCtxtPtr stream; /* the stream context */
+ int n_stream;
+
+ for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
+ mem_base = xmlMemBlocks();
+ stream = gen_xmlStreamCtxtPtr(n_stream, 0);
+
+ ret_val = xmlStreamPop(stream);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlStreamCtxtPtr(n_stream, stream, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStreamPop",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_stream);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStreamPush(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlStreamCtxtPtr stream; /* the stream context */
+ int n_stream;
+ xmlChar * name; /* the current name */
+ int n_name;
+ xmlChar * ns; /* the namespace name */
+ int n_ns;
+
+ for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ stream = gen_xmlStreamCtxtPtr(n_stream, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ns = gen_const_xmlChar_ptr(n_ns, 2);
+
+ ret_val = xmlStreamPush(stream, (const xmlChar *)name, (const xmlChar *)ns);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlStreamCtxtPtr(n_stream, stream, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStreamPush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_stream);
+ printf(" %d", n_name);
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStreamPushAttr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlStreamCtxtPtr stream; /* the stream context */
+ int n_stream;
+ xmlChar * name; /* the current name */
+ int n_name;
+ xmlChar * ns; /* the namespace name */
+ int n_ns;
+
+ for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ stream = gen_xmlStreamCtxtPtr(n_stream, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ns = gen_const_xmlChar_ptr(n_ns, 2);
+
+ ret_val = xmlStreamPushAttr(stream, (const xmlChar *)name, (const xmlChar *)ns);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlStreamCtxtPtr(n_stream, stream, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStreamPushAttr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_stream);
+ printf(" %d", n_name);
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStreamPushNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlStreamCtxtPtr stream; /* the stream context */
+ int n_stream;
+ xmlChar * name; /* the current name */
+ int n_name;
+ xmlChar * ns; /* the namespace name */
+ int n_ns;
+ int nodeType; /* the type of the node being pushed */
+ int n_nodeType;
+
+ for (n_stream = 0;n_stream < gen_nb_xmlStreamCtxtPtr;n_stream++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+ for (n_nodeType = 0;n_nodeType < gen_nb_int;n_nodeType++) {
+ mem_base = xmlMemBlocks();
+ stream = gen_xmlStreamCtxtPtr(n_stream, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ns = gen_const_xmlChar_ptr(n_ns, 2);
+ nodeType = gen_int(n_nodeType, 3);
+
+ ret_val = xmlStreamPushNode(stream, (const xmlChar *)name, (const xmlChar *)ns, nodeType);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlStreamCtxtPtr(n_stream, stream, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 2);
+ des_int(n_nodeType, nodeType, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStreamPushNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_stream);
+ printf(" %d", n_name);
+ printf(" %d", n_ns);
+ printf(" %d", n_nodeType);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStreamWantsAnyNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_PATTERN_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlStreamCtxtPtr streamCtxt; /* the stream context */
+ int n_streamCtxt;
+
+ for (n_streamCtxt = 0;n_streamCtxt < gen_nb_xmlStreamCtxtPtr;n_streamCtxt++) {
+ mem_base = xmlMemBlocks();
+ streamCtxt = gen_xmlStreamCtxtPtr(n_streamCtxt, 0);
+
+ ret_val = xmlStreamWantsAnyNode(streamCtxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlStreamCtxtPtr(n_streamCtxt, streamCtxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStreamWantsAnyNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_streamCtxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_pattern(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing pattern : 10 of 15 functions ...\n");
+ test_ret += test_xmlPatternFromRoot();
+ test_ret += test_xmlPatternGetStreamCtxt();
+ test_ret += test_xmlPatternMatch();
+ test_ret += test_xmlPatternMaxDepth();
+ test_ret += test_xmlPatternMinDepth();
+ test_ret += test_xmlPatternStreamable();
+ test_ret += test_xmlPatterncompile();
+ test_ret += test_xmlStreamPop();
+ test_ret += test_xmlStreamPush();
+ test_ret += test_xmlStreamPushAttr();
+ test_ret += test_xmlStreamPushNode();
+ test_ret += test_xmlStreamWantsAnyNode();
+
+ if (test_ret != 0)
+ printf("Module pattern: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlRelaxNGPtr 1
+static xmlRelaxNGPtr gen_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRelaxNGPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlRelaxNGDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * output; /* the file output */
+ int n_output;
+ xmlRelaxNGPtr schema; /* a schema structure */
+ int n_schema;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ schema = gen_xmlRelaxNGPtr(n_schema, 1);
+
+ xmlRelaxNGDump(output, schema);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlRelaxNGPtr(n_schema, schema, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_schema);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGDumpTree(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * output; /* the file output */
+ int n_output;
+ xmlRelaxNGPtr schema; /* a schema structure */
+ int n_schema;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ schema = gen_xmlRelaxNGPtr(n_schema, 1);
+
+ xmlRelaxNGDumpTree(output, schema);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlRelaxNGPtr(n_schema, schema, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGDumpTree",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_schema);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlRelaxNGParserCtxtPtr 1
+static xmlRelaxNGParserCtxtPtr gen_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRelaxNGParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlRelaxNGValidityErrorFunc_ptr 1
+static xmlRelaxNGValidityErrorFunc * gen_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRelaxNGValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlRelaxNGValidityWarningFunc_ptr 1
+static xmlRelaxNGValidityWarningFunc * gen_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRelaxNGValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlRelaxNGGetParserErrors(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGParserCtxtPtr ctxt; /* a Relax-NG validation context */
+ int n_ctxt;
+ xmlRelaxNGValidityErrorFunc * err; /* the error callback result */
+ int n_err;
+ xmlRelaxNGValidityWarningFunc * warn; /* the warning callback result */
+ int n_warn;
+ void ** ctx; /* contextual data for the callbacks result */
+ int n_ctx;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
+ for (n_err = 0;n_err < gen_nb_xmlRelaxNGValidityErrorFunc_ptr;n_err++) {
+ for (n_warn = 0;n_warn < gen_nb_xmlRelaxNGValidityWarningFunc_ptr;n_warn++) {
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
+ err = gen_xmlRelaxNGValidityErrorFunc_ptr(n_err, 1);
+ warn = gen_xmlRelaxNGValidityWarningFunc_ptr(n_warn, 2);
+ ctx = gen_void_ptr_ptr(n_ctx, 3);
+
+ ret_val = xmlRelaxNGGetParserErrors(ctxt, err, warn, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlRelaxNGValidityErrorFunc_ptr(n_err, err, 1);
+ des_xmlRelaxNGValidityWarningFunc_ptr(n_warn, warn, 2);
+ des_void_ptr_ptr(n_ctx, ctx, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGGetParserErrors",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_err);
+ printf(" %d", n_warn);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlRelaxNGValidCtxtPtr 1
+static xmlRelaxNGValidCtxtPtr gen_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRelaxNGValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRelaxNGValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlRelaxNGGetValidErrors(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
+ int n_ctxt;
+ xmlRelaxNGValidityErrorFunc * err; /* the error function result */
+ int n_err;
+ xmlRelaxNGValidityWarningFunc * warn; /* the warning function result */
+ int n_warn;
+ void ** ctx; /* the functions context result */
+ int n_ctx;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_err = 0;n_err < gen_nb_xmlRelaxNGValidityErrorFunc_ptr;n_err++) {
+ for (n_warn = 0;n_warn < gen_nb_xmlRelaxNGValidityWarningFunc_ptr;n_warn++) {
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ err = gen_xmlRelaxNGValidityErrorFunc_ptr(n_err, 1);
+ warn = gen_xmlRelaxNGValidityWarningFunc_ptr(n_warn, 2);
+ ctx = gen_void_ptr_ptr(n_ctx, 3);
+
+ ret_val = xmlRelaxNGGetValidErrors(ctxt, err, warn, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlRelaxNGValidityErrorFunc_ptr(n_err, err, 1);
+ des_xmlRelaxNGValidityWarningFunc_ptr(n_warn, warn, 2);
+ des_void_ptr_ptr(n_ctx, ctx, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGGetValidErrors",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_err);
+ printf(" %d", n_warn);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGInitTypes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlRelaxNGInitTypes();
+ desret_int(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGInitTypes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGNewDocParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlRelaxNGParserCtxtPtr ret_val;
+ xmlDocPtr doc; /* a preparsed document tree */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlRelaxNGNewDocParserCtxt(doc);
+ desret_xmlRelaxNGParserCtxtPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGNewDocParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGNewMemParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlRelaxNGParserCtxtPtr ret_val;
+ char * buffer; /* a pointer to a char array containing the schemas */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = xmlRelaxNGNewMemParserCtxt((const char *)buffer, size);
+ desret_xmlRelaxNGParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGNewMemParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGNewParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlRelaxNGParserCtxtPtr ret_val;
+ char * URL; /* the location of the schema */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_const_char_ptr(n_URL, 0);
+
+ ret_val = xmlRelaxNGNewParserCtxt((const char *)URL);
+ desret_xmlRelaxNGParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_URL, (const char *)URL, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGNewParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGNewValidCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGParse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGSetParserErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGSetParserStructuredErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGSetValidErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGSetValidStructuredErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGValidateDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* a Relax-NG validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a parsed document tree */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlRelaxNGValidateDoc(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGValidateDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGValidateFullElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+
+ ret_val = xmlRelaxNGValidateFullElement(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGValidateFullElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGValidatePopElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+
+ ret_val = xmlRelaxNGValidatePopElement(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGValidatePopElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGValidatePushCData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG validation context */
+ int n_ctxt;
+ xmlChar * data; /* some character data read */
+ int n_data;
+ int len; /* the length of the data */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ data = gen_const_xmlChar_ptr(n_data, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlRelaxNGValidatePushCData(ctxt, (const xmlChar *)data, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGValidatePushCData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_data);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxNGValidatePushElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+
+ ret_val = xmlRelaxNGValidatePushElement(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxNGValidatePushElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRelaxParserSetFlag(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRelaxNGParserCtxtPtr ctxt; /* a RelaxNG parser context */
+ int n_ctxt;
+ int flags; /* a set of flags values */
+ int n_flags;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGParserCtxtPtr;n_ctxt++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlRelaxNGParserCtxtPtr(n_ctxt, 0);
+ flags = gen_int(n_flags, 1);
+
+ ret_val = xmlRelaxParserSetFlag(ctxt, flags);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRelaxNGParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_int(n_flags, flags, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRelaxParserSetFlag",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_flags);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_relaxng(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing relaxng : 14 of 24 functions ...\n");
+ test_ret += test_xmlRelaxNGDump();
+ test_ret += test_xmlRelaxNGDumpTree();
+ test_ret += test_xmlRelaxNGGetParserErrors();
+ test_ret += test_xmlRelaxNGGetValidErrors();
+ test_ret += test_xmlRelaxNGInitTypes();
+ test_ret += test_xmlRelaxNGNewDocParserCtxt();
+ test_ret += test_xmlRelaxNGNewMemParserCtxt();
+ test_ret += test_xmlRelaxNGNewParserCtxt();
+ test_ret += test_xmlRelaxNGNewValidCtxt();
+ test_ret += test_xmlRelaxNGParse();
+ test_ret += test_xmlRelaxNGSetParserErrors();
+ test_ret += test_xmlRelaxNGSetParserStructuredErrors();
+ test_ret += test_xmlRelaxNGSetValidErrors();
+ test_ret += test_xmlRelaxNGSetValidStructuredErrors();
+ test_ret += test_xmlRelaxNGValidateDoc();
+ test_ret += test_xmlRelaxNGValidateFullElement();
+ test_ret += test_xmlRelaxNGValidatePopElement();
+ test_ret += test_xmlRelaxNGValidatePushCData();
+ test_ret += test_xmlRelaxNGValidatePushElement();
+ test_ret += test_xmlRelaxParserSetFlag();
+
+ if (test_ret != 0)
+ printf("Module relaxng: %d errors\n", test_ret);
+ return(test_ret);
+}
+static int
+test_schemasInternals(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing schemasInternals : 0 of 2 functions ...\n");
+
+ if (test_ret != 0)
+ printf("Module schemasInternals: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlSchematronNewDocParserCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchematronNewMemParserCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchematronNewParserCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#define gen_nb_xmlSchematronPtr 1
+static xmlSchematronPtr gen_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchematronPtr(int no ATTRIBUTE_UNUSED, xmlSchematronPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchematronNewValidCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#define gen_nb_xmlSchematronParserCtxtPtr 1
+static xmlSchematronParserCtxtPtr gen_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchematronParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchematronParse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#define gen_nb_xmlSchematronValidCtxtPtr 1
+static xmlSchematronValidCtxtPtr gen_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchematronValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchematronValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchematronSetValidStructuredErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchematronValidateDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMATRON_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchematronValidCtxtPtr ctxt; /* the schema validation context */
+ int n_ctxt;
+ xmlDocPtr instance; /* the document instace tree */
+ int n_instance;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchematronValidCtxtPtr;n_ctxt++) {
+ for (n_instance = 0;n_instance < gen_nb_xmlDocPtr;n_instance++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchematronValidCtxtPtr(n_ctxt, 0);
+ instance = gen_xmlDocPtr(n_instance, 1);
+
+ ret_val = xmlSchematronValidateDoc(ctxt, instance);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchematronValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_instance, instance, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchematronValidateDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_instance);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_schematron(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing schematron : 1 of 10 functions ...\n");
+ test_ret += test_xmlSchematronNewDocParserCtxt();
+ test_ret += test_xmlSchematronNewMemParserCtxt();
+ test_ret += test_xmlSchematronNewParserCtxt();
+ test_ret += test_xmlSchematronNewValidCtxt();
+ test_ret += test_xmlSchematronParse();
+ test_ret += test_xmlSchematronSetValidStructuredErrors();
+ test_ret += test_xmlSchematronValidateDoc();
+
+ if (test_ret != 0)
+ printf("Module schematron: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlAddChild(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+ xmlNodePtr cur; /* the child node */
+ int n_cur;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+ cur = gen_xmlNodePtr_in(n_cur, 1);
+
+ ret_val = xmlAddChild(parent, cur);
+ if (ret_val == NULL) { xmlFreeNode(cur) ; cur = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ des_xmlNodePtr_in(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddChildList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+ xmlNodePtr cur; /* the first node in the list */
+ int n_cur;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+ cur = gen_xmlNodePtr_in(n_cur, 1);
+
+ ret_val = xmlAddChildList(parent, cur);
+ if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ des_xmlNodePtr_in(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddChildList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddNextSibling(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr cur; /* the child node */
+ int n_cur;
+ xmlNodePtr elem; /* the new node */
+ int n_elem;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ elem = gen_xmlNodePtr_in(n_elem, 1);
+
+ ret_val = xmlAddNextSibling(cur, elem);
+ if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_xmlNodePtr_in(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddNextSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddPrevSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr cur; /* the child node */
+ int n_cur;
+ xmlNodePtr elem; /* the new node */
+ int n_elem;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ elem = gen_xmlNodePtr_in(n_elem, 1);
+
+ ret_val = xmlAddPrevSibling(cur, elem);
+ if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_xmlNodePtr_in(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddPrevSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddSibling(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr cur; /* the child node */
+ int n_cur;
+ xmlNodePtr elem; /* the new node */
+ int n_elem;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr_in;n_elem++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ elem = gen_xmlNodePtr_in(n_elem, 1);
+
+ ret_val = xmlAddSibling(cur, elem);
+ if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_xmlNodePtr_in(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAttrSerializeTxtContent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef LIBXML_OUTPUT_ENABLED
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlAttrPtr attr; /* the attribute node */
+ int n_attr;
+ xmlChar * string; /* the text content */
+ int n_string;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ attr = gen_xmlAttrPtr(n_attr, 2);
+ string = gen_const_xmlChar_ptr(n_string, 3);
+
+ xmlAttrSerializeTxtContent(buf, doc, attr, (const xmlChar *)string);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlAttrPtr(n_attr, attr, 2);
+ des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAttrSerializeTxtContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_attr);
+ printf(" %d", n_string);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlBuf_ptr 1
+static xmlBuf * gen_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlBuf_ptr(int no ATTRIBUTE_UNUSED, const xmlBuf * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlBuf * buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuf_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_const_xmlBuf_ptr(n_buf, 0);
+
+ ret_val = xmlBufContent((const xmlBuf *)buf);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlBuf_ptr(n_buf, (const xmlBuf *)buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlBufPtr 1
+static xmlBufPtr gen_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlBufPtr(int no ATTRIBUTE_UNUSED, xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufEnd(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlBufPtr buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufPtr(n_buf, 0);
+
+ ret_val = xmlBufEnd(buf);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlBufPtr(n_buf, buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufEnd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlNode_ptr 1
+static xmlNode * gen_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlNode_ptr(int no ATTRIBUTE_UNUSED, const xmlNode * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufGetNodeContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufPtr buf; /* a buffer xmlBufPtr */
+ int n_buf;
+ xmlNode * cur; /* the node being read */
+ int n_cur;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufPtr(n_buf, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
+
+ ret_val = xmlBufGetNodeContent(buf, (const xmlNode *)cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufPtr(n_buf, buf, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufGetNodeContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufNodeDump(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufShrink(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlBufPtr 1
+static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufUse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferAdd(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer to dump */
+ int n_buf;
+ xmlChar * str; /* the #xmlChar string */
+ int n_str;
+ int len; /* the number of #xmlChar to add */
+ int n_len;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlBufferAdd(buf, (const xmlChar *)str, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferAdd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_str);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferAddHead(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer */
+ int n_buf;
+ xmlChar * str; /* the #xmlChar string */
+ int n_str;
+ int len; /* the number of #xmlChar to add */
+ int n_len;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlBufferAddHead(buf, (const xmlChar *)str, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferAddHead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_str);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferCCat(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer to dump */
+ int n_buf;
+ char * str; /* the C char string */
+ int n_str;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ str = gen_const_char_ptr(n_str, 1);
+
+ ret_val = xmlBufferCCat(buf, (const char *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_char_ptr(n_str, (const char *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferCCat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferCat(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer to add to */
+ int n_buf;
+ xmlChar * str; /* the #xmlChar string */
+ int n_str;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+
+ ret_val = xmlBufferCat(buf, (const xmlChar *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferCat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_const_xmlBuffer_ptr 1
+static xmlBuffer * gen_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_const_xmlBuffer_ptr(int no ATTRIBUTE_UNUSED, const xmlBuffer * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufferContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlBuffer * buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_const_xmlBuffer_ptr(n_buf, 0);
+
+ ret_val = xmlBufferContent((const xmlBuffer *)buf);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferCreate(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlBufferCreate();
+ desret_xmlBufferPtr(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferCreate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferCreateSize(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferCreateStatic(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferDetach(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlBufferPtr buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+
+ ret_val = xmlBufferDetach(buf);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferDetach",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferEmpty(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+
+ xmlBufferEmpty(buf);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferEmpty",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferGrow(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer */
+ int n_buf;
+ unsigned int len; /* the minimum free size to allocate */
+ int n_len;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ len = gen_unsigned_int(n_len, 1);
+
+ ret_val = xmlBufferGrow(buf, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_unsigned_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferGrow",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferLength(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBuffer * buf; /* the buffer */
+ int n_buf;
+
+ for (n_buf = 0;n_buf < gen_nb_const_xmlBuffer_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_const_xmlBuffer_ptr(n_buf, 0);
+
+ ret_val = xmlBufferLength((const xmlBuffer *)buf);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlBuffer_ptr(n_buf, (const xmlBuffer *)buf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferLength",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferResize(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer to resize */
+ int n_buf;
+ unsigned int size; /* the desired size */
+ int n_size;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_size = 0;n_size < gen_nb_unsigned_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ size = gen_unsigned_int(n_size, 1);
+
+ ret_val = xmlBufferResize(buf, size);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_unsigned_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferResize",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferSetAllocationScheme(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr buf; /* the buffer to tune */
+ int n_buf;
+ xmlBufferAllocationScheme scheme; /* allocation scheme to use */
+ int n_scheme;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
+
+ xmlBufferSetAllocationScheme(buf, scheme);
+ if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlBufferAllocationScheme(n_scheme, scheme, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferSetAllocationScheme",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_scheme);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferShrink(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the buffer to dump */
+ int n_buf;
+ unsigned int len; /* the number of xmlChar to remove */
+ int n_len;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_len = 0;n_len < gen_nb_unsigned_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ len = gen_unsigned_int(n_len, 1);
+
+ ret_val = xmlBufferShrink(buf, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_unsigned_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferShrink",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferWriteCHAR(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer */
+ int n_buf;
+ xmlChar * string; /* the string to add */
+ int n_string;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ string = gen_const_xmlChar_ptr(n_string, 1);
+
+ xmlBufferWriteCHAR(buf, (const xmlChar *)string);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferWriteCHAR",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_string);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferWriteChar(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ char * string; /* the string to add */
+ int n_string;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_string = 0;n_string < gen_nb_const_char_ptr;n_string++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ string = gen_const_char_ptr(n_string, 1);
+
+ xmlBufferWriteChar(buf, (const char *)string);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_char_ptr(n_string, (const char *)string, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferWriteChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_string);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBufferWriteQuotedString(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlChar * string; /* the string to add */
+ int n_string;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr;n_string++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ string = gen_const_xmlChar_ptr(n_string, 1);
+
+ xmlBufferWriteQuotedString(buf, (const xmlChar *)string);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBufferWriteQuotedString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_string);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBuildQName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * ncname; /* the Name */
+ int n_ncname;
+ xmlChar * prefix; /* the prefix */
+ int n_prefix;
+ xmlChar * memory; /* preallocated memory */
+ int n_memory;
+ int len; /* preallocated memory length */
+ int n_len;
+
+ for (n_ncname = 0;n_ncname < gen_nb_const_xmlChar_ptr;n_ncname++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_memory = 0;n_memory < gen_nb_xmlChar_ptr;n_memory++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ncname = gen_const_xmlChar_ptr(n_ncname, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ memory = gen_xmlChar_ptr(n_memory, 2);
+ len = gen_int(n_len, 3);
+
+ ret_val = xmlBuildQName((const xmlChar *)ncname, (const xmlChar *)prefix, memory, len);
+ if ((ret_val != NULL) && (ret_val != ncname) &&
+ (ret_val != prefix) && (ret_val != memory))
+ xmlFree(ret_val);
+ ret_val = NULL;
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_ncname, (const xmlChar *)ncname, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_xmlChar_ptr(n_memory, memory, 2);
+ des_int(n_len, len, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBuildQName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ncname);
+ printf(" %d", n_prefix);
+ printf(" %d", n_memory);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlChildElementCount(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ unsigned long ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+
+ ret_val = xmlChildElementCount(parent);
+ desret_unsigned_long(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlChildElementCount",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ int recursive; /* if not zero do a recursive copy. */
+ int n_recursive;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_recursive = 0;n_recursive < gen_nb_int;n_recursive++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ recursive = gen_int(n_recursive, 1);
+
+ ret_val = xmlCopyDoc(doc, recursive);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_int(n_recursive, recursive, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_recursive);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyDtd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlDtdPtr dtd; /* the dtd */
+ int n_dtd;
+
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ mem_base = xmlMemBlocks();
+ dtd = gen_xmlDtdPtr(n_dtd, 0);
+
+ ret_val = xmlCopyDtd(dtd);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_xmlDtdPtr(n_dtd, dtd, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyDtd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dtd);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyNamespace(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNsPtr ret_val;
+ xmlNsPtr cur; /* the namespace */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNsPtr(n_cur, 0);
+
+ ret_val = xmlCopyNamespace(cur);
+ if (ret_val != NULL) xmlFreeNs(ret_val);
+ desret_xmlNsPtr(ret_val);
+ call_tests++;
+ des_xmlNsPtr(n_cur, cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyNamespace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyNamespaceList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNsPtr ret_val;
+ xmlNsPtr cur; /* the first namespace */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNsPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNsPtr(n_cur, 0);
+
+ ret_val = xmlCopyNamespaceList(cur);
+ if (ret_val != NULL) xmlFreeNsList(ret_val);
+ desret_xmlNsPtr(ret_val);
+ call_tests++;
+ des_xmlNsPtr(n_cur, cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyNamespaceList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
+ int n_extended;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ extended = gen_int(n_extended, 1);
+
+ ret_val = xmlCopyNode(node, extended);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_int(n_extended, extended, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_extended);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyNodeList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr node; /* the first node in the list. */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlCopyNodeList(node);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr target; /* the element where the attribute will be grafted */
+ int n_target;
+ xmlAttrPtr cur; /* the attribute */
+ int n_cur;
+
+ for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ target = gen_xmlNodePtr(n_target, 0);
+ cur = gen_xmlAttrPtr(n_cur, 1);
+
+ ret_val = xmlCopyProp(target, cur);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_target, target, 0);
+ des_xmlAttrPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_target);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyPropList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr target; /* the element where the attributes will be grafted */
+ int n_target;
+ xmlAttrPtr cur; /* the first attribute */
+ int n_cur;
+
+ for (n_target = 0;n_target < gen_nb_xmlNodePtr;n_target++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ target = gen_xmlNodePtr(n_target, 0);
+ cur = gen_xmlAttrPtr(n_cur, 1);
+
+ ret_val = xmlCopyPropList(target, cur);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_target, target, 0);
+ des_xmlAttrPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyPropList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_target);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateIntSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlDocPtr doc; /* the document pointer */
+ int n_doc;
+ xmlChar * name; /* the DTD name */
+ int n_name;
+ xmlChar * ExternalID; /* the external (PUBLIC) ID */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the system ID */
+ int n_SystemID;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
+
+ ret_val = xmlCreateIntSubset(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCreateIntSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlDOMWrapCtxtPtr 1
+static xmlDOMWrapCtxtPtr gen_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlDOMWrapCtxtPtr(int no ATTRIBUTE_UNUSED, xmlDOMWrapCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlDOMWrapAdoptNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
+ int n_ctxt;
+ xmlDocPtr sourceDoc; /* the optional sourceDoc */
+ int n_sourceDoc;
+ xmlNodePtr node; /* the node to start with */
+ int n_node;
+ xmlDocPtr destDoc; /* the destination doc */
+ int n_destDoc;
+ xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
+ int n_destParent;
+ int options; /* option flags */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
+ for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
+ for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
+ sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ destDoc = gen_xmlDocPtr(n_destDoc, 3);
+ destParent = gen_xmlNodePtr(n_destParent, 4);
+ options = gen_int(n_options, 5);
+
+ ret_val = xmlDOMWrapAdoptNode(ctxt, sourceDoc, node, destDoc, destParent, options);
+ if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlDocPtr(n_destDoc, destDoc, 3);
+ des_xmlNodePtr(n_destParent, destParent, 4);
+ des_int(n_options, options, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDOMWrapAdoptNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_sourceDoc);
+ printf(" %d", n_node);
+ printf(" %d", n_destDoc);
+ printf(" %d", n_destParent);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDOMWrapCloneNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDOMWrapCtxtPtr ctxt; /* the optional context for custom processing */
+ int n_ctxt;
+ xmlDocPtr sourceDoc; /* the optional sourceDoc */
+ int n_sourceDoc;
+ xmlNodePtr node; /* the node to start with */
+ int n_node;
+ xmlNodePtr * resNode; /* the clone of the given @node */
+ int n_resNode;
+ xmlDocPtr destDoc; /* the destination doc */
+ int n_destDoc;
+ xmlNodePtr destParent; /* the optional new parent of @node in @destDoc */
+ int n_destParent;
+ int deep; /* descend into child if set */
+ int n_deep;
+ int options; /* option flags */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
+ for (n_sourceDoc = 0;n_sourceDoc < gen_nb_xmlDocPtr;n_sourceDoc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_resNode = 0;n_resNode < gen_nb_xmlNodePtr_ptr;n_resNode++) {
+ for (n_destDoc = 0;n_destDoc < gen_nb_xmlDocPtr;n_destDoc++) {
+ for (n_destParent = 0;n_destParent < gen_nb_xmlNodePtr;n_destParent++) {
+ for (n_deep = 0;n_deep < gen_nb_int;n_deep++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
+ sourceDoc = gen_xmlDocPtr(n_sourceDoc, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ resNode = gen_xmlNodePtr_ptr(n_resNode, 3);
+ destDoc = gen_xmlDocPtr(n_destDoc, 4);
+ destParent = gen_xmlNodePtr(n_destParent, 5);
+ deep = gen_int(n_deep, 6);
+ options = gen_int(n_options, 7);
+
+ ret_val = xmlDOMWrapCloneNode(ctxt, sourceDoc, node, resNode, destDoc, destParent, deep, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_sourceDoc, sourceDoc, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_xmlNodePtr_ptr(n_resNode, resNode, 3);
+ des_xmlDocPtr(n_destDoc, destDoc, 4);
+ des_xmlNodePtr(n_destParent, destParent, 5);
+ des_int(n_deep, deep, 6);
+ des_int(n_options, options, 7);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDOMWrapCloneNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_sourceDoc);
+ printf(" %d", n_node);
+ printf(" %d", n_resNode);
+ printf(" %d", n_destDoc);
+ printf(" %d", n_destParent);
+ printf(" %d", n_deep);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDOMWrapNewCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlDOMWrapReconcileNamespaces(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDOMWrapCtxtPtr ctxt; /* DOM wrapper context, unused at the moment */
+ int n_ctxt;
+ xmlNodePtr elem; /* the element-node */
+ int n_elem;
+ int options; /* option flags */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
+ elem = gen_xmlNodePtr(n_elem, 1);
+ options = gen_int(n_options, 2);
+
+ ret_val = xmlDOMWrapReconcileNamespaces(ctxt, elem, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_elem, elem, 1);
+ des_int(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDOMWrapReconcileNamespaces",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_elem);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDOMWrapRemoveNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDOMWrapCtxtPtr ctxt; /* a DOM wrapper context */
+ int n_ctxt;
+ xmlDocPtr doc; /* the doc */
+ int n_doc;
+ xmlNodePtr node; /* the node to be removed. */
+ int n_node;
+ int options; /* set of options, unused at the moment */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlDOMWrapCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlDOMWrapCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ node = gen_xmlNodePtr(n_node, 2);
+ options = gen_int(n_options, 3);
+
+ ret_val = xmlDOMWrapRemoveNode(ctxt, doc, node, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_node, node, 2);
+ des_int(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDOMWrapRemoveNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_node);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocCopyNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ int extended; /* if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) */
+ int n_extended;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_extended = 0;n_extended < gen_nb_int;n_extended++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ extended = gen_int(n_extended, 2);
+
+ ret_val = xmlDocCopyNode(node, doc, extended);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_int(n_extended, extended, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocCopyNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_doc);
+ printf(" %d", n_extended);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocCopyNodeList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the target document */
+ int n_doc;
+ xmlNodePtr node; /* the first node in the list. */
+ int n_node;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlDocCopyNodeList(doc, node);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocCopyNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ FILE * f; /* the FILE* */
+ int n_f;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+
+ for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ f = gen_FILE_ptr(n_f, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+
+ ret_val = xmlDocDump(f, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_f, f, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_f);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocDumpFormatMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ xmlChar ** mem; /* OUT: the memory pointer */
+ int n_mem;
+ int * size; /* OUT: the memory length */
+ int n_size;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlDocPtr(n_cur, 0);
+ mem = gen_xmlChar_ptr_ptr(n_mem, 1);
+ size = gen_int_ptr(n_size, 2);
+ format = gen_int(n_format, 3);
+
+ xmlDocDumpFormatMemory(cur, mem, size, format);
+ call_tests++;
+ des_xmlDocPtr(n_cur, cur, 0);
+ des_xmlChar_ptr_ptr(n_mem, mem, 1);
+ des_int_ptr(n_size, size, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocDumpFormatMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocDumpFormatMemoryEnc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr out_doc; /* Document to generate XML text from */
+ int n_out_doc;
+ xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
+ int n_doc_txt_ptr;
+ int * doc_txt_len; /* Length of the generated XML text */
+ int n_doc_txt_len;
+ char * txt_encoding; /* Character encoding to use when generating XML text */
+ int n_txt_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
+ for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
+ for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
+ for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ out_doc = gen_xmlDocPtr(n_out_doc, 0);
+ doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
+ doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
+ txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
+ format = gen_int(n_format, 4);
+
+ xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding, format);
+ call_tests++;
+ des_xmlDocPtr(n_out_doc, out_doc, 0);
+ des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
+ des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
+ des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
+ des_int(n_format, format, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocDumpFormatMemoryEnc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out_doc);
+ printf(" %d", n_doc_txt_ptr);
+ printf(" %d", n_doc_txt_len);
+ printf(" %d", n_txt_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocDumpMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ xmlChar ** mem; /* OUT: the memory pointer */
+ int n_mem;
+ int * size; /* OUT: the memory length */
+ int n_size;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlDocPtr(n_cur, 0);
+ mem = gen_xmlChar_ptr_ptr(n_mem, 1);
+ size = gen_int_ptr(n_size, 2);
+
+ xmlDocDumpMemory(cur, mem, size);
+ call_tests++;
+ des_xmlDocPtr(n_cur, cur, 0);
+ des_xmlChar_ptr_ptr(n_mem, mem, 1);
+ des_int_ptr(n_size, size, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocDumpMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocDumpMemoryEnc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlDocPtr out_doc; /* Document to generate XML text from */
+ int n_out_doc;
+ xmlChar ** doc_txt_ptr; /* Memory pointer for allocated XML text */
+ int n_doc_txt_ptr;
+ int * doc_txt_len; /* Length of the generated XML text */
+ int n_doc_txt_len;
+ char * txt_encoding; /* Character encoding to use when generating XML text */
+ int n_txt_encoding;
+
+ for (n_out_doc = 0;n_out_doc < gen_nb_xmlDocPtr;n_out_doc++) {
+ for (n_doc_txt_ptr = 0;n_doc_txt_ptr < gen_nb_xmlChar_ptr_ptr;n_doc_txt_ptr++) {
+ for (n_doc_txt_len = 0;n_doc_txt_len < gen_nb_int_ptr;n_doc_txt_len++) {
+ for (n_txt_encoding = 0;n_txt_encoding < gen_nb_const_char_ptr;n_txt_encoding++) {
+ mem_base = xmlMemBlocks();
+ out_doc = gen_xmlDocPtr(n_out_doc, 0);
+ doc_txt_ptr = gen_xmlChar_ptr_ptr(n_doc_txt_ptr, 1);
+ doc_txt_len = gen_int_ptr(n_doc_txt_len, 2);
+ txt_encoding = gen_const_char_ptr(n_txt_encoding, 3);
+
+ xmlDocDumpMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, (const char *)txt_encoding);
+ call_tests++;
+ des_xmlDocPtr(n_out_doc, out_doc, 0);
+ des_xmlChar_ptr_ptr(n_doc_txt_ptr, doc_txt_ptr, 1);
+ des_int_ptr(n_doc_txt_len, doc_txt_len, 2);
+ des_const_char_ptr(n_txt_encoding, (const char *)txt_encoding, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocDumpMemoryEnc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out_doc);
+ printf(" %d", n_doc_txt_ptr);
+ printf(" %d", n_doc_txt_len);
+ printf(" %d", n_txt_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocFormatDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ FILE * f; /* the FILE* */
+ int n_f;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ f = gen_FILE_ptr(n_f, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ format = gen_int(n_format, 2);
+
+ ret_val = xmlDocFormatDump(f, cur, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_f, f, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_int(n_format, format, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocFormatDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_f);
+ printf(" %d", n_cur);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocGetRootElement(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+
+ ret_val = xmlDocGetRootElement((const xmlDoc *)doc);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocGetRootElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDocSetRootElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr root; /* the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead. */
+ int n_root;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_root = 0;n_root < gen_nb_xmlNodePtr_in;n_root++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ root = gen_xmlNodePtr_in(n_root, 1);
+
+ ret_val = xmlDocSetRootElement(doc, root);
+ if (doc == NULL) { xmlFreeNode(root) ; root = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr_in(n_root, root, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDocSetRootElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_root);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlElemDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * f; /* the FILE * for the output */
+ int n_f;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+
+ for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ f = gen_FILE_ptr(n_f, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+
+ xmlElemDump(f, doc, cur);
+ call_tests++;
+ des_FILE_ptr(n_f, f, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlElemDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_f);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFirstElementChild(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+
+ ret_val = xmlFirstElementChild(parent);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlFirstElementChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetBufferAllocationScheme(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferAllocationScheme ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlGetBufferAllocationScheme();
+ desret_xmlBufferAllocationScheme(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetBufferAllocationScheme",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetCompressMode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlGetCompressMode();
+ desret_int(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetCompressMode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDocCompressMode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+
+ ret_val = xmlGetDocCompressMode((const xmlDoc *)doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDocCompressMode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetIntSubset(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlDoc * doc; /* the document pointer */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+
+ ret_val = xmlGetIntSubset((const xmlDoc *)doc);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetIntSubset",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetLastChild(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNode * parent; /* the parent node */
+ int n_parent;
+
+ for (n_parent = 0;n_parent < gen_nb_const_xmlNode_ptr;n_parent++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_const_xmlNode_ptr(n_parent, 0);
+
+ ret_val = xmlGetLastChild((const xmlNode *)parent);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_parent, (const xmlNode *)parent, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetLastChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetLineNo(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ long ret_val;
+ xmlNode * node; /* valid node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+
+ ret_val = xmlGetLineNo((const xmlNode *)node);
+ desret_long(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetLineNo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetNoNsProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetNoNsProp((const xmlNode *)node, (const xmlChar *)name);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetNoNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetNodePath(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * node; /* a node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+
+ ret_val = xmlGetNodePath((const xmlNode *)node);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetNodePath",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetNsList(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetNsProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * nameSpace; /* the URI of the namespace */
+ int n_nameSpace;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
+
+ ret_val = xmlGetNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf(" %d", n_nameSpace);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetProp((const xmlNode *)node, (const xmlChar *)name);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHasNsProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * nameSpace; /* the URI of the namespace */
+ int n_nameSpace;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
+
+ ret_val = xmlHasNsProp((const xmlNode *)node, (const xmlChar *)name, (const xmlChar *)nameSpace);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHasNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf(" %d", n_nameSpace);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlHasProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlHasProp((const xmlNode *)node, (const xmlChar *)name);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlHasProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsBlankNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+
+ ret_val = xmlIsBlankNode((const xmlNode *)node);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsBlankNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsXHTML(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * systemID; /* the system identifier */
+ int n_systemID;
+ xmlChar * publicID; /* the public identifier */
+ int n_publicID;
+
+ for (n_systemID = 0;n_systemID < gen_nb_const_xmlChar_ptr;n_systemID++) {
+ for (n_publicID = 0;n_publicID < gen_nb_const_xmlChar_ptr;n_publicID++) {
+ mem_base = xmlMemBlocks();
+ systemID = gen_const_xmlChar_ptr(n_systemID, 0);
+ publicID = gen_const_xmlChar_ptr(n_publicID, 1);
+
+ ret_val = xmlIsXHTML((const xmlChar *)systemID, (const xmlChar *)publicID);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_systemID, (const xmlChar *)systemID, 0);
+ des_const_xmlChar_ptr(n_publicID, (const xmlChar *)publicID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsXHTML",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_systemID);
+ printf(" %d", n_publicID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlLastElementChild(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+
+ ret_val = xmlLastElementChild(parent);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlLastElementChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewCDataBlock(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * content; /* the CDATA block content content */
+ int n_content;
+ int len; /* the length of the block */
+ int n_len;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlNewCDataBlock(doc, (const xmlChar *)content, len);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewCDataBlock",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewCharRef(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the char ref string, starting with # or "&# ... ;" */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlNewCharRef(doc, (const xmlChar *)name);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewCharRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewChild(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+ xmlNsPtr ns; /* a namespace if any */
+ int n_ns;
+ xmlChar * name; /* the name of the child */
+ int n_name;
+ xmlChar * content; /* the XML content of the child if any. */
+ int n_content;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlNewChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewComment(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlChar * content; /* the comment content */
+ int n_content;
+
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ content = gen_const_xmlChar_ptr(n_content, 0);
+
+ ret_val = xmlNewComment((const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewComment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDoc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlChar * version; /* xmlChar string giving the version of XML "1.0" */
+ int n_version;
+
+ for (n_version = 0;n_version < gen_nb_const_xmlChar_ptr;n_version++) {
+ mem_base = xmlMemBlocks();
+ version = gen_const_xmlChar_ptr(n_version, 0);
+
+ ret_val = xmlNewDoc((const xmlChar *)version);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_version, (const xmlChar *)version, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_version);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocComment(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * content; /* the comment content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlNewDocComment(doc, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocComment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocFragment(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document owning the fragment */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlNewDocFragment(doc);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocFragment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNsPtr ns; /* namespace if any */
+ int n_ns;
+ xmlChar * name; /* the node name */
+ int n_name;
+ xmlChar * content; /* the XML text content if any */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlNewDocNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocNodeEatName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNsPtr ns; /* namespace if any */
+ int n_ns;
+ xmlChar * name; /* the node name */
+ int n_name;
+ xmlChar * content; /* the XML text content if any */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_eaten_name(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlNewDocNodeEatName(doc, ns, name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_eaten_name(n_name, name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocNodeEatName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocPI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the target document */
+ int n_doc;
+ xmlChar * name; /* the processing instruction name */
+ int n_name;
+ xmlChar * content; /* the PI content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlNewDocPI(doc, (const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocPI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the name of the attribute */
+ int n_name;
+ xmlChar * value; /* the value of the attribute */
+ int n_value;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+
+ ret_val = xmlNewDocProp(doc, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocRawNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNsPtr ns; /* namespace if any */
+ int n_ns;
+ xmlChar * name; /* the node name */
+ int n_name;
+ xmlChar * content; /* the text content if any */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlNewDocRawNode(doc, ns, (const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocRawNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocText(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+ xmlChar * content; /* the text content */
+ int n_content;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlNewDocText((const xmlDoc *)doc, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocText",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocTextLen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * content; /* the text content */
+ int n_content;
+ int len; /* the text len. */
+ int n_len;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlNewDocTextLen(doc, (const xmlChar *)content, len);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocTextLen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDtd(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDtdPtr ret_val;
+ xmlDocPtr doc; /* the document pointer */
+ int n_doc;
+ xmlChar * name; /* the DTD name */
+ int n_name;
+ xmlChar * ExternalID; /* the external ID */
+ int n_ExternalID;
+ xmlChar * SystemID; /* the system ID */
+ int n_SystemID;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {
+ for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);
+ SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);
+
+ ret_val = xmlNewDtd(doc, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);
+ desret_xmlDtdPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);
+ des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDtd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_ExternalID);
+ printf(" %d", n_SystemID);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewNode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNsPtr ns; /* namespace if any */
+ int n_ns;
+ xmlChar * name; /* the node name */
+ int n_name;
+
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ns = gen_xmlNsPtr(n_ns, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlNewNode(ns, (const xmlChar *)name);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNsPtr(n_ns, ns, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewNodeEatName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNsPtr ns; /* namespace if any */
+ int n_ns;
+ xmlChar * name; /* the node name */
+ int n_name;
+
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
+ mem_base = xmlMemBlocks();
+ ns = gen_xmlNsPtr(n_ns, 0);
+ name = gen_eaten_name(n_name, 1);
+
+ ret_val = xmlNewNodeEatName(ns, name);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNsPtr(n_ns, ns, 0);
+ des_eaten_name(n_name, name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewNodeEatName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewNs(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNsPtr ret_val;
+ xmlNodePtr node; /* the element carrying the namespace */
+ int n_node;
+ xmlChar * href; /* the URI associated */
+ int n_href;
+ xmlChar * prefix; /* the prefix for the namespace */
+ int n_prefix;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ href = gen_const_xmlChar_ptr(n_href, 1);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 2);
+
+ ret_val = xmlNewNs(node, (const xmlChar *)href, (const xmlChar *)prefix);
+ if ((node == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);
+ desret_xmlNsPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 1);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_href);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewNsProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr node; /* the holding node */
+ int n_node;
+ xmlNsPtr ns; /* the namespace */
+ int n_ns;
+ xmlChar * name; /* the name of the attribute */
+ int n_name;
+ xmlChar * value; /* the value of the attribute */
+ int n_value;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ value = gen_const_xmlChar_ptr(n_value, 3);
+
+ ret_val = xmlNewNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewNsPropEatName(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr node; /* the holding node */
+ int n_node;
+ xmlNsPtr ns; /* the namespace */
+ int n_ns;
+ xmlChar * name; /* the name of the attribute */
+ int n_name;
+ xmlChar * value; /* the value of the attribute */
+ int n_value;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_eaten_name;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_eaten_name(n_name, 2);
+ value = gen_const_xmlChar_ptr(n_value, 3);
+
+ ret_val = xmlNewNsPropEatName(node, ns, name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_eaten_name(n_name, name, 2);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewNsPropEatName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewPI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlChar * name; /* the processing instruction name */
+ int n_name;
+ xmlChar * content; /* the PI content */
+ int n_content;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlNewPI((const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewPI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr node; /* the holding node */
+ int n_node;
+ xmlChar * name; /* the name of the attribute */
+ int n_name;
+ xmlChar * value; /* the value of the attribute */
+ int n_value;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+
+ ret_val = xmlNewProp(node, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewReference(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the reference name, or the reference string with & and ; */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlNewReference((const xmlDoc *)doc, (const xmlChar *)name);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewReference",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewText(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlChar * content; /* the text content */
+ int n_content;
+
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ content = gen_const_xmlChar_ptr(n_content, 0);
+
+ ret_val = xmlNewText((const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewText",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextChild(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr parent; /* the parent node */
+ int n_parent;
+ xmlNsPtr ns; /* a namespace if any */
+ int n_ns;
+ xmlChar * name; /* the name of the child */
+ int n_name;
+ xmlChar * content; /* the text content of the child if any. */
+ int n_content;
+
+ for (n_parent = 0;n_parent < gen_nb_xmlNodePtr;n_parent++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ parent = gen_xmlNodePtr(n_parent, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlNewTextChild(parent, ns, (const xmlChar *)name, (const xmlChar *)content);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_parent, parent, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_parent);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextLen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlChar * content; /* the text content */
+ int n_content;
+ int len; /* the text len. */
+ int n_len;
+
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ content = gen_const_xmlChar_ptr(n_content, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlNewTextLen((const xmlChar *)content, len);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextLen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNextElementSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr node; /* the current node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlNextElementSibling(node);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNextElementSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeAddContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr cur; /* the node being modified */
+ int n_cur;
+ xmlChar * content; /* extra content */
+ int n_content;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ xmlNodeAddContent(cur, (const xmlChar *)content);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeAddContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeAddContentLen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr cur; /* the node being modified */
+ int n_cur;
+ xmlChar * content; /* extra content */
+ int n_content;
+ int len; /* the size of @content */
+ int n_len;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ xmlNodeAddContentLen(cur, (const xmlChar *)content, len);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeAddContentLen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeBufGetContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buffer; /* a buffer */
+ int n_buffer;
+ xmlNode * cur; /* the node being read */
+ int n_cur;
+
+ for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_xmlBufferPtr(n_buffer, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
+
+ ret_val = xmlNodeBufGetContent(buffer, (const xmlNode *)cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buffer, buffer, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeBufGetContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+ int level; /* the imbrication level for indenting */
+ int n_level;
+ int format; /* is formatting allowed */
+ int n_format;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_level = 0;n_level < gen_nb_int;n_level++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+ level = gen_int(n_level, 3);
+ format = gen_int(n_format, 4);
+
+ ret_val = xmlNodeDump(buf, doc, cur, level, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ des_int(n_level, level, 3);
+ des_int(n_format, format, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf(" %d", n_level);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeDumpOutput(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr cur; /* the current node */
+ int n_cur;
+ int level; /* the imbrication level for indenting */
+ int n_level;
+ int format; /* is formatting allowed */
+ int n_format;
+ char * encoding; /* an optional encoding string */
+ int n_encoding;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_level = 0;n_level < gen_nb_int;n_level++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ cur = gen_xmlNodePtr(n_cur, 2);
+ level = gen_int(n_level, 3);
+ format = gen_int(n_format, 4);
+ encoding = gen_const_char_ptr(n_encoding, 5);
+
+ xmlNodeDumpOutput(buf, doc, cur, level, format, (const char *)encoding);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_cur, cur, 2);
+ des_int(n_level, level, 3);
+ des_int(n_format, format, 4);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeDumpOutput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf(" %d", n_level);
+ printf(" %d", n_format);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeGetBase(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDoc * doc; /* the document the node pertains to */
+ int n_doc;
+ xmlNode * cur; /* the node being checked */
+ int n_cur;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ cur = gen_const_xmlNode_ptr(n_cur, 1);
+
+ ret_val = xmlNodeGetBase((const xmlDoc *)doc, (const xmlNode *)cur);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeGetBase",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeGetContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * cur; /* the node being read */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
+
+ ret_val = xmlNodeGetContent((const xmlNode *)cur);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeGetContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeGetLang(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNode * cur; /* the node being checked */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
+
+ ret_val = xmlNodeGetLang((const xmlNode *)cur);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeGetLang",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeGetSpacePreserve(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlNode * cur; /* the node being checked */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlNode_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlNode_ptr(n_cur, 0);
+
+ ret_val = xmlNodeGetSpacePreserve((const xmlNode *)cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_cur, (const xmlNode *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeGetSpacePreserve",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeIsText(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlNode * node; /* the node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_const_xmlNode_ptr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_const_xmlNode_ptr(n_node, 0);
+
+ ret_val = xmlNodeIsText((const xmlNode *)node);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlNode_ptr(n_node, (const xmlNode *)node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeIsText",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeListGetRawString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+ xmlNode * list; /* a Node list */
+ int n_list;
+ int inLine; /* should we replace entity contents or show their external form */
+ int n_inLine;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
+ for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ list = gen_const_xmlNode_ptr(n_list, 1);
+ inLine = gen_int(n_inLine, 2);
+
+ ret_val = xmlNodeListGetRawString((const xmlDoc *)doc, (const xmlNode *)list, inLine);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
+ des_int(n_inLine, inLine, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeListGetRawString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_list);
+ printf(" %d", n_inLine);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeListGetString(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNode * list; /* a Node list */
+ int n_list;
+ int inLine; /* should we replace entity contents or show their external form */
+ int n_inLine;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_list = 0;n_list < gen_nb_const_xmlNode_ptr;n_list++) {
+ for (n_inLine = 0;n_inLine < gen_nb_int;n_inLine++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ list = gen_const_xmlNode_ptr(n_list, 1);
+ inLine = gen_int(n_inLine, 2);
+
+ ret_val = xmlNodeListGetString(doc, (const xmlNode *)list, inLine);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlNode_ptr(n_list, (const xmlNode *)list, 1);
+ des_int(n_inLine, inLine, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeListGetString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_list);
+ printf(" %d", n_inLine);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetBase(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ xmlNodePtr cur; /* the node being changed */
+ int n_cur;
+ xmlChar * uri; /* the new base URI */
+ int n_uri;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_uri = 0;n_uri < gen_nb_const_xmlChar_ptr;n_uri++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ uri = gen_const_xmlChar_ptr(n_uri, 1);
+
+ xmlNodeSetBase(cur, (const xmlChar *)uri);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_uri, (const xmlChar *)uri, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetBase",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_uri);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr cur; /* the node being modified */
+ int n_cur;
+ xmlChar * content; /* the new value of the content */
+ int n_content;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ xmlNodeSetContent(cur, (const xmlChar *)content);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetContentLen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr cur; /* the node being modified */
+ int n_cur;
+ xmlChar * content; /* the new value of the content */
+ int n_content;
+ int len; /* the size of @content */
+ int n_len;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ xmlNodeSetContentLen(cur, (const xmlChar *)content, len);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetContentLen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetLang(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr cur; /* the node being changed */
+ int n_cur;
+ xmlChar * lang; /* the language description */
+ int n_lang;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_lang = 0;n_lang < gen_nb_const_xmlChar_ptr;n_lang++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ lang = gen_const_xmlChar_ptr(n_lang, 1);
+
+ xmlNodeSetLang(cur, (const xmlChar *)lang);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_lang, (const xmlChar *)lang, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetLang",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_lang);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr cur; /* the node being changed */
+ int n_cur;
+ xmlChar * name; /* the new tag name */
+ int n_name;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ xmlNodeSetName(cur, (const xmlChar *)name);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNodeSetSpacePreserve(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr cur; /* the node being changed */
+ int n_cur;
+ int val; /* the xml:space value ("0": default, 1: "preserve") */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodePtr(n_cur, 0);
+ val = gen_int(n_val, 1);
+
+ xmlNodeSetSpacePreserve(cur, val);
+ call_tests++;
+ des_xmlNodePtr(n_cur, cur, 0);
+ des_int(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNodeSetSpacePreserve",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPreviousElementSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr node; /* the current node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlPreviousElementSibling(node);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPreviousElementSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReconciliateNs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr tree; /* a node defining the subtree to reconciliate */
+ int n_tree;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ tree = gen_xmlNodePtr(n_tree, 1);
+
+ ret_val = xmlReconciliateNs(doc, tree);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_tree, tree, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReconciliateNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_tree);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRemoveProp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlAttrPtr cur; /* an attribute */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlAttrPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlAttrPtr(n_cur, 0);
+
+ ret_val = xmlRemoveProp(cur);
+ cur = NULL;
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlAttrPtr(n_cur, cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRemoveProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReplaceNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr old; /* the old node */
+ int n_old;
+ xmlNodePtr cur; /* the node */
+ int n_cur;
+
+ for (n_old = 0;n_old < gen_nb_xmlNodePtr;n_old++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr_in;n_cur++) {
+ mem_base = xmlMemBlocks();
+ old = gen_xmlNodePtr(n_old, 0);
+ cur = gen_xmlNodePtr_in(n_cur, 1);
+
+ ret_val = xmlReplaceNode(old, cur);
+ if (cur != NULL) {
+ xmlUnlinkNode(cur);
+ xmlFreeNode(cur) ; cur = NULL ; }
+ if (old != NULL) {
+ xmlUnlinkNode(old);
+ xmlFreeNode(old) ; old = NULL ; }
+ ret_val = NULL;
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_old, old, 0);
+ des_xmlNodePtr_in(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReplaceNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_old);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename (or URL) */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+
+ ret_val = xmlSaveFile(filename, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFileEnc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename (or URL) */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the name of an encoding (or NULL) */
+ int n_encoding;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+
+ ret_val = xmlSaveFileEnc(filename, cur, (const char *)encoding);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFileEnc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFileTo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlOutputBufferPtr buf; /* an output I/O buffer */
+ int n_buf;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
+ int n_encoding;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+
+ ret_val = xmlSaveFileTo(buf, cur, (const char *)encoding);
+ buf = NULL;
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFileTo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFormatFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename (or URL) */
+ int n_filename;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ format = gen_int(n_format, 2);
+
+ ret_val = xmlSaveFormatFile(filename, cur, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_int(n_format, format, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFormatFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFormatFileEnc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the filename or URL to output */
+ int n_filename;
+ xmlDocPtr cur; /* the document being saved */
+ int n_cur;
+ char * encoding; /* the name of the encoding to use or NULL. */
+ int n_encoding;
+ int format; /* should formatting spaces be added. */
+ int n_format;
+
+ for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_fileoutput(n_filename, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ format = gen_int(n_format, 3);
+
+ ret_val = xmlSaveFormatFileEnc(filename, cur, (const char *)encoding, format);
+ desret_int(ret_val);
+ call_tests++;
+ des_fileoutput(n_filename, filename, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFormatFileEnc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFormatFileTo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlOutputBufferPtr buf; /* an output I/O buffer */
+ int n_buf;
+ xmlDocPtr cur; /* the document */
+ int n_cur;
+ char * encoding; /* the encoding if any assuming the I/O layer handles the trancoding */
+ int n_encoding;
+ int format; /* should formatting spaces been added */
+ int n_format;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_format = 0;n_format < gen_nb_int;n_format++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlOutputBufferPtr(n_buf, 0);
+ cur = gen_xmlDocPtr(n_cur, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ format = gen_int(n_format, 3);
+
+ ret_val = xmlSaveFormatFileTo(buf, cur, (const char *)encoding, format);
+ buf = NULL;
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_buf, buf, 0);
+ des_xmlDocPtr(n_cur, cur, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_int(n_format, format, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFormatFileTo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_cur);
+ printf(" %d", n_encoding);
+ printf(" %d", n_format);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSearchNs(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNsPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr node; /* the current node */
+ int n_node;
+ xmlChar * nameSpace; /* the namespace prefix */
+ int n_nameSpace;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_nameSpace = 0;n_nameSpace < gen_nb_const_xmlChar_ptr;n_nameSpace++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ nameSpace = gen_const_xmlChar_ptr(n_nameSpace, 2);
+
+ ret_val = xmlSearchNs(doc, node, (const xmlChar *)nameSpace);
+ desret_xmlNsPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_const_xmlChar_ptr(n_nameSpace, (const xmlChar *)nameSpace, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSearchNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_node);
+ printf(" %d", n_nameSpace);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSearchNsByHref(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNsPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr node; /* the current node */
+ int n_node;
+ xmlChar * href; /* the namespace value */
+ int n_href;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_href = 0;n_href < gen_nb_const_xmlChar_ptr;n_href++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ href = gen_const_xmlChar_ptr(n_href, 2);
+
+ ret_val = xmlSearchNsByHref(doc, node, (const xmlChar *)href);
+ desret_xmlNsPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_const_xmlChar_ptr(n_href, (const xmlChar *)href, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSearchNsByHref",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_node);
+ printf(" %d", n_href);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetBufferAllocationScheme(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlBufferAllocationScheme scheme; /* allocation method to use */
+ int n_scheme;
+
+ for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme;n_scheme++) {
+ mem_base = xmlMemBlocks();
+ scheme = gen_xmlBufferAllocationScheme(n_scheme, 0);
+
+ xmlSetBufferAllocationScheme(scheme);
+ call_tests++;
+ des_xmlBufferAllocationScheme(n_scheme, scheme, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetBufferAllocationScheme",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_scheme);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetCompressMode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int mode; /* the compression ratio */
+ int n_mode;
+
+ for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
+ mem_base = xmlMemBlocks();
+ mode = gen_int(n_mode, 0);
+
+ xmlSetCompressMode(mode);
+ call_tests++;
+ des_int(n_mode, mode, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetCompressMode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_mode);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetDocCompressMode(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ int mode; /* the compression ratio */
+ int n_mode;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_mode = 0;n_mode < gen_nb_int;n_mode++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ mode = gen_int(n_mode, 1);
+
+ xmlSetDocCompressMode(doc, mode);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_int(n_mode, mode, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetDocCompressMode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_mode);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetNs(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr node; /* a node in the document */
+ int n_node;
+ xmlNsPtr ns; /* a namespace pointer */
+ int n_ns;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+
+ xmlSetNs(node, ns);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetNsProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlNsPtr ns; /* the namespace definition */
+ int n_ns;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * value; /* the attribute value */
+ int n_value;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ value = gen_const_xmlChar_ptr(n_value, 3);
+
+ ret_val = xmlSetNsProp(node, ns, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name (a QName) */
+ int n_name;
+ xmlChar * value; /* the attribute value */
+ int n_value;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+
+ ret_val = xmlSetProp(node, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSetProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSplitQName2(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * name; /* the full QName */
+ int n_name;
+ xmlChar ** prefix; /* a xmlChar ** */
+ int n_prefix;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+ prefix = gen_xmlChar_ptr_ptr(n_prefix, 1);
+
+ ret_val = xmlSplitQName2((const xmlChar *)name, prefix);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ des_xmlChar_ptr_ptr(n_prefix, prefix, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSplitQName2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSplitQName3(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlChar * name; /* the full QName */
+ int n_name;
+ int * len; /* an int * */
+ int n_len;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+ len = gen_int_ptr(n_len, 1);
+
+ ret_val = xmlSplitQName3((const xmlChar *)name, len);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ des_int_ptr(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSplitQName3",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStringGetNodeList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+ xmlChar * value; /* the value of the attribute */
+ int n_value;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+
+ ret_val = xmlStringGetNodeList((const xmlDoc *)doc, (const xmlChar *)value);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStringGetNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStringLenGetNodeList(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlDoc * doc; /* the document */
+ int n_doc;
+ xmlChar * value; /* the value of the text */
+ int n_value;
+ int len; /* the length of the string value */
+ int n_len;
+
+ for (n_doc = 0;n_doc < gen_nb_const_xmlDoc_ptr;n_doc++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_const_xmlDoc_ptr(n_doc, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlStringLenGetNodeList((const xmlDoc *)doc, (const xmlChar *)value, len);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_const_xmlDoc_ptr(n_doc, (const xmlDoc *)doc, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStringLenGetNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_value);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextConcat(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlChar * content; /* the content */
+ int n_content;
+ int len; /* @content length */
+ int n_len;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlTextConcat(node, (const xmlChar *)content, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextConcat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextMerge(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlNodePtr first; /* the first text node */
+ int n_first;
+ xmlNodePtr second; /* the second text node being merged */
+ int n_second;
+
+ for (n_first = 0;n_first < gen_nb_xmlNodePtr_in;n_first++) {
+ for (n_second = 0;n_second < gen_nb_xmlNodePtr_in;n_second++) {
+ mem_base = xmlMemBlocks();
+ first = gen_xmlNodePtr_in(n_first, 0);
+ second = gen_xmlNodePtr_in(n_second, 1);
+
+ ret_val = xmlTextMerge(first, second);
+ if ((first != NULL) && (first->type != XML_TEXT_NODE)) {
+ xmlUnlinkNode(second);
+ xmlFreeNode(second) ; second = NULL ; }
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr_in(n_first, first, 0);
+ des_xmlNodePtr_in(n_second, second, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextMerge",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_first);
+ printf(" %d", n_second);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUnsetNsProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlNsPtr ns; /* the namespace definition */
+ int n_ns;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ns = gen_xmlNsPtr(n_ns, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+
+ ret_val = xmlUnsetNsProp(node, ns, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlNsPtr(n_ns, ns, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUnsetNsProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUnsetProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node */
+ int n_node;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlUnsetProp(node, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUnsetProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNCName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ int space; /* allow spaces in front and end of the string */
+ int n_space;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_space = 0;n_space < gen_nb_int;n_space++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+ space = gen_int(n_space, 1);
+
+ ret_val = xmlValidateNCName((const xmlChar *)value, space);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ des_int(n_space, space, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNCName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf(" %d", n_space);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNMToken(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ int space; /* allow spaces in front and end of the string */
+ int n_space;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_space = 0;n_space < gen_nb_int;n_space++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+ space = gen_int(n_space, 1);
+
+ ret_val = xmlValidateNMToken((const xmlChar *)value, space);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ des_int(n_space, space, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNMToken",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf(" %d", n_space);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ int space; /* allow spaces in front and end of the string */
+ int n_space;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_space = 0;n_space < gen_nb_int;n_space++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+ space = gen_int(n_space, 1);
+
+ ret_val = xmlValidateName((const xmlChar *)value, space);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ des_int(n_space, space, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf(" %d", n_space);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateQName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef LIBXML_TREE_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ int space; /* allow spaces in front and end of the string */
+ int n_space;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_space = 0;n_space < gen_nb_int;n_space++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+ space = gen_int(n_space, 1);
+
+ ret_val = xmlValidateQName((const xmlChar *)value, space);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ des_int(n_space, space, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateQName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf(" %d", n_space);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_tree(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing tree : 142 of 164 functions ...\n");
+ test_ret += test_xmlAddChild();
+ test_ret += test_xmlAddChildList();
+ test_ret += test_xmlAddNextSibling();
+ test_ret += test_xmlAddPrevSibling();
+ test_ret += test_xmlAddSibling();
+ test_ret += test_xmlAttrSerializeTxtContent();
+ test_ret += test_xmlBufContent();
+ test_ret += test_xmlBufEnd();
+ test_ret += test_xmlBufGetNodeContent();
+ test_ret += test_xmlBufNodeDump();
+ test_ret += test_xmlBufShrink();
+ test_ret += test_xmlBufUse();
+ test_ret += test_xmlBufferAdd();
+ test_ret += test_xmlBufferAddHead();
+ test_ret += test_xmlBufferCCat();
+ test_ret += test_xmlBufferCat();
+ test_ret += test_xmlBufferContent();
+ test_ret += test_xmlBufferCreate();
+ test_ret += test_xmlBufferCreateSize();
+ test_ret += test_xmlBufferCreateStatic();
+ test_ret += test_xmlBufferDetach();
+ test_ret += test_xmlBufferEmpty();
+ test_ret += test_xmlBufferGrow();
+ test_ret += test_xmlBufferLength();
+ test_ret += test_xmlBufferResize();
+ test_ret += test_xmlBufferSetAllocationScheme();
+ test_ret += test_xmlBufferShrink();
+ test_ret += test_xmlBufferWriteCHAR();
+ test_ret += test_xmlBufferWriteChar();
+ test_ret += test_xmlBufferWriteQuotedString();
+ test_ret += test_xmlBuildQName();
+ test_ret += test_xmlChildElementCount();
+ test_ret += test_xmlCopyDoc();
+ test_ret += test_xmlCopyDtd();
+ test_ret += test_xmlCopyNamespace();
+ test_ret += test_xmlCopyNamespaceList();
+ test_ret += test_xmlCopyNode();
+ test_ret += test_xmlCopyNodeList();
+ test_ret += test_xmlCopyProp();
+ test_ret += test_xmlCopyPropList();
+ test_ret += test_xmlCreateIntSubset();
+ test_ret += test_xmlDOMWrapAdoptNode();
+ test_ret += test_xmlDOMWrapCloneNode();
+ test_ret += test_xmlDOMWrapNewCtxt();
+ test_ret += test_xmlDOMWrapReconcileNamespaces();
+ test_ret += test_xmlDOMWrapRemoveNode();
+ test_ret += test_xmlDocCopyNode();
+ test_ret += test_xmlDocCopyNodeList();
+ test_ret += test_xmlDocDump();
+ test_ret += test_xmlDocDumpFormatMemory();
+ test_ret += test_xmlDocDumpFormatMemoryEnc();
+ test_ret += test_xmlDocDumpMemory();
+ test_ret += test_xmlDocDumpMemoryEnc();
+ test_ret += test_xmlDocFormatDump();
+ test_ret += test_xmlDocGetRootElement();
+ test_ret += test_xmlDocSetRootElement();
+ test_ret += test_xmlElemDump();
+ test_ret += test_xmlFirstElementChild();
+ test_ret += test_xmlGetBufferAllocationScheme();
+ test_ret += test_xmlGetCompressMode();
+ test_ret += test_xmlGetDocCompressMode();
+ test_ret += test_xmlGetIntSubset();
+ test_ret += test_xmlGetLastChild();
+ test_ret += test_xmlGetLineNo();
+ test_ret += test_xmlGetNoNsProp();
+ test_ret += test_xmlGetNodePath();
+ test_ret += test_xmlGetNsList();
+ test_ret += test_xmlGetNsProp();
+ test_ret += test_xmlGetProp();
+ test_ret += test_xmlHasNsProp();
+ test_ret += test_xmlHasProp();
+ test_ret += test_xmlIsBlankNode();
+ test_ret += test_xmlIsXHTML();
+ test_ret += test_xmlLastElementChild();
+ test_ret += test_xmlNewCDataBlock();
+ test_ret += test_xmlNewCharRef();
+ test_ret += test_xmlNewChild();
+ test_ret += test_xmlNewComment();
+ test_ret += test_xmlNewDoc();
+ test_ret += test_xmlNewDocComment();
+ test_ret += test_xmlNewDocFragment();
+ test_ret += test_xmlNewDocNode();
+ test_ret += test_xmlNewDocNodeEatName();
+ test_ret += test_xmlNewDocPI();
+ test_ret += test_xmlNewDocProp();
+ test_ret += test_xmlNewDocRawNode();
+ test_ret += test_xmlNewDocText();
+ test_ret += test_xmlNewDocTextLen();
+ test_ret += test_xmlNewDtd();
+ test_ret += test_xmlNewNode();
+ test_ret += test_xmlNewNodeEatName();
+ test_ret += test_xmlNewNs();
+ test_ret += test_xmlNewNsProp();
+ test_ret += test_xmlNewNsPropEatName();
+ test_ret += test_xmlNewPI();
+ test_ret += test_xmlNewProp();
+ test_ret += test_xmlNewReference();
+ test_ret += test_xmlNewText();
+ test_ret += test_xmlNewTextChild();
+ test_ret += test_xmlNewTextLen();
+ test_ret += test_xmlNextElementSibling();
+ test_ret += test_xmlNodeAddContent();
+ test_ret += test_xmlNodeAddContentLen();
+ test_ret += test_xmlNodeBufGetContent();
+ test_ret += test_xmlNodeDump();
+ test_ret += test_xmlNodeDumpOutput();
+ test_ret += test_xmlNodeGetBase();
+ test_ret += test_xmlNodeGetContent();
+ test_ret += test_xmlNodeGetLang();
+ test_ret += test_xmlNodeGetSpacePreserve();
+ test_ret += test_xmlNodeIsText();
+ test_ret += test_xmlNodeListGetRawString();
+ test_ret += test_xmlNodeListGetString();
+ test_ret += test_xmlNodeSetBase();
+ test_ret += test_xmlNodeSetContent();
+ test_ret += test_xmlNodeSetContentLen();
+ test_ret += test_xmlNodeSetLang();
+ test_ret += test_xmlNodeSetName();
+ test_ret += test_xmlNodeSetSpacePreserve();
+ test_ret += test_xmlPreviousElementSibling();
+ test_ret += test_xmlReconciliateNs();
+ test_ret += test_xmlRemoveProp();
+ test_ret += test_xmlReplaceNode();
+ test_ret += test_xmlSaveFile();
+ test_ret += test_xmlSaveFileEnc();
+ test_ret += test_xmlSaveFileTo();
+ test_ret += test_xmlSaveFormatFile();
+ test_ret += test_xmlSaveFormatFileEnc();
+ test_ret += test_xmlSaveFormatFileTo();
+ test_ret += test_xmlSearchNs();
+ test_ret += test_xmlSearchNsByHref();
+ test_ret += test_xmlSetBufferAllocationScheme();
+ test_ret += test_xmlSetCompressMode();
+ test_ret += test_xmlSetDocCompressMode();
+ test_ret += test_xmlSetNs();
+ test_ret += test_xmlSetNsProp();
+ test_ret += test_xmlSetProp();
+ test_ret += test_xmlSplitQName2();
+ test_ret += test_xmlSplitQName3();
+ test_ret += test_xmlStringGetNodeList();
+ test_ret += test_xmlStringLenGetNodeList();
+ test_ret += test_xmlTextConcat();
+ test_ret += test_xmlTextMerge();
+ test_ret += test_xmlUnsetNsProp();
+ test_ret += test_xmlUnsetProp();
+ test_ret += test_xmlValidateNCName();
+ test_ret += test_xmlValidateNMToken();
+ test_ret += test_xmlValidateName();
+ test_ret += test_xmlValidateQName();
+
+ if (test_ret != 0)
+ printf("Module tree: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlBuildRelativeURI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * URI; /* the URI reference under consideration */
+ int n_URI;
+ xmlChar * base; /* the base value */
+ int n_base;
+
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_const_xmlChar_ptr(n_URI, 0);
+ base = gen_const_xmlChar_ptr(n_base, 1);
+
+ ret_val = xmlBuildRelativeURI((const xmlChar *)URI, (const xmlChar *)base);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
+ des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBuildRelativeURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_base);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlBuildURI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * URI; /* the URI instance found in the document */
+ int n_URI;
+ xmlChar * base; /* the base value */
+ int n_base;
+
+ for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {
+ for (n_base = 0;n_base < gen_nb_const_xmlChar_ptr;n_base++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_const_xmlChar_ptr(n_URI, 0);
+ base = gen_const_xmlChar_ptr(n_base, 1);
+
+ ret_val = xmlBuildURI((const xmlChar *)URI, (const xmlChar *)base);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);
+ des_const_xmlChar_ptr(n_base, (const xmlChar *)base, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlBuildURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_base);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCanonicPath(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * path; /* the resource locator in a filesystem notation */
+ int n_path;
+
+ for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
+ mem_base = xmlMemBlocks();
+ path = gen_const_xmlChar_ptr(n_path, 0);
+
+ ret_val = xmlCanonicPath((const xmlChar *)path);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCanonicPath",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_path);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateURI(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlNormalizeURIPath(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ char * path; /* pointer to the path string */
+ int n_path;
+
+ for (n_path = 0;n_path < gen_nb_char_ptr;n_path++) {
+ mem_base = xmlMemBlocks();
+ path = gen_char_ptr(n_path, 0);
+
+ ret_val = xmlNormalizeURIPath(path);
+ desret_int(ret_val);
+ call_tests++;
+ des_char_ptr(n_path, path, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNormalizeURIPath",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_path);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseURI(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParseURIRaw(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlURIPtr 1
+static xmlURIPtr gen_xmlURIPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlURIPtr(int no ATTRIBUTE_UNUSED, xmlURIPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlParseURIReference(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlURIPtr uri; /* pointer to an URI structure */
+ int n_uri;
+ char * str; /* the string to analyze */
+ int n_str;
+
+ for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
+ for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ uri = gen_xmlURIPtr(n_uri, 0);
+ str = gen_const_char_ptr(n_str, 1);
+
+ ret_val = xmlParseURIReference(uri, (const char *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlURIPtr(n_uri, uri, 0);
+ des_const_char_ptr(n_str, (const char *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParseURIReference",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_uri);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPathToURI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * path; /* the resource locator in a filesystem notation */
+ int n_path;
+
+ for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
+ mem_base = xmlMemBlocks();
+ path = gen_const_xmlChar_ptr(n_path, 0);
+
+ ret_val = xmlPathToURI((const xmlChar *)path);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPathToURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_path);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPrintURI(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ FILE * stream; /* a FILE* for the output */
+ int n_stream;
+ xmlURIPtr uri; /* pointer to an xmlURI */
+ int n_uri;
+
+ for (n_stream = 0;n_stream < gen_nb_FILE_ptr;n_stream++) {
+ for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
+ mem_base = xmlMemBlocks();
+ stream = gen_FILE_ptr(n_stream, 0);
+ uri = gen_xmlURIPtr(n_uri, 1);
+
+ xmlPrintURI(stream, uri);
+ call_tests++;
+ des_FILE_ptr(n_stream, stream, 0);
+ des_xmlURIPtr(n_uri, uri, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPrintURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_stream);
+ printf(" %d", n_uri);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveUri(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlURIPtr uri; /* pointer to an xmlURI */
+ int n_uri;
+
+ for (n_uri = 0;n_uri < gen_nb_xmlURIPtr;n_uri++) {
+ mem_base = xmlMemBlocks();
+ uri = gen_xmlURIPtr(n_uri, 0);
+
+ ret_val = xmlSaveUri(uri);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlURIPtr(n_uri, uri, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveUri",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_uri);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlURIEscape(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * str; /* the string of the URI to escape */
+ int n_str;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+
+ ret_val = xmlURIEscape((const xmlChar *)str);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlURIEscape",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlURIEscapeStr(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * str; /* string to escape */
+ int n_str;
+ xmlChar * list; /* exception list string of chars not to escape */
+ int n_list;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_list = 0;n_list < gen_nb_const_xmlChar_ptr;n_list++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ list = gen_const_xmlChar_ptr(n_list, 1);
+
+ ret_val = xmlURIEscapeStr((const xmlChar *)str, (const xmlChar *)list);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_const_xmlChar_ptr(n_list, (const xmlChar *)list, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlURIEscapeStr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_list);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlURIUnescapeString(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_uri(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing uri : 10 of 15 functions ...\n");
+ test_ret += test_xmlBuildRelativeURI();
+ test_ret += test_xmlBuildURI();
+ test_ret += test_xmlCanonicPath();
+ test_ret += test_xmlCreateURI();
+ test_ret += test_xmlNormalizeURIPath();
+ test_ret += test_xmlParseURI();
+ test_ret += test_xmlParseURIRaw();
+ test_ret += test_xmlParseURIReference();
+ test_ret += test_xmlPathToURI();
+ test_ret += test_xmlPrintURI();
+ test_ret += test_xmlSaveUri();
+ test_ret += test_xmlURIEscape();
+ test_ret += test_xmlURIEscapeStr();
+ test_ret += test_xmlURIUnescapeString();
+
+ if (test_ret != 0)
+ printf("Module uri: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlAddAttributeDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttributePtr ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDtdPtr dtd; /* pointer to the DTD */
+ int n_dtd;
+ xmlChar * elem; /* the element name */
+ int n_elem;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * ns; /* the attribute namespace prefix */
+ int n_ns;
+ xmlAttributeType type; /* the attribute type */
+ int n_type;
+ xmlAttributeDefault def; /* the attribute default type */
+ int n_def;
+ xmlChar * defaultValue; /* the attribute default value */
+ int n_defaultValue;
+ xmlEnumerationPtr tree; /* if it's an enumeration, the associated list */
+ int n_tree;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+ for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
+ for (n_def = 0;n_def < gen_nb_xmlAttributeDefault;n_def++) {
+ for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {
+ for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ dtd = gen_xmlDtdPtr(n_dtd, 1);
+ elem = gen_const_xmlChar_ptr(n_elem, 2);
+ name = gen_const_xmlChar_ptr(n_name, 3);
+ ns = gen_const_xmlChar_ptr(n_ns, 4);
+ type = gen_xmlAttributeType(n_type, 5);
+ def = gen_xmlAttributeDefault(n_def, 6);
+ defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 7);
+ tree = gen_xmlEnumerationPtr(n_tree, 8);
+
+ ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, type, def, (const xmlChar *)defaultValue, tree);
+ desret_xmlAttributePtr(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDtdPtr(n_dtd, dtd, 1);
+ des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 2);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
+ des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 4);
+ des_xmlAttributeType(n_type, type, 5);
+ des_xmlAttributeDefault(n_def, def, 6);
+ des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 7);
+ des_xmlEnumerationPtr(n_tree, tree, 8);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddAttributeDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_dtd);
+ printf(" %d", n_elem);
+ printf(" %d", n_name);
+ printf(" %d", n_ns);
+ printf(" %d", n_type);
+ printf(" %d", n_def);
+ printf(" %d", n_defaultValue);
+ printf(" %d", n_tree);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddElementDecl(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementPtr ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDtdPtr dtd; /* pointer to the DTD */
+ int n_dtd;
+ xmlChar * name; /* the entity name */
+ int n_name;
+ xmlElementTypeVal type; /* the element type */
+ int n_type;
+ xmlElementContentPtr content; /* the element content tree or NULL */
+ int n_content;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_xmlElementTypeVal;n_type++) {
+ for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ dtd = gen_xmlDtdPtr(n_dtd, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ type = gen_xmlElementTypeVal(n_type, 3);
+ content = gen_xmlElementContentPtr(n_content, 4);
+
+ ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, type, content);
+ desret_xmlElementPtr(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDtdPtr(n_dtd, dtd, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_xmlElementTypeVal(n_type, type, 3);
+ des_xmlElementContentPtr(n_content, content, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAddElementDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_dtd);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddID(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddNotationDecl(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAddRef(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlAttributeTablePtr 1
+static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCopyAttributeTable(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyDocElementContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementContentPtr ret_val;
+ xmlDocPtr doc; /* the document owning the element declaration */
+ int n_doc;
+ xmlElementContentPtr cur; /* An element content pointer. */
+ int n_cur;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ cur = gen_xmlElementContentPtr(n_cur, 1);
+
+ ret_val = xmlCopyDocElementContent(doc, cur);
+ desret_xmlElementContentPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlElementContentPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyDocElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyElementContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementContentPtr ret_val;
+ xmlElementContentPtr cur; /* An element content pointer. */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlElementContentPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlElementContentPtr(n_cur, 0);
+
+ ret_val = xmlCopyElementContent(cur);
+ desret_xmlElementContentPtr(ret_val);
+ call_tests++;
+ des_xmlElementContentPtr(n_cur, cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlElementTablePtr 1
+static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCopyElementTable(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlCopyEnumeration(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlNotationTablePtr 1
+static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCopyNotationTable(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlCreateEnumeration(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlAttributePtr 1
+static xmlAttributePtr gen_xmlAttributePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAttributePtr(int no ATTRIBUTE_UNUSED, xmlAttributePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlDumpAttributeDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlAttributePtr attr; /* An attribute declaration */
+ int n_attr;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ attr = gen_xmlAttributePtr(n_attr, 1);
+
+ xmlDumpAttributeDecl(buf, attr);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlAttributePtr(n_attr, attr, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpAttributeDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDumpAttributeTable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlAttributeTablePtr table; /* An attribute table */
+ int n_table;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_table = 0;n_table < gen_nb_xmlAttributeTablePtr;n_table++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ table = gen_xmlAttributeTablePtr(n_table, 1);
+
+ xmlDumpAttributeTable(buf, table);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlAttributeTablePtr(n_table, table, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpAttributeTable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_table);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlElementPtr 1
+static xmlElementPtr gen_xmlElementPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlElementPtr(int no ATTRIBUTE_UNUSED, xmlElementPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlDumpElementDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlElementPtr elem; /* An element table */
+ int n_elem;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ elem = gen_xmlElementPtr(n_elem, 1);
+
+ xmlDumpElementDecl(buf, elem);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlElementPtr(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpElementDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDumpElementTable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlElementTablePtr table; /* An element table */
+ int n_table;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_table = 0;n_table < gen_nb_xmlElementTablePtr;n_table++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ table = gen_xmlElementTablePtr(n_table, 1);
+
+ xmlDumpElementTable(buf, table);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlElementTablePtr(n_table, table, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpElementTable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_table);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlNotationPtr 1
+static xmlNotationPtr gen_xmlNotationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlNotationPtr(int no ATTRIBUTE_UNUSED, xmlNotationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlDumpNotationDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlNotationPtr nota; /* A notation declaration */
+ int n_nota;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ nota = gen_xmlNotationPtr(n_nota, 1);
+
+ xmlDumpNotationDecl(buf, nota);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlNotationPtr(n_nota, nota, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpNotationDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_nota);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlDumpNotationTable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* the XML buffer output */
+ int n_buf;
+ xmlNotationTablePtr table; /* A notation table */
+ int n_table;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_table = 0;n_table < gen_nb_xmlNotationTablePtr;n_table++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ table = gen_xmlNotationTablePtr(n_table, 1);
+
+ xmlDumpNotationTable(buf, table);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlNotationTablePtr(n_table, table, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlDumpNotationTable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_table);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdAttrDesc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttributePtr ret_val;
+ xmlDtdPtr dtd; /* a pointer to the DtD to search */
+ int n_dtd;
+ xmlChar * elem; /* the element name */
+ int n_elem;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ dtd = gen_xmlDtdPtr(n_dtd, 0);
+ elem = gen_const_xmlChar_ptr(n_elem, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+
+ ret_val = xmlGetDtdAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name);
+ desret_xmlAttributePtr(ret_val);
+ call_tests++;
+ des_xmlDtdPtr(n_dtd, dtd, 0);
+ des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDtdAttrDesc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dtd);
+ printf(" %d", n_elem);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdElementDesc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementPtr ret_val;
+ xmlDtdPtr dtd; /* a pointer to the DtD to search */
+ int n_dtd;
+ xmlChar * name; /* the element name */
+ int n_name;
+
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ dtd = gen_xmlDtdPtr(n_dtd, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlGetDtdElementDesc(dtd, (const xmlChar *)name);
+ desret_xmlElementPtr(ret_val);
+ call_tests++;
+ des_xmlDtdPtr(n_dtd, dtd, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDtdElementDesc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dtd);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdNotationDesc(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdQAttrDesc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttributePtr ret_val;
+ xmlDtdPtr dtd; /* a pointer to the DtD to search */
+ int n_dtd;
+ xmlChar * elem; /* the element name */
+ int n_elem;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * prefix; /* the attribute namespace prefix */
+ int n_prefix;
+
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ dtd = gen_xmlDtdPtr(n_dtd, 0);
+ elem = gen_const_xmlChar_ptr(n_elem, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 3);
+
+ ret_val = xmlGetDtdQAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)prefix);
+ desret_xmlAttributePtr(ret_val);
+ call_tests++;
+ des_xmlDtdPtr(n_dtd, dtd, 0);
+ des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDtdQAttrDesc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dtd);
+ printf(" %d", n_elem);
+ printf(" %d", n_name);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetDtdQElementDesc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementPtr ret_val;
+ xmlDtdPtr dtd; /* a pointer to the DtD to search */
+ int n_dtd;
+ xmlChar * name; /* the element name */
+ int n_name;
+ xmlChar * prefix; /* the element namespace prefix */
+ int n_prefix;
+
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ dtd = gen_xmlDtdPtr(n_dtd, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 2);
+
+ ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)name, (const xmlChar *)prefix);
+ desret_xmlElementPtr(ret_val);
+ call_tests++;
+ des_xmlDtdPtr(n_dtd, dtd, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetDtdQElementDesc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_dtd);
+ printf(" %d", n_name);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetID(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlAttrPtr ret_val;
+ xmlDocPtr doc; /* pointer to the document */
+ int n_doc;
+ xmlChar * ID; /* the ID value */
+ int n_ID;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ ID = gen_const_xmlChar_ptr(n_ID, 1);
+
+ ret_val = xmlGetID(doc, (const xmlChar *)ID);
+ desret_xmlAttrPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetID",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_ID);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetRefs(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsID(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr elem; /* the element carrying the attribute */
+ int n_elem;
+ xmlAttrPtr attr; /* the attribute */
+ int n_attr;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ elem = gen_xmlNodePtr(n_elem, 1);
+ attr = gen_xmlAttrPtr(n_attr, 2);
+
+ ret_val = xmlIsID(doc, elem, attr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_elem, elem, 1);
+ des_xmlAttrPtr(n_attr, attr, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsID",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsMixedElement(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the element name */
+ int n_name;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlIsMixedElement(doc, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsMixedElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIsRef(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr elem; /* the element carrying the attribute */
+ int n_elem;
+ xmlAttrPtr attr; /* the attribute */
+ int n_attr;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ elem = gen_xmlNodePtr(n_elem, 1);
+ attr = gen_xmlAttrPtr(n_attr, 2);
+
+ ret_val = xmlIsRef(doc, elem, attr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_elem, elem, 1);
+ des_xmlAttrPtr(n_attr, attr, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIsRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewDocElementContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementContentPtr ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * name; /* the subelement name or NULL */
+ int n_name;
+ xmlElementContentType type; /* the type of element content decl */
+ int n_type;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ type = gen_xmlElementContentType(n_type, 2);
+
+ ret_val = xmlNewDocElementContent(doc, (const xmlChar *)name, type);
+ xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;
+ desret_xmlElementContentPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_xmlElementContentType(n_type, type, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewDocElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewElementContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlElementContentPtr ret_val;
+ xmlChar * name; /* the subelement name or NULL */
+ int n_name;
+ xmlElementContentType type; /* the type of element content decl */
+ int n_type;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_type = 0;n_type < gen_nb_xmlElementContentType;n_type++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+ type = gen_xmlElementContentType(n_type, 1);
+
+ ret_val = xmlNewElementContent((const xmlChar *)name, type);
+ desret_xmlElementContentPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ des_xmlElementContentType(n_type, type, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf(" %d", n_type);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewValidCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRemoveID(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlAttrPtr attr; /* the attribute */
+ int n_attr;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ attr = gen_xmlAttrPtr(n_attr, 1);
+
+ ret_val = xmlRemoveID(doc, attr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlAttrPtr(n_attr, attr, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRemoveID",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRemoveRef(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlAttrPtr attr; /* the attribute */
+ int n_attr;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ attr = gen_xmlAttrPtr(n_attr, 1);
+
+ ret_val = xmlRemoveRef(doc, attr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlAttrPtr(n_attr, attr, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRemoveRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSnprintfElementContent(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ char * buf; /* an output buffer */
+ int n_buf;
+ int size; /* the buffer size */
+ int n_size;
+ xmlElementContentPtr content; /* An element table */
+ int n_content;
+ int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
+ int n_englob;
+
+ for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
+ for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_char_ptr(n_buf, 0);
+ size = gen_int(n_size, 1);
+ content = gen_xmlElementContentPtr(n_content, 2);
+ englob = gen_int(n_englob, 3);
+
+ xmlSnprintfElementContent(buf, size, content, englob);
+ call_tests++;
+ des_char_ptr(n_buf, buf, 0);
+ des_int(n_size, size, 1);
+ des_xmlElementContentPtr(n_content, content, 2);
+ des_int(n_englob, englob, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSnprintfElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_size);
+ printf(" %d", n_content);
+ printf(" %d", n_englob);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSprintfElementContent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+#ifdef LIBXML_OUTPUT_ENABLED
+ int mem_base;
+ char * buf; /* an output buffer */
+ int n_buf;
+ xmlElementContentPtr content; /* An element table */
+ int n_content;
+ int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */
+ int n_englob;
+
+ for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {
+ for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {
+ for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_char_ptr(n_buf, 0);
+ content = gen_xmlElementContentPtr(n_content, 1);
+ englob = gen_int(n_englob, 2);
+
+ xmlSprintfElementContent(buf, content, englob);
+ call_tests++;
+ des_char_ptr(n_buf, buf, 0);
+ des_xmlElementContentPtr(n_content, content, 1);
+ des_int(n_englob, englob, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSprintfElementContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_content);
+ printf(" %d", n_englob);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidBuildContentModel(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* a validation context */
+ int n_ctxt;
+ xmlElementPtr elem; /* an element declaration node */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ elem = gen_xmlElementPtr(n_elem, 1);
+
+ ret_val = xmlValidBuildContentModel(ctxt, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlElementPtr(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidBuildContentModel",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidCtxtNormalizeAttributeValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context or NULL */
+ int n_ctxt;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr elem; /* the parent */
+ int n_elem;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * value; /* the attribute value */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+ name = gen_const_xmlChar_ptr(n_name, 3);
+ value = gen_const_xmlChar_ptr(n_value, 4);
+
+ ret_val = xmlValidCtxtNormalizeAttributeValue(ctxt, doc, elem, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidCtxtNormalizeAttributeValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlElementContent_ptr 1
+static xmlElementContent * gen_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlElementContent_ptr(int no ATTRIBUTE_UNUSED, xmlElementContent * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlValidGetPotentialChildren(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef LIBXML_VALID_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlElementContent * ctree; /* an element content tree */
+ int n_ctree;
+ xmlChar ** names; /* an array to store the list of child names */
+ int n_names;
+ int * len; /* a pointer to the number of element in the list */
+ int n_len;
+ int max; /* the size of the array */
+ int n_max;
+
+ for (n_ctree = 0;n_ctree < gen_nb_xmlElementContent_ptr;n_ctree++) {
+ for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ for (n_max = 0;n_max < gen_nb_int;n_max++) {
+ mem_base = xmlMemBlocks();
+ ctree = gen_xmlElementContent_ptr(n_ctree, 0);
+ names = gen_const_xmlChar_ptr_ptr(n_names, 1);
+ len = gen_int_ptr(n_len, 2);
+ max = gen_int(n_max, 3);
+
+ ret_val = xmlValidGetPotentialChildren(ctree, (const xmlChar **)names, len, max);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlElementContent_ptr(n_ctree, ctree, 0);
+ des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 1);
+ des_int_ptr(n_len, len, 2);
+ des_int(n_max, max, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidGetPotentialChildren",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctree);
+ printf(" %d", n_names);
+ printf(" %d", n_len);
+ printf(" %d", n_max);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidGetValidElements(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+#ifdef LIBXML_VALID_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlNode * prev; /* an element to insert after */
+ int n_prev;
+ xmlNode * next; /* an element to insert next */
+ int n_next;
+ xmlChar ** names; /* an array to store the list of child names */
+ int n_names;
+ int max; /* the size of the array */
+ int n_max;
+
+ for (n_prev = 0;n_prev < gen_nb_xmlNodePtr;n_prev++) {
+ for (n_next = 0;n_next < gen_nb_xmlNodePtr;n_next++) {
+ for (n_names = 0;n_names < gen_nb_const_xmlChar_ptr_ptr;n_names++) {
+ for (n_max = 0;n_max < gen_nb_int;n_max++) {
+ mem_base = xmlMemBlocks();
+ prev = gen_xmlNodePtr(n_prev, 0);
+ next = gen_xmlNodePtr(n_next, 1);
+ names = gen_const_xmlChar_ptr_ptr(n_names, 2);
+ max = gen_int(n_max, 3);
+
+ ret_val = xmlValidGetValidElements(prev, next, (const xmlChar **)names, max);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_prev, prev, 0);
+ des_xmlNodePtr(n_next, next, 1);
+ des_const_xmlChar_ptr_ptr(n_names, (const xmlChar **)names, 2);
+ des_int(n_max, max, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidGetValidElements",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_prev);
+ printf(" %d", n_next);
+ printf(" %d", n_names);
+ printf(" %d", n_max);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidNormalizeAttributeValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlNodePtr elem; /* the parent */
+ int n_elem;
+ xmlChar * name; /* the attribute name */
+ int n_name;
+ xmlChar * value; /* the attribute value */
+ int n_value;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ elem = gen_xmlNodePtr(n_elem, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ value = gen_const_xmlChar_ptr(n_value, 3);
+
+ ret_val = xmlValidNormalizeAttributeValue(doc, elem, (const xmlChar *)name, (const xmlChar *)value);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_elem, elem, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidNormalizeAttributeValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateAttributeDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlAttributePtr attr; /* an attribute definition */
+ int n_attr;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttributePtr;n_attr++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ attr = gen_xmlAttributePtr(n_attr, 2);
+
+ ret_val = xmlValidateAttributeDecl(ctxt, doc, attr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlAttributePtr(n_attr, attr, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateAttributeDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_attr);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateAttributeValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlAttributeType type; /* an attribute type */
+ int n_type;
+ xmlChar * value; /* an attribute value */
+ int n_value;
+
+ for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlAttributeType(n_type, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+
+ ret_val = xmlValidateAttributeValue(type, (const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlAttributeType(n_type, type, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateAttributeValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlValidateDocument(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateDocumentFinal(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlValidateDocumentFinal(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateDocumentFinal",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateDtd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlDtdPtr dtd; /* a dtd instance */
+ int n_dtd;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ dtd = gen_xmlDtdPtr(n_dtd, 2);
+
+ ret_val = xmlValidateDtd(ctxt, doc, dtd);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlDtdPtr(n_dtd, dtd, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateDtd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_dtd);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateDtdFinal(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlValidateDtdFinal(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateDtdFinal",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+
+ ret_val = xmlValidateElement(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateElementDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlElementPtr elem; /* an element definition */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlElementPtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlElementPtr(n_elem, 2);
+
+ ret_val = xmlValidateElementDecl(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlElementPtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateElementDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNameValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* an Name value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlValidateNameValue((const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNameValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNamesValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* an Names value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlValidateNamesValue((const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNamesValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNmtokenValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* an Nmtoken value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlValidateNmtokenValue((const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNmtokenValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNmtokensValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * value; /* an Nmtokens value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlValidateNmtokensValue((const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNmtokensValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNotationDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNotationPtr nota; /* a notation definition */
+ int n_nota;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_nota = 0;n_nota < gen_nb_xmlNotationPtr;n_nota++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ nota = gen_xmlNotationPtr(n_nota, 2);
+
+ ret_val = xmlValidateNotationDecl(ctxt, doc, nota);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNotationPtr(n_nota, nota, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNotationDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_nota);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateNotationUse(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* the document */
+ int n_doc;
+ xmlChar * notationName; /* the notation name to check */
+ int n_notationName;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ notationName = gen_const_xmlChar_ptr(n_notationName, 2);
+
+ ret_val = xmlValidateNotationUse(ctxt, doc, (const xmlChar *)notationName);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateNotationUse",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_notationName);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateOneAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+ xmlAttrPtr attr; /* an attribute instance */
+ int n_attr;
+ xmlChar * value; /* the attribute value (without entities processing) */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+ attr = gen_xmlAttrPtr(n_attr, 3);
+ value = gen_const_xmlChar_ptr(n_value, 4);
+
+ ret_val = xmlValidateOneAttribute(ctxt, doc, elem, attr, (const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ des_xmlAttrPtr(n_attr, attr, 3);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateOneAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_attr);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateOneElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+
+ ret_val = xmlValidateOneElement(ctxt, doc, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateOneElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateOneNamespace(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+ xmlChar * prefix; /* the namespace prefix */
+ int n_prefix;
+ xmlNsPtr ns; /* an namespace declaration instance */
+ int n_ns;
+ xmlChar * value; /* the attribute value (without entities processing) */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 3);
+ ns = gen_xmlNsPtr(n_ns, 4);
+ value = gen_const_xmlChar_ptr(n_value, 5);
+
+ ret_val = xmlValidateOneNamespace(ctxt, doc, elem, (const xmlChar *)prefix, ns, (const xmlChar *)value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);
+ des_xmlNsPtr(n_ns, ns, 4);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateOneNamespace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_prefix);
+ printf(" %d", n_ns);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidatePopElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+ xmlChar * qname; /* the qualified name as appearing in the serialization */
+ int n_qname;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+ qname = gen_const_xmlChar_ptr(n_qname, 3);
+
+ ret_val = xmlValidatePopElement(ctxt, doc, elem, (const xmlChar *)qname);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidatePopElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_qname);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidatePushCData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlChar * data; /* some character data read */
+ int n_data;
+ int len; /* the length of the data */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ data = gen_const_xmlChar_ptr(n_data, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlValidatePushCData(ctxt, (const xmlChar *)data, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidatePushCData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_data);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidatePushElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED) && defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+ xmlNodePtr elem; /* an element instance */
+ int n_elem;
+ xmlChar * qname; /* the qualified name as appearing in the serialization */
+ int n_qname;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ for (n_qname = 0;n_qname < gen_nb_const_xmlChar_ptr;n_qname++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+ elem = gen_xmlNodePtr(n_elem, 2);
+ qname = gen_const_xmlChar_ptr(n_qname, 3);
+
+ ret_val = xmlValidatePushElement(ctxt, doc, elem, (const xmlChar *)qname);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ des_xmlNodePtr(n_elem, elem, 2);
+ des_const_xmlChar_ptr(n_qname, (const xmlChar *)qname, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidatePushElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf(" %d", n_elem);
+ printf(" %d", n_qname);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlValidateRoot(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_VALID_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlValidCtxtPtr ctxt; /* the validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document instance */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlValidateRoot(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlValidateRoot",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_valid(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing valid : 50 of 70 functions ...\n");
+ test_ret += test_xmlAddAttributeDecl();
+ test_ret += test_xmlAddElementDecl();
+ test_ret += test_xmlAddID();
+ test_ret += test_xmlAddNotationDecl();
+ test_ret += test_xmlAddRef();
+ test_ret += test_xmlCopyAttributeTable();
+ test_ret += test_xmlCopyDocElementContent();
+ test_ret += test_xmlCopyElementContent();
+ test_ret += test_xmlCopyElementTable();
+ test_ret += test_xmlCopyEnumeration();
+ test_ret += test_xmlCopyNotationTable();
+ test_ret += test_xmlCreateEnumeration();
+ test_ret += test_xmlDumpAttributeDecl();
+ test_ret += test_xmlDumpAttributeTable();
+ test_ret += test_xmlDumpElementDecl();
+ test_ret += test_xmlDumpElementTable();
+ test_ret += test_xmlDumpNotationDecl();
+ test_ret += test_xmlDumpNotationTable();
+ test_ret += test_xmlGetDtdAttrDesc();
+ test_ret += test_xmlGetDtdElementDesc();
+ test_ret += test_xmlGetDtdNotationDesc();
+ test_ret += test_xmlGetDtdQAttrDesc();
+ test_ret += test_xmlGetDtdQElementDesc();
+ test_ret += test_xmlGetID();
+ test_ret += test_xmlGetRefs();
+ test_ret += test_xmlIsID();
+ test_ret += test_xmlIsMixedElement();
+ test_ret += test_xmlIsRef();
+ test_ret += test_xmlNewDocElementContent();
+ test_ret += test_xmlNewElementContent();
+ test_ret += test_xmlNewValidCtxt();
+ test_ret += test_xmlRemoveID();
+ test_ret += test_xmlRemoveRef();
+ test_ret += test_xmlSnprintfElementContent();
+ test_ret += test_xmlSprintfElementContent();
+ test_ret += test_xmlValidBuildContentModel();
+ test_ret += test_xmlValidCtxtNormalizeAttributeValue();
+ test_ret += test_xmlValidGetPotentialChildren();
+ test_ret += test_xmlValidGetValidElements();
+ test_ret += test_xmlValidNormalizeAttributeValue();
+ test_ret += test_xmlValidateAttributeDecl();
+ test_ret += test_xmlValidateAttributeValue();
+ test_ret += test_xmlValidateDocument();
+ test_ret += test_xmlValidateDocumentFinal();
+ test_ret += test_xmlValidateDtd();
+ test_ret += test_xmlValidateDtdFinal();
+ test_ret += test_xmlValidateElement();
+ test_ret += test_xmlValidateElementDecl();
+ test_ret += test_xmlValidateNameValue();
+ test_ret += test_xmlValidateNamesValue();
+ test_ret += test_xmlValidateNmtokenValue();
+ test_ret += test_xmlValidateNmtokensValue();
+ test_ret += test_xmlValidateNotationDecl();
+ test_ret += test_xmlValidateNotationUse();
+ test_ret += test_xmlValidateOneAttribute();
+ test_ret += test_xmlValidateOneElement();
+ test_ret += test_xmlValidateOneNamespace();
+ test_ret += test_xmlValidatePopElement();
+ test_ret += test_xmlValidatePushCData();
+ test_ret += test_xmlValidatePushElement();
+ test_ret += test_xmlValidateRoot();
+
+ if (test_ret != 0)
+ printf("Module valid: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlXIncludeNewContext(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcess(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* an XML document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlXIncludeProcess(doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcess",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcessFlags(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* an XML document */
+ int n_doc;
+ int flags; /* a set of xmlParserOption used for parsing XML includes */
+ int n_flags;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ flags = gen_int(n_flags, 1);
+
+ ret_val = xmlXIncludeProcessFlags(doc, flags);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_int(n_flags, flags, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessFlags",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_flags);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcessFlagsData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlDocPtr doc; /* an XML document */
+ int n_doc;
+ int flags; /* a set of xmlParserOption used for parsing XML includes */
+ int n_flags;
+ void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
+ int n_data;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ flags = gen_int(n_flags, 1);
+ data = gen_userdata(n_data, 2);
+
+ ret_val = xmlXIncludeProcessFlagsData(doc, flags, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_int(n_flags, flags, 1);
+ des_userdata(n_data, data, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessFlagsData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_flags);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+
+#define gen_nb_xmlXIncludeCtxtPtr 1
+static xmlXIncludeCtxtPtr gen_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlXIncludeCtxtPtr(int no ATTRIBUTE_UNUSED, xmlXIncludeCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlXIncludeProcessNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXIncludeCtxtPtr ctxt; /* an existing XInclude context */
+ int n_ctxt;
+ xmlNodePtr node; /* a node in an XML document */
+ int n_node;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlXIncludeProcessNode(ctxt, node);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcessTree(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr tree; /* a node in an XML document */
+ int n_tree;
+
+ for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
+ mem_base = xmlMemBlocks();
+ tree = gen_xmlNodePtr(n_tree, 0);
+
+ ret_val = xmlXIncludeProcessTree(tree);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_tree, tree, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessTree",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_tree);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcessTreeFlags(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr tree; /* a node in an XML document */
+ int n_tree;
+ int flags; /* a set of xmlParserOption used for parsing XML includes */
+ int n_flags;
+
+ for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ mem_base = xmlMemBlocks();
+ tree = gen_xmlNodePtr(n_tree, 0);
+ flags = gen_int(n_flags, 1);
+
+ ret_val = xmlXIncludeProcessTreeFlags(tree, flags);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_tree, tree, 0);
+ des_int(n_flags, flags, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlags",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_tree);
+ printf(" %d", n_flags);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeProcessTreeFlagsData(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr tree; /* an XML node */
+ int n_tree;
+ int flags; /* a set of xmlParserOption used for parsing XML includes */
+ int n_flags;
+ void * data; /* application data that will be passed to the parser context in the _private field of the parser context(s) */
+ int n_data;
+
+ for (n_tree = 0;n_tree < gen_nb_xmlNodePtr;n_tree++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ tree = gen_xmlNodePtr(n_tree, 0);
+ flags = gen_int(n_flags, 1);
+ data = gen_userdata(n_data, 2);
+
+ ret_val = xmlXIncludeProcessTreeFlagsData(tree, flags, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_tree, tree, 0);
+ des_int(n_flags, flags, 1);
+ des_userdata(n_data, data, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeProcessTreeFlagsData",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_tree);
+ printf(" %d", n_flags);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXIncludeSetFlags(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XINCLUDE_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXIncludeCtxtPtr ctxt; /* an XInclude processing context */
+ int n_ctxt;
+ int flags; /* a set of xmlParserOption used for parsing XML includes */
+ int n_flags;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXIncludeCtxtPtr;n_ctxt++) {
+ for (n_flags = 0;n_flags < gen_nb_int;n_flags++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXIncludeCtxtPtr(n_ctxt, 0);
+ flags = gen_int(n_flags, 1);
+
+ ret_val = xmlXIncludeSetFlags(ctxt, flags);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXIncludeCtxtPtr(n_ctxt, ctxt, 0);
+ des_int(n_flags, flags, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXIncludeSetFlags",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_flags);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xinclude(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xinclude : 8 of 10 functions ...\n");
+ test_ret += test_xmlXIncludeNewContext();
+ test_ret += test_xmlXIncludeProcess();
+ test_ret += test_xmlXIncludeProcessFlags();
+ test_ret += test_xmlXIncludeProcessFlagsData();
+ test_ret += test_xmlXIncludeProcessNode();
+ test_ret += test_xmlXIncludeProcessTree();
+ test_ret += test_xmlXIncludeProcessTreeFlags();
+ test_ret += test_xmlXIncludeProcessTreeFlagsData();
+ test_ret += test_xmlXIncludeSetFlags();
+
+ if (test_ret != 0)
+ printf("Module xinclude: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlAllocOutputBuffer(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr ret_val;
+ xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+ int n_encoder;
+
+ for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+ mem_base = xmlMemBlocks();
+ encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 0);
+
+ ret_val = xmlAllocOutputBuffer(encoder);
+ desret_xmlOutputBufferPtr(ret_val);
+ call_tests++;
+ des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAllocOutputBuffer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_encoder);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAllocParserInputBuffer(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ enc = gen_xmlCharEncoding(n_enc, 0);
+
+ ret_val = xmlAllocParserInputBuffer(enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_xmlCharEncoding(n_enc, enc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAllocParserInputBuffer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCheckFilename(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ char * path; /* the path to check */
+ int n_path;
+
+ for (n_path = 0;n_path < gen_nb_const_char_ptr;n_path++) {
+ mem_base = xmlMemBlocks();
+ path = gen_const_char_ptr(n_path, 0);
+
+ ret_val = xmlCheckFilename((const char *)path);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_path, (const char *)path, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCheckFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_path);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCheckHTTPInput(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* an XML parser context */
+ int n_ctxt;
+ xmlParserInputPtr ret; /* an XML parser input */
+ int n_ret;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_ret = 0;n_ret < gen_nb_xmlParserInputPtr;n_ret++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ ret = gen_xmlParserInputPtr(n_ret, 1);
+
+ ret_val = xmlCheckHTTPInput(ctxt, ret);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputPtr(n_ret, ret, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCheckHTTPInput",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_ret);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCleanupInputCallbacks(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlCleanupInputCallbacks();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCleanupInputCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCleanupOutputCallbacks(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlCleanupOutputCallbacks();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCleanupOutputCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFileClose(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+
+ ret_val = xmlFileClose(context);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlFileClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFileMatch(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlFileMatch(filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlFileMatch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFileOpen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlFileOpen(filename);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlFileOpen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlFileRead(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+ char * buffer; /* where to drop data */
+ int n_buffer;
+ int len; /* number of bytes to write */
+ int n_len;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+ buffer = gen_char_ptr(n_buffer, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlFileRead(context, buffer, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ des_char_ptr(n_buffer, buffer, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlFileRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf(" %d", n_buffer);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOFTPClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+
+ ret_val = xmlIOFTPClose(context);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOFTPClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOFTPMatch(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlIOFTPMatch(filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOFTPMatch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOFTPOpen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlIOFTPOpen(filename);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOFTPOpen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOFTPRead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_FTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+ char * buffer; /* where to drop data */
+ int n_buffer;
+ int len; /* number of bytes to write */
+ int n_len;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+ buffer = gen_char_ptr(n_buffer, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlIOFTPRead(context, buffer, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ des_char_ptr(n_buffer, buffer, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOFTPRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf(" %d", n_buffer);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOHTTPClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+
+ ret_val = xmlIOHTTPClose(context);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOHTTPClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOHTTPMatch(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlIOHTTPMatch(filename);
+ desret_int(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOHTTPMatch",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOHTTPOpen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ void * ret_val;
+ const char * filename; /* the URI for matching */
+ int n_filename;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+
+ ret_val = xmlIOHTTPOpen(filename);
+ desret_xmlNanoHTTPCtxtPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOHTTPOpen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlIOHTTPRead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+ int ret_val;
+ void * context; /* the I/O context */
+ int n_context;
+ char * buffer; /* where to drop data */
+ int n_buffer;
+ int len; /* number of bytes to write */
+ int n_len;
+
+ for (n_context = 0;n_context < gen_nb_void_ptr;n_context++) {
+ for (n_buffer = 0;n_buffer < gen_nb_char_ptr;n_buffer++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ context = gen_void_ptr(n_context, 0);
+ buffer = gen_char_ptr(n_buffer, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlIOHTTPRead(context, buffer, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_void_ptr(n_context, context, 0);
+ des_char_ptr(n_buffer, buffer, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlIOHTTPRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_context);
+ printf(" %d", n_buffer);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNoNetExternalEntityLoader(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr ret_val;
+ const char * URL; /* the URL for the entity to load */
+ int n_URL;
+ char * ID; /* the System ID for the entity to load */
+ int n_ID;
+ xmlParserCtxtPtr ctxt; /* the context in which the entity is called or NULL */
+ int n_ctxt;
+
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_ID = 0;n_ID < gen_nb_const_char_ptr;n_ID++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_filepath(n_URL, 0);
+ ID = gen_const_char_ptr(n_ID, 1);
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 2);
+
+ ret_val = xmlNoNetExternalEntityLoader(URL, (const char *)ID, ctxt);
+ desret_xmlParserInputPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URL, URL, 0);
+ des_const_char_ptr(n_ID, (const char *)ID, 1);
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNoNetExternalEntityLoader",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf(" %d", n_ID);
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNormalizeWindowsPath(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * path; /* the input file path */
+ int n_path;
+
+ for (n_path = 0;n_path < gen_nb_const_xmlChar_ptr;n_path++) {
+ mem_base = xmlMemBlocks();
+ path = gen_const_xmlChar_ptr(n_path, 0);
+
+ ret_val = xmlNormalizeWindowsPath((const xmlChar *)path);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_path, (const xmlChar *)path, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNormalizeWindowsPath",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_path);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferCreateBuffer(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr ret_val;
+ xmlBufferPtr buffer; /* a xmlBufferPtr */
+ int n_buffer;
+ xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+ int n_encoder;
+
+ for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr;n_buffer++) {
+ for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_xmlBufferPtr(n_buffer, 0);
+ encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
+
+ ret_val = xmlOutputBufferCreateBuffer(buffer, encoder);
+ desret_xmlOutputBufferPtr(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buffer, buffer, 0);
+ des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferCreateBuffer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_encoder);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferCreateFd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr ret_val;
+ int fd; /* a file descriptor number */
+ int n_fd;
+ xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+ int n_encoder;
+
+ for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
+ for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+ mem_base = xmlMemBlocks();
+ fd = gen_int(n_fd, 0);
+ encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
+
+ ret_val = xmlOutputBufferCreateFd(fd, encoder);
+ desret_xmlOutputBufferPtr(ret_val);
+ call_tests++;
+ des_int(n_fd, fd, 0);
+ des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferCreateFd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_fd);
+ printf(" %d", n_encoder);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferCreateFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr ret_val;
+ FILE * file; /* a FILE* */
+ int n_file;
+ xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+ int n_encoder;
+
+ for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
+ for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+ mem_base = xmlMemBlocks();
+ file = gen_FILE_ptr(n_file, 0);
+ encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
+
+ ret_val = xmlOutputBufferCreateFile(file, encoder);
+ desret_xmlOutputBufferPtr(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_file, file, 0);
+ des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferCreateFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_file);
+ printf(" %d", n_encoder);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferCreateFilename(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ xmlOutputBufferPtr ret_val;
+ const char * URI; /* a C string containing the URI or filename */
+ int n_URI;
+ xmlCharEncodingHandlerPtr encoder; /* the encoding converter or NULL */
+ int n_encoder;
+ int compression; /* the compression ration (0 none, 9 max). */
+ int n_compression;
+
+ for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
+ for (n_encoder = 0;n_encoder < gen_nb_xmlCharEncodingHandlerPtr;n_encoder++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_fileoutput(n_URI, 0);
+ encoder = gen_xmlCharEncodingHandlerPtr(n_encoder, 1);
+ compression = gen_int(n_compression, 2);
+
+ ret_val = xmlOutputBufferCreateFilename(URI, encoder, compression);
+ desret_xmlOutputBufferPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_URI, URI, 0);
+ des_xmlCharEncodingHandlerPtr(n_encoder, encoder, 1);
+ des_int(n_compression, compression, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferCreateFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_encoder);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferFlush(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlOutputBufferPtr out; /* a buffered output */
+ int n_out;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+
+ ret_val = xmlOutputBufferFlush(out);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferFlush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferGetContent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
+ int n_out;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+
+ ret_val = xmlOutputBufferGetContent(out);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferGetContent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferGetSize(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferWrite(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlOutputBufferPtr out; /* a buffered parser output */
+ int n_out;
+ int len; /* the size in bytes of the array. */
+ int n_len;
+ char * buf; /* an char array */
+ int n_buf;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+ len = gen_int(n_len, 1);
+ buf = gen_const_char_ptr(n_buf, 2);
+
+ ret_val = xmlOutputBufferWrite(out, len, (const char *)buf);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ des_int(n_len, len, 1);
+ des_const_char_ptr(n_buf, (const char *)buf, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferWrite",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_len);
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferWriteEscape(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferWriteString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlOutputBufferPtr out; /* a buffered parser output */
+ int n_out;
+ char * str; /* a zero terminated C string */
+ int n_str;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ for (n_str = 0;n_str < gen_nb_const_char_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+ str = gen_const_char_ptr(n_str, 1);
+
+ ret_val = xmlOutputBufferWriteString(out, (const char *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ des_const_char_ptr(n_str, (const char *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlOutputBufferWriteString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserGetDirectory(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferCreateFd(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ int fd; /* a file descriptor number */
+ int n_fd;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_fd = 0;n_fd < gen_nb_int;n_fd++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ fd = gen_int(n_fd, 0);
+ enc = gen_xmlCharEncoding(n_enc, 1);
+ if (fd >= 0) fd = -1;
+
+ ret_val = xmlParserInputBufferCreateFd(fd, enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_int(n_fd, fd, 0);
+ des_xmlCharEncoding(n_enc, enc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferCreateFd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_fd);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferCreateFile(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ FILE * file; /* a FILE* */
+ int n_file;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_file = 0;n_file < gen_nb_FILE_ptr;n_file++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ file = gen_FILE_ptr(n_file, 0);
+ enc = gen_xmlCharEncoding(n_enc, 1);
+
+ ret_val = xmlParserInputBufferCreateFile(file, enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_FILE_ptr(n_file, file, 0);
+ des_xmlCharEncoding(n_enc, enc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferCreateFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_file);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferCreateFilename(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ const char * URI; /* a C string containing the URI or filename */
+ int n_URI;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_URI = 0;n_URI < gen_nb_fileoutput;n_URI++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_fileoutput(n_URI, 0);
+ enc = gen_xmlCharEncoding(n_enc, 1);
+
+ ret_val = xmlParserInputBufferCreateFilename(URI, enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_URI, URI, 0);
+ des_xmlCharEncoding(n_enc, enc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferCreateFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferCreateMem(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ char * mem; /* the memory input */
+ int n_mem;
+ int size; /* the length of the memory block */
+ int n_size;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ mem = gen_const_char_ptr(n_mem, 0);
+ size = gen_int(n_size, 1);
+ enc = gen_xmlCharEncoding(n_enc, 2);
+
+ ret_val = xmlParserInputBufferCreateMem((const char *)mem, size, enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_mem, (const char *)mem, 0);
+ des_int(n_size, size, 1);
+ des_xmlCharEncoding(n_enc, enc, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferCreateMem",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferCreateStatic(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ char * mem; /* the memory input */
+ int n_mem;
+ int size; /* the length of the memory block */
+ int n_size;
+ xmlCharEncoding enc; /* the charset encoding if known */
+ int n_enc;
+
+ for (n_mem = 0;n_mem < gen_nb_const_char_ptr;n_mem++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ mem_base = xmlMemBlocks();
+ mem = gen_const_char_ptr(n_mem, 0);
+ size = gen_int(n_size, 1);
+ enc = gen_xmlCharEncoding(n_enc, 2);
+
+ ret_val = xmlParserInputBufferCreateStatic((const char *)mem, size, enc);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_mem, (const char *)mem, 0);
+ des_int(n_size, size, 1);
+ des_xmlCharEncoding(n_enc, enc, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferCreateStatic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_mem);
+ printf(" %d", n_size);
+ printf(" %d", n_enc);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferGrow(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserInputBufferPtr in; /* a buffered parser input */
+ int n_in;
+ int len; /* indicative value of the amount of chars to read */
+ int n_len;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputBufferPtr(n_in, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlParserInputBufferGrow(in, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserInputBufferPtr(n_in, in, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferGrow",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferPush(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserInputBufferPtr in; /* a buffered parser input */
+ int n_in;
+ int len; /* the size in bytes of the array. */
+ int n_len;
+ char * buf; /* an char array */
+ int n_buf;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ for (n_buf = 0;n_buf < gen_nb_const_char_ptr;n_buf++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputBufferPtr(n_in, 0);
+ len = gen_int(n_len, 1);
+ buf = gen_const_char_ptr(n_buf, 2);
+
+ ret_val = xmlParserInputBufferPush(in, len, (const char *)buf);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserInputBufferPtr(n_in, in, 0);
+ des_int(n_len, len, 1);
+ des_const_char_ptr(n_buf, (const char *)buf, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferPush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf(" %d", n_buf);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserInputBufferRead(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlParserInputBufferPtr in; /* a buffered parser input */
+ int n_in;
+ int len; /* indicative value of the amount of chars to read */
+ int n_len;
+
+ for (n_in = 0;n_in < gen_nb_xmlParserInputBufferPtr;n_in++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ in = gen_xmlParserInputBufferPtr(n_in, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlParserInputBufferRead(in, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlParserInputBufferPtr(n_in, in, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserInputBufferRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_in);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlPopInputCallbacks(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+
+ mem_base = xmlMemBlocks();
+
+ ret_val = xmlPopInputCallbacks();
+ desret_int(ret_val);
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlPopInputCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegisterDefaultInputCallbacks(void) {
+ int test_ret = 0;
+
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlRegisterDefaultInputCallbacks();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegisterDefaultInputCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegisterDefaultOutputCallbacks(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlRegisterDefaultOutputCallbacks();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegisterDefaultOutputCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegisterHTTPPostCallbacks(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED) && defined(LIBXML_HTTP_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlRegisterHTTPPostCallbacks();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegisterHTTPPostCallbacks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlIO(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
+ test_ret += test_xmlAllocOutputBuffer();
+ test_ret += test_xmlAllocParserInputBuffer();
+ test_ret += test_xmlCheckFilename();
+ test_ret += test_xmlCheckHTTPInput();
+ test_ret += test_xmlCleanupInputCallbacks();
+ test_ret += test_xmlCleanupOutputCallbacks();
+ test_ret += test_xmlFileClose();
+ test_ret += test_xmlFileMatch();
+ test_ret += test_xmlFileOpen();
+ test_ret += test_xmlFileRead();
+ test_ret += test_xmlIOFTPClose();
+ test_ret += test_xmlIOFTPMatch();
+ test_ret += test_xmlIOFTPOpen();
+ test_ret += test_xmlIOFTPRead();
+ test_ret += test_xmlIOHTTPClose();
+ test_ret += test_xmlIOHTTPMatch();
+ test_ret += test_xmlIOHTTPOpen();
+ test_ret += test_xmlIOHTTPRead();
+ test_ret += test_xmlNoNetExternalEntityLoader();
+ test_ret += test_xmlNormalizeWindowsPath();
+ test_ret += test_xmlOutputBufferCreateBuffer();
+ test_ret += test_xmlOutputBufferCreateFd();
+ test_ret += test_xmlOutputBufferCreateFile();
+ test_ret += test_xmlOutputBufferCreateFilename();
+ test_ret += test_xmlOutputBufferFlush();
+ test_ret += test_xmlOutputBufferGetContent();
+ test_ret += test_xmlOutputBufferGetSize();
+ test_ret += test_xmlOutputBufferWrite();
+ test_ret += test_xmlOutputBufferWriteEscape();
+ test_ret += test_xmlOutputBufferWriteString();
+ test_ret += test_xmlParserGetDirectory();
+ test_ret += test_xmlParserInputBufferCreateFd();
+ test_ret += test_xmlParserInputBufferCreateFile();
+ test_ret += test_xmlParserInputBufferCreateFilename();
+ test_ret += test_xmlParserInputBufferCreateMem();
+ test_ret += test_xmlParserInputBufferCreateStatic();
+ test_ret += test_xmlParserInputBufferGrow();
+ test_ret += test_xmlParserInputBufferPush();
+ test_ret += test_xmlParserInputBufferRead();
+ test_ret += test_xmlPopInputCallbacks();
+ test_ret += test_xmlRegisterDefaultInputCallbacks();
+ test_ret += test_xmlRegisterDefaultOutputCallbacks();
+ test_ret += test_xmlRegisterHTTPPostCallbacks();
+
+ if (test_ret != 0)
+ printf("Module xmlIO: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_AUTOMATA_ENABLED
+
+#define gen_nb_xmlAutomataPtr 1
+static xmlAutomataPtr gen_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAutomataPtr(int no ATTRIBUTE_UNUSED, xmlAutomataPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlAutomataCompile(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataGetInitState(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataIsDeterminist(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlAutomataPtr am; /* an automata */
+ int n_am;
+
+ for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
+ mem_base = xmlMemBlocks();
+ am = gen_xmlAutomataPtr(n_am, 0);
+
+ ret_val = xmlAutomataIsDeterminist(am);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlAutomataPtr(n_am, am, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAutomataIsDeterminist",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_am);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_AUTOMATA_ENABLED
+
+#define gen_nb_xmlAutomataStatePtr 1
+static xmlAutomataStatePtr gen_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlAutomataStatePtr(int no ATTRIBUTE_UNUSED, xmlAutomataStatePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlAutomataNewAllTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewCountTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewCountTrans2(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewCountedTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewCounter(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlAutomataPtr am; /* an automata */
+ int n_am;
+ int min; /* the minimal value on the counter */
+ int n_min;
+ int max; /* the maximal value on the counter */
+ int n_max;
+
+ for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
+ for (n_min = 0;n_min < gen_nb_int;n_min++) {
+ for (n_max = 0;n_max < gen_nb_int;n_max++) {
+ mem_base = xmlMemBlocks();
+ am = gen_xmlAutomataPtr(n_am, 0);
+ min = gen_int(n_min, 1);
+ max = gen_int(n_max, 2);
+
+ ret_val = xmlAutomataNewCounter(am, min, max);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlAutomataPtr(n_am, am, 0);
+ des_int(n_min, min, 1);
+ des_int(n_max, max, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAutomataNewCounter",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_am);
+ printf(" %d", n_min);
+ printf(" %d", n_max);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewCounterTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewEpsilon(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewNegTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewOnceTrans(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewOnceTrans2(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewState(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewTransition(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataNewTransition2(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlAutomataSetFinalState(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_AUTOMATA_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlAutomataPtr am; /* an automata */
+ int n_am;
+ xmlAutomataStatePtr state; /* a state in this automata */
+ int n_state;
+
+ for (n_am = 0;n_am < gen_nb_xmlAutomataPtr;n_am++) {
+ for (n_state = 0;n_state < gen_nb_xmlAutomataStatePtr;n_state++) {
+ mem_base = xmlMemBlocks();
+ am = gen_xmlAutomataPtr(n_am, 0);
+ state = gen_xmlAutomataStatePtr(n_state, 1);
+
+ ret_val = xmlAutomataSetFinalState(am, state);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlAutomataPtr(n_am, am, 0);
+ des_xmlAutomataStatePtr(n_state, state, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlAutomataSetFinalState",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_am);
+ printf(" %d", n_state);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewAutomata(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_xmlautomata(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlautomata : 3 of 19 functions ...\n");
+ test_ret += test_xmlAutomataCompile();
+ test_ret += test_xmlAutomataGetInitState();
+ test_ret += test_xmlAutomataIsDeterminist();
+ test_ret += test_xmlAutomataNewAllTrans();
+ test_ret += test_xmlAutomataNewCountTrans();
+ test_ret += test_xmlAutomataNewCountTrans2();
+ test_ret += test_xmlAutomataNewCountedTrans();
+ test_ret += test_xmlAutomataNewCounter();
+ test_ret += test_xmlAutomataNewCounterTrans();
+ test_ret += test_xmlAutomataNewEpsilon();
+ test_ret += test_xmlAutomataNewNegTrans();
+ test_ret += test_xmlAutomataNewOnceTrans();
+ test_ret += test_xmlAutomataNewOnceTrans2();
+ test_ret += test_xmlAutomataNewState();
+ test_ret += test_xmlAutomataNewTransition();
+ test_ret += test_xmlAutomataNewTransition2();
+ test_ret += test_xmlAutomataSetFinalState();
+ test_ret += test_xmlNewAutomata();
+
+ if (test_ret != 0)
+ printf("Module xmlautomata: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+#define gen_nb_xmlGenericErrorFunc_ptr 1
+static xmlGenericErrorFunc * gen_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlGenericErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlGenericErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_initGenericErrorDefaultFunc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlGenericErrorFunc * handler; /* the handler */
+ int n_handler;
+
+ for (n_handler = 0;n_handler < gen_nb_xmlGenericErrorFunc_ptr;n_handler++) {
+ mem_base = xmlMemBlocks();
+ handler = gen_xmlGenericErrorFunc_ptr(n_handler, 0);
+
+ initGenericErrorDefaultFunc(handler);
+ call_tests++;
+ des_xmlGenericErrorFunc_ptr(n_handler, handler, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in initGenericErrorDefaultFunc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_handler);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+#define gen_nb_xmlErrorPtr 1
+static xmlErrorPtr gen_xmlErrorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlErrorPtr(int no ATTRIBUTE_UNUSED, xmlErrorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlCopyError(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlErrorPtr from; /* a source error */
+ int n_from;
+ xmlErrorPtr to; /* a target error */
+ int n_to;
+
+ for (n_from = 0;n_from < gen_nb_xmlErrorPtr;n_from++) {
+ for (n_to = 0;n_to < gen_nb_xmlErrorPtr;n_to++) {
+ mem_base = xmlMemBlocks();
+ from = gen_xmlErrorPtr(n_from, 0);
+ to = gen_xmlErrorPtr(n_to, 1);
+
+ ret_val = xmlCopyError(from, to);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlErrorPtr(n_from, from, 0);
+ des_xmlErrorPtr(n_to, to, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCopyError",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_from);
+ printf(" %d", n_to);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtGetLastError(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlCtxtResetLastError(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ void * ctx; /* an XML parser context */
+ int n_ctx;
+
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctx = gen_void_ptr(n_ctx, 0);
+
+ xmlCtxtResetLastError(ctx);
+ call_tests++;
+ des_void_ptr(n_ctx, ctx, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCtxtResetLastError",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetLastError(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserError(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserPrintFileContext(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr input; /* an xmlParserInputPtr input */
+ int n_input;
+
+ for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
+ mem_base = xmlMemBlocks();
+ input = gen_xmlParserInputPtr(n_input, 0);
+
+ xmlParserPrintFileContext(input);
+ call_tests++;
+ des_xmlParserInputPtr(n_input, input, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserPrintFileContext",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_input);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserPrintFileInfo(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlParserInputPtr input; /* an xmlParserInputPtr input */
+ int n_input;
+
+ for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {
+ mem_base = xmlMemBlocks();
+ input = gen_xmlParserInputPtr(n_input, 0);
+
+ xmlParserPrintFileInfo(input);
+ call_tests++;
+ des_xmlParserInputPtr(n_input, input, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlParserPrintFileInfo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_input);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserValidityError(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserValidityWarning(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlParserWarning(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlResetError(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlErrorPtr err; /* pointer to the error. */
+ int n_err;
+
+ for (n_err = 0;n_err < gen_nb_xmlErrorPtr;n_err++) {
+ mem_base = xmlMemBlocks();
+ err = gen_xmlErrorPtr(n_err, 0);
+
+ xmlResetError(err);
+ call_tests++;
+ des_xmlErrorPtr(n_err, err, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlResetError",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_err);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlResetLastError(void) {
+ int test_ret = 0;
+
+
+
+ xmlResetLastError();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetGenericErrorFunc(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSetStructuredErrorFunc(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_xmlerror(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlerror : 7 of 15 functions ...\n");
+ test_ret += test_initGenericErrorDefaultFunc();
+ test_ret += test_xmlCopyError();
+ test_ret += test_xmlCtxtGetLastError();
+ test_ret += test_xmlCtxtResetLastError();
+ test_ret += test_xmlGetLastError();
+ test_ret += test_xmlParserError();
+ test_ret += test_xmlParserPrintFileContext();
+ test_ret += test_xmlParserPrintFileInfo();
+ test_ret += test_xmlParserValidityError();
+ test_ret += test_xmlParserValidityWarning();
+ test_ret += test_xmlParserWarning();
+ test_ret += test_xmlResetError();
+ test_ret += test_xmlResetLastError();
+ test_ret += test_xmlSetGenericErrorFunc();
+ test_ret += test_xmlSetStructuredErrorFunc();
+
+ if (test_ret != 0)
+ printf("Module xmlerror: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_MODULES_ENABLED
+
+#define gen_nb_xmlModulePtr 1
+static xmlModulePtr gen_xmlModulePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlModulePtr(int no ATTRIBUTE_UNUSED, xmlModulePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlModuleClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_MODULES_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlModulePtr module; /* the module handle */
+ int n_module;
+
+ for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
+ mem_base = xmlMemBlocks();
+ module = gen_xmlModulePtr(n_module, 0);
+
+ ret_val = xmlModuleClose(module);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlModulePtr(n_module, module, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlModuleClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_module);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlModuleOpen(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlModuleSymbol(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_MODULES_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlModulePtr module; /* the module */
+ int n_module;
+ char * name; /* the name of the symbol */
+ int n_name;
+ void ** symbol; /* the resulting symbol address */
+ int n_symbol;
+
+ for (n_module = 0;n_module < gen_nb_xmlModulePtr;n_module++) {
+ for (n_name = 0;n_name < gen_nb_const_char_ptr;n_name++) {
+ for (n_symbol = 0;n_symbol < gen_nb_void_ptr_ptr;n_symbol++) {
+ mem_base = xmlMemBlocks();
+ module = gen_xmlModulePtr(n_module, 0);
+ name = gen_const_char_ptr(n_name, 1);
+ symbol = gen_void_ptr_ptr(n_symbol, 2);
+
+ ret_val = xmlModuleSymbol(module, (const char *)name, symbol);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlModulePtr(n_module, module, 0);
+ des_const_char_ptr(n_name, (const char *)name, 1);
+ des_void_ptr_ptr(n_symbol, symbol, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlModuleSymbol",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_module);
+ printf(" %d", n_name);
+ printf(" %d", n_symbol);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlmodule(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlmodule : 2 of 4 functions ...\n");
+ test_ret += test_xmlModuleClose();
+ test_ret += test_xmlModuleOpen();
+ test_ret += test_xmlModuleSymbol();
+
+ if (test_ret != 0)
+ printf("Module xmlmodule: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlNewTextReader(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ xmlParserInputBufferPtr input; /* the xmlParserInputBufferPtr used to read data */
+ int n_input;
+ const char * URI; /* the URI information for the source if available */
+ int n_URI;
+
+ for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
+ for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
+ mem_base = xmlMemBlocks();
+ input = gen_xmlParserInputBufferPtr(n_input, 0);
+ URI = gen_filepath(n_URI, 1);
+
+ ret_val = xmlNewTextReader(input, URI);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_xmlParserInputBufferPtr(n_input, input, 0);
+ des_filepath(n_URI, URI, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextReader",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_input);
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextReaderFilename(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ const char * URI; /* the URI of the resource to process */
+ int n_URI;
+
+ for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {
+ mem_base = xmlMemBlocks();
+ URI = gen_filepath(n_URI, 0);
+
+ ret_val = xmlNewTextReaderFilename(URI);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_filepath(n_URI, URI, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextReaderFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URI);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderForDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+ URL = gen_filepath(n_URL, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_parseroptions(n_options, 3);
+
+ ret_val = xmlReaderForDoc((const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ des_filepath(n_URL, URL, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_parseroptions(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderForDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderForFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ filename = gen_filepath(n_filename, 0);
+ encoding = gen_const_char_ptr(n_encoding, 1);
+ options = gen_parseroptions(n_options, 2);
+
+ ret_val = xmlReaderForFile(filename, (const char *)encoding, options);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_filepath(n_filename, filename, 0);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 1);
+ des_parseroptions(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderForFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderForMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_parseroptions(n_options, 4);
+
+ ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_parseroptions(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderForMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderNewDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+ xmlChar * cur; /* a pointer to a zero terminated string */
+ int n_cur;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ cur = gen_const_xmlChar_ptr(n_cur, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_parseroptions(n_options, 4);
+
+ ret_val = xmlReaderNewDoc(reader, (const xmlChar *)cur, URL, (const char *)encoding, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_parseroptions(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderNewDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_cur);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderNewFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+ const char * filename; /* a file or URL */
+ int n_filename;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ filename = gen_filepath(n_filename, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ options = gen_parseroptions(n_options, 3);
+
+ ret_val = xmlReaderNewFile(reader, filename, (const char *)encoding, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_filepath(n_filename, filename, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_parseroptions(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderNewFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_filename);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderNewMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+ char * buffer; /* a pointer to a char array */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ buffer = gen_const_char_ptr(n_buffer, 1);
+ size = gen_int(n_size, 2);
+ URL = gen_filepath(n_URL, 3);
+ encoding = gen_const_char_ptr(n_encoding, 4);
+ options = gen_parseroptions(n_options, 5);
+
+ ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_char_ptr(n_buffer, (const char *)buffer, 1);
+ des_int(n_size, size, 2);
+ des_filepath(n_URL, URL, 3);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 4);
+ des_parseroptions(n_options, options, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderNewMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderNewWalker(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+ xmlDocPtr doc; /* a preparsed document */
+ int n_doc;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlReaderNewWalker(reader, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderNewWalker",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlReaderWalker(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr ret_val;
+ xmlDocPtr doc; /* a preparsed document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlReaderWalker(doc);
+ desret_xmlTextReaderPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlReaderWalker",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderAttributeCount(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderAttributeCount(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderAttributeCount",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderBaseUri(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderBaseUri(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderBaseUri",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderByteConsumed(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ long ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderByteConsumed(reader);
+ desret_long(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderByteConsumed",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderClose(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstBaseUri(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstBaseUri(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstBaseUri",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstEncoding(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstEncoding(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstEncoding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstLocalName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstLocalName(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstLocalName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstName(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstNamespaceUri(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstNamespaceUri(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstNamespaceUri",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstPrefix(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstPrefix(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstPrefix",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * str; /* the string to intern. */
+ int n_str;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+
+ ret_val = xmlTextReaderConstString(reader, (const xmlChar *)str);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstValue(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstXmlLang(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstXmlLang(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstXmlLang",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderConstXmlVersion(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderConstXmlVersion(reader);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderConstXmlVersion",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderCurrentDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlDocPtr ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderCurrentDoc(reader);
+ desret_xmlDocPtr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderCurrentDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderCurrentNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderCurrentNode(reader);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderCurrentNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderDepth(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderDepth(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderDepth",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderExpand(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderExpand(reader);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderExpand",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * name; /* the qualified name of the attribute. */
+ int n_name;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextReaderGetAttribute(reader, (const xmlChar *)name);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetAttributeNo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ int no; /* the zero-based index of the attribute relative to the containing element */
+ int n_no;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_no = 0;n_no < gen_nb_int;n_no++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ no = gen_int(n_no, 1);
+
+ ret_val = xmlTextReaderGetAttributeNo(reader, no);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_int(n_no, no, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetAttributeNo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_no);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetAttributeNs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * localName; /* the local name of the attribute. */
+ int n_localName;
+ xmlChar * namespaceURI; /* the namespace URI of the attribute. */
+ int n_namespaceURI;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ localName = gen_const_xmlChar_ptr(n_localName, 1);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
+
+ ret_val = xmlTextReaderGetAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetAttributeNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_localName);
+ printf(" %d", n_namespaceURI);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_READER_ENABLED
+
+#define gen_nb_xmlTextReaderErrorFunc_ptr 1
+static xmlTextReaderErrorFunc * gen_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlTextReaderErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlTextReaderErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlTextReaderGetErrorHandler(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlTextReaderErrorFunc * f; /* the callback function or NULL is no callback has been registered */
+ int n_f;
+ void ** arg; /* a user argument */
+ int n_arg;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_f = 0;n_f < gen_nb_xmlTextReaderErrorFunc_ptr;n_f++) {
+ for (n_arg = 0;n_arg < gen_nb_void_ptr_ptr;n_arg++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ f = gen_xmlTextReaderErrorFunc_ptr(n_f, 1);
+ arg = gen_void_ptr_ptr(n_arg, 2);
+
+ xmlTextReaderGetErrorHandler(reader, f, arg);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlTextReaderErrorFunc_ptr(n_f, f, 1);
+ des_void_ptr_ptr(n_arg, arg, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetErrorHandler",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_f);
+ printf(" %d", n_arg);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetParserColumnNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the user data (XML reader context) */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderGetParserColumnNumber(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetParserColumnNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetParserLineNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the user data (XML reader context) */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderGetParserLineNumber(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetParserLineNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetParserProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ int prop; /* the xmlParserProperties to get */
+ int n_prop;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ prop = gen_int(n_prop, 1);
+
+ ret_val = xmlTextReaderGetParserProp(reader, prop);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_int(n_prop, prop, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetParserProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_prop);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderGetRemainder(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlParserInputBufferPtr ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderGetRemainder(reader);
+ desret_xmlParserInputBufferPtr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderGetRemainder",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderHasAttributes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderHasAttributes(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderHasAttributes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderHasValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderHasValue(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderHasValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderIsDefault(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderIsDefault(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderIsDefault",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderIsEmptyElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderIsEmptyElement(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderIsEmptyElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderIsNamespaceDecl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderIsNamespaceDecl(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderIsNamespaceDecl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderIsValid(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderIsValid(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderIsValid",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderLocalName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderLocalName(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderLocalName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_READER_ENABLED
+
+#define gen_nb_xmlTextReaderLocatorPtr 1
+static xmlTextReaderLocatorPtr gen_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlTextReaderLocatorBaseURI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
+ int n_locator;
+
+ for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
+ mem_base = xmlMemBlocks();
+ locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
+
+ ret_val = xmlTextReaderLocatorBaseURI(locator);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderLocatorBaseURI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_locator);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderLocatorLineNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */
+ int n_locator;
+
+ for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {
+ mem_base = xmlMemBlocks();
+ locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);
+
+ ret_val = xmlTextReaderLocatorLineNumber(locator);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderLocatorPtr(n_locator, locator, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderLocatorLineNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_locator);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderLookupNamespace(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * prefix; /* the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL */
+ int n_prefix;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+
+ ret_val = xmlTextReaderLookupNamespace(reader, (const xmlChar *)prefix);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderLookupNamespace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * name; /* the qualified name of the attribute. */
+ int n_name;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextReaderMoveToAttribute(reader, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToAttributeNo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ int no; /* the zero-based index of the attribute relative to the containing element. */
+ int n_no;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_no = 0;n_no < gen_nb_int;n_no++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ no = gen_int(n_no, 1);
+
+ ret_val = xmlTextReaderMoveToAttributeNo(reader, no);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_int(n_no, no, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_no);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToAttributeNs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * localName; /* the local name of the attribute. */
+ int n_localName;
+ xmlChar * namespaceURI; /* the namespace URI of the attribute. */
+ int n_namespaceURI;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ localName = gen_const_xmlChar_ptr(n_localName, 1);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);
+
+ ret_val = xmlTextReaderMoveToAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToAttributeNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_localName);
+ printf(" %d", n_namespaceURI);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderMoveToElement(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToFirstAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderMoveToFirstAttribute(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToFirstAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderMoveToNextAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderMoveToNextAttribute(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderMoveToNextAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderName(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderNamespaceUri(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderNamespaceUri(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderNamespaceUri",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderNext(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderNext(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderNext",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderNextSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderNextSibling(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderNextSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderNodeType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderNodeType(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderNodeType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderNormalization(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderNormalization(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderNormalization",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderPrefix(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderPrefix(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderPrefix",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderPreserve(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderPreserve(reader);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderPreserve",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderPreservePattern(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)
+#ifdef LIBXML_PATTERN_ENABLED
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlChar * pattern; /* an XPath subset pattern */
+ int n_pattern;
+ xmlChar ** namespaces; /* the prefix definitions, array of [URI, prefix] or NULL */
+ int n_namespaces;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_pattern = 0;n_pattern < gen_nb_const_xmlChar_ptr;n_pattern++) {
+ for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ pattern = gen_const_xmlChar_ptr(n_pattern, 1);
+ namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 2);
+
+ ret_val = xmlTextReaderPreservePattern(reader, (const xmlChar *)pattern, (const xmlChar **)namespaces);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_xmlChar_ptr(n_pattern, (const xmlChar *)pattern, 1);
+ des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderPreservePattern",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_pattern);
+ printf(" %d", n_namespaces);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderQuoteChar(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderQuoteChar(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderQuoteChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderRead(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderRead(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderRead",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderReadAttributeValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderReadAttributeValue(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderReadAttributeValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderReadState(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderReadState(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderReadState",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderRelaxNGSetSchema(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlRelaxNGPtr schema; /* a precompiled RelaxNG schema */
+ int n_schema;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_schema = 0;n_schema < gen_nb_xmlRelaxNGPtr;n_schema++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ schema = gen_xmlRelaxNGPtr(n_schema, 1);
+
+ ret_val = xmlTextReaderRelaxNGSetSchema(reader, schema);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlRelaxNGPtr(n_schema, schema, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderRelaxNGSetSchema",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_schema);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderRelaxNGValidate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ char * rng; /* the path to a RelaxNG schema or NULL */
+ int n_rng;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_rng = 0;n_rng < gen_nb_const_char_ptr;n_rng++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ rng = gen_const_char_ptr(n_rng, 1);
+
+ ret_val = xmlTextReaderRelaxNGValidate(reader, (const char *)rng);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_char_ptr(n_rng, (const char *)rng, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_rng);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderRelaxNGValidateCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG schema validation context or NULL */
+ int n_ctxt;
+ int options; /* options (not used yet) */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 1);
+ options = gen_parseroptions(n_options, 2);
+
+ ret_val = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 1);
+ des_parseroptions(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidateCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_ctxt);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSchemaValidate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ char * xsd; /* the path to a W3C XSD schema or NULL */
+ int n_xsd;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_xsd = 0;n_xsd < gen_nb_const_char_ptr;n_xsd++) {
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ xsd = gen_const_char_ptr(n_xsd, 1);
+
+ ret_val = xmlTextReaderSchemaValidate(reader, (const char *)xsd);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_const_char_ptr(n_xsd, (const char *)xsd, 1);
+ xmlResetLastError();
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSchemaValidateCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlSchemaValidCtxtPtr ctxt; /* the XML Schema validation context or NULL */
+ int n_ctxt;
+ int options; /* options (not used yet) */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 1);
+ options = gen_parseroptions(n_options, 2);
+
+ ret_val = xmlTextReaderSchemaValidateCtxt(reader, ctxt, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 1);
+ des_parseroptions(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderSchemaValidateCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_ctxt);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSetErrorHandler(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSetParserProp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ int prop; /* the xmlParserProperties to set */
+ int n_prop;
+ int value; /* usually 0 or 1 to (de)activate it */
+ int n_value;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_prop = 0;n_prop < gen_nb_int;n_prop++) {
+ for (n_value = 0;n_value < gen_nb_int;n_value++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ prop = gen_int(n_prop, 1);
+ value = gen_int(n_value, 2);
+
+ ret_val = xmlTextReaderSetParserProp(reader, prop, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_int(n_prop, prop, 1);
+ des_int(n_value, value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderSetParserProp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_prop);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSetSchema(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+ xmlSchemaPtr schema; /* a precompiled Schema schema */
+ int n_schema;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ schema = gen_xmlSchemaPtr(n_schema, 1);
+
+ ret_val = xmlTextReaderSetSchema(reader, schema);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_xmlSchemaPtr(n_schema, schema, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderSetSchema",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_schema);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSetStructuredErrorHandler(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderSetup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* an XML reader */
+ int n_reader;
+ xmlParserInputBufferPtr input; /* xmlParserInputBufferPtr used to feed the reader, will be destroyed with it. */
+ int n_input;
+ const char * URL; /* the base URL to use for the document */
+ int n_URL;
+ char * encoding; /* the document encoding, or NULL */
+ int n_encoding;
+ int options; /* a combination of xmlParserOption */
+ int n_options;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
+ for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+ input = gen_xmlParserInputBufferPtr(n_input, 1);
+ URL = gen_filepath(n_URL, 2);
+ encoding = gen_const_char_ptr(n_encoding, 3);
+ options = gen_parseroptions(n_options, 4);
+
+ ret_val = xmlTextReaderSetup(reader, input, URL, (const char *)encoding, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ des_filepath(n_URL, URL, 2);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 3);
+ des_parseroptions(n_options, options, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderSetup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf(" %d", n_input);
+ printf(" %d", n_URL);
+ printf(" %d", n_encoding);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderStandalone(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderStandalone(reader);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderStandalone",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderValue(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextReaderXmlLang(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+ int n_reader;
+
+ for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+ mem_base = xmlMemBlocks();
+ reader = gen_xmlTextReaderPtr(n_reader, 0);
+
+ ret_val = xmlTextReaderXmlLang(reader);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlTextReaderPtr(n_reader, reader, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextReaderXmlLang",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_reader);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlreader(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlreader : 76 of 86 functions ...\n");
+ test_ret += test_xmlNewTextReader();
+ test_ret += test_xmlNewTextReaderFilename();
+ test_ret += test_xmlReaderForDoc();
+ test_ret += test_xmlReaderForFile();
+ test_ret += test_xmlReaderForMemory();
+ test_ret += test_xmlReaderNewDoc();
+ test_ret += test_xmlReaderNewFile();
+ test_ret += test_xmlReaderNewMemory();
+ test_ret += test_xmlReaderNewWalker();
+ test_ret += test_xmlReaderWalker();
+ test_ret += test_xmlTextReaderAttributeCount();
+ test_ret += test_xmlTextReaderBaseUri();
+ test_ret += test_xmlTextReaderByteConsumed();
+ test_ret += test_xmlTextReaderClose();
+ test_ret += test_xmlTextReaderConstBaseUri();
+ test_ret += test_xmlTextReaderConstEncoding();
+ test_ret += test_xmlTextReaderConstLocalName();
+ test_ret += test_xmlTextReaderConstName();
+ test_ret += test_xmlTextReaderConstNamespaceUri();
+ test_ret += test_xmlTextReaderConstPrefix();
+ test_ret += test_xmlTextReaderConstString();
+ test_ret += test_xmlTextReaderConstValue();
+ test_ret += test_xmlTextReaderConstXmlLang();
+ test_ret += test_xmlTextReaderConstXmlVersion();
+ test_ret += test_xmlTextReaderCurrentDoc();
+ test_ret += test_xmlTextReaderCurrentNode();
+ test_ret += test_xmlTextReaderDepth();
+ test_ret += test_xmlTextReaderExpand();
+ test_ret += test_xmlTextReaderGetAttribute();
+ test_ret += test_xmlTextReaderGetAttributeNo();
+ test_ret += test_xmlTextReaderGetAttributeNs();
+ test_ret += test_xmlTextReaderGetErrorHandler();
+ test_ret += test_xmlTextReaderGetParserColumnNumber();
+ test_ret += test_xmlTextReaderGetParserLineNumber();
+ test_ret += test_xmlTextReaderGetParserProp();
+ test_ret += test_xmlTextReaderGetRemainder();
+ test_ret += test_xmlTextReaderHasAttributes();
+ test_ret += test_xmlTextReaderHasValue();
+ test_ret += test_xmlTextReaderIsDefault();
+ test_ret += test_xmlTextReaderIsEmptyElement();
+ test_ret += test_xmlTextReaderIsNamespaceDecl();
+ test_ret += test_xmlTextReaderIsValid();
+ test_ret += test_xmlTextReaderLocalName();
+ test_ret += test_xmlTextReaderLocatorBaseURI();
+ test_ret += test_xmlTextReaderLocatorLineNumber();
+ test_ret += test_xmlTextReaderLookupNamespace();
+ test_ret += test_xmlTextReaderMoveToAttribute();
+ test_ret += test_xmlTextReaderMoveToAttributeNo();
+ test_ret += test_xmlTextReaderMoveToAttributeNs();
+ test_ret += test_xmlTextReaderMoveToElement();
+ test_ret += test_xmlTextReaderMoveToFirstAttribute();
+ test_ret += test_xmlTextReaderMoveToNextAttribute();
+ test_ret += test_xmlTextReaderName();
+ test_ret += test_xmlTextReaderNamespaceUri();
+ test_ret += test_xmlTextReaderNext();
+ test_ret += test_xmlTextReaderNextSibling();
+ test_ret += test_xmlTextReaderNodeType();
+ test_ret += test_xmlTextReaderNormalization();
+ test_ret += test_xmlTextReaderPrefix();
+ test_ret += test_xmlTextReaderPreserve();
+ test_ret += test_xmlTextReaderPreservePattern();
+ test_ret += test_xmlTextReaderQuoteChar();
+ test_ret += test_xmlTextReaderRead();
+ test_ret += test_xmlTextReaderReadAttributeValue();
+ test_ret += test_xmlTextReaderReadState();
+ test_ret += test_xmlTextReaderRelaxNGSetSchema();
+ test_ret += test_xmlTextReaderRelaxNGValidate();
+ test_ret += test_xmlTextReaderRelaxNGValidateCtxt();
+ test_ret += test_xmlTextReaderSchemaValidate();
+ test_ret += test_xmlTextReaderSchemaValidateCtxt();
+ test_ret += test_xmlTextReaderSetErrorHandler();
+ test_ret += test_xmlTextReaderSetParserProp();
+ test_ret += test_xmlTextReaderSetSchema();
+ test_ret += test_xmlTextReaderSetStructuredErrorHandler();
+ test_ret += test_xmlTextReaderSetup();
+ test_ret += test_xmlTextReaderStandalone();
+ test_ret += test_xmlTextReaderValue();
+ test_ret += test_xmlTextReaderXmlLang();
+
+ if (test_ret != 0)
+ printf("Module xmlreader: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlExpCtxtNbCons(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpCtxtPtr ctxt; /* an expression context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlExpCtxtNbCons(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpCtxtNbCons",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpCtxtNbNodes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpCtxtPtr ctxt; /* an expression context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlExpCtxtNbNodes(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpCtxtNbNodes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ xmlBufferPtr buf; /* a buffer to receive the output */
+ int n_buf;
+ xmlExpNodePtr expr; /* the compiled expression */
+ int n_expr;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ expr = gen_xmlExpNodePtr(n_expr, 1);
+
+ xmlExpDump(buf, expr);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_xmlExpNodePtr(n_expr, expr, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_expr);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpExpDerive(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpGetLanguage(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpCtxtPtr ctxt; /* the expression context */
+ int n_ctxt;
+ xmlExpNodePtr exp; /* the expression */
+ int n_exp;
+ xmlChar ** langList; /* where to store the tokens */
+ int n_langList;
+ int len; /* the allocated length of @list */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
+ for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
+ for (n_langList = 0;n_langList < gen_nb_const_xmlChar_ptr_ptr;n_langList++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
+ exp = gen_xmlExpNodePtr(n_exp, 1);
+ langList = gen_const_xmlChar_ptr_ptr(n_langList, 2);
+ len = gen_int(n_len, 3);
+
+ ret_val = xmlExpGetLanguage(ctxt, exp, (const xmlChar **)langList, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlExpNodePtr(n_exp, exp, 1);
+ des_const_xmlChar_ptr_ptr(n_langList, (const xmlChar **)langList, 2);
+ des_int(n_len, len, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpGetLanguage",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_exp);
+ printf(" %d", n_langList);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpGetStart(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpCtxtPtr ctxt; /* the expression context */
+ int n_ctxt;
+ xmlExpNodePtr exp; /* the expression */
+ int n_exp;
+ xmlChar ** tokList; /* where to store the tokens */
+ int n_tokList;
+ int len; /* the allocated length of @list */
+ int n_len;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
+ for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
+ for (n_tokList = 0;n_tokList < gen_nb_const_xmlChar_ptr_ptr;n_tokList++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
+ exp = gen_xmlExpNodePtr(n_exp, 1);
+ tokList = gen_const_xmlChar_ptr_ptr(n_tokList, 2);
+ len = gen_int(n_len, 3);
+
+ ret_val = xmlExpGetStart(ctxt, exp, (const xmlChar **)tokList, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlExpNodePtr(n_exp, exp, 1);
+ des_const_xmlChar_ptr_ptr(n_tokList, (const xmlChar **)tokList, 2);
+ des_int(n_len, len, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpGetStart",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_exp);
+ printf(" %d", n_tokList);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpIsNillable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpNodePtr exp; /* the expression */
+ int n_exp;
+
+ for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
+ mem_base = xmlMemBlocks();
+ exp = gen_xmlExpNodePtr(n_exp, 0);
+
+ ret_val = xmlExpIsNillable(exp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpNodePtr(n_exp, exp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpIsNillable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpMaxToken(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpNodePtr expr; /* a compiled expression */
+ int n_expr;
+
+ for (n_expr = 0;n_expr < gen_nb_xmlExpNodePtr;n_expr++) {
+ mem_base = xmlMemBlocks();
+ expr = gen_xmlExpNodePtr(n_expr, 0);
+
+ ret_val = xmlExpMaxToken(expr);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpNodePtr(n_expr, expr, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpMaxToken",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_expr);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpNewAtom(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpNewCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpNewOr(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpNewRange(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpNewSeq(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpParse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpRef(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ xmlExpNodePtr exp; /* the expression */
+ int n_exp;
+
+ for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
+ mem_base = xmlMemBlocks();
+ exp = gen_xmlExpNodePtr(n_exp, 0);
+
+ xmlExpRef(exp);
+ call_tests++;
+ des_xmlExpNodePtr(n_exp, exp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpRef",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpStringDerive(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlExpSubsume(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED) && defined(LIBXML_EXPR_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlExpCtxtPtr ctxt; /* the expressions context */
+ int n_ctxt;
+ xmlExpNodePtr exp; /* the englobing expression */
+ int n_exp;
+ xmlExpNodePtr sub; /* the subexpression */
+ int n_sub;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlExpCtxtPtr;n_ctxt++) {
+ for (n_exp = 0;n_exp < gen_nb_xmlExpNodePtr;n_exp++) {
+ for (n_sub = 0;n_sub < gen_nb_xmlExpNodePtr;n_sub++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlExpCtxtPtr(n_ctxt, 0);
+ exp = gen_xmlExpNodePtr(n_exp, 1);
+ sub = gen_xmlExpNodePtr(n_sub, 2);
+
+ ret_val = xmlExpSubsume(ctxt, exp, sub);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlExpCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlExpNodePtr(n_exp, exp, 1);
+ des_xmlExpNodePtr(n_sub, sub, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlExpSubsume",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_exp);
+ printf(" %d", n_sub);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#define gen_nb_xmlRegExecCtxtPtr 1
+static xmlRegExecCtxtPtr gen_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRegExecCtxtPtr(int no ATTRIBUTE_UNUSED, xmlRegExecCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlRegExecErrInfo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegExecCtxtPtr exec; /* a regexp execution context generating an error */
+ int n_exec;
+ xmlChar ** string; /* return value for the error string */
+ int n_string;
+ int * nbval; /* pointer to the number of accepted values IN/OUT */
+ int n_nbval;
+ int * nbneg; /* return number of negative transitions */
+ int n_nbneg;
+ xmlChar ** values; /* pointer to the array of acceptable values */
+ int n_values;
+ int * terminal; /* return value if this was a terminal state */
+ int n_terminal;
+
+ for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
+ for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr_ptr;n_string++) {
+ for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
+ for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
+ for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
+ for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
+ mem_base = xmlMemBlocks();
+ exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
+ string = gen_const_xmlChar_ptr_ptr(n_string, 1);
+ nbval = gen_int_ptr(n_nbval, 2);
+ nbneg = gen_int_ptr(n_nbneg, 3);
+ values = gen_xmlChar_ptr_ptr(n_values, 4);
+ terminal = gen_int_ptr(n_terminal, 5);
+
+ ret_val = xmlRegExecErrInfo(exec, (const xmlChar **)string, nbval, nbneg, values, terminal);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegExecCtxtPtr(n_exec, exec, 0);
+ des_const_xmlChar_ptr_ptr(n_string, (const xmlChar **)string, 1);
+ des_int_ptr(n_nbval, nbval, 2);
+ des_int_ptr(n_nbneg, nbneg, 3);
+ des_xmlChar_ptr_ptr(n_values, values, 4);
+ des_int_ptr(n_terminal, terminal, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegExecErrInfo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exec);
+ printf(" %d", n_string);
+ printf(" %d", n_nbval);
+ printf(" %d", n_nbneg);
+ printf(" %d", n_values);
+ printf(" %d", n_terminal);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegExecNextValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegExecCtxtPtr exec; /* a regexp execution context */
+ int n_exec;
+ int * nbval; /* pointer to the number of accepted values IN/OUT */
+ int n_nbval;
+ int * nbneg; /* return number of negative transitions */
+ int n_nbneg;
+ xmlChar ** values; /* pointer to the array of acceptable values */
+ int n_values;
+ int * terminal; /* return value if this was a terminal state */
+ int n_terminal;
+
+ for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
+ for (n_nbval = 0;n_nbval < gen_nb_int_ptr;n_nbval++) {
+ for (n_nbneg = 0;n_nbneg < gen_nb_int_ptr;n_nbneg++) {
+ for (n_values = 0;n_values < gen_nb_xmlChar_ptr_ptr;n_values++) {
+ for (n_terminal = 0;n_terminal < gen_nb_int_ptr;n_terminal++) {
+ mem_base = xmlMemBlocks();
+ exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
+ nbval = gen_int_ptr(n_nbval, 1);
+ nbneg = gen_int_ptr(n_nbneg, 2);
+ values = gen_xmlChar_ptr_ptr(n_values, 3);
+ terminal = gen_int_ptr(n_terminal, 4);
+
+ ret_val = xmlRegExecNextValues(exec, nbval, nbneg, values, terminal);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegExecCtxtPtr(n_exec, exec, 0);
+ des_int_ptr(n_nbval, nbval, 1);
+ des_int_ptr(n_nbneg, nbneg, 2);
+ des_xmlChar_ptr_ptr(n_values, values, 3);
+ des_int_ptr(n_terminal, terminal, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegExecNextValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exec);
+ printf(" %d", n_nbval);
+ printf(" %d", n_nbneg);
+ printf(" %d", n_values);
+ printf(" %d", n_terminal);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegExecPushString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
+ int n_exec;
+ xmlChar * value; /* a string token input */
+ int n_value;
+ void * data; /* data associated to the token to reuse in callbacks */
+ int n_data;
+
+ for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ data = gen_userdata(n_data, 2);
+
+ ret_val = xmlRegExecPushString(exec, (const xmlChar *)value, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegExecCtxtPtr(n_exec, exec, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_userdata(n_data, data, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegExecPushString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exec);
+ printf(" %d", n_value);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegExecPushString2(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegExecCtxtPtr exec; /* a regexp execution context or NULL to indicate the end */
+ int n_exec;
+ xmlChar * value; /* the first string token input */
+ int n_value;
+ xmlChar * value2; /* the second string token input */
+ int n_value2;
+ void * data; /* data associated to the token to reuse in callbacks */
+ int n_data;
+
+ for (n_exec = 0;n_exec < gen_nb_xmlRegExecCtxtPtr;n_exec++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_value2 = 0;n_value2 < gen_nb_const_xmlChar_ptr;n_value2++) {
+ for (n_data = 0;n_data < gen_nb_userdata;n_data++) {
+ mem_base = xmlMemBlocks();
+ exec = gen_xmlRegExecCtxtPtr(n_exec, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ value2 = gen_const_xmlChar_ptr(n_value2, 2);
+ data = gen_userdata(n_data, 3);
+
+ ret_val = xmlRegExecPushString2(exec, (const xmlChar *)value, (const xmlChar *)value2, data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegExecCtxtPtr(n_exec, exec, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_const_xmlChar_ptr(n_value2, (const xmlChar *)value2, 2);
+ des_userdata(n_data, data, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegExecPushString2",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_exec);
+ printf(" %d", n_value);
+ printf(" %d", n_value2);
+ printf(" %d", n_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#define gen_nb_xmlRegexpPtr 1
+static xmlRegexpPtr gen_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlRegexpPtr(int no ATTRIBUTE_UNUSED, xmlRegexpPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlRegNewExecCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegexpCompile(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegexpExec(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegexpPtr comp; /* the compiled regular expression */
+ int n_comp;
+ xmlChar * content; /* the value to check against the regular expression */
+ int n_content;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlRegexpPtr(n_comp, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlRegexpExec(comp, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegexpPtr(n_comp, comp, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegexpExec",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegexpIsDeterminist(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlRegexpPtr comp; /* the compiled regular expression */
+ int n_comp;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlRegexpPtr;n_comp++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlRegexpPtr(n_comp, 0);
+
+ ret_val = xmlRegexpIsDeterminist(comp);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlRegexpPtr(n_comp, comp, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegexpIsDeterminist",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlRegexpPrint(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_REGEXP_ENABLED)
+ int mem_base;
+ FILE * output; /* the file for the output debug */
+ int n_output;
+ xmlRegexpPtr regexp; /* the compiled regexp */
+ int n_regexp;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_regexp = 0;n_regexp < gen_nb_xmlRegexpPtr;n_regexp++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ regexp = gen_xmlRegexpPtr(n_regexp, 1);
+
+ xmlRegexpPrint(output, regexp);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlRegexpPtr(n_regexp, regexp, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlRegexpPrint",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_regexp);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlregexp(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlregexp : 16 of 30 functions ...\n");
+ test_ret += test_xmlExpCtxtNbCons();
+ test_ret += test_xmlExpCtxtNbNodes();
+ test_ret += test_xmlExpDump();
+ test_ret += test_xmlExpExpDerive();
+ test_ret += test_xmlExpGetLanguage();
+ test_ret += test_xmlExpGetStart();
+ test_ret += test_xmlExpIsNillable();
+ test_ret += test_xmlExpMaxToken();
+ test_ret += test_xmlExpNewAtom();
+ test_ret += test_xmlExpNewCtxt();
+ test_ret += test_xmlExpNewOr();
+ test_ret += test_xmlExpNewRange();
+ test_ret += test_xmlExpNewSeq();
+ test_ret += test_xmlExpParse();
+ test_ret += test_xmlExpRef();
+ test_ret += test_xmlExpStringDerive();
+ test_ret += test_xmlExpSubsume();
+ test_ret += test_xmlRegExecErrInfo();
+ test_ret += test_xmlRegExecNextValues();
+ test_ret += test_xmlRegExecPushString();
+ test_ret += test_xmlRegExecPushString2();
+ test_ret += test_xmlRegNewExecCtxt();
+ test_ret += test_xmlRegexpCompile();
+ test_ret += test_xmlRegexpExec();
+ test_ret += test_xmlRegexpIsDeterminist();
+ test_ret += test_xmlRegexpPrint();
+
+ if (test_ret != 0)
+ printf("Module xmlregexp: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#define gen_nb_xmlSaveCtxtPtr 1
+static xmlSaveCtxtPtr gen_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSaveCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSaveCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSaveClose(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSaveCtxtPtr ctxt; /* a document saving context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlSaveClose(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveClose",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ long ret_val;
+ xmlSaveCtxtPtr ctxt; /* a document saving context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a document */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlSaveDoc(ctxt, doc);
+ desret_long(ret_val);
+ call_tests++;
+ des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveFlush(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSaveCtxtPtr ctxt; /* a document saving context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlSaveFlush(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveFlush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveSetAttrEscape(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveSetEscape(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveToBuffer(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveToFd(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveToFilename(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSaveTree(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ long ret_val;
+ xmlSaveCtxtPtr ctxt; /* a document saving context */
+ int n_ctxt;
+ xmlNodePtr node; /* the top node of the subtree to save */
+ int n_node;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSaveCtxtPtr;n_ctxt++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSaveCtxtPtr(n_ctxt, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlSaveTree(ctxt, node);
+ desret_long(ret_val);
+ call_tests++;
+ des_xmlSaveCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSaveTree",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlsave(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlsave : 4 of 10 functions ...\n");
+ test_ret += test_xmlSaveClose();
+ test_ret += test_xmlSaveDoc();
+ test_ret += test_xmlSaveFlush();
+ test_ret += test_xmlSaveSetAttrEscape();
+ test_ret += test_xmlSaveSetEscape();
+ test_ret += test_xmlSaveToBuffer();
+ test_ret += test_xmlSaveToFd();
+ test_ret += test_xmlSaveToFilename();
+ test_ret += test_xmlSaveTree();
+
+ if (test_ret != 0)
+ printf("Module xmlsave: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlSchemaDump(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+ int mem_base;
+ FILE * output; /* the file output */
+ int n_output;
+ xmlSchemaPtr schema; /* a schema structure */
+ int n_schema;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_schema = 0;n_schema < gen_nb_xmlSchemaPtr;n_schema++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ schema = gen_xmlSchemaPtr(n_schema, 1);
+
+ xmlSchemaDump(output, schema);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlSchemaPtr(n_schema, schema, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaDump",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_schema);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaParserCtxtPtr 1
+static xmlSchemaParserCtxtPtr gen_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaValidityErrorFunc_ptr 1
+static xmlSchemaValidityErrorFunc * gen_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaValidityErrorFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityErrorFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaValidityWarningFunc_ptr 1
+static xmlSchemaValidityWarningFunc * gen_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaValidityWarningFunc_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValidityWarningFunc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaGetParserErrors(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaParserCtxtPtr ctxt; /* a XMl-Schema parser context */
+ int n_ctxt;
+ xmlSchemaValidityErrorFunc * err; /* the error callback result */
+ int n_err;
+ xmlSchemaValidityWarningFunc * warn; /* the warning callback result */
+ int n_warn;
+ void ** ctx; /* contextual data for the callbacks result */
+ int n_ctx;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaParserCtxtPtr;n_ctxt++) {
+ for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
+ for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaParserCtxtPtr(n_ctxt, 0);
+ err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
+ warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
+ ctx = gen_void_ptr_ptr(n_ctx, 3);
+
+ ret_val = xmlSchemaGetParserErrors(ctxt, err, warn, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
+ des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
+ des_void_ptr_ptr(n_ctx, ctx, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetParserErrors",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_err);
+ printf(" %d", n_warn);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetValidErrors(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a XML-Schema validation context */
+ int n_ctxt;
+ xmlSchemaValidityErrorFunc * err; /* the error function result */
+ int n_err;
+ xmlSchemaValidityWarningFunc * warn; /* the warning function result */
+ int n_warn;
+ void ** ctx; /* the functions context result */
+ int n_ctx;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_err = 0;n_err < gen_nb_xmlSchemaValidityErrorFunc_ptr;n_err++) {
+ for (n_warn = 0;n_warn < gen_nb_xmlSchemaValidityWarningFunc_ptr;n_warn++) {
+ for (n_ctx = 0;n_ctx < gen_nb_void_ptr_ptr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ err = gen_xmlSchemaValidityErrorFunc_ptr(n_err, 1);
+ warn = gen_xmlSchemaValidityWarningFunc_ptr(n_warn, 2);
+ ctx = gen_void_ptr_ptr(n_ctx, 3);
+
+ ret_val = xmlSchemaGetValidErrors(ctxt, err, warn, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlSchemaValidityErrorFunc_ptr(n_err, err, 1);
+ des_xmlSchemaValidityWarningFunc_ptr(n_warn, warn, 2);
+ des_void_ptr_ptr(n_ctx, ctx, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetValidErrors",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_err);
+ printf(" %d", n_warn);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaIsValid(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* the schema validation context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlSchemaIsValid(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaIsValid",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewDocParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaParserCtxtPtr ret_val;
+ xmlDocPtr doc; /* a preparsed document tree */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlSchemaNewDocParserCtxt(doc);
+ desret_xmlSchemaParserCtxtPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaNewDocParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewMemParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaParserCtxtPtr ret_val;
+ char * buffer; /* a pointer to a char array containing the schemas */
+ int n_buffer;
+ int size; /* the size of the array */
+ int n_size;
+
+ for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {
+ for (n_size = 0;n_size < gen_nb_int;n_size++) {
+ mem_base = xmlMemBlocks();
+ buffer = gen_const_char_ptr(n_buffer, 0);
+ size = gen_int(n_size, 1);
+
+ ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);
+ desret_xmlSchemaParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_buffer, (const char *)buffer, 0);
+ des_int(n_size, size, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaNewMemParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buffer);
+ printf(" %d", n_size);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaParserCtxtPtr ret_val;
+ char * URL; /* the location of the schema */
+ int n_URL;
+
+ for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {
+ mem_base = xmlMemBlocks();
+ URL = gen_const_char_ptr(n_URL, 0);
+
+ ret_val = xmlSchemaNewParserCtxt((const char *)URL);
+ desret_xmlSchemaParserCtxtPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_URL, (const char *)URL, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaNewParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_URL);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewValidCtxt(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaParse(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSAXHandlerPtr_ptr 1
+static xmlSAXHandlerPtr * gen_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSAXHandlerPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaSAXPlug(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaSAXPlugPtr 1
+static xmlSchemaSAXPlugPtr gen_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaSAXPlugPtr(int no ATTRIBUTE_UNUSED, xmlSchemaSAXPlugPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaSAXUnplug(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaSAXPlugPtr plug; /* a data structure returned by xmlSchemaSAXPlug */
+ int n_plug;
+
+ for (n_plug = 0;n_plug < gen_nb_xmlSchemaSAXPlugPtr;n_plug++) {
+ mem_base = xmlMemBlocks();
+ plug = gen_xmlSchemaSAXPlugPtr(n_plug, 0);
+
+ ret_val = xmlSchemaSAXUnplug(plug);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaSAXPlugPtr(n_plug, plug, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaSAXUnplug",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_plug);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaSetParserErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaSetParserStructuredErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaSetValidErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaSetValidOptions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+ int options; /* a combination of xmlSchemaValidOption */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ options = gen_int(n_options, 1);
+
+ ret_val = xmlSchemaSetValidOptions(ctxt, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_int(n_options, options, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaSetValidOptions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaSetValidStructuredErrors(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidCtxtGetOptions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlSchemaValidCtxtGetOptions(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidCtxtGetOptions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidCtxtGetParserCtxt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlParserCtxtPtr ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+
+ ret_val = xmlSchemaValidCtxtGetParserCtxt(ctxt);
+ desret_xmlParserCtxtPtr(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidCtxtGetParserCtxt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateDoc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+ xmlDocPtr doc; /* a parsed document tree */
+ int n_doc;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ doc = gen_xmlDocPtr(n_doc, 1);
+
+ ret_val = xmlSchemaValidateDoc(ctxt, doc);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlDocPtr(n_doc, doc, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateDoc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateFile(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+ const char * filename; /* the URI of the instance */
+ int n_filename;
+ int options; /* a future set of options, currently unused */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+ options = gen_int(n_options, 2);
+
+ ret_val = xmlSchemaValidateFile(ctxt, filename, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ des_int(n_options, options, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateFile",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_filename);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateOneElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+ xmlNodePtr elem; /* an element node */
+ int n_elem;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ elem = gen_xmlNodePtr(n_elem, 1);
+
+ ret_val = xmlSchemaValidateOneElement(ctxt, elem);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_elem, elem, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateOneElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_elem);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateSetFilename(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaValidCtxtPtr vctxt; /* the schema validation context */
+ int n_vctxt;
+ const char * filename; /* the file name */
+ int n_filename;
+
+ for (n_vctxt = 0;n_vctxt < gen_nb_xmlSchemaValidCtxtPtr;n_vctxt++) {
+ for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+ mem_base = xmlMemBlocks();
+ vctxt = gen_xmlSchemaValidCtxtPtr(n_vctxt, 0);
+ filename = gen_filepath(n_filename, 1);
+
+ xmlSchemaValidateSetFilename(vctxt, filename);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_vctxt, vctxt, 0);
+ des_filepath(n_filename, filename, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateSetFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_vctxt);
+ printf(" %d", n_filename);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateSetLocator(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateStream(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */
+ int n_ctxt;
+ xmlParserInputBufferPtr input; /* the input to use for reading the data */
+ int n_input;
+ xmlCharEncoding enc; /* an optional encoding information */
+ int n_enc;
+ xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */
+ int n_sax;
+ void * user_data; /* the context to provide to the SAX handler. */
+ int n_user_data;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {
+ for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {
+ for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {
+ for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {
+ for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);
+ input = gen_xmlParserInputBufferPtr(n_input, 1);
+ enc = gen_xmlCharEncoding(n_enc, 2);
+ sax = gen_xmlSAXHandlerPtr(n_sax, 3);
+ user_data = gen_userdata(n_user_data, 4);
+
+ ret_val = xmlSchemaValidateStream(ctxt, input, enc, sax, user_data);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);
+ des_xmlParserInputBufferPtr(n_input, input, 1);
+ des_xmlCharEncoding(n_enc, enc, 2);
+ des_xmlSAXHandlerPtr(n_sax, sax, 3);
+ des_userdata(n_user_data, user_data, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateStream",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_input);
+ printf(" %d", n_enc);
+ printf(" %d", n_sax);
+ printf(" %d", n_user_data);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlschemas(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
+ test_ret += test_xmlSchemaDump();
+ test_ret += test_xmlSchemaGetParserErrors();
+ test_ret += test_xmlSchemaGetValidErrors();
+ test_ret += test_xmlSchemaIsValid();
+ test_ret += test_xmlSchemaNewDocParserCtxt();
+ test_ret += test_xmlSchemaNewMemParserCtxt();
+ test_ret += test_xmlSchemaNewParserCtxt();
+ test_ret += test_xmlSchemaNewValidCtxt();
+ test_ret += test_xmlSchemaParse();
+ test_ret += test_xmlSchemaSAXPlug();
+ test_ret += test_xmlSchemaSAXUnplug();
+ test_ret += test_xmlSchemaSetParserErrors();
+ test_ret += test_xmlSchemaSetParserStructuredErrors();
+ test_ret += test_xmlSchemaSetValidErrors();
+ test_ret += test_xmlSchemaSetValidOptions();
+ test_ret += test_xmlSchemaSetValidStructuredErrors();
+ test_ret += test_xmlSchemaValidCtxtGetOptions();
+ test_ret += test_xmlSchemaValidCtxtGetParserCtxt();
+ test_ret += test_xmlSchemaValidateDoc();
+ test_ret += test_xmlSchemaValidateFile();
+ test_ret += test_xmlSchemaValidateOneElement();
+ test_ret += test_xmlSchemaValidateSetFilename();
+ test_ret += test_xmlSchemaValidateSetLocator();
+ test_ret += test_xmlSchemaValidateStream();
+
+ if (test_ret != 0)
+ printf("Module xmlschemas: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaFacetPtr 1
+static xmlSchemaFacetPtr gen_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaFacetPtr(int no ATTRIBUTE_UNUSED, xmlSchemaFacetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaTypePtr 1
+static xmlSchemaTypePtr gen_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaTypePtr(int no ATTRIBUTE_UNUSED, xmlSchemaTypePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaCheckFacet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaFacetPtr facet; /* the facet */
+ int n_facet;
+ xmlSchemaTypePtr typeDecl; /* the schema type definition */
+ int n_typeDecl;
+ xmlSchemaParserCtxtPtr pctxt; /* the schema parser context or NULL */
+ int n_pctxt;
+ xmlChar * name; /* the optional name of the type */
+ int n_name;
+
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_typeDecl = 0;n_typeDecl < gen_nb_xmlSchemaTypePtr;n_typeDecl++) {
+ for (n_pctxt = 0;n_pctxt < gen_nb_xmlSchemaParserCtxtPtr;n_pctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ facet = gen_xmlSchemaFacetPtr(n_facet, 0);
+ typeDecl = gen_xmlSchemaTypePtr(n_typeDecl, 1);
+ pctxt = gen_xmlSchemaParserCtxtPtr(n_pctxt, 2);
+ name = gen_const_xmlChar_ptr(n_name, 3);
+
+ ret_val = xmlSchemaCheckFacet(facet, typeDecl, pctxt, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaFacetPtr(n_facet, facet, 0);
+ des_xmlSchemaTypePtr(n_typeDecl, typeDecl, 1);
+ des_xmlSchemaParserCtxtPtr(n_pctxt, pctxt, 2);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaCheckFacet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_facet);
+ printf(" %d", n_typeDecl);
+ printf(" %d", n_pctxt);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaCleanupTypes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+
+
+ xmlSchemaCleanupTypes();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaCollapseString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * value; /* a value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlSchemaCollapseString((const xmlChar *)value);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaCollapseString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaValPtr 1
+static xmlSchemaValPtr gen_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaValPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaCompareValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr x; /* a first value */
+ int n_x;
+ xmlSchemaValPtr y; /* a second value */
+ int n_y;
+
+ for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
+ for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
+ mem_base = xmlMemBlocks();
+ x = gen_xmlSchemaValPtr(n_x, 0);
+ y = gen_xmlSchemaValPtr(n_y, 1);
+
+ ret_val = xmlSchemaCompareValues(x, y);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_x, x, 0);
+ des_xmlSchemaValPtr(n_y, y, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaCompareValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_x);
+ printf(" %d", n_y);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaCompareValuesWhtsp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr x; /* a first value */
+ int n_x;
+ xmlSchemaWhitespaceValueType xws; /* the whitespace value of x */
+ int n_xws;
+ xmlSchemaValPtr y; /* a second value */
+ int n_y;
+ xmlSchemaWhitespaceValueType yws; /* the whitespace value of y */
+ int n_yws;
+
+ for (n_x = 0;n_x < gen_nb_xmlSchemaValPtr;n_x++) {
+ for (n_xws = 0;n_xws < gen_nb_xmlSchemaWhitespaceValueType;n_xws++) {
+ for (n_y = 0;n_y < gen_nb_xmlSchemaValPtr;n_y++) {
+ for (n_yws = 0;n_yws < gen_nb_xmlSchemaWhitespaceValueType;n_yws++) {
+ mem_base = xmlMemBlocks();
+ x = gen_xmlSchemaValPtr(n_x, 0);
+ xws = gen_xmlSchemaWhitespaceValueType(n_xws, 1);
+ y = gen_xmlSchemaValPtr(n_y, 2);
+ yws = gen_xmlSchemaWhitespaceValueType(n_yws, 3);
+
+ ret_val = xmlSchemaCompareValuesWhtsp(x, xws, y, yws);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_x, x, 0);
+ des_xmlSchemaWhitespaceValueType(n_xws, xws, 1);
+ des_xmlSchemaValPtr(n_y, y, 2);
+ des_xmlSchemaWhitespaceValueType(n_yws, yws, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaCompareValuesWhtsp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_x);
+ printf(" %d", n_xws);
+ printf(" %d", n_y);
+ printf(" %d", n_yws);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaCopyValue(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetBuiltInListSimpleTypeItemType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaTypePtr ret_val;
+ xmlSchemaTypePtr type; /* the built-in simple type. */
+ int n_type;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+
+ ret_val = xmlSchemaGetBuiltInListSimpleTypeItemType(type);
+ desret_xmlSchemaTypePtr(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetBuiltInListSimpleTypeItemType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetBuiltInType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ xmlSchemaTypePtr ret_val;
+ xmlSchemaValType type; /* the type of the built in type */
+ int n_type;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaValType;n_type++) {
+ type = gen_xmlSchemaValType(n_type, 0);
+
+ ret_val = xmlSchemaGetBuiltInType(type);
+ desret_xmlSchemaTypePtr(ret_val);
+ call_tests++;
+ des_xmlSchemaValType(n_type, type, 0);
+ xmlResetLastError();
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetCanonValue(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+ xmlChar ** retValue; /* the returned value */
+ int n_retValue;
+
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlSchemaValPtr(n_val, 0);
+ retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
+
+ ret_val = xmlSchemaGetCanonValue(val, (const xmlChar **)retValue);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_val, val, 0);
+ des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetCanonValue",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf(" %d", n_retValue);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetCanonValueWhtsp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+ xmlChar ** retValue; /* the returned value */
+ int n_retValue;
+ xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
+ int n_ws;
+
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ for (n_retValue = 0;n_retValue < gen_nb_const_xmlChar_ptr_ptr;n_retValue++) {
+ for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlSchemaValPtr(n_val, 0);
+ retValue = gen_const_xmlChar_ptr_ptr(n_retValue, 1);
+ ws = gen_xmlSchemaWhitespaceValueType(n_ws, 2);
+
+ ret_val = xmlSchemaGetCanonValueWhtsp(val, (const xmlChar **)retValue, ws);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_val, val, 0);
+ des_const_xmlChar_ptr_ptr(n_retValue, (const xmlChar **)retValue, 1);
+ des_xmlSchemaWhitespaceValueType(n_ws, ws, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetCanonValueWhtsp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf(" %d", n_retValue);
+ printf(" %d", n_ws);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetFacetValueAsULong(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ unsigned long ret_val;
+ xmlSchemaFacetPtr facet; /* an schemas type facet */
+ int n_facet;
+
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ mem_base = xmlMemBlocks();
+ facet = gen_xmlSchemaFacetPtr(n_facet, 0);
+
+ ret_val = xmlSchemaGetFacetValueAsULong(facet);
+ desret_unsigned_long(ret_val);
+ call_tests++;
+ des_xmlSchemaFacetPtr(n_facet, facet, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetFacetValueAsULong",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_facet);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetPredefinedType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaTypePtr ret_val;
+ xmlChar * name; /* the type name */
+ int n_name;
+ xmlChar * ns; /* the URI of the namespace usually "http://www.w3.org/2001/XMLSchema" */
+ int n_ns;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+ ns = gen_const_xmlChar_ptr(n_ns, 1);
+
+ ret_val = xmlSchemaGetPredefinedType((const xmlChar *)name, (const xmlChar *)ns);
+ desret_xmlSchemaTypePtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetPredefinedType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaGetValType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlSchemaValType ret_val;
+ xmlSchemaValPtr val; /* a schemas value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlSchemaValPtr(n_val, 0);
+
+ ret_val = xmlSchemaGetValType(val);
+ desret_xmlSchemaValType(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaGetValType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaInitTypes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+
+
+ xmlSchemaInitTypes();
+ call_tests++;
+ xmlResetLastError();
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaIsBuiltInTypeFacet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr type; /* the built-in type */
+ int n_type;
+ int facetType; /* the facet type */
+ int n_facetType;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ for (n_facetType = 0;n_facetType < gen_nb_int;n_facetType++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+ facetType = gen_int(n_facetType, 1);
+
+ ret_val = xmlSchemaIsBuiltInTypeFacet(type, facetType);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ des_int(n_facetType, facetType, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaIsBuiltInTypeFacet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_facetType);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewFacet(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewNOTATIONValue(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewQNameValue(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaNewStringValue(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#define gen_nb_xmlSchemaValPtr_ptr 1
+static xmlSchemaValPtr * gen_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlSchemaValPtr_ptr(int no ATTRIBUTE_UNUSED, xmlSchemaValPtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlSchemaValPredefTypeNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr type; /* the predefined type */
+ int n_type;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ xmlSchemaValPtr * val; /* the return computed value */
+ int n_val;
+ xmlNodePtr node; /* the node containing the value */
+ int n_node;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ val = gen_xmlSchemaValPtr_ptr(n_val, 2);
+ node = gen_xmlNodePtr(n_node, 3);
+
+ ret_val = xmlSchemaValPredefTypeNode(type, (const xmlChar *)value, val, node);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_xmlSchemaValPtr_ptr(n_val, val, 2);
+ des_xmlNodePtr(n_node, node, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValPredefTypeNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValPredefTypeNodeNoNorm(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr type; /* the predefined type */
+ int n_type;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ xmlSchemaValPtr * val; /* the return computed value */
+ int n_val;
+ xmlNodePtr node; /* the node containing the value */
+ int n_node;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ val = gen_xmlSchemaValPtr_ptr(n_val, 2);
+ node = gen_xmlNodePtr(n_node, 3);
+
+ ret_val = xmlSchemaValPredefTypeNodeNoNorm(type, (const xmlChar *)value, val, node);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_xmlSchemaValPtr_ptr(n_val, val, 2);
+ des_xmlNodePtr(n_node, node, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValPredefTypeNodeNoNorm",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateFacet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr base; /* the base type */
+ int n_base;
+ xmlSchemaFacetPtr facet; /* the facet to check */
+ int n_facet;
+ xmlChar * value; /* the lexical repr of the value to validate */
+ int n_value;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+
+ for (n_base = 0;n_base < gen_nb_xmlSchemaTypePtr;n_base++) {
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ base = gen_xmlSchemaTypePtr(n_base, 0);
+ facet = gen_xmlSchemaFacetPtr(n_facet, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+ val = gen_xmlSchemaValPtr(n_val, 3);
+
+ ret_val = xmlSchemaValidateFacet(base, facet, (const xmlChar *)value, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_base, base, 0);
+ des_xmlSchemaFacetPtr(n_facet, facet, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ des_xmlSchemaValPtr(n_val, val, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateFacet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_base);
+ printf(" %d", n_facet);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateFacetWhtsp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaFacetPtr facet; /* the facet to check */
+ int n_facet;
+ xmlSchemaWhitespaceValueType fws; /* the whitespace type of the facet's value */
+ int n_fws;
+ xmlSchemaValType valType; /* the built-in type of the value */
+ int n_valType;
+ xmlChar * value; /* the lexical (or normalized for pattern) repr of the value to validate */
+ int n_value;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+ xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
+ int n_ws;
+
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_fws = 0;n_fws < gen_nb_xmlSchemaWhitespaceValueType;n_fws++) {
+ for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
+ mem_base = xmlMemBlocks();
+ facet = gen_xmlSchemaFacetPtr(n_facet, 0);
+ fws = gen_xmlSchemaWhitespaceValueType(n_fws, 1);
+ valType = gen_xmlSchemaValType(n_valType, 2);
+ value = gen_const_xmlChar_ptr(n_value, 3);
+ val = gen_xmlSchemaValPtr(n_val, 4);
+ ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
+
+ ret_val = xmlSchemaValidateFacetWhtsp(facet, fws, valType, (const xmlChar *)value, val, ws);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaFacetPtr(n_facet, facet, 0);
+ des_xmlSchemaWhitespaceValueType(n_fws, fws, 1);
+ des_xmlSchemaValType(n_valType, valType, 2);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 3);
+ des_xmlSchemaValPtr(n_val, val, 4);
+ des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateFacetWhtsp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_facet);
+ printf(" %d", n_fws);
+ printf(" %d", n_valType);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf(" %d", n_ws);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateLengthFacet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr type; /* the built-in type */
+ int n_type;
+ xmlSchemaFacetPtr facet; /* the facet to check */
+ int n_facet;
+ xmlChar * value; /* the lexical repr. of the value to be validated */
+ int n_value;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+ unsigned long * length; /* the actual length of the value */
+ int n_length;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+ facet = gen_xmlSchemaFacetPtr(n_facet, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+ val = gen_xmlSchemaValPtr(n_val, 3);
+ length = gen_unsigned_long_ptr(n_length, 4);
+
+ ret_val = xmlSchemaValidateLengthFacet(type, facet, (const xmlChar *)value, val, length);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ des_xmlSchemaFacetPtr(n_facet, facet, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ des_xmlSchemaValPtr(n_val, val, 3);
+ des_unsigned_long_ptr(n_length, length, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateLengthFacet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_facet);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf(" %d", n_length);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateLengthFacetWhtsp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaFacetPtr facet; /* the facet to check */
+ int n_facet;
+ xmlSchemaValType valType; /* the built-in type */
+ int n_valType;
+ xmlChar * value; /* the lexical repr. of the value to be validated */
+ int n_value;
+ xmlSchemaValPtr val; /* the precomputed value */
+ int n_val;
+ unsigned long * length; /* the actual length of the value */
+ int n_length;
+ xmlSchemaWhitespaceValueType ws; /* the whitespace type of the value */
+ int n_ws;
+
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_valType = 0;n_valType < gen_nb_xmlSchemaValType;n_valType++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ for (n_length = 0;n_length < gen_nb_unsigned_long_ptr;n_length++) {
+ for (n_ws = 0;n_ws < gen_nb_xmlSchemaWhitespaceValueType;n_ws++) {
+ mem_base = xmlMemBlocks();
+ facet = gen_xmlSchemaFacetPtr(n_facet, 0);
+ valType = gen_xmlSchemaValType(n_valType, 1);
+ value = gen_const_xmlChar_ptr(n_value, 2);
+ val = gen_xmlSchemaValPtr(n_val, 3);
+ length = gen_unsigned_long_ptr(n_length, 4);
+ ws = gen_xmlSchemaWhitespaceValueType(n_ws, 5);
+
+ ret_val = xmlSchemaValidateLengthFacetWhtsp(facet, valType, (const xmlChar *)value, val, length, ws);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaFacetPtr(n_facet, facet, 0);
+ des_xmlSchemaValType(n_valType, valType, 1);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 2);
+ des_xmlSchemaValPtr(n_val, val, 3);
+ des_unsigned_long_ptr(n_length, length, 4);
+ des_xmlSchemaWhitespaceValueType(n_ws, ws, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateLengthFacetWhtsp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_facet);
+ printf(" %d", n_valType);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf(" %d", n_length);
+ printf(" %d", n_ws);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateListSimpleTypeFacet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaFacetPtr facet; /* the facet to check */
+ int n_facet;
+ xmlChar * value; /* the lexical repr of the value to validate */
+ int n_value;
+ unsigned long actualLen; /* the number of list items */
+ int n_actualLen;
+ unsigned long * expectedLen; /* the resulting expected number of list items */
+ int n_expectedLen;
+
+ for (n_facet = 0;n_facet < gen_nb_xmlSchemaFacetPtr;n_facet++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_actualLen = 0;n_actualLen < gen_nb_unsigned_long;n_actualLen++) {
+ for (n_expectedLen = 0;n_expectedLen < gen_nb_unsigned_long_ptr;n_expectedLen++) {
+ mem_base = xmlMemBlocks();
+ facet = gen_xmlSchemaFacetPtr(n_facet, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ actualLen = gen_unsigned_long(n_actualLen, 2);
+ expectedLen = gen_unsigned_long_ptr(n_expectedLen, 3);
+
+ ret_val = xmlSchemaValidateListSimpleTypeFacet(facet, (const xmlChar *)value, actualLen, expectedLen);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaFacetPtr(n_facet, facet, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_unsigned_long(n_actualLen, actualLen, 2);
+ des_unsigned_long_ptr(n_expectedLen, expectedLen, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidateListSimpleTypeFacet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_facet);
+ printf(" %d", n_value);
+ printf(" %d", n_actualLen);
+ printf(" %d", n_expectedLen);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidatePredefinedType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaTypePtr type; /* the predefined type */
+ int n_type;
+ xmlChar * value; /* the value to check */
+ int n_value;
+ xmlSchemaValPtr * val; /* the return computed value */
+ int n_val;
+
+ for (n_type = 0;n_type < gen_nb_xmlSchemaTypePtr;n_type++) {
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ type = gen_xmlSchemaTypePtr(n_type, 0);
+ value = gen_const_xmlChar_ptr(n_value, 1);
+ val = gen_xmlSchemaValPtr_ptr(n_val, 2);
+
+ ret_val = xmlSchemaValidatePredefinedType(type, (const xmlChar *)value, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaTypePtr(n_type, type, 0);
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);
+ des_xmlSchemaValPtr_ptr(n_val, val, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValidatePredefinedType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_type);
+ printf(" %d", n_value);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValueAppend(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr prev; /* the value */
+ int n_prev;
+ xmlSchemaValPtr cur; /* the value to be appended */
+ int n_cur;
+
+ for (n_prev = 0;n_prev < gen_nb_xmlSchemaValPtr;n_prev++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlSchemaValPtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ prev = gen_xmlSchemaValPtr(n_prev, 0);
+ cur = gen_xmlSchemaValPtr(n_cur, 1);
+
+ ret_val = xmlSchemaValueAppend(prev, cur);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_prev, prev, 0);
+ des_xmlSchemaValPtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValueAppend",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_prev);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValueGetAsBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlSchemaValPtr val; /* the value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlSchemaValPtr(n_val, 0);
+
+ ret_val = xmlSchemaValueGetAsBoolean(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValueGetAsBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValueGetAsString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlSchemaValPtr val; /* the value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlSchemaValPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlSchemaValPtr(n_val, 0);
+
+ ret_val = xmlSchemaValueGetAsString(val);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlSchemaValPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaValueGetAsString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValueGetNext(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlSchemaWhiteSpaceReplace(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * value; /* a value */
+ int n_value;
+
+ for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {
+ mem_base = xmlMemBlocks();
+ value = gen_const_xmlChar_ptr(n_value, 0);
+
+ ret_val = xmlSchemaWhiteSpaceReplace((const xmlChar *)value);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlSchemaWhiteSpaceReplace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlschemastypes(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlschemastypes : 26 of 34 functions ...\n");
+ test_ret += test_xmlSchemaCheckFacet();
+ test_ret += test_xmlSchemaCleanupTypes();
+ test_ret += test_xmlSchemaCollapseString();
+ test_ret += test_xmlSchemaCompareValues();
+ test_ret += test_xmlSchemaCompareValuesWhtsp();
+ test_ret += test_xmlSchemaCopyValue();
+ test_ret += test_xmlSchemaGetBuiltInListSimpleTypeItemType();
+ test_ret += test_xmlSchemaGetBuiltInType();
+ test_ret += test_xmlSchemaGetCanonValue();
+ test_ret += test_xmlSchemaGetCanonValueWhtsp();
+ test_ret += test_xmlSchemaGetFacetValueAsULong();
+ test_ret += test_xmlSchemaGetPredefinedType();
+ test_ret += test_xmlSchemaGetValType();
+ test_ret += test_xmlSchemaInitTypes();
+ test_ret += test_xmlSchemaIsBuiltInTypeFacet();
+ test_ret += test_xmlSchemaNewFacet();
+ test_ret += test_xmlSchemaNewNOTATIONValue();
+ test_ret += test_xmlSchemaNewQNameValue();
+ test_ret += test_xmlSchemaNewStringValue();
+ test_ret += test_xmlSchemaValPredefTypeNode();
+ test_ret += test_xmlSchemaValPredefTypeNodeNoNorm();
+ test_ret += test_xmlSchemaValidateFacet();
+ test_ret += test_xmlSchemaValidateFacetWhtsp();
+ test_ret += test_xmlSchemaValidateLengthFacet();
+ test_ret += test_xmlSchemaValidateLengthFacetWhtsp();
+ test_ret += test_xmlSchemaValidateListSimpleTypeFacet();
+ test_ret += test_xmlSchemaValidatePredefinedType();
+ test_ret += test_xmlSchemaValueAppend();
+ test_ret += test_xmlSchemaValueGetAsBoolean();
+ test_ret += test_xmlSchemaValueGetAsString();
+ test_ret += test_xmlSchemaValueGetNext();
+ test_ret += test_xmlSchemaWhiteSpaceReplace();
+
+ if (test_ret != 0)
+ printf("Module xmlschemastypes: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlCharStrdup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ char * cur; /* the input char * */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_char_ptr(n_cur, 0);
+
+ ret_val = xmlCharStrdup((const char *)cur);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_cur, (const char *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharStrdup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCharStrndup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ char * cur; /* the input char * */
+ int n_cur;
+ int len; /* the len of @cur */
+ int n_len;
+
+ for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_char_ptr(n_cur, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlCharStrndup((const char *)cur, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_cur, (const char *)cur, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCharStrndup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlCheckUTF8(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned char * utf; /* Pointer to putative UTF-8 encoded string. */
+ int n_utf;
+
+ for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_unsigned_char_ptr(n_utf, 0);
+
+ ret_val = xmlCheckUTF8((const unsigned char *)utf);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlCheckUTF8",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlGetUTF8Char(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ unsigned char * utf; /* a sequence of UTF-8 encoded bytes */
+ int n_utf;
+ int * len; /* a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence. */
+ int n_len;
+
+ for (n_utf = 0;n_utf < gen_nb_const_unsigned_char_ptr;n_utf++) {
+ for (n_len = 0;n_len < gen_nb_int_ptr;n_len++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_unsigned_char_ptr(n_utf, 0);
+ len = gen_int_ptr(n_len, 1);
+
+ ret_val = xmlGetUTF8Char((const unsigned char *)utf, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_unsigned_char_ptr(n_utf, (const unsigned char *)utf, 0);
+ des_int_ptr(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlGetUTF8Char",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrEqual(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str1; /* the first xmlChar * */
+ int n_str1;
+ xmlChar * str2; /* the second xmlChar * */
+ int n_str2;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+
+ ret_val = xmlStrEqual((const xmlChar *)str1, (const xmlChar *)str2);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrEqual",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrPrintf(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrQEqual(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * pref; /* the prefix of the QName */
+ int n_pref;
+ xmlChar * name; /* the localname of the QName */
+ int n_name;
+ xmlChar * str; /* the second xmlChar * */
+ int n_str;
+
+ for (n_pref = 0;n_pref < gen_nb_const_xmlChar_ptr;n_pref++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ pref = gen_const_xmlChar_ptr(n_pref, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ str = gen_const_xmlChar_ptr(n_str, 2);
+
+ ret_val = xmlStrQEqual((const xmlChar *)pref, (const xmlChar *)name, (const xmlChar *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_pref, (const xmlChar *)pref, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrQEqual",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_pref);
+ printf(" %d", n_name);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrVPrintf(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrcasecmp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str1; /* the first xmlChar * */
+ int n_str1;
+ xmlChar * str2; /* the second xmlChar * */
+ int n_str2;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+
+ ret_val = xmlStrcasecmp((const xmlChar *)str1, (const xmlChar *)str2);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrcasecmp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrcasestr(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlChar * str; /* the xmlChar * array (haystack) */
+ int n_str;
+ xmlChar * val; /* the xmlChar to search (needle) */
+ int n_val;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ val = gen_const_xmlChar_ptr(n_val, 1);
+
+ ret_val = xmlStrcasestr((const xmlChar *)str, (const xmlChar *)val);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrcasestr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrchr(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlChar * str; /* the xmlChar * array */
+ int n_str;
+ xmlChar val; /* the xmlChar to search */
+ int n_val;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_val = 0;n_val < gen_nb_xmlChar;n_val++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ val = gen_xmlChar(n_val, 1);
+
+ ret_val = xmlStrchr((const xmlChar *)str, val);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_xmlChar(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrchr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrcmp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str1; /* the first xmlChar * */
+ int n_str1;
+ xmlChar * str2; /* the second xmlChar * */
+ int n_str2;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+
+ ret_val = xmlStrcmp((const xmlChar *)str1, (const xmlChar *)str2);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrcmp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrdup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * cur; /* the input xmlChar * */
+ int n_cur;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+
+ ret_val = xmlStrdup((const xmlChar *)cur);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrdup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrlen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str; /* the xmlChar * array */
+ int n_str;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+
+ ret_val = xmlStrlen((const xmlChar *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrlen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrncasecmp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str1; /* the first xmlChar * */
+ int n_str1;
+ xmlChar * str2; /* the second xmlChar * */
+ int n_str2;
+ int len; /* the max comparison length */
+ int n_len;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlStrncasecmp((const xmlChar *)str1, (const xmlChar *)str2, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrncasecmp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrncatNew(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * str1; /* first xmlChar string */
+ int n_str1;
+ xmlChar * str2; /* second xmlChar string */
+ int n_str2;
+ int len; /* the len of @str2 or < 0 */
+ int n_len;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlStrncatNew((const xmlChar *)str1, (const xmlChar *)str2, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrncatNew",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrncmp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * str1; /* the first xmlChar * */
+ int n_str1;
+ xmlChar * str2; /* the second xmlChar * */
+ int n_str2;
+ int len; /* the max comparison length */
+ int n_len;
+
+ for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {
+ for (n_str2 = 0;n_str2 < gen_nb_const_xmlChar_ptr;n_str2++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ str1 = gen_const_xmlChar_ptr(n_str1, 0);
+ str2 = gen_const_xmlChar_ptr(n_str2, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlStrncmp((const xmlChar *)str1, (const xmlChar *)str2, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str1, (const xmlChar *)str1, 0);
+ des_const_xmlChar_ptr(n_str2, (const xmlChar *)str2, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrncmp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str1);
+ printf(" %d", n_str2);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrndup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * cur; /* the input xmlChar * */
+ int n_cur;
+ int len; /* the len of @cur */
+ int n_len;
+
+ for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_const_xmlChar_ptr(n_cur, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlStrndup((const xmlChar *)cur, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrndup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrstr(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlChar * str; /* the xmlChar * array (haystack) */
+ int n_str;
+ xmlChar * val; /* the xmlChar to search (needle) */
+ int n_val;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ val = gen_const_xmlChar_ptr(n_val, 1);
+
+ ret_val = xmlStrstr((const xmlChar *)str, (const xmlChar *)val);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrstr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlStrsub(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * str; /* the xmlChar * array (haystack) */
+ int n_str;
+ int start; /* the index of the first char (zero based) */
+ int n_start;
+ int len; /* the length of the substring */
+ int n_len;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_start = 0;n_start < gen_nb_int;n_start++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ start = gen_int(n_start, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlStrsub((const xmlChar *)str, start, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_int(n_start, start, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlStrsub",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_start);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Charcmp(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * utf1; /* pointer to first UTF8 char */
+ int n_utf1;
+ xmlChar * utf2; /* pointer to second UTF8 char */
+ int n_utf2;
+
+ for (n_utf1 = 0;n_utf1 < gen_nb_const_xmlChar_ptr;n_utf1++) {
+ for (n_utf2 = 0;n_utf2 < gen_nb_const_xmlChar_ptr;n_utf2++) {
+ mem_base = xmlMemBlocks();
+ utf1 = gen_const_xmlChar_ptr(n_utf1, 0);
+ utf2 = gen_const_xmlChar_ptr(n_utf2, 1);
+
+ ret_val = xmlUTF8Charcmp((const xmlChar *)utf1, (const xmlChar *)utf2);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf1, (const xmlChar *)utf1, 0);
+ des_const_xmlChar_ptr(n_utf2, (const xmlChar *)utf2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Charcmp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf1);
+ printf(" %d", n_utf2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Size(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * utf; /* pointer to the UTF8 character */
+ int n_utf;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+
+ ret_val = xmlUTF8Size((const xmlChar *)utf);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Size",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strlen(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
+ int n_utf;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+
+ ret_val = xmlUTF8Strlen((const xmlChar *)utf);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strlen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf("\n");
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strloc(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * utf; /* the input UTF8 * */
+ int n_utf;
+ xmlChar * utfchar; /* the UTF8 character to be found */
+ int n_utfchar;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ for (n_utfchar = 0;n_utfchar < gen_nb_const_xmlChar_ptr;n_utfchar++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+ utfchar = gen_const_xmlChar_ptr(n_utfchar, 1);
+
+ ret_val = xmlUTF8Strloc((const xmlChar *)utf, (const xmlChar *)utfchar);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ des_const_xmlChar_ptr(n_utfchar, (const xmlChar *)utfchar, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strloc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_utfchar);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strndup(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * utf; /* the input UTF8 * */
+ int n_utf;
+ int len; /* the len of @utf (in chars) */
+ int n_len;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strndup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strpos(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlChar * utf; /* the input UTF8 * */
+ int n_utf;
+ int pos; /* the position of the desired UTF8 char (in chars) */
+ int n_pos;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ for (n_pos = 0;n_pos < gen_nb_int;n_pos++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+ pos = gen_int(n_pos, 1);
+
+ ret_val = xmlUTF8Strpos((const xmlChar *)utf, pos);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ des_int(n_pos, pos, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strpos",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_pos);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strsize(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ int ret_val;
+ xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
+ int n_utf;
+ int len; /* the number of characters in the array */
+ int n_len;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+ len = gen_int(n_len, 1);
+
+ ret_val = xmlUTF8Strsize((const xmlChar *)utf, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ des_int(n_len, len, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strsize",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUTF8Strsub(void) {
+ int test_ret = 0;
+
+ int mem_base;
+ xmlChar * ret_val;
+ xmlChar * utf; /* a sequence of UTF-8 encoded bytes */
+ int n_utf;
+ int start; /* relative pos of first char */
+ int n_start;
+ int len; /* total number to copy */
+ int n_len;
+
+ for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {
+ for (n_start = 0;n_start < gen_nb_int;n_start++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ utf = gen_const_xmlChar_ptr(n_utf, 0);
+ start = gen_int(n_start, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlUTF8Strsub((const xmlChar *)utf, start, len);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_utf, (const xmlChar *)utf, 0);
+ des_int(n_start, start, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUTF8Strsub",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_utf);
+ printf(" %d", n_start);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+
+ return(test_ret);
+}
+
+static int
+test_xmlstring(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlstring : 26 of 30 functions ...\n");
+ test_ret += test_xmlCharStrdup();
+ test_ret += test_xmlCharStrndup();
+ test_ret += test_xmlCheckUTF8();
+ test_ret += test_xmlGetUTF8Char();
+ test_ret += test_xmlStrEqual();
+ test_ret += test_xmlStrPrintf();
+ test_ret += test_xmlStrQEqual();
+ test_ret += test_xmlStrVPrintf();
+ test_ret += test_xmlStrcasecmp();
+ test_ret += test_xmlStrcasestr();
+ test_ret += test_xmlStrchr();
+ test_ret += test_xmlStrcmp();
+ test_ret += test_xmlStrdup();
+ test_ret += test_xmlStrlen();
+ test_ret += test_xmlStrncasecmp();
+ test_ret += test_xmlStrncatNew();
+ test_ret += test_xmlStrncmp();
+ test_ret += test_xmlStrndup();
+ test_ret += test_xmlStrstr();
+ test_ret += test_xmlStrsub();
+ test_ret += test_xmlUTF8Charcmp();
+ test_ret += test_xmlUTF8Size();
+ test_ret += test_xmlUTF8Strlen();
+ test_ret += test_xmlUTF8Strloc();
+ test_ret += test_xmlUTF8Strndup();
+ test_ret += test_xmlUTF8Strpos();
+ test_ret += test_xmlUTF8Strsize();
+ test_ret += test_xmlUTF8Strsub();
+
+ if (test_ret != 0)
+ printf("Module xmlstring: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlUCSIsAegeanNumbers(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsAegeanNumbers(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsAegeanNumbers",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsAlphabeticPresentationForms(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsAlphabeticPresentationForms(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsAlphabeticPresentationForms",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsArabic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsArabic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsArabic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsArabicPresentationFormsA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsArabicPresentationFormsA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsArabicPresentationFormsB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsArabicPresentationFormsB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsArabicPresentationFormsB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsArmenian(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsArmenian(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsArmenian",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsArrows(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsArrows(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsArrows",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBasicLatin(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBasicLatin(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBasicLatin",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBengali(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBengali(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBengali",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBlock(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+ char * block; /* UCS block name */
+ int n_block;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ for (n_block = 0;n_block < gen_nb_const_char_ptr;n_block++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+ block = gen_const_char_ptr(n_block, 1);
+
+ ret_val = xmlUCSIsBlock(code, (const char *)block);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ des_const_char_ptr(n_block, (const char *)block, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBlock",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf(" %d", n_block);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBlockElements(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBlockElements(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBlockElements",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBopomofo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBopomofo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBopomofo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBopomofoExtended(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBopomofoExtended(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBopomofoExtended",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBoxDrawing(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBoxDrawing(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBoxDrawing",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBraillePatterns(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBraillePatterns(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBraillePatterns",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsBuhid(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsBuhid(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsBuhid",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsByzantineMusicalSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsByzantineMusicalSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsByzantineMusicalSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKCompatibility(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKCompatibility(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKCompatibility",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKCompatibilityForms(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKCompatibilityForms(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityForms",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKCompatibilityIdeographs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKCompatibilityIdeographs(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKCompatibilityIdeographsSupplement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKCompatibilityIdeographsSupplement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKRadicalsSupplement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKRadicalsSupplement(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKRadicalsSupplement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKSymbolsandPunctuation(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKSymbolsandPunctuation(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKSymbolsandPunctuation",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKUnifiedIdeographs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKUnifiedIdeographs(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKUnifiedIdeographsExtensionA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCJKUnifiedIdeographsExtensionB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCJKUnifiedIdeographsExtensionB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+ char * cat; /* UCS Category name */
+ int n_cat;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ for (n_cat = 0;n_cat < gen_nb_const_char_ptr;n_cat++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+ cat = gen_const_char_ptr(n_cat, 1);
+
+ ret_val = xmlUCSIsCat(code, (const char *)cat);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ des_const_char_ptr(n_cat, (const char *)cat, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf(" %d", n_cat);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatC(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatC(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatC",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatCc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatCc(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatCc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatCf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatCf(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatCf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatCo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatCo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatCo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatCs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatCs(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatCs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatL(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatL(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatL",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatLl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatLl(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatLl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatLm(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatLm(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatLm",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatLo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatLo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatLo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatLt(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatLt(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatLt",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatLu(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatLu(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatLu",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatM(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatM(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatM",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatMc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatMc(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatMc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatMe(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatMe(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatMe",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatMn(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatMn(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatMn",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatN(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatN(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatN",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatNd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatNd(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatNd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatNl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatNl(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatNl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatNo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatNo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatNo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatP(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatP(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatP",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPc(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPd(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPe(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPe(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPe",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPf(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPi(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPi(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPi",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatPs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatPs(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatPs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatS(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatSc(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatSc(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatSc",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatSk(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatSk(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatSk",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatSm(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatSm(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatSm",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatSo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatSo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatSo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatZ(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatZ(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatZ",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatZl(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatZl(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatZl",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatZp(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatZp(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatZp",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCatZs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCatZs(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCatZs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCherokee(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCherokee(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCherokee",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCombiningDiacriticalMarks(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCombiningDiacriticalMarks(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCombiningDiacriticalMarksforSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCombiningDiacriticalMarksforSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCombiningHalfMarks(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCombiningHalfMarks(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCombiningHalfMarks",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCombiningMarksforSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCombiningMarksforSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCombiningMarksforSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsControlPictures(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsControlPictures(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsControlPictures",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCurrencySymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCurrencySymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCurrencySymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCypriotSyllabary(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCypriotSyllabary(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCypriotSyllabary",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCyrillic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCyrillic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCyrillic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsCyrillicSupplement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsCyrillicSupplement(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsCyrillicSupplement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsDeseret(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsDeseret(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsDeseret",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsDevanagari(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsDevanagari(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsDevanagari",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsDingbats(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsDingbats(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsDingbats",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsEnclosedAlphanumerics(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsEnclosedAlphanumerics(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsEnclosedAlphanumerics",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsEnclosedCJKLettersandMonths(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsEnclosedCJKLettersandMonths(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsEnclosedCJKLettersandMonths",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsEthiopic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsEthiopic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsEthiopic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGeneralPunctuation(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGeneralPunctuation(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGeneralPunctuation",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGeometricShapes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGeometricShapes(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGeometricShapes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGeorgian(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGeorgian(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGeorgian",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGothic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGothic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGothic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGreek(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGreek(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGreek",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGreekExtended(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGreekExtended(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGreekExtended",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGreekandCoptic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGreekandCoptic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGreekandCoptic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGujarati(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGujarati(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGujarati",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsGurmukhi(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsGurmukhi(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsGurmukhi",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHalfwidthandFullwidthForms(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHalfwidthandFullwidthForms(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHalfwidthandFullwidthForms",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHangulCompatibilityJamo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHangulCompatibilityJamo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHangulCompatibilityJamo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHangulJamo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHangulJamo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHangulJamo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHangulSyllables(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHangulSyllables(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHangulSyllables",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHanunoo(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHanunoo(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHanunoo",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHebrew(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHebrew(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHebrew",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHighPrivateUseSurrogates(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHighPrivateUseSurrogates(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHighPrivateUseSurrogates",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHighSurrogates(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHighSurrogates(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHighSurrogates",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsHiragana(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsHiragana(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsHiragana",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsIPAExtensions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsIPAExtensions(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsIPAExtensions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsIdeographicDescriptionCharacters(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsIdeographicDescriptionCharacters(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsIdeographicDescriptionCharacters",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKanbun(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKanbun(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKanbun",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKangxiRadicals(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKangxiRadicals(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKangxiRadicals",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKannada(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKannada(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKannada",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKatakana(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKatakana(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKatakana",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKatakanaPhoneticExtensions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKatakanaPhoneticExtensions(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKatakanaPhoneticExtensions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKhmer(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKhmer(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKhmer",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsKhmerSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsKhmerSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsKhmerSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLao(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLao(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLao",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLatin1Supplement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLatin1Supplement(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLatin1Supplement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLatinExtendedA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLatinExtendedA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLatinExtendedA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLatinExtendedAdditional(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLatinExtendedAdditional(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLatinExtendedAdditional",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLatinExtendedB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLatinExtendedB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLatinExtendedB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLetterlikeSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLetterlikeSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLetterlikeSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLimbu(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLimbu(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLimbu",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLinearBIdeograms(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLinearBIdeograms(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLinearBIdeograms",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLinearBSyllabary(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLinearBSyllabary(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLinearBSyllabary",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsLowSurrogates(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsLowSurrogates(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsLowSurrogates",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMalayalam(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMalayalam(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMalayalam",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMathematicalAlphanumericSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMathematicalAlphanumericSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMathematicalAlphanumericSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMathematicalOperators(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMathematicalOperators(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMathematicalOperators",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMiscellaneousMathematicalSymbolsA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMiscellaneousMathematicalSymbolsB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMiscellaneousMathematicalSymbolsB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMiscellaneousSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMiscellaneousSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMiscellaneousSymbolsandArrows(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMiscellaneousSymbolsandArrows(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMiscellaneousSymbolsandArrows",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMiscellaneousTechnical(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMiscellaneousTechnical(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMiscellaneousTechnical",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMongolian(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMongolian(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMongolian",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMusicalSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMusicalSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMusicalSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsMyanmar(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsMyanmar(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsMyanmar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsNumberForms(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsNumberForms(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsNumberForms",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsOgham(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsOgham(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsOgham",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsOldItalic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsOldItalic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsOldItalic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsOpticalCharacterRecognition(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsOpticalCharacterRecognition(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsOpticalCharacterRecognition",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsOriya(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsOriya(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsOriya",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsOsmanya(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsOsmanya(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsOsmanya",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsPhoneticExtensions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsPhoneticExtensions(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsPhoneticExtensions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsPrivateUse(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsPrivateUse(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsPrivateUse",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsPrivateUseArea(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsPrivateUseArea(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsPrivateUseArea",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsRunic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsRunic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsRunic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsShavian(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsShavian(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsShavian",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSinhala(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSinhala(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSinhala",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSmallFormVariants(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSmallFormVariants(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSmallFormVariants",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSpacingModifierLetters(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSpacingModifierLetters(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSpacingModifierLetters",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSpecials(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSpecials(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSpecials",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSuperscriptsandSubscripts(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSuperscriptsandSubscripts(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSuperscriptsandSubscripts",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSupplementalArrowsA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSupplementalArrowsA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSupplementalArrowsB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSupplementalArrowsB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSupplementalArrowsB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSupplementalMathematicalOperators(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSupplementalMathematicalOperators(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSupplementalMathematicalOperators",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSupplementaryPrivateUseAreaA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSupplementaryPrivateUseAreaA(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSupplementaryPrivateUseAreaB(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSupplementaryPrivateUseAreaB(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSupplementaryPrivateUseAreaB",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsSyriac(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsSyriac(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsSyriac",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTagalog(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTagalog(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTagalog",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTagbanwa(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTagbanwa(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTagbanwa",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTags(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTags(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTags",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTaiLe(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTaiLe(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTaiLe",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTaiXuanJingSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTaiXuanJingSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTaiXuanJingSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTamil(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTamil(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTamil",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTelugu(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTelugu(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTelugu",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsThaana(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsThaana(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsThaana",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsThai(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsThai(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsThai",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsTibetan(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsTibetan(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsTibetan",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsUgaritic(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsUgaritic(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsUgaritic",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsUnifiedCanadianAboriginalSyllabics(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsUnifiedCanadianAboriginalSyllabics",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsVariationSelectors(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsVariationSelectors(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsVariationSelectors",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsVariationSelectorsSupplement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsVariationSelectorsSupplement(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsVariationSelectorsSupplement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsYiRadicals(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsYiRadicals(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsYiRadicals",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsYiSyllables(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsYiSyllables(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsYiSyllables",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlUCSIsYijingHexagramSymbols(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_UNICODE_ENABLED)
+ int mem_base;
+ int ret_val;
+ int code; /* UCS code point */
+ int n_code;
+
+ for (n_code = 0;n_code < gen_nb_int;n_code++) {
+ mem_base = xmlMemBlocks();
+ code = gen_int(n_code, 0);
+
+ ret_val = xmlUCSIsYijingHexagramSymbols(code);
+ desret_int(ret_val);
+ call_tests++;
+ des_int(n_code, code, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlUCSIsYijingHexagramSymbols",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_code);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xmlunicode(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlunicode : 166 of 166 functions ...\n");
+ test_ret += test_xmlUCSIsAegeanNumbers();
+ test_ret += test_xmlUCSIsAlphabeticPresentationForms();
+ test_ret += test_xmlUCSIsArabic();
+ test_ret += test_xmlUCSIsArabicPresentationFormsA();
+ test_ret += test_xmlUCSIsArabicPresentationFormsB();
+ test_ret += test_xmlUCSIsArmenian();
+ test_ret += test_xmlUCSIsArrows();
+ test_ret += test_xmlUCSIsBasicLatin();
+ test_ret += test_xmlUCSIsBengali();
+ test_ret += test_xmlUCSIsBlock();
+ test_ret += test_xmlUCSIsBlockElements();
+ test_ret += test_xmlUCSIsBopomofo();
+ test_ret += test_xmlUCSIsBopomofoExtended();
+ test_ret += test_xmlUCSIsBoxDrawing();
+ test_ret += test_xmlUCSIsBraillePatterns();
+ test_ret += test_xmlUCSIsBuhid();
+ test_ret += test_xmlUCSIsByzantineMusicalSymbols();
+ test_ret += test_xmlUCSIsCJKCompatibility();
+ test_ret += test_xmlUCSIsCJKCompatibilityForms();
+ test_ret += test_xmlUCSIsCJKCompatibilityIdeographs();
+ test_ret += test_xmlUCSIsCJKCompatibilityIdeographsSupplement();
+ test_ret += test_xmlUCSIsCJKRadicalsSupplement();
+ test_ret += test_xmlUCSIsCJKSymbolsandPunctuation();
+ test_ret += test_xmlUCSIsCJKUnifiedIdeographs();
+ test_ret += test_xmlUCSIsCJKUnifiedIdeographsExtensionA();
+ test_ret += test_xmlUCSIsCJKUnifiedIdeographsExtensionB();
+ test_ret += test_xmlUCSIsCat();
+ test_ret += test_xmlUCSIsCatC();
+ test_ret += test_xmlUCSIsCatCc();
+ test_ret += test_xmlUCSIsCatCf();
+ test_ret += test_xmlUCSIsCatCo();
+ test_ret += test_xmlUCSIsCatCs();
+ test_ret += test_xmlUCSIsCatL();
+ test_ret += test_xmlUCSIsCatLl();
+ test_ret += test_xmlUCSIsCatLm();
+ test_ret += test_xmlUCSIsCatLo();
+ test_ret += test_xmlUCSIsCatLt();
+ test_ret += test_xmlUCSIsCatLu();
+ test_ret += test_xmlUCSIsCatM();
+ test_ret += test_xmlUCSIsCatMc();
+ test_ret += test_xmlUCSIsCatMe();
+ test_ret += test_xmlUCSIsCatMn();
+ test_ret += test_xmlUCSIsCatN();
+ test_ret += test_xmlUCSIsCatNd();
+ test_ret += test_xmlUCSIsCatNl();
+ test_ret += test_xmlUCSIsCatNo();
+ test_ret += test_xmlUCSIsCatP();
+ test_ret += test_xmlUCSIsCatPc();
+ test_ret += test_xmlUCSIsCatPd();
+ test_ret += test_xmlUCSIsCatPe();
+ test_ret += test_xmlUCSIsCatPf();
+ test_ret += test_xmlUCSIsCatPi();
+ test_ret += test_xmlUCSIsCatPo();
+ test_ret += test_xmlUCSIsCatPs();
+ test_ret += test_xmlUCSIsCatS();
+ test_ret += test_xmlUCSIsCatSc();
+ test_ret += test_xmlUCSIsCatSk();
+ test_ret += test_xmlUCSIsCatSm();
+ test_ret += test_xmlUCSIsCatSo();
+ test_ret += test_xmlUCSIsCatZ();
+ test_ret += test_xmlUCSIsCatZl();
+ test_ret += test_xmlUCSIsCatZp();
+ test_ret += test_xmlUCSIsCatZs();
+ test_ret += test_xmlUCSIsCherokee();
+ test_ret += test_xmlUCSIsCombiningDiacriticalMarks();
+ test_ret += test_xmlUCSIsCombiningDiacriticalMarksforSymbols();
+ test_ret += test_xmlUCSIsCombiningHalfMarks();
+ test_ret += test_xmlUCSIsCombiningMarksforSymbols();
+ test_ret += test_xmlUCSIsControlPictures();
+ test_ret += test_xmlUCSIsCurrencySymbols();
+ test_ret += test_xmlUCSIsCypriotSyllabary();
+ test_ret += test_xmlUCSIsCyrillic();
+ test_ret += test_xmlUCSIsCyrillicSupplement();
+ test_ret += test_xmlUCSIsDeseret();
+ test_ret += test_xmlUCSIsDevanagari();
+ test_ret += test_xmlUCSIsDingbats();
+ test_ret += test_xmlUCSIsEnclosedAlphanumerics();
+ test_ret += test_xmlUCSIsEnclosedCJKLettersandMonths();
+ test_ret += test_xmlUCSIsEthiopic();
+ test_ret += test_xmlUCSIsGeneralPunctuation();
+ test_ret += test_xmlUCSIsGeometricShapes();
+ test_ret += test_xmlUCSIsGeorgian();
+ test_ret += test_xmlUCSIsGothic();
+ test_ret += test_xmlUCSIsGreek();
+ test_ret += test_xmlUCSIsGreekExtended();
+ test_ret += test_xmlUCSIsGreekandCoptic();
+ test_ret += test_xmlUCSIsGujarati();
+ test_ret += test_xmlUCSIsGurmukhi();
+ test_ret += test_xmlUCSIsHalfwidthandFullwidthForms();
+ test_ret += test_xmlUCSIsHangulCompatibilityJamo();
+ test_ret += test_xmlUCSIsHangulJamo();
+ test_ret += test_xmlUCSIsHangulSyllables();
+ test_ret += test_xmlUCSIsHanunoo();
+ test_ret += test_xmlUCSIsHebrew();
+ test_ret += test_xmlUCSIsHighPrivateUseSurrogates();
+ test_ret += test_xmlUCSIsHighSurrogates();
+ test_ret += test_xmlUCSIsHiragana();
+ test_ret += test_xmlUCSIsIPAExtensions();
+ test_ret += test_xmlUCSIsIdeographicDescriptionCharacters();
+ test_ret += test_xmlUCSIsKanbun();
+ test_ret += test_xmlUCSIsKangxiRadicals();
+ test_ret += test_xmlUCSIsKannada();
+ test_ret += test_xmlUCSIsKatakana();
+ test_ret += test_xmlUCSIsKatakanaPhoneticExtensions();
+ test_ret += test_xmlUCSIsKhmer();
+ test_ret += test_xmlUCSIsKhmerSymbols();
+ test_ret += test_xmlUCSIsLao();
+ test_ret += test_xmlUCSIsLatin1Supplement();
+ test_ret += test_xmlUCSIsLatinExtendedA();
+ test_ret += test_xmlUCSIsLatinExtendedAdditional();
+ test_ret += test_xmlUCSIsLatinExtendedB();
+ test_ret += test_xmlUCSIsLetterlikeSymbols();
+ test_ret += test_xmlUCSIsLimbu();
+ test_ret += test_xmlUCSIsLinearBIdeograms();
+ test_ret += test_xmlUCSIsLinearBSyllabary();
+ test_ret += test_xmlUCSIsLowSurrogates();
+ test_ret += test_xmlUCSIsMalayalam();
+ test_ret += test_xmlUCSIsMathematicalAlphanumericSymbols();
+ test_ret += test_xmlUCSIsMathematicalOperators();
+ test_ret += test_xmlUCSIsMiscellaneousMathematicalSymbolsA();
+ test_ret += test_xmlUCSIsMiscellaneousMathematicalSymbolsB();
+ test_ret += test_xmlUCSIsMiscellaneousSymbols();
+ test_ret += test_xmlUCSIsMiscellaneousSymbolsandArrows();
+ test_ret += test_xmlUCSIsMiscellaneousTechnical();
+ test_ret += test_xmlUCSIsMongolian();
+ test_ret += test_xmlUCSIsMusicalSymbols();
+ test_ret += test_xmlUCSIsMyanmar();
+ test_ret += test_xmlUCSIsNumberForms();
+ test_ret += test_xmlUCSIsOgham();
+ test_ret += test_xmlUCSIsOldItalic();
+ test_ret += test_xmlUCSIsOpticalCharacterRecognition();
+ test_ret += test_xmlUCSIsOriya();
+ test_ret += test_xmlUCSIsOsmanya();
+ test_ret += test_xmlUCSIsPhoneticExtensions();
+ test_ret += test_xmlUCSIsPrivateUse();
+ test_ret += test_xmlUCSIsPrivateUseArea();
+ test_ret += test_xmlUCSIsRunic();
+ test_ret += test_xmlUCSIsShavian();
+ test_ret += test_xmlUCSIsSinhala();
+ test_ret += test_xmlUCSIsSmallFormVariants();
+ test_ret += test_xmlUCSIsSpacingModifierLetters();
+ test_ret += test_xmlUCSIsSpecials();
+ test_ret += test_xmlUCSIsSuperscriptsandSubscripts();
+ test_ret += test_xmlUCSIsSupplementalArrowsA();
+ test_ret += test_xmlUCSIsSupplementalArrowsB();
+ test_ret += test_xmlUCSIsSupplementalMathematicalOperators();
+ test_ret += test_xmlUCSIsSupplementaryPrivateUseAreaA();
+ test_ret += test_xmlUCSIsSupplementaryPrivateUseAreaB();
+ test_ret += test_xmlUCSIsSyriac();
+ test_ret += test_xmlUCSIsTagalog();
+ test_ret += test_xmlUCSIsTagbanwa();
+ test_ret += test_xmlUCSIsTags();
+ test_ret += test_xmlUCSIsTaiLe();
+ test_ret += test_xmlUCSIsTaiXuanJingSymbols();
+ test_ret += test_xmlUCSIsTamil();
+ test_ret += test_xmlUCSIsTelugu();
+ test_ret += test_xmlUCSIsThaana();
+ test_ret += test_xmlUCSIsThai();
+ test_ret += test_xmlUCSIsTibetan();
+ test_ret += test_xmlUCSIsUgaritic();
+ test_ret += test_xmlUCSIsUnifiedCanadianAboriginalSyllabics();
+ test_ret += test_xmlUCSIsVariationSelectors();
+ test_ret += test_xmlUCSIsVariationSelectorsSupplement();
+ test_ret += test_xmlUCSIsYiRadicals();
+ test_ret += test_xmlUCSIsYiSyllables();
+ test_ret += test_xmlUCSIsYijingHexagramSymbols();
+
+ if (test_ret != 0)
+ printf("Module xmlunicode: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlNewTextWriter(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlTextWriterPtr ret_val;
+ xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
+ int n_out;
+
+ for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+ mem_base = xmlMemBlocks();
+ out = gen_xmlOutputBufferPtr(n_out, 0);
+
+ ret_val = xmlNewTextWriter(out);
+ if (ret_val != NULL) out = NULL;
+ desret_xmlTextWriterPtr(ret_val);
+ call_tests++;
+ des_xmlOutputBufferPtr(n_out, out, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextWriter",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_out);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextWriterFilename(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlTextWriterPtr ret_val;
+ const char * uri; /* the URI of the resource for the output */
+ int n_uri;
+ int compression; /* compress the output? */
+ int n_compression;
+
+ for (n_uri = 0;n_uri < gen_nb_fileoutput;n_uri++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ uri = gen_fileoutput(n_uri, 0);
+ compression = gen_int(n_compression, 1);
+
+ ret_val = xmlNewTextWriterFilename(uri, compression);
+ desret_xmlTextWriterPtr(ret_val);
+ call_tests++;
+ des_fileoutput(n_uri, uri, 0);
+ des_int(n_compression, compression, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextWriterFilename",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_uri);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextWriterMemory(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlTextWriterPtr ret_val;
+ xmlBufferPtr buf; /* xmlBufferPtr */
+ int n_buf;
+ int compression; /* compress the output? */
+ int n_compression;
+
+ for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ buf = gen_xmlBufferPtr(n_buf, 0);
+ compression = gen_int(n_compression, 1);
+
+ ret_val = xmlNewTextWriterMemory(buf, compression);
+ desret_xmlTextWriterPtr(ret_val);
+ call_tests++;
+ des_xmlBufferPtr(n_buf, buf, 0);
+ des_int(n_compression, compression, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextWriterMemory",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_buf);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextWriterPushParser(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlTextWriterPtr ret_val;
+ xmlParserCtxtPtr ctxt; /* xmlParserCtxtPtr to hold the new XML document tree */
+ int n_ctxt;
+ int compression; /* compress the output? */
+ int n_compression;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);
+ compression = gen_int(n_compression, 1);
+
+ ret_val = xmlNewTextWriterPushParser(ctxt, compression);
+ if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;} if (ret_val != NULL) ctxt = NULL;
+ desret_xmlTextWriterPtr(ret_val);
+ call_tests++;
+ des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);
+ des_int(n_compression, compression, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextWriterPushParser",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlNewTextWriterTree(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ xmlTextWriterPtr ret_val;
+ xmlDocPtr doc; /* xmlDocPtr */
+ int n_doc;
+ xmlNodePtr node; /* xmlNodePtr or NULL for doc->children */
+ int n_node;
+ int compression; /* compress the output? */
+ int n_compression;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ compression = gen_int(n_compression, 2);
+
+ ret_val = xmlNewTextWriterTree(doc, node, compression);
+ desret_xmlTextWriterPtr(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_int(n_compression, compression, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlNewTextWriterTree",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf(" %d", n_node);
+ printf(" %d", n_compression);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndAttribute(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndCDATA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndCDATA(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndCDATA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndComment(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndComment(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndComment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndDTD(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndDTDAttlist(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndDTDAttlist(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndDTDAttlist",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndDTDElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndDTDElement(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndDTDElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndDTDEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndDTDEntity(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndDTDEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndDocument(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndElement(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterEndPI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterEndPI(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterEndPI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterFlush(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterFlush(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterFlush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterFullEndElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterFullEndElement(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterFullEndElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterSetIndent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ int indent; /* do indentation? */
+ int n_indent;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_indent = 0;n_indent < gen_nb_int;n_indent++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ indent = gen_int(n_indent, 1);
+
+ ret_val = xmlTextWriterSetIndent(writer, indent);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_int(n_indent, indent, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterSetIndent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_indent);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterSetIndentString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * str; /* the xmlChar string */
+ int n_str;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+
+ ret_val = xmlTextWriterSetIndentString(writer, (const xmlChar *)str);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterSetIndentString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterSetQuoteChar(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar quotechar; /* the quote character */
+ int n_quotechar;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_quotechar = 0;n_quotechar < gen_nb_xmlChar;n_quotechar++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ quotechar = gen_xmlChar(n_quotechar, 1);
+
+ ret_val = xmlTextWriterSetQuoteChar(writer, quotechar);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_xmlChar(n_quotechar, quotechar, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterSetQuoteChar",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_quotechar);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* element name */
+ int n_name;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextWriterStartAttribute(writer, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartAttributeNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * prefix; /* namespace prefix or NULL */
+ int n_prefix;
+ xmlChar * name; /* element local name */
+ int n_name;
+ xmlChar * namespaceURI; /* namespace URI or NULL */
+ int n_namespaceURI;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
+
+ ret_val = xmlTextWriterStartAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartAttributeNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_namespaceURI);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartCDATA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterStartCDATA(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartCDATA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartComment(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+
+ ret_val = xmlTextWriterStartComment(writer);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartComment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD */
+ int n_name;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 2);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 3);
+
+ ret_val = xmlTextWriterStartDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartDTDAttlist(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD ATTLIST */
+ int n_name;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextWriterStartDTDAttlist(writer, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartDTDAttlist",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartDTDElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD element */
+ int n_name;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextWriterStartDTDElement(writer, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartDTDElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartDTDEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ int pe; /* TRUE if this is a parameter entity, FALSE if not */
+ int n_pe;
+ xmlChar * name; /* the name of the DTD ATTLIST */
+ int n_name;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ pe = gen_int(n_pe, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+
+ ret_val = xmlTextWriterStartDTDEntity(writer, pe, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_int(n_pe, pe, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartDTDEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_pe);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartDocument(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ char * version; /* the xml version ("1.0") or NULL for default ("1.0") */
+ int n_version;
+ char * encoding; /* the encoding or NULL for default */
+ int n_encoding;
+ char * standalone; /* "yes" or "no" or NULL for default */
+ int n_standalone;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_version = 0;n_version < gen_nb_const_char_ptr;n_version++) {
+ for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
+ for (n_standalone = 0;n_standalone < gen_nb_const_char_ptr;n_standalone++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ version = gen_const_char_ptr(n_version, 1);
+ encoding = gen_const_char_ptr(n_encoding, 2);
+ standalone = gen_const_char_ptr(n_standalone, 3);
+
+ ret_val = xmlTextWriterStartDocument(writer, (const char *)version, (const char *)encoding, (const char *)standalone);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_char_ptr(n_version, (const char *)version, 1);
+ des_const_char_ptr(n_encoding, (const char *)encoding, 2);
+ des_const_char_ptr(n_standalone, (const char *)standalone, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartDocument",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_version);
+ printf(" %d", n_encoding);
+ printf(" %d", n_standalone);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* element name */
+ int n_name;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlTextWriterStartElement(writer, (const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartElementNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * prefix; /* namespace prefix or NULL */
+ int n_prefix;
+ xmlChar * name; /* element local name */
+ int n_name;
+ xmlChar * namespaceURI; /* namespace URI or NULL */
+ int n_namespaceURI;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
+
+ ret_val = xmlTextWriterStartElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartElementNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_namespaceURI);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterStartPI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * target; /* PI target */
+ int n_target;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ target = gen_const_xmlChar_ptr(n_target, 1);
+
+ ret_val = xmlTextWriterStartPI(writer, (const xmlChar *)target);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterStartPI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_target);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* attribute name */
+ int n_name;
+ xmlChar * content; /* attribute content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlTextWriterWriteAttribute(writer, (const xmlChar *)name, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteAttributeNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * prefix; /* namespace prefix */
+ int n_prefix;
+ xmlChar * name; /* attribute local name */
+ int n_name;
+ xmlChar * namespaceURI; /* namespace URI */
+ int n_namespaceURI;
+ xmlChar * content; /* attribute content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
+ content = gen_const_xmlChar_ptr(n_content, 4);
+
+ ret_val = xmlTextWriterWriteAttributeNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteAttributeNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_namespaceURI);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteBase64(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ char * data; /* binary data */
+ int n_data;
+ int start; /* the position within the data of the first byte to encode */
+ int n_start;
+ int len; /* the number of bytes to encode */
+ int n_len;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
+ for (n_start = 0;n_start < gen_nb_int;n_start++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ data = gen_const_char_ptr(n_data, 1);
+ start = gen_int(n_start, 2);
+ len = gen_int(n_len, 3);
+
+ ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_char_ptr(n_data, (const char *)data, 1);
+ des_int(n_start, start, 2);
+ des_int(n_len, len, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteBase64",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_data);
+ printf(" %d", n_start);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteBinHex(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ char * data; /* binary data */
+ int n_data;
+ int start; /* the position within the data of the first byte to encode */
+ int n_start;
+ int len; /* the number of bytes to encode */
+ int n_len;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {
+ for (n_start = 0;n_start < gen_nb_int;n_start++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ data = gen_const_char_ptr(n_data, 1);
+ start = gen_int(n_start, 2);
+ len = gen_int(n_len, 3);
+
+ ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_char_ptr(n_data, (const char *)data, 1);
+ des_int(n_start, start, 2);
+ des_int(n_len, len, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteBinHex",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_data);
+ printf(" %d", n_start);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteCDATA(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * content; /* CDATA content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlTextWriterWriteCDATA(writer, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteCDATA",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteComment(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * content; /* comment string */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlTextWriterWriteComment(writer, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteComment",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTD(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD */
+ int n_name;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+ xmlChar * subset; /* string content of the DTD */
+ int n_subset;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ for (n_subset = 0;n_subset < gen_nb_const_xmlChar_ptr;n_subset++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 2);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 3);
+ subset = gen_const_xmlChar_ptr(n_subset, 4);
+
+ ret_val = xmlTextWriterWriteDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)subset);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
+ des_const_xmlChar_ptr(n_subset, (const xmlChar *)subset, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTD",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf(" %d", n_subset);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDAttlist(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD ATTLIST */
+ int n_name;
+ xmlChar * content; /* content of the ATTLIST */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlTextWriterWriteDTDAttlist(writer, (const xmlChar *)name, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDAttlist",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the DTD element */
+ int n_name;
+ xmlChar * content; /* content of the element */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlTextWriterWriteDTDElement(writer, (const xmlChar *)name, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ int pe; /* TRUE if this is a parameter entity, FALSE if not */
+ int n_pe;
+ xmlChar * name; /* the name of the DTD entity */
+ int n_name;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+ xmlChar * ndataid; /* the xml notation name. */
+ int n_ndataid;
+ xmlChar * content; /* content of the entity */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ pe = gen_int(n_pe, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 3);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 4);
+ ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
+ content = gen_const_xmlChar_ptr(n_content, 6);
+
+ ret_val = xmlTextWriterWriteDTDEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_int(n_pe, pe, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
+ des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 6);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_pe);
+ printf(" %d", n_name);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf(" %d", n_ndataid);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDExternalEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ int pe; /* TRUE if this is a parameter entity, FALSE if not */
+ int n_pe;
+ xmlChar * name; /* the name of the DTD entity */
+ int n_name;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+ xmlChar * ndataid; /* the xml notation name. */
+ int n_ndataid;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ pe = gen_int(n_pe, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 3);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 4);
+ ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);
+
+ ret_val = xmlTextWriterWriteDTDExternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_int(n_pe, pe, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);
+ des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_pe);
+ printf(" %d", n_name);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf(" %d", n_ndataid);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDExternalEntityContents(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+ xmlChar * ndataid; /* the xml notation name. */
+ int n_ndataid;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 1);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 2);
+ ndataid = gen_const_xmlChar_ptr(n_ndataid, 3);
+
+ ret_val = xmlTextWriterWriteDTDExternalEntityContents(writer, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 1);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 2);
+ des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDExternalEntityContents",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf(" %d", n_ndataid);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDInternalEntity(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ int pe; /* TRUE if this is a parameter entity, FALSE if not */
+ int n_pe;
+ xmlChar * name; /* the name of the DTD entity */
+ int n_name;
+ xmlChar * content; /* content of the entity */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ pe = gen_int(n_pe, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ content = gen_const_xmlChar_ptr(n_content, 3);
+
+ ret_val = xmlTextWriterWriteDTDInternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_int(n_pe, pe, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDInternalEntity",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_pe);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteDTDNotation(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* the name of the xml notation */
+ int n_name;
+ xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */
+ int n_pubid;
+ xmlChar * sysid; /* the system identifier, which is the URI of the DTD */
+ int n_sysid;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {
+ for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ pubid = gen_const_xmlChar_ptr(n_pubid, 2);
+ sysid = gen_const_xmlChar_ptr(n_sysid, 3);
+
+ ret_val = xmlTextWriterWriteDTDNotation(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);
+ des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteDTDNotation",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_pubid);
+ printf(" %d", n_sysid);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteElement(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * name; /* element name */
+ int n_name;
+ xmlChar * content; /* element content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlTextWriterWriteElement(writer, (const xmlChar *)name, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteElement",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_name);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteElementNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * prefix; /* namespace prefix */
+ int n_prefix;
+ xmlChar * name; /* element local name */
+ int n_name;
+ xmlChar * namespaceURI; /* namespace URI */
+ int n_namespaceURI;
+ xmlChar * content; /* element content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ name = gen_const_xmlChar_ptr(n_name, 2);
+ namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);
+ content = gen_const_xmlChar_ptr(n_content, 4);
+
+ ret_val = xmlTextWriterWriteElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);
+ des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteElementNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_prefix);
+ printf(" %d", n_name);
+ printf(" %d", n_namespaceURI);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatAttribute(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatAttributeNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatCDATA(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatComment(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatDTD(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatDTDAttlist(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatDTDElement(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatDTDInternalEntity(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatElement(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatElementNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatPI(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatRaw(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteFormatString(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWritePI(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * target; /* PI target */
+ int n_target;
+ xmlChar * content; /* PI content */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ target = gen_const_xmlChar_ptr(n_target, 1);
+ content = gen_const_xmlChar_ptr(n_content, 2);
+
+ ret_val = xmlTextWriterWritePI(writer, (const xmlChar *)target, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWritePI",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_target);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteRaw(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * content; /* text string */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlTextWriterWriteRaw(writer, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteRaw",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteRawLen(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * content; /* text string */
+ int n_content;
+ int len; /* length of the text string */
+ int n_len;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ for (n_len = 0;n_len < gen_nb_int;n_len++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+ len = gen_int(n_len, 2);
+
+ ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ des_int(n_len, len, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteRawLen",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_content);
+ printf(" %d", n_len);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+ int n_writer;
+ xmlChar * content; /* text string */
+ int n_content;
+
+ for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+ for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {
+ mem_base = xmlMemBlocks();
+ writer = gen_xmlTextWriterPtr(n_writer, 0);
+ content = gen_const_xmlChar_ptr(n_content, 1);
+
+ ret_val = xmlTextWriterWriteString(writer, (const xmlChar *)content);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlTextWriterPtr(n_writer, writer, 0);
+ des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlTextWriterWriteString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_writer);
+ printf(" %d", n_content);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatAttribute(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatAttributeNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatCDATA(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatComment(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatDTD(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatDTDAttlist(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatDTDElement(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatDTDInternalEntity(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatElement(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatElementNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatPI(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatRaw(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlTextWriterWriteVFormatString(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+static int
+test_xmlwriter(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
+ test_ret += test_xmlNewTextWriter();
+ test_ret += test_xmlNewTextWriterFilename();
+ test_ret += test_xmlNewTextWriterMemory();
+ test_ret += test_xmlNewTextWriterPushParser();
+ test_ret += test_xmlNewTextWriterTree();
+ test_ret += test_xmlTextWriterEndAttribute();
+ test_ret += test_xmlTextWriterEndCDATA();
+ test_ret += test_xmlTextWriterEndComment();
+ test_ret += test_xmlTextWriterEndDTD();
+ test_ret += test_xmlTextWriterEndDTDAttlist();
+ test_ret += test_xmlTextWriterEndDTDElement();
+ test_ret += test_xmlTextWriterEndDTDEntity();
+ test_ret += test_xmlTextWriterEndDocument();
+ test_ret += test_xmlTextWriterEndElement();
+ test_ret += test_xmlTextWriterEndPI();
+ test_ret += test_xmlTextWriterFlush();
+ test_ret += test_xmlTextWriterFullEndElement();
+ test_ret += test_xmlTextWriterSetIndent();
+ test_ret += test_xmlTextWriterSetIndentString();
+ test_ret += test_xmlTextWriterSetQuoteChar();
+ test_ret += test_xmlTextWriterStartAttribute();
+ test_ret += test_xmlTextWriterStartAttributeNS();
+ test_ret += test_xmlTextWriterStartCDATA();
+ test_ret += test_xmlTextWriterStartComment();
+ test_ret += test_xmlTextWriterStartDTD();
+ test_ret += test_xmlTextWriterStartDTDAttlist();
+ test_ret += test_xmlTextWriterStartDTDElement();
+ test_ret += test_xmlTextWriterStartDTDEntity();
+ test_ret += test_xmlTextWriterStartDocument();
+ test_ret += test_xmlTextWriterStartElement();
+ test_ret += test_xmlTextWriterStartElementNS();
+ test_ret += test_xmlTextWriterStartPI();
+ test_ret += test_xmlTextWriterWriteAttribute();
+ test_ret += test_xmlTextWriterWriteAttributeNS();
+ test_ret += test_xmlTextWriterWriteBase64();
+ test_ret += test_xmlTextWriterWriteBinHex();
+ test_ret += test_xmlTextWriterWriteCDATA();
+ test_ret += test_xmlTextWriterWriteComment();
+ test_ret += test_xmlTextWriterWriteDTD();
+ test_ret += test_xmlTextWriterWriteDTDAttlist();
+ test_ret += test_xmlTextWriterWriteDTDElement();
+ test_ret += test_xmlTextWriterWriteDTDEntity();
+ test_ret += test_xmlTextWriterWriteDTDExternalEntity();
+ test_ret += test_xmlTextWriterWriteDTDExternalEntityContents();
+ test_ret += test_xmlTextWriterWriteDTDInternalEntity();
+ test_ret += test_xmlTextWriterWriteDTDNotation();
+ test_ret += test_xmlTextWriterWriteElement();
+ test_ret += test_xmlTextWriterWriteElementNS();
+ test_ret += test_xmlTextWriterWriteFormatAttribute();
+ test_ret += test_xmlTextWriterWriteFormatAttributeNS();
+ test_ret += test_xmlTextWriterWriteFormatCDATA();
+ test_ret += test_xmlTextWriterWriteFormatComment();
+ test_ret += test_xmlTextWriterWriteFormatDTD();
+ test_ret += test_xmlTextWriterWriteFormatDTDAttlist();
+ test_ret += test_xmlTextWriterWriteFormatDTDElement();
+ test_ret += test_xmlTextWriterWriteFormatDTDInternalEntity();
+ test_ret += test_xmlTextWriterWriteFormatElement();
+ test_ret += test_xmlTextWriterWriteFormatElementNS();
+ test_ret += test_xmlTextWriterWriteFormatPI();
+ test_ret += test_xmlTextWriterWriteFormatRaw();
+ test_ret += test_xmlTextWriterWriteFormatString();
+ test_ret += test_xmlTextWriterWritePI();
+ test_ret += test_xmlTextWriterWriteRaw();
+ test_ret += test_xmlTextWriterWriteRawLen();
+ test_ret += test_xmlTextWriterWriteString();
+ test_ret += test_xmlTextWriterWriteVFormatAttribute();
+ test_ret += test_xmlTextWriterWriteVFormatAttributeNS();
+ test_ret += test_xmlTextWriterWriteVFormatCDATA();
+ test_ret += test_xmlTextWriterWriteVFormatComment();
+ test_ret += test_xmlTextWriterWriteVFormatDTD();
+ test_ret += test_xmlTextWriterWriteVFormatDTDAttlist();
+ test_ret += test_xmlTextWriterWriteVFormatDTDElement();
+ test_ret += test_xmlTextWriterWriteVFormatDTDInternalEntity();
+ test_ret += test_xmlTextWriterWriteVFormatElement();
+ test_ret += test_xmlTextWriterWriteVFormatElementNS();
+ test_ret += test_xmlTextWriterWriteVFormatPI();
+ test_ret += test_xmlTextWriterWriteVFormatRaw();
+ test_ret += test_xmlTextWriterWriteVFormatString();
+
+ if (test_ret != 0)
+ printf("Module xmlwriter: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlXPathCastBooleanToNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ int val; /* a boolean */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlXPathCastBooleanToNumber(val);
+ desret_double(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastBooleanToNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastBooleanToString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ int val; /* a boolean */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlXPathCastBooleanToString(val);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastBooleanToString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNodeSetToBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr ns; /* a node-set */
+ int n_ns;
+
+ for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ ns = gen_xmlNodeSetPtr(n_ns, 0);
+
+ ret_val = xmlXPathCastNodeSetToBoolean(ns);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_ns, ns, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNodeSetToBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNodeSetToNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlNodeSetPtr ns; /* a node-set */
+ int n_ns;
+
+ for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ ns = gen_xmlNodeSetPtr(n_ns, 0);
+
+ ret_val = xmlXPathCastNodeSetToNumber(ns);
+ desret_double(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_ns, ns, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNodeSetToNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNodeSetToString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNodeSetPtr ns; /* a node-set */
+ int n_ns;
+
+ for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ ns = gen_xmlNodeSetPtr(n_ns, 0);
+
+ ret_val = xmlXPathCastNodeSetToString(ns);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_ns, ns, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNodeSetToString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNodeToNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlXPathCastNodeToNumber(node);
+ desret_double(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNodeToNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNodeToString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+
+ ret_val = xmlXPathCastNodeToString(node);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNodeToString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNumberToBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ double val; /* a number */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_double;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_double(n_val, 0);
+
+ ret_val = xmlXPathCastNumberToBoolean(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_double(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNumberToBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastNumberToString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ double val; /* a number */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_double;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_double(n_val, 0);
+
+ ret_val = xmlXPathCastNumberToString(val);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_double(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastNumberToString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastStringToBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * val; /* a string */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_const_xmlChar_ptr(n_val, 0);
+
+ ret_val = xmlXPathCastStringToBoolean((const xmlChar *)val);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastStringToBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastStringToNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlChar * val; /* a string */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_const_xmlChar_ptr(n_val, 0);
+
+ ret_val = xmlXPathCastStringToNumber((const xmlChar *)val);
+ desret_double(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastStringToNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastToBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathCastToBoolean(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastToBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastToNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathCastToNumber(val);
+ desret_double(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastToNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCastToString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathCastToString(val);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCastToString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCmpNodes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node1; /* the first node */
+ int n_node1;
+ xmlNodePtr node2; /* the second node */
+ int n_node2;
+
+ for (n_node1 = 0;n_node1 < gen_nb_xmlNodePtr;n_node1++) {
+ for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++) {
+ mem_base = xmlMemBlocks();
+ node1 = gen_xmlNodePtr(n_node1, 0);
+ node2 = gen_xmlNodePtr(n_node2, 1);
+
+ ret_val = xmlXPathCmpNodes(node1, node2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node1, node1, 0);
+ des_xmlNodePtr(n_node2, node2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCmpNodes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node1);
+ printf(" %d", n_node2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCompile(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#define gen_nb_xmlXPathCompExprPtr 1
+static xmlXPathCompExprPtr gen_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, xmlXPathCompExprPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#define gen_nb_xmlXPathContextPtr 1
+static xmlXPathContextPtr gen_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlXPathCompiledEval(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathCompExprPtr comp; /* the compiled XPath expression */
+ int n_comp;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlXPathCompExprPtr(n_comp, 0);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 1);
+
+ ret_val = xmlXPathCompiledEval(comp, ctx);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathCompExprPtr(n_comp, comp, 0);
+ des_xmlXPathContextPtr(n_ctx, ctx, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCompiledEval",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCompiledEvalToBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathCompExprPtr comp; /* the compiled XPath expression */
+ int n_comp;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ comp = gen_xmlXPathCompExprPtr(n_comp, 0);
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
+
+ ret_val = xmlXPathCompiledEvalToBoolean(comp, ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathCompExprPtr(n_comp, comp, 0);
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCompiledEvalToBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_comp);
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathContextSetCache(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ int active; /* enables/disables (creates/frees) the cache */
+ int n_active;
+ int value; /* a value with semantics dependant on @options */
+ int n_value;
+ int options; /* options (currently only the value 0 is used) */
+ int n_options;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_active = 0;n_active < gen_nb_int;n_active++) {
+ for (n_value = 0;n_value < gen_nb_int;n_value++) {
+ for (n_options = 0;n_options < gen_nb_int;n_options++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ active = gen_int(n_active, 1);
+ value = gen_int(n_value, 2);
+ options = gen_int(n_options, 3);
+
+ ret_val = xmlXPathContextSetCache(ctxt, active, value, options);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_active, active, 1);
+ des_int(n_value, value, 2);
+ des_int(n_options, options, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathContextSetCache",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_active);
+ printf(" %d", n_value);
+ printf(" %d", n_options);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathConvertBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathConvertBoolean(val);
+ val = NULL;
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathConvertBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathConvertNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathConvertNumber(val);
+ val = NULL;
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathConvertNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathConvertString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr val; /* an XPath object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathConvertString(val);
+ val = NULL;
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathConvertString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCtxtCompile(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEval(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlChar * str; /* the XPath expression */
+ int n_str;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 1);
+
+ ret_val = xmlXPathEval((const xmlChar *)str, ctx);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_xmlXPathContextPtr(n_ctx, ctx, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEval",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEvalExpression(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlChar * str; /* the XPath expression */
+ int n_str;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 1);
+
+ ret_val = xmlXPathEvalExpression((const xmlChar *)str, ctxt);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEvalExpression",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEvalPredicate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
+ int n_res;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ res = gen_xmlXPathObjectPtr(n_res, 1);
+
+ ret_val = xmlXPathEvalPredicate(ctxt, res);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_xmlXPathObjectPtr(n_res, res, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEvalPredicate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_res);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathInit(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+
+ mem_base = xmlMemBlocks();
+
+ xmlXPathInit();
+ call_tests++;
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathInit",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf("\n");
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathIsInf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ double val; /* a double value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_double;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_double(n_val, 0);
+
+ ret_val = xmlXPathIsInf(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_double(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathIsInf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathIsNaN(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+ int mem_base;
+ int ret_val;
+ double val; /* a double value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_double;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_double(n_val, 0);
+
+ ret_val = xmlXPathIsNaN(val);
+ desret_int(ret_val);
+ call_tests++;
+ des_double(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathIsNaN",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewContext(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeEval(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr node; /* the node to to use as the context node */
+ int n_node;
+ xmlChar * str; /* the XPath expression */
+ int n_str;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ str = gen_const_xmlChar_ptr(n_str, 1);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 2);
+
+ ret_val = xmlXPathNodeEval(node, (const xmlChar *)str, ctx);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);
+ des_xmlXPathContextPtr(n_ctx, ctx, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeEval",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_str);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetCreate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodePtr val; /* an initial xmlNodePtr, or NULL */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlNodePtr(n_val, 0);
+
+ ret_val = xmlXPathNodeSetCreate(val);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetCreate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathObjectCopy(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr val; /* the original object */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlXPathObjectPtr(n_val, 0);
+
+ ret_val = xmlXPathObjectCopy(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathObjectCopy",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathOrderDocElems(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ long ret_val;
+ xmlDocPtr doc; /* an input document */
+ int n_doc;
+
+ for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {
+ mem_base = xmlMemBlocks();
+ doc = gen_xmlDocPtr(n_doc, 0);
+
+ ret_val = xmlXPathOrderDocElems(doc);
+ desret_long(ret_val);
+ call_tests++;
+ des_xmlDocPtr(n_doc, doc, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathOrderDocElems",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_doc);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSetContextNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodePtr node; /* the node to to use as the context node */
+ int n_node;
+ xmlXPathContextPtr ctx; /* the XPath context */
+ int n_ctx;
+
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ node = gen_xmlNodePtr(n_node, 0);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 1);
+
+ ret_val = xmlXPathSetContextNode(node, ctx);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_node, node, 0);
+ des_xmlXPathContextPtr(n_ctx, ctx, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSetContextNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_node);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xpath(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xpath : 32 of 40 functions ...\n");
+ test_ret += test_xmlXPathCastBooleanToNumber();
+ test_ret += test_xmlXPathCastBooleanToString();
+ test_ret += test_xmlXPathCastNodeSetToBoolean();
+ test_ret += test_xmlXPathCastNodeSetToNumber();
+ test_ret += test_xmlXPathCastNodeSetToString();
+ test_ret += test_xmlXPathCastNodeToNumber();
+ test_ret += test_xmlXPathCastNodeToString();
+ test_ret += test_xmlXPathCastNumberToBoolean();
+ test_ret += test_xmlXPathCastNumberToString();
+ test_ret += test_xmlXPathCastStringToBoolean();
+ test_ret += test_xmlXPathCastStringToNumber();
+ test_ret += test_xmlXPathCastToBoolean();
+ test_ret += test_xmlXPathCastToNumber();
+ test_ret += test_xmlXPathCastToString();
+ test_ret += test_xmlXPathCmpNodes();
+ test_ret += test_xmlXPathCompile();
+ test_ret += test_xmlXPathCompiledEval();
+ test_ret += test_xmlXPathCompiledEvalToBoolean();
+ test_ret += test_xmlXPathContextSetCache();
+ test_ret += test_xmlXPathConvertBoolean();
+ test_ret += test_xmlXPathConvertNumber();
+ test_ret += test_xmlXPathConvertString();
+ test_ret += test_xmlXPathCtxtCompile();
+ test_ret += test_xmlXPathEval();
+ test_ret += test_xmlXPathEvalExpression();
+ test_ret += test_xmlXPathEvalPredicate();
+ test_ret += test_xmlXPathInit();
+ test_ret += test_xmlXPathIsInf();
+ test_ret += test_xmlXPathIsNaN();
+ test_ret += test_xmlXPathNewContext();
+ test_ret += test_xmlXPathNodeEval();
+ test_ret += test_xmlXPathNodeSetCreate();
+ test_ret += test_xmlXPathObjectCopy();
+ test_ret += test_xmlXPathOrderDocElems();
+ test_ret += test_xmlXPathSetContextNode();
+
+ if (test_ret != 0)
+ printf("Module xpath: %d errors\n", test_ret);
+ return(test_ret);
+}
+#ifdef LIBXML_XPATH_ENABLED
+
+#define gen_nb_xmlXPathParserContextPtr 1
+static xmlXPathParserContextPtr gen_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathParserContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_valuePop(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = valuePop(ctxt);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in valuePop",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_valuePush(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath evaluation context */
+ int n_ctxt;
+ xmlXPathObjectPtr value; /* the XPath object */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ value = gen_xmlXPathObjectPtr(n_value, 1);
+
+ ret_val = valuePush(ctxt, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlXPathObjectPtr(n_value, value, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in valuePush",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathAddValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathAddValues(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathAddValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathBooleanFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathBooleanFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathBooleanFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCeilingFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathCeilingFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCeilingFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCompareValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int inf; /* less than (1) or greater than (0) */
+ int n_inf;
+ int strict; /* is the comparison strict */
+ int n_strict;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_inf = 0;n_inf < gen_nb_int;n_inf++) {
+ for (n_strict = 0;n_strict < gen_nb_int;n_strict++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ inf = gen_int(n_inf, 1);
+ strict = gen_int(n_strict, 2);
+
+ ret_val = xmlXPathCompareValues(ctxt, inf, strict);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_inf, inf, 1);
+ des_int(n_strict, strict, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCompareValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_inf);
+ printf(" %d", n_strict);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathConcatFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathConcatFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathConcatFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathContainsFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathContainsFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathContainsFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathCountFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathCountFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathCountFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDebugDumpCompExpr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * for the output */
+ int n_output;
+ xmlXPathCompExprPtr comp; /* the precompiled XPath expression */
+ int n_comp;
+ int depth; /* the indentation level. */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_comp = 0;n_comp < gen_nb_xmlXPathCompExprPtr;n_comp++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ comp = gen_xmlXPathCompExprPtr(n_comp, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlXPathDebugDumpCompExpr(output, comp, depth);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlXPathCompExprPtr(n_comp, comp, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDebugDumpCompExpr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_comp);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDebugDumpObject(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_DEBUG_ENABLED)
+ int mem_base;
+ FILE * output; /* the FILE * to dump the output */
+ int n_output;
+ xmlXPathObjectPtr cur; /* the object to inspect */
+ int n_cur;
+ int depth; /* indentation level */
+ int n_depth;
+
+ for (n_output = 0;n_output < gen_nb_FILE_ptr;n_output++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlXPathObjectPtr;n_cur++) {
+ for (n_depth = 0;n_depth < gen_nb_int;n_depth++) {
+ mem_base = xmlMemBlocks();
+ output = gen_FILE_ptr(n_output, 0);
+ cur = gen_xmlXPathObjectPtr(n_cur, 1);
+ depth = gen_int(n_depth, 2);
+
+ xmlXPathDebugDumpObject(output, cur, depth);
+ call_tests++;
+ des_FILE_ptr(n_output, output, 0);
+ des_xmlXPathObjectPtr(n_cur, cur, 1);
+ des_int(n_depth, depth, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDebugDumpObject",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_output);
+ printf(" %d", n_cur);
+ printf(" %d", n_depth);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDifference(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathDifference(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDifference",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDistinct(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set */
+ int n_nodes;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+
+ ret_val = xmlXPathDistinct(nodes);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDistinct",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDistinctSorted(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
+ int n_nodes;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+
+ ret_val = xmlXPathDistinctSorted(nodes);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDistinctSorted",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathDivValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathDivValues(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathDivValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEqualValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathEqualValues(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEqualValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathErr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* a XPath parser context */
+ int n_ctxt;
+ int error; /* the error code */
+ int n_error;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_error = 0;n_error < gen_nb_int;n_error++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ error = gen_int(n_error, 1);
+
+ xmlXPathErr(ctxt, error);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_error, error, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathErr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_error);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEvalExpr(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathEvalExpr(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEvalExpr",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathEvaluatePredicateResult(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlXPathObjectPtr res; /* the Predicate Expression evaluation result */
+ int n_res;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_res = 0;n_res < gen_nb_xmlXPathObjectPtr;n_res++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ res = gen_xmlXPathObjectPtr(n_res, 1);
+
+ ret_val = xmlXPathEvaluatePredicateResult(ctxt, res);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlXPathObjectPtr(n_res, res, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathEvaluatePredicateResult",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_res);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathFalseFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathFalseFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathFalseFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathFloorFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathFloorFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathFloorFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathFunctionLookup(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathFunctionLookupNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathHasSameNodes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathHasSameNodes(nodes1, nodes2);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathHasSameNodes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathIdFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathIdFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathIdFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathIntersection(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathIntersection(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathIntersection",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathIsNodeType(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlChar * name; /* a name string */
+ int n_name;
+
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ name = gen_const_xmlChar_ptr(n_name, 0);
+
+ ret_val = xmlXPathIsNodeType((const xmlChar *)name);
+ desret_int(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathIsNodeType",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathLangFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathLangFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathLangFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathLastFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathLastFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathLastFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathLeading(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathLeading(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathLeading",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathLeadingSorted(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathLeadingSorted(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathLeadingSorted",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathLocalNameFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathLocalNameFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathLocalNameFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathModValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathModValues(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathModValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathMultValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathMultValues(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathMultValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNamespaceURIFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathNamespaceURIFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNamespaceURIFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ int val; /* the boolean value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_int(n_val, 0);
+
+ ret_val = xmlXPathNewBoolean(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_int(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewCString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ char * val; /* the char * value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_const_char_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_const_char_ptr(n_val, 0);
+
+ ret_val = xmlXPathNewCString((const char *)val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_const_char_ptr(n_val, (const char *)val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewCString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewFloat(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ double val; /* the double value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_double;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_double(n_val, 0);
+
+ ret_val = xmlXPathNewFloat(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_double(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewFloat",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewNodeSet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr val; /* the NodePtr value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlNodePtr(n_val, 0);
+
+ ret_val = xmlXPathNewNodeSet(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewNodeSet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewNodeSetList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodeSetPtr val; /* an existing NodeSet */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlNodeSetPtr(n_val, 0);
+
+ ret_val = xmlXPathNewNodeSetList(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewNodeSetList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewParserContext(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNewString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlChar * val; /* the xmlChar * value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_const_xmlChar_ptr(n_val, 0);
+
+ ret_val = xmlXPathNewString((const xmlChar *)val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_val, (const xmlChar *)val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNewString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextAncestor(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextAncestor(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextAncestor",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextAncestorOrSelf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextAncestorOrSelf(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextAncestorOrSelf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextAttribute(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current attribute in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextAttribute(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextAttribute",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextChild(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextChild(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextChild",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextDescendant(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextDescendant(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextDescendant",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextDescendantOrSelf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextDescendantOrSelf(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextDescendantOrSelf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextFollowing(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextFollowing(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextFollowing",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextFollowingSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextFollowingSibling(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextFollowingSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextNamespace(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current attribute in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextNamespace(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextNamespace",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextParent(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextParent(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextParent",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextPreceding(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextPreceding(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextPreceding",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextPrecedingSibling(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextPrecedingSibling(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextPrecedingSibling",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNextSelf(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ xmlNodePtr cur; /* the current node in the traversal */
+ int n_cur;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ cur = gen_xmlNodePtr(n_cur, 1);
+
+ ret_val = xmlXPathNextSelf(ctxt, cur);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_xmlNodePtr(n_cur, cur, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNextSelf",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_cur);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeLeading(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set */
+ int n_nodes;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlXPathNodeLeading(nodes, node);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeLeading",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeLeadingSorted(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
+ int n_nodes;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlXPathNodeLeadingSorted(nodes, node);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeLeadingSorted",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetAdd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr cur; /* the initial node set */
+ int n_cur;
+ xmlNodePtr val; /* a new xmlNodePtr */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ val = gen_xmlNodePtr(n_val, 1);
+
+ ret_val = xmlXPathNodeSetAdd(cur, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_xmlNodePtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetAdd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetAddNs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr cur; /* the initial node set */
+ int n_cur;
+ xmlNodePtr node; /* the hosting node */
+ int n_node;
+ xmlNsPtr ns; /* a the namespace node */
+ int n_ns;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ for (n_ns = 0;n_ns < gen_nb_xmlNsPtr;n_ns++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+ ns = gen_xmlNsPtr(n_ns, 2);
+
+ ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ des_xmlNsPtr(n_ns, ns, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetAddNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_node);
+ printf(" %d", n_ns);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetAddUnique(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr cur; /* the initial node set */
+ int n_cur;
+ xmlNodePtr val; /* a new xmlNodePtr */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ val = gen_xmlNodePtr(n_val, 1);
+
+ ret_val = xmlXPathNodeSetAddUnique(cur, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_xmlNodePtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetAddUnique",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetContains(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlNodeSetPtr cur; /* the node-set */
+ int n_cur;
+ xmlNodePtr val; /* the node */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ val = gen_xmlNodePtr(n_val, 1);
+
+ ret_val = xmlXPathNodeSetContains(cur, val);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_xmlNodePtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetContains",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetDel(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr cur; /* the initial node set */
+ int n_cur;
+ xmlNodePtr val; /* an xmlNodePtr */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlNodePtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ val = gen_xmlNodePtr(n_val, 1);
+
+ xmlXPathNodeSetDel(cur, val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_xmlNodePtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetDel",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetMerge(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr val1; /* the first NodeSet or NULL */
+ int n_val1;
+ xmlNodeSetPtr val2; /* the second NodeSet */
+ int n_val2;
+
+ for (n_val1 = 0;n_val1 < gen_nb_xmlNodeSetPtr;n_val1++) {
+ for (n_val2 = 0;n_val2 < gen_nb_xmlNodeSetPtr;n_val2++) {
+ mem_base = xmlMemBlocks();
+ val1 = gen_xmlNodeSetPtr(n_val1, 0);
+ val2 = gen_xmlNodeSetPtr(n_val2, 1);
+
+ ret_val = xmlXPathNodeSetMerge(val1, val2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_val1, val1, 0);
+ des_xmlNodeSetPtr(n_val2, val2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetMerge",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val1);
+ printf(" %d", n_val2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetRemove(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr cur; /* the initial node set */
+ int n_cur;
+ int val; /* the index to remove */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlNodeSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlNodeSetPtr(n_cur, 0);
+ val = gen_int(n_val, 1);
+
+ xmlXPathNodeSetRemove(cur, val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_cur, cur, 0);
+ des_int(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetRemove",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeSetSort(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr set; /* the node set */
+ int n_set;
+
+ for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
+ mem_base = xmlMemBlocks();
+ set = gen_xmlNodeSetPtr(n_set, 0);
+
+ xmlXPathNodeSetSort(set);
+ call_tests++;
+ des_xmlNodeSetPtr(n_set, set, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeSetSort",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_set);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeTrailing(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set */
+ int n_nodes;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlXPathNodeTrailing(nodes, node);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeTrailing",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNodeTrailingSorted(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes; /* a node-set, sorted by document order */
+ int n_nodes;
+ xmlNodePtr node; /* a node */
+ int n_node;
+
+ for (n_nodes = 0;n_nodes < gen_nb_xmlNodeSetPtr;n_nodes++) {
+ for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {
+ mem_base = xmlMemBlocks();
+ nodes = gen_xmlNodeSetPtr(n_nodes, 0);
+ node = gen_xmlNodePtr(n_node, 1);
+
+ ret_val = xmlXPathNodeTrailingSorted(nodes, node);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes, nodes, 0);
+ des_xmlNodePtr(n_node, node, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNodeTrailingSorted",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes);
+ printf(" %d", n_node);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNormalizeFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathNormalizeFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNormalizeFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNotEqualValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathNotEqualValues(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNotEqualValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNotFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathNotFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNotFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNsLookup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ const xmlChar * ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * prefix; /* the namespace prefix value */
+ int n_prefix;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+
+ ret_val = xmlXPathNsLookup(ctxt, (const xmlChar *)prefix);
+ desret_const_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNsLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_prefix);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathNumberFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathNumberFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathNumberFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathParseNCName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathParseNCName(ctxt);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathParseNCName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathParseName(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathParseName(ctxt);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathParseName",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPopBoolean(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathPopBoolean(ctxt);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPopBoolean",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPopExternal(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ void * ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathPopExternal(ctxt);
+ desret_void_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPopExternal",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPopNodeSet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathPopNodeSet(ctxt);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPopNodeSet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPopNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathPopNumber(ctxt);
+ desret_double(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPopNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPopString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlChar * ret_val;
+ xmlXPathParserContextPtr ctxt; /* an XPath parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ ret_val = xmlXPathPopString(ctxt);
+ desret_xmlChar_ptr(ret_val);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPopString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathPositionFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathPositionFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathPositionFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterAllFunctions(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+
+ xmlXPathRegisterAllFunctions(ctxt);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisterAllFunctions",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterFunc(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterFuncLookup(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterFuncNS(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterNs(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * prefix; /* the namespace prefix cannot be NULL or empty string */
+ int n_prefix;
+ xmlChar * ns_uri; /* the namespace name */
+ int n_ns_uri;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {
+ for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ prefix = gen_const_xmlChar_ptr(n_prefix, 1);
+ ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
+
+ ret_val = xmlXPathRegisterNs(ctxt, (const xmlChar *)prefix, (const xmlChar *)ns_uri);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);
+ des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisterNs",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_prefix);
+ printf(" %d", n_ns_uri);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterVariable(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * name; /* the variable name */
+ int n_name;
+ xmlXPathObjectPtr value; /* the variable value or NULL */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ value = gen_xmlXPathObjectPtr(n_value, 2);
+
+ ret_val = xmlXPathRegisterVariable(ctxt, (const xmlChar *)name, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_xmlXPathObjectPtr(n_value, value, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisterVariable",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterVariableLookup(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisterVariableNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ int ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * name; /* the variable name */
+ int n_name;
+ xmlChar * ns_uri; /* the variable namespace URI */
+ int n_ns_uri;
+ xmlXPathObjectPtr value; /* the variable value or NULL */
+ int n_value;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
+ for (n_value = 0;n_value < gen_nb_xmlXPathObjectPtr;n_value++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
+ value = gen_xmlXPathObjectPtr(n_value, 3);
+
+ ret_val = xmlXPathRegisterVariableNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri, value);
+ desret_int(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
+ des_xmlXPathObjectPtr(n_value, value, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisterVariableNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_ns_uri);
+ printf(" %d", n_value);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisteredFuncsCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+
+ xmlXPathRegisteredFuncsCleanup(ctxt);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisteredFuncsCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisteredNsCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+
+ xmlXPathRegisteredNsCleanup(ctxt);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisteredNsCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRegisteredVariablesCleanup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+
+ xmlXPathRegisteredVariablesCleanup(ctxt);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRegisteredVariablesCleanup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRoot(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathRoot(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRoot",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathRoundFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathRoundFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathRoundFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathStartsWithFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathStartsWithFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathStartsWithFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathStringEvalNumber(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ double ret_val;
+ xmlChar * str; /* A string to scan */
+ int n_str;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+
+ ret_val = xmlXPathStringEvalNumber((const xmlChar *)str);
+ desret_double(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathStringEvalNumber",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathStringFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathStringFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathStringFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathStringLengthFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathStringLengthFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathStringLengthFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSubValues(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathSubValues(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSubValues",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSubstringAfterFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathSubstringAfterFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSubstringAfterFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSubstringBeforeFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathSubstringBeforeFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSubstringBeforeFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSubstringFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathSubstringFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSubstringFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathSumFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathSumFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathSumFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathTrailing(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathTrailing(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathTrailing",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathTrailingSorted(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlNodeSetPtr ret_val;
+ xmlNodeSetPtr nodes1; /* a node-set, sorted by document order */
+ int n_nodes1;
+ xmlNodeSetPtr nodes2; /* a node-set, sorted by document order */
+ int n_nodes2;
+
+ for (n_nodes1 = 0;n_nodes1 < gen_nb_xmlNodeSetPtr;n_nodes1++) {
+ for (n_nodes2 = 0;n_nodes2 < gen_nb_xmlNodeSetPtr;n_nodes2++) {
+ mem_base = xmlMemBlocks();
+ nodes1 = gen_xmlNodeSetPtr(n_nodes1, 0);
+ nodes2 = gen_xmlNodeSetPtr(n_nodes2, 1);
+
+ ret_val = xmlXPathTrailingSorted(nodes1, nodes2);
+ desret_xmlNodeSetPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_nodes1, nodes1, 0);
+ des_xmlNodeSetPtr(n_nodes2, nodes2, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathTrailingSorted",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_nodes1);
+ printf(" %d", n_nodes2);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathTranslateFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathTranslateFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathTranslateFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathTrueFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ int nargs; /* the number of arguments */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPathTrueFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathTrueFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathValueFlipSign(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPathValueFlipSign(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathValueFlipSign",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathVariableLookup(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * name; /* the variable name */
+ int n_name;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+
+ ret_val = xmlXPathVariableLookup(ctxt, (const xmlChar *)name);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathVariableLookup",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathVariableLookupNS(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathContextPtr ctxt; /* the XPath context */
+ int n_ctxt;
+ xmlChar * name; /* the variable name */
+ int n_name;
+ xmlChar * ns_uri; /* the variable namespace URI */
+ int n_ns_uri;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathContextPtr;n_ctxt++) {
+ for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {
+ for (n_ns_uri = 0;n_ns_uri < gen_nb_const_xmlChar_ptr;n_ns_uri++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathContextPtr(n_ctxt, 0);
+ name = gen_const_xmlChar_ptr(n_name, 1);
+ ns_uri = gen_const_xmlChar_ptr(n_ns_uri, 2);
+
+ ret_val = xmlXPathVariableLookupNS(ctxt, (const xmlChar *)name, (const xmlChar *)ns_uri);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathContextPtr(n_ctxt, ctxt, 0);
+ des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);
+ des_const_xmlChar_ptr(n_ns_uri, (const xmlChar *)ns_uri, 2);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathVariableLookupNS",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_name);
+ printf(" %d", n_ns_uri);
+ printf("\n");
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathWrapCString(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ char * val; /* the char * value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_char_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_char_ptr(n_val, 0);
+
+ ret_val = xmlXPathWrapCString(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_char_ptr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathWrapCString",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathWrapExternal(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ void * val; /* the user data */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_void_ptr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_void_ptr(n_val, 0);
+
+ ret_val = xmlXPathWrapExternal(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_void_ptr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathWrapExternal",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPathWrapNodeSet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodeSetPtr val; /* the NodePtr value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlNodeSetPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlNodeSetPtr(n_val, 0);
+
+ ret_val = xmlXPathWrapNodeSet(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPathWrapNodeSet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPatherror(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPATH_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPath Parser context */
+ int n_ctxt;
+ const char * file; /* the file name */
+ int n_file;
+ int line; /* the line number */
+ int n_line;
+ int no; /* the error number */
+ int n_no;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_file = 0;n_file < gen_nb_filepath;n_file++) {
+ for (n_line = 0;n_line < gen_nb_int;n_line++) {
+ for (n_no = 0;n_no < gen_nb_int;n_no++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ file = gen_filepath(n_file, 1);
+ line = gen_int(n_line, 2);
+ no = gen_int(n_no, 3);
+
+ xmlXPatherror(ctxt, file, line, no);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_filepath(n_file, file, 1);
+ des_int(n_line, line, 2);
+ des_int(n_no, no, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPatherror",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_file);
+ printf(" %d", n_line);
+ printf(" %d", n_no);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xpathInternals(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xpathInternals : 106 of 117 functions ...\n");
+ test_ret += test_valuePop();
+ test_ret += test_valuePush();
+ test_ret += test_xmlXPathAddValues();
+ test_ret += test_xmlXPathBooleanFunction();
+ test_ret += test_xmlXPathCeilingFunction();
+ test_ret += test_xmlXPathCompareValues();
+ test_ret += test_xmlXPathConcatFunction();
+ test_ret += test_xmlXPathContainsFunction();
+ test_ret += test_xmlXPathCountFunction();
+ test_ret += test_xmlXPathDebugDumpCompExpr();
+ test_ret += test_xmlXPathDebugDumpObject();
+ test_ret += test_xmlXPathDifference();
+ test_ret += test_xmlXPathDistinct();
+ test_ret += test_xmlXPathDistinctSorted();
+ test_ret += test_xmlXPathDivValues();
+ test_ret += test_xmlXPathEqualValues();
+ test_ret += test_xmlXPathErr();
+ test_ret += test_xmlXPathEvalExpr();
+ test_ret += test_xmlXPathEvaluatePredicateResult();
+ test_ret += test_xmlXPathFalseFunction();
+ test_ret += test_xmlXPathFloorFunction();
+ test_ret += test_xmlXPathFunctionLookup();
+ test_ret += test_xmlXPathFunctionLookupNS();
+ test_ret += test_xmlXPathHasSameNodes();
+ test_ret += test_xmlXPathIdFunction();
+ test_ret += test_xmlXPathIntersection();
+ test_ret += test_xmlXPathIsNodeType();
+ test_ret += test_xmlXPathLangFunction();
+ test_ret += test_xmlXPathLastFunction();
+ test_ret += test_xmlXPathLeading();
+ test_ret += test_xmlXPathLeadingSorted();
+ test_ret += test_xmlXPathLocalNameFunction();
+ test_ret += test_xmlXPathModValues();
+ test_ret += test_xmlXPathMultValues();
+ test_ret += test_xmlXPathNamespaceURIFunction();
+ test_ret += test_xmlXPathNewBoolean();
+ test_ret += test_xmlXPathNewCString();
+ test_ret += test_xmlXPathNewFloat();
+ test_ret += test_xmlXPathNewNodeSet();
+ test_ret += test_xmlXPathNewNodeSetList();
+ test_ret += test_xmlXPathNewParserContext();
+ test_ret += test_xmlXPathNewString();
+ test_ret += test_xmlXPathNextAncestor();
+ test_ret += test_xmlXPathNextAncestorOrSelf();
+ test_ret += test_xmlXPathNextAttribute();
+ test_ret += test_xmlXPathNextChild();
+ test_ret += test_xmlXPathNextDescendant();
+ test_ret += test_xmlXPathNextDescendantOrSelf();
+ test_ret += test_xmlXPathNextFollowing();
+ test_ret += test_xmlXPathNextFollowingSibling();
+ test_ret += test_xmlXPathNextNamespace();
+ test_ret += test_xmlXPathNextParent();
+ test_ret += test_xmlXPathNextPreceding();
+ test_ret += test_xmlXPathNextPrecedingSibling();
+ test_ret += test_xmlXPathNextSelf();
+ test_ret += test_xmlXPathNodeLeading();
+ test_ret += test_xmlXPathNodeLeadingSorted();
+ test_ret += test_xmlXPathNodeSetAdd();
+ test_ret += test_xmlXPathNodeSetAddNs();
+ test_ret += test_xmlXPathNodeSetAddUnique();
+ test_ret += test_xmlXPathNodeSetContains();
+ test_ret += test_xmlXPathNodeSetDel();
+ test_ret += test_xmlXPathNodeSetMerge();
+ test_ret += test_xmlXPathNodeSetRemove();
+ test_ret += test_xmlXPathNodeSetSort();
+ test_ret += test_xmlXPathNodeTrailing();
+ test_ret += test_xmlXPathNodeTrailingSorted();
+ test_ret += test_xmlXPathNormalizeFunction();
+ test_ret += test_xmlXPathNotEqualValues();
+ test_ret += test_xmlXPathNotFunction();
+ test_ret += test_xmlXPathNsLookup();
+ test_ret += test_xmlXPathNumberFunction();
+ test_ret += test_xmlXPathParseNCName();
+ test_ret += test_xmlXPathParseName();
+ test_ret += test_xmlXPathPopBoolean();
+ test_ret += test_xmlXPathPopExternal();
+ test_ret += test_xmlXPathPopNodeSet();
+ test_ret += test_xmlXPathPopNumber();
+ test_ret += test_xmlXPathPopString();
+ test_ret += test_xmlXPathPositionFunction();
+ test_ret += test_xmlXPathRegisterAllFunctions();
+ test_ret += test_xmlXPathRegisterFunc();
+ test_ret += test_xmlXPathRegisterFuncLookup();
+ test_ret += test_xmlXPathRegisterFuncNS();
+ test_ret += test_xmlXPathRegisterNs();
+ test_ret += test_xmlXPathRegisterVariable();
+ test_ret += test_xmlXPathRegisterVariableLookup();
+ test_ret += test_xmlXPathRegisterVariableNS();
+ test_ret += test_xmlXPathRegisteredFuncsCleanup();
+ test_ret += test_xmlXPathRegisteredNsCleanup();
+ test_ret += test_xmlXPathRegisteredVariablesCleanup();
+ test_ret += test_xmlXPathRoot();
+ test_ret += test_xmlXPathRoundFunction();
+ test_ret += test_xmlXPathStartsWithFunction();
+ test_ret += test_xmlXPathStringEvalNumber();
+ test_ret += test_xmlXPathStringFunction();
+ test_ret += test_xmlXPathStringLengthFunction();
+ test_ret += test_xmlXPathSubValues();
+ test_ret += test_xmlXPathSubstringAfterFunction();
+ test_ret += test_xmlXPathSubstringBeforeFunction();
+ test_ret += test_xmlXPathSubstringFunction();
+ test_ret += test_xmlXPathSumFunction();
+ test_ret += test_xmlXPathTrailing();
+ test_ret += test_xmlXPathTrailingSorted();
+ test_ret += test_xmlXPathTranslateFunction();
+ test_ret += test_xmlXPathTrueFunction();
+ test_ret += test_xmlXPathValueFlipSign();
+ test_ret += test_xmlXPathVariableLookup();
+ test_ret += test_xmlXPathVariableLookupNS();
+ test_ret += test_xmlXPathWrapCString();
+ test_ret += test_xmlXPathWrapExternal();
+ test_ret += test_xmlXPathWrapNodeSet();
+ test_ret += test_xmlXPatherror();
+
+ if (test_ret != 0)
+ printf("Module xpathInternals: %d errors\n", test_ret);
+ return(test_ret);
+}
+
+static int
+test_xmlXPtrBuildNodeList(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlNodePtr ret_val;
+ xmlXPathObjectPtr obj; /* the XPointer result from the evaluation. */
+ int n_obj;
+
+ for (n_obj = 0;n_obj < gen_nb_xmlXPathObjectPtr;n_obj++) {
+ mem_base = xmlMemBlocks();
+ obj = gen_xmlXPathObjectPtr(n_obj, 0);
+
+ ret_val = xmlXPtrBuildNodeList(obj);
+ desret_xmlNodePtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_obj, obj, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrBuildNodeList",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_obj);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrEval(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlChar * str; /* the XPointer expression */
+ int n_str;
+ xmlXPathContextPtr ctx; /* the XPointer context */
+ int n_ctx;
+
+ for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {
+ for (n_ctx = 0;n_ctx < gen_nb_xmlXPathContextPtr;n_ctx++) {
+ mem_base = xmlMemBlocks();
+ str = gen_const_xmlChar_ptr(n_str, 0);
+ ctx = gen_xmlXPathContextPtr(n_ctx, 1);
+
+ ret_val = xmlXPtrEval((const xmlChar *)str, ctx);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 0);
+ des_xmlXPathContextPtr(n_ctx, ctx, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrEval",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_str);
+ printf(" %d", n_ctx);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrEvalRangePredicate(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
+ int n_ctxt;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+
+ xmlXPtrEvalRangePredicate(ctxt);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrEvalRangePredicate",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#define gen_nb_xmlLocationSetPtr 1
+static xmlLocationSetPtr gen_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+ return(NULL);
+}
+static void des_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, xmlLocationSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+#endif
+
+
+static int
+test_xmlXPtrLocationSetAdd(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlLocationSetPtr cur; /* the initial range set */
+ int n_cur;
+ xmlXPathObjectPtr val; /* a new xmlXPathObjectPtr */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlLocationSetPtr(n_cur, 0);
+ val = gen_xmlXPathObjectPtr(n_val, 1);
+
+ xmlXPtrLocationSetAdd(cur, val);
+ call_tests++;
+ des_xmlLocationSetPtr(n_cur, cur, 0);
+ des_xmlXPathObjectPtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrLocationSetAdd",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrLocationSetCreate(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrLocationSetDel(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlLocationSetPtr cur; /* the initial range set */
+ int n_cur;
+ xmlXPathObjectPtr val; /* an xmlXPathObjectPtr */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlLocationSetPtr(n_cur, 0);
+ val = gen_xmlXPathObjectPtr(n_val, 1);
+
+ xmlXPtrLocationSetDel(cur, val);
+ call_tests++;
+ des_xmlLocationSetPtr(n_cur, cur, 0);
+ des_xmlXPathObjectPtr(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrLocationSetDel",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrLocationSetMerge(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrLocationSetRemove(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlLocationSetPtr cur; /* the initial range set */
+ int n_cur;
+ int val; /* the index to remove */
+ int n_val;
+
+ for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {
+ for (n_val = 0;n_val < gen_nb_int;n_val++) {
+ mem_base = xmlMemBlocks();
+ cur = gen_xmlLocationSetPtr(n_cur, 0);
+ val = gen_int(n_val, 1);
+
+ xmlXPtrLocationSetRemove(cur, val);
+ call_tests++;
+ des_xmlLocationSetPtr(n_cur, cur, 0);
+ des_int(n_val, val, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrLocationSetRemove",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_cur);
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewCollapsedRange(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the starting and ending node */
+ int n_start;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+
+ ret_val = xmlXPtrNewCollapsedRange(start);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewCollapsedRange",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewContext(void) {
+ int test_ret = 0;
+
+
+ /* missing type support */
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewLocationSetNodeSet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodeSetPtr set; /* a node set */
+ int n_set;
+
+ for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {
+ mem_base = xmlMemBlocks();
+ set = gen_xmlNodeSetPtr(n_set, 0);
+
+ ret_val = xmlXPtrNewLocationSetNodeSet(set);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodeSetPtr(n_set, set, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodeSet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_set);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewLocationSetNodes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the start NodePtr value */
+ int n_start;
+ xmlNodePtr end; /* the end NodePtr value or NULL */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+ end = gen_xmlNodePtr(n_end, 1);
+
+ ret_val = xmlXPtrNewLocationSetNodes(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ des_xmlNodePtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewLocationSetNodes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRange(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the starting node */
+ int n_start;
+ int startindex; /* the start index */
+ int n_startindex;
+ xmlNodePtr end; /* the ending point */
+ int n_end;
+ int endindex; /* the ending index */
+ int n_endindex;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ for (n_startindex = 0;n_startindex < gen_nb_int;n_startindex++) {
+ for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
+ for (n_endindex = 0;n_endindex < gen_nb_int;n_endindex++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+ startindex = gen_int(n_startindex, 1);
+ end = gen_xmlNodePtr(n_end, 2);
+ endindex = gen_int(n_endindex, 3);
+
+ ret_val = xmlXPtrNewRange(start, startindex, end, endindex);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ des_int(n_startindex, startindex, 1);
+ des_xmlNodePtr(n_end, end, 2);
+ des_int(n_endindex, endindex, 3);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRange",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_startindex);
+ printf(" %d", n_end);
+ printf(" %d", n_endindex);
+ printf("\n");
+ }
+ }
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRangeNodeObject(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the starting node */
+ int n_start;
+ xmlXPathObjectPtr end; /* the ending object */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+ end = gen_xmlXPathObjectPtr(n_end, 1);
+
+ ret_val = xmlXPtrNewRangeNodeObject(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ des_xmlXPathObjectPtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRangeNodeObject",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRangeNodePoint(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the starting node */
+ int n_start;
+ xmlXPathObjectPtr end; /* the ending point */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+ end = gen_xmlXPathObjectPtr(n_end, 1);
+
+ ret_val = xmlXPtrNewRangeNodePoint(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ des_xmlXPathObjectPtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRangeNodePoint",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRangeNodes(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlNodePtr start; /* the starting node */
+ int n_start;
+ xmlNodePtr end; /* the ending node */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlNodePtr(n_start, 0);
+ end = gen_xmlNodePtr(n_end, 1);
+
+ ret_val = xmlXPtrNewRangeNodes(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlNodePtr(n_start, start, 0);
+ des_xmlNodePtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRangeNodes",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRangePointNode(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr start; /* the starting point */
+ int n_start;
+ xmlNodePtr end; /* the ending node */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlXPathObjectPtr(n_start, 0);
+ end = gen_xmlNodePtr(n_end, 1);
+
+ ret_val = xmlXPtrNewRangePointNode(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_start, start, 0);
+ des_xmlNodePtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRangePointNode",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrNewRangePoints(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlXPathObjectPtr start; /* the starting point */
+ int n_start;
+ xmlXPathObjectPtr end; /* the ending point */
+ int n_end;
+
+ for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {
+ for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {
+ mem_base = xmlMemBlocks();
+ start = gen_xmlXPathObjectPtr(n_start, 0);
+ end = gen_xmlXPathObjectPtr(n_end, 1);
+
+ ret_val = xmlXPtrNewRangePoints(start, end);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlXPathObjectPtr(n_start, start, 0);
+ des_xmlXPathObjectPtr(n_end, end, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrNewRangePoints",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_start);
+ printf(" %d", n_end);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrRangeToFunction(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */
+ int n_ctxt;
+ int nargs; /* the number of args */
+ int n_nargs;
+
+ for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {
+ for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {
+ mem_base = xmlMemBlocks();
+ ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);
+ nargs = gen_int(n_nargs, 1);
+
+ xmlXPtrRangeToFunction(ctxt, nargs);
+ call_tests++;
+ des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);
+ des_int(n_nargs, nargs, 1);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrRangeToFunction",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_ctxt);
+ printf(" %d", n_nargs);
+ printf("\n");
+ }
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+
+static int
+test_xmlXPtrWrapLocationSet(void) {
+ int test_ret = 0;
+
+#if defined(LIBXML_XPTR_ENABLED)
+ int mem_base;
+ xmlXPathObjectPtr ret_val;
+ xmlLocationSetPtr val; /* the LocationSet value */
+ int n_val;
+
+ for (n_val = 0;n_val < gen_nb_xmlLocationSetPtr;n_val++) {
+ mem_base = xmlMemBlocks();
+ val = gen_xmlLocationSetPtr(n_val, 0);
+
+ ret_val = xmlXPtrWrapLocationSet(val);
+ desret_xmlXPathObjectPtr(ret_val);
+ call_tests++;
+ des_xmlLocationSetPtr(n_val, val, 0);
+ xmlResetLastError();
+ if (mem_base != xmlMemBlocks()) {
+ printf("Leak of %d blocks found in xmlXPtrWrapLocationSet",
+ xmlMemBlocks() - mem_base);
+ test_ret++;
+ printf(" %d", n_val);
+ printf("\n");
+ }
+ }
+ function_tests++;
+#endif
+
+ return(test_ret);
+}
+
+static int
+test_xpointer(void) {
+ int test_ret = 0;
+
+ if (quiet == 0) printf("Testing xpointer : 17 of 21 functions ...\n");
+ test_ret += test_xmlXPtrBuildNodeList();
+ test_ret += test_xmlXPtrEval();
+ test_ret += test_xmlXPtrEvalRangePredicate();
+ test_ret += test_xmlXPtrLocationSetAdd();
+ test_ret += test_xmlXPtrLocationSetCreate();
+ test_ret += test_xmlXPtrLocationSetDel();
+ test_ret += test_xmlXPtrLocationSetMerge();
+ test_ret += test_xmlXPtrLocationSetRemove();
+ test_ret += test_xmlXPtrNewCollapsedRange();
+ test_ret += test_xmlXPtrNewContext();
+ test_ret += test_xmlXPtrNewLocationSetNodeSet();
+ test_ret += test_xmlXPtrNewLocationSetNodes();
+ test_ret += test_xmlXPtrNewRange();
+ test_ret += test_xmlXPtrNewRangeNodeObject();
+ test_ret += test_xmlXPtrNewRangeNodePoint();
+ test_ret += test_xmlXPtrNewRangeNodes();
+ test_ret += test_xmlXPtrNewRangePointNode();
+ test_ret += test_xmlXPtrNewRangePoints();
+ test_ret += test_xmlXPtrRangeToFunction();
+ test_ret += test_xmlXPtrWrapLocationSet();
+
+ if (test_ret != 0)
+ printf("Module xpointer: %d errors\n", test_ret);
+ return(test_ret);
+}
+static int
+test_module(const char *module) {
+ if (!strcmp(module, "HTMLparser")) return(test_HTMLparser());
+ if (!strcmp(module, "HTMLtree")) return(test_HTMLtree());
+ if (!strcmp(module, "SAX2")) return(test_SAX2());
+ if (!strcmp(module, "c14n")) return(test_c14n());
+ if (!strcmp(module, "catalog")) return(test_catalog());
+ if (!strcmp(module, "chvalid")) return(test_chvalid());
+ if (!strcmp(module, "debugXML")) return(test_debugXML());
+ if (!strcmp(module, "dict")) return(test_dict());
+ if (!strcmp(module, "encoding")) return(test_encoding());
+ if (!strcmp(module, "entities")) return(test_entities());
+ if (!strcmp(module, "hash")) return(test_hash());
+ if (!strcmp(module, "list")) return(test_list());
+ if (!strcmp(module, "nanoftp")) return(test_nanoftp());
+ if (!strcmp(module, "nanohttp")) return(test_nanohttp());
+ if (!strcmp(module, "parser")) return(test_parser());
+ if (!strcmp(module, "parserInternals")) return(test_parserInternals());
+ if (!strcmp(module, "pattern")) return(test_pattern());
+ if (!strcmp(module, "relaxng")) return(test_relaxng());
+ if (!strcmp(module, "schemasInternals")) return(test_schemasInternals());
+ if (!strcmp(module, "schematron")) return(test_schematron());
+ if (!strcmp(module, "tree")) return(test_tree());
+ if (!strcmp(module, "uri")) return(test_uri());
+ if (!strcmp(module, "valid")) return(test_valid());
+ if (!strcmp(module, "xinclude")) return(test_xinclude());
+ if (!strcmp(module, "xmlIO")) return(test_xmlIO());
+ if (!strcmp(module, "xmlautomata")) return(test_xmlautomata());
+ if (!strcmp(module, "xmlerror")) return(test_xmlerror());
+ if (!strcmp(module, "xmlmodule")) return(test_xmlmodule());
+ if (!strcmp(module, "xmlreader")) return(test_xmlreader());
+ if (!strcmp(module, "xmlregexp")) return(test_xmlregexp());
+ if (!strcmp(module, "xmlsave")) return(test_xmlsave());
+ if (!strcmp(module, "xmlschemas")) return(test_xmlschemas());
+ if (!strcmp(module, "xmlschemastypes")) return(test_xmlschemastypes());
+ if (!strcmp(module, "xmlstring")) return(test_xmlstring());
+ if (!strcmp(module, "xmlunicode")) return(test_xmlunicode());
+ if (!strcmp(module, "xmlwriter")) return(test_xmlwriter());
+ if (!strcmp(module, "xpath")) return(test_xpath());
+ if (!strcmp(module, "xpathInternals")) return(test_xpathInternals());
+ if (!strcmp(module, "xpointer")) return(test_xpointer());
+ return(0);
+}
diff --git a/testchar.c b/testchar.c
new file mode 100644
index 0000000..0d08792
--- /dev/null
+++ b/testchar.c
@@ -0,0 +1,617 @@
+/**
+ * Test the UTF-8 decoding routines
+ *
+ * author: Daniel Veillard
+ * copy: see Copyright for the status of this software.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+
+#include "buf.h"
+
+int lastError;
+
+static void errorHandler(void *unused, xmlErrorPtr err) {
+ if ((unused == NULL) && (err != NULL) && (lastError == 0)) {
+ lastError = err->code;
+ }
+}
+
+char document1[100] = "<doc>XXXX</doc>";
+char document2[100] = "<doc foo='XXXX'/>";
+
+static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
+ int len, char *data, int forbid1, int forbid2) {
+ int i;
+ xmlDocPtr res;
+
+ for (i = 0;i <= 0xFF;i++) {
+ lastError = 0;
+ xmlCtxtReset(ctxt);
+
+ data[0] = i;
+
+ res = xmlReadMemory(document, len, "test", NULL, 0);
+
+ if ((i == forbid1) || (i == forbid2)) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Byte 0x%02X: %c\n",
+ i, i);
+ }
+
+ else if ((i == '<') || (i == '&')) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect illegal char %c for Byte 0x%02X\n", i, i);
+ }
+ else if (((i < 0x20) || (i >= 0x80)) &&
+ (i != 0x9) && (i != 0xA) && (i != 0xD)) {
+ if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Byte 0x%02X\n", i);
+ }
+ else if (res == NULL) {
+ fprintf(stderr,
+ "Failed to parse valid char for Byte 0x%02X : %c\n", i, i);
+ }
+ if (res != NULL)
+ xmlFreeDoc(res);
+ }
+}
+
+static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
+ int len, char *data) {
+ int i, j;
+ xmlDocPtr res;
+
+ for (i = 0x80;i <= 0xFF;i++) {
+ for (j = 0;j <= 0xFF;j++) {
+ lastError = 0;
+ xmlCtxtReset(ctxt);
+
+ data[0] = i;
+ data[1] = j;
+
+ res = xmlReadMemory(document, len, "test", NULL, 0);
+
+ /* if first bit of first char is set, then second bit must too */
+ if ((i & 0x80) && ((i & 0x40) == 0)) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
+ i, j);
+ }
+
+ /*
+ * if first bit of first char is set, then second char first
+ * bits must be 10
+ */
+ else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
+ i, j);
+ }
+
+ /*
+ * if using a 2 byte encoding then the value must be greater
+ * than 0x80, i.e. one of bits 5 to 1 of i must be set
+ */
+ else if ((i & 0x80) && ((i & 0x1E) == 0)) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
+ i, j);
+ }
+
+ /*
+ * if third bit of first char is set, then the sequence would need
+ * at least 3 bytes, but we give only 2 !
+ */
+ else if ((i & 0xE0) == 0xE0) {
+ if ((lastError == 0) || (res != NULL))
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
+ i, j);
+ }
+
+ /*
+ * We should see no error in remaning cases
+ */
+ else if ((lastError != 0) || (res == NULL)) {
+ fprintf(stderr,
+ "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
+ }
+ if (res != NULL)
+ xmlFreeDoc(res);
+ }
+ }
+}
+
+/**
+ * testDocumentRanges:
+ *
+ * Test the correct UTF8 character parsing in context of XML documents
+ * Those are in-context injection tests checking the parser behaviour on
+ * edge case values at different point in content, beginning and end of
+ * CDATA in text or in attribute values.
+ */
+
+static void testDocumentRanges(void) {
+ xmlParserCtxtPtr ctxt;
+ char *data;
+
+ /*
+ * Set up a parsing context using the first document as
+ * the current input source.
+ */
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to allocate parser context\n");
+ return;
+ }
+
+ printf("testing 1 byte char in document: 1");
+ fflush(stdout);
+ data = &document1[5];
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 1 byte injection at beginning of area */
+ testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
+ data, -1, -1);
+ printf(" 2");
+ fflush(stdout);
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 1 byte injection at end of area */
+ testDocumentRangeByte1(ctxt, &document1[0], strlen(document1),
+ data + 3, -1, -1);
+
+ printf(" 3");
+ fflush(stdout);
+ data = &document2[10];
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 1 byte injection at beginning of area */
+ testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
+ data, '\'', -1);
+ printf(" 4");
+ fflush(stdout);
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 1 byte injection at end of area */
+ testDocumentRangeByte1(ctxt, &document2[0], strlen(document2),
+ data + 3, '\'', -1);
+ printf(" done\n");
+
+ printf("testing 2 byte char in document: 1");
+ fflush(stdout);
+ data = &document1[5];
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 2 byte injection at beginning of area */
+ testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
+ data);
+ printf(" 2");
+ fflush(stdout);
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 2 byte injection at end of area */
+ testDocumentRangeByte2(ctxt, &document1[0], strlen(document1),
+ data + 2);
+
+ printf(" 3");
+ fflush(stdout);
+ data = &document2[10];
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 2 byte injection at beginning of area */
+ testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
+ data);
+ printf(" 4");
+ fflush(stdout);
+ data[0] = ' ';
+ data[1] = ' ';
+ data[2] = ' ';
+ data[3] = ' ';
+ /* test 2 byte injection at end of area */
+ testDocumentRangeByte2(ctxt, &document2[0], strlen(document2),
+ data + 2);
+ printf(" done\n");
+
+ xmlFreeParserCtxt(ctxt);
+}
+
+static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
+ int i = 0;
+ int len, c;
+
+ data[1] = 0;
+ data[2] = 0;
+ data[3] = 0;
+ for (i = 0;i <= 0xFF;i++) {
+ data[0] = i;
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+
+ lastError = 0;
+ c = xmlCurrentChar(ctxt, &len);
+ if ((i == 0) || (i >= 0x80)) {
+ /* we must see an error there */
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Byte 0x%02X\n", i);
+ } else if (i == 0xD) {
+ if ((c != 0xA) || (len != 1))
+ fprintf(stderr, "Failed to convert char for Byte 0x%02X\n", i);
+ } else if ((c != i) || (len != 1)) {
+ fprintf(stderr, "Failed to parse char for Byte 0x%02X\n", i);
+ }
+ }
+}
+
+static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
+ int i, j;
+ int len, c;
+
+ data[2] = 0;
+ data[3] = 0;
+ for (i = 0x80;i <= 0xFF;i++) {
+ for (j = 0;j <= 0xFF;j++) {
+ data[0] = i;
+ data[1] = j;
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+
+ lastError = 0;
+ c = xmlCurrentChar(ctxt, &len);
+
+ /* if first bit of first char is set, then second bit must too */
+ if ((i & 0x80) && ((i & 0x40) == 0)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
+ i, j);
+ }
+
+ /*
+ * if first bit of first char is set, then second char first
+ * bits must be 10
+ */
+ else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
+ i, j, c);
+ }
+
+ /*
+ * if using a 2 byte encoding then the value must be greater
+ * than 0x80, i.e. one of bits 5 to 1 of i must be set
+ */
+ else if ((i & 0x80) && ((i & 0x1E) == 0)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n",
+ i, j, c);
+ }
+
+ /*
+ * if third bit of first char is set, then the sequence would need
+ * at least 3 bytes, but we give only 2 !
+ */
+ else if ((i & 0xE0) == 0xE0) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n",
+ i, j);
+ }
+
+ /*
+ * We should see no error in remaning cases
+ */
+ else if ((lastError != 0) || (len != 2)) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j);
+ }
+
+ /*
+ * Finally check the value is right
+ */
+ else if (c != (j & 0x3F) + ((i & 0x1F) << 6)) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n",
+ i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c);
+ }
+ }
+ }
+}
+
+static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
+ int i, j, k, K;
+ int len, c;
+ unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
+ int value;
+
+ data[3] = 0;
+ for (i = 0xE0;i <= 0xFF;i++) {
+ for (j = 0;j <= 0xFF;j++) {
+ for (k = 0;k < 6;k++) {
+ data[0] = i;
+ data[1] = j;
+ K = lows[k];
+ data[2] = (char) K;
+ value = (K & 0x3F) + ((j & 0x3F) << 6) + ((i & 0xF) << 12);
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+
+ lastError = 0;
+ c = xmlCurrentChar(ctxt, &len);
+
+ /*
+ * if fourth bit of first char is set, then the sequence would need
+ * at least 4 bytes, but we give only 3 !
+ */
+ if ((i & 0xF0) == 0xF0) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ i, j, K, data[3]);
+ }
+
+ /*
+ * The second and the third bytes must start with 10
+ */
+ else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
+ i, j, K);
+ }
+
+ /*
+ * if using a 3 byte encoding then the value must be greater
+ * than 0x800, i.e. one of bits 4 to 0 of i must be set or
+ * the 6th byte of data[1] must be set
+ */
+ else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n",
+ i, j, K);
+ }
+
+ /*
+ * There are values in that range that are not allowed in XML-1.0
+ */
+ else if (((value > 0xD7FF) && (value <0xE000)) ||
+ ((value > 0xFFFD) && (value <0x10000))) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X\n",
+ value, i, j, K);
+ }
+
+ /*
+ * We should see no error in remaining cases
+ */
+ else if ((lastError != 0) || (len != 3)) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
+ i, j, K);
+ }
+
+ /*
+ * Finally check the value is right
+ */
+ else if (c != value) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
+ i, j, data[2], value, c);
+ }
+ }
+ }
+ }
+}
+
+static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
+ int i, j, k, K, l, L;
+ int len, c;
+ unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
+ int value;
+
+ data[4] = 0;
+ for (i = 0xF0;i <= 0xFF;i++) {
+ for (j = 0;j <= 0xFF;j++) {
+ for (k = 0;k < 6;k++) {
+ for (l = 0;l < 6;l++) {
+ data[0] = i;
+ data[1] = j;
+ K = lows[k];
+ data[2] = (char) K;
+ L = lows[l];
+ data[3] = (char) L;
+ value = (L & 0x3F) + ((K & 0x3F) << 6) + ((j & 0x3F) << 12) +
+ ((i & 0x7) << 18);
+ ctxt->charset = XML_CHAR_ENCODING_UTF8;
+
+ lastError = 0;
+ c = xmlCurrentChar(ctxt, &len);
+
+ /*
+ * if fifth bit of first char is set, then the sequence would need
+ * at least 5 bytes, but we give only 4 !
+ */
+ if ((i & 0xF8) == 0xF8) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ i, j, K, data[3]);
+ }
+
+ /*
+ * The second, third and fourth bytes must start with 10
+ */
+ else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) ||
+ ((L & 0xC0) != 0x80)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ i, j, K, L);
+ }
+
+ /*
+ * if using a 3 byte encoding then the value must be greater
+ * than 0x10000, i.e. one of bits 3 to 0 of i must be set or
+ * the 6 or 5th byte of j must be set
+ */
+ else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+ "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ i, j, K, L);
+ }
+
+ /*
+ * There are values in that range that are not allowed in XML-1.0
+ */
+ else if (((value > 0xD7FF) && (value <0xE000)) ||
+ ((value > 0xFFFD) && (value <0x10000)) ||
+ (value > 0x10FFFF)) {
+ if (lastError != XML_ERR_INVALID_CHAR)
+ fprintf(stderr,
+"Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n",
+ value, i, j, K, L);
+ }
+
+ /*
+ * We should see no error in remaining cases
+ */
+ else if ((lastError != 0) || (len != 4)) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
+ i, j, K);
+ }
+
+ /*
+ * Finally check the value is right
+ */
+ else if (c != value) {
+ fprintf(stderr,
+ "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
+ i, j, data[2], value, c);
+ }
+ }
+ }
+ }
+ }
+}
+
+/**
+ * testCharRanges:
+ *
+ * Test the correct UTF8 character parsing in isolation i.e.
+ * not when parsing a full document, this is less expensive and we can
+ * cover the full range of UTF-8 chars accepted by XML-1.0
+ */
+
+static void testCharRanges(void) {
+ char data[5];
+ xmlParserCtxtPtr ctxt;
+ xmlParserInputBufferPtr buf;
+ xmlParserInputPtr input;
+
+ memset(data, 0, 5);
+
+ /*
+ * Set up a parsing context using the above data buffer as
+ * the current input source.
+ */
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to allocate parser context\n");
+ return;
+ }
+ buf = xmlParserInputBufferCreateStatic(data, sizeof(data),
+ XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ fprintf(stderr, "Failed to allocate input buffer\n");
+ goto error;
+ }
+ input = xmlNewInputStream(ctxt);
+ if (input == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ goto error;
+ }
+ input->filename = NULL;
+ input->buf = buf;
+ input->cur =
+ input->base = xmlBufContent(input->buf->buffer);
+ input->end = input->base + 4;
+ inputPush(ctxt, input);
+
+ printf("testing char range: 1");
+ fflush(stdout);
+ testCharRangeByte1(ctxt, data);
+ printf(" 2");
+ fflush(stdout);
+ testCharRangeByte2(ctxt, data);
+ printf(" 3");
+ fflush(stdout);
+ testCharRangeByte3(ctxt, data);
+ printf(" 4");
+ fflush(stdout);
+ testCharRangeByte4(ctxt, data);
+ printf(" done\n");
+ fflush(stdout);
+
+error:
+ xmlFreeParserCtxt(ctxt);
+}
+
+int main(void) {
+
+ /*
+ * this initialize the library and check potential ABI mismatches
+ * between the version it was compiled for and the actual shared
+ * library used.
+ */
+ LIBXML_TEST_VERSION
+
+ /*
+ * Catch errors separately
+ */
+
+ xmlSetStructuredErrorFunc(NULL, errorHandler);
+
+ /*
+ * Run the tests
+ */
+ testCharRanges();
+ testDocumentRanges();
+
+ /*
+ * Cleanup function for the XML library.
+ */
+ xmlCleanupParser();
+ /*
+ * this is to debug memory for regression tests
+ */
+ xmlMemoryDump();
+ return(0);
+}
diff --git a/testdict.c b/testdict.c
new file mode 100644
index 0000000..4e8581f
--- /dev/null
+++ b/testdict.c
@@ -0,0 +1,444 @@
+#include <string.h>
+#include <libxml/parser.h>
+#include <libxml/dict.h>
+
+/* #define WITH_PRINT */
+
+static const char *seeds1[] = {
+ "a", "b", "c",
+ "d", "e", "f",
+ "g", "h", "i",
+ "j", "k", "l",
+
+ NULL
+};
+
+static const char *seeds2[] = {
+ "m", "n", "o",
+ "p", "q", "r",
+ "s", "t", "u",
+ "v", "w", "x",
+
+ NULL
+};
+
+#define NB_STRINGS_NS 100
+#define NB_STRINGS_MAX 10000
+#define NB_STRINGS_MIN 10
+
+static xmlChar *strings1[NB_STRINGS_MAX];
+static xmlChar *strings2[NB_STRINGS_MAX];
+static const xmlChar *test1[NB_STRINGS_MAX];
+static const xmlChar *test2[NB_STRINGS_MAX];
+static int nbErrors = 0;
+
+static void fill_strings(void) {
+ int i, j, k;
+
+ /*
+ * That's a bit nasty but the output is fine and it doesn't take hours
+ * there is a small but sufficient number of duplicates, and we have
+ * ":xxx" and full QNames in the last NB_STRINGS_NS values
+ */
+ for (i = 0; seeds1[i] != NULL; i++) {
+ strings1[i] = xmlStrdup((const xmlChar *) seeds1[i]);
+ if (strings1[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings1\n");
+ exit(1);
+ }
+ }
+ for (j = 0, k = 0;i < NB_STRINGS_MAX - NB_STRINGS_NS;i++,j++) {
+ strings1[i] = xmlStrncatNew(strings1[j], strings1[k], -1);
+ if (strings1[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings1\n");
+ exit(1);
+ }
+ if (j >= 50) {
+ j = 0;
+ k++;
+ }
+ }
+ for (j = 0; (j < 50) && (i < NB_STRINGS_MAX); i++, j+=2) {
+ strings1[i] = xmlStrncatNew(strings1[j], (const xmlChar *) ":", -1);
+ if (strings1[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings1\n");
+ exit(1);
+ }
+ }
+ for (j = NB_STRINGS_MAX - NB_STRINGS_NS, k = 0;
+ i < NB_STRINGS_MAX;i++,j++) {
+ strings1[i] = xmlStrncatNew(strings1[j], strings1[k], -1);
+ if (strings1[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings1\n");
+ exit(1);
+ }
+ k += 3;
+ if (k >= 50) k = 0;
+ }
+
+ /*
+ * Now do the same with the second pool of strings
+ */
+ for (i = 0; seeds2[i] != NULL; i++) {
+ strings2[i] = xmlStrdup((const xmlChar *) seeds2[i]);
+ if (strings2[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings2\n");
+ exit(1);
+ }
+ }
+ for (j = 0, k = 0;i < NB_STRINGS_MAX - NB_STRINGS_NS;i++,j++) {
+ strings2[i] = xmlStrncatNew(strings2[j], strings2[k], -1);
+ if (strings2[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings2\n");
+ exit(1);
+ }
+ if (j >= 50) {
+ j = 0;
+ k++;
+ }
+ }
+ for (j = 0; (j < 50) && (i < NB_STRINGS_MAX); i++, j+=2) {
+ strings2[i] = xmlStrncatNew(strings2[j], (const xmlChar *) ":", -1);
+ if (strings2[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings2\n");
+ exit(1);
+ }
+ }
+ for (j = NB_STRINGS_MAX - NB_STRINGS_NS, k = 0;
+ i < NB_STRINGS_MAX;i++,j++) {
+ strings2[i] = xmlStrncatNew(strings2[j], strings2[k], -1);
+ if (strings2[i] == NULL) {
+ fprintf(stderr, "Out of memory while generating strings2\n");
+ exit(1);
+ }
+ k += 3;
+ if (k >= 50) k = 0;
+ }
+
+}
+
+#ifdef WITH_PRINT
+static void print_strings(void) {
+ int i;
+
+ for (i = 0; i < NB_STRINGS_MAX;i++) {
+ printf("%s\n", strings1[i]);
+ }
+ for (i = 0; i < NB_STRINGS_MAX;i++) {
+ printf("%s\n", strings2[i]);
+ }
+}
+#endif
+
+static void clean_strings(void) {
+ int i;
+
+ for (i = 0; i < NB_STRINGS_MAX; i++) {
+ if (strings1[i] != NULL) /* really should not happen */
+ xmlFree(strings1[i]);
+ }
+ for (i = 0; i < NB_STRINGS_MAX; i++) {
+ if (strings2[i] != NULL) /* really should not happen */
+ xmlFree(strings2[i]);
+ }
+}
+
+/*
+ * This tests the sub-dictionary support
+ */
+static int run_test2(xmlDictPtr parent) {
+ int i, j;
+ xmlDictPtr dict;
+ int ret = 0;
+ xmlChar prefix[40];
+ xmlChar *cur, *pref;
+ const xmlChar *tmp;
+
+ dict = xmlDictCreateSub(parent);
+ if (dict == NULL) {
+ fprintf(stderr, "Out of memory while creating sub-dictionary\n");
+ exit(1);
+ }
+ memset(test2, 0, sizeof(test2));
+
+ /*
+ * Fill in NB_STRINGS_MIN, at this point the dictionary should not grow
+ * and we allocate all those doing the fast key computations
+ * All the strings are based on a different seeds subset so we know
+ * they are allocated in the main dictionary, not coming from the parent
+ */
+ for (i = 0;i < NB_STRINGS_MIN;i++) {
+ test2[i] = xmlDictLookup(dict, strings2[i], -1);
+ if (test2[i] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings2[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ j = NB_STRINGS_MAX - NB_STRINGS_NS;
+ /* ":foo" like strings2 */
+ for (i = 0;i < NB_STRINGS_MIN;i++, j++) {
+ test2[j] = xmlDictLookup(dict, strings2[j], xmlStrlen(strings2[j]));
+ if (test2[j] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings2[j]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ /* "a:foo" like strings2 */
+ j = NB_STRINGS_MAX - NB_STRINGS_MIN;
+ for (i = 0;i < NB_STRINGS_MIN;i++, j++) {
+ test2[j] = xmlDictLookup(dict, strings2[j], xmlStrlen(strings2[j]));
+ if (test2[j] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings2[j]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * At this point allocate all the strings
+ * the dictionary will grow in the process, reallocate more string tables
+ * and switch to the better key generator
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (test2[i] != NULL)
+ continue;
+ test2[i] = xmlDictLookup(dict, strings2[i], -1);
+ if (test2[i] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings2[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * Now we can start to test things, first that all strings2 belongs to
+ * the dict, and that none of them was actually allocated in the parent
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (!xmlDictOwns(dict, test2[i])) {
+ fprintf(stderr, "Failed ownership failure for '%s'\n",
+ strings2[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ if (xmlDictOwns(parent, test2[i])) {
+ fprintf(stderr, "Failed parent ownership failure for '%s'\n",
+ strings2[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * Also verify that all strings from the parent are seen from the subdict
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (!xmlDictOwns(dict, test1[i])) {
+ fprintf(stderr, "Failed sub-ownership failure for '%s'\n",
+ strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * Then that another lookup to the string in sub will return the same
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (xmlDictLookup(dict, strings2[i], -1) != test2[i]) {
+ fprintf(stderr, "Failed re-lookup check for %d, '%s'\n",
+ i, strings2[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ /*
+ * But also that any lookup for a string in the parent will be provided
+ * as in the parent
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (xmlDictLookup(dict, strings1[i], -1) != test1[i]) {
+ fprintf(stderr, "Failed parent string lookup check for %d, '%s'\n",
+ i, strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * check the QName lookups
+ */
+ for (i = NB_STRINGS_MAX - NB_STRINGS_NS;i < NB_STRINGS_MAX;i++) {
+ cur = strings2[i];
+ pref = &prefix[0];
+ while (*cur != ':') *pref++ = *cur++;
+ cur++;
+ *pref = 0;
+ tmp = xmlDictQLookup(dict, &prefix[0], cur);
+ if (xmlDictQLookup(dict, &prefix[0], cur) != test2[i]) {
+ fprintf(stderr, "Failed lookup check for '%s':'%s'\n",
+ &prefix[0], cur);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ /*
+ * check the QName lookups for strings from the parent
+ */
+ for (i = NB_STRINGS_MAX - NB_STRINGS_NS;i < NB_STRINGS_MAX;i++) {
+ cur = strings1[i];
+ pref = &prefix[0];
+ while (*cur != ':') *pref++ = *cur++;
+ cur++;
+ *pref = 0;
+ tmp = xmlDictQLookup(dict, &prefix[0], cur);
+ if (xmlDictQLookup(dict, &prefix[0], cur) != test1[i]) {
+ fprintf(stderr, "Failed parent lookup check for '%s':'%s'\n",
+ &prefix[0], cur);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ xmlDictFree(dict);
+ return(ret);
+}
+
+/*
+ * Test a single dictionary
+ */
+static int run_test1(void) {
+ int i, j;
+ xmlDictPtr dict;
+ int ret = 0;
+ xmlChar prefix[40];
+ xmlChar *cur, *pref;
+ const xmlChar *tmp;
+
+ dict = xmlDictCreate();
+ if (dict == NULL) {
+ fprintf(stderr, "Out of memory while creating dictionary\n");
+ exit(1);
+ }
+ memset(test1, 0, sizeof(test1));
+
+ /*
+ * Fill in NB_STRINGS_MIN, at this point the dictionary should not grow
+ * and we allocate all those doing the fast key computations
+ */
+ for (i = 0;i < NB_STRINGS_MIN;i++) {
+ test1[i] = xmlDictLookup(dict, strings1[i], -1);
+ if (test1[i] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ j = NB_STRINGS_MAX - NB_STRINGS_NS;
+ /* ":foo" like strings1 */
+ for (i = 0;i < NB_STRINGS_MIN;i++, j++) {
+ test1[j] = xmlDictLookup(dict, strings1[j], xmlStrlen(strings1[j]));
+ if (test1[j] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings1[j]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+ /* "a:foo" like strings1 */
+ j = NB_STRINGS_MAX - NB_STRINGS_MIN;
+ for (i = 0;i < NB_STRINGS_MIN;i++, j++) {
+ test1[j] = xmlDictLookup(dict, strings1[j], xmlStrlen(strings1[j]));
+ if (test1[j] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings1[j]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * At this point allocate all the strings
+ * the dictionary will grow in the process, reallocate more string tables
+ * and switch to the better key generator
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (test1[i] != NULL)
+ continue;
+ test1[i] = xmlDictLookup(dict, strings1[i], -1);
+ if (test1[i] == NULL) {
+ fprintf(stderr, "Failed lookup for '%s'\n", strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * Now we can start to test things, first that all strings1 belongs to
+ * the dict
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (!xmlDictOwns(dict, test1[i])) {
+ fprintf(stderr, "Failed ownership failure for '%s'\n",
+ strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * Then that another lookup to the string will return the same
+ */
+ for (i = 0;i < NB_STRINGS_MAX;i++) {
+ if (xmlDictLookup(dict, strings1[i], -1) != test1[i]) {
+ fprintf(stderr, "Failed re-lookup check for %d, '%s'\n",
+ i, strings1[i]);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ /*
+ * More complex, check the QName lookups
+ */
+ for (i = NB_STRINGS_MAX - NB_STRINGS_NS;i < NB_STRINGS_MAX;i++) {
+ cur = strings1[i];
+ pref = &prefix[0];
+ while (*cur != ':') *pref++ = *cur++;
+ cur++;
+ *pref = 0;
+ tmp = xmlDictQLookup(dict, &prefix[0], cur);
+ if (xmlDictQLookup(dict, &prefix[0], cur) != test1[i]) {
+ fprintf(stderr, "Failed lookup check for '%s':'%s'\n",
+ &prefix[0], cur);
+ ret = 1;
+ nbErrors++;
+ }
+ }
+
+ run_test2(dict);
+
+ xmlDictFree(dict);
+ return(ret);
+}
+
+int main(void)
+{
+ int ret;
+
+ LIBXML_TEST_VERSION
+ fill_strings();
+#ifdef WITH_PRINT
+ print_strings();
+#endif
+ ret = run_test1();
+ if (ret == 0) {
+ printf("dictionary tests succeeded %d strings\n", 2 * NB_STRINGS_MAX);
+ } else {
+ printf("dictionary tests failed with %d errors\n", nbErrors);
+ }
+ clean_strings();
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return(ret);
+}
diff --git a/testdso.c b/testdso.c
new file mode 100644
index 0000000..bd4ff08
--- /dev/null
+++ b/testdso.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+#define IN_LIBXML
+#include "libxml/xmlexports.h"
+
+XMLPUBFUN int hello_world(void);
+
+int hello_world(void)
+{
+ printf("Success!\n");
+ return 0;
+}
diff --git a/testlimits.c b/testlimits.c
new file mode 100644
index 0000000..577f593
--- /dev/null
+++ b/testlimits.c
@@ -0,0 +1,1637 @@
+/*
+ * testlimits.c: C program to run libxml2 regression tests checking various
+ * limits in document size. Will consume a lot of RAM and CPU cycles
+ *
+ * To compile on Unixes:
+ * cc -o testlimits `xml2-config --cflags` testlimits.c `xml2-config --libs` -lpthread
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <time.h>
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#ifdef LIBXML_READER_ENABLED
+#include <libxml/xmlreader.h>
+#endif
+
+static int verbose = 0;
+static int tests_quiet = 0;
+
+/************************************************************************
+ * *
+ * time handling *
+ * *
+ ************************************************************************/
+
+/* maximum time for one parsing before declaring a timeout */
+#define MAX_TIME 2 /* seconds */
+
+static clock_t t0;
+int timeout = 0;
+
+static void reset_timout(void) {
+ timeout = 0;
+ t0 = clock();
+}
+
+static int check_time(void) {
+ clock_t tnow = clock();
+ if (((tnow - t0) / CLOCKS_PER_SEC) > MAX_TIME) {
+ timeout = 1;
+ return(0);
+ }
+ return(1);
+}
+
+/************************************************************************
+ * *
+ * Huge document generator *
+ * *
+ ************************************************************************/
+
+#include <libxml/xmlIO.h>
+
+/*
+ * Huge documents are built using fixed start and end chunks
+ * and filling between the two an unconventional amount of char data
+ */
+typedef struct hugeTest hugeTest;
+typedef hugeTest *hugeTestPtr;
+struct hugeTest {
+ const char *description;
+ const char *name;
+ const char *start;
+ const char *end;
+};
+
+static struct hugeTest hugeTests[] = {
+ { "Huge text node", "huge:textNode", "<foo>", "</foo>" },
+ { "Huge attribute node", "huge:attrNode", "<foo bar='", "'/>" },
+ { "Huge comment node", "huge:commentNode", "<foo><!--", "--></foo>" },
+ { "Huge PI node", "huge:piNode", "<foo><?bar ", "?></foo>" },
+};
+
+static const char *current;
+static int rlen;
+static unsigned int currentTest = 0;
+static int instate = 0;
+
+/**
+ * hugeMatch:
+ * @URI: an URI to test
+ *
+ * Check for an huge: query
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+static int
+hugeMatch(const char * URI) {
+ if ((URI != NULL) && (!strncmp(URI, "huge:", 5)))
+ return(1);
+ return(0);
+}
+
+/**
+ * hugeOpen:
+ * @URI: an URI to test
+ *
+ * Return a pointer to the huge: query handler, in this example simply
+ * the current pointer...
+ *
+ * Returns an Input context or NULL in case or error
+ */
+static void *
+hugeOpen(const char * URI) {
+ if ((URI == NULL) || (strncmp(URI, "huge:", 5)))
+ return(NULL);
+
+ for (currentTest = 0;currentTest < sizeof(hugeTests)/sizeof(hugeTests[0]);
+ currentTest++)
+ if (!strcmp(hugeTests[currentTest].name, URI))
+ goto found;
+
+ return(NULL);
+
+found:
+ rlen = strlen(hugeTests[currentTest].start);
+ current = hugeTests[currentTest].start;
+ instate = 0;
+ return((void *) current);
+}
+
+/**
+ * hugeClose:
+ * @context: the read context
+ *
+ * Close the huge: query handler
+ *
+ * Returns 0 or -1 in case of error
+ */
+static int
+hugeClose(void * context) {
+ if (context == NULL) return(-1);
+ fprintf(stderr, "\n");
+ return(0);
+}
+
+#define CHUNK 4096
+
+char filling[CHUNK + 1];
+
+static void fillFilling(void) {
+ int i;
+
+ for (i = 0;i < CHUNK;i++) {
+ filling[i] = 'a';
+ }
+ filling[CHUNK] = 0;
+}
+
+size_t maxlen = 64 * 1024 * 1024;
+size_t curlen = 0;
+size_t dotlen;
+
+/**
+ * hugeRead:
+ * @context: the read context
+ * @buffer: where to store data
+ * @len: number of bytes to read
+ *
+ * Implement an huge: query read.
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+static int
+hugeRead(void *context, char *buffer, int len)
+{
+ if ((context == NULL) || (buffer == NULL) || (len < 0))
+ return (-1);
+
+ if (instate == 0) {
+ if (len >= rlen) {
+ len = rlen;
+ rlen = 0;
+ memcpy(buffer, current, len);
+ instate = 1;
+ curlen = 0;
+ dotlen = maxlen / 10;
+ } else {
+ memcpy(buffer, current, len);
+ rlen -= len;
+ current += len;
+ }
+ } else if (instate == 2) {
+ if (len >= rlen) {
+ len = rlen;
+ rlen = 0;
+ memcpy(buffer, current, len);
+ instate = 3;
+ curlen = 0;
+ } else {
+ memcpy(buffer, current, len);
+ rlen -= len;
+ current += len;
+ }
+ } else if (instate == 1) {
+ if (len > CHUNK) len = CHUNK;
+ memcpy(buffer, &filling[0], len);
+ curlen += len;
+ if (curlen >= maxlen) {
+ rlen = strlen(hugeTests[currentTest].end);
+ current = hugeTests[currentTest].end;
+ instate = 2;
+ } else {
+ if (curlen > dotlen) {
+ fprintf(stderr, ".");
+ dotlen += maxlen / 10;
+ }
+ }
+ } else
+ len = 0;
+ return (len);
+}
+
+/************************************************************************
+ * *
+ * Crazy document generator *
+ * *
+ ************************************************************************/
+
+unsigned int crazy_indx = 0;
+
+const char *crazy = "<?xml version='1.0' encoding='UTF-8'?>\
+<?tst ?>\
+<!-- tst -->\
+<!DOCTYPE foo [\
+<?tst ?>\
+<!-- tst -->\
+<!ELEMENT foo (#PCDATA)>\
+<!ELEMENT p (#PCDATA|emph)* >\
+]>\
+<?tst ?>\
+<!-- tst -->\
+<foo bar='foo'>\
+<?tst ?>\
+<!-- tst -->\
+foo\
+<![CDATA[ ]]>\
+</foo>\
+<?tst ?>\
+<!-- tst -->";
+
+/**
+ * crazyMatch:
+ * @URI: an URI to test
+ *
+ * Check for a crazy: query
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+static int
+crazyMatch(const char * URI) {
+ if ((URI != NULL) && (!strncmp(URI, "crazy:", 6)))
+ return(1);
+ return(0);
+}
+
+/**
+ * crazyOpen:
+ * @URI: an URI to test
+ *
+ * Return a pointer to the crazy: query handler, in this example simply
+ * the current pointer...
+ *
+ * Returns an Input context or NULL in case or error
+ */
+static void *
+crazyOpen(const char * URI) {
+ if ((URI == NULL) || (strncmp(URI, "crazy:", 6)))
+ return(NULL);
+
+ if (crazy_indx > strlen(crazy))
+ return(NULL);
+ reset_timout();
+ rlen = crazy_indx;
+ current = &crazy[0];
+ instate = 0;
+ return((void *) current);
+}
+
+/**
+ * crazyClose:
+ * @context: the read context
+ *
+ * Close the crazy: query handler
+ *
+ * Returns 0 or -1 in case of error
+ */
+static int
+crazyClose(void * context) {
+ if (context == NULL) return(-1);
+ return(0);
+}
+
+
+/**
+ * crazyRead:
+ * @context: the read context
+ * @buffer: where to store data
+ * @len: number of bytes to read
+ *
+ * Implement an crazy: query read.
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+static int
+crazyRead(void *context, char *buffer, int len)
+{
+ if ((context == NULL) || (buffer == NULL) || (len < 0))
+ return (-1);
+
+ if ((check_time() <= 0) && (instate == 1)) {
+ fprintf(stderr, "\ntimeout in crazy(%d)\n", crazy_indx);
+ rlen = strlen(crazy) - crazy_indx;
+ current = &crazy[crazy_indx];
+ instate = 2;
+ }
+ if (instate == 0) {
+ if (len >= rlen) {
+ len = rlen;
+ rlen = 0;
+ memcpy(buffer, current, len);
+ instate = 1;
+ curlen = 0;
+ } else {
+ memcpy(buffer, current, len);
+ rlen -= len;
+ current += len;
+ }
+ } else if (instate == 2) {
+ if (len >= rlen) {
+ len = rlen;
+ rlen = 0;
+ memcpy(buffer, current, len);
+ instate = 3;
+ curlen = 0;
+ } else {
+ memcpy(buffer, current, len);
+ rlen -= len;
+ current += len;
+ }
+ } else if (instate == 1) {
+ if (len > CHUNK) len = CHUNK;
+ memcpy(buffer, &filling[0], len);
+ curlen += len;
+ if (curlen >= maxlen) {
+ rlen = strlen(crazy) - crazy_indx;
+ current = &crazy[crazy_indx];
+ instate = 2;
+ }
+ } else
+ len = 0;
+ return (len);
+}
+/************************************************************************
+ * *
+ * Libxml2 specific routines *
+ * *
+ ************************************************************************/
+
+static int nb_tests = 0;
+static int nb_errors = 0;
+static int nb_leaks = 0;
+static int extraMemoryFromResolver = 0;
+
+/*
+ * We need to trap calls to the resolver to not account memory for the catalog
+ * which is shared to the current running test. We also don't want to have
+ * network downloads modifying tests.
+ */
+static xmlParserInputPtr
+testExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+ int memused = xmlMemUsed();
+
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ extraMemoryFromResolver += xmlMemUsed() - memused;
+
+ return(ret);
+}
+
+/*
+ * Trapping the error messages at the generic level to grab the equivalent of
+ * stderr messages on CLI tools.
+ */
+static char testErrors[32769];
+static int testErrorsSize = 0;
+
+static void XMLCDECL
+channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ va_start(args, msg);
+ res = vsnprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ msg, args);
+ va_end(args);
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+/**
+ * xmlParserPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+
+static void
+xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
+ xmlGenericErrorFunc chanl, void *data ) {
+ const xmlChar *cur, *base;
+ unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
+ xmlChar content[81]; /* space for 80 chars + line terminator */
+ xmlChar *ctnt;
+
+ if (input == NULL) return;
+ cur = input->cur;
+ base = input->base;
+ /* skip backwards over any end-of-lines */
+ while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
+ cur--;
+ }
+ n = 0;
+ /* search backwards for beginning-of-line (to max buff size) */
+ while ((n++ < (sizeof(content)-1)) && (cur > base) &&
+ (*(cur) != '\n') && (*(cur) != '\r'))
+ cur--;
+ if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ /* calculate the error position in terms of the current position */
+ col = input->cur - cur;
+ /* search forward for end-of-line (to max buff size) */
+ n = 0;
+ ctnt = content;
+ /* copy selected text to our buffer */
+ while ((*cur != 0) && (*(cur) != '\n') &&
+ (*(cur) != '\r') && (n < sizeof(content)-1)) {
+ *ctnt++ = *cur++;
+ n++;
+ }
+ *ctnt = 0;
+ /* print out the selected text */
+ chanl(data ,"%s\n", content);
+ /* create blank line with problem pointer */
+ n = 0;
+ ctnt = content;
+ /* (leave buffer space for pointer + line terminator) */
+ while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
+ if (*(ctnt) != '\t')
+ *(ctnt) = ' ';
+ ctnt++;
+ }
+ *ctnt++ = '^';
+ *ctnt = 0;
+ chanl(data ,"%s\n", content);
+}
+
+static void
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+ char *file = NULL;
+ int line = 0;
+ int code = -1;
+ int domain;
+ void *data = NULL;
+ const char *str;
+ const xmlChar *name = NULL;
+ xmlNodePtr node;
+ xmlErrorLevel level;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+ xmlParserCtxtPtr ctxt = NULL;
+
+ if (err == NULL)
+ return;
+
+ file = err->file;
+ line = err->line;
+ code = err->code;
+ domain = err->domain;
+ level = err->level;
+ node = err->node;
+ if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
+ (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
+ (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
+ ctxt = err->ctxt;
+ }
+ str = err->message;
+
+ if (code == XML_ERR_OK)
+ return;
+
+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
+ name = node->name;
+
+ /*
+ * Maintain the compatibility with the legacy error handling
+ */
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ if (input != NULL) {
+ if (input->filename)
+ channel(data, "%s:%d: ", input->filename, input->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", input->line);
+ }
+ } else {
+ if (file != NULL)
+ channel(data, "%s:%d: ", file, line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", line);
+ }
+ if (name != NULL) {
+ channel(data, "element %s: ", name);
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (domain) {
+ case XML_FROM_PARSER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_NAMESPACE:
+ channel(data, "namespace ");
+ break;
+ case XML_FROM_DTD:
+ case XML_FROM_VALID:
+ channel(data, "validity ");
+ break;
+ case XML_FROM_HTML:
+ channel(data, "HTML parser ");
+ break;
+ case XML_FROM_MEMORY:
+ channel(data, "memory ");
+ break;
+ case XML_FROM_OUTPUT:
+ channel(data, "output ");
+ break;
+ case XML_FROM_IO:
+ channel(data, "I/O ");
+ break;
+ case XML_FROM_XINCLUDE:
+ channel(data, "XInclude ");
+ break;
+ case XML_FROM_XPATH:
+ channel(data, "XPath ");
+ break;
+ case XML_FROM_XPOINTER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_REGEXP:
+ channel(data, "regexp ");
+ break;
+ case XML_FROM_MODULE:
+ channel(data, "module ");
+ break;
+ case XML_FROM_SCHEMASV:
+ channel(data, "Schemas validity ");
+ break;
+ case XML_FROM_SCHEMASP:
+ channel(data, "Schemas parser ");
+ break;
+ case XML_FROM_RELAXNGP:
+ channel(data, "Relax-NG parser ");
+ break;
+ case XML_FROM_RELAXNGV:
+ channel(data, "Relax-NG validity ");
+ break;
+ case XML_FROM_CATALOG:
+ channel(data, "Catalog ");
+ break;
+ case XML_FROM_C14N:
+ channel(data, "C14N ");
+ break;
+ case XML_FROM_XSLT:
+ channel(data, "XSLT ");
+ break;
+ default:
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (level) {
+ case XML_ERR_NONE:
+ channel(data, ": ");
+ break;
+ case XML_ERR_WARNING:
+ channel(data, "warning : ");
+ break;
+ case XML_ERR_ERROR:
+ channel(data, "error : ");
+ break;
+ case XML_ERR_FATAL:
+ channel(data, "error : ");
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ if (str != NULL) {
+ int len;
+ len = xmlStrlen((const xmlChar *)str);
+ if ((len > 0) && (str[len - 1] != '\n'))
+ channel(data, "%s\n", str);
+ else
+ channel(data, "%s", str);
+ } else {
+ channel(data, "%s\n", "out of memory error");
+ }
+ if (code == XML_ERR_OK)
+ return;
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContextInternal(input, channel, data);
+ if (cur != NULL) {
+ if (cur->filename)
+ channel(data, "%s:%d: \n", cur->filename, cur->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: \n", cur->line);
+ xmlParserPrintFileContextInternal(cur, channel, data);
+ }
+ }
+ if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
+ (err->int1 < 100) &&
+ (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
+ xmlChar buf[150];
+ int i;
+
+ channel(data, "%s\n", err->str1);
+ for (i=0;i < err->int1;i++)
+ buf[i] = ' ';
+ buf[i++] = '^';
+ buf[i] = 0;
+ channel(data, "%s\n", buf);
+ }
+}
+
+static void
+initializeLibxml2(void) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlInitParser();
+ xmlSetExternalEntityLoader(testExternalEntityLoader);
+ xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler);
+ /*
+ * register the new I/O handlers
+ */
+ if (xmlRegisterInputCallbacks(hugeMatch, hugeOpen,
+ hugeRead, hugeClose) < 0) {
+ fprintf(stderr, "failed to register Huge handlers\n");
+ exit(1);
+ }
+ if (xmlRegisterInputCallbacks(crazyMatch, crazyOpen,
+ crazyRead, crazyClose) < 0) {
+ fprintf(stderr, "failed to register Crazy handlers\n");
+ exit(1);
+ }
+}
+
+/************************************************************************
+ * *
+ * SAX empty callbacks *
+ * *
+ ************************************************************************/
+
+unsigned long callbacks = 0;
+
+/**
+ * isStandaloneCallback:
+ * @ctxt: An XML parser context
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+static int
+isStandaloneCallback(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (0);
+}
+
+/**
+ * hasInternalSubsetCallback:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasInternalSubsetCallback(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (0);
+}
+
+/**
+ * hasExternalSubsetCallback:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasExternalSubsetCallback(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (0);
+}
+
+/**
+ * internalSubsetCallback:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ */
+static void
+internalSubsetCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar * ExternalID ATTRIBUTE_UNUSED,
+ const xmlChar * SystemID ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * externalSubsetCallback:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ */
+static void
+externalSubsetCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar * ExternalID ATTRIBUTE_UNUSED,
+ const xmlChar * SystemID ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * resolveEntityCallback:
+ * @ctxt: An XML parser context
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Special entity resolver, better left to the parser, it has
+ * more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlParserInputPtr
+resolveEntityCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * publicId ATTRIBUTE_UNUSED,
+ const xmlChar * systemId ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (NULL);
+}
+
+/**
+ * getEntityCallback:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlEntityPtr
+getEntityCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (NULL);
+}
+
+/**
+ * getParameterEntityCallback:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlParserInputPtr
+ */
+static xmlEntityPtr
+getParameterEntityCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return (NULL);
+}
+
+
+/**
+ * entityDeclCallback:
+ * @ctxt: An XML parser context
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+static void
+entityDeclCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ const xmlChar * publicId ATTRIBUTE_UNUSED,
+ const xmlChar * systemId ATTRIBUTE_UNUSED,
+ xmlChar * content ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * attributeDeclCallback:
+ * @ctxt: An XML parser context
+ * @name: the attribute name
+ * @type: the attribute type
+ *
+ * An attribute definition has been parsed
+ */
+static void
+attributeDeclCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * elem ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED, int def ATTRIBUTE_UNUSED,
+ const xmlChar * defaultValue ATTRIBUTE_UNUSED,
+ xmlEnumerationPtr tree ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * elementDeclCallback:
+ * @ctxt: An XML parser context
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value (without processing).
+ *
+ * An element definition has been parsed
+ */
+static void
+elementDeclCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * notationDeclCallback:
+ * @ctxt: An XML parser context
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+static void
+notationDeclCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar * publicId ATTRIBUTE_UNUSED,
+ const xmlChar * systemId ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * unparsedEntityDeclCallback:
+ * @ctxt: An XML parser context
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+static void
+unparsedEntityDeclCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar * publicId ATTRIBUTE_UNUSED,
+ const xmlChar * systemId ATTRIBUTE_UNUSED,
+ const xmlChar * notationName ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * setDocumentLocatorCallback:
+ * @ctxt: An XML parser context
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+static void
+setDocumentLocatorCallback(void *ctx ATTRIBUTE_UNUSED,
+ xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * startDocumentCallback:
+ * @ctxt: An XML parser context
+ *
+ * called when the document start being processed.
+ */
+static void
+startDocumentCallback(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * endDocumentCallback:
+ * @ctxt: An XML parser context
+ *
+ * called when the document end has been detected.
+ */
+static void
+endDocumentCallback(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+#if 0
+/**
+ * startElementCallback:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar ** atts ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * endElementCallback:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+#endif
+
+/**
+ * charactersCallback:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+charactersCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * ch ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * referenceCallback:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ */
+static void
+referenceCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * ignorableWhitespaceCallback:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @start: the first char in the string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * Question: how much at a time ???
+ */
+static void
+ignorableWhitespaceCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * ch ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * processingInstructionCallback:
+ * @ctxt: An XML parser context
+ * @target: the target name
+ * @data: the PI data's
+ * @len: the number of xmlChar
+ *
+ * A processing instruction has been parsed.
+ */
+static void
+processingInstructionCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * target ATTRIBUTE_UNUSED,
+ const xmlChar * data ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * cdataBlockCallback:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+static void
+cdataBlockCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * value ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * commentCallback:
+ * @ctxt: An XML parser context
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+static void
+commentCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * value ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * warningCallback:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+warningCallback(void *ctx ATTRIBUTE_UNUSED,
+ const char *msg ATTRIBUTE_UNUSED, ...)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * errorCallback:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
+ ...)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * fatalErrorCallback:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a fatalError messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+fatalErrorCallback(void *ctx ATTRIBUTE_UNUSED,
+ const char *msg ATTRIBUTE_UNUSED, ...)
+{
+ return;
+}
+
+
+/*
+ * SAX2 specific callbacks
+ */
+
+/**
+ * startElementNsCallback:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementNsCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * localname ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED,
+ const xmlChar * URI ATTRIBUTE_UNUSED,
+ int nb_namespaces ATTRIBUTE_UNUSED,
+ const xmlChar ** namespaces ATTRIBUTE_UNUSED,
+ int nb_attributes ATTRIBUTE_UNUSED,
+ int nb_defaulted ATTRIBUTE_UNUSED,
+ const xmlChar ** attributes ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+/**
+ * endElementCallback:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementNsCallback(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * localname ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED,
+ const xmlChar * URI ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ return;
+}
+
+static xmlSAXHandler callbackSAX2HandlerStruct = {
+ internalSubsetCallback,
+ isStandaloneCallback,
+ hasInternalSubsetCallback,
+ hasExternalSubsetCallback,
+ resolveEntityCallback,
+ getEntityCallback,
+ entityDeclCallback,
+ notationDeclCallback,
+ attributeDeclCallback,
+ elementDeclCallback,
+ unparsedEntityDeclCallback,
+ setDocumentLocatorCallback,
+ startDocumentCallback,
+ endDocumentCallback,
+ NULL,
+ NULL,
+ referenceCallback,
+ charactersCallback,
+ ignorableWhitespaceCallback,
+ processingInstructionCallback,
+ commentCallback,
+ warningCallback,
+ errorCallback,
+ fatalErrorCallback,
+ getParameterEntityCallback,
+ cdataBlockCallback,
+ externalSubsetCallback,
+ XML_SAX2_MAGIC,
+ NULL,
+ startElementNsCallback,
+ endElementNsCallback,
+ NULL
+};
+
+static xmlSAXHandlerPtr callbackSAX2Handler = &callbackSAX2HandlerStruct;
+
+/************************************************************************
+ * *
+ * The tests front-ends *
+ * *
+ ************************************************************************/
+
+/**
+ * readerTest:
+ * @filename: the file to parse
+ * @max_size: size of the limit to test
+ * @options: parsing options
+ * @fail: should a failure be reported
+ *
+ * Parse a memory generated file using SAX
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+saxTest(const char *filename, size_t limit, int options, int fail) {
+ int res = 0;
+ xmlParserCtxtPtr ctxt;
+ xmlDocPtr doc;
+ xmlSAXHandlerPtr old_sax;
+
+ nb_tests++;
+
+ maxlen = limit;
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ fprintf(stderr, "Failed to create parser context\n");
+ return(1);
+ }
+ old_sax = ctxt->sax;
+ ctxt->sax = callbackSAX2Handler;
+ ctxt->userData = NULL;
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
+
+ if (doc != NULL) {
+ fprintf(stderr, "SAX parsing generated a document !\n");
+ xmlFreeDoc(doc);
+ res = 0;
+ } else if (ctxt->wellFormed == 0) {
+ if (fail)
+ res = 0;
+ else {
+ fprintf(stderr, "Failed to parse '%s' %lu\n", filename, limit);
+ res = 1;
+ }
+ } else {
+ if (fail) {
+ fprintf(stderr, "Failed to get failure for '%s' %lu\n",
+ filename, limit);
+ res = 1;
+ } else
+ res = 0;
+ }
+ ctxt->sax = old_sax;
+ xmlFreeParserCtxt(ctxt);
+
+ return(res);
+}
+#ifdef LIBXML_READER_ENABLED
+/**
+ * readerTest:
+ * @filename: the file to parse
+ * @max_size: size of the limit to test
+ * @options: parsing options
+ * @fail: should a failure be reported
+ *
+ * Parse a memory generated file using the xmlReader
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+readerTest(const char *filename, size_t limit, int options, int fail) {
+ xmlTextReaderPtr reader;
+ int res = 0;
+ int ret;
+
+ nb_tests++;
+
+ maxlen = limit;
+ reader = xmlReaderForFile(filename , NULL, options);
+ if (reader == NULL) {
+ fprintf(stderr, "Failed to open '%s' test\n", filename);
+ return(1);
+ }
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ ret = xmlTextReaderRead(reader);
+ }
+ if (ret != 0) {
+ if (fail)
+ res = 0;
+ else {
+ if (strncmp(filename, "crazy:", 6) == 0)
+ fprintf(stderr, "Failed to parse '%s' %u\n",
+ filename, crazy_indx);
+ else
+ fprintf(stderr, "Failed to parse '%s' %lu\n",
+ filename, limit);
+ res = 1;
+ }
+ } else {
+ if (fail) {
+ if (strncmp(filename, "crazy:", 6) == 0)
+ fprintf(stderr, "Failed to get failure for '%s' %u\n",
+ filename, crazy_indx);
+ else
+ fprintf(stderr, "Failed to get failure for '%s' %lu\n",
+ filename, limit);
+ res = 1;
+ } else
+ res = 0;
+ }
+ if (timeout)
+ res = 1;
+ xmlFreeTextReader(reader);
+
+ return(res);
+}
+#endif
+
+/************************************************************************
+ * *
+ * Tests descriptions *
+ * *
+ ************************************************************************/
+
+typedef int (*functest) (const char *filename, size_t limit, int options,
+ int fail);
+
+typedef struct limitDesc limitDesc;
+typedef limitDesc *limitDescPtr;
+struct limitDesc {
+ const char *name; /* the huge generator name */
+ size_t limit; /* the limit to test */
+ int options; /* extra parser options */
+ int fail; /* whether the test should fail */
+};
+
+static limitDesc limitDescriptions[] = {
+ /* max length of a text node in content */
+ {"huge:textNode", XML_MAX_TEXT_LENGTH - CHUNK, 0, 0},
+ {"huge:textNode", XML_MAX_TEXT_LENGTH + CHUNK, 0, 1},
+ {"huge:textNode", XML_MAX_TEXT_LENGTH + CHUNK, XML_PARSE_HUGE, 0},
+ /* max length of a text node in content */
+ {"huge:attrNode", XML_MAX_TEXT_LENGTH - CHUNK, 0, 0},
+ {"huge:attrNode", XML_MAX_TEXT_LENGTH + CHUNK, 0, 1},
+ {"huge:attrNode", XML_MAX_TEXT_LENGTH + CHUNK, XML_PARSE_HUGE, 0},
+ /* max length of a comment node */
+ {"huge:commentNode", XML_MAX_TEXT_LENGTH - CHUNK, 0, 0},
+ {"huge:commentNode", XML_MAX_TEXT_LENGTH + CHUNK, 0, 1},
+ {"huge:commentNode", XML_MAX_TEXT_LENGTH + CHUNK, XML_PARSE_HUGE, 0},
+ /* max length of a PI node */
+ {"huge:piNode", XML_MAX_TEXT_LENGTH - CHUNK, 0, 0},
+ {"huge:piNode", XML_MAX_TEXT_LENGTH + CHUNK, 0, 1},
+ {"huge:piNode", XML_MAX_TEXT_LENGTH + CHUNK, XML_PARSE_HUGE, 0},
+};
+
+typedef struct testDesc testDesc;
+typedef testDesc *testDescPtr;
+struct testDesc {
+ const char *desc; /* descripton of the test */
+ functest func; /* function implementing the test */
+};
+
+static
+testDesc testDescriptions[] = {
+ { "Parsing of huge files with the sax parser", saxTest},
+/* { "Parsing of huge files with the tree parser", treeTest}, */
+#ifdef LIBXML_READER_ENABLED
+ { "Parsing of huge files with the reader", readerTest},
+#endif
+ {NULL, NULL}
+};
+
+typedef struct testException testException;
+typedef testException *testExceptionPtr;
+struct testException {
+ unsigned int test; /* the parser test number */
+ unsigned int limit; /* the limit test number */
+ int fail; /* new fail value or -1*/
+ size_t size; /* new limit value or 0 */
+};
+
+static
+testException testExceptions[] = {
+ /* the SAX parser doesn't hit a limit of XML_MAX_TEXT_LENGTH text nodes */
+ { 0, 1, 0, 0},
+};
+
+static int
+launchTests(testDescPtr tst, unsigned int test) {
+ int res = 0, err = 0;
+ unsigned int i, j;
+ size_t limit;
+ int fail;
+
+ if (tst == NULL) return(-1);
+
+ for (i = 0;i < sizeof(limitDescriptions)/sizeof(limitDescriptions[0]);i++) {
+ limit = limitDescriptions[i].limit;
+ fail = limitDescriptions[i].fail;
+ /*
+ * Handle exceptions if any
+ */
+ for (j = 0;j < sizeof(testExceptions)/sizeof(testExceptions[0]);j++) {
+ if ((testExceptions[j].test == test) &&
+ (testExceptions[j].limit == i)) {
+ if (testExceptions[j].fail != -1)
+ fail = testExceptions[j].fail;
+ if (testExceptions[j].size != 0)
+ limit = testExceptions[j].size;
+ break;
+ }
+ }
+ res = tst->func(limitDescriptions[i].name, limit,
+ limitDescriptions[i].options, fail);
+ if (res != 0) {
+ nb_errors++;
+ err++;
+ }
+ }
+ return(err);
+}
+
+
+static int
+runtest(unsigned int i) {
+ int ret = 0, res;
+ int old_errors, old_tests, old_leaks;
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ if ((tests_quiet == 0) && (testDescriptions[i].desc != NULL))
+ printf("## %s\n", testDescriptions[i].desc);
+ res = launchTests(&testDescriptions[i], i);
+ if (res != 0)
+ ret++;
+ if (verbose) {
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ }
+ return(ret);
+}
+
+static int
+launchCrazySAX(unsigned int test, int fail) {
+ int res = 0, err = 0;
+
+ crazy_indx = test;
+
+ res = saxTest("crazy::test", XML_MAX_LOOKUP_LIMIT - CHUNK, 0, fail);
+ if (res != 0) {
+ nb_errors++;
+ err++;
+ }
+ if (tests_quiet == 0)
+ fprintf(stderr, "%c", crazy[test]);
+
+ return(err);
+}
+
+#ifdef LIBXML_READER_ENABLED
+static int
+launchCrazy(unsigned int test, int fail) {
+ int res = 0, err = 0;
+
+ crazy_indx = test;
+
+ res = readerTest("crazy::test", XML_MAX_LOOKUP_LIMIT - CHUNK, 0, fail);
+ if (res != 0) {
+ nb_errors++;
+ err++;
+ }
+ if (tests_quiet == 0)
+ fprintf(stderr, "%c", crazy[test]);
+
+ return(err);
+}
+#endif
+
+static int get_crazy_fail(int test) {
+ /*
+ * adding 1000000 of character 'a' leads to parser failure mostly
+ * everywhere except in those special spots. Need to be updated
+ * each time crazy is updated
+ */
+ int fail = 1;
+ if ((test == 44) || /* PI in Misc */
+ ((test >= 50) && (test <= 55)) || /* Comment in Misc */
+ (test == 79) || /* PI in DTD */
+ ((test >= 85) && (test <= 90)) || /* Comment in DTD */
+ (test == 154) || /* PI in Misc */
+ ((test >= 160) && (test <= 165)) || /* Comment in Misc */
+ ((test >= 178) && (test <= 181)) || /* attribute value */
+ (test == 183) || /* Text */
+ (test == 189) || /* PI in Content */
+ (test == 191) || /* Text */
+ ((test >= 195) && (test <= 200)) || /* Comment in Content */
+ ((test >= 203) && (test <= 206)) || /* Text */
+ (test == 215) || (test == 216) || /* in CDATA */
+ (test == 219) || /* Text */
+ (test == 231) || /* PI in Misc */
+ ((test >= 237) && (test <= 242))) /* Comment in Misc */
+ fail = 0;
+ return(fail);
+}
+
+static int
+runcrazy(void) {
+ int ret = 0, res = 0;
+ int old_errors, old_tests, old_leaks;
+ unsigned int i;
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+
+#ifdef LIBXML_READER_ENABLED
+ if (tests_quiet == 0) {
+ printf("## Crazy tests on reader\n");
+ }
+ for (i = 0;i < strlen(crazy);i++) {
+ res += launchCrazy(i, get_crazy_fail(i));
+ if (res != 0)
+ ret++;
+ }
+#endif
+
+ if (tests_quiet == 0) {
+ printf("\n## Crazy tests on SAX\n");
+ }
+ for (i = 0;i < strlen(crazy);i++) {
+ res += launchCrazySAX(i, get_crazy_fail(i));
+ if (res != 0)
+ ret++;
+ }
+ if (tests_quiet == 0)
+ fprintf(stderr, "\n");
+ if (verbose) {
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ }
+ return(ret);
+}
+
+
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ int i, a, ret = 0;
+ int subset = 0;
+
+ fillFilling();
+ initializeLibxml2();
+
+ for (a = 1; a < argc;a++) {
+ if (!strcmp(argv[a], "-v"))
+ verbose = 1;
+ else if (!strcmp(argv[a], "-quiet"))
+ tests_quiet = 1;
+ else if (!strcmp(argv[a], "-crazy"))
+ subset = 1;
+ }
+ if (subset == 0) {
+ for (i = 0; testDescriptions[i].func != NULL; i++) {
+ ret += runtest(i);
+ }
+ }
+ ret += runcrazy();
+ if ((nb_errors == 0) && (nb_leaks == 0)) {
+ ret = 0;
+ printf("Total %d tests, no errors\n",
+ nb_tests);
+ } else {
+ ret = 1;
+ printf("Total %d tests, %d errors, %d leaks\n",
+ nb_tests, nb_errors, nb_leaks);
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(ret);
+}
diff --git a/testrecurse.c b/testrecurse.c
new file mode 100644
index 0000000..e5d5d1b
--- /dev/null
+++ b/testrecurse.c
@@ -0,0 +1,965 @@
+/*
+ * testrecurse.c: C program to run libxml2 regression tests checking entities
+ * recursions
+ *
+ * To compile on Unixes:
+ * cc -o testrecurse `xml2-config --cflags` testrecurse.c `xml2-config --libs` -lpthread
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+#include <stdio.h>
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/uri.h>
+#ifdef LIBXML_READER_ENABLED
+#include <libxml/xmlreader.h>
+#endif
+
+/*
+ * O_BINARY is just for Windows compatibility - if it isn't defined
+ * on this system, avoid any compilation error
+ */
+#ifdef O_BINARY
+#define RD_FLAGS O_RDONLY | O_BINARY
+#else
+#define RD_FLAGS O_RDONLY
+#endif
+
+typedef int (*functest) (const char *filename, const char *result,
+ const char *error, int options);
+
+typedef struct testDesc testDesc;
+typedef testDesc *testDescPtr;
+struct testDesc {
+ const char *desc; /* descripton of the test */
+ functest func; /* function implementing the test */
+ const char *in; /* glob to path for input files */
+ const char *out; /* output directory */
+ const char *suffix;/* suffix for output files */
+ const char *err; /* suffix for error output files */
+ int options; /* parser options for the test */
+};
+
+static int checkTestFile(const char *filename);
+
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
+#include <windows.h>
+#include <io.h>
+
+typedef struct
+{
+ size_t gl_pathc; /* Count of paths matched so far */
+ char **gl_pathv; /* List of matched pathnames. */
+ size_t gl_offs; /* Slots to reserve in 'gl_pathv'. */
+} glob_t;
+
+#define GLOB_DOOFFS 0
+static int glob(const char *pattern, int flags,
+ int errfunc(const char *epath, int eerrno),
+ glob_t *pglob) {
+ glob_t *ret;
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ unsigned int nb_paths = 0;
+ char directory[500];
+ int len;
+
+ if ((pattern == NULL) || (pglob == NULL)) return(-1);
+
+ strncpy(directory, pattern, 499);
+ for (len = strlen(directory);len >= 0;len--) {
+ if (directory[len] == '/') {
+ len++;
+ directory[len] = 0;
+ break;
+ }
+ }
+ if (len <= 0)
+ len = 0;
+
+
+ ret = pglob;
+ memset(ret, 0, sizeof(glob_t));
+
+ hFind = FindFirstFileA(pattern, &FindFileData);
+ if (hFind == INVALID_HANDLE_VALUE)
+ return(0);
+ nb_paths = 20;
+ ret->gl_pathv = (char **) malloc(nb_paths * sizeof(char *));
+ if (ret->gl_pathv == NULL) {
+ FindClose(hFind);
+ return(-1);
+ }
+ strncpy(directory + len, FindFileData.cFileName, 499 - len);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
+ if (ret->gl_pathv[ret->gl_pathc] == NULL)
+ goto done;
+ ret->gl_pathc++;
+ while(FindNextFileA(hFind, &FindFileData)) {
+ if (FindFileData.cFileName[0] == '.')
+ continue;
+ if (ret->gl_pathc + 2 > nb_paths) {
+ char **tmp = realloc(ret->gl_pathv, nb_paths * 2 * sizeof(char *));
+ if (tmp == NULL)
+ break;
+ ret->gl_pathv = tmp;
+ nb_paths *= 2;
+ }
+ strncpy(directory + len, FindFileData.cFileName, 499 - len);
+ ret->gl_pathv[ret->gl_pathc] = strdup(directory);
+ if (ret->gl_pathv[ret->gl_pathc] == NULL)
+ break;
+ ret->gl_pathc++;
+ }
+ ret->gl_pathv[ret->gl_pathc] = NULL;
+
+done:
+ FindClose(hFind);
+ return(0);
+}
+
+
+
+static void globfree(glob_t *pglob) {
+ unsigned int i;
+ if (pglob == NULL)
+ return;
+
+ for (i = 0;i < pglob->gl_pathc;i++) {
+ if (pglob->gl_pathv[i] != NULL)
+ free(pglob->gl_pathv[i]);
+ }
+}
+
+#else
+#include <glob.h>
+#endif
+
+/************************************************************************
+ * *
+ * Huge document generator *
+ * *
+ ************************************************************************/
+
+#include <libxml/xmlIO.h>
+
+
+static const char *start = "<!DOCTYPE foo [\
+<!ENTITY f 'some internal data'> \
+<!ENTITY e '&f;&f;'> \
+<!ENTITY d '&e;&e;'> \
+]> \
+<foo>";
+
+static const char *segment = " <bar>&e; &f; &d;</bar>\n";
+static const char *finish = "</foo>";
+
+static int curseg = 0;
+static const char *current;
+static int rlen;
+
+/**
+ * hugeMatch:
+ * @URI: an URI to test
+ *
+ * Check for an huge: query
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+static int
+hugeMatch(const char * URI) {
+ if ((URI != NULL) && (!strncmp(URI, "huge:", 4)))
+ return(1);
+ return(0);
+}
+
+/**
+ * hugeOpen:
+ * @URI: an URI to test
+ *
+ * Return a pointer to the huge: query handler, in this example simply
+ * the current pointer...
+ *
+ * Returns an Input context or NULL in case or error
+ */
+static void *
+hugeOpen(const char * URI) {
+ if ((URI == NULL) || (strncmp(URI, "huge:", 4)))
+ return(NULL);
+ rlen = strlen(start);
+ current = start;
+ return((void *) current);
+}
+
+/**
+ * hugeClose:
+ * @context: the read context
+ *
+ * Close the huge: query handler
+ *
+ * Returns 0 or -1 in case of error
+ */
+static int
+hugeClose(void * context) {
+ if (context == NULL) return(-1);
+ return(0);
+}
+
+#define MAX_NODES 1000000
+
+/**
+ * hugeRead:
+ * @context: the read context
+ * @buffer: where to store data
+ * @len: number of bytes to read
+ *
+ * Implement an huge: query read.
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+static int
+hugeRead(void *context, char *buffer, int len)
+{
+ if ((context == NULL) || (buffer == NULL) || (len < 0))
+ return (-1);
+
+ if (len >= rlen) {
+ if (curseg >= MAX_NODES + 1) {
+ rlen = 0;
+ return(0);
+ }
+ len = rlen;
+ rlen = 0;
+ memcpy(buffer, current, len);
+ curseg ++;
+ if (curseg == MAX_NODES) {
+ fprintf(stderr, "\n");
+ rlen = strlen(finish);
+ current = finish;
+ } else {
+ if (curseg % (MAX_NODES / 10) == 0)
+ fprintf(stderr, ".");
+ rlen = strlen(segment);
+ current = segment;
+ }
+ } else {
+ memcpy(buffer, current, len);
+ rlen -= len;
+ current += len;
+ }
+ return (len);
+}
+
+/************************************************************************
+ * *
+ * Libxml2 specific routines *
+ * *
+ ************************************************************************/
+
+static int nb_tests = 0;
+static int nb_errors = 0;
+static int nb_leaks = 0;
+static int extraMemoryFromResolver = 0;
+
+static int
+fatalError(void) {
+ fprintf(stderr, "Exitting tests on fatal error\n");
+ exit(1);
+}
+
+/*
+ * We need to trap calls to the resolver to not account memory for the catalog
+ * which is shared to the current running test. We also don't want to have
+ * network downloads modifying tests.
+ */
+static xmlParserInputPtr
+testExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+
+ if (checkTestFile(URL)) {
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ } else {
+ int memused = xmlMemUsed();
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ extraMemoryFromResolver += xmlMemUsed() - memused;
+ }
+
+ return(ret);
+}
+
+/*
+ * Trapping the error messages at the generic level to grab the equivalent of
+ * stderr messages on CLI tools.
+ */
+static char testErrors[32769];
+static int testErrorsSize = 0;
+
+static void XMLCDECL
+channel(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
+ va_list args;
+ int res;
+
+ if (testErrorsSize >= 32768)
+ return;
+ va_start(args, msg);
+ res = vsnprintf(&testErrors[testErrorsSize],
+ 32768 - testErrorsSize,
+ msg, args);
+ va_end(args);
+ if (testErrorsSize + res >= 32768) {
+ /* buffer is full */
+ testErrorsSize = 32768;
+ testErrors[testErrorsSize] = 0;
+ } else {
+ testErrorsSize += res;
+ }
+ testErrors[testErrorsSize] = 0;
+}
+
+/**
+ * xmlParserPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+
+static void
+xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
+ xmlGenericErrorFunc chanl, void *data ) {
+ const xmlChar *cur, *base;
+ unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
+ xmlChar content[81]; /* space for 80 chars + line terminator */
+ xmlChar *ctnt;
+
+ if (input == NULL) return;
+ cur = input->cur;
+ base = input->base;
+ /* skip backwards over any end-of-lines */
+ while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
+ cur--;
+ }
+ n = 0;
+ /* search backwards for beginning-of-line (to max buff size) */
+ while ((n++ < (sizeof(content)-1)) && (cur > base) &&
+ (*(cur) != '\n') && (*(cur) != '\r'))
+ cur--;
+ if ((*(cur) == '\n') || (*(cur) == '\r')) cur++;
+ /* calculate the error position in terms of the current position */
+ col = input->cur - cur;
+ /* search forward for end-of-line (to max buff size) */
+ n = 0;
+ ctnt = content;
+ /* copy selected text to our buffer */
+ while ((*cur != 0) && (*(cur) != '\n') &&
+ (*(cur) != '\r') && (n < sizeof(content)-1)) {
+ *ctnt++ = *cur++;
+ n++;
+ }
+ *ctnt = 0;
+ /* print out the selected text */
+ chanl(data ,"%s\n", content);
+ /* create blank line with problem pointer */
+ n = 0;
+ ctnt = content;
+ /* (leave buffer space for pointer + line terminator) */
+ while ((n<col) && (n++ < sizeof(content)-2) && (*ctnt != 0)) {
+ if (*(ctnt) != '\t')
+ *(ctnt) = ' ';
+ ctnt++;
+ }
+ *ctnt++ = '^';
+ *ctnt = 0;
+ chanl(data ,"%s\n", content);
+}
+
+static void
+testStructuredErrorHandler(void *ctx ATTRIBUTE_UNUSED, xmlErrorPtr err) {
+ char *file = NULL;
+ int line = 0;
+ int code = -1;
+ int domain;
+ void *data = NULL;
+ const char *str;
+ const xmlChar *name = NULL;
+ xmlNodePtr node;
+ xmlErrorLevel level;
+ xmlParserInputPtr input = NULL;
+ xmlParserInputPtr cur = NULL;
+ xmlParserCtxtPtr ctxt = NULL;
+
+ if (err == NULL)
+ return;
+
+ file = err->file;
+ line = err->line;
+ code = err->code;
+ domain = err->domain;
+ level = err->level;
+ node = err->node;
+ if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
+ (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
+ (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
+ ctxt = err->ctxt;
+ }
+ str = err->message;
+
+ if (code == XML_ERR_OK)
+ return;
+
+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
+ name = node->name;
+
+ /*
+ * Maintain the compatibility with the legacy error handling
+ */
+ if (ctxt != NULL) {
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) &&
+ (ctxt->inputNr > 1)) {
+ cur = input;
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+ if (input != NULL) {
+ if (input->filename)
+ channel(data, "%s:%d: ", input->filename, input->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", input->line);
+ }
+ } else {
+ if (file != NULL)
+ channel(data, "%s:%d: ", file, line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: ", line);
+ }
+ if (name != NULL) {
+ channel(data, "element %s: ", name);
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (domain) {
+ case XML_FROM_PARSER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_NAMESPACE:
+ channel(data, "namespace ");
+ break;
+ case XML_FROM_DTD:
+ case XML_FROM_VALID:
+ channel(data, "validity ");
+ break;
+ case XML_FROM_HTML:
+ channel(data, "HTML parser ");
+ break;
+ case XML_FROM_MEMORY:
+ channel(data, "memory ");
+ break;
+ case XML_FROM_OUTPUT:
+ channel(data, "output ");
+ break;
+ case XML_FROM_IO:
+ channel(data, "I/O ");
+ break;
+ case XML_FROM_XINCLUDE:
+ channel(data, "XInclude ");
+ break;
+ case XML_FROM_XPATH:
+ channel(data, "XPath ");
+ break;
+ case XML_FROM_XPOINTER:
+ channel(data, "parser ");
+ break;
+ case XML_FROM_REGEXP:
+ channel(data, "regexp ");
+ break;
+ case XML_FROM_MODULE:
+ channel(data, "module ");
+ break;
+ case XML_FROM_SCHEMASV:
+ channel(data, "Schemas validity ");
+ break;
+ case XML_FROM_SCHEMASP:
+ channel(data, "Schemas parser ");
+ break;
+ case XML_FROM_RELAXNGP:
+ channel(data, "Relax-NG parser ");
+ break;
+ case XML_FROM_RELAXNGV:
+ channel(data, "Relax-NG validity ");
+ break;
+ case XML_FROM_CATALOG:
+ channel(data, "Catalog ");
+ break;
+ case XML_FROM_C14N:
+ channel(data, "C14N ");
+ break;
+ case XML_FROM_XSLT:
+ channel(data, "XSLT ");
+ break;
+ default:
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ switch (level) {
+ case XML_ERR_NONE:
+ channel(data, ": ");
+ break;
+ case XML_ERR_WARNING:
+ channel(data, "warning : ");
+ break;
+ case XML_ERR_ERROR:
+ channel(data, "error : ");
+ break;
+ case XML_ERR_FATAL:
+ channel(data, "error : ");
+ break;
+ }
+ if (code == XML_ERR_OK)
+ return;
+ if (str != NULL) {
+ int len;
+ len = xmlStrlen((const xmlChar *)str);
+ if ((len > 0) && (str[len - 1] != '\n'))
+ channel(data, "%s\n", str);
+ else
+ channel(data, "%s", str);
+ } else {
+ channel(data, "%s\n", "out of memory error");
+ }
+ if (code == XML_ERR_OK)
+ return;
+
+ if (ctxt != NULL) {
+ xmlParserPrintFileContextInternal(input, channel, data);
+ if (cur != NULL) {
+ if (cur->filename)
+ channel(data, "%s:%d: \n", cur->filename, cur->line);
+ else if ((line != 0) && (domain == XML_FROM_PARSER))
+ channel(data, "Entity: line %d: \n", cur->line);
+ xmlParserPrintFileContextInternal(cur, channel, data);
+ }
+ }
+ if ((domain == XML_FROM_XPATH) && (err->str1 != NULL) &&
+ (err->int1 < 100) &&
+ (err->int1 < xmlStrlen((const xmlChar *)err->str1))) {
+ xmlChar buf[150];
+ int i;
+
+ channel(data, "%s\n", err->str1);
+ for (i=0;i < err->int1;i++)
+ buf[i] = ' ';
+ buf[i++] = '^';
+ buf[i] = 0;
+ channel(data, "%s\n", buf);
+ }
+}
+
+static void
+initializeLibxml2(void) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+
+ xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
+ xmlInitParser();
+ xmlSetExternalEntityLoader(testExternalEntityLoader);
+ xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler);
+ /*
+ * register the new I/O handlers
+ */
+ if (xmlRegisterInputCallbacks(hugeMatch, hugeOpen,
+ hugeRead, hugeClose) < 0) {
+ fprintf(stderr, "failed to register Huge handler\n");
+ exit(1);
+ }
+}
+
+/************************************************************************
+ * *
+ * File name and path utilities *
+ * *
+ ************************************************************************/
+
+static const char *baseFilename(const char *filename) {
+ const char *cur;
+ if (filename == NULL)
+ return(NULL);
+ cur = &filename[strlen(filename)];
+ while ((cur > filename) && (*cur != '/'))
+ cur--;
+ if (*cur == '/')
+ return(cur + 1);
+ return(cur);
+}
+
+static char *resultFilename(const char *filename, const char *out,
+ const char *suffix) {
+ const char *base;
+ char res[500];
+ char suffixbuff[500];
+
+/*************
+ if ((filename[0] == 't') && (filename[1] == 'e') &&
+ (filename[2] == 's') && (filename[3] == 't') &&
+ (filename[4] == '/'))
+ filename = &filename[5];
+ *************/
+
+ base = baseFilename(filename);
+ if (suffix == NULL)
+ suffix = ".tmp";
+ if (out == NULL)
+ out = "";
+
+ strncpy(suffixbuff,suffix,499);
+#ifdef VMS
+ if(strstr(base,".") && suffixbuff[0]=='.')
+ suffixbuff[0]='_';
+#endif
+
+ snprintf(res, 499, "%s%s%s", out, base, suffixbuff);
+ res[499] = 0;
+ return(strdup(res));
+}
+
+static int checkTestFile(const char *filename) {
+ struct stat buf;
+
+ if (stat(filename, &buf) == -1)
+ return(0);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ if (!(buf.st_mode & _S_IFREG))
+ return(0);
+#else
+ if (!S_ISREG(buf.st_mode))
+ return(0);
+#endif
+
+ return(1);
+}
+
+
+
+/************************************************************************
+ * *
+ * Test to detect or not recursive entities *
+ * *
+ ************************************************************************/
+/**
+ * recursiveDetectTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file loading DTD and replacing entities check it fails for
+ * lol cases
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+recursiveDetectTest(const char *filename,
+ const char *result ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ xmlDocPtr doc;
+ xmlParserCtxtPtr ctxt;
+ int res = 0;
+
+ nb_tests++;
+
+ ctxt = xmlNewParserCtxt();
+ /*
+ * base of the test, parse with the old API
+ */
+ doc = xmlCtxtReadFile(ctxt, filename, NULL,
+ XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
+ if ((doc != NULL) || (ctxt->lastError.code != XML_ERR_ENTITY_LOOP)) {
+ fprintf(stderr, "Failed to detect recursion in %s\n", filename);
+ xmlFreeParserCtxt(ctxt);
+ xmlFreeDoc(doc);
+ return(1);
+ }
+ xmlFreeParserCtxt(ctxt);
+
+ return(res);
+}
+
+/**
+ * notRecursiveDetectTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a file loading DTD and replacing entities check it works for
+ * good cases
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+notRecursiveDetectTest(const char *filename,
+ const char *result ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ xmlDocPtr doc;
+ xmlParserCtxtPtr ctxt;
+ int res = 0;
+
+ nb_tests++;
+
+ ctxt = xmlNewParserCtxt();
+ /*
+ * base of the test, parse with the old API
+ */
+ doc = xmlCtxtReadFile(ctxt, filename, NULL,
+ XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
+ if (doc == NULL) {
+ fprintf(stderr, "Failed to parse correct file %s\n", filename);
+ xmlFreeParserCtxt(ctxt);
+ return(1);
+ }
+ xmlFreeDoc(doc);
+ xmlFreeParserCtxt(ctxt);
+
+ return(res);
+}
+
+#ifdef LIBXML_READER_ENABLED
+/**
+ * notRecursiveHugeTest:
+ * @filename: the file to parse
+ * @result: the file with expected result
+ * @err: the file with error messages: unused
+ *
+ * Parse a memory generated file
+ * good cases
+ *
+ * Returns 0 in case of success, an error code otherwise
+ */
+static int
+notRecursiveHugeTest(const char *filename ATTRIBUTE_UNUSED,
+ const char *result ATTRIBUTE_UNUSED,
+ const char *err ATTRIBUTE_UNUSED,
+ int options ATTRIBUTE_UNUSED) {
+ xmlTextReaderPtr reader;
+ int res = 0;
+ int ret;
+
+ nb_tests++;
+
+ reader = xmlReaderForFile("huge:test" , NULL,
+ XML_PARSE_NOENT | XML_PARSE_DTDLOAD);
+ if (reader == NULL) {
+ fprintf(stderr, "Failed to open huge:test\n");
+ return(1);
+ }
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ ret = xmlTextReaderRead(reader);
+ }
+ if (ret != 0) {
+ fprintf(stderr, "Failed to parser huge:test with entities\n");
+ res = 1;
+ }
+ xmlFreeTextReader(reader);
+
+ return(res);
+}
+#endif
+
+/************************************************************************
+ * *
+ * Tests Descriptions *
+ * *
+ ************************************************************************/
+
+static
+testDesc testDescriptions[] = {
+ { "Parsing recursive test cases" ,
+ recursiveDetectTest, "./test/recurse/lol*.xml", NULL, NULL, NULL,
+ 0 },
+ { "Parsing non-recursive test cases" ,
+ notRecursiveDetectTest, "./test/recurse/good*.xml", NULL, NULL, NULL,
+ 0 },
+#ifdef LIBXML_READER_ENABLED
+ { "Parsing non-recursive huge case" ,
+ notRecursiveHugeTest, NULL, NULL, NULL, NULL,
+ 0 },
+#endif
+ {NULL, NULL, NULL, NULL, NULL, NULL, 0}
+};
+
+/************************************************************************
+ * *
+ * The main code driving the tests *
+ * *
+ ************************************************************************/
+
+static int
+launchTests(testDescPtr tst) {
+ int res = 0, err = 0;
+ size_t i;
+ char *result;
+ char *error;
+ int mem;
+
+ if (tst == NULL) return(-1);
+ if (tst->in != NULL) {
+ glob_t globbuf;
+
+ globbuf.gl_offs = 0;
+ glob(tst->in, GLOB_DOOFFS, NULL, &globbuf);
+ for (i = 0;i < globbuf.gl_pathc;i++) {
+ if (!checkTestFile(globbuf.gl_pathv[i]))
+ continue;
+ if (tst->suffix != NULL) {
+ result = resultFilename(globbuf.gl_pathv[i], tst->out,
+ tst->suffix);
+ if (result == NULL) {
+ fprintf(stderr, "Out of memory !\n");
+ fatalError();
+ }
+ } else {
+ result = NULL;
+ }
+ if (tst->err != NULL) {
+ error = resultFilename(globbuf.gl_pathv[i], tst->out,
+ tst->err);
+ if (error == NULL) {
+ fprintf(stderr, "Out of memory !\n");
+ fatalError();
+ }
+ } else {
+ error = NULL;
+ }
+ if ((result) &&(!checkTestFile(result))) {
+ fprintf(stderr, "Missing result file %s\n", result);
+ } else if ((error) &&(!checkTestFile(error))) {
+ fprintf(stderr, "Missing error file %s\n", error);
+ } else {
+ mem = xmlMemUsed();
+ extraMemoryFromResolver = 0;
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ res = tst->func(globbuf.gl_pathv[i], result, error,
+ tst->options | XML_PARSE_COMPACT);
+ xmlResetLastError();
+ if (res != 0) {
+ fprintf(stderr, "File %s generated an error\n",
+ globbuf.gl_pathv[i]);
+ nb_errors++;
+ err++;
+ }
+ else if (xmlMemUsed() != mem) {
+ if ((xmlMemUsed() != mem) &&
+ (extraMemoryFromResolver == 0)) {
+ fprintf(stderr, "File %s leaked %d bytes\n",
+ globbuf.gl_pathv[i], xmlMemUsed() - mem);
+ nb_leaks++;
+ err++;
+ }
+ }
+ testErrorsSize = 0;
+ }
+ if (result)
+ free(result);
+ if (error)
+ free(error);
+ }
+ globfree(&globbuf);
+ } else {
+ testErrorsSize = 0;
+ testErrors[0] = 0;
+ extraMemoryFromResolver = 0;
+ res = tst->func(NULL, NULL, NULL, tst->options);
+ if (res != 0) {
+ nb_errors++;
+ err++;
+ }
+ }
+ return(err);
+}
+
+static int verbose = 0;
+static int tests_quiet = 0;
+
+static int
+runtest(int i) {
+ int ret = 0, res;
+ int old_errors, old_tests, old_leaks;
+
+ old_errors = nb_errors;
+ old_tests = nb_tests;
+ old_leaks = nb_leaks;
+ if ((tests_quiet == 0) && (testDescriptions[i].desc != NULL))
+ printf("## %s\n", testDescriptions[i].desc);
+ res = launchTests(&testDescriptions[i]);
+ if (res != 0)
+ ret++;
+ if (verbose) {
+ if ((nb_errors == old_errors) && (nb_leaks == old_leaks))
+ printf("Ran %d tests, no errors\n", nb_tests - old_tests);
+ else
+ printf("Ran %d tests, %d errors, %d leaks\n",
+ nb_tests - old_tests,
+ nb_errors - old_errors,
+ nb_leaks - old_leaks);
+ }
+ return(ret);
+}
+
+int
+main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ int i, a, ret = 0;
+ int subset = 0;
+
+ initializeLibxml2();
+
+ for (a = 1; a < argc;a++) {
+ if (!strcmp(argv[a], "-v"))
+ verbose = 1;
+ else if (!strcmp(argv[a], "-quiet"))
+ tests_quiet = 1;
+ else {
+ for (i = 0; testDescriptions[i].func != NULL; i++) {
+ if (strstr(testDescriptions[i].desc, argv[a])) {
+ ret += runtest(i);
+ subset++;
+ }
+ }
+ }
+ }
+ if (subset == 0) {
+ for (i = 0; testDescriptions[i].func != NULL; i++) {
+ ret += runtest(i);
+ }
+ }
+ if ((nb_errors == 0) && (nb_leaks == 0)) {
+ ret = 0;
+ printf("Total %d tests, no errors\n",
+ nb_tests);
+ } else {
+ ret = 1;
+ printf("Total %d tests, %d errors, %d leaks\n",
+ nb_tests, nb_errors, nb_leaks);
+ }
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(ret);
+}
diff --git a/threads.c b/threads.c
new file mode 100644
index 0000000..8921204
--- /dev/null
+++ b/threads.c
@@ -0,0 +1,1039 @@
+/**
+ * threads.c: set of generic threading related routines
+ *
+ * See Copyright for the status of this software.
+ *
+ * Gary Pennington <Gary.Pennington@uk.sun.com>
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#elif defined HAVE_WIN32_THREADS
+#include <windows.h>
+#ifndef HAVE_COMPILER_TLS
+#include <process.h>
+#endif
+#endif
+
+#ifdef HAVE_BEOS_THREADS
+#include <OS.h>
+#include <TLS.h>
+#endif
+
+#if defined(SOLARIS)
+#include <note.h>
+#endif
+
+/* #define DEBUG_THREADS */
+
+#ifdef HAVE_PTHREAD_H
+
+static int libxml_is_threaded = -1;
+#ifdef __GNUC__
+#ifdef linux
+#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
+extern int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void))
+ __attribute((weak));
+extern void *pthread_getspecific (pthread_key_t __key)
+ __attribute((weak));
+extern int pthread_setspecific (pthread_key_t __key,
+ __const void *__pointer)
+ __attribute((weak));
+extern int pthread_key_create (pthread_key_t *__key,
+ void (*__destr_function) (void *))
+ __attribute((weak));
+extern int pthread_key_delete (pthread_key_t __key)
+ __attribute((weak));
+extern int pthread_mutex_init ()
+ __attribute((weak));
+extern int pthread_mutex_destroy ()
+ __attribute((weak));
+extern int pthread_mutex_lock ()
+ __attribute((weak));
+extern int pthread_mutex_unlock ()
+ __attribute((weak));
+extern int pthread_cond_init ()
+ __attribute((weak));
+extern int pthread_cond_destroy ()
+ __attribute((weak));
+extern int pthread_cond_wait ()
+ __attribute((weak));
+extern int pthread_equal ()
+ __attribute((weak));
+extern pthread_t pthread_self ()
+ __attribute((weak));
+extern int pthread_key_create ()
+ __attribute((weak));
+extern int pthread_key_delete ()
+ __attribute((weak));
+extern int pthread_cond_signal ()
+ __attribute((weak));
+#endif
+#endif /* linux */
+#endif /* __GNUC__ */
+#endif /* HAVE_PTHREAD_H */
+
+/*
+ * TODO: this module still uses malloc/free and not xmlMalloc/xmlFree
+ * to avoid some crazyness since xmlMalloc/xmlFree may actually
+ * be hosted on allocated blocks needing them for the allocation ...
+ */
+
+/*
+ * xmlMutex are a simple mutual exception locks
+ */
+struct _xmlMutex {
+#ifdef HAVE_PTHREAD_H
+ pthread_mutex_t lock;
+#elif defined HAVE_WIN32_THREADS
+ HANDLE mutex;
+#elif defined HAVE_BEOS_THREADS
+ sem_id sem;
+ thread_id tid;
+#else
+ int empty;
+#endif
+};
+
+/*
+ * xmlRMutex are reentrant mutual exception locks
+ */
+struct _xmlRMutex {
+#ifdef HAVE_PTHREAD_H
+ pthread_mutex_t lock;
+ unsigned int held;
+ unsigned int waiters;
+ pthread_t tid;
+ pthread_cond_t cv;
+#elif defined HAVE_WIN32_THREADS
+ CRITICAL_SECTION cs;
+ unsigned int count;
+#elif defined HAVE_BEOS_THREADS
+ xmlMutexPtr lock;
+ thread_id tid;
+ int32 count;
+#else
+ int empty;
+#endif
+};
+
+/*
+ * This module still has some internal static data.
+ * - xmlLibraryLock a global lock
+ * - globalkey used for per-thread data
+ */
+
+#ifdef HAVE_PTHREAD_H
+static pthread_key_t globalkey;
+static pthread_t mainthread;
+static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+static pthread_once_t once_control_init = PTHREAD_ONCE_INIT;
+static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER;
+#elif defined HAVE_WIN32_THREADS
+#if defined(HAVE_COMPILER_TLS)
+static __declspec(thread) xmlGlobalState tlstate;
+static __declspec(thread) int tlstate_inited = 0;
+#else /* HAVE_COMPILER_TLS */
+static DWORD globalkey = TLS_OUT_OF_INDEXES;
+#endif /* HAVE_COMPILER_TLS */
+static DWORD mainthread;
+static struct {
+ DWORD done;
+ DWORD control;
+} run_once = { 0, 0};
+static volatile LPCRITICAL_SECTION global_init_lock = NULL;
+
+/* endif HAVE_WIN32_THREADS */
+#elif defined HAVE_BEOS_THREADS
+int32 globalkey = 0;
+thread_id mainthread = 0;
+int32 run_once_init = 0;
+static int32 global_init_lock = -1;
+static vint32 global_init_count = 0;
+#endif
+
+static xmlRMutexPtr xmlLibraryLock = NULL;
+
+#ifdef LIBXML_THREAD_ENABLED
+static void xmlOnceInit(void);
+#endif
+
+/**
+ * xmlNewMutex:
+ *
+ * xmlNewMutex() is used to allocate a libxml2 token struct for use in
+ * synchronizing access to data.
+ *
+ * Returns a new simple mutex pointer or NULL in case of error
+ */
+xmlMutexPtr
+xmlNewMutex(void)
+{
+ xmlMutexPtr tok;
+
+ if ((tok = malloc(sizeof(xmlMutex))) == NULL)
+ return (NULL);
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0)
+ pthread_mutex_init(&tok->lock, NULL);
+#elif defined HAVE_WIN32_THREADS
+ tok->mutex = CreateMutex(NULL, FALSE, NULL);
+#elif defined HAVE_BEOS_THREADS
+ if ((tok->sem = create_sem(1, "xmlMutex")) < B_OK) {
+ free(tok);
+ return NULL;
+ }
+ tok->tid = -1;
+#endif
+ return (tok);
+}
+
+/**
+ * xmlFreeMutex:
+ * @tok: the simple mutex
+ *
+ * xmlFreeMutex() is used to reclaim resources associated with a libxml2 token
+ * struct.
+ */
+void
+xmlFreeMutex(xmlMutexPtr tok)
+{
+ if (tok == NULL)
+ return;
+
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0)
+ pthread_mutex_destroy(&tok->lock);
+#elif defined HAVE_WIN32_THREADS
+ CloseHandle(tok->mutex);
+#elif defined HAVE_BEOS_THREADS
+ delete_sem(tok->sem);
+#endif
+ free(tok);
+}
+
+/**
+ * xmlMutexLock:
+ * @tok: the simple mutex
+ *
+ * xmlMutexLock() is used to lock a libxml2 token.
+ */
+void
+xmlMutexLock(xmlMutexPtr tok)
+{
+ if (tok == NULL)
+ return;
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0)
+ pthread_mutex_lock(&tok->lock);
+#elif defined HAVE_WIN32_THREADS
+ WaitForSingleObject(tok->mutex, INFINITE);
+#elif defined HAVE_BEOS_THREADS
+ if (acquire_sem(tok->sem) != B_NO_ERROR) {
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMutexLock():BeOS:Couldn't aquire semaphore\n");
+#endif
+ }
+ tok->tid = find_thread(NULL);
+#endif
+
+}
+
+/**
+ * xmlMutexUnlock:
+ * @tok: the simple mutex
+ *
+ * xmlMutexUnlock() is used to unlock a libxml2 token.
+ */
+void
+xmlMutexUnlock(xmlMutexPtr tok)
+{
+ if (tok == NULL)
+ return;
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0)
+ pthread_mutex_unlock(&tok->lock);
+#elif defined HAVE_WIN32_THREADS
+ ReleaseMutex(tok->mutex);
+#elif defined HAVE_BEOS_THREADS
+ if (tok->tid == find_thread(NULL)) {
+ tok->tid = -1;
+ release_sem(tok->sem);
+ }
+#endif
+}
+
+/**
+ * xmlNewRMutex:
+ *
+ * xmlRNewMutex() is used to allocate a reentrant mutex for use in
+ * synchronizing access to data. token_r is a re-entrant lock and thus useful
+ * for synchronizing access to data structures that may be manipulated in a
+ * recursive fashion.
+ *
+ * Returns the new reentrant mutex pointer or NULL in case of error
+ */
+xmlRMutexPtr
+xmlNewRMutex(void)
+{
+ xmlRMutexPtr tok;
+
+ if ((tok = malloc(sizeof(xmlRMutex))) == NULL)
+ return (NULL);
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0) {
+ pthread_mutex_init(&tok->lock, NULL);
+ tok->held = 0;
+ tok->waiters = 0;
+ pthread_cond_init(&tok->cv, NULL);
+ }
+#elif defined HAVE_WIN32_THREADS
+ InitializeCriticalSection(&tok->cs);
+ tok->count = 0;
+#elif defined HAVE_BEOS_THREADS
+ if ((tok->lock = xmlNewMutex()) == NULL) {
+ free(tok);
+ return NULL;
+ }
+ tok->count = 0;
+#endif
+ return (tok);
+}
+
+/**
+ * xmlFreeRMutex:
+ * @tok: the reentrant mutex
+ *
+ * xmlRFreeMutex() is used to reclaim resources associated with a
+ * reentrant mutex.
+ */
+void
+xmlFreeRMutex(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
+{
+ if (tok == NULL)
+ return;
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded != 0) {
+ pthread_mutex_destroy(&tok->lock);
+ pthread_cond_destroy(&tok->cv);
+ }
+#elif defined HAVE_WIN32_THREADS
+ DeleteCriticalSection(&tok->cs);
+#elif defined HAVE_BEOS_THREADS
+ xmlFreeMutex(tok->lock);
+#endif
+ free(tok);
+}
+
+/**
+ * xmlRMutexLock:
+ * @tok: the reentrant mutex
+ *
+ * xmlRMutexLock() is used to lock a libxml2 token_r.
+ */
+void
+xmlRMutexLock(xmlRMutexPtr tok)
+{
+ if (tok == NULL)
+ return;
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded == 0)
+ return;
+
+ pthread_mutex_lock(&tok->lock);
+ if (tok->held) {
+ if (pthread_equal(tok->tid, pthread_self())) {
+ tok->held++;
+ pthread_mutex_unlock(&tok->lock);
+ return;
+ } else {
+ tok->waiters++;
+ while (tok->held)
+ pthread_cond_wait(&tok->cv, &tok->lock);
+ tok->waiters--;
+ }
+ }
+ tok->tid = pthread_self();
+ tok->held = 1;
+ pthread_mutex_unlock(&tok->lock);
+#elif defined HAVE_WIN32_THREADS
+ EnterCriticalSection(&tok->cs);
+ tok->count++;
+#elif defined HAVE_BEOS_THREADS
+ if (tok->lock->tid == find_thread(NULL)) {
+ tok->count++;
+ return;
+ } else {
+ xmlMutexLock(tok->lock);
+ tok->count = 1;
+ }
+#endif
+}
+
+/**
+ * xmlRMutexUnlock:
+ * @tok: the reentrant mutex
+ *
+ * xmlRMutexUnlock() is used to unlock a libxml2 token_r.
+ */
+void
+xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
+{
+ if (tok == NULL)
+ return;
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded == 0)
+ return;
+
+ pthread_mutex_lock(&tok->lock);
+ tok->held--;
+ if (tok->held == 0) {
+ if (tok->waiters)
+ pthread_cond_signal(&tok->cv);
+ memset(&tok->tid, 0, sizeof(tok->tid));
+ }
+ pthread_mutex_unlock(&tok->lock);
+#elif defined HAVE_WIN32_THREADS
+ if (tok->count > 0) {
+ LeaveCriticalSection(&tok->cs);
+ tok->count--;
+ }
+#elif defined HAVE_BEOS_THREADS
+ if (tok->lock->tid == find_thread(NULL)) {
+ tok->count--;
+ if (tok->count == 0) {
+ xmlMutexUnlock(tok->lock);
+ }
+ return;
+ }
+#endif
+}
+
+/**
+ * xmlGlobalInitMutexLock
+ *
+ * Makes sure that the global initialization mutex is initialized and
+ * locks it.
+ */
+void
+__xmlGlobalInitMutexLock(void)
+{
+ /* Make sure the global init lock is initialized and then lock it. */
+#ifdef HAVE_PTHREAD_H
+ /* The mutex is statically initialized, so we just lock it. */
+ if (pthread_mutex_lock != NULL)
+ pthread_mutex_lock(&global_init_lock);
+#elif defined HAVE_WIN32_THREADS
+ LPCRITICAL_SECTION cs;
+
+ /* Create a new critical section */
+ if (global_init_lock == NULL) {
+ cs = malloc(sizeof(CRITICAL_SECTION));
+ if (cs == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGlobalInitMutexLock: out of memory\n");
+ return;
+ }
+ InitializeCriticalSection(cs);
+
+ /* Swap it into the global_init_lock */
+#ifdef InterlockedCompareExchangePointer
+ InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);
+#else /* Use older void* version */
+ InterlockedCompareExchange((void **) &global_init_lock,
+ (void *) cs, NULL);
+#endif /* InterlockedCompareExchangePointer */
+
+ /* If another thread successfully recorded its critical
+ * section in the global_init_lock then discard the one
+ * allocated by this thread. */
+ if (global_init_lock != cs) {
+ DeleteCriticalSection(cs);
+ free(cs);
+ }
+ }
+
+ /* Lock the chosen critical section */
+ EnterCriticalSection(global_init_lock);
+#elif defined HAVE_BEOS_THREADS
+ int32 sem;
+
+ /* Allocate a new semaphore */
+ sem = create_sem(1, "xmlGlobalinitMutex");
+
+ while (global_init_lock == -1) {
+ if (atomic_add(&global_init_count, 1) == 0) {
+ global_init_lock = sem;
+ } else {
+ snooze(1);
+ atomic_add(&global_init_count, -1);
+ }
+ }
+
+ /* If another thread successfully recorded its critical
+ * section in the global_init_lock then discard the one
+ * allocated by this thread. */
+ if (global_init_lock != sem)
+ delete_sem(sem);
+
+ /* Acquire the chosen semaphore */
+ if (acquire_sem(global_init_lock) != B_NO_ERROR) {
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGlobalInitMutexLock():BeOS:Couldn't acquire semaphore\n");
+#endif
+ }
+#endif
+}
+
+void
+__xmlGlobalInitMutexUnlock(void)
+{
+#ifdef HAVE_PTHREAD_H
+ if (pthread_mutex_unlock != NULL)
+ pthread_mutex_unlock(&global_init_lock);
+#elif defined HAVE_WIN32_THREADS
+ if (global_init_lock != NULL) {
+ LeaveCriticalSection(global_init_lock);
+ }
+#elif defined HAVE_BEOS_THREADS
+ release_sem(global_init_lock);
+#endif
+}
+
+/**
+ * xmlGlobalInitMutexDestroy
+ *
+ * Makes sure that the global initialization mutex is destroyed before
+ * application termination.
+ */
+void
+__xmlGlobalInitMutexDestroy(void)
+{
+#ifdef HAVE_PTHREAD_H
+#elif defined HAVE_WIN32_THREADS
+ if (global_init_lock != NULL) {
+ DeleteCriticalSection(global_init_lock);
+ free(global_init_lock);
+ global_init_lock = NULL;
+ }
+#endif
+}
+
+/************************************************************************
+ * *
+ * Per thread global state handling *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_THREAD_ENABLED
+#ifdef xmlLastError
+#undef xmlLastError
+#endif
+
+/**
+ * xmlFreeGlobalState:
+ * @state: a thread global state
+ *
+ * xmlFreeGlobalState() is called when a thread terminates with a non-NULL
+ * global state. It is is used here to reclaim memory resources.
+ */
+static void
+xmlFreeGlobalState(void *state)
+{
+ xmlGlobalState *gs = (xmlGlobalState *) state;
+
+ /* free any memory allocated in the thread's xmlLastError */
+ xmlResetError(&(gs->xmlLastError));
+ free(state);
+}
+
+/**
+ * xmlNewGlobalState:
+ *
+ * xmlNewGlobalState() allocates a global state. This structure is used to
+ * hold all data for use by a thread when supporting backwards compatibility
+ * of libxml2 to pre-thread-safe behaviour.
+ *
+ * Returns the newly allocated xmlGlobalStatePtr or NULL in case of error
+ */
+static xmlGlobalStatePtr
+xmlNewGlobalState(void)
+{
+ xmlGlobalState *gs;
+
+ gs = malloc(sizeof(xmlGlobalState));
+ if (gs == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGetGlobalState: out of memory\n");
+ return (NULL);
+ }
+
+ memset(gs, 0, sizeof(xmlGlobalState));
+ xmlInitializeGlobalState(gs);
+ return (gs);
+}
+#endif /* LIBXML_THREAD_ENABLED */
+
+#ifdef HAVE_PTHREAD_H
+#elif defined HAVE_WIN32_THREADS
+#if !defined(HAVE_COMPILER_TLS)
+#if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL)
+typedef struct _xmlGlobalStateCleanupHelperParams {
+ HANDLE thread;
+ void *memory;
+} xmlGlobalStateCleanupHelperParams;
+
+static void XMLCDECL
+xmlGlobalStateCleanupHelper(void *p)
+{
+ xmlGlobalStateCleanupHelperParams *params =
+ (xmlGlobalStateCleanupHelperParams *) p;
+ WaitForSingleObject(params->thread, INFINITE);
+ CloseHandle(params->thread);
+ xmlFreeGlobalState(params->memory);
+ free(params);
+ _endthread();
+}
+#else /* LIBXML_STATIC && !LIBXML_STATIC_FOR_DLL */
+
+typedef struct _xmlGlobalStateCleanupHelperParams {
+ void *memory;
+ struct _xmlGlobalStateCleanupHelperParams *prev;
+ struct _xmlGlobalStateCleanupHelperParams *next;
+} xmlGlobalStateCleanupHelperParams;
+
+static xmlGlobalStateCleanupHelperParams *cleanup_helpers_head = NULL;
+static CRITICAL_SECTION cleanup_helpers_cs;
+
+#endif /* LIBXMLSTATIC && !LIBXML_STATIC_FOR_DLL */
+#endif /* HAVE_COMPILER_TLS */
+#endif /* HAVE_WIN32_THREADS */
+
+#if defined HAVE_BEOS_THREADS
+
+/**
+ * xmlGlobalStateCleanup:
+ * @data: unused parameter
+ *
+ * Used for Beos only
+ */
+void
+xmlGlobalStateCleanup(void *data)
+{
+ void *globalval = tls_get(globalkey);
+
+ if (globalval != NULL)
+ xmlFreeGlobalState(globalval);
+}
+#endif
+
+/**
+ * xmlGetGlobalState:
+ *
+ * xmlGetGlobalState() is called to retrieve the global state for a thread.
+ *
+ * Returns the thread global state or NULL in case of error
+ */
+xmlGlobalStatePtr
+xmlGetGlobalState(void)
+{
+#ifdef HAVE_PTHREAD_H
+ xmlGlobalState *globalval;
+
+ if (libxml_is_threaded == 0)
+ return (NULL);
+
+ pthread_once(&once_control, xmlOnceInit);
+
+ if ((globalval = (xmlGlobalState *)
+ pthread_getspecific(globalkey)) == NULL) {
+ xmlGlobalState *tsd = xmlNewGlobalState();
+ if (tsd == NULL)
+ return(NULL);
+
+ pthread_setspecific(globalkey, tsd);
+ return (tsd);
+ }
+ return (globalval);
+#elif defined HAVE_WIN32_THREADS
+#if defined(HAVE_COMPILER_TLS)
+ if (!tlstate_inited) {
+ tlstate_inited = 1;
+ xmlInitializeGlobalState(&tlstate);
+ }
+ return &tlstate;
+#else /* HAVE_COMPILER_TLS */
+ xmlGlobalState *globalval;
+ xmlGlobalStateCleanupHelperParams *p;
+
+ xmlOnceInit();
+#if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL)
+ globalval = (xmlGlobalState *) TlsGetValue(globalkey);
+#else
+ p = (xmlGlobalStateCleanupHelperParams *) TlsGetValue(globalkey);
+ globalval = (xmlGlobalState *) (p ? p->memory : NULL);
+#endif
+ if (globalval == NULL) {
+ xmlGlobalState *tsd = xmlNewGlobalState();
+
+ if (tsd == NULL)
+ return(NULL);
+ p = (xmlGlobalStateCleanupHelperParams *)
+ malloc(sizeof(xmlGlobalStateCleanupHelperParams));
+ if (p == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGetGlobalState: out of memory\n");
+ xmlFreeGlobalState(tsd);
+ return(NULL);
+ }
+ p->memory = tsd;
+#if defined(LIBXML_STATIC) && !defined(LIBXML_STATIC_FOR_DLL)
+ DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
+ GetCurrentProcess(), &p->thread, 0, TRUE,
+ DUPLICATE_SAME_ACCESS);
+ TlsSetValue(globalkey, tsd);
+ _beginthread(xmlGlobalStateCleanupHelper, 0, p);
+#else
+ EnterCriticalSection(&cleanup_helpers_cs);
+ if (cleanup_helpers_head != NULL) {
+ cleanup_helpers_head->prev = p;
+ }
+ p->next = cleanup_helpers_head;
+ p->prev = NULL;
+ cleanup_helpers_head = p;
+ TlsSetValue(globalkey, p);
+ LeaveCriticalSection(&cleanup_helpers_cs);
+#endif
+
+ return (tsd);
+ }
+ return (globalval);
+#endif /* HAVE_COMPILER_TLS */
+#elif defined HAVE_BEOS_THREADS
+ xmlGlobalState *globalval;
+
+ xmlOnceInit();
+
+ if ((globalval = (xmlGlobalState *) tls_get(globalkey)) == NULL) {
+ xmlGlobalState *tsd = xmlNewGlobalState();
+ if (tsd == NULL)
+ return (NULL);
+
+ tls_set(globalkey, tsd);
+ on_exit_thread(xmlGlobalStateCleanup, NULL);
+ return (tsd);
+ }
+ return (globalval);
+#else
+ return (NULL);
+#endif
+}
+
+/************************************************************************
+ * *
+ * Library wide thread interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlGetThreadId:
+ *
+ * xmlGetThreadId() find the current thread ID number
+ * Note that this is likely to be broken on some platforms using pthreads
+ * as the specification doesn't mandate pthread_t to be an integer type
+ *
+ * Returns the current thread ID number
+ */
+int
+xmlGetThreadId(void)
+{
+#ifdef HAVE_PTHREAD_H
+ pthread_t id;
+ int ret;
+
+ if (libxml_is_threaded == 0)
+ return (0);
+ id = pthread_self();
+ /* horrible but preserves compat, see warning above */
+ memcpy(&ret, &id, sizeof(ret));
+ return (ret);
+#elif defined HAVE_WIN32_THREADS
+ return GetCurrentThreadId();
+#elif defined HAVE_BEOS_THREADS
+ return find_thread(NULL);
+#else
+ return ((int) 0);
+#endif
+}
+
+/**
+ * xmlIsMainThread:
+ *
+ * xmlIsMainThread() check whether the current thread is the main thread.
+ *
+ * Returns 1 if the current thread is the main thread, 0 otherwise
+ */
+int
+xmlIsMainThread(void)
+{
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded == -1)
+ xmlInitThreads();
+ if (libxml_is_threaded == 0)
+ return (1);
+ pthread_once(&once_control, xmlOnceInit);
+#elif defined HAVE_WIN32_THREADS
+ xmlOnceInit();
+#elif defined HAVE_BEOS_THREADS
+ xmlOnceInit();
+#endif
+
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext, "xmlIsMainThread()\n");
+#endif
+#ifdef HAVE_PTHREAD_H
+ return (pthread_equal(mainthread,pthread_self()));
+#elif defined HAVE_WIN32_THREADS
+ return (mainthread == GetCurrentThreadId());
+#elif defined HAVE_BEOS_THREADS
+ return (mainthread == find_thread(NULL));
+#else
+ return (1);
+#endif
+}
+
+/**
+ * xmlLockLibrary:
+ *
+ * xmlLockLibrary() is used to take out a re-entrant lock on the libxml2
+ * library.
+ */
+void
+xmlLockLibrary(void)
+{
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext, "xmlLockLibrary()\n");
+#endif
+ xmlRMutexLock(xmlLibraryLock);
+}
+
+/**
+ * xmlUnlockLibrary:
+ *
+ * xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2
+ * library.
+ */
+void
+xmlUnlockLibrary(void)
+{
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext, "xmlUnlockLibrary()\n");
+#endif
+ xmlRMutexUnlock(xmlLibraryLock);
+}
+
+/**
+ * xmlInitThreads:
+ *
+ * xmlInitThreads() is used to to initialize all the thread related
+ * data of the libxml2 library.
+ */
+void
+xmlInitThreads(void)
+{
+#ifdef HAVE_PTHREAD_H
+ if (libxml_is_threaded == -1) {
+ if ((pthread_once != NULL) &&
+ (pthread_getspecific != NULL) &&
+ (pthread_setspecific != NULL) &&
+ (pthread_key_create != NULL) &&
+ (pthread_key_delete != NULL) &&
+ (pthread_mutex_init != NULL) &&
+ (pthread_mutex_destroy != NULL) &&
+ (pthread_mutex_lock != NULL) &&
+ (pthread_mutex_unlock != NULL) &&
+ (pthread_cond_init != NULL) &&
+ (pthread_cond_destroy != NULL) &&
+ (pthread_cond_wait != NULL) &&
+ (pthread_equal != NULL) &&
+ (pthread_self != NULL) &&
+ (pthread_cond_signal != NULL)) {
+ libxml_is_threaded = 1;
+
+/* fprintf(stderr, "Running multithreaded\n"); */
+ } else {
+
+/* fprintf(stderr, "Running without multithread\n"); */
+ libxml_is_threaded = 0;
+ }
+ }
+#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
+ InitializeCriticalSection(&cleanup_helpers_cs);
+#endif
+}
+
+/**
+ * xmlCleanupThreads:
+ *
+ * xmlCleanupThreads() is used to to cleanup all the thread related
+ * data of the libxml2 library once processing has ended.
+ *
+ * WARNING: if your application is multithreaded or has plugin support
+ * calling this may crash the application if another thread or
+ * a plugin is still using libxml2. It's sometimes very hard to
+ * guess if libxml2 is in use in the application, some libraries
+ * or plugins may use it without notice. In case of doubt abstain
+ * from calling this function or do it just before calling exit()
+ * to avoid leak reports from valgrind !
+ */
+void
+xmlCleanupThreads(void)
+{
+#ifdef DEBUG_THREADS
+ xmlGenericError(xmlGenericErrorContext, "xmlCleanupThreads()\n");
+#endif
+#ifdef HAVE_PTHREAD_H
+ if ((libxml_is_threaded) && (pthread_key_delete != NULL))
+ pthread_key_delete(globalkey);
+ once_control = once_control_init;
+#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
+ if (globalkey != TLS_OUT_OF_INDEXES) {
+ xmlGlobalStateCleanupHelperParams *p;
+
+ EnterCriticalSection(&cleanup_helpers_cs);
+ p = cleanup_helpers_head;
+ while (p != NULL) {
+ xmlGlobalStateCleanupHelperParams *temp = p;
+
+ p = p->next;
+ xmlFreeGlobalState(temp->memory);
+ free(temp);
+ }
+ cleanup_helpers_head = 0;
+ LeaveCriticalSection(&cleanup_helpers_cs);
+ TlsFree(globalkey);
+ globalkey = TLS_OUT_OF_INDEXES;
+ }
+ DeleteCriticalSection(&cleanup_helpers_cs);
+#endif
+}
+
+#ifdef LIBXML_THREAD_ENABLED
+
+/**
+ * xmlOnceInit
+ *
+ * xmlOnceInit() is used to initialize the value of mainthread for use
+ * in other routines. This function should only be called using
+ * pthread_once() in association with the once_control variable to ensure
+ * that the function is only called once. See man pthread_once for more
+ * details.
+ */
+static void
+xmlOnceInit(void)
+{
+#ifdef HAVE_PTHREAD_H
+ (void) pthread_key_create(&globalkey, xmlFreeGlobalState);
+ mainthread = pthread_self();
+ __xmlInitializeDict();
+#elif defined(HAVE_WIN32_THREADS)
+ if (!run_once.done) {
+ if (InterlockedIncrement(&run_once.control) == 1) {
+#if !defined(HAVE_COMPILER_TLS)
+ globalkey = TlsAlloc();
+#endif
+ mainthread = GetCurrentThreadId();
+ __xmlInitializeDict();
+ run_once.done = 1;
+ } else {
+ /* Another thread is working; give up our slice and
+ * wait until they're done. */
+ while (!run_once.done)
+ Sleep(0);
+ }
+ }
+#elif defined HAVE_BEOS_THREADS
+ if (atomic_add(&run_once_init, 1) == 0) {
+ globalkey = tls_allocate();
+ tls_set(globalkey, NULL);
+ mainthread = find_thread(NULL);
+ __xmlInitializeDict();
+ } else
+ atomic_add(&run_once_init, -1);
+#endif
+}
+#endif
+
+/**
+ * DllMain:
+ * @hinstDLL: handle to DLL instance
+ * @fdwReason: Reason code for entry
+ * @lpvReserved: generic pointer (depends upon reason code)
+ *
+ * Entry point for Windows library. It is being used to free thread-specific
+ * storage.
+ *
+ * Returns TRUE always
+ */
+#ifdef HAVE_PTHREAD_H
+#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
+#if defined(LIBXML_STATIC_FOR_DLL)
+BOOL XMLCALL
+xmlDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+#else
+BOOL WINAPI
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+#endif
+{
+ switch (fdwReason) {
+ case DLL_THREAD_DETACH:
+ if (globalkey != TLS_OUT_OF_INDEXES) {
+ xmlGlobalState *globalval = NULL;
+ xmlGlobalStateCleanupHelperParams *p =
+ (xmlGlobalStateCleanupHelperParams *)
+ TlsGetValue(globalkey);
+ globalval = (xmlGlobalState *) (p ? p->memory : NULL);
+ if (globalval) {
+ xmlFreeGlobalState(globalval);
+ TlsSetValue(globalkey, NULL);
+ }
+ if (p) {
+ EnterCriticalSection(&cleanup_helpers_cs);
+ if (p == cleanup_helpers_head)
+ cleanup_helpers_head = p->next;
+ else
+ p->prev->next = p->next;
+ if (p->next != NULL)
+ p->next->prev = p->prev;
+ LeaveCriticalSection(&cleanup_helpers_cs);
+ free(p);
+ }
+ }
+ break;
+ }
+ return TRUE;
+}
+#endif
+#define bottom_threads
+#include "elfgcchack.h"
diff --git a/timsort.h b/timsort.h
new file mode 100644
index 0000000..efa3aab
--- /dev/null
+++ b/timsort.h
@@ -0,0 +1,514 @@
+/*
+ * taken from https://github.com/swenson/sort
+ * Kept as is for the moment to be able to apply upstream patches for that
+ * code, currently used only to speed up XPath node sorting, see xpath.c
+ */
+
+/*
+ * All code in this header, unless otherwise specified, is hereby licensed under the MIT Public License:
+
+Copyright (c) 2010 Christopher Swenson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#elif defined(WIN32)
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#endif
+#endif
+
+#ifndef MK_UINT64
+#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER < 1300
+#define MK_UINT64(x) ((uint64_t)(x))
+#else
+#define MK_UINT64(x) x##ULL
+#endif
+#endif
+
+#ifndef MAX
+#define MAX(x,y) (((x) > (y) ? (x) : (y)))
+#endif
+#ifndef MIN
+#define MIN(x,y) (((x) < (y) ? (x) : (y)))
+#endif
+
+int compute_minrun(uint64_t);
+
+#ifndef CLZ
+#if defined(__GNUC__) && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ > 3))
+#define CLZ __builtin_clzll
+#else
+
+int clzll(uint64_t);
+
+/* adapted from Hacker's Delight */
+int clzll(uint64_t x) /* {{{ */
+{
+ int n;
+
+ if (x == 0) return(64);
+ n = 0;
+ if (x <= MK_UINT64(0x00000000FFFFFFFF)) {n = n + 32; x = x << 32;}
+ if (x <= MK_UINT64(0x0000FFFFFFFFFFFF)) {n = n + 16; x = x << 16;}
+ if (x <= MK_UINT64(0x00FFFFFFFFFFFFFF)) {n = n + 8; x = x << 8;}
+ if (x <= MK_UINT64(0x0FFFFFFFFFFFFFFF)) {n = n + 4; x = x << 4;}
+ if (x <= MK_UINT64(0x3FFFFFFFFFFFFFFF)) {n = n + 2; x = x << 2;}
+ if (x <= MK_UINT64(0x7FFFFFFFFFFFFFFF)) {n = n + 1;}
+ return n;
+}
+/* }}} */
+
+#define CLZ clzll
+#endif
+#endif
+
+int compute_minrun(uint64_t size) /* {{{ */
+{
+ const int top_bit = 64 - CLZ(size);
+ const int shift = MAX(top_bit, 6) - 6;
+ const int minrun = size >> shift;
+ const uint64_t mask = (MK_UINT64(1) << shift) - 1;
+ if (mask & size) return minrun + 1;
+ return minrun;
+}
+/* }}} */
+
+#ifndef SORT_NAME
+#error "Must declare SORT_NAME"
+#endif
+
+#ifndef SORT_TYPE
+#error "Must declare SORT_TYPE"
+#endif
+
+#ifndef SORT_CMP
+#define SORT_CMP(x, y) ((x) < (y) ? -1 : ((x) == (y) ? 0 : 1))
+#endif
+
+
+#define SORT_SWAP(x,y) {SORT_TYPE __SORT_SWAP_t = (x); (x) = (y); (y) = __SORT_SWAP_t;}
+
+#define SORT_CONCAT(x, y) x ## _ ## y
+#define SORT_MAKE_STR1(x, y) SORT_CONCAT(x,y)
+#define SORT_MAKE_STR(x) SORT_MAKE_STR1(SORT_NAME,x)
+
+#define BINARY_INSERTION_FIND SORT_MAKE_STR(binary_insertion_find)
+#define BINARY_INSERTION_SORT_START SORT_MAKE_STR(binary_insertion_sort_start)
+#define BINARY_INSERTION_SORT SORT_MAKE_STR(binary_insertion_sort)
+#define REVERSE_ELEMENTS SORT_MAKE_STR(reverse_elements)
+#define COUNT_RUN SORT_MAKE_STR(count_run)
+#define CHECK_INVARIANT SORT_MAKE_STR(check_invariant)
+#define TIM_SORT SORT_MAKE_STR(tim_sort)
+#define TIM_SORT_RESIZE SORT_MAKE_STR(tim_sort_resize)
+#define TIM_SORT_MERGE SORT_MAKE_STR(tim_sort_merge)
+#define TIM_SORT_COLLAPSE SORT_MAKE_STR(tim_sort_collapse)
+
+#define TIM_SORT_RUN_T SORT_MAKE_STR(tim_sort_run_t)
+#define TEMP_STORAGE_T SORT_MAKE_STR(temp_storage_t)
+
+typedef struct {
+ int64_t start;
+ int64_t length;
+} TIM_SORT_RUN_T;
+
+void BINARY_INSERTION_SORT(SORT_TYPE *dst, const size_t size);
+void TIM_SORT(SORT_TYPE *dst, const size_t size);
+
+/* Function used to do a binary search for binary insertion sort */
+static int64_t BINARY_INSERTION_FIND(SORT_TYPE *dst, const SORT_TYPE x, const size_t size)
+{
+ int64_t l, c, r;
+ SORT_TYPE lx;
+ SORT_TYPE cx;
+ l = 0;
+ r = size - 1;
+ c = r >> 1;
+ lx = dst[l];
+
+ /* check for beginning conditions */
+ if (SORT_CMP(x, lx) < 0)
+ return 0;
+ else if (SORT_CMP(x, lx) == 0)
+ {
+ int64_t i = 1;
+ while (SORT_CMP(x, dst[i]) == 0) i++;
+ return i;
+ }
+
+ cx = dst[c];
+ while (1)
+ {
+ const int val = SORT_CMP(x, cx);
+ if (val < 0)
+ {
+ if (c - l <= 1) return c;
+ r = c;
+ }
+ else if (val > 0)
+ {
+ if (r - c <= 1) return c + 1;
+ l = c;
+ lx = cx;
+ }
+ else
+ {
+ do
+ {
+ cx = dst[++c];
+ } while (SORT_CMP(x, cx) == 0);
+ return c;
+ }
+ c = l + ((r - l) >> 1);
+ cx = dst[c];
+ }
+}
+
+/* Binary insertion sort, but knowing that the first "start" entries are sorted. Used in timsort. */
+static void BINARY_INSERTION_SORT_START(SORT_TYPE *dst, const size_t start, const size_t size)
+{
+ int64_t i;
+ for (i = start; i < (int64_t) size; i++)
+ {
+ int64_t j;
+ SORT_TYPE x;
+ int64_t location;
+ /* If this entry is already correct, just move along */
+ if (SORT_CMP(dst[i - 1], dst[i]) <= 0) continue;
+
+ /* Else we need to find the right place, shift everything over, and squeeze in */
+ x = dst[i];
+ location = BINARY_INSERTION_FIND(dst, x, i);
+ for (j = i - 1; j >= location; j--)
+ {
+ dst[j + 1] = dst[j];
+ }
+ dst[location] = x;
+ }
+}
+
+/* Binary insertion sort */
+void BINARY_INSERTION_SORT(SORT_TYPE *dst, const size_t size)
+{
+ BINARY_INSERTION_SORT_START(dst, 1, size);
+}
+
+/* timsort implementation, based on timsort.txt */
+
+static void REVERSE_ELEMENTS(SORT_TYPE *dst, int64_t start, int64_t end)
+{
+ while (1)
+ {
+ if (start >= end) return;
+ SORT_SWAP(dst[start], dst[end]);
+ start++;
+ end--;
+ }
+}
+
+static int64_t COUNT_RUN(SORT_TYPE *dst, const int64_t start, const size_t size)
+{
+ int64_t curr;
+ if (size - start == 1) return 1;
+ if (start >= (int64_t) size - 2)
+ {
+ if (SORT_CMP(dst[size - 2], dst[size - 1]) > 0)
+ SORT_SWAP(dst[size - 2], dst[size - 1]);
+ return 2;
+ }
+
+ curr = start + 2;
+
+ if (SORT_CMP(dst[start], dst[start + 1]) <= 0)
+ {
+ /* increasing run */
+ while (1)
+ {
+ if (curr == (int64_t) size - 1) break;
+ if (SORT_CMP(dst[curr - 1], dst[curr]) > 0) break;
+ curr++;
+ }
+ return curr - start;
+ }
+ else
+ {
+ /* decreasing run */
+ while (1)
+ {
+ if (curr == (int64_t) size - 1) break;
+ if (SORT_CMP(dst[curr - 1], dst[curr]) <= 0) break;
+ curr++;
+ }
+ /* reverse in-place */
+ REVERSE_ELEMENTS(dst, start, curr - 1);
+ return curr - start;
+ }
+}
+
+#define PUSH_NEXT() do {\
+len = COUNT_RUN(dst, curr, size);\
+run = minrun;\
+if (run < minrun) run = minrun;\
+if (run > (int64_t) size - curr) run = size - curr;\
+if (run > len)\
+{\
+ BINARY_INSERTION_SORT_START(&dst[curr], len, run);\
+ len = run;\
+}\
+{\
+run_stack[stack_curr].start = curr;\
+run_stack[stack_curr].length = len;\
+stack_curr++;\
+}\
+curr += len;\
+if (curr == (int64_t) size)\
+{\
+ /* finish up */ \
+ while (stack_curr > 1) \
+ { \
+ TIM_SORT_MERGE(dst, run_stack, stack_curr, store); \
+ run_stack[stack_curr - 2].length += run_stack[stack_curr - 1].length; \
+ stack_curr--; \
+ } \
+ if (store->storage != NULL)\
+ {\
+ free(store->storage);\
+ store->storage = NULL;\
+ }\
+ return;\
+}\
+}\
+while (0)
+
+static int CHECK_INVARIANT(TIM_SORT_RUN_T *stack, const int stack_curr)
+{
+ int64_t A, B, C;
+ if (stack_curr < 2) return 1;
+ if (stack_curr == 2)
+ {
+ const int64_t A1 = stack[stack_curr - 2].length;
+ const int64_t B1 = stack[stack_curr - 1].length;
+ if (A1 <= B1) return 0;
+ return 1;
+ }
+ A = stack[stack_curr - 3].length;
+ B = stack[stack_curr - 2].length;
+ C = stack[stack_curr - 1].length;
+ if ((A <= B + C) || (B <= C)) return 0;
+ return 1;
+}
+
+typedef struct {
+ size_t alloc;
+ SORT_TYPE *storage;
+} TEMP_STORAGE_T;
+
+
+static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
+{
+ if (store->alloc < new_size)
+ {
+ SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
+ if (tempstore == NULL)
+ {
+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
+ exit(1);
+ }
+ store->storage = tempstore;
+ store->alloc = new_size;
+ }
+}
+
+static void TIM_SORT_MERGE(SORT_TYPE *dst, const TIM_SORT_RUN_T *stack, const int stack_curr, TEMP_STORAGE_T *store)
+{
+ const int64_t A = stack[stack_curr - 2].length;
+ const int64_t B = stack[stack_curr - 1].length;
+ const int64_t curr = stack[stack_curr - 2].start;
+ SORT_TYPE *storage;
+ int64_t i, j, k;
+
+ TIM_SORT_RESIZE(store, MIN(A, B));
+ storage = store->storage;
+
+ /* left merge */
+ if (A < B)
+ {
+ memcpy(storage, &dst[curr], A * sizeof(SORT_TYPE));
+ i = 0;
+ j = curr + A;
+
+ for (k = curr; k < curr + A + B; k++)
+ {
+ if ((i < A) && (j < curr + A + B))
+ {
+ if (SORT_CMP(storage[i], dst[j]) <= 0)
+ dst[k] = storage[i++];
+ else
+ dst[k] = dst[j++];
+ }
+ else if (i < A)
+ {
+ dst[k] = storage[i++];
+ }
+ else
+ dst[k] = dst[j++];
+ }
+ }
+ /* right merge */
+ else
+ {
+ memcpy(storage, &dst[curr + A], B * sizeof(SORT_TYPE));
+ i = B - 1;
+ j = curr + A - 1;
+
+ for (k = curr + A + B - 1; k >= curr; k--)
+ {
+ if ((i >= 0) && (j >= curr))
+ {
+ if (SORT_CMP(dst[j], storage[i]) > 0)
+ dst[k] = dst[j--];
+ else
+ dst[k] = storage[i--];
+ }
+ else if (i >= 0)
+ dst[k] = storage[i--];
+ else
+ dst[k] = dst[j--];
+ }
+ }
+}
+
+static int TIM_SORT_COLLAPSE(SORT_TYPE *dst, TIM_SORT_RUN_T *stack, int stack_curr, TEMP_STORAGE_T *store, const size_t size)
+{
+ while (1)
+ {
+ int64_t A, B, C;
+ /* if the stack only has one thing on it, we are done with the collapse */
+ if (stack_curr <= 1) break;
+ /* if this is the last merge, just do it */
+ if ((stack_curr == 2) &&
+ (stack[0].length + stack[1].length == (int64_t) size))
+ {
+ TIM_SORT_MERGE(dst, stack, stack_curr, store);
+ stack[0].length += stack[1].length;
+ stack_curr--;
+ break;
+ }
+ /* check if the invariant is off for a stack of 2 elements */
+ else if ((stack_curr == 2) && (stack[0].length <= stack[1].length))
+ {
+ TIM_SORT_MERGE(dst, stack, stack_curr, store);
+ stack[0].length += stack[1].length;
+ stack_curr--;
+ break;
+ }
+ else if (stack_curr == 2)
+ break;
+
+ A = stack[stack_curr - 3].length;
+ B = stack[stack_curr - 2].length;
+ C = stack[stack_curr - 1].length;
+
+ /* check first invariant */
+ if (A <= B + C)
+ {
+ if (A < C)
+ {
+ TIM_SORT_MERGE(dst, stack, stack_curr - 1, store);
+ stack[stack_curr - 3].length += stack[stack_curr - 2].length;
+ stack[stack_curr - 2] = stack[stack_curr - 1];
+ stack_curr--;
+ }
+ else
+ {
+ TIM_SORT_MERGE(dst, stack, stack_curr, store);
+ stack[stack_curr - 2].length += stack[stack_curr - 1].length;
+ stack_curr--;
+ }
+ }
+ /* check second invariant */
+ else if (B <= C)
+ {
+ TIM_SORT_MERGE(dst, stack, stack_curr, store);
+ stack[stack_curr - 2].length += stack[stack_curr - 1].length;
+ stack_curr--;
+ }
+ else
+ break;
+ }
+ return stack_curr;
+}
+
+void TIM_SORT(SORT_TYPE *dst, const size_t size)
+{
+ int minrun;
+ TEMP_STORAGE_T _store, *store;
+ TIM_SORT_RUN_T run_stack[128];
+ int stack_curr = 0;
+ int64_t len, run;
+ int64_t curr = 0;
+
+ if (size < 64)
+ {
+ BINARY_INSERTION_SORT(dst, size);
+ return;
+ }
+
+ /* compute the minimum run length */
+ minrun = compute_minrun(size);
+
+ /* temporary storage for merges */
+ store = &_store;
+ store->alloc = 0;
+ store->storage = NULL;
+
+ PUSH_NEXT();
+ PUSH_NEXT();
+ PUSH_NEXT();
+
+ while (1)
+ {
+ if (!CHECK_INVARIANT(run_stack, stack_curr))
+ {
+ stack_curr = TIM_SORT_COLLAPSE(dst, run_stack, stack_curr, store, size);
+ continue;
+ }
+ PUSH_NEXT();
+ }
+}
+
+#undef SORT_CONCAT
+#undef SORT_MAKE_STR1
+#undef SORT_MAKE_STR
+#undef SORT_NAME
+#undef SORT_TYPE
+#undef SORT_CMP
+#undef TEMP_STORAGE_T
+#undef TIM_SORT_RUN_T
+#undef PUSH_NEXT
+#undef SORT_SWAP
+#undef SORT_CONCAT
+#undef SORT_MAKE_STR1
+#undef SORT_MAKE_STR
+#undef BINARY_INSERTION_FIND
+#undef BINARY_INSERTION_SORT_START
+#undef BINARY_INSERTION_SORT
+#undef REVERSE_ELEMENTS
+#undef COUNT_RUN
+#undef TIM_SORT
+#undef TIM_SORT_RESIZE
+#undef TIM_SORT_COLLAPSE
+#undef TIM_SORT_RUN_T
+#undef TEMP_STORAGE_T
diff --git a/tree.c b/tree.c
new file mode 100644
index 0000000..307782c
--- /dev/null
+++ b/tree.c
@@ -0,0 +1,10102 @@
+/*
+ * tree.c : implementation of access function for an XML tree.
+ *
+ * References:
+ * XHTML 1.0 W3C REC: http://www.w3.org/TR/2002/REC-xhtml1-20020801/
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ *
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h> /* for memset() only ! */
+#include <limits.h>
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/uri.h>
+#include <libxml/entities.h>
+#include <libxml/valid.h>
+#include <libxml/xmlerror.h>
+#include <libxml/parserInternals.h>
+#include <libxml/globals.h>
+#ifdef LIBXML_HTML_ENABLED
+#include <libxml/HTMLtree.h>
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+#include <libxml/debugXML.h>
+#endif
+
+#include "buf.h"
+#include "save.h"
+
+int __xmlRegisterCallbacks = 0;
+
+/************************************************************************
+ * *
+ * Forward declarations *
+ * *
+ ************************************************************************/
+
+static xmlNsPtr
+xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns);
+
+static xmlChar* xmlGetPropNodeValueInternal(const xmlAttr *prop);
+
+/************************************************************************
+ * *
+ * Tree memory error handler *
+ * *
+ ************************************************************************/
+/**
+ * xmlTreeErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlTreeErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * xmlTreeErr:
+ * @code: the error number
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlTreeErr(int code, xmlNodePtr node, const char *extra)
+{
+ const char *msg = NULL;
+
+ switch(code) {
+ case XML_TREE_INVALID_HEX:
+ msg = "invalid hexadecimal character value\n";
+ break;
+ case XML_TREE_INVALID_DEC:
+ msg = "invalid decimal character value\n";
+ break;
+ case XML_TREE_UNTERMINATED_ENTITY:
+ msg = "unterminated entity reference %15s\n";
+ break;
+ case XML_TREE_NOT_UTF8:
+ msg = "string is not in UTF-8\n";
+ break;
+ default:
+ msg = "unexpected error number\n";
+ }
+ __xmlSimpleError(XML_FROM_TREE, code, node, msg, extra);
+}
+
+/************************************************************************
+ * *
+ * A few static variables and macros *
+ * *
+ ************************************************************************/
+/* #undef xmlStringText */
+const xmlChar xmlStringText[] = { 't', 'e', 'x', 't', 0 };
+/* #undef xmlStringTextNoenc */
+const xmlChar xmlStringTextNoenc[] =
+ { 't', 'e', 'x', 't', 'n', 'o', 'e', 'n', 'c', 0 };
+/* #undef xmlStringComment */
+const xmlChar xmlStringComment[] = { 'c', 'o', 'm', 'm', 'e', 'n', 't', 0 };
+
+static int xmlCompressMode = 0;
+static int xmlCheckDTD = 1;
+
+#define UPDATE_LAST_CHILD_AND_PARENT(n) if ((n) != NULL) { \
+ xmlNodePtr ulccur = (n)->children; \
+ if (ulccur == NULL) { \
+ (n)->last = NULL; \
+ } else { \
+ while (ulccur->next != NULL) { \
+ ulccur->parent = (n); \
+ ulccur = ulccur->next; \
+ } \
+ ulccur->parent = (n); \
+ (n)->last = ulccur; \
+}}
+
+#define IS_STR_XML(str) ((str != NULL) && (str[0] == 'x') && \
+ (str[1] == 'm') && (str[2] == 'l') && (str[3] == 0))
+
+/* #define DEBUG_BUFFER */
+/* #define DEBUG_TREE */
+
+/************************************************************************
+ * *
+ * Functions to move to entities.c once the *
+ * API freeze is smoothen and they can be made public. *
+ * *
+ ************************************************************************/
+#include <libxml/hash.h>
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlGetEntityFromDtd:
+ * @dtd: A pointer to the DTD to search
+ * @name: The entity name
+ *
+ * Do an entity lookup in the DTD entity hash table and
+ * return the corresponding entity, if found.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+static xmlEntityPtr
+xmlGetEntityFromDtd(const xmlDtd *dtd, const xmlChar *name) {
+ xmlEntitiesTablePtr table;
+
+ if((dtd != NULL) && (dtd->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) dtd->entities;
+ return((xmlEntityPtr) xmlHashLookup(table, name));
+ /* return(xmlGetEntityFromTable(table, name)); */
+ }
+ return(NULL);
+}
+/**
+ * xmlGetParameterEntityFromDtd:
+ * @dtd: A pointer to the DTD to search
+ * @name: The entity name
+ *
+ * Do an entity lookup in the DTD pararmeter entity hash table and
+ * return the corresponding entity, if found.
+ *
+ * Returns A pointer to the entity structure or NULL if not found.
+ */
+static xmlEntityPtr
+xmlGetParameterEntityFromDtd(const xmlDtd *dtd, const xmlChar *name) {
+ xmlEntitiesTablePtr table;
+
+ if ((dtd != NULL) && (dtd->pentities != NULL)) {
+ table = (xmlEntitiesTablePtr) dtd->pentities;
+ return((xmlEntityPtr) xmlHashLookup(table, name));
+ /* return(xmlGetEntityFromTable(table, name)); */
+ }
+ return(NULL);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/************************************************************************
+ * *
+ * QName handling helper *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlBuildQName:
+ * @ncname: the Name
+ * @prefix: the prefix
+ * @memory: preallocated memory
+ * @len: preallocated memory length
+ *
+ * Builds the QName @prefix:@ncname in @memory if there is enough space
+ * and prefix is not NULL nor empty, otherwise allocate a new string.
+ * If prefix is NULL or empty it returns ncname.
+ *
+ * Returns the new string which must be freed by the caller if different from
+ * @memory and @ncname or NULL in case of error
+ */
+xmlChar *
+xmlBuildQName(const xmlChar *ncname, const xmlChar *prefix,
+ xmlChar *memory, int len) {
+ int lenn, lenp;
+ xmlChar *ret;
+
+ if (ncname == NULL) return(NULL);
+ if (prefix == NULL) return((xmlChar *) ncname);
+
+ lenn = strlen((char *) ncname);
+ lenp = strlen((char *) prefix);
+
+ if ((memory == NULL) || (len < lenn + lenp + 2)) {
+ ret = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (ret == NULL) {
+ xmlTreeErrMemory("building QName");
+ return(NULL);
+ }
+ } else {
+ ret = memory;
+ }
+ memcpy(&ret[0], prefix, lenp);
+ ret[lenp] = ':';
+ memcpy(&ret[lenp + 1], ncname, lenn);
+ ret[lenn + lenp + 1] = 0;
+ return(ret);
+}
+
+/**
+ * xmlSplitQName2:
+ * @name: the full QName
+ * @prefix: a xmlChar **
+ *
+ * parse an XML qualified name string
+ *
+ * [NS 5] QName ::= (Prefix ':')? LocalPart
+ *
+ * [NS 6] Prefix ::= NCName
+ *
+ * [NS 7] LocalPart ::= NCName
+ *
+ * Returns NULL if not a QName, otherwise the local part, and prefix
+ * is updated to get the Prefix if any.
+ */
+
+xmlChar *
+xmlSplitQName2(const xmlChar *name, xmlChar **prefix) {
+ int len = 0;
+ xmlChar *ret = NULL;
+
+ if (prefix == NULL) return(NULL);
+ *prefix = NULL;
+ if (name == NULL) return(NULL);
+
+#ifndef XML_XML_NAMESPACE
+ /* xml: prefix is not really a namespace */
+ if ((name[0] == 'x') && (name[1] == 'm') &&
+ (name[2] == 'l') && (name[3] == ':'))
+ return(NULL);
+#endif
+
+ /* nasty but valid */
+ if (name[0] == ':')
+ return(NULL);
+
+ /*
+ * we are not trying to validate but just to cut, and yes it will
+ * work even if this is as set of UTF-8 encoded chars
+ */
+ while ((name[len] != 0) && (name[len] != ':'))
+ len++;
+
+ if (name[len] == 0)
+ return(NULL);
+
+ *prefix = xmlStrndup(name, len);
+ if (*prefix == NULL) {
+ xmlTreeErrMemory("QName split");
+ return(NULL);
+ }
+ ret = xmlStrdup(&name[len + 1]);
+ if (ret == NULL) {
+ xmlTreeErrMemory("QName split");
+ if (*prefix != NULL) {
+ xmlFree(*prefix);
+ *prefix = NULL;
+ }
+ return(NULL);
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlSplitQName3:
+ * @name: the full QName
+ * @len: an int *
+ *
+ * parse an XML qualified name string,i
+ *
+ * returns NULL if it is not a Qualified Name, otherwise, update len
+ * with the length in byte of the prefix and return a pointer
+ * to the start of the name without the prefix
+ */
+
+const xmlChar *
+xmlSplitQName3(const xmlChar *name, int *len) {
+ int l = 0;
+
+ if (name == NULL) return(NULL);
+ if (len == NULL) return(NULL);
+
+ /* nasty but valid */
+ if (name[0] == ':')
+ return(NULL);
+
+ /*
+ * we are not trying to validate but just to cut, and yes it will
+ * work even if this is as set of UTF-8 encoded chars
+ */
+ while ((name[l] != 0) && (name[l] != ':'))
+ l++;
+
+ if (name[l] == 0)
+ return(NULL);
+
+ *len = l;
+
+ return(&name[l+1]);
+}
+
+/************************************************************************
+ * *
+ * Check Name, NCName and QName strings *
+ * *
+ ************************************************************************/
+
+#define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l)
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
+/**
+ * xmlValidateNCName:
+ * @value: the value to check
+ * @space: allow spaces in front and end of the string
+ *
+ * Check that a value conforms to the lexical space of NCName
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlValidateNCName(const xmlChar *value, int space) {
+ const xmlChar *cur = value;
+ int c,l;
+
+ if (value == NULL)
+ return(-1);
+
+ /*
+ * First quick algorithm for ASCII range
+ */
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (((*cur >= 'a') && (*cur <= 'z')) || ((*cur >= 'A') && (*cur <= 'Z')) ||
+ (*cur == '_'))
+ cur++;
+ else
+ goto try_complex;
+ while (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.'))
+ cur++;
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (*cur == 0)
+ return(0);
+
+try_complex:
+ /*
+ * Second check for chars outside the ASCII range
+ */
+ cur = value;
+ c = CUR_SCHAR(cur, l);
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if ((!IS_LETTER(c)) && (c != '_'))
+ return(1);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) ||
+ IS_EXTENDER(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (c != 0)
+ return(1);
+
+ return(0);
+}
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlValidateQName:
+ * @value: the value to check
+ * @space: allow spaces in front and end of the string
+ *
+ * Check that a value conforms to the lexical space of QName
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlValidateQName(const xmlChar *value, int space) {
+ const xmlChar *cur = value;
+ int c,l;
+
+ if (value == NULL)
+ return(-1);
+ /*
+ * First quick algorithm for ASCII range
+ */
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (((*cur >= 'a') && (*cur <= 'z')) || ((*cur >= 'A') && (*cur <= 'Z')) ||
+ (*cur == '_'))
+ cur++;
+ else
+ goto try_complex;
+ while (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.'))
+ cur++;
+ if (*cur == ':') {
+ cur++;
+ if (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ (*cur == '_'))
+ cur++;
+ else
+ goto try_complex;
+ while (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.'))
+ cur++;
+ }
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (*cur == 0)
+ return(0);
+
+try_complex:
+ /*
+ * Second check for chars outside the ASCII range
+ */
+ cur = value;
+ c = CUR_SCHAR(cur, l);
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if ((!IS_LETTER(c)) && (c != '_'))
+ return(1);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) ||
+ IS_EXTENDER(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ if (c == ':') {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ if ((!IS_LETTER(c)) && (c != '_'))
+ return(1);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) ||
+ IS_EXTENDER(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (c != 0)
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlValidateName:
+ * @value: the value to check
+ * @space: allow spaces in front and end of the string
+ *
+ * Check that a value conforms to the lexical space of Name
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlValidateName(const xmlChar *value, int space) {
+ const xmlChar *cur = value;
+ int c,l;
+
+ if (value == NULL)
+ return(-1);
+ /*
+ * First quick algorithm for ASCII range
+ */
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (((*cur >= 'a') && (*cur <= 'z')) || ((*cur >= 'A') && (*cur <= 'Z')) ||
+ (*cur == '_') || (*cur == ':'))
+ cur++;
+ else
+ goto try_complex;
+ while (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.') || (*cur == ':'))
+ cur++;
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (*cur == 0)
+ return(0);
+
+try_complex:
+ /*
+ * Second check for chars outside the ASCII range
+ */
+ cur = value;
+ c = CUR_SCHAR(cur, l);
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if ((!IS_LETTER(c)) && (c != '_') && (c != ':'))
+ return(1);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (c != 0)
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlValidateNMToken:
+ * @value: the value to check
+ * @space: allow spaces in front and end of the string
+ *
+ * Check that a value conforms to the lexical space of NMToken
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlValidateNMToken(const xmlChar *value, int space) {
+ const xmlChar *cur = value;
+ int c,l;
+
+ if (value == NULL)
+ return(-1);
+ /*
+ * First quick algorithm for ASCII range
+ */
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.') || (*cur == ':'))
+ cur++;
+ else
+ goto try_complex;
+ while (((*cur >= 'a') && (*cur <= 'z')) ||
+ ((*cur >= 'A') && (*cur <= 'Z')) ||
+ ((*cur >= '0') && (*cur <= '9')) ||
+ (*cur == '_') || (*cur == '-') || (*cur == '.') || (*cur == ':'))
+ cur++;
+ if (space)
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (*cur == 0)
+ return(0);
+
+try_complex:
+ /*
+ * Second check for chars outside the ASCII range
+ */
+ cur = value;
+ c = CUR_SCHAR(cur, l);
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (!(IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)))
+ return(1);
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+ (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ if (space) {
+ while (IS_BLANK(c)) {
+ cur += l;
+ c = CUR_SCHAR(cur, l);
+ }
+ }
+ if (c != 0)
+ return(1);
+ return(0);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/************************************************************************
+ * *
+ * Allocation and deallocation of basic structures *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSetBufferAllocationScheme:
+ * @scheme: allocation method to use
+ *
+ * Set the buffer allocation method. Types are
+ * XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down
+ * XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed,
+ * improves performance
+ */
+void
+xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme) {
+ if ((scheme == XML_BUFFER_ALLOC_EXACT) ||
+ (scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
+ (scheme == XML_BUFFER_ALLOC_HYBRID))
+ xmlBufferAllocScheme = scheme;
+}
+
+/**
+ * xmlGetBufferAllocationScheme:
+ *
+ * Types are
+ * XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down
+ * XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed,
+ * improves performance
+ * XML_BUFFER_ALLOC_HYBRID - use exact sizes on small strings to keep memory usage tight
+ * in normal usage, and doubleit on large strings to avoid
+ * pathological performance.
+ *
+ * Returns the current allocation scheme
+ */
+xmlBufferAllocationScheme
+xmlGetBufferAllocationScheme(void) {
+ return(xmlBufferAllocScheme);
+}
+
+/**
+ * xmlNewNs:
+ * @node: the element carrying the namespace
+ * @href: the URI associated
+ * @prefix: the prefix for the namespace
+ *
+ * Creation of a new Namespace. This function will refuse to create
+ * a namespace with a similar prefix than an existing one present on this
+ * node.
+ * Note that for a default namespace, @prefix should be NULL.
+ *
+ * We use href==NULL in the case of an element creation where the namespace
+ * was not defined.
+ *
+ * Returns a new namespace pointer or NULL
+ */
+xmlNsPtr
+xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) {
+ xmlNsPtr cur;
+
+ if ((node != NULL) && (node->type != XML_ELEMENT_NODE))
+ return(NULL);
+
+ if ((prefix != NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
+ /* xml namespace is predefined, no need to add it */
+ if (xmlStrEqual(href, XML_XML_NAMESPACE))
+ return(NULL);
+
+ /*
+ * Problem, this is an attempt to bind xml prefix to a wrong
+ * namespace, which breaks
+ * Namespace constraint: Reserved Prefixes and Namespace Names
+ * from XML namespace. But documents authors may not care in
+ * their context so let's proceed.
+ */
+ }
+
+ /*
+ * Allocate a new Namespace and fill the fields.
+ */
+ cur = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building namespace");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNs));
+ cur->type = XML_LOCAL_NAMESPACE;
+
+ if (href != NULL)
+ cur->href = xmlStrdup(href);
+ if (prefix != NULL)
+ cur->prefix = xmlStrdup(prefix);
+
+ /*
+ * Add it at the end to preserve parsing order ...
+ * and checks for existing use of the prefix
+ */
+ if (node != NULL) {
+ if (node->nsDef == NULL) {
+ node->nsDef = cur;
+ } else {
+ xmlNsPtr prev = node->nsDef;
+
+ if (((prev->prefix == NULL) && (cur->prefix == NULL)) ||
+ (xmlStrEqual(prev->prefix, cur->prefix))) {
+ xmlFreeNs(cur);
+ return(NULL);
+ }
+ while (prev->next != NULL) {
+ prev = prev->next;
+ if (((prev->prefix == NULL) && (cur->prefix == NULL)) ||
+ (xmlStrEqual(prev->prefix, cur->prefix))) {
+ xmlFreeNs(cur);
+ return(NULL);
+ }
+ }
+ prev->next = cur;
+ }
+ }
+ return(cur);
+}
+
+/**
+ * xmlSetNs:
+ * @node: a node in the document
+ * @ns: a namespace pointer
+ *
+ * Associate a namespace to a node, a posteriori.
+ */
+void
+xmlSetNs(xmlNodePtr node, xmlNsPtr ns) {
+ if (node == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlSetNs: node == NULL\n");
+#endif
+ return;
+ }
+ if ((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_ATTRIBUTE_NODE))
+ node->ns = ns;
+}
+
+/**
+ * xmlFreeNs:
+ * @cur: the namespace pointer
+ *
+ * Free up the structures associated to a namespace
+ */
+void
+xmlFreeNs(xmlNsPtr cur) {
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlFreeNs : ns == NULL\n");
+#endif
+ return;
+ }
+ if (cur->href != NULL) xmlFree((char *) cur->href);
+ if (cur->prefix != NULL) xmlFree((char *) cur->prefix);
+ xmlFree(cur);
+}
+
+/**
+ * xmlFreeNsList:
+ * @cur: the first namespace pointer
+ *
+ * Free up all the structures associated to the chained namespaces.
+ */
+void
+xmlFreeNsList(xmlNsPtr cur) {
+ xmlNsPtr next;
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlFreeNsList : ns == NULL\n");
+#endif
+ return;
+ }
+ while (cur != NULL) {
+ next = cur->next;
+ xmlFreeNs(cur);
+ cur = next;
+ }
+}
+
+/**
+ * xmlNewDtd:
+ * @doc: the document pointer
+ * @name: the DTD name
+ * @ExternalID: the external ID
+ * @SystemID: the system ID
+ *
+ * Creation of a new DTD for the external subset. To create an
+ * internal subset, use xmlCreateIntSubset().
+ *
+ * Returns a pointer to the new DTD structure
+ */
+xmlDtdPtr
+xmlNewDtd(xmlDocPtr doc, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID) {
+ xmlDtdPtr cur;
+
+ if ((doc != NULL) && (doc->extSubset != NULL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewDtd(%s): document %s already have a DTD %s\n",
+ /* !!! */ (char *) name, doc->name,
+ /* !!! */ (char *)doc->extSubset->name);
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new DTD and fill the fields.
+ */
+ cur = (xmlDtdPtr) xmlMalloc(sizeof(xmlDtd));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building DTD");
+ return(NULL);
+ }
+ memset(cur, 0 , sizeof(xmlDtd));
+ cur->type = XML_DTD_NODE;
+
+ if (name != NULL)
+ cur->name = xmlStrdup(name);
+ if (ExternalID != NULL)
+ cur->ExternalID = xmlStrdup(ExternalID);
+ if (SystemID != NULL)
+ cur->SystemID = xmlStrdup(SystemID);
+ if (doc != NULL)
+ doc->extSubset = cur;
+ cur->doc = doc;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * xmlGetIntSubset:
+ * @doc: the document pointer
+ *
+ * Get the internal subset of a document
+ * Returns a pointer to the DTD structure or NULL if not found
+ */
+
+xmlDtdPtr
+xmlGetIntSubset(const xmlDoc *doc) {
+ xmlNodePtr cur;
+
+ if (doc == NULL)
+ return(NULL);
+ cur = doc->children;
+ while (cur != NULL) {
+ if (cur->type == XML_DTD_NODE)
+ return((xmlDtdPtr) cur);
+ cur = cur->next;
+ }
+ return((xmlDtdPtr) doc->intSubset);
+}
+
+/**
+ * xmlCreateIntSubset:
+ * @doc: the document pointer
+ * @name: the DTD name
+ * @ExternalID: the external (PUBLIC) ID
+ * @SystemID: the system ID
+ *
+ * Create the internal subset of a document
+ * Returns a pointer to the new DTD structure
+ */
+xmlDtdPtr
+xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID) {
+ xmlDtdPtr cur;
+
+ if ((doc != NULL) && (xmlGetIntSubset(doc) != NULL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+
+ "xmlCreateIntSubset(): document %s already have an internal subset\n",
+ doc->name);
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new DTD and fill the fields.
+ */
+ cur = (xmlDtdPtr) xmlMalloc(sizeof(xmlDtd));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building internal subset");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlDtd));
+ cur->type = XML_DTD_NODE;
+
+ if (name != NULL) {
+ cur->name = xmlStrdup(name);
+ if (cur->name == NULL) {
+ xmlTreeErrMemory("building internal subset");
+ xmlFree(cur);
+ return(NULL);
+ }
+ }
+ if (ExternalID != NULL) {
+ cur->ExternalID = xmlStrdup(ExternalID);
+ if (cur->ExternalID == NULL) {
+ xmlTreeErrMemory("building internal subset");
+ if (cur->name != NULL)
+ xmlFree((char *)cur->name);
+ xmlFree(cur);
+ return(NULL);
+ }
+ }
+ if (SystemID != NULL) {
+ cur->SystemID = xmlStrdup(SystemID);
+ if (cur->SystemID == NULL) {
+ xmlTreeErrMemory("building internal subset");
+ if (cur->name != NULL)
+ xmlFree((char *)cur->name);
+ if (cur->ExternalID != NULL)
+ xmlFree((char *)cur->ExternalID);
+ xmlFree(cur);
+ return(NULL);
+ }
+ }
+ if (doc != NULL) {
+ doc->intSubset = cur;
+ cur->parent = doc;
+ cur->doc = doc;
+ if (doc->children == NULL) {
+ doc->children = (xmlNodePtr) cur;
+ doc->last = (xmlNodePtr) cur;
+ } else {
+ if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ xmlNodePtr prev;
+
+ prev = doc->children;
+ prev->prev = (xmlNodePtr) cur;
+ cur->next = prev;
+ doc->children = (xmlNodePtr) cur;
+ } else {
+ xmlNodePtr next;
+
+ next = doc->children;
+ while ((next != NULL) && (next->type != XML_ELEMENT_NODE))
+ next = next->next;
+ if (next == NULL) {
+ cur->prev = doc->last;
+ cur->prev->next = (xmlNodePtr) cur;
+ cur->next = NULL;
+ doc->last = (xmlNodePtr) cur;
+ } else {
+ cur->next = next;
+ cur->prev = next->prev;
+ if (cur->prev == NULL)
+ doc->children = (xmlNodePtr) cur;
+ else
+ cur->prev->next = (xmlNodePtr) cur;
+ next->prev = (xmlNodePtr) cur;
+ }
+ }
+ }
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * DICT_FREE:
+ * @str: a string
+ *
+ * Free a string if it is not owned by the "dict" dictionnary in the
+ * current scope
+ */
+#define DICT_FREE(str) \
+ if ((str) && ((!dict) || \
+ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
+ xmlFree((char *)(str));
+
+
+/**
+ * DICT_COPY:
+ * @str: a string
+ *
+ * Copy a string using a "dict" dictionnary in the current scope,
+ * if availabe.
+ */
+#define DICT_COPY(str, cpy) \
+ if (str) { \
+ if (dict) { \
+ if (xmlDictOwns(dict, (const xmlChar *)(str))) \
+ cpy = (xmlChar *) (str); \
+ else \
+ cpy = (xmlChar *) xmlDictLookup((dict), (const xmlChar *)(str), -1); \
+ } else \
+ cpy = xmlStrdup((const xmlChar *)(str)); }
+
+/**
+ * DICT_CONST_COPY:
+ * @str: a string
+ *
+ * Copy a string using a "dict" dictionnary in the current scope,
+ * if availabe.
+ */
+#define DICT_CONST_COPY(str, cpy) \
+ if (str) { \
+ if (dict) { \
+ if (xmlDictOwns(dict, (const xmlChar *)(str))) \
+ cpy = (const xmlChar *) (str); \
+ else \
+ cpy = xmlDictLookup((dict), (const xmlChar *)(str), -1); \
+ } else \
+ cpy = (const xmlChar *) xmlStrdup((const xmlChar *)(str)); }
+
+
+/**
+ * xmlFreeDtd:
+ * @cur: the DTD structure to free up
+ *
+ * Free a DTD structure.
+ */
+void
+xmlFreeDtd(xmlDtdPtr cur) {
+ xmlDictPtr dict = NULL;
+
+ if (cur == NULL) {
+ return;
+ }
+ if (cur->doc != NULL) dict = cur->doc->dict;
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue((xmlNodePtr)cur);
+
+ if (cur->children != NULL) {
+ xmlNodePtr next, c = cur->children;
+
+ /*
+ * Cleanup all nodes which are not part of the specific lists
+ * of notations, elements, attributes and entities.
+ */
+ while (c != NULL) {
+ next = c->next;
+ if ((c->type != XML_NOTATION_NODE) &&
+ (c->type != XML_ELEMENT_DECL) &&
+ (c->type != XML_ATTRIBUTE_DECL) &&
+ (c->type != XML_ENTITY_DECL)) {
+ xmlUnlinkNode(c);
+ xmlFreeNode(c);
+ }
+ c = next;
+ }
+ }
+ DICT_FREE(cur->name)
+ DICT_FREE(cur->SystemID)
+ DICT_FREE(cur->ExternalID)
+ /* TODO !!! */
+ if (cur->notations != NULL)
+ xmlFreeNotationTable((xmlNotationTablePtr) cur->notations);
+
+ if (cur->elements != NULL)
+ xmlFreeElementTable((xmlElementTablePtr) cur->elements);
+ if (cur->attributes != NULL)
+ xmlFreeAttributeTable((xmlAttributeTablePtr) cur->attributes);
+ if (cur->entities != NULL)
+ xmlFreeEntitiesTable((xmlEntitiesTablePtr) cur->entities);
+ if (cur->pentities != NULL)
+ xmlFreeEntitiesTable((xmlEntitiesTablePtr) cur->pentities);
+
+ xmlFree(cur);
+}
+
+/**
+ * xmlNewDoc:
+ * @version: xmlChar string giving the version of XML "1.0"
+ *
+ * Creates a new XML document
+ *
+ * Returns a new document
+ */
+xmlDocPtr
+xmlNewDoc(const xmlChar *version) {
+ xmlDocPtr cur;
+
+ if (version == NULL)
+ version = (const xmlChar *) "1.0";
+
+ /*
+ * Allocate a new document and fill the fields.
+ */
+ cur = (xmlDocPtr) xmlMalloc(sizeof(xmlDoc));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building doc");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlDoc));
+ cur->type = XML_DOCUMENT_NODE;
+
+ cur->version = xmlStrdup(version);
+ if (cur->version == NULL) {
+ xmlTreeErrMemory("building doc");
+ xmlFree(cur);
+ return(NULL);
+ }
+ cur->standalone = -1;
+ cur->compression = -1; /* not initialized */
+ cur->doc = cur;
+ cur->parseFlags = 0;
+ cur->properties = XML_DOC_USERBUILT;
+ /*
+ * The in memory encoding is always UTF8
+ * This field will never change and would
+ * be obsolete if not for binary compatibility.
+ */
+ cur->charset = XML_CHAR_ENCODING_UTF8;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * xmlFreeDoc:
+ * @cur: pointer to the document
+ *
+ * Free up all the structures used by a document, tree included.
+ */
+void
+xmlFreeDoc(xmlDocPtr cur) {
+ xmlDtdPtr extSubset, intSubset;
+ xmlDictPtr dict = NULL;
+
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlFreeDoc : document == NULL\n");
+#endif
+ return;
+ }
+#ifdef LIBXML_DEBUG_RUNTIME
+#ifdef LIBXML_DEBUG_ENABLED
+ xmlDebugCheckDocument(stderr, cur);
+#endif
+#endif
+
+ if (cur != NULL) dict = cur->dict;
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue((xmlNodePtr)cur);
+
+ /*
+ * Do this before freeing the children list to avoid ID lookups
+ */
+ if (cur->ids != NULL) xmlFreeIDTable((xmlIDTablePtr) cur->ids);
+ cur->ids = NULL;
+ if (cur->refs != NULL) xmlFreeRefTable((xmlRefTablePtr) cur->refs);
+ cur->refs = NULL;
+ extSubset = cur->extSubset;
+ intSubset = cur->intSubset;
+ if (intSubset == extSubset)
+ extSubset = NULL;
+ if (extSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) cur->extSubset);
+ cur->extSubset = NULL;
+ xmlFreeDtd(extSubset);
+ }
+ if (intSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) cur->intSubset);
+ cur->intSubset = NULL;
+ xmlFreeDtd(intSubset);
+ }
+
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ if (cur->oldNs != NULL) xmlFreeNsList(cur->oldNs);
+
+ DICT_FREE(cur->version)
+ DICT_FREE(cur->name)
+ DICT_FREE(cur->encoding)
+ DICT_FREE(cur->URL)
+ xmlFree(cur);
+ if (dict) xmlDictFree(dict);
+}
+
+/**
+ * xmlStringLenGetNodeList:
+ * @doc: the document
+ * @value: the value of the text
+ * @len: the length of the string value
+ *
+ * Parse the value string and build the node list associated. Should
+ * produce a flat tree with only TEXTs and ENTITY_REFs.
+ * Returns a pointer to the first child
+ */
+xmlNodePtr
+xmlStringLenGetNodeList(const xmlDoc *doc, const xmlChar *value, int len) {
+ xmlNodePtr ret = NULL, last = NULL;
+ xmlNodePtr node;
+ xmlChar *val;
+ const xmlChar *cur = value, *end = cur + len;
+ const xmlChar *q;
+ xmlEntityPtr ent;
+ xmlBufPtr buf;
+
+ if (value == NULL) return(NULL);
+
+ buf = xmlBufCreateSize(0);
+ if (buf == NULL) return(NULL);
+ xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID);
+
+ q = cur;
+ while ((cur < end) && (*cur != 0)) {
+ if (cur[0] == '&') {
+ int charval = 0;
+ xmlChar tmp;
+
+ /*
+ * Save the current text.
+ */
+ if (cur != q) {
+ if (xmlBufAdd(buf, q, cur - q))
+ goto out;
+ }
+ q = cur;
+ if ((cur + 2 < end) && (cur[1] == '#') && (cur[2] == 'x')) {
+ cur += 3;
+ if (cur < end)
+ tmp = *cur;
+ else
+ tmp = 0;
+ while (tmp != ';') { /* Non input consuming loop */
+ if ((tmp >= '0') && (tmp <= '9'))
+ charval = charval * 16 + (tmp - '0');
+ else if ((tmp >= 'a') && (tmp <= 'f'))
+ charval = charval * 16 + (tmp - 'a') + 10;
+ else if ((tmp >= 'A') && (tmp <= 'F'))
+ charval = charval * 16 + (tmp - 'A') + 10;
+ else {
+ xmlTreeErr(XML_TREE_INVALID_HEX, (xmlNodePtr) doc,
+ NULL);
+ charval = 0;
+ break;
+ }
+ cur++;
+ if (cur < end)
+ tmp = *cur;
+ else
+ tmp = 0;
+ }
+ if (tmp == ';')
+ cur++;
+ q = cur;
+ } else if ((cur + 1 < end) && (cur[1] == '#')) {
+ cur += 2;
+ if (cur < end)
+ tmp = *cur;
+ else
+ tmp = 0;
+ while (tmp != ';') { /* Non input consuming loops */
+ if ((tmp >= '0') && (tmp <= '9'))
+ charval = charval * 10 + (tmp - '0');
+ else {
+ xmlTreeErr(XML_TREE_INVALID_DEC, (xmlNodePtr) doc,
+ NULL);
+ charval = 0;
+ break;
+ }
+ cur++;
+ if (cur < end)
+ tmp = *cur;
+ else
+ tmp = 0;
+ }
+ if (tmp == ';')
+ cur++;
+ q = cur;
+ } else {
+ /*
+ * Read the entity string
+ */
+ cur++;
+ q = cur;
+ while ((cur < end) && (*cur != 0) && (*cur != ';')) cur++;
+ if ((cur >= end) || (*cur == 0)) {
+ xmlTreeErr(XML_TREE_UNTERMINATED_ENTITY, (xmlNodePtr) doc,
+ (const char *) q);
+ goto out;
+ }
+ if (cur != q) {
+ /*
+ * Predefined entities don't generate nodes
+ */
+ val = xmlStrndup(q, cur - q);
+ ent = xmlGetDocEntity(doc, val);
+ if ((ent != NULL) &&
+ (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
+
+ if (xmlBufCat(buf, ent->content))
+ goto out;
+
+ } else {
+ /*
+ * Flush buffer so far
+ */
+ if (!xmlBufIsEmpty(buf)) {
+ node = xmlNewDocText(doc, NULL);
+ if (node == NULL) {
+ if (val != NULL) xmlFree(val);
+ goto out;
+ }
+ node->content = xmlBufDetach(buf);
+
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ }
+
+ /*
+ * Create a new REFERENCE_REF node
+ */
+ node = xmlNewReference(doc, val);
+ if (node == NULL) {
+ if (val != NULL) xmlFree(val);
+ goto out;
+ }
+ else if ((ent != NULL) && (ent->children == NULL)) {
+ xmlNodePtr temp;
+
+ ent->children = xmlStringGetNodeList(doc,
+ (const xmlChar*)node->content);
+ ent->owner = 1;
+ temp = ent->children;
+ while (temp) {
+ temp->parent = (xmlNodePtr)ent;
+ ent->last = temp;
+ temp = temp->next;
+ }
+ }
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ }
+ xmlFree(val);
+ }
+ cur++;
+ q = cur;
+ }
+ if (charval != 0) {
+ xmlChar buffer[10];
+ int l;
+
+ l = xmlCopyCharMultiByte(buffer, charval);
+ buffer[l] = 0;
+
+ if (xmlBufCat(buf, buffer))
+ goto out;
+ charval = 0;
+ }
+ } else
+ cur++;
+ }
+
+ if (cur != q) {
+ /*
+ * Handle the last piece of text.
+ */
+ if (xmlBufAdd(buf, q, cur - q))
+ goto out;
+ }
+
+ if (!xmlBufIsEmpty(buf)) {
+ node = xmlNewDocText(doc, NULL);
+ if (node == NULL) goto out;
+ node->content = xmlBufDetach(buf);
+
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ } else if (ret == NULL) {
+ ret = xmlNewDocText(doc, BAD_CAST "");
+ }
+
+out:
+ xmlBufFree(buf);
+ return(ret);
+}
+
+/**
+ * xmlStringGetNodeList:
+ * @doc: the document
+ * @value: the value of the attribute
+ *
+ * Parse the value string and build the node list associated. Should
+ * produce a flat tree with only TEXTs and ENTITY_REFs.
+ * Returns a pointer to the first child
+ */
+xmlNodePtr
+xmlStringGetNodeList(const xmlDoc *doc, const xmlChar *value) {
+ xmlNodePtr ret = NULL, last = NULL;
+ xmlNodePtr node;
+ xmlChar *val;
+ const xmlChar *cur = value;
+ const xmlChar *q;
+ xmlEntityPtr ent;
+ xmlBufPtr buf;
+
+ if (value == NULL) return(NULL);
+
+ buf = xmlBufCreateSize(0);
+ if (buf == NULL) return(NULL);
+ xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_HYBRID);
+
+ q = cur;
+ while (*cur != 0) {
+ if (cur[0] == '&') {
+ int charval = 0;
+ xmlChar tmp;
+
+ /*
+ * Save the current text.
+ */
+ if (cur != q) {
+ if (xmlBufAdd(buf, q, cur - q))
+ goto out;
+ }
+ q = cur;
+ if ((cur[1] == '#') && (cur[2] == 'x')) {
+ cur += 3;
+ tmp = *cur;
+ while (tmp != ';') { /* Non input consuming loop */
+ if ((tmp >= '0') && (tmp <= '9'))
+ charval = charval * 16 + (tmp - '0');
+ else if ((tmp >= 'a') && (tmp <= 'f'))
+ charval = charval * 16 + (tmp - 'a') + 10;
+ else if ((tmp >= 'A') && (tmp <= 'F'))
+ charval = charval * 16 + (tmp - 'A') + 10;
+ else {
+ xmlTreeErr(XML_TREE_INVALID_HEX, (xmlNodePtr) doc,
+ NULL);
+ charval = 0;
+ break;
+ }
+ cur++;
+ tmp = *cur;
+ }
+ if (tmp == ';')
+ cur++;
+ q = cur;
+ } else if (cur[1] == '#') {
+ cur += 2;
+ tmp = *cur;
+ while (tmp != ';') { /* Non input consuming loops */
+ if ((tmp >= '0') && (tmp <= '9'))
+ charval = charval * 10 + (tmp - '0');
+ else {
+ xmlTreeErr(XML_TREE_INVALID_DEC, (xmlNodePtr) doc,
+ NULL);
+ charval = 0;
+ break;
+ }
+ cur++;
+ tmp = *cur;
+ }
+ if (tmp == ';')
+ cur++;
+ q = cur;
+ } else {
+ /*
+ * Read the entity string
+ */
+ cur++;
+ q = cur;
+ while ((*cur != 0) && (*cur != ';')) cur++;
+ if (*cur == 0) {
+ xmlTreeErr(XML_TREE_UNTERMINATED_ENTITY,
+ (xmlNodePtr) doc, (const char *) q);
+ goto out;
+ }
+ if (cur != q) {
+ /*
+ * Predefined entities don't generate nodes
+ */
+ val = xmlStrndup(q, cur - q);
+ ent = xmlGetDocEntity(doc, val);
+ if ((ent != NULL) &&
+ (ent->etype == XML_INTERNAL_PREDEFINED_ENTITY)) {
+
+ if (xmlBufCat(buf, ent->content))
+ goto out;
+
+ } else {
+ /*
+ * Flush buffer so far
+ */
+ if (!xmlBufIsEmpty(buf)) {
+ node = xmlNewDocText(doc, NULL);
+ node->content = xmlBufDetach(buf);
+
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ }
+
+ /*
+ * Create a new REFERENCE_REF node
+ */
+ node = xmlNewReference(doc, val);
+ if (node == NULL) {
+ if (val != NULL) xmlFree(val);
+ goto out;
+ }
+ else if ((ent != NULL) && (ent->children == NULL)) {
+ xmlNodePtr temp;
+
+ ent->children = xmlStringGetNodeList(doc,
+ (const xmlChar*)node->content);
+ ent->owner = 1;
+ temp = ent->children;
+ while (temp) {
+ temp->parent = (xmlNodePtr)ent;
+ temp = temp->next;
+ }
+ }
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ }
+ xmlFree(val);
+ }
+ cur++;
+ q = cur;
+ }
+ if (charval != 0) {
+ xmlChar buffer[10];
+ int len;
+
+ len = xmlCopyCharMultiByte(buffer, charval);
+ buffer[len] = 0;
+
+ if (xmlBufCat(buf, buffer))
+ goto out;
+ charval = 0;
+ }
+ } else
+ cur++;
+ }
+ if ((cur != q) || (ret == NULL)) {
+ /*
+ * Handle the last piece of text.
+ */
+ xmlBufAdd(buf, q, cur - q);
+ }
+
+ if (!xmlBufIsEmpty(buf)) {
+ node = xmlNewDocText(doc, NULL);
+ node->content = xmlBufDetach(buf);
+
+ if (last == NULL) {
+ last = ret = node;
+ } else {
+ last = xmlAddNextSibling(last, node);
+ }
+ }
+
+out:
+ xmlBufFree(buf);
+ return(ret);
+}
+
+/**
+ * xmlNodeListGetString:
+ * @doc: the document
+ * @list: a Node list
+ * @inLine: should we replace entity contents or show their external form
+ *
+ * Build the string equivalent to the text contained in the Node list
+ * made of TEXTs and ENTITY_REFs
+ *
+ * Returns a pointer to the string copy, the caller must free it with xmlFree().
+ */
+xmlChar *
+xmlNodeListGetString(xmlDocPtr doc, const xmlNode *list, int inLine)
+{
+ const xmlNode *node = list;
+ xmlChar *ret = NULL;
+ xmlEntityPtr ent;
+ int attr;
+
+ if (list == NULL)
+ return (NULL);
+ if ((list->parent != NULL) && (list->parent->type == XML_ATTRIBUTE_NODE))
+ attr = 1;
+ else
+ attr = 0;
+
+ while (node != NULL) {
+ if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ if (inLine) {
+ ret = xmlStrcat(ret, node->content);
+ } else {
+ xmlChar *buffer;
+
+ if (attr)
+ buffer = xmlEncodeAttributeEntities(doc, node->content);
+ else
+ buffer = xmlEncodeEntitiesReentrant(doc, node->content);
+ if (buffer != NULL) {
+ ret = xmlStrcat(ret, buffer);
+ xmlFree(buffer);
+ }
+ }
+ } else if (node->type == XML_ENTITY_REF_NODE) {
+ if (inLine) {
+ ent = xmlGetDocEntity(doc, node->name);
+ if (ent != NULL) {
+ xmlChar *buffer;
+
+ /* an entity content can be any "well balanced chunk",
+ * i.e. the result of the content [43] production:
+ * http://www.w3.org/TR/REC-xml#NT-content.
+ * So it can contain text, CDATA section or nested
+ * entity reference nodes (among others).
+ * -> we recursive call xmlNodeListGetString()
+ * which handles these types */
+ buffer = xmlNodeListGetString(doc, ent->children, 1);
+ if (buffer != NULL) {
+ ret = xmlStrcat(ret, buffer);
+ xmlFree(buffer);
+ }
+ } else {
+ ret = xmlStrcat(ret, node->content);
+ }
+ } else {
+ xmlChar buf[2];
+
+ buf[0] = '&';
+ buf[1] = 0;
+ ret = xmlStrncat(ret, buf, 1);
+ ret = xmlStrcat(ret, node->name);
+ buf[0] = ';';
+ buf[1] = 0;
+ ret = xmlStrncat(ret, buf, 1);
+ }
+ }
+#if 0
+ else {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGetNodeListString : invalid node type %d\n",
+ node->type);
+ }
+#endif
+ node = node->next;
+ }
+ return (ret);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNodeListGetRawString:
+ * @doc: the document
+ * @list: a Node list
+ * @inLine: should we replace entity contents or show their external form
+ *
+ * Builds the string equivalent to the text contained in the Node list
+ * made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString()
+ * this function doesn't do any character encoding handling.
+ *
+ * Returns a pointer to the string copy, the caller must free it with xmlFree().
+ */
+xmlChar *
+xmlNodeListGetRawString(const xmlDoc *doc, const xmlNode *list, int inLine)
+{
+ const xmlNode *node = list;
+ xmlChar *ret = NULL;
+ xmlEntityPtr ent;
+
+ if (list == NULL)
+ return (NULL);
+
+ while (node != NULL) {
+ if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ if (inLine) {
+ ret = xmlStrcat(ret, node->content);
+ } else {
+ xmlChar *buffer;
+
+ buffer = xmlEncodeSpecialChars(doc, node->content);
+ if (buffer != NULL) {
+ ret = xmlStrcat(ret, buffer);
+ xmlFree(buffer);
+ }
+ }
+ } else if (node->type == XML_ENTITY_REF_NODE) {
+ if (inLine) {
+ ent = xmlGetDocEntity(doc, node->name);
+ if (ent != NULL) {
+ xmlChar *buffer;
+
+ /* an entity content can be any "well balanced chunk",
+ * i.e. the result of the content [43] production:
+ * http://www.w3.org/TR/REC-xml#NT-content.
+ * So it can contain text, CDATA section or nested
+ * entity reference nodes (among others).
+ * -> we recursive call xmlNodeListGetRawString()
+ * which handles these types */
+ buffer =
+ xmlNodeListGetRawString(doc, ent->children, 1);
+ if (buffer != NULL) {
+ ret = xmlStrcat(ret, buffer);
+ xmlFree(buffer);
+ }
+ } else {
+ ret = xmlStrcat(ret, node->content);
+ }
+ } else {
+ xmlChar buf[2];
+
+ buf[0] = '&';
+ buf[1] = 0;
+ ret = xmlStrncat(ret, buf, 1);
+ ret = xmlStrcat(ret, node->name);
+ buf[0] = ';';
+ buf[1] = 0;
+ ret = xmlStrncat(ret, buf, 1);
+ }
+ }
+#if 0
+ else {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGetNodeListString : invalid node type %d\n",
+ node->type);
+ }
+#endif
+ node = node->next;
+ }
+ return (ret);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+static xmlAttrPtr
+xmlNewPropInternal(xmlNodePtr node, xmlNsPtr ns,
+ const xmlChar * name, const xmlChar * value,
+ int eatname)
+{
+ xmlAttrPtr cur;
+ xmlDocPtr doc = NULL;
+
+ if ((node != NULL) && (node->type != XML_ELEMENT_NODE)) {
+ if ((eatname == 1) &&
+ ((node->doc == NULL) ||
+ (!(xmlDictOwns(node->doc->dict, name)))))
+ xmlFree((xmlChar *) name);
+ return (NULL);
+ }
+
+ /*
+ * Allocate a new property and fill the fields.
+ */
+ cur = (xmlAttrPtr) xmlMalloc(sizeof(xmlAttr));
+ if (cur == NULL) {
+ if ((eatname == 1) &&
+ ((node == NULL) || (node->doc == NULL) ||
+ (!(xmlDictOwns(node->doc->dict, name)))))
+ xmlFree((xmlChar *) name);
+ xmlTreeErrMemory("building attribute");
+ return (NULL);
+ }
+ memset(cur, 0, sizeof(xmlAttr));
+ cur->type = XML_ATTRIBUTE_NODE;
+
+ cur->parent = node;
+ if (node != NULL) {
+ doc = node->doc;
+ cur->doc = doc;
+ }
+ cur->ns = ns;
+
+ if (eatname == 0) {
+ if ((doc != NULL) && (doc->dict != NULL))
+ cur->name = (xmlChar *) xmlDictLookup(doc->dict, name, -1);
+ else
+ cur->name = xmlStrdup(name);
+ } else
+ cur->name = name;
+
+ if (value != NULL) {
+ xmlNodePtr tmp;
+
+ if(!xmlCheckUTF8(value)) {
+ xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) doc,
+ NULL);
+ if (doc != NULL)
+ doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+ }
+ cur->children = xmlNewDocText(doc, value);
+ cur->last = NULL;
+ tmp = cur->children;
+ while (tmp != NULL) {
+ tmp->parent = (xmlNodePtr) cur;
+ if (tmp->next == NULL)
+ cur->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+
+ /*
+ * Add it at the end to preserve parsing order ...
+ */
+ if (node != NULL) {
+ if (node->properties == NULL) {
+ node->properties = cur;
+ } else {
+ xmlAttrPtr prev = node->properties;
+
+ while (prev->next != NULL)
+ prev = prev->next;
+ prev->next = cur;
+ cur->prev = prev;
+ }
+ }
+
+ if ((value != NULL) && (node != NULL) &&
+ (xmlIsID(node->doc, node, cur) == 1))
+ xmlAddID(NULL, node->doc, value, cur);
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr) cur);
+ return (cur);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlNewProp:
+ * @node: the holding node
+ * @name: the name of the attribute
+ * @value: the value of the attribute
+ *
+ * Create a new property carried by a node.
+ * Returns a pointer to the attribute
+ */
+xmlAttrPtr
+xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewProp : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ return xmlNewPropInternal(node, NULL, name, value, 0);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNewNsProp:
+ * @node: the holding node
+ * @ns: the namespace
+ * @name: the name of the attribute
+ * @value: the value of the attribute
+ *
+ * Create a new property tagged with a namespace and carried by a node.
+ * Returns a pointer to the attribute
+ */
+xmlAttrPtr
+xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
+ const xmlChar *value) {
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewNsProp : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ return xmlNewPropInternal(node, ns, name, value, 0);
+}
+
+/**
+ * xmlNewNsPropEatName:
+ * @node: the holding node
+ * @ns: the namespace
+ * @name: the name of the attribute
+ * @value: the value of the attribute
+ *
+ * Create a new property tagged with a namespace and carried by a node.
+ * Returns a pointer to the attribute
+ */
+xmlAttrPtr
+xmlNewNsPropEatName(xmlNodePtr node, xmlNsPtr ns, xmlChar *name,
+ const xmlChar *value) {
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewNsPropEatName : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ return xmlNewPropInternal(node, ns, name, value, 1);
+}
+
+/**
+ * xmlNewDocProp:
+ * @doc: the document
+ * @name: the name of the attribute
+ * @value: the value of the attribute
+ *
+ * Create a new property carried by a document.
+ * Returns a pointer to the attribute
+ */
+xmlAttrPtr
+xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value) {
+ xmlAttrPtr cur;
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewDocProp : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new property and fill the fields.
+ */
+ cur = (xmlAttrPtr) xmlMalloc(sizeof(xmlAttr));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building attribute");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlAttr));
+ cur->type = XML_ATTRIBUTE_NODE;
+
+ if ((doc != NULL) && (doc->dict != NULL))
+ cur->name = xmlDictLookup(doc->dict, name, -1);
+ else
+ cur->name = xmlStrdup(name);
+ cur->doc = doc;
+ if (value != NULL) {
+ xmlNodePtr tmp;
+
+ cur->children = xmlStringGetNodeList(doc, value);
+ cur->last = NULL;
+
+ tmp = cur->children;
+ while (tmp != NULL) {
+ tmp->parent = (xmlNodePtr) cur;
+ if (tmp->next == NULL)
+ cur->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * xmlFreePropList:
+ * @cur: the first property in the list
+ *
+ * Free a property and all its siblings, all the children are freed too.
+ */
+void
+xmlFreePropList(xmlAttrPtr cur) {
+ xmlAttrPtr next;
+ if (cur == NULL) return;
+ while (cur != NULL) {
+ next = cur->next;
+ xmlFreeProp(cur);
+ cur = next;
+ }
+}
+
+/**
+ * xmlFreeProp:
+ * @cur: an attribute
+ *
+ * Free one attribute, all the content is freed too
+ */
+void
+xmlFreeProp(xmlAttrPtr cur) {
+ xmlDictPtr dict = NULL;
+ if (cur == NULL) return;
+
+ if (cur->doc != NULL) dict = cur->doc->dict;
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue((xmlNodePtr)cur);
+
+ /* Check for ID removal -> leading to invalid references ! */
+ if ((cur->doc != NULL) && (cur->atype == XML_ATTRIBUTE_ID)) {
+ xmlRemoveID(cur->doc, cur);
+ }
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ DICT_FREE(cur->name)
+ xmlFree(cur);
+}
+
+/**
+ * xmlRemoveProp:
+ * @cur: an attribute
+ *
+ * Unlink and free one attribute, all the content is freed too
+ * Note this doesn't work for namespace definition attributes
+ *
+ * Returns 0 if success and -1 in case of error.
+ */
+int
+xmlRemoveProp(xmlAttrPtr cur) {
+ xmlAttrPtr tmp;
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRemoveProp : cur == NULL\n");
+#endif
+ return(-1);
+ }
+ if (cur->parent == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRemoveProp : cur->parent == NULL\n");
+#endif
+ return(-1);
+ }
+ tmp = cur->parent->properties;
+ if (tmp == cur) {
+ cur->parent->properties = cur->next;
+ if (cur->next != NULL)
+ cur->next->prev = NULL;
+ xmlFreeProp(cur);
+ return(0);
+ }
+ while (tmp != NULL) {
+ if (tmp->next == cur) {
+ tmp->next = cur->next;
+ if (tmp->next != NULL)
+ tmp->next->prev = tmp;
+ xmlFreeProp(cur);
+ return(0);
+ }
+ tmp = tmp->next;
+ }
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlRemoveProp : attribute not owned by its node\n");
+#endif
+ return(-1);
+}
+
+/**
+ * xmlNewDocPI:
+ * @doc: the target document
+ * @name: the processing instruction name
+ * @content: the PI content
+ *
+ * Creation of a processing instruction element.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewPI : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building PI");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_PI_NODE;
+
+ if ((doc != NULL) && (doc->dict != NULL))
+ cur->name = xmlDictLookup(doc->dict, name, -1);
+ else
+ cur->name = xmlStrdup(name);
+ if (content != NULL) {
+ cur->content = xmlStrdup(content);
+ }
+ cur->doc = doc;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * xmlNewPI:
+ * @name: the processing instruction name
+ * @content: the PI content
+ *
+ * Creation of a processing instruction element.
+ * Use xmlDocNewPI preferably to get string interning
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewPI(const xmlChar *name, const xmlChar *content) {
+ return(xmlNewDocPI(NULL, name, content));
+}
+
+/**
+ * xmlNewNode:
+ * @ns: namespace if any
+ * @name: the node name
+ *
+ * Creation of a new node element. @ns is optional (NULL).
+ *
+ * Returns a pointer to the new node object. Uses xmlStrdup() to make
+ * copy of @name.
+ */
+xmlNodePtr
+xmlNewNode(xmlNsPtr ns, const xmlChar *name) {
+ xmlNodePtr cur;
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewNode : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building node");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_ELEMENT_NODE;
+
+ cur->name = xmlStrdup(name);
+ cur->ns = ns;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewNodeEatName:
+ * @ns: namespace if any
+ * @name: the node name
+ *
+ * Creation of a new node element. @ns is optional (NULL).
+ *
+ * Returns a pointer to the new node object, with pointer @name as
+ * new node's name. Use xmlNewNode() if a copy of @name string is
+ * is needed as new node's name.
+ */
+xmlNodePtr
+xmlNewNodeEatName(xmlNsPtr ns, xmlChar *name) {
+ xmlNodePtr cur;
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewNode : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building node");
+ /* we can't check here that name comes from the doc dictionnary */
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_ELEMENT_NODE;
+
+ cur->name = name;
+ cur->ns = ns;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)cur);
+ return(cur);
+}
+
+/**
+ * xmlNewDocNode:
+ * @doc: the document
+ * @ns: namespace if any
+ * @name: the node name
+ * @content: the XML text content if any
+ *
+ * Creation of a new node element within a document. @ns and @content
+ * are optional (NULL).
+ * NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities
+ * references, but XML special chars need to be escaped first by using
+ * xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't
+ * need entities support.
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocNode(xmlDocPtr doc, xmlNsPtr ns,
+ const xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ if ((doc != NULL) && (doc->dict != NULL))
+ cur = xmlNewNodeEatName(ns, (xmlChar *)
+ xmlDictLookup(doc->dict, name, -1));
+ else
+ cur = xmlNewNode(ns, name);
+ if (cur != NULL) {
+ cur->doc = doc;
+ if (content != NULL) {
+ cur->children = xmlStringGetNodeList(doc, content);
+ UPDATE_LAST_CHILD_AND_PARENT(cur)
+ }
+ }
+
+ return(cur);
+}
+
+/**
+ * xmlNewDocNodeEatName:
+ * @doc: the document
+ * @ns: namespace if any
+ * @name: the node name
+ * @content: the XML text content if any
+ *
+ * Creation of a new node element within a document. @ns and @content
+ * are optional (NULL).
+ * NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities
+ * references, but XML special chars need to be escaped first by using
+ * xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't
+ * need entities support.
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocNodeEatName(xmlDocPtr doc, xmlNsPtr ns,
+ xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ cur = xmlNewNodeEatName(ns, name);
+ if (cur != NULL) {
+ cur->doc = doc;
+ if (content != NULL) {
+ cur->children = xmlStringGetNodeList(doc, content);
+ UPDATE_LAST_CHILD_AND_PARENT(cur)
+ }
+ } else {
+ /* if name don't come from the doc dictionnary free it here */
+ if ((name != NULL) && (doc != NULL) &&
+ (!(xmlDictOwns(doc->dict, name))))
+ xmlFree(name);
+ }
+ return(cur);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNewDocRawNode:
+ * @doc: the document
+ * @ns: namespace if any
+ * @name: the node name
+ * @content: the text content if any
+ *
+ * Creation of a new node element within a document. @ns and @content
+ * are optional (NULL).
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocRawNode(xmlDocPtr doc, xmlNsPtr ns,
+ const xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ cur = xmlNewDocNode(doc, ns, name, NULL);
+ if (cur != NULL) {
+ cur->doc = doc;
+ if (content != NULL) {
+ cur->children = xmlNewDocText(doc, content);
+ UPDATE_LAST_CHILD_AND_PARENT(cur)
+ }
+ }
+ return(cur);
+}
+
+/**
+ * xmlNewDocFragment:
+ * @doc: the document owning the fragment
+ *
+ * Creation of a new Fragment node.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocFragment(xmlDocPtr doc) {
+ xmlNodePtr cur;
+
+ /*
+ * Allocate a new DocumentFragment node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building fragment");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_DOCUMENT_FRAG_NODE;
+
+ cur->doc = doc;
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNewText:
+ * @content: the text content
+ *
+ * Creation of a new text node.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewText(const xmlChar *content) {
+ xmlNodePtr cur;
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building text");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_TEXT_NODE;
+
+ cur->name = xmlStringText;
+ if (content != NULL) {
+ cur->content = xmlStrdup(content);
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNewTextChild:
+ * @parent: the parent node
+ * @ns: a namespace if any
+ * @name: the name of the child
+ * @content: the text content of the child if any.
+ *
+ * Creation of a new child element, added at the end of @parent children list.
+ * @ns and @content parameters are optional (NULL). If @ns is NULL, the newly
+ * created element inherits the namespace of @parent. If @content is non NULL,
+ * a child TEXT node will be created containing the string @content.
+ * NOTE: Use xmlNewChild() if @content will contain entities that need to be
+ * preserved. Use this function, xmlNewTextChild(), if you need to ensure that
+ * reserved XML chars that might appear in @content, such as the ampersand,
+ * greater-than or less-than signs, are automatically replaced by their XML
+ * escaped entity representations.
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns,
+ const xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur, prev;
+
+ if (parent == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextChild : parent == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextChild : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node
+ */
+ if (parent->type == XML_ELEMENT_NODE) {
+ if (ns == NULL)
+ cur = xmlNewDocRawNode(parent->doc, parent->ns, name, content);
+ else
+ cur = xmlNewDocRawNode(parent->doc, ns, name, content);
+ } else if ((parent->type == XML_DOCUMENT_NODE) ||
+ (parent->type == XML_HTML_DOCUMENT_NODE)) {
+ if (ns == NULL)
+ cur = xmlNewDocRawNode((xmlDocPtr) parent, NULL, name, content);
+ else
+ cur = xmlNewDocRawNode((xmlDocPtr) parent, ns, name, content);
+ } else if (parent->type == XML_DOCUMENT_FRAG_NODE) {
+ cur = xmlNewDocRawNode( parent->doc, ns, name, content);
+ } else {
+ return(NULL);
+ }
+ if (cur == NULL) return(NULL);
+
+ /*
+ * add the new element at the end of the children list.
+ */
+ cur->type = XML_ELEMENT_NODE;
+ cur->parent = parent;
+ cur->doc = parent->doc;
+ if (parent->children == NULL) {
+ parent->children = cur;
+ parent->last = cur;
+ } else {
+ prev = parent->last;
+ prev->next = cur;
+ cur->prev = prev;
+ parent->last = cur;
+ }
+
+ return(cur);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNewCharRef:
+ * @doc: the document
+ * @name: the char ref string, starting with # or "&# ... ;"
+ *
+ * Creation of a new character reference node.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewCharRef(xmlDocPtr doc, const xmlChar *name) {
+ xmlNodePtr cur;
+
+ if (name == NULL)
+ return(NULL);
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building character reference");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_ENTITY_REF_NODE;
+
+ cur->doc = doc;
+ if (name[0] == '&') {
+ int len;
+ name++;
+ len = xmlStrlen(name);
+ if (name[len - 1] == ';')
+ cur->name = xmlStrndup(name, len - 1);
+ else
+ cur->name = xmlStrndup(name, len);
+ } else
+ cur->name = xmlStrdup(name);
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewReference:
+ * @doc: the document
+ * @name: the reference name, or the reference string with & and ;
+ *
+ * Creation of a new reference node.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewReference(const xmlDoc *doc, const xmlChar *name) {
+ xmlNodePtr cur;
+ xmlEntityPtr ent;
+
+ if (name == NULL)
+ return(NULL);
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building reference");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_ENTITY_REF_NODE;
+
+ cur->doc = (xmlDoc *)doc;
+ if (name[0] == '&') {
+ int len;
+ name++;
+ len = xmlStrlen(name);
+ if (name[len - 1] == ';')
+ cur->name = xmlStrndup(name, len - 1);
+ else
+ cur->name = xmlStrndup(name, len);
+ } else
+ cur->name = xmlStrdup(name);
+
+ ent = xmlGetDocEntity(doc, cur->name);
+ if (ent != NULL) {
+ cur->content = ent->content;
+ /*
+ * The parent pointer in entity is a DTD pointer and thus is NOT
+ * updated. Not sure if this is 100% correct.
+ * -George
+ */
+ cur->children = (xmlNodePtr) ent;
+ cur->last = (xmlNodePtr) ent;
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewDocText:
+ * @doc: the document
+ * @content: the text content
+ *
+ * Creation of a new text node within a document.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocText(const xmlDoc *doc, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ cur = xmlNewText(content);
+ if (cur != NULL) cur->doc = (xmlDoc *)doc;
+ return(cur);
+}
+
+/**
+ * xmlNewTextLen:
+ * @content: the text content
+ * @len: the text len.
+ *
+ * Creation of a new text node with an extra parameter for the content's length
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewTextLen(const xmlChar *content, int len) {
+ xmlNodePtr cur;
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building text");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_TEXT_NODE;
+
+ cur->name = xmlStringText;
+ if (content != NULL) {
+ cur->content = xmlStrndup(content, len);
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewDocTextLen:
+ * @doc: the document
+ * @content: the text content
+ * @len: the text len.
+ *
+ * Creation of a new text node with an extra content length parameter. The
+ * text node pertain to a given document.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocTextLen(xmlDocPtr doc, const xmlChar *content, int len) {
+ xmlNodePtr cur;
+
+ cur = xmlNewTextLen(content, len);
+ if (cur != NULL) cur->doc = doc;
+ return(cur);
+}
+
+/**
+ * xmlNewComment:
+ * @content: the comment content
+ *
+ * Creation of a new node containing a comment.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewComment(const xmlChar *content) {
+ xmlNodePtr cur;
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building comment");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_COMMENT_NODE;
+
+ cur->name = xmlStringComment;
+ if (content != NULL) {
+ cur->content = xmlStrdup(content);
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewCDataBlock:
+ * @doc: the document
+ * @content: the CDATA block content content
+ * @len: the length of the block
+ *
+ * Creation of a new node containing a CDATA block.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewCDataBlock(xmlDocPtr doc, const xmlChar *content, int len) {
+ xmlNodePtr cur;
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (cur == NULL) {
+ xmlTreeErrMemory("building CDATA");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNode));
+ cur->type = XML_CDATA_SECTION_NODE;
+ cur->doc = doc;
+
+ if (content != NULL) {
+ cur->content = xmlStrndup(content, len);
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue(cur);
+ return(cur);
+}
+
+/**
+ * xmlNewDocComment:
+ * @doc: the document
+ * @content: the comment content
+ *
+ * Creation of a new node containing a comment within a document.
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewDocComment(xmlDocPtr doc, const xmlChar *content) {
+ xmlNodePtr cur;
+
+ cur = xmlNewComment(content);
+ if (cur != NULL) cur->doc = doc;
+ return(cur);
+}
+
+/**
+ * xmlSetTreeDoc:
+ * @tree: the top element
+ * @doc: the document
+ *
+ * update all nodes under the tree to point to the right document
+ */
+void
+xmlSetTreeDoc(xmlNodePtr tree, xmlDocPtr doc) {
+ xmlAttrPtr prop;
+
+ if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL))
+ return;
+ if (tree->doc != doc) {
+ if(tree->type == XML_ELEMENT_NODE) {
+ prop = tree->properties;
+ while (prop != NULL) {
+ prop->doc = doc;
+ xmlSetListDoc(prop->children, doc);
+ prop = prop->next;
+ }
+ }
+ if (tree->children != NULL)
+ xmlSetListDoc(tree->children, doc);
+ tree->doc = doc;
+ }
+}
+
+/**
+ * xmlSetListDoc:
+ * @list: the first element
+ * @doc: the document
+ *
+ * update all nodes in the list to point to the right document
+ */
+void
+xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) {
+ xmlNodePtr cur;
+
+ if ((list == NULL) || (list->type == XML_NAMESPACE_DECL))
+ return;
+ cur = list;
+ while (cur != NULL) {
+ if (cur->doc != doc)
+ xmlSetTreeDoc(cur, doc);
+ cur = cur->next;
+ }
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlNewChild:
+ * @parent: the parent node
+ * @ns: a namespace if any
+ * @name: the name of the child
+ * @content: the XML content of the child if any.
+ *
+ * Creation of a new child element, added at the end of @parent children list.
+ * @ns and @content parameters are optional (NULL). If @ns is NULL, the newly
+ * created element inherits the namespace of @parent. If @content is non NULL,
+ * a child list containing the TEXTs and ENTITY_REFs node will be created.
+ * NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity
+ * references. XML special chars must be escaped first by using
+ * xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.
+ *
+ * Returns a pointer to the new node object.
+ */
+xmlNodePtr
+xmlNewChild(xmlNodePtr parent, xmlNsPtr ns,
+ const xmlChar *name, const xmlChar *content) {
+ xmlNodePtr cur, prev;
+
+ if (parent == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewChild : parent == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (name == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewChild : name == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node
+ */
+ if (parent->type == XML_ELEMENT_NODE) {
+ if (ns == NULL)
+ cur = xmlNewDocNode(parent->doc, parent->ns, name, content);
+ else
+ cur = xmlNewDocNode(parent->doc, ns, name, content);
+ } else if ((parent->type == XML_DOCUMENT_NODE) ||
+ (parent->type == XML_HTML_DOCUMENT_NODE)) {
+ if (ns == NULL)
+ cur = xmlNewDocNode((xmlDocPtr) parent, NULL, name, content);
+ else
+ cur = xmlNewDocNode((xmlDocPtr) parent, ns, name, content);
+ } else if (parent->type == XML_DOCUMENT_FRAG_NODE) {
+ cur = xmlNewDocNode( parent->doc, ns, name, content);
+ } else {
+ return(NULL);
+ }
+ if (cur == NULL) return(NULL);
+
+ /*
+ * add the new element at the end of the children list.
+ */
+ cur->type = XML_ELEMENT_NODE;
+ cur->parent = parent;
+ cur->doc = parent->doc;
+ if (parent->children == NULL) {
+ parent->children = cur;
+ parent->last = cur;
+ } else {
+ prev = parent->last;
+ prev->next = cur;
+ cur->prev = prev;
+ parent->last = cur;
+ }
+
+ return(cur);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlAddPropSibling:
+ * @prev: the attribute to which @prop is added after
+ * @cur: the base attribute passed to calling function
+ * @prop: the new attribute
+ *
+ * Add a new attribute after @prev using @cur as base attribute.
+ * When inserting before @cur, @prev is passed as @cur->prev.
+ * When inserting after @cur, @prev is passed as @cur.
+ * If an existing attribute is found it is detroyed prior to adding @prop.
+ *
+ * Returns the attribute being inserted or NULL in case of error.
+ */
+static xmlNodePtr
+xmlAddPropSibling(xmlNodePtr prev, xmlNodePtr cur, xmlNodePtr prop) {
+ xmlAttrPtr attr;
+
+ if ((cur == NULL) || (cur->type != XML_ATTRIBUTE_NODE) ||
+ (prop == NULL) || (prop->type != XML_ATTRIBUTE_NODE) ||
+ ((prev != NULL) && (prev->type != XML_ATTRIBUTE_NODE)))
+ return(NULL);
+
+ /* check if an attribute with the same name exists */
+ if (prop->ns == NULL)
+ attr = xmlHasNsProp(cur->parent, prop->name, NULL);
+ else
+ attr = xmlHasNsProp(cur->parent, prop->name, prop->ns->href);
+
+ if (prop->doc != cur->doc) {
+ xmlSetTreeDoc(prop, cur->doc);
+ }
+ prop->parent = cur->parent;
+ prop->prev = prev;
+ if (prev != NULL) {
+ prop->next = prev->next;
+ prev->next = prop;
+ if (prop->next)
+ prop->next->prev = prop;
+ } else {
+ prop->next = cur;
+ cur->prev = prop;
+ }
+ if (prop->prev == NULL && prop->parent != NULL)
+ prop->parent->properties = (xmlAttrPtr) prop;
+ if ((attr != NULL) && (attr->type != XML_ATTRIBUTE_DECL)) {
+ /* different instance, destroy it (attributes must be unique) */
+ xmlRemoveProp((xmlAttrPtr) attr);
+ }
+ return prop;
+}
+
+/**
+ * xmlAddNextSibling:
+ * @cur: the child node
+ * @elem: the new node
+ *
+ * Add a new node @elem as the next sibling of @cur
+ * If the new node was already inserted in a document it is
+ * first unlinked from its existing context.
+ * As a result of text merging @elem may be freed.
+ * If the new node is ATTRIBUTE, it is added into properties instead of children.
+ * If there is an attribute with equal name, it is first destroyed.
+ *
+ * Returns the new node or NULL in case of error.
+ */
+xmlNodePtr
+xmlAddNextSibling(xmlNodePtr cur, xmlNodePtr elem) {
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddNextSibling : cur == NULL\n");
+#endif
+ return(NULL);
+ }
+ if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddNextSibling : elem == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (cur == elem) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddNextSibling : cur == elem\n");
+#endif
+ return(NULL);
+ }
+
+ xmlUnlinkNode(elem);
+
+ if (elem->type == XML_TEXT_NODE) {
+ if (cur->type == XML_TEXT_NODE) {
+ xmlNodeAddContent(cur, elem->content);
+ xmlFreeNode(elem);
+ return(cur);
+ }
+ if ((cur->next != NULL) && (cur->next->type == XML_TEXT_NODE) &&
+ (cur->name == cur->next->name)) {
+ xmlChar *tmp;
+
+ tmp = xmlStrdup(elem->content);
+ tmp = xmlStrcat(tmp, cur->next->content);
+ xmlNodeSetContent(cur->next, tmp);
+ xmlFree(tmp);
+ xmlFreeNode(elem);
+ return(cur->next);
+ }
+ } else if (elem->type == XML_ATTRIBUTE_NODE) {
+ return xmlAddPropSibling(cur, cur, elem);
+ }
+
+ if (elem->doc != cur->doc) {
+ xmlSetTreeDoc(elem, cur->doc);
+ }
+ elem->parent = cur->parent;
+ elem->prev = cur;
+ elem->next = cur->next;
+ cur->next = elem;
+ if (elem->next != NULL)
+ elem->next->prev = elem;
+ if ((elem->parent != NULL) && (elem->parent->last == cur))
+ elem->parent->last = elem;
+ return(elem);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+/**
+ * xmlAddPrevSibling:
+ * @cur: the child node
+ * @elem: the new node
+ *
+ * Add a new node @elem as the previous sibling of @cur
+ * merging adjacent TEXT nodes (@elem may be freed)
+ * If the new node was already inserted in a document it is
+ * first unlinked from its existing context.
+ * If the new node is ATTRIBUTE, it is added into properties instead of children.
+ * If there is an attribute with equal name, it is first destroyed.
+ *
+ * Returns the new node or NULL in case of error.
+ */
+xmlNodePtr
+xmlAddPrevSibling(xmlNodePtr cur, xmlNodePtr elem) {
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddPrevSibling : cur == NULL\n");
+#endif
+ return(NULL);
+ }
+ if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddPrevSibling : elem == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (cur == elem) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddPrevSibling : cur == elem\n");
+#endif
+ return(NULL);
+ }
+
+ xmlUnlinkNode(elem);
+
+ if (elem->type == XML_TEXT_NODE) {
+ if (cur->type == XML_TEXT_NODE) {
+ xmlChar *tmp;
+
+ tmp = xmlStrdup(elem->content);
+ tmp = xmlStrcat(tmp, cur->content);
+ xmlNodeSetContent(cur, tmp);
+ xmlFree(tmp);
+ xmlFreeNode(elem);
+ return(cur);
+ }
+ if ((cur->prev != NULL) && (cur->prev->type == XML_TEXT_NODE) &&
+ (cur->name == cur->prev->name)) {
+ xmlNodeAddContent(cur->prev, elem->content);
+ xmlFreeNode(elem);
+ return(cur->prev);
+ }
+ } else if (elem->type == XML_ATTRIBUTE_NODE) {
+ return xmlAddPropSibling(cur->prev, cur, elem);
+ }
+
+ if (elem->doc != cur->doc) {
+ xmlSetTreeDoc(elem, cur->doc);
+ }
+ elem->parent = cur->parent;
+ elem->next = cur;
+ elem->prev = cur->prev;
+ cur->prev = elem;
+ if (elem->prev != NULL)
+ elem->prev->next = elem;
+ if ((elem->parent != NULL) && (elem->parent->children == cur)) {
+ elem->parent->children = elem;
+ }
+ return(elem);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlAddSibling:
+ * @cur: the child node
+ * @elem: the new node
+ *
+ * Add a new element @elem to the list of siblings of @cur
+ * merging adjacent TEXT nodes (@elem may be freed)
+ * If the new element was already inserted in a document it is
+ * first unlinked from its existing context.
+ *
+ * Returns the new element or NULL in case of error.
+ */
+xmlNodePtr
+xmlAddSibling(xmlNodePtr cur, xmlNodePtr elem) {
+ xmlNodePtr parent;
+
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddSibling : cur == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if ((elem == NULL) || (elem->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddSibling : elem == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (cur == elem) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddSibling : cur == elem\n");
+#endif
+ return(NULL);
+ }
+
+ /*
+ * Constant time is we can rely on the ->parent->last to find
+ * the last sibling.
+ */
+ if ((cur->type != XML_ATTRIBUTE_NODE) && (cur->parent != NULL) &&
+ (cur->parent->children != NULL) &&
+ (cur->parent->last != NULL) &&
+ (cur->parent->last->next == NULL)) {
+ cur = cur->parent->last;
+ } else {
+ while (cur->next != NULL) cur = cur->next;
+ }
+
+ xmlUnlinkNode(elem);
+
+ if ((cur->type == XML_TEXT_NODE) && (elem->type == XML_TEXT_NODE) &&
+ (cur->name == elem->name)) {
+ xmlNodeAddContent(cur, elem->content);
+ xmlFreeNode(elem);
+ return(cur);
+ } else if (elem->type == XML_ATTRIBUTE_NODE) {
+ return xmlAddPropSibling(cur, cur, elem);
+ }
+
+ if (elem->doc != cur->doc) {
+ xmlSetTreeDoc(elem, cur->doc);
+ }
+ parent = cur->parent;
+ elem->prev = cur;
+ elem->next = NULL;
+ elem->parent = parent;
+ cur->next = elem;
+ if (parent != NULL)
+ parent->last = elem;
+
+ return(elem);
+}
+
+/**
+ * xmlAddChildList:
+ * @parent: the parent node
+ * @cur: the first node in the list
+ *
+ * Add a list of node at the end of the child list of the parent
+ * merging adjacent TEXT nodes (@cur may be freed)
+ *
+ * Returns the last child or NULL in case of error.
+ */
+xmlNodePtr
+xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur) {
+ xmlNodePtr prev;
+
+ if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddChildList : parent == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddChildList : child == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if ((cur->doc != NULL) && (parent->doc != NULL) &&
+ (cur->doc != parent->doc)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "Elements moved to a different document\n");
+#endif
+ }
+
+ /*
+ * add the first element at the end of the children list.
+ */
+
+ if (parent->children == NULL) {
+ parent->children = cur;
+ } else {
+ /*
+ * If cur and parent->last both are TEXT nodes, then merge them.
+ */
+ if ((cur->type == XML_TEXT_NODE) &&
+ (parent->last->type == XML_TEXT_NODE) &&
+ (cur->name == parent->last->name)) {
+ xmlNodeAddContent(parent->last, cur->content);
+ /*
+ * if it's the only child, nothing more to be done.
+ */
+ if (cur->next == NULL) {
+ xmlFreeNode(cur);
+ return(parent->last);
+ }
+ prev = cur;
+ cur = cur->next;
+ xmlFreeNode(prev);
+ }
+ prev = parent->last;
+ prev->next = cur;
+ cur->prev = prev;
+ }
+ while (cur->next != NULL) {
+ cur->parent = parent;
+ if (cur->doc != parent->doc) {
+ xmlSetTreeDoc(cur, parent->doc);
+ }
+ cur = cur->next;
+ }
+ cur->parent = parent;
+ /* the parent may not be linked to a doc ! */
+ if (cur->doc != parent->doc) {
+ xmlSetTreeDoc(cur, parent->doc);
+ }
+ parent->last = cur;
+
+ return(cur);
+}
+
+/**
+ * xmlAddChild:
+ * @parent: the parent node
+ * @cur: the child node
+ *
+ * Add a new node to @parent, at the end of the child (or property) list
+ * merging adjacent TEXT nodes (in which case @cur is freed)
+ * If the new node is ATTRIBUTE, it is added into properties instead of children.
+ * If there is an attribute with equal name, it is first destroyed.
+ *
+ * Returns the child or NULL in case of error.
+ */
+xmlNodePtr
+xmlAddChild(xmlNodePtr parent, xmlNodePtr cur) {
+ xmlNodePtr prev;
+
+ if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddChild : parent == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddChild : child == NULL\n");
+#endif
+ return(NULL);
+ }
+
+ if (parent == cur) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlAddChild : parent == cur\n");
+#endif
+ return(NULL);
+ }
+ /*
+ * If cur is a TEXT node, merge its content with adjacent TEXT nodes
+ * cur is then freed.
+ */
+ if (cur->type == XML_TEXT_NODE) {
+ if ((parent->type == XML_TEXT_NODE) &&
+ (parent->content != NULL) &&
+ (parent->name == cur->name)) {
+ xmlNodeAddContent(parent, cur->content);
+ xmlFreeNode(cur);
+ return(parent);
+ }
+ if ((parent->last != NULL) && (parent->last->type == XML_TEXT_NODE) &&
+ (parent->last->name == cur->name) &&
+ (parent->last != cur)) {
+ xmlNodeAddContent(parent->last, cur->content);
+ xmlFreeNode(cur);
+ return(parent->last);
+ }
+ }
+
+ /*
+ * add the new element at the end of the children list.
+ */
+ prev = cur->parent;
+ cur->parent = parent;
+ if (cur->doc != parent->doc) {
+ xmlSetTreeDoc(cur, parent->doc);
+ }
+ /* this check prevents a loop on tree-traversions if a developer
+ * tries to add a node to its parent multiple times
+ */
+ if (prev == parent)
+ return(cur);
+
+ /*
+ * Coalescing
+ */
+ if ((parent->type == XML_TEXT_NODE) &&
+ (parent->content != NULL) &&
+ (parent != cur)) {
+ xmlNodeAddContent(parent, cur->content);
+ xmlFreeNode(cur);
+ return(parent);
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ if (parent->type != XML_ELEMENT_NODE)
+ return(NULL);
+ if (parent->properties != NULL) {
+ /* check if an attribute with the same name exists */
+ xmlAttrPtr lastattr;
+
+ if (cur->ns == NULL)
+ lastattr = xmlHasNsProp(parent, cur->name, NULL);
+ else
+ lastattr = xmlHasNsProp(parent, cur->name, cur->ns->href);
+ if ((lastattr != NULL) && (lastattr != (xmlAttrPtr) cur) && (lastattr->type != XML_ATTRIBUTE_DECL)) {
+ /* different instance, destroy it (attributes must be unique) */
+ xmlUnlinkNode((xmlNodePtr) lastattr);
+ xmlFreeProp(lastattr);
+ }
+ if (lastattr == (xmlAttrPtr) cur)
+ return(cur);
+
+ }
+ if (parent->properties == NULL) {
+ parent->properties = (xmlAttrPtr) cur;
+ } else {
+ /* find the end */
+ xmlAttrPtr lastattr = parent->properties;
+ while (lastattr->next != NULL) {
+ lastattr = lastattr->next;
+ }
+ lastattr->next = (xmlAttrPtr) cur;
+ ((xmlAttrPtr) cur)->prev = lastattr;
+ }
+ } else {
+ if (parent->children == NULL) {
+ parent->children = cur;
+ parent->last = cur;
+ } else {
+ prev = parent->last;
+ prev->next = cur;
+ cur->prev = prev;
+ parent->last = cur;
+ }
+ }
+ return(cur);
+}
+
+/**
+ * xmlGetLastChild:
+ * @parent: the parent node
+ *
+ * Search the last child of a node.
+ * Returns the last child or NULL if none.
+ */
+xmlNodePtr
+xmlGetLastChild(const xmlNode *parent) {
+ if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGetLastChild : parent == NULL\n");
+#endif
+ return(NULL);
+ }
+ return(parent->last);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * 5 interfaces from DOM ElementTraversal
+ */
+
+/**
+ * xmlChildElementCount:
+ * @parent: the parent node
+ *
+ * Finds the current number of child nodes of that element which are
+ * element nodes.
+ * Note the handling of entities references is different than in
+ * the W3C DOM element traversal spec since we don't have back reference
+ * from entities content to entities references.
+ *
+ * Returns the count of element child or 0 if not available
+ */
+unsigned long
+xmlChildElementCount(xmlNodePtr parent) {
+ unsigned long ret = 0;
+ xmlNodePtr cur = NULL;
+
+ if (parent == NULL)
+ return(0);
+ switch (parent->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ cur = parent->children;
+ break;
+ default:
+ return(0);
+ }
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE)
+ ret++;
+ cur = cur->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlFirstElementChild:
+ * @parent: the parent node
+ *
+ * Finds the first child node of that element which is a Element node
+ * Note the handling of entities references is different than in
+ * the W3C DOM element traversal spec since we don't have back reference
+ * from entities content to entities references.
+ *
+ * Returns the first element child or NULL if not available
+ */
+xmlNodePtr
+xmlFirstElementChild(xmlNodePtr parent) {
+ xmlNodePtr cur = NULL;
+
+ if (parent == NULL)
+ return(NULL);
+ switch (parent->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ cur = parent->children;
+ break;
+ default:
+ return(NULL);
+ }
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE)
+ return(cur);
+ cur = cur->next;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlLastElementChild:
+ * @parent: the parent node
+ *
+ * Finds the last child node of that element which is a Element node
+ * Note the handling of entities references is different than in
+ * the W3C DOM element traversal spec since we don't have back reference
+ * from entities content to entities references.
+ *
+ * Returns the last element child or NULL if not available
+ */
+xmlNodePtr
+xmlLastElementChild(xmlNodePtr parent) {
+ xmlNodePtr cur = NULL;
+
+ if (parent == NULL)
+ return(NULL);
+ switch (parent->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ cur = parent->last;
+ break;
+ default:
+ return(NULL);
+ }
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE)
+ return(cur);
+ cur = cur->prev;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlPreviousElementSibling:
+ * @node: the current node
+ *
+ * Finds the first closest previous sibling of the node which is an
+ * element node.
+ * Note the handling of entities references is different than in
+ * the W3C DOM element traversal spec since we don't have back reference
+ * from entities content to entities references.
+ *
+ * Returns the previous element sibling or NULL if not available
+ */
+xmlNodePtr
+xmlPreviousElementSibling(xmlNodePtr node) {
+ if (node == NULL)
+ return(NULL);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ node = node->prev;
+ break;
+ default:
+ return(NULL);
+ }
+ while (node != NULL) {
+ if (node->type == XML_ELEMENT_NODE)
+ return(node);
+ node = node->prev;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlNextElementSibling:
+ * @node: the current node
+ *
+ * Finds the first closest next sibling of the node which is an
+ * element node.
+ * Note the handling of entities references is different than in
+ * the W3C DOM element traversal spec since we don't have back reference
+ * from entities content to entities references.
+ *
+ * Returns the next element sibling or NULL if not available
+ */
+xmlNodePtr
+xmlNextElementSibling(xmlNodePtr node) {
+ if (node == NULL)
+ return(NULL);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ node = node->next;
+ break;
+ default:
+ return(NULL);
+ }
+ while (node != NULL) {
+ if (node->type == XML_ELEMENT_NODE)
+ return(node);
+ node = node->next;
+ }
+ return(NULL);
+}
+
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlFreeNodeList:
+ * @cur: the first node in the list
+ *
+ * Free a node and all its siblings, this is a recursive behaviour, all
+ * the children are freed too.
+ */
+void
+xmlFreeNodeList(xmlNodePtr cur) {
+ xmlNodePtr next;
+ xmlDictPtr dict = NULL;
+
+ if (cur == NULL) return;
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlFreeNsList((xmlNsPtr) cur);
+ return;
+ }
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+#ifdef LIBXML_DOCB_ENABLED
+ (cur->type == XML_DOCB_DOCUMENT_NODE) ||
+#endif
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ xmlFreeDoc((xmlDocPtr) cur);
+ return;
+ }
+ if (cur->doc != NULL) dict = cur->doc->dict;
+ while (cur != NULL) {
+ next = cur->next;
+ if (cur->type != XML_DTD_NODE) {
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue(cur);
+
+ if ((cur->children != NULL) &&
+ (cur->type != XML_ENTITY_REF_NODE))
+ xmlFreeNodeList(cur->children);
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->properties != NULL))
+ xmlFreePropList(cur->properties);
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->type != XML_XINCLUDE_START) &&
+ (cur->type != XML_XINCLUDE_END) &&
+ (cur->type != XML_ENTITY_REF_NODE) &&
+ (cur->content != (xmlChar *) &(cur->properties))) {
+ DICT_FREE(cur->content)
+ }
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->nsDef != NULL))
+ xmlFreeNsList(cur->nsDef);
+
+ /*
+ * When a node is a text node or a comment, it uses a global static
+ * variable for the name of the node.
+ * Otherwise the node name might come from the document's
+ * dictionnary
+ */
+ if ((cur->name != NULL) &&
+ (cur->type != XML_TEXT_NODE) &&
+ (cur->type != XML_COMMENT_NODE))
+ DICT_FREE(cur->name)
+ xmlFree(cur);
+ }
+ cur = next;
+ }
+}
+
+/**
+ * xmlFreeNode:
+ * @cur: the node
+ *
+ * Free a node, this is a recursive behaviour, all the children are freed too.
+ * This doesn't unlink the child from the list, use xmlUnlinkNode() first.
+ */
+void
+xmlFreeNode(xmlNodePtr cur) {
+ xmlDictPtr dict = NULL;
+
+ if (cur == NULL) return;
+
+ /* use xmlFreeDtd for DTD nodes */
+ if (cur->type == XML_DTD_NODE) {
+ xmlFreeDtd((xmlDtdPtr) cur);
+ return;
+ }
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlFreeNs((xmlNsPtr) cur);
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlFreeProp((xmlAttrPtr) cur);
+ return;
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue(cur);
+
+ if (cur->doc != NULL) dict = cur->doc->dict;
+
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlEntityPtr ent = (xmlEntityPtr) cur;
+ DICT_FREE(ent->SystemID);
+ DICT_FREE(ent->ExternalID);
+ }
+ if ((cur->children != NULL) &&
+ (cur->type != XML_ENTITY_REF_NODE))
+ xmlFreeNodeList(cur->children);
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->properties != NULL))
+ xmlFreePropList(cur->properties);
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->content != NULL) &&
+ (cur->type != XML_ENTITY_REF_NODE) &&
+ (cur->type != XML_XINCLUDE_END) &&
+ (cur->type != XML_XINCLUDE_START) &&
+ (cur->content != (xmlChar *) &(cur->properties))) {
+ DICT_FREE(cur->content)
+ }
+
+ /*
+ * When a node is a text node or a comment, it uses a global static
+ * variable for the name of the node.
+ * Otherwise the node name might come from the document's dictionnary
+ */
+ if ((cur->name != NULL) &&
+ (cur->type != XML_TEXT_NODE) &&
+ (cur->type != XML_COMMENT_NODE))
+ DICT_FREE(cur->name)
+
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->nsDef != NULL))
+ xmlFreeNsList(cur->nsDef);
+ xmlFree(cur);
+}
+
+/**
+ * xmlUnlinkNode:
+ * @cur: the node
+ *
+ * Unlink a node from it's current context, the node is not freed
+ * If one need to free the node, use xmlFreeNode() routine after the
+ * unlink to discard it.
+ * Note that namespace nodes can't be unlinked as they do not have
+ * pointer to their parent.
+ */
+void
+xmlUnlinkNode(xmlNodePtr cur) {
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlUnlinkNode : node == NULL\n");
+#endif
+ return;
+ }
+ if (cur->type == XML_NAMESPACE_DECL)
+ return;
+ if (cur->type == XML_DTD_NODE) {
+ xmlDocPtr doc;
+ doc = cur->doc;
+ if (doc != NULL) {
+ if (doc->intSubset == (xmlDtdPtr) cur)
+ doc->intSubset = NULL;
+ if (doc->extSubset == (xmlDtdPtr) cur)
+ doc->extSubset = NULL;
+ }
+ }
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlDocPtr doc;
+ doc = cur->doc;
+ if (doc != NULL) {
+ if (doc->intSubset != NULL) {
+ if (xmlHashLookup(doc->intSubset->entities, cur->name) == cur)
+ xmlHashRemoveEntry(doc->intSubset->entities, cur->name,
+ NULL);
+ if (xmlHashLookup(doc->intSubset->pentities, cur->name) == cur)
+ xmlHashRemoveEntry(doc->intSubset->pentities, cur->name,
+ NULL);
+ }
+ if (doc->extSubset != NULL) {
+ if (xmlHashLookup(doc->extSubset->entities, cur->name) == cur)
+ xmlHashRemoveEntry(doc->extSubset->entities, cur->name,
+ NULL);
+ if (xmlHashLookup(doc->extSubset->pentities, cur->name) == cur)
+ xmlHashRemoveEntry(doc->extSubset->pentities, cur->name,
+ NULL);
+ }
+ }
+ }
+ if (cur->parent != NULL) {
+ xmlNodePtr parent;
+ parent = cur->parent;
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ if (parent->properties == (xmlAttrPtr) cur)
+ parent->properties = ((xmlAttrPtr) cur)->next;
+ } else {
+ if (parent->children == cur)
+ parent->children = cur->next;
+ if (parent->last == cur)
+ parent->last = cur->prev;
+ }
+ cur->parent = NULL;
+ }
+ if (cur->next != NULL)
+ cur->next->prev = cur->prev;
+ if (cur->prev != NULL)
+ cur->prev->next = cur->next;
+ cur->next = cur->prev = NULL;
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+/**
+ * xmlReplaceNode:
+ * @old: the old node
+ * @cur: the node
+ *
+ * Unlink the old node from its current context, prune the new one
+ * at the same place. If @cur was already inserted in a document it is
+ * first unlinked from its existing context.
+ *
+ * Returns the @old node
+ */
+xmlNodePtr
+xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) {
+ if (old == cur) return(NULL);
+ if ((old == NULL) || (old->type == XML_NAMESPACE_DECL) ||
+ (old->parent == NULL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlReplaceNode : old == NULL or without parent\n");
+#endif
+ return(NULL);
+ }
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) {
+ xmlUnlinkNode(old);
+ return(old);
+ }
+ if (cur == old) {
+ return(old);
+ }
+ if ((old->type==XML_ATTRIBUTE_NODE) && (cur->type!=XML_ATTRIBUTE_NODE)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlReplaceNode : Trying to replace attribute node with other node type\n");
+#endif
+ return(old);
+ }
+ if ((cur->type==XML_ATTRIBUTE_NODE) && (old->type!=XML_ATTRIBUTE_NODE)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlReplaceNode : Trying to replace a non-attribute node with attribute node\n");
+#endif
+ return(old);
+ }
+ xmlUnlinkNode(cur);
+ xmlSetTreeDoc(cur, old->doc);
+ cur->parent = old->parent;
+ cur->next = old->next;
+ if (cur->next != NULL)
+ cur->next->prev = cur;
+ cur->prev = old->prev;
+ if (cur->prev != NULL)
+ cur->prev->next = cur;
+ if (cur->parent != NULL) {
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ if (cur->parent->properties == (xmlAttrPtr)old)
+ cur->parent->properties = ((xmlAttrPtr) cur);
+ } else {
+ if (cur->parent->children == old)
+ cur->parent->children = cur;
+ if (cur->parent->last == old)
+ cur->parent->last = cur;
+ }
+ }
+ old->next = old->prev = NULL;
+ old->parent = NULL;
+ return(old);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/************************************************************************
+ * *
+ * Copy operations *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCopyNamespace:
+ * @cur: the namespace
+ *
+ * Do a copy of the namespace.
+ *
+ * Returns: a new #xmlNsPtr, or NULL in case of error.
+ */
+xmlNsPtr
+xmlCopyNamespace(xmlNsPtr cur) {
+ xmlNsPtr ret;
+
+ if (cur == NULL) return(NULL);
+ switch (cur->type) {
+ case XML_LOCAL_NAMESPACE:
+ ret = xmlNewNs(NULL, cur->href, cur->prefix);
+ break;
+ default:
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlCopyNamespace: invalid type %d\n", cur->type);
+#endif
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlCopyNamespaceList:
+ * @cur: the first namespace
+ *
+ * Do a copy of an namespace list.
+ *
+ * Returns: a new #xmlNsPtr, or NULL in case of error.
+ */
+xmlNsPtr
+xmlCopyNamespaceList(xmlNsPtr cur) {
+ xmlNsPtr ret = NULL;
+ xmlNsPtr p = NULL,q;
+
+ while (cur != NULL) {
+ q = xmlCopyNamespace(cur);
+ if (p == NULL) {
+ ret = p = q;
+ } else {
+ p->next = q;
+ p = q;
+ }
+ cur = cur->next;
+ }
+ return(ret);
+}
+
+static xmlNodePtr
+xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent);
+
+static xmlAttrPtr
+xmlCopyPropInternal(xmlDocPtr doc, xmlNodePtr target, xmlAttrPtr cur) {
+ xmlAttrPtr ret;
+
+ if (cur == NULL) return(NULL);
+ if ((target != NULL) && (target->type != XML_ELEMENT_NODE))
+ return(NULL);
+ if (target != NULL)
+ ret = xmlNewDocProp(target->doc, cur->name, NULL);
+ else if (doc != NULL)
+ ret = xmlNewDocProp(doc, cur->name, NULL);
+ else if (cur->parent != NULL)
+ ret = xmlNewDocProp(cur->parent->doc, cur->name, NULL);
+ else if (cur->children != NULL)
+ ret = xmlNewDocProp(cur->children->doc, cur->name, NULL);
+ else
+ ret = xmlNewDocProp(NULL, cur->name, NULL);
+ if (ret == NULL) return(NULL);
+ ret->parent = target;
+
+ if ((cur->ns != NULL) && (target != NULL)) {
+ xmlNsPtr ns;
+
+ ns = xmlSearchNs(target->doc, target, cur->ns->prefix);
+ if (ns == NULL) {
+ /*
+ * Humm, we are copying an element whose namespace is defined
+ * out of the new tree scope. Search it in the original tree
+ * and add it at the top of the new tree
+ */
+ ns = xmlSearchNs(cur->doc, cur->parent, cur->ns->prefix);
+ if (ns != NULL) {
+ xmlNodePtr root = target;
+ xmlNodePtr pred = NULL;
+
+ while (root->parent != NULL) {
+ pred = root;
+ root = root->parent;
+ }
+ if (root == (xmlNodePtr) target->doc) {
+ /* correct possibly cycling above the document elt */
+ root = pred;
+ }
+ ret->ns = xmlNewNs(root, ns->href, ns->prefix);
+ }
+ } else {
+ /*
+ * we have to find something appropriate here since
+ * we cant be sure, that the namespce we found is identified
+ * by the prefix
+ */
+ if (xmlStrEqual(ns->href, cur->ns->href)) {
+ /* this is the nice case */
+ ret->ns = ns;
+ } else {
+ /*
+ * we are in trouble: we need a new reconcilied namespace.
+ * This is expensive
+ */
+ ret->ns = xmlNewReconciliedNs(target->doc, target, cur->ns);
+ }
+ }
+
+ } else
+ ret->ns = NULL;
+
+ if (cur->children != NULL) {
+ xmlNodePtr tmp;
+
+ ret->children = xmlStaticCopyNodeList(cur->children, ret->doc, (xmlNodePtr) ret);
+ ret->last = NULL;
+ tmp = ret->children;
+ while (tmp != NULL) {
+ /* tmp->parent = (xmlNodePtr)ret; */
+ if (tmp->next == NULL)
+ ret->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+ /*
+ * Try to handle IDs
+ */
+ if ((target!= NULL) && (cur!= NULL) &&
+ (target->doc != NULL) && (cur->doc != NULL) &&
+ (cur->doc->ids != NULL) && (cur->parent != NULL)) {
+ if (xmlIsID(cur->doc, cur->parent, cur)) {
+ xmlChar *id;
+
+ id = xmlNodeListGetString(cur->doc, cur->children, 1);
+ if (id != NULL) {
+ xmlAddID(NULL, target->doc, id, ret);
+ xmlFree(id);
+ }
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlCopyProp:
+ * @target: the element where the attribute will be grafted
+ * @cur: the attribute
+ *
+ * Do a copy of the attribute.
+ *
+ * Returns: a new #xmlAttrPtr, or NULL in case of error.
+ */
+xmlAttrPtr
+xmlCopyProp(xmlNodePtr target, xmlAttrPtr cur) {
+ return xmlCopyPropInternal(NULL, target, cur);
+}
+
+/**
+ * xmlCopyPropList:
+ * @target: the element where the attributes will be grafted
+ * @cur: the first attribute
+ *
+ * Do a copy of an attribute list.
+ *
+ * Returns: a new #xmlAttrPtr, or NULL in case of error.
+ */
+xmlAttrPtr
+xmlCopyPropList(xmlNodePtr target, xmlAttrPtr cur) {
+ xmlAttrPtr ret = NULL;
+ xmlAttrPtr p = NULL,q;
+
+ if ((target != NULL) && (target->type != XML_ELEMENT_NODE))
+ return(NULL);
+ while (cur != NULL) {
+ q = xmlCopyProp(target, cur);
+ if (q == NULL)
+ return(NULL);
+ if (p == NULL) {
+ ret = p = q;
+ } else {
+ p->next = q;
+ q->prev = p;
+ p = q;
+ }
+ cur = cur->next;
+ }
+ return(ret);
+}
+
+/*
+ * NOTE about the CopyNode operations !
+ *
+ * They are split into external and internal parts for one
+ * tricky reason: namespaces. Doing a direct copy of a node
+ * say RPM:Copyright without changing the namespace pointer to
+ * something else can produce stale links. One way to do it is
+ * to keep a reference counter but this doesn't work as soon
+ * as one move the element or the subtree out of the scope of
+ * the existing namespace. The actual solution seems to add
+ * a copy of the namespace at the top of the copied tree if
+ * not available in the subtree.
+ * Hence two functions, the public front-end call the inner ones
+ * The argument "recursive" normally indicates a recursive copy
+ * of the node with values 0 (no) and 1 (yes). For XInclude,
+ * however, we allow a value of 2 to indicate copy properties and
+ * namespace info, but don't recurse on children.
+ */
+
+static xmlNodePtr
+xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
+ int extended) {
+ xmlNodePtr ret;
+
+ if (node == NULL) return(NULL);
+ switch (node->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ break;
+ case XML_ATTRIBUTE_NODE:
+ return((xmlNodePtr) xmlCopyPropInternal(doc, parent, (xmlAttrPtr) node));
+ case XML_NAMESPACE_DECL:
+ return((xmlNodePtr) xmlCopyNamespaceList((xmlNsPtr) node));
+
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+#ifdef LIBXML_TREE_ENABLED
+ return((xmlNodePtr) xmlCopyDoc((xmlDocPtr) node, extended));
+#endif /* LIBXML_TREE_ENABLED */
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ return(NULL);
+ }
+
+ /*
+ * Allocate a new node and fill the fields.
+ */
+ ret = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (ret == NULL) {
+ xmlTreeErrMemory("copying node");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlNode));
+ ret->type = node->type;
+
+ ret->doc = doc;
+ ret->parent = parent;
+ if (node->name == xmlStringText)
+ ret->name = xmlStringText;
+ else if (node->name == xmlStringTextNoenc)
+ ret->name = xmlStringTextNoenc;
+ else if (node->name == xmlStringComment)
+ ret->name = xmlStringComment;
+ else if (node->name != NULL) {
+ if ((doc != NULL) && (doc->dict != NULL))
+ ret->name = xmlDictLookup(doc->dict, node->name, -1);
+ else
+ ret->name = xmlStrdup(node->name);
+ }
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->content != NULL) &&
+ (node->type != XML_ENTITY_REF_NODE) &&
+ (node->type != XML_XINCLUDE_END) &&
+ (node->type != XML_XINCLUDE_START)) {
+ ret->content = xmlStrdup(node->content);
+ }else{
+ if (node->type == XML_ELEMENT_NODE)
+ ret->line = node->line;
+ }
+ if (parent != NULL) {
+ xmlNodePtr tmp;
+
+ /*
+ * this is a tricky part for the node register thing:
+ * in case ret does get coalesced in xmlAddChild
+ * the deregister-node callback is called; so we register ret now already
+ */
+ if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
+
+ tmp = xmlAddChild(parent, ret);
+ /* node could have coalesced */
+ if (tmp != ret)
+ return(tmp);
+ }
+
+ if (!extended)
+ goto out;
+ if (((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_XINCLUDE_START)) && (node->nsDef != NULL))
+ ret->nsDef = xmlCopyNamespaceList(node->nsDef);
+
+ if (node->ns != NULL) {
+ xmlNsPtr ns;
+
+ ns = xmlSearchNs(doc, ret, node->ns->prefix);
+ if (ns == NULL) {
+ /*
+ * Humm, we are copying an element whose namespace is defined
+ * out of the new tree scope. Search it in the original tree
+ * and add it at the top of the new tree
+ */
+ ns = xmlSearchNs(node->doc, node, node->ns->prefix);
+ if (ns != NULL) {
+ xmlNodePtr root = ret;
+
+ while (root->parent != NULL) root = root->parent;
+ ret->ns = xmlNewNs(root, ns->href, ns->prefix);
+ } else {
+ ret->ns = xmlNewReconciliedNs(doc, ret, node->ns);
+ }
+ } else {
+ /*
+ * reference the existing namespace definition in our own tree.
+ */
+ ret->ns = ns;
+ }
+ }
+ if (((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_XINCLUDE_START)) && (node->properties != NULL))
+ ret->properties = xmlCopyPropList(ret, node->properties);
+ if (node->type == XML_ENTITY_REF_NODE) {
+ if ((doc == NULL) || (node->doc != doc)) {
+ /*
+ * The copied node will go into a separate document, so
+ * to avoid dangling references to the ENTITY_DECL node
+ * we cannot keep the reference. Try to find it in the
+ * target document.
+ */
+ ret->children = (xmlNodePtr) xmlGetDocEntity(doc, ret->name);
+ } else {
+ ret->children = node->children;
+ }
+ ret->last = ret->children;
+ } else if ((node->children != NULL) && (extended != 2)) {
+ ret->children = xmlStaticCopyNodeList(node->children, doc, ret);
+ UPDATE_LAST_CHILD_AND_PARENT(ret)
+ }
+
+out:
+ /* if parent != NULL we already registered the node above */
+ if ((parent == NULL) &&
+ ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)))
+ xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
+ return(ret);
+}
+
+static xmlNodePtr
+xmlStaticCopyNodeList(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent) {
+ xmlNodePtr ret = NULL;
+ xmlNodePtr p = NULL,q;
+
+ while (node != NULL) {
+#ifdef LIBXML_TREE_ENABLED
+ if (node->type == XML_DTD_NODE ) {
+ if (doc == NULL) {
+ node = node->next;
+ continue;
+ }
+ if (doc->intSubset == NULL) {
+ q = (xmlNodePtr) xmlCopyDtd( (xmlDtdPtr) node );
+ if (q == NULL) return(NULL);
+ q->doc = doc;
+ q->parent = parent;
+ doc->intSubset = (xmlDtdPtr) q;
+ xmlAddChild(parent, q);
+ } else {
+ q = (xmlNodePtr) doc->intSubset;
+ xmlAddChild(parent, q);
+ }
+ } else
+#endif /* LIBXML_TREE_ENABLED */
+ q = xmlStaticCopyNode(node, doc, parent, 1);
+ if (q == NULL) return(NULL);
+ if (ret == NULL) {
+ q->prev = NULL;
+ ret = p = q;
+ } else if (p != q) {
+ /* the test is required if xmlStaticCopyNode coalesced 2 text nodes */
+ p->next = q;
+ q->prev = p;
+ p = q;
+ }
+ node = node->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlCopyNode:
+ * @node: the node
+ * @extended: if 1 do a recursive copy (properties, namespaces and children
+ * when applicable)
+ * if 2 copy properties and namespaces (when applicable)
+ *
+ * Do a copy of the node.
+ *
+ * Returns: a new #xmlNodePtr, or NULL in case of error.
+ */
+xmlNodePtr
+xmlCopyNode(xmlNodePtr node, int extended) {
+ xmlNodePtr ret;
+
+ ret = xmlStaticCopyNode(node, NULL, NULL, extended);
+ return(ret);
+}
+
+/**
+ * xmlDocCopyNode:
+ * @node: the node
+ * @doc: the document
+ * @extended: if 1 do a recursive copy (properties, namespaces and children
+ * when applicable)
+ * if 2 copy properties and namespaces (when applicable)
+ *
+ * Do a copy of the node to a given document.
+ *
+ * Returns: a new #xmlNodePtr, or NULL in case of error.
+ */
+xmlNodePtr
+xmlDocCopyNode(xmlNodePtr node, xmlDocPtr doc, int extended) {
+ xmlNodePtr ret;
+
+ ret = xmlStaticCopyNode(node, doc, NULL, extended);
+ return(ret);
+}
+
+/**
+ * xmlDocCopyNodeList:
+ * @doc: the target document
+ * @node: the first node in the list.
+ *
+ * Do a recursive copy of the node list.
+ *
+ * Returns: a new #xmlNodePtr, or NULL in case of error.
+ */
+xmlNodePtr xmlDocCopyNodeList(xmlDocPtr doc, xmlNodePtr node) {
+ xmlNodePtr ret = xmlStaticCopyNodeList(node, doc, NULL);
+ return(ret);
+}
+
+/**
+ * xmlCopyNodeList:
+ * @node: the first node in the list.
+ *
+ * Do a recursive copy of the node list.
+ * Use xmlDocCopyNodeList() if possible to ensure string interning.
+ *
+ * Returns: a new #xmlNodePtr, or NULL in case of error.
+ */
+xmlNodePtr xmlCopyNodeList(xmlNodePtr node) {
+ xmlNodePtr ret = xmlStaticCopyNodeList(node, NULL, NULL);
+ return(ret);
+}
+
+#if defined(LIBXML_TREE_ENABLED)
+/**
+ * xmlCopyDtd:
+ * @dtd: the dtd
+ *
+ * Do a copy of the dtd.
+ *
+ * Returns: a new #xmlDtdPtr, or NULL in case of error.
+ */
+xmlDtdPtr
+xmlCopyDtd(xmlDtdPtr dtd) {
+ xmlDtdPtr ret;
+ xmlNodePtr cur, p = NULL, q;
+
+ if (dtd == NULL) return(NULL);
+ ret = xmlNewDtd(NULL, dtd->name, dtd->ExternalID, dtd->SystemID);
+ if (ret == NULL) return(NULL);
+ if (dtd->entities != NULL)
+ ret->entities = (void *) xmlCopyEntitiesTable(
+ (xmlEntitiesTablePtr) dtd->entities);
+ if (dtd->notations != NULL)
+ ret->notations = (void *) xmlCopyNotationTable(
+ (xmlNotationTablePtr) dtd->notations);
+ if (dtd->elements != NULL)
+ ret->elements = (void *) xmlCopyElementTable(
+ (xmlElementTablePtr) dtd->elements);
+ if (dtd->attributes != NULL)
+ ret->attributes = (void *) xmlCopyAttributeTable(
+ (xmlAttributeTablePtr) dtd->attributes);
+ if (dtd->pentities != NULL)
+ ret->pentities = (void *) xmlCopyEntitiesTable(
+ (xmlEntitiesTablePtr) dtd->pentities);
+
+ cur = dtd->children;
+ while (cur != NULL) {
+ q = NULL;
+
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlEntityPtr tmp = (xmlEntityPtr) cur;
+ switch (tmp->etype) {
+ case XML_INTERNAL_GENERAL_ENTITY:
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ q = (xmlNodePtr) xmlGetEntityFromDtd(ret, tmp->name);
+ break;
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ q = (xmlNodePtr)
+ xmlGetParameterEntityFromDtd(ret, tmp->name);
+ break;
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ break;
+ }
+ } else if (cur->type == XML_ELEMENT_DECL) {
+ xmlElementPtr tmp = (xmlElementPtr) cur;
+ q = (xmlNodePtr)
+ xmlGetDtdQElementDesc(ret, tmp->name, tmp->prefix);
+ } else if (cur->type == XML_ATTRIBUTE_DECL) {
+ xmlAttributePtr tmp = (xmlAttributePtr) cur;
+ q = (xmlNodePtr)
+ xmlGetDtdQAttrDesc(ret, tmp->elem, tmp->name, tmp->prefix);
+ } else if (cur->type == XML_COMMENT_NODE) {
+ q = xmlCopyNode(cur, 0);
+ }
+
+ if (q == NULL) {
+ cur = cur->next;
+ continue;
+ }
+
+ if (p == NULL)
+ ret->children = q;
+ else
+ p->next = q;
+
+ q->prev = p;
+ q->parent = (xmlNodePtr) ret;
+ q->next = NULL;
+ ret->last = q;
+ p = q;
+ cur = cur->next;
+ }
+
+ return(ret);
+}
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlCopyDoc:
+ * @doc: the document
+ * @recursive: if not zero do a recursive copy.
+ *
+ * Do a copy of the document info. If recursive, the content tree will
+ * be copied too as well as DTD, namespaces and entities.
+ *
+ * Returns: a new #xmlDocPtr, or NULL in case of error.
+ */
+xmlDocPtr
+xmlCopyDoc(xmlDocPtr doc, int recursive) {
+ xmlDocPtr ret;
+
+ if (doc == NULL) return(NULL);
+ ret = xmlNewDoc(doc->version);
+ if (ret == NULL) return(NULL);
+ if (doc->name != NULL)
+ ret->name = xmlMemStrdup(doc->name);
+ if (doc->encoding != NULL)
+ ret->encoding = xmlStrdup(doc->encoding);
+ if (doc->URL != NULL)
+ ret->URL = xmlStrdup(doc->URL);
+ ret->charset = doc->charset;
+ ret->compression = doc->compression;
+ ret->standalone = doc->standalone;
+ if (!recursive) return(ret);
+
+ ret->last = NULL;
+ ret->children = NULL;
+#ifdef LIBXML_TREE_ENABLED
+ if (doc->intSubset != NULL) {
+ ret->intSubset = xmlCopyDtd(doc->intSubset);
+ if (ret->intSubset == NULL) {
+ xmlFreeDoc(ret);
+ return(NULL);
+ }
+ xmlSetTreeDoc((xmlNodePtr)ret->intSubset, ret);
+ ret->intSubset->parent = ret;
+ }
+#endif
+ if (doc->oldNs != NULL)
+ ret->oldNs = xmlCopyNamespaceList(doc->oldNs);
+ if (doc->children != NULL) {
+ xmlNodePtr tmp;
+
+ ret->children = xmlStaticCopyNodeList(doc->children, ret,
+ (xmlNodePtr)ret);
+ ret->last = NULL;
+ tmp = ret->children;
+ while (tmp != NULL) {
+ if (tmp->next == NULL)
+ ret->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+ return(ret);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/************************************************************************
+ * *
+ * Content access functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlGetLineNoInternal:
+ * @node: valid node
+ * @depth: used to limit any risk of recursion
+ *
+ * Get line number of @node.
+ * Try to override the limitation of lines being store in 16 bits ints
+ *
+ * Returns the line number if successful, -1 otherwise
+ */
+static long
+xmlGetLineNoInternal(const xmlNode *node, int depth)
+{
+ long result = -1;
+
+ if (depth >= 5)
+ return(-1);
+
+ if (!node)
+ return result;
+ if ((node->type == XML_ELEMENT_NODE) ||
+ (node->type == XML_TEXT_NODE) ||
+ (node->type == XML_COMMENT_NODE) ||
+ (node->type == XML_PI_NODE)) {
+ if (node->line == 65535) {
+ if ((node->type == XML_TEXT_NODE) && (node->psvi != NULL))
+ result = (long) node->psvi;
+ else if ((node->type == XML_ELEMENT_NODE) &&
+ (node->children != NULL))
+ result = xmlGetLineNoInternal(node->children, depth + 1);
+ else if (node->next != NULL)
+ result = xmlGetLineNoInternal(node->next, depth + 1);
+ else if (node->prev != NULL)
+ result = xmlGetLineNoInternal(node->prev, depth + 1);
+ }
+ if ((result == -1) || (result == 65535))
+ result = (long) node->line;
+ } else if ((node->prev != NULL) &&
+ ((node->prev->type == XML_ELEMENT_NODE) ||
+ (node->prev->type == XML_TEXT_NODE) ||
+ (node->prev->type == XML_COMMENT_NODE) ||
+ (node->prev->type == XML_PI_NODE)))
+ result = xmlGetLineNoInternal(node->prev, depth + 1);
+ else if ((node->parent != NULL) &&
+ (node->parent->type == XML_ELEMENT_NODE))
+ result = xmlGetLineNoInternal(node->parent, depth + 1);
+
+ return result;
+}
+
+/**
+ * xmlGetLineNo:
+ * @node: valid node
+ *
+ * Get line number of @node.
+ * Try to override the limitation of lines being store in 16 bits ints
+ * if XML_PARSE_BIG_LINES parser option was used
+ *
+ * Returns the line number if successful, -1 otherwise
+ */
+long
+xmlGetLineNo(const xmlNode *node)
+{
+ return(xmlGetLineNoInternal(node, 0));
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+/**
+ * xmlGetNodePath:
+ * @node: a node
+ *
+ * Build a structure based Path for the given node
+ *
+ * Returns the new path or NULL in case of error. The caller must free
+ * the returned string
+ */
+xmlChar *
+xmlGetNodePath(const xmlNode *node)
+{
+ const xmlNode *cur, *tmp, *next;
+ xmlChar *buffer = NULL, *temp;
+ size_t buf_len;
+ xmlChar *buf;
+ const char *sep;
+ const char *name;
+ char nametemp[100];
+ int occur = 0, generic;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return (NULL);
+
+ buf_len = 500;
+ buffer = (xmlChar *) xmlMallocAtomic(buf_len * sizeof(xmlChar));
+ if (buffer == NULL) {
+ xmlTreeErrMemory("getting node path");
+ return (NULL);
+ }
+ buf = (xmlChar *) xmlMallocAtomic(buf_len * sizeof(xmlChar));
+ if (buf == NULL) {
+ xmlTreeErrMemory("getting node path");
+ xmlFree(buffer);
+ return (NULL);
+ }
+
+ buffer[0] = 0;
+ cur = node;
+ do {
+ name = "";
+ sep = "?";
+ occur = 0;
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ if (buffer[0] == '/')
+ break;
+ sep = "/";
+ next = NULL;
+ } else if (cur->type == XML_ELEMENT_NODE) {
+ generic = 0;
+ sep = "/";
+ name = (const char *) cur->name;
+ if (cur->ns) {
+ if (cur->ns->prefix != NULL) {
+ snprintf(nametemp, sizeof(nametemp) - 1, "%s:%s",
+ (char *)cur->ns->prefix, (char *)cur->name);
+ nametemp[sizeof(nametemp) - 1] = 0;
+ name = nametemp;
+ } else {
+ /*
+ * We cannot express named elements in the default
+ * namespace, so use "*".
+ */
+ generic = 1;
+ name = "*";
+ }
+ }
+ next = cur->parent;
+
+ /*
+ * Thumbler index computation
+ * TODO: the ocurence test seems bogus for namespaced names
+ */
+ tmp = cur->prev;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_ELEMENT_NODE) &&
+ (generic ||
+ (xmlStrEqual(cur->name, tmp->name) &&
+ ((tmp->ns == cur->ns) ||
+ ((tmp->ns != NULL) && (cur->ns != NULL) &&
+ (xmlStrEqual(cur->ns->prefix, tmp->ns->prefix)))))))
+ occur++;
+ tmp = tmp->prev;
+ }
+ if (occur == 0) {
+ tmp = cur->next;
+ while (tmp != NULL && occur == 0) {
+ if ((tmp->type == XML_ELEMENT_NODE) &&
+ (generic ||
+ (xmlStrEqual(cur->name, tmp->name) &&
+ ((tmp->ns == cur->ns) ||
+ ((tmp->ns != NULL) && (cur->ns != NULL) &&
+ (xmlStrEqual(cur->ns->prefix, tmp->ns->prefix)))))))
+ occur++;
+ tmp = tmp->next;
+ }
+ if (occur != 0)
+ occur = 1;
+ } else
+ occur++;
+ } else if (cur->type == XML_COMMENT_NODE) {
+ sep = "/";
+ name = "comment()";
+ next = cur->parent;
+
+ /*
+ * Thumbler index computation
+ */
+ tmp = cur->prev;
+ while (tmp != NULL) {
+ if (tmp->type == XML_COMMENT_NODE)
+ occur++;
+ tmp = tmp->prev;
+ }
+ if (occur == 0) {
+ tmp = cur->next;
+ while (tmp != NULL && occur == 0) {
+ if (tmp->type == XML_COMMENT_NODE)
+ occur++;
+ tmp = tmp->next;
+ }
+ if (occur != 0)
+ occur = 1;
+ } else
+ occur++;
+ } else if ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ sep = "/";
+ name = "text()";
+ next = cur->parent;
+
+ /*
+ * Thumbler index computation
+ */
+ tmp = cur->prev;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_TEXT_NODE) ||
+ (tmp->type == XML_CDATA_SECTION_NODE))
+ occur++;
+ tmp = tmp->prev;
+ }
+ /*
+ * Evaluate if this is the only text- or CDATA-section-node;
+ * if yes, then we'll get "text()", otherwise "text()[1]".
+ */
+ if (occur == 0) {
+ tmp = cur->next;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_TEXT_NODE) ||
+ (tmp->type == XML_CDATA_SECTION_NODE))
+ {
+ occur = 1;
+ break;
+ }
+ tmp = tmp->next;
+ }
+ } else
+ occur++;
+ } else if (cur->type == XML_PI_NODE) {
+ sep = "/";
+ snprintf(nametemp, sizeof(nametemp) - 1,
+ "processing-instruction('%s')", (char *)cur->name);
+ nametemp[sizeof(nametemp) - 1] = 0;
+ name = nametemp;
+
+ next = cur->parent;
+
+ /*
+ * Thumbler index computation
+ */
+ tmp = cur->prev;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_PI_NODE) &&
+ (xmlStrEqual(cur->name, tmp->name)))
+ occur++;
+ tmp = tmp->prev;
+ }
+ if (occur == 0) {
+ tmp = cur->next;
+ while (tmp != NULL && occur == 0) {
+ if ((tmp->type == XML_PI_NODE) &&
+ (xmlStrEqual(cur->name, tmp->name)))
+ occur++;
+ tmp = tmp->next;
+ }
+ if (occur != 0)
+ occur = 1;
+ } else
+ occur++;
+
+ } else if (cur->type == XML_ATTRIBUTE_NODE) {
+ sep = "/@";
+ name = (const char *) (((xmlAttrPtr) cur)->name);
+ if (cur->ns) {
+ if (cur->ns->prefix != NULL)
+ snprintf(nametemp, sizeof(nametemp) - 1, "%s:%s",
+ (char *)cur->ns->prefix, (char *)cur->name);
+ else
+ snprintf(nametemp, sizeof(nametemp) - 1, "%s",
+ (char *)cur->name);
+ nametemp[sizeof(nametemp) - 1] = 0;
+ name = nametemp;
+ }
+ next = ((xmlAttrPtr) cur)->parent;
+ } else {
+ next = cur->parent;
+ }
+
+ /*
+ * Make sure there is enough room
+ */
+ if (xmlStrlen(buffer) + sizeof(nametemp) + 20 > buf_len) {
+ buf_len =
+ 2 * buf_len + xmlStrlen(buffer) + sizeof(nametemp) + 20;
+ temp = (xmlChar *) xmlRealloc(buffer, buf_len);
+ if (temp == NULL) {
+ xmlTreeErrMemory("getting node path");
+ xmlFree(buf);
+ xmlFree(buffer);
+ return (NULL);
+ }
+ buffer = temp;
+ temp = (xmlChar *) xmlRealloc(buf, buf_len);
+ if (temp == NULL) {
+ xmlTreeErrMemory("getting node path");
+ xmlFree(buf);
+ xmlFree(buffer);
+ return (NULL);
+ }
+ buf = temp;
+ }
+ if (occur == 0)
+ snprintf((char *) buf, buf_len, "%s%s%s",
+ sep, name, (char *) buffer);
+ else
+ snprintf((char *) buf, buf_len, "%s%s[%d]%s",
+ sep, name, occur, (char *) buffer);
+ snprintf((char *) buffer, buf_len, "%s", (char *)buf);
+ cur = next;
+ } while (cur != NULL);
+ xmlFree(buf);
+ return (buffer);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlDocGetRootElement:
+ * @doc: the document
+ *
+ * Get the root element of the document (doc->children is a list
+ * containing possibly comments, PIs, etc ...).
+ *
+ * Returns the #xmlNodePtr for the root or NULL
+ */
+xmlNodePtr
+xmlDocGetRootElement(const xmlDoc *doc) {
+ xmlNodePtr ret;
+
+ if (doc == NULL) return(NULL);
+ ret = doc->children;
+ while (ret != NULL) {
+ if (ret->type == XML_ELEMENT_NODE)
+ return(ret);
+ ret = ret->next;
+ }
+ return(ret);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+/**
+ * xmlDocSetRootElement:
+ * @doc: the document
+ * @root: the new document root element, if root is NULL no action is taken,
+ * to remove a node from a document use xmlUnlinkNode(root) instead.
+ *
+ * Set the root element of the document (doc->children is a list
+ * containing possibly comments, PIs, etc ...).
+ *
+ * Returns the old root element if any was found, NULL if root was NULL
+ */
+xmlNodePtr
+xmlDocSetRootElement(xmlDocPtr doc, xmlNodePtr root) {
+ xmlNodePtr old = NULL;
+
+ if (doc == NULL) return(NULL);
+ if ((root == NULL) || (root->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ xmlUnlinkNode(root);
+ xmlSetTreeDoc(root, doc);
+ root->parent = (xmlNodePtr) doc;
+ old = doc->children;
+ while (old != NULL) {
+ if (old->type == XML_ELEMENT_NODE)
+ break;
+ old = old->next;
+ }
+ if (old == NULL) {
+ if (doc->children == NULL) {
+ doc->children = root;
+ doc->last = root;
+ } else {
+ xmlAddSibling(doc->children, root);
+ }
+ } else {
+ xmlReplaceNode(old, root);
+ }
+ return(old);
+}
+#endif
+
+#if defined(LIBXML_TREE_ENABLED)
+/**
+ * xmlNodeSetLang:
+ * @cur: the node being changed
+ * @lang: the language description
+ *
+ * Set the language of a node, i.e. the values of the xml:lang
+ * attribute.
+ */
+void
+xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) {
+ xmlNsPtr ns;
+
+ if (cur == NULL) return;
+ switch(cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_PI_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_NAMESPACE_DECL:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return;
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ break;
+ }
+ ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE);
+ if (ns == NULL)
+ return;
+ xmlSetNsProp(cur, ns, BAD_CAST "lang", lang);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNodeGetLang:
+ * @cur: the node being checked
+ *
+ * Searches the language of a node, i.e. the values of the xml:lang
+ * attribute or the one carried by the nearest ancestor.
+ *
+ * Returns a pointer to the lang value, or NULL if not found
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlNodeGetLang(const xmlNode *cur) {
+ xmlChar *lang;
+
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ while (cur != NULL) {
+ lang = xmlGetNsProp(cur, BAD_CAST "lang", XML_XML_NAMESPACE);
+ if (lang != NULL)
+ return(lang);
+ cur = cur->parent;
+ }
+ return(NULL);
+}
+
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNodeSetSpacePreserve:
+ * @cur: the node being changed
+ * @val: the xml:space value ("0": default, 1: "preserve")
+ *
+ * Set (or reset) the space preserving behaviour of a node, i.e. the
+ * value of the xml:space attribute.
+ */
+void
+xmlNodeSetSpacePreserve(xmlNodePtr cur, int val) {
+ xmlNsPtr ns;
+
+ if (cur == NULL) return;
+ switch(cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_PI_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return;
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ break;
+ }
+ ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE);
+ if (ns == NULL)
+ return;
+ switch (val) {
+ case 0:
+ xmlSetNsProp(cur, ns, BAD_CAST "space", BAD_CAST "default");
+ break;
+ case 1:
+ xmlSetNsProp(cur, ns, BAD_CAST "space", BAD_CAST "preserve");
+ break;
+ }
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNodeGetSpacePreserve:
+ * @cur: the node being checked
+ *
+ * Searches the space preserving behaviour of a node, i.e. the values
+ * of the xml:space attribute or the one carried by the nearest
+ * ancestor.
+ *
+ * Returns -1 if xml:space is not inherited, 0 if "default", 1 if "preserve"
+ */
+int
+xmlNodeGetSpacePreserve(const xmlNode *cur) {
+ xmlChar *space;
+
+ if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE))
+ return(-1);
+ while (cur != NULL) {
+ space = xmlGetNsProp(cur, BAD_CAST "space", XML_XML_NAMESPACE);
+ if (space != NULL) {
+ if (xmlStrEqual(space, BAD_CAST "preserve")) {
+ xmlFree(space);
+ return(1);
+ }
+ if (xmlStrEqual(space, BAD_CAST "default")) {
+ xmlFree(space);
+ return(0);
+ }
+ xmlFree(space);
+ }
+ cur = cur->parent;
+ }
+ return(-1);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNodeSetName:
+ * @cur: the node being changed
+ * @name: the new tag name
+ *
+ * Set (or reset) the name of a node.
+ */
+void
+xmlNodeSetName(xmlNodePtr cur, const xmlChar *name) {
+ xmlDocPtr doc;
+ xmlDictPtr dict;
+ const xmlChar *freeme = NULL;
+
+ if (cur == NULL) return;
+ if (name == NULL) return;
+ switch(cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return;
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ case XML_PI_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_DTD_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ break;
+ }
+ doc = cur->doc;
+ if (doc != NULL)
+ dict = doc->dict;
+ else
+ dict = NULL;
+ if (dict != NULL) {
+ if ((cur->name != NULL) && (!xmlDictOwns(dict, cur->name)))
+ freeme = cur->name;
+ cur->name = xmlDictLookup(dict, name, -1);
+ } else {
+ if (cur->name != NULL)
+ freeme = cur->name;
+ cur->name = xmlStrdup(name);
+ }
+
+ if (freeme)
+ xmlFree((xmlChar *) freeme);
+}
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+/**
+ * xmlNodeSetBase:
+ * @cur: the node being changed
+ * @uri: the new base URI
+ *
+ * Set (or reset) the base URI of a node, i.e. the value of the
+ * xml:base attribute.
+ */
+void
+xmlNodeSetBase(xmlNodePtr cur, const xmlChar* uri) {
+ xmlNsPtr ns;
+ xmlChar* fixed;
+
+ if (cur == NULL) return;
+ switch(cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_PI_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return;
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ break;
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE: {
+ xmlDocPtr doc = (xmlDocPtr) cur;
+
+ if (doc->URL != NULL)
+ xmlFree((xmlChar *) doc->URL);
+ if (uri == NULL)
+ doc->URL = NULL;
+ else
+ doc->URL = xmlPathToURI(uri);
+ return;
+ }
+ }
+
+ ns = xmlSearchNsByHref(cur->doc, cur, XML_XML_NAMESPACE);
+ if (ns == NULL)
+ return;
+ fixed = xmlPathToURI(uri);
+ if (fixed != NULL) {
+ xmlSetNsProp(cur, ns, BAD_CAST "base", fixed);
+ xmlFree(fixed);
+ } else {
+ xmlSetNsProp(cur, ns, BAD_CAST "base", uri);
+ }
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNodeGetBase:
+ * @doc: the document the node pertains to
+ * @cur: the node being checked
+ *
+ * Searches for the BASE URL. The code should work on both XML
+ * and HTML document even if base mechanisms are completely different.
+ * It returns the base as defined in RFC 2396 sections
+ * 5.1.1. Base URI within Document Content
+ * and
+ * 5.1.2. Base URI from the Encapsulating Entity
+ * However it does not return the document base (5.1.3), use
+ * doc->URL in this case
+ *
+ * Returns a pointer to the base URL, or NULL if not found
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlNodeGetBase(const xmlDoc *doc, const xmlNode *cur) {
+ xmlChar *oldbase = NULL;
+ xmlChar *base, *newbase;
+
+ if ((cur == NULL) && (doc == NULL))
+ return(NULL);
+ if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ if (doc == NULL) doc = cur->doc;
+ if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
+ cur = doc->children;
+ while ((cur != NULL) && (cur->name != NULL)) {
+ if (cur->type != XML_ELEMENT_NODE) {
+ cur = cur->next;
+ continue;
+ }
+ if (!xmlStrcasecmp(cur->name, BAD_CAST "html")) {
+ cur = cur->children;
+ continue;
+ }
+ if (!xmlStrcasecmp(cur->name, BAD_CAST "head")) {
+ cur = cur->children;
+ continue;
+ }
+ if (!xmlStrcasecmp(cur->name, BAD_CAST "base")) {
+ return(xmlGetProp(cur, BAD_CAST "href"));
+ }
+ cur = cur->next;
+ }
+ return(NULL);
+ }
+ while (cur != NULL) {
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlEntityPtr ent = (xmlEntityPtr) cur;
+ return(xmlStrdup(ent->URI));
+ }
+ if (cur->type == XML_ELEMENT_NODE) {
+ base = xmlGetNsProp(cur, BAD_CAST "base", XML_XML_NAMESPACE);
+ if (base != NULL) {
+ if (oldbase != NULL) {
+ newbase = xmlBuildURI(oldbase, base);
+ if (newbase != NULL) {
+ xmlFree(oldbase);
+ xmlFree(base);
+ oldbase = newbase;
+ } else {
+ xmlFree(oldbase);
+ xmlFree(base);
+ return(NULL);
+ }
+ } else {
+ oldbase = base;
+ }
+ if ((!xmlStrncmp(oldbase, BAD_CAST "http://", 7)) ||
+ (!xmlStrncmp(oldbase, BAD_CAST "ftp://", 6)) ||
+ (!xmlStrncmp(oldbase, BAD_CAST "urn:", 4)))
+ return(oldbase);
+ }
+ }
+ cur = cur->parent;
+ }
+ if ((doc != NULL) && (doc->URL != NULL)) {
+ if (oldbase == NULL)
+ return(xmlStrdup(doc->URL));
+ newbase = xmlBuildURI(oldbase, doc->URL);
+ xmlFree(oldbase);
+ return(newbase);
+ }
+ return(oldbase);
+}
+
+/**
+ * xmlNodeBufGetContent:
+ * @buffer: a buffer
+ * @cur: the node being read
+ *
+ * Read the value of a node @cur, this can be either the text carried
+ * directly by this node if it's a TEXT node or the aggregate string
+ * of the values carried by this node child's (TEXT and ENTITY_REF).
+ * Entity references are substituted.
+ * Fills up the buffer @buffer with this value
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlNodeBufGetContent(xmlBufferPtr buffer, const xmlNode *cur)
+{
+ xmlBufPtr buf;
+ int ret;
+
+ if ((cur == NULL) || (buffer == NULL)) return(-1);
+ buf = xmlBufFromBuffer(buffer);
+ ret = xmlBufGetNodeContent(buf, cur);
+ buffer = xmlBufBackToBuffer(buf);
+ if ((ret < 0) || (buffer == NULL))
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlBufGetNodeContent:
+ * @buf: a buffer xmlBufPtr
+ * @cur: the node being read
+ *
+ * Read the value of a node @cur, this can be either the text carried
+ * directly by this node if it's a TEXT node or the aggregate string
+ * of the values carried by this node child's (TEXT and ENTITY_REF).
+ * Entity references are substituted.
+ * Fills up the buffer @buf with this value
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlBufGetNodeContent(xmlBufPtr buf, const xmlNode *cur)
+{
+ if ((cur == NULL) || (buf == NULL)) return(-1);
+ switch (cur->type) {
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ xmlBufCat(buf, cur->content);
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ELEMENT_NODE:{
+ const xmlNode *tmp = cur;
+
+ while (tmp != NULL) {
+ switch (tmp->type) {
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ if (tmp->content != NULL)
+ xmlBufCat(buf, tmp->content);
+ break;
+ case XML_ENTITY_REF_NODE:
+ xmlBufGetNodeContent(buf, tmp);
+ break;
+ default:
+ break;
+ }
+ /*
+ * Skip to next node
+ */
+ if (tmp->children != NULL) {
+ if (tmp->children->type != XML_ENTITY_DECL) {
+ tmp = tmp->children;
+ continue;
+ }
+ }
+ if (tmp == cur)
+ break;
+
+ if (tmp->next != NULL) {
+ tmp = tmp->next;
+ continue;
+ }
+
+ do {
+ tmp = tmp->parent;
+ if (tmp == NULL)
+ break;
+ if (tmp == cur) {
+ tmp = NULL;
+ break;
+ }
+ if (tmp->next != NULL) {
+ tmp = tmp->next;
+ break;
+ }
+ } while (tmp != NULL);
+ }
+ break;
+ }
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+ xmlNodePtr tmp = attr->children;
+
+ while (tmp != NULL) {
+ if (tmp->type == XML_TEXT_NODE)
+ xmlBufCat(buf, tmp->content);
+ else
+ xmlBufGetNodeContent(buf, tmp);
+ tmp = tmp->next;
+ }
+ break;
+ }
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ xmlBufCat(buf, cur->content);
+ break;
+ case XML_ENTITY_REF_NODE:{
+ xmlEntityPtr ent;
+ xmlNodePtr tmp;
+
+ /* lookup entity declaration */
+ ent = xmlGetDocEntity(cur->doc, cur->name);
+ if (ent == NULL)
+ return(-1);
+
+ /* an entity content can be any "well balanced chunk",
+ * i.e. the result of the content [43] production:
+ * http://www.w3.org/TR/REC-xml#NT-content
+ * -> we iterate through child nodes and recursive call
+ * xmlNodeGetContent() which handles all possible node types */
+ tmp = ent->children;
+ while (tmp) {
+ xmlBufGetNodeContent(buf, tmp);
+ tmp = tmp->next;
+ }
+ break;
+ }
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ break;
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ cur = cur->children;
+ while (cur!= NULL) {
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ xmlBufGetNodeContent(buf, cur);
+ }
+ cur = cur->next;
+ }
+ break;
+ case XML_NAMESPACE_DECL:
+ xmlBufCat(buf, ((xmlNsPtr) cur)->href);
+ break;
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ break;
+ }
+ return(0);
+}
+
+/**
+ * xmlNodeGetContent:
+ * @cur: the node being read
+ *
+ * Read the value of a node, this can be either the text carried
+ * directly by this node if it's a TEXT node or the aggregate string
+ * of the values carried by this node child's (TEXT and ENTITY_REF).
+ * Entity references are substituted.
+ * Returns a new #xmlChar * or NULL if no content is available.
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlNodeGetContent(const xmlNode *cur)
+{
+ if (cur == NULL)
+ return (NULL);
+ switch (cur->type) {
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ELEMENT_NODE:{
+ xmlBufPtr buf;
+ xmlChar *ret;
+
+ buf = xmlBufCreateSize(64);
+ if (buf == NULL)
+ return (NULL);
+ xmlBufGetNodeContent(buf, cur);
+ ret = xmlBufDetach(buf);
+ xmlBufFree(buf);
+ return (ret);
+ }
+ case XML_ATTRIBUTE_NODE:
+ return(xmlGetPropNodeValueInternal((xmlAttrPtr) cur));
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ if (cur->content != NULL)
+ return (xmlStrdup(cur->content));
+ return (NULL);
+ case XML_ENTITY_REF_NODE:{
+ xmlEntityPtr ent;
+ xmlBufPtr buf;
+ xmlChar *ret;
+
+ /* lookup entity declaration */
+ ent = xmlGetDocEntity(cur->doc, cur->name);
+ if (ent == NULL)
+ return (NULL);
+
+ buf = xmlBufCreate();
+ if (buf == NULL)
+ return (NULL);
+
+ xmlBufGetNodeContent(buf, cur);
+
+ ret = xmlBufDetach(buf);
+ xmlBufFree(buf);
+ return (ret);
+ }
+ case XML_ENTITY_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return (NULL);
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE: {
+ xmlBufPtr buf;
+ xmlChar *ret;
+
+ buf = xmlBufCreate();
+ if (buf == NULL)
+ return (NULL);
+
+ xmlBufGetNodeContent(buf, (xmlNodePtr) cur);
+
+ ret = xmlBufDetach(buf);
+ xmlBufFree(buf);
+ return (ret);
+ }
+ case XML_NAMESPACE_DECL: {
+ xmlChar *tmp;
+
+ tmp = xmlStrdup(((xmlNsPtr) cur)->href);
+ return (tmp);
+ }
+ case XML_ELEMENT_DECL:
+ /* TODO !!! */
+ return (NULL);
+ case XML_ATTRIBUTE_DECL:
+ /* TODO !!! */
+ return (NULL);
+ case XML_ENTITY_DECL:
+ /* TODO !!! */
+ return (NULL);
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ if (cur->content != NULL)
+ return (xmlStrdup(cur->content));
+ return (NULL);
+ }
+ return (NULL);
+}
+
+/**
+ * xmlNodeSetContent:
+ * @cur: the node being modified
+ * @content: the new value of the content
+ *
+ * Replace the content of a node.
+ * NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity
+ * references, but XML special chars need to be escaped first by using
+ * xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().
+ */
+void
+xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) {
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeSetContent : node == NULL\n");
+#endif
+ return;
+ }
+ switch (cur->type) {
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ cur->children = xmlStringGetNodeList(cur->doc, content);
+ UPDATE_LAST_CHILD_AND_PARENT(cur)
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ if ((cur->content != NULL) &&
+ (cur->content != (xmlChar *) &(cur->properties))) {
+ if (!((cur->doc != NULL) && (cur->doc->dict != NULL) &&
+ (xmlDictOwns(cur->doc->dict, cur->content))))
+ xmlFree(cur->content);
+ }
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ cur->last = cur->children = NULL;
+ if (content != NULL) {
+ cur->content = xmlStrdup(content);
+ } else
+ cur->content = NULL;
+ cur->properties = NULL;
+ cur->nsDef = NULL;
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ break;
+ case XML_NOTATION_NODE:
+ break;
+ case XML_DTD_NODE:
+ break;
+ case XML_NAMESPACE_DECL:
+ break;
+ case XML_ELEMENT_DECL:
+ /* TODO !!! */
+ break;
+ case XML_ATTRIBUTE_DECL:
+ /* TODO !!! */
+ break;
+ case XML_ENTITY_DECL:
+ /* TODO !!! */
+ break;
+ }
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlNodeSetContentLen:
+ * @cur: the node being modified
+ * @content: the new value of the content
+ * @len: the size of @content
+ *
+ * Replace the content of a node.
+ * NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity
+ * references, but XML special chars need to be escaped first by using
+ * xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().
+ */
+void
+xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeSetContentLen : node == NULL\n");
+#endif
+ return;
+ }
+ switch (cur->type) {
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ cur->children = xmlStringLenGetNodeList(cur->doc, content, len);
+ UPDATE_LAST_CHILD_AND_PARENT(cur)
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ if ((cur->content != NULL) &&
+ (cur->content != (xmlChar *) &(cur->properties))) {
+ if (!((cur->doc != NULL) && (cur->doc->dict != NULL) &&
+ (xmlDictOwns(cur->doc->dict, cur->content))))
+ xmlFree(cur->content);
+ }
+ if (cur->children != NULL) xmlFreeNodeList(cur->children);
+ cur->children = cur->last = NULL;
+ if (content != NULL) {
+ cur->content = xmlStrndup(content, len);
+ } else
+ cur->content = NULL;
+ cur->properties = NULL;
+ cur->nsDef = NULL;
+ break;
+ case XML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ break;
+ case XML_ELEMENT_DECL:
+ /* TODO !!! */
+ break;
+ case XML_ATTRIBUTE_DECL:
+ /* TODO !!! */
+ break;
+ case XML_ENTITY_DECL:
+ /* TODO !!! */
+ break;
+ }
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNodeAddContentLen:
+ * @cur: the node being modified
+ * @content: extra content
+ * @len: the size of @content
+ *
+ * Append the extra substring to the node content.
+ * NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be
+ * raw text, so unescaped XML special chars are allowed, entity
+ * references are not supported.
+ */
+void
+xmlNodeAddContentLen(xmlNodePtr cur, const xmlChar *content, int len) {
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeAddContentLen : node == NULL\n");
+#endif
+ return;
+ }
+ if (len <= 0) return;
+ switch (cur->type) {
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ELEMENT_NODE: {
+ xmlNodePtr last, newNode, tmp;
+
+ last = cur->last;
+ newNode = xmlNewTextLen(content, len);
+ if (newNode != NULL) {
+ tmp = xmlAddChild(cur, newNode);
+ if (tmp != newNode)
+ return;
+ if ((last != NULL) && (last->next == newNode)) {
+ xmlTextMerge(last, newNode);
+ }
+ }
+ break;
+ }
+ case XML_ATTRIBUTE_NODE:
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ if (content != NULL) {
+ if ((cur->content == (xmlChar *) &(cur->properties)) ||
+ ((cur->doc != NULL) && (cur->doc->dict != NULL) &&
+ xmlDictOwns(cur->doc->dict, cur->content))) {
+ cur->content = xmlStrncatNew(cur->content, content, len);
+ cur->properties = NULL;
+ cur->nsDef = NULL;
+ break;
+ }
+ cur->content = xmlStrncat(cur->content, content, len);
+ }
+ case XML_DOCUMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ break;
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ break;
+ }
+}
+
+/**
+ * xmlNodeAddContent:
+ * @cur: the node being modified
+ * @content: extra content
+ *
+ * Append the extra substring to the node content.
+ * NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be
+ * raw text, so unescaped XML special chars are allowed, entity
+ * references are not supported.
+ */
+void
+xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) {
+ int len;
+
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeAddContent : node == NULL\n");
+#endif
+ return;
+ }
+ if (content == NULL) return;
+ len = xmlStrlen(content);
+ xmlNodeAddContentLen(cur, content, len);
+}
+
+/**
+ * xmlTextMerge:
+ * @first: the first text node
+ * @second: the second text node being merged
+ *
+ * Merge two text nodes into one
+ * Returns the first text node augmented
+ */
+xmlNodePtr
+xmlTextMerge(xmlNodePtr first, xmlNodePtr second) {
+ if (first == NULL) return(second);
+ if (second == NULL) return(first);
+ if (first->type != XML_TEXT_NODE) return(first);
+ if (second->type != XML_TEXT_NODE) return(first);
+ if (second->name != first->name)
+ return(first);
+ xmlNodeAddContent(first, second->content);
+ xmlUnlinkNode(second);
+ xmlFreeNode(second);
+ return(first);
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlGetNsList:
+ * @doc: the document
+ * @node: the current node
+ *
+ * Search all the namespace applying to a given element.
+ * Returns an NULL terminated array of all the #xmlNsPtr found
+ * that need to be freed by the caller or NULL if no
+ * namespace if defined
+ */
+xmlNsPtr *
+xmlGetNsList(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlNode *node)
+{
+ xmlNsPtr cur;
+ xmlNsPtr *ret = NULL;
+ int nbns = 0;
+ int maxns = 10;
+ int i;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+
+ while (node != NULL) {
+ if (node->type == XML_ELEMENT_NODE) {
+ cur = node->nsDef;
+ while (cur != NULL) {
+ if (ret == NULL) {
+ ret =
+ (xmlNsPtr *) xmlMalloc((maxns + 1) *
+ sizeof(xmlNsPtr));
+ if (ret == NULL) {
+ xmlTreeErrMemory("getting namespace list");
+ return (NULL);
+ }
+ ret[nbns] = NULL;
+ }
+ for (i = 0; i < nbns; i++) {
+ if ((cur->prefix == ret[i]->prefix) ||
+ (xmlStrEqual(cur->prefix, ret[i]->prefix)))
+ break;
+ }
+ if (i >= nbns) {
+ if (nbns >= maxns) {
+ maxns *= 2;
+ ret = (xmlNsPtr *) xmlRealloc(ret,
+ (maxns +
+ 1) *
+ sizeof(xmlNsPtr));
+ if (ret == NULL) {
+ xmlTreeErrMemory("getting namespace list");
+ return (NULL);
+ }
+ }
+ ret[nbns++] = cur;
+ ret[nbns] = NULL;
+ }
+
+ cur = cur->next;
+ }
+ }
+ node = node->parent;
+ }
+ return (ret);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+/*
+* xmlTreeEnsureXMLDecl:
+* @doc: the doc
+*
+* Ensures that there is an XML namespace declaration on the doc.
+*
+* Returns the XML ns-struct or NULL on API and internal errors.
+*/
+static xmlNsPtr
+xmlTreeEnsureXMLDecl(xmlDocPtr doc)
+{
+ if (doc == NULL)
+ return (NULL);
+ if (doc->oldNs != NULL)
+ return (doc->oldNs);
+ {
+ xmlNsPtr ns;
+ ns = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (ns == NULL) {
+ xmlTreeErrMemory(
+ "allocating the XML namespace");
+ return (NULL);
+ }
+ memset(ns, 0, sizeof(xmlNs));
+ ns->type = XML_LOCAL_NAMESPACE;
+ ns->href = xmlStrdup(XML_XML_NAMESPACE);
+ ns->prefix = xmlStrdup((const xmlChar *)"xml");
+ doc->oldNs = ns;
+ return (ns);
+ }
+}
+
+/**
+ * xmlSearchNs:
+ * @doc: the document
+ * @node: the current node
+ * @nameSpace: the namespace prefix
+ *
+ * Search a Ns registered under a given name space for a document.
+ * recurse on the parents until it finds the defined namespace
+ * or return NULL otherwise.
+ * @nameSpace can be NULL, this is a search for the default namespace.
+ * We don't allow to cross entities boundaries. If you don't declare
+ * the namespace within those you will be in troubles !!! A warning
+ * is generated to cover this case.
+ *
+ * Returns the namespace pointer or NULL.
+ */
+xmlNsPtr
+xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace) {
+
+ xmlNsPtr cur;
+ const xmlNode *orig = node;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) return(NULL);
+ if ((nameSpace != NULL) &&
+ (xmlStrEqual(nameSpace, (const xmlChar *)"xml"))) {
+ if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) {
+ /*
+ * The XML-1.0 namespace is normally held on the root
+ * element. In this case exceptionally create it on the
+ * node element.
+ */
+ cur = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (cur == NULL) {
+ xmlTreeErrMemory("searching namespace");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNs));
+ cur->type = XML_LOCAL_NAMESPACE;
+ cur->href = xmlStrdup(XML_XML_NAMESPACE);
+ cur->prefix = xmlStrdup((const xmlChar *)"xml");
+ cur->next = node->nsDef;
+ node->nsDef = cur;
+ return(cur);
+ }
+ if (doc == NULL) {
+ doc = node->doc;
+ if (doc == NULL)
+ return(NULL);
+ }
+ /*
+ * Return the XML namespace declaration held by the doc.
+ */
+ if (doc->oldNs == NULL)
+ return(xmlTreeEnsureXMLDecl(doc));
+ else
+ return(doc->oldNs);
+ }
+ while (node != NULL) {
+ if ((node->type == XML_ENTITY_REF_NODE) ||
+ (node->type == XML_ENTITY_NODE) ||
+ (node->type == XML_ENTITY_DECL))
+ return(NULL);
+ if (node->type == XML_ELEMENT_NODE) {
+ cur = node->nsDef;
+ while (cur != NULL) {
+ if ((cur->prefix == NULL) && (nameSpace == NULL) &&
+ (cur->href != NULL))
+ return(cur);
+ if ((cur->prefix != NULL) && (nameSpace != NULL) &&
+ (cur->href != NULL) &&
+ (xmlStrEqual(cur->prefix, nameSpace)))
+ return(cur);
+ cur = cur->next;
+ }
+ if (orig != node) {
+ cur = node->ns;
+ if (cur != NULL) {
+ if ((cur->prefix == NULL) && (nameSpace == NULL) &&
+ (cur->href != NULL))
+ return(cur);
+ if ((cur->prefix != NULL) && (nameSpace != NULL) &&
+ (cur->href != NULL) &&
+ (xmlStrEqual(cur->prefix, nameSpace)))
+ return(cur);
+ }
+ }
+ }
+ node = node->parent;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlNsInScope:
+ * @doc: the document
+ * @node: the current node
+ * @ancestor: the ancestor carrying the namespace
+ * @prefix: the namespace prefix
+ *
+ * Verify that the given namespace held on @ancestor is still in scope
+ * on node.
+ *
+ * Returns 1 if true, 0 if false and -1 in case of error.
+ */
+static int
+xmlNsInScope(xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr node,
+ xmlNodePtr ancestor, const xmlChar * prefix)
+{
+ xmlNsPtr tst;
+
+ while ((node != NULL) && (node != ancestor)) {
+ if ((node->type == XML_ENTITY_REF_NODE) ||
+ (node->type == XML_ENTITY_NODE) ||
+ (node->type == XML_ENTITY_DECL))
+ return (-1);
+ if (node->type == XML_ELEMENT_NODE) {
+ tst = node->nsDef;
+ while (tst != NULL) {
+ if ((tst->prefix == NULL)
+ && (prefix == NULL))
+ return (0);
+ if ((tst->prefix != NULL)
+ && (prefix != NULL)
+ && (xmlStrEqual(tst->prefix, prefix)))
+ return (0);
+ tst = tst->next;
+ }
+ }
+ node = node->parent;
+ }
+ if (node != ancestor)
+ return (-1);
+ return (1);
+}
+
+/**
+ * xmlSearchNsByHref:
+ * @doc: the document
+ * @node: the current node
+ * @href: the namespace value
+ *
+ * Search a Ns aliasing a given URI. Recurse on the parents until it finds
+ * the defined namespace or return NULL otherwise.
+ * Returns the namespace pointer or NULL.
+ */
+xmlNsPtr
+xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)
+{
+ xmlNsPtr cur;
+ xmlNodePtr orig = node;
+ int is_attr;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) || (href == NULL))
+ return (NULL);
+ if (xmlStrEqual(href, XML_XML_NAMESPACE)) {
+ /*
+ * Only the document can hold the XML spec namespace.
+ */
+ if ((doc == NULL) && (node->type == XML_ELEMENT_NODE)) {
+ /*
+ * The XML-1.0 namespace is normally held on the root
+ * element. In this case exceptionally create it on the
+ * node element.
+ */
+ cur = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (cur == NULL) {
+ xmlTreeErrMemory("searching namespace");
+ return (NULL);
+ }
+ memset(cur, 0, sizeof(xmlNs));
+ cur->type = XML_LOCAL_NAMESPACE;
+ cur->href = xmlStrdup(XML_XML_NAMESPACE);
+ cur->prefix = xmlStrdup((const xmlChar *) "xml");
+ cur->next = node->nsDef;
+ node->nsDef = cur;
+ return (cur);
+ }
+ if (doc == NULL) {
+ doc = node->doc;
+ if (doc == NULL)
+ return(NULL);
+ }
+ /*
+ * Return the XML namespace declaration held by the doc.
+ */
+ if (doc->oldNs == NULL)
+ return(xmlTreeEnsureXMLDecl(doc));
+ else
+ return(doc->oldNs);
+ }
+ is_attr = (node->type == XML_ATTRIBUTE_NODE);
+ while (node != NULL) {
+ if ((node->type == XML_ENTITY_REF_NODE) ||
+ (node->type == XML_ENTITY_NODE) ||
+ (node->type == XML_ENTITY_DECL))
+ return (NULL);
+ if (node->type == XML_ELEMENT_NODE) {
+ cur = node->nsDef;
+ while (cur != NULL) {
+ if ((cur->href != NULL) && (href != NULL) &&
+ (xmlStrEqual(cur->href, href))) {
+ if (((!is_attr) || (cur->prefix != NULL)) &&
+ (xmlNsInScope(doc, orig, node, cur->prefix) == 1))
+ return (cur);
+ }
+ cur = cur->next;
+ }
+ if (orig != node) {
+ cur = node->ns;
+ if (cur != NULL) {
+ if ((cur->href != NULL) && (href != NULL) &&
+ (xmlStrEqual(cur->href, href))) {
+ if (((!is_attr) || (cur->prefix != NULL)) &&
+ (xmlNsInScope(doc, orig, node, cur->prefix) == 1))
+ return (cur);
+ }
+ }
+ }
+ }
+ node = node->parent;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlNewReconciliedNs:
+ * @doc: the document
+ * @tree: a node expected to hold the new namespace
+ * @ns: the original namespace
+ *
+ * This function tries to locate a namespace definition in a tree
+ * ancestors, or create a new namespace definition node similar to
+ * @ns trying to reuse the same prefix. However if the given prefix is
+ * null (default namespace) or reused within the subtree defined by
+ * @tree or on one of its ancestors then a new prefix is generated.
+ * Returns the (new) namespace definition or NULL in case of error
+ */
+static xmlNsPtr
+xmlNewReconciliedNs(xmlDocPtr doc, xmlNodePtr tree, xmlNsPtr ns) {
+ xmlNsPtr def;
+ xmlChar prefix[50];
+ int counter = 1;
+
+ if ((tree == NULL) || (tree->type != XML_ELEMENT_NODE)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewReconciliedNs : tree == NULL\n");
+#endif
+ return(NULL);
+ }
+ if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewReconciliedNs : ns == NULL\n");
+#endif
+ return(NULL);
+ }
+ /*
+ * Search an existing namespace definition inherited.
+ */
+ def = xmlSearchNsByHref(doc, tree, ns->href);
+ if (def != NULL)
+ return(def);
+
+ /*
+ * Find a close prefix which is not already in use.
+ * Let's strip namespace prefixes longer than 20 chars !
+ */
+ if (ns->prefix == NULL)
+ snprintf((char *) prefix, sizeof(prefix), "default");
+ else
+ snprintf((char *) prefix, sizeof(prefix), "%.20s", (char *)ns->prefix);
+
+ def = xmlSearchNs(doc, tree, prefix);
+ while (def != NULL) {
+ if (counter > 1000) return(NULL);
+ if (ns->prefix == NULL)
+ snprintf((char *) prefix, sizeof(prefix), "default%d", counter++);
+ else
+ snprintf((char *) prefix, sizeof(prefix), "%.20s%d",
+ (char *)ns->prefix, counter++);
+ def = xmlSearchNs(doc, tree, prefix);
+ }
+
+ /*
+ * OK, now we are ready to create a new one.
+ */
+ def = xmlNewNs(tree, ns->href, prefix);
+ return(def);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlReconciliateNs:
+ * @doc: the document
+ * @tree: a node defining the subtree to reconciliate
+ *
+ * This function checks that all the namespaces declared within the given
+ * tree are properly declared. This is needed for example after Copy or Cut
+ * and then paste operations. The subtree may still hold pointers to
+ * namespace declarations outside the subtree or invalid/masked. As much
+ * as possible the function try to reuse the existing namespaces found in
+ * the new environment. If not possible the new namespaces are redeclared
+ * on @tree at the top of the given subtree.
+ * Returns the number of namespace declarations created or -1 in case of error.
+ */
+int
+xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree) {
+ xmlNsPtr *oldNs = NULL;
+ xmlNsPtr *newNs = NULL;
+ int sizeCache = 0;
+ int nbCache = 0;
+
+ xmlNsPtr n;
+ xmlNodePtr node = tree;
+ xmlAttrPtr attr;
+ int ret = 0, i;
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE)) return(-1);
+ if ((doc == NULL) || (doc->type != XML_DOCUMENT_NODE)) return(-1);
+ if (node->doc != doc) return(-1);
+ while (node != NULL) {
+ /*
+ * Reconciliate the node namespace
+ */
+ if (node->ns != NULL) {
+ /*
+ * initialize the cache if needed
+ */
+ if (sizeCache == 0) {
+ sizeCache = 10;
+ oldNs = (xmlNsPtr *) xmlMalloc(sizeCache *
+ sizeof(xmlNsPtr));
+ if (oldNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ return(-1);
+ }
+ newNs = (xmlNsPtr *) xmlMalloc(sizeCache *
+ sizeof(xmlNsPtr));
+ if (newNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(oldNs);
+ return(-1);
+ }
+ }
+ for (i = 0;i < nbCache;i++) {
+ if (oldNs[i] == node->ns) {
+ node->ns = newNs[i];
+ break;
+ }
+ }
+ if (i == nbCache) {
+ /*
+ * OK we need to recreate a new namespace definition
+ */
+ n = xmlNewReconciliedNs(doc, tree, node->ns);
+ if (n != NULL) { /* :-( what if else ??? */
+ /*
+ * check if we need to grow the cache buffers.
+ */
+ if (sizeCache <= nbCache) {
+ sizeCache *= 2;
+ oldNs = (xmlNsPtr *) xmlRealloc(oldNs, sizeCache *
+ sizeof(xmlNsPtr));
+ if (oldNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(newNs);
+ return(-1);
+ }
+ newNs = (xmlNsPtr *) xmlRealloc(newNs, sizeCache *
+ sizeof(xmlNsPtr));
+ if (newNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(oldNs);
+ return(-1);
+ }
+ }
+ newNs[nbCache] = n;
+ oldNs[nbCache++] = node->ns;
+ node->ns = n;
+ }
+ }
+ }
+ /*
+ * now check for namespace hold by attributes on the node.
+ */
+ if (node->type == XML_ELEMENT_NODE) {
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns != NULL) {
+ /*
+ * initialize the cache if needed
+ */
+ if (sizeCache == 0) {
+ sizeCache = 10;
+ oldNs = (xmlNsPtr *) xmlMalloc(sizeCache *
+ sizeof(xmlNsPtr));
+ if (oldNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ return(-1);
+ }
+ newNs = (xmlNsPtr *) xmlMalloc(sizeCache *
+ sizeof(xmlNsPtr));
+ if (newNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(oldNs);
+ return(-1);
+ }
+ }
+ for (i = 0;i < nbCache;i++) {
+ if (oldNs[i] == attr->ns) {
+ attr->ns = newNs[i];
+ break;
+ }
+ }
+ if (i == nbCache) {
+ /*
+ * OK we need to recreate a new namespace definition
+ */
+ n = xmlNewReconciliedNs(doc, tree, attr->ns);
+ if (n != NULL) { /* :-( what if else ??? */
+ /*
+ * check if we need to grow the cache buffers.
+ */
+ if (sizeCache <= nbCache) {
+ sizeCache *= 2;
+ oldNs = (xmlNsPtr *) xmlRealloc(oldNs,
+ sizeCache * sizeof(xmlNsPtr));
+ if (oldNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(newNs);
+ return(-1);
+ }
+ newNs = (xmlNsPtr *) xmlRealloc(newNs,
+ sizeCache * sizeof(xmlNsPtr));
+ if (newNs == NULL) {
+ xmlTreeErrMemory("fixing namespaces");
+ xmlFree(oldNs);
+ return(-1);
+ }
+ }
+ newNs[nbCache] = n;
+ oldNs[nbCache++] = attr->ns;
+ attr->ns = n;
+ }
+ }
+ }
+ attr = attr->next;
+ }
+ }
+
+ /*
+ * Browse the full subtree, deep first
+ */
+ if ((node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
+ /* deep first */
+ node = node->children;
+ } else if ((node != tree) && (node->next != NULL)) {
+ /* then siblings */
+ node = node->next;
+ } else if (node != tree) {
+ /* go up to parents->next if needed */
+ while (node != tree) {
+ if (node->parent != NULL)
+ node = node->parent;
+ if ((node != tree) && (node->next != NULL)) {
+ node = node->next;
+ break;
+ }
+ if (node->parent == NULL) {
+ node = NULL;
+ break;
+ }
+ }
+ /* exit condition */
+ if (node == tree)
+ node = NULL;
+ } else
+ break;
+ }
+ if (oldNs != NULL)
+ xmlFree(oldNs);
+ if (newNs != NULL)
+ xmlFree(newNs);
+ return(ret);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+static xmlAttrPtr
+xmlGetPropNodeInternal(const xmlNode *node, const xmlChar *name,
+ const xmlChar *nsName, int useDTD)
+{
+ xmlAttrPtr prop;
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL))
+ return(NULL);
+
+ if (node->properties != NULL) {
+ prop = node->properties;
+ if (nsName == NULL) {
+ /*
+ * We want the attr to be in no namespace.
+ */
+ do {
+ if ((prop->ns == NULL) && xmlStrEqual(prop->name, name)) {
+ return(prop);
+ }
+ prop = prop->next;
+ } while (prop != NULL);
+ } else {
+ /*
+ * We want the attr to be in the specified namespace.
+ */
+ do {
+ if ((prop->ns != NULL) && xmlStrEqual(prop->name, name) &&
+ ((prop->ns->href == nsName) ||
+ xmlStrEqual(prop->ns->href, nsName)))
+ {
+ return(prop);
+ }
+ prop = prop->next;
+ } while (prop != NULL);
+ }
+ }
+
+#ifdef LIBXML_TREE_ENABLED
+ if (! useDTD)
+ return(NULL);
+ /*
+ * Check if there is a default/fixed attribute declaration in
+ * the internal or external subset.
+ */
+ if ((node->doc != NULL) && (node->doc->intSubset != NULL)) {
+ xmlDocPtr doc = node->doc;
+ xmlAttributePtr attrDecl = NULL;
+ xmlChar *elemQName, *tmpstr = NULL;
+
+ /*
+ * We need the QName of the element for the DTD-lookup.
+ */
+ if ((node->ns != NULL) && (node->ns->prefix != NULL)) {
+ tmpstr = xmlStrdup(node->ns->prefix);
+ tmpstr = xmlStrcat(tmpstr, BAD_CAST ":");
+ tmpstr = xmlStrcat(tmpstr, node->name);
+ if (tmpstr == NULL)
+ return(NULL);
+ elemQName = tmpstr;
+ } else
+ elemQName = (xmlChar *) node->name;
+ if (nsName == NULL) {
+ /*
+ * The common and nice case: Attr in no namespace.
+ */
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset,
+ elemQName, name, NULL);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset,
+ elemQName, name, NULL);
+ }
+ } else {
+ xmlNsPtr *nsList, *cur;
+
+ /*
+ * The ugly case: Search using the prefixes of in-scope
+ * ns-decls corresponding to @nsName.
+ */
+ nsList = xmlGetNsList(node->doc, node);
+ if (nsList == NULL) {
+ if (tmpstr != NULL)
+ xmlFree(tmpstr);
+ return(NULL);
+ }
+ cur = nsList;
+ while (*cur != NULL) {
+ if (xmlStrEqual((*cur)->href, nsName)) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, elemQName,
+ name, (*cur)->prefix);
+ if (attrDecl)
+ break;
+ if (doc->extSubset != NULL) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, elemQName,
+ name, (*cur)->prefix);
+ if (attrDecl)
+ break;
+ }
+ }
+ cur++;
+ }
+ xmlFree(nsList);
+ }
+ if (tmpstr != NULL)
+ xmlFree(tmpstr);
+ /*
+ * Only default/fixed attrs are relevant.
+ */
+ if ((attrDecl != NULL) && (attrDecl->defaultValue != NULL))
+ return((xmlAttrPtr) attrDecl);
+ }
+#endif /* LIBXML_TREE_ENABLED */
+ return(NULL);
+}
+
+static xmlChar*
+xmlGetPropNodeValueInternal(const xmlAttr *prop)
+{
+ if (prop == NULL)
+ return(NULL);
+ if (prop->type == XML_ATTRIBUTE_NODE) {
+ /*
+ * Note that we return at least the empty string.
+ * TODO: Do we really always want that?
+ */
+ if (prop->children != NULL) {
+ if ((prop->children->next == NULL) &&
+ ((prop->children->type == XML_TEXT_NODE) ||
+ (prop->children->type == XML_CDATA_SECTION_NODE)))
+ {
+ /*
+ * Optimization for the common case: only 1 text node.
+ */
+ return(xmlStrdup(prop->children->content));
+ } else {
+ xmlChar *ret;
+
+ ret = xmlNodeListGetString(prop->doc, prop->children, 1);
+ if (ret != NULL)
+ return(ret);
+ }
+ }
+ return(xmlStrdup((xmlChar *)""));
+ } else if (prop->type == XML_ATTRIBUTE_DECL) {
+ return(xmlStrdup(((xmlAttributePtr)prop)->defaultValue));
+ }
+ return(NULL);
+}
+
+/**
+ * xmlHasProp:
+ * @node: the node
+ * @name: the attribute name
+ *
+ * Search an attribute associated to a node
+ * This function also looks in DTD attribute declaration for #FIXED or
+ * default declaration values unless DTD use has been turned off.
+ *
+ * Returns the attribute or the attribute declaration or NULL if
+ * neither was found.
+ */
+xmlAttrPtr
+xmlHasProp(const xmlNode *node, const xmlChar *name) {
+ xmlAttrPtr prop;
+ xmlDocPtr doc;
+
+ if ((node == NULL) || (node->type != XML_ELEMENT_NODE) || (name == NULL))
+ return(NULL);
+ /*
+ * Check on the properties attached to the node
+ */
+ prop = node->properties;
+ while (prop != NULL) {
+ if (xmlStrEqual(prop->name, name)) {
+ return(prop);
+ }
+ prop = prop->next;
+ }
+ if (!xmlCheckDTD) return(NULL);
+
+ /*
+ * Check if there is a default declaration in the internal
+ * or external subsets
+ */
+ doc = node->doc;
+ if (doc != NULL) {
+ xmlAttributePtr attrDecl;
+ if (doc->intSubset != NULL) {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name);
+ if ((attrDecl != NULL) && (attrDecl->defaultValue != NULL))
+ /* return attribute declaration only if a default value is given
+ (that includes #FIXED declarations) */
+ return((xmlAttrPtr) attrDecl);
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * xmlHasNsProp:
+ * @node: the node
+ * @name: the attribute name
+ * @nameSpace: the URI of the namespace
+ *
+ * Search for an attribute associated to a node
+ * This attribute has to be anchored in the namespace specified.
+ * This does the entity substitution.
+ * This function looks in DTD attribute declaration for #FIXED or
+ * default declaration values unless DTD use has been turned off.
+ * Note that a namespace of NULL indicates to use the default namespace.
+ *
+ * Returns the attribute or the attribute declaration or NULL
+ * if neither was found.
+ */
+xmlAttrPtr
+xmlHasNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace) {
+
+ return(xmlGetPropNodeInternal(node, name, nameSpace, xmlCheckDTD));
+}
+
+/**
+ * xmlGetProp:
+ * @node: the node
+ * @name: the attribute name
+ *
+ * Search and get the value of an attribute associated to a node
+ * This does the entity substitution.
+ * This function looks in DTD attribute declaration for #FIXED or
+ * default declaration values unless DTD use has been turned off.
+ * NOTE: this function acts independently of namespaces associated
+ * to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp()
+ * for namespace aware processing.
+ *
+ * Returns the attribute value or NULL if not found.
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlGetProp(const xmlNode *node, const xmlChar *name) {
+ xmlAttrPtr prop;
+
+ prop = xmlHasProp(node, name);
+ if (prop == NULL)
+ return(NULL);
+ return(xmlGetPropNodeValueInternal(prop));
+}
+
+/**
+ * xmlGetNoNsProp:
+ * @node: the node
+ * @name: the attribute name
+ *
+ * Search and get the value of an attribute associated to a node
+ * This does the entity substitution.
+ * This function looks in DTD attribute declaration for #FIXED or
+ * default declaration values unless DTD use has been turned off.
+ * This function is similar to xmlGetProp except it will accept only
+ * an attribute in no namespace.
+ *
+ * Returns the attribute value or NULL if not found.
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlGetNoNsProp(const xmlNode *node, const xmlChar *name) {
+ xmlAttrPtr prop;
+
+ prop = xmlGetPropNodeInternal(node, name, NULL, xmlCheckDTD);
+ if (prop == NULL)
+ return(NULL);
+ return(xmlGetPropNodeValueInternal(prop));
+}
+
+/**
+ * xmlGetNsProp:
+ * @node: the node
+ * @name: the attribute name
+ * @nameSpace: the URI of the namespace
+ *
+ * Search and get the value of an attribute associated to a node
+ * This attribute has to be anchored in the namespace specified.
+ * This does the entity substitution.
+ * This function looks in DTD attribute declaration for #FIXED or
+ * default declaration values unless DTD use has been turned off.
+ *
+ * Returns the attribute value or NULL if not found.
+ * It's up to the caller to free the memory with xmlFree().
+ */
+xmlChar *
+xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace) {
+ xmlAttrPtr prop;
+
+ prop = xmlGetPropNodeInternal(node, name, nameSpace, xmlCheckDTD);
+ if (prop == NULL)
+ return(NULL);
+ return(xmlGetPropNodeValueInternal(prop));
+}
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlUnsetProp:
+ * @node: the node
+ * @name: the attribute name
+ *
+ * Remove an attribute carried by a node.
+ * This handles only attributes in no namespace.
+ * Returns 0 if successful, -1 if not found
+ */
+int
+xmlUnsetProp(xmlNodePtr node, const xmlChar *name) {
+ xmlAttrPtr prop;
+
+ prop = xmlGetPropNodeInternal(node, name, NULL, 0);
+ if (prop == NULL)
+ return(-1);
+ xmlUnlinkNode((xmlNodePtr) prop);
+ xmlFreeProp(prop);
+ return(0);
+}
+
+/**
+ * xmlUnsetNsProp:
+ * @node: the node
+ * @ns: the namespace definition
+ * @name: the attribute name
+ *
+ * Remove an attribute carried by a node.
+ * Returns 0 if successful, -1 if not found
+ */
+int
+xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) {
+ xmlAttrPtr prop;
+
+ prop = xmlGetPropNodeInternal(node, name, (ns != NULL) ? ns->href : NULL, 0);
+ if (prop == NULL)
+ return(-1);
+ xmlUnlinkNode((xmlNodePtr) prop);
+ xmlFreeProp(prop);
+ return(0);
+}
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+/**
+ * xmlSetProp:
+ * @node: the node
+ * @name: the attribute name (a QName)
+ * @value: the attribute value
+ *
+ * Set (or reset) an attribute carried by a node.
+ * If @name has a prefix, then the corresponding
+ * namespace-binding will be used, if in scope; it is an
+ * error it there's no such ns-binding for the prefix in
+ * scope.
+ * Returns the attribute pointer.
+ *
+ */
+xmlAttrPtr
+xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
+ int len;
+ const xmlChar *nqname;
+
+ if ((node == NULL) || (name == NULL) || (node->type != XML_ELEMENT_NODE))
+ return(NULL);
+
+ /*
+ * handle QNames
+ */
+ nqname = xmlSplitQName3(name, &len);
+ if (nqname != NULL) {
+ xmlNsPtr ns;
+ xmlChar *prefix = xmlStrndup(name, len);
+ ns = xmlSearchNs(node->doc, node, prefix);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ if (ns != NULL)
+ return(xmlSetNsProp(node, ns, nqname, value));
+ }
+ return(xmlSetNsProp(node, NULL, name, value));
+}
+
+/**
+ * xmlSetNsProp:
+ * @node: the node
+ * @ns: the namespace definition
+ * @name: the attribute name
+ * @value: the attribute value
+ *
+ * Set (or reset) an attribute carried by a node.
+ * The ns structure must be in scope, this is not checked
+ *
+ * Returns the attribute pointer.
+ */
+xmlAttrPtr
+xmlSetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
+ const xmlChar *value)
+{
+ xmlAttrPtr prop;
+
+ if (ns && (ns->href == NULL))
+ return(NULL);
+ prop = xmlGetPropNodeInternal(node, name, (ns != NULL) ? ns->href : NULL, 0);
+ if (prop != NULL) {
+ /*
+ * Modify the attribute's value.
+ */
+ if (prop->atype == XML_ATTRIBUTE_ID) {
+ xmlRemoveID(node->doc, prop);
+ prop->atype = XML_ATTRIBUTE_ID;
+ }
+ if (prop->children != NULL)
+ xmlFreeNodeList(prop->children);
+ prop->children = NULL;
+ prop->last = NULL;
+ prop->ns = ns;
+ if (value != NULL) {
+ xmlNodePtr tmp;
+
+ if(!xmlCheckUTF8(value)) {
+ xmlTreeErr(XML_TREE_NOT_UTF8, (xmlNodePtr) node->doc,
+ NULL);
+ if (node->doc != NULL)
+ node->doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+ }
+ prop->children = xmlNewDocText(node->doc, value);
+ prop->last = NULL;
+ tmp = prop->children;
+ while (tmp != NULL) {
+ tmp->parent = (xmlNodePtr) prop;
+ if (tmp->next == NULL)
+ prop->last = tmp;
+ tmp = tmp->next;
+ }
+ }
+ if (prop->atype == XML_ATTRIBUTE_ID)
+ xmlAddID(NULL, node->doc, value, prop);
+ return(prop);
+ }
+ /*
+ * No equal attr found; create a new one.
+ */
+ return(xmlNewPropInternal(node, ns, name, value, 0));
+}
+
+#endif /* LIBXML_TREE_ENABLED */
+
+/**
+ * xmlNodeIsText:
+ * @node: the node
+ *
+ * Is this node a Text node ?
+ * Returns 1 yes, 0 no
+ */
+int
+xmlNodeIsText(const xmlNode *node) {
+ if (node == NULL) return(0);
+
+ if (node->type == XML_TEXT_NODE) return(1);
+ return(0);
+}
+
+/**
+ * xmlIsBlankNode:
+ * @node: the node
+ *
+ * Checks whether this node is an empty or whitespace only
+ * (and possibly ignorable) text-node.
+ *
+ * Returns 1 yes, 0 no
+ */
+int
+xmlIsBlankNode(const xmlNode *node) {
+ const xmlChar *cur;
+ if (node == NULL) return(0);
+
+ if ((node->type != XML_TEXT_NODE) &&
+ (node->type != XML_CDATA_SECTION_NODE))
+ return(0);
+ if (node->content == NULL) return(1);
+ cur = node->content;
+ while (*cur != 0) {
+ if (!IS_BLANK_CH(*cur)) return(0);
+ cur++;
+ }
+
+ return(1);
+}
+
+/**
+ * xmlTextConcat:
+ * @node: the node
+ * @content: the content
+ * @len: @content length
+ *
+ * Concat the given string at the end of the existing node content
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+
+int
+xmlTextConcat(xmlNodePtr node, const xmlChar *content, int len) {
+ if (node == NULL) return(-1);
+
+ if ((node->type != XML_TEXT_NODE) &&
+ (node->type != XML_CDATA_SECTION_NODE) &&
+ (node->type != XML_COMMENT_NODE) &&
+ (node->type != XML_PI_NODE)) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlTextConcat: node is not text nor CDATA\n");
+#endif
+ return(-1);
+ }
+ /* need to check if content is currently in the dictionary */
+ if ((node->content == (xmlChar *) &(node->properties)) ||
+ ((node->doc != NULL) && (node->doc->dict != NULL) &&
+ xmlDictOwns(node->doc->dict, node->content))) {
+ node->content = xmlStrncatNew(node->content, content, len);
+ } else {
+ node->content = xmlStrncat(node->content, content, len);
+ }
+ node->properties = NULL;
+ if (node->content == NULL)
+ return(-1);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Output : to a FILE or in memory *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlBufferCreate:
+ *
+ * routine to create an XML buffer.
+ * returns the new structure.
+ */
+xmlBufferPtr
+xmlBufferCreate(void) {
+ xmlBufferPtr ret;
+
+ ret = (xmlBufferPtr) xmlMalloc(sizeof(xmlBuffer));
+ if (ret == NULL) {
+ xmlTreeErrMemory("creating buffer");
+ return(NULL);
+ }
+ ret->use = 0;
+ ret->size = xmlDefaultBufferSize;
+ ret->alloc = xmlBufferAllocScheme;
+ ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
+ if (ret->content == NULL) {
+ xmlTreeErrMemory("creating buffer");
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->content[0] = 0;
+ ret->contentIO = NULL;
+ return(ret);
+}
+
+/**
+ * xmlBufferCreateSize:
+ * @size: initial size of buffer
+ *
+ * routine to create an XML buffer.
+ * returns the new structure.
+ */
+xmlBufferPtr
+xmlBufferCreateSize(size_t size) {
+ xmlBufferPtr ret;
+
+ ret = (xmlBufferPtr) xmlMalloc(sizeof(xmlBuffer));
+ if (ret == NULL) {
+ xmlTreeErrMemory("creating buffer");
+ return(NULL);
+ }
+ ret->use = 0;
+ ret->alloc = xmlBufferAllocScheme;
+ ret->size = (size ? size+2 : 0); /* +1 for ending null */
+ if (ret->size){
+ ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar));
+ if (ret->content == NULL) {
+ xmlTreeErrMemory("creating buffer");
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->content[0] = 0;
+ } else
+ ret->content = NULL;
+ ret->contentIO = NULL;
+ return(ret);
+}
+
+/**
+ * xmlBufferDetach:
+ * @buf: the buffer
+ *
+ * Remove the string contained in a buffer and gie it back to the
+ * caller. The buffer is reset to an empty content.
+ * This doesn't work with immutable buffers as they can't be reset.
+ *
+ * Returns the previous string contained by the buffer.
+ */
+xmlChar *
+xmlBufferDetach(xmlBufferPtr buf) {
+ xmlChar *ret;
+
+ if (buf == NULL)
+ return(NULL);
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(NULL);
+
+ ret = buf->content;
+ buf->content = NULL;
+ buf->size = 0;
+ buf->use = 0;
+
+ return ret;
+}
+
+
+/**
+ * xmlBufferCreateStatic:
+ * @mem: the memory area
+ * @size: the size in byte
+ *
+ * routine to create an XML buffer from an immutable memory area.
+ * The area won't be modified nor copied, and is expected to be
+ * present until the end of the buffer lifetime.
+ *
+ * returns the new structure.
+ */
+xmlBufferPtr
+xmlBufferCreateStatic(void *mem, size_t size) {
+ xmlBufferPtr ret;
+
+ if ((mem == NULL) || (size == 0))
+ return(NULL);
+
+ ret = (xmlBufferPtr) xmlMalloc(sizeof(xmlBuffer));
+ if (ret == NULL) {
+ xmlTreeErrMemory("creating buffer");
+ return(NULL);
+ }
+ ret->use = size;
+ ret->size = size;
+ ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
+ ret->content = (xmlChar *) mem;
+ return(ret);
+}
+
+/**
+ * xmlBufferSetAllocationScheme:
+ * @buf: the buffer to tune
+ * @scheme: allocation scheme to use
+ *
+ * Sets the allocation scheme for this buffer
+ */
+void
+xmlBufferSetAllocationScheme(xmlBufferPtr buf,
+ xmlBufferAllocationScheme scheme) {
+ if (buf == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferSetAllocationScheme: buf == NULL\n");
+#endif
+ return;
+ }
+ if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
+ (buf->alloc == XML_BUFFER_ALLOC_IO)) return;
+ if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
+ (scheme == XML_BUFFER_ALLOC_EXACT) ||
+ (scheme == XML_BUFFER_ALLOC_HYBRID) ||
+ (scheme == XML_BUFFER_ALLOC_IMMUTABLE))
+ buf->alloc = scheme;
+}
+
+/**
+ * xmlBufferFree:
+ * @buf: the buffer to free
+ *
+ * Frees an XML buffer. It frees both the content and the structure which
+ * encapsulate it.
+ */
+void
+xmlBufferFree(xmlBufferPtr buf) {
+ if (buf == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferFree: buf == NULL\n");
+#endif
+ return;
+ }
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
+ (buf->contentIO != NULL)) {
+ xmlFree(buf->contentIO);
+ } else if ((buf->content != NULL) &&
+ (buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
+ xmlFree(buf->content);
+ }
+ xmlFree(buf);
+}
+
+/**
+ * xmlBufferEmpty:
+ * @buf: the buffer
+ *
+ * empty a buffer.
+ */
+void
+xmlBufferEmpty(xmlBufferPtr buf) {
+ if (buf == NULL) return;
+ if (buf->content == NULL) return;
+ buf->use = 0;
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) {
+ buf->content = BAD_CAST "";
+ } else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
+ (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ buf->size += start_buf;
+ buf->content = buf->contentIO;
+ buf->content[0] = 0;
+ } else {
+ buf->content[0] = 0;
+ }
+}
+
+/**
+ * xmlBufferShrink:
+ * @buf: the buffer to dump
+ * @len: the number of xmlChar to remove
+ *
+ * Remove the beginning of an XML buffer.
+ *
+ * Returns the number of #xmlChar removed, or -1 in case of failure.
+ */
+int
+xmlBufferShrink(xmlBufferPtr buf, unsigned int len) {
+ if (buf == NULL) return(-1);
+ if (len == 0) return(0);
+ if (len > buf->use) return(-1);
+
+ buf->use -= len;
+ if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) ||
+ ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
+ /*
+ * we just move the content pointer, but also make sure
+ * the perceived buffer size has shrinked accordingly
+ */
+ buf->content += len;
+ buf->size -= len;
+
+ /*
+ * sometimes though it maybe be better to really shrink
+ * on IO buffers
+ */
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+ if (start_buf >= buf->size) {
+ memmove(buf->contentIO, &buf->content[0], buf->use);
+ buf->content = buf->contentIO;
+ buf->content[buf->use] = 0;
+ buf->size += start_buf;
+ }
+ }
+ } else {
+ memmove(buf->content, &buf->content[len], buf->use);
+ buf->content[buf->use] = 0;
+ }
+ return(len);
+}
+
+/**
+ * xmlBufferGrow:
+ * @buf: the buffer
+ * @len: the minimum free size to allocate
+ *
+ * Grow the available space of an XML buffer.
+ *
+ * Returns the new available space or -1 in case of error
+ */
+int
+xmlBufferGrow(xmlBufferPtr buf, unsigned int len) {
+ int size;
+ xmlChar *newbuf;
+
+ if (buf == NULL) return(-1);
+
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
+ if (len + buf->use < buf->size) return(0);
+
+ /*
+ * Windows has a BIG problem on realloc timing, so we try to double
+ * the buffer size (if that's enough) (bug 146697)
+ * Apparently BSD too, and it's probably best for linux too
+ * On an embedded system this may be something to change
+ */
+#if 1
+ if (buf->size > len)
+ size = buf->size * 2;
+ else
+ size = buf->use + len + 100;
+#else
+ size = buf->use + len + 100;
+#endif
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ newbuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + size);
+ if (newbuf == NULL) {
+ xmlTreeErrMemory("growing buffer");
+ return(-1);
+ }
+ buf->contentIO = newbuf;
+ buf->content = newbuf + start_buf;
+ } else {
+ newbuf = (xmlChar *) xmlRealloc(buf->content, size);
+ if (newbuf == NULL) {
+ xmlTreeErrMemory("growing buffer");
+ return(-1);
+ }
+ buf->content = newbuf;
+ }
+ buf->size = size;
+ return(buf->size - buf->use);
+}
+
+/**
+ * xmlBufferDump:
+ * @file: the file output
+ * @buf: the buffer to dump
+ *
+ * Dumps an XML buffer to a FILE *.
+ * Returns the number of #xmlChar written
+ */
+int
+xmlBufferDump(FILE *file, xmlBufferPtr buf) {
+ int ret;
+
+ if (buf == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferDump: buf == NULL\n");
+#endif
+ return(0);
+ }
+ if (buf->content == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferDump: buf->content == NULL\n");
+#endif
+ return(0);
+ }
+ if (file == NULL)
+ file = stdout;
+ ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file);
+ return(ret);
+}
+
+/**
+ * xmlBufferContent:
+ * @buf: the buffer
+ *
+ * Function to extract the content of a buffer
+ *
+ * Returns the internal content
+ */
+
+const xmlChar *
+xmlBufferContent(const xmlBuffer *buf)
+{
+ if(!buf)
+ return NULL;
+
+ return buf->content;
+}
+
+/**
+ * xmlBufferLength:
+ * @buf: the buffer
+ *
+ * Function to get the length of a buffer
+ *
+ * Returns the length of data in the internal content
+ */
+
+int
+xmlBufferLength(const xmlBuffer *buf)
+{
+ if(!buf)
+ return 0;
+
+ return buf->use;
+}
+
+/**
+ * xmlBufferResize:
+ * @buf: the buffer to resize
+ * @size: the desired size
+ *
+ * Resize a buffer to accommodate minimum size of @size.
+ *
+ * Returns 0 in case of problems, 1 otherwise
+ */
+int
+xmlBufferResize(xmlBufferPtr buf, unsigned int size)
+{
+ unsigned int newSize;
+ xmlChar* rebuf = NULL;
+ size_t start_buf;
+
+ if (buf == NULL)
+ return(0);
+
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
+
+ /* Don't resize if we don't have to */
+ if (size < buf->size)
+ return 1;
+
+ /* figure out new size */
+ switch (buf->alloc){
+ case XML_BUFFER_ALLOC_IO:
+ case XML_BUFFER_ALLOC_DOUBLEIT:
+ /*take care of empty case*/
+ newSize = (buf->size ? buf->size*2 : size + 10);
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
+ break;
+ case XML_BUFFER_ALLOC_EXACT:
+ newSize = size+10;
+ break;
+ case XML_BUFFER_ALLOC_HYBRID:
+ if (buf->use < BASE_BUFFER_SIZE)
+ newSize = size;
+ else {
+ newSize = buf->size * 2;
+ while (size > newSize) {
+ if (newSize > UINT_MAX / 2) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ newSize *= 2;
+ }
+ }
+ break;
+
+ default:
+ newSize = size+10;
+ break;
+ }
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ start_buf = buf->content - buf->contentIO;
+
+ if (start_buf > newSize) {
+ /* move data back to start */
+ memmove(buf->contentIO, buf->content, buf->use);
+ buf->content = buf->contentIO;
+ buf->content[buf->use] = 0;
+ buf->size += start_buf;
+ } else {
+ rebuf = (xmlChar *) xmlRealloc(buf->contentIO, start_buf + newSize);
+ if (rebuf == NULL) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ buf->contentIO = rebuf;
+ buf->content = rebuf + start_buf;
+ }
+ } else {
+ if (buf->content == NULL) {
+ rebuf = (xmlChar *) xmlMallocAtomic(newSize);
+ } else if (buf->size - buf->use < 100) {
+ rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
+ } else {
+ /*
+ * if we are reallocating a buffer far from being full, it's
+ * better to make a new allocation and copy only the used range
+ * and free the old one.
+ */
+ rebuf = (xmlChar *) xmlMallocAtomic(newSize);
+ if (rebuf != NULL) {
+ memcpy(rebuf, buf->content, buf->use);
+ xmlFree(buf->content);
+ rebuf[buf->use] = 0;
+ }
+ }
+ if (rebuf == NULL) {
+ xmlTreeErrMemory("growing buffer");
+ return 0;
+ }
+ buf->content = rebuf;
+ }
+ buf->size = newSize;
+
+ return 1;
+}
+
+/**
+ * xmlBufferAdd:
+ * @buf: the buffer to dump
+ * @str: the #xmlChar string
+ * @len: the number of #xmlChar to add
+ *
+ * Add a string range to an XML buffer. if len == -1, the length of
+ * str is recomputed.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufferAdd(xmlBufferPtr buf, const xmlChar *str, int len) {
+ unsigned int needSize;
+
+ if ((str == NULL) || (buf == NULL)) {
+ return -1;
+ }
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (len < -1) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferAdd: len < 0\n");
+#endif
+ return -1;
+ }
+ if (len == 0) return 0;
+
+ if (len < 0)
+ len = xmlStrlen(str);
+
+ if (len < 0) return -1;
+ if (len == 0) return 0;
+
+ needSize = buf->use + len + 2;
+ if (needSize > buf->size){
+ if (!xmlBufferResize(buf, needSize)){
+ xmlTreeErrMemory("growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+
+ memmove(&buf->content[buf->use], str, len*sizeof(xmlChar));
+ buf->use += len;
+ buf->content[buf->use] = 0;
+ return 0;
+}
+
+/**
+ * xmlBufferAddHead:
+ * @buf: the buffer
+ * @str: the #xmlChar string
+ * @len: the number of #xmlChar to add
+ *
+ * Add a string range to the beginning of an XML buffer.
+ * if len == -1, the length of @str is recomputed.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufferAddHead(xmlBufferPtr buf, const xmlChar *str, int len) {
+ unsigned int needSize;
+
+ if (buf == NULL)
+ return(-1);
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferAddHead: str == NULL\n");
+#endif
+ return -1;
+ }
+ if (len < -1) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferAddHead: len < 0\n");
+#endif
+ return -1;
+ }
+ if (len == 0) return 0;
+
+ if (len < 0)
+ len = xmlStrlen(str);
+
+ if (len <= 0) return -1;
+
+ if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
+ size_t start_buf = buf->content - buf->contentIO;
+
+ if (start_buf > (unsigned int) len) {
+ /*
+ * We can add it in the space previously shrinked
+ */
+ buf->content -= len;
+ memmove(&buf->content[0], str, len);
+ buf->use += len;
+ buf->size += len;
+ return(0);
+ }
+ }
+ needSize = buf->use + len + 2;
+ if (needSize > buf->size){
+ if (!xmlBufferResize(buf, needSize)){
+ xmlTreeErrMemory("growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+
+ memmove(&buf->content[len], &buf->content[0], buf->use);
+ memmove(&buf->content[0], str, len);
+ buf->use += len;
+ buf->content[buf->use] = 0;
+ return 0;
+}
+
+/**
+ * xmlBufferCat:
+ * @buf: the buffer to add to
+ * @str: the #xmlChar string
+ *
+ * Append a zero terminated string to an XML buffer.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufferCat(xmlBufferPtr buf, const xmlChar *str) {
+ if (buf == NULL)
+ return(-1);
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) return -1;
+ return xmlBufferAdd(buf, str, -1);
+}
+
+/**
+ * xmlBufferCCat:
+ * @buf: the buffer to dump
+ * @str: the C char string
+ *
+ * Append a zero terminated C string to an XML buffer.
+ *
+ * Returns 0 successful, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlBufferCCat(xmlBufferPtr buf, const char *str) {
+ const char *cur;
+
+ if (buf == NULL)
+ return(-1);
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
+ if (str == NULL) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferCCat: str == NULL\n");
+#endif
+ return -1;
+ }
+ for (cur = str;*cur != 0;cur++) {
+ if (buf->use + 10 >= buf->size) {
+ if (!xmlBufferResize(buf, buf->use+10)){
+ xmlTreeErrMemory("growing buffer");
+ return XML_ERR_NO_MEMORY;
+ }
+ }
+ buf->content[buf->use++] = *cur;
+ }
+ buf->content[buf->use] = 0;
+ return 0;
+}
+
+/**
+ * xmlBufferWriteCHAR:
+ * @buf: the XML buffer
+ * @string: the string to add
+ *
+ * routine which manages and grows an output buffer. This one adds
+ * xmlChars at the end of the buffer.
+ */
+void
+xmlBufferWriteCHAR(xmlBufferPtr buf, const xmlChar *string) {
+ if (buf == NULL)
+ return;
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
+ xmlBufferCat(buf, string);
+}
+
+/**
+ * xmlBufferWriteChar:
+ * @buf: the XML buffer output
+ * @string: the string to add
+ *
+ * routine which manage and grows an output buffer. This one add
+ * C chars at the end of the array.
+ */
+void
+xmlBufferWriteChar(xmlBufferPtr buf, const char *string) {
+ if (buf == NULL)
+ return;
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
+ xmlBufferCCat(buf, string);
+}
+
+
+/**
+ * xmlBufferWriteQuotedString:
+ * @buf: the XML buffer output
+ * @string: the string to add
+ *
+ * routine which manage and grows an output buffer. This one writes
+ * a quoted or double quoted #xmlChar string, checking first if it holds
+ * quote or double-quotes internally
+ */
+void
+xmlBufferWriteQuotedString(xmlBufferPtr buf, const xmlChar *string) {
+ const xmlChar *cur, *base;
+ if (buf == NULL)
+ return;
+ if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
+ if (xmlStrchr(string, '\"')) {
+ if (xmlStrchr(string, '\'')) {
+#ifdef DEBUG_BUFFER
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlBufferWriteQuotedString: string contains quote and double-quotes !\n");
+#endif
+ xmlBufferCCat(buf, "\"");
+ base = cur = string;
+ while(*cur != 0){
+ if(*cur == '"'){
+ if (base != cur)
+ xmlBufferAdd(buf, base, cur - base);
+ xmlBufferAdd(buf, BAD_CAST "&quot;", 6);
+ cur++;
+ base = cur;
+ }
+ else {
+ cur++;
+ }
+ }
+ if (base != cur)
+ xmlBufferAdd(buf, base, cur - base);
+ xmlBufferCCat(buf, "\"");
+ }
+ else{
+ xmlBufferCCat(buf, "\'");
+ xmlBufferCat(buf, string);
+ xmlBufferCCat(buf, "\'");
+ }
+ } else {
+ xmlBufferCCat(buf, "\"");
+ xmlBufferCat(buf, string);
+ xmlBufferCCat(buf, "\"");
+ }
+}
+
+
+/**
+ * xmlGetDocCompressMode:
+ * @doc: the document
+ *
+ * get the compression ratio for a document, ZLIB based
+ * Returns 0 (uncompressed) to 9 (max compression)
+ */
+int
+xmlGetDocCompressMode (const xmlDoc *doc) {
+ if (doc == NULL) return(-1);
+ return(doc->compression);
+}
+
+/**
+ * xmlSetDocCompressMode:
+ * @doc: the document
+ * @mode: the compression ratio
+ *
+ * set the compression ratio for a document, ZLIB based
+ * Correct values: 0 (uncompressed) to 9 (max compression)
+ */
+void
+xmlSetDocCompressMode (xmlDocPtr doc, int mode) {
+ if (doc == NULL) return;
+ if (mode < 0) doc->compression = 0;
+ else if (mode > 9) doc->compression = 9;
+ else doc->compression = mode;
+}
+
+/**
+ * xmlGetCompressMode:
+ *
+ * get the default compression mode used, ZLIB based.
+ * Returns 0 (uncompressed) to 9 (max compression)
+ */
+int
+xmlGetCompressMode(void)
+{
+ return (xmlCompressMode);
+}
+
+/**
+ * xmlSetCompressMode:
+ * @mode: the compression ratio
+ *
+ * set the default compression mode used, ZLIB based
+ * Correct values: 0 (uncompressed) to 9 (max compression)
+ */
+void
+xmlSetCompressMode(int mode) {
+ if (mode < 0) xmlCompressMode = 0;
+ else if (mode > 9) xmlCompressMode = 9;
+ else xmlCompressMode = mode;
+}
+
+#define XML_TREE_NSMAP_PARENT -1
+#define XML_TREE_NSMAP_XML -2
+#define XML_TREE_NSMAP_DOC -3
+#define XML_TREE_NSMAP_CUSTOM -4
+
+typedef struct xmlNsMapItem *xmlNsMapItemPtr;
+struct xmlNsMapItem {
+ xmlNsMapItemPtr next;
+ xmlNsMapItemPtr prev;
+ xmlNsPtr oldNs; /* old ns decl reference */
+ xmlNsPtr newNs; /* new ns decl reference */
+ int shadowDepth; /* Shadowed at this depth */
+ /*
+ * depth:
+ * >= 0 == @node's ns-decls
+ * -1 == @parent's ns-decls
+ * -2 == the doc->oldNs XML ns-decl
+ * -3 == the doc->oldNs storage ns-decls
+ * -4 == ns-decls provided via custom ns-handling
+ */
+ int depth;
+};
+
+typedef struct xmlNsMap *xmlNsMapPtr;
+struct xmlNsMap {
+ xmlNsMapItemPtr first;
+ xmlNsMapItemPtr last;
+ xmlNsMapItemPtr pool;
+};
+
+#define XML_NSMAP_NOTEMPTY(m) (((m) != NULL) && ((m)->first != NULL))
+#define XML_NSMAP_FOREACH(m, i) for (i = (m)->first; i != NULL; i = (i)->next)
+#define XML_NSMAP_POP(m, i) \
+ i = (m)->last; \
+ (m)->last = (i)->prev; \
+ if ((m)->last == NULL) \
+ (m)->first = NULL; \
+ else \
+ (m)->last->next = NULL; \
+ (i)->next = (m)->pool; \
+ (m)->pool = i;
+
+/*
+* xmlDOMWrapNsMapFree:
+* @map: the ns-map
+*
+* Frees the ns-map
+*/
+static void
+xmlDOMWrapNsMapFree(xmlNsMapPtr nsmap)
+{
+ xmlNsMapItemPtr cur, tmp;
+
+ if (nsmap == NULL)
+ return;
+ cur = nsmap->pool;
+ while (cur != NULL) {
+ tmp = cur;
+ cur = cur->next;
+ xmlFree(tmp);
+ }
+ cur = nsmap->first;
+ while (cur != NULL) {
+ tmp = cur;
+ cur = cur->next;
+ xmlFree(tmp);
+ }
+ xmlFree(nsmap);
+}
+
+/*
+* xmlDOMWrapNsMapAddItem:
+* @map: the ns-map
+* @oldNs: the old ns-struct
+* @newNs: the new ns-struct
+* @depth: depth and ns-kind information
+*
+* Adds an ns-mapping item.
+*/
+static xmlNsMapItemPtr
+xmlDOMWrapNsMapAddItem(xmlNsMapPtr *nsmap, int position,
+ xmlNsPtr oldNs, xmlNsPtr newNs, int depth)
+{
+ xmlNsMapItemPtr ret;
+ xmlNsMapPtr map;
+
+ if (nsmap == NULL)
+ return(NULL);
+ if ((position != -1) && (position != 0))
+ return(NULL);
+ map = *nsmap;
+
+ if (map == NULL) {
+ /*
+ * Create the ns-map.
+ */
+ map = (xmlNsMapPtr) xmlMalloc(sizeof(struct xmlNsMap));
+ if (map == NULL) {
+ xmlTreeErrMemory("allocating namespace map");
+ return (NULL);
+ }
+ memset(map, 0, sizeof(struct xmlNsMap));
+ *nsmap = map;
+ }
+
+ if (map->pool != NULL) {
+ /*
+ * Reuse an item from the pool.
+ */
+ ret = map->pool;
+ map->pool = ret->next;
+ memset(ret, 0, sizeof(struct xmlNsMapItem));
+ } else {
+ /*
+ * Create a new item.
+ */
+ ret = (xmlNsMapItemPtr) xmlMalloc(sizeof(struct xmlNsMapItem));
+ if (ret == NULL) {
+ xmlTreeErrMemory("allocating namespace map item");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(struct xmlNsMapItem));
+ }
+
+ if (map->first == NULL) {
+ /*
+ * First ever.
+ */
+ map->first = ret;
+ map->last = ret;
+ } else if (position == -1) {
+ /*
+ * Append.
+ */
+ ret->prev = map->last;
+ map->last->next = ret;
+ map->last = ret;
+ } else if (position == 0) {
+ /*
+ * Set on first position.
+ */
+ map->first->prev = ret;
+ ret->next = map->first;
+ map->first = ret;
+ }
+
+ ret->oldNs = oldNs;
+ ret->newNs = newNs;
+ ret->shadowDepth = -1;
+ ret->depth = depth;
+ return (ret);
+}
+
+/*
+* xmlDOMWrapStoreNs:
+* @doc: the doc
+* @nsName: the namespace name
+* @prefix: the prefix
+*
+* Creates or reuses an xmlNs struct on doc->oldNs with
+* the given prefix and namespace name.
+*
+* Returns the aquired ns struct or NULL in case of an API
+* or internal error.
+*/
+static xmlNsPtr
+xmlDOMWrapStoreNs(xmlDocPtr doc,
+ const xmlChar *nsName,
+ const xmlChar *prefix)
+{
+ xmlNsPtr ns;
+
+ if (doc == NULL)
+ return (NULL);
+ ns = xmlTreeEnsureXMLDecl(doc);
+ if (ns == NULL)
+ return (NULL);
+ if (ns->next != NULL) {
+ /* Reuse. */
+ ns = ns->next;
+ while (ns != NULL) {
+ if (((ns->prefix == prefix) ||
+ xmlStrEqual(ns->prefix, prefix)) &&
+ xmlStrEqual(ns->href, nsName)) {
+ return (ns);
+ }
+ if (ns->next == NULL)
+ break;
+ ns = ns->next;
+ }
+ }
+ /* Create. */
+ if (ns != NULL) {
+ ns->next = xmlNewNs(NULL, nsName, prefix);
+ return (ns->next);
+ }
+ return(NULL);
+}
+
+/*
+* xmlDOMWrapNewCtxt:
+*
+* Allocates and initializes a new DOM-wrapper context.
+*
+* Returns the xmlDOMWrapCtxtPtr or NULL in case of an internal error.
+*/
+xmlDOMWrapCtxtPtr
+xmlDOMWrapNewCtxt(void)
+{
+ xmlDOMWrapCtxtPtr ret;
+
+ ret = xmlMalloc(sizeof(xmlDOMWrapCtxt));
+ if (ret == NULL) {
+ xmlTreeErrMemory("allocating DOM-wrapper context");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlDOMWrapCtxt));
+ return (ret);
+}
+
+/*
+* xmlDOMWrapFreeCtxt:
+* @ctxt: the DOM-wrapper context
+*
+* Frees the DOM-wrapper context.
+*/
+void
+xmlDOMWrapFreeCtxt(xmlDOMWrapCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->namespaceMap != NULL)
+ xmlDOMWrapNsMapFree((xmlNsMapPtr) ctxt->namespaceMap);
+ /*
+ * TODO: Store the namespace map in the context.
+ */
+ xmlFree(ctxt);
+}
+
+/*
+* xmlTreeLookupNsListByPrefix:
+* @nsList: a list of ns-structs
+* @prefix: the searched prefix
+*
+* Searches for a ns-decl with the given prefix in @nsList.
+*
+* Returns the ns-decl if found, NULL if not found and on
+* API errors.
+*/
+static xmlNsPtr
+xmlTreeNSListLookupByPrefix(xmlNsPtr nsList, const xmlChar *prefix)
+{
+ if (nsList == NULL)
+ return (NULL);
+ {
+ xmlNsPtr ns;
+ ns = nsList;
+ do {
+ if ((prefix == ns->prefix) ||
+ xmlStrEqual(prefix, ns->prefix)) {
+ return (ns);
+ }
+ ns = ns->next;
+ } while (ns != NULL);
+ }
+ return (NULL);
+}
+
+/*
+*
+* xmlDOMWrapNSNormGatherInScopeNs:
+* @map: the namespace map
+* @node: the node to start with
+*
+* Puts in-scope namespaces into the ns-map.
+*
+* Returns 0 on success, -1 on API or internal errors.
+*/
+static int
+xmlDOMWrapNSNormGatherInScopeNs(xmlNsMapPtr *map,
+ xmlNodePtr node)
+{
+ xmlNodePtr cur;
+ xmlNsPtr ns;
+ xmlNsMapItemPtr mi;
+ int shadowed;
+
+ if ((map == NULL) || (*map != NULL))
+ return (-1);
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return (-1);
+ /*
+ * Get in-scope ns-decls of @parent.
+ */
+ cur = node;
+ while ((cur != NULL) && (cur != (xmlNodePtr) cur->doc)) {
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (cur->nsDef != NULL) {
+ ns = cur->nsDef;
+ do {
+ shadowed = 0;
+ if (XML_NSMAP_NOTEMPTY(*map)) {
+ /*
+ * Skip shadowed prefixes.
+ */
+ XML_NSMAP_FOREACH(*map, mi) {
+ if ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix, mi->newNs->prefix)) {
+ shadowed = 1;
+ break;
+ }
+ }
+ }
+ /*
+ * Insert mapping.
+ */
+ mi = xmlDOMWrapNsMapAddItem(map, 0, NULL,
+ ns, XML_TREE_NSMAP_PARENT);
+ if (mi == NULL)
+ return (-1);
+ if (shadowed)
+ mi->shadowDepth = 0;
+ ns = ns->next;
+ } while (ns != NULL);
+ }
+ }
+ cur = cur->parent;
+ }
+ return (0);
+}
+
+/*
+* XML_TREE_ADOPT_STR: If we have a dest-dict, put @str in the dict;
+* otherwise copy it, when it was in the source-dict.
+*/
+#define XML_TREE_ADOPT_STR(str) \
+ if (adoptStr && (str != NULL)) { \
+ if (destDoc->dict) { \
+ const xmlChar *old = str; \
+ str = xmlDictLookup(destDoc->dict, str, -1); \
+ if ((sourceDoc == NULL) || (sourceDoc->dict == NULL) || \
+ (!xmlDictOwns(sourceDoc->dict, old))) \
+ xmlFree((char *)old); \
+ } else if ((sourceDoc) && (sourceDoc->dict) && \
+ xmlDictOwns(sourceDoc->dict, str)) { \
+ str = BAD_CAST xmlStrdup(str); \
+ } \
+ }
+
+/*
+* XML_TREE_ADOPT_STR_2: If @str was in the source-dict, then
+* put it in dest-dict or copy it.
+*/
+#define XML_TREE_ADOPT_STR_2(str) \
+ if (adoptStr && (str != NULL) && (sourceDoc != NULL) && \
+ (sourceDoc->dict != NULL) && \
+ xmlDictOwns(sourceDoc->dict, cur->content)) { \
+ if (destDoc->dict) \
+ cur->content = (xmlChar *) \
+ xmlDictLookup(destDoc->dict, cur->content, -1); \
+ else \
+ cur->content = xmlStrdup(BAD_CAST cur->content); \
+ }
+
+/*
+* xmlDOMWrapNSNormAddNsMapItem2:
+*
+* For internal use. Adds a ns-decl mapping.
+*
+* Returns 0 on success, -1 on internal errors.
+*/
+static int
+xmlDOMWrapNSNormAddNsMapItem2(xmlNsPtr **list, int *size, int *number,
+ xmlNsPtr oldNs, xmlNsPtr newNs)
+{
+ if (*list == NULL) {
+ *list = (xmlNsPtr *) xmlMalloc(6 * sizeof(xmlNsPtr));
+ if (*list == NULL) {
+ xmlTreeErrMemory("alloc ns map item");
+ return(-1);
+ }
+ *size = 3;
+ *number = 0;
+ } else if ((*number) >= (*size)) {
+ *size *= 2;
+ *list = (xmlNsPtr *) xmlRealloc(*list,
+ (*size) * 2 * sizeof(xmlNsPtr));
+ if (*list == NULL) {
+ xmlTreeErrMemory("realloc ns map item");
+ return(-1);
+ }
+ }
+ (*list)[2 * (*number)] = oldNs;
+ (*list)[2 * (*number) +1] = newNs;
+ (*number)++;
+ return (0);
+}
+
+/*
+* xmlDOMWrapRemoveNode:
+* @ctxt: a DOM wrapper context
+* @doc: the doc
+* @node: the node to be removed.
+* @options: set of options, unused at the moment
+*
+* Unlinks the given node from its owner.
+* This will substitute ns-references to node->nsDef for
+* ns-references to doc->oldNs, thus ensuring the removed
+* branch to be autark wrt ns-references.
+*
+* NOTE: This function was not intensively tested.
+*
+* Returns 0 on success, 1 if the node is not supported,
+* -1 on API and internal errors.
+*/
+int
+xmlDOMWrapRemoveNode(xmlDOMWrapCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr node, int options ATTRIBUTE_UNUSED)
+{
+ xmlNsPtr *list = NULL;
+ int sizeList, nbList, i, j;
+ xmlNsPtr ns;
+
+ if ((node == NULL) || (doc == NULL) || (node->doc != doc))
+ return (-1);
+
+ /* TODO: 0 or -1 ? */
+ if (node->parent == NULL)
+ return (0);
+
+ switch (node->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ xmlUnlinkNode(node);
+ return (0);
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ break;
+ default:
+ return (1);
+ }
+ xmlUnlinkNode(node);
+ /*
+ * Save out-of-scope ns-references in doc->oldNs.
+ */
+ do {
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ if ((ctxt == NULL) && (node->nsDef != NULL)) {
+ ns = node->nsDef;
+ do {
+ if (xmlDOMWrapNSNormAddNsMapItem2(&list, &sizeList,
+ &nbList, ns, ns) == -1)
+ goto internal_error;
+ ns = ns->next;
+ } while (ns != NULL);
+ }
+ /* No break on purpose. */
+ case XML_ATTRIBUTE_NODE:
+ if (node->ns != NULL) {
+ /*
+ * Find a mapping.
+ */
+ if (list != NULL) {
+ for (i = 0, j = 0; i < nbList; i++, j += 2) {
+ if (node->ns == list[j]) {
+ node->ns = list[++j];
+ goto next_node;
+ }
+ }
+ }
+ ns = NULL;
+ if (ctxt != NULL) {
+ /*
+ * User defined.
+ */
+ } else {
+ /*
+ * Add to doc's oldNs.
+ */
+ ns = xmlDOMWrapStoreNs(doc, node->ns->href,
+ node->ns->prefix);
+ if (ns == NULL)
+ goto internal_error;
+ }
+ if (ns != NULL) {
+ /*
+ * Add mapping.
+ */
+ if (xmlDOMWrapNSNormAddNsMapItem2(&list, &sizeList,
+ &nbList, node->ns, ns) == -1)
+ goto internal_error;
+ }
+ node->ns = ns;
+ }
+ if ((node->type == XML_ELEMENT_NODE) &&
+ (node->properties != NULL)) {
+ node = (xmlNodePtr) node->properties;
+ continue;
+ }
+ break;
+ default:
+ goto next_sibling;
+ }
+next_node:
+ if ((node->type == XML_ELEMENT_NODE) &&
+ (node->children != NULL)) {
+ node = node->children;
+ continue;
+ }
+next_sibling:
+ if (node == NULL)
+ break;
+ if (node->next != NULL)
+ node = node->next;
+ else {
+ node = node->parent;
+ goto next_sibling;
+ }
+ } while (node != NULL);
+
+ if (list != NULL)
+ xmlFree(list);
+ return (0);
+
+internal_error:
+ if (list != NULL)
+ xmlFree(list);
+ return (-1);
+}
+
+/*
+* xmlSearchNsByNamespaceStrict:
+* @doc: the document
+* @node: the start node
+* @nsName: the searched namespace name
+* @retNs: the resulting ns-decl
+* @prefixed: if the found ns-decl must have a prefix (for attributes)
+*
+* Dynamically searches for a ns-declaration which matches
+* the given @nsName in the ancestor-or-self axis of @node.
+*
+* Returns 1 if a ns-decl was found, 0 if not and -1 on API
+* and internal errors.
+*/
+static int
+xmlSearchNsByNamespaceStrict(xmlDocPtr doc, xmlNodePtr node,
+ const xmlChar* nsName,
+ xmlNsPtr *retNs, int prefixed)
+{
+ xmlNodePtr cur, prev = NULL, out = NULL;
+ xmlNsPtr ns, prevns;
+
+ if ((doc == NULL) || (nsName == NULL) || (retNs == NULL))
+ return (-1);
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return(-1);
+
+ *retNs = NULL;
+ if (xmlStrEqual(nsName, XML_XML_NAMESPACE)) {
+ *retNs = xmlTreeEnsureXMLDecl(doc);
+ if (*retNs == NULL)
+ return (-1);
+ return (1);
+ }
+ cur = node;
+ do {
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (cur->nsDef != NULL) {
+ for (ns = cur->nsDef; ns != NULL; ns = ns->next) {
+ if (prefixed && (ns->prefix == NULL))
+ continue;
+ if (prev != NULL) {
+ /*
+ * Check the last level of ns-decls for a
+ * shadowing prefix.
+ */
+ prevns = prev->nsDef;
+ do {
+ if ((prevns->prefix == ns->prefix) ||
+ ((prevns->prefix != NULL) &&
+ (ns->prefix != NULL) &&
+ xmlStrEqual(prevns->prefix, ns->prefix))) {
+ /*
+ * Shadowed.
+ */
+ break;
+ }
+ prevns = prevns->next;
+ } while (prevns != NULL);
+ if (prevns != NULL)
+ continue;
+ }
+ /*
+ * Ns-name comparison.
+ */
+ if ((nsName == ns->href) ||
+ xmlStrEqual(nsName, ns->href)) {
+ /*
+ * At this point the prefix can only be shadowed,
+ * if we are the the (at least) 3rd level of
+ * ns-decls.
+ */
+ if (out) {
+ int ret;
+
+ ret = xmlNsInScope(doc, node, prev, ns->prefix);
+ if (ret < 0)
+ return (-1);
+ /*
+ * TODO: Should we try to find a matching ns-name
+ * only once? This here keeps on searching.
+ * I think we should try further since, there might
+ * be an other matching ns-decl with an unshadowed
+ * prefix.
+ */
+ if (! ret)
+ continue;
+ }
+ *retNs = ns;
+ return (1);
+ }
+ }
+ out = prev;
+ prev = cur;
+ }
+ } else if ((cur->type == XML_ENTITY_NODE) ||
+ (cur->type == XML_ENTITY_DECL))
+ return (0);
+ cur = cur->parent;
+ } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur));
+ return (0);
+}
+
+/*
+* xmlSearchNsByPrefixStrict:
+* @doc: the document
+* @node: the start node
+* @prefix: the searched namespace prefix
+* @retNs: the resulting ns-decl
+*
+* Dynamically searches for a ns-declaration which matches
+* the given @nsName in the ancestor-or-self axis of @node.
+*
+* Returns 1 if a ns-decl was found, 0 if not and -1 on API
+* and internal errors.
+*/
+static int
+xmlSearchNsByPrefixStrict(xmlDocPtr doc, xmlNodePtr node,
+ const xmlChar* prefix,
+ xmlNsPtr *retNs)
+{
+ xmlNodePtr cur;
+ xmlNsPtr ns;
+
+ if ((doc == NULL) || (node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return(-1);
+
+ if (retNs)
+ *retNs = NULL;
+ if (IS_STR_XML(prefix)) {
+ if (retNs) {
+ *retNs = xmlTreeEnsureXMLDecl(doc);
+ if (*retNs == NULL)
+ return (-1);
+ }
+ return (1);
+ }
+ cur = node;
+ do {
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (cur->nsDef != NULL) {
+ ns = cur->nsDef;
+ do {
+ if ((prefix == ns->prefix) ||
+ xmlStrEqual(prefix, ns->prefix))
+ {
+ /*
+ * Disabled namespaces, e.g. xmlns:abc="".
+ */
+ if (ns->href == NULL)
+ return(0);
+ if (retNs)
+ *retNs = ns;
+ return (1);
+ }
+ ns = ns->next;
+ } while (ns != NULL);
+ }
+ } else if ((cur->type == XML_ENTITY_NODE) ||
+ (cur->type == XML_ENTITY_DECL))
+ return (0);
+ cur = cur->parent;
+ } while ((cur != NULL) && (cur->doc != (xmlDocPtr) cur));
+ return (0);
+}
+
+/*
+* xmlDOMWrapNSNormDeclareNsForced:
+* @doc: the doc
+* @elem: the element-node to declare on
+* @nsName: the namespace-name of the ns-decl
+* @prefix: the preferred prefix of the ns-decl
+* @checkShadow: ensure that the new ns-decl doesn't shadow ancestor ns-decls
+*
+* Declares a new namespace on @elem. It tries to use the
+* given @prefix; if a ns-decl with the given prefix is already existent
+* on @elem, it will generate an other prefix.
+*
+* Returns 1 if a ns-decl was found, 0 if not and -1 on API
+* and internal errors.
+*/
+static xmlNsPtr
+xmlDOMWrapNSNormDeclareNsForced(xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *nsName,
+ const xmlChar *prefix,
+ int checkShadow)
+{
+
+ xmlNsPtr ret;
+ char buf[50];
+ const xmlChar *pref;
+ int counter = 0;
+
+ if ((doc == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE))
+ return(NULL);
+ /*
+ * Create a ns-decl on @anchor.
+ */
+ pref = prefix;
+ while (1) {
+ /*
+ * Lookup whether the prefix is unused in elem's ns-decls.
+ */
+ if ((elem->nsDef != NULL) &&
+ (xmlTreeNSListLookupByPrefix(elem->nsDef, pref) != NULL))
+ goto ns_next_prefix;
+ if (checkShadow && elem->parent &&
+ ((xmlNodePtr) elem->parent->doc != elem->parent)) {
+ /*
+ * Does it shadow ancestor ns-decls?
+ */
+ if (xmlSearchNsByPrefixStrict(doc, elem->parent, pref, NULL) == 1)
+ goto ns_next_prefix;
+ }
+ ret = xmlNewNs(NULL, nsName, pref);
+ if (ret == NULL)
+ return (NULL);
+ if (elem->nsDef == NULL)
+ elem->nsDef = ret;
+ else {
+ xmlNsPtr ns2 = elem->nsDef;
+ while (ns2->next != NULL)
+ ns2 = ns2->next;
+ ns2->next = ret;
+ }
+ return (ret);
+ns_next_prefix:
+ counter++;
+ if (counter > 1000)
+ return (NULL);
+ if (prefix == NULL) {
+ snprintf((char *) buf, sizeof(buf),
+ "ns_%d", counter);
+ } else
+ snprintf((char *) buf, sizeof(buf),
+ "%.30s_%d", (char *)prefix, counter);
+ pref = BAD_CAST buf;
+ }
+}
+
+/*
+* xmlDOMWrapNSNormAquireNormalizedNs:
+* @doc: the doc
+* @elem: the element-node to declare namespaces on
+* @ns: the ns-struct to use for the search
+* @retNs: the found/created ns-struct
+* @nsMap: the ns-map
+* @depth: the current tree depth
+* @ancestorsOnly: search in ancestor ns-decls only
+* @prefixed: if the searched ns-decl must have a prefix (for attributes)
+*
+* Searches for a matching ns-name in the ns-decls of @nsMap, if not
+* found it will either declare it on @elem, or store it in doc->oldNs.
+* If a new ns-decl needs to be declared on @elem, it tries to use the
+* @ns->prefix for it, if this prefix is already in use on @elem, it will
+* change the prefix or the new ns-decl.
+*
+* Returns 0 if succeeded, -1 otherwise and on API/internal errors.
+*/
+static int
+xmlDOMWrapNSNormAquireNormalizedNs(xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlNsPtr ns,
+ xmlNsPtr *retNs,
+ xmlNsMapPtr *nsMap,
+
+ int depth,
+ int ancestorsOnly,
+ int prefixed)
+{
+ xmlNsMapItemPtr mi;
+
+ if ((doc == NULL) || (ns == NULL) || (retNs == NULL) ||
+ (nsMap == NULL))
+ return (-1);
+
+ *retNs = NULL;
+ /*
+ * Handle XML namespace.
+ */
+ if (IS_STR_XML(ns->prefix)) {
+ /*
+ * Insert XML namespace mapping.
+ */
+ *retNs = xmlTreeEnsureXMLDecl(doc);
+ if (*retNs == NULL)
+ return (-1);
+ return (0);
+ }
+ /*
+ * If the search should be done in ancestors only and no
+ * @elem (the first ancestor) was specified, then skip the search.
+ */
+ if ((XML_NSMAP_NOTEMPTY(*nsMap)) &&
+ (! (ancestorsOnly && (elem == NULL))))
+ {
+ /*
+ * Try to find an equal ns-name in in-scope ns-decls.
+ */
+ XML_NSMAP_FOREACH(*nsMap, mi) {
+ if ((mi->depth >= XML_TREE_NSMAP_PARENT) &&
+ /*
+ * ancestorsOnly: This should be turned on to gain speed,
+ * if one knows that the branch itself was already
+ * ns-wellformed and no stale references existed.
+ * I.e. it searches in the ancestor axis only.
+ */
+ ((! ancestorsOnly) || (mi->depth == XML_TREE_NSMAP_PARENT)) &&
+ /* Skip shadowed prefixes. */
+ (mi->shadowDepth == -1) &&
+ /* Skip xmlns="" or xmlns:foo="". */
+ ((mi->newNs->href != NULL) &&
+ (mi->newNs->href[0] != 0)) &&
+ /* Ensure a prefix if wanted. */
+ ((! prefixed) || (mi->newNs->prefix != NULL)) &&
+ /* Equal ns name */
+ ((mi->newNs->href == ns->href) ||
+ xmlStrEqual(mi->newNs->href, ns->href))) {
+ /* Set the mapping. */
+ mi->oldNs = ns;
+ *retNs = mi->newNs;
+ return (0);
+ }
+ }
+ }
+ /*
+ * No luck, the namespace is out of scope or shadowed.
+ */
+ if (elem == NULL) {
+ xmlNsPtr tmpns;
+
+ /*
+ * Store ns-decls in "oldNs" of the document-node.
+ */
+ tmpns = xmlDOMWrapStoreNs(doc, ns->href, ns->prefix);
+ if (tmpns == NULL)
+ return (-1);
+ /*
+ * Insert mapping.
+ */
+ if (xmlDOMWrapNsMapAddItem(nsMap, -1, ns,
+ tmpns, XML_TREE_NSMAP_DOC) == NULL) {
+ xmlFreeNs(tmpns);
+ return (-1);
+ }
+ *retNs = tmpns;
+ } else {
+ xmlNsPtr tmpns;
+
+ tmpns = xmlDOMWrapNSNormDeclareNsForced(doc, elem, ns->href,
+ ns->prefix, 0);
+ if (tmpns == NULL)
+ return (-1);
+
+ if (*nsMap != NULL) {
+ /*
+ * Does it shadow ancestor ns-decls?
+ */
+ XML_NSMAP_FOREACH(*nsMap, mi) {
+ if ((mi->depth < depth) &&
+ (mi->shadowDepth == -1) &&
+ ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix, mi->newNs->prefix))) {
+ /*
+ * Shadows.
+ */
+ mi->shadowDepth = depth;
+ break;
+ }
+ }
+ }
+ if (xmlDOMWrapNsMapAddItem(nsMap, -1, ns, tmpns, depth) == NULL) {
+ xmlFreeNs(tmpns);
+ return (-1);
+ }
+ *retNs = tmpns;
+ }
+ return (0);
+}
+
+typedef enum {
+ XML_DOM_RECONNS_REMOVEREDUND = 1<<0
+} xmlDOMReconcileNSOptions;
+
+/*
+* xmlDOMWrapReconcileNamespaces:
+* @ctxt: DOM wrapper context, unused at the moment
+* @elem: the element-node
+* @options: option flags
+*
+* Ensures that ns-references point to ns-decls hold on element-nodes.
+* Ensures that the tree is namespace wellformed by creating additional
+* ns-decls where needed. Note that, since prefixes of already existent
+* ns-decls can be shadowed by this process, it could break QNames in
+* attribute values or element content.
+*
+* NOTE: This function was not intensively tested.
+*
+* Returns 0 if succeeded, -1 otherwise and on API/internal errors.
+*/
+
+int
+xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlNodePtr elem,
+ int options)
+{
+ int depth = -1, adoptns = 0, parnsdone = 0;
+ xmlNsPtr ns, prevns;
+ xmlDocPtr doc;
+ xmlNodePtr cur, curElem = NULL;
+ xmlNsMapPtr nsMap = NULL;
+ xmlNsMapItemPtr /* topmi = NULL, */ mi;
+ /* @ancestorsOnly should be set by an option flag. */
+ int ancestorsOnly = 0;
+ int optRemoveRedundantNS =
+ ((xmlDOMReconcileNSOptions) options & XML_DOM_RECONNS_REMOVEREDUND) ? 1 : 0;
+ xmlNsPtr *listRedund = NULL;
+ int sizeRedund = 0, nbRedund = 0, ret, i, j;
+
+ if ((elem == NULL) || (elem->doc == NULL) ||
+ (elem->type != XML_ELEMENT_NODE))
+ return (-1);
+
+ doc = elem->doc;
+ cur = elem;
+ do {
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ adoptns = 1;
+ curElem = cur;
+ depth++;
+ /*
+ * Namespace declarations.
+ */
+ if (cur->nsDef != NULL) {
+ prevns = NULL;
+ ns = cur->nsDef;
+ while (ns != NULL) {
+ if (! parnsdone) {
+ if ((elem->parent) &&
+ ((xmlNodePtr) elem->parent->doc != elem->parent)) {
+ /*
+ * Gather ancestor in-scope ns-decls.
+ */
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
+ elem->parent) == -1)
+ goto internal_error;
+ }
+ parnsdone = 1;
+ }
+
+ /*
+ * Lookup the ns ancestor-axis for equal ns-decls in scope.
+ */
+ if (optRemoveRedundantNS && XML_NSMAP_NOTEMPTY(nsMap)) {
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->depth >= XML_TREE_NSMAP_PARENT) &&
+ (mi->shadowDepth == -1) &&
+ ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix, mi->newNs->prefix)) &&
+ ((ns->href == mi->newNs->href) ||
+ xmlStrEqual(ns->href, mi->newNs->href)))
+ {
+ /*
+ * A redundant ns-decl was found.
+ * Add it to the list of redundant ns-decls.
+ */
+ if (xmlDOMWrapNSNormAddNsMapItem2(&listRedund,
+ &sizeRedund, &nbRedund, ns, mi->newNs) == -1)
+ goto internal_error;
+ /*
+ * Remove the ns-decl from the element-node.
+ */
+ if (prevns)
+ prevns->next = ns->next;
+ else
+ cur->nsDef = ns->next;
+ goto next_ns_decl;
+ }
+ }
+ }
+
+ /*
+ * Skip ns-references handling if the referenced
+ * ns-decl is declared on the same element.
+ */
+ if ((cur->ns != NULL) && adoptns && (cur->ns == ns))
+ adoptns = 0;
+ /*
+ * Does it shadow any ns-decl?
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->depth >= XML_TREE_NSMAP_PARENT) &&
+ (mi->shadowDepth == -1) &&
+ ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix, mi->newNs->prefix))) {
+
+ mi->shadowDepth = depth;
+ }
+ }
+ }
+ /*
+ * Push mapping.
+ */
+ if (xmlDOMWrapNsMapAddItem(&nsMap, -1, ns, ns,
+ depth) == NULL)
+ goto internal_error;
+
+ prevns = ns;
+next_ns_decl:
+ ns = ns->next;
+ }
+ }
+ if (! adoptns)
+ goto ns_end;
+ /* No break on purpose. */
+ case XML_ATTRIBUTE_NODE:
+ /* No ns, no fun. */
+ if (cur->ns == NULL)
+ goto ns_end;
+
+ if (! parnsdone) {
+ if ((elem->parent) &&
+ ((xmlNodePtr) elem->parent->doc != elem->parent)) {
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
+ elem->parent) == -1)
+ goto internal_error;
+ }
+ parnsdone = 1;
+ }
+ /*
+ * Adjust the reference if this was a redundant ns-decl.
+ */
+ if (listRedund) {
+ for (i = 0, j = 0; i < nbRedund; i++, j += 2) {
+ if (cur->ns == listRedund[j]) {
+ cur->ns = listRedund[++j];
+ break;
+ }
+ }
+ }
+ /*
+ * Adopt ns-references.
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Search for a mapping.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->shadowDepth == -1) &&
+ (cur->ns == mi->oldNs)) {
+
+ cur->ns = mi->newNs;
+ goto ns_end;
+ }
+ }
+ }
+ /*
+ * Aquire a normalized ns-decl and add it to the map.
+ */
+ if (xmlDOMWrapNSNormAquireNormalizedNs(doc, curElem,
+ cur->ns, &ns,
+ &nsMap, depth,
+ ancestorsOnly,
+ (cur->type == XML_ATTRIBUTE_NODE) ? 1 : 0) == -1)
+ goto internal_error;
+ cur->ns = ns;
+
+ns_end:
+ if ((cur->type == XML_ELEMENT_NODE) &&
+ (cur->properties != NULL)) {
+ /*
+ * Process attributes.
+ */
+ cur = (xmlNodePtr) cur->properties;
+ continue;
+ }
+ break;
+ default:
+ goto next_sibling;
+ }
+into_content:
+ if ((cur->type == XML_ELEMENT_NODE) &&
+ (cur->children != NULL)) {
+ /*
+ * Process content of element-nodes only.
+ */
+ cur = cur->children;
+ continue;
+ }
+next_sibling:
+ if (cur == elem)
+ break;
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Pop mappings.
+ */
+ while ((nsMap->last != NULL) &&
+ (nsMap->last->depth >= depth))
+ {
+ XML_NSMAP_POP(nsMap, mi)
+ }
+ /*
+ * Unshadow.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if (mi->shadowDepth >= depth)
+ mi->shadowDepth = -1;
+ }
+ }
+ depth--;
+ }
+ if (cur->next != NULL)
+ cur = cur->next;
+ else {
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ cur = cur->parent;
+ goto into_content;
+ }
+ cur = cur->parent;
+ goto next_sibling;
+ }
+ } while (cur != NULL);
+
+ ret = 0;
+ goto exit;
+internal_error:
+ ret = -1;
+exit:
+ if (listRedund) {
+ for (i = 0, j = 0; i < nbRedund; i++, j += 2) {
+ xmlFreeNs(listRedund[j]);
+ }
+ xmlFree(listRedund);
+ }
+ if (nsMap != NULL)
+ xmlDOMWrapNsMapFree(nsMap);
+ return (ret);
+}
+
+/*
+* xmlDOMWrapAdoptBranch:
+* @ctxt: the optional context for custom processing
+* @sourceDoc: the optional sourceDoc
+* @node: the element-node to start with
+* @destDoc: the destination doc for adoption
+* @destParent: the optional new parent of @node in @destDoc
+* @options: option flags
+*
+* Ensures that ns-references point to @destDoc: either to
+* elements->nsDef entries if @destParent is given, or to
+* @destDoc->oldNs otherwise.
+* If @destParent is given, it ensures that the tree is namespace
+* wellformed by creating additional ns-decls where needed.
+* Note that, since prefixes of already existent ns-decls can be
+* shadowed by this process, it could break QNames in attribute
+* values or element content.
+*
+* NOTE: This function was not intensively tested.
+*
+* Returns 0 if succeeded, -1 otherwise and on API/internal errors.
+*/
+static int
+xmlDOMWrapAdoptBranch(xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options ATTRIBUTE_UNUSED)
+{
+ int ret = 0;
+ xmlNodePtr cur, curElem = NULL;
+ xmlNsMapPtr nsMap = NULL;
+ xmlNsMapItemPtr mi;
+ xmlNsPtr ns = NULL;
+ int depth = -1, adoptStr = 1;
+ /* gather @parent's ns-decls. */
+ int parnsdone;
+ /* @ancestorsOnly should be set per option. */
+ int ancestorsOnly = 0;
+
+ /*
+ * Optimize string adoption for equal or none dicts.
+ */
+ if ((sourceDoc != NULL) &&
+ (sourceDoc->dict == destDoc->dict))
+ adoptStr = 0;
+ else
+ adoptStr = 1;
+
+ /*
+ * Get the ns-map from the context if available.
+ */
+ if (ctxt)
+ nsMap = (xmlNsMapPtr) ctxt->namespaceMap;
+ /*
+ * Disable search for ns-decls in the parent-axis of the
+ * desination element, if:
+ * 1) there's no destination parent
+ * 2) custom ns-reference handling is used
+ */
+ if ((destParent == NULL) ||
+ (ctxt && ctxt->getNsForNodeFunc))
+ {
+ parnsdone = 1;
+ } else
+ parnsdone = 0;
+
+ cur = node;
+ if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+ goto internal_error;
+
+ while (cur != NULL) {
+ /*
+ * Paranoid source-doc sanity check.
+ */
+ if (cur->doc != sourceDoc) {
+ /*
+ * We'll assume XIncluded nodes if the doc differs.
+ * TODO: Do we need to reconciliate XIncluded nodes?
+ * This here skips XIncluded nodes and tries to handle
+ * broken sequences.
+ */
+ if (cur->next == NULL)
+ goto leave_node;
+ do {
+ cur = cur->next;
+ if ((cur->type == XML_XINCLUDE_END) ||
+ (cur->doc == node->doc))
+ break;
+ } while (cur->next != NULL);
+
+ if (cur->doc != node->doc)
+ goto leave_node;
+ }
+ cur->doc = destDoc;
+ switch (cur->type) {
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ /*
+ * TODO
+ */
+ return (-1);
+ case XML_ELEMENT_NODE:
+ curElem = cur;
+ depth++;
+ /*
+ * Namespace declarations.
+ * - ns->href and ns->prefix are never in the dict, so
+ * we need not move the values over to the destination dict.
+ * - Note that for custom handling of ns-references,
+ * the ns-decls need not be stored in the ns-map,
+ * since they won't be referenced by node->ns.
+ */
+ if ((cur->nsDef) &&
+ ((ctxt == NULL) || (ctxt->getNsForNodeFunc == NULL)))
+ {
+ if (! parnsdone) {
+ /*
+ * Gather @parent's in-scope ns-decls.
+ */
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
+ destParent) == -1)
+ goto internal_error;
+ parnsdone = 1;
+ }
+ for (ns = cur->nsDef; ns != NULL; ns = ns->next) {
+ /*
+ * NOTE: ns->prefix and ns->href are never in the dict.
+ * XML_TREE_ADOPT_STR(ns->prefix)
+ * XML_TREE_ADOPT_STR(ns->href)
+ */
+ /*
+ * Does it shadow any ns-decl?
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->depth >= XML_TREE_NSMAP_PARENT) &&
+ (mi->shadowDepth == -1) &&
+ ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix,
+ mi->newNs->prefix))) {
+
+ mi->shadowDepth = depth;
+ }
+ }
+ }
+ /*
+ * Push mapping.
+ */
+ if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
+ ns, ns, depth) == NULL)
+ goto internal_error;
+ }
+ }
+ /* No break on purpose. */
+ case XML_ATTRIBUTE_NODE:
+ /* No namespace, no fun. */
+ if (cur->ns == NULL)
+ goto ns_end;
+
+ if (! parnsdone) {
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
+ destParent) == -1)
+ goto internal_error;
+ parnsdone = 1;
+ }
+ /*
+ * Adopt ns-references.
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Search for a mapping.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->shadowDepth == -1) &&
+ (cur->ns == mi->oldNs)) {
+
+ cur->ns = mi->newNs;
+ goto ns_end;
+ }
+ }
+ }
+ /*
+ * No matching namespace in scope. We need a new one.
+ */
+ if ((ctxt) && (ctxt->getNsForNodeFunc)) {
+ /*
+ * User-defined behaviour.
+ */
+ ns = ctxt->getNsForNodeFunc(ctxt, cur,
+ cur->ns->href, cur->ns->prefix);
+ /*
+ * Insert mapping if ns is available; it's the users fault
+ * if not.
+ */
+ if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
+ cur->ns, ns, XML_TREE_NSMAP_CUSTOM) == NULL)
+ goto internal_error;
+ cur->ns = ns;
+ } else {
+ /*
+ * Aquire a normalized ns-decl and add it to the map.
+ */
+ if (xmlDOMWrapNSNormAquireNormalizedNs(destDoc,
+ /* ns-decls on curElem or on destDoc->oldNs */
+ destParent ? curElem : NULL,
+ cur->ns, &ns,
+ &nsMap, depth,
+ ancestorsOnly,
+ /* ns-decls must be prefixed for attributes. */
+ (cur->type == XML_ATTRIBUTE_NODE) ? 1 : 0) == -1)
+ goto internal_error;
+ cur->ns = ns;
+ }
+ns_end:
+ /*
+ * Further node properties.
+ * TODO: Is this all?
+ */
+ XML_TREE_ADOPT_STR(cur->name)
+ if (cur->type == XML_ELEMENT_NODE) {
+ cur->psvi = NULL;
+ cur->line = 0;
+ cur->extra = 0;
+ /*
+ * Walk attributes.
+ */
+ if (cur->properties != NULL) {
+ /*
+ * Process first attribute node.
+ */
+ cur = (xmlNodePtr) cur->properties;
+ continue;
+ }
+ } else {
+ /*
+ * Attributes.
+ */
+ if ((sourceDoc != NULL) &&
+ (((xmlAttrPtr) cur)->atype == XML_ATTRIBUTE_ID))
+ {
+ xmlRemoveID(sourceDoc, (xmlAttrPtr) cur);
+ }
+ ((xmlAttrPtr) cur)->atype = 0;
+ ((xmlAttrPtr) cur)->psvi = NULL;
+ }
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ /*
+ * This puts the content in the dest dict, only if
+ * it was previously in the source dict.
+ */
+ XML_TREE_ADOPT_STR_2(cur->content)
+ goto leave_node;
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Remove reference to the entitity-node.
+ */
+ cur->content = NULL;
+ cur->children = NULL;
+ cur->last = NULL;
+ if ((destDoc->intSubset) || (destDoc->extSubset)) {
+ xmlEntityPtr ent;
+ /*
+ * Assign new entity-node if available.
+ */
+ ent = xmlGetDocEntity(destDoc, cur->name);
+ if (ent != NULL) {
+ cur->content = ent->content;
+ cur->children = (xmlNodePtr) ent;
+ cur->last = (xmlNodePtr) ent;
+ }
+ }
+ goto leave_node;
+ case XML_PI_NODE:
+ XML_TREE_ADOPT_STR(cur->name)
+ XML_TREE_ADOPT_STR_2(cur->content)
+ break;
+ case XML_COMMENT_NODE:
+ break;
+ default:
+ goto internal_error;
+ }
+ /*
+ * Walk the tree.
+ */
+ if (cur->children != NULL) {
+ cur = cur->children;
+ continue;
+ }
+
+leave_node:
+ if (cur == node)
+ break;
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END))
+ {
+ /*
+ * TODO: Do we expect nsDefs on XML_XINCLUDE_START?
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Pop mappings.
+ */
+ while ((nsMap->last != NULL) &&
+ (nsMap->last->depth >= depth))
+ {
+ XML_NSMAP_POP(nsMap, mi)
+ }
+ /*
+ * Unshadow.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if (mi->shadowDepth >= depth)
+ mi->shadowDepth = -1;
+ }
+ }
+ depth--;
+ }
+ if (cur->next != NULL)
+ cur = cur->next;
+ else if ((cur->type == XML_ATTRIBUTE_NODE) &&
+ (cur->parent->children != NULL))
+ {
+ cur = cur->parent->children;
+ } else {
+ cur = cur->parent;
+ goto leave_node;
+ }
+ }
+
+ goto exit;
+
+internal_error:
+ ret = -1;
+
+exit:
+ /*
+ * Cleanup.
+ */
+ if (nsMap != NULL) {
+ if ((ctxt) && (ctxt->namespaceMap == nsMap)) {
+ /*
+ * Just cleanup the map but don't free.
+ */
+ if (nsMap->first) {
+ if (nsMap->pool)
+ nsMap->last->next = nsMap->pool;
+ nsMap->pool = nsMap->first;
+ nsMap->first = NULL;
+ }
+ } else
+ xmlDOMWrapNsMapFree(nsMap);
+ }
+ return(ret);
+}
+
+/*
+* xmlDOMWrapCloneNode:
+* @ctxt: the optional context for custom processing
+* @sourceDoc: the optional sourceDoc
+* @node: the node to start with
+* @resNode: the clone of the given @node
+* @destDoc: the destination doc
+* @destParent: the optional new parent of @node in @destDoc
+* @deep: descend into child if set
+* @options: option flags
+*
+* References of out-of scope ns-decls are remapped to point to @destDoc:
+* 1) If @destParent is given, then nsDef entries on element-nodes are used
+* 2) If *no* @destParent is given, then @destDoc->oldNs entries are used.
+* This is the case when you don't know already where the cloned branch
+* will be added to.
+*
+* If @destParent is given, it ensures that the tree is namespace
+* wellformed by creating additional ns-decls where needed.
+* Note that, since prefixes of already existent ns-decls can be
+* shadowed by this process, it could break QNames in attribute
+* values or element content.
+* TODO:
+* 1) What to do with XInclude? Currently this returns an error for XInclude.
+*
+* Returns 0 if the operation succeeded,
+* 1 if a node of unsupported (or not yet supported) type was given,
+* -1 on API/internal errors.
+*/
+
+int
+xmlDOMWrapCloneNode(xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlNodePtr *resNode,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int deep,
+ int options ATTRIBUTE_UNUSED)
+{
+ int ret = 0;
+ xmlNodePtr cur, curElem = NULL;
+ xmlNsMapPtr nsMap = NULL;
+ xmlNsMapItemPtr mi;
+ xmlNsPtr ns;
+ int depth = -1;
+ /* int adoptStr = 1; */
+ /* gather @parent's ns-decls. */
+ int parnsdone = 0;
+ /*
+ * @ancestorsOnly:
+ * TODO: @ancestorsOnly should be set per option.
+ *
+ */
+ int ancestorsOnly = 0;
+ xmlNodePtr resultClone = NULL, clone = NULL, parentClone = NULL, prevClone = NULL;
+ xmlNsPtr cloneNs = NULL, *cloneNsDefSlot = NULL;
+ xmlDictPtr dict; /* The destination dict */
+
+ if ((node == NULL) || (resNode == NULL) || (destDoc == NULL))
+ return(-1);
+ /*
+ * TODO: Initially we support only element-nodes.
+ */
+ if (node->type != XML_ELEMENT_NODE)
+ return(1);
+ /*
+ * Check node->doc sanity.
+ */
+ if ((node->doc != NULL) && (sourceDoc != NULL) &&
+ (node->doc != sourceDoc)) {
+ /*
+ * Might be an XIncluded node.
+ */
+ return (-1);
+ }
+ if (sourceDoc == NULL)
+ sourceDoc = node->doc;
+ if (sourceDoc == NULL)
+ return (-1);
+
+ dict = destDoc->dict;
+ /*
+ * Reuse the namespace map of the context.
+ */
+ if (ctxt)
+ nsMap = (xmlNsMapPtr) ctxt->namespaceMap;
+
+ *resNode = NULL;
+
+ cur = node;
+ if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+ return(-1);
+
+ while (cur != NULL) {
+ if (cur->doc != sourceDoc) {
+ /*
+ * We'll assume XIncluded nodes if the doc differs.
+ * TODO: Do we need to reconciliate XIncluded nodes?
+ * TODO: This here returns -1 in this case.
+ */
+ goto internal_error;
+ }
+ /*
+ * Create a new node.
+ */
+ switch (cur->type) {
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ /*
+ * TODO: What to do with XInclude?
+ */
+ goto internal_error;
+ break;
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ /*
+ * Nodes of xmlNode structure.
+ */
+ clone = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (clone == NULL) {
+ xmlTreeErrMemory("xmlDOMWrapCloneNode(): allocating a node");
+ goto internal_error;
+ }
+ memset(clone, 0, sizeof(xmlNode));
+ /*
+ * Set hierachical links.
+ */
+ if (resultClone != NULL) {
+ clone->parent = parentClone;
+ if (prevClone) {
+ prevClone->next = clone;
+ clone->prev = prevClone;
+ } else
+ parentClone->children = clone;
+ } else
+ resultClone = clone;
+
+ break;
+ case XML_ATTRIBUTE_NODE:
+ /*
+ * Attributes (xmlAttr).
+ */
+ clone = (xmlNodePtr) xmlMalloc(sizeof(xmlAttr));
+ if (clone == NULL) {
+ xmlTreeErrMemory("xmlDOMWrapCloneNode(): allocating an attr-node");
+ goto internal_error;
+ }
+ memset(clone, 0, sizeof(xmlAttr));
+ /*
+ * Set hierachical links.
+ * TODO: Change this to add to the end of attributes.
+ */
+ if (resultClone != NULL) {
+ clone->parent = parentClone;
+ if (prevClone) {
+ prevClone->next = clone;
+ clone->prev = prevClone;
+ } else
+ parentClone->properties = (xmlAttrPtr) clone;
+ } else
+ resultClone = clone;
+ break;
+ default:
+ /*
+ * TODO QUESTION: Any other nodes expected?
+ */
+ goto internal_error;
+ }
+
+ clone->type = cur->type;
+ clone->doc = destDoc;
+
+ /*
+ * Clone the name of the node if any.
+ */
+ if (cur->name == xmlStringText)
+ clone->name = xmlStringText;
+ else if (cur->name == xmlStringTextNoenc)
+ /*
+ * NOTE: Although xmlStringTextNoenc is never assigned to a node
+ * in tree.c, it might be set in Libxslt via
+ * "xsl:disable-output-escaping".
+ */
+ clone->name = xmlStringTextNoenc;
+ else if (cur->name == xmlStringComment)
+ clone->name = xmlStringComment;
+ else if (cur->name != NULL) {
+ DICT_CONST_COPY(cur->name, clone->name);
+ }
+
+ switch (cur->type) {
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ /*
+ * TODO
+ */
+ return (-1);
+ case XML_ELEMENT_NODE:
+ curElem = cur;
+ depth++;
+ /*
+ * Namespace declarations.
+ */
+ if (cur->nsDef != NULL) {
+ if (! parnsdone) {
+ if (destParent && (ctxt == NULL)) {
+ /*
+ * Gather @parent's in-scope ns-decls.
+ */
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap,
+ destParent) == -1)
+ goto internal_error;
+ }
+ parnsdone = 1;
+ }
+ /*
+ * Clone namespace declarations.
+ */
+ cloneNsDefSlot = &(clone->nsDef);
+ for (ns = cur->nsDef; ns != NULL; ns = ns->next) {
+ /*
+ * Create a new xmlNs.
+ */
+ cloneNs = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (cloneNs == NULL) {
+ xmlTreeErrMemory("xmlDOMWrapCloneNode(): "
+ "allocating namespace");
+ return(-1);
+ }
+ memset(cloneNs, 0, sizeof(xmlNs));
+ cloneNs->type = XML_LOCAL_NAMESPACE;
+
+ if (ns->href != NULL)
+ cloneNs->href = xmlStrdup(ns->href);
+ if (ns->prefix != NULL)
+ cloneNs->prefix = xmlStrdup(ns->prefix);
+
+ *cloneNsDefSlot = cloneNs;
+ cloneNsDefSlot = &(cloneNs->next);
+
+ /*
+ * Note that for custom handling of ns-references,
+ * the ns-decls need not be stored in the ns-map,
+ * since they won't be referenced by node->ns.
+ */
+ if ((ctxt == NULL) ||
+ (ctxt->getNsForNodeFunc == NULL))
+ {
+ /*
+ * Does it shadow any ns-decl?
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->depth >= XML_TREE_NSMAP_PARENT) &&
+ (mi->shadowDepth == -1) &&
+ ((ns->prefix == mi->newNs->prefix) ||
+ xmlStrEqual(ns->prefix,
+ mi->newNs->prefix))) {
+ /*
+ * Mark as shadowed at the current
+ * depth.
+ */
+ mi->shadowDepth = depth;
+ }
+ }
+ }
+ /*
+ * Push mapping.
+ */
+ if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
+ ns, cloneNs, depth) == NULL)
+ goto internal_error;
+ }
+ }
+ }
+ /* cur->ns will be processed further down. */
+ break;
+ case XML_ATTRIBUTE_NODE:
+ /* IDs will be processed further down. */
+ /* cur->ns will be processed further down. */
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ /*
+ * Note that this will also cover the values of attributes.
+ */
+ DICT_COPY(cur->content, clone->content);
+ goto leave_node;
+ case XML_ENTITY_NODE:
+ /* TODO: What to do here? */
+ goto leave_node;
+ case XML_ENTITY_REF_NODE:
+ if (sourceDoc != destDoc) {
+ if ((destDoc->intSubset) || (destDoc->extSubset)) {
+ xmlEntityPtr ent;
+ /*
+ * Different doc: Assign new entity-node if available.
+ */
+ ent = xmlGetDocEntity(destDoc, cur->name);
+ if (ent != NULL) {
+ clone->content = ent->content;
+ clone->children = (xmlNodePtr) ent;
+ clone->last = (xmlNodePtr) ent;
+ }
+ }
+ } else {
+ /*
+ * Same doc: Use the current node's entity declaration
+ * and value.
+ */
+ clone->content = cur->content;
+ clone->children = cur->children;
+ clone->last = cur->last;
+ }
+ goto leave_node;
+ case XML_PI_NODE:
+ DICT_COPY(cur->content, clone->content);
+ goto leave_node;
+ case XML_COMMENT_NODE:
+ DICT_COPY(cur->content, clone->content);
+ goto leave_node;
+ default:
+ goto internal_error;
+ }
+
+ if (cur->ns == NULL)
+ goto end_ns_reference;
+
+/* handle_ns_reference: */
+ /*
+ ** The following will take care of references to ns-decls ********
+ ** and is intended only for element- and attribute-nodes.
+ **
+ */
+ if (! parnsdone) {
+ if (destParent && (ctxt == NULL)) {
+ if (xmlDOMWrapNSNormGatherInScopeNs(&nsMap, destParent) == -1)
+ goto internal_error;
+ }
+ parnsdone = 1;
+ }
+ /*
+ * Adopt ns-references.
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Search for a mapping.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if ((mi->shadowDepth == -1) &&
+ (cur->ns == mi->oldNs)) {
+ /*
+ * This is the nice case: a mapping was found.
+ */
+ clone->ns = mi->newNs;
+ goto end_ns_reference;
+ }
+ }
+ }
+ /*
+ * No matching namespace in scope. We need a new one.
+ */
+ if ((ctxt != NULL) && (ctxt->getNsForNodeFunc != NULL)) {
+ /*
+ * User-defined behaviour.
+ */
+ ns = ctxt->getNsForNodeFunc(ctxt, cur,
+ cur->ns->href, cur->ns->prefix);
+ /*
+ * Add user's mapping.
+ */
+ if (xmlDOMWrapNsMapAddItem(&nsMap, -1,
+ cur->ns, ns, XML_TREE_NSMAP_CUSTOM) == NULL)
+ goto internal_error;
+ clone->ns = ns;
+ } else {
+ /*
+ * Aquire a normalized ns-decl and add it to the map.
+ */
+ if (xmlDOMWrapNSNormAquireNormalizedNs(destDoc,
+ /* ns-decls on curElem or on destDoc->oldNs */
+ destParent ? curElem : NULL,
+ cur->ns, &ns,
+ &nsMap, depth,
+ /* if we need to search only in the ancestor-axis */
+ ancestorsOnly,
+ /* ns-decls must be prefixed for attributes. */
+ (cur->type == XML_ATTRIBUTE_NODE) ? 1 : 0) == -1)
+ goto internal_error;
+ clone->ns = ns;
+ }
+
+end_ns_reference:
+
+ /*
+ * Some post-processing.
+ *
+ * Handle ID attributes.
+ */
+ if ((clone->type == XML_ATTRIBUTE_NODE) &&
+ (clone->parent != NULL))
+ {
+ if (xmlIsID(destDoc, clone->parent, (xmlAttrPtr) clone)) {
+
+ xmlChar *idVal;
+
+ idVal = xmlNodeListGetString(cur->doc, cur->children, 1);
+ if (idVal != NULL) {
+ if (xmlAddID(NULL, destDoc, idVal, (xmlAttrPtr) cur) == NULL) {
+ /* TODO: error message. */
+ xmlFree(idVal);
+ goto internal_error;
+ }
+ xmlFree(idVal);
+ }
+ }
+ }
+ /*
+ **
+ ** The following will traverse the tree **************************
+ **
+ *
+ * Walk the element's attributes before descending into child-nodes.
+ */
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->properties != NULL)) {
+ prevClone = NULL;
+ parentClone = clone;
+ cur = (xmlNodePtr) cur->properties;
+ continue;
+ }
+into_content:
+ /*
+ * Descend into child-nodes.
+ */
+ if (cur->children != NULL) {
+ if (deep || (cur->type == XML_ATTRIBUTE_NODE)) {
+ prevClone = NULL;
+ parentClone = clone;
+ cur = cur->children;
+ continue;
+ }
+ }
+
+leave_node:
+ /*
+ * At this point we are done with the node, its content
+ * and an element-nodes's attribute-nodes.
+ */
+ if (cur == node)
+ break;
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) {
+ /*
+ * TODO: Do we expect nsDefs on XML_XINCLUDE_START?
+ */
+ if (XML_NSMAP_NOTEMPTY(nsMap)) {
+ /*
+ * Pop mappings.
+ */
+ while ((nsMap->last != NULL) &&
+ (nsMap->last->depth >= depth))
+ {
+ XML_NSMAP_POP(nsMap, mi)
+ }
+ /*
+ * Unshadow.
+ */
+ XML_NSMAP_FOREACH(nsMap, mi) {
+ if (mi->shadowDepth >= depth)
+ mi->shadowDepth = -1;
+ }
+ }
+ depth--;
+ }
+ if (cur->next != NULL) {
+ prevClone = clone;
+ cur = cur->next;
+ } else if (cur->type != XML_ATTRIBUTE_NODE) {
+ /*
+ * Set clone->last.
+ */
+ if (clone->parent != NULL)
+ clone->parent->last = clone;
+ clone = clone->parent;
+ if (clone != NULL)
+ parentClone = clone->parent;
+ /*
+ * Process parent --> next;
+ */
+ cur = cur->parent;
+ goto leave_node;
+ } else {
+ /* This is for attributes only. */
+ clone = clone->parent;
+ parentClone = clone->parent;
+ /*
+ * Process parent-element --> children.
+ */
+ cur = cur->parent;
+ goto into_content;
+ }
+ }
+ goto exit;
+
+internal_error:
+ ret = -1;
+
+exit:
+ /*
+ * Cleanup.
+ */
+ if (nsMap != NULL) {
+ if ((ctxt) && (ctxt->namespaceMap == nsMap)) {
+ /*
+ * Just cleanup the map but don't free.
+ */
+ if (nsMap->first) {
+ if (nsMap->pool)
+ nsMap->last->next = nsMap->pool;
+ nsMap->pool = nsMap->first;
+ nsMap->first = NULL;
+ }
+ } else
+ xmlDOMWrapNsMapFree(nsMap);
+ }
+ /*
+ * TODO: Should we try a cleanup of the cloned node in case of a
+ * fatal error?
+ */
+ *resNode = resultClone;
+ return (ret);
+}
+
+/*
+* xmlDOMWrapAdoptAttr:
+* @ctxt: the optional context for custom processing
+* @sourceDoc: the optional source document of attr
+* @attr: the attribute-node to be adopted
+* @destDoc: the destination doc for adoption
+* @destParent: the optional new parent of @attr in @destDoc
+* @options: option flags
+*
+* @attr is adopted by @destDoc.
+* Ensures that ns-references point to @destDoc: either to
+* elements->nsDef entries if @destParent is given, or to
+* @destDoc->oldNs otherwise.
+*
+* Returns 0 if succeeded, -1 otherwise and on API/internal errors.
+*/
+static int
+xmlDOMWrapAdoptAttr(xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlAttrPtr attr,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options ATTRIBUTE_UNUSED)
+{
+ xmlNodePtr cur;
+ int adoptStr = 1;
+
+ if ((attr == NULL) || (destDoc == NULL))
+ return (-1);
+
+ attr->doc = destDoc;
+ if (attr->ns != NULL) {
+ xmlNsPtr ns = NULL;
+
+ if (ctxt != NULL) {
+ /* TODO: User defined. */
+ }
+ /* XML Namespace. */
+ if (IS_STR_XML(attr->ns->prefix)) {
+ ns = xmlTreeEnsureXMLDecl(destDoc);
+ } else if (destParent == NULL) {
+ /*
+ * Store in @destDoc->oldNs.
+ */
+ ns = xmlDOMWrapStoreNs(destDoc, attr->ns->href, attr->ns->prefix);
+ } else {
+ /*
+ * Declare on @destParent.
+ */
+ if (xmlSearchNsByNamespaceStrict(destDoc, destParent, attr->ns->href,
+ &ns, 1) == -1)
+ goto internal_error;
+ if (ns == NULL) {
+ ns = xmlDOMWrapNSNormDeclareNsForced(destDoc, destParent,
+ attr->ns->href, attr->ns->prefix, 1);
+ }
+ }
+ if (ns == NULL)
+ goto internal_error;
+ attr->ns = ns;
+ }
+
+ XML_TREE_ADOPT_STR(attr->name);
+ attr->atype = 0;
+ attr->psvi = NULL;
+ /*
+ * Walk content.
+ */
+ if (attr->children == NULL)
+ return (0);
+ cur = attr->children;
+ if ((cur != NULL) && (cur->type == XML_NAMESPACE_DECL))
+ goto internal_error;
+ while (cur != NULL) {
+ cur->doc = destDoc;
+ switch (cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ XML_TREE_ADOPT_STR_2(cur->content)
+ break;
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Remove reference to the entitity-node.
+ */
+ cur->content = NULL;
+ cur->children = NULL;
+ cur->last = NULL;
+ if ((destDoc->intSubset) || (destDoc->extSubset)) {
+ xmlEntityPtr ent;
+ /*
+ * Assign new entity-node if available.
+ */
+ ent = xmlGetDocEntity(destDoc, cur->name);
+ if (ent != NULL) {
+ cur->content = ent->content;
+ cur->children = (xmlNodePtr) ent;
+ cur->last = (xmlNodePtr) ent;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ if (cur->children != NULL) {
+ cur = cur->children;
+ continue;
+ }
+next_sibling:
+ if (cur == (xmlNodePtr) attr)
+ break;
+ if (cur->next != NULL)
+ cur = cur->next;
+ else {
+ cur = cur->parent;
+ goto next_sibling;
+ }
+ }
+ return (0);
+internal_error:
+ return (-1);
+}
+
+/*
+* xmlDOMWrapAdoptNode:
+* @ctxt: the optional context for custom processing
+* @sourceDoc: the optional sourceDoc
+* @node: the node to start with
+* @destDoc: the destination doc
+* @destParent: the optional new parent of @node in @destDoc
+* @options: option flags
+*
+* References of out-of scope ns-decls are remapped to point to @destDoc:
+* 1) If @destParent is given, then nsDef entries on element-nodes are used
+* 2) If *no* @destParent is given, then @destDoc->oldNs entries are used
+* This is the case when you have an unlinked node and just want to move it
+* to the context of
+*
+* If @destParent is given, it ensures that the tree is namespace
+* wellformed by creating additional ns-decls where needed.
+* Note that, since prefixes of already existent ns-decls can be
+* shadowed by this process, it could break QNames in attribute
+* values or element content.
+* NOTE: This function was not intensively tested.
+*
+* Returns 0 if the operation succeeded,
+* 1 if a node of unsupported type was given,
+* 2 if a node of not yet supported type was given and
+* -1 on API/internal errors.
+*/
+int
+xmlDOMWrapAdoptNode(xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options)
+{
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) ||
+ (destDoc == NULL) ||
+ ((destParent != NULL) && (destParent->doc != destDoc)))
+ return(-1);
+ /*
+ * Check node->doc sanity.
+ */
+ if ((node->doc != NULL) && (sourceDoc != NULL) &&
+ (node->doc != sourceDoc)) {
+ /*
+ * Might be an XIncluded node.
+ */
+ return (-1);
+ }
+ if (sourceDoc == NULL)
+ sourceDoc = node->doc;
+ if (sourceDoc == destDoc)
+ return (-1);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ /* TODO: Support document-fragment-nodes. */
+ return (2);
+ default:
+ return (1);
+ }
+ /*
+ * Unlink only if @node was not already added to @destParent.
+ */
+ if ((node->parent != NULL) && (destParent != node->parent))
+ xmlUnlinkNode(node);
+
+ if (node->type == XML_ELEMENT_NODE) {
+ return (xmlDOMWrapAdoptBranch(ctxt, sourceDoc, node,
+ destDoc, destParent, options));
+ } else if (node->type == XML_ATTRIBUTE_NODE) {
+ return (xmlDOMWrapAdoptAttr(ctxt, sourceDoc,
+ (xmlAttrPtr) node, destDoc, destParent, options));
+ } else {
+ xmlNodePtr cur = node;
+ int adoptStr = 1;
+
+ cur->doc = destDoc;
+ /*
+ * Optimize string adoption.
+ */
+ if ((sourceDoc != NULL) &&
+ (sourceDoc->dict == destDoc->dict))
+ adoptStr = 0;
+ switch (node->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ XML_TREE_ADOPT_STR_2(node->content)
+ break;
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Remove reference to the entitity-node.
+ */
+ node->content = NULL;
+ node->children = NULL;
+ node->last = NULL;
+ if ((destDoc->intSubset) || (destDoc->extSubset)) {
+ xmlEntityPtr ent;
+ /*
+ * Assign new entity-node if available.
+ */
+ ent = xmlGetDocEntity(destDoc, node->name);
+ if (ent != NULL) {
+ node->content = ent->content;
+ node->children = (xmlNodePtr) ent;
+ node->last = (xmlNodePtr) ent;
+ }
+ }
+ XML_TREE_ADOPT_STR(node->name)
+ break;
+ case XML_PI_NODE: {
+ XML_TREE_ADOPT_STR(node->name)
+ XML_TREE_ADOPT_STR_2(node->content)
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ return (0);
+}
+
+#define bottom_tree
+#include "elfgcchack.h"
diff --git a/trio.c b/trio.c
new file mode 100644
index 0000000..c8b9c84
--- /dev/null
+++ b/trio.c
@@ -0,0 +1,6895 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ *************************************************************************
+ *
+ * A note to trio contributors:
+ *
+ * Avoid heap allocation at all costs to ensure that the trio functions
+ * are async-safe. The exceptions are the printf/fprintf functions, which
+ * uses fputc, and the asprintf functions and the <alloc> modifier, which
+ * by design are required to allocate form the heap.
+ *
+ ************************************************************************/
+
+/*
+ * TODO:
+ * - Scan is probably too permissive about its modifiers.
+ * - C escapes in %#[] ?
+ * - Multibyte characters (done for format parsing, except scan groups)
+ * - Complex numbers? (C99 _Complex)
+ * - Boolean values? (C99 _Bool)
+ * - C99 NaN(n-char-sequence) missing. The n-char-sequence can be used
+ * to print the mantissa, e.g. NaN(0xc000000000000000)
+ * - Should we support the GNU %a alloc modifier? GNU has an ugly hack
+ * for %a, because C99 used %a for other purposes. If specified as
+ * %as or %a[ it is interpreted as the alloc modifier, otherwise as
+ * the C99 hex-float. This means that you cannot scan %as as a hex-float
+ * immediately followed by an 's'.
+ * - Scanning of collating symbols.
+ */
+
+/*************************************************************************
+ * Trio include files
+ */
+#include "triodef.h"
+#include "trio.h"
+#include "triop.h"
+#include "trionan.h"
+#if !defined(TRIO_MINIMAL)
+# include "triostr.h"
+#endif
+
+/**************************************************************************
+ *
+ * Definitions
+ *
+ *************************************************************************/
+
+#include <math.h>
+#include <limits.h>
+#include <float.h>
+
+#if (defined(__STDC_ISO_10646__) || defined(MB_LEN_MAX) \
+ || defined(USE_MULTIBYTE) || TRIO_WIDECHAR) \
+ && !defined(_WIN32_WCE)
+# define TRIO_COMPILER_SUPPORTS_MULTIBYTE
+# if !defined(MB_LEN_MAX)
+# define MB_LEN_MAX 6
+# endif
+#endif
+
+#if (defined(TRIO_COMPILER_MSVC) && (_MSC_VER >= 1100)) || defined(TRIO_COMPILER_BCB)
+# define TRIO_COMPILER_SUPPORTS_MSVC_INT
+#endif
+
+#if defined(_WIN32_WCE)
+#include <wincecompat.h>
+#endif
+
+/*************************************************************************
+ * Generic definitions
+ */
+
+#if !(defined(DEBUG) || defined(NDEBUG))
+# define NDEBUG
+#endif
+
+#include <assert.h>
+#include <ctype.h>
+#if !defined(TRIO_COMPILER_SUPPORTS_C99)
+# define isblank(x) (((x)==32) || ((x)==9))
+#endif
+#if defined(TRIO_COMPILER_ANCIENT)
+# include <varargs.h>
+#else
+# include <stdarg.h>
+#endif
+#include <stddef.h>
+
+#if defined( HAVE_ERRNO_H ) || defined( __VMS )
+#include <errno.h>
+#endif
+
+#ifndef NULL
+# define NULL 0
+#endif
+#define NIL ((char)0)
+#ifndef FALSE
+# define FALSE (1 == 0)
+# define TRUE (! FALSE)
+#endif
+#define BOOLEAN_T int
+
+/* mincore() can be used for debugging purposes */
+#define VALID(x) (NULL != (x))
+
+#if TRIO_ERRORS
+ /*
+ * Encode the error code and the position. This is decoded
+ * with TRIO_ERROR_CODE and TRIO_ERROR_POSITION.
+ */
+# define TRIO_ERROR_RETURN(x,y) (- ((x) + ((y) << 8)))
+#else
+# define TRIO_ERROR_RETURN(x,y) (-1)
+#endif
+
+#ifndef VA_LIST_IS_ARRAY
+#define TRIO_VA_LIST_PTR va_list *
+#define TRIO_VA_LIST_ADDR(l) (&(l))
+#define TRIO_VA_LIST_DEREF(l) (*(l))
+#else
+#define TRIO_VA_LIST_PTR va_list
+#define TRIO_VA_LIST_ADDR(l) (l)
+#define TRIO_VA_LIST_DEREF(l) (l)
+#endif
+
+typedef unsigned long trio_flags_t;
+
+
+/*************************************************************************
+ * Platform specific definitions
+ */
+#if defined(TRIO_PLATFORM_UNIX) || defined(TRIO_PLATFORM_OS400)
+# include <unistd.h>
+# include <signal.h>
+# include <locale.h>
+# define USE_LOCALE
+#endif /* TRIO_PLATFORM_UNIX */
+#if defined(TRIO_PLATFORM_VMS)
+# include <unistd.h>
+#endif
+#if defined(TRIO_PLATFORM_WIN32)
+# if defined(_WIN32_WCE)
+# include <wincecompat.h>
+# else
+# include <io.h>
+# define read _read
+# define write _write
+# endif
+#endif /* TRIO_PLATFORM_WIN32 */
+
+#if TRIO_WIDECHAR
+# if defined(TRIO_COMPILER_SUPPORTS_ISO94)
+# include <wchar.h>
+# include <wctype.h>
+typedef wchar_t trio_wchar_t;
+typedef wint_t trio_wint_t;
+# else
+typedef char trio_wchar_t;
+typedef int trio_wint_t;
+# define WCONST(x) L ## x
+# define WEOF EOF
+# define iswalnum(x) isalnum(x)
+# define iswalpha(x) isalpha(x)
+# define iswblank(x) isblank(x)
+# define iswcntrl(x) iscntrl(x)
+# define iswdigit(x) isdigit(x)
+# define iswgraph(x) isgraph(x)
+# define iswlower(x) islower(x)
+# define iswprint(x) isprint(x)
+# define iswpunct(x) ispunct(x)
+# define iswspace(x) isspace(x)
+# define iswupper(x) isupper(x)
+# define iswxdigit(x) isxdigit(x)
+# endif
+#endif
+
+
+/*************************************************************************
+ * Compiler dependent definitions
+ */
+
+/* Support for long long */
+#ifndef __cplusplus
+# if !defined(USE_LONGLONG)
+# if defined(TRIO_COMPILER_GCC) && !defined(__STRICT_ANSI__)
+# define USE_LONGLONG
+# elif defined(TRIO_COMPILER_SUNPRO)
+# define USE_LONGLONG
+# elif defined(_LONG_LONG) || defined(_LONGLONG)
+# define USE_LONGLONG
+# endif
+# endif
+#endif
+
+/* The extra long numbers */
+#if defined(USE_LONGLONG)
+typedef signed long long int trio_longlong_t;
+typedef unsigned long long int trio_ulonglong_t;
+#elif defined(TRIO_COMPILER_SUPPORTS_MSVC_INT)
+typedef signed __int64 trio_longlong_t;
+typedef unsigned __int64 trio_ulonglong_t;
+#else
+typedef TRIO_SIGNED long int trio_longlong_t;
+typedef unsigned long int trio_ulonglong_t;
+#endif
+
+/* Maximal and fixed integer types */
+#if defined(TRIO_COMPILER_SUPPORTS_C99) && !defined( __VMS )
+# include <stdint.h>
+typedef intmax_t trio_intmax_t;
+typedef uintmax_t trio_uintmax_t;
+typedef int8_t trio_int8_t;
+typedef int16_t trio_int16_t;
+typedef int32_t trio_int32_t;
+typedef int64_t trio_int64_t;
+#elif defined(TRIO_COMPILER_SUPPORTS_UNIX98) || defined( __VMS )
+# include <inttypes.h>
+#ifdef __VMS
+typedef long long int intmax_t;
+typedef unsigned long long int uintmax_t;
+#endif
+typedef intmax_t trio_intmax_t;
+typedef uintmax_t trio_uintmax_t;
+typedef int8_t trio_int8_t;
+typedef int16_t trio_int16_t;
+typedef int32_t trio_int32_t;
+typedef int64_t trio_int64_t;
+#elif defined(TRIO_COMPILER_SUPPORTS_MSVC_INT)
+typedef trio_longlong_t trio_intmax_t;
+typedef trio_ulonglong_t trio_uintmax_t;
+typedef __int8 trio_int8_t;
+typedef __int16 trio_int16_t;
+typedef __int32 trio_int32_t;
+typedef __int64 trio_int64_t;
+#else
+typedef trio_longlong_t trio_intmax_t;
+typedef trio_ulonglong_t trio_uintmax_t;
+# if defined(TRIO_INT8_T)
+typedef TRIO_INT8_T trio_int8_t;
+# else
+typedef TRIO_SIGNED char trio_int8_t;
+# endif
+# if defined(TRIO_INT16_T)
+typedef TRIO_INT16_T trio_int16_t;
+# else
+typedef TRIO_SIGNED short trio_int16_t;
+# endif
+# if defined(TRIO_INT32_T)
+typedef TRIO_INT32_T trio_int32_t;
+# else
+typedef TRIO_SIGNED int trio_int32_t;
+# endif
+# if defined(TRIO_INT64_T)
+typedef TRIO_INT64_T trio_int64_t;
+# else
+typedef trio_longlong_t trio_int64_t;
+# endif
+#endif
+
+#if (!(defined(TRIO_COMPILER_SUPPORTS_C99) \
+ || defined(TRIO_COMPILER_SUPPORTS_UNIX01))) \
+ && !defined(_WIN32_WCE)
+# define floorl(x) floor((double)(x))
+# define fmodl(x,y) fmod((double)(x),(double)(y))
+# define powl(x,y) pow((double)(x),(double)(y))
+#endif
+
+#define TRIO_FABS(x) (((x) < 0.0) ? -(x) : (x))
+
+/*************************************************************************
+ * Internal Definitions
+ */
+
+#ifndef DECIMAL_DIG
+# define DECIMAL_DIG DBL_DIG
+#endif
+
+/* Long double sizes */
+#ifdef LDBL_DIG
+# define MAX_MANTISSA_DIGITS LDBL_DIG
+# define MAX_EXPONENT_DIGITS 4
+# define MAX_DOUBLE_DIGITS LDBL_MAX_10_EXP
+#else
+# define MAX_MANTISSA_DIGITS DECIMAL_DIG
+# define MAX_EXPONENT_DIGITS 3
+# define MAX_DOUBLE_DIGITS DBL_MAX_10_EXP
+#endif
+
+#if defined(TRIO_COMPILER_ANCIENT) || !defined(LDBL_DIG)
+# undef LDBL_DIG
+# undef LDBL_MANT_DIG
+# undef LDBL_EPSILON
+# define LDBL_DIG DBL_DIG
+# define LDBL_MANT_DIG DBL_MANT_DIG
+# define LDBL_EPSILON DBL_EPSILON
+#endif
+
+/* The maximal number of digits is for base 2 */
+#define MAX_CHARS_IN(x) (sizeof(x) * CHAR_BIT)
+/* The width of a pointer. The number of bits in a hex digit is 4 */
+#define POINTER_WIDTH ((sizeof("0x") - 1) + sizeof(trio_pointer_t) * CHAR_BIT / 4)
+
+/* Infinite and Not-A-Number for floating-point */
+#define INFINITE_LOWER "inf"
+#define INFINITE_UPPER "INF"
+#define LONG_INFINITE_LOWER "infinite"
+#define LONG_INFINITE_UPPER "INFINITE"
+#define NAN_LOWER "nan"
+#define NAN_UPPER "NAN"
+
+#if !defined(HAVE_ISASCII) && !defined(isascii)
+#ifndef __VMS
+# define isascii(x) ((unsigned int)(x) < 128)
+#endif
+#endif
+
+/* Various constants */
+enum {
+ TYPE_PRINT = 1,
+ TYPE_SCAN = 2,
+
+ /* Flags. FLAGS_LAST must be less than ULONG_MAX */
+ FLAGS_NEW = 0,
+ FLAGS_STICKY = 1,
+ FLAGS_SPACE = 2 * FLAGS_STICKY,
+ FLAGS_SHOWSIGN = 2 * FLAGS_SPACE,
+ FLAGS_LEFTADJUST = 2 * FLAGS_SHOWSIGN,
+ FLAGS_ALTERNATIVE = 2 * FLAGS_LEFTADJUST,
+ FLAGS_SHORT = 2 * FLAGS_ALTERNATIVE,
+ FLAGS_SHORTSHORT = 2 * FLAGS_SHORT,
+ FLAGS_LONG = 2 * FLAGS_SHORTSHORT,
+ FLAGS_QUAD = 2 * FLAGS_LONG,
+ FLAGS_LONGDOUBLE = 2 * FLAGS_QUAD,
+ FLAGS_SIZE_T = 2 * FLAGS_LONGDOUBLE,
+ FLAGS_PTRDIFF_T = 2 * FLAGS_SIZE_T,
+ FLAGS_INTMAX_T = 2 * FLAGS_PTRDIFF_T,
+ FLAGS_NILPADDING = 2 * FLAGS_INTMAX_T,
+ FLAGS_UNSIGNED = 2 * FLAGS_NILPADDING,
+ FLAGS_UPPER = 2 * FLAGS_UNSIGNED,
+ FLAGS_WIDTH = 2 * FLAGS_UPPER,
+ FLAGS_WIDTH_PARAMETER = 2 * FLAGS_WIDTH,
+ FLAGS_PRECISION = 2 * FLAGS_WIDTH_PARAMETER,
+ FLAGS_PRECISION_PARAMETER = 2 * FLAGS_PRECISION,
+ FLAGS_BASE = 2 * FLAGS_PRECISION_PARAMETER,
+ FLAGS_BASE_PARAMETER = 2 * FLAGS_BASE,
+ FLAGS_FLOAT_E = 2 * FLAGS_BASE_PARAMETER,
+ FLAGS_FLOAT_G = 2 * FLAGS_FLOAT_E,
+ FLAGS_QUOTE = 2 * FLAGS_FLOAT_G,
+ FLAGS_WIDECHAR = 2 * FLAGS_QUOTE,
+ FLAGS_ALLOC = 2 * FLAGS_WIDECHAR,
+ FLAGS_IGNORE = 2 * FLAGS_ALLOC,
+ FLAGS_IGNORE_PARAMETER = 2 * FLAGS_IGNORE,
+ FLAGS_VARSIZE_PARAMETER = 2 * FLAGS_IGNORE_PARAMETER,
+ FLAGS_FIXED_SIZE = 2 * FLAGS_VARSIZE_PARAMETER,
+ FLAGS_LAST = FLAGS_FIXED_SIZE,
+ /* Reused flags */
+ FLAGS_EXCLUDE = FLAGS_SHORT,
+ FLAGS_USER_DEFINED = FLAGS_IGNORE,
+ FLAGS_ROUNDING = FLAGS_INTMAX_T,
+ /* Compounded flags */
+ FLAGS_ALL_VARSIZES = FLAGS_LONG | FLAGS_QUAD | FLAGS_INTMAX_T | FLAGS_PTRDIFF_T | FLAGS_SIZE_T,
+ FLAGS_ALL_SIZES = FLAGS_ALL_VARSIZES | FLAGS_SHORTSHORT | FLAGS_SHORT,
+
+ NO_POSITION = -1,
+ NO_WIDTH = 0,
+ NO_PRECISION = -1,
+ NO_SIZE = -1,
+
+ /* Do not change these */
+ NO_BASE = -1,
+ MIN_BASE = 2,
+ MAX_BASE = 36,
+ BASE_BINARY = 2,
+ BASE_OCTAL = 8,
+ BASE_DECIMAL = 10,
+ BASE_HEX = 16,
+
+ /* Maximal number of allowed parameters */
+ MAX_PARAMETERS = 64,
+ /* Maximal number of characters in class */
+ MAX_CHARACTER_CLASS = UCHAR_MAX + 1,
+
+ /* Maximal string lengths for user-defined specifiers */
+ MAX_USER_NAME = 64,
+ MAX_USER_DATA = 256,
+
+ /* Maximal length of locale separator strings */
+ MAX_LOCALE_SEPARATOR_LENGTH = MB_LEN_MAX,
+ /* Maximal number of integers in grouping */
+ MAX_LOCALE_GROUPS = 64,
+
+ /* Initial size of asprintf buffer */
+ DYNAMIC_START_SIZE = 32
+};
+
+#define NO_GROUPING ((int)CHAR_MAX)
+
+/* Fundamental formatting parameter types */
+#define FORMAT_UNKNOWN 0
+#define FORMAT_INT 1
+#define FORMAT_DOUBLE 2
+#define FORMAT_CHAR 3
+#define FORMAT_STRING 4
+#define FORMAT_POINTER 5
+#define FORMAT_COUNT 6
+#define FORMAT_PARAMETER 7
+#define FORMAT_GROUP 8
+#if TRIO_GNU
+# define FORMAT_ERRNO 9
+#endif
+#if TRIO_EXTENSION
+# define FORMAT_USER_DEFINED 10
+#endif
+
+/* Character constants */
+#define CHAR_IDENTIFIER '%'
+#define CHAR_BACKSLASH '\\'
+#define CHAR_QUOTE '\"'
+#define CHAR_ADJUST ' '
+
+/* Character class expressions */
+#define CLASS_ALNUM "[:alnum:]"
+#define CLASS_ALPHA "[:alpha:]"
+#define CLASS_BLANK "[:blank:]"
+#define CLASS_CNTRL "[:cntrl:]"
+#define CLASS_DIGIT "[:digit:]"
+#define CLASS_GRAPH "[:graph:]"
+#define CLASS_LOWER "[:lower:]"
+#define CLASS_PRINT "[:print:]"
+#define CLASS_PUNCT "[:punct:]"
+#define CLASS_SPACE "[:space:]"
+#define CLASS_UPPER "[:upper:]"
+#define CLASS_XDIGIT "[:xdigit:]"
+
+/*
+ * SPECIFIERS:
+ *
+ *
+ * a Hex-float
+ * A Hex-float
+ * c Character
+ * C Widechar character (wint_t)
+ * d Decimal
+ * e Float
+ * E Float
+ * F Float
+ * F Float
+ * g Float
+ * G Float
+ * i Integer
+ * m Error message
+ * n Count
+ * o Octal
+ * p Pointer
+ * s String
+ * S Widechar string (wchar_t *)
+ * u Unsigned
+ * x Hex
+ * X Hex
+ * [] Group
+ * <> User-defined
+ *
+ * Reserved:
+ *
+ * D Binary Coded Decimal %D(length,precision) (OS/390)
+ */
+#define SPECIFIER_CHAR 'c'
+#define SPECIFIER_STRING 's'
+#define SPECIFIER_DECIMAL 'd'
+#define SPECIFIER_INTEGER 'i'
+#define SPECIFIER_UNSIGNED 'u'
+#define SPECIFIER_OCTAL 'o'
+#define SPECIFIER_HEX 'x'
+#define SPECIFIER_HEX_UPPER 'X'
+#define SPECIFIER_FLOAT_E 'e'
+#define SPECIFIER_FLOAT_E_UPPER 'E'
+#define SPECIFIER_FLOAT_F 'f'
+#define SPECIFIER_FLOAT_F_UPPER 'F'
+#define SPECIFIER_FLOAT_G 'g'
+#define SPECIFIER_FLOAT_G_UPPER 'G'
+#define SPECIFIER_POINTER 'p'
+#define SPECIFIER_GROUP '['
+#define SPECIFIER_UNGROUP ']'
+#define SPECIFIER_COUNT 'n'
+#if TRIO_UNIX98
+# define SPECIFIER_CHAR_UPPER 'C'
+# define SPECIFIER_STRING_UPPER 'S'
+#endif
+#if TRIO_C99
+# define SPECIFIER_HEXFLOAT 'a'
+# define SPECIFIER_HEXFLOAT_UPPER 'A'
+#endif
+#if TRIO_GNU
+# define SPECIFIER_ERRNO 'm'
+#endif
+#if TRIO_EXTENSION
+# define SPECIFIER_BINARY 'b'
+# define SPECIFIER_BINARY_UPPER 'B'
+# define SPECIFIER_USER_DEFINED_BEGIN '<'
+# define SPECIFIER_USER_DEFINED_END '>'
+# define SPECIFIER_USER_DEFINED_SEPARATOR ':'
+#endif
+
+/*
+ * QUALIFIERS:
+ *
+ *
+ * Numbers = d,i,o,u,x,X
+ * Float = a,A,e,E,f,F,g,G
+ * String = s
+ * Char = c
+ *
+ *
+ * 9$ Position
+ * Use the 9th parameter. 9 can be any number between 1 and
+ * the maximal argument
+ *
+ * 9 Width
+ * Set width to 9. 9 can be any number, but must not be postfixed
+ * by '$'
+ *
+ * h Short
+ * Numbers:
+ * (unsigned) short int
+ *
+ * hh Short short
+ * Numbers:
+ * (unsigned) char
+ *
+ * l Long
+ * Numbers:
+ * (unsigned) long int
+ * String:
+ * as the S specifier
+ * Char:
+ * as the C specifier
+ *
+ * ll Long Long
+ * Numbers:
+ * (unsigned) long long int
+ *
+ * L Long Double
+ * Float
+ * long double
+ *
+ * # Alternative
+ * Float:
+ * Decimal-point is always present
+ * String:
+ * non-printable characters are handled as \number
+ *
+ * Spacing
+ *
+ * + Sign
+ *
+ * - Alignment
+ *
+ * . Precision
+ *
+ * * Parameter
+ * print: use parameter
+ * scan: no parameter (ignore)
+ *
+ * q Quad
+ *
+ * Z size_t
+ *
+ * w Widechar
+ *
+ * ' Thousands/quote
+ * Numbers:
+ * Integer part grouped in thousands
+ * Binary numbers:
+ * Number grouped in nibbles (4 bits)
+ * String:
+ * Quoted string
+ *
+ * j intmax_t
+ * t prtdiff_t
+ * z size_t
+ *
+ * ! Sticky
+ * @ Parameter (for both print and scan)
+ *
+ * I n-bit Integer
+ * Numbers:
+ * The following options exists
+ * I8 = 8-bit integer
+ * I16 = 16-bit integer
+ * I32 = 32-bit integer
+ * I64 = 64-bit integer
+ */
+#define QUALIFIER_POSITION '$'
+#define QUALIFIER_SHORT 'h'
+#define QUALIFIER_LONG 'l'
+#define QUALIFIER_LONG_UPPER 'L'
+#define QUALIFIER_ALTERNATIVE '#'
+#define QUALIFIER_SPACE ' '
+#define QUALIFIER_PLUS '+'
+#define QUALIFIER_MINUS '-'
+#define QUALIFIER_DOT '.'
+#define QUALIFIER_STAR '*'
+#define QUALIFIER_CIRCUMFLEX '^' /* For scanlists */
+#if TRIO_C99
+# define QUALIFIER_SIZE_T 'z'
+# define QUALIFIER_PTRDIFF_T 't'
+# define QUALIFIER_INTMAX_T 'j'
+#endif
+#if TRIO_BSD || TRIO_GNU
+# define QUALIFIER_QUAD 'q'
+#endif
+#if TRIO_GNU
+# define QUALIFIER_SIZE_T_UPPER 'Z'
+#endif
+#if TRIO_MISC
+# define QUALIFIER_WIDECHAR 'w'
+#endif
+#if TRIO_MICROSOFT
+# define QUALIFIER_FIXED_SIZE 'I'
+#endif
+#if TRIO_EXTENSION
+# define QUALIFIER_QUOTE '\''
+# define QUALIFIER_STICKY '!'
+# define QUALIFIER_VARSIZE '&' /* This should remain undocumented */
+# define QUALIFIER_PARAM '@' /* Experimental */
+# define QUALIFIER_COLON ':' /* For scanlists */
+# define QUALIFIER_EQUAL '=' /* For scanlists */
+# define QUALIFIER_ROUNDING_UPPER 'R'
+#endif
+
+
+/*************************************************************************
+ *
+ * Internal Structures
+ *
+ *************************************************************************/
+
+/* Parameters */
+typedef struct {
+ /* An indication of which entry in the data union is used */
+ int type;
+ /* The flags */
+ trio_flags_t flags;
+ /* The width qualifier */
+ int width;
+ /* The precision qualifier */
+ int precision;
+ /* The base qualifier */
+ int base;
+ /* The size for the variable size qualifier */
+ int varsize;
+ /* The marker of the end of the specifier */
+ int indexAfterSpecifier;
+ /* The data from the argument list */
+ union {
+ char *string;
+#if TRIO_WIDECHAR
+ trio_wchar_t *wstring;
+#endif
+ trio_pointer_t pointer;
+ union {
+ trio_intmax_t as_signed;
+ trio_uintmax_t as_unsigned;
+ } number;
+ double doubleNumber;
+ double *doublePointer;
+ trio_long_double_t longdoubleNumber;
+ trio_long_double_t *longdoublePointer;
+ int errorNumber;
+ } data;
+ /* For the user-defined specifier */
+ char user_name[MAX_USER_NAME];
+ char user_data[MAX_USER_DATA];
+} trio_parameter_t;
+
+/* Container for customized functions */
+typedef struct {
+ union {
+ trio_outstream_t out;
+ trio_instream_t in;
+ } stream;
+ trio_pointer_t closure;
+} trio_custom_t;
+
+/* General trio "class" */
+typedef struct _trio_class_t {
+ /*
+ * The function to write characters to a stream.
+ */
+ void (*OutStream) TRIO_PROTO((struct _trio_class_t *, int));
+ /*
+ * The function to read characters from a stream.
+ */
+ void (*InStream) TRIO_PROTO((struct _trio_class_t *, int *));
+ /*
+ * The current location in the stream.
+ */
+ trio_pointer_t location;
+ /*
+ * The character currently being processed.
+ */
+ int current;
+ /*
+ * The number of characters that would have been written/read
+ * if there had been sufficient space.
+ */
+ int processed;
+ /*
+ * The number of characters that are actually written/read.
+ * Processed and committed will only differ for the *nprintf
+ * and *nscanf functions.
+ */
+ int committed;
+ /*
+ * The upper limit of characters that may be written/read.
+ */
+ int max;
+ /*
+ * The last output error that was detected.
+ */
+ int error;
+} trio_class_t;
+
+/* References (for user-defined callbacks) */
+typedef struct _trio_reference_t {
+ trio_class_t *data;
+ trio_parameter_t *parameter;
+} trio_reference_t;
+
+/* Registered entries (for user-defined callbacks) */
+typedef struct _trio_userdef_t {
+ struct _trio_userdef_t *next;
+ trio_callback_t callback;
+ char *name;
+} trio_userdef_t;
+
+/*************************************************************************
+ *
+ * Internal Variables
+ *
+ *************************************************************************/
+
+static TRIO_CONST char rcsid[] = "@(#)$Id$";
+
+/*
+ * Need this to workaround a parser bug in HP C/iX compiler that fails
+ * to resolves macro definitions that includes type 'long double',
+ * e.g: va_arg(arg_ptr, long double)
+ */
+#if defined(TRIO_PLATFORM_MPEIX)
+static TRIO_CONST trio_long_double_t ___dummy_long_double = 0;
+#endif
+
+static TRIO_CONST char internalNullString[] = "(nil)";
+
+#if defined(USE_LOCALE)
+static struct lconv *internalLocaleValues = NULL;
+#endif
+
+/*
+ * UNIX98 says "in a locale where the radix character is not defined,
+ * the radix character defaults to a period (.)"
+ */
+static int internalDecimalPointLength = 1;
+static int internalThousandSeparatorLength = 1;
+static char internalDecimalPoint = '.';
+static char internalDecimalPointString[MAX_LOCALE_SEPARATOR_LENGTH + 1] = ".";
+static char internalThousandSeparator[MAX_LOCALE_SEPARATOR_LENGTH + 1] = ",";
+static char internalGrouping[MAX_LOCALE_GROUPS] = { (char)NO_GROUPING };
+
+static TRIO_CONST char internalDigitsLower[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+static TRIO_CONST char internalDigitsUpper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+static BOOLEAN_T internalDigitsUnconverted = TRUE;
+static int internalDigitArray[128];
+#if TRIO_EXTENSION
+static BOOLEAN_T internalCollationUnconverted = TRUE;
+static char internalCollationArray[MAX_CHARACTER_CLASS][MAX_CHARACTER_CLASS];
+#endif
+
+#if TRIO_EXTENSION
+static TRIO_VOLATILE trio_callback_t internalEnterCriticalRegion = NULL;
+static TRIO_VOLATILE trio_callback_t internalLeaveCriticalRegion = NULL;
+static trio_userdef_t *internalUserDef = NULL;
+#endif
+
+
+/*************************************************************************
+ *
+ * Internal Functions
+ *
+ ************************************************************************/
+
+#if defined(TRIO_MINIMAL)
+# define TRIO_STRING_PUBLIC static
+# include "triostr.c"
+#endif /* defined(TRIO_MINIMAL) */
+
+/*************************************************************************
+ * TrioIsQualifier
+ *
+ * Description:
+ * Remember to add all new qualifiers to this function.
+ * QUALIFIER_POSITION must not be added.
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioIsQualifier
+TRIO_ARGS1((character),
+ TRIO_CONST char character)
+{
+ /* QUALIFIER_POSITION is not included */
+ switch (character)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case QUALIFIER_PLUS:
+ case QUALIFIER_MINUS:
+ case QUALIFIER_SPACE:
+ case QUALIFIER_DOT:
+ case QUALIFIER_STAR:
+ case QUALIFIER_ALTERNATIVE:
+ case QUALIFIER_SHORT:
+ case QUALIFIER_LONG:
+ case QUALIFIER_LONG_UPPER:
+ case QUALIFIER_CIRCUMFLEX:
+#if defined(QUALIFIER_SIZE_T)
+ case QUALIFIER_SIZE_T:
+#endif
+#if defined(QUALIFIER_PTRDIFF_T)
+ case QUALIFIER_PTRDIFF_T:
+#endif
+#if defined(QUALIFIER_INTMAX_T)
+ case QUALIFIER_INTMAX_T:
+#endif
+#if defined(QUALIFIER_QUAD)
+ case QUALIFIER_QUAD:
+#endif
+#if defined(QUALIFIER_SIZE_T_UPPER)
+ case QUALIFIER_SIZE_T_UPPER:
+#endif
+#if defined(QUALIFIER_WIDECHAR)
+ case QUALIFIER_WIDECHAR:
+#endif
+#if defined(QUALIFIER_QUOTE)
+ case QUALIFIER_QUOTE:
+#endif
+#if defined(QUALIFIER_STICKY)
+ case QUALIFIER_STICKY:
+#endif
+#if defined(QUALIFIER_VARSIZE)
+ case QUALIFIER_VARSIZE:
+#endif
+#if defined(QUALIFIER_PARAM)
+ case QUALIFIER_PARAM:
+#endif
+#if defined(QUALIFIER_FIXED_SIZE)
+ case QUALIFIER_FIXED_SIZE:
+#endif
+#if defined(QUALIFIER_ROUNDING_UPPER)
+ case QUALIFIER_ROUNDING_UPPER:
+#endif
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+/*************************************************************************
+ * TrioSetLocale
+ */
+#if defined(USE_LOCALE)
+TRIO_PRIVATE void
+TrioSetLocale(TRIO_NOARGS)
+{
+ internalLocaleValues = (struct lconv *)localeconv();
+ if (internalLocaleValues)
+ {
+ if ((internalLocaleValues->decimal_point) &&
+ (internalLocaleValues->decimal_point[0] != NIL))
+ {
+ internalDecimalPointLength = trio_length(internalLocaleValues->decimal_point);
+ if (internalDecimalPointLength == 1)
+ {
+ internalDecimalPoint = internalLocaleValues->decimal_point[0];
+ }
+ else
+ {
+ internalDecimalPoint = NIL;
+ trio_copy_max(internalDecimalPointString,
+ sizeof(internalDecimalPointString),
+ internalLocaleValues->decimal_point);
+ }
+ }
+ if ((internalLocaleValues->thousands_sep) &&
+ (internalLocaleValues->thousands_sep[0] != NIL))
+ {
+ trio_copy_max(internalThousandSeparator,
+ sizeof(internalThousandSeparator),
+ internalLocaleValues->thousands_sep);
+ internalThousandSeparatorLength = trio_length(internalThousandSeparator);
+ }
+ if ((internalLocaleValues->grouping) &&
+ (internalLocaleValues->grouping[0] != NIL))
+ {
+ trio_copy_max(internalGrouping,
+ sizeof(internalGrouping),
+ internalLocaleValues->grouping);
+ }
+ }
+}
+#endif /* defined(USE_LOCALE) */
+
+TRIO_PRIVATE int
+TrioCalcThousandSeparatorLength
+TRIO_ARGS1((digits),
+ int digits)
+{
+#if TRIO_EXTENSION
+ int count = 0;
+ int step = NO_GROUPING;
+ char *groupingPointer = internalGrouping;
+
+ while (digits > 0)
+ {
+ if (*groupingPointer == CHAR_MAX)
+ {
+ /* Disable grouping */
+ break; /* while */
+ }
+ else if (*groupingPointer == 0)
+ {
+ /* Repeat last group */
+ if (step == NO_GROUPING)
+ {
+ /* Error in locale */
+ break; /* while */
+ }
+ }
+ else
+ {
+ step = *groupingPointer++;
+ }
+ if (digits > step)
+ count += internalThousandSeparatorLength;
+ digits -= step;
+ }
+ return count;
+#else
+ return 0;
+#endif
+}
+
+TRIO_PRIVATE BOOLEAN_T
+TrioFollowedBySeparator
+TRIO_ARGS1((position),
+ int position)
+{
+#if TRIO_EXTENSION
+ int step = 0;
+ char *groupingPointer = internalGrouping;
+
+ position--;
+ if (position == 0)
+ return FALSE;
+ while (position > 0)
+ {
+ if (*groupingPointer == CHAR_MAX)
+ {
+ /* Disable grouping */
+ break; /* while */
+ }
+ else if (*groupingPointer != 0)
+ {
+ step = *groupingPointer++;
+ }
+ if (step == 0)
+ break;
+ position -= step;
+ }
+ return (position == 0);
+#else
+ return FALSE;
+#endif
+}
+
+/*************************************************************************
+ * TrioGetPosition
+ *
+ * Get the %n$ position.
+ */
+TRIO_PRIVATE int
+TrioGetPosition
+TRIO_ARGS2((format, indexPointer),
+ TRIO_CONST char *format,
+ int *indexPointer)
+{
+#if TRIO_UNIX98
+ char *tmpformat;
+ int number = 0;
+ int index = *indexPointer;
+
+ number = (int)trio_to_long(&format[index], &tmpformat, BASE_DECIMAL);
+ index = (int)(tmpformat - format);
+ if ((number != 0) && (QUALIFIER_POSITION == format[index++]))
+ {
+ *indexPointer = index;
+ /*
+ * number is decreased by 1, because n$ starts from 1, whereas
+ * the array it is indexing starts from 0.
+ */
+ return number - 1;
+ }
+#endif
+ return NO_POSITION;
+}
+
+#if TRIO_EXTENSION
+/*************************************************************************
+ * TrioFindNamespace
+ *
+ * Find registered user-defined specifier.
+ * The prev argument is used for optimization only.
+ */
+TRIO_PRIVATE trio_userdef_t *
+TrioFindNamespace
+TRIO_ARGS2((name, prev),
+ TRIO_CONST char *name,
+ trio_userdef_t **prev)
+{
+ trio_userdef_t *def;
+
+ if (internalEnterCriticalRegion)
+ (void)internalEnterCriticalRegion(NULL);
+
+ for (def = internalUserDef; def; def = def->next)
+ {
+ /* Case-sensitive string comparison */
+ if (trio_equal_case(def->name, name))
+ break;
+
+ if (prev)
+ *prev = def;
+ }
+
+ if (internalLeaveCriticalRegion)
+ (void)internalLeaveCriticalRegion(NULL);
+
+ return def;
+}
+#endif
+
+/*************************************************************************
+ * TrioPower
+ *
+ * Description:
+ * Calculate pow(base, exponent), where number and exponent are integers.
+ */
+TRIO_PRIVATE trio_long_double_t
+TrioPower
+TRIO_ARGS2((number, exponent),
+ int number,
+ int exponent)
+{
+ trio_long_double_t result;
+
+ if (number == 10)
+ {
+ switch (exponent)
+ {
+ /* Speed up calculation of common cases */
+ case 0:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E-1);
+ break;
+ case 1:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+0);
+ break;
+ case 2:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+1);
+ break;
+ case 3:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+2);
+ break;
+ case 4:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+3);
+ break;
+ case 5:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+4);
+ break;
+ case 6:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+5);
+ break;
+ case 7:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+6);
+ break;
+ case 8:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+7);
+ break;
+ case 9:
+ result = (trio_long_double_t)number * TRIO_SUFFIX_LONG(1E+8);
+ break;
+ default:
+ result = powl((trio_long_double_t)number,
+ (trio_long_double_t)exponent);
+ break;
+ }
+ }
+ else
+ {
+ return powl((trio_long_double_t)number, (trio_long_double_t)exponent);
+ }
+ return result;
+}
+
+/*************************************************************************
+ * TrioLogarithm
+ */
+TRIO_PRIVATE double
+TrioLogarithm
+TRIO_ARGS2((number, base),
+ double number,
+ int base)
+{
+ double result;
+
+ if (number <= 0.0)
+ {
+ /* xlC crashes on log(0) */
+ result = (number == 0.0) ? trio_ninf() : trio_nan();
+ }
+ else
+ {
+ if (base == 10)
+ {
+ result = log10(number);
+ }
+ else
+ {
+ result = log10(number) / log10((double)base);
+ }
+ }
+ return result;
+}
+
+/*************************************************************************
+ * TrioLogarithmBase
+ */
+TRIO_PRIVATE double
+TrioLogarithmBase
+TRIO_ARGS1((base),
+ int base)
+{
+ switch (base)
+ {
+ case BASE_BINARY : return 1.0;
+ case BASE_OCTAL : return 3.0;
+ case BASE_DECIMAL: return 3.321928094887362345;
+ case BASE_HEX : return 4.0;
+ default : return TrioLogarithm((double)base, 2);
+ }
+}
+
+/*************************************************************************
+ * TrioParse
+ *
+ * Description:
+ * Parse the format string
+ */
+TRIO_PRIVATE int
+TrioParse
+TRIO_ARGS5((type, format, parameters, arglist, argarray),
+ int type,
+ TRIO_CONST char *format,
+ trio_parameter_t *parameters,
+ TRIO_VA_LIST_PTR arglist,
+ trio_pointer_t *argarray)
+{
+ /* Count the number of times a parameter is referenced */
+ unsigned short usedEntries[MAX_PARAMETERS];
+ /* Parameter counters */
+ int parameterPosition;
+ int currentParam;
+ int maxParam = -1;
+ /* Utility variables */
+ trio_flags_t flags;
+ int width;
+ int precision;
+ int varsize;
+ int base;
+ int index; /* Index into formatting string */
+ int dots; /* Count number of dots in modifier part */
+ BOOLEAN_T positional; /* Does the specifier have a positional? */
+ BOOLEAN_T gotSticky = FALSE; /* Are there any sticky modifiers at all? */
+ /*
+ * indices specifies the order in which the parameters must be
+ * read from the va_args (this is necessary to handle positionals)
+ */
+ int indices[MAX_PARAMETERS];
+ int pos = 0;
+ /* Various variables */
+ char ch;
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ int charlen;
+#endif
+ int save_errno;
+ int i = -1;
+ int num;
+ char *tmpformat;
+
+ /* One and only one of arglist and argarray must be used */
+ assert((arglist != NULL) ^ (argarray != NULL));
+
+ /*
+ * The 'parameters' array is not initialized, but we need to
+ * know which entries we have used.
+ */
+ memset(usedEntries, 0, sizeof(usedEntries));
+
+ save_errno = errno;
+ index = 0;
+ parameterPosition = 0;
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ (void)mblen(NULL, 0);
+#endif
+
+ while (format[index])
+ {
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ if (! isascii(format[index]))
+ {
+ /*
+ * Multibyte characters cannot be legal specifiers or
+ * modifiers, so we skip over them.
+ */
+ charlen = mblen(&format[index], MB_LEN_MAX);
+ index += (charlen > 0) ? charlen : 1;
+ continue; /* while */
+ }
+#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */
+ if (CHAR_IDENTIFIER == format[index++])
+ {
+ if (CHAR_IDENTIFIER == format[index])
+ {
+ index++;
+ continue; /* while */
+ }
+
+ flags = FLAGS_NEW;
+ dots = 0;
+ currentParam = TrioGetPosition(format, &index);
+ positional = (NO_POSITION != currentParam);
+ if (!positional)
+ {
+ /* We have no positional, get the next counter */
+ currentParam = parameterPosition;
+ }
+ if(currentParam >= MAX_PARAMETERS)
+ {
+ /* Bail out completely to make the error more obvious */
+ return TRIO_ERROR_RETURN(TRIO_ETOOMANY, index);
+ }
+
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+
+ /* Default values */
+ width = NO_WIDTH;
+ precision = NO_PRECISION;
+ base = NO_BASE;
+ varsize = NO_SIZE;
+
+ while (TrioIsQualifier(format[index]))
+ {
+ ch = format[index++];
+
+ switch (ch)
+ {
+ case QUALIFIER_SPACE:
+ flags |= FLAGS_SPACE;
+ break;
+
+ case QUALIFIER_PLUS:
+ flags |= FLAGS_SHOWSIGN;
+ break;
+
+ case QUALIFIER_MINUS:
+ flags |= FLAGS_LEFTADJUST;
+ flags &= ~FLAGS_NILPADDING;
+ break;
+
+ case QUALIFIER_ALTERNATIVE:
+ flags |= FLAGS_ALTERNATIVE;
+ break;
+
+ case QUALIFIER_DOT:
+ if (dots == 0) /* Precision */
+ {
+ dots++;
+
+ /* Skip if no precision */
+ if (QUALIFIER_DOT == format[index])
+ break;
+
+ /* After the first dot we have the precision */
+ flags |= FLAGS_PRECISION;
+ if ((QUALIFIER_STAR == format[index])
+#if defined(QUALIFIER_PARAM)
+ || (QUALIFIER_PARAM == format[index])
+#endif
+ )
+ {
+ index++;
+ flags |= FLAGS_PRECISION_PARAMETER;
+
+ precision = TrioGetPosition(format, &index);
+ if (precision == NO_POSITION)
+ {
+ parameterPosition++;
+ if (positional)
+ precision = parameterPosition;
+ else
+ {
+ precision = currentParam;
+ currentParam = precision + 1;
+ }
+ }
+ else
+ {
+ if (! positional)
+ currentParam = precision + 1;
+ if (width > maxParam)
+ maxParam = precision;
+ }
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+ }
+ else
+ {
+ precision = trio_to_long(&format[index],
+ &tmpformat,
+ BASE_DECIMAL);
+ index = (int)(tmpformat - format);
+ }
+ }
+ else if (dots == 1) /* Base */
+ {
+ dots++;
+
+ /* After the second dot we have the base */
+ flags |= FLAGS_BASE;
+ if ((QUALIFIER_STAR == format[index])
+#if defined(QUALIFIER_PARAM)
+ || (QUALIFIER_PARAM == format[index])
+#endif
+ )
+ {
+ index++;
+ flags |= FLAGS_BASE_PARAMETER;
+ base = TrioGetPosition(format, &index);
+ if (base == NO_POSITION)
+ {
+ parameterPosition++;
+ if (positional)
+ base = parameterPosition;
+ else
+ {
+ base = currentParam;
+ currentParam = base + 1;
+ }
+ }
+ else
+ {
+ if (! positional)
+ currentParam = base + 1;
+ if (base > maxParam)
+ maxParam = base;
+ }
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+ }
+ else
+ {
+ base = trio_to_long(&format[index],
+ &tmpformat,
+ BASE_DECIMAL);
+ if (base > MAX_BASE)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ index = (int)(tmpformat - format);
+ }
+ }
+ else
+ {
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+ break; /* QUALIFIER_DOT */
+
+#if defined(QUALIFIER_PARAM)
+ case QUALIFIER_PARAM:
+ type = TYPE_PRINT;
+ /* FALLTHROUGH */
+#endif
+ case QUALIFIER_STAR:
+ /* This has different meanings for print and scan */
+ if (TYPE_PRINT == type)
+ {
+ /* Read with from parameter */
+ flags |= (FLAGS_WIDTH | FLAGS_WIDTH_PARAMETER);
+ width = TrioGetPosition(format, &index);
+ if (width == NO_POSITION)
+ {
+ parameterPosition++;
+ if (positional)
+ width = parameterPosition;
+ else
+ {
+ width = currentParam;
+ currentParam = width + 1;
+ }
+ }
+ else
+ {
+ if (! positional)
+ currentParam = width + 1;
+ if (width > maxParam)
+ maxParam = width;
+ }
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+ }
+ else
+ {
+ /* Scan, but do not store result */
+ flags |= FLAGS_IGNORE;
+ }
+
+ break; /* QUALIFIER_STAR */
+
+ case '0':
+ if (! (flags & FLAGS_LEFTADJUST))
+ flags |= FLAGS_NILPADDING;
+ /* FALLTHROUGH */
+ case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ flags |= FLAGS_WIDTH;
+ /* &format[index - 1] is used to "rewind" the read
+ * character from format
+ */
+ width = trio_to_long(&format[index - 1],
+ &tmpformat,
+ BASE_DECIMAL);
+ index = (int)(tmpformat - format);
+ break;
+
+ case QUALIFIER_SHORT:
+ if (flags & FLAGS_SHORTSHORT)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ else if (flags & FLAGS_SHORT)
+ flags |= FLAGS_SHORTSHORT;
+ else
+ flags |= FLAGS_SHORT;
+ break;
+
+ case QUALIFIER_LONG:
+ if (flags & FLAGS_QUAD)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ else if (flags & FLAGS_LONG)
+ flags |= FLAGS_QUAD;
+ else
+ flags |= FLAGS_LONG;
+ break;
+
+ case QUALIFIER_LONG_UPPER:
+ flags |= FLAGS_LONGDOUBLE;
+ break;
+
+#if defined(QUALIFIER_SIZE_T)
+ case QUALIFIER_SIZE_T:
+ flags |= FLAGS_SIZE_T;
+ /* Modify flags for later truncation of number */
+ if (sizeof(size_t) == sizeof(trio_ulonglong_t))
+ flags |= FLAGS_QUAD;
+ else if (sizeof(size_t) == sizeof(long))
+ flags |= FLAGS_LONG;
+ break;
+#endif
+
+#if defined(QUALIFIER_PTRDIFF_T)
+ case QUALIFIER_PTRDIFF_T:
+ flags |= FLAGS_PTRDIFF_T;
+ if (sizeof(ptrdiff_t) == sizeof(trio_ulonglong_t))
+ flags |= FLAGS_QUAD;
+ else if (sizeof(ptrdiff_t) == sizeof(long))
+ flags |= FLAGS_LONG;
+ break;
+#endif
+
+#if defined(QUALIFIER_INTMAX_T)
+ case QUALIFIER_INTMAX_T:
+ flags |= FLAGS_INTMAX_T;
+ if (sizeof(trio_intmax_t) == sizeof(trio_ulonglong_t))
+ flags |= FLAGS_QUAD;
+ else if (sizeof(trio_intmax_t) == sizeof(long))
+ flags |= FLAGS_LONG;
+ break;
+#endif
+
+#if defined(QUALIFIER_QUAD)
+ case QUALIFIER_QUAD:
+ flags |= FLAGS_QUAD;
+ break;
+#endif
+
+#if defined(QUALIFIER_FIXED_SIZE)
+ case QUALIFIER_FIXED_SIZE:
+ if (flags & FLAGS_FIXED_SIZE)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+
+ if (flags & (FLAGS_ALL_SIZES | FLAGS_LONGDOUBLE |
+ FLAGS_WIDECHAR | FLAGS_VARSIZE_PARAMETER))
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+
+ if ((format[index] == '6') &&
+ (format[index + 1] == '4'))
+ {
+ varsize = sizeof(trio_int64_t);
+ index += 2;
+ }
+ else if ((format[index] == '3') &&
+ (format[index + 1] == '2'))
+ {
+ varsize = sizeof(trio_int32_t);
+ index += 2;
+ }
+ else if ((format[index] == '1') &&
+ (format[index + 1] == '6'))
+ {
+ varsize = sizeof(trio_int16_t);
+ index += 2;
+ }
+ else if (format[index] == '8')
+ {
+ varsize = sizeof(trio_int8_t);
+ index++;
+ }
+ else
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+
+ flags |= FLAGS_FIXED_SIZE;
+ break;
+#endif
+
+#if defined(QUALIFIER_WIDECHAR)
+ case QUALIFIER_WIDECHAR:
+ flags |= FLAGS_WIDECHAR;
+ break;
+#endif
+
+#if defined(QUALIFIER_SIZE_T_UPPER)
+ case QUALIFIER_SIZE_T_UPPER:
+ break;
+#endif
+
+#if defined(QUALIFIER_QUOTE)
+ case QUALIFIER_QUOTE:
+ flags |= FLAGS_QUOTE;
+ break;
+#endif
+
+#if defined(QUALIFIER_STICKY)
+ case QUALIFIER_STICKY:
+ flags |= FLAGS_STICKY;
+ gotSticky = TRUE;
+ break;
+#endif
+
+#if defined(QUALIFIER_VARSIZE)
+ case QUALIFIER_VARSIZE:
+ flags |= FLAGS_VARSIZE_PARAMETER;
+ parameterPosition++;
+ if (positional)
+ varsize = parameterPosition;
+ else
+ {
+ varsize = currentParam;
+ currentParam = varsize + 1;
+ }
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+ break;
+#endif
+
+#if defined(QUALIFIER_ROUNDING_UPPER)
+ case QUALIFIER_ROUNDING_UPPER:
+ flags |= FLAGS_ROUNDING;
+ break;
+#endif
+
+ default:
+ /* Bail out completely to make the error more obvious */
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+ } /* while qualifier */
+
+ /*
+ * Parameters only need the type and value. The value is
+ * read later.
+ */
+ if (flags & FLAGS_WIDTH_PARAMETER)
+ {
+ usedEntries[width] += 1;
+ parameters[pos].type = FORMAT_PARAMETER;
+ parameters[pos].flags = 0;
+ indices[width] = pos;
+ width = pos++;
+ }
+ if (flags & FLAGS_PRECISION_PARAMETER)
+ {
+ usedEntries[precision] += 1;
+ parameters[pos].type = FORMAT_PARAMETER;
+ parameters[pos].flags = 0;
+ indices[precision] = pos;
+ precision = pos++;
+ }
+ if (flags & FLAGS_BASE_PARAMETER)
+ {
+ usedEntries[base] += 1;
+ parameters[pos].type = FORMAT_PARAMETER;
+ parameters[pos].flags = 0;
+ indices[base] = pos;
+ base = pos++;
+ }
+ if (flags & FLAGS_VARSIZE_PARAMETER)
+ {
+ usedEntries[varsize] += 1;
+ parameters[pos].type = FORMAT_PARAMETER;
+ parameters[pos].flags = 0;
+ indices[varsize] = pos;
+ varsize = pos++;
+ }
+
+ indices[currentParam] = pos;
+
+ switch (format[index++])
+ {
+#if defined(SPECIFIER_CHAR_UPPER)
+ case SPECIFIER_CHAR_UPPER:
+ flags |= FLAGS_WIDECHAR;
+ /* FALLTHROUGH */
+#endif
+ case SPECIFIER_CHAR:
+ if (flags & FLAGS_LONG)
+ flags |= FLAGS_WIDECHAR;
+ else if (flags & FLAGS_SHORT)
+ flags &= ~FLAGS_WIDECHAR;
+ parameters[pos].type = FORMAT_CHAR;
+ break;
+
+#if defined(SPECIFIER_STRING_UPPER)
+ case SPECIFIER_STRING_UPPER:
+ flags |= FLAGS_WIDECHAR;
+ /* FALLTHROUGH */
+#endif
+ case SPECIFIER_STRING:
+ if (flags & FLAGS_LONG)
+ flags |= FLAGS_WIDECHAR;
+ else if (flags & FLAGS_SHORT)
+ flags &= ~FLAGS_WIDECHAR;
+ parameters[pos].type = FORMAT_STRING;
+ break;
+
+ case SPECIFIER_GROUP:
+ if (TYPE_SCAN == type)
+ {
+ int depth = 1;
+ parameters[pos].type = FORMAT_GROUP;
+ if (format[index] == QUALIFIER_CIRCUMFLEX)
+ index++;
+ if (format[index] == SPECIFIER_UNGROUP)
+ index++;
+ if (format[index] == QUALIFIER_MINUS)
+ index++;
+ /* Skip nested brackets */
+ while (format[index] != NIL)
+ {
+ if (format[index] == SPECIFIER_GROUP)
+ {
+ depth++;
+ }
+ else if (format[index] == SPECIFIER_UNGROUP)
+ {
+ if (--depth <= 0)
+ {
+ index++;
+ break;
+ }
+ }
+ index++;
+ }
+ }
+ break;
+
+ case SPECIFIER_INTEGER:
+ parameters[pos].type = FORMAT_INT;
+ break;
+
+ case SPECIFIER_UNSIGNED:
+ flags |= FLAGS_UNSIGNED;
+ parameters[pos].type = FORMAT_INT;
+ break;
+
+ case SPECIFIER_DECIMAL:
+ /* Disable base modifier */
+ flags &= ~FLAGS_BASE_PARAMETER;
+ base = BASE_DECIMAL;
+ parameters[pos].type = FORMAT_INT;
+ break;
+
+ case SPECIFIER_OCTAL:
+ flags |= FLAGS_UNSIGNED;
+ flags &= ~FLAGS_BASE_PARAMETER;
+ base = BASE_OCTAL;
+ parameters[pos].type = FORMAT_INT;
+ break;
+
+#if defined(SPECIFIER_BINARY)
+ case SPECIFIER_BINARY_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+ case SPECIFIER_BINARY:
+ flags |= FLAGS_NILPADDING;
+ flags &= ~FLAGS_BASE_PARAMETER;
+ base = BASE_BINARY;
+ parameters[pos].type = FORMAT_INT;
+ break;
+#endif
+
+ case SPECIFIER_HEX_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+ case SPECIFIER_HEX:
+ flags |= FLAGS_UNSIGNED;
+ flags &= ~FLAGS_BASE_PARAMETER;
+ base = BASE_HEX;
+ parameters[pos].type = FORMAT_INT;
+ break;
+
+ case SPECIFIER_FLOAT_E_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+ case SPECIFIER_FLOAT_E:
+ flags |= FLAGS_FLOAT_E;
+ parameters[pos].type = FORMAT_DOUBLE;
+ break;
+
+ case SPECIFIER_FLOAT_G_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+ case SPECIFIER_FLOAT_G:
+ flags |= FLAGS_FLOAT_G;
+ parameters[pos].type = FORMAT_DOUBLE;
+ break;
+
+ case SPECIFIER_FLOAT_F_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+ case SPECIFIER_FLOAT_F:
+ parameters[pos].type = FORMAT_DOUBLE;
+ break;
+
+ case SPECIFIER_POINTER:
+ if (sizeof(trio_pointer_t) == sizeof(trio_ulonglong_t))
+ flags |= FLAGS_QUAD;
+ else if (sizeof(trio_pointer_t) == sizeof(long))
+ flags |= FLAGS_LONG;
+ parameters[pos].type = FORMAT_POINTER;
+ break;
+
+ case SPECIFIER_COUNT:
+ parameters[pos].type = FORMAT_COUNT;
+ break;
+
+#if defined(SPECIFIER_HEXFLOAT)
+# if defined(SPECIFIER_HEXFLOAT_UPPER)
+ case SPECIFIER_HEXFLOAT_UPPER:
+ flags |= FLAGS_UPPER;
+ /* FALLTHROUGH */
+# endif
+ case SPECIFIER_HEXFLOAT:
+ base = BASE_HEX;
+ parameters[pos].type = FORMAT_DOUBLE;
+ break;
+#endif
+
+#if defined(FORMAT_ERRNO)
+ case SPECIFIER_ERRNO:
+ parameters[pos].type = FORMAT_ERRNO;
+ break;
+#endif
+
+#if defined(SPECIFIER_USER_DEFINED_BEGIN)
+ case SPECIFIER_USER_DEFINED_BEGIN:
+ {
+ unsigned int max;
+ int without_namespace = TRUE;
+
+ parameters[pos].type = FORMAT_USER_DEFINED;
+ parameters[pos].user_name[0] = NIL;
+ tmpformat = (char *)&format[index];
+
+ while ((ch = format[index]))
+ {
+ index++;
+ if (ch == SPECIFIER_USER_DEFINED_END)
+ {
+ if (without_namespace)
+ {
+ /* We must get the handle first */
+ parameters[pos].type = FORMAT_PARAMETER;
+ parameters[pos].indexAfterSpecifier = index;
+ parameters[pos].flags = FLAGS_USER_DEFINED;
+ /* Adjust parameters for insertion of new one */
+ pos++;
+ usedEntries[currentParam] += 1;
+ parameters[pos].type = FORMAT_USER_DEFINED;
+ currentParam++;
+ indices[currentParam] = pos;
+ if (currentParam > maxParam)
+ maxParam = currentParam;
+ }
+ /* Copy the user data */
+ max = (unsigned int)(&format[index] - tmpformat);
+ if (max > MAX_USER_DATA)
+ max = MAX_USER_DATA;
+ trio_copy_max(parameters[pos].user_data,
+ max,
+ tmpformat);
+ break; /* while */
+ }
+ if (ch == SPECIFIER_USER_DEFINED_SEPARATOR)
+ {
+ without_namespace = FALSE;
+ /* Copy the namespace for later looking-up */
+ max = (int)(&format[index] - tmpformat);
+ if (max > MAX_USER_NAME)
+ max = MAX_USER_NAME;
+ trio_copy_max(parameters[pos].user_name,
+ max,
+ tmpformat);
+ tmpformat = (char *)&format[index];
+ }
+ }
+ if (ch != SPECIFIER_USER_DEFINED_END)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+ break;
+#endif /* defined(SPECIFIER_USER_DEFINED_BEGIN) */
+
+ default:
+ /* Bail out completely to make the error more obvious */
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+
+ /* Count the number of times this entry has been used */
+ usedEntries[currentParam] += 1;
+
+ /* Find last sticky parameters */
+ if (gotSticky && !(flags & FLAGS_STICKY))
+ {
+ for (i = pos - 1; i >= 0; i--)
+ {
+ if (parameters[i].type == FORMAT_PARAMETER)
+ continue;
+ if ((parameters[i].flags & FLAGS_STICKY) &&
+ (parameters[i].type == parameters[pos].type))
+ {
+ /* Do not overwrite current qualifiers */
+ flags |= (parameters[i].flags & (unsigned long)~FLAGS_STICKY);
+ if (width == NO_WIDTH)
+ width = parameters[i].width;
+ if (precision == NO_PRECISION)
+ precision = parameters[i].precision;
+ if (base == NO_BASE)
+ base = parameters[i].base;
+ break;
+ }
+ }
+ }
+
+ parameters[pos].indexAfterSpecifier = index;
+ parameters[pos].flags = flags;
+ parameters[pos].width = width;
+ parameters[pos].precision = precision;
+ parameters[pos].base = (base == NO_BASE) ? BASE_DECIMAL : base;
+ parameters[pos].varsize = varsize;
+ pos++;
+
+ if (! positional)
+ parameterPosition++;
+
+ } /* if identifier */
+
+ } /* while format characters left */
+
+ for (num = 0; num <= maxParam; num++)
+ {
+ if (usedEntries[num] != 1)
+ {
+ if (usedEntries[num] == 0) /* gap detected */
+ return TRIO_ERROR_RETURN(TRIO_EGAP, num);
+ else /* double references detected */
+ return TRIO_ERROR_RETURN(TRIO_EDBLREF, num);
+ }
+
+ i = indices[num];
+
+ /*
+ * FORMAT_PARAMETERS are only present if they must be read,
+ * so it makes no sense to check the ignore flag (besides,
+ * the flags variable is not set for that particular type)
+ */
+ if ((parameters[i].type != FORMAT_PARAMETER) &&
+ (parameters[i].flags & FLAGS_IGNORE))
+ continue; /* for all arguments */
+
+ /*
+ * The stack arguments are read according to ANSI C89
+ * default argument promotions:
+ *
+ * char = int
+ * short = int
+ * unsigned char = unsigned int
+ * unsigned short = unsigned int
+ * float = double
+ *
+ * In addition to the ANSI C89 these types are read (the
+ * default argument promotions of C99 has not been
+ * considered yet)
+ *
+ * long long
+ * long double
+ * size_t
+ * ptrdiff_t
+ * intmax_t
+ */
+ switch (parameters[i].type)
+ {
+ case FORMAT_GROUP:
+ case FORMAT_STRING:
+#if TRIO_WIDECHAR
+ if (flags & FLAGS_WIDECHAR)
+ {
+ parameters[i].data.wstring = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), trio_wchar_t *)
+ : (trio_wchar_t *)(argarray[num]);
+ }
+ else
+#endif
+ {
+ parameters[i].data.string = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), char *)
+ : (char *)(argarray[num]);
+ }
+ break;
+
+#if defined(FORMAT_USER_DEFINED)
+ case FORMAT_USER_DEFINED:
+#endif
+ case FORMAT_POINTER:
+ case FORMAT_COUNT:
+ case FORMAT_UNKNOWN:
+ parameters[i].data.pointer = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), trio_pointer_t )
+ : argarray[num];
+ break;
+
+ case FORMAT_CHAR:
+ case FORMAT_INT:
+ if (TYPE_SCAN == type)
+ {
+ if (argarray == NULL)
+ parameters[i].data.pointer =
+ (trio_pointer_t)va_arg(TRIO_VA_LIST_DEREF(arglist), trio_pointer_t);
+ else
+ {
+ if (parameters[i].type == FORMAT_CHAR)
+ parameters[i].data.pointer =
+ (trio_pointer_t)((char *)argarray[num]);
+ else if (parameters[i].flags & FLAGS_SHORT)
+ parameters[i].data.pointer =
+ (trio_pointer_t)((short *)argarray[num]);
+ else
+ parameters[i].data.pointer =
+ (trio_pointer_t)((int *)argarray[num]);
+ }
+ }
+ else
+ {
+#if defined(QUALIFIER_VARSIZE) || defined(QUALIFIER_FIXED_SIZE)
+ if (parameters[i].flags
+ & (FLAGS_VARSIZE_PARAMETER | FLAGS_FIXED_SIZE))
+ {
+ if (parameters[i].flags & FLAGS_VARSIZE_PARAMETER)
+ {
+ /*
+ * Variable sizes are mapped onto the fixed sizes, in
+ * accordance with integer promotion.
+ *
+ * Please note that this may not be portable, as we
+ * only guess the size, not the layout of the numbers.
+ * For example, if int is little-endian, and long is
+ * big-endian, then this will fail.
+ */
+ varsize = (int)parameters[parameters[i].varsize].data.number.as_unsigned;
+ }
+ else
+ {
+ /* Used for the I<bits> modifiers */
+ varsize = parameters[i].varsize;
+ }
+ parameters[i].flags &= ~FLAGS_ALL_VARSIZES;
+
+ if (varsize <= (int)sizeof(int))
+ ;
+ else if (varsize <= (int)sizeof(long))
+ parameters[i].flags |= FLAGS_LONG;
+#if defined(QUALIFIER_INTMAX_T)
+ else if (varsize <= (int)sizeof(trio_longlong_t))
+ parameters[i].flags |= FLAGS_QUAD;
+ else
+ parameters[i].flags |= FLAGS_INTMAX_T;
+#else
+ else
+ parameters[i].flags |= FLAGS_QUAD;
+#endif
+ }
+#endif /* defined(QUALIFIER_VARSIZE) */
+#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER)
+ if (parameters[i].flags & FLAGS_SIZE_T)
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), size_t)
+ : (trio_uintmax_t)(*((size_t *)argarray[num]));
+ else
+#endif
+#if defined(QUALIFIER_PTRDIFF_T)
+ if (parameters[i].flags & FLAGS_PTRDIFF_T)
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), ptrdiff_t)
+ : (trio_uintmax_t)(*((ptrdiff_t *)argarray[num]));
+ else
+#endif
+#if defined(QUALIFIER_INTMAX_T)
+ if (parameters[i].flags & FLAGS_INTMAX_T)
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), trio_intmax_t)
+ : (trio_uintmax_t)(*((trio_intmax_t *)argarray[num]));
+ else
+#endif
+ if (parameters[i].flags & FLAGS_QUAD)
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), trio_ulonglong_t)
+ : (trio_uintmax_t)(*((trio_ulonglong_t *)argarray[num]));
+ else if (parameters[i].flags & FLAGS_LONG)
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), long)
+ : (trio_uintmax_t)(*((long *)argarray[num]));
+ else
+ {
+ if (argarray == NULL)
+ parameters[i].data.number.as_unsigned = (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), int);
+ else
+ {
+ if (parameters[i].type == FORMAT_CHAR)
+ parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((char *)argarray[num]));
+ else if (parameters[i].flags & FLAGS_SHORT)
+ parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((short *)argarray[num]));
+ else
+ parameters[i].data.number.as_unsigned = (trio_uintmax_t)(*((int *)argarray[num]));
+ }
+ }
+ }
+ break;
+
+ case FORMAT_PARAMETER:
+ /*
+ * The parameter for the user-defined specifier is a pointer,
+ * whereas the rest (width, precision, base) uses an integer.
+ */
+ if (parameters[i].flags & FLAGS_USER_DEFINED)
+ parameters[i].data.pointer = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), trio_pointer_t )
+ : argarray[num];
+ else
+ parameters[i].data.number.as_unsigned = (argarray == NULL)
+ ? (trio_uintmax_t)va_arg(TRIO_VA_LIST_DEREF(arglist), int)
+ : (trio_uintmax_t)(*((int *)argarray[num]));
+ break;
+
+ case FORMAT_DOUBLE:
+ if (TYPE_SCAN == type)
+ {
+ if (parameters[i].flags & FLAGS_LONGDOUBLE)
+ parameters[i].data.longdoublePointer = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), trio_long_double_t *)
+ : (trio_long_double_t *)argarray[num];
+ else
+ {
+ if (parameters[i].flags & FLAGS_LONG)
+ parameters[i].data.doublePointer = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), double *)
+ : (double *)argarray[num];
+ else
+ parameters[i].data.doublePointer = (argarray == NULL)
+ ? (double *)va_arg(TRIO_VA_LIST_DEREF(arglist), float *)
+ : (double *)((float *)argarray[num]);
+ }
+ }
+ else
+ {
+ if (parameters[i].flags & FLAGS_LONGDOUBLE)
+ parameters[i].data.longdoubleNumber = (argarray == NULL)
+ ? va_arg(TRIO_VA_LIST_DEREF(arglist), trio_long_double_t)
+ : (trio_long_double_t)(*((trio_long_double_t *)argarray[num]));
+ else
+ {
+ if (argarray == NULL)
+ parameters[i].data.longdoubleNumber =
+ (trio_long_double_t)va_arg(TRIO_VA_LIST_DEREF(arglist), double);
+ else
+ {
+ if (parameters[i].flags & FLAGS_SHORT)
+ parameters[i].data.longdoubleNumber =
+ (trio_long_double_t)(*((float *)argarray[num]));
+ else
+ parameters[i].data.longdoubleNumber =
+ (trio_long_double_t)(*((double *)argarray[num]));
+ }
+ }
+ }
+ break;
+
+#if defined(FORMAT_ERRNO)
+ case FORMAT_ERRNO:
+ parameters[i].data.errorNumber = save_errno;
+ break;
+#endif
+
+ default:
+ break;
+ }
+ } /* for all specifiers */
+ return num;
+}
+
+
+/*************************************************************************
+ *
+ * FORMATTING
+ *
+ ************************************************************************/
+
+
+/*************************************************************************
+ * TrioWriteNumber
+ *
+ * Description:
+ * Output a number.
+ * The complexity of this function is a result of the complexity
+ * of the dependencies of the flags.
+ */
+TRIO_PRIVATE void
+TrioWriteNumber
+TRIO_ARGS6((self, number, flags, width, precision, base),
+ trio_class_t *self,
+ trio_uintmax_t number,
+ trio_flags_t flags,
+ int width,
+ int precision,
+ int base)
+{
+ BOOLEAN_T isNegative;
+ BOOLEAN_T isNumberZero;
+ BOOLEAN_T isPrecisionZero;
+ BOOLEAN_T ignoreNumber;
+ char buffer[MAX_CHARS_IN(trio_uintmax_t) * (1 + MAX_LOCALE_SEPARATOR_LENGTH) + 1];
+ char *bufferend;
+ char *pointer;
+ TRIO_CONST char *digits;
+ int i;
+ int length;
+ char *p;
+ int count;
+
+ assert(VALID(self));
+ assert(VALID(self->OutStream));
+ assert(((base >= MIN_BASE) && (base <= MAX_BASE)) || (base == NO_BASE));
+
+ digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower;
+ if (base == NO_BASE)
+ base = BASE_DECIMAL;
+
+ isNumberZero = (number == 0);
+ isPrecisionZero = (precision == 0);
+ ignoreNumber = (isNumberZero
+ && isPrecisionZero
+ && !((flags & FLAGS_ALTERNATIVE) && (base == BASE_OCTAL)));
+
+ if (flags & FLAGS_UNSIGNED)
+ {
+ isNegative = FALSE;
+ flags &= ~FLAGS_SHOWSIGN;
+ }
+ else
+ {
+ isNegative = ((trio_intmax_t)number < 0);
+ if (isNegative)
+ number = -((trio_intmax_t)number);
+ }
+
+ if (flags & FLAGS_QUAD)
+ number &= (trio_ulonglong_t)-1;
+ else if (flags & FLAGS_LONG)
+ number &= (unsigned long)-1;
+ else
+ number &= (unsigned int)-1;
+
+ /* Build number */
+ pointer = bufferend = &buffer[sizeof(buffer) - 1];
+ *pointer-- = NIL;
+ for (i = 1; i < (int)sizeof(buffer); i++)
+ {
+ *pointer-- = digits[number % base];
+ number /= base;
+ if (number == 0)
+ break;
+
+ if ((flags & FLAGS_QUOTE) && TrioFollowedBySeparator(i + 1))
+ {
+ /*
+ * We are building the number from the least significant
+ * to the most significant digit, so we have to copy the
+ * thousand separator backwards
+ */
+ length = internalThousandSeparatorLength;
+ if (((int)(pointer - buffer) - length) > 0)
+ {
+ p = &internalThousandSeparator[length - 1];
+ while (length-- > 0)
+ *pointer-- = *p--;
+ }
+ }
+ }
+
+ if (! ignoreNumber)
+ {
+ /* Adjust width */
+ width -= (bufferend - pointer) - 1;
+ }
+
+ /* Adjust precision */
+ if (NO_PRECISION != precision)
+ {
+ precision -= (bufferend - pointer) - 1;
+ if (precision < 0)
+ precision = 0;
+ flags |= FLAGS_NILPADDING;
+ }
+
+ /* Calculate padding */
+ count = (! ((flags & FLAGS_LEFTADJUST) || (precision == NO_PRECISION)))
+ ? precision
+ : 0;
+
+ /* Adjust width further */
+ if (isNegative || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
+ width--;
+ if ((flags & FLAGS_ALTERNATIVE) && !isNumberZero)
+ {
+ switch (base)
+ {
+ case BASE_BINARY:
+ case BASE_HEX:
+ width -= 2;
+ break;
+ case BASE_OCTAL:
+ if (!(flags & FLAGS_NILPADDING) || (count == 0))
+ width--;
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Output prefixes spaces if needed */
+ if (! ((flags & FLAGS_LEFTADJUST) ||
+ ((flags & FLAGS_NILPADDING) && (precision == NO_PRECISION))))
+ {
+ while (width-- > count)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+
+ /* width has been adjusted for signs and alternatives */
+ if (isNegative)
+ self->OutStream(self, '-');
+ else if (flags & FLAGS_SHOWSIGN)
+ self->OutStream(self, '+');
+ else if (flags & FLAGS_SPACE)
+ self->OutStream(self, ' ');
+
+ /* Prefix is not written when the value is zero */
+ if ((flags & FLAGS_ALTERNATIVE) && !isNumberZero)
+ {
+ switch (base)
+ {
+ case BASE_BINARY:
+ self->OutStream(self, '0');
+ self->OutStream(self, (flags & FLAGS_UPPER) ? 'B' : 'b');
+ break;
+
+ case BASE_OCTAL:
+ if (!(flags & FLAGS_NILPADDING) || (count == 0))
+ self->OutStream(self, '0');
+ break;
+
+ case BASE_HEX:
+ self->OutStream(self, '0');
+ self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x');
+ break;
+
+ default:
+ break;
+ } /* switch base */
+ }
+
+ /* Output prefixed zero padding if needed */
+ if (flags & FLAGS_NILPADDING)
+ {
+ if (precision == NO_PRECISION)
+ precision = width;
+ while (precision-- > 0)
+ {
+ self->OutStream(self, '0');
+ width--;
+ }
+ }
+
+ if (! ignoreNumber)
+ {
+ /* Output the number itself */
+ while (*(++pointer))
+ {
+ self->OutStream(self, *pointer);
+ }
+ }
+
+ /* Output trailing spaces if needed */
+ if (flags & FLAGS_LEFTADJUST)
+ {
+ while (width-- > 0)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+}
+
+/*************************************************************************
+ * TrioWriteStringCharacter
+ *
+ * Description:
+ * Output a single character of a string
+ */
+TRIO_PRIVATE void
+TrioWriteStringCharacter
+TRIO_ARGS3((self, ch, flags),
+ trio_class_t *self,
+ int ch,
+ trio_flags_t flags)
+{
+ if (flags & FLAGS_ALTERNATIVE)
+ {
+ if (! isprint(ch))
+ {
+ /*
+ * Non-printable characters are converted to C escapes or
+ * \number, if no C escape exists.
+ */
+ self->OutStream(self, CHAR_BACKSLASH);
+ switch (ch)
+ {
+ case '\007': self->OutStream(self, 'a'); break;
+ case '\b': self->OutStream(self, 'b'); break;
+ case '\f': self->OutStream(self, 'f'); break;
+ case '\n': self->OutStream(self, 'n'); break;
+ case '\r': self->OutStream(self, 'r'); break;
+ case '\t': self->OutStream(self, 't'); break;
+ case '\v': self->OutStream(self, 'v'); break;
+ case '\\': self->OutStream(self, '\\'); break;
+ default:
+ self->OutStream(self, 'x');
+ TrioWriteNumber(self, (trio_uintmax_t)ch,
+ FLAGS_UNSIGNED | FLAGS_NILPADDING,
+ 2, 2, BASE_HEX);
+ break;
+ }
+ }
+ else if (ch == CHAR_BACKSLASH)
+ {
+ self->OutStream(self, CHAR_BACKSLASH);
+ self->OutStream(self, CHAR_BACKSLASH);
+ }
+ else
+ {
+ self->OutStream(self, ch);
+ }
+ }
+ else
+ {
+ self->OutStream(self, ch);
+ }
+}
+
+/*************************************************************************
+ * TrioWriteString
+ *
+ * Description:
+ * Output a string
+ */
+TRIO_PRIVATE void
+TrioWriteString
+TRIO_ARGS5((self, string, flags, width, precision),
+ trio_class_t *self,
+ TRIO_CONST char *string,
+ trio_flags_t flags,
+ int width,
+ int precision)
+{
+ int length;
+ int ch;
+
+ assert(VALID(self));
+ assert(VALID(self->OutStream));
+
+ if (string == NULL)
+ {
+ string = internalNullString;
+ length = sizeof(internalNullString) - 1;
+ /* Disable quoting for the null pointer */
+ flags &= (~FLAGS_QUOTE);
+ width = 0;
+ }
+ else
+ {
+ length = trio_length(string);
+ }
+ if ((NO_PRECISION != precision) &&
+ (precision < length))
+ {
+ length = precision;
+ }
+ width -= length;
+
+ if (flags & FLAGS_QUOTE)
+ self->OutStream(self, CHAR_QUOTE);
+
+ if (! (flags & FLAGS_LEFTADJUST))
+ {
+ while (width-- > 0)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+
+ while (length-- > 0)
+ {
+ /* The ctype parameters must be an unsigned char (or EOF) */
+ ch = (int)((unsigned char)(*string++));
+ TrioWriteStringCharacter(self, ch, flags);
+ }
+
+ if (flags & FLAGS_LEFTADJUST)
+ {
+ while (width-- > 0)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+ if (flags & FLAGS_QUOTE)
+ self->OutStream(self, CHAR_QUOTE);
+}
+
+/*************************************************************************
+ * TrioWriteWideStringCharacter
+ *
+ * Description:
+ * Output a wide string as a multi-byte sequence
+ */
+#if TRIO_WIDECHAR
+TRIO_PRIVATE int
+TrioWriteWideStringCharacter
+TRIO_ARGS4((self, wch, flags, width),
+ trio_class_t *self,
+ trio_wchar_t wch,
+ trio_flags_t flags,
+ int width)
+{
+ int size;
+ int i;
+ int ch;
+ char *string;
+ char buffer[MB_LEN_MAX + 1];
+
+ if (width == NO_WIDTH)
+ width = sizeof(buffer);
+
+ size = wctomb(buffer, wch);
+ if ((size <= 0) || (size > width) || (buffer[0] == NIL))
+ return 0;
+
+ string = buffer;
+ i = size;
+ while ((width >= i) && (width-- > 0) && (i-- > 0))
+ {
+ /* The ctype parameters must be an unsigned char (or EOF) */
+ ch = (int)((unsigned char)(*string++));
+ TrioWriteStringCharacter(self, ch, flags);
+ }
+ return size;
+}
+#endif /* TRIO_WIDECHAR */
+
+/*************************************************************************
+ * TrioWriteWideString
+ *
+ * Description:
+ * Output a wide character string as a multi-byte string
+ */
+#if TRIO_WIDECHAR
+TRIO_PRIVATE void
+TrioWriteWideString
+TRIO_ARGS5((self, wstring, flags, width, precision),
+ trio_class_t *self,
+ TRIO_CONST trio_wchar_t *wstring,
+ trio_flags_t flags,
+ int width,
+ int precision)
+{
+ int length;
+ int size;
+
+ assert(VALID(self));
+ assert(VALID(self->OutStream));
+
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ (void)mblen(NULL, 0);
+#endif
+
+ if (wstring == NULL)
+ {
+ TrioWriteString(self, NULL, flags, width, precision);
+ return;
+ }
+
+ if (NO_PRECISION == precision)
+ {
+ length = INT_MAX;
+ }
+ else
+ {
+ length = precision;
+ width -= length;
+ }
+
+ if (flags & FLAGS_QUOTE)
+ self->OutStream(self, CHAR_QUOTE);
+
+ if (! (flags & FLAGS_LEFTADJUST))
+ {
+ while (width-- > 0)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+
+ while (length > 0)
+ {
+ size = TrioWriteWideStringCharacter(self, *wstring++, flags, length);
+ if (size == 0)
+ break; /* while */
+ length -= size;
+ }
+
+ if (flags & FLAGS_LEFTADJUST)
+ {
+ while (width-- > 0)
+ self->OutStream(self, CHAR_ADJUST);
+ }
+ if (flags & FLAGS_QUOTE)
+ self->OutStream(self, CHAR_QUOTE);
+}
+#endif /* TRIO_WIDECHAR */
+
+/*************************************************************************
+ * TrioWriteDouble
+ *
+ * http://wwwold.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_211.htm
+ *
+ * "5.2.4.2.2 paragraph #4
+ *
+ * The accuracy [...] is implementation defined, as is the accuracy
+ * of the conversion between floating-point internal representations
+ * and string representations performed by the libray routine in
+ * <stdio.h>"
+ */
+/* FIXME: handle all instances of constant long-double number (L)
+ * and *l() math functions.
+ */
+TRIO_PRIVATE void
+TrioWriteDouble
+TRIO_ARGS6((self, number, flags, width, precision, base),
+ trio_class_t *self,
+ trio_long_double_t number,
+ trio_flags_t flags,
+ int width,
+ int precision,
+ int base)
+{
+ trio_long_double_t integerNumber;
+ trio_long_double_t fractionNumber;
+ trio_long_double_t workNumber;
+ int integerDigits;
+ int fractionDigits;
+ int exponentDigits;
+ int baseDigits;
+ int integerThreshold;
+ int fractionThreshold;
+ int expectedWidth;
+ int exponent = 0;
+ unsigned int uExponent = 0;
+ int exponentBase;
+ trio_long_double_t dblBase;
+ trio_long_double_t dblIntegerBase;
+ trio_long_double_t dblFractionBase;
+ trio_long_double_t integerAdjust;
+ trio_long_double_t fractionAdjust;
+ BOOLEAN_T isNegative;
+ BOOLEAN_T isExponentNegative = FALSE;
+ BOOLEAN_T requireTwoDigitExponent;
+ BOOLEAN_T isHex;
+ TRIO_CONST char *digits;
+ char *groupingPointer;
+ int i;
+ int index;
+ BOOLEAN_T hasOnlyZeroes;
+ int zeroes = 0;
+ register int trailingZeroes;
+ BOOLEAN_T keepTrailingZeroes;
+ BOOLEAN_T keepDecimalPoint;
+ trio_long_double_t epsilon;
+
+ assert(VALID(self));
+ assert(VALID(self->OutStream));
+ assert(((base >= MIN_BASE) && (base <= MAX_BASE)) || (base == NO_BASE));
+
+ /* Determine sign and look for special quantities */
+ switch (trio_fpclassify_and_signbit(number, &isNegative))
+ {
+ case TRIO_FP_NAN:
+ TrioWriteString(self,
+ (flags & FLAGS_UPPER)
+ ? NAN_UPPER
+ : NAN_LOWER,
+ flags, width, precision);
+ return;
+
+ case TRIO_FP_INFINITE:
+ if (isNegative)
+ {
+ /* Negative infinity */
+ TrioWriteString(self,
+ (flags & FLAGS_UPPER)
+ ? "-" INFINITE_UPPER
+ : "-" INFINITE_LOWER,
+ flags, width, precision);
+ return;
+ }
+ else
+ {
+ /* Positive infinity */
+ TrioWriteString(self,
+ (flags & FLAGS_UPPER)
+ ? INFINITE_UPPER
+ : INFINITE_LOWER,
+ flags, width, precision);
+ return;
+ }
+
+ default:
+ /* Finitude */
+ break;
+ }
+
+ /* Normal numbers */
+ if (flags & FLAGS_LONGDOUBLE)
+ {
+ baseDigits = (base == 10)
+ ? LDBL_DIG
+ : (int)floor(LDBL_MANT_DIG / TrioLogarithmBase(base));
+ epsilon = LDBL_EPSILON;
+ }
+ else if (flags & FLAGS_SHORT)
+ {
+ baseDigits = (base == BASE_DECIMAL)
+ ? FLT_DIG
+ : (int)floor(FLT_MANT_DIG / TrioLogarithmBase(base));
+ epsilon = FLT_EPSILON;
+ }
+ else
+ {
+ baseDigits = (base == BASE_DECIMAL)
+ ? DBL_DIG
+ : (int)floor(DBL_MANT_DIG / TrioLogarithmBase(base));
+ epsilon = DBL_EPSILON;
+ }
+
+ digits = (flags & FLAGS_UPPER) ? internalDigitsUpper : internalDigitsLower;
+ isHex = (base == BASE_HEX);
+ if (base == NO_BASE)
+ base = BASE_DECIMAL;
+ dblBase = (trio_long_double_t)base;
+ keepTrailingZeroes = !( (flags & FLAGS_ROUNDING) ||
+ ( (flags & FLAGS_FLOAT_G) &&
+ !(flags & FLAGS_ALTERNATIVE) ) );
+
+ if (flags & FLAGS_ROUNDING)
+ precision = baseDigits;
+
+ if (precision == NO_PRECISION)
+ {
+ if (isHex)
+ {
+ keepTrailingZeroes = FALSE;
+ precision = FLT_MANT_DIG;
+ }
+ else
+ {
+ precision = FLT_DIG;
+ }
+ }
+
+ if (isNegative)
+ number = -number;
+
+ if (isHex)
+ flags |= FLAGS_FLOAT_E;
+
+ if (flags & FLAGS_FLOAT_G)
+ {
+ if (precision == 0)
+ precision = 1;
+
+ if ((number < 1.0E-4) || (number > powl(base,
+ (trio_long_double_t)precision)))
+ {
+ /* Use scientific notation */
+ flags |= FLAGS_FLOAT_E;
+ }
+ else if (number < 1.0)
+ {
+ /*
+ * Use normal notation. If the integer part of the number is
+ * zero, then adjust the precision to include leading fractional
+ * zeros.
+ */
+ workNumber = TrioLogarithm(number, base);
+ workNumber = TRIO_FABS(workNumber);
+ if (workNumber - floorl(workNumber) < 0.001)
+ workNumber--;
+ zeroes = (int)floorl(workNumber);
+ }
+ }
+
+ if (flags & FLAGS_FLOAT_E)
+ {
+ /* Scale the number */
+ workNumber = TrioLogarithm(number, base);
+ if (trio_isinf(workNumber) == -1)
+ {
+ exponent = 0;
+ /* Undo setting */
+ if (flags & FLAGS_FLOAT_G)
+ flags &= ~FLAGS_FLOAT_E;
+ }
+ else
+ {
+ exponent = (int)floorl(workNumber);
+ number /= powl(dblBase, (trio_long_double_t)exponent);
+ isExponentNegative = (exponent < 0);
+ uExponent = (isExponentNegative) ? -exponent : exponent;
+ if (isHex)
+ uExponent *= 4; /* log16(2) */
+ /* No thousand separators */
+ flags &= ~FLAGS_QUOTE;
+ }
+ }
+
+ integerNumber = floorl(number);
+ fractionNumber = number - integerNumber;
+
+ /*
+ * Truncated number.
+ *
+ * Precision is number of significant digits for FLOAT_G
+ * and number of fractional digits for others.
+ */
+ integerDigits = (integerNumber > epsilon)
+ ? 1 + (int)TrioLogarithm(integerNumber, base)
+ : 1;
+ fractionDigits = ((flags & FLAGS_FLOAT_G) && (zeroes == 0))
+ ? precision - integerDigits
+ : zeroes + precision;
+
+ dblFractionBase = TrioPower(base, fractionDigits);
+
+ workNumber = number + 0.5 / dblFractionBase;
+ if (floorl(number) != floorl(workNumber))
+ {
+ if (flags & FLAGS_FLOAT_E)
+ {
+ /* Adjust if number was rounded up one digit (ie. 0.99 to 1.00) */
+ exponent++;
+ isExponentNegative = (exponent < 0);
+ uExponent = (isExponentNegative) ? -exponent : exponent;
+ if (isHex)
+ uExponent *= 4; /* log16(2) */
+ workNumber = (number + 0.5 / dblFractionBase) / dblBase;
+ integerNumber = floorl(workNumber);
+ fractionNumber = workNumber - integerNumber;
+ }
+ else
+ {
+ /* Adjust if number was rounded up one digit (ie. 99 to 100) */
+ integerNumber = floorl(number + 0.5);
+ fractionNumber = 0.0;
+ integerDigits = (integerNumber > epsilon)
+ ? 1 + (int)TrioLogarithm(integerNumber, base)
+ : 1;
+ }
+ }
+
+ /* Estimate accuracy */
+ integerAdjust = fractionAdjust = 0.5;
+ if (flags & FLAGS_ROUNDING)
+ {
+ if (integerDigits > baseDigits)
+ {
+ integerThreshold = baseDigits;
+ fractionDigits = 0;
+ dblFractionBase = 1.0;
+ fractionThreshold = 0;
+ precision = 0; /* Disable decimal-point */
+ integerAdjust = TrioPower(base, integerDigits - integerThreshold - 1);
+ fractionAdjust = 0.0;
+ }
+ else
+ {
+ integerThreshold = integerDigits;
+ fractionThreshold = fractionDigits - integerThreshold;
+ fractionAdjust = 1.0;
+ }
+ }
+ else
+ {
+ integerThreshold = INT_MAX;
+ fractionThreshold = INT_MAX;
+ }
+
+ /*
+ * Calculate expected width.
+ * sign + integer part + thousands separators + decimal point
+ * + fraction + exponent
+ */
+ fractionAdjust /= dblFractionBase;
+ hasOnlyZeroes = (floorl((fractionNumber + fractionAdjust) * dblFractionBase) < epsilon);
+ keepDecimalPoint = ( (flags & FLAGS_ALTERNATIVE) ||
+ !((precision == 0) ||
+ (!keepTrailingZeroes && hasOnlyZeroes)) );
+ if (flags & FLAGS_FLOAT_E)
+ {
+ exponentDigits = (uExponent == 0)
+ ? 1
+ : (int)ceil(TrioLogarithm((double)(uExponent + 1),
+ (isHex) ? 10.0 : base));
+ }
+ else
+ exponentDigits = 0;
+ requireTwoDigitExponent = ((base == BASE_DECIMAL) && (exponentDigits == 1));
+
+ expectedWidth = integerDigits + fractionDigits
+ + (keepDecimalPoint
+ ? internalDecimalPointLength
+ : 0)
+ + ((flags & FLAGS_QUOTE)
+ ? TrioCalcThousandSeparatorLength(integerDigits)
+ : 0);
+ if (isNegative || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
+ expectedWidth += sizeof("-") - 1;
+ if (exponentDigits > 0)
+ expectedWidth += exponentDigits +
+ ((requireTwoDigitExponent ? sizeof("E+0") : sizeof("E+")) - 1);
+ if (isHex)
+ expectedWidth += sizeof("0X") - 1;
+
+ /* Output prefixing */
+ if (flags & FLAGS_NILPADDING)
+ {
+ /* Leading zeros must be after sign */
+ if (isNegative)
+ self->OutStream(self, '-');
+ else if (flags & FLAGS_SHOWSIGN)
+ self->OutStream(self, '+');
+ else if (flags & FLAGS_SPACE)
+ self->OutStream(self, ' ');
+ if (isHex)
+ {
+ self->OutStream(self, '0');
+ self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x');
+ }
+ if (!(flags & FLAGS_LEFTADJUST))
+ {
+ for (i = expectedWidth; i < width; i++)
+ {
+ self->OutStream(self, '0');
+ }
+ }
+ }
+ else
+ {
+ /* Leading spaces must be before sign */
+ if (!(flags & FLAGS_LEFTADJUST))
+ {
+ for (i = expectedWidth; i < width; i++)
+ {
+ self->OutStream(self, CHAR_ADJUST);
+ }
+ }
+ if (isNegative)
+ self->OutStream(self, '-');
+ else if (flags & FLAGS_SHOWSIGN)
+ self->OutStream(self, '+');
+ else if (flags & FLAGS_SPACE)
+ self->OutStream(self, ' ');
+ if (isHex)
+ {
+ self->OutStream(self, '0');
+ self->OutStream(self, (flags & FLAGS_UPPER) ? 'X' : 'x');
+ }
+ }
+
+ /* Output the integer part and thousand separators */
+ dblIntegerBase = 1.0 / TrioPower(base, integerDigits - 1);
+ for (i = 0; i < integerDigits; i++)
+ {
+ workNumber = floorl(((integerNumber + integerAdjust) * dblIntegerBase));
+ if (i > integerThreshold)
+ {
+ /* Beyond accuracy */
+ self->OutStream(self, digits[0]);
+ }
+ else
+ {
+ self->OutStream(self, digits[(int)fmodl(workNumber, dblBase)]);
+ }
+ dblIntegerBase *= dblBase;
+
+ if (((flags & (FLAGS_FLOAT_E | FLAGS_QUOTE)) == FLAGS_QUOTE)
+ && TrioFollowedBySeparator(integerDigits - i))
+ {
+ for (groupingPointer = internalThousandSeparator;
+ *groupingPointer != NIL;
+ groupingPointer++)
+ {
+ self->OutStream(self, *groupingPointer);
+ }
+ }
+ }
+
+ /* Insert decimal point and build the fraction part */
+ trailingZeroes = 0;
+
+ if (keepDecimalPoint)
+ {
+ if (internalDecimalPoint)
+ {
+ self->OutStream(self, internalDecimalPoint);
+ }
+ else
+ {
+ for (i = 0; i < internalDecimalPointLength; i++)
+ {
+ self->OutStream(self, internalDecimalPointString[i]);
+ }
+ }
+ }
+
+ for (i = 0; i < fractionDigits; i++)
+ {
+ if ((integerDigits > integerThreshold) || (i > fractionThreshold))
+ {
+ /* Beyond accuracy */
+ trailingZeroes++;
+ }
+ else
+ {
+ fractionNumber *= dblBase;
+ fractionAdjust *= dblBase;
+ workNumber = floorl(fractionNumber + fractionAdjust);
+ fractionNumber -= workNumber;
+ index = (int)fmodl(workNumber, dblBase);
+ if (index == 0)
+ {
+ trailingZeroes++;
+ }
+ else
+ {
+ while (trailingZeroes > 0)
+ {
+ /* Not trailing zeroes after all */
+ self->OutStream(self, digits[0]);
+ trailingZeroes--;
+ }
+ self->OutStream(self, digits[index]);
+ }
+ }
+ }
+
+ if (keepTrailingZeroes)
+ {
+ while (trailingZeroes > 0)
+ {
+ self->OutStream(self, digits[0]);
+ trailingZeroes--;
+ }
+ }
+
+ /* Output exponent */
+ if (exponentDigits > 0)
+ {
+ self->OutStream(self,
+ isHex
+ ? ((flags & FLAGS_UPPER) ? 'P' : 'p')
+ : ((flags & FLAGS_UPPER) ? 'E' : 'e'));
+ self->OutStream(self, (isExponentNegative) ? '-' : '+');
+
+ /* The exponent must contain at least two digits */
+ if (requireTwoDigitExponent)
+ self->OutStream(self, '0');
+
+ if (isHex)
+ base = 10.0;
+ exponentBase = (int)TrioPower(base, exponentDigits - 1);
+ for (i = 0; i < exponentDigits; i++)
+ {
+ self->OutStream(self, digits[(uExponent / exponentBase) % base]);
+ exponentBase /= base;
+ }
+ }
+ /* Output trailing spaces */
+ if (flags & FLAGS_LEFTADJUST)
+ {
+ for (i = expectedWidth; i < width; i++)
+ {
+ self->OutStream(self, CHAR_ADJUST);
+ }
+ }
+}
+
+/*************************************************************************
+ * TrioFormatProcess
+ *
+ * Description:
+ * This is the main engine for formatting output
+ */
+TRIO_PRIVATE int
+TrioFormatProcess
+TRIO_ARGS3((data, format, parameters),
+ trio_class_t *data,
+ TRIO_CONST char *format,
+ trio_parameter_t *parameters)
+{
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ int charlen;
+#endif
+ int i;
+ TRIO_CONST char *string;
+ trio_pointer_t pointer;
+ trio_flags_t flags;
+ int width;
+ int precision;
+ int base;
+ int index;
+
+ index = 0;
+ i = 0;
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ (void)mblen(NULL, 0);
+#endif
+
+ while (format[index])
+ {
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ if (! isascii(format[index]))
+ {
+ charlen = mblen(&format[index], MB_LEN_MAX);
+ /*
+ * Only valid multibyte characters are handled here. Invalid
+ * multibyte characters (charlen == -1) are handled as normal
+ * characters.
+ */
+ if (charlen != -1)
+ {
+ while (charlen-- > 0)
+ {
+ data->OutStream(data, format[index++]);
+ }
+ continue; /* while characters left in formatting string */
+ }
+ }
+#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */
+ if (CHAR_IDENTIFIER == format[index])
+ {
+ if (CHAR_IDENTIFIER == format[index + 1])
+ {
+ data->OutStream(data, CHAR_IDENTIFIER);
+ index += 2;
+ }
+ else
+ {
+ /* Skip the parameter entries */
+ while (parameters[i].type == FORMAT_PARAMETER)
+ i++;
+
+ flags = parameters[i].flags;
+
+ /* Find width */
+ width = parameters[i].width;
+ if (flags & FLAGS_WIDTH_PARAMETER)
+ {
+ /* Get width from parameter list */
+ width = (int)parameters[width].data.number.as_signed;
+ if (width < 0)
+ {
+ /*
+ * A negative width is the same as the - flag and
+ * a positive width.
+ */
+ flags |= FLAGS_LEFTADJUST;
+ flags &= ~FLAGS_NILPADDING;
+ width = -width;
+ }
+ }
+
+ /* Find precision */
+ if (flags & FLAGS_PRECISION)
+ {
+ precision = parameters[i].precision;
+ if (flags & FLAGS_PRECISION_PARAMETER)
+ {
+ /* Get precision from parameter list */
+ precision = (int)parameters[precision].data.number.as_signed;
+ if (precision < 0)
+ {
+ /*
+ * A negative precision is the same as no
+ * precision
+ */
+ precision = NO_PRECISION;
+ }
+ }
+ }
+ else
+ {
+ precision = NO_PRECISION;
+ }
+
+ /* Find base */
+ base = parameters[i].base;
+ if (flags & FLAGS_BASE_PARAMETER)
+ {
+ /* Get base from parameter list */
+ base = (int)parameters[base].data.number.as_signed;
+ }
+
+ switch (parameters[i].type)
+ {
+ case FORMAT_CHAR:
+ if (flags & FLAGS_QUOTE)
+ data->OutStream(data, CHAR_QUOTE);
+ if (! (flags & FLAGS_LEFTADJUST))
+ {
+ while (--width > 0)
+ data->OutStream(data, CHAR_ADJUST);
+ }
+#if TRIO_WIDECHAR
+ if (flags & FLAGS_WIDECHAR)
+ {
+ TrioWriteWideStringCharacter(data,
+ (trio_wchar_t)parameters[i].data.number.as_signed,
+ flags,
+ NO_WIDTH);
+ }
+ else
+#endif
+ {
+ TrioWriteStringCharacter(data,
+ (int)parameters[i].data.number.as_signed,
+ flags);
+ }
+
+ if (flags & FLAGS_LEFTADJUST)
+ {
+ while(--width > 0)
+ data->OutStream(data, CHAR_ADJUST);
+ }
+ if (flags & FLAGS_QUOTE)
+ data->OutStream(data, CHAR_QUOTE);
+
+ break; /* FORMAT_CHAR */
+
+ case FORMAT_INT:
+ TrioWriteNumber(data,
+ parameters[i].data.number.as_unsigned,
+ flags,
+ width,
+ precision,
+ base);
+
+ break; /* FORMAT_INT */
+
+ case FORMAT_DOUBLE:
+ TrioWriteDouble(data,
+ parameters[i].data.longdoubleNumber,
+ flags,
+ width,
+ precision,
+ base);
+ break; /* FORMAT_DOUBLE */
+
+ case FORMAT_STRING:
+#if TRIO_WIDECHAR
+ if (flags & FLAGS_WIDECHAR)
+ {
+ TrioWriteWideString(data,
+ parameters[i].data.wstring,
+ flags,
+ width,
+ precision);
+ }
+ else
+#endif
+ {
+ TrioWriteString(data,
+ parameters[i].data.string,
+ flags,
+ width,
+ precision);
+ }
+ break; /* FORMAT_STRING */
+
+ case FORMAT_POINTER:
+ {
+ trio_reference_t reference;
+
+ reference.data = data;
+ reference.parameter = &parameters[i];
+ trio_print_pointer(&reference, parameters[i].data.pointer);
+ }
+ break; /* FORMAT_POINTER */
+
+ case FORMAT_COUNT:
+ pointer = parameters[i].data.pointer;
+ if (NULL != pointer)
+ {
+ /*
+ * C99 paragraph 7.19.6.1.8 says "the number of
+ * characters written to the output stream so far by
+ * this call", which is data->committed
+ */
+#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER)
+ if (flags & FLAGS_SIZE_T)
+ *(size_t *)pointer = (size_t)data->committed;
+ else
+#endif
+#if defined(QUALIFIER_PTRDIFF_T)
+ if (flags & FLAGS_PTRDIFF_T)
+ *(ptrdiff_t *)pointer = (ptrdiff_t)data->committed;
+ else
+#endif
+#if defined(QUALIFIER_INTMAX_T)
+ if (flags & FLAGS_INTMAX_T)
+ *(trio_intmax_t *)pointer = (trio_intmax_t)data->committed;
+ else
+#endif
+ if (flags & FLAGS_QUAD)
+ {
+ *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)data->committed;
+ }
+ else if (flags & FLAGS_LONG)
+ {
+ *(long int *)pointer = (long int)data->committed;
+ }
+ else if (flags & FLAGS_SHORT)
+ {
+ *(short int *)pointer = (short int)data->committed;
+ }
+ else
+ {
+ *(int *)pointer = (int)data->committed;
+ }
+ }
+ break; /* FORMAT_COUNT */
+
+ case FORMAT_PARAMETER:
+ break; /* FORMAT_PARAMETER */
+
+#if defined(FORMAT_ERRNO)
+ case FORMAT_ERRNO:
+ string = trio_error(parameters[i].data.errorNumber);
+ if (string)
+ {
+ TrioWriteString(data,
+ string,
+ flags,
+ width,
+ precision);
+ }
+ else
+ {
+ data->OutStream(data, '#');
+ TrioWriteNumber(data,
+ (trio_uintmax_t)parameters[i].data.errorNumber,
+ flags,
+ width,
+ precision,
+ BASE_DECIMAL);
+ }
+ break; /* FORMAT_ERRNO */
+#endif /* defined(FORMAT_ERRNO) */
+
+#if defined(FORMAT_USER_DEFINED)
+ case FORMAT_USER_DEFINED:
+ {
+ trio_reference_t reference;
+ trio_userdef_t *def = NULL;
+
+ if (parameters[i].user_name[0] == NIL)
+ {
+ /* Use handle */
+ if ((i > 0) ||
+ (parameters[i - 1].type == FORMAT_PARAMETER))
+ def = (trio_userdef_t *)parameters[i - 1].data.pointer;
+ }
+ else
+ {
+ /* Look up namespace */
+ def = TrioFindNamespace(parameters[i].user_name, NULL);
+ }
+ if (def) {
+ reference.data = data;
+ reference.parameter = &parameters[i];
+ def->callback(&reference);
+ }
+ }
+ break;
+#endif /* defined(FORMAT_USER_DEFINED) */
+
+ default:
+ break;
+ } /* switch parameter type */
+
+ /* Prepare for next */
+ index = parameters[i].indexAfterSpecifier;
+ i++;
+ }
+ }
+ else /* not identifier */
+ {
+ data->OutStream(data, format[index++]);
+ }
+ }
+ return data->processed;
+}
+
+/*************************************************************************
+ * TrioFormatRef
+ */
+TRIO_PRIVATE int
+TrioFormatRef
+TRIO_ARGS4((reference, format, arglist, argarray),
+ trio_reference_t *reference,
+ TRIO_CONST char *format,
+ TRIO_VA_LIST_PTR arglist,
+ trio_pointer_t *argarray)
+{
+ int status;
+ trio_parameter_t parameters[MAX_PARAMETERS];
+
+ status = TrioParse(TYPE_PRINT, format, parameters, arglist, argarray);
+ if (status < 0)
+ return status;
+
+ status = TrioFormatProcess(reference->data, format, parameters);
+ if (reference->data->error != 0)
+ {
+ status = reference->data->error;
+ }
+ return status;
+}
+
+/*************************************************************************
+ * TrioFormat
+ */
+TRIO_PRIVATE int
+TrioFormat
+TRIO_ARGS6((destination, destinationSize, OutStream, format, arglist, argarray),
+ trio_pointer_t destination,
+ size_t destinationSize,
+ void (*OutStream) TRIO_PROTO((trio_class_t *, int)),
+ TRIO_CONST char *format,
+ TRIO_VA_LIST_PTR arglist,
+ trio_pointer_t *argarray)
+{
+ int status;
+ trio_class_t data;
+ trio_parameter_t parameters[MAX_PARAMETERS];
+
+ assert(VALID(OutStream));
+ assert(VALID(format));
+
+ memset(&data, 0, sizeof(data));
+ data.OutStream = OutStream;
+ data.location = destination;
+ data.max = destinationSize;
+ data.error = 0;
+
+#if defined(USE_LOCALE)
+ if (NULL == internalLocaleValues)
+ {
+ TrioSetLocale();
+ }
+#endif
+
+ status = TrioParse(TYPE_PRINT, format, parameters, arglist, argarray);
+ if (status < 0)
+ return status;
+
+ status = TrioFormatProcess(&data, format, parameters);
+ if (data.error != 0)
+ {
+ status = data.error;
+ }
+ return status;
+}
+
+/*************************************************************************
+ * TrioOutStreamFile
+ */
+TRIO_PRIVATE void
+TrioOutStreamFile
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ FILE *file;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ file = (FILE *)self->location;
+ self->processed++;
+ if (fputc(output, file) == EOF)
+ {
+ self->error = TRIO_ERROR_RETURN(TRIO_EOF, 0);
+ }
+ else
+ {
+ self->committed++;
+ }
+}
+
+/*************************************************************************
+ * TrioOutStreamFileDescriptor
+ */
+TRIO_PRIVATE void
+TrioOutStreamFileDescriptor
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ int fd;
+ char ch;
+
+ assert(VALID(self));
+
+ fd = *((int *)self->location);
+ ch = (char)output;
+ self->processed++;
+ if (write(fd, &ch, sizeof(char)) == -1)
+ {
+ self->error = TRIO_ERROR_RETURN(TRIO_ERRNO, 0);
+ }
+ else
+ {
+ self->committed++;
+ }
+}
+
+/*************************************************************************
+ * TrioOutStreamCustom
+ */
+TRIO_PRIVATE void
+TrioOutStreamCustom
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ int status;
+ trio_custom_t *data;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ data = (trio_custom_t *)self->location;
+ if (data->stream.out)
+ {
+ status = (data->stream.out)(data->closure, output);
+ if (status >= 0)
+ {
+ self->committed++;
+ }
+ else
+ {
+ if (self->error == 0)
+ {
+ self->error = TRIO_ERROR_RETURN(TRIO_ECUSTOM, -status);
+ }
+ }
+ }
+ self->processed++;
+}
+
+/*************************************************************************
+ * TrioOutStreamString
+ */
+TRIO_PRIVATE void
+TrioOutStreamString
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ char **buffer;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ buffer = (char **)self->location;
+ **buffer = (char)output;
+ (*buffer)++;
+ self->processed++;
+ self->committed++;
+}
+
+/*************************************************************************
+ * TrioOutStreamStringMax
+ */
+TRIO_PRIVATE void
+TrioOutStreamStringMax
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ char **buffer;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ buffer = (char **)self->location;
+
+ if (self->processed < self->max)
+ {
+ **buffer = (char)output;
+ (*buffer)++;
+ self->committed++;
+ }
+ self->processed++;
+}
+
+/*************************************************************************
+ * TrioOutStreamStringDynamic
+ */
+TRIO_PRIVATE void
+TrioOutStreamStringDynamic
+TRIO_ARGS2((self, output),
+ trio_class_t *self,
+ int output)
+{
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ if (self->error == 0)
+ {
+ trio_xstring_append_char((trio_string_t *)self->location,
+ (char)output);
+ self->committed++;
+ }
+ /* The processed variable must always be increased */
+ self->processed++;
+}
+
+/*************************************************************************
+ *
+ * Formatted printing functions
+ *
+ ************************************************************************/
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_printf.h"
+#endif
+/** @addtogroup Printf
+ @{
+*/
+
+/*************************************************************************
+ * printf
+ */
+
+/**
+ Print to standard output stream.
+
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_printf
+TRIO_VARGS2((format, va_alist),
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioFormat(stdout, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+/**
+ Print to standard output stream.
+
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_vprintf
+TRIO_ARGS2((format, args),
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(format));
+
+ return TrioFormat(stdout, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+/**
+ Print to standard output stream.
+
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_printfv
+TRIO_ARGS2((format, args),
+ TRIO_CONST char *format,
+ trio_pointer_t * args)
+{
+ assert(VALID(format));
+
+ return TrioFormat(stdout, 0, TrioOutStreamFile, format, NULL, args);
+}
+
+/*************************************************************************
+ * fprintf
+ */
+
+/**
+ Print to file.
+
+ @param file File pointer.
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_fprintf
+TRIO_VARGS3((file, format, va_alist),
+ FILE *file,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(file));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioFormat(file, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+/**
+ Print to file.
+
+ @param file File pointer.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_vfprintf
+TRIO_ARGS3((file, format, args),
+ FILE *file,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(file));
+ assert(VALID(format));
+
+ return TrioFormat(file, 0, TrioOutStreamFile, format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+/**
+ Print to file.
+
+ @param file File pointer.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_fprintfv
+TRIO_ARGS3((file, format, args),
+ FILE *file,
+ TRIO_CONST char *format,
+ trio_pointer_t * args)
+{
+ assert(VALID(file));
+ assert(VALID(format));
+
+ return TrioFormat(file, 0, TrioOutStreamFile, format, NULL, args);
+}
+
+/*************************************************************************
+ * dprintf
+ */
+
+/**
+ Print to file descriptor.
+
+ @param fd File descriptor.
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_dprintf
+TRIO_VARGS3((fd, format, va_alist),
+ int fd,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+/**
+ Print to file descriptor.
+
+ @param fd File descriptor.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_vdprintf
+TRIO_ARGS3((fd, format, args),
+ int fd,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(format));
+
+ return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+/**
+ Print to file descriptor.
+
+ @param fd File descriptor.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_dprintfv
+TRIO_ARGS3((fd, format, args),
+ int fd,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ assert(VALID(format));
+
+ return TrioFormat(&fd, 0, TrioOutStreamFileDescriptor, format, NULL, args);
+}
+
+/*************************************************************************
+ * cprintf
+ */
+TRIO_PUBLIC int
+trio_cprintf
+TRIO_VARGS4((stream, closure, format, va_alist),
+ trio_outstream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ data.stream.out = stream;
+ data.closure = closure;
+ status = TrioFormat(&data, 0, TrioOutStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vcprintf
+TRIO_ARGS4((stream, closure, format, args),
+ trio_outstream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ data.stream.out = stream;
+ data.closure = closure;
+ return TrioFormat(&data, 0, TrioOutStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_cprintfv
+TRIO_ARGS4((stream, closure, format, args),
+ trio_outstream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ void **args)
+{
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ data.stream.out = stream;
+ data.closure = closure;
+ return TrioFormat(&data, 0, TrioOutStreamCustom, format, NULL, args);
+}
+
+/*************************************************************************
+ * sprintf
+ */
+
+/**
+ Print to string.
+
+ @param buffer Output string.
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_sprintf
+TRIO_VARGS3((buffer, format, va_alist),
+ char *buffer,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioFormat(&buffer, 0, TrioOutStreamString, format, TRIO_VA_LIST_ADDR(args), NULL);
+ *buffer = NIL; /* Terminate with NIL character */
+ TRIO_VA_END(args);
+ return status;
+}
+
+/**
+ Print to string.
+
+ @param buffer Output string.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_vsprintf
+TRIO_ARGS3((buffer, format, args),
+ char *buffer,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ int status;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ status = TrioFormat(&buffer, 0, TrioOutStreamString, format, TRIO_VA_LIST_ADDR(args), NULL);
+ *buffer = NIL;
+ return status;
+}
+
+/**
+ Print to string.
+
+ @param buffer Output string.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_sprintfv
+TRIO_ARGS3((buffer, format, args),
+ char *buffer,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ int status;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ status = TrioFormat(&buffer, 0, TrioOutStreamString, format, NULL, args);
+ *buffer = NIL;
+ return status;
+}
+
+/*************************************************************************
+ * snprintf
+ */
+
+/**
+ Print at most @p max characters to string.
+
+ @param buffer Output string.
+ @param max Maximum number of characters to print.
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_snprintf
+TRIO_VARGS4((buffer, max, format, va_alist),
+ char *buffer,
+ size_t max,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
+ TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
+ if (max > 0)
+ *buffer = NIL;
+ TRIO_VA_END(args);
+ return status;
+}
+
+/**
+ Print at most @p max characters to string.
+
+ @param buffer Output string.
+ @param max Maximum number of characters to print.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_vsnprintf
+TRIO_ARGS4((buffer, max, format, args),
+ char *buffer,
+ size_t max,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ int status;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
+ TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
+ if (max > 0)
+ *buffer = NIL;
+ return status;
+}
+
+/**
+ Print at most @p max characters to string.
+
+ @param buffer Output string.
+ @param max Maximum number of characters to print.
+ @param format Formatting string.
+ @param args Arguments.
+ @return Number of printed characters.
+ */
+TRIO_PUBLIC int
+trio_snprintfv
+TRIO_ARGS4((buffer, max, format, args),
+ char *buffer,
+ size_t max,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ int status;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ status = TrioFormat(&buffer, max > 0 ? max - 1 : 0,
+ TrioOutStreamStringMax, format, NULL, args);
+ if (max > 0)
+ *buffer = NIL;
+ return status;
+}
+
+/*************************************************************************
+ * snprintfcat
+ * Appends the new string to the buffer string overwriting the '\0'
+ * character at the end of buffer.
+ */
+TRIO_PUBLIC int
+trio_snprintfcat
+TRIO_VARGS4((buffer, max, format, va_alist),
+ char *buffer,
+ size_t max,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+ size_t buf_len;
+
+ TRIO_VA_START(args, format);
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ buf_len = trio_length(buffer);
+ buffer = &buffer[buf_len];
+
+ status = TrioFormat(&buffer, max - 1 - buf_len,
+ TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ *buffer = NIL;
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vsnprintfcat
+TRIO_ARGS4((buffer, max, format, args),
+ char *buffer,
+ size_t max,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ int status;
+ size_t buf_len;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ buf_len = trio_length(buffer);
+ buffer = &buffer[buf_len];
+ status = TrioFormat(&buffer, max - 1 - buf_len,
+ TrioOutStreamStringMax, format, TRIO_VA_LIST_ADDR(args), NULL);
+ *buffer = NIL;
+ return status;
+}
+
+/*************************************************************************
+ * trio_aprintf
+ */
+
+/* Deprecated */
+TRIO_PUBLIC char *
+trio_aprintf
+TRIO_VARGS2((format, va_alist),
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ va_list args;
+ trio_string_t *info;
+ char *result = NULL;
+
+ assert(VALID(format));
+
+ info = trio_xstring_duplicate("");
+ if (info)
+ {
+ TRIO_VA_START(args, format);
+ (void)TrioFormat(info, 0, TrioOutStreamStringDynamic,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+
+ trio_string_terminate(info);
+ result = trio_string_extract(info);
+ trio_string_destroy(info);
+ }
+ return result;
+}
+
+/* Deprecated */
+TRIO_PUBLIC char *
+trio_vaprintf
+TRIO_ARGS2((format, args),
+ TRIO_CONST char *format,
+ va_list args)
+{
+ trio_string_t *info;
+ char *result = NULL;
+
+ assert(VALID(format));
+
+ info = trio_xstring_duplicate("");
+ if (info)
+ {
+ (void)TrioFormat(info, 0, TrioOutStreamStringDynamic,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ trio_string_terminate(info);
+ result = trio_string_extract(info);
+ trio_string_destroy(info);
+ }
+ return result;
+}
+
+TRIO_PUBLIC int
+trio_asprintf
+TRIO_VARGS3((result, format, va_alist),
+ char **result,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ va_list args;
+ int status;
+ trio_string_t *info;
+
+ assert(VALID(format));
+
+ *result = NULL;
+
+ info = trio_xstring_duplicate("");
+ if (info == NULL)
+ {
+ status = TRIO_ERROR_RETURN(TRIO_ENOMEM, 0);
+ }
+ else
+ {
+ TRIO_VA_START(args, format);
+ status = TrioFormat(info, 0, TrioOutStreamStringDynamic,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ if (status >= 0)
+ {
+ trio_string_terminate(info);
+ *result = trio_string_extract(info);
+ }
+ trio_string_destroy(info);
+ }
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vasprintf
+TRIO_ARGS3((result, format, args),
+ char **result,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ int status;
+ trio_string_t *info;
+
+ assert(VALID(format));
+
+ *result = NULL;
+
+ info = trio_xstring_duplicate("");
+ if (info == NULL)
+ {
+ status = TRIO_ERROR_RETURN(TRIO_ENOMEM, 0);
+ }
+ else
+ {
+ status = TrioFormat(info, 0, TrioOutStreamStringDynamic,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ if (status >= 0)
+ {
+ trio_string_terminate(info);
+ *result = trio_string_extract(info);
+ }
+ trio_string_destroy(info);
+ }
+ return status;
+}
+
+/** @} End of Printf documentation module */
+
+/*************************************************************************
+ *
+ * CALLBACK
+ *
+ ************************************************************************/
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_register.h"
+#endif
+/**
+ @addtogroup UserDefined
+ @{
+*/
+
+#if TRIO_EXTENSION
+
+/*************************************************************************
+ * trio_register
+ */
+
+/**
+ Register new user-defined specifier.
+
+ @param callback
+ @param name
+ @return Handle.
+ */
+TRIO_PUBLIC trio_pointer_t
+trio_register
+TRIO_ARGS2((callback, name),
+ trio_callback_t callback,
+ TRIO_CONST char *name)
+{
+ trio_userdef_t *def;
+ trio_userdef_t *prev = NULL;
+
+ if (callback == NULL)
+ return NULL;
+
+ if (name)
+ {
+ /* Handle built-in namespaces */
+ if (name[0] == ':')
+ {
+ if (trio_equal(name, ":enter"))
+ {
+ internalEnterCriticalRegion = callback;
+ }
+ else if (trio_equal(name, ":leave"))
+ {
+ internalLeaveCriticalRegion = callback;
+ }
+ return NULL;
+ }
+
+ /* Bail out if namespace is too long */
+ if (trio_length(name) >= MAX_USER_NAME)
+ return NULL;
+
+ /* Bail out if namespace already is registered */
+ def = TrioFindNamespace(name, &prev);
+ if (def)
+ return NULL;
+ }
+
+ def = (trio_userdef_t *)TRIO_MALLOC(sizeof(trio_userdef_t));
+ if (def)
+ {
+ if (internalEnterCriticalRegion)
+ (void)internalEnterCriticalRegion(NULL);
+
+ if (name)
+ {
+ /* Link into internal list */
+ if (prev == NULL)
+ internalUserDef = def;
+ else
+ prev->next = def;
+ }
+ /* Initialize */
+ def->callback = callback;
+ def->name = (name == NULL)
+ ? NULL
+ : trio_duplicate(name);
+ def->next = NULL;
+
+ if (internalLeaveCriticalRegion)
+ (void)internalLeaveCriticalRegion(NULL);
+ }
+ return (trio_pointer_t)def;
+}
+
+/**
+ Unregister an existing user-defined specifier.
+
+ @param handle
+ */
+void
+trio_unregister
+TRIO_ARGS1((handle),
+ trio_pointer_t handle)
+{
+ trio_userdef_t *self = (trio_userdef_t *)handle;
+ trio_userdef_t *def;
+ trio_userdef_t *prev = NULL;
+
+ assert(VALID(self));
+
+ if (self->name)
+ {
+ def = TrioFindNamespace(self->name, &prev);
+ if (def)
+ {
+ if (internalEnterCriticalRegion)
+ (void)internalEnterCriticalRegion(NULL);
+
+ if (prev == NULL)
+ internalUserDef = NULL;
+ else
+ prev->next = def->next;
+
+ if (internalLeaveCriticalRegion)
+ (void)internalLeaveCriticalRegion(NULL);
+ }
+ trio_destroy(self->name);
+ }
+ TRIO_FREE(self);
+}
+
+/*************************************************************************
+ * trio_get_format [public]
+ */
+TRIO_CONST char *
+trio_get_format
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+#if defined(FORMAT_USER_DEFINED)
+ assert(((trio_reference_t *)ref)->parameter->type == FORMAT_USER_DEFINED);
+#endif
+
+ return (((trio_reference_t *)ref)->parameter->user_data);
+}
+
+/*************************************************************************
+ * trio_get_argument [public]
+ */
+trio_pointer_t
+trio_get_argument
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+#if defined(FORMAT_USER_DEFINED)
+ assert(((trio_reference_t *)ref)->parameter->type == FORMAT_USER_DEFINED);
+#endif
+
+ return ((trio_reference_t *)ref)->parameter->data.pointer;
+}
+
+/*************************************************************************
+ * trio_get_width / trio_set_width [public]
+ */
+int
+trio_get_width
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return ((trio_reference_t *)ref)->parameter->width;
+}
+
+void
+trio_set_width
+TRIO_ARGS2((ref, width),
+ trio_pointer_t ref,
+ int width)
+{
+ ((trio_reference_t *)ref)->parameter->width = width;
+}
+
+/*************************************************************************
+ * trio_get_precision / trio_set_precision [public]
+ */
+int
+trio_get_precision
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->precision);
+}
+
+void
+trio_set_precision
+TRIO_ARGS2((ref, precision),
+ trio_pointer_t ref,
+ int precision)
+{
+ ((trio_reference_t *)ref)->parameter->precision = precision;
+}
+
+/*************************************************************************
+ * trio_get_base / trio_set_base [public]
+ */
+int
+trio_get_base
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->base);
+}
+
+void
+trio_set_base
+TRIO_ARGS2((ref, base),
+ trio_pointer_t ref,
+ int base)
+{
+ ((trio_reference_t *)ref)->parameter->base = base;
+}
+
+/*************************************************************************
+ * trio_get_long / trio_set_long [public]
+ */
+int
+trio_get_long
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_LONG)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_long
+TRIO_ARGS2((ref, is_long),
+ trio_pointer_t ref,
+ int is_long)
+{
+ if (is_long)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LONG;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LONG;
+}
+
+/*************************************************************************
+ * trio_get_longlong / trio_set_longlong [public]
+ */
+int
+trio_get_longlong
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_QUAD)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_longlong
+TRIO_ARGS2((ref, is_longlong),
+ trio_pointer_t ref,
+ int is_longlong)
+{
+ if (is_longlong)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_QUAD;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_QUAD;
+}
+
+/*************************************************************************
+ * trio_get_longdouble / trio_set_longdouble [public]
+ */
+int
+trio_get_longdouble
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_LONGDOUBLE)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_longdouble
+TRIO_ARGS2((ref, is_longdouble),
+ trio_pointer_t ref,
+ int is_longdouble)
+{
+ if (is_longdouble)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LONGDOUBLE;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LONGDOUBLE;
+}
+
+/*************************************************************************
+ * trio_get_short / trio_set_short [public]
+ */
+int
+trio_get_short
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_SHORT)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_short
+TRIO_ARGS2((ref, is_short),
+ trio_pointer_t ref,
+ int is_short)
+{
+ if (is_short)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHORT;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHORT;
+}
+
+/*************************************************************************
+ * trio_get_shortshort / trio_set_shortshort [public]
+ */
+int
+trio_get_shortshort
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_SHORTSHORT)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_shortshort
+TRIO_ARGS2((ref, is_shortshort),
+ trio_pointer_t ref,
+ int is_shortshort)
+{
+ if (is_shortshort)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHORTSHORT;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHORTSHORT;
+}
+
+/*************************************************************************
+ * trio_get_alternative / trio_set_alternative [public]
+ */
+int
+trio_get_alternative
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_ALTERNATIVE)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_alternative
+TRIO_ARGS2((ref, is_alternative),
+ trio_pointer_t ref,
+ int is_alternative)
+{
+ if (is_alternative)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_ALTERNATIVE;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_ALTERNATIVE;
+}
+
+/*************************************************************************
+ * trio_get_alignment / trio_set_alignment [public]
+ */
+int
+trio_get_alignment
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_LEFTADJUST)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_alignment
+TRIO_ARGS2((ref, is_leftaligned),
+ trio_pointer_t ref,
+ int is_leftaligned)
+{
+ if (is_leftaligned)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_LEFTADJUST;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_LEFTADJUST;
+}
+
+/*************************************************************************
+ * trio_get_spacing /trio_set_spacing [public]
+ */
+int
+trio_get_spacing
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_SPACE)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_spacing
+TRIO_ARGS2((ref, is_space),
+ trio_pointer_t ref,
+ int is_space)
+{
+ if (is_space)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SPACE;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SPACE;
+}
+
+/*************************************************************************
+ * trio_get_sign / trio_set_sign [public]
+ */
+int
+trio_get_sign
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_SHOWSIGN)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_sign
+TRIO_ARGS2((ref, is_sign),
+ trio_pointer_t ref,
+ int is_sign)
+{
+ if (is_sign)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SHOWSIGN;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SHOWSIGN;
+}
+
+/*************************************************************************
+ * trio_get_padding / trio_set_padding [public]
+ */
+int
+trio_get_padding
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_NILPADDING)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_padding
+TRIO_ARGS2((ref, is_padding),
+ trio_pointer_t ref,
+ int is_padding)
+{
+ if (is_padding)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_NILPADDING;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_NILPADDING;
+}
+
+/*************************************************************************
+ * trio_get_quote / trio_set_quote [public]
+ */
+int
+trio_get_quote
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_QUOTE)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_quote
+TRIO_ARGS2((ref, is_quote),
+ trio_pointer_t ref,
+ int is_quote)
+{
+ if (is_quote)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_QUOTE;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_QUOTE;
+}
+
+/*************************************************************************
+ * trio_get_upper / trio_set_upper [public]
+ */
+int
+trio_get_upper
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_UPPER)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_upper
+TRIO_ARGS2((ref, is_upper),
+ trio_pointer_t ref,
+ int is_upper)
+{
+ if (is_upper)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_UPPER;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_UPPER;
+}
+
+/*************************************************************************
+ * trio_get_largest / trio_set_largest [public]
+ */
+#if TRIO_C99
+int
+trio_get_largest
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_INTMAX_T)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_largest
+TRIO_ARGS2((ref, is_largest),
+ trio_pointer_t ref,
+ int is_largest)
+{
+ if (is_largest)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_INTMAX_T;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_INTMAX_T;
+}
+#endif
+
+/*************************************************************************
+ * trio_get_ptrdiff / trio_set_ptrdiff [public]
+ */
+int
+trio_get_ptrdiff
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_PTRDIFF_T)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_ptrdiff
+TRIO_ARGS2((ref, is_ptrdiff),
+ trio_pointer_t ref,
+ int is_ptrdiff)
+{
+ if (is_ptrdiff)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_PTRDIFF_T;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_PTRDIFF_T;
+}
+
+/*************************************************************************
+ * trio_get_size / trio_set_size [public]
+ */
+#if TRIO_C99
+int
+trio_get_size
+TRIO_ARGS1((ref),
+ trio_pointer_t ref)
+{
+ return (((trio_reference_t *)ref)->parameter->flags & FLAGS_SIZE_T)
+ ? TRUE
+ : FALSE;
+}
+
+void
+trio_set_size
+TRIO_ARGS2((ref, is_size),
+ trio_pointer_t ref,
+ int is_size)
+{
+ if (is_size)
+ ((trio_reference_t *)ref)->parameter->flags |= FLAGS_SIZE_T;
+ else
+ ((trio_reference_t *)ref)->parameter->flags &= ~FLAGS_SIZE_T;
+}
+#endif
+
+/*************************************************************************
+ * trio_print_int [public]
+ */
+void
+trio_print_int
+TRIO_ARGS2((ref, number),
+ trio_pointer_t ref,
+ int number)
+{
+ trio_reference_t *self = (trio_reference_t *)ref;
+
+ TrioWriteNumber(self->data,
+ (trio_uintmax_t)number,
+ self->parameter->flags,
+ self->parameter->width,
+ self->parameter->precision,
+ self->parameter->base);
+}
+
+/*************************************************************************
+ * trio_print_uint [public]
+ */
+void
+trio_print_uint
+TRIO_ARGS2((ref, number),
+ trio_pointer_t ref,
+ unsigned int number)
+{
+ trio_reference_t *self = (trio_reference_t *)ref;
+
+ TrioWriteNumber(self->data,
+ (trio_uintmax_t)number,
+ self->parameter->flags | FLAGS_UNSIGNED,
+ self->parameter->width,
+ self->parameter->precision,
+ self->parameter->base);
+}
+
+/*************************************************************************
+ * trio_print_double [public]
+ */
+void
+trio_print_double
+TRIO_ARGS2((ref, number),
+ trio_pointer_t ref,
+ double number)
+{
+ trio_reference_t *self = (trio_reference_t *)ref;
+
+ TrioWriteDouble(self->data,
+ number,
+ self->parameter->flags,
+ self->parameter->width,
+ self->parameter->precision,
+ self->parameter->base);
+}
+
+/*************************************************************************
+ * trio_print_string [public]
+ */
+void
+trio_print_string
+TRIO_ARGS2((ref, string),
+ trio_pointer_t ref,
+ char *string)
+{
+ trio_reference_t *self = (trio_reference_t *)ref;
+
+ TrioWriteString(self->data,
+ string,
+ self->parameter->flags,
+ self->parameter->width,
+ self->parameter->precision);
+}
+
+/*************************************************************************
+ * trio_print_ref [public]
+ */
+int
+trio_print_ref
+TRIO_VARGS3((ref, format, va_alist),
+ trio_pointer_t ref,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list arglist;
+
+ assert(VALID(format));
+
+ TRIO_VA_START(arglist, format);
+ status = TrioFormatRef((trio_reference_t *)ref, format, TRIO_VA_LIST_ADDR(arglist), NULL);
+ TRIO_VA_END(arglist);
+ return status;
+}
+
+/*************************************************************************
+ * trio_vprint_ref [public]
+ */
+int
+trio_vprint_ref
+TRIO_ARGS3((ref, format, arglist),
+ trio_pointer_t ref,
+ TRIO_CONST char *format,
+ va_list arglist)
+{
+ assert(VALID(format));
+
+ return TrioFormatRef((trio_reference_t *)ref, format, TRIO_VA_LIST_ADDR(arglist), NULL);
+}
+
+/*************************************************************************
+ * trio_printv_ref [public]
+ */
+int
+trio_printv_ref
+TRIO_ARGS3((ref, format, argarray),
+ trio_pointer_t ref,
+ TRIO_CONST char *format,
+ trio_pointer_t *argarray)
+{
+ assert(VALID(format));
+
+ return TrioFormatRef((trio_reference_t *)ref, format, NULL, argarray);
+}
+
+#endif /* TRIO_EXTENSION */
+
+/*************************************************************************
+ * trio_print_pointer [public]
+ */
+void
+trio_print_pointer
+TRIO_ARGS2((ref, pointer),
+ trio_pointer_t ref,
+ trio_pointer_t pointer)
+{
+ trio_reference_t *self = (trio_reference_t *)ref;
+ trio_flags_t flags;
+ trio_uintmax_t number;
+
+ if (NULL == pointer)
+ {
+ TRIO_CONST char *string = internalNullString;
+ while (*string)
+ self->data->OutStream(self->data, *string++);
+ }
+ else
+ {
+ /*
+ * The subtraction of the null pointer is a workaround
+ * to avoid a compiler warning. The performance overhead
+ * is negligible (and likely to be removed by an
+ * optimizing compiler). The (char *) casting is done
+ * to please ANSI C++.
+ */
+ number = (trio_uintmax_t)((char *)pointer - (char *)0);
+ /* Shrink to size of pointer */
+ number &= (trio_uintmax_t)-1;
+ flags = self->parameter->flags;
+ flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE |
+ FLAGS_NILPADDING);
+ TrioWriteNumber(self->data,
+ number,
+ flags,
+ POINTER_WIDTH,
+ NO_PRECISION,
+ BASE_HEX);
+ }
+}
+
+/** @} End of UserDefined documentation module */
+
+/*************************************************************************
+ *
+ * LOCALES
+ *
+ ************************************************************************/
+
+/*************************************************************************
+ * trio_locale_set_decimal_point
+ *
+ * Decimal point can only be one character. The input argument is a
+ * string to enable multibyte characters. At most MB_LEN_MAX characters
+ * will be used.
+ */
+TRIO_PUBLIC void
+trio_locale_set_decimal_point
+TRIO_ARGS1((decimalPoint),
+ char *decimalPoint)
+{
+#if defined(USE_LOCALE)
+ if (NULL == internalLocaleValues)
+ {
+ TrioSetLocale();
+ }
+#endif
+ internalDecimalPointLength = trio_length(decimalPoint);
+ if (internalDecimalPointLength == 1)
+ {
+ internalDecimalPoint = *decimalPoint;
+ }
+ else
+ {
+ internalDecimalPoint = NIL;
+ trio_copy_max(internalDecimalPointString,
+ sizeof(internalDecimalPointString),
+ decimalPoint);
+ }
+}
+
+/*************************************************************************
+ * trio_locale_set_thousand_separator
+ *
+ * See trio_locale_set_decimal_point
+ */
+TRIO_PUBLIC void
+trio_locale_set_thousand_separator
+TRIO_ARGS1((thousandSeparator),
+ char *thousandSeparator)
+{
+#if defined(USE_LOCALE)
+ if (NULL == internalLocaleValues)
+ {
+ TrioSetLocale();
+ }
+#endif
+ trio_copy_max(internalThousandSeparator,
+ sizeof(internalThousandSeparator),
+ thousandSeparator);
+ internalThousandSeparatorLength = trio_length(internalThousandSeparator);
+}
+
+/*************************************************************************
+ * trio_locale_set_grouping
+ *
+ * Array of bytes. Reversed order.
+ *
+ * CHAR_MAX : No further grouping
+ * 0 : Repeat last group for the remaining digits (not necessary
+ * as C strings are zero-terminated)
+ * n : Set current group to n
+ *
+ * Same order as the grouping attribute in LC_NUMERIC.
+ */
+TRIO_PUBLIC void
+trio_locale_set_grouping
+TRIO_ARGS1((grouping),
+ char *grouping)
+{
+#if defined(USE_LOCALE)
+ if (NULL == internalLocaleValues)
+ {
+ TrioSetLocale();
+ }
+#endif
+ trio_copy_max(internalGrouping,
+ sizeof(internalGrouping),
+ grouping);
+}
+
+
+/*************************************************************************
+ *
+ * SCANNING
+ *
+ ************************************************************************/
+
+/*************************************************************************
+ * TrioSkipWhitespaces
+ */
+TRIO_PRIVATE int
+TrioSkipWhitespaces
+TRIO_ARGS1((self),
+ trio_class_t *self)
+{
+ int ch;
+
+ ch = self->current;
+ while (isspace(ch))
+ {
+ self->InStream(self, &ch);
+ }
+ return ch;
+}
+
+/*************************************************************************
+ * TrioGetCollation
+ */
+#if TRIO_EXTENSION
+TRIO_PRIVATE void
+TrioGetCollation(TRIO_NOARGS)
+{
+ int i;
+ int j;
+ int k;
+ char first[2];
+ char second[2];
+
+ /* This is computationally expensive */
+ first[1] = NIL;
+ second[1] = NIL;
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ {
+ k = 0;
+ first[0] = (char)i;
+ for (j = 0; j < MAX_CHARACTER_CLASS; j++)
+ {
+ second[0] = (char)j;
+ if (trio_equal_locale(first, second))
+ internalCollationArray[i][k++] = (char)j;
+ }
+ internalCollationArray[i][k] = NIL;
+ }
+}
+#endif
+
+/*************************************************************************
+ * TrioGetCharacterClass
+ *
+ * FIXME:
+ * multibyte
+ */
+TRIO_PRIVATE int
+TrioGetCharacterClass
+TRIO_ARGS4((format, indexPointer, flagsPointer, characterclass),
+ TRIO_CONST char *format,
+ int *indexPointer,
+ trio_flags_t *flagsPointer,
+ int *characterclass)
+{
+ int index = *indexPointer;
+ int i;
+ char ch;
+ char range_begin;
+ char range_end;
+
+ *flagsPointer &= ~FLAGS_EXCLUDE;
+
+ if (format[index] == QUALIFIER_CIRCUMFLEX)
+ {
+ *flagsPointer |= FLAGS_EXCLUDE;
+ index++;
+ }
+ /*
+ * If the ungroup character is at the beginning of the scanlist,
+ * it will be part of the class, and a second ungroup character
+ * must follow to end the group.
+ */
+ if (format[index] == SPECIFIER_UNGROUP)
+ {
+ characterclass[(int)SPECIFIER_UNGROUP]++;
+ index++;
+ }
+ /*
+ * Minus is used to specify ranges. To include minus in the class,
+ * it must be at the beginning of the list
+ */
+ if (format[index] == QUALIFIER_MINUS)
+ {
+ characterclass[(int)QUALIFIER_MINUS]++;
+ index++;
+ }
+ /* Collect characters */
+ for (ch = format[index];
+ (ch != SPECIFIER_UNGROUP) && (ch != NIL);
+ ch = format[++index])
+ {
+ switch (ch)
+ {
+ case QUALIFIER_MINUS: /* Scanlist ranges */
+
+ /*
+ * Both C99 and UNIX98 describes ranges as implementation-
+ * defined.
+ *
+ * We support the following behaviour (although this may
+ * change as we become wiser)
+ * - only increasing ranges, ie. [a-b] but not [b-a]
+ * - transitive ranges, ie. [a-b-c] == [a-c]
+ * - trailing minus, ie. [a-] is interpreted as an 'a'
+ * and a '-'
+ * - duplicates (although we can easily convert these
+ * into errors)
+ */
+ range_begin = format[index - 1];
+ range_end = format[++index];
+ if (range_end == SPECIFIER_UNGROUP)
+ {
+ /* Trailing minus is included */
+ characterclass[(int)ch]++;
+ ch = range_end;
+ break; /* for */
+ }
+ if (range_end == NIL)
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ if (range_begin > range_end)
+ return TRIO_ERROR_RETURN(TRIO_ERANGE, index);
+
+ for (i = (int)range_begin; i <= (int)range_end; i++)
+ characterclass[i]++;
+
+ ch = range_end;
+ break;
+
+#if TRIO_EXTENSION
+
+ case SPECIFIER_GROUP:
+
+ switch (format[index + 1])
+ {
+ case QUALIFIER_DOT: /* Collating symbol */
+ /*
+ * FIXME: This will be easier to implement when multibyte
+ * characters have been implemented. Until now, we ignore
+ * this feature.
+ */
+ for (i = index + 2; ; i++)
+ {
+ if (format[i] == NIL)
+ /* Error in syntax */
+ return -1;
+ else if (format[i] == QUALIFIER_DOT)
+ break; /* for */
+ }
+ if (format[++i] != SPECIFIER_UNGROUP)
+ return -1;
+
+ index = i;
+ break;
+
+ case QUALIFIER_EQUAL: /* Equivalence class expressions */
+ {
+ unsigned int j;
+ unsigned int k;
+
+ if (internalCollationUnconverted)
+ {
+ /* Lazy evaluation of collation array */
+ TrioGetCollation();
+ internalCollationUnconverted = FALSE;
+ }
+ for (i = index + 2; ; i++)
+ {
+ if (format[i] == NIL)
+ /* Error in syntax */
+ return -1;
+ else if (format[i] == QUALIFIER_EQUAL)
+ break; /* for */
+ else
+ {
+ /* Mark any equivalent character */
+ k = (unsigned int)format[i];
+ for (j = 0; internalCollationArray[k][j] != NIL; j++)
+ characterclass[(int)internalCollationArray[k][j]]++;
+ }
+ }
+ if (format[++i] != SPECIFIER_UNGROUP)
+ return -1;
+
+ index = i;
+ }
+ break;
+
+ case QUALIFIER_COLON: /* Character class expressions */
+
+ if (trio_equal_max(CLASS_ALNUM, sizeof(CLASS_ALNUM) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isalnum(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_ALNUM) - 1;
+ }
+ else if (trio_equal_max(CLASS_ALPHA, sizeof(CLASS_ALPHA) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isalpha(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_ALPHA) - 1;
+ }
+ else if (trio_equal_max(CLASS_CNTRL, sizeof(CLASS_CNTRL) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (iscntrl(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_CNTRL) - 1;
+ }
+ else if (trio_equal_max(CLASS_DIGIT, sizeof(CLASS_DIGIT) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isdigit(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_DIGIT) - 1;
+ }
+ else if (trio_equal_max(CLASS_GRAPH, sizeof(CLASS_GRAPH) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isgraph(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_GRAPH) - 1;
+ }
+ else if (trio_equal_max(CLASS_LOWER, sizeof(CLASS_LOWER) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (islower(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_LOWER) - 1;
+ }
+ else if (trio_equal_max(CLASS_PRINT, sizeof(CLASS_PRINT) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isprint(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_PRINT) - 1;
+ }
+ else if (trio_equal_max(CLASS_PUNCT, sizeof(CLASS_PUNCT) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (ispunct(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_PUNCT) - 1;
+ }
+ else if (trio_equal_max(CLASS_SPACE, sizeof(CLASS_SPACE) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isspace(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_SPACE) - 1;
+ }
+ else if (trio_equal_max(CLASS_UPPER, sizeof(CLASS_UPPER) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isupper(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_UPPER) - 1;
+ }
+ else if (trio_equal_max(CLASS_XDIGIT, sizeof(CLASS_XDIGIT) - 1,
+ &format[index]))
+ {
+ for (i = 0; i < MAX_CHARACTER_CLASS; i++)
+ if (isxdigit(i))
+ characterclass[i]++;
+ index += sizeof(CLASS_XDIGIT) - 1;
+ }
+ else
+ {
+ characterclass[(int)ch]++;
+ }
+ break;
+
+ default:
+ characterclass[(int)ch]++;
+ break;
+ }
+ break;
+
+#endif /* TRIO_EXTENSION */
+
+ default:
+ characterclass[(int)ch]++;
+ break;
+ }
+ }
+ return 0;
+}
+
+/*************************************************************************
+ * TrioReadNumber
+ *
+ * We implement our own number conversion in preference of strtol and
+ * strtoul, because we must handle 'long long' and thousand separators.
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioReadNumber
+TRIO_ARGS5((self, target, flags, width, base),
+ trio_class_t *self,
+ trio_uintmax_t *target,
+ trio_flags_t flags,
+ int width,
+ int base)
+{
+ trio_uintmax_t number = 0;
+ int digit;
+ int count;
+ BOOLEAN_T isNegative = FALSE;
+ BOOLEAN_T gotNumber = FALSE;
+ int j;
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+ assert((base >= MIN_BASE && base <= MAX_BASE) || (base == NO_BASE));
+
+ if (internalDigitsUnconverted)
+ {
+ /* Lazy evaluation of digits array */
+ memset(internalDigitArray, -1, sizeof(internalDigitArray));
+ for (j = 0; j < (int)sizeof(internalDigitsLower) - 1; j++)
+ {
+ internalDigitArray[(int)internalDigitsLower[j]] = j;
+ internalDigitArray[(int)internalDigitsUpper[j]] = j;
+ }
+ internalDigitsUnconverted = FALSE;
+ }
+
+ TrioSkipWhitespaces(self);
+
+ if (!(flags & FLAGS_UNSIGNED))
+ {
+ /* Leading sign */
+ if (self->current == '+')
+ {
+ self->InStream(self, NULL);
+ }
+ else if (self->current == '-')
+ {
+ self->InStream(self, NULL);
+ isNegative = TRUE;
+ }
+ }
+
+ count = self->processed;
+
+ if (flags & FLAGS_ALTERNATIVE)
+ {
+ switch (base)
+ {
+ case NO_BASE:
+ case BASE_OCTAL:
+ case BASE_HEX:
+ case BASE_BINARY:
+ if (self->current == '0')
+ {
+ self->InStream(self, NULL);
+ if (self->current)
+ {
+ if ((base == BASE_HEX) &&
+ (trio_to_upper(self->current) == 'X'))
+ {
+ self->InStream(self, NULL);
+ }
+ else if ((base == BASE_BINARY) &&
+ (trio_to_upper(self->current) == 'B'))
+ {
+ self->InStream(self, NULL);
+ }
+ }
+ }
+ else
+ return FALSE;
+ break;
+ default:
+ break;
+ }
+ }
+
+ while (((width == NO_WIDTH) || (self->processed - count < width)) &&
+ (! ((self->current == EOF) || isspace(self->current))))
+ {
+ if (isascii(self->current))
+ {
+ digit = internalDigitArray[self->current];
+ /* Abort if digit is not allowed in the specified base */
+ if ((digit == -1) || (digit >= base))
+ break;
+ }
+ else if (flags & FLAGS_QUOTE)
+ {
+ /* Compare with thousands separator */
+ for (j = 0; internalThousandSeparator[j] && self->current; j++)
+ {
+ if (internalThousandSeparator[j] != self->current)
+ break;
+
+ self->InStream(self, NULL);
+ }
+ if (internalThousandSeparator[j])
+ break; /* Mismatch */
+ else
+ continue; /* Match */
+ }
+ else
+ break;
+
+ number *= base;
+ number += digit;
+ gotNumber = TRUE; /* we need at least one digit */
+
+ self->InStream(self, NULL);
+ }
+
+ /* Was anything read at all? */
+ if (!gotNumber)
+ return FALSE;
+
+ if (target)
+ *target = (isNegative) ? -((trio_intmax_t)number) : number;
+ return TRUE;
+}
+
+/*************************************************************************
+ * TrioReadChar
+ */
+TRIO_PRIVATE int
+TrioReadChar
+TRIO_ARGS4((self, target, flags, width),
+ trio_class_t *self,
+ char *target,
+ trio_flags_t flags,
+ int width)
+{
+ int i;
+ char ch;
+ trio_uintmax_t number;
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+
+ for (i = 0;
+ (self->current != EOF) && (i < width);
+ i++)
+ {
+ ch = (char)self->current;
+ self->InStream(self, NULL);
+ if ((flags & FLAGS_ALTERNATIVE) && (ch == CHAR_BACKSLASH))
+ {
+ switch (self->current)
+ {
+ case '\\': ch = '\\'; break;
+ case 'a': ch = '\007'; break;
+ case 'b': ch = '\b'; break;
+ case 'f': ch = '\f'; break;
+ case 'n': ch = '\n'; break;
+ case 'r': ch = '\r'; break;
+ case 't': ch = '\t'; break;
+ case 'v': ch = '\v'; break;
+ default:
+ if (isdigit(self->current))
+ {
+ /* Read octal number */
+ if (!TrioReadNumber(self, &number, 0, 3, BASE_OCTAL))
+ return 0;
+ ch = (char)number;
+ }
+ else if (trio_to_upper(self->current) == 'X')
+ {
+ /* Read hexadecimal number */
+ self->InStream(self, NULL);
+ if (!TrioReadNumber(self, &number, 0, 2, BASE_HEX))
+ return 0;
+ ch = (char)number;
+ }
+ else
+ {
+ ch = (char)self->current;
+ }
+ break;
+ }
+ }
+
+ if (target)
+ target[i] = ch;
+ }
+ return i + 1;
+}
+
+/*************************************************************************
+ * TrioReadString
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioReadString
+TRIO_ARGS4((self, target, flags, width),
+ trio_class_t *self,
+ char *target,
+ trio_flags_t flags,
+ int width)
+{
+ int i;
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+
+ TrioSkipWhitespaces(self);
+
+ /*
+ * Continue until end of string is reached, a whitespace is encountered,
+ * or width is exceeded
+ */
+ for (i = 0;
+ ((width == NO_WIDTH) || (i < width)) &&
+ (! ((self->current == EOF) || isspace(self->current)));
+ i++)
+ {
+ if (TrioReadChar(self, (target ? &target[i] : 0), flags, 1) == 0)
+ break; /* for */
+ }
+ if (target)
+ target[i] = NIL;
+ return TRUE;
+}
+
+/*************************************************************************
+ * TrioReadWideChar
+ */
+#if TRIO_WIDECHAR
+TRIO_PRIVATE int
+TrioReadWideChar
+TRIO_ARGS4((self, target, flags, width),
+ trio_class_t *self,
+ trio_wchar_t *target,
+ trio_flags_t flags,
+ int width)
+{
+ int i;
+ int j;
+ int size;
+ int amount = 0;
+ trio_wchar_t wch;
+ char buffer[MB_LEN_MAX + 1];
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+
+ for (i = 0;
+ (self->current != EOF) && (i < width);
+ i++)
+ {
+ if (isascii(self->current))
+ {
+ if (TrioReadChar(self, buffer, flags, 1) == 0)
+ return 0;
+ buffer[1] = NIL;
+ }
+ else
+ {
+ /*
+ * Collect a multibyte character, by enlarging buffer until
+ * it contains a fully legal multibyte character, or the
+ * buffer is full.
+ */
+ j = 0;
+ do
+ {
+ buffer[j++] = (char)self->current;
+ buffer[j] = NIL;
+ self->InStream(self, NULL);
+ }
+ while ((j < (int)sizeof(buffer)) && (mblen(buffer, (size_t)j) != j));
+ }
+ if (target)
+ {
+ size = mbtowc(&wch, buffer, sizeof(buffer));
+ if (size > 0)
+ target[i] = wch;
+ }
+ amount += size;
+ self->InStream(self, NULL);
+ }
+ return amount;
+}
+#endif /* TRIO_WIDECHAR */
+
+/*************************************************************************
+ * TrioReadWideString
+ */
+#if TRIO_WIDECHAR
+TRIO_PRIVATE BOOLEAN_T
+TrioReadWideString
+TRIO_ARGS4((self, target, flags, width),
+ trio_class_t *self,
+ trio_wchar_t *target,
+ trio_flags_t flags,
+ int width)
+{
+ int i;
+ int size;
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+
+ TrioSkipWhitespaces(self);
+
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ (void)mblen(NULL, 0);
+#endif
+
+ /*
+ * Continue until end of string is reached, a whitespace is encountered,
+ * or width is exceeded
+ */
+ for (i = 0;
+ ((width == NO_WIDTH) || (i < width)) &&
+ (! ((self->current == EOF) || isspace(self->current)));
+ )
+ {
+ size = TrioReadWideChar(self, &target[i], flags, 1);
+ if (size == 0)
+ break; /* for */
+
+ i += size;
+ }
+ if (target)
+ target[i] = WCONST('\0');
+ return TRUE;
+}
+#endif /* TRIO_WIDECHAR */
+
+/*************************************************************************
+ * TrioReadGroup
+ *
+ * FIXME: characterclass does not work with multibyte characters
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioReadGroup
+TRIO_ARGS5((self, target, characterclass, flags, width),
+ trio_class_t *self,
+ char *target,
+ int *characterclass,
+ trio_flags_t flags,
+ int width)
+{
+ int ch;
+ int i;
+
+ assert(VALID(self));
+ assert(VALID(self->InStream));
+
+ ch = self->current;
+ for (i = 0;
+ ((width == NO_WIDTH) || (i < width)) &&
+ (! ((ch == EOF) ||
+ (((flags & FLAGS_EXCLUDE) != 0) ^ (characterclass[ch] == 0))));
+ i++)
+ {
+ if (target)
+ target[i] = (char)ch;
+ self->InStream(self, &ch);
+ }
+
+ if (target)
+ target[i] = NIL;
+ return TRUE;
+}
+
+/*************************************************************************
+ * TrioReadDouble
+ *
+ * FIXME:
+ * add long double
+ * handle base
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioReadDouble
+TRIO_ARGS4((self, target, flags, width),
+ trio_class_t *self,
+ trio_pointer_t target,
+ trio_flags_t flags,
+ int width)
+{
+ int ch;
+ char doubleString[512];
+ int index = 0;
+ int start;
+ int j;
+ BOOLEAN_T isHex = FALSE;
+
+ doubleString[0] = 0;
+
+ if ((width == NO_WIDTH) || (width > (int)sizeof(doubleString) - 1))
+ width = sizeof(doubleString) - 1;
+
+ TrioSkipWhitespaces(self);
+
+ /*
+ * Read entire double number from stream. trio_to_double requires
+ * a string as input, but InStream can be anything, so we have to
+ * collect all characters.
+ */
+ ch = self->current;
+ if ((ch == '+') || (ch == '-'))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ width--;
+ }
+
+ start = index;
+ switch (ch)
+ {
+ case 'n':
+ case 'N':
+ /* Not-a-number */
+ if (index != 0)
+ break;
+ /* FALLTHROUGH */
+ case 'i':
+ case 'I':
+ /* Infinity */
+ while (isalpha(ch) && (index - start < width))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ doubleString[index] = NIL;
+
+ /* Case insensitive string comparison */
+ if (trio_equal(&doubleString[start], INFINITE_UPPER) ||
+ trio_equal(&doubleString[start], LONG_INFINITE_UPPER))
+ {
+ if (flags & FLAGS_LONGDOUBLE)
+ {
+ if ((start == 1) && (doubleString[0] == '-'))
+ {
+ *((trio_long_double_t *)target) = trio_ninf();
+ }
+ else
+ {
+ *((trio_long_double_t *)target) = trio_pinf();
+ }
+ }
+ else
+ {
+ if ((start == 1) && (doubleString[0] == '-'))
+ {
+ *((double *)target) = trio_ninf();
+ }
+ else
+ {
+ *((double *)target) = trio_pinf();
+ }
+ }
+ return TRUE;
+ }
+ if (trio_equal(doubleString, NAN_UPPER))
+ {
+ /* NaN must not have a preceeding + nor - */
+ if (flags & FLAGS_LONGDOUBLE)
+ {
+ *((trio_long_double_t *)target) = trio_nan();
+ }
+ else
+ {
+ *((double *)target) = trio_nan();
+ }
+ return TRUE;
+ }
+ return FALSE;
+
+ case '0':
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ if (trio_to_upper(ch) == 'X')
+ {
+ isHex = TRUE;
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ while ((ch != EOF) && (index - start < width))
+ {
+ /* Integer part */
+ if (isHex ? isxdigit(ch) : isdigit(ch))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ else if (flags & FLAGS_QUOTE)
+ {
+ /* Compare with thousands separator */
+ for (j = 0; internalThousandSeparator[j] && self->current; j++)
+ {
+ if (internalThousandSeparator[j] != self->current)
+ break;
+
+ self->InStream(self, &ch);
+ }
+ if (internalThousandSeparator[j])
+ break; /* Mismatch */
+ else
+ continue; /* Match */
+ }
+ else
+ break; /* while */
+ }
+ if (ch == '.')
+ {
+ /* Decimal part */
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ while ((isHex ? isxdigit(ch) : isdigit(ch)) &&
+ (index - start < width))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ if (isHex ? (trio_to_upper(ch) == 'P') : (trio_to_upper(ch) == 'E'))
+ {
+ /* Exponent */
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ if ((ch == '+') || (ch == '-'))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ while (isdigit(ch) && (index - start < width))
+ {
+ doubleString[index++] = (char)ch;
+ self->InStream(self, &ch);
+ }
+ }
+ }
+
+ if ((index == start) || (*doubleString == NIL))
+ return FALSE;
+
+ doubleString[index] = 0;
+
+ if (flags & FLAGS_LONGDOUBLE)
+ {
+ *((trio_long_double_t *)target) = trio_to_long_double(doubleString, NULL);
+ }
+ else
+ {
+ *((double *)target) = trio_to_double(doubleString, NULL);
+ }
+ return TRUE;
+}
+
+/*************************************************************************
+ * TrioReadPointer
+ */
+TRIO_PRIVATE BOOLEAN_T
+TrioReadPointer
+TRIO_ARGS3((self, target, flags),
+ trio_class_t *self,
+ trio_pointer_t *target,
+ trio_flags_t flags)
+{
+ trio_uintmax_t number;
+ char buffer[sizeof(internalNullString)];
+
+ flags |= (FLAGS_UNSIGNED | FLAGS_ALTERNATIVE | FLAGS_NILPADDING);
+
+ if (TrioReadNumber(self,
+ &number,
+ flags,
+ POINTER_WIDTH,
+ BASE_HEX))
+ {
+ /*
+ * The strange assignment of number is a workaround for a compiler
+ * warning
+ */
+ if (target)
+ *target = (char *)0 + number;
+ return TRUE;
+ }
+ else if (TrioReadString(self,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : buffer,
+ 0,
+ sizeof(internalNullString) - 1))
+ {
+ if (trio_equal_case(buffer, internalNullString))
+ {
+ if (target)
+ *target = NULL;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/*************************************************************************
+ * TrioScanProcess
+ */
+TRIO_PRIVATE int
+TrioScanProcess
+TRIO_ARGS3((data, format, parameters),
+ trio_class_t *data,
+ TRIO_CONST char *format,
+ trio_parameter_t *parameters)
+{
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ int charlen;
+ int cnt;
+#endif
+ int assignment;
+ int ch;
+ int index; /* Index of format string */
+ int i; /* Index of current parameter */
+ trio_flags_t flags;
+ int width;
+ int base;
+ trio_pointer_t pointer;
+
+ assignment = 0;
+ i = 0;
+ index = 0;
+ data->InStream(data, &ch);
+
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ (void)mblen(NULL, 0);
+#endif
+
+ while (format[index])
+ {
+#if defined(TRIO_COMPILER_SUPPORTS_MULTIBYTE)
+ if (! isascii(format[index]))
+ {
+ charlen = mblen(&format[index], MB_LEN_MAX);
+ if (charlen != -1)
+ {
+ /* Compare multibyte characters in format string */
+ for (cnt = 0; cnt < charlen - 1; cnt++)
+ {
+ if (ch != format[index + cnt])
+ {
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+ data->InStream(data, &ch);
+ }
+ continue; /* while characters left in formatting string */
+ }
+ }
+#endif /* TRIO_COMPILER_SUPPORTS_MULTIBYTE */
+
+ if ((EOF == ch) && (parameters[i].type != FORMAT_COUNT))
+ {
+ return (assignment > 0) ? assignment : EOF;
+ }
+
+ if (CHAR_IDENTIFIER == format[index])
+ {
+ if (CHAR_IDENTIFIER == format[index + 1])
+ {
+ /* Two % in format matches one % in input stream */
+ if (CHAR_IDENTIFIER == ch)
+ {
+ data->InStream(data, &ch);
+ index += 2;
+ continue; /* while format chars left */
+ }
+ else
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+
+ /* Skip the parameter entries */
+ while (parameters[i].type == FORMAT_PARAMETER)
+ i++;
+
+ flags = parameters[i].flags;
+ /* Find width */
+ width = parameters[i].width;
+ if (flags & FLAGS_WIDTH_PARAMETER)
+ {
+ /* Get width from parameter list */
+ width = (int)parameters[width].data.number.as_signed;
+ }
+ /* Find base */
+ base = parameters[i].base;
+ if (flags & FLAGS_BASE_PARAMETER)
+ {
+ /* Get base from parameter list */
+ base = (int)parameters[base].data.number.as_signed;
+ }
+
+ switch (parameters[i].type)
+ {
+ case FORMAT_INT:
+ {
+ trio_uintmax_t number;
+
+ if (0 == base)
+ base = BASE_DECIMAL;
+
+ if (!TrioReadNumber(data,
+ &number,
+ flags,
+ width,
+ base))
+ return assignment;
+
+ if (!(flags & FLAGS_IGNORE))
+ {
+ assignment++;
+
+ pointer = parameters[i].data.pointer;
+#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER)
+ if (flags & FLAGS_SIZE_T)
+ *(size_t *)pointer = (size_t)number;
+ else
+#endif
+#if defined(QUALIFIER_PTRDIFF_T)
+ if (flags & FLAGS_PTRDIFF_T)
+ *(ptrdiff_t *)pointer = (ptrdiff_t)number;
+ else
+#endif
+#if defined(QUALIFIER_INTMAX_T)
+ if (flags & FLAGS_INTMAX_T)
+ *(trio_intmax_t *)pointer = (trio_intmax_t)number;
+ else
+#endif
+ if (flags & FLAGS_QUAD)
+ *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)number;
+ else if (flags & FLAGS_LONG)
+ *(long int *)pointer = (long int)number;
+ else if (flags & FLAGS_SHORT)
+ *(short int *)pointer = (short int)number;
+ else
+ *(int *)pointer = (int)number;
+ }
+ }
+ break; /* FORMAT_INT */
+
+ case FORMAT_STRING:
+#if TRIO_WIDECHAR
+ if (flags & FLAGS_WIDECHAR)
+ {
+ if (!TrioReadWideString(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : parameters[i].data.wstring,
+ flags,
+ width))
+ return assignment;
+ }
+ else
+#endif
+ {
+ if (!TrioReadString(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : parameters[i].data.string,
+ flags,
+ width))
+ return assignment;
+ }
+ if (!(flags & FLAGS_IGNORE))
+ assignment++;
+ break; /* FORMAT_STRING */
+
+ case FORMAT_DOUBLE:
+ {
+ trio_pointer_t pointer;
+
+ if (flags & FLAGS_IGNORE)
+ {
+ pointer = NULL;
+ }
+ else
+ {
+ pointer = (flags & FLAGS_LONGDOUBLE)
+ ? (trio_pointer_t)parameters[i].data.longdoublePointer
+ : (trio_pointer_t)parameters[i].data.doublePointer;
+ }
+ if (!TrioReadDouble(data, pointer, flags, width))
+ {
+ return assignment;
+ }
+ if (!(flags & FLAGS_IGNORE))
+ {
+ assignment++;
+ }
+ break; /* FORMAT_DOUBLE */
+ }
+ case FORMAT_GROUP:
+ {
+ int characterclass[MAX_CHARACTER_CLASS + 1];
+ int rc;
+
+ /* Skip over modifiers */
+ while (format[index] != SPECIFIER_GROUP)
+ {
+ index++;
+ }
+ /* Skip over group specifier */
+ index++;
+
+ memset(characterclass, 0, sizeof(characterclass));
+ rc = TrioGetCharacterClass(format,
+ &index,
+ &flags,
+ characterclass);
+ if (rc < 0)
+ return rc;
+
+ if (!TrioReadGroup(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : parameters[i].data.string,
+ characterclass,
+ flags,
+ parameters[i].width))
+ return assignment;
+ if (!(flags & FLAGS_IGNORE))
+ assignment++;
+ }
+ break; /* FORMAT_GROUP */
+
+ case FORMAT_COUNT:
+ pointer = parameters[i].data.pointer;
+ if (NULL != pointer)
+ {
+ int count = data->committed;
+ if (ch != EOF)
+ count--; /* a character is read, but is not consumed yet */
+#if defined(QUALIFIER_SIZE_T) || defined(QUALIFIER_SIZE_T_UPPER)
+ if (flags & FLAGS_SIZE_T)
+ *(size_t *)pointer = (size_t)count;
+ else
+#endif
+#if defined(QUALIFIER_PTRDIFF_T)
+ if (flags & FLAGS_PTRDIFF_T)
+ *(ptrdiff_t *)pointer = (ptrdiff_t)count;
+ else
+#endif
+#if defined(QUALIFIER_INTMAX_T)
+ if (flags & FLAGS_INTMAX_T)
+ *(trio_intmax_t *)pointer = (trio_intmax_t)count;
+ else
+#endif
+ if (flags & FLAGS_QUAD)
+ {
+ *(trio_ulonglong_t *)pointer = (trio_ulonglong_t)count;
+ }
+ else if (flags & FLAGS_LONG)
+ {
+ *(long int *)pointer = (long int)count;
+ }
+ else if (flags & FLAGS_SHORT)
+ {
+ *(short int *)pointer = (short int)count;
+ }
+ else
+ {
+ *(int *)pointer = (int)count;
+ }
+ }
+ break; /* FORMAT_COUNT */
+
+ case FORMAT_CHAR:
+#if TRIO_WIDECHAR
+ if (flags & FLAGS_WIDECHAR)
+ {
+ if (TrioReadWideChar(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : parameters[i].data.wstring,
+ flags,
+ (width == NO_WIDTH) ? 1 : width) == 0)
+ return assignment;
+ }
+ else
+#endif
+ {
+ if (TrioReadChar(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : parameters[i].data.string,
+ flags,
+ (width == NO_WIDTH) ? 1 : width) == 0)
+ return assignment;
+ }
+ if (!(flags & FLAGS_IGNORE))
+ assignment++;
+ break; /* FORMAT_CHAR */
+
+ case FORMAT_POINTER:
+ if (!TrioReadPointer(data,
+ (flags & FLAGS_IGNORE)
+ ? NULL
+ : (trio_pointer_t *)parameters[i].data.pointer,
+ flags))
+ return assignment;
+ if (!(flags & FLAGS_IGNORE))
+ assignment++;
+ break; /* FORMAT_POINTER */
+
+ case FORMAT_PARAMETER:
+ break; /* FORMAT_PARAMETER */
+
+ default:
+ return TRIO_ERROR_RETURN(TRIO_EINVAL, index);
+ }
+ ch = data->current;
+ index = parameters[i].indexAfterSpecifier;
+ i++;
+ }
+ else /* Not an % identifier */
+ {
+ if (isspace((int)format[index]))
+ {
+ /* Whitespaces may match any amount of whitespaces */
+ ch = TrioSkipWhitespaces(data);
+ }
+ else if (ch == format[index])
+ {
+ data->InStream(data, &ch);
+ }
+ else
+ return assignment;
+
+ index++;
+ }
+ }
+ return assignment;
+}
+
+/*************************************************************************
+ * TrioScan
+ */
+TRIO_PRIVATE int
+TrioScan
+TRIO_ARGS6((source, sourceSize, InStream, format, arglist, argarray),
+ trio_pointer_t source,
+ size_t sourceSize,
+ void (*InStream) TRIO_PROTO((trio_class_t *, int *)),
+ TRIO_CONST char *format,
+ TRIO_VA_LIST_PTR arglist,
+ trio_pointer_t *argarray)
+{
+ int status;
+ trio_parameter_t parameters[MAX_PARAMETERS];
+ trio_class_t data;
+
+ assert(VALID(InStream));
+ assert(VALID(format));
+
+ memset(&data, 0, sizeof(data));
+ data.InStream = InStream;
+ data.location = (trio_pointer_t)source;
+ data.max = sourceSize;
+ data.error = 0;
+
+#if defined(USE_LOCALE)
+ if (NULL == internalLocaleValues)
+ {
+ TrioSetLocale();
+ }
+#endif
+
+ status = TrioParse(TYPE_SCAN, format, parameters, arglist, argarray);
+ if (status < 0)
+ return status;
+
+ status = TrioScanProcess(&data, format, parameters);
+ if (data.error != 0)
+ {
+ status = data.error;
+ }
+ return status;
+}
+
+/*************************************************************************
+ * TrioInStreamFile
+ */
+TRIO_PRIVATE void
+TrioInStreamFile
+TRIO_ARGS2((self, intPointer),
+ trio_class_t *self,
+ int *intPointer)
+{
+ FILE *file;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+ assert(VALID(file));
+
+ file = (FILE *)self->location;
+
+ self->current = fgetc(file);
+ if (self->current == EOF)
+ {
+ self->error = (ferror(file))
+ ? TRIO_ERROR_RETURN(TRIO_ERRNO, 0)
+ : TRIO_ERROR_RETURN(TRIO_EOF, 0);
+ }
+ else
+ {
+ self->processed++;
+ self->committed++;
+ }
+
+ if (VALID(intPointer))
+ {
+ *intPointer = self->current;
+ }
+}
+
+/*************************************************************************
+ * TrioInStreamFileDescriptor
+ */
+TRIO_PRIVATE void
+TrioInStreamFileDescriptor
+TRIO_ARGS2((self, intPointer),
+ trio_class_t *self,
+ int *intPointer)
+{
+ int fd;
+ int size;
+ unsigned char input;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ fd = *((int *)self->location);
+
+ size = read(fd, &input, sizeof(char));
+ if (size == -1)
+ {
+ self->error = TRIO_ERROR_RETURN(TRIO_ERRNO, 0);
+ self->current = EOF;
+ }
+ else
+ {
+ self->current = (size == 0) ? EOF : input;
+ }
+ if (self->current != EOF)
+ {
+ self->committed++;
+ self->processed++;
+ }
+
+ if (VALID(intPointer))
+ {
+ *intPointer = self->current;
+ }
+}
+
+/*************************************************************************
+ * TrioInStreamCustom
+ */
+TRIO_PRIVATE void
+TrioInStreamCustom
+TRIO_ARGS2((self, intPointer),
+ trio_class_t *self,
+ int *intPointer)
+{
+ trio_custom_t *data;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ data = (trio_custom_t *)self->location;
+
+ self->current = (data->stream.in == NULL)
+ ? NIL
+ : (data->stream.in)(data->closure);
+
+ if (self->current == NIL)
+ {
+ self->current = EOF;
+ }
+ else
+ {
+ self->processed++;
+ self->committed++;
+ }
+
+ if (VALID(intPointer))
+ {
+ *intPointer = self->current;
+ }
+}
+
+/*************************************************************************
+ * TrioInStreamString
+ */
+TRIO_PRIVATE void
+TrioInStreamString
+TRIO_ARGS2((self, intPointer),
+ trio_class_t *self,
+ int *intPointer)
+{
+ unsigned char **buffer;
+
+ assert(VALID(self));
+ assert(VALID(self->location));
+
+ buffer = (unsigned char **)self->location;
+ self->current = (*buffer)[0];
+ if (self->current == NIL)
+ {
+ self->current = EOF;
+ }
+ else
+ {
+ (*buffer)++;
+ self->processed++;
+ self->committed++;
+ }
+
+ if (VALID(intPointer))
+ {
+ *intPointer = self->current;
+ }
+}
+
+/*************************************************************************
+ *
+ * Formatted scanning functions
+ *
+ ************************************************************************/
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_scanf.h"
+#endif
+/** @addtogroup Scanf
+ @{
+*/
+
+/*************************************************************************
+ * scanf
+ */
+
+/**
+ Scan characters from standard input stream.
+
+ @param format Formatting string.
+ @param ... Arguments.
+ @return Number of scanned characters.
+ */
+TRIO_PUBLIC int
+trio_scanf
+TRIO_VARGS2((format, va_alist),
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioScan((trio_pointer_t)stdin, 0,
+ TrioInStreamFile,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vscanf
+TRIO_ARGS2((format, args),
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)stdin, 0,
+ TrioInStreamFile,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_scanfv
+TRIO_ARGS2((format, args),
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)stdin, 0,
+ TrioInStreamFile,
+ format, NULL, args);
+}
+
+/*************************************************************************
+ * fscanf
+ */
+TRIO_PUBLIC int
+trio_fscanf
+TRIO_VARGS3((file, format, va_alist),
+ FILE *file,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(file));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioScan((trio_pointer_t)file, 0,
+ TrioInStreamFile,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vfscanf
+TRIO_ARGS3((file, format, args),
+ FILE *file,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(file));
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)file, 0,
+ TrioInStreamFile,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_fscanfv
+TRIO_ARGS3((file, format, args),
+ FILE *file,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ assert(VALID(file));
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)file, 0,
+ TrioInStreamFile,
+ format, NULL, args);
+}
+
+/*************************************************************************
+ * dscanf
+ */
+TRIO_PUBLIC int
+trio_dscanf
+TRIO_VARGS3((fd, format, va_alist),
+ int fd,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioScan((trio_pointer_t)&fd, 0,
+ TrioInStreamFileDescriptor,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vdscanf
+TRIO_ARGS3((fd, format, args),
+ int fd,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)&fd, 0,
+ TrioInStreamFileDescriptor,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_dscanfv
+TRIO_ARGS3((fd, format, args),
+ int fd,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)&fd, 0,
+ TrioInStreamFileDescriptor,
+ format, NULL, args);
+}
+
+/*************************************************************************
+ * cscanf
+ */
+TRIO_PUBLIC int
+trio_cscanf
+TRIO_VARGS4((stream, closure, format, va_alist),
+ trio_instream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ data.stream.in = stream;
+ data.closure = closure;
+ status = TrioScan(&data, 0, TrioInStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vcscanf
+TRIO_ARGS4((stream, closure, format, args),
+ trio_instream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ data.stream.in = stream;
+ data.closure = closure;
+ return TrioScan(&data, 0, TrioInStreamCustom, format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_cscanfv
+TRIO_ARGS4((stream, closure, format, args),
+ trio_instream_t stream,
+ trio_pointer_t closure,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ trio_custom_t data;
+
+ assert(VALID(stream));
+ assert(VALID(format));
+
+ data.stream.in = stream;
+ data.closure = closure;
+ return TrioScan(&data, 0, TrioInStreamCustom, format, NULL, args);
+}
+
+/*************************************************************************
+ * sscanf
+ */
+TRIO_PUBLIC int
+trio_sscanf
+TRIO_VARGS3((buffer, format, va_alist),
+ TRIO_CONST char *buffer,
+ TRIO_CONST char *format,
+ TRIO_VA_DECL)
+{
+ int status;
+ va_list args;
+
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ TRIO_VA_START(args, format);
+ status = TrioScan((trio_pointer_t)&buffer, 0,
+ TrioInStreamString,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+ TRIO_VA_END(args);
+ return status;
+}
+
+TRIO_PUBLIC int
+trio_vsscanf
+TRIO_ARGS3((buffer, format, args),
+ TRIO_CONST char *buffer,
+ TRIO_CONST char *format,
+ va_list args)
+{
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)&buffer, 0,
+ TrioInStreamString,
+ format, TRIO_VA_LIST_ADDR(args), NULL);
+}
+
+TRIO_PUBLIC int
+trio_sscanfv
+TRIO_ARGS3((buffer, format, args),
+ TRIO_CONST char *buffer,
+ TRIO_CONST char *format,
+ trio_pointer_t *args)
+{
+ assert(VALID(buffer));
+ assert(VALID(format));
+
+ return TrioScan((trio_pointer_t)&buffer, 0,
+ TrioInStreamString,
+ format, NULL, args);
+}
+
+/** @} End of Scanf documentation module */
+
+/*************************************************************************
+ * trio_strerror
+ */
+TRIO_PUBLIC TRIO_CONST char *
+trio_strerror
+TRIO_ARGS1((errorcode),
+ int errorcode)
+{
+ /* Textual versions of the error codes */
+ switch (TRIO_ERROR_CODE(errorcode))
+ {
+ case TRIO_EOF:
+ return "End of file";
+ case TRIO_EINVAL:
+ return "Invalid argument";
+ case TRIO_ETOOMANY:
+ return "Too many arguments";
+ case TRIO_EDBLREF:
+ return "Double reference";
+ case TRIO_EGAP:
+ return "Reference gap";
+ case TRIO_ENOMEM:
+ return "Out of memory";
+ case TRIO_ERANGE:
+ return "Invalid range";
+ case TRIO_ECUSTOM:
+ return "Custom error";
+ default:
+ return "Unknown";
+ }
+}
diff --git a/trio.h b/trio.h
new file mode 100644
index 0000000..99d2127
--- /dev/null
+++ b/trio.h
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ *************************************************************************
+ *
+ * http://ctrio.sourceforge.net/
+ *
+ ************************************************************************/
+
+#ifndef TRIO_TRIO_H
+#define TRIO_TRIO_H
+
+#if !defined(WITHOUT_TRIO)
+
+/*
+ * Use autoconf defines if present. Packages using trio must define
+ * HAVE_CONFIG_H as a compiler option themselves.
+ */
+#if defined(TRIO_HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include "triodef.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(TRIO_COMPILER_ANCIENT)
+# include <varargs.h>
+#else
+# include <stdarg.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Error codes.
+ *
+ * Remember to add a textual description to trio_strerror.
+ */
+enum {
+ TRIO_EOF = 1,
+ TRIO_EINVAL = 2,
+ TRIO_ETOOMANY = 3,
+ TRIO_EDBLREF = 4,
+ TRIO_EGAP = 5,
+ TRIO_ENOMEM = 6,
+ TRIO_ERANGE = 7,
+ TRIO_ERRNO = 8,
+ TRIO_ECUSTOM = 9
+};
+
+/* Error macros */
+#define TRIO_ERROR_CODE(x) ((-(x)) & 0x00FF)
+#define TRIO_ERROR_POSITION(x) ((-(x)) >> 8)
+#define TRIO_ERROR_NAME(x) trio_strerror(x)
+
+typedef int (*trio_outstream_t) TRIO_PROTO((trio_pointer_t, int));
+typedef int (*trio_instream_t) TRIO_PROTO((trio_pointer_t));
+
+TRIO_CONST char *trio_strerror TRIO_PROTO((int));
+
+/*************************************************************************
+ * Print Functions
+ */
+
+int trio_printf TRIO_PROTO((TRIO_CONST char *format, ...));
+int trio_vprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
+int trio_printfv TRIO_PROTO((TRIO_CONST char *format, void **args));
+
+int trio_fprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
+int trio_vfprintf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
+int trio_fprintfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
+
+int trio_dprintf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
+int trio_vdprintf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
+int trio_dprintfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
+
+int trio_cprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, ...));
+int trio_vcprintf TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, va_list args));
+int trio_cprintfv TRIO_PROTO((trio_outstream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, void **args));
+
+int trio_sprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, ...));
+int trio_vsprintf TRIO_PROTO((char *buffer, TRIO_CONST char *format, va_list args));
+int trio_sprintfv TRIO_PROTO((char *buffer, TRIO_CONST char *format, void **args));
+
+int trio_snprintf TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
+int trio_vsnprintf TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
+ va_list args));
+int trio_snprintfv TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
+ void **args));
+
+int trio_snprintfcat TRIO_PROTO((char *buffer, size_t max, TRIO_CONST char *format, ...));
+int trio_vsnprintfcat TRIO_PROTO((char *buffer, size_t bufferSize, TRIO_CONST char *format,
+ va_list args));
+
+char *trio_aprintf TRIO_PROTO((TRIO_CONST char *format, ...));
+char *trio_vaprintf TRIO_PROTO((TRIO_CONST char *format, va_list args));
+
+int trio_asprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, ...));
+int trio_vasprintf TRIO_PROTO((char **ret, TRIO_CONST char *format, va_list args));
+
+/*************************************************************************
+ * Scan Functions
+ */
+int trio_scanf TRIO_PROTO((TRIO_CONST char *format, ...));
+int trio_vscanf TRIO_PROTO((TRIO_CONST char *format, va_list args));
+int trio_scanfv TRIO_PROTO((TRIO_CONST char *format, void **args));
+
+int trio_fscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, ...));
+int trio_vfscanf TRIO_PROTO((FILE *file, TRIO_CONST char *format, va_list args));
+int trio_fscanfv TRIO_PROTO((FILE *file, TRIO_CONST char *format, void **args));
+
+int trio_dscanf TRIO_PROTO((int fd, TRIO_CONST char *format, ...));
+int trio_vdscanf TRIO_PROTO((int fd, TRIO_CONST char *format, va_list args));
+int trio_dscanfv TRIO_PROTO((int fd, TRIO_CONST char *format, void **args));
+
+int trio_cscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, ...));
+int trio_vcscanf TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, va_list args));
+int trio_cscanfv TRIO_PROTO((trio_instream_t stream, trio_pointer_t closure,
+ TRIO_CONST char *format, void **args));
+
+int trio_sscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, ...));
+int trio_vsscanf TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, va_list args));
+int trio_sscanfv TRIO_PROTO((TRIO_CONST char *buffer, TRIO_CONST char *format, void **args));
+
+/*************************************************************************
+ * Locale Functions
+ */
+void trio_locale_set_decimal_point TRIO_PROTO((char *decimalPoint));
+void trio_locale_set_thousand_separator TRIO_PROTO((char *thousandSeparator));
+void trio_locale_set_grouping TRIO_PROTO((char *grouping));
+
+/*************************************************************************
+ * Renaming
+ */
+#ifdef TRIO_REPLACE_STDIO
+/* Replace the <stdio.h> functions */
+#ifndef HAVE_PRINTF
+# undef printf
+# define printf trio_printf
+#endif
+#ifndef HAVE_VPRINTF
+# undef vprintf
+# define vprintf trio_vprintf
+#endif
+#ifndef HAVE_FPRINTF
+# undef fprintf
+# define fprintf trio_fprintf
+#endif
+#ifndef HAVE_VFPRINTF
+# undef vfprintf
+# define vfprintf trio_vfprintf
+#endif
+#ifndef HAVE_SPRINTF
+# undef sprintf
+# define sprintf trio_sprintf
+#endif
+#ifndef HAVE_VSPRINTF
+# undef vsprintf
+# define vsprintf trio_vsprintf
+#endif
+#ifndef HAVE_SNPRINTF
+# undef snprintf
+# define snprintf trio_snprintf
+#endif
+#ifndef HAVE_VSNPRINTF
+# undef vsnprintf
+# define vsnprintf trio_vsnprintf
+#endif
+#ifndef HAVE_SCANF
+# undef scanf
+# define scanf trio_scanf
+#endif
+#ifndef HAVE_VSCANF
+# undef vscanf
+# define vscanf trio_vscanf
+#endif
+#ifndef HAVE_FSCANF
+# undef fscanf
+# define fscanf trio_fscanf
+#endif
+#ifndef HAVE_VFSCANF
+# undef vfscanf
+# define vfscanf trio_vfscanf
+#endif
+#ifndef HAVE_SSCANF
+# undef sscanf
+# define sscanf trio_sscanf
+#endif
+#ifndef HAVE_VSSCANF
+# undef vsscanf
+# define vsscanf trio_vsscanf
+#endif
+/* These aren't stdio functions, but we make them look similar */
+#define dprintf trio_dprintf
+#define vdprintf trio_vdprintf
+#define aprintf trio_aprintf
+#define vaprintf trio_vaprintf
+#define asprintf trio_asprintf
+#define vasprintf trio_vasprintf
+#define dscanf trio_dscanf
+#define vdscanf trio_vdscanf
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* WITHOUT_TRIO */
+
+#endif /* TRIO_TRIO_H */
diff --git a/triodef.h b/triodef.h
new file mode 100644
index 0000000..46772ee
--- /dev/null
+++ b/triodef.h
@@ -0,0 +1,228 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************/
+
+#ifndef TRIO_TRIODEF_H
+#define TRIO_TRIODEF_H
+
+/*************************************************************************
+ * Platform and compiler support detection
+ */
+#if defined(__GNUC__)
+# define TRIO_COMPILER_GCC
+#elif defined(__SUNPRO_C)
+# define TRIO_COMPILER_SUNPRO
+#elif defined(__SUNPRO_CC)
+# define TRIO_COMPILER_SUNPRO
+# define __SUNPRO_C __SUNPRO_CC
+#elif defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)
+# define TRIO_COMPILER_XLC
+#elif defined(_AIX) && !defined(__GNUC__)
+# define TRIO_COMPILER_XLC /* Workaround for old xlc */
+#elif defined(__DECC) || defined(__DECCXX)
+# define TRIO_COMPILER_DECC
+#elif defined(__osf__) && defined(__LANGUAGE_C__)
+# define TRIO_COMPILER_DECC /* Workaround for old DEC C compilers */
+#elif defined(_MSC_VER)
+# define TRIO_COMPILER_MSVC
+#elif defined(__BORLANDC__)
+# define TRIO_COMPILER_BCB
+#endif
+
+#if defined(VMS) || defined(__VMS)
+/*
+ * VMS is placed first to avoid identifying the platform as Unix
+ * based on the DECC compiler later on.
+ */
+# define TRIO_PLATFORM_VMS
+#elif defined(__OS400__)
+# define TRIO_PLATFORM_OS400
+#elif defined(unix) || defined(__unix) || defined(__unix__)
+# define TRIO_PLATFORM_UNIX
+#elif defined(TRIO_COMPILER_XLC) || defined(_AIX)
+# define TRIO_PLATFORM_UNIX
+#elif defined(TRIO_COMPILER_DECC) || defined(__osf___)
+# define TRIO_PLATFORM_UNIX
+#elif defined(__NetBSD__)
+# define TRIO_PLATFORM_UNIX
+#elif defined(__Lynx__)
+# define TRIO_PLATFORM_UNIX
+#elif defined(__QNX__)
+# define TRIO_PLATFORM_UNIX
+# define TRIO_PLATFORM_QNX
+#elif defined(__CYGWIN__)
+# define TRIO_PLATFORM_UNIX
+#elif defined(AMIGA) && defined(TRIO_COMPILER_GCC)
+# define TRIO_PLATFORM_UNIX
+#elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
+# define TRIO_PLATFORM_WIN32
+#elif defined(mpeix) || defined(__mpexl)
+# define TRIO_PLATFORM_MPEIX
+#endif
+
+#if defined(_AIX)
+# define TRIO_PLATFORM_AIX
+#elif defined(__hpux)
+# define TRIO_PLATFORM_HPUX
+#elif defined(sun) || defined(__sun__)
+# if defined(__SVR4) || defined(__svr4__)
+# define TRIO_PLATFORM_SOLARIS
+# else
+# define TRIO_PLATFORM_SUNOS
+# endif
+#endif
+
+#if defined(__STDC__) || defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
+# define TRIO_COMPILER_SUPPORTS_C89
+# if defined(__STDC_VERSION__)
+# define TRIO_COMPILER_SUPPORTS_C90
+# if (__STDC_VERSION__ >= 199409L)
+# define TRIO_COMPILER_SUPPORTS_C94
+# endif
+# if (__STDC_VERSION__ >= 199901L)
+# define TRIO_COMPILER_SUPPORTS_C99
+# endif
+# elif defined(TRIO_COMPILER_SUNPRO)
+# if (__SUNPRO_C >= 0x420)
+# define TRIO_COMPILER_SUPPORTS_C94
+# endif
+# endif
+#elif defined(TRIO_COMPILER_XLC) && defined(__EXTENDED__)
+# define TRIO_COMPILER_SUPPORTS_C89
+# define TRIO_COMPILER_SUPPORTS_C90
+# define TRIO_COMPILER_SUPPORTS_C94
+#endif
+
+#if defined(_XOPEN_SOURCE)
+# if defined(_XOPEN_SOURCE_EXTENDED)
+# define TRIO_COMPILER_SUPPORTS_UNIX95
+# endif
+# if (_XOPEN_VERSION >= 500)
+# define TRIO_COMPILER_SUPPORTS_UNIX98
+# endif
+# if (_XOPEN_VERSION >= 600)
+# define TRIO_COMPILER_SUPPORTS_UNIX01
+# endif
+#endif
+
+/*************************************************************************
+ * Generic defines
+ */
+
+#if !defined(TRIO_PUBLIC)
+# define TRIO_PUBLIC
+#endif
+#if !defined(TRIO_PRIVATE)
+# define TRIO_PRIVATE static
+#endif
+
+#if !(defined(TRIO_COMPILER_SUPPORTS_C89) || defined(__cplusplus))
+# define TRIO_COMPILER_ANCIENT
+#endif
+
+#if defined(TRIO_COMPILER_ANCIENT)
+# define TRIO_CONST
+# define TRIO_VOLATILE
+# define TRIO_SIGNED
+typedef double trio_long_double_t;
+typedef char * trio_pointer_t;
+# define TRIO_SUFFIX_LONG(x) x
+# define TRIO_PROTO(x) ()
+# define TRIO_NOARGS
+# define TRIO_ARGS1(list,a1) list a1;
+# define TRIO_ARGS2(list,a1,a2) list a1; a2;
+# define TRIO_ARGS3(list,a1,a2,a3) list a1; a2; a3;
+# define TRIO_ARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4;
+# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5;
+# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) list a1; a2; a3; a4; a5; a6;
+# define TRIO_VARGS2(list,a1,a2) list a1; a2
+# define TRIO_VARGS3(list,a1,a2,a3) list a1; a2; a3
+# define TRIO_VARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4
+# define TRIO_VARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5
+# define TRIO_VA_DECL va_dcl
+# define TRIO_VA_START(x,y) va_start(x)
+# define TRIO_VA_END(x) va_end(x)
+#else /* ANSI C */
+# define TRIO_CONST const
+# define TRIO_VOLATILE volatile
+# define TRIO_SIGNED signed
+typedef long double trio_long_double_t;
+typedef void * trio_pointer_t;
+# define TRIO_SUFFIX_LONG(x) x ## L
+# define TRIO_PROTO(x) x
+# define TRIO_NOARGS void
+# define TRIO_ARGS1(list,a1) (a1)
+# define TRIO_ARGS2(list,a1,a2) (a1,a2)
+# define TRIO_ARGS3(list,a1,a2,a3) (a1,a2,a3)
+# define TRIO_ARGS4(list,a1,a2,a3,a4) (a1,a2,a3,a4)
+# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) (a1,a2,a3,a4,a5)
+# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
+# define TRIO_VARGS2 TRIO_ARGS2
+# define TRIO_VARGS3 TRIO_ARGS3
+# define TRIO_VARGS4 TRIO_ARGS4
+# define TRIO_VARGS5 TRIO_ARGS5
+# define TRIO_VA_DECL ...
+# define TRIO_VA_START(x,y) va_start(x,y)
+# define TRIO_VA_END(x) va_end(x)
+#endif
+
+#if defined(TRIO_COMPILER_SUPPORTS_C99) || defined(__cplusplus)
+# define TRIO_INLINE inline
+#elif defined(TRIO_COMPILER_GCC)
+# define TRIO_INLINE __inline__
+#elif defined(TRIO_COMPILER_MSVC)
+# define TRIO_INLINE _inline
+#elif defined(TRIO_COMPILER_BCB)
+# define TRIO_INLINE __inline
+#else
+# define TRIO_INLINE
+#endif
+
+/*************************************************************************
+ * Workarounds
+ */
+
+#if defined(TRIO_PLATFORM_VMS)
+/*
+ * Computations done with constants at compile time can trigger these
+ * even when compiling with IEEE enabled.
+ */
+# pragma message disable (UNDERFLOW, FLOATOVERFL)
+
+# if (__CRTL_VER < 80000000)
+/*
+ * Although the compiler supports C99 language constructs, the C
+ * run-time library does not contain all C99 functions.
+ *
+ * This was the case for 70300022. Update the 80000000 value when
+ * it has been accurately determined what version of the library
+ * supports C99.
+ */
+# if defined(TRIO_COMPILER_SUPPORTS_C99)
+# undef TRIO_COMPILER_SUPPORTS_C99
+# endif
+# endif
+#endif
+
+/*
+ * Not all preprocessors supports the LL token.
+ */
+#if defined(TRIO_COMPILER_BCB)
+#else
+# define TRIO_COMPILER_SUPPORTS_LL
+#endif
+
+#endif /* TRIO_TRIODEF_H */
diff --git a/trionan.c b/trionan.c
new file mode 100644
index 0000000..6fbabb5
--- /dev/null
+++ b/trionan.c
@@ -0,0 +1,914 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************
+ *
+ * Functions to handle special quantities in floating-point numbers
+ * (that is, NaNs and infinity). They provide the capability to detect
+ * and fabricate special quantities.
+ *
+ * Although written to be as portable as possible, it can never be
+ * guaranteed to work on all platforms, as not all hardware supports
+ * special quantities.
+ *
+ * The approach used here (approximately) is to:
+ *
+ * 1. Use C99 functionality when available.
+ * 2. Use IEEE 754 bit-patterns if possible.
+ * 3. Use platform-specific techniques.
+ *
+ ************************************************************************/
+
+/*
+ * TODO:
+ * o Put all the magic into trio_fpclassify_and_signbit(), and use this from
+ * trio_isnan() etc.
+ */
+
+/*************************************************************************
+ * Include files
+ */
+#include "triodef.h"
+#include "trionan.h"
+
+#include <math.h>
+#include <string.h>
+#include <limits.h>
+#include <float.h>
+#if defined(TRIO_PLATFORM_UNIX)
+# include <signal.h>
+#endif
+#if defined(TRIO_COMPILER_DECC)
+# if defined(__linux__)
+# include <cpml.h>
+# else
+# include <fp_class.h>
+# endif
+#endif
+#include <assert.h>
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_nan.h"
+#endif
+/** @addtogroup SpecialQuantities
+ @{
+*/
+
+/*************************************************************************
+ * Definitions
+ */
+
+#define TRIO_TRUE (1 == 1)
+#define TRIO_FALSE (0 == 1)
+
+/*
+ * We must enable IEEE floating-point on Alpha
+ */
+#if defined(__alpha) && !defined(_IEEE_FP)
+# if defined(TRIO_COMPILER_DECC)
+# if defined(TRIO_PLATFORM_VMS)
+# error "Must be compiled with option /IEEE_MODE=UNDERFLOW_TO_ZERO/FLOAT=IEEE"
+# else
+# if !defined(_CFE)
+# error "Must be compiled with option -ieee"
+# endif
+# endif
+# elif defined(TRIO_COMPILER_GCC) && (defined(__osf__) || defined(__linux__))
+# error "Must be compiled with option -mieee"
+# endif
+#endif /* __alpha && ! _IEEE_FP */
+
+/*
+ * In ANSI/IEEE 754-1985 64-bits double format numbers have the
+ * following properties (amoungst others)
+ *
+ * o FLT_RADIX == 2: binary encoding
+ * o DBL_MAX_EXP == 1024: 11 bits exponent, where one bit is used
+ * to indicate special numbers (e.g. NaN and Infinity), so the
+ * maximum exponent is 10 bits wide (2^10 == 1024).
+ * o DBL_MANT_DIG == 53: The mantissa is 52 bits wide, but because
+ * numbers are normalized the initial binary 1 is represented
+ * implicitly (the so-called "hidden bit"), which leaves us with
+ * the ability to represent 53 bits wide mantissa.
+ */
+#if (FLT_RADIX == 2) && (DBL_MAX_EXP == 1024) && (DBL_MANT_DIG == 53)
+# define USE_IEEE_754
+#endif
+
+
+/*************************************************************************
+ * Constants
+ */
+
+static TRIO_CONST char rcsid[] = "@(#)$Id$";
+
+#if defined(USE_IEEE_754)
+
+/*
+ * Endian-agnostic indexing macro.
+ *
+ * The value of internalEndianMagic, when converted into a 64-bit
+ * integer, becomes 0x0706050403020100 (we could have used a 64-bit
+ * integer value instead of a double, but not all platforms supports
+ * that type). The value is automatically encoded with the correct
+ * endianess by the compiler, which means that we can support any
+ * kind of endianess. The individual bytes are then used as an index
+ * for the IEEE 754 bit-patterns and masks.
+ */
+#define TRIO_DOUBLE_INDEX(x) (((unsigned char *)&internalEndianMagic)[7-(x)])
+
+#if (defined(__BORLANDC__) && __BORLANDC__ >= 0x0590)
+static TRIO_CONST double internalEndianMagic = 7.949928895127362e-275;
+#else
+static TRIO_CONST double internalEndianMagic = 7.949928895127363e-275;
+#endif
+
+/* Mask for the exponent */
+static TRIO_CONST unsigned char ieee_754_exponent_mask[] = {
+ 0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* Mask for the mantissa */
+static TRIO_CONST unsigned char ieee_754_mantissa_mask[] = {
+ 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
+};
+
+/* Mask for the sign bit */
+static TRIO_CONST unsigned char ieee_754_sign_mask[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* Bit-pattern for negative zero */
+static TRIO_CONST unsigned char ieee_754_negzero_array[] = {
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* Bit-pattern for infinity */
+static TRIO_CONST unsigned char ieee_754_infinity_array[] = {
+ 0x7F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* Bit-pattern for quiet NaN */
+static TRIO_CONST unsigned char ieee_754_qnan_array[] = {
+ 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+
+/*************************************************************************
+ * Functions
+ */
+
+/*
+ * trio_make_double
+ */
+TRIO_PRIVATE double
+trio_make_double
+TRIO_ARGS1((values),
+ TRIO_CONST unsigned char *values)
+{
+ TRIO_VOLATILE double result;
+ int i;
+
+ for (i = 0; i < (int)sizeof(double); i++) {
+ ((TRIO_VOLATILE unsigned char *)&result)[TRIO_DOUBLE_INDEX(i)] = values[i];
+ }
+ return result;
+}
+
+/*
+ * trio_is_special_quantity
+ */
+TRIO_PRIVATE int
+trio_is_special_quantity
+TRIO_ARGS2((number, has_mantissa),
+ double number,
+ int *has_mantissa)
+{
+ unsigned int i;
+ unsigned char current;
+ int is_special_quantity = TRIO_TRUE;
+
+ *has_mantissa = 0;
+
+ for (i = 0; i < (unsigned int)sizeof(double); i++) {
+ current = ((unsigned char *)&number)[TRIO_DOUBLE_INDEX(i)];
+ is_special_quantity
+ &= ((current & ieee_754_exponent_mask[i]) == ieee_754_exponent_mask[i]);
+ *has_mantissa |= (current & ieee_754_mantissa_mask[i]);
+ }
+ return is_special_quantity;
+}
+
+/*
+ * trio_is_negative
+ */
+TRIO_PRIVATE int
+trio_is_negative
+TRIO_ARGS1((number),
+ double number)
+{
+ unsigned int i;
+ int is_negative = TRIO_FALSE;
+
+ for (i = 0; i < (unsigned int)sizeof(double); i++) {
+ is_negative |= (((unsigned char *)&number)[TRIO_DOUBLE_INDEX(i)]
+ & ieee_754_sign_mask[i]);
+ }
+ return is_negative;
+}
+
+#endif /* USE_IEEE_754 */
+
+
+/**
+ Generate negative zero.
+
+ @return Floating-point representation of negative zero.
+*/
+TRIO_PUBLIC double
+trio_nzero(TRIO_NOARGS)
+{
+#if defined(USE_IEEE_754)
+ return trio_make_double(ieee_754_negzero_array);
+#else
+ TRIO_VOLATILE double zero = 0.0;
+
+ return -zero;
+#endif
+}
+
+/**
+ Generate positive infinity.
+
+ @return Floating-point representation of positive infinity.
+*/
+TRIO_PUBLIC double
+trio_pinf(TRIO_NOARGS)
+{
+ /* Cache the result */
+ static double result = 0.0;
+
+ if (result == 0.0) {
+
+#if defined(INFINITY) && defined(__STDC_IEC_559__)
+ result = (double)INFINITY;
+
+#elif defined(USE_IEEE_754)
+ result = trio_make_double(ieee_754_infinity_array);
+
+#else
+ /*
+ * If HUGE_VAL is different from DBL_MAX, then HUGE_VAL is used
+ * as infinity. Otherwise we have to resort to an overflow
+ * operation to generate infinity.
+ */
+# if defined(TRIO_PLATFORM_UNIX)
+ void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
+# endif
+
+ result = HUGE_VAL;
+ if (HUGE_VAL == DBL_MAX) {
+ /* Force overflow */
+ result += HUGE_VAL;
+ }
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal(SIGFPE, signal_handler);
+# endif
+
+#endif
+ }
+ return result;
+}
+
+/**
+ Generate negative infinity.
+
+ @return Floating-point value of negative infinity.
+*/
+TRIO_PUBLIC double
+trio_ninf(TRIO_NOARGS)
+{
+ static double result = 0.0;
+
+ if (result == 0.0) {
+ /*
+ * Negative infinity is calculated by negating positive infinity,
+ * which can be done because it is legal to do calculations on
+ * infinity (for example, 1 / infinity == 0).
+ */
+ result = -trio_pinf();
+ }
+ return result;
+}
+
+/**
+ Generate NaN.
+
+ @return Floating-point representation of NaN.
+*/
+TRIO_PUBLIC double
+trio_nan(TRIO_NOARGS)
+{
+ /* Cache the result */
+ static double result = 0.0;
+
+ if (result == 0.0) {
+
+#if defined(TRIO_COMPILER_SUPPORTS_C99)
+ result = nan("");
+
+#elif defined(NAN) && defined(__STDC_IEC_559__)
+ result = (double)NAN;
+
+#elif defined(USE_IEEE_754)
+ result = trio_make_double(ieee_754_qnan_array);
+
+#else
+ /*
+ * There are several ways to generate NaN. The one used here is
+ * to divide infinity by infinity. I would have preferred to add
+ * negative infinity to positive infinity, but that yields wrong
+ * result (infinity) on FreeBSD.
+ *
+ * This may fail if the hardware does not support NaN, or if
+ * the Invalid Operation floating-point exception is unmasked.
+ */
+# if defined(TRIO_PLATFORM_UNIX)
+ void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
+# endif
+
+ result = trio_pinf() / trio_pinf();
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal(SIGFPE, signal_handler);
+# endif
+
+#endif
+ }
+ return result;
+}
+
+/**
+ Check for NaN.
+
+ @param number An arbitrary floating-point number.
+ @return Boolean value indicating whether or not the number is a NaN.
+*/
+TRIO_PUBLIC int
+trio_isnan
+TRIO_ARGS1((number),
+ double number)
+{
+#if (defined(TRIO_COMPILER_SUPPORTS_C99) && defined(isnan)) \
+ || defined(TRIO_COMPILER_SUPPORTS_UNIX95)
+ /*
+ * C99 defines isnan() as a macro. UNIX95 defines isnan() as a
+ * function. This function was already present in XPG4, but this
+ * is a bit tricky to detect with compiler defines, so we choose
+ * the conservative approach and only use it for UNIX95.
+ */
+ return isnan(number);
+
+#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
+ /*
+ * Microsoft Visual C++ and Borland C++ Builder have an _isnan()
+ * function.
+ */
+ return _isnan(number) ? TRIO_TRUE : TRIO_FALSE;
+
+#elif defined(USE_IEEE_754)
+ /*
+ * Examine IEEE 754 bit-pattern. A NaN must have a special exponent
+ * pattern, and a non-empty mantissa.
+ */
+ int has_mantissa;
+ int is_special_quantity;
+
+ is_special_quantity = trio_is_special_quantity(number, &has_mantissa);
+
+ return (is_special_quantity && has_mantissa);
+
+#else
+ /*
+ * Fallback solution
+ */
+ int status;
+ double integral, fraction;
+
+# if defined(TRIO_PLATFORM_UNIX)
+ void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
+# endif
+
+ status = (/*
+ * NaN is the only number which does not compare to itself
+ */
+ ((TRIO_VOLATILE double)number != (TRIO_VOLATILE double)number) ||
+ /*
+ * Fallback solution if NaN compares to NaN
+ */
+ ((number != 0.0) &&
+ (fraction = modf(number, &integral),
+ integral == fraction)));
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal(SIGFPE, signal_handler);
+# endif
+
+ return status;
+
+#endif
+}
+
+/**
+ Check for infinity.
+
+ @param number An arbitrary floating-point number.
+ @return 1 if positive infinity, -1 if negative infinity, 0 otherwise.
+*/
+TRIO_PUBLIC int
+trio_isinf
+TRIO_ARGS1((number),
+ double number)
+{
+#if defined(TRIO_COMPILER_DECC) && !defined(__linux__)
+ /*
+ * DECC has an isinf() macro, but it works differently than that
+ * of C99, so we use the fp_class() function instead.
+ */
+ return ((fp_class(number) == FP_POS_INF)
+ ? 1
+ : ((fp_class(number) == FP_NEG_INF) ? -1 : 0));
+
+#elif defined(isinf)
+ /*
+ * C99 defines isinf() as a macro.
+ */
+ return isinf(number)
+ ? ((number > 0.0) ? 1 : -1)
+ : 0;
+
+#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
+ /*
+ * Microsoft Visual C++ and Borland C++ Builder have an _fpclass()
+ * function that can be used to detect infinity.
+ */
+ return ((_fpclass(number) == _FPCLASS_PINF)
+ ? 1
+ : ((_fpclass(number) == _FPCLASS_NINF) ? -1 : 0));
+
+#elif defined(USE_IEEE_754)
+ /*
+ * Examine IEEE 754 bit-pattern. Infinity must have a special exponent
+ * pattern, and an empty mantissa.
+ */
+ int has_mantissa;
+ int is_special_quantity;
+
+ is_special_quantity = trio_is_special_quantity(number, &has_mantissa);
+
+ return (is_special_quantity && !has_mantissa)
+ ? ((number < 0.0) ? -1 : 1)
+ : 0;
+
+#else
+ /*
+ * Fallback solution.
+ */
+ int status;
+
+# if defined(TRIO_PLATFORM_UNIX)
+ void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
+# endif
+
+ double infinity = trio_pinf();
+
+ status = ((number == infinity)
+ ? 1
+ : ((number == -infinity) ? -1 : 0));
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal(SIGFPE, signal_handler);
+# endif
+
+ return status;
+
+#endif
+}
+
+#if 0
+ /* Temporary fix - this routine is not used anywhere */
+/**
+ Check for finity.
+
+ @param number An arbitrary floating-point number.
+ @return Boolean value indicating whether or not the number is a finite.
+*/
+TRIO_PUBLIC int
+trio_isfinite
+TRIO_ARGS1((number),
+ double number)
+{
+#if defined(TRIO_COMPILER_SUPPORTS_C99) && defined(isfinite)
+ /*
+ * C99 defines isfinite() as a macro.
+ */
+ return isfinite(number);
+
+#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
+ /*
+ * Microsoft Visual C++ and Borland C++ Builder use _finite().
+ */
+ return _finite(number);
+
+#elif defined(USE_IEEE_754)
+ /*
+ * Examine IEEE 754 bit-pattern. For finity we do not care about the
+ * mantissa.
+ */
+ int dummy;
+
+ return (! trio_is_special_quantity(number, &dummy));
+
+#else
+ /*
+ * Fallback solution.
+ */
+ return ((trio_isinf(number) == 0) && (trio_isnan(number) == 0));
+
+#endif
+}
+
+#endif
+
+/*
+ * The sign of NaN is always false
+ */
+TRIO_PUBLIC int
+trio_fpclassify_and_signbit
+TRIO_ARGS2((number, is_negative),
+ double number,
+ int *is_negative)
+{
+#if defined(fpclassify) && defined(signbit)
+ /*
+ * C99 defines fpclassify() and signbit() as a macros
+ */
+ *is_negative = signbit(number);
+ switch (fpclassify(number)) {
+ case FP_NAN:
+ return TRIO_FP_NAN;
+ case FP_INFINITE:
+ return TRIO_FP_INFINITE;
+ case FP_SUBNORMAL:
+ return TRIO_FP_SUBNORMAL;
+ case FP_ZERO:
+ return TRIO_FP_ZERO;
+ default:
+ return TRIO_FP_NORMAL;
+ }
+
+#else
+# if defined(TRIO_COMPILER_DECC)
+ /*
+ * DECC has an fp_class() function.
+ */
+# define TRIO_FPCLASSIFY(n) fp_class(n)
+# define TRIO_QUIET_NAN FP_QNAN
+# define TRIO_SIGNALLING_NAN FP_SNAN
+# define TRIO_POSITIVE_INFINITY FP_POS_INF
+# define TRIO_NEGATIVE_INFINITY FP_NEG_INF
+# define TRIO_POSITIVE_SUBNORMAL FP_POS_DENORM
+# define TRIO_NEGATIVE_SUBNORMAL FP_NEG_DENORM
+# define TRIO_POSITIVE_ZERO FP_POS_ZERO
+# define TRIO_NEGATIVE_ZERO FP_NEG_ZERO
+# define TRIO_POSITIVE_NORMAL FP_POS_NORM
+# define TRIO_NEGATIVE_NORMAL FP_NEG_NORM
+
+# elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
+ /*
+ * Microsoft Visual C++ and Borland C++ Builder have an _fpclass()
+ * function.
+ */
+# define TRIO_FPCLASSIFY(n) _fpclass(n)
+# define TRIO_QUIET_NAN _FPCLASS_QNAN
+# define TRIO_SIGNALLING_NAN _FPCLASS_SNAN
+# define TRIO_POSITIVE_INFINITY _FPCLASS_PINF
+# define TRIO_NEGATIVE_INFINITY _FPCLASS_NINF
+# define TRIO_POSITIVE_SUBNORMAL _FPCLASS_PD
+# define TRIO_NEGATIVE_SUBNORMAL _FPCLASS_ND
+# define TRIO_POSITIVE_ZERO _FPCLASS_PZ
+# define TRIO_NEGATIVE_ZERO _FPCLASS_NZ
+# define TRIO_POSITIVE_NORMAL _FPCLASS_PN
+# define TRIO_NEGATIVE_NORMAL _FPCLASS_NN
+
+# elif defined(FP_PLUS_NORM)
+ /*
+ * HP-UX 9.x and 10.x have an fpclassify() function, that is different
+ * from the C99 fpclassify() macro supported on HP-UX 11.x.
+ *
+ * AIX has class() for C, and _class() for C++, which returns the
+ * same values as the HP-UX fpclassify() function.
+ */
+# if defined(TRIO_PLATFORM_AIX)
+# if defined(__cplusplus)
+# define TRIO_FPCLASSIFY(n) _class(n)
+# else
+# define TRIO_FPCLASSIFY(n) class(n)
+# endif
+# else
+# define TRIO_FPCLASSIFY(n) fpclassify(n)
+# endif
+# define TRIO_QUIET_NAN FP_QNAN
+# define TRIO_SIGNALLING_NAN FP_SNAN
+# define TRIO_POSITIVE_INFINITY FP_PLUS_INF
+# define TRIO_NEGATIVE_INFINITY FP_MINUS_INF
+# define TRIO_POSITIVE_SUBNORMAL FP_PLUS_DENORM
+# define TRIO_NEGATIVE_SUBNORMAL FP_MINUS_DENORM
+# define TRIO_POSITIVE_ZERO FP_PLUS_ZERO
+# define TRIO_NEGATIVE_ZERO FP_MINUS_ZERO
+# define TRIO_POSITIVE_NORMAL FP_PLUS_NORM
+# define TRIO_NEGATIVE_NORMAL FP_MINUS_NORM
+# endif
+
+# if defined(TRIO_FPCLASSIFY)
+ switch (TRIO_FPCLASSIFY(number)) {
+ case TRIO_QUIET_NAN:
+ case TRIO_SIGNALLING_NAN:
+ *is_negative = TRIO_FALSE; /* NaN has no sign */
+ return TRIO_FP_NAN;
+ case TRIO_POSITIVE_INFINITY:
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_INFINITE;
+ case TRIO_NEGATIVE_INFINITY:
+ *is_negative = TRIO_TRUE;
+ return TRIO_FP_INFINITE;
+ case TRIO_POSITIVE_SUBNORMAL:
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_SUBNORMAL;
+ case TRIO_NEGATIVE_SUBNORMAL:
+ *is_negative = TRIO_TRUE;
+ return TRIO_FP_SUBNORMAL;
+ case TRIO_POSITIVE_ZERO:
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_ZERO;
+ case TRIO_NEGATIVE_ZERO:
+ *is_negative = TRIO_TRUE;
+ return TRIO_FP_ZERO;
+ case TRIO_POSITIVE_NORMAL:
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_NORMAL;
+ case TRIO_NEGATIVE_NORMAL:
+ *is_negative = TRIO_TRUE;
+ return TRIO_FP_NORMAL;
+ default:
+ /* Just in case... */
+ *is_negative = (number < 0.0);
+ return TRIO_FP_NORMAL;
+ }
+
+# else
+ /*
+ * Fallback solution.
+ */
+ int rc;
+
+ if (number == 0.0) {
+ /*
+ * In IEEE 754 the sign of zero is ignored in comparisons, so we
+ * have to handle this as a special case by examining the sign bit
+ * directly.
+ */
+# if defined(USE_IEEE_754)
+ *is_negative = trio_is_negative(number);
+# else
+ *is_negative = TRIO_FALSE; /* FIXME */
+# endif
+ return TRIO_FP_ZERO;
+ }
+ if (trio_isnan(number)) {
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_NAN;
+ }
+ if ((rc = trio_isinf(number))) {
+ *is_negative = (rc == -1);
+ return TRIO_FP_INFINITE;
+ }
+ if ((number > 0.0) && (number < DBL_MIN)) {
+ *is_negative = TRIO_FALSE;
+ return TRIO_FP_SUBNORMAL;
+ }
+ if ((number < 0.0) && (number > -DBL_MIN)) {
+ *is_negative = TRIO_TRUE;
+ return TRIO_FP_SUBNORMAL;
+ }
+ *is_negative = (number < 0.0);
+ return TRIO_FP_NORMAL;
+
+# endif
+#endif
+}
+
+/**
+ Examine the sign of a number.
+
+ @param number An arbitrary floating-point number.
+ @return Boolean value indicating whether or not the number has the
+ sign bit set (i.e. is negative).
+*/
+TRIO_PUBLIC int
+trio_signbit
+TRIO_ARGS1((number),
+ double number)
+{
+ int is_negative;
+
+ (void)trio_fpclassify_and_signbit(number, &is_negative);
+ return is_negative;
+}
+
+#if 0
+ /* Temporary fix - this routine is not used in libxml */
+/**
+ Examine the class of a number.
+
+ @param number An arbitrary floating-point number.
+ @return Enumerable value indicating the class of @p number
+*/
+TRIO_PUBLIC int
+trio_fpclassify
+TRIO_ARGS1((number),
+ double number)
+{
+ int dummy;
+
+ return trio_fpclassify_and_signbit(number, &dummy);
+}
+
+#endif
+
+/** @} SpecialQuantities */
+
+/*************************************************************************
+ * For test purposes.
+ *
+ * Add the following compiler option to include this test code.
+ *
+ * Unix : -DSTANDALONE
+ * VMS : /DEFINE=(STANDALONE)
+ */
+#if defined(STANDALONE)
+# include <stdio.h>
+
+static TRIO_CONST char *
+getClassification
+TRIO_ARGS1((type),
+ int type)
+{
+ switch (type) {
+ case TRIO_FP_INFINITE:
+ return "FP_INFINITE";
+ case TRIO_FP_NAN:
+ return "FP_NAN";
+ case TRIO_FP_NORMAL:
+ return "FP_NORMAL";
+ case TRIO_FP_SUBNORMAL:
+ return "FP_SUBNORMAL";
+ case TRIO_FP_ZERO:
+ return "FP_ZERO";
+ default:
+ return "FP_UNKNOWN";
+ }
+}
+
+static void
+print_class
+TRIO_ARGS2((prefix, number),
+ TRIO_CONST char *prefix,
+ double number)
+{
+ printf("%-6s: %s %-15s %g\n",
+ prefix,
+ trio_signbit(number) ? "-" : "+",
+ getClassification(TRIO_FPCLASSIFY(number)),
+ number);
+}
+
+int main(TRIO_NOARGS)
+{
+ double my_nan;
+ double my_pinf;
+ double my_ninf;
+# if defined(TRIO_PLATFORM_UNIX)
+ void (*signal_handler) TRIO_PROTO((int));
+# endif
+
+ my_nan = trio_nan();
+ my_pinf = trio_pinf();
+ my_ninf = trio_ninf();
+
+ print_class("Nan", my_nan);
+ print_class("PInf", my_pinf);
+ print_class("NInf", my_ninf);
+ print_class("PZero", 0.0);
+ print_class("NZero", -0.0);
+ print_class("PNorm", 1.0);
+ print_class("NNorm", -1.0);
+ print_class("PSub", 1.01e-307 - 1.00e-307);
+ print_class("NSub", 1.00e-307 - 1.01e-307);
+
+ printf("NaN : %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_nan,
+ ((unsigned char *)&my_nan)[0],
+ ((unsigned char *)&my_nan)[1],
+ ((unsigned char *)&my_nan)[2],
+ ((unsigned char *)&my_nan)[3],
+ ((unsigned char *)&my_nan)[4],
+ ((unsigned char *)&my_nan)[5],
+ ((unsigned char *)&my_nan)[6],
+ ((unsigned char *)&my_nan)[7],
+ trio_isnan(my_nan), trio_isinf(my_nan));
+ printf("PInf: %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_pinf,
+ ((unsigned char *)&my_pinf)[0],
+ ((unsigned char *)&my_pinf)[1],
+ ((unsigned char *)&my_pinf)[2],
+ ((unsigned char *)&my_pinf)[3],
+ ((unsigned char *)&my_pinf)[4],
+ ((unsigned char *)&my_pinf)[5],
+ ((unsigned char *)&my_pinf)[6],
+ ((unsigned char *)&my_pinf)[7],
+ trio_isnan(my_pinf), trio_isinf(my_pinf));
+ printf("NInf: %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_ninf,
+ ((unsigned char *)&my_ninf)[0],
+ ((unsigned char *)&my_ninf)[1],
+ ((unsigned char *)&my_ninf)[2],
+ ((unsigned char *)&my_ninf)[3],
+ ((unsigned char *)&my_ninf)[4],
+ ((unsigned char *)&my_ninf)[5],
+ ((unsigned char *)&my_ninf)[6],
+ ((unsigned char *)&my_ninf)[7],
+ trio_isnan(my_ninf), trio_isinf(my_ninf));
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal_handler = signal(SIGFPE, SIG_IGN);
+# endif
+
+ my_pinf = DBL_MAX + DBL_MAX;
+ my_ninf = -my_pinf;
+ my_nan = my_pinf / my_pinf;
+
+# if defined(TRIO_PLATFORM_UNIX)
+ signal(SIGFPE, signal_handler);
+# endif
+
+ printf("NaN : %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_nan,
+ ((unsigned char *)&my_nan)[0],
+ ((unsigned char *)&my_nan)[1],
+ ((unsigned char *)&my_nan)[2],
+ ((unsigned char *)&my_nan)[3],
+ ((unsigned char *)&my_nan)[4],
+ ((unsigned char *)&my_nan)[5],
+ ((unsigned char *)&my_nan)[6],
+ ((unsigned char *)&my_nan)[7],
+ trio_isnan(my_nan), trio_isinf(my_nan));
+ printf("PInf: %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_pinf,
+ ((unsigned char *)&my_pinf)[0],
+ ((unsigned char *)&my_pinf)[1],
+ ((unsigned char *)&my_pinf)[2],
+ ((unsigned char *)&my_pinf)[3],
+ ((unsigned char *)&my_pinf)[4],
+ ((unsigned char *)&my_pinf)[5],
+ ((unsigned char *)&my_pinf)[6],
+ ((unsigned char *)&my_pinf)[7],
+ trio_isnan(my_pinf), trio_isinf(my_pinf));
+ printf("NInf: %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
+ my_ninf,
+ ((unsigned char *)&my_ninf)[0],
+ ((unsigned char *)&my_ninf)[1],
+ ((unsigned char *)&my_ninf)[2],
+ ((unsigned char *)&my_ninf)[3],
+ ((unsigned char *)&my_ninf)[4],
+ ((unsigned char *)&my_ninf)[5],
+ ((unsigned char *)&my_ninf)[6],
+ ((unsigned char *)&my_ninf)[7],
+ trio_isnan(my_ninf), trio_isinf(my_ninf));
+
+ return 0;
+}
+#endif
diff --git a/trionan.h b/trionan.h
new file mode 100644
index 0000000..be6e718
--- /dev/null
+++ b/trionan.h
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************/
+
+#ifndef TRIO_NAN_H
+#define TRIO_NAN_H
+
+#include "triodef.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ TRIO_FP_INFINITE,
+ TRIO_FP_NAN,
+ TRIO_FP_NORMAL,
+ TRIO_FP_SUBNORMAL,
+ TRIO_FP_ZERO
+};
+
+/*
+ * Return NaN (Not-a-Number).
+ */
+TRIO_PUBLIC double trio_nan TRIO_PROTO((void));
+
+/*
+ * Return positive infinity.
+ */
+TRIO_PUBLIC double trio_pinf TRIO_PROTO((void));
+
+/*
+ * Return negative infinity.
+ */
+TRIO_PUBLIC double trio_ninf TRIO_PROTO((void));
+
+/*
+ * Return negative zero.
+ */
+TRIO_PUBLIC double trio_nzero TRIO_PROTO((TRIO_NOARGS));
+
+/*
+ * If number is a NaN return non-zero, otherwise return zero.
+ */
+TRIO_PUBLIC int trio_isnan TRIO_PROTO((double number));
+
+/*
+ * If number is positive infinity return 1, if number is negative
+ * infinity return -1, otherwise return 0.
+ */
+TRIO_PUBLIC int trio_isinf TRIO_PROTO((double number));
+
+/*
+ * If number is finite return non-zero, otherwise return zero.
+ */
+#if 0
+ /* Temporary fix - these 2 routines not used in libxml */
+TRIO_PUBLIC int trio_isfinite TRIO_PROTO((double number));
+
+TRIO_PUBLIC int trio_fpclassify TRIO_PROTO((double number));
+#endif
+
+TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number));
+
+TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO((double number, int *is_negative));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* TRIO_NAN_H */
diff --git a/triop.h b/triop.h
new file mode 100644
index 0000000..8462c56
--- /dev/null
+++ b/triop.h
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************
+ *
+ * Private functions, types, etc. used for callback functions.
+ *
+ * The ref pointer is an opaque type and should remain as such.
+ * Private data must only be accessible through the getter and
+ * setter functions.
+ *
+ ************************************************************************/
+
+#ifndef TRIO_TRIOP_H
+#define TRIO_TRIOP_H
+
+#include "triodef.h"
+
+#include <stdlib.h>
+#if defined(TRIO_COMPILER_ANCIENT)
+# include <varargs.h>
+#else
+# include <stdarg.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef TRIO_C99
+# define TRIO_C99 1
+#endif
+#ifndef TRIO_BSD
+# define TRIO_BSD 1
+#endif
+#ifndef TRIO_GNU
+# define TRIO_GNU 1
+#endif
+#ifndef TRIO_MISC
+# define TRIO_MISC 1
+#endif
+#ifndef TRIO_UNIX98
+# define TRIO_UNIX98 1
+#endif
+#ifndef TRIO_MICROSOFT
+# define TRIO_MICROSOFT 1
+#endif
+#ifndef TRIO_EXTENSION
+# define TRIO_EXTENSION 1
+#endif
+#ifndef TRIO_WIDECHAR /* Does not work yet. Do not enable */
+# define TRIO_WIDECHAR 0
+#endif
+#ifndef TRIO_ERRORS
+# define TRIO_ERRORS 1
+#endif
+
+#ifndef TRIO_MALLOC
+# define TRIO_MALLOC(n) malloc(n)
+#endif
+#ifndef TRIO_REALLOC
+# define TRIO_REALLOC(x,n) realloc((x),(n))
+#endif
+#ifndef TRIO_FREE
+# define TRIO_FREE(x) free(x)
+#endif
+
+
+/*************************************************************************
+ * User-defined specifiers
+ */
+
+typedef int (*trio_callback_t) TRIO_PROTO((trio_pointer_t));
+
+trio_pointer_t trio_register TRIO_PROTO((trio_callback_t callback, const char *name));
+void trio_unregister TRIO_PROTO((trio_pointer_t handle));
+
+TRIO_CONST char *trio_get_format TRIO_PROTO((trio_pointer_t ref));
+trio_pointer_t trio_get_argument TRIO_PROTO((trio_pointer_t ref));
+
+/* Modifiers */
+int trio_get_width TRIO_PROTO((trio_pointer_t ref));
+void trio_set_width TRIO_PROTO((trio_pointer_t ref, int width));
+int trio_get_precision TRIO_PROTO((trio_pointer_t ref));
+void trio_set_precision TRIO_PROTO((trio_pointer_t ref, int precision));
+int trio_get_base TRIO_PROTO((trio_pointer_t ref));
+void trio_set_base TRIO_PROTO((trio_pointer_t ref, int base));
+int trio_get_padding TRIO_PROTO((trio_pointer_t ref));
+void trio_set_padding TRIO_PROTO((trio_pointer_t ref, int is_padding));
+int trio_get_short TRIO_PROTO((trio_pointer_t ref)); /* h */
+void trio_set_shortshort TRIO_PROTO((trio_pointer_t ref, int is_shortshort));
+int trio_get_shortshort TRIO_PROTO((trio_pointer_t ref)); /* hh */
+void trio_set_short TRIO_PROTO((trio_pointer_t ref, int is_short));
+int trio_get_long TRIO_PROTO((trio_pointer_t ref)); /* l */
+void trio_set_long TRIO_PROTO((trio_pointer_t ref, int is_long));
+int trio_get_longlong TRIO_PROTO((trio_pointer_t ref)); /* ll */
+void trio_set_longlong TRIO_PROTO((trio_pointer_t ref, int is_longlong));
+int trio_get_longdouble TRIO_PROTO((trio_pointer_t ref)); /* L */
+void trio_set_longdouble TRIO_PROTO((trio_pointer_t ref, int is_longdouble));
+int trio_get_alternative TRIO_PROTO((trio_pointer_t ref)); /* # */
+void trio_set_alternative TRIO_PROTO((trio_pointer_t ref, int is_alternative));
+int trio_get_alignment TRIO_PROTO((trio_pointer_t ref)); /* - */
+void trio_set_alignment TRIO_PROTO((trio_pointer_t ref, int is_leftaligned));
+int trio_get_spacing TRIO_PROTO((trio_pointer_t ref)); /* TRIO_PROTO((space) */
+void trio_set_spacing TRIO_PROTO((trio_pointer_t ref, int is_space));
+int trio_get_sign TRIO_PROTO((trio_pointer_t ref)); /* + */
+void trio_set_sign TRIO_PROTO((trio_pointer_t ref, int is_showsign));
+int trio_get_quote TRIO_PROTO((trio_pointer_t ref)); /* ' */
+void trio_set_quote TRIO_PROTO((trio_pointer_t ref, int is_quote));
+int trio_get_upper TRIO_PROTO((trio_pointer_t ref));
+void trio_set_upper TRIO_PROTO((trio_pointer_t ref, int is_upper));
+#if TRIO_C99
+int trio_get_largest TRIO_PROTO((trio_pointer_t ref)); /* j */
+void trio_set_largest TRIO_PROTO((trio_pointer_t ref, int is_largest));
+int trio_get_ptrdiff TRIO_PROTO((trio_pointer_t ref)); /* t */
+void trio_set_ptrdiff TRIO_PROTO((trio_pointer_t ref, int is_ptrdiff));
+int trio_get_size TRIO_PROTO((trio_pointer_t ref)); /* z / Z */
+void trio_set_size TRIO_PROTO((trio_pointer_t ref, int is_size));
+#endif
+
+/* Printing */
+int trio_print_ref TRIO_PROTO((trio_pointer_t ref, const char *format, ...));
+int trio_vprint_ref TRIO_PROTO((trio_pointer_t ref, const char *format, va_list args));
+int trio_printv_ref TRIO_PROTO((trio_pointer_t ref, const char *format, trio_pointer_t *args));
+
+void trio_print_int TRIO_PROTO((trio_pointer_t ref, int number));
+void trio_print_uint TRIO_PROTO((trio_pointer_t ref, unsigned int number));
+/* void trio_print_long TRIO_PROTO((trio_pointer_t ref, long number)); */
+/* void trio_print_ulong TRIO_PROTO((trio_pointer_t ref, unsigned long number)); */
+void trio_print_double TRIO_PROTO((trio_pointer_t ref, double number));
+void trio_print_string TRIO_PROTO((trio_pointer_t ref, char *string));
+void trio_print_pointer TRIO_PROTO((trio_pointer_t ref, trio_pointer_t pointer));
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* TRIO_TRIOP_H */
diff --git a/triostr.c b/triostr.c
new file mode 100644
index 0000000..123bbeb
--- /dev/null
+++ b/triostr.c
@@ -0,0 +1,2112 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************/
+
+/*************************************************************************
+ * Include files
+ */
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#include "triodef.h"
+#include "triostr.h"
+
+/*************************************************************************
+ * Definitions
+ */
+
+#if !defined(TRIO_STRING_PUBLIC)
+# define TRIO_STRING_PUBLIC TRIO_PUBLIC
+#endif
+#if !defined(TRIO_STRING_PRIVATE)
+# define TRIO_STRING_PRIVATE TRIO_PRIVATE
+#endif
+
+#if !defined(NULL)
+# define NULL 0
+#endif
+#if !defined(NIL)
+# define NIL ((char)0)
+#endif
+#if !defined(FALSE)
+# define FALSE (1 == 0)
+# define TRUE (! FALSE)
+#endif
+#if !defined(BOOLEAN_T)
+# define BOOLEAN_T int
+#endif
+
+#ifdef __VMS
+# define USE_STRTOD
+#elif defined(TRIO_COMPILER_SUPPORTS_C99)
+# define USE_STRTOD
+# define USE_STRTOF
+#elif defined(TRIO_COMPILER_MSVC)
+# define USE_STRTOD
+#endif
+
+#if defined(TRIO_PLATFORM_UNIX)
+# define USE_STRCASECMP
+# define USE_STRNCASECMP
+# if defined(TRIO_PLATFORM_SUNOS)
+# define USE_SYS_ERRLIST
+# else
+# define USE_STRERROR
+# endif
+# if defined(TRIO_PLATFORM_QNX)
+# define strcasecmp(x,y) stricmp(x,y)
+# define strncasecmp(x,y,n) strnicmp(x,y,n)
+# endif
+#elif defined(TRIO_PLATFORM_WIN32)
+# define USE_STRCASECMP
+# if defined(_WIN32_WCE)
+# define strcasecmp(x,y) _stricmp(x,y)
+# else
+# define strcasecmp(x,y) strcmpi(x,y)
+# endif
+#elif defined(TRIO_PLATFORM_OS400)
+# define USE_STRCASECMP
+# define USE_STRNCASECMP
+# include <strings.h>
+#endif
+
+#if !(defined(TRIO_PLATFORM_SUNOS))
+# define USE_TOLOWER
+# define USE_TOUPPER
+#endif
+
+/*************************************************************************
+ * Structures
+ */
+
+struct _trio_string_t
+{
+ char *content;
+ size_t length;
+ size_t allocated;
+};
+
+/*************************************************************************
+ * Constants
+ */
+
+#if !defined(TRIO_MINIMAL)
+static TRIO_CONST char rcsid[] = "@(#)$Id$";
+#endif
+
+/*************************************************************************
+ * Static String Functions
+ */
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_static.h"
+#endif
+/** @addtogroup StaticStrings
+ @{
+*/
+
+/**
+ Create new string.
+
+ @param size Size of new string.
+ @return Pointer to string, or NULL if allocation failed.
+*/
+TRIO_STRING_PUBLIC char *
+trio_create
+TRIO_ARGS1((size),
+ size_t size)
+{
+ return (char *)TRIO_MALLOC(size);
+}
+
+
+/**
+ Destroy string.
+
+ @param string String to be freed.
+*/
+TRIO_STRING_PUBLIC void
+trio_destroy
+TRIO_ARGS1((string),
+ char *string)
+{
+ if (string)
+ {
+ TRIO_FREE(string);
+ }
+}
+
+
+/**
+ Count the number of characters in a string.
+
+ @param string String to measure.
+ @return Number of characters in @string.
+*/
+TRIO_STRING_PUBLIC size_t
+trio_length
+TRIO_ARGS1((string),
+ TRIO_CONST char *string)
+{
+ return strlen(string);
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Append @p source at the end of @p target.
+
+ @param target Target string.
+ @param source Source string.
+ @return Boolean value indicating success or failure.
+
+ @pre @p target must point to a memory chunk with sufficient room to
+ contain the @p target string and @p source string.
+ @pre No boundary checking is performed, so insufficient memory will
+ result in a buffer overrun.
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC int
+trio_append
+TRIO_ARGS2((target, source),
+ char *target,
+ TRIO_CONST char *source)
+{
+ assert(target);
+ assert(source);
+
+ return (strcat(target, source) != NULL);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Append at most @p max characters from @p source to @p target.
+
+ @param target Target string.
+ @param max Maximum number of characters to append.
+ @param source Source string.
+ @return Boolean value indicating success or failure.
+
+ @pre @p target must point to a memory chuck with sufficient room to
+ contain the @p target string and the @p source string (at most @p max
+ characters).
+ @pre No boundary checking is performed, so insufficient memory will
+ result in a buffer overrun.
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC int
+trio_append_max
+TRIO_ARGS3((target, max, source),
+ char *target,
+ size_t max,
+ TRIO_CONST char *source)
+{
+ size_t length;
+
+ assert(target);
+ assert(source);
+
+ length = trio_length(target);
+
+ if (max > length)
+ {
+ strncat(target, source, max - length - 1);
+ }
+ return TRUE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Determine if a string contains a substring.
+
+ @param string String to be searched.
+ @param substring String to be found.
+ @return Boolean value indicating success or failure.
+*/
+TRIO_STRING_PUBLIC int
+trio_contains
+TRIO_ARGS2((string, substring),
+ TRIO_CONST char *string,
+ TRIO_CONST char *substring)
+{
+ assert(string);
+ assert(substring);
+
+ return (0 != strstr(string, substring));
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Copy @p source to @p target.
+
+ @param target Target string.
+ @param source Source string.
+ @return Boolean value indicating success or failure.
+
+ @pre @p target must point to a memory chunk with sufficient room to
+ contain the @p source string.
+ @pre No boundary checking is performed, so insufficient memory will
+ result in a buffer overrun.
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC int
+trio_copy
+TRIO_ARGS2((target, source),
+ char *target,
+ TRIO_CONST char *source)
+{
+ assert(target);
+ assert(source);
+
+ (void)strcpy(target, source);
+ return TRUE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Copy at most @p max characters from @p source to @p target.
+
+ @param target Target string.
+ @param max Maximum number of characters to append.
+ @param source Source string.
+ @return Boolean value indicating success or failure.
+
+ @pre @p target must point to a memory chunk with sufficient room to
+ contain the @p source string (at most @p max characters).
+ @pre No boundary checking is performed, so insufficient memory will
+ result in a buffer overrun.
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC int
+trio_copy_max
+TRIO_ARGS3((target, max, source),
+ char *target,
+ size_t max,
+ TRIO_CONST char *source)
+{
+ assert(target);
+ assert(source);
+ assert(max > 0); /* Includes != 0 */
+
+ (void)strncpy(target, source, max - 1);
+ target[max - 1] = (char)0;
+ return TRUE;
+}
+
+
+/*
+ * TrioDuplicateMax
+ */
+TRIO_STRING_PRIVATE char *
+TrioDuplicateMax
+TRIO_ARGS2((source, size),
+ TRIO_CONST char *source,
+ size_t size)
+{
+ char *target;
+
+ assert(source);
+
+ /* Make room for string plus a terminating zero */
+ size++;
+ target = trio_create(size);
+ if (target)
+ {
+ trio_copy_max(target, size, source);
+ }
+ return target;
+}
+
+
+/**
+ Duplicate @p source.
+
+ @param source Source string.
+ @return A copy of the @p source string.
+
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC char *
+trio_duplicate
+TRIO_ARGS1((source),
+ TRIO_CONST char *source)
+{
+ return TrioDuplicateMax(source, trio_length(source));
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Duplicate at most @p max characters of @p source.
+
+ @param source Source string.
+ @param max Maximum number of characters to duplicate.
+ @return A copy of the @p source string.
+
+ @post @p target will be zero terminated.
+*/
+TRIO_STRING_PUBLIC char *
+trio_duplicate_max TRIO_ARGS2((source, max),
+ TRIO_CONST char *source,
+ size_t max)
+{
+ size_t length;
+
+ assert(source);
+ assert(max > 0);
+
+ length = trio_length(source);
+ if (length > max)
+ {
+ length = max;
+ }
+ return TrioDuplicateMax(source, length);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Compare if two strings are equal.
+
+ @param first First string.
+ @param second Second string.
+ @return Boolean indicating whether the two strings are equal or not.
+
+ Case-insensitive comparison.
+*/
+TRIO_STRING_PUBLIC int
+trio_equal
+TRIO_ARGS2((first, second),
+ TRIO_CONST char *first,
+ TRIO_CONST char *second)
+{
+ assert(first);
+ assert(second);
+
+ if ((first != NULL) && (second != NULL))
+ {
+#if defined(USE_STRCASECMP)
+ return (0 == strcasecmp(first, second));
+#else
+ while ((*first != NIL) && (*second != NIL))
+ {
+ if (trio_to_upper(*first) != trio_to_upper(*second))
+ {
+ break;
+ }
+ first++;
+ second++;
+ }
+ return ((*first == NIL) && (*second == NIL));
+#endif
+ }
+ return FALSE;
+}
+
+
+/**
+ Compare if two strings are equal.
+
+ @param first First string.
+ @param second Second string.
+ @return Boolean indicating whether the two strings are equal or not.
+
+ Case-sensitive comparison.
+*/
+TRIO_STRING_PUBLIC int
+trio_equal_case
+TRIO_ARGS2((first, second),
+ TRIO_CONST char *first,
+ TRIO_CONST char *second)
+{
+ assert(first);
+ assert(second);
+
+ if ((first != NULL) && (second != NULL))
+ {
+ return (0 == strcmp(first, second));
+ }
+ return FALSE;
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Compare if two strings up until the first @p max characters are equal.
+
+ @param first First string.
+ @param max Maximum number of characters to compare.
+ @param second Second string.
+ @return Boolean indicating whether the two strings are equal or not.
+
+ Case-sensitive comparison.
+*/
+TRIO_STRING_PUBLIC int
+trio_equal_case_max
+TRIO_ARGS3((first, max, second),
+ TRIO_CONST char *first,
+ size_t max,
+ TRIO_CONST char *second)
+{
+ assert(first);
+ assert(second);
+
+ if ((first != NULL) && (second != NULL))
+ {
+ return (0 == strncmp(first, second, max));
+ }
+ return FALSE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Compare if two strings are equal.
+
+ @param first First string.
+ @param second Second string.
+ @return Boolean indicating whether the two strings are equal or not.
+
+ Collating characters are considered equal.
+*/
+TRIO_STRING_PUBLIC int
+trio_equal_locale
+TRIO_ARGS2((first, second),
+ TRIO_CONST char *first,
+ TRIO_CONST char *second)
+{
+ assert(first);
+ assert(second);
+
+#if defined(LC_COLLATE)
+ return (strcoll(first, second) == 0);
+#else
+ return trio_equal(first, second);
+#endif
+}
+
+
+/**
+ Compare if two strings up until the first @p max characters are equal.
+
+ @param first First string.
+ @param max Maximum number of characters to compare.
+ @param second Second string.
+ @return Boolean indicating whether the two strings are equal or not.
+
+ Case-insensitive comparison.
+*/
+TRIO_STRING_PUBLIC int
+trio_equal_max
+TRIO_ARGS3((first, max, second),
+ TRIO_CONST char *first,
+ size_t max,
+ TRIO_CONST char *second)
+{
+ assert(first);
+ assert(second);
+
+ if ((first != NULL) && (second != NULL))
+ {
+#if defined(USE_STRNCASECMP)
+ return (0 == strncasecmp(first, second, max));
+#else
+ /* Not adequately tested yet */
+ size_t cnt = 0;
+ while ((*first != NIL) && (*second != NIL) && (cnt <= max))
+ {
+ if (trio_to_upper(*first) != trio_to_upper(*second))
+ {
+ break;
+ }
+ first++;
+ second++;
+ cnt++;
+ }
+ return ((cnt == max) || ((*first == NIL) && (*second == NIL)));
+#endif
+ }
+ return FALSE;
+}
+
+
+/**
+ Provide a textual description of an error code (errno).
+
+ @param error_number Error number.
+ @return Textual description of @p error_number.
+*/
+TRIO_STRING_PUBLIC TRIO_CONST char *
+trio_error
+TRIO_ARGS1((error_number),
+ int error_number)
+{
+#if defined(USE_STRERROR)
+
+ return strerror(error_number);
+
+#elif defined(USE_SYS_ERRLIST)
+
+ extern char *sys_errlist[];
+ extern int sys_nerr;
+
+ return ((error_number < 0) || (error_number >= sys_nerr))
+ ? "unknown"
+ : sys_errlist[error_number];
+
+#else
+
+ return "unknown";
+
+#endif
+}
+
+
+#if !defined(TRIO_MINIMAL) && !defined(_WIN32_WCE)
+/**
+ Format the date/time according to @p format.
+
+ @param target Target string.
+ @param max Maximum number of characters to format.
+ @param format Formatting string.
+ @param datetime Date/time structure.
+ @return Number of formatted characters.
+
+ The formatting string accepts the same specifiers as the standard C
+ function strftime.
+*/
+TRIO_STRING_PUBLIC size_t
+trio_format_date_max
+TRIO_ARGS4((target, max, format, datetime),
+ char *target,
+ size_t max,
+ TRIO_CONST char *format,
+ TRIO_CONST struct tm *datetime)
+{
+ assert(target);
+ assert(format);
+ assert(datetime);
+ assert(max > 0);
+
+ return strftime(target, max, format, datetime);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Calculate a hash value for a string.
+
+ @param string String to be calculated on.
+ @param type Hash function.
+ @return Calculated hash value.
+
+ @p type can be one of the following
+ @li @c TRIO_HASH_PLAIN Plain hash function.
+*/
+TRIO_STRING_PUBLIC unsigned long
+trio_hash
+TRIO_ARGS2((string, type),
+ TRIO_CONST char *string,
+ int type)
+{
+ unsigned long value = 0L;
+ char ch;
+
+ assert(string);
+
+ switch (type)
+ {
+ case TRIO_HASH_PLAIN:
+ while ( (ch = *string++) != NIL )
+ {
+ value *= 31;
+ value += (unsigned long)ch;
+ }
+ break;
+ default:
+ assert(FALSE);
+ break;
+ }
+ return value;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Find first occurrence of a character in a string.
+
+ @param string String to be searched.
+ @param character Character to be found.
+ @param A pointer to the found character, or NULL if character was not found.
+ */
+TRIO_STRING_PUBLIC char *
+trio_index
+TRIO_ARGS2((string, character),
+ TRIO_CONST char *string,
+ int character)
+{
+ assert(string);
+
+ return strchr(string, character);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Find last occurrence of a character in a string.
+
+ @param string String to be searched.
+ @param character Character to be found.
+ @param A pointer to the found character, or NULL if character was not found.
+ */
+TRIO_STRING_PUBLIC char *
+trio_index_last
+TRIO_ARGS2((string, character),
+ TRIO_CONST char *string,
+ int character)
+{
+ assert(string);
+
+ return strchr(string, character);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Convert the alphabetic letters in the string to lower-case.
+
+ @param target String to be converted.
+ @return Number of processed characters (converted or not).
+*/
+TRIO_STRING_PUBLIC int
+trio_lower
+TRIO_ARGS1((target),
+ char *target)
+{
+ assert(target);
+
+ return trio_span_function(target, target, trio_to_lower);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Compare two strings using wildcards.
+
+ @param string String to be searched.
+ @param pattern Pattern, including wildcards, to search for.
+ @return Boolean value indicating success or failure.
+
+ Case-insensitive comparison.
+
+ The following wildcards can be used
+ @li @c * Match any number of characters.
+ @li @c ? Match a single character.
+*/
+TRIO_STRING_PUBLIC int
+trio_match
+TRIO_ARGS2((string, pattern),
+ TRIO_CONST char *string,
+ TRIO_CONST char *pattern)
+{
+ assert(string);
+ assert(pattern);
+
+ for (; ('*' != *pattern); ++pattern, ++string)
+ {
+ if (NIL == *string)
+ {
+ return (NIL == *pattern);
+ }
+ if ((trio_to_upper((int)*string) != trio_to_upper((int)*pattern))
+ && ('?' != *pattern))
+ {
+ return FALSE;
+ }
+ }
+ /* two-line patch to prevent *too* much recursiveness: */
+ while ('*' == pattern[1])
+ pattern++;
+
+ do
+ {
+ if ( trio_match(string, &pattern[1]) )
+ {
+ return TRUE;
+ }
+ }
+ while (*string++);
+
+ return FALSE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Compare two strings using wildcards.
+
+ @param string String to be searched.
+ @param pattern Pattern, including wildcards, to search for.
+ @return Boolean value indicating success or failure.
+
+ Case-sensitive comparison.
+
+ The following wildcards can be used
+ @li @c * Match any number of characters.
+ @li @c ? Match a single character.
+*/
+TRIO_STRING_PUBLIC int
+trio_match_case
+TRIO_ARGS2((string, pattern),
+ TRIO_CONST char *string,
+ TRIO_CONST char *pattern)
+{
+ assert(string);
+ assert(pattern);
+
+ for (; ('*' != *pattern); ++pattern, ++string)
+ {
+ if (NIL == *string)
+ {
+ return (NIL == *pattern);
+ }
+ if ((*string != *pattern)
+ && ('?' != *pattern))
+ {
+ return FALSE;
+ }
+ }
+ /* two-line patch to prevent *too* much recursiveness: */
+ while ('*' == pattern[1])
+ pattern++;
+
+ do
+ {
+ if ( trio_match_case(string, &pattern[1]) )
+ {
+ return TRUE;
+ }
+ }
+ while (*string++);
+
+ return FALSE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Execute a function on each character in string.
+
+ @param target Target string.
+ @param source Source string.
+ @param Function Function to be executed.
+ @return Number of processed characters.
+*/
+TRIO_STRING_PUBLIC size_t
+trio_span_function
+TRIO_ARGS3((target, source, Function),
+ char *target,
+ TRIO_CONST char *source,
+ int (*Function) TRIO_PROTO((int)))
+{
+ size_t count = 0;
+
+ assert(target);
+ assert(source);
+ assert(Function);
+
+ while (*source != NIL)
+ {
+ *target++ = Function(*source++);
+ count++;
+ }
+ return count;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Search for a substring in a string.
+
+ @param string String to be searched.
+ @param substring String to be found.
+ @return Pointer to first occurrence of @p substring in @p string, or NULL
+ if no match was found.
+*/
+TRIO_STRING_PUBLIC char *
+trio_substring
+TRIO_ARGS2((string, substring),
+ TRIO_CONST char *string,
+ TRIO_CONST char *substring)
+{
+ assert(string);
+ assert(substring);
+
+ return strstr(string, substring);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Search for a substring in the first @p max characters of a string.
+
+ @param string String to be searched.
+ @param max Maximum characters to be searched.
+ @param substring String to be found.
+ @return Pointer to first occurrence of @p substring in @p string, or NULL
+ if no match was found.
+*/
+TRIO_STRING_PUBLIC char *
+trio_substring_max
+TRIO_ARGS3((string, max, substring),
+ TRIO_CONST char *string,
+ size_t max,
+ TRIO_CONST char *substring)
+{
+ size_t count;
+ size_t size;
+ char *result = NULL;
+
+ assert(string);
+ assert(substring);
+
+ size = trio_length(substring);
+ if (size <= max)
+ {
+ for (count = 0; count <= max - size; count++)
+ {
+ if (trio_equal_max(substring, size, &string[count]))
+ {
+ result = (char *)&string[count];
+ break;
+ }
+ }
+ }
+ return result;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Tokenize string.
+
+ @param string String to be tokenized.
+ @param tokens String containing list of delimiting characters.
+ @return Start of new token.
+
+ @warning @p string will be destroyed.
+*/
+TRIO_STRING_PUBLIC char *
+trio_tokenize
+TRIO_ARGS2((string, delimiters),
+ char *string,
+ TRIO_CONST char *delimiters)
+{
+ assert(delimiters);
+
+ return strtok(string, delimiters);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Convert string to floating-point number.
+
+ @param source String to be converted.
+ @param endp Pointer to end of the converted string.
+ @return A floating-point number.
+
+ The following Extended Backus-Naur form is used
+ @verbatim
+ double ::= [ <sign> ]
+ ( <number> |
+ <number> <decimal_point> <number> |
+ <decimal_point> <number> )
+ [ <exponential> [ <sign> ] <number> ]
+ number ::= 1*( <digit> )
+ digit ::= ( '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' )
+ exponential ::= ( 'e' | 'E' )
+ sign ::= ( '-' | '+' )
+ decimal_point ::= '.'
+ @endverbatim
+*/
+/* FIXME: Add EBNF for hex-floats */
+TRIO_STRING_PUBLIC trio_long_double_t
+trio_to_long_double
+TRIO_ARGS2((source, endp),
+ TRIO_CONST char *source,
+ char **endp)
+{
+#if defined(USE_STRTOLD)
+ return strtold(source, endp);
+#else
+ int isNegative = FALSE;
+ int isExponentNegative = FALSE;
+ trio_long_double_t integer = 0.0;
+ trio_long_double_t fraction = 0.0;
+ unsigned long exponent = 0;
+ trio_long_double_t base;
+ trio_long_double_t fracdiv = 1.0;
+ trio_long_double_t value = 0.0;
+
+ /* First try hex-floats */
+ if ((source[0] == '0') && ((source[1] == 'x') || (source[1] == 'X')))
+ {
+ base = 16.0;
+ source += 2;
+ while (isxdigit((int)*source))
+ {
+ integer *= base;
+ integer += (isdigit((int)*source)
+ ? (*source - '0')
+ : 10 + (trio_to_upper((int)*source) - 'A'));
+ source++;
+ }
+ if (*source == '.')
+ {
+ source++;
+ while (isxdigit((int)*source))
+ {
+ fracdiv /= base;
+ fraction += fracdiv * (isdigit((int)*source)
+ ? (*source - '0')
+ : 10 + (trio_to_upper((int)*source) - 'A'));
+ source++;
+ }
+ if ((*source == 'p') || (*source == 'P'))
+ {
+ source++;
+ if ((*source == '+') || (*source == '-'))
+ {
+ isExponentNegative = (*source == '-');
+ source++;
+ }
+ while (isdigit((int)*source))
+ {
+ exponent *= 10;
+ exponent += (*source - '0');
+ source++;
+ }
+ }
+ }
+ /* For later use with exponent */
+ base = 2.0;
+ }
+ else /* Then try normal decimal floats */
+ {
+ base = 10.0;
+ isNegative = (*source == '-');
+ /* Skip sign */
+ if ((*source == '+') || (*source == '-'))
+ source++;
+
+ /* Integer part */
+ while (isdigit((int)*source))
+ {
+ integer *= base;
+ integer += (*source - '0');
+ source++;
+ }
+
+ if (*source == '.')
+ {
+ source++; /* skip decimal point */
+ while (isdigit((int)*source))
+ {
+ fracdiv /= base;
+ fraction += (*source - '0') * fracdiv;
+ source++;
+ }
+ }
+ if ((*source == 'e')
+ || (*source == 'E')
+#if TRIO_MICROSOFT
+ || (*source == 'd')
+ || (*source == 'D')
+#endif
+ )
+ {
+ source++; /* Skip exponential indicator */
+ isExponentNegative = (*source == '-');
+ if ((*source == '+') || (*source == '-'))
+ source++;
+ while (isdigit((int)*source))
+ {
+ exponent *= (int)base;
+ exponent += (*source - '0');
+ source++;
+ }
+ }
+ }
+
+ value = integer + fraction;
+ if (exponent != 0)
+ {
+ if (isExponentNegative)
+ value /= pow(base, (double)exponent);
+ else
+ value *= pow(base, (double)exponent);
+ }
+ if (isNegative)
+ value = -value;
+
+ if (endp)
+ *endp = (char *)source;
+ return value;
+#endif
+}
+
+
+/**
+ Convert string to floating-point number.
+
+ @param source String to be converted.
+ @param endp Pointer to end of the converted string.
+ @return A floating-point number.
+
+ See @ref trio_to_long_double.
+*/
+TRIO_STRING_PUBLIC double
+trio_to_double
+TRIO_ARGS2((source, endp),
+ TRIO_CONST char *source,
+ char **endp)
+{
+#if defined(USE_STRTOD)
+ return strtod(source, endp);
+#else
+ return (double)trio_to_long_double(source, endp);
+#endif
+}
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Convert string to floating-point number.
+
+ @param source String to be converted.
+ @param endp Pointer to end of the converted string.
+ @return A floating-point number.
+
+ See @ref trio_to_long_double.
+*/
+TRIO_STRING_PUBLIC float
+trio_to_float
+TRIO_ARGS2((source, endp),
+ TRIO_CONST char *source,
+ char **endp)
+{
+#if defined(USE_STRTOF)
+ return strtof(source, endp);
+#else
+ return (float)trio_to_long_double(source, endp);
+#endif
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Convert string to signed integer.
+
+ @param string String to be converted.
+ @param endp Pointer to end of converted string.
+ @param base Radix number of number.
+*/
+TRIO_STRING_PUBLIC long
+trio_to_long
+TRIO_ARGS3((string, endp, base),
+ TRIO_CONST char *string,
+ char **endp,
+ int base)
+{
+ assert(string);
+ assert((base >= 2) && (base <= 36));
+
+ return strtol(string, endp, base);
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Convert one alphabetic letter to lower-case.
+
+ @param source The letter to be converted.
+ @return The converted letter.
+*/
+TRIO_STRING_PUBLIC int
+trio_to_lower
+TRIO_ARGS1((source),
+ int source)
+{
+#if defined(USE_TOLOWER)
+
+ return tolower(source);
+
+#else
+
+ /* Does not handle locales or non-contiguous alphabetic characters */
+ return ((source >= (int)'A') && (source <= (int)'Z'))
+ ? source - 'A' + 'a'
+ : source;
+
+#endif
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Convert string to unsigned integer.
+
+ @param string String to be converted.
+ @param endp Pointer to end of converted string.
+ @param base Radix number of number.
+*/
+TRIO_STRING_PUBLIC unsigned long
+trio_to_unsigned_long
+TRIO_ARGS3((string, endp, base),
+ TRIO_CONST char *string,
+ char **endp,
+ int base)
+{
+ assert(string);
+ assert((base >= 2) && (base <= 36));
+
+ return strtoul(string, endp, base);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Convert one alphabetic letter to upper-case.
+
+ @param source The letter to be converted.
+ @return The converted letter.
+*/
+TRIO_STRING_PUBLIC int
+trio_to_upper
+TRIO_ARGS1((source),
+ int source)
+{
+#if defined(USE_TOUPPER)
+
+ return toupper(source);
+
+#else
+
+ /* Does not handle locales or non-contiguous alphabetic characters */
+ return ((source >= (int)'a') && (source <= (int)'z'))
+ ? source - 'a' + 'A'
+ : source;
+
+#endif
+}
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Convert the alphabetic letters in the string to upper-case.
+
+ @param target The string to be converted.
+ @return The number of processed characters (converted or not).
+*/
+TRIO_STRING_PUBLIC int
+trio_upper
+TRIO_ARGS1((target),
+ char *target)
+{
+ assert(target);
+
+ return trio_span_function(target, target, trio_to_upper);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/** @} End of StaticStrings */
+
+
+/*************************************************************************
+ * Dynamic String Functions
+ */
+
+#if defined(TRIO_DOCUMENTATION)
+# include "doc/doc_dynamic.h"
+#endif
+/** @addtogroup DynamicStrings
+ @{
+*/
+
+/*
+ * TrioStringAlloc
+ */
+TRIO_STRING_PRIVATE trio_string_t *
+TrioStringAlloc(TRIO_NOARGS)
+{
+ trio_string_t *self;
+
+ self = (trio_string_t *)TRIO_MALLOC(sizeof(trio_string_t));
+ if (self)
+ {
+ self->content = NULL;
+ self->length = 0;
+ self->allocated = 0;
+ }
+ return self;
+}
+
+
+/*
+ * TrioStringGrow
+ *
+ * The size of the string will be increased by 'delta' characters. If
+ * 'delta' is zero, the size will be doubled.
+ */
+TRIO_STRING_PRIVATE BOOLEAN_T
+TrioStringGrow
+TRIO_ARGS2((self, delta),
+ trio_string_t *self,
+ size_t delta)
+{
+ BOOLEAN_T status = FALSE;
+ char *new_content;
+ size_t new_size;
+
+ new_size = (delta == 0)
+ ? ( (self->allocated == 0) ? 1 : self->allocated * 2 )
+ : self->allocated + delta;
+
+ new_content = (char *)TRIO_REALLOC(self->content, new_size);
+ if (new_content)
+ {
+ self->content = new_content;
+ self->allocated = new_size;
+ status = TRUE;
+ }
+ return status;
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * TrioStringGrowTo
+ *
+ * The size of the string will be increased to 'length' plus one characters.
+ * If 'length' is less than the original size, the original size will be
+ * used (that is, the size of the string is never decreased).
+ */
+TRIO_STRING_PRIVATE BOOLEAN_T
+TrioStringGrowTo
+TRIO_ARGS2((self, length),
+ trio_string_t *self,
+ size_t length)
+{
+ length++; /* Room for terminating zero */
+ return (self->allocated < length)
+ ? TrioStringGrow(self, length - self->allocated)
+ : TRUE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Create a new dynamic string.
+
+ @param initial_size Initial size of the buffer.
+ @return Newly allocated dynamic string, or NULL if memory allocation failed.
+*/
+TRIO_STRING_PUBLIC trio_string_t *
+trio_string_create
+TRIO_ARGS1((initial_size),
+ int initial_size)
+{
+ trio_string_t *self;
+
+ self = TrioStringAlloc();
+ if (self)
+ {
+ if (TrioStringGrow(self,
+ (size_t)((initial_size > 0) ? initial_size : 1)))
+ {
+ self->content[0] = (char)0;
+ self->allocated = initial_size;
+ }
+ else
+ {
+ trio_string_destroy(self);
+ self = NULL;
+ }
+ }
+ return self;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Deallocate the dynamic string and its contents.
+
+ @param self Dynamic string
+*/
+TRIO_STRING_PUBLIC void
+trio_string_destroy
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ assert(self);
+
+ if (self)
+ {
+ trio_destroy(self->content);
+ TRIO_FREE(self);
+ }
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Get a pointer to the content.
+
+ @param self Dynamic string.
+ @param offset Offset into content.
+ @return Pointer to the content.
+
+ @p Offset can be zero, positive, or negative. If @p offset is zero,
+ then the start of the content will be returned. If @p offset is positive,
+ then a pointer to @p offset number of characters from the beginning of the
+ content is returned. If @p offset is negative, then a pointer to @p offset
+ number of characters from the ending of the string, starting at the
+ terminating zero, is returned.
+*/
+TRIO_STRING_PUBLIC char *
+trio_string_get
+TRIO_ARGS2((self, offset),
+ trio_string_t *self,
+ int offset)
+{
+ char *result = NULL;
+
+ assert(self);
+
+ if (self->content != NULL)
+ {
+ if (self->length == 0)
+ {
+ (void)trio_string_length(self);
+ }
+ if (offset >= 0)
+ {
+ if (offset > (int)self->length)
+ {
+ offset = self->length;
+ }
+ }
+ else
+ {
+ offset += self->length + 1;
+ if (offset < 0)
+ {
+ offset = 0;
+ }
+ }
+ result = &(self->content[offset]);
+ }
+ return result;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/**
+ Extract the content.
+
+ @param self Dynamic String
+ @return Content of dynamic string.
+
+ The content is removed from the dynamic string. This enables destruction
+ of the dynamic string without deallocation of the content.
+*/
+TRIO_STRING_PUBLIC char *
+trio_string_extract
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ char *result;
+
+ assert(self);
+
+ result = self->content;
+ /* FIXME: Allocate new empty buffer? */
+ self->content = NULL;
+ self->length = self->allocated = 0;
+ return result;
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Set the content of the dynamic string.
+
+ @param self Dynamic String
+ @param buffer The new content.
+
+ Sets the content of the dynamic string to a copy @p buffer.
+ An existing content will be deallocated first, if necessary.
+
+ @remark
+ This function will make a copy of @p buffer.
+ You are responsible for deallocating @p buffer yourself.
+*/
+TRIO_STRING_PUBLIC void
+trio_xstring_set
+TRIO_ARGS2((self, buffer),
+ trio_string_t *self,
+ char *buffer)
+{
+ assert(self);
+
+ trio_destroy(self->content);
+ self->content = trio_duplicate(buffer);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/*
+ * trio_string_size
+ */
+TRIO_STRING_PUBLIC int
+trio_string_size
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ assert(self);
+
+ return self->allocated;
+}
+
+
+/*
+ * trio_string_terminate
+ */
+TRIO_STRING_PUBLIC void
+trio_string_terminate
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ trio_xstring_append_char(self, 0);
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Append the second string to the first.
+
+ @param self Dynamic string to be modified.
+ @param other Dynamic string to copy from.
+ @return Boolean value indicating success or failure.
+*/
+TRIO_STRING_PUBLIC int
+trio_string_append
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ size_t length;
+
+ assert(self);
+ assert(other);
+
+ length = self->length + other->length;
+ if (!TrioStringGrowTo(self, length))
+ goto error;
+ trio_copy(&self->content[self->length], other->content);
+ self->length = length;
+ return TRUE;
+
+ error:
+ return FALSE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_append
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_append
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ size_t length;
+
+ assert(self);
+ assert(other);
+
+ length = self->length + trio_length(other);
+ if (!TrioStringGrowTo(self, length))
+ goto error;
+ trio_copy(&self->content[self->length], other);
+ self->length = length;
+ return TRUE;
+
+ error:
+ return FALSE;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/*
+ * trio_xstring_append_char
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_append_char
+TRIO_ARGS2((self, character),
+ trio_string_t *self,
+ char character)
+{
+ assert(self);
+
+ if ((int)self->length >= trio_string_size(self))
+ {
+ if (!TrioStringGrow(self, 0))
+ goto error;
+ }
+ self->content[self->length] = character;
+ self->length++;
+ return TRUE;
+
+ error:
+ return FALSE;
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/**
+ Search for the first occurrence of second parameter in the first.
+
+ @param self Dynamic string to be modified.
+ @param other Dynamic string to copy from.
+ @return Boolean value indicating success or failure.
+*/
+TRIO_STRING_PUBLIC int
+trio_string_contains
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_contains(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_contains
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_contains
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_contains(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_copy
+ */
+TRIO_STRING_PUBLIC int
+trio_string_copy
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ self->length = 0;
+ return trio_string_append(self, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_copy
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_copy
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ self->length = 0;
+ return trio_xstring_append(self, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_duplicate
+ */
+TRIO_STRING_PUBLIC trio_string_t *
+trio_string_duplicate
+TRIO_ARGS1((other),
+ trio_string_t *other)
+{
+ trio_string_t *self;
+
+ assert(other);
+
+ self = TrioStringAlloc();
+ if (self)
+ {
+ self->content = TrioDuplicateMax(other->content, other->length);
+ if (self->content)
+ {
+ self->length = other->length;
+ self->allocated = self->length + 1;
+ }
+ else
+ {
+ self->length = self->allocated = 0;
+ }
+ }
+ return self;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+/*
+ * trio_xstring_duplicate
+ */
+TRIO_STRING_PUBLIC trio_string_t *
+trio_xstring_duplicate
+TRIO_ARGS1((other),
+ TRIO_CONST char *other)
+{
+ trio_string_t *self;
+
+ assert(other);
+
+ self = TrioStringAlloc();
+ if (self)
+ {
+ self->content = TrioDuplicateMax(other, trio_length(other));
+ if (self->content)
+ {
+ self->length = trio_length(self->content);
+ self->allocated = self->length + 1;
+ }
+ else
+ {
+ self->length = self->allocated = 0;
+ }
+ }
+ return self;
+}
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_equal
+ */
+TRIO_STRING_PUBLIC int
+trio_string_equal
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_equal
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_equal
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_equal_max
+ */
+TRIO_STRING_PUBLIC int
+trio_string_equal_max
+TRIO_ARGS3((self, max, other),
+ trio_string_t *self,
+ size_t max,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_max(self->content, max, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_equal_max
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_equal_max
+TRIO_ARGS3((self, max, other),
+ trio_string_t *self,
+ size_t max,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_max(self->content, max, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_equal_case
+ */
+TRIO_STRING_PUBLIC int
+trio_string_equal_case
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_case(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_equal_case
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_equal_case
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_case(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_equal_case_max
+ */
+TRIO_STRING_PUBLIC int
+trio_string_equal_case_max
+TRIO_ARGS3((self, max, other),
+ trio_string_t *self,
+ size_t max,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_case_max(self->content, max, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_equal_case_max
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_equal_case_max
+TRIO_ARGS3((self, max, other),
+ trio_string_t *self,
+ size_t max,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_equal_case_max(self->content, max, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL) && !defined(_WIN32_WCE)
+/*
+ * trio_string_format_data_max
+ */
+TRIO_STRING_PUBLIC size_t
+trio_string_format_date_max
+TRIO_ARGS4((self, max, format, datetime),
+ trio_string_t *self,
+ size_t max,
+ TRIO_CONST char *format,
+ TRIO_CONST struct tm *datetime)
+{
+ assert(self);
+
+ return trio_format_date_max(self->content, max, format, datetime);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_index
+ */
+TRIO_STRING_PUBLIC char *
+trio_string_index
+TRIO_ARGS2((self, character),
+ trio_string_t *self,
+ int character)
+{
+ assert(self);
+
+ return trio_index(self->content, character);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_index_last
+ */
+TRIO_STRING_PUBLIC char *
+trio_string_index_last
+TRIO_ARGS2((self, character),
+ trio_string_t *self,
+ int character)
+{
+ assert(self);
+
+ return trio_index_last(self->content, character);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_length
+ */
+TRIO_STRING_PUBLIC int
+trio_string_length
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ assert(self);
+
+ if (self->length == 0)
+ {
+ self->length = trio_length(self->content);
+ }
+ return self->length;
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_lower
+ */
+TRIO_STRING_PUBLIC int
+trio_string_lower
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ assert(self);
+
+ return trio_lower(self->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_match
+ */
+TRIO_STRING_PUBLIC int
+trio_string_match
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_match(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_match
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_match
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_match(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_match_case
+ */
+TRIO_STRING_PUBLIC int
+trio_string_match_case
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_match_case(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_match_case
+ */
+TRIO_STRING_PUBLIC int
+trio_xstring_match_case
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_match_case(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_substring
+ */
+TRIO_STRING_PUBLIC char *
+trio_string_substring
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ trio_string_t *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_substring(self->content, other->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_xstring_substring
+ */
+TRIO_STRING_PUBLIC char *
+trio_xstring_substring
+TRIO_ARGS2((self, other),
+ trio_string_t *self,
+ TRIO_CONST char *other)
+{
+ assert(self);
+ assert(other);
+
+ return trio_substring(self->content, other);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+
+#if !defined(TRIO_MINIMAL)
+/*
+ * trio_string_upper
+ */
+TRIO_STRING_PUBLIC int
+trio_string_upper
+TRIO_ARGS1((self),
+ trio_string_t *self)
+{
+ assert(self);
+
+ return trio_upper(self->content);
+}
+#endif /* !defined(TRIO_MINIMAL) */
+
+/** @} End of DynamicStrings */
diff --git a/triostr.h b/triostr.h
new file mode 100644
index 0000000..27f4ace
--- /dev/null
+++ b/triostr.h
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * $Id$
+ *
+ * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
+ * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
+ *
+ ************************************************************************/
+
+#ifndef TRIO_TRIOSTR_H
+#define TRIO_TRIOSTR_H
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "triodef.h"
+#include "triop.h"
+
+enum {
+ TRIO_HASH_NONE = 0,
+ TRIO_HASH_PLAIN,
+ TRIO_HASH_TWOSIGNED
+};
+
+#if !defined(TRIO_STRING_PUBLIC)
+# if !defined(TRIO_PUBLIC)
+# define TRIO_PUBLIC
+# endif
+# define TRIO_STRING_PUBLIC TRIO_PUBLIC
+#endif
+
+/*************************************************************************
+ * String functions
+ */
+
+TRIO_STRING_PUBLIC int trio_copy_max TRIO_PROTO((char *target, size_t max, const char *source));
+TRIO_STRING_PUBLIC char *trio_create TRIO_PROTO((size_t size));
+TRIO_STRING_PUBLIC void trio_destroy TRIO_PROTO((char *string));
+TRIO_STRING_PUBLIC char *trio_duplicate TRIO_PROTO((const char *source));
+TRIO_STRING_PUBLIC int trio_equal TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_case TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_locale TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_max TRIO_PROTO((const char *first, size_t max, const char *second));
+TRIO_STRING_PUBLIC TRIO_CONST char *trio_error TRIO_PROTO((int));
+TRIO_STRING_PUBLIC size_t trio_length TRIO_PROTO((const char *string));
+TRIO_STRING_PUBLIC double trio_to_double TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC long trio_to_long TRIO_PROTO((const char *source, char **endp, int base));
+TRIO_STRING_PUBLIC trio_long_double_t trio_to_long_double TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC int trio_to_upper TRIO_PROTO((int source));
+
+#if !defined(TRIO_MINIMAL)
+
+TRIO_STRING_PUBLIC int trio_append TRIO_PROTO((char *target, const char *source));
+TRIO_STRING_PUBLIC int trio_append_max TRIO_PROTO((char *target, size_t max, const char *source));
+TRIO_STRING_PUBLIC int trio_contains TRIO_PROTO((const char *string, const char *substring));
+TRIO_STRING_PUBLIC int trio_copy TRIO_PROTO((char *target, const char *source));
+TRIO_STRING_PUBLIC char *trio_duplicate_max TRIO_PROTO((const char *source, size_t max));
+TRIO_STRING_PUBLIC int trio_equal_case_max TRIO_PROTO((const char *first, size_t max, const char *second));
+#if !defined(_WIN32_WCE)
+TRIO_STRING_PUBLIC size_t trio_format_date_max TRIO_PROTO((char *target, size_t max, const char *format, const struct tm *datetime));
+#endif
+TRIO_STRING_PUBLIC unsigned long trio_hash TRIO_PROTO((const char *string, int type));
+TRIO_STRING_PUBLIC char *trio_index TRIO_PROTO((const char *string, int character));
+TRIO_STRING_PUBLIC char *trio_index_last TRIO_PROTO((const char *string, int character));
+TRIO_STRING_PUBLIC int trio_lower TRIO_PROTO((char *target));
+TRIO_STRING_PUBLIC int trio_match TRIO_PROTO((const char *string, const char *pattern));
+TRIO_STRING_PUBLIC int trio_match_case TRIO_PROTO((const char *string, const char *pattern));
+TRIO_STRING_PUBLIC size_t trio_span_function TRIO_PROTO((char *target, const char *source, int (*Function) TRIO_PROTO((int))));
+TRIO_STRING_PUBLIC char *trio_substring TRIO_PROTO((const char *string, const char *substring));
+TRIO_STRING_PUBLIC char *trio_substring_max TRIO_PROTO((const char *string, size_t max, const char *substring));
+TRIO_STRING_PUBLIC float trio_to_float TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC int trio_to_lower TRIO_PROTO((int source));
+TRIO_STRING_PUBLIC unsigned long trio_to_unsigned_long TRIO_PROTO((const char *source, char **endp, int base));
+TRIO_STRING_PUBLIC char *trio_tokenize TRIO_PROTO((char *string, const char *delimiters));
+TRIO_STRING_PUBLIC int trio_upper TRIO_PROTO((char *target));
+
+#endif /* !defined(TRIO_MINIMAL) */
+
+/*************************************************************************
+ * Dynamic string functions
+ */
+
+/*
+ * Opaque type for dynamic strings
+ */
+
+typedef struct _trio_string_t trio_string_t;
+
+TRIO_STRING_PUBLIC void trio_string_destroy TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC char *trio_string_extract TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_size TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC void trio_string_terminate TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_xstring_append_char TRIO_PROTO((trio_string_t *self, char character));
+TRIO_STRING_PUBLIC trio_string_t *trio_xstring_duplicate TRIO_PROTO((const char *other));
+
+#if !defined(TRIO_MINIMAL)
+
+TRIO_STRING_PUBLIC trio_string_t *trio_string_create TRIO_PROTO((int initial_size));
+TRIO_STRING_PUBLIC char *trio_string_get TRIO_PROTO((trio_string_t *self, int offset));
+TRIO_STRING_PUBLIC void trio_xstring_set TRIO_PROTO((trio_string_t *self, char *buffer));
+
+TRIO_STRING_PUBLIC int trio_string_append TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_contains TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_copy TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC trio_string_t *trio_string_duplicate TRIO_PROTO((trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal_max TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *second));
+TRIO_STRING_PUBLIC int trio_string_equal_case TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal_case_max TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *other));
+#if !defined(_WIN32_WCE)
+TRIO_STRING_PUBLIC size_t trio_string_format_date_max TRIO_PROTO((trio_string_t *self, size_t max, const char *format, const struct tm *datetime));
+#endif
+TRIO_STRING_PUBLIC char *trio_string_index TRIO_PROTO((trio_string_t *self, int character));
+TRIO_STRING_PUBLIC char *trio_string_index_last TRIO_PROTO((trio_string_t *self, int character));
+TRIO_STRING_PUBLIC int trio_string_length TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_lower TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_match TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_match_case TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC char *trio_string_substring TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_upper TRIO_PROTO((trio_string_t *self));
+
+TRIO_STRING_PUBLIC int trio_xstring_append TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_contains TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_copy TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_max TRIO_PROTO((trio_string_t *self, size_t max, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_case TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_case_max TRIO_PROTO((trio_string_t *self, size_t max, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_match TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_match_case TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC char *trio_xstring_substring TRIO_PROTO((trio_string_t *self, const char *other));
+
+#endif /* !defined(TRIO_MINIMAL) */
+
+#endif /* TRIO_TRIOSTR_H */
diff --git a/uri.c b/uri.c
new file mode 100644
index 0000000..ff47abb
--- /dev/null
+++ b/uri.c
@@ -0,0 +1,2566 @@
+/**
+ * uri.c: set of generic URI related routines
+ *
+ * Reference: RFCs 3986, 2732 and 2373
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/uri.h>
+#include <libxml/globals.h>
+#include <libxml/xmlerror.h>
+
+/**
+ * MAX_URI_LENGTH:
+ *
+ * The definition of the URI regexp in the above RFC has no size limit
+ * In practice they are usually relativey short except for the
+ * data URI scheme as defined in RFC 2397. Even for data URI the usual
+ * maximum size before hitting random practical limits is around 64 KB
+ * and 4KB is usually a maximum admitted limit for proper operations.
+ * The value below is more a security limit than anything else and
+ * really should never be hit by 'normal' operations
+ * Set to 1 MByte in 2012, this is only enforced on output
+ */
+#define MAX_URI_LENGTH 1024 * 1024
+
+static void
+xmlURIErrMemory(const char *extra)
+{
+ if (extra)
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_URI,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_URI,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ "Memory allocation failed\n");
+}
+
+static void xmlCleanURI(xmlURIPtr uri);
+
+/*
+ * Old rule from 2396 used in legacy handling code
+ * alpha = lowalpha | upalpha
+ */
+#define IS_ALPHA(x) (IS_LOWALPHA(x) || IS_UPALPHA(x))
+
+
+/*
+ * lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" |
+ * "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" |
+ * "u" | "v" | "w" | "x" | "y" | "z"
+ */
+
+#define IS_LOWALPHA(x) (((x) >= 'a') && ((x) <= 'z'))
+
+/*
+ * upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" |
+ * "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" |
+ * "U" | "V" | "W" | "X" | "Y" | "Z"
+ */
+#define IS_UPALPHA(x) (((x) >= 'A') && ((x) <= 'Z'))
+
+#ifdef IS_DIGIT
+#undef IS_DIGIT
+#endif
+/*
+ * digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
+ */
+#define IS_DIGIT(x) (((x) >= '0') && ((x) <= '9'))
+
+/*
+ * alphanum = alpha | digit
+ */
+
+#define IS_ALPHANUM(x) (IS_ALPHA(x) || IS_DIGIT(x))
+
+/*
+ * mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
+ */
+
+#define IS_MARK(x) (((x) == '-') || ((x) == '_') || ((x) == '.') || \
+ ((x) == '!') || ((x) == '~') || ((x) == '*') || ((x) == '\'') || \
+ ((x) == '(') || ((x) == ')'))
+
+/*
+ * unwise = "{" | "}" | "|" | "\" | "^" | "`"
+ */
+
+#define IS_UNWISE(p) \
+ (((*(p) == '{')) || ((*(p) == '}')) || ((*(p) == '|')) || \
+ ((*(p) == '\\')) || ((*(p) == '^')) || ((*(p) == '[')) || \
+ ((*(p) == ']')) || ((*(p) == '`')))
+/*
+ * reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," |
+ * "[" | "]"
+ */
+
+#define IS_RESERVED(x) (((x) == ';') || ((x) == '/') || ((x) == '?') || \
+ ((x) == ':') || ((x) == '@') || ((x) == '&') || ((x) == '=') || \
+ ((x) == '+') || ((x) == '$') || ((x) == ',') || ((x) == '[') || \
+ ((x) == ']'))
+
+/*
+ * unreserved = alphanum | mark
+ */
+
+#define IS_UNRESERVED(x) (IS_ALPHANUM(x) || IS_MARK(x))
+
+/*
+ * Skip to next pointer char, handle escaped sequences
+ */
+
+#define NEXT(p) ((*p == '%')? p += 3 : p++)
+
+/*
+ * Productions from the spec.
+ *
+ * authority = server | reg_name
+ * reg_name = 1*( unreserved | escaped | "$" | "," |
+ * ";" | ":" | "@" | "&" | "=" | "+" )
+ *
+ * path = [ abs_path | opaque_part ]
+ */
+
+#define STRNDUP(s, n) (char *) xmlStrndup((const xmlChar *)(s), (n))
+
+/************************************************************************
+ * *
+ * RFC 3986 parser *
+ * *
+ ************************************************************************/
+
+#define ISA_DIGIT(p) ((*(p) >= '0') && (*(p) <= '9'))
+#define ISA_ALPHA(p) (((*(p) >= 'a') && (*(p) <= 'z')) || \
+ ((*(p) >= 'A') && (*(p) <= 'Z')))
+#define ISA_HEXDIG(p) \
+ (ISA_DIGIT(p) || ((*(p) >= 'a') && (*(p) <= 'f')) || \
+ ((*(p) >= 'A') && (*(p) <= 'F')))
+
+/*
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+#define ISA_SUB_DELIM(p) \
+ (((*(p) == '!')) || ((*(p) == '$')) || ((*(p) == '&')) || \
+ ((*(p) == '(')) || ((*(p) == ')')) || ((*(p) == '*')) || \
+ ((*(p) == '+')) || ((*(p) == ',')) || ((*(p) == ';')) || \
+ ((*(p) == '=')) || ((*(p) == '\'')))
+
+/*
+ * gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
+ */
+#define ISA_GEN_DELIM(p) \
+ (((*(p) == ':')) || ((*(p) == '/')) || ((*(p) == '?')) || \
+ ((*(p) == '#')) || ((*(p) == '[')) || ((*(p) == ']')) || \
+ ((*(p) == '@')))
+
+/*
+ * reserved = gen-delims / sub-delims
+ */
+#define ISA_RESERVED(p) (ISA_GEN_DELIM(p) || (ISA_SUB_DELIM(p)))
+
+/*
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ */
+#define ISA_UNRESERVED(p) \
+ ((ISA_ALPHA(p)) || (ISA_DIGIT(p)) || ((*(p) == '-')) || \
+ ((*(p) == '.')) || ((*(p) == '_')) || ((*(p) == '~')))
+
+/*
+ * pct-encoded = "%" HEXDIG HEXDIG
+ */
+#define ISA_PCT_ENCODED(p) \
+ ((*(p) == '%') && (ISA_HEXDIG(p + 1)) && (ISA_HEXDIG(p + 2)))
+
+/*
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ */
+#define ISA_PCHAR(p) \
+ (ISA_UNRESERVED(p) || ISA_PCT_ENCODED(p) || ISA_SUB_DELIM(p) || \
+ ((*(p) == ':')) || ((*(p) == '@')))
+
+/**
+ * xmlParse3986Scheme:
+ * @uri: pointer to an URI structure
+ * @str: pointer to the string to analyze
+ *
+ * Parse an URI scheme
+ *
+ * ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Scheme(xmlURIPtr uri, const char **str) {
+ const char *cur;
+
+ if (str == NULL)
+ return(-1);
+
+ cur = *str;
+ if (!ISA_ALPHA(cur))
+ return(2);
+ cur++;
+ while (ISA_ALPHA(cur) || ISA_DIGIT(cur) ||
+ (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++;
+ if (uri != NULL) {
+ if (uri->scheme != NULL) xmlFree(uri->scheme);
+ uri->scheme = STRNDUP(*str, cur - *str);
+ }
+ *str = cur;
+ return(0);
+}
+
+/**
+ * xmlParse3986Fragment:
+ * @uri: pointer to an URI structure
+ * @str: pointer to the string to analyze
+ *
+ * Parse the query part of an URI
+ *
+ * fragment = *( pchar / "/" / "?" )
+ * NOTE: the strict syntax as defined by 3986 does not allow '[' and ']'
+ * in the fragment identifier but this is used very broadly for
+ * xpointer scheme selection, so we are allowing it here to not break
+ * for example all the DocBook processing chains.
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Fragment(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+
+ if (str == NULL)
+ return (-1);
+
+ cur = *str;
+
+ while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
+ (*cur == '[') || (*cur == ']') ||
+ ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
+ NEXT(cur);
+ if (uri != NULL) {
+ if (uri->fragment != NULL)
+ xmlFree(uri->fragment);
+ if (uri->cleanup & 2)
+ uri->fragment = STRNDUP(*str, cur - *str);
+ else
+ uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986Query:
+ * @uri: pointer to an URI structure
+ * @str: pointer to the string to analyze
+ *
+ * Parse the query part of an URI
+ *
+ * query = *uric
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Query(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+
+ if (str == NULL)
+ return (-1);
+
+ cur = *str;
+
+ while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
+ ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
+ NEXT(cur);
+ if (uri != NULL) {
+ if (uri->query != NULL)
+ xmlFree(uri->query);
+ if (uri->cleanup & 2)
+ uri->query = STRNDUP(*str, cur - *str);
+ else
+ uri->query = xmlURIUnescapeString(*str, cur - *str, NULL);
+
+ /* Save the raw bytes of the query as well.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00114
+ */
+ if (uri->query_raw != NULL)
+ xmlFree (uri->query_raw);
+ uri->query_raw = STRNDUP (*str, cur - *str);
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986Port:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse a port part and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * port = *DIGIT
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Port(xmlURIPtr uri, const char **str)
+{
+ const char *cur = *str;
+
+ if (ISA_DIGIT(cur)) {
+ if (uri != NULL)
+ uri->port = 0;
+ while (ISA_DIGIT(cur)) {
+ if (uri != NULL)
+ uri->port = uri->port * 10 + (*cur - '0');
+ cur++;
+ }
+ *str = cur;
+ return(0);
+ }
+ return(1);
+}
+
+/**
+ * xmlParse3986Userinfo:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an user informations part and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Userinfo(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+
+ cur = *str;
+ while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) ||
+ ISA_SUB_DELIM(cur) || (*cur == ':'))
+ NEXT(cur);
+ if (*cur == '@') {
+ if (uri != NULL) {
+ if (uri->user != NULL) xmlFree(uri->user);
+ if (uri->cleanup & 2)
+ uri->user = STRNDUP(*str, cur - *str);
+ else
+ uri->user = xmlURIUnescapeString(*str, cur - *str, NULL);
+ }
+ *str = cur;
+ return(0);
+ }
+ return(1);
+}
+
+/**
+ * xmlParse3986DecOctet:
+ * @str: the string to analyze
+ *
+ * dec-octet = DIGIT ; 0-9
+ * / %x31-39 DIGIT ; 10-99
+ * / "1" 2DIGIT ; 100-199
+ * / "2" %x30-34 DIGIT ; 200-249
+ * / "25" %x30-35 ; 250-255
+ *
+ * Skip a dec-octet.
+ *
+ * Returns 0 if found and skipped, 1 otherwise
+ */
+static int
+xmlParse3986DecOctet(const char **str) {
+ const char *cur = *str;
+
+ if (!(ISA_DIGIT(cur)))
+ return(1);
+ if (!ISA_DIGIT(cur+1))
+ cur++;
+ else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur+2)))
+ cur += 2;
+ else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2)))
+ cur += 3;
+ else if ((*cur == '2') && (*(cur + 1) >= '0') &&
+ (*(cur + 1) <= '4') && (ISA_DIGIT(cur + 2)))
+ cur += 3;
+ else if ((*cur == '2') && (*(cur + 1) == '5') &&
+ (*(cur + 2) >= '0') && (*(cur + 1) <= '5'))
+ cur += 3;
+ else
+ return(1);
+ *str = cur;
+ return(0);
+}
+/**
+ * xmlParse3986Host:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an host part and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * host = IP-literal / IPv4address / reg-name
+ * IP-literal = "[" ( IPv6address / IPvFuture ) "]"
+ * IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
+ * reg-name = *( unreserved / pct-encoded / sub-delims )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Host(xmlURIPtr uri, const char **str)
+{
+ const char *cur = *str;
+ const char *host;
+
+ host = cur;
+ /*
+ * IPv6 and future adressing scheme are enclosed between brackets
+ */
+ if (*cur == '[') {
+ cur++;
+ while ((*cur != ']') && (*cur != 0))
+ cur++;
+ if (*cur != ']')
+ return(1);
+ cur++;
+ goto found;
+ }
+ /*
+ * try to parse an IPv4
+ */
+ if (ISA_DIGIT(cur)) {
+ if (xmlParse3986DecOctet(&cur) != 0)
+ goto not_ipv4;
+ if (*cur != '.')
+ goto not_ipv4;
+ cur++;
+ if (xmlParse3986DecOctet(&cur) != 0)
+ goto not_ipv4;
+ if (*cur != '.')
+ goto not_ipv4;
+ if (xmlParse3986DecOctet(&cur) != 0)
+ goto not_ipv4;
+ if (*cur != '.')
+ goto not_ipv4;
+ if (xmlParse3986DecOctet(&cur) != 0)
+ goto not_ipv4;
+ goto found;
+not_ipv4:
+ cur = *str;
+ }
+ /*
+ * then this should be a hostname which can be empty
+ */
+ while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur))
+ NEXT(cur);
+found:
+ if (uri != NULL) {
+ if (uri->authority != NULL) xmlFree(uri->authority);
+ uri->authority = NULL;
+ if (uri->server != NULL) xmlFree(uri->server);
+ if (cur != host) {
+ if (uri->cleanup & 2)
+ uri->server = STRNDUP(host, cur - host);
+ else
+ uri->server = xmlURIUnescapeString(host, cur - host, NULL);
+ } else
+ uri->server = NULL;
+ }
+ *str = cur;
+ return(0);
+}
+
+/**
+ * xmlParse3986Authority:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an authority part and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * authority = [ userinfo "@" ] host [ ":" port ]
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Authority(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+ /*
+ * try to parse an userinfo and check for the trailing @
+ */
+ ret = xmlParse3986Userinfo(uri, &cur);
+ if ((ret != 0) || (*cur != '@'))
+ cur = *str;
+ else
+ cur++;
+ ret = xmlParse3986Host(uri, &cur);
+ if (ret != 0) return(ret);
+ if (*cur == ':') {
+ cur++;
+ ret = xmlParse3986Port(uri, &cur);
+ if (ret != 0) return(ret);
+ }
+ *str = cur;
+ return(0);
+}
+
+/**
+ * xmlParse3986Segment:
+ * @str: the string to analyze
+ * @forbid: an optional forbidden character
+ * @empty: allow an empty segment
+ *
+ * Parse a segment and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * segment = *pchar
+ * segment-nz = 1*pchar
+ * segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
+ * ; non-zero-length segment without any colon ":"
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986Segment(const char **str, char forbid, int empty)
+{
+ const char *cur;
+
+ cur = *str;
+ if (!ISA_PCHAR(cur)) {
+ if (empty)
+ return(0);
+ return(1);
+ }
+ while (ISA_PCHAR(cur) && (*cur != forbid))
+ NEXT(cur);
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986PathAbEmpty:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an path absolute or empty and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * path-abempty = *( "/" segment )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986PathAbEmpty(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+
+ while (*cur == '/') {
+ cur++;
+ ret = xmlParse3986Segment(&cur, 0, 1);
+ if (ret != 0) return(ret);
+ }
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ if (*str != cur) {
+ if (uri->cleanup & 2)
+ uri->path = STRNDUP(*str, cur - *str);
+ else
+ uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
+ } else {
+ uri->path = NULL;
+ }
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986PathAbsolute:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an path absolute and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * path-absolute = "/" [ segment-nz *( "/" segment ) ]
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986PathAbsolute(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+
+ if (*cur != '/')
+ return(1);
+ cur++;
+ ret = xmlParse3986Segment(&cur, 0, 0);
+ if (ret == 0) {
+ while (*cur == '/') {
+ cur++;
+ ret = xmlParse3986Segment(&cur, 0, 1);
+ if (ret != 0) return(ret);
+ }
+ }
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ if (cur != *str) {
+ if (uri->cleanup & 2)
+ uri->path = STRNDUP(*str, cur - *str);
+ else
+ uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
+ } else {
+ uri->path = NULL;
+ }
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986PathRootless:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an path without root and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * path-rootless = segment-nz *( "/" segment )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986PathRootless(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+
+ ret = xmlParse3986Segment(&cur, 0, 0);
+ if (ret != 0) return(ret);
+ while (*cur == '/') {
+ cur++;
+ ret = xmlParse3986Segment(&cur, 0, 1);
+ if (ret != 0) return(ret);
+ }
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ if (cur != *str) {
+ if (uri->cleanup & 2)
+ uri->path = STRNDUP(*str, cur - *str);
+ else
+ uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
+ } else {
+ uri->path = NULL;
+ }
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986PathNoScheme:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an path which is not a scheme and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * path-noscheme = segment-nz-nc *( "/" segment )
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986PathNoScheme(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+
+ ret = xmlParse3986Segment(&cur, ':', 0);
+ if (ret != 0) return(ret);
+ while (*cur == '/') {
+ cur++;
+ ret = xmlParse3986Segment(&cur, 0, 1);
+ if (ret != 0) return(ret);
+ }
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ if (cur != *str) {
+ if (uri->cleanup & 2)
+ uri->path = STRNDUP(*str, cur - *str);
+ else
+ uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
+ } else {
+ uri->path = NULL;
+ }
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986HierPart:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an hierarchical part and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * hier-part = "//" authority path-abempty
+ * / path-absolute
+ * / path-rootless
+ * / path-empty
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986HierPart(xmlURIPtr uri, const char **str)
+{
+ const char *cur;
+ int ret;
+
+ cur = *str;
+
+ if ((*cur == '/') && (*(cur + 1) == '/')) {
+ cur += 2;
+ ret = xmlParse3986Authority(uri, &cur);
+ if (ret != 0) return(ret);
+ if (uri->server == NULL)
+ uri->port = -1;
+ ret = xmlParse3986PathAbEmpty(uri, &cur);
+ if (ret != 0) return(ret);
+ *str = cur;
+ return(0);
+ } else if (*cur == '/') {
+ ret = xmlParse3986PathAbsolute(uri, &cur);
+ if (ret != 0) return(ret);
+ } else if (ISA_PCHAR(cur)) {
+ ret = xmlParse3986PathRootless(uri, &cur);
+ if (ret != 0) return(ret);
+ } else {
+ /* path-empty is effectively empty */
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ uri->path = NULL;
+ }
+ }
+ *str = cur;
+ return (0);
+}
+
+/**
+ * xmlParse3986RelativeRef:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an URI string and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * relative-ref = relative-part [ "?" query ] [ "#" fragment ]
+ * relative-part = "//" authority path-abempty
+ * / path-absolute
+ * / path-noscheme
+ * / path-empty
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986RelativeRef(xmlURIPtr uri, const char *str) {
+ int ret;
+
+ if ((*str == '/') && (*(str + 1) == '/')) {
+ str += 2;
+ ret = xmlParse3986Authority(uri, &str);
+ if (ret != 0) return(ret);
+ ret = xmlParse3986PathAbEmpty(uri, &str);
+ if (ret != 0) return(ret);
+ } else if (*str == '/') {
+ ret = xmlParse3986PathAbsolute(uri, &str);
+ if (ret != 0) return(ret);
+ } else if (ISA_PCHAR(str)) {
+ ret = xmlParse3986PathNoScheme(uri, &str);
+ if (ret != 0) return(ret);
+ } else {
+ /* path-empty is effectively empty */
+ if (uri != NULL) {
+ if (uri->path != NULL) xmlFree(uri->path);
+ uri->path = NULL;
+ }
+ }
+
+ if (*str == '?') {
+ str++;
+ ret = xmlParse3986Query(uri, &str);
+ if (ret != 0) return(ret);
+ }
+ if (*str == '#') {
+ str++;
+ ret = xmlParse3986Fragment(uri, &str);
+ if (ret != 0) return(ret);
+ }
+ if (*str != 0) {
+ xmlCleanURI(uri);
+ return(1);
+ }
+ return(0);
+}
+
+
+/**
+ * xmlParse3986URI:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an URI string and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986URI(xmlURIPtr uri, const char *str) {
+ int ret;
+
+ ret = xmlParse3986Scheme(uri, &str);
+ if (ret != 0) return(ret);
+ if (*str != ':') {
+ return(1);
+ }
+ str++;
+ ret = xmlParse3986HierPart(uri, &str);
+ if (ret != 0) return(ret);
+ if (*str == '?') {
+ str++;
+ ret = xmlParse3986Query(uri, &str);
+ if (ret != 0) return(ret);
+ }
+ if (*str == '#') {
+ str++;
+ ret = xmlParse3986Fragment(uri, &str);
+ if (ret != 0) return(ret);
+ }
+ if (*str != 0) {
+ xmlCleanURI(uri);
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlParse3986URIReference:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an URI reference string and fills in the appropriate fields
+ * of the @uri structure
+ *
+ * URI-reference = URI / relative-ref
+ *
+ * Returns 0 or the error code
+ */
+static int
+xmlParse3986URIReference(xmlURIPtr uri, const char *str) {
+ int ret;
+
+ if (str == NULL)
+ return(-1);
+ xmlCleanURI(uri);
+
+ /*
+ * Try first to parse absolute refs, then fallback to relative if
+ * it fails.
+ */
+ ret = xmlParse3986URI(uri, str);
+ if (ret != 0) {
+ xmlCleanURI(uri);
+ ret = xmlParse3986RelativeRef(uri, str);
+ if (ret != 0) {
+ xmlCleanURI(uri);
+ return(ret);
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlParseURI:
+ * @str: the URI string to analyze
+ *
+ * Parse an URI based on RFC 3986
+ *
+ * URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
+ *
+ * Returns a newly built xmlURIPtr or NULL in case of error
+ */
+xmlURIPtr
+xmlParseURI(const char *str) {
+ xmlURIPtr uri;
+ int ret;
+
+ if (str == NULL)
+ return(NULL);
+ uri = xmlCreateURI();
+ if (uri != NULL) {
+ ret = xmlParse3986URIReference(uri, str);
+ if (ret) {
+ xmlFreeURI(uri);
+ return(NULL);
+ }
+ }
+ return(uri);
+}
+
+/**
+ * xmlParseURIReference:
+ * @uri: pointer to an URI structure
+ * @str: the string to analyze
+ *
+ * Parse an URI reference string based on RFC 3986 and fills in the
+ * appropriate fields of the @uri structure
+ *
+ * URI-reference = URI / relative-ref
+ *
+ * Returns 0 or the error code
+ */
+int
+xmlParseURIReference(xmlURIPtr uri, const char *str) {
+ return(xmlParse3986URIReference(uri, str));
+}
+
+/**
+ * xmlParseURIRaw:
+ * @str: the URI string to analyze
+ * @raw: if 1 unescaping of URI pieces are disabled
+ *
+ * Parse an URI but allows to keep intact the original fragments.
+ *
+ * URI-reference = URI / relative-ref
+ *
+ * Returns a newly built xmlURIPtr or NULL in case of error
+ */
+xmlURIPtr
+xmlParseURIRaw(const char *str, int raw) {
+ xmlURIPtr uri;
+ int ret;
+
+ if (str == NULL)
+ return(NULL);
+ uri = xmlCreateURI();
+ if (uri != NULL) {
+ if (raw) {
+ uri->cleanup |= 2;
+ }
+ ret = xmlParseURIReference(uri, str);
+ if (ret) {
+ xmlFreeURI(uri);
+ return(NULL);
+ }
+ }
+ return(uri);
+}
+
+/************************************************************************
+ * *
+ * Generic URI structure functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlCreateURI:
+ *
+ * Simply creates an empty xmlURI
+ *
+ * Returns the new structure or NULL in case of error
+ */
+xmlURIPtr
+xmlCreateURI(void) {
+ xmlURIPtr ret;
+
+ ret = (xmlURIPtr) xmlMalloc(sizeof(xmlURI));
+ if (ret == NULL) {
+ xmlURIErrMemory("creating URI structure\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlURI));
+ return(ret);
+}
+
+/**
+ * xmlSaveUriRealloc:
+ *
+ * Function to handle properly a reallocation when saving an URI
+ * Also imposes some limit on the length of an URI string output
+ */
+static xmlChar *
+xmlSaveUriRealloc(xmlChar *ret, int *max) {
+ xmlChar *temp;
+ int tmp;
+
+ if (*max > MAX_URI_LENGTH) {
+ xmlURIErrMemory("reaching arbitrary MAX_URI_LENGTH limit\n");
+ return(NULL);
+ }
+ tmp = *max * 2;
+ temp = (xmlChar *) xmlRealloc(ret, (tmp + 1));
+ if (temp == NULL) {
+ xmlURIErrMemory("saving URI\n");
+ return(NULL);
+ }
+ *max = tmp;
+ return(temp);
+}
+
+/**
+ * xmlSaveUri:
+ * @uri: pointer to an xmlURI
+ *
+ * Save the URI as an escaped string
+ *
+ * Returns a new string (to be deallocated by caller)
+ */
+xmlChar *
+xmlSaveUri(xmlURIPtr uri) {
+ xmlChar *ret = NULL;
+ xmlChar *temp;
+ const char *p;
+ int len;
+ int max;
+
+ if (uri == NULL) return(NULL);
+
+
+ max = 80;
+ ret = (xmlChar *) xmlMallocAtomic((max + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlURIErrMemory("saving URI\n");
+ return(NULL);
+ }
+ len = 0;
+
+ if (uri->scheme != NULL) {
+ p = uri->scheme;
+ while (*p != 0) {
+ if (len >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = *p++;
+ }
+ if (len >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = ':';
+ }
+ if (uri->opaque != NULL) {
+ p = uri->opaque;
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if (IS_RESERVED(*(p)) || IS_UNRESERVED(*(p)))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ } else {
+ if ((uri->server != NULL) || (uri->port == -1)) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '/';
+ ret[len++] = '/';
+ if (uri->user != NULL) {
+ p = uri->user;
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if ((IS_UNRESERVED(*(p))) ||
+ ((*(p) == ';')) || ((*(p) == ':')) ||
+ ((*(p) == '&')) || ((*(p) == '=')) ||
+ ((*(p) == '+')) || ((*(p) == '$')) ||
+ ((*(p) == ',')))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '@';
+ }
+ if (uri->server != NULL) {
+ p = uri->server;
+ while (*p != 0) {
+ if (len >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = *p++;
+ }
+ if (uri->port > 0) {
+ if (len + 10 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ len += snprintf((char *) &ret[len], max - len, ":%d", uri->port);
+ }
+ }
+ } else if (uri->authority != NULL) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '/';
+ ret[len++] = '/';
+ p = uri->authority;
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if ((IS_UNRESERVED(*(p))) ||
+ ((*(p) == '$')) || ((*(p) == ',')) || ((*(p) == ';')) ||
+ ((*(p) == ':')) || ((*(p) == '@')) || ((*(p) == '&')) ||
+ ((*(p) == '=')) || ((*(p) == '+')))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ } else if (uri->scheme != NULL) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ }
+ if (uri->path != NULL) {
+ p = uri->path;
+ /*
+ * the colon in file:///d: should not be escaped or
+ * Windows accesses fail later.
+ */
+ if ((uri->scheme != NULL) &&
+ (p[0] == '/') &&
+ (((p[1] >= 'a') && (p[1] <= 'z')) ||
+ ((p[1] >= 'A') && (p[1] <= 'Z'))) &&
+ (p[2] == ':') &&
+ (xmlStrEqual(BAD_CAST uri->scheme, BAD_CAST "file"))) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = *p++;
+ ret[len++] = *p++;
+ ret[len++] = *p++;
+ }
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if ((IS_UNRESERVED(*(p))) || ((*(p) == '/')) ||
+ ((*(p) == ';')) || ((*(p) == '@')) || ((*(p) == '&')) ||
+ ((*(p) == '=')) || ((*(p) == '+')) || ((*(p) == '$')) ||
+ ((*(p) == ',')))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ }
+ if (uri->query_raw != NULL) {
+ if (len + 1 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '?';
+ p = uri->query_raw;
+ while (*p != 0) {
+ if (len + 1 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = *p++;
+ }
+ } else if (uri->query != NULL) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '?';
+ p = uri->query;
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p))))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ }
+ }
+ if (uri->fragment != NULL) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len++] = '#';
+ p = uri->fragment;
+ while (*p != 0) {
+ if (len + 3 >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ if ((IS_UNRESERVED(*(p))) || (IS_RESERVED(*(p))))
+ ret[len++] = *p++;
+ else {
+ int val = *(unsigned char *)p++;
+ int hi = val / 0x10, lo = val % 0x10;
+ ret[len++] = '%';
+ ret[len++] = hi + (hi > 9? 'A'-10 : '0');
+ ret[len++] = lo + (lo > 9? 'A'-10 : '0');
+ }
+ }
+ }
+ if (len >= max) {
+ temp = xmlSaveUriRealloc(ret, &max);
+ if (temp == NULL) goto mem_error;
+ ret = temp;
+ }
+ ret[len] = 0;
+ return(ret);
+
+mem_error:
+ xmlFree(ret);
+ return(NULL);
+}
+
+/**
+ * xmlPrintURI:
+ * @stream: a FILE* for the output
+ * @uri: pointer to an xmlURI
+ *
+ * Prints the URI in the stream @stream.
+ */
+void
+xmlPrintURI(FILE *stream, xmlURIPtr uri) {
+ xmlChar *out;
+
+ out = xmlSaveUri(uri);
+ if (out != NULL) {
+ fprintf(stream, "%s", (char *) out);
+ xmlFree(out);
+ }
+}
+
+/**
+ * xmlCleanURI:
+ * @uri: pointer to an xmlURI
+ *
+ * Make sure the xmlURI struct is free of content
+ */
+static void
+xmlCleanURI(xmlURIPtr uri) {
+ if (uri == NULL) return;
+
+ if (uri->scheme != NULL) xmlFree(uri->scheme);
+ uri->scheme = NULL;
+ if (uri->server != NULL) xmlFree(uri->server);
+ uri->server = NULL;
+ if (uri->user != NULL) xmlFree(uri->user);
+ uri->user = NULL;
+ if (uri->path != NULL) xmlFree(uri->path);
+ uri->path = NULL;
+ if (uri->fragment != NULL) xmlFree(uri->fragment);
+ uri->fragment = NULL;
+ if (uri->opaque != NULL) xmlFree(uri->opaque);
+ uri->opaque = NULL;
+ if (uri->authority != NULL) xmlFree(uri->authority);
+ uri->authority = NULL;
+ if (uri->query != NULL) xmlFree(uri->query);
+ uri->query = NULL;
+ if (uri->query_raw != NULL) xmlFree(uri->query_raw);
+ uri->query_raw = NULL;
+}
+
+/**
+ * xmlFreeURI:
+ * @uri: pointer to an xmlURI
+ *
+ * Free up the xmlURI struct
+ */
+void
+xmlFreeURI(xmlURIPtr uri) {
+ if (uri == NULL) return;
+
+ if (uri->scheme != NULL) xmlFree(uri->scheme);
+ if (uri->server != NULL) xmlFree(uri->server);
+ if (uri->user != NULL) xmlFree(uri->user);
+ if (uri->path != NULL) xmlFree(uri->path);
+ if (uri->fragment != NULL) xmlFree(uri->fragment);
+ if (uri->opaque != NULL) xmlFree(uri->opaque);
+ if (uri->authority != NULL) xmlFree(uri->authority);
+ if (uri->query != NULL) xmlFree(uri->query);
+ if (uri->query_raw != NULL) xmlFree(uri->query_raw);
+ xmlFree(uri);
+}
+
+/************************************************************************
+ * *
+ * Helper functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNormalizeURIPath:
+ * @path: pointer to the path string
+ *
+ * Applies the 5 normalization steps to a path string--that is, RFC 2396
+ * Section 5.2, steps 6.c through 6.g.
+ *
+ * Normalization occurs directly on the string, no new allocation is done
+ *
+ * Returns 0 or an error code
+ */
+int
+xmlNormalizeURIPath(char *path) {
+ char *cur, *out;
+
+ if (path == NULL)
+ return(-1);
+
+ /* Skip all initial "/" chars. We want to get to the beginning of the
+ * first non-empty segment.
+ */
+ cur = path;
+ while (cur[0] == '/')
+ ++cur;
+ if (cur[0] == '\0')
+ return(0);
+
+ /* Keep everything we've seen so far. */
+ out = cur;
+
+ /*
+ * Analyze each segment in sequence for cases (c) and (d).
+ */
+ while (cur[0] != '\0') {
+ /*
+ * c) All occurrences of "./", where "." is a complete path segment,
+ * are removed from the buffer string.
+ */
+ if ((cur[0] == '.') && (cur[1] == '/')) {
+ cur += 2;
+ /* '//' normalization should be done at this point too */
+ while (cur[0] == '/')
+ cur++;
+ continue;
+ }
+
+ /*
+ * d) If the buffer string ends with "." as a complete path segment,
+ * that "." is removed.
+ */
+ if ((cur[0] == '.') && (cur[1] == '\0'))
+ break;
+
+ /* Otherwise keep the segment. */
+ while (cur[0] != '/') {
+ if (cur[0] == '\0')
+ goto done_cd;
+ (out++)[0] = (cur++)[0];
+ }
+ /* nomalize // */
+ while ((cur[0] == '/') && (cur[1] == '/'))
+ cur++;
+
+ (out++)[0] = (cur++)[0];
+ }
+ done_cd:
+ out[0] = '\0';
+
+ /* Reset to the beginning of the first segment for the next sequence. */
+ cur = path;
+ while (cur[0] == '/')
+ ++cur;
+ if (cur[0] == '\0')
+ return(0);
+
+ /*
+ * Analyze each segment in sequence for cases (e) and (f).
+ *
+ * e) All occurrences of "<segment>/../", where <segment> is a
+ * complete path segment not equal to "..", are removed from the
+ * buffer string. Removal of these path segments is performed
+ * iteratively, removing the leftmost matching pattern on each
+ * iteration, until no matching pattern remains.
+ *
+ * f) If the buffer string ends with "<segment>/..", where <segment>
+ * is a complete path segment not equal to "..", that
+ * "<segment>/.." is removed.
+ *
+ * To satisfy the "iterative" clause in (e), we need to collapse the
+ * string every time we find something that needs to be removed. Thus,
+ * we don't need to keep two pointers into the string: we only need a
+ * "current position" pointer.
+ */
+ while (1) {
+ char *segp, *tmp;
+
+ /* At the beginning of each iteration of this loop, "cur" points to
+ * the first character of the segment we want to examine.
+ */
+
+ /* Find the end of the current segment. */
+ segp = cur;
+ while ((segp[0] != '/') && (segp[0] != '\0'))
+ ++segp;
+
+ /* If this is the last segment, we're done (we need at least two
+ * segments to meet the criteria for the (e) and (f) cases).
+ */
+ if (segp[0] == '\0')
+ break;
+
+ /* If the first segment is "..", or if the next segment _isn't_ "..",
+ * keep this segment and try the next one.
+ */
+ ++segp;
+ if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3))
+ || ((segp[0] != '.') || (segp[1] != '.')
+ || ((segp[2] != '/') && (segp[2] != '\0')))) {
+ cur = segp;
+ continue;
+ }
+
+ /* If we get here, remove this segment and the next one and back up
+ * to the previous segment (if there is one), to implement the
+ * "iteratively" clause. It's pretty much impossible to back up
+ * while maintaining two pointers into the buffer, so just compact
+ * the whole buffer now.
+ */
+
+ /* If this is the end of the buffer, we're done. */
+ if (segp[2] == '\0') {
+ cur[0] = '\0';
+ break;
+ }
+ /* Valgrind complained, strcpy(cur, segp + 3); */
+ /* string will overlap, do not use strcpy */
+ tmp = cur;
+ segp += 3;
+ while ((*tmp++ = *segp++) != 0)
+ ;
+
+ /* If there are no previous segments, then keep going from here. */
+ segp = cur;
+ while ((segp > path) && ((--segp)[0] == '/'))
+ ;
+ if (segp == path)
+ continue;
+
+ /* "segp" is pointing to the end of a previous segment; find it's
+ * start. We need to back up to the previous segment and start
+ * over with that to handle things like "foo/bar/../..". If we
+ * don't do this, then on the first pass we'll remove the "bar/..",
+ * but be pointing at the second ".." so we won't realize we can also
+ * remove the "foo/..".
+ */
+ cur = segp;
+ while ((cur > path) && (cur[-1] != '/'))
+ --cur;
+ }
+ out[0] = '\0';
+
+ /*
+ * g) If the resulting buffer string still begins with one or more
+ * complete path segments of "..", then the reference is
+ * considered to be in error. Implementations may handle this
+ * error by retaining these components in the resolved path (i.e.,
+ * treating them as part of the final URI), by removing them from
+ * the resolved path (i.e., discarding relative levels above the
+ * root), or by avoiding traversal of the reference.
+ *
+ * We discard them from the final path.
+ */
+ if (path[0] == '/') {
+ cur = path;
+ while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.')
+ && ((cur[3] == '/') || (cur[3] == '\0')))
+ cur += 3;
+
+ if (cur != path) {
+ out = path;
+ while (cur[0] != '\0')
+ (out++)[0] = (cur++)[0];
+ out[0] = 0;
+ }
+ }
+
+ return(0);
+}
+
+static int is_hex(char c) {
+ if (((c >= '0') && (c <= '9')) ||
+ ((c >= 'a') && (c <= 'f')) ||
+ ((c >= 'A') && (c <= 'F')))
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlURIUnescapeString:
+ * @str: the string to unescape
+ * @len: the length in bytes to unescape (or <= 0 to indicate full string)
+ * @target: optional destination buffer
+ *
+ * Unescaping routine, but does not check that the string is an URI. The
+ * output is a direct unsigned char translation of %XX values (no encoding)
+ * Note that the length of the result can only be smaller or same size as
+ * the input string.
+ *
+ * Returns a copy of the string, but unescaped, will return NULL only in case
+ * of error
+ */
+char *
+xmlURIUnescapeString(const char *str, int len, char *target) {
+ char *ret, *out;
+ const char *in;
+
+ if (str == NULL)
+ return(NULL);
+ if (len <= 0) len = strlen(str);
+ if (len < 0) return(NULL);
+
+ if (target == NULL) {
+ ret = (char *) xmlMallocAtomic(len + 1);
+ if (ret == NULL) {
+ xmlURIErrMemory("unescaping URI value\n");
+ return(NULL);
+ }
+ } else
+ ret = target;
+ in = str;
+ out = ret;
+ while(len > 0) {
+ if ((len > 2) && (*in == '%') && (is_hex(in[1])) && (is_hex(in[2]))) {
+ in++;
+ if ((*in >= '0') && (*in <= '9'))
+ *out = (*in - '0');
+ else if ((*in >= 'a') && (*in <= 'f'))
+ *out = (*in - 'a') + 10;
+ else if ((*in >= 'A') && (*in <= 'F'))
+ *out = (*in - 'A') + 10;
+ in++;
+ if ((*in >= '0') && (*in <= '9'))
+ *out = *out * 16 + (*in - '0');
+ else if ((*in >= 'a') && (*in <= 'f'))
+ *out = *out * 16 + (*in - 'a') + 10;
+ else if ((*in >= 'A') && (*in <= 'F'))
+ *out = *out * 16 + (*in - 'A') + 10;
+ in++;
+ len -= 3;
+ out++;
+ } else {
+ *out++ = *in++;
+ len--;
+ }
+ }
+ *out = 0;
+ return(ret);
+}
+
+/**
+ * xmlURIEscapeStr:
+ * @str: string to escape
+ * @list: exception list string of chars not to escape
+ *
+ * This routine escapes a string to hex, ignoring reserved characters (a-z)
+ * and the characters in the exception list.
+ *
+ * Returns a new escaped string or NULL in case of error.
+ */
+xmlChar *
+xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
+ xmlChar *ret, ch;
+ xmlChar *temp;
+ const xmlChar *in;
+ int len, out;
+
+ if (str == NULL)
+ return(NULL);
+ if (str[0] == 0)
+ return(xmlStrdup(str));
+ len = xmlStrlen(str);
+ if (!(len > 0)) return(NULL);
+
+ len += 20;
+ ret = (xmlChar *) xmlMallocAtomic(len);
+ if (ret == NULL) {
+ xmlURIErrMemory("escaping URI value\n");
+ return(NULL);
+ }
+ in = (const xmlChar *) str;
+ out = 0;
+ while(*in != 0) {
+ if (len - out <= 3) {
+ temp = xmlSaveUriRealloc(ret, &len);
+ if (temp == NULL) {
+ xmlURIErrMemory("escaping URI value\n");
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret = temp;
+ }
+
+ ch = *in;
+
+ if ((ch != '@') && (!IS_UNRESERVED(ch)) && (!xmlStrchr(list, ch))) {
+ unsigned char val;
+ ret[out++] = '%';
+ val = ch >> 4;
+ if (val <= 9)
+ ret[out++] = '0' + val;
+ else
+ ret[out++] = 'A' + val - 0xA;
+ val = ch & 0xF;
+ if (val <= 9)
+ ret[out++] = '0' + val;
+ else
+ ret[out++] = 'A' + val - 0xA;
+ in++;
+ } else {
+ ret[out++] = *in++;
+ }
+
+ }
+ ret[out] = 0;
+ return(ret);
+}
+
+/**
+ * xmlURIEscape:
+ * @str: the string of the URI to escape
+ *
+ * Escaping routine, does not do validity checks !
+ * It will try to escape the chars needing this, but this is heuristic
+ * based it's impossible to be sure.
+ *
+ * Returns an copy of the string, but escaped
+ *
+ * 25 May 2001
+ * Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly
+ * according to RFC2396.
+ * - Carl Douglas
+ */
+xmlChar *
+xmlURIEscape(const xmlChar * str)
+{
+ xmlChar *ret, *segment = NULL;
+ xmlURIPtr uri;
+ int ret2;
+
+#define NULLCHK(p) if(!p) { \
+ xmlURIErrMemory("escaping URI value\n"); \
+ xmlFreeURI(uri); \
+ return NULL; } \
+
+ if (str == NULL)
+ return (NULL);
+
+ uri = xmlCreateURI();
+ if (uri != NULL) {
+ /*
+ * Allow escaping errors in the unescaped form
+ */
+ uri->cleanup = 1;
+ ret2 = xmlParseURIReference(uri, (const char *)str);
+ if (ret2) {
+ xmlFreeURI(uri);
+ return (NULL);
+ }
+ }
+
+ if (!uri)
+ return NULL;
+
+ ret = NULL;
+
+ if (uri->scheme) {
+ segment = xmlURIEscapeStr(BAD_CAST uri->scheme, BAD_CAST "+-.");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, segment);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ xmlFree(segment);
+ }
+
+ if (uri->authority) {
+ segment =
+ xmlURIEscapeStr(BAD_CAST uri->authority, BAD_CAST "/?;:@");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, BAD_CAST "//");
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ if (uri->user) {
+ segment = xmlURIEscapeStr(BAD_CAST uri->user, BAD_CAST ";:&=+$,");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret,BAD_CAST "//");
+ ret = xmlStrcat(ret, segment);
+ ret = xmlStrcat(ret, BAD_CAST "@");
+ xmlFree(segment);
+ }
+
+ if (uri->server) {
+ segment = xmlURIEscapeStr(BAD_CAST uri->server, BAD_CAST "/?;:@");
+ NULLCHK(segment)
+ if (uri->user == NULL)
+ ret = xmlStrcat(ret, BAD_CAST "//");
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ if (uri->port) {
+ xmlChar port[10];
+
+ snprintf((char *) port, 10, "%d", uri->port);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, port);
+ }
+
+ if (uri->path) {
+ segment =
+ xmlURIEscapeStr(BAD_CAST uri->path, BAD_CAST ":@&=+$,/?;");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ if (uri->query_raw) {
+ ret = xmlStrcat(ret, BAD_CAST "?");
+ ret = xmlStrcat(ret, BAD_CAST uri->query_raw);
+ }
+ else if (uri->query) {
+ segment =
+ xmlURIEscapeStr(BAD_CAST uri->query, BAD_CAST ";/?:@&=+,$");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, BAD_CAST "?");
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ if (uri->opaque) {
+ segment = xmlURIEscapeStr(BAD_CAST uri->opaque, BAD_CAST "");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ if (uri->fragment) {
+ segment = xmlURIEscapeStr(BAD_CAST uri->fragment, BAD_CAST "#");
+ NULLCHK(segment)
+ ret = xmlStrcat(ret, BAD_CAST "#");
+ ret = xmlStrcat(ret, segment);
+ xmlFree(segment);
+ }
+
+ xmlFreeURI(uri);
+#undef NULLCHK
+
+ return (ret);
+}
+
+/************************************************************************
+ * *
+ * Public functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlBuildURI:
+ * @URI: the URI instance found in the document
+ * @base: the base value
+ *
+ * Computes he final URI of the reference done by checking that
+ * the given URI is valid, and building the final URI using the
+ * base URI. This is processed according to section 5.2 of the
+ * RFC 2396
+ *
+ * 5.2. Resolving Relative References to Absolute Form
+ *
+ * Returns a new URI string (to be freed by the caller) or NULL in case
+ * of error.
+ */
+xmlChar *
+xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
+ xmlChar *val = NULL;
+ int ret, len, indx, cur, out;
+ xmlURIPtr ref = NULL;
+ xmlURIPtr bas = NULL;
+ xmlURIPtr res = NULL;
+
+ /*
+ * 1) The URI reference is parsed into the potential four components and
+ * fragment identifier, as described in Section 4.3.
+ *
+ * NOTE that a completely empty URI is treated by modern browsers
+ * as a reference to "." rather than as a synonym for the current
+ * URI. Should we do that here?
+ */
+ if (URI == NULL)
+ ret = -1;
+ else {
+ if (*URI) {
+ ref = xmlCreateURI();
+ if (ref == NULL)
+ goto done;
+ ret = xmlParseURIReference(ref, (const char *) URI);
+ }
+ else
+ ret = 0;
+ }
+ if (ret != 0)
+ goto done;
+ if ((ref != NULL) && (ref->scheme != NULL)) {
+ /*
+ * The URI is absolute don't modify.
+ */
+ val = xmlStrdup(URI);
+ goto done;
+ }
+ if (base == NULL)
+ ret = -1;
+ else {
+ bas = xmlCreateURI();
+ if (bas == NULL)
+ goto done;
+ ret = xmlParseURIReference(bas, (const char *) base);
+ }
+ if (ret != 0) {
+ if (ref)
+ val = xmlSaveUri(ref);
+ goto done;
+ }
+ if (ref == NULL) {
+ /*
+ * the base fragment must be ignored
+ */
+ if (bas->fragment != NULL) {
+ xmlFree(bas->fragment);
+ bas->fragment = NULL;
+ }
+ val = xmlSaveUri(bas);
+ goto done;
+ }
+
+ /*
+ * 2) If the path component is empty and the scheme, authority, and
+ * query components are undefined, then it is a reference to the
+ * current document and we are done. Otherwise, the reference URI's
+ * query and fragment components are defined as found (or not found)
+ * within the URI reference and not inherited from the base URI.
+ *
+ * NOTE that in modern browsers, the parsing differs from the above
+ * in the following aspect: the query component is allowed to be
+ * defined while still treating this as a reference to the current
+ * document.
+ */
+ res = xmlCreateURI();
+ if (res == NULL)
+ goto done;
+ if ((ref->scheme == NULL) && (ref->path == NULL) &&
+ ((ref->authority == NULL) && (ref->server == NULL))) {
+ if (bas->scheme != NULL)
+ res->scheme = xmlMemStrdup(bas->scheme);
+ if (bas->authority != NULL)
+ res->authority = xmlMemStrdup(bas->authority);
+ else if (bas->server != NULL) {
+ res->server = xmlMemStrdup(bas->server);
+ if (bas->user != NULL)
+ res->user = xmlMemStrdup(bas->user);
+ res->port = bas->port;
+ }
+ if (bas->path != NULL)
+ res->path = xmlMemStrdup(bas->path);
+ if (ref->query_raw != NULL)
+ res->query_raw = xmlMemStrdup (ref->query_raw);
+ else if (ref->query != NULL)
+ res->query = xmlMemStrdup(ref->query);
+ else if (bas->query_raw != NULL)
+ res->query_raw = xmlMemStrdup(bas->query_raw);
+ else if (bas->query != NULL)
+ res->query = xmlMemStrdup(bas->query);
+ if (ref->fragment != NULL)
+ res->fragment = xmlMemStrdup(ref->fragment);
+ goto step_7;
+ }
+
+ /*
+ * 3) If the scheme component is defined, indicating that the reference
+ * starts with a scheme name, then the reference is interpreted as an
+ * absolute URI and we are done. Otherwise, the reference URI's
+ * scheme is inherited from the base URI's scheme component.
+ */
+ if (ref->scheme != NULL) {
+ val = xmlSaveUri(ref);
+ goto done;
+ }
+ if (bas->scheme != NULL)
+ res->scheme = xmlMemStrdup(bas->scheme);
+
+ if (ref->query_raw != NULL)
+ res->query_raw = xmlMemStrdup(ref->query_raw);
+ else if (ref->query != NULL)
+ res->query = xmlMemStrdup(ref->query);
+ if (ref->fragment != NULL)
+ res->fragment = xmlMemStrdup(ref->fragment);
+
+ /*
+ * 4) If the authority component is defined, then the reference is a
+ * network-path and we skip to step 7. Otherwise, the reference
+ * URI's authority is inherited from the base URI's authority
+ * component, which will also be undefined if the URI scheme does not
+ * use an authority component.
+ */
+ if ((ref->authority != NULL) || (ref->server != NULL)) {
+ if (ref->authority != NULL)
+ res->authority = xmlMemStrdup(ref->authority);
+ else {
+ res->server = xmlMemStrdup(ref->server);
+ if (ref->user != NULL)
+ res->user = xmlMemStrdup(ref->user);
+ res->port = ref->port;
+ }
+ if (ref->path != NULL)
+ res->path = xmlMemStrdup(ref->path);
+ goto step_7;
+ }
+ if (bas->authority != NULL)
+ res->authority = xmlMemStrdup(bas->authority);
+ else if (bas->server != NULL) {
+ res->server = xmlMemStrdup(bas->server);
+ if (bas->user != NULL)
+ res->user = xmlMemStrdup(bas->user);
+ res->port = bas->port;
+ }
+
+ /*
+ * 5) If the path component begins with a slash character ("/"), then
+ * the reference is an absolute-path and we skip to step 7.
+ */
+ if ((ref->path != NULL) && (ref->path[0] == '/')) {
+ res->path = xmlMemStrdup(ref->path);
+ goto step_7;
+ }
+
+
+ /*
+ * 6) If this step is reached, then we are resolving a relative-path
+ * reference. The relative path needs to be merged with the base
+ * URI's path. Although there are many ways to do this, we will
+ * describe a simple method using a separate string buffer.
+ *
+ * Allocate a buffer large enough for the result string.
+ */
+ len = 2; /* extra / and 0 */
+ if (ref->path != NULL)
+ len += strlen(ref->path);
+ if (bas->path != NULL)
+ len += strlen(bas->path);
+ res->path = (char *) xmlMallocAtomic(len);
+ if (res->path == NULL) {
+ xmlURIErrMemory("resolving URI against base\n");
+ goto done;
+ }
+ res->path[0] = 0;
+
+ /*
+ * a) All but the last segment of the base URI's path component is
+ * copied to the buffer. In other words, any characters after the
+ * last (right-most) slash character, if any, are excluded.
+ */
+ cur = 0;
+ out = 0;
+ if (bas->path != NULL) {
+ while (bas->path[cur] != 0) {
+ while ((bas->path[cur] != 0) && (bas->path[cur] != '/'))
+ cur++;
+ if (bas->path[cur] == 0)
+ break;
+
+ cur++;
+ while (out < cur) {
+ res->path[out] = bas->path[out];
+ out++;
+ }
+ }
+ }
+ res->path[out] = 0;
+
+ /*
+ * b) The reference's path component is appended to the buffer
+ * string.
+ */
+ if (ref->path != NULL && ref->path[0] != 0) {
+ indx = 0;
+ /*
+ * Ensure the path includes a '/'
+ */
+ if ((out == 0) && (bas->server != NULL))
+ res->path[out++] = '/';
+ while (ref->path[indx] != 0) {
+ res->path[out++] = ref->path[indx++];
+ }
+ }
+ res->path[out] = 0;
+
+ /*
+ * Steps c) to h) are really path normalization steps
+ */
+ xmlNormalizeURIPath(res->path);
+
+step_7:
+
+ /*
+ * 7) The resulting URI components, including any inherited from the
+ * base URI, are recombined to give the absolute form of the URI
+ * reference.
+ */
+ val = xmlSaveUri(res);
+
+done:
+ if (ref != NULL)
+ xmlFreeURI(ref);
+ if (bas != NULL)
+ xmlFreeURI(bas);
+ if (res != NULL)
+ xmlFreeURI(res);
+ return(val);
+}
+
+/**
+ * xmlBuildRelativeURI:
+ * @URI: the URI reference under consideration
+ * @base: the base value
+ *
+ * Expresses the URI of the reference in terms relative to the
+ * base. Some examples of this operation include:
+ * base = "http://site1.com/docs/book1.html"
+ * URI input URI returned
+ * docs/pic1.gif pic1.gif
+ * docs/img/pic1.gif img/pic1.gif
+ * img/pic1.gif ../img/pic1.gif
+ * http://site1.com/docs/pic1.gif pic1.gif
+ * http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif
+ *
+ * base = "docs/book1.html"
+ * URI input URI returned
+ * docs/pic1.gif pic1.gif
+ * docs/img/pic1.gif img/pic1.gif
+ * img/pic1.gif ../img/pic1.gif
+ * http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif
+ *
+ *
+ * Note: if the URI reference is really wierd or complicated, it may be
+ * worthwhile to first convert it into a "nice" one by calling
+ * xmlBuildURI (using 'base') before calling this routine,
+ * since this routine (for reasonable efficiency) assumes URI has
+ * already been through some validation.
+ *
+ * Returns a new URI string (to be freed by the caller) or NULL in case
+ * error.
+ */
+xmlChar *
+xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
+{
+ xmlChar *val = NULL;
+ int ret;
+ int ix;
+ int pos = 0;
+ int nbslash = 0;
+ int len;
+ xmlURIPtr ref = NULL;
+ xmlURIPtr bas = NULL;
+ xmlChar *bptr, *uptr, *vptr;
+ int remove_path = 0;
+
+ if ((URI == NULL) || (*URI == 0))
+ return NULL;
+
+ /*
+ * First parse URI into a standard form
+ */
+ ref = xmlCreateURI ();
+ if (ref == NULL)
+ return NULL;
+ /* If URI not already in "relative" form */
+ if (URI[0] != '.') {
+ ret = xmlParseURIReference (ref, (const char *) URI);
+ if (ret != 0)
+ goto done; /* Error in URI, return NULL */
+ } else
+ ref->path = (char *)xmlStrdup(URI);
+
+ /*
+ * Next parse base into the same standard form
+ */
+ if ((base == NULL) || (*base == 0)) {
+ val = xmlStrdup (URI);
+ goto done;
+ }
+ bas = xmlCreateURI ();
+ if (bas == NULL)
+ goto done;
+ if (base[0] != '.') {
+ ret = xmlParseURIReference (bas, (const char *) base);
+ if (ret != 0)
+ goto done; /* Error in base, return NULL */
+ } else
+ bas->path = (char *)xmlStrdup(base);
+
+ /*
+ * If the scheme / server on the URI differs from the base,
+ * just return the URI
+ */
+ if ((ref->scheme != NULL) &&
+ ((bas->scheme == NULL) ||
+ (xmlStrcmp ((xmlChar *)bas->scheme, (xmlChar *)ref->scheme)) ||
+ (xmlStrcmp ((xmlChar *)bas->server, (xmlChar *)ref->server)))) {
+ val = xmlStrdup (URI);
+ goto done;
+ }
+ if (xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path)) {
+ val = xmlStrdup(BAD_CAST "");
+ goto done;
+ }
+ if (bas->path == NULL) {
+ val = xmlStrdup((xmlChar *)ref->path);
+ goto done;
+ }
+ if (ref->path == NULL) {
+ ref->path = (char *) "/";
+ remove_path = 1;
+ }
+
+ /*
+ * At this point (at last!) we can compare the two paths
+ *
+ * First we take care of the special case where either of the
+ * two path components may be missing (bug 316224)
+ */
+ if (bas->path == NULL) {
+ if (ref->path != NULL) {
+ uptr = (xmlChar *) ref->path;
+ if (*uptr == '/')
+ uptr++;
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,");
+ }
+ goto done;
+ }
+ bptr = (xmlChar *)bas->path;
+ if (ref->path == NULL) {
+ for (ix = 0; bptr[ix] != 0; ix++) {
+ if (bptr[ix] == '/')
+ nbslash++;
+ }
+ uptr = NULL;
+ len = 1; /* this is for a string terminator only */
+ } else {
+ /*
+ * Next we compare the two strings and find where they first differ
+ */
+ if ((ref->path[pos] == '.') && (ref->path[pos+1] == '/'))
+ pos += 2;
+ if ((*bptr == '.') && (bptr[1] == '/'))
+ bptr += 2;
+ else if ((*bptr == '/') && (ref->path[pos] != '/'))
+ bptr++;
+ while ((bptr[pos] == ref->path[pos]) && (bptr[pos] != 0))
+ pos++;
+
+ if (bptr[pos] == ref->path[pos]) {
+ val = xmlStrdup(BAD_CAST "");
+ goto done; /* (I can't imagine why anyone would do this) */
+ }
+
+ /*
+ * In URI, "back up" to the last '/' encountered. This will be the
+ * beginning of the "unique" suffix of URI
+ */
+ ix = pos;
+ if ((ref->path[ix] == '/') && (ix > 0))
+ ix--;
+ else if ((ref->path[ix] == 0) && (ix > 1) && (ref->path[ix - 1] == '/'))
+ ix -= 2;
+ for (; ix > 0; ix--) {
+ if (ref->path[ix] == '/')
+ break;
+ }
+ if (ix == 0) {
+ uptr = (xmlChar *)ref->path;
+ } else {
+ ix++;
+ uptr = (xmlChar *)&ref->path[ix];
+ }
+
+ /*
+ * In base, count the number of '/' from the differing point
+ */
+ if (bptr[pos] != ref->path[pos]) {/* check for trivial URI == base */
+ for (; bptr[ix] != 0; ix++) {
+ if (bptr[ix] == '/')
+ nbslash++;
+ }
+ }
+ len = xmlStrlen (uptr) + 1;
+ }
+
+ if (nbslash == 0) {
+ if (uptr != NULL)
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,");
+ goto done;
+ }
+
+ /*
+ * Allocate just enough space for the returned string -
+ * length of the remainder of the URI, plus enough space
+ * for the "../" groups, plus one for the terminator
+ */
+ val = (xmlChar *) xmlMalloc (len + 3 * nbslash);
+ if (val == NULL) {
+ xmlURIErrMemory("building relative URI\n");
+ goto done;
+ }
+ vptr = val;
+ /*
+ * Put in as many "../" as needed
+ */
+ for (; nbslash>0; nbslash--) {
+ *vptr++ = '.';
+ *vptr++ = '.';
+ *vptr++ = '/';
+ }
+ /*
+ * Finish up with the end of the URI
+ */
+ if (uptr != NULL) {
+ if ((vptr > val) && (len > 0) &&
+ (uptr[0] == '/') && (vptr[-1] == '/')) {
+ memcpy (vptr, uptr + 1, len - 1);
+ vptr[len - 2] = 0;
+ } else {
+ memcpy (vptr, uptr, len);
+ vptr[len - 1] = 0;
+ }
+ } else {
+ vptr[len - 1] = 0;
+ }
+
+ /* escape the freshly-built path */
+ vptr = val;
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(vptr, BAD_CAST "/;&=+$,");
+ xmlFree(vptr);
+
+done:
+ /*
+ * Free the working variables
+ */
+ if (remove_path != 0)
+ ref->path = NULL;
+ if (ref != NULL)
+ xmlFreeURI (ref);
+ if (bas != NULL)
+ xmlFreeURI (bas);
+
+ return val;
+}
+
+/**
+ * xmlCanonicPath:
+ * @path: the resource locator in a filesystem notation
+ *
+ * Constructs a canonic path from the specified path.
+ *
+ * Returns a new canonic path, or a duplicate of the path parameter if the
+ * construction fails. The caller is responsible for freeing the memory occupied
+ * by the returned string. If there is insufficient memory available, or the
+ * argument is NULL, the function returns NULL.
+ */
+#define IS_WINDOWS_PATH(p) \
+ ((p != NULL) && \
+ (((p[0] >= 'a') && (p[0] <= 'z')) || \
+ ((p[0] >= 'A') && (p[0] <= 'Z'))) && \
+ (p[1] == ':') && ((p[2] == '/') || (p[2] == '\\')))
+xmlChar *
+xmlCanonicPath(const xmlChar *path)
+{
+/*
+ * For Windows implementations, additional work needs to be done to
+ * replace backslashes in pathnames with "forward slashes"
+ */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ int len = 0;
+ int i = 0;
+ xmlChar *p = NULL;
+#endif
+ xmlURIPtr uri;
+ xmlChar *ret;
+ const xmlChar *absuri;
+
+ if (path == NULL)
+ return(NULL);
+
+#if defined(_WIN32)
+ /*
+ * We must not change the backslashes to slashes if the the path
+ * starts with \\?\
+ * Those paths can be up to 32k characters long.
+ * Was added specifically for OpenOffice, those paths can't be converted
+ * to URIs anyway.
+ */
+ if ((path[0] == '\\') && (path[1] == '\\') && (path[2] == '?') &&
+ (path[3] == '\\') )
+ return xmlStrdup((const xmlChar *) path);
+#endif
+
+ /* sanitize filename starting with // so it can be used as URI */
+ if ((path[0] == '/') && (path[1] == '/') && (path[2] != '/'))
+ path++;
+
+ if ((uri = xmlParseURI((const char *) path)) != NULL) {
+ xmlFreeURI(uri);
+ return xmlStrdup(path);
+ }
+
+ /* Check if this is an "absolute uri" */
+ absuri = xmlStrstr(path, BAD_CAST "://");
+ if (absuri != NULL) {
+ int l, j;
+ unsigned char c;
+ xmlChar *escURI;
+
+ /*
+ * this looks like an URI where some parts have not been
+ * escaped leading to a parsing problem. Check that the first
+ * part matches a protocol.
+ */
+ l = absuri - path;
+ /* Bypass if first part (part before the '://') is > 20 chars */
+ if ((l <= 0) || (l > 20))
+ goto path_processing;
+ /* Bypass if any non-alpha characters are present in first part */
+ for (j = 0;j < l;j++) {
+ c = path[j];
+ if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z'))))
+ goto path_processing;
+ }
+
+ /* Escape all except the characters specified in the supplied path */
+ escURI = xmlURIEscapeStr(path, BAD_CAST ":/?_.#&;=");
+ if (escURI != NULL) {
+ /* Try parsing the escaped path */
+ uri = xmlParseURI((const char *) escURI);
+ /* If successful, return the escaped string */
+ if (uri != NULL) {
+ xmlFreeURI(uri);
+ return escURI;
+ }
+ }
+ }
+
+path_processing:
+/* For Windows implementations, replace backslashes with 'forward slashes' */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /*
+ * Create a URI structure
+ */
+ uri = xmlCreateURI();
+ if (uri == NULL) { /* Guard against 'out of memory' */
+ return(NULL);
+ }
+
+ len = xmlStrlen(path);
+ if ((len > 2) && IS_WINDOWS_PATH(path)) {
+ /* make the scheme 'file' */
+ uri->scheme = xmlStrdup(BAD_CAST "file");
+ /* allocate space for leading '/' + path + string terminator */
+ uri->path = xmlMallocAtomic(len + 2);
+ if (uri->path == NULL) {
+ xmlFreeURI(uri); /* Guard agains 'out of memory' */
+ return(NULL);
+ }
+ /* Put in leading '/' plus path */
+ uri->path[0] = '/';
+ p = uri->path + 1;
+ strncpy(p, path, len + 1);
+ } else {
+ uri->path = xmlStrdup(path);
+ if (uri->path == NULL) {
+ xmlFreeURI(uri);
+ return(NULL);
+ }
+ p = uri->path;
+ }
+ /* Now change all occurences of '\' to '/' */
+ while (*p != '\0') {
+ if (*p == '\\')
+ *p = '/';
+ p++;
+ }
+
+ if (uri->scheme == NULL) {
+ ret = xmlStrdup((const xmlChar *) uri->path);
+ } else {
+ ret = xmlSaveUri(uri);
+ }
+
+ xmlFreeURI(uri);
+#else
+ ret = xmlStrdup((const xmlChar *) path);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlPathToURI:
+ * @path: the resource locator in a filesystem notation
+ *
+ * Constructs an URI expressing the existing path
+ *
+ * Returns a new URI, or a duplicate of the path parameter if the
+ * construction fails. The caller is responsible for freeing the memory
+ * occupied by the returned string. If there is insufficient memory available,
+ * or the argument is NULL, the function returns NULL.
+ */
+xmlChar *
+xmlPathToURI(const xmlChar *path)
+{
+ xmlURIPtr uri;
+ xmlURI temp;
+ xmlChar *ret, *cal;
+
+ if (path == NULL)
+ return(NULL);
+
+ if ((uri = xmlParseURI((const char *) path)) != NULL) {
+ xmlFreeURI(uri);
+ return xmlStrdup(path);
+ }
+ cal = xmlCanonicPath(path);
+ if (cal == NULL)
+ return(NULL);
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /* xmlCanonicPath can return an URI on Windows (is that the intended behaviour?)
+ If 'cal' is a valid URI allready then we are done here, as continuing would make
+ it invalid. */
+ if ((uri = xmlParseURI((const char *) cal)) != NULL) {
+ xmlFreeURI(uri);
+ return cal;
+ }
+ /* 'cal' can contain a relative path with backslashes. If that is processed
+ by xmlSaveURI, they will be escaped and the external entity loader machinery
+ will fail. So convert them to slashes. Misuse 'ret' for walking. */
+ ret = cal;
+ while (*ret != '\0') {
+ if (*ret == '\\')
+ *ret = '/';
+ ret++;
+ }
+#endif
+ memset(&temp, 0, sizeof(temp));
+ temp.path = (char *) cal;
+ ret = xmlSaveUri(&temp);
+ xmlFree(cal);
+ return(ret);
+}
+#define bottom_uri
+#include "elfgcchack.h"
diff --git a/valid.c b/valid.c
new file mode 100644
index 0000000..409aa81
--- /dev/null
+++ b/valid.c
@@ -0,0 +1,7052 @@
+/*
+ * valid.c : part of the code use to do the DTD handling and the validity
+ * checking
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/hash.h>
+#include <libxml/uri.h>
+#include <libxml/valid.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/list.h>
+#include <libxml/globals.h>
+
+static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
+ int create);
+/* #define DEBUG_VALID_ALGO */
+/* #define DEBUG_REGEXP_ALGO */
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#ifdef LIBXML_VALID_ENABLED
+static int
+xmlValidateAttributeValueInternal(xmlDocPtr doc, xmlAttributeType type,
+ const xmlChar *value);
+#endif
+/************************************************************************
+ * *
+ * Error handling routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlVErrMemory:
+ * @ctxt: an XML validation parser context
+ * @extra: extra informations
+ *
+ * Handle an out of memory error
+ */
+static void
+xmlVErrMemory(xmlValidCtxtPtr ctxt, const char *extra)
+{
+ xmlGenericErrorFunc channel = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ channel = ctxt->error;
+ data = ctxt->userData;
+ /* Use the special values to detect if it is part of a parsing
+ context */
+ if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
+ long delta = (char *) ctxt - (char *) ctxt->userData;
+ if ((delta > 0) && (delta < 250))
+ pctxt = ctxt->userData;
+ }
+ }
+ if (extra)
+ __xmlRaiseError(NULL, channel, data,
+ pctxt, NULL, XML_FROM_VALID, XML_ERR_NO_MEMORY,
+ XML_ERR_FATAL, NULL, 0, extra, NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, channel, data,
+ pctxt, NULL, XML_FROM_VALID, XML_ERR_NO_MEMORY,
+ XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0,
+ "Memory allocation failed\n");
+}
+
+/**
+ * xmlErrValid:
+ * @ctxt: an XML validation parser context
+ * @error: the error number
+ * @extra: extra informations
+ *
+ * Handle a validation error
+ */
+static void
+xmlErrValid(xmlValidCtxtPtr ctxt, xmlParserErrors error,
+ const char *msg, const char *extra)
+{
+ xmlGenericErrorFunc channel = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ channel = ctxt->error;
+ data = ctxt->userData;
+ /* Use the special values to detect if it is part of a parsing
+ context */
+ if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
+ long delta = (char *) ctxt - (char *) ctxt->userData;
+ if ((delta > 0) && (delta < 250))
+ pctxt = ctxt->userData;
+ }
+ }
+ if (extra)
+ __xmlRaiseError(NULL, channel, data,
+ pctxt, NULL, XML_FROM_VALID, error,
+ XML_ERR_ERROR, NULL, 0, extra, NULL, NULL, 0, 0,
+ msg, extra);
+ else
+ __xmlRaiseError(NULL, channel, data,
+ pctxt, NULL, XML_FROM_VALID, error,
+ XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0,
+ "%s", msg);
+}
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlErrValidNode:
+ * @ctxt: an XML validation parser context
+ * @node: the node raising the error
+ * @error: the error number
+ * @str1: extra informations
+ * @str2: extra informations
+ * @str3: extra informations
+ *
+ * Handle a validation error, provide contextual informations
+ */
+static void
+xmlErrValidNode(xmlValidCtxtPtr ctxt,
+ xmlNodePtr node, xmlParserErrors error,
+ const char *msg, const xmlChar * str1,
+ const xmlChar * str2, const xmlChar * str3)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ channel = ctxt->error;
+ data = ctxt->userData;
+ /* Use the special values to detect if it is part of a parsing
+ context */
+ if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
+ long delta = (char *) ctxt - (char *) ctxt->userData;
+ if ((delta > 0) && (delta < 250))
+ pctxt = ctxt->userData;
+ }
+ }
+ __xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) str1,
+ (const char *) str1,
+ (const char *) str3, 0, 0, msg, str1, str2, str3);
+}
+#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+/**
+ * xmlErrValidNodeNr:
+ * @ctxt: an XML validation parser context
+ * @node: the node raising the error
+ * @error: the error number
+ * @str1: extra informations
+ * @int2: extra informations
+ * @str3: extra informations
+ *
+ * Handle a validation error, provide contextual informations
+ */
+static void
+xmlErrValidNodeNr(xmlValidCtxtPtr ctxt,
+ xmlNodePtr node, xmlParserErrors error,
+ const char *msg, const xmlChar * str1,
+ int int2, const xmlChar * str3)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ channel = ctxt->error;
+ data = ctxt->userData;
+ /* Use the special values to detect if it is part of a parsing
+ context */
+ if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
+ long delta = (char *) ctxt - (char *) ctxt->userData;
+ if ((delta > 0) && (delta < 250))
+ pctxt = ctxt->userData;
+ }
+ }
+ __xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) str1,
+ (const char *) str3,
+ NULL, int2, 0, msg, str1, int2, str3);
+}
+
+/**
+ * xmlErrValidWarning:
+ * @ctxt: an XML validation parser context
+ * @node: the node raising the error
+ * @error: the error number
+ * @str1: extra information
+ * @str2: extra information
+ * @str3: extra information
+ *
+ * Handle a validation error, provide contextual information
+ */
+static void
+xmlErrValidWarning(xmlValidCtxtPtr ctxt,
+ xmlNodePtr node, xmlParserErrors error,
+ const char *msg, const xmlChar * str1,
+ const xmlChar * str2, const xmlChar * str3)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ channel = ctxt->warning;
+ data = ctxt->userData;
+ /* Use the special values to detect if it is part of a parsing
+ context */
+ if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
+ long delta = (char *) ctxt - (char *) ctxt->userData;
+ if ((delta > 0) && (delta < 250))
+ pctxt = ctxt->userData;
+ }
+ }
+ __xmlRaiseError(schannel, channel, data, pctxt, node, XML_FROM_VALID, error,
+ XML_ERR_WARNING, NULL, 0,
+ (const char *) str1,
+ (const char *) str1,
+ (const char *) str3, 0, 0, msg, str1, str2, str3);
+}
+
+
+
+#ifdef LIBXML_REGEXP_ENABLED
+/*
+ * If regexp are enabled we can do continuous validation without the
+ * need of a tree to validate the content model. this is done in each
+ * callbacks.
+ * Each xmlValidState represent the validation state associated to the
+ * set of nodes currently open from the document root to the current element.
+ */
+
+
+typedef struct _xmlValidState {
+ xmlElementPtr elemDecl; /* pointer to the content model */
+ xmlNodePtr node; /* pointer to the current node */
+ xmlRegExecCtxtPtr exec; /* regexp runtime */
+} _xmlValidState;
+
+
+static int
+vstateVPush(xmlValidCtxtPtr ctxt, xmlElementPtr elemDecl, xmlNodePtr node) {
+ if ((ctxt->vstateMax == 0) || (ctxt->vstateTab == NULL)) {
+ ctxt->vstateMax = 10;
+ ctxt->vstateTab = (xmlValidState *) xmlMalloc(ctxt->vstateMax *
+ sizeof(ctxt->vstateTab[0]));
+ if (ctxt->vstateTab == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(-1);
+ }
+ }
+
+ if (ctxt->vstateNr >= ctxt->vstateMax) {
+ xmlValidState *tmp;
+
+ tmp = (xmlValidState *) xmlRealloc(ctxt->vstateTab,
+ 2 * ctxt->vstateMax * sizeof(ctxt->vstateTab[0]));
+ if (tmp == NULL) {
+ xmlVErrMemory(ctxt, "realloc failed");
+ return(-1);
+ }
+ ctxt->vstateMax *= 2;
+ ctxt->vstateTab = tmp;
+ }
+ ctxt->vstate = &ctxt->vstateTab[ctxt->vstateNr];
+ ctxt->vstateTab[ctxt->vstateNr].elemDecl = elemDecl;
+ ctxt->vstateTab[ctxt->vstateNr].node = node;
+ if ((elemDecl != NULL) && (elemDecl->etype == XML_ELEMENT_TYPE_ELEMENT)) {
+ if (elemDecl->contModel == NULL)
+ xmlValidBuildContentModel(ctxt, elemDecl);
+ if (elemDecl->contModel != NULL) {
+ ctxt->vstateTab[ctxt->vstateNr].exec =
+ xmlRegNewExecCtxt(elemDecl->contModel, NULL, NULL);
+ } else {
+ ctxt->vstateTab[ctxt->vstateNr].exec = NULL;
+ xmlErrValidNode(ctxt, (xmlNodePtr) elemDecl,
+ XML_ERR_INTERNAL_ERROR,
+ "Failed to build content model regexp for %s\n",
+ node->name, NULL, NULL);
+ }
+ }
+ return(ctxt->vstateNr++);
+}
+
+static int
+vstateVPop(xmlValidCtxtPtr ctxt) {
+ xmlElementPtr elemDecl;
+
+ if (ctxt->vstateNr < 1) return(-1);
+ ctxt->vstateNr--;
+ elemDecl = ctxt->vstateTab[ctxt->vstateNr].elemDecl;
+ ctxt->vstateTab[ctxt->vstateNr].elemDecl = NULL;
+ ctxt->vstateTab[ctxt->vstateNr].node = NULL;
+ if ((elemDecl != NULL) && (elemDecl->etype == XML_ELEMENT_TYPE_ELEMENT)) {
+ xmlRegFreeExecCtxt(ctxt->vstateTab[ctxt->vstateNr].exec);
+ }
+ ctxt->vstateTab[ctxt->vstateNr].exec = NULL;
+ if (ctxt->vstateNr >= 1)
+ ctxt->vstate = &ctxt->vstateTab[ctxt->vstateNr - 1];
+ else
+ ctxt->vstate = NULL;
+ return(ctxt->vstateNr);
+}
+
+#else /* not LIBXML_REGEXP_ENABLED */
+/*
+ * If regexp are not enabled, it uses a home made algorithm less
+ * complex and easier to
+ * debug/maintain than a generic NFA -> DFA state based algo. The
+ * only restriction is on the deepness of the tree limited by the
+ * size of the occurs bitfield
+ *
+ * this is the content of a saved state for rollbacks
+ */
+
+#define ROLLBACK_OR 0
+#define ROLLBACK_PARENT 1
+
+typedef struct _xmlValidState {
+ xmlElementContentPtr cont; /* pointer to the content model subtree */
+ xmlNodePtr node; /* pointer to the current node in the list */
+ long occurs;/* bitfield for multiple occurrences */
+ unsigned char depth; /* current depth in the overall tree */
+ unsigned char state; /* ROLLBACK_XXX */
+} _xmlValidState;
+
+#define MAX_RECURSE 25000
+#define MAX_DEPTH ((sizeof(_xmlValidState.occurs)) * 8)
+#define CONT ctxt->vstate->cont
+#define NODE ctxt->vstate->node
+#define DEPTH ctxt->vstate->depth
+#define OCCURS ctxt->vstate->occurs
+#define STATE ctxt->vstate->state
+
+#define OCCURRENCE (ctxt->vstate->occurs & (1 << DEPTH))
+#define PARENT_OCCURRENCE (ctxt->vstate->occurs & ((1 << DEPTH) - 1))
+
+#define SET_OCCURRENCE ctxt->vstate->occurs |= (1 << DEPTH)
+#define RESET_OCCURRENCE ctxt->vstate->occurs &= ((1 << DEPTH) - 1)
+
+static int
+vstateVPush(xmlValidCtxtPtr ctxt, xmlElementContentPtr cont,
+ xmlNodePtr node, unsigned char depth, long occurs,
+ unsigned char state) {
+ int i = ctxt->vstateNr - 1;
+
+ if (ctxt->vstateNr > MAX_RECURSE) {
+ return(-1);
+ }
+ if (ctxt->vstateTab == NULL) {
+ ctxt->vstateMax = 8;
+ ctxt->vstateTab = (xmlValidState *) xmlMalloc(
+ ctxt->vstateMax * sizeof(ctxt->vstateTab[0]));
+ if (ctxt->vstateTab == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(-1);
+ }
+ }
+ if (ctxt->vstateNr >= ctxt->vstateMax) {
+ xmlValidState *tmp;
+
+ tmp = (xmlValidState *) xmlRealloc(ctxt->vstateTab,
+ 2 * ctxt->vstateMax * sizeof(ctxt->vstateTab[0]));
+ if (tmp == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(-1);
+ }
+ ctxt->vstateMax *= 2;
+ ctxt->vstateTab = tmp;
+ ctxt->vstate = &ctxt->vstateTab[0];
+ }
+ /*
+ * Don't push on the stack a state already here
+ */
+ if ((i >= 0) && (ctxt->vstateTab[i].cont == cont) &&
+ (ctxt->vstateTab[i].node == node) &&
+ (ctxt->vstateTab[i].depth == depth) &&
+ (ctxt->vstateTab[i].occurs == occurs) &&
+ (ctxt->vstateTab[i].state == state))
+ return(ctxt->vstateNr);
+ ctxt->vstateTab[ctxt->vstateNr].cont = cont;
+ ctxt->vstateTab[ctxt->vstateNr].node = node;
+ ctxt->vstateTab[ctxt->vstateNr].depth = depth;
+ ctxt->vstateTab[ctxt->vstateNr].occurs = occurs;
+ ctxt->vstateTab[ctxt->vstateNr].state = state;
+ return(ctxt->vstateNr++);
+}
+
+static int
+vstateVPop(xmlValidCtxtPtr ctxt) {
+ if (ctxt->vstateNr <= 1) return(-1);
+ ctxt->vstateNr--;
+ ctxt->vstate = &ctxt->vstateTab[0];
+ ctxt->vstate->cont = ctxt->vstateTab[ctxt->vstateNr].cont;
+ ctxt->vstate->node = ctxt->vstateTab[ctxt->vstateNr].node;
+ ctxt->vstate->depth = ctxt->vstateTab[ctxt->vstateNr].depth;
+ ctxt->vstate->occurs = ctxt->vstateTab[ctxt->vstateNr].occurs;
+ ctxt->vstate->state = ctxt->vstateTab[ctxt->vstateNr].state;
+ return(ctxt->vstateNr);
+}
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+static int
+nodeVPush(xmlValidCtxtPtr ctxt, xmlNodePtr value)
+{
+ if (ctxt->nodeMax <= 0) {
+ ctxt->nodeMax = 4;
+ ctxt->nodeTab =
+ (xmlNodePtr *) xmlMalloc(ctxt->nodeMax *
+ sizeof(ctxt->nodeTab[0]));
+ if (ctxt->nodeTab == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ ctxt->nodeMax = 0;
+ return (0);
+ }
+ }
+ if (ctxt->nodeNr >= ctxt->nodeMax) {
+ xmlNodePtr *tmp;
+ tmp = (xmlNodePtr *) xmlRealloc(ctxt->nodeTab,
+ ctxt->nodeMax * 2 * sizeof(ctxt->nodeTab[0]));
+ if (tmp == NULL) {
+ xmlVErrMemory(ctxt, "realloc failed");
+ return (0);
+ }
+ ctxt->nodeMax *= 2;
+ ctxt->nodeTab = tmp;
+ }
+ ctxt->nodeTab[ctxt->nodeNr] = value;
+ ctxt->node = value;
+ return (ctxt->nodeNr++);
+}
+static xmlNodePtr
+nodeVPop(xmlValidCtxtPtr ctxt)
+{
+ xmlNodePtr ret;
+
+ if (ctxt->nodeNr <= 0)
+ return (NULL);
+ ctxt->nodeNr--;
+ if (ctxt->nodeNr > 0)
+ ctxt->node = ctxt->nodeTab[ctxt->nodeNr - 1];
+ else
+ ctxt->node = NULL;
+ ret = ctxt->nodeTab[ctxt->nodeNr];
+ ctxt->nodeTab[ctxt->nodeNr] = NULL;
+ return (ret);
+}
+
+#ifdef DEBUG_VALID_ALGO
+static void
+xmlValidPrintNode(xmlNodePtr cur) {
+ if (cur == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "null");
+ return;
+ }
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "%s ", cur->name);
+ break;
+ case XML_TEXT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "text ");
+ break;
+ case XML_CDATA_SECTION_NODE:
+ xmlGenericError(xmlGenericErrorContext, "cdata ");
+ break;
+ case XML_ENTITY_REF_NODE:
+ xmlGenericError(xmlGenericErrorContext, "&%s; ", cur->name);
+ break;
+ case XML_PI_NODE:
+ xmlGenericError(xmlGenericErrorContext, "pi(%s) ", cur->name);
+ break;
+ case XML_COMMENT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "comment ");
+ break;
+ case XML_ATTRIBUTE_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?attr? ");
+ break;
+ case XML_ENTITY_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?ent? ");
+ break;
+ case XML_DOCUMENT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?doc? ");
+ break;
+ case XML_DOCUMENT_TYPE_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?doctype? ");
+ break;
+ case XML_DOCUMENT_FRAG_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?frag? ");
+ break;
+ case XML_NOTATION_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?nota? ");
+ break;
+ case XML_HTML_DOCUMENT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?html? ");
+ break;
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?docb? ");
+ break;
+#endif
+ case XML_DTD_NODE:
+ xmlGenericError(xmlGenericErrorContext, "?dtd? ");
+ break;
+ case XML_ELEMENT_DECL:
+ xmlGenericError(xmlGenericErrorContext, "?edecl? ");
+ break;
+ case XML_ATTRIBUTE_DECL:
+ xmlGenericError(xmlGenericErrorContext, "?adecl? ");
+ break;
+ case XML_ENTITY_DECL:
+ xmlGenericError(xmlGenericErrorContext, "?entdecl? ");
+ break;
+ case XML_NAMESPACE_DECL:
+ xmlGenericError(xmlGenericErrorContext, "?nsdecl? ");
+ break;
+ case XML_XINCLUDE_START:
+ xmlGenericError(xmlGenericErrorContext, "incstart ");
+ break;
+ case XML_XINCLUDE_END:
+ xmlGenericError(xmlGenericErrorContext, "incend ");
+ break;
+ }
+}
+
+static void
+xmlValidPrintNodeList(xmlNodePtr cur) {
+ if (cur == NULL)
+ xmlGenericError(xmlGenericErrorContext, "null ");
+ while (cur != NULL) {
+ xmlValidPrintNode(cur);
+ cur = cur->next;
+ }
+}
+
+static void
+xmlValidDebug(xmlNodePtr cur, xmlElementContentPtr cont) {
+ char expr[5000];
+
+ expr[0] = 0;
+ xmlGenericError(xmlGenericErrorContext, "valid: ");
+ xmlValidPrintNodeList(cur);
+ xmlGenericError(xmlGenericErrorContext, "against ");
+ xmlSnprintfElementContent(expr, 5000, cont, 1);
+ xmlGenericError(xmlGenericErrorContext, "%s\n", expr);
+}
+
+static void
+xmlValidDebugState(xmlValidStatePtr state) {
+ xmlGenericError(xmlGenericErrorContext, "(");
+ if (state->cont == NULL)
+ xmlGenericError(xmlGenericErrorContext, "null,");
+ else
+ switch (state->cont->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ xmlGenericError(xmlGenericErrorContext, "pcdata,");
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ xmlGenericError(xmlGenericErrorContext, "%s,",
+ state->cont->name);
+ break;
+ case XML_ELEMENT_CONTENT_SEQ:
+ xmlGenericError(xmlGenericErrorContext, "seq,");
+ break;
+ case XML_ELEMENT_CONTENT_OR:
+ xmlGenericError(xmlGenericErrorContext, "or,");
+ break;
+ }
+ xmlValidPrintNode(state->node);
+ xmlGenericError(xmlGenericErrorContext, ",%d,%X,%d)",
+ state->depth, state->occurs, state->state);
+}
+
+static void
+xmlValidStateDebug(xmlValidCtxtPtr ctxt) {
+ int i, j;
+
+ xmlGenericError(xmlGenericErrorContext, "state: ");
+ xmlValidDebugState(ctxt->vstate);
+ xmlGenericError(xmlGenericErrorContext, " stack: %d ",
+ ctxt->vstateNr - 1);
+ for (i = 0, j = ctxt->vstateNr - 1;(i < 3) && (j > 0);i++,j--)
+ xmlValidDebugState(&ctxt->vstateTab[j]);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+}
+
+/*****
+#define DEBUG_VALID_STATE(n,c) xmlValidDebug(n,c);
+ *****/
+
+#define DEBUG_VALID_STATE(n,c) xmlValidStateDebug(ctxt);
+#define DEBUG_VALID_MSG(m) \
+ xmlGenericError(xmlGenericErrorContext, "%s\n", m);
+
+#else
+#define DEBUG_VALID_STATE(n,c)
+#define DEBUG_VALID_MSG(m)
+#endif
+
+/* TODO: use hash table for accesses to elem and attribute definitions */
+
+
+#define CHECK_DTD \
+ if (doc == NULL) return(0); \
+ else if ((doc->intSubset == NULL) && \
+ (doc->extSubset == NULL)) return(0)
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+/************************************************************************
+ * *
+ * Content model validation based on the regexps *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlValidBuildAContentModel:
+ * @content: the content model
+ * @ctxt: the schema parser context
+ * @name: the element name whose content is being built
+ *
+ * Generate the automata sequence needed for that type
+ *
+ * Returns 1 if successful or 0 in case of error.
+ */
+static int
+xmlValidBuildAContentModel(xmlElementContentPtr content,
+ xmlValidCtxtPtr ctxt,
+ const xmlChar *name) {
+ if (content == NULL) {
+ xmlErrValidNode(ctxt, NULL, XML_ERR_INTERNAL_ERROR,
+ "Found NULL content in content model of %s\n",
+ name, NULL, NULL);
+ return(0);
+ }
+ switch (content->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ xmlErrValidNode(ctxt, NULL, XML_ERR_INTERNAL_ERROR,
+ "Found PCDATA in content model of %s\n",
+ name, NULL, NULL);
+ return(0);
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT: {
+ xmlAutomataStatePtr oldstate = ctxt->state;
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(content->name, content->prefix, fn, 50);
+ if (fullname == NULL) {
+ xmlVErrMemory(ctxt, "Building content model");
+ return(0);
+ }
+
+ switch (content->ocur) {
+ case XML_ELEMENT_CONTENT_ONCE:
+ ctxt->state = xmlAutomataNewTransition(ctxt->am,
+ ctxt->state, NULL, fullname, NULL);
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ ctxt->state = xmlAutomataNewTransition(ctxt->am,
+ ctxt->state, NULL, fullname, NULL);
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ ctxt->state = xmlAutomataNewTransition(ctxt->am,
+ ctxt->state, NULL, fullname, NULL);
+ xmlAutomataNewTransition(ctxt->am, ctxt->state,
+ ctxt->state, fullname, NULL);
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
+ ctxt->state, NULL);
+ xmlAutomataNewTransition(ctxt->am,
+ ctxt->state, ctxt->state, fullname, NULL);
+ break;
+ }
+ if ((fullname != fn) && (fullname != content->name))
+ xmlFree(fullname);
+ break;
+ }
+ case XML_ELEMENT_CONTENT_SEQ: {
+ xmlAutomataStatePtr oldstate, oldend;
+ xmlElementContentOccur ocur;
+
+ /*
+ * Simply iterate over the content
+ */
+ oldstate = ctxt->state;
+ ocur = content->ocur;
+ if (ocur != XML_ELEMENT_CONTENT_ONCE) {
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am, oldstate, NULL);
+ oldstate = ctxt->state;
+ }
+ do {
+ xmlValidBuildAContentModel(content->c1, ctxt, name);
+ content = content->c2;
+ } while ((content->type == XML_ELEMENT_CONTENT_SEQ) &&
+ (content->ocur == XML_ELEMENT_CONTENT_ONCE));
+ xmlValidBuildAContentModel(content, ctxt, name);
+ oldend = ctxt->state;
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am, oldend, NULL);
+ switch (ocur) {
+ case XML_ELEMENT_CONTENT_ONCE:
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ xmlAutomataNewEpsilon(ctxt->am, oldend, oldstate);
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ xmlAutomataNewEpsilon(ctxt->am, oldend, oldstate);
+ break;
+ }
+ break;
+ }
+ case XML_ELEMENT_CONTENT_OR: {
+ xmlAutomataStatePtr oldstate, oldend;
+ xmlElementContentOccur ocur;
+
+ ocur = content->ocur;
+ if ((ocur == XML_ELEMENT_CONTENT_PLUS) ||
+ (ocur == XML_ELEMENT_CONTENT_MULT)) {
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
+ ctxt->state, NULL);
+ }
+ oldstate = ctxt->state;
+ oldend = xmlAutomataNewState(ctxt->am);
+
+ /*
+ * iterate over the subtypes and remerge the end with an
+ * epsilon transition
+ */
+ do {
+ ctxt->state = oldstate;
+ xmlValidBuildAContentModel(content->c1, ctxt, name);
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, oldend);
+ content = content->c2;
+ } while ((content->type == XML_ELEMENT_CONTENT_OR) &&
+ (content->ocur == XML_ELEMENT_CONTENT_ONCE));
+ ctxt->state = oldstate;
+ xmlValidBuildAContentModel(content, ctxt, name);
+ xmlAutomataNewEpsilon(ctxt->am, ctxt->state, oldend);
+ ctxt->state = xmlAutomataNewEpsilon(ctxt->am, oldend, NULL);
+ switch (ocur) {
+ case XML_ELEMENT_CONTENT_ONCE:
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+ xmlAutomataNewEpsilon(ctxt->am, oldstate, ctxt->state);
+ xmlAutomataNewEpsilon(ctxt->am, oldend, oldstate);
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ xmlAutomataNewEpsilon(ctxt->am, oldend, oldstate);
+ break;
+ }
+ break;
+ }
+ default:
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "ContentModel broken for element %s\n",
+ (const char *) name);
+ return(0);
+ }
+ return(1);
+}
+/**
+ * xmlValidBuildContentModel:
+ * @ctxt: a validation context
+ * @elem: an element declaration node
+ *
+ * (Re)Build the automata associated to the content model of this
+ * element
+ *
+ * Returns 1 in case of success, 0 in case of error
+ */
+int
+xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
+
+ if ((ctxt == NULL) || (elem == NULL))
+ return(0);
+ if (elem->type != XML_ELEMENT_DECL)
+ return(0);
+ if (elem->etype != XML_ELEMENT_TYPE_ELEMENT)
+ return(1);
+ /* TODO: should we rebuild in this case ? */
+ if (elem->contModel != NULL) {
+ if (!xmlRegexpIsDeterminist(elem->contModel)) {
+ ctxt->valid = 0;
+ return(0);
+ }
+ return(1);
+ }
+
+ ctxt->am = xmlNewAutomata();
+ if (ctxt->am == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem,
+ XML_ERR_INTERNAL_ERROR,
+ "Cannot create automata for element %s\n",
+ elem->name, NULL, NULL);
+ return(0);
+ }
+ ctxt->state = xmlAutomataGetInitState(ctxt->am);
+ xmlValidBuildAContentModel(elem->content, ctxt, elem->name);
+ xmlAutomataSetFinalState(ctxt->am, ctxt->state);
+ elem->contModel = xmlAutomataCompile(ctxt->am);
+ if (xmlRegexpIsDeterminist(elem->contModel) != 1) {
+ char expr[5000];
+ expr[0] = 0;
+ xmlSnprintfElementContent(expr, 5000, elem->content, 1);
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem,
+ XML_DTD_CONTENT_NOT_DETERMINIST,
+ "Content model of %s is not determinist: %s\n",
+ elem->name, BAD_CAST expr, NULL);
+#ifdef DEBUG_REGEXP_ALGO
+ xmlRegexpPrint(stderr, elem->contModel);
+#endif
+ ctxt->valid = 0;
+ ctxt->state = NULL;
+ xmlFreeAutomata(ctxt->am);
+ ctxt->am = NULL;
+ return(0);
+ }
+ ctxt->state = NULL;
+ xmlFreeAutomata(ctxt->am);
+ ctxt->am = NULL;
+ return(1);
+}
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+/****************************************************************
+ * *
+ * Util functions for data allocation/deallocation *
+ * *
+ ****************************************************************/
+
+/**
+ * xmlNewValidCtxt:
+ *
+ * Allocate a validation context structure.
+ *
+ * Returns NULL if not, otherwise the new validation context structure
+ */
+xmlValidCtxtPtr xmlNewValidCtxt(void) {
+ xmlValidCtxtPtr ret;
+
+ if ((ret = xmlMalloc(sizeof (xmlValidCtxt))) == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return (NULL);
+ }
+
+ (void) memset(ret, 0, sizeof (xmlValidCtxt));
+
+ return (ret);
+}
+
+/**
+ * xmlFreeValidCtxt:
+ * @cur: the validation context to free
+ *
+ * Free a validation context structure.
+ */
+void
+xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
+ if (cur->vstateTab != NULL)
+ xmlFree(cur->vstateTab);
+ if (cur->nodeTab != NULL)
+ xmlFree(cur->nodeTab);
+ xmlFree(cur);
+}
+
+#endif /* LIBXML_VALID_ENABLED */
+
+/**
+ * xmlNewDocElementContent:
+ * @doc: the document
+ * @name: the subelement name or NULL
+ * @type: the type of element content decl
+ *
+ * Allocate an element content structure for the document.
+ *
+ * Returns NULL if not, otherwise the new element content structure
+ */
+xmlElementContentPtr
+xmlNewDocElementContent(xmlDocPtr doc, const xmlChar *name,
+ xmlElementContentType type) {
+ xmlElementContentPtr ret;
+ xmlDictPtr dict = NULL;
+
+ if (doc != NULL)
+ dict = doc->dict;
+
+ switch(type) {
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ if (name == NULL) {
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewElementContent : name == NULL !\n",
+ NULL);
+ }
+ break;
+ case XML_ELEMENT_CONTENT_PCDATA:
+ case XML_ELEMENT_CONTENT_SEQ:
+ case XML_ELEMENT_CONTENT_OR:
+ if (name != NULL) {
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewElementContent : name != NULL !\n",
+ NULL);
+ }
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ELEMENT content corrupted invalid type\n",
+ NULL);
+ return(NULL);
+ }
+ ret = (xmlElementContentPtr) xmlMalloc(sizeof(xmlElementContent));
+ if (ret == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlElementContent));
+ ret->type = type;
+ ret->ocur = XML_ELEMENT_CONTENT_ONCE;
+ if (name != NULL) {
+ int l;
+ const xmlChar *tmp;
+
+ tmp = xmlSplitQName3(name, &l);
+ if (tmp == NULL) {
+ if (dict == NULL)
+ ret->name = xmlStrdup(name);
+ else
+ ret->name = xmlDictLookup(dict, name, -1);
+ } else {
+ if (dict == NULL) {
+ ret->prefix = xmlStrndup(name, l);
+ ret->name = xmlStrdup(tmp);
+ } else {
+ ret->prefix = xmlDictLookup(dict, name, l);
+ ret->name = xmlDictLookup(dict, tmp, -1);
+ }
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlNewElementContent:
+ * @name: the subelement name or NULL
+ * @type: the type of element content decl
+ *
+ * Allocate an element content structure.
+ * Deprecated in favor of xmlNewDocElementContent
+ *
+ * Returns NULL if not, otherwise the new element content structure
+ */
+xmlElementContentPtr
+xmlNewElementContent(const xmlChar *name, xmlElementContentType type) {
+ return(xmlNewDocElementContent(NULL, name, type));
+}
+
+/**
+ * xmlCopyDocElementContent:
+ * @doc: the document owning the element declaration
+ * @cur: An element content pointer.
+ *
+ * Build a copy of an element content description.
+ *
+ * Returns the new xmlElementContentPtr or NULL in case of error.
+ */
+xmlElementContentPtr
+xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
+ xmlElementContentPtr ret = NULL, prev = NULL, tmp;
+ xmlDictPtr dict = NULL;
+
+ if (cur == NULL) return(NULL);
+
+ if (doc != NULL)
+ dict = doc->dict;
+
+ ret = (xmlElementContentPtr) xmlMalloc(sizeof(xmlElementContent));
+ if (ret == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlElementContent));
+ ret->type = cur->type;
+ ret->ocur = cur->ocur;
+ if (cur->name != NULL) {
+ if (dict)
+ ret->name = xmlDictLookup(dict, cur->name, -1);
+ else
+ ret->name = xmlStrdup(cur->name);
+ }
+
+ if (cur->prefix != NULL) {
+ if (dict)
+ ret->prefix = xmlDictLookup(dict, cur->prefix, -1);
+ else
+ ret->prefix = xmlStrdup(cur->prefix);
+ }
+ if (cur->c1 != NULL)
+ ret->c1 = xmlCopyDocElementContent(doc, cur->c1);
+ if (ret->c1 != NULL)
+ ret->c1->parent = ret;
+ if (cur->c2 != NULL) {
+ prev = ret;
+ cur = cur->c2;
+ while (cur != NULL) {
+ tmp = (xmlElementContentPtr) xmlMalloc(sizeof(xmlElementContent));
+ if (tmp == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(ret);
+ }
+ memset(tmp, 0, sizeof(xmlElementContent));
+ tmp->type = cur->type;
+ tmp->ocur = cur->ocur;
+ prev->c2 = tmp;
+ if (cur->name != NULL) {
+ if (dict)
+ tmp->name = xmlDictLookup(dict, cur->name, -1);
+ else
+ tmp->name = xmlStrdup(cur->name);
+ }
+
+ if (cur->prefix != NULL) {
+ if (dict)
+ tmp->prefix = xmlDictLookup(dict, cur->prefix, -1);
+ else
+ tmp->prefix = xmlStrdup(cur->prefix);
+ }
+ if (cur->c1 != NULL)
+ tmp->c1 = xmlCopyDocElementContent(doc,cur->c1);
+ if (tmp->c1 != NULL)
+ tmp->c1->parent = ret;
+ prev = tmp;
+ cur = cur->c2;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlCopyElementContent:
+ * @cur: An element content pointer.
+ *
+ * Build a copy of an element content description.
+ * Deprecated, use xmlCopyDocElementContent instead
+ *
+ * Returns the new xmlElementContentPtr or NULL in case of error.
+ */
+xmlElementContentPtr
+xmlCopyElementContent(xmlElementContentPtr cur) {
+ return(xmlCopyDocElementContent(NULL, cur));
+}
+
+/**
+ * xmlFreeDocElementContent:
+ * @doc: the document owning the element declaration
+ * @cur: the element content tree to free
+ *
+ * Free an element content structure. The whole subtree is removed.
+ */
+void
+xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
+ xmlElementContentPtr next;
+ xmlDictPtr dict = NULL;
+
+ if (doc != NULL)
+ dict = doc->dict;
+
+ while (cur != NULL) {
+ next = cur->c2;
+ switch (cur->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ case XML_ELEMENT_CONTENT_SEQ:
+ case XML_ELEMENT_CONTENT_OR:
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ELEMENT content corrupted invalid type\n",
+ NULL);
+ return;
+ }
+ if (cur->c1 != NULL) xmlFreeDocElementContent(doc, cur->c1);
+ if (dict) {
+ if ((cur->name != NULL) && (!xmlDictOwns(dict, cur->name)))
+ xmlFree((xmlChar *) cur->name);
+ if ((cur->prefix != NULL) && (!xmlDictOwns(dict, cur->prefix)))
+ xmlFree((xmlChar *) cur->prefix);
+ } else {
+ if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
+ if (cur->prefix != NULL) xmlFree((xmlChar *) cur->prefix);
+ }
+ xmlFree(cur);
+ cur = next;
+ }
+}
+
+/**
+ * xmlFreeElementContent:
+ * @cur: the element content tree to free
+ *
+ * Free an element content structure. The whole subtree is removed.
+ * Deprecated, use xmlFreeDocElementContent instead
+ */
+void
+xmlFreeElementContent(xmlElementContentPtr cur) {
+ xmlFreeDocElementContent(NULL, cur);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlDumpElementContent:
+ * @buf: An XML buffer
+ * @content: An element table
+ * @glob: 1 if one must print the englobing parenthesis, 0 otherwise
+ *
+ * This will dump the content of the element table as an XML DTD definition
+ */
+static void
+xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob) {
+ if (content == NULL) return;
+
+ if (glob) xmlBufferWriteChar(buf, "(");
+ switch (content->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ xmlBufferWriteChar(buf, "#PCDATA");
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ if (content->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, content->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, content->name);
+ break;
+ case XML_ELEMENT_CONTENT_SEQ:
+ if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
+ xmlDumpElementContent(buf, content->c1, 1);
+ else
+ xmlDumpElementContent(buf, content->c1, 0);
+ xmlBufferWriteChar(buf, " , ");
+ if ((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
+ ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) &&
+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
+ xmlDumpElementContent(buf, content->c2, 1);
+ else
+ xmlDumpElementContent(buf, content->c2, 0);
+ break;
+ case XML_ELEMENT_CONTENT_OR:
+ if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
+ xmlDumpElementContent(buf, content->c1, 1);
+ else
+ xmlDumpElementContent(buf, content->c1, 0);
+ xmlBufferWriteChar(buf, " | ");
+ if ((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
+ ((content->c2->type == XML_ELEMENT_CONTENT_OR) &&
+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)))
+ xmlDumpElementContent(buf, content->c2, 1);
+ else
+ xmlDumpElementContent(buf, content->c2, 0);
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ELEMENT content corrupted invalid type\n",
+ NULL);
+ }
+ if (glob)
+ xmlBufferWriteChar(buf, ")");
+ switch (content->ocur) {
+ case XML_ELEMENT_CONTENT_ONCE:
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ xmlBufferWriteChar(buf, "?");
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+ xmlBufferWriteChar(buf, "*");
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ xmlBufferWriteChar(buf, "+");
+ break;
+ }
+}
+
+/**
+ * xmlSprintfElementContent:
+ * @buf: an output buffer
+ * @content: An element table
+ * @englob: 1 if one must print the englobing parenthesis, 0 otherwise
+ *
+ * Deprecated, unsafe, use xmlSnprintfElementContent
+ */
+void
+xmlSprintfElementContent(char *buf ATTRIBUTE_UNUSED,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED,
+ int englob ATTRIBUTE_UNUSED) {
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlSnprintfElementContent:
+ * @buf: an output buffer
+ * @size: the buffer size
+ * @content: An element table
+ * @englob: 1 if one must print the englobing parenthesis, 0 otherwise
+ *
+ * This will dump the content of the element content definition
+ * Intended just for the debug routine
+ */
+void
+xmlSnprintfElementContent(char *buf, int size, xmlElementContentPtr content, int englob) {
+ int len;
+
+ if (content == NULL) return;
+ len = strlen(buf);
+ if (size - len < 50) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ if (englob) strcat(buf, "(");
+ switch (content->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ strcat(buf, "#PCDATA");
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ if (content->prefix != NULL) {
+ if (size - len < xmlStrlen(content->prefix) + 10) {
+ strcat(buf, " ...");
+ return;
+ }
+ strcat(buf, (char *) content->prefix);
+ strcat(buf, ":");
+ }
+ if (size - len < xmlStrlen(content->name) + 10) {
+ strcat(buf, " ...");
+ return;
+ }
+ if (content->name != NULL)
+ strcat(buf, (char *) content->name);
+ break;
+ case XML_ELEMENT_CONTENT_SEQ:
+ if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
+ xmlSnprintfElementContent(buf, size, content->c1, 1);
+ else
+ xmlSnprintfElementContent(buf, size, content->c1, 0);
+ len = strlen(buf);
+ if (size - len < 50) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ strcat(buf, " , ");
+ if (((content->c2->type == XML_ELEMENT_CONTENT_OR) ||
+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)) &&
+ (content->c2->type != XML_ELEMENT_CONTENT_ELEMENT))
+ xmlSnprintfElementContent(buf, size, content->c2, 1);
+ else
+ xmlSnprintfElementContent(buf, size, content->c2, 0);
+ break;
+ case XML_ELEMENT_CONTENT_OR:
+ if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
+ (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
+ xmlSnprintfElementContent(buf, size, content->c1, 1);
+ else
+ xmlSnprintfElementContent(buf, size, content->c1, 0);
+ len = strlen(buf);
+ if (size - len < 50) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ strcat(buf, " | ");
+ if (((content->c2->type == XML_ELEMENT_CONTENT_SEQ) ||
+ (content->c2->ocur != XML_ELEMENT_CONTENT_ONCE)) &&
+ (content->c2->type != XML_ELEMENT_CONTENT_ELEMENT))
+ xmlSnprintfElementContent(buf, size, content->c2, 1);
+ else
+ xmlSnprintfElementContent(buf, size, content->c2, 0);
+ break;
+ }
+ if (englob)
+ strcat(buf, ")");
+ switch (content->ocur) {
+ case XML_ELEMENT_CONTENT_ONCE:
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ strcat(buf, "?");
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+ strcat(buf, "*");
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ strcat(buf, "+");
+ break;
+ }
+}
+
+/****************************************************************
+ * *
+ * Registration of DTD declarations *
+ * *
+ ****************************************************************/
+
+/**
+ * xmlFreeElement:
+ * @elem: An element
+ *
+ * Deallocate the memory used by an element definition
+ */
+static void
+xmlFreeElement(xmlElementPtr elem) {
+ if (elem == NULL) return;
+ xmlUnlinkNode((xmlNodePtr) elem);
+ xmlFreeDocElementContent(elem->doc, elem->content);
+ if (elem->name != NULL)
+ xmlFree((xmlChar *) elem->name);
+ if (elem->prefix != NULL)
+ xmlFree((xmlChar *) elem->prefix);
+#ifdef LIBXML_REGEXP_ENABLED
+ if (elem->contModel != NULL)
+ xmlRegFreeRegexp(elem->contModel);
+#endif
+ xmlFree(elem);
+}
+
+
+/**
+ * xmlAddElementDecl:
+ * @ctxt: the validation context
+ * @dtd: pointer to the DTD
+ * @name: the entity name
+ * @type: the element type
+ * @content: the element content tree or NULL
+ *
+ * Register a new element declaration
+ *
+ * Returns NULL if not, otherwise the entity
+ */
+xmlElementPtr
+xmlAddElementDecl(xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd, const xmlChar *name,
+ xmlElementTypeVal type,
+ xmlElementContentPtr content) {
+ xmlElementPtr ret;
+ xmlElementTablePtr table;
+ xmlAttributePtr oldAttributes = NULL;
+ xmlChar *ns, *uqname;
+
+ if (dtd == NULL) {
+ return(NULL);
+ }
+ if (name == NULL) {
+ return(NULL);
+ }
+
+ switch (type) {
+ case XML_ELEMENT_TYPE_EMPTY:
+ if (content != NULL) {
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlAddElementDecl: content != NULL for EMPTY\n",
+ NULL);
+ return(NULL);
+ }
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ if (content != NULL) {
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlAddElementDecl: content != NULL for ANY\n",
+ NULL);
+ return(NULL);
+ }
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+ if (content == NULL) {
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlAddElementDecl: content == NULL for MIXED\n",
+ NULL);
+ return(NULL);
+ }
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ if (content == NULL) {
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlAddElementDecl: content == NULL for ELEMENT\n",
+ NULL);
+ return(NULL);
+ }
+ break;
+ default:
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "Internal: ELEMENT decl corrupted invalid type\n",
+ NULL);
+ return(NULL);
+ }
+
+ /*
+ * check if name is a QName
+ */
+ uqname = xmlSplitQName2(name, &ns);
+ if (uqname != NULL)
+ name = uqname;
+
+ /*
+ * Create the Element table if needed.
+ */
+ table = (xmlElementTablePtr) dtd->elements;
+ if (table == NULL) {
+ xmlDictPtr dict = NULL;
+
+ if (dtd->doc != NULL)
+ dict = dtd->doc->dict;
+ table = xmlHashCreateDict(0, dict);
+ dtd->elements = (void *) table;
+ }
+ if (table == NULL) {
+ xmlVErrMemory(ctxt,
+ "xmlAddElementDecl: Table creation failed!\n");
+ if (uqname != NULL)
+ xmlFree(uqname);
+ if (ns != NULL)
+ xmlFree(ns);
+ return(NULL);
+ }
+
+ /*
+ * lookup old attributes inserted on an undefined element in the
+ * internal subset.
+ */
+ if ((dtd->doc != NULL) && (dtd->doc->intSubset != NULL)) {
+ ret = xmlHashLookup2(dtd->doc->intSubset->elements, name, ns);
+ if ((ret != NULL) && (ret->etype == XML_ELEMENT_TYPE_UNDEFINED)) {
+ oldAttributes = ret->attributes;
+ ret->attributes = NULL;
+ xmlHashRemoveEntry2(dtd->doc->intSubset->elements, name, ns, NULL);
+ xmlFreeElement(ret);
+ }
+ }
+
+ /*
+ * The element may already be present if one of its attribute
+ * was registered first
+ */
+ ret = xmlHashLookup2(table, name, ns);
+ if (ret != NULL) {
+ if (ret->etype != XML_ELEMENT_TYPE_UNDEFINED) {
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * The element is already defined in this DTD.
+ */
+ xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ELEM_REDEFINED,
+ "Redefinition of element %s\n",
+ name, NULL, NULL);
+#endif /* LIBXML_VALID_ENABLED */
+ if (uqname != NULL)
+ xmlFree(uqname);
+ if (ns != NULL)
+ xmlFree(ns);
+ return(NULL);
+ }
+ if (ns != NULL) {
+ xmlFree(ns);
+ ns = NULL;
+ }
+ } else {
+ ret = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
+ if (ret == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ if (uqname != NULL)
+ xmlFree(uqname);
+ if (ns != NULL)
+ xmlFree(ns);
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlElement));
+ ret->type = XML_ELEMENT_DECL;
+
+ /*
+ * fill the structure.
+ */
+ ret->name = xmlStrdup(name);
+ if (ret->name == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ if (uqname != NULL)
+ xmlFree(uqname);
+ if (ns != NULL)
+ xmlFree(ns);
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->prefix = ns;
+
+ /*
+ * Validity Check:
+ * Insertion must not fail
+ */
+ if (xmlHashAddEntry2(table, name, ns, ret)) {
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * The element is already defined in this DTD.
+ */
+ xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ELEM_REDEFINED,
+ "Redefinition of element %s\n",
+ name, NULL, NULL);
+#endif /* LIBXML_VALID_ENABLED */
+ xmlFreeElement(ret);
+ if (uqname != NULL)
+ xmlFree(uqname);
+ return(NULL);
+ }
+ /*
+ * For new element, may have attributes from earlier
+ * definition in internal subset
+ */
+ ret->attributes = oldAttributes;
+ }
+
+ /*
+ * Finish to fill the structure.
+ */
+ ret->etype = type;
+ /*
+ * Avoid a stupid copy when called by the parser
+ * and flag it by setting a special parent value
+ * so the parser doesn't unallocate it.
+ */
+ if ((ctxt != NULL) &&
+ ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
+ (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1))) {
+ ret->content = content;
+ if (content != NULL)
+ content->parent = (xmlElementContentPtr) 1;
+ } else {
+ ret->content = xmlCopyDocElementContent(dtd->doc, content);
+ }
+
+ /*
+ * Link it to the DTD
+ */
+ ret->parent = dtd;
+ ret->doc = dtd->doc;
+ if (dtd->last == NULL) {
+ dtd->children = dtd->last = (xmlNodePtr) ret;
+ } else {
+ dtd->last->next = (xmlNodePtr) ret;
+ ret->prev = dtd->last;
+ dtd->last = (xmlNodePtr) ret;
+ }
+ if (uqname != NULL)
+ xmlFree(uqname);
+ return(ret);
+}
+
+/**
+ * xmlFreeElementTable:
+ * @table: An element table
+ *
+ * Deallocate the memory used by an element hash table.
+ */
+void
+xmlFreeElementTable(xmlElementTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeElement);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlCopyElement:
+ * @elem: An element
+ *
+ * Build a copy of an element.
+ *
+ * Returns the new xmlElementPtr or NULL in case of error.
+ */
+static xmlElementPtr
+xmlCopyElement(xmlElementPtr elem) {
+ xmlElementPtr cur;
+
+ cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
+ if (cur == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlElement));
+ cur->type = XML_ELEMENT_DECL;
+ cur->etype = elem->etype;
+ if (elem->name != NULL)
+ cur->name = xmlStrdup(elem->name);
+ else
+ cur->name = NULL;
+ if (elem->prefix != NULL)
+ cur->prefix = xmlStrdup(elem->prefix);
+ else
+ cur->prefix = NULL;
+ cur->content = xmlCopyElementContent(elem->content);
+ /* TODO : rebuild the attribute list on the copy */
+ cur->attributes = NULL;
+ return(cur);
+}
+
+/**
+ * xmlCopyElementTable:
+ * @table: An element table
+ *
+ * Build a copy of an element table.
+ *
+ * Returns the new xmlElementTablePtr or NULL in case of error.
+ */
+xmlElementTablePtr
+xmlCopyElementTable(xmlElementTablePtr table) {
+ return((xmlElementTablePtr) xmlHashCopy(table,
+ (xmlHashCopier) xmlCopyElement));
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlDumpElementDecl:
+ * @buf: the XML buffer output
+ * @elem: An element table
+ *
+ * This will dump the content of the element declaration as an XML
+ * DTD definition
+ */
+void
+xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
+ if ((buf == NULL) || (elem == NULL))
+ return;
+ switch (elem->etype) {
+ case XML_ELEMENT_TYPE_EMPTY:
+ xmlBufferWriteChar(buf, "<!ELEMENT ");
+ if (elem->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, elem->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, elem->name);
+ xmlBufferWriteChar(buf, " EMPTY>\n");
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ xmlBufferWriteChar(buf, "<!ELEMENT ");
+ if (elem->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, elem->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, elem->name);
+ xmlBufferWriteChar(buf, " ANY>\n");
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+ xmlBufferWriteChar(buf, "<!ELEMENT ");
+ if (elem->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, elem->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, elem->name);
+ xmlBufferWriteChar(buf, " ");
+ xmlDumpElementContent(buf, elem->content, 1);
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ xmlBufferWriteChar(buf, "<!ELEMENT ");
+ if (elem->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, elem->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, elem->name);
+ xmlBufferWriteChar(buf, " ");
+ xmlDumpElementContent(buf, elem->content, 1);
+ xmlBufferWriteChar(buf, ">\n");
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ELEMENT struct corrupted invalid type\n",
+ NULL);
+ }
+}
+
+/**
+ * xmlDumpElementDeclScan:
+ * @elem: An element table
+ * @buf: the XML buffer output
+ *
+ * This routine is used by the hash scan function. It just reverses
+ * the arguments.
+ */
+static void
+xmlDumpElementDeclScan(xmlElementPtr elem, xmlBufferPtr buf) {
+ xmlDumpElementDecl(buf, elem);
+}
+
+/**
+ * xmlDumpElementTable:
+ * @buf: the XML buffer output
+ * @table: An element table
+ *
+ * This will dump the content of the element table as an XML DTD definition
+ */
+void
+xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) {
+ if ((buf == NULL) || (table == NULL))
+ return;
+ xmlHashScan(table, (xmlHashScanner) xmlDumpElementDeclScan, buf);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlCreateEnumeration:
+ * @name: the enumeration name or NULL
+ *
+ * create and initialize an enumeration attribute node.
+ *
+ * Returns the xmlEnumerationPtr just created or NULL in case
+ * of error.
+ */
+xmlEnumerationPtr
+xmlCreateEnumeration(const xmlChar *name) {
+ xmlEnumerationPtr ret;
+
+ ret = (xmlEnumerationPtr) xmlMalloc(sizeof(xmlEnumeration));
+ if (ret == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlEnumeration));
+
+ if (name != NULL)
+ ret->name = xmlStrdup(name);
+ return(ret);
+}
+
+/**
+ * xmlFreeEnumeration:
+ * @cur: the tree to free.
+ *
+ * free an enumeration attribute node (recursive).
+ */
+void
+xmlFreeEnumeration(xmlEnumerationPtr cur) {
+ if (cur == NULL) return;
+
+ if (cur->next != NULL) xmlFreeEnumeration(cur->next);
+
+ if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
+ xmlFree(cur);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlCopyEnumeration:
+ * @cur: the tree to copy.
+ *
+ * Copy an enumeration attribute node (recursive).
+ *
+ * Returns the xmlEnumerationPtr just created or NULL in case
+ * of error.
+ */
+xmlEnumerationPtr
+xmlCopyEnumeration(xmlEnumerationPtr cur) {
+ xmlEnumerationPtr ret;
+
+ if (cur == NULL) return(NULL);
+ ret = xmlCreateEnumeration((xmlChar *) cur->name);
+ if (ret == NULL) return(NULL);
+
+ if (cur->next != NULL) ret->next = xmlCopyEnumeration(cur->next);
+ else ret->next = NULL;
+
+ return(ret);
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlDumpEnumeration:
+ * @buf: the XML buffer output
+ * @enum: An enumeration
+ *
+ * This will dump the content of the enumeration
+ */
+static void
+xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
+ if ((buf == NULL) || (cur == NULL))
+ return;
+
+ xmlBufferWriteCHAR(buf, cur->name);
+ if (cur->next == NULL)
+ xmlBufferWriteChar(buf, ")");
+ else {
+ xmlBufferWriteChar(buf, " | ");
+ xmlDumpEnumeration(buf, cur->next);
+ }
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+/**
+ * xmlScanIDAttributeDecl:
+ * @ctxt: the validation context
+ * @elem: the element name
+ * @err: whether to raise errors here
+ *
+ * Verify that the element don't have too many ID attributes
+ * declared.
+ *
+ * Returns the number of ID attributes found.
+ */
+static int
+xmlScanIDAttributeDecl(xmlValidCtxtPtr ctxt, xmlElementPtr elem, int err) {
+ xmlAttributePtr cur;
+ int ret = 0;
+
+ if (elem == NULL) return(0);
+ cur = elem->attributes;
+ while (cur != NULL) {
+ if (cur->atype == XML_ATTRIBUTE_ID) {
+ ret ++;
+ if ((ret > 1) && (err))
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_MULTIPLE_ID,
+ "Element %s has too many ID attributes defined : %s\n",
+ elem->name, cur->name, NULL);
+ }
+ cur = cur->nexth;
+ }
+ return(ret);
+}
+#endif /* LIBXML_VALID_ENABLED */
+
+/**
+ * xmlFreeAttribute:
+ * @elem: An attribute
+ *
+ * Deallocate the memory used by an attribute definition
+ */
+static void
+xmlFreeAttribute(xmlAttributePtr attr) {
+ xmlDictPtr dict;
+
+ if (attr == NULL) return;
+ if (attr->doc != NULL)
+ dict = attr->doc->dict;
+ else
+ dict = NULL;
+ xmlUnlinkNode((xmlNodePtr) attr);
+ if (attr->tree != NULL)
+ xmlFreeEnumeration(attr->tree);
+ if (dict) {
+ if ((attr->elem != NULL) && (!xmlDictOwns(dict, attr->elem)))
+ xmlFree((xmlChar *) attr->elem);
+ if ((attr->name != NULL) && (!xmlDictOwns(dict, attr->name)))
+ xmlFree((xmlChar *) attr->name);
+ if ((attr->prefix != NULL) && (!xmlDictOwns(dict, attr->prefix)))
+ xmlFree((xmlChar *) attr->prefix);
+ if ((attr->defaultValue != NULL) &&
+ (!xmlDictOwns(dict, attr->defaultValue)))
+ xmlFree((xmlChar *) attr->defaultValue);
+ } else {
+ if (attr->elem != NULL)
+ xmlFree((xmlChar *) attr->elem);
+ if (attr->name != NULL)
+ xmlFree((xmlChar *) attr->name);
+ if (attr->defaultValue != NULL)
+ xmlFree((xmlChar *) attr->defaultValue);
+ if (attr->prefix != NULL)
+ xmlFree((xmlChar *) attr->prefix);
+ }
+ xmlFree(attr);
+}
+
+
+/**
+ * xmlAddAttributeDecl:
+ * @ctxt: the validation context
+ * @dtd: pointer to the DTD
+ * @elem: the element name
+ * @name: the attribute name
+ * @ns: the attribute namespace prefix
+ * @type: the attribute type
+ * @def: the attribute default type
+ * @defaultValue: the attribute default value
+ * @tree: if it's an enumeration, the associated list
+ *
+ * Register a new attribute declaration
+ * Note that @tree becomes the ownership of the DTD
+ *
+ * Returns NULL if not new, otherwise the attribute decl
+ */
+xmlAttributePtr
+xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd, const xmlChar *elem,
+ const xmlChar *name, const xmlChar *ns,
+ xmlAttributeType type, xmlAttributeDefault def,
+ const xmlChar *defaultValue, xmlEnumerationPtr tree) {
+ xmlAttributePtr ret;
+ xmlAttributeTablePtr table;
+ xmlElementPtr elemDef;
+ xmlDictPtr dict = NULL;
+
+ if (dtd == NULL) {
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ if (name == NULL) {
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ if (elem == NULL) {
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ if (dtd->doc != NULL)
+ dict = dtd->doc->dict;
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * Check the type and possibly the default value.
+ */
+ switch (type) {
+ case XML_ATTRIBUTE_CDATA:
+ break;
+ case XML_ATTRIBUTE_ID:
+ break;
+ case XML_ATTRIBUTE_IDREF:
+ break;
+ case XML_ATTRIBUTE_IDREFS:
+ break;
+ case XML_ATTRIBUTE_ENTITY:
+ break;
+ case XML_ATTRIBUTE_ENTITIES:
+ break;
+ case XML_ATTRIBUTE_NMTOKEN:
+ break;
+ case XML_ATTRIBUTE_NMTOKENS:
+ break;
+ case XML_ATTRIBUTE_ENUMERATION:
+ break;
+ case XML_ATTRIBUTE_NOTATION:
+ break;
+ default:
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "Internal: ATTRIBUTE struct corrupted invalid type\n",
+ NULL);
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ if ((defaultValue != NULL) &&
+ (!xmlValidateAttributeValueInternal(dtd->doc, type, defaultValue))) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_DEFAULT,
+ "Attribute %s of %s: invalid default value\n",
+ elem, name, defaultValue);
+ defaultValue = NULL;
+ if (ctxt != NULL)
+ ctxt->valid = 0;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * Check first that an attribute defined in the external subset wasn't
+ * already defined in the internal subset
+ */
+ if ((dtd->doc != NULL) && (dtd->doc->extSubset == dtd) &&
+ (dtd->doc->intSubset != NULL) &&
+ (dtd->doc->intSubset->attributes != NULL)) {
+ ret = xmlHashLookup3(dtd->doc->intSubset->attributes, name, ns, elem);
+ if (ret != NULL) {
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ }
+
+ /*
+ * Create the Attribute table if needed.
+ */
+ table = (xmlAttributeTablePtr) dtd->attributes;
+ if (table == NULL) {
+ table = xmlHashCreateDict(0, dict);
+ dtd->attributes = (void *) table;
+ }
+ if (table == NULL) {
+ xmlVErrMemory(ctxt,
+ "xmlAddAttributeDecl: Table creation failed!\n");
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+
+
+ ret = (xmlAttributePtr) xmlMalloc(sizeof(xmlAttribute));
+ if (ret == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ xmlFreeEnumeration(tree);
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlAttribute));
+ ret->type = XML_ATTRIBUTE_DECL;
+
+ /*
+ * fill the structure.
+ */
+ ret->atype = type;
+ /*
+ * doc must be set before possible error causes call
+ * to xmlFreeAttribute (because it's used to check on
+ * dict use)
+ */
+ ret->doc = dtd->doc;
+ if (dict) {
+ ret->name = xmlDictLookup(dict, name, -1);
+ ret->prefix = xmlDictLookup(dict, ns, -1);
+ ret->elem = xmlDictLookup(dict, elem, -1);
+ } else {
+ ret->name = xmlStrdup(name);
+ ret->prefix = xmlStrdup(ns);
+ ret->elem = xmlStrdup(elem);
+ }
+ ret->def = def;
+ ret->tree = tree;
+ if (defaultValue != NULL) {
+ if (dict)
+ ret->defaultValue = xmlDictLookup(dict, defaultValue, -1);
+ else
+ ret->defaultValue = xmlStrdup(defaultValue);
+ }
+
+ /*
+ * Validity Check:
+ * Search the DTD for previous declarations of the ATTLIST
+ */
+ if (xmlHashAddEntry3(table, ret->name, ret->prefix, ret->elem, ret) < 0) {
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * The attribute is already defined in this DTD.
+ */
+ xmlErrValidWarning(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_REDEFINED,
+ "Attribute %s of element %s: already defined\n",
+ name, elem, NULL);
+#endif /* LIBXML_VALID_ENABLED */
+ xmlFreeAttribute(ret);
+ return(NULL);
+ }
+
+ /*
+ * Validity Check:
+ * Multiple ID per element
+ */
+ elemDef = xmlGetDtdElementDesc2(dtd, elem, 1);
+ if (elemDef != NULL) {
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((type == XML_ATTRIBUTE_ID) &&
+ (xmlScanIDAttributeDecl(NULL, elemDef, 1) != 0)) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
+ "Element %s has too may ID attributes defined : %s\n",
+ elem, name, NULL);
+ if (ctxt != NULL)
+ ctxt->valid = 0;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+
+ /*
+ * Insert namespace default def first they need to be
+ * processed first.
+ */
+ if ((xmlStrEqual(ret->name, BAD_CAST "xmlns")) ||
+ ((ret->prefix != NULL &&
+ (xmlStrEqual(ret->prefix, BAD_CAST "xmlns"))))) {
+ ret->nexth = elemDef->attributes;
+ elemDef->attributes = ret;
+ } else {
+ xmlAttributePtr tmp = elemDef->attributes;
+
+ while ((tmp != NULL) &&
+ ((xmlStrEqual(tmp->name, BAD_CAST "xmlns")) ||
+ ((ret->prefix != NULL &&
+ (xmlStrEqual(ret->prefix, BAD_CAST "xmlns")))))) {
+ if (tmp->nexth == NULL)
+ break;
+ tmp = tmp->nexth;
+ }
+ if (tmp != NULL) {
+ ret->nexth = tmp->nexth;
+ tmp->nexth = ret;
+ } else {
+ ret->nexth = elemDef->attributes;
+ elemDef->attributes = ret;
+ }
+ }
+ }
+
+ /*
+ * Link it to the DTD
+ */
+ ret->parent = dtd;
+ if (dtd->last == NULL) {
+ dtd->children = dtd->last = (xmlNodePtr) ret;
+ } else {
+ dtd->last->next = (xmlNodePtr) ret;
+ ret->prev = dtd->last;
+ dtd->last = (xmlNodePtr) ret;
+ }
+ return(ret);
+}
+
+/**
+ * xmlFreeAttributeTable:
+ * @table: An attribute table
+ *
+ * Deallocate the memory used by an entities hash table.
+ */
+void
+xmlFreeAttributeTable(xmlAttributeTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeAttribute);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlCopyAttribute:
+ * @attr: An attribute
+ *
+ * Build a copy of an attribute.
+ *
+ * Returns the new xmlAttributePtr or NULL in case of error.
+ */
+static xmlAttributePtr
+xmlCopyAttribute(xmlAttributePtr attr) {
+ xmlAttributePtr cur;
+
+ cur = (xmlAttributePtr) xmlMalloc(sizeof(xmlAttribute));
+ if (cur == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlAttribute));
+ cur->type = XML_ATTRIBUTE_DECL;
+ cur->atype = attr->atype;
+ cur->def = attr->def;
+ cur->tree = xmlCopyEnumeration(attr->tree);
+ if (attr->elem != NULL)
+ cur->elem = xmlStrdup(attr->elem);
+ if (attr->name != NULL)
+ cur->name = xmlStrdup(attr->name);
+ if (attr->prefix != NULL)
+ cur->prefix = xmlStrdup(attr->prefix);
+ if (attr->defaultValue != NULL)
+ cur->defaultValue = xmlStrdup(attr->defaultValue);
+ return(cur);
+}
+
+/**
+ * xmlCopyAttributeTable:
+ * @table: An attribute table
+ *
+ * Build a copy of an attribute table.
+ *
+ * Returns the new xmlAttributeTablePtr or NULL in case of error.
+ */
+xmlAttributeTablePtr
+xmlCopyAttributeTable(xmlAttributeTablePtr table) {
+ return((xmlAttributeTablePtr) xmlHashCopy(table,
+ (xmlHashCopier) xmlCopyAttribute));
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlDumpAttributeDecl:
+ * @buf: the XML buffer output
+ * @attr: An attribute declaration
+ *
+ * This will dump the content of the attribute declaration as an XML
+ * DTD definition
+ */
+void
+xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
+ if ((buf == NULL) || (attr == NULL))
+ return;
+ xmlBufferWriteChar(buf, "<!ATTLIST ");
+ xmlBufferWriteCHAR(buf, attr->elem);
+ xmlBufferWriteChar(buf, " ");
+ if (attr->prefix != NULL) {
+ xmlBufferWriteCHAR(buf, attr->prefix);
+ xmlBufferWriteChar(buf, ":");
+ }
+ xmlBufferWriteCHAR(buf, attr->name);
+ switch (attr->atype) {
+ case XML_ATTRIBUTE_CDATA:
+ xmlBufferWriteChar(buf, " CDATA");
+ break;
+ case XML_ATTRIBUTE_ID:
+ xmlBufferWriteChar(buf, " ID");
+ break;
+ case XML_ATTRIBUTE_IDREF:
+ xmlBufferWriteChar(buf, " IDREF");
+ break;
+ case XML_ATTRIBUTE_IDREFS:
+ xmlBufferWriteChar(buf, " IDREFS");
+ break;
+ case XML_ATTRIBUTE_ENTITY:
+ xmlBufferWriteChar(buf, " ENTITY");
+ break;
+ case XML_ATTRIBUTE_ENTITIES:
+ xmlBufferWriteChar(buf, " ENTITIES");
+ break;
+ case XML_ATTRIBUTE_NMTOKEN:
+ xmlBufferWriteChar(buf, " NMTOKEN");
+ break;
+ case XML_ATTRIBUTE_NMTOKENS:
+ xmlBufferWriteChar(buf, " NMTOKENS");
+ break;
+ case XML_ATTRIBUTE_ENUMERATION:
+ xmlBufferWriteChar(buf, " (");
+ xmlDumpEnumeration(buf, attr->tree);
+ break;
+ case XML_ATTRIBUTE_NOTATION:
+ xmlBufferWriteChar(buf, " NOTATION (");
+ xmlDumpEnumeration(buf, attr->tree);
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ATTRIBUTE struct corrupted invalid type\n",
+ NULL);
+ }
+ switch (attr->def) {
+ case XML_ATTRIBUTE_NONE:
+ break;
+ case XML_ATTRIBUTE_REQUIRED:
+ xmlBufferWriteChar(buf, " #REQUIRED");
+ break;
+ case XML_ATTRIBUTE_IMPLIED:
+ xmlBufferWriteChar(buf, " #IMPLIED");
+ break;
+ case XML_ATTRIBUTE_FIXED:
+ xmlBufferWriteChar(buf, " #FIXED");
+ break;
+ default:
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "Internal: ATTRIBUTE struct corrupted invalid def\n",
+ NULL);
+ }
+ if (attr->defaultValue != NULL) {
+ xmlBufferWriteChar(buf, " ");
+ xmlBufferWriteQuotedString(buf, attr->defaultValue);
+ }
+ xmlBufferWriteChar(buf, ">\n");
+}
+
+/**
+ * xmlDumpAttributeDeclScan:
+ * @attr: An attribute declaration
+ * @buf: the XML buffer output
+ *
+ * This is used with the hash scan function - just reverses arguments
+ */
+static void
+xmlDumpAttributeDeclScan(xmlAttributePtr attr, xmlBufferPtr buf) {
+ xmlDumpAttributeDecl(buf, attr);
+}
+
+/**
+ * xmlDumpAttributeTable:
+ * @buf: the XML buffer output
+ * @table: An attribute table
+ *
+ * This will dump the content of the attribute table as an XML DTD definition
+ */
+void
+xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) {
+ if ((buf == NULL) || (table == NULL))
+ return;
+ xmlHashScan(table, (xmlHashScanner) xmlDumpAttributeDeclScan, buf);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * NOTATIONs *
+ * *
+ ************************************************************************/
+/**
+ * xmlFreeNotation:
+ * @not: A notation
+ *
+ * Deallocate the memory used by an notation definition
+ */
+static void
+xmlFreeNotation(xmlNotationPtr nota) {
+ if (nota == NULL) return;
+ if (nota->name != NULL)
+ xmlFree((xmlChar *) nota->name);
+ if (nota->PublicID != NULL)
+ xmlFree((xmlChar *) nota->PublicID);
+ if (nota->SystemID != NULL)
+ xmlFree((xmlChar *) nota->SystemID);
+ xmlFree(nota);
+}
+
+
+/**
+ * xmlAddNotationDecl:
+ * @dtd: pointer to the DTD
+ * @ctxt: the validation context
+ * @name: the entity name
+ * @PublicID: the public identifier or NULL
+ * @SystemID: the system identifier or NULL
+ *
+ * Register a new notation declaration
+ *
+ * Returns NULL if not, otherwise the entity
+ */
+xmlNotationPtr
+xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *PublicID, const xmlChar *SystemID) {
+ xmlNotationPtr ret;
+ xmlNotationTablePtr table;
+
+ if (dtd == NULL) {
+ return(NULL);
+ }
+ if (name == NULL) {
+ return(NULL);
+ }
+ if ((PublicID == NULL) && (SystemID == NULL)) {
+ return(NULL);
+ }
+
+ /*
+ * Create the Notation table if needed.
+ */
+ table = (xmlNotationTablePtr) dtd->notations;
+ if (table == NULL) {
+ xmlDictPtr dict = NULL;
+ if (dtd->doc != NULL)
+ dict = dtd->doc->dict;
+
+ dtd->notations = table = xmlHashCreateDict(0, dict);
+ }
+ if (table == NULL) {
+ xmlVErrMemory(ctxt,
+ "xmlAddNotationDecl: Table creation failed!\n");
+ return(NULL);
+ }
+
+ ret = (xmlNotationPtr) xmlMalloc(sizeof(xmlNotation));
+ if (ret == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlNotation));
+
+ /*
+ * fill the structure.
+ */
+ ret->name = xmlStrdup(name);
+ if (SystemID != NULL)
+ ret->SystemID = xmlStrdup(SystemID);
+ if (PublicID != NULL)
+ ret->PublicID = xmlStrdup(PublicID);
+
+ /*
+ * Validity Check:
+ * Check the DTD for previous declarations of the ATTLIST
+ */
+ if (xmlHashAddEntry(table, name, ret)) {
+#ifdef LIBXML_VALID_ENABLED
+ xmlErrValid(NULL, XML_DTD_NOTATION_REDEFINED,
+ "xmlAddNotationDecl: %s already defined\n",
+ (const char *) name);
+#endif /* LIBXML_VALID_ENABLED */
+ xmlFreeNotation(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlFreeNotationTable:
+ * @table: An notation table
+ *
+ * Deallocate the memory used by an entities hash table.
+ */
+void
+xmlFreeNotationTable(xmlNotationTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeNotation);
+}
+
+#ifdef LIBXML_TREE_ENABLED
+/**
+ * xmlCopyNotation:
+ * @nota: A notation
+ *
+ * Build a copy of a notation.
+ *
+ * Returns the new xmlNotationPtr or NULL in case of error.
+ */
+static xmlNotationPtr
+xmlCopyNotation(xmlNotationPtr nota) {
+ xmlNotationPtr cur;
+
+ cur = (xmlNotationPtr) xmlMalloc(sizeof(xmlNotation));
+ if (cur == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ if (nota->name != NULL)
+ cur->name = xmlStrdup(nota->name);
+ else
+ cur->name = NULL;
+ if (nota->PublicID != NULL)
+ cur->PublicID = xmlStrdup(nota->PublicID);
+ else
+ cur->PublicID = NULL;
+ if (nota->SystemID != NULL)
+ cur->SystemID = xmlStrdup(nota->SystemID);
+ else
+ cur->SystemID = NULL;
+ return(cur);
+}
+
+/**
+ * xmlCopyNotationTable:
+ * @table: A notation table
+ *
+ * Build a copy of a notation table.
+ *
+ * Returns the new xmlNotationTablePtr or NULL in case of error.
+ */
+xmlNotationTablePtr
+xmlCopyNotationTable(xmlNotationTablePtr table) {
+ return((xmlNotationTablePtr) xmlHashCopy(table,
+ (xmlHashCopier) xmlCopyNotation));
+}
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlDumpNotationDecl:
+ * @buf: the XML buffer output
+ * @nota: A notation declaration
+ *
+ * This will dump the content the notation declaration as an XML DTD definition
+ */
+void
+xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) {
+ if ((buf == NULL) || (nota == NULL))
+ return;
+ xmlBufferWriteChar(buf, "<!NOTATION ");
+ xmlBufferWriteCHAR(buf, nota->name);
+ if (nota->PublicID != NULL) {
+ xmlBufferWriteChar(buf, " PUBLIC ");
+ xmlBufferWriteQuotedString(buf, nota->PublicID);
+ if (nota->SystemID != NULL) {
+ xmlBufferWriteChar(buf, " ");
+ xmlBufferWriteQuotedString(buf, nota->SystemID);
+ }
+ } else {
+ xmlBufferWriteChar(buf, " SYSTEM ");
+ xmlBufferWriteQuotedString(buf, nota->SystemID);
+ }
+ xmlBufferWriteChar(buf, " >\n");
+}
+
+/**
+ * xmlDumpNotationDeclScan:
+ * @nota: A notation declaration
+ * @buf: the XML buffer output
+ *
+ * This is called with the hash scan function, and just reverses args
+ */
+static void
+xmlDumpNotationDeclScan(xmlNotationPtr nota, xmlBufferPtr buf) {
+ xmlDumpNotationDecl(buf, nota);
+}
+
+/**
+ * xmlDumpNotationTable:
+ * @buf: the XML buffer output
+ * @table: A notation table
+ *
+ * This will dump the content of the notation table as an XML DTD definition
+ */
+void
+xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
+ if ((buf == NULL) || (table == NULL))
+ return;
+ xmlHashScan(table, (xmlHashScanner) xmlDumpNotationDeclScan, buf);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * IDs *
+ * *
+ ************************************************************************/
+/**
+ * DICT_FREE:
+ * @str: a string
+ *
+ * Free a string if it is not owned by the "dict" dictionnary in the
+ * current scope
+ */
+#define DICT_FREE(str) \
+ if ((str) && ((!dict) || \
+ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
+ xmlFree((char *)(str));
+
+/**
+ * xmlFreeID:
+ * @not: A id
+ *
+ * Deallocate the memory used by an id definition
+ */
+static void
+xmlFreeID(xmlIDPtr id) {
+ xmlDictPtr dict = NULL;
+
+ if (id == NULL) return;
+
+ if (id->doc != NULL)
+ dict = id->doc->dict;
+
+ if (id->value != NULL)
+ DICT_FREE(id->value)
+ if (id->name != NULL)
+ DICT_FREE(id->name)
+ xmlFree(id);
+}
+
+
+/**
+ * xmlAddID:
+ * @ctxt: the validation context
+ * @doc: pointer to the document
+ * @value: the value name
+ * @attr: the attribute holding the ID
+ *
+ * Register a new id declaration
+ *
+ * Returns NULL if not, otherwise the new xmlIDPtr
+ */
+xmlIDPtr
+xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
+ xmlAttrPtr attr) {
+ xmlIDPtr ret;
+ xmlIDTablePtr table;
+
+ if (doc == NULL) {
+ return(NULL);
+ }
+ if (value == NULL) {
+ return(NULL);
+ }
+ if (attr == NULL) {
+ return(NULL);
+ }
+
+ /*
+ * Create the ID table if needed.
+ */
+ table = (xmlIDTablePtr) doc->ids;
+ if (table == NULL) {
+ doc->ids = table = xmlHashCreateDict(0, doc->dict);
+ }
+ if (table == NULL) {
+ xmlVErrMemory(ctxt,
+ "xmlAddID: Table creation failed!\n");
+ return(NULL);
+ }
+
+ ret = (xmlIDPtr) xmlMalloc(sizeof(xmlID));
+ if (ret == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(NULL);
+ }
+
+ /*
+ * fill the structure.
+ */
+ ret->value = xmlStrdup(value);
+ ret->doc = doc;
+ if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
+ /*
+ * Operating in streaming mode, attr is gonna disapear
+ */
+ if (doc->dict != NULL)
+ ret->name = xmlDictLookup(doc->dict, attr->name, -1);
+ else
+ ret->name = xmlStrdup(attr->name);
+ ret->attr = NULL;
+ } else {
+ ret->attr = attr;
+ ret->name = NULL;
+ }
+ ret->lineno = xmlGetLineNo(attr->parent);
+
+ if (xmlHashAddEntry(table, value, ret) < 0) {
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * The id is already defined in this DTD.
+ */
+ xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
+ "ID %s already defined\n", value, NULL, NULL);
+#endif /* LIBXML_VALID_ENABLED */
+ xmlFreeID(ret);
+ return(NULL);
+ }
+ if (attr != NULL)
+ attr->atype = XML_ATTRIBUTE_ID;
+ return(ret);
+}
+
+/**
+ * xmlFreeIDTable:
+ * @table: An id table
+ *
+ * Deallocate the memory used by an ID hash table.
+ */
+void
+xmlFreeIDTable(xmlIDTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeID);
+}
+
+/**
+ * xmlIsID:
+ * @doc: the document
+ * @elem: the element carrying the attribute
+ * @attr: the attribute
+ *
+ * Determine whether an attribute is of type ID. In case we have DTD(s)
+ * then this is done if DTD loading has been requested. In the case
+ * of HTML documents parsed with the HTML parser, then ID detection is
+ * done systematically.
+ *
+ * Returns 0 or 1 depending on the lookup result
+ */
+int
+xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
+ if ((attr == NULL) || (attr->name == NULL)) return(0);
+ if ((attr->ns != NULL) && (attr->ns->prefix != NULL) &&
+ (!strcmp((char *) attr->name, "id")) &&
+ (!strcmp((char *) attr->ns->prefix, "xml")))
+ return(1);
+ if (doc == NULL) return(0);
+ if ((doc->intSubset == NULL) && (doc->extSubset == NULL) &&
+ (doc->type != XML_HTML_DOCUMENT_NODE)) {
+ return(0);
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
+ ((xmlStrEqual(BAD_CAST "name", attr->name)) &&
+ ((elem == NULL) || (xmlStrEqual(elem->name, BAD_CAST "a")))))
+ return(1);
+ return(0);
+ } else if (elem == NULL) {
+ return(0);
+ } else {
+ xmlAttributePtr attrDecl = NULL;
+
+ xmlChar felem[50], fattr[50];
+ xmlChar *fullelemname, *fullattrname;
+
+ fullelemname = (elem->ns != NULL && elem->ns->prefix != NULL) ?
+ xmlBuildQName(elem->name, elem->ns->prefix, felem, 50) :
+ (xmlChar *)elem->name;
+
+ fullattrname = (attr->ns != NULL && attr->ns->prefix != NULL) ?
+ xmlBuildQName(attr->name, attr->ns->prefix, fattr, 50) :
+ (xmlChar *)attr->name;
+
+ if (fullelemname != NULL && fullattrname != NULL) {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullelemname,
+ fullattrname);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullelemname,
+ fullattrname);
+ }
+
+ if ((fullattrname != fattr) && (fullattrname != attr->name))
+ xmlFree(fullattrname);
+ if ((fullelemname != felem) && (fullelemname != elem->name))
+ xmlFree(fullelemname);
+
+ if ((attrDecl != NULL) && (attrDecl->atype == XML_ATTRIBUTE_ID))
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlRemoveID:
+ * @doc: the document
+ * @attr: the attribute
+ *
+ * Remove the given attribute from the ID table maintained internally.
+ *
+ * Returns -1 if the lookup failed and 0 otherwise
+ */
+int
+xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
+ xmlIDTablePtr table;
+ xmlIDPtr id;
+ xmlChar *ID;
+
+ if (doc == NULL) return(-1);
+ if (attr == NULL) return(-1);
+
+ table = (xmlIDTablePtr) doc->ids;
+ if (table == NULL)
+ return(-1);
+
+ ID = xmlNodeListGetString(doc, attr->children, 1);
+ if (ID == NULL)
+ return(-1);
+
+ id = xmlHashLookup(table, ID);
+ if (id == NULL || id->attr != attr) {
+ xmlFree(ID);
+ return(-1);
+ }
+
+ xmlHashRemoveEntry(table, ID, (xmlHashDeallocator) xmlFreeID);
+ xmlFree(ID);
+ attr->atype = 0;
+ return(0);
+}
+
+/**
+ * xmlGetID:
+ * @doc: pointer to the document
+ * @ID: the ID value
+ *
+ * Search the attribute declaring the given ID
+ *
+ * Returns NULL if not found, otherwise the xmlAttrPtr defining the ID
+ */
+xmlAttrPtr
+xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
+ xmlIDTablePtr table;
+ xmlIDPtr id;
+
+ if (doc == NULL) {
+ return(NULL);
+ }
+
+ if (ID == NULL) {
+ return(NULL);
+ }
+
+ table = (xmlIDTablePtr) doc->ids;
+ if (table == NULL)
+ return(NULL);
+
+ id = xmlHashLookup(table, ID);
+ if (id == NULL)
+ return(NULL);
+ if (id->attr == NULL) {
+ /*
+ * We are operating on a stream, return a well known reference
+ * since the attribute node doesn't exist anymore
+ */
+ return((xmlAttrPtr) doc);
+ }
+ return(id->attr);
+}
+
+/************************************************************************
+ * *
+ * Refs *
+ * *
+ ************************************************************************/
+typedef struct xmlRemoveMemo_t
+{
+ xmlListPtr l;
+ xmlAttrPtr ap;
+} xmlRemoveMemo;
+
+typedef xmlRemoveMemo *xmlRemoveMemoPtr;
+
+typedef struct xmlValidateMemo_t
+{
+ xmlValidCtxtPtr ctxt;
+ const xmlChar *name;
+} xmlValidateMemo;
+
+typedef xmlValidateMemo *xmlValidateMemoPtr;
+
+/**
+ * xmlFreeRef:
+ * @lk: A list link
+ *
+ * Deallocate the memory used by a ref definition
+ */
+static void
+xmlFreeRef(xmlLinkPtr lk) {
+ xmlRefPtr ref = (xmlRefPtr)xmlLinkGetData(lk);
+ if (ref == NULL) return;
+ if (ref->value != NULL)
+ xmlFree((xmlChar *)ref->value);
+ if (ref->name != NULL)
+ xmlFree((xmlChar *)ref->name);
+ xmlFree(ref);
+}
+
+/**
+ * xmlFreeRefList:
+ * @list_ref: A list of references.
+ *
+ * Deallocate the memory used by a list of references
+ */
+static void
+xmlFreeRefList(xmlListPtr list_ref) {
+ if (list_ref == NULL) return;
+ xmlListDelete(list_ref);
+}
+
+/**
+ * xmlWalkRemoveRef:
+ * @data: Contents of current link
+ * @user: Value supplied by the user
+ *
+ * Returns 0 to abort the walk or 1 to continue
+ */
+static int
+xmlWalkRemoveRef(const void *data, const void *user)
+{
+ xmlAttrPtr attr0 = ((xmlRefPtr)data)->attr;
+ xmlAttrPtr attr1 = ((xmlRemoveMemoPtr)user)->ap;
+ xmlListPtr ref_list = ((xmlRemoveMemoPtr)user)->l;
+
+ if (attr0 == attr1) { /* Matched: remove and terminate walk */
+ xmlListRemoveFirst(ref_list, (void *)data);
+ return 0;
+ }
+ return 1;
+}
+
+/**
+ * xmlDummyCompare
+ * @data0: Value supplied by the user
+ * @data1: Value supplied by the user
+ *
+ * Do nothing, return 0. Used to create unordered lists.
+ */
+static int
+xmlDummyCompare(const void *data0 ATTRIBUTE_UNUSED,
+ const void *data1 ATTRIBUTE_UNUSED)
+{
+ return (0);
+}
+
+/**
+ * xmlAddRef:
+ * @ctxt: the validation context
+ * @doc: pointer to the document
+ * @value: the value name
+ * @attr: the attribute holding the Ref
+ *
+ * Register a new ref declaration
+ *
+ * Returns NULL if not, otherwise the new xmlRefPtr
+ */
+xmlRefPtr
+xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
+ xmlAttrPtr attr) {
+ xmlRefPtr ret;
+ xmlRefTablePtr table;
+ xmlListPtr ref_list;
+
+ if (doc == NULL) {
+ return(NULL);
+ }
+ if (value == NULL) {
+ return(NULL);
+ }
+ if (attr == NULL) {
+ return(NULL);
+ }
+
+ /*
+ * Create the Ref table if needed.
+ */
+ table = (xmlRefTablePtr) doc->refs;
+ if (table == NULL) {
+ doc->refs = table = xmlHashCreateDict(0, doc->dict);
+ }
+ if (table == NULL) {
+ xmlVErrMemory(ctxt,
+ "xmlAddRef: Table creation failed!\n");
+ return(NULL);
+ }
+
+ ret = (xmlRefPtr) xmlMalloc(sizeof(xmlRef));
+ if (ret == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(NULL);
+ }
+
+ /*
+ * fill the structure.
+ */
+ ret->value = xmlStrdup(value);
+ if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
+ /*
+ * Operating in streaming mode, attr is gonna disapear
+ */
+ ret->name = xmlStrdup(attr->name);
+ ret->attr = NULL;
+ } else {
+ ret->name = NULL;
+ ret->attr = attr;
+ }
+ ret->lineno = xmlGetLineNo(attr->parent);
+
+ /* To add a reference :-
+ * References are maintained as a list of references,
+ * Lookup the entry, if no entry create new nodelist
+ * Add the owning node to the NodeList
+ * Return the ref
+ */
+
+ if (NULL == (ref_list = xmlHashLookup(table, value))) {
+ if (NULL == (ref_list = xmlListCreate(xmlFreeRef, xmlDummyCompare))) {
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlAddRef: Reference list creation failed!\n",
+ NULL);
+ goto failed;
+ }
+ if (xmlHashAddEntry(table, value, ref_list) < 0) {
+ xmlListDelete(ref_list);
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlAddRef: Reference list insertion failed!\n",
+ NULL);
+ goto failed;
+ }
+ }
+ if (xmlListAppend(ref_list, ret) != 0) {
+ xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlAddRef: Reference list insertion failed!\n",
+ NULL);
+ goto failed;
+ }
+ return(ret);
+failed:
+ if (ret != NULL) {
+ if (ret->value != NULL)
+ xmlFree((char *)ret->value);
+ if (ret->name != NULL)
+ xmlFree((char *)ret->name);
+ xmlFree(ret);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlFreeRefTable:
+ * @table: An ref table
+ *
+ * Deallocate the memory used by an Ref hash table.
+ */
+void
+xmlFreeRefTable(xmlRefTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeRefList);
+}
+
+/**
+ * xmlIsRef:
+ * @doc: the document
+ * @elem: the element carrying the attribute
+ * @attr: the attribute
+ *
+ * Determine whether an attribute is of type Ref. In case we have DTD(s)
+ * then this is simple, otherwise we use an heuristic: name Ref (upper
+ * or lowercase).
+ *
+ * Returns 0 or 1 depending on the lookup result
+ */
+int
+xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
+ if (attr == NULL)
+ return(0);
+ if (doc == NULL) {
+ doc = attr->doc;
+ if (doc == NULL) return(0);
+ }
+
+ if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
+ return(0);
+ } else if (doc->type == XML_HTML_DOCUMENT_NODE) {
+ /* TODO @@@ */
+ return(0);
+ } else {
+ xmlAttributePtr attrDecl;
+
+ if (elem == NULL) return(0);
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name, attr->name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset,
+ elem->name, attr->name);
+
+ if ((attrDecl != NULL) &&
+ (attrDecl->atype == XML_ATTRIBUTE_IDREF ||
+ attrDecl->atype == XML_ATTRIBUTE_IDREFS))
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlRemoveRef:
+ * @doc: the document
+ * @attr: the attribute
+ *
+ * Remove the given attribute from the Ref table maintained internally.
+ *
+ * Returns -1 if the lookup failed and 0 otherwise
+ */
+int
+xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
+ xmlListPtr ref_list;
+ xmlRefTablePtr table;
+ xmlChar *ID;
+ xmlRemoveMemo target;
+
+ if (doc == NULL) return(-1);
+ if (attr == NULL) return(-1);
+
+ table = (xmlRefTablePtr) doc->refs;
+ if (table == NULL)
+ return(-1);
+
+ ID = xmlNodeListGetString(doc, attr->children, 1);
+ if (ID == NULL)
+ return(-1);
+
+ ref_list = xmlHashLookup(table, ID);
+ if(ref_list == NULL) {
+ xmlFree(ID);
+ return (-1);
+ }
+
+ /* At this point, ref_list refers to a list of references which
+ * have the same key as the supplied attr. Our list of references
+ * is ordered by reference address and we don't have that information
+ * here to use when removing. We'll have to walk the list and
+ * check for a matching attribute, when we find one stop the walk
+ * and remove the entry.
+ * The list is ordered by reference, so that means we don't have the
+ * key. Passing the list and the reference to the walker means we
+ * will have enough data to be able to remove the entry.
+ */
+ target.l = ref_list;
+ target.ap = attr;
+
+ /* Remove the supplied attr from our list */
+ xmlListWalk(ref_list, xmlWalkRemoveRef, &target);
+
+ /*If the list is empty then remove the list entry in the hash */
+ if (xmlListEmpty(ref_list))
+ xmlHashUpdateEntry(table, ID, NULL, (xmlHashDeallocator)
+ xmlFreeRefList);
+ xmlFree(ID);
+ return(0);
+}
+
+/**
+ * xmlGetRefs:
+ * @doc: pointer to the document
+ * @ID: the ID value
+ *
+ * Find the set of references for the supplied ID.
+ *
+ * Returns NULL if not found, otherwise node set for the ID.
+ */
+xmlListPtr
+xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) {
+ xmlRefTablePtr table;
+
+ if (doc == NULL) {
+ return(NULL);
+ }
+
+ if (ID == NULL) {
+ return(NULL);
+ }
+
+ table = (xmlRefTablePtr) doc->refs;
+ if (table == NULL)
+ return(NULL);
+
+ return (xmlHashLookup(table, ID));
+}
+
+/************************************************************************
+ * *
+ * Routines for validity checking *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlGetDtdElementDesc:
+ * @dtd: a pointer to the DtD to search
+ * @name: the element name
+ *
+ * Search the DTD for the description of this element
+ *
+ * returns the xmlElementPtr if found or NULL
+ */
+
+xmlElementPtr
+xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
+ xmlElementTablePtr table;
+ xmlElementPtr cur;
+ xmlChar *uqname = NULL, *prefix = NULL;
+
+ if ((dtd == NULL) || (name == NULL)) return(NULL);
+ if (dtd->elements == NULL)
+ return(NULL);
+ table = (xmlElementTablePtr) dtd->elements;
+
+ uqname = xmlSplitQName2(name, &prefix);
+ if (uqname != NULL)
+ name = uqname;
+ cur = xmlHashLookup2(table, name, prefix);
+ if (prefix != NULL) xmlFree(prefix);
+ if (uqname != NULL) xmlFree(uqname);
+ return(cur);
+}
+/**
+ * xmlGetDtdElementDesc2:
+ * @dtd: a pointer to the DtD to search
+ * @name: the element name
+ * @create: create an empty description if not found
+ *
+ * Search the DTD for the description of this element
+ *
+ * returns the xmlElementPtr if found or NULL
+ */
+
+static xmlElementPtr
+xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
+ xmlElementTablePtr table;
+ xmlElementPtr cur;
+ xmlChar *uqname = NULL, *prefix = NULL;
+
+ if (dtd == NULL) return(NULL);
+ if (dtd->elements == NULL) {
+ xmlDictPtr dict = NULL;
+
+ if (dtd->doc != NULL)
+ dict = dtd->doc->dict;
+
+ if (!create)
+ return(NULL);
+ /*
+ * Create the Element table if needed.
+ */
+ table = (xmlElementTablePtr) dtd->elements;
+ if (table == NULL) {
+ table = xmlHashCreateDict(0, dict);
+ dtd->elements = (void *) table;
+ }
+ if (table == NULL) {
+ xmlVErrMemory(NULL, "element table allocation failed");
+ return(NULL);
+ }
+ }
+ table = (xmlElementTablePtr) dtd->elements;
+
+ uqname = xmlSplitQName2(name, &prefix);
+ if (uqname != NULL)
+ name = uqname;
+ cur = xmlHashLookup2(table, name, prefix);
+ if ((cur == NULL) && (create)) {
+ cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
+ if (cur == NULL) {
+ xmlVErrMemory(NULL, "malloc failed");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlElement));
+ cur->type = XML_ELEMENT_DECL;
+
+ /*
+ * fill the structure.
+ */
+ cur->name = xmlStrdup(name);
+ cur->prefix = xmlStrdup(prefix);
+ cur->etype = XML_ELEMENT_TYPE_UNDEFINED;
+
+ xmlHashAddEntry2(table, name, prefix, cur);
+ }
+ if (prefix != NULL) xmlFree(prefix);
+ if (uqname != NULL) xmlFree(uqname);
+ return(cur);
+}
+
+/**
+ * xmlGetDtdQElementDesc:
+ * @dtd: a pointer to the DtD to search
+ * @name: the element name
+ * @prefix: the element namespace prefix
+ *
+ * Search the DTD for the description of this element
+ *
+ * returns the xmlElementPtr if found or NULL
+ */
+
+xmlElementPtr
+xmlGetDtdQElementDesc(xmlDtdPtr dtd, const xmlChar *name,
+ const xmlChar *prefix) {
+ xmlElementTablePtr table;
+
+ if (dtd == NULL) return(NULL);
+ if (dtd->elements == NULL) return(NULL);
+ table = (xmlElementTablePtr) dtd->elements;
+
+ return(xmlHashLookup2(table, name, prefix));
+}
+
+/**
+ * xmlGetDtdAttrDesc:
+ * @dtd: a pointer to the DtD to search
+ * @elem: the element name
+ * @name: the attribute name
+ *
+ * Search the DTD for the description of this attribute on
+ * this element.
+ *
+ * returns the xmlAttributePtr if found or NULL
+ */
+
+xmlAttributePtr
+xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) {
+ xmlAttributeTablePtr table;
+ xmlAttributePtr cur;
+ xmlChar *uqname = NULL, *prefix = NULL;
+
+ if (dtd == NULL) return(NULL);
+ if (dtd->attributes == NULL) return(NULL);
+
+ table = (xmlAttributeTablePtr) dtd->attributes;
+ if (table == NULL)
+ return(NULL);
+
+ uqname = xmlSplitQName2(name, &prefix);
+
+ if (uqname != NULL) {
+ cur = xmlHashLookup3(table, uqname, prefix, elem);
+ if (prefix != NULL) xmlFree(prefix);
+ if (uqname != NULL) xmlFree(uqname);
+ } else
+ cur = xmlHashLookup3(table, name, NULL, elem);
+ return(cur);
+}
+
+/**
+ * xmlGetDtdQAttrDesc:
+ * @dtd: a pointer to the DtD to search
+ * @elem: the element name
+ * @name: the attribute name
+ * @prefix: the attribute namespace prefix
+ *
+ * Search the DTD for the description of this qualified attribute on
+ * this element.
+ *
+ * returns the xmlAttributePtr if found or NULL
+ */
+
+xmlAttributePtr
+xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name,
+ const xmlChar *prefix) {
+ xmlAttributeTablePtr table;
+
+ if (dtd == NULL) return(NULL);
+ if (dtd->attributes == NULL) return(NULL);
+ table = (xmlAttributeTablePtr) dtd->attributes;
+
+ return(xmlHashLookup3(table, name, prefix, elem));
+}
+
+/**
+ * xmlGetDtdNotationDesc:
+ * @dtd: a pointer to the DtD to search
+ * @name: the notation name
+ *
+ * Search the DTD for the description of this notation
+ *
+ * returns the xmlNotationPtr if found or NULL
+ */
+
+xmlNotationPtr
+xmlGetDtdNotationDesc(xmlDtdPtr dtd, const xmlChar *name) {
+ xmlNotationTablePtr table;
+
+ if (dtd == NULL) return(NULL);
+ if (dtd->notations == NULL) return(NULL);
+ table = (xmlNotationTablePtr) dtd->notations;
+
+ return(xmlHashLookup(table, name));
+}
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+/**
+ * xmlValidateNotationUse:
+ * @ctxt: the validation context
+ * @doc: the document
+ * @notationName: the notation name to check
+ *
+ * Validate that the given name match a notation declaration.
+ * - [ VC: Notation Declared ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNotationUse(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ const xmlChar *notationName) {
+ xmlNotationPtr notaDecl;
+ if ((doc == NULL) || (doc->intSubset == NULL) ||
+ (notationName == NULL)) return(-1);
+
+ notaDecl = xmlGetDtdNotationDesc(doc->intSubset, notationName);
+ if ((notaDecl == NULL) && (doc->extSubset != NULL))
+ notaDecl = xmlGetDtdNotationDesc(doc->extSubset, notationName);
+
+ if ((notaDecl == NULL) && (ctxt != NULL)) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc, XML_DTD_UNKNOWN_NOTATION,
+ "NOTATION %s is not declared\n",
+ notationName, NULL, NULL);
+ return(0);
+ }
+ return(1);
+}
+#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+/**
+ * xmlIsMixedElement:
+ * @doc: the document
+ * @name: the element name
+ *
+ * Search in the DtDs whether an element accept Mixed content (or ANY)
+ * basically if it is supposed to accept text childs
+ *
+ * returns 0 if no, 1 if yes, and -1 if no element description is available
+ */
+
+int
+xmlIsMixedElement(xmlDocPtr doc, const xmlChar *name) {
+ xmlElementPtr elemDecl;
+
+ if ((doc == NULL) || (doc->intSubset == NULL)) return(-1);
+
+ elemDecl = xmlGetDtdElementDesc(doc->intSubset, name);
+ if ((elemDecl == NULL) && (doc->extSubset != NULL))
+ elemDecl = xmlGetDtdElementDesc(doc->extSubset, name);
+ if (elemDecl == NULL) return(-1);
+ switch (elemDecl->etype) {
+ case XML_ELEMENT_TYPE_UNDEFINED:
+ return(-1);
+ case XML_ELEMENT_TYPE_ELEMENT:
+ return(0);
+ case XML_ELEMENT_TYPE_EMPTY:
+ /*
+ * return 1 for EMPTY since we want VC error to pop up
+ * on <empty> </empty> for example
+ */
+ case XML_ELEMENT_TYPE_ANY:
+ case XML_ELEMENT_TYPE_MIXED:
+ return(1);
+ }
+ return(1);
+}
+
+#ifdef LIBXML_VALID_ENABLED
+
+static int
+xmlIsDocNameStartChar(xmlDocPtr doc, int c) {
+ if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
+ /*
+ * Use the new checks of production [4] [4a] amd [5] of the
+ * Update 5 of XML-1.0
+ */
+ if (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ (c == '_') || (c == ':') ||
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF)))
+ return(1);
+ } else {
+ if (IS_LETTER(c) || (c == '_') || (c == ':'))
+ return(1);
+ }
+ return(0);
+}
+
+static int
+xmlIsDocNameChar(xmlDocPtr doc, int c) {
+ if ((doc == NULL) || (doc->properties & XML_DOC_OLD10) == 0) {
+ /*
+ * Use the new checks of production [4] [4a] amd [5] of the
+ * Update 5 of XML-1.0
+ */
+ if (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ ((c >= '0') && (c <= '9')) || /* !start */
+ (c == '_') || (c == ':') ||
+ (c == '-') || (c == '.') || (c == 0xB7) || /* !start */
+ ((c >= 0xC0) && (c <= 0xD6)) ||
+ ((c >= 0xD8) && (c <= 0xF6)) ||
+ ((c >= 0xF8) && (c <= 0x2FF)) ||
+ ((c >= 0x300) && (c <= 0x36F)) || /* !start */
+ ((c >= 0x370) && (c <= 0x37D)) ||
+ ((c >= 0x37F) && (c <= 0x1FFF)) ||
+ ((c >= 0x200C) && (c <= 0x200D)) ||
+ ((c >= 0x203F) && (c <= 0x2040)) || /* !start */
+ ((c >= 0x2070) && (c <= 0x218F)) ||
+ ((c >= 0x2C00) && (c <= 0x2FEF)) ||
+ ((c >= 0x3001) && (c <= 0xD7FF)) ||
+ ((c >= 0xF900) && (c <= 0xFDCF)) ||
+ ((c >= 0xFDF0) && (c <= 0xFFFD)) ||
+ ((c >= 0x10000) && (c <= 0xEFFFF)))
+ return(1);
+ } else {
+ if ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':') ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlValidateNameValue:
+ * @doc: pointer to the document or NULL
+ * @value: an Name value
+ *
+ * Validate that the given value match Name production
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateNameValueInternal(xmlDocPtr doc, const xmlChar *value) {
+ const xmlChar *cur;
+ int val, len;
+
+ if (value == NULL) return(0);
+ cur = value;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ if (!xmlIsDocNameStartChar(doc, val))
+ return(0);
+
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ if (val != 0) return(0);
+
+ return(1);
+}
+
+/**
+ * xmlValidateNameValue:
+ * @value: an Name value
+ *
+ * Validate that the given value match Name production
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNameValue(const xmlChar *value) {
+ return(xmlValidateNameValueInternal(NULL, value));
+}
+
+/**
+ * xmlValidateNamesValueInternal:
+ * @doc: pointer to the document or NULL
+ * @value: an Names value
+ *
+ * Validate that the given value match Names production
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateNamesValueInternal(xmlDocPtr doc, const xmlChar *value) {
+ const xmlChar *cur;
+ int val, len;
+
+ if (value == NULL) return(0);
+ cur = value;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+
+ if (!xmlIsDocNameStartChar(doc, val))
+ return(0);
+
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ /* Should not test IS_BLANK(val) here -- see erratum E20*/
+ while (val == 0x20) {
+ while (val == 0x20) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ if (!xmlIsDocNameStartChar(doc, val))
+ return(0);
+
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+ }
+
+ if (val != 0) return(0);
+
+ return(1);
+}
+
+/**
+ * xmlValidateNamesValue:
+ * @value: an Names value
+ *
+ * Validate that the given value match Names production
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNamesValue(const xmlChar *value) {
+ return(xmlValidateNamesValueInternal(NULL, value));
+}
+
+/**
+ * xmlValidateNmtokenValueInternal:
+ * @doc: pointer to the document or NULL
+ * @value: an Nmtoken value
+ *
+ * Validate that the given value match Nmtoken production
+ *
+ * [ VC: Name Token ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateNmtokenValueInternal(xmlDocPtr doc, const xmlChar *value) {
+ const xmlChar *cur;
+ int val, len;
+
+ if (value == NULL) return(0);
+ cur = value;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+
+ if (!xmlIsDocNameChar(doc, val))
+ return(0);
+
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ if (val != 0) return(0);
+
+ return(1);
+}
+
+/**
+ * xmlValidateNmtokenValue:
+ * @value: an Nmtoken value
+ *
+ * Validate that the given value match Nmtoken production
+ *
+ * [ VC: Name Token ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNmtokenValue(const xmlChar *value) {
+ return(xmlValidateNmtokenValueInternal(NULL, value));
+}
+
+/**
+ * xmlValidateNmtokensValueInternal:
+ * @doc: pointer to the document or NULL
+ * @value: an Nmtokens value
+ *
+ * Validate that the given value match Nmtokens production
+ *
+ * [ VC: Name Token ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateNmtokensValueInternal(xmlDocPtr doc, const xmlChar *value) {
+ const xmlChar *cur;
+ int val, len;
+
+ if (value == NULL) return(0);
+ cur = value;
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+
+ while (IS_BLANK(val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ if (!xmlIsDocNameChar(doc, val))
+ return(0);
+
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+
+ /* Should not test IS_BLANK(val) here -- see erratum E20*/
+ while (val == 0x20) {
+ while (val == 0x20) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+ if (val == 0) return(1);
+
+ if (!xmlIsDocNameChar(doc, val))
+ return(0);
+
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+
+ while (xmlIsDocNameChar(doc, val)) {
+ val = xmlStringCurrentChar(NULL, cur, &len);
+ cur += len;
+ }
+ }
+
+ if (val != 0) return(0);
+
+ return(1);
+}
+
+/**
+ * xmlValidateNmtokensValue:
+ * @value: an Nmtokens value
+ *
+ * Validate that the given value match Nmtokens production
+ *
+ * [ VC: Name Token ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNmtokensValue(const xmlChar *value) {
+ return(xmlValidateNmtokensValueInternal(NULL, value));
+}
+
+/**
+ * xmlValidateNotationDecl:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @nota: a notation definition
+ *
+ * Try to validate a single notation definition
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - it seems that no validity constraint exists on notation declarations
+ * But this function get called anyway ...
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateNotationDecl(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNotationPtr nota ATTRIBUTE_UNUSED) {
+ int ret = 1;
+
+ return(ret);
+}
+
+/**
+ * xmlValidateAttributeValueInternal:
+ * @doc: the document
+ * @type: an attribute type
+ * @value: an attribute value
+ *
+ * Validate that the given attribute value match the proper production
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateAttributeValueInternal(xmlDocPtr doc, xmlAttributeType type,
+ const xmlChar *value) {
+ switch (type) {
+ case XML_ATTRIBUTE_ENTITIES:
+ case XML_ATTRIBUTE_IDREFS:
+ return(xmlValidateNamesValueInternal(doc, value));
+ case XML_ATTRIBUTE_ENTITY:
+ case XML_ATTRIBUTE_IDREF:
+ case XML_ATTRIBUTE_ID:
+ case XML_ATTRIBUTE_NOTATION:
+ return(xmlValidateNameValueInternal(doc, value));
+ case XML_ATTRIBUTE_NMTOKENS:
+ case XML_ATTRIBUTE_ENUMERATION:
+ return(xmlValidateNmtokensValueInternal(doc, value));
+ case XML_ATTRIBUTE_NMTOKEN:
+ return(xmlValidateNmtokenValueInternal(doc, value));
+ case XML_ATTRIBUTE_CDATA:
+ break;
+ }
+ return(1);
+}
+
+/**
+ * xmlValidateAttributeValue:
+ * @type: an attribute type
+ * @value: an attribute value
+ *
+ * Validate that the given attribute value match the proper production
+ *
+ * [ VC: ID ]
+ * Values of type ID must match the Name production....
+ *
+ * [ VC: IDREF ]
+ * Values of type IDREF must match the Name production, and values
+ * of type IDREFS must match Names ...
+ *
+ * [ VC: Entity Name ]
+ * Values of type ENTITY must match the Name production, values
+ * of type ENTITIES must match Names ...
+ *
+ * [ VC: Name Token ]
+ * Values of type NMTOKEN must match the Nmtoken production; values
+ * of type NMTOKENS must match Nmtokens.
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+int
+xmlValidateAttributeValue(xmlAttributeType type, const xmlChar *value) {
+ return(xmlValidateAttributeValueInternal(NULL, type, value));
+}
+
+/**
+ * xmlValidateAttributeValue2:
+ * @ctxt: the validation context
+ * @doc: the document
+ * @name: the attribute name (used for error reporting only)
+ * @type: the attribute type
+ * @value: the attribute value
+ *
+ * Validate that the given attribute value match a given type.
+ * This typically cannot be done before having finished parsing
+ * the subsets.
+ *
+ * [ VC: IDREF ]
+ * Values of type IDREF must match one of the declared IDs
+ * Values of type IDREFS must match a sequence of the declared IDs
+ * each Name must match the value of an ID attribute on some element
+ * in the XML document; i.e. IDREF values must match the value of
+ * some ID attribute
+ *
+ * [ VC: Entity Name ]
+ * Values of type ENTITY must match one declared entity
+ * Values of type ENTITIES must match a sequence of declared entities
+ *
+ * [ VC: Notation Attributes ]
+ * all notation names in the declaration must be declared.
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+static int
+xmlValidateAttributeValue2(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ const xmlChar *name, xmlAttributeType type, const xmlChar *value) {
+ int ret = 1;
+ switch (type) {
+ case XML_ATTRIBUTE_IDREFS:
+ case XML_ATTRIBUTE_IDREF:
+ case XML_ATTRIBUTE_ID:
+ case XML_ATTRIBUTE_NMTOKENS:
+ case XML_ATTRIBUTE_ENUMERATION:
+ case XML_ATTRIBUTE_NMTOKEN:
+ case XML_ATTRIBUTE_CDATA:
+ break;
+ case XML_ATTRIBUTE_ENTITY: {
+ xmlEntityPtr ent;
+
+ ent = xmlGetDocEntity(doc, value);
+ /* yeah it's a bit messy... */
+ if ((ent == NULL) && (doc->standalone == 1)) {
+ doc->standalone = 0;
+ ent = xmlGetDocEntity(doc, value);
+ }
+ if (ent == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc,
+ XML_DTD_UNKNOWN_ENTITY,
+ "ENTITY attribute %s reference an unknown entity \"%s\"\n",
+ name, value, NULL);
+ ret = 0;
+ } else if (ent->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc,
+ XML_DTD_ENTITY_TYPE,
+ "ENTITY attribute %s reference an entity \"%s\" of wrong type\n",
+ name, value, NULL);
+ ret = 0;
+ }
+ break;
+ }
+ case XML_ATTRIBUTE_ENTITIES: {
+ xmlChar *dup, *nam = NULL, *cur, save;
+ xmlEntityPtr ent;
+
+ dup = xmlStrdup(value);
+ if (dup == NULL)
+ return(0);
+ cur = dup;
+ while (*cur != 0) {
+ nam = cur;
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
+ save = *cur;
+ *cur = 0;
+ ent = xmlGetDocEntity(doc, nam);
+ if (ent == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc,
+ XML_DTD_UNKNOWN_ENTITY,
+ "ENTITIES attribute %s reference an unknown entity \"%s\"\n",
+ name, nam, NULL);
+ ret = 0;
+ } else if (ent->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc,
+ XML_DTD_ENTITY_TYPE,
+ "ENTITIES attribute %s reference an entity \"%s\" of wrong type\n",
+ name, nam, NULL);
+ ret = 0;
+ }
+ if (save == 0)
+ break;
+ *cur = save;
+ while (IS_BLANK_CH(*cur)) cur++;
+ }
+ xmlFree(dup);
+ break;
+ }
+ case XML_ATTRIBUTE_NOTATION: {
+ xmlNotationPtr nota;
+
+ nota = xmlGetDtdNotationDesc(doc->intSubset, value);
+ if ((nota == NULL) && (doc->extSubset != NULL))
+ nota = xmlGetDtdNotationDesc(doc->extSubset, value);
+
+ if (nota == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) doc,
+ XML_DTD_UNKNOWN_NOTATION,
+ "NOTATION attribute %s reference an unknown notation \"%s\"\n",
+ name, value, NULL);
+ ret = 0;
+ }
+ break;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlValidCtxtNormalizeAttributeValue:
+ * @ctxt: the validation context
+ * @doc: the document
+ * @elem: the parent
+ * @name: the attribute name
+ * @value: the attribute value
+ * @ctxt: the validation context or NULL
+ *
+ * Does the validation related extra step of the normalization of attribute
+ * values:
+ *
+ * If the declared value is not CDATA, then the XML processor must further
+ * process the normalized attribute value by discarding any leading and
+ * trailing space (#x20) characters, and by replacing sequences of space
+ * (#x20) characters by single space (#x20) character.
+ *
+ * Also check VC: Standalone Document Declaration in P32, and update
+ * ctxt->valid accordingly
+ *
+ * returns a new normalized string if normalization is needed, NULL otherwise
+ * the caller must free the returned value.
+ */
+
+xmlChar *
+xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem, const xmlChar *name, const xmlChar *value) {
+ xmlChar *ret, *dst;
+ const xmlChar *src;
+ xmlAttributePtr attrDecl = NULL;
+ int extsubset = 0;
+
+ if (doc == NULL) return(NULL);
+ if (elem == NULL) return(NULL);
+ if (name == NULL) return(NULL);
+ if (value == NULL) return(NULL);
+
+ if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
+ if (fullname == NULL)
+ return(NULL);
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname, name);
+ if (attrDecl != NULL)
+ extsubset = 1;
+ }
+ if ((fullname != fn) && (fullname != elem->name))
+ xmlFree(fullname);
+ }
+ if ((attrDecl == NULL) && (doc->intSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name, name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL)) {
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name, name);
+ if (attrDecl != NULL)
+ extsubset = 1;
+ }
+
+ if (attrDecl == NULL)
+ return(NULL);
+ if (attrDecl->atype == XML_ATTRIBUTE_CDATA)
+ return(NULL);
+
+ ret = xmlStrdup(value);
+ if (ret == NULL)
+ return(NULL);
+ src = value;
+ dst = ret;
+ while (*src == 0x20) src++;
+ while (*src != 0) {
+ if (*src == 0x20) {
+ while (*src == 0x20) src++;
+ if (*src != 0)
+ *dst++ = 0x20;
+ } else {
+ *dst++ = *src++;
+ }
+ }
+ *dst = 0;
+ if ((doc->standalone) && (extsubset == 1) && (!xmlStrEqual(value, ret))) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOT_STANDALONE,
+"standalone: %s on %s value had to be normalized based on external subset declaration\n",
+ name, elem->name, NULL);
+ ctxt->valid = 0;
+ }
+ return(ret);
+}
+
+/**
+ * xmlValidNormalizeAttributeValue:
+ * @doc: the document
+ * @elem: the parent
+ * @name: the attribute name
+ * @value: the attribute value
+ *
+ * Does the validation related extra step of the normalization of attribute
+ * values:
+ *
+ * If the declared value is not CDATA, then the XML processor must further
+ * process the normalized attribute value by discarding any leading and
+ * trailing space (#x20) characters, and by replacing sequences of space
+ * (#x20) characters by single space (#x20) character.
+ *
+ * Returns a new normalized string if normalization is needed, NULL otherwise
+ * the caller must free the returned value.
+ */
+
+xmlChar *
+xmlValidNormalizeAttributeValue(xmlDocPtr doc, xmlNodePtr elem,
+ const xmlChar *name, const xmlChar *value) {
+ xmlChar *ret, *dst;
+ const xmlChar *src;
+ xmlAttributePtr attrDecl = NULL;
+
+ if (doc == NULL) return(NULL);
+ if (elem == NULL) return(NULL);
+ if (name == NULL) return(NULL);
+ if (value == NULL) return(NULL);
+
+ if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
+ if (fullname == NULL)
+ return(NULL);
+ if ((fullname != fn) && (fullname != elem->name))
+ xmlFree(fullname);
+ }
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name, name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, elem->name, name);
+
+ if (attrDecl == NULL)
+ return(NULL);
+ if (attrDecl->atype == XML_ATTRIBUTE_CDATA)
+ return(NULL);
+
+ ret = xmlStrdup(value);
+ if (ret == NULL)
+ return(NULL);
+ src = value;
+ dst = ret;
+ while (*src == 0x20) src++;
+ while (*src != 0) {
+ if (*src == 0x20) {
+ while (*src == 0x20) src++;
+ if (*src != 0)
+ *dst++ = 0x20;
+ } else {
+ *dst++ = *src++;
+ }
+ }
+ *dst = 0;
+ return(ret);
+}
+
+static void
+xmlValidateAttributeIdCallback(xmlAttributePtr attr, int *count,
+ const xmlChar* name ATTRIBUTE_UNUSED) {
+ if (attr->atype == XML_ATTRIBUTE_ID) (*count)++;
+}
+
+/**
+ * xmlValidateAttributeDecl:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @attr: an attribute definition
+ *
+ * Try to validate a single attribute definition
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: Attribute Default Legal ]
+ * - [ VC: Enumeration ]
+ * - [ VC: ID Attribute Default ]
+ *
+ * The ID/IDREF uniqueness and matching are done separately
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlAttributePtr attr) {
+ int ret = 1;
+ int val;
+ CHECK_DTD;
+ if(attr == NULL) return(1);
+
+ /* Attribute Default Legal */
+ /* Enumeration */
+ if (attr->defaultValue != NULL) {
+ val = xmlValidateAttributeValueInternal(doc, attr->atype,
+ attr->defaultValue);
+ if (val == 0) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ATTRIBUTE_DEFAULT,
+ "Syntax of default value for attribute %s of %s is not valid\n",
+ attr->name, attr->elem, NULL);
+ }
+ ret &= val;
+ }
+
+ /* ID Attribute Default */
+ if ((attr->atype == XML_ATTRIBUTE_ID)&&
+ (attr->def != XML_ATTRIBUTE_IMPLIED) &&
+ (attr->def != XML_ATTRIBUTE_REQUIRED)) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ID_FIXED,
+ "ID attribute %s of %s is not valid must be #IMPLIED or #REQUIRED\n",
+ attr->name, attr->elem, NULL);
+ ret = 0;
+ }
+
+ /* One ID per Element Type */
+ if (attr->atype == XML_ATTRIBUTE_ID) {
+ int nbId;
+
+ /* the trick is that we parse DtD as their own internal subset */
+ xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset,
+ attr->elem);
+ if (elem != NULL) {
+ nbId = xmlScanIDAttributeDecl(NULL, elem, 0);
+ } else {
+ xmlAttributeTablePtr table;
+
+ /*
+ * The attribute may be declared in the internal subset and the
+ * element in the external subset.
+ */
+ nbId = 0;
+ if (doc->intSubset != NULL) {
+ table = (xmlAttributeTablePtr) doc->intSubset->attributes;
+ xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
+ xmlValidateAttributeIdCallback, &nbId);
+ }
+ }
+ if (nbId > 1) {
+
+ xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
+ "Element %s has %d ID attribute defined in the internal subset : %s\n",
+ attr->elem, nbId, attr->name);
+ } else if (doc->extSubset != NULL) {
+ int extId = 0;
+ elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem);
+ if (elem != NULL) {
+ extId = xmlScanIDAttributeDecl(NULL, elem, 0);
+ }
+ if (extId > 1) {
+ xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
+ "Element %s has %d ID attribute defined in the external subset : %s\n",
+ attr->elem, extId, attr->name);
+ } else if (extId + nbId > 1) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
+"Element %s has ID attributes defined in the internal and external subset : %s\n",
+ attr->elem, attr->name, NULL);
+ }
+ }
+ }
+
+ /* Validity Constraint: Enumeration */
+ if ((attr->defaultValue != NULL) && (attr->tree != NULL)) {
+ xmlEnumerationPtr tree = attr->tree;
+ while (tree != NULL) {
+ if (xmlStrEqual(tree->name, attr->defaultValue)) break;
+ tree = tree->next;
+ }
+ if (tree == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ATTRIBUTE_VALUE,
+"Default value \"%s\" for attribute %s of %s is not among the enumerated set\n",
+ attr->defaultValue, attr->name, attr->elem);
+ ret = 0;
+ }
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlValidateElementDecl:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element definition
+ *
+ * Try to validate a single element definition
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: One ID per Element Type ]
+ * - [ VC: No Duplicate Types ]
+ * - [ VC: Unique Element Type Declaration ]
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlElementPtr elem) {
+ int ret = 1;
+ xmlElementPtr tst;
+
+ CHECK_DTD;
+
+ if (elem == NULL) return(1);
+
+#if 0
+#ifdef LIBXML_REGEXP_ENABLED
+ /* Build the regexp associated to the content model */
+ ret = xmlValidBuildContentModel(ctxt, elem);
+#endif
+#endif
+
+ /* No Duplicate Types */
+ if (elem->etype == XML_ELEMENT_TYPE_MIXED) {
+ xmlElementContentPtr cur, next;
+ const xmlChar *name;
+
+ cur = elem->content;
+ while (cur != NULL) {
+ if (cur->type != XML_ELEMENT_CONTENT_OR) break;
+ if (cur->c1 == NULL) break;
+ if (cur->c1->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ name = cur->c1->name;
+ next = cur->c2;
+ while (next != NULL) {
+ if (next->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if ((xmlStrEqual(next->name, name)) &&
+ (xmlStrEqual(next->prefix, cur->c1->prefix))) {
+ if (cur->c1->prefix == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR,
+ "Definition of %s has duplicate references of %s\n",
+ elem->name, name, NULL);
+ } else {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR,
+ "Definition of %s has duplicate references of %s:%s\n",
+ elem->name, cur->c1->prefix, name);
+ }
+ ret = 0;
+ }
+ break;
+ }
+ if (next->c1 == NULL) break;
+ if (next->c1->type != XML_ELEMENT_CONTENT_ELEMENT) break;
+ if ((xmlStrEqual(next->c1->name, name)) &&
+ (xmlStrEqual(next->c1->prefix, cur->c1->prefix))) {
+ if (cur->c1->prefix == NULL) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR,
+ "Definition of %s has duplicate references to %s\n",
+ elem->name, name, NULL);
+ } else {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_CONTENT_ERROR,
+ "Definition of %s has duplicate references to %s:%s\n",
+ elem->name, cur->c1->prefix, name);
+ }
+ ret = 0;
+ }
+ next = next->c2;
+ }
+ }
+ cur = cur->c2;
+ }
+ }
+
+ /* VC: Unique Element Type Declaration */
+ tst = xmlGetDtdElementDesc(doc->intSubset, elem->name);
+ if ((tst != NULL ) && (tst != elem) &&
+ ((tst->prefix == elem->prefix) ||
+ (xmlStrEqual(tst->prefix, elem->prefix))) &&
+ (tst->etype != XML_ELEMENT_TYPE_UNDEFINED)) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_ELEM_REDEFINED,
+ "Redefinition of element %s\n",
+ elem->name, NULL, NULL);
+ ret = 0;
+ }
+ tst = xmlGetDtdElementDesc(doc->extSubset, elem->name);
+ if ((tst != NULL ) && (tst != elem) &&
+ ((tst->prefix == elem->prefix) ||
+ (xmlStrEqual(tst->prefix, elem->prefix))) &&
+ (tst->etype != XML_ELEMENT_TYPE_UNDEFINED)) {
+ xmlErrValidNode(ctxt, (xmlNodePtr) elem, XML_DTD_ELEM_REDEFINED,
+ "Redefinition of element %s\n",
+ elem->name, NULL, NULL);
+ ret = 0;
+ }
+ /* One ID per Element Type
+ * already done when registering the attribute
+ if (xmlScanIDAttributeDecl(ctxt, elem) > 1) {
+ ret = 0;
+ } */
+ return(ret);
+}
+
+/**
+ * xmlValidateOneAttribute:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ * @attr: an attribute instance
+ * @value: the attribute value (without entities processing)
+ *
+ * Try to validate a single attribute for an element
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: Attribute Value Type ]
+ * - [ VC: Fixed Attribute Default ]
+ * - [ VC: Entity Name ]
+ * - [ VC: Name Token ]
+ * - [ VC: ID ]
+ * - [ VC: IDREF ]
+ * - [ VC: Entity Name ]
+ * - [ VC: Notation Attributes ]
+ *
+ * The ID/IDREF uniqueness and matching are done separately
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value)
+{
+ xmlAttributePtr attrDecl = NULL;
+ int val;
+ int ret = 1;
+
+ CHECK_DTD;
+ if ((elem == NULL) || (elem->name == NULL)) return(0);
+ if ((attr == NULL) || (attr->name == NULL)) return(0);
+
+ if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
+ if (fullname == NULL)
+ return(0);
+ if (attr->ns != NULL) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, fullname,
+ attr->name, attr->ns->prefix);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, fullname,
+ attr->name, attr->ns->prefix);
+ } else {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, attr->name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset,
+ fullname, attr->name);
+ }
+ if ((fullname != fn) && (fullname != elem->name))
+ xmlFree(fullname);
+ }
+ if (attrDecl == NULL) {
+ if (attr->ns != NULL) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, elem->name,
+ attr->name, attr->ns->prefix);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, elem->name,
+ attr->name, attr->ns->prefix);
+ } else {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset,
+ elem->name, attr->name);
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset,
+ elem->name, attr->name);
+ }
+ }
+
+
+ /* Validity Constraint: Attribute Value Type */
+ if (attrDecl == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_ATTRIBUTE,
+ "No declaration for attribute %s of element %s\n",
+ attr->name, elem->name, NULL);
+ return(0);
+ }
+ attr->atype = attrDecl->atype;
+
+ val = xmlValidateAttributeValueInternal(doc, attrDecl->atype, value);
+ if (val == 0) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_VALUE,
+ "Syntax of value for attribute %s of %s is not valid\n",
+ attr->name, elem->name, NULL);
+ ret = 0;
+ }
+
+ /* Validity constraint: Fixed Attribute Default */
+ if (attrDecl->def == XML_ATTRIBUTE_FIXED) {
+ if (!xmlStrEqual(value, attrDecl->defaultValue)) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_DEFAULT,
+ "Value for attribute %s of %s is different from default \"%s\"\n",
+ attr->name, elem->name, attrDecl->defaultValue);
+ ret = 0;
+ }
+ }
+
+ /* Validity Constraint: ID uniqueness */
+ if (attrDecl->atype == XML_ATTRIBUTE_ID) {
+ if (xmlAddID(ctxt, doc, value, attr) == NULL)
+ ret = 0;
+ }
+
+ if ((attrDecl->atype == XML_ATTRIBUTE_IDREF) ||
+ (attrDecl->atype == XML_ATTRIBUTE_IDREFS)) {
+ if (xmlAddRef(ctxt, doc, value, attr) == NULL)
+ ret = 0;
+ }
+
+ /* Validity Constraint: Notation Attributes */
+ if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
+ xmlEnumerationPtr tree = attrDecl->tree;
+ xmlNotationPtr nota;
+
+ /* First check that the given NOTATION was declared */
+ nota = xmlGetDtdNotationDesc(doc->intSubset, value);
+ if (nota == NULL)
+ nota = xmlGetDtdNotationDesc(doc->extSubset, value);
+
+ if (nota == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_NOTATION,
+ "Value \"%s\" for attribute %s of %s is not a declared Notation\n",
+ value, attr->name, elem->name);
+ ret = 0;
+ }
+
+ /* Second, verify that it's among the list */
+ while (tree != NULL) {
+ if (xmlStrEqual(tree->name, value)) break;
+ tree = tree->next;
+ }
+ if (tree == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOTATION_VALUE,
+"Value \"%s\" for attribute %s of %s is not among the enumerated notations\n",
+ value, attr->name, elem->name);
+ ret = 0;
+ }
+ }
+
+ /* Validity Constraint: Enumeration */
+ if (attrDecl->atype == XML_ATTRIBUTE_ENUMERATION) {
+ xmlEnumerationPtr tree = attrDecl->tree;
+ while (tree != NULL) {
+ if (xmlStrEqual(tree->name, value)) break;
+ tree = tree->next;
+ }
+ if (tree == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_VALUE,
+ "Value \"%s\" for attribute %s of %s is not among the enumerated set\n",
+ value, attr->name, elem->name);
+ ret = 0;
+ }
+ }
+
+ /* Fixed Attribute Default */
+ if ((attrDecl->def == XML_ATTRIBUTE_FIXED) &&
+ (!xmlStrEqual(attrDecl->defaultValue, value))) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_VALUE,
+ "Value for attribute %s of %s must be \"%s\"\n",
+ attr->name, elem->name, attrDecl->defaultValue);
+ ret = 0;
+ }
+
+ /* Extra check for the attribute value */
+ ret &= xmlValidateAttributeValue2(ctxt, doc, attr->name,
+ attrDecl->atype, value);
+
+ return(ret);
+}
+
+/**
+ * xmlValidateOneNamespace:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ * @prefix: the namespace prefix
+ * @ns: an namespace declaration instance
+ * @value: the attribute value (without entities processing)
+ *
+ * Try to validate a single namespace declaration for an element
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: Attribute Value Type ]
+ * - [ VC: Fixed Attribute Default ]
+ * - [ VC: Entity Name ]
+ * - [ VC: Name Token ]
+ * - [ VC: ID ]
+ * - [ VC: IDREF ]
+ * - [ VC: Entity Name ]
+ * - [ VC: Notation Attributes ]
+ *
+ * The ID/IDREF uniqueness and matching are done separately
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateOneNamespace(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
+ /* xmlElementPtr elemDecl; */
+ xmlAttributePtr attrDecl = NULL;
+ int val;
+ int ret = 1;
+
+ CHECK_DTD;
+ if ((elem == NULL) || (elem->name == NULL)) return(0);
+ if ((ns == NULL) || (ns->href == NULL)) return(0);
+
+ if (prefix != NULL) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(elem->name, prefix, fn, 50);
+ if (fullname == NULL) {
+ xmlVErrMemory(ctxt, "Validating namespace");
+ return(0);
+ }
+ if (ns->prefix != NULL) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, fullname,
+ ns->prefix, BAD_CAST "xmlns");
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, fullname,
+ ns->prefix, BAD_CAST "xmlns");
+ } else {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname,
+ BAD_CAST "xmlns");
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset, fullname,
+ BAD_CAST "xmlns");
+ }
+ if ((fullname != fn) && (fullname != elem->name))
+ xmlFree(fullname);
+ }
+ if (attrDecl == NULL) {
+ if (ns->prefix != NULL) {
+ attrDecl = xmlGetDtdQAttrDesc(doc->intSubset, elem->name,
+ ns->prefix, BAD_CAST "xmlns");
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdQAttrDesc(doc->extSubset, elem->name,
+ ns->prefix, BAD_CAST "xmlns");
+ } else {
+ attrDecl = xmlGetDtdAttrDesc(doc->intSubset,
+ elem->name, BAD_CAST "xmlns");
+ if ((attrDecl == NULL) && (doc->extSubset != NULL))
+ attrDecl = xmlGetDtdAttrDesc(doc->extSubset,
+ elem->name, BAD_CAST "xmlns");
+ }
+ }
+
+
+ /* Validity Constraint: Attribute Value Type */
+ if (attrDecl == NULL) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_ATTRIBUTE,
+ "No declaration for attribute xmlns:%s of element %s\n",
+ ns->prefix, elem->name, NULL);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_ATTRIBUTE,
+ "No declaration for attribute xmlns of element %s\n",
+ elem->name, NULL, NULL);
+ }
+ return(0);
+ }
+
+ val = xmlValidateAttributeValueInternal(doc, attrDecl->atype, value);
+ if (val == 0) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_INVALID_DEFAULT,
+ "Syntax of value for attribute xmlns:%s of %s is not valid\n",
+ ns->prefix, elem->name, NULL);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_INVALID_DEFAULT,
+ "Syntax of value for attribute xmlns of %s is not valid\n",
+ elem->name, NULL, NULL);
+ }
+ ret = 0;
+ }
+
+ /* Validity constraint: Fixed Attribute Default */
+ if (attrDecl->def == XML_ATTRIBUTE_FIXED) {
+ if (!xmlStrEqual(value, attrDecl->defaultValue)) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_DEFAULT,
+ "Value for attribute xmlns:%s of %s is different from default \"%s\"\n",
+ ns->prefix, elem->name, attrDecl->defaultValue);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_DEFAULT,
+ "Value for attribute xmlns of %s is different from default \"%s\"\n",
+ elem->name, attrDecl->defaultValue, NULL);
+ }
+ ret = 0;
+ }
+ }
+
+ /* Validity Constraint: ID uniqueness */
+ if (attrDecl->atype == XML_ATTRIBUTE_ID) {
+ if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
+ ret = 0;
+ }
+
+ if ((attrDecl->atype == XML_ATTRIBUTE_IDREF) ||
+ (attrDecl->atype == XML_ATTRIBUTE_IDREFS)) {
+ if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
+ ret = 0;
+ }
+
+ /* Validity Constraint: Notation Attributes */
+ if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
+ xmlEnumerationPtr tree = attrDecl->tree;
+ xmlNotationPtr nota;
+
+ /* First check that the given NOTATION was declared */
+ nota = xmlGetDtdNotationDesc(doc->intSubset, value);
+ if (nota == NULL)
+ nota = xmlGetDtdNotationDesc(doc->extSubset, value);
+
+ if (nota == NULL) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_NOTATION,
+ "Value \"%s\" for attribute xmlns:%s of %s is not a declared Notation\n",
+ value, ns->prefix, elem->name);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_NOTATION,
+ "Value \"%s\" for attribute xmlns of %s is not a declared Notation\n",
+ value, elem->name, NULL);
+ }
+ ret = 0;
+ }
+
+ /* Second, verify that it's among the list */
+ while (tree != NULL) {
+ if (xmlStrEqual(tree->name, value)) break;
+ tree = tree->next;
+ }
+ if (tree == NULL) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOTATION_VALUE,
+"Value \"%s\" for attribute xmlns:%s of %s is not among the enumerated notations\n",
+ value, ns->prefix, elem->name);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOTATION_VALUE,
+"Value \"%s\" for attribute xmlns of %s is not among the enumerated notations\n",
+ value, elem->name, NULL);
+ }
+ ret = 0;
+ }
+ }
+
+ /* Validity Constraint: Enumeration */
+ if (attrDecl->atype == XML_ATTRIBUTE_ENUMERATION) {
+ xmlEnumerationPtr tree = attrDecl->tree;
+ while (tree != NULL) {
+ if (xmlStrEqual(tree->name, value)) break;
+ tree = tree->next;
+ }
+ if (tree == NULL) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_VALUE,
+"Value \"%s\" for attribute xmlns:%s of %s is not among the enumerated set\n",
+ value, ns->prefix, elem->name);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ATTRIBUTE_VALUE,
+"Value \"%s\" for attribute xmlns of %s is not among the enumerated set\n",
+ value, elem->name, NULL);
+ }
+ ret = 0;
+ }
+ }
+
+ /* Fixed Attribute Default */
+ if ((attrDecl->def == XML_ATTRIBUTE_FIXED) &&
+ (!xmlStrEqual(attrDecl->defaultValue, value))) {
+ if (ns->prefix != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ELEM_NAMESPACE,
+ "Value for attribute xmlns:%s of %s must be \"%s\"\n",
+ ns->prefix, elem->name, attrDecl->defaultValue);
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ELEM_NAMESPACE,
+ "Value for attribute xmlns of %s must be \"%s\"\n",
+ elem->name, attrDecl->defaultValue, NULL);
+ }
+ ret = 0;
+ }
+
+ /* Extra check for the attribute value */
+ if (ns->prefix != NULL) {
+ ret &= xmlValidateAttributeValue2(ctxt, doc, ns->prefix,
+ attrDecl->atype, value);
+ } else {
+ ret &= xmlValidateAttributeValue2(ctxt, doc, BAD_CAST "xmlns",
+ attrDecl->atype, value);
+ }
+
+ return(ret);
+}
+
+#ifndef LIBXML_REGEXP_ENABLED
+/**
+ * xmlValidateSkipIgnorable:
+ * @ctxt: the validation context
+ * @child: the child list
+ *
+ * Skip ignorable elements w.r.t. the validation process
+ *
+ * returns the first element to consider for validation of the content model
+ */
+
+static xmlNodePtr
+xmlValidateSkipIgnorable(xmlNodePtr child) {
+ while (child != NULL) {
+ switch (child->type) {
+ /* These things are ignored (skipped) during validation. */
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ child = child->next;
+ break;
+ case XML_TEXT_NODE:
+ if (xmlIsBlankNode(child))
+ child = child->next;
+ else
+ return(child);
+ break;
+ /* keep current node */
+ default:
+ return(child);
+ }
+ }
+ return(child);
+}
+
+/**
+ * xmlValidateElementType:
+ * @ctxt: the validation context
+ *
+ * Try to validate the content model of an element internal function
+ *
+ * returns 1 if valid or 0 ,-1 in case of error, -2 if an entity
+ * reference is found and -3 if the validation succeeded but
+ * the content model is not determinist.
+ */
+
+static int
+xmlValidateElementType(xmlValidCtxtPtr ctxt) {
+ int ret = -1;
+ int determinist = 1;
+
+ NODE = xmlValidateSkipIgnorable(NODE);
+ if ((NODE == NULL) && (CONT == NULL))
+ return(1);
+ if ((NODE == NULL) &&
+ ((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
+ (CONT->ocur == XML_ELEMENT_CONTENT_OPT))) {
+ return(1);
+ }
+ if (CONT == NULL) return(-1);
+ if ((NODE != NULL) && (NODE->type == XML_ENTITY_REF_NODE))
+ return(-2);
+
+ /*
+ * We arrive here when more states need to be examined
+ */
+cont:
+
+ /*
+ * We just recovered from a rollback generated by a possible
+ * epsilon transition, go directly to the analysis phase
+ */
+ if (STATE == ROLLBACK_PARENT) {
+ DEBUG_VALID_MSG("restored parent branch");
+ DEBUG_VALID_STATE(NODE, CONT)
+ ret = 1;
+ goto analyze;
+ }
+
+ DEBUG_VALID_STATE(NODE, CONT)
+ /*
+ * we may have to save a backup state here. This is the equivalent
+ * of handling epsilon transition in NFAs.
+ */
+ if ((CONT != NULL) &&
+ ((CONT->parent == NULL) ||
+ (CONT->parent->type != XML_ELEMENT_CONTENT_OR)) &&
+ ((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
+ (CONT->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ ((CONT->ocur == XML_ELEMENT_CONTENT_PLUS) && (OCCURRENCE)))) {
+ DEBUG_VALID_MSG("saving parent branch");
+ if (vstateVPush(ctxt, CONT, NODE, DEPTH, OCCURS, ROLLBACK_PARENT) < 0)
+ return(0);
+ }
+
+
+ /*
+ * Check first if the content matches
+ */
+ switch (CONT->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ if (NODE == NULL) {
+ DEBUG_VALID_MSG("pcdata failed no node");
+ ret = 0;
+ break;
+ }
+ if (NODE->type == XML_TEXT_NODE) {
+ DEBUG_VALID_MSG("pcdata found, skip to next");
+ /*
+ * go to next element in the content model
+ * skipping ignorable elems
+ */
+ do {
+ NODE = NODE->next;
+ NODE = xmlValidateSkipIgnorable(NODE);
+ if ((NODE != NULL) &&
+ (NODE->type == XML_ENTITY_REF_NODE))
+ return(-2);
+ } while ((NODE != NULL) &&
+ ((NODE->type != XML_ELEMENT_NODE) &&
+ (NODE->type != XML_TEXT_NODE) &&
+ (NODE->type != XML_CDATA_SECTION_NODE)));
+ ret = 1;
+ break;
+ } else {
+ DEBUG_VALID_MSG("pcdata failed");
+ ret = 0;
+ break;
+ }
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ if (NODE == NULL) {
+ DEBUG_VALID_MSG("element failed no node");
+ ret = 0;
+ break;
+ }
+ ret = ((NODE->type == XML_ELEMENT_NODE) &&
+ (xmlStrEqual(NODE->name, CONT->name)));
+ if (ret == 1) {
+ if ((NODE->ns == NULL) || (NODE->ns->prefix == NULL)) {
+ ret = (CONT->prefix == NULL);
+ } else if (CONT->prefix == NULL) {
+ ret = 0;
+ } else {
+ ret = xmlStrEqual(NODE->ns->prefix, CONT->prefix);
+ }
+ }
+ if (ret == 1) {
+ DEBUG_VALID_MSG("element found, skip to next");
+ /*
+ * go to next element in the content model
+ * skipping ignorable elems
+ */
+ do {
+ NODE = NODE->next;
+ NODE = xmlValidateSkipIgnorable(NODE);
+ if ((NODE != NULL) &&
+ (NODE->type == XML_ENTITY_REF_NODE))
+ return(-2);
+ } while ((NODE != NULL) &&
+ ((NODE->type != XML_ELEMENT_NODE) &&
+ (NODE->type != XML_TEXT_NODE) &&
+ (NODE->type != XML_CDATA_SECTION_NODE)));
+ } else {
+ DEBUG_VALID_MSG("element failed");
+ ret = 0;
+ break;
+ }
+ break;
+ case XML_ELEMENT_CONTENT_OR:
+ /*
+ * Small optimization.
+ */
+ if (CONT->c1->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if ((NODE == NULL) ||
+ (!xmlStrEqual(NODE->name, CONT->c1->name))) {
+ DEPTH++;
+ CONT = CONT->c2;
+ goto cont;
+ }
+ if ((NODE->ns == NULL) || (NODE->ns->prefix == NULL)) {
+ ret = (CONT->c1->prefix == NULL);
+ } else if (CONT->c1->prefix == NULL) {
+ ret = 0;
+ } else {
+ ret = xmlStrEqual(NODE->ns->prefix, CONT->c1->prefix);
+ }
+ if (ret == 0) {
+ DEPTH++;
+ CONT = CONT->c2;
+ goto cont;
+ }
+ }
+
+ /*
+ * save the second branch 'or' branch
+ */
+ DEBUG_VALID_MSG("saving 'or' branch");
+ if (vstateVPush(ctxt, CONT->c2, NODE, (unsigned char)(DEPTH + 1),
+ OCCURS, ROLLBACK_OR) < 0)
+ return(-1);
+ DEPTH++;
+ CONT = CONT->c1;
+ goto cont;
+ case XML_ELEMENT_CONTENT_SEQ:
+ /*
+ * Small optimization.
+ */
+ if ((CONT->c1->type == XML_ELEMENT_CONTENT_ELEMENT) &&
+ ((CONT->c1->ocur == XML_ELEMENT_CONTENT_OPT) ||
+ (CONT->c1->ocur == XML_ELEMENT_CONTENT_MULT))) {
+ if ((NODE == NULL) ||
+ (!xmlStrEqual(NODE->name, CONT->c1->name))) {
+ DEPTH++;
+ CONT = CONT->c2;
+ goto cont;
+ }
+ if ((NODE->ns == NULL) || (NODE->ns->prefix == NULL)) {
+ ret = (CONT->c1->prefix == NULL);
+ } else if (CONT->c1->prefix == NULL) {
+ ret = 0;
+ } else {
+ ret = xmlStrEqual(NODE->ns->prefix, CONT->c1->prefix);
+ }
+ if (ret == 0) {
+ DEPTH++;
+ CONT = CONT->c2;
+ goto cont;
+ }
+ }
+ DEPTH++;
+ CONT = CONT->c1;
+ goto cont;
+ }
+
+ /*
+ * At this point handle going up in the tree
+ */
+ if (ret == -1) {
+ DEBUG_VALID_MSG("error found returning");
+ return(ret);
+ }
+analyze:
+ while (CONT != NULL) {
+ /*
+ * First do the analysis depending on the occurrence model at
+ * this level.
+ */
+ if (ret == 0) {
+ switch (CONT->ocur) {
+ xmlNodePtr cur;
+
+ case XML_ELEMENT_CONTENT_ONCE:
+ cur = ctxt->vstate->node;
+ DEBUG_VALID_MSG("Once branch failed, rollback");
+ if (vstateVPop(ctxt) < 0 ) {
+ DEBUG_VALID_MSG("exhaustion, failed");
+ return(0);
+ }
+ if (cur != ctxt->vstate->node)
+ determinist = -3;
+ goto cont;
+ case XML_ELEMENT_CONTENT_PLUS:
+ if (OCCURRENCE == 0) {
+ cur = ctxt->vstate->node;
+ DEBUG_VALID_MSG("Plus branch failed, rollback");
+ if (vstateVPop(ctxt) < 0 ) {
+ DEBUG_VALID_MSG("exhaustion, failed");
+ return(0);
+ }
+ if (cur != ctxt->vstate->node)
+ determinist = -3;
+ goto cont;
+ }
+ DEBUG_VALID_MSG("Plus branch found");
+ ret = 1;
+ break;
+ case XML_ELEMENT_CONTENT_MULT:
+#ifdef DEBUG_VALID_ALGO
+ if (OCCURRENCE == 0) {
+ DEBUG_VALID_MSG("Mult branch failed");
+ } else {
+ DEBUG_VALID_MSG("Mult branch found");
+ }
+#endif
+ ret = 1;
+ break;
+ case XML_ELEMENT_CONTENT_OPT:
+ DEBUG_VALID_MSG("Option branch failed");
+ ret = 1;
+ break;
+ }
+ } else {
+ switch (CONT->ocur) {
+ case XML_ELEMENT_CONTENT_OPT:
+ DEBUG_VALID_MSG("Option branch succeeded");
+ ret = 1;
+ break;
+ case XML_ELEMENT_CONTENT_ONCE:
+ DEBUG_VALID_MSG("Once branch succeeded");
+ ret = 1;
+ break;
+ case XML_ELEMENT_CONTENT_PLUS:
+ if (STATE == ROLLBACK_PARENT) {
+ DEBUG_VALID_MSG("Plus branch rollback");
+ ret = 1;
+ break;
+ }
+ if (NODE == NULL) {
+ DEBUG_VALID_MSG("Plus branch exhausted");
+ ret = 1;
+ break;
+ }
+ DEBUG_VALID_MSG("Plus branch succeeded, continuing");
+ SET_OCCURRENCE;
+ goto cont;
+ case XML_ELEMENT_CONTENT_MULT:
+ if (STATE == ROLLBACK_PARENT) {
+ DEBUG_VALID_MSG("Mult branch rollback");
+ ret = 1;
+ break;
+ }
+ if (NODE == NULL) {
+ DEBUG_VALID_MSG("Mult branch exhausted");
+ ret = 1;
+ break;
+ }
+ DEBUG_VALID_MSG("Mult branch succeeded, continuing");
+ /* SET_OCCURRENCE; */
+ goto cont;
+ }
+ }
+ STATE = 0;
+
+ /*
+ * Then act accordingly at the parent level
+ */
+ RESET_OCCURRENCE;
+ if (CONT->parent == NULL)
+ break;
+
+ switch (CONT->parent->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ DEBUG_VALID_MSG("Error: parent pcdata");
+ return(-1);
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ DEBUG_VALID_MSG("Error: parent element");
+ return(-1);
+ case XML_ELEMENT_CONTENT_OR:
+ if (ret == 1) {
+ DEBUG_VALID_MSG("Or succeeded");
+ CONT = CONT->parent;
+ DEPTH--;
+ } else {
+ DEBUG_VALID_MSG("Or failed");
+ CONT = CONT->parent;
+ DEPTH--;
+ }
+ break;
+ case XML_ELEMENT_CONTENT_SEQ:
+ if (ret == 0) {
+ DEBUG_VALID_MSG("Sequence failed");
+ CONT = CONT->parent;
+ DEPTH--;
+ } else if (CONT == CONT->parent->c1) {
+ DEBUG_VALID_MSG("Sequence testing 2nd branch");
+ CONT = CONT->parent->c2;
+ goto cont;
+ } else {
+ DEBUG_VALID_MSG("Sequence succeeded");
+ CONT = CONT->parent;
+ DEPTH--;
+ }
+ }
+ }
+ if (NODE != NULL) {
+ xmlNodePtr cur;
+
+ cur = ctxt->vstate->node;
+ DEBUG_VALID_MSG("Failed, remaining input, rollback");
+ if (vstateVPop(ctxt) < 0 ) {
+ DEBUG_VALID_MSG("exhaustion, failed");
+ return(0);
+ }
+ if (cur != ctxt->vstate->node)
+ determinist = -3;
+ goto cont;
+ }
+ if (ret == 0) {
+ xmlNodePtr cur;
+
+ cur = ctxt->vstate->node;
+ DEBUG_VALID_MSG("Failure, rollback");
+ if (vstateVPop(ctxt) < 0 ) {
+ DEBUG_VALID_MSG("exhaustion, failed");
+ return(0);
+ }
+ if (cur != ctxt->vstate->node)
+ determinist = -3;
+ goto cont;
+ }
+ return(determinist);
+}
+#endif
+
+/**
+ * xmlSnprintfElements:
+ * @buf: an output buffer
+ * @size: the size of the buffer
+ * @content: An element
+ * @glob: 1 if one must print the englobing parenthesis, 0 otherwise
+ *
+ * This will dump the list of elements to the buffer
+ * Intended just for the debug routine
+ */
+static void
+xmlSnprintfElements(char *buf, int size, xmlNodePtr node, int glob) {
+ xmlNodePtr cur;
+ int len;
+
+ if (node == NULL) return;
+ if (glob) strcat(buf, "(");
+ cur = node;
+ while (cur != NULL) {
+ len = strlen(buf);
+ if (size - len < 50) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ if (size - len < xmlStrlen(cur->ns->prefix) + 10) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ strcat(buf, (char *) cur->ns->prefix);
+ strcat(buf, ":");
+ }
+ if (size - len < xmlStrlen(cur->name) + 10) {
+ if ((size - len > 4) && (buf[len - 1] != '.'))
+ strcat(buf, " ...");
+ return;
+ }
+ strcat(buf, (char *) cur->name);
+ if (cur->next != NULL)
+ strcat(buf, " ");
+ break;
+ case XML_TEXT_NODE:
+ if (xmlIsBlankNode(cur))
+ break;
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ strcat(buf, "CDATA");
+ if (cur->next != NULL)
+ strcat(buf, " ");
+ break;
+ case XML_ATTRIBUTE_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_NAMESPACE_DECL:
+ strcat(buf, "???");
+ if (cur->next != NULL)
+ strcat(buf, " ");
+ break;
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_DTD_NODE:
+ case XML_COMMENT_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ break;
+ }
+ cur = cur->next;
+ }
+ if (glob) strcat(buf, ")");
+}
+
+/**
+ * xmlValidateElementContent:
+ * @ctxt: the validation context
+ * @child: the child list
+ * @elemDecl: pointer to the element declaration
+ * @warn: emit the error message
+ * @parent: the parent element (for error reporting)
+ *
+ * Try to validate the content model of an element
+ *
+ * returns 1 if valid or 0 if not and -1 in case of error
+ */
+
+static int
+xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
+ xmlElementPtr elemDecl, int warn, xmlNodePtr parent) {
+ int ret = 1;
+#ifndef LIBXML_REGEXP_ENABLED
+ xmlNodePtr repl = NULL, last = NULL, tmp;
+#endif
+ xmlNodePtr cur;
+ xmlElementContentPtr cont;
+ const xmlChar *name;
+
+ if ((elemDecl == NULL) || (parent == NULL) || (ctxt == NULL))
+ return(-1);
+ cont = elemDecl->content;
+ name = elemDecl->name;
+
+#ifdef LIBXML_REGEXP_ENABLED
+ /* Build the regexp associated to the content model */
+ if (elemDecl->contModel == NULL)
+ ret = xmlValidBuildContentModel(ctxt, elemDecl);
+ if (elemDecl->contModel == NULL) {
+ return(-1);
+ } else {
+ xmlRegExecCtxtPtr exec;
+
+ if (!xmlRegexpIsDeterminist(elemDecl->contModel)) {
+ return(-1);
+ }
+ ctxt->nodeMax = 0;
+ ctxt->nodeNr = 0;
+ ctxt->nodeTab = NULL;
+ exec = xmlRegNewExecCtxt(elemDecl->contModel, NULL, NULL);
+ if (exec != NULL) {
+ cur = child;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Push the current node to be able to roll back
+ * and process within the entity
+ */
+ if ((cur->children != NULL) &&
+ (cur->children->children != NULL)) {
+ nodeVPush(ctxt, cur);
+ cur = cur->children->children;
+ continue;
+ }
+ break;
+ case XML_TEXT_NODE:
+ if (xmlIsBlankNode(cur))
+ break;
+ ret = 0;
+ goto fail;
+ case XML_CDATA_SECTION_NODE:
+ /* TODO */
+ ret = 0;
+ goto fail;
+ case XML_ELEMENT_NODE:
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(cur->name,
+ cur->ns->prefix, fn, 50);
+ if (fullname == NULL) {
+ ret = -1;
+ goto fail;
+ }
+ ret = xmlRegExecPushString(exec, fullname, NULL);
+ if ((fullname != fn) && (fullname != cur->name))
+ xmlFree(fullname);
+ } else {
+ ret = xmlRegExecPushString(exec, cur->name, NULL);
+ }
+ break;
+ default:
+ break;
+ }
+ /*
+ * Switch to next element
+ */
+ cur = cur->next;
+ while (cur == NULL) {
+ cur = nodeVPop(ctxt);
+ if (cur == NULL)
+ break;
+ cur = cur->next;
+ }
+ }
+ ret = xmlRegExecPushString(exec, NULL, NULL);
+fail:
+ xmlRegFreeExecCtxt(exec);
+ }
+ }
+#else /* LIBXML_REGEXP_ENABLED */
+ /*
+ * Allocate the stack
+ */
+ ctxt->vstateMax = 8;
+ ctxt->vstateTab = (xmlValidState *) xmlMalloc(
+ ctxt->vstateMax * sizeof(ctxt->vstateTab[0]));
+ if (ctxt->vstateTab == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ return(-1);
+ }
+ /*
+ * The first entry in the stack is reserved to the current state
+ */
+ ctxt->nodeMax = 0;
+ ctxt->nodeNr = 0;
+ ctxt->nodeTab = NULL;
+ ctxt->vstate = &ctxt->vstateTab[0];
+ ctxt->vstateNr = 1;
+ CONT = cont;
+ NODE = child;
+ DEPTH = 0;
+ OCCURS = 0;
+ STATE = 0;
+ ret = xmlValidateElementType(ctxt);
+ if ((ret == -3) && (warn)) {
+ xmlErrValidWarning(ctxt, child, XML_DTD_CONTENT_NOT_DETERMINIST,
+ "Content model for Element %s is ambiguous\n",
+ name, NULL, NULL);
+ } else if (ret == -2) {
+ /*
+ * An entities reference appeared at this level.
+ * Buid a minimal representation of this node content
+ * sufficient to run the validation process on it
+ */
+ DEBUG_VALID_MSG("Found an entity reference, linearizing");
+ cur = child;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Push the current node to be able to roll back
+ * and process within the entity
+ */
+ if ((cur->children != NULL) &&
+ (cur->children->children != NULL)) {
+ nodeVPush(ctxt, cur);
+ cur = cur->children->children;
+ continue;
+ }
+ break;
+ case XML_TEXT_NODE:
+ if (xmlIsBlankNode(cur))
+ break;
+ /* no break on purpose */
+ case XML_CDATA_SECTION_NODE:
+ /* no break on purpose */
+ case XML_ELEMENT_NODE:
+ /*
+ * Allocate a new node and minimally fills in
+ * what's required
+ */
+ tmp = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
+ if (tmp == NULL) {
+ xmlVErrMemory(ctxt, "malloc failed");
+ xmlFreeNodeList(repl);
+ ret = -1;
+ goto done;
+ }
+ tmp->type = cur->type;
+ tmp->name = cur->name;
+ tmp->ns = cur->ns;
+ tmp->next = NULL;
+ tmp->content = NULL;
+ if (repl == NULL)
+ repl = last = tmp;
+ else {
+ last->next = tmp;
+ last = tmp;
+ }
+ if (cur->type == XML_CDATA_SECTION_NODE) {
+ /*
+ * E59 spaces in CDATA does not match the
+ * nonterminal S
+ */
+ tmp->content = xmlStrdup(BAD_CAST "CDATA");
+ }
+ break;
+ default:
+ break;
+ }
+ /*
+ * Switch to next element
+ */
+ cur = cur->next;
+ while (cur == NULL) {
+ cur = nodeVPop(ctxt);
+ if (cur == NULL)
+ break;
+ cur = cur->next;
+ }
+ }
+
+ /*
+ * Relaunch the validation
+ */
+ ctxt->vstate = &ctxt->vstateTab[0];
+ ctxt->vstateNr = 1;
+ CONT = cont;
+ NODE = repl;
+ DEPTH = 0;
+ OCCURS = 0;
+ STATE = 0;
+ ret = xmlValidateElementType(ctxt);
+ }
+#endif /* LIBXML_REGEXP_ENABLED */
+ if ((warn) && ((ret != 1) && (ret != -3))) {
+ if (ctxt != NULL) {
+ char expr[5000];
+ char list[5000];
+
+ expr[0] = 0;
+ xmlSnprintfElementContent(&expr[0], 5000, cont, 1);
+ list[0] = 0;
+#ifndef LIBXML_REGEXP_ENABLED
+ if (repl != NULL)
+ xmlSnprintfElements(&list[0], 5000, repl, 1);
+ else
+#endif /* LIBXML_REGEXP_ENABLED */
+ xmlSnprintfElements(&list[0], 5000, child, 1);
+
+ if (name != NULL) {
+ xmlErrValidNode(ctxt, parent, XML_DTD_CONTENT_MODEL,
+ "Element %s content does not follow the DTD, expecting %s, got %s\n",
+ name, BAD_CAST expr, BAD_CAST list);
+ } else {
+ xmlErrValidNode(ctxt, parent, XML_DTD_CONTENT_MODEL,
+ "Element content does not follow the DTD, expecting %s, got %s\n",
+ BAD_CAST expr, BAD_CAST list, NULL);
+ }
+ } else {
+ if (name != NULL) {
+ xmlErrValidNode(ctxt, parent, XML_DTD_CONTENT_MODEL,
+ "Element %s content does not follow the DTD\n",
+ name, NULL, NULL);
+ } else {
+ xmlErrValidNode(ctxt, parent, XML_DTD_CONTENT_MODEL,
+ "Element content does not follow the DTD\n",
+ NULL, NULL, NULL);
+ }
+ }
+ ret = 0;
+ }
+ if (ret == -3)
+ ret = 1;
+
+#ifndef LIBXML_REGEXP_ENABLED
+done:
+ /*
+ * Deallocate the copy if done, and free up the validation stack
+ */
+ while (repl != NULL) {
+ tmp = repl->next;
+ xmlFree(repl);
+ repl = tmp;
+ }
+ ctxt->vstateMax = 0;
+ if (ctxt->vstateTab != NULL) {
+ xmlFree(ctxt->vstateTab);
+ ctxt->vstateTab = NULL;
+ }
+#endif
+ ctxt->nodeMax = 0;
+ ctxt->nodeNr = 0;
+ if (ctxt->nodeTab != NULL) {
+ xmlFree(ctxt->nodeTab);
+ ctxt->nodeTab = NULL;
+ }
+ return(ret);
+
+}
+
+/**
+ * xmlValidateCdataElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Check that an element follows #CDATA
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+static int
+xmlValidateOneCdataElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem) {
+ int ret = 1;
+ xmlNodePtr cur, child;
+
+ if ((ctxt == NULL) || (doc == NULL) || (elem == NULL) ||
+ (elem->type != XML_ELEMENT_NODE))
+ return(0);
+
+ child = elem->children;
+
+ cur = child;
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_ENTITY_REF_NODE:
+ /*
+ * Push the current node to be able to roll back
+ * and process within the entity
+ */
+ if ((cur->children != NULL) &&
+ (cur->children->children != NULL)) {
+ nodeVPush(ctxt, cur);
+ cur = cur->children->children;
+ continue;
+ }
+ break;
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ break;
+ default:
+ ret = 0;
+ goto done;
+ }
+ /*
+ * Switch to next element
+ */
+ cur = cur->next;
+ while (cur == NULL) {
+ cur = nodeVPop(ctxt);
+ if (cur == NULL)
+ break;
+ cur = cur->next;
+ }
+ }
+done:
+ ctxt->nodeMax = 0;
+ ctxt->nodeNr = 0;
+ if (ctxt->nodeTab != NULL) {
+ xmlFree(ctxt->nodeTab);
+ ctxt->nodeTab = NULL;
+ }
+ return(ret);
+}
+
+/**
+ * xmlValidateCheckMixed:
+ * @ctxt: the validation context
+ * @cont: the mixed content model
+ * @qname: the qualified name as appearing in the serialization
+ *
+ * Check if the given node is part of the content model.
+ *
+ * Returns 1 if yes, 0 if no, -1 in case of error
+ */
+static int
+xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
+ xmlElementContentPtr cont, const xmlChar *qname) {
+ const xmlChar *name;
+ int plen;
+ name = xmlSplitQName3(qname, &plen);
+
+ if (name == NULL) {
+ while (cont != NULL) {
+ if (cont->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if ((cont->prefix == NULL) && (xmlStrEqual(cont->name, qname)))
+ return(1);
+ } else if ((cont->type == XML_ELEMENT_CONTENT_OR) &&
+ (cont->c1 != NULL) &&
+ (cont->c1->type == XML_ELEMENT_CONTENT_ELEMENT)){
+ if ((cont->c1->prefix == NULL) &&
+ (xmlStrEqual(cont->c1->name, qname)))
+ return(1);
+ } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
+ (cont->c1 == NULL) ||
+ (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
+ xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
+ "Internal: MIXED struct corrupted\n",
+ NULL);
+ break;
+ }
+ cont = cont->c2;
+ }
+ } else {
+ while (cont != NULL) {
+ if (cont->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if ((cont->prefix != NULL) &&
+ (xmlStrncmp(cont->prefix, qname, plen) == 0) &&
+ (xmlStrEqual(cont->name, name)))
+ return(1);
+ } else if ((cont->type == XML_ELEMENT_CONTENT_OR) &&
+ (cont->c1 != NULL) &&
+ (cont->c1->type == XML_ELEMENT_CONTENT_ELEMENT)){
+ if ((cont->c1->prefix != NULL) &&
+ (xmlStrncmp(cont->c1->prefix, qname, plen) == 0) &&
+ (xmlStrEqual(cont->c1->name, name)))
+ return(1);
+ } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
+ (cont->c1 == NULL) ||
+ (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
+ xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
+ "Internal: MIXED struct corrupted\n",
+ NULL);
+ break;
+ }
+ cont = cont->c2;
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlValidGetElemDecl:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ * @extsubset: pointer, (out) indicate if the declaration was found
+ * in the external subset.
+ *
+ * Finds a declaration associated to an element in the document.
+ *
+ * returns the pointer to the declaration or NULL if not found.
+ */
+static xmlElementPtr
+xmlValidGetElemDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem, int *extsubset) {
+ xmlElementPtr elemDecl = NULL;
+ const xmlChar *prefix = NULL;
+
+ if ((ctxt == NULL) || (doc == NULL) ||
+ (elem == NULL) || (elem->name == NULL))
+ return(NULL);
+ if (extsubset != NULL)
+ *extsubset = 0;
+
+ /*
+ * Fetch the declaration for the qualified name
+ */
+ if ((elem->ns != NULL) && (elem->ns->prefix != NULL))
+ prefix = elem->ns->prefix;
+
+ if (prefix != NULL) {
+ elemDecl = xmlGetDtdQElementDesc(doc->intSubset,
+ elem->name, prefix);
+ if ((elemDecl == NULL) && (doc->extSubset != NULL)) {
+ elemDecl = xmlGetDtdQElementDesc(doc->extSubset,
+ elem->name, prefix);
+ if ((elemDecl != NULL) && (extsubset != NULL))
+ *extsubset = 1;
+ }
+ }
+
+ /*
+ * Fetch the declaration for the non qualified name
+ * This is "non-strict" validation should be done on the
+ * full QName but in that case being flexible makes sense.
+ */
+ if (elemDecl == NULL) {
+ elemDecl = xmlGetDtdElementDesc(doc->intSubset, elem->name);
+ if ((elemDecl == NULL) && (doc->extSubset != NULL)) {
+ elemDecl = xmlGetDtdElementDesc(doc->extSubset, elem->name);
+ if ((elemDecl != NULL) && (extsubset != NULL))
+ *extsubset = 1;
+ }
+ }
+ if (elemDecl == NULL) {
+ xmlErrValidNode(ctxt, elem,
+ XML_DTD_UNKNOWN_ELEM,
+ "No declaration for element %s\n",
+ elem->name, NULL, NULL);
+ }
+ return(elemDecl);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+/**
+ * xmlValidatePushElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ * @qname: the qualified name as appearing in the serialization
+ *
+ * Push a new element start on the validation stack.
+ *
+ * returns 1 if no validation problem was found or 0 otherwise
+ */
+int
+xmlValidatePushElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem, const xmlChar *qname) {
+ int ret = 1;
+ xmlElementPtr eDecl;
+ int extsubset = 0;
+
+ if (ctxt == NULL)
+ return(0);
+/* printf("PushElem %s\n", qname); */
+ if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
+ xmlValidStatePtr state = ctxt->vstate;
+ xmlElementPtr elemDecl;
+
+ /*
+ * Check the new element agaisnt the content model of the new elem.
+ */
+ if (state->elemDecl != NULL) {
+ elemDecl = state->elemDecl;
+
+ switch(elemDecl->etype) {
+ case XML_ELEMENT_TYPE_UNDEFINED:
+ ret = 0;
+ break;
+ case XML_ELEMENT_TYPE_EMPTY:
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_NOT_EMPTY,
+ "Element %s was declared EMPTY this one has content\n",
+ state->node->name, NULL, NULL);
+ ret = 0;
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ /* I don't think anything is required then */
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+ /* simple case of declared as #PCDATA */
+ if ((elemDecl->content != NULL) &&
+ (elemDecl->content->type ==
+ XML_ELEMENT_CONTENT_PCDATA)) {
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_NOT_PCDATA,
+ "Element %s was declared #PCDATA but contains non text nodes\n",
+ state->node->name, NULL, NULL);
+ ret = 0;
+ } else {
+ ret = xmlValidateCheckMixed(ctxt, elemDecl->content,
+ qname);
+ if (ret != 1) {
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_INVALID_CHILD,
+ "Element %s is not declared in %s list of possible children\n",
+ qname, state->node->name, NULL);
+ }
+ }
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ /*
+ * TODO:
+ * VC: Standalone Document Declaration
+ * - element types with element content, if white space
+ * occurs directly within any instance of those types.
+ */
+ if (state->exec != NULL) {
+ ret = xmlRegExecPushString(state->exec, qname, NULL);
+ if (ret < 0) {
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_CONTENT_MODEL,
+ "Element %s content does not follow the DTD, Misplaced %s\n",
+ state->node->name, qname, NULL);
+ ret = 0;
+ } else {
+ ret = 1;
+ }
+ }
+ break;
+ }
+ }
+ }
+ eDecl = xmlValidGetElemDecl(ctxt, doc, elem, &extsubset);
+ vstateVPush(ctxt, eDecl, elem);
+ return(ret);
+}
+
+/**
+ * xmlValidatePushCData:
+ * @ctxt: the validation context
+ * @data: some character data read
+ * @len: the length of the data
+ *
+ * check the CData parsed for validation in the current stack
+ *
+ * returns 1 if no validation problem was found or 0 otherwise
+ */
+int
+xmlValidatePushCData(xmlValidCtxtPtr ctxt, const xmlChar *data, int len) {
+ int ret = 1;
+
+/* printf("CDATA %s %d\n", data, len); */
+ if (ctxt == NULL)
+ return(0);
+ if (len <= 0)
+ return(ret);
+ if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
+ xmlValidStatePtr state = ctxt->vstate;
+ xmlElementPtr elemDecl;
+
+ /*
+ * Check the new element agaisnt the content model of the new elem.
+ */
+ if (state->elemDecl != NULL) {
+ elemDecl = state->elemDecl;
+
+ switch(elemDecl->etype) {
+ case XML_ELEMENT_TYPE_UNDEFINED:
+ ret = 0;
+ break;
+ case XML_ELEMENT_TYPE_EMPTY:
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_NOT_EMPTY,
+ "Element %s was declared EMPTY this one has content\n",
+ state->node->name, NULL, NULL);
+ ret = 0;
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ if (len > 0) {
+ int i;
+
+ for (i = 0;i < len;i++) {
+ if (!IS_BLANK_CH(data[i])) {
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_CONTENT_MODEL,
+ "Element %s content does not follow the DTD, Text not allowed\n",
+ state->node->name, NULL, NULL);
+ ret = 0;
+ goto done;
+ }
+ }
+ /*
+ * TODO:
+ * VC: Standalone Document Declaration
+ * element types with element content, if white space
+ * occurs directly within any instance of those types.
+ */
+ }
+ break;
+ }
+ }
+ }
+done:
+ return(ret);
+}
+
+/**
+ * xmlValidatePopElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ * @qname: the qualified name as appearing in the serialization
+ *
+ * Pop the element end from the validation stack.
+ *
+ * returns 1 if no validation problem was found or 0 otherwise
+ */
+int
+xmlValidatePopElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc ATTRIBUTE_UNUSED,
+ xmlNodePtr elem ATTRIBUTE_UNUSED,
+ const xmlChar *qname ATTRIBUTE_UNUSED) {
+ int ret = 1;
+
+ if (ctxt == NULL)
+ return(0);
+/* printf("PopElem %s\n", qname); */
+ if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
+ xmlValidStatePtr state = ctxt->vstate;
+ xmlElementPtr elemDecl;
+
+ /*
+ * Check the new element agaisnt the content model of the new elem.
+ */
+ if (state->elemDecl != NULL) {
+ elemDecl = state->elemDecl;
+
+ if (elemDecl->etype == XML_ELEMENT_TYPE_ELEMENT) {
+ if (state->exec != NULL) {
+ ret = xmlRegExecPushString(state->exec, NULL, NULL);
+ if (ret == 0) {
+ xmlErrValidNode(ctxt, state->node,
+ XML_DTD_CONTENT_MODEL,
+ "Element %s content does not follow the DTD, Expecting more child\n",
+ state->node->name, NULL,NULL);
+ } else {
+ /*
+ * previous validation errors should not generate
+ * a new one here
+ */
+ ret = 1;
+ }
+ }
+ }
+ }
+ vstateVPop(ctxt);
+ }
+ return(ret);
+}
+#endif /* LIBXML_REGEXP_ENABLED */
+
+/**
+ * xmlValidateOneElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Try to validate a single element and it's attributes,
+ * basically it does the following checks as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: Element Valid ]
+ * - [ VC: Required Attribute ]
+ * Then call xmlValidateOneAttribute() for each attribute present.
+ *
+ * The ID/IDREF checkings are done separately
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+ xmlNodePtr elem) {
+ xmlElementPtr elemDecl = NULL;
+ xmlElementContentPtr cont;
+ xmlAttributePtr attr;
+ xmlNodePtr child;
+ int ret = 1, tmp;
+ const xmlChar *name;
+ int extsubset = 0;
+
+ CHECK_DTD;
+
+ if (elem == NULL) return(0);
+ switch (elem->type) {
+ case XML_ATTRIBUTE_NODE:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Attribute element not expected\n", NULL, NULL ,NULL);
+ return(0);
+ case XML_TEXT_NODE:
+ if (elem->children != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Text element has children !\n",
+ NULL,NULL,NULL);
+ return(0);
+ }
+ if (elem->ns != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Text element has namespace !\n",
+ NULL,NULL,NULL);
+ return(0);
+ }
+ if (elem->content == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Text element has no content !\n",
+ NULL,NULL,NULL);
+ return(0);
+ }
+ return(1);
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return(1);
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ return(1);
+ case XML_ENTITY_NODE:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Entity element not expected\n", NULL, NULL ,NULL);
+ return(0);
+ case XML_NOTATION_NODE:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Notation element not expected\n", NULL, NULL ,NULL);
+ return(0);
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "Document element not expected\n", NULL, NULL ,NULL);
+ return(0);
+ case XML_HTML_DOCUMENT_NODE:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "HTML Document not expected\n", NULL, NULL ,NULL);
+ return(0);
+ case XML_ELEMENT_NODE:
+ break;
+ default:
+ xmlErrValidNode(ctxt, elem, XML_ERR_INTERNAL_ERROR,
+ "unknown element type\n", NULL, NULL ,NULL);
+ return(0);
+ }
+
+ /*
+ * Fetch the declaration
+ */
+ elemDecl = xmlValidGetElemDecl(ctxt, doc, elem, &extsubset);
+ if (elemDecl == NULL)
+ return(0);
+
+ /*
+ * If vstateNr is not zero that means continuous validation is
+ * activated, do not try to check the content model at that level.
+ */
+ if (ctxt->vstateNr == 0) {
+ /* Check that the element content matches the definition */
+ switch (elemDecl->etype) {
+ case XML_ELEMENT_TYPE_UNDEFINED:
+ xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_ELEM,
+ "No declaration for element %s\n",
+ elem->name, NULL, NULL);
+ return(0);
+ case XML_ELEMENT_TYPE_EMPTY:
+ if (elem->children != NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOT_EMPTY,
+ "Element %s was declared EMPTY this one has content\n",
+ elem->name, NULL, NULL);
+ ret = 0;
+ }
+ break;
+ case XML_ELEMENT_TYPE_ANY:
+ /* I don't think anything is required then */
+ break;
+ case XML_ELEMENT_TYPE_MIXED:
+
+ /* simple case of declared as #PCDATA */
+ if ((elemDecl->content != NULL) &&
+ (elemDecl->content->type == XML_ELEMENT_CONTENT_PCDATA)) {
+ ret = xmlValidateOneCdataElement(ctxt, doc, elem);
+ if (!ret) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_NOT_PCDATA,
+ "Element %s was declared #PCDATA but contains non text nodes\n",
+ elem->name, NULL, NULL);
+ }
+ break;
+ }
+ child = elem->children;
+ /* Hum, this start to get messy */
+ while (child != NULL) {
+ if (child->type == XML_ELEMENT_NODE) {
+ name = child->name;
+ if ((child->ns != NULL) && (child->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(child->name, child->ns->prefix,
+ fn, 50);
+ if (fullname == NULL)
+ return(0);
+ cont = elemDecl->content;
+ while (cont != NULL) {
+ if (cont->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if (xmlStrEqual(cont->name, fullname))
+ break;
+ } else if ((cont->type == XML_ELEMENT_CONTENT_OR) &&
+ (cont->c1 != NULL) &&
+ (cont->c1->type == XML_ELEMENT_CONTENT_ELEMENT)){
+ if (xmlStrEqual(cont->c1->name, fullname))
+ break;
+ } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
+ (cont->c1 == NULL) ||
+ (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
+ xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
+ "Internal: MIXED struct corrupted\n",
+ NULL);
+ break;
+ }
+ cont = cont->c2;
+ }
+ if ((fullname != fn) && (fullname != child->name))
+ xmlFree(fullname);
+ if (cont != NULL)
+ goto child_ok;
+ }
+ cont = elemDecl->content;
+ while (cont != NULL) {
+ if (cont->type == XML_ELEMENT_CONTENT_ELEMENT) {
+ if (xmlStrEqual(cont->name, name)) break;
+ } else if ((cont->type == XML_ELEMENT_CONTENT_OR) &&
+ (cont->c1 != NULL) &&
+ (cont->c1->type == XML_ELEMENT_CONTENT_ELEMENT)) {
+ if (xmlStrEqual(cont->c1->name, name)) break;
+ } else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
+ (cont->c1 == NULL) ||
+ (cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)) {
+ xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
+ "Internal: MIXED struct corrupted\n",
+ NULL);
+ break;
+ }
+ cont = cont->c2;
+ }
+ if (cont == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_INVALID_CHILD,
+ "Element %s is not declared in %s list of possible children\n",
+ name, elem->name, NULL);
+ ret = 0;
+ }
+ }
+child_ok:
+ child = child->next;
+ }
+ break;
+ case XML_ELEMENT_TYPE_ELEMENT:
+ if ((doc->standalone == 1) && (extsubset == 1)) {
+ /*
+ * VC: Standalone Document Declaration
+ * - element types with element content, if white space
+ * occurs directly within any instance of those types.
+ */
+ child = elem->children;
+ while (child != NULL) {
+ if (child->type == XML_TEXT_NODE) {
+ const xmlChar *content = child->content;
+
+ while (IS_BLANK_CH(*content))
+ content++;
+ if (*content == 0) {
+ xmlErrValidNode(ctxt, elem,
+ XML_DTD_STANDALONE_WHITE_SPACE,
+"standalone: %s declared in the external subset contains white spaces nodes\n",
+ elem->name, NULL, NULL);
+ ret = 0;
+ break;
+ }
+ }
+ child =child->next;
+ }
+ }
+ child = elem->children;
+ cont = elemDecl->content;
+ tmp = xmlValidateElementContent(ctxt, child, elemDecl, 1, elem);
+ if (tmp <= 0)
+ ret = tmp;
+ break;
+ }
+ } /* not continuous */
+
+ /* [ VC: Required Attribute ] */
+ attr = elemDecl->attributes;
+ while (attr != NULL) {
+ if (attr->def == XML_ATTRIBUTE_REQUIRED) {
+ int qualified = -1;
+
+ if ((attr->prefix == NULL) &&
+ (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) {
+ xmlNsPtr ns;
+
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ if (ns->prefix == NULL)
+ goto found;
+ ns = ns->next;
+ }
+ } else if (xmlStrEqual(attr->prefix, BAD_CAST "xmlns")) {
+ xmlNsPtr ns;
+
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ if (xmlStrEqual(attr->name, ns->prefix))
+ goto found;
+ ns = ns->next;
+ }
+ } else {
+ xmlAttrPtr attrib;
+
+ attrib = elem->properties;
+ while (attrib != NULL) {
+ if (xmlStrEqual(attrib->name, attr->name)) {
+ if (attr->prefix != NULL) {
+ xmlNsPtr nameSpace = attrib->ns;
+
+ if (nameSpace == NULL)
+ nameSpace = elem->ns;
+ /*
+ * qualified names handling is problematic, having a
+ * different prefix should be possible but DTDs don't
+ * allow to define the URI instead of the prefix :-(
+ */
+ if (nameSpace == NULL) {
+ if (qualified < 0)
+ qualified = 0;
+ } else if (!xmlStrEqual(nameSpace->prefix,
+ attr->prefix)) {
+ if (qualified < 1)
+ qualified = 1;
+ } else
+ goto found;
+ } else {
+ /*
+ * We should allow applications to define namespaces
+ * for their application even if the DTD doesn't
+ * carry one, otherwise, basically we would always
+ * break.
+ */
+ goto found;
+ }
+ }
+ attrib = attrib->next;
+ }
+ }
+ if (qualified == -1) {
+ if (attr->prefix == NULL) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_MISSING_ATTRIBUTE,
+ "Element %s does not carry attribute %s\n",
+ elem->name, attr->name, NULL);
+ ret = 0;
+ } else {
+ xmlErrValidNode(ctxt, elem, XML_DTD_MISSING_ATTRIBUTE,
+ "Element %s does not carry attribute %s:%s\n",
+ elem->name, attr->prefix,attr->name);
+ ret = 0;
+ }
+ } else if (qualified == 0) {
+ xmlErrValidWarning(ctxt, elem, XML_DTD_NO_PREFIX,
+ "Element %s required attribute %s:%s has no prefix\n",
+ elem->name, attr->prefix, attr->name);
+ } else if (qualified == 1) {
+ xmlErrValidWarning(ctxt, elem, XML_DTD_DIFFERENT_PREFIX,
+ "Element %s required attribute %s:%s has different prefix\n",
+ elem->name, attr->prefix, attr->name);
+ }
+ } else if (attr->def == XML_ATTRIBUTE_FIXED) {
+ /*
+ * Special tests checking #FIXED namespace declarations
+ * have the right value since this is not done as an
+ * attribute checking
+ */
+ if ((attr->prefix == NULL) &&
+ (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) {
+ xmlNsPtr ns;
+
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ if (ns->prefix == NULL) {
+ if (!xmlStrEqual(attr->defaultValue, ns->href)) {
+ xmlErrValidNode(ctxt, elem,
+ XML_DTD_ELEM_DEFAULT_NAMESPACE,
+ "Element %s namespace name for default namespace does not match the DTD\n",
+ elem->name, NULL, NULL);
+ ret = 0;
+ }
+ goto found;
+ }
+ ns = ns->next;
+ }
+ } else if (xmlStrEqual(attr->prefix, BAD_CAST "xmlns")) {
+ xmlNsPtr ns;
+
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ if (xmlStrEqual(attr->name, ns->prefix)) {
+ if (!xmlStrEqual(attr->defaultValue, ns->href)) {
+ xmlErrValidNode(ctxt, elem, XML_DTD_ELEM_NAMESPACE,
+ "Element %s namespace name for %s does not match the DTD\n",
+ elem->name, ns->prefix, NULL);
+ ret = 0;
+ }
+ goto found;
+ }
+ ns = ns->next;
+ }
+ }
+ }
+found:
+ attr = attr->nexth;
+ }
+ return(ret);
+}
+
+/**
+ * xmlValidateRoot:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ *
+ * Try to validate a the root element
+ * basically it does the following check as described by the
+ * XML-1.0 recommendation:
+ * - [ VC: Root Element Type ]
+ * it doesn't try to recurse or apply other check to the element
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
+ xmlNodePtr root;
+ int ret;
+
+ if (doc == NULL) return(0);
+
+ root = xmlDocGetRootElement(doc);
+ if ((root == NULL) || (root->name == NULL)) {
+ xmlErrValid(ctxt, XML_DTD_NO_ROOT,
+ "no root element\n", NULL);
+ return(0);
+ }
+
+ /*
+ * When doing post validation against a separate DTD, those may
+ * no internal subset has been generated
+ */
+ if ((doc->intSubset != NULL) &&
+ (doc->intSubset->name != NULL)) {
+ /*
+ * Check first the document root against the NQName
+ */
+ if (!xmlStrEqual(doc->intSubset->name, root->name)) {
+ if ((root->ns != NULL) && (root->ns->prefix != NULL)) {
+ xmlChar fn[50];
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(root->name, root->ns->prefix, fn, 50);
+ if (fullname == NULL) {
+ xmlVErrMemory(ctxt, NULL);
+ return(0);
+ }
+ ret = xmlStrEqual(doc->intSubset->name, fullname);
+ if ((fullname != fn) && (fullname != root->name))
+ xmlFree(fullname);
+ if (ret == 1)
+ goto name_ok;
+ }
+ if ((xmlStrEqual(doc->intSubset->name, BAD_CAST "HTML")) &&
+ (xmlStrEqual(root->name, BAD_CAST "html")))
+ goto name_ok;
+ xmlErrValidNode(ctxt, root, XML_DTD_ROOT_NAME,
+ "root and DTD name do not match '%s' and '%s'\n",
+ root->name, doc->intSubset->name, NULL);
+ return(0);
+ }
+ }
+name_ok:
+ return(1);
+}
+
+
+/**
+ * xmlValidateElement:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @elem: an element instance
+ *
+ * Try to validate the subtree under an element
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr elem) {
+ xmlNodePtr child;
+ xmlAttrPtr attr;
+ xmlNsPtr ns;
+ const xmlChar *value;
+ int ret = 1;
+
+ if (elem == NULL) return(0);
+
+ /*
+ * XInclude elements were added after parsing in the infoset,
+ * they don't really mean anything validation wise.
+ */
+ if ((elem->type == XML_XINCLUDE_START) ||
+ (elem->type == XML_XINCLUDE_END) ||
+ (elem->type == XML_NAMESPACE_DECL))
+ return(1);
+
+ CHECK_DTD;
+
+ /*
+ * Entities references have to be handled separately
+ */
+ if (elem->type == XML_ENTITY_REF_NODE) {
+ return(1);
+ }
+
+ ret &= xmlValidateOneElement(ctxt, doc, elem);
+ if (elem->type == XML_ELEMENT_NODE) {
+ attr = elem->properties;
+ while (attr != NULL) {
+ value = xmlNodeListGetString(doc, attr->children, 0);
+ ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
+ if (value != NULL)
+ xmlFree((char *)value);
+ attr= attr->next;
+ }
+ ns = elem->nsDef;
+ while (ns != NULL) {
+ if (elem->ns == NULL)
+ ret &= xmlValidateOneNamespace(ctxt, doc, elem, NULL,
+ ns, ns->href);
+ else
+ ret &= xmlValidateOneNamespace(ctxt, doc, elem,
+ elem->ns->prefix, ns, ns->href);
+ ns = ns->next;
+ }
+ }
+ child = elem->children;
+ while (child != NULL) {
+ ret &= xmlValidateElement(ctxt, doc, child);
+ child = child->next;
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlValidateRef:
+ * @ref: A reference to be validated
+ * @ctxt: Validation context
+ * @name: Name of ID we are searching for
+ *
+ */
+static void
+xmlValidateRef(xmlRefPtr ref, xmlValidCtxtPtr ctxt,
+ const xmlChar *name) {
+ xmlAttrPtr id;
+ xmlAttrPtr attr;
+
+ if (ref == NULL)
+ return;
+ if ((ref->attr == NULL) && (ref->name == NULL))
+ return;
+ attr = ref->attr;
+ if (attr == NULL) {
+ xmlChar *dup, *str = NULL, *cur, save;
+
+ dup = xmlStrdup(name);
+ if (dup == NULL) {
+ ctxt->valid = 0;
+ return;
+ }
+ cur = dup;
+ while (*cur != 0) {
+ str = cur;
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
+ save = *cur;
+ *cur = 0;
+ id = xmlGetID(ctxt->doc, str);
+ if (id == NULL) {
+ xmlErrValidNodeNr(ctxt, NULL, XML_DTD_UNKNOWN_ID,
+ "attribute %s line %d references an unknown ID \"%s\"\n",
+ ref->name, ref->lineno, str);
+ ctxt->valid = 0;
+ }
+ if (save == 0)
+ break;
+ *cur = save;
+ while (IS_BLANK_CH(*cur)) cur++;
+ }
+ xmlFree(dup);
+ } else if (attr->atype == XML_ATTRIBUTE_IDREF) {
+ id = xmlGetID(ctxt->doc, name);
+ if (id == NULL) {
+ xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
+ "IDREF attribute %s references an unknown ID \"%s\"\n",
+ attr->name, name, NULL);
+ ctxt->valid = 0;
+ }
+ } else if (attr->atype == XML_ATTRIBUTE_IDREFS) {
+ xmlChar *dup, *str = NULL, *cur, save;
+
+ dup = xmlStrdup(name);
+ if (dup == NULL) {
+ xmlVErrMemory(ctxt, "IDREFS split");
+ ctxt->valid = 0;
+ return;
+ }
+ cur = dup;
+ while (*cur != 0) {
+ str = cur;
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
+ save = *cur;
+ *cur = 0;
+ id = xmlGetID(ctxt->doc, str);
+ if (id == NULL) {
+ xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
+ "IDREFS attribute %s references an unknown ID \"%s\"\n",
+ attr->name, str, NULL);
+ ctxt->valid = 0;
+ }
+ if (save == 0)
+ break;
+ *cur = save;
+ while (IS_BLANK_CH(*cur)) cur++;
+ }
+ xmlFree(dup);
+ }
+}
+
+/**
+ * xmlWalkValidateList:
+ * @data: Contents of current link
+ * @user: Value supplied by the user
+ *
+ * Returns 0 to abort the walk or 1 to continue
+ */
+static int
+xmlWalkValidateList(const void *data, const void *user)
+{
+ xmlValidateMemoPtr memo = (xmlValidateMemoPtr)user;
+ xmlValidateRef((xmlRefPtr)data, memo->ctxt, memo->name);
+ return 1;
+}
+
+/**
+ * xmlValidateCheckRefCallback:
+ * @ref_list: List of references
+ * @ctxt: Validation context
+ * @name: Name of ID we are searching for
+ *
+ */
+static void
+xmlValidateCheckRefCallback(xmlListPtr ref_list, xmlValidCtxtPtr ctxt,
+ const xmlChar *name) {
+ xmlValidateMemo memo;
+
+ if (ref_list == NULL)
+ return;
+ memo.ctxt = ctxt;
+ memo.name = name;
+
+ xmlListWalk(ref_list, xmlWalkValidateList, &memo);
+
+}
+
+/**
+ * xmlValidateDocumentFinal:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ *
+ * Does the final step for the document validation once all the
+ * incremental validation steps have been completed
+ *
+ * basically it does the following checks described by the XML Rec
+ *
+ * Check all the IDREF/IDREFS attributes definition for validity
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
+ xmlRefTablePtr table;
+ unsigned int save;
+
+ if (ctxt == NULL)
+ return(0);
+ if (doc == NULL) {
+ xmlErrValid(ctxt, XML_DTD_NO_DOC,
+ "xmlValidateDocumentFinal: doc == NULL\n", NULL);
+ return(0);
+ }
+
+ /* trick to get correct line id report */
+ save = ctxt->finishDtd;
+ ctxt->finishDtd = 0;
+
+ /*
+ * Check all the NOTATION/NOTATIONS attributes
+ */
+ /*
+ * Check all the ENTITY/ENTITIES attributes definition for validity
+ */
+ /*
+ * Check all the IDREF/IDREFS attributes definition for validity
+ */
+ table = (xmlRefTablePtr) doc->refs;
+ ctxt->doc = doc;
+ ctxt->valid = 1;
+ xmlHashScan(table, (xmlHashScanner) xmlValidateCheckRefCallback, ctxt);
+
+ ctxt->finishDtd = save;
+ return(ctxt->valid);
+}
+
+/**
+ * xmlValidateDtd:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ * @dtd: a dtd instance
+ *
+ * Try to validate the document against the dtd instance
+ *
+ * Basically it does check all the definitions in the DtD.
+ * Note the the internal subset (if present) is de-coupled
+ * (i.e. not used), which could give problems if ID or IDREF
+ * is present.
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
+ int ret;
+ xmlDtdPtr oldExt, oldInt;
+ xmlNodePtr root;
+
+ if (dtd == NULL) return(0);
+ if (doc == NULL) return(0);
+ oldExt = doc->extSubset;
+ oldInt = doc->intSubset;
+ doc->extSubset = dtd;
+ doc->intSubset = NULL;
+ ret = xmlValidateRoot(ctxt, doc);
+ if (ret == 0) {
+ doc->extSubset = oldExt;
+ doc->intSubset = oldInt;
+ return(ret);
+ }
+ if (doc->ids != NULL) {
+ xmlFreeIDTable(doc->ids);
+ doc->ids = NULL;
+ }
+ if (doc->refs != NULL) {
+ xmlFreeRefTable(doc->refs);
+ doc->refs = NULL;
+ }
+ root = xmlDocGetRootElement(doc);
+ ret = xmlValidateElement(ctxt, doc, root);
+ ret &= xmlValidateDocumentFinal(ctxt, doc);
+ doc->extSubset = oldExt;
+ doc->intSubset = oldInt;
+ return(ret);
+}
+
+static void
+xmlValidateNotationCallback(xmlEntityPtr cur, xmlValidCtxtPtr ctxt,
+ const xmlChar *name ATTRIBUTE_UNUSED) {
+ if (cur == NULL)
+ return;
+ if (cur->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
+ xmlChar *notation = cur->content;
+
+ if (notation != NULL) {
+ int ret;
+
+ ret = xmlValidateNotationUse(ctxt, cur->doc, notation);
+ if (ret != 1) {
+ ctxt->valid = 0;
+ }
+ }
+ }
+}
+
+static void
+xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
+ const xmlChar *name ATTRIBUTE_UNUSED) {
+ int ret;
+ xmlDocPtr doc;
+ xmlElementPtr elem = NULL;
+
+ if (cur == NULL)
+ return;
+ switch (cur->atype) {
+ case XML_ATTRIBUTE_CDATA:
+ case XML_ATTRIBUTE_ID:
+ case XML_ATTRIBUTE_IDREF :
+ case XML_ATTRIBUTE_IDREFS:
+ case XML_ATTRIBUTE_NMTOKEN:
+ case XML_ATTRIBUTE_NMTOKENS:
+ case XML_ATTRIBUTE_ENUMERATION:
+ break;
+ case XML_ATTRIBUTE_ENTITY:
+ case XML_ATTRIBUTE_ENTITIES:
+ case XML_ATTRIBUTE_NOTATION:
+ if (cur->defaultValue != NULL) {
+
+ ret = xmlValidateAttributeValue2(ctxt, ctxt->doc, cur->name,
+ cur->atype, cur->defaultValue);
+ if ((ret == 0) && (ctxt->valid == 1))
+ ctxt->valid = 0;
+ }
+ if (cur->tree != NULL) {
+ xmlEnumerationPtr tree = cur->tree;
+ while (tree != NULL) {
+ ret = xmlValidateAttributeValue2(ctxt, ctxt->doc,
+ cur->name, cur->atype, tree->name);
+ if ((ret == 0) && (ctxt->valid == 1))
+ ctxt->valid = 0;
+ tree = tree->next;
+ }
+ }
+ }
+ if (cur->atype == XML_ATTRIBUTE_NOTATION) {
+ doc = cur->doc;
+ if (cur->elem == NULL) {
+ xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
+ "xmlValidateAttributeCallback(%s): internal error\n",
+ (const char *) cur->name);
+ return;
+ }
+
+ if (doc != NULL)
+ elem = xmlGetDtdElementDesc(doc->intSubset, cur->elem);
+ if ((elem == NULL) && (doc != NULL))
+ elem = xmlGetDtdElementDesc(doc->extSubset, cur->elem);
+ if ((elem == NULL) && (cur->parent != NULL) &&
+ (cur->parent->type == XML_DTD_NODE))
+ elem = xmlGetDtdElementDesc((xmlDtdPtr) cur->parent, cur->elem);
+ if (elem == NULL) {
+ xmlErrValidNode(ctxt, NULL, XML_DTD_UNKNOWN_ELEM,
+ "attribute %s: could not find decl for element %s\n",
+ cur->name, cur->elem, NULL);
+ return;
+ }
+ if (elem->etype == XML_ELEMENT_TYPE_EMPTY) {
+ xmlErrValidNode(ctxt, NULL, XML_DTD_EMPTY_NOTATION,
+ "NOTATION attribute %s declared for EMPTY element %s\n",
+ cur->name, cur->elem, NULL);
+ ctxt->valid = 0;
+ }
+ }
+}
+
+/**
+ * xmlValidateDtdFinal:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ *
+ * Does the final step for the dtds validation once all the
+ * subsets have been parsed
+ *
+ * basically it does the following checks described by the XML Rec
+ * - check that ENTITY and ENTITIES type attributes default or
+ * possible values matches one of the defined entities.
+ * - check that NOTATION type attributes default or
+ * possible values matches one of the defined notations.
+ *
+ * returns 1 if valid or 0 if invalid and -1 if not well-formed
+ */
+
+int
+xmlValidateDtdFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
+ xmlDtdPtr dtd;
+ xmlAttributeTablePtr table;
+ xmlEntitiesTablePtr entities;
+
+ if ((doc == NULL) || (ctxt == NULL)) return(0);
+ if ((doc->intSubset == NULL) && (doc->extSubset == NULL))
+ return(0);
+ ctxt->doc = doc;
+ ctxt->valid = 1;
+ dtd = doc->intSubset;
+ if ((dtd != NULL) && (dtd->attributes != NULL)) {
+ table = (xmlAttributeTablePtr) dtd->attributes;
+ xmlHashScan(table, (xmlHashScanner) xmlValidateAttributeCallback, ctxt);
+ }
+ if ((dtd != NULL) && (dtd->entities != NULL)) {
+ entities = (xmlEntitiesTablePtr) dtd->entities;
+ xmlHashScan(entities, (xmlHashScanner) xmlValidateNotationCallback,
+ ctxt);
+ }
+ dtd = doc->extSubset;
+ if ((dtd != NULL) && (dtd->attributes != NULL)) {
+ table = (xmlAttributeTablePtr) dtd->attributes;
+ xmlHashScan(table, (xmlHashScanner) xmlValidateAttributeCallback, ctxt);
+ }
+ if ((dtd != NULL) && (dtd->entities != NULL)) {
+ entities = (xmlEntitiesTablePtr) dtd->entities;
+ xmlHashScan(entities, (xmlHashScanner) xmlValidateNotationCallback,
+ ctxt);
+ }
+ return(ctxt->valid);
+}
+
+/**
+ * xmlValidateDocument:
+ * @ctxt: the validation context
+ * @doc: a document instance
+ *
+ * Try to validate the document instance
+ *
+ * basically it does the all the checks described by the XML Rec
+ * i.e. validates the internal and external subset (if present)
+ * and validate the document tree.
+ *
+ * returns 1 if valid or 0 otherwise
+ */
+
+int
+xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
+ int ret;
+ xmlNodePtr root;
+
+ if (doc == NULL)
+ return(0);
+ if ((doc->intSubset == NULL) && (doc->extSubset == NULL)) {
+ xmlErrValid(ctxt, XML_DTD_NO_DTD,
+ "no DTD found!\n", NULL);
+ return(0);
+ }
+ if ((doc->intSubset != NULL) && ((doc->intSubset->SystemID != NULL) ||
+ (doc->intSubset->ExternalID != NULL)) && (doc->extSubset == NULL)) {
+ xmlChar *sysID;
+ if (doc->intSubset->SystemID != NULL) {
+ sysID = xmlBuildURI(doc->intSubset->SystemID,
+ doc->URL);
+ if (sysID == NULL) {
+ xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
+ "Could not build URI for external subset \"%s\"\n",
+ (const char *) doc->intSubset->SystemID);
+ return 0;
+ }
+ } else
+ sysID = NULL;
+ doc->extSubset = xmlParseDTD(doc->intSubset->ExternalID,
+ (const xmlChar *)sysID);
+ if (sysID != NULL)
+ xmlFree(sysID);
+ if (doc->extSubset == NULL) {
+ if (doc->intSubset->SystemID != NULL) {
+ xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
+ "Could not load the external subset \"%s\"\n",
+ (const char *) doc->intSubset->SystemID);
+ } else {
+ xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
+ "Could not load the external subset \"%s\"\n",
+ (const char *) doc->intSubset->ExternalID);
+ }
+ return(0);
+ }
+ }
+
+ if (doc->ids != NULL) {
+ xmlFreeIDTable(doc->ids);
+ doc->ids = NULL;
+ }
+ if (doc->refs != NULL) {
+ xmlFreeRefTable(doc->refs);
+ doc->refs = NULL;
+ }
+ ret = xmlValidateDtdFinal(ctxt, doc);
+ if (!xmlValidateRoot(ctxt, doc)) return(0);
+
+ root = xmlDocGetRootElement(doc);
+ ret &= xmlValidateElement(ctxt, doc, root);
+ ret &= xmlValidateDocumentFinal(ctxt, doc);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Routines for dynamic validation editing *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlValidGetPotentialChildren:
+ * @ctree: an element content tree
+ * @names: an array to store the list of child names
+ * @len: a pointer to the number of element in the list
+ * @max: the size of the array
+ *
+ * Build/extend a list of potential children allowed by the content tree
+ *
+ * returns the number of element in the list, or -1 in case of error.
+ */
+
+int
+xmlValidGetPotentialChildren(xmlElementContent *ctree,
+ const xmlChar **names,
+ int *len, int max) {
+ int i;
+
+ if ((ctree == NULL) || (names == NULL) || (len == NULL))
+ return(-1);
+ if (*len >= max) return(*len);
+
+ switch (ctree->type) {
+ case XML_ELEMENT_CONTENT_PCDATA:
+ for (i = 0; i < *len;i++)
+ if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len);
+ names[(*len)++] = BAD_CAST "#PCDATA";
+ break;
+ case XML_ELEMENT_CONTENT_ELEMENT:
+ for (i = 0; i < *len;i++)
+ if (xmlStrEqual(ctree->name, names[i])) return(*len);
+ names[(*len)++] = ctree->name;
+ break;
+ case XML_ELEMENT_CONTENT_SEQ:
+ xmlValidGetPotentialChildren(ctree->c1, names, len, max);
+ xmlValidGetPotentialChildren(ctree->c2, names, len, max);
+ break;
+ case XML_ELEMENT_CONTENT_OR:
+ xmlValidGetPotentialChildren(ctree->c1, names, len, max);
+ xmlValidGetPotentialChildren(ctree->c2, names, len, max);
+ break;
+ }
+
+ return(*len);
+}
+
+/*
+ * Dummy function to suppress messages while we try out valid elements
+ */
+static void XMLCDECL xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
+ const char *msg ATTRIBUTE_UNUSED, ...) {
+ return;
+}
+
+/**
+ * xmlValidGetValidElements:
+ * @prev: an element to insert after
+ * @next: an element to insert next
+ * @names: an array to store the list of child names
+ * @max: the size of the array
+ *
+ * This function returns the list of authorized children to insert
+ * within an existing tree while respecting the validity constraints
+ * forced by the Dtd. The insertion point is defined using @prev and
+ * @next in the following ways:
+ * to insert before 'node': xmlValidGetValidElements(node->prev, node, ...
+ * to insert next 'node': xmlValidGetValidElements(node, node->next, ...
+ * to replace 'node': xmlValidGetValidElements(node->prev, node->next, ...
+ * to prepend a child to 'node': xmlValidGetValidElements(NULL, node->childs,
+ * to append a child to 'node': xmlValidGetValidElements(node->last, NULL, ...
+ *
+ * pointers to the element names are inserted at the beginning of the array
+ * and do not need to be freed.
+ *
+ * returns the number of element in the list, or -1 in case of error. If
+ * the function returns the value @max the caller is invited to grow the
+ * receiving array and retry.
+ */
+
+int
+xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
+ int max) {
+ xmlValidCtxt vctxt;
+ int nb_valid_elements = 0;
+ const xmlChar *elements[256]={0};
+ int nb_elements = 0, i;
+ const xmlChar *name;
+
+ xmlNode *ref_node;
+ xmlNode *parent;
+ xmlNode *test_node;
+
+ xmlNode *prev_next;
+ xmlNode *next_prev;
+ xmlNode *parent_childs;
+ xmlNode *parent_last;
+
+ xmlElement *element_desc;
+
+ if (prev == NULL && next == NULL)
+ return(-1);
+
+ if (names == NULL) return(-1);
+ if (max <= 0) return(-1);
+
+ memset(&vctxt, 0, sizeof (xmlValidCtxt));
+ vctxt.error = xmlNoValidityErr; /* this suppresses err/warn output */
+
+ nb_valid_elements = 0;
+ ref_node = prev ? prev : next;
+ parent = ref_node->parent;
+
+ /*
+ * Retrieves the parent element declaration
+ */
+ element_desc = xmlGetDtdElementDesc(parent->doc->intSubset,
+ parent->name);
+ if ((element_desc == NULL) && (parent->doc->extSubset != NULL))
+ element_desc = xmlGetDtdElementDesc(parent->doc->extSubset,
+ parent->name);
+ if (element_desc == NULL) return(-1);
+
+ /*
+ * Do a backup of the current tree structure
+ */
+ prev_next = prev ? prev->next : NULL;
+ next_prev = next ? next->prev : NULL;
+ parent_childs = parent->children;
+ parent_last = parent->last;
+
+ /*
+ * Creates a dummy node and insert it into the tree
+ */
+ test_node = xmlNewDocNode (ref_node->doc, NULL, BAD_CAST "<!dummy?>", NULL);
+ if (test_node == NULL)
+ return(-1);
+
+ test_node->parent = parent;
+ test_node->prev = prev;
+ test_node->next = next;
+ name = test_node->name;
+
+ if (prev) prev->next = test_node;
+ else parent->children = test_node;
+
+ if (next) next->prev = test_node;
+ else parent->last = test_node;
+
+ /*
+ * Insert each potential child node and check if the parent is
+ * still valid
+ */
+ nb_elements = xmlValidGetPotentialChildren(element_desc->content,
+ elements, &nb_elements, 256);
+
+ for (i = 0;i < nb_elements;i++) {
+ test_node->name = elements[i];
+ if (xmlValidateOneElement(&vctxt, parent->doc, parent)) {
+ int j;
+
+ for (j = 0; j < nb_valid_elements;j++)
+ if (xmlStrEqual(elements[i], names[j])) break;
+ names[nb_valid_elements++] = elements[i];
+ if (nb_valid_elements >= max) break;
+ }
+ }
+
+ /*
+ * Restore the tree structure
+ */
+ if (prev) prev->next = prev_next;
+ if (next) next->prev = next_prev;
+ parent->children = parent_childs;
+ parent->last = parent_last;
+
+ /*
+ * Free up the dummy node
+ */
+ test_node->name = name;
+ xmlFreeNode(test_node);
+
+ return(nb_valid_elements);
+}
+#endif /* LIBXML_VALID_ENABLED */
+
+#define bottom_valid
+#include "elfgcchack.h"
diff --git a/vms/build_libxml.com b/vms/build_libxml.com
new file mode 100755
index 0000000..3a6fcc0
--- /dev/null
+++ b/vms/build_libxml.com
@@ -0,0 +1,273 @@
+$! BUILD_LIBXML.COM
+$!
+$! Build the LIBXML library
+$!
+$! Arguments:
+$!
+$! "DEBUG" - build everything in debug
+$!
+$! This procedure creates an object library XML_LIBDIR:LIBXML.OLB directory.
+$! After the library is built, you can link LIBXML routines into
+$! your code with the command
+$!
+$! $ LINK your_modules,XML_LIBDIR:LIBXML.OLB/LIBRARY
+$!
+$! Change History
+$! --------------
+$! Command file author : John A Fotheringham (jaf@jafsoft.com)
+$! Update history : 19 March 2008 Tycho Hilhorst
+$! - added module schematron.c (prevent xmllint errors)
+$! - added /DEF and /INCLUDE options to cc_opts to tell
+$! config.h is available, and where to find it
+$! : 13 October 2003 Craig Berry (craigberry@mac.com)
+$! more new module additions
+$! : 25 April 2003 Craig Berry (craigberry@mac.com)
+$! added xmlreader.c and relaxng.c to source list
+$! : 28 September 2002 Craig Berry (craigberry@mac.com)
+$! updated to work with current sources
+$! miscellaneous enhancements to build process
+$!
+$!- configuration -------------------------------------------------------------
+$!
+$!- compile command. If p1="nowarn" suppress the expected warning types
+$!
+$ cc_opts = "/nowarn/DEF=HAVE_CONFIG_H/NAMES=(as_is,SHORTENED)/FLOAT=IEEE/IEEE_MODE=DENORM_RESULTS/INCLUDE=xml_srcdir"
+$!
+$ if p1.eqs."DEBUG" .or. p2.eqs."DEBUG"
+$ then
+$ debug = "Y"
+$ cc_command = "CC''cc_opts'/DEBUG/NOOPTIMIZE/LIST/SHOW=ALL"
+$ else
+$ debug = "N"
+$ cc_command = "CC''cc_opts'"
+$ endif
+$!
+$!- list of sources to be built into the LIBXML library. Compare this list
+$! to the definition of "libxml2_la_SOURCES" in the file MAKEFILE.IN.
+$! Currently this definition includes the list WITH_TRIO_SOURCES_TRUE
+$!
+$ sources = "parser.c SAX.c entities.c encoding.c error.c parserInternals.c"
+$ sources = sources + " tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c"
+$ sources = sources + " valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c"
+$ sources = sources + " xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c"
+$ sources = sources + " catalog.c globals.c threads.c c14n.c xmlstring.c"
+$ sources = sources + " xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c"
+$ sources = sources + " triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c"
+$ sources = sources + " xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c"
+$ sources = sources + " schematron.c xmlmodule.c buf.c"
+$!
+$!- list of main modules to compile and link. Compare this list to the
+$! definition of bin_PROGRAMS in MAKEFILE.IN
+$!
+$ bin_progs = "xmllint xmlcatalog"
+$!
+$!- list of test modules to compile and link. Compare this list to the
+$! definition of noinst_PROGRAMS in MAKEFILE.
+$!
+$ noinst_PROGRAMS = "testSchemas testRelax testSAX testHTML testXPath testURI " -
+ + "testThreads testC14N testAutomata testRegexp testReader"
+$!
+$!- set up build logicals -----------------------------------------------------\
+$!
+$!
+$!- start from where the procedure is in case it's submitted in batch ----------\
+$!
+$ whoami = f$parse(f$environment("PROCEDURE"),,,,"NO_CONCEAL")
+$ procdir = f$parse(whoami,,,"DEVICE") + f$parse(whoami,,,"DIRECTORY")
+$ set default 'procdir'
+$!
+$ if f$trnlnm("XML_LIBDIR").eqs.""
+$ then
+$ if f$search("[-]lib.dir") .eqs. ""
+$ then
+$ create/directory/log [-.lib]
+$ endif
+$ xml_libdir = f$parse("[-.lib]",,,"DEVICE") + f$parse("[-.lib]",,,"DIRECTORY")
+$ define/process XML_LIBDIR 'xml_libdir'
+$ write sys$output "Defining XML_LIBDIR as """ + f$trnlnm("XML_LIBDIR") + """
+$ endif
+$!
+$ if f$trnlnm("XML_SRCDIR").eqs.""
+$ then
+$ globfile = f$search("[-...]globals.c")
+$ if globfile.eqs.""
+$ then
+$ write sys$output "Can't locate globals.c. You need to manually define a XML_SRCDIR logical"
+$ exit
+$ else
+$ srcdir = f$parse(globfile,,,"DEVICE") + f$parse(globfile,,,"DIRECTORY")
+$ define/process XML_SRCDIR "''srcdir'"
+$ write sys$output "Defining XML_SRCDIR as ""''srcdir'"""
+$ endif
+$ endif
+$!
+$ copy/log config.vms xml_srcdir:config.h
+$! copy/log xmlversion.h [-.include.libxml]
+$!
+$ if f$trnlnm("libxml").eqs.""
+$ then
+$ globfile = f$search("[-...]globals.h")
+$ if globfile.eqs.""
+$ then
+$ write sys$output "Can't locate globals.h. You need to manually define a LIBXML logical"
+$ exit
+$ else
+$ includedir = f$parse(globfile,,,"DEVICE") + f$parse(globfile,,,"DIRECTORY")
+$ define/process libxml "''includedir'"
+$ write sys$output "Defining libxml as ""''includedir'"""
+$ endif
+$ endif
+$!
+$!- set up error handling (such as it is) -------------------------------------
+$!
+$ exit_status = 1
+$ saved_default = f$environment("default")
+$ on error then goto ERROR_OUT
+$ on control_y then goto ERROR_OUT
+$!
+$!- move to the source directory and create any necessary subdirs and the
+$! object library
+$!
+$ set default xml_srcdir
+$ if f$search("DEBUG.DIR").eqs."" then create/dir [.DEBUG]
+$ if f$search("XML_LIBDIR:LIBXML.OLB").eqs.""
+$ then
+$ write sys$output "Creating new object library XML_LIBDIR:LIBXML.OLB"
+$ library/create XML_LIBDIR:LIBXML.OLB
+$ endif
+$!
+$ goto start_here
+$ start_here: ! move this line to debug/rerun parts of this command file
+$!
+$!- compile modules into the library ------------------------------------------
+$!
+$ lib_command = "LIBRARY/REPLACE/LOG XML_LIBDIR:LIBXML.OLB"
+$ link_command = ""
+$!
+$ write sys$output ""
+$ write sys$output "Building modules into the LIBXML object library"
+$ write sys$output ""
+$!
+$ s_no = 0
+$ sources = f$edit(sources,"COMPRESS")
+$!
+$ source_loop:
+$!
+$ next_source = f$element (S_no," ",sources)
+$ if next_source.nes."" .and. next_source.nes." "
+$ then
+$!
+$ on error then goto ERROR_OUT
+$ on control_y then goto ERROR_OUT
+$ call build 'next_source'
+$ s_no = s_no + 1
+$ goto source_loop
+$!
+$ endif
+$!
+$!- now build self-test programs ----------------------------------------------
+$!
+$! these programs are built as ordinary modules into XML_LIBDIR:LIBXML.OLB. Here they
+$! are built a second time with /DEFINE=(STANDALONE) in which case a main()
+$! is also compiled into the module
+$
+$ lib_command = ""
+$ link_command = "LINK"
+$!
+$ library/compress XML_LIBDIR:LIBXML.OLB
+$ purge XML_LIBDIR:LIBXML.OLB
+$!
+$ write sys$output ""
+$ write sys$output "Building STANDALONE self-test programs"
+$ write sys$output ""
+$!
+$ call build NANOFTP.C /DEFINE=(STANDALONE)
+$ call build NANOHTTP.C /DEFINE=(STANDALONE)
+$ call build TRIONAN.C /DEFINE=(STANDALONE)
+$!
+$!- now build main and test programs ------------------------------------------
+$!
+$!
+$ lib_command = ""
+$ link_command = "LINK"
+$!
+$ write sys$output ""
+$ write sys$output "Building main programs and test programs"
+$ write sys$output ""
+$!
+$ p_no = 0
+$ all_progs = bin_progs + " " + noinst_PROGRAMS
+$ all_progs = f$edit(all_progs,"COMPRESS")
+$!
+$ prog_loop:
+$!
+$ next_prog = f$element (p_no," ",all_progs)
+$ if next_prog.nes."" .and. next_prog.nes." "
+$ then
+$!
+$ on error then goto ERROR_OUT
+$ on control_y then goto ERROR_OUT
+$ call build 'next_prog'.c
+$ p_no = p_no + 1
+$ goto prog_loop
+$!
+$ endif
+$!
+$!- Th-th-th-th-th-that's all folks! ------------------------------------------
+$!
+$ goto exit_here ! move this line to avoid parts of this command file
+$ exit_here:
+$!
+$ exit
+$ goto exit_out
+$!
+$!
+$EXIT_OUT:
+$!
+$ purge/nolog [.debug]
+$ set default 'saved_default
+$ exit 'exit_status
+$!
+$
+$ERROR_OUT:
+$ exit_status = $status
+$ write sys$output "''f$message(exit_status)'"
+$ goto EXIT_OUT
+$!
+$!- the BUILD subroutine. Compile then insert into library or link as required
+$!
+$BUILD: subroutine
+$ on warning then goto EXIT_BUILD
+$ source_file = p1
+$ name = f$parse(source_file,,,"NAME")
+$ object_file = f$parse("[.debug].OBJ",name,,,"SYNTAX_ONLY")
+$!
+$!- compile
+$!
+$ write sys$output "''cc_command'''p2'/object=''object_file' ''source_file'"
+$ cc_command'p2' /object='object_file 'source_file'
+$!
+$!- insert into library if command defined
+$!
+$ if lib_command.nes."" then lib_command 'object_file'
+$!
+$!- link module if command defined
+$ if link_command.nes.""
+$ then
+$ opts = ""
+$ if debug then opts = "/DEBUG"
+$ write sys$output "''link_command'''opts' ''object_file',XML_LIBDIR:libxml.olb/library"
+$ if f$search( "sys$library:iconv.olb" ) .eqs. ""
+$ then
+$ link_command'opts' 'object_file',-
+ XML_LIBDIR:libxml.olb/library
+$ else
+$ link_command'opts' 'object_file',-
+ XML_LIBDIR:libxml.olb/library,sys$library:iconv/lib
+$ endif
+$ endif
+$!
+$EXIT_BUILD:
+$ exit $status
+$!
+$endsubroutine
diff --git a/vms/config.vms b/vms/config.vms
new file mode 100755
index 0000000..d1cd7f3
--- /dev/null
+++ b/vms/config.vms
@@ -0,0 +1,216 @@
+/* config.h */
+
+#define VMS 1
+
+/* Define if you have the strftime function. */
+#define HAVE_STRFTIME 1
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+#undef PACKAGE
+#undef VERSION
+#undef HAVE_LIBZ
+#undef HAVE_LIBM
+#undef HAVE_ISINF
+#if defined(_IEEE_FP) && (__CRTL_VER >= 60200000)
+# define HAVE_ISNAN 1
+#endif
+#undef HAVE_LIBHISTORY
+#undef HAVE_LIBREADLINE
+
+#define ICONV_CONST
+
+/* Define if you have the class function. */
+#undef HAVE_CLASS
+
+/* Define if you have the finite function. */
+#undef HAVE_FINITE
+
+/* Define if you have the fp_class function. */
+#define HAVE_FP_CLASS 1
+
+/* Define if you have the fpclass function. */
+#undef HAVE_FPCLASS
+
+/* Define if you have the isnand function. */
+#undef HAVE_ISNAND
+
+/* Define if you have the localtime function. */
+#define HAVE_LOCALTIME 1
+
+/* Define if you have the snprintf function. */
+#undef HAVE_SNPRINTF
+
+/* Define if you have the strdup function. */
+#define HAVE_STRDUP 1
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR 1
+
+/* Define if you have the strftime function. */
+#define HAVE_STRFTIME 1
+
+/* Define if you have the strndup function. */
+#undef HAVE_STRNDUP
+
+/* Define if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define if you have the <fp_class.h> header file. */
+#define HAVE_FP_CLASS_H 1
+
+/* Define if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define if you have the <nan.h> header file. */
+#undef HAVE_NAN_H
+
+/* Define if you have the <ndir.h> header file. */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define if you have the <sys/dir.h> header file. */
+#undef HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define if you have the <sys/ndir.h> header file. */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Up to this point this is just a hard-wired version of
+ * config.h. After this will be anything else we need
+ * that is VMS-specific.
+ */
+
+/* For best results, compile with /NAMES=(SHORTENED), which requires
+ * DEC C 5.7 or later. For older compilers, the shortened names below
+ * are the same ones the mangler generates in C 5.7 and later. These may
+ * work, though there will probably be some conflicts with redefinitions
+ * in globals.h.
+ */
+
+#if __DECC_VER < 57000000
+/* 0 1 2 3 0 1 2 3
+ * 123456789012345678901234567890123456789 1234567890123456789012345678901
+ */
+#define __xmlDoValidityCheckingDefaultValue __xmlDoValidityChecking3qad3pq$
+#define __xmlSubstituteEntitiesDefaultValue __xmlSubstituteEntities0pij13u$
+#define trio_locale_set_thousand_separator trio_locale_set_thousan259ikkk$
+#define xmlDoValidityCheckingDefaultValue xmlDoValidityCheckingDe1bcsei4$
+#define xmlParseBalancedChunkMemoryRecover xmlParseBalancedChunkMe1lu1e86$
+#define xmlParseElementChildrenContentDecl xmlParseElementChildren1mp6pcb$
+#define xmlParserInputBufferCreateFilename xmlParserInputBufferCre36lujn2$
+#define xmlRegisterDefaultInputCallbacks xmlRegisterDefaultInput3vin0cp$
+#define xmlRegisterDefaultOutputCallbacks xmlRegisterDefaultOutpu0q443dd$
+#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDe28k2c80$
+#define xmlUCSIsAlphabeticPresentationForms xmlUCSIsAlphabeticPrese2qr24s3$
+#define xmlUCSIsArabicPresentationFormsB xmlUCSIsArabicPresentat1gajvg8$
+#define xmlUCSIsArabicPresentationFormsA xmlUCSIsArabicPresentat3sq1bti$
+#define xmlUCSIsCJKCompatibilityIdeographsSupplement xmlUCSIsCJKCompatibilit0or40ki$
+#define xmlUCSIsCJKCompatibilityIdeographs xmlUCSIsCJKCompatibilit2nodmc5$
+#define xmlUCSIsCJKSymbolsandPunctuation xmlUCSIsCJKSymbolsandPu0a3i7ra$
+#define xmlUCSIsCJKUnifiedIdeographsExtensionA xmlUCSIsCJKUnifiedIdeog11ig3fd$
+#define xmlUCSIsCJKUnifiedIdeographsExtensionB xmlUCSIsCJKUnifiedIdeog3d22n2n$
+#define xmlUCSIsCombiningDiacriticalMarks xmlUCSIsCombiningDiacri3tj3nl8$
+#define xmlUCSIsCombiningMarksforSymbols xmlUCSIsCombiningMarksf3ftqd7s$
+#define xmlUCSIsEnclosedCJKLettersandMonths xmlUCSIsEnclosedCJKLett0nq67g4$
+#define xmlUCSIsHalfwidthandFullwidthForms xmlUCSIsHalfwidthandFul047l0a1$
+#define xmlUCSIsHighPrivateUseSurrogates xmlUCSIsHighPrivateUseS071kh83$
+#define xmlUCSIsIdeographicDescriptionCharacters xmlUCSIsIdeographicDesc1rovf8g$
+#define xmlUCSIsMathematicalAlphanumericSymbols xmlUCSIsMathematicalAlp2ag8r44$
+#define xmlUCSIsOpticalCharacterRecognition xmlUCSIsOpticalCharacte1juuh06$
+#define xmlUCSIsSuperscriptsandSubscripts xmlUCSIsSuperscriptsand3fi4eup$
+#define xmlUCSIsUnifiedCanadianAboriginalSyllabics xmlUCSIsUnifiedCanadian0lbvi9b$
+#define xmlValidCtxtNormalizeAttributeValue xmlValidCtxtNormalizeAt0q11n5f$
+#define xmlXPathRegisteredVariablesCleanup xmlXPathRegisteredVaria1uvs4uc$
+
+#endif
+
+#define xmlBufferWriteChar xmlBufferWriteChar2
+
+#include <inttypes.h>
+
+#define HAVE_DLOPEN 1
+#define HAVE_DLFCN_H 1
diff --git a/vms/diffs.vms b/vms/diffs.vms
new file mode 100644
index 0000000..5402910
--- /dev/null
+++ b/vms/diffs.vms
@@ -0,0 +1,192 @@
+--------------------------------------------------------------------------
+GLOBALS.C
+
+105a106
+> int xmlDoValidityCheckingDefaultValue = 0;
+111,121c112,113
+< #if defined(VMS) || defined(__VMS)
+< #define PLATFORM_VMS
+< /* int xmlDoValidityCheckingDefaultVal = 0;
+< * int xmlSubstituteEntitiesDefaultVal = 0;
+< */
+< #define xmlDoValidityCheckingDefaultValue xmlDoValidityCheckingDefaultVal
+< #define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
+< #else
+< int xmlDoValidityCheckingDefaultValue = 0;
+< int xmlSubstituteEntitiesDefaultValue = 0;
+< #endif
+---
+> int xmlSubstituteEntitiesDefaultValue = 0;
+>
+289,291d280
+< #ifdef PLATFORM_VMS
+< gs->xmlDoValidityCheckingDefaultVal = 0;
+< #else
+293,294d281
+< #endif
+<
+316,318d302
+< #ifdef PLATFORM_VMS
+< gs->xmlSubstituteEntitiesDefaultVal = 0;
+< #else
+320d303
+< #endif
+404,419c387,390
+< #ifdef PLATFORM_VMS
+< extern int xmlDoValidityCheckingDefaultVal;
+< #undef xmlDoValidityCheckingDefaultVal
+< int *
+< __xmlDoValidityCheckingDefVal(void) {
+< if (IS_MAIN_THREAD)
+< return (&xmlDoValidityCheckingDefaultVal);
+< else
+< return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultVal);
+< }
+< #define __xmlDoValidityCheckingDefaultValue __xmlDoValidityCheckingDefVal
+< #else
+< extern int xmlDoValidityCheckingDefaultValue;
+< #undef xmlDoValidityCheckingDefaultValue
+< int *
+< __xmlDoValidityCheckingDefaultValue(void) {
+---
+> extern int xmlDoValidityCheckingDefaultValue;
+> #undef xmlDoValidityCheckingDefaultValue
+> int *
+> __xmlDoValidityCheckingDefaultValue(void) {
+424,425c395
+< }
+< #endif
+---
+> }
+577,592c547,550
+< #ifdef PLATFORM_VMS
+< extern int xmlSubstituteEntitiesDefaultVal;
+< #undef xmlSubstituteEntitiesDefaultVal
+< int *
+< __xmlSubsEntitiesDefaultValue(void) {
+< if (IS_MAIN_THREAD)
+< return (&xmlSubstituteEntitiesDefaultVal);
+< else
+< return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultVal);
+< }
+< #define __xmlSubstituteEntitiesDefaultValue __xmlSubsEntitiesDefaultValue
+< #else
+< extern int xmlSubstituteEntitiesDefaultValue;
+< #undef xmlSubstituteEntitiesDefaultValue
+< int *
+< __xmlSubstituteEntitiesDefaultValue(void) {
+---
+> extern int xmlSubstituteEntitiesDefaultValue;
+> #undef xmlSubstituteEntitiesDefaultValue
+> int *
+> __xmlSubstituteEntitiesDefaultValue(void) {
+597,598c555
+< }
+< #endif
+---
+> }
+
+
+--------------------------------------------------------------------------
+TRIO.C
+113,116d112
+< #if defined(VMS) || defined(__VMS)
+< # include <unistd.h>
+< #endif /* Platform is VMS */
+<
+123d118
+<
+
+
+--------------------------------------------------------------------------
+GLOBALS.H
+78,86c78,79
+< #if defined(VMS) || defined(__VMS)
+< int xmlSubstituteEntitiesDefaultVal; /* 31 character name limit */
+< int xmlDoValidityCheckingDefaultVal;
+< #define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
+< #define xmlDoValidityCheckingDefaultValue xmlDoValidityCheckingDefaultVal
+< #else
+< int xmlSubstituteEntitiesDefaultValue;
+< int xmlDoValidityCheckingDefaultValue;
+< #endif
+---
+> int xmlSubstituteEntitiesDefaultValue;
+> int xmlDoValidityCheckingDefaultValue;
+211,226c204,209
+< #if defined(VMS) || defined(__VMS)
+< #ifdef LIBXML_THREAD_ENABLED
+< extern int *__xmlDoValidityCheckingDefaultVal(void);
+< #define xmlDoValidityCheckingDefaultVal \
+< (*(__xmlDoValidityCheckingDefaultVal()))
+< #else
+< LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultVal;
+< #endif
+< #else
+< #ifdef LIBXML_THREAD_ENABLED
+< extern int *__xmlDoValidityCheckingDefaultValue(void);
+< #define xmlDoValidityCheckingDefaultValue \
+< (*(__xmlDoValidityCheckingDefaultValue()))
+< #else
+< LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
+< #endif
+---
+> #ifdef LIBXML_THREAD_ENABLED
+> extern int *__xmlDoValidityCheckingDefaultValue(void);
+> #define xmlDoValidityCheckingDefaultValue \
+> (*(__xmlDoValidityCheckingDefaultValue()))
+> #else
+> LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
+317,332c300,305
+< #if defined(VMS) || defined(__VMS)
+< #ifdef LIBXML_THREAD_ENABLED
+< extern int *__xmlSubsEntitiesDefaultValue(void);
+< #define xmlSubsEntitiesDefaultValue \
+< (*(__xmlSubsEntitiesDefaultValue()))
+< #else
+< LIBXML_DLL_IMPORT extern int xmlSubsEntitiesDefaultValue;
+< #endif
+< #else
+< #ifdef LIBXML_THREAD_ENABLED
+< extern int *__xmlSubstituteEntitiesDefaultValue(void);
+< #define xmlSubstituteEntitiesDefaultValue \
+< (*(__xmlSubstituteEntitiesDefaultValue()))
+< #else
+< LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
+< #endif
+---
+> #ifdef LIBXML_THREAD_ENABLED
+> extern int *__xmlSubstituteEntitiesDefaultValue(void);
+> #define xmlSubstituteEntitiesDefaultValue \
+> (*(__xmlSubstituteEntitiesDefaultValue()))
+> #else
+> LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
+
+
+--------------------------------------------------------------------------
+XMLIO.H
+79,82d78
+< #if defined(VMS) || defined(__VMS)
+< void xmlRegisterDefInputCallbacks (void);
+< #define xmlRegisterDefaultInputCallbacks xmlRegisterDefInputCallbacks
+< #else
+84d79
+< #endif
+130,133d124
+< #if defined(VMS) || defined(__VMS)
+< void xmlRegisterDefOutputCallbacks(void);
+< #define xmlRegisterDefaultOutputCallbacks xmlRegisterDefOutputCallbacks
+< #else
+135,136d125
+< #endif
+<
+
+--------------------------------------------------------------------------
+XPATHINTERNALS.H
+433,436d432
+< #if defined(VMS) || defined(__VMS)
+< void xmlXPathRegisteredVarsCleanup(xmlXPathContextPtr ctxt);
+< #define xmlXPathRegisteredVariablesCleanup xmlXPathRegisteredVarsCleanup
+< #else
+438d433
+< #endif
diff --git a/vms/readme.vms b/vms/readme.vms
new file mode 100644
index 0000000..91dddeb
--- /dev/null
+++ b/vms/readme.vms
@@ -0,0 +1,143 @@
+Issues in porting libxml to VMS
+===============================
+
+Here's a summary of the issues I encountered when building LIBXML under
+VMS. There was some VMS support in the version I got, but it was a little
+out of date with the result that some newer files had problems.
+
+I present this list "as is" to hopefully act as a guide to anyone having
+problems in the future.
+
+That's it. Good luck!
+
+John A Fotheringham (jaf@jafsoft.com)
+October 2001
+
+Updated October 2002 by Craig A Berry (craigberry@mac.com)
+
+Installation kit
+----------------
+
+- File attributes. Having downloaded essentially a Unix distribution, some
+ of the file attributes weren't correct... especially those in the [.VMS]
+ subdirectory. In EDT you could see line feeds and carriage returns as
+ <LF><CR> etc. To correct this use the command
+
+ $ set file <filespec> /attr=rfm=stm
+
+ This sets the record format to be "stream". Other variants may be used
+ instead depending on how you got the files onto your system. Files will
+ look okay in an EDT editor once the attributes are set. Without
+ this the command file may not run correctly, since it may be interpreted
+ as a single line.
+
+- VMS-specific files are in a [.VMS] directory. If you've found this file
+ then you already know this :-) This directory contains
+
+ BUILD_LIBXML.COM - a build command file, which I've radically re-worked
+ CONFIG.VMS - a configuration file to replace config.h
+
+- Don't execute BUILD_LIBXML.COM until you've done all the following
+
+ - read these notes
+ - reviewed the configuration section of BUILD_LIBXML.COM, and in particular
+ updated the module lists in line with MAKEFILE
+ - identified the location of the include files, so that you can manually
+ set the LIBXML logical if need be.
+ - re-read these notes :-p
+
+ instructions for all these steps are below.
+
+- the file [.vms]config.vms is used in lieu of a Configure-generated config.h.
+ This file contains a number of define statements that identify the software
+ options required under VMS
+
+- The include files are in a [.INCLUDE.LIBXML] subdirectory. You need
+ a logical "libxml" to point to this so that include statements of the
+ form
+
+ #include <libxml/parser.h>
+
+ will work correctly. The source files are mostly two levels above this
+ directory, although there are some .h files there as well.
+
+- The command file BUILD_LIBXML.COM will do the following
+
+ - setup some logicals
+ - set def to the source directory
+ - compile modules and place them into a LIBXML.OLB library
+ - compile and link a number of self-test programs
+ - compile and link a number of utilities and test programs
+ - set def back to the original directory (i.e. if it fails you might not be
+ where you started :-)
+
+ before running this command file review the configuration segment at
+ the top. In particular compare the lists of modules with those in the
+ most recent version of the Unix MAKEFILE. Instructions are contained
+ in the command file itself.
+
+ The command file will attempt to set two logicals
+
+ - xml_srcdir. The directory containing the source files
+ - libxml. The include file directory.
+
+ It attempts this by looking for modules globals.c and globals.h in
+ nearby directories. If this logic fails, you'll need to manually define
+ these logicals.
+
+
+The TRIO package
+----------------
+- A sub-package TRIO is used to provide some functions not naturally available
+ under VMS. These include support for infinite and undefined numbers,
+ and specialised print functions like "snprintf"
+
+ I had to make several changes to trionan.c in discussion with the author
+ (hopefully these are now included in the distro, so I won't list them here)
+
+ To build this software we need to add
+
+ /IEEE_MODE=UNDERFLOW_TO_ZERO/FLOAT=IEEE
+
+ to the compile command for xpath.c and trio.c, and to any main program
+ that uses this functionality. BUILD_LIBXML.COM should do this for you.
+
+- to build in trio support you need the define WITH_TRIO to be set. This
+ is done by default for VMS in xmlversion.h
+
+
+Compiler and linker errors
+--------------------------
+- the DEC C compiler may produce a number of warnings when compiling the
+ C code. These include
+
+ - Implicit function warnings. These indicate functions whose type is
+ not defined in a .h file. This will probably only happen if your
+ configuration is not correct (e.g. for "snprintf" if you haven't
+ edited xmlversion.h to set WITH_TRIO
+
+ - uninitialised variables. Not usually a problem. You can solve this
+ by editing the code to initialise the variables affected
+
+Changes made to the codebase
+----------------------------
+- I changed all dummy declarations in trio.c to be
+
+ va_list dummy = NULL;
+
+ to prevent compiler whinge in TRIO.C about uninitialised variables
+
+- I had to add the following to nanoftp.c
+
+ #if defined(VMS) || defined(__VMS)
+ #define SOCKLEN_T unsigned int
+ #endif
+
+ This matches similar lines already added to nanohttp.c
+
+- Several variables and function names exceed the 31 character limit
+ of the VMS linker. The solution adopted has been to use the
+ /NAMES=SHORTENED compiler option, which requires DEC/Compaq C 5.7
+ or later. For a complete list of the names that needed shortening
+ and the short names generated by the compiler, see [.vms]config.vms.
+
diff --git a/win32/Makefile.bcb b/win32/Makefile.bcb
new file mode 100644
index 0000000..7129c61
--- /dev/null
+++ b/win32/Makefile.bcb
@@ -0,0 +1,355 @@
+# Makefile for libxml2, specific for Windows, BCB6 and Borland make.
+#
+# Take a look at the beginning and modify the variables to suit your
+# environment. Having done that, you can do a
+#
+# make [all] to build the libxml and the accompanying utilities.
+# make clean to remove all compiler output files and return to a
+# clean state.
+# make rebuild to rebuild everything from scratch. This basically does
+# a 'nmake clean' and then a 'nmake all'.
+# make install to install the library and its header files.
+#
+# August 2003, Eric Zurcher <Eric.Zurcher@csiro.au>
+# based on the MSVC version of
+# March 2002, Igor Zlatkovic <igor@zlatkovic.com>
+#
+
+# There should never be a need to modify anything below this line.
+# ----------------------------------------------------------------
+
+AUTOCONF = .\config.bcb
+!include $(AUTOCONF)
+
+!if !$d(BCB)
+BCB = $(MAKEDIR)\..
+!endif
+.autodepend
+
+# Names of various input and output components.
+XML_NAME = xml2
+XML_BASENAME = lib$(XML_NAME)
+XML_SO = $(XML_BASENAME).dll
+XML_IMP = $(XML_BASENAME).lib
+XML_DEF = $(XML_BASENAME).def
+XML_A = $(XML_BASENAME)_a.lib
+DUMMY = dir.exists
+
+# Place where we let the compiler put its intermediate trash.
+BINDIR = bin.bcb
+XML_INTDIR = int.bcb
+XML_INTDIR_A = int.a.bcb
+UTILS_INTDIR = int.utils.bcb
+
+# The preprocessor and its options.
+CPP = cpp32.exe -P- -DWIN32
+CPPFLAGS = -I"$(XML_SRCDIR)\include" -DNOLIBTOOL
+!if "$(WITH_THREADS)" != "no"
+CPPFLAGS = $(CPPFLAGS) -D_REENTRANT -D__MT__
+!endif
+
+# The compiler and its options.
+CC = bcc32.exe
+CFLAGS = -q -DWIN32 -D_NO_VCL -D_WINDOWS -D_MBCS -DEILSEQ=2 -DNOLIBTOOL -w-
+CFLAGS = $(CFLAGS) -I"$(XML_SRCDIR)" -I"$(XML_SRCDIR)\include" -I"$(INCPREFIX)" -I"$(INCLUDE)"
+!if "$(WITH_THREADS)" != "no"
+CFLAGS = $(CFLAGS) -D_REENTRANT -tWM
+!endif
+!if "$(DYNRUNTIME)" == "1"
+CFLAGS = $(CFLAGS) -tWR
+!endif
+!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls"
+CFLAGS = $(CFLAGS) -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
+!else if "$(WITH_THREADS)" == "native"
+CFLAGS = $(CFLAGS) -DHAVE_WIN32_THREADS
+!else if "$(WITH_THREADS)" == "posix"
+CFLAGS = $(CFLAGS) -DHAVE_PTHREAD_H
+!endif
+!if "$(WITH_ZLIB)" == "1"
+CFLAGS = $(CFLAGS) -DHAVE_ZLIB_H
+!endif
+!if "$(WITH_LZMA)" == "1"
+CFLAGS = $(CFLAGS) -DHAVE_LZMA_H
+!endif
+
+# The linker and its options.
+LD = ilink32.exe
+LDFLAGS = -q -U$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
+LDFLAGS = $(LDFLAGS) -L"$(BINDIR);$(LIBPREFIX);$(LIB);$(BCB)\lib;$(BCB)\lib\PSdk"
+LIBS = import32.lib
+!if "$(WITH_THREADS)" != "no" && "$(DYNRUNTIME)" == "1"
+LIBS = $(LIBS) cw32mti.lib
+!elif "$(WITH_THREADS)" != "no"
+LIBS = $(LIBS) cw32mt.lib
+!elif "$(DYNRUNTIME)" == "1"
+LIBS = $(LIBS) cw32i.lib
+!else
+LIBS = $(LIBS) cw32.lib
+!endif
+!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+LIBS = $(LIBS) wsock32.lib ws2_32.lib
+!endif
+!if "$(WITH_ICONV)" == "1"
+LIBS = $(LIBS) iconvomf.lib
+!endif
+!if "$(WITH_ZLIB)" == "1"
+LIBS = $(LIBS) zlibomf.lib
+!endif
+!if "$(WITH_LZMA)" == "1"
+LIBS = $(LIBS) liblzma.lib
+!endif
+!if "$(WITH_THREADS)" == "posix"
+LIBS = $(LIBS) pthreadVC.lib
+!endif
+!if "$(WITH_MODULES)" == "1"
+LIBS = $(LIBS) kernel32.lib
+!endif
+
+# The archiver and its options.
+AR = tlib.exe
+ARFLAGS = /P64 /0
+
+# Optimisation and debug symbols.
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS) -D_DEBUG -Od -v
+LDFLAGS = $(LDFLAGS) -v
+!else
+CFLAGS = $(CFLAGS) -DNDEBUG -O2
+LDFLAGS = $(LDFLAGS)
+!endif
+
+# Libxml object files.
+XML_OBJS = $(XML_INTDIR)\buf.obj\
+ $(XML_INTDIR)\c14n.obj\
+ $(XML_INTDIR)\catalog.obj\
+ $(XML_INTDIR)\chvalid.obj\
+ $(XML_INTDIR)\debugXML.obj\
+ $(XML_INTDIR)\dict.obj\
+ $(XML_INTDIR)\DOCBparser.obj\
+ $(XML_INTDIR)\encoding.obj\
+ $(XML_INTDIR)\entities.obj\
+ $(XML_INTDIR)\error.obj\
+ $(XML_INTDIR)\globals.obj\
+ $(XML_INTDIR)\hash.obj\
+ $(XML_INTDIR)\HTMLparser.obj\
+ $(XML_INTDIR)\HTMLtree.obj\
+ $(XML_INTDIR)\legacy.obj\
+ $(XML_INTDIR)\list.obj\
+ $(XML_INTDIR)\nanoftp.obj\
+ $(XML_INTDIR)\nanohttp.obj\
+ $(XML_INTDIR)\parser.obj\
+ $(XML_INTDIR)\parserInternals.obj\
+ $(XML_INTDIR)\pattern.obj\
+ $(XML_INTDIR)\relaxng.obj\
+ $(XML_INTDIR)\SAX.obj\
+ $(XML_INTDIR)\SAX2.obj\
+ $(XML_INTDIR)\schematron.obj\
+ $(XML_INTDIR)\threads.obj\
+ $(XML_INTDIR)\tree.obj\
+ $(XML_INTDIR)\uri.obj\
+ $(XML_INTDIR)\valid.obj\
+ $(XML_INTDIR)\xinclude.obj\
+ $(XML_INTDIR)\xlink.obj\
+ $(XML_INTDIR)\xmlIO.obj\
+ $(XML_INTDIR)\xmlmemory.obj\
+ $(XML_INTDIR)\xmlreader.obj\
+ $(XML_INTDIR)\xmlregexp.obj\
+ $(XML_INTDIR)\xmlmodule.obj\
+ $(XML_INTDIR)\xmlsave.obj\
+ $(XML_INTDIR)\xmlschemas.obj\
+ $(XML_INTDIR)\xmlschemastypes.obj\
+ $(XML_INTDIR)\xmlunicode.obj\
+ $(XML_INTDIR)\xmlwriter.obj\
+ $(XML_INTDIR)\xpath.obj\
+ $(XML_INTDIR)\xpointer.obj\
+ $(XML_INTDIR)\xmlstring.obj
+
+# Static libxml object files.
+XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\
+ $(XML_INTDIR_A)\c14n.obj\
+ $(XML_INTDIR_A)\catalog.obj\
+ $(XML_INTDIR_A)\chvalid.obj\
+ $(XML_INTDIR_A)\debugXML.obj\
+ $(XML_INTDIR_A)\dict.obj\
+ $(XML_INTDIR_A)\DOCBparser.obj\
+ $(XML_INTDIR_A)\encoding.obj\
+ $(XML_INTDIR_A)\entities.obj\
+ $(XML_INTDIR_A)\error.obj\
+ $(XML_INTDIR_A)\globals.obj\
+ $(XML_INTDIR_A)\hash.obj\
+ $(XML_INTDIR_A)\HTMLparser.obj\
+ $(XML_INTDIR_A)\HTMLtree.obj\
+ $(XML_INTDIR_A)\legacy.obj\
+ $(XML_INTDIR_A)\list.obj\
+ $(XML_INTDIR_A)\nanoftp.obj\
+ $(XML_INTDIR_A)\nanohttp.obj\
+ $(XML_INTDIR_A)\parser.obj\
+ $(XML_INTDIR_A)\parserInternals.obj\
+ $(XML_INTDIR_A)\pattern.obj\
+ $(XML_INTDIR_A)\relaxng.obj\
+ $(XML_INTDIR_A)\SAX.obj\
+ $(XML_INTDIR_A)\SAX2.obj\
+ $(XML_INTDIR_A)\schematron.obj\
+ $(XML_INTDIR_A)\threads.obj\
+ $(XML_INTDIR_A)\tree.obj\
+ $(XML_INTDIR_A)\uri.obj\
+ $(XML_INTDIR_A)\valid.obj\
+ $(XML_INTDIR_A)\xinclude.obj\
+ $(XML_INTDIR_A)\xlink.obj\
+ $(XML_INTDIR_A)\xmlIO.obj\
+ $(XML_INTDIR_A)\xmlmemory.obj\
+ $(XML_INTDIR_A)\xmlreader.obj\
+ $(XML_INTDIR_A)\xmlregexp.obj\
+ $(XML_INTDIR_A)\xmlmodule.obj\
+ $(XML_INTDIR_A)\xmlsave.obj\
+ $(XML_INTDIR_A)\xmlschemas.obj\
+ $(XML_INTDIR_A)\xmlschemastypes.obj\
+ $(XML_INTDIR_A)\xmlunicode.obj\
+ $(XML_INTDIR_A)\xmlwriter.obj\
+ $(XML_INTDIR_A)\xpath.obj\
+ $(XML_INTDIR_A)\xpointer.obj\
+ $(XML_INTDIR_A)\xmlstring.obj
+
+# Xmllint and friends executables.
+UTILS = $(BINDIR)\xmllint.exe\
+ $(BINDIR)\xmlcatalog.exe\
+ $(BINDIR)\testAutomata.exe\
+ $(BINDIR)\testC14N.exe\
+ $(BINDIR)\testDocbook.exe\
+ $(BINDIR)\testHTML.exe\
+ $(BINDIR)\testReader.exe\
+ $(BINDIR)\testRelax.exe\
+ $(BINDIR)\testRegexp.exe\
+ $(BINDIR)\testModule.exe\
+ $(BINDIR)\testSAX.exe\
+ $(BINDIR)\testSchemas.exe\
+ $(BINDIR)\testURI.exe\
+ $(BINDIR)\testXPath.exe\
+ $(BINDIR)\runtest.exe\
+ $(BINDIR)\runsuite.exe\
+ $(BINDIR)\testapi.exe\
+ $(BINDIR)\testlimits.exe
+
+
+!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
+UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
+!else if "$(WITH_THREADS)" == "posix"
+UTILS = $(UTILS) $(BINDIR)\testThreads.exe
+!endif
+
+
+all : libxml libxmla utils
+
+libxml : $(BINDIR)\$(XML_SO)
+
+libxmla : $(BINDIR)\$(XML_A)
+
+utils : $(UTILS)
+
+clean :
+ if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)
+ if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)
+ if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
+ if exist $(BINDIR) rmdir /S /Q $(BINDIR)
+
+distclean : clean
+ if exist config.* del config.*
+ if exist Makefile del Makefile
+
+rebuild : clean all
+
+install-libs : all
+ if not exist "$(INCPREFIX)\libxml2" mkdir "$(INCPREFIX)\libxml2"
+ if not exist "$(INCPREFIX)\libxml2\libxml" mkdir "$(INCPREFIX)\libxml2\libxml"
+ if not exist "$(BINPREFIX)" mkdir "$(BINPREFIX)"
+ if not exist "$(LIBPREFIX)" mkdir "$(LIBPREFIX)"
+ copy $(XML_SRCDIR)\include\libxml\*.h "$(INCPREFIX)\libxml2\libxml"
+ copy $(BINDIR)\$(XML_SO) "$(SOPREFIX)"
+ copy $(BINDIR)\$(XML_A) "$(LIBPREFIX)"
+ copy $(BINDIR)\$(XML_IMP) "$(LIBPREFIX)"
+ copy $(BINDIR)\*.exe "$(BINPREFIX)"
+
+install : install-libs
+ copy $(BINDIR)\*.exe "$(BINPREFIX)"
+
+install-dist : install-libs
+ copy $(BINDIR)\xml*.exe "$(BINPREFIX)"
+
+# This is a target for me, to make a binary distribution. Not for the public use,
+# keep your hands off :-)
+BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
+BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
+bindist : all
+ $(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist
+ cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
+
+
+# Makes the output directory.
+$(BINDIR)\$(DUMMY) :
+ if not exist $(BINDIR) mkdir $(BINDIR)
+ touch $(BINDIR)\$(DUMMY)
+
+# Makes the libxml intermediate directory.
+$(XML_INTDIR)\$(DUMMY) :
+ if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
+ touch $(XML_INTDIR)\$(DUMMY)
+
+# Makes the static libxml intermediate directory.
+$(XML_INTDIR_A)\$(DUMMY) :
+ if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
+ touch $(XML_INTDIR_A)\$(DUMMY)
+
+# An implicit rule for libxml compilation.
+{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj:
+ $(CC) $(CFLAGS) -n$(XML_INTDIR) -c $<
+
+# An implicit rule for static libxml compilation.
+{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj:
+ $(CC) $(CFLAGS) -DLIBXML_STATIC -n$(XML_INTDIR_A)\ -c $<
+
+# Compiles libxml source. Uses the implicit rule for commands.
+$(XML_OBJS) : $(XML_INTDIR)\$(DUMMY)
+
+# Compiles static libxml source. Uses the implicit rule for commands.
+$(XML_OBJS_A) : $(XML_INTDIR_A)\$(DUMMY)
+
+#def4bcb.exe : def4bcb.c
+
+# Creates the export definition file (DEF) for libxml.
+#$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR)\$(DUMMY) $(XML_DEF).src def4bcb.exe
+# $(CPP) $(CPPFLAGS) -o $(XML_INTDIR)\$(XML_DEF).tmp $(XML_DEF).src
+# def4bcb -msnames < $(XML_INTDIR)\$(XML_DEF).tmp > $(XML_INTDIR)\$(XML_DEF)
+
+# Creates the libxml shared object.
+$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS)
+ $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS)
+
+#$(BINDIR)\$(XML_SO) : $(BINDIR)\$(DUMMY) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
+# $(LD) $(LDFLAGS) -Tpd -Gi c0d32.obj $(XML_OBJS),$(BINDIR)\$(XML_SO),,$(LIBS),$(XML_INTDIR)\$(XML_DEF)
+
+# Creates the libxml archive.
+$(BINDIR)\$(XML_A) : $(BINDIR)\$(DUMMY) $(XML_OBJS_A)
+ $(AR) $(BINDIR)\$(XML_A) $(ARFLAGS) /u $(XML_OBJS_A)
+
+# Makes the utils intermediate directory.
+$(UTILS_INTDIR)\$(DUMMY) :
+ if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
+ touch $(UTILS_INTDIR)\$(DUMMY)
+
+# An implicit rule for xmllint and friends.
+!if "$(STATIC)" == "1"
+{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
+ $(CC) -DLIBXML_STATIC -w -tWC $(CFLAGS) -o$(UTILS_INTDIR)\$&.obj -c $<
+ $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj,$@,,$(LIBS) $(XML_A)
+!else
+{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
+ $(CC) $(CFLAGS) -tWC -o$(UTILS_INTDIR)\$&.obj -c $<
+ $(LD) $(LDFLAGS) c0x32.obj $(UTILS_INTDIR)\$&.obj $(XML_IMP),$@,,$(LIBS)
+!endif
+
+# Builds xmllint and friends. Uses the implicit rule for commands.
+$(UTILS) : $(UTILS_INTDIR)\$(DUMMY) $(BINDIR)\$(DUMMY) $(BINDIR)\$(XML_SO) $(BINDIR)\$(XML_A)
+
+# Source dependences should be autogenerated somehow here, but how to
+# do it? I have no clue.
+
diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw
new file mode 100644
index 0000000..1889376
--- /dev/null
+++ b/win32/Makefile.mingw
@@ -0,0 +1,354 @@
+# Makefile for libxml2, specific for Windows, GCC (mingw) and GNU make.
+#
+# Take a look at the beginning and modify the variables to suit your
+# environment. Having done that, you can do a
+#
+# nmake [all] to build the libxml and the accompanying utilities.
+# nmake clean to remove all compiler output files and return to a
+# clean state.
+# nmake rebuild to rebuild everything from scratch. This basically does
+# a 'nmake clean' and then a 'nmake all'.
+# nmake install to install the library and its header files.
+#
+# November 2002, Igor Zlatkovic <igor@zlatkovic.com>
+
+# There should never be a need to modify anything below this line.
+# ----------------------------------------------------------------
+
+AUTOCONF = .\config.mingw
+include $(AUTOCONF)
+
+# Names of various input and output components.
+XML_NAME = xml2
+XML_BASENAME = lib$(XML_NAME)
+XML_SO = $(XML_BASENAME).dll
+XML_IMP = $(XML_BASENAME).lib
+XML_A = $(XML_BASENAME).a
+
+# Place where we let the compiler put its output.
+BINDIR = bin.mingw
+XML_INTDIR = int.mingw
+XML_INTDIR_A = int.a.mingw
+UTILS_INTDIR = int.utils.mingw
+
+# The preprocessor and its options.
+CPP = gcc.exe -E
+CPPFLAGS += -I$(XML_SRCDIR)/include -DNOLIBTOOL
+ifeq ($(WITH_THREADS),1)
+CPPFLAGS += -D_REENTRANT
+endif
+
+# The compiler and its options.
+CC = gcc.exe
+CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS -DNOLIBTOOL
+CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE)
+ifneq ($(WITH_THREADS),no)
+CFLAGS += -D_REENTRANT
+endif
+ifeq ($(WITH_THREADS),yes)
+CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
+endif
+ifeq ($(WITH_THREADS),ctls)
+CFLAGS += -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS
+endif
+ifeq ($(WITH_THREADS),native)
+CFLAGS += -DHAVE_WIN32_THREADS
+endif
+ifeq ($(WITH_THREADS),posix)
+CFLAGS += -DHAVE_PTHREAD_H
+endif
+ifeq ($(WITH_ZLIB),1)
+CFLAGS += -DHAVE_ZLIB_H
+endif
+ifeq ($(WITH_LZMA),1)
+CFLAGS += -DHAVE_LZMA_H
+endif
+
+# The linker and its options.
+LD = gcc.exe
+LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
+LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
+LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
+LIBS =
+ifeq ($(WITH_FTP),1)
+CFLAGS += -D_WINSOCKAPI_
+LIBS += -lwsock32 -lws2_32
+endif
+ifeq ($(WITH_HTTP),1)
+CFLAGS += -D_WINSOCKAPI_
+LIBS += -lwsock32 -lws2_32
+endif
+ifeq ($(WITH_ICONV),1)
+LIBS += -liconv
+endif
+ifeq ($(WITH_ZLIB),1)
+# Could be named differently
+# LIBS += -lzdll
+LIBS += -lz
+endif
+ifeq ($(WITH_LZMA),1)
+LIBS += -llzma
+endif
+ifeq ($(WITH_THREADS),posix)
+LIBS += -lpthreadGC
+endif
+ifeq ($(WITH_MODULES),1)
+LIBS += -lkernel32
+endif
+
+LIBS += $(LIB)
+
+# The archiver and its options.
+AR = ar.exe
+ARFLAGS = -r
+
+# Optimisation and debug symbols.
+ifeq ($(DEBUG),1)
+CFLAGS += -D_DEBUG -g
+LDFLAGS +=
+else
+CFLAGS += -DNDEBUG -O2
+LDFLAGS +=
+endif
+
+
+# Libxml object files.
+XML_OBJS = $(XML_INTDIR)/buf.o\
+ $(XML_INTDIR)/c14n.o\
+ $(XML_INTDIR)/catalog.o\
+ $(XML_INTDIR)/chvalid.o\
+ $(XML_INTDIR)/debugXML.o\
+ $(XML_INTDIR)/dict.o\
+ $(XML_INTDIR)/DOCBparser.o\
+ $(XML_INTDIR)/encoding.o\
+ $(XML_INTDIR)/entities.o\
+ $(XML_INTDIR)/error.o\
+ $(XML_INTDIR)/globals.o\
+ $(XML_INTDIR)/hash.o\
+ $(XML_INTDIR)/HTMLparser.o\
+ $(XML_INTDIR)/HTMLtree.o\
+ $(XML_INTDIR)/legacy.o\
+ $(XML_INTDIR)/list.o\
+ $(XML_INTDIR)/nanoftp.o\
+ $(XML_INTDIR)/nanohttp.o\
+ $(XML_INTDIR)/parser.o\
+ $(XML_INTDIR)/parserInternals.o\
+ $(XML_INTDIR)/pattern.o\
+ $(XML_INTDIR)/relaxng.o\
+ $(XML_INTDIR)/SAX.o\
+ $(XML_INTDIR)/SAX2.o\
+ $(XML_INTDIR)/schematron.o\
+ $(XML_INTDIR)/threads.o\
+ $(XML_INTDIR)/tree.o\
+ $(XML_INTDIR)/uri.o\
+ $(XML_INTDIR)/valid.o\
+ $(XML_INTDIR)/xinclude.o\
+ $(XML_INTDIR)/xlink.o\
+ $(XML_INTDIR)/xmlIO.o\
+ $(XML_INTDIR)/xmlmemory.o\
+ $(XML_INTDIR)/xmlreader.o\
+ $(XML_INTDIR)/xmlregexp.o\
+ $(XML_INTDIR)/xmlmodule.o\
+ $(XML_INTDIR)/xmlsave.o\
+ $(XML_INTDIR)/xmlschemas.o\
+ $(XML_INTDIR)/xmlschemastypes.o\
+ $(XML_INTDIR)/xmlunicode.o\
+ $(XML_INTDIR)/xmlwriter.o\
+ $(XML_INTDIR)/xpath.o\
+ $(XML_INTDIR)/xpointer.o\
+ $(XML_INTDIR)/xmlstring.o
+
+XML_SRCS = $(subst .o,.c,$(subst $(XML_INTDIR)/,$(XML_SRCDIR)/,$(XML_OBJS)))
+
+# Static libxml object files.
+XML_OBJS_A = $(XML_INTDIR_A)/buf.o\
+ $(XML_INTDIR_A)/c14n.o\
+ $(XML_INTDIR_A)/catalog.o\
+ $(XML_INTDIR_A)/chvalid.o\
+ $(XML_INTDIR_A)/debugXML.o\
+ $(XML_INTDIR_A)/dict.o\
+ $(XML_INTDIR_A)/DOCBparser.o\
+ $(XML_INTDIR_A)/encoding.o\
+ $(XML_INTDIR_A)/entities.o\
+ $(XML_INTDIR_A)/error.o\
+ $(XML_INTDIR_A)/globals.o\
+ $(XML_INTDIR_A)/hash.o\
+ $(XML_INTDIR_A)/HTMLparser.o\
+ $(XML_INTDIR_A)/HTMLtree.o\
+ $(XML_INTDIR_A)/legacy.o\
+ $(XML_INTDIR_A)/list.o\
+ $(XML_INTDIR_A)/nanoftp.o\
+ $(XML_INTDIR_A)/nanohttp.o\
+ $(XML_INTDIR_A)/parser.o\
+ $(XML_INTDIR_A)/parserInternals.o\
+ $(XML_INTDIR_A)/pattern.o\
+ $(XML_INTDIR_A)/relaxng.o\
+ $(XML_INTDIR_A)/SAX.o\
+ $(XML_INTDIR_A)/SAX2.o\
+ $(XML_INTDIR_A)/schematron.o\
+ $(XML_INTDIR_A)/threads.o\
+ $(XML_INTDIR_A)/tree.o\
+ $(XML_INTDIR_A)/uri.o\
+ $(XML_INTDIR_A)/valid.o\
+ $(XML_INTDIR_A)/xinclude.o\
+ $(XML_INTDIR_A)/xlink.o\
+ $(XML_INTDIR_A)/xmlIO.o\
+ $(XML_INTDIR_A)/xmlmemory.o\
+ $(XML_INTDIR_A)/xmlreader.o\
+ $(XML_INTDIR_A)/xmlregexp.o\
+ $(XML_INTDIR_A)/xmlmodule.o\
+ $(XML_INTDIR_A)/xmlsave.o\
+ $(XML_INTDIR_A)/xmlschemas.o\
+ $(XML_INTDIR_A)/xmlschemastypes.o\
+ $(XML_INTDIR_A)/xmlunicode.o\
+ $(XML_INTDIR_A)/xmlwriter.o\
+ $(XML_INTDIR_A)/xpath.o\
+ $(XML_INTDIR_A)/xpointer.o\
+ $(XML_INTDIR_A)/xmlstring.o
+
+XML_SRCS_A = $(subst .o,.c,$(subst $(XML_INTDIR_A)/,$(XML_SRCDIR)/,$(XML_OBJS_A)))
+
+# Xmllint and friends executables.
+UTILS = $(BINDIR)/xmllint.exe\
+ $(BINDIR)/xmlcatalog.exe\
+ $(BINDIR)/testAutomata.exe\
+ $(BINDIR)/testC14N.exe\
+ $(BINDIR)/testDocbook.exe\
+ $(BINDIR)/testHTML.exe\
+ $(BINDIR)/testReader.exe\
+ $(BINDIR)/testRegexp.exe\
+ $(BINDIR)/testModule.exe\
+ $(BINDIR)/testRelax.exe\
+ $(BINDIR)/testSAX.exe\
+ $(BINDIR)/testSchemas.exe\
+ $(BINDIR)/testURI.exe\
+ $(BINDIR)/testXPath.exe\
+ $(BINDIR)/runtest.exe\
+ $(BINDIR)/runsuite.exe\
+ $(BINDIR)/testapi.exe\
+ $(BINDIR)/testlimits.exe
+
+ifeq ($(WITH_THREADS),yes)
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),ctls)
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),native)
+UTILS += $(BINDIR)/testThreadsWin32.exe
+endif
+ifeq ($(WITH_THREADS),posix)
+UTILS += $(BINDIR)/testThreads.exe
+endif
+
+all : dep libxml libxmla utils
+
+libxml : $(BINDIR)/$(XML_SO)
+
+libxmla : $(BINDIR)/$(XML_A)
+
+utils : $(UTILS)
+
+clean :
+ cmd.exe /C "if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)"
+ cmd.exe /C "if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)"
+ cmd.exe /C "if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)"
+ cmd.exe /C "if exist $(BINDIR) rmdir /S /Q $(BINDIR)"
+ cmd.exe /C "if exist depends.mingw del depends.mingw"
+
+distclean : clean
+ cmd.exe /C "if exist config.* del config.*"
+ cmd.exe /C "if exist Makefile del Makefile"
+
+rebuild : clean all
+
+install-libs : all
+ cmd.exe /C "if not exist $(INCPREFIX)\libxml2 mkdir $(INCPREFIX)\libxml2"
+ cmd.exe /C "if not exist $(INCPREFIX)\libxml2\libxml mkdir $(INCPREFIX)\libxml2\libxml"
+ cmd.exe /C "if not exist $(BINPREFIX) mkdir $(BINPREFIX)"
+ cmd.exe /C "if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)"
+ cmd.exe /C "copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml2\libxml"
+ cmd.exe /C "copy $(BINDIR)\$(XML_SO) $(SOPREFIX)"
+ cmd.exe /C "copy $(BINDIR)\$(XML_A) $(LIBPREFIX)"
+ cmd.exe /C "copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)"
+ cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)"
+
+install : install-libs
+ cmd.exe /C "copy $(BINDIR)\*.exe $(BINPREFIX)"
+
+install-dist : install-libs
+ cmd.exe /C "copy $(BINDIR)\xml*.exe $(BINPREFIX)"
+
+# This is a target for me, to make a binary distribution. Not for the public use,
+# keep your hands off :-)
+BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
+BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
+bindist : all
+ $(MAKE) PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)/bin install-dist
+ cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
+
+
+# Creates the dependency file
+dep :
+ $(CC) $(CFLAGS) -M $(XML_SRCS) > depends.mingw
+
+
+# Makes the output directory.
+$(BINDIR) :
+ cmd.exe /C if not exist $(BINDIR) mkdir $(BINDIR)
+
+
+# Makes the libxml intermediate directory.
+$(XML_INTDIR) :
+ cmd.exe /C if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
+
+# Makes the static libxml intermediate directory.
+$(XML_INTDIR_A) :
+ cmd.exe /C if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
+
+# An implicit rule for libxml compilation.
+$(XML_INTDIR)/%.o : $(XML_SRCDIR)/%.c
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+# An implicit rule for static libxml compilation.
+$(XML_INTDIR_A)/%.o : $(XML_SRCDIR)/%.c
+ $(CC) $(CFLAGS) -DLIBXML_STATIC -o $@ -c $<
+
+
+# Compiles libxml source. Uses the implicit rule for commands.
+$(XML_OBJS) : $(XML_INTDIR)
+
+# Compiles static libxml source. Uses the implicit rule for commands.
+$(XML_OBJS_A) : $(XML_INTDIR_A)
+
+# Creates the libxml shared object.
+XMLSO_LDFLAGS = $(LDFLAGS) -shared -Wl,--dll -Wl,--out-implib,$(BINDIR)/$(XML_IMP)
+$(BINDIR)/$(XML_SO) : $(BINDIR) $(XML_OBJS)
+ $(LD) $(XMLSO_LDFLAGS) -o $(BINDIR)/$(XML_SO) $(XML_OBJS) $(LIBS)
+
+# Creates the libxml archive.
+$(BINDIR)/$(XML_A) : $(BINDIR) $(XML_OBJS_A)
+ $(AR) $(ARFLAGS) $(BINDIR)\$(XML_A) $(XML_OBJS_A)
+
+
+# Makes the utils intermediate directory.
+$(UTILS_INTDIR) :
+ cmd.exe /C if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
+
+# An implicit rule for xmllint and friends.
+ifeq ($(STATIC),1)
+$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c
+ $(CC) -DLIBXML_STATIC $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $<
+ $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS)
+else
+$(BINDIR)/%.exe : $(UTILS_SRCDIR)/%.c
+ $(CC) $(CFLAGS) -o $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -c $<
+ $(LD) $(LDFLAGS) -o $@ $(subst .c,.o,$(UTILS_INTDIR)/$(<F)) -l$(XML_BASENAME) $(LIBS)
+endif
+
+# Builds xmllint and friends. Uses the implicit rule for commands.
+$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla
+
+# Source dependencies
+#-include depends.mingw
+
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
new file mode 100644
index 0000000..d16c1a2
--- /dev/null
+++ b/win32/Makefile.msvc
@@ -0,0 +1,489 @@
+# Makefile for libxml2, specific for Windows, MSVC and NMAKE.
+#
+# Take a look at the beginning and modify the variables to suit your
+# environment. Having done that, you can do a
+#
+# nmake [all] to build the libxml and the accompanying utilities.
+# nmake clean to remove all compiler output files and return to a
+# clean state.
+# nmake rebuild to rebuild everything from scratch. This basically does
+# a 'nmake clean' and then a 'nmake all'.
+# nmake install to install the library and its header files.
+#
+# March 2002, Igor Zlatkovic <igor@zlatkovic.com>
+
+# There should never be a need to modify anything below this line.
+# ----------------------------------------------------------------
+
+AUTOCONF = .\config.msvc
+!include $(AUTOCONF)
+
+# Names of various input and output components.
+XML_NAME = xml2
+XML_BASENAME = lib$(XML_NAME)
+XML_SO = $(XML_BASENAME).dll
+XML_IMP = $(XML_BASENAME).lib
+XML_DEF = $(XML_BASENAME).def
+XML_A = $(XML_BASENAME)_a.lib
+XML_A_DLL = $(XML_BASENAME)_a_dll.lib
+
+# Place where we let the compiler put its output.
+BINDIR = bin.msvc
+XML_INTDIR = int.msvc
+XML_INTDIR_A = int.a.msvc
+XML_INTDIR_A_DLL = int.a.dll.msvc
+UTILS_INTDIR = int.utils.msvc
+
+# The preprocessor and its options.
+CPP = cl.exe /EP
+CPPFLAGS = /nologo /I$(XML_SRCDIR)\include /D "NOLIBTOOL"
+!if "$(WITH_THREADS)" != "no"
+CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
+!endif
+
+# The compiler and its options.
+CC = cl.exe
+CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W1 $(CRUNTIME)
+CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
+!if "$(WITH_THREADS)" != "no"
+CFLAGS = $(CFLAGS) /D "_REENTRANT"
+!endif
+!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls"
+CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS" /D "HAVE_COMPILER_TLS"
+!else if "$(WITH_THREADS)" == "native"
+CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS"
+!else if "$(WITH_THREADS)" == "posix"
+CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
+!endif
+!if "$(WITH_ZLIB)" == "1"
+CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H"
+!endif
+!if "$(WITH_LZMA)" == "1"
+CFLAGS = $(CFLAGS) /D "HAVE_LZMA_H"
+!endif
+CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
+
+# The linker and its options.
+LD = link.exe
+LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
+LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
+LIBS =
+!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+LIBS = $(LIBS) wsock32.lib ws2_32.lib
+!endif
+!if "$(WITH_ICONV)" == "1"
+LIBS = $(LIBS) iconv.lib
+!endif
+!if "$(WITH_ICU)" == "1"
+LIBS = $(LIBS) icu.lib
+!endif
+!if "$(WITH_ZLIB)" == "1"
+# could be named differently zdll or zlib
+# LIBS = $(LIBS) zdll.lib
+LIBS = $(LIBS) zlib.lib
+!endif
+!if "$(WITH_LZMA)" == "1"
+LIBS = $(LIBS) liblzma.lib
+!endif
+!if "$(WITH_THREADS)" == "posix"
+LIBS = $(LIBS) pthreadVC.lib
+!endif
+!if "$(WITH_MODULES)" == "1"
+LIBS = $(LIBS) kernel32.lib
+!endif
+
+# The archiver and its options.
+AR = lib.exe
+ARFLAGS = /nologo
+
+# Optimisation and debug symbols.
+!if "$(DEBUG)" == "1"
+CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
+LDFLAGS = $(LDFLAGS) /DEBUG
+!else
+CFLAGS = $(CFLAGS) /D "NDEBUG" /O2
+# commented out as this break VC10 c.f. 634846
+# LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
+LDFLAGS = $(LDFLAGS)
+!endif
+
+# Libxml object files.
+XML_OBJS = $(XML_INTDIR)\buf.obj\
+ $(XML_INTDIR)\c14n.obj\
+ $(XML_INTDIR)\catalog.obj\
+ $(XML_INTDIR)\chvalid.obj\
+ $(XML_INTDIR)\debugXML.obj\
+ $(XML_INTDIR)\dict.obj\
+ $(XML_INTDIR)\DOCBparser.obj\
+ $(XML_INTDIR)\encoding.obj\
+ $(XML_INTDIR)\entities.obj\
+ $(XML_INTDIR)\error.obj\
+ $(XML_INTDIR)\globals.obj\
+ $(XML_INTDIR)\hash.obj\
+ $(XML_INTDIR)\HTMLparser.obj\
+ $(XML_INTDIR)\HTMLtree.obj\
+ $(XML_INTDIR)\legacy.obj\
+ $(XML_INTDIR)\list.obj\
+ $(XML_INTDIR)\nanoftp.obj\
+ $(XML_INTDIR)\nanohttp.obj\
+ $(XML_INTDIR)\parser.obj\
+ $(XML_INTDIR)\parserInternals.obj\
+ $(XML_INTDIR)\pattern.obj\
+ $(XML_INTDIR)\relaxng.obj\
+ $(XML_INTDIR)\SAX2.obj\
+ $(XML_INTDIR)\SAX.obj\
+ $(XML_INTDIR)\schematron.obj\
+ $(XML_INTDIR)\threads.obj\
+ $(XML_INTDIR)\tree.obj\
+ $(XML_INTDIR)\uri.obj\
+ $(XML_INTDIR)\valid.obj\
+ $(XML_INTDIR)\xinclude.obj\
+ $(XML_INTDIR)\xlink.obj\
+ $(XML_INTDIR)\xmlIO.obj\
+ $(XML_INTDIR)\xmlmemory.obj\
+ $(XML_INTDIR)\xmlreader.obj\
+ $(XML_INTDIR)\xmlregexp.obj\
+ $(XML_INTDIR)\xmlmodule.obj\
+ $(XML_INTDIR)\xmlsave.obj\
+ $(XML_INTDIR)\xmlschemas.obj\
+ $(XML_INTDIR)\xmlschemastypes.obj\
+ $(XML_INTDIR)\xmlunicode.obj\
+ $(XML_INTDIR)\xmlwriter.obj\
+ $(XML_INTDIR)\xpath.obj\
+ $(XML_INTDIR)\xpointer.obj\
+ $(XML_INTDIR)\xmlstring.obj
+
+# Static libxml object files.
+XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\
+ $(XML_INTDIR_A)\c14n.obj\
+ $(XML_INTDIR_A)\catalog.obj\
+ $(XML_INTDIR_A)\chvalid.obj\
+ $(XML_INTDIR_A)\debugXML.obj\
+ $(XML_INTDIR_A)\dict.obj\
+ $(XML_INTDIR_A)\DOCBparser.obj\
+ $(XML_INTDIR_A)\encoding.obj\
+ $(XML_INTDIR_A)\entities.obj\
+ $(XML_INTDIR_A)\error.obj\
+ $(XML_INTDIR_A)\globals.obj\
+ $(XML_INTDIR_A)\hash.obj\
+ $(XML_INTDIR_A)\HTMLparser.obj\
+ $(XML_INTDIR_A)\HTMLtree.obj\
+ $(XML_INTDIR_A)\legacy.obj\
+ $(XML_INTDIR_A)\list.obj\
+ $(XML_INTDIR_A)\nanoftp.obj\
+ $(XML_INTDIR_A)\nanohttp.obj\
+ $(XML_INTDIR_A)\parser.obj\
+ $(XML_INTDIR_A)\parserInternals.obj\
+ $(XML_INTDIR_A)\pattern.obj\
+ $(XML_INTDIR_A)\relaxng.obj\
+ $(XML_INTDIR_A)\SAX2.obj\
+ $(XML_INTDIR_A)\SAX.obj\
+ $(XML_INTDIR_A)\schematron.obj\
+ $(XML_INTDIR_A)\threads.obj\
+ $(XML_INTDIR_A)\tree.obj\
+ $(XML_INTDIR_A)\uri.obj\
+ $(XML_INTDIR_A)\valid.obj\
+ $(XML_INTDIR_A)\xinclude.obj\
+ $(XML_INTDIR_A)\xlink.obj\
+ $(XML_INTDIR_A)\xmlIO.obj\
+ $(XML_INTDIR_A)\xmlmemory.obj\
+ $(XML_INTDIR_A)\xmlreader.obj\
+ $(XML_INTDIR_A)\xmlregexp.obj\
+ $(XML_INTDIR_A)\xmlmodule.obj\
+ $(XML_INTDIR_A)\xmlsave.obj\
+ $(XML_INTDIR_A)\xmlschemas.obj\
+ $(XML_INTDIR_A)\xmlschemastypes.obj\
+ $(XML_INTDIR_A)\xmlunicode.obj\
+ $(XML_INTDIR_A)\xmlwriter.obj\
+ $(XML_INTDIR_A)\xpath.obj\
+ $(XML_INTDIR_A)\xpointer.obj\
+ $(XML_INTDIR_A)\xmlstring.obj
+
+# Static libxml object files.
+XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\buf.obj\
+ $(XML_INTDIR_A_DLL)\c14n.obj\
+ $(XML_INTDIR_A_DLL)\catalog.obj\
+ $(XML_INTDIR_A_DLL)\chvalid.obj\
+ $(XML_INTDIR_A_DLL)\debugXML.obj\
+ $(XML_INTDIR_A_DLL)\dict.obj\
+ $(XML_INTDIR_A_DLL)\DOCBparser.obj\
+ $(XML_INTDIR_A_DLL)\encoding.obj\
+ $(XML_INTDIR_A_DLL)\entities.obj\
+ $(XML_INTDIR_A_DLL)\error.obj\
+ $(XML_INTDIR_A_DLL)\globals.obj\
+ $(XML_INTDIR_A_DLL)\hash.obj\
+ $(XML_INTDIR_A_DLL)\HTMLparser.obj\
+ $(XML_INTDIR_A_DLL)\HTMLtree.obj\
+ $(XML_INTDIR_A_DLL)\legacy.obj\
+ $(XML_INTDIR_A_DLL)\list.obj\
+ $(XML_INTDIR_A_DLL)\nanoftp.obj\
+ $(XML_INTDIR_A_DLL)\nanohttp.obj\
+ $(XML_INTDIR_A_DLL)\parser.obj\
+ $(XML_INTDIR_A_DLL)\parserInternals.obj\
+ $(XML_INTDIR_A_DLL)\pattern.obj\
+ $(XML_INTDIR_A_DLL)\relaxng.obj\
+ $(XML_INTDIR_A_DLL)\SAX2.obj\
+ $(XML_INTDIR_A_DLL)\SAX.obj\
+ $(XML_INTDIR_A_DLL)\schematron.obj\
+ $(XML_INTDIR_A_DLL)\threads.obj\
+ $(XML_INTDIR_A_DLL)\tree.obj\
+ $(XML_INTDIR_A_DLL)\uri.obj\
+ $(XML_INTDIR_A_DLL)\valid.obj\
+ $(XML_INTDIR_A_DLL)\xinclude.obj\
+ $(XML_INTDIR_A_DLL)\xlink.obj\
+ $(XML_INTDIR_A_DLL)\xmlIO.obj\
+ $(XML_INTDIR_A_DLL)\xmlmemory.obj\
+ $(XML_INTDIR_A_DLL)\xmlreader.obj\
+ $(XML_INTDIR_A_DLL)\xmlregexp.obj\
+ $(XML_INTDIR_A_DLL)\xmlmodule.obj\
+ $(XML_INTDIR_A_DLL)\xmlsave.obj\
+ $(XML_INTDIR_A_DLL)\xmlschemas.obj\
+ $(XML_INTDIR_A_DLL)\xmlschemastypes.obj\
+ $(XML_INTDIR_A_DLL)\xmlunicode.obj\
+ $(XML_INTDIR_A_DLL)\xmlwriter.obj\
+ $(XML_INTDIR_A_DLL)\xpath.obj\
+ $(XML_INTDIR_A_DLL)\xpointer.obj\
+ $(XML_INTDIR_A_DLL)\xmlstring.obj
+
+# Xmllint and friends executables.
+UTILS = $(BINDIR)\xmllint.exe\
+ $(BINDIR)\xmlcatalog.exe\
+ $(BINDIR)\testAutomata.exe\
+ $(BINDIR)\testC14N.exe\
+ $(BINDIR)\testDocbook.exe\
+ $(BINDIR)\testHTML.exe\
+ $(BINDIR)\testReader.exe\
+ $(BINDIR)\testRelax.exe\
+ $(BINDIR)\testRegexp.exe\
+ $(BINDIR)\testModule.exe\
+ $(BINDIR)\testSAX.exe\
+ $(BINDIR)\testSchemas.exe\
+ $(BINDIR)\testURI.exe\
+ $(BINDIR)\testXPath.exe\
+ $(BINDIR)\runtest.exe\
+ $(BINDIR)\runsuite.exe\
+ $(BINDIR)\testapi.exe\
+ $(BINDIR)\testlimits.exe\
+ $(BINDIR)\testrecurse.exe
+
+!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
+UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
+!else if "$(WITH_THREADS)" == "posix"
+UTILS = $(UTILS) $(BINDIR)\testThreads.exe
+!endif
+
+!if "$(VCMANIFEST)" == "1"
+_VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+_VC_MANIFEST_EMBED_DLL= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+!else
+_VC_MANIFEST_EMBED_EXE=
+_VC_MANIFEST_EMBED_DLL=
+!endif
+
+all : libxml libxmla libxmladll utils
+
+libxml : $(BINDIR)\$(XML_SO)
+
+libxmla : $(BINDIR)\$(XML_A)
+
+libxmladll : $(BINDIR)\$(XML_A_DLL)
+
+utils : $(UTILS)
+
+clean :
+ if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)
+ if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)
+ if exist $(XML_INTDIR_A_DLL) rmdir /S /Q $(XML_INTDIR_A_DLL)
+ if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
+ if exist $(BINDIR) rmdir /S /Q $(BINDIR)
+
+distclean : clean
+ if exist config.* del config.*
+ if exist Makefile del Makefile
+
+rebuild : clean all
+
+install-libs : all
+ if not exist $(INCPREFIX)\libxml2 mkdir $(INCPREFIX)\libxml2
+ if not exist $(INCPREFIX)\libxml2\libxml mkdir $(INCPREFIX)\libxml2\libxml
+ if not exist $(BINPREFIX) mkdir $(BINPREFIX)
+ if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
+ if not exist $(SOPREFIX) mkdir $(SOPREFIX)
+ copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml2\libxml
+ copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
+ copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
+ copy $(BINDIR)\$(XML_A_DLL) $(LIBPREFIX)
+ copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
+
+install : install-libs
+ copy $(BINDIR)\*.exe $(BINPREFIX)
+ -copy $(BINDIR)\*.pdb $(BINPREFIX)
+
+install-dist : install-libs
+ copy $(BINDIR)\xml*.exe $(BINPREFIX)
+ -copy $(BINDIR)\xml*.pdb $(BINPREFIX)
+
+# This is a target for me, to make a binary distribution. Not for the public use,
+# keep your hands off :-)
+BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
+BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
+bindist : all
+ $(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist
+ cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
+
+
+# Makes the output directory.
+$(BINDIR) :
+ if not exist $(BINDIR) mkdir $(BINDIR)
+
+
+# Makes the libxml intermediate directory.
+$(XML_INTDIR) :
+ if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
+
+# Makes the static libxml intermediate directory.
+$(XML_INTDIR_A) :
+ if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
+
+# Makes the static for dll libxml intermediate directory.
+$(XML_INTDIR_A_DLL) :
+ if not exist $(XML_INTDIR_A_DLL) mkdir $(XML_INTDIR_A_DLL)
+
+# An implicit rule for libxml compilation.
+{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj::
+ $(CC) $(CFLAGS) /Fo$(XML_INTDIR)\ /c $<
+
+# An implicit rule for static libxml compilation.
+{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj::
+ $(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /c $<
+
+# An implicit rule for static for dll libxml compilation.
+{$(XML_SRCDIR)}.c{$(XML_INTDIR_A_DLL)}.obj::
+ $(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXML_STATIC_FOR_DLL" /Fo$(XML_INTDIR_A_DLL)\ /c $<
+
+# Compiles libxml source. Uses the implicit rule for commands.
+$(XML_OBJS) : $(XML_INTDIR)
+
+# Compiles static libxml source. Uses the implicit rule for commands.
+$(XML_OBJS_A) : $(XML_INTDIR_A)
+
+# Compiles static for dll libxml source. Uses the implicit rule for commands.
+$(XML_OBJS_A_DLL) : $(XML_INTDIR_A_DLL)
+
+# Creates the export definition file (DEF) for libxml.
+$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR) $(XML_DEF).src
+ $(CPP) $(CPPFLAGS) $(XML_DEF).src > $(XML_INTDIR)\$(XML_DEF)
+
+# Creates the libxml shared object.
+$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
+ $(LD) $(LDFLAGS) /DLL \
+ /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
+ @$(_VC_MANIFEST_EMBED_DLL)
+
+#$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
+# $(LD) $(LDFLAGS) /DLL /DEF:$(XML_INTDIR)\$(XML_DEF) \
+# /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
+
+# Creates the libxml archive.
+$(BINDIR)\$(XML_A) : $(BINDIR) $(XML_OBJS_A)
+ $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A) $(XML_OBJS_A)
+
+# Creates the libxml static for dll archive.
+$(BINDIR)\$(XML_A_DLL) : $(BINDIR) $(XML_OBJS_A_DLL)
+ $(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A_DLL) $(XML_OBJS_A_DLL)
+
+# Makes the utils intermediate directory.
+$(UTILS_INTDIR) :
+ if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
+
+# An implicit rule for xmllint and friends.
+!if "$(STATIC)" == "1"
+{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
+ $(CC) /D "LIBXML_STATIC" $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
+ $(LD) $(LDFLAGS) /OUT:$@ $(XML_A) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
+ @$(_VC_MANIFEST_EMBED_EXE)
+!else
+{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
+ $(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
+ $(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
+ @$(_VC_MANIFEST_EMBED_EXE)
+!endif
+
+# Builds xmllint and friends. Uses the implicit rule for commands.
+$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla libxmladll
+
+# Source dependences should be autogenerated somehow here, but how to
+# do it? I have no clue.
+
+# TESTS
+
+tests : checktests XPathtests
+
+checktests : $(UTILS)
+ cd .. && win32\$(BINDIR)\runtest.exe
+ cd .. && win32\$(BINDIR)\testrecurse.exe
+ cd .. && win32\$(BINDIR)\testapi.exe
+ cd .. && win32\$(BINDIR)\testchar.exe
+ cd .. && win32\$(BINDIR)\testdict.exe
+ cd .. && win32\$(BINDIR)\runxmlconf.exe
+
+XPathtests : $(BINDIR)\testXPath.exe
+ @echo. 2> .memdump
+ @echo ## XPath regression tests
+ @-$(BINDIR)\testXPath.exe | find /C "support not compiled in" 1>nul
+ @if %ERRORLEVEL% NEQ 0 @( \
+ echo Skipping debug not compiled in\
+ @exit 0 \
+ )
+ @for %%I in ($(XML_SRCDIR)\test\XPath\expr\*.*) do @( \
+ @IF NOT EXIST $(XML_SRCDIR)\result\XPath\expr\%%~nxI ( \
+ @echo New test %%~nxI &&\
+ @echo %%~nxI &&\
+ $(BINDIR)\testXPath.exe -f --expr %%I > $(XML_SRCDIR)/result/XPath/expr/%%~nxI &&\
+ findstr /C:"MEMORY ALLOCATED : 0" \
+ ) ELSE ( \
+ $(BINDIR)\testXPath.exe -f --expr %%I 2>&1 > result.%%~nxI &&\
+ fc $(XML_SRCDIR)\result\XPath\expr\%%~nxI result.%%~nxI >nul &\
+ iF ERRORLEVEL 1 exit 1 & \
+ findstr "MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" >nul &&\
+ del result.%%~nxI \
+ ) \
+ )
+ @for %%I in ($(XML_SRCDIR)\test\XPath\docs\*.*) do @( \
+ for %%J in ($(XML_SRCDIR)\test\XPath\tests\%%~nxI*.*) do @( \
+ if not exist $(XML_SRCDIR)\result\XPath\tests\%%~nxJ ( \
+ $(BINDIR)\testXPath.exe -f -i %%I %%J > $(XML_SRCDIR)\result\XPath\tests\%%~nxJ &&\
+ findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > nul \
+ ) ELSE ( \
+ $(BINDIR)\testXPAth.exe -f -i %%I %%J 2>&1 > result.%%~nxJ &&\
+ findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0">null &&\
+ fc $(XML_SRCDIR)\result\XPath\tests\%%~nxJ result.%%~nxJ >null & \
+ IF ERRORLEVEL 1 (echo Error: %%I %%J & exit 1) & \
+ del result.%%~nxJ \
+ )\
+ )\
+ )
+
+XMLtests : $(BINDIR)\xmllint.exe
+ @echo. 2> .memdump
+ @echo ## XML regression tests
+ -@for %%I in ($(XML_SRCDIR)\test\*) do @( \
+ if not exist $(XML_SRCDIR)\result\%%~nxI ( \
+ echo New test file %%~nxI &\
+ $(BINDIR)\xmllint.exe %%I > $(XML_SRCDIR)\result\%%~nxI && \
+ findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null \
+ ) ELSE ( \
+ $(BINDIR)\xmllint.exe %%I 2>&1 > result.%%~nxI && \
+ findstr /C:"MEMORY ALLOC" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > null && \
+ fc $(XML_SRCDIR)\result\%%~nxI result.%%~nxI > null && \
+ $(BINDIR)\xmllint.exe result.%%~nxI 2>&1 > result2.%%~nxI | findstr /V /C:"failed to load external entity" && \
+ fc result.%%~nxI result2.%%~nxI & \
+ del result.%%~nxI result2.%%~nxI\
+ ) \
+ )
+
+
+
+
+
+
diff --git a/win32/Readme.txt b/win32/Readme.txt
new file mode 100644
index 0000000..6b3eddd
--- /dev/null
+++ b/win32/Readme.txt
@@ -0,0 +1,226 @@
+
+ Windows port
+ ============
+
+This directory contains the files required to build this software on the
+native Windows platform. This is not a place to look for help if you are
+using a POSIX emulator, such as Cygwin. Check the Unix instructions for
+that.
+
+
+
+CONTENTS
+========
+
+1. General
+ 1.1 Building From the Command-Line
+ 1.2 Configuring The Source
+ 1.3 Compiling
+ 1.4 Installing
+
+2. Compiler Specifics
+ 2.1 Microsoft Visual C/C++
+ 2.1 GNU C/C++, Mingw Edition
+ 2.2 Borland C++ Builder
+ 2.2.1 Building with iconv support
+ 2.2.2 Compatability problems with MSVC (and probably CYGWIN)
+ 2.2.3 Other caveats
+
+
+
+
+1. General
+==========
+
+
+1.1 Building From The Command-Line
+----------------------------------
+
+This is the easiest, preferred and currently supported method. It can
+be that a subdirectory of the directory where this file resides
+contains project files for some IDE. If you want to use that, please
+refer to the readme file within that subdirectory.
+
+In order to build from the command-line you need to make sure that
+your compiler works from the command line. This is not always the
+case, often the required environment variables are missing. If you are
+not sure, test if this works first. If it doesn't, you will first have
+to configure your compiler suite to run from the command-line - please
+refer to your compiler's documentation regarding that.
+
+The first thing you want to do is configure the source. You can have
+the configuration script do this automatically for you. The
+configuration script is written in JScript, a Microsoft's
+implementation of the ECMA scripting language. Almost every Windows
+machine can execute this through the Windows Scripting Host. If your
+system lacks the ability to execute JScript for some reason, you must
+perform the configuration manually and you are on your own with that.
+
+The second step is compiling the source and, optionally, installing it
+to the location of your choosing.
+
+
+1.2 Configuring The Source
+--------------------------
+
+The configuration script accepts numerous options. Some of these
+affect features which will be available in the compiled software,
+others affect the way the software is built and installed. To see a
+full list of options supported by the configuration script, run
+
+ cscript configure.js help
+
+from the win32 subdirectory. The configuration script will present you
+the options it accepts and give a biref explanation of these. In every
+case you will have two sets of options. The first set is specific to
+the software you are building and the second one is specific to the
+Windows port.
+
+Once you have decided which options suit you, run the script with that
+options. Here is an example:
+
+ cscript configure.js compiler=msvc prefix=c:\opt
+ include=c:\opt\include lib=c:\opt\lib debug=yes
+
+The previous example will configure the process to use the Microsoft's
+compiler, install the library in c:\opt, use c:\opt\include and
+c:\opt\lib as additional search paths for the compiler and the linker
+and build executables with debug symbols.
+
+Note: Please do not use path names which contain spaces. This will
+fail. Allowing this would require me to put almost everything in the
+Makefile in quotas and that looks quite ugly with my
+syntax-highlighting engine. If you absolutely must use spaces in paths
+send me an email and tell me why. If there are enough of you out there
+who need this, or if a single one has a very good reason, I will
+modify the Makefile to allow spaces in paths.
+
+
+1.3 Compiling
+-------------
+
+After the configuration stage has been completed, you want to build
+the software. You will have to use the make tool which comes with
+your compiler. If you, for example, configured the source to build
+with Microsoft's MSVC compiler, you would use the NMAKE utility. If
+you configured it to build with GNU C compiler, mingw edition, you
+would use the GNU make. Assuming you use MSVC, type
+
+ nmake /f Makefile.msvc
+
+and if you use MinGW, you would type
+
+ make -f Makefile.mingw
+
+and if you use Borland's compiler, you would type
+
+ bmake -f Makefile.bcb
+
+in the win32 subdirectory. When the building completes, you will find
+the executable files in win32\bin.* directory, where * stands for the
+name of the compiler you have used.
+
+
+1.4 Installing
+--------------
+
+You can install the software into the directory you specified to the
+configure script during the configure stage by typing (with MSVC in
+this example)
+
+ nmake /f Makefile.msvc install
+
+That would be it, enjoy.
+
+
+
+
+
+2. Compiler Specifics
+=====================
+
+
+2.1 Microsoft Visual C/C++
+--------------------------
+
+If you use the compiler which comes with Visual Studio .NET, note that
+it will link to its own C-runtime named msvcr70.dll or msvcr71.dll. This
+file is not available on any machine which doesn't have Visual Studio
+.NET installed.
+
+
+2.2 GNU C/C++, Mingw edition
+----------------------------
+
+When specifying paths to configure.js, please use slashes instead of
+backslashes for directory separation. Sometimes Mingw needs this. If
+this is the case, and you specify backslashes, then the compiler will
+complain about not finding necessary header files.
+
+
+2.2 Borland C++ Builder
+-----------------------
+
+To compile libxml2 with the BCB6 compiler and associated tools, just follow
+the basic instructions found in this file file. Be sure to specify
+the "compiler=bcb" option when running the configure script. To compile the
+library and test programs, just type
+
+ make -fMakefile.bcb
+
+That should be all that's required. But there are a few other things to note:
+
+2.2.1 Building with iconv support
+
+If you configure libxml2 to include iconv support, you will obviously need to
+obtain the iconv library and include files. To get them, just follow the links
+at http://www.gnu.org/software/libiconv/ - there are pre-compiled Win32
+versions available, but note that these where built with MSVC. Hence the
+supplied import library is in COFF format rather than OMF format. You can
+convert this library by using Borland's COFF2OMF utility, or use IMPLIB to
+build a new import library from the DLL. Alternatively, it is possible to
+obtain the iconv source, and build the DLL using the Borland compiler.
+
+There is a minor problem with the header files for iconv - they expect a
+macro named "EILSEQ" in errno.h, but this is not defined in the Borland
+headers, and its absence can cause problems. To circumvent this problem, I
+define EILSEQ=2 in Makefile.bcb. The value "2" is the value for ENOFILE (file
+not found). This should not have any disastrous side effects beyond possibly
+displaying a misleading error message in certain situations.
+
+2.2.2 Compatability problems with MSVC (and probably CYGWIN)
+
+A libxml2 DLL generated by BCB is callable from MSVC programs, but there is a
+minor problem with the names of the symbols exported from the library. The
+Borland compiler, by default, prepends an underscore character to global
+identifiers (functions and global variables) when generating object files.
+Hence the function "xmlAddChild" is added to the DLL with the name
+"_xmlAddChild". The MSVC compiler does not have this behaviour, and looks for
+the unadorned name. I currently circumvent this problem by writing a .def file
+which causes BOTH the adorned and unadorned names to be exported from the DLL.
+This behaviour may not be supported in the future.
+
+An even worse problem is that of generating an import library for the DLL. The
+Borland-generated DLL is in OMF format. MSVC expects libraries in COFF format,
+but they don't provide a "OMF2COFF" utility, or even the equivalent of
+Borland's IMPLIB utility. But it is possible to create an import lib from the
+.def file, using the command:
+ LIB /DEF:libxml2.def
+
+If you don't have the .def file, it's possible to create one manually. Use
+DUMPBIN /EXPORTS /OUT:libxml2.tmp libxml2.dll to get a list of the exported
+names, and edit this into .def file format.
+
+A similar problem is likely with Cygwin.
+
+2.2.3 Other caveats
+
+We have tested this only with BCB6, Professional Edition, and BCB 5.5 free
+command-line tools.
+
+
+
+Authors: Igor Zlatkovic <igor@zlatkovic.com>
+ Eric Zurcher <Eric.Zurcher@csiro.au>
+
+
diff --git a/win32/VC10/README.vc10 b/win32/VC10/README.vc10
new file mode 100644
index 0000000..4805bdc
--- /dev/null
+++ b/win32/VC10/README.vc10
@@ -0,0 +1,27 @@
+
+README file for VC10 project files for libxml2
+----------------------------------------------
+
+to clarify: This is not the readme file for the whole libxml2 project.
+Rather, it's a readme for the VC10 project files, attached to the libxml2 proejct.
+
+Quick Start
+-----------
+
+1) To use, load the libxml2.sln solution file into visual studio
+2) check and correct paths for dependent "iconv" project which most certaily
+are wrong on your environment.
+3) Compile all projects
+
+
+Background Info
+---------------
+
+Running of "configure.sh" won't make sense since VS doesn't support
+this kind of build system and the environment is pretty much known already
+if you're using Visual Studio. Instead, a preconfigured "config.h" file
+is provided in the "win32\VC10" directory and referenced by the project
+files already.
+
+The compile process is not completely warning-free: Some warnings will
+appear during compile which can be ignored.
diff --git a/win32/VC10/RuleSet1.ruleset b/win32/VC10/RuleSet1.ruleset
new file mode 100644
index 0000000..9985a6c
--- /dev/null
+++ b/win32/VC10/RuleSet1.ruleset
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="New Rule Set" Description=" " ToolsVersion="10.0">
+</RuleSet> \ No newline at end of file
diff --git a/win32/VC10/config.h b/win32/VC10/config.h
new file mode 100644
index 0000000..8629944
--- /dev/null
+++ b/win32/VC10/config.h
@@ -0,0 +1,125 @@
+#ifndef __LIBXML_WIN32_CONFIG__
+#define __LIBXML_WIN32_CONFIG__
+
+#define HAVE_CTYPE_H
+#define HAVE_STDARG_H
+#define HAVE_MALLOC_H
+#define HAVE_ERRNO_H
+#define HAVE_STDINT_H
+
+#if defined(_WIN32_WCE)
+#undef HAVE_ERRNO_H
+#include <windows.h>
+#include "wincecompat.h"
+#else
+#define HAVE_SYS_STAT_H
+#define HAVE__STAT
+#define HAVE_STAT
+#define HAVE_STDLIB_H
+#define HAVE_TIME_H
+#define HAVE_FCNTL_H
+#include <io.h>
+#include <direct.h>
+#endif
+
+#include <libxml/xmlversion.h>
+
+#ifndef ICONV_CONST
+#define ICONV_CONST const
+#endif
+
+#ifdef NEED_SOCKETS
+#include <wsockcompat.h>
+#endif
+
+/*
+ * Windows platforms may define except
+ */
+#undef except
+
+#define HAVE_ISINF
+#define HAVE_ISNAN
+#include <math.h>
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+/* MS C-runtime has functions which can be used in order to determine if
+ a given floating-point variable contains NaN, (+-)INF. These are
+ preferred, because floating-point technology is considered propriatary
+ by MS and we can assume that their functions know more about their
+ oddities than we do. */
+#include <float.h>
+/* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
+ function. */
+#ifndef isinf
+#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
+ : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
+#endif
+/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
+#ifndef isnan
+#define isnan(d) (_isnan(d))
+#endif
+#else /* _MSC_VER */
+#ifndef isinf
+static int isinf (double d) {
+ int expon = 0;
+ double val = frexp (d, &expon);
+ if (expon == 1025) {
+ if (val == 0.5) {
+ return 1;
+ } else if (val == -0.5) {
+ return -1;
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+}
+#endif
+#ifndef isnan
+static int isnan (double d) {
+ int expon = 0;
+ double val = frexp (d, &expon);
+ if (expon == 1025) {
+ if (val == 0.5) {
+ return 0;
+ } else if (val == -0.5) {
+ return 0;
+ } else {
+ return 1;
+ }
+ } else {
+ return 0;
+ }
+}
+#endif
+#endif /* _MSC_VER */
+
+#if defined(_MSC_VER)
+#define mkdir(p,m) _mkdir(p)
+#define snprintf _snprintf
+#if _MSC_VER < 1500
+#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#endif
+#elif defined(__MINGW32__)
+#define mkdir(p,m) _mkdir(p)
+#endif
+
+/* Threading API to use should be specified here for compatibility reasons.
+ This is however best specified on the compiler's command-line. */
+#if defined(LIBXML_THREAD_ENABLED)
+#if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
+#define HAVE_WIN32_THREADS
+#endif
+#endif
+
+/* Some third-party libraries far from our control assume the following
+ is defined, which it is not if we don't include windows.h. */
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+#if !defined(TRUE)
+#define TRUE (!(FALSE))
+#endif
+
+#endif /* __LIBXML_WIN32_CONFIG__ */
+
diff --git a/win32/VC10/libxml2-focus.vcxproj b/win32/VC10/libxml2-focus.vcxproj
new file mode 100644
index 0000000..914ce25
--- /dev/null
+++ b/win32/VC10/libxml2-focus.vcxproj
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug DLL|Win32">
+ <Configuration>Debug DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release DLL|Win32">
+ <Configuration>Release DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7EA50C94-26BD-4893-B773-625CD3D3DEA6}</ProjectGuid>
+ <RootNamespace>libxml2</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\..\focus-lib-debug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\..\focus-lib-debug-dll.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\..\focus-lib-release.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
+ <Import Project="..\..\..\focus-lib-release-dll.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <MinimalRebuild>false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <MinimalRebuild>false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14\include</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4018; 4996</DisableSpecificWarnings>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\c14n.c" />
+ <ClCompile Include="..\..\catalog.c" />
+ <ClCompile Include="..\..\chvalid.c" />
+ <ClCompile Include="..\..\debugXML.c" />
+ <ClCompile Include="..\..\dict.c" />
+ <ClCompile Include="..\..\DOCBparser.c" />
+ <ClCompile Include="..\..\encoding.c" />
+ <ClCompile Include="..\..\entities.c" />
+ <ClCompile Include="..\..\error.c" />
+ <ClCompile Include="..\..\globals.c" />
+ <ClCompile Include="..\..\hash.c" />
+ <ClCompile Include="..\..\HTMLparser.c" />
+ <ClCompile Include="..\..\HTMLtree.c" />
+ <ClCompile Include="..\..\legacy.c" />
+ <ClCompile Include="..\..\list.c" />
+ <ClCompile Include="..\..\nanoftp.c" />
+ <ClCompile Include="..\..\nanohttp.c" />
+ <ClCompile Include="..\..\parser.c" />
+ <ClCompile Include="..\..\parserInternals.c" />
+ <ClCompile Include="..\..\pattern.c" />
+ <ClCompile Include="..\..\relaxng.c" />
+ <ClCompile Include="..\..\SAX.c" />
+ <ClCompile Include="..\..\SAX2.c" />
+ <ClCompile Include="..\..\schematron.c" />
+ <ClCompile Include="..\..\threads.c" />
+ <ClCompile Include="..\..\tree.c" />
+ <ClCompile Include="..\..\uri.c" />
+ <ClCompile Include="..\..\valid.c" />
+ <ClCompile Include="..\..\xinclude.c" />
+ <ClCompile Include="..\..\xlink.c" />
+ <ClCompile Include="..\..\xmlcatalog.c" />
+ <ClCompile Include="..\..\xmlIO.c" />
+ <ClCompile Include="..\..\xmlmemory.c" />
+ <ClCompile Include="..\..\xmlmodule.c" />
+ <ClCompile Include="..\..\xmlreader.c" />
+ <ClCompile Include="..\..\xmlregexp.c" />
+ <ClCompile Include="..\..\xmlsave.c" />
+ <ClCompile Include="..\..\xmlschemas.c" />
+ <ClCompile Include="..\..\xmlschemastypes.c" />
+ <ClCompile Include="..\..\xmlstring.c" />
+ <ClCompile Include="..\..\xmlunicode.c" />
+ <ClCompile Include="..\..\xmlwriter.c" />
+ <ClCompile Include="..\..\xpath.c" />
+ <ClCompile Include="..\..\xpointer.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\acconfig.h" />
+ <ClInclude Include="..\..\elfgcchack.h" />
+ <ClInclude Include="..\..\libxml.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/win32/VC10/libxml2.sln b/win32/VC10/libxml2.sln
new file mode 100644
index 0000000..8485751
--- /dev/null
+++ b/win32/VC10/libxml2.sln
@@ -0,0 +1,49 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "libxml2.vcxproj", "{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "runsuite", "runsuite.vcxproj", "{D841B4F7-C277-49CB-B379-8B1801C8EE35}"
+ ProjectSection(ProjectDependencies) = postProject
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE} = {BEC03130-A64C-48F8-863C-52DA83CFB3AE}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iconv", "..\..\..\libiconv-1.14.vc10\windows\VC10\iconv.vcxproj", "{BEC03130-A64C-48F8-863C-52DA83CFB3AE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug DLL|Win32 = Debug DLL|Win32
+ Debug|Win32 = Debug|Win32
+ Release DLL|Win32 = Release DLL|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|Win32.ActiveCfg = Debug|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug DLL|Win32.Build.0 = Debug|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Debug|Win32.Build.0 = Debug|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|Win32.ActiveCfg = Release|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release DLL|Win32.Build.0 = Release|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|Win32.ActiveCfg = Release|Win32
+ {1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}.Release|Win32.Build.0 = Release|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Debug DLL|Win32.ActiveCfg = Debug|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Debug DLL|Win32.Build.0 = Debug|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Debug|Win32.Build.0 = Debug|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Release DLL|Win32.ActiveCfg = Release|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Release DLL|Win32.Build.0 = Release|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Release|Win32.ActiveCfg = Release|Win32
+ {D841B4F7-C277-49CB-B379-8B1801C8EE35}.Release|Win32.Build.0 = Release|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Debug DLL|Win32.Build.0 = Debug DLL|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Debug|Win32.Build.0 = Debug|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Release DLL|Win32.ActiveCfg = Release DLL|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Release DLL|Win32.Build.0 = Release DLL|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Release|Win32.ActiveCfg = Release|Win32
+ {BEC03130-A64C-48F8-863C-52DA83CFB3AE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/win32/VC10/libxml2.vcxproj b/win32/VC10/libxml2.vcxproj
new file mode 100644
index 0000000..0588fa6
--- /dev/null
+++ b/win32/VC10/libxml2.vcxproj
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1D6039F6-5078-416F-A3AF-A36EFC7E6A1C}</ProjectGuid>
+ <RootNamespace>libxml2</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>build\$(ProjectName)$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14.vc10\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4996</DisableSpecificWarnings>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\buf.c" />
+ <ClCompile Include="..\..\c14n.c" />
+ <ClCompile Include="..\..\catalog.c" />
+ <ClCompile Include="..\..\chvalid.c" />
+ <ClCompile Include="..\..\debugXML.c" />
+ <ClCompile Include="..\..\dict.c" />
+ <ClCompile Include="..\..\DOCBparser.c" />
+ <ClCompile Include="..\..\encoding.c" />
+ <ClCompile Include="..\..\entities.c" />
+ <ClCompile Include="..\..\error.c" />
+ <ClCompile Include="..\..\globals.c" />
+ <ClCompile Include="..\..\hash.c" />
+ <ClCompile Include="..\..\HTMLparser.c" />
+ <ClCompile Include="..\..\HTMLtree.c" />
+ <ClCompile Include="..\..\legacy.c" />
+ <ClCompile Include="..\..\list.c" />
+ <ClCompile Include="..\..\nanoftp.c" />
+ <ClCompile Include="..\..\nanohttp.c" />
+ <ClCompile Include="..\..\parser.c" />
+ <ClCompile Include="..\..\parserInternals.c" />
+ <ClCompile Include="..\..\pattern.c" />
+ <ClCompile Include="..\..\relaxng.c" />
+ <ClCompile Include="..\..\SAX.c" />
+ <ClCompile Include="..\..\SAX2.c" />
+ <ClCompile Include="..\..\schematron.c" />
+ <ClCompile Include="..\..\threads.c" />
+ <ClCompile Include="..\..\tree.c" />
+ <ClCompile Include="..\..\uri.c" />
+ <ClCompile Include="..\..\valid.c" />
+ <ClCompile Include="..\..\xinclude.c" />
+ <ClCompile Include="..\..\xlink.c" />
+ <ClCompile Include="..\..\xmlcatalog.c" />
+ <ClCompile Include="..\..\xmlIO.c" />
+ <ClCompile Include="..\..\xmlmemory.c" />
+ <ClCompile Include="..\..\xmlmodule.c" />
+ <ClCompile Include="..\..\xmlreader.c" />
+ <ClCompile Include="..\..\xmlregexp.c" />
+ <ClCompile Include="..\..\xmlsave.c" />
+ <ClCompile Include="..\..\xmlschemas.c" />
+ <ClCompile Include="..\..\xmlschemastypes.c" />
+ <ClCompile Include="..\..\xmlstring.c" />
+ <ClCompile Include="..\..\xmlunicode.c" />
+ <ClCompile Include="..\..\xmlwriter.c" />
+ <ClCompile Include="..\..\xpath.c" />
+ <ClCompile Include="..\..\xpointer.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\acconfig.h" />
+ <ClInclude Include="..\..\elfgcchack.h" />
+ <ClInclude Include="..\..\libxml.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\libiconv-1.14.vc10\windows\VC10\iconv.vcxproj">
+ <Project>{bec03130-a64c-48f8-863c-52da83cfb3ae}</Project>
+ <Private>true</Private>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+ <LinkLibraryDependencies>true</LinkLibraryDependencies>
+ <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/win32/VC10/libxml2.vcxproj.filters b/win32/VC10/libxml2.vcxproj.filters
new file mode 100644
index 0000000..e8e7af3
--- /dev/null
+++ b/win32/VC10/libxml2.vcxproj.filters
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ <Filter Include="Header Files\windows">
+ <UniqueIdentifier>{22791c14-7c07-4222-ad58-8c18d3fb10ba}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files\windows\VC10">
+ <UniqueIdentifier>{bfddc99f-05d4-4f06-98d1-346b1be73d6f}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\c14n.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\catalog.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\chvalid.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\debugXML.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\dict.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\DOCBparser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\encoding.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\entities.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\error.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globals.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\hash.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\legacy.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\list.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\parser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\parserInternals.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\pattern.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\relaxng.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\SAX.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\SAX2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\schematron.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\threads.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\tree.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\uri.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\valid.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xinclude.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xlink.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlcatalog.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlIO.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlmemory.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlmodule.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlreader.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlregexp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlsave.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlschemas.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlschemastypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlstring.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlunicode.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xmlwriter.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xpath.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\xpointer.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\nanohttp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\nanoftp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\HTMLparser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\HTMLtree.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="config.h">
+ <Filter>Header Files\windows\VC10</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\acconfig.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\elfgcchack.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libxml.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/win32/VC10/runsuite.vcxproj b/win32/VC10/runsuite.vcxproj
new file mode 100644
index 0000000..83cc991
--- /dev/null
+++ b/win32/VC10/runsuite.vcxproj
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D841B4F7-C277-49CB-B379-8B1801C8EE35}</ProjectGuid>
+ <RootNamespace>runsuite</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)..\..\lib\</OutDir>
+ <IntDir>build\$(ProjectName)$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\include;$(ProjectDir)..\..\..\libiconv-1.14.vc10\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4996</DisableSpecificWarnings>
+ <PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <MinimalRebuild>false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\runsuite.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\libiconv-1.14.vc10\windows\VC10\iconv.vcxproj">
+ <Project>{bec03130-a64c-48f8-863c-52da83cfb3ae}</Project>
+ </ProjectReference>
+ <ProjectReference Include="libxml2.vcxproj">
+ <Project>{1d6039f6-5078-416f-a3af-a36efc7e6a1c}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/win32/VC10/runsuite.vcxproj.filters b/win32/VC10/runsuite.vcxproj.filters
new file mode 100644
index 0000000..d7dce00
--- /dev/null
+++ b/win32/VC10/runsuite.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\runsuite.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/win32/configure.js b/win32/configure.js
new file mode 100644
index 0000000..edd943a
--- /dev/null
+++ b/win32/configure.js
@@ -0,0 +1,708 @@
+/* Configure script for libxml, specific for Windows with Scripting Host.
+ *
+ * This script will configure the libxml build process and create necessary files.
+ * Run it with an 'help', or an invalid option and it will tell you what options
+ * it accepts.
+ *
+ * March 2002, Igor Zlatkovic <igor@zlatkovic.com>
+ */
+
+/* The source directory, relative to the one where this file resides. */
+var srcDirXml = "..";
+var srcDirUtils = "..";
+/* Base name of what we are building. */
+var baseName = "libxml2";
+/* Configure file which contains the version and the output file where
+ we can store our build configuration. */
+var configFile = srcDirXml + "\\configure.in";
+var versionFile = ".\\config.msvc";
+/* Input and output files regarding the libxml features. */
+var optsFileIn = srcDirXml + "\\include\\libxml\\xmlversion.h.in";
+var optsFile = srcDirXml + "\\include\\libxml\\xmlversion.h";
+/* Version strings for the binary distribution. Will be filled later
+ in the code. */
+var verMajor;
+var verMinor;
+var verMicro;
+var verMicroSuffix;
+var verCvs;
+var useCvsVer = true;
+/* Libxml features. */
+var withTrio = false;
+var withThreads = "native";
+var withFtp = true;
+var withHttp = true;
+var withHtml = true;
+var withC14n = true;
+var withCatalog = true;
+var withDocb = true;
+var withXpath = true;
+var withXptr = true;
+var withXinclude = true;
+var withIconv = true;
+var withIcu = false;
+var withIso8859x = false;
+var withZlib = false;
+var withLzma = false;
+var withDebug = true;
+var withMemDebug = false;
+var withRunDebug = false;
+var withSchemas = true;
+var withSchematron = true;
+var withRegExps = true;
+var withModules = true;
+var withTree = true;
+var withReader = true;
+var withWriter = true;
+var withWalker = true;
+var withPattern = true;
+var withPush = true;
+var withValid = true;
+var withSax1 = true;
+var withLegacy = true;
+var withOutput = true;
+var withPython = false;
+/* Win32 build options. */
+var dirSep = "\\";
+var compiler = "msvc";
+var cruntime = "/MD";
+var dynruntime = true;
+var vcmanifest = false;
+var buildDebug = 0;
+var buildStatic = 0;
+var buildPrefix = ".";
+var buildBinPrefix = "";
+var buildIncPrefix = "";
+var buildLibPrefix = "";
+var buildSoPrefix = "";
+var buildInclude = ".";
+var buildLib = ".";
+/* Local stuff */
+var error = 0;
+
+/* Helper function, transforms the option variable into the 'Enabled'
+ or 'Disabled' string. */
+function boolToStr(opt)
+{
+ if (opt == false)
+ return "no";
+ else if (opt == true)
+ return "yes";
+ error = 1;
+ return "*** undefined ***";
+}
+
+/* Helper function, transforms the argument string into a boolean
+ value. */
+function strToBool(opt)
+{
+ if (opt == 0 || opt == "no")
+ return false;
+ else if (opt == 1 || opt == "yes")
+ return true;
+ error = 1;
+ return false;
+}
+
+/* Displays the details about how to use this script. */
+function usage()
+{
+ var txt;
+ txt = "Usage:\n";
+ txt += " cscript " + WScript.ScriptName + " <options>\n";
+ txt += " cscript " + WScript.ScriptName + " help\n\n";
+ txt += "Options can be specified in the form <option>=<value>, where the value is\n";
+ txt += "either 'yes' or 'no', if not stated otherwise.\n\n";
+ txt += "\nXML processor options, default value given in parentheses:\n\n";
+ txt += " trio: Enable TRIO string manipulator (" + (withTrio? "yes" : "no") + ")\n";
+ txt += " threads: Enable thread safety [no|ctls|native|posix] (" + (withThreads) + ") \n";
+ txt += " ftp: Enable FTP client (" + (withFtp? "yes" : "no") + ")\n";
+ txt += " http: Enable HTTP client (" + (withHttp? "yes" : "no") + ")\n";
+ txt += " html: Enable HTML processor (" + (withHtml? "yes" : "no") + ")\n";
+ txt += " c14n: Enable C14N support (" + (withC14n? "yes" : "no") + ")\n";
+ txt += " catalog: Enable catalog support (" + (withCatalog? "yes" : "no") + ")\n";
+ txt += " docb: Enable DocBook support (" + (withDocb? "yes" : "no") + ")\n";
+ txt += " xpath: Enable XPath support (" + (withXpath? "yes" : "no") + ")\n";
+ txt += " xptr: Enable XPointer support (" + (withXptr? "yes" : "no") + ")\n";
+ txt += " xinclude: Enable XInclude support (" + (withXinclude? "yes" : "no") + ")\n";
+ txt += " iconv: Enable iconv support (" + (withIconv? "yes" : "no") + ")\n";
+ txt += " icu: Enable icu support (" + (withIcu? "yes" : "no") + ")\n";
+ txt += " iso8859x: Enable ISO8859X support (" + (withIso8859x? "yes" : "no") + ")\n";
+ txt += " zlib: Enable zlib support (" + (withZlib? "yes" : "no") + ")\n";
+ txt += " lzma: Enable lzma support (" + (withLzma? "yes" : "no") + ")\n";
+ txt += " xml_debug: Enable XML debbugging module (" + (withDebug? "yes" : "no") + ")\n";
+ txt += " mem_debug: Enable memory debugger (" + (withMemDebug? "yes" : "no") + ")\n";
+ txt += " run_debug: Enable memory debugger (" + (withRunDebug? "yes" : "no") + ")\n";
+ txt += " regexps: Enable regular expressions (" + (withRegExps? "yes" : "no") + ")\n";
+ txt += " modules: Enable module support (" + (withModules? "yes" : "no") + ")\n";
+ txt += " tree: Enable tree api (" + (withTree? "yes" : "no") + ")\n";
+ txt += " reader: Enable xmlReader api (" + (withReader? "yes" : "no") + ")\n";
+ txt += " writer: Enable xmlWriter api (" + (withWriter? "yes" : "no") + ")\n";
+ txt += " walker: Enable xmlDocWalker api (" + (withWalker? "yes" : "no") + ")\n";
+ txt += " pattern: Enable xmlPattern api (" + (withPattern? "yes" : "no") + ")\n";
+ txt += " push: Enable push api (" + (withPush? "yes" : "no") + ")\n";
+ txt += " valid: Enable DTD validation support (" + (withValid? "yes" : "no") + ")\n";
+ txt += " sax1: Enable SAX1 api (" + (withSax1? "yes" : "no") + ")\n";
+ txt += " legacy: Enable Deprecated api's (" + (withLegacy? "yes" : "no") + ")\n";
+ txt += " output: Enable serialization support (" + (withOutput? "yes" : "no") + ")\n";
+ txt += " schemas: Enable XML Schema support (" + (withSchemas? "yes" : "no") + ")\n";
+ txt += " schematron: Enable Schematron support (" + (withSchematron? "yes" : "no") + ")\n";
+ txt += " python: Build Python bindings (" + (withPython? "yes" : "no") + ")\n";
+ txt += "\nWin32 build options, default value given in parentheses:\n\n";
+ txt += " compiler: Compiler to be used [msvc|mingw|bcb] (" + compiler + ")\n";
+ txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
+ txt += " dynruntime: Use the dynamic RTL (only bcb) (" + dynruntime + ")\n";
+ txt += " vcmanifest: Embed VC manifest (only msvc) (" + (vcmanifest? "yes" : "no") + ")\n";
+ txt += " debug: Build unoptimised debug executables (" + (buildDebug? "yes" : "no") + ")\n";
+ txt += " static: Link xmllint statically to libxml2 (" + (buildStatic? "yes" : "no") + ")\n";
+ txt += " Note: automatically enabled if cruntime is not /MD or /MDd\n";
+ txt += " prefix: Base directory for the installation (" + buildPrefix + ")\n";
+ txt += " bindir: Directory where xmllint and friends should be installed\n";
+ txt += " (" + buildBinPrefix + ")\n";
+ txt += " incdir: Directory where headers should be installed\n";
+ txt += " (" + buildIncPrefix + ")\n";
+ txt += " libdir: Directory where static and import libraries should be\n";
+ txt += " installed (" + buildLibPrefix + ")\n";
+ txt += " sodir: Directory where shared libraries should be installed\n";
+ txt += " (" + buildSoPrefix + ")\n";
+ txt += " include: Additional search path for the compiler, particularily\n";
+ txt += " where iconv headers can be found (" + buildInclude + ")\n";
+ txt += " lib: Additional search path for the linker, particularily\n";
+ txt += " where iconv library can be found (" + buildLib + ")\n";
+ WScript.Echo(txt);
+}
+
+/* Discovers the version we are working with by reading the apropriate
+ configuration file. Despite its name, this also writes the configuration
+ file included by our makefile. */
+function discoverVersion()
+{
+ var fso, cf, vf, ln, s, iDot, iSlash;
+ fso = new ActiveXObject("Scripting.FileSystemObject");
+ verCvs = "";
+ if (useCvsVer && fso.FileExists("..\\CVS\\Entries")) {
+ cf = fso.OpenTextFile("..\\CVS\\Entries", 1);
+ while (cf.AtEndOfStream != true) {
+ ln = cf.ReadLine();
+ s = new String(ln);
+ if (s.search(/^\/ChangeLog\//) != -1) {
+ iDot = s.indexOf(".");
+ iSlash = s.indexOf("/", iDot);
+ verCvs = "CVS" + s.substring(iDot + 1, iSlash);
+ break;
+ }
+ }
+ cf.Close();
+ }
+ cf = fso.OpenTextFile(configFile, 1);
+ if (compiler == "msvc")
+ versionFile = ".\\config.msvc";
+ else if (compiler == "mingw")
+ versionFile = ".\\config.mingw";
+ else if (compiler == "bcb")
+ versionFile = ".\\config.bcb";
+ vf = fso.CreateTextFile(versionFile, true);
+ vf.WriteLine("# " + versionFile);
+ vf.WriteLine("# This file is generated automatically by " + WScript.ScriptName + ".");
+ vf.WriteBlankLines(1);
+ while (cf.AtEndOfStream != true) {
+ ln = cf.ReadLine();
+ s = new String(ln);
+ if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
+ vf.WriteLine(s);
+ verMajor = s.substring(s.indexOf("=") + 1, s.length)
+ } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
+ vf.WriteLine(s);
+ verMinor = s.substring(s.indexOf("=") + 1, s.length)
+ } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
+ vf.WriteLine(s);
+ verMicro = s.substring(s.indexOf("=") + 1, s.length)
+ } else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
+ vf.WriteLine(s);
+ verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length)
+ }
+ }
+ cf.Close();
+ vf.WriteLine("XML_SRCDIR=" + srcDirXml);
+ vf.WriteLine("UTILS_SRCDIR=" + srcDirUtils);
+ vf.WriteLine("WITH_TRIO=" + (withTrio? "1" : "0"));
+ vf.WriteLine("WITH_THREADS=" + withThreads);
+ vf.WriteLine("WITH_FTP=" + (withFtp? "1" : "0"));
+ vf.WriteLine("WITH_HTTP=" + (withHttp? "1" : "0"));
+ vf.WriteLine("WITH_HTML=" + (withHtml? "1" : "0"));
+ vf.WriteLine("WITH_C14N=" + (withC14n? "1" : "0"));
+ vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
+ vf.WriteLine("WITH_DOCB=" + (withDocb? "1" : "0"));
+ vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
+ vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
+ vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
+ vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
+ vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0"));
+ vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
+ vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
+ vf.WriteLine("WITH_LZMA=" + (withLzma? "1" : "0"));
+ vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
+ vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
+ vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
+ vf.WriteLine("WITH_SCHEMAS=" + (withSchemas? "1" : "0"));
+ vf.WriteLine("WITH_SCHEMATRON=" + (withSchematron? "1" : "0"));
+ vf.WriteLine("WITH_REGEXPS=" + (withRegExps? "1" : "0"));
+ vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
+ vf.WriteLine("WITH_TREE=" + (withTree? "1" : "0"));
+ vf.WriteLine("WITH_READER=" + (withReader? "1" : "0"));
+ vf.WriteLine("WITH_WRITER=" + (withWriter? "1" : "0"));
+ vf.WriteLine("WITH_WALKER=" + (withWalker? "1" : "0"));
+ vf.WriteLine("WITH_PATTERN=" + (withPattern? "1" : "0"));
+ vf.WriteLine("WITH_PUSH=" + (withPush? "1" : "0"));
+ vf.WriteLine("WITH_VALID=" + (withValid? "1" : "0"));
+ vf.WriteLine("WITH_SAX1=" + (withSax1? "1" : "0"));
+ vf.WriteLine("WITH_LEGACY=" + (withLegacy? "1" : "0"));
+ vf.WriteLine("WITH_OUTPUT=" + (withOutput? "1" : "0"));
+ vf.WriteLine("WITH_PYTHON=" + (withPython? "1" : "0"));
+ vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
+ vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
+ vf.WriteLine("PREFIX=" + buildPrefix);
+ vf.WriteLine("BINPREFIX=" + buildBinPrefix);
+ vf.WriteLine("INCPREFIX=" + buildIncPrefix);
+ vf.WriteLine("LIBPREFIX=" + buildLibPrefix);
+ vf.WriteLine("SOPREFIX=" + buildSoPrefix);
+ if (compiler == "msvc") {
+ vf.WriteLine("INCLUDE=$(INCLUDE);" + buildInclude);
+ vf.WriteLine("LIB=$(LIB);" + buildLib);
+ vf.WriteLine("CRUNTIME=" + cruntime);
+ vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
+ } else if (compiler == "mingw") {
+ vf.WriteLine("INCLUDE+= -I" + buildInclude);
+ vf.WriteLine("LIB+= -L" + buildLib);
+ } else if (compiler == "bcb") {
+ vf.WriteLine("INCLUDE=" + buildInclude);
+ vf.WriteLine("LIB=" + buildLib);
+ vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
+ }
+ vf.Close();
+}
+
+/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
+ taking what the user passed on the command line into account. */
+function configureLibxml()
+{
+ var fso, ofi, of, ln, s;
+ fso = new ActiveXObject("Scripting.FileSystemObject");
+ ofi = fso.OpenTextFile(optsFileIn, 1);
+ of = fso.CreateTextFile(optsFile, true);
+ while (ofi.AtEndOfStream != true) {
+ ln = ofi.ReadLine();
+ s = new String(ln);
+ if (s.search(/\@VERSION\@/) != -1) {
+ of.WriteLine(s.replace(/\@VERSION\@/,
+ verMajor + "." + verMinor + "." + verMicro + verMicroSuffix));
+ } else if (s.search(/\@LIBXML_VERSION_NUMBER\@/) != -1) {
+ of.WriteLine(s.replace(/\@LIBXML_VERSION_NUMBER\@/,
+ verMajor*10000 + verMinor*100 + verMicro*1));
+ } else if (s.search(/\@LIBXML_VERSION_EXTRA\@/) != -1) {
+ of.WriteLine(s.replace(/\@LIBXML_VERSION_EXTRA\@/, verCvs));
+ } else if (s.search(/\@WITH_TRIO\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_TRIO\@/, withTrio? "1" : "0"));
+ } else if (s.search(/\@WITH_THREADS\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
+ } else if (s.search(/\@WITH_THREAD_ALLOC\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_THREAD_ALLOC\@/, "0"));
+ } else if (s.search(/\@WITH_FTP\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_FTP\@/, withFtp? "1" : "0"));
+ } else if (s.search(/\@WITH_HTTP\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_HTTP\@/, withHttp? "1" : "0"));
+ } else if (s.search(/\@WITH_HTML\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_HTML\@/, withHtml? "1" : "0"));
+ } else if (s.search(/\@WITH_C14N\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_C14N\@/, withC14n? "1" : "0"));
+ } else if (s.search(/\@WITH_CATALOG\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_CATALOG\@/, withCatalog? "1" : "0"));
+ } else if (s.search(/\@WITH_DOCB\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_DOCB\@/, withDocb? "1" : "0"));
+ } else if (s.search(/\@WITH_XPATH\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
+ } else if (s.search(/\@WITH_XPTR\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
+ } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
+ } else if (s.search(/\@WITH_ICONV\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_ICONV\@/, withIconv? "1" : "0"));
+ } else if (s.search(/\@WITH_ICU\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_ICU\@/, withIcu? "1" : "0"));
+ } else if (s.search(/\@WITH_ISO8859X\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
+ } else if (s.search(/\@WITH_ZLIB\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_ZLIB\@/, withZlib? "1" : "0"));
+ } else if (s.search(/\@WITH_LZMA\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_LZMA\@/, withLzma? "1" : "0"));
+ } else if (s.search(/\@WITH_DEBUG\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_DEBUG\@/, withDebug? "1" : "0"));
+ } else if (s.search(/\@WITH_MEM_DEBUG\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_MEM_DEBUG\@/, withMemDebug? "1" : "0"));
+ } else if (s.search(/\@WITH_RUN_DEBUG\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_RUN_DEBUG\@/, withRunDebug? "1" : "0"));
+ } else if (s.search(/\@WITH_SCHEMAS\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_SCHEMAS\@/, withSchemas? "1" : "0"));
+ } else if (s.search(/\@WITH_SCHEMATRON\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_SCHEMATRON\@/, withSchematron? "1" : "0"));
+ } else if (s.search(/\@WITH_REGEXPS\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_REGEXPS\@/, withRegExps? "1" : "0"));
+ } else if (s.search(/\@WITH_MODULES\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
+ } else if (s.search(/\@MODULE_EXTENSION\@/) != -1) {
+ of.WriteLine(s.replace(/\@MODULE_EXTENSION\@/, ".dll"));
+ } else if (s.search(/\@WITH_TREE\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_TREE\@/, withTree? "1" : "0"));
+ } else if (s.search(/\@WITH_READER\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_READER\@/, withReader? "1" : "0"));
+ } else if (s.search(/\@WITH_WRITER\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_WRITER\@/, withWriter? "1" : "0"));
+ } else if (s.search(/\@WITH_WALKER\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_WALKER\@/, withWalker? "1" : "0"));
+ } else if (s.search(/\@WITH_PATTERN\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_PATTERN\@/, withPattern? "1" : "0"));
+ } else if (s.search(/\@WITH_PUSH\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_PUSH\@/, withPush? "1" : "0"));
+ } else if (s.search(/\@WITH_VALID\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_VALID\@/, withValid? "1" : "0"));
+ } else if (s.search(/\@WITH_SAX1\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_SAX1\@/, withSax1? "1" : "0"));
+ } else if (s.search(/\@WITH_LEGACY\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_LEGACY\@/, withLegacy? "1" : "0"));
+ } else if (s.search(/\@WITH_OUTPUT\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_OUTPUT\@/, withOutput? "1" : "0"));
+ } else
+ of.WriteLine(ln);
+ }
+ ofi.Close();
+ of.Close();
+}
+/* Configures Python bindings. Otherwise identical to the above */
+function configureLibxmlPy()
+{
+ var pyOptsFileIn = srcDirXml + "\\python\\setup.py.in";
+ var pyOptsFile = srcDirXml + "\\python\\setup.py";
+ var fso, ofi, of, ln, s;
+ fso = new ActiveXObject("Scripting.FileSystemObject");
+ ofi = fso.OpenTextFile(pyOptsFileIn, 1);
+ of = fso.CreateTextFile(pyOptsFile, true);
+ while (ofi.AtEndOfStream != true) {
+ ln = ofi.ReadLine();
+ s = new String(ln);
+ if (s.search(/\@LIBXML_VERSION\@/) != -1) {
+ of.WriteLine(s.replace(/\@LIBXML_VERSION\@/,
+ verMajor + "." + verMinor + "." + verMicro));
+ } else if (s.search(/\@prefix\@/) != -1) {
+ of.WriteLine(s.replace(/\@prefix\@/, buildPrefix));
+ } else if (s.search(/\@WITH_THREADS\@/) != -1) {
+ of.WriteLine(s.replace(/\@WITH_THREADS\@/, withThreads == "no"? "0" : "1"));
+ } else
+ of.WriteLine(ln);
+ }
+ ofi.Close();
+ of.Close();
+}
+
+/* Creates the readme file for the binary distribution of 'bname', for the
+ version 'ver' in the file 'file'. This one is called from the Makefile when
+ generating a binary distribution. The parameters are passed by make. */
+function genReadme(bname, ver, file)
+{
+ var fso, f;
+ fso = new ActiveXObject("Scripting.FileSystemObject");
+ f = fso.CreateTextFile(file, true);
+ f.WriteLine(" " + bname + " " + ver);
+ f.WriteLine(" --------------");
+ f.WriteBlankLines(1);
+ f.WriteLine(" This is " + bname + ", version " + ver + ", binary package for the native Win32/IA32");
+ f.WriteLine("platform.");
+ f.WriteBlankLines(1);
+ f.WriteLine(" The files in this package do not require any special installation");
+ f.WriteLine("steps. Extract the contents of the archive whereever you wish and");
+ f.WriteLine("make sure that your tools which use " + bname + " can find it.");
+ f.WriteBlankLines(1);
+ f.WriteLine(" For example, if you want to run the supplied utilities from the command");
+ f.WriteLine("line, you can, if you wish, add the 'bin' subdirectory to the PATH");
+ f.WriteLine("environment variable.");
+ f.WriteLine(" If you want to make programmes in C which use " + bname + ", you'll");
+ f.WriteLine("likely know how to use the contents of this package. If you don't, please");
+ f.WriteLine("refer to your compiler's documentation.");
+ f.WriteBlankLines(1);
+ f.WriteLine(" If there is something you cannot keep for yourself, such as a problem,");
+ f.WriteLine("a cheer of joy, a comment or a suggestion, feel free to contact me using");
+ f.WriteLine("the address below.");
+ f.WriteBlankLines(1);
+ f.WriteLine(" Igor Zlatkovic (igor@zlatkovic.com)");
+ f.Close();
+}
+
+
+/*
+ * main(),
+ * Execution begins here.
+ */
+
+// Parse the command-line arguments.
+for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
+ var arg, opt;
+ arg = WScript.Arguments(i);
+ opt = arg.substring(0, arg.indexOf("="));
+ if (opt.length == 0)
+ opt = arg.substring(0, arg.indexOf(":"));
+ if (opt.length > 0) {
+ if (opt == "trio")
+ withTrio = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "threads")
+ withThreads = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "ftp")
+ withFtp = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "http")
+ withHttp = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "html")
+ withHtml = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "c14n")
+ withC14n = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "catalog")
+ withCatalog = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "docb")
+ withDocb = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "xpath")
+ withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "xptr")
+ withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "xinclude")
+ withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "iconv")
+ withIconv = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "icu")
+ withIcu = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "iso8859x")
+ withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "zlib")
+ withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "lzma")
+ withLzma = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "xml_debug")
+ withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "mem_debug")
+ withMemDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "run_debug")
+ withRunDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "schemas")
+ withSchemas = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "schematron")
+ withSchematron = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "regexps")
+ withRegExps = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "modules")
+ withModules = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "tree")
+ withTree = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "reader")
+ withReader = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "writer")
+ withWriter = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "walker")
+ withWalker = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "pattern")
+ withPattern = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "push")
+ withPush = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "valid")
+ withValid = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "sax1")
+ withSax1 = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "legacy")
+ withLegacy = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "output")
+ withOutput = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "python")
+ withPython = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "compiler")
+ compiler = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "cruntime")
+ cruntime = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "dynruntime")
+ dynruntime = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "vcmanifest")
+ vcmanifest = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "debug")
+ buildDebug = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "static")
+ buildStatic = strToBool(arg.substring(opt.length + 1, arg.length));
+ else if (opt == "prefix")
+ buildPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "incdir")
+ buildIncPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "bindir")
+ buildBinPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "libdir")
+ buildLibPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "sodir")
+ buildSoPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "incdir")
+ buildIncPrefix = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "include")
+ buildInclude = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "lib")
+ buildLib = arg.substring(opt.length + 1, arg.length);
+ else if (opt == "release")
+ useCvsVer = false;
+ else
+ error = 1;
+ } else if (i == 0) {
+ if (arg == "genreadme") {
+ // This command comes from the Makefile and will not be checked
+ // for errors, because Makefile will always supply right the parameters.
+ genReadme(WScript.Arguments(1), WScript.Arguments(2), WScript.Arguments(3));
+ WScript.Quit(0);
+ } else if (arg == "help") {
+ usage();
+ WScript.Quit(0);
+ }
+
+ } else {
+ error = 1;
+ }
+}
+
+
+// If we fail here, it is because the user supplied an unrecognised argument.
+if (error != 0) {
+ usage();
+ WScript.Quit(error);
+}
+
+// if user choses to link the c-runtime library statically into libxml2
+// with /MT and friends, then we need to enable static linking for xmllint
+if (cruntime == "/MT" || cruntime == "/MTd" ||
+ cruntime == "/ML" || cruntime == "/MLd") {
+ buildStatic = 1;
+}
+
+dirSep = "\\";
+if (buildBinPrefix == "")
+ buildBinPrefix = "$(PREFIX)" + dirSep + "bin";
+if (buildIncPrefix == "")
+ buildIncPrefix = "$(PREFIX)" + dirSep + "include";
+if (buildLibPrefix == "")
+ buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
+if (buildSoPrefix == "")
+ buildSoPrefix = "$(PREFIX)" + dirSep + "bin";
+
+// Discover the version.
+discoverVersion();
+if (error != 0) {
+ WScript.Echo("Version discovery failed, aborting.");
+ WScript.Quit(error);
+}
+
+var outVerString = baseName + " version: " + verMajor + "." + verMinor + "." + verMicro;
+if (verMicroSuffix && verMicroSuffix != "")
+ outVerString += "-" + verMicroSuffix;
+if (verCvs && verCvs != "")
+ outVerString += "-" + verCvs;
+WScript.Echo(outVerString);
+
+// Configure libxml.
+configureLibxml();
+if (error != 0) {
+ WScript.Echo("Configuration failed, aborting.");
+ WScript.Quit(error);
+}
+
+if (withPython == true) {
+ configureLibxmlPy();
+ if (error != 0) {
+ WScript.Echo("Configuration failed, aborting.");
+ WScript.Quit(error);
+ }
+
+}
+
+// Create the makefile.
+var fso = new ActiveXObject("Scripting.FileSystemObject");
+var makefile = ".\\Makefile.msvc";
+if (compiler == "mingw")
+ makefile = ".\\Makefile.mingw";
+else if (compiler == "bcb")
+ makefile = ".\\Makefile.bcb";
+var new_makefile = ".\\Makefile";
+var f = fso.FileExists(new_makefile);
+if (f) {
+ var t = fso.GetFile(new_makefile);
+ t.Attributes =0;
+}
+fso.CopyFile(makefile, new_makefile, true);
+WScript.Echo("Created Makefile.");
+// Create the config.h.
+var confighsrc = "..\\include\\win32config.h";
+var configh = "..\\config.h";
+var f = fso.FileExists(configh);
+if (f) {
+ var t = fso.GetFile(configh);
+ t.Attributes =0;
+}
+fso.CopyFile(confighsrc, configh, true);
+WScript.Echo("Created config.h.");
+
+
+// Display the final configuration.
+var txtOut = "\nXML processor configuration\n";
+txtOut += "---------------------------\n";
+txtOut += " Trio: " + boolToStr(withTrio) + "\n";
+txtOut += " Thread safety: " + withThreads + "\n";
+txtOut += " FTP client: " + boolToStr(withFtp) + "\n";
+txtOut += " HTTP client: " + boolToStr(withHttp) + "\n";
+txtOut += " HTML processor: " + boolToStr(withHtml) + "\n";
+txtOut += " C14N support: " + boolToStr(withC14n) + "\n";
+txtOut += " Catalog support: " + boolToStr(withCatalog) + "\n";
+txtOut += " DocBook support: " + boolToStr(withDocb) + "\n";
+txtOut += " XPath support: " + boolToStr(withXpath) + "\n";
+txtOut += " XPointer support: " + boolToStr(withXptr) + "\n";
+txtOut += " XInclude support: " + boolToStr(withXinclude) + "\n";
+txtOut += " iconv support: " + boolToStr(withIconv) + "\n";
+txtOut += " icu support: " + boolToStr(withIcu) + "\n";
+txtOut += " iso8859x support: " + boolToStr(withIso8859x) + "\n";
+txtOut += " zlib support: " + boolToStr(withZlib) + "\n";
+txtOut += " lzma support: " + boolToStr(withLzma) + "\n";
+txtOut += " Debugging module: " + boolToStr(withDebug) + "\n";
+txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n";
+txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";
+txtOut += " Regexp support: " + boolToStr(withRegExps) + "\n";
+txtOut += " Module support: " + boolToStr(withModules) + "\n";
+txtOut += " Tree support: " + boolToStr(withTree) + "\n";
+txtOut += " Reader support: " + boolToStr(withReader) + "\n";
+txtOut += " Writer support: " + boolToStr(withWriter) + "\n";
+txtOut += " Walker support: " + boolToStr(withWalker) + "\n";
+txtOut += " Pattern support: " + boolToStr(withPattern) + "\n";
+txtOut += " Push support: " + boolToStr(withPush) + "\n";
+txtOut += "Validation support: " + boolToStr(withValid) + "\n";
+txtOut += " SAX1 support: " + boolToStr(withSax1) + "\n";
+txtOut += " Legacy support: " + boolToStr(withLegacy) + "\n";
+txtOut += " Output support: " + boolToStr(withOutput) + "\n";
+txtOut += "XML Schema support: " + boolToStr(withSchemas) + "\n";
+txtOut += "Schematron support: " + boolToStr(withSchematron) + "\n";
+txtOut += " Python bindings: " + boolToStr(withPython) + "\n";
+txtOut += "\n";
+txtOut += "Win32 build configuration\n";
+txtOut += "-------------------------\n";
+txtOut += " Compiler: " + compiler + "\n";
+if (compiler == "msvc") {
+ txtOut += " C-Runtime option: " + cruntime + "\n";
+ txtOut += " Embed Manifest: " + boolToStr(vcmanifest) + "\n";
+} else if (compiler == "bcb")
+ txtOut += " Use dynamic RTL: " + dynruntime + "\n";
+txtOut += " Debug symbols: " + boolToStr(buildDebug) + "\n";
+txtOut += " Static xmllint: " + boolToStr(buildStatic) + "\n";
+txtOut += " Install prefix: " + buildPrefix + "\n";
+txtOut += " Put tools in: " + buildBinPrefix + "\n";
+txtOut += " Put headers in: " + buildIncPrefix + "\n";
+txtOut += "Put static libs in: " + buildLibPrefix + "\n";
+txtOut += "Put shared libs in: " + buildSoPrefix + "\n";
+txtOut += " Include path: " + buildInclude + "\n";
+txtOut += " Lib path: " + buildLib + "\n";
+WScript.Echo(txtOut);
+
+//
+
diff --git a/win32/defgen.xsl b/win32/defgen.xsl
new file mode 100644
index 0000000..a598ff1
--- /dev/null
+++ b/win32/defgen.xsl
@@ -0,0 +1,288 @@
+<?xml version="1.0"?>
+<!--
+ win32/defgen.xsl
+ This stylesheet is used to transform doc/libxml2-api.xml into a pseudo-source,
+ which can then be preprocessed to get the .DEF file for the Microsoft's linker.
+
+ Use any XSLT processor to produce a file called libxml2.def.src in the win32
+ subdirectory, for example, run xsltproc from the win32 subdirectory:
+
+ xsltproc -o libxml2.def.src defgen.xsl ../doc/libxml2-api.xml
+
+ Once that finishes, rest assured, the Makefile will know what to do with the
+ generated file.
+
+ April 2003, Igor Zlatkovic <igor@zlatkovic.com>
+-->
+<!DOCTYPE xsl:stylesheet [ <!ENTITY nl '&#xd;&#xa;'> ]>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:strip-space elements="*"/>
+ <xsl:output method="text"/>
+ <xsl:template match="/">
+ <xsl:text>#define LIBXML2_COMPILING_MSCCDEF&nl;</xsl:text>
+ <xsl:text>#include "../include/libxml/xmlversion.h"&nl;</xsl:text>
+ <xsl:text>LIBRARY libxml2&nl;</xsl:text>
+ <xsl:text>EXPORTS&nl;</xsl:text>
+ <xsl:for-each select="/api/symbols/*[self::variable or self::function]">
+ <!-- Basic tests -->
+ <xsl:if test="@file = 'c14n'">
+ <xsl:text>#ifdef LIBXML_C14N_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'catalog'">
+ <xsl:text>#ifdef LIBXML_CATALOG_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'debugXML'">
+ <xsl:text>#ifdef LIBXML_DEBUG_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'DOCBparser'">
+ <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'HTMLparser')
+ or (@file = 'HTMLtree')">
+ <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'nanohttp'">
+ <xsl:text>#ifdef LIBXML_HTTP_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'nanoftp'">
+ <xsl:text>#ifdef LIBXML_FTP_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'relaxng')
+ or (@file = 'xmlschemas')
+ or (@file = 'xmlschemastypes')">
+ <xsl:text>#ifdef LIBXML_SCHEMAS_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xinclude'">
+ <xsl:text>#ifdef LIBXML_XINCLUDE_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xlink'">
+ <xsl:text>#ifdef LIBXML_XLINK_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xmlautomata'">
+ <xsl:text>#ifdef LIBXML_AUTOMATA_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'xmlregexp')
+ or (@file = 'xmlunicode')">
+ <xsl:text>#ifdef LIBXML_REGEXP_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'xpath')
+ or (@file = 'xpathInternals')">
+ <xsl:text>#ifdef LIBXML_XPATH_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xpointer'">
+ <xsl:text>#ifdef LIBXML_XPTR_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <!-- Extended tests -->
+ <xsl:if test="(@name = 'htmlDefaultSAXHandlerInit')
+ or (@name = 'htmlInitAutoClose')
+ or (@name = 'htmlCreateFileParserCtxt')
+ or (@name = 'inithtmlDefaultSAXHandler')
+ or (@name = 'xmlIsXHTML')
+ or (@name = 'xmlIOHTTPOpenW')
+ or (@name = 'xmlRegisterHTTPPostCallbacks')
+ or (@name = 'xmlIOHTTPMatch')
+ or (@name = 'xmlIOHTTPOpen')
+ or (@name = 'xmlIOHTTPRead')
+ or (@name = 'xmlIOHTTPClose')">
+ <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
+ or (@name = 'initdocbDefaultSAXHandler')">
+ <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'xmlValidBuildContentModel'">
+ <xsl:text>#ifdef LIBXML_REGEXP_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlIOFTPMatch')
+ or (@name = 'xmlIOFTPOpen')
+ or (@name = 'xmlIOFTPRead')
+ or (@name = 'xmlIOFTPClose')">
+ <xsl:text>#ifdef LIBXML_FTP_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlTextReaderRelaxNGValidate')
+ or (@name = 'xmlTextReaderRelaxNGSetSchema')">
+ <xsl:text>#ifdef LIBXML_SCHEMAS_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlXPathDebugDumpObject')
+ or (@name = 'xmlXPathDebugDumpCompExpr')">
+ <xsl:text>#ifdef LIBXML_DEBUG_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlMallocLoc')
+ or (@name = 'xmlMallocAtomicLoc')
+ or (@name = 'xmlReallocLoc')
+ or (@name = 'xmlMemStrdupLoc')">
+ <xsl:text>#ifdef DEBUG_MEMORY_LOCATION&nl;</xsl:text>
+ </xsl:if>
+ <!-- Symbol -->
+ <xsl:choose>
+ <xsl:when test="(@name = 'xmlMalloc')
+ or (@name = 'xmlMallocAtomic')
+ or (@name = 'xmlRealloc')
+ or (@name = 'xmlFree')
+ or (@name = 'xmlMemStrdup')">
+ <xsl:text>#ifdef LIBXML_THREAD_ALLOC_ENABLED&nl;</xsl:text>
+ <xsl:text>__</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&nl;</xsl:text>
+ <xsl:text>#else&nl;</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text> DATA&nl;</xsl:text>
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:when>
+ <xsl:when test="(@name = 'docbDefaultSAXHandler')
+ or (@name = 'htmlDefaultSAXHandler')
+ or (@name = 'oldXMLWDcompatibility')
+ or (@name = 'xmlBufferAllocScheme')
+ or (@name = 'xmlDefaultBufferSize')
+ or (@name = 'xmlDefaultSAXHandler')
+ or (@name = 'xmlDefaultSAXLocator')
+ or (@name = 'xmlDoValidityCheckingDefaultValue')
+ or (@name = 'xmlGenericError')
+ or (@name = 'xmlGenericErrorContext')
+ or (@name = 'xmlGetWarningsDefaultValue')
+ or (@name = 'xmlIndentTreeOutput')
+ or (@name = 'xmlTreeIndentString')
+ or (@name = 'xmlKeepBlanksDefaultValue')
+ or (@name = 'xmlLineNumbersDefaultValue')
+ or (@name = 'xmlLoadExtDtdDefaultValue')
+ or (@name = 'xmlParserDebugEntities')
+ or (@name = 'xmlParserVersion')
+ or (@name = 'xmlPedanticParserDefaultValue')
+ or (@name = 'xmlSaveNoEmptyTags')
+ or (@name = 'xmlSubstituteEntitiesDefaultValue')
+ or (@name = 'xmlRegisterNodeDefaultValue')
+ or (@name = 'xmlDeregisterNodeDefaultValue')">
+ <xsl:text>#ifdef LIBXML_THREAD_ENABLED&nl;</xsl:text>
+ <xsl:if test="@name = 'docbDefaultSAXHandler'">
+ <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'htmlDefaultSAXHandler'">
+ <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:text>__</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>&nl;</xsl:text>
+ <xsl:if test="@name = 'docbDefaultSAXHandler'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'htmlDefaultSAXHandler'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:text>#else&nl;</xsl:text>
+ <xsl:if test="@name = 'docbDefaultSAXHandler'">
+ <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'htmlDefaultSAXHandler'">
+ <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="@name"/>
+ <xsl:text> DATA&nl;</xsl:text>
+ <xsl:if test="@name = 'docbDefaultSAXHandler'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'htmlDefaultSAXHandler'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="self::variable">
+ <xsl:text> DATA</xsl:text>
+ </xsl:if>
+ <xsl:text>&nl;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- Basic tests (close) -->
+ <xsl:if test="@file = 'c14n'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'catalog'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'debugXML'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'DOCBparser'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'HTMLparser')
+ or (@file = 'HTMLtree')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'nanohttp'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'nanoftp'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'relaxng')
+ or (@file = 'xmlschemas')
+ or (@file = 'xmlschemastypes')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xinclude'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xlink'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xmlautomata'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'xmlregexp')
+ or (@file = 'xmlunicode')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@file = 'xpath')
+ or (@file = 'xpathInternals')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@file = 'xpointer'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <!-- Extended tests (close) -->
+ <xsl:if test="(@name = 'htmlDefaultSAXHandlerInit')
+ or (@name = 'htmlInitAutoClose')
+ or (@name = 'htmlCreateFileParserCtxt')
+ or (@name = 'inithtmlDefaultSAXHandler')
+ or (@name = 'xmlIsXHTML')
+ or (@name = 'xmlIOHTTPOpenW')
+ or (@name = 'xmlRegisterHTTPPostCallbacks')
+ or (@name = 'xmlIOHTTPMatch')
+ or (@name = 'xmlIOHTTPOpen')
+ or (@name = 'xmlIOHTTPRead')
+ or (@name = 'xmlIOHTTPClose')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
+ or (@name = 'initdocbDefaultSAXHandler')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="@name = 'xmlValidBuildContentModel'">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlIOFTPMatch')
+ or (@name = 'xmlIOFTPOpen')
+ or (@name = 'xmlIOFTPRead')
+ or (@name = 'xmlIOFTPClose')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlTextReaderRelaxNGValidate')
+ or (@name = 'xmlTextReaderRelaxNGSetSchema')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlXPathDebugDumpObject')
+ or (@name = 'xmlXPathDebugDumpCompExpr')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ <xsl:if test="(@name = 'xmlMallocLoc')
+ or (@name = 'xmlMallocAtomicLoc')
+ or (@name = 'xmlReallocLoc')
+ or (@name = 'xmlMemStrdupLoc')">
+ <xsl:text>#endif&nl;</xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/win32/libxml2.def.src b/win32/libxml2.def.src
new file mode 100644
index 0000000..1bdbed9
--- /dev/null
+++ b/win32/libxml2.def.src
@@ -0,0 +1,3190 @@
+#define LIBXML2_COMPILING_MSCCDEF
+#include "../include/libxml/xmlversion.h"
+LIBRARY libxml2
+EXPORTS
+#ifdef LIBXML_THREAD_ENABLED
+#ifdef LIBXML_DOCB_ENABLED
+__docbDefaultSAXHandler
+#endif
+#else
+#ifdef LIBXML_DOCB_ENABLED
+docbDefaultSAXHandler DATA
+#endif
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+emptyExp DATA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+forbiddenExp DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+#ifdef LIBXML_HTML_ENABLED
+__htmlDefaultSAXHandler
+#endif
+#else
+#ifdef LIBXML_HTML_ENABLED
+htmlDefaultSAXHandler DATA
+#endif
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__oldXMLWDcompatibility
+#else
+oldXMLWDcompatibility DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlBufferAllocScheme
+#else
+xmlBufferAllocScheme DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlDefaultBufferSize
+#else
+xmlDefaultBufferSize DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlDefaultSAXHandler
+#else
+xmlDefaultSAXHandler DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlDefaultSAXLocator
+#else
+xmlDefaultSAXLocator DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlDeregisterNodeDefaultValue
+#else
+xmlDeregisterNodeDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlDoValidityCheckingDefaultValue
+#else
+xmlDoValidityCheckingDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+__xmlFree
+#else
+xmlFree DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlGenericError
+#else
+xmlGenericError DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlGenericErrorContext
+#else
+xmlGenericErrorContext DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlGetWarningsDefaultValue
+#else
+xmlGetWarningsDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlIndentTreeOutput
+#else
+xmlIndentTreeOutput DATA
+#endif
+xmlIsBaseCharGroup DATA
+xmlIsCharGroup DATA
+xmlIsCombiningGroup DATA
+xmlIsDigitGroup DATA
+xmlIsExtenderGroup DATA
+xmlIsIdeographicGroup DATA
+xmlIsPubidChar_tab DATA
+#ifdef LIBXML_THREAD_ENABLED
+__xmlKeepBlanksDefaultValue
+#else
+xmlKeepBlanksDefaultValue DATA
+#endif
+xmlLastError DATA
+#ifdef LIBXML_THREAD_ENABLED
+__xmlLineNumbersDefaultValue
+#else
+xmlLineNumbersDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlLoadExtDtdDefaultValue
+#else
+xmlLoadExtDtdDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+__xmlMalloc
+#else
+xmlMalloc DATA
+#endif
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+__xmlMallocAtomic
+#else
+xmlMallocAtomic DATA
+#endif
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+__xmlMemStrdup
+#else
+xmlMemStrdup DATA
+#endif
+xmlOutputBufferCreateFilenameValue DATA
+#ifdef LIBXML_THREAD_ENABLED
+__xmlParserDebugEntities
+#else
+xmlParserDebugEntities DATA
+#endif
+xmlParserInputBufferCreateFilenameValue DATA
+xmlParserMaxDepth DATA
+#ifdef LIBXML_THREAD_ENABLED
+__xmlParserVersion
+#else
+xmlParserVersion DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlPedanticParserDefaultValue
+#else
+xmlPedanticParserDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+__xmlRealloc
+#else
+xmlRealloc DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlRegisterNodeDefaultValue
+#else
+xmlRegisterNodeDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlSaveNoEmptyTags
+#else
+xmlSaveNoEmptyTags DATA
+#endif
+xmlStringComment DATA
+xmlStringText DATA
+xmlStringTextNoenc DATA
+xmlStructuredError DATA
+xmlStructuredErrorContext DATA
+#ifdef LIBXML_THREAD_ENABLED
+__xmlSubstituteEntitiesDefaultValue
+#else
+xmlSubstituteEntitiesDefaultValue DATA
+#endif
+#ifdef LIBXML_THREAD_ENABLED
+__xmlTreeIndentString
+#else
+xmlTreeIndentString DATA
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNAN DATA
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNINF DATA
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPINF DATA
+#endif
+#ifdef LIBXML_HTML_ENABLED
+UTF8ToHtml
+#endif
+UTF8Toisolat1
+attribute
+attributeDecl
+cdataBlock
+characters
+checkNamespace
+comment
+#ifdef LIBXML_DOCB_ENABLED
+docbCreateFileParserCtxt
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbCreatePushParserCtxt
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbDefaultSAXHandlerInit
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbEncodeEntities
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbFreeParserCtxt
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbParseChunk
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbParseDoc
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbParseDocument
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbParseFile
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbSAXParseDoc
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+docbSAXParseFile
+#endif
+elementDecl
+endDocument
+endElement
+entityDecl
+externalSubset
+getColumnNumber
+getEntity
+getLineNumber
+getNamespace
+getParameterEntity
+getPublicId
+getSystemId
+globalNamespace
+hasExternalSubset
+hasInternalSubset
+#ifdef LIBXML_HTML_ENABLED
+htmlAttrAllowed
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlAutoCloseTag
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCreateFileParserCtxt
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCreateMemoryParserCtxt
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCreatePushParserCtxt
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReadDoc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReadFd
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReadFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReadIO
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReadMemory
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtReset
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlCtxtUseOptions
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDefaultSAXHandlerInit
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDocContentDumpFormatOutput
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDocContentDumpOutput
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDocDump
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDocDumpMemory
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlDocDumpMemoryFormat
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlElementAllowedHere
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlElementStatusHere
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlEncodeEntities
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlEntityLookup
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlEntityValueLookup
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlFreeParserCtxt
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlGetMetaEncoding
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlHandleOmittedElem
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlInitAutoClose
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlIsAutoClosed
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlIsBooleanAttr
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlIsScriptAttribute
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNewDoc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNewDocNoDtD
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNewParserCtxt
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeDump
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeDumpFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeDumpFileFormat
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeDumpFormatOutput
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeDumpOutput
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlNodeStatus
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseCharRef
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseChunk
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseDoc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseDocument
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseElement
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseEntityRef
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlParseFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlReadDoc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlReadFd
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlReadFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlReadIO
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlReadMemory
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSAXParseDoc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSAXParseFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSaveFile
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSaveFileEnc
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSaveFileFormat
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlSetMetaEncoding
+#endif
+#ifdef LIBXML_HTML_ENABLED
+htmlTagLookup
+#endif
+ignorableWhitespace
+initGenericErrorDefaultFunc
+#ifdef LIBXML_DOCB_ENABLED
+initdocbDefaultSAXHandler
+#endif
+#ifdef LIBXML_HTML_ENABLED
+inithtmlDefaultSAXHandler
+#endif
+initxmlDefaultSAXHandler
+inputPop
+inputPush
+internalSubset
+isStandalone
+isolat1ToUTF8
+namePop
+namePush
+namespaceDecl
+nodePop
+nodePush
+notationDecl
+processingInstruction
+reference
+resolveEntity
+setDocumentLocator
+setNamespace
+startDocument
+startElement
+unparsedEntityDecl
+#ifdef LIBXML_XPATH_ENABLED
+valuePop
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+valuePush
+#endif
+#ifdef LIBXML_XLINK_ENABLED
+xlinkGetDefaultDetect
+#endif
+#ifdef LIBXML_XLINK_ENABLED
+xlinkGetDefaultHandler
+#endif
+#ifdef LIBXML_XLINK_ENABLED
+xlinkIsLink
+#endif
+#ifdef LIBXML_XLINK_ENABLED
+xlinkSetDefaultDetect
+#endif
+#ifdef LIBXML_XLINK_ENABLED
+xlinkSetDefaultHandler
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogAdd
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogDump
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogRemove
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogResolve
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogResolvePublic
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogResolveSystem
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlACatalogResolveURI
+#endif
+xmlAddAttributeDecl
+xmlAddChild
+xmlAddChildList
+xmlAddDocEntity
+xmlAddDtdEntity
+xmlAddElementDecl
+xmlAddEncodingAlias
+xmlAddID
+xmlAddNextSibling
+xmlAddNotationDecl
+xmlAddPrevSibling
+xmlAddRef
+xmlAddSibling
+xmlAllocOutputBuffer
+xmlAllocParserInputBuffer
+xmlAttrSerializeTxtContent
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataCompile
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataGetInitState
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataIsDeterminist
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewAllTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewCountTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewCountTrans2
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewCountedTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewCounter
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewCounterTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewEpsilon
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewNegTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewOnceTrans
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewOnceTrans2
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewState
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewTransition
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataNewTransition2
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlAutomataSetFinalState
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlBoolToText
+#endif
+xmlBufContent
+xmlBufEnd
+xmlBufGetNodeContent
+xmlBufNodeDump
+xmlBufShrink
+xmlBufUse
+xmlBufferAdd
+xmlBufferAddHead
+xmlBufferCCat
+xmlBufferCat
+xmlBufferContent
+xmlBufferCreate
+xmlBufferCreateSize
+xmlBufferCreateStatic
+xmlBufferDetach
+xmlBufferDump
+xmlBufferEmpty
+xmlBufferFree
+xmlBufferGrow
+xmlBufferLength
+xmlBufferResize
+xmlBufferSetAllocationScheme
+xmlBufferShrink
+xmlBufferWriteCHAR
+xmlBufferWriteChar
+xmlBufferWriteQuotedString
+xmlBuildQName
+xmlBuildRelativeURI
+xmlBuildURI
+xmlByteConsumed
+#ifdef LIBXML_C14N_ENABLED
+xmlC14NDocDumpMemory
+#endif
+#ifdef LIBXML_C14N_ENABLED
+xmlC14NDocSave
+#endif
+#ifdef LIBXML_C14N_ENABLED
+xmlC14NDocSaveTo
+#endif
+#ifdef LIBXML_C14N_ENABLED
+xmlC14NExecute
+#endif
+xmlCanonicPath
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogAdd
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogAddLocal
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogCleanup
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogConvert
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogDump
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogFreeLocal
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogGetDefaults
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogGetPublic
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogGetSystem
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogIsEmpty
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogLocalResolve
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogLocalResolveURI
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogRemove
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogResolve
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogResolvePublic
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogResolveSystem
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogResolveURI
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogSetDebug
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogSetDefaultPrefer
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlCatalogSetDefaults
+#endif
+xmlCharEncCloseFunc
+xmlCharEncFirstLine
+xmlCharEncInFunc
+xmlCharEncOutFunc
+xmlCharInRange
+xmlCharStrdup
+xmlCharStrndup
+xmlCheckFilename
+xmlCheckHTTPInput
+xmlCheckLanguageID
+xmlCheckUTF8
+xmlCheckVersion
+xmlChildElementCount
+xmlCleanupCharEncodingHandlers
+xmlCleanupEncodingAliases
+xmlCleanupGlobals
+xmlCleanupInputCallbacks
+xmlCleanupMemory
+xmlCleanupOutputCallbacks
+xmlCleanupParser
+xmlCleanupPredefinedEntities
+xmlCleanupThreads
+xmlClearNodeInfoSeq
+xmlClearParserCtxt
+#ifdef LIBXML_CATALOG_ENABLED
+xmlConvertSGMLCatalog
+#endif
+xmlCopyAttributeTable
+xmlCopyChar
+xmlCopyCharMultiByte
+xmlCopyDoc
+xmlCopyDocElementContent
+xmlCopyDtd
+xmlCopyElementContent
+xmlCopyElementTable
+xmlCopyEntitiesTable
+xmlCopyEnumeration
+xmlCopyError
+xmlCopyNamespace
+xmlCopyNamespaceList
+xmlCopyNode
+xmlCopyNodeList
+xmlCopyNotationTable
+xmlCopyProp
+xmlCopyPropList
+xmlCreateDocParserCtxt
+xmlCreateEntitiesTable
+xmlCreateEntityParserCtxt
+xmlCreateEnumeration
+xmlCreateFileParserCtxt
+xmlCreateIOParserCtxt
+xmlCreateIntSubset
+xmlCreateMemoryParserCtxt
+xmlCreatePushParserCtxt
+xmlCreateURI
+xmlCreateURLParserCtxt
+xmlCtxtGetLastError
+xmlCtxtReadDoc
+xmlCtxtReadFd
+xmlCtxtReadFile
+xmlCtxtReadIO
+xmlCtxtReadMemory
+xmlCtxtReset
+xmlCtxtResetLastError
+xmlCtxtResetPush
+xmlCtxtUseOptions
+xmlCurrentChar
+xmlDOMWrapAdoptNode
+xmlDOMWrapCloneNode
+xmlDOMWrapFreeCtxt
+xmlDOMWrapNewCtxt
+xmlDOMWrapReconcileNamespaces
+xmlDOMWrapRemoveNode
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugCheckDocument
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpAttr
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpAttrList
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpDTD
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpDocument
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpDocumentHead
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpEntities
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpNode
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpNodeList
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpOneNode
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlDebugDumpString
+#endif
+xmlDecodeEntities
+xmlDefaultSAXHandlerInit
+xmlDelEncodingAlias
+xmlDeregisterNodeDefault
+xmlDetectCharEncoding
+xmlDictCleanup
+xmlDictCreate
+xmlDictCreateSub
+xmlDictExists
+xmlDictFree
+xmlDictGetUsage
+xmlDictLookup
+xmlDictOwns
+xmlDictQLookup
+xmlDictReference
+xmlDictSetLimit
+xmlDictSize
+xmlDllMain
+xmlDocCopyNode
+xmlDocCopyNodeList
+xmlDocDump
+xmlDocDumpFormatMemory
+xmlDocDumpFormatMemoryEnc
+xmlDocDumpMemory
+xmlDocDumpMemoryEnc
+xmlDocFormatDump
+xmlDocGetRootElement
+xmlDocSetRootElement
+xmlDumpAttributeDecl
+xmlDumpAttributeTable
+xmlDumpElementDecl
+xmlDumpElementTable
+xmlDumpEntitiesTable
+xmlDumpEntityDecl
+xmlDumpNotationDecl
+xmlDumpNotationTable
+xmlElemDump
+xmlEncodeEntities
+xmlEncodeEntitiesReentrant
+xmlEncodeSpecialChars
+xmlErrMemory
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpCtxtNbCons
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpCtxtNbNodes
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpDump
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpExpDerive
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpFree
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpFreeCtxt
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpGetLanguage
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpGetStart
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpIsNillable
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpMaxToken
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpNewAtom
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpNewCtxt
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpNewOr
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpNewRange
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpNewSeq
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpParse
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpRef
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpStringDerive
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlExpSubsume
+#endif
+xmlFileClose
+xmlFileMatch
+xmlFileOpen
+xmlFileRead
+xmlFindCharEncodingHandler
+xmlFirstElementChild
+xmlFreeAttributeTable
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlFreeAutomata
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlFreeCatalog
+#endif
+xmlFreeDoc
+xmlFreeDocElementContent
+xmlFreeDtd
+xmlFreeElementContent
+xmlFreeElementTable
+xmlFreeEntitiesTable
+xmlFreeEnumeration
+xmlFreeIDTable
+xmlFreeInputStream
+xmlFreeMutex
+xmlFreeNode
+xmlFreeNodeList
+xmlFreeNotationTable
+xmlFreeNs
+xmlFreeNsList
+xmlFreeParserCtxt
+xmlFreeParserInputBuffer
+xmlFreePattern
+xmlFreePatternList
+xmlFreeProp
+xmlFreePropList
+xmlFreeRMutex
+xmlFreeRefTable
+xmlFreeStreamCtxt
+xmlFreeTextReader
+xmlFreeTextWriter
+xmlFreeURI
+xmlFreeValidCtxt
+xmlGcMemGet
+xmlGcMemSetup
+xmlGetBufferAllocationScheme
+xmlGetCharEncodingHandler
+xmlGetCharEncodingName
+xmlGetCompressMode
+xmlGetDocCompressMode
+xmlGetDocEntity
+xmlGetDtdAttrDesc
+xmlGetDtdElementDesc
+xmlGetDtdEntity
+xmlGetDtdNotationDesc
+xmlGetDtdQAttrDesc
+xmlGetDtdQElementDesc
+xmlGetEncodingAlias
+xmlGetExternalEntityLoader
+xmlGetFeature
+xmlGetFeaturesList
+xmlGetGlobalState
+xmlGetID
+xmlGetIntSubset
+xmlGetLastChild
+xmlGetLastError
+xmlGetLineNo
+xmlGetNoNsProp
+xmlGetNodePath
+xmlGetNsList
+xmlGetNsProp
+xmlGetParameterEntity
+xmlGetPredefinedEntity
+xmlGetProp
+xmlGetRefs
+xmlGetThreadId
+xmlGetUTF8Char
+xmlHandleEntity
+xmlHasFeature
+xmlHasNsProp
+xmlHasProp
+xmlHashAddEntry
+xmlHashAddEntry2
+xmlHashAddEntry3
+xmlHashCopy
+xmlHashCreate
+xmlHashCreateDict
+xmlHashFree
+xmlHashLookup
+xmlHashLookup2
+xmlHashLookup3
+xmlHashQLookup
+xmlHashQLookup2
+xmlHashQLookup3
+xmlHashRemoveEntry
+xmlHashRemoveEntry2
+xmlHashRemoveEntry3
+xmlHashScan
+xmlHashScan3
+xmlHashScanFull
+xmlHashScanFull3
+xmlHashSize
+xmlHashUpdateEntry
+xmlHashUpdateEntry2
+xmlHashUpdateEntry3
+#ifdef LIBXML_FTP_ENABLED
+xmlIOFTPClose
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlIOFTPMatch
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlIOFTPOpen
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlIOFTPRead
+#endif
+#ifdef LIBXML_HTML_ENABLED
+xmlIOHTTPClose
+#endif
+#ifdef LIBXML_HTML_ENABLED
+xmlIOHTTPMatch
+#endif
+#ifdef LIBXML_HTML_ENABLED
+xmlIOHTTPOpen
+#endif
+#ifdef LIBXML_HTML_ENABLED
+xmlIOHTTPOpenW
+#endif
+#ifdef LIBXML_HTML_ENABLED
+xmlIOHTTPRead
+#endif
+xmlIOParseDTD
+xmlInitCharEncodingHandlers
+xmlInitGlobals
+xmlInitMemory
+xmlInitNodeInfoSeq
+xmlInitParser
+xmlInitParserCtxt
+xmlInitThreads
+#ifdef LIBXML_CATALOG_ENABLED
+xmlInitializeCatalog
+#endif
+xmlInitializeDict
+xmlInitializeGlobalState
+xmlInitializePredefinedEntities
+xmlIsBaseChar
+xmlIsBlank
+xmlIsBlankNode
+xmlIsChar
+xmlIsCombining
+xmlIsDigit
+xmlIsExtender
+xmlIsID
+xmlIsIdeographic
+xmlIsLetter
+xmlIsMainThread
+xmlIsMixedElement
+xmlIsPubidChar
+xmlIsRef
+#ifdef LIBXML_HTML_ENABLED
+xmlIsXHTML
+#endif
+xmlKeepBlanksDefault
+xmlLastElementChild
+xmlLineNumbersDefault
+xmlLinkGetData
+xmlListAppend
+xmlListClear
+xmlListCopy
+xmlListCreate
+xmlListDelete
+xmlListDup
+xmlListEmpty
+xmlListEnd
+xmlListFront
+xmlListInsert
+xmlListMerge
+xmlListPopBack
+xmlListPopFront
+xmlListPushBack
+xmlListPushFront
+xmlListRemoveAll
+xmlListRemoveFirst
+xmlListRemoveLast
+xmlListReverse
+xmlListReverseSearch
+xmlListReverseWalk
+xmlListSearch
+xmlListSize
+xmlListSort
+xmlListWalk
+#ifdef LIBXML_CATALOG_ENABLED
+xmlLoadACatalog
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlLoadCatalog
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+xmlLoadCatalogs
+#endif
+xmlLoadExternalEntity
+#ifdef LIBXML_CATALOG_ENABLED
+xmlLoadSGMLSuperCatalog
+#endif
+xmlLockLibrary
+#ifdef LIBXML_DEBUG_ENABLED
+xmlLsCountNode
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlLsOneNode
+#endif
+#ifdef DEBUG_MEMORY_LOCATION
+xmlMallocAtomicLoc
+#endif
+#ifdef DEBUG_MEMORY_LOCATION
+xmlMallocLoc
+#endif
+xmlMemBlocks
+xmlMemDisplay
+xmlMemDisplayLast
+xmlMemFree
+xmlMemGet
+xmlMemMalloc
+xmlMemRealloc
+xmlMemSetup
+xmlMemShow
+#ifdef DEBUG_MEMORY_LOCATION
+xmlMemStrdupLoc
+#endif
+xmlMemUsed
+xmlMemoryDump
+xmlMemoryStrdup
+xmlModuleClose
+xmlModuleFree
+xmlModuleOpen
+xmlModuleSymbol
+xmlMutexLock
+xmlMutexUnlock
+xmlNamespaceParseNCName
+xmlNamespaceParseNSDef
+xmlNamespaceParseQName
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPCheckResponse
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPCleanup
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPClose
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPCloseConnection
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPConnect
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPConnectTo
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPCwd
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPDele
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPFreeCtxt
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPGet
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPGetConnection
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPGetResponse
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPGetSocket
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPInit
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPList
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPNewCtxt
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPOpen
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPProxy
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPQuit
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPRead
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPScanProxy
+#endif
+#ifdef LIBXML_FTP_ENABLED
+xmlNanoFTPUpdateURL
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPAuthHeader
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPCleanup
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPClose
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPContentLength
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPEncoding
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPFetch
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPInit
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPMethod
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPMethodRedir
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPMimeType
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPOpen
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPOpenRedir
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPRead
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPRedir
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPReturnCode
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPSave
+#endif
+#ifdef LIBXML_HTTP_ENABLED
+xmlNanoHTTPScanProxy
+#endif
+#ifdef LIBXML_AUTOMATA_ENABLED
+xmlNewAutomata
+#endif
+xmlNewCDataBlock
+#ifdef LIBXML_CATALOG_ENABLED
+xmlNewCatalog
+#endif
+xmlNewCharEncodingHandler
+xmlNewCharRef
+xmlNewChild
+xmlNewComment
+xmlNewDoc
+xmlNewDocComment
+xmlNewDocElementContent
+xmlNewDocFragment
+xmlNewDocNode
+xmlNewDocNodeEatName
+xmlNewDocPI
+xmlNewDocProp
+xmlNewDocRawNode
+xmlNewDocText
+xmlNewDocTextLen
+xmlNewDtd
+xmlNewElementContent
+xmlNewEntity
+xmlNewEntityInputStream
+xmlNewGlobalNs
+xmlNewIOInputStream
+xmlNewInputFromFile
+xmlNewInputStream
+xmlNewMutex
+xmlNewNode
+xmlNewNodeEatName
+xmlNewNs
+xmlNewNsProp
+xmlNewNsPropEatName
+xmlNewPI
+xmlNewParserCtxt
+xmlNewProp
+xmlNewRMutex
+xmlNewReference
+xmlNewStringInputStream
+xmlNewText
+xmlNewTextChild
+xmlNewTextLen
+xmlNewTextReader
+xmlNewTextReaderFilename
+xmlNewTextWriter
+xmlNewTextWriterDoc
+xmlNewTextWriterFilename
+xmlNewTextWriterMemory
+xmlNewTextWriterPushParser
+xmlNewTextWriterTree
+xmlNewValidCtxt
+xmlNextChar
+xmlNextElementSibling
+xmlNoNetExternalEntityLoader
+xmlNodeAddContent
+xmlNodeAddContentLen
+xmlNodeBufGetContent
+xmlNodeDump
+xmlNodeDumpOutput
+xmlNodeGetBase
+xmlNodeGetContent
+xmlNodeGetLang
+xmlNodeGetSpacePreserve
+xmlNodeIsText
+xmlNodeListGetRawString
+xmlNodeListGetString
+xmlNodeSetBase
+xmlNodeSetContent
+xmlNodeSetContentLen
+xmlNodeSetLang
+xmlNodeSetName
+xmlNodeSetSpacePreserve
+xmlNormalizeURIPath
+xmlNormalizeWindowsPath
+xmlOutputBufferClose
+xmlOutputBufferCreateBuffer
+xmlOutputBufferCreateFd
+xmlOutputBufferCreateFile
+xmlOutputBufferCreateFilename
+xmlOutputBufferCreateFilenameDefault
+xmlOutputBufferCreateIO
+xmlOutputBufferFlush
+xmlOutputBufferGetContent
+xmlOutputBufferGetSize
+xmlOutputBufferWrite
+xmlOutputBufferWriteEscape
+xmlOutputBufferWriteString
+xmlParseAttValue
+xmlParseAttribute
+xmlParseAttributeListDecl
+xmlParseAttributeType
+xmlParseBalancedChunkMemory
+xmlParseBalancedChunkMemoryRecover
+xmlParseCDSect
+#ifdef LIBXML_CATALOG_ENABLED
+xmlParseCatalogFile
+#endif
+xmlParseCharData
+xmlParseCharEncoding
+xmlParseCharRef
+xmlParseChunk
+xmlParseComment
+xmlParseContent
+xmlParseCtxtExternalEntity
+xmlParseDTD
+xmlParseDefaultDecl
+xmlParseDoc
+xmlParseDocTypeDecl
+xmlParseDocument
+xmlParseElement
+xmlParseElementChildrenContentDecl
+xmlParseElementContentDecl
+xmlParseElementDecl
+xmlParseElementMixedContentDecl
+xmlParseEncName
+xmlParseEncodingDecl
+xmlParseEndTag
+xmlParseEntity
+xmlParseEntityDecl
+xmlParseEntityRef
+xmlParseEntityValue
+xmlParseEnumeratedType
+xmlParseEnumerationType
+xmlParseExtParsedEnt
+xmlParseExternalEntity
+xmlParseExternalID
+xmlParseExternalSubset
+xmlParseFile
+xmlParseInNodeContext
+xmlParseMarkupDecl
+xmlParseMemory
+xmlParseMisc
+xmlParseName
+xmlParseNamespace
+xmlParseNmtoken
+xmlParseNotationDecl
+xmlParseNotationType
+xmlParsePEReference
+xmlParsePI
+xmlParsePITarget
+xmlParsePubidLiteral
+xmlParseQuotedString
+xmlParseReference
+xmlParseSDDecl
+xmlParseStartTag
+xmlParseSystemLiteral
+xmlParseTextDecl
+xmlParseURI
+xmlParseURIRaw
+xmlParseURIReference
+xmlParseVersionInfo
+xmlParseVersionNum
+xmlParseXMLDecl
+xmlParserAddNodeInfo
+xmlParserError
+xmlParserFindNodeInfo
+xmlParserFindNodeInfoIndex
+xmlParserGetDirectory
+xmlParserHandlePEReference
+xmlParserHandleReference
+xmlParserInputBufferCreateFd
+xmlParserInputBufferCreateFile
+xmlParserInputBufferCreateFilename
+xmlParserInputBufferCreateFilenameDefault
+xmlParserInputBufferCreateIO
+xmlParserInputBufferCreateMem
+xmlParserInputBufferCreateStatic
+xmlParserInputBufferGrow
+xmlParserInputBufferPush
+xmlParserInputBufferRead
+xmlParserInputGrow
+xmlParserInputRead
+xmlParserInputShrink
+xmlParserPrintFileContext
+xmlParserPrintFileInfo
+xmlParserValidityError
+xmlParserValidityWarning
+xmlParserWarning
+xmlPathToURI
+xmlPatternFromRoot
+xmlPatternGetStreamCtxt
+xmlPatternMatch
+xmlPatternMaxDepth
+xmlPatternMinDepth
+xmlPatternStreamable
+xmlPatterncompile
+xmlPedanticParserDefault
+xmlPopInput
+xmlPopInputCallbacks
+xmlPreviousElementSibling
+xmlPrintURI
+xmlPushInput
+xmlRMutexLock
+xmlRMutexUnlock
+xmlReadDoc
+xmlReadFd
+xmlReadFile
+xmlReadIO
+xmlReadMemory
+xmlReaderForDoc
+xmlReaderForFd
+xmlReaderForFile
+xmlReaderForIO
+xmlReaderForMemory
+xmlReaderNewDoc
+xmlReaderNewFd
+xmlReaderNewFile
+xmlReaderNewIO
+xmlReaderNewMemory
+xmlReaderNewWalker
+xmlReaderWalker
+#ifdef DEBUG_MEMORY_LOCATION
+xmlReallocLoc
+#endif
+xmlReconciliateNs
+xmlRecoverDoc
+xmlRecoverFile
+xmlRecoverMemory
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegExecErrInfo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegExecNextValues
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegExecPushString
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegExecPushString2
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegFreeExecCtxt
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegFreeRegexp
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegNewExecCtxt
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegexpCompile
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegexpExec
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegexpIsDeterminist
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlRegexpPrint
+#endif
+xmlRegisterCharEncodingHandler
+xmlRegisterDefaultInputCallbacks
+xmlRegisterDefaultOutputCallbacks
+#ifdef LIBXML_HTML_ENABLED
+xmlRegisterHTTPPostCallbacks
+#endif
+xmlRegisterInputCallbacks
+xmlRegisterNodeDefault
+xmlRegisterOutputCallbacks
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGCleanupTypes
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGDump
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGDumpTree
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGFree
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGFreeParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGFreeValidCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGGetParserErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGGetValidErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGInitTypes
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGNewDocParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGNewMemParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGNewParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGNewValidCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGParse
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGSetParserErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGSetParserStructuredErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGSetValidErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGSetValidStructuredErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGValidateDoc
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGValidateFullElement
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGValidatePopElement
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGValidatePushCData
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxNGValidatePushElement
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlRelaxParserSetFlag
+#endif
+xmlRemoveID
+xmlRemoveProp
+xmlRemoveRef
+xmlReplaceNode
+xmlResetError
+xmlResetLastError
+xmlSAX2AttributeDecl
+xmlSAX2CDataBlock
+xmlSAX2Characters
+xmlSAX2Comment
+xmlSAX2ElementDecl
+xmlSAX2EndDocument
+xmlSAX2EndElement
+xmlSAX2EndElementNs
+xmlSAX2EntityDecl
+xmlSAX2ExternalSubset
+xmlSAX2GetColumnNumber
+xmlSAX2GetEntity
+xmlSAX2GetLineNumber
+xmlSAX2GetParameterEntity
+xmlSAX2GetPublicId
+xmlSAX2GetSystemId
+xmlSAX2HasExternalSubset
+xmlSAX2HasInternalSubset
+xmlSAX2IgnorableWhitespace
+xmlSAX2InitDefaultSAXHandler
+xmlSAX2InitDocbDefaultSAXHandler
+xmlSAX2InitHtmlDefaultSAXHandler
+xmlSAX2InternalSubset
+xmlSAX2IsStandalone
+xmlSAX2NotationDecl
+xmlSAX2ProcessingInstruction
+xmlSAX2Reference
+xmlSAX2ResolveEntity
+xmlSAX2SetDocumentLocator
+xmlSAX2StartDocument
+xmlSAX2StartElement
+xmlSAX2StartElementNs
+xmlSAX2UnparsedEntityDecl
+xmlSAXDefaultVersion
+xmlSAXParseDTD
+xmlSAXParseDoc
+xmlSAXParseEntity
+xmlSAXParseFile
+xmlSAXParseFileWithData
+xmlSAXParseMemory
+xmlSAXParseMemoryWithData
+xmlSAXUserParseFile
+xmlSAXUserParseMemory
+xmlSAXVersion
+xmlSaveClose
+xmlSaveDoc
+xmlSaveFile
+xmlSaveFileEnc
+xmlSaveFileTo
+xmlSaveFlush
+xmlSaveFormatFile
+xmlSaveFormatFileEnc
+xmlSaveFormatFileTo
+xmlSaveSetAttrEscape
+xmlSaveSetEscape
+xmlSaveToBuffer
+xmlSaveToFd
+xmlSaveToFilename
+xmlSaveToIO
+xmlSaveTree
+xmlSaveUri
+xmlScanName
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCheckFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCleanupTypes
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCollapseString
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCompareValues
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCompareValuesWhtsp
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaCopyValue
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaDump
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaFree
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaFreeFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaFreeParserCtxt
+#endif
+xmlSchemaFreeType
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaFreeValidCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaFreeValue
+#endif
+xmlSchemaFreeWildcard
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetBuiltInListSimpleTypeItemType
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetBuiltInType
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetCanonValue
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetCanonValueWhtsp
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetFacetValueAsULong
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetParserErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetPredefinedType
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetValType
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaGetValidErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaInitTypes
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaIsBuiltInTypeFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaIsValid
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewDocParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewMemParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewNOTATIONValue
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewQNameValue
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewStringValue
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaNewValidCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaParse
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSAXPlug
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSAXUnplug
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetParserErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetParserStructuredErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetValidErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetValidOptions
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaSetValidStructuredErrors
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValPredefTypeNode
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValPredefTypeNodeNoNorm
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidCtxtGetOptions
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidCtxtGetParserCtxt
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateDoc
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateFacetWhtsp
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateFile
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateLengthFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateLengthFacetWhtsp
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateListSimpleTypeFacet
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateOneElement
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidatePredefinedType
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateSetFilename
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateSetLocator
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValidateStream
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValueAppend
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValueGetAsBoolean
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValueGetAsString
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaValueGetNext
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlSchemaWhiteSpaceReplace
+#endif
+xmlSchematronFree
+xmlSchematronFreeParserCtxt
+xmlSchematronFreeValidCtxt
+xmlSchematronNewDocParserCtxt
+xmlSchematronNewMemParserCtxt
+xmlSchematronNewParserCtxt
+xmlSchematronNewValidCtxt
+xmlSchematronParse
+xmlSchematronSetValidStructuredErrors
+xmlSchematronValidateDoc
+xmlSearchNs
+xmlSearchNsByHref
+xmlSetBufferAllocationScheme
+xmlSetCompressMode
+xmlSetDocCompressMode
+xmlSetEntityReferenceFunc
+xmlSetExternalEntityLoader
+xmlSetFeature
+xmlSetGenericErrorFunc
+xmlSetListDoc
+xmlSetNs
+xmlSetNsProp
+xmlSetProp
+xmlSetStructuredErrorFunc
+xmlSetTreeDoc
+xmlSetupParserForBuffer
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShell
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellBase
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellCat
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellDir
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellDu
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellList
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellLoad
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellPrintNode
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellPrintXPathError
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellPrintXPathResult
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellPwd
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellSave
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellValidate
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+xmlShellWrite
+#endif
+xmlSkipBlankChars
+xmlSnprintfElementContent
+xmlSplitQName
+xmlSplitQName2
+xmlSplitQName3
+xmlSprintfElementContent
+xmlStopParser
+xmlStrEqual
+xmlStrPrintf
+xmlStrQEqual
+xmlStrVPrintf
+xmlStrcasecmp
+xmlStrcasestr
+xmlStrcat
+xmlStrchr
+xmlStrcmp
+xmlStrdup
+xmlStreamPop
+xmlStreamPush
+xmlStreamPushAttr
+xmlStreamPushNode
+xmlStreamWantsAnyNode
+xmlStringCurrentChar
+xmlStringDecodeEntities
+xmlStringGetNodeList
+xmlStringLenDecodeEntities
+xmlStringLenGetNodeList
+xmlStrlen
+xmlStrncasecmp
+xmlStrncat
+xmlStrncatNew
+xmlStrncmp
+xmlStrndup
+xmlStrstr
+xmlStrsub
+xmlSubstituteEntitiesDefault
+xmlSwitchEncoding
+xmlSwitchInputEncoding
+xmlSwitchToEncoding
+xmlTextConcat
+xmlTextMerge
+xmlTextReaderAttributeCount
+xmlTextReaderBaseUri
+xmlTextReaderByteConsumed
+xmlTextReaderClose
+xmlTextReaderConstBaseUri
+xmlTextReaderConstEncoding
+xmlTextReaderConstLocalName
+xmlTextReaderConstName
+xmlTextReaderConstNamespaceUri
+xmlTextReaderConstPrefix
+xmlTextReaderConstString
+xmlTextReaderConstValue
+xmlTextReaderConstXmlLang
+xmlTextReaderConstXmlVersion
+xmlTextReaderCurrentDoc
+xmlTextReaderCurrentNode
+xmlTextReaderDepth
+xmlTextReaderExpand
+xmlTextReaderGetAttribute
+xmlTextReaderGetAttributeNo
+xmlTextReaderGetAttributeNs
+xmlTextReaderGetErrorHandler
+xmlTextReaderGetParserColumnNumber
+xmlTextReaderGetParserLineNumber
+xmlTextReaderGetParserProp
+xmlTextReaderGetRemainder
+xmlTextReaderHasAttributes
+xmlTextReaderHasValue
+xmlTextReaderIsDefault
+xmlTextReaderIsEmptyElement
+xmlTextReaderIsNamespaceDecl
+xmlTextReaderIsValid
+xmlTextReaderLocalName
+xmlTextReaderLocatorBaseURI
+xmlTextReaderLocatorLineNumber
+xmlTextReaderLookupNamespace
+xmlTextReaderMoveToAttribute
+xmlTextReaderMoveToAttributeNo
+xmlTextReaderMoveToAttributeNs
+xmlTextReaderMoveToElement
+xmlTextReaderMoveToFirstAttribute
+xmlTextReaderMoveToNextAttribute
+xmlTextReaderName
+xmlTextReaderNamespaceUri
+xmlTextReaderNext
+xmlTextReaderNextSibling
+xmlTextReaderNodeType
+xmlTextReaderNormalization
+xmlTextReaderPrefix
+xmlTextReaderPreserve
+xmlTextReaderPreservePattern
+xmlTextReaderQuoteChar
+xmlTextReaderRead
+xmlTextReaderReadAttributeValue
+xmlTextReaderReadInnerXml
+xmlTextReaderReadOuterXml
+xmlTextReaderReadState
+xmlTextReaderReadString
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlTextReaderRelaxNGSetSchema
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+xmlTextReaderRelaxNGValidate
+#endif
+xmlTextReaderRelaxNGValidateCtxt
+xmlTextReaderSchemaValidate
+xmlTextReaderSchemaValidateCtxt
+xmlTextReaderSetErrorHandler
+xmlTextReaderSetParserProp
+xmlTextReaderSetSchema
+xmlTextReaderSetStructuredErrorHandler
+xmlTextReaderSetup
+xmlTextReaderStandalone
+xmlTextReaderValue
+xmlTextReaderXmlLang
+xmlTextWriterEndAttribute
+xmlTextWriterEndCDATA
+xmlTextWriterEndComment
+xmlTextWriterEndDTD
+xmlTextWriterEndDTDAttlist
+xmlTextWriterEndDTDElement
+xmlTextWriterEndDTDEntity
+xmlTextWriterEndDocument
+xmlTextWriterEndElement
+xmlTextWriterEndPI
+xmlTextWriterFlush
+xmlTextWriterFullEndElement
+xmlTextWriterSetIndent
+xmlTextWriterSetIndentString
+xmlTextWriterSetQuoteChar
+xmlTextWriterStartAttribute
+xmlTextWriterStartAttributeNS
+xmlTextWriterStartCDATA
+xmlTextWriterStartComment
+xmlTextWriterStartDTD
+xmlTextWriterStartDTDAttlist
+xmlTextWriterStartDTDElement
+xmlTextWriterStartDTDEntity
+xmlTextWriterStartDocument
+xmlTextWriterStartElement
+xmlTextWriterStartElementNS
+xmlTextWriterStartPI
+xmlTextWriterWriteAttribute
+xmlTextWriterWriteAttributeNS
+xmlTextWriterWriteBase64
+xmlTextWriterWriteBinHex
+xmlTextWriterWriteCDATA
+xmlTextWriterWriteComment
+xmlTextWriterWriteDTD
+xmlTextWriterWriteDTDAttlist
+xmlTextWriterWriteDTDElement
+xmlTextWriterWriteDTDEntity
+xmlTextWriterWriteDTDExternalEntity
+xmlTextWriterWriteDTDExternalEntityContents
+xmlTextWriterWriteDTDInternalEntity
+xmlTextWriterWriteDTDNotation
+xmlTextWriterWriteElement
+xmlTextWriterWriteElementNS
+xmlTextWriterWriteFormatAttribute
+xmlTextWriterWriteFormatAttributeNS
+xmlTextWriterWriteFormatCDATA
+xmlTextWriterWriteFormatComment
+xmlTextWriterWriteFormatDTD
+xmlTextWriterWriteFormatDTDAttlist
+xmlTextWriterWriteFormatDTDElement
+xmlTextWriterWriteFormatDTDInternalEntity
+xmlTextWriterWriteFormatElement
+xmlTextWriterWriteFormatElementNS
+xmlTextWriterWriteFormatPI
+xmlTextWriterWriteFormatRaw
+xmlTextWriterWriteFormatString
+xmlTextWriterWritePI
+xmlTextWriterWriteRaw
+xmlTextWriterWriteRawLen
+xmlTextWriterWriteString
+xmlTextWriterWriteVFormatAttribute
+xmlTextWriterWriteVFormatAttributeNS
+xmlTextWriterWriteVFormatCDATA
+xmlTextWriterWriteVFormatComment
+xmlTextWriterWriteVFormatDTD
+xmlTextWriterWriteVFormatDTDAttlist
+xmlTextWriterWriteVFormatDTDElement
+xmlTextWriterWriteVFormatDTDInternalEntity
+xmlTextWriterWriteVFormatElement
+xmlTextWriterWriteVFormatElementNS
+xmlTextWriterWriteVFormatPI
+xmlTextWriterWriteVFormatRaw
+xmlTextWriterWriteVFormatString
+xmlThrDefBufferAllocScheme
+xmlThrDefDefaultBufferSize
+xmlThrDefDeregisterNodeDefault
+xmlThrDefDoValidityCheckingDefaultValue
+xmlThrDefGetWarningsDefaultValue
+xmlThrDefIndentTreeOutput
+xmlThrDefKeepBlanksDefaultValue
+xmlThrDefLineNumbersDefaultValue
+xmlThrDefLoadExtDtdDefaultValue
+xmlThrDefOutputBufferCreateFilenameDefault
+xmlThrDefParserDebugEntities
+xmlThrDefParserInputBufferCreateFilenameDefault
+xmlThrDefPedanticParserDefaultValue
+xmlThrDefRegisterNodeDefault
+xmlThrDefSaveNoEmptyTags
+xmlThrDefSetGenericErrorFunc
+xmlThrDefSetStructuredErrorFunc
+xmlThrDefSubstituteEntitiesDefaultValue
+xmlThrDefTreeIndentString
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsAegeanNumbers
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsAlphabeticPresentationForms
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsArabic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsArabicPresentationFormsA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsArabicPresentationFormsB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsArmenian
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsArrows
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBasicLatin
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBengali
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBlock
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBlockElements
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBopomofo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBopomofoExtended
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBoxDrawing
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBraillePatterns
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsBuhid
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsByzantineMusicalSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKCompatibility
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKCompatibilityForms
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKCompatibilityIdeographs
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKCompatibilityIdeographsSupplement
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKRadicalsSupplement
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKSymbolsandPunctuation
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKUnifiedIdeographs
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKUnifiedIdeographsExtensionA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCJKUnifiedIdeographsExtensionB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCat
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatC
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatCc
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatCf
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatCo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatCs
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatL
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatLl
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatLm
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatLo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatLt
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatLu
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatM
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatMc
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatMe
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatMn
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatN
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatNd
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatNl
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatNo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatP
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPc
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPd
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPe
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPf
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPi
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatPs
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatS
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatSc
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatSk
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatSm
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatSo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatZ
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatZl
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatZp
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCatZs
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCherokee
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCombiningDiacriticalMarks
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCombiningDiacriticalMarksforSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCombiningHalfMarks
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCombiningMarksforSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsControlPictures
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCurrencySymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCypriotSyllabary
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCyrillic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsCyrillicSupplement
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsDeseret
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsDevanagari
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsDingbats
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsEnclosedAlphanumerics
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsEnclosedCJKLettersandMonths
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsEthiopic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGeneralPunctuation
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGeometricShapes
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGeorgian
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGothic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGreek
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGreekExtended
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGreekandCoptic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGujarati
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsGurmukhi
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHalfwidthandFullwidthForms
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHangulCompatibilityJamo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHangulJamo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHangulSyllables
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHanunoo
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHebrew
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHighPrivateUseSurrogates
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHighSurrogates
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsHiragana
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsIPAExtensions
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsIdeographicDescriptionCharacters
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKanbun
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKangxiRadicals
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKannada
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKatakana
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKatakanaPhoneticExtensions
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKhmer
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsKhmerSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLao
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLatin1Supplement
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLatinExtendedA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLatinExtendedAdditional
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLatinExtendedB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLetterlikeSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLimbu
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLinearBIdeograms
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLinearBSyllabary
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsLowSurrogates
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMalayalam
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMathematicalAlphanumericSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMathematicalOperators
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMiscellaneousMathematicalSymbolsA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMiscellaneousMathematicalSymbolsB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMiscellaneousSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMiscellaneousSymbolsandArrows
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMiscellaneousTechnical
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMongolian
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMusicalSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsMyanmar
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsNumberForms
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsOgham
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsOldItalic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsOpticalCharacterRecognition
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsOriya
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsOsmanya
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsPhoneticExtensions
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsPrivateUse
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsPrivateUseArea
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsRunic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsShavian
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSinhala
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSmallFormVariants
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSpacingModifierLetters
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSpecials
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSuperscriptsandSubscripts
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSupplementalArrowsA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSupplementalArrowsB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSupplementalMathematicalOperators
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSupplementaryPrivateUseAreaA
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSupplementaryPrivateUseAreaB
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsSyriac
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTagalog
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTagbanwa
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTags
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTaiLe
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTaiXuanJingSymbols
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTamil
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTelugu
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsThaana
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsThai
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsTibetan
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsUgaritic
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsUnifiedCanadianAboriginalSyllabics
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsVariationSelectors
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsVariationSelectorsSupplement
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsYiRadicals
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsYiSyllables
+#endif
+#ifdef LIBXML_REGEXP_ENABLED
+xmlUCSIsYijingHexagramSymbols
+#endif
+xmlURIEscape
+xmlURIEscapeStr
+xmlURIUnescapeString
+xmlUTF8Charcmp
+xmlUTF8Size
+xmlUTF8Strlen
+xmlUTF8Strloc
+xmlUTF8Strndup
+xmlUTF8Strpos
+xmlUTF8Strsize
+xmlUTF8Strsub
+xmlUnlinkNode
+xmlUnlockLibrary
+xmlUnsetNsProp
+xmlUnsetProp
+#ifdef LIBXML_REGEXP_ENABLED
+xmlValidBuildContentModel
+#endif
+xmlValidCtxtNormalizeAttributeValue
+xmlValidGetPotentialChildren
+xmlValidGetValidElements
+xmlValidNormalizeAttributeValue
+xmlValidateAttributeDecl
+xmlValidateAttributeValue
+xmlValidateDocument
+xmlValidateDocumentFinal
+xmlValidateDtd
+xmlValidateDtdFinal
+xmlValidateElement
+xmlValidateElementDecl
+xmlValidateNCName
+xmlValidateNMToken
+xmlValidateName
+xmlValidateNameValue
+xmlValidateNamesValue
+xmlValidateNmtokenValue
+xmlValidateNmtokensValue
+xmlValidateNotationDecl
+xmlValidateNotationUse
+xmlValidateOneAttribute
+xmlValidateOneElement
+xmlValidateOneNamespace
+xmlValidatePopElement
+xmlValidatePushCData
+xmlValidatePushElement
+xmlValidateQName
+xmlValidateRoot
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeFreeContext
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeNewContext
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcess
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessFlags
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessFlagsData
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessNode
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessTree
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessTreeFlags
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeProcessTreeFlagsData
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+xmlXIncludeSetFlags
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathAddValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathBooleanFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastBooleanToNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastBooleanToString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNodeSetToBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNodeSetToNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNodeSetToString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNodeToNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNodeToString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNumberToBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastNumberToString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastStringToBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastStringToNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastToBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastToNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCastToString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCeilingFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCmpNodes
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCompareValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCompile
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCompiledEval
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCompiledEvalToBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathConcatFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathContainsFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathContextSetCache
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathConvertBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathConvertNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathConvertString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCountFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathCtxtCompile
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+xmlXPathDebugDumpCompExpr
+#endif
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+#ifdef LIBXML_DEBUG_ENABLED
+xmlXPathDebugDumpObject
+#endif
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathDifference
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathDistinct
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathDistinctSorted
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathDivValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEqualValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathErr
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEval
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEvalExpr
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEvalExpression
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEvalPredicate
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathEvaluatePredicateResult
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFalseFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFloorFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeCompExpr
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeContext
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeNodeSet
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeNodeSetList
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeObject
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFreeParserContext
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFunctionLookup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathFunctionLookupNS
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathHasSameNodes
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathIdFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathInit
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathIntersection
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathIsInf
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathIsNaN
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathIsNodeType
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathLangFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathLastFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathLeading
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathLeadingSorted
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathLocalNameFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathModValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathMultValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNamespaceURIFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewCString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewContext
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewFloat
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewNodeSet
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewNodeSetList
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewParserContext
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNewValueTree
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextAncestor
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextAncestorOrSelf
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextAttribute
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextChild
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextDescendant
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextDescendantOrSelf
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextFollowing
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextFollowingSibling
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextNamespace
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextParent
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextPreceding
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextPrecedingSibling
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNextSelf
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeEval
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeLeading
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeLeadingSorted
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetAdd
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetAddNs
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetAddUnique
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetContains
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetCreate
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetDel
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetFreeNs
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetMerge
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetRemove
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeSetSort
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeTrailing
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNodeTrailingSorted
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNormalizeFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNotEqualValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNotFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNsLookup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathNumberFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathObjectCopy
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathOrderDocElems
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathParseNCName
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathParseName
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPopBoolean
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPopExternal
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPopNodeSet
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPopNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPopString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathPositionFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterAllFunctions
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterFunc
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterFuncLookup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterFuncNS
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterNs
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterVariable
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterVariableLookup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisterVariableNS
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisteredFuncsCleanup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisteredNsCleanup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRegisteredVariablesCleanup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRoot
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathRoundFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSetContextNode
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathStartsWithFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathStringEvalNumber
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathStringFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathStringLengthFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSubValues
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSubstringAfterFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSubstringBeforeFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSubstringFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathSumFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathTrailing
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathTrailingSorted
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathTranslateFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathTrueFunction
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathValueFlipSign
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathVariableLookup
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathVariableLookupNS
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathWrapCString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathWrapExternal
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathWrapNodeSet
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPathWrapString
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+xmlXPatherror
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrBuildNodeList
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrEval
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrEvalRangePredicate
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrFreeLocationSet
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrLocationSetAdd
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrLocationSetCreate
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrLocationSetDel
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrLocationSetMerge
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrLocationSetRemove
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewCollapsedRange
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewContext
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewLocationSetNodeSet
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewLocationSetNodes
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRange
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRangeNodeObject
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRangeNodePoint
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRangeNodes
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRangePointNode
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrNewRangePoints
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrRangeToFunction
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+xmlXPtrWrapLocationSet
+#endif
diff --git a/win32/wince/libxml2.vcb b/win32/wince/libxml2.vcb
new file mode 100644
index 0000000..954d053
--- /dev/null
+++ b/win32/wince/libxml2.vcb
@@ -0,0 +1 @@
+Microsoft C/C++ program database 2.00
diff --git a/win32/wince/libxml2.vcl b/win32/wince/libxml2.vcl
new file mode 100644
index 0000000..627ecb6
--- /dev/null
+++ b/win32/wince/libxml2.vcl
@@ -0,0 +1,122 @@
+<html>
+<body>
+<pre>
+<h1>Build Log</h1>
+<h3>
+--------------------Configuration: libxml2 - Win32 (WCE x86em) Debug--------------------
+</h3>
+<h3>Command Lines</h3>
+Creating temporary file "C:\DOCUME~1\fjvg\CONFIG~1\Temp\RSP12E.tmp" with contents
+[
+/nologo /W3 /Zi /Od /I "..\..\..\include" /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D "DEBUG" /D _WIN32_WCE=300 /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "WIN32_PLATFORM_PSPC" /D "i486" /D UNDER_CE=300 /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Fp"X86EMDbg/libxml2.pch" /YX /Fo"X86EMDbg/" /Fd"X86EMDbg/" /Gz /c
+"C:\ppc\libxml\XML\DOCBparser.c"
+"C:\ppc\libxml\XML\encoding.c"
+"C:\ppc\libxml\XML\entities.c"
+"C:\ppc\libxml\XML\error.c"
+"C:\ppc\libxml\XML\globals.c"
+"C:\ppc\libxml\XML\hash.c"
+"C:\ppc\libxml\XML\list.c"
+"C:\ppc\libxml\XML\parser.c"
+"C:\ppc\libxml\XML\parserInternals.c"
+"C:\ppc\libxml\XML\SAX.c"
+"C:\ppc\libxml\XML\threads.c"
+"C:\ppc\libxml\XML\tree.c"
+"C:\ppc\libxml\XML\uri.c"
+"C:\ppc\libxml\XML\valid.c"
+"C:\ppc\libxml\XML\win32\wince\wincecompat.c"
+"C:\ppc\libxml\XML\xlink.c"
+"C:\ppc\libxml\XML\xmlIO.c"
+"C:\ppc\libxml\XML\xmlmemory.c"
+"C:\ppc\libxml\XML\c14n.c"
+"C:\ppc\libxml\XML\catalog.c"
+"C:\ppc\libxml\XML\debugXML.c"
+"C:\ppc\libxml\XML\HTMLparser.c"
+"C:\ppc\libxml\XML\HTMLtree.c"
+"C:\ppc\libxml\XML\nanoftp.c"
+"C:\ppc\libxml\XML\nanohttp.c"
+"C:\ppc\libxml\XML\xinclude.c"
+"C:\ppc\libxml\XML\xpath.c"
+"C:\ppc\libxml\XML\xpointer.c"
+]
+Creating command line "cl.exe @C:\DOCUME~1\fjvg\CONFIG~1\Temp\RSP12E.tmp"
+Creating temporary file "C:\DOCUME~1\fjvg\CONFIG~1\Temp\RSP12F.tmp" with contents
+[
+corelibc.lib winsock.lib commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /incremental:yes /pdb:"X86EMDbg/libxml2.pdb" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /nodefaultlib:oldnames.lib /def:".\libxml2.def" /out:"X86EMDbg/libxml2.dll" /implib:"X86EMDbg/libxml2.lib" /windowsce:emulation /MACHINE:IX86
+.\X86EMDbg\DOCBparser.obj
+.\X86EMDbg\encoding.obj
+.\X86EMDbg\entities.obj
+.\X86EMDbg\error.obj
+.\X86EMDbg\globals.obj
+.\X86EMDbg\hash.obj
+.\X86EMDbg\list.obj
+.\X86EMDbg\parser.obj
+.\X86EMDbg\parserInternals.obj
+.\X86EMDbg\SAX.obj
+.\X86EMDbg\threads.obj
+.\X86EMDbg\tree.obj
+.\X86EMDbg\uri.obj
+.\X86EMDbg\valid.obj
+.\X86EMDbg\wincecompat.obj
+.\X86EMDbg\xlink.obj
+.\X86EMDbg\xmlIO.obj
+.\X86EMDbg\xmlmemory.obj
+.\X86EMDbg\c14n.obj
+.\X86EMDbg\catalog.obj
+.\X86EMDbg\debugXML.obj
+.\X86EMDbg\HTMLparser.obj
+.\X86EMDbg\HTMLtree.obj
+.\X86EMDbg\nanoftp.obj
+.\X86EMDbg\nanohttp.obj
+.\X86EMDbg\xinclude.obj
+.\X86EMDbg\xpath.obj
+.\X86EMDbg\xpointer.obj
+]
+Creating command line "link.exe @C:\DOCUME~1\fjvg\CONFIG~1\Temp\RSP12F.tmp"
+<h3>Output Window</h3>
+Compiling...
+DOCBparser.c
+encoding.c
+entities.c
+error.c
+globals.c
+hash.c
+list.c
+parser.c
+C:\ppc\libxml\XML\parser.c(2282) : warning C4090: '=' : different 'const' qualifiers
+parserInternals.c
+SAX.c
+threads.c
+tree.c
+uri.c
+valid.c
+wincecompat.c
+C:\ppc\libxml\XML\win32\wince\wincecompat.c(37) : warning C4047: '=' : 'char ' differs in levels of indirection from 'char [2]'
+C:\ppc\libxml\XML\win32\wince\wincecompat.c(39) : warning C4047: '=' : 'char ' differs in levels of indirection from 'char [2]'
+C:\ppc\libxml\XML\win32\wince\wincecompat.c(40) : warning C4047: 'return' : 'int ' differs in levels of indirection from 'void *'
+xlink.c
+xmlIO.c
+C:\ppc\libxml\XML\xmlIO.c(2404) : warning C4101: 'dir' : unreferenced local variable
+C:\ppc\libxml\XML\xmlIO.c(2405) : warning C4101: 'cur' : unreferenced local variable
+xmlmemory.c
+c14n.c
+catalog.c
+debugXML.c
+HTMLparser.c
+HTMLtree.c
+nanoftp.c
+nanohttp.c
+C:\ppc\libxml\XML\nanoftp.c(892) : warning C4761: integral size mismatch in argument; conversion supplied
+xinclude.c
+C:\ppc\libxml\XML\nanohttp.c(921) : warning C4761: integral size mismatch in argument; conversion supplied
+xpath.c
+xpointer.c
+Linking...
+ Creating library X86EMDbg/libxml2.lib and object X86EMDbg/libxml2.exp
+
+
+
+<h3>Results</h3>
+libxml2.dll - 0 error(s), 8 warning(s)
+</pre>
+</body>
+</html>
diff --git a/win32/wince/libxml2.vco b/win32/wince/libxml2.vco
new file mode 100644
index 0000000..3599f1b
--- /dev/null
+++ b/win32/wince/libxml2.vco
@@ -0,0 +1 @@
+ÐÏࡱ \ No newline at end of file
diff --git a/win32/wince/libxml2.vcp b/win32/wince/libxml2.vcp
new file mode 100644
index 0000000..101fbcd
--- /dev/null
+++ b/win32/wince/libxml2.vcp
@@ -0,0 +1,5273 @@
+# Microsoft eMbedded Visual Tools Project File - Name="libxml2" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE SH3) Dynamic-Link Library" 0x8102
+# TARGTYPE "Win32 (WCE x86em) Dynamic-Link Library" 0x7f02
+# TARGTYPE "Win32 (WCE x86) Dynamic-Link Library" 0x8302
+# TARGTYPE "Win32 (WCE ARM) Dynamic-Link Library" 0x8502
+# TARGTYPE "Win32 (WCE MIPS) Dynamic-Link Library" 0x8202
+
+CFG=libxml2 - Win32 (WCE ARM) Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libxml2.vcn".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libxml2.vcn" CFG="libxml2 - Win32 (WCE ARM) Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libxml2 - Win32 (WCE ARM) Release" (based on "Win32 (WCE ARM) Dynamic-Link Library")
+!MESSAGE "libxml2 - Win32 (WCE ARM) Debug" (based on "Win32 (WCE ARM) Dynamic-Link Library")
+!MESSAGE "libxml2 - Win32 (WCE x86em) Debug" (based on "Win32 (WCE x86em) Dynamic-Link Library")
+!MESSAGE "libxml2 - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Dynamic-Link Library")
+!MESSAGE "libxml2 - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Dynamic-Link Library")
+!MESSAGE "libxml2 - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ARMRel"
+# PROP BASE Intermediate_Dir "ARMRel"
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ARMRel"
+# PROP Intermediate_Dir "ARMRel"
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "CEDLL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "CEDLL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 winsock.lib commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "ARMDbg"
+# PROP BASE Intermediate_Dir "ARMDbg"
+# PROP BASE CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "ARMDbg"
+# PROP Intermediate_Dir "ARMDbg"
+# PROP CPU_ID "{D6518FFC-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "DEBUG" /D "_USRDLL" /D "CEDLL_EXPORTS" /YX /Oxs /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "DEBUG" /D "_USRDLL" /D "CEDLL_EXPORTS" /Oxs /M$(CECrtMT) /c
+# SUBTRACT CPP /YX
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 winsock.lib commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "X86EMDbg"
+# PROP BASE Intermediate_Dir "X86EMDbg"
+# PROP BASE CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "X86EMDbg"
+# PROP Intermediate_Dir "X86EMDbg"
+# PROP CPU_ID "{D6518FF4-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "i486" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gz /c
+# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\include" /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "WIN32" /D "STRICT" /D "_WIN32_WCE_EMULATION" /D "INTERNATIONAL" /D "USA" /D "INTLMSG_CODEPAGE" /D "$(CePlatform)" /D "i486" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gz /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) winsock.lib commctrl.lib coredll.lib /nologo /stack:0x10000,0x1000 /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /windowsce:emulation /MACHINE:IX86
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "MIPSRel"
+# PROP BASE Intermediate_Dir "MIPSRel"
+# PROP BASE CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "MIPSRel"
+# PROP Intermediate_Dir "MIPSRel"
+# PROP CPU_ID "{D6519010-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "SH3Rel"
+# PROP BASE Intermediate_Dir "SH3Rel"
+# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "SH3Rel"
+# PROP Intermediate_Dir "SH3Rel"
+# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+CPP=shcl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Oxs /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "X86Dbg"
+# PROP BASE Intermediate_Dir "X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "X86Dbg"
+# PROP Intermediate_Dir "X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "..\..\include" /I "c:\ppc\libxml\XML\win32\wince" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) winsock.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ENDIF
+
+# Begin Target
+
+# Name "libxml2 - Win32 (WCE ARM) Release"
+# Name "libxml2 - Win32 (WCE ARM) Debug"
+# Name "libxml2 - Win32 (WCE x86em) Debug"
+# Name "libxml2 - Win32 (WCE MIPS) Release"
+# Name "libxml2 - Win32 (WCE SH3) Release"
+# Name "libxml2 - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\c14n.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\c14n.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\c14n.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\c14n.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\c14n.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_C14N_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\c14n.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_C14N_=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\catalog.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_CATAL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_CATAL=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\debugXML.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_DEBUG=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DEBUG=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\DOCBparser.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\DOCBparser.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\DOCBparser.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\DOCBparser.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\DOCBparser.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_DOCBP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\DOCBparser.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_DOCBP=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\encoding.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_ENCOD=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENCOD=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\entities.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_ENTIT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ENTIT=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\error.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERROR=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_ERROR=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globals.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_GLOBA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_GLOBA=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\hash.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_HASH_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HASH_=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\HTMLparser.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_HTMLP=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLP=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\HTMLtree.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_HTMLT=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_HTMLT=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\libxml2.def
+# End Source File
+# Begin Source File
+
+SOURCE=.\libxml2.def.src
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+USERDEP__LIBXM="../../include/libxml/xmlversion.h;"
+# Begin Custom Build
+InputPath=.\libxml2.def.src
+
+"libxml2.def" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ cl /I"..\.." /I"..\..\include" /nologo /EP $(InputPath) > libxml2.def
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\list.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_LIST_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_LIST_=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\nanoftp.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_NANOF=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOF=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\nanohttp.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_NANOH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_NANOH=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\parser.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_PARSE=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSE=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\parserInternals.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_PARSER=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_PARSER=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\SAX.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_SAX_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\HTMLtree.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_SAX_C=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\threads.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_THREA=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_THREA=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\tree.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_TREE_=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_TREE_=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\uri.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_URI_C=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_URI_C=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\valid.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_VALID=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_VALID=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\wincecompat.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_WINCE=\
+ ".\wincecompat.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xinclude.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xinclude.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xinclude.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xinclude.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xinclude.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XINCL=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xinclude.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XINCL=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xlink.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XLINK=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XLINK=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xmlIO.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XMLIO=\
+ "..\..\config.h"\
+ "..\..\include\libxml\catalog.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\nanoftp.h"\
+ "..\..\include\libxml\nanohttp.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLIO=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xmlmemory.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XMLME=\
+ "..\..\config.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XMLME=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xpath.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XPATH=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ "..\..\triodef.h"\
+ "..\..\trionan.c"\
+ "..\..\trionan.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPATH=\
+ "..\..\config-mac.h"\
+ "..\..\doc\doc_nan.h"\
+
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\xpointer.c
+
+!IF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Release"
+
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\include\winCEconfig.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE ARM) Debug"
+
+# PROP Exclude_From_Build 1
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86em) Debug"
+
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE MIPS) Release"
+
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+ "..\..\win32config.h"\
+ "..\..\winCEconfig.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE SH3) Release"
+
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+
+
+!ELSEIF "$(CFG)" == "libxml2 - Win32 (WCE x86) Debug"
+
+DEP_CPP_XPOIN=\
+ "..\..\config.h"\
+ "..\..\include\libxml\debugXML.h"\
+ "..\..\include\libxml\encoding.h"\
+ "..\..\include\libxml\entities.h"\
+ "..\..\include\libxml\globals.h"\
+ "..\..\include\libxml\hash.h"\
+ "..\..\include\libxml\HTMLparser.h"\
+ "..\..\include\libxml\list.h"\
+ "..\..\include\libxml\parser.h"\
+ "..\..\include\libxml\parserInternals.h"\
+ "..\..\include\libxml\SAX.h"\
+ "..\..\include\libxml\threads.h"\
+ "..\..\include\libxml\tree.h"\
+ "..\..\include\libxml\uri.h"\
+ "..\..\include\libxml\valid.h"\
+ "..\..\include\libxml\xlink.h"\
+ "..\..\include\libxml\xmlerror.h"\
+ "..\..\include\libxml\xmlIO.h"\
+ "..\..\include\libxml\xmlmemory.h"\
+ "..\..\include\libxml\xmlversion.h"\
+ "..\..\include\libxml\xmlwin32version.h"\
+ "..\..\include\libxml\xpath.h"\
+ "..\..\include\libxml\xpathInternals.h"\
+ "..\..\include\libxml\xpointer.h"\
+ "..\..\include\win32config.h"\
+ "..\..\libxml.h"\
+ "..\..\trio.h"\
+ ".\wincecompat.h"\
+
+NODEP_CPP_XPOIN=\
+ "..\..\config-mac.h"\
+
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\libxml\c14n.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\catalog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\debugXML.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\DOCBparser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\encoding.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\entities.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\globals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\hash.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\HTMLparser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\HTMLtree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\libxml.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\list.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\nanoftp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\nanohttp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\parserInternals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\SAX.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\tree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\uri.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\valid.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\win32config.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\wincecompat.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xinclude.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xlink.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xmlerror.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xmlIO.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xmlmemory.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xmlversion.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xmlwin32version.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xpath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xpathInternals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\libxml\xpointer.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/win32/wince/libxml2.vcw b/win32/wince/libxml2.vcw
new file mode 100644
index 0000000..c050c4f
--- /dev/null
+++ b/win32/wince/libxml2.vcw
@@ -0,0 +1,41 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "libxml2"=.\libxml2.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "ppcTest"=.\ppcTest\ppcTest.vcp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/win32/wince/wincecompat.c b/win32/wince/wincecompat.c
new file mode 100644
index 0000000..bd49c57
--- /dev/null
+++ b/win32/wince/wincecompat.c
@@ -0,0 +1,68 @@
+/*
+ * wincecompat.c : wince compatiblity module
+ *
+ * See Copyright for the status of this software.
+ *
+ * javier@tiresiassoft.com
+ *
+ * 17 Sep 2002 created
+ */
+
+#include "wincecompat.h"
+
+char *strError[]= {"Error 0","","No such file or directory","","","","","Arg list too long",
+ "Exec format error","Bad file number","","","Not enough core","Permission denied","","",
+ "","File exists","Cross-device link","","","","Invalid argument","","Too many open files",
+ "","","","No space left on device","","","","","Math argument","Result too large","",
+ "Resource deadlock would occur", "Unknown error under wince"};
+
+
+int errno=0;
+
+int read(int handle, char *buffer, unsigned int len)
+{
+ return(fread(&buffer[0], len, 1, (FILE *) handle));
+}
+
+int write(int handle, const char *buffer, unsigned int len)
+{
+ return(fwrite(&buffer[0], len,1,(FILE *) handle));
+}
+
+int open(const char *filename,int oflag, ...)
+{
+ char mode[3]; /* mode[0] ="w/r/a" mode[1]="+" */
+ mode[2]=0;
+ if ( oflag==(O_WRONLY|O_CREAT) )
+ mode[0]='w';
+ else if (oflag==O_RDONLY)
+ mode[0]='r';
+ return (int) fopen(filename, mode);
+}
+
+int close(int handle)
+{
+ return ( fclose((FILE *) handle) );
+}
+
+
+char *getcwd( char *buffer, unsigned int size)
+{
+ /* Windows CE don't have the concept of a current directory
+ * so we just return NULL to indicate an error
+ */
+ return NULL;
+}
+
+char *getenv( const char *varname )
+{
+ return NULL;
+}
+
+char *strerror(int errnum)
+{
+ if (errnum>MAX_STRERROR)
+ return strError[MAX_STRERROR];
+ else
+ return strError[errnum];
+}
diff --git a/win32/wince/wincecompat.h b/win32/wince/wincecompat.h
new file mode 100644
index 0000000..aa0f3dc
--- /dev/null
+++ b/win32/wince/wincecompat.h
@@ -0,0 +1,50 @@
+/*
+ * wincecompat.h : wince compatiblity header file
+ *
+ * See Copyright for the status of this software.
+ *
+ * javier@tiresiassoft.com
+ *
+ * 17 Sep 2002 created
+ */
+
+#ifndef __WINCECOMPAT_H__
+#define __WINCECOMPAT_H__
+
+#include <stdio.h>
+#include <winbase.h>
+
+#define MAX_STRERROR 31
+
+#define O_RDONLY 0x0000 /* open for reading only */
+#define O_WRONLY 0x0001 /* open for writing only */
+#define O_RDWR 0x0002 /* open for reading and writing */
+#define O_APPEND 0x0008 /* writes done at eof */
+
+#define O_CREAT 0x0100 /* create and open file */
+#define O_TRUNC 0x0200 /* open and truncate */
+#define O_EXCL 0x0400 /* open only if file doesn't already exist */
+
+#define BUFSIZ 4096
+
+extern int errno;
+/*
+ Prototypes
+*/
+int read(int handle, char *buffer, unsigned int len);
+int write(int handle, const char *buffer, unsigned int len);
+int open(const char *filename,int oflag, ...);
+int close(int handle);
+char *getenv( const char *varname );
+char *getcwd( char *buffer, unsigned int size);
+char *strerror(int errnum);
+
+/*
+ Macro'ed inexistant funtion names
+
+*/
+#define snprintf _snprintf
+#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#define perror(_t) MessageBox(NULL, _T("_t"), _T("Error/Warning"), MB_OK)
+
+#endif \ No newline at end of file
diff --git a/xinclude.c b/xinclude.c
new file mode 100644
index 0000000..ff3dafb
--- /dev/null
+++ b/xinclude.c
@@ -0,0 +1,2624 @@
+/*
+ * xinclude.c : Code to implement XInclude processing
+ *
+ * World Wide Web Consortium W3C Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/uri.h>
+#include <libxml/xpath.h>
+#include <libxml/xpointer.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/encoding.h>
+#include <libxml/globals.h>
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+
+#include "buf.h"
+
+#define XINCLUDE_MAX_DEPTH 40
+
+/* #define DEBUG_XINCLUDE */
+#ifdef DEBUG_XINCLUDE
+#ifdef LIBXML_DEBUG_ENABLED
+#include <libxml/debugXML.h>
+#endif
+#endif
+
+/************************************************************************
+ * *
+ * XInclude context handling *
+ * *
+ ************************************************************************/
+
+/*
+ * An XInclude context
+ */
+typedef xmlChar *xmlURL;
+
+typedef struct _xmlXIncludeRef xmlXIncludeRef;
+typedef xmlXIncludeRef *xmlXIncludeRefPtr;
+struct _xmlXIncludeRef {
+ xmlChar *URI; /* the fully resolved resource URL */
+ xmlChar *fragment; /* the fragment in the URI */
+ xmlDocPtr doc; /* the parsed document */
+ xmlNodePtr ref; /* the node making the reference in the source */
+ xmlNodePtr inc; /* the included copy */
+ int xml; /* xml or txt */
+ int count; /* how many refs use that specific doc */
+ xmlXPathObjectPtr xptr; /* the xpointer if needed */
+ int emptyFb; /* flag to show fallback empty */
+};
+
+struct _xmlXIncludeCtxt {
+ xmlDocPtr doc; /* the source document */
+ int incBase; /* the first include for this document */
+ int incNr; /* number of includes */
+ int incMax; /* size of includes tab */
+ xmlXIncludeRefPtr *incTab; /* array of included references */
+
+ int txtNr; /* number of unparsed documents */
+ int txtMax; /* size of unparsed documents tab */
+ xmlNodePtr *txtTab; /* array of unparsed text nodes */
+ xmlURL *txturlTab; /* array of unparsed text URLs */
+
+ xmlChar * url; /* the current URL processed */
+ int urlNr; /* number of URLs stacked */
+ int urlMax; /* size of URL stack */
+ xmlChar * *urlTab; /* URL stack */
+
+ int nbErrors; /* the number of errors detected */
+ int legacy; /* using XINCLUDE_OLD_NS */
+ int parseFlags; /* the flags used for parsing XML documents */
+ xmlChar * base; /* the current xml:base */
+
+ void *_private; /* application data */
+};
+
+static int
+xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree);
+
+
+/************************************************************************
+ * *
+ * XInclude error handler *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXIncludeErrMemory:
+ * @extra: extra information
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlXIncludeErrMemory(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node,
+ const char *extra)
+{
+ if (ctxt != NULL)
+ ctxt->nbErrors++;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE,
+ XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlXIncludeErr:
+ * @ctxt: the XInclude context
+ * @node: the context node
+ * @msg: the error message
+ * @extra: extra information
+ *
+ * Handle an XInclude error
+ */
+static void
+xmlXIncludeErr(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar *extra)
+{
+ if (ctxt != NULL)
+ ctxt->nbErrors++;
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) extra, NULL, NULL, 0, 0,
+ msg, (const char *) extra);
+}
+
+#if 0
+/**
+ * xmlXIncludeWarn:
+ * @ctxt: the XInclude context
+ * @node: the context node
+ * @msg: the error message
+ * @extra: extra information
+ *
+ * Emit an XInclude warning.
+ */
+static void
+xmlXIncludeWarn(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE,
+ error, XML_ERR_WARNING, NULL, 0,
+ (const char *) extra, NULL, NULL, 0, 0,
+ msg, (const char *) extra);
+}
+#endif
+
+/**
+ * xmlXIncludeGetProp:
+ * @ctxt: the XInclude context
+ * @cur: the node
+ * @name: the attribute name
+ *
+ * Get an XInclude attribute
+ *
+ * Returns the value (to be freed) or NULL if not found
+ */
+static xmlChar *
+xmlXIncludeGetProp(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur,
+ const xmlChar *name) {
+ xmlChar *ret;
+
+ ret = xmlGetNsProp(cur, XINCLUDE_NS, name);
+ if (ret != NULL)
+ return(ret);
+ if (ctxt->legacy != 0) {
+ ret = xmlGetNsProp(cur, XINCLUDE_OLD_NS, name);
+ if (ret != NULL)
+ return(ret);
+ }
+ ret = xmlGetProp(cur, name);
+ return(ret);
+}
+/**
+ * xmlXIncludeFreeRef:
+ * @ref: the XInclude reference
+ *
+ * Free an XInclude reference
+ */
+static void
+xmlXIncludeFreeRef(xmlXIncludeRefPtr ref) {
+ if (ref == NULL)
+ return;
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Freeing ref\n");
+#endif
+ if (ref->doc != NULL) {
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Freeing doc %s\n", ref->URI);
+#endif
+ xmlFreeDoc(ref->doc);
+ }
+ if (ref->URI != NULL)
+ xmlFree(ref->URI);
+ if (ref->fragment != NULL)
+ xmlFree(ref->fragment);
+ if (ref->xptr != NULL)
+ xmlXPathFreeObject(ref->xptr);
+ xmlFree(ref);
+}
+
+/**
+ * xmlXIncludeNewRef:
+ * @ctxt: the XInclude context
+ * @URI: the resource URI
+ *
+ * Creates a new reference within an XInclude context
+ *
+ * Returns the new set
+ */
+static xmlXIncludeRefPtr
+xmlXIncludeNewRef(xmlXIncludeCtxtPtr ctxt, const xmlChar *URI,
+ xmlNodePtr ref) {
+ xmlXIncludeRefPtr ret;
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "New ref %s\n", URI);
+#endif
+ ret = (xmlXIncludeRefPtr) xmlMalloc(sizeof(xmlXIncludeRef));
+ if (ret == NULL) {
+ xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlXIncludeRef));
+ if (URI == NULL)
+ ret->URI = NULL;
+ else
+ ret->URI = xmlStrdup(URI);
+ ret->fragment = NULL;
+ ret->ref = ref;
+ ret->doc = NULL;
+ ret->count = 0;
+ ret->xml = 0;
+ ret->inc = NULL;
+ if (ctxt->incMax == 0) {
+ ctxt->incMax = 4;
+ ctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(ctxt->incMax *
+ sizeof(ctxt->incTab[0]));
+ if (ctxt->incTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
+ xmlXIncludeFreeRef(ret);
+ return(NULL);
+ }
+ }
+ if (ctxt->incNr >= ctxt->incMax) {
+ ctxt->incMax *= 2;
+ ctxt->incTab = (xmlXIncludeRefPtr *) xmlRealloc(ctxt->incTab,
+ ctxt->incMax * sizeof(ctxt->incTab[0]));
+ if (ctxt->incTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
+ xmlXIncludeFreeRef(ret);
+ return(NULL);
+ }
+ }
+ ctxt->incTab[ctxt->incNr++] = ret;
+ return(ret);
+}
+
+/**
+ * xmlXIncludeNewContext:
+ * @doc: an XML Document
+ *
+ * Creates a new XInclude context
+ *
+ * Returns the new set
+ */
+xmlXIncludeCtxtPtr
+xmlXIncludeNewContext(xmlDocPtr doc) {
+ xmlXIncludeCtxtPtr ret;
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "New context\n");
+#endif
+ if (doc == NULL)
+ return(NULL);
+ ret = (xmlXIncludeCtxtPtr) xmlMalloc(sizeof(xmlXIncludeCtxt));
+ if (ret == NULL) {
+ xmlXIncludeErrMemory(NULL, (xmlNodePtr) doc,
+ "creating XInclude context");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlXIncludeCtxt));
+ ret->doc = doc;
+ ret->incNr = 0;
+ ret->incBase = 0;
+ ret->incMax = 0;
+ ret->incTab = NULL;
+ ret->nbErrors = 0;
+ return(ret);
+}
+
+/**
+ * xmlXIncludeURLPush:
+ * @ctxt: the parser context
+ * @value: the url
+ *
+ * Pushes a new url on top of the url stack
+ *
+ * Returns -1 in case of error, the index in the stack otherwise
+ */
+static int
+xmlXIncludeURLPush(xmlXIncludeCtxtPtr ctxt,
+ const xmlChar *value)
+{
+ if (ctxt->urlNr > XINCLUDE_MAX_DEPTH) {
+ xmlXIncludeErr(ctxt, NULL, XML_XINCLUDE_RECURSION,
+ "detected a recursion in %s\n", value);
+ return(-1);
+ }
+ if (ctxt->urlTab == NULL) {
+ ctxt->urlMax = 4;
+ ctxt->urlNr = 0;
+ ctxt->urlTab = (xmlChar * *) xmlMalloc(
+ ctxt->urlMax * sizeof(ctxt->urlTab[0]));
+ if (ctxt->urlTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "adding URL");
+ return (-1);
+ }
+ }
+ if (ctxt->urlNr >= ctxt->urlMax) {
+ ctxt->urlMax *= 2;
+ ctxt->urlTab =
+ (xmlChar * *) xmlRealloc(ctxt->urlTab,
+ ctxt->urlMax *
+ sizeof(ctxt->urlTab[0]));
+ if (ctxt->urlTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "adding URL");
+ return (-1);
+ }
+ }
+ ctxt->url = ctxt->urlTab[ctxt->urlNr] = xmlStrdup(value);
+ return (ctxt->urlNr++);
+}
+
+/**
+ * xmlXIncludeURLPop:
+ * @ctxt: the parser context
+ *
+ * Pops the top URL from the URL stack
+ */
+static void
+xmlXIncludeURLPop(xmlXIncludeCtxtPtr ctxt)
+{
+ xmlChar * ret;
+
+ if (ctxt->urlNr <= 0)
+ return;
+ ctxt->urlNr--;
+ if (ctxt->urlNr > 0)
+ ctxt->url = ctxt->urlTab[ctxt->urlNr - 1];
+ else
+ ctxt->url = NULL;
+ ret = ctxt->urlTab[ctxt->urlNr];
+ ctxt->urlTab[ctxt->urlNr] = NULL;
+ if (ret != NULL)
+ xmlFree(ret);
+}
+
+/**
+ * xmlXIncludeFreeContext:
+ * @ctxt: the XInclude context
+ *
+ * Free an XInclude context
+ */
+void
+xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
+ int i;
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Freeing context\n");
+#endif
+ if (ctxt == NULL)
+ return;
+ while (ctxt->urlNr > 0)
+ xmlXIncludeURLPop(ctxt);
+ if (ctxt->urlTab != NULL)
+ xmlFree(ctxt->urlTab);
+ for (i = 0;i < ctxt->incNr;i++) {
+ if (ctxt->incTab[i] != NULL)
+ xmlXIncludeFreeRef(ctxt->incTab[i]);
+ }
+ if (ctxt->txturlTab != NULL) {
+ for (i = 0;i < ctxt->txtNr;i++) {
+ if (ctxt->txturlTab[i] != NULL)
+ xmlFree(ctxt->txturlTab[i]);
+ }
+ }
+ if (ctxt->incTab != NULL)
+ xmlFree(ctxt->incTab);
+ if (ctxt->txtTab != NULL)
+ xmlFree(ctxt->txtTab);
+ if (ctxt->txturlTab != NULL)
+ xmlFree(ctxt->txturlTab);
+ if (ctxt->base != NULL) {
+ xmlFree(ctxt->base);
+ }
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlXIncludeParseFile:
+ * @ctxt: the XInclude context
+ * @URL: the URL or file path
+ *
+ * parse a document for XInclude
+ */
+static xmlDocPtr
+xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
+ xmlDocPtr ret;
+ xmlParserCtxtPtr pctxt;
+ xmlParserInputPtr inputStream;
+
+ xmlInitParser();
+
+ pctxt = xmlNewParserCtxt();
+ if (pctxt == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "cannot allocate parser context");
+ return(NULL);
+ }
+
+ /*
+ * pass in the application data to the parser context.
+ */
+ pctxt->_private = ctxt->_private;
+
+ /*
+ * try to ensure that new documents included are actually
+ * built with the same dictionary as the including document.
+ */
+ if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL)) {
+ if (pctxt->dict != NULL)
+ xmlDictFree(pctxt->dict);
+ pctxt->dict = ctxt->doc->dict;
+ xmlDictReference(pctxt->dict);
+ }
+
+ xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
+
+ inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserCtxt(pctxt);
+ return(NULL);
+ }
+
+ inputPush(pctxt, inputStream);
+
+ if (pctxt->directory == NULL)
+ pctxt->directory = xmlParserGetDirectory(URL);
+
+ pctxt->loadsubset |= XML_DETECT_IDS;
+
+ xmlParseDocument(pctxt);
+
+ if (pctxt->wellFormed) {
+ ret = pctxt->myDoc;
+ }
+ else {
+ ret = NULL;
+ if (pctxt->myDoc != NULL)
+ xmlFreeDoc(pctxt->myDoc);
+ pctxt->myDoc = NULL;
+ }
+ xmlFreeParserCtxt(pctxt);
+
+ return(ret);
+}
+
+/**
+ * xmlXIncludeAddNode:
+ * @ctxt: the XInclude context
+ * @cur: the new node
+ *
+ * Add a new node to process to an XInclude context
+ */
+static int
+xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
+ xmlXIncludeRefPtr ref;
+ xmlURIPtr uri;
+ xmlChar *URL;
+ xmlChar *fragment = NULL;
+ xmlChar *href;
+ xmlChar *parse;
+ xmlChar *base;
+ xmlChar *URI;
+ int xml = 1, i; /* default Issue 64 */
+ int local = 0;
+
+
+ if (ctxt == NULL)
+ return(-1);
+ if (cur == NULL)
+ return(-1);
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Add node\n");
+#endif
+ /*
+ * read the attributes
+ */
+ href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
+ if (href == NULL) {
+ href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
+ if (href == NULL)
+ return(-1);
+ }
+ if ((href[0] == '#') || (href[0] == 0))
+ local = 1;
+ parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
+ if (parse != NULL) {
+ if (xmlStrEqual(parse, XINCLUDE_PARSE_XML))
+ xml = 1;
+ else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT))
+ xml = 0;
+ else {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_PARSE_VALUE,
+ "invalid value %s for 'parse'\n", parse);
+ if (href != NULL)
+ xmlFree(href);
+ if (parse != NULL)
+ xmlFree(parse);
+ return(-1);
+ }
+ }
+
+ /*
+ * compute the URI
+ */
+ base = xmlNodeGetBase(ctxt->doc, cur);
+ if (base == NULL) {
+ URI = xmlBuildURI(href, ctxt->doc->URL);
+ } else {
+ URI = xmlBuildURI(href, base);
+ }
+ if (URI == NULL) {
+ xmlChar *escbase;
+ xmlChar *eschref;
+ /*
+ * Some escaping may be needed
+ */
+ escbase = xmlURIEscape(base);
+ eschref = xmlURIEscape(href);
+ URI = xmlBuildURI(eschref, escbase);
+ if (escbase != NULL)
+ xmlFree(escbase);
+ if (eschref != NULL)
+ xmlFree(eschref);
+ }
+ if (parse != NULL)
+ xmlFree(parse);
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ if (URI == NULL) {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
+ "failed build URL\n", NULL);
+ return(-1);
+ }
+ fragment = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE_XPOINTER);
+
+ /*
+ * Check the URL and remove any fragment identifier
+ */
+ uri = xmlParseURI((const char *)URI);
+ if (uri == NULL) {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", URI);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ xmlFree(URI);
+ return(-1);
+ }
+
+ if (uri->fragment != NULL) {
+ if (ctxt->legacy != 0) {
+ if (fragment == NULL) {
+ fragment = (xmlChar *) uri->fragment;
+ } else {
+ xmlFree(uri->fragment);
+ }
+ } else {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_FRAGMENT_ID,
+ "Invalid fragment identifier in URI %s use the xpointer attribute\n",
+ URI);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ xmlFreeURI(uri);
+ xmlFree(URI);
+ return(-1);
+ }
+ uri->fragment = NULL;
+ }
+ URL = xmlSaveUri(uri);
+ xmlFreeURI(uri);
+ xmlFree(URI);
+ if (URL == NULL) {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", URI);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ return(-1);
+ }
+
+ /*
+ * If local and xml then we need a fragment
+ */
+ if ((local == 1) && (xml == 1) &&
+ ((fragment == NULL) || (fragment[0] == 0))) {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
+ "detected a local recursion with no xpointer in %s\n",
+ URL);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ return(-1);
+ }
+
+ /*
+ * Check the URL against the stack for recursions
+ */
+ if ((!local) && (xml == 1)) {
+ for (i = 0;i < ctxt->urlNr;i++) {
+ if (xmlStrEqual(URL, ctxt->urlTab[i])) {
+ xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
+ "detected a recursion in %s\n", URL);
+ return(-1);
+ }
+ }
+ }
+
+ ref = xmlXIncludeNewRef(ctxt, URL, cur);
+ if (ref == NULL) {
+ return(-1);
+ }
+ ref->fragment = fragment;
+ ref->doc = NULL;
+ ref->xml = xml;
+ ref->count = 1;
+ xmlFree(URL);
+ return(0);
+}
+
+/**
+ * xmlXIncludeRecurseDoc:
+ * @ctxt: the XInclude context
+ * @doc: the new document
+ * @url: the associated URL
+ *
+ * The XInclude recursive nature is handled at this point.
+ */
+static void
+xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
+ const xmlURL url ATTRIBUTE_UNUSED) {
+ xmlXIncludeCtxtPtr newctxt;
+ int i;
+
+ /*
+ * Avoid recursion in already substitued resources
+ for (i = 0;i < ctxt->urlNr;i++) {
+ if (xmlStrEqual(doc->URL, ctxt->urlTab[i]))
+ return;
+ }
+ */
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Recursing in doc %s\n", doc->URL);
+#endif
+ /*
+ * Handle recursion here.
+ */
+
+ newctxt = xmlXIncludeNewContext(doc);
+ if (newctxt != NULL) {
+ /*
+ * Copy the private user data
+ */
+ newctxt->_private = ctxt->_private;
+ /*
+ * Copy the existing document set
+ */
+ newctxt->incMax = ctxt->incMax;
+ newctxt->incNr = ctxt->incNr;
+ newctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(newctxt->incMax *
+ sizeof(newctxt->incTab[0]));
+ if (newctxt->incTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, (xmlNodePtr) doc, "processing doc");
+ xmlFree(newctxt);
+ return;
+ }
+ /*
+ * copy the urlTab
+ */
+ newctxt->urlMax = ctxt->urlMax;
+ newctxt->urlNr = ctxt->urlNr;
+ newctxt->urlTab = ctxt->urlTab;
+
+ /*
+ * Inherit the existing base
+ */
+ newctxt->base = xmlStrdup(ctxt->base);
+
+ /*
+ * Inherit the documents already in use by other includes
+ */
+ newctxt->incBase = ctxt->incNr;
+ for (i = 0;i < ctxt->incNr;i++) {
+ newctxt->incTab[i] = ctxt->incTab[i];
+ newctxt->incTab[i]->count++; /* prevent the recursion from
+ freeing it */
+ }
+ /*
+ * The new context should also inherit the Parse Flags
+ * (bug 132597)
+ */
+ newctxt->parseFlags = ctxt->parseFlags;
+ xmlXIncludeDoProcess(newctxt, doc, xmlDocGetRootElement(doc));
+ for (i = 0;i < ctxt->incNr;i++) {
+ newctxt->incTab[i]->count--;
+ newctxt->incTab[i] = NULL;
+ }
+
+ /* urlTab may have been reallocated */
+ ctxt->urlTab = newctxt->urlTab;
+ ctxt->urlMax = newctxt->urlMax;
+
+ newctxt->urlMax = 0;
+ newctxt->urlNr = 0;
+ newctxt->urlTab = NULL;
+
+ xmlXIncludeFreeContext(newctxt);
+ }
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Done recursing in doc %s\n", url);
+#endif
+}
+
+/**
+ * xmlXIncludeAddTxt:
+ * @ctxt: the XInclude context
+ * @txt: the new text node
+ * @url: the associated URL
+ *
+ * Add a new txtument to the list
+ */
+static void
+xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) {
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Adding text %s\n", url);
+#endif
+ if (ctxt->txtMax == 0) {
+ ctxt->txtMax = 4;
+ ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax *
+ sizeof(ctxt->txtTab[0]));
+ if (ctxt->txtTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "processing text");
+ return;
+ }
+ ctxt->txturlTab = (xmlURL *) xmlMalloc(ctxt->txtMax *
+ sizeof(ctxt->txturlTab[0]));
+ if (ctxt->txturlTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "processing text");
+ return;
+ }
+ }
+ if (ctxt->txtNr >= ctxt->txtMax) {
+ ctxt->txtMax *= 2;
+ ctxt->txtTab = (xmlNodePtr *) xmlRealloc(ctxt->txtTab,
+ ctxt->txtMax * sizeof(ctxt->txtTab[0]));
+ if (ctxt->txtTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "processing text");
+ return;
+ }
+ ctxt->txturlTab = (xmlURL *) xmlRealloc(ctxt->txturlTab,
+ ctxt->txtMax * sizeof(ctxt->txturlTab[0]));
+ if (ctxt->txturlTab == NULL) {
+ xmlXIncludeErrMemory(ctxt, NULL, "processing text");
+ return;
+ }
+ }
+ ctxt->txtTab[ctxt->txtNr] = txt;
+ ctxt->txturlTab[ctxt->txtNr] = xmlStrdup(url);
+ ctxt->txtNr++;
+}
+
+/************************************************************************
+ * *
+ * Node copy with specific semantic *
+ * *
+ ************************************************************************/
+
+static xmlNodePtr
+xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
+ xmlDocPtr source, xmlNodePtr elem);
+
+/**
+ * xmlXIncludeCopyNode:
+ * @ctxt: the XInclude context
+ * @target: the document target
+ * @source: the document source
+ * @elem: the element
+ *
+ * Make a copy of the node while preserving the XInclude semantic
+ * of the Infoset copy
+ */
+static xmlNodePtr
+xmlXIncludeCopyNode(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
+ xmlDocPtr source, xmlNodePtr elem) {
+ xmlNodePtr result = NULL;
+
+ if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
+ (elem == NULL))
+ return(NULL);
+ if (elem->type == XML_DTD_NODE)
+ return(NULL);
+ if (elem->type == XML_DOCUMENT_NODE)
+ result = xmlXIncludeCopyNodeList(ctxt, target, source, elem->children);
+ else
+ result = xmlDocCopyNode(elem, target, 1);
+ return(result);
+}
+
+/**
+ * xmlXIncludeCopyNodeList:
+ * @ctxt: the XInclude context
+ * @target: the document target
+ * @source: the document source
+ * @elem: the element list
+ *
+ * Make a copy of the node list while preserving the XInclude semantic
+ * of the Infoset copy
+ */
+static xmlNodePtr
+xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
+ xmlDocPtr source, xmlNodePtr elem) {
+ xmlNodePtr cur, res, result = NULL, last = NULL;
+
+ if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
+ (elem == NULL))
+ return(NULL);
+ cur = elem;
+ while (cur != NULL) {
+ res = xmlXIncludeCopyNode(ctxt, target, source, cur);
+ if (res != NULL) {
+ if (result == NULL) {
+ result = last = res;
+ } else {
+ last->next = res;
+ res->prev = last;
+ last = res;
+ }
+ }
+ cur = cur->next;
+ }
+ return(result);
+}
+
+/**
+ * xmlXIncludeGetNthChild:
+ * @cur: the node
+ * @no: the child number
+ *
+ * Returns the @n'th element child of @cur or NULL
+ */
+static xmlNodePtr
+xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
+ int i;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ cur = cur->children;
+ for (i = 0;i <= no;cur = cur->next) {
+ if (cur == NULL)
+ return(cur);
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ i++;
+ if (i == no)
+ break;
+ }
+ }
+ return(cur);
+}
+
+xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level); /* in xpointer.c */
+/**
+ * xmlXIncludeCopyRange:
+ * @ctxt: the XInclude context
+ * @target: the document target
+ * @source: the document source
+ * @obj: the XPointer result from the evaluation.
+ *
+ * Build a node list tree copy of the XPointer result.
+ *
+ * Returns an xmlNodePtr list or NULL.
+ * The caller has to free the node tree.
+ */
+static xmlNodePtr
+xmlXIncludeCopyRange(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
+ xmlDocPtr source, xmlXPathObjectPtr range) {
+ /* pointers to generated nodes */
+ xmlNodePtr list = NULL, last = NULL, listParent = NULL;
+ xmlNodePtr tmp, tmp2;
+ /* pointers to traversal nodes */
+ xmlNodePtr start, cur, end;
+ int index1, index2;
+ int level = 0, lastLevel = 0, endLevel = 0, endFlag = 0;
+
+ if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
+ (range == NULL))
+ return(NULL);
+ if (range->type != XPATH_RANGE)
+ return(NULL);
+ start = (xmlNodePtr) range->user;
+
+ if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ end = range->user2;
+ if (end == NULL)
+ return(xmlDocCopyNode(start, target, 1));
+ if (end->type == XML_NAMESPACE_DECL)
+ return(NULL);
+
+ cur = start;
+ index1 = range->index;
+ index2 = range->index2;
+ /*
+ * level is depth of the current node under consideration
+ * list is the pointer to the root of the output tree
+ * listParent is a pointer to the parent of output tree (within
+ the included file) in case we need to add another level
+ * last is a pointer to the last node added to the output tree
+ * lastLevel is the depth of last (relative to the root)
+ */
+ while (cur != NULL) {
+ /*
+ * Check if our output tree needs a parent
+ */
+ if (level < 0) {
+ while (level < 0) {
+ /* copy must include namespaces and properties */
+ tmp2 = xmlDocCopyNode(listParent, target, 2);
+ xmlAddChild(tmp2, list);
+ list = tmp2;
+ listParent = listParent->parent;
+ level++;
+ }
+ last = list;
+ lastLevel = 0;
+ }
+ /*
+ * Check whether we need to change our insertion point
+ */
+ while (level < lastLevel) {
+ last = last->parent;
+ lastLevel --;
+ }
+ if (cur == end) { /* Are we at the end of the range? */
+ if (cur->type == XML_TEXT_NODE) {
+ const xmlChar *content = cur->content;
+ int len;
+
+ if (content == NULL) {
+ tmp = xmlNewTextLen(NULL, 0);
+ } else {
+ len = index2;
+ if ((cur == start) && (index1 > 1)) {
+ content += (index1 - 1);
+ len -= (index1 - 1);
+ } else {
+ len = index2;
+ }
+ tmp = xmlNewTextLen(content, len);
+ }
+ /* single sub text node selection */
+ if (list == NULL)
+ return(tmp);
+ /* prune and return full set */
+ if (level == lastLevel)
+ xmlAddNextSibling(last, tmp);
+ else
+ xmlAddChild(last, tmp);
+ return(list);
+ } else { /* ending node not a text node */
+ endLevel = level; /* remember the level of the end node */
+ endFlag = 1;
+ /* last node - need to take care of properties + namespaces */
+ tmp = xmlDocCopyNode(cur, target, 2);
+ if (list == NULL) {
+ list = tmp;
+ listParent = cur->parent;
+ } else {
+ if (level == lastLevel)
+ xmlAddNextSibling(last, tmp);
+ else {
+ xmlAddChild(last, tmp);
+ lastLevel = level;
+ }
+ }
+ last = tmp;
+
+ if (index2 > 1) {
+ end = xmlXIncludeGetNthChild(cur, index2 - 1);
+ index2 = 0;
+ }
+ if ((cur == start) && (index1 > 1)) {
+ cur = xmlXIncludeGetNthChild(cur, index1 - 1);
+ index1 = 0;
+ } else {
+ cur = cur->children;
+ }
+ level++; /* increment level to show change */
+ /*
+ * Now gather the remaining nodes from cur to end
+ */
+ continue; /* while */
+ }
+ } else if (cur == start) { /* Not at the end, are we at start? */
+ if ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ const xmlChar *content = cur->content;
+
+ if (content == NULL) {
+ tmp = xmlNewTextLen(NULL, 0);
+ } else {
+ if (index1 > 1) {
+ content += (index1 - 1);
+ index1 = 0;
+ }
+ tmp = xmlNewText(content);
+ }
+ last = list = tmp;
+ listParent = cur->parent;
+ } else { /* Not text node */
+ /*
+ * start of the range - need to take care of
+ * properties and namespaces
+ */
+ tmp = xmlDocCopyNode(cur, target, 2);
+ list = last = tmp;
+ listParent = cur->parent;
+ if (index1 > 1) { /* Do we need to position? */
+ cur = xmlXIncludeGetNthChild(cur, index1 - 1);
+ level = lastLevel = 1;
+ index1 = 0;
+ /*
+ * Now gather the remaining nodes from cur to end
+ */
+ continue; /* while */
+ }
+ }
+ } else {
+ tmp = NULL;
+ switch (cur->type) {
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_NODE:
+ /* Do not copy DTD informations */
+ break;
+ case XML_ENTITY_DECL:
+ /* handle crossing entities -> stack needed */
+ break;
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ /* don't consider it part of the tree content */
+ break;
+ case XML_ATTRIBUTE_NODE:
+ /* Humm, should not happen ! */
+ break;
+ default:
+ /*
+ * Middle of the range - need to take care of
+ * properties and namespaces
+ */
+ tmp = xmlDocCopyNode(cur, target, 2);
+ break;
+ }
+ if (tmp != NULL) {
+ if (level == lastLevel)
+ xmlAddNextSibling(last, tmp);
+ else {
+ xmlAddChild(last, tmp);
+ lastLevel = level;
+ }
+ last = tmp;
+ }
+ }
+ /*
+ * Skip to next node in document order
+ */
+ cur = xmlXPtrAdvanceNode(cur, &level);
+ if (endFlag && (level >= endLevel))
+ break;
+ }
+ return(list);
+}
+
+/**
+ * xmlXIncludeBuildNodeList:
+ * @ctxt: the XInclude context
+ * @target: the document target
+ * @source: the document source
+ * @obj: the XPointer result from the evaluation.
+ *
+ * Build a node list tree copy of the XPointer result.
+ * This will drop Attributes and Namespace declarations.
+ *
+ * Returns an xmlNodePtr list or NULL.
+ * the caller has to free the node tree.
+ */
+static xmlNodePtr
+xmlXIncludeCopyXPointer(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
+ xmlDocPtr source, xmlXPathObjectPtr obj) {
+ xmlNodePtr list = NULL, last = NULL;
+ int i;
+
+ if (source == NULL)
+ source = ctxt->doc;
+ if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
+ (obj == NULL))
+ return(NULL);
+ switch (obj->type) {
+ case XPATH_NODESET: {
+ xmlNodeSetPtr set = obj->nodesetval;
+ if (set == NULL)
+ return(NULL);
+ for (i = 0;i < set->nodeNr;i++) {
+ if (set->nodeTab[i] == NULL)
+ continue;
+ switch (set->nodeTab[i]->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_XINCLUDE_END:
+ break;
+ case XML_XINCLUDE_START: {
+ xmlNodePtr tmp, cur = set->nodeTab[i];
+
+ cur = cur->next;
+ while (cur != NULL) {
+ switch(cur->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ tmp = xmlXIncludeCopyNode(ctxt, target,
+ source, cur);
+ if (last == NULL) {
+ list = last = tmp;
+ } else {
+ xmlAddNextSibling(last, tmp);
+ last = tmp;
+ }
+ cur = cur->next;
+ continue;
+ default:
+ break;
+ }
+ break;
+ }
+ continue;
+ }
+ case XML_ATTRIBUTE_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ continue; /* for */
+ }
+ if (last == NULL)
+ list = last = xmlXIncludeCopyNode(ctxt, target, source,
+ set->nodeTab[i]);
+ else {
+ xmlAddNextSibling(last,
+ xmlXIncludeCopyNode(ctxt, target, source,
+ set->nodeTab[i]));
+ if (last->next != NULL)
+ last = last->next;
+ }
+ }
+ break;
+ }
+#ifdef LIBXML_XPTR_ENABLED
+ case XPATH_LOCATIONSET: {
+ xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
+ if (set == NULL)
+ return(NULL);
+ for (i = 0;i < set->locNr;i++) {
+ if (last == NULL)
+ list = last = xmlXIncludeCopyXPointer(ctxt, target, source,
+ set->locTab[i]);
+ else
+ xmlAddNextSibling(last,
+ xmlXIncludeCopyXPointer(ctxt, target, source,
+ set->locTab[i]));
+ if (last != NULL) {
+ while (last->next != NULL)
+ last = last->next;
+ }
+ }
+ break;
+ }
+ case XPATH_RANGE:
+ return(xmlXIncludeCopyRange(ctxt, target, source, obj));
+#endif
+ case XPATH_POINT:
+ /* points are ignored in XInclude */
+ break;
+ default:
+ break;
+ }
+ return(list);
+}
+/************************************************************************
+ * *
+ * XInclude I/O handling *
+ * *
+ ************************************************************************/
+
+typedef struct _xmlXIncludeMergeData xmlXIncludeMergeData;
+typedef xmlXIncludeMergeData *xmlXIncludeMergeDataPtr;
+struct _xmlXIncludeMergeData {
+ xmlDocPtr doc;
+ xmlXIncludeCtxtPtr ctxt;
+};
+
+/**
+ * xmlXIncludeMergeOneEntity:
+ * @ent: the entity
+ * @doc: the including doc
+ * @nr: the entity name
+ *
+ * Inplements the merge of one entity
+ */
+static void
+xmlXIncludeMergeEntity(xmlEntityPtr ent, xmlXIncludeMergeDataPtr data,
+ xmlChar *name ATTRIBUTE_UNUSED) {
+ xmlEntityPtr ret, prev;
+ xmlDocPtr doc;
+ xmlXIncludeCtxtPtr ctxt;
+
+ if ((ent == NULL) || (data == NULL))
+ return;
+ ctxt = data->ctxt;
+ doc = data->doc;
+ if ((ctxt == NULL) || (doc == NULL))
+ return;
+ switch (ent->etype) {
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ return;
+ case XML_INTERNAL_GENERAL_ENTITY:
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ break;
+ }
+ ret = xmlAddDocEntity(doc, ent->name, ent->etype, ent->ExternalID,
+ ent->SystemID, ent->content);
+ if (ret != NULL) {
+ if (ent->URI != NULL)
+ ret->URI = xmlStrdup(ent->URI);
+ } else {
+ prev = xmlGetDocEntity(doc, ent->name);
+ if (prev != NULL) {
+ if (ent->etype != prev->etype)
+ goto error;
+
+ if ((ent->SystemID != NULL) && (prev->SystemID != NULL)) {
+ if (!xmlStrEqual(ent->SystemID, prev->SystemID))
+ goto error;
+ } else if ((ent->ExternalID != NULL) &&
+ (prev->ExternalID != NULL)) {
+ if (!xmlStrEqual(ent->ExternalID, prev->ExternalID))
+ goto error;
+ } else if ((ent->content != NULL) && (prev->content != NULL)) {
+ if (!xmlStrEqual(ent->content, prev->content))
+ goto error;
+ } else {
+ goto error;
+ }
+
+ }
+ }
+ return;
+error:
+ switch (ent->etype) {
+ case XML_INTERNAL_PARAMETER_ENTITY:
+ case XML_EXTERNAL_PARAMETER_ENTITY:
+ case XML_INTERNAL_PREDEFINED_ENTITY:
+ case XML_INTERNAL_GENERAL_ENTITY:
+ case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
+ return;
+ case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
+ break;
+ }
+ xmlXIncludeErr(ctxt, (xmlNodePtr) ent, XML_XINCLUDE_ENTITY_DEF_MISMATCH,
+ "mismatch in redefinition of entity %s\n",
+ ent->name);
+}
+
+/**
+ * xmlXIncludeMergeEntities:
+ * @ctxt: an XInclude context
+ * @doc: the including doc
+ * @from: the included doc
+ *
+ * Inplements the entity merge
+ *
+ * Returns 0 if merge succeeded, -1 if some processing failed
+ */
+static int
+xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
+ xmlDocPtr from) {
+ xmlNodePtr cur;
+ xmlDtdPtr target, source;
+
+ if (ctxt == NULL)
+ return(-1);
+
+ if ((from == NULL) || (from->intSubset == NULL))
+ return(0);
+
+ target = doc->intSubset;
+ if (target == NULL) {
+ cur = xmlDocGetRootElement(doc);
+ if (cur == NULL)
+ return(-1);
+ target = xmlCreateIntSubset(doc, cur->name, NULL, NULL);
+ if (target == NULL)
+ return(-1);
+ }
+
+ source = from->intSubset;
+ if ((source != NULL) && (source->entities != NULL)) {
+ xmlXIncludeMergeData data;
+
+ data.ctxt = ctxt;
+ data.doc = doc;
+
+ xmlHashScan((xmlHashTablePtr) source->entities,
+ (xmlHashScanner) xmlXIncludeMergeEntity, &data);
+ }
+ source = from->extSubset;
+ if ((source != NULL) && (source->entities != NULL)) {
+ xmlXIncludeMergeData data;
+
+ data.ctxt = ctxt;
+ data.doc = doc;
+
+ /*
+ * don't duplicate existing stuff when external subsets are the same
+ */
+ if ((!xmlStrEqual(target->ExternalID, source->ExternalID)) &&
+ (!xmlStrEqual(target->SystemID, source->SystemID))) {
+ xmlHashScan((xmlHashTablePtr) source->entities,
+ (xmlHashScanner) xmlXIncludeMergeEntity, &data);
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlXIncludeLoadDoc:
+ * @ctxt: the XInclude context
+ * @url: the associated URL
+ * @nr: the xinclude node number
+ *
+ * Load the document, and store the result in the XInclude context
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
+ xmlDocPtr doc;
+ xmlURIPtr uri;
+ xmlChar *URL;
+ xmlChar *fragment = NULL;
+ int i = 0;
+#ifdef LIBXML_XPTR_ENABLED
+ int saveFlags;
+#endif
+
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "Loading doc %s:%d\n", url, nr);
+#endif
+ /*
+ * Check the URL and remove any fragment identifier
+ */
+ uri = xmlParseURI((const char *)url);
+ if (uri == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", url);
+ return(-1);
+ }
+ if (uri->fragment != NULL) {
+ fragment = (xmlChar *) uri->fragment;
+ uri->fragment = NULL;
+ }
+ if ((ctxt->incTab != NULL) && (ctxt->incTab[nr] != NULL) &&
+ (ctxt->incTab[nr]->fragment != NULL)) {
+ if (fragment != NULL) xmlFree(fragment);
+ fragment = xmlStrdup(ctxt->incTab[nr]->fragment);
+ }
+ URL = xmlSaveUri(uri);
+ xmlFreeURI(uri);
+ if (URL == NULL) {
+ if (ctxt->incTab != NULL)
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", url);
+ else
+ xmlXIncludeErr(ctxt, NULL,
+ XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", url);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ return(-1);
+ }
+
+ /*
+ * Handling of references to the local document are done
+ * directly through ctxt->doc.
+ */
+ if ((URL[0] == 0) || (URL[0] == '#') ||
+ ((ctxt->doc != NULL) && (xmlStrEqual(URL, ctxt->doc->URL)))) {
+ doc = NULL;
+ goto loaded;
+ }
+
+ /*
+ * Prevent reloading twice the document.
+ */
+ for (i = 0; i < ctxt->incNr; i++) {
+ if ((xmlStrEqual(URL, ctxt->incTab[i]->URI)) &&
+ (ctxt->incTab[i]->doc != NULL)) {
+ doc = ctxt->incTab[i]->doc;
+#ifdef DEBUG_XINCLUDE
+ printf("Already loaded %s\n", URL);
+#endif
+ goto loaded;
+ }
+ }
+
+ /*
+ * Load it.
+ */
+#ifdef DEBUG_XINCLUDE
+ printf("loading %s\n", URL);
+#endif
+#ifdef LIBXML_XPTR_ENABLED
+ /*
+ * If this is an XPointer evaluation, we want to assure that
+ * all entities have been resolved prior to processing the
+ * referenced document
+ */
+ saveFlags = ctxt->parseFlags;
+ if (fragment != NULL) { /* if this is an XPointer eval */
+ ctxt->parseFlags |= XML_PARSE_NOENT;
+ }
+#endif
+
+ doc = xmlXIncludeParseFile(ctxt, (const char *)URL);
+#ifdef LIBXML_XPTR_ENABLED
+ ctxt->parseFlags = saveFlags;
+#endif
+ if (doc == NULL) {
+ xmlFree(URL);
+ if (fragment != NULL)
+ xmlFree(fragment);
+ return(-1);
+ }
+ ctxt->incTab[nr]->doc = doc;
+ /*
+ * It's possible that the requested URL has been mapped to a
+ * completely different location (e.g. through a catalog entry).
+ * To check for this, we compare the URL with that of the doc
+ * and change it if they disagree (bug 146988).
+ */
+ if (!xmlStrEqual(URL, doc->URL)) {
+ xmlFree(URL);
+ URL = xmlStrdup(doc->URL);
+ }
+ for (i = nr + 1; i < ctxt->incNr; i++) {
+ if (xmlStrEqual(URL, ctxt->incTab[i]->URI)) {
+ ctxt->incTab[nr]->count++;
+#ifdef DEBUG_XINCLUDE
+ printf("Increasing %s count since reused\n", URL);
+#endif
+ break;
+ }
+ }
+
+ /*
+ * Make sure we have all entities fixed up
+ */
+ xmlXIncludeMergeEntities(ctxt, ctxt->doc, doc);
+
+ /*
+ * We don't need the DTD anymore, free up space
+ if (doc->intSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) doc->intSubset);
+ xmlFreeNode((xmlNodePtr) doc->intSubset);
+ doc->intSubset = NULL;
+ }
+ if (doc->extSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) doc->extSubset);
+ xmlFreeNode((xmlNodePtr) doc->extSubset);
+ doc->extSubset = NULL;
+ }
+ */
+ xmlXIncludeRecurseDoc(ctxt, doc, URL);
+
+loaded:
+ if (fragment == NULL) {
+ /*
+ * Add the top children list as the replacement copy.
+ */
+ if (doc == NULL)
+ {
+ /* Hopefully a DTD declaration won't be copied from
+ * the same document */
+ ctxt->incTab[nr]->inc = xmlCopyNodeList(ctxt->doc->children);
+ } else {
+ ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc,
+ doc, doc->children);
+ }
+ }
+#ifdef LIBXML_XPTR_ENABLED
+ else {
+ /*
+ * Computes the XPointer expression and make a copy used
+ * as the replacement copy.
+ */
+ xmlXPathObjectPtr xptr;
+ xmlXPathContextPtr xptrctxt;
+ xmlNodeSetPtr set;
+
+ if (doc == NULL) {
+ xptrctxt = xmlXPtrNewContext(ctxt->doc, ctxt->incTab[nr]->ref,
+ NULL);
+ } else {
+ xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
+ }
+ if (xptrctxt == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_FAILED,
+ "could not create XPointer context\n", NULL);
+ xmlFree(URL);
+ xmlFree(fragment);
+ return(-1);
+ }
+ xptr = xmlXPtrEval(fragment, xptrctxt);
+ if (xptr == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_FAILED,
+ "XPointer evaluation failed: #%s\n",
+ fragment);
+ xmlXPathFreeContext(xptrctxt);
+ xmlFree(URL);
+ xmlFree(fragment);
+ return(-1);
+ }
+ switch (xptr->type) {
+ case XPATH_UNDEFINED:
+ case XPATH_BOOLEAN:
+ case XPATH_NUMBER:
+ case XPATH_STRING:
+ case XPATH_POINT:
+ case XPATH_USERS:
+ case XPATH_XSLT_TREE:
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_RESULT,
+ "XPointer is not a range: #%s\n",
+ fragment);
+ xmlXPathFreeContext(xptrctxt);
+ xmlFree(URL);
+ xmlFree(fragment);
+ return(-1);
+ case XPATH_NODESET:
+ if ((xptr->nodesetval == NULL) ||
+ (xptr->nodesetval->nodeNr <= 0)) {
+ xmlXPathFreeContext(xptrctxt);
+ xmlFree(URL);
+ xmlFree(fragment);
+ return(-1);
+ }
+
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ break;
+ }
+ set = xptr->nodesetval;
+ if (set != NULL) {
+ for (i = 0;i < set->nodeNr;i++) {
+ if (set->nodeTab[i] == NULL)
+ continue;
+ switch (set->nodeTab[i]->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ continue;
+
+ case XML_ATTRIBUTE_NODE:
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_RESULT,
+ "XPointer selects an attribute: #%s\n",
+ fragment);
+ set->nodeTab[i] = NULL;
+ continue;
+ case XML_NAMESPACE_DECL:
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_RESULT,
+ "XPointer selects a namespace: #%s\n",
+ fragment);
+ set->nodeTab[i] = NULL;
+ continue;
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_XPTR_RESULT,
+ "XPointer selects unexpected nodes: #%s\n",
+ fragment);
+ set->nodeTab[i] = NULL;
+ set->nodeTab[i] = NULL;
+ continue; /* for */
+ }
+ }
+ }
+ if (doc == NULL) {
+ ctxt->incTab[nr]->xptr = xptr;
+ ctxt->incTab[nr]->inc = NULL;
+ } else {
+ ctxt->incTab[nr]->inc =
+ xmlXIncludeCopyXPointer(ctxt, ctxt->doc, doc, xptr);
+ xmlXPathFreeObject(xptr);
+ }
+ xmlXPathFreeContext(xptrctxt);
+ xmlFree(fragment);
+ }
+#endif
+
+ /*
+ * Do the xml:base fixup if needed
+ */
+ if ((doc != NULL) && (URL != NULL) &&
+ (!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) &&
+ (!(doc->parseFlags & XML_PARSE_NOBASEFIX))) {
+ xmlNodePtr node;
+ xmlChar *base;
+ xmlChar *curBase;
+
+ /*
+ * The base is only adjusted if "necessary", i.e. if the xinclude node
+ * has a base specified, or the URL is relative
+ */
+ base = xmlGetNsProp(ctxt->incTab[nr]->ref, BAD_CAST "base",
+ XML_XML_NAMESPACE);
+ if (base == NULL) {
+ /*
+ * No xml:base on the xinclude node, so we check whether the
+ * URI base is different than (relative to) the context base
+ */
+ curBase = xmlBuildRelativeURI(URL, ctxt->base);
+ if (curBase == NULL) { /* Error return */
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_HREF_URI,
+ "trying to build relative URI from %s\n", URL);
+ } else {
+ /* If the URI doesn't contain a slash, it's not relative */
+ if (!xmlStrchr(curBase, (xmlChar) '/'))
+ xmlFree(curBase);
+ else
+ base = curBase;
+ }
+ }
+ if (base != NULL) { /* Adjustment may be needed */
+ node = ctxt->incTab[nr]->inc;
+ while (node != NULL) {
+ /* Only work on element nodes */
+ if (node->type == XML_ELEMENT_NODE) {
+ curBase = xmlNodeGetBase(node->doc, node);
+ /* If no current base, set it */
+ if (curBase == NULL) {
+ xmlNodeSetBase(node, base);
+ } else {
+ /*
+ * If the current base is the same as the
+ * URL of the document, then reset it to be
+ * the specified xml:base or the relative URI
+ */
+ if (xmlStrEqual(curBase, node->doc->URL)) {
+ xmlNodeSetBase(node, base);
+ } else {
+ /*
+ * If the element already has an xml:base
+ * set, then relativise it if necessary
+ */
+ xmlChar *xmlBase;
+ xmlBase = xmlGetNsProp(node,
+ BAD_CAST "base",
+ XML_XML_NAMESPACE);
+ if (xmlBase != NULL) {
+ xmlChar *relBase;
+ relBase = xmlBuildURI(xmlBase, base);
+ if (relBase == NULL) { /* error */
+ xmlXIncludeErr(ctxt,
+ ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_HREF_URI,
+ "trying to rebuild base from %s\n",
+ xmlBase);
+ } else {
+ xmlNodeSetBase(node, relBase);
+ xmlFree(relBase);
+ }
+ xmlFree(xmlBase);
+ }
+ }
+ xmlFree(curBase);
+ }
+ }
+ node = node->next;
+ }
+ xmlFree(base);
+ }
+ }
+ if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) &&
+ (ctxt->incTab[nr]->count <= 1)) {
+#ifdef DEBUG_XINCLUDE
+ printf("freeing %s\n", ctxt->incTab[nr]->doc->URL);
+#endif
+ xmlFreeDoc(ctxt->incTab[nr]->doc);
+ ctxt->incTab[nr]->doc = NULL;
+ }
+ xmlFree(URL);
+ return(0);
+}
+
+/**
+ * xmlXIncludeLoadTxt:
+ * @ctxt: the XInclude context
+ * @url: the associated URL
+ * @nr: the xinclude node number
+ *
+ * Load the content, and store the result in the XInclude context
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
+ xmlParserInputBufferPtr buf;
+ xmlNodePtr node;
+ xmlURIPtr uri;
+ xmlChar *URL;
+ int i;
+ xmlChar *encoding = NULL;
+ xmlCharEncoding enc = (xmlCharEncoding) 0;
+ xmlParserCtxtPtr pctxt;
+ xmlParserInputPtr inputStream;
+ int xinclude_multibyte_fallback_used = 0;
+
+ /*
+ * Check the URL and remove any fragment identifier
+ */
+ uri = xmlParseURI((const char *)url);
+ if (uri == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", url);
+ return(-1);
+ }
+ if (uri->fragment != NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_TEXT_FRAGMENT,
+ "fragment identifier forbidden for text: %s\n",
+ (const xmlChar *) uri->fragment);
+ xmlFreeURI(uri);
+ return(-1);
+ }
+ URL = xmlSaveUri(uri);
+ xmlFreeURI(uri);
+ if (URL == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI,
+ "invalid value URI %s\n", url);
+ return(-1);
+ }
+
+ /*
+ * Handling of references to the local document are done
+ * directly through ctxt->doc.
+ */
+ if (URL[0] == 0) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_TEXT_DOCUMENT,
+ "text serialization of document not available\n", NULL);
+ xmlFree(URL);
+ return(-1);
+ }
+
+ /*
+ * Prevent reloading twice the document.
+ */
+ for (i = 0; i < ctxt->txtNr; i++) {
+ if (xmlStrEqual(URL, ctxt->txturlTab[i])) {
+ node = xmlCopyNode(ctxt->txtTab[i], 1);
+ goto loaded;
+ }
+ }
+ /*
+ * Try to get the encoding if available
+ */
+ if ((ctxt->incTab[nr] != NULL) && (ctxt->incTab[nr]->ref != NULL)) {
+ encoding = xmlGetProp(ctxt->incTab[nr]->ref, XINCLUDE_PARSE_ENCODING);
+ }
+ if (encoding != NULL) {
+ /*
+ * TODO: we should not have to remap to the xmlCharEncoding
+ * predefined set, a better interface than
+ * xmlParserInputBufferCreateFilename should allow any
+ * encoding supported by iconv
+ */
+ enc = xmlParseCharEncoding((const char *) encoding);
+ if (enc == XML_CHAR_ENCODING_ERROR) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_UNKNOWN_ENCODING,
+ "encoding %s not supported\n", encoding);
+ xmlFree(encoding);
+ xmlFree(URL);
+ return(-1);
+ }
+ xmlFree(encoding);
+ }
+
+ /*
+ * Load it.
+ */
+ pctxt = xmlNewParserCtxt();
+ inputStream = xmlLoadExternalEntity((const char*)URL, NULL, pctxt);
+ if(inputStream == NULL) {
+ xmlFreeParserCtxt(pctxt);
+ xmlFree(URL);
+ return(-1);
+ }
+ buf = inputStream->buf;
+ if (buf == NULL) {
+ xmlFreeInputStream (inputStream);
+ xmlFreeParserCtxt(pctxt);
+ xmlFree(URL);
+ return(-1);
+ }
+ if (buf->encoder)
+ xmlCharEncCloseFunc(buf->encoder);
+ buf->encoder = xmlGetCharEncodingHandler(enc);
+ node = xmlNewText(NULL);
+
+ /*
+ * Scan all chars from the resource and add the to the node
+ */
+xinclude_multibyte_fallback:
+ while (xmlParserInputBufferRead(buf, 128) > 0) {
+ int len;
+ const xmlChar *content;
+
+ content = xmlBufContent(buf->buffer);
+ len = xmlBufLength(buf->buffer);
+ for (i = 0;i < len;) {
+ int cur;
+ int l;
+
+ cur = xmlStringCurrentChar(NULL, &content[i], &l);
+ if (!IS_CHAR(cur)) {
+ /* Handle splitted multibyte char at buffer boundary */
+ if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) {
+ xinclude_multibyte_fallback_used = 1;
+ xmlBufShrink(buf->buffer, i);
+ goto xinclude_multibyte_fallback;
+ } else {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_INVALID_CHAR,
+ "%s contains invalid char\n", URL);
+ xmlFreeParserInputBuffer(buf);
+ xmlFree(URL);
+ return(-1);
+ }
+ } else {
+ xinclude_multibyte_fallback_used = 0;
+ xmlNodeAddContentLen(node, &content[i], l);
+ }
+ i += l;
+ }
+ xmlBufShrink(buf->buffer, len);
+ }
+ xmlFreeParserCtxt(pctxt);
+ xmlXIncludeAddTxt(ctxt, node, URL);
+ xmlFreeInputStream(inputStream);
+
+loaded:
+ /*
+ * Add the element as the replacement copy.
+ */
+ ctxt->incTab[nr]->inc = node;
+ xmlFree(URL);
+ return(0);
+}
+
+/**
+ * xmlXIncludeLoadFallback:
+ * @ctxt: the XInclude context
+ * @fallback: the fallback node
+ * @nr: the xinclude node number
+ *
+ * Load the content of the fallback node, and store the result
+ * in the XInclude context
+ *
+ * Returns 0 in case of success, -1 in case of failure
+ */
+static int
+xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
+ xmlXIncludeCtxtPtr newctxt;
+ int ret = 0;
+
+ if ((fallback == NULL) || (fallback->type == XML_NAMESPACE_DECL) ||
+ (ctxt == NULL))
+ return(-1);
+ if (fallback->children != NULL) {
+ /*
+ * It's possible that the fallback also has 'includes'
+ * (Bug 129969), so we re-process the fallback just in case
+ */
+ newctxt = xmlXIncludeNewContext(ctxt->doc);
+ if (newctxt == NULL)
+ return (-1);
+ newctxt->_private = ctxt->_private;
+ newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */
+ xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
+ ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
+ if (ctxt->nbErrors > 0)
+ ret = -1;
+ else if (ret > 0)
+ ret = 0; /* xmlXIncludeDoProcess can return +ve number */
+ xmlXIncludeFreeContext(newctxt);
+
+ ctxt->incTab[nr]->inc = xmlDocCopyNodeList(ctxt->doc,
+ fallback->children);
+ } else {
+ ctxt->incTab[nr]->inc = NULL;
+ ctxt->incTab[nr]->emptyFb = 1; /* flag empty callback */
+ }
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * XInclude Processing *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXIncludePreProcessNode:
+ * @ctxt: an XInclude context
+ * @node: an XInclude node
+ *
+ * Implement the XInclude preprocessing, currently just adding the element
+ * for further processing.
+ *
+ * Returns the result list or NULL in case of error
+ */
+static xmlNodePtr
+xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
+ xmlXIncludeAddNode(ctxt, node);
+ return(NULL);
+}
+
+/**
+ * xmlXIncludeLoadNode:
+ * @ctxt: an XInclude context
+ * @nr: the node number
+ *
+ * Find and load the infoset replacement for the given node.
+ *
+ * Returns 0 if substitution succeeded, -1 if some processing failed
+ */
+static int
+xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
+ xmlNodePtr cur;
+ xmlChar *href;
+ xmlChar *parse;
+ xmlChar *base;
+ xmlChar *oldBase;
+ xmlChar *URI;
+ int xml = 1; /* default Issue 64 */
+ int ret;
+
+ if (ctxt == NULL)
+ return(-1);
+ if ((nr < 0) || (nr >= ctxt->incNr))
+ return(-1);
+ cur = ctxt->incTab[nr]->ref;
+ if (cur == NULL)
+ return(-1);
+
+ /*
+ * read the attributes
+ */
+ href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
+ if (href == NULL) {
+ href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
+ if (href == NULL)
+ return(-1);
+ }
+ parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
+ if (parse != NULL) {
+ if (xmlStrEqual(parse, XINCLUDE_PARSE_XML))
+ xml = 1;
+ else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT))
+ xml = 0;
+ else {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_PARSE_VALUE,
+ "invalid value %s for 'parse'\n", parse);
+ if (href != NULL)
+ xmlFree(href);
+ if (parse != NULL)
+ xmlFree(parse);
+ return(-1);
+ }
+ }
+
+ /*
+ * compute the URI
+ */
+ base = xmlNodeGetBase(ctxt->doc, cur);
+ if (base == NULL) {
+ URI = xmlBuildURI(href, ctxt->doc->URL);
+ } else {
+ URI = xmlBuildURI(href, base);
+ }
+ if (URI == NULL) {
+ xmlChar *escbase;
+ xmlChar *eschref;
+ /*
+ * Some escaping may be needed
+ */
+ escbase = xmlURIEscape(base);
+ eschref = xmlURIEscape(href);
+ URI = xmlBuildURI(eschref, escbase);
+ if (escbase != NULL)
+ xmlFree(escbase);
+ if (eschref != NULL)
+ xmlFree(eschref);
+ }
+ if (URI == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_HREF_URI, "failed build URL\n", NULL);
+ if (parse != NULL)
+ xmlFree(parse);
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ return(-1);
+ }
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "parse: %s\n",
+ xml ? "xml": "text");
+ xmlGenericError(xmlGenericErrorContext, "URI: %s\n", URI);
+#endif
+
+ /*
+ * Save the base for this include (saving the current one)
+ */
+ oldBase = ctxt->base;
+ ctxt->base = base;
+
+ if (xml) {
+ ret = xmlXIncludeLoadDoc(ctxt, URI, nr);
+ /* xmlXIncludeGetFragment(ctxt, cur, URI); */
+ } else {
+ ret = xmlXIncludeLoadTxt(ctxt, URI, nr);
+ }
+
+ /*
+ * Restore the original base before checking for fallback
+ */
+ ctxt->base = oldBase;
+
+ if (ret < 0) {
+ xmlNodePtr children;
+
+ /*
+ * Time to try a fallback if availble
+ */
+#ifdef DEBUG_XINCLUDE
+ xmlGenericError(xmlGenericErrorContext, "error looking for fallback\n");
+#endif
+ children = cur->children;
+ while (children != NULL) {
+ if ((children->type == XML_ELEMENT_NODE) &&
+ (children->ns != NULL) &&
+ (xmlStrEqual(children->name, XINCLUDE_FALLBACK)) &&
+ ((xmlStrEqual(children->ns->href, XINCLUDE_NS)) ||
+ (xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) {
+ ret = xmlXIncludeLoadFallback(ctxt, children, nr);
+ if (ret == 0)
+ break;
+ }
+ children = children->next;
+ }
+ }
+ if (ret < 0) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_NO_FALLBACK,
+ "could not load %s, and no fallback was found\n",
+ URI);
+ }
+
+ /*
+ * Cleanup
+ */
+ if (URI != NULL)
+ xmlFree(URI);
+ if (parse != NULL)
+ xmlFree(parse);
+ if (href != NULL)
+ xmlFree(href);
+ if (base != NULL)
+ xmlFree(base);
+ return(0);
+}
+
+/**
+ * xmlXIncludeIncludeNode:
+ * @ctxt: an XInclude context
+ * @nr: the node number
+ *
+ * Inplement the infoset replacement for the given node
+ *
+ * Returns 0 if substitution succeeded, -1 if some processing failed
+ */
+static int
+xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
+ xmlNodePtr cur, end, list, tmp;
+
+ if (ctxt == NULL)
+ return(-1);
+ if ((nr < 0) || (nr >= ctxt->incNr))
+ return(-1);
+ cur = ctxt->incTab[nr]->ref;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(-1);
+
+ /*
+ * If we stored an XPointer a late computation may be needed
+ */
+ if ((ctxt->incTab[nr]->inc == NULL) &&
+ (ctxt->incTab[nr]->xptr != NULL)) {
+ ctxt->incTab[nr]->inc =
+ xmlXIncludeCopyXPointer(ctxt, ctxt->doc, ctxt->doc,
+ ctxt->incTab[nr]->xptr);
+ xmlXPathFreeObject(ctxt->incTab[nr]->xptr);
+ ctxt->incTab[nr]->xptr = NULL;
+ }
+ list = ctxt->incTab[nr]->inc;
+ ctxt->incTab[nr]->inc = NULL;
+
+ /*
+ * Check against the risk of generating a multi-rooted document
+ */
+ if ((cur->parent != NULL) &&
+ (cur->parent->type != XML_ELEMENT_NODE)) {
+ int nb_elem = 0;
+
+ tmp = list;
+ while (tmp != NULL) {
+ if (tmp->type == XML_ELEMENT_NODE)
+ nb_elem++;
+ tmp = tmp->next;
+ }
+ if (nb_elem > 1) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_MULTIPLE_ROOT,
+ "XInclude error: would result in multiple root nodes\n",
+ NULL);
+ return(-1);
+ }
+ }
+
+ if (ctxt->parseFlags & XML_PARSE_NOXINCNODE) {
+ /*
+ * Add the list of nodes
+ */
+ while (list != NULL) {
+ end = list;
+ list = list->next;
+
+ xmlAddPrevSibling(cur, end);
+ }
+ xmlUnlinkNode(cur);
+ xmlFreeNode(cur);
+ } else {
+ /*
+ * Change the current node as an XInclude start one, and add an
+ * XInclude end one
+ */
+ cur->type = XML_XINCLUDE_START;
+ end = xmlNewDocNode(cur->doc, cur->ns, cur->name, NULL);
+ if (end == NULL) {
+ xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
+ XML_XINCLUDE_BUILD_FAILED,
+ "failed to build node\n", NULL);
+ return(-1);
+ }
+ end->type = XML_XINCLUDE_END;
+ xmlAddNextSibling(cur, end);
+
+ /*
+ * Add the list of nodes
+ */
+ while (list != NULL) {
+ cur = list;
+ list = list->next;
+
+ xmlAddPrevSibling(end, cur);
+ }
+ }
+
+
+ return(0);
+}
+
+/**
+ * xmlXIncludeTestNode:
+ * @ctxt: the XInclude processing context
+ * @node: an XInclude node
+ *
+ * test if the node is an XInclude node
+ *
+ * Returns 1 true, 0 otherwise
+ */
+static int
+xmlXIncludeTestNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
+ if (node == NULL)
+ return(0);
+ if (node->type != XML_ELEMENT_NODE)
+ return(0);
+ if (node->ns == NULL)
+ return(0);
+ if ((xmlStrEqual(node->ns->href, XINCLUDE_NS)) ||
+ (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS))) {
+ if (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS)) {
+ if (ctxt->legacy == 0) {
+#if 0 /* wait for the XML Core Working Group to get something stable ! */
+ xmlXIncludeWarn(ctxt, node, XML_XINCLUDE_DEPRECATED_NS,
+ "Deprecated XInclude namespace found, use %s",
+ XINCLUDE_NS);
+#endif
+ ctxt->legacy = 1;
+ }
+ }
+ if (xmlStrEqual(node->name, XINCLUDE_NODE)) {
+ xmlNodePtr child = node->children;
+ int nb_fallback = 0;
+
+ while (child != NULL) {
+ if ((child->type == XML_ELEMENT_NODE) &&
+ (child->ns != NULL) &&
+ ((xmlStrEqual(child->ns->href, XINCLUDE_NS)) ||
+ (xmlStrEqual(child->ns->href, XINCLUDE_OLD_NS)))) {
+ if (xmlStrEqual(child->name, XINCLUDE_NODE)) {
+ xmlXIncludeErr(ctxt, node,
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE,
+ "%s has an 'include' child\n",
+ XINCLUDE_NODE);
+ return(0);
+ }
+ if (xmlStrEqual(child->name, XINCLUDE_FALLBACK)) {
+ nb_fallback++;
+ }
+ }
+ child = child->next;
+ }
+ if (nb_fallback > 1) {
+ xmlXIncludeErr(ctxt, node, XML_XINCLUDE_FALLBACKS_IN_INCLUDE,
+ "%s has multiple fallback children\n",
+ XINCLUDE_NODE);
+ return(0);
+ }
+ return(1);
+ }
+ if (xmlStrEqual(node->name, XINCLUDE_FALLBACK)) {
+ if ((node->parent == NULL) ||
+ (node->parent->type != XML_ELEMENT_NODE) ||
+ (node->parent->ns == NULL) ||
+ ((!xmlStrEqual(node->parent->ns->href, XINCLUDE_NS)) &&
+ (!xmlStrEqual(node->parent->ns->href, XINCLUDE_OLD_NS))) ||
+ (!xmlStrEqual(node->parent->name, XINCLUDE_NODE))) {
+ xmlXIncludeErr(ctxt, node,
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE,
+ "%s is not the child of an 'include'\n",
+ XINCLUDE_FALLBACK);
+ }
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlXIncludeDoProcess:
+ * @ctxt: the XInclude processing context
+ * @doc: an XML document
+ * @tree: the top of the tree to process
+ *
+ * Implement the XInclude substitution on the XML document @doc
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+static int
+xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
+ xmlNodePtr cur;
+ int ret = 0;
+ int i, start;
+
+ if ((doc == NULL) || (tree == NULL) || (tree->type == XML_NAMESPACE_DECL))
+ return(-1);
+ if (ctxt == NULL)
+ return(-1);
+
+ if (doc->URL != NULL) {
+ ret = xmlXIncludeURLPush(ctxt, doc->URL);
+ if (ret < 0)
+ return(-1);
+ }
+ start = ctxt->incNr;
+
+ /*
+ * First phase: lookup the elements in the document
+ */
+ cur = tree;
+ if (xmlXIncludeTestNode(ctxt, cur) == 1)
+ xmlXIncludePreProcessNode(ctxt, cur);
+ while ((cur != NULL) && (cur != tree->parent)) {
+ /* TODO: need to work on entities -> stack */
+ if ((cur->children != NULL) &&
+ (cur->children->type != XML_ENTITY_DECL) &&
+ (cur->children->type != XML_XINCLUDE_START) &&
+ (cur->children->type != XML_XINCLUDE_END)) {
+ cur = cur->children;
+ if (xmlXIncludeTestNode(ctxt, cur))
+ xmlXIncludePreProcessNode(ctxt, cur);
+ } else if (cur->next != NULL) {
+ cur = cur->next;
+ if (xmlXIncludeTestNode(ctxt, cur))
+ xmlXIncludePreProcessNode(ctxt, cur);
+ } else {
+ if (cur == tree)
+ break;
+ do {
+ cur = cur->parent;
+ if ((cur == NULL) || (cur == tree->parent))
+ break; /* do */
+ if (cur->next != NULL) {
+ cur = cur->next;
+ if (xmlXIncludeTestNode(ctxt, cur))
+ xmlXIncludePreProcessNode(ctxt, cur);
+ break; /* do */
+ }
+ } while (cur != NULL);
+ }
+ }
+
+ /*
+ * Second Phase : collect the infosets fragments
+ */
+ for (i = start;i < ctxt->incNr; i++) {
+ xmlXIncludeLoadNode(ctxt, i);
+ ret++;
+ }
+
+ /*
+ * Third phase: extend the original document infoset.
+ *
+ * Originally we bypassed the inclusion if there were any errors
+ * encountered on any of the XIncludes. A bug was raised (bug
+ * 132588) requesting that we output the XIncludes without error,
+ * so the check for inc!=NULL || xptr!=NULL was put in. This may
+ * give some other problems in the future, but for now it seems to
+ * work ok.
+ *
+ */
+ for (i = ctxt->incBase;i < ctxt->incNr; i++) {
+ if ((ctxt->incTab[i]->inc != NULL) ||
+ (ctxt->incTab[i]->xptr != NULL) ||
+ (ctxt->incTab[i]->emptyFb != 0)) /* (empty fallback) */
+ xmlXIncludeIncludeNode(ctxt, i);
+ }
+
+ if (doc->URL != NULL)
+ xmlXIncludeURLPop(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlXIncludeSetFlags:
+ * @ctxt: an XInclude processing context
+ * @flags: a set of xmlParserOption used for parsing XML includes
+ *
+ * Set the flags used for further processing of XML resources.
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) {
+ if (ctxt == NULL)
+ return(-1);
+ ctxt->parseFlags = flags;
+ return(0);
+}
+
+/**
+ * xmlXIncludeProcessTreeFlagsData:
+ * @tree: an XML node
+ * @flags: a set of xmlParserOption used for parsing XML includes
+ * @data: application data that will be passed to the parser context
+ * in the _private field of the parser context(s)
+ *
+ * Implement the XInclude substitution on the XML node @tree
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+
+int
+xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data) {
+ xmlXIncludeCtxtPtr ctxt;
+ int ret = 0;
+
+ if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
+ (tree->doc == NULL))
+ return(-1);
+
+ ctxt = xmlXIncludeNewContext(tree->doc);
+ if (ctxt == NULL)
+ return(-1);
+ ctxt->_private = data;
+ ctxt->base = xmlStrdup((xmlChar *)tree->doc->URL);
+ xmlXIncludeSetFlags(ctxt, flags);
+ ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree);
+ if ((ret >= 0) && (ctxt->nbErrors > 0))
+ ret = -1;
+
+ xmlXIncludeFreeContext(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlXIncludeProcessFlagsData:
+ * @doc: an XML document
+ * @flags: a set of xmlParserOption used for parsing XML includes
+ * @data: application data that will be passed to the parser context
+ * in the _private field of the parser context(s)
+ *
+ * Implement the XInclude substitution on the XML document @doc
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data) {
+ xmlNodePtr tree;
+
+ if (doc == NULL)
+ return(-1);
+ tree = xmlDocGetRootElement(doc);
+ if (tree == NULL)
+ return(-1);
+ return(xmlXIncludeProcessTreeFlagsData(tree, flags, data));
+}
+
+/**
+ * xmlXIncludeProcessFlags:
+ * @doc: an XML document
+ * @flags: a set of xmlParserOption used for parsing XML includes
+ *
+ * Implement the XInclude substitution on the XML document @doc
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcessFlags(xmlDocPtr doc, int flags) {
+ return xmlXIncludeProcessFlagsData(doc, flags, NULL);
+}
+
+/**
+ * xmlXIncludeProcess:
+ * @doc: an XML document
+ *
+ * Implement the XInclude substitution on the XML document @doc
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcess(xmlDocPtr doc) {
+ return(xmlXIncludeProcessFlags(doc, 0));
+}
+
+/**
+ * xmlXIncludeProcessTreeFlags:
+ * @tree: a node in an XML document
+ * @flags: a set of xmlParserOption used for parsing XML includes
+ *
+ * Implement the XInclude substitution for the given subtree
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags) {
+ xmlXIncludeCtxtPtr ctxt;
+ int ret = 0;
+
+ if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
+ (tree->doc == NULL))
+ return(-1);
+ ctxt = xmlXIncludeNewContext(tree->doc);
+ if (ctxt == NULL)
+ return(-1);
+ ctxt->base = xmlNodeGetBase(tree->doc, tree);
+ xmlXIncludeSetFlags(ctxt, flags);
+ ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree);
+ if ((ret >= 0) && (ctxt->nbErrors > 0))
+ ret = -1;
+
+ xmlXIncludeFreeContext(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlXIncludeProcessTree:
+ * @tree: a node in an XML document
+ *
+ * Implement the XInclude substitution for the given subtree
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcessTree(xmlNodePtr tree) {
+ return(xmlXIncludeProcessTreeFlags(tree, 0));
+}
+
+/**
+ * xmlXIncludeProcessNode:
+ * @ctxt: an existing XInclude context
+ * @node: a node in an XML document
+ *
+ * Implement the XInclude substitution for the given subtree reusing
+ * the informations and data coming from the given context.
+ *
+ * Returns 0 if no substitution were done, -1 if some processing failed
+ * or the number of substitutions done.
+ */
+int
+xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
+ int ret = 0;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) ||
+ (node->doc == NULL) || (ctxt == NULL))
+ return(-1);
+ ret = xmlXIncludeDoProcess(ctxt, node->doc, node);
+ if ((ret >= 0) && (ctxt->nbErrors > 0))
+ ret = -1;
+ return(ret);
+}
+
+#else /* !LIBXML_XINCLUDE_ENABLED */
+#endif
+#define bottom_xinclude
+#include "elfgcchack.h"
diff --git a/xlink.c b/xlink.c
new file mode 100644
index 0000000..c0e4ff3
--- /dev/null
+++ b/xlink.c
@@ -0,0 +1,183 @@
+/*
+ * xlink.c : implementation of the hyperlinks detection module
+ * This version supports both XML XLinks and HTML simple links
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_XPTR_ENABLED
+#include <string.h> /* for memset() only */
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/valid.h>
+#include <libxml/xlink.h>
+#include <libxml/globals.h>
+
+#define XLINK_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xlink/namespace/")
+#define XHTML_NAMESPACE (BAD_CAST "http://www.w3.org/1999/xhtml/")
+
+/****************************************************************
+ * *
+ * Default setting and related functions *
+ * *
+ ****************************************************************/
+
+static xlinkHandlerPtr xlinkDefaultHandler = NULL;
+static xlinkNodeDetectFunc xlinkDefaultDetect = NULL;
+
+/**
+ * xlinkGetDefaultHandler:
+ *
+ * Get the default xlink handler.
+ *
+ * Returns the current xlinkHandlerPtr value.
+ */
+xlinkHandlerPtr
+xlinkGetDefaultHandler(void) {
+ return(xlinkDefaultHandler);
+}
+
+
+/**
+ * xlinkSetDefaultHandler:
+ * @handler: the new value for the xlink handler block
+ *
+ * Set the default xlink handlers
+ */
+void
+xlinkSetDefaultHandler(xlinkHandlerPtr handler) {
+ xlinkDefaultHandler = handler;
+}
+
+/**
+ * xlinkGetDefaultDetect:
+ *
+ * Get the default xlink detection routine
+ *
+ * Returns the current function or NULL;
+ */
+xlinkNodeDetectFunc
+xlinkGetDefaultDetect (void) {
+ return(xlinkDefaultDetect);
+}
+
+/**
+ * xlinkSetDefaultDetect:
+ * @func: pointer to the new detection routine.
+ *
+ * Set the default xlink detection routine
+ */
+void
+xlinkSetDefaultDetect (xlinkNodeDetectFunc func) {
+ xlinkDefaultDetect = func;
+}
+
+/****************************************************************
+ * *
+ * The detection routines *
+ * *
+ ****************************************************************/
+
+
+/**
+ * xlinkIsLink:
+ * @doc: the document containing the node
+ * @node: the node pointer itself
+ *
+ * Check whether the given node carries the attributes needed
+ * to be a link element (or is one of the linking elements issued
+ * from the (X)HTML DtDs).
+ * This routine don't try to do full checking of the link validity
+ * but tries to detect and return the appropriate link type.
+ *
+ * Returns the xlinkType of the node (XLINK_TYPE_NONE if there is no
+ * link detected.
+ */
+xlinkType
+xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
+ xmlChar *type = NULL, *role = NULL;
+ xlinkType ret = XLINK_TYPE_NONE;
+
+ if (node == NULL) return(XLINK_TYPE_NONE);
+ if (doc == NULL) doc = node->doc;
+ if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
+ /*
+ * This is an HTML document.
+ */
+ } else if ((node->ns != NULL) &&
+ (xmlStrEqual(node->ns->href, XHTML_NAMESPACE))) {
+ /*
+ * !!!! We really need an IS_XHTML_ELEMENT function from HTMLtree.h @@@
+ */
+ /*
+ * This is an XHTML element within an XML document
+ * Check whether it's one of the element able to carry links
+ * and in that case if it holds the attributes.
+ */
+ }
+
+ /*
+ * We don't prevent a-priori having XML Linking constructs on
+ * XHTML elements
+ */
+ type = xmlGetNsProp(node, BAD_CAST"type", XLINK_NAMESPACE);
+ if (type != NULL) {
+ if (xmlStrEqual(type, BAD_CAST "simple")) {
+ ret = XLINK_TYPE_SIMPLE;
+ } else if (xmlStrEqual(type, BAD_CAST "extended")) {
+ role = xmlGetNsProp(node, BAD_CAST "role", XLINK_NAMESPACE);
+ if (role != NULL) {
+ xmlNsPtr xlink;
+ xlink = xmlSearchNs(doc, node, XLINK_NAMESPACE);
+ if (xlink == NULL) {
+ /* Humm, fallback method */
+ if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
+ ret = XLINK_TYPE_EXTENDED_SET;
+ } else {
+ xmlChar buf[200];
+ snprintf((char *) buf, sizeof(buf), "%s:external-linkset",
+ (char *) xlink->prefix);
+ buf[sizeof(buf) - 1] = 0;
+ if (xmlStrEqual(role, buf))
+ ret = XLINK_TYPE_EXTENDED_SET;
+
+ }
+
+ }
+ ret = XLINK_TYPE_EXTENDED;
+ }
+ }
+
+ if (type != NULL) xmlFree(type);
+ if (role != NULL) xmlFree(role);
+ return(ret);
+}
+#endif /* LIBXML_XPTR_ENABLED */
+#define bottom_xlink
+#include "elfgcchack.h"
diff --git a/xml2-config.1 b/xml2-config.1
new file mode 100644
index 0000000..8cf9858
--- /dev/null
+++ b/xml2-config.1
@@ -0,0 +1,30 @@
+.TH GNOME-XML 1 "3 July 1999" Version 1.1.0
+.SH NAME
+xml-config - script to get information about the installed version of GNOME-XML
+.SH SYNOPSIS
+.B xml-config
+[\-\-prefix\fI[=DIR]\fP] [\-\-libs] [\-\-cflags] [\-\-version] [\-\-help]
+.SH DESCRIPTION
+\fIxml-config\fP is a tool that is used to determine the compile and
+linker flags that should be used to compile and link programs that use
+\fIGNOME-XML\fP.
+.SH OPTIONS
+\fIxml-config\fP accepts the following options:
+.TP 8
+.B \-\-version
+Print the currently installed version of \fIGNOME-XML\fP on the standard output.
+.TP 8
+.B \-\-libs
+Print the linker flags that are necessary to link a \fIGNOME-XML\fP program.
+.TP 8
+.B \-\-cflags
+Print the compiler flags that are necessary to compile a \fIGNOME-XML\fP program.
+.TP 8
+.B \-\-prefix=PREFIX
+If specified, use PREFIX instead of the installation prefix that
+\fIGNOME-XML\fP was built with when computing the output for the
+\-\-cflags and \-\-libs options. This option must be specified before
+any \-\-libs or \-\-cflags options.
+.SH AUTHOR
+This manual page was written by Fredrik Hallenberg <hallon@lysator.liu.se>,
+for the Debian GNU/linux system (but may be used by others).
diff --git a/xml2-config.in b/xml2-config.in
new file mode 100644
index 0000000..1957486
--- /dev/null
+++ b/xml2-config.in
@@ -0,0 +1,106 @@
+#! /bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+usage()
+{
+ cat <<EOF
+Usage: xml2-config [OPTION]
+
+Known values for OPTION are:
+
+ --prefix=DIR change libxml prefix [default $prefix]
+ --exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
+ --libs print library linking information
+ --cflags print pre-processor and compiler flags
+ --modules module support enabled
+ --help display this help and exit
+ --version output version information
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --prefix=*)
+ prefix=$optarg
+ includedir=$prefix/include
+ libdir=$prefix/lib
+ ;;
+
+ --prefix)
+ echo $prefix
+ ;;
+
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ libdir=$exec_prefix/lib
+ ;;
+
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --cflags)
+ echo @XML_INCLUDEDIR@ @XML_CFLAGS@
+ ;;
+
+ --libtool-libs)
+ if [ -r ${libdir}/@XML_LIBTOOLLIBS@ ]
+ then
+ echo ${libdir}/@XML_LIBTOOLLIBS@
+ fi
+ ;;
+
+ --modules)
+ echo @WITH_MODULES@
+ ;;
+
+ --libs)
+ if [ "`uname`" = "Linux" ]
+ then
+ if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
+ then
+ echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
+ else
+ echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
+ fi
+ else
+ echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ @WIN32_EXTRA_LIBADD@
+ fi
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0
diff --git a/xml2Conf.sh.in b/xml2Conf.sh.in
new file mode 100644
index 0000000..08cb233
--- /dev/null
+++ b/xml2Conf.sh.in
@@ -0,0 +1,8 @@
+#
+# Configuration file for using the XML library in GNOME applications
+#
+XML2_LIBDIR="@XML_LIBDIR@"
+XML2_LIBS="@XML_LIBS@"
+XML2_INCLUDEDIR="@XML_INCLUDEDIR@"
+MODULE_VERSION="xml2-@VERSION@"
+
diff --git a/xmlIO.c b/xmlIO.c
new file mode 100644
index 0000000..e628ab0
--- /dev/null
+++ b/xmlIO.c
@@ -0,0 +1,4186 @@
+/*
+ * xmlIO.c : implementation of the I/O interfaces used by the parser
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ *
+ * 14 Nov 2000 ht - for VMS, truncated name of long functions to under 32 char
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+#ifdef HAVE_LZMA_H
+#include <lzma.h>
+#endif
+
+#if defined(WIN32) || defined(_WIN32)
+#include <windows.h>
+#endif
+
+#if defined(_WIN32_WCE)
+#include <winnls.h> /* for CP_UTF8 */
+#endif
+
+/* Figure a portable way to know if a file is a directory. */
+#ifndef HAVE_STAT
+# ifdef HAVE__STAT
+ /* MS C library seems to define stat and _stat. The definition
+ is identical. Still, mapping them to each other causes a warning. */
+# ifndef _MSC_VER
+# define stat(x,y) _stat(x,y)
+# endif
+# define HAVE_STAT
+# endif
+#else
+# ifdef HAVE__STAT
+# if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+# define stat _stat
+# endif
+# endif
+#endif
+#ifdef HAVE_STAT
+# ifndef S_ISDIR
+# ifdef _S_ISDIR
+# define S_ISDIR(x) _S_ISDIR(x)
+# else
+# ifdef S_IFDIR
+# ifndef S_IFMT
+# ifdef _S_IFMT
+# define S_IFMT _S_IFMT
+# endif
+# endif
+# ifdef S_IFMT
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlIO.h>
+#include <libxml/uri.h>
+#include <libxml/nanohttp.h>
+#include <libxml/nanoftp.h>
+#include <libxml/xmlerror.h>
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
+#include <libxml/globals.h>
+
+#include "buf.h"
+#include "enc.h"
+
+/* #define VERBOSE_FAILURE */
+/* #define DEBUG_EXTERNAL_ENTITIES */
+/* #define DEBUG_INPUT */
+
+#ifdef DEBUG_INPUT
+#define MINLEN 40
+#else
+#define MINLEN 4000
+#endif
+
+/*
+ * Input I/O callback sets
+ */
+typedef struct _xmlInputCallback {
+ xmlInputMatchCallback matchcallback;
+ xmlInputOpenCallback opencallback;
+ xmlInputReadCallback readcallback;
+ xmlInputCloseCallback closecallback;
+} xmlInputCallback;
+
+#define MAX_INPUT_CALLBACK 15
+
+static xmlInputCallback xmlInputCallbackTable[MAX_INPUT_CALLBACK];
+static int xmlInputCallbackNr = 0;
+static int xmlInputCallbackInitialized = 0;
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Output I/O callback sets
+ */
+typedef struct _xmlOutputCallback {
+ xmlOutputMatchCallback matchcallback;
+ xmlOutputOpenCallback opencallback;
+ xmlOutputWriteCallback writecallback;
+ xmlOutputCloseCallback closecallback;
+} xmlOutputCallback;
+
+#define MAX_OUTPUT_CALLBACK 15
+
+static xmlOutputCallback xmlOutputCallbackTable[MAX_OUTPUT_CALLBACK];
+static int xmlOutputCallbackNr = 0;
+static int xmlOutputCallbackInitialized = 0;
+
+xmlOutputBufferPtr
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Tree memory error handler *
+ * *
+ ************************************************************************/
+
+static const char *IOerr[] = {
+ "Unknown IO error", /* UNKNOWN */
+ "Permission denied", /* EACCES */
+ "Resource temporarily unavailable",/* EAGAIN */
+ "Bad file descriptor", /* EBADF */
+ "Bad message", /* EBADMSG */
+ "Resource busy", /* EBUSY */
+ "Operation canceled", /* ECANCELED */
+ "No child processes", /* ECHILD */
+ "Resource deadlock avoided",/* EDEADLK */
+ "Domain error", /* EDOM */
+ "File exists", /* EEXIST */
+ "Bad address", /* EFAULT */
+ "File too large", /* EFBIG */
+ "Operation in progress", /* EINPROGRESS */
+ "Interrupted function call",/* EINTR */
+ "Invalid argument", /* EINVAL */
+ "Input/output error", /* EIO */
+ "Is a directory", /* EISDIR */
+ "Too many open files", /* EMFILE */
+ "Too many links", /* EMLINK */
+ "Inappropriate message buffer length",/* EMSGSIZE */
+ "Filename too long", /* ENAMETOOLONG */
+ "Too many open files in system",/* ENFILE */
+ "No such device", /* ENODEV */
+ "No such file or directory",/* ENOENT */
+ "Exec format error", /* ENOEXEC */
+ "No locks available", /* ENOLCK */
+ "Not enough space", /* ENOMEM */
+ "No space left on device", /* ENOSPC */
+ "Function not implemented", /* ENOSYS */
+ "Not a directory", /* ENOTDIR */
+ "Directory not empty", /* ENOTEMPTY */
+ "Not supported", /* ENOTSUP */
+ "Inappropriate I/O control operation",/* ENOTTY */
+ "No such device or address",/* ENXIO */
+ "Operation not permitted", /* EPERM */
+ "Broken pipe", /* EPIPE */
+ "Result too large", /* ERANGE */
+ "Read-only file system", /* EROFS */
+ "Invalid seek", /* ESPIPE */
+ "No such process", /* ESRCH */
+ "Operation timed out", /* ETIMEDOUT */
+ "Improper link", /* EXDEV */
+ "Attempt to load network entity %s", /* XML_IO_NETWORK_ATTEMPT */
+ "encoder error", /* XML_IO_ENCODER */
+ "flush error",
+ "write error",
+ "no input",
+ "buffer full",
+ "loading error",
+ "not a socket", /* ENOTSOCK */
+ "already connected", /* EISCONN */
+ "connection refused", /* ECONNREFUSED */
+ "unreachable network", /* ENETUNREACH */
+ "adddress in use", /* EADDRINUSE */
+ "already in use", /* EALREADY */
+ "unknown address familly", /* EAFNOSUPPORT */
+};
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+/**
+ * __xmlIOWin32UTF8ToWChar:
+ * @u8String: uft-8 string
+ *
+ * Convert a string from utf-8 to wchar (WINDOWS ONLY!)
+ */
+static wchar_t *
+__xmlIOWin32UTF8ToWChar(const char *u8String)
+{
+ wchar_t *wString = NULL;
+
+ if (u8String) {
+ int wLen =
+ MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, u8String,
+ -1, NULL, 0);
+ if (wLen) {
+ wString = xmlMalloc(wLen * sizeof(wchar_t));
+ if (wString) {
+ if (MultiByteToWideChar
+ (CP_UTF8, 0, u8String, -1, wString, wLen) == 0) {
+ xmlFree(wString);
+ wString = NULL;
+ }
+ }
+ }
+ }
+
+ return wString;
+}
+#endif
+
+/**
+ * xmlIOErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlIOErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_IO, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * __xmlIOErr:
+ * @code: the error number
+ * @
+ * @extra: extra informations
+ *
+ * Handle an I/O error
+ */
+void
+__xmlIOErr(int domain, int code, const char *extra)
+{
+ unsigned int idx;
+
+ if (code == 0) {
+#ifdef HAVE_ERRNO_H
+ if (errno == 0) code = 0;
+#ifdef EACCES
+ else if (errno == EACCES) code = XML_IO_EACCES;
+#endif
+#ifdef EAGAIN
+ else if (errno == EAGAIN) code = XML_IO_EAGAIN;
+#endif
+#ifdef EBADF
+ else if (errno == EBADF) code = XML_IO_EBADF;
+#endif
+#ifdef EBADMSG
+ else if (errno == EBADMSG) code = XML_IO_EBADMSG;
+#endif
+#ifdef EBUSY
+ else if (errno == EBUSY) code = XML_IO_EBUSY;
+#endif
+#ifdef ECANCELED
+ else if (errno == ECANCELED) code = XML_IO_ECANCELED;
+#endif
+#ifdef ECHILD
+ else if (errno == ECHILD) code = XML_IO_ECHILD;
+#endif
+#ifdef EDEADLK
+ else if (errno == EDEADLK) code = XML_IO_EDEADLK;
+#endif
+#ifdef EDOM
+ else if (errno == EDOM) code = XML_IO_EDOM;
+#endif
+#ifdef EEXIST
+ else if (errno == EEXIST) code = XML_IO_EEXIST;
+#endif
+#ifdef EFAULT
+ else if (errno == EFAULT) code = XML_IO_EFAULT;
+#endif
+#ifdef EFBIG
+ else if (errno == EFBIG) code = XML_IO_EFBIG;
+#endif
+#ifdef EINPROGRESS
+ else if (errno == EINPROGRESS) code = XML_IO_EINPROGRESS;
+#endif
+#ifdef EINTR
+ else if (errno == EINTR) code = XML_IO_EINTR;
+#endif
+#ifdef EINVAL
+ else if (errno == EINVAL) code = XML_IO_EINVAL;
+#endif
+#ifdef EIO
+ else if (errno == EIO) code = XML_IO_EIO;
+#endif
+#ifdef EISDIR
+ else if (errno == EISDIR) code = XML_IO_EISDIR;
+#endif
+#ifdef EMFILE
+ else if (errno == EMFILE) code = XML_IO_EMFILE;
+#endif
+#ifdef EMLINK
+ else if (errno == EMLINK) code = XML_IO_EMLINK;
+#endif
+#ifdef EMSGSIZE
+ else if (errno == EMSGSIZE) code = XML_IO_EMSGSIZE;
+#endif
+#ifdef ENAMETOOLONG
+ else if (errno == ENAMETOOLONG) code = XML_IO_ENAMETOOLONG;
+#endif
+#ifdef ENFILE
+ else if (errno == ENFILE) code = XML_IO_ENFILE;
+#endif
+#ifdef ENODEV
+ else if (errno == ENODEV) code = XML_IO_ENODEV;
+#endif
+#ifdef ENOENT
+ else if (errno == ENOENT) code = XML_IO_ENOENT;
+#endif
+#ifdef ENOEXEC
+ else if (errno == ENOEXEC) code = XML_IO_ENOEXEC;
+#endif
+#ifdef ENOLCK
+ else if (errno == ENOLCK) code = XML_IO_ENOLCK;
+#endif
+#ifdef ENOMEM
+ else if (errno == ENOMEM) code = XML_IO_ENOMEM;
+#endif
+#ifdef ENOSPC
+ else if (errno == ENOSPC) code = XML_IO_ENOSPC;
+#endif
+#ifdef ENOSYS
+ else if (errno == ENOSYS) code = XML_IO_ENOSYS;
+#endif
+#ifdef ENOTDIR
+ else if (errno == ENOTDIR) code = XML_IO_ENOTDIR;
+#endif
+#ifdef ENOTEMPTY
+ else if (errno == ENOTEMPTY) code = XML_IO_ENOTEMPTY;
+#endif
+#ifdef ENOTSUP
+ else if (errno == ENOTSUP) code = XML_IO_ENOTSUP;
+#endif
+#ifdef ENOTTY
+ else if (errno == ENOTTY) code = XML_IO_ENOTTY;
+#endif
+#ifdef ENXIO
+ else if (errno == ENXIO) code = XML_IO_ENXIO;
+#endif
+#ifdef EPERM
+ else if (errno == EPERM) code = XML_IO_EPERM;
+#endif
+#ifdef EPIPE
+ else if (errno == EPIPE) code = XML_IO_EPIPE;
+#endif
+#ifdef ERANGE
+ else if (errno == ERANGE) code = XML_IO_ERANGE;
+#endif
+#ifdef EROFS
+ else if (errno == EROFS) code = XML_IO_EROFS;
+#endif
+#ifdef ESPIPE
+ else if (errno == ESPIPE) code = XML_IO_ESPIPE;
+#endif
+#ifdef ESRCH
+ else if (errno == ESRCH) code = XML_IO_ESRCH;
+#endif
+#ifdef ETIMEDOUT
+ else if (errno == ETIMEDOUT) code = XML_IO_ETIMEDOUT;
+#endif
+#ifdef EXDEV
+ else if (errno == EXDEV) code = XML_IO_EXDEV;
+#endif
+#ifdef ENOTSOCK
+ else if (errno == ENOTSOCK) code = XML_IO_ENOTSOCK;
+#endif
+#ifdef EISCONN
+ else if (errno == EISCONN) code = XML_IO_EISCONN;
+#endif
+#ifdef ECONNREFUSED
+ else if (errno == ECONNREFUSED) code = XML_IO_ECONNREFUSED;
+#endif
+#ifdef ETIMEDOUT
+ else if (errno == ETIMEDOUT) code = XML_IO_ETIMEDOUT;
+#endif
+#ifdef ENETUNREACH
+ else if (errno == ENETUNREACH) code = XML_IO_ENETUNREACH;
+#endif
+#ifdef EADDRINUSE
+ else if (errno == EADDRINUSE) code = XML_IO_EADDRINUSE;
+#endif
+#ifdef EINPROGRESS
+ else if (errno == EINPROGRESS) code = XML_IO_EINPROGRESS;
+#endif
+#ifdef EALREADY
+ else if (errno == EALREADY) code = XML_IO_EALREADY;
+#endif
+#ifdef EAFNOSUPPORT
+ else if (errno == EAFNOSUPPORT) code = XML_IO_EAFNOSUPPORT;
+#endif
+ else code = XML_IO_UNKNOWN;
+#endif /* HAVE_ERRNO_H */
+ }
+ idx = 0;
+ if (code >= XML_IO_UNKNOWN) idx = code - XML_IO_UNKNOWN;
+ if (idx >= (sizeof(IOerr) / sizeof(IOerr[0]))) idx = 0;
+
+ __xmlSimpleError(domain, code, NULL, IOerr[idx], extra);
+}
+
+/**
+ * xmlIOErr:
+ * @code: the error number
+ * @extra: extra informations
+ *
+ * Handle an I/O error
+ */
+static void
+xmlIOErr(int code, const char *extra)
+{
+ __xmlIOErr(XML_FROM_IO, code, extra);
+}
+
+/**
+ * __xmlLoaderErr:
+ * @ctx: the parser context
+ * @extra: extra informations
+ *
+ * Handle a resource access error
+ */
+void
+__xmlLoaderErr(void *ctx, const char *msg, const char *filename)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+ xmlErrorLevel level = XML_ERR_ERROR;
+
+ if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+ (ctxt->instate == XML_PARSER_EOF))
+ return;
+ if ((ctxt != NULL) && (ctxt->sax != NULL)) {
+ if (ctxt->validate) {
+ channel = ctxt->sax->error;
+ level = XML_ERR_ERROR;
+ } else {
+ channel = ctxt->sax->warning;
+ level = XML_ERR_WARNING;
+ }
+ if (ctxt->sax->initialized == XML_SAX2_MAGIC)
+ schannel = ctxt->sax->serror;
+ data = ctxt->userData;
+ }
+ __xmlRaiseError(schannel, channel, data, ctxt, NULL, XML_FROM_IO,
+ XML_IO_LOAD_ERROR, level, NULL, 0,
+ filename, NULL, NULL, 0, 0,
+ msg, filename);
+
+}
+
+/************************************************************************
+ * *
+ * Tree memory error handler *
+ * *
+ ************************************************************************/
+/**
+ * xmlNormalizeWindowsPath:
+ * @path: the input file path
+ *
+ * This function is obsolete. Please see xmlURIFromPath in uri.c for
+ * a better solution.
+ *
+ * Returns a canonicalized version of the path
+ */
+xmlChar *
+xmlNormalizeWindowsPath(const xmlChar *path)
+{
+ return xmlCanonicPath(path);
+}
+
+/**
+ * xmlCleanupInputCallbacks:
+ *
+ * clears the entire input callback table. this includes the
+ * compiled-in I/O.
+ */
+void
+xmlCleanupInputCallbacks(void)
+{
+ int i;
+
+ if (!xmlInputCallbackInitialized)
+ return;
+
+ for (i = xmlInputCallbackNr - 1; i >= 0; i--) {
+ xmlInputCallbackTable[i].matchcallback = NULL;
+ xmlInputCallbackTable[i].opencallback = NULL;
+ xmlInputCallbackTable[i].readcallback = NULL;
+ xmlInputCallbackTable[i].closecallback = NULL;
+ }
+
+ xmlInputCallbackNr = 0;
+ xmlInputCallbackInitialized = 0;
+}
+
+/**
+ * xmlPopInputCallbacks:
+ *
+ * Clear the top input callback from the input stack. this includes the
+ * compiled-in I/O.
+ *
+ * Returns the number of input callback registered or -1 in case of error.
+ */
+int
+xmlPopInputCallbacks(void)
+{
+ if (!xmlInputCallbackInitialized)
+ return(-1);
+
+ if (xmlInputCallbackNr <= 0)
+ return(-1);
+
+ xmlInputCallbackNr--;
+ xmlInputCallbackTable[xmlInputCallbackNr].matchcallback = NULL;
+ xmlInputCallbackTable[xmlInputCallbackNr].opencallback = NULL;
+ xmlInputCallbackTable[xmlInputCallbackNr].readcallback = NULL;
+ xmlInputCallbackTable[xmlInputCallbackNr].closecallback = NULL;
+
+ return(xmlInputCallbackNr);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlCleanupOutputCallbacks:
+ *
+ * clears the entire output callback table. this includes the
+ * compiled-in I/O callbacks.
+ */
+void
+xmlCleanupOutputCallbacks(void)
+{
+ int i;
+
+ if (!xmlOutputCallbackInitialized)
+ return;
+
+ for (i = xmlOutputCallbackNr - 1; i >= 0; i--) {
+ xmlOutputCallbackTable[i].matchcallback = NULL;
+ xmlOutputCallbackTable[i].opencallback = NULL;
+ xmlOutputCallbackTable[i].writecallback = NULL;
+ xmlOutputCallbackTable[i].closecallback = NULL;
+ }
+
+ xmlOutputCallbackNr = 0;
+ xmlOutputCallbackInitialized = 0;
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Standard I/O for file accesses *
+ * *
+ ************************************************************************/
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+
+/**
+ * xmlWrapOpenUtf8:
+ * @path: the path in utf-8 encoding
+ * @mode: type of access (0 - read, 1 - write)
+ *
+ * function opens the file specified by @path
+ *
+ */
+static FILE*
+xmlWrapOpenUtf8(const char *path,int mode)
+{
+ FILE *fd = NULL;
+ wchar_t *wPath;
+
+ wPath = __xmlIOWin32UTF8ToWChar(path);
+ if(wPath)
+ {
+ fd = _wfopen(wPath, mode ? L"wb" : L"rb");
+ xmlFree(wPath);
+ }
+ /* maybe path in native encoding */
+ if(fd == NULL)
+ fd = fopen(path, mode ? "wb" : "rb");
+
+ return fd;
+}
+
+#ifdef HAVE_ZLIB_H
+static gzFile
+xmlWrapGzOpenUtf8(const char *path, const char *mode)
+{
+ gzFile fd;
+ wchar_t *wPath;
+
+ fd = gzopen (path, mode);
+ if (fd)
+ return fd;
+
+ wPath = __xmlIOWin32UTF8ToWChar(path);
+ if(wPath)
+ {
+ int d, m = (strstr(mode, "r") ? O_RDONLY : O_RDWR);
+#ifdef _O_BINARY
+ m |= (strstr(mode, "b") ? _O_BINARY : 0);
+#endif
+ d = _wopen(wPath, m);
+ if (d >= 0)
+ fd = gzdopen(d, mode);
+ xmlFree(wPath);
+ }
+
+ return fd;
+}
+#endif
+
+/**
+ * xmlWrapStatUtf8:
+ * @path: the path in utf-8 encoding
+ * @info: structure that stores results
+ *
+ * function obtains information about the file or directory
+ *
+ */
+static int
+xmlWrapStatUtf8(const char *path,struct stat *info)
+{
+#ifdef HAVE_STAT
+ int retval = -1;
+ wchar_t *wPath;
+
+ wPath = __xmlIOWin32UTF8ToWChar(path);
+ if (wPath)
+ {
+ retval = _wstat(wPath,info);
+ xmlFree(wPath);
+ }
+ /* maybe path in native encoding */
+ if(retval < 0)
+ retval = stat(path,info);
+ return retval;
+#else
+ return -1;
+#endif
+}
+
+/**
+ * xmlWrapOpenNative:
+ * @path: the path
+ * @mode: type of access (0 - read, 1 - write)
+ *
+ * function opens the file specified by @path
+ *
+ */
+static FILE*
+xmlWrapOpenNative(const char *path,int mode)
+{
+ return fopen(path,mode ? "wb" : "rb");
+}
+
+/**
+ * xmlWrapStatNative:
+ * @path: the path
+ * @info: structure that stores results
+ *
+ * function obtains information about the file or directory
+ *
+ */
+static int
+xmlWrapStatNative(const char *path,struct stat *info)
+{
+#ifdef HAVE_STAT
+ return stat(path,info);
+#else
+ return -1;
+#endif
+}
+
+typedef int (* xmlWrapStatFunc) (const char *f, struct stat *s);
+static xmlWrapStatFunc xmlWrapStat = xmlWrapStatNative;
+typedef FILE* (* xmlWrapOpenFunc)(const char *f,int mode);
+static xmlWrapOpenFunc xmlWrapOpen = xmlWrapOpenNative;
+#ifdef HAVE_ZLIB_H
+typedef gzFile (* xmlWrapGzOpenFunc) (const char *f, const char *mode);
+static xmlWrapGzOpenFunc xmlWrapGzOpen = gzopen;
+#endif
+/**
+ * xmlInitPlatformSpecificIo:
+ *
+ * Initialize platform specific features.
+ */
+static void
+xmlInitPlatformSpecificIo(void)
+{
+ static int xmlPlatformIoInitialized = 0;
+ OSVERSIONINFO osvi;
+
+ if(xmlPlatformIoInitialized)
+ return;
+
+ osvi.dwOSVersionInfoSize = sizeof(osvi);
+
+ if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) {
+ xmlWrapStat = xmlWrapStatUtf8;
+ xmlWrapOpen = xmlWrapOpenUtf8;
+#ifdef HAVE_ZLIB_H
+ xmlWrapGzOpen = xmlWrapGzOpenUtf8;
+#endif
+ } else {
+ xmlWrapStat = xmlWrapStatNative;
+ xmlWrapOpen = xmlWrapOpenNative;
+#ifdef HAVE_ZLIB_H
+ xmlWrapGzOpen = gzopen;
+#endif
+ }
+
+ xmlPlatformIoInitialized = 1;
+ return;
+}
+
+#endif
+
+/**
+ * xmlCheckFilename:
+ * @path: the path to check
+ *
+ * function checks to see if @path is a valid source
+ * (file, socket...) for XML.
+ *
+ * if stat is not available on the target machine,
+ * returns 1. if stat fails, returns 0 (if calling
+ * stat on the filename fails, it can't be right).
+ * if stat succeeds and the file is a directory,
+ * returns 2. otherwise returns 1.
+ */
+
+int
+xmlCheckFilename (const char *path)
+{
+#ifdef HAVE_STAT
+ struct stat stat_buffer;
+#endif
+ if (path == NULL)
+ return(0);
+
+#ifdef HAVE_STAT
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ /*
+ * On Windows stat and wstat do not work with long pathname,
+ * which start with '\\?\'
+ */
+ if ((path[0] == '\\') && (path[1] == '\\') && (path[2] == '?') &&
+ (path[3] == '\\') )
+ return 1;
+
+ if (xmlWrapStat(path, &stat_buffer) == -1)
+ return 0;
+#else
+ if (stat(path, &stat_buffer) == -1)
+ return 0;
+#endif
+#ifdef S_ISDIR
+ if (S_ISDIR(stat_buffer.st_mode))
+ return 2;
+#endif
+#endif /* HAVE_STAT */
+ return 1;
+}
+
+/**
+ * xmlNop:
+ *
+ * No Operation function, does nothing, no input
+ *
+ * Returns zero
+ */
+int
+xmlNop(void) {
+ return(0);
+}
+
+/**
+ * xmlFdRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to read
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlFdRead (void * context, char * buffer, int len) {
+ int ret;
+
+ ret = read((int) (long) context, &buffer[0], len);
+ if (ret < 0) xmlIOErr(0, "read()");
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlFdWrite:
+ * @context: the I/O context
+ * @buffer: where to get data
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlFdWrite (void * context, const char * buffer, int len) {
+ int ret = 0;
+
+ if (len > 0) {
+ ret = write((int) (long) context, &buffer[0], len);
+ if (ret < 0) xmlIOErr(0, "write()");
+ }
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlFdClose:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ *
+ * Returns 0 in case of success and error code otherwise
+ */
+static int
+xmlFdClose (void * context) {
+ int ret;
+ ret = close((int) (long) context);
+ if (ret < 0) xmlIOErr(0, "close()");
+ return(ret);
+}
+
+/**
+ * xmlFileMatch:
+ * @filename: the URI for matching
+ *
+ * input from FILE *
+ *
+ * Returns 1 if matches, 0 otherwise
+ */
+int
+xmlFileMatch (const char *filename ATTRIBUTE_UNUSED) {
+ return(1);
+}
+
+/**
+ * xmlFileOpen_real:
+ * @filename: the URI for matching
+ *
+ * input from FILE *, supports compressed input
+ * if @filename is " " then the standard input is used
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+static void *
+xmlFileOpen_real (const char *filename) {
+ const char *path = filename;
+ FILE *fd;
+
+ if (filename == NULL)
+ return(NULL);
+
+ if (!strcmp(filename, "-")) {
+ fd = stdin;
+ return((void *) fd);
+ }
+
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[17];
+#else
+ path = &filename[16];
+#endif
+ } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[8];
+#else
+ path = &filename[7];
+#endif
+ } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) {
+ /* lots of generators seems to lazy to read RFC 1738 */
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[6];
+#else
+ path = &filename[5];
+#endif
+ }
+
+ if (!xmlCheckFilename(path))
+ return(NULL);
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ fd = xmlWrapOpen(path, 0);
+#else
+ fd = fopen(path, "r");
+#endif /* WIN32 */
+ if (fd == NULL) xmlIOErr(0, path);
+ return((void *) fd);
+}
+
+/**
+ * xmlFileOpen:
+ * @filename: the URI for matching
+ *
+ * Wrapper around xmlFileOpen_real that try it with an unescaped
+ * version of @filename, if this fails fallback to @filename
+ *
+ * Returns a handler or NULL in case or failure
+ */
+void *
+xmlFileOpen (const char *filename) {
+ char *unescaped;
+ void *retval;
+
+ retval = xmlFileOpen_real(filename);
+ if (retval == NULL) {
+ unescaped = xmlURIUnescapeString(filename, 0, NULL);
+ if (unescaped != NULL) {
+ retval = xmlFileOpen_real(unescaped);
+ xmlFree(unescaped);
+ }
+ }
+
+ return retval;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlFileOpenW:
+ * @filename: the URI for matching
+ *
+ * output to from FILE *,
+ * if @filename is "-" then the standard output is used
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+static void *
+xmlFileOpenW (const char *filename) {
+ const char *path = NULL;
+ FILE *fd;
+
+ if (!strcmp(filename, "-")) {
+ fd = stdout;
+ return((void *) fd);
+ }
+
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[17];
+#else
+ path = &filename[16];
+#endif
+ else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[8];
+#else
+ path = &filename[7];
+#endif
+ } else
+ path = filename;
+
+ if (path == NULL)
+ return(NULL);
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ fd = xmlWrapOpen(path, 1);
+#else
+ fd = fopen(path, "wb");
+#endif /* WIN32 */
+
+ if (fd == NULL) xmlIOErr(0, path);
+ return((void *) fd);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlFileRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes written or < 0 in case of failure
+ */
+int
+xmlFileRead (void * context, char * buffer, int len) {
+ int ret;
+ if ((context == NULL) || (buffer == NULL))
+ return(-1);
+ ret = fread(&buffer[0], 1, len, (FILE *) context);
+ if (ret < 0) xmlIOErr(0, "fread()");
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlFileWrite:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlFileWrite (void * context, const char * buffer, int len) {
+ int items;
+
+ if ((context == NULL) || (buffer == NULL))
+ return(-1);
+ items = fwrite(&buffer[0], len, 1, (FILE *) context);
+ if ((items == 0) && (ferror((FILE *) context))) {
+ xmlIOErr(0, "fwrite()");
+ return(-1);
+ }
+ return(items * len);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlFileClose:
+ * @context: the I/O context
+ *
+ * Close an I/O channel
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlFileClose (void * context) {
+ FILE *fil;
+ int ret;
+
+ if (context == NULL)
+ return(-1);
+ fil = (FILE *) context;
+ if ((fil == stdout) || (fil == stderr)) {
+ ret = fflush(fil);
+ if (ret < 0)
+ xmlIOErr(0, "fflush()");
+ return(0);
+ }
+ if (fil == stdin)
+ return(0);
+ ret = ( fclose((FILE *) context) == EOF ) ? -1 : 0;
+ if (ret < 0)
+ xmlIOErr(0, "fclose()");
+ return(ret);
+}
+
+/**
+ * xmlFileFlush:
+ * @context: the I/O context
+ *
+ * Flush an I/O channel
+ */
+static int
+xmlFileFlush (void * context) {
+ int ret;
+
+ if (context == NULL)
+ return(-1);
+ ret = ( fflush((FILE *) context) == EOF ) ? -1 : 0;
+ if (ret < 0)
+ xmlIOErr(0, "fflush()");
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlBufferWrite:
+ * @context: the xmlBuffer
+ * @buffer: the data to write
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the xml buffer
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlBufferWrite (void * context, const char * buffer, int len) {
+ int ret;
+
+ ret = xmlBufferAdd((xmlBufferPtr) context, (const xmlChar *) buffer, len);
+ if (ret != 0)
+ return(-1);
+ return(len);
+}
+#endif
+
+#ifdef HAVE_ZLIB_H
+/************************************************************************
+ * *
+ * I/O for compressed file accesses *
+ * *
+ ************************************************************************/
+/**
+ * xmlGzfileMatch:
+ * @filename: the URI for matching
+ *
+ * input from compressed file test
+ *
+ * Returns 1 if matches, 0 otherwise
+ */
+static int
+xmlGzfileMatch (const char *filename ATTRIBUTE_UNUSED) {
+ return(1);
+}
+
+/**
+ * xmlGzfileOpen_real:
+ * @filename: the URI for matching
+ *
+ * input from compressed file open
+ * if @filename is " " then the standard input is used
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+static void *
+xmlGzfileOpen_real (const char *filename) {
+ const char *path = NULL;
+ gzFile fd;
+
+ if (!strcmp(filename, "-")) {
+ int duped_fd = dup(fileno(stdin));
+ fd = gzdopen(duped_fd, "rb");
+ if (fd == Z_NULL && duped_fd >= 0) {
+ close(duped_fd); /* gzdOpen() does not close on failure */
+ }
+
+ return((void *) fd);
+ }
+
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[17];
+#else
+ path = &filename[16];
+#endif
+ else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[8];
+#else
+ path = &filename[7];
+#endif
+ } else
+ path = filename;
+
+ if (path == NULL)
+ return(NULL);
+ if (!xmlCheckFilename(path))
+ return(NULL);
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ fd = xmlWrapGzOpen(path, "rb");
+#else
+ fd = gzopen(path, "rb");
+#endif
+ return((void *) fd);
+}
+
+/**
+ * xmlGzfileOpen:
+ * @filename: the URI for matching
+ *
+ * Wrapper around xmlGzfileOpen if the open fais, it will
+ * try to unescape @filename
+ */
+static void *
+xmlGzfileOpen (const char *filename) {
+ char *unescaped;
+ void *retval;
+
+ retval = xmlGzfileOpen_real(filename);
+ if (retval == NULL) {
+ unescaped = xmlURIUnescapeString(filename, 0, NULL);
+ if (unescaped != NULL) {
+ retval = xmlGzfileOpen_real(unescaped);
+ }
+ xmlFree(unescaped);
+ }
+ return retval;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlGzfileOpenW:
+ * @filename: the URI for matching
+ * @compression: the compression factor (0 - 9 included)
+ *
+ * input from compressed file open
+ * if @filename is " " then the standard input is used
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+static void *
+xmlGzfileOpenW (const char *filename, int compression) {
+ const char *path = NULL;
+ char mode[15];
+ gzFile fd;
+
+ snprintf(mode, sizeof(mode), "wb%d", compression);
+ if (!strcmp(filename, "-")) {
+ int duped_fd = dup(fileno(stdout));
+ fd = gzdopen(duped_fd, "rb");
+ if (fd == Z_NULL && duped_fd >= 0) {
+ close(duped_fd); /* gzdOpen() does not close on failure */
+ }
+
+ return((void *) fd);
+ }
+
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[17];
+#else
+ path = &filename[16];
+#endif
+ else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &filename[8];
+#else
+ path = &filename[7];
+#endif
+ } else
+ path = filename;
+
+ if (path == NULL)
+ return(NULL);
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ fd = xmlWrapGzOpen(path, mode);
+#else
+ fd = gzopen(path, mode);
+#endif
+ return((void *) fd);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlGzfileRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the compressed I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlGzfileRead (void * context, char * buffer, int len) {
+ int ret;
+
+ ret = gzread((gzFile) context, &buffer[0], len);
+ if (ret < 0) xmlIOErr(0, "gzread()");
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlGzfileWrite:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Write @len bytes from @buffer to the compressed I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlGzfileWrite (void * context, const char * buffer, int len) {
+ int ret;
+
+ ret = gzwrite((gzFile) context, (char *) &buffer[0], len);
+ if (ret < 0) xmlIOErr(0, "gzwrite()");
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlGzfileClose:
+ * @context: the I/O context
+ *
+ * Close a compressed I/O channel
+ */
+static int
+xmlGzfileClose (void * context) {
+ int ret;
+
+ ret = (gzclose((gzFile) context) == Z_OK ) ? 0 : -1;
+ if (ret < 0) xmlIOErr(0, "gzclose()");
+ return(ret);
+}
+#endif /* HAVE_ZLIB_H */
+
+#ifdef HAVE_LZMA_H
+/************************************************************************
+ * *
+ * I/O for compressed file accesses *
+ * *
+ ************************************************************************/
+#include "xzlib.h"
+/**
+ * xmlXzfileMatch:
+ * @filename: the URI for matching
+ *
+ * input from compressed file test
+ *
+ * Returns 1 if matches, 0 otherwise
+ */
+static int
+xmlXzfileMatch (const char *filename ATTRIBUTE_UNUSED) {
+ return(1);
+}
+
+/**
+ * xmlXzFileOpen_real:
+ * @filename: the URI for matching
+ *
+ * input from compressed file open
+ * if @filename is " " then the standard input is used
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+static void *
+xmlXzfileOpen_real (const char *filename) {
+ const char *path = NULL;
+ xzFile fd;
+
+ if (!strcmp(filename, "-")) {
+ fd = __libxml2_xzdopen(dup(fileno(stdin)), "rb");
+ return((void *) fd);
+ }
+
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) {
+ path = &filename[16];
+ } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
+ path = &filename[7];
+ } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) {
+ /* lots of generators seems to lazy to read RFC 1738 */
+ path = &filename[5];
+ } else
+ path = filename;
+
+ if (path == NULL)
+ return(NULL);
+ if (!xmlCheckFilename(path))
+ return(NULL);
+
+ fd = __libxml2_xzopen(path, "rb");
+ return((void *) fd);
+}
+
+/**
+ * xmlXzfileOpen:
+ * @filename: the URI for matching
+ *
+ * Wrapper around xmlXzfileOpen_real that try it with an unescaped
+ * version of @filename, if this fails fallback to @filename
+ *
+ * Returns a handler or NULL in case or failure
+ */
+static void *
+xmlXzfileOpen (const char *filename) {
+ char *unescaped;
+ void *retval;
+
+ retval = xmlXzfileOpen_real(filename);
+ if (retval == NULL) {
+ unescaped = xmlURIUnescapeString(filename, 0, NULL);
+ if (unescaped != NULL) {
+ retval = xmlXzfileOpen_real(unescaped);
+ }
+ xmlFree(unescaped);
+ }
+
+ return retval;
+}
+
+/**
+ * xmlXzfileRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the compressed I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+static int
+xmlXzfileRead (void * context, char * buffer, int len) {
+ int ret;
+
+ ret = __libxml2_xzread((xzFile) context, &buffer[0], len);
+ if (ret < 0) xmlIOErr(0, "xzread()");
+ return(ret);
+}
+
+/**
+ * xmlXzfileClose:
+ * @context: the I/O context
+ *
+ * Close a compressed I/O channel
+ */
+static int
+xmlXzfileClose (void * context) {
+ int ret;
+
+ ret = (__libxml2_xzclose((xzFile) context) == LZMA_OK ) ? 0 : -1;
+ if (ret < 0) xmlIOErr(0, "xzclose()");
+ return(ret);
+}
+#endif /* HAVE_LZMA_H */
+
+#ifdef LIBXML_HTTP_ENABLED
+/************************************************************************
+ * *
+ * I/O for HTTP file accesses *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_OUTPUT_ENABLED
+typedef struct xmlIOHTTPWriteCtxt_
+{
+ int compression;
+
+ char * uri;
+
+ void * doc_buff;
+
+} xmlIOHTTPWriteCtxt, *xmlIOHTTPWriteCtxtPtr;
+
+#ifdef HAVE_ZLIB_H
+
+#define DFLT_WBITS ( -15 )
+#define DFLT_MEM_LVL ( 8 )
+#define GZ_MAGIC1 ( 0x1f )
+#define GZ_MAGIC2 ( 0x8b )
+#define LXML_ZLIB_OS_CODE ( 0x03 )
+#define INIT_HTTP_BUFF_SIZE ( 32768 )
+#define DFLT_ZLIB_RATIO ( 5 )
+
+/*
+** Data structure and functions to work with sending compressed data
+** via HTTP.
+*/
+
+typedef struct xmlZMemBuff_
+{
+ unsigned long size;
+ unsigned long crc;
+
+ unsigned char * zbuff;
+ z_stream zctrl;
+
+} xmlZMemBuff, *xmlZMemBuffPtr;
+
+/**
+ * append_reverse_ulong
+ * @buff: Compressed memory buffer
+ * @data: Unsigned long to append
+ *
+ * Append a unsigned long in reverse byte order to the end of the
+ * memory buffer.
+ */
+static void
+append_reverse_ulong( xmlZMemBuff * buff, unsigned long data ) {
+
+ int idx;
+
+ if ( buff == NULL )
+ return;
+
+ /*
+ ** This is plagiarized from putLong in gzio.c (zlib source) where
+ ** the number "4" is hardcoded. If zlib is ever patched to
+ ** support 64 bit file sizes, this code would need to be patched
+ ** as well.
+ */
+
+ for ( idx = 0; idx < 4; idx++ ) {
+ *buff->zctrl.next_out = ( data & 0xff );
+ data >>= 8;
+ buff->zctrl.next_out++;
+ }
+
+ return;
+}
+
+/**
+ *
+ * xmlFreeZMemBuff
+ * @buff: The memory buffer context to clear
+ *
+ * Release all the resources associated with the compressed memory buffer.
+ */
+static void
+xmlFreeZMemBuff( xmlZMemBuffPtr buff ) {
+
+#ifdef DEBUG_HTTP
+ int z_err;
+#endif
+
+ if ( buff == NULL )
+ return;
+
+ xmlFree( buff->zbuff );
+#ifdef DEBUG_HTTP
+ z_err = deflateEnd( &buff->zctrl );
+ if ( z_err != Z_OK )
+ xmlGenericError( xmlGenericErrorContext,
+ "xmlFreeZMemBuff: Error releasing zlib context: %d\n",
+ z_err );
+#else
+ deflateEnd( &buff->zctrl );
+#endif
+
+ xmlFree( buff );
+ return;
+}
+
+/**
+ * xmlCreateZMemBuff
+ *@compression: Compression value to use
+ *
+ * Create a memory buffer to hold the compressed XML document. The
+ * compressed document in memory will end up being identical to what
+ * would be created if gzopen/gzwrite/gzclose were being used to
+ * write the document to disk. The code for the header/trailer data to
+ * the compression is plagiarized from the zlib source files.
+ */
+static void *
+xmlCreateZMemBuff( int compression ) {
+
+ int z_err;
+ int hdr_lgth;
+ xmlZMemBuffPtr buff = NULL;
+
+ if ( ( compression < 1 ) || ( compression > 9 ) )
+ return ( NULL );
+
+ /* Create the control and data areas */
+
+ buff = xmlMalloc( sizeof( xmlZMemBuff ) );
+ if ( buff == NULL ) {
+ xmlIOErrMemory("creating buffer context");
+ return ( NULL );
+ }
+
+ (void)memset( buff, 0, sizeof( xmlZMemBuff ) );
+ buff->size = INIT_HTTP_BUFF_SIZE;
+ buff->zbuff = xmlMalloc( buff->size );
+ if ( buff->zbuff == NULL ) {
+ xmlFreeZMemBuff( buff );
+ xmlIOErrMemory("creating buffer");
+ return ( NULL );
+ }
+
+ z_err = deflateInit2( &buff->zctrl, compression, Z_DEFLATED,
+ DFLT_WBITS, DFLT_MEM_LVL, Z_DEFAULT_STRATEGY );
+ if ( z_err != Z_OK ) {
+ xmlChar msg[500];
+ xmlFreeZMemBuff( buff );
+ buff = NULL;
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlCreateZMemBuff: %s %d\n",
+ "Error initializing compression context. ZLIB error:",
+ z_err );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ return ( NULL );
+ }
+
+ /* Set the header data. The CRC will be needed for the trailer */
+ buff->crc = crc32( 0L, NULL, 0 );
+ hdr_lgth = snprintf( (char *)buff->zbuff, buff->size,
+ "%c%c%c%c%c%c%c%c%c%c",
+ GZ_MAGIC1, GZ_MAGIC2, Z_DEFLATED,
+ 0, 0, 0, 0, 0, 0, LXML_ZLIB_OS_CODE );
+ buff->zctrl.next_out = buff->zbuff + hdr_lgth;
+ buff->zctrl.avail_out = buff->size - hdr_lgth;
+
+ return ( buff );
+}
+
+/**
+ * xmlZMemBuffExtend
+ * @buff: Buffer used to compress and consolidate data.
+ * @ext_amt: Number of bytes to extend the buffer.
+ *
+ * Extend the internal buffer used to store the compressed data by the
+ * specified amount.
+ *
+ * Returns 0 on success or -1 on failure to extend the buffer. On failure
+ * the original buffer still exists at the original size.
+ */
+static int
+xmlZMemBuffExtend( xmlZMemBuffPtr buff, size_t ext_amt ) {
+
+ int rc = -1;
+ size_t new_size;
+ size_t cur_used;
+
+ unsigned char * tmp_ptr = NULL;
+
+ if ( buff == NULL )
+ return ( -1 );
+
+ else if ( ext_amt == 0 )
+ return ( 0 );
+
+ cur_used = buff->zctrl.next_out - buff->zbuff;
+ new_size = buff->size + ext_amt;
+
+#ifdef DEBUG_HTTP
+ if ( cur_used > new_size )
+ xmlGenericError( xmlGenericErrorContext,
+ "xmlZMemBuffExtend: %s\n%s %d bytes.\n",
+ "Buffer overwrite detected during compressed memory",
+ "buffer extension. Overflowed by",
+ (cur_used - new_size ) );
+#endif
+
+ tmp_ptr = xmlRealloc( buff->zbuff, new_size );
+ if ( tmp_ptr != NULL ) {
+ rc = 0;
+ buff->size = new_size;
+ buff->zbuff = tmp_ptr;
+ buff->zctrl.next_out = tmp_ptr + cur_used;
+ buff->zctrl.avail_out = new_size - cur_used;
+ }
+ else {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlZMemBuffExtend: %s %lu bytes.\n",
+ "Allocation failure extending output buffer to",
+ new_size );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ }
+
+ return ( rc );
+}
+
+/**
+ * xmlZMemBuffAppend
+ * @buff: Buffer used to compress and consolidate data
+ * @src: Uncompressed source content to append to buffer
+ * @len: Length of source data to append to buffer
+ *
+ * Compress and append data to the internal buffer. The data buffer
+ * will be expanded if needed to store the additional data.
+ *
+ * Returns the number of bytes appended to the buffer or -1 on error.
+ */
+static int
+xmlZMemBuffAppend( xmlZMemBuffPtr buff, const char * src, int len ) {
+
+ int z_err;
+ size_t min_accept;
+
+ if ( ( buff == NULL ) || ( src == NULL ) )
+ return ( -1 );
+
+ buff->zctrl.avail_in = len;
+ buff->zctrl.next_in = (unsigned char *)src;
+ while ( buff->zctrl.avail_in > 0 ) {
+ /*
+ ** Extend the buffer prior to deflate call if a reasonable amount
+ ** of output buffer space is not available.
+ */
+ min_accept = buff->zctrl.avail_in / DFLT_ZLIB_RATIO;
+ if ( buff->zctrl.avail_out <= min_accept ) {
+ if ( xmlZMemBuffExtend( buff, buff->size ) == -1 )
+ return ( -1 );
+ }
+
+ z_err = deflate( &buff->zctrl, Z_NO_FLUSH );
+ if ( z_err != Z_OK ) {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlZMemBuffAppend: %s %d %s - %d",
+ "Compression error while appending",
+ len, "bytes to buffer. ZLIB error", z_err );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ return ( -1 );
+ }
+ }
+
+ buff->crc = crc32( buff->crc, (unsigned char *)src, len );
+
+ return ( len );
+}
+
+/**
+ * xmlZMemBuffGetContent
+ * @buff: Compressed memory content buffer
+ * @data_ref: Pointer reference to point to compressed content
+ *
+ * Flushes the compression buffers, appends gzip file trailers and
+ * returns the compressed content and length of the compressed data.
+ * NOTE: The gzip trailer code here is plagiarized from zlib source.
+ *
+ * Returns the length of the compressed data or -1 on error.
+ */
+static int
+xmlZMemBuffGetContent( xmlZMemBuffPtr buff, char ** data_ref ) {
+
+ int zlgth = -1;
+ int z_err;
+
+ if ( ( buff == NULL ) || ( data_ref == NULL ) )
+ return ( -1 );
+
+ /* Need to loop until compression output buffers are flushed */
+
+ do
+ {
+ z_err = deflate( &buff->zctrl, Z_FINISH );
+ if ( z_err == Z_OK ) {
+ /* In this case Z_OK means more buffer space needed */
+
+ if ( xmlZMemBuffExtend( buff, buff->size ) == -1 )
+ return ( -1 );
+ }
+ }
+ while ( z_err == Z_OK );
+
+ /* If the compression state is not Z_STREAM_END, some error occurred */
+
+ if ( z_err == Z_STREAM_END ) {
+
+ /* Need to append the gzip data trailer */
+
+ if ( buff->zctrl.avail_out < ( 2 * sizeof( unsigned long ) ) ) {
+ if ( xmlZMemBuffExtend(buff, (2 * sizeof(unsigned long))) == -1 )
+ return ( -1 );
+ }
+
+ /*
+ ** For whatever reason, the CRC and length data are pushed out
+ ** in reverse byte order. So a memcpy can't be used here.
+ */
+
+ append_reverse_ulong( buff, buff->crc );
+ append_reverse_ulong( buff, buff->zctrl.total_in );
+
+ zlgth = buff->zctrl.next_out - buff->zbuff;
+ *data_ref = (char *)buff->zbuff;
+ }
+
+ else {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlZMemBuffGetContent: %s - %d\n",
+ "Error flushing zlib buffers. Error code", z_err );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ }
+
+ return ( zlgth );
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* HAVE_ZLIB_H */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlFreeHTTPWriteCtxt
+ * @ctxt: Context to cleanup
+ *
+ * Free allocated memory and reclaim system resources.
+ *
+ * No return value.
+ */
+static void
+xmlFreeHTTPWriteCtxt( xmlIOHTTPWriteCtxtPtr ctxt )
+{
+ if ( ctxt->uri != NULL )
+ xmlFree( ctxt->uri );
+
+ if ( ctxt->doc_buff != NULL ) {
+
+#ifdef HAVE_ZLIB_H
+ if ( ctxt->compression > 0 ) {
+ xmlFreeZMemBuff( ctxt->doc_buff );
+ }
+ else
+#endif
+ {
+ xmlOutputBufferClose( ctxt->doc_buff );
+ }
+ }
+
+ xmlFree( ctxt );
+ return;
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+
+/**
+ * xmlIOHTTPMatch:
+ * @filename: the URI for matching
+ *
+ * check if the URI matches an HTTP one
+ *
+ * Returns 1 if matches, 0 otherwise
+ */
+int
+xmlIOHTTPMatch (const char *filename) {
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "http://", 7))
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlIOHTTPOpen:
+ * @filename: the URI for matching
+ *
+ * open an HTTP I/O channel
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+void *
+xmlIOHTTPOpen (const char *filename) {
+ return(xmlNanoHTTPOpen(filename, NULL));
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlIOHTTPOpenW:
+ * @post_uri: The destination URI for the document
+ * @compression: The compression desired for the document.
+ *
+ * Open a temporary buffer to collect the document for a subsequent HTTP POST
+ * request. Non-static as is called from the output buffer creation routine.
+ *
+ * Returns an I/O context or NULL in case of error.
+ */
+
+void *
+xmlIOHTTPOpenW(const char *post_uri, int compression)
+{
+
+ xmlIOHTTPWriteCtxtPtr ctxt = NULL;
+
+ if (post_uri == NULL)
+ return (NULL);
+
+ ctxt = xmlMalloc(sizeof(xmlIOHTTPWriteCtxt));
+ if (ctxt == NULL) {
+ xmlIOErrMemory("creating HTTP output context");
+ return (NULL);
+ }
+
+ (void) memset(ctxt, 0, sizeof(xmlIOHTTPWriteCtxt));
+
+ ctxt->uri = (char *) xmlStrdup((const xmlChar *)post_uri);
+ if (ctxt->uri == NULL) {
+ xmlIOErrMemory("copying URI");
+ xmlFreeHTTPWriteCtxt(ctxt);
+ return (NULL);
+ }
+
+ /*
+ * ** Since the document length is required for an HTTP post,
+ * ** need to put the document into a buffer. A memory buffer
+ * ** is being used to avoid pushing the data to disk and back.
+ */
+
+#ifdef HAVE_ZLIB_H
+ if ((compression > 0) && (compression <= 9)) {
+
+ ctxt->compression = compression;
+ ctxt->doc_buff = xmlCreateZMemBuff(compression);
+ } else
+#endif
+ {
+ /* Any character conversions should have been done before this */
+
+ ctxt->doc_buff = xmlAllocOutputBufferInternal(NULL);
+ }
+
+ if (ctxt->doc_buff == NULL) {
+ xmlFreeHTTPWriteCtxt(ctxt);
+ ctxt = NULL;
+ }
+
+ return (ctxt);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlIOHTTPDfltOpenW
+ * @post_uri: The destination URI for this document.
+ *
+ * Calls xmlIOHTTPOpenW with no compression to set up for a subsequent
+ * HTTP post command. This function should generally not be used as
+ * the open callback is short circuited in xmlOutputBufferCreateFile.
+ *
+ * Returns a pointer to the new IO context.
+ */
+static void *
+xmlIOHTTPDfltOpenW( const char * post_uri ) {
+ return ( xmlIOHTTPOpenW( post_uri, 0 ) );
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlIOHTTPRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+int
+xmlIOHTTPRead(void * context, char * buffer, int len) {
+ if ((buffer == NULL) || (len < 0)) return(-1);
+ return(xmlNanoHTTPRead(context, &buffer[0], len));
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlIOHTTPWrite
+ * @context: previously opened writing context
+ * @buffer: data to output to temporary buffer
+ * @len: bytes to output
+ *
+ * Collect data from memory buffer into a temporary file for later
+ * processing.
+ *
+ * Returns number of bytes written.
+ */
+
+static int
+xmlIOHTTPWrite( void * context, const char * buffer, int len ) {
+
+ xmlIOHTTPWriteCtxtPtr ctxt = context;
+
+ if ( ( ctxt == NULL ) || ( ctxt->doc_buff == NULL ) || ( buffer == NULL ) )
+ return ( -1 );
+
+ if ( len > 0 ) {
+
+ /* Use gzwrite or fwrite as previously setup in the open call */
+
+#ifdef HAVE_ZLIB_H
+ if ( ctxt->compression > 0 )
+ len = xmlZMemBuffAppend( ctxt->doc_buff, buffer, len );
+
+ else
+#endif
+ len = xmlOutputBufferWrite( ctxt->doc_buff, len, buffer );
+
+ if ( len < 0 ) {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlIOHTTPWrite: %s\n%s '%s'.\n",
+ "Error appending to internal buffer.",
+ "Error sending document to URI",
+ ctxt->uri );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ }
+ }
+
+ return ( len );
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+
+/**
+ * xmlIOHTTPClose:
+ * @context: the I/O context
+ *
+ * Close an HTTP I/O channel
+ *
+ * Returns 0
+ */
+int
+xmlIOHTTPClose (void * context) {
+ xmlNanoHTTPClose(context);
+ return 0;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlIOHTTCloseWrite
+ * @context: The I/O context
+ * @http_mthd: The HTTP method to be used when sending the data
+ *
+ * Close the transmit HTTP I/O channel and actually send the data.
+ */
+static int
+xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) {
+
+ int close_rc = -1;
+ int http_rtn = 0;
+ int content_lgth = 0;
+ xmlIOHTTPWriteCtxtPtr ctxt = context;
+
+ char * http_content = NULL;
+ char * content_encoding = NULL;
+ char * content_type = (char *) "text/xml";
+ void * http_ctxt = NULL;
+
+ if ( ( ctxt == NULL ) || ( http_mthd == NULL ) )
+ return ( -1 );
+
+ /* Retrieve the content from the appropriate buffer */
+
+#ifdef HAVE_ZLIB_H
+
+ if ( ctxt->compression > 0 ) {
+ content_lgth = xmlZMemBuffGetContent( ctxt->doc_buff, &http_content );
+ content_encoding = (char *) "Content-Encoding: gzip";
+ }
+ else
+#endif
+ {
+ /* Pull the data out of the memory output buffer */
+
+ xmlOutputBufferPtr dctxt = ctxt->doc_buff;
+ http_content = (char *) xmlBufContent(dctxt->buffer);
+ content_lgth = xmlBufUse(dctxt->buffer);
+ }
+
+ if ( http_content == NULL ) {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlIOHTTPCloseWrite: %s '%s' %s '%s'.\n",
+ "Error retrieving content.\nUnable to",
+ http_mthd, "data to URI", ctxt->uri );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ }
+
+ else {
+
+ http_ctxt = xmlNanoHTTPMethod( ctxt->uri, http_mthd, http_content,
+ &content_type, content_encoding,
+ content_lgth );
+
+ if ( http_ctxt != NULL ) {
+#ifdef DEBUG_HTTP
+ /* If testing/debugging - dump reply with request content */
+
+ FILE * tst_file = NULL;
+ char buffer[ 4096 ];
+ char * dump_name = NULL;
+ int avail;
+
+ xmlGenericError( xmlGenericErrorContext,
+ "xmlNanoHTTPCloseWrite: HTTP %s to\n%s returned %d.\n",
+ http_mthd, ctxt->uri,
+ xmlNanoHTTPReturnCode( http_ctxt ) );
+
+ /*
+ ** Since either content or reply may be gzipped,
+ ** dump them to separate files instead of the
+ ** standard error context.
+ */
+
+ dump_name = tempnam( NULL, "lxml" );
+ if ( dump_name != NULL ) {
+ (void)snprintf( buffer, sizeof(buffer), "%s.content", dump_name );
+
+ tst_file = fopen( buffer, "wb" );
+ if ( tst_file != NULL ) {
+ xmlGenericError( xmlGenericErrorContext,
+ "Transmitted content saved in file: %s\n", buffer );
+
+ fwrite( http_content, sizeof( char ),
+ content_lgth, tst_file );
+ fclose( tst_file );
+ }
+
+ (void)snprintf( buffer, sizeof(buffer), "%s.reply", dump_name );
+ tst_file = fopen( buffer, "wb" );
+ if ( tst_file != NULL ) {
+ xmlGenericError( xmlGenericErrorContext,
+ "Reply content saved in file: %s\n", buffer );
+
+
+ while ( (avail = xmlNanoHTTPRead( http_ctxt,
+ buffer, sizeof( buffer ) )) > 0 ) {
+
+ fwrite( buffer, sizeof( char ), avail, tst_file );
+ }
+
+ fclose( tst_file );
+ }
+
+ free( dump_name );
+ }
+#endif /* DEBUG_HTTP */
+
+ http_rtn = xmlNanoHTTPReturnCode( http_ctxt );
+ if ( ( http_rtn >= 200 ) && ( http_rtn < 300 ) )
+ close_rc = 0;
+ else {
+ xmlChar msg[500];
+ xmlStrPrintf(msg, 500,
+ (const xmlChar *) "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n",
+ http_mthd, content_lgth,
+ "bytes to URI", ctxt->uri,
+ "failed. HTTP return code:", http_rtn );
+ xmlIOErr(XML_IO_WRITE, (const char *) msg);
+ }
+
+ xmlNanoHTTPClose( http_ctxt );
+ xmlFree( content_type );
+ }
+ }
+
+ /* Final cleanups */
+
+ xmlFreeHTTPWriteCtxt( ctxt );
+
+ return ( close_rc );
+}
+
+/**
+ * xmlIOHTTPClosePut
+ *
+ * @context: The I/O context
+ *
+ * Close the transmit HTTP I/O channel and actually send data using a PUT
+ * HTTP method.
+ */
+static int
+xmlIOHTTPClosePut( void * ctxt ) {
+ return ( xmlIOHTTPCloseWrite( ctxt, "PUT" ) );
+}
+
+
+/**
+ * xmlIOHTTPClosePost
+ *
+ * @context: The I/O context
+ *
+ * Close the transmit HTTP I/O channel and actually send data using a POST
+ * HTTP method.
+ */
+static int
+xmlIOHTTPClosePost( void * ctxt ) {
+ return ( xmlIOHTTPCloseWrite( ctxt, "POST" ) );
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#endif /* LIBXML_HTTP_ENABLED */
+
+#ifdef LIBXML_FTP_ENABLED
+/************************************************************************
+ * *
+ * I/O for FTP file accesses *
+ * *
+ ************************************************************************/
+/**
+ * xmlIOFTPMatch:
+ * @filename: the URI for matching
+ *
+ * check if the URI matches an FTP one
+ *
+ * Returns 1 if matches, 0 otherwise
+ */
+int
+xmlIOFTPMatch (const char *filename) {
+ if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "ftp://", 6))
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlIOFTPOpen:
+ * @filename: the URI for matching
+ *
+ * open an FTP I/O channel
+ *
+ * Returns an I/O context or NULL in case of error
+ */
+void *
+xmlIOFTPOpen (const char *filename) {
+ return(xmlNanoFTPOpen(filename));
+}
+
+/**
+ * xmlIOFTPRead:
+ * @context: the I/O context
+ * @buffer: where to drop data
+ * @len: number of bytes to write
+ *
+ * Read @len bytes to @buffer from the I/O channel.
+ *
+ * Returns the number of bytes written
+ */
+int
+xmlIOFTPRead(void * context, char * buffer, int len) {
+ if ((buffer == NULL) || (len < 0)) return(-1);
+ return(xmlNanoFTPRead(context, &buffer[0], len));
+}
+
+/**
+ * xmlIOFTPClose:
+ * @context: the I/O context
+ *
+ * Close an FTP I/O channel
+ *
+ * Returns 0
+ */
+int
+xmlIOFTPClose (void * context) {
+ return ( xmlNanoFTPClose(context) );
+}
+#endif /* LIBXML_FTP_ENABLED */
+
+
+/**
+ * xmlRegisterInputCallbacks:
+ * @matchFunc: the xmlInputMatchCallback
+ * @openFunc: the xmlInputOpenCallback
+ * @readFunc: the xmlInputReadCallback
+ * @closeFunc: the xmlInputCloseCallback
+ *
+ * Register a new set of I/O callback for handling parser input.
+ *
+ * Returns the registered handler number or -1 in case of error
+ */
+int
+xmlRegisterInputCallbacks(xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc) {
+ if (xmlInputCallbackNr >= MAX_INPUT_CALLBACK) {
+ return(-1);
+ }
+ xmlInputCallbackTable[xmlInputCallbackNr].matchcallback = matchFunc;
+ xmlInputCallbackTable[xmlInputCallbackNr].opencallback = openFunc;
+ xmlInputCallbackTable[xmlInputCallbackNr].readcallback = readFunc;
+ xmlInputCallbackTable[xmlInputCallbackNr].closecallback = closeFunc;
+ xmlInputCallbackInitialized = 1;
+ return(xmlInputCallbackNr++);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlRegisterOutputCallbacks:
+ * @matchFunc: the xmlOutputMatchCallback
+ * @openFunc: the xmlOutputOpenCallback
+ * @writeFunc: the xmlOutputWriteCallback
+ * @closeFunc: the xmlOutputCloseCallback
+ *
+ * Register a new set of I/O callback for handling output.
+ *
+ * Returns the registered handler number or -1 in case of error
+ */
+int
+xmlRegisterOutputCallbacks(xmlOutputMatchCallback matchFunc,
+ xmlOutputOpenCallback openFunc, xmlOutputWriteCallback writeFunc,
+ xmlOutputCloseCallback closeFunc) {
+ if (xmlOutputCallbackNr >= MAX_OUTPUT_CALLBACK) {
+ return(-1);
+ }
+ xmlOutputCallbackTable[xmlOutputCallbackNr].matchcallback = matchFunc;
+ xmlOutputCallbackTable[xmlOutputCallbackNr].opencallback = openFunc;
+ xmlOutputCallbackTable[xmlOutputCallbackNr].writecallback = writeFunc;
+ xmlOutputCallbackTable[xmlOutputCallbackNr].closecallback = closeFunc;
+ xmlOutputCallbackInitialized = 1;
+ return(xmlOutputCallbackNr++);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlRegisterDefaultInputCallbacks:
+ *
+ * Registers the default compiled-in I/O handlers.
+ */
+void
+xmlRegisterDefaultInputCallbacks(void) {
+ if (xmlInputCallbackInitialized)
+ return;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ xmlInitPlatformSpecificIo();
+#endif
+
+ xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen,
+ xmlFileRead, xmlFileClose);
+#ifdef HAVE_ZLIB_H
+ xmlRegisterInputCallbacks(xmlGzfileMatch, xmlGzfileOpen,
+ xmlGzfileRead, xmlGzfileClose);
+#endif /* HAVE_ZLIB_H */
+#ifdef HAVE_LZMA_H
+ xmlRegisterInputCallbacks(xmlXzfileMatch, xmlXzfileOpen,
+ xmlXzfileRead, xmlXzfileClose);
+#endif /* HAVE_ZLIB_H */
+
+#ifdef LIBXML_HTTP_ENABLED
+ xmlRegisterInputCallbacks(xmlIOHTTPMatch, xmlIOHTTPOpen,
+ xmlIOHTTPRead, xmlIOHTTPClose);
+#endif /* LIBXML_HTTP_ENABLED */
+
+#ifdef LIBXML_FTP_ENABLED
+ xmlRegisterInputCallbacks(xmlIOFTPMatch, xmlIOFTPOpen,
+ xmlIOFTPRead, xmlIOFTPClose);
+#endif /* LIBXML_FTP_ENABLED */
+ xmlInputCallbackInitialized = 1;
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlRegisterDefaultOutputCallbacks:
+ *
+ * Registers the default compiled-in I/O handlers.
+ */
+void
+xmlRegisterDefaultOutputCallbacks (void) {
+ if (xmlOutputCallbackInitialized)
+ return;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ xmlInitPlatformSpecificIo();
+#endif
+
+ xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW,
+ xmlFileWrite, xmlFileClose);
+
+#ifdef LIBXML_HTTP_ENABLED
+ xmlRegisterOutputCallbacks(xmlIOHTTPMatch, xmlIOHTTPDfltOpenW,
+ xmlIOHTTPWrite, xmlIOHTTPClosePut);
+#endif
+
+/*********************************
+ No way a-priori to distinguish between gzipped files from
+ uncompressed ones except opening if existing then closing
+ and saving with same compression ratio ... a pain.
+
+#ifdef HAVE_ZLIB_H
+ xmlRegisterOutputCallbacks(xmlGzfileMatch, xmlGzfileOpen,
+ xmlGzfileWrite, xmlGzfileClose);
+#endif
+
+ Nor FTP PUT ....
+#ifdef LIBXML_FTP_ENABLED
+ xmlRegisterOutputCallbacks(xmlIOFTPMatch, xmlIOFTPOpen,
+ xmlIOFTPWrite, xmlIOFTPClose);
+#endif
+ **********************************/
+ xmlOutputCallbackInitialized = 1;
+}
+
+#ifdef LIBXML_HTTP_ENABLED
+/**
+ * xmlRegisterHTTPPostCallbacks:
+ *
+ * By default, libxml submits HTTP output requests using the "PUT" method.
+ * Calling this method changes the HTTP output method to use the "POST"
+ * method instead.
+ *
+ */
+void
+xmlRegisterHTTPPostCallbacks( void ) {
+
+ /* Register defaults if not done previously */
+
+ if ( xmlOutputCallbackInitialized == 0 )
+ xmlRegisterDefaultOutputCallbacks( );
+
+ xmlRegisterOutputCallbacks(xmlIOHTTPMatch, xmlIOHTTPDfltOpenW,
+ xmlIOHTTPWrite, xmlIOHTTPClosePost);
+ return;
+}
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlAllocParserInputBuffer:
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for progressive parsing
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlAllocParserInputBuffer(xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+
+ ret = (xmlParserInputBufferPtr) xmlMalloc(sizeof(xmlParserInputBuffer));
+ if (ret == NULL) {
+ xmlIOErrMemory("creating input buffer");
+ return(NULL);
+ }
+ memset(ret, 0, (size_t) sizeof(xmlParserInputBuffer));
+ ret->buffer = xmlBufCreateSize(2 * xmlDefaultBufferSize);
+ if (ret->buffer == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_DOUBLEIT);
+ ret->encoder = xmlGetCharEncodingHandler(enc);
+ if (ret->encoder != NULL)
+ ret->raw = xmlBufCreateSize(2 * xmlDefaultBufferSize);
+ else
+ ret->raw = NULL;
+ ret->readcallback = NULL;
+ ret->closecallback = NULL;
+ ret->context = NULL;
+ ret->compressed = -1;
+ ret->rawconsumed = 0;
+
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlAllocOutputBuffer:
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered parser output
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlAllocOutputBuffer(xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ ret = (xmlOutputBufferPtr) xmlMalloc(sizeof(xmlOutputBuffer));
+ if (ret == NULL) {
+ xmlIOErrMemory("creating output buffer");
+ return(NULL);
+ }
+ memset(ret, 0, (size_t) sizeof(xmlOutputBuffer));
+ ret->buffer = xmlBufCreate();
+ if (ret->buffer == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+
+ /* try to avoid a performance problem with Windows realloc() */
+ if (xmlBufGetAllocationScheme(ret->buffer) == XML_BUFFER_ALLOC_EXACT)
+ xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_DOUBLEIT);
+
+ ret->encoder = encoder;
+ if (encoder != NULL) {
+ ret->conv = xmlBufCreateSize(4000);
+ if (ret->conv == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+
+ /*
+ * This call is designed to initiate the encoder state
+ */
+ xmlCharEncOutput(ret, 1);
+ } else
+ ret->conv = NULL;
+ ret->writecallback = NULL;
+ ret->closecallback = NULL;
+ ret->context = NULL;
+ ret->written = 0;
+
+ return(ret);
+}
+
+/**
+ * xmlAllocOutputBufferInternal:
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered parser output
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ ret = (xmlOutputBufferPtr) xmlMalloc(sizeof(xmlOutputBuffer));
+ if (ret == NULL) {
+ xmlIOErrMemory("creating output buffer");
+ return(NULL);
+ }
+ memset(ret, 0, (size_t) sizeof(xmlOutputBuffer));
+ ret->buffer = xmlBufCreate();
+ if (ret->buffer == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+
+
+ /*
+ * For conversion buffers we use the special IO handling
+ */
+ xmlBufSetAllocationScheme(ret->buffer, XML_BUFFER_ALLOC_IO);
+
+ ret->encoder = encoder;
+ if (encoder != NULL) {
+ ret->conv = xmlBufCreateSize(4000);
+ if (ret->conv == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+
+ /*
+ * This call is designed to initiate the encoder state
+ */
+ xmlCharEncOutput(ret, 1);
+ } else
+ ret->conv = NULL;
+ ret->writecallback = NULL;
+ ret->closecallback = NULL;
+ ret->context = NULL;
+ ret->written = 0;
+
+ return(ret);
+}
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlFreeParserInputBuffer:
+ * @in: a buffered parser input
+ *
+ * Free up the memory used by a buffered parser input
+ */
+void
+xmlFreeParserInputBuffer(xmlParserInputBufferPtr in) {
+ if (in == NULL) return;
+
+ if (in->raw) {
+ xmlBufFree(in->raw);
+ in->raw = NULL;
+ }
+ if (in->encoder != NULL) {
+ xmlCharEncCloseFunc(in->encoder);
+ }
+ if (in->closecallback != NULL) {
+ in->closecallback(in->context);
+ }
+ if (in->buffer != NULL) {
+ xmlBufFree(in->buffer);
+ in->buffer = NULL;
+ }
+
+ xmlFree(in);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferClose:
+ * @out: a buffered output
+ *
+ * flushes and close the output I/O channel
+ * and free up all the associated resources
+ *
+ * Returns the number of byte written or -1 in case of error.
+ */
+int
+xmlOutputBufferClose(xmlOutputBufferPtr out)
+{
+ int written;
+ int err_rc = 0;
+
+ if (out == NULL)
+ return (-1);
+ if (out->writecallback != NULL)
+ xmlOutputBufferFlush(out);
+ if (out->closecallback != NULL) {
+ err_rc = out->closecallback(out->context);
+ }
+ written = out->written;
+ if (out->conv) {
+ xmlBufFree(out->conv);
+ out->conv = NULL;
+ }
+ if (out->encoder != NULL) {
+ xmlCharEncCloseFunc(out->encoder);
+ }
+ if (out->buffer != NULL) {
+ xmlBufFree(out->buffer);
+ out->buffer = NULL;
+ }
+
+ if (out->error)
+ err_rc = -1;
+ xmlFree(out);
+ return ((err_rc == 0) ? written : err_rc);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+xmlParserInputBufferPtr
+__xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+ int i = 0;
+ void *context = NULL;
+
+ if (xmlInputCallbackInitialized == 0)
+ xmlRegisterDefaultInputCallbacks();
+
+ if (URI == NULL) return(NULL);
+
+ /*
+ * Try to find one of the input accept method accepting that scheme
+ * Go in reverse to give precedence to user defined handlers.
+ */
+ if (context == NULL) {
+ for (i = xmlInputCallbackNr - 1;i >= 0;i--) {
+ if ((xmlInputCallbackTable[i].matchcallback != NULL) &&
+ (xmlInputCallbackTable[i].matchcallback(URI) != 0)) {
+ context = xmlInputCallbackTable[i].opencallback(URI);
+ if (context != NULL) {
+ break;
+ }
+ }
+ }
+ }
+ if (context == NULL) {
+ return(NULL);
+ }
+
+ /*
+ * Allocate the Input buffer front-end.
+ */
+ ret = xmlAllocParserInputBuffer(enc);
+ if (ret != NULL) {
+ ret->context = context;
+ ret->readcallback = xmlInputCallbackTable[i].readcallback;
+ ret->closecallback = xmlInputCallbackTable[i].closecallback;
+#ifdef HAVE_ZLIB_H
+ if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
+ (strcmp(URI, "-") != 0)) {
+#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1230
+ ret->compressed = !gzdirect(context);
+#else
+ if (((z_stream *)context)->avail_in > 4) {
+ char *cptr, buff4[4];
+ cptr = (char *) ((z_stream *)context)->next_in;
+ if (gzread(context, buff4, 4) == 4) {
+ if (strncmp(buff4, cptr, 4) == 0)
+ ret->compressed = 0;
+ else
+ ret->compressed = 1;
+ gzrewind(context);
+ }
+ }
+#endif
+ }
+#endif
+#ifdef HAVE_LZMA_H
+ if ((xmlInputCallbackTable[i].opencallback == xmlXzfileOpen) &&
+ (strcmp(URI, "-") != 0)) {
+ ret->compressed = __libxml2_xzcompressed(context);
+ }
+#endif
+ }
+ else
+ xmlInputCallbackTable[i].closecallback (context);
+
+ return(ret);
+}
+
+/**
+ * xmlParserInputBufferCreateFilename:
+ * @URI: a C string containing the URI or filename
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing of a file
+ * If filename is "-' then we use stdin as the input.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ * Do an encoding check if enc == XML_CHAR_ENCODING_NONE
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
+ if ((xmlParserInputBufferCreateFilenameValue)) {
+ return xmlParserInputBufferCreateFilenameValue(URI, enc);
+ }
+ return __xmlParserInputBufferCreateFilename(URI, enc);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+xmlOutputBufferPtr
+__xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression ATTRIBUTE_UNUSED) {
+ xmlOutputBufferPtr ret;
+ xmlURIPtr puri;
+ int i = 0;
+ void *context = NULL;
+ char *unescaped = NULL;
+#ifdef HAVE_ZLIB_H
+ int is_file_uri = 1;
+#endif
+
+ if (xmlOutputCallbackInitialized == 0)
+ xmlRegisterDefaultOutputCallbacks();
+
+ if (URI == NULL) return(NULL);
+
+ puri = xmlParseURI(URI);
+ if (puri != NULL) {
+#ifdef HAVE_ZLIB_H
+ if ((puri->scheme != NULL) &&
+ (!xmlStrEqual(BAD_CAST puri->scheme, BAD_CAST "file")))
+ is_file_uri = 0;
+#endif
+ /*
+ * try to limit the damages of the URI unescaping code.
+ */
+ if ((puri->scheme == NULL) ||
+ (xmlStrEqual(BAD_CAST puri->scheme, BAD_CAST "file")))
+ unescaped = xmlURIUnescapeString(URI, 0, NULL);
+ xmlFreeURI(puri);
+ }
+
+ /*
+ * Try to find one of the output accept method accepting that scheme
+ * Go in reverse to give precedence to user defined handlers.
+ * try with an unescaped version of the URI
+ */
+ if (unescaped != NULL) {
+#ifdef HAVE_ZLIB_H
+ if ((compression > 0) && (compression <= 9) && (is_file_uri == 1)) {
+ context = xmlGzfileOpenW(unescaped, compression);
+ if (context != NULL) {
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = context;
+ ret->writecallback = xmlGzfileWrite;
+ ret->closecallback = xmlGzfileClose;
+ }
+ xmlFree(unescaped);
+ return(ret);
+ }
+ }
+#endif
+ for (i = xmlOutputCallbackNr - 1;i >= 0;i--) {
+ if ((xmlOutputCallbackTable[i].matchcallback != NULL) &&
+ (xmlOutputCallbackTable[i].matchcallback(unescaped) != 0)) {
+#if defined(LIBXML_HTTP_ENABLED) && defined(HAVE_ZLIB_H)
+ /* Need to pass compression parameter into HTTP open calls */
+ if (xmlOutputCallbackTable[i].matchcallback == xmlIOHTTPMatch)
+ context = xmlIOHTTPOpenW(unescaped, compression);
+ else
+#endif
+ context = xmlOutputCallbackTable[i].opencallback(unescaped);
+ if (context != NULL)
+ break;
+ }
+ }
+ xmlFree(unescaped);
+ }
+
+ /*
+ * If this failed try with a non-escaped URI this may be a strange
+ * filename
+ */
+ if (context == NULL) {
+#ifdef HAVE_ZLIB_H
+ if ((compression > 0) && (compression <= 9) && (is_file_uri == 1)) {
+ context = xmlGzfileOpenW(URI, compression);
+ if (context != NULL) {
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = context;
+ ret->writecallback = xmlGzfileWrite;
+ ret->closecallback = xmlGzfileClose;
+ }
+ return(ret);
+ }
+ }
+#endif
+ for (i = xmlOutputCallbackNr - 1;i >= 0;i--) {
+ if ((xmlOutputCallbackTable[i].matchcallback != NULL) &&
+ (xmlOutputCallbackTable[i].matchcallback(URI) != 0)) {
+#if defined(LIBXML_HTTP_ENABLED) && defined(HAVE_ZLIB_H)
+ /* Need to pass compression parameter into HTTP open calls */
+ if (xmlOutputCallbackTable[i].matchcallback == xmlIOHTTPMatch)
+ context = xmlIOHTTPOpenW(URI, compression);
+ else
+#endif
+ context = xmlOutputCallbackTable[i].opencallback(URI);
+ if (context != NULL)
+ break;
+ }
+ }
+ }
+
+ if (context == NULL) {
+ return(NULL);
+ }
+
+ /*
+ * Allocate the Output buffer front-end.
+ */
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = context;
+ ret->writecallback = xmlOutputCallbackTable[i].writecallback;
+ ret->closecallback = xmlOutputCallbackTable[i].closecallback;
+ }
+ return(ret);
+}
+
+/**
+ * xmlOutputBufferCreateFilename:
+ * @URI: a C string containing the URI or filename
+ * @encoder: the encoding converter or NULL
+ * @compression: the compression ration (0 none, 9 max).
+ *
+ * Create a buffered output for the progressive saving of a file
+ * If filename is "-' then we use stdout as the output.
+ * Automatic support for ZLIB/Compress compressed document is provided
+ * by default if found at compile-time.
+ * TODO: currently if compression is set, the library only support
+ * writing to a local file.
+ *
+ * Returns the new output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression ATTRIBUTE_UNUSED) {
+ if ((xmlOutputBufferCreateFilenameValue)) {
+ return xmlOutputBufferCreateFilenameValue(URI, encoder, compression);
+ }
+ return __xmlOutputBufferCreateFilename(URI, encoder, compression);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserInputBufferCreateFile:
+ * @file: a FILE*
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing of a FILE *
+ * buffered C I/O
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateFile(FILE *file, xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+
+ if (xmlInputCallbackInitialized == 0)
+ xmlRegisterDefaultInputCallbacks();
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(enc);
+ if (ret != NULL) {
+ ret->context = file;
+ ret->readcallback = xmlFileRead;
+ ret->closecallback = xmlFileFlush;
+ }
+
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferCreateFile:
+ * @file: a FILE*
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a FILE *
+ * buffered C I/O
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateFile(FILE *file, xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (xmlOutputCallbackInitialized == 0)
+ xmlRegisterDefaultOutputCallbacks();
+
+ if (file == NULL) return(NULL);
+
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = file;
+ ret->writecallback = xmlFileWrite;
+ ret->closecallback = xmlFileFlush;
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlOutputBufferCreateBuffer:
+ * @buffer: a xmlBufferPtr
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving to a xmlBuffer
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateBuffer(xmlBufferPtr buffer,
+ xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (buffer == NULL) return(NULL);
+
+ ret = xmlOutputBufferCreateIO((xmlOutputWriteCallback)
+ xmlBufferWrite,
+ (xmlOutputCloseCallback)
+ NULL, (void *) buffer, encoder);
+
+ return(ret);
+}
+
+/**
+ * xmlOutputBufferGetContent:
+ * @out: an xmlOutputBufferPtr
+ *
+ * Gives a pointer to the data currently held in the output buffer
+ *
+ * Returns a pointer to the data or NULL in case of error
+ */
+const xmlChar *
+xmlOutputBufferGetContent(xmlOutputBufferPtr out) {
+ if ((out == NULL) || (out->buffer == NULL))
+ return(NULL);
+
+ return(xmlBufContent(out->buffer));
+}
+
+/**
+ * xmlOutputBufferGetSize:
+ * @out: an xmlOutputBufferPtr
+ *
+ * Gives the length of the data currently held in the output buffer
+ *
+ * Returns 0 in case or error or no data is held, the size otherwise
+ */
+size_t
+xmlOutputBufferGetSize(xmlOutputBufferPtr out) {
+ if ((out == NULL) || (out->buffer == NULL))
+ return(0);
+
+ return(xmlBufUse(out->buffer));
+}
+
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserInputBufferCreateFd:
+ * @fd: a file descriptor number
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing for the input
+ * from a file descriptor
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+
+ if (fd < 0) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(enc);
+ if (ret != NULL) {
+ ret->context = (void *) (long) fd;
+ ret->readcallback = xmlFdRead;
+ ret->closecallback = xmlFdClose;
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlParserInputBufferCreateMem:
+ * @mem: the memory input
+ * @size: the length of the memory block
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing for the input
+ * from a memory area.
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+ int errcode;
+
+ if (size <= 0) return(NULL);
+ if (mem == NULL) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(enc);
+ if (ret != NULL) {
+ ret->context = (void *) mem;
+ ret->readcallback = (xmlInputReadCallback) xmlNop;
+ ret->closecallback = NULL;
+ errcode = xmlBufAdd(ret->buffer, (const xmlChar *) mem, size);
+ if (errcode != 0) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlParserInputBufferCreateStatic:
+ * @mem: the memory input
+ * @size: the length of the memory block
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing for the input
+ * from an immutable memory area. This will not copy the memory area to
+ * the buffer, but the memory is expected to be available until the end of
+ * the parsing, this is useful for example when using mmap'ed file.
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateStatic(const char *mem, int size,
+ xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+
+ if (size <= 0) return(NULL);
+ if (mem == NULL) return(NULL);
+
+ ret = (xmlParserInputBufferPtr) xmlMalloc(sizeof(xmlParserInputBuffer));
+ if (ret == NULL) {
+ xmlIOErrMemory("creating input buffer");
+ return(NULL);
+ }
+ memset(ret, 0, (size_t) sizeof(xmlParserInputBuffer));
+ ret->buffer = xmlBufCreateStatic((void *)mem, (size_t) size);
+ if (ret->buffer == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->encoder = xmlGetCharEncodingHandler(enc);
+ if (ret->encoder != NULL)
+ ret->raw = xmlBufCreateSize(2 * xmlDefaultBufferSize);
+ else
+ ret->raw = NULL;
+ ret->compressed = -1;
+ ret->context = (void *) mem;
+ ret->readcallback = NULL;
+ ret->closecallback = NULL;
+
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferCreateFd:
+ * @fd: a file descriptor number
+ * @encoder: the encoding converter or NULL
+ *
+ * Create a buffered output for the progressive saving
+ * to a file descriptor
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateFd(int fd, xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (fd < 0) return(NULL);
+
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = (void *) (long) fd;
+ ret->writecallback = xmlFdWrite;
+ ret->closecallback = NULL;
+ }
+
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserInputBufferCreateIO:
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @enc: the charset encoding if known
+ *
+ * Create a buffered parser input for the progressive parsing for the input
+ * from an I/O handler
+ *
+ * Returns the new parser input or NULL
+ */
+xmlParserInputBufferPtr
+xmlParserInputBufferCreateIO(xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc) {
+ xmlParserInputBufferPtr ret;
+
+ if (ioread == NULL) return(NULL);
+
+ ret = xmlAllocParserInputBuffer(enc);
+ if (ret != NULL) {
+ ret->context = (void *) ioctx;
+ ret->readcallback = ioread;
+ ret->closecallback = ioclose;
+ }
+
+ return(ret);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferCreateIO:
+ * @iowrite: an I/O write function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @encoder: the charset encoding if known
+ *
+ * Create a buffered output for the progressive saving
+ * to an I/O handler
+ *
+ * Returns the new parser output or NULL
+ */
+xmlOutputBufferPtr
+xmlOutputBufferCreateIO(xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose, void *ioctx,
+ xmlCharEncodingHandlerPtr encoder) {
+ xmlOutputBufferPtr ret;
+
+ if (iowrite == NULL) return(NULL);
+
+ ret = xmlAllocOutputBufferInternal(encoder);
+ if (ret != NULL) {
+ ret->context = (void *) ioctx;
+ ret->writecallback = iowrite;
+ ret->closecallback = ioclose;
+ }
+
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserInputBufferCreateFilenameDefault:
+ * @func: function pointer to the new ParserInputBufferCreateFilenameFunc
+ *
+ * Registers a callback for URI input file handling
+ *
+ * Returns the old value of the registration function
+ */
+xmlParserInputBufferCreateFilenameFunc
+xmlParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
+{
+ xmlParserInputBufferCreateFilenameFunc old = xmlParserInputBufferCreateFilenameValue;
+ if (old == NULL) {
+ old = __xmlParserInputBufferCreateFilename;
+ }
+
+ xmlParserInputBufferCreateFilenameValue = func;
+ return(old);
+}
+
+/**
+ * xmlOutputBufferCreateFilenameDefault:
+ * @func: function pointer to the new OutputBufferCreateFilenameFunc
+ *
+ * Registers a callback for URI output file handling
+ *
+ * Returns the old value of the registration function
+ */
+xmlOutputBufferCreateFilenameFunc
+xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
+{
+ xmlOutputBufferCreateFilenameFunc old = xmlOutputBufferCreateFilenameValue;
+#ifdef LIBXML_OUTPUT_ENABLED
+ if (old == NULL) {
+ old = __xmlOutputBufferCreateFilename;
+ }
+#endif
+ xmlOutputBufferCreateFilenameValue = func;
+ return(old);
+}
+
+/**
+ * xmlParserInputBufferPush:
+ * @in: a buffered parser input
+ * @len: the size in bytes of the array.
+ * @buf: an char array
+ *
+ * Push the content of the arry in the input buffer
+ * This routine handle the I18N transcoding to internal UTF-8
+ * This is used when operating the parser in progressive (push) mode.
+ *
+ * Returns the number of chars read and stored in the buffer, or -1
+ * in case of error.
+ */
+int
+xmlParserInputBufferPush(xmlParserInputBufferPtr in,
+ int len, const char *buf) {
+ int nbchars = 0;
+ int ret;
+
+ if (len < 0) return(0);
+ if ((in == NULL) || (in->error)) return(-1);
+ if (in->encoder != NULL) {
+ unsigned int use;
+
+ /*
+ * Store the data in the incoming raw buffer
+ */
+ if (in->raw == NULL) {
+ in->raw = xmlBufCreate();
+ }
+ ret = xmlBufAdd(in->raw, (const xmlChar *) buf, len);
+ if (ret != 0)
+ return(-1);
+
+ /*
+ * convert as much as possible to the parser reading buffer.
+ */
+ use = xmlBufUse(in->raw);
+ nbchars = xmlCharEncInput(in, 1);
+ if (nbchars < 0) {
+ xmlIOErr(XML_IO_ENCODER, NULL);
+ in->error = XML_IO_ENCODER;
+ return(-1);
+ }
+ in->rawconsumed += (use - xmlBufUse(in->raw));
+ } else {
+ nbchars = len;
+ ret = xmlBufAdd(in->buffer, (xmlChar *) buf, nbchars);
+ if (ret != 0)
+ return(-1);
+ }
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext,
+ "I/O: pushed %d chars, buffer %d/%d\n",
+ nbchars, xmlBufUse(in->buffer), xmlBufLength(in->buffer));
+#endif
+ return(nbchars);
+}
+
+/**
+ * endOfInput:
+ *
+ * When reading from an Input channel indicated end of file or error
+ * don't reread from it again.
+ */
+static int
+endOfInput (void * context ATTRIBUTE_UNUSED,
+ char * buffer ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED) {
+ return(0);
+}
+
+/**
+ * xmlParserInputBufferGrow:
+ * @in: a buffered parser input
+ * @len: indicative value of the amount of chars to read
+ *
+ * Grow up the content of the input buffer, the old data are preserved
+ * This routine handle the I18N transcoding to internal UTF-8
+ * This routine is used when operating the parser in normal (pull) mode
+ *
+ * TODO: one should be able to remove one extra copy by copying directly
+ * onto in->buffer or in->raw
+ *
+ * Returns the number of chars read and stored in the buffer, or -1
+ * in case of error.
+ */
+int
+xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
+ char *buffer = NULL;
+ int res = 0;
+ int nbchars = 0;
+
+ if ((in == NULL) || (in->error)) return(-1);
+ if ((len <= MINLEN) && (len != 4))
+ len = MINLEN;
+
+ if (xmlBufAvail(in->buffer) <= 0) {
+ xmlIOErr(XML_IO_BUFFER_FULL, NULL);
+ in->error = XML_IO_BUFFER_FULL;
+ return(-1);
+ }
+
+ if (xmlBufGrow(in->buffer, len + 1) < 0) {
+ xmlIOErrMemory("growing input buffer");
+ in->error = XML_ERR_NO_MEMORY;
+ return(-1);
+ }
+ buffer = (char *)xmlBufEnd(in->buffer);
+
+ /*
+ * Call the read method for this I/O type.
+ */
+ if (in->readcallback != NULL) {
+ res = in->readcallback(in->context, &buffer[0], len);
+ if (res <= 0)
+ in->readcallback = endOfInput;
+ } else {
+ xmlIOErr(XML_IO_NO_INPUT, NULL);
+ in->error = XML_IO_NO_INPUT;
+ return(-1);
+ }
+ if (res < 0) {
+ return(-1);
+ }
+
+ /*
+ * try to establish compressed status of input if not done already
+ */
+ if (in->compressed == -1) {
+#ifdef HAVE_LZMA_H
+ if (in->readcallback == xmlXzfileRead)
+ in->compressed = __libxml2_xzcompressed(in->context);
+#endif
+ }
+
+ len = res;
+ if (in->encoder != NULL) {
+ unsigned int use;
+
+ /*
+ * Store the data in the incoming raw buffer
+ */
+ if (in->raw == NULL) {
+ in->raw = xmlBufCreate();
+ }
+ res = xmlBufAdd(in->raw, (const xmlChar *) buffer, len);
+ if (res != 0)
+ return(-1);
+
+ /*
+ * convert as much as possible to the parser reading buffer.
+ */
+ use = xmlBufUse(in->raw);
+ nbchars = xmlCharEncInput(in, 1);
+ if (nbchars < 0) {
+ xmlIOErr(XML_IO_ENCODER, NULL);
+ in->error = XML_IO_ENCODER;
+ return(-1);
+ }
+ in->rawconsumed += (use - xmlBufUse(in->raw));
+ } else {
+ nbchars = len;
+ xmlBufAddLen(in->buffer, nbchars);
+ }
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext,
+ "I/O: read %d chars, buffer %d\n",
+ nbchars, xmlBufUse(in->buffer));
+#endif
+ return(nbchars);
+}
+
+/**
+ * xmlParserInputBufferRead:
+ * @in: a buffered parser input
+ * @len: indicative value of the amount of chars to read
+ *
+ * Refresh the content of the input buffer, the old data are considered
+ * consumed
+ * This routine handle the I18N transcoding to internal UTF-8
+ *
+ * Returns the number of chars read and stored in the buffer, or -1
+ * in case of error.
+ */
+int
+xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len) {
+ if ((in == NULL) || (in->error)) return(-1);
+ if (in->readcallback != NULL)
+ return(xmlParserInputBufferGrow(in, len));
+ else if (xmlBufGetAllocationScheme(in->buffer) == XML_BUFFER_ALLOC_IMMUTABLE)
+ return(0);
+ else
+ return(-1);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/**
+ * xmlOutputBufferWrite:
+ * @out: a buffered parser output
+ * @len: the size in bytes of the array.
+ * @buf: an char array
+ *
+ * Write the content of the array in the output I/O buffer
+ * This routine handle the I18N transcoding from internal UTF-8
+ * The buffer is lossless, i.e. will store in case of partial
+ * or delayed writes.
+ *
+ * Returns the number of chars immediately written, or -1
+ * in case of error.
+ */
+int
+xmlOutputBufferWrite(xmlOutputBufferPtr out, int len, const char *buf) {
+ int nbchars = 0; /* number of chars to output to I/O */
+ int ret; /* return from function call */
+ int written = 0; /* number of char written to I/O so far */
+ int chunk; /* number of byte curreent processed from buf */
+
+ if ((out == NULL) || (out->error)) return(-1);
+ if (len < 0) return(0);
+ if (out->error) return(-1);
+
+ do {
+ chunk = len;
+ if (chunk > 4 * MINLEN)
+ chunk = 4 * MINLEN;
+
+ /*
+ * first handle encoding stuff.
+ */
+ if (out->encoder != NULL) {
+ /*
+ * Store the data in the incoming raw buffer
+ */
+ if (out->conv == NULL) {
+ out->conv = xmlBufCreate();
+ }
+ ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
+ if (ret != 0)
+ return(-1);
+
+ if ((xmlBufUse(out->buffer) < MINLEN) && (chunk == len))
+ goto done;
+
+ /*
+ * convert as much as possible to the parser reading buffer.
+ */
+ ret = xmlCharEncOutput(out, 0);
+ if ((ret < 0) && (ret != -3)) {
+ xmlIOErr(XML_IO_ENCODER, NULL);
+ out->error = XML_IO_ENCODER;
+ return(-1);
+ }
+ nbchars = xmlBufUse(out->conv);
+ } else {
+ ret = xmlBufAdd(out->buffer, (const xmlChar *) buf, chunk);
+ if (ret != 0)
+ return(-1);
+ nbchars = xmlBufUse(out->buffer);
+ }
+ buf += chunk;
+ len -= chunk;
+
+ if ((nbchars < MINLEN) && (len <= 0))
+ goto done;
+
+ if (out->writecallback) {
+ /*
+ * second write the stuff to the I/O channel
+ */
+ if (out->encoder != NULL) {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->conv), nbchars);
+ if (ret >= 0)
+ xmlBufShrink(out->conv, ret);
+ } else {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->buffer), nbchars);
+ if (ret >= 0)
+ xmlBufShrink(out->buffer, ret);
+ }
+ if (ret < 0) {
+ xmlIOErr(XML_IO_WRITE, NULL);
+ out->error = XML_IO_WRITE;
+ return(ret);
+ }
+ out->written += ret;
+ }
+ written += nbchars;
+ } while (len > 0);
+
+done:
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext,
+ "I/O: wrote %d chars\n", written);
+#endif
+ return(written);
+}
+
+/**
+ * xmlEscapeContent:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of unescaped UTF-8 bytes
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and escape them.
+ * Returns 0 if success, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+static int
+xmlEscapeContent(unsigned char* out, int *outlen,
+ const xmlChar* in, int *inlen) {
+ unsigned char* outstart = out;
+ const unsigned char* base = in;
+ unsigned char* outend = out + *outlen;
+ const unsigned char* inend;
+
+ inend = in + (*inlen);
+
+ while ((in < inend) && (out < outend)) {
+ if (*in == '<') {
+ if (outend - out < 4) break;
+ *out++ = '&';
+ *out++ = 'l';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*in == '>') {
+ if (outend - out < 4) break;
+ *out++ = '&';
+ *out++ = 'g';
+ *out++ = 't';
+ *out++ = ';';
+ } else if (*in == '&') {
+ if (outend - out < 5) break;
+ *out++ = '&';
+ *out++ = 'a';
+ *out++ = 'm';
+ *out++ = 'p';
+ *out++ = ';';
+ } else if (*in == '\r') {
+ if (outend - out < 5) break;
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = '1';
+ *out++ = '3';
+ *out++ = ';';
+ } else {
+ *out++ = (unsigned char) *in;
+ }
+ ++in;
+ }
+ *outlen = out - outstart;
+ *inlen = in - base;
+ return(0);
+}
+
+/**
+ * xmlOutputBufferWriteEscape:
+ * @out: a buffered parser output
+ * @str: a zero terminated UTF-8 string
+ * @escaping: an optional escaping function (or NULL)
+ *
+ * Write the content of the string in the output I/O buffer
+ * This routine escapes the caracters and then handle the I18N
+ * transcoding from internal UTF-8
+ * The buffer is lossless, i.e. will store in case of partial
+ * or delayed writes.
+ *
+ * Returns the number of chars immediately written, or -1
+ * in case of error.
+ */
+int
+xmlOutputBufferWriteEscape(xmlOutputBufferPtr out, const xmlChar *str,
+ xmlCharEncodingOutputFunc escaping) {
+ int nbchars = 0; /* number of chars to output to I/O */
+ int ret; /* return from function call */
+ int written = 0; /* number of char written to I/O so far */
+ int oldwritten=0;/* loop guard */
+ int chunk; /* number of byte currently processed from str */
+ int len; /* number of bytes in str */
+ int cons; /* byte from str consumed */
+
+ if ((out == NULL) || (out->error) || (str == NULL) ||
+ (out->buffer == NULL) ||
+ (xmlBufGetAllocationScheme(out->buffer) == XML_BUFFER_ALLOC_IMMUTABLE))
+ return(-1);
+ len = strlen((const char *)str);
+ if (len < 0) return(0);
+ if (out->error) return(-1);
+ if (escaping == NULL) escaping = xmlEscapeContent;
+
+ do {
+ oldwritten = written;
+
+ /*
+ * how many bytes to consume and how many bytes to store.
+ */
+ cons = len;
+ chunk = xmlBufAvail(out->buffer) - 1;
+
+ /*
+ * make sure we have enough room to save first, if this is
+ * not the case force a flush, but make sure we stay in the loop
+ */
+ if (chunk < 40) {
+ if (xmlBufGrow(out->buffer, 100) < 0)
+ return(-1);
+ oldwritten = -1;
+ continue;
+ }
+
+ /*
+ * first handle encoding stuff.
+ */
+ if (out->encoder != NULL) {
+ /*
+ * Store the data in the incoming raw buffer
+ */
+ if (out->conv == NULL) {
+ out->conv = xmlBufCreate();
+ }
+ ret = escaping(xmlBufEnd(out->buffer) ,
+ &chunk, str, &cons);
+ if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
+ return(-1);
+ xmlBufAddLen(out->buffer, chunk);
+
+ if ((xmlBufUse(out->buffer) < MINLEN) && (cons == len))
+ goto done;
+
+ /*
+ * convert as much as possible to the output buffer.
+ */
+ ret = xmlCharEncOutput(out, 0);
+ if ((ret < 0) && (ret != -3)) {
+ xmlIOErr(XML_IO_ENCODER, NULL);
+ out->error = XML_IO_ENCODER;
+ return(-1);
+ }
+ nbchars = xmlBufUse(out->conv);
+ } else {
+ ret = escaping(xmlBufEnd(out->buffer), &chunk, str, &cons);
+ if ((ret < 0) || (chunk == 0)) /* chunk==0 => nothing done */
+ return(-1);
+ xmlBufAddLen(out->buffer, chunk);
+ nbchars = xmlBufUse(out->buffer);
+ }
+ str += cons;
+ len -= cons;
+
+ if ((nbchars < MINLEN) && (len <= 0))
+ goto done;
+
+ if (out->writecallback) {
+ /*
+ * second write the stuff to the I/O channel
+ */
+ if (out->encoder != NULL) {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->conv), nbchars);
+ if (ret >= 0)
+ xmlBufShrink(out->conv, ret);
+ } else {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->buffer), nbchars);
+ if (ret >= 0)
+ xmlBufShrink(out->buffer, ret);
+ }
+ if (ret < 0) {
+ xmlIOErr(XML_IO_WRITE, NULL);
+ out->error = XML_IO_WRITE;
+ return(ret);
+ }
+ out->written += ret;
+ } else if (xmlBufAvail(out->buffer) < MINLEN) {
+ xmlBufGrow(out->buffer, MINLEN);
+ }
+ written += nbchars;
+ } while ((len > 0) && (oldwritten != written));
+
+done:
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext,
+ "I/O: wrote %d chars\n", written);
+#endif
+ return(written);
+}
+
+/**
+ * xmlOutputBufferWriteString:
+ * @out: a buffered parser output
+ * @str: a zero terminated C string
+ *
+ * Write the content of the string in the output I/O buffer
+ * This routine handle the I18N transcoding from internal UTF-8
+ * The buffer is lossless, i.e. will store in case of partial
+ * or delayed writes.
+ *
+ * Returns the number of chars immediately written, or -1
+ * in case of error.
+ */
+int
+xmlOutputBufferWriteString(xmlOutputBufferPtr out, const char *str) {
+ int len;
+
+ if ((out == NULL) || (out->error)) return(-1);
+ if (str == NULL)
+ return(-1);
+ len = strlen(str);
+
+ if (len > 0)
+ return(xmlOutputBufferWrite(out, len, str));
+ return(len);
+}
+
+/**
+ * xmlOutputBufferFlush:
+ * @out: a buffered output
+ *
+ * flushes the output I/O channel
+ *
+ * Returns the number of byte written or -1 in case of error.
+ */
+int
+xmlOutputBufferFlush(xmlOutputBufferPtr out) {
+ int nbchars = 0, ret = 0;
+
+ if ((out == NULL) || (out->error)) return(-1);
+ /*
+ * first handle encoding stuff.
+ */
+ if ((out->conv != NULL) && (out->encoder != NULL)) {
+ /*
+ * convert as much as possible to the parser output buffer.
+ */
+ do {
+ nbchars = xmlCharEncOutput(out, 0);
+ if (nbchars < 0) {
+ xmlIOErr(XML_IO_ENCODER, NULL);
+ out->error = XML_IO_ENCODER;
+ return(-1);
+ }
+ } while (nbchars);
+ }
+
+ /*
+ * second flush the stuff to the I/O channel
+ */
+ if ((out->conv != NULL) && (out->encoder != NULL) &&
+ (out->writecallback != NULL)) {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->conv),
+ xmlBufUse(out->conv));
+ if (ret >= 0)
+ xmlBufShrink(out->conv, ret);
+ } else if (out->writecallback != NULL) {
+ ret = out->writecallback(out->context,
+ (const char *)xmlBufContent(out->buffer),
+ xmlBufUse(out->buffer));
+ if (ret >= 0)
+ xmlBufShrink(out->buffer, ret);
+ }
+ if (ret < 0) {
+ xmlIOErr(XML_IO_FLUSH, NULL);
+ out->error = XML_IO_FLUSH;
+ return(ret);
+ }
+ out->written += ret;
+
+#ifdef DEBUG_INPUT
+ xmlGenericError(xmlGenericErrorContext,
+ "I/O: flushed %d chars\n", ret);
+#endif
+ return(ret);
+}
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserGetDirectory:
+ * @filename: the path to a file
+ *
+ * lookup the directory for that file
+ *
+ * Returns a new allocated string containing the directory, or NULL.
+ */
+char *
+xmlParserGetDirectory(const char *filename) {
+ char *ret = NULL;
+ char dir[1024];
+ char *cur;
+
+#ifdef _WIN32_WCE /* easy way by now ... wince does not have dirs! */
+ return NULL;
+#endif
+
+ if (xmlInputCallbackInitialized == 0)
+ xmlRegisterDefaultInputCallbacks();
+
+ if (filename == NULL) return(NULL);
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+# define IS_XMLPGD_SEP(ch) ((ch=='/')||(ch=='\\'))
+#else
+# define IS_XMLPGD_SEP(ch) (ch=='/')
+#endif
+
+ strncpy(dir, filename, 1023);
+ dir[1023] = 0;
+ cur = &dir[strlen(dir)];
+ while (cur > dir) {
+ if (IS_XMLPGD_SEP(*cur)) break;
+ cur --;
+ }
+ if (IS_XMLPGD_SEP(*cur)) {
+ if (cur == dir) dir[1] = 0;
+ else *cur = 0;
+ ret = xmlMemStrdup(dir);
+ } else {
+ if (getcwd(dir, 1024) != NULL) {
+ dir[1023] = 0;
+ ret = xmlMemStrdup(dir);
+ }
+ }
+ return(ret);
+#undef IS_XMLPGD_SEP
+}
+
+/****************************************************************
+ * *
+ * External entities loading *
+ * *
+ ****************************************************************/
+
+/**
+ * xmlCheckHTTPInput:
+ * @ctxt: an XML parser context
+ * @ret: an XML parser input
+ *
+ * Check an input in case it was created from an HTTP stream, in that
+ * case it will handle encoding and update of the base URL in case of
+ * redirection. It also checks for HTTP errors in which case the input
+ * is cleanly freed up and an appropriate error is raised in context
+ *
+ * Returns the input or NULL in case of HTTP error.
+ */
+xmlParserInputPtr
+xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret) {
+#ifdef LIBXML_HTTP_ENABLED
+ if ((ret != NULL) && (ret->buf != NULL) &&
+ (ret->buf->readcallback == xmlIOHTTPRead) &&
+ (ret->buf->context != NULL)) {
+ const char *encoding;
+ const char *redir;
+ const char *mime;
+ int code;
+
+ code = xmlNanoHTTPReturnCode(ret->buf->context);
+ if (code >= 400) {
+ /* fatal error */
+ if (ret->filename != NULL)
+ __xmlLoaderErr(ctxt, "failed to load HTTP resource \"%s\"\n",
+ (const char *) ret->filename);
+ else
+ __xmlLoaderErr(ctxt, "failed to load HTTP resource\n", NULL);
+ xmlFreeInputStream(ret);
+ ret = NULL;
+ } else {
+
+ mime = xmlNanoHTTPMimeType(ret->buf->context);
+ if ((xmlStrstr(BAD_CAST mime, BAD_CAST "/xml")) ||
+ (xmlStrstr(BAD_CAST mime, BAD_CAST "+xml"))) {
+ encoding = xmlNanoHTTPEncoding(ret->buf->context);
+ if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr handler;
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler != NULL) {
+ xmlSwitchInputEncoding(ctxt, ret, handler);
+ } else {
+ __xmlErrEncoding(ctxt, XML_ERR_UNKNOWN_ENCODING,
+ "Unknown encoding %s",
+ BAD_CAST encoding, NULL);
+ }
+ if (ret->encoding == NULL)
+ ret->encoding = xmlStrdup(BAD_CAST encoding);
+ }
+#if 0
+ } else if (xmlStrstr(BAD_CAST mime, BAD_CAST "html")) {
+#endif
+ }
+ redir = xmlNanoHTTPRedir(ret->buf->context);
+ if (redir != NULL) {
+ if (ret->filename != NULL)
+ xmlFree((xmlChar *) ret->filename);
+ if (ret->directory != NULL) {
+ xmlFree((xmlChar *) ret->directory);
+ ret->directory = NULL;
+ }
+ ret->filename =
+ (char *) xmlStrdup((const xmlChar *) redir);
+ }
+ }
+ }
+#endif
+ return(ret);
+}
+
+static int xmlNoNetExists(const char *URL) {
+ const char *path;
+
+ if (URL == NULL)
+ return(0);
+
+ if (!xmlStrncasecmp(BAD_CAST URL, BAD_CAST "file://localhost/", 17))
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &URL[17];
+#else
+ path = &URL[16];
+#endif
+ else if (!xmlStrncasecmp(BAD_CAST URL, BAD_CAST "file:///", 8)) {
+#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
+ path = &URL[8];
+#else
+ path = &URL[7];
+#endif
+ } else
+ path = URL;
+
+ return xmlCheckFilename(path);
+}
+
+#ifdef LIBXML_CATALOG_ENABLED
+
+/**
+ * xmlResolveResourceFromCatalog:
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @ctxt: the context in which the entity is called or NULL
+ *
+ * Resolves the URL and ID against the appropriate catalog.
+ * This function is used by xmlDefaultExternalEntityLoader and
+ * xmlNoNetExternalEntityLoader.
+ *
+ * Returns a new allocated URL, or NULL.
+ */
+static xmlChar *
+xmlResolveResourceFromCatalog(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlChar *resource = NULL;
+ xmlCatalogAllow pref;
+
+ /*
+ * If the resource doesn't exists as a file,
+ * try to load it from the resource pointed in the catalogs
+ */
+ pref = xmlCatalogGetDefaults();
+
+ if ((pref != XML_CATA_ALLOW_NONE) && (!xmlNoNetExists(URL))) {
+ /*
+ * Do a local lookup
+ */
+ if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
+ ((pref == XML_CATA_ALLOW_ALL) ||
+ (pref == XML_CATA_ALLOW_DOCUMENT))) {
+ resource = xmlCatalogLocalResolve(ctxt->catalogs,
+ (const xmlChar *)ID,
+ (const xmlChar *)URL);
+ }
+ /*
+ * Try a global lookup
+ */
+ if ((resource == NULL) &&
+ ((pref == XML_CATA_ALLOW_ALL) ||
+ (pref == XML_CATA_ALLOW_GLOBAL))) {
+ resource = xmlCatalogResolve((const xmlChar *)ID,
+ (const xmlChar *)URL);
+ }
+ if ((resource == NULL) && (URL != NULL))
+ resource = xmlStrdup((const xmlChar *) URL);
+
+ /*
+ * TODO: do an URI lookup on the reference
+ */
+ if ((resource != NULL) && (!xmlNoNetExists((const char *)resource))) {
+ xmlChar *tmp = NULL;
+
+ if ((ctxt != NULL) && (ctxt->catalogs != NULL) &&
+ ((pref == XML_CATA_ALLOW_ALL) ||
+ (pref == XML_CATA_ALLOW_DOCUMENT))) {
+ tmp = xmlCatalogLocalResolveURI(ctxt->catalogs, resource);
+ }
+ if ((tmp == NULL) &&
+ ((pref == XML_CATA_ALLOW_ALL) ||
+ (pref == XML_CATA_ALLOW_GLOBAL))) {
+ tmp = xmlCatalogResolveURI(resource);
+ }
+
+ if (tmp != NULL) {
+ xmlFree(resource);
+ resource = tmp;
+ }
+ }
+ }
+
+ return resource;
+}
+
+#endif
+
+/**
+ * xmlDefaultExternalEntityLoader:
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @ctxt: the context in which the entity is called or NULL
+ *
+ * By default we don't load external entitites, yet.
+ *
+ * Returns a new allocated xmlParserInputPtr, or NULL.
+ */
+static xmlParserInputPtr
+xmlDefaultExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt)
+{
+ xmlParserInputPtr ret = NULL;
+ xmlChar *resource = NULL;
+
+#ifdef DEBUG_EXTERNAL_ENTITIES
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlDefaultExternalEntityLoader(%s, xxx)\n", URL);
+#endif
+ if ((ctxt != NULL) && (ctxt->options & XML_PARSE_NONET)) {
+ int options = ctxt->options;
+
+ ctxt->options -= XML_PARSE_NONET;
+ ret = xmlNoNetExternalEntityLoader(URL, ID, ctxt);
+ ctxt->options = options;
+ return(ret);
+ }
+#ifdef LIBXML_CATALOG_ENABLED
+ resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
+#endif
+
+ if (resource == NULL)
+ resource = (xmlChar *) URL;
+
+ if (resource == NULL) {
+ if (ID == NULL)
+ ID = "NULL";
+ __xmlLoaderErr(ctxt, "failed to load external entity \"%s\"\n", ID);
+ return (NULL);
+ }
+ ret = xmlNewInputFromFile(ctxt, (const char *) resource);
+ if ((resource != NULL) && (resource != (xmlChar *) URL))
+ xmlFree(resource);
+ return (ret);
+}
+
+static xmlExternalEntityLoader xmlCurrentExternalEntityLoader =
+ xmlDefaultExternalEntityLoader;
+
+/**
+ * xmlSetExternalEntityLoader:
+ * @f: the new entity resolver function
+ *
+ * Changes the defaultexternal entity resolver function for the application
+ */
+void
+xmlSetExternalEntityLoader(xmlExternalEntityLoader f) {
+ xmlCurrentExternalEntityLoader = f;
+}
+
+/**
+ * xmlGetExternalEntityLoader:
+ *
+ * Get the default external entity resolver function for the application
+ *
+ * Returns the xmlExternalEntityLoader function pointer
+ */
+xmlExternalEntityLoader
+xmlGetExternalEntityLoader(void) {
+ return(xmlCurrentExternalEntityLoader);
+}
+
+/**
+ * xmlLoadExternalEntity:
+ * @URL: the URL for the entity to load
+ * @ID: the Public ID for the entity to load
+ * @ctxt: the context in which the entity is called or NULL
+ *
+ * Load an external entity, note that the use of this function for
+ * unparsed entities may generate problems
+ *
+ * Returns the xmlParserInputPtr or NULL
+ */
+xmlParserInputPtr
+xmlLoadExternalEntity(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ if ((URL != NULL) && (xmlNoNetExists(URL) == 0)) {
+ char *canonicFilename;
+ xmlParserInputPtr ret;
+
+ canonicFilename = (char *) xmlCanonicPath((const xmlChar *) URL);
+ if (canonicFilename == NULL) {
+ xmlIOErrMemory("building canonical path\n");
+ return(NULL);
+ }
+
+ ret = xmlCurrentExternalEntityLoader(canonicFilename, ID, ctxt);
+ xmlFree(canonicFilename);
+ return(ret);
+ }
+ return(xmlCurrentExternalEntityLoader(URL, ID, ctxt));
+}
+
+/************************************************************************
+ * *
+ * Disabling Network access *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNoNetExternalEntityLoader:
+ * @URL: the URL for the entity to load
+ * @ID: the System ID for the entity to load
+ * @ctxt: the context in which the entity is called or NULL
+ *
+ * A specific entity loader disabling network accesses, though still
+ * allowing local catalog accesses for resolution.
+ *
+ * Returns a new allocated xmlParserInputPtr, or NULL.
+ */
+xmlParserInputPtr
+xmlNoNetExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr input = NULL;
+ xmlChar *resource = NULL;
+
+#ifdef LIBXML_CATALOG_ENABLED
+ resource = xmlResolveResourceFromCatalog(URL, ID, ctxt);
+#endif
+
+ if (resource == NULL)
+ resource = (xmlChar *) URL;
+
+ if (resource != NULL) {
+ if ((!xmlStrncasecmp(BAD_CAST resource, BAD_CAST "ftp://", 6)) ||
+ (!xmlStrncasecmp(BAD_CAST resource, BAD_CAST "http://", 7))) {
+ xmlIOErr(XML_IO_NETWORK_ATTEMPT, (const char *) resource);
+ if (resource != (xmlChar *) URL)
+ xmlFree(resource);
+ return(NULL);
+ }
+ }
+ input = xmlDefaultExternalEntityLoader((const char *) resource, ID, ctxt);
+ if (resource != (xmlChar *) URL)
+ xmlFree(resource);
+ return(input);
+}
+
+#define bottom_xmlIO
+#include "elfgcchack.h"
diff --git a/xmlcatalog.c b/xmlcatalog.c
new file mode 100644
index 0000000..b9ed6a4
--- /dev/null
+++ b/xmlcatalog.c
@@ -0,0 +1,615 @@
+/*
+ * xmlcatalog.c : a small utility program to handle XML catalogs
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_LIBREADLINE
+#include <readline/readline.h>
+#ifdef HAVE_LIBHISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/uri.h>
+#include <libxml/catalog.h>
+#include <libxml/parser.h>
+#include <libxml/globals.h>
+
+#if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
+static int shell = 0;
+static int sgml = 0;
+static int noout = 0;
+static int create = 0;
+static int add = 0;
+static int del = 0;
+static int convert = 0;
+static int no_super_update = 0;
+static int verbose = 0;
+static char *filename = NULL;
+
+
+#ifndef XML_SGML_DEFAULT_CATALOG
+#define XML_SGML_DEFAULT_CATALOG "/etc/sgml/catalog"
+#endif
+
+/************************************************************************
+ * *
+ * Shell Interface *
+ * *
+ ************************************************************************/
+/**
+ * xmlShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a pointer to it or NULL on EOF the caller is expected to
+ * free the returned string.
+ */
+static char *
+xmlShellReadline(const char *prompt) {
+#ifdef HAVE_LIBREADLINE
+ char *line_read;
+
+ /* Get a line from the user. */
+ line_read = readline (prompt);
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read)
+ add_history (line_read);
+
+ return (line_read);
+#else
+ char line_read[501];
+ char *ret;
+ int len;
+
+ if (prompt != NULL)
+ fprintf(stdout, "%s", prompt);
+ if (!fgets(line_read, 500, stdin))
+ return(NULL);
+ line_read[500] = 0;
+ len = strlen(line_read);
+ ret = (char *) malloc(len + 1);
+ if (ret != NULL) {
+ memcpy (ret, line_read, len + 1);
+ }
+ return(ret);
+#endif
+}
+
+static void usershell(void) {
+ char *cmdline = NULL, *cur;
+ int nbargs;
+ char command[100];
+ char arg[400];
+ char *argv[20];
+ int i, ret;
+ xmlChar *ans;
+
+ while (1) {
+ cmdline = xmlShellReadline("> ");
+ if (cmdline == NULL)
+ return;
+
+ /*
+ * Parse the command itself
+ */
+ cur = cmdline;
+ nbargs = 0;
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ i = 0;
+ while ((*cur != ' ') && (*cur != '\t') &&
+ (*cur != '\n') && (*cur != '\r')) {
+ if (*cur == 0)
+ break;
+ command[i++] = *cur++;
+ }
+ command[i] = 0;
+ if (i == 0) {
+ free(cmdline);
+ continue;
+ }
+
+ /*
+ * Parse the argument string
+ */
+ memset(arg, 0, sizeof(arg));
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ i = 0;
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ if (*cur == 0)
+ break;
+ arg[i++] = *cur++;
+ }
+ arg[i] = 0;
+
+ /*
+ * Parse the arguments
+ */
+ i = 0;
+ nbargs = 0;
+ cur = arg;
+ memset(argv, 0, sizeof(argv));
+ while (*cur != 0) {
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (*cur == '\'') {
+ cur++;
+ argv[i] = cur;
+ while ((*cur != 0) && (*cur != '\'')) cur++;
+ if (*cur == '\'') {
+ *cur = 0;
+ nbargs++;
+ i++;
+ cur++;
+ }
+ } else if (*cur == '"') {
+ cur++;
+ argv[i] = cur;
+ while ((*cur != 0) && (*cur != '"')) cur++;
+ if (*cur == '"') {
+ *cur = 0;
+ nbargs++;
+ i++;
+ cur++;
+ }
+ } else {
+ argv[i] = cur;
+ while ((*cur != 0) && (*cur != ' ') && (*cur != '\t'))
+ cur++;
+ *cur = 0;
+ nbargs++;
+ i++;
+ cur++;
+ }
+ }
+
+ /*
+ * start interpreting the command
+ */
+ if (!strcmp(command, "exit") ||
+ !strcmp(command, "quit") ||
+ !strcmp(command, "bye")) {
+ free(cmdline);
+ break;
+ }
+
+ if (!strcmp(command, "public")) {
+ if (nbargs != 1) {
+ printf("public requires 1 arguments\n");
+ } else {
+ ans = xmlCatalogResolvePublic((const xmlChar *) argv[0]);
+ if (ans == NULL) {
+ printf("No entry for PUBLIC %s\n", argv[0]);
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree(ans);
+ }
+ }
+ } else if (!strcmp(command, "system")) {
+ if (nbargs != 1) {
+ printf("system requires 1 arguments\n");
+ } else {
+ ans = xmlCatalogResolveSystem((const xmlChar *) argv[0]);
+ if (ans == NULL) {
+ printf("No entry for SYSTEM %s\n", argv[0]);
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree(ans);
+ }
+ }
+ } else if (!strcmp(command, "add")) {
+ if (sgml) {
+ if ((nbargs != 3) && (nbargs != 2)) {
+ printf("add requires 2 or 3 arguments\n");
+ } else {
+ if (argv[2] == NULL)
+ ret = xmlCatalogAdd(BAD_CAST argv[0], NULL,
+ BAD_CAST argv[1]);
+ else
+ ret = xmlCatalogAdd(BAD_CAST argv[0], BAD_CAST argv[1],
+ BAD_CAST argv[2]);
+ if (ret != 0)
+ printf("add command failed\n");
+ }
+ } else {
+ if ((nbargs != 3) && (nbargs != 2)) {
+ printf("add requires 2 or 3 arguments\n");
+ } else {
+ if (argv[2] == NULL)
+ ret = xmlCatalogAdd(BAD_CAST argv[0], NULL,
+ BAD_CAST argv[1]);
+ else
+ ret = xmlCatalogAdd(BAD_CAST argv[0], BAD_CAST argv[1],
+ BAD_CAST argv[2]);
+ if (ret != 0)
+ printf("add command failed\n");
+ }
+ }
+ } else if (!strcmp(command, "del")) {
+ if (nbargs != 1) {
+ printf("del requires 1\n");
+ } else {
+ ret = xmlCatalogRemove(BAD_CAST argv[0]);
+ if (ret <= 0)
+ printf("del command failed\n");
+
+ }
+ } else if (!strcmp(command, "resolve")) {
+ if (nbargs != 2) {
+ printf("resolve requires 2 arguments\n");
+ } else {
+ ans = xmlCatalogResolve(BAD_CAST argv[0],
+ BAD_CAST argv[1]);
+ if (ans == NULL) {
+ printf("Resolver failed to find an answer\n");
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree(ans);
+ }
+ }
+ } else if (!strcmp(command, "dump")) {
+ if (nbargs != 0) {
+ printf("dump has no arguments\n");
+ } else {
+ xmlCatalogDump(stdout);
+ }
+ } else if (!strcmp(command, "debug")) {
+ if (nbargs != 0) {
+ printf("debug has no arguments\n");
+ } else {
+ verbose++;
+ xmlCatalogSetDebug(verbose);
+ }
+ } else if (!strcmp(command, "quiet")) {
+ if (nbargs != 0) {
+ printf("quiet has no arguments\n");
+ } else {
+ if (verbose > 0)
+ verbose--;
+ xmlCatalogSetDebug(verbose);
+ }
+ } else {
+ if (strcmp(command, "help")) {
+ printf("Unrecognized command %s\n", command);
+ }
+ printf("Commands available:\n");
+ printf("\tpublic PublicID: make a PUBLIC identifier lookup\n");
+ printf("\tsystem SystemID: make a SYSTEM identifier lookup\n");
+ printf("\tresolve PublicID SystemID: do a full resolver lookup\n");
+ printf("\tadd 'type' 'orig' 'replace' : add an entry\n");
+ printf("\tdel 'values' : remove values\n");
+ printf("\tdump: print the current catalog state\n");
+ printf("\tdebug: increase the verbosity level\n");
+ printf("\tquiet: decrease the verbosity level\n");
+ printf("\texit: quit the shell\n");
+ }
+ free(cmdline); /* not xmlFree here ! */
+ }
+}
+
+/************************************************************************
+ * *
+ * Main *
+ * *
+ ************************************************************************/
+static void usage(const char *name) {
+ /* split into 2 printf's to avoid overly long string (gcc warning) */
+ printf("\
+Usage : %s [options] catalogfile entities...\n\
+\tParse the catalog file and query it for the entities\n\
+\t--sgml : handle SGML Super catalogs for --add and --del\n\
+\t--shell : run a shell allowing interactive queries\n\
+\t--create : create a new catalog\n\
+\t--add 'type' 'orig' 'replace' : add an XML entry\n\
+\t--add 'entry' : add an SGML entry\n", name);
+ printf("\
+\t--del 'values' : remove values\n\
+\t--noout: avoid dumping the result on stdout\n\
+\t used with --add or --del, it saves the catalog changes\n\
+\t and with --sgml it automatically updates the super catalog\n\
+\t--no-super-update: do not update the SGML super catalog\n\
+\t-v --verbose : provide debug informations\n");
+}
+int main(int argc, char **argv) {
+ int i;
+ int ret;
+ int exit_value = 0;
+
+
+ if (argc <= 1) {
+ usage(argv[0]);
+ return(1);
+ }
+
+ LIBXML_TEST_VERSION
+ for (i = 1; i < argc ; i++) {
+ if (!strcmp(argv[i], "-"))
+ break;
+
+ if (argv[i][0] != '-')
+ break;
+ if ((!strcmp(argv[i], "-verbose")) ||
+ (!strcmp(argv[i], "-v")) ||
+ (!strcmp(argv[i], "--verbose"))) {
+ verbose++;
+ xmlCatalogSetDebug(verbose);
+ } else if ((!strcmp(argv[i], "-noout")) ||
+ (!strcmp(argv[i], "--noout"))) {
+ noout = 1;
+ } else if ((!strcmp(argv[i], "-shell")) ||
+ (!strcmp(argv[i], "--shell"))) {
+ shell++;
+ noout = 1;
+ } else if ((!strcmp(argv[i], "-sgml")) ||
+ (!strcmp(argv[i], "--sgml"))) {
+ sgml++;
+ } else if ((!strcmp(argv[i], "-create")) ||
+ (!strcmp(argv[i], "--create"))) {
+ create++;
+ } else if ((!strcmp(argv[i], "-convert")) ||
+ (!strcmp(argv[i], "--convert"))) {
+ convert++;
+ } else if ((!strcmp(argv[i], "-no-super-update")) ||
+ (!strcmp(argv[i], "--no-super-update"))) {
+ no_super_update++;
+ } else if ((!strcmp(argv[i], "-add")) ||
+ (!strcmp(argv[i], "--add"))) {
+ if (sgml)
+ i += 2;
+ else
+ i += 3;
+ add++;
+ } else if ((!strcmp(argv[i], "-del")) ||
+ (!strcmp(argv[i], "--del"))) {
+ i += 1;
+ del++;
+ } else {
+ fprintf(stderr, "Unknown option %s\n", argv[i]);
+ usage(argv[0]);
+ return(1);
+ }
+ }
+
+ for (i = 1; i < argc; i++) {
+ if ((!strcmp(argv[i], "-add")) ||
+ (!strcmp(argv[i], "--add"))) {
+ if (sgml)
+ i += 2;
+ else
+ i += 3;
+ continue;
+ } else if ((!strcmp(argv[i], "-del")) ||
+ (!strcmp(argv[i], "--del"))) {
+ i += 1;
+
+ /* No catalog entry specified */
+ if (i == argc || (sgml && i + 1 == argc)) {
+ fprintf(stderr, "No catalog entry specified to remove from\n");
+ usage (argv[0]);
+ return(1);
+ }
+
+ continue;
+ } else if (argv[i][0] == '-')
+ continue;
+ filename = argv[i];
+ ret = xmlLoadCatalog(argv[i]);
+ if ((ret < 0) && (create)) {
+ xmlCatalogAdd(BAD_CAST "catalog", BAD_CAST argv[i], NULL);
+ }
+ break;
+ }
+
+ if (convert)
+ ret = xmlCatalogConvert();
+
+ if ((add) || (del)) {
+ for (i = 1; i < argc ; i++) {
+ if (!strcmp(argv[i], "-"))
+ break;
+
+ if (argv[i][0] != '-')
+ continue;
+ if (strcmp(argv[i], "-add") && strcmp(argv[i], "--add") &&
+ strcmp(argv[i], "-del") && strcmp(argv[i], "--del"))
+ continue;
+
+ if (sgml) {
+ /*
+ * Maintenance of SGML catalogs.
+ */
+ xmlCatalogPtr catal = NULL;
+ xmlCatalogPtr super = NULL;
+
+ catal = xmlLoadSGMLSuperCatalog(argv[i + 1]);
+
+ if ((!strcmp(argv[i], "-add")) ||
+ (!strcmp(argv[i], "--add"))) {
+ if (catal == NULL)
+ catal = xmlNewCatalog(1);
+ xmlACatalogAdd(catal, BAD_CAST "CATALOG",
+ BAD_CAST argv[i + 2], NULL);
+
+ if (!no_super_update) {
+ super = xmlLoadSGMLSuperCatalog(XML_SGML_DEFAULT_CATALOG);
+ if (super == NULL)
+ super = xmlNewCatalog(1);
+
+ xmlACatalogAdd(super, BAD_CAST "CATALOG",
+ BAD_CAST argv[i + 1], NULL);
+ }
+ } else {
+ if (catal != NULL)
+ ret = xmlACatalogRemove(catal, BAD_CAST argv[i + 2]);
+ else
+ ret = -1;
+ if (ret < 0) {
+ fprintf(stderr, "Failed to remove entry from %s\n",
+ argv[i + 1]);
+ exit_value = 1;
+ }
+ if ((!no_super_update) && (noout) && (catal != NULL) &&
+ (xmlCatalogIsEmpty(catal))) {
+ super = xmlLoadSGMLSuperCatalog(
+ XML_SGML_DEFAULT_CATALOG);
+ if (super != NULL) {
+ ret = xmlACatalogRemove(super,
+ BAD_CAST argv[i + 1]);
+ if (ret < 0) {
+ fprintf(stderr,
+ "Failed to remove entry from %s\n",
+ XML_SGML_DEFAULT_CATALOG);
+ exit_value = 1;
+ }
+ }
+ }
+ }
+ if (noout) {
+ FILE *out;
+
+ if (xmlCatalogIsEmpty(catal)) {
+ remove(argv[i + 1]);
+ } else {
+ out = fopen(argv[i + 1], "w");
+ if (out == NULL) {
+ fprintf(stderr, "could not open %s for saving\n",
+ argv[i + 1]);
+ exit_value = 2;
+ noout = 0;
+ } else {
+ xmlACatalogDump(catal, out);
+ fclose(out);
+ }
+ }
+ if (!no_super_update && super != NULL) {
+ if (xmlCatalogIsEmpty(super)) {
+ remove(XML_SGML_DEFAULT_CATALOG);
+ } else {
+ out = fopen(XML_SGML_DEFAULT_CATALOG, "w");
+ if (out == NULL) {
+ fprintf(stderr,
+ "could not open %s for saving\n",
+ XML_SGML_DEFAULT_CATALOG);
+ exit_value = 2;
+ noout = 0;
+ } else {
+
+ xmlACatalogDump(super, out);
+ fclose(out);
+ }
+ }
+ }
+ } else {
+ xmlACatalogDump(catal, stdout);
+ }
+ i += 2;
+ } else {
+ if ((!strcmp(argv[i], "-add")) ||
+ (!strcmp(argv[i], "--add"))) {
+ if ((argv[i + 3] == NULL) || (argv[i + 3][0] == 0))
+ ret = xmlCatalogAdd(BAD_CAST argv[i + 1], NULL,
+ BAD_CAST argv[i + 2]);
+ else
+ ret = xmlCatalogAdd(BAD_CAST argv[i + 1],
+ BAD_CAST argv[i + 2],
+ BAD_CAST argv[i + 3]);
+ if (ret != 0) {
+ printf("add command failed\n");
+ exit_value = 3;
+ }
+ i += 3;
+ } else if ((!strcmp(argv[i], "-del")) ||
+ (!strcmp(argv[i], "--del"))) {
+ ret = xmlCatalogRemove(BAD_CAST argv[i + 1]);
+ if (ret < 0) {
+ fprintf(stderr, "Failed to remove entry %s\n",
+ argv[i + 1]);
+ exit_value = 1;
+ }
+ i += 1;
+ }
+ }
+ }
+
+ } else if (shell) {
+ usershell();
+ } else {
+ for (i++; i < argc; i++) {
+ xmlURIPtr uri;
+ xmlChar *ans;
+
+ uri = xmlParseURI(argv[i]);
+ if (uri == NULL) {
+ ans = xmlCatalogResolvePublic((const xmlChar *) argv[i]);
+ if (ans == NULL) {
+ printf("No entry for PUBLIC %s\n", argv[i]);
+ exit_value = 4;
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree(ans);
+ }
+ } else {
+ xmlFreeURI(uri);
+ ans = xmlCatalogResolveSystem((const xmlChar *) argv[i]);
+ if (ans == NULL) {
+ printf("No entry for SYSTEM %s\n", argv[i]);
+ ans = xmlCatalogResolveURI ((const xmlChar *) argv[i]);
+ if (ans == NULL) {
+ printf ("No entry for URI %s\n", argv[i]);
+ exit_value = 4;
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree (ans);
+ }
+ } else {
+ printf("%s\n", (char *) ans);
+ xmlFree(ans);
+ }
+ }
+ }
+ }
+ if ((!sgml) && ((add) || (del) || (create) || (convert))) {
+ if (noout && filename && *filename) {
+ FILE *out;
+
+ out = fopen(filename, "w");
+ if (out == NULL) {
+ fprintf(stderr, "could not open %s for saving\n", filename);
+ exit_value = 2;
+ noout = 0;
+ } else {
+ xmlCatalogDump(out);
+ }
+ } else {
+ xmlCatalogDump(stdout);
+ }
+ }
+
+ /*
+ * Cleanup and check for memory leaks
+ */
+ xmlCleanupParser();
+ xmlMemoryDump();
+ return(exit_value);
+}
+#else
+int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
+ fprintf(stderr, "libxml was not compiled with catalog and output support\n");
+ return(1);
+}
+#endif
diff --git a/xmllint.c b/xmllint.c
new file mode 100644
index 0000000..b297ded
--- /dev/null
+++ b/xmllint.c
@@ -0,0 +1,3801 @@
+/*
+ * xmllint.c : a small tester program for XML input.
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#include "libxml.h"
+
+#include <string.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined (_WIN32) && !defined(__CYGWIN__)
+#if defined (_MSC_VER) || defined(__BORLANDC__)
+#include <winsock2.h>
+#pragma comment(lib, "ws2_32.lib")
+#define gettimeofday(p1,p2)
+#endif /* _MSC_VER */
+#endif /* _WIN32 */
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+#ifdef __MINGW32__
+#define _WINSOCKAPI_
+#include <wsockcompat.h>
+#include <winsock2.h>
+#undef XML_SOCKLEN_T
+#define XML_SOCKLEN_T unsigned int
+#endif
+
+#ifdef HAVE_SYS_TIMEB_H
+#include <sys/timeb.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+/* seems needed for Solaris */
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *) -1)
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_LIBREADLINE
+#include <readline/readline.h>
+#ifdef HAVE_LIBHISTORY
+#include <readline/history.h>
+#endif
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/debugXML.h>
+#include <libxml/xmlerror.h>
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+#include <libxml/catalog.h>
+#endif
+#include <libxml/globals.h>
+#include <libxml/xmlreader.h>
+#ifdef LIBXML_SCHEMATRON_ENABLED
+#include <libxml/schematron.h>
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+#include <libxml/pattern.h>
+#endif
+#ifdef LIBXML_C14N_ENABLED
+#include <libxml/c14n.h>
+#endif
+#ifdef LIBXML_OUTPUT_ENABLED
+#include <libxml/xmlsave.h>
+#endif
+
+#ifndef XML_XML_DEFAULT_CATALOG
+#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
+#endif
+
+typedef enum {
+ XMLLINT_RETURN_OK = 0, /* No error */
+ XMLLINT_ERR_UNCLASS = 1, /* Unclassified */
+ XMLLINT_ERR_DTD = 2, /* Error in DTD */
+ XMLLINT_ERR_VALID = 3, /* Validation error */
+ XMLLINT_ERR_RDFILE = 4, /* CtxtReadFile error */
+ XMLLINT_ERR_SCHEMACOMP = 5, /* Schema compilation */
+ XMLLINT_ERR_OUT = 6, /* Error writing output */
+ XMLLINT_ERR_SCHEMAPAT = 7, /* Error in schema pattern */
+ XMLLINT_ERR_RDREGIS = 8, /* Error in Reader registration */
+ XMLLINT_ERR_MEM = 9, /* Out of memory error */
+ XMLLINT_ERR_XPATH = 10 /* XPath evaluation error */
+} xmllintReturnCode;
+#ifdef LIBXML_DEBUG_ENABLED
+static int shell = 0;
+static int debugent = 0;
+#endif
+static int debug = 0;
+static int maxmem = 0;
+#ifdef LIBXML_TREE_ENABLED
+static int copy = 0;
+#endif /* LIBXML_TREE_ENABLED */
+static int recovery = 0;
+static int noent = 0;
+static int noenc = 0;
+static int noblanks = 0;
+static int noout = 0;
+static int nowrap = 0;
+#ifdef LIBXML_OUTPUT_ENABLED
+static int format = 0;
+static const char *output = NULL;
+static int compress = 0;
+static int oldout = 0;
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_VALID_ENABLED
+static int valid = 0;
+static int postvalid = 0;
+static char * dtdvalid = NULL;
+static char * dtdvalidfpi = NULL;
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+static char * relaxng = NULL;
+static xmlRelaxNGPtr relaxngschemas = NULL;
+static char * schema = NULL;
+static xmlSchemaPtr wxschemas = NULL;
+#endif
+#ifdef LIBXML_SCHEMATRON_ENABLED
+static char * schematron = NULL;
+static xmlSchematronPtr wxschematron = NULL;
+#endif
+static int repeat = 0;
+static int insert = 0;
+#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)
+static int html = 0;
+static int xmlout = 0;
+#endif
+static int htmlout = 0;
+#if defined(LIBXML_HTML_ENABLED)
+static int nodefdtd = 0;
+#endif
+#ifdef LIBXML_PUSH_ENABLED
+static int push = 0;
+static int pushsize = 4096;
+#endif /* LIBXML_PUSH_ENABLED */
+#ifdef HAVE_MMAP
+static int memory = 0;
+#endif
+static int testIO = 0;
+static char *encoding = NULL;
+#ifdef LIBXML_XINCLUDE_ENABLED
+static int xinclude = 0;
+#endif
+static int dtdattrs = 0;
+static int loaddtd = 0;
+static xmllintReturnCode progresult = XMLLINT_RETURN_OK;
+static int timing = 0;
+static int generate = 0;
+static int dropdtd = 0;
+#ifdef LIBXML_CATALOG_ENABLED
+static int catalogs = 0;
+static int nocatalogs = 0;
+#endif
+#ifdef LIBXML_C14N_ENABLED
+static int canonical = 0;
+static int canonical_11 = 0;
+static int exc_canonical = 0;
+#endif
+#ifdef LIBXML_READER_ENABLED
+static int stream = 0;
+static int walker = 0;
+#endif /* LIBXML_READER_ENABLED */
+static int chkregister = 0;
+static int nbregister = 0;
+#ifdef LIBXML_SAX1_ENABLED
+static int sax1 = 0;
+#endif /* LIBXML_SAX1_ENABLED */
+#ifdef LIBXML_PATTERN_ENABLED
+static const char *pattern = NULL;
+static xmlPatternPtr patternc = NULL;
+static xmlStreamCtxtPtr patstream = NULL;
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+static const char *xpathquery = NULL;
+#endif
+static int options = XML_PARSE_COMPACT | XML_PARSE_BIG_LINES;
+static int sax = 0;
+static int oldxml10 = 0;
+
+/************************************************************************
+ * *
+ * Entity loading control and customization. *
+ * *
+ ************************************************************************/
+#define MAX_PATHS 64
+#ifdef _WIN32
+# define PATH_SEPARATOR ';'
+#else
+# define PATH_SEPARATOR ':'
+#endif
+static xmlChar *paths[MAX_PATHS + 1];
+static int nbpaths = 0;
+static int load_trace = 0;
+
+static
+void parsePath(const xmlChar *path) {
+ const xmlChar *cur;
+
+ if (path == NULL)
+ return;
+ while (*path != 0) {
+ if (nbpaths >= MAX_PATHS) {
+ fprintf(stderr, "MAX_PATHS reached: too many paths\n");
+ return;
+ }
+ cur = path;
+ while ((*cur == ' ') || (*cur == PATH_SEPARATOR))
+ cur++;
+ path = cur;
+ while ((*cur != 0) && (*cur != ' ') && (*cur != PATH_SEPARATOR))
+ cur++;
+ if (cur != path) {
+ paths[nbpaths] = xmlStrndup(path, cur - path);
+ if (paths[nbpaths] != NULL)
+ nbpaths++;
+ path = cur;
+ }
+ }
+}
+
+static xmlExternalEntityLoader defaultEntityLoader = NULL;
+
+static xmlParserInputPtr
+xmllintExternalEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt) {
+ xmlParserInputPtr ret;
+ warningSAXFunc warning = NULL;
+ errorSAXFunc err = NULL;
+
+ int i;
+ const char *lastsegment = URL;
+ const char *iter = URL;
+
+ if ((nbpaths > 0) && (iter != NULL)) {
+ while (*iter != 0) {
+ if (*iter == '/')
+ lastsegment = iter + 1;
+ iter++;
+ }
+ }
+
+ if ((ctxt != NULL) && (ctxt->sax != NULL)) {
+ warning = ctxt->sax->warning;
+ err = ctxt->sax->error;
+ ctxt->sax->warning = NULL;
+ ctxt->sax->error = NULL;
+ }
+
+ if (defaultEntityLoader != NULL) {
+ ret = defaultEntityLoader(URL, ID, ctxt);
+ if (ret != NULL) {
+ if (warning != NULL)
+ ctxt->sax->warning = warning;
+ if (err != NULL)
+ ctxt->sax->error = err;
+ if (load_trace) {
+ fprintf \
+ (stderr,
+ "Loaded URL=\"%s\" ID=\"%s\"\n",
+ URL ? URL : "(null)",
+ ID ? ID : "(null)");
+ }
+ return(ret);
+ }
+ }
+ for (i = 0;i < nbpaths;i++) {
+ xmlChar *newURL;
+
+ newURL = xmlStrdup((const xmlChar *) paths[i]);
+ newURL = xmlStrcat(newURL, (const xmlChar *) "/");
+ newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
+ if (newURL != NULL) {
+ ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
+ if (ret != NULL) {
+ if (warning != NULL)
+ ctxt->sax->warning = warning;
+ if (err != NULL)
+ ctxt->sax->error = err;
+ if (load_trace) {
+ fprintf \
+ (stderr,
+ "Loaded URL=\"%s\" ID=\"%s\"\n",
+ newURL,
+ ID ? ID : "(null)");
+ }
+ xmlFree(newURL);
+ return(ret);
+ }
+ xmlFree(newURL);
+ }
+ }
+ if (err != NULL)
+ ctxt->sax->error = err;
+ if (warning != NULL) {
+ ctxt->sax->warning = warning;
+ if (URL != NULL)
+ warning(ctxt, "failed to load external entity \"%s\"\n", URL);
+ else if (ID != NULL)
+ warning(ctxt, "failed to load external entity \"%s\"\n", ID);
+ }
+ return(NULL);
+}
+/************************************************************************
+ * *
+ * Memory allocation consumption debugging *
+ * *
+ ************************************************************************/
+
+static void
+OOM(void)
+{
+ fprintf(stderr, "Ran out of memory needs > %d bytes\n", maxmem);
+ progresult = XMLLINT_ERR_MEM;
+}
+
+static void
+myFreeFunc(void *mem)
+{
+ xmlMemFree(mem);
+}
+static void *
+myMallocFunc(size_t size)
+{
+ void *ret;
+
+ ret = xmlMemMalloc(size);
+ if (ret != NULL) {
+ if (xmlMemUsed() > maxmem) {
+ OOM();
+ xmlMemFree(ret);
+ return (NULL);
+ }
+ }
+ return (ret);
+}
+static void *
+myReallocFunc(void *mem, size_t size)
+{
+ void *ret;
+
+ ret = xmlMemRealloc(mem, size);
+ if (ret != NULL) {
+ if (xmlMemUsed() > maxmem) {
+ OOM();
+ xmlMemFree(ret);
+ return (NULL);
+ }
+ }
+ return (ret);
+}
+static char *
+myStrdupFunc(const char *str)
+{
+ char *ret;
+
+ ret = xmlMemoryStrdup(str);
+ if (ret != NULL) {
+ if (xmlMemUsed() > maxmem) {
+ OOM();
+ xmlFree(ret);
+ return (NULL);
+ }
+ }
+ return (ret);
+}
+/************************************************************************
+ * *
+ * Internal timing routines to remove the necessity to have *
+ * unix-specific function calls. *
+ * *
+ ************************************************************************/
+
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_SYS_TIMEB_H
+#ifdef HAVE_SYS_TIME_H
+#ifdef HAVE_FTIME
+
+static int
+my_gettimeofday(struct timeval *tvp, void *tzp)
+{
+ struct timeb timebuffer;
+
+ ftime(&timebuffer);
+ if (tvp) {
+ tvp->tv_sec = timebuffer.time;
+ tvp->tv_usec = timebuffer.millitm * 1000L;
+ }
+ return (0);
+}
+#define HAVE_GETTIMEOFDAY 1
+#define gettimeofday my_gettimeofday
+
+#endif /* HAVE_FTIME */
+#endif /* HAVE_SYS_TIME_H */
+#endif /* HAVE_SYS_TIMEB_H */
+#endif /* !HAVE_GETTIMEOFDAY */
+
+#if defined(HAVE_GETTIMEOFDAY)
+static struct timeval begin, end;
+
+/*
+ * startTimer: call where you want to start timing
+ */
+static void
+startTimer(void)
+{
+ gettimeofday(&begin, NULL);
+}
+
+/*
+ * endTimer: call where you want to stop timing and to print out a
+ * message about the timing performed; format is a printf
+ * type argument
+ */
+static void XMLCDECL
+endTimer(const char *fmt, ...)
+{
+ long msec;
+ va_list ap;
+
+ gettimeofday(&end, NULL);
+ msec = end.tv_sec - begin.tv_sec;
+ msec *= 1000;
+ msec += (end.tv_usec - begin.tv_usec) / 1000;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fprintf(stderr, " took %ld ms\n", msec);
+}
+#elif defined(HAVE_TIME_H)
+/*
+ * No gettimeofday function, so we have to make do with calling clock.
+ * This is obviously less accurate, but there's little we can do about
+ * that.
+ */
+#ifndef CLOCKS_PER_SEC
+#define CLOCKS_PER_SEC 100
+#endif
+
+static clock_t begin, end;
+static void
+startTimer(void)
+{
+ begin = clock();
+}
+static void XMLCDECL
+endTimer(const char *fmt, ...)
+{
+ long msec;
+ va_list ap;
+
+ end = clock();
+ msec = ((end - begin) * 1000) / CLOCKS_PER_SEC;
+
+#ifndef HAVE_STDARG_H
+#error "endTimer required stdarg functions"
+#endif
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, " took %ld ms\n", msec);
+}
+#else
+
+/*
+ * We don't have a gettimeofday or time.h, so we just don't do timing
+ */
+static void
+startTimer(void)
+{
+ /*
+ * Do nothing
+ */
+}
+static void XMLCDECL
+endTimer(char *format, ...)
+{
+ /*
+ * We cannot do anything because we don't have a timing function
+ */
+#ifdef HAVE_STDARG_H
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ fprintf(stderr, " was not timed\n");
+#else
+ /* We don't have gettimeofday, time or stdarg.h, what crazy world is
+ * this ?!
+ */
+#endif
+}
+#endif
+/************************************************************************
+ * *
+ * HTML ouput *
+ * *
+ ************************************************************************/
+static char buffer[50000];
+
+static void
+xmlHTMLEncodeSend(void) {
+ char *result;
+
+ result = (char *) xmlEncodeEntitiesReentrant(NULL, BAD_CAST buffer);
+ if (result) {
+ xmlGenericError(xmlGenericErrorContext, "%s", result);
+ xmlFree(result);
+ }
+ buffer[0] = 0;
+}
+
+/**
+ * xmlHTMLPrintFileInfo:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays the associated file and line informations for the current input
+ */
+
+static void
+xmlHTMLPrintFileInfo(xmlParserInputPtr input) {
+ int len;
+ xmlGenericError(xmlGenericErrorContext, "<p>");
+
+ len = strlen(buffer);
+ if (input != NULL) {
+ if (input->filename) {
+ snprintf(&buffer[len], sizeof(buffer) - len, "%s:%d: ", input->filename,
+ input->line);
+ } else {
+ snprintf(&buffer[len], sizeof(buffer) - len, "Entity: line %d: ", input->line);
+ }
+ }
+ xmlHTMLEncodeSend();
+}
+
+/**
+ * xmlHTMLPrintFileContext:
+ * @input: an xmlParserInputPtr input
+ *
+ * Displays current context within the input content for error tracking
+ */
+
+static void
+xmlHTMLPrintFileContext(xmlParserInputPtr input) {
+ const xmlChar *cur, *base;
+ int len;
+ int n;
+
+ if (input == NULL) return;
+ xmlGenericError(xmlGenericErrorContext, "<pre>\n");
+ cur = input->cur;
+ base = input->base;
+ while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) {
+ cur--;
+ }
+ n = 0;
+ while ((n++ < 80) && (cur > base) && (*cur != '\n') && (*cur != '\r'))
+ cur--;
+ if ((*cur == '\n') || (*cur == '\r')) cur++;
+ base = cur;
+ n = 0;
+ while ((*cur != 0) && (*cur != '\n') && (*cur != '\r') && (n < 79)) {
+ len = strlen(buffer);
+ snprintf(&buffer[len], sizeof(buffer) - len, "%c",
+ (unsigned char) *cur++);
+ n++;
+ }
+ len = strlen(buffer);
+ snprintf(&buffer[len], sizeof(buffer) - len, "\n");
+ cur = input->cur;
+ while ((*cur == '\n') || (*cur == '\r'))
+ cur--;
+ n = 0;
+ while ((cur != base) && (n++ < 80)) {
+ len = strlen(buffer);
+ snprintf(&buffer[len], sizeof(buffer) - len, " ");
+ base++;
+ }
+ len = strlen(buffer);
+ snprintf(&buffer[len], sizeof(buffer) - len, "^\n");
+ xmlHTMLEncodeSend();
+ xmlGenericError(xmlGenericErrorContext, "</pre>");
+}
+
+/**
+ * xmlHTMLError:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+xmlHTMLError(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input;
+ va_list args;
+ int len;
+
+ buffer[0] = 0;
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) {
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+
+ xmlHTMLPrintFileInfo(input);
+
+ xmlGenericError(xmlGenericErrorContext, "<b>error</b>: ");
+ va_start(args, msg);
+ len = strlen(buffer);
+ vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args);
+ va_end(args);
+ xmlHTMLEncodeSend();
+ xmlGenericError(xmlGenericErrorContext, "</p>\n");
+
+ xmlHTMLPrintFileContext(input);
+ xmlHTMLEncodeSend();
+}
+
+/**
+ * xmlHTMLWarning:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+xmlHTMLWarning(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input;
+ va_list args;
+ int len;
+
+ buffer[0] = 0;
+ input = ctxt->input;
+ if ((input != NULL) && (input->filename == NULL) && (ctxt->inputNr > 1)) {
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+ }
+
+
+ xmlHTMLPrintFileInfo(input);
+
+ xmlGenericError(xmlGenericErrorContext, "<b>warning</b>: ");
+ va_start(args, msg);
+ len = strlen(buffer);
+ vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args);
+ va_end(args);
+ xmlHTMLEncodeSend();
+ xmlGenericError(xmlGenericErrorContext, "</p>\n");
+
+ xmlHTMLPrintFileContext(input);
+ xmlHTMLEncodeSend();
+}
+
+/**
+ * xmlHTMLValidityError:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an validity error messages, gives file,
+ * line, position and extra parameters.
+ */
+static void XMLCDECL
+xmlHTMLValidityError(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input;
+ va_list args;
+ int len;
+
+ buffer[0] = 0;
+ input = ctxt->input;
+ if ((input->filename == NULL) && (ctxt->inputNr > 1))
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+
+ xmlHTMLPrintFileInfo(input);
+
+ xmlGenericError(xmlGenericErrorContext, "<b>validity error</b>: ");
+ len = strlen(buffer);
+ va_start(args, msg);
+ vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args);
+ va_end(args);
+ xmlHTMLEncodeSend();
+ xmlGenericError(xmlGenericErrorContext, "</p>\n");
+
+ xmlHTMLPrintFileContext(input);
+ xmlHTMLEncodeSend();
+ progresult = XMLLINT_ERR_VALID;
+}
+
+/**
+ * xmlHTMLValidityWarning:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a validity warning messages, gives file, line,
+ * position and extra parameters.
+ */
+static void XMLCDECL
+xmlHTMLValidityWarning(void *ctx, const char *msg, ...)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlParserInputPtr input;
+ va_list args;
+ int len;
+
+ buffer[0] = 0;
+ input = ctxt->input;
+ if ((input->filename == NULL) && (ctxt->inputNr > 1))
+ input = ctxt->inputTab[ctxt->inputNr - 2];
+
+ xmlHTMLPrintFileInfo(input);
+
+ xmlGenericError(xmlGenericErrorContext, "<b>validity warning</b>: ");
+ va_start(args, msg);
+ len = strlen(buffer);
+ vsnprintf(&buffer[len], sizeof(buffer) - len, msg, args);
+ va_end(args);
+ xmlHTMLEncodeSend();
+ xmlGenericError(xmlGenericErrorContext, "</p>\n");
+
+ xmlHTMLPrintFileContext(input);
+ xmlHTMLEncodeSend();
+}
+
+/************************************************************************
+ * *
+ * Shell Interface *
+ * *
+ ************************************************************************/
+#ifdef LIBXML_DEBUG_ENABLED
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlShellReadline:
+ * @prompt: the prompt value
+ *
+ * Read a string
+ *
+ * Returns a pointer to it or NULL on EOF the caller is expected to
+ * free the returned string.
+ */
+static char *
+xmlShellReadline(char *prompt) {
+#ifdef HAVE_LIBREADLINE
+ char *line_read;
+
+ /* Get a line from the user. */
+ line_read = readline (prompt);
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read)
+ add_history (line_read);
+
+ return (line_read);
+#else
+ char line_read[501];
+ char *ret;
+ int len;
+
+ if (prompt != NULL)
+ fprintf(stdout, "%s", prompt);
+ if (!fgets(line_read, 500, stdin))
+ return(NULL);
+ line_read[500] = 0;
+ len = strlen(line_read);
+ ret = (char *) malloc(len + 1);
+ if (ret != NULL) {
+ memcpy (ret, line_read, len + 1);
+ }
+ return(ret);
+#endif
+}
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* LIBXML_DEBUG_ENABLED */
+
+/************************************************************************
+ * *
+ * I/O Interfaces *
+ * *
+ ************************************************************************/
+
+static int myRead(FILE *f, char * buf, int len) {
+ return(fread(buf, 1, len, f));
+}
+static void myClose(FILE *f) {
+ if (f != stdin) {
+ fclose(f);
+ }
+}
+
+/************************************************************************
+ * *
+ * SAX based tests *
+ * *
+ ************************************************************************/
+
+/*
+ * empty SAX block
+ */
+static xmlSAXHandler emptySAXHandlerStruct = {
+ NULL, /* internalSubset */
+ NULL, /* isStandalone */
+ NULL, /* hasInternalSubset */
+ NULL, /* hasExternalSubset */
+ NULL, /* resolveEntity */
+ NULL, /* getEntity */
+ NULL, /* entityDecl */
+ NULL, /* notationDecl */
+ NULL, /* attributeDecl */
+ NULL, /* elementDecl */
+ NULL, /* unparsedEntityDecl */
+ NULL, /* setDocumentLocator */
+ NULL, /* startDocument */
+ NULL, /* endDocument */
+ NULL, /* startElement */
+ NULL, /* endElement */
+ NULL, /* reference */
+ NULL, /* characters */
+ NULL, /* ignorableWhitespace */
+ NULL, /* processingInstruction */
+ NULL, /* comment */
+ NULL, /* xmlParserWarning */
+ NULL, /* xmlParserError */
+ NULL, /* xmlParserError */
+ NULL, /* getParameterEntity */
+ NULL, /* cdataBlock; */
+ NULL, /* externalSubset; */
+ XML_SAX2_MAGIC,
+ NULL,
+ NULL, /* startElementNs */
+ NULL, /* endElementNs */
+ NULL /* xmlStructuredErrorFunc */
+};
+
+static xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
+extern xmlSAXHandlerPtr debugSAXHandler;
+static int callbacks;
+
+/**
+ * isStandaloneDebug:
+ * @ctxt: An XML parser context
+ *
+ * Is this document tagged standalone ?
+ *
+ * Returns 1 if true
+ */
+static int
+isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return(0);
+ fprintf(stdout, "SAX.isStandalone()\n");
+ return(0);
+}
+
+/**
+ * hasInternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return(0);
+ fprintf(stdout, "SAX.hasInternalSubset()\n");
+ return(0);
+}
+
+/**
+ * hasExternalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ *
+ * Returns 1 if true
+ */
+static int
+hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return(0);
+ fprintf(stdout, "SAX.hasExternalSubset()\n");
+ return(0);
+}
+
+/**
+ * internalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an internal subset
+ */
+static void
+internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.internalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(stdout, " ,");
+ else
+ fprintf(stdout, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(stdout, " )\n");
+ else
+ fprintf(stdout, " %s)\n", SystemID);
+}
+
+/**
+ * externalSubsetDebug:
+ * @ctxt: An XML parser context
+ *
+ * Does this document has an external subset
+ */
+static void
+externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.externalSubset(%s,", name);
+ if (ExternalID == NULL)
+ fprintf(stdout, " ,");
+ else
+ fprintf(stdout, " %s,", ExternalID);
+ if (SystemID == NULL)
+ fprintf(stdout, " )\n");
+ else
+ fprintf(stdout, " %s)\n", SystemID);
+}
+
+/**
+ * resolveEntityDebug:
+ * @ctxt: An XML parser context
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Special entity resolver, better left to the parser, it has
+ * more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlParserInputPtr
+resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (noout)
+ return(NULL);
+ /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
+
+
+ fprintf(stdout, "SAX.resolveEntity(");
+ if (publicId != NULL)
+ fprintf(stdout, "%s", (char *)publicId);
+ else
+ fprintf(stdout, " ");
+ if (systemId != NULL)
+ fprintf(stdout, ", %s)\n", (char *)systemId);
+ else
+ fprintf(stdout, ", )\n");
+ return(NULL);
+}
+
+/**
+ * getEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get an entity by name
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+static xmlEntityPtr
+getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (noout)
+ return(NULL);
+ fprintf(stdout, "SAX.getEntity(%s)\n", name);
+ return(NULL);
+}
+
+/**
+ * getParameterEntityDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * Get a parameter entity by name
+ *
+ * Returns the xmlParserInputPtr
+ */
+static xmlEntityPtr
+getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (noout)
+ return(NULL);
+ fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);
+ return(NULL);
+}
+
+
+/**
+ * entityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed
+ */
+static void
+entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+ /* not all libraries handle printing null pointers nicely */
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (content == NULL)
+ content = (xmlChar *)nullstr;
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",
+ name, type, publicId, systemId, content);
+}
+
+/**
+ * attributeDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the attribute name
+ * @type: the attribute type
+ *
+ * An attribute definition has been parsed
+ */
+static void
+attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,
+ const xmlChar * name, int type, int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ callbacks++;
+ if (noout)
+ return;
+ if (defaultValue == NULL)
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n",
+ elem, name, type, def);
+ else
+ fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",
+ elem, name, type, def, defaultValue);
+ xmlFreeEnumeration(tree);
+}
+
+/**
+ * elementDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value (without processing).
+ *
+ * An element definition has been parsed
+ */
+static void
+elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
+ xmlElementContentPtr content ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",
+ name, type);
+}
+
+/**
+ * notationDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+static void
+notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId);
+}
+
+/**
+ * unparsedEntityDeclDebug:
+ * @ctxt: An XML parser context
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed
+ */
+static void
+unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+const xmlChar *nullstr = BAD_CAST "(null)";
+
+ if (publicId == NULL)
+ publicId = nullstr;
+ if (systemId == NULL)
+ systemId = nullstr;
+ if (notationName == NULL)
+ notationName = nullstr;
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",
+ (char *) name, (char *) publicId, (char *) systemId,
+ (char *) notationName);
+}
+
+/**
+ * setDocumentLocatorDebug:
+ * @ctxt: An XML parser context
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator
+ * Everything is available on the context, so this is useless in our case.
+ */
+static void
+setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.setDocumentLocator()\n");
+}
+
+/**
+ * startDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document start being processed.
+ */
+static void
+startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.startDocument()\n");
+}
+
+/**
+ * endDocumentDebug:
+ * @ctxt: An XML parser context
+ *
+ * called when the document end has been detected.
+ */
+static void
+endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.endDocument()\n");
+}
+
+/**
+ * startElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)
+{
+ int i;
+
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.startElement(%s", (char *) name);
+ if (atts != NULL) {
+ for (i = 0;(atts[i] != NULL);i++) {
+ fprintf(stdout, ", %s='", atts[i++]);
+ if (atts[i] != NULL)
+ fprintf(stdout, "%s'", atts[i]);
+ }
+ }
+ fprintf(stdout, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);
+}
+
+/**
+ * charactersDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ * Question: how much at a time ???
+ */
+static void
+charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char out[40];
+ int i;
+
+ callbacks++;
+ if (noout)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ out[i] = ch[i];
+ out[i] = 0;
+
+ fprintf(stdout, "SAX.characters(%s, %d)\n", out, len);
+}
+
+/**
+ * referenceDebug:
+ * @ctxt: An XML parser context
+ * @name: The entity name
+ *
+ * called when an entity reference is detected.
+ */
+static void
+referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.reference(%s)\n", name);
+}
+
+/**
+ * ignorableWhitespaceDebug:
+ * @ctxt: An XML parser context
+ * @ch: a xmlChar string
+ * @start: the first char in the string
+ * @len: the number of xmlChar
+ *
+ * receiving some ignorable whitespaces from the parser.
+ * Question: how much at a time ???
+ */
+static void
+ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
+{
+ char out[40];
+ int i;
+
+ callbacks++;
+ if (noout)
+ return;
+ for (i = 0;(i<len) && (i < 30);i++)
+ out[i] = ch[i];
+ out[i] = 0;
+ fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", out, len);
+}
+
+/**
+ * processingInstructionDebug:
+ * @ctxt: An XML parser context
+ * @target: the target name
+ * @data: the PI data's
+ * @len: the number of xmlChar
+ *
+ * A processing instruction has been parsed.
+ */
+static void
+processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,
+ const xmlChar *data)
+{
+ callbacks++;
+ if (noout)
+ return;
+ if (data != NULL)
+ fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",
+ (char *) target, (char *) data);
+ else
+ fprintf(stdout, "SAX.processingInstruction(%s, NULL)\n",
+ (char *) target);
+}
+
+/**
+ * cdataBlockDebug:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+static void
+cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.pcdata(%.20s, %d)\n",
+ (char *) value, len);
+}
+
+/**
+ * commentDebug:
+ * @ctxt: An XML parser context
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+static void
+commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.comment(%s)\n", value);
+}
+
+/**
+ * warningDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (noout)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.warning: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * errorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a error messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (noout)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.error: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+/**
+ * fatalErrorDebug:
+ * @ctxt: An XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a fatalError messages, gives file, line, position and
+ * extra parameters.
+ */
+static void XMLCDECL
+fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+{
+ va_list args;
+
+ callbacks++;
+ if (noout)
+ return;
+ va_start(args, msg);
+ fprintf(stdout, "SAX.fatalError: ");
+ vfprintf(stdout, msg, args);
+ va_end(args);
+}
+
+static xmlSAXHandler debugSAXHandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ startElementDebug,
+ endElementDebug,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ 1,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;
+
+/*
+ * SAX2 specific callbacks
+ */
+/**
+ * startElementNsDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes)
+{
+ int i;
+
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.startElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", '%s'", (char *) URI);
+ fprintf(stdout, ", %d", nb_namespaces);
+
+ if (namespaces != NULL) {
+ for (i = 0;i < nb_namespaces * 2;i++) {
+ fprintf(stdout, ", xmlns");
+ if (namespaces[i] != NULL)
+ fprintf(stdout, ":%s", namespaces[i]);
+ i++;
+ fprintf(stdout, "='%s'", namespaces[i]);
+ }
+ }
+ fprintf(stdout, ", %d, %d", nb_attributes, nb_defaulted);
+ if (attributes != NULL) {
+ for (i = 0;i < nb_attributes * 5;i += 5) {
+ if (attributes[i + 1] != NULL)
+ fprintf(stdout, ", %s:%s='", attributes[i + 1], attributes[i]);
+ else
+ fprintf(stdout, ", %s='", attributes[i]);
+ fprintf(stdout, "%.4s...', %d", attributes[i + 3],
+ (int)(attributes[i + 4] - attributes[i + 3]));
+ }
+ }
+ fprintf(stdout, ")\n");
+}
+
+/**
+ * endElementDebug:
+ * @ctxt: An XML parser context
+ * @name: The element name
+ *
+ * called when the end of an element has been detected.
+ */
+static void
+endElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI)
+{
+ callbacks++;
+ if (noout)
+ return;
+ fprintf(stdout, "SAX.endElementNs(%s", (char *) localname);
+ if (prefix == NULL)
+ fprintf(stdout, ", NULL");
+ else
+ fprintf(stdout, ", %s", (char *) prefix);
+ if (URI == NULL)
+ fprintf(stdout, ", NULL)\n");
+ else
+ fprintf(stdout, ", '%s')\n", (char *) URI);
+}
+
+static xmlSAXHandler debugSAX2HandlerStruct = {
+ internalSubsetDebug,
+ isStandaloneDebug,
+ hasInternalSubsetDebug,
+ hasExternalSubsetDebug,
+ resolveEntityDebug,
+ getEntityDebug,
+ entityDeclDebug,
+ notationDeclDebug,
+ attributeDeclDebug,
+ elementDeclDebug,
+ unparsedEntityDeclDebug,
+ setDocumentLocatorDebug,
+ startDocumentDebug,
+ endDocumentDebug,
+ NULL,
+ NULL,
+ referenceDebug,
+ charactersDebug,
+ ignorableWhitespaceDebug,
+ processingInstructionDebug,
+ commentDebug,
+ warningDebug,
+ errorDebug,
+ fatalErrorDebug,
+ getParameterEntityDebug,
+ cdataBlockDebug,
+ externalSubsetDebug,
+ XML_SAX2_MAGIC,
+ NULL,
+ startElementNsDebug,
+ endElementNsDebug,
+ NULL
+};
+
+static xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;
+
+static void
+testSAX(const char *filename) {
+ xmlSAXHandlerPtr handler;
+ const char *user_data = "user_data"; /* mostly for debugging */
+ xmlParserInputBufferPtr buf = NULL;
+ xmlParserInputPtr inputStream;
+ xmlParserCtxtPtr ctxt = NULL;
+ xmlSAXHandlerPtr old_sax = NULL;
+
+ callbacks = 0;
+
+ if (noout) {
+ handler = emptySAXHandler;
+#ifdef LIBXML_SAX1_ENABLED
+ } else if (sax1) {
+ handler = debugSAXHandler;
+#endif
+ } else {
+ handler = debugSAX2Handler;
+ }
+
+ /*
+ * it's not the simplest code but the most generic in term of I/O
+ */
+ buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ goto error;
+ }
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (wxschemas != NULL) {
+ int ret;
+ xmlSchemaValidCtxtPtr vctxt;
+
+ vctxt = xmlSchemaNewValidCtxt(wxschemas);
+ xmlSchemaSetValidErrors(vctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ xmlSchemaValidateSetFilename(vctxt, filename);
+
+ ret = xmlSchemaValidateStream(vctxt, buf, 0, handler,
+ (void *)user_data);
+ if (repeat == 0) {
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ }
+ xmlSchemaFreeValidCtxt(vctxt);
+ } else
+#endif
+ {
+ /*
+ * Create the parser context amd hook the input
+ */
+ ctxt = xmlNewParserCtxt();
+ if (ctxt == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ goto error;
+ }
+ old_sax = ctxt->sax;
+ ctxt->sax = handler;
+ ctxt->userData = (void *) user_data;
+ inputStream = xmlNewIOInputStream(ctxt, buf, XML_CHAR_ENCODING_NONE);
+ if (inputStream == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ goto error;
+ }
+ inputPush(ctxt, inputStream);
+
+ /* do the parsing */
+ xmlParseDocument(ctxt);
+
+ if (ctxt->myDoc != NULL) {
+ fprintf(stderr, "SAX generated a doc !\n");
+ xmlFreeDoc(ctxt->myDoc);
+ ctxt->myDoc = NULL;
+ }
+ }
+
+error:
+ if (ctxt != NULL) {
+ ctxt->sax = old_sax;
+ xmlFreeParserCtxt(ctxt);
+ }
+}
+
+/************************************************************************
+ * *
+ * Stream Test processing *
+ * *
+ ************************************************************************/
+#ifdef LIBXML_READER_ENABLED
+static void processNode(xmlTextReaderPtr reader) {
+ const xmlChar *name, *value;
+ int type, empty;
+
+ type = xmlTextReaderNodeType(reader);
+ empty = xmlTextReaderIsEmptyElement(reader);
+
+ if (debug) {
+ name = xmlTextReaderConstName(reader);
+ if (name == NULL)
+ name = BAD_CAST "--";
+
+ value = xmlTextReaderConstValue(reader);
+
+
+ printf("%d %d %s %d %d",
+ xmlTextReaderDepth(reader),
+ type,
+ name,
+ empty,
+ xmlTextReaderHasValue(reader));
+ if (value == NULL)
+ printf("\n");
+ else {
+ printf(" %s\n", value);
+ }
+ }
+#ifdef LIBXML_PATTERN_ENABLED
+ if (patternc) {
+ xmlChar *path = NULL;
+ int match = -1;
+
+ if (type == XML_READER_TYPE_ELEMENT) {
+ /* do the check only on element start */
+ match = xmlPatternMatch(patternc, xmlTextReaderCurrentNode(reader));
+
+ if (match) {
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+ path = xmlGetNodePath(xmlTextReaderCurrentNode(reader));
+ printf("Node %s matches pattern %s\n", path, pattern);
+#else
+ printf("Node %s matches pattern %s\n",
+ xmlTextReaderConstName(reader), pattern);
+#endif
+ }
+ }
+ if (patstream != NULL) {
+ int ret;
+
+ if (type == XML_READER_TYPE_ELEMENT) {
+ ret = xmlStreamPush(patstream,
+ xmlTextReaderConstLocalName(reader),
+ xmlTextReaderConstNamespaceUri(reader));
+ if (ret < 0) {
+ fprintf(stderr, "xmlStreamPush() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ } else if (ret != match) {
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+ if (path == NULL) {
+ path = xmlGetNodePath(
+ xmlTextReaderCurrentNode(reader));
+ }
+#endif
+ fprintf(stderr,
+ "xmlPatternMatch and xmlStreamPush disagree\n");
+ if (path != NULL)
+ fprintf(stderr, " pattern %s node %s\n",
+ pattern, path);
+ else
+ fprintf(stderr, " pattern %s node %s\n",
+ pattern, xmlTextReaderConstName(reader));
+ }
+
+ }
+ if ((type == XML_READER_TYPE_END_ELEMENT) ||
+ ((type == XML_READER_TYPE_ELEMENT) && (empty))) {
+ ret = xmlStreamPop(patstream);
+ if (ret < 0) {
+ fprintf(stderr, "xmlStreamPop() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+ }
+ }
+ if (path != NULL)
+ xmlFree(path);
+ }
+#endif
+}
+
+static void streamFile(char *filename) {
+ xmlTextReaderPtr reader;
+ int ret;
+#ifdef HAVE_MMAP
+ int fd = -1;
+ struct stat info;
+ const char *base = NULL;
+ xmlParserInputBufferPtr input = NULL;
+
+ if (memory) {
+ if (stat(filename, &info) < 0)
+ return;
+ if ((fd = open(filename, O_RDONLY)) < 0)
+ return;
+ base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ;
+ if (base == (void *) MAP_FAILED) {
+ close(fd);
+ fprintf(stderr, "mmap failure for file %s\n", filename);
+ progresult = XMLLINT_ERR_RDFILE;
+ return;
+ }
+
+ reader = xmlReaderForMemory(base, info.st_size, filename,
+ NULL, options);
+ } else
+#endif
+ reader = xmlReaderForFile(filename, NULL, options);
+#ifdef LIBXML_PATTERN_ENABLED
+ if (pattern != NULL) {
+ patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL);
+ if (patternc == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Pattern %s failed to compile\n", pattern);
+ progresult = XMLLINT_ERR_SCHEMAPAT;
+ pattern = NULL;
+ }
+ }
+ if (patternc != NULL) {
+ patstream = xmlPatternGetStreamCtxt(patternc);
+ if (patstream != NULL) {
+ ret = xmlStreamPush(patstream, NULL, NULL);
+ if (ret < 0) {
+ fprintf(stderr, "xmlStreamPush() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+ }
+ }
+#endif
+
+
+ if (reader != NULL) {
+#ifdef LIBXML_VALID_ENABLED
+ if (valid)
+ xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1);
+ else
+#endif /* LIBXML_VALID_ENABLED */
+ if (loaddtd)
+ xmlTextReaderSetParserProp(reader, XML_PARSER_LOADDTD, 1);
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (relaxng != NULL) {
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ ret = xmlTextReaderRelaxNGValidate(reader, relaxng);
+ if (ret < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Relax-NG schema %s failed to compile\n", relaxng);
+ progresult = XMLLINT_ERR_SCHEMACOMP;
+ relaxng = NULL;
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Compiling the schemas");
+ }
+ }
+ if (schema != NULL) {
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ ret = xmlTextReaderSchemaValidate(reader, schema);
+ if (ret < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "XSD schema %s failed to compile\n", schema);
+ progresult = XMLLINT_ERR_SCHEMACOMP;
+ schema = NULL;
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Compiling the schemas");
+ }
+ }
+#endif
+
+ /*
+ * Process all nodes in sequence
+ */
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ if ((debug)
+#ifdef LIBXML_PATTERN_ENABLED
+ || (patternc)
+#endif
+ )
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ if ((timing) && (!repeat)) {
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (relaxng != NULL)
+ endTimer("Parsing and validating");
+ else
+#endif
+#ifdef LIBXML_VALID_ENABLED
+ if (valid)
+ endTimer("Parsing and validating");
+ else
+#endif
+ endTimer("Parsing");
+ }
+
+#ifdef LIBXML_VALID_ENABLED
+ if (valid) {
+ if (xmlTextReaderIsValid(reader) != 1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Document %s does not validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ }
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((relaxng != NULL) || (schema != NULL)) {
+ if (xmlTextReaderIsValid(reader) != 1) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validates\n", filename);
+ }
+ }
+#endif
+ /*
+ * Done, cleanup and status
+ */
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ fprintf(stderr, "%s : failed to parse\n", filename);
+ progresult = XMLLINT_ERR_UNCLASS;
+ }
+ } else {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ progresult = XMLLINT_ERR_UNCLASS;
+ }
+#ifdef LIBXML_PATTERN_ENABLED
+ if (patstream != NULL) {
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+#endif
+#ifdef HAVE_MMAP
+ if (memory) {
+ xmlFreeParserInputBuffer(input);
+ munmap((char *) base, info.st_size);
+ close(fd);
+ }
+#endif
+}
+
+static void walkDoc(xmlDocPtr doc) {
+ xmlTextReaderPtr reader;
+ int ret;
+
+#ifdef LIBXML_PATTERN_ENABLED
+ xmlNodePtr root;
+ const xmlChar *namespaces[22];
+ int i;
+ xmlNsPtr ns;
+
+ root = xmlDocGetRootElement(doc);
+ for (ns = root->nsDef, i = 0;ns != NULL && i < 20;ns=ns->next) {
+ namespaces[i++] = ns->href;
+ namespaces[i++] = ns->prefix;
+ }
+ namespaces[i++] = NULL;
+ namespaces[i] = NULL;
+
+ if (pattern != NULL) {
+ patternc = xmlPatterncompile((const xmlChar *) pattern, doc->dict,
+ 0, &namespaces[0]);
+ if (patternc == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Pattern %s failed to compile\n", pattern);
+ progresult = XMLLINT_ERR_SCHEMAPAT;
+ pattern = NULL;
+ }
+ }
+ if (patternc != NULL) {
+ patstream = xmlPatternGetStreamCtxt(patternc);
+ if (patstream != NULL) {
+ ret = xmlStreamPush(patstream, NULL, NULL);
+ if (ret < 0) {
+ fprintf(stderr, "xmlStreamPush() failure\n");
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+ }
+ }
+#endif /* LIBXML_PATTERN_ENABLED */
+ reader = xmlReaderWalker(doc);
+ if (reader != NULL) {
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ ret = xmlTextReaderRead(reader);
+ while (ret == 1) {
+ if ((debug)
+#ifdef LIBXML_PATTERN_ENABLED
+ || (patternc)
+#endif
+ )
+ processNode(reader);
+ ret = xmlTextReaderRead(reader);
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("walking through the doc");
+ }
+ xmlFreeTextReader(reader);
+ if (ret != 0) {
+ fprintf(stderr, "failed to walk through the doc\n");
+ progresult = XMLLINT_ERR_UNCLASS;
+ }
+ } else {
+ fprintf(stderr, "Failed to crate a reader from the document\n");
+ progresult = XMLLINT_ERR_UNCLASS;
+ }
+#ifdef LIBXML_PATTERN_ENABLED
+ if (patstream != NULL) {
+ xmlFreeStreamCtxt(patstream);
+ patstream = NULL;
+ }
+#endif
+}
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef LIBXML_XPATH_ENABLED
+/************************************************************************
+ * *
+ * XPath Query *
+ * *
+ ************************************************************************/
+
+static void doXPathDump(xmlXPathObjectPtr cur) {
+ switch(cur->type) {
+ case XPATH_NODESET: {
+ int i;
+ xmlNodePtr node;
+#ifdef LIBXML_OUTPUT_ENABLED
+ xmlSaveCtxtPtr ctxt;
+
+ if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr <= 0)) {
+ fprintf(stderr, "XPath set is empty\n");
+ progresult = XMLLINT_ERR_XPATH;
+ break;
+ }
+ ctxt = xmlSaveToFd(1, NULL, 0);
+ if (ctxt == NULL) {
+ fprintf(stderr, "Out of memory for XPath\n");
+ progresult = XMLLINT_ERR_MEM;
+ return;
+ }
+ for (i = 0;i < cur->nodesetval->nodeNr;i++) {
+ node = cur->nodesetval->nodeTab[i];
+ xmlSaveTree(ctxt, node);
+ }
+ xmlSaveClose(ctxt);
+#else
+ printf("xpath returned %d nodes\n", cur->nodesetval->nodeNr);
+#endif
+ break;
+ }
+ case XPATH_BOOLEAN:
+ if (cur->boolval) printf("true");
+ else printf("false");
+ break;
+ case XPATH_NUMBER:
+ switch (xmlXPathIsInf(cur->floatval)) {
+ case 1:
+ printf("Infinity");
+ break;
+ case -1:
+ printf("-Infinity");
+ break;
+ default:
+ if (xmlXPathIsNaN(cur->floatval)) {
+ printf("NaN");
+ } else {
+ printf("%0g", cur->floatval);
+ }
+ }
+ break;
+ case XPATH_STRING:
+ printf("%s", (const char *) cur->stringval);
+ break;
+ case XPATH_UNDEFINED:
+ fprintf(stderr, "XPath Object is uninitialized\n");
+ progresult = XMLLINT_ERR_XPATH;
+ break;
+ default:
+ fprintf(stderr, "XPath object of unexpected type\n");
+ progresult = XMLLINT_ERR_XPATH;
+ break;
+ }
+}
+
+static void doXPathQuery(xmlDocPtr doc, const char *query) {
+ xmlXPathContextPtr ctxt;
+ xmlXPathObjectPtr res;
+
+ ctxt = xmlXPathNewContext(doc);
+ if (ctxt == NULL) {
+ fprintf(stderr, "Out of memory for XPath\n");
+ progresult = XMLLINT_ERR_MEM;
+ return;
+ }
+ ctxt->node = (xmlNodePtr) doc;
+ res = xmlXPathEval(BAD_CAST query, ctxt);
+ xmlXPathFreeContext(ctxt);
+
+ if (res == NULL) {
+ fprintf(stderr, "XPath evaluation failure\n");
+ progresult = XMLLINT_ERR_XPATH;
+ return;
+ }
+ doXPathDump(res);
+ xmlXPathFreeObject(res);
+}
+#endif /* LIBXML_XPATH_ENABLED */
+
+/************************************************************************
+ * *
+ * Tree Test processing *
+ * *
+ ************************************************************************/
+static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
+ xmlDocPtr doc = NULL;
+#ifdef LIBXML_TREE_ENABLED
+ xmlDocPtr tmp;
+#endif /* LIBXML_TREE_ENABLED */
+
+ if ((timing) && (!repeat))
+ startTimer();
+
+
+#ifdef LIBXML_TREE_ENABLED
+ if (filename == NULL) {
+ if (generate) {
+ xmlNodePtr n;
+
+ doc = xmlNewDoc(BAD_CAST "1.0");
+ n = xmlNewDocNode(doc, NULL, BAD_CAST "info", NULL);
+ xmlNodeSetContent(n, BAD_CAST "abc");
+ xmlDocSetRootElement(doc, n);
+ }
+ }
+#endif /* LIBXML_TREE_ENABLED */
+#ifdef LIBXML_HTML_ENABLED
+#ifdef LIBXML_PUSH_ENABLED
+ else if ((html) && (push)) {
+ FILE *f;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#elif defined(__OS400__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ int res;
+ char chars[4096];
+ htmlParserCtxtPtr ctxt;
+
+ res = fread(chars, 1, 4, f);
+ if (res > 0) {
+ ctxt = htmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename, XML_CHAR_ENCODING_NONE);
+ xmlCtxtUseOptions(ctxt, options);
+ while ((res = fread(chars, 1, pushsize, f)) > 0) {
+ htmlParseChunk(ctxt, chars, res, 0);
+ }
+ htmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt->myDoc;
+ htmlFreeParserCtxt(ctxt);
+ }
+ fclose(f);
+ }
+ }
+#endif /* LIBXML_PUSH_ENABLED */
+#ifdef HAVE_MMAP
+ else if ((html) && (memory)) {
+ int fd;
+ struct stat info;
+ const char *base;
+ if (stat(filename, &info) < 0)
+ return;
+ if ((fd = open(filename, O_RDONLY)) < 0)
+ return;
+ base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ;
+ if (base == (void *) MAP_FAILED) {
+ close(fd);
+ fprintf(stderr, "mmap failure for file %s\n", filename);
+ progresult = XMLLINT_ERR_RDFILE;
+ return;
+ }
+
+ doc = htmlReadMemory((char *) base, info.st_size, filename,
+ NULL, options);
+
+ munmap((char *) base, info.st_size);
+ close(fd);
+ }
+#endif
+ else if (html) {
+ doc = htmlReadFile(filename, NULL, options);
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ else {
+#ifdef LIBXML_PUSH_ENABLED
+ /*
+ * build an XML tree from a string;
+ */
+ if (push) {
+ FILE *f;
+
+ /* '-' Usually means stdin -<sven@zen.org> */
+ if ((filename[0] == '-') && (filename[1] == 0)) {
+ f = stdin;
+ } else {
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#elif defined(__OS400__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ }
+ if (f != NULL) {
+ int ret;
+ int res, size = 1024;
+ char chars[1024];
+ xmlParserCtxtPtr ctxt;
+
+ /* if (repeat) size = 1024; */
+ res = fread(chars, 1, 4, f);
+ if (res > 0) {
+ ctxt = xmlCreatePushParserCtxt(NULL, NULL,
+ chars, res, filename);
+ xmlCtxtUseOptions(ctxt, options);
+ while ((res = fread(chars, 1, size, f)) > 0) {
+ xmlParseChunk(ctxt, chars, res, 0);
+ }
+ xmlParseChunk(ctxt, chars, 0, 1);
+ doc = ctxt->myDoc;
+ ret = ctxt->wellFormed;
+ xmlFreeParserCtxt(ctxt);
+ if (!ret) {
+ xmlFreeDoc(doc);
+ doc = NULL;
+ }
+ }
+ if (f != stdin)
+ fclose(f);
+ }
+ } else
+#endif /* LIBXML_PUSH_ENABLED */
+ if (testIO) {
+ if ((filename[0] == '-') && (filename[1] == 0)) {
+ doc = xmlReadFd(0, NULL, NULL, options);
+ } else {
+ FILE *f;
+
+#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
+ f = fopen(filename, "rb");
+#elif defined(__OS400__)
+ f = fopen(filename, "rb");
+#else
+ f = fopen(filename, "r");
+#endif
+ if (f != NULL) {
+ if (rectxt == NULL)
+ doc = xmlReadIO((xmlInputReadCallback) myRead,
+ (xmlInputCloseCallback) myClose, f,
+ filename, NULL, options);
+ else
+ doc = xmlCtxtReadIO(rectxt,
+ (xmlInputReadCallback) myRead,
+ (xmlInputCloseCallback) myClose, f,
+ filename, NULL, options);
+ } else
+ doc = NULL;
+ }
+ } else if (htmlout) {
+ xmlParserCtxtPtr ctxt;
+
+ if (rectxt == NULL)
+ ctxt = xmlNewParserCtxt();
+ else
+ ctxt = rectxt;
+ if (ctxt == NULL) {
+ doc = NULL;
+ } else {
+ ctxt->sax->error = xmlHTMLError;
+ ctxt->sax->warning = xmlHTMLWarning;
+ ctxt->vctxt.error = xmlHTMLValidityError;
+ ctxt->vctxt.warning = xmlHTMLValidityWarning;
+
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
+
+ if (rectxt == NULL)
+ xmlFreeParserCtxt(ctxt);
+ }
+#ifdef HAVE_MMAP
+ } else if (memory) {
+ int fd;
+ struct stat info;
+ const char *base;
+ if (stat(filename, &info) < 0)
+ return;
+ if ((fd = open(filename, O_RDONLY)) < 0)
+ return;
+ base = mmap(NULL, info.st_size, PROT_READ, MAP_SHARED, fd, 0) ;
+ if (base == (void *) MAP_FAILED) {
+ close(fd);
+ fprintf(stderr, "mmap failure for file %s\n", filename);
+ progresult = XMLLINT_ERR_RDFILE;
+ return;
+ }
+
+ if (rectxt == NULL)
+ doc = xmlReadMemory((char *) base, info.st_size,
+ filename, NULL, options);
+ else
+ doc = xmlCtxtReadMemory(rectxt, (char *) base, info.st_size,
+ filename, NULL, options);
+
+ munmap((char *) base, info.st_size);
+ close(fd);
+#endif
+#ifdef LIBXML_VALID_ENABLED
+ } else if (valid) {
+ xmlParserCtxtPtr ctxt = NULL;
+
+ if (rectxt == NULL)
+ ctxt = xmlNewParserCtxt();
+ else
+ ctxt = rectxt;
+ if (ctxt == NULL) {
+ doc = NULL;
+ } else {
+ doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
+
+ if (ctxt->valid == 0)
+ progresult = XMLLINT_ERR_RDFILE;
+ if (rectxt == NULL)
+ xmlFreeParserCtxt(ctxt);
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ } else {
+ if (rectxt != NULL)
+ doc = xmlCtxtReadFile(rectxt, filename, NULL, options);
+ else {
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax1)
+ doc = xmlParseFile(filename);
+ else
+#endif /* LIBXML_SAX1_ENABLED */
+ doc = xmlReadFile(filename, NULL, options);
+ }
+ }
+ }
+
+ /*
+ * If we don't have a document we might as well give up. Do we
+ * want an error message here? <sven@zen.org> */
+ if (doc == NULL) {
+ progresult = XMLLINT_ERR_UNCLASS;
+ return;
+ }
+
+ if ((timing) && (!repeat)) {
+ endTimer("Parsing");
+ }
+
+ /*
+ * Remove DOCTYPE nodes
+ */
+ if (dropdtd) {
+ xmlDtdPtr dtd;
+
+ dtd = xmlGetIntSubset(doc);
+ if (dtd != NULL) {
+ xmlUnlinkNode((xmlNodePtr)dtd);
+ xmlFreeDtd(dtd);
+ }
+ }
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (xinclude) {
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ if (xmlXIncludeProcessFlags(doc, options) < 0)
+ progresult = XMLLINT_ERR_UNCLASS;
+ if ((timing) && (!repeat)) {
+ endTimer("Xinclude processing");
+ }
+ }
+#endif
+
+#ifdef LIBXML_XPATH_ENABLED
+ if (xpathquery != NULL) {
+ doXPathQuery(doc, xpathquery);
+ }
+#endif
+
+#ifdef LIBXML_DEBUG_ENABLED
+#ifdef LIBXML_XPATH_ENABLED
+ /*
+ * shell interaction
+ */
+ if (shell) {
+ xmlXPathOrderDocElems(doc);
+ xmlShell(doc, filename, xmlShellReadline, stdout);
+ }
+#endif
+#endif
+
+#ifdef LIBXML_TREE_ENABLED
+ /*
+ * test intermediate copy if needed.
+ */
+ if (copy) {
+ tmp = doc;
+ if (timing) {
+ startTimer();
+ }
+ doc = xmlCopyDoc(doc, 1);
+ if (timing) {
+ endTimer("Copying");
+ }
+ if (timing) {
+ startTimer();
+ }
+ xmlFreeDoc(tmp);
+ if (timing) {
+ endTimer("Freeing original");
+ }
+ }
+#endif /* LIBXML_TREE_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((insert) && (!html)) {
+ const xmlChar* list[256];
+ int nb, i;
+ xmlNodePtr node;
+
+ if (doc->children != NULL) {
+ node = doc->children;
+ while ((node != NULL) && (node->last == NULL)) node = node->next;
+ if (node != NULL) {
+ nb = xmlValidGetValidElements(node->last, NULL, list, 256);
+ if (nb < 0) {
+ fprintf(stderr, "could not get valid list of elements\n");
+ } else if (nb == 0) {
+ fprintf(stderr, "No element can be inserted under root\n");
+ } else {
+ fprintf(stderr, "%d element types can be inserted under root:\n",
+ nb);
+ for (i = 0;i < nb;i++) {
+ fprintf(stderr, "%s\n", (char *) list[i]);
+ }
+ }
+ }
+ }
+ }else
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_READER_ENABLED
+ if (walker) {
+ walkDoc(doc);
+ }
+#endif /* LIBXML_READER_ENABLED */
+#ifdef LIBXML_OUTPUT_ENABLED
+ if (noout == 0) {
+ int ret;
+
+ /*
+ * print it.
+ */
+#ifdef LIBXML_DEBUG_ENABLED
+ if (!debug) {
+#endif
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if ((html) && (!xmlout)) {
+ if (compress) {
+ htmlSaveFile(output ? output : "-", doc);
+ }
+ else if (encoding != NULL) {
+ if (format == 1) {
+ htmlSaveFileFormat(output ? output : "-", doc, encoding, 1);
+ }
+ else {
+ htmlSaveFileFormat(output ? output : "-", doc, encoding, 0);
+ }
+ }
+ else if (format == 1) {
+ htmlSaveFileFormat(output ? output : "-", doc, NULL, 1);
+ }
+ else {
+ FILE *out;
+ if (output == NULL)
+ out = stdout;
+ else {
+ out = fopen(output,"wb");
+ }
+ if (out != NULL) {
+ if (htmlDocDump(out, doc) < 0)
+ progresult = XMLLINT_ERR_OUT;
+
+ if (output != NULL)
+ fclose(out);
+ } else {
+ fprintf(stderr, "failed to open %s\n", output);
+ progresult = XMLLINT_ERR_OUT;
+ }
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Saving");
+ }
+ } else
+#endif
+#ifdef LIBXML_C14N_ENABLED
+ if (canonical) {
+ xmlChar *result = NULL;
+ int size;
+
+ size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_0, NULL, 1, &result);
+ if (size >= 0) {
+ if (write(1, result, size) == -1) {
+ fprintf(stderr, "Can't write data\n");
+ }
+ xmlFree(result);
+ } else {
+ fprintf(stderr, "Failed to canonicalize\n");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ } else if (canonical_11) {
+ xmlChar *result = NULL;
+ int size;
+
+ size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_1_1, NULL, 1, &result);
+ if (size >= 0) {
+ if (write(1, result, size) == -1) {
+ fprintf(stderr, "Can't write data\n");
+ }
+ xmlFree(result);
+ } else {
+ fprintf(stderr, "Failed to canonicalize\n");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ } else
+ if (exc_canonical) {
+ xmlChar *result = NULL;
+ int size;
+
+ size = xmlC14NDocDumpMemory(doc, NULL, XML_C14N_EXCLUSIVE_1_0, NULL, 1, &result);
+ if (size >= 0) {
+ if (write(1, result, size) == -1) {
+ fprintf(stderr, "Can't write data\n");
+ }
+ xmlFree(result);
+ } else {
+ fprintf(stderr, "Failed to canonicalize\n");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ } else
+#endif
+#ifdef HAVE_MMAP
+ if (memory) {
+ xmlChar *result;
+ int len;
+
+ if (encoding != NULL) {
+ if (format == 1) {
+ xmlDocDumpFormatMemoryEnc(doc, &result, &len, encoding, 1);
+ } else {
+ xmlDocDumpMemoryEnc(doc, &result, &len, encoding);
+ }
+ } else {
+ if (format == 1)
+ xmlDocDumpFormatMemory(doc, &result, &len, 1);
+ else
+ xmlDocDumpMemory(doc, &result, &len);
+ }
+ if (result == NULL) {
+ fprintf(stderr, "Failed to save\n");
+ progresult = XMLLINT_ERR_OUT;
+ } else {
+ if (write(1, result, len) == -1) {
+ fprintf(stderr, "Can't write data\n");
+ }
+ xmlFree(result);
+ }
+
+ } else
+#endif /* HAVE_MMAP */
+ if (compress) {
+ xmlSaveFile(output ? output : "-", doc);
+ } else if (oldout) {
+ if (encoding != NULL) {
+ if (format == 1) {
+ ret = xmlSaveFormatFileEnc(output ? output : "-", doc,
+ encoding, 1);
+ }
+ else {
+ ret = xmlSaveFileEnc(output ? output : "-", doc,
+ encoding);
+ }
+ if (ret < 0) {
+ fprintf(stderr, "failed save to %s\n",
+ output ? output : "-");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ } else if (format == 1) {
+ ret = xmlSaveFormatFile(output ? output : "-", doc, 1);
+ if (ret < 0) {
+ fprintf(stderr, "failed save to %s\n",
+ output ? output : "-");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ } else {
+ FILE *out;
+ if (output == NULL)
+ out = stdout;
+ else {
+ out = fopen(output,"wb");
+ }
+ if (out != NULL) {
+ if (xmlDocDump(out, doc) < 0)
+ progresult = XMLLINT_ERR_OUT;
+
+ if (output != NULL)
+ fclose(out);
+ } else {
+ fprintf(stderr, "failed to open %s\n", output);
+ progresult = XMLLINT_ERR_OUT;
+ }
+ }
+ } else {
+ xmlSaveCtxtPtr ctxt;
+ int saveOpts = 0;
+
+ if (format == 1)
+ saveOpts |= XML_SAVE_FORMAT;
+ else if (format == 2)
+ saveOpts |= XML_SAVE_WSNONSIG;
+
+#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)
+ if (xmlout)
+ saveOpts |= XML_SAVE_AS_XML;
+#endif
+
+ if (output == NULL)
+ ctxt = xmlSaveToFd(1, encoding, saveOpts);
+ else
+ ctxt = xmlSaveToFilename(output, encoding, saveOpts);
+
+ if (ctxt != NULL) {
+ if (xmlSaveDoc(ctxt, doc) < 0) {
+ fprintf(stderr, "failed save to %s\n",
+ output ? output : "-");
+ progresult = XMLLINT_ERR_OUT;
+ }
+ xmlSaveClose(ctxt);
+ } else {
+ progresult = XMLLINT_ERR_OUT;
+ }
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Saving");
+ }
+#ifdef LIBXML_DEBUG_ENABLED
+ } else {
+ FILE *out;
+ if (output == NULL)
+ out = stdout;
+ else {
+ out = fopen(output,"wb");
+ }
+ if (out != NULL) {
+ xmlDebugDumpDocument(out, doc);
+
+ if (output != NULL)
+ fclose(out);
+ } else {
+ fprintf(stderr, "failed to open %s\n", output);
+ progresult = XMLLINT_ERR_OUT;
+ }
+ }
+#endif
+ }
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+ /*
+ * A posteriori validation test
+ */
+ if ((dtdvalid != NULL) || (dtdvalidfpi != NULL)) {
+ xmlDtdPtr dtd;
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ if (dtdvalid != NULL)
+ dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid);
+ else
+ dtd = xmlParseDTD((const xmlChar *)dtdvalidfpi, NULL);
+ if ((timing) && (!repeat)) {
+ endTimer("Parsing DTD");
+ }
+ if (dtd == NULL) {
+ if (dtdvalid != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Could not parse DTD %s\n", dtdvalid);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Could not parse DTD %s\n", dtdvalidfpi);
+ progresult = XMLLINT_ERR_DTD;
+ } else {
+ xmlValidCtxtPtr cvp;
+
+ if ((cvp = xmlNewValidCtxt()) == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Couldn't allocate validation context\n");
+ exit(-1);
+ }
+ cvp->userData = (void *) stderr;
+ cvp->error = (xmlValidityErrorFunc) fprintf;
+ cvp->warning = (xmlValidityWarningFunc) fprintf;
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ if (!xmlValidateDtd(cvp, doc, dtd)) {
+ if (dtdvalid != NULL)
+ xmlGenericError(xmlGenericErrorContext,
+ "Document %s does not validate against %s\n",
+ filename, dtdvalid);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "Document %s does not validate against %s\n",
+ filename, dtdvalidfpi);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Validating against DTD");
+ }
+ xmlFreeValidCtxt(cvp);
+ xmlFreeDtd(dtd);
+ }
+ } else if (postvalid) {
+ xmlValidCtxtPtr cvp;
+
+ if ((cvp = xmlNewValidCtxt()) == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Couldn't allocate validation context\n");
+ exit(-1);
+ }
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ cvp->userData = (void *) stderr;
+ cvp->error = (xmlValidityErrorFunc) fprintf;
+ cvp->warning = (xmlValidityWarningFunc) fprintf;
+ if (!xmlValidateDocument(cvp, doc)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Document %s does not validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ if ((timing) && (!repeat)) {
+ endTimer("Validating");
+ }
+ xmlFreeValidCtxt(cvp);
+ }
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ if (wxschematron != NULL) {
+ xmlSchematronValidCtxtPtr ctxt;
+ int ret;
+ int flag;
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+
+ if (debug)
+ flag = XML_SCHEMATRON_OUT_XML;
+ else
+ flag = XML_SCHEMATRON_OUT_TEXT;
+ if (noout)
+ flag |= XML_SCHEMATRON_OUT_QUIET;
+ ctxt = xmlSchematronNewValidCtxt(wxschematron, flag);
+#if 0
+ xmlSchematronSetValidErrors(ctxt,
+ (xmlSchematronValidityErrorFunc) fprintf,
+ (xmlSchematronValidityWarningFunc) fprintf,
+ stderr);
+#endif
+ ret = xmlSchematronValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ xmlSchematronFreeValidCtxt(ctxt);
+ if ((timing) && (!repeat)) {
+ endTimer("Validating");
+ }
+ }
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (relaxngschemas != NULL) {
+ xmlRelaxNGValidCtxtPtr ctxt;
+ int ret;
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+
+ ctxt = xmlRelaxNGNewValidCtxt(relaxngschemas);
+ xmlRelaxNGSetValidErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ ret = xmlRelaxNGValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ xmlRelaxNGFreeValidCtxt(ctxt);
+ if ((timing) && (!repeat)) {
+ endTimer("Validating");
+ }
+ } else if (wxschemas != NULL) {
+ xmlSchemaValidCtxtPtr ctxt;
+ int ret;
+
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+
+ ctxt = xmlSchemaNewValidCtxt(wxschemas);
+ xmlSchemaSetValidErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ ret = xmlSchemaValidateDoc(ctxt, doc);
+ if (ret == 0) {
+ fprintf(stderr, "%s validates\n", filename);
+ } else if (ret > 0) {
+ fprintf(stderr, "%s fails to validate\n", filename);
+ progresult = XMLLINT_ERR_VALID;
+ } else {
+ fprintf(stderr, "%s validation generated an internal error\n",
+ filename);
+ progresult = XMLLINT_ERR_VALID;
+ }
+ xmlSchemaFreeValidCtxt(ctxt);
+ if ((timing) && (!repeat)) {
+ endTimer("Validating");
+ }
+ }
+#endif
+
+#ifdef LIBXML_DEBUG_ENABLED
+#if defined(LIBXML_HTML_ENABLED) || defined(LIBXML_VALID_ENABLED)
+ if ((debugent) && (!html))
+ xmlDebugDumpEntities(stderr, doc);
+#endif
+#endif
+
+ /*
+ * free it.
+ */
+ if ((timing) && (!repeat)) {
+ startTimer();
+ }
+ xmlFreeDoc(doc);
+ if ((timing) && (!repeat)) {
+ endTimer("Freeing");
+ }
+}
+
+/************************************************************************
+ * *
+ * Usage and Main *
+ * *
+ ************************************************************************/
+
+static void showVersion(const char *name) {
+ fprintf(stderr, "%s: using libxml version %s\n", name, xmlParserVersion);
+ fprintf(stderr, " compiled with: ");
+ if (xmlHasFeature(XML_WITH_THREAD)) fprintf(stderr, "Threads ");
+ if (xmlHasFeature(XML_WITH_TREE)) fprintf(stderr, "Tree ");
+ if (xmlHasFeature(XML_WITH_OUTPUT)) fprintf(stderr, "Output ");
+ if (xmlHasFeature(XML_WITH_PUSH)) fprintf(stderr, "Push ");
+ if (xmlHasFeature(XML_WITH_READER)) fprintf(stderr, "Reader ");
+ if (xmlHasFeature(XML_WITH_PATTERN)) fprintf(stderr, "Patterns ");
+ if (xmlHasFeature(XML_WITH_WRITER)) fprintf(stderr, "Writer ");
+ if (xmlHasFeature(XML_WITH_SAX1)) fprintf(stderr, "SAXv1 ");
+ if (xmlHasFeature(XML_WITH_FTP)) fprintf(stderr, "FTP ");
+ if (xmlHasFeature(XML_WITH_HTTP)) fprintf(stderr, "HTTP ");
+ if (xmlHasFeature(XML_WITH_VALID)) fprintf(stderr, "DTDValid ");
+ if (xmlHasFeature(XML_WITH_HTML)) fprintf(stderr, "HTML ");
+ if (xmlHasFeature(XML_WITH_LEGACY)) fprintf(stderr, "Legacy ");
+ if (xmlHasFeature(XML_WITH_C14N)) fprintf(stderr, "C14N ");
+ if (xmlHasFeature(XML_WITH_CATALOG)) fprintf(stderr, "Catalog ");
+ if (xmlHasFeature(XML_WITH_XPATH)) fprintf(stderr, "XPath ");
+ if (xmlHasFeature(XML_WITH_XPTR)) fprintf(stderr, "XPointer ");
+ if (xmlHasFeature(XML_WITH_XINCLUDE)) fprintf(stderr, "XInclude ");
+ if (xmlHasFeature(XML_WITH_ICONV)) fprintf(stderr, "Iconv ");
+ if (xmlHasFeature(XML_WITH_ISO8859X)) fprintf(stderr, "ISO8859X ");
+ if (xmlHasFeature(XML_WITH_UNICODE)) fprintf(stderr, "Unicode ");
+ if (xmlHasFeature(XML_WITH_REGEXP)) fprintf(stderr, "Regexps ");
+ if (xmlHasFeature(XML_WITH_AUTOMATA)) fprintf(stderr, "Automata ");
+ if (xmlHasFeature(XML_WITH_EXPR)) fprintf(stderr, "Expr ");
+ if (xmlHasFeature(XML_WITH_SCHEMAS)) fprintf(stderr, "Schemas ");
+ if (xmlHasFeature(XML_WITH_SCHEMATRON)) fprintf(stderr, "Schematron ");
+ if (xmlHasFeature(XML_WITH_MODULES)) fprintf(stderr, "Modules ");
+ if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug ");
+ if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug ");
+ if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug ");
+ if (xmlHasFeature(XML_WITH_ZLIB)) fprintf(stderr, "Zlib ");
+ if (xmlHasFeature(XML_WITH_LZMA)) fprintf(stderr, "Lzma ");
+ fprintf(stderr, "\n");
+}
+
+static void usage(const char *name) {
+ printf("Usage : %s [options] XMLfiles ...\n", name);
+#ifdef LIBXML_OUTPUT_ENABLED
+ printf("\tParse the XML files and output the result of the parsing\n");
+#else
+ printf("\tParse the XML files\n");
+#endif /* LIBXML_OUTPUT_ENABLED */
+ printf("\t--version : display the version of the XML library used\n");
+#ifdef LIBXML_DEBUG_ENABLED
+ printf("\t--debug : dump a debug tree of the in-memory document\n");
+ printf("\t--shell : run a navigating shell\n");
+ printf("\t--debugent : debug the entities defined in the document\n");
+#else
+#ifdef LIBXML_READER_ENABLED
+ printf("\t--debug : dump the nodes content when using --stream\n");
+#endif /* LIBXML_READER_ENABLED */
+#endif
+#ifdef LIBXML_TREE_ENABLED
+ printf("\t--copy : used to test the internal copy implementation\n");
+#endif /* LIBXML_TREE_ENABLED */
+ printf("\t--recover : output what was parsable on broken XML documents\n");
+ printf("\t--huge : remove any internal arbitrary parser limits\n");
+ printf("\t--noent : substitute entity references by their value\n");
+ printf("\t--noenc : ignore any encoding specified inside the document\n");
+ printf("\t--noout : don't output the result tree\n");
+ printf("\t--path 'paths': provide a set of paths for resources\n");
+ printf("\t--load-trace : print trace of all external entities loaded\n");
+ printf("\t--nonet : refuse to fetch DTDs or entities over network\n");
+ printf("\t--nocompact : do not generate compact text nodes\n");
+ printf("\t--htmlout : output results as HTML\n");
+ printf("\t--nowrap : do not put HTML doc wrapper\n");
+#ifdef LIBXML_VALID_ENABLED
+ printf("\t--valid : validate the document in addition to std well-formed check\n");
+ printf("\t--postvalid : do a posteriori validation, i.e after parsing\n");
+ printf("\t--dtdvalid URL : do a posteriori validation against a given DTD\n");
+ printf("\t--dtdvalidfpi FPI : same but name the DTD with a Public Identifier\n");
+#endif /* LIBXML_VALID_ENABLED */
+ printf("\t--timing : print some timings\n");
+ printf("\t--output file or -o file: save to a given file\n");
+ printf("\t--repeat : repeat 100 times, for timing or profiling\n");
+ printf("\t--insert : ad-hoc test for valid insertions\n");
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef HAVE_ZLIB_H
+ printf("\t--compress : turn on gzip compression of output\n");
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_HTML_ENABLED
+ printf("\t--html : use the HTML parser\n");
+ printf("\t--xmlout : force to use the XML serializer when using --html\n");
+ printf("\t--nodefdtd : do not default HTML doctype\n");
+#endif
+#ifdef LIBXML_PUSH_ENABLED
+ printf("\t--push : use the push mode of the parser\n");
+ printf("\t--pushsmall : use the push mode of the parser using tiny increments\n");
+#endif /* LIBXML_PUSH_ENABLED */
+#ifdef HAVE_MMAP
+ printf("\t--memory : parse from memory\n");
+#endif
+ printf("\t--maxmem nbbytes : limits memory allocation to nbbytes bytes\n");
+ printf("\t--nowarning : do not emit warnings from parser/validator\n");
+ printf("\t--noblanks : drop (ignorable?) blanks spaces\n");
+ printf("\t--nocdata : replace cdata section with text nodes\n");
+#ifdef LIBXML_OUTPUT_ENABLED
+ printf("\t--format : reformat/reindent the input\n");
+ printf("\t--encode encoding : output in the given encoding\n");
+ printf("\t--dropdtd : remove the DOCTYPE of the input docs\n");
+ printf("\t--pretty STYLE : pretty-print in a particular style\n");
+ printf("\t 0 Do not pretty print\n");
+ printf("\t 1 Format the XML content, as --format\n");
+ printf("\t 2 Add whitespace inside tags, preserving content\n");
+#endif /* LIBXML_OUTPUT_ENABLED */
+ printf("\t--c14n : save in W3C canonical format v1.0 (with comments)\n");
+ printf("\t--c14n11 : save in W3C canonical format v1.1 (with comments)\n");
+ printf("\t--exc-c14n : save in W3C exclusive canonical format (with comments)\n");
+#ifdef LIBXML_C14N_ENABLED
+#endif /* LIBXML_C14N_ENABLED */
+ printf("\t--nsclean : remove redundant namespace declarations\n");
+ printf("\t--testIO : test user I/O support\n");
+#ifdef LIBXML_CATALOG_ENABLED
+ printf("\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n");
+ printf("\t otherwise XML Catalogs starting from \n");
+ printf("\t %s are activated by default\n", XML_XML_DEFAULT_CATALOG);
+ printf("\t--nocatalogs: deactivate all catalogs\n");
+#endif
+ printf("\t--auto : generate a small doc on the fly\n");
+#ifdef LIBXML_XINCLUDE_ENABLED
+ printf("\t--xinclude : do XInclude processing\n");
+ printf("\t--noxincludenode : same but do not generate XInclude nodes\n");
+ printf("\t--nofixup-base-uris : do not fixup xml:base uris\n");
+#endif
+ printf("\t--loaddtd : fetch external DTD\n");
+ printf("\t--dtdattr : loaddtd + populate the tree with inherited attributes \n");
+#ifdef LIBXML_READER_ENABLED
+ printf("\t--stream : use the streaming interface to process very large files\n");
+ printf("\t--walker : create a reader and walk though the resulting doc\n");
+#endif /* LIBXML_READER_ENABLED */
+#ifdef LIBXML_PATTERN_ENABLED
+ printf("\t--pattern pattern_value : test the pattern support\n");
+#endif
+ printf("\t--chkregister : verify the node registration code\n");
+#ifdef LIBXML_SCHEMAS_ENABLED
+ printf("\t--relaxng schema : do RelaxNG validation against the schema\n");
+ printf("\t--schema schema : do validation against the WXS schema\n");
+#endif
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ printf("\t--schematron schema : do validation against a schematron\n");
+#endif
+#ifdef LIBXML_SAX1_ENABLED
+ printf("\t--sax1: use the old SAX1 interfaces for processing\n");
+#endif
+ printf("\t--sax: do not build a tree but work just at the SAX level\n");
+ printf("\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n");
+#ifdef LIBXML_XPATH_ENABLED
+ printf("\t--xpath expr: evaluate the XPath expression, imply --noout\n");
+#endif
+
+ printf("\nLibxml project home page: http://xmlsoft.org/\n");
+ printf("To report bugs or get some help check: http://xmlsoft.org/bugs.html\n");
+}
+
+static void registerNode(xmlNodePtr node)
+{
+ node->_private = malloc(sizeof(long));
+ if (node->_private == NULL) {
+ fprintf(stderr, "Out of memory in xmllint:registerNode()\n");
+ exit(XMLLINT_ERR_MEM);
+ }
+ *(long*)node->_private = (long) 0x81726354;
+ nbregister++;
+}
+
+static void deregisterNode(xmlNodePtr node)
+{
+ assert(node->_private != NULL);
+ assert(*(long*)node->_private == (long) 0x81726354);
+ free(node->_private);
+ nbregister--;
+}
+
+int
+main(int argc, char **argv) {
+ int i, acount;
+ int files = 0;
+ int version = 0;
+ const char* indent;
+
+ if (argc <= 1) {
+ usage(argv[0]);
+ return(1);
+ }
+ LIBXML_TEST_VERSION
+ for (i = 1; i < argc ; i++) {
+ if (!strcmp(argv[i], "-"))
+ break;
+
+ if (argv[i][0] != '-')
+ continue;
+ if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
+ debug++;
+ else
+#ifdef LIBXML_DEBUG_ENABLED
+ if ((!strcmp(argv[i], "-shell")) ||
+ (!strcmp(argv[i], "--shell"))) {
+ shell++;
+ noout = 1;
+ } else
+#endif
+#ifdef LIBXML_TREE_ENABLED
+ if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy")))
+ copy++;
+ else
+#endif /* LIBXML_TREE_ENABLED */
+ if ((!strcmp(argv[i], "-recover")) ||
+ (!strcmp(argv[i], "--recover"))) {
+ recovery++;
+ options |= XML_PARSE_RECOVER;
+ } else if ((!strcmp(argv[i], "-huge")) ||
+ (!strcmp(argv[i], "--huge"))) {
+ options |= XML_PARSE_HUGE;
+ } else if ((!strcmp(argv[i], "-noent")) ||
+ (!strcmp(argv[i], "--noent"))) {
+ noent++;
+ options |= XML_PARSE_NOENT;
+ } else if ((!strcmp(argv[i], "-noenc")) ||
+ (!strcmp(argv[i], "--noenc"))) {
+ noenc++;
+ options |= XML_PARSE_IGNORE_ENC;
+ } else if ((!strcmp(argv[i], "-nsclean")) ||
+ (!strcmp(argv[i], "--nsclean"))) {
+ options |= XML_PARSE_NSCLEAN;
+ } else if ((!strcmp(argv[i], "-nocdata")) ||
+ (!strcmp(argv[i], "--nocdata"))) {
+ options |= XML_PARSE_NOCDATA;
+ } else if ((!strcmp(argv[i], "-nodict")) ||
+ (!strcmp(argv[i], "--nodict"))) {
+ options |= XML_PARSE_NODICT;
+ } else if ((!strcmp(argv[i], "-version")) ||
+ (!strcmp(argv[i], "--version"))) {
+ showVersion(argv[0]);
+ version = 1;
+ } else if ((!strcmp(argv[i], "-noout")) ||
+ (!strcmp(argv[i], "--noout")))
+ noout++;
+#ifdef LIBXML_OUTPUT_ENABLED
+ else if ((!strcmp(argv[i], "-o")) ||
+ (!strcmp(argv[i], "-output")) ||
+ (!strcmp(argv[i], "--output"))) {
+ i++;
+ output = argv[i];
+ }
+#endif /* LIBXML_OUTPUT_ENABLED */
+ else if ((!strcmp(argv[i], "-htmlout")) ||
+ (!strcmp(argv[i], "--htmlout")))
+ htmlout++;
+ else if ((!strcmp(argv[i], "-nowrap")) ||
+ (!strcmp(argv[i], "--nowrap")))
+ nowrap++;
+#ifdef LIBXML_HTML_ENABLED
+ else if ((!strcmp(argv[i], "-html")) ||
+ (!strcmp(argv[i], "--html"))) {
+ html++;
+ }
+ else if ((!strcmp(argv[i], "-xmlout")) ||
+ (!strcmp(argv[i], "--xmlout"))) {
+ xmlout++;
+ } else if ((!strcmp(argv[i], "-nodefdtd")) ||
+ (!strcmp(argv[i], "--nodefdtd"))) {
+ nodefdtd++;
+ options |= HTML_PARSE_NODEFDTD;
+ }
+#endif /* LIBXML_HTML_ENABLED */
+ else if ((!strcmp(argv[i], "-loaddtd")) ||
+ (!strcmp(argv[i], "--loaddtd"))) {
+ loaddtd++;
+ options |= XML_PARSE_DTDLOAD;
+ } else if ((!strcmp(argv[i], "-dtdattr")) ||
+ (!strcmp(argv[i], "--dtdattr"))) {
+ loaddtd++;
+ dtdattrs++;
+ options |= XML_PARSE_DTDATTR;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ else if ((!strcmp(argv[i], "-valid")) ||
+ (!strcmp(argv[i], "--valid"))) {
+ valid++;
+ options |= XML_PARSE_DTDVALID;
+ } else if ((!strcmp(argv[i], "-postvalid")) ||
+ (!strcmp(argv[i], "--postvalid"))) {
+ postvalid++;
+ loaddtd++;
+ options |= XML_PARSE_DTDLOAD;
+ } else if ((!strcmp(argv[i], "-dtdvalid")) ||
+ (!strcmp(argv[i], "--dtdvalid"))) {
+ i++;
+ dtdvalid = argv[i];
+ loaddtd++;
+ options |= XML_PARSE_DTDLOAD;
+ } else if ((!strcmp(argv[i], "-dtdvalidfpi")) ||
+ (!strcmp(argv[i], "--dtdvalidfpi"))) {
+ i++;
+ dtdvalidfpi = argv[i];
+ loaddtd++;
+ options |= XML_PARSE_DTDLOAD;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ else if ((!strcmp(argv[i], "-dropdtd")) ||
+ (!strcmp(argv[i], "--dropdtd")))
+ dropdtd++;
+ else if ((!strcmp(argv[i], "-insert")) ||
+ (!strcmp(argv[i], "--insert")))
+ insert++;
+ else if ((!strcmp(argv[i], "-timing")) ||
+ (!strcmp(argv[i], "--timing")))
+ timing++;
+ else if ((!strcmp(argv[i], "-auto")) ||
+ (!strcmp(argv[i], "--auto")))
+ generate++;
+ else if ((!strcmp(argv[i], "-repeat")) ||
+ (!strcmp(argv[i], "--repeat"))) {
+ if (repeat)
+ repeat *= 10;
+ else
+ repeat = 100;
+ }
+#ifdef LIBXML_PUSH_ENABLED
+ else if ((!strcmp(argv[i], "-push")) ||
+ (!strcmp(argv[i], "--push")))
+ push++;
+ else if ((!strcmp(argv[i], "-pushsmall")) ||
+ (!strcmp(argv[i], "--pushsmall"))) {
+ push++;
+ pushsize = 10;
+ }
+#endif /* LIBXML_PUSH_ENABLED */
+#ifdef HAVE_MMAP
+ else if ((!strcmp(argv[i], "-memory")) ||
+ (!strcmp(argv[i], "--memory")))
+ memory++;
+#endif
+ else if ((!strcmp(argv[i], "-testIO")) ||
+ (!strcmp(argv[i], "--testIO")))
+ testIO++;
+#ifdef LIBXML_XINCLUDE_ENABLED
+ else if ((!strcmp(argv[i], "-xinclude")) ||
+ (!strcmp(argv[i], "--xinclude"))) {
+ xinclude++;
+ options |= XML_PARSE_XINCLUDE;
+ }
+ else if ((!strcmp(argv[i], "-noxincludenode")) ||
+ (!strcmp(argv[i], "--noxincludenode"))) {
+ xinclude++;
+ options |= XML_PARSE_XINCLUDE;
+ options |= XML_PARSE_NOXINCNODE;
+ }
+ else if ((!strcmp(argv[i], "-nofixup-base-uris")) ||
+ (!strcmp(argv[i], "--nofixup-base-uris"))) {
+ xinclude++;
+ options |= XML_PARSE_XINCLUDE;
+ options |= XML_PARSE_NOBASEFIX;
+ }
+#endif
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef HAVE_ZLIB_H
+ else if ((!strcmp(argv[i], "-compress")) ||
+ (!strcmp(argv[i], "--compress"))) {
+ compress++;
+ xmlSetCompressMode(9);
+ }
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+ else if ((!strcmp(argv[i], "-nowarning")) ||
+ (!strcmp(argv[i], "--nowarning"))) {
+ xmlGetWarningsDefaultValue = 0;
+ xmlPedanticParserDefault(0);
+ options |= XML_PARSE_NOWARNING;
+ }
+ else if ((!strcmp(argv[i], "-pedantic")) ||
+ (!strcmp(argv[i], "--pedantic"))) {
+ xmlGetWarningsDefaultValue = 1;
+ xmlPedanticParserDefault(1);
+ options |= XML_PARSE_PEDANTIC;
+ }
+#ifdef LIBXML_DEBUG_ENABLED
+ else if ((!strcmp(argv[i], "-debugent")) ||
+ (!strcmp(argv[i], "--debugent"))) {
+ debugent++;
+ xmlParserDebugEntities = 1;
+ }
+#endif
+#ifdef LIBXML_C14N_ENABLED
+ else if ((!strcmp(argv[i], "-c14n")) ||
+ (!strcmp(argv[i], "--c14n"))) {
+ canonical++;
+ options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD;
+ }
+ else if ((!strcmp(argv[i], "-c14n11")) ||
+ (!strcmp(argv[i], "--c14n11"))) {
+ canonical_11++;
+ options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD;
+ }
+ else if ((!strcmp(argv[i], "-exc-c14n")) ||
+ (!strcmp(argv[i], "--exc-c14n"))) {
+ exc_canonical++;
+ options |= XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_DTDLOAD;
+ }
+#endif
+#ifdef LIBXML_CATALOG_ENABLED
+ else if ((!strcmp(argv[i], "-catalogs")) ||
+ (!strcmp(argv[i], "--catalogs"))) {
+ catalogs++;
+ } else if ((!strcmp(argv[i], "-nocatalogs")) ||
+ (!strcmp(argv[i], "--nocatalogs"))) {
+ nocatalogs++;
+ }
+#endif
+ else if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ encoding = argv[i];
+ /*
+ * OK it's for testing purposes
+ */
+ xmlAddEncodingAlias("UTF-8", "DVEnc");
+ }
+ else if ((!strcmp(argv[i], "-noblanks")) ||
+ (!strcmp(argv[i], "--noblanks"))) {
+ noblanks++;
+ xmlKeepBlanksDefault(0);
+ options |= XML_PARSE_NOBLANKS;
+ }
+ else if ((!strcmp(argv[i], "-maxmem")) ||
+ (!strcmp(argv[i], "--maxmem"))) {
+ i++;
+ if (sscanf(argv[i], "%d", &maxmem) == 1) {
+ xmlMemSetup(myFreeFunc, myMallocFunc, myReallocFunc,
+ myStrdupFunc);
+ } else {
+ maxmem = 0;
+ }
+ }
+ else if ((!strcmp(argv[i], "-format")) ||
+ (!strcmp(argv[i], "--format"))) {
+ noblanks++;
+#ifdef LIBXML_OUTPUT_ENABLED
+ format = 1;
+#endif /* LIBXML_OUTPUT_ENABLED */
+ xmlKeepBlanksDefault(0);
+ }
+ else if ((!strcmp(argv[i], "-pretty")) ||
+ (!strcmp(argv[i], "--pretty"))) {
+ i++;
+#ifdef LIBXML_OUTPUT_ENABLED
+ if (argv[i] != NULL) {
+ format = atoi(argv[i]);
+ if (format == 1) {
+ noblanks++;
+ xmlKeepBlanksDefault(0);
+ }
+ }
+#endif /* LIBXML_OUTPUT_ENABLED */
+ }
+#ifdef LIBXML_READER_ENABLED
+ else if ((!strcmp(argv[i], "-stream")) ||
+ (!strcmp(argv[i], "--stream"))) {
+ stream++;
+ }
+ else if ((!strcmp(argv[i], "-walker")) ||
+ (!strcmp(argv[i], "--walker"))) {
+ walker++;
+ noout++;
+ }
+#endif /* LIBXML_READER_ENABLED */
+#ifdef LIBXML_SAX1_ENABLED
+ else if ((!strcmp(argv[i], "-sax1")) ||
+ (!strcmp(argv[i], "--sax1"))) {
+ sax1++;
+ options |= XML_PARSE_SAX1;
+ }
+#endif /* LIBXML_SAX1_ENABLED */
+ else if ((!strcmp(argv[i], "-sax")) ||
+ (!strcmp(argv[i], "--sax"))) {
+ sax++;
+ }
+ else if ((!strcmp(argv[i], "-chkregister")) ||
+ (!strcmp(argv[i], "--chkregister"))) {
+ chkregister++;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ } else if ((!strcmp(argv[i], "-relaxng")) ||
+ (!strcmp(argv[i], "--relaxng"))) {
+ i++;
+ relaxng = argv[i];
+ noent++;
+ options |= XML_PARSE_NOENT;
+ } else if ((!strcmp(argv[i], "-schema")) ||
+ (!strcmp(argv[i], "--schema"))) {
+ i++;
+ schema = argv[i];
+ noent++;
+#endif
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ } else if ((!strcmp(argv[i], "-schematron")) ||
+ (!strcmp(argv[i], "--schematron"))) {
+ i++;
+ schematron = argv[i];
+ noent++;
+#endif
+ } else if ((!strcmp(argv[i], "-nonet")) ||
+ (!strcmp(argv[i], "--nonet"))) {
+ options |= XML_PARSE_NONET;
+ xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
+ } else if ((!strcmp(argv[i], "-nocompact")) ||
+ (!strcmp(argv[i], "--nocompact"))) {
+ options &= ~XML_PARSE_COMPACT;
+ } else if ((!strcmp(argv[i], "-load-trace")) ||
+ (!strcmp(argv[i], "--load-trace"))) {
+ load_trace++;
+ } else if ((!strcmp(argv[i], "-path")) ||
+ (!strcmp(argv[i], "--path"))) {
+ i++;
+ parsePath(BAD_CAST argv[i]);
+#ifdef LIBXML_PATTERN_ENABLED
+ } else if ((!strcmp(argv[i], "-pattern")) ||
+ (!strcmp(argv[i], "--pattern"))) {
+ i++;
+ pattern = argv[i];
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+ } else if ((!strcmp(argv[i], "-xpath")) ||
+ (!strcmp(argv[i], "--xpath"))) {
+ i++;
+ noout++;
+ xpathquery = argv[i];
+#endif
+ } else if ((!strcmp(argv[i], "-oldxml10")) ||
+ (!strcmp(argv[i], "--oldxml10"))) {
+ oldxml10++;
+ options |= XML_PARSE_OLD10;
+ } else {
+ fprintf(stderr, "Unknown option %s\n", argv[i]);
+ usage(argv[0]);
+ return(1);
+ }
+ }
+
+#ifdef LIBXML_CATALOG_ENABLED
+ if (nocatalogs == 0) {
+ if (catalogs) {
+ const char *catal;
+
+ catal = getenv("SGML_CATALOG_FILES");
+ if (catal != NULL) {
+ xmlLoadCatalogs(catal);
+ } else {
+ fprintf(stderr, "Variable $SGML_CATALOG_FILES not set\n");
+ }
+ }
+ }
+#endif
+
+#ifdef LIBXML_SAX1_ENABLED
+ if (sax1)
+ xmlSAXDefaultVersion(1);
+ else
+ xmlSAXDefaultVersion(2);
+#endif /* LIBXML_SAX1_ENABLED */
+
+ if (chkregister) {
+ xmlRegisterNodeDefault(registerNode);
+ xmlDeregisterNodeDefault(deregisterNode);
+ }
+
+ indent = getenv("XMLLINT_INDENT");
+ if(indent != NULL) {
+ xmlTreeIndentString = indent;
+ }
+
+
+ defaultEntityLoader = xmlGetExternalEntityLoader();
+ xmlSetExternalEntityLoader(xmllintExternalEntityLoader);
+
+ xmlLineNumbersDefault(1);
+ if (loaddtd != 0)
+ xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS;
+ if (dtdattrs)
+ xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
+ if (noent != 0) xmlSubstituteEntitiesDefault(1);
+#ifdef LIBXML_VALID_ENABLED
+ if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
+#endif /* LIBXML_VALID_ENABLED */
+ if ((htmlout) && (!nowrap)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "\t\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "<html><head><title>%s output</title></head>\n",
+ argv[0]);
+ xmlGenericError(xmlGenericErrorContext,
+ "<body bgcolor=\"#ffffff\"><h1 align=\"center\">%s output</h1>\n",
+ argv[0]);
+ }
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ if ((schematron != NULL) && (sax == 0)
+#ifdef LIBXML_READER_ENABLED
+ && (stream == 0)
+#endif /* LIBXML_READER_ENABLED */
+ ) {
+ xmlSchematronParserCtxtPtr ctxt;
+
+ /* forces loading the DTDs */
+ xmlLoadExtDtdDefaultValue |= 1;
+ options |= XML_PARSE_DTDLOAD;
+ if (timing) {
+ startTimer();
+ }
+ ctxt = xmlSchematronNewParserCtxt(schematron);
+#if 0
+ xmlSchematronSetParserErrors(ctxt,
+ (xmlSchematronValidityErrorFunc) fprintf,
+ (xmlSchematronValidityWarningFunc) fprintf,
+ stderr);
+#endif
+ wxschematron = xmlSchematronParse(ctxt);
+ if (wxschematron == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Schematron schema %s failed to compile\n", schematron);
+ progresult = XMLLINT_ERR_SCHEMACOMP;
+ schematron = NULL;
+ }
+ xmlSchematronFreeParserCtxt(ctxt);
+ if (timing) {
+ endTimer("Compiling the schemas");
+ }
+ }
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((relaxng != NULL) && (sax == 0)
+#ifdef LIBXML_READER_ENABLED
+ && (stream == 0)
+#endif /* LIBXML_READER_ENABLED */
+ ) {
+ xmlRelaxNGParserCtxtPtr ctxt;
+
+ /* forces loading the DTDs */
+ xmlLoadExtDtdDefaultValue |= 1;
+ options |= XML_PARSE_DTDLOAD;
+ if (timing) {
+ startTimer();
+ }
+ ctxt = xmlRelaxNGNewParserCtxt(relaxng);
+ xmlRelaxNGSetParserErrors(ctxt,
+ (xmlRelaxNGValidityErrorFunc) fprintf,
+ (xmlRelaxNGValidityWarningFunc) fprintf,
+ stderr);
+ relaxngschemas = xmlRelaxNGParse(ctxt);
+ if (relaxngschemas == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Relax-NG schema %s failed to compile\n", relaxng);
+ progresult = XMLLINT_ERR_SCHEMACOMP;
+ relaxng = NULL;
+ }
+ xmlRelaxNGFreeParserCtxt(ctxt);
+ if (timing) {
+ endTimer("Compiling the schemas");
+ }
+ } else if ((schema != NULL)
+#ifdef LIBXML_READER_ENABLED
+ && (stream == 0)
+#endif
+ ) {
+ xmlSchemaParserCtxtPtr ctxt;
+
+ if (timing) {
+ startTimer();
+ }
+ ctxt = xmlSchemaNewParserCtxt(schema);
+ xmlSchemaSetParserErrors(ctxt,
+ (xmlSchemaValidityErrorFunc) fprintf,
+ (xmlSchemaValidityWarningFunc) fprintf,
+ stderr);
+ wxschemas = xmlSchemaParse(ctxt);
+ if (wxschemas == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "WXS schema %s failed to compile\n", schema);
+ progresult = XMLLINT_ERR_SCHEMACOMP;
+ schema = NULL;
+ }
+ xmlSchemaFreeParserCtxt(ctxt);
+ if (timing) {
+ endTimer("Compiling the schemas");
+ }
+ }
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#ifdef LIBXML_PATTERN_ENABLED
+ if ((pattern != NULL)
+#ifdef LIBXML_READER_ENABLED
+ && (walker == 0)
+#endif
+ ) {
+ patternc = xmlPatterncompile((const xmlChar *) pattern, NULL, 0, NULL);
+ if (patternc == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Pattern %s failed to compile\n", pattern);
+ progresult = XMLLINT_ERR_SCHEMAPAT;
+ pattern = NULL;
+ }
+ }
+#endif /* LIBXML_PATTERN_ENABLED */
+ for (i = 1; i < argc ; i++) {
+ if ((!strcmp(argv[i], "-encode")) ||
+ (!strcmp(argv[i], "--encode"))) {
+ i++;
+ continue;
+ } else if ((!strcmp(argv[i], "-o")) ||
+ (!strcmp(argv[i], "-output")) ||
+ (!strcmp(argv[i], "--output"))) {
+ i++;
+ continue;
+ }
+#ifdef LIBXML_VALID_ENABLED
+ if ((!strcmp(argv[i], "-dtdvalid")) ||
+ (!strcmp(argv[i], "--dtdvalid"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-path")) ||
+ (!strcmp(argv[i], "--path"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-dtdvalidfpi")) ||
+ (!strcmp(argv[i], "--dtdvalidfpi"))) {
+ i++;
+ continue;
+ }
+#endif /* LIBXML_VALID_ENABLED */
+ if ((!strcmp(argv[i], "-relaxng")) ||
+ (!strcmp(argv[i], "--relaxng"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-maxmem")) ||
+ (!strcmp(argv[i], "--maxmem"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-pretty")) ||
+ (!strcmp(argv[i], "--pretty"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-schema")) ||
+ (!strcmp(argv[i], "--schema"))) {
+ i++;
+ continue;
+ }
+ if ((!strcmp(argv[i], "-schematron")) ||
+ (!strcmp(argv[i], "--schematron"))) {
+ i++;
+ continue;
+ }
+#ifdef LIBXML_PATTERN_ENABLED
+ if ((!strcmp(argv[i], "-pattern")) ||
+ (!strcmp(argv[i], "--pattern"))) {
+ i++;
+ continue;
+ }
+#endif
+#ifdef LIBXML_XPATH_ENABLED
+ if ((!strcmp(argv[i], "-xpath")) ||
+ (!strcmp(argv[i], "--xpath"))) {
+ i++;
+ continue;
+ }
+#endif
+ if ((timing) && (repeat))
+ startTimer();
+ /* Remember file names. "-" means stdin. <sven@zen.org> */
+ if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) {
+ if (repeat) {
+ xmlParserCtxtPtr ctxt = NULL;
+
+ for (acount = 0;acount < repeat;acount++) {
+#ifdef LIBXML_READER_ENABLED
+ if (stream != 0) {
+ streamFile(argv[i]);
+ } else {
+#endif /* LIBXML_READER_ENABLED */
+ if (sax) {
+ testSAX(argv[i]);
+ } else {
+ if (ctxt == NULL)
+ ctxt = xmlNewParserCtxt();
+ parseAndPrintFile(argv[i], ctxt);
+ }
+#ifdef LIBXML_READER_ENABLED
+ }
+#endif /* LIBXML_READER_ENABLED */
+ }
+ if (ctxt != NULL)
+ xmlFreeParserCtxt(ctxt);
+ } else {
+ nbregister = 0;
+
+#ifdef LIBXML_READER_ENABLED
+ if (stream != 0)
+ streamFile(argv[i]);
+ else
+#endif /* LIBXML_READER_ENABLED */
+ if (sax) {
+ testSAX(argv[i]);
+ } else {
+ parseAndPrintFile(argv[i], NULL);
+ }
+
+ if ((chkregister) && (nbregister != 0)) {
+ fprintf(stderr, "Registration count off: %d\n", nbregister);
+ progresult = XMLLINT_ERR_RDREGIS;
+ }
+ }
+ files ++;
+ if ((timing) && (repeat)) {
+ endTimer("%d iterations", repeat);
+ }
+ }
+ }
+ if (generate)
+ parseAndPrintFile(NULL, NULL);
+ if ((htmlout) && (!nowrap)) {
+ xmlGenericError(xmlGenericErrorContext, "</body></html>\n");
+ }
+ if ((files == 0) && (!generate) && (version == 0)) {
+ usage(argv[0]);
+ }
+#ifdef LIBXML_SCHEMATRON_ENABLED
+ if (wxschematron != NULL)
+ xmlSchematronFree(wxschematron);
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (relaxngschemas != NULL)
+ xmlRelaxNGFree(relaxngschemas);
+ if (wxschemas != NULL)
+ xmlSchemaFree(wxschemas);
+ xmlRelaxNGCleanupTypes();
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+ if (patternc != NULL)
+ xmlFreePattern(patternc);
+#endif
+ xmlCleanupParser();
+ xmlMemoryDump();
+
+ return(progresult);
+}
+
diff --git a/xmlmemory.c b/xmlmemory.c
new file mode 100644
index 0000000..a3dc737
--- /dev/null
+++ b/xmlmemory.c
@@ -0,0 +1,1124 @@
+/*
+ * xmlmemory.c: libxml memory allocator wrapper.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#endif
+
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+
+/* #define DEBUG_MEMORY */
+
+/**
+ * MEM_LIST:
+ *
+ * keep track of all allocated blocks for error reporting
+ * Always build the memory list !
+ */
+#ifdef DEBUG_MEMORY_LOCATION
+#ifndef MEM_LIST
+#define MEM_LIST /* keep a list of all the allocated memory blocks */
+#endif
+#endif
+
+#include <libxml/globals.h> /* must come before xmlmemory.h */
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlerror.h>
+#include <libxml/threads.h>
+
+static int xmlMemInitialized = 0;
+static unsigned long debugMemSize = 0;
+static unsigned long debugMemBlocks = 0;
+static unsigned long debugMaxMemSize = 0;
+static xmlMutexPtr xmlMemMutex = NULL;
+
+void xmlMallocBreakpoint(void);
+
+/************************************************************************
+ * *
+ * Macros, variables and associated types *
+ * *
+ ************************************************************************/
+
+#if !defined(LIBXML_THREAD_ENABLED) && !defined(LIBXML_THREAD_ALLOC_ENABLED)
+#ifdef xmlMalloc
+#undef xmlMalloc
+#endif
+#ifdef xmlRealloc
+#undef xmlRealloc
+#endif
+#ifdef xmlMemStrdup
+#undef xmlMemStrdup
+#endif
+#endif
+
+/*
+ * Each of the blocks allocated begin with a header containing informations
+ */
+
+#define MEMTAG 0x5aa5
+
+#define MALLOC_TYPE 1
+#define REALLOC_TYPE 2
+#define STRDUP_TYPE 3
+#define MALLOC_ATOMIC_TYPE 4
+#define REALLOC_ATOMIC_TYPE 5
+
+typedef struct memnod {
+ unsigned int mh_tag;
+ unsigned int mh_type;
+ unsigned long mh_number;
+ size_t mh_size;
+#ifdef MEM_LIST
+ struct memnod *mh_next;
+ struct memnod *mh_prev;
+#endif
+ const char *mh_file;
+ unsigned int mh_line;
+} MEMHDR;
+
+
+#ifdef SUN4
+#define ALIGN_SIZE 16
+#else
+#define ALIGN_SIZE sizeof(double)
+#endif
+#define HDR_SIZE sizeof(MEMHDR)
+#define RESERVE_SIZE (((HDR_SIZE + (ALIGN_SIZE-1)) \
+ / ALIGN_SIZE ) * ALIGN_SIZE)
+
+
+#define CLIENT_2_HDR(a) ((MEMHDR *) (((char *) (a)) - RESERVE_SIZE))
+#define HDR_2_CLIENT(a) ((void *) (((char *) (a)) + RESERVE_SIZE))
+
+
+static unsigned int block=0;
+static unsigned int xmlMemStopAtBlock = 0;
+static void *xmlMemTraceBlockAt = NULL;
+#ifdef MEM_LIST
+static MEMHDR *memlist = NULL;
+#endif
+
+static void debugmem_tag_error(void *addr);
+#ifdef MEM_LIST
+static void debugmem_list_add(MEMHDR *);
+static void debugmem_list_delete(MEMHDR *);
+#endif
+#define Mem_Tag_Err(a) debugmem_tag_error(a);
+
+#ifndef TEST_POINT
+#define TEST_POINT
+#endif
+
+/**
+ * xmlMallocBreakpoint:
+ *
+ * Breakpoint to use in conjunction with xmlMemStopAtBlock. When the block
+ * number reaches the specified value this function is called. One need to add a breakpoint
+ * to it to get the context in which the given block is allocated.
+ */
+
+void
+xmlMallocBreakpoint(void) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMallocBreakpoint reached on block %d\n", xmlMemStopAtBlock);
+}
+
+/**
+ * xmlMallocLoc:
+ * @size: an int specifying the size in byte to allocate.
+ * @file: the file name or NULL
+ * @line: the line number
+ *
+ * a malloc() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the allocated area or NULL in case of lack of memory.
+ */
+
+void *
+xmlMallocLoc(size_t size, const char * file, int line)
+{
+ MEMHDR *p;
+ void *ret;
+
+ if (!xmlMemInitialized) xmlInitMemory();
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Malloc(%d)\n",size);
+#endif
+
+ TEST_POINT
+
+ p = (MEMHDR *) malloc(RESERVE_SIZE+size);
+
+ if (!p) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMallocLoc : Out of free space\n");
+ xmlMemoryDump();
+ return(NULL);
+ }
+ p->mh_tag = MEMTAG;
+ p->mh_size = size;
+ p->mh_type = MALLOC_TYPE;
+ p->mh_file = file;
+ p->mh_line = line;
+ xmlMutexLock(xmlMemMutex);
+ p->mh_number = ++block;
+ debugMemSize += size;
+ debugMemBlocks++;
+ if (debugMemSize > debugMaxMemSize) debugMaxMemSize = debugMemSize;
+#ifdef MEM_LIST
+ debugmem_list_add(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Malloc(%d) Ok\n",size);
+#endif
+
+ if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
+
+ ret = HDR_2_CLIENT(p);
+
+ if (xmlMemTraceBlockAt == ret) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%p : Malloc(%lu) Ok\n", xmlMemTraceBlockAt,
+ (long unsigned)size);
+ xmlMallocBreakpoint();
+ }
+
+ TEST_POINT
+
+ return(ret);
+}
+
+/**
+ * xmlMallocAtomicLoc:
+ * @size: an int specifying the size in byte to allocate.
+ * @file: the file name or NULL
+ * @line: the line number
+ *
+ * a malloc() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the allocated area or NULL in case of lack of memory.
+ */
+
+void *
+xmlMallocAtomicLoc(size_t size, const char * file, int line)
+{
+ MEMHDR *p;
+ void *ret;
+
+ if (!xmlMemInitialized) xmlInitMemory();
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Malloc(%d)\n",size);
+#endif
+
+ TEST_POINT
+
+ p = (MEMHDR *) malloc(RESERVE_SIZE+size);
+
+ if (!p) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMallocLoc : Out of free space\n");
+ xmlMemoryDump();
+ return(NULL);
+ }
+ p->mh_tag = MEMTAG;
+ p->mh_size = size;
+ p->mh_type = MALLOC_ATOMIC_TYPE;
+ p->mh_file = file;
+ p->mh_line = line;
+ xmlMutexLock(xmlMemMutex);
+ p->mh_number = ++block;
+ debugMemSize += size;
+ debugMemBlocks++;
+ if (debugMemSize > debugMaxMemSize) debugMaxMemSize = debugMemSize;
+#ifdef MEM_LIST
+ debugmem_list_add(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Malloc(%d) Ok\n",size);
+#endif
+
+ if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
+
+ ret = HDR_2_CLIENT(p);
+
+ if (xmlMemTraceBlockAt == ret) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%p : Malloc(%lu) Ok\n", xmlMemTraceBlockAt,
+ (long unsigned)size);
+ xmlMallocBreakpoint();
+ }
+
+ TEST_POINT
+
+ return(ret);
+}
+/**
+ * xmlMemMalloc:
+ * @size: an int specifying the size in byte to allocate.
+ *
+ * a malloc() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the allocated area or NULL in case of lack of memory.
+ */
+
+void *
+xmlMemMalloc(size_t size)
+{
+ return(xmlMallocLoc(size, "none", 0));
+}
+
+/**
+ * xmlReallocLoc:
+ * @ptr: the initial memory block pointer
+ * @size: an int specifying the size in byte to allocate.
+ * @file: the file name or NULL
+ * @line: the line number
+ *
+ * a realloc() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the allocated area or NULL in case of lack of memory.
+ */
+
+void *
+xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
+{
+ MEMHDR *p, *tmp;
+ unsigned long number;
+#ifdef DEBUG_MEMORY
+ size_t oldsize;
+#endif
+
+ if (ptr == NULL)
+ return(xmlMallocLoc(size, file, line));
+
+ if (!xmlMemInitialized) xmlInitMemory();
+ TEST_POINT
+
+ p = CLIENT_2_HDR(ptr);
+ number = p->mh_number;
+ if (xmlMemStopAtBlock == number) xmlMallocBreakpoint();
+ if (p->mh_tag != MEMTAG) {
+ Mem_Tag_Err(p);
+ goto error;
+ }
+ p->mh_tag = ~MEMTAG;
+ xmlMutexLock(xmlMemMutex);
+ debugMemSize -= p->mh_size;
+ debugMemBlocks--;
+#ifdef DEBUG_MEMORY
+ oldsize = p->mh_size;
+#endif
+#ifdef MEM_LIST
+ debugmem_list_delete(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+ tmp = (MEMHDR *) realloc(p,RESERVE_SIZE+size);
+ if (!tmp) {
+ free(p);
+ goto error;
+ }
+ p = tmp;
+ if (xmlMemTraceBlockAt == ptr) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%p : Realloced(%lu -> %lu) Ok\n",
+ xmlMemTraceBlockAt, (long unsigned)p->mh_size,
+ (long unsigned)size);
+ xmlMallocBreakpoint();
+ }
+ p->mh_tag = MEMTAG;
+ p->mh_number = number;
+ p->mh_type = REALLOC_TYPE;
+ p->mh_size = size;
+ p->mh_file = file;
+ p->mh_line = line;
+ xmlMutexLock(xmlMemMutex);
+ debugMemSize += size;
+ debugMemBlocks++;
+ if (debugMemSize > debugMaxMemSize) debugMaxMemSize = debugMemSize;
+#ifdef MEM_LIST
+ debugmem_list_add(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+ TEST_POINT
+
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Realloced(%d to %d) Ok\n", oldsize, size);
+#endif
+ return(HDR_2_CLIENT(p));
+
+error:
+ return(NULL);
+}
+
+/**
+ * xmlMemRealloc:
+ * @ptr: the initial memory block pointer
+ * @size: an int specifying the size in byte to allocate.
+ *
+ * a realloc() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the allocated area or NULL in case of lack of memory.
+ */
+
+void *
+xmlMemRealloc(void *ptr,size_t size) {
+ return(xmlReallocLoc(ptr, size, "none", 0));
+}
+
+/**
+ * xmlMemFree:
+ * @ptr: the memory block pointer
+ *
+ * a free() equivalent, with error checking.
+ */
+void
+xmlMemFree(void *ptr)
+{
+ MEMHDR *p;
+ char *target;
+#ifdef DEBUG_MEMORY
+ size_t size;
+#endif
+
+ if (ptr == NULL)
+ return;
+
+ if (ptr == (void *) -1) {
+ xmlGenericError(xmlGenericErrorContext,
+ "trying to free pointer from freed area\n");
+ goto error;
+ }
+
+ if (xmlMemTraceBlockAt == ptr) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%p : Freed()\n", xmlMemTraceBlockAt);
+ xmlMallocBreakpoint();
+ }
+
+ TEST_POINT
+
+ target = (char *) ptr;
+
+ p = CLIENT_2_HDR(ptr);
+ if (p->mh_tag != MEMTAG) {
+ Mem_Tag_Err(p);
+ goto error;
+ }
+ if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
+ p->mh_tag = ~MEMTAG;
+ memset(target, -1, p->mh_size);
+ xmlMutexLock(xmlMemMutex);
+ debugMemSize -= p->mh_size;
+ debugMemBlocks--;
+#ifdef DEBUG_MEMORY
+ size = p->mh_size;
+#endif
+#ifdef MEM_LIST
+ debugmem_list_delete(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+ free(p);
+
+ TEST_POINT
+
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "Freed(%d) Ok\n", size);
+#endif
+
+ return;
+
+error:
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMemFree(%lX) error\n", (unsigned long) ptr);
+ xmlMallocBreakpoint();
+ return;
+}
+
+/**
+ * xmlMemStrdupLoc:
+ * @str: the initial string pointer
+ * @file: the file name or NULL
+ * @line: the line number
+ *
+ * a strdup() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the new string or NULL if allocation error occurred.
+ */
+
+char *
+xmlMemStrdupLoc(const char *str, const char *file, int line)
+{
+ char *s;
+ size_t size = strlen(str) + 1;
+ MEMHDR *p;
+
+ if (!xmlMemInitialized) xmlInitMemory();
+ TEST_POINT
+
+ p = (MEMHDR *) malloc(RESERVE_SIZE+size);
+ if (!p) {
+ goto error;
+ }
+ p->mh_tag = MEMTAG;
+ p->mh_size = size;
+ p->mh_type = STRDUP_TYPE;
+ p->mh_file = file;
+ p->mh_line = line;
+ xmlMutexLock(xmlMemMutex);
+ p->mh_number = ++block;
+ debugMemSize += size;
+ debugMemBlocks++;
+ if (debugMemSize > debugMaxMemSize) debugMaxMemSize = debugMemSize;
+#ifdef MEM_LIST
+ debugmem_list_add(p);
+#endif
+ xmlMutexUnlock(xmlMemMutex);
+
+ s = (char *) HDR_2_CLIENT(p);
+
+ if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
+
+ strcpy(s,str);
+
+ TEST_POINT
+
+ if (xmlMemTraceBlockAt == s) {
+ xmlGenericError(xmlGenericErrorContext,
+ "%p : Strdup() Ok\n", xmlMemTraceBlockAt);
+ xmlMallocBreakpoint();
+ }
+
+ return(s);
+
+error:
+ return(NULL);
+}
+
+/**
+ * xmlMemoryStrdup:
+ * @str: the initial string pointer
+ *
+ * a strdup() equivalent, with logging of the allocation info.
+ *
+ * Returns a pointer to the new string or NULL if allocation error occurred.
+ */
+
+char *
+xmlMemoryStrdup(const char *str) {
+ return(xmlMemStrdupLoc(str, "none", 0));
+}
+
+/**
+ * xmlMemUsed:
+ *
+ * Provides the amount of memory currently allocated
+ *
+ * Returns an int representing the amount of memory allocated.
+ */
+
+int
+xmlMemUsed(void) {
+ return(debugMemSize);
+}
+
+/**
+ * xmlMemBlocks:
+ *
+ * Provides the number of memory areas currently allocated
+ *
+ * Returns an int representing the number of blocks
+ */
+
+int
+xmlMemBlocks(void) {
+ return(debugMemBlocks);
+}
+
+#ifdef MEM_LIST
+/**
+ * xmlMemContentShow:
+ * @fp: a FILE descriptor used as the output file
+ * @p: a memory block header
+ *
+ * tries to show some content from the memory block
+ */
+
+static void
+xmlMemContentShow(FILE *fp, MEMHDR *p)
+{
+ int i,j,k,len;
+ const char *buf;
+
+ if (p == NULL) {
+ fprintf(fp, " NULL");
+ return;
+ }
+ len = p->mh_size;
+ buf = (const char *) HDR_2_CLIENT(p);
+
+ for (i = 0;i < len;i++) {
+ if (buf[i] == 0) break;
+ if (!isprint((unsigned char) buf[i])) break;
+ }
+ if ((i < 4) && ((buf[i] != 0) || (i == 0))) {
+ if (len >= 4) {
+ MEMHDR *q;
+ void *cur;
+
+ for (j = 0;(j < len -3) && (j < 40);j += 4) {
+ cur = *((void **) &buf[j]);
+ q = CLIENT_2_HDR(cur);
+ p = memlist;
+ k = 0;
+ while (p != NULL) {
+ if (p == q) break;
+ p = p->mh_next;
+ if (k++ > 100) break;
+ }
+ if ((p != NULL) && (p == q)) {
+ fprintf(fp, " pointer to #%lu at index %d",
+ p->mh_number, j);
+ return;
+ }
+ }
+ }
+ } else if ((i == 0) && (buf[i] == 0)) {
+ fprintf(fp," null");
+ } else {
+ if (buf[i] == 0) fprintf(fp," \"%.25s\"", buf);
+ else {
+ fprintf(fp," [");
+ for (j = 0;j < i;j++)
+ fprintf(fp,"%c", buf[j]);
+ fprintf(fp,"]");
+ }
+ }
+}
+#endif
+
+/**
+ * xmlMemDisplayLast:
+ * @fp: a FILE descriptor used as the output file, if NULL, the result is
+ * written to the file .memorylist
+ * @nbBytes: the amount of memory to dump
+ *
+ * the last nbBytes of memory allocated and not freed, useful for dumping
+ * the memory left allocated between two places at runtime.
+ */
+
+void
+xmlMemDisplayLast(FILE *fp, long nbBytes)
+{
+#ifdef MEM_LIST
+ MEMHDR *p;
+ unsigned idx;
+ int nb = 0;
+#endif
+ FILE *old_fp = fp;
+
+ if (nbBytes <= 0)
+ return;
+
+ if (fp == NULL) {
+ fp = fopen(".memorylist", "w");
+ if (fp == NULL)
+ return;
+ }
+
+#ifdef MEM_LIST
+ fprintf(fp," Last %li MEMORY ALLOCATED : %lu, MAX was %lu\n",
+ nbBytes, debugMemSize, debugMaxMemSize);
+ fprintf(fp,"BLOCK NUMBER SIZE TYPE\n");
+ idx = 0;
+ xmlMutexLock(xmlMemMutex);
+ p = memlist;
+ while ((p) && (nbBytes > 0)) {
+ fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number,
+ (unsigned long)p->mh_size);
+ switch (p->mh_type) {
+ case STRDUP_TYPE:fprintf(fp,"strdup() in ");break;
+ case MALLOC_TYPE:fprintf(fp,"malloc() in ");break;
+ case REALLOC_TYPE:fprintf(fp,"realloc() in ");break;
+ case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break;
+ case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
+ default:
+ fprintf(fp,"Unknown memory block, may be corrupted");
+ xmlMutexUnlock(xmlMemMutex);
+ if (old_fp == NULL)
+ fclose(fp);
+ return;
+ }
+ if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
+ if (p->mh_tag != MEMTAG)
+ fprintf(fp," INVALID");
+ nb++;
+ if (nb < 100)
+ xmlMemContentShow(fp, p);
+ else
+ fprintf(fp," skip");
+
+ fprintf(fp,"\n");
+ nbBytes -= (unsigned long)p->mh_size;
+ p = p->mh_next;
+ }
+ xmlMutexUnlock(xmlMemMutex);
+#else
+ fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
+#endif
+ if (old_fp == NULL)
+ fclose(fp);
+}
+
+/**
+ * xmlMemDisplay:
+ * @fp: a FILE descriptor used as the output file, if NULL, the result is
+ * written to the file .memorylist
+ *
+ * show in-extenso the memory blocks allocated
+ */
+
+void
+xmlMemDisplay(FILE *fp)
+{
+#ifdef MEM_LIST
+ MEMHDR *p;
+ unsigned idx;
+ int nb = 0;
+#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
+ time_t currentTime;
+ char buf[500];
+ struct tm * tstruct;
+#endif
+#endif
+ FILE *old_fp = fp;
+
+ if (fp == NULL) {
+ fp = fopen(".memorylist", "w");
+ if (fp == NULL)
+ return;
+ }
+
+#ifdef MEM_LIST
+#if defined(HAVE_LOCALTIME) && defined(HAVE_STRFTIME)
+ currentTime = time(NULL);
+ tstruct = localtime(&currentTime);
+ strftime(buf, sizeof(buf) - 1, "%I:%M:%S %p", tstruct);
+ fprintf(fp," %s\n\n", buf);
+#endif
+
+
+ fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n",
+ debugMemSize, debugMaxMemSize);
+ fprintf(fp,"BLOCK NUMBER SIZE TYPE\n");
+ idx = 0;
+ xmlMutexLock(xmlMemMutex);
+ p = memlist;
+ while (p) {
+ fprintf(fp,"%-5u %6lu %6lu ",idx++,p->mh_number,
+ (unsigned long)p->mh_size);
+ switch (p->mh_type) {
+ case STRDUP_TYPE:fprintf(fp,"strdup() in ");break;
+ case MALLOC_TYPE:fprintf(fp,"malloc() in ");break;
+ case REALLOC_TYPE:fprintf(fp,"realloc() in ");break;
+ case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break;
+ case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
+ default:
+ fprintf(fp,"Unknown memory block, may be corrupted");
+ xmlMutexUnlock(xmlMemMutex);
+ if (old_fp == NULL)
+ fclose(fp);
+ return;
+ }
+ if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
+ if (p->mh_tag != MEMTAG)
+ fprintf(fp," INVALID");
+ nb++;
+ if (nb < 100)
+ xmlMemContentShow(fp, p);
+ else
+ fprintf(fp," skip");
+
+ fprintf(fp,"\n");
+ p = p->mh_next;
+ }
+ xmlMutexUnlock(xmlMemMutex);
+#else
+ fprintf(fp,"Memory list not compiled (MEM_LIST not defined !)\n");
+#endif
+ if (old_fp == NULL)
+ fclose(fp);
+}
+
+#ifdef MEM_LIST
+
+static void debugmem_list_add(MEMHDR *p)
+{
+ p->mh_next = memlist;
+ p->mh_prev = NULL;
+ if (memlist) memlist->mh_prev = p;
+ memlist = p;
+#ifdef MEM_LIST_DEBUG
+ if (stderr)
+ Mem_Display(stderr);
+#endif
+}
+
+static void debugmem_list_delete(MEMHDR *p)
+{
+ if (p->mh_next)
+ p->mh_next->mh_prev = p->mh_prev;
+ if (p->mh_prev)
+ p->mh_prev->mh_next = p->mh_next;
+ else memlist = p->mh_next;
+#ifdef MEM_LIST_DEBUG
+ if (stderr)
+ Mem_Display(stderr);
+#endif
+}
+
+#endif
+
+/*
+ * debugmem_tag_error:
+ *
+ * internal error function.
+ */
+
+static void debugmem_tag_error(void *p)
+{
+ xmlGenericError(xmlGenericErrorContext,
+ "Memory tag error occurs :%p \n\t bye\n", p);
+#ifdef MEM_LIST
+ if (stderr)
+ xmlMemDisplay(stderr);
+#endif
+}
+
+#ifdef MEM_LIST
+static FILE *xmlMemoryDumpFile = NULL;
+#endif
+
+/**
+ * xmlMemShow:
+ * @fp: a FILE descriptor used as the output file
+ * @nr: number of entries to dump
+ *
+ * show a show display of the memory allocated, and dump
+ * the @nr last allocated areas which were not freed
+ */
+
+void
+xmlMemShow(FILE *fp, int nr ATTRIBUTE_UNUSED)
+{
+#ifdef MEM_LIST
+ MEMHDR *p;
+#endif
+
+ if (fp != NULL)
+ fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n",
+ debugMemSize, debugMaxMemSize);
+#ifdef MEM_LIST
+ xmlMutexLock(xmlMemMutex);
+ if (nr > 0) {
+ fprintf(fp,"NUMBER SIZE TYPE WHERE\n");
+ p = memlist;
+ while ((p) && nr > 0) {
+ fprintf(fp,"%6lu %6lu ",p->mh_number,(unsigned long)p->mh_size);
+ switch (p->mh_type) {
+ case STRDUP_TYPE:fprintf(fp,"strdup() in ");break;
+ case MALLOC_TYPE:fprintf(fp,"malloc() in ");break;
+ case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break;
+ case REALLOC_TYPE:fprintf(fp,"realloc() in ");break;
+ case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
+ default:fprintf(fp," ??? in ");break;
+ }
+ if (p->mh_file != NULL)
+ fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
+ if (p->mh_tag != MEMTAG)
+ fprintf(fp," INVALID");
+ xmlMemContentShow(fp, p);
+ fprintf(fp,"\n");
+ nr--;
+ p = p->mh_next;
+ }
+ }
+ xmlMutexUnlock(xmlMemMutex);
+#endif /* MEM_LIST */
+}
+
+/**
+ * xmlMemoryDump:
+ *
+ * Dump in-extenso the memory blocks allocated to the file .memorylist
+ */
+
+void
+xmlMemoryDump(void)
+{
+#ifdef MEM_LIST
+ FILE *dump;
+
+ if (debugMaxMemSize == 0)
+ return;
+ dump = fopen(".memdump", "w");
+ if (dump == NULL)
+ xmlMemoryDumpFile = stderr;
+ else xmlMemoryDumpFile = dump;
+
+ xmlMemDisplay(xmlMemoryDumpFile);
+
+ if (dump != NULL) fclose(dump);
+#endif /* MEM_LIST */
+}
+
+
+/****************************************************************
+ * *
+ * Initialization Routines *
+ * *
+ ****************************************************************/
+
+/**
+ * xmlInitMemory:
+ *
+ * Initialize the memory layer.
+ *
+ * Returns 0 on success
+ */
+int
+xmlInitMemory(void)
+{
+#ifdef HAVE_STDLIB_H
+ char *breakpoint;
+#endif
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlInitMemory()\n");
+#endif
+ /*
+ This is really not good code (see Bug 130419). Suggestions for
+ improvement will be welcome!
+ */
+ if (xmlMemInitialized) return(-1);
+ xmlMemInitialized = 1;
+ xmlMemMutex = xmlNewMutex();
+
+#ifdef HAVE_STDLIB_H
+ breakpoint = getenv("XML_MEM_BREAKPOINT");
+ if (breakpoint != NULL) {
+ sscanf(breakpoint, "%ud", &xmlMemStopAtBlock);
+ }
+#endif
+#ifdef HAVE_STDLIB_H
+ breakpoint = getenv("XML_MEM_TRACE");
+ if (breakpoint != NULL) {
+ sscanf(breakpoint, "%p", &xmlMemTraceBlockAt);
+ }
+#endif
+
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlInitMemory() Ok\n");
+#endif
+ return(0);
+}
+
+/**
+ * xmlCleanupMemory:
+ *
+ * Free up all the memory allocated by the library for its own
+ * use. This should not be called by user level code.
+ */
+void
+xmlCleanupMemory(void) {
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlCleanupMemory()\n");
+#endif
+ if (xmlMemInitialized == 0)
+ return;
+
+ xmlFreeMutex(xmlMemMutex);
+ xmlMemMutex = NULL;
+ xmlMemInitialized = 0;
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlCleanupMemory() Ok\n");
+#endif
+}
+
+/**
+ * xmlMemSetup:
+ * @freeFunc: the free() function to use
+ * @mallocFunc: the malloc() function to use
+ * @reallocFunc: the realloc() function to use
+ * @strdupFunc: the strdup() function to use
+ *
+ * Override the default memory access functions with a new set
+ * This has to be called before any other libxml routines !
+ *
+ * Should this be blocked if there was already some allocations
+ * done ?
+ *
+ * Returns 0 on success
+ */
+int
+xmlMemSetup(xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc,
+ xmlReallocFunc reallocFunc, xmlStrdupFunc strdupFunc) {
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMemSetup()\n");
+#endif
+ if (freeFunc == NULL)
+ return(-1);
+ if (mallocFunc == NULL)
+ return(-1);
+ if (reallocFunc == NULL)
+ return(-1);
+ if (strdupFunc == NULL)
+ return(-1);
+ xmlFree = freeFunc;
+ xmlMalloc = mallocFunc;
+ xmlMallocAtomic = mallocFunc;
+ xmlRealloc = reallocFunc;
+ xmlMemStrdup = strdupFunc;
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlMemSetup() Ok\n");
+#endif
+ return(0);
+}
+
+/**
+ * xmlMemGet:
+ * @freeFunc: place to save the free() function in use
+ * @mallocFunc: place to save the malloc() function in use
+ * @reallocFunc: place to save the realloc() function in use
+ * @strdupFunc: place to save the strdup() function in use
+ *
+ * Provides the memory access functions set currently in use
+ *
+ * Returns 0 on success
+ */
+int
+xmlMemGet(xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc,
+ xmlReallocFunc *reallocFunc, xmlStrdupFunc *strdupFunc) {
+ if (freeFunc != NULL) *freeFunc = xmlFree;
+ if (mallocFunc != NULL) *mallocFunc = xmlMalloc;
+ if (reallocFunc != NULL) *reallocFunc = xmlRealloc;
+ if (strdupFunc != NULL) *strdupFunc = xmlMemStrdup;
+ return(0);
+}
+
+/**
+ * xmlGcMemSetup:
+ * @freeFunc: the free() function to use
+ * @mallocFunc: the malloc() function to use
+ * @mallocAtomicFunc: the malloc() function to use for atomic allocations
+ * @reallocFunc: the realloc() function to use
+ * @strdupFunc: the strdup() function to use
+ *
+ * Override the default memory access functions with a new set
+ * This has to be called before any other libxml routines !
+ * The mallocAtomicFunc is specialized for atomic block
+ * allocations (i.e. of areas useful for garbage collected memory allocators
+ *
+ * Should this be blocked if there was already some allocations
+ * done ?
+ *
+ * Returns 0 on success
+ */
+int
+xmlGcMemSetup(xmlFreeFunc freeFunc, xmlMallocFunc mallocFunc,
+ xmlMallocFunc mallocAtomicFunc, xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc) {
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGcMemSetup()\n");
+#endif
+ if (freeFunc == NULL)
+ return(-1);
+ if (mallocFunc == NULL)
+ return(-1);
+ if (mallocAtomicFunc == NULL)
+ return(-1);
+ if (reallocFunc == NULL)
+ return(-1);
+ if (strdupFunc == NULL)
+ return(-1);
+ xmlFree = freeFunc;
+ xmlMalloc = mallocFunc;
+ xmlMallocAtomic = mallocAtomicFunc;
+ xmlRealloc = reallocFunc;
+ xmlMemStrdup = strdupFunc;
+#ifdef DEBUG_MEMORY
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlGcMemSetup() Ok\n");
+#endif
+ return(0);
+}
+
+/**
+ * xmlGcMemGet:
+ * @freeFunc: place to save the free() function in use
+ * @mallocFunc: place to save the malloc() function in use
+ * @mallocAtomicFunc: place to save the atomic malloc() function in use
+ * @reallocFunc: place to save the realloc() function in use
+ * @strdupFunc: place to save the strdup() function in use
+ *
+ * Provides the memory access functions set currently in use
+ * The mallocAtomicFunc is specialized for atomic block
+ * allocations (i.e. of areas useful for garbage collected memory allocators
+ *
+ * Returns 0 on success
+ */
+int
+xmlGcMemGet(xmlFreeFunc *freeFunc, xmlMallocFunc *mallocFunc,
+ xmlMallocFunc *mallocAtomicFunc, xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc) {
+ if (freeFunc != NULL) *freeFunc = xmlFree;
+ if (mallocFunc != NULL) *mallocFunc = xmlMalloc;
+ if (mallocAtomicFunc != NULL) *mallocAtomicFunc = xmlMallocAtomic;
+ if (reallocFunc != NULL) *reallocFunc = xmlRealloc;
+ if (strdupFunc != NULL) *strdupFunc = xmlMemStrdup;
+ return(0);
+}
+
+#define bottom_xmlmemory
+#include "elfgcchack.h"
diff --git a/xmlmodule.c b/xmlmodule.c
new file mode 100644
index 0000000..50ed666
--- /dev/null
+++ b/xmlmodule.c
@@ -0,0 +1,460 @@
+/*
+ * xmlmodule.c : basic API for dynamic module loading added 2.6.17
+ *
+ * See Copyright for the status of this software.
+ *
+ * joelwreed@comcast.net
+ *
+ * http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlmodule.h>
+#include <libxml/globals.h>
+
+#ifdef LIBXML_MODULES_ENABLED
+
+struct _xmlModule {
+ unsigned char *name;
+ void *handle;
+};
+
+static void *xmlModulePlatformOpen(const char *name);
+static int xmlModulePlatformClose(void *handle);
+static int xmlModulePlatformSymbol(void *handle, const char *name, void **result);
+
+/************************************************************************
+ * *
+ * module memory error handler *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlModuleErrMemory:
+ * @extra: extra information
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlModuleErrMemory(xmlModulePtr module, const char *extra)
+{
+ const char *name = NULL;
+
+ if (module != NULL) {
+ name = (const char *) module->name;
+ }
+
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ name, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlModuleOpen:
+ * @name: the module name
+ * @options: a set of xmlModuleOption
+ *
+ * Opens a module/shared library given its name or path
+ * NOTE: that due to portability issues, behaviour can only be
+ * guaranteed with @name using ASCII. We canot guarantee that
+ * an UTF-8 string would work, which is why name is a const char *
+ * and not a const xmlChar * .
+ * TODO: options are not yet implemented.
+ *
+ * Returns a handle for the module or NULL in case of error
+ */
+xmlModulePtr
+xmlModuleOpen(const char *name, int options ATTRIBUTE_UNUSED)
+{
+ xmlModulePtr module;
+
+ module = (xmlModulePtr) xmlMalloc(sizeof(xmlModule));
+ if (module == NULL) {
+ xmlModuleErrMemory(NULL, "creating module");
+ return (NULL);
+ }
+
+ memset(module, 0, sizeof(xmlModule));
+
+ module->handle = xmlModulePlatformOpen(name);
+
+ if (module->handle == NULL) {
+ xmlFree(module);
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
+ name, NULL, 0, 0, "failed to open %s\n", name);
+ return(NULL);
+ }
+
+ module->name = xmlStrdup((const xmlChar *) name);
+ return (module);
+}
+
+/**
+ * xmlModuleSymbol:
+ * @module: the module
+ * @name: the name of the symbol
+ * @symbol: the resulting symbol address
+ *
+ * Lookup for a symbol address in the given module
+ * NOTE: that due to portability issues, behaviour can only be
+ * guaranteed with @name using ASCII. We canot guarantee that
+ * an UTF-8 string would work, which is why name is a const char *
+ * and not a const xmlChar * .
+ *
+ * Returns 0 if the symbol was found, or -1 in case of error
+ */
+int
+xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)
+{
+ int rc = -1;
+
+ if ((NULL == module) || (symbol == NULL) || (name == NULL)) {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
+ NULL, NULL, 0, 0, "null parameter\n");
+ return rc;
+ }
+
+ rc = xmlModulePlatformSymbol(module->handle, name, symbol);
+
+ if (rc == -1) {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,
+ name, NULL, 0, 0,
+ "failed to find symbol: %s\n",
+ (name == NULL ? "NULL" : name));
+ return rc;
+ }
+
+ return rc;
+}
+
+/**
+ * xmlModuleClose:
+ * @module: the module handle
+ *
+ * The close operations unload the associated module and free the
+ * data associated to the module.
+ *
+ * Returns 0 in case of success, -1 in case of argument error and -2
+ * if the module could not be closed/unloaded.
+ */
+int
+xmlModuleClose(xmlModulePtr module)
+{
+ int rc;
+
+ if (NULL == module) {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_CLOSE, XML_ERR_FATAL, NULL, 0, 0,
+ NULL, NULL, 0, 0, "null module pointer\n");
+ return -1;
+ }
+
+ rc = xmlModulePlatformClose(module->handle);
+
+ if (rc != 0) {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_CLOSE, XML_ERR_FATAL, NULL, 0, 0,
+ (const char *) module->name, NULL, 0, 0,
+ "failed to close: %s\n", module->name);
+ return -2;
+ }
+
+ rc = xmlModuleFree(module);
+ return (rc);
+}
+
+/**
+ * xmlModuleFree:
+ * @module: the module handle
+ *
+ * The free operations free the data associated to the module
+ * but does not unload the associated shared library which may still
+ * be in use.
+ *
+ * Returns 0 in case of success, -1 in case of argument error
+ */
+int
+xmlModuleFree(xmlModulePtr module)
+{
+ if (NULL == module) {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
+ XML_MODULE_CLOSE, XML_ERR_FATAL, NULL, 0, NULL,
+ NULL, NULL, 0, 0, "null module pointer\n");
+ return -1;
+ }
+
+ xmlFree(module->name);
+ xmlFree(module);
+
+ return (0);
+}
+
+#if defined(HAVE_DLOPEN) && !defined(_WIN32)
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#ifndef RTLD_GLOBAL /* For Tru64 UNIX 4.0 */
+#define RTLD_GLOBAL 0
+#endif
+
+/**
+ * xmlModulePlatformOpen:
+ * @name: path to the module
+ *
+ * returns a handle on success, and zero on error.
+ */
+
+static void *
+xmlModulePlatformOpen(const char *name)
+{
+ return dlopen(name, RTLD_GLOBAL | RTLD_NOW);
+}
+
+/*
+ * xmlModulePlatformClose:
+ * @handle: handle to the module
+ *
+ * returns 0 on success, and non-zero on error.
+ */
+
+static int
+xmlModulePlatformClose(void *handle)
+{
+ return dlclose(handle);
+}
+
+/*
+ * xmlModulePlatformSymbol:
+ * http://www.opengroup.org/onlinepubs/009695399/functions/dlsym.html
+ * returns 0 on success and the loaded symbol in result, and -1 on error.
+ */
+
+static int
+xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
+{
+ *symbol = dlsym(handle, name);
+ if (dlerror() != NULL) {
+ return -1;
+ }
+ return 0;
+}
+
+#else /* ! HAVE_DLOPEN */
+
+#ifdef HAVE_SHLLOAD /* HAVE_SHLLOAD */
+#ifdef HAVE_DL_H
+#include <dl.h>
+#endif
+/*
+ * xmlModulePlatformOpen:
+ * returns a handle on success, and zero on error.
+ */
+
+static void *
+xmlModulePlatformOpen(const char *name)
+{
+ return shl_load(name, BIND_IMMEDIATE, 0L);
+}
+
+/*
+ * xmlModulePlatformClose:
+ * returns 0 on success, and non-zero on error.
+ */
+
+static int
+xmlModulePlatformClose(void *handle)
+{
+ return shl_unload(handle);
+}
+
+/*
+ * xmlModulePlatformSymbol:
+ * http://docs.hp.com/en/B2355-90683/shl_load.3X.html
+ * returns 0 on success and the loaded symbol in result, and -1 on error.
+ */
+
+static int
+xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
+{
+ int rc;
+
+ errno = 0;
+ rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol);
+ return rc;
+}
+
+#endif /* HAVE_SHLLOAD */
+#endif /* ! HAVE_DLOPEN */
+
+#ifdef _WIN32
+
+#include <windows.h>
+
+/*
+ * xmlModulePlatformOpen:
+ * returns a handle on success, and zero on error.
+ */
+
+static void *
+xmlModulePlatformOpen(const char *name)
+{
+ return LoadLibraryA(name);
+}
+
+/*
+ * xmlModulePlatformClose:
+ * returns 0 on success, and non-zero on error.
+ */
+
+static int
+xmlModulePlatformClose(void *handle)
+{
+ int rc;
+
+ rc = FreeLibrary(handle);
+ return (0 == rc);
+}
+
+/*
+ * xmlModulePlatformSymbol:
+ * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getprocaddress.asp
+ * returns 0 on success and the loaded symbol in result, and -1 on error.
+ */
+
+static int
+xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
+{
+#ifdef _WIN32_WCE
+ /*
+ * GetProcAddressA seems only available on WinCE
+ */
+ *symbol = GetProcAddressA(handle, name);
+#else
+ *symbol = GetProcAddress(handle, name);
+#endif
+ return (NULL == *symbol) ? -1 : 0;
+}
+
+#endif /* _WIN32 */
+
+#ifdef HAVE_BEOS
+
+#include <kernel/image.h>
+
+/*
+ * xmlModulePlatformOpen:
+ * beos api info: http://www.beunited.org/bebook/The%20Kernel%20Kit/Images.html
+ * returns a handle on success, and zero on error.
+ */
+
+static void *
+xmlModulePlatformOpen(const char *name)
+{
+ return (void *) load_add_on(name);
+}
+
+/*
+ * xmlModulePlatformClose:
+ * beos api info: http://www.beunited.org/bebook/The%20Kernel%20Kit/Images.html
+ * returns 0 on success, and non-zero on error.
+ */
+
+static int
+xmlModulePlatformClose(void *handle)
+{
+ status_t rc;
+
+ rc = unload_add_on((image_id) handle);
+
+ if (rc == B_OK)
+ return 0;
+ else
+ return -1;
+}
+
+/*
+ * xmlModulePlatformSymbol:
+ * beos api info: http://www.beunited.org/bebook/The%20Kernel%20Kit/Images.html
+ * returns 0 on success and the loaded symbol in result, and -1 on error.
+ */
+
+static int
+xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
+{
+ status_t rc;
+
+ rc = get_image_symbol((image_id) handle, name, B_SYMBOL_TYPE_ANY, symbol);
+
+ return (rc == B_OK) ? 0 : -1;
+}
+
+#endif /* HAVE_BEOS */
+
+#ifdef HAVE_OS2
+
+#include <os2.h>
+
+/*
+ * xmlModulePlatformOpen:
+ * os2 api info: http://www.edm2.com/os2api/Dos/DosLoadModule.html
+ * returns a handle on success, and zero on error.
+ */
+
+static void *
+xmlModulePlatformOpen(const char *name)
+{
+ char errbuf[256];
+ void *handle;
+ int rc;
+
+ rc = DosLoadModule(errbuf, sizeof(errbuf) - 1, name, &handle);
+
+ if (rc)
+ return 0;
+ else
+ return (handle);
+}
+
+/*
+ * xmlModulePlatformClose:
+ * os2 api info: http://www.edm2.com/os2api/Dos/DosFreeModule.html
+ * returns 0 on success, and non-zero on error.
+ */
+
+static int
+xmlModulePlatformClose(void *handle)
+{
+ return DosFreeModule(handle);
+}
+
+/*
+ * xmlModulePlatformSymbol:
+ * os2 api info: http://www.edm2.com/os2api/Dos/DosQueryProcAddr.html
+ * returns 0 on success and the loaded symbol in result, and -1 on error.
+ */
+
+static int
+xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
+{
+ int rc;
+
+ rc = DosQueryProcAddr(handle, 0, name, symbol);
+
+ return (rc == NO_ERROR) ? 0 : -1;
+}
+
+#endif /* HAVE_OS2 */
+
+#define bottom_xmlmodule
+#include "elfgcchack.h"
+#endif /* LIBXML_MODULES_ENABLED */
diff --git a/xmlreader.c b/xmlreader.c
new file mode 100644
index 0000000..f19e123
--- /dev/null
+++ b/xmlreader.c
@@ -0,0 +1,5932 @@
+/*
+ * xmlreader.c: implements the xmlTextReader streaming node API
+ *
+ * NOTE:
+ * XmlTextReader.Normalization Property won't be supported, since
+ * it makes the parser non compliant to the XML recommendation
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+/*
+ * TODOs:
+ * - XML Schemas validation
+ */
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_READER_ENABLED
+#include <string.h> /* for memset() only ! */
+#include <stdarg.h>
+
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/xmlIO.h>
+#include <libxml/xmlreader.h>
+#include <libxml/parserInternals.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+#include <libxml/uri.h>
+#ifdef LIBXML_XINCLUDE_ENABLED
+#include <libxml/xinclude.h>
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+#include <libxml/pattern.h>
+#endif
+
+#include "buf.h"
+
+#define MAX_ERR_MSG_SIZE 64000
+
+/*
+ * The following VA_COPY was coded following an example in
+ * the Samba project. It may not be sufficient for some
+ * esoteric implementations of va_list but (hopefully) will
+ * be sufficient for libxml2.
+ */
+#ifndef VA_COPY
+ #ifdef HAVE_VA_COPY
+ #define VA_COPY(dest, src) va_copy(dest, src)
+ #else
+ #ifdef HAVE___VA_COPY
+ #define VA_COPY(dest,src) __va_copy(dest, src)
+ #else
+ #ifndef VA_LIST_IS_ARRAY
+ #define VA_COPY(dest,src) (dest) = (src)
+ #else
+ #include <string.h>
+ #define VA_COPY(dest,src) memcpy((char *)(dest),(char *)(src),sizeof(va_list))
+ #endif
+ #endif
+ #endif
+#endif
+
+/* #define DEBUG_CALLBACKS */
+/* #define DEBUG_READER */
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#ifdef DEBUG_READER
+#define DUMP_READER xmlTextReaderDebug(reader);
+#else
+#define DUMP_READER
+#endif
+
+#define CHUNK_SIZE 512
+/************************************************************************
+ * *
+ * The parser: maps the Text Reader API on top of the existing *
+ * parsing routines building a tree *
+ * *
+ ************************************************************************/
+
+#define XML_TEXTREADER_INPUT 1
+#define XML_TEXTREADER_CTXT 2
+
+typedef enum {
+ XML_TEXTREADER_NONE = -1,
+ XML_TEXTREADER_START= 0,
+ XML_TEXTREADER_ELEMENT= 1,
+ XML_TEXTREADER_END= 2,
+ XML_TEXTREADER_EMPTY= 3,
+ XML_TEXTREADER_BACKTRACK= 4,
+ XML_TEXTREADER_DONE= 5,
+ XML_TEXTREADER_ERROR= 6
+} xmlTextReaderState;
+
+typedef enum {
+ XML_TEXTREADER_NOT_VALIDATE = 0,
+ XML_TEXTREADER_VALIDATE_DTD = 1,
+ XML_TEXTREADER_VALIDATE_RNG = 2,
+ XML_TEXTREADER_VALIDATE_XSD = 4
+} xmlTextReaderValidate;
+
+struct _xmlTextReader {
+ int mode; /* the parsing mode */
+ xmlDocPtr doc; /* when walking an existing doc */
+ xmlTextReaderValidate validate;/* is there any validation */
+ int allocs; /* what structure were deallocated */
+ xmlTextReaderState state;
+ xmlParserCtxtPtr ctxt; /* the parser context */
+ xmlSAXHandlerPtr sax; /* the parser SAX callbacks */
+ xmlParserInputBufferPtr input; /* the input */
+ startElementSAXFunc startElement;/* initial SAX callbacks */
+ endElementSAXFunc endElement; /* idem */
+ startElementNsSAX2Func startElementNs;/* idem */
+ endElementNsSAX2Func endElementNs; /* idem */
+ charactersSAXFunc characters;
+ cdataBlockSAXFunc cdataBlock;
+ unsigned int base; /* base of the segment in the input */
+ unsigned int cur; /* current position in the input */
+ xmlNodePtr node; /* current node */
+ xmlNodePtr curnode;/* current attribute node */
+ int depth; /* depth of the current node */
+ xmlNodePtr faketext;/* fake xmlNs chld */
+ int preserve;/* preserve the resulting document */
+ xmlBufPtr buffer; /* used to return const xmlChar * */
+ xmlDictPtr dict; /* the context dictionnary */
+
+ /* entity stack when traversing entities content */
+ xmlNodePtr ent; /* Current Entity Ref Node */
+ int entNr; /* Depth of the entities stack */
+ int entMax; /* Max depth of the entities stack */
+ xmlNodePtr *entTab; /* array of entities */
+
+ /* error handling */
+ xmlTextReaderErrorFunc errorFunc; /* callback function */
+ void *errorFuncArg; /* callback function user argument */
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+ /* Handling of RelaxNG validation */
+ xmlRelaxNGPtr rngSchemas; /* The Relax NG schemas */
+ xmlRelaxNGValidCtxtPtr rngValidCtxt;/* The Relax NG validation context */
+ int rngPreserveCtxt; /* 1 if the context was provided by the user */
+ int rngValidErrors;/* The number of errors detected */
+ xmlNodePtr rngFullNode; /* the node if RNG not progressive */
+ /* Handling of Schemas validation */
+ xmlSchemaPtr xsdSchemas; /* The Schemas schemas */
+ xmlSchemaValidCtxtPtr xsdValidCtxt;/* The Schemas validation context */
+ int xsdPreserveCtxt; /* 1 if the context was provided by the user */
+ int xsdValidErrors;/* The number of errors detected */
+ xmlSchemaSAXPlugPtr xsdPlug; /* the schemas plug in SAX pipeline */
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+ /* Handling of XInclude processing */
+ int xinclude; /* is xinclude asked for */
+ const xmlChar * xinclude_name; /* the xinclude name from dict */
+ xmlXIncludeCtxtPtr xincctxt; /* the xinclude context */
+ int in_xinclude; /* counts for xinclude */
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+ int patternNr; /* number of preserve patterns */
+ int patternMax; /* max preserve patterns */
+ xmlPatternPtr *patternTab; /* array of preserve patterns */
+#endif
+ int preserves; /* level of preserves */
+ int parserFlags; /* the set of options set */
+ /* Structured error handling */
+ xmlStructuredErrorFunc sErrorFunc; /* callback function */
+};
+
+#define NODE_IS_EMPTY 0x1
+#define NODE_IS_PRESERVED 0x2
+#define NODE_IS_SPRESERVED 0x4
+
+/**
+ * CONSTSTR:
+ *
+ * Macro used to return an interned string
+ */
+#define CONSTSTR(str) xmlDictLookup(reader->dict, (str), -1)
+#define CONSTQSTR(p, str) xmlDictQLookup(reader->dict, (p), (str))
+
+static int xmlTextReaderReadTree(xmlTextReaderPtr reader);
+static int xmlTextReaderNextTree(xmlTextReaderPtr reader);
+
+/************************************************************************
+ * *
+ * Our own version of the freeing routines as we recycle nodes *
+ * *
+ ************************************************************************/
+/**
+ * DICT_FREE:
+ * @str: a string
+ *
+ * Free a string if it is not owned by the "dict" dictionnary in the
+ * current scope
+ */
+#define DICT_FREE(str) \
+ if ((str) && ((!dict) || \
+ (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
+ xmlFree((char *)(str));
+
+static void xmlTextReaderFreeNode(xmlTextReaderPtr reader, xmlNodePtr cur);
+static void xmlTextReaderFreeNodeList(xmlTextReaderPtr reader, xmlNodePtr cur);
+
+/**
+ * xmlFreeID:
+ * @not: A id
+ *
+ * Deallocate the memory used by an id definition
+ */
+static void
+xmlFreeID(xmlIDPtr id) {
+ xmlDictPtr dict = NULL;
+
+ if (id == NULL) return;
+
+ if (id->doc != NULL)
+ dict = id->doc->dict;
+
+ if (id->value != NULL)
+ DICT_FREE(id->value)
+ xmlFree(id);
+}
+
+/**
+ * xmlTextReaderRemoveID:
+ * @doc: the document
+ * @attr: the attribute
+ *
+ * Remove the given attribute from the ID table maintained internally.
+ *
+ * Returns -1 if the lookup failed and 0 otherwise
+ */
+static int
+xmlTextReaderRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
+ xmlIDTablePtr table;
+ xmlIDPtr id;
+ xmlChar *ID;
+
+ if (doc == NULL) return(-1);
+ if (attr == NULL) return(-1);
+ table = (xmlIDTablePtr) doc->ids;
+ if (table == NULL)
+ return(-1);
+
+ ID = xmlNodeListGetString(doc, attr->children, 1);
+ if (ID == NULL)
+ return(-1);
+ id = xmlHashLookup(table, ID);
+ xmlFree(ID);
+ if (id == NULL || id->attr != attr) {
+ return(-1);
+ }
+ id->name = attr->name;
+ id->attr = NULL;
+ return(0);
+}
+
+/**
+ * xmlTextReaderFreeProp:
+ * @reader: the xmlTextReaderPtr used
+ * @cur: the node
+ *
+ * Free a node.
+ */
+static void
+xmlTextReaderFreeProp(xmlTextReaderPtr reader, xmlAttrPtr cur) {
+ xmlDictPtr dict;
+
+ if ((reader != NULL) && (reader->ctxt != NULL))
+ dict = reader->ctxt->dict;
+ else
+ dict = NULL;
+ if (cur == NULL) return;
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue((xmlNodePtr) cur);
+
+ /* Check for ID removal -> leading to invalid references ! */
+ if ((cur->parent != NULL) && (cur->parent->doc != NULL) &&
+ ((cur->parent->doc->intSubset != NULL) ||
+ (cur->parent->doc->extSubset != NULL))) {
+ if (xmlIsID(cur->parent->doc, cur->parent, cur))
+ xmlTextReaderRemoveID(cur->parent->doc, cur);
+ }
+ if (cur->children != NULL)
+ xmlTextReaderFreeNodeList(reader, cur->children);
+
+ DICT_FREE(cur->name);
+ if ((reader != NULL) && (reader->ctxt != NULL) &&
+ (reader->ctxt->freeAttrsNr < 100)) {
+ cur->next = reader->ctxt->freeAttrs;
+ reader->ctxt->freeAttrs = cur;
+ reader->ctxt->freeAttrsNr++;
+ } else {
+ xmlFree(cur);
+ }
+}
+
+/**
+ * xmlTextReaderFreePropList:
+ * @reader: the xmlTextReaderPtr used
+ * @cur: the first property in the list
+ *
+ * Free a property and all its siblings, all the children are freed too.
+ */
+static void
+xmlTextReaderFreePropList(xmlTextReaderPtr reader, xmlAttrPtr cur) {
+ xmlAttrPtr next;
+
+ while (cur != NULL) {
+ next = cur->next;
+ xmlTextReaderFreeProp(reader, cur);
+ cur = next;
+ }
+}
+
+/**
+ * xmlTextReaderFreeNodeList:
+ * @reader: the xmlTextReaderPtr used
+ * @cur: the first node in the list
+ *
+ * Free a node and all its siblings, this is a recursive behaviour, all
+ * the children are freed too.
+ */
+static void
+xmlTextReaderFreeNodeList(xmlTextReaderPtr reader, xmlNodePtr cur) {
+ xmlNodePtr next;
+ xmlDictPtr dict;
+
+ if ((reader != NULL) && (reader->ctxt != NULL))
+ dict = reader->ctxt->dict;
+ else
+ dict = NULL;
+ if (cur == NULL) return;
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlFreeNsList((xmlNsPtr) cur);
+ return;
+ }
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ xmlFreeDoc((xmlDocPtr) cur);
+ return;
+ }
+ while (cur != NULL) {
+ next = cur->next;
+ /* unroll to speed up freeing the document */
+ if (cur->type != XML_DTD_NODE) {
+
+ if ((cur->children != NULL) &&
+ (cur->type != XML_ENTITY_REF_NODE)) {
+ if (cur->children->parent == cur)
+ xmlTextReaderFreeNodeList(reader, cur->children);
+ cur->children = NULL;
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue(cur);
+
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->properties != NULL))
+ xmlTextReaderFreePropList(reader, cur->properties);
+ if ((cur->content != (xmlChar *) &(cur->properties)) &&
+ (cur->type != XML_ELEMENT_NODE) &&
+ (cur->type != XML_XINCLUDE_START) &&
+ (cur->type != XML_XINCLUDE_END) &&
+ (cur->type != XML_ENTITY_REF_NODE)) {
+ DICT_FREE(cur->content);
+ }
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->nsDef != NULL))
+ xmlFreeNsList(cur->nsDef);
+
+ /*
+ * we don't free element names here they are interned now
+ */
+ if ((cur->type != XML_TEXT_NODE) &&
+ (cur->type != XML_COMMENT_NODE))
+ DICT_FREE(cur->name);
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_TEXT_NODE)) &&
+ (reader != NULL) && (reader->ctxt != NULL) &&
+ (reader->ctxt->freeElemsNr < 100)) {
+ cur->next = reader->ctxt->freeElems;
+ reader->ctxt->freeElems = cur;
+ reader->ctxt->freeElemsNr++;
+ } else {
+ xmlFree(cur);
+ }
+ }
+ cur = next;
+ }
+}
+
+/**
+ * xmlTextReaderFreeNode:
+ * @reader: the xmlTextReaderPtr used
+ * @cur: the node
+ *
+ * Free a node, this is a recursive behaviour, all the children are freed too.
+ * This doesn't unlink the child from the list, use xmlUnlinkNode() first.
+ */
+static void
+xmlTextReaderFreeNode(xmlTextReaderPtr reader, xmlNodePtr cur) {
+ xmlDictPtr dict;
+
+ if ((reader != NULL) && (reader->ctxt != NULL))
+ dict = reader->ctxt->dict;
+ else
+ dict = NULL;
+ if (cur->type == XML_DTD_NODE) {
+ xmlFreeDtd((xmlDtdPtr) cur);
+ return;
+ }
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlFreeNs((xmlNsPtr) cur);
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlTextReaderFreeProp(reader, (xmlAttrPtr) cur);
+ return;
+ }
+
+ if ((cur->children != NULL) &&
+ (cur->type != XML_ENTITY_REF_NODE)) {
+ if (cur->children->parent == cur)
+ xmlTextReaderFreeNodeList(reader, cur->children);
+ cur->children = NULL;
+ }
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue(cur);
+
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->properties != NULL))
+ xmlTextReaderFreePropList(reader, cur->properties);
+ if ((cur->content != (xmlChar *) &(cur->properties)) &&
+ (cur->type != XML_ELEMENT_NODE) &&
+ (cur->type != XML_XINCLUDE_START) &&
+ (cur->type != XML_XINCLUDE_END) &&
+ (cur->type != XML_ENTITY_REF_NODE)) {
+ DICT_FREE(cur->content);
+ }
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_XINCLUDE_START) ||
+ (cur->type == XML_XINCLUDE_END)) &&
+ (cur->nsDef != NULL))
+ xmlFreeNsList(cur->nsDef);
+
+ /*
+ * we don't free names here they are interned now
+ */
+ if ((cur->type != XML_TEXT_NODE) &&
+ (cur->type != XML_COMMENT_NODE))
+ DICT_FREE(cur->name);
+
+ if (((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_TEXT_NODE)) &&
+ (reader != NULL) && (reader->ctxt != NULL) &&
+ (reader->ctxt->freeElemsNr < 100)) {
+ cur->next = reader->ctxt->freeElems;
+ reader->ctxt->freeElems = cur;
+ reader->ctxt->freeElemsNr++;
+ } else {
+ xmlFree(cur);
+ }
+}
+
+/**
+ * xmlTextReaderFreeIDTable:
+ * @table: An id table
+ *
+ * Deallocate the memory used by an ID hash table.
+ */
+static void
+xmlTextReaderFreeIDTable(xmlIDTablePtr table) {
+ xmlHashFree(table, (xmlHashDeallocator) xmlFreeID);
+}
+
+/**
+ * xmlTextReaderFreeDoc:
+ * @reader: the xmlTextReaderPtr used
+ * @cur: pointer to the document
+ *
+ * Free up all the structures used by a document, tree included.
+ */
+static void
+xmlTextReaderFreeDoc(xmlTextReaderPtr reader, xmlDocPtr cur) {
+ xmlDtdPtr extSubset, intSubset;
+
+ if (cur == NULL) return;
+
+ if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
+ xmlDeregisterNodeDefaultValue((xmlNodePtr) cur);
+
+ /*
+ * Do this before freeing the children list to avoid ID lookups
+ */
+ if (cur->ids != NULL) xmlTextReaderFreeIDTable((xmlIDTablePtr) cur->ids);
+ cur->ids = NULL;
+ if (cur->refs != NULL) xmlFreeRefTable((xmlRefTablePtr) cur->refs);
+ cur->refs = NULL;
+ extSubset = cur->extSubset;
+ intSubset = cur->intSubset;
+ if (intSubset == extSubset)
+ extSubset = NULL;
+ if (extSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) cur->extSubset);
+ cur->extSubset = NULL;
+ xmlFreeDtd(extSubset);
+ }
+ if (intSubset != NULL) {
+ xmlUnlinkNode((xmlNodePtr) cur->intSubset);
+ cur->intSubset = NULL;
+ xmlFreeDtd(intSubset);
+ }
+
+ if (cur->children != NULL) xmlTextReaderFreeNodeList(reader, cur->children);
+
+ if (cur->version != NULL) xmlFree((char *) cur->version);
+ if (cur->name != NULL) xmlFree((char *) cur->name);
+ if (cur->encoding != NULL) xmlFree((char *) cur->encoding);
+ if (cur->oldNs != NULL) xmlFreeNsList(cur->oldNs);
+ if (cur->URL != NULL) xmlFree((char *) cur->URL);
+ if (cur->dict != NULL) xmlDictFree(cur->dict);
+
+ xmlFree(cur);
+}
+
+/************************************************************************
+ * *
+ * The reader core parser *
+ * *
+ ************************************************************************/
+#ifdef DEBUG_READER
+static void
+xmlTextReaderDebug(xmlTextReaderPtr reader) {
+ if ((reader == NULL) || (reader->ctxt == NULL)) {
+ fprintf(stderr, "xmlTextReader NULL\n");
+ return;
+ }
+ fprintf(stderr, "xmlTextReader: state %d depth %d ",
+ reader->state, reader->depth);
+ if (reader->node == NULL) {
+ fprintf(stderr, "node = NULL\n");
+ } else {
+ fprintf(stderr, "node %s\n", reader->node->name);
+ }
+ fprintf(stderr, " input: base %d, cur %d, depth %d: ",
+ reader->base, reader->cur, reader->ctxt->nodeNr);
+ if (reader->input->buffer == NULL) {
+ fprintf(stderr, "buffer is NULL\n");
+ } else {
+#ifdef LIBXML_DEBUG_ENABLED
+ xmlDebugDumpString(stderr,
+ &reader->input->buffer->content[reader->cur]);
+#endif
+ fprintf(stderr, "\n");
+ }
+}
+#endif
+
+/**
+ * xmlTextReaderEntPush:
+ * @reader: the xmlTextReaderPtr used
+ * @value: the entity reference node
+ *
+ * Pushes a new entity reference node on top of the entities stack
+ *
+ * Returns 0 in case of error, the index in the stack otherwise
+ */
+static int
+xmlTextReaderEntPush(xmlTextReaderPtr reader, xmlNodePtr value)
+{
+ if (reader->entMax <= 0) {
+ reader->entMax = 10;
+ reader->entTab = (xmlNodePtr *) xmlMalloc(reader->entMax *
+ sizeof(reader->entTab[0]));
+ if (reader->entTab == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "xmlMalloc failed !\n");
+ return (0);
+ }
+ }
+ if (reader->entNr >= reader->entMax) {
+ reader->entMax *= 2;
+ reader->entTab =
+ (xmlNodePtr *) xmlRealloc(reader->entTab,
+ reader->entMax *
+ sizeof(reader->entTab[0]));
+ if (reader->entTab == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "xmlRealloc failed !\n");
+ return (0);
+ }
+ }
+ reader->entTab[reader->entNr] = value;
+ reader->ent = value;
+ return (reader->entNr++);
+}
+
+/**
+ * xmlTextReaderEntPop:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Pops the top element entity from the entities stack
+ *
+ * Returns the entity just removed
+ */
+static xmlNodePtr
+xmlTextReaderEntPop(xmlTextReaderPtr reader)
+{
+ xmlNodePtr ret;
+
+ if (reader->entNr <= 0)
+ return (NULL);
+ reader->entNr--;
+ if (reader->entNr > 0)
+ reader->ent = reader->entTab[reader->entNr - 1];
+ else
+ reader->ent = NULL;
+ ret = reader->entTab[reader->entNr];
+ reader->entTab[reader->entNr] = NULL;
+ return (ret);
+}
+
+/**
+ * xmlTextReaderStartElement:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+xmlTextReaderStartElement(void *ctx, const xmlChar *fullname,
+ const xmlChar **atts) {
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderStartElement(%s)\n", fullname);
+#endif
+ if ((reader != NULL) && (reader->startElement != NULL)) {
+ reader->startElement(ctx, fullname, atts);
+ if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
+ (ctxt->input->cur[1] == '>'))
+ ctxt->node->extra = NODE_IS_EMPTY;
+ }
+ if (reader != NULL)
+ reader->state = XML_TEXTREADER_ELEMENT;
+}
+
+/**
+ * xmlTextReaderEndElement:
+ * @ctx: the user data (XML parser context)
+ * @fullname: The element name, including namespace prefix
+ *
+ * called when an ending tag has been processed.
+ */
+static void
+xmlTextReaderEndElement(void *ctx, const xmlChar *fullname) {
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderEndElement(%s)\n", fullname);
+#endif
+ if ((reader != NULL) && (reader->endElement != NULL)) {
+ reader->endElement(ctx, fullname);
+ }
+}
+
+/**
+ * xmlTextReaderStartElementNs:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * nb_defaulted: the number of defaulted attributes.
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * called when an opening tag has been processed.
+ */
+static void
+xmlTextReaderStartElementNs(void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderStartElementNs(%s)\n", localname);
+#endif
+ if ((reader != NULL) && (reader->startElementNs != NULL)) {
+ reader->startElementNs(ctx, localname, prefix, URI, nb_namespaces,
+ namespaces, nb_attributes, nb_defaulted,
+ attributes);
+ if ((ctxt->node != NULL) && (ctxt->input != NULL) &&
+ (ctxt->input->cur != NULL) && (ctxt->input->cur[0] == '/') &&
+ (ctxt->input->cur[1] == '>'))
+ ctxt->node->extra = NODE_IS_EMPTY;
+ }
+ if (reader != NULL)
+ reader->state = XML_TEXTREADER_ELEMENT;
+}
+
+/**
+ * xmlTextReaderEndElementNs:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * called when an ending tag has been processed.
+ */
+static void
+xmlTextReaderEndElementNs(void *ctx,
+ const xmlChar * localname,
+ const xmlChar * prefix,
+ const xmlChar * URI)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderEndElementNs(%s)\n", localname);
+#endif
+ if ((reader != NULL) && (reader->endElementNs != NULL)) {
+ reader->endElementNs(ctx, localname, prefix, URI);
+ }
+}
+
+
+/**
+ * xmlTextReaderCharacters:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * receiving some chars from the parser.
+ */
+static void
+xmlTextReaderCharacters(void *ctx, const xmlChar *ch, int len)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderCharacters()\n");
+#endif
+ if ((reader != NULL) && (reader->characters != NULL)) {
+ reader->characters(ctx, ch, len);
+ }
+}
+
+/**
+ * xmlTextReaderCDataBlock:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * called when a pcdata block has been parsed
+ */
+static void
+xmlTextReaderCDataBlock(void *ctx, const xmlChar *ch, int len)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlTextReaderPtr reader = ctxt->_private;
+
+#ifdef DEBUG_CALLBACKS
+ printf("xmlTextReaderCDataBlock()\n");
+#endif
+ if ((reader != NULL) && (reader->cdataBlock != NULL)) {
+ reader->cdataBlock(ctx, ch, len);
+ }
+}
+
+/**
+ * xmlTextReaderPushData:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Push data down the progressive parser until a significant callback
+ * got raised.
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+static int
+xmlTextReaderPushData(xmlTextReaderPtr reader) {
+ xmlBufPtr inbuf;
+ int val, s;
+ xmlTextReaderState oldstate;
+ int alloc;
+
+ if ((reader->input == NULL) || (reader->input->buffer == NULL))
+ return(-1);
+
+ oldstate = reader->state;
+ reader->state = XML_TEXTREADER_NONE;
+ inbuf = reader->input->buffer;
+ alloc = xmlBufGetAllocationScheme(inbuf);
+
+ while (reader->state == XML_TEXTREADER_NONE) {
+ if (xmlBufUse(inbuf) < reader->cur + CHUNK_SIZE) {
+ /*
+ * Refill the buffer unless we are at the end of the stream
+ */
+ if (reader->mode != XML_TEXTREADER_MODE_EOF) {
+ val = xmlParserInputBufferRead(reader->input, 4096);
+ if ((val == 0) &&
+ (alloc == XML_BUFFER_ALLOC_IMMUTABLE)) {
+ if (xmlBufUse(inbuf) == reader->cur) {
+ reader->mode = XML_TEXTREADER_MODE_EOF;
+ reader->state = oldstate;
+ }
+ } else if (val < 0) {
+ reader->mode = XML_TEXTREADER_MODE_EOF;
+ reader->state = oldstate;
+ if ((oldstate != XML_TEXTREADER_START) ||
+ (reader->ctxt->myDoc != NULL))
+ return(val);
+ } else if (val == 0) {
+ /* mark the end of the stream and process the remains */
+ reader->mode = XML_TEXTREADER_MODE_EOF;
+ break;
+ }
+
+ } else
+ break;
+ }
+ /*
+ * parse by block of CHUNK_SIZE bytes, various tests show that
+ * it's the best tradeoff at least on a 1.2GH Duron
+ */
+ if (xmlBufUse(inbuf) >= reader->cur + CHUNK_SIZE) {
+ val = xmlParseChunk(reader->ctxt,
+ (const char *) xmlBufContent(inbuf) + reader->cur,
+ CHUNK_SIZE, 0);
+ reader->cur += CHUNK_SIZE;
+ if (val != 0)
+ reader->ctxt->wellFormed = 0;
+ if (reader->ctxt->wellFormed == 0)
+ break;
+ } else {
+ s = xmlBufUse(inbuf) - reader->cur;
+ val = xmlParseChunk(reader->ctxt,
+ (const char *) xmlBufContent(inbuf) + reader->cur,
+ s, 0);
+ reader->cur += s;
+ if (val != 0)
+ reader->ctxt->wellFormed = 0;
+ break;
+ }
+ }
+
+ /*
+ * Discard the consumed input when needed and possible
+ */
+ if (reader->mode == XML_TEXTREADER_MODE_INTERACTIVE) {
+ if (alloc != XML_BUFFER_ALLOC_IMMUTABLE) {
+ if ((reader->cur >= 4096) &&
+ (xmlBufUse(inbuf) - reader->cur <= CHUNK_SIZE)) {
+ val = xmlBufShrink(inbuf, reader->cur);
+ if (val >= 0) {
+ reader->cur -= val;
+ }
+ }
+ }
+ }
+
+ /*
+ * At the end of the stream signal that the work is done to the Push
+ * parser.
+ */
+ else if (reader->mode == XML_TEXTREADER_MODE_EOF) {
+ if (reader->state != XML_TEXTREADER_DONE) {
+ s = xmlBufUse(inbuf) - reader->cur;
+ val = xmlParseChunk(reader->ctxt,
+ (const char *) xmlBufContent(inbuf) + reader->cur,
+ s, 1);
+ reader->cur = xmlBufUse(inbuf);
+ reader->state = XML_TEXTREADER_DONE;
+ if (val != 0) {
+ if (reader->ctxt->wellFormed)
+ reader->ctxt->wellFormed = 0;
+ else
+ return(-1);
+ }
+ }
+ }
+ reader->state = oldstate;
+ if (reader->ctxt->wellFormed == 0) {
+ reader->mode = XML_TEXTREADER_MODE_EOF;
+ return(-1);
+ }
+
+ return(0);
+}
+
+#ifdef LIBXML_REGEXP_ENABLED
+/**
+ * xmlTextReaderValidatePush:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Push the current node for validation
+ */
+static void
+xmlTextReaderValidatePush(xmlTextReaderPtr reader ATTRIBUTE_UNUSED) {
+ xmlNodePtr node = reader->node;
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_DTD) &&
+ (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
+ if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
+ reader->ctxt->valid &= xmlValidatePushElement(&reader->ctxt->vctxt,
+ reader->ctxt->myDoc, node, node->name);
+ } else {
+ /* TODO use the BuildQName interface */
+ xmlChar *qname;
+
+ qname = xmlStrdup(node->ns->prefix);
+ qname = xmlStrcat(qname, BAD_CAST ":");
+ qname = xmlStrcat(qname, node->name);
+ reader->ctxt->valid &= xmlValidatePushElement(&reader->ctxt->vctxt,
+ reader->ctxt->myDoc, node, qname);
+ if (qname != NULL)
+ xmlFree(qname);
+ }
+ }
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_RNG) &&
+ (reader->rngValidCtxt != NULL)) {
+ int ret;
+
+ if (reader->rngFullNode != NULL) return;
+ ret = xmlRelaxNGValidatePushElement(reader->rngValidCtxt,
+ reader->ctxt->myDoc,
+ node);
+ if (ret == 0) {
+ /*
+ * this element requires a full tree
+ */
+ node = xmlTextReaderExpand(reader);
+ if (node == NULL) {
+printf("Expand failed !\n");
+ ret = -1;
+ } else {
+ ret = xmlRelaxNGValidateFullElement(reader->rngValidCtxt,
+ reader->ctxt->myDoc,
+ node);
+ reader->rngFullNode = node;
+ }
+ }
+ if (ret != 1)
+ reader->rngValidErrors++;
+ }
+#endif
+}
+
+/**
+ * xmlTextReaderValidateCData:
+ * @reader: the xmlTextReaderPtr used
+ * @data: pointer to the CData
+ * @len: length of the CData block in bytes.
+ *
+ * Push some CData for validation
+ */
+static void
+xmlTextReaderValidateCData(xmlTextReaderPtr reader,
+ const xmlChar *data, int len) {
+#ifdef LIBXML_VALID_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_DTD) &&
+ (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
+ reader->ctxt->valid &= xmlValidatePushCData(&reader->ctxt->vctxt,
+ data, len);
+ }
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_RNG) &&
+ (reader->rngValidCtxt != NULL)) {
+ int ret;
+
+ if (reader->rngFullNode != NULL) return;
+ ret = xmlRelaxNGValidatePushCData(reader->rngValidCtxt, data, len);
+ if (ret != 1)
+ reader->rngValidErrors++;
+ }
+#endif
+}
+
+/**
+ * xmlTextReaderValidatePop:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Pop the current node from validation
+ */
+static void
+xmlTextReaderValidatePop(xmlTextReaderPtr reader) {
+ xmlNodePtr node = reader->node;
+
+#ifdef LIBXML_VALID_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_DTD) &&
+ (reader->ctxt != NULL) && (reader->ctxt->validate == 1)) {
+ if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
+ reader->ctxt->valid &= xmlValidatePopElement(&reader->ctxt->vctxt,
+ reader->ctxt->myDoc, node, node->name);
+ } else {
+ /* TODO use the BuildQName interface */
+ xmlChar *qname;
+
+ qname = xmlStrdup(node->ns->prefix);
+ qname = xmlStrcat(qname, BAD_CAST ":");
+ qname = xmlStrcat(qname, node->name);
+ reader->ctxt->valid &= xmlValidatePopElement(&reader->ctxt->vctxt,
+ reader->ctxt->myDoc, node, qname);
+ if (qname != NULL)
+ xmlFree(qname);
+ }
+ }
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_RNG) &&
+ (reader->rngValidCtxt != NULL)) {
+ int ret;
+
+ if (reader->rngFullNode != NULL) {
+ if (node == reader->rngFullNode)
+ reader->rngFullNode = NULL;
+ return;
+ }
+ ret = xmlRelaxNGValidatePopElement(reader->rngValidCtxt,
+ reader->ctxt->myDoc,
+ node);
+ if (ret != 1)
+ reader->rngValidErrors++;
+ }
+#endif
+}
+
+/**
+ * xmlTextReaderValidateEntity:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Handle the validation when an entity reference is encountered and
+ * entity substitution is not activated. As a result the parser interface
+ * must walk through the entity and do the validation calls
+ */
+static void
+xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
+ xmlNodePtr oldnode = reader->node;
+ xmlNodePtr node = reader->node;
+ xmlParserCtxtPtr ctxt = reader->ctxt;
+
+ do {
+ if (node->type == XML_ENTITY_REF_NODE) {
+ /*
+ * Case where the underlying tree is not availble, lookup the entity
+ * and walk it.
+ */
+ if ((node->children == NULL) && (ctxt->sax != NULL) &&
+ (ctxt->sax->getEntity != NULL)) {
+ node->children = (xmlNodePtr)
+ ctxt->sax->getEntity(ctxt, node->name);
+ }
+
+ if ((node->children != NULL) &&
+ (node->children->type == XML_ENTITY_DECL) &&
+ (node->children->children != NULL)) {
+ xmlTextReaderEntPush(reader, node);
+ node = node->children->children;
+ continue;
+ } else {
+ /*
+ * The error has probably be raised already.
+ */
+ if (node == oldnode)
+ break;
+ node = node->next;
+ }
+#ifdef LIBXML_REGEXP_ENABLED
+ } else if (node->type == XML_ELEMENT_NODE) {
+ reader->node = node;
+ xmlTextReaderValidatePush(reader);
+ } else if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ xmlTextReaderValidateCData(reader, node->content,
+ xmlStrlen(node->content));
+#endif
+ }
+
+ /*
+ * go to next node
+ */
+ if (node->children != NULL) {
+ node = node->children;
+ continue;
+ } else if (node->type == XML_ELEMENT_NODE) {
+ xmlTextReaderValidatePop(reader);
+ }
+ if (node->next != NULL) {
+ node = node->next;
+ continue;
+ }
+ do {
+ node = node->parent;
+ if (node->type == XML_ELEMENT_NODE) {
+ xmlNodePtr tmp;
+ if (reader->entNr == 0) {
+ while ((tmp = node->last) != NULL) {
+ if ((tmp->extra & NODE_IS_PRESERVED) == 0) {
+ xmlUnlinkNode(tmp);
+ xmlTextReaderFreeNode(reader, tmp);
+ } else
+ break;
+ }
+ }
+ reader->node = node;
+ xmlTextReaderValidatePop(reader);
+ }
+ if ((node->type == XML_ENTITY_DECL) &&
+ (reader->ent != NULL) && (reader->ent->children == node)) {
+ node = xmlTextReaderEntPop(reader);
+ }
+ if (node == oldnode)
+ break;
+ if (node->next != NULL) {
+ node = node->next;
+ break;
+ }
+ } while ((node != NULL) && (node != oldnode));
+ } while ((node != NULL) && (node != oldnode));
+ reader->node = oldnode;
+}
+#endif /* LIBXML_REGEXP_ENABLED */
+
+
+/**
+ * xmlTextReaderGetSuccessor:
+ * @cur: the current node
+ *
+ * Get the successor of a node if available.
+ *
+ * Returns the successor node or NULL
+ */
+static xmlNodePtr
+xmlTextReaderGetSuccessor(xmlNodePtr cur) {
+ if (cur == NULL) return(NULL) ; /* ERROR */
+ if (cur->next != NULL) return(cur->next) ;
+ do {
+ cur = cur->parent;
+ if (cur == NULL) break;
+ if (cur->next != NULL) return(cur->next);
+ } while (cur != NULL);
+ return(cur);
+}
+
+/**
+ * xmlTextReaderDoExpand:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Makes sure that the current node is fully read as well as all its
+ * descendant. It means the full DOM subtree must be available at the
+ * end of the call.
+ *
+ * Returns 1 if the node was expanded successfully, 0 if there is no more
+ * nodes to read, or -1 in case of error
+ */
+static int
+xmlTextReaderDoExpand(xmlTextReaderPtr reader) {
+ int val;
+
+ if ((reader == NULL) || (reader->node == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ do {
+ if (reader->ctxt->instate == XML_PARSER_EOF) return(1);
+
+ if (xmlTextReaderGetSuccessor(reader->node) != NULL)
+ return(1);
+ if (reader->ctxt->nodeNr < reader->depth)
+ return(1);
+ if (reader->mode == XML_TEXTREADER_MODE_EOF)
+ return(1);
+ val = xmlTextReaderPushData(reader);
+ if (val < 0){
+ reader->mode = XML_TEXTREADER_MODE_ERROR;
+ return(-1);
+ }
+ } while(reader->mode != XML_TEXTREADER_MODE_EOF);
+ return(1);
+}
+
+/**
+ * xmlTextReaderCollectSiblings:
+ * @node: the first child
+ *
+ * Traverse depth-first through all sibling nodes and their children
+ * nodes and concatenate their content. This is an auxiliary function
+ * to xmlTextReaderReadString.
+ *
+ * Returns a string containing the content, or NULL in case of error.
+ */
+static xmlChar *
+xmlTextReaderCollectSiblings(xmlNodePtr node)
+{
+ xmlBufferPtr buffer;
+ xmlChar *ret;
+
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+
+ buffer = xmlBufferCreate();
+ if (buffer == NULL)
+ return NULL;
+
+ for ( ; node != NULL; node = node->next) {
+ switch (node->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ xmlBufferCat(buffer, node->content);
+ break;
+ case XML_ELEMENT_NODE: {
+ xmlChar *tmp;
+
+ tmp = xmlTextReaderCollectSiblings(node->children);
+ xmlBufferCat(buffer, tmp);
+ xmlFree(tmp);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ ret = buffer->content;
+ buffer->content = NULL;
+ xmlBufferFree(buffer);
+ return(ret);
+}
+
+/**
+ * xmlTextReaderRead:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Moves the position of the current instance to the next node in
+ * the stream, exposing its properties.
+ *
+ * Returns 1 if the node was read successfully, 0 if there is no more
+ * nodes to read, or -1 in case of error
+ */
+int
+xmlTextReaderRead(xmlTextReaderPtr reader) {
+ int val, olddepth = 0;
+ xmlTextReaderState oldstate = XML_TEXTREADER_START;
+ xmlNodePtr oldnode = NULL;
+
+
+ if (reader == NULL)
+ return(-1);
+ reader->curnode = NULL;
+ if (reader->doc != NULL)
+ return(xmlTextReaderReadTree(reader));
+ if (reader->ctxt == NULL)
+ return(-1);
+
+#ifdef DEBUG_READER
+ fprintf(stderr, "\nREAD ");
+ DUMP_READER
+#endif
+ if (reader->mode == XML_TEXTREADER_MODE_INITIAL) {
+ reader->mode = XML_TEXTREADER_MODE_INTERACTIVE;
+ /*
+ * Initial state
+ */
+ do {
+ val = xmlTextReaderPushData(reader);
+ if (val < 0){
+ reader->mode = XML_TEXTREADER_MODE_ERROR;
+ reader->state = XML_TEXTREADER_ERROR;
+ return(-1);
+ }
+ } while ((reader->ctxt->node == NULL) &&
+ ((reader->mode != XML_TEXTREADER_MODE_EOF) &&
+ (reader->state != XML_TEXTREADER_DONE)));
+ if (reader->ctxt->node == NULL) {
+ if (reader->ctxt->myDoc != NULL) {
+ reader->node = reader->ctxt->myDoc->children;
+ }
+ if (reader->node == NULL){
+ reader->mode = XML_TEXTREADER_MODE_ERROR;
+ reader->state = XML_TEXTREADER_ERROR;
+ return(-1);
+ }
+ reader->state = XML_TEXTREADER_ELEMENT;
+ } else {
+ if (reader->ctxt->myDoc != NULL) {
+ reader->node = reader->ctxt->myDoc->children;
+ }
+ if (reader->node == NULL)
+ reader->node = reader->ctxt->nodeTab[0];
+ reader->state = XML_TEXTREADER_ELEMENT;
+ }
+ reader->depth = 0;
+ reader->ctxt->parseMode = XML_PARSE_READER;
+ goto node_found;
+ }
+ oldstate = reader->state;
+ olddepth = reader->ctxt->nodeNr;
+ oldnode = reader->node;
+
+get_next_node:
+ if (reader->node == NULL) {
+ if (reader->mode == XML_TEXTREADER_MODE_EOF)
+ return(0);
+ else
+ return(-1);
+ }
+
+ /*
+ * If we are not backtracking on ancestors or examined nodes,
+ * that the parser didn't finished or that we arent at the end
+ * of stream, continue processing.
+ */
+ while ((reader->node != NULL) && (reader->node->next == NULL) &&
+ (reader->ctxt->nodeNr == olddepth) &&
+ ((oldstate == XML_TEXTREADER_BACKTRACK) ||
+ (reader->node->children == NULL) ||
+ (reader->node->type == XML_ENTITY_REF_NODE) ||
+ ((reader->node->children != NULL) &&
+ (reader->node->children->type == XML_TEXT_NODE) &&
+ (reader->node->children->next == NULL)) ||
+ (reader->node->type == XML_DTD_NODE) ||
+ (reader->node->type == XML_DOCUMENT_NODE) ||
+ (reader->node->type == XML_HTML_DOCUMENT_NODE)) &&
+ ((reader->ctxt->node == NULL) ||
+ (reader->ctxt->node == reader->node) ||
+ (reader->ctxt->node == reader->node->parent)) &&
+ (reader->ctxt->instate != XML_PARSER_EOF)) {
+ val = xmlTextReaderPushData(reader);
+ if (val < 0){
+ reader->mode = XML_TEXTREADER_MODE_ERROR;
+ reader->state = XML_TEXTREADER_ERROR;
+ return(-1);
+ }
+ if (reader->node == NULL)
+ goto node_end;
+ }
+ if (oldstate != XML_TEXTREADER_BACKTRACK) {
+ if ((reader->node->children != NULL) &&
+ (reader->node->type != XML_ENTITY_REF_NODE) &&
+ (reader->node->type != XML_XINCLUDE_START) &&
+ (reader->node->type != XML_DTD_NODE)) {
+ reader->node = reader->node->children;
+ reader->depth++;
+ reader->state = XML_TEXTREADER_ELEMENT;
+ goto node_found;
+ }
+ }
+ if (reader->node->next != NULL) {
+ if ((oldstate == XML_TEXTREADER_ELEMENT) &&
+ (reader->node->type == XML_ELEMENT_NODE) &&
+ (reader->node->children == NULL) &&
+ ((reader->node->extra & NODE_IS_EMPTY) == 0)
+#ifdef LIBXML_XINCLUDE_ENABLED
+ && (reader->in_xinclude <= 0)
+#endif
+ ) {
+ reader->state = XML_TEXTREADER_END;
+ goto node_found;
+ }
+#ifdef LIBXML_REGEXP_ENABLED
+ if ((reader->validate) &&
+ (reader->node->type == XML_ELEMENT_NODE))
+ xmlTextReaderValidatePop(reader);
+#endif /* LIBXML_REGEXP_ENABLED */
+ if ((reader->preserves > 0) &&
+ (reader->node->extra & NODE_IS_SPRESERVED))
+ reader->preserves--;
+ reader->node = reader->node->next;
+ reader->state = XML_TEXTREADER_ELEMENT;
+
+ /*
+ * Cleanup of the old node
+ */
+ if ((reader->preserves == 0) &&
+#ifdef LIBXML_XINCLUDE_ENABLED
+ (reader->in_xinclude == 0) &&
+#endif
+ (reader->entNr == 0) &&
+ (reader->node->prev != NULL) &&
+ (reader->node->prev->type != XML_DTD_NODE)) {
+ xmlNodePtr tmp = reader->node->prev;
+ if ((tmp->extra & NODE_IS_PRESERVED) == 0) {
+ xmlUnlinkNode(tmp);
+ xmlTextReaderFreeNode(reader, tmp);
+ }
+ }
+
+ goto node_found;
+ }
+ if ((oldstate == XML_TEXTREADER_ELEMENT) &&
+ (reader->node->type == XML_ELEMENT_NODE) &&
+ (reader->node->children == NULL) &&
+ ((reader->node->extra & NODE_IS_EMPTY) == 0)) {;
+ reader->state = XML_TEXTREADER_END;
+ goto node_found;
+ }
+#ifdef LIBXML_REGEXP_ENABLED
+ if ((reader->validate != XML_TEXTREADER_NOT_VALIDATE) && (reader->node->type == XML_ELEMENT_NODE))
+ xmlTextReaderValidatePop(reader);
+#endif /* LIBXML_REGEXP_ENABLED */
+ if ((reader->preserves > 0) &&
+ (reader->node->extra & NODE_IS_SPRESERVED))
+ reader->preserves--;
+ reader->node = reader->node->parent;
+ if ((reader->node == NULL) ||
+ (reader->node->type == XML_DOCUMENT_NODE) ||
+#ifdef LIBXML_DOCB_ENABLED
+ (reader->node->type == XML_DOCB_DOCUMENT_NODE) ||
+#endif
+ (reader->node->type == XML_HTML_DOCUMENT_NODE)) {
+ if (reader->mode != XML_TEXTREADER_MODE_EOF) {
+ val = xmlParseChunk(reader->ctxt, "", 0, 1);
+ reader->state = XML_TEXTREADER_DONE;
+ if (val != 0)
+ return(-1);
+ }
+ reader->node = NULL;
+ reader->depth = -1;
+
+ /*
+ * Cleanup of the old node
+ */
+ if ((oldnode != NULL) && (reader->preserves == 0) &&
+#ifdef LIBXML_XINCLUDE_ENABLED
+ (reader->in_xinclude == 0) &&
+#endif
+ (reader->entNr == 0) &&
+ (oldnode->type != XML_DTD_NODE) &&
+ ((oldnode->extra & NODE_IS_PRESERVED) == 0)) {
+ xmlUnlinkNode(oldnode);
+ xmlTextReaderFreeNode(reader, oldnode);
+ }
+
+ goto node_end;
+ }
+ if ((reader->preserves == 0) &&
+#ifdef LIBXML_XINCLUDE_ENABLED
+ (reader->in_xinclude == 0) &&
+#endif
+ (reader->entNr == 0) &&
+ (reader->node->last != NULL) &&
+ ((reader->node->last->extra & NODE_IS_PRESERVED) == 0)) {
+ xmlNodePtr tmp = reader->node->last;
+ xmlUnlinkNode(tmp);
+ xmlTextReaderFreeNode(reader, tmp);
+ }
+ reader->depth--;
+ reader->state = XML_TEXTREADER_BACKTRACK;
+
+node_found:
+ DUMP_READER
+
+ /*
+ * If we are in the middle of a piece of CDATA make sure it's finished
+ */
+ if ((reader->node != NULL) &&
+ (reader->node->next == NULL) &&
+ ((reader->node->type == XML_TEXT_NODE) ||
+ (reader->node->type == XML_CDATA_SECTION_NODE))) {
+ if (xmlTextReaderExpand(reader) == NULL)
+ return -1;
+ }
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ /*
+ * Handle XInclude if asked for
+ */
+ if ((reader->xinclude) && (reader->node != NULL) &&
+ (reader->node->type == XML_ELEMENT_NODE) &&
+ (reader->node->ns != NULL) &&
+ ((xmlStrEqual(reader->node->ns->href, XINCLUDE_NS)) ||
+ (xmlStrEqual(reader->node->ns->href, XINCLUDE_OLD_NS)))) {
+ if (reader->xincctxt == NULL) {
+ reader->xincctxt = xmlXIncludeNewContext(reader->ctxt->myDoc);
+ xmlXIncludeSetFlags(reader->xincctxt,
+ reader->parserFlags & (~XML_PARSE_NOXINCNODE));
+ }
+ /*
+ * expand that node and process it
+ */
+ if (xmlTextReaderExpand(reader) == NULL)
+ return -1;
+ xmlXIncludeProcessNode(reader->xincctxt, reader->node);
+ }
+ if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_START)) {
+ reader->in_xinclude++;
+ goto get_next_node;
+ }
+ if ((reader->node != NULL) && (reader->node->type == XML_XINCLUDE_END)) {
+ reader->in_xinclude--;
+ goto get_next_node;
+ }
+#endif
+ /*
+ * Handle entities enter and exit when in entity replacement mode
+ */
+ if ((reader->node != NULL) &&
+ (reader->node->type == XML_ENTITY_REF_NODE) &&
+ (reader->ctxt != NULL) && (reader->ctxt->replaceEntities == 1)) {
+ /*
+ * Case where the underlying tree is not availble, lookup the entity
+ * and walk it.
+ */
+ if ((reader->node->children == NULL) && (reader->ctxt->sax != NULL) &&
+ (reader->ctxt->sax->getEntity != NULL)) {
+ reader->node->children = (xmlNodePtr)
+ reader->ctxt->sax->getEntity(reader->ctxt, reader->node->name);
+ }
+
+ if ((reader->node->children != NULL) &&
+ (reader->node->children->type == XML_ENTITY_DECL) &&
+ (reader->node->children->children != NULL)) {
+ xmlTextReaderEntPush(reader, reader->node);
+ reader->node = reader->node->children->children;
+ }
+#ifdef LIBXML_REGEXP_ENABLED
+ } else if ((reader->node != NULL) &&
+ (reader->node->type == XML_ENTITY_REF_NODE) &&
+ (reader->ctxt != NULL) && (reader->validate)) {
+ xmlTextReaderValidateEntity(reader);
+#endif /* LIBXML_REGEXP_ENABLED */
+ }
+ if ((reader->node != NULL) &&
+ (reader->node->type == XML_ENTITY_DECL) &&
+ (reader->ent != NULL) && (reader->ent->children == reader->node)) {
+ reader->node = xmlTextReaderEntPop(reader);
+ reader->depth++;
+ goto get_next_node;
+ }
+#ifdef LIBXML_REGEXP_ENABLED
+ if ((reader->validate != XML_TEXTREADER_NOT_VALIDATE) && (reader->node != NULL)) {
+ xmlNodePtr node = reader->node;
+
+ if ((node->type == XML_ELEMENT_NODE) &&
+ ((reader->state != XML_TEXTREADER_END) &&
+ (reader->state != XML_TEXTREADER_BACKTRACK))) {
+ xmlTextReaderValidatePush(reader);
+ } else if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ xmlTextReaderValidateCData(reader, node->content,
+ xmlStrlen(node->content));
+ }
+ }
+#endif /* LIBXML_REGEXP_ENABLED */
+#ifdef LIBXML_PATTERN_ENABLED
+ if ((reader->patternNr > 0) && (reader->state != XML_TEXTREADER_END) &&
+ (reader->state != XML_TEXTREADER_BACKTRACK)) {
+ int i;
+ for (i = 0;i < reader->patternNr;i++) {
+ if (xmlPatternMatch(reader->patternTab[i], reader->node) == 1) {
+ xmlTextReaderPreserve(reader);
+ break;
+ }
+ }
+ }
+#endif /* LIBXML_PATTERN_ENABLED */
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if ((reader->validate == XML_TEXTREADER_VALIDATE_XSD) &&
+ (reader->xsdValidErrors == 0) &&
+ (reader->xsdValidCtxt != NULL)) {
+ reader->xsdValidErrors = !xmlSchemaIsValid(reader->xsdValidCtxt);
+ }
+#endif /* LIBXML_PATTERN_ENABLED */
+ return(1);
+node_end:
+ reader->state = XML_TEXTREADER_DONE;
+ return(0);
+}
+
+/**
+ * xmlTextReaderReadState:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Gets the read state of the reader.
+ *
+ * Returns the state value, or -1 in case of error
+ */
+int
+xmlTextReaderReadState(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ return(reader->mode);
+}
+
+/**
+ * xmlTextReaderExpand:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Reads the contents of the current node and the full subtree. It then makes
+ * the subtree available until the next xmlTextReaderRead() call
+ *
+ * Returns a node pointer valid until the next xmlTextReaderRead() call
+ * or NULL in case of error.
+ */
+xmlNodePtr
+xmlTextReaderExpand(xmlTextReaderPtr reader) {
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->doc != NULL)
+ return(reader->node);
+ if (reader->ctxt == NULL)
+ return(NULL);
+ if (xmlTextReaderDoExpand(reader) < 0)
+ return(NULL);
+ return(reader->node);
+}
+
+/**
+ * xmlTextReaderNext:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Skip to the node following the current one in document order while
+ * avoiding the subtree if any.
+ *
+ * Returns 1 if the node was read successfully, 0 if there is no more
+ * nodes to read, or -1 in case of error
+ */
+int
+xmlTextReaderNext(xmlTextReaderPtr reader) {
+ int ret;
+ xmlNodePtr cur;
+
+ if (reader == NULL)
+ return(-1);
+ if (reader->doc != NULL)
+ return(xmlTextReaderNextTree(reader));
+ cur = reader->node;
+ if ((cur == NULL) || (cur->type != XML_ELEMENT_NODE))
+ return(xmlTextReaderRead(reader));
+ if (reader->state == XML_TEXTREADER_END || reader->state == XML_TEXTREADER_BACKTRACK)
+ return(xmlTextReaderRead(reader));
+ if (cur->extra & NODE_IS_EMPTY)
+ return(xmlTextReaderRead(reader));
+ do {
+ ret = xmlTextReaderRead(reader);
+ if (ret != 1)
+ return(ret);
+ } while (reader->node != cur);
+ return(xmlTextReaderRead(reader));
+}
+
+#ifdef LIBXML_WRITER_ENABLED
+/**
+ * xmlTextReaderReadInnerXml:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Reads the contents of the current node, including child nodes and markup.
+ *
+ * Returns a string containing the XML content, or NULL if the current node
+ * is neither an element nor attribute, or has no child nodes. The
+ * string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
+{
+ xmlChar *resbuf;
+ xmlNodePtr node, cur_node;
+ xmlBufferPtr buff, buff2;
+ xmlDocPtr doc;
+
+ if (xmlTextReaderExpand(reader) == NULL) {
+ return NULL;
+ }
+ doc = reader->doc;
+ buff = xmlBufferCreate();
+ for (cur_node = reader->node->children; cur_node != NULL;
+ cur_node = cur_node->next) {
+ node = xmlDocCopyNode(cur_node, doc, 1);
+ buff2 = xmlBufferCreate();
+ if (xmlNodeDump(buff2, doc, node, 0, 0) == -1) {
+ xmlFreeNode(node);
+ xmlBufferFree(buff2);
+ xmlBufferFree(buff);
+ return NULL;
+ }
+ xmlBufferCat(buff, buff2->content);
+ xmlFreeNode(node);
+ xmlBufferFree(buff2);
+ }
+ resbuf = buff->content;
+ buff->content = NULL;
+
+ xmlBufferFree(buff);
+ return resbuf;
+}
+#endif
+
+#ifdef LIBXML_WRITER_ENABLED
+/**
+ * xmlTextReaderReadOuterXml:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Reads the contents of the current node, including child nodes and markup.
+ *
+ * Returns a string containing the node and any XML content, or NULL if the
+ * current node cannot be serialized. The string must be deallocated
+ * by the caller.
+ */
+xmlChar *
+xmlTextReaderReadOuterXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
+{
+ xmlChar *resbuf;
+ xmlNodePtr node;
+ xmlBufferPtr buff;
+ xmlDocPtr doc;
+
+ node = reader->node;
+ doc = reader->doc;
+ if (xmlTextReaderExpand(reader) == NULL) {
+ return NULL;
+ }
+ if (node->type == XML_DTD_NODE) {
+ node = (xmlNodePtr) xmlCopyDtd((xmlDtdPtr) node);
+ } else {
+ node = xmlDocCopyNode(node, doc, 1);
+ }
+ buff = xmlBufferCreate();
+ if (xmlNodeDump(buff, doc, node, 0, 0) == -1) {
+ xmlFreeNode(node);
+ xmlBufferFree(buff);
+ return NULL;
+ }
+
+ resbuf = buff->content;
+ buff->content = NULL;
+
+ xmlFreeNode(node);
+ xmlBufferFree(buff);
+ return resbuf;
+}
+#endif
+
+/**
+ * xmlTextReaderReadString:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Reads the contents of an element or a text node as a string.
+ *
+ * Returns a string containing the contents of the Element or Text node,
+ * or NULL if the reader is positioned on any other type of node.
+ * The string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderReadString(xmlTextReaderPtr reader)
+{
+ xmlNodePtr node;
+
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+
+ node = (reader->curnode != NULL) ? reader->curnode : reader->node;
+ switch (node->type) {
+ case XML_TEXT_NODE:
+ if (node->content != NULL)
+ return(xmlStrdup(node->content));
+ break;
+ case XML_ELEMENT_NODE:
+ if (xmlTextReaderDoExpand(reader) != -1) {
+ return xmlTextReaderCollectSiblings(node->children);
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:
+ TODO
+ break;
+ default:
+ break;
+ }
+ return(NULL);
+}
+
+#if 0
+/**
+ * xmlTextReaderReadBase64:
+ * @reader: the xmlTextReaderPtr used
+ * @array: a byte array to store the content.
+ * @offset: the zero-based index into array where the method should
+ * begin to write.
+ * @len: the number of bytes to write.
+ *
+ * Reads and decodes the Base64 encoded contents of an element and
+ * stores the result in a byte buffer.
+ *
+ * Returns the number of bytes written to array, or zero if the current
+ * instance is not positioned on an element or -1 in case of error.
+ */
+int
+xmlTextReaderReadBase64(xmlTextReaderPtr reader,
+ unsigned char *array ATTRIBUTE_UNUSED,
+ int offset ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED) {
+ if ((reader == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ if (reader->ctxt->wellFormed != 1)
+ return(-1);
+
+ if ((reader->node == NULL) || (reader->node->type == XML_ELEMENT_NODE))
+ return(0);
+ TODO
+ return(0);
+}
+
+/**
+ * xmlTextReaderReadBinHex:
+ * @reader: the xmlTextReaderPtr used
+ * @array: a byte array to store the content.
+ * @offset: the zero-based index into array where the method should
+ * begin to write.
+ * @len: the number of bytes to write.
+ *
+ * Reads and decodes the BinHex encoded contents of an element and
+ * stores the result in a byte buffer.
+ *
+ * Returns the number of bytes written to array, or zero if the current
+ * instance is not positioned on an element or -1 in case of error.
+ */
+int
+xmlTextReaderReadBinHex(xmlTextReaderPtr reader,
+ unsigned char *array ATTRIBUTE_UNUSED,
+ int offset ATTRIBUTE_UNUSED,
+ int len ATTRIBUTE_UNUSED) {
+ if ((reader == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ if (reader->ctxt->wellFormed != 1)
+ return(-1);
+
+ if ((reader->node == NULL) || (reader->node->type == XML_ELEMENT_NODE))
+ return(0);
+ TODO
+ return(0);
+}
+#endif
+
+/************************************************************************
+ * *
+ * Operating on a preparsed tree *
+ * *
+ ************************************************************************/
+static int
+xmlTextReaderNextTree(xmlTextReaderPtr reader)
+{
+ if (reader == NULL)
+ return(-1);
+
+ if (reader->state == XML_TEXTREADER_END)
+ return(0);
+
+ if (reader->node == NULL) {
+ if (reader->doc->children == NULL) {
+ reader->state = XML_TEXTREADER_END;
+ return(0);
+ }
+
+ reader->node = reader->doc->children;
+ reader->state = XML_TEXTREADER_START;
+ return(1);
+ }
+
+ if (reader->state != XML_TEXTREADER_BACKTRACK) {
+ /* Here removed traversal to child, because we want to skip the subtree,
+ replace with traversal to sibling to skip subtree */
+ if (reader->node->next != 0) {
+ /* Move to sibling if present,skipping sub-tree */
+ reader->node = reader->node->next;
+ reader->state = XML_TEXTREADER_START;
+ return(1);
+ }
+
+ /* if reader->node->next is NULL mean no subtree for current node,
+ so need to move to sibling of parent node if present */
+ if ((reader->node->type == XML_ELEMENT_NODE) ||
+ (reader->node->type == XML_ATTRIBUTE_NODE)) {
+ reader->state = XML_TEXTREADER_BACKTRACK;
+ /* This will move to parent if present */
+ xmlTextReaderRead(reader);
+ }
+ }
+
+ if (reader->node->next != 0) {
+ reader->node = reader->node->next;
+ reader->state = XML_TEXTREADER_START;
+ return(1);
+ }
+
+ if (reader->node->parent != 0) {
+ if (reader->node->parent->type == XML_DOCUMENT_NODE) {
+ reader->state = XML_TEXTREADER_END;
+ return(0);
+ }
+
+ reader->node = reader->node->parent;
+ reader->depth--;
+ reader->state = XML_TEXTREADER_BACKTRACK;
+ /* Repeat process to move to sibling of parent node if present */
+ xmlTextReaderNextTree(reader);
+ }
+
+ reader->state = XML_TEXTREADER_END;
+
+ return(1);
+}
+
+/**
+ * xmlTextReaderReadTree:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Moves the position of the current instance to the next node in
+ * the stream, exposing its properties.
+ *
+ * Returns 1 if the node was read successfully, 0 if there is no more
+ * nodes to read, or -1 in case of error
+ */
+static int
+xmlTextReaderReadTree(xmlTextReaderPtr reader) {
+ if (reader->state == XML_TEXTREADER_END)
+ return(0);
+
+next_node:
+ if (reader->node == NULL) {
+ if (reader->doc->children == NULL) {
+ reader->state = XML_TEXTREADER_END;
+ return(0);
+ }
+
+ reader->node = reader->doc->children;
+ reader->state = XML_TEXTREADER_START;
+ goto found_node;
+ }
+
+ if ((reader->state != XML_TEXTREADER_BACKTRACK) &&
+ (reader->node->type != XML_DTD_NODE) &&
+ (reader->node->type != XML_XINCLUDE_START) &&
+ (reader->node->type != XML_ENTITY_REF_NODE)) {
+ if (reader->node->children != NULL) {
+ reader->node = reader->node->children;
+ reader->depth++;
+ reader->state = XML_TEXTREADER_START;
+ goto found_node;
+ }
+
+ if (reader->node->type == XML_ATTRIBUTE_NODE) {
+ reader->state = XML_TEXTREADER_BACKTRACK;
+ goto found_node;
+ }
+ }
+
+ if (reader->node->next != NULL) {
+ reader->node = reader->node->next;
+ reader->state = XML_TEXTREADER_START;
+ goto found_node;
+ }
+
+ if (reader->node->parent != NULL) {
+ if ((reader->node->parent->type == XML_DOCUMENT_NODE) ||
+ (reader->node->parent->type == XML_HTML_DOCUMENT_NODE)) {
+ reader->state = XML_TEXTREADER_END;
+ return(0);
+ }
+
+ reader->node = reader->node->parent;
+ reader->depth--;
+ reader->state = XML_TEXTREADER_BACKTRACK;
+ goto found_node;
+ }
+
+ reader->state = XML_TEXTREADER_END;
+
+found_node:
+ if ((reader->node->type == XML_XINCLUDE_START) ||
+ (reader->node->type == XML_XINCLUDE_END))
+ goto next_node;
+
+ return(1);
+}
+
+/**
+ * xmlTextReaderNextSibling:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Skip to the node following the current one in document order while
+ * avoiding the subtree if any.
+ * Currently implemented only for Readers built on a document
+ *
+ * Returns 1 if the node was read successfully, 0 if there is no more
+ * nodes to read, or -1 in case of error
+ */
+int
+xmlTextReaderNextSibling(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->doc == NULL) {
+ /* TODO */
+ return(-1);
+ }
+
+ if (reader->state == XML_TEXTREADER_END)
+ return(0);
+
+ if (reader->node == NULL)
+ return(xmlTextReaderNextTree(reader));
+
+ if (reader->node->next != NULL) {
+ reader->node = reader->node->next;
+ reader->state = XML_TEXTREADER_START;
+ return(1);
+ }
+
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Constructor and destructors *
+ * *
+ ************************************************************************/
+/**
+ * xmlNewTextReader:
+ * @input: the xmlParserInputBufferPtr used to read data
+ * @URI: the URI information for the source if available
+ *
+ * Create an xmlTextReader structure fed with @input
+ *
+ * Returns the new xmlTextReaderPtr or NULL in case of error
+ */
+xmlTextReaderPtr
+xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
+ xmlTextReaderPtr ret;
+
+ if (input == NULL)
+ return(NULL);
+ ret = xmlMalloc(sizeof(xmlTextReader));
+ if (ret == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextReader : malloc failed\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlTextReader));
+ ret->doc = NULL;
+ ret->entTab = NULL;
+ ret->entMax = 0;
+ ret->entNr = 0;
+ ret->input = input;
+ ret->buffer = xmlBufCreateSize(100);
+ if (ret->buffer == NULL) {
+ xmlFree(ret);
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextReader : malloc failed\n");
+ return(NULL);
+ }
+ ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
+ if (ret->sax == NULL) {
+ xmlBufFree(ret->buffer);
+ xmlFree(ret);
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextReader : malloc failed\n");
+ return(NULL);
+ }
+ xmlSAXVersion(ret->sax, 2);
+ ret->startElement = ret->sax->startElement;
+ ret->sax->startElement = xmlTextReaderStartElement;
+ ret->endElement = ret->sax->endElement;
+ ret->sax->endElement = xmlTextReaderEndElement;
+#ifdef LIBXML_SAX1_ENABLED
+ if (ret->sax->initialized == XML_SAX2_MAGIC) {
+#endif /* LIBXML_SAX1_ENABLED */
+ ret->startElementNs = ret->sax->startElementNs;
+ ret->sax->startElementNs = xmlTextReaderStartElementNs;
+ ret->endElementNs = ret->sax->endElementNs;
+ ret->sax->endElementNs = xmlTextReaderEndElementNs;
+#ifdef LIBXML_SAX1_ENABLED
+ } else {
+ ret->startElementNs = NULL;
+ ret->endElementNs = NULL;
+ }
+#endif /* LIBXML_SAX1_ENABLED */
+ ret->characters = ret->sax->characters;
+ ret->sax->characters = xmlTextReaderCharacters;
+ ret->sax->ignorableWhitespace = xmlTextReaderCharacters;
+ ret->cdataBlock = ret->sax->cdataBlock;
+ ret->sax->cdataBlock = xmlTextReaderCDataBlock;
+
+ ret->mode = XML_TEXTREADER_MODE_INITIAL;
+ ret->node = NULL;
+ ret->curnode = NULL;
+ if (xmlBufUse(ret->input->buffer) < 4) {
+ xmlParserInputBufferRead(input, 4);
+ }
+ if (xmlBufUse(ret->input->buffer) >= 4) {
+ ret->ctxt = xmlCreatePushParserCtxt(ret->sax, NULL,
+ (const char *) xmlBufContent(ret->input->buffer),
+ 4, URI);
+ ret->base = 0;
+ ret->cur = 4;
+ } else {
+ ret->ctxt = xmlCreatePushParserCtxt(ret->sax, NULL, NULL, 0, URI);
+ ret->base = 0;
+ ret->cur = 0;
+ }
+
+ if (ret->ctxt == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextReader : malloc failed\n");
+ xmlBufFree(ret->buffer);
+ xmlFree(ret->sax);
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->ctxt->parseMode = XML_PARSE_READER;
+ ret->ctxt->_private = ret;
+ ret->ctxt->linenumbers = 1;
+ ret->ctxt->dictNames = 1;
+ ret->allocs = XML_TEXTREADER_CTXT;
+ /*
+ * use the parser dictionnary to allocate all elements and attributes names
+ */
+ ret->ctxt->docdict = 1;
+ ret->dict = ret->ctxt->dict;
+#ifdef LIBXML_XINCLUDE_ENABLED
+ ret->xinclude = 0;
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+ ret->patternMax = 0;
+ ret->patternTab = NULL;
+#endif
+ return(ret);
+}
+
+/**
+ * xmlNewTextReaderFilename:
+ * @URI: the URI of the resource to process
+ *
+ * Create an xmlTextReader structure fed with the resource at @URI
+ *
+ * Returns the new xmlTextReaderPtr or NULL in case of error
+ */
+xmlTextReaderPtr
+xmlNewTextReaderFilename(const char *URI) {
+ xmlParserInputBufferPtr input;
+ xmlTextReaderPtr ret;
+ char *directory = NULL;
+
+ input = xmlParserInputBufferCreateFilename(URI, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return(NULL);
+ ret = xmlNewTextReader(input, URI);
+ if (ret == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return(NULL);
+ }
+ ret->allocs |= XML_TEXTREADER_INPUT;
+ if (ret->ctxt->directory == NULL)
+ directory = xmlParserGetDirectory(URI);
+ if ((ret->ctxt->directory == NULL) && (directory != NULL))
+ ret->ctxt->directory = (char *) xmlStrdup((xmlChar *) directory);
+ if (directory != NULL)
+ xmlFree(directory);
+ return(ret);
+}
+
+/**
+ * xmlFreeTextReader:
+ * @reader: the xmlTextReaderPtr
+ *
+ * Deallocate all the resources associated to the reader
+ */
+void
+xmlFreeTextReader(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->rngSchemas != NULL) {
+ xmlRelaxNGFree(reader->rngSchemas);
+ reader->rngSchemas = NULL;
+ }
+ if (reader->rngValidCtxt != NULL) {
+ if (! reader->rngPreserveCtxt)
+ xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt);
+ reader->rngValidCtxt = NULL;
+ }
+ if (reader->xsdPlug != NULL) {
+ xmlSchemaSAXUnplug(reader->xsdPlug);
+ reader->xsdPlug = NULL;
+ }
+ if (reader->xsdValidCtxt != NULL) {
+ if (! reader->xsdPreserveCtxt)
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ }
+ if (reader->xsdSchemas != NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ }
+#endif
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (reader->xincctxt != NULL)
+ xmlXIncludeFreeContext(reader->xincctxt);
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+ if (reader->patternTab != NULL) {
+ int i;
+ for (i = 0;i < reader->patternNr;i++) {
+ if (reader->patternTab[i] != NULL)
+ xmlFreePattern(reader->patternTab[i]);
+ }
+ xmlFree(reader->patternTab);
+ }
+#endif
+ if (reader->faketext != NULL) {
+ xmlFreeNode(reader->faketext);
+ }
+ if (reader->ctxt != NULL) {
+ if (reader->dict == reader->ctxt->dict)
+ reader->dict = NULL;
+ if (reader->ctxt->myDoc != NULL) {
+ if (reader->preserve == 0)
+ xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
+ reader->ctxt->myDoc = NULL;
+ }
+ if ((reader->ctxt->vctxt.vstateTab != NULL) &&
+ (reader->ctxt->vctxt.vstateMax > 0)){
+ xmlFree(reader->ctxt->vctxt.vstateTab);
+ reader->ctxt->vctxt.vstateTab = NULL;
+ reader->ctxt->vctxt.vstateMax = 0;
+ }
+ if (reader->allocs & XML_TEXTREADER_CTXT)
+ xmlFreeParserCtxt(reader->ctxt);
+ }
+ if (reader->sax != NULL)
+ xmlFree(reader->sax);
+ if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT))
+ xmlFreeParserInputBuffer(reader->input);
+ if (reader->buffer != NULL)
+ xmlBufFree(reader->buffer);
+ if (reader->entTab != NULL)
+ xmlFree(reader->entTab);
+ if (reader->dict != NULL)
+ xmlDictFree(reader->dict);
+ xmlFree(reader);
+}
+
+/************************************************************************
+ * *
+ * Methods for XmlTextReader *
+ * *
+ ************************************************************************/
+/**
+ * xmlTextReaderClose:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * This method releases any resources allocated by the current instance
+ * changes the state to Closed and close any underlying input.
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlTextReaderClose(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ reader->node = NULL;
+ reader->curnode = NULL;
+ reader->mode = XML_TEXTREADER_MODE_CLOSED;
+ if (reader->ctxt != NULL) {
+ xmlStopParser(reader->ctxt);
+ if (reader->ctxt->myDoc != NULL) {
+ if (reader->preserve == 0)
+ xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
+ reader->ctxt->myDoc = NULL;
+ }
+ }
+ if ((reader->input != NULL) && (reader->allocs & XML_TEXTREADER_INPUT)) {
+ xmlFreeParserInputBuffer(reader->input);
+ reader->allocs -= XML_TEXTREADER_INPUT;
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderGetAttributeNo:
+ * @reader: the xmlTextReaderPtr used
+ * @no: the zero-based index of the attribute relative to the containing element
+ *
+ * Provides the value of the attribute with the specified index relative
+ * to the containing element.
+ *
+ * Returns a string containing the value of the specified attribute, or NULL
+ * in case of error. The string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderGetAttributeNo(xmlTextReaderPtr reader, int no) {
+ xmlChar *ret;
+ int i;
+ xmlAttrPtr cur;
+ xmlNsPtr ns;
+
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ if (reader->curnode != NULL)
+ return(NULL);
+ /* TODO: handle the xmlDecl */
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(NULL);
+
+ ns = reader->node->nsDef;
+ for (i = 0;(i < no) && (ns != NULL);i++) {
+ ns = ns->next;
+ }
+ if (ns != NULL)
+ return(xmlStrdup(ns->href));
+
+ cur = reader->node->properties;
+ if (cur == NULL)
+ return(NULL);
+ for (;i < no;i++) {
+ cur = cur->next;
+ if (cur == NULL)
+ return(NULL);
+ }
+ /* TODO walk the DTD if present */
+
+ ret = xmlNodeListGetString(reader->node->doc, cur->children, 1);
+ if (ret == NULL) return(xmlStrdup((xmlChar *)""));
+ return(ret);
+}
+
+/**
+ * xmlTextReaderGetAttribute:
+ * @reader: the xmlTextReaderPtr used
+ * @name: the qualified name of the attribute.
+ *
+ * Provides the value of the attribute with the specified qualified name.
+ *
+ * Returns a string containing the value of the specified attribute, or NULL
+ * in case of error. The string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderGetAttribute(xmlTextReaderPtr reader, const xmlChar *name) {
+ xmlChar *prefix = NULL;
+ xmlChar *localname;
+ xmlNsPtr ns;
+ xmlChar *ret = NULL;
+
+ if ((reader == NULL) || (name == NULL))
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ if (reader->curnode != NULL)
+ return(NULL);
+
+ /* TODO: handle the xmlDecl */
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(NULL);
+
+ localname = xmlSplitQName2(name, &prefix);
+ if (localname == NULL) {
+ /*
+ * Namespace default decl
+ */
+ if (xmlStrEqual(name, BAD_CAST "xmlns")) {
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if (ns->prefix == NULL) {
+ return(xmlStrdup(ns->href));
+ }
+ ns = ns->next;
+ }
+ return NULL;
+ }
+ return(xmlGetNoNsProp(reader->node, name));
+ }
+
+ /*
+ * Namespace default decl
+ */
+ if (xmlStrEqual(prefix, BAD_CAST "xmlns")) {
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localname))) {
+ ret = xmlStrdup(ns->href);
+ break;
+ }
+ ns = ns->next;
+ }
+ } else {
+ ns = xmlSearchNs(reader->node->doc, reader->node, prefix);
+ if (ns != NULL)
+ ret = xmlGetNsProp(reader->node, localname, ns->href);
+ }
+
+ xmlFree(localname);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ return(ret);
+}
+
+
+/**
+ * xmlTextReaderGetAttributeNs:
+ * @reader: the xmlTextReaderPtr used
+ * @localName: the local name of the attribute.
+ * @namespaceURI: the namespace URI of the attribute.
+ *
+ * Provides the value of the specified attribute
+ *
+ * Returns a string containing the value of the specified attribute, or NULL
+ * in case of error. The string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderGetAttributeNs(xmlTextReaderPtr reader, const xmlChar *localName,
+ const xmlChar *namespaceURI) {
+ xmlChar *prefix = NULL;
+ xmlNsPtr ns;
+
+ if ((reader == NULL) || (localName == NULL))
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ if (reader->curnode != NULL)
+ return(NULL);
+
+ /* TODO: handle the xmlDecl */
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(NULL);
+
+ if (xmlStrEqual(namespaceURI, BAD_CAST "http://www.w3.org/2000/xmlns/")) {
+ if (! xmlStrEqual(localName, BAD_CAST "xmlns")) {
+ prefix = BAD_CAST localName;
+ }
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if ((prefix == NULL && ns->prefix == NULL) ||
+ ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localName)))) {
+ return xmlStrdup(ns->href);
+ }
+ ns = ns->next;
+ }
+ return NULL;
+ }
+
+ return(xmlGetNsProp(reader->node, localName, namespaceURI));
+}
+
+/**
+ * xmlTextReaderGetRemainder:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Method to get the remainder of the buffered XML. this method stops the
+ * parser, set its state to End Of File and return the input stream with
+ * what is left that the parser did not use.
+ *
+ * The implementation is not good, the parser certainly procgressed past
+ * what's left in reader->input, and there is an allocation problem. Best
+ * would be to rewrite it differently.
+ *
+ * Returns the xmlParserInputBufferPtr attached to the XML or NULL
+ * in case of error.
+ */
+xmlParserInputBufferPtr
+xmlTextReaderGetRemainder(xmlTextReaderPtr reader) {
+ xmlParserInputBufferPtr ret = NULL;
+
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+
+ reader->node = NULL;
+ reader->curnode = NULL;
+ reader->mode = XML_TEXTREADER_MODE_EOF;
+ if (reader->ctxt != NULL) {
+ xmlStopParser(reader->ctxt);
+ if (reader->ctxt->myDoc != NULL) {
+ if (reader->preserve == 0)
+ xmlTextReaderFreeDoc(reader, reader->ctxt->myDoc);
+ reader->ctxt->myDoc = NULL;
+ }
+ }
+ if (reader->allocs & XML_TEXTREADER_INPUT) {
+ ret = reader->input;
+ reader->input = NULL;
+ reader->allocs -= XML_TEXTREADER_INPUT;
+ } else {
+ /*
+ * Hum, one may need to duplicate the data structure because
+ * without reference counting the input may be freed twice:
+ * - by the layer which allocated it.
+ * - by the layer to which would have been returned to.
+ */
+ TODO
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlTextReaderLookupNamespace:
+ * @reader: the xmlTextReaderPtr used
+ * @prefix: the prefix whose namespace URI is to be resolved. To return
+ * the default namespace, specify NULL
+ *
+ * Resolves a namespace prefix in the scope of the current element.
+ *
+ * Returns a string containing the namespace URI to which the prefix maps
+ * or NULL in case of error. The string must be deallocated by the caller.
+ */
+xmlChar *
+xmlTextReaderLookupNamespace(xmlTextReaderPtr reader, const xmlChar *prefix) {
+ xmlNsPtr ns;
+
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+
+ ns = xmlSearchNs(reader->node->doc, reader->node, prefix);
+ if (ns == NULL)
+ return(NULL);
+ return(xmlStrdup(ns->href));
+}
+
+/**
+ * xmlTextReaderMoveToAttributeNo:
+ * @reader: the xmlTextReaderPtr used
+ * @no: the zero-based index of the attribute relative to the containing
+ * element.
+ *
+ * Moves the position of the current instance to the attribute with
+ * the specified index relative to the containing element.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not found
+ */
+int
+xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, int no) {
+ int i;
+ xmlAttrPtr cur;
+ xmlNsPtr ns;
+
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ /* TODO: handle the xmlDecl */
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(-1);
+
+ reader->curnode = NULL;
+
+ ns = reader->node->nsDef;
+ for (i = 0;(i < no) && (ns != NULL);i++) {
+ ns = ns->next;
+ }
+ if (ns != NULL) {
+ reader->curnode = (xmlNodePtr) ns;
+ return(1);
+ }
+
+ cur = reader->node->properties;
+ if (cur == NULL)
+ return(0);
+ for (;i < no;i++) {
+ cur = cur->next;
+ if (cur == NULL)
+ return(0);
+ }
+ /* TODO walk the DTD if present */
+
+ reader->curnode = (xmlNodePtr) cur;
+ return(1);
+}
+
+/**
+ * xmlTextReaderMoveToAttribute:
+ * @reader: the xmlTextReaderPtr used
+ * @name: the qualified name of the attribute.
+ *
+ * Moves the position of the current instance to the attribute with
+ * the specified qualified name.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not found
+ */
+int
+xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader, const xmlChar *name) {
+ xmlChar *prefix = NULL;
+ xmlChar *localname;
+ xmlNsPtr ns;
+ xmlAttrPtr prop;
+
+ if ((reader == NULL) || (name == NULL))
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+
+ /* TODO: handle the xmlDecl */
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+
+ localname = xmlSplitQName2(name, &prefix);
+ if (localname == NULL) {
+ /*
+ * Namespace default decl
+ */
+ if (xmlStrEqual(name, BAD_CAST "xmlns")) {
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if (ns->prefix == NULL) {
+ reader->curnode = (xmlNodePtr) ns;
+ return(1);
+ }
+ ns = ns->next;
+ }
+ return(0);
+ }
+
+ prop = reader->node->properties;
+ while (prop != NULL) {
+ /*
+ * One need to have
+ * - same attribute names
+ * - and the attribute carrying that namespace
+ */
+ if ((xmlStrEqual(prop->name, name)) &&
+ ((prop->ns == NULL) || (prop->ns->prefix == NULL))) {
+ reader->curnode = (xmlNodePtr) prop;
+ return(1);
+ }
+ prop = prop->next;
+ }
+ return(0);
+ }
+
+ /*
+ * Namespace default decl
+ */
+ if (xmlStrEqual(prefix, BAD_CAST "xmlns")) {
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localname))) {
+ reader->curnode = (xmlNodePtr) ns;
+ goto found;
+ }
+ ns = ns->next;
+ }
+ goto not_found;
+ }
+ prop = reader->node->properties;
+ while (prop != NULL) {
+ /*
+ * One need to have
+ * - same attribute names
+ * - and the attribute carrying that namespace
+ */
+ if ((xmlStrEqual(prop->name, localname)) &&
+ (prop->ns != NULL) && (xmlStrEqual(prop->ns->prefix, prefix))) {
+ reader->curnode = (xmlNodePtr) prop;
+ goto found;
+ }
+ prop = prop->next;
+ }
+not_found:
+ if (localname != NULL)
+ xmlFree(localname);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ return(0);
+
+found:
+ if (localname != NULL)
+ xmlFree(localname);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ return(1);
+}
+
+/**
+ * xmlTextReaderMoveToAttributeNs:
+ * @reader: the xmlTextReaderPtr used
+ * @localName: the local name of the attribute.
+ * @namespaceURI: the namespace URI of the attribute.
+ *
+ * Moves the position of the current instance to the attribute with the
+ * specified local name and namespace URI.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not found
+ */
+int
+xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
+ const xmlChar *localName, const xmlChar *namespaceURI) {
+ xmlAttrPtr prop;
+ xmlNodePtr node;
+ xmlNsPtr ns;
+ xmlChar *prefix = NULL;
+
+ if ((reader == NULL) || (localName == NULL) || (namespaceURI == NULL))
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+ node = reader->node;
+
+ if (xmlStrEqual(namespaceURI, BAD_CAST "http://www.w3.org/2000/xmlns/")) {
+ if (! xmlStrEqual(localName, BAD_CAST "xmlns")) {
+ prefix = BAD_CAST localName;
+ }
+ ns = reader->node->nsDef;
+ while (ns != NULL) {
+ if ((prefix == NULL && ns->prefix == NULL) ||
+ ((ns->prefix != NULL) && (xmlStrEqual(ns->prefix, localName)))) {
+ reader->curnode = (xmlNodePtr) ns;
+ return(1);
+ }
+ ns = ns->next;
+ }
+ return(0);
+ }
+
+ prop = node->properties;
+ while (prop != NULL) {
+ /*
+ * One need to have
+ * - same attribute names
+ * - and the attribute carrying that namespace
+ */
+ if (xmlStrEqual(prop->name, localName) &&
+ ((prop->ns != NULL) &&
+ (xmlStrEqual(prop->ns->href, namespaceURI)))) {
+ reader->curnode = (xmlNodePtr) prop;
+ return(1);
+ }
+ prop = prop->next;
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderMoveToFirstAttribute:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Moves the position of the current instance to the first attribute
+ * associated with the current node.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not found
+ */
+int
+xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+
+ if (reader->node->nsDef != NULL) {
+ reader->curnode = (xmlNodePtr) reader->node->nsDef;
+ return(1);
+ }
+ if (reader->node->properties != NULL) {
+ reader->curnode = (xmlNodePtr) reader->node->properties;
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderMoveToNextAttribute:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Moves the position of the current instance to the next attribute
+ * associated with the current node.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not found
+ */
+int
+xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+ if (reader->curnode == NULL)
+ return(xmlTextReaderMoveToFirstAttribute(reader));
+
+ if (reader->curnode->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) reader->curnode;
+ if (ns->next != NULL) {
+ reader->curnode = (xmlNodePtr) ns->next;
+ return(1);
+ }
+ if (reader->node->properties != NULL) {
+ reader->curnode = (xmlNodePtr) reader->node->properties;
+ return(1);
+ }
+ return(0);
+ } else if ((reader->curnode->type == XML_ATTRIBUTE_NODE) &&
+ (reader->curnode->next != NULL)) {
+ reader->curnode = reader->curnode->next;
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderMoveToElement:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Moves the position of the current instance to the node that
+ * contains the current Attribute node.
+ *
+ * Returns 1 in case of success, -1 in case of error, 0 if not moved
+ */
+int
+xmlTextReaderMoveToElement(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+ if (reader->curnode != NULL) {
+ reader->curnode = NULL;
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderReadAttributeValue:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Parses an attribute value into one or more Text and EntityReference nodes.
+ *
+ * Returns 1 in case of success, 0 if the reader was not positionned on an
+ * ttribute node or all the attribute values have been read, or -1
+ * in case of error.
+ */
+int
+xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->curnode == NULL)
+ return(0);
+ if (reader->curnode->type == XML_ATTRIBUTE_NODE) {
+ if (reader->curnode->children == NULL)
+ return(0);
+ reader->curnode = reader->curnode->children;
+ } else if (reader->curnode->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) reader->curnode;
+
+ if (reader->faketext == NULL) {
+ reader->faketext = xmlNewDocText(reader->node->doc,
+ ns->href);
+ } else {
+ if ((reader->faketext->content != NULL) &&
+ (reader->faketext->content !=
+ (xmlChar *) &(reader->faketext->properties)))
+ xmlFree(reader->faketext->content);
+ reader->faketext->content = xmlStrdup(ns->href);
+ }
+ reader->curnode = reader->faketext;
+ } else {
+ if (reader->curnode->next == NULL)
+ return(0);
+ reader->curnode = reader->curnode->next;
+ }
+ return(1);
+}
+
+/**
+ * xmlTextReaderConstEncoding:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Determine the encoding of the document being read.
+ *
+ * Returns a string containing the encoding of the document or NULL in
+ * case of error. The string is deallocated with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstEncoding(xmlTextReaderPtr reader) {
+ xmlDocPtr doc = NULL;
+ if (reader == NULL)
+ return(NULL);
+ if (reader->doc != NULL)
+ doc = reader->doc;
+ else if (reader->ctxt != NULL)
+ doc = reader->ctxt->myDoc;
+ if (doc == NULL)
+ return(NULL);
+
+ if (doc->encoding == NULL)
+ return(NULL);
+ else
+ return(CONSTSTR(doc->encoding));
+}
+
+
+/************************************************************************
+ * *
+ * Acces API to the current node *
+ * *
+ ************************************************************************/
+/**
+ * xmlTextReaderAttributeCount:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Provides the number of attributes of the current node
+ *
+ * Returns 0 i no attributes, -1 in case of error or the attribute count
+ */
+int
+xmlTextReaderAttributeCount(xmlTextReaderPtr reader) {
+ int ret;
+ xmlAttrPtr attr;
+ xmlNsPtr ns;
+ xmlNodePtr node;
+
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(0);
+
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ if (node->type != XML_ELEMENT_NODE)
+ return(0);
+ if ((reader->state == XML_TEXTREADER_END) ||
+ (reader->state == XML_TEXTREADER_BACKTRACK))
+ return(0);
+ ret = 0;
+ attr = node->properties;
+ while (attr != NULL) {
+ ret++;
+ attr = attr->next;
+ }
+ ns = node->nsDef;
+ while (ns != NULL) {
+ ret++;
+ ns = ns->next;
+ }
+ return(ret);
+}
+
+/**
+ * xmlTextReaderNodeType:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Get the node type of the current node
+ * Reference:
+ * http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html
+ *
+ * Returns the xmlNodeType of the current node or -1 in case of error
+ */
+int
+xmlTextReaderNodeType(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(XML_READER_TYPE_NONE);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ if ((reader->state == XML_TEXTREADER_END) ||
+ (reader->state == XML_TEXTREADER_BACKTRACK))
+ return(XML_READER_TYPE_END_ELEMENT);
+ return(XML_READER_TYPE_ELEMENT);
+ case XML_NAMESPACE_DECL:
+ case XML_ATTRIBUTE_NODE:
+ return(XML_READER_TYPE_ATTRIBUTE);
+ case XML_TEXT_NODE:
+ if (xmlIsBlankNode(reader->node)) {
+ if (xmlNodeGetSpacePreserve(reader->node))
+ return(XML_READER_TYPE_SIGNIFICANT_WHITESPACE);
+ else
+ return(XML_READER_TYPE_WHITESPACE);
+ } else {
+ return(XML_READER_TYPE_TEXT);
+ }
+ case XML_CDATA_SECTION_NODE:
+ return(XML_READER_TYPE_CDATA);
+ case XML_ENTITY_REF_NODE:
+ return(XML_READER_TYPE_ENTITY_REFERENCE);
+ case XML_ENTITY_NODE:
+ return(XML_READER_TYPE_ENTITY);
+ case XML_PI_NODE:
+ return(XML_READER_TYPE_PROCESSING_INSTRUCTION);
+ case XML_COMMENT_NODE:
+ return(XML_READER_TYPE_COMMENT);
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(XML_READER_TYPE_DOCUMENT);
+ case XML_DOCUMENT_FRAG_NODE:
+ return(XML_READER_TYPE_DOCUMENT_FRAGMENT);
+ case XML_NOTATION_NODE:
+ return(XML_READER_TYPE_NOTATION);
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DTD_NODE:
+ return(XML_READER_TYPE_DOCUMENT_TYPE);
+
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return(XML_READER_TYPE_NONE);
+ }
+ return(-1);
+}
+
+/**
+ * xmlTextReaderIsEmptyElement:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Check if the current node is empty
+ *
+ * Returns 1 if empty, 0 if not and -1 in case of error
+ */
+int
+xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader) {
+ if ((reader == NULL) || (reader->node == NULL))
+ return(-1);
+ if (reader->node->type != XML_ELEMENT_NODE)
+ return(0);
+ if (reader->curnode != NULL)
+ return(0);
+ if (reader->node->children != NULL)
+ return(0);
+ if (reader->state == XML_TEXTREADER_END)
+ return(0);
+ if (reader->doc != NULL)
+ return(1);
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (reader->in_xinclude > 0)
+ return(1);
+#endif
+ return((reader->node->extra & NODE_IS_EMPTY) != 0);
+}
+
+/**
+ * xmlTextReaderLocalName:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The local name of the node.
+ *
+ * Returns the local name or NULL if not available,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderLocalName(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) node;
+ if (ns->prefix == NULL)
+ return(xmlStrdup(BAD_CAST "xmlns"));
+ else
+ return(xmlStrdup(ns->prefix));
+ }
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(xmlTextReaderName(reader));
+ return(xmlStrdup(node->name));
+}
+
+/**
+ * xmlTextReaderConstLocalName:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The local name of the node.
+ *
+ * Returns the local name or NULL if not available, the
+ * string will be deallocated with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstLocalName(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) node;
+ if (ns->prefix == NULL)
+ return(CONSTSTR(BAD_CAST "xmlns"));
+ else
+ return(ns->prefix);
+ }
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(xmlTextReaderConstName(reader));
+ return(node->name);
+}
+
+/**
+ * xmlTextReaderName:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The qualified name of the node, equal to Prefix :LocalName.
+ *
+ * Returns the local name or NULL if not available,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderName(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ xmlChar *ret;
+
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if ((node->ns == NULL) ||
+ (node->ns->prefix == NULL))
+ return(xmlStrdup(node->name));
+
+ ret = xmlStrdup(node->ns->prefix);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, node->name);
+ return(ret);
+ case XML_TEXT_NODE:
+ return(xmlStrdup(BAD_CAST "#text"));
+ case XML_CDATA_SECTION_NODE:
+ return(xmlStrdup(BAD_CAST "#cdata-section"));
+ case XML_ENTITY_NODE:
+ case XML_ENTITY_REF_NODE:
+ return(xmlStrdup(node->name));
+ case XML_PI_NODE:
+ return(xmlStrdup(node->name));
+ case XML_COMMENT_NODE:
+ return(xmlStrdup(BAD_CAST "#comment"));
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(xmlStrdup(BAD_CAST "#document"));
+ case XML_DOCUMENT_FRAG_NODE:
+ return(xmlStrdup(BAD_CAST "#document-fragment"));
+ case XML_NOTATION_NODE:
+ return(xmlStrdup(node->name));
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DTD_NODE:
+ return(xmlStrdup(node->name));
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) node;
+
+ ret = xmlStrdup(BAD_CAST "xmlns");
+ if (ns->prefix == NULL)
+ return(ret);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, ns->prefix);
+ return(ret);
+ }
+
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return(NULL);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderConstName:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The qualified name of the node, equal to Prefix :LocalName.
+ *
+ * Returns the local name or NULL if not available, the string is
+ * deallocated with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstName(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if ((node->ns == NULL) ||
+ (node->ns->prefix == NULL))
+ return(node->name);
+ return(CONSTQSTR(node->ns->prefix, node->name));
+ case XML_TEXT_NODE:
+ return(CONSTSTR(BAD_CAST "#text"));
+ case XML_CDATA_SECTION_NODE:
+ return(CONSTSTR(BAD_CAST "#cdata-section"));
+ case XML_ENTITY_NODE:
+ case XML_ENTITY_REF_NODE:
+ return(CONSTSTR(node->name));
+ case XML_PI_NODE:
+ return(CONSTSTR(node->name));
+ case XML_COMMENT_NODE:
+ return(CONSTSTR(BAD_CAST "#comment"));
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(CONSTSTR(BAD_CAST "#document"));
+ case XML_DOCUMENT_FRAG_NODE:
+ return(CONSTSTR(BAD_CAST "#document-fragment"));
+ case XML_NOTATION_NODE:
+ return(CONSTSTR(node->name));
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DTD_NODE:
+ return(CONSTSTR(node->name));
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) node;
+
+ if (ns->prefix == NULL)
+ return(CONSTSTR(BAD_CAST "xmlns"));
+ return(CONSTQSTR(BAD_CAST "xmlns", ns->prefix));
+ }
+
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return(NULL);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderPrefix:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * A shorthand reference to the namespace associated with the node.
+ *
+ * Returns the prefix or NULL if not available,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderPrefix(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) node;
+ if (ns->prefix == NULL)
+ return(NULL);
+ return(xmlStrdup(BAD_CAST "xmlns"));
+ }
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(NULL);
+ if ((node->ns != NULL) && (node->ns->prefix != NULL))
+ return(xmlStrdup(node->ns->prefix));
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderConstPrefix:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * A shorthand reference to the namespace associated with the node.
+ *
+ * Returns the prefix or NULL if not available, the string is deallocated
+ * with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstPrefix(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) node;
+ if (ns->prefix == NULL)
+ return(NULL);
+ return(CONSTSTR(BAD_CAST "xmlns"));
+ }
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(NULL);
+ if ((node->ns != NULL) && (node->ns->prefix != NULL))
+ return(CONSTSTR(node->ns->prefix));
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderNamespaceUri:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The URI defining the namespace associated with the node.
+ *
+ * Returns the namespace URI or NULL if not available,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderNamespaceUri(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL)
+ return(xmlStrdup(BAD_CAST "http://www.w3.org/2000/xmlns/"));
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(NULL);
+ if (node->ns != NULL)
+ return(xmlStrdup(node->ns->href));
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderConstNamespaceUri:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The URI defining the namespace associated with the node.
+ *
+ * Returns the namespace URI or NULL if not available, the string
+ * will be deallocated with the reader
+ */
+const xmlChar *
+xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+ if (node->type == XML_NAMESPACE_DECL)
+ return(CONSTSTR(BAD_CAST "http://www.w3.org/2000/xmlns/"));
+ if ((node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ return(NULL);
+ if (node->ns != NULL)
+ return(CONSTSTR(node->ns->href));
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderBaseUri:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The base URI of the node.
+ *
+ * Returns the base URI or NULL if not available,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderBaseUri(xmlTextReaderPtr reader) {
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ return(xmlNodeGetBase(NULL, reader->node));
+}
+
+/**
+ * xmlTextReaderConstBaseUri:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The base URI of the node.
+ *
+ * Returns the base URI or NULL if not available, the string
+ * will be deallocated with the reader
+ */
+const xmlChar *
+xmlTextReaderConstBaseUri(xmlTextReaderPtr reader) {
+ xmlChar *tmp;
+ const xmlChar *ret;
+
+ if ((reader == NULL) || (reader->node == NULL))
+ return(NULL);
+ tmp = xmlNodeGetBase(NULL, reader->node);
+ if (tmp == NULL)
+ return(NULL);
+ ret = CONSTSTR(tmp);
+ xmlFree(tmp);
+ return(ret);
+}
+
+/**
+ * xmlTextReaderDepth:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The depth of the node in the tree.
+ *
+ * Returns the depth or -1 in case of error
+ */
+int
+xmlTextReaderDepth(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(0);
+
+ if (reader->curnode != NULL) {
+ if ((reader->curnode->type == XML_ATTRIBUTE_NODE) ||
+ (reader->curnode->type == XML_NAMESPACE_DECL))
+ return(reader->depth + 1);
+ return(reader->depth + 2);
+ }
+ return(reader->depth);
+}
+
+/**
+ * xmlTextReaderHasAttributes:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Whether the node has attributes.
+ *
+ * Returns 1 if true, 0 if false, and -1 in case or error
+ */
+int
+xmlTextReaderHasAttributes(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(0);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ if ((node->type == XML_ELEMENT_NODE) &&
+ ((node->properties != NULL) || (node->nsDef != NULL)))
+ return(1);
+ /* TODO: handle the xmlDecl */
+ return(0);
+}
+
+/**
+ * xmlTextReaderHasValue:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Whether the node can have a text value.
+ *
+ * Returns 1 if true, 0 if false, and -1 in case or error
+ */
+int
+xmlTextReaderHasValue(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(0);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ switch (node->type) {
+ case XML_ATTRIBUTE_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NAMESPACE_DECL:
+ return(1);
+ default:
+ break;
+ }
+ return(0);
+}
+
+/**
+ * xmlTextReaderValue:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Provides the text value of the node if present
+ *
+ * Returns the string or NULL if not available. The result must be deallocated
+ * with xmlFree()
+ */
+xmlChar *
+xmlTextReaderValue(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ switch (node->type) {
+ case XML_NAMESPACE_DECL:
+ return(xmlStrdup(((xmlNsPtr) node)->href));
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ if (attr->parent != NULL)
+ return (xmlNodeListGetString
+ (attr->parent->doc, attr->children, 1));
+ else
+ return (xmlNodeListGetString(NULL, attr->children, 1));
+ break;
+ }
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ if (node->content != NULL)
+ return (xmlStrdup(node->content));
+ default:
+ break;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderConstValue:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Provides the text value of the node if present
+ *
+ * Returns the string or NULL if not available. The result will be
+ * deallocated on the next Read() operation.
+ */
+const xmlChar *
+xmlTextReaderConstValue(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ switch (node->type) {
+ case XML_NAMESPACE_DECL:
+ return(((xmlNsPtr) node)->href);
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ if ((attr->children != NULL) &&
+ (attr->children->type == XML_TEXT_NODE) &&
+ (attr->children->next == NULL))
+ return(attr->children->content);
+ else {
+ if (reader->buffer == NULL) {
+ reader->buffer = xmlBufCreateSize(100);
+ if (reader->buffer == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlTextReaderSetup : malloc failed\n");
+ return (NULL);
+ }
+ } else
+ xmlBufEmpty(reader->buffer);
+ xmlBufGetNodeContent(reader->buffer, node);
+ return(xmlBufContent(reader->buffer));
+ }
+ break;
+ }
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ return(node->content);
+ default:
+ break;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlTextReaderIsDefault:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Whether an Attribute node was generated from the default value
+ * defined in the DTD or schema.
+ *
+ * Returns 0 if not defaulted, 1 if defaulted, and -1 in case of error
+ */
+int
+xmlTextReaderIsDefault(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlTextReaderQuoteChar:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The quotation mark character used to enclose the value of an attribute.
+ *
+ * Returns " or ' and -1 in case of error
+ */
+int
+xmlTextReaderQuoteChar(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ /* TODO maybe lookup the attribute value for " first */
+ return((int) '"');
+}
+
+/**
+ * xmlTextReaderXmlLang:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The xml:lang scope within which the node resides.
+ *
+ * Returns the xml:lang value or NULL if none exists.,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderXmlLang(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ return(xmlNodeGetLang(reader->node));
+}
+
+/**
+ * xmlTextReaderConstXmlLang:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The xml:lang scope within which the node resides.
+ *
+ * Returns the xml:lang value or NULL if none exists.
+ */
+const xmlChar *
+xmlTextReaderConstXmlLang(xmlTextReaderPtr reader) {
+ xmlChar *tmp;
+ const xmlChar *ret;
+
+ if (reader == NULL)
+ return(NULL);
+ if (reader->node == NULL)
+ return(NULL);
+ tmp = xmlNodeGetLang(reader->node);
+ if (tmp == NULL)
+ return(NULL);
+ ret = CONSTSTR(tmp);
+ xmlFree(tmp);
+ return(ret);
+}
+
+/**
+ * xmlTextReaderConstString:
+ * @reader: the xmlTextReaderPtr used
+ * @str: the string to intern.
+ *
+ * Get an interned string from the reader, allows for example to
+ * speedup string name comparisons
+ *
+ * Returns an interned copy of the string or NULL in case of error. The
+ * string will be deallocated with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstString(xmlTextReaderPtr reader, const xmlChar *str) {
+ if (reader == NULL)
+ return(NULL);
+ return(CONSTSTR(str));
+}
+
+/**
+ * xmlTextReaderNormalization:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * The value indicating whether to normalize white space and attribute values.
+ * Since attribute value and end of line normalizations are a MUST in the XML
+ * specification only the value true is accepted. The broken bahaviour of
+ * accepting out of range character entities like &#0; is of course not
+ * supported either.
+ *
+ * Returns 1 or -1 in case of error.
+ */
+int
+xmlTextReaderNormalization(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(-1);
+ return(1);
+}
+
+/************************************************************************
+ * *
+ * Extensions to the base APIs *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlTextReaderSetParserProp:
+ * @reader: the xmlTextReaderPtr used
+ * @prop: the xmlParserProperties to set
+ * @value: usually 0 or 1 to (de)activate it
+ *
+ * Change the parser processing behaviour by changing some of its internal
+ * properties. Note that some properties can only be changed before any
+ * read has been done.
+ *
+ * Returns 0 if the call was successful, or -1 in case of error
+ */
+int
+xmlTextReaderSetParserProp(xmlTextReaderPtr reader, int prop, int value) {
+ xmlParserProperties p = (xmlParserProperties) prop;
+ xmlParserCtxtPtr ctxt;
+
+ if ((reader == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ ctxt = reader->ctxt;
+
+ switch (p) {
+ case XML_PARSER_LOADDTD:
+ if (value != 0) {
+ if (ctxt->loadsubset == 0) {
+ if (reader->mode != XML_TEXTREADER_MODE_INITIAL)
+ return(-1);
+ ctxt->loadsubset = XML_DETECT_IDS;
+ }
+ } else {
+ ctxt->loadsubset = 0;
+ }
+ return(0);
+ case XML_PARSER_DEFAULTATTRS:
+ if (value != 0) {
+ ctxt->loadsubset |= XML_COMPLETE_ATTRS;
+ } else {
+ if (ctxt->loadsubset & XML_COMPLETE_ATTRS)
+ ctxt->loadsubset -= XML_COMPLETE_ATTRS;
+ }
+ return(0);
+ case XML_PARSER_VALIDATE:
+ if (value != 0) {
+ ctxt->validate = 1;
+ reader->validate = XML_TEXTREADER_VALIDATE_DTD;
+ } else {
+ ctxt->validate = 0;
+ }
+ return(0);
+ case XML_PARSER_SUBST_ENTITIES:
+ if (value != 0) {
+ ctxt->replaceEntities = 1;
+ } else {
+ ctxt->replaceEntities = 0;
+ }
+ return(0);
+ }
+ return(-1);
+}
+
+/**
+ * xmlTextReaderGetParserProp:
+ * @reader: the xmlTextReaderPtr used
+ * @prop: the xmlParserProperties to get
+ *
+ * Read the parser internal property.
+ *
+ * Returns the value, usually 0 or 1, or -1 in case of error.
+ */
+int
+xmlTextReaderGetParserProp(xmlTextReaderPtr reader, int prop) {
+ xmlParserProperties p = (xmlParserProperties) prop;
+ xmlParserCtxtPtr ctxt;
+
+ if ((reader == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ ctxt = reader->ctxt;
+
+ switch (p) {
+ case XML_PARSER_LOADDTD:
+ if ((ctxt->loadsubset != 0) || (ctxt->validate != 0))
+ return(1);
+ return(0);
+ case XML_PARSER_DEFAULTATTRS:
+ if (ctxt->loadsubset & XML_COMPLETE_ATTRS)
+ return(1);
+ return(0);
+ case XML_PARSER_VALIDATE:
+ return(reader->validate);
+ case XML_PARSER_SUBST_ENTITIES:
+ return(ctxt->replaceEntities);
+ }
+ return(-1);
+}
+
+
+/**
+ * xmlTextReaderGetParserLineNumber:
+ * @reader: the user data (XML reader context)
+ *
+ * Provide the line number of the current parsing point.
+ *
+ * Returns an int or 0 if not available
+ */
+int
+xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader)
+{
+ if ((reader == NULL) || (reader->ctxt == NULL) ||
+ (reader->ctxt->input == NULL)) {
+ return (0);
+ }
+ return (reader->ctxt->input->line);
+}
+
+/**
+ * xmlTextReaderGetParserColumnNumber:
+ * @reader: the user data (XML reader context)
+ *
+ * Provide the column number of the current parsing point.
+ *
+ * Returns an int or 0 if not available
+ */
+int
+xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader)
+{
+ if ((reader == NULL) || (reader->ctxt == NULL) ||
+ (reader->ctxt->input == NULL)) {
+ return (0);
+ }
+ return (reader->ctxt->input->col);
+}
+
+/**
+ * xmlTextReaderCurrentNode:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Hacking interface allowing to get the xmlNodePtr correponding to the
+ * current node being accessed by the xmlTextReader. This is dangerous
+ * because the underlying node may be destroyed on the next Reads.
+ *
+ * Returns the xmlNodePtr or NULL in case of error.
+ */
+xmlNodePtr
+xmlTextReaderCurrentNode(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(NULL);
+
+ if (reader->curnode != NULL)
+ return(reader->curnode);
+ return(reader->node);
+}
+
+/**
+ * xmlTextReaderPreserve:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * This tells the XML Reader to preserve the current node.
+ * The caller must also use xmlTextReaderCurrentDoc() to
+ * keep an handle on the resulting document once parsing has finished
+ *
+ * Returns the xmlNodePtr or NULL in case of error.
+ */
+xmlNodePtr
+xmlTextReaderPreserve(xmlTextReaderPtr reader) {
+ xmlNodePtr cur, parent;
+
+ if (reader == NULL)
+ return(NULL);
+
+ if (reader->curnode != NULL)
+ cur = reader->curnode;
+ else
+ cur = reader->node;
+ if (cur == NULL)
+ return(NULL);
+
+ if ((cur->type != XML_DOCUMENT_NODE) && (cur->type != XML_DTD_NODE)) {
+ cur->extra |= NODE_IS_PRESERVED;
+ cur->extra |= NODE_IS_SPRESERVED;
+ }
+ reader->preserves++;
+
+ parent = cur->parent;;
+ while (parent != NULL) {
+ if (parent->type == XML_ELEMENT_NODE)
+ parent->extra |= NODE_IS_PRESERVED;
+ parent = parent->parent;
+ }
+ return(cur);
+}
+
+#ifdef LIBXML_PATTERN_ENABLED
+/**
+ * xmlTextReaderPreservePattern:
+ * @reader: the xmlTextReaderPtr used
+ * @pattern: an XPath subset pattern
+ * @namespaces: the prefix definitions, array of [URI, prefix] or NULL
+ *
+ * This tells the XML Reader to preserve all nodes matched by the
+ * pattern. The caller must also use xmlTextReaderCurrentDoc() to
+ * keep an handle on the resulting document once parsing has finished
+ *
+ * Returns a positive number in case of success and -1 in case of error
+ */
+int
+xmlTextReaderPreservePattern(xmlTextReaderPtr reader, const xmlChar *pattern,
+ const xmlChar **namespaces)
+{
+ xmlPatternPtr comp;
+
+ if ((reader == NULL) || (pattern == NULL))
+ return(-1);
+
+ comp = xmlPatterncompile(pattern, reader->dict, 0, namespaces);
+ if (comp == NULL)
+ return(-1);
+
+ if (reader->patternMax <= 0) {
+ reader->patternMax = 4;
+ reader->patternTab = (xmlPatternPtr *) xmlMalloc(reader->patternMax *
+ sizeof(reader->patternTab[0]));
+ if (reader->patternTab == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "xmlMalloc failed !\n");
+ return (-1);
+ }
+ }
+ if (reader->patternNr >= reader->patternMax) {
+ xmlPatternPtr *tmp;
+ reader->patternMax *= 2;
+ tmp = (xmlPatternPtr *) xmlRealloc(reader->patternTab,
+ reader->patternMax *
+ sizeof(reader->patternTab[0]));
+ if (tmp == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "xmlRealloc failed !\n");
+ reader->patternMax /= 2;
+ return (-1);
+ }
+ reader->patternTab = tmp;
+ }
+ reader->patternTab[reader->patternNr] = comp;
+ return(reader->patternNr++);
+}
+#endif
+
+/**
+ * xmlTextReaderCurrentDoc:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Hacking interface allowing to get the xmlDocPtr correponding to the
+ * current document being accessed by the xmlTextReader.
+ * NOTE: as a result of this call, the reader will not destroy the
+ * associated XML document and calling xmlFreeDoc() on the result
+ * is needed once the reader parsing has finished.
+ *
+ * Returns the xmlDocPtr or NULL in case of error.
+ */
+xmlDocPtr
+xmlTextReaderCurrentDoc(xmlTextReaderPtr reader) {
+ if (reader == NULL)
+ return(NULL);
+ if (reader->doc != NULL)
+ return(reader->doc);
+ if ((reader->ctxt == NULL) || (reader->ctxt->myDoc == NULL))
+ return(NULL);
+
+ reader->preserve = 1;
+ return(reader->ctxt->myDoc);
+}
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+static char *xmlTextReaderBuildMessage(const char *msg, va_list ap);
+
+static void XMLCDECL
+xmlTextReaderValidityError(void *ctxt, const char *msg, ...);
+
+static void XMLCDECL
+xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...);
+
+static void XMLCDECL
+xmlTextReaderValidityErrorRelay(void *ctx, const char *msg, ...)
+{
+ xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
+
+ char *str;
+
+ va_list ap;
+
+ va_start(ap, msg);
+ str = xmlTextReaderBuildMessage(msg, ap);
+ if (!reader->errorFunc) {
+ xmlTextReaderValidityError(ctx, "%s", str);
+ } else {
+ reader->errorFunc(reader->errorFuncArg, str,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR,
+ NULL /* locator */ );
+ }
+ if (str != NULL)
+ xmlFree(str);
+ va_end(ap);
+}
+
+static void XMLCDECL
+xmlTextReaderValidityWarningRelay(void *ctx, const char *msg, ...)
+{
+ xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx;
+
+ char *str;
+
+ va_list ap;
+
+ va_start(ap, msg);
+ str = xmlTextReaderBuildMessage(msg, ap);
+ if (!reader->errorFunc) {
+ xmlTextReaderValidityWarning(ctx, "%s", str);
+ } else {
+ reader->errorFunc(reader->errorFuncArg, str,
+ XML_PARSER_SEVERITY_VALIDITY_WARNING,
+ NULL /* locator */ );
+ }
+ if (str != NULL)
+ xmlFree(str);
+ va_end(ap);
+}
+
+static void
+ xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error);
+
+static void
+xmlTextReaderValidityStructuredRelay(void *userData, xmlErrorPtr error)
+{
+ xmlTextReaderPtr reader = (xmlTextReaderPtr) userData;
+
+ if (reader->sErrorFunc) {
+ reader->sErrorFunc(reader->errorFuncArg, error);
+ } else {
+ xmlTextReaderStructuredError(reader, error);
+ }
+}
+/**
+ * xmlTextReaderRelaxNGSetSchema:
+ * @reader: the xmlTextReaderPtr used
+ * @schema: a precompiled RelaxNG schema
+ *
+ * Use RelaxNG to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * if @schema is NULL, then RelaxNG validation is desactivated.
+ @ The @schema should not be freed until the reader is deallocated
+ * or its use has been deactivated.
+ *
+ * Returns 0 in case the RelaxNG validation could be (des)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader, xmlRelaxNGPtr schema) {
+ if (reader == NULL)
+ return(-1);
+ if (schema == NULL) {
+ if (reader->rngSchemas != NULL) {
+ xmlRelaxNGFree(reader->rngSchemas);
+ reader->rngSchemas = NULL;
+ }
+ if (reader->rngValidCtxt != NULL) {
+ if (! reader->rngPreserveCtxt)
+ xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt);
+ reader->rngValidCtxt = NULL;
+ }
+ reader->rngPreserveCtxt = 0;
+ return(0);
+ }
+ if (reader->mode != XML_TEXTREADER_MODE_INITIAL)
+ return(-1);
+ if (reader->rngSchemas != NULL) {
+ xmlRelaxNGFree(reader->rngSchemas);
+ reader->rngSchemas = NULL;
+ }
+ if (reader->rngValidCtxt != NULL) {
+ if (! reader->rngPreserveCtxt)
+ xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt);
+ reader->rngValidCtxt = NULL;
+ }
+ reader->rngPreserveCtxt = 0;
+ reader->rngValidCtxt = xmlRelaxNGNewValidCtxt(schema);
+ if (reader->rngValidCtxt == NULL)
+ return(-1);
+ if (reader->errorFunc != NULL) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ if (reader->sErrorFunc != NULL) {
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ reader->rngValidErrors = 0;
+ reader->rngFullNode = NULL;
+ reader->validate = XML_TEXTREADER_VALIDATE_RNG;
+ return(0);
+}
+
+/**
+ * xmlTextReaderLocator:
+ * @ctx: the xmlTextReaderPtr used
+ * @file: returned file information
+ * @line: returned line information
+ *
+ * Internal locator function for the readers
+ *
+ * Returns 0 in case the Schema validation could be (des)activated and
+ * -1 in case of error.
+ */
+static int
+xmlTextReaderLocator(void *ctx, const char **file, unsigned long *line) {
+ xmlTextReaderPtr reader;
+
+ if ((ctx == NULL) || ((file == NULL) && (line == NULL)))
+ return(-1);
+
+ if (file != NULL)
+ *file = NULL;
+ if (line != NULL)
+ *line = 0;
+
+ reader = (xmlTextReaderPtr) ctx;
+ if ((reader->ctxt != NULL) && (reader->ctxt->input != NULL)) {
+ if (file != NULL)
+ *file = reader->ctxt->input->filename;
+ if (line != NULL)
+ *line = reader->ctxt->input->line;
+ return(0);
+ }
+ if (reader->node != NULL) {
+ long res;
+ int ret = 0;
+
+ if (line != NULL) {
+ res = xmlGetLineNo(reader->node);
+ if (res > 0)
+ *line = (unsigned long) res;
+ else
+ ret = -1;
+ }
+ if (file != NULL) {
+ xmlDocPtr doc = reader->node->doc;
+ if ((doc != NULL) && (doc->URL != NULL))
+ *file = (const char *) doc->URL;
+ else
+ ret = -1;
+ }
+ return(ret);
+ }
+ return(-1);
+}
+
+/**
+ * xmlTextReaderSetSchema:
+ * @reader: the xmlTextReaderPtr used
+ * @schema: a precompiled Schema schema
+ *
+ * Use XSD Schema to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * if @schema is NULL, then Schema validation is desactivated.
+ @ The @schema should not be freed until the reader is deallocated
+ * or its use has been deactivated.
+ *
+ * Returns 0 in case the Schema validation could be (des)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderSetSchema(xmlTextReaderPtr reader, xmlSchemaPtr schema) {
+ if (reader == NULL)
+ return(-1);
+ if (schema == NULL) {
+ if (reader->xsdPlug != NULL) {
+ xmlSchemaSAXUnplug(reader->xsdPlug);
+ reader->xsdPlug = NULL;
+ }
+ if (reader->xsdValidCtxt != NULL) {
+ if (! reader->xsdPreserveCtxt)
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ }
+ reader->xsdPreserveCtxt = 0;
+ if (reader->xsdSchemas != NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ }
+ return(0);
+ }
+ if (reader->mode != XML_TEXTREADER_MODE_INITIAL)
+ return(-1);
+ if (reader->xsdPlug != NULL) {
+ xmlSchemaSAXUnplug(reader->xsdPlug);
+ reader->xsdPlug = NULL;
+ }
+ if (reader->xsdValidCtxt != NULL) {
+ if (! reader->xsdPreserveCtxt)
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ }
+ reader->xsdPreserveCtxt = 0;
+ if (reader->xsdSchemas != NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ }
+ reader->xsdValidCtxt = xmlSchemaNewValidCtxt(schema);
+ if (reader->xsdValidCtxt == NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ return(-1);
+ }
+ reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
+ &(reader->ctxt->sax),
+ &(reader->ctxt->userData));
+ if (reader->xsdPlug == NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ return(-1);
+ }
+ xmlSchemaValidateSetLocator(reader->xsdValidCtxt,
+ xmlTextReaderLocator,
+ (void *) reader);
+
+ if (reader->errorFunc != NULL) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ if (reader->sErrorFunc != NULL) {
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ reader->xsdValidErrors = 0;
+ reader->validate = XML_TEXTREADER_VALIDATE_XSD;
+ return(0);
+}
+
+/**
+ * xmlTextReaderRelaxNGValidateInternal:
+ * @reader: the xmlTextReaderPtr used
+ * @rng: the path to a RelaxNG schema or NULL
+ * @ctxt: the RelaxNG schema validation context or NULL
+ * @options: options (not yet used)
+ *
+ * Use RelaxNG to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If both @rng and @ctxt are NULL, then RelaxNG validation is deactivated.
+ *
+ * Returns 0 in case the RelaxNG validation could be (de)activated and
+ * -1 in case of error.
+ */
+static int
+xmlTextReaderRelaxNGValidateInternal(xmlTextReaderPtr reader,
+ const char *rng,
+ xmlRelaxNGValidCtxtPtr ctxt,
+ int options ATTRIBUTE_UNUSED)
+{
+ if (reader == NULL)
+ return(-1);
+
+ if ((rng != NULL) && (ctxt != NULL))
+ return (-1);
+
+ if (((rng != NULL) || (ctxt != NULL)) &&
+ ((reader->mode != XML_TEXTREADER_MODE_INITIAL) ||
+ (reader->ctxt == NULL)))
+ return(-1);
+
+ /* Cleanup previous validation stuff. */
+ if (reader->rngValidCtxt != NULL) {
+ if ( !reader->rngPreserveCtxt)
+ xmlRelaxNGFreeValidCtxt(reader->rngValidCtxt);
+ reader->rngValidCtxt = NULL;
+ }
+ reader->rngPreserveCtxt = 0;
+ if (reader->rngSchemas != NULL) {
+ xmlRelaxNGFree(reader->rngSchemas);
+ reader->rngSchemas = NULL;
+ }
+
+ if ((rng == NULL) && (ctxt == NULL)) {
+ /* We just want to deactivate the validation, so get out. */
+ return(0);
+ }
+
+
+ if (rng != NULL) {
+ xmlRelaxNGParserCtxtPtr pctxt;
+ /* Parse the schema and create validation environment. */
+
+ pctxt = xmlRelaxNGNewParserCtxt(rng);
+ if (reader->errorFunc != NULL) {
+ xmlRelaxNGSetParserErrors(pctxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ if (reader->sErrorFunc != NULL) {
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ reader->rngSchemas = xmlRelaxNGParse(pctxt);
+ xmlRelaxNGFreeParserCtxt(pctxt);
+ if (reader->rngSchemas == NULL)
+ return(-1);
+ reader->rngValidCtxt = xmlRelaxNGNewValidCtxt(reader->rngSchemas);
+ if (reader->rngValidCtxt == NULL) {
+ xmlRelaxNGFree(reader->rngSchemas);
+ reader->rngSchemas = NULL;
+ return(-1);
+ }
+ } else {
+ /* Use the given validation context. */
+ reader->rngValidCtxt = ctxt;
+ reader->rngPreserveCtxt = 1;
+ }
+ /*
+ * Redirect the validation context's error channels to use
+ * the reader channels.
+ * TODO: In case the user provides the validation context we
+ * could make this redirection optional.
+ */
+ if (reader->errorFunc != NULL) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ if (reader->sErrorFunc != NULL) {
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ reader->rngValidErrors = 0;
+ reader->rngFullNode = NULL;
+ reader->validate = XML_TEXTREADER_VALIDATE_RNG;
+ return(0);
+}
+
+/**
+ * xmlTextReaderSchemaValidateInternal:
+ * @reader: the xmlTextReaderPtr used
+ * @xsd: the path to a W3C XSD schema or NULL
+ * @ctxt: the XML Schema validation context or NULL
+ * @options: options (not used yet)
+ *
+ * Validate the document as it is processed using XML Schema.
+ * Activation is only possible before the first Read().
+ * If both @xsd and @ctxt are NULL then XML Schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ * -1 in case of error.
+ */
+static int
+xmlTextReaderSchemaValidateInternal(xmlTextReaderPtr reader,
+ const char *xsd,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options ATTRIBUTE_UNUSED)
+{
+ if (reader == NULL)
+ return(-1);
+
+ if ((xsd != NULL) && (ctxt != NULL))
+ return(-1);
+
+ if (((xsd != NULL) || (ctxt != NULL)) &&
+ ((reader->mode != XML_TEXTREADER_MODE_INITIAL) ||
+ (reader->ctxt == NULL)))
+ return(-1);
+
+ /* Cleanup previous validation stuff. */
+ if (reader->xsdPlug != NULL) {
+ xmlSchemaSAXUnplug(reader->xsdPlug);
+ reader->xsdPlug = NULL;
+ }
+ if (reader->xsdValidCtxt != NULL) {
+ if (! reader->xsdPreserveCtxt)
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ }
+ reader->xsdPreserveCtxt = 0;
+ if (reader->xsdSchemas != NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ }
+
+ if ((xsd == NULL) && (ctxt == NULL)) {
+ /* We just want to deactivate the validation, so get out. */
+ return(0);
+ }
+
+ if (xsd != NULL) {
+ xmlSchemaParserCtxtPtr pctxt;
+ /* Parse the schema and create validation environment. */
+ pctxt = xmlSchemaNewParserCtxt(xsd);
+ if (reader->errorFunc != NULL) {
+ xmlSchemaSetParserErrors(pctxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ reader->xsdSchemas = xmlSchemaParse(pctxt);
+ xmlSchemaFreeParserCtxt(pctxt);
+ if (reader->xsdSchemas == NULL)
+ return(-1);
+ reader->xsdValidCtxt = xmlSchemaNewValidCtxt(reader->xsdSchemas);
+ if (reader->xsdValidCtxt == NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ return(-1);
+ }
+ reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
+ &(reader->ctxt->sax),
+ &(reader->ctxt->userData));
+ if (reader->xsdPlug == NULL) {
+ xmlSchemaFree(reader->xsdSchemas);
+ reader->xsdSchemas = NULL;
+ xmlSchemaFreeValidCtxt(reader->xsdValidCtxt);
+ reader->xsdValidCtxt = NULL;
+ return(-1);
+ }
+ } else {
+ /* Use the given validation context. */
+ reader->xsdValidCtxt = ctxt;
+ reader->xsdPreserveCtxt = 1;
+ reader->xsdPlug = xmlSchemaSAXPlug(reader->xsdValidCtxt,
+ &(reader->ctxt->sax),
+ &(reader->ctxt->userData));
+ if (reader->xsdPlug == NULL) {
+ reader->xsdValidCtxt = NULL;
+ reader->xsdPreserveCtxt = 0;
+ return(-1);
+ }
+ }
+ xmlSchemaValidateSetLocator(reader->xsdValidCtxt,
+ xmlTextReaderLocator,
+ (void *) reader);
+ /*
+ * Redirect the validation context's error channels to use
+ * the reader channels.
+ * TODO: In case the user provides the validation context we
+ * could make this redirection optional.
+ */
+ if (reader->errorFunc != NULL) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ }
+ if (reader->sErrorFunc != NULL) {
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ reader->xsdValidErrors = 0;
+ reader->validate = XML_TEXTREADER_VALIDATE_XSD;
+ return(0);
+}
+
+/**
+ * xmlTextReaderSchemaValidateCtxt:
+ * @reader: the xmlTextReaderPtr used
+ * @ctxt: the XML Schema validation context or NULL
+ * @options: options (not used yet)
+ *
+ * Use W3C XSD schema context to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @ctxt is NULL, then XML Schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options)
+{
+ return(xmlTextReaderSchemaValidateInternal(reader, NULL, ctxt, options));
+}
+
+/**
+ * xmlTextReaderSchemaValidate:
+ * @reader: the xmlTextReaderPtr used
+ * @xsd: the path to a W3C XSD schema or NULL
+ *
+ * Use W3C XSD schema to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @xsd is NULL, then XML Schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderSchemaValidate(xmlTextReaderPtr reader, const char *xsd)
+{
+ return(xmlTextReaderSchemaValidateInternal(reader, xsd, NULL, 0));
+}
+
+/**
+ * xmlTextReaderRelaxNGValidateCtxt:
+ * @reader: the xmlTextReaderPtr used
+ * @ctxt: the RelaxNG schema validation context or NULL
+ * @options: options (not used yet)
+ *
+ * Use RelaxNG schema context to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @ctxt is NULL, then RelaxNG schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
+ xmlRelaxNGValidCtxtPtr ctxt,
+ int options)
+{
+ return(xmlTextReaderRelaxNGValidateInternal(reader, NULL, ctxt, options));
+}
+
+/**
+ * xmlTextReaderRelaxNGValidate:
+ * @reader: the xmlTextReaderPtr used
+ * @rng: the path to a RelaxNG schema or NULL
+ *
+ * Use RelaxNG schema to validate the document as it is processed.
+ * Activation is only possible before the first Read().
+ * If @rng is NULL, then RelaxNG schema validation is deactivated.
+ *
+ * Returns 0 in case the schemas validation could be (de)activated and
+ * -1 in case of error.
+ */
+int
+xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader, const char *rng)
+{
+ return(xmlTextReaderRelaxNGValidateInternal(reader, rng, NULL, 0));
+}
+
+#endif
+
+/**
+ * xmlTextReaderIsNamespaceDecl:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Determine whether the current node is a namespace declaration
+ * rather than a regular attribute.
+ *
+ * Returns 1 if the current node is a namespace declaration, 0 if it
+ * is a regular attribute or other type of node, or -1 in case of
+ * error.
+ */
+int
+xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader) {
+ xmlNodePtr node;
+ if (reader == NULL)
+ return(-1);
+ if (reader->node == NULL)
+ return(-1);
+ if (reader->curnode != NULL)
+ node = reader->curnode;
+ else
+ node = reader->node;
+
+ if (XML_NAMESPACE_DECL == node->type)
+ return(1);
+ else
+ return(0);
+}
+
+/**
+ * xmlTextReaderConstXmlVersion:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Determine the XML version of the document being read.
+ *
+ * Returns a string containing the XML version of the document or NULL
+ * in case of error. The string is deallocated with the reader.
+ */
+const xmlChar *
+xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader) {
+ xmlDocPtr doc = NULL;
+ if (reader == NULL)
+ return(NULL);
+ if (reader->doc != NULL)
+ doc = reader->doc;
+ else if (reader->ctxt != NULL)
+ doc = reader->ctxt->myDoc;
+ if (doc == NULL)
+ return(NULL);
+
+ if (doc->version == NULL)
+ return(NULL);
+ else
+ return(CONSTSTR(doc->version));
+}
+
+/**
+ * xmlTextReaderStandalone:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Determine the standalone status of the document being read.
+ *
+ * Returns 1 if the document was declared to be standalone, 0 if it
+ * was declared to be not standalone, or -1 if the document did not
+ * specify its standalone status or in case of error.
+ */
+int
+xmlTextReaderStandalone(xmlTextReaderPtr reader) {
+ xmlDocPtr doc = NULL;
+ if (reader == NULL)
+ return(-1);
+ if (reader->doc != NULL)
+ doc = reader->doc;
+ else if (reader->ctxt != NULL)
+ doc = reader->ctxt->myDoc;
+ if (doc == NULL)
+ return(-1);
+
+ return(doc->standalone);
+}
+
+/************************************************************************
+ * *
+ * Error Handling Extensions *
+ * *
+ ************************************************************************/
+
+/* helper to build a xmlMalloc'ed string from a format and va_list */
+static char *
+xmlTextReaderBuildMessage(const char *msg, va_list ap) {
+ int size = 0;
+ int chars;
+ char *larger;
+ char *str = NULL;
+ va_list aq;
+
+ while (1) {
+ VA_COPY(aq, ap);
+ chars = vsnprintf(str, size, msg, aq);
+ va_end(aq);
+ if (chars < 0) {
+ xmlGenericError(xmlGenericErrorContext, "vsnprintf failed !\n");
+ if (str)
+ xmlFree(str);
+ return NULL;
+ }
+ if ((chars < size) || (size == MAX_ERR_MSG_SIZE))
+ break;
+ if (chars < MAX_ERR_MSG_SIZE)
+ size = chars + 1;
+ else
+ size = MAX_ERR_MSG_SIZE;
+ if ((larger = (char *) xmlRealloc(str, size)) == NULL) {
+ xmlGenericError(xmlGenericErrorContext, "xmlRealloc failed !\n");
+ if (str)
+ xmlFree(str);
+ return NULL;
+ }
+ str = larger;
+ }
+
+ return str;
+}
+
+/**
+ * xmlTextReaderLocatorLineNumber:
+ * @locator: the xmlTextReaderLocatorPtr used
+ *
+ * Obtain the line number for the given locator.
+ *
+ * Returns the line number or -1 in case of error.
+ */
+int
+xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator) {
+ /* we know that locator is a xmlParserCtxtPtr */
+ xmlParserCtxtPtr ctx = (xmlParserCtxtPtr)locator;
+ int ret = -1;
+
+ if (locator == NULL)
+ return(-1);
+ if (ctx->node != NULL) {
+ ret = xmlGetLineNo(ctx->node);
+ }
+ else {
+ /* inspired from error.c */
+ xmlParserInputPtr input;
+ input = ctx->input;
+ if ((input->filename == NULL) && (ctx->inputNr > 1))
+ input = ctx->inputTab[ctx->inputNr - 2];
+ if (input != NULL) {
+ ret = input->line;
+ }
+ else {
+ ret = -1;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * xmlTextReaderLocatorBaseURI:
+ * @locator: the xmlTextReaderLocatorPtr used
+ *
+ * Obtain the base URI for the given locator.
+ *
+ * Returns the base URI or NULL in case of error,
+ * if non NULL it need to be freed by the caller.
+ */
+xmlChar *
+xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator) {
+ /* we know that locator is a xmlParserCtxtPtr */
+ xmlParserCtxtPtr ctx = (xmlParserCtxtPtr)locator;
+ xmlChar *ret = NULL;
+
+ if (locator == NULL)
+ return(NULL);
+ if (ctx->node != NULL) {
+ ret = xmlNodeGetBase(NULL,ctx->node);
+ }
+ else {
+ /* inspired from error.c */
+ xmlParserInputPtr input;
+ input = ctx->input;
+ if ((input->filename == NULL) && (ctx->inputNr > 1))
+ input = ctx->inputTab[ctx->inputNr - 2];
+ if (input != NULL) {
+ ret = xmlStrdup(BAD_CAST input->filename);
+ }
+ else {
+ ret = NULL;
+ }
+ }
+
+ return ret;
+}
+
+static void
+xmlTextReaderGenericError(void *ctxt, xmlParserSeverities severity,
+ char *str)
+{
+ xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;
+
+ xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx->_private;
+
+ if (str != NULL) {
+ if (reader->errorFunc)
+ reader->errorFunc(reader->errorFuncArg, str, severity,
+ (xmlTextReaderLocatorPtr) ctx);
+ xmlFree(str);
+ }
+}
+
+static void
+xmlTextReaderStructuredError(void *ctxt, xmlErrorPtr error)
+{
+ xmlParserCtxtPtr ctx = (xmlParserCtxtPtr) ctxt;
+
+ xmlTextReaderPtr reader = (xmlTextReaderPtr) ctx->_private;
+
+ if (error && reader->sErrorFunc) {
+ reader->sErrorFunc(reader->errorFuncArg, (xmlErrorPtr) error);
+ }
+}
+
+static void XMLCDECL
+xmlTextReaderError(void *ctxt, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ xmlTextReaderGenericError(ctxt,
+ XML_PARSER_SEVERITY_ERROR,
+ xmlTextReaderBuildMessage(msg, ap));
+ va_end(ap);
+
+}
+
+static void XMLCDECL
+xmlTextReaderWarning(void *ctxt, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start(ap, msg);
+ xmlTextReaderGenericError(ctxt,
+ XML_PARSER_SEVERITY_WARNING,
+ xmlTextReaderBuildMessage(msg, ap));
+ va_end(ap);
+}
+
+static void XMLCDECL
+xmlTextReaderValidityError(void *ctxt, const char *msg, ...)
+{
+ va_list ap;
+
+ int len = xmlStrlen((const xmlChar *) msg);
+
+ if ((len > 1) && (msg[len - 2] != ':')) {
+ /*
+ * some callbacks only report locator information:
+ * skip them (mimicking behaviour in error.c)
+ */
+ va_start(ap, msg);
+ xmlTextReaderGenericError(ctxt,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR,
+ xmlTextReaderBuildMessage(msg, ap));
+ va_end(ap);
+ }
+}
+
+static void XMLCDECL
+xmlTextReaderValidityWarning(void *ctxt, const char *msg, ...)
+{
+ va_list ap;
+
+ int len = xmlStrlen((const xmlChar *) msg);
+
+ if ((len != 0) && (msg[len - 1] != ':')) {
+ /*
+ * some callbacks only report locator information:
+ * skip them (mimicking behaviour in error.c)
+ */
+ va_start(ap, msg);
+ xmlTextReaderGenericError(ctxt,
+ XML_PARSER_SEVERITY_VALIDITY_WARNING,
+ xmlTextReaderBuildMessage(msg, ap));
+ va_end(ap);
+ }
+}
+
+/**
+ * xmlTextReaderSetErrorHandler:
+ * @reader: the xmlTextReaderPtr used
+ * @f: the callback function to call on error and warnings
+ * @arg: a user argument to pass to the callback function
+ *
+ * Register a callback function that will be called on error and warnings.
+ *
+ * If @f is NULL, the default error and warning handlers are restored.
+ */
+void
+xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f, void *arg)
+{
+ if (f != NULL) {
+ reader->ctxt->sax->error = xmlTextReaderError;
+ reader->ctxt->sax->serror = NULL;
+ reader->ctxt->vctxt.error = xmlTextReaderValidityError;
+ reader->ctxt->sax->warning = xmlTextReaderWarning;
+ reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning;
+ reader->errorFunc = f;
+ reader->sErrorFunc = NULL;
+ reader->errorFuncArg = arg;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->rngValidCtxt) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL,
+ reader);
+ }
+ if (reader->xsdValidCtxt) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityErrorRelay,
+ xmlTextReaderValidityWarningRelay,
+ reader);
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL,
+ reader);
+ }
+#endif
+ } else {
+ /* restore defaults */
+ reader->ctxt->sax->error = xmlParserError;
+ reader->ctxt->vctxt.error = xmlParserValidityError;
+ reader->ctxt->sax->warning = xmlParserWarning;
+ reader->ctxt->vctxt.warning = xmlParserValidityWarning;
+ reader->errorFunc = NULL;
+ reader->sErrorFunc = NULL;
+ reader->errorFuncArg = NULL;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->rngValidCtxt) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL,
+ reader);
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL,
+ reader);
+ }
+ if (reader->xsdValidCtxt) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL,
+ reader);
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL,
+ reader);
+ }
+#endif
+ }
+}
+
+/**
+* xmlTextReaderSetStructuredErrorHandler:
+ * @reader: the xmlTextReaderPtr used
+ * @f: the callback function to call on error and warnings
+ * @arg: a user argument to pass to the callback function
+ *
+ * Register a callback function that will be called on error and warnings.
+ *
+ * If @f is NULL, the default error and warning handlers are restored.
+ */
+void
+xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+ xmlStructuredErrorFunc f, void *arg)
+{
+ if (f != NULL) {
+ reader->ctxt->sax->error = NULL;
+ reader->ctxt->sax->serror = xmlTextReaderStructuredError;
+ reader->ctxt->vctxt.error = xmlTextReaderValidityError;
+ reader->ctxt->sax->warning = xmlTextReaderWarning;
+ reader->ctxt->vctxt.warning = xmlTextReaderValidityWarning;
+ reader->sErrorFunc = f;
+ reader->errorFunc = NULL;
+ reader->errorFuncArg = arg;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->rngValidCtxt) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL,
+ reader);
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+ if (reader->xsdValidCtxt) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL,
+ reader);
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt,
+ xmlTextReaderValidityStructuredRelay,
+ reader);
+ }
+#endif
+ } else {
+ /* restore defaults */
+ reader->ctxt->sax->error = xmlParserError;
+ reader->ctxt->sax->serror = NULL;
+ reader->ctxt->vctxt.error = xmlParserValidityError;
+ reader->ctxt->sax->warning = xmlParserWarning;
+ reader->ctxt->vctxt.warning = xmlParserValidityWarning;
+ reader->errorFunc = NULL;
+ reader->sErrorFunc = NULL;
+ reader->errorFuncArg = NULL;
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->rngValidCtxt) {
+ xmlRelaxNGSetValidErrors(reader->rngValidCtxt, NULL, NULL,
+ reader);
+ xmlRelaxNGSetValidStructuredErrors(reader->rngValidCtxt, NULL,
+ reader);
+ }
+ if (reader->xsdValidCtxt) {
+ xmlSchemaSetValidErrors(reader->xsdValidCtxt, NULL, NULL,
+ reader);
+ xmlSchemaSetValidStructuredErrors(reader->xsdValidCtxt, NULL,
+ reader);
+ }
+#endif
+ }
+}
+
+/**
+ * xmlTextReaderIsValid:
+ * @reader: the xmlTextReaderPtr used
+ *
+ * Retrieve the validity status from the parser context
+ *
+ * Returns the flag value 1 if valid, 0 if no, and -1 in case of error
+ */
+int
+xmlTextReaderIsValid(xmlTextReaderPtr reader)
+{
+ if (reader == NULL)
+ return (-1);
+#ifdef LIBXML_SCHEMAS_ENABLED
+ if (reader->validate == XML_TEXTREADER_VALIDATE_RNG)
+ return (reader->rngValidErrors == 0);
+ if (reader->validate == XML_TEXTREADER_VALIDATE_XSD)
+ return (reader->xsdValidErrors == 0);
+#endif
+ if ((reader->ctxt != NULL) && (reader->ctxt->validate == 1))
+ return (reader->ctxt->valid);
+ return (0);
+}
+
+/**
+ * xmlTextReaderGetErrorHandler:
+ * @reader: the xmlTextReaderPtr used
+ * @f: the callback function or NULL is no callback has been registered
+ * @arg: a user argument
+ *
+ * Retrieve the error callback function and user argument.
+ */
+void
+xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc * f, void **arg)
+{
+ if (f != NULL)
+ *f = reader->errorFunc;
+ if (arg != NULL)
+ *arg = reader->errorFuncArg;
+}
+/************************************************************************
+ * *
+ * New set (2.6.0) of simpler and more flexible APIs *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlTextReaderSetup:
+ * @reader: an XML reader
+ * @input: xmlParserInputBufferPtr used to feed the reader, will
+ * be destroyed with it.
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Setup an XML reader with new options
+ *
+ * Returns 0 in case of success and -1 in case of error.
+ */
+int
+xmlTextReaderSetup(xmlTextReaderPtr reader,
+ xmlParserInputBufferPtr input, const char *URL,
+ const char *encoding, int options)
+{
+ if (reader == NULL) {
+ if (input != NULL)
+ xmlFreeParserInputBuffer(input);
+ return (-1);
+ }
+
+ /*
+ * we force the generation of compact text nodes on the reader
+ * since usr applications should never modify the tree
+ */
+ options |= XML_PARSE_COMPACT;
+
+ reader->doc = NULL;
+ reader->entNr = 0;
+ reader->parserFlags = options;
+ reader->validate = XML_TEXTREADER_NOT_VALIDATE;
+ if ((input != NULL) && (reader->input != NULL) &&
+ (reader->allocs & XML_TEXTREADER_INPUT)) {
+ xmlFreeParserInputBuffer(reader->input);
+ reader->input = NULL;
+ reader->allocs -= XML_TEXTREADER_INPUT;
+ }
+ if (input != NULL) {
+ reader->input = input;
+ reader->allocs |= XML_TEXTREADER_INPUT;
+ }
+ if (reader->buffer == NULL)
+ reader->buffer = xmlBufCreateSize(100);
+ if (reader->buffer == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlTextReaderSetup : malloc failed\n");
+ return (-1);
+ }
+ if (reader->sax == NULL)
+ reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
+ if (reader->sax == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlTextReaderSetup : malloc failed\n");
+ return (-1);
+ }
+ xmlSAXVersion(reader->sax, 2);
+ reader->startElement = reader->sax->startElement;
+ reader->sax->startElement = xmlTextReaderStartElement;
+ reader->endElement = reader->sax->endElement;
+ reader->sax->endElement = xmlTextReaderEndElement;
+#ifdef LIBXML_SAX1_ENABLED
+ if (reader->sax->initialized == XML_SAX2_MAGIC) {
+#endif /* LIBXML_SAX1_ENABLED */
+ reader->startElementNs = reader->sax->startElementNs;
+ reader->sax->startElementNs = xmlTextReaderStartElementNs;
+ reader->endElementNs = reader->sax->endElementNs;
+ reader->sax->endElementNs = xmlTextReaderEndElementNs;
+#ifdef LIBXML_SAX1_ENABLED
+ } else {
+ reader->startElementNs = NULL;
+ reader->endElementNs = NULL;
+ }
+#endif /* LIBXML_SAX1_ENABLED */
+ reader->characters = reader->sax->characters;
+ reader->sax->characters = xmlTextReaderCharacters;
+ reader->sax->ignorableWhitespace = xmlTextReaderCharacters;
+ reader->cdataBlock = reader->sax->cdataBlock;
+ reader->sax->cdataBlock = xmlTextReaderCDataBlock;
+
+ reader->mode = XML_TEXTREADER_MODE_INITIAL;
+ reader->node = NULL;
+ reader->curnode = NULL;
+ if (input != NULL) {
+ if (xmlBufUse(reader->input->buffer) < 4) {
+ xmlParserInputBufferRead(input, 4);
+ }
+ if (reader->ctxt == NULL) {
+ if (xmlBufUse(reader->input->buffer) >= 4) {
+ reader->ctxt = xmlCreatePushParserCtxt(reader->sax, NULL,
+ (const char *) xmlBufContent(reader->input->buffer),
+ 4, URL);
+ reader->base = 0;
+ reader->cur = 4;
+ } else {
+ reader->ctxt =
+ xmlCreatePushParserCtxt(reader->sax, NULL, NULL, 0, URL);
+ reader->base = 0;
+ reader->cur = 0;
+ }
+ } else {
+ xmlParserInputPtr inputStream;
+ xmlParserInputBufferPtr buf;
+ xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
+
+ xmlCtxtReset(reader->ctxt);
+ buf = xmlAllocParserInputBuffer(enc);
+ if (buf == NULL) return(-1);
+ inputStream = xmlNewInputStream(reader->ctxt);
+ if (inputStream == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return(-1);
+ }
+
+ if (URL == NULL)
+ inputStream->filename = NULL;
+ else
+ inputStream->filename = (char *)
+ xmlCanonicPath((const xmlChar *) URL);
+ inputStream->buf = buf;
+ xmlBufResetInput(buf->buffer, inputStream);
+
+ inputPush(reader->ctxt, inputStream);
+ reader->cur = 0;
+ }
+ if (reader->ctxt == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlTextReaderSetup : malloc failed\n");
+ return (-1);
+ }
+ }
+ if (reader->dict != NULL) {
+ if (reader->ctxt->dict != NULL) {
+ if (reader->dict != reader->ctxt->dict) {
+ xmlDictFree(reader->dict);
+ reader->dict = reader->ctxt->dict;
+ }
+ } else {
+ reader->ctxt->dict = reader->dict;
+ }
+ } else {
+ if (reader->ctxt->dict == NULL)
+ reader->ctxt->dict = xmlDictCreate();
+ reader->dict = reader->ctxt->dict;
+ }
+ reader->ctxt->_private = reader;
+ reader->ctxt->linenumbers = 1;
+ reader->ctxt->dictNames = 1;
+ /*
+ * use the parser dictionnary to allocate all elements and attributes names
+ */
+ reader->ctxt->docdict = 1;
+ reader->ctxt->parseMode = XML_PARSE_READER;
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+ if (reader->xincctxt != NULL) {
+ xmlXIncludeFreeContext(reader->xincctxt);
+ reader->xincctxt = NULL;
+ }
+ if (options & XML_PARSE_XINCLUDE) {
+ reader->xinclude = 1;
+ reader->xinclude_name = xmlDictLookup(reader->dict, XINCLUDE_NODE, -1);
+ options -= XML_PARSE_XINCLUDE;
+ } else
+ reader->xinclude = 0;
+ reader->in_xinclude = 0;
+#endif
+#ifdef LIBXML_PATTERN_ENABLED
+ if (reader->patternTab == NULL) {
+ reader->patternNr = 0;
+ reader->patternMax = 0;
+ }
+ while (reader->patternNr > 0) {
+ reader->patternNr--;
+ if (reader->patternTab[reader->patternNr] != NULL) {
+ xmlFreePattern(reader->patternTab[reader->patternNr]);
+ reader->patternTab[reader->patternNr] = NULL;
+ }
+ }
+#endif
+
+ if (options & XML_PARSE_DTDVALID)
+ reader->validate = XML_TEXTREADER_VALIDATE_DTD;
+
+ xmlCtxtUseOptions(reader->ctxt, options);
+ if (encoding != NULL) {
+ xmlCharEncodingHandlerPtr hdlr;
+
+ hdlr = xmlFindCharEncodingHandler(encoding);
+ if (hdlr != NULL)
+ xmlSwitchToEncoding(reader->ctxt, hdlr);
+ }
+ if ((URL != NULL) && (reader->ctxt->input != NULL) &&
+ (reader->ctxt->input->filename == NULL))
+ reader->ctxt->input->filename = (char *)
+ xmlStrdup((const xmlChar *) URL);
+
+ reader->doc = NULL;
+
+ return (0);
+}
+
+/**
+ * xmlTextReaderByteConsumed:
+ * @reader: an XML reader
+ *
+ * This function provides the current index of the parser used
+ * by the reader, relative to the start of the current entity.
+ * This function actually just wraps a call to xmlBytesConsumed()
+ * for the parser context associated with the reader.
+ * See xmlBytesConsumed() for more information.
+ *
+ * Returns the index in bytes from the beginning of the entity or -1
+ * in case the index could not be computed.
+ */
+long
+xmlTextReaderByteConsumed(xmlTextReaderPtr reader) {
+ if ((reader == NULL) || (reader->ctxt == NULL))
+ return(-1);
+ return(xmlByteConsumed(reader->ctxt));
+}
+
+
+/**
+ * xmlReaderWalker:
+ * @doc: a preparsed document
+ *
+ * Create an xmltextReader for a preparsed document.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderWalker(xmlDocPtr doc)
+{
+ xmlTextReaderPtr ret;
+
+ if (doc == NULL)
+ return(NULL);
+
+ ret = xmlMalloc(sizeof(xmlTextReader));
+ if (ret == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNewTextReader : malloc failed\n");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlTextReader));
+ ret->entNr = 0;
+ ret->input = NULL;
+ ret->mode = XML_TEXTREADER_MODE_INITIAL;
+ ret->node = NULL;
+ ret->curnode = NULL;
+ ret->base = 0;
+ ret->cur = 0;
+ ret->allocs = XML_TEXTREADER_CTXT;
+ ret->doc = doc;
+ ret->state = XML_TEXTREADER_START;
+ ret->dict = xmlDictCreate();
+ return(ret);
+}
+
+/**
+ * xmlReaderForDoc:
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Create an xmltextReader for an XML in-memory document.
+ * The parsing flags @options are a combination of xmlParserOption.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderForDoc(const xmlChar * cur, const char *URL, const char *encoding,
+ int options)
+{
+ int len;
+
+ if (cur == NULL)
+ return (NULL);
+ len = xmlStrlen(cur);
+
+ return (xmlReaderForMemory
+ ((const char *) cur, len, URL, encoding, options));
+}
+
+/**
+ * xmlReaderForFile:
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML file from the filesystem or the network.
+ * The parsing flags @options are a combination of xmlParserOption.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderForFile(const char *filename, const char *encoding, int options)
+{
+ xmlTextReaderPtr reader;
+
+ reader = xmlNewTextReaderFilename(filename);
+ if (reader == NULL)
+ return (NULL);
+ xmlTextReaderSetup(reader, NULL, NULL, encoding, options);
+ return (reader);
+}
+
+/**
+ * xmlReaderForMemory:
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Create an xmltextReader for an XML in-memory document.
+ * The parsing flags @options are a combination of xmlParserOption.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderForMemory(const char *buffer, int size, const char *URL,
+ const char *encoding, int options)
+{
+ xmlTextReaderPtr reader;
+ xmlParserInputBufferPtr buf;
+
+ buf = xmlParserInputBufferCreateStatic(buffer, size,
+ XML_CHAR_ENCODING_NONE);
+ if (buf == NULL) {
+ return (NULL);
+ }
+ reader = xmlNewTextReader(buf, URL);
+ if (reader == NULL) {
+ xmlFreeParserInputBuffer(buf);
+ return (NULL);
+ }
+ reader->allocs |= XML_TEXTREADER_INPUT;
+ xmlTextReaderSetup(reader, NULL, URL, encoding, options);
+ return (reader);
+}
+
+/**
+ * xmlReaderForFd:
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Create an xmltextReader for an XML from a file descriptor.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * NOTE that the file descriptor will not be closed when the
+ * reader is closed or reset.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderForFd(int fd, const char *URL, const char *encoding, int options)
+{
+ xmlTextReaderPtr reader;
+ xmlParserInputBufferPtr input;
+
+ if (fd < 0)
+ return (NULL);
+
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (NULL);
+ input->closecallback = NULL;
+ reader = xmlNewTextReader(input, URL);
+ if (reader == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ reader->allocs |= XML_TEXTREADER_INPUT;
+ xmlTextReaderSetup(reader, NULL, URL, encoding, options);
+ return (reader);
+}
+
+/**
+ * xmlReaderForIO:
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Create an xmltextReader for an XML document from I/O functions and source.
+ * The parsing flags @options are a combination of xmlParserOption.
+ *
+ * Returns the new reader or NULL in case of error.
+ */
+xmlTextReaderPtr
+xmlReaderForIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
+ void *ioctx, const char *URL, const char *encoding,
+ int options)
+{
+ xmlTextReaderPtr reader;
+ xmlParserInputBufferPtr input;
+
+ if (ioread == NULL)
+ return (NULL);
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (NULL);
+ }
+ reader = xmlNewTextReader(input, URL);
+ if (reader == NULL) {
+ xmlFreeParserInputBuffer(input);
+ return (NULL);
+ }
+ reader->allocs |= XML_TEXTREADER_INPUT;
+ xmlTextReaderSetup(reader, NULL, URL, encoding, options);
+ return (reader);
+}
+
+/**
+ * xmlReaderNewWalker:
+ * @reader: an XML reader
+ * @doc: a preparsed document
+ *
+ * Setup an xmltextReader to parse a preparsed XML document.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewWalker(xmlTextReaderPtr reader, xmlDocPtr doc)
+{
+ if (doc == NULL)
+ return (-1);
+ if (reader == NULL)
+ return (-1);
+
+ if (reader->input != NULL) {
+ xmlFreeParserInputBuffer(reader->input);
+ }
+ if (reader->ctxt != NULL) {
+ xmlCtxtReset(reader->ctxt);
+ }
+
+ reader->entNr = 0;
+ reader->input = NULL;
+ reader->mode = XML_TEXTREADER_MODE_INITIAL;
+ reader->node = NULL;
+ reader->curnode = NULL;
+ reader->base = 0;
+ reader->cur = 0;
+ reader->allocs = XML_TEXTREADER_CTXT;
+ reader->doc = doc;
+ reader->state = XML_TEXTREADER_START;
+ if (reader->dict == NULL) {
+ if ((reader->ctxt != NULL) && (reader->ctxt->dict != NULL))
+ reader->dict = reader->ctxt->dict;
+ else
+ reader->dict = xmlDictCreate();
+ }
+ return(0);
+}
+
+/**
+ * xmlReaderNewDoc:
+ * @reader: an XML reader
+ * @cur: a pointer to a zero terminated string
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Setup an xmltextReader to parse an XML in-memory document.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur,
+ const char *URL, const char *encoding, int options)
+{
+
+ int len;
+
+ if (cur == NULL)
+ return (-1);
+ if (reader == NULL)
+ return (-1);
+
+ len = xmlStrlen(cur);
+ return (xmlReaderNewMemory(reader, (const char *)cur, len,
+ URL, encoding, options));
+}
+
+/**
+ * xmlReaderNewFile:
+ * @reader: an XML reader
+ * @filename: a file or URL
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * parse an XML file from the filesystem or the network.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewFile(xmlTextReaderPtr reader, const char *filename,
+ const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+
+ if (filename == NULL)
+ return (-1);
+ if (reader == NULL)
+ return (-1);
+
+ input =
+ xmlParserInputBufferCreateFilename(filename,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (-1);
+ return (xmlTextReaderSetup(reader, input, filename, encoding, options));
+}
+
+/**
+ * xmlReaderNewMemory:
+ * @reader: an XML reader
+ * @buffer: a pointer to a char array
+ * @size: the size of the array
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Setup an xmltextReader to parse an XML in-memory document.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewMemory(xmlTextReaderPtr reader, const char *buffer, int size,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+
+ if (reader == NULL)
+ return (-1);
+ if (buffer == NULL)
+ return (-1);
+
+ input = xmlParserInputBufferCreateStatic(buffer, size,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ return (-1);
+ }
+ return (xmlTextReaderSetup(reader, input, URL, encoding, options));
+}
+
+/**
+ * xmlReaderNewFd:
+ * @reader: an XML reader
+ * @fd: an open file descriptor
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Setup an xmltextReader to parse an XML from a file descriptor.
+ * NOTE that the file descriptor will not be closed when the
+ * reader is closed or reset.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewFd(xmlTextReaderPtr reader, int fd,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+
+ if (fd < 0)
+ return (-1);
+ if (reader == NULL)
+ return (-1);
+
+ input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (-1);
+ input->closecallback = NULL;
+ return (xmlTextReaderSetup(reader, input, URL, encoding, options));
+}
+
+/**
+ * xmlReaderNewIO:
+ * @reader: an XML reader
+ * @ioread: an I/O read function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @URL: the base URL to use for the document
+ * @encoding: the document encoding, or NULL
+ * @options: a combination of xmlParserOption
+ *
+ * Setup an xmltextReader to parse an XML document from I/O functions
+ * and source.
+ * The parsing flags @options are a combination of xmlParserOption.
+ * This reuses the existing @reader xmlTextReader.
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlReaderNewIO(xmlTextReaderPtr reader, xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose, void *ioctx,
+ const char *URL, const char *encoding, int options)
+{
+ xmlParserInputBufferPtr input;
+
+ if (ioread == NULL)
+ return (-1);
+ if (reader == NULL)
+ return (-1);
+
+ input = xmlParserInputBufferCreateIO(ioread, ioclose, ioctx,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL) {
+ if (ioclose != NULL)
+ ioclose(ioctx);
+ return (-1);
+ }
+ return (xmlTextReaderSetup(reader, input, URL, encoding, options));
+}
+
+/************************************************************************
+ * *
+ * Utilities *
+ * *
+ ************************************************************************/
+#ifdef NOT_USED_YET
+
+/**
+ * xmlBase64Decode:
+ * @in: the input buffer
+ * @inlen: the size of the input (in), the size read from it (out)
+ * @to: the output buffer
+ * @tolen: the size of the output (in), the size written to (out)
+ *
+ * Base64 decoder, reads from @in and save in @to
+ * TODO: tell jody when this is actually exported
+ *
+ * Returns 0 if all the input was consumer, 1 if the Base64 end was reached,
+ * 2 if there wasn't enough space on the output or -1 in case of error.
+ */
+static int
+xmlBase64Decode(const unsigned char *in, unsigned long *inlen,
+ unsigned char *to, unsigned long *tolen)
+{
+ unsigned long incur; /* current index in in[] */
+
+ unsigned long inblk; /* last block index in in[] */
+
+ unsigned long outcur; /* current index in out[] */
+
+ unsigned long inmax; /* size of in[] */
+
+ unsigned long outmax; /* size of out[] */
+
+ unsigned char cur; /* the current value read from in[] */
+
+ unsigned char intmp[4], outtmp[4]; /* temporary buffers for the convert */
+
+ int nbintmp; /* number of byte in intmp[] */
+
+ int is_ignore; /* cur should be ignored */
+
+ int is_end = 0; /* the end of the base64 was found */
+
+ int retval = 1;
+
+ int i;
+
+ if ((in == NULL) || (inlen == NULL) || (to == NULL) || (tolen == NULL))
+ return (-1);
+
+ incur = 0;
+ inblk = 0;
+ outcur = 0;
+ inmax = *inlen;
+ outmax = *tolen;
+ nbintmp = 0;
+
+ while (1) {
+ if (incur >= inmax)
+ break;
+ cur = in[incur++];
+ is_ignore = 0;
+ if ((cur >= 'A') && (cur <= 'Z'))
+ cur = cur - 'A';
+ else if ((cur >= 'a') && (cur <= 'z'))
+ cur = cur - 'a' + 26;
+ else if ((cur >= '0') && (cur <= '9'))
+ cur = cur - '0' + 52;
+ else if (cur == '+')
+ cur = 62;
+ else if (cur == '/')
+ cur = 63;
+ else if (cur == '.')
+ cur = 0;
+ else if (cur == '=') /*no op , end of the base64 stream */
+ is_end = 1;
+ else {
+ is_ignore = 1;
+ if (nbintmp == 0)
+ inblk = incur;
+ }
+
+ if (!is_ignore) {
+ int nbouttmp = 3;
+
+ int is_break = 0;
+
+ if (is_end) {
+ if (nbintmp == 0)
+ break;
+ if ((nbintmp == 1) || (nbintmp == 2))
+ nbouttmp = 1;
+ else
+ nbouttmp = 2;
+ nbintmp = 3;
+ is_break = 1;
+ }
+ intmp[nbintmp++] = cur;
+ /*
+ * if intmp is full, push the 4byte sequence as a 3 byte
+ * sequence out
+ */
+ if (nbintmp == 4) {
+ nbintmp = 0;
+ outtmp[0] = (intmp[0] << 2) | ((intmp[1] & 0x30) >> 4);
+ outtmp[1] =
+ ((intmp[1] & 0x0F) << 4) | ((intmp[2] & 0x3C) >> 2);
+ outtmp[2] = ((intmp[2] & 0x03) << 6) | (intmp[3] & 0x3F);
+ if (outcur + 3 >= outmax) {
+ retval = 2;
+ break;
+ }
+
+ for (i = 0; i < nbouttmp; i++)
+ to[outcur++] = outtmp[i];
+ inblk = incur;
+ }
+
+ if (is_break) {
+ retval = 0;
+ break;
+ }
+ }
+ }
+
+ *tolen = outcur;
+ *inlen = inblk;
+ return (retval);
+}
+
+/*
+ * Test routine for the xmlBase64Decode function
+ */
+#if 0
+int
+main(int argc, char **argv)
+{
+ char *input = " VW4 gcGV0 \n aXQgdGVzdCAuCg== ";
+
+ char output[100];
+
+ char output2[100];
+
+ char output3[100];
+
+ unsigned long inlen = strlen(input);
+
+ unsigned long outlen = 100;
+
+ int ret;
+
+ unsigned long cons, tmp, tmp2, prod;
+
+ /*
+ * Direct
+ */
+ ret = xmlBase64Decode(input, &inlen, output, &outlen);
+
+ output[outlen] = 0;
+ printf("ret: %d, inlen: %ld , outlen: %ld, output: '%s'\n", ret, inlen,
+ outlen, output)indent: Standard input:179: Error:Unmatched #endif
+;
+
+ /*
+ * output chunking
+ */
+ cons = 0;
+ prod = 0;
+ while (cons < inlen) {
+ tmp = 5;
+ tmp2 = inlen - cons;
+
+ printf("%ld %ld\n", cons, prod);
+ ret = xmlBase64Decode(&input[cons], &tmp2, &output2[prod], &tmp);
+ cons += tmp2;
+ prod += tmp;
+ printf("%ld %ld\n", cons, prod);
+ }
+ output2[outlen] = 0;
+ printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons,
+ prod, output2);
+
+ /*
+ * input chunking
+ */
+ cons = 0;
+ prod = 0;
+ while (cons < inlen) {
+ tmp = 100 - prod;
+ tmp2 = inlen - cons;
+ if (tmp2 > 5)
+ tmp2 = 5;
+
+ printf("%ld %ld\n", cons, prod);
+ ret = xmlBase64Decode(&input[cons], &tmp2, &output3[prod], &tmp);
+ cons += tmp2;
+ prod += tmp;
+ printf("%ld %ld\n", cons, prod);
+ }
+ output3[outlen] = 0;
+ printf("ret: %d, cons: %ld , prod: %ld, output: '%s'\n", ret, cons,
+ prod, output3);
+ return (0);
+
+}
+#endif
+#endif /* NOT_USED_YET */
+#define bottom_xmlreader
+#include "elfgcchack.h"
+#endif /* LIBXML_READER_ENABLED */
diff --git a/xmlregexp.c b/xmlregexp.c
new file mode 100644
index 0000000..3e912ab
--- /dev/null
+++ b/xmlregexp.c
@@ -0,0 +1,8167 @@
+/*
+ * regexp.c: generic and extensible Regular Expression engine
+ *
+ * Basically designed with the purpose of compiling regexps for
+ * the variety of validation/shemas mechanisms now available in
+ * XML related specifications these include:
+ * - XML-1.0 DTD validation
+ * - XML Schemas structure part 1
+ * - XML Schemas Datatypes part 2 especially Appendix F
+ * - RELAX-NG/TREX i.e. the counter proposal
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+/* #define DEBUG_ERR */
+
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include <libxml/tree.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlunicode.h>
+
+#ifndef INT_MAX
+#define INT_MAX 123456789 /* easy to flag and big enough for our needs */
+#endif
+
+/* #define DEBUG_REGEXP_GRAPH */
+/* #define DEBUG_REGEXP_EXEC */
+/* #define DEBUG_PUSH */
+/* #define DEBUG_COMPACTION */
+
+#define MAX_PUSH 10000000
+
+#ifdef ERROR
+#undef ERROR
+#endif
+#define ERROR(str) \
+ ctxt->error = XML_REGEXP_COMPILE_ERROR; \
+ xmlRegexpErrCompile(ctxt, str);
+#define NEXT ctxt->cur++
+#define CUR (*(ctxt->cur))
+#define NXT(index) (ctxt->cur[index])
+
+#define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l)
+#define NEXTL(l) ctxt->cur += l;
+#define XML_REG_STRING_SEPARATOR '|'
+/*
+ * Need PREV to check on a '-' within a Character Group. May only be used
+ * when it's guaranteed that cur is not at the beginning of ctxt->string!
+ */
+#define PREV (ctxt->cur[-1])
+
+/**
+ * TODO:
+ *
+ * macro to flag unimplemented blocks
+ */
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/************************************************************************
+ * *
+ * Datatypes and structures *
+ * *
+ ************************************************************************/
+
+/*
+ * Note: the order of the enums below is significant, do not shuffle
+ */
+typedef enum {
+ XML_REGEXP_EPSILON = 1,
+ XML_REGEXP_CHARVAL,
+ XML_REGEXP_RANGES,
+ XML_REGEXP_SUBREG, /* used for () sub regexps */
+ XML_REGEXP_STRING,
+ XML_REGEXP_ANYCHAR, /* . */
+ XML_REGEXP_ANYSPACE, /* \s */
+ XML_REGEXP_NOTSPACE, /* \S */
+ XML_REGEXP_INITNAME, /* \l */
+ XML_REGEXP_NOTINITNAME, /* \L */
+ XML_REGEXP_NAMECHAR, /* \c */
+ XML_REGEXP_NOTNAMECHAR, /* \C */
+ XML_REGEXP_DECIMAL, /* \d */
+ XML_REGEXP_NOTDECIMAL, /* \D */
+ XML_REGEXP_REALCHAR, /* \w */
+ XML_REGEXP_NOTREALCHAR, /* \W */
+ XML_REGEXP_LETTER = 100,
+ XML_REGEXP_LETTER_UPPERCASE,
+ XML_REGEXP_LETTER_LOWERCASE,
+ XML_REGEXP_LETTER_TITLECASE,
+ XML_REGEXP_LETTER_MODIFIER,
+ XML_REGEXP_LETTER_OTHERS,
+ XML_REGEXP_MARK,
+ XML_REGEXP_MARK_NONSPACING,
+ XML_REGEXP_MARK_SPACECOMBINING,
+ XML_REGEXP_MARK_ENCLOSING,
+ XML_REGEXP_NUMBER,
+ XML_REGEXP_NUMBER_DECIMAL,
+ XML_REGEXP_NUMBER_LETTER,
+ XML_REGEXP_NUMBER_OTHERS,
+ XML_REGEXP_PUNCT,
+ XML_REGEXP_PUNCT_CONNECTOR,
+ XML_REGEXP_PUNCT_DASH,
+ XML_REGEXP_PUNCT_OPEN,
+ XML_REGEXP_PUNCT_CLOSE,
+ XML_REGEXP_PUNCT_INITQUOTE,
+ XML_REGEXP_PUNCT_FINQUOTE,
+ XML_REGEXP_PUNCT_OTHERS,
+ XML_REGEXP_SEPAR,
+ XML_REGEXP_SEPAR_SPACE,
+ XML_REGEXP_SEPAR_LINE,
+ XML_REGEXP_SEPAR_PARA,
+ XML_REGEXP_SYMBOL,
+ XML_REGEXP_SYMBOL_MATH,
+ XML_REGEXP_SYMBOL_CURRENCY,
+ XML_REGEXP_SYMBOL_MODIFIER,
+ XML_REGEXP_SYMBOL_OTHERS,
+ XML_REGEXP_OTHER,
+ XML_REGEXP_OTHER_CONTROL,
+ XML_REGEXP_OTHER_FORMAT,
+ XML_REGEXP_OTHER_PRIVATE,
+ XML_REGEXP_OTHER_NA,
+ XML_REGEXP_BLOCK_NAME
+} xmlRegAtomType;
+
+typedef enum {
+ XML_REGEXP_QUANT_EPSILON = 1,
+ XML_REGEXP_QUANT_ONCE,
+ XML_REGEXP_QUANT_OPT,
+ XML_REGEXP_QUANT_MULT,
+ XML_REGEXP_QUANT_PLUS,
+ XML_REGEXP_QUANT_ONCEONLY,
+ XML_REGEXP_QUANT_ALL,
+ XML_REGEXP_QUANT_RANGE
+} xmlRegQuantType;
+
+typedef enum {
+ XML_REGEXP_START_STATE = 1,
+ XML_REGEXP_FINAL_STATE,
+ XML_REGEXP_TRANS_STATE,
+ XML_REGEXP_SINK_STATE,
+ XML_REGEXP_UNREACH_STATE
+} xmlRegStateType;
+
+typedef enum {
+ XML_REGEXP_MARK_NORMAL = 0,
+ XML_REGEXP_MARK_START,
+ XML_REGEXP_MARK_VISITED
+} xmlRegMarkedType;
+
+typedef struct _xmlRegRange xmlRegRange;
+typedef xmlRegRange *xmlRegRangePtr;
+
+struct _xmlRegRange {
+ int neg; /* 0 normal, 1 not, 2 exclude */
+ xmlRegAtomType type;
+ int start;
+ int end;
+ xmlChar *blockName;
+};
+
+typedef struct _xmlRegAtom xmlRegAtom;
+typedef xmlRegAtom *xmlRegAtomPtr;
+
+typedef struct _xmlAutomataState xmlRegState;
+typedef xmlRegState *xmlRegStatePtr;
+
+struct _xmlRegAtom {
+ int no;
+ xmlRegAtomType type;
+ xmlRegQuantType quant;
+ int min;
+ int max;
+
+ void *valuep;
+ void *valuep2;
+ int neg;
+ int codepoint;
+ xmlRegStatePtr start;
+ xmlRegStatePtr start0;
+ xmlRegStatePtr stop;
+ int maxRanges;
+ int nbRanges;
+ xmlRegRangePtr *ranges;
+ void *data;
+};
+
+typedef struct _xmlRegCounter xmlRegCounter;
+typedef xmlRegCounter *xmlRegCounterPtr;
+
+struct _xmlRegCounter {
+ int min;
+ int max;
+};
+
+typedef struct _xmlRegTrans xmlRegTrans;
+typedef xmlRegTrans *xmlRegTransPtr;
+
+struct _xmlRegTrans {
+ xmlRegAtomPtr atom;
+ int to;
+ int counter;
+ int count;
+ int nd;
+};
+
+struct _xmlAutomataState {
+ xmlRegStateType type;
+ xmlRegMarkedType mark;
+ xmlRegMarkedType markd;
+ xmlRegMarkedType reached;
+ int no;
+ int maxTrans;
+ int nbTrans;
+ xmlRegTrans *trans;
+ /* knowing states ponting to us can speed things up */
+ int maxTransTo;
+ int nbTransTo;
+ int *transTo;
+};
+
+typedef struct _xmlAutomata xmlRegParserCtxt;
+typedef xmlRegParserCtxt *xmlRegParserCtxtPtr;
+
+#define AM_AUTOMATA_RNG 1
+
+struct _xmlAutomata {
+ xmlChar *string;
+ xmlChar *cur;
+
+ int error;
+ int neg;
+
+ xmlRegStatePtr start;
+ xmlRegStatePtr end;
+ xmlRegStatePtr state;
+
+ xmlRegAtomPtr atom;
+
+ int maxAtoms;
+ int nbAtoms;
+ xmlRegAtomPtr *atoms;
+
+ int maxStates;
+ int nbStates;
+ xmlRegStatePtr *states;
+
+ int maxCounters;
+ int nbCounters;
+ xmlRegCounter *counters;
+
+ int determinist;
+ int negs;
+ int flags;
+};
+
+struct _xmlRegexp {
+ xmlChar *string;
+ int nbStates;
+ xmlRegStatePtr *states;
+ int nbAtoms;
+ xmlRegAtomPtr *atoms;
+ int nbCounters;
+ xmlRegCounter *counters;
+ int determinist;
+ int flags;
+ /*
+ * That's the compact form for determinists automatas
+ */
+ int nbstates;
+ int *compact;
+ void **transdata;
+ int nbstrings;
+ xmlChar **stringMap;
+};
+
+typedef struct _xmlRegExecRollback xmlRegExecRollback;
+typedef xmlRegExecRollback *xmlRegExecRollbackPtr;
+
+struct _xmlRegExecRollback {
+ xmlRegStatePtr state;/* the current state */
+ int index; /* the index in the input stack */
+ int nextbranch; /* the next transition to explore in that state */
+ int *counts; /* save the automata state if it has some */
+};
+
+typedef struct _xmlRegInputToken xmlRegInputToken;
+typedef xmlRegInputToken *xmlRegInputTokenPtr;
+
+struct _xmlRegInputToken {
+ xmlChar *value;
+ void *data;
+};
+
+struct _xmlRegExecCtxt {
+ int status; /* execution status != 0 indicate an error */
+ int determinist; /* did we find an indeterministic behaviour */
+ xmlRegexpPtr comp; /* the compiled regexp */
+ xmlRegExecCallbacks callback;
+ void *data;
+
+ xmlRegStatePtr state;/* the current state */
+ int transno; /* the current transition on that state */
+ int transcount; /* the number of chars in char counted transitions */
+
+ /*
+ * A stack of rollback states
+ */
+ int maxRollbacks;
+ int nbRollbacks;
+ xmlRegExecRollback *rollbacks;
+
+ /*
+ * The state of the automata if any
+ */
+ int *counts;
+
+ /*
+ * The input stack
+ */
+ int inputStackMax;
+ int inputStackNr;
+ int index;
+ int *charStack;
+ const xmlChar *inputString; /* when operating on characters */
+ xmlRegInputTokenPtr inputStack;/* when operating on strings */
+
+ /*
+ * error handling
+ */
+ int errStateNo; /* the error state number */
+ xmlRegStatePtr errState; /* the error state */
+ xmlChar *errString; /* the string raising the error */
+ int *errCounts; /* counters at the error state */
+ int nbPush;
+};
+
+#define REGEXP_ALL_COUNTER 0x123456
+#define REGEXP_ALL_LAX_COUNTER 0x123457
+
+static void xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top);
+static void xmlRegFreeState(xmlRegStatePtr state);
+static void xmlRegFreeAtom(xmlRegAtomPtr atom);
+static int xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr);
+static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint);
+static int xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint,
+ int neg, int start, int end, const xmlChar *blockName);
+
+void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
+
+/************************************************************************
+ * *
+ * Regexp memory error handler *
+ * *
+ ************************************************************************/
+/**
+ * xmlRegexpErrMemory:
+ * @extra: extra information
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlRegexpErrMemory(xmlRegParserCtxtPtr ctxt, const char *extra)
+{
+ const char *regexp = NULL;
+ if (ctxt != NULL) {
+ regexp = (const char *) ctxt->string;
+ ctxt->error = XML_ERR_NO_MEMORY;
+ }
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_REGEXP,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0, extra,
+ regexp, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlRegexpErrCompile:
+ * @extra: extra information
+ *
+ * Handle a compilation failure
+ */
+static void
+xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
+{
+ const char *regexp = NULL;
+ int idx = 0;
+
+ if (ctxt != NULL) {
+ regexp = (const char *) ctxt->string;
+ idx = ctxt->cur - ctxt->string;
+ ctxt->error = XML_REGEXP_COMPILE_ERROR;
+ }
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_REGEXP,
+ XML_REGEXP_COMPILE_ERROR, XML_ERR_FATAL, NULL, 0, extra,
+ regexp, NULL, idx, 0,
+ "failed to compile: %s\n", extra);
+}
+
+/************************************************************************
+ * *
+ * Allocation/Deallocation *
+ * *
+ ************************************************************************/
+
+static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt);
+/**
+ * xmlRegEpxFromParse:
+ * @ctxt: the parser context used to build it
+ *
+ * Allocate a new regexp and fill it with the result from the parser
+ *
+ * Returns the new regexp or NULL in case of error
+ */
+static xmlRegexpPtr
+xmlRegEpxFromParse(xmlRegParserCtxtPtr ctxt) {
+ xmlRegexpPtr ret;
+
+ ret = (xmlRegexpPtr) xmlMalloc(sizeof(xmlRegexp));
+ if (ret == NULL) {
+ xmlRegexpErrMemory(ctxt, "compiling regexp");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlRegexp));
+ ret->string = ctxt->string;
+ ret->nbStates = ctxt->nbStates;
+ ret->states = ctxt->states;
+ ret->nbAtoms = ctxt->nbAtoms;
+ ret->atoms = ctxt->atoms;
+ ret->nbCounters = ctxt->nbCounters;
+ ret->counters = ctxt->counters;
+ ret->determinist = ctxt->determinist;
+ ret->flags = ctxt->flags;
+ if (ret->determinist == -1) {
+ xmlRegexpIsDeterminist(ret);
+ }
+
+ if ((ret->determinist != 0) &&
+ (ret->nbCounters == 0) &&
+ (ctxt->negs == 0) &&
+ (ret->atoms != NULL) &&
+ (ret->atoms[0] != NULL) &&
+ (ret->atoms[0]->type == XML_REGEXP_STRING)) {
+ int i, j, nbstates = 0, nbatoms = 0;
+ int *stateRemap;
+ int *stringRemap;
+ int *transitions;
+ void **transdata;
+ xmlChar **stringMap;
+ xmlChar *value;
+
+ /*
+ * Switch to a compact representation
+ * 1/ counting the effective number of states left
+ * 2/ counting the unique number of atoms, and check that
+ * they are all of the string type
+ * 3/ build a table state x atom for the transitions
+ */
+
+ stateRemap = xmlMalloc(ret->nbStates * sizeof(int));
+ if (stateRemap == NULL) {
+ xmlRegexpErrMemory(ctxt, "compiling regexp");
+ xmlFree(ret);
+ return(NULL);
+ }
+ for (i = 0;i < ret->nbStates;i++) {
+ if (ret->states[i] != NULL) {
+ stateRemap[i] = nbstates;
+ nbstates++;
+ } else {
+ stateRemap[i] = -1;
+ }
+ }
+#ifdef DEBUG_COMPACTION
+ printf("Final: %d states\n", nbstates);
+#endif
+ stringMap = xmlMalloc(ret->nbAtoms * sizeof(char *));
+ if (stringMap == NULL) {
+ xmlRegexpErrMemory(ctxt, "compiling regexp");
+ xmlFree(stateRemap);
+ xmlFree(ret);
+ return(NULL);
+ }
+ stringRemap = xmlMalloc(ret->nbAtoms * sizeof(int));
+ if (stringRemap == NULL) {
+ xmlRegexpErrMemory(ctxt, "compiling regexp");
+ xmlFree(stringMap);
+ xmlFree(stateRemap);
+ xmlFree(ret);
+ return(NULL);
+ }
+ for (i = 0;i < ret->nbAtoms;i++) {
+ if ((ret->atoms[i]->type == XML_REGEXP_STRING) &&
+ (ret->atoms[i]->quant == XML_REGEXP_QUANT_ONCE)) {
+ value = ret->atoms[i]->valuep;
+ for (j = 0;j < nbatoms;j++) {
+ if (xmlStrEqual(stringMap[j], value)) {
+ stringRemap[i] = j;
+ break;
+ }
+ }
+ if (j >= nbatoms) {
+ stringRemap[i] = nbatoms;
+ stringMap[nbatoms] = xmlStrdup(value);
+ if (stringMap[nbatoms] == NULL) {
+ for (i = 0;i < nbatoms;i++)
+ xmlFree(stringMap[i]);
+ xmlFree(stringRemap);
+ xmlFree(stringMap);
+ xmlFree(stateRemap);
+ xmlFree(ret);
+ return(NULL);
+ }
+ nbatoms++;
+ }
+ } else {
+ xmlFree(stateRemap);
+ xmlFree(stringRemap);
+ for (i = 0;i < nbatoms;i++)
+ xmlFree(stringMap[i]);
+ xmlFree(stringMap);
+ xmlFree(ret);
+ return(NULL);
+ }
+ }
+#ifdef DEBUG_COMPACTION
+ printf("Final: %d atoms\n", nbatoms);
+#endif
+ transitions = (int *) xmlMalloc((nbstates + 1) *
+ (nbatoms + 1) * sizeof(int));
+ if (transitions == NULL) {
+ xmlFree(stateRemap);
+ xmlFree(stringRemap);
+ xmlFree(stringMap);
+ xmlFree(ret);
+ return(NULL);
+ }
+ memset(transitions, 0, (nbstates + 1) * (nbatoms + 1) * sizeof(int));
+
+ /*
+ * Allocate the transition table. The first entry for each
+ * state corresponds to the state type.
+ */
+ transdata = NULL;
+
+ for (i = 0;i < ret->nbStates;i++) {
+ int stateno, atomno, targetno, prev;
+ xmlRegStatePtr state;
+ xmlRegTransPtr trans;
+
+ stateno = stateRemap[i];
+ if (stateno == -1)
+ continue;
+ state = ret->states[i];
+
+ transitions[stateno * (nbatoms + 1)] = state->type;
+
+ for (j = 0;j < state->nbTrans;j++) {
+ trans = &(state->trans[j]);
+ if ((trans->to == -1) || (trans->atom == NULL))
+ continue;
+ atomno = stringRemap[trans->atom->no];
+ if ((trans->atom->data != NULL) && (transdata == NULL)) {
+ transdata = (void **) xmlMalloc(nbstates * nbatoms *
+ sizeof(void *));
+ if (transdata != NULL)
+ memset(transdata, 0,
+ nbstates * nbatoms * sizeof(void *));
+ else {
+ xmlRegexpErrMemory(ctxt, "compiling regexp");
+ break;
+ }
+ }
+ targetno = stateRemap[trans->to];
+ /*
+ * if the same atom can generate transitions to 2 different
+ * states then it means the automata is not determinist and
+ * the compact form can't be used !
+ */
+ prev = transitions[stateno * (nbatoms + 1) + atomno + 1];
+ if (prev != 0) {
+ if (prev != targetno + 1) {
+ ret->determinist = 0;
+#ifdef DEBUG_COMPACTION
+ printf("Indet: state %d trans %d, atom %d to %d : %d to %d\n",
+ i, j, trans->atom->no, trans->to, atomno, targetno);
+ printf(" previous to is %d\n", prev);
+#endif
+ if (transdata != NULL)
+ xmlFree(transdata);
+ xmlFree(transitions);
+ xmlFree(stateRemap);
+ xmlFree(stringRemap);
+ for (i = 0;i < nbatoms;i++)
+ xmlFree(stringMap[i]);
+ xmlFree(stringMap);
+ goto not_determ;
+ }
+ } else {
+#if 0
+ printf("State %d trans %d: atom %d to %d : %d to %d\n",
+ i, j, trans->atom->no, trans->to, atomno, targetno);
+#endif
+ transitions[stateno * (nbatoms + 1) + atomno + 1] =
+ targetno + 1; /* to avoid 0 */
+ if (transdata != NULL)
+ transdata[stateno * nbatoms + atomno] =
+ trans->atom->data;
+ }
+ }
+ }
+ ret->determinist = 1;
+#ifdef DEBUG_COMPACTION
+ /*
+ * Debug
+ */
+ for (i = 0;i < nbstates;i++) {
+ for (j = 0;j < nbatoms + 1;j++) {
+ printf("%02d ", transitions[i * (nbatoms + 1) + j]);
+ }
+ printf("\n");
+ }
+ printf("\n");
+#endif
+ /*
+ * Cleanup of the old data
+ */
+ if (ret->states != NULL) {
+ for (i = 0;i < ret->nbStates;i++)
+ xmlRegFreeState(ret->states[i]);
+ xmlFree(ret->states);
+ }
+ ret->states = NULL;
+ ret->nbStates = 0;
+ if (ret->atoms != NULL) {
+ for (i = 0;i < ret->nbAtoms;i++)
+ xmlRegFreeAtom(ret->atoms[i]);
+ xmlFree(ret->atoms);
+ }
+ ret->atoms = NULL;
+ ret->nbAtoms = 0;
+
+ ret->compact = transitions;
+ ret->transdata = transdata;
+ ret->stringMap = stringMap;
+ ret->nbstrings = nbatoms;
+ ret->nbstates = nbstates;
+ xmlFree(stateRemap);
+ xmlFree(stringRemap);
+ }
+not_determ:
+ ctxt->string = NULL;
+ ctxt->nbStates = 0;
+ ctxt->states = NULL;
+ ctxt->nbAtoms = 0;
+ ctxt->atoms = NULL;
+ ctxt->nbCounters = 0;
+ ctxt->counters = NULL;
+ return(ret);
+}
+
+/**
+ * xmlRegNewParserCtxt:
+ * @string: the string to parse
+ *
+ * Allocate a new regexp parser context
+ *
+ * Returns the new context or NULL in case of error
+ */
+static xmlRegParserCtxtPtr
+xmlRegNewParserCtxt(const xmlChar *string) {
+ xmlRegParserCtxtPtr ret;
+
+ ret = (xmlRegParserCtxtPtr) xmlMalloc(sizeof(xmlRegParserCtxt));
+ if (ret == NULL)
+ return(NULL);
+ memset(ret, 0, sizeof(xmlRegParserCtxt));
+ if (string != NULL)
+ ret->string = xmlStrdup(string);
+ ret->cur = ret->string;
+ ret->neg = 0;
+ ret->negs = 0;
+ ret->error = 0;
+ ret->determinist = -1;
+ return(ret);
+}
+
+/**
+ * xmlRegNewRange:
+ * @ctxt: the regexp parser context
+ * @neg: is that negative
+ * @type: the type of range
+ * @start: the start codepoint
+ * @end: the end codepoint
+ *
+ * Allocate a new regexp range
+ *
+ * Returns the new range or NULL in case of error
+ */
+static xmlRegRangePtr
+xmlRegNewRange(xmlRegParserCtxtPtr ctxt,
+ int neg, xmlRegAtomType type, int start, int end) {
+ xmlRegRangePtr ret;
+
+ ret = (xmlRegRangePtr) xmlMalloc(sizeof(xmlRegRange));
+ if (ret == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating range");
+ return(NULL);
+ }
+ ret->neg = neg;
+ ret->type = type;
+ ret->start = start;
+ ret->end = end;
+ return(ret);
+}
+
+/**
+ * xmlRegFreeRange:
+ * @range: the regexp range
+ *
+ * Free a regexp range
+ */
+static void
+xmlRegFreeRange(xmlRegRangePtr range) {
+ if (range == NULL)
+ return;
+
+ if (range->blockName != NULL)
+ xmlFree(range->blockName);
+ xmlFree(range);
+}
+
+/**
+ * xmlRegCopyRange:
+ * @range: the regexp range
+ *
+ * Copy a regexp range
+ *
+ * Returns the new copy or NULL in case of error.
+ */
+static xmlRegRangePtr
+xmlRegCopyRange(xmlRegParserCtxtPtr ctxt, xmlRegRangePtr range) {
+ xmlRegRangePtr ret;
+
+ if (range == NULL)
+ return(NULL);
+
+ ret = xmlRegNewRange(ctxt, range->neg, range->type, range->start,
+ range->end);
+ if (ret == NULL)
+ return(NULL);
+ if (range->blockName != NULL) {
+ ret->blockName = xmlStrdup(range->blockName);
+ if (ret->blockName == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating range");
+ xmlRegFreeRange(ret);
+ return(NULL);
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlRegNewAtom:
+ * @ctxt: the regexp parser context
+ * @type: the type of atom
+ *
+ * Allocate a new atom
+ *
+ * Returns the new atom or NULL in case of error
+ */
+static xmlRegAtomPtr
+xmlRegNewAtom(xmlRegParserCtxtPtr ctxt, xmlRegAtomType type) {
+ xmlRegAtomPtr ret;
+
+ ret = (xmlRegAtomPtr) xmlMalloc(sizeof(xmlRegAtom));
+ if (ret == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating atom");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlRegAtom));
+ ret->type = type;
+ ret->quant = XML_REGEXP_QUANT_ONCE;
+ ret->min = 0;
+ ret->max = 0;
+ return(ret);
+}
+
+/**
+ * xmlRegFreeAtom:
+ * @atom: the regexp atom
+ *
+ * Free a regexp atom
+ */
+static void
+xmlRegFreeAtom(xmlRegAtomPtr atom) {
+ int i;
+
+ if (atom == NULL)
+ return;
+
+ for (i = 0;i < atom->nbRanges;i++)
+ xmlRegFreeRange(atom->ranges[i]);
+ if (atom->ranges != NULL)
+ xmlFree(atom->ranges);
+ if ((atom->type == XML_REGEXP_STRING) && (atom->valuep != NULL))
+ xmlFree(atom->valuep);
+ if ((atom->type == XML_REGEXP_STRING) && (atom->valuep2 != NULL))
+ xmlFree(atom->valuep2);
+ if ((atom->type == XML_REGEXP_BLOCK_NAME) && (atom->valuep != NULL))
+ xmlFree(atom->valuep);
+ xmlFree(atom);
+}
+
+/**
+ * xmlRegCopyAtom:
+ * @ctxt: the regexp parser context
+ * @atom: the oiginal atom
+ *
+ * Allocate a new regexp range
+ *
+ * Returns the new atom or NULL in case of error
+ */
+static xmlRegAtomPtr
+xmlRegCopyAtom(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
+ xmlRegAtomPtr ret;
+
+ ret = (xmlRegAtomPtr) xmlMalloc(sizeof(xmlRegAtom));
+ if (ret == NULL) {
+ xmlRegexpErrMemory(ctxt, "copying atom");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlRegAtom));
+ ret->type = atom->type;
+ ret->quant = atom->quant;
+ ret->min = atom->min;
+ ret->max = atom->max;
+ if (atom->nbRanges > 0) {
+ int i;
+
+ ret->ranges = (xmlRegRangePtr *) xmlMalloc(sizeof(xmlRegRangePtr) *
+ atom->nbRanges);
+ if (ret->ranges == NULL) {
+ xmlRegexpErrMemory(ctxt, "copying atom");
+ goto error;
+ }
+ for (i = 0;i < atom->nbRanges;i++) {
+ ret->ranges[i] = xmlRegCopyRange(ctxt, atom->ranges[i]);
+ if (ret->ranges[i] == NULL)
+ goto error;
+ ret->nbRanges = i + 1;
+ }
+ }
+ return(ret);
+
+error:
+ xmlRegFreeAtom(ret);
+ return(NULL);
+}
+
+static xmlRegStatePtr
+xmlRegNewState(xmlRegParserCtxtPtr ctxt) {
+ xmlRegStatePtr ret;
+
+ ret = (xmlRegStatePtr) xmlMalloc(sizeof(xmlRegState));
+ if (ret == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating state");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlRegState));
+ ret->type = XML_REGEXP_TRANS_STATE;
+ ret->mark = XML_REGEXP_MARK_NORMAL;
+ return(ret);
+}
+
+/**
+ * xmlRegFreeState:
+ * @state: the regexp state
+ *
+ * Free a regexp state
+ */
+static void
+xmlRegFreeState(xmlRegStatePtr state) {
+ if (state == NULL)
+ return;
+
+ if (state->trans != NULL)
+ xmlFree(state->trans);
+ if (state->transTo != NULL)
+ xmlFree(state->transTo);
+ xmlFree(state);
+}
+
+/**
+ * xmlRegFreeParserCtxt:
+ * @ctxt: the regexp parser context
+ *
+ * Free a regexp parser context
+ */
+static void
+xmlRegFreeParserCtxt(xmlRegParserCtxtPtr ctxt) {
+ int i;
+ if (ctxt == NULL)
+ return;
+
+ if (ctxt->string != NULL)
+ xmlFree(ctxt->string);
+ if (ctxt->states != NULL) {
+ for (i = 0;i < ctxt->nbStates;i++)
+ xmlRegFreeState(ctxt->states[i]);
+ xmlFree(ctxt->states);
+ }
+ if (ctxt->atoms != NULL) {
+ for (i = 0;i < ctxt->nbAtoms;i++)
+ xmlRegFreeAtom(ctxt->atoms[i]);
+ xmlFree(ctxt->atoms);
+ }
+ if (ctxt->counters != NULL)
+ xmlFree(ctxt->counters);
+ xmlFree(ctxt);
+}
+
+/************************************************************************
+ * *
+ * Display of Data structures *
+ * *
+ ************************************************************************/
+
+static void
+xmlRegPrintAtomType(FILE *output, xmlRegAtomType type) {
+ switch (type) {
+ case XML_REGEXP_EPSILON:
+ fprintf(output, "epsilon "); break;
+ case XML_REGEXP_CHARVAL:
+ fprintf(output, "charval "); break;
+ case XML_REGEXP_RANGES:
+ fprintf(output, "ranges "); break;
+ case XML_REGEXP_SUBREG:
+ fprintf(output, "subexpr "); break;
+ case XML_REGEXP_STRING:
+ fprintf(output, "string "); break;
+ case XML_REGEXP_ANYCHAR:
+ fprintf(output, "anychar "); break;
+ case XML_REGEXP_ANYSPACE:
+ fprintf(output, "anyspace "); break;
+ case XML_REGEXP_NOTSPACE:
+ fprintf(output, "notspace "); break;
+ case XML_REGEXP_INITNAME:
+ fprintf(output, "initname "); break;
+ case XML_REGEXP_NOTINITNAME:
+ fprintf(output, "notinitname "); break;
+ case XML_REGEXP_NAMECHAR:
+ fprintf(output, "namechar "); break;
+ case XML_REGEXP_NOTNAMECHAR:
+ fprintf(output, "notnamechar "); break;
+ case XML_REGEXP_DECIMAL:
+ fprintf(output, "decimal "); break;
+ case XML_REGEXP_NOTDECIMAL:
+ fprintf(output, "notdecimal "); break;
+ case XML_REGEXP_REALCHAR:
+ fprintf(output, "realchar "); break;
+ case XML_REGEXP_NOTREALCHAR:
+ fprintf(output, "notrealchar "); break;
+ case XML_REGEXP_LETTER:
+ fprintf(output, "LETTER "); break;
+ case XML_REGEXP_LETTER_UPPERCASE:
+ fprintf(output, "LETTER_UPPERCASE "); break;
+ case XML_REGEXP_LETTER_LOWERCASE:
+ fprintf(output, "LETTER_LOWERCASE "); break;
+ case XML_REGEXP_LETTER_TITLECASE:
+ fprintf(output, "LETTER_TITLECASE "); break;
+ case XML_REGEXP_LETTER_MODIFIER:
+ fprintf(output, "LETTER_MODIFIER "); break;
+ case XML_REGEXP_LETTER_OTHERS:
+ fprintf(output, "LETTER_OTHERS "); break;
+ case XML_REGEXP_MARK:
+ fprintf(output, "MARK "); break;
+ case XML_REGEXP_MARK_NONSPACING:
+ fprintf(output, "MARK_NONSPACING "); break;
+ case XML_REGEXP_MARK_SPACECOMBINING:
+ fprintf(output, "MARK_SPACECOMBINING "); break;
+ case XML_REGEXP_MARK_ENCLOSING:
+ fprintf(output, "MARK_ENCLOSING "); break;
+ case XML_REGEXP_NUMBER:
+ fprintf(output, "NUMBER "); break;
+ case XML_REGEXP_NUMBER_DECIMAL:
+ fprintf(output, "NUMBER_DECIMAL "); break;
+ case XML_REGEXP_NUMBER_LETTER:
+ fprintf(output, "NUMBER_LETTER "); break;
+ case XML_REGEXP_NUMBER_OTHERS:
+ fprintf(output, "NUMBER_OTHERS "); break;
+ case XML_REGEXP_PUNCT:
+ fprintf(output, "PUNCT "); break;
+ case XML_REGEXP_PUNCT_CONNECTOR:
+ fprintf(output, "PUNCT_CONNECTOR "); break;
+ case XML_REGEXP_PUNCT_DASH:
+ fprintf(output, "PUNCT_DASH "); break;
+ case XML_REGEXP_PUNCT_OPEN:
+ fprintf(output, "PUNCT_OPEN "); break;
+ case XML_REGEXP_PUNCT_CLOSE:
+ fprintf(output, "PUNCT_CLOSE "); break;
+ case XML_REGEXP_PUNCT_INITQUOTE:
+ fprintf(output, "PUNCT_INITQUOTE "); break;
+ case XML_REGEXP_PUNCT_FINQUOTE:
+ fprintf(output, "PUNCT_FINQUOTE "); break;
+ case XML_REGEXP_PUNCT_OTHERS:
+ fprintf(output, "PUNCT_OTHERS "); break;
+ case XML_REGEXP_SEPAR:
+ fprintf(output, "SEPAR "); break;
+ case XML_REGEXP_SEPAR_SPACE:
+ fprintf(output, "SEPAR_SPACE "); break;
+ case XML_REGEXP_SEPAR_LINE:
+ fprintf(output, "SEPAR_LINE "); break;
+ case XML_REGEXP_SEPAR_PARA:
+ fprintf(output, "SEPAR_PARA "); break;
+ case XML_REGEXP_SYMBOL:
+ fprintf(output, "SYMBOL "); break;
+ case XML_REGEXP_SYMBOL_MATH:
+ fprintf(output, "SYMBOL_MATH "); break;
+ case XML_REGEXP_SYMBOL_CURRENCY:
+ fprintf(output, "SYMBOL_CURRENCY "); break;
+ case XML_REGEXP_SYMBOL_MODIFIER:
+ fprintf(output, "SYMBOL_MODIFIER "); break;
+ case XML_REGEXP_SYMBOL_OTHERS:
+ fprintf(output, "SYMBOL_OTHERS "); break;
+ case XML_REGEXP_OTHER:
+ fprintf(output, "OTHER "); break;
+ case XML_REGEXP_OTHER_CONTROL:
+ fprintf(output, "OTHER_CONTROL "); break;
+ case XML_REGEXP_OTHER_FORMAT:
+ fprintf(output, "OTHER_FORMAT "); break;
+ case XML_REGEXP_OTHER_PRIVATE:
+ fprintf(output, "OTHER_PRIVATE "); break;
+ case XML_REGEXP_OTHER_NA:
+ fprintf(output, "OTHER_NA "); break;
+ case XML_REGEXP_BLOCK_NAME:
+ fprintf(output, "BLOCK "); break;
+ }
+}
+
+static void
+xmlRegPrintQuantType(FILE *output, xmlRegQuantType type) {
+ switch (type) {
+ case XML_REGEXP_QUANT_EPSILON:
+ fprintf(output, "epsilon "); break;
+ case XML_REGEXP_QUANT_ONCE:
+ fprintf(output, "once "); break;
+ case XML_REGEXP_QUANT_OPT:
+ fprintf(output, "? "); break;
+ case XML_REGEXP_QUANT_MULT:
+ fprintf(output, "* "); break;
+ case XML_REGEXP_QUANT_PLUS:
+ fprintf(output, "+ "); break;
+ case XML_REGEXP_QUANT_RANGE:
+ fprintf(output, "range "); break;
+ case XML_REGEXP_QUANT_ONCEONLY:
+ fprintf(output, "onceonly "); break;
+ case XML_REGEXP_QUANT_ALL:
+ fprintf(output, "all "); break;
+ }
+}
+static void
+xmlRegPrintRange(FILE *output, xmlRegRangePtr range) {
+ fprintf(output, " range: ");
+ if (range->neg)
+ fprintf(output, "negative ");
+ xmlRegPrintAtomType(output, range->type);
+ fprintf(output, "%c - %c\n", range->start, range->end);
+}
+
+static void
+xmlRegPrintAtom(FILE *output, xmlRegAtomPtr atom) {
+ fprintf(output, " atom: ");
+ if (atom == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ if (atom->neg)
+ fprintf(output, "not ");
+ xmlRegPrintAtomType(output, atom->type);
+ xmlRegPrintQuantType(output, atom->quant);
+ if (atom->quant == XML_REGEXP_QUANT_RANGE)
+ fprintf(output, "%d-%d ", atom->min, atom->max);
+ if (atom->type == XML_REGEXP_STRING)
+ fprintf(output, "'%s' ", (char *) atom->valuep);
+ if (atom->type == XML_REGEXP_CHARVAL)
+ fprintf(output, "char %c\n", atom->codepoint);
+ else if (atom->type == XML_REGEXP_RANGES) {
+ int i;
+ fprintf(output, "%d entries\n", atom->nbRanges);
+ for (i = 0; i < atom->nbRanges;i++)
+ xmlRegPrintRange(output, atom->ranges[i]);
+ } else if (atom->type == XML_REGEXP_SUBREG) {
+ fprintf(output, "start %d end %d\n", atom->start->no, atom->stop->no);
+ } else {
+ fprintf(output, "\n");
+ }
+}
+
+static void
+xmlRegPrintTrans(FILE *output, xmlRegTransPtr trans) {
+ fprintf(output, " trans: ");
+ if (trans == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ if (trans->to < 0) {
+ fprintf(output, "removed\n");
+ return;
+ }
+ if (trans->nd != 0) {
+ if (trans->nd == 2)
+ fprintf(output, "last not determinist, ");
+ else
+ fprintf(output, "not determinist, ");
+ }
+ if (trans->counter >= 0) {
+ fprintf(output, "counted %d, ", trans->counter);
+ }
+ if (trans->count == REGEXP_ALL_COUNTER) {
+ fprintf(output, "all transition, ");
+ } else if (trans->count >= 0) {
+ fprintf(output, "count based %d, ", trans->count);
+ }
+ if (trans->atom == NULL) {
+ fprintf(output, "epsilon to %d\n", trans->to);
+ return;
+ }
+ if (trans->atom->type == XML_REGEXP_CHARVAL)
+ fprintf(output, "char %c ", trans->atom->codepoint);
+ fprintf(output, "atom %d, to %d\n", trans->atom->no, trans->to);
+}
+
+static void
+xmlRegPrintState(FILE *output, xmlRegStatePtr state) {
+ int i;
+
+ fprintf(output, " state: ");
+ if (state == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ if (state->type == XML_REGEXP_START_STATE)
+ fprintf(output, "START ");
+ if (state->type == XML_REGEXP_FINAL_STATE)
+ fprintf(output, "FINAL ");
+
+ fprintf(output, "%d, %d transitions:\n", state->no, state->nbTrans);
+ for (i = 0;i < state->nbTrans; i++) {
+ xmlRegPrintTrans(output, &(state->trans[i]));
+ }
+}
+
+#ifdef DEBUG_REGEXP_GRAPH
+static void
+xmlRegPrintCtxt(FILE *output, xmlRegParserCtxtPtr ctxt) {
+ int i;
+
+ fprintf(output, " ctxt: ");
+ if (ctxt == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ fprintf(output, "'%s' ", ctxt->string);
+ if (ctxt->error)
+ fprintf(output, "error ");
+ if (ctxt->neg)
+ fprintf(output, "neg ");
+ fprintf(output, "\n");
+ fprintf(output, "%d atoms:\n", ctxt->nbAtoms);
+ for (i = 0;i < ctxt->nbAtoms; i++) {
+ fprintf(output, " %02d ", i);
+ xmlRegPrintAtom(output, ctxt->atoms[i]);
+ }
+ if (ctxt->atom != NULL) {
+ fprintf(output, "current atom:\n");
+ xmlRegPrintAtom(output, ctxt->atom);
+ }
+ fprintf(output, "%d states:", ctxt->nbStates);
+ if (ctxt->start != NULL)
+ fprintf(output, " start: %d", ctxt->start->no);
+ if (ctxt->end != NULL)
+ fprintf(output, " end: %d", ctxt->end->no);
+ fprintf(output, "\n");
+ for (i = 0;i < ctxt->nbStates; i++) {
+ xmlRegPrintState(output, ctxt->states[i]);
+ }
+ fprintf(output, "%d counters:\n", ctxt->nbCounters);
+ for (i = 0;i < ctxt->nbCounters; i++) {
+ fprintf(output, " %d: min %d max %d\n", i, ctxt->counters[i].min,
+ ctxt->counters[i].max);
+ }
+}
+#endif
+
+/************************************************************************
+ * *
+ * Finite Automata structures manipulations *
+ * *
+ ************************************************************************/
+
+static void
+xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
+ int neg, xmlRegAtomType type, int start, int end,
+ xmlChar *blockName) {
+ xmlRegRangePtr range;
+
+ if (atom == NULL) {
+ ERROR("add range: atom is NULL");
+ return;
+ }
+ if (atom->type != XML_REGEXP_RANGES) {
+ ERROR("add range: atom is not ranges");
+ return;
+ }
+ if (atom->maxRanges == 0) {
+ atom->maxRanges = 4;
+ atom->ranges = (xmlRegRangePtr *) xmlMalloc(atom->maxRanges *
+ sizeof(xmlRegRangePtr));
+ if (atom->ranges == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding ranges");
+ atom->maxRanges = 0;
+ return;
+ }
+ } else if (atom->nbRanges >= atom->maxRanges) {
+ xmlRegRangePtr *tmp;
+ atom->maxRanges *= 2;
+ tmp = (xmlRegRangePtr *) xmlRealloc(atom->ranges, atom->maxRanges *
+ sizeof(xmlRegRangePtr));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding ranges");
+ atom->maxRanges /= 2;
+ return;
+ }
+ atom->ranges = tmp;
+ }
+ range = xmlRegNewRange(ctxt, neg, type, start, end);
+ if (range == NULL)
+ return;
+ range->blockName = blockName;
+ atom->ranges[atom->nbRanges++] = range;
+
+}
+
+static int
+xmlRegGetCounter(xmlRegParserCtxtPtr ctxt) {
+ if (ctxt->maxCounters == 0) {
+ ctxt->maxCounters = 4;
+ ctxt->counters = (xmlRegCounter *) xmlMalloc(ctxt->maxCounters *
+ sizeof(xmlRegCounter));
+ if (ctxt->counters == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating counter");
+ ctxt->maxCounters = 0;
+ return(-1);
+ }
+ } else if (ctxt->nbCounters >= ctxt->maxCounters) {
+ xmlRegCounter *tmp;
+ ctxt->maxCounters *= 2;
+ tmp = (xmlRegCounter *) xmlRealloc(ctxt->counters, ctxt->maxCounters *
+ sizeof(xmlRegCounter));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating counter");
+ ctxt->maxCounters /= 2;
+ return(-1);
+ }
+ ctxt->counters = tmp;
+ }
+ ctxt->counters[ctxt->nbCounters].min = -1;
+ ctxt->counters[ctxt->nbCounters].max = -1;
+ return(ctxt->nbCounters++);
+}
+
+static int
+xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
+ if (atom == NULL) {
+ ERROR("atom push: atom is NULL");
+ return(-1);
+ }
+ if (ctxt->maxAtoms == 0) {
+ ctxt->maxAtoms = 4;
+ ctxt->atoms = (xmlRegAtomPtr *) xmlMalloc(ctxt->maxAtoms *
+ sizeof(xmlRegAtomPtr));
+ if (ctxt->atoms == NULL) {
+ xmlRegexpErrMemory(ctxt, "pushing atom");
+ ctxt->maxAtoms = 0;
+ return(-1);
+ }
+ } else if (ctxt->nbAtoms >= ctxt->maxAtoms) {
+ xmlRegAtomPtr *tmp;
+ ctxt->maxAtoms *= 2;
+ tmp = (xmlRegAtomPtr *) xmlRealloc(ctxt->atoms, ctxt->maxAtoms *
+ sizeof(xmlRegAtomPtr));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "allocating counter");
+ ctxt->maxAtoms /= 2;
+ return(-1);
+ }
+ ctxt->atoms = tmp;
+ }
+ atom->no = ctxt->nbAtoms;
+ ctxt->atoms[ctxt->nbAtoms++] = atom;
+ return(0);
+}
+
+static void
+xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
+ int from) {
+ if (target->maxTransTo == 0) {
+ target->maxTransTo = 8;
+ target->transTo = (int *) xmlMalloc(target->maxTransTo *
+ sizeof(int));
+ if (target->transTo == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding transition");
+ target->maxTransTo = 0;
+ return;
+ }
+ } else if (target->nbTransTo >= target->maxTransTo) {
+ int *tmp;
+ target->maxTransTo *= 2;
+ tmp = (int *) xmlRealloc(target->transTo, target->maxTransTo *
+ sizeof(int));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding transition");
+ target->maxTransTo /= 2;
+ return;
+ }
+ target->transTo = tmp;
+ }
+ target->transTo[target->nbTransTo] = from;
+ target->nbTransTo++;
+}
+
+static void
+xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
+ xmlRegAtomPtr atom, xmlRegStatePtr target,
+ int counter, int count) {
+
+ int nrtrans;
+
+ if (state == NULL) {
+ ERROR("add state: state is NULL");
+ return;
+ }
+ if (target == NULL) {
+ ERROR("add state: target is NULL");
+ return;
+ }
+ /*
+ * Other routines follow the philosophy 'When in doubt, add a transition'
+ * so we check here whether such a transition is already present and, if
+ * so, silently ignore this request.
+ */
+
+ for (nrtrans = state->nbTrans - 1; nrtrans >= 0; nrtrans--) {
+ xmlRegTransPtr trans = &(state->trans[nrtrans]);
+ if ((trans->atom == atom) &&
+ (trans->to == target->no) &&
+ (trans->counter == counter) &&
+ (trans->count == count)) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Ignoring duplicate transition from %d to %d\n",
+ state->no, target->no);
+#endif
+ return;
+ }
+ }
+
+ if (state->maxTrans == 0) {
+ state->maxTrans = 8;
+ state->trans = (xmlRegTrans *) xmlMalloc(state->maxTrans *
+ sizeof(xmlRegTrans));
+ if (state->trans == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding transition");
+ state->maxTrans = 0;
+ return;
+ }
+ } else if (state->nbTrans >= state->maxTrans) {
+ xmlRegTrans *tmp;
+ state->maxTrans *= 2;
+ tmp = (xmlRegTrans *) xmlRealloc(state->trans, state->maxTrans *
+ sizeof(xmlRegTrans));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding transition");
+ state->maxTrans /= 2;
+ return;
+ }
+ state->trans = tmp;
+ }
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Add trans from %d to %d ", state->no, target->no);
+ if (count == REGEXP_ALL_COUNTER)
+ printf("all transition\n");
+ else if (count >= 0)
+ printf("count based %d\n", count);
+ else if (counter >= 0)
+ printf("counted %d\n", counter);
+ else if (atom == NULL)
+ printf("epsilon transition\n");
+ else if (atom != NULL)
+ xmlRegPrintAtom(stdout, atom);
+#endif
+
+ state->trans[state->nbTrans].atom = atom;
+ state->trans[state->nbTrans].to = target->no;
+ state->trans[state->nbTrans].counter = counter;
+ state->trans[state->nbTrans].count = count;
+ state->trans[state->nbTrans].nd = 0;
+ state->nbTrans++;
+ xmlRegStateAddTransTo(ctxt, target, state->no);
+}
+
+static int
+xmlRegStatePush(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state) {
+ if (state == NULL) return(-1);
+ if (ctxt->maxStates == 0) {
+ ctxt->maxStates = 4;
+ ctxt->states = (xmlRegStatePtr *) xmlMalloc(ctxt->maxStates *
+ sizeof(xmlRegStatePtr));
+ if (ctxt->states == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding state");
+ ctxt->maxStates = 0;
+ return(-1);
+ }
+ } else if (ctxt->nbStates >= ctxt->maxStates) {
+ xmlRegStatePtr *tmp;
+ ctxt->maxStates *= 2;
+ tmp = (xmlRegStatePtr *) xmlRealloc(ctxt->states, ctxt->maxStates *
+ sizeof(xmlRegStatePtr));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(ctxt, "adding state");
+ ctxt->maxStates /= 2;
+ return(-1);
+ }
+ ctxt->states = tmp;
+ }
+ state->no = ctxt->nbStates;
+ ctxt->states[ctxt->nbStates++] = state;
+ return(0);
+}
+
+/**
+ * xmlFAGenerateAllTransition:
+ * @ctxt: a regexp parser context
+ * @from: the from state
+ * @to: the target state or NULL for building a new one
+ * @lax:
+ *
+ */
+static void
+xmlFAGenerateAllTransition(xmlRegParserCtxtPtr ctxt,
+ xmlRegStatePtr from, xmlRegStatePtr to,
+ int lax) {
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, to);
+ ctxt->state = to;
+ }
+ if (lax)
+ xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER);
+ else
+ xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER);
+}
+
+/**
+ * xmlFAGenerateEpsilonTransition:
+ * @ctxt: a regexp parser context
+ * @from: the from state
+ * @to: the target state or NULL for building a new one
+ *
+ */
+static void
+xmlFAGenerateEpsilonTransition(xmlRegParserCtxtPtr ctxt,
+ xmlRegStatePtr from, xmlRegStatePtr to) {
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, to);
+ ctxt->state = to;
+ }
+ xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1);
+}
+
+/**
+ * xmlFAGenerateCountedEpsilonTransition:
+ * @ctxt: a regexp parser context
+ * @from: the from state
+ * @to: the target state or NULL for building a new one
+ * counter: the counter for that transition
+ *
+ */
+static void
+xmlFAGenerateCountedEpsilonTransition(xmlRegParserCtxtPtr ctxt,
+ xmlRegStatePtr from, xmlRegStatePtr to, int counter) {
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, to);
+ ctxt->state = to;
+ }
+ xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1);
+}
+
+/**
+ * xmlFAGenerateCountedTransition:
+ * @ctxt: a regexp parser context
+ * @from: the from state
+ * @to: the target state or NULL for building a new one
+ * counter: the counter for that transition
+ *
+ */
+static void
+xmlFAGenerateCountedTransition(xmlRegParserCtxtPtr ctxt,
+ xmlRegStatePtr from, xmlRegStatePtr to, int counter) {
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, to);
+ ctxt->state = to;
+ }
+ xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter);
+}
+
+/**
+ * xmlFAGenerateTransitions:
+ * @ctxt: a regexp parser context
+ * @from: the from state
+ * @to: the target state or NULL for building a new one
+ * @atom: the atom generating the transition
+ *
+ * Returns 0 if success and -1 in case of error.
+ */
+static int
+xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
+ xmlRegStatePtr to, xmlRegAtomPtr atom) {
+ xmlRegStatePtr end;
+
+ if (atom == NULL) {
+ ERROR("genrate transition: atom == NULL");
+ return(-1);
+ }
+ if (atom->type == XML_REGEXP_SUBREG) {
+ /*
+ * this is a subexpression handling one should not need to
+ * create a new node except for XML_REGEXP_QUANT_RANGE.
+ */
+ if (xmlRegAtomPush(ctxt, atom) < 0) {
+ return(-1);
+ }
+ if ((to != NULL) && (atom->stop != to) &&
+ (atom->quant != XML_REGEXP_QUANT_RANGE)) {
+ /*
+ * Generate an epsilon transition to link to the target
+ */
+ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
+#ifdef DV
+ } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
+ (atom->quant != XML_REGEXP_QUANT_ONCE)) {
+ to = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, to);
+ ctxt->state = to;
+ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
+#endif
+ }
+ switch (atom->quant) {
+ case XML_REGEXP_QUANT_OPT:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ /*
+ * transition done to the state after end of atom.
+ * 1. set transition from atom start to new state
+ * 2. set transition from atom end to this state.
+ */
+ if (to == NULL) {
+ xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0);
+ xmlFAGenerateEpsilonTransition(ctxt, atom->stop,
+ ctxt->state);
+ } else {
+ xmlFAGenerateEpsilonTransition(ctxt, atom->start, to);
+ }
+ break;
+ case XML_REGEXP_QUANT_MULT:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ xmlFAGenerateEpsilonTransition(ctxt, atom->start, atom->stop);
+ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, atom->start);
+ break;
+ case XML_REGEXP_QUANT_PLUS:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ xmlFAGenerateEpsilonTransition(ctxt, atom->stop, atom->start);
+ break;
+ case XML_REGEXP_QUANT_RANGE: {
+ int counter;
+ xmlRegStatePtr inter, newstate;
+
+ /*
+ * create the final state now if needed
+ */
+ if (to != NULL) {
+ newstate = to;
+ } else {
+ newstate = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, newstate);
+ }
+
+ /*
+ * The principle here is to use counted transition
+ * to avoid explosion in the number of states in the
+ * graph. This is clearly more complex but should not
+ * be exploitable at runtime.
+ */
+ if ((atom->min == 0) && (atom->start0 == NULL)) {
+ xmlRegAtomPtr copy;
+ /*
+ * duplicate a transition based on atom to count next
+ * occurences after 1. We cannot loop to atom->start
+ * directly because we need an epsilon transition to
+ * newstate.
+ */
+ /* ???? For some reason it seems we never reach that
+ case, I suppose this got optimized out before when
+ building the automata */
+ copy = xmlRegCopyAtom(ctxt, atom);
+ if (copy == NULL)
+ return(-1);
+ copy->quant = XML_REGEXP_QUANT_ONCE;
+ copy->min = 0;
+ copy->max = 0;
+
+ if (xmlFAGenerateTransitions(ctxt, atom->start, NULL, copy)
+ < 0)
+ return(-1);
+ inter = ctxt->state;
+ counter = xmlRegGetCounter(ctxt);
+ ctxt->counters[counter].min = atom->min - 1;
+ ctxt->counters[counter].max = atom->max - 1;
+ /* count the number of times we see it again */
+ xmlFAGenerateCountedEpsilonTransition(ctxt, inter,
+ atom->stop, counter);
+ /* allow a way out based on the count */
+ xmlFAGenerateCountedTransition(ctxt, inter,
+ newstate, counter);
+ /* and also allow a direct exit for 0 */
+ xmlFAGenerateEpsilonTransition(ctxt, atom->start,
+ newstate);
+ } else {
+ /*
+ * either we need the atom at least once or there
+ * is an atom->start0 allowing to easilly plug the
+ * epsilon transition.
+ */
+ counter = xmlRegGetCounter(ctxt);
+ ctxt->counters[counter].min = atom->min - 1;
+ ctxt->counters[counter].max = atom->max - 1;
+ /* count the number of times we see it again */
+ xmlFAGenerateCountedEpsilonTransition(ctxt, atom->stop,
+ atom->start, counter);
+ /* allow a way out based on the count */
+ xmlFAGenerateCountedTransition(ctxt, atom->stop,
+ newstate, counter);
+ /* and if needed allow a direct exit for 0 */
+ if (atom->min == 0)
+ xmlFAGenerateEpsilonTransition(ctxt, atom->start0,
+ newstate);
+
+ }
+ atom->min = 0;
+ atom->max = 0;
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ ctxt->state = newstate;
+ }
+ default:
+ break;
+ }
+ return(0);
+ }
+ if ((atom->min == 0) && (atom->max == 0) &&
+ (atom->quant == XML_REGEXP_QUANT_RANGE)) {
+ /*
+ * we can discard the atom and generate an epsilon transition instead
+ */
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ if (to != NULL)
+ xmlRegStatePush(ctxt, to);
+ else {
+ return(-1);
+ }
+ }
+ xmlFAGenerateEpsilonTransition(ctxt, from, to);
+ ctxt->state = to;
+ xmlRegFreeAtom(atom);
+ return(0);
+ }
+ if (to == NULL) {
+ to = xmlRegNewState(ctxt);
+ if (to != NULL)
+ xmlRegStatePush(ctxt, to);
+ else {
+ return(-1);
+ }
+ }
+ end = to;
+ if ((atom->quant == XML_REGEXP_QUANT_MULT) ||
+ (atom->quant == XML_REGEXP_QUANT_PLUS)) {
+ /*
+ * Do not pollute the target state by adding transitions from
+ * it as it is likely to be the shared target of multiple branches.
+ * So isolate with an epsilon transition.
+ */
+ xmlRegStatePtr tmp;
+
+ tmp = xmlRegNewState(ctxt);
+ if (tmp != NULL)
+ xmlRegStatePush(ctxt, tmp);
+ else {
+ return(-1);
+ }
+ xmlFAGenerateEpsilonTransition(ctxt, tmp, to);
+ to = tmp;
+ }
+ if (xmlRegAtomPush(ctxt, atom) < 0) {
+ return(-1);
+ }
+ xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1);
+ ctxt->state = end;
+ switch (atom->quant) {
+ case XML_REGEXP_QUANT_OPT:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ xmlFAGenerateEpsilonTransition(ctxt, from, to);
+ break;
+ case XML_REGEXP_QUANT_MULT:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ xmlFAGenerateEpsilonTransition(ctxt, from, to);
+ xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
+ break;
+ case XML_REGEXP_QUANT_PLUS:
+ atom->quant = XML_REGEXP_QUANT_ONCE;
+ xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
+ break;
+ case XML_REGEXP_QUANT_RANGE:
+#if DV_test
+ if (atom->min == 0) {
+ xmlFAGenerateEpsilonTransition(ctxt, from, to);
+ }
+#endif
+ break;
+ default:
+ break;
+ }
+ return(0);
+}
+
+/**
+ * xmlFAReduceEpsilonTransitions:
+ * @ctxt: a regexp parser context
+ * @fromnr: the from state
+ * @tonr: the to state
+ * @counter: should that transition be associated to a counted
+ *
+ */
+static void
+xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
+ int tonr, int counter) {
+ int transnr;
+ xmlRegStatePtr from;
+ xmlRegStatePtr to;
+
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("xmlFAReduceEpsilonTransitions(%d, %d)\n", fromnr, tonr);
+#endif
+ from = ctxt->states[fromnr];
+ if (from == NULL)
+ return;
+ to = ctxt->states[tonr];
+ if (to == NULL)
+ return;
+ if ((to->mark == XML_REGEXP_MARK_START) ||
+ (to->mark == XML_REGEXP_MARK_VISITED))
+ return;
+
+ to->mark = XML_REGEXP_MARK_VISITED;
+ if (to->type == XML_REGEXP_FINAL_STATE) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("State %d is final, so %d becomes final\n", tonr, fromnr);
+#endif
+ from->type = XML_REGEXP_FINAL_STATE;
+ }
+ for (transnr = 0;transnr < to->nbTrans;transnr++) {
+ if (to->trans[transnr].to < 0)
+ continue;
+ if (to->trans[transnr].atom == NULL) {
+ /*
+ * Don't remove counted transitions
+ * Don't loop either
+ */
+ if (to->trans[transnr].to != fromnr) {
+ if (to->trans[transnr].count >= 0) {
+ int newto = to->trans[transnr].to;
+
+ xmlRegStateAddTrans(ctxt, from, NULL,
+ ctxt->states[newto],
+ -1, to->trans[transnr].count);
+ } else {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Found epsilon trans %d from %d to %d\n",
+ transnr, tonr, to->trans[transnr].to);
+#endif
+ if (to->trans[transnr].counter >= 0) {
+ xmlFAReduceEpsilonTransitions(ctxt, fromnr,
+ to->trans[transnr].to,
+ to->trans[transnr].counter);
+ } else {
+ xmlFAReduceEpsilonTransitions(ctxt, fromnr,
+ to->trans[transnr].to,
+ counter);
+ }
+ }
+ }
+ } else {
+ int newto = to->trans[transnr].to;
+
+ if (to->trans[transnr].counter >= 0) {
+ xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
+ ctxt->states[newto],
+ to->trans[transnr].counter, -1);
+ } else {
+ xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
+ ctxt->states[newto], counter, -1);
+ }
+ }
+ }
+ to->mark = XML_REGEXP_MARK_NORMAL;
+}
+
+/**
+ * xmlFAEliminateSimpleEpsilonTransitions:
+ * @ctxt: a regexp parser context
+ *
+ * Eliminating general epsilon transitions can get costly in the general
+ * algorithm due to the large amount of generated new transitions and
+ * associated comparisons. However for simple epsilon transition used just
+ * to separate building blocks when generating the automata this can be
+ * reduced to state elimination:
+ * - if there exists an epsilon from X to Y
+ * - if there is no other transition from X
+ * then X and Y are semantically equivalent and X can be eliminated
+ * If X is the start state then make Y the start state, else replace the
+ * target of all transitions to X by transitions to Y.
+ */
+static void
+xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
+ int statenr, i, j, newto;
+ xmlRegStatePtr state, tmp;
+
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if (state == NULL)
+ continue;
+ if (state->nbTrans != 1)
+ continue;
+ if (state->type == XML_REGEXP_UNREACH_STATE)
+ continue;
+ /* is the only transition out a basic transition */
+ if ((state->trans[0].atom == NULL) &&
+ (state->trans[0].to >= 0) &&
+ (state->trans[0].to != statenr) &&
+ (state->trans[0].counter < 0) &&
+ (state->trans[0].count < 0)) {
+ newto = state->trans[0].to;
+
+ if (state->type == XML_REGEXP_START_STATE) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Found simple epsilon trans from start %d to %d\n",
+ statenr, newto);
+#endif
+ } else {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Found simple epsilon trans from %d to %d\n",
+ statenr, newto);
+#endif
+ for (i = 0;i < state->nbTransTo;i++) {
+ tmp = ctxt->states[state->transTo[i]];
+ for (j = 0;j < tmp->nbTrans;j++) {
+ if (tmp->trans[j].to == statenr) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Changed transition %d on %d to go to %d\n",
+ j, tmp->no, newto);
+#endif
+ tmp->trans[j].to = -1;
+ xmlRegStateAddTrans(ctxt, tmp, tmp->trans[j].atom,
+ ctxt->states[newto],
+ tmp->trans[j].counter,
+ tmp->trans[j].count);
+ }
+ }
+ }
+ if (state->type == XML_REGEXP_FINAL_STATE)
+ ctxt->states[newto]->type = XML_REGEXP_FINAL_STATE;
+ /* eliminate the transition completely */
+ state->nbTrans = 0;
+
+ state->type = XML_REGEXP_UNREACH_STATE;
+
+ }
+
+ }
+ }
+}
+/**
+ * xmlFAEliminateEpsilonTransitions:
+ * @ctxt: a regexp parser context
+ *
+ */
+static void
+xmlFAEliminateEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
+ int statenr, transnr;
+ xmlRegStatePtr state;
+ int has_epsilon;
+
+ if (ctxt->states == NULL) return;
+
+ /*
+ * Eliminate simple epsilon transition and the associated unreachable
+ * states.
+ */
+ xmlFAEliminateSimpleEpsilonTransitions(ctxt);
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if ((state != NULL) && (state->type == XML_REGEXP_UNREACH_STATE)) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Removed unreachable state %d\n", statenr);
+#endif
+ xmlRegFreeState(state);
+ ctxt->states[statenr] = NULL;
+ }
+ }
+
+ has_epsilon = 0;
+
+ /*
+ * Build the completed transitions bypassing the epsilons
+ * Use a marking algorithm to avoid loops
+ * Mark sink states too.
+ * Process from the latests states backward to the start when
+ * there is long cascading epsilon chains this minimize the
+ * recursions and transition compares when adding the new ones
+ */
+ for (statenr = ctxt->nbStates - 1;statenr >= 0;statenr--) {
+ state = ctxt->states[statenr];
+ if (state == NULL)
+ continue;
+ if ((state->nbTrans == 0) &&
+ (state->type != XML_REGEXP_FINAL_STATE)) {
+ state->type = XML_REGEXP_SINK_STATE;
+ }
+ for (transnr = 0;transnr < state->nbTrans;transnr++) {
+ if ((state->trans[transnr].atom == NULL) &&
+ (state->trans[transnr].to >= 0)) {
+ if (state->trans[transnr].to == statenr) {
+ state->trans[transnr].to = -1;
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Removed loopback epsilon trans %d on %d\n",
+ transnr, statenr);
+#endif
+ } else if (state->trans[transnr].count < 0) {
+ int newto = state->trans[transnr].to;
+
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Found epsilon trans %d from %d to %d\n",
+ transnr, statenr, newto);
+#endif
+ has_epsilon = 1;
+ state->trans[transnr].to = -2;
+ state->mark = XML_REGEXP_MARK_START;
+ xmlFAReduceEpsilonTransitions(ctxt, statenr,
+ newto, state->trans[transnr].counter);
+ state->mark = XML_REGEXP_MARK_NORMAL;
+#ifdef DEBUG_REGEXP_GRAPH
+ } else {
+ printf("Found counted transition %d on %d\n",
+ transnr, statenr);
+#endif
+ }
+ }
+ }
+ }
+ /*
+ * Eliminate the epsilon transitions
+ */
+ if (has_epsilon) {
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if (state == NULL)
+ continue;
+ for (transnr = 0;transnr < state->nbTrans;transnr++) {
+ xmlRegTransPtr trans = &(state->trans[transnr]);
+ if ((trans->atom == NULL) &&
+ (trans->count < 0) &&
+ (trans->to >= 0)) {
+ trans->to = -1;
+ }
+ }
+ }
+ }
+
+ /*
+ * Use this pass to detect unreachable states too
+ */
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if (state != NULL)
+ state->reached = XML_REGEXP_MARK_NORMAL;
+ }
+ state = ctxt->states[0];
+ if (state != NULL)
+ state->reached = XML_REGEXP_MARK_START;
+ while (state != NULL) {
+ xmlRegStatePtr target = NULL;
+ state->reached = XML_REGEXP_MARK_VISITED;
+ /*
+ * Mark all states reachable from the current reachable state
+ */
+ for (transnr = 0;transnr < state->nbTrans;transnr++) {
+ if ((state->trans[transnr].to >= 0) &&
+ ((state->trans[transnr].atom != NULL) ||
+ (state->trans[transnr].count >= 0))) {
+ int newto = state->trans[transnr].to;
+
+ if (ctxt->states[newto] == NULL)
+ continue;
+ if (ctxt->states[newto]->reached == XML_REGEXP_MARK_NORMAL) {
+ ctxt->states[newto]->reached = XML_REGEXP_MARK_START;
+ target = ctxt->states[newto];
+ }
+ }
+ }
+
+ /*
+ * find the next accessible state not explored
+ */
+ if (target == NULL) {
+ for (statenr = 1;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if ((state != NULL) && (state->reached ==
+ XML_REGEXP_MARK_START)) {
+ target = state;
+ break;
+ }
+ }
+ }
+ state = target;
+ }
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if ((state != NULL) && (state->reached == XML_REGEXP_MARK_NORMAL)) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("Removed unreachable state %d\n", statenr);
+#endif
+ xmlRegFreeState(state);
+ ctxt->states[statenr] = NULL;
+ }
+ }
+
+}
+
+static int
+xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
+ int ret = 0;
+
+ if ((range1->type == XML_REGEXP_RANGES) ||
+ (range2->type == XML_REGEXP_RANGES) ||
+ (range2->type == XML_REGEXP_SUBREG) ||
+ (range1->type == XML_REGEXP_SUBREG) ||
+ (range1->type == XML_REGEXP_STRING) ||
+ (range2->type == XML_REGEXP_STRING))
+ return(-1);
+
+ /* put them in order */
+ if (range1->type > range2->type) {
+ xmlRegRangePtr tmp;
+
+ tmp = range1;
+ range1 = range2;
+ range2 = tmp;
+ }
+ if ((range1->type == XML_REGEXP_ANYCHAR) ||
+ (range2->type == XML_REGEXP_ANYCHAR)) {
+ ret = 1;
+ } else if ((range1->type == XML_REGEXP_EPSILON) ||
+ (range2->type == XML_REGEXP_EPSILON)) {
+ return(0);
+ } else if (range1->type == range2->type) {
+ if (range1->type != XML_REGEXP_CHARVAL)
+ ret = 1;
+ else if ((range1->end < range2->start) ||
+ (range2->end < range1->start))
+ ret = 0;
+ else
+ ret = 1;
+ } else if (range1->type == XML_REGEXP_CHARVAL) {
+ int codepoint;
+ int neg = 0;
+
+ /*
+ * just check all codepoints in the range for acceptance,
+ * this is usually way cheaper since done only once at
+ * compilation than testing over and over at runtime or
+ * pushing too many states when evaluating.
+ */
+ if (((range1->neg == 0) && (range2->neg != 0)) ||
+ ((range1->neg != 0) && (range2->neg == 0)))
+ neg = 1;
+
+ for (codepoint = range1->start;codepoint <= range1->end ;codepoint++) {
+ ret = xmlRegCheckCharacterRange(range2->type, codepoint,
+ 0, range2->start, range2->end,
+ range2->blockName);
+ if (ret < 0)
+ return(-1);
+ if (((neg == 1) && (ret == 0)) ||
+ ((neg == 0) && (ret == 1)))
+ return(1);
+ }
+ return(0);
+ } else if ((range1->type == XML_REGEXP_BLOCK_NAME) ||
+ (range2->type == XML_REGEXP_BLOCK_NAME)) {
+ if (range1->type == range2->type) {
+ ret = xmlStrEqual(range1->blockName, range2->blockName);
+ } else {
+ /*
+ * comparing a block range with anything else is way
+ * too costly, and maintining the table is like too much
+ * memory too, so let's force the automata to save state
+ * here.
+ */
+ return(1);
+ }
+ } else if ((range1->type < XML_REGEXP_LETTER) ||
+ (range2->type < XML_REGEXP_LETTER)) {
+ if ((range1->type == XML_REGEXP_ANYSPACE) &&
+ (range2->type == XML_REGEXP_NOTSPACE))
+ ret = 0;
+ else if ((range1->type == XML_REGEXP_INITNAME) &&
+ (range2->type == XML_REGEXP_NOTINITNAME))
+ ret = 0;
+ else if ((range1->type == XML_REGEXP_NAMECHAR) &&
+ (range2->type == XML_REGEXP_NOTNAMECHAR))
+ ret = 0;
+ else if ((range1->type == XML_REGEXP_DECIMAL) &&
+ (range2->type == XML_REGEXP_NOTDECIMAL))
+ ret = 0;
+ else if ((range1->type == XML_REGEXP_REALCHAR) &&
+ (range2->type == XML_REGEXP_NOTREALCHAR))
+ ret = 0;
+ else {
+ /* same thing to limit complexity */
+ return(1);
+ }
+ } else {
+ ret = 0;
+ /* range1->type < range2->type here */
+ switch (range1->type) {
+ case XML_REGEXP_LETTER:
+ /* all disjoint except in the subgroups */
+ if ((range2->type == XML_REGEXP_LETTER_UPPERCASE) ||
+ (range2->type == XML_REGEXP_LETTER_LOWERCASE) ||
+ (range2->type == XML_REGEXP_LETTER_TITLECASE) ||
+ (range2->type == XML_REGEXP_LETTER_MODIFIER) ||
+ (range2->type == XML_REGEXP_LETTER_OTHERS))
+ ret = 1;
+ break;
+ case XML_REGEXP_MARK:
+ if ((range2->type == XML_REGEXP_MARK_NONSPACING) ||
+ (range2->type == XML_REGEXP_MARK_SPACECOMBINING) ||
+ (range2->type == XML_REGEXP_MARK_ENCLOSING))
+ ret = 1;
+ break;
+ case XML_REGEXP_NUMBER:
+ if ((range2->type == XML_REGEXP_NUMBER_DECIMAL) ||
+ (range2->type == XML_REGEXP_NUMBER_LETTER) ||
+ (range2->type == XML_REGEXP_NUMBER_OTHERS))
+ ret = 1;
+ break;
+ case XML_REGEXP_PUNCT:
+ if ((range2->type == XML_REGEXP_PUNCT_CONNECTOR) ||
+ (range2->type == XML_REGEXP_PUNCT_DASH) ||
+ (range2->type == XML_REGEXP_PUNCT_OPEN) ||
+ (range2->type == XML_REGEXP_PUNCT_CLOSE) ||
+ (range2->type == XML_REGEXP_PUNCT_INITQUOTE) ||
+ (range2->type == XML_REGEXP_PUNCT_FINQUOTE) ||
+ (range2->type == XML_REGEXP_PUNCT_OTHERS))
+ ret = 1;
+ break;
+ case XML_REGEXP_SEPAR:
+ if ((range2->type == XML_REGEXP_SEPAR_SPACE) ||
+ (range2->type == XML_REGEXP_SEPAR_LINE) ||
+ (range2->type == XML_REGEXP_SEPAR_PARA))
+ ret = 1;
+ break;
+ case XML_REGEXP_SYMBOL:
+ if ((range2->type == XML_REGEXP_SYMBOL_MATH) ||
+ (range2->type == XML_REGEXP_SYMBOL_CURRENCY) ||
+ (range2->type == XML_REGEXP_SYMBOL_MODIFIER) ||
+ (range2->type == XML_REGEXP_SYMBOL_OTHERS))
+ ret = 1;
+ break;
+ case XML_REGEXP_OTHER:
+ if ((range2->type == XML_REGEXP_OTHER_CONTROL) ||
+ (range2->type == XML_REGEXP_OTHER_FORMAT) ||
+ (range2->type == XML_REGEXP_OTHER_PRIVATE))
+ ret = 1;
+ break;
+ default:
+ if ((range2->type >= XML_REGEXP_LETTER) &&
+ (range2->type < XML_REGEXP_BLOCK_NAME))
+ ret = 0;
+ else {
+ /* safety net ! */
+ return(1);
+ }
+ }
+ }
+ if (((range1->neg == 0) && (range2->neg != 0)) ||
+ ((range1->neg != 0) && (range2->neg == 0)))
+ ret = !ret;
+ return(ret);
+}
+
+/**
+ * xmlFACompareAtomTypes:
+ * @type1: an atom type
+ * @type2: an atom type
+ *
+ * Compares two atoms type to check whether they intersect in some ways,
+ * this is used by xmlFACompareAtoms only
+ *
+ * Returns 1 if they may intersect and 0 otherwise
+ */
+static int
+xmlFACompareAtomTypes(xmlRegAtomType type1, xmlRegAtomType type2) {
+ if ((type1 == XML_REGEXP_EPSILON) ||
+ (type1 == XML_REGEXP_CHARVAL) ||
+ (type1 == XML_REGEXP_RANGES) ||
+ (type1 == XML_REGEXP_SUBREG) ||
+ (type1 == XML_REGEXP_STRING) ||
+ (type1 == XML_REGEXP_ANYCHAR))
+ return(1);
+ if ((type2 == XML_REGEXP_EPSILON) ||
+ (type2 == XML_REGEXP_CHARVAL) ||
+ (type2 == XML_REGEXP_RANGES) ||
+ (type2 == XML_REGEXP_SUBREG) ||
+ (type2 == XML_REGEXP_STRING) ||
+ (type2 == XML_REGEXP_ANYCHAR))
+ return(1);
+
+ if (type1 == type2) return(1);
+
+ /* simplify subsequent compares by making sure type1 < type2 */
+ if (type1 > type2) {
+ xmlRegAtomType tmp = type1;
+ type1 = type2;
+ type2 = tmp;
+ }
+ switch (type1) {
+ case XML_REGEXP_ANYSPACE: /* \s */
+ /* can't be a letter, number, mark, pontuation, symbol */
+ if ((type2 == XML_REGEXP_NOTSPACE) ||
+ ((type2 >= XML_REGEXP_LETTER) &&
+ (type2 <= XML_REGEXP_LETTER_OTHERS)) ||
+ ((type2 >= XML_REGEXP_NUMBER) &&
+ (type2 <= XML_REGEXP_NUMBER_OTHERS)) ||
+ ((type2 >= XML_REGEXP_MARK) &&
+ (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
+ ((type2 >= XML_REGEXP_PUNCT) &&
+ (type2 <= XML_REGEXP_PUNCT_OTHERS)) ||
+ ((type2 >= XML_REGEXP_SYMBOL) &&
+ (type2 <= XML_REGEXP_SYMBOL_OTHERS))
+ ) return(0);
+ break;
+ case XML_REGEXP_NOTSPACE: /* \S */
+ break;
+ case XML_REGEXP_INITNAME: /* \l */
+ /* can't be a number, mark, separator, pontuation, symbol or other */
+ if ((type2 == XML_REGEXP_NOTINITNAME) ||
+ ((type2 >= XML_REGEXP_NUMBER) &&
+ (type2 <= XML_REGEXP_NUMBER_OTHERS)) ||
+ ((type2 >= XML_REGEXP_MARK) &&
+ (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
+ ((type2 >= XML_REGEXP_SEPAR) &&
+ (type2 <= XML_REGEXP_SEPAR_PARA)) ||
+ ((type2 >= XML_REGEXP_PUNCT) &&
+ (type2 <= XML_REGEXP_PUNCT_OTHERS)) ||
+ ((type2 >= XML_REGEXP_SYMBOL) &&
+ (type2 <= XML_REGEXP_SYMBOL_OTHERS)) ||
+ ((type2 >= XML_REGEXP_OTHER) &&
+ (type2 <= XML_REGEXP_OTHER_NA))
+ ) return(0);
+ break;
+ case XML_REGEXP_NOTINITNAME: /* \L */
+ break;
+ case XML_REGEXP_NAMECHAR: /* \c */
+ /* can't be a mark, separator, pontuation, symbol or other */
+ if ((type2 == XML_REGEXP_NOTNAMECHAR) ||
+ ((type2 >= XML_REGEXP_MARK) &&
+ (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
+ ((type2 >= XML_REGEXP_PUNCT) &&
+ (type2 <= XML_REGEXP_PUNCT_OTHERS)) ||
+ ((type2 >= XML_REGEXP_SEPAR) &&
+ (type2 <= XML_REGEXP_SEPAR_PARA)) ||
+ ((type2 >= XML_REGEXP_SYMBOL) &&
+ (type2 <= XML_REGEXP_SYMBOL_OTHERS)) ||
+ ((type2 >= XML_REGEXP_OTHER) &&
+ (type2 <= XML_REGEXP_OTHER_NA))
+ ) return(0);
+ break;
+ case XML_REGEXP_NOTNAMECHAR: /* \C */
+ break;
+ case XML_REGEXP_DECIMAL: /* \d */
+ /* can't be a letter, mark, separator, pontuation, symbol or other */
+ if ((type2 == XML_REGEXP_NOTDECIMAL) ||
+ (type2 == XML_REGEXP_REALCHAR) ||
+ ((type2 >= XML_REGEXP_LETTER) &&
+ (type2 <= XML_REGEXP_LETTER_OTHERS)) ||
+ ((type2 >= XML_REGEXP_MARK) &&
+ (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
+ ((type2 >= XML_REGEXP_PUNCT) &&
+ (type2 <= XML_REGEXP_PUNCT_OTHERS)) ||
+ ((type2 >= XML_REGEXP_SEPAR) &&
+ (type2 <= XML_REGEXP_SEPAR_PARA)) ||
+ ((type2 >= XML_REGEXP_SYMBOL) &&
+ (type2 <= XML_REGEXP_SYMBOL_OTHERS)) ||
+ ((type2 >= XML_REGEXP_OTHER) &&
+ (type2 <= XML_REGEXP_OTHER_NA))
+ )return(0);
+ break;
+ case XML_REGEXP_NOTDECIMAL: /* \D */
+ break;
+ case XML_REGEXP_REALCHAR: /* \w */
+ /* can't be a mark, separator, pontuation, symbol or other */
+ if ((type2 == XML_REGEXP_NOTDECIMAL) ||
+ ((type2 >= XML_REGEXP_MARK) &&
+ (type2 <= XML_REGEXP_MARK_ENCLOSING)) ||
+ ((type2 >= XML_REGEXP_PUNCT) &&
+ (type2 <= XML_REGEXP_PUNCT_OTHERS)) ||
+ ((type2 >= XML_REGEXP_SEPAR) &&
+ (type2 <= XML_REGEXP_SEPAR_PARA)) ||
+ ((type2 >= XML_REGEXP_SYMBOL) &&
+ (type2 <= XML_REGEXP_SYMBOL_OTHERS)) ||
+ ((type2 >= XML_REGEXP_OTHER) &&
+ (type2 <= XML_REGEXP_OTHER_NA))
+ )return(0);
+ break;
+ case XML_REGEXP_NOTREALCHAR: /* \W */
+ break;
+ /*
+ * at that point we know both type 1 and type2 are from
+ * character categories are ordered and are different,
+ * it becomes simple because this is a partition
+ */
+ case XML_REGEXP_LETTER:
+ if (type2 <= XML_REGEXP_LETTER_OTHERS)
+ return(1);
+ return(0);
+ case XML_REGEXP_LETTER_UPPERCASE:
+ case XML_REGEXP_LETTER_LOWERCASE:
+ case XML_REGEXP_LETTER_TITLECASE:
+ case XML_REGEXP_LETTER_MODIFIER:
+ case XML_REGEXP_LETTER_OTHERS:
+ return(0);
+ case XML_REGEXP_MARK:
+ if (type2 <= XML_REGEXP_MARK_ENCLOSING)
+ return(1);
+ return(0);
+ case XML_REGEXP_MARK_NONSPACING:
+ case XML_REGEXP_MARK_SPACECOMBINING:
+ case XML_REGEXP_MARK_ENCLOSING:
+ return(0);
+ case XML_REGEXP_NUMBER:
+ if (type2 <= XML_REGEXP_NUMBER_OTHERS)
+ return(1);
+ return(0);
+ case XML_REGEXP_NUMBER_DECIMAL:
+ case XML_REGEXP_NUMBER_LETTER:
+ case XML_REGEXP_NUMBER_OTHERS:
+ return(0);
+ case XML_REGEXP_PUNCT:
+ if (type2 <= XML_REGEXP_PUNCT_OTHERS)
+ return(1);
+ return(0);
+ case XML_REGEXP_PUNCT_CONNECTOR:
+ case XML_REGEXP_PUNCT_DASH:
+ case XML_REGEXP_PUNCT_OPEN:
+ case XML_REGEXP_PUNCT_CLOSE:
+ case XML_REGEXP_PUNCT_INITQUOTE:
+ case XML_REGEXP_PUNCT_FINQUOTE:
+ case XML_REGEXP_PUNCT_OTHERS:
+ return(0);
+ case XML_REGEXP_SEPAR:
+ if (type2 <= XML_REGEXP_SEPAR_PARA)
+ return(1);
+ return(0);
+ case XML_REGEXP_SEPAR_SPACE:
+ case XML_REGEXP_SEPAR_LINE:
+ case XML_REGEXP_SEPAR_PARA:
+ return(0);
+ case XML_REGEXP_SYMBOL:
+ if (type2 <= XML_REGEXP_SYMBOL_OTHERS)
+ return(1);
+ return(0);
+ case XML_REGEXP_SYMBOL_MATH:
+ case XML_REGEXP_SYMBOL_CURRENCY:
+ case XML_REGEXP_SYMBOL_MODIFIER:
+ case XML_REGEXP_SYMBOL_OTHERS:
+ return(0);
+ case XML_REGEXP_OTHER:
+ if (type2 <= XML_REGEXP_OTHER_NA)
+ return(1);
+ return(0);
+ case XML_REGEXP_OTHER_CONTROL:
+ case XML_REGEXP_OTHER_FORMAT:
+ case XML_REGEXP_OTHER_PRIVATE:
+ case XML_REGEXP_OTHER_NA:
+ return(0);
+ default:
+ break;
+ }
+ return(1);
+}
+
+/**
+ * xmlFAEqualAtoms:
+ * @atom1: an atom
+ * @atom2: an atom
+ * @deep: if not set only compare string pointers
+ *
+ * Compares two atoms to check whether they are the same exactly
+ * this is used to remove equivalent transitions
+ *
+ * Returns 1 if same and 0 otherwise
+ */
+static int
+xmlFAEqualAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2, int deep) {
+ int ret = 0;
+
+ if (atom1 == atom2)
+ return(1);
+ if ((atom1 == NULL) || (atom2 == NULL))
+ return(0);
+
+ if (atom1->type != atom2->type)
+ return(0);
+ switch (atom1->type) {
+ case XML_REGEXP_EPSILON:
+ ret = 0;
+ break;
+ case XML_REGEXP_STRING:
+ if (!deep)
+ ret = (atom1->valuep == atom2->valuep);
+ else
+ ret = xmlStrEqual((xmlChar *)atom1->valuep,
+ (xmlChar *)atom2->valuep);
+ break;
+ case XML_REGEXP_CHARVAL:
+ ret = (atom1->codepoint == atom2->codepoint);
+ break;
+ case XML_REGEXP_RANGES:
+ /* too hard to do in the general case */
+ ret = 0;
+ default:
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlFACompareAtoms:
+ * @atom1: an atom
+ * @atom2: an atom
+ * @deep: if not set only compare string pointers
+ *
+ * Compares two atoms to check whether they intersect in some ways,
+ * this is used by xmlFAComputesDeterminism and xmlFARecurseDeterminism only
+ *
+ * Returns 1 if yes and 0 otherwise
+ */
+static int
+xmlFACompareAtoms(xmlRegAtomPtr atom1, xmlRegAtomPtr atom2, int deep) {
+ int ret = 1;
+
+ if (atom1 == atom2)
+ return(1);
+ if ((atom1 == NULL) || (atom2 == NULL))
+ return(0);
+
+ if ((atom1->type == XML_REGEXP_ANYCHAR) ||
+ (atom2->type == XML_REGEXP_ANYCHAR))
+ return(1);
+
+ if (atom1->type > atom2->type) {
+ xmlRegAtomPtr tmp;
+ tmp = atom1;
+ atom1 = atom2;
+ atom2 = tmp;
+ }
+ if (atom1->type != atom2->type) {
+ ret = xmlFACompareAtomTypes(atom1->type, atom2->type);
+ /* if they can't intersect at the type level break now */
+ if (ret == 0)
+ return(0);
+ }
+ switch (atom1->type) {
+ case XML_REGEXP_STRING:
+ if (!deep)
+ ret = (atom1->valuep != atom2->valuep);
+ else
+ ret = xmlRegStrEqualWildcard((xmlChar *)atom1->valuep,
+ (xmlChar *)atom2->valuep);
+ break;
+ case XML_REGEXP_EPSILON:
+ goto not_determinist;
+ case XML_REGEXP_CHARVAL:
+ if (atom2->type == XML_REGEXP_CHARVAL) {
+ ret = (atom1->codepoint == atom2->codepoint);
+ } else {
+ ret = xmlRegCheckCharacter(atom2, atom1->codepoint);
+ if (ret < 0)
+ ret = 1;
+ }
+ break;
+ case XML_REGEXP_RANGES:
+ if (atom2->type == XML_REGEXP_RANGES) {
+ int i, j, res;
+ xmlRegRangePtr r1, r2;
+
+ /*
+ * need to check that none of the ranges eventually matches
+ */
+ for (i = 0;i < atom1->nbRanges;i++) {
+ for (j = 0;j < atom2->nbRanges;j++) {
+ r1 = atom1->ranges[i];
+ r2 = atom2->ranges[j];
+ res = xmlFACompareRanges(r1, r2);
+ if (res == 1) {
+ ret = 1;
+ goto done;
+ }
+ }
+ }
+ ret = 0;
+ }
+ break;
+ default:
+ goto not_determinist;
+ }
+done:
+ if (atom1->neg != atom2->neg) {
+ ret = !ret;
+ }
+ if (ret == 0)
+ return(0);
+not_determinist:
+ return(1);
+}
+
+/**
+ * xmlFARecurseDeterminism:
+ * @ctxt: a regexp parser context
+ *
+ * Check whether the associated regexp is determinist,
+ * should be called after xmlFAEliminateEpsilonTransitions()
+ *
+ */
+static int
+xmlFARecurseDeterminism(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
+ int to, xmlRegAtomPtr atom) {
+ int ret = 1;
+ int res;
+ int transnr, nbTrans;
+ xmlRegTransPtr t1;
+ int deep = 1;
+
+ if (state == NULL)
+ return(ret);
+ if (state->markd == XML_REGEXP_MARK_VISITED)
+ return(ret);
+
+ if (ctxt->flags & AM_AUTOMATA_RNG)
+ deep = 0;
+
+ /*
+ * don't recurse on transitions potentially added in the course of
+ * the elimination.
+ */
+ nbTrans = state->nbTrans;
+ for (transnr = 0;transnr < nbTrans;transnr++) {
+ t1 = &(state->trans[transnr]);
+ /*
+ * check transitions conflicting with the one looked at
+ */
+ if (t1->atom == NULL) {
+ if (t1->to < 0)
+ continue;
+ state->markd = XML_REGEXP_MARK_VISITED;
+ res = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
+ to, atom);
+ state->markd = 0;
+ if (res == 0) {
+ ret = 0;
+ /* t1->nd = 1; */
+ }
+ continue;
+ }
+ if (t1->to != to)
+ continue;
+ if (xmlFACompareAtoms(t1->atom, atom, deep)) {
+ ret = 0;
+ /* mark the transition as non-deterministic */
+ t1->nd = 1;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlFAComputesDeterminism:
+ * @ctxt: a regexp parser context
+ *
+ * Check whether the associated regexp is determinist,
+ * should be called after xmlFAEliminateEpsilonTransitions()
+ *
+ */
+static int
+xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
+ int statenr, transnr;
+ xmlRegStatePtr state;
+ xmlRegTransPtr t1, t2, last;
+ int i;
+ int ret = 1;
+ int deep = 1;
+
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("xmlFAComputesDeterminism\n");
+ xmlRegPrintCtxt(stdout, ctxt);
+#endif
+ if (ctxt->determinist != -1)
+ return(ctxt->determinist);
+
+ if (ctxt->flags & AM_AUTOMATA_RNG)
+ deep = 0;
+
+ /*
+ * First cleanup the automata removing cancelled transitions
+ */
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if (state == NULL)
+ continue;
+ if (state->nbTrans < 2)
+ continue;
+ for (transnr = 0;transnr < state->nbTrans;transnr++) {
+ t1 = &(state->trans[transnr]);
+ /*
+ * Determinism checks in case of counted or all transitions
+ * will have to be handled separately
+ */
+ if (t1->atom == NULL) {
+ /* t1->nd = 1; */
+ continue;
+ }
+ if (t1->to == -1) /* eliminated */
+ continue;
+ for (i = 0;i < transnr;i++) {
+ t2 = &(state->trans[i]);
+ if (t2->to == -1) /* eliminated */
+ continue;
+ if (t2->atom != NULL) {
+ if (t1->to == t2->to) {
+ /*
+ * Here we use deep because we want to keep the
+ * transitions which indicate a conflict
+ */
+ if (xmlFAEqualAtoms(t1->atom, t2->atom, deep) &&
+ (t1->counter == t2->counter) &&
+ (t1->count == t2->count))
+ t2->to = -1; /* eliminated */
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Check for all states that there aren't 2 transitions
+ * with the same atom and a different target.
+ */
+ for (statenr = 0;statenr < ctxt->nbStates;statenr++) {
+ state = ctxt->states[statenr];
+ if (state == NULL)
+ continue;
+ if (state->nbTrans < 2)
+ continue;
+ last = NULL;
+ for (transnr = 0;transnr < state->nbTrans;transnr++) {
+ t1 = &(state->trans[transnr]);
+ /*
+ * Determinism checks in case of counted or all transitions
+ * will have to be handled separately
+ */
+ if (t1->atom == NULL) {
+ continue;
+ }
+ if (t1->to == -1) /* eliminated */
+ continue;
+ for (i = 0;i < transnr;i++) {
+ t2 = &(state->trans[i]);
+ if (t2->to == -1) /* eliminated */
+ continue;
+ if (t2->atom != NULL) {
+ /*
+ * But here we don't use deep because we want to
+ * find transitions which indicate a conflict
+ */
+ if (xmlFACompareAtoms(t1->atom, t2->atom, 1)) {
+ ret = 0;
+ /* mark the transitions as non-deterministic ones */
+ t1->nd = 1;
+ t2->nd = 1;
+ last = t1;
+ }
+ } else if (t1->to != -1) {
+ /*
+ * do the closure in case of remaining specific
+ * epsilon transitions like choices or all
+ */
+ ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
+ t2->to, t2->atom);
+ /* don't shortcut the computation so all non deterministic
+ transition get marked down
+ if (ret == 0)
+ return(0);
+ */
+ if (ret == 0) {
+ t1->nd = 1;
+ /* t2->nd = 1; */
+ last = t1;
+ }
+ }
+ }
+ /* don't shortcut the computation so all non deterministic
+ transition get marked down
+ if (ret == 0)
+ break; */
+ }
+
+ /*
+ * mark specifically the last non-deterministic transition
+ * from a state since there is no need to set-up rollback
+ * from it
+ */
+ if (last != NULL) {
+ last->nd = 2;
+ }
+
+ /* don't shortcut the computation so all non deterministic
+ transition get marked down
+ if (ret == 0)
+ break; */
+ }
+
+ ctxt->determinist = ret;
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Routines to check input against transition atoms *
+ * *
+ ************************************************************************/
+
+static int
+xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg,
+ int start, int end, const xmlChar *blockName) {
+ int ret = 0;
+
+ switch (type) {
+ case XML_REGEXP_STRING:
+ case XML_REGEXP_SUBREG:
+ case XML_REGEXP_RANGES:
+ case XML_REGEXP_EPSILON:
+ return(-1);
+ case XML_REGEXP_ANYCHAR:
+ ret = ((codepoint != '\n') && (codepoint != '\r'));
+ break;
+ case XML_REGEXP_CHARVAL:
+ ret = ((codepoint >= start) && (codepoint <= end));
+ break;
+ case XML_REGEXP_NOTSPACE:
+ neg = !neg;
+ case XML_REGEXP_ANYSPACE:
+ ret = ((codepoint == '\n') || (codepoint == '\r') ||
+ (codepoint == '\t') || (codepoint == ' '));
+ break;
+ case XML_REGEXP_NOTINITNAME:
+ neg = !neg;
+ case XML_REGEXP_INITNAME:
+ ret = (IS_LETTER(codepoint) ||
+ (codepoint == '_') || (codepoint == ':'));
+ break;
+ case XML_REGEXP_NOTNAMECHAR:
+ neg = !neg;
+ case XML_REGEXP_NAMECHAR:
+ ret = (IS_LETTER(codepoint) || IS_DIGIT(codepoint) ||
+ (codepoint == '.') || (codepoint == '-') ||
+ (codepoint == '_') || (codepoint == ':') ||
+ IS_COMBINING(codepoint) || IS_EXTENDER(codepoint));
+ break;
+ case XML_REGEXP_NOTDECIMAL:
+ neg = !neg;
+ case XML_REGEXP_DECIMAL:
+ ret = xmlUCSIsCatNd(codepoint);
+ break;
+ case XML_REGEXP_REALCHAR:
+ neg = !neg;
+ case XML_REGEXP_NOTREALCHAR:
+ ret = xmlUCSIsCatP(codepoint);
+ if (ret == 0)
+ ret = xmlUCSIsCatZ(codepoint);
+ if (ret == 0)
+ ret = xmlUCSIsCatC(codepoint);
+ break;
+ case XML_REGEXP_LETTER:
+ ret = xmlUCSIsCatL(codepoint);
+ break;
+ case XML_REGEXP_LETTER_UPPERCASE:
+ ret = xmlUCSIsCatLu(codepoint);
+ break;
+ case XML_REGEXP_LETTER_LOWERCASE:
+ ret = xmlUCSIsCatLl(codepoint);
+ break;
+ case XML_REGEXP_LETTER_TITLECASE:
+ ret = xmlUCSIsCatLt(codepoint);
+ break;
+ case XML_REGEXP_LETTER_MODIFIER:
+ ret = xmlUCSIsCatLm(codepoint);
+ break;
+ case XML_REGEXP_LETTER_OTHERS:
+ ret = xmlUCSIsCatLo(codepoint);
+ break;
+ case XML_REGEXP_MARK:
+ ret = xmlUCSIsCatM(codepoint);
+ break;
+ case XML_REGEXP_MARK_NONSPACING:
+ ret = xmlUCSIsCatMn(codepoint);
+ break;
+ case XML_REGEXP_MARK_SPACECOMBINING:
+ ret = xmlUCSIsCatMc(codepoint);
+ break;
+ case XML_REGEXP_MARK_ENCLOSING:
+ ret = xmlUCSIsCatMe(codepoint);
+ break;
+ case XML_REGEXP_NUMBER:
+ ret = xmlUCSIsCatN(codepoint);
+ break;
+ case XML_REGEXP_NUMBER_DECIMAL:
+ ret = xmlUCSIsCatNd(codepoint);
+ break;
+ case XML_REGEXP_NUMBER_LETTER:
+ ret = xmlUCSIsCatNl(codepoint);
+ break;
+ case XML_REGEXP_NUMBER_OTHERS:
+ ret = xmlUCSIsCatNo(codepoint);
+ break;
+ case XML_REGEXP_PUNCT:
+ ret = xmlUCSIsCatP(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_CONNECTOR:
+ ret = xmlUCSIsCatPc(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_DASH:
+ ret = xmlUCSIsCatPd(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_OPEN:
+ ret = xmlUCSIsCatPs(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_CLOSE:
+ ret = xmlUCSIsCatPe(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_INITQUOTE:
+ ret = xmlUCSIsCatPi(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_FINQUOTE:
+ ret = xmlUCSIsCatPf(codepoint);
+ break;
+ case XML_REGEXP_PUNCT_OTHERS:
+ ret = xmlUCSIsCatPo(codepoint);
+ break;
+ case XML_REGEXP_SEPAR:
+ ret = xmlUCSIsCatZ(codepoint);
+ break;
+ case XML_REGEXP_SEPAR_SPACE:
+ ret = xmlUCSIsCatZs(codepoint);
+ break;
+ case XML_REGEXP_SEPAR_LINE:
+ ret = xmlUCSIsCatZl(codepoint);
+ break;
+ case XML_REGEXP_SEPAR_PARA:
+ ret = xmlUCSIsCatZp(codepoint);
+ break;
+ case XML_REGEXP_SYMBOL:
+ ret = xmlUCSIsCatS(codepoint);
+ break;
+ case XML_REGEXP_SYMBOL_MATH:
+ ret = xmlUCSIsCatSm(codepoint);
+ break;
+ case XML_REGEXP_SYMBOL_CURRENCY:
+ ret = xmlUCSIsCatSc(codepoint);
+ break;
+ case XML_REGEXP_SYMBOL_MODIFIER:
+ ret = xmlUCSIsCatSk(codepoint);
+ break;
+ case XML_REGEXP_SYMBOL_OTHERS:
+ ret = xmlUCSIsCatSo(codepoint);
+ break;
+ case XML_REGEXP_OTHER:
+ ret = xmlUCSIsCatC(codepoint);
+ break;
+ case XML_REGEXP_OTHER_CONTROL:
+ ret = xmlUCSIsCatCc(codepoint);
+ break;
+ case XML_REGEXP_OTHER_FORMAT:
+ ret = xmlUCSIsCatCf(codepoint);
+ break;
+ case XML_REGEXP_OTHER_PRIVATE:
+ ret = xmlUCSIsCatCo(codepoint);
+ break;
+ case XML_REGEXP_OTHER_NA:
+ /* ret = xmlUCSIsCatCn(codepoint); */
+ /* Seems it doesn't exist anymore in recent Unicode releases */
+ ret = 0;
+ break;
+ case XML_REGEXP_BLOCK_NAME:
+ ret = xmlUCSIsBlock(codepoint, (const char *) blockName);
+ break;
+ }
+ if (neg)
+ return(!ret);
+ return(ret);
+}
+
+static int
+xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint) {
+ int i, ret = 0;
+ xmlRegRangePtr range;
+
+ if ((atom == NULL) || (!IS_CHAR(codepoint)))
+ return(-1);
+
+ switch (atom->type) {
+ case XML_REGEXP_SUBREG:
+ case XML_REGEXP_EPSILON:
+ return(-1);
+ case XML_REGEXP_CHARVAL:
+ return(codepoint == atom->codepoint);
+ case XML_REGEXP_RANGES: {
+ int accept = 0;
+
+ for (i = 0;i < atom->nbRanges;i++) {
+ range = atom->ranges[i];
+ if (range->neg == 2) {
+ ret = xmlRegCheckCharacterRange(range->type, codepoint,
+ 0, range->start, range->end,
+ range->blockName);
+ if (ret != 0)
+ return(0); /* excluded char */
+ } else if (range->neg) {
+ ret = xmlRegCheckCharacterRange(range->type, codepoint,
+ 0, range->start, range->end,
+ range->blockName);
+ if (ret == 0)
+ accept = 1;
+ else
+ return(0);
+ } else {
+ ret = xmlRegCheckCharacterRange(range->type, codepoint,
+ 0, range->start, range->end,
+ range->blockName);
+ if (ret != 0)
+ accept = 1; /* might still be excluded */
+ }
+ }
+ return(accept);
+ }
+ case XML_REGEXP_STRING:
+ printf("TODO: XML_REGEXP_STRING\n");
+ return(-1);
+ case XML_REGEXP_ANYCHAR:
+ case XML_REGEXP_ANYSPACE:
+ case XML_REGEXP_NOTSPACE:
+ case XML_REGEXP_INITNAME:
+ case XML_REGEXP_NOTINITNAME:
+ case XML_REGEXP_NAMECHAR:
+ case XML_REGEXP_NOTNAMECHAR:
+ case XML_REGEXP_DECIMAL:
+ case XML_REGEXP_NOTDECIMAL:
+ case XML_REGEXP_REALCHAR:
+ case XML_REGEXP_NOTREALCHAR:
+ case XML_REGEXP_LETTER:
+ case XML_REGEXP_LETTER_UPPERCASE:
+ case XML_REGEXP_LETTER_LOWERCASE:
+ case XML_REGEXP_LETTER_TITLECASE:
+ case XML_REGEXP_LETTER_MODIFIER:
+ case XML_REGEXP_LETTER_OTHERS:
+ case XML_REGEXP_MARK:
+ case XML_REGEXP_MARK_NONSPACING:
+ case XML_REGEXP_MARK_SPACECOMBINING:
+ case XML_REGEXP_MARK_ENCLOSING:
+ case XML_REGEXP_NUMBER:
+ case XML_REGEXP_NUMBER_DECIMAL:
+ case XML_REGEXP_NUMBER_LETTER:
+ case XML_REGEXP_NUMBER_OTHERS:
+ case XML_REGEXP_PUNCT:
+ case XML_REGEXP_PUNCT_CONNECTOR:
+ case XML_REGEXP_PUNCT_DASH:
+ case XML_REGEXP_PUNCT_OPEN:
+ case XML_REGEXP_PUNCT_CLOSE:
+ case XML_REGEXP_PUNCT_INITQUOTE:
+ case XML_REGEXP_PUNCT_FINQUOTE:
+ case XML_REGEXP_PUNCT_OTHERS:
+ case XML_REGEXP_SEPAR:
+ case XML_REGEXP_SEPAR_SPACE:
+ case XML_REGEXP_SEPAR_LINE:
+ case XML_REGEXP_SEPAR_PARA:
+ case XML_REGEXP_SYMBOL:
+ case XML_REGEXP_SYMBOL_MATH:
+ case XML_REGEXP_SYMBOL_CURRENCY:
+ case XML_REGEXP_SYMBOL_MODIFIER:
+ case XML_REGEXP_SYMBOL_OTHERS:
+ case XML_REGEXP_OTHER:
+ case XML_REGEXP_OTHER_CONTROL:
+ case XML_REGEXP_OTHER_FORMAT:
+ case XML_REGEXP_OTHER_PRIVATE:
+ case XML_REGEXP_OTHER_NA:
+ case XML_REGEXP_BLOCK_NAME:
+ ret = xmlRegCheckCharacterRange(atom->type, codepoint, 0, 0, 0,
+ (const xmlChar *)atom->valuep);
+ if (atom->neg)
+ ret = !ret;
+ break;
+ }
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Saving and restoring state of an execution context *
+ * *
+ ************************************************************************/
+
+#ifdef DEBUG_REGEXP_EXEC
+static void
+xmlFARegDebugExec(xmlRegExecCtxtPtr exec) {
+ printf("state: %d:%d:idx %d", exec->state->no, exec->transno, exec->index);
+ if (exec->inputStack != NULL) {
+ int i;
+ printf(": ");
+ for (i = 0;(i < 3) && (i < exec->inputStackNr);i++)
+ printf("%s ", (const char *)
+ exec->inputStack[exec->inputStackNr - (i + 1)].value);
+ } else {
+ printf(": %s", &(exec->inputString[exec->index]));
+ }
+ printf("\n");
+}
+#endif
+
+static void
+xmlFARegExecSave(xmlRegExecCtxtPtr exec) {
+#ifdef DEBUG_REGEXP_EXEC
+ printf("saving ");
+ exec->transno++;
+ xmlFARegDebugExec(exec);
+ exec->transno--;
+#endif
+#ifdef MAX_PUSH
+ if (exec->nbPush > MAX_PUSH) {
+ return;
+ }
+ exec->nbPush++;
+#endif
+
+ if (exec->maxRollbacks == 0) {
+ exec->maxRollbacks = 4;
+ exec->rollbacks = (xmlRegExecRollback *) xmlMalloc(exec->maxRollbacks *
+ sizeof(xmlRegExecRollback));
+ if (exec->rollbacks == NULL) {
+ xmlRegexpErrMemory(NULL, "saving regexp");
+ exec->maxRollbacks = 0;
+ return;
+ }
+ memset(exec->rollbacks, 0,
+ exec->maxRollbacks * sizeof(xmlRegExecRollback));
+ } else if (exec->nbRollbacks >= exec->maxRollbacks) {
+ xmlRegExecRollback *tmp;
+ int len = exec->maxRollbacks;
+
+ exec->maxRollbacks *= 2;
+ tmp = (xmlRegExecRollback *) xmlRealloc(exec->rollbacks,
+ exec->maxRollbacks * sizeof(xmlRegExecRollback));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(NULL, "saving regexp");
+ exec->maxRollbacks /= 2;
+ return;
+ }
+ exec->rollbacks = tmp;
+ tmp = &exec->rollbacks[len];
+ memset(tmp, 0, (exec->maxRollbacks - len) * sizeof(xmlRegExecRollback));
+ }
+ exec->rollbacks[exec->nbRollbacks].state = exec->state;
+ exec->rollbacks[exec->nbRollbacks].index = exec->index;
+ exec->rollbacks[exec->nbRollbacks].nextbranch = exec->transno + 1;
+ if (exec->comp->nbCounters > 0) {
+ if (exec->rollbacks[exec->nbRollbacks].counts == NULL) {
+ exec->rollbacks[exec->nbRollbacks].counts = (int *)
+ xmlMalloc(exec->comp->nbCounters * sizeof(int));
+ if (exec->rollbacks[exec->nbRollbacks].counts == NULL) {
+ xmlRegexpErrMemory(NULL, "saving regexp");
+ exec->status = -5;
+ return;
+ }
+ }
+ memcpy(exec->rollbacks[exec->nbRollbacks].counts, exec->counts,
+ exec->comp->nbCounters * sizeof(int));
+ }
+ exec->nbRollbacks++;
+}
+
+static void
+xmlFARegExecRollBack(xmlRegExecCtxtPtr exec) {
+ if (exec->nbRollbacks <= 0) {
+ exec->status = -1;
+#ifdef DEBUG_REGEXP_EXEC
+ printf("rollback failed on empty stack\n");
+#endif
+ return;
+ }
+ exec->nbRollbacks--;
+ exec->state = exec->rollbacks[exec->nbRollbacks].state;
+ exec->index = exec->rollbacks[exec->nbRollbacks].index;
+ exec->transno = exec->rollbacks[exec->nbRollbacks].nextbranch;
+ if (exec->comp->nbCounters > 0) {
+ if (exec->rollbacks[exec->nbRollbacks].counts == NULL) {
+ fprintf(stderr, "exec save: allocation failed");
+ exec->status = -6;
+ return;
+ }
+ if (exec->counts) {
+ memcpy(exec->counts, exec->rollbacks[exec->nbRollbacks].counts,
+ exec->comp->nbCounters * sizeof(int));
+ }
+ }
+
+#ifdef DEBUG_REGEXP_EXEC
+ printf("restored ");
+ xmlFARegDebugExec(exec);
+#endif
+}
+
+/************************************************************************
+ * *
+ * Verifier, running an input against a compiled regexp *
+ * *
+ ************************************************************************/
+
+static int
+xmlFARegExec(xmlRegexpPtr comp, const xmlChar *content) {
+ xmlRegExecCtxt execval;
+ xmlRegExecCtxtPtr exec = &execval;
+ int ret, codepoint = 0, len, deter;
+
+ exec->inputString = content;
+ exec->index = 0;
+ exec->nbPush = 0;
+ exec->determinist = 1;
+ exec->maxRollbacks = 0;
+ exec->nbRollbacks = 0;
+ exec->rollbacks = NULL;
+ exec->status = 0;
+ exec->comp = comp;
+ exec->state = comp->states[0];
+ exec->transno = 0;
+ exec->transcount = 0;
+ exec->inputStack = NULL;
+ exec->inputStackMax = 0;
+ if (comp->nbCounters > 0) {
+ exec->counts = (int *) xmlMalloc(comp->nbCounters * sizeof(int));
+ if (exec->counts == NULL) {
+ xmlRegexpErrMemory(NULL, "running regexp");
+ return(-1);
+ }
+ memset(exec->counts, 0, comp->nbCounters * sizeof(int));
+ } else
+ exec->counts = NULL;
+ while ((exec->status == 0) && (exec->state != NULL) &&
+ ((exec->inputString[exec->index] != 0) ||
+ ((exec->state != NULL) &&
+ (exec->state->type != XML_REGEXP_FINAL_STATE)))) {
+ xmlRegTransPtr trans;
+ xmlRegAtomPtr atom;
+
+ /*
+ * If end of input on non-terminal state, rollback, however we may
+ * still have epsilon like transition for counted transitions
+ * on counters, in that case don't break too early. Additionally,
+ * if we are working on a range like "AB{0,2}", where B is not present,
+ * we don't want to break.
+ */
+ len = 1;
+ if ((exec->inputString[exec->index] == 0) && (exec->counts == NULL)) {
+ /*
+ * if there is a transition, we must check if
+ * atom allows minOccurs of 0
+ */
+ if (exec->transno < exec->state->nbTrans) {
+ trans = &exec->state->trans[exec->transno];
+ if (trans->to >=0) {
+ atom = trans->atom;
+ if (!((atom->min == 0) && (atom->max > 0)))
+ goto rollback;
+ }
+ } else
+ goto rollback;
+ }
+
+ exec->transcount = 0;
+ for (;exec->transno < exec->state->nbTrans;exec->transno++) {
+ trans = &exec->state->trans[exec->transno];
+ if (trans->to < 0)
+ continue;
+ atom = trans->atom;
+ ret = 0;
+ deter = 1;
+ if (trans->count >= 0) {
+ int count;
+ xmlRegCounterPtr counter;
+
+ if (exec->counts == NULL) {
+ exec->status = -1;
+ goto error;
+ }
+ /*
+ * A counted transition.
+ */
+
+ count = exec->counts[trans->count];
+ counter = &exec->comp->counters[trans->count];
+#ifdef DEBUG_REGEXP_EXEC
+ printf("testing count %d: val %d, min %d, max %d\n",
+ trans->count, count, counter->min, counter->max);
+#endif
+ ret = ((count >= counter->min) && (count <= counter->max));
+ if ((ret) && (counter->min != counter->max))
+ deter = 0;
+ } else if (atom == NULL) {
+ fprintf(stderr, "epsilon transition left at runtime\n");
+ exec->status = -2;
+ break;
+ } else if (exec->inputString[exec->index] != 0) {
+ codepoint = CUR_SCHAR(&(exec->inputString[exec->index]), len);
+ ret = xmlRegCheckCharacter(atom, codepoint);
+ if ((ret == 1) && (atom->min >= 0) && (atom->max > 0)) {
+ xmlRegStatePtr to = comp->states[trans->to];
+
+ /*
+ * this is a multiple input sequence
+ * If there is a counter associated increment it now.
+ * before potentially saving and rollback
+ * do not increment if the counter is already over the
+ * maximum limit in which case get to next transition
+ */
+ if (trans->counter >= 0) {
+ xmlRegCounterPtr counter;
+
+ if ((exec->counts == NULL) ||
+ (exec->comp == NULL) ||
+ (exec->comp->counters == NULL)) {
+ exec->status = -1;
+ goto error;
+ }
+ counter = &exec->comp->counters[trans->counter];
+ if (exec->counts[trans->counter] >= counter->max)
+ continue; /* for loop on transitions */
+
+#ifdef DEBUG_REGEXP_EXEC
+ printf("Increasing count %d\n", trans->counter);
+#endif
+ exec->counts[trans->counter]++;
+ }
+ if (exec->state->nbTrans > exec->transno + 1) {
+ xmlFARegExecSave(exec);
+ }
+ exec->transcount = 1;
+ do {
+ /*
+ * Try to progress as much as possible on the input
+ */
+ if (exec->transcount == atom->max) {
+ break;
+ }
+ exec->index += len;
+ /*
+ * End of input: stop here
+ */
+ if (exec->inputString[exec->index] == 0) {
+ exec->index -= len;
+ break;
+ }
+ if (exec->transcount >= atom->min) {
+ int transno = exec->transno;
+ xmlRegStatePtr state = exec->state;
+
+ /*
+ * The transition is acceptable save it
+ */
+ exec->transno = -1; /* trick */
+ exec->state = to;
+ xmlFARegExecSave(exec);
+ exec->transno = transno;
+ exec->state = state;
+ }
+ codepoint = CUR_SCHAR(&(exec->inputString[exec->index]),
+ len);
+ ret = xmlRegCheckCharacter(atom, codepoint);
+ exec->transcount++;
+ } while (ret == 1);
+ if (exec->transcount < atom->min)
+ ret = 0;
+
+ /*
+ * If the last check failed but one transition was found
+ * possible, rollback
+ */
+ if (ret < 0)
+ ret = 0;
+ if (ret == 0) {
+ goto rollback;
+ }
+ if (trans->counter >= 0) {
+ if (exec->counts == NULL) {
+ exec->status = -1;
+ goto error;
+ }
+#ifdef DEBUG_REGEXP_EXEC
+ printf("Decreasing count %d\n", trans->counter);
+#endif
+ exec->counts[trans->counter]--;
+ }
+ } else if ((ret == 0) && (atom->min == 0) && (atom->max > 0)) {
+ /*
+ * we don't match on the codepoint, but minOccurs of 0
+ * says that's ok. Setting len to 0 inhibits stepping
+ * over the codepoint.
+ */
+ exec->transcount = 1;
+ len = 0;
+ ret = 1;
+ }
+ } else if ((atom->min == 0) && (atom->max > 0)) {
+ /* another spot to match when minOccurs is 0 */
+ exec->transcount = 1;
+ len = 0;
+ ret = 1;
+ }
+ if (ret == 1) {
+ if ((trans->nd == 1) ||
+ ((trans->count >= 0) && (deter == 0) &&
+ (exec->state->nbTrans > exec->transno + 1))) {
+#ifdef DEBUG_REGEXP_EXEC
+ if (trans->nd == 1)
+ printf("Saving on nd transition atom %d for %c at %d\n",
+ trans->atom->no, codepoint, exec->index);
+ else
+ printf("Saving on counted transition count %d for %c at %d\n",
+ trans->count, codepoint, exec->index);
+#endif
+ xmlFARegExecSave(exec);
+ }
+ if (trans->counter >= 0) {
+ xmlRegCounterPtr counter;
+
+ /* make sure we don't go over the counter maximum value */
+ if ((exec->counts == NULL) ||
+ (exec->comp == NULL) ||
+ (exec->comp->counters == NULL)) {
+ exec->status = -1;
+ goto error;
+ }
+ counter = &exec->comp->counters[trans->counter];
+ if (exec->counts[trans->counter] >= counter->max)
+ continue; /* for loop on transitions */
+#ifdef DEBUG_REGEXP_EXEC
+ printf("Increasing count %d\n", trans->counter);
+#endif
+ exec->counts[trans->counter]++;
+ }
+ if ((trans->count >= 0) &&
+ (trans->count < REGEXP_ALL_COUNTER)) {
+ if (exec->counts == NULL) {
+ exec->status = -1;
+ goto error;
+ }
+#ifdef DEBUG_REGEXP_EXEC
+ printf("resetting count %d on transition\n",
+ trans->count);
+#endif
+ exec->counts[trans->count] = 0;
+ }
+#ifdef DEBUG_REGEXP_EXEC
+ printf("entering state %d\n", trans->to);
+#endif
+ exec->state = comp->states[trans->to];
+ exec->transno = 0;
+ if (trans->atom != NULL) {
+ exec->index += len;
+ }
+ goto progress;
+ } else if (ret < 0) {
+ exec->status = -4;
+ break;
+ }
+ }
+ if ((exec->transno != 0) || (exec->state->nbTrans == 0)) {
+rollback:
+ /*
+ * Failed to find a way out
+ */
+ exec->determinist = 0;
+#ifdef DEBUG_REGEXP_EXEC
+ printf("rollback from state %d on %d:%c\n", exec->state->no,
+ codepoint,codepoint);
+#endif
+ xmlFARegExecRollBack(exec);
+ }
+progress:
+ continue;
+ }
+error:
+ if (exec->rollbacks != NULL) {
+ if (exec->counts != NULL) {
+ int i;
+
+ for (i = 0;i < exec->maxRollbacks;i++)
+ if (exec->rollbacks[i].counts != NULL)
+ xmlFree(exec->rollbacks[i].counts);
+ }
+ xmlFree(exec->rollbacks);
+ }
+ if (exec->state == NULL)
+ return(-1);
+ if (exec->counts != NULL)
+ xmlFree(exec->counts);
+ if (exec->status == 0)
+ return(1);
+ if (exec->status == -1) {
+ if (exec->nbPush > MAX_PUSH)
+ return(-1);
+ return(0);
+ }
+ return(exec->status);
+}
+
+/************************************************************************
+ * *
+ * Progressive interface to the verifier one atom at a time *
+ * *
+ ************************************************************************/
+#ifdef DEBUG_ERR
+static void testerr(xmlRegExecCtxtPtr exec);
+#endif
+
+/**
+ * xmlRegNewExecCtxt:
+ * @comp: a precompiled regular expression
+ * @callback: a callback function used for handling progresses in the
+ * automata matching phase
+ * @data: the context data associated to the callback in this context
+ *
+ * Build a context used for progressive evaluation of a regexp.
+ *
+ * Returns the new context
+ */
+xmlRegExecCtxtPtr
+xmlRegNewExecCtxt(xmlRegexpPtr comp, xmlRegExecCallbacks callback, void *data) {
+ xmlRegExecCtxtPtr exec;
+
+ if (comp == NULL)
+ return(NULL);
+ if ((comp->compact == NULL) && (comp->states == NULL))
+ return(NULL);
+ exec = (xmlRegExecCtxtPtr) xmlMalloc(sizeof(xmlRegExecCtxt));
+ if (exec == NULL) {
+ xmlRegexpErrMemory(NULL, "creating execution context");
+ return(NULL);
+ }
+ memset(exec, 0, sizeof(xmlRegExecCtxt));
+ exec->inputString = NULL;
+ exec->index = 0;
+ exec->determinist = 1;
+ exec->maxRollbacks = 0;
+ exec->nbRollbacks = 0;
+ exec->rollbacks = NULL;
+ exec->status = 0;
+ exec->comp = comp;
+ if (comp->compact == NULL)
+ exec->state = comp->states[0];
+ exec->transno = 0;
+ exec->transcount = 0;
+ exec->callback = callback;
+ exec->data = data;
+ if (comp->nbCounters > 0) {
+ /*
+ * For error handling, exec->counts is allocated twice the size
+ * the second half is used to store the data in case of rollback
+ */
+ exec->counts = (int *) xmlMalloc(comp->nbCounters * sizeof(int)
+ * 2);
+ if (exec->counts == NULL) {
+ xmlRegexpErrMemory(NULL, "creating execution context");
+ xmlFree(exec);
+ return(NULL);
+ }
+ memset(exec->counts, 0, comp->nbCounters * sizeof(int) * 2);
+ exec->errCounts = &exec->counts[comp->nbCounters];
+ } else {
+ exec->counts = NULL;
+ exec->errCounts = NULL;
+ }
+ exec->inputStackMax = 0;
+ exec->inputStackNr = 0;
+ exec->inputStack = NULL;
+ exec->errStateNo = -1;
+ exec->errString = NULL;
+ exec->nbPush = 0;
+ return(exec);
+}
+
+/**
+ * xmlRegFreeExecCtxt:
+ * @exec: a regular expression evaulation context
+ *
+ * Free the structures associated to a regular expression evaulation context.
+ */
+void
+xmlRegFreeExecCtxt(xmlRegExecCtxtPtr exec) {
+ if (exec == NULL)
+ return;
+
+ if (exec->rollbacks != NULL) {
+ if (exec->counts != NULL) {
+ int i;
+
+ for (i = 0;i < exec->maxRollbacks;i++)
+ if (exec->rollbacks[i].counts != NULL)
+ xmlFree(exec->rollbacks[i].counts);
+ }
+ xmlFree(exec->rollbacks);
+ }
+ if (exec->counts != NULL)
+ xmlFree(exec->counts);
+ if (exec->inputStack != NULL) {
+ int i;
+
+ for (i = 0;i < exec->inputStackNr;i++) {
+ if (exec->inputStack[i].value != NULL)
+ xmlFree(exec->inputStack[i].value);
+ }
+ xmlFree(exec->inputStack);
+ }
+ if (exec->errString != NULL)
+ xmlFree(exec->errString);
+ xmlFree(exec);
+}
+
+static void
+xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
+ void *data) {
+#ifdef DEBUG_PUSH
+ printf("saving value: %d:%s\n", exec->inputStackNr, value);
+#endif
+ if (exec->inputStackMax == 0) {
+ exec->inputStackMax = 4;
+ exec->inputStack = (xmlRegInputTokenPtr)
+ xmlMalloc(exec->inputStackMax * sizeof(xmlRegInputToken));
+ if (exec->inputStack == NULL) {
+ xmlRegexpErrMemory(NULL, "pushing input string");
+ exec->inputStackMax = 0;
+ return;
+ }
+ } else if (exec->inputStackNr + 1 >= exec->inputStackMax) {
+ xmlRegInputTokenPtr tmp;
+
+ exec->inputStackMax *= 2;
+ tmp = (xmlRegInputTokenPtr) xmlRealloc(exec->inputStack,
+ exec->inputStackMax * sizeof(xmlRegInputToken));
+ if (tmp == NULL) {
+ xmlRegexpErrMemory(NULL, "pushing input string");
+ exec->inputStackMax /= 2;
+ return;
+ }
+ exec->inputStack = tmp;
+ }
+ exec->inputStack[exec->inputStackNr].value = xmlStrdup(value);
+ exec->inputStack[exec->inputStackNr].data = data;
+ exec->inputStackNr++;
+ exec->inputStack[exec->inputStackNr].value = NULL;
+ exec->inputStack[exec->inputStackNr].data = NULL;
+}
+
+/**
+ * xmlRegStrEqualWildcard:
+ * @expStr: the string to be evaluated
+ * @valStr: the validation string
+ *
+ * Checks if both strings are equal or have the same content. "*"
+ * can be used as a wildcard in @valStr; "|" is used as a seperator of
+ * substrings in both @expStr and @valStr.
+ *
+ * Returns 1 if the comparison is satisfied and the number of substrings
+ * is equal, 0 otherwise.
+ */
+
+static int
+xmlRegStrEqualWildcard(const xmlChar *expStr, const xmlChar *valStr) {
+ if (expStr == valStr) return(1);
+ if (expStr == NULL) return(0);
+ if (valStr == NULL) return(0);
+ do {
+ /*
+ * Eval if we have a wildcard for the current item.
+ */
+ if (*expStr != *valStr) {
+ /* if one of them starts with a wildcard make valStr be it */
+ if (*valStr == '*') {
+ const xmlChar *tmp;
+
+ tmp = valStr;
+ valStr = expStr;
+ expStr = tmp;
+ }
+ if ((*valStr != 0) && (*expStr != 0) && (*expStr++ == '*')) {
+ do {
+ if (*valStr == XML_REG_STRING_SEPARATOR)
+ break;
+ valStr++;
+ } while (*valStr != 0);
+ continue;
+ } else
+ return(0);
+ }
+ expStr++;
+ valStr++;
+ } while (*valStr != 0);
+ if (*expStr != 0)
+ return (0);
+ else
+ return (1);
+}
+
+/**
+ * xmlRegCompactPushString:
+ * @exec: a regexp execution context
+ * @comp: the precompiled exec with a compact table
+ * @value: a string token input
+ * @data: data associated to the token to reuse in callbacks
+ *
+ * Push one input token in the execution context
+ *
+ * Returns: 1 if the regexp reached a final state, 0 if non-final, and
+ * a negative value in case of error.
+ */
+static int
+xmlRegCompactPushString(xmlRegExecCtxtPtr exec,
+ xmlRegexpPtr comp,
+ const xmlChar *value,
+ void *data) {
+ int state = exec->index;
+ int i, target;
+
+ if ((comp == NULL) || (comp->compact == NULL) || (comp->stringMap == NULL))
+ return(-1);
+
+ if (value == NULL) {
+ /*
+ * are we at a final state ?
+ */
+ if (comp->compact[state * (comp->nbstrings + 1)] ==
+ XML_REGEXP_FINAL_STATE)
+ return(1);
+ return(0);
+ }
+
+#ifdef DEBUG_PUSH
+ printf("value pushed: %s\n", value);
+#endif
+
+ /*
+ * Examine all outside transitions from current state
+ */
+ for (i = 0;i < comp->nbstrings;i++) {
+ target = comp->compact[state * (comp->nbstrings + 1) + i + 1];
+ if ((target > 0) && (target <= comp->nbstates)) {
+ target--; /* to avoid 0 */
+ if (xmlRegStrEqualWildcard(comp->stringMap[i], value)) {
+ exec->index = target;
+ if ((exec->callback != NULL) && (comp->transdata != NULL)) {
+ exec->callback(exec->data, value,
+ comp->transdata[state * comp->nbstrings + i], data);
+ }
+#ifdef DEBUG_PUSH
+ printf("entering state %d\n", target);
+#endif
+ if (comp->compact[target * (comp->nbstrings + 1)] ==
+ XML_REGEXP_SINK_STATE)
+ goto error;
+
+ if (comp->compact[target * (comp->nbstrings + 1)] ==
+ XML_REGEXP_FINAL_STATE)
+ return(1);
+ return(0);
+ }
+ }
+ }
+ /*
+ * Failed to find an exit transition out from current state for the
+ * current token
+ */
+#ifdef DEBUG_PUSH
+ printf("failed to find a transition for %s on state %d\n", value, state);
+#endif
+error:
+ if (exec->errString != NULL)
+ xmlFree(exec->errString);
+ exec->errString = xmlStrdup(value);
+ exec->errStateNo = state;
+ exec->status = -1;
+#ifdef DEBUG_ERR
+ testerr(exec);
+#endif
+ return(-1);
+}
+
+/**
+ * xmlRegExecPushStringInternal:
+ * @exec: a regexp execution context or NULL to indicate the end
+ * @value: a string token input
+ * @data: data associated to the token to reuse in callbacks
+ * @compound: value was assembled from 2 strings
+ *
+ * Push one input token in the execution context
+ *
+ * Returns: 1 if the regexp reached a final state, 0 if non-final, and
+ * a negative value in case of error.
+ */
+static int
+xmlRegExecPushStringInternal(xmlRegExecCtxtPtr exec, const xmlChar *value,
+ void *data, int compound) {
+ xmlRegTransPtr trans;
+ xmlRegAtomPtr atom;
+ int ret;
+ int final = 0;
+ int progress = 1;
+
+ if (exec == NULL)
+ return(-1);
+ if (exec->comp == NULL)
+ return(-1);
+ if (exec->status != 0)
+ return(exec->status);
+
+ if (exec->comp->compact != NULL)
+ return(xmlRegCompactPushString(exec, exec->comp, value, data));
+
+ if (value == NULL) {
+ if (exec->state->type == XML_REGEXP_FINAL_STATE)
+ return(1);
+ final = 1;
+ }
+
+#ifdef DEBUG_PUSH
+ printf("value pushed: %s\n", value);
+#endif
+ /*
+ * If we have an active rollback stack push the new value there
+ * and get back to where we were left
+ */
+ if ((value != NULL) && (exec->inputStackNr > 0)) {
+ xmlFARegExecSaveInputString(exec, value, data);
+ value = exec->inputStack[exec->index].value;
+ data = exec->inputStack[exec->index].data;
+#ifdef DEBUG_PUSH
+ printf("value loaded: %s\n", value);
+#endif
+ }
+
+ while ((exec->status == 0) &&
+ ((value != NULL) ||
+ ((final == 1) &&
+ (exec->state->type != XML_REGEXP_FINAL_STATE)))) {
+
+ /*
+ * End of input on non-terminal state, rollback, however we may
+ * still have epsilon like transition for counted transitions
+ * on counters, in that case don't break too early.
+ */
+ if ((value == NULL) && (exec->counts == NULL))
+ goto rollback;
+
+ exec->transcount = 0;
+ for (;exec->transno < exec->state->nbTrans;exec->transno++) {
+ trans = &exec->state->trans[exec->transno];
+ if (trans->to < 0)
+ continue;
+ atom = trans->atom;
+ ret = 0;
+ if (trans->count == REGEXP_ALL_LAX_COUNTER) {
+ int i;
+ int count;
+ xmlRegTransPtr t;
+ xmlRegCounterPtr counter;
+
+ ret = 0;
+
+#ifdef DEBUG_PUSH
+ printf("testing all lax %d\n", trans->count);
+#endif
+ /*
+ * Check all counted transitions from the current state
+ */
+ if ((value == NULL) && (final)) {
+ ret = 1;
+ } else if (value != NULL) {
+ for (i = 0;i < exec->state->nbTrans;i++) {
+ t = &exec->state->trans[i];
+ if ((t->counter < 0) || (t == trans))
+ continue;
+ counter = &exec->comp->counters[t->counter];
+ count = exec->counts[t->counter];
+ if ((count < counter->max) &&
+ (t->atom != NULL) &&
+ (xmlStrEqual(value, t->atom->valuep))) {
+ ret = 0;
+ break;
+ }
+ if ((count >= counter->min) &&
+ (count < counter->max) &&
+ (t->atom != NULL) &&
+ (xmlStrEqual(value, t->atom->valuep))) {
+ ret = 1;
+ break;
+ }
+ }
+ }
+ } else if (trans->count == REGEXP_ALL_COUNTER) {
+ int i;
+ int count;
+ xmlRegTransPtr t;
+ xmlRegCounterPtr counter;
+
+ ret = 1;
+
+#ifdef DEBUG_PUSH
+ printf("testing all %d\n", trans->count);
+#endif
+ /*
+ * Check all counted transitions from the current state
+ */
+ for (i = 0;i < exec->state->nbTrans;i++) {
+ t = &exec->state->trans[i];
+ if ((t->counter < 0) || (t == trans))
+ continue;
+ counter = &exec->comp->counters[t->counter];
+ count = exec->counts[t->counter];
+ if ((count < counter->min) || (count > counter->max)) {
+ ret = 0;
+ break;
+ }
+ }
+ } else if (trans->count >= 0) {
+ int count;
+ xmlRegCounterPtr counter;
+
+ /*
+ * A counted transition.
+ */
+
+ count = exec->counts[trans->count];
+ counter = &exec->comp->counters[trans->count];
+#ifdef DEBUG_PUSH
+ printf("testing count %d: val %d, min %d, max %d\n",
+ trans->count, count, counter->min, counter->max);
+#endif
+ ret = ((count >= counter->min) && (count <= counter->max));
+ } else if (atom == NULL) {
+ fprintf(stderr, "epsilon transition left at runtime\n");
+ exec->status = -2;
+ break;
+ } else if (value != NULL) {
+ ret = xmlRegStrEqualWildcard(atom->valuep, value);
+ if (atom->neg) {
+ ret = !ret;
+ if (!compound)
+ ret = 0;
+ }
+ if ((ret == 1) && (trans->counter >= 0)) {
+ xmlRegCounterPtr counter;
+ int count;
+
+ count = exec->counts[trans->counter];
+ counter = &exec->comp->counters[trans->counter];
+ if (count >= counter->max)
+ ret = 0;
+ }
+
+ if ((ret == 1) && (atom->min > 0) && (atom->max > 0)) {
+ xmlRegStatePtr to = exec->comp->states[trans->to];
+
+ /*
+ * this is a multiple input sequence
+ */
+ if (exec->state->nbTrans > exec->transno + 1) {
+ if (exec->inputStackNr <= 0) {
+ xmlFARegExecSaveInputString(exec, value, data);
+ }
+ xmlFARegExecSave(exec);
+ }
+ exec->transcount = 1;
+ do {
+ /*
+ * Try to progress as much as possible on the input
+ */
+ if (exec->transcount == atom->max) {
+ break;
+ }
+ exec->index++;
+ value = exec->inputStack[exec->index].value;
+ data = exec->inputStack[exec->index].data;
+#ifdef DEBUG_PUSH
+ printf("value loaded: %s\n", value);
+#endif
+
+ /*
+ * End of input: stop here
+ */
+ if (value == NULL) {
+ exec->index --;
+ break;
+ }
+ if (exec->transcount >= atom->min) {
+ int transno = exec->transno;
+ xmlRegStatePtr state = exec->state;
+
+ /*
+ * The transition is acceptable save it
+ */
+ exec->transno = -1; /* trick */
+ exec->state = to;
+ if (exec->inputStackNr <= 0) {
+ xmlFARegExecSaveInputString(exec, value, data);
+ }
+ xmlFARegExecSave(exec);
+ exec->transno = transno;
+ exec->state = state;
+ }
+ ret = xmlStrEqual(value, atom->valuep);
+ exec->transcount++;
+ } while (ret == 1);
+ if (exec->transcount < atom->min)
+ ret = 0;
+
+ /*
+ * If the last check failed but one transition was found
+ * possible, rollback
+ */
+ if (ret < 0)
+ ret = 0;
+ if (ret == 0) {
+ goto rollback;
+ }
+ }
+ }
+ if (ret == 1) {
+ if ((exec->callback != NULL) && (atom != NULL) &&
+ (data != NULL)) {
+ exec->callback(exec->data, atom->valuep,
+ atom->data, data);
+ }
+ if (exec->state->nbTrans > exec->transno + 1) {
+ if (exec->inputStackNr <= 0) {
+ xmlFARegExecSaveInputString(exec, value, data);
+ }
+ xmlFARegExecSave(exec);
+ }
+ if (trans->counter >= 0) {
+#ifdef DEBUG_PUSH
+ printf("Increasing count %d\n", trans->counter);
+#endif
+ exec->counts[trans->counter]++;
+ }
+ if ((trans->count >= 0) &&
+ (trans->count < REGEXP_ALL_COUNTER)) {
+#ifdef DEBUG_REGEXP_EXEC
+ printf("resetting count %d on transition\n",
+ trans->count);
+#endif
+ exec->counts[trans->count] = 0;
+ }
+#ifdef DEBUG_PUSH
+ printf("entering state %d\n", trans->to);
+#endif
+ if ((exec->comp->states[trans->to] != NULL) &&
+ (exec->comp->states[trans->to]->type ==
+ XML_REGEXP_SINK_STATE)) {
+ /*
+ * entering a sink state, save the current state as error
+ * state.
+ */
+ if (exec->errString != NULL)
+ xmlFree(exec->errString);
+ exec->errString = xmlStrdup(value);
+ exec->errState = exec->state;
+ memcpy(exec->errCounts, exec->counts,
+ exec->comp->nbCounters * sizeof(int));
+ }
+ exec->state = exec->comp->states[trans->to];
+ exec->transno = 0;
+ if (trans->atom != NULL) {
+ if (exec->inputStack != NULL) {
+ exec->index++;
+ if (exec->index < exec->inputStackNr) {
+ value = exec->inputStack[exec->index].value;
+ data = exec->inputStack[exec->index].data;
+#ifdef DEBUG_PUSH
+ printf("value loaded: %s\n", value);
+#endif
+ } else {
+ value = NULL;
+ data = NULL;
+#ifdef DEBUG_PUSH
+ printf("end of input\n");
+#endif
+ }
+ } else {
+ value = NULL;
+ data = NULL;
+#ifdef DEBUG_PUSH
+ printf("end of input\n");
+#endif
+ }
+ }
+ goto progress;
+ } else if (ret < 0) {
+ exec->status = -4;
+ break;
+ }
+ }
+ if ((exec->transno != 0) || (exec->state->nbTrans == 0)) {
+rollback:
+ /*
+ * if we didn't yet rollback on the current input
+ * store the current state as the error state.
+ */
+ if ((progress) && (exec->state != NULL) &&
+ (exec->state->type != XML_REGEXP_SINK_STATE)) {
+ progress = 0;
+ if (exec->errString != NULL)
+ xmlFree(exec->errString);
+ exec->errString = xmlStrdup(value);
+ exec->errState = exec->state;
+ memcpy(exec->errCounts, exec->counts,
+ exec->comp->nbCounters * sizeof(int));
+ }
+
+ /*
+ * Failed to find a way out
+ */
+ exec->determinist = 0;
+ xmlFARegExecRollBack(exec);
+ if ((exec->inputStack != NULL ) && (exec->status == 0)) {
+ value = exec->inputStack[exec->index].value;
+ data = exec->inputStack[exec->index].data;
+#ifdef DEBUG_PUSH
+ printf("value loaded: %s\n", value);
+#endif
+ }
+ }
+ continue;
+progress:
+ progress = 1;
+ continue;
+ }
+ if (exec->status == 0) {
+ return(exec->state->type == XML_REGEXP_FINAL_STATE);
+ }
+#ifdef DEBUG_ERR
+ if (exec->status < 0) {
+ testerr(exec);
+ }
+#endif
+ return(exec->status);
+}
+
+/**
+ * xmlRegExecPushString:
+ * @exec: a regexp execution context or NULL to indicate the end
+ * @value: a string token input
+ * @data: data associated to the token to reuse in callbacks
+ *
+ * Push one input token in the execution context
+ *
+ * Returns: 1 if the regexp reached a final state, 0 if non-final, and
+ * a negative value in case of error.
+ */
+int
+xmlRegExecPushString(xmlRegExecCtxtPtr exec, const xmlChar *value,
+ void *data) {
+ return(xmlRegExecPushStringInternal(exec, value, data, 0));
+}
+
+/**
+ * xmlRegExecPushString2:
+ * @exec: a regexp execution context or NULL to indicate the end
+ * @value: the first string token input
+ * @value2: the second string token input
+ * @data: data associated to the token to reuse in callbacks
+ *
+ * Push one input token in the execution context
+ *
+ * Returns: 1 if the regexp reached a final state, 0 if non-final, and
+ * a negative value in case of error.
+ */
+int
+xmlRegExecPushString2(xmlRegExecCtxtPtr exec, const xmlChar *value,
+ const xmlChar *value2, void *data) {
+ xmlChar buf[150];
+ int lenn, lenp, ret;
+ xmlChar *str;
+
+ if (exec == NULL)
+ return(-1);
+ if (exec->comp == NULL)
+ return(-1);
+ if (exec->status != 0)
+ return(exec->status);
+
+ if (value2 == NULL)
+ return(xmlRegExecPushString(exec, value, data));
+
+ lenn = strlen((char *) value2);
+ lenp = strlen((char *) value);
+
+ if (150 < lenn + lenp + 2) {
+ str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (str == NULL) {
+ exec->status = -1;
+ return(-1);
+ }
+ } else {
+ str = buf;
+ }
+ memcpy(&str[0], value, lenp);
+ str[lenp] = XML_REG_STRING_SEPARATOR;
+ memcpy(&str[lenp + 1], value2, lenn);
+ str[lenn + lenp + 1] = 0;
+
+ if (exec->comp->compact != NULL)
+ ret = xmlRegCompactPushString(exec, exec->comp, str, data);
+ else
+ ret = xmlRegExecPushStringInternal(exec, str, data, 1);
+
+ if (str != buf)
+ xmlFree(str);
+ return(ret);
+}
+
+/**
+ * xmlRegExecGetValues:
+ * @exec: a regexp execution context
+ * @err: error extraction or normal one
+ * @nbval: pointer to the number of accepted values IN/OUT
+ * @nbneg: return number of negative transitions
+ * @values: pointer to the array of acceptable values
+ * @terminal: return value if this was a terminal state
+ *
+ * Extract informations from the regexp execution, internal routine to
+ * implement xmlRegExecNextValues() and xmlRegExecErrInfo()
+ *
+ * Returns: 0 in case of success or -1 in case of error.
+ */
+static int
+xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
+ int *nbval, int *nbneg,
+ xmlChar **values, int *terminal) {
+ int maxval;
+ int nb = 0;
+
+ if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) ||
+ (values == NULL) || (*nbval <= 0))
+ return(-1);
+
+ maxval = *nbval;
+ *nbval = 0;
+ *nbneg = 0;
+ if ((exec->comp != NULL) && (exec->comp->compact != NULL)) {
+ xmlRegexpPtr comp;
+ int target, i, state;
+
+ comp = exec->comp;
+
+ if (err) {
+ if (exec->errStateNo == -1) return(-1);
+ state = exec->errStateNo;
+ } else {
+ state = exec->index;
+ }
+ if (terminal != NULL) {
+ if (comp->compact[state * (comp->nbstrings + 1)] ==
+ XML_REGEXP_FINAL_STATE)
+ *terminal = 1;
+ else
+ *terminal = 0;
+ }
+ for (i = 0;(i < comp->nbstrings) && (nb < maxval);i++) {
+ target = comp->compact[state * (comp->nbstrings + 1) + i + 1];
+ if ((target > 0) && (target <= comp->nbstates) &&
+ (comp->compact[(target - 1) * (comp->nbstrings + 1)] !=
+ XML_REGEXP_SINK_STATE)) {
+ values[nb++] = comp->stringMap[i];
+ (*nbval)++;
+ }
+ }
+ for (i = 0;(i < comp->nbstrings) && (nb < maxval);i++) {
+ target = comp->compact[state * (comp->nbstrings + 1) + i + 1];
+ if ((target > 0) && (target <= comp->nbstates) &&
+ (comp->compact[(target - 1) * (comp->nbstrings + 1)] ==
+ XML_REGEXP_SINK_STATE)) {
+ values[nb++] = comp->stringMap[i];
+ (*nbneg)++;
+ }
+ }
+ } else {
+ int transno;
+ xmlRegTransPtr trans;
+ xmlRegAtomPtr atom;
+ xmlRegStatePtr state;
+
+ if (terminal != NULL) {
+ if (exec->state->type == XML_REGEXP_FINAL_STATE)
+ *terminal = 1;
+ else
+ *terminal = 0;
+ }
+
+ if (err) {
+ if (exec->errState == NULL) return(-1);
+ state = exec->errState;
+ } else {
+ if (exec->state == NULL) return(-1);
+ state = exec->state;
+ }
+ for (transno = 0;
+ (transno < state->nbTrans) && (nb < maxval);
+ transno++) {
+ trans = &state->trans[transno];
+ if (trans->to < 0)
+ continue;
+ atom = trans->atom;
+ if ((atom == NULL) || (atom->valuep == NULL))
+ continue;
+ if (trans->count == REGEXP_ALL_LAX_COUNTER) {
+ /* this should not be reached but ... */
+ TODO;
+ } else if (trans->count == REGEXP_ALL_COUNTER) {
+ /* this should not be reached but ... */
+ TODO;
+ } else if (trans->counter >= 0) {
+ xmlRegCounterPtr counter = NULL;
+ int count;
+
+ if (err)
+ count = exec->errCounts[trans->counter];
+ else
+ count = exec->counts[trans->counter];
+ if (exec->comp != NULL)
+ counter = &exec->comp->counters[trans->counter];
+ if ((counter == NULL) || (count < counter->max)) {
+ if (atom->neg)
+ values[nb++] = (xmlChar *) atom->valuep2;
+ else
+ values[nb++] = (xmlChar *) atom->valuep;
+ (*nbval)++;
+ }
+ } else {
+ if ((exec->comp != NULL) && (exec->comp->states[trans->to] != NULL) &&
+ (exec->comp->states[trans->to]->type !=
+ XML_REGEXP_SINK_STATE)) {
+ if (atom->neg)
+ values[nb++] = (xmlChar *) atom->valuep2;
+ else
+ values[nb++] = (xmlChar *) atom->valuep;
+ (*nbval)++;
+ }
+ }
+ }
+ for (transno = 0;
+ (transno < state->nbTrans) && (nb < maxval);
+ transno++) {
+ trans = &state->trans[transno];
+ if (trans->to < 0)
+ continue;
+ atom = trans->atom;
+ if ((atom == NULL) || (atom->valuep == NULL))
+ continue;
+ if (trans->count == REGEXP_ALL_LAX_COUNTER) {
+ continue;
+ } else if (trans->count == REGEXP_ALL_COUNTER) {
+ continue;
+ } else if (trans->counter >= 0) {
+ continue;
+ } else {
+ if ((exec->comp->states[trans->to] != NULL) &&
+ (exec->comp->states[trans->to]->type ==
+ XML_REGEXP_SINK_STATE)) {
+ if (atom->neg)
+ values[nb++] = (xmlChar *) atom->valuep2;
+ else
+ values[nb++] = (xmlChar *) atom->valuep;
+ (*nbneg)++;
+ }
+ }
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlRegExecNextValues:
+ * @exec: a regexp execution context
+ * @nbval: pointer to the number of accepted values IN/OUT
+ * @nbneg: return number of negative transitions
+ * @values: pointer to the array of acceptable values
+ * @terminal: return value if this was a terminal state
+ *
+ * Extract informations from the regexp execution,
+ * the parameter @values must point to an array of @nbval string pointers
+ * on return nbval will contain the number of possible strings in that
+ * state and the @values array will be updated with them. The string values
+ * returned will be freed with the @exec context and don't need to be
+ * deallocated.
+ *
+ * Returns: 0 in case of success or -1 in case of error.
+ */
+int
+xmlRegExecNextValues(xmlRegExecCtxtPtr exec, int *nbval, int *nbneg,
+ xmlChar **values, int *terminal) {
+ return(xmlRegExecGetValues(exec, 0, nbval, nbneg, values, terminal));
+}
+
+/**
+ * xmlRegExecErrInfo:
+ * @exec: a regexp execution context generating an error
+ * @string: return value for the error string
+ * @nbval: pointer to the number of accepted values IN/OUT
+ * @nbneg: return number of negative transitions
+ * @values: pointer to the array of acceptable values
+ * @terminal: return value if this was a terminal state
+ *
+ * Extract error informations from the regexp execution, the parameter
+ * @string will be updated with the value pushed and not accepted,
+ * the parameter @values must point to an array of @nbval string pointers
+ * on return nbval will contain the number of possible strings in that
+ * state and the @values array will be updated with them. The string values
+ * returned will be freed with the @exec context and don't need to be
+ * deallocated.
+ *
+ * Returns: 0 in case of success or -1 in case of error.
+ */
+int
+xmlRegExecErrInfo(xmlRegExecCtxtPtr exec, const xmlChar **string,
+ int *nbval, int *nbneg, xmlChar **values, int *terminal) {
+ if (exec == NULL)
+ return(-1);
+ if (string != NULL) {
+ if (exec->status != 0)
+ *string = exec->errString;
+ else
+ *string = NULL;
+ }
+ return(xmlRegExecGetValues(exec, 1, nbval, nbneg, values, terminal));
+}
+
+#ifdef DEBUG_ERR
+static void testerr(xmlRegExecCtxtPtr exec) {
+ const xmlChar *string;
+ xmlChar *values[5];
+ int nb = 5;
+ int nbneg;
+ int terminal;
+ xmlRegExecErrInfo(exec, &string, &nb, &nbneg, &values[0], &terminal);
+}
+#endif
+
+#if 0
+static int
+xmlRegExecPushChar(xmlRegExecCtxtPtr exec, int UCS) {
+ xmlRegTransPtr trans;
+ xmlRegAtomPtr atom;
+ int ret;
+ int codepoint, len;
+
+ if (exec == NULL)
+ return(-1);
+ if (exec->status != 0)
+ return(exec->status);
+
+ while ((exec->status == 0) &&
+ ((exec->inputString[exec->index] != 0) ||
+ (exec->state->type != XML_REGEXP_FINAL_STATE))) {
+
+ /*
+ * End of input on non-terminal state, rollback, however we may
+ * still have epsilon like transition for counted transitions
+ * on counters, in that case don't break too early.
+ */
+ if ((exec->inputString[exec->index] == 0) && (exec->counts == NULL))
+ goto rollback;
+
+ exec->transcount = 0;
+ for (;exec->transno < exec->state->nbTrans;exec->transno++) {
+ trans = &exec->state->trans[exec->transno];
+ if (trans->to < 0)
+ continue;
+ atom = trans->atom;
+ ret = 0;
+ if (trans->count >= 0) {
+ int count;
+ xmlRegCounterPtr counter;
+
+ /*
+ * A counted transition.
+ */
+
+ count = exec->counts[trans->count];
+ counter = &exec->comp->counters[trans->count];
+#ifdef DEBUG_REGEXP_EXEC
+ printf("testing count %d: val %d, min %d, max %d\n",
+ trans->count, count, counter->min, counter->max);
+#endif
+ ret = ((count >= counter->min) && (count <= counter->max));
+ } else if (atom == NULL) {
+ fprintf(stderr, "epsilon transition left at runtime\n");
+ exec->status = -2;
+ break;
+ } else if (exec->inputString[exec->index] != 0) {
+ codepoint = CUR_SCHAR(&(exec->inputString[exec->index]), len);
+ ret = xmlRegCheckCharacter(atom, codepoint);
+ if ((ret == 1) && (atom->min > 0) && (atom->max > 0)) {
+ xmlRegStatePtr to = exec->comp->states[trans->to];
+
+ /*
+ * this is a multiple input sequence
+ */
+ if (exec->state->nbTrans > exec->transno + 1) {
+ xmlFARegExecSave(exec);
+ }
+ exec->transcount = 1;
+ do {
+ /*
+ * Try to progress as much as possible on the input
+ */
+ if (exec->transcount == atom->max) {
+ break;
+ }
+ exec->index += len;
+ /*
+ * End of input: stop here
+ */
+ if (exec->inputString[exec->index] == 0) {
+ exec->index -= len;
+ break;
+ }
+ if (exec->transcount >= atom->min) {
+ int transno = exec->transno;
+ xmlRegStatePtr state = exec->state;
+
+ /*
+ * The transition is acceptable save it
+ */
+ exec->transno = -1; /* trick */
+ exec->state = to;
+ xmlFARegExecSave(exec);
+ exec->transno = transno;
+ exec->state = state;
+ }
+ codepoint = CUR_SCHAR(&(exec->inputString[exec->index]),
+ len);
+ ret = xmlRegCheckCharacter(atom, codepoint);
+ exec->transcount++;
+ } while (ret == 1);
+ if (exec->transcount < atom->min)
+ ret = 0;
+
+ /*
+ * If the last check failed but one transition was found
+ * possible, rollback
+ */
+ if (ret < 0)
+ ret = 0;
+ if (ret == 0) {
+ goto rollback;
+ }
+ }
+ }
+ if (ret == 1) {
+ if (exec->state->nbTrans > exec->transno + 1) {
+ xmlFARegExecSave(exec);
+ }
+ /*
+ * restart count for expressions like this ((abc){2})*
+ */
+ if (trans->count >= 0) {
+#ifdef DEBUG_REGEXP_EXEC
+ printf("Reset count %d\n", trans->count);
+#endif
+ exec->counts[trans->count] = 0;
+ }
+ if (trans->counter >= 0) {
+#ifdef DEBUG_REGEXP_EXEC
+ printf("Increasing count %d\n", trans->counter);
+#endif
+ exec->counts[trans->counter]++;
+ }
+#ifdef DEBUG_REGEXP_EXEC
+ printf("entering state %d\n", trans->to);
+#endif
+ exec->state = exec->comp->states[trans->to];
+ exec->transno = 0;
+ if (trans->atom != NULL) {
+ exec->index += len;
+ }
+ goto progress;
+ } else if (ret < 0) {
+ exec->status = -4;
+ break;
+ }
+ }
+ if ((exec->transno != 0) || (exec->state->nbTrans == 0)) {
+rollback:
+ /*
+ * Failed to find a way out
+ */
+ exec->determinist = 0;
+ xmlFARegExecRollBack(exec);
+ }
+progress:
+ continue;
+ }
+}
+#endif
+/************************************************************************
+ * *
+ * Parser for the Schemas Datatype Regular Expressions *
+ * http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlFAIsChar:
+ * @ctxt: a regexp parser context
+ *
+ * [10] Char ::= [^.\?*+()|#x5B#x5D]
+ */
+static int
+xmlFAIsChar(xmlRegParserCtxtPtr ctxt) {
+ int cur;
+ int len;
+
+ cur = CUR_SCHAR(ctxt->cur, len);
+ if ((cur == '.') || (cur == '\\') || (cur == '?') ||
+ (cur == '*') || (cur == '+') || (cur == '(') ||
+ (cur == ')') || (cur == '|') || (cur == 0x5B) ||
+ (cur == 0x5D) || (cur == 0))
+ return(-1);
+ return(cur);
+}
+
+/**
+ * xmlFAParseCharProp:
+ * @ctxt: a regexp parser context
+ *
+ * [27] charProp ::= IsCategory | IsBlock
+ * [28] IsCategory ::= Letters | Marks | Numbers | Punctuation |
+ * Separators | Symbols | Others
+ * [29] Letters ::= 'L' [ultmo]?
+ * [30] Marks ::= 'M' [nce]?
+ * [31] Numbers ::= 'N' [dlo]?
+ * [32] Punctuation ::= 'P' [cdseifo]?
+ * [33] Separators ::= 'Z' [slp]?
+ * [34] Symbols ::= 'S' [mcko]?
+ * [35] Others ::= 'C' [cfon]?
+ * [36] IsBlock ::= 'Is' [a-zA-Z0-9#x2D]+
+ */
+static void
+xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
+ int cur;
+ xmlRegAtomType type = (xmlRegAtomType) 0;
+ xmlChar *blockName = NULL;
+
+ cur = CUR;
+ if (cur == 'L') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'u') {
+ NEXT;
+ type = XML_REGEXP_LETTER_UPPERCASE;
+ } else if (cur == 'l') {
+ NEXT;
+ type = XML_REGEXP_LETTER_LOWERCASE;
+ } else if (cur == 't') {
+ NEXT;
+ type = XML_REGEXP_LETTER_TITLECASE;
+ } else if (cur == 'm') {
+ NEXT;
+ type = XML_REGEXP_LETTER_MODIFIER;
+ } else if (cur == 'o') {
+ NEXT;
+ type = XML_REGEXP_LETTER_OTHERS;
+ } else {
+ type = XML_REGEXP_LETTER;
+ }
+ } else if (cur == 'M') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'n') {
+ NEXT;
+ /* nonspacing */
+ type = XML_REGEXP_MARK_NONSPACING;
+ } else if (cur == 'c') {
+ NEXT;
+ /* spacing combining */
+ type = XML_REGEXP_MARK_SPACECOMBINING;
+ } else if (cur == 'e') {
+ NEXT;
+ /* enclosing */
+ type = XML_REGEXP_MARK_ENCLOSING;
+ } else {
+ /* all marks */
+ type = XML_REGEXP_MARK;
+ }
+ } else if (cur == 'N') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'd') {
+ NEXT;
+ /* digital */
+ type = XML_REGEXP_NUMBER_DECIMAL;
+ } else if (cur == 'l') {
+ NEXT;
+ /* letter */
+ type = XML_REGEXP_NUMBER_LETTER;
+ } else if (cur == 'o') {
+ NEXT;
+ /* other */
+ type = XML_REGEXP_NUMBER_OTHERS;
+ } else {
+ /* all numbers */
+ type = XML_REGEXP_NUMBER;
+ }
+ } else if (cur == 'P') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'c') {
+ NEXT;
+ /* connector */
+ type = XML_REGEXP_PUNCT_CONNECTOR;
+ } else if (cur == 'd') {
+ NEXT;
+ /* dash */
+ type = XML_REGEXP_PUNCT_DASH;
+ } else if (cur == 's') {
+ NEXT;
+ /* open */
+ type = XML_REGEXP_PUNCT_OPEN;
+ } else if (cur == 'e') {
+ NEXT;
+ /* close */
+ type = XML_REGEXP_PUNCT_CLOSE;
+ } else if (cur == 'i') {
+ NEXT;
+ /* initial quote */
+ type = XML_REGEXP_PUNCT_INITQUOTE;
+ } else if (cur == 'f') {
+ NEXT;
+ /* final quote */
+ type = XML_REGEXP_PUNCT_FINQUOTE;
+ } else if (cur == 'o') {
+ NEXT;
+ /* other */
+ type = XML_REGEXP_PUNCT_OTHERS;
+ } else {
+ /* all punctuation */
+ type = XML_REGEXP_PUNCT;
+ }
+ } else if (cur == 'Z') {
+ NEXT;
+ cur = CUR;
+ if (cur == 's') {
+ NEXT;
+ /* space */
+ type = XML_REGEXP_SEPAR_SPACE;
+ } else if (cur == 'l') {
+ NEXT;
+ /* line */
+ type = XML_REGEXP_SEPAR_LINE;
+ } else if (cur == 'p') {
+ NEXT;
+ /* paragraph */
+ type = XML_REGEXP_SEPAR_PARA;
+ } else {
+ /* all separators */
+ type = XML_REGEXP_SEPAR;
+ }
+ } else if (cur == 'S') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'm') {
+ NEXT;
+ type = XML_REGEXP_SYMBOL_MATH;
+ /* math */
+ } else if (cur == 'c') {
+ NEXT;
+ type = XML_REGEXP_SYMBOL_CURRENCY;
+ /* currency */
+ } else if (cur == 'k') {
+ NEXT;
+ type = XML_REGEXP_SYMBOL_MODIFIER;
+ /* modifiers */
+ } else if (cur == 'o') {
+ NEXT;
+ type = XML_REGEXP_SYMBOL_OTHERS;
+ /* other */
+ } else {
+ /* all symbols */
+ type = XML_REGEXP_SYMBOL;
+ }
+ } else if (cur == 'C') {
+ NEXT;
+ cur = CUR;
+ if (cur == 'c') {
+ NEXT;
+ /* control */
+ type = XML_REGEXP_OTHER_CONTROL;
+ } else if (cur == 'f') {
+ NEXT;
+ /* format */
+ type = XML_REGEXP_OTHER_FORMAT;
+ } else if (cur == 'o') {
+ NEXT;
+ /* private use */
+ type = XML_REGEXP_OTHER_PRIVATE;
+ } else if (cur == 'n') {
+ NEXT;
+ /* not assigned */
+ type = XML_REGEXP_OTHER_NA;
+ } else {
+ /* all others */
+ type = XML_REGEXP_OTHER;
+ }
+ } else if (cur == 'I') {
+ const xmlChar *start;
+ NEXT;
+ cur = CUR;
+ if (cur != 's') {
+ ERROR("IsXXXX expected");
+ return;
+ }
+ NEXT;
+ start = ctxt->cur;
+ cur = CUR;
+ if (((cur >= 'a') && (cur <= 'z')) ||
+ ((cur >= 'A') && (cur <= 'Z')) ||
+ ((cur >= '0') && (cur <= '9')) ||
+ (cur == 0x2D)) {
+ NEXT;
+ cur = CUR;
+ while (((cur >= 'a') && (cur <= 'z')) ||
+ ((cur >= 'A') && (cur <= 'Z')) ||
+ ((cur >= '0') && (cur <= '9')) ||
+ (cur == 0x2D)) {
+ NEXT;
+ cur = CUR;
+ }
+ }
+ type = XML_REGEXP_BLOCK_NAME;
+ blockName = xmlStrndup(start, ctxt->cur - start);
+ } else {
+ ERROR("Unknown char property");
+ return;
+ }
+ if (ctxt->atom == NULL) {
+ ctxt->atom = xmlRegNewAtom(ctxt, type);
+ if (ctxt->atom != NULL)
+ ctxt->atom->valuep = blockName;
+ } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ type, 0, 0, blockName);
+ }
+}
+
+/**
+ * xmlFAParseCharClassEsc:
+ * @ctxt: a regexp parser context
+ *
+ * [23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )
+ * [24] SingleCharEsc ::= '\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]
+ * [25] catEsc ::= '\p{' charProp '}'
+ * [26] complEsc ::= '\P{' charProp '}'
+ * [37] MultiCharEsc ::= '.' | ('\' [sSiIcCdDwW])
+ */
+static void
+xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
+ int cur;
+
+ if (CUR == '.') {
+ if (ctxt->atom == NULL) {
+ ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_ANYCHAR);
+ } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ XML_REGEXP_ANYCHAR, 0, 0, NULL);
+ }
+ NEXT;
+ return;
+ }
+ if (CUR != '\\') {
+ ERROR("Escaped sequence: expecting \\");
+ return;
+ }
+ NEXT;
+ cur = CUR;
+ if (cur == 'p') {
+ NEXT;
+ if (CUR != '{') {
+ ERROR("Expecting '{'");
+ return;
+ }
+ NEXT;
+ xmlFAParseCharProp(ctxt);
+ if (CUR != '}') {
+ ERROR("Expecting '}'");
+ return;
+ }
+ NEXT;
+ } else if (cur == 'P') {
+ NEXT;
+ if (CUR != '{') {
+ ERROR("Expecting '{'");
+ return;
+ }
+ NEXT;
+ xmlFAParseCharProp(ctxt);
+ ctxt->atom->neg = 1;
+ if (CUR != '}') {
+ ERROR("Expecting '}'");
+ return;
+ }
+ NEXT;
+ } else if ((cur == 'n') || (cur == 'r') || (cur == 't') || (cur == '\\') ||
+ (cur == '|') || (cur == '.') || (cur == '?') || (cur == '*') ||
+ (cur == '+') || (cur == '(') || (cur == ')') || (cur == '{') ||
+ (cur == '}') || (cur == 0x2D) || (cur == 0x5B) || (cur == 0x5D) ||
+ (cur == 0x5E)) {
+ if (ctxt->atom == NULL) {
+ ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_CHARVAL);
+ if (ctxt->atom != NULL) {
+ switch (cur) {
+ case 'n':
+ ctxt->atom->codepoint = '\n';
+ break;
+ case 'r':
+ ctxt->atom->codepoint = '\r';
+ break;
+ case 't':
+ ctxt->atom->codepoint = '\t';
+ break;
+ default:
+ ctxt->atom->codepoint = cur;
+ }
+ }
+ } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
+ switch (cur) {
+ case 'n':
+ cur = '\n';
+ break;
+ case 'r':
+ cur = '\r';
+ break;
+ case 't':
+ cur = '\t';
+ break;
+ }
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ XML_REGEXP_CHARVAL, cur, cur, NULL);
+ }
+ NEXT;
+ } else if ((cur == 's') || (cur == 'S') || (cur == 'i') || (cur == 'I') ||
+ (cur == 'c') || (cur == 'C') || (cur == 'd') || (cur == 'D') ||
+ (cur == 'w') || (cur == 'W')) {
+ xmlRegAtomType type = XML_REGEXP_ANYSPACE;
+
+ switch (cur) {
+ case 's':
+ type = XML_REGEXP_ANYSPACE;
+ break;
+ case 'S':
+ type = XML_REGEXP_NOTSPACE;
+ break;
+ case 'i':
+ type = XML_REGEXP_INITNAME;
+ break;
+ case 'I':
+ type = XML_REGEXP_NOTINITNAME;
+ break;
+ case 'c':
+ type = XML_REGEXP_NAMECHAR;
+ break;
+ case 'C':
+ type = XML_REGEXP_NOTNAMECHAR;
+ break;
+ case 'd':
+ type = XML_REGEXP_DECIMAL;
+ break;
+ case 'D':
+ type = XML_REGEXP_NOTDECIMAL;
+ break;
+ case 'w':
+ type = XML_REGEXP_REALCHAR;
+ break;
+ case 'W':
+ type = XML_REGEXP_NOTREALCHAR;
+ break;
+ }
+ NEXT;
+ if (ctxt->atom == NULL) {
+ ctxt->atom = xmlRegNewAtom(ctxt, type);
+ } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ type, 0, 0, NULL);
+ }
+ } else {
+ ERROR("Wrong escape sequence, misuse of character '\\'");
+ }
+}
+
+/**
+ * xmlFAParseCharRange:
+ * @ctxt: a regexp parser context
+ *
+ * [17] charRange ::= seRange | XmlCharRef | XmlCharIncDash
+ * [18] seRange ::= charOrEsc '-' charOrEsc
+ * [20] charOrEsc ::= XmlChar | SingleCharEsc
+ * [21] XmlChar ::= [^\#x2D#x5B#x5D]
+ * [22] XmlCharIncDash ::= [^\#x5B#x5D]
+ */
+static void
+xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
+ int cur, len;
+ int start = -1;
+ int end = -1;
+
+ if (CUR == '\0') {
+ ERROR("Expecting ']'");
+ return;
+ }
+
+ cur = CUR;
+ if (cur == '\\') {
+ NEXT;
+ cur = CUR;
+ switch (cur) {
+ case 'n': start = 0xA; break;
+ case 'r': start = 0xD; break;
+ case 't': start = 0x9; break;
+ case '\\': case '|': case '.': case '-': case '^': case '?':
+ case '*': case '+': case '{': case '}': case '(': case ')':
+ case '[': case ']':
+ start = cur; break;
+ default:
+ ERROR("Invalid escape value");
+ return;
+ }
+ end = start;
+ len = 1;
+ } else if ((cur != 0x5B) && (cur != 0x5D)) {
+ end = start = CUR_SCHAR(ctxt->cur, len);
+ } else {
+ ERROR("Expecting a char range");
+ return;
+ }
+ /*
+ * Since we are "inside" a range, we can assume ctxt->cur is past
+ * the start of ctxt->string, and PREV should be safe
+ */
+ if ((start == '-') && (NXT(1) != ']') && (PREV != '[') && (PREV != '^')) {
+ NEXTL(len);
+ return;
+ }
+ NEXTL(len);
+ cur = CUR;
+ if ((cur != '-') || (NXT(1) == ']')) {
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ XML_REGEXP_CHARVAL, start, end, NULL);
+ return;
+ }
+ NEXT;
+ cur = CUR;
+ if (cur == '\\') {
+ NEXT;
+ cur = CUR;
+ switch (cur) {
+ case 'n': end = 0xA; break;
+ case 'r': end = 0xD; break;
+ case 't': end = 0x9; break;
+ case '\\': case '|': case '.': case '-': case '^': case '?':
+ case '*': case '+': case '{': case '}': case '(': case ')':
+ case '[': case ']':
+ end = cur; break;
+ default:
+ ERROR("Invalid escape value");
+ return;
+ }
+ len = 1;
+ } else if ((cur != 0x5B) && (cur != 0x5D)) {
+ end = CUR_SCHAR(ctxt->cur, len);
+ } else {
+ ERROR("Expecting the end of a char range");
+ return;
+ }
+ NEXTL(len);
+ /* TODO check that the values are acceptable character ranges for XML */
+ if (end < start) {
+ ERROR("End of range is before start of range");
+ } else {
+ xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
+ XML_REGEXP_CHARVAL, start, end, NULL);
+ }
+ return;
+}
+
+/**
+ * xmlFAParsePosCharGroup:
+ * @ctxt: a regexp parser context
+ *
+ * [14] posCharGroup ::= ( charRange | charClassEsc )+
+ */
+static void
+xmlFAParsePosCharGroup(xmlRegParserCtxtPtr ctxt) {
+ do {
+ if (CUR == '\\') {
+ xmlFAParseCharClassEsc(ctxt);
+ } else {
+ xmlFAParseCharRange(ctxt);
+ }
+ } while ((CUR != ']') && (CUR != '^') && (CUR != '-') &&
+ (CUR != 0) && (ctxt->error == 0));
+}
+
+/**
+ * xmlFAParseCharGroup:
+ * @ctxt: a regexp parser context
+ *
+ * [13] charGroup ::= posCharGroup | negCharGroup | charClassSub
+ * [15] negCharGroup ::= '^' posCharGroup
+ * [16] charClassSub ::= ( posCharGroup | negCharGroup ) '-' charClassExpr
+ * [12] charClassExpr ::= '[' charGroup ']'
+ */
+static void
+xmlFAParseCharGroup(xmlRegParserCtxtPtr ctxt) {
+ int n = ctxt->neg;
+ while ((CUR != ']') && (ctxt->error == 0)) {
+ if (CUR == '^') {
+ int neg = ctxt->neg;
+
+ NEXT;
+ ctxt->neg = !ctxt->neg;
+ xmlFAParsePosCharGroup(ctxt);
+ ctxt->neg = neg;
+ } else if ((CUR == '-') && (NXT(1) == '[')) {
+ int neg = ctxt->neg;
+ ctxt->neg = 2;
+ NEXT; /* eat the '-' */
+ NEXT; /* eat the '[' */
+ xmlFAParseCharGroup(ctxt);
+ if (CUR == ']') {
+ NEXT;
+ } else {
+ ERROR("charClassExpr: ']' expected");
+ break;
+ }
+ ctxt->neg = neg;
+ break;
+ } else if (CUR != ']') {
+ xmlFAParsePosCharGroup(ctxt);
+ }
+ }
+ ctxt->neg = n;
+}
+
+/**
+ * xmlFAParseCharClass:
+ * @ctxt: a regexp parser context
+ *
+ * [11] charClass ::= charClassEsc | charClassExpr
+ * [12] charClassExpr ::= '[' charGroup ']'
+ */
+static void
+xmlFAParseCharClass(xmlRegParserCtxtPtr ctxt) {
+ if (CUR == '[') {
+ NEXT;
+ ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_RANGES);
+ if (ctxt->atom == NULL)
+ return;
+ xmlFAParseCharGroup(ctxt);
+ if (CUR == ']') {
+ NEXT;
+ } else {
+ ERROR("xmlFAParseCharClass: ']' expected");
+ }
+ } else {
+ xmlFAParseCharClassEsc(ctxt);
+ }
+}
+
+/**
+ * xmlFAParseQuantExact:
+ * @ctxt: a regexp parser context
+ *
+ * [8] QuantExact ::= [0-9]+
+ *
+ * Returns 0 if success or -1 in case of error
+ */
+static int
+xmlFAParseQuantExact(xmlRegParserCtxtPtr ctxt) {
+ int ret = 0;
+ int ok = 0;
+
+ while ((CUR >= '0') && (CUR <= '9')) {
+ ret = ret * 10 + (CUR - '0');
+ ok = 1;
+ NEXT;
+ }
+ if (ok != 1) {
+ return(-1);
+ }
+ return(ret);
+}
+
+/**
+ * xmlFAParseQuantifier:
+ * @ctxt: a regexp parser context
+ *
+ * [4] quantifier ::= [?*+] | ( '{' quantity '}' )
+ * [5] quantity ::= quantRange | quantMin | QuantExact
+ * [6] quantRange ::= QuantExact ',' QuantExact
+ * [7] quantMin ::= QuantExact ','
+ * [8] QuantExact ::= [0-9]+
+ */
+static int
+xmlFAParseQuantifier(xmlRegParserCtxtPtr ctxt) {
+ int cur;
+
+ cur = CUR;
+ if ((cur == '?') || (cur == '*') || (cur == '+')) {
+ if (ctxt->atom != NULL) {
+ if (cur == '?')
+ ctxt->atom->quant = XML_REGEXP_QUANT_OPT;
+ else if (cur == '*')
+ ctxt->atom->quant = XML_REGEXP_QUANT_MULT;
+ else if (cur == '+')
+ ctxt->atom->quant = XML_REGEXP_QUANT_PLUS;
+ }
+ NEXT;
+ return(1);
+ }
+ if (cur == '{') {
+ int min = 0, max = 0;
+
+ NEXT;
+ cur = xmlFAParseQuantExact(ctxt);
+ if (cur >= 0)
+ min = cur;
+ if (CUR == ',') {
+ NEXT;
+ if (CUR == '}')
+ max = INT_MAX;
+ else {
+ cur = xmlFAParseQuantExact(ctxt);
+ if (cur >= 0)
+ max = cur;
+ else {
+ ERROR("Improper quantifier");
+ }
+ }
+ }
+ if (CUR == '}') {
+ NEXT;
+ } else {
+ ERROR("Unterminated quantifier");
+ }
+ if (max == 0)
+ max = min;
+ if (ctxt->atom != NULL) {
+ ctxt->atom->quant = XML_REGEXP_QUANT_RANGE;
+ ctxt->atom->min = min;
+ ctxt->atom->max = max;
+ }
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlFAParseAtom:
+ * @ctxt: a regexp parser context
+ *
+ * [9] atom ::= Char | charClass | ( '(' regExp ')' )
+ */
+static int
+xmlFAParseAtom(xmlRegParserCtxtPtr ctxt) {
+ int codepoint, len;
+
+ codepoint = xmlFAIsChar(ctxt);
+ if (codepoint > 0) {
+ ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_CHARVAL);
+ if (ctxt->atom == NULL)
+ return(-1);
+ codepoint = CUR_SCHAR(ctxt->cur, len);
+ ctxt->atom->codepoint = codepoint;
+ NEXTL(len);
+ return(1);
+ } else if (CUR == '|') {
+ return(0);
+ } else if (CUR == 0) {
+ return(0);
+ } else if (CUR == ')') {
+ return(0);
+ } else if (CUR == '(') {
+ xmlRegStatePtr start, oldend, start0;
+
+ NEXT;
+ /*
+ * this extra Epsilon transition is needed if we count with 0 allowed
+ * unfortunately this can't be known at that point
+ */
+ xmlFAGenerateEpsilonTransition(ctxt, ctxt->state, NULL);
+ start0 = ctxt->state;
+ xmlFAGenerateEpsilonTransition(ctxt, ctxt->state, NULL);
+ start = ctxt->state;
+ oldend = ctxt->end;
+ ctxt->end = NULL;
+ ctxt->atom = NULL;
+ xmlFAParseRegExp(ctxt, 0);
+ if (CUR == ')') {
+ NEXT;
+ } else {
+ ERROR("xmlFAParseAtom: expecting ')'");
+ }
+ ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_SUBREG);
+ if (ctxt->atom == NULL)
+ return(-1);
+ ctxt->atom->start = start;
+ ctxt->atom->start0 = start0;
+ ctxt->atom->stop = ctxt->state;
+ ctxt->end = oldend;
+ return(1);
+ } else if ((CUR == '[') || (CUR == '\\') || (CUR == '.')) {
+ xmlFAParseCharClass(ctxt);
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlFAParsePiece:
+ * @ctxt: a regexp parser context
+ *
+ * [3] piece ::= atom quantifier?
+ */
+static int
+xmlFAParsePiece(xmlRegParserCtxtPtr ctxt) {
+ int ret;
+
+ ctxt->atom = NULL;
+ ret = xmlFAParseAtom(ctxt);
+ if (ret == 0)
+ return(0);
+ if (ctxt->atom == NULL) {
+ ERROR("internal: no atom generated");
+ }
+ xmlFAParseQuantifier(ctxt);
+ return(1);
+}
+
+/**
+ * xmlFAParseBranch:
+ * @ctxt: a regexp parser context
+ * @to: optional target to the end of the branch
+ *
+ * @to is used to optimize by removing duplicate path in automata
+ * in expressions like (a|b)(c|d)
+ *
+ * [2] branch ::= piece*
+ */
+static int
+xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
+ xmlRegStatePtr previous;
+ int ret;
+
+ previous = ctxt->state;
+ ret = xmlFAParsePiece(ctxt);
+ if (ret != 0) {
+ if (xmlFAGenerateTransitions(ctxt, previous,
+ (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
+ return(-1);
+ previous = ctxt->state;
+ ctxt->atom = NULL;
+ }
+ while ((ret != 0) && (ctxt->error == 0)) {
+ ret = xmlFAParsePiece(ctxt);
+ if (ret != 0) {
+ if (xmlFAGenerateTransitions(ctxt, previous,
+ (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
+ return(-1);
+ previous = ctxt->state;
+ ctxt->atom = NULL;
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlFAParseRegExp:
+ * @ctxt: a regexp parser context
+ * @top: is this the top-level expression ?
+ *
+ * [1] regExp ::= branch ( '|' branch )*
+ */
+static void
+xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
+ xmlRegStatePtr start, end;
+
+ /* if not top start should have been generated by an epsilon trans */
+ start = ctxt->state;
+ ctxt->end = NULL;
+ xmlFAParseBranch(ctxt, NULL);
+ if (top) {
+#ifdef DEBUG_REGEXP_GRAPH
+ printf("State %d is final\n", ctxt->state->no);
+#endif
+ ctxt->state->type = XML_REGEXP_FINAL_STATE;
+ }
+ if (CUR != '|') {
+ ctxt->end = ctxt->state;
+ return;
+ }
+ end = ctxt->state;
+ while ((CUR == '|') && (ctxt->error == 0)) {
+ NEXT;
+ if (CUR == 0) {
+ ERROR("expecting a branch after |")
+ return;
+ }
+ ctxt->state = start;
+ ctxt->end = NULL;
+ xmlFAParseBranch(ctxt, end);
+ }
+ if (!top) {
+ ctxt->state = end;
+ ctxt->end = end;
+ }
+}
+
+/************************************************************************
+ * *
+ * The basic API *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlRegexpPrint:
+ * @output: the file for the output debug
+ * @regexp: the compiled regexp
+ *
+ * Print the content of the compiled regular expression
+ */
+void
+xmlRegexpPrint(FILE *output, xmlRegexpPtr regexp) {
+ int i;
+
+ if (output == NULL)
+ return;
+ fprintf(output, " regexp: ");
+ if (regexp == NULL) {
+ fprintf(output, "NULL\n");
+ return;
+ }
+ fprintf(output, "'%s' ", regexp->string);
+ fprintf(output, "\n");
+ fprintf(output, "%d atoms:\n", regexp->nbAtoms);
+ for (i = 0;i < regexp->nbAtoms; i++) {
+ fprintf(output, " %02d ", i);
+ xmlRegPrintAtom(output, regexp->atoms[i]);
+ }
+ fprintf(output, "%d states:", regexp->nbStates);
+ fprintf(output, "\n");
+ for (i = 0;i < regexp->nbStates; i++) {
+ xmlRegPrintState(output, regexp->states[i]);
+ }
+ fprintf(output, "%d counters:\n", regexp->nbCounters);
+ for (i = 0;i < regexp->nbCounters; i++) {
+ fprintf(output, " %d: min %d max %d\n", i, regexp->counters[i].min,
+ regexp->counters[i].max);
+ }
+}
+
+/**
+ * xmlRegexpCompile:
+ * @regexp: a regular expression string
+ *
+ * Parses a regular expression conforming to XML Schemas Part 2 Datatype
+ * Appendix F and builds an automata suitable for testing strings against
+ * that regular expression
+ *
+ * Returns the compiled expression or NULL in case of error
+ */
+xmlRegexpPtr
+xmlRegexpCompile(const xmlChar *regexp) {
+ xmlRegexpPtr ret;
+ xmlRegParserCtxtPtr ctxt;
+
+ ctxt = xmlRegNewParserCtxt(regexp);
+ if (ctxt == NULL)
+ return(NULL);
+
+ /* initialize the parser */
+ ctxt->end = NULL;
+ ctxt->start = ctxt->state = xmlRegNewState(ctxt);
+ xmlRegStatePush(ctxt, ctxt->start);
+
+ /* parse the expression building an automata */
+ xmlFAParseRegExp(ctxt, 1);
+ if (CUR != 0) {
+ ERROR("xmlFAParseRegExp: extra characters");
+ }
+ if (ctxt->error != 0) {
+ xmlRegFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ ctxt->end = ctxt->state;
+ ctxt->start->type = XML_REGEXP_START_STATE;
+ ctxt->end->type = XML_REGEXP_FINAL_STATE;
+
+ /* remove the Epsilon except for counted transitions */
+ xmlFAEliminateEpsilonTransitions(ctxt);
+
+
+ if (ctxt->error != 0) {
+ xmlRegFreeParserCtxt(ctxt);
+ return(NULL);
+ }
+ ret = xmlRegEpxFromParse(ctxt);
+ xmlRegFreeParserCtxt(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlRegexpExec:
+ * @comp: the compiled regular expression
+ * @content: the value to check against the regular expression
+ *
+ * Check if the regular expression generates the value
+ *
+ * Returns 1 if it matches, 0 if not and a negative value in case of error
+ */
+int
+xmlRegexpExec(xmlRegexpPtr comp, const xmlChar *content) {
+ if ((comp == NULL) || (content == NULL))
+ return(-1);
+ return(xmlFARegExec(comp, content));
+}
+
+/**
+ * xmlRegexpIsDeterminist:
+ * @comp: the compiled regular expression
+ *
+ * Check if the regular expression is determinist
+ *
+ * Returns 1 if it yes, 0 if not and a negative value in case of error
+ */
+int
+xmlRegexpIsDeterminist(xmlRegexpPtr comp) {
+ xmlAutomataPtr am;
+ int ret;
+
+ if (comp == NULL)
+ return(-1);
+ if (comp->determinist != -1)
+ return(comp->determinist);
+
+ am = xmlNewAutomata();
+ if (am->states != NULL) {
+ int i;
+
+ for (i = 0;i < am->nbStates;i++)
+ xmlRegFreeState(am->states[i]);
+ xmlFree(am->states);
+ }
+ am->nbAtoms = comp->nbAtoms;
+ am->atoms = comp->atoms;
+ am->nbStates = comp->nbStates;
+ am->states = comp->states;
+ am->determinist = -1;
+ am->flags = comp->flags;
+ ret = xmlFAComputesDeterminism(am);
+ am->atoms = NULL;
+ am->states = NULL;
+ xmlFreeAutomata(am);
+ comp->determinist = ret;
+ return(ret);
+}
+
+/**
+ * xmlRegFreeRegexp:
+ * @regexp: the regexp
+ *
+ * Free a regexp
+ */
+void
+xmlRegFreeRegexp(xmlRegexpPtr regexp) {
+ int i;
+ if (regexp == NULL)
+ return;
+
+ if (regexp->string != NULL)
+ xmlFree(regexp->string);
+ if (regexp->states != NULL) {
+ for (i = 0;i < regexp->nbStates;i++)
+ xmlRegFreeState(regexp->states[i]);
+ xmlFree(regexp->states);
+ }
+ if (regexp->atoms != NULL) {
+ for (i = 0;i < regexp->nbAtoms;i++)
+ xmlRegFreeAtom(regexp->atoms[i]);
+ xmlFree(regexp->atoms);
+ }
+ if (regexp->counters != NULL)
+ xmlFree(regexp->counters);
+ if (regexp->compact != NULL)
+ xmlFree(regexp->compact);
+ if (regexp->transdata != NULL)
+ xmlFree(regexp->transdata);
+ if (regexp->stringMap != NULL) {
+ for (i = 0; i < regexp->nbstrings;i++)
+ xmlFree(regexp->stringMap[i]);
+ xmlFree(regexp->stringMap);
+ }
+
+ xmlFree(regexp);
+}
+
+#ifdef LIBXML_AUTOMATA_ENABLED
+/************************************************************************
+ * *
+ * The Automata interface *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNewAutomata:
+ *
+ * Create a new automata
+ *
+ * Returns the new object or NULL in case of failure
+ */
+xmlAutomataPtr
+xmlNewAutomata(void) {
+ xmlAutomataPtr ctxt;
+
+ ctxt = xmlRegNewParserCtxt(NULL);
+ if (ctxt == NULL)
+ return(NULL);
+
+ /* initialize the parser */
+ ctxt->end = NULL;
+ ctxt->start = ctxt->state = xmlRegNewState(ctxt);
+ if (ctxt->start == NULL) {
+ xmlFreeAutomata(ctxt);
+ return(NULL);
+ }
+ ctxt->start->type = XML_REGEXP_START_STATE;
+ if (xmlRegStatePush(ctxt, ctxt->start) < 0) {
+ xmlRegFreeState(ctxt->start);
+ xmlFreeAutomata(ctxt);
+ return(NULL);
+ }
+ ctxt->flags = 0;
+
+ return(ctxt);
+}
+
+/**
+ * xmlFreeAutomata:
+ * @am: an automata
+ *
+ * Free an automata
+ */
+void
+xmlFreeAutomata(xmlAutomataPtr am) {
+ if (am == NULL)
+ return;
+ xmlRegFreeParserCtxt(am);
+}
+
+/**
+ * xmlAutomataSetFlags:
+ * @am: an automata
+ * @flags: a set of internal flags
+ *
+ * Set some flags on the automata
+ */
+void
+xmlAutomataSetFlags(xmlAutomataPtr am, int flags) {
+ if (am == NULL)
+ return;
+ am->flags |= flags;
+}
+
+/**
+ * xmlAutomataGetInitState:
+ * @am: an automata
+ *
+ * Initial state lookup
+ *
+ * Returns the initial state of the automata
+ */
+xmlAutomataStatePtr
+xmlAutomataGetInitState(xmlAutomataPtr am) {
+ if (am == NULL)
+ return(NULL);
+ return(am->start);
+}
+
+/**
+ * xmlAutomataSetFinalState:
+ * @am: an automata
+ * @state: a state in this automata
+ *
+ * Makes that state a final state
+ *
+ * Returns 0 or -1 in case of error
+ */
+int
+xmlAutomataSetFinalState(xmlAutomataPtr am, xmlAutomataStatePtr state) {
+ if ((am == NULL) || (state == NULL))
+ return(-1);
+ state->type = XML_REGEXP_FINAL_STATE;
+ return(0);
+}
+
+/**
+ * xmlAutomataNewTransition:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the input string associated to that transition
+ * @data: data passed to the callback function if the transition is activated
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by the value of @token
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewTransition(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ void *data) {
+ xmlRegAtomPtr atom;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ atom->data = data;
+ atom->valuep = xmlStrdup(token);
+
+ if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewTransition2:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the first input string associated to that transition
+ * @token2: the second input string associated to that transition
+ * @data: data passed to the callback function if the transition is activated
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by the value of @token
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewTransition2(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ const xmlChar *token2, void *data) {
+ xmlRegAtomPtr atom;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ atom->data = data;
+ if ((token2 == NULL) || (*token2 == 0)) {
+ atom->valuep = xmlStrdup(token);
+ } else {
+ int lenn, lenp;
+ xmlChar *str;
+
+ lenn = strlen((char *) token2);
+ lenp = strlen((char *) token);
+
+ str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (str == NULL) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ memcpy(&str[0], token, lenp);
+ str[lenp] = '|';
+ memcpy(&str[lenp + 1], token2, lenn);
+ str[lenn + lenp + 1] = 0;
+
+ atom->valuep = str;
+ }
+
+ if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewNegTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the first input string associated to that transition
+ * @token2: the second input string associated to that transition
+ * @data: data passed to the callback function if the transition is activated
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by any value except (@token,@token2)
+ * Note that if @token2 is not NULL, then (X, NULL) won't match to follow
+ # the semantic of XSD ##other
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewNegTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ const xmlChar *token2, void *data) {
+ xmlRegAtomPtr atom;
+ xmlChar err_msg[200];
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ atom->data = data;
+ atom->neg = 1;
+ if ((token2 == NULL) || (*token2 == 0)) {
+ atom->valuep = xmlStrdup(token);
+ } else {
+ int lenn, lenp;
+ xmlChar *str;
+
+ lenn = strlen((char *) token2);
+ lenp = strlen((char *) token);
+
+ str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (str == NULL) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ memcpy(&str[0], token, lenp);
+ str[lenp] = '|';
+ memcpy(&str[lenp + 1], token2, lenn);
+ str[lenn + lenp + 1] = 0;
+
+ atom->valuep = str;
+ }
+ snprintf((char *) err_msg, 199, "not %s", (const char *) atom->valuep);
+ err_msg[199] = 0;
+ atom->valuep2 = xmlStrdup(err_msg);
+
+ if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ am->negs++;
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewCountTrans2:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the input string associated to that transition
+ * @token2: the second input string associated to that transition
+ * @min: the minimum successive occurences of token
+ * @max: the maximum successive occurences of token
+ * @data: data associated to the transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by a succession of input of value @token and @token2 and
+ * whose number is between @min and @max
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ const xmlChar *token2,
+ int min, int max, void *data) {
+ xmlRegAtomPtr atom;
+ int counter;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ if (min < 0)
+ return(NULL);
+ if ((max < min) || (max < 1))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ if ((token2 == NULL) || (*token2 == 0)) {
+ atom->valuep = xmlStrdup(token);
+ } else {
+ int lenn, lenp;
+ xmlChar *str;
+
+ lenn = strlen((char *) token2);
+ lenp = strlen((char *) token);
+
+ str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (str == NULL) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ memcpy(&str[0], token, lenp);
+ str[lenp] = '|';
+ memcpy(&str[lenp + 1], token2, lenn);
+ str[lenn + lenp + 1] = 0;
+
+ atom->valuep = str;
+ }
+ atom->data = data;
+ if (min == 0)
+ atom->min = 1;
+ else
+ atom->min = min;
+ atom->max = max;
+
+ /*
+ * associate a counter to the transition.
+ */
+ counter = xmlRegGetCounter(am);
+ am->counters[counter].min = min;
+ am->counters[counter].max = max;
+
+ /* xmlFAGenerateTransitions(am, from, to, atom); */
+ if (to == NULL) {
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
+ }
+ xmlRegStateAddTrans(am, from, atom, to, counter, -1);
+ xmlRegAtomPush(am, atom);
+ am->state = to;
+
+ if (to == NULL)
+ to = am->state;
+ if (to == NULL)
+ return(NULL);
+ if (min == 0)
+ xmlFAGenerateEpsilonTransition(am, from, to);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewCountTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the input string associated to that transition
+ * @min: the minimum successive occurences of token
+ * @max: the maximum successive occurences of token
+ * @data: data associated to the transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by a succession of input of value @token and whose number
+ * is between @min and @max
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ int min, int max, void *data) {
+ xmlRegAtomPtr atom;
+ int counter;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ if (min < 0)
+ return(NULL);
+ if ((max < min) || (max < 1))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ atom->valuep = xmlStrdup(token);
+ atom->data = data;
+ if (min == 0)
+ atom->min = 1;
+ else
+ atom->min = min;
+ atom->max = max;
+
+ /*
+ * associate a counter to the transition.
+ */
+ counter = xmlRegGetCounter(am);
+ am->counters[counter].min = min;
+ am->counters[counter].max = max;
+
+ /* xmlFAGenerateTransitions(am, from, to, atom); */
+ if (to == NULL) {
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
+ }
+ xmlRegStateAddTrans(am, from, atom, to, counter, -1);
+ xmlRegAtomPush(am, atom);
+ am->state = to;
+
+ if (to == NULL)
+ to = am->state;
+ if (to == NULL)
+ return(NULL);
+ if (min == 0)
+ xmlFAGenerateEpsilonTransition(am, from, to);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewOnceTrans2:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the input string associated to that transition
+ * @token2: the second input string associated to that transition
+ * @min: the minimum successive occurences of token
+ * @max: the maximum successive occurences of token
+ * @data: data associated to the transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by a succession of input of value @token and @token2 and whose
+ * number is between @min and @max, moreover that transition can only be
+ * crossed once.
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ const xmlChar *token2,
+ int min, int max, void *data) {
+ xmlRegAtomPtr atom;
+ int counter;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ if (min < 1)
+ return(NULL);
+ if ((max < min) || (max < 1))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ if ((token2 == NULL) || (*token2 == 0)) {
+ atom->valuep = xmlStrdup(token);
+ } else {
+ int lenn, lenp;
+ xmlChar *str;
+
+ lenn = strlen((char *) token2);
+ lenp = strlen((char *) token);
+
+ str = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
+ if (str == NULL) {
+ xmlRegFreeAtom(atom);
+ return(NULL);
+ }
+ memcpy(&str[0], token, lenp);
+ str[lenp] = '|';
+ memcpy(&str[lenp + 1], token2, lenn);
+ str[lenn + lenp + 1] = 0;
+
+ atom->valuep = str;
+ }
+ atom->data = data;
+ atom->quant = XML_REGEXP_QUANT_ONCEONLY;
+ atom->min = min;
+ atom->max = max;
+ /*
+ * associate a counter to the transition.
+ */
+ counter = xmlRegGetCounter(am);
+ am->counters[counter].min = 1;
+ am->counters[counter].max = 1;
+
+ /* xmlFAGenerateTransitions(am, from, to, atom); */
+ if (to == NULL) {
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
+ }
+ xmlRegStateAddTrans(am, from, atom, to, counter, -1);
+ xmlRegAtomPush(am, atom);
+ am->state = to;
+ return(to);
+}
+
+
+
+/**
+ * xmlAutomataNewOnceTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @token: the input string associated to that transition
+ * @min: the minimum successive occurences of token
+ * @max: the maximum successive occurences of token
+ * @data: data associated to the transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a transition from the @from state to the target state
+ * activated by a succession of input of value @token and whose number
+ * is between @min and @max, moreover that transition can only be crossed
+ * once.
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, const xmlChar *token,
+ int min, int max, void *data) {
+ xmlRegAtomPtr atom;
+ int counter;
+
+ if ((am == NULL) || (from == NULL) || (token == NULL))
+ return(NULL);
+ if (min < 1)
+ return(NULL);
+ if ((max < min) || (max < 1))
+ return(NULL);
+ atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
+ if (atom == NULL)
+ return(NULL);
+ atom->valuep = xmlStrdup(token);
+ atom->data = data;
+ atom->quant = XML_REGEXP_QUANT_ONCEONLY;
+ atom->min = min;
+ atom->max = max;
+ /*
+ * associate a counter to the transition.
+ */
+ counter = xmlRegGetCounter(am);
+ am->counters[counter].min = 1;
+ am->counters[counter].max = 1;
+
+ /* xmlFAGenerateTransitions(am, from, to, atom); */
+ if (to == NULL) {
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
+ }
+ xmlRegStateAddTrans(am, from, atom, to, counter, -1);
+ xmlRegAtomPush(am, atom);
+ am->state = to;
+ return(to);
+}
+
+/**
+ * xmlAutomataNewState:
+ * @am: an automata
+ *
+ * Create a new disconnected state in the automata
+ *
+ * Returns the new state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewState(xmlAutomataPtr am) {
+ xmlAutomataStatePtr to;
+
+ if (am == NULL)
+ return(NULL);
+ to = xmlRegNewState(am);
+ xmlRegStatePush(am, to);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewEpsilon:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds an epsilon transition from the @from state to the
+ * target state
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewEpsilon(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to) {
+ if ((am == NULL) || (from == NULL))
+ return(NULL);
+ xmlFAGenerateEpsilonTransition(am, from, to);
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewAllTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @lax: allow to transition if not all all transitions have been activated
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds a an ALL transition from the @from state to the
+ * target state. That transition is an epsilon transition allowed only when
+ * all transitions from the @from node have been activated.
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewAllTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, int lax) {
+ if ((am == NULL) || (from == NULL))
+ return(NULL);
+ xmlFAGenerateAllTransition(am, from, to, lax);
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewCounter:
+ * @am: an automata
+ * @min: the minimal value on the counter
+ * @max: the maximal value on the counter
+ *
+ * Create a new counter
+ *
+ * Returns the counter number or -1 in case of error
+ */
+int
+xmlAutomataNewCounter(xmlAutomataPtr am, int min, int max) {
+ int ret;
+
+ if (am == NULL)
+ return(-1);
+
+ ret = xmlRegGetCounter(am);
+ if (ret < 0)
+ return(-1);
+ am->counters[ret].min = min;
+ am->counters[ret].max = max;
+ return(ret);
+}
+
+/**
+ * xmlAutomataNewCountedTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @counter: the counter associated to that transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds an epsilon transition from the @from state to the target state
+ * which will increment the counter provided
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewCountedTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, int counter) {
+ if ((am == NULL) || (from == NULL) || (counter < 0))
+ return(NULL);
+ xmlFAGenerateCountedEpsilonTransition(am, from, to, counter);
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataNewCounterTrans:
+ * @am: an automata
+ * @from: the starting point of the transition
+ * @to: the target point of the transition or NULL
+ * @counter: the counter associated to that transition
+ *
+ * If @to is NULL, this creates first a new target state in the automata
+ * and then adds an epsilon transition from the @from state to the target state
+ * which will be allowed only if the counter is within the right range.
+ *
+ * Returns the target state or NULL in case of error
+ */
+xmlAutomataStatePtr
+xmlAutomataNewCounterTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to, int counter) {
+ if ((am == NULL) || (from == NULL) || (counter < 0))
+ return(NULL);
+ xmlFAGenerateCountedTransition(am, from, to, counter);
+ if (to == NULL)
+ return(am->state);
+ return(to);
+}
+
+/**
+ * xmlAutomataCompile:
+ * @am: an automata
+ *
+ * Compile the automata into a Reg Exp ready for being executed.
+ * The automata should be free after this point.
+ *
+ * Returns the compiled regexp or NULL in case of error
+ */
+xmlRegexpPtr
+xmlAutomataCompile(xmlAutomataPtr am) {
+ xmlRegexpPtr ret;
+
+ if ((am == NULL) || (am->error != 0)) return(NULL);
+ xmlFAEliminateEpsilonTransitions(am);
+ /* xmlFAComputesDeterminism(am); */
+ ret = xmlRegEpxFromParse(am);
+
+ return(ret);
+}
+
+/**
+ * xmlAutomataIsDeterminist:
+ * @am: an automata
+ *
+ * Checks if an automata is determinist.
+ *
+ * Returns 1 if true, 0 if not, and -1 in case of error
+ */
+int
+xmlAutomataIsDeterminist(xmlAutomataPtr am) {
+ int ret;
+
+ if (am == NULL)
+ return(-1);
+
+ ret = xmlFAComputesDeterminism(am);
+ return(ret);
+}
+#endif /* LIBXML_AUTOMATA_ENABLED */
+
+#ifdef LIBXML_EXPR_ENABLED
+/************************************************************************
+ * *
+ * Formal Expression handling code *
+ * *
+ ************************************************************************/
+/************************************************************************
+ * *
+ * Expression handling context *
+ * *
+ ************************************************************************/
+
+struct _xmlExpCtxt {
+ xmlDictPtr dict;
+ xmlExpNodePtr *table;
+ int size;
+ int nbElems;
+ int nb_nodes;
+ int maxNodes;
+ const char *expr;
+ const char *cur;
+ int nb_cons;
+ int tabSize;
+};
+
+/**
+ * xmlExpNewCtxt:
+ * @maxNodes: the maximum number of nodes
+ * @dict: optional dictionnary to use internally
+ *
+ * Creates a new context for manipulating expressions
+ *
+ * Returns the context or NULL in case of error
+ */
+xmlExpCtxtPtr
+xmlExpNewCtxt(int maxNodes, xmlDictPtr dict) {
+ xmlExpCtxtPtr ret;
+ int size = 256;
+
+ if (maxNodes <= 4096)
+ maxNodes = 4096;
+
+ ret = (xmlExpCtxtPtr) xmlMalloc(sizeof(xmlExpCtxt));
+ if (ret == NULL)
+ return(NULL);
+ memset(ret, 0, sizeof(xmlExpCtxt));
+ ret->size = size;
+ ret->nbElems = 0;
+ ret->maxNodes = maxNodes;
+ ret->table = xmlMalloc(size * sizeof(xmlExpNodePtr));
+ if (ret->table == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ memset(ret->table, 0, size * sizeof(xmlExpNodePtr));
+ if (dict == NULL) {
+ ret->dict = xmlDictCreate();
+ if (ret->dict == NULL) {
+ xmlFree(ret->table);
+ xmlFree(ret);
+ return(NULL);
+ }
+ } else {
+ ret->dict = dict;
+ xmlDictReference(ret->dict);
+ }
+ return(ret);
+}
+
+/**
+ * xmlExpFreeCtxt:
+ * @ctxt: an expression context
+ *
+ * Free an expression context
+ */
+void
+xmlExpFreeCtxt(xmlExpCtxtPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+ xmlDictFree(ctxt->dict);
+ if (ctxt->table != NULL)
+ xmlFree(ctxt->table);
+ xmlFree(ctxt);
+}
+
+/************************************************************************
+ * *
+ * Structure associated to an expression node *
+ * *
+ ************************************************************************/
+#define MAX_NODES 10000
+
+/* #define DEBUG_DERIV */
+
+/*
+ * TODO:
+ * - Wildcards
+ * - public API for creation
+ *
+ * Started
+ * - regression testing
+ *
+ * Done
+ * - split into module and test tool
+ * - memleaks
+ */
+
+typedef enum {
+ XML_EXP_NILABLE = (1 << 0)
+} xmlExpNodeInfo;
+
+#define IS_NILLABLE(node) ((node)->info & XML_EXP_NILABLE)
+
+struct _xmlExpNode {
+ unsigned char type;/* xmlExpNodeType */
+ unsigned char info;/* OR of xmlExpNodeInfo */
+ unsigned short key; /* the hash key */
+ unsigned int ref; /* The number of references */
+ int c_max; /* the maximum length it can consume */
+ xmlExpNodePtr exp_left;
+ xmlExpNodePtr next;/* the next node in the hash table or free list */
+ union {
+ struct {
+ int f_min;
+ int f_max;
+ } count;
+ struct {
+ xmlExpNodePtr f_right;
+ } children;
+ const xmlChar *f_str;
+ } field;
+};
+
+#define exp_min field.count.f_min
+#define exp_max field.count.f_max
+/* #define exp_left field.children.f_left */
+#define exp_right field.children.f_right
+#define exp_str field.f_str
+
+static xmlExpNodePtr xmlExpNewNode(xmlExpCtxtPtr ctxt, xmlExpNodeType type);
+static xmlExpNode forbiddenExpNode = {
+ XML_EXP_FORBID, 0, 0, 0, 0, NULL, NULL, {{ 0, 0}}
+};
+xmlExpNodePtr forbiddenExp = &forbiddenExpNode;
+static xmlExpNode emptyExpNode = {
+ XML_EXP_EMPTY, 1, 0, 0, 0, NULL, NULL, {{ 0, 0}}
+};
+xmlExpNodePtr emptyExp = &emptyExpNode;
+
+/************************************************************************
+ * *
+ * The custom hash table for unicity and canonicalization *
+ * of sub-expressions pointers *
+ * *
+ ************************************************************************/
+/*
+ * xmlExpHashNameComputeKey:
+ * Calculate the hash key for a token
+ */
+static unsigned short
+xmlExpHashNameComputeKey(const xmlChar *name) {
+ unsigned short value = 0L;
+ char ch;
+
+ if (name != NULL) {
+ value += 30 * (*name);
+ while ((ch = *name++) != 0) {
+ value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
+ }
+ }
+ return (value);
+}
+
+/*
+ * xmlExpHashComputeKey:
+ * Calculate the hash key for a compound expression
+ */
+static unsigned short
+xmlExpHashComputeKey(xmlExpNodeType type, xmlExpNodePtr left,
+ xmlExpNodePtr right) {
+ unsigned long value;
+ unsigned short ret;
+
+ switch (type) {
+ case XML_EXP_SEQ:
+ value = left->key;
+ value += right->key;
+ value *= 3;
+ ret = (unsigned short) value;
+ break;
+ case XML_EXP_OR:
+ value = left->key;
+ value += right->key;
+ value *= 7;
+ ret = (unsigned short) value;
+ break;
+ case XML_EXP_COUNT:
+ value = left->key;
+ value += right->key;
+ ret = (unsigned short) value;
+ break;
+ default:
+ ret = 0;
+ }
+ return(ret);
+}
+
+
+static xmlExpNodePtr
+xmlExpNewNode(xmlExpCtxtPtr ctxt, xmlExpNodeType type) {
+ xmlExpNodePtr ret;
+
+ if (ctxt->nb_nodes >= MAX_NODES)
+ return(NULL);
+ ret = (xmlExpNodePtr) xmlMalloc(sizeof(xmlExpNode));
+ if (ret == NULL)
+ return(NULL);
+ memset(ret, 0, sizeof(xmlExpNode));
+ ret->type = type;
+ ret->next = NULL;
+ ctxt->nb_nodes++;
+ ctxt->nb_cons++;
+ return(ret);
+}
+
+/**
+ * xmlExpHashGetEntry:
+ * @table: the hash table
+ *
+ * Get the unique entry from the hash table. The entry is created if
+ * needed. @left and @right are consumed, i.e. their ref count will
+ * be decremented by the operation.
+ *
+ * Returns the pointer or NULL in case of error
+ */
+static xmlExpNodePtr
+xmlExpHashGetEntry(xmlExpCtxtPtr ctxt, xmlExpNodeType type,
+ xmlExpNodePtr left, xmlExpNodePtr right,
+ const xmlChar *name, int min, int max) {
+ unsigned short kbase, key;
+ xmlExpNodePtr entry;
+ xmlExpNodePtr insert;
+
+ if (ctxt == NULL)
+ return(NULL);
+
+ /*
+ * Check for duplicate and insertion location.
+ */
+ if (type == XML_EXP_ATOM) {
+ kbase = xmlExpHashNameComputeKey(name);
+ } else if (type == XML_EXP_COUNT) {
+ /* COUNT reduction rule 1 */
+ /* a{1} -> a */
+ if (min == max) {
+ if (min == 1) {
+ return(left);
+ }
+ if (min == 0) {
+ xmlExpFree(ctxt, left);
+ return(emptyExp);
+ }
+ }
+ if (min < 0) {
+ xmlExpFree(ctxt, left);
+ return(forbiddenExp);
+ }
+ if (max == -1)
+ kbase = min + 79;
+ else
+ kbase = max - min;
+ kbase += left->key;
+ } else if (type == XML_EXP_OR) {
+ /* Forbid reduction rules */
+ if (left->type == XML_EXP_FORBID) {
+ xmlExpFree(ctxt, left);
+ return(right);
+ }
+ if (right->type == XML_EXP_FORBID) {
+ xmlExpFree(ctxt, right);
+ return(left);
+ }
+
+ /* OR reduction rule 1 */
+ /* a | a reduced to a */
+ if (left == right) {
+ left->ref--;
+ return(left);
+ }
+ /* OR canonicalization rule 1 */
+ /* linearize (a | b) | c into a | (b | c) */
+ if ((left->type == XML_EXP_OR) && (right->type != XML_EXP_OR)) {
+ xmlExpNodePtr tmp = left;
+ left = right;
+ right = tmp;
+ }
+ /* OR reduction rule 2 */
+ /* a | (a | b) and b | (a | b) are reduced to a | b */
+ if (right->type == XML_EXP_OR) {
+ if ((left == right->exp_left) ||
+ (left == right->exp_right)) {
+ xmlExpFree(ctxt, left);
+ return(right);
+ }
+ }
+ /* OR canonicalization rule 2 */
+ /* linearize (a | b) | c into a | (b | c) */
+ if (left->type == XML_EXP_OR) {
+ xmlExpNodePtr tmp;
+
+ /* OR canonicalization rule 2 */
+ if ((left->exp_right->type != XML_EXP_OR) &&
+ (left->exp_right->key < left->exp_left->key)) {
+ tmp = left->exp_right;
+ left->exp_right = left->exp_left;
+ left->exp_left = tmp;
+ }
+ left->exp_right->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, left->exp_right, right,
+ NULL, 0, 0);
+ left->exp_left->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, left->exp_left, tmp,
+ NULL, 0, 0);
+
+ xmlExpFree(ctxt, left);
+ return(tmp);
+ }
+ if (right->type == XML_EXP_OR) {
+ /* Ordering in the tree */
+ /* C | (A | B) -> A | (B | C) */
+ if (left->key > right->exp_right->key) {
+ xmlExpNodePtr tmp;
+ right->exp_right->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, right->exp_right,
+ left, NULL, 0, 0);
+ right->exp_left->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, right->exp_left,
+ tmp, NULL, 0, 0);
+ xmlExpFree(ctxt, right);
+ return(tmp);
+ }
+ /* Ordering in the tree */
+ /* B | (A | C) -> A | (B | C) */
+ if (left->key > right->exp_left->key) {
+ xmlExpNodePtr tmp;
+ right->exp_right->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, left,
+ right->exp_right, NULL, 0, 0);
+ right->exp_left->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, right->exp_left,
+ tmp, NULL, 0, 0);
+ xmlExpFree(ctxt, right);
+ return(tmp);
+ }
+ }
+ /* we know both types are != XML_EXP_OR here */
+ else if (left->key > right->key) {
+ xmlExpNodePtr tmp = left;
+ left = right;
+ right = tmp;
+ }
+ kbase = xmlExpHashComputeKey(type, left, right);
+ } else if (type == XML_EXP_SEQ) {
+ /* Forbid reduction rules */
+ if (left->type == XML_EXP_FORBID) {
+ xmlExpFree(ctxt, right);
+ return(left);
+ }
+ if (right->type == XML_EXP_FORBID) {
+ xmlExpFree(ctxt, left);
+ return(right);
+ }
+ /* Empty reduction rules */
+ if (right->type == XML_EXP_EMPTY) {
+ return(left);
+ }
+ if (left->type == XML_EXP_EMPTY) {
+ return(right);
+ }
+ kbase = xmlExpHashComputeKey(type, left, right);
+ } else
+ return(NULL);
+
+ key = kbase % ctxt->size;
+ if (ctxt->table[key] != NULL) {
+ for (insert = ctxt->table[key]; insert != NULL;
+ insert = insert->next) {
+ if ((insert->key == kbase) &&
+ (insert->type == type)) {
+ if (type == XML_EXP_ATOM) {
+ if (name == insert->exp_str) {
+ insert->ref++;
+ return(insert);
+ }
+ } else if (type == XML_EXP_COUNT) {
+ if ((insert->exp_min == min) && (insert->exp_max == max) &&
+ (insert->exp_left == left)) {
+ insert->ref++;
+ left->ref--;
+ return(insert);
+ }
+ } else if ((insert->exp_left == left) &&
+ (insert->exp_right == right)) {
+ insert->ref++;
+ left->ref--;
+ right->ref--;
+ return(insert);
+ }
+ }
+ }
+ }
+
+ entry = xmlExpNewNode(ctxt, type);
+ if (entry == NULL)
+ return(NULL);
+ entry->key = kbase;
+ if (type == XML_EXP_ATOM) {
+ entry->exp_str = name;
+ entry->c_max = 1;
+ } else if (type == XML_EXP_COUNT) {
+ entry->exp_min = min;
+ entry->exp_max = max;
+ entry->exp_left = left;
+ if ((min == 0) || (IS_NILLABLE(left)))
+ entry->info |= XML_EXP_NILABLE;
+ if (max < 0)
+ entry->c_max = -1;
+ else
+ entry->c_max = max * entry->exp_left->c_max;
+ } else {
+ entry->exp_left = left;
+ entry->exp_right = right;
+ if (type == XML_EXP_OR) {
+ if ((IS_NILLABLE(left)) || (IS_NILLABLE(right)))
+ entry->info |= XML_EXP_NILABLE;
+ if ((entry->exp_left->c_max == -1) ||
+ (entry->exp_right->c_max == -1))
+ entry->c_max = -1;
+ else if (entry->exp_left->c_max > entry->exp_right->c_max)
+ entry->c_max = entry->exp_left->c_max;
+ else
+ entry->c_max = entry->exp_right->c_max;
+ } else {
+ if ((IS_NILLABLE(left)) && (IS_NILLABLE(right)))
+ entry->info |= XML_EXP_NILABLE;
+ if ((entry->exp_left->c_max == -1) ||
+ (entry->exp_right->c_max == -1))
+ entry->c_max = -1;
+ else
+ entry->c_max = entry->exp_left->c_max + entry->exp_right->c_max;
+ }
+ }
+ entry->ref = 1;
+ if (ctxt->table[key] != NULL)
+ entry->next = ctxt->table[key];
+
+ ctxt->table[key] = entry;
+ ctxt->nbElems++;
+
+ return(entry);
+}
+
+/**
+ * xmlExpFree:
+ * @ctxt: the expression context
+ * @exp: the expression
+ *
+ * Dereference the expression
+ */
+void
+xmlExpFree(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp) {
+ if ((exp == NULL) || (exp == forbiddenExp) || (exp == emptyExp))
+ return;
+ exp->ref--;
+ if (exp->ref == 0) {
+ unsigned short key;
+
+ /* Unlink it first from the hash table */
+ key = exp->key % ctxt->size;
+ if (ctxt->table[key] == exp) {
+ ctxt->table[key] = exp->next;
+ } else {
+ xmlExpNodePtr tmp;
+
+ tmp = ctxt->table[key];
+ while (tmp != NULL) {
+ if (tmp->next == exp) {
+ tmp->next = exp->next;
+ break;
+ }
+ tmp = tmp->next;
+ }
+ }
+
+ if ((exp->type == XML_EXP_SEQ) || (exp->type == XML_EXP_OR)) {
+ xmlExpFree(ctxt, exp->exp_left);
+ xmlExpFree(ctxt, exp->exp_right);
+ } else if (exp->type == XML_EXP_COUNT) {
+ xmlExpFree(ctxt, exp->exp_left);
+ }
+ xmlFree(exp);
+ ctxt->nb_nodes--;
+ }
+}
+
+/**
+ * xmlExpRef:
+ * @exp: the expression
+ *
+ * Increase the reference count of the expression
+ */
+void
+xmlExpRef(xmlExpNodePtr exp) {
+ if (exp != NULL)
+ exp->ref++;
+}
+
+/**
+ * xmlExpNewAtom:
+ * @ctxt: the expression context
+ * @name: the atom name
+ * @len: the atom name length in byte (or -1);
+ *
+ * Get the atom associated to this name from that context
+ *
+ * Returns the node or NULL in case of error
+ */
+xmlExpNodePtr
+xmlExpNewAtom(xmlExpCtxtPtr ctxt, const xmlChar *name, int len) {
+ if ((ctxt == NULL) || (name == NULL))
+ return(NULL);
+ name = xmlDictLookup(ctxt->dict, name, len);
+ if (name == NULL)
+ return(NULL);
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_ATOM, NULL, NULL, name, 0, 0));
+}
+
+/**
+ * xmlExpNewOr:
+ * @ctxt: the expression context
+ * @left: left expression
+ * @right: right expression
+ *
+ * Get the atom associated to the choice @left | @right
+ * Note that @left and @right are consumed in the operation, to keep
+ * an handle on them use xmlExpRef() and use xmlExpFree() to release them,
+ * this is true even in case of failure (unless ctxt == NULL).
+ *
+ * Returns the node or NULL in case of error
+ */
+xmlExpNodePtr
+xmlExpNewOr(xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right) {
+ if (ctxt == NULL)
+ return(NULL);
+ if ((left == NULL) || (right == NULL)) {
+ xmlExpFree(ctxt, left);
+ xmlExpFree(ctxt, right);
+ return(NULL);
+ }
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_OR, left, right, NULL, 0, 0));
+}
+
+/**
+ * xmlExpNewSeq:
+ * @ctxt: the expression context
+ * @left: left expression
+ * @right: right expression
+ *
+ * Get the atom associated to the sequence @left , @right
+ * Note that @left and @right are consumed in the operation, to keep
+ * an handle on them use xmlExpRef() and use xmlExpFree() to release them,
+ * this is true even in case of failure (unless ctxt == NULL).
+ *
+ * Returns the node or NULL in case of error
+ */
+xmlExpNodePtr
+xmlExpNewSeq(xmlExpCtxtPtr ctxt, xmlExpNodePtr left, xmlExpNodePtr right) {
+ if (ctxt == NULL)
+ return(NULL);
+ if ((left == NULL) || (right == NULL)) {
+ xmlExpFree(ctxt, left);
+ xmlExpFree(ctxt, right);
+ return(NULL);
+ }
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, left, right, NULL, 0, 0));
+}
+
+/**
+ * xmlExpNewRange:
+ * @ctxt: the expression context
+ * @subset: the expression to be repeated
+ * @min: the lower bound for the repetition
+ * @max: the upper bound for the repetition, -1 means infinite
+ *
+ * Get the atom associated to the range (@subset){@min, @max}
+ * Note that @subset is consumed in the operation, to keep
+ * an handle on it use xmlExpRef() and use xmlExpFree() to release it,
+ * this is true even in case of failure (unless ctxt == NULL).
+ *
+ * Returns the node or NULL in case of error
+ */
+xmlExpNodePtr
+xmlExpNewRange(xmlExpCtxtPtr ctxt, xmlExpNodePtr subset, int min, int max) {
+ if (ctxt == NULL)
+ return(NULL);
+ if ((subset == NULL) || (min < 0) || (max < -1) ||
+ ((max >= 0) && (min > max))) {
+ xmlExpFree(ctxt, subset);
+ return(NULL);
+ }
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, subset,
+ NULL, NULL, min, max));
+}
+
+/************************************************************************
+ * *
+ * Public API for operations on expressions *
+ * *
+ ************************************************************************/
+
+static int
+xmlExpGetLanguageInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ const xmlChar**list, int len, int nb) {
+ int tmp, tmp2;
+tail:
+ switch (exp->type) {
+ case XML_EXP_EMPTY:
+ return(0);
+ case XML_EXP_ATOM:
+ for (tmp = 0;tmp < nb;tmp++)
+ if (list[tmp] == exp->exp_str)
+ return(0);
+ if (nb >= len)
+ return(-2);
+ list[nb] = exp->exp_str;
+ return(1);
+ case XML_EXP_COUNT:
+ exp = exp->exp_left;
+ goto tail;
+ case XML_EXP_SEQ:
+ case XML_EXP_OR:
+ tmp = xmlExpGetLanguageInt(ctxt, exp->exp_left, list, len, nb);
+ if (tmp < 0)
+ return(tmp);
+ tmp2 = xmlExpGetLanguageInt(ctxt, exp->exp_right, list, len,
+ nb + tmp);
+ if (tmp2 < 0)
+ return(tmp2);
+ return(tmp + tmp2);
+ }
+ return(-1);
+}
+
+/**
+ * xmlExpGetLanguage:
+ * @ctxt: the expression context
+ * @exp: the expression
+ * @langList: where to store the tokens
+ * @len: the allocated length of @list
+ *
+ * Find all the strings used in @exp and store them in @list
+ *
+ * Returns the number of unique strings found, -1 in case of errors and
+ * -2 if there is more than @len strings
+ */
+int
+xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ const xmlChar**langList, int len) {
+ if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0))
+ return(-1);
+ return(xmlExpGetLanguageInt(ctxt, exp, langList, len, 0));
+}
+
+static int
+xmlExpGetStartInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ const xmlChar**list, int len, int nb) {
+ int tmp, tmp2;
+tail:
+ switch (exp->type) {
+ case XML_EXP_FORBID:
+ return(0);
+ case XML_EXP_EMPTY:
+ return(0);
+ case XML_EXP_ATOM:
+ for (tmp = 0;tmp < nb;tmp++)
+ if (list[tmp] == exp->exp_str)
+ return(0);
+ if (nb >= len)
+ return(-2);
+ list[nb] = exp->exp_str;
+ return(1);
+ case XML_EXP_COUNT:
+ exp = exp->exp_left;
+ goto tail;
+ case XML_EXP_SEQ:
+ tmp = xmlExpGetStartInt(ctxt, exp->exp_left, list, len, nb);
+ if (tmp < 0)
+ return(tmp);
+ if (IS_NILLABLE(exp->exp_left)) {
+ tmp2 = xmlExpGetStartInt(ctxt, exp->exp_right, list, len,
+ nb + tmp);
+ if (tmp2 < 0)
+ return(tmp2);
+ tmp += tmp2;
+ }
+ return(tmp);
+ case XML_EXP_OR:
+ tmp = xmlExpGetStartInt(ctxt, exp->exp_left, list, len, nb);
+ if (tmp < 0)
+ return(tmp);
+ tmp2 = xmlExpGetStartInt(ctxt, exp->exp_right, list, len,
+ nb + tmp);
+ if (tmp2 < 0)
+ return(tmp2);
+ return(tmp + tmp2);
+ }
+ return(-1);
+}
+
+/**
+ * xmlExpGetStart:
+ * @ctxt: the expression context
+ * @exp: the expression
+ * @tokList: where to store the tokens
+ * @len: the allocated length of @list
+ *
+ * Find all the strings that appears at the start of the languages
+ * accepted by @exp and store them in @list. E.g. for (a, b) | c
+ * it will return the list [a, c]
+ *
+ * Returns the number of unique strings found, -1 in case of errors and
+ * -2 if there is more than @len strings
+ */
+int
+xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ const xmlChar**tokList, int len) {
+ if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0))
+ return(-1);
+ return(xmlExpGetStartInt(ctxt, exp, tokList, len, 0));
+}
+
+/**
+ * xmlExpIsNillable:
+ * @exp: the expression
+ *
+ * Finds if the expression is nillable, i.e. if it accepts the empty sequqnce
+ *
+ * Returns 1 if nillable, 0 if not and -1 in case of error
+ */
+int
+xmlExpIsNillable(xmlExpNodePtr exp) {
+ if (exp == NULL)
+ return(-1);
+ return(IS_NILLABLE(exp) != 0);
+}
+
+static xmlExpNodePtr
+xmlExpStringDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, const xmlChar *str)
+{
+ xmlExpNodePtr ret;
+
+ switch (exp->type) {
+ case XML_EXP_EMPTY:
+ return(forbiddenExp);
+ case XML_EXP_FORBID:
+ return(forbiddenExp);
+ case XML_EXP_ATOM:
+ if (exp->exp_str == str) {
+#ifdef DEBUG_DERIV
+ printf("deriv atom: equal => Empty\n");
+#endif
+ ret = emptyExp;
+ } else {
+#ifdef DEBUG_DERIV
+ printf("deriv atom: mismatch => forbid\n");
+#endif
+ /* TODO wildcards here */
+ ret = forbiddenExp;
+ }
+ return(ret);
+ case XML_EXP_OR: {
+ xmlExpNodePtr tmp;
+
+#ifdef DEBUG_DERIV
+ printf("deriv or: => or(derivs)\n");
+#endif
+ tmp = xmlExpStringDeriveInt(ctxt, exp->exp_left, str);
+ if (tmp == NULL) {
+ return(NULL);
+ }
+ ret = xmlExpStringDeriveInt(ctxt, exp->exp_right, str);
+ if (ret == NULL) {
+ xmlExpFree(ctxt, tmp);
+ return(NULL);
+ }
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, tmp, ret,
+ NULL, 0, 0);
+ return(ret);
+ }
+ case XML_EXP_SEQ:
+#ifdef DEBUG_DERIV
+ printf("deriv seq: starting with left\n");
+#endif
+ ret = xmlExpStringDeriveInt(ctxt, exp->exp_left, str);
+ if (ret == NULL) {
+ return(NULL);
+ } else if (ret == forbiddenExp) {
+ if (IS_NILLABLE(exp->exp_left)) {
+#ifdef DEBUG_DERIV
+ printf("deriv seq: left failed but nillable\n");
+#endif
+ ret = xmlExpStringDeriveInt(ctxt, exp->exp_right, str);
+ }
+ } else {
+#ifdef DEBUG_DERIV
+ printf("deriv seq: left match => sequence\n");
+#endif
+ exp->exp_right->ref++;
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, ret, exp->exp_right,
+ NULL, 0, 0);
+ }
+ return(ret);
+ case XML_EXP_COUNT: {
+ int min, max;
+ xmlExpNodePtr tmp;
+
+ if (exp->exp_max == 0)
+ return(forbiddenExp);
+ ret = xmlExpStringDeriveInt(ctxt, exp->exp_left, str);
+ if (ret == NULL)
+ return(NULL);
+ if (ret == forbiddenExp) {
+#ifdef DEBUG_DERIV
+ printf("deriv count: pattern mismatch => forbid\n");
+#endif
+ return(ret);
+ }
+ if (exp->exp_max == 1)
+ return(ret);
+ if (exp->exp_max < 0) /* unbounded */
+ max = -1;
+ else
+ max = exp->exp_max - 1;
+ if (exp->exp_min > 0)
+ min = exp->exp_min - 1;
+ else
+ min = 0;
+ exp->exp_left->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, exp->exp_left, NULL,
+ NULL, min, max);
+ if (ret == emptyExp) {
+#ifdef DEBUG_DERIV
+ printf("deriv count: match to empty => new count\n");
+#endif
+ return(tmp);
+ }
+#ifdef DEBUG_DERIV
+ printf("deriv count: match => sequence with new count\n");
+#endif
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, ret, tmp,
+ NULL, 0, 0));
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * xmlExpStringDerive:
+ * @ctxt: the expression context
+ * @exp: the expression
+ * @str: the string
+ * @len: the string len in bytes if available
+ *
+ * Do one step of Brzozowski derivation of the expression @exp with
+ * respect to the input string
+ *
+ * Returns the resulting expression or NULL in case of internal error
+ */
+xmlExpNodePtr
+xmlExpStringDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ const xmlChar *str, int len) {
+ const xmlChar *input;
+
+ if ((exp == NULL) || (ctxt == NULL) || (str == NULL)) {
+ return(NULL);
+ }
+ /*
+ * check the string is in the dictionnary, if yes use an interned
+ * copy, otherwise we know it's not an acceptable input
+ */
+ input = xmlDictExists(ctxt->dict, str, len);
+ if (input == NULL) {
+ return(forbiddenExp);
+ }
+ return(xmlExpStringDeriveInt(ctxt, exp, input));
+}
+
+static int
+xmlExpCheckCard(xmlExpNodePtr exp, xmlExpNodePtr sub) {
+ int ret = 1;
+
+ if (sub->c_max == -1) {
+ if (exp->c_max != -1)
+ ret = 0;
+ } else if ((exp->c_max >= 0) && (exp->c_max < sub->c_max)) {
+ ret = 0;
+ }
+#if 0
+ if ((IS_NILLABLE(sub)) && (!IS_NILLABLE(exp)))
+ ret = 0;
+#endif
+ return(ret);
+}
+
+static xmlExpNodePtr xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
+ xmlExpNodePtr sub);
+/**
+ * xmlExpDivide:
+ * @ctxt: the expressions context
+ * @exp: the englobing expression
+ * @sub: the subexpression
+ * @mult: the multiple expression
+ * @remain: the remain from the derivation of the multiple
+ *
+ * Check if exp is a multiple of sub, i.e. if there is a finite number n
+ * so that sub{n} subsume exp
+ *
+ * Returns the multiple value if successful, 0 if it is not a multiple
+ * and -1 in case of internel error.
+ */
+
+static int
+xmlExpDivide(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub,
+ xmlExpNodePtr *mult, xmlExpNodePtr *remain) {
+ int i;
+ xmlExpNodePtr tmp, tmp2;
+
+ if (mult != NULL) *mult = NULL;
+ if (remain != NULL) *remain = NULL;
+ if (exp->c_max == -1) return(0);
+ if (IS_NILLABLE(exp) && (!IS_NILLABLE(sub))) return(0);
+
+ for (i = 1;i <= exp->c_max;i++) {
+ sub->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT,
+ sub, NULL, NULL, i, i);
+ if (tmp == NULL) {
+ return(-1);
+ }
+ if (!xmlExpCheckCard(tmp, exp)) {
+ xmlExpFree(ctxt, tmp);
+ continue;
+ }
+ tmp2 = xmlExpExpDeriveInt(ctxt, tmp, exp);
+ if (tmp2 == NULL) {
+ xmlExpFree(ctxt, tmp);
+ return(-1);
+ }
+ if ((tmp2 != forbiddenExp) && (IS_NILLABLE(tmp2))) {
+ if (remain != NULL)
+ *remain = tmp2;
+ else
+ xmlExpFree(ctxt, tmp2);
+ if (mult != NULL)
+ *mult = tmp;
+ else
+ xmlExpFree(ctxt, tmp);
+#ifdef DEBUG_DERIV
+ printf("Divide succeeded %d\n", i);
+#endif
+ return(i);
+ }
+ xmlExpFree(ctxt, tmp);
+ xmlExpFree(ctxt, tmp2);
+ }
+#ifdef DEBUG_DERIV
+ printf("Divide failed\n");
+#endif
+ return(0);
+}
+
+/**
+ * xmlExpExpDeriveInt:
+ * @ctxt: the expressions context
+ * @exp: the englobing expression
+ * @sub: the subexpression
+ *
+ * Try to do a step of Brzozowski derivation but at a higher level
+ * the input being a subexpression.
+ *
+ * Returns the resulting expression or NULL in case of internal error
+ */
+static xmlExpNodePtr
+xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
+ xmlExpNodePtr ret, tmp, tmp2, tmp3;
+ const xmlChar **tab;
+ int len, i;
+
+ /*
+ * In case of equality and if the expression can only consume a finite
+ * amount, then the derivation is empty
+ */
+ if ((exp == sub) && (exp->c_max >= 0)) {
+#ifdef DEBUG_DERIV
+ printf("Equal(exp, sub) and finite -> Empty\n");
+#endif
+ return(emptyExp);
+ }
+ /*
+ * decompose sub sequence first
+ */
+ if (sub->type == XML_EXP_EMPTY) {
+#ifdef DEBUG_DERIV
+ printf("Empty(sub) -> Empty\n");
+#endif
+ exp->ref++;
+ return(exp);
+ }
+ if (sub->type == XML_EXP_SEQ) {
+#ifdef DEBUG_DERIV
+ printf("Seq(sub) -> decompose\n");
+#endif
+ tmp = xmlExpExpDeriveInt(ctxt, exp, sub->exp_left);
+ if (tmp == NULL)
+ return(NULL);
+ if (tmp == forbiddenExp)
+ return(tmp);
+ ret = xmlExpExpDeriveInt(ctxt, tmp, sub->exp_right);
+ xmlExpFree(ctxt, tmp);
+ return(ret);
+ }
+ if (sub->type == XML_EXP_OR) {
+#ifdef DEBUG_DERIV
+ printf("Or(sub) -> decompose\n");
+#endif
+ tmp = xmlExpExpDeriveInt(ctxt, exp, sub->exp_left);
+ if (tmp == forbiddenExp)
+ return(tmp);
+ if (tmp == NULL)
+ return(NULL);
+ ret = xmlExpExpDeriveInt(ctxt, exp, sub->exp_right);
+ if ((ret == NULL) || (ret == forbiddenExp)) {
+ xmlExpFree(ctxt, tmp);
+ return(ret);
+ }
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_OR, tmp, ret, NULL, 0, 0));
+ }
+ if (!xmlExpCheckCard(exp, sub)) {
+#ifdef DEBUG_DERIV
+ printf("CheckCard(exp, sub) failed -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ }
+ switch (exp->type) {
+ case XML_EXP_EMPTY:
+ if (sub == emptyExp)
+ return(emptyExp);
+#ifdef DEBUG_DERIV
+ printf("Empty(exp) -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ case XML_EXP_FORBID:
+#ifdef DEBUG_DERIV
+ printf("Forbid(exp) -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ case XML_EXP_ATOM:
+ if (sub->type == XML_EXP_ATOM) {
+ /* TODO: handle wildcards */
+ if (exp->exp_str == sub->exp_str) {
+#ifdef DEBUG_DERIV
+ printf("Atom match -> Empty\n");
+#endif
+ return(emptyExp);
+ }
+#ifdef DEBUG_DERIV
+ printf("Atom mismatch -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ }
+ if ((sub->type == XML_EXP_COUNT) &&
+ (sub->exp_max == 1) &&
+ (sub->exp_left->type == XML_EXP_ATOM)) {
+ /* TODO: handle wildcards */
+ if (exp->exp_str == sub->exp_left->exp_str) {
+#ifdef DEBUG_DERIV
+ printf("Atom match -> Empty\n");
+#endif
+ return(emptyExp);
+ }
+#ifdef DEBUG_DERIV
+ printf("Atom mismatch -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ }
+#ifdef DEBUG_DERIV
+ printf("Compex exp vs Atom -> Forbid\n");
+#endif
+ return(forbiddenExp);
+ case XML_EXP_SEQ:
+ /* try to get the sequence consumed only if possible */
+ if (xmlExpCheckCard(exp->exp_left, sub)) {
+ /* See if the sequence can be consumed directly */
+#ifdef DEBUG_DERIV
+ printf("Seq trying left only\n");
+#endif
+ ret = xmlExpExpDeriveInt(ctxt, exp->exp_left, sub);
+ if ((ret != forbiddenExp) && (ret != NULL)) {
+#ifdef DEBUG_DERIV
+ printf("Seq trying left only worked\n");
+#endif
+ /*
+ * TODO: assumption here that we are determinist
+ * i.e. we won't get to a nillable exp left
+ * subset which could be matched by the right
+ * part too.
+ * e.g.: (a | b)+,(a | c) and 'a+,a'
+ */
+ exp->exp_right->ref++;
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, ret,
+ exp->exp_right, NULL, 0, 0));
+ }
+#ifdef DEBUG_DERIV
+ } else {
+ printf("Seq: left too short\n");
+#endif
+ }
+ /* Try instead to decompose */
+ if (sub->type == XML_EXP_COUNT) {
+ int min, max;
+
+#ifdef DEBUG_DERIV
+ printf("Seq: sub is a count\n");
+#endif
+ ret = xmlExpExpDeriveInt(ctxt, exp->exp_left, sub->exp_left);
+ if (ret == NULL)
+ return(NULL);
+ if (ret != forbiddenExp) {
+#ifdef DEBUG_DERIV
+ printf("Seq , Count match on left\n");
+#endif
+ if (sub->exp_max < 0)
+ max = -1;
+ else
+ max = sub->exp_max -1;
+ if (sub->exp_min > 0)
+ min = sub->exp_min -1;
+ else
+ min = 0;
+ exp->exp_right->ref++;
+ tmp = xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, ret,
+ exp->exp_right, NULL, 0, 0);
+ if (tmp == NULL)
+ return(NULL);
+
+ sub->exp_left->ref++;
+ tmp2 = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT,
+ sub->exp_left, NULL, NULL, min, max);
+ if (tmp2 == NULL) {
+ xmlExpFree(ctxt, tmp);
+ return(NULL);
+ }
+ ret = xmlExpExpDeriveInt(ctxt, tmp, tmp2);
+ xmlExpFree(ctxt, tmp);
+ xmlExpFree(ctxt, tmp2);
+ return(ret);
+ }
+ }
+ /* we made no progress on structured operations */
+ break;
+ case XML_EXP_OR:
+#ifdef DEBUG_DERIV
+ printf("Or , trying both side\n");
+#endif
+ ret = xmlExpExpDeriveInt(ctxt, exp->exp_left, sub);
+ if (ret == NULL)
+ return(NULL);
+ tmp = xmlExpExpDeriveInt(ctxt, exp->exp_right, sub);
+ if (tmp == NULL) {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ return(xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, tmp, NULL, 0, 0));
+ case XML_EXP_COUNT: {
+ int min, max;
+
+ if (sub->type == XML_EXP_COUNT) {
+ /*
+ * Try to see if the loop is completely subsumed
+ */
+ tmp = xmlExpExpDeriveInt(ctxt, exp->exp_left, sub->exp_left);
+ if (tmp == NULL)
+ return(NULL);
+ if (tmp == forbiddenExp) {
+ int mult;
+
+#ifdef DEBUG_DERIV
+ printf("Count, Count inner don't subsume\n");
+#endif
+ mult = xmlExpDivide(ctxt, sub->exp_left, exp->exp_left,
+ NULL, &tmp);
+ if (mult <= 0) {
+#ifdef DEBUG_DERIV
+ printf("Count, Count not multiple => forbidden\n");
+#endif
+ return(forbiddenExp);
+ }
+ if (sub->exp_max == -1) {
+ max = -1;
+ if (exp->exp_max == -1) {
+ if (exp->exp_min <= sub->exp_min * mult)
+ min = 0;
+ else
+ min = exp->exp_min - sub->exp_min * mult;
+ } else {
+#ifdef DEBUG_DERIV
+ printf("Count, Count finite can't subsume infinite\n");
+#endif
+ xmlExpFree(ctxt, tmp);
+ return(forbiddenExp);
+ }
+ } else {
+ if (exp->exp_max == -1) {
+#ifdef DEBUG_DERIV
+ printf("Infinite loop consume mult finite loop\n");
+#endif
+ if (exp->exp_min > sub->exp_min * mult) {
+ max = -1;
+ min = exp->exp_min - sub->exp_min * mult;
+ } else {
+ max = -1;
+ min = 0;
+ }
+ } else {
+ if (exp->exp_max < sub->exp_max * mult) {
+#ifdef DEBUG_DERIV
+ printf("loops max mult mismatch => forbidden\n");
+#endif
+ xmlExpFree(ctxt, tmp);
+ return(forbiddenExp);
+ }
+ if (sub->exp_max * mult > exp->exp_min)
+ min = 0;
+ else
+ min = exp->exp_min - sub->exp_max * mult;
+ max = exp->exp_max - sub->exp_max * mult;
+ }
+ }
+ } else if (!IS_NILLABLE(tmp)) {
+ /*
+ * TODO: loop here to try to grow if working on finite
+ * blocks.
+ */
+#ifdef DEBUG_DERIV
+ printf("Count, Count remain not nillable => forbidden\n");
+#endif
+ xmlExpFree(ctxt, tmp);
+ return(forbiddenExp);
+ } else if (sub->exp_max == -1) {
+ if (exp->exp_max == -1) {
+ if (exp->exp_min <= sub->exp_min) {
+#ifdef DEBUG_DERIV
+ printf("Infinite loops Okay => COUNT(0,Inf)\n");
+#endif
+ max = -1;
+ min = 0;
+ } else {
+#ifdef DEBUG_DERIV
+ printf("Infinite loops min => Count(X,Inf)\n");
+#endif
+ max = -1;
+ min = exp->exp_min - sub->exp_min;
+ }
+ } else if (exp->exp_min > sub->exp_min) {
+#ifdef DEBUG_DERIV
+ printf("loops min mismatch 1 => forbidden ???\n");
+#endif
+ xmlExpFree(ctxt, tmp);
+ return(forbiddenExp);
+ } else {
+ max = -1;
+ min = 0;
+ }
+ } else {
+ if (exp->exp_max == -1) {
+#ifdef DEBUG_DERIV
+ printf("Infinite loop consume finite loop\n");
+#endif
+ if (exp->exp_min > sub->exp_min) {
+ max = -1;
+ min = exp->exp_min - sub->exp_min;
+ } else {
+ max = -1;
+ min = 0;
+ }
+ } else {
+ if (exp->exp_max < sub->exp_max) {
+#ifdef DEBUG_DERIV
+ printf("loops max mismatch => forbidden\n");
+#endif
+ xmlExpFree(ctxt, tmp);
+ return(forbiddenExp);
+ }
+ if (sub->exp_max > exp->exp_min)
+ min = 0;
+ else
+ min = exp->exp_min - sub->exp_max;
+ max = exp->exp_max - sub->exp_max;
+ }
+ }
+#ifdef DEBUG_DERIV
+ printf("loops match => SEQ(COUNT())\n");
+#endif
+ exp->exp_left->ref++;
+ tmp2 = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, exp->exp_left,
+ NULL, NULL, min, max);
+ if (tmp2 == NULL) {
+ return(NULL);
+ }
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, tmp, tmp2,
+ NULL, 0, 0);
+ return(ret);
+ }
+ tmp = xmlExpExpDeriveInt(ctxt, exp->exp_left, sub);
+ if (tmp == NULL)
+ return(NULL);
+ if (tmp == forbiddenExp) {
+#ifdef DEBUG_DERIV
+ printf("loop mismatch => forbidden\n");
+#endif
+ return(forbiddenExp);
+ }
+ if (exp->exp_min > 0)
+ min = exp->exp_min - 1;
+ else
+ min = 0;
+ if (exp->exp_max < 0)
+ max = -1;
+ else
+ max = exp->exp_max - 1;
+
+#ifdef DEBUG_DERIV
+ printf("loop match => SEQ(COUNT())\n");
+#endif
+ exp->exp_left->ref++;
+ tmp2 = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, exp->exp_left,
+ NULL, NULL, min, max);
+ if (tmp2 == NULL)
+ return(NULL);
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, tmp, tmp2,
+ NULL, 0, 0);
+ return(ret);
+ }
+ }
+
+#ifdef DEBUG_DERIV
+ printf("Fallback to derivative\n");
+#endif
+ if (IS_NILLABLE(sub)) {
+ if (!(IS_NILLABLE(exp)))
+ return(forbiddenExp);
+ else
+ ret = emptyExp;
+ } else
+ ret = NULL;
+ /*
+ * here the structured derivation made no progress so
+ * we use the default token based derivation to force one more step
+ */
+ if (ctxt->tabSize == 0)
+ ctxt->tabSize = 40;
+
+ tab = (const xmlChar **) xmlMalloc(ctxt->tabSize *
+ sizeof(const xmlChar *));
+ if (tab == NULL) {
+ return(NULL);
+ }
+
+ /*
+ * collect all the strings accepted by the subexpression on input
+ */
+ len = xmlExpGetStartInt(ctxt, sub, tab, ctxt->tabSize, 0);
+ while (len < 0) {
+ const xmlChar **temp;
+ temp = (const xmlChar **) xmlRealloc((xmlChar **) tab, ctxt->tabSize * 2 *
+ sizeof(const xmlChar *));
+ if (temp == NULL) {
+ xmlFree((xmlChar **) tab);
+ return(NULL);
+ }
+ tab = temp;
+ ctxt->tabSize *= 2;
+ len = xmlExpGetStartInt(ctxt, sub, tab, ctxt->tabSize, 0);
+ }
+ for (i = 0;i < len;i++) {
+ tmp = xmlExpStringDeriveInt(ctxt, exp, tab[i]);
+ if ((tmp == NULL) || (tmp == forbiddenExp)) {
+ xmlExpFree(ctxt, ret);
+ xmlFree((xmlChar **) tab);
+ return(tmp);
+ }
+ tmp2 = xmlExpStringDeriveInt(ctxt, sub, tab[i]);
+ if ((tmp2 == NULL) || (tmp2 == forbiddenExp)) {
+ xmlExpFree(ctxt, tmp);
+ xmlExpFree(ctxt, ret);
+ xmlFree((xmlChar **) tab);
+ return(tmp);
+ }
+ tmp3 = xmlExpExpDeriveInt(ctxt, tmp, tmp2);
+ xmlExpFree(ctxt, tmp);
+ xmlExpFree(ctxt, tmp2);
+
+ if ((tmp3 == NULL) || (tmp3 == forbiddenExp)) {
+ xmlExpFree(ctxt, ret);
+ xmlFree((xmlChar **) tab);
+ return(tmp3);
+ }
+
+ if (ret == NULL)
+ ret = tmp3;
+ else {
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, tmp3, NULL, 0, 0);
+ if (ret == NULL) {
+ xmlFree((xmlChar **) tab);
+ return(NULL);
+ }
+ }
+ }
+ xmlFree((xmlChar **) tab);
+ return(ret);
+}
+
+/**
+ * xmlExpExpDerive:
+ * @ctxt: the expressions context
+ * @exp: the englobing expression
+ * @sub: the subexpression
+ *
+ * Evaluates the expression resulting from @exp consuming a sub expression @sub
+ * Based on algebraic derivation and sometimes direct Brzozowski derivation
+ * it usually tatkes less than linear time and can handle expressions generating
+ * infinite languages.
+ *
+ * Returns the resulting expression or NULL in case of internal error, the
+ * result must be freed
+ */
+xmlExpNodePtr
+xmlExpExpDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
+ if ((exp == NULL) || (ctxt == NULL) || (sub == NULL))
+ return(NULL);
+
+ /*
+ * O(1) speedups
+ */
+ if (IS_NILLABLE(sub) && (!IS_NILLABLE(exp))) {
+#ifdef DEBUG_DERIV
+ printf("Sub nillable and not exp : can't subsume\n");
+#endif
+ return(forbiddenExp);
+ }
+ if (xmlExpCheckCard(exp, sub) == 0) {
+#ifdef DEBUG_DERIV
+ printf("sub generate longuer sequances than exp : can't subsume\n");
+#endif
+ return(forbiddenExp);
+ }
+ return(xmlExpExpDeriveInt(ctxt, exp, sub));
+}
+
+/**
+ * xmlExpSubsume:
+ * @ctxt: the expressions context
+ * @exp: the englobing expression
+ * @sub: the subexpression
+ *
+ * Check whether @exp accepts all the languages accexpted by @sub
+ * the input being a subexpression.
+ *
+ * Returns 1 if true 0 if false and -1 in case of failure.
+ */
+int
+xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
+ xmlExpNodePtr tmp;
+
+ if ((exp == NULL) || (ctxt == NULL) || (sub == NULL))
+ return(-1);
+
+ /*
+ * TODO: speedup by checking the language of sub is a subset of the
+ * language of exp
+ */
+ /*
+ * O(1) speedups
+ */
+ if (IS_NILLABLE(sub) && (!IS_NILLABLE(exp))) {
+#ifdef DEBUG_DERIV
+ printf("Sub nillable and not exp : can't subsume\n");
+#endif
+ return(0);
+ }
+ if (xmlExpCheckCard(exp, sub) == 0) {
+#ifdef DEBUG_DERIV
+ printf("sub generate longuer sequances than exp : can't subsume\n");
+#endif
+ return(0);
+ }
+ tmp = xmlExpExpDeriveInt(ctxt, exp, sub);
+#ifdef DEBUG_DERIV
+ printf("Result derivation :\n");
+ PRINT_EXP(tmp);
+#endif
+ if (tmp == NULL)
+ return(-1);
+ if (tmp == forbiddenExp)
+ return(0);
+ if (tmp == emptyExp)
+ return(1);
+ if ((tmp != NULL) && (IS_NILLABLE(tmp))) {
+ xmlExpFree(ctxt, tmp);
+ return(1);
+ }
+ xmlExpFree(ctxt, tmp);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Parsing expression *
+ * *
+ ************************************************************************/
+
+static xmlExpNodePtr xmlExpParseExpr(xmlExpCtxtPtr ctxt);
+
+#undef CUR
+#define CUR (*ctxt->cur)
+#undef NEXT
+#define NEXT ctxt->cur++;
+#undef IS_BLANK
+#define IS_BLANK(c) ((c == ' ') || (c == '\n') || (c == '\r') || (c == '\t'))
+#define SKIP_BLANKS while (IS_BLANK(*ctxt->cur)) ctxt->cur++;
+
+static int
+xmlExpParseNumber(xmlExpCtxtPtr ctxt) {
+ int ret = 0;
+
+ SKIP_BLANKS
+ if (CUR == '*') {
+ NEXT
+ return(-1);
+ }
+ if ((CUR < '0') || (CUR > '9'))
+ return(-1);
+ while ((CUR >= '0') && (CUR <= '9')) {
+ ret = ret * 10 + (CUR - '0');
+ NEXT
+ }
+ return(ret);
+}
+
+static xmlExpNodePtr
+xmlExpParseOr(xmlExpCtxtPtr ctxt) {
+ const char *base;
+ xmlExpNodePtr ret;
+ const xmlChar *val;
+
+ SKIP_BLANKS
+ base = ctxt->cur;
+ if (*ctxt->cur == '(') {
+ NEXT
+ ret = xmlExpParseExpr(ctxt);
+ SKIP_BLANKS
+ if (*ctxt->cur != ')') {
+ fprintf(stderr, "unbalanced '(' : %s\n", base);
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ NEXT;
+ SKIP_BLANKS
+ goto parse_quantifier;
+ }
+ while ((CUR != 0) && (!(IS_BLANK(CUR))) && (CUR != '(') &&
+ (CUR != ')') && (CUR != '|') && (CUR != ',') && (CUR != '{') &&
+ (CUR != '*') && (CUR != '+') && (CUR != '?') && (CUR != '}'))
+ NEXT;
+ val = xmlDictLookup(ctxt->dict, BAD_CAST base, ctxt->cur - base);
+ if (val == NULL)
+ return(NULL);
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_ATOM, NULL, NULL, val, 0, 0);
+ if (ret == NULL)
+ return(NULL);
+ SKIP_BLANKS
+parse_quantifier:
+ if (CUR == '{') {
+ int min, max;
+
+ NEXT
+ min = xmlExpParseNumber(ctxt);
+ if (min < 0) {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ SKIP_BLANKS
+ if (CUR == ',') {
+ NEXT
+ max = xmlExpParseNumber(ctxt);
+ SKIP_BLANKS
+ } else
+ max = min;
+ if (CUR != '}') {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ NEXT
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
+ min, max);
+ SKIP_BLANKS
+ } else if (CUR == '?') {
+ NEXT
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
+ 0, 1);
+ SKIP_BLANKS
+ } else if (CUR == '+') {
+ NEXT
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
+ 1, -1);
+ SKIP_BLANKS
+ } else if (CUR == '*') {
+ NEXT
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
+ 0, -1);
+ SKIP_BLANKS
+ }
+ return(ret);
+}
+
+
+static xmlExpNodePtr
+xmlExpParseSeq(xmlExpCtxtPtr ctxt) {
+ xmlExpNodePtr ret, right;
+
+ ret = xmlExpParseOr(ctxt);
+ SKIP_BLANKS
+ while (CUR == '|') {
+ NEXT
+ right = xmlExpParseOr(ctxt);
+ if (right == NULL) {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_OR, ret, right, NULL, 0, 0);
+ if (ret == NULL)
+ return(NULL);
+ }
+ return(ret);
+}
+
+static xmlExpNodePtr
+xmlExpParseExpr(xmlExpCtxtPtr ctxt) {
+ xmlExpNodePtr ret, right;
+
+ ret = xmlExpParseSeq(ctxt);
+ SKIP_BLANKS
+ while (CUR == ',') {
+ NEXT
+ right = xmlExpParseSeq(ctxt);
+ if (right == NULL) {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ ret = xmlExpHashGetEntry(ctxt, XML_EXP_SEQ, ret, right, NULL, 0, 0);
+ if (ret == NULL)
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlExpParse:
+ * @ctxt: the expressions context
+ * @expr: the 0 terminated string
+ *
+ * Minimal parser for regexps, it understand the following constructs
+ * - string terminals
+ * - choice operator |
+ * - sequence operator ,
+ * - subexpressions (...)
+ * - usual cardinality operators + * and ?
+ * - finite sequences { min, max }
+ * - infinite sequences { min, * }
+ * There is minimal checkings made especially no checking on strings values
+ *
+ * Returns a new expression or NULL in case of failure
+ */
+xmlExpNodePtr
+xmlExpParse(xmlExpCtxtPtr ctxt, const char *expr) {
+ xmlExpNodePtr ret;
+
+ ctxt->expr = expr;
+ ctxt->cur = expr;
+
+ ret = xmlExpParseExpr(ctxt);
+ SKIP_BLANKS
+ if (*ctxt->cur != 0) {
+ xmlExpFree(ctxt, ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+static void
+xmlExpDumpInt(xmlBufferPtr buf, xmlExpNodePtr expr, int glob) {
+ xmlExpNodePtr c;
+
+ if (expr == NULL) return;
+ if (glob) xmlBufferWriteChar(buf, "(");
+ switch (expr->type) {
+ case XML_EXP_EMPTY:
+ xmlBufferWriteChar(buf, "empty");
+ break;
+ case XML_EXP_FORBID:
+ xmlBufferWriteChar(buf, "forbidden");
+ break;
+ case XML_EXP_ATOM:
+ xmlBufferWriteCHAR(buf, expr->exp_str);
+ break;
+ case XML_EXP_SEQ:
+ c = expr->exp_left;
+ if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
+ xmlExpDumpInt(buf, c, 1);
+ else
+ xmlExpDumpInt(buf, c, 0);
+ xmlBufferWriteChar(buf, " , ");
+ c = expr->exp_right;
+ if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
+ xmlExpDumpInt(buf, c, 1);
+ else
+ xmlExpDumpInt(buf, c, 0);
+ break;
+ case XML_EXP_OR:
+ c = expr->exp_left;
+ if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
+ xmlExpDumpInt(buf, c, 1);
+ else
+ xmlExpDumpInt(buf, c, 0);
+ xmlBufferWriteChar(buf, " | ");
+ c = expr->exp_right;
+ if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
+ xmlExpDumpInt(buf, c, 1);
+ else
+ xmlExpDumpInt(buf, c, 0);
+ break;
+ case XML_EXP_COUNT: {
+ char rep[40];
+
+ c = expr->exp_left;
+ if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
+ xmlExpDumpInt(buf, c, 1);
+ else
+ xmlExpDumpInt(buf, c, 0);
+ if ((expr->exp_min == 0) && (expr->exp_max == 1)) {
+ rep[0] = '?';
+ rep[1] = 0;
+ } else if ((expr->exp_min == 0) && (expr->exp_max == -1)) {
+ rep[0] = '*';
+ rep[1] = 0;
+ } else if ((expr->exp_min == 1) && (expr->exp_max == -1)) {
+ rep[0] = '+';
+ rep[1] = 0;
+ } else if (expr->exp_max == expr->exp_min) {
+ snprintf(rep, 39, "{%d}", expr->exp_min);
+ } else if (expr->exp_max < 0) {
+ snprintf(rep, 39, "{%d,inf}", expr->exp_min);
+ } else {
+ snprintf(rep, 39, "{%d,%d}", expr->exp_min, expr->exp_max);
+ }
+ rep[39] = 0;
+ xmlBufferWriteChar(buf, rep);
+ break;
+ }
+ default:
+ fprintf(stderr, "Error in tree\n");
+ }
+ if (glob)
+ xmlBufferWriteChar(buf, ")");
+}
+/**
+ * xmlExpDump:
+ * @buf: a buffer to receive the output
+ * @expr: the compiled expression
+ *
+ * Serialize the expression as compiled to the buffer
+ */
+void
+xmlExpDump(xmlBufferPtr buf, xmlExpNodePtr expr) {
+ if ((buf == NULL) || (expr == NULL))
+ return;
+ xmlExpDumpInt(buf, expr, 0);
+}
+
+/**
+ * xmlExpMaxToken:
+ * @expr: a compiled expression
+ *
+ * Indicate the maximum number of input a expression can accept
+ *
+ * Returns the maximum length or -1 in case of error
+ */
+int
+xmlExpMaxToken(xmlExpNodePtr expr) {
+ if (expr == NULL)
+ return(-1);
+ return(expr->c_max);
+}
+
+/**
+ * xmlExpCtxtNbNodes:
+ * @ctxt: an expression context
+ *
+ * Debugging facility provides the number of allocated nodes at a that point
+ *
+ * Returns the number of nodes in use or -1 in case of error
+ */
+int
+xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt) {
+ if (ctxt == NULL)
+ return(-1);
+ return(ctxt->nb_nodes);
+}
+
+/**
+ * xmlExpCtxtNbCons:
+ * @ctxt: an expression context
+ *
+ * Debugging facility provides the number of allocated nodes over lifetime
+ *
+ * Returns the number of nodes ever allocated or -1 in case of error
+ */
+int
+xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt) {
+ if (ctxt == NULL)
+ return(-1);
+ return(ctxt->nb_cons);
+}
+
+#endif /* LIBXML_EXPR_ENABLED */
+#define bottom_xmlregexp
+#include "elfgcchack.h"
+#endif /* LIBXML_REGEXP_ENABLED */
diff --git a/xmlsave.c b/xmlsave.c
new file mode 100644
index 0000000..774404b
--- /dev/null
+++ b/xmlsave.c
@@ -0,0 +1,2788 @@
+/*
+ * xmlsave.c: Implemetation of the document serializer
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parserInternals.h>
+#include <libxml/tree.h>
+#include <libxml/xmlsave.h>
+
+#define MAX_INDENT 60
+
+#include <libxml/HTMLtree.h>
+
+#include "buf.h"
+#include "enc.h"
+#include "save.h"
+
+/************************************************************************
+ * *
+ * XHTML detection *
+ * *
+ ************************************************************************/
+#define XHTML_STRICT_PUBLIC_ID BAD_CAST \
+ "-//W3C//DTD XHTML 1.0 Strict//EN"
+#define XHTML_STRICT_SYSTEM_ID BAD_CAST \
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+#define XHTML_FRAME_PUBLIC_ID BAD_CAST \
+ "-//W3C//DTD XHTML 1.0 Frameset//EN"
+#define XHTML_FRAME_SYSTEM_ID BAD_CAST \
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+#define XHTML_TRANS_PUBLIC_ID BAD_CAST \
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+#define XHTML_TRANS_SYSTEM_ID BAD_CAST \
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+#define XHTML_NS_NAME BAD_CAST "http://www.w3.org/1999/xhtml"
+/**
+ * xmlIsXHTML:
+ * @systemID: the system identifier
+ * @publicID: the public identifier
+ *
+ * Try to find if the document correspond to an XHTML DTD
+ *
+ * Returns 1 if true, 0 if not and -1 in case of error
+ */
+int
+xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
+ if ((systemID == NULL) && (publicID == NULL))
+ return(-1);
+ if (publicID != NULL) {
+ if (xmlStrEqual(publicID, XHTML_STRICT_PUBLIC_ID)) return(1);
+ if (xmlStrEqual(publicID, XHTML_FRAME_PUBLIC_ID)) return(1);
+ if (xmlStrEqual(publicID, XHTML_TRANS_PUBLIC_ID)) return(1);
+ }
+ if (systemID != NULL) {
+ if (xmlStrEqual(systemID, XHTML_STRICT_SYSTEM_ID)) return(1);
+ if (xmlStrEqual(systemID, XHTML_FRAME_SYSTEM_ID)) return(1);
+ if (xmlStrEqual(systemID, XHTML_TRANS_SYSTEM_ID)) return(1);
+ }
+ return(0);
+}
+
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+struct _xmlSaveCtxt {
+ void *_private;
+ int type;
+ int fd;
+ const xmlChar *filename;
+ const xmlChar *encoding;
+ xmlCharEncodingHandlerPtr handler;
+ xmlOutputBufferPtr buf;
+ xmlDocPtr doc;
+ int options;
+ int level;
+ int format;
+ char indent[MAX_INDENT + 1]; /* array for indenting output */
+ int indent_nr;
+ int indent_size;
+ xmlCharEncodingOutputFunc escape; /* used for element content */
+ xmlCharEncodingOutputFunc escapeAttr;/* used for attribute content */
+};
+
+/************************************************************************
+ * *
+ * Output error handlers *
+ * *
+ ************************************************************************/
+/**
+ * xmlSaveErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSaveErrMemory(const char *extra)
+{
+ __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
+}
+
+/**
+ * xmlSaveErr:
+ * @code: the error number
+ * @node: the location of the error.
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSaveErr(int code, xmlNodePtr node, const char *extra)
+{
+ const char *msg = NULL;
+
+ switch(code) {
+ case XML_SAVE_NOT_UTF8:
+ msg = "string is not in UTF-8\n";
+ break;
+ case XML_SAVE_CHAR_INVALID:
+ msg = "invalid character value\n";
+ break;
+ case XML_SAVE_UNKNOWN_ENCODING:
+ msg = "unknown encoding %s\n";
+ break;
+ case XML_SAVE_NO_DOCTYPE:
+ msg = "document has no DOCTYPE\n";
+ break;
+ default:
+ msg = "unexpected error number\n";
+ }
+ __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
+}
+
+/************************************************************************
+ * *
+ * Special escaping routines *
+ * *
+ ************************************************************************/
+static unsigned char *
+xmlSerializeHexCharRef(unsigned char *out, int val) {
+ unsigned char *ptr;
+
+ *out++ = '&';
+ *out++ = '#';
+ *out++ = 'x';
+ if (val < 0x10) ptr = out;
+ else if (val < 0x100) ptr = out + 1;
+ else if (val < 0x1000) ptr = out + 2;
+ else if (val < 0x10000) ptr = out + 3;
+ else if (val < 0x100000) ptr = out + 4;
+ else ptr = out + 5;
+ out = ptr + 1;
+ while (val > 0) {
+ switch (val & 0xF) {
+ case 0: *ptr-- = '0'; break;
+ case 1: *ptr-- = '1'; break;
+ case 2: *ptr-- = '2'; break;
+ case 3: *ptr-- = '3'; break;
+ case 4: *ptr-- = '4'; break;
+ case 5: *ptr-- = '5'; break;
+ case 6: *ptr-- = '6'; break;
+ case 7: *ptr-- = '7'; break;
+ case 8: *ptr-- = '8'; break;
+ case 9: *ptr-- = '9'; break;
+ case 0xA: *ptr-- = 'A'; break;
+ case 0xB: *ptr-- = 'B'; break;
+ case 0xC: *ptr-- = 'C'; break;
+ case 0xD: *ptr-- = 'D'; break;
+ case 0xE: *ptr-- = 'E'; break;
+ case 0xF: *ptr-- = 'F'; break;
+ default: *ptr-- = '0'; break;
+ }
+ val >>= 4;
+ }
+ *out++ = ';';
+ *out = 0;
+ return(out);
+}
+
+/**
+ * xmlEscapeEntities:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of unescaped UTF-8 bytes
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and escape them. Used when there is no
+ * encoding specified.
+ *
+ * Returns 0 if success, or -1 otherwise
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+static int
+xmlEscapeEntities(unsigned char* out, int *outlen,
+ const xmlChar* in, int *inlen) {
+ unsigned char* outstart = out;
+ const unsigned char* base = in;
+ unsigned char* outend = out + *outlen;
+ const unsigned char* inend;
+ int val;
+
+ inend = in + (*inlen);
+
+ while ((in < inend) && (out < outend)) {
+ if (*in == '<') {
+ if (outend - out < 4) break;
+ *out++ = '&';
+ *out++ = 'l';
+ *out++ = 't';
+ *out++ = ';';
+ in++;
+ continue;
+ } else if (*in == '>') {
+ if (outend - out < 4) break;
+ *out++ = '&';
+ *out++ = 'g';
+ *out++ = 't';
+ *out++ = ';';
+ in++;
+ continue;
+ } else if (*in == '&') {
+ if (outend - out < 5) break;
+ *out++ = '&';
+ *out++ = 'a';
+ *out++ = 'm';
+ *out++ = 'p';
+ *out++ = ';';
+ in++;
+ continue;
+ } else if (((*in >= 0x20) && (*in < 0x80)) ||
+ (*in == '\n') || (*in == '\t')) {
+ /*
+ * default case, just copy !
+ */
+ *out++ = *in++;
+ continue;
+ } else if (*in >= 0x80) {
+ /*
+ * We assume we have UTF-8 input.
+ */
+ if (outend - out < 11) break;
+
+ if (*in < 0xC0) {
+ xmlSaveErr(XML_SAVE_NOT_UTF8, NULL, NULL);
+ in++;
+ goto error;
+ } else if (*in < 0xE0) {
+ if (inend - in < 2) break;
+ val = (in[0]) & 0x1F;
+ val <<= 6;
+ val |= (in[1]) & 0x3F;
+ in += 2;
+ } else if (*in < 0xF0) {
+ if (inend - in < 3) break;
+ val = (in[0]) & 0x0F;
+ val <<= 6;
+ val |= (in[1]) & 0x3F;
+ val <<= 6;
+ val |= (in[2]) & 0x3F;
+ in += 3;
+ } else if (*in < 0xF8) {
+ if (inend - in < 4) break;
+ val = (in[0]) & 0x07;
+ val <<= 6;
+ val |= (in[1]) & 0x3F;
+ val <<= 6;
+ val |= (in[2]) & 0x3F;
+ val <<= 6;
+ val |= (in[3]) & 0x3F;
+ in += 4;
+ } else {
+ xmlSaveErr(XML_SAVE_CHAR_INVALID, NULL, NULL);
+ in++;
+ goto error;
+ }
+ if (!IS_CHAR(val)) {
+ xmlSaveErr(XML_SAVE_CHAR_INVALID, NULL, NULL);
+ in++;
+ goto error;
+ }
+
+ /*
+ * We could do multiple things here. Just save as a char ref
+ */
+ out = xmlSerializeHexCharRef(out, val);
+ } else if (IS_BYTE_CHAR(*in)) {
+ if (outend - out < 6) break;
+ out = xmlSerializeHexCharRef(out, *in++);
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlEscapeEntities : char out of range\n");
+ in++;
+ goto error;
+ }
+ }
+ *outlen = out - outstart;
+ *inlen = in - base;
+ return(0);
+error:
+ *outlen = out - outstart;
+ *inlen = in - base;
+ return(-1);
+}
+
+/************************************************************************
+ * *
+ * Allocation and deallocation *
+ * *
+ ************************************************************************/
+/**
+ * xmlSaveCtxtInit:
+ * @ctxt: the saving context
+ *
+ * Initialize a saving context
+ */
+static void
+xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
+{
+ int i;
+ int len;
+
+ if (ctxt == NULL) return;
+ if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
+ ctxt->escape = xmlEscapeEntities;
+ len = xmlStrlen((xmlChar *)xmlTreeIndentString);
+ if ((xmlTreeIndentString == NULL) || (len == 0)) {
+ memset(&ctxt->indent[0], 0, MAX_INDENT + 1);
+ } else {
+ ctxt->indent_size = len;
+ ctxt->indent_nr = MAX_INDENT / ctxt->indent_size;
+ for (i = 0;i < ctxt->indent_nr;i++)
+ memcpy(&ctxt->indent[i * ctxt->indent_size], xmlTreeIndentString,
+ ctxt->indent_size);
+ ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
+ }
+
+ if (xmlSaveNoEmptyTags) {
+ ctxt->options |= XML_SAVE_NO_EMPTY;
+ }
+}
+
+/**
+ * xmlFreeSaveCtxt:
+ *
+ * Free a saving context, destroying the ouptut in any remaining buffer
+ */
+static void
+xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt)
+{
+ if (ctxt == NULL) return;
+ if (ctxt->encoding != NULL)
+ xmlFree((char *) ctxt->encoding);
+ if (ctxt->buf != NULL)
+ xmlOutputBufferClose(ctxt->buf);
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlNewSaveCtxt:
+ *
+ * Create a new saving context
+ *
+ * Returns the new structure or NULL in case of error
+ */
+static xmlSaveCtxtPtr
+xmlNewSaveCtxt(const char *encoding, int options)
+{
+ xmlSaveCtxtPtr ret;
+
+ ret = (xmlSaveCtxtPtr) xmlMalloc(sizeof(xmlSaveCtxt));
+ if (ret == NULL) {
+ xmlSaveErrMemory("creating saving context");
+ return ( NULL );
+ }
+ memset(ret, 0, sizeof(xmlSaveCtxt));
+
+ if (encoding != NULL) {
+ ret->handler = xmlFindCharEncodingHandler(encoding);
+ if (ret->handler == NULL) {
+ xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
+ xmlFreeSaveCtxt(ret);
+ return(NULL);
+ }
+ ret->encoding = xmlStrdup((const xmlChar *)encoding);
+ ret->escape = NULL;
+ }
+ xmlSaveCtxtInit(ret);
+
+ /*
+ * Use the options
+ */
+
+ /* Re-check this option as it may already have been set */
+ if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) {
+ options |= XML_SAVE_NO_EMPTY;
+ }
+
+ ret->options = options;
+ if (options & XML_SAVE_FORMAT)
+ ret->format = 1;
+ else if (options & XML_SAVE_WSNONSIG)
+ ret->format = 2;
+
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Dumping XML tree content to a simple buffer *
+ * *
+ ************************************************************************/
+/**
+ * xmlAttrSerializeContent:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @attr: the attribute pointer
+ *
+ * Serialize the attribute in the buffer
+ */
+static void
+xmlAttrSerializeContent(xmlOutputBufferPtr buf, xmlAttrPtr attr)
+{
+ xmlNodePtr children;
+
+ children = attr->children;
+ while (children != NULL) {
+ switch (children->type) {
+ case XML_TEXT_NODE:
+ xmlBufAttrSerializeTxtContent(buf->buffer, attr->doc,
+ attr, children->content);
+ break;
+ case XML_ENTITY_REF_NODE:
+ xmlBufAdd(buf->buffer, BAD_CAST "&", 1);
+ xmlBufAdd(buf->buffer, children->name,
+ xmlStrlen(children->name));
+ xmlBufAdd(buf->buffer, BAD_CAST ";", 1);
+ break;
+ default:
+ /* should not happen unless we have a badly built tree */
+ break;
+ }
+ children = children->next;
+ }
+}
+
+/**
+ * xmlBufDumpNotationTable:
+ * @buf: an xmlBufPtr output
+ * @table: A notation table
+ *
+ * This will dump the content of the notation table as an XML DTD definition
+ */
+void
+xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table) {
+ xmlBufferPtr buffer;
+
+ buffer = xmlBufferCreate();
+ if (buffer == NULL) {
+ /*
+ * TODO set the error in buf
+ */
+ return;
+ }
+ xmlDumpNotationTable(buffer, table);
+ xmlBufMergeBuffer(buf, buffer);
+}
+
+/**
+ * xmlBufDumpElementDecl:
+ * @buf: an xmlBufPtr output
+ * @elem: An element table
+ *
+ * This will dump the content of the element declaration as an XML
+ * DTD definition
+ */
+void
+xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem) {
+ xmlBufferPtr buffer;
+
+ buffer = xmlBufferCreate();
+ if (buffer == NULL) {
+ /*
+ * TODO set the error in buf
+ */
+ return;
+ }
+ xmlDumpElementDecl(buffer, elem);
+ xmlBufMergeBuffer(buf, buffer);
+}
+
+/**
+ * xmlBufDumpAttributeDecl:
+ * @buf: an xmlBufPtr output
+ * @attr: An attribute declaration
+ *
+ * This will dump the content of the attribute declaration as an XML
+ * DTD definition
+ */
+void
+xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr) {
+ xmlBufferPtr buffer;
+
+ buffer = xmlBufferCreate();
+ if (buffer == NULL) {
+ /*
+ * TODO set the error in buf
+ */
+ return;
+ }
+ xmlDumpAttributeDecl(buffer, attr);
+ xmlBufMergeBuffer(buf, buffer);
+}
+
+/**
+ * xmlBufDumpEntityDecl:
+ * @buf: an xmlBufPtr output
+ * @ent: An entity table
+ *
+ * This will dump the content of the entity table as an XML DTD definition
+ */
+void
+xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent) {
+ xmlBufferPtr buffer;
+
+ buffer = xmlBufferCreate();
+ if (buffer == NULL) {
+ /*
+ * TODO set the error in buf
+ */
+ return;
+ }
+ xmlDumpEntityDecl(buffer, ent);
+ xmlBufMergeBuffer(buf, buffer);
+}
+
+/************************************************************************
+ * *
+ * Dumping XML tree content to an I/O output buffer *
+ * *
+ ************************************************************************/
+
+static int xmlSaveSwitchEncoding(xmlSaveCtxtPtr ctxt, const char *encoding) {
+ xmlOutputBufferPtr buf = ctxt->buf;
+
+ if ((encoding != NULL) && (buf->encoder == NULL) && (buf->conv == NULL)) {
+ buf->encoder = xmlFindCharEncodingHandler((const char *)encoding);
+ if (buf->encoder == NULL) {
+ xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL,
+ (const char *)encoding);
+ return(-1);
+ }
+ buf->conv = xmlBufCreate();
+ if (buf->conv == NULL) {
+ xmlCharEncCloseFunc(buf->encoder);
+ xmlSaveErrMemory("creating encoding buffer");
+ return(-1);
+ }
+ /*
+ * initialize the state, e.g. if outputting a BOM
+ */
+ xmlCharEncOutput(buf, 1);
+ }
+ return(0);
+}
+
+static int xmlSaveClearEncoding(xmlSaveCtxtPtr ctxt) {
+ xmlOutputBufferPtr buf = ctxt->buf;
+ xmlOutputBufferFlush(buf);
+ xmlCharEncCloseFunc(buf->encoder);
+ xmlBufFree(buf->conv);
+ buf->encoder = NULL;
+ buf->conv = NULL;
+ return(0);
+}
+
+#ifdef LIBXML_HTML_ENABLED
+static void
+xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
+#endif
+static void xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
+static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
+void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
+static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur);
+
+/**
+ * xmlOutputBufferWriteWSNonSig:
+ * @ctxt: The save context
+ * @extra: Number of extra indents to apply to ctxt->level
+ *
+ * Write out formatting for non-significant whitespace output.
+ */
+static void
+xmlOutputBufferWriteWSNonSig(xmlSaveCtxtPtr ctxt, int extra)
+{
+ int i;
+ if ((ctxt == NULL) || (ctxt->buf == NULL))
+ return;
+ xmlOutputBufferWrite(ctxt->buf, 1, "\n");
+ for (i = 0; i < (ctxt->level + extra); i += ctxt->indent_nr) {
+ xmlOutputBufferWrite(ctxt->buf, ctxt->indent_size *
+ ((ctxt->level + extra - i) > ctxt->indent_nr ?
+ ctxt->indent_nr : (ctxt->level + extra - i)),
+ ctxt->indent);
+ }
+}
+
+/**
+ * xmlNsDumpOutput:
+ * @buf: the XML buffer output
+ * @cur: a namespace
+ * @ctxt: the output save context. Optional.
+ *
+ * Dump a local Namespace definition.
+ * Should be called in the context of attributes dumps.
+ * If @ctxt is supplied, @buf should be its buffer.
+ */
+static void
+xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) {
+ if ((cur == NULL) || (buf == NULL)) return;
+ if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) {
+ if (xmlStrEqual(cur->prefix, BAD_CAST "xml"))
+ return;
+
+ if (ctxt != NULL && ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 2);
+ else
+ xmlOutputBufferWrite(buf, 1, " ");
+
+ /* Within the context of an element attributes */
+ if (cur->prefix != NULL) {
+ xmlOutputBufferWrite(buf, 6, "xmlns:");
+ xmlOutputBufferWriteString(buf, (const char *)cur->prefix);
+ } else
+ xmlOutputBufferWrite(buf, 5, "xmlns");
+ xmlOutputBufferWrite(buf, 1, "=");
+ xmlBufWriteQuotedString(buf->buffer, cur->href);
+ }
+}
+
+/**
+ * xmlNsDumpOutputCtxt
+ * @ctxt: the save context
+ * @cur: a namespace
+ *
+ * Dump a local Namespace definition to a save context.
+ * Should be called in the context of attribute dumps.
+ */
+static void
+xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) {
+ xmlNsDumpOutput(ctxt->buf, cur, ctxt);
+}
+
+/**
+ * xmlNsListDumpOutputCtxt
+ * @ctxt: the save context
+ * @cur: the first namespace
+ *
+ * Dump a list of local namespace definitions to a save context.
+ * Should be called in the context of attribute dumps.
+ */
+static void
+xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) {
+ while (cur != NULL) {
+ xmlNsDumpOutput(ctxt->buf, cur, ctxt);
+ cur = cur->next;
+ }
+}
+
+/**
+ * xmlNsListDumpOutput:
+ * @buf: the XML buffer output
+ * @cur: the first namespace
+ *
+ * Dump a list of local Namespace definitions.
+ * Should be called in the context of attributes dumps.
+ */
+void
+xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) {
+ while (cur != NULL) {
+ xmlNsDumpOutput(buf, cur, NULL);
+ cur = cur->next;
+ }
+}
+
+/**
+ * xmlDtdDumpOutput:
+ * @buf: the XML buffer output
+ * @dtd: the pointer to the DTD
+ *
+ * Dump the XML document DTD, if any.
+ */
+static void
+xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
+ xmlOutputBufferPtr buf;
+ int format, level;
+ xmlDocPtr doc;
+
+ if (dtd == NULL) return;
+ if ((ctxt == NULL) || (ctxt->buf == NULL))
+ return;
+ buf = ctxt->buf;
+ xmlOutputBufferWrite(buf, 10, "<!DOCTYPE ");
+ xmlOutputBufferWriteString(buf, (const char *)dtd->name);
+ if (dtd->ExternalID != NULL) {
+ xmlOutputBufferWrite(buf, 8, " PUBLIC ");
+ xmlBufWriteQuotedString(buf->buffer, dtd->ExternalID);
+ xmlOutputBufferWrite(buf, 1, " ");
+ xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
+ } else if (dtd->SystemID != NULL) {
+ xmlOutputBufferWrite(buf, 8, " SYSTEM ");
+ xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
+ }
+ if ((dtd->entities == NULL) && (dtd->elements == NULL) &&
+ (dtd->attributes == NULL) && (dtd->notations == NULL) &&
+ (dtd->pentities == NULL)) {
+ xmlOutputBufferWrite(buf, 1, ">");
+ return;
+ }
+ xmlOutputBufferWrite(buf, 3, " [\n");
+ /*
+ * Dump the notations first they are not in the DTD children list
+ * Do this only on a standalone DTD or on the internal subset though.
+ */
+ if ((dtd->notations != NULL) && ((dtd->doc == NULL) ||
+ (dtd->doc->intSubset == dtd))) {
+ xmlBufDumpNotationTable(buf->buffer,
+ (xmlNotationTablePtr) dtd->notations);
+ }
+ format = ctxt->format;
+ level = ctxt->level;
+ doc = ctxt->doc;
+ ctxt->format = 0;
+ ctxt->level = -1;
+ ctxt->doc = dtd->doc;
+ xmlNodeListDumpOutput(ctxt, dtd->children);
+ ctxt->format = format;
+ ctxt->level = level;
+ ctxt->doc = doc;
+ xmlOutputBufferWrite(buf, 2, "]>");
+}
+
+/**
+ * xmlAttrDumpOutput:
+ * @buf: the XML buffer output
+ * @cur: the attribute pointer
+ *
+ * Dump an XML attribute
+ */
+static void
+xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ buf = ctxt->buf;
+ if (buf == NULL) return;
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 2);
+ else
+ xmlOutputBufferWrite(buf, 1, " ");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 2, "=\"");
+ xmlAttrSerializeContent(buf, cur);
+ xmlOutputBufferWrite(buf, 1, "\"");
+}
+
+/**
+ * xmlAttrListDumpOutput:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @cur: the first attribute pointer
+ * @encoding: an optional encoding string
+ *
+ * Dump a list of XML attributes
+ */
+static void
+xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
+ if (cur == NULL) return;
+ while (cur != NULL) {
+ xmlAttrDumpOutput(ctxt, cur);
+ cur = cur->next;
+ }
+}
+
+
+
+/**
+ * xmlNodeListDumpOutput:
+ * @cur: the first node
+ *
+ * Dump an XML node list, recursive behaviour, children are printed too.
+ */
+static void
+xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ buf = ctxt->buf;
+ while (cur != NULL) {
+ if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
+ ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_COMMENT_NODE) ||
+ (cur->type == XML_PI_NODE)))
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
+ xmlNodeDumpOutputInternal(ctxt, cur);
+ if (ctxt->format == 1) {
+ xmlOutputBufferWrite(buf, 1, "\n");
+ }
+ cur = cur->next;
+ }
+}
+
+#ifdef LIBXML_HTML_ENABLED
+/**
+ * xmlNodeDumpOutputInternal:
+ * @cur: the current node
+ *
+ * Dump an HTML node, recursive behaviour, children are printed too.
+ */
+static int
+htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ const xmlChar *oldenc = NULL;
+ const xmlChar *oldctxtenc = ctxt->encoding;
+ const xmlChar *encoding = ctxt->encoding;
+ xmlOutputBufferPtr buf = ctxt->buf;
+ int switched_encoding = 0;
+ xmlDocPtr doc;
+
+ xmlInitParser();
+
+ doc = cur->doc;
+ if (doc != NULL) {
+ oldenc = doc->encoding;
+ if (ctxt->encoding != NULL) {
+ doc->encoding = BAD_CAST ctxt->encoding;
+ } else if (doc->encoding != NULL) {
+ encoding = doc->encoding;
+ }
+ }
+
+ if ((encoding != NULL) && (doc != NULL))
+ htmlSetMetaEncoding(doc, (const xmlChar *) encoding);
+ if ((encoding == NULL) && (doc != NULL))
+ encoding = htmlGetMetaEncoding(doc);
+ if (encoding == NULL)
+ encoding = BAD_CAST "HTML";
+ if ((encoding != NULL) && (oldctxtenc == NULL) &&
+ (buf->encoder == NULL) && (buf->conv == NULL)) {
+ if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
+ doc->encoding = oldenc;
+ return(-1);
+ }
+ switched_encoding = 1;
+ }
+ if (ctxt->options & XML_SAVE_FORMAT)
+ htmlNodeDumpFormatOutput(buf, doc, cur,
+ (const char *)encoding, 1);
+ else
+ htmlNodeDumpFormatOutput(buf, doc, cur,
+ (const char *)encoding, 0);
+ /*
+ * Restore the state of the saving context at the end of the document
+ */
+ if ((switched_encoding) && (oldctxtenc == NULL)) {
+ xmlSaveClearEncoding(ctxt);
+ }
+ if (doc != NULL)
+ doc->encoding = oldenc;
+ return(0);
+}
+#endif
+
+/**
+ * xmlNodeDumpOutputInternal:
+ * @cur: the current node
+ *
+ * Dump an XML node, recursive behaviour, children are printed too.
+ */
+static void
+xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ int format;
+ xmlNodePtr tmp;
+ xmlChar *start, *end;
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ buf = ctxt->buf;
+ if (cur->type == XML_XINCLUDE_START)
+ return;
+ if (cur->type == XML_XINCLUDE_END)
+ return;
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur);
+ return;
+ }
+#ifdef LIBXML_HTML_ENABLED
+ if (ctxt->options & XML_SAVE_XHTML) {
+ xhtmlNodeDumpOutput(ctxt, cur);
+ return;
+ }
+ if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) &&
+ (cur->doc->type == XML_HTML_DOCUMENT_NODE) &&
+ ((ctxt->options & XML_SAVE_AS_XML) == 0)) ||
+ (ctxt->options & XML_SAVE_AS_HTML)) {
+ htmlNodeDumpOutputInternal(ctxt, cur);
+ return;
+ }
+#endif
+ if (cur->type == XML_DTD_NODE) {
+ xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
+ return;
+ }
+ if (cur->type == XML_DOCUMENT_FRAG_NODE) {
+ xmlNodeListDumpOutput(ctxt, cur->children);
+ return;
+ }
+ if (cur->type == XML_ELEMENT_DECL) {
+ xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_DECL) {
+ xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
+ return;
+ }
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
+ return;
+ }
+ if (cur->type == XML_TEXT_NODE) {
+ if (cur->content != NULL) {
+ if (cur->name != xmlStringTextNoenc) {
+ xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
+ } else {
+ /*
+ * Disable escaping, needed for XSLT
+ */
+ xmlOutputBufferWriteString(buf, (const char *) cur->content);
+ }
+ }
+
+ return;
+ }
+ if (cur->type == XML_PI_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWrite(buf, 2, "<?");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->content != NULL) {
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 0);
+ else
+ xmlOutputBufferWrite(buf, 1, " ");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ }
+ xmlOutputBufferWrite(buf, 2, "?>");
+ } else {
+ xmlOutputBufferWrite(buf, 2, "<?");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 0);
+ xmlOutputBufferWrite(buf, 2, "?>");
+ }
+ return;
+ }
+ if (cur->type == XML_COMMENT_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWrite(buf, 4, "<!--");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ xmlOutputBufferWrite(buf, 3, "-->");
+ }
+ return;
+ }
+ if (cur->type == XML_ENTITY_REF_NODE) {
+ xmlOutputBufferWrite(buf, 1, "&");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 1, ";");
+ return;
+ }
+ if (cur->type == XML_CDATA_SECTION_NODE) {
+ if (cur->content == NULL || *cur->content == '\0') {
+ xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
+ } else {
+ start = end = cur->content;
+ while (*end != '\0') {
+ if ((*end == ']') && (*(end + 1) == ']') &&
+ (*(end + 2) == '>')) {
+ end = end + 2;
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWrite(buf, end - start, (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ start = end;
+ }
+ end++;
+ }
+ if (start != end) {
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWriteString(buf, (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ }
+ }
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
+ return;
+ }
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur);
+ return;
+ }
+
+ format = ctxt->format;
+ if (format == 1) {
+ tmp = cur->children;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_TEXT_NODE) ||
+ (tmp->type == XML_CDATA_SECTION_NODE) ||
+ (tmp->type == XML_ENTITY_REF_NODE)) {
+ ctxt->format = 0;
+ break;
+ }
+ tmp = tmp->next;
+ }
+ }
+ xmlOutputBufferWrite(buf, 1, "<");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->nsDef)
+ xmlNsListDumpOutputCtxt(ctxt, cur->nsDef);
+ if (cur->properties != NULL)
+ xmlAttrListDumpOutput(ctxt, cur->properties);
+
+ if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
+ (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) {
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 0);
+ xmlOutputBufferWrite(buf, 2, "/>");
+ ctxt->format = format;
+ return;
+ }
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 1);
+ xmlOutputBufferWrite(buf, 1, ">");
+ if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
+ xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
+ }
+ if (cur->children != NULL) {
+ if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
+ if (ctxt->level >= 0) ctxt->level++;
+ xmlNodeListDumpOutput(ctxt, cur->children);
+ if (ctxt->level > 0) ctxt->level--;
+ if ((xmlIndentTreeOutput) && (ctxt->format == 1))
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
+ }
+ xmlOutputBufferWrite(buf, 2, "</");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (ctxt->format == 2)
+ xmlOutputBufferWriteWSNonSig(ctxt, 0);
+ xmlOutputBufferWrite(buf, 1, ">");
+ ctxt->format = format;
+}
+
+/**
+ * xmlDocContentDumpOutput:
+ * @cur: the document
+ *
+ * Dump an XML document.
+ */
+static int
+xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
+#ifdef LIBXML_HTML_ENABLED
+ xmlDtdPtr dtd;
+ int is_xhtml = 0;
+#endif
+ const xmlChar *oldenc = cur->encoding;
+ const xmlChar *oldctxtenc = ctxt->encoding;
+ const xmlChar *encoding = ctxt->encoding;
+ xmlCharEncodingOutputFunc oldescape = ctxt->escape;
+ xmlCharEncodingOutputFunc oldescapeAttr = ctxt->escapeAttr;
+ xmlOutputBufferPtr buf = ctxt->buf;
+ xmlCharEncoding enc;
+ int switched_encoding = 0;
+
+ xmlInitParser();
+
+ if ((cur->type != XML_HTML_DOCUMENT_NODE) &&
+ (cur->type != XML_DOCUMENT_NODE))
+ return(-1);
+
+ if (ctxt->encoding != NULL) {
+ cur->encoding = BAD_CAST ctxt->encoding;
+ } else if (cur->encoding != NULL) {
+ encoding = cur->encoding;
+ } else if (cur->charset != XML_CHAR_ENCODING_UTF8) {
+ encoding = (const xmlChar *)
+ xmlGetCharEncodingName((xmlCharEncoding) cur->charset);
+ }
+
+ if (((cur->type == XML_HTML_DOCUMENT_NODE) &&
+ ((ctxt->options & XML_SAVE_AS_XML) == 0) &&
+ ((ctxt->options & XML_SAVE_XHTML) == 0)) ||
+ (ctxt->options & XML_SAVE_AS_HTML)) {
+#ifdef LIBXML_HTML_ENABLED
+ if (encoding != NULL)
+ htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
+ if (encoding == NULL)
+ encoding = htmlGetMetaEncoding(cur);
+ if (encoding == NULL)
+ encoding = BAD_CAST "HTML";
+ if ((encoding != NULL) && (oldctxtenc == NULL) &&
+ (buf->encoder == NULL) && (buf->conv == NULL)) {
+ if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
+ cur->encoding = oldenc;
+ return(-1);
+ }
+ }
+ if (ctxt->options & XML_SAVE_FORMAT)
+ htmlDocContentDumpFormatOutput(buf, cur,
+ (const char *)encoding, 1);
+ else
+ htmlDocContentDumpFormatOutput(buf, cur,
+ (const char *)encoding, 0);
+ if (ctxt->encoding != NULL)
+ cur->encoding = oldenc;
+ return(0);
+#else
+ return(-1);
+#endif
+ } else if ((cur->type == XML_DOCUMENT_NODE) ||
+ (ctxt->options & XML_SAVE_AS_XML) ||
+ (ctxt->options & XML_SAVE_XHTML)) {
+ enc = xmlParseCharEncoding((const char*) encoding);
+ if ((encoding != NULL) && (oldctxtenc == NULL) &&
+ (buf->encoder == NULL) && (buf->conv == NULL) &&
+ ((ctxt->options & XML_SAVE_NO_DECL) == 0)) {
+ if ((enc != XML_CHAR_ENCODING_UTF8) &&
+ (enc != XML_CHAR_ENCODING_NONE) &&
+ (enc != XML_CHAR_ENCODING_ASCII)) {
+ /*
+ * we need to switch to this encoding but just for this
+ * document since we output the XMLDecl the conversion
+ * must be done to not generate not well formed documents.
+ */
+ if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
+ cur->encoding = oldenc;
+ return(-1);
+ }
+ switched_encoding = 1;
+ }
+ if (ctxt->escape == xmlEscapeEntities)
+ ctxt->escape = NULL;
+ if (ctxt->escapeAttr == xmlEscapeEntities)
+ ctxt->escapeAttr = NULL;
+ }
+
+
+ /*
+ * Save the XML declaration
+ */
+ if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
+ xmlOutputBufferWrite(buf, 14, "<?xml version=");
+ if (cur->version != NULL)
+ xmlBufWriteQuotedString(buf->buffer, cur->version);
+ else
+ xmlOutputBufferWrite(buf, 5, "\"1.0\"");
+ if (encoding != NULL) {
+ xmlOutputBufferWrite(buf, 10, " encoding=");
+ xmlBufWriteQuotedString(buf->buffer, (xmlChar *) encoding);
+ }
+ switch (cur->standalone) {
+ case 0:
+ xmlOutputBufferWrite(buf, 16, " standalone=\"no\"");
+ break;
+ case 1:
+ xmlOutputBufferWrite(buf, 17, " standalone=\"yes\"");
+ break;
+ }
+ xmlOutputBufferWrite(buf, 3, "?>\n");
+ }
+
+#ifdef LIBXML_HTML_ENABLED
+ if (ctxt->options & XML_SAVE_XHTML)
+ is_xhtml = 1;
+ if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) {
+ dtd = xmlGetIntSubset(cur);
+ if (dtd != NULL) {
+ is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
+ if (is_xhtml < 0) is_xhtml = 0;
+ }
+ }
+#endif
+ if (cur->children != NULL) {
+ xmlNodePtr child = cur->children;
+
+ while (child != NULL) {
+ ctxt->level = 0;
+#ifdef LIBXML_HTML_ENABLED
+ if (is_xhtml)
+ xhtmlNodeDumpOutput(ctxt, child);
+ else
+#endif
+ xmlNodeDumpOutputInternal(ctxt, child);
+ xmlOutputBufferWrite(buf, 1, "\n");
+ child = child->next;
+ }
+ }
+ }
+
+ /*
+ * Restore the state of the saving context at the end of the document
+ */
+ if ((switched_encoding) && (oldctxtenc == NULL)) {
+ xmlSaveClearEncoding(ctxt);
+ ctxt->escape = oldescape;
+ ctxt->escapeAttr = oldescapeAttr;
+ }
+ cur->encoding = oldenc;
+ return(0);
+}
+
+#ifdef LIBXML_HTML_ENABLED
+/************************************************************************
+ * *
+ * Functions specific to XHTML serialization *
+ * *
+ ************************************************************************/
+
+/**
+ * xhtmlIsEmpty:
+ * @node: the node
+ *
+ * Check if a node is an empty xhtml node
+ *
+ * Returns 1 if the node is an empty node, 0 if not and -1 in case of error
+ */
+static int
+xhtmlIsEmpty(xmlNodePtr node) {
+ if (node == NULL)
+ return(-1);
+ if (node->type != XML_ELEMENT_NODE)
+ return(0);
+ if ((node->ns != NULL) && (!xmlStrEqual(node->ns->href, XHTML_NS_NAME)))
+ return(0);
+ if (node->children != NULL)
+ return(0);
+ switch (node->name[0]) {
+ case 'a':
+ if (xmlStrEqual(node->name, BAD_CAST "area"))
+ return(1);
+ return(0);
+ case 'b':
+ if (xmlStrEqual(node->name, BAD_CAST "br"))
+ return(1);
+ if (xmlStrEqual(node->name, BAD_CAST "base"))
+ return(1);
+ if (xmlStrEqual(node->name, BAD_CAST "basefont"))
+ return(1);
+ return(0);
+ case 'c':
+ if (xmlStrEqual(node->name, BAD_CAST "col"))
+ return(1);
+ return(0);
+ case 'f':
+ if (xmlStrEqual(node->name, BAD_CAST "frame"))
+ return(1);
+ return(0);
+ case 'h':
+ if (xmlStrEqual(node->name, BAD_CAST "hr"))
+ return(1);
+ return(0);
+ case 'i':
+ if (xmlStrEqual(node->name, BAD_CAST "img"))
+ return(1);
+ if (xmlStrEqual(node->name, BAD_CAST "input"))
+ return(1);
+ if (xmlStrEqual(node->name, BAD_CAST "isindex"))
+ return(1);
+ return(0);
+ case 'l':
+ if (xmlStrEqual(node->name, BAD_CAST "link"))
+ return(1);
+ return(0);
+ case 'm':
+ if (xmlStrEqual(node->name, BAD_CAST "meta"))
+ return(1);
+ return(0);
+ case 'p':
+ if (xmlStrEqual(node->name, BAD_CAST "param"))
+ return(1);
+ return(0);
+ }
+ return(0);
+}
+
+/**
+ * xhtmlAttrListDumpOutput:
+ * @cur: the first attribute pointer
+ *
+ * Dump a list of XML attributes
+ */
+static void
+xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
+ xmlAttrPtr xml_lang = NULL;
+ xmlAttrPtr lang = NULL;
+ xmlAttrPtr name = NULL;
+ xmlAttrPtr id = NULL;
+ xmlNodePtr parent;
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ buf = ctxt->buf;
+ parent = cur->parent;
+ while (cur != NULL) {
+ if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id")))
+ id = cur;
+ else
+ if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "name")))
+ name = cur;
+ else
+ if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")))
+ lang = cur;
+ else
+ if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) &&
+ (xmlStrEqual(cur->ns->prefix, BAD_CAST "xml")))
+ xml_lang = cur;
+ else if ((cur->ns == NULL) &&
+ ((cur->children == NULL) ||
+ (cur->children->content == NULL) ||
+ (cur->children->content[0] == 0)) &&
+ (htmlIsBooleanAttr(cur->name))) {
+ if (cur->children != NULL)
+ xmlFreeNode(cur->children);
+ cur->children = xmlNewText(cur->name);
+ if (cur->children != NULL)
+ cur->children->parent = (xmlNodePtr) cur;
+ }
+ xmlAttrDumpOutput(ctxt, cur);
+ cur = cur->next;
+ }
+ /*
+ * C.8
+ */
+ if ((name != NULL) && (id == NULL)) {
+ if ((parent != NULL) && (parent->name != NULL) &&
+ ((xmlStrEqual(parent->name, BAD_CAST "a")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "p")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "div")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "img")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "map")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "applet")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "form")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "frame")) ||
+ (xmlStrEqual(parent->name, BAD_CAST "iframe")))) {
+ xmlOutputBufferWrite(buf, 5, " id=\"");
+ xmlAttrSerializeContent(buf, name);
+ xmlOutputBufferWrite(buf, 1, "\"");
+ }
+ }
+ /*
+ * C.7.
+ */
+ if ((lang != NULL) && (xml_lang == NULL)) {
+ xmlOutputBufferWrite(buf, 11, " xml:lang=\"");
+ xmlAttrSerializeContent(buf, lang);
+ xmlOutputBufferWrite(buf, 1, "\"");
+ } else
+ if ((xml_lang != NULL) && (lang == NULL)) {
+ xmlOutputBufferWrite(buf, 7, " lang=\"");
+ xmlAttrSerializeContent(buf, xml_lang);
+ xmlOutputBufferWrite(buf, 1, "\"");
+ }
+}
+
+/**
+ * xhtmlNodeListDumpOutput:
+ * @buf: the XML buffer output
+ * @doc: the XHTML document
+ * @cur: the first node
+ * @level: the imbrication level for indenting
+ * @format: is formatting allowed
+ * @encoding: an optional encoding string
+ *
+ * Dump an XML node list, recursive behaviour, children are printed too.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+static void
+xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ buf = ctxt->buf;
+ while (cur != NULL) {
+ if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
+ (cur->type == XML_ELEMENT_NODE))
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
+ xhtmlNodeDumpOutput(ctxt, cur);
+ if (ctxt->format == 1) {
+ xmlOutputBufferWrite(buf, 1, "\n");
+ }
+ cur = cur->next;
+ }
+}
+
+/**
+ * xhtmlNodeDumpOutput:
+ * @buf: the XML buffer output
+ * @doc: the XHTML document
+ * @cur: the current node
+ * @level: the imbrication level for indenting
+ * @format: is formatting allowed
+ * @encoding: an optional encoding string
+ *
+ * Dump an XHTML node, recursive behaviour, children are printed too.
+ */
+static void
+xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
+ int format, addmeta = 0;
+ xmlNodePtr tmp;
+ xmlChar *start, *end;
+ xmlOutputBufferPtr buf;
+
+ if (cur == NULL) return;
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur);
+ return;
+ }
+ if (cur->type == XML_XINCLUDE_START)
+ return;
+ if (cur->type == XML_XINCLUDE_END)
+ return;
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur);
+ return;
+ }
+ if (cur->type == XML_DTD_NODE) {
+ xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
+ return;
+ }
+ if (cur->type == XML_DOCUMENT_FRAG_NODE) {
+ xhtmlNodeListDumpOutput(ctxt, cur->children);
+ return;
+ }
+ buf = ctxt->buf;
+ if (cur->type == XML_ELEMENT_DECL) {
+ xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_DECL) {
+ xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
+ return;
+ }
+ if (cur->type == XML_ENTITY_DECL) {
+ xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
+ return;
+ }
+ if (cur->type == XML_TEXT_NODE) {
+ if (cur->content != NULL) {
+ if ((cur->name == xmlStringText) ||
+ (cur->name != xmlStringTextNoenc)) {
+ xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
+ } else {
+ /*
+ * Disable escaping, needed for XSLT
+ */
+ xmlOutputBufferWriteString(buf, (const char *) cur->content);
+ }
+ }
+
+ return;
+ }
+ if (cur->type == XML_PI_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWrite(buf, 2, "<?");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->content != NULL) {
+ xmlOutputBufferWrite(buf, 1, " ");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ }
+ xmlOutputBufferWrite(buf, 2, "?>");
+ } else {
+ xmlOutputBufferWrite(buf, 2, "<?");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 2, "?>");
+ }
+ return;
+ }
+ if (cur->type == XML_COMMENT_NODE) {
+ if (cur->content != NULL) {
+ xmlOutputBufferWrite(buf, 4, "<!--");
+ xmlOutputBufferWriteString(buf, (const char *)cur->content);
+ xmlOutputBufferWrite(buf, 3, "-->");
+ }
+ return;
+ }
+ if (cur->type == XML_ENTITY_REF_NODE) {
+ xmlOutputBufferWrite(buf, 1, "&");
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 1, ";");
+ return;
+ }
+ if (cur->type == XML_CDATA_SECTION_NODE) {
+ if (cur->content == NULL || *cur->content == '\0') {
+ xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
+ } else {
+ start = end = cur->content;
+ while (*end != '\0') {
+ if (*end == ']' && *(end + 1) == ']' && *(end + 2) == '>') {
+ end = end + 2;
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWrite(buf, end - start, (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ start = end;
+ }
+ end++;
+ }
+ if (start != end) {
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWriteString(buf, (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ }
+ }
+ return;
+ }
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
+ return;
+ }
+
+ format = ctxt->format;
+ if (format == 1) {
+ tmp = cur->children;
+ while (tmp != NULL) {
+ if ((tmp->type == XML_TEXT_NODE) ||
+ (tmp->type == XML_ENTITY_REF_NODE)) {
+ format = 0;
+ break;
+ }
+ tmp = tmp->next;
+ }
+ }
+ xmlOutputBufferWrite(buf, 1, "<");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ if (cur->nsDef)
+ xmlNsListDumpOutputCtxt(ctxt, cur->nsDef);
+ if ((xmlStrEqual(cur->name, BAD_CAST "html") &&
+ (cur->ns == NULL) && (cur->nsDef == NULL))) {
+ /*
+ * 3.1.1. Strictly Conforming Documents A.3.1.1 3/
+ */
+ xmlOutputBufferWriteString(buf,
+ " xmlns=\"http://www.w3.org/1999/xhtml\"");
+ }
+ if (cur->properties != NULL)
+ xhtmlAttrListDumpOutput(ctxt, cur->properties);
+
+ if ((cur->type == XML_ELEMENT_NODE) &&
+ (cur->parent != NULL) &&
+ (cur->parent->parent == (xmlNodePtr) cur->doc) &&
+ xmlStrEqual(cur->name, BAD_CAST"head") &&
+ xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
+
+ tmp = cur->children;
+ while (tmp != NULL) {
+ if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
+ xmlChar *httpequiv;
+
+ httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
+ if (httpequiv != NULL) {
+ if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
+ xmlFree(httpequiv);
+ break;
+ }
+ xmlFree(httpequiv);
+ }
+ }
+ tmp = tmp->next;
+ }
+ if (tmp == NULL)
+ addmeta = 1;
+ }
+
+ if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) {
+ if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
+ ((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) {
+ /*
+ * C.2. Empty Elements
+ */
+ xmlOutputBufferWrite(buf, 3, " />");
+ } else {
+ if (addmeta == 1) {
+ xmlOutputBufferWrite(buf, 1, ">");
+ if (ctxt->format == 1) {
+ xmlOutputBufferWrite(buf, 1, "\n");
+ if (xmlIndentTreeOutput)
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level + 1 > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
+ }
+ xmlOutputBufferWriteString(buf,
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
+ if (ctxt->encoding) {
+ xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
+ } else {
+ xmlOutputBufferWrite(buf, 5, "UTF-8");
+ }
+ xmlOutputBufferWrite(buf, 4, "\" />");
+ if (ctxt->format == 1)
+ xmlOutputBufferWrite(buf, 1, "\n");
+ } else {
+ xmlOutputBufferWrite(buf, 1, ">");
+ }
+ /*
+ * C.3. Element Minimization and Empty Element Content
+ */
+ xmlOutputBufferWrite(buf, 2, "</");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 1, ">");
+ }
+ return;
+ }
+ xmlOutputBufferWrite(buf, 1, ">");
+ if (addmeta == 1) {
+ if (ctxt->format == 1) {
+ xmlOutputBufferWrite(buf, 1, "\n");
+ if (xmlIndentTreeOutput)
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level + 1 > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
+ }
+ xmlOutputBufferWriteString(buf,
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
+ if (ctxt->encoding) {
+ xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
+ } else {
+ xmlOutputBufferWrite(buf, 5, "UTF-8");
+ }
+ xmlOutputBufferWrite(buf, 4, "\" />");
+ }
+ if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
+ xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
+ }
+
+#if 0
+ /*
+ * This was removed due to problems with HTML processors.
+ * See bug #345147.
+ */
+ /*
+ * 4.8. Script and Style elements
+ */
+ if ((cur->type == XML_ELEMENT_NODE) &&
+ ((xmlStrEqual(cur->name, BAD_CAST "script")) ||
+ (xmlStrEqual(cur->name, BAD_CAST "style"))) &&
+ ((cur->ns == NULL) ||
+ (xmlStrEqual(cur->ns->href, XHTML_NS_NAME)))) {
+ xmlNodePtr child = cur->children;
+
+ while (child != NULL) {
+ if (child->type == XML_TEXT_NODE) {
+ if ((xmlStrchr(child->content, '<') == NULL) &&
+ (xmlStrchr(child->content, '&') == NULL) &&
+ (xmlStrstr(child->content, BAD_CAST "]]>") == NULL)) {
+ /* Nothing to escape, so just output as is... */
+ /* FIXME: Should we do something about "--" also? */
+ int level = ctxt->level;
+ int indent = ctxt->format;
+
+ ctxt->level = 0;
+ ctxt->format = 0;
+ xmlOutputBufferWriteString(buf, (const char *) child->content);
+ /* (We cannot use xhtmlNodeDumpOutput() here because
+ * we wish to leave '>' unescaped!) */
+ ctxt->level = level;
+ ctxt->format = indent;
+ } else {
+ /* We must use a CDATA section. Unfortunately,
+ * this will break CSS and JavaScript when read by
+ * a browser in HTML4-compliant mode. :-( */
+ start = end = child->content;
+ while (*end != '\0') {
+ if (*end == ']' &&
+ *(end + 1) == ']' &&
+ *(end + 2) == '>') {
+ end = end + 2;
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWrite(buf, end - start,
+ (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ start = end;
+ }
+ end++;
+ }
+ if (start != end) {
+ xmlOutputBufferWrite(buf, 9, "<![CDATA[");
+ xmlOutputBufferWrite(buf, end - start,
+ (const char *)start);
+ xmlOutputBufferWrite(buf, 3, "]]>");
+ }
+ }
+ } else {
+ int level = ctxt->level;
+ int indent = ctxt->format;
+
+ ctxt->level = 0;
+ ctxt->format = 0;
+ xhtmlNodeDumpOutput(ctxt, child);
+ ctxt->level = level;
+ ctxt->format = indent;
+ }
+ child = child->next;
+ }
+ }
+#endif
+
+ if (cur->children != NULL) {
+ int indent = ctxt->format;
+
+ if (format == 1) xmlOutputBufferWrite(buf, 1, "\n");
+ if (ctxt->level >= 0) ctxt->level++;
+ ctxt->format = format;
+ xhtmlNodeListDumpOutput(ctxt, cur->children);
+ if (ctxt->level > 0) ctxt->level--;
+ ctxt->format = indent;
+ if ((xmlIndentTreeOutput) && (format == 1))
+ xmlOutputBufferWrite(buf, ctxt->indent_size *
+ (ctxt->level > ctxt->indent_nr ?
+ ctxt->indent_nr : ctxt->level),
+ ctxt->indent);
+ }
+ xmlOutputBufferWrite(buf, 2, "</");
+ if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
+ xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
+ xmlOutputBufferWrite(buf, 1, ":");
+ }
+
+ xmlOutputBufferWriteString(buf, (const char *)cur->name);
+ xmlOutputBufferWrite(buf, 1, ">");
+}
+#endif
+
+/************************************************************************
+ * *
+ * Public entry points *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSaveToFd:
+ * @fd: a file descriptor number
+ * @encoding: the encoding name to use or NULL
+ * @options: a set of xmlSaveOptions
+ *
+ * Create a document saving context serializing to a file descriptor
+ * with the encoding and the options given.
+ *
+ * Returns a new serialization context or NULL in case of error.
+ */
+xmlSaveCtxtPtr
+xmlSaveToFd(int fd, const char *encoding, int options)
+{
+ xmlSaveCtxtPtr ret;
+
+ ret = xmlNewSaveCtxt(encoding, options);
+ if (ret == NULL) return(NULL);
+ ret->buf = xmlOutputBufferCreateFd(fd, ret->handler);
+ if (ret->buf == NULL) {
+ xmlFreeSaveCtxt(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlSaveToFilename:
+ * @filename: a file name or an URL
+ * @encoding: the encoding name to use or NULL
+ * @options: a set of xmlSaveOptions
+ *
+ * Create a document saving context serializing to a filename or possibly
+ * to an URL (but this is less reliable) with the encoding and the options
+ * given.
+ *
+ * Returns a new serialization context or NULL in case of error.
+ */
+xmlSaveCtxtPtr
+xmlSaveToFilename(const char *filename, const char *encoding, int options)
+{
+ xmlSaveCtxtPtr ret;
+ int compression = 0; /* TODO handle compression option */
+
+ ret = xmlNewSaveCtxt(encoding, options);
+ if (ret == NULL) return(NULL);
+ ret->buf = xmlOutputBufferCreateFilename(filename, ret->handler,
+ compression);
+ if (ret->buf == NULL) {
+ xmlFreeSaveCtxt(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlSaveToBuffer:
+ * @buffer: a buffer
+ * @encoding: the encoding name to use or NULL
+ * @options: a set of xmlSaveOptions
+ *
+ * Create a document saving context serializing to a buffer
+ * with the encoding and the options given
+ *
+ * Returns a new serialization context or NULL in case of error.
+ */
+
+xmlSaveCtxtPtr
+xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
+{
+ xmlSaveCtxtPtr ret;
+ xmlOutputBufferPtr out_buff;
+ xmlCharEncodingHandlerPtr handler;
+
+ ret = xmlNewSaveCtxt(encoding, options);
+ if (ret == NULL) return(NULL);
+
+ if (encoding != NULL) {
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ } else
+ handler = NULL;
+ out_buff = xmlOutputBufferCreateBuffer(buffer, handler);
+ if (out_buff == NULL) {
+ xmlFree(ret);
+ if (handler) xmlCharEncCloseFunc(handler);
+ return(NULL);
+ }
+
+ ret->buf = out_buff;
+ return(ret);
+}
+
+/**
+ * xmlSaveToIO:
+ * @iowrite: an I/O write function
+ * @ioclose: an I/O close function
+ * @ioctx: an I/O handler
+ * @encoding: the encoding name to use or NULL
+ * @options: a set of xmlSaveOptions
+ *
+ * Create a document saving context serializing to a file descriptor
+ * with the encoding and the options given
+ *
+ * Returns a new serialization context or NULL in case of error.
+ */
+xmlSaveCtxtPtr
+xmlSaveToIO(xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx, const char *encoding, int options)
+{
+ xmlSaveCtxtPtr ret;
+
+ ret = xmlNewSaveCtxt(encoding, options);
+ if (ret == NULL) return(NULL);
+ ret->buf = xmlOutputBufferCreateIO(iowrite, ioclose, ioctx, ret->handler);
+ if (ret->buf == NULL) {
+ xmlFreeSaveCtxt(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlSaveDoc:
+ * @ctxt: a document saving context
+ * @doc: a document
+ *
+ * Save a full document to a saving context
+ * TODO: The function is not fully implemented yet as it does not return the
+ * byte count but 0 instead
+ *
+ * Returns the number of byte written or -1 in case of error
+ */
+long
+xmlSaveDoc(xmlSaveCtxtPtr ctxt, xmlDocPtr doc)
+{
+ long ret = 0;
+
+ if ((ctxt == NULL) || (doc == NULL)) return(-1);
+ if (xmlDocContentDumpOutput(ctxt, doc) < 0)
+ return(-1);
+ return(ret);
+}
+
+/**
+ * xmlSaveTree:
+ * @ctxt: a document saving context
+ * @node: the top node of the subtree to save
+ *
+ * Save a subtree starting at the node parameter to a saving context
+ * TODO: The function is not fully implemented yet as it does not return the
+ * byte count but 0 instead
+ *
+ * Returns the number of byte written or -1 in case of error
+ */
+long
+xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr node)
+{
+ long ret = 0;
+
+ if ((ctxt == NULL) || (node == NULL)) return(-1);
+ xmlNodeDumpOutputInternal(ctxt, node);
+ return(ret);
+}
+
+/**
+ * xmlSaveFlush:
+ * @ctxt: a document saving context
+ *
+ * Flush a document saving context, i.e. make sure that all bytes have
+ * been output.
+ *
+ * Returns the number of byte written or -1 in case of error.
+ */
+int
+xmlSaveFlush(xmlSaveCtxtPtr ctxt)
+{
+ if (ctxt == NULL) return(-1);
+ if (ctxt->buf == NULL) return(-1);
+ return(xmlOutputBufferFlush(ctxt->buf));
+}
+
+/**
+ * xmlSaveClose:
+ * @ctxt: a document saving context
+ *
+ * Close a document saving context, i.e. make sure that all bytes have
+ * been output and free the associated data.
+ *
+ * Returns the number of byte written or -1 in case of error.
+ */
+int
+xmlSaveClose(xmlSaveCtxtPtr ctxt)
+{
+ int ret;
+
+ if (ctxt == NULL) return(-1);
+ ret = xmlSaveFlush(ctxt);
+ xmlFreeSaveCtxt(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlSaveSetEscape:
+ * @ctxt: a document saving context
+ * @escape: the escaping function
+ *
+ * Set a custom escaping function to be used for text in element content
+ *
+ * Returns 0 if successful or -1 in case of error.
+ */
+int
+xmlSaveSetEscape(xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape)
+{
+ if (ctxt == NULL) return(-1);
+ ctxt->escape = escape;
+ return(0);
+}
+
+/**
+ * xmlSaveSetAttrEscape:
+ * @ctxt: a document saving context
+ * @escape: the escaping function
+ *
+ * Set a custom escaping function to be used for text in attribute content
+ *
+ * Returns 0 if successful or -1 in case of error.
+ */
+int
+xmlSaveSetAttrEscape(xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape)
+{
+ if (ctxt == NULL) return(-1);
+ ctxt->escapeAttr = escape;
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Public entry points based on buffers *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlBufAttrSerializeTxtContent:
+ * @buf: and xmlBufPtr output
+ * @doc: the document
+ * @attr: the attribute node
+ * @string: the text content
+ *
+ * Serialize text attribute values to an xmlBufPtr
+ */
+void
+xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
+ xmlAttrPtr attr, const xmlChar * string)
+{
+ xmlChar *base, *cur;
+
+ if (string == NULL)
+ return;
+ base = cur = (xmlChar *) string;
+ while (*cur != 0) {
+ if (*cur == '\n') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&#10;", 5);
+ cur++;
+ base = cur;
+ } else if (*cur == '\r') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&#13;", 5);
+ cur++;
+ base = cur;
+ } else if (*cur == '\t') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&#9;", 4);
+ cur++;
+ base = cur;
+ } else if (*cur == '"') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&quot;", 6);
+ cur++;
+ base = cur;
+ } else if (*cur == '<') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&lt;", 4);
+ cur++;
+ base = cur;
+ } else if (*cur == '>') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&gt;", 4);
+ cur++;
+ base = cur;
+ } else if (*cur == '&') {
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ xmlBufAdd(buf, BAD_CAST "&amp;", 5);
+ cur++;
+ base = cur;
+ } else if ((*cur >= 0x80) && ((doc == NULL) ||
+ (doc->encoding == NULL))) {
+ /*
+ * We assume we have UTF-8 content.
+ */
+ unsigned char tmp[12];
+ int val = 0, l = 1;
+
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+ if (*cur < 0xC0) {
+ xmlSaveErr(XML_SAVE_NOT_UTF8, (xmlNodePtr) attr, NULL);
+ if (doc != NULL)
+ doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+ xmlSerializeHexCharRef(tmp, *cur);
+ xmlBufAdd(buf, (xmlChar *) tmp, -1);
+ cur++;
+ base = cur;
+ continue;
+ } else if (*cur < 0xE0) {
+ val = (cur[0]) & 0x1F;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ l = 2;
+ } else if (*cur < 0xF0) {
+ val = (cur[0]) & 0x0F;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ val <<= 6;
+ val |= (cur[2]) & 0x3F;
+ l = 3;
+ } else if (*cur < 0xF8) {
+ val = (cur[0]) & 0x07;
+ val <<= 6;
+ val |= (cur[1]) & 0x3F;
+ val <<= 6;
+ val |= (cur[2]) & 0x3F;
+ val <<= 6;
+ val |= (cur[3]) & 0x3F;
+ l = 4;
+ }
+ if ((l == 1) || (!IS_CHAR(val))) {
+ xmlSaveErr(XML_SAVE_CHAR_INVALID, (xmlNodePtr) attr, NULL);
+ if (doc != NULL)
+ doc->encoding = xmlStrdup(BAD_CAST "ISO-8859-1");
+
+ xmlSerializeHexCharRef(tmp, *cur);
+ xmlBufAdd(buf, (xmlChar *) tmp, -1);
+ cur++;
+ base = cur;
+ continue;
+ }
+ /*
+ * We could do multiple things here. Just save
+ * as a char ref
+ */
+ xmlSerializeHexCharRef(tmp, val);
+ xmlBufAdd(buf, (xmlChar *) tmp, -1);
+ cur += l;
+ base = cur;
+ } else {
+ cur++;
+ }
+ }
+ if (base != cur)
+ xmlBufAdd(buf, base, cur - base);
+}
+
+/**
+ * xmlAttrSerializeTxtContent:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @attr: the attribute node
+ * @string: the text content
+ *
+ * Serialize text attribute values to an xml simple buffer
+ */
+void
+xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
+ xmlAttrPtr attr, const xmlChar * string)
+{
+ xmlBufPtr buffer;
+
+ if ((buf == NULL) || (string == NULL))
+ return;
+ buffer = xmlBufFromBuffer(buf);
+ if (buffer == NULL)
+ return;
+ xmlBufAttrSerializeTxtContent(buffer, doc, attr, string);
+ xmlBufBackToBuffer(buffer);
+}
+
+/**
+ * xmlNodeDump:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @cur: the current node
+ * @level: the imbrication level for indenting
+ * @format: is formatting allowed
+ *
+ * Dump an XML node, recursive behaviour,children are printed too.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ * Since this is using xmlBuffer structures it is limited to 2GB and somehow
+ * deprecated, use xmlBufNodeDump() instead.
+ *
+ * Returns the number of bytes written to the buffer or -1 in case of error
+ */
+int
+xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
+ int format)
+{
+ xmlBufPtr buffer;
+ int ret;
+
+ if ((buf == NULL) || (cur == NULL))
+ return(-1);
+ buffer = xmlBufFromBuffer(buf);
+ if (buffer == NULL)
+ return(-1);
+ ret = xmlBufNodeDump(buffer, doc, cur, level, format);
+ xmlBufBackToBuffer(buffer);
+ if (ret > INT_MAX)
+ return(-1);
+ return((int) ret);
+}
+
+/**
+ * xmlBufNodeDump:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @cur: the current node
+ * @level: the imbrication level for indenting
+ * @format: is formatting allowed
+ *
+ * Dump an XML node, recursive behaviour,children are printed too.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ *
+ * Returns the number of bytes written to the buffer, in case of error 0
+ * is returned or @buf stores the error
+ */
+
+size_t
+xmlBufNodeDump(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level,
+ int format)
+{
+ size_t use;
+ int ret;
+ xmlOutputBufferPtr outbuf;
+ int oldalloc;
+
+ xmlInitParser();
+
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeDump : node == NULL\n");
+#endif
+ return (-1);
+ }
+ if (buf == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlNodeDump : buf == NULL\n");
+#endif
+ return (-1);
+ }
+ outbuf = (xmlOutputBufferPtr) xmlMalloc(sizeof(xmlOutputBuffer));
+ if (outbuf == NULL) {
+ xmlSaveErrMemory("creating buffer");
+ return (-1);
+ }
+ memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
+ outbuf->buffer = buf;
+ outbuf->encoder = NULL;
+ outbuf->writecallback = NULL;
+ outbuf->closecallback = NULL;
+ outbuf->context = NULL;
+ outbuf->written = 0;
+
+ use = xmlBufUse(buf);
+ oldalloc = xmlBufGetAllocationScheme(buf);
+ xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_DOUBLEIT);
+ xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL);
+ xmlBufSetAllocationScheme(buf, oldalloc);
+ xmlFree(outbuf);
+ ret = xmlBufUse(buf) - use;
+ return (ret);
+}
+
+/**
+ * xmlElemDump:
+ * @f: the FILE * for the output
+ * @doc: the document
+ * @cur: the current node
+ *
+ * Dump an XML/HTML node, recursive behaviour, children are printed too.
+ */
+void
+xmlElemDump(FILE * f, xmlDocPtr doc, xmlNodePtr cur)
+{
+ xmlOutputBufferPtr outbuf;
+
+ xmlInitParser();
+
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlElemDump : cur == NULL\n");
+#endif
+ return;
+ }
+#ifdef DEBUG_TREE
+ if (doc == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlElemDump : doc == NULL\n");
+ }
+#endif
+
+ outbuf = xmlOutputBufferCreateFile(f, NULL);
+ if (outbuf == NULL)
+ return;
+ if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
+#ifdef LIBXML_HTML_ENABLED
+ htmlNodeDumpOutput(outbuf, doc, cur, NULL);
+#else
+ xmlSaveErr(XML_ERR_INTERNAL_ERROR, cur, "HTML support not compiled in\n");
+#endif /* LIBXML_HTML_ENABLED */
+ } else
+ xmlNodeDumpOutput(outbuf, doc, cur, 0, 1, NULL);
+ xmlOutputBufferClose(outbuf);
+}
+
+/************************************************************************
+ * *
+ * Saving functions front-ends *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlNodeDumpOutput:
+ * @buf: the XML buffer output
+ * @doc: the document
+ * @cur: the current node
+ * @level: the imbrication level for indenting
+ * @format: is formatting allowed
+ * @encoding: an optional encoding string
+ *
+ * Dump an XML node, recursive behaviour, children are printed too.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+void
+xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
+ int level, int format, const char *encoding)
+{
+ xmlSaveCtxt ctxt;
+#ifdef LIBXML_HTML_ENABLED
+ xmlDtdPtr dtd;
+ int is_xhtml = 0;
+#endif
+
+ xmlInitParser();
+
+ if ((buf == NULL) || (cur == NULL)) return;
+
+ if (encoding == NULL)
+ encoding = "UTF-8";
+
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = doc;
+ ctxt.buf = buf;
+ ctxt.level = level;
+ ctxt.format = format ? 1 : 0;
+ ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+
+#ifdef LIBXML_HTML_ENABLED
+ dtd = xmlGetIntSubset(doc);
+ if (dtd != NULL) {
+ is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
+ if (is_xhtml < 0)
+ is_xhtml = 0;
+ }
+
+ if (is_xhtml)
+ xhtmlNodeDumpOutput(&ctxt, cur);
+ else
+#endif
+ xmlNodeDumpOutputInternal(&ctxt, cur);
+}
+
+/**
+ * xmlDocDumpFormatMemoryEnc:
+ * @out_doc: Document to generate XML text from
+ * @doc_txt_ptr: Memory pointer for allocated XML text
+ * @doc_txt_len: Length of the generated XML text
+ * @txt_encoding: Character encoding to use when generating XML text
+ * @format: should formatting spaces been added
+ *
+ * Dump the current DOM tree into memory using the character encoding specified
+ * by the caller. Note it is up to the caller of this function to free the
+ * allocated memory with xmlFree().
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+
+void
+xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
+ int * doc_txt_len, const char * txt_encoding,
+ int format) {
+ xmlSaveCtxt ctxt;
+ int dummy = 0;
+ xmlOutputBufferPtr out_buff = NULL;
+ xmlCharEncodingHandlerPtr conv_hdlr = NULL;
+
+ if (doc_txt_len == NULL) {
+ doc_txt_len = &dummy; /* Continue, caller just won't get length */
+ }
+
+ if (doc_txt_ptr == NULL) {
+ *doc_txt_len = 0;
+ return;
+ }
+
+ *doc_txt_ptr = NULL;
+ *doc_txt_len = 0;
+
+ if (out_doc == NULL) {
+ /* No document, no output */
+ return;
+ }
+
+ /*
+ * Validate the encoding value, if provided.
+ * This logic is copied from xmlSaveFileEnc.
+ */
+
+ if (txt_encoding == NULL)
+ txt_encoding = (const char *) out_doc->encoding;
+ if (txt_encoding != NULL) {
+ conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
+ if ( conv_hdlr == NULL ) {
+ xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, (xmlNodePtr) out_doc,
+ txt_encoding);
+ return;
+ }
+ }
+
+ if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) == NULL ) {
+ xmlSaveErrMemory("creating buffer");
+ return;
+ }
+
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = out_doc;
+ ctxt.buf = out_buff;
+ ctxt.level = 0;
+ ctxt.format = format ? 1 : 0;
+ ctxt.encoding = (const xmlChar *) txt_encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+ xmlDocContentDumpOutput(&ctxt, out_doc);
+ xmlOutputBufferFlush(out_buff);
+ if (out_buff->conv != NULL) {
+ *doc_txt_len = xmlBufUse(out_buff->conv);
+ *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->conv), *doc_txt_len);
+ } else {
+ *doc_txt_len = xmlBufUse(out_buff->buffer);
+ *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->buffer),*doc_txt_len);
+ }
+ (void)xmlOutputBufferClose(out_buff);
+
+ if ((*doc_txt_ptr == NULL) && (*doc_txt_len > 0)) {
+ *doc_txt_len = 0;
+ xmlSaveErrMemory("creating output");
+ }
+
+ return;
+}
+
+/**
+ * xmlDocDumpMemory:
+ * @cur: the document
+ * @mem: OUT: the memory pointer
+ * @size: OUT: the memory length
+ *
+ * Dump an XML document in memory and return the #xmlChar * and it's size
+ * in bytes. It's up to the caller to free the memory with xmlFree().
+ * The resulting byte array is zero terminated, though the last 0 is not
+ * included in the returned size.
+ */
+void
+xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
+ xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, 0);
+}
+
+/**
+ * xmlDocDumpFormatMemory:
+ * @cur: the document
+ * @mem: OUT: the memory pointer
+ * @size: OUT: the memory length
+ * @format: should formatting spaces been added
+ *
+ *
+ * Dump an XML document in memory and return the #xmlChar * and it's size.
+ * It's up to the caller to free the memory with xmlFree().
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+void
+xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
+ xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, format);
+}
+
+/**
+ * xmlDocDumpMemoryEnc:
+ * @out_doc: Document to generate XML text from
+ * @doc_txt_ptr: Memory pointer for allocated XML text
+ * @doc_txt_len: Length of the generated XML text
+ * @txt_encoding: Character encoding to use when generating XML text
+ *
+ * Dump the current DOM tree into memory using the character encoding specified
+ * by the caller. Note it is up to the caller of this function to free the
+ * allocated memory with xmlFree().
+ */
+
+void
+xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
+ int * doc_txt_len, const char * txt_encoding) {
+ xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
+ txt_encoding, 0);
+}
+
+/**
+ * xmlDocFormatDump:
+ * @f: the FILE*
+ * @cur: the document
+ * @format: should formatting spaces been added
+ *
+ * Dump an XML document to an open FILE.
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+int
+xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
+ xmlSaveCtxt ctxt;
+ xmlOutputBufferPtr buf;
+ const char * encoding;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ int ret;
+
+ if (cur == NULL) {
+#ifdef DEBUG_TREE
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlDocDump : document == NULL\n");
+#endif
+ return(-1);
+ }
+ encoding = (const char *) cur->encoding;
+
+ if (encoding != NULL) {
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL) {
+ xmlFree((char *) cur->encoding);
+ cur->encoding = NULL;
+ encoding = NULL;
+ }
+ }
+ buf = xmlOutputBufferCreateFile(f, handler);
+ if (buf == NULL) return(-1);
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = cur;
+ ctxt.buf = buf;
+ ctxt.level = 0;
+ ctxt.format = format ? 1 : 0;
+ ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+ xmlDocContentDumpOutput(&ctxt, cur);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * xmlDocDump:
+ * @f: the FILE*
+ * @cur: the document
+ *
+ * Dump an XML document to an open FILE.
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlDocDump(FILE *f, xmlDocPtr cur) {
+ return(xmlDocFormatDump (f, cur, 0));
+}
+
+/**
+ * xmlSaveFileTo:
+ * @buf: an output I/O buffer
+ * @cur: the document
+ * @encoding: the encoding if any assuming the I/O layer handles the trancoding
+ *
+ * Dump an XML document to an I/O buffer.
+ * Warning ! This call xmlOutputBufferClose() on buf which is not available
+ * after this call.
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
+ xmlSaveCtxt ctxt;
+ int ret;
+
+ if (buf == NULL) return(-1);
+ if (cur == NULL) {
+ xmlOutputBufferClose(buf);
+ return(-1);
+ }
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = cur;
+ ctxt.buf = buf;
+ ctxt.level = 0;
+ ctxt.format = 0;
+ ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+ xmlDocContentDumpOutput(&ctxt, cur);
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+/**
+ * xmlSaveFormatFileTo:
+ * @buf: an output I/O buffer
+ * @cur: the document
+ * @encoding: the encoding if any assuming the I/O layer handles the trancoding
+ * @format: should formatting spaces been added
+ *
+ * Dump an XML document to an I/O buffer.
+ * Warning ! This call xmlOutputBufferClose() on buf which is not available
+ * after this call.
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur,
+ const char *encoding, int format)
+{
+ xmlSaveCtxt ctxt;
+ int ret;
+
+ if (buf == NULL) return(-1);
+ if ((cur == NULL) ||
+ ((cur->type != XML_DOCUMENT_NODE) &&
+ (cur->type != XML_HTML_DOCUMENT_NODE))) {
+ xmlOutputBufferClose(buf);
+ return(-1);
+ }
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = cur;
+ ctxt.buf = buf;
+ ctxt.level = 0;
+ ctxt.format = format ? 1 : 0;
+ ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+ xmlDocContentDumpOutput(&ctxt, cur);
+ ret = xmlOutputBufferClose(buf);
+ return (ret);
+}
+
+/**
+ * xmlSaveFormatFileEnc:
+ * @filename: the filename or URL to output
+ * @cur: the document being saved
+ * @encoding: the name of the encoding to use or NULL.
+ * @format: should formatting spaces be added.
+ *
+ * Dump an XML document to a file or an URL.
+ *
+ * Returns the number of bytes written or -1 in case of error.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ */
+int
+xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
+ const char * encoding, int format ) {
+ xmlSaveCtxt ctxt;
+ xmlOutputBufferPtr buf;
+ xmlCharEncodingHandlerPtr handler = NULL;
+ int ret;
+
+ if (cur == NULL)
+ return(-1);
+
+ if (encoding == NULL)
+ encoding = (const char *) cur->encoding;
+
+ if (encoding != NULL) {
+
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL)
+ return(-1);
+ }
+
+#ifdef HAVE_ZLIB_H
+ if (cur->compression < 0) cur->compression = xmlGetCompressMode();
+#endif
+ /*
+ * save the content to a temp buffer.
+ */
+ buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
+ if (buf == NULL) return(-1);
+ memset(&ctxt, 0, sizeof(ctxt));
+ ctxt.doc = cur;
+ ctxt.buf = buf;
+ ctxt.level = 0;
+ ctxt.format = format ? 1 : 0;
+ ctxt.encoding = (const xmlChar *) encoding;
+ xmlSaveCtxtInit(&ctxt);
+ ctxt.options |= XML_SAVE_AS_XML;
+
+ xmlDocContentDumpOutput(&ctxt, cur);
+
+ ret = xmlOutputBufferClose(buf);
+ return(ret);
+}
+
+
+/**
+ * xmlSaveFileEnc:
+ * @filename: the filename (or URL)
+ * @cur: the document
+ * @encoding: the name of an encoding (or NULL)
+ *
+ * Dump an XML document, converting it to the given encoding
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
+ return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) );
+}
+
+/**
+ * xmlSaveFormatFile:
+ * @filename: the filename (or URL)
+ * @cur: the document
+ * @format: should formatting spaces been added
+ *
+ * Dump an XML document to a file. Will use compression if
+ * compiled in and enabled. If @filename is "-" the stdout file is
+ * used. If @format is set then the document will be indented on output.
+ * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
+ * or xmlKeepBlanksDefault(0) was called
+ *
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
+ return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) );
+}
+
+/**
+ * xmlSaveFile:
+ * @filename: the filename (or URL)
+ * @cur: the document
+ *
+ * Dump an XML document to a file. Will use compression if
+ * compiled in and enabled. If @filename is "-" the stdout file is
+ * used.
+ * returns: the number of bytes written or -1 in case of failure.
+ */
+int
+xmlSaveFile(const char *filename, xmlDocPtr cur) {
+ return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
+}
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#define bottom_xmlsave
+#include "elfgcchack.h"
diff --git a/xmlschemas.c b/xmlschemas.c
new file mode 100644
index 0000000..0657b66
--- /dev/null
+++ b/xmlschemas.c
@@ -0,0 +1,28907 @@
+/*
+ * schemas.c : implementation of the XML Schema handling and
+ * schema validity checking
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+/*
+ * TODO:
+ * - when types are redefined in includes, check that all
+ * types in the redef list are equal
+ * -> need a type equality operation.
+ * - if we don't intend to use the schema for schemas, we
+ * need to validate all schema attributes (ref, type, name)
+ * against their types.
+ * - Eliminate item creation for: ??
+ *
+ * URGENT TODO:
+ * - For xsi-driven schema acquisition, augment the IDCs after every
+ * acquisition episode (xmlSchemaAugmentIDC).
+ *
+ * NOTES:
+ * - Elimated item creation for: <restriction>, <extension>,
+ * <simpleContent>, <complexContent>, <list>, <union>
+ *
+ * PROBLEMS:
+ * - http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0337.html
+ * IDC XPath expression and chameleon includes: the targetNamespace is changed, so
+ * XPath will have trouble to resolve to this namespace, since not known.
+ *
+ *
+ * CONSTRAINTS:
+ *
+ * Schema Component Constraint:
+ * All Group Limited (cos-all-limited)
+ * Status: complete
+ * (1.2)
+ * In xmlSchemaGroupDefReferenceTermFixup() and
+ * (2)
+ * In xmlSchemaParseModelGroup()
+ * TODO: Actually this should go to component-level checks,
+ * but is done here due to performance. Move it to an other layer
+ * is schema construction via an API is implemented.
+ */
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/hash.h>
+#include <libxml/uri.h>
+#include <libxml/xmlschemas.h>
+#include <libxml/schemasInternals.h>
+#include <libxml/xmlschemastypes.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlregexp.h>
+#include <libxml/dict.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_PATTERN_ENABLED
+#include <libxml/pattern.h>
+#endif
+#ifdef LIBXML_READER_ENABLED
+#include <libxml/xmlreader.h>
+#endif
+
+/* #define DEBUG 1 */
+
+/* #define DEBUG_CONTENT 1 */
+
+/* #define DEBUG_TYPE 1 */
+
+/* #define DEBUG_CONTENT_REGEXP 1 */
+
+/* #define DEBUG_AUTOMATA 1 */
+
+/* #define DEBUG_IDC */
+
+/* #define DEBUG_IDC_NODE_TABLE */
+
+/* #define WXS_ELEM_DECL_CONS_ENABLED */
+
+#ifdef DEBUG_IDC
+ #ifndef DEBUG_IDC_NODE_TABLE
+ #define DEBUG_IDC_NODE_TABLE
+ #endif
+#endif
+
+/* #define ENABLE_PARTICLE_RESTRICTION 1 */
+
+#define ENABLE_REDEFINE
+
+/* #define ENABLE_NAMED_LOCALS */
+
+/* #define ENABLE_IDC_NODE_TABLES_TEST */
+
+#define DUMP_CONTENT_MODEL
+
+#ifdef LIBXML_READER_ENABLED
+/* #define XML_SCHEMA_READER_ENABLED */
+#endif
+
+#define UNBOUNDED (1 << 30)
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#define XML_SCHEMAS_NO_NAMESPACE (const xmlChar *) "##"
+
+/*
+ * The XML Schemas namespaces
+ */
+static const xmlChar *xmlSchemaNs = (const xmlChar *)
+ "http://www.w3.org/2001/XMLSchema";
+
+static const xmlChar *xmlSchemaInstanceNs = (const xmlChar *)
+ "http://www.w3.org/2001/XMLSchema-instance";
+
+static const xmlChar *xmlNamespaceNs = (const xmlChar *)
+ "http://www.w3.org/2000/xmlns/";
+
+/*
+* Come casting macros.
+*/
+#define ACTXT_CAST (xmlSchemaAbstractCtxtPtr)
+#define PCTXT_CAST (xmlSchemaParserCtxtPtr)
+#define VCTXT_CAST (xmlSchemaValidCtxtPtr)
+#define WXS_BASIC_CAST (xmlSchemaBasicItemPtr)
+#define WXS_TREE_CAST (xmlSchemaTreeItemPtr)
+#define WXS_PTC_CAST (xmlSchemaParticlePtr)
+#define WXS_TYPE_CAST (xmlSchemaTypePtr)
+#define WXS_ELEM_CAST (xmlSchemaElementPtr)
+#define WXS_ATTR_GROUP_CAST (xmlSchemaAttributeGroupPtr)
+#define WXS_ATTR_CAST (xmlSchemaAttributePtr)
+#define WXS_ATTR_USE_CAST (xmlSchemaAttributeUsePtr)
+#define WXS_ATTR_PROHIB_CAST (xmlSchemaAttributeUseProhibPtr)
+#define WXS_MODEL_GROUPDEF_CAST (xmlSchemaModelGroupDefPtr)
+#define WXS_MODEL_GROUP_CAST (xmlSchemaModelGroupPtr)
+#define WXS_IDC_CAST (xmlSchemaIDCPtr)
+#define WXS_QNAME_CAST (xmlSchemaQNameRefPtr)
+#define WXS_LIST_CAST (xmlSchemaItemListPtr)
+
+/*
+* Macros to query common properties of components.
+*/
+#define WXS_ITEM_NODE(i) xmlSchemaGetComponentNode(WXS_BASIC_CAST (i))
+
+#define WXS_ITEM_TYPE_NAME(i) xmlSchemaGetComponentTypeStr(WXS_BASIC_CAST (i))
+/*
+* Macros for element declarations.
+*/
+#define WXS_ELEM_TYPEDEF(e) (e)->subtypes
+
+#define WXS_SUBST_HEAD(item) (item)->refDecl
+/*
+* Macros for attribute declarations.
+*/
+#define WXS_ATTR_TYPEDEF(a) (a)->subtypes
+/*
+* Macros for attribute uses.
+*/
+#define WXS_ATTRUSE_DECL(au) WXS_ATTR_CAST (WXS_ATTR_USE_CAST (au))->attrDecl
+
+#define WXS_ATTRUSE_TYPEDEF(au) WXS_ATTR_TYPEDEF(WXS_ATTRUSE_DECL( WXS_ATTR_USE_CAST au))
+
+#define WXS_ATTRUSE_DECL_NAME(au) (WXS_ATTRUSE_DECL(au))->name
+
+#define WXS_ATTRUSE_DECL_TNS(au) (WXS_ATTRUSE_DECL(au))->targetNamespace
+/*
+* Macros for attribute groups.
+*/
+#define WXS_ATTR_GROUP_HAS_REFS(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS)
+#define WXS_ATTR_GROUP_EXPANDED(ag) ((WXS_ATTR_GROUP_CAST (ag))->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED)
+/*
+* Macros for particles.
+*/
+#define WXS_PARTICLE(p) WXS_PTC_CAST (p)
+
+#define WXS_PARTICLE_TERM(p) (WXS_PARTICLE(p))->children
+
+#define WXS_PARTICLE_TERM_AS_ELEM(p) (WXS_ELEM_CAST WXS_PARTICLE_TERM(p))
+
+#define WXS_PARTICLE_MODEL(p) WXS_MODEL_GROUP_CAST WXS_PARTICLE(p)->children
+/*
+* Macros for model groups definitions.
+*/
+#define WXS_MODELGROUPDEF_MODEL(mgd) (WXS_MODEL_GROUP_CAST (mgd))->children
+/*
+* Macros for model groups.
+*/
+#define WXS_IS_MODEL_GROUP(i) \
+ (((i)->type == XML_SCHEMA_TYPE_SEQUENCE) || \
+ ((i)->type == XML_SCHEMA_TYPE_CHOICE) || \
+ ((i)->type == XML_SCHEMA_TYPE_ALL))
+
+#define WXS_MODELGROUP_PARTICLE(mg) WXS_PTC_CAST (mg)->children
+/*
+* Macros for schema buckets.
+*/
+#define WXS_IS_BUCKET_INCREDEF(t) (((t) == XML_SCHEMA_SCHEMA_INCLUDE) || \
+ ((t) == XML_SCHEMA_SCHEMA_REDEFINE))
+
+#define WXS_IS_BUCKET_IMPMAIN(t) (((t) == XML_SCHEMA_SCHEMA_MAIN) || \
+ ((t) == XML_SCHEMA_SCHEMA_IMPORT))
+
+#define WXS_IMPBUCKET(b) ((xmlSchemaImportPtr) (b))
+
+#define WXS_INCBUCKET(b) ((xmlSchemaIncludePtr) (b))
+/*
+* Macros for complex/simple types.
+*/
+#define WXS_IS_ANYTYPE(i) \
+ (( (i)->type == XML_SCHEMA_TYPE_BASIC) && \
+ ( (WXS_TYPE_CAST (i))->builtInType == XML_SCHEMAS_ANYTYPE))
+
+#define WXS_IS_COMPLEX(i) \
+ (((i)->type == XML_SCHEMA_TYPE_COMPLEX) || \
+ ((i)->builtInType == XML_SCHEMAS_ANYTYPE))
+
+#define WXS_IS_SIMPLE(item) \
+ ((item->type == XML_SCHEMA_TYPE_SIMPLE) || \
+ ((item->type == XML_SCHEMA_TYPE_BASIC) && \
+ (item->builtInType != XML_SCHEMAS_ANYTYPE)))
+
+#define WXS_IS_ANY_SIMPLE_TYPE(i) \
+ (((i)->type == XML_SCHEMA_TYPE_BASIC) && \
+ ((i)->builtInType == XML_SCHEMAS_ANYSIMPLETYPE))
+
+#define WXS_IS_RESTRICTION(t) \
+ ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION)
+
+#define WXS_IS_EXTENSION(t) \
+ ((t)->flags & XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION)
+
+#define WXS_IS_TYPE_NOT_FIXED(i) \
+ (((i)->type != XML_SCHEMA_TYPE_BASIC) && \
+ (((i)->flags & XML_SCHEMAS_TYPE_INTERNAL_RESOLVED) == 0))
+
+#define WXS_IS_TYPE_NOT_FIXED_1(item) \
+ (((item)->type != XML_SCHEMA_TYPE_BASIC) && \
+ (((item)->flags & XML_SCHEMAS_TYPE_FIXUP_1) == 0))
+
+#define WXS_TYPE_IS_GLOBAL(t) ((t)->flags & XML_SCHEMAS_TYPE_GLOBAL)
+
+#define WXS_TYPE_IS_LOCAL(t) (((t)->flags & XML_SCHEMAS_TYPE_GLOBAL) == 0)
+/*
+* Macros for exclusively for complex types.
+*/
+#define WXS_HAS_COMPLEX_CONTENT(item) \
+ ((item->contentType == XML_SCHEMA_CONTENT_MIXED) || \
+ (item->contentType == XML_SCHEMA_CONTENT_EMPTY) || \
+ (item->contentType == XML_SCHEMA_CONTENT_ELEMENTS))
+
+#define WXS_HAS_SIMPLE_CONTENT(item) \
+ ((item->contentType == XML_SCHEMA_CONTENT_SIMPLE) || \
+ (item->contentType == XML_SCHEMA_CONTENT_BASIC))
+
+#define WXS_HAS_MIXED_CONTENT(item) \
+ (item->contentType == XML_SCHEMA_CONTENT_MIXED)
+
+#define WXS_EMPTIABLE(t) \
+ (xmlSchemaIsParticleEmptiable(WXS_PTC_CAST (t)->subtypes))
+
+#define WXS_TYPE_CONTENTTYPE(t) (t)->subtypes
+
+#define WXS_TYPE_PARTICLE(t) WXS_PTC_CAST (t)->subtypes
+
+#define WXS_TYPE_PARTICLE_TERM(t) WXS_PARTICLE_TERM(WXS_TYPE_PARTICLE(t))
+/*
+* Macros for exclusively for simple types.
+*/
+#define WXS_LIST_ITEMTYPE(t) (t)->subtypes
+
+#define WXS_IS_ATOMIC(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_ATOMIC)
+
+#define WXS_IS_LIST(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_LIST)
+
+#define WXS_IS_UNION(t) (t->flags & XML_SCHEMAS_TYPE_VARIETY_UNION)
+/*
+* Misc parser context macros.
+*/
+#define WXS_CONSTRUCTOR(ctx) (ctx)->constructor
+
+#define WXS_HAS_BUCKETS(ctx) \
+( (WXS_CONSTRUCTOR((ctx))->buckets != NULL) && \
+(WXS_CONSTRUCTOR((ctx))->buckets->nbItems > 0) )
+
+#define WXS_SUBST_GROUPS(ctx) WXS_CONSTRUCTOR((ctx))->substGroups
+
+#define WXS_BUCKET(ctx) WXS_CONSTRUCTOR((ctx))->bucket
+
+#define WXS_SCHEMA(ctx) (ctx)->schema
+
+#define WXS_ADD_LOCAL(ctx, item) \
+ xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->locals), 10, item)
+
+#define WXS_ADD_GLOBAL(ctx, item) \
+ xmlSchemaAddItemSize(&(WXS_BUCKET(ctx)->globals), 5, item)
+
+#define WXS_ADD_PENDING(ctx, item) \
+ xmlSchemaAddItemSize(&((ctx)->constructor->pending), 10, item)
+/*
+* xmlSchemaItemList macros.
+*/
+#define WXS_ILIST_IS_EMPTY(l) ((l == NULL) || ((l)->nbItems == 0))
+/*
+* Misc macros.
+*/
+#define IS_SCHEMA(node, type) \
+ ((node != NULL) && (node->ns != NULL) && \
+ (xmlStrEqual(node->name, (const xmlChar *) type)) && \
+ (xmlStrEqual(node->ns->href, xmlSchemaNs)))
+
+#define FREE_AND_NULL(str) if ((str) != NULL) { xmlFree((xmlChar *) (str)); str = NULL; }
+
+/*
+* Since we put the default/fixed values into the dict, we can
+* use pointer comparison for those values.
+* REMOVED: (xmlStrEqual((v1), (v2)))
+*/
+#define WXS_ARE_DEFAULT_STR_EQUAL(v1, v2) ((v1) == (v2))
+
+#define INODE_NILLED(item) (item->flags & XML_SCHEMA_ELEM_INFO_NILLED)
+
+#define CAN_PARSE_SCHEMA(b) (((b)->doc != NULL) && ((b)->parsed == 0))
+
+#define HFAILURE if (res == -1) goto exit_failure;
+
+#define HERROR if (res != 0) goto exit_error;
+
+#define HSTOP(ctx) if ((ctx)->stop) goto exit;
+/*
+* Some flags used for various schema constraints.
+*/
+#define SUBSET_RESTRICTION 1<<0
+#define SUBSET_EXTENSION 1<<1
+#define SUBSET_SUBSTITUTION 1<<2
+#define SUBSET_LIST 1<<3
+#define SUBSET_UNION 1<<4
+
+typedef struct _xmlSchemaNodeInfo xmlSchemaNodeInfo;
+typedef xmlSchemaNodeInfo *xmlSchemaNodeInfoPtr;
+
+typedef struct _xmlSchemaItemList xmlSchemaItemList;
+typedef xmlSchemaItemList *xmlSchemaItemListPtr;
+struct _xmlSchemaItemList {
+ void **items; /* used for dynamic addition of schemata */
+ int nbItems; /* used for dynamic addition of schemata */
+ int sizeItems; /* used for dynamic addition of schemata */
+};
+
+#define XML_SCHEMA_CTXT_PARSER 1
+#define XML_SCHEMA_CTXT_VALIDATOR 2
+
+typedef struct _xmlSchemaAbstractCtxt xmlSchemaAbstractCtxt;
+typedef xmlSchemaAbstractCtxt *xmlSchemaAbstractCtxtPtr;
+struct _xmlSchemaAbstractCtxt {
+ int type; /* E.g. XML_SCHEMA_CTXT_VALIDATOR */
+};
+
+typedef struct _xmlSchemaBucket xmlSchemaBucket;
+typedef xmlSchemaBucket *xmlSchemaBucketPtr;
+
+#define XML_SCHEMA_SCHEMA_MAIN 0
+#define XML_SCHEMA_SCHEMA_IMPORT 1
+#define XML_SCHEMA_SCHEMA_INCLUDE 2
+#define XML_SCHEMA_SCHEMA_REDEFINE 3
+
+/**
+ * xmlSchemaSchemaRelation:
+ *
+ * Used to create a graph of schema relationships.
+ */
+typedef struct _xmlSchemaSchemaRelation xmlSchemaSchemaRelation;
+typedef xmlSchemaSchemaRelation *xmlSchemaSchemaRelationPtr;
+struct _xmlSchemaSchemaRelation {
+ xmlSchemaSchemaRelationPtr next;
+ int type; /* E.g. XML_SCHEMA_SCHEMA_IMPORT */
+ const xmlChar *importNamespace;
+ xmlSchemaBucketPtr bucket;
+};
+
+#define XML_SCHEMA_BUCKET_MARKED 1<<0
+#define XML_SCHEMA_BUCKET_COMPS_ADDED 1<<1
+
+struct _xmlSchemaBucket {
+ int type;
+ int flags;
+ const xmlChar *schemaLocation;
+ const xmlChar *origTargetNamespace;
+ const xmlChar *targetNamespace;
+ xmlDocPtr doc;
+ xmlSchemaSchemaRelationPtr relations;
+ int located;
+ int parsed;
+ int imported;
+ int preserveDoc;
+ xmlSchemaItemListPtr globals; /* Global components. */
+ xmlSchemaItemListPtr locals; /* Local components. */
+};
+
+/**
+ * xmlSchemaImport:
+ * (extends xmlSchemaBucket)
+ *
+ * Reflects a schema. Holds some information
+ * about the schema and its toplevel components. Duplicate
+ * toplevel components are not checked at this level.
+ */
+typedef struct _xmlSchemaImport xmlSchemaImport;
+typedef xmlSchemaImport *xmlSchemaImportPtr;
+struct _xmlSchemaImport {
+ int type; /* Main OR import OR include. */
+ int flags;
+ const xmlChar *schemaLocation; /* The URI of the schema document. */
+ /* For chameleon includes, @origTargetNamespace will be NULL */
+ const xmlChar *origTargetNamespace;
+ /*
+ * For chameleon includes, @targetNamespace will be the
+ * targetNamespace of the including schema.
+ */
+ const xmlChar *targetNamespace;
+ xmlDocPtr doc; /* The schema node-tree. */
+ /* @relations will hold any included/imported/redefined schemas. */
+ xmlSchemaSchemaRelationPtr relations;
+ int located;
+ int parsed;
+ int imported;
+ int preserveDoc;
+ xmlSchemaItemListPtr globals;
+ xmlSchemaItemListPtr locals;
+ /* The imported schema. */
+ xmlSchemaPtr schema;
+};
+
+/*
+* (extends xmlSchemaBucket)
+*/
+typedef struct _xmlSchemaInclude xmlSchemaInclude;
+typedef xmlSchemaInclude *xmlSchemaIncludePtr;
+struct _xmlSchemaInclude {
+ int type;
+ int flags;
+ const xmlChar *schemaLocation;
+ const xmlChar *origTargetNamespace;
+ const xmlChar *targetNamespace;
+ xmlDocPtr doc;
+ xmlSchemaSchemaRelationPtr relations;
+ int located;
+ int parsed;
+ int imported;
+ int preserveDoc;
+ xmlSchemaItemListPtr globals; /* Global components. */
+ xmlSchemaItemListPtr locals; /* Local components. */
+
+ /* The owning main or import schema bucket. */
+ xmlSchemaImportPtr ownerImport;
+};
+
+/**
+ * xmlSchemaBasicItem:
+ *
+ * The abstract base type for schema components.
+ */
+typedef struct _xmlSchemaBasicItem xmlSchemaBasicItem;
+typedef xmlSchemaBasicItem *xmlSchemaBasicItemPtr;
+struct _xmlSchemaBasicItem {
+ xmlSchemaTypeType type;
+};
+
+/**
+ * xmlSchemaAnnotItem:
+ *
+ * The abstract base type for annotated schema components.
+ * (Extends xmlSchemaBasicItem)
+ */
+typedef struct _xmlSchemaAnnotItem xmlSchemaAnnotItem;
+typedef xmlSchemaAnnotItem *xmlSchemaAnnotItemPtr;
+struct _xmlSchemaAnnotItem {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+};
+
+/**
+ * xmlSchemaTreeItem:
+ *
+ * The abstract base type for tree-like structured schema components.
+ * (Extends xmlSchemaAnnotItem)
+ */
+typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem;
+typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr;
+struct _xmlSchemaTreeItem {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next;
+ xmlSchemaTreeItemPtr children;
+};
+
+
+#define XML_SCHEMA_ATTR_USE_FIXED 1<<0
+/**
+ * xmlSchemaAttributeUsePtr:
+ *
+ * The abstract base type for tree-like structured schema components.
+ * (Extends xmlSchemaTreeItem)
+ */
+typedef struct _xmlSchemaAttributeUse xmlSchemaAttributeUse;
+typedef xmlSchemaAttributeUse *xmlSchemaAttributeUsePtr;
+struct _xmlSchemaAttributeUse {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaAttributeUsePtr next; /* The next attr. use. */
+ /*
+ * The attr. decl. OR a QName-ref. to an attr. decl. OR
+ * a QName-ref. to an attribute group definition.
+ */
+ xmlSchemaAttributePtr attrDecl;
+
+ int flags;
+ xmlNodePtr node;
+ int occurs; /* required, optional */
+ const xmlChar * defValue;
+ xmlSchemaValPtr defVal;
+};
+
+/**
+ * xmlSchemaAttributeUseProhibPtr:
+ *
+ * A helper component to reflect attribute prohibitions.
+ * (Extends xmlSchemaBasicItem)
+ */
+typedef struct _xmlSchemaAttributeUseProhib xmlSchemaAttributeUseProhib;
+typedef xmlSchemaAttributeUseProhib *xmlSchemaAttributeUseProhibPtr;
+struct _xmlSchemaAttributeUseProhib {
+ xmlSchemaTypeType type; /* == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB */
+ xmlNodePtr node;
+ const xmlChar *name;
+ const xmlChar *targetNamespace;
+ int isRef;
+};
+
+/**
+ * xmlSchemaRedef:
+ */
+typedef struct _xmlSchemaRedef xmlSchemaRedef;
+typedef xmlSchemaRedef *xmlSchemaRedefPtr;
+struct _xmlSchemaRedef {
+ xmlSchemaRedefPtr next;
+ xmlSchemaBasicItemPtr item; /* The redefining component. */
+ xmlSchemaBasicItemPtr reference; /* The referencing component. */
+ xmlSchemaBasicItemPtr target; /* The to-be-redefined component. */
+ const xmlChar *refName; /* The name of the to-be-redefined component. */
+ const xmlChar *refTargetNs; /* The target namespace of the
+ to-be-redefined comp. */
+ xmlSchemaBucketPtr targetBucket; /* The redefined schema. */
+};
+
+/**
+ * xmlSchemaConstructionCtxt:
+ */
+typedef struct _xmlSchemaConstructionCtxt xmlSchemaConstructionCtxt;
+typedef xmlSchemaConstructionCtxt *xmlSchemaConstructionCtxtPtr;
+struct _xmlSchemaConstructionCtxt {
+ xmlSchemaPtr mainSchema; /* The main schema. */
+ xmlSchemaBucketPtr mainBucket; /* The main schema bucket */
+ xmlDictPtr dict;
+ xmlSchemaItemListPtr buckets; /* List of schema buckets. */
+ /* xmlSchemaItemListPtr relations; */ /* List of schema relations. */
+ xmlSchemaBucketPtr bucket; /* The current schema bucket */
+ xmlSchemaItemListPtr pending; /* All Components of all schemas that
+ need to be fixed. */
+ xmlHashTablePtr substGroups;
+ xmlSchemaRedefPtr redefs;
+ xmlSchemaRedefPtr lastRedef;
+};
+
+#define XML_SCHEMAS_PARSE_ERROR 1
+#define SCHEMAS_PARSE_OPTIONS XML_PARSE_NOENT
+
+struct _xmlSchemaParserCtxt {
+ int type;
+ void *errCtxt; /* user specific error context */
+ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */
+ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */
+ int err;
+ int nberrors;
+ xmlStructuredErrorFunc serror;
+
+ xmlSchemaConstructionCtxtPtr constructor;
+ int ownsConstructor; /* TODO: Move this to parser *flags*. */
+
+ /* xmlSchemaPtr topschema; */
+ /* xmlHashTablePtr namespaces; */
+
+ xmlSchemaPtr schema; /* The main schema in use */
+ int counter;
+
+ const xmlChar *URL;
+ xmlDocPtr doc;
+ int preserve; /* Whether the doc should be freed */
+
+ const char *buffer;
+ int size;
+
+ /*
+ * Used to build complex element content models
+ */
+ xmlAutomataPtr am;
+ xmlAutomataStatePtr start;
+ xmlAutomataStatePtr end;
+ xmlAutomataStatePtr state;
+
+ xmlDictPtr dict; /* dictionnary for interned string names */
+ xmlSchemaTypePtr ctxtType; /* The current context simple/complex type */
+ int options;
+ xmlSchemaValidCtxtPtr vctxt;
+ int isS4S;
+ int isRedefine;
+ int xsiAssemble;
+ int stop; /* If the parser should stop; i.e. a critical error. */
+ const xmlChar *targetNamespace;
+ xmlSchemaBucketPtr redefined; /* The schema to be redefined. */
+
+ xmlSchemaRedefPtr redef; /* Used for redefinitions. */
+ int redefCounter; /* Used for redefinitions. */
+ xmlSchemaItemListPtr attrProhibs;
+};
+
+/**
+ * xmlSchemaQNameRef:
+ *
+ * A component reference item (not a schema component)
+ * (Extends xmlSchemaBasicItem)
+ */
+typedef struct _xmlSchemaQNameRef xmlSchemaQNameRef;
+typedef xmlSchemaQNameRef *xmlSchemaQNameRefPtr;
+struct _xmlSchemaQNameRef {
+ xmlSchemaTypeType type;
+ xmlSchemaBasicItemPtr item; /* The resolved referenced item. */
+ xmlSchemaTypeType itemType;
+ const xmlChar *name;
+ const xmlChar *targetNamespace;
+ xmlNodePtr node;
+};
+
+/**
+ * xmlSchemaParticle:
+ *
+ * A particle component.
+ * (Extends xmlSchemaTreeItem)
+ */
+typedef struct _xmlSchemaParticle xmlSchemaParticle;
+typedef xmlSchemaParticle *xmlSchemaParticlePtr;
+struct _xmlSchemaParticle {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next; /* next particle */
+ xmlSchemaTreeItemPtr children; /* the "term" (e.g. a model group,
+ a group definition, a XML_SCHEMA_EXTRA_QNAMEREF (if a reference),
+ etc.) */
+ int minOccurs;
+ int maxOccurs;
+ xmlNodePtr node;
+};
+
+/**
+ * xmlSchemaModelGroup:
+ *
+ * A model group component.
+ * (Extends xmlSchemaTreeItem)
+ */
+typedef struct _xmlSchemaModelGroup xmlSchemaModelGroup;
+typedef xmlSchemaModelGroup *xmlSchemaModelGroupPtr;
+struct _xmlSchemaModelGroup {
+ xmlSchemaTypeType type; /* XML_SCHEMA_TYPE_SEQUENCE, XML_SCHEMA_TYPE_CHOICE, XML_SCHEMA_TYPE_ALL */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next; /* not used */
+ xmlSchemaTreeItemPtr children; /* first particle (OR "element decl" OR "wildcard") */
+ xmlNodePtr node;
+};
+
+#define XML_SCHEMA_MODEL_GROUP_DEF_MARKED 1<<0
+#define XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED 1<<1
+/**
+ * xmlSchemaModelGroupDef:
+ *
+ * A model group definition component.
+ * (Extends xmlSchemaTreeItem)
+ */
+typedef struct _xmlSchemaModelGroupDef xmlSchemaModelGroupDef;
+typedef xmlSchemaModelGroupDef *xmlSchemaModelGroupDefPtr;
+struct _xmlSchemaModelGroupDef {
+ xmlSchemaTypeType type; /* XML_SCHEMA_TYPE_GROUP */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next; /* not used */
+ xmlSchemaTreeItemPtr children; /* the "model group" */
+ const xmlChar *name;
+ const xmlChar *targetNamespace;
+ xmlNodePtr node;
+ int flags;
+};
+
+typedef struct _xmlSchemaIDC xmlSchemaIDC;
+typedef xmlSchemaIDC *xmlSchemaIDCPtr;
+
+/**
+ * xmlSchemaIDCSelect:
+ *
+ * The identity-constraint "field" and "selector" item, holding the
+ * XPath expression.
+ */
+typedef struct _xmlSchemaIDCSelect xmlSchemaIDCSelect;
+typedef xmlSchemaIDCSelect *xmlSchemaIDCSelectPtr;
+struct _xmlSchemaIDCSelect {
+ xmlSchemaIDCSelectPtr next;
+ xmlSchemaIDCPtr idc;
+ int index; /* an index position if significant for IDC key-sequences */
+ const xmlChar *xpath; /* the XPath expression */
+ void *xpathComp; /* the compiled XPath expression */
+};
+
+/**
+ * xmlSchemaIDC:
+ *
+ * The identity-constraint definition component.
+ * (Extends xmlSchemaAnnotItem)
+ */
+
+struct _xmlSchemaIDC {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaIDCPtr next;
+ xmlNodePtr node;
+ const xmlChar *name;
+ const xmlChar *targetNamespace;
+ xmlSchemaIDCSelectPtr selector;
+ xmlSchemaIDCSelectPtr fields;
+ int nbFields;
+ xmlSchemaQNameRefPtr ref;
+};
+
+/**
+ * xmlSchemaIDCAug:
+ *
+ * The augmented IDC information used for validation.
+ */
+typedef struct _xmlSchemaIDCAug xmlSchemaIDCAug;
+typedef xmlSchemaIDCAug *xmlSchemaIDCAugPtr;
+struct _xmlSchemaIDCAug {
+ xmlSchemaIDCAugPtr next; /* next in a list */
+ xmlSchemaIDCPtr def; /* the IDC definition */
+ int keyrefDepth; /* the lowest tree level to which IDC
+ tables need to be bubbled upwards */
+};
+
+/**
+ * xmlSchemaPSVIIDCKeySequence:
+ *
+ * The key sequence of a node table item.
+ */
+typedef struct _xmlSchemaPSVIIDCKey xmlSchemaPSVIIDCKey;
+typedef xmlSchemaPSVIIDCKey *xmlSchemaPSVIIDCKeyPtr;
+struct _xmlSchemaPSVIIDCKey {
+ xmlSchemaTypePtr type;
+ xmlSchemaValPtr val;
+};
+
+/**
+ * xmlSchemaPSVIIDCNode:
+ *
+ * The node table item of a node table.
+ */
+typedef struct _xmlSchemaPSVIIDCNode xmlSchemaPSVIIDCNode;
+typedef xmlSchemaPSVIIDCNode *xmlSchemaPSVIIDCNodePtr;
+struct _xmlSchemaPSVIIDCNode {
+ xmlNodePtr node;
+ xmlSchemaPSVIIDCKeyPtr *keys;
+ int nodeLine;
+ int nodeQNameID;
+
+};
+
+/**
+ * xmlSchemaPSVIIDCBinding:
+ *
+ * The identity-constraint binding item of the [identity-constraint table].
+ */
+typedef struct _xmlSchemaPSVIIDCBinding xmlSchemaPSVIIDCBinding;
+typedef xmlSchemaPSVIIDCBinding *xmlSchemaPSVIIDCBindingPtr;
+struct _xmlSchemaPSVIIDCBinding {
+ xmlSchemaPSVIIDCBindingPtr next; /* next binding of a specific node */
+ xmlSchemaIDCPtr definition; /* the IDC definition */
+ xmlSchemaPSVIIDCNodePtr *nodeTable; /* array of key-sequences */
+ int nbNodes; /* number of entries in the node table */
+ int sizeNodes; /* size of the node table */
+ xmlSchemaItemListPtr dupls;
+};
+
+
+#define XPATH_STATE_OBJ_TYPE_IDC_SELECTOR 1
+#define XPATH_STATE_OBJ_TYPE_IDC_FIELD 2
+
+#define XPATH_STATE_OBJ_MATCHES -2
+#define XPATH_STATE_OBJ_BLOCKED -3
+
+typedef struct _xmlSchemaIDCMatcher xmlSchemaIDCMatcher;
+typedef xmlSchemaIDCMatcher *xmlSchemaIDCMatcherPtr;
+
+/**
+ * xmlSchemaIDCStateObj:
+ *
+ * The state object used to evaluate XPath expressions.
+ */
+typedef struct _xmlSchemaIDCStateObj xmlSchemaIDCStateObj;
+typedef xmlSchemaIDCStateObj *xmlSchemaIDCStateObjPtr;
+struct _xmlSchemaIDCStateObj {
+ int type;
+ xmlSchemaIDCStateObjPtr next; /* next if in a list */
+ int depth; /* depth of creation */
+ int *history; /* list of (depth, state-id) tuples */
+ int nbHistory;
+ int sizeHistory;
+ xmlSchemaIDCMatcherPtr matcher; /* the correspondent field/selector
+ matcher */
+ xmlSchemaIDCSelectPtr sel;
+ void *xpathCtxt;
+};
+
+#define IDC_MATCHER 0
+
+/**
+ * xmlSchemaIDCMatcher:
+ *
+ * Used to evaluate IDC selectors (and fields).
+ */
+struct _xmlSchemaIDCMatcher {
+ int type;
+ int depth; /* the tree depth at creation time */
+ xmlSchemaIDCMatcherPtr next; /* next in the list */
+ xmlSchemaIDCMatcherPtr nextCached; /* next in the cache list */
+ xmlSchemaIDCAugPtr aidc; /* the augmented IDC item */
+ int idcType;
+ xmlSchemaPSVIIDCKeyPtr **keySeqs; /* the key-sequences of the target
+ elements */
+ int sizeKeySeqs;
+ xmlSchemaItemListPtr targets; /* list of target-node
+ (xmlSchemaPSVIIDCNodePtr) entries */
+};
+
+/*
+* Element info flags.
+*/
+#define XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES 1<<0
+#define XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES 1<<1
+#define XML_SCHEMA_ELEM_INFO_NILLED 1<<2
+#define XML_SCHEMA_ELEM_INFO_LOCAL_TYPE 1<<3
+
+#define XML_SCHEMA_NODE_INFO_VALUE_NEEDED 1<<4
+#define XML_SCHEMA_ELEM_INFO_EMPTY 1<<5
+#define XML_SCHEMA_ELEM_INFO_HAS_CONTENT 1<<6
+
+#define XML_SCHEMA_ELEM_INFO_HAS_ELEM_CONTENT 1<<7
+#define XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT 1<<8
+#define XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED 1<<9
+#define XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE 1<<10
+
+/**
+ * xmlSchemaNodeInfo:
+ *
+ * Holds information of an element node.
+ */
+struct _xmlSchemaNodeInfo {
+ int nodeType;
+ xmlNodePtr node;
+ int nodeLine;
+ const xmlChar *localName;
+ const xmlChar *nsName;
+ const xmlChar *value;
+ xmlSchemaValPtr val; /* the pre-computed value if any */
+ xmlSchemaTypePtr typeDef; /* the complex/simple type definition if any */
+
+ int flags; /* combination of node info flags */
+
+ int valNeeded;
+ int normVal;
+
+ xmlSchemaElementPtr decl; /* the element/attribute declaration */
+ int depth;
+ xmlSchemaPSVIIDCBindingPtr idcTable; /* the table of PSVI IDC bindings
+ for the scope element*/
+ xmlSchemaIDCMatcherPtr idcMatchers; /* the IDC matchers for the scope
+ element */
+ xmlRegExecCtxtPtr regexCtxt;
+
+ const xmlChar **nsBindings; /* Namespace bindings on this element */
+ int nbNsBindings;
+ int sizeNsBindings;
+
+ int hasKeyrefs;
+ int appliedXPath; /* Indicates that an XPath has been applied. */
+};
+
+#define XML_SCHEMAS_ATTR_UNKNOWN 1
+#define XML_SCHEMAS_ATTR_ASSESSED 2
+#define XML_SCHEMAS_ATTR_PROHIBITED 3
+#define XML_SCHEMAS_ATTR_ERR_MISSING 4
+#define XML_SCHEMAS_ATTR_INVALID_VALUE 5
+#define XML_SCHEMAS_ATTR_ERR_NO_TYPE 6
+#define XML_SCHEMAS_ATTR_ERR_FIXED_VALUE 7
+#define XML_SCHEMAS_ATTR_DEFAULT 8
+#define XML_SCHEMAS_ATTR_VALIDATE_VALUE 9
+#define XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL 10
+#define XML_SCHEMAS_ATTR_HAS_ATTR_USE 11
+#define XML_SCHEMAS_ATTR_HAS_ATTR_DECL 12
+#define XML_SCHEMAS_ATTR_WILD_SKIP 13
+#define XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL 14
+#define XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID 15
+#define XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID 16
+#define XML_SCHEMAS_ATTR_META 17
+/*
+* @metaType values of xmlSchemaAttrInfo.
+*/
+#define XML_SCHEMA_ATTR_INFO_META_XSI_TYPE 1
+#define XML_SCHEMA_ATTR_INFO_META_XSI_NIL 2
+#define XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC 3
+#define XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC 4
+#define XML_SCHEMA_ATTR_INFO_META_XMLNS 5
+
+typedef struct _xmlSchemaAttrInfo xmlSchemaAttrInfo;
+typedef xmlSchemaAttrInfo *xmlSchemaAttrInfoPtr;
+struct _xmlSchemaAttrInfo {
+ int nodeType;
+ xmlNodePtr node;
+ int nodeLine;
+ const xmlChar *localName;
+ const xmlChar *nsName;
+ const xmlChar *value;
+ xmlSchemaValPtr val; /* the pre-computed value if any */
+ xmlSchemaTypePtr typeDef; /* the complex/simple type definition if any */
+ int flags; /* combination of node info flags */
+
+ xmlSchemaAttributePtr decl; /* the attribute declaration */
+ xmlSchemaAttributeUsePtr use; /* the attribute use */
+ int state;
+ int metaType;
+ const xmlChar *vcValue; /* the value constraint value */
+ xmlSchemaNodeInfoPtr parent;
+};
+
+
+#define XML_SCHEMA_VALID_CTXT_FLAG_STREAM 1
+/**
+ * xmlSchemaValidCtxt:
+ *
+ * A Schemas validation context
+ */
+struct _xmlSchemaValidCtxt {
+ int type;
+ void *errCtxt; /* user specific data block */
+ xmlSchemaValidityErrorFunc error; /* the callback in case of errors */
+ xmlSchemaValidityWarningFunc warning; /* the callback in case of warning */
+ xmlStructuredErrorFunc serror;
+
+ xmlSchemaPtr schema; /* The schema in use */
+ xmlDocPtr doc;
+ xmlParserInputBufferPtr input;
+ xmlCharEncoding enc;
+ xmlSAXHandlerPtr sax;
+ xmlParserCtxtPtr parserCtxt;
+ void *user_data; /* TODO: What is this for? */
+ char *filename;
+
+ int err;
+ int nberrors;
+
+ xmlNodePtr node;
+ xmlNodePtr cur;
+ /* xmlSchemaTypePtr type; */
+
+ xmlRegExecCtxtPtr regexp;
+ xmlSchemaValPtr value;
+
+ int valueWS;
+ int options;
+ xmlNodePtr validationRoot;
+ xmlSchemaParserCtxtPtr pctxt;
+ int xsiAssemble;
+
+ int depth;
+ xmlSchemaNodeInfoPtr *elemInfos; /* array of element informations */
+ int sizeElemInfos;
+ xmlSchemaNodeInfoPtr inode; /* the current element information */
+
+ xmlSchemaIDCAugPtr aidcs; /* a list of augmented IDC informations */
+
+ xmlSchemaIDCStateObjPtr xpathStates; /* first active state object. */
+ xmlSchemaIDCStateObjPtr xpathStatePool; /* first stored state object. */
+ xmlSchemaIDCMatcherPtr idcMatcherCache; /* Cache for IDC matcher objects. */
+
+ xmlSchemaPSVIIDCNodePtr *idcNodes; /* list of all IDC node-table entries*/
+ int nbIdcNodes;
+ int sizeIdcNodes;
+
+ xmlSchemaPSVIIDCKeyPtr *idcKeys; /* list of all IDC node-table entries */
+ int nbIdcKeys;
+ int sizeIdcKeys;
+
+ int flags;
+
+ xmlDictPtr dict;
+
+#ifdef LIBXML_READER_ENABLED
+ xmlTextReaderPtr reader;
+#endif
+
+ xmlSchemaAttrInfoPtr *attrInfos;
+ int nbAttrInfos;
+ int sizeAttrInfos;
+
+ int skipDepth;
+ xmlSchemaItemListPtr nodeQNames;
+ int hasKeyrefs;
+ int createIDCNodeTables;
+ int psviExposeIDCNodeTables;
+
+ /* Locator for error reporting in streaming mode */
+ xmlSchemaValidityLocatorFunc locFunc;
+ void *locCtxt;
+};
+
+/**
+ * xmlSchemaSubstGroup:
+ *
+ *
+ */
+typedef struct _xmlSchemaSubstGroup xmlSchemaSubstGroup;
+typedef xmlSchemaSubstGroup *xmlSchemaSubstGroupPtr;
+struct _xmlSchemaSubstGroup {
+ xmlSchemaElementPtr head;
+ xmlSchemaItemListPtr members;
+};
+
+/************************************************************************
+ * *
+ * Some predeclarations *
+ * *
+ ************************************************************************/
+
+static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node);
+static int xmlSchemaParseRedefine(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node);
+static int
+xmlSchemaTypeFixup(xmlSchemaTypePtr type,
+ xmlSchemaAbstractCtxtPtr ctxt);
+static const xmlChar *
+xmlSchemaFacetTypeToString(xmlSchemaTypeType type);
+static int
+xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node);
+static int
+xmlSchemaCheckFacetValues(xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt);
+static void
+xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt);
+static xmlSchemaWhitespaceValueType
+xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type);
+static xmlSchemaTreeItemPtr
+xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, xmlSchemaTypeType type,
+ int withParticle);
+static const xmlChar *
+xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item);
+static xmlSchemaTypeLinkPtr
+xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type);
+static void
+xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt,
+ const char *funcName,
+ const char *message);
+static int
+xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr ctxt,
+ xmlSchemaTypePtr type,
+ xmlSchemaTypePtr baseType,
+ int subset);
+static void
+xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl,
+ xmlSchemaParserCtxtPtr ctxt);
+static void
+xmlSchemaComponentListFree(xmlSchemaItemListPtr list);
+static xmlSchemaQNameRefPtr
+xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node);
+
+/************************************************************************
+ * *
+ * Helper functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaItemTypeToStr:
+ * @type: the type of the schema item
+ *
+ * Returns the component name of a schema item.
+ */
+static const xmlChar *
+xmlSchemaItemTypeToStr(xmlSchemaTypeType type)
+{
+ switch (type) {
+ case XML_SCHEMA_TYPE_BASIC:
+ return(BAD_CAST "simple type definition");
+ case XML_SCHEMA_TYPE_SIMPLE:
+ return(BAD_CAST "simple type definition");
+ case XML_SCHEMA_TYPE_COMPLEX:
+ return(BAD_CAST "complex type definition");
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return(BAD_CAST "element declaration");
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ return(BAD_CAST "attribute use");
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ return(BAD_CAST "attribute declaration");
+ case XML_SCHEMA_TYPE_GROUP:
+ return(BAD_CAST "model group definition");
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ return(BAD_CAST "attribute group definition");
+ case XML_SCHEMA_TYPE_NOTATION:
+ return(BAD_CAST "notation declaration");
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ return(BAD_CAST "model group (sequence)");
+ case XML_SCHEMA_TYPE_CHOICE:
+ return(BAD_CAST "model group (choice)");
+ case XML_SCHEMA_TYPE_ALL:
+ return(BAD_CAST "model group (all)");
+ case XML_SCHEMA_TYPE_PARTICLE:
+ return(BAD_CAST "particle");
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ return(BAD_CAST "unique identity-constraint");
+ /* return(BAD_CAST "IDC (unique)"); */
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ return(BAD_CAST "key identity-constraint");
+ /* return(BAD_CAST "IDC (key)"); */
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ return(BAD_CAST "keyref identity-constraint");
+ /* return(BAD_CAST "IDC (keyref)"); */
+ case XML_SCHEMA_TYPE_ANY:
+ return(BAD_CAST "wildcard (any)");
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ return(BAD_CAST "[helper component] QName reference");
+ case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+ return(BAD_CAST "[helper component] attribute use prohibition");
+ default:
+ return(BAD_CAST "Not a schema component");
+ }
+}
+
+/**
+ * xmlSchemaGetComponentTypeStr:
+ * @type: the type of the schema item
+ *
+ * Returns the component name of a schema item.
+ */
+static const xmlChar *
+xmlSchemaGetComponentTypeStr(xmlSchemaBasicItemPtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_BASIC:
+ if (WXS_IS_COMPLEX(WXS_TYPE_CAST item))
+ return(BAD_CAST "complex type definition");
+ else
+ return(BAD_CAST "simple type definition");
+ default:
+ return(xmlSchemaItemTypeToStr(item->type));
+ }
+}
+
+/**
+ * xmlSchemaGetComponentNode:
+ * @item: a schema component
+ *
+ * Returns node associated with the schema component.
+ * NOTE that such a node need not be available; plus, a component's
+ * node need not to reflect the component directly, since there is no
+ * one-to-one relationship between the XML Schema representation and
+ * the component representation.
+ */
+static xmlNodePtr
+xmlSchemaGetComponentNode(xmlSchemaBasicItemPtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return (((xmlSchemaElementPtr) item)->node);
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ return (((xmlSchemaAttributePtr) item)->node);
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ return (((xmlSchemaTypePtr) item)->node);
+ case XML_SCHEMA_TYPE_ANY:
+ case XML_SCHEMA_TYPE_ANY_ATTRIBUTE:
+ return (((xmlSchemaWildcardPtr) item)->node);
+ case XML_SCHEMA_TYPE_PARTICLE:
+ return (((xmlSchemaParticlePtr) item)->node);
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ return (((xmlSchemaModelGroupPtr) item)->node);
+ case XML_SCHEMA_TYPE_GROUP:
+ return (((xmlSchemaModelGroupDefPtr) item)->node);
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ return (((xmlSchemaAttributeGroupPtr) item)->node);
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ return (((xmlSchemaIDCPtr) item)->node);
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ return(((xmlSchemaQNameRefPtr) item)->node);
+ /* TODO: What to do with NOTATIONs?
+ case XML_SCHEMA_TYPE_NOTATION:
+ return (((xmlSchemaNotationPtr) item)->node);
+ */
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ return (((xmlSchemaAttributeUsePtr) item)->node);
+ default:
+ return (NULL);
+ }
+}
+
+#if 0
+/**
+ * xmlSchemaGetNextComponent:
+ * @item: a schema component
+ *
+ * Returns the next sibling of the schema component.
+ */
+static xmlSchemaBasicItemPtr
+xmlSchemaGetNextComponent(xmlSchemaBasicItemPtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaElementPtr) item)->next);
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaAttributePtr) item)->next);
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaTypePtr) item)->next);
+ case XML_SCHEMA_TYPE_ANY:
+ case XML_SCHEMA_TYPE_ANY_ATTRIBUTE:
+ return (NULL);
+ case XML_SCHEMA_TYPE_PARTICLE:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaParticlePtr) item)->next);
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ return (NULL);
+ case XML_SCHEMA_TYPE_GROUP:
+ return (NULL);
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaAttributeGroupPtr) item)->next);
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ return ((xmlSchemaBasicItemPtr) ((xmlSchemaIDCPtr) item)->next);
+ default:
+ return (NULL);
+ }
+}
+#endif
+
+
+/**
+ * xmlSchemaFormatQName:
+ * @buf: the string buffer
+ * @namespaceName: the namespace name
+ * @localName: the local name
+ *
+ * Returns the given QName in the format "{namespaceName}localName" or
+ * just "localName" if @namespaceName is NULL.
+ *
+ * Returns the localName if @namespaceName is NULL, a formatted
+ * string otherwise.
+ */
+static const xmlChar*
+xmlSchemaFormatQName(xmlChar **buf,
+ const xmlChar *namespaceName,
+ const xmlChar *localName)
+{
+ FREE_AND_NULL(*buf)
+ if (namespaceName != NULL) {
+ *buf = xmlStrdup(BAD_CAST "{");
+ *buf = xmlStrcat(*buf, namespaceName);
+ *buf = xmlStrcat(*buf, BAD_CAST "}");
+ }
+ if (localName != NULL) {
+ if (namespaceName == NULL)
+ return(localName);
+ *buf = xmlStrcat(*buf, localName);
+ } else {
+ *buf = xmlStrcat(*buf, BAD_CAST "(NULL)");
+ }
+ return ((const xmlChar *) *buf);
+}
+
+static const xmlChar*
+xmlSchemaFormatQNameNs(xmlChar **buf, xmlNsPtr ns, const xmlChar *localName)
+{
+ if (ns != NULL)
+ return (xmlSchemaFormatQName(buf, ns->href, localName));
+ else
+ return (xmlSchemaFormatQName(buf, NULL, localName));
+}
+
+static const xmlChar *
+xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return (((xmlSchemaElementPtr) item)->name);
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ return (((xmlSchemaAttributePtr) item)->name);
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ return (((xmlSchemaAttributeGroupPtr) item)->name);
+ case XML_SCHEMA_TYPE_BASIC:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ case XML_SCHEMA_TYPE_COMPLEX:
+ return (((xmlSchemaTypePtr) item)->name);
+ case XML_SCHEMA_TYPE_GROUP:
+ return (((xmlSchemaModelGroupDefPtr) item)->name);
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ return (((xmlSchemaIDCPtr) item)->name);
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ if (WXS_ATTRUSE_DECL(item) != NULL) {
+ return(xmlSchemaGetComponentName(
+ WXS_BASIC_CAST WXS_ATTRUSE_DECL(item)));
+ } else
+ return(NULL);
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ return (((xmlSchemaQNameRefPtr) item)->name);
+ case XML_SCHEMA_TYPE_NOTATION:
+ return (((xmlSchemaNotationPtr) item)->name);
+ default:
+ /*
+ * Other components cannot have names.
+ */
+ break;
+ }
+ return (NULL);
+}
+
+#define xmlSchemaGetQNameRefName(r) (WXS_QNAME_CAST (r))->name
+#define xmlSchemaGetQNameRefTargetNs(r) (WXS_QNAME_CAST (r))->targetNamespace
+/*
+static const xmlChar *
+xmlSchemaGetQNameRefName(void *ref)
+{
+ return(((xmlSchemaQNameRefPtr) ref)->name);
+}
+
+static const xmlChar *
+xmlSchemaGetQNameRefTargetNs(void *ref)
+{
+ return(((xmlSchemaQNameRefPtr) ref)->targetNamespace);
+}
+*/
+
+static const xmlChar *
+xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return (((xmlSchemaElementPtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ return (((xmlSchemaAttributePtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ return (((xmlSchemaAttributeGroupPtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_BASIC:
+ return (BAD_CAST "http://www.w3.org/2001/XMLSchema");
+ case XML_SCHEMA_TYPE_SIMPLE:
+ case XML_SCHEMA_TYPE_COMPLEX:
+ return (((xmlSchemaTypePtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_GROUP:
+ return (((xmlSchemaModelGroupDefPtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ return (((xmlSchemaIDCPtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ if (WXS_ATTRUSE_DECL(item) != NULL) {
+ return(xmlSchemaGetComponentTargetNs(
+ WXS_BASIC_CAST WXS_ATTRUSE_DECL(item)));
+ }
+ /* TODO: Will returning NULL break something? */
+ break;
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ return (((xmlSchemaQNameRefPtr) item)->targetNamespace);
+ case XML_SCHEMA_TYPE_NOTATION:
+ return (((xmlSchemaNotationPtr) item)->targetNamespace);
+ default:
+ /*
+ * Other components cannot have names.
+ */
+ break;
+ }
+ return (NULL);
+}
+
+static const xmlChar*
+xmlSchemaGetComponentQName(xmlChar **buf,
+ void *item)
+{
+ return (xmlSchemaFormatQName(buf,
+ xmlSchemaGetComponentTargetNs((xmlSchemaBasicItemPtr) item),
+ xmlSchemaGetComponentName((xmlSchemaBasicItemPtr) item)));
+}
+
+static const xmlChar*
+xmlSchemaGetComponentDesignation(xmlChar **buf, void *item)
+{
+ xmlChar *str = NULL;
+
+ *buf = xmlStrcat(*buf, WXS_ITEM_TYPE_NAME(item));
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str,
+ (xmlSchemaBasicItemPtr) item));
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ FREE_AND_NULL(str);
+ return(*buf);
+}
+
+static const xmlChar*
+xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc)
+{
+ return(xmlSchemaGetComponentDesignation(buf, idc));
+}
+
+/**
+ * xmlSchemaWildcardPCToString:
+ * @pc: the type of processContents
+ *
+ * Returns a string representation of the type of
+ * processContents.
+ */
+static const xmlChar *
+xmlSchemaWildcardPCToString(int pc)
+{
+ switch (pc) {
+ case XML_SCHEMAS_ANY_SKIP:
+ return (BAD_CAST "skip");
+ case XML_SCHEMAS_ANY_LAX:
+ return (BAD_CAST "lax");
+ case XML_SCHEMAS_ANY_STRICT:
+ return (BAD_CAST "strict");
+ default:
+ return (BAD_CAST "invalid process contents");
+ }
+}
+
+/**
+ * xmlSchemaGetCanonValueWhtspExt:
+ * @val: the precomputed value
+ * @retValue: the returned value
+ * @ws: the whitespace type of the value
+ *
+ * Get a the canonical representation of the value.
+ * The caller has to free the returned retValue.
+ *
+ * Returns 0 if the value could be built and -1 in case of
+ * API errors or if the value type is not supported yet.
+ */
+static int
+xmlSchemaGetCanonValueWhtspExt(xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws,
+ xmlChar **retValue)
+{
+ int list;
+ xmlSchemaValType valType;
+ const xmlChar *value, *value2 = NULL;
+
+
+ if ((retValue == NULL) || (val == NULL))
+ return (-1);
+ list = xmlSchemaValueGetNext(val) ? 1 : 0;
+ *retValue = NULL;
+ do {
+ value = NULL;
+ valType = xmlSchemaGetValType(val);
+ switch (valType) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ value = xmlSchemaValueGetAsString(val);
+ if (value != NULL) {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ value2 = xmlSchemaCollapseString(value);
+ else if (ws == XML_SCHEMA_WHITESPACE_REPLACE)
+ value2 = xmlSchemaWhiteSpaceReplace(value);
+ if (value2 != NULL)
+ value = value2;
+ }
+ break;
+ default:
+ if (xmlSchemaGetCanonValue(val, &value2) == -1) {
+ if (value2 != NULL)
+ xmlFree((xmlChar *) value2);
+ goto internal_error;
+ }
+ value = value2;
+ }
+ if (*retValue == NULL)
+ if (value == NULL) {
+ if (! list)
+ *retValue = xmlStrdup(BAD_CAST "");
+ } else
+ *retValue = xmlStrdup(value);
+ else if (value != NULL) {
+ /* List. */
+ *retValue = xmlStrcat((xmlChar *) *retValue, BAD_CAST " ");
+ *retValue = xmlStrcat((xmlChar *) *retValue, value);
+ }
+ FREE_AND_NULL(value2)
+ val = xmlSchemaValueGetNext(val);
+ } while (val != NULL);
+
+ return (0);
+internal_error:
+ if (*retValue != NULL)
+ xmlFree((xmlChar *) (*retValue));
+ if (value2 != NULL)
+ xmlFree((xmlChar *) value2);
+ return (-1);
+}
+
+/**
+ * xmlSchemaFormatItemForReport:
+ * @buf: the string buffer
+ * @itemDes: the designation of the item
+ * @itemName: the name of the item
+ * @item: the item as an object
+ * @itemNode: the node of the item
+ * @local: the local name
+ * @parsing: if the function is used during the parse
+ *
+ * Returns a representation of the given item used
+ * for error reports.
+ *
+ * The following order is used to build the resulting
+ * designation if the arguments are not NULL:
+ * 1a. If itemDes not NULL -> itemDes
+ * 1b. If (itemDes not NULL) and (itemName not NULL)
+ * -> itemDes + itemName
+ * 2. If the preceding was NULL and (item not NULL) -> item
+ * 3. If the preceding was NULL and (itemNode not NULL) -> itemNode
+ *
+ * If the itemNode is an attribute node, the name of the attribute
+ * will be appended to the result.
+ *
+ * Returns the formatted string and sets @buf to the resulting value.
+ */
+static xmlChar*
+xmlSchemaFormatItemForReport(xmlChar **buf,
+ const xmlChar *itemDes,
+ xmlSchemaBasicItemPtr item,
+ xmlNodePtr itemNode)
+{
+ xmlChar *str = NULL;
+ int named = 1;
+
+ if (*buf != NULL) {
+ xmlFree(*buf);
+ *buf = NULL;
+ }
+
+ if (itemDes != NULL) {
+ *buf = xmlStrdup(itemDes);
+ } else if (item != NULL) {
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_BASIC: {
+ xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+ if (WXS_IS_ATOMIC(type))
+ *buf = xmlStrdup(BAD_CAST "atomic type 'xs:");
+ else if (WXS_IS_LIST(type))
+ *buf = xmlStrdup(BAD_CAST "list type 'xs:");
+ else if (WXS_IS_UNION(type))
+ *buf = xmlStrdup(BAD_CAST "union type 'xs:");
+ else
+ *buf = xmlStrdup(BAD_CAST "simple type 'xs:");
+ *buf = xmlStrcat(*buf, type->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ break;
+ case XML_SCHEMA_TYPE_SIMPLE: {
+ xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+ if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+ *buf = xmlStrdup(BAD_CAST"");
+ } else {
+ *buf = xmlStrdup(BAD_CAST "local ");
+ }
+ if (WXS_IS_ATOMIC(type))
+ *buf = xmlStrcat(*buf, BAD_CAST "atomic type");
+ else if (WXS_IS_LIST(type))
+ *buf = xmlStrcat(*buf, BAD_CAST "list type");
+ else if (WXS_IS_UNION(type))
+ *buf = xmlStrcat(*buf, BAD_CAST "union type");
+ else
+ *buf = xmlStrcat(*buf, BAD_CAST "simple type");
+ if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, type->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ }
+ break;
+ case XML_SCHEMA_TYPE_COMPLEX: {
+ xmlSchemaTypePtr type = WXS_TYPE_CAST item;
+
+ if (type->flags & XML_SCHEMAS_TYPE_GLOBAL)
+ *buf = xmlStrdup(BAD_CAST "");
+ else
+ *buf = xmlStrdup(BAD_CAST "local ");
+ *buf = xmlStrcat(*buf, BAD_CAST "complex type");
+ if (type->flags & XML_SCHEMAS_TYPE_GLOBAL) {
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, type->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE: {
+ xmlSchemaAttributeUsePtr ause;
+
+ ause = WXS_ATTR_USE_CAST item;
+ *buf = xmlStrdup(BAD_CAST "attribute use ");
+ if (WXS_ATTRUSE_DECL(ause) != NULL) {
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ *buf = xmlStrcat(*buf,
+ xmlSchemaGetComponentQName(&str, WXS_ATTRUSE_DECL(ause)));
+ FREE_AND_NULL(str)
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ } else {
+ *buf = xmlStrcat(*buf, BAD_CAST "(unknown)");
+ }
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE: {
+ xmlSchemaAttributePtr attr;
+
+ attr = (xmlSchemaAttributePtr) item;
+ *buf = xmlStrdup(BAD_CAST "attribute decl.");
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
+ attr->targetNamespace, attr->name));
+ FREE_AND_NULL(str)
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ xmlSchemaGetComponentDesignation(buf, item);
+ break;
+ case XML_SCHEMA_TYPE_ELEMENT: {
+ xmlSchemaElementPtr elem;
+
+ elem = (xmlSchemaElementPtr) item;
+ *buf = xmlStrdup(BAD_CAST "element decl.");
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
+ elem->targetNamespace, elem->name));
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ break;
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ if (item->type == XML_SCHEMA_TYPE_IDC_UNIQUE)
+ *buf = xmlStrdup(BAD_CAST "unique '");
+ else if (item->type == XML_SCHEMA_TYPE_IDC_KEY)
+ *buf = xmlStrdup(BAD_CAST "key '");
+ else
+ *buf = xmlStrdup(BAD_CAST "keyRef '");
+ *buf = xmlStrcat(*buf, ((xmlSchemaIDCPtr) item)->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ break;
+ case XML_SCHEMA_TYPE_ANY:
+ case XML_SCHEMA_TYPE_ANY_ATTRIBUTE:
+ *buf = xmlStrdup(xmlSchemaWildcardPCToString(
+ ((xmlSchemaWildcardPtr) item)->processContents));
+ *buf = xmlStrcat(*buf, BAD_CAST " wildcard");
+ break;
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ case XML_SCHEMA_FACET_PATTERN:
+ case XML_SCHEMA_FACET_ENUMERATION:
+ case XML_SCHEMA_FACET_WHITESPACE:
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH:
+ *buf = xmlStrdup(BAD_CAST "facet '");
+ *buf = xmlStrcat(*buf, xmlSchemaFacetTypeToString(item->type));
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ break;
+ case XML_SCHEMA_TYPE_GROUP: {
+ *buf = xmlStrdup(BAD_CAST "model group def.");
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item));
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ FREE_AND_NULL(str)
+ }
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ case XML_SCHEMA_TYPE_PARTICLE:
+ *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item));
+ break;
+ case XML_SCHEMA_TYPE_NOTATION: {
+ *buf = xmlStrdup(WXS_ITEM_TYPE_NAME(item));
+ *buf = xmlStrcat(*buf, BAD_CAST " '");
+ *buf = xmlStrcat(*buf, xmlSchemaGetComponentQName(&str, item));
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ FREE_AND_NULL(str);
+ }
+ default:
+ named = 0;
+ }
+ } else
+ named = 0;
+
+ if ((named == 0) && (itemNode != NULL)) {
+ xmlNodePtr elem;
+
+ if (itemNode->type == XML_ATTRIBUTE_NODE)
+ elem = itemNode->parent;
+ else
+ elem = itemNode;
+ *buf = xmlStrdup(BAD_CAST "Element '");
+ if (elem->ns != NULL) {
+ *buf = xmlStrcat(*buf,
+ xmlSchemaFormatQName(&str, elem->ns->href, elem->name));
+ FREE_AND_NULL(str)
+ } else
+ *buf = xmlStrcat(*buf, elem->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+
+ }
+ if ((itemNode != NULL) && (itemNode->type == XML_ATTRIBUTE_NODE)) {
+ *buf = xmlStrcat(*buf, BAD_CAST ", attribute '");
+ if (itemNode->ns != NULL) {
+ *buf = xmlStrcat(*buf, xmlSchemaFormatQName(&str,
+ itemNode->ns->href, itemNode->name));
+ FREE_AND_NULL(str)
+ } else
+ *buf = xmlStrcat(*buf, itemNode->name);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ }
+ FREE_AND_NULL(str)
+
+ return (*buf);
+}
+
+/**
+ * xmlSchemaFormatFacetEnumSet:
+ * @buf: the string buffer
+ * @type: the type holding the enumeration facets
+ *
+ * Builds a string consisting of all enumeration elements.
+ *
+ * Returns a string of all enumeration elements.
+ */
+static const xmlChar *
+xmlSchemaFormatFacetEnumSet(xmlSchemaAbstractCtxtPtr actxt,
+ xmlChar **buf, xmlSchemaTypePtr type)
+{
+ xmlSchemaFacetPtr facet;
+ xmlSchemaWhitespaceValueType ws;
+ xmlChar *value = NULL;
+ int res, found = 0;
+
+ if (*buf != NULL)
+ xmlFree(*buf);
+ *buf = NULL;
+
+ do {
+ /*
+ * Use the whitespace type of the base type.
+ */
+ ws = xmlSchemaGetWhiteSpaceFacetValue(type->baseType);
+ for (facet = type->facets; facet != NULL; facet = facet->next) {
+ if (facet->type != XML_SCHEMA_FACET_ENUMERATION)
+ continue;
+ found = 1;
+ res = xmlSchemaGetCanonValueWhtspExt(facet->val,
+ ws, &value);
+ if (res == -1) {
+ xmlSchemaInternalErr(actxt,
+ "xmlSchemaFormatFacetEnumSet",
+ "compute the canonical lexical representation");
+ if (*buf != NULL)
+ xmlFree(*buf);
+ *buf = NULL;
+ return (NULL);
+ }
+ if (*buf == NULL)
+ *buf = xmlStrdup(BAD_CAST "'");
+ else
+ *buf = xmlStrcat(*buf, BAD_CAST ", '");
+ *buf = xmlStrcat(*buf, BAD_CAST value);
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ if (value != NULL) {
+ xmlFree((xmlChar *)value);
+ value = NULL;
+ }
+ }
+ /*
+ * The enumeration facet of a type restricts the enumeration
+ * facet of the ancestor type; i.e., such restricted enumerations
+ * do not belong to the set of the given type. Thus we break
+ * on the first found enumeration.
+ */
+ if (found)
+ break;
+ type = type->baseType;
+ } while ((type != NULL) && (type->type != XML_SCHEMA_TYPE_BASIC));
+
+ return ((const xmlChar *) *buf);
+}
+
+/************************************************************************
+ * *
+ * Error functions *
+ * *
+ ************************************************************************/
+
+#if 0
+static void
+xmlSchemaErrMemory(const char *msg)
+{
+ __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL,
+ msg);
+}
+#endif
+
+static void
+xmlSchemaPSimpleErr(const char *msg)
+{
+ __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, NULL, NULL,
+ msg);
+}
+
+/**
+ * xmlSchemaPErrMemory:
+ * @node: a context node
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSchemaPErrMemory(xmlSchemaParserCtxtPtr ctxt,
+ const char *extra, xmlNodePtr node)
+{
+ if (ctxt != NULL)
+ ctxt->nberrors++;
+ __xmlSimpleError(XML_FROM_SCHEMASP, XML_ERR_NO_MEMORY, node, NULL,
+ extra);
+}
+
+/**
+ * xmlSchemaPErr:
+ * @ctxt: the parsing context
+ * @node: the context node
+ * @error: the error code
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ *
+ * Handle a parser error
+ */
+static void
+xmlSchemaPErr(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ xmlGenericErrorFunc channel = NULL;
+ xmlStructuredErrorFunc schannel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ ctxt->nberrors++;
+ ctxt->err = error;
+ channel = ctxt->error;
+ data = ctxt->errCtxt;
+ schannel = ctxt->serror;
+ }
+ __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) str1, (const char *) str2, NULL, 0, 0,
+ msg, str1, str2);
+}
+
+/**
+ * xmlSchemaPErr2:
+ * @ctxt: the parsing context
+ * @node: the context node
+ * @node: the current child
+ * @error: the error code
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ *
+ * Handle a parser error
+ */
+static void
+xmlSchemaPErr2(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
+ xmlNodePtr child, int error,
+ const char *msg, const xmlChar * str1, const xmlChar * str2)
+{
+ if (child != NULL)
+ xmlSchemaPErr(ctxt, child, error, msg, str1, str2);
+ else
+ xmlSchemaPErr(ctxt, node, error, msg, str1, str2);
+}
+
+
+/**
+ * xmlSchemaPErrExt:
+ * @ctxt: the parsing context
+ * @node: the context node
+ * @error: the error code
+ * @strData1: extra data
+ * @strData2: extra data
+ * @strData3: extra data
+ * @msg: the message
+ * @str1: extra parameter for the message display
+ * @str2: extra parameter for the message display
+ * @str3: extra parameter for the message display
+ * @str4: extra parameter for the message display
+ * @str5: extra parameter for the message display
+ *
+ * Handle a parser error
+ */
+static void
+xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
+ const xmlChar * strData1, const xmlChar * strData2,
+ const xmlChar * strData3, const char *msg, const xmlChar * str1,
+ const xmlChar * str2, const xmlChar * str3, const xmlChar * str4,
+ const xmlChar * str5)
+{
+
+ xmlGenericErrorFunc channel = NULL;
+ xmlStructuredErrorFunc schannel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ ctxt->nberrors++;
+ ctxt->err = error;
+ channel = ctxt->error;
+ data = ctxt->errCtxt;
+ schannel = ctxt->serror;
+ }
+ __xmlRaiseError(schannel, channel, data, ctxt, node, XML_FROM_SCHEMASP,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) strData1, (const char *) strData2,
+ (const char *) strData3, 0, 0, msg, str1, str2,
+ str3, str4, str5);
+}
+
+/************************************************************************
+ * *
+ * Allround error functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaVTypeErrMemory:
+ * @node: a context node
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSchemaVErrMemory(xmlSchemaValidCtxtPtr ctxt,
+ const char *extra, xmlNodePtr node)
+{
+ if (ctxt != NULL) {
+ ctxt->nberrors++;
+ ctxt->err = XML_SCHEMAV_INTERNAL;
+ }
+ __xmlSimpleError(XML_FROM_SCHEMASV, XML_ERR_NO_MEMORY, node, NULL,
+ extra);
+}
+
+static void
+xmlSchemaPSimpleInternalErr(xmlNodePtr node,
+ const char *msg, const xmlChar *str)
+{
+ __xmlSimpleError(XML_FROM_SCHEMASP, XML_SCHEMAP_INTERNAL, node,
+ msg, (const char *) str);
+}
+
+#define WXS_ERROR_TYPE_ERROR 1
+#define WXS_ERROR_TYPE_WARNING 2
+/**
+ * xmlSchemaErr3:
+ * @ctxt: the validation context
+ * @node: the context node
+ * @error: the error code
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ * @str3: extra data
+ *
+ * Handle a validation error
+ */
+static void
+xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
+ xmlErrorLevel errorLevel,
+ int error, xmlNodePtr node, int line, const char *msg,
+ const xmlChar *str1, const xmlChar *str2,
+ const xmlChar *str3, const xmlChar *str4)
+{
+ xmlStructuredErrorFunc schannel = NULL;
+ xmlGenericErrorFunc channel = NULL;
+ void *data = NULL;
+
+ if (ctxt != NULL) {
+ if (ctxt->type == XML_SCHEMA_CTXT_VALIDATOR) {
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctxt;
+ const char *file = NULL;
+ int col = 0;
+ if (errorLevel != XML_ERR_WARNING) {
+ vctxt->nberrors++;
+ vctxt->err = error;
+ channel = vctxt->error;
+ } else {
+ channel = vctxt->warning;
+ }
+ schannel = vctxt->serror;
+ data = vctxt->errCtxt;
+
+ /*
+ * Error node. If we specify a line number, then
+ * do not channel any node to the error function.
+ */
+ if (line == 0) {
+ if ((node == NULL) &&
+ (vctxt->depth >= 0) &&
+ (vctxt->inode != NULL)) {
+ node = vctxt->inode->node;
+ }
+ /*
+ * Get filename and line if no node-tree.
+ */
+ if ((node == NULL) &&
+ (vctxt->parserCtxt != NULL) &&
+ (vctxt->parserCtxt->input != NULL)) {
+ file = vctxt->parserCtxt->input->filename;
+ line = vctxt->parserCtxt->input->line;
+ col = vctxt->parserCtxt->input->col;
+ }
+ } else {
+ /*
+ * Override the given node's (if any) position
+ * and channel only the given line number.
+ */
+ node = NULL;
+ /*
+ * Get filename.
+ */
+ if (vctxt->doc != NULL)
+ file = (const char *) vctxt->doc->URL;
+ else if ((vctxt->parserCtxt != NULL) &&
+ (vctxt->parserCtxt->input != NULL))
+ file = vctxt->parserCtxt->input->filename;
+ }
+ if (vctxt->locFunc != NULL) {
+ if ((file == NULL) || (line == 0)) {
+ unsigned long l;
+ const char *f;
+ vctxt->locFunc(vctxt->locCtxt, &f, &l);
+ if (file == NULL)
+ file = f;
+ if (line == 0)
+ line = (int) l;
+ }
+ }
+ if ((file == NULL) && (vctxt->filename != NULL))
+ file = vctxt->filename;
+
+ __xmlRaiseError(schannel, channel, data, ctxt,
+ node, XML_FROM_SCHEMASV,
+ error, errorLevel, file, line,
+ (const char *) str1, (const char *) str2,
+ (const char *) str3, 0, col, msg, str1, str2, str3, str4);
+
+ } else if (ctxt->type == XML_SCHEMA_CTXT_PARSER) {
+ xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt;
+ if (errorLevel != XML_ERR_WARNING) {
+ pctxt->nberrors++;
+ pctxt->err = error;
+ channel = pctxt->error;
+ } else {
+ channel = pctxt->warning;
+ }
+ schannel = pctxt->serror;
+ data = pctxt->errCtxt;
+ __xmlRaiseError(schannel, channel, data, ctxt,
+ node, XML_FROM_SCHEMASP, error,
+ errorLevel, NULL, 0,
+ (const char *) str1, (const char *) str2,
+ (const char *) str3, 0, 0, msg, str1, str2, str3, str4);
+ } else {
+ TODO
+ }
+ }
+}
+
+/**
+ * xmlSchemaErr3:
+ * @ctxt: the validation context
+ * @node: the context node
+ * @error: the error code
+ * @msg: the error message
+ * @str1: extra data
+ * @str2: extra data
+ * @str3: extra data
+ *
+ * Handle a validation error
+ */
+static void
+xmlSchemaErr3(xmlSchemaAbstractCtxtPtr actxt,
+ int error, xmlNodePtr node, const char *msg,
+ const xmlChar *str1, const xmlChar *str2, const xmlChar *str3)
+{
+ xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0,
+ msg, str1, str2, str3, NULL);
+}
+
+static void
+xmlSchemaErr4(xmlSchemaAbstractCtxtPtr actxt,
+ int error, xmlNodePtr node, const char *msg,
+ const xmlChar *str1, const xmlChar *str2,
+ const xmlChar *str3, const xmlChar *str4)
+{
+ xmlSchemaErr4Line(actxt, XML_ERR_ERROR, error, node, 0,
+ msg, str1, str2, str3, str4);
+}
+
+static void
+xmlSchemaErr(xmlSchemaAbstractCtxtPtr actxt,
+ int error, xmlNodePtr node, const char *msg,
+ const xmlChar *str1, const xmlChar *str2)
+{
+ xmlSchemaErr4(actxt, error, node, msg, str1, str2, NULL, NULL);
+}
+
+static xmlChar *
+xmlSchemaFormatNodeForError(xmlChar ** msg,
+ xmlSchemaAbstractCtxtPtr actxt,
+ xmlNodePtr node)
+{
+ xmlChar *str = NULL;
+
+ *msg = NULL;
+ if ((node != NULL) &&
+ (node->type != XML_ELEMENT_NODE) &&
+ (node->type != XML_ATTRIBUTE_NODE))
+ {
+ /*
+ * Don't try to format other nodes than element and
+ * attribute nodes.
+ * Play save and return an empty string.
+ */
+ *msg = xmlStrdup(BAD_CAST "");
+ return(*msg);
+ }
+ if (node != NULL) {
+ /*
+ * Work on tree nodes.
+ */
+ if (node->type == XML_ATTRIBUTE_NODE) {
+ xmlNodePtr elem = node->parent;
+
+ *msg = xmlStrdup(BAD_CAST "Element '");
+ if (elem->ns != NULL)
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ elem->ns->href, elem->name));
+ else
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ NULL, elem->name));
+ FREE_AND_NULL(str);
+ *msg = xmlStrcat(*msg, BAD_CAST "', ");
+ *msg = xmlStrcat(*msg, BAD_CAST "attribute '");
+ } else {
+ *msg = xmlStrdup(BAD_CAST "Element '");
+ }
+ if (node->ns != NULL)
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ node->ns->href, node->name));
+ else
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ NULL, node->name));
+ FREE_AND_NULL(str);
+ *msg = xmlStrcat(*msg, BAD_CAST "': ");
+ } else if (actxt->type == XML_SCHEMA_CTXT_VALIDATOR) {
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) actxt;
+ /*
+ * Work on node infos.
+ */
+ if (vctxt->inode->nodeType == XML_ATTRIBUTE_NODE) {
+ xmlSchemaNodeInfoPtr ielem =
+ vctxt->elemInfos[vctxt->depth];
+
+ *msg = xmlStrdup(BAD_CAST "Element '");
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ ielem->nsName, ielem->localName));
+ FREE_AND_NULL(str);
+ *msg = xmlStrcat(*msg, BAD_CAST "', ");
+ *msg = xmlStrcat(*msg, BAD_CAST "attribute '");
+ } else {
+ *msg = xmlStrdup(BAD_CAST "Element '");
+ }
+ *msg = xmlStrcat(*msg, xmlSchemaFormatQName(&str,
+ vctxt->inode->nsName, vctxt->inode->localName));
+ FREE_AND_NULL(str);
+ *msg = xmlStrcat(*msg, BAD_CAST "': ");
+ } else if (actxt->type == XML_SCHEMA_CTXT_PARSER) {
+ /*
+ * Hmm, no node while parsing?
+ * Return an empty string, in case NULL will break something.
+ */
+ *msg = xmlStrdup(BAD_CAST "");
+ } else {
+ TODO
+ return (NULL);
+ }
+ /*
+ * VAL TODO: The output of the given schema component is currently
+ * disabled.
+ */
+#if 0
+ if ((type != NULL) && (xmlSchemaIsGlobalItem(type))) {
+ *msg = xmlStrcat(*msg, BAD_CAST " [");
+ *msg = xmlStrcat(*msg, xmlSchemaFormatItemForReport(&str,
+ NULL, type, NULL, 0));
+ FREE_AND_NULL(str)
+ *msg = xmlStrcat(*msg, BAD_CAST "]");
+ }
+#endif
+ return (*msg);
+}
+
+static void
+xmlSchemaInternalErr2(xmlSchemaAbstractCtxtPtr actxt,
+ const char *funcName,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlChar *msg = NULL;
+
+ if (actxt == NULL)
+ return;
+ msg = xmlStrdup(BAD_CAST "Internal error: ");
+ msg = xmlStrcat(msg, BAD_CAST funcName);
+ msg = xmlStrcat(msg, BAD_CAST ", ");
+ msg = xmlStrcat(msg, BAD_CAST message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+
+ if (actxt->type == XML_SCHEMA_CTXT_VALIDATOR)
+ xmlSchemaErr(actxt, XML_SCHEMAV_INTERNAL, NULL,
+ (const char *) msg, str1, str2);
+
+ else if (actxt->type == XML_SCHEMA_CTXT_PARSER)
+ xmlSchemaErr(actxt, XML_SCHEMAP_INTERNAL, NULL,
+ (const char *) msg, str1, str2);
+
+ FREE_AND_NULL(msg)
+}
+
+static void
+xmlSchemaInternalErr(xmlSchemaAbstractCtxtPtr actxt,
+ const char *funcName,
+ const char *message)
+{
+ xmlSchemaInternalErr2(actxt, funcName, message, NULL, NULL);
+}
+
+#if 0
+static void
+xmlSchemaPInternalErr(xmlSchemaParserCtxtPtr pctxt,
+ const char *funcName,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlSchemaInternalErr2(ACTXT_CAST pctxt, funcName, message,
+ str1, str2);
+}
+#endif
+
+static void
+xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ xmlSchemaBasicItemPtr item,
+ const char *message,
+ const xmlChar *str1, const xmlChar *str2,
+ const xmlChar *str3, const xmlChar *str4)
+{
+ xmlChar *msg = NULL;
+
+ if ((node == NULL) && (item != NULL) &&
+ (actxt->type == XML_SCHEMA_CTXT_PARSER)) {
+ node = WXS_ITEM_NODE(item);
+ xmlSchemaFormatItemForReport(&msg, NULL, item, NULL);
+ msg = xmlStrcat(msg, BAD_CAST ": ");
+ } else
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ xmlSchemaErr4(actxt, error, node,
+ (const char *) msg, str1, str2, str3, str4);
+ FREE_AND_NULL(msg)
+}
+
+static void
+xmlSchemaCustomErr(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ xmlSchemaBasicItemPtr item,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlSchemaCustomErr4(actxt, error, node, item,
+ message, str1, str2, NULL, NULL);
+}
+
+
+
+static void
+xmlSchemaCustomWarning(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2,
+ const xmlChar *str3)
+{
+ xmlChar *msg = NULL;
+
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+
+ /* URGENT TODO: Set the error code to something sane. */
+ xmlSchemaErr4Line(actxt, XML_ERR_WARNING, error, node, 0,
+ (const char *) msg, str1, str2, str3, NULL);
+
+ FREE_AND_NULL(msg)
+}
+
+
+
+static void
+xmlSchemaKeyrefErr(xmlSchemaValidCtxtPtr vctxt,
+ xmlParserErrors error,
+ xmlSchemaPSVIIDCNodePtr idcNode,
+ xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlChar *msg = NULL, *qname = NULL;
+
+ msg = xmlStrdup(BAD_CAST "Element '%s': ");
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ xmlSchemaErr4Line(ACTXT_CAST vctxt, XML_ERR_ERROR,
+ error, NULL, idcNode->nodeLine, (const char *) msg,
+ xmlSchemaFormatQName(&qname,
+ vctxt->nodeQNames->items[idcNode->nodeQNameID +1],
+ vctxt->nodeQNames->items[idcNode->nodeQNameID]),
+ str1, str2, NULL);
+ FREE_AND_NULL(qname);
+ FREE_AND_NULL(msg);
+}
+
+static int
+xmlSchemaEvalErrorNodeType(xmlSchemaAbstractCtxtPtr actxt,
+ xmlNodePtr node)
+{
+ if (node != NULL)
+ return (node->type);
+ if ((actxt->type == XML_SCHEMA_CTXT_VALIDATOR) &&
+ (((xmlSchemaValidCtxtPtr) actxt)->inode != NULL))
+ return ( ((xmlSchemaValidCtxtPtr) actxt)->inode->nodeType);
+ return (-1);
+}
+
+static int
+xmlSchemaIsGlobalItem(xmlSchemaTypePtr item)
+{
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if (item->flags & XML_SCHEMAS_TYPE_GLOBAL)
+ return(1);
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ return (1);
+ case XML_SCHEMA_TYPE_ELEMENT:
+ if ( ((xmlSchemaElementPtr) item)->flags &
+ XML_SCHEMAS_ELEM_GLOBAL)
+ return(1);
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ if ( ((xmlSchemaAttributePtr) item)->flags &
+ XML_SCHEMAS_ATTR_GLOBAL)
+ return(1);
+ break;
+ /* Note that attribute groups are always global. */
+ default:
+ return(1);
+ }
+ return (0);
+}
+
+static void
+xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ const xmlChar *value,
+ xmlSchemaTypePtr type,
+ int displayValue)
+{
+ xmlChar *msg = NULL;
+
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+
+ if (displayValue || (xmlSchemaEvalErrorNodeType(actxt, node) ==
+ XML_ATTRIBUTE_NODE))
+ msg = xmlStrcat(msg, BAD_CAST "'%s' is not a valid value of ");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "The character content is not a valid "
+ "value of ");
+
+ if (! xmlSchemaIsGlobalItem(type))
+ msg = xmlStrcat(msg, BAD_CAST "the local ");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "the ");
+
+ if (WXS_IS_ATOMIC(type))
+ msg = xmlStrcat(msg, BAD_CAST "atomic type");
+ else if (WXS_IS_LIST(type))
+ msg = xmlStrcat(msg, BAD_CAST "list type");
+ else if (WXS_IS_UNION(type))
+ msg = xmlStrcat(msg, BAD_CAST "union type");
+
+ if (xmlSchemaIsGlobalItem(type)) {
+ xmlChar *str = NULL;
+ msg = xmlStrcat(msg, BAD_CAST " '");
+ if (type->builtInType != 0) {
+ msg = xmlStrcat(msg, BAD_CAST "xs:");
+ msg = xmlStrcat(msg, type->name);
+ } else
+ msg = xmlStrcat(msg,
+ xmlSchemaFormatQName(&str,
+ type->targetNamespace, type->name));
+ msg = xmlStrcat(msg, BAD_CAST "'");
+ FREE_AND_NULL(str);
+ }
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ if (displayValue || (xmlSchemaEvalErrorNodeType(actxt, node) ==
+ XML_ATTRIBUTE_NODE))
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value, NULL);
+ else
+ xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
+ FREE_AND_NULL(msg)
+}
+
+static const xmlChar *
+xmlSchemaFormatErrorNodeQName(xmlChar ** str,
+ xmlSchemaNodeInfoPtr ni,
+ xmlNodePtr node)
+{
+ if (node != NULL) {
+ if (node->ns != NULL)
+ return (xmlSchemaFormatQName(str, node->ns->href, node->name));
+ else
+ return (xmlSchemaFormatQName(str, NULL, node->name));
+ } else if (ni != NULL)
+ return (xmlSchemaFormatQName(str, ni->nsName, ni->localName));
+ return (NULL);
+}
+
+static void
+xmlSchemaIllegalAttrErr(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlSchemaAttrInfoPtr ni,
+ xmlNodePtr node)
+{
+ xmlChar *msg = NULL, *str = NULL;
+
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+ msg = xmlStrcat(msg, BAD_CAST "The attribute '%s' is not allowed.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg,
+ xmlSchemaFormatErrorNodeQName(&str, (xmlSchemaNodeInfoPtr) ni, node),
+ NULL);
+ FREE_AND_NULL(str)
+ FREE_AND_NULL(msg)
+}
+
+static void
+xmlSchemaComplexTypeErr(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
+ const char *message,
+ int nbval,
+ int nbneg,
+ xmlChar **values)
+{
+ xmlChar *str = NULL, *msg = NULL;
+ xmlChar *localName, *nsName;
+ const xmlChar *cur, *end;
+ int i;
+
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".");
+ /*
+ * Note that is does not make sense to report that we have a
+ * wildcard here, since the wildcard might be unfolded into
+ * multiple transitions.
+ */
+ if (nbval + nbneg > 0) {
+ if (nbval + nbneg > 1) {
+ str = xmlStrdup(BAD_CAST " Expected is one of ( ");
+ } else
+ str = xmlStrdup(BAD_CAST " Expected is ( ");
+ nsName = NULL;
+
+ for (i = 0; i < nbval + nbneg; i++) {
+ cur = values[i];
+ if (cur == NULL)
+ continue;
+ if ((cur[0] == 'n') && (cur[1] == 'o') && (cur[2] == 't') &&
+ (cur[3] == ' ')) {
+ cur += 4;
+ str = xmlStrcat(str, BAD_CAST "##other");
+ }
+ /*
+ * Get the local name.
+ */
+ localName = NULL;
+
+ end = cur;
+ if (*end == '*') {
+ localName = xmlStrdup(BAD_CAST "*");
+ end++;
+ } else {
+ while ((*end != 0) && (*end != '|'))
+ end++;
+ localName = xmlStrncat(localName, BAD_CAST cur, end - cur);
+ }
+ if (*end != 0) {
+ end++;
+ /*
+ * Skip "*|*" if they come with negated expressions, since
+ * they represent the same negated wildcard.
+ */
+ if ((nbneg == 0) || (*end != '*') || (*localName != '*')) {
+ /*
+ * Get the namespace name.
+ */
+ cur = end;
+ if (*end == '*') {
+ nsName = xmlStrdup(BAD_CAST "{*}");
+ } else {
+ while (*end != 0)
+ end++;
+
+ if (i >= nbval)
+ nsName = xmlStrdup(BAD_CAST "{##other:");
+ else
+ nsName = xmlStrdup(BAD_CAST "{");
+
+ nsName = xmlStrncat(nsName, BAD_CAST cur, end - cur);
+ nsName = xmlStrcat(nsName, BAD_CAST "}");
+ }
+ str = xmlStrcat(str, BAD_CAST nsName);
+ FREE_AND_NULL(nsName)
+ } else {
+ FREE_AND_NULL(localName);
+ continue;
+ }
+ }
+ str = xmlStrcat(str, BAD_CAST localName);
+ FREE_AND_NULL(localName);
+
+ if (i < nbval + nbneg -1)
+ str = xmlStrcat(str, BAD_CAST ", ");
+ }
+ str = xmlStrcat(str, BAD_CAST " ).\n");
+ msg = xmlStrcat(msg, BAD_CAST str);
+ FREE_AND_NULL(str)
+ } else
+ msg = xmlStrcat(msg, BAD_CAST "\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
+ xmlFree(msg);
+}
+
+static void
+xmlSchemaFacetErr(xmlSchemaAbstractCtxtPtr actxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ const xmlChar *value,
+ unsigned long length,
+ xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlChar *str = NULL, *msg = NULL;
+ xmlSchemaTypeType facetType;
+ int nodeType = xmlSchemaEvalErrorNodeType(actxt, node);
+
+ xmlSchemaFormatNodeForError(&msg, actxt, node);
+ if (error == XML_SCHEMAV_CVC_ENUMERATION_VALID) {
+ facetType = XML_SCHEMA_FACET_ENUMERATION;
+ /*
+ * If enumerations are validated, one must not expect the
+ * facet to be given.
+ */
+ } else
+ facetType = facet->type;
+ msg = xmlStrcat(msg, BAD_CAST "[");
+ msg = xmlStrcat(msg, BAD_CAST "facet '");
+ msg = xmlStrcat(msg, xmlSchemaFacetTypeToString(facetType));
+ msg = xmlStrcat(msg, BAD_CAST "'] ");
+ if (message == NULL) {
+ /*
+ * Use a default message.
+ */
+ if ((facetType == XML_SCHEMA_FACET_LENGTH) ||
+ (facetType == XML_SCHEMA_FACET_MINLENGTH) ||
+ (facetType == XML_SCHEMA_FACET_MAXLENGTH)) {
+
+ char len[25], actLen[25];
+
+ /* FIXME, TODO: What is the max expected string length of the
+ * this value?
+ */
+ if (nodeType == XML_ATTRIBUTE_NODE)
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' has a length of '%s'; ");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "The value has a length of '%s'; ");
+
+ snprintf(len, 24, "%lu", xmlSchemaGetFacetValueAsULong(facet));
+ snprintf(actLen, 24, "%lu", length);
+
+ if (facetType == XML_SCHEMA_FACET_LENGTH)
+ msg = xmlStrcat(msg,
+ BAD_CAST "this differs from the allowed length of '%s'.\n");
+ else if (facetType == XML_SCHEMA_FACET_MAXLENGTH)
+ msg = xmlStrcat(msg,
+ BAD_CAST "this exceeds the allowed maximum length of '%s'.\n");
+ else if (facetType == XML_SCHEMA_FACET_MINLENGTH)
+ msg = xmlStrcat(msg,
+ BAD_CAST "this underruns the allowed minimum length of '%s'.\n");
+
+ if (nodeType == XML_ATTRIBUTE_NODE)
+ xmlSchemaErr3(actxt, error, node, (const char *) msg,
+ value, (const xmlChar *) actLen, (const xmlChar *) len);
+ else
+ xmlSchemaErr(actxt, error, node, (const char *) msg,
+ (const xmlChar *) actLen, (const xmlChar *) len);
+
+ } else if (facetType == XML_SCHEMA_FACET_ENUMERATION) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not an element "
+ "of the set {%s}.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ xmlSchemaFormatFacetEnumSet(actxt, &str, type));
+ } else if (facetType == XML_SCHEMA_FACET_PATTERN) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not accepted "
+ "by the pattern '%s'.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_MININCLUSIVE) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is less than the "
+ "minimum value allowed ('%s').\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_MAXINCLUSIVE) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is greater than the "
+ "maximum value allowed ('%s').\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be greater than "
+ "'%s'.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' must be less than "
+ "'%s'.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_TOTALDIGITS) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' has more "
+ "digits than are allowed ('%s').\n");
+ xmlSchemaErr(actxt, error, node, (const char*) msg, value,
+ facet->value);
+ } else if (facetType == XML_SCHEMA_FACET_FRACTIONDIGITS) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' has more fractional "
+ "digits than are allowed ('%s').\n");
+ xmlSchemaErr(actxt, error, node, (const char*) msg, value,
+ facet->value);
+ } else if (nodeType == XML_ATTRIBUTE_NODE) {
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not facet-valid.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, value, NULL);
+ } else {
+ msg = xmlStrcat(msg, BAD_CAST "The value is not facet-valid.\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, NULL, NULL);
+ }
+ } else {
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ xmlSchemaErr(actxt, error, node, (const char *) msg, str1, str2);
+ }
+ FREE_AND_NULL(str)
+ xmlFree(msg);
+}
+
+#define VERROR(err, type, msg) \
+ xmlSchemaCustomErr(ACTXT_CAST vctxt, err, NULL, type, msg, NULL, NULL);
+
+#define VERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST vctxt, func, msg);
+
+#define PERROR_INT(func, msg) xmlSchemaInternalErr(ACTXT_CAST pctxt, func, msg);
+#define PERROR_INT2(func, msg) xmlSchemaInternalErr(ACTXT_CAST ctxt, func, msg);
+
+#define AERROR_INT(func, msg) xmlSchemaInternalErr(actxt, func, msg);
+
+
+/**
+ * xmlSchemaPMissingAttrErr:
+ * @ctxt: the schema validation context
+ * @ownerDes: the designation of the owner
+ * @ownerName: the name of the owner
+ * @ownerItem: the owner as a schema object
+ * @ownerElem: the owner as an element node
+ * @node: the parent element node of the missing attribute node
+ * @type: the corresponding type of the attribute node
+ *
+ * Reports an illegal attribute.
+ */
+static void
+xmlSchemaPMissingAttrErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr ownerElem,
+ const char *name,
+ const char *message)
+{
+ xmlChar *des = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
+
+ if (message != NULL)
+ xmlSchemaPErr(ctxt, ownerElem, error, "%s: %s.\n", BAD_CAST des, BAD_CAST message);
+ else
+ xmlSchemaPErr(ctxt, ownerElem, error,
+ "%s: The attribute '%s' is required but missing.\n",
+ BAD_CAST des, BAD_CAST name);
+ FREE_AND_NULL(des);
+}
+
+
+/**
+ * xmlSchemaPResCompAttrErr:
+ * @ctxt: the schema validation context
+ * @error: the error code
+ * @ownerDes: the designation of the owner
+ * @ownerItem: the owner as a schema object
+ * @ownerElem: the owner as an element node
+ * @name: the name of the attribute holding the QName
+ * @refName: the referenced local name
+ * @refURI: the referenced namespace URI
+ * @message: optional message
+ *
+ * Used to report QName attribute values that failed to resolve
+ * to schema components.
+ */
+static void
+xmlSchemaPResCompAttrErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr ownerElem,
+ const char *name,
+ const xmlChar *refName,
+ const xmlChar *refURI,
+ xmlSchemaTypeType refType,
+ const char *refTypeStr)
+{
+ xmlChar *des = NULL, *strA = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
+ if (refTypeStr == NULL)
+ refTypeStr = (const char *) xmlSchemaItemTypeToStr(refType);
+ xmlSchemaPErrExt(ctxt, ownerElem, error,
+ NULL, NULL, NULL,
+ "%s, attribute '%s': The QName value '%s' does not resolve to a(n) "
+ "%s.\n", BAD_CAST des, BAD_CAST name,
+ xmlSchemaFormatQName(&strA, refURI, refName),
+ BAD_CAST refTypeStr, NULL);
+ FREE_AND_NULL(des)
+ FREE_AND_NULL(strA)
+}
+
+/**
+ * xmlSchemaPCustomAttrErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @ownerDes: the designation of the owner
+ * @ownerItem: the owner as a schema object
+ * @attr: the illegal attribute node
+ *
+ * Reports an illegal attribute during the parse.
+ */
+static void
+xmlSchemaPCustomAttrErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlChar **ownerDes,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ const char *msg)
+{
+ xmlChar *des = NULL;
+
+ if (ownerDes == NULL)
+ xmlSchemaFormatItemForReport(&des, NULL, ownerItem, attr->parent);
+ else if (*ownerDes == NULL) {
+ xmlSchemaFormatItemForReport(ownerDes, NULL, ownerItem, attr->parent);
+ des = *ownerDes;
+ } else
+ des = *ownerDes;
+ if (attr == NULL) {
+ xmlSchemaPErrExt(ctxt, NULL, error, NULL, NULL, NULL,
+ "%s, attribute '%s': %s.\n",
+ BAD_CAST des, (const xmlChar *) "Unknown",
+ (const xmlChar *) msg, NULL, NULL);
+ } else {
+ xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL,
+ "%s, attribute '%s': %s.\n",
+ BAD_CAST des, attr->name, (const xmlChar *) msg, NULL, NULL);
+ }
+ if (ownerDes == NULL)
+ FREE_AND_NULL(des);
+}
+
+/**
+ * xmlSchemaPIllegalAttrErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @ownerDes: the designation of the attribute's owner
+ * @ownerItem: the attribute's owner item
+ * @attr: the illegal attribute node
+ *
+ * Reports an illegal attribute during the parse.
+ */
+static void
+xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerComp ATTRIBUTE_UNUSED,
+ xmlAttrPtr attr)
+{
+ xmlChar *strA = NULL, *strB = NULL;
+
+ xmlSchemaFormatNodeForError(&strA, ACTXT_CAST ctxt, attr->parent);
+ xmlSchemaErr4(ACTXT_CAST ctxt, error, (xmlNodePtr) attr,
+ "%sThe attribute '%s' is not allowed.\n", BAD_CAST strA,
+ xmlSchemaFormatQNameNs(&strB, attr->ns, attr->name),
+ NULL, NULL);
+ FREE_AND_NULL(strA);
+ FREE_AND_NULL(strB);
+}
+
+/**
+ * xmlSchemaPCustomErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @itemDes: the designation of the schema item
+ * @item: the schema item
+ * @itemElem: the node of the schema item
+ * @message: the error message
+ * @str1: an optional param for the error message
+ * @str2: an optional param for the error message
+ * @str3: an optional param for the error message
+ *
+ * Reports an error during parsing.
+ */
+static void
+xmlSchemaPCustomErrExt(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr item,
+ xmlNodePtr itemElem,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2,
+ const xmlChar *str3)
+{
+ xmlChar *des = NULL, *msg = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, item, itemElem);
+ msg = xmlStrdup(BAD_CAST "%s: ");
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ if ((itemElem == NULL) && (item != NULL))
+ itemElem = WXS_ITEM_NODE(item);
+ xmlSchemaPErrExt(ctxt, itemElem, error, NULL, NULL, NULL,
+ (const char *) msg, BAD_CAST des, str1, str2, str3, NULL);
+ FREE_AND_NULL(des);
+ FREE_AND_NULL(msg);
+}
+
+/**
+ * xmlSchemaPCustomErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @itemDes: the designation of the schema item
+ * @item: the schema item
+ * @itemElem: the node of the schema item
+ * @message: the error message
+ * @str1: the optional param for the error message
+ *
+ * Reports an error during parsing.
+ */
+static void
+xmlSchemaPCustomErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr item,
+ xmlNodePtr itemElem,
+ const char *message,
+ const xmlChar *str1)
+{
+ xmlSchemaPCustomErrExt(ctxt, error, item, itemElem, message,
+ str1, NULL, NULL);
+}
+
+/**
+ * xmlSchemaPAttrUseErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @itemDes: the designation of the schema type
+ * @item: the schema type
+ * @itemElem: the node of the schema type
+ * @attr: the invalid schema attribute
+ * @message: the error message
+ * @str1: the optional param for the error message
+ *
+ * Reports an attribute use error during parsing.
+ */
+static void
+xmlSchemaPAttrUseErr4(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlNodePtr node,
+ xmlSchemaBasicItemPtr ownerItem,
+ const xmlSchemaAttributeUsePtr attruse,
+ const char *message,
+ const xmlChar *str1, const xmlChar *str2,
+ const xmlChar *str3,const xmlChar *str4)
+{
+ xmlChar *str = NULL, *msg = NULL;
+
+ xmlSchemaFormatItemForReport(&msg, NULL, ownerItem, NULL);
+ msg = xmlStrcat(msg, BAD_CAST ", ");
+ msg = xmlStrcat(msg,
+ BAD_CAST xmlSchemaFormatItemForReport(&str, NULL,
+ WXS_BASIC_CAST attruse, NULL));
+ FREE_AND_NULL(str);
+ msg = xmlStrcat(msg, BAD_CAST ": ");
+ msg = xmlStrcat(msg, (const xmlChar *) message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ xmlSchemaErr4(ACTXT_CAST ctxt, error, node,
+ (const char *) msg, str1, str2, str3, str4);
+ xmlFree(msg);
+}
+
+/**
+ * xmlSchemaPIllegalFacetAtomicErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @type: the schema type
+ * @baseType: the base type of type
+ * @facet: the illegal facet
+ *
+ * Reports an illegal facet for atomic simple types.
+ */
+static void
+xmlSchemaPIllegalFacetAtomicErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaTypePtr type,
+ xmlSchemaTypePtr baseType,
+ xmlSchemaFacetPtr facet)
+{
+ xmlChar *des = NULL, *strT = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type, type->node);
+ xmlSchemaPErrExt(ctxt, type->node, error, NULL, NULL, NULL,
+ "%s: The facet '%s' is not allowed on types derived from the "
+ "type %s.\n",
+ BAD_CAST des, xmlSchemaFacetTypeToString(facet->type),
+ xmlSchemaFormatItemForReport(&strT, NULL, WXS_BASIC_CAST baseType, NULL),
+ NULL, NULL);
+ FREE_AND_NULL(des);
+ FREE_AND_NULL(strT);
+}
+
+/**
+ * xmlSchemaPIllegalFacetListUnionErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @itemDes: the designation of the schema item involved
+ * @item: the schema item involved
+ * @facet: the illegal facet
+ *
+ * Reports an illegal facet for <list> and <union>.
+ */
+static void
+xmlSchemaPIllegalFacetListUnionErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet)
+{
+ xmlChar *des = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST type,
+ type->node);
+ xmlSchemaPErr(ctxt, type->node, error,
+ "%s: The facet '%s' is not allowed.\n",
+ BAD_CAST des, xmlSchemaFacetTypeToString(facet->type));
+ FREE_AND_NULL(des);
+}
+
+/**
+ * xmlSchemaPMutualExclAttrErr:
+ * @ctxt: the schema validation context
+ * @error: the error code
+ * @elemDes: the designation of the parent element node
+ * @attr: the bad attribute node
+ * @type: the corresponding type of the attribute node
+ *
+ * Reports an illegal attribute.
+ */
+static void
+xmlSchemaPMutualExclAttrErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ const char *name1,
+ const char *name2)
+{
+ xmlChar *des = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, WXS_BASIC_CAST ownerItem, attr->parent);
+ xmlSchemaPErrExt(ctxt, (xmlNodePtr) attr, error, NULL, NULL, NULL,
+ "%s: The attributes '%s' and '%s' are mutually exclusive.\n",
+ BAD_CAST des, BAD_CAST name1, BAD_CAST name2, NULL, NULL);
+ FREE_AND_NULL(des);
+}
+
+/**
+ * xmlSchemaPSimpleTypeErr:
+ * @ctxt: the schema validation context
+ * @error: the error code
+ * @type: the type specifier
+ * @ownerDes: the designation of the owner
+ * @ownerItem: the schema object if existent
+ * @node: the validated node
+ * @value: the validated value
+ *
+ * Reports a simple type validation error.
+ * TODO: Should this report the value of an element as well?
+ */
+static void
+xmlSchemaPSimpleTypeErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerItem ATTRIBUTE_UNUSED,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type,
+ const char *expected,
+ const xmlChar *value,
+ const char *message,
+ const xmlChar *str1,
+ const xmlChar *str2)
+{
+ xmlChar *msg = NULL;
+
+ xmlSchemaFormatNodeForError(&msg, ACTXT_CAST ctxt, node);
+ if (message == NULL) {
+ /*
+ * Use default messages.
+ */
+ if (type != NULL) {
+ if (node->type == XML_ATTRIBUTE_NODE)
+ msg = xmlStrcat(msg, BAD_CAST "'%s' is not a valid value of ");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "The character content is not a "
+ "valid value of ");
+ if (! xmlSchemaIsGlobalItem(type))
+ msg = xmlStrcat(msg, BAD_CAST "the local ");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "the ");
+
+ if (WXS_IS_ATOMIC(type))
+ msg = xmlStrcat(msg, BAD_CAST "atomic type");
+ else if (WXS_IS_LIST(type))
+ msg = xmlStrcat(msg, BAD_CAST "list type");
+ else if (WXS_IS_UNION(type))
+ msg = xmlStrcat(msg, BAD_CAST "union type");
+
+ if (xmlSchemaIsGlobalItem(type)) {
+ xmlChar *str = NULL;
+ msg = xmlStrcat(msg, BAD_CAST " '");
+ if (type->builtInType != 0) {
+ msg = xmlStrcat(msg, BAD_CAST "xs:");
+ msg = xmlStrcat(msg, type->name);
+ } else
+ msg = xmlStrcat(msg,
+ xmlSchemaFormatQName(&str,
+ type->targetNamespace, type->name));
+ msg = xmlStrcat(msg, BAD_CAST "'.");
+ FREE_AND_NULL(str);
+ }
+ } else {
+ if (node->type == XML_ATTRIBUTE_NODE)
+ msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not valid.");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "The character content is not "
+ "valid.");
+ }
+ if (expected) {
+ msg = xmlStrcat(msg, BAD_CAST " Expected is '");
+ msg = xmlStrcat(msg, BAD_CAST expected);
+ msg = xmlStrcat(msg, BAD_CAST "'.\n");
+ } else
+ msg = xmlStrcat(msg, BAD_CAST "\n");
+ if (node->type == XML_ATTRIBUTE_NODE)
+ xmlSchemaPErr(ctxt, node, error, (const char *) msg, value, NULL);
+ else
+ xmlSchemaPErr(ctxt, node, error, (const char *) msg, NULL, NULL);
+ } else {
+ msg = xmlStrcat(msg, BAD_CAST message);
+ msg = xmlStrcat(msg, BAD_CAST ".\n");
+ xmlSchemaPErrExt(ctxt, node, error, NULL, NULL, NULL,
+ (const char*) msg, str1, str2, NULL, NULL, NULL);
+ }
+ /* Cleanup. */
+ FREE_AND_NULL(msg)
+}
+
+/**
+ * xmlSchemaPContentErr:
+ * @ctxt: the schema parser context
+ * @error: the error code
+ * @onwerDes: the designation of the holder of the content
+ * @ownerItem: the owner item of the holder of the content
+ * @ownerElem: the node of the holder of the content
+ * @child: the invalid child node
+ * @message: the optional error message
+ * @content: the optional string describing the correct content
+ *
+ * Reports an error concerning the content of a schema element.
+ */
+static void
+xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
+ xmlParserErrors error,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr ownerElem,
+ xmlNodePtr child,
+ const char *message,
+ const char *content)
+{
+ xmlChar *des = NULL;
+
+ xmlSchemaFormatItemForReport(&des, NULL, ownerItem, ownerElem);
+ if (message != NULL)
+ xmlSchemaPErr2(ctxt, ownerElem, child, error,
+ "%s: %s.\n",
+ BAD_CAST des, BAD_CAST message);
+ else {
+ if (content != NULL) {
+ xmlSchemaPErr2(ctxt, ownerElem, child, error,
+ "%s: The content is not valid. Expected is %s.\n",
+ BAD_CAST des, BAD_CAST content);
+ } else {
+ xmlSchemaPErr2(ctxt, ownerElem, child, error,
+ "%s: The content is not valid.\n",
+ BAD_CAST des, NULL);
+ }
+ }
+ FREE_AND_NULL(des)
+}
+
+/************************************************************************
+ * *
+ * Streamable error functions *
+ * *
+ ************************************************************************/
+
+
+
+
+/************************************************************************
+ * *
+ * Validation helper functions *
+ * *
+ ************************************************************************/
+
+
+/************************************************************************
+ * *
+ * Allocation functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaNewSchemaForParserCtxt:
+ * @ctxt: a schema validation context
+ *
+ * Allocate a new Schema structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlSchemaPtr
+xmlSchemaNewSchema(xmlSchemaParserCtxtPtr ctxt)
+{
+ xmlSchemaPtr ret;
+
+ ret = (xmlSchemaPtr) xmlMalloc(sizeof(xmlSchema));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating schema", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchema));
+ ret->dict = ctxt->dict;
+ xmlDictReference(ret->dict);
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaNewFacet:
+ *
+ * Allocate a new Facet structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+xmlSchemaFacetPtr
+xmlSchemaNewFacet(void)
+{
+ xmlSchemaFacetPtr ret;
+
+ ret = (xmlSchemaFacetPtr) xmlMalloc(sizeof(xmlSchemaFacet));
+ if (ret == NULL) {
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaFacet));
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaNewAnnot:
+ * @ctxt: a schema validation context
+ * @node: a node
+ *
+ * Allocate a new annotation structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static xmlSchemaAnnotPtr
+xmlSchemaNewAnnot(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlSchemaAnnotPtr ret;
+
+ ret = (xmlSchemaAnnotPtr) xmlMalloc(sizeof(xmlSchemaAnnot));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating annotation", node);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaAnnot));
+ ret->content = node;
+ return (ret);
+}
+
+static xmlSchemaItemListPtr
+xmlSchemaItemListCreate(void)
+{
+ xmlSchemaItemListPtr ret;
+
+ ret = xmlMalloc(sizeof(xmlSchemaItemList));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL,
+ "allocating an item list structure", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaItemList));
+ return (ret);
+}
+
+static void
+xmlSchemaItemListClear(xmlSchemaItemListPtr list)
+{
+ if (list->items != NULL) {
+ xmlFree(list->items);
+ list->items = NULL;
+ }
+ list->nbItems = 0;
+ list->sizeItems = 0;
+}
+
+static int
+xmlSchemaItemListAdd(xmlSchemaItemListPtr list, void *item)
+{
+ if (list->items == NULL) {
+ list->items = (void **) xmlMalloc(
+ 20 * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+ return(-1);
+ }
+ list->sizeItems = 20;
+ } else if (list->sizeItems <= list->nbItems) {
+ list->sizeItems *= 2;
+ list->items = (void **) xmlRealloc(list->items,
+ list->sizeItems * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+ list->sizeItems = 0;
+ return(-1);
+ }
+ }
+ list->items[list->nbItems++] = item;
+ return(0);
+}
+
+static int
+xmlSchemaItemListAddSize(xmlSchemaItemListPtr list,
+ int initialSize,
+ void *item)
+{
+ if (list->items == NULL) {
+ if (initialSize <= 0)
+ initialSize = 1;
+ list->items = (void **) xmlMalloc(
+ initialSize * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+ return(-1);
+ }
+ list->sizeItems = initialSize;
+ } else if (list->sizeItems <= list->nbItems) {
+ list->sizeItems *= 2;
+ list->items = (void **) xmlRealloc(list->items,
+ list->sizeItems * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+ list->sizeItems = 0;
+ return(-1);
+ }
+ }
+ list->items[list->nbItems++] = item;
+ return(0);
+}
+
+static int
+xmlSchemaItemListInsert(xmlSchemaItemListPtr list, void *item, int idx)
+{
+ if (list->items == NULL) {
+ list->items = (void **) xmlMalloc(
+ 20 * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+ return(-1);
+ }
+ list->sizeItems = 20;
+ } else if (list->sizeItems <= list->nbItems) {
+ list->sizeItems *= 2;
+ list->items = (void **) xmlRealloc(list->items,
+ list->sizeItems * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+ list->sizeItems = 0;
+ return(-1);
+ }
+ }
+ /*
+ * Just append if the index is greater/equal than the item count.
+ */
+ if (idx >= list->nbItems) {
+ list->items[list->nbItems++] = item;
+ } else {
+ int i;
+ for (i = list->nbItems; i > idx; i--)
+ list->items[i] = list->items[i-1];
+ list->items[idx] = item;
+ list->nbItems++;
+ }
+ return(0);
+}
+
+#if 0 /* enable if ever needed */
+static int
+xmlSchemaItemListInsertSize(xmlSchemaItemListPtr list,
+ int initialSize,
+ void *item,
+ int idx)
+{
+ if (list->items == NULL) {
+ if (initialSize <= 0)
+ initialSize = 1;
+ list->items = (void **) xmlMalloc(
+ initialSize * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating new item list", NULL);
+ return(-1);
+ }
+ list->sizeItems = initialSize;
+ } else if (list->sizeItems <= list->nbItems) {
+ list->sizeItems *= 2;
+ list->items = (void **) xmlRealloc(list->items,
+ list->sizeItems * sizeof(void *));
+ if (list->items == NULL) {
+ xmlSchemaPErrMemory(NULL, "growing item list", NULL);
+ list->sizeItems = 0;
+ return(-1);
+ }
+ }
+ /*
+ * Just append if the index is greater/equal than the item count.
+ */
+ if (idx >= list->nbItems) {
+ list->items[list->nbItems++] = item;
+ } else {
+ int i;
+ for (i = list->nbItems; i > idx; i--)
+ list->items[i] = list->items[i-1];
+ list->items[idx] = item;
+ list->nbItems++;
+ }
+ return(0);
+}
+#endif
+
+static int
+xmlSchemaItemListRemove(xmlSchemaItemListPtr list, int idx)
+{
+ int i;
+ if ((list->items == NULL) || (idx >= list->nbItems)) {
+ xmlSchemaPSimpleErr("Internal error: xmlSchemaItemListRemove, "
+ "index error.\n");
+ return(-1);
+ }
+
+ if (list->nbItems == 1) {
+ /* TODO: Really free the list? */
+ xmlFree(list->items);
+ list->items = NULL;
+ list->nbItems = 0;
+ list->sizeItems = 0;
+ } else if (list->nbItems -1 == idx) {
+ list->nbItems--;
+ } else {
+ for (i = idx; i < list->nbItems -1; i++)
+ list->items[i] = list->items[i+1];
+ list->nbItems--;
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaItemListFree:
+ * @annot: a schema type structure
+ *
+ * Deallocate a annotation structure
+ */
+static void
+xmlSchemaItemListFree(xmlSchemaItemListPtr list)
+{
+ if (list == NULL)
+ return;
+ if (list->items != NULL)
+ xmlFree(list->items);
+ xmlFree(list);
+}
+
+static void
+xmlSchemaBucketFree(xmlSchemaBucketPtr bucket)
+{
+ if (bucket == NULL)
+ return;
+ if (bucket->globals != NULL) {
+ xmlSchemaComponentListFree(bucket->globals);
+ xmlSchemaItemListFree(bucket->globals);
+ }
+ if (bucket->locals != NULL) {
+ xmlSchemaComponentListFree(bucket->locals);
+ xmlSchemaItemListFree(bucket->locals);
+ }
+ if (bucket->relations != NULL) {
+ xmlSchemaSchemaRelationPtr prev, cur = bucket->relations;
+ do {
+ prev = cur;
+ cur = cur->next;
+ xmlFree(prev);
+ } while (cur != NULL);
+ }
+ if ((! bucket->preserveDoc) && (bucket->doc != NULL)) {
+ xmlFreeDoc(bucket->doc);
+ }
+ if (bucket->type == XML_SCHEMA_SCHEMA_IMPORT) {
+ if (WXS_IMPBUCKET(bucket)->schema != NULL)
+ xmlSchemaFree(WXS_IMPBUCKET(bucket)->schema);
+ }
+ xmlFree(bucket);
+}
+
+static xmlSchemaBucketPtr
+xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
+ int type, const xmlChar *targetNamespace)
+{
+ xmlSchemaBucketPtr ret;
+ int size;
+ xmlSchemaPtr mainSchema;
+
+ if (WXS_CONSTRUCTOR(pctxt)->mainSchema == NULL) {
+ PERROR_INT("xmlSchemaBucketCreate",
+ "no main schema on constructor");
+ return(NULL);
+ }
+ mainSchema = WXS_CONSTRUCTOR(pctxt)->mainSchema;
+ /* Create the schema bucket. */
+ if (WXS_IS_BUCKET_INCREDEF(type))
+ size = sizeof(xmlSchemaInclude);
+ else
+ size = sizeof(xmlSchemaImport);
+ ret = (xmlSchemaBucketPtr) xmlMalloc(size);
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating schema bucket", NULL);
+ return(NULL);
+ }
+ memset(ret, 0, size);
+ ret->targetNamespace = targetNamespace;
+ ret->type = type;
+ ret->globals = xmlSchemaItemListCreate();
+ if (ret->globals == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->locals = xmlSchemaItemListCreate();
+ if (ret->locals == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ /*
+ * The following will assure that only the first bucket is marked as
+ * XML_SCHEMA_SCHEMA_MAIN and it points to the *main* schema.
+ * For each following import buckets an xmlSchema will be created.
+ * An xmlSchema will be created for every distinct targetNamespace.
+ * We assign the targetNamespace to the schemata here.
+ */
+ if (! WXS_HAS_BUCKETS(pctxt)) {
+ if (WXS_IS_BUCKET_INCREDEF(type)) {
+ PERROR_INT("xmlSchemaBucketCreate",
+ "first bucket but it's an include or redefine");
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ }
+ /* Force the type to be XML_SCHEMA_SCHEMA_MAIN. */
+ ret->type = XML_SCHEMA_SCHEMA_MAIN;
+ /* Point to the *main* schema. */
+ WXS_CONSTRUCTOR(pctxt)->mainBucket = ret;
+ WXS_IMPBUCKET(ret)->schema = mainSchema;
+ /*
+ * Ensure that the main schema gets a targetNamespace.
+ */
+ mainSchema->targetNamespace = targetNamespace;
+ } else {
+ if (type == XML_SCHEMA_SCHEMA_MAIN) {
+ PERROR_INT("xmlSchemaBucketCreate",
+ "main bucket but it's not the first one");
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ } else if (type == XML_SCHEMA_SCHEMA_IMPORT) {
+ /*
+ * Create a schema for imports and assign the
+ * targetNamespace.
+ */
+ WXS_IMPBUCKET(ret)->schema = xmlSchemaNewSchema(pctxt);
+ if (WXS_IMPBUCKET(ret)->schema == NULL) {
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ }
+ WXS_IMPBUCKET(ret)->schema->targetNamespace = targetNamespace;
+ }
+ }
+ if (WXS_IS_BUCKET_IMPMAIN(type)) {
+ int res;
+ /*
+ * Imports go into the "schemasImports" slot of the main *schema*.
+ * Note that we create an import entry for the main schema as well; i.e.,
+ * even if there's only one schema, we'll get an import.
+ */
+ if (mainSchema->schemasImports == NULL) {
+ mainSchema->schemasImports = xmlHashCreateDict(5,
+ WXS_CONSTRUCTOR(pctxt)->dict);
+ if (mainSchema->schemasImports == NULL) {
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ }
+ }
+ if (targetNamespace == NULL)
+ res = xmlHashAddEntry(mainSchema->schemasImports,
+ XML_SCHEMAS_NO_NAMESPACE, ret);
+ else
+ res = xmlHashAddEntry(mainSchema->schemasImports,
+ targetNamespace, ret);
+ if (res != 0) {
+ PERROR_INT("xmlSchemaBucketCreate",
+ "failed to add the schema bucket to the hash");
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ }
+ } else {
+ /* Set the @ownerImport of an include bucket. */
+ if (WXS_IS_BUCKET_IMPMAIN(WXS_CONSTRUCTOR(pctxt)->bucket->type))
+ WXS_INCBUCKET(ret)->ownerImport =
+ WXS_IMPBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket);
+ else
+ WXS_INCBUCKET(ret)->ownerImport =
+ WXS_INCBUCKET(WXS_CONSTRUCTOR(pctxt)->bucket)->ownerImport;
+
+ /* Includes got into the "includes" slot of the *main* schema. */
+ if (mainSchema->includes == NULL) {
+ mainSchema->includes = xmlSchemaItemListCreate();
+ if (mainSchema->includes == NULL) {
+ xmlSchemaBucketFree(ret);
+ return(NULL);
+ }
+ }
+ xmlSchemaItemListAdd(mainSchema->includes, ret);
+ }
+ /*
+ * Add to list of all buckets; this is used for lookup
+ * during schema construction time only.
+ */
+ if (xmlSchemaItemListAdd(WXS_CONSTRUCTOR(pctxt)->buckets, ret) == -1)
+ return(NULL);
+ return(ret);
+}
+
+static int
+xmlSchemaAddItemSize(xmlSchemaItemListPtr *list, int initialSize, void *item)
+{
+ if (*list == NULL) {
+ *list = xmlSchemaItemListCreate();
+ if (*list == NULL)
+ return(-1);
+ }
+ xmlSchemaItemListAddSize(*list, initialSize, item);
+ return(0);
+}
+
+/**
+ * xmlSchemaFreeAnnot:
+ * @annot: a schema type structure
+ *
+ * Deallocate a annotation structure
+ */
+static void
+xmlSchemaFreeAnnot(xmlSchemaAnnotPtr annot)
+{
+ if (annot == NULL)
+ return;
+ if (annot->next == NULL) {
+ xmlFree(annot);
+ } else {
+ xmlSchemaAnnotPtr prev;
+
+ do {
+ prev = annot;
+ annot = annot->next;
+ xmlFree(prev);
+ } while (annot != NULL);
+ }
+}
+
+/**
+ * xmlSchemaFreeNotation:
+ * @schema: a schema notation structure
+ *
+ * Deallocate a Schema Notation structure.
+ */
+static void
+xmlSchemaFreeNotation(xmlSchemaNotationPtr nota)
+{
+ if (nota == NULL)
+ return;
+ xmlFree(nota);
+}
+
+/**
+ * xmlSchemaFreeAttribute:
+ * @attr: an attribute declaration
+ *
+ * Deallocates an attribute declaration structure.
+ */
+static void
+xmlSchemaFreeAttribute(xmlSchemaAttributePtr attr)
+{
+ if (attr == NULL)
+ return;
+ if (attr->annot != NULL)
+ xmlSchemaFreeAnnot(attr->annot);
+ if (attr->defVal != NULL)
+ xmlSchemaFreeValue(attr->defVal);
+ xmlFree(attr);
+}
+
+/**
+ * xmlSchemaFreeAttributeUse:
+ * @use: an attribute use
+ *
+ * Deallocates an attribute use structure.
+ */
+static void
+xmlSchemaFreeAttributeUse(xmlSchemaAttributeUsePtr use)
+{
+ if (use == NULL)
+ return;
+ if (use->annot != NULL)
+ xmlSchemaFreeAnnot(use->annot);
+ if (use->defVal != NULL)
+ xmlSchemaFreeValue(use->defVal);
+ xmlFree(use);
+}
+
+/**
+ * xmlSchemaFreeAttributeUseProhib:
+ * @prohib: an attribute use prohibition
+ *
+ * Deallocates an attribute use structure.
+ */
+static void
+xmlSchemaFreeAttributeUseProhib(xmlSchemaAttributeUseProhibPtr prohib)
+{
+ if (prohib == NULL)
+ return;
+ xmlFree(prohib);
+}
+
+/**
+ * xmlSchemaFreeWildcardNsSet:
+ * set: a schema wildcard namespace
+ *
+ * Deallocates a list of wildcard constraint structures.
+ */
+static void
+xmlSchemaFreeWildcardNsSet(xmlSchemaWildcardNsPtr set)
+{
+ xmlSchemaWildcardNsPtr next;
+
+ while (set != NULL) {
+ next = set->next;
+ xmlFree(set);
+ set = next;
+ }
+}
+
+/**
+ * xmlSchemaFreeWildcard:
+ * @wildcard: a wildcard structure
+ *
+ * Deallocates a wildcard structure.
+ */
+void
+xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard)
+{
+ if (wildcard == NULL)
+ return;
+ if (wildcard->annot != NULL)
+ xmlSchemaFreeAnnot(wildcard->annot);
+ if (wildcard->nsSet != NULL)
+ xmlSchemaFreeWildcardNsSet(wildcard->nsSet);
+ if (wildcard->negNsSet != NULL)
+ xmlFree(wildcard->negNsSet);
+ xmlFree(wildcard);
+}
+
+/**
+ * xmlSchemaFreeAttributeGroup:
+ * @schema: a schema attribute group structure
+ *
+ * Deallocate a Schema Attribute Group structure.
+ */
+static void
+xmlSchemaFreeAttributeGroup(xmlSchemaAttributeGroupPtr attrGr)
+{
+ if (attrGr == NULL)
+ return;
+ if (attrGr->annot != NULL)
+ xmlSchemaFreeAnnot(attrGr->annot);
+ if (attrGr->attrUses != NULL)
+ xmlSchemaItemListFree(WXS_LIST_CAST attrGr->attrUses);
+ xmlFree(attrGr);
+}
+
+/**
+ * xmlSchemaFreeQNameRef:
+ * @item: a QName reference structure
+ *
+ * Deallocatea a QName reference structure.
+ */
+static void
+xmlSchemaFreeQNameRef(xmlSchemaQNameRefPtr item)
+{
+ xmlFree(item);
+}
+
+/**
+ * xmlSchemaFreeTypeLinkList:
+ * @alink: a type link
+ *
+ * Deallocate a list of types.
+ */
+static void
+xmlSchemaFreeTypeLinkList(xmlSchemaTypeLinkPtr link)
+{
+ xmlSchemaTypeLinkPtr next;
+
+ while (link != NULL) {
+ next = link->next;
+ xmlFree(link);
+ link = next;
+ }
+}
+
+static void
+xmlSchemaFreeIDCStateObjList(xmlSchemaIDCStateObjPtr sto)
+{
+ xmlSchemaIDCStateObjPtr next;
+ while (sto != NULL) {
+ next = sto->next;
+ if (sto->history != NULL)
+ xmlFree(sto->history);
+ if (sto->xpathCtxt != NULL)
+ xmlFreeStreamCtxt((xmlStreamCtxtPtr) sto->xpathCtxt);
+ xmlFree(sto);
+ sto = next;
+ }
+}
+
+/**
+ * xmlSchemaFreeIDC:
+ * @idc: a identity-constraint definition
+ *
+ * Deallocates an identity-constraint definition.
+ */
+static void
+xmlSchemaFreeIDC(xmlSchemaIDCPtr idcDef)
+{
+ xmlSchemaIDCSelectPtr cur, prev;
+
+ if (idcDef == NULL)
+ return;
+ if (idcDef->annot != NULL)
+ xmlSchemaFreeAnnot(idcDef->annot);
+ /* Selector */
+ if (idcDef->selector != NULL) {
+ if (idcDef->selector->xpathComp != NULL)
+ xmlFreePattern((xmlPatternPtr) idcDef->selector->xpathComp);
+ xmlFree(idcDef->selector);
+ }
+ /* Fields */
+ if (idcDef->fields != NULL) {
+ cur = idcDef->fields;
+ do {
+ prev = cur;
+ cur = cur->next;
+ if (prev->xpathComp != NULL)
+ xmlFreePattern((xmlPatternPtr) prev->xpathComp);
+ xmlFree(prev);
+ } while (cur != NULL);
+ }
+ xmlFree(idcDef);
+}
+
+/**
+ * xmlSchemaFreeElement:
+ * @schema: a schema element structure
+ *
+ * Deallocate a Schema Element structure.
+ */
+static void
+xmlSchemaFreeElement(xmlSchemaElementPtr elem)
+{
+ if (elem == NULL)
+ return;
+ if (elem->annot != NULL)
+ xmlSchemaFreeAnnot(elem->annot);
+ if (elem->contModel != NULL)
+ xmlRegFreeRegexp(elem->contModel);
+ if (elem->defVal != NULL)
+ xmlSchemaFreeValue(elem->defVal);
+ xmlFree(elem);
+}
+
+/**
+ * xmlSchemaFreeFacet:
+ * @facet: a schema facet structure
+ *
+ * Deallocate a Schema Facet structure.
+ */
+void
+xmlSchemaFreeFacet(xmlSchemaFacetPtr facet)
+{
+ if (facet == NULL)
+ return;
+ if (facet->val != NULL)
+ xmlSchemaFreeValue(facet->val);
+ if (facet->regexp != NULL)
+ xmlRegFreeRegexp(facet->regexp);
+ if (facet->annot != NULL)
+ xmlSchemaFreeAnnot(facet->annot);
+ xmlFree(facet);
+}
+
+/**
+ * xmlSchemaFreeType:
+ * @type: a schema type structure
+ *
+ * Deallocate a Schema Type structure.
+ */
+void
+xmlSchemaFreeType(xmlSchemaTypePtr type)
+{
+ if (type == NULL)
+ return;
+ if (type->annot != NULL)
+ xmlSchemaFreeAnnot(type->annot);
+ if (type->facets != NULL) {
+ xmlSchemaFacetPtr facet, next;
+
+ facet = type->facets;
+ while (facet != NULL) {
+ next = facet->next;
+ xmlSchemaFreeFacet(facet);
+ facet = next;
+ }
+ }
+ if (type->attrUses != NULL)
+ xmlSchemaItemListFree((xmlSchemaItemListPtr) type->attrUses);
+ if (type->memberTypes != NULL)
+ xmlSchemaFreeTypeLinkList(type->memberTypes);
+ if (type->facetSet != NULL) {
+ xmlSchemaFacetLinkPtr next, link;
+
+ link = type->facetSet;
+ do {
+ next = link->next;
+ xmlFree(link);
+ link = next;
+ } while (link != NULL);
+ }
+ if (type->contModel != NULL)
+ xmlRegFreeRegexp(type->contModel);
+ xmlFree(type);
+}
+
+/**
+ * xmlSchemaFreeModelGroupDef:
+ * @item: a schema model group definition
+ *
+ * Deallocates a schema model group definition.
+ */
+static void
+xmlSchemaFreeModelGroupDef(xmlSchemaModelGroupDefPtr item)
+{
+ if (item->annot != NULL)
+ xmlSchemaFreeAnnot(item->annot);
+ xmlFree(item);
+}
+
+/**
+ * xmlSchemaFreeModelGroup:
+ * @item: a schema model group
+ *
+ * Deallocates a schema model group structure.
+ */
+static void
+xmlSchemaFreeModelGroup(xmlSchemaModelGroupPtr item)
+{
+ if (item->annot != NULL)
+ xmlSchemaFreeAnnot(item->annot);
+ xmlFree(item);
+}
+
+static void
+xmlSchemaComponentListFree(xmlSchemaItemListPtr list)
+{
+ if ((list == NULL) || (list->nbItems == 0))
+ return;
+ {
+ xmlSchemaTreeItemPtr item;
+ xmlSchemaTreeItemPtr *items = (xmlSchemaTreeItemPtr *) list->items;
+ int i;
+
+ for (i = 0; i < list->nbItems; i++) {
+ item = items[i];
+ if (item == NULL)
+ continue;
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SIMPLE:
+ case XML_SCHEMA_TYPE_COMPLEX:
+ xmlSchemaFreeType((xmlSchemaTypePtr) item);
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ xmlSchemaFreeAttribute((xmlSchemaAttributePtr) item);
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ xmlSchemaFreeAttributeUse((xmlSchemaAttributeUsePtr) item);
+ break;
+ case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+ xmlSchemaFreeAttributeUseProhib(
+ (xmlSchemaAttributeUseProhibPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_ELEMENT:
+ xmlSchemaFreeElement((xmlSchemaElementPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_PARTICLE:
+ if (item->annot != NULL)
+ xmlSchemaFreeAnnot(item->annot);
+ xmlFree(item);
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ xmlSchemaFreeModelGroup((xmlSchemaModelGroupPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ xmlSchemaFreeAttributeGroup(
+ (xmlSchemaAttributeGroupPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ xmlSchemaFreeModelGroupDef(
+ (xmlSchemaModelGroupDefPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_ANY:
+ case XML_SCHEMA_TYPE_ANY_ATTRIBUTE:
+ xmlSchemaFreeWildcard((xmlSchemaWildcardPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ xmlSchemaFreeIDC((xmlSchemaIDCPtr) item);
+ break;
+ case XML_SCHEMA_TYPE_NOTATION:
+ xmlSchemaFreeNotation((xmlSchemaNotationPtr) item);
+ break;
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ xmlSchemaFreeQNameRef((xmlSchemaQNameRefPtr) item);
+ break;
+ default: {
+ /* TODO: This should never be hit. */
+ xmlSchemaPSimpleInternalErr(NULL,
+ "Internal error: xmlSchemaComponentListFree, "
+ "unexpected component type '%s'\n",
+ (const xmlChar *) WXS_ITEM_TYPE_NAME(item));
+ }
+ break;
+ }
+ }
+ list->nbItems = 0;
+ }
+}
+
+/**
+ * xmlSchemaFree:
+ * @schema: a schema structure
+ *
+ * Deallocate a Schema structure.
+ */
+void
+xmlSchemaFree(xmlSchemaPtr schema)
+{
+ if (schema == NULL)
+ return;
+ /* @volatiles is not used anymore :-/ */
+ if (schema->volatiles != NULL)
+ TODO
+ /*
+ * Note that those slots are not responsible for freeing
+ * schema components anymore; this will now be done by
+ * the schema buckets.
+ */
+ if (schema->notaDecl != NULL)
+ xmlHashFree(schema->notaDecl, NULL);
+ if (schema->attrDecl != NULL)
+ xmlHashFree(schema->attrDecl, NULL);
+ if (schema->attrgrpDecl != NULL)
+ xmlHashFree(schema->attrgrpDecl, NULL);
+ if (schema->elemDecl != NULL)
+ xmlHashFree(schema->elemDecl, NULL);
+ if (schema->typeDecl != NULL)
+ xmlHashFree(schema->typeDecl, NULL);
+ if (schema->groupDecl != NULL)
+ xmlHashFree(schema->groupDecl, NULL);
+ if (schema->idcDef != NULL)
+ xmlHashFree(schema->idcDef, NULL);
+
+ if (schema->schemasImports != NULL)
+ xmlHashFree(schema->schemasImports,
+ (xmlHashDeallocator) xmlSchemaBucketFree);
+ if (schema->includes != NULL) {
+ xmlSchemaItemListPtr list = (xmlSchemaItemListPtr) schema->includes;
+ int i;
+ for (i = 0; i < list->nbItems; i++) {
+ xmlSchemaBucketFree((xmlSchemaBucketPtr) list->items[i]);
+ }
+ xmlSchemaItemListFree(list);
+ }
+ if (schema->annot != NULL)
+ xmlSchemaFreeAnnot(schema->annot);
+ /* Never free the doc here, since this will be done by the buckets. */
+
+ xmlDictFree(schema->dict);
+ xmlFree(schema);
+}
+
+/************************************************************************
+ * *
+ * Debug functions *
+ * *
+ ************************************************************************/
+
+#ifdef LIBXML_OUTPUT_ENABLED
+
+static void
+xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output); /* forward */
+
+/**
+ * xmlSchemaElementDump:
+ * @elem: an element
+ * @output: the file output
+ *
+ * Dump the element
+ */
+static void
+xmlSchemaElementDump(xmlSchemaElementPtr elem, FILE * output,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ const xmlChar * namespace ATTRIBUTE_UNUSED,
+ const xmlChar * context ATTRIBUTE_UNUSED)
+{
+ if (elem == NULL)
+ return;
+
+
+ fprintf(output, "Element");
+ if (elem->flags & XML_SCHEMAS_ELEM_GLOBAL)
+ fprintf(output, " (global)");
+ fprintf(output, ": '%s' ", elem->name);
+ if (namespace != NULL)
+ fprintf(output, "ns '%s'", namespace);
+ fprintf(output, "\n");
+#if 0
+ if ((elem->minOccurs != 1) || (elem->maxOccurs != 1)) {
+ fprintf(output, " min %d ", elem->minOccurs);
+ if (elem->maxOccurs >= UNBOUNDED)
+ fprintf(output, "max: unbounded\n");
+ else if (elem->maxOccurs != 1)
+ fprintf(output, "max: %d\n", elem->maxOccurs);
+ else
+ fprintf(output, "\n");
+ }
+#endif
+ /*
+ * Misc other properties.
+ */
+ if ((elem->flags & XML_SCHEMAS_ELEM_NILLABLE) ||
+ (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT) ||
+ (elem->flags & XML_SCHEMAS_ELEM_FIXED) ||
+ (elem->flags & XML_SCHEMAS_ELEM_DEFAULT)) {
+ fprintf(output, " props: ");
+ if (elem->flags & XML_SCHEMAS_ELEM_FIXED)
+ fprintf(output, "[fixed] ");
+ if (elem->flags & XML_SCHEMAS_ELEM_DEFAULT)
+ fprintf(output, "[default] ");
+ if (elem->flags & XML_SCHEMAS_ELEM_ABSTRACT)
+ fprintf(output, "[abstract] ");
+ if (elem->flags & XML_SCHEMAS_ELEM_NILLABLE)
+ fprintf(output, "[nillable] ");
+ fprintf(output, "\n");
+ }
+ /*
+ * Default/fixed value.
+ */
+ if (elem->value != NULL)
+ fprintf(output, " value: '%s'\n", elem->value);
+ /*
+ * Type.
+ */
+ if (elem->namedType != NULL) {
+ fprintf(output, " type: '%s' ", elem->namedType);
+ if (elem->namedTypeNs != NULL)
+ fprintf(output, "ns '%s'\n", elem->namedTypeNs);
+ else
+ fprintf(output, "\n");
+ } else if (elem->subtypes != NULL) {
+ /*
+ * Dump local types.
+ */
+ xmlSchemaTypeDump(elem->subtypes, output);
+ }
+ /*
+ * Substitution group.
+ */
+ if (elem->substGroup != NULL) {
+ fprintf(output, " substitutionGroup: '%s' ", elem->substGroup);
+ if (elem->substGroupNs != NULL)
+ fprintf(output, "ns '%s'\n", elem->substGroupNs);
+ else
+ fprintf(output, "\n");
+ }
+}
+
+/**
+ * xmlSchemaAnnotDump:
+ * @output: the file output
+ * @annot: a annotation
+ *
+ * Dump the annotation
+ */
+static void
+xmlSchemaAnnotDump(FILE * output, xmlSchemaAnnotPtr annot)
+{
+ xmlChar *content;
+
+ if (annot == NULL)
+ return;
+
+ content = xmlNodeGetContent(annot->content);
+ if (content != NULL) {
+ fprintf(output, " Annot: %s\n", content);
+ xmlFree(content);
+ } else
+ fprintf(output, " Annot: empty\n");
+}
+
+/**
+ * xmlSchemaContentModelDump:
+ * @particle: the schema particle
+ * @output: the file output
+ * @depth: the depth used for intentation
+ *
+ * Dump a SchemaType structure
+ */
+static void
+xmlSchemaContentModelDump(xmlSchemaParticlePtr particle, FILE * output, int depth)
+{
+ xmlChar *str = NULL;
+ xmlSchemaTreeItemPtr term;
+ char shift[100];
+ int i;
+
+ if (particle == NULL)
+ return;
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+ fprintf(output, "%s", shift);
+ if (particle->children == NULL) {
+ fprintf(output, "MISSING particle term\n");
+ return;
+ }
+ term = particle->children;
+ if (term == NULL) {
+ fprintf(output, "(NULL)");
+ } else {
+ switch (term->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ fprintf(output, "ELEM '%s'", xmlSchemaFormatQName(&str,
+ ((xmlSchemaElementPtr)term)->targetNamespace,
+ ((xmlSchemaElementPtr)term)->name));
+ FREE_AND_NULL(str);
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ fprintf(output, "SEQUENCE");
+ break;
+ case XML_SCHEMA_TYPE_CHOICE:
+ fprintf(output, "CHOICE");
+ break;
+ case XML_SCHEMA_TYPE_ALL:
+ fprintf(output, "ALL");
+ break;
+ case XML_SCHEMA_TYPE_ANY:
+ fprintf(output, "ANY");
+ break;
+ default:
+ fprintf(output, "UNKNOWN\n");
+ return;
+ }
+ }
+ if (particle->minOccurs != 1)
+ fprintf(output, " min: %d", particle->minOccurs);
+ if (particle->maxOccurs >= UNBOUNDED)
+ fprintf(output, " max: unbounded");
+ else if (particle->maxOccurs != 1)
+ fprintf(output, " max: %d", particle->maxOccurs);
+ fprintf(output, "\n");
+ if (term &&
+ ((term->type == XML_SCHEMA_TYPE_SEQUENCE) ||
+ (term->type == XML_SCHEMA_TYPE_CHOICE) ||
+ (term->type == XML_SCHEMA_TYPE_ALL)) &&
+ (term->children != NULL)) {
+ xmlSchemaContentModelDump((xmlSchemaParticlePtr) term->children,
+ output, depth +1);
+ }
+ if (particle->next != NULL)
+ xmlSchemaContentModelDump((xmlSchemaParticlePtr) particle->next,
+ output, depth);
+}
+
+/**
+ * xmlSchemaAttrUsesDump:
+ * @uses: attribute uses list
+ * @output: the file output
+ *
+ * Dumps a list of attribute use components.
+ */
+static void
+xmlSchemaAttrUsesDump(xmlSchemaItemListPtr uses, FILE * output)
+{
+ xmlSchemaAttributeUsePtr use;
+ xmlSchemaAttributeUseProhibPtr prohib;
+ xmlSchemaQNameRefPtr ref;
+ const xmlChar *name, *tns;
+ xmlChar *str = NULL;
+ int i;
+
+ if ((uses == NULL) || (uses->nbItems == 0))
+ return;
+
+ fprintf(output, " attributes:\n");
+ for (i = 0; i < uses->nbItems; i++) {
+ use = uses->items[i];
+ if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) {
+ fprintf(output, " [prohibition] ");
+ prohib = (xmlSchemaAttributeUseProhibPtr) use;
+ name = prohib->name;
+ tns = prohib->targetNamespace;
+ } else if (use->type == XML_SCHEMA_EXTRA_QNAMEREF) {
+ fprintf(output, " [reference] ");
+ ref = (xmlSchemaQNameRefPtr) use;
+ name = ref->name;
+ tns = ref->targetNamespace;
+ } else {
+ fprintf(output, " [use] ");
+ name = WXS_ATTRUSE_DECL_NAME(use);
+ tns = WXS_ATTRUSE_DECL_TNS(use);
+ }
+ fprintf(output, "'%s'\n",
+ (const char *) xmlSchemaFormatQName(&str, tns, name));
+ FREE_AND_NULL(str);
+ }
+}
+
+/**
+ * xmlSchemaTypeDump:
+ * @output: the file output
+ * @type: a type structure
+ *
+ * Dump a SchemaType structure
+ */
+static void
+xmlSchemaTypeDump(xmlSchemaTypePtr type, FILE * output)
+{
+ if (type == NULL) {
+ fprintf(output, "Type: NULL\n");
+ return;
+ }
+ fprintf(output, "Type: ");
+ if (type->name != NULL)
+ fprintf(output, "'%s' ", type->name);
+ else
+ fprintf(output, "(no name) ");
+ if (type->targetNamespace != NULL)
+ fprintf(output, "ns '%s' ", type->targetNamespace);
+ switch (type->type) {
+ case XML_SCHEMA_TYPE_BASIC:
+ fprintf(output, "[basic] ");
+ break;
+ case XML_SCHEMA_TYPE_SIMPLE:
+ fprintf(output, "[simple] ");
+ break;
+ case XML_SCHEMA_TYPE_COMPLEX:
+ fprintf(output, "[complex] ");
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ fprintf(output, "[sequence] ");
+ break;
+ case XML_SCHEMA_TYPE_CHOICE:
+ fprintf(output, "[choice] ");
+ break;
+ case XML_SCHEMA_TYPE_ALL:
+ fprintf(output, "[all] ");
+ break;
+ case XML_SCHEMA_TYPE_UR:
+ fprintf(output, "[ur] ");
+ break;
+ case XML_SCHEMA_TYPE_RESTRICTION:
+ fprintf(output, "[restriction] ");
+ break;
+ case XML_SCHEMA_TYPE_EXTENSION:
+ fprintf(output, "[extension] ");
+ break;
+ default:
+ fprintf(output, "[unknown type %d] ", type->type);
+ break;
+ }
+ fprintf(output, "content: ");
+ switch (type->contentType) {
+ case XML_SCHEMA_CONTENT_UNKNOWN:
+ fprintf(output, "[unknown] ");
+ break;
+ case XML_SCHEMA_CONTENT_EMPTY:
+ fprintf(output, "[empty] ");
+ break;
+ case XML_SCHEMA_CONTENT_ELEMENTS:
+ fprintf(output, "[element] ");
+ break;
+ case XML_SCHEMA_CONTENT_MIXED:
+ fprintf(output, "[mixed] ");
+ break;
+ case XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS:
+ /* not used. */
+ break;
+ case XML_SCHEMA_CONTENT_BASIC:
+ fprintf(output, "[basic] ");
+ break;
+ case XML_SCHEMA_CONTENT_SIMPLE:
+ fprintf(output, "[simple] ");
+ break;
+ case XML_SCHEMA_CONTENT_ANY:
+ fprintf(output, "[any] ");
+ break;
+ }
+ fprintf(output, "\n");
+ if (type->base != NULL) {
+ fprintf(output, " base type: '%s'", type->base);
+ if (type->baseNs != NULL)
+ fprintf(output, " ns '%s'\n", type->baseNs);
+ else
+ fprintf(output, "\n");
+ }
+ if (type->attrUses != NULL)
+ xmlSchemaAttrUsesDump(type->attrUses, output);
+ if (type->annot != NULL)
+ xmlSchemaAnnotDump(output, type->annot);
+#ifdef DUMP_CONTENT_MODEL
+ if ((type->type == XML_SCHEMA_TYPE_COMPLEX) &&
+ (type->subtypes != NULL)) {
+ xmlSchemaContentModelDump((xmlSchemaParticlePtr) type->subtypes,
+ output, 1);
+ }
+#endif
+}
+
+/**
+ * xmlSchemaDump:
+ * @output: the file output
+ * @schema: a schema structure
+ *
+ * Dump a Schema structure.
+ */
+void
+xmlSchemaDump(FILE * output, xmlSchemaPtr schema)
+{
+ if (output == NULL)
+ return;
+ if (schema == NULL) {
+ fprintf(output, "Schemas: NULL\n");
+ return;
+ }
+ fprintf(output, "Schemas: ");
+ if (schema->name != NULL)
+ fprintf(output, "%s, ", schema->name);
+ else
+ fprintf(output, "no name, ");
+ if (schema->targetNamespace != NULL)
+ fprintf(output, "%s", (const char *) schema->targetNamespace);
+ else
+ fprintf(output, "no target namespace");
+ fprintf(output, "\n");
+ if (schema->annot != NULL)
+ xmlSchemaAnnotDump(output, schema->annot);
+ xmlHashScan(schema->typeDecl, (xmlHashScanner) xmlSchemaTypeDump,
+ output);
+ xmlHashScanFull(schema->elemDecl,
+ (xmlHashScannerFull) xmlSchemaElementDump, output);
+}
+
+#ifdef DEBUG_IDC_NODE_TABLE
+/**
+ * xmlSchemaDebugDumpIDCTable:
+ * @vctxt: the WXS validation context
+ *
+ * Displays the current IDC table for debug purposes.
+ */
+static void
+xmlSchemaDebugDumpIDCTable(FILE * output,
+ const xmlChar *namespaceName,
+ const xmlChar *localName,
+ xmlSchemaPSVIIDCBindingPtr bind)
+{
+ xmlChar *str = NULL;
+ const xmlChar *value;
+ xmlSchemaPSVIIDCNodePtr tab;
+ xmlSchemaPSVIIDCKeyPtr key;
+ int i, j, res;
+
+ fprintf(output, "IDC: TABLES on '%s'\n",
+ xmlSchemaFormatQName(&str, namespaceName, localName));
+ FREE_AND_NULL(str)
+
+ if (bind == NULL)
+ return;
+ do {
+ fprintf(output, "IDC: BINDING '%s' (%d)\n",
+ xmlSchemaGetComponentQName(&str,
+ bind->definition), bind->nbNodes);
+ FREE_AND_NULL(str)
+ for (i = 0; i < bind->nbNodes; i++) {
+ tab = bind->nodeTable[i];
+ fprintf(output, " ( ");
+ for (j = 0; j < bind->definition->nbFields; j++) {
+ key = tab->keys[j];
+ if ((key != NULL) && (key->val != NULL)) {
+ res = xmlSchemaGetCanonValue(key->val, &value);
+ if (res >= 0)
+ fprintf(output, "'%s' ", value);
+ else
+ fprintf(output, "CANON-VALUE-FAILED ");
+ if (res == 0)
+ FREE_AND_NULL(value)
+ } else if (key != NULL)
+ fprintf(output, "(no val), ");
+ else
+ fprintf(output, "(key missing), ");
+ }
+ fprintf(output, ")\n");
+ }
+ if (bind->dupls && bind->dupls->nbItems) {
+ fprintf(output, "IDC: dupls (%d):\n", bind->dupls->nbItems);
+ for (i = 0; i < bind->dupls->nbItems; i++) {
+ tab = bind->dupls->items[i];
+ fprintf(output, " ( ");
+ for (j = 0; j < bind->definition->nbFields; j++) {
+ key = tab->keys[j];
+ if ((key != NULL) && (key->val != NULL)) {
+ res = xmlSchemaGetCanonValue(key->val, &value);
+ if (res >= 0)
+ fprintf(output, "'%s' ", value);
+ else
+ fprintf(output, "CANON-VALUE-FAILED ");
+ if (res == 0)
+ FREE_AND_NULL(value)
+ } else if (key != NULL)
+ fprintf(output, "(no val), ");
+ else
+ fprintf(output, "(key missing), ");
+ }
+ fprintf(output, ")\n");
+ }
+ }
+ bind = bind->next;
+ } while (bind != NULL);
+}
+#endif /* DEBUG_IDC */
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/************************************************************************
+ * *
+ * Utilities *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaGetPropNode:
+ * @node: the element node
+ * @name: the name of the attribute
+ *
+ * Seeks an attribute with a name of @name in
+ * no namespace.
+ *
+ * Returns the attribute or NULL if not present.
+ */
+static xmlAttrPtr
+xmlSchemaGetPropNode(xmlNodePtr node, const char *name)
+{
+ xmlAttrPtr prop;
+
+ if ((node == NULL) || (name == NULL))
+ return(NULL);
+ prop = node->properties;
+ while (prop != NULL) {
+ if ((prop->ns == NULL) && xmlStrEqual(prop->name, BAD_CAST name))
+ return(prop);
+ prop = prop->next;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaGetPropNodeNs:
+ * @node: the element node
+ * @uri: the uri
+ * @name: the name of the attribute
+ *
+ * Seeks an attribute with a local name of @name and
+ * a namespace URI of @uri.
+ *
+ * Returns the attribute or NULL if not present.
+ */
+static xmlAttrPtr
+xmlSchemaGetPropNodeNs(xmlNodePtr node, const char *uri, const char *name)
+{
+ xmlAttrPtr prop;
+
+ if ((node == NULL) || (name == NULL))
+ return(NULL);
+ prop = node->properties;
+ while (prop != NULL) {
+ if ((prop->ns != NULL) &&
+ xmlStrEqual(prop->name, BAD_CAST name) &&
+ xmlStrEqual(prop->ns->href, BAD_CAST uri))
+ return(prop);
+ prop = prop->next;
+ }
+ return (NULL);
+}
+
+static const xmlChar *
+xmlSchemaGetNodeContent(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node)
+{
+ xmlChar *val;
+ const xmlChar *ret;
+
+ val = xmlNodeGetContent(node);
+ if (val == NULL)
+ val = xmlStrdup((xmlChar *)"");
+ ret = xmlDictLookup(ctxt->dict, val, -1);
+ xmlFree(val);
+ return(ret);
+}
+
+static const xmlChar *
+xmlSchemaGetNodeContentNoDict(xmlNodePtr node)
+{
+ return((const xmlChar*) xmlNodeGetContent(node));
+}
+
+/**
+ * xmlSchemaGetProp:
+ * @ctxt: the parser context
+ * @node: the node
+ * @name: the property name
+ *
+ * Read a attribute value and internalize the string
+ *
+ * Returns the string or NULL if not present.
+ */
+static const xmlChar *
+xmlSchemaGetProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
+ const char *name)
+{
+ xmlChar *val;
+ const xmlChar *ret;
+
+ val = xmlGetNoNsProp(node, BAD_CAST name);
+ if (val == NULL)
+ return(NULL);
+ ret = xmlDictLookup(ctxt->dict, val, -1);
+ xmlFree(val);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Parsing functions *
+ * *
+ ************************************************************************/
+
+#define WXS_FIND_GLOBAL_ITEM(slot) \
+ if (xmlStrEqual(nsName, schema->targetNamespace)) { \
+ ret = xmlHashLookup(schema->slot, name); \
+ if (ret != NULL) goto exit; \
+ } \
+ if (xmlHashSize(schema->schemasImports) > 1) { \
+ xmlSchemaImportPtr import; \
+ if (nsName == NULL) \
+ import = xmlHashLookup(schema->schemasImports, \
+ XML_SCHEMAS_NO_NAMESPACE); \
+ else \
+ import = xmlHashLookup(schema->schemasImports, nsName); \
+ if (import == NULL) \
+ goto exit; \
+ ret = xmlHashLookup(import->schema->slot, name); \
+ }
+
+/**
+ * xmlSchemaGetElem:
+ * @schema: the schema context
+ * @name: the element name
+ * @ns: the element namespace
+ *
+ * Lookup a global element declaration in the schema.
+ *
+ * Returns the element declaration or NULL if not found.
+ */
+static xmlSchemaElementPtr
+xmlSchemaGetElem(xmlSchemaPtr schema, const xmlChar * name,
+ const xmlChar * nsName)
+{
+ xmlSchemaElementPtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return(NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(elemDecl)
+ }
+exit:
+#ifdef DEBUG
+ if (ret == NULL) {
+ if (nsName == NULL)
+ fprintf(stderr, "Unable to lookup element decl. %s", name);
+ else
+ fprintf(stderr, "Unable to lookup element decl. %s:%s", name,
+ nsName);
+ }
+#endif
+ return (ret);
+}
+
+/**
+ * xmlSchemaGetType:
+ * @schema: the main schema
+ * @name: the type's name
+ * nsName: the type's namespace
+ *
+ * Lookup a type in the schemas or the predefined types
+ *
+ * Returns the group definition or NULL if not found.
+ */
+static xmlSchemaTypePtr
+xmlSchemaGetType(xmlSchemaPtr schema, const xmlChar * name,
+ const xmlChar * nsName)
+{
+ xmlSchemaTypePtr ret = NULL;
+
+ if (name == NULL)
+ return (NULL);
+ /* First try the built-in types. */
+ if ((nsName != NULL) && xmlStrEqual(nsName, xmlSchemaNs)) {
+ ret = xmlSchemaGetPredefinedType(name, nsName);
+ if (ret != NULL)
+ goto exit;
+ /*
+ * Note that we try the parsed schemas as well here
+ * since one might have parsed the S4S, which contain more
+ * than the built-in types.
+ * TODO: Can we optimize this?
+ */
+ }
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(typeDecl)
+ }
+exit:
+
+#ifdef DEBUG
+ if (ret == NULL) {
+ if (nsName == NULL)
+ fprintf(stderr, "Unable to lookup type %s", name);
+ else
+ fprintf(stderr, "Unable to lookup type %s:%s", name,
+ nsName);
+ }
+#endif
+ return (ret);
+}
+
+/**
+ * xmlSchemaGetAttributeDecl:
+ * @schema: the context of the schema
+ * @name: the name of the attribute
+ * @ns: the target namespace of the attribute
+ *
+ * Lookup a an attribute in the schema or imported schemas
+ *
+ * Returns the attribute declaration or NULL if not found.
+ */
+static xmlSchemaAttributePtr
+xmlSchemaGetAttributeDecl(xmlSchemaPtr schema, const xmlChar * name,
+ const xmlChar * nsName)
+{
+ xmlSchemaAttributePtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return (NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(attrDecl)
+ }
+exit:
+#ifdef DEBUG
+ if (ret == NULL) {
+ if (nsName == NULL)
+ fprintf(stderr, "Unable to lookup attribute %s", name);
+ else
+ fprintf(stderr, "Unable to lookup attribute %s:%s", name,
+ nsName);
+ }
+#endif
+ return (ret);
+}
+
+/**
+ * xmlSchemaGetAttributeGroup:
+ * @schema: the context of the schema
+ * @name: the name of the attribute group
+ * @ns: the target namespace of the attribute group
+ *
+ * Lookup a an attribute group in the schema or imported schemas
+ *
+ * Returns the attribute group definition or NULL if not found.
+ */
+static xmlSchemaAttributeGroupPtr
+xmlSchemaGetAttributeGroup(xmlSchemaPtr schema, const xmlChar * name,
+ const xmlChar * nsName)
+{
+ xmlSchemaAttributeGroupPtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return (NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(attrgrpDecl)
+ }
+exit:
+ /* TODO:
+ if ((ret != NULL) && (ret->redef != NULL)) {
+ * Return the last redefinition. *
+ ret = ret->redef;
+ }
+ */
+#ifdef DEBUG
+ if (ret == NULL) {
+ if (nsName == NULL)
+ fprintf(stderr, "Unable to lookup attribute group %s", name);
+ else
+ fprintf(stderr, "Unable to lookup attribute group %s:%s", name,
+ nsName);
+ }
+#endif
+ return (ret);
+}
+
+/**
+ * xmlSchemaGetGroup:
+ * @schema: the context of the schema
+ * @name: the name of the group
+ * @ns: the target namespace of the group
+ *
+ * Lookup a group in the schema or imported schemas
+ *
+ * Returns the group definition or NULL if not found.
+ */
+static xmlSchemaModelGroupDefPtr
+xmlSchemaGetGroup(xmlSchemaPtr schema, const xmlChar * name,
+ const xmlChar * nsName)
+{
+ xmlSchemaModelGroupDefPtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return (NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(groupDecl)
+ }
+exit:
+
+#ifdef DEBUG
+ if (ret == NULL) {
+ if (nsName == NULL)
+ fprintf(stderr, "Unable to lookup group %s", name);
+ else
+ fprintf(stderr, "Unable to lookup group %s:%s", name,
+ nsName);
+ }
+#endif
+ return (ret);
+}
+
+static xmlSchemaNotationPtr
+xmlSchemaGetNotation(xmlSchemaPtr schema,
+ const xmlChar *name,
+ const xmlChar *nsName)
+{
+ xmlSchemaNotationPtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return (NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(notaDecl)
+ }
+exit:
+ return (ret);
+}
+
+static xmlSchemaIDCPtr
+xmlSchemaGetIDC(xmlSchemaPtr schema,
+ const xmlChar *name,
+ const xmlChar *nsName)
+{
+ xmlSchemaIDCPtr ret = NULL;
+
+ if ((name == NULL) || (schema == NULL))
+ return (NULL);
+ if (schema != NULL) {
+ WXS_FIND_GLOBAL_ITEM(idcDef)
+ }
+exit:
+ return (ret);
+}
+
+/**
+ * xmlSchemaGetNamedComponent:
+ * @schema: the schema
+ * @name: the name of the group
+ * @ns: the target namespace of the group
+ *
+ * Lookup a group in the schema or imported schemas
+ *
+ * Returns the group definition or NULL if not found.
+ */
+static xmlSchemaBasicItemPtr
+xmlSchemaGetNamedComponent(xmlSchemaPtr schema,
+ xmlSchemaTypeType itemType,
+ const xmlChar *name,
+ const xmlChar *targetNs)
+{
+ switch (itemType) {
+ case XML_SCHEMA_TYPE_GROUP:
+ return ((xmlSchemaBasicItemPtr) xmlSchemaGetGroup(schema,
+ name, targetNs));
+ case XML_SCHEMA_TYPE_ELEMENT:
+ return ((xmlSchemaBasicItemPtr) xmlSchemaGetElem(schema,
+ name, targetNs));
+ default:
+ TODO
+ return (NULL);
+ }
+}
+
+/************************************************************************
+ * *
+ * Parsing functions *
+ * *
+ ************************************************************************/
+
+#define IS_BLANK_NODE(n) \
+ (((n)->type == XML_TEXT_NODE) && (xmlSchemaIsBlank((n)->content, -1)))
+
+/**
+ * xmlSchemaIsBlank:
+ * @str: a string
+ * @len: the length of the string or -1
+ *
+ * Check if a string is ignorable
+ *
+ * Returns 1 if the string is NULL or made of blanks chars, 0 otherwise
+ */
+static int
+xmlSchemaIsBlank(xmlChar * str, int len)
+{
+ if (str == NULL)
+ return (1);
+ if (len < 0) {
+ while (*str != 0) {
+ if (!(IS_BLANK_CH(*str)))
+ return (0);
+ str++;
+ }
+ } else while ((*str != 0) && (len != 0)) {
+ if (!(IS_BLANK_CH(*str)))
+ return (0);
+ str++;
+ len--;
+ }
+
+ return (1);
+}
+
+#define WXS_COMP_NAME(c, t) ((t) (c))->name
+#define WXS_COMP_TNS(c, t) ((t) (c))->targetNamespace
+/*
+* xmlSchemaFindRedefCompInGraph:
+* ATTENTION TODO: This uses pointer comp. for strings.
+*/
+static xmlSchemaBasicItemPtr
+xmlSchemaFindRedefCompInGraph(xmlSchemaBucketPtr bucket,
+ xmlSchemaTypeType type,
+ const xmlChar *name,
+ const xmlChar *nsName)
+{
+ xmlSchemaBasicItemPtr ret;
+ int i;
+
+ if ((bucket == NULL) || (name == NULL))
+ return(NULL);
+ if ((bucket->globals == NULL) ||
+ (bucket->globals->nbItems == 0))
+ goto subschemas;
+ /*
+ * Search in global components.
+ */
+ for (i = 0; i < bucket->globals->nbItems; i++) {
+ ret = bucket->globals->items[i];
+ if (ret->type == type) {
+ switch (type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if ((WXS_COMP_NAME(ret, xmlSchemaTypePtr) == name) &&
+ (WXS_COMP_TNS(ret, xmlSchemaTypePtr) ==
+ nsName))
+ {
+ return(ret);
+ }
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ if ((WXS_COMP_NAME(ret,
+ xmlSchemaModelGroupDefPtr) == name) &&
+ (WXS_COMP_TNS(ret,
+ xmlSchemaModelGroupDefPtr) == nsName))
+ {
+ return(ret);
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ if ((WXS_COMP_NAME(ret,
+ xmlSchemaAttributeGroupPtr) == name) &&
+ (WXS_COMP_TNS(ret,
+ xmlSchemaAttributeGroupPtr) == nsName))
+ {
+ return(ret);
+ }
+ break;
+ default:
+ /* Should not be hit. */
+ return(NULL);
+ }
+ }
+ }
+subschemas:
+ /*
+ * Process imported/included schemas.
+ */
+ if (bucket->relations != NULL) {
+ xmlSchemaSchemaRelationPtr rel = bucket->relations;
+
+ /*
+ * TODO: Marking the bucket will not avoid multiple searches
+ * in the same schema, but avoids at least circularity.
+ */
+ bucket->flags |= XML_SCHEMA_BUCKET_MARKED;
+ do {
+ if ((rel->bucket != NULL) &&
+ ((rel->bucket->flags & XML_SCHEMA_BUCKET_MARKED) == 0)) {
+ ret = xmlSchemaFindRedefCompInGraph(rel->bucket,
+ type, name, nsName);
+ if (ret != NULL)
+ return(ret);
+ }
+ rel = rel->next;
+ } while (rel != NULL);
+ bucket->flags ^= XML_SCHEMA_BUCKET_MARKED;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlSchemaAddNotation:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the item name
+ *
+ * Add an XML schema annotation declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaNotationPtr
+xmlSchemaAddNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ const xmlChar *name, const xmlChar *nsName,
+ xmlNodePtr node ATTRIBUTE_UNUSED)
+{
+ xmlSchemaNotationPtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaNotationPtr) xmlMalloc(sizeof(xmlSchemaNotation));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "add annotation", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaNotation));
+ ret->type = XML_SCHEMA_TYPE_NOTATION;
+ ret->name = name;
+ ret->targetNamespace = nsName;
+ /* TODO: do we need the node to be set?
+ * ret->node = node;*/
+ WXS_ADD_GLOBAL(ctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddAttribute:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the item name
+ * @namespace: the namespace
+ *
+ * Add an XML schema Attrribute declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaAttributePtr
+xmlSchemaAddAttribute(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ const xmlChar * name, const xmlChar * nsName,
+ xmlNodePtr node, int topLevel)
+{
+ xmlSchemaAttributePtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaAttributePtr) xmlMalloc(sizeof(xmlSchemaAttribute));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating attribute", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaAttribute));
+ ret->type = XML_SCHEMA_TYPE_ATTRIBUTE;
+ ret->node = node;
+ ret->name = name;
+ ret->targetNamespace = nsName;
+
+ if (topLevel)
+ WXS_ADD_GLOBAL(ctxt, ret);
+ else
+ WXS_ADD_LOCAL(ctxt, ret);
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddAttributeUse:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the item name
+ * @namespace: the namespace
+ *
+ * Add an XML schema Attrribute declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaAttributeUsePtr
+xmlSchemaAddAttributeUse(xmlSchemaParserCtxtPtr pctxt,
+ xmlNodePtr node)
+{
+ xmlSchemaAttributeUsePtr ret = NULL;
+
+ if (pctxt == NULL)
+ return (NULL);
+
+ ret = (xmlSchemaAttributeUsePtr) xmlMalloc(sizeof(xmlSchemaAttributeUse));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(pctxt, "allocating attribute", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaAttributeUse));
+ ret->type = XML_SCHEMA_TYPE_ATTRIBUTE_USE;
+ ret->node = node;
+
+ WXS_ADD_LOCAL(pctxt, ret);
+ return (ret);
+}
+
+/*
+* xmlSchemaAddRedef:
+*
+* Adds a redefinition information. This is used at a later stage to:
+* resolve references to the redefined components and to check constraints.
+*/
+static xmlSchemaRedefPtr
+xmlSchemaAddRedef(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBucketPtr targetBucket,
+ void *item,
+ const xmlChar *refName,
+ const xmlChar *refTargetNs)
+{
+ xmlSchemaRedefPtr ret;
+
+ ret = (xmlSchemaRedefPtr)
+ xmlMalloc(sizeof(xmlSchemaRedef));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(pctxt,
+ "allocating redefinition info", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaRedef));
+ ret->item = item;
+ ret->targetBucket = targetBucket;
+ ret->refName = refName;
+ ret->refTargetNs = refTargetNs;
+ if (WXS_CONSTRUCTOR(pctxt)->redefs == NULL)
+ WXS_CONSTRUCTOR(pctxt)->redefs = ret;
+ else
+ WXS_CONSTRUCTOR(pctxt)->lastRedef->next = ret;
+ WXS_CONSTRUCTOR(pctxt)->lastRedef = ret;
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddAttributeGroupDefinition:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the item name
+ * @nsName: the target namespace
+ * @node: the corresponding node
+ *
+ * Add an XML schema Attrribute Group definition.
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaAttributeGroupPtr
+xmlSchemaAddAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema ATTRIBUTE_UNUSED,
+ const xmlChar *name,
+ const xmlChar *nsName,
+ xmlNodePtr node)
+{
+ xmlSchemaAttributeGroupPtr ret = NULL;
+
+ if ((pctxt == NULL) || (name == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaAttributeGroupPtr)
+ xmlMalloc(sizeof(xmlSchemaAttributeGroup));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(pctxt, "allocating attribute group", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaAttributeGroup));
+ ret->type = XML_SCHEMA_TYPE_ATTRIBUTEGROUP;
+ ret->name = name;
+ ret->targetNamespace = nsName;
+ ret->node = node;
+
+ /* TODO: Remove the flag. */
+ ret->flags |= XML_SCHEMAS_ATTRGROUP_GLOBAL;
+ if (pctxt->isRedefine) {
+ pctxt->redef = xmlSchemaAddRedef(pctxt, pctxt->redefined,
+ ret, name, nsName);
+ if (pctxt->redef == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ pctxt->redefCounter = 0;
+ }
+ WXS_ADD_GLOBAL(pctxt, ret);
+ WXS_ADD_PENDING(pctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddElement:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the type name
+ * @namespace: the type namespace
+ *
+ * Add an XML schema Element declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaElementPtr
+xmlSchemaAddElement(xmlSchemaParserCtxtPtr ctxt,
+ const xmlChar * name, const xmlChar * nsName,
+ xmlNodePtr node, int topLevel)
+{
+ xmlSchemaElementPtr ret = NULL;
+
+ if ((ctxt == NULL) || (name == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaElementPtr) xmlMalloc(sizeof(xmlSchemaElement));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating element", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaElement));
+ ret->type = XML_SCHEMA_TYPE_ELEMENT;
+ ret->name = name;
+ ret->targetNamespace = nsName;
+ ret->node = node;
+
+ if (topLevel)
+ WXS_ADD_GLOBAL(ctxt, ret);
+ else
+ WXS_ADD_LOCAL(ctxt, ret);
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddType:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @name: the item name
+ * @namespace: the namespace
+ *
+ * Add an XML schema item
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaTypePtr
+xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlSchemaTypeType type,
+ const xmlChar * name, const xmlChar * nsName,
+ xmlNodePtr node, int topLevel)
+{
+ xmlSchemaTypePtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaTypePtr) xmlMalloc(sizeof(xmlSchemaType));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating type", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaType));
+ ret->type = type;
+ ret->name = name;
+ ret->targetNamespace = nsName;
+ ret->node = node;
+ if (topLevel) {
+ if (ctxt->isRedefine) {
+ ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined,
+ ret, name, nsName);
+ if (ctxt->redef == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ ctxt->redefCounter = 0;
+ }
+ WXS_ADD_GLOBAL(ctxt, ret);
+ } else
+ WXS_ADD_LOCAL(ctxt, ret);
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+static xmlSchemaQNameRefPtr
+xmlSchemaNewQNameRef(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypeType refType,
+ const xmlChar *refName,
+ const xmlChar *refNs)
+{
+ xmlSchemaQNameRefPtr ret;
+
+ ret = (xmlSchemaQNameRefPtr)
+ xmlMalloc(sizeof(xmlSchemaQNameRef));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(pctxt,
+ "allocating QName reference item", NULL);
+ return (NULL);
+ }
+ ret->node = NULL;
+ ret->type = XML_SCHEMA_EXTRA_QNAMEREF;
+ ret->name = refName;
+ ret->targetNamespace = refNs;
+ ret->item = NULL;
+ ret->itemType = refType;
+ /*
+ * Store the reference item in the schema.
+ */
+ WXS_ADD_LOCAL(pctxt, ret);
+ return (ret);
+}
+
+static xmlSchemaAttributeUseProhibPtr
+xmlSchemaAddAttributeUseProhib(xmlSchemaParserCtxtPtr pctxt)
+{
+ xmlSchemaAttributeUseProhibPtr ret;
+
+ ret = (xmlSchemaAttributeUseProhibPtr)
+ xmlMalloc(sizeof(xmlSchemaAttributeUseProhib));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(pctxt,
+ "allocating attribute use prohibition", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaAttributeUseProhib));
+ ret->type = XML_SCHEMA_EXTRA_ATTR_USE_PROHIB;
+ WXS_ADD_LOCAL(pctxt, ret);
+ return (ret);
+}
+
+
+/**
+ * xmlSchemaAddModelGroup:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @type: the "compositor" type of the model group
+ * @node: the node in the schema doc
+ *
+ * Adds a schema model group
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaModelGroupPtr
+xmlSchemaAddModelGroup(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaTypeType type,
+ xmlNodePtr node)
+{
+ xmlSchemaModelGroupPtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaModelGroupPtr)
+ xmlMalloc(sizeof(xmlSchemaModelGroup));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating model group component",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaModelGroup));
+ ret->type = type;
+ ret->node = node;
+ WXS_ADD_LOCAL(ctxt, ret);
+ if ((type == XML_SCHEMA_TYPE_SEQUENCE) ||
+ (type == XML_SCHEMA_TYPE_CHOICE))
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+
+/**
+ * xmlSchemaAddParticle:
+ * @ctxt: a schema parser context
+ * @schema: the schema being built
+ * @node: the corresponding node in the schema doc
+ * @min: the minOccurs
+ * @max: the maxOccurs
+ *
+ * Adds an XML schema particle component.
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaParticlePtr
+xmlSchemaAddParticle(xmlSchemaParserCtxtPtr ctxt,
+ xmlNodePtr node, int min, int max)
+{
+ xmlSchemaParticlePtr ret = NULL;
+ if (ctxt == NULL)
+ return (NULL);
+
+#ifdef DEBUG
+ fprintf(stderr, "Adding particle component\n");
+#endif
+ ret = (xmlSchemaParticlePtr)
+ xmlMalloc(sizeof(xmlSchemaParticle));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating particle component",
+ NULL);
+ return (NULL);
+ }
+ ret->type = XML_SCHEMA_TYPE_PARTICLE;
+ ret->annot = NULL;
+ ret->node = node;
+ ret->minOccurs = min;
+ ret->maxOccurs = max;
+ ret->next = NULL;
+ ret->children = NULL;
+
+ WXS_ADD_LOCAL(ctxt, ret);
+ /*
+ * Note that addition to pending components will be done locally
+ * to the specific parsing function, since the most particles
+ * need not to be fixed up (i.e. the reference to be resolved).
+ * REMOVED: WXS_ADD_PENDING(ctxt, ret);
+ */
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddModelGroupDefinition:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @name: the group name
+ *
+ * Add an XML schema Group definition
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaModelGroupDefPtr
+xmlSchemaAddModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ const xmlChar *name,
+ const xmlChar *nsName,
+ xmlNodePtr node)
+{
+ xmlSchemaModelGroupDefPtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaModelGroupDefPtr)
+ xmlMalloc(sizeof(xmlSchemaModelGroupDef));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "adding group", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaModelGroupDef));
+ ret->name = name;
+ ret->type = XML_SCHEMA_TYPE_GROUP;
+ ret->node = node;
+ ret->targetNamespace = nsName;
+
+ if (ctxt->isRedefine) {
+ ctxt->redef = xmlSchemaAddRedef(ctxt, ctxt->redefined,
+ ret, name, nsName);
+ if (ctxt->redef == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ ctxt->redefCounter = 0;
+ }
+ WXS_ADD_GLOBAL(ctxt, ret);
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaNewWildcardNs:
+ * @ctxt: a schema validation context
+ *
+ * Creates a new wildcard namespace constraint.
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaWildcardNsPtr
+xmlSchemaNewWildcardNsConstraint(xmlSchemaParserCtxtPtr ctxt)
+{
+ xmlSchemaWildcardNsPtr ret;
+
+ ret = (xmlSchemaWildcardNsPtr)
+ xmlMalloc(sizeof(xmlSchemaWildcardNs));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "creating wildcard namespace constraint", NULL);
+ return (NULL);
+ }
+ ret->value = NULL;
+ ret->next = NULL;
+ return (ret);
+}
+
+static xmlSchemaIDCPtr
+xmlSchemaAddIDC(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ const xmlChar *name, const xmlChar *nsName,
+ int category, xmlNodePtr node)
+{
+ xmlSchemaIDCPtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (name == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaIDCPtr) xmlMalloc(sizeof(xmlSchemaIDC));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt,
+ "allocating an identity-constraint definition", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaIDC));
+ /* The target namespace of the parent element declaration. */
+ ret->targetNamespace = nsName;
+ ret->name = name;
+ ret->type = category;
+ ret->node = node;
+
+ WXS_ADD_GLOBAL(ctxt, ret);
+ /*
+ * Only keyrefs need to be fixup up.
+ */
+ if (category == XML_SCHEMA_TYPE_IDC_KEYREF)
+ WXS_ADD_PENDING(ctxt, ret);
+ return (ret);
+}
+
+/**
+ * xmlSchemaAddWildcard:
+ * @ctxt: a schema validation context
+ * @schema: a schema
+ *
+ * Adds a wildcard.
+ * It corresponds to a xsd:anyAttribute and xsd:any.
+ *
+ * Returns the new struture or NULL in case of error
+ */
+static xmlSchemaWildcardPtr
+xmlSchemaAddWildcard(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlSchemaTypeType type, xmlNodePtr node)
+{
+ xmlSchemaWildcardPtr ret = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL))
+ return (NULL);
+
+ ret = (xmlSchemaWildcardPtr) xmlMalloc(sizeof(xmlSchemaWildcard));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(ctxt, "adding wildcard", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaWildcard));
+ ret->type = type;
+ ret->node = node;
+ WXS_ADD_LOCAL(ctxt, ret);
+ return (ret);
+}
+
+static void
+xmlSchemaSubstGroupFree(xmlSchemaSubstGroupPtr group)
+{
+ if (group == NULL)
+ return;
+ if (group->members != NULL)
+ xmlSchemaItemListFree(group->members);
+ xmlFree(group);
+}
+
+static xmlSchemaSubstGroupPtr
+xmlSchemaSubstGroupAdd(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaElementPtr head)
+{
+ xmlSchemaSubstGroupPtr ret;
+
+ /* Init subst group hash. */
+ if (WXS_SUBST_GROUPS(pctxt) == NULL) {
+ WXS_SUBST_GROUPS(pctxt) = xmlHashCreateDict(10, pctxt->dict);
+ if (WXS_SUBST_GROUPS(pctxt) == NULL)
+ return(NULL);
+ }
+ /* Create a new substitution group. */
+ ret = (xmlSchemaSubstGroupPtr) xmlMalloc(sizeof(xmlSchemaSubstGroup));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL,
+ "allocating a substitution group container", NULL);
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaSubstGroup));
+ ret->head = head;
+ /* Create list of members. */
+ ret->members = xmlSchemaItemListCreate();
+ if (ret->members == NULL) {
+ xmlSchemaSubstGroupFree(ret);
+ return(NULL);
+ }
+ /* Add subst group to hash. */
+ if (xmlHashAddEntry2(WXS_SUBST_GROUPS(pctxt),
+ head->name, head->targetNamespace, ret) != 0) {
+ PERROR_INT("xmlSchemaSubstGroupAdd",
+ "failed to add a new substitution container");
+ xmlSchemaSubstGroupFree(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+static xmlSchemaSubstGroupPtr
+xmlSchemaSubstGroupGet(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaElementPtr head)
+{
+ if (WXS_SUBST_GROUPS(pctxt) == NULL)
+ return(NULL);
+ return(xmlHashLookup2(WXS_SUBST_GROUPS(pctxt),
+ head->name, head->targetNamespace));
+
+}
+
+/**
+ * xmlSchemaAddElementSubstitutionMember:
+ * @pctxt: a schema parser context
+ * @head: the head of the substitution group
+ * @member: the new member of the substitution group
+ *
+ * Allocate a new annotation structure.
+ *
+ * Returns the newly allocated structure or NULL in case or error
+ */
+static int
+xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaElementPtr head,
+ xmlSchemaElementPtr member)
+{
+ xmlSchemaSubstGroupPtr substGroup = NULL;
+
+ if ((pctxt == NULL) || (head == NULL) || (member == NULL))
+ return (-1);
+
+ substGroup = xmlSchemaSubstGroupGet(pctxt, head);
+ if (substGroup == NULL)
+ substGroup = xmlSchemaSubstGroupAdd(pctxt, head);
+ if (substGroup == NULL)
+ return(-1);
+ if (xmlSchemaItemListAdd(substGroup->members, member) == -1)
+ return(-1);
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Utilities for parsing *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaPValAttrNodeQNameValue:
+ * @ctxt: a schema parser context
+ * @schema: the schema context
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the parent as a schema object
+ * @value: the QName value
+ * @local: the resulting local part if found, the attribute value otherwise
+ * @uri: the resulting namespace URI if found
+ *
+ * Extracts the local name and the URI of a QName value and validates it.
+ * This one is intended to be used on attribute values that
+ * should resolve to schema components.
+ *
+ * Returns 0, in case the QName is valid, a positive error code
+ * if not valid and -1 if an internal error occurs.
+ */
+static int
+xmlSchemaPValAttrNodeQNameValue(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ const xmlChar *value,
+ const xmlChar **uri,
+ const xmlChar **local)
+{
+ const xmlChar *pref;
+ xmlNsPtr ns;
+ int len, ret;
+
+ *uri = NULL;
+ *local = NULL;
+ ret = xmlValidateQName(value, 1);
+ if (ret > 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ ownerItem, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+ NULL, value, NULL, NULL, NULL);
+ *local = value;
+ return (ctxt->err);
+ } else if (ret < 0)
+ return (-1);
+
+ if (!strchr((char *) value, ':')) {
+ ns = xmlSearchNs(attr->doc, attr->parent, NULL);
+ if (ns)
+ *uri = xmlDictLookup(ctxt->dict, ns->href, -1);
+ else if (schema->flags & XML_SCHEMAS_INCLUDING_CONVERT_NS) {
+ /* TODO: move XML_SCHEMAS_INCLUDING_CONVERT_NS to the
+ * parser context. */
+ /*
+ * This one takes care of included schemas with no
+ * target namespace.
+ */
+ *uri = ctxt->targetNamespace;
+ }
+ *local = xmlDictLookup(ctxt->dict, value, -1);
+ return (0);
+ }
+ /*
+ * At this point xmlSplitQName3 has to return a local name.
+ */
+ *local = xmlSplitQName3(value, &len);
+ *local = xmlDictLookup(ctxt->dict, *local, -1);
+ pref = xmlDictLookup(ctxt->dict, value, len);
+ ns = xmlSearchNs(attr->doc, attr->parent, pref);
+ if (ns == NULL) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ ownerItem, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), NULL, value,
+ "The value '%s' of simple type 'xs:QName' has no "
+ "corresponding namespace declaration in scope", value, NULL);
+ return (ctxt->err);
+ } else {
+ *uri = xmlDictLookup(ctxt->dict, ns->href, -1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaPValAttrNodeQName:
+ * @ctxt: a schema parser context
+ * @schema: the schema context
+ * @ownerDes: the designation of the owner element
+ * @ownerItem: the owner as a schema object
+ * @attr: the attribute node
+ * @local: the resulting local part if found, the attribute value otherwise
+ * @uri: the resulting namespace URI if found
+ *
+ * Extracts and validates the QName of an attribute value.
+ * This one is intended to be used on attribute values that
+ * should resolve to schema components.
+ *
+ * Returns 0, in case the QName is valid, a positive error code
+ * if not valid and -1 if an internal error occurs.
+ */
+static int
+xmlSchemaPValAttrNodeQName(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ const xmlChar **uri,
+ const xmlChar **local)
+{
+ const xmlChar *value;
+
+ value = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ return (xmlSchemaPValAttrNodeQNameValue(ctxt, schema,
+ ownerItem, attr, value, uri, local));
+}
+
+/**
+ * xmlSchemaPValAttrQName:
+ * @ctxt: a schema parser context
+ * @schema: the schema context
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the owner as a schema object
+ * @ownerElem: the parent node of the attribute
+ * @name: the name of the attribute
+ * @local: the resulting local part if found, the attribute value otherwise
+ * @uri: the resulting namespace URI if found
+ *
+ * Extracts and validates the QName of an attribute value.
+ *
+ * Returns 0, in case the QName is valid, a positive error code
+ * if not valid and -1 if an internal error occurs.
+ */
+static int
+xmlSchemaPValAttrQName(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr ownerElem,
+ const char *name,
+ const xmlChar **uri,
+ const xmlChar **local)
+{
+ xmlAttrPtr attr;
+
+ attr = xmlSchemaGetPropNode(ownerElem, name);
+ if (attr == NULL) {
+ *local = NULL;
+ *uri = NULL;
+ return (0);
+ }
+ return (xmlSchemaPValAttrNodeQName(ctxt, schema,
+ ownerItem, attr, uri, local));
+}
+
+/**
+ * xmlSchemaPValAttrID:
+ * @ctxt: a schema parser context
+ * @schema: the schema context
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the owner as a schema object
+ * @ownerElem: the parent node of the attribute
+ * @name: the name of the attribute
+ *
+ * Extracts and validates the ID of an attribute value.
+ *
+ * Returns 0, in case the ID is valid, a positive error code
+ * if not valid and -1 if an internal error occurs.
+ */
+static int
+xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
+{
+ int ret;
+ const xmlChar *value;
+
+ if (attr == NULL)
+ return(0);
+ value = xmlSchemaGetNodeContentNoDict((xmlNodePtr) attr);
+ ret = xmlValidateNCName(value, 1);
+ if (ret == 0) {
+ /*
+ * NOTE: the IDness might have already be declared in the DTD
+ */
+ if (attr->atype != XML_ATTRIBUTE_ID) {
+ xmlIDPtr res;
+ xmlChar *strip;
+
+ /*
+ * TODO: Use xmlSchemaStrip here; it's not exported at this
+ * moment.
+ */
+ strip = xmlSchemaCollapseString(value);
+ if (strip != NULL) {
+ xmlFree((xmlChar *) value);
+ value = strip;
+ }
+ res = xmlAddID(NULL, attr->doc, value, attr);
+ if (res == NULL) {
+ ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ID),
+ NULL, NULL, "Duplicate value '%s' of simple "
+ "type 'xs:ID'", value, NULL);
+ } else
+ attr->atype = XML_ATTRIBUTE_ID;
+ }
+ } else if (ret > 0) {
+ ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ID),
+ NULL, NULL, "The value '%s' of simple type 'xs:ID' is "
+ "not a valid 'xs:NCName'",
+ value, NULL);
+ }
+ if (value != NULL)
+ xmlFree((xmlChar *)value);
+
+ return (ret);
+}
+
+static int
+xmlSchemaPValAttrID(xmlSchemaParserCtxtPtr ctxt,
+ xmlNodePtr ownerElem,
+ const xmlChar *name)
+{
+ xmlAttrPtr attr;
+
+ attr = xmlSchemaGetPropNode(ownerElem, (const char *) name);
+ if (attr == NULL)
+ return(0);
+ return(xmlSchemaPValAttrNodeID(ctxt, attr));
+
+}
+
+/**
+ * xmlGetMaxOccurs:
+ * @ctxt: a schema validation context
+ * @node: a subtree containing XML Schema informations
+ *
+ * Get the maxOccurs property
+ *
+ * Returns the default if not found, or the value
+ */
+static int
+xmlGetMaxOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
+ int min, int max, int def, const char *expected)
+{
+ const xmlChar *val, *cur;
+ int ret = 0;
+ xmlAttrPtr attr;
+
+ attr = xmlSchemaGetPropNode(node, "maxOccurs");
+ if (attr == NULL)
+ return (def);
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+
+ if (xmlStrEqual(val, (const xmlChar *) "unbounded")) {
+ if (max != UNBOUNDED) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ /* XML_SCHEMAP_INVALID_MINOCCURS, */
+ NULL, (xmlNodePtr) attr, NULL, expected,
+ val, NULL, NULL, NULL);
+ return (def);
+ } else
+ return (UNBOUNDED); /* encoding it with -1 might be another option */
+ }
+
+ cur = val;
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ if (*cur == 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ /* XML_SCHEMAP_INVALID_MINOCCURS, */
+ NULL, (xmlNodePtr) attr, NULL, expected,
+ val, NULL, NULL, NULL);
+ return (def);
+ }
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret = ret * 10 + (*cur - '0');
+ cur++;
+ }
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ /*
+ * TODO: Restrict the maximal value to Integer.
+ */
+ if ((*cur != 0) || (ret < min) || ((max != -1) && (ret > max))) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ /* XML_SCHEMAP_INVALID_MINOCCURS, */
+ NULL, (xmlNodePtr) attr, NULL, expected,
+ val, NULL, NULL, NULL);
+ return (def);
+ }
+ return (ret);
+}
+
+/**
+ * xmlGetMinOccurs:
+ * @ctxt: a schema validation context
+ * @node: a subtree containing XML Schema informations
+ *
+ * Get the minOccurs property
+ *
+ * Returns the default if not found, or the value
+ */
+static int
+xmlGetMinOccurs(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
+ int min, int max, int def, const char *expected)
+{
+ const xmlChar *val, *cur;
+ int ret = 0;
+ xmlAttrPtr attr;
+
+ attr = xmlSchemaGetPropNode(node, "minOccurs");
+ if (attr == NULL)
+ return (def);
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ cur = val;
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ if (*cur == 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ /* XML_SCHEMAP_INVALID_MINOCCURS, */
+ NULL, (xmlNodePtr) attr, NULL, expected,
+ val, NULL, NULL, NULL);
+ return (def);
+ }
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret = ret * 10 + (*cur - '0');
+ cur++;
+ }
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ /*
+ * TODO: Restrict the maximal value to Integer.
+ */
+ if ((*cur != 0) || (ret < min) || ((max != -1) && (ret > max))) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ /* XML_SCHEMAP_INVALID_MINOCCURS, */
+ NULL, (xmlNodePtr) attr, NULL, expected,
+ val, NULL, NULL, NULL);
+ return (def);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchemaPGetBoolNodeValue:
+ * @ctxt: a schema validation context
+ * @ownerDes: owner designation
+ * @ownerItem: the owner as a schema item
+ * @node: the node holding the value
+ *
+ * Converts a boolean string value into 1 or 0.
+ *
+ * Returns 0 or 1.
+ */
+static int
+xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr node)
+{
+ xmlChar *value = NULL;
+ int res = 0;
+
+ value = xmlNodeGetContent(node);
+ /*
+ * 3.2.2.1 Lexical representation
+ * An instance of a datatype that is defined as `boolean`
+ * can have the following legal literals {true, false, 1, 0}.
+ */
+ if (xmlStrEqual(BAD_CAST value, BAD_CAST "true"))
+ res = 1;
+ else if (xmlStrEqual(BAD_CAST value, BAD_CAST "false"))
+ res = 0;
+ else if (xmlStrEqual(BAD_CAST value, BAD_CAST "1"))
+ res = 1;
+ else if (xmlStrEqual(BAD_CAST value, BAD_CAST "0"))
+ res = 0;
+ else {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_INVALID_BOOLEAN,
+ ownerItem, node,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN),
+ NULL, BAD_CAST value,
+ NULL, NULL, NULL);
+ }
+ if (value != NULL)
+ xmlFree(value);
+ return (res);
+}
+
+/**
+ * xmlGetBooleanProp:
+ * @ctxt: a schema validation context
+ * @node: a subtree containing XML Schema informations
+ * @name: the attribute name
+ * @def: the default value
+ *
+ * Evaluate if a boolean property is set
+ *
+ * Returns the default if not found, 0 if found to be false,
+ * 1 if found to be true
+ */
+static int
+xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
+ xmlNodePtr node,
+ const char *name, int def)
+{
+ const xmlChar *val;
+
+ val = xmlSchemaGetProp(ctxt, node, name);
+ if (val == NULL)
+ return (def);
+ /*
+ * 3.2.2.1 Lexical representation
+ * An instance of a datatype that is defined as `boolean`
+ * can have the following legal literals {true, false, 1, 0}.
+ */
+ if (xmlStrEqual(val, BAD_CAST "true"))
+ def = 1;
+ else if (xmlStrEqual(val, BAD_CAST "false"))
+ def = 0;
+ else if (xmlStrEqual(val, BAD_CAST "1"))
+ def = 1;
+ else if (xmlStrEqual(val, BAD_CAST "0"))
+ def = 0;
+ else {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_INVALID_BOOLEAN,
+ NULL,
+ (xmlNodePtr) xmlSchemaGetPropNode(node, name),
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN),
+ NULL, val, NULL, NULL, NULL);
+ }
+ return (def);
+}
+
+/************************************************************************
+ * *
+ * Shema extraction from an Infoset *
+ * *
+ ************************************************************************/
+static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
+ ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node,
+ int topLevel);
+static xmlSchemaTypePtr xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr
+ ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ int topLevel);
+static xmlSchemaTypePtr xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr
+ ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ xmlSchemaTypeType parentType);
+static xmlSchemaBasicItemPtr
+xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ xmlSchemaItemListPtr uses,
+ int parentType);
+static xmlSchemaTypePtr xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node);
+static xmlSchemaWildcardPtr
+xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema, xmlNodePtr node);
+
+/**
+ * xmlSchemaPValAttrNodeValue:
+ *
+ * @ctxt: a schema parser context
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the schema object owner if existent
+ * @attr: the schema attribute node being validated
+ * @value: the value
+ * @type: the built-in type to be validated against
+ *
+ * Validates a value against the given built-in type.
+ * This one is intended to be used internally for validation
+ * of schema attribute values during parsing of the schema.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaPValAttrNodeValue(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ const xmlChar *value,
+ xmlSchemaTypePtr type)
+{
+
+ int ret = 0;
+
+ /*
+ * NOTE: Should we move this to xmlschematypes.c? Hmm, but this
+ * one is really meant to be used internally, so better not.
+ */
+ if ((pctxt == NULL) || (type == NULL) || (attr == NULL))
+ return (-1);
+ if (type->type != XML_SCHEMA_TYPE_BASIC) {
+ PERROR_INT("xmlSchemaPValAttrNodeValue",
+ "the given type is not a built-in type");
+ return (-1);
+ }
+ switch (type->builtInType) {
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_ANYURI:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ ret = xmlSchemaValPredefTypeNode(type, value, NULL,
+ (xmlNodePtr) attr);
+ break;
+ default: {
+ PERROR_INT("xmlSchemaPValAttrNodeValue",
+ "validation using the given type is not supported while "
+ "parsing a schema");
+ return (-1);
+ }
+ }
+ /*
+ * TODO: Should we use the S4S error codes instead?
+ */
+ if (ret < 0) {
+ PERROR_INT("xmlSchemaPValAttrNodeValue",
+ "failed to validate a schema attribute value");
+ return (-1);
+ } else if (ret > 0) {
+ if (WXS_IS_LIST(type))
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
+ else
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
+ xmlSchemaPSimpleTypeErr(pctxt,
+ ret, ownerItem, (xmlNodePtr) attr,
+ type, NULL, value, NULL, NULL, NULL);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchemaPValAttrNode:
+ *
+ * @ctxt: a schema parser context
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the schema object owner if existent
+ * @attr: the schema attribute node being validated
+ * @type: the built-in type to be validated against
+ * @value: the resulting value if any
+ *
+ * Extracts and validates a value against the given built-in type.
+ * This one is intended to be used internally for validation
+ * of schema attribute values during parsing of the schema.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaPValAttrNode(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlAttrPtr attr,
+ xmlSchemaTypePtr type,
+ const xmlChar **value)
+{
+ const xmlChar *val;
+
+ if ((ctxt == NULL) || (type == NULL) || (attr == NULL))
+ return (-1);
+
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if (value != NULL)
+ *value = val;
+
+ return (xmlSchemaPValAttrNodeValue(ctxt, ownerItem, attr,
+ val, type));
+}
+
+/**
+ * xmlSchemaPValAttr:
+ *
+ * @ctxt: a schema parser context
+ * @node: the element node of the attribute
+ * @ownerDes: the designation of the parent element
+ * @ownerItem: the schema object owner if existent
+ * @ownerElem: the owner element node
+ * @name: the name of the schema attribute node
+ * @type: the built-in type to be validated against
+ * @value: the resulting value if any
+ *
+ * Extracts and validates a value against the given built-in type.
+ * This one is intended to be used internally for validation
+ * of schema attribute values during parsing of the schema.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaBasicItemPtr ownerItem,
+ xmlNodePtr ownerElem,
+ const char *name,
+ xmlSchemaTypePtr type,
+ const xmlChar **value)
+{
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (type == NULL)) {
+ if (value != NULL)
+ *value = NULL;
+ return (-1);
+ }
+ if (type->type != XML_SCHEMA_TYPE_BASIC) {
+ if (value != NULL)
+ *value = NULL;
+ xmlSchemaPErr(ctxt, ownerElem,
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaPValAttr, the given "
+ "type '%s' is not a built-in type.\n",
+ type->name, NULL);
+ return (-1);
+ }
+ attr = xmlSchemaGetPropNode(ownerElem, name);
+ if (attr == NULL) {
+ if (value != NULL)
+ *value = NULL;
+ return (0);
+ }
+ return (xmlSchemaPValAttrNode(ctxt, ownerItem, attr,
+ type, value));
+}
+
+static int
+xmlSchemaCheckReference(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema ATTRIBUTE_UNUSED,
+ xmlNodePtr node,
+ xmlAttrPtr attr,
+ const xmlChar *namespaceName)
+{
+ /* TODO: Pointer comparison instead? */
+ if (xmlStrEqual(pctxt->targetNamespace, namespaceName))
+ return (0);
+ if (xmlStrEqual(xmlSchemaNs, namespaceName))
+ return (0);
+ /*
+ * Check if the referenced namespace was <import>ed.
+ */
+ if (WXS_BUCKET(pctxt)->relations != NULL) {
+ xmlSchemaSchemaRelationPtr rel;
+
+ rel = WXS_BUCKET(pctxt)->relations;
+ do {
+ if (WXS_IS_BUCKET_IMPMAIN(rel->type) &&
+ xmlStrEqual(namespaceName, rel->importNamespace))
+ return (0);
+ rel = rel->next;
+ } while (rel != NULL);
+ }
+ /*
+ * No matching <import>ed namespace found.
+ */
+ {
+ xmlNodePtr n = (attr != NULL) ? (xmlNodePtr) attr : node;
+
+ if (namespaceName == NULL)
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_RESOLVE, n, NULL,
+ "References from this schema to components in no "
+ "namespace are not allowed, since not indicated by an "
+ "import statement", NULL, NULL);
+ else
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_RESOLVE, n, NULL,
+ "References from this schema to components in the "
+ "namespace '%s' are not allowed, since not indicated by an "
+ "import statement", namespaceName, NULL);
+ }
+ return (XML_SCHEMAP_SRC_RESOLVE);
+}
+
+/**
+ * xmlSchemaParseLocalAttributes:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ * @type: the hosting type where the attributes will be anchored
+ *
+ * Parses attribute uses and attribute declarations and
+ * attribute group references.
+ */
+static int
+xmlSchemaParseLocalAttributes(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr *child, xmlSchemaItemListPtr *list,
+ int parentType, int *hasRefs)
+{
+ void *item;
+
+ while ((IS_SCHEMA((*child), "attribute")) ||
+ (IS_SCHEMA((*child), "attributeGroup"))) {
+ if (IS_SCHEMA((*child), "attribute")) {
+ item = xmlSchemaParseLocalAttribute(ctxt, schema, *child,
+ *list, parentType);
+ } else {
+ item = xmlSchemaParseAttributeGroupRef(ctxt, schema, *child);
+ if ((item != NULL) && (hasRefs != NULL))
+ *hasRefs = 1;
+ }
+ if (item != NULL) {
+ if (*list == NULL) {
+ /* TODO: Customize grow factor. */
+ *list = xmlSchemaItemListCreate();
+ if (*list == NULL)
+ return(-1);
+ }
+ if (xmlSchemaItemListAddSize(*list, 2, item) == -1)
+ return(-1);
+ }
+ *child = (*child)->next;
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaParseAnnotation:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Attrribute declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of error, 0 if the declaration is improper and
+ * 1 in case of success.
+ */
+static xmlSchemaAnnotPtr
+xmlSchemaParseAnnotation(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int needed)
+{
+ xmlSchemaAnnotPtr ret;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ int barked = 0;
+
+ /*
+ * INFO: S4S completed.
+ */
+ /*
+ * id = ID
+ * {any attributes with non-schema namespace . . .}>
+ * Content: (appinfo | documentation)*
+ */
+ if ((ctxt == NULL) || (node == NULL))
+ return (NULL);
+ if (needed)
+ ret = xmlSchemaNewAnnot(ctxt, node);
+ else
+ ret = NULL;
+ attr = node->properties;
+ while (attr != NULL) {
+ if (((attr->ns == NULL) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id"))) ||
+ ((attr->ns != NULL) &&
+ xmlStrEqual(attr->ns->href, xmlSchemaNs))) {
+
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ while (child != NULL) {
+ if (IS_SCHEMA(child, "appinfo")) {
+ /* TODO: make available the content of "appinfo". */
+ /*
+ * source = anyURI
+ * {any attributes with non-schema namespace . . .}>
+ * Content: ({any})*
+ */
+ attr = child->properties;
+ while (attr != NULL) {
+ if (((attr->ns == NULL) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "source"))) ||
+ ((attr->ns != NULL) &&
+ xmlStrEqual(attr->ns->href, xmlSchemaNs))) {
+
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttr(ctxt, NULL, child, "source",
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "documentation")) {
+ /* TODO: make available the content of "documentation". */
+ /*
+ * source = anyURI
+ * {any attributes with non-schema namespace . . .}>
+ * Content: ({any})*
+ */
+ attr = child->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (!xmlStrEqual(attr->name, BAD_CAST "source")) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else {
+ if (xmlStrEqual(attr->ns->href, xmlSchemaNs) ||
+ (xmlStrEqual(attr->name, BAD_CAST "lang") &&
+ (!xmlStrEqual(attr->ns->href, XML_XML_NAMESPACE)))) {
+
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ }
+ attr = attr->next;
+ }
+ /*
+ * Attribute "xml:lang".
+ */
+ attr = xmlSchemaGetPropNodeNs(child, (const char *) XML_XML_NAMESPACE, "lang");
+ if (attr != NULL)
+ xmlSchemaPValAttrNode(ctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_LANGUAGE), NULL);
+ child = child->next;
+ } else {
+ if (!barked)
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL, "(appinfo | documentation)*");
+ barked = 1;
+ child = child->next;
+ }
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaParseFacet:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Facet declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the new type structure or NULL in case of error
+ */
+static xmlSchemaFacetPtr
+xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaFacetPtr facet;
+ xmlNodePtr child = NULL;
+ const xmlChar *value;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ facet = xmlSchemaNewFacet();
+ if (facet == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating facet", node);
+ return (NULL);
+ }
+ facet->node = node;
+ value = xmlSchemaGetProp(ctxt, node, "value");
+ if (value == NULL) {
+ xmlSchemaPErr2(ctxt, node, child, XML_SCHEMAP_FACET_NO_VALUE,
+ "Facet %s has no value\n", node->name, NULL);
+ xmlSchemaFreeFacet(facet);
+ return (NULL);
+ }
+ if (IS_SCHEMA(node, "minInclusive")) {
+ facet->type = XML_SCHEMA_FACET_MININCLUSIVE;
+ } else if (IS_SCHEMA(node, "minExclusive")) {
+ facet->type = XML_SCHEMA_FACET_MINEXCLUSIVE;
+ } else if (IS_SCHEMA(node, "maxInclusive")) {
+ facet->type = XML_SCHEMA_FACET_MAXINCLUSIVE;
+ } else if (IS_SCHEMA(node, "maxExclusive")) {
+ facet->type = XML_SCHEMA_FACET_MAXEXCLUSIVE;
+ } else if (IS_SCHEMA(node, "totalDigits")) {
+ facet->type = XML_SCHEMA_FACET_TOTALDIGITS;
+ } else if (IS_SCHEMA(node, "fractionDigits")) {
+ facet->type = XML_SCHEMA_FACET_FRACTIONDIGITS;
+ } else if (IS_SCHEMA(node, "pattern")) {
+ facet->type = XML_SCHEMA_FACET_PATTERN;
+ } else if (IS_SCHEMA(node, "enumeration")) {
+ facet->type = XML_SCHEMA_FACET_ENUMERATION;
+ } else if (IS_SCHEMA(node, "whiteSpace")) {
+ facet->type = XML_SCHEMA_FACET_WHITESPACE;
+ } else if (IS_SCHEMA(node, "length")) {
+ facet->type = XML_SCHEMA_FACET_LENGTH;
+ } else if (IS_SCHEMA(node, "maxLength")) {
+ facet->type = XML_SCHEMA_FACET_MAXLENGTH;
+ } else if (IS_SCHEMA(node, "minLength")) {
+ facet->type = XML_SCHEMA_FACET_MINLENGTH;
+ } else {
+ xmlSchemaPErr2(ctxt, node, child, XML_SCHEMAP_UNKNOWN_FACET_TYPE,
+ "Unknown facet type %s\n", node->name, NULL);
+ xmlSchemaFreeFacet(facet);
+ return (NULL);
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ facet->value = value;
+ if ((facet->type != XML_SCHEMA_FACET_PATTERN) &&
+ (facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
+ const xmlChar *fixed;
+
+ fixed = xmlSchemaGetProp(ctxt, node, "fixed");
+ if (fixed != NULL) {
+ if (xmlStrEqual(fixed, BAD_CAST "true"))
+ facet->fixed = 1;
+ }
+ }
+ child = node->children;
+
+ if (IS_SCHEMA(child, "annotation")) {
+ facet->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPErr2(ctxt, node, child, XML_SCHEMAP_UNKNOWN_FACET_CHILD,
+ "Facet %s has unexpected child content\n",
+ node->name, NULL);
+ }
+ return (facet);
+}
+
+/**
+ * xmlSchemaParseWildcardNs:
+ * @ctxt: a schema parser context
+ * @wildc: the wildcard, already created
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parses the attribute "processContents" and "namespace"
+ * of a xsd:anyAttribute and xsd:any.
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns 0 if everything goes fine, a positive error code
+ * if something is not valid and -1 if an internal error occurs.
+ */
+static int
+xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema ATTRIBUTE_UNUSED,
+ xmlSchemaWildcardPtr wildc,
+ xmlNodePtr node)
+{
+ const xmlChar *pc, *ns, *dictnsItem;
+ int ret = 0;
+ xmlChar *nsItem;
+ xmlSchemaWildcardNsPtr tmp, lastNs = NULL;
+ xmlAttrPtr attr;
+
+ pc = xmlSchemaGetProp(ctxt, node, "processContents");
+ if ((pc == NULL)
+ || (xmlStrEqual(pc, (const xmlChar *) "strict"))) {
+ wildc->processContents = XML_SCHEMAS_ANY_STRICT;
+ } else if (xmlStrEqual(pc, (const xmlChar *) "skip")) {
+ wildc->processContents = XML_SCHEMAS_ANY_SKIP;
+ } else if (xmlStrEqual(pc, (const xmlChar *) "lax")) {
+ wildc->processContents = XML_SCHEMAS_ANY_LAX;
+ } else {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, node,
+ NULL, "(strict | skip | lax)", pc,
+ NULL, NULL, NULL);
+ wildc->processContents = XML_SCHEMAS_ANY_STRICT;
+ ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
+ }
+ /*
+ * Build the namespace constraints.
+ */
+ attr = xmlSchemaGetPropNode(node, "namespace");
+ ns = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if ((attr == NULL) || (xmlStrEqual(ns, BAD_CAST "##any")))
+ wildc->any = 1;
+ else if (xmlStrEqual(ns, BAD_CAST "##other")) {
+ wildc->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (wildc->negNsSet == NULL) {
+ return (-1);
+ }
+ wildc->negNsSet->value = ctxt->targetNamespace;
+ } else {
+ const xmlChar *end, *cur;
+
+ cur = ns;
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ nsItem = xmlStrndup(cur, end - cur);
+ if ((xmlStrEqual(nsItem, BAD_CAST "##other")) ||
+ (xmlStrEqual(nsItem, BAD_CAST "##any"))) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER,
+ NULL, (xmlNodePtr) attr,
+ NULL,
+ "((##any | ##other) | List of (xs:anyURI | "
+ "(##targetNamespace | ##local)))",
+ nsItem, NULL, NULL, NULL);
+ ret = XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER;
+ } else {
+ if (xmlStrEqual(nsItem, BAD_CAST "##targetNamespace")) {
+ dictnsItem = ctxt->targetNamespace;
+ } else if (xmlStrEqual(nsItem, BAD_CAST "##local")) {
+ dictnsItem = NULL;
+ } else {
+ /*
+ * Validate the item (anyURI).
+ */
+ xmlSchemaPValAttrNodeValue(ctxt, NULL, attr,
+ nsItem, xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI));
+ dictnsItem = xmlDictLookup(ctxt->dict, nsItem, -1);
+ }
+ /*
+ * Avoid dublicate namespaces.
+ */
+ tmp = wildc->nsSet;
+ while (tmp != NULL) {
+ if (dictnsItem == tmp->value)
+ break;
+ tmp = tmp->next;
+ }
+ if (tmp == NULL) {
+ tmp = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (tmp == NULL) {
+ xmlFree(nsItem);
+ return (-1);
+ }
+ tmp->value = dictnsItem;
+ tmp->next = NULL;
+ if (wildc->nsSet == NULL)
+ wildc->nsSet = tmp;
+ else if (lastNs != NULL)
+ lastNs->next = tmp;
+ lastNs = tmp;
+ }
+
+ }
+ xmlFree(nsItem);
+ cur = end;
+ } while (*cur != 0);
+ }
+ return (ret);
+}
+
+static int
+xmlSchemaPCheckParticleCorrect_2(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr item ATTRIBUTE_UNUSED,
+ xmlNodePtr node,
+ int minOccurs,
+ int maxOccurs) {
+
+ if ((maxOccurs == 0) && ( minOccurs == 0))
+ return (0);
+ if (maxOccurs != UNBOUNDED) {
+ /*
+ * TODO: Maybe we should better not create the particle,
+ * if min/max is invalid, since it could confuse the build of the
+ * content model.
+ */
+ /*
+ * 3.9.6 Schema Component Constraint: Particle Correct
+ *
+ */
+ if (maxOccurs < 1) {
+ /*
+ * 2.2 {max occurs} must be greater than or equal to 1.
+ */
+ xmlSchemaPCustomAttrErr(ctxt,
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2,
+ NULL, NULL,
+ xmlSchemaGetPropNode(node, "maxOccurs"),
+ "The value must be greater than or equal to 1");
+ return (XML_SCHEMAP_P_PROPS_CORRECT_2_2);
+ } else if (minOccurs > maxOccurs) {
+ /*
+ * 2.1 {min occurs} must not be greater than {max occurs}.
+ */
+ xmlSchemaPCustomAttrErr(ctxt,
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1,
+ NULL, NULL,
+ xmlSchemaGetPropNode(node, "minOccurs"),
+ "The value must not be greater than the value of 'maxOccurs'");
+ return (XML_SCHEMAP_P_PROPS_CORRECT_2_1);
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaParseAny:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parsea a XML schema <any> element. A particle and wildcard
+ * will be created (except if minOccurs==maxOccurs==0, in this case
+ * nothing will be created).
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the particle or NULL in case of error or if minOccurs==maxOccurs==0
+ */
+static xmlSchemaParticlePtr
+xmlSchemaParseAny(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaParticlePtr particle;
+ xmlNodePtr child = NULL;
+ xmlSchemaWildcardPtr wild;
+ int min, max;
+ xmlAttrPtr attr;
+ xmlSchemaAnnotPtr annot = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * minOccurs/maxOccurs.
+ */
+ max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1,
+ "(xs:nonNegativeInteger | unbounded)");
+ min = xmlGetMinOccurs(ctxt, node, 0, -1, 1,
+ "xs:nonNegativeInteger");
+ xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
+ /*
+ * Create & parse the wildcard.
+ */
+ wild = xmlSchemaAddWildcard(ctxt, schema, XML_SCHEMA_TYPE_ANY, node);
+ if (wild == NULL)
+ return (NULL);
+ xmlSchemaParseWildcardNs(ctxt, schema, wild, node);
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?)");
+ }
+ /*
+ * No component if minOccurs==maxOccurs==0.
+ */
+ if ((min == 0) && (max == 0)) {
+ /* Don't free the wildcard, since it's already on the list. */
+ return (NULL);
+ }
+ /*
+ * Create the particle.
+ */
+ particle = xmlSchemaAddParticle(ctxt, node, min, max);
+ if (particle == NULL)
+ return (NULL);
+ particle->annot = annot;
+ particle->children = (xmlSchemaTreeItemPtr) wild;
+
+ return (particle);
+}
+
+/**
+ * xmlSchemaParseNotation:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Notation declaration
+ *
+ * Returns the new structure or NULL in case of error
+ */
+static xmlSchemaNotationPtr
+xmlSchemaParseNotation(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ const xmlChar *name;
+ xmlSchemaNotationPtr ret;
+ xmlNodePtr child = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ name = xmlSchemaGetProp(ctxt, node, "name");
+ if (name == NULL) {
+ xmlSchemaPErr2(ctxt, node, child, XML_SCHEMAP_NOTATION_NO_NAME,
+ "Notation has no name\n", NULL, NULL);
+ return (NULL);
+ }
+ ret = xmlSchemaAddNotation(ctxt, schema, name,
+ ctxt->targetNamespace, node);
+ if (ret == NULL)
+ return (NULL);
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ ret->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?)");
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaParseAnyAttribute:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema AnyAttrribute declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns a wildcard or NULL.
+ */
+static xmlSchemaWildcardPtr
+xmlSchemaParseAnyAttribute(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema, xmlNodePtr node)
+{
+ xmlSchemaWildcardPtr ret;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ ret = xmlSchemaAddWildcard(ctxt, schema, XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ node);
+ if (ret == NULL) {
+ return (NULL);
+ }
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "processContents"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * Parse the namespace list.
+ */
+ if (xmlSchemaParseWildcardNs(ctxt, schema, ret, node) != 0)
+ return (NULL);
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ ret->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?)");
+ }
+
+ return (ret);
+}
+
+
+/**
+ * xmlSchemaParseAttribute:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Attrribute declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the attribute declaration.
+ */
+static xmlSchemaBasicItemPtr
+xmlSchemaParseLocalAttribute(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ xmlSchemaItemListPtr uses,
+ int parentType)
+{
+ const xmlChar *attrValue, *name = NULL, *ns = NULL;
+ xmlSchemaAttributeUsePtr use = NULL;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *tmpNs = NULL, *tmpName = NULL, *defValue = NULL;
+ int isRef = 0, occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+ int nberrors, hasForm = 0, defValueType = 0;
+
+#define WXS_ATTR_DEF_VAL_DEFAULT 1
+#define WXS_ATTR_DEF_VAL_FIXED 2
+
+ /*
+ * 3.2.3 Constraints on XML Representations of Attribute Declarations
+ */
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ attr = xmlSchemaGetPropNode(node, "ref");
+ if (attr != NULL) {
+ if (xmlSchemaPValAttrNodeQName(pctxt, schema,
+ NULL, attr, &tmpNs, &tmpName) != 0) {
+ return (NULL);
+ }
+ if (xmlSchemaCheckReference(pctxt, schema, node, attr, tmpNs) != 0)
+ return(NULL);
+ isRef = 1;
+ }
+ nberrors = pctxt->nberrors;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (isRef) {
+ if (xmlStrEqual(attr->name, BAD_CAST "id")) {
+ xmlSchemaPValAttrNodeID(pctxt, attr);
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "ref")) {
+ goto attr_next;
+ }
+ } else {
+ if (xmlStrEqual(attr->name, BAD_CAST "name")) {
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "id")) {
+ xmlSchemaPValAttrNodeID(pctxt, attr);
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "type")) {
+ xmlSchemaPValAttrNodeQName(pctxt, schema, NULL,
+ attr, &tmpNs, &tmpName);
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "form")) {
+ /*
+ * Evaluate the target namespace
+ */
+ hasForm = 1;
+ attrValue = xmlSchemaGetNodeContent(pctxt,
+ (xmlNodePtr) attr);
+ if (xmlStrEqual(attrValue, BAD_CAST "qualified")) {
+ ns = pctxt->targetNamespace;
+ } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified"))
+ {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ NULL, "(qualified | unqualified)",
+ attrValue, NULL, NULL, NULL);
+ }
+ goto attr_next;
+ }
+ }
+ if (xmlStrEqual(attr->name, BAD_CAST "use")) {
+
+ attrValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+ /* TODO: Maybe we need to normalize the value beforehand. */
+ if (xmlStrEqual(attrValue, BAD_CAST "optional"))
+ occurs = XML_SCHEMAS_ATTR_USE_OPTIONAL;
+ else if (xmlStrEqual(attrValue, BAD_CAST "prohibited"))
+ occurs = XML_SCHEMAS_ATTR_USE_PROHIBITED;
+ else if (xmlStrEqual(attrValue, BAD_CAST "required"))
+ occurs = XML_SCHEMAS_ATTR_USE_REQUIRED;
+ else {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_INVALID_ATTR_USE,
+ NULL, (xmlNodePtr) attr,
+ NULL, "(optional | prohibited | required)",
+ attrValue, NULL, NULL, NULL);
+ }
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "default")) {
+ /*
+ * 3.2.3 : 1
+ * default and fixed must not both be present.
+ */
+ if (defValue) {
+ xmlSchemaPMutualExclAttrErr(pctxt,
+ XML_SCHEMAP_SRC_ATTRIBUTE_1,
+ NULL, attr, "default", "fixed");
+ } else {
+ defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+ defValueType = WXS_ATTR_DEF_VAL_DEFAULT;
+ }
+ goto attr_next;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "fixed")) {
+ /*
+ * 3.2.3 : 1
+ * default and fixed must not both be present.
+ */
+ if (defValue) {
+ xmlSchemaPMutualExclAttrErr(pctxt,
+ XML_SCHEMAP_SRC_ATTRIBUTE_1,
+ NULL, attr, "default", "fixed");
+ } else {
+ defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+ defValueType = WXS_ATTR_DEF_VAL_FIXED;
+ }
+ goto attr_next;
+ }
+ } else if (! xmlStrEqual(attr->ns->href, xmlSchemaNs))
+ goto attr_next;
+
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+
+attr_next:
+ attr = attr->next;
+ }
+ /*
+ * 3.2.3 : 2
+ * If default and use are both present, use must have
+ * the actual value optional.
+ */
+ if ((defValueType == WXS_ATTR_DEF_VAL_DEFAULT) &&
+ (occurs != XML_SCHEMAS_ATTR_USE_OPTIONAL)) {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_SRC_ATTRIBUTE_2,
+ NULL, node, NULL,
+ "(optional | prohibited | required)", NULL,
+ "The value of the attribute 'use' must be 'optional' "
+ "if the attribute 'default' is present",
+ NULL, NULL);
+ }
+ /*
+ * We want correct attributes.
+ */
+ if (nberrors != pctxt->nberrors)
+ return(NULL);
+ if (! isRef) {
+ xmlSchemaAttributePtr attrDecl;
+
+ /* TODO: move XML_SCHEMAS_QUALIF_ATTR to the parser. */
+ if ((! hasForm) && (schema->flags & XML_SCHEMAS_QUALIF_ATTR))
+ ns = pctxt->targetNamespace;
+ /*
+ * 3.2.6 Schema Component Constraint: xsi: Not Allowed
+ * TODO: Move this to the component layer.
+ */
+ if (xmlStrEqual(ns, xmlSchemaInstanceNs)) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_NO_XSI,
+ node, NULL,
+ "The target namespace must not match '%s'",
+ xmlSchemaInstanceNs, NULL);
+ }
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "name", NULL);
+ return (NULL);
+ }
+ if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+ return (NULL);
+ }
+ /*
+ * 3.2.6 Schema Component Constraint: xmlns Not Allowed
+ * TODO: Move this to the component layer.
+ */
+ if (xmlStrEqual(name, BAD_CAST "xmlns")) {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_NO_XMLNS,
+ NULL, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
+ "The value of the attribute must not match 'xmlns'",
+ NULL, NULL);
+ return (NULL);
+ }
+ if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED)
+ goto check_children;
+ /*
+ * Create the attribute use component.
+ */
+ use = xmlSchemaAddAttributeUse(pctxt, node);
+ if (use == NULL)
+ return(NULL);
+ use->occurs = occurs;
+ /*
+ * Create the attribute declaration.
+ */
+ attrDecl = xmlSchemaAddAttribute(pctxt, schema, name, ns, node, 0);
+ if (attrDecl == NULL)
+ return (NULL);
+ if (tmpName != NULL) {
+ attrDecl->typeName = tmpName;
+ attrDecl->typeNs = tmpNs;
+ }
+ use->attrDecl = attrDecl;
+ /*
+ * Value constraint.
+ */
+ if (defValue != NULL) {
+ attrDecl->defValue = defValue;
+ if (defValueType == WXS_ATTR_DEF_VAL_FIXED)
+ attrDecl->flags |= XML_SCHEMAS_ATTR_FIXED;
+ }
+ } else if (occurs != XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+ xmlSchemaQNameRefPtr ref;
+
+ /*
+ * Create the attribute use component.
+ */
+ use = xmlSchemaAddAttributeUse(pctxt, node);
+ if (use == NULL)
+ return(NULL);
+ /*
+ * We need to resolve the reference at later stage.
+ */
+ WXS_ADD_PENDING(pctxt, use);
+ use->occurs = occurs;
+ /*
+ * Create a QName reference to the attribute declaration.
+ */
+ ref = xmlSchemaNewQNameRef(pctxt, XML_SCHEMA_TYPE_ATTRIBUTE,
+ tmpName, tmpNs);
+ if (ref == NULL)
+ return(NULL);
+ /*
+ * Assign the reference. This will be substituted for the
+ * referenced attribute declaration when the QName is resolved.
+ */
+ use->attrDecl = WXS_ATTR_CAST ref;
+ /*
+ * Value constraint.
+ */
+ if (defValue != NULL)
+ use->defValue = defValue;
+ if (defValueType == WXS_ATTR_DEF_VAL_FIXED)
+ use->flags |= XML_SCHEMA_ATTR_USE_FIXED;
+ }
+
+check_children:
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (occurs == XML_SCHEMAS_ATTR_USE_PROHIBITED) {
+ xmlSchemaAttributeUseProhibPtr prohib;
+
+ if (IS_SCHEMA(child, "annotation")) {
+ xmlSchemaParseAnnotation(pctxt, child, 0);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+ /*
+ * Check for pointlessness of attribute prohibitions.
+ */
+ if (parentType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) {
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+ node, NULL,
+ "Skipping attribute use prohibition, since it is "
+ "pointless inside an <attributeGroup>",
+ NULL, NULL, NULL);
+ return(NULL);
+ } else if (parentType == XML_SCHEMA_TYPE_EXTENSION) {
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+ node, NULL,
+ "Skipping attribute use prohibition, since it is "
+ "pointless when extending a type",
+ NULL, NULL, NULL);
+ return(NULL);
+ }
+ if (! isRef) {
+ tmpName = name;
+ tmpNs = ns;
+ }
+ /*
+ * Check for duplicate attribute prohibitions.
+ */
+ if (uses) {
+ int i;
+
+ for (i = 0; i < uses->nbItems; i++) {
+ use = uses->items[i];
+ if ((use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) &&
+ (tmpName == (WXS_ATTR_PROHIB_CAST use)->name) &&
+ (tmpNs == (WXS_ATTR_PROHIB_CAST use)->targetNamespace))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+ node, NULL,
+ "Skipping duplicate attribute use prohibition '%s'",
+ xmlSchemaFormatQName(&str, tmpNs, tmpName),
+ NULL, NULL);
+ FREE_AND_NULL(str)
+ return(NULL);
+ }
+ }
+ }
+ /*
+ * Create the attribute prohibition helper component.
+ */
+ prohib = xmlSchemaAddAttributeUseProhib(pctxt);
+ if (prohib == NULL)
+ return(NULL);
+ prohib->node = node;
+ prohib->name = tmpName;
+ prohib->targetNamespace = tmpNs;
+ if (isRef) {
+ /*
+ * We need at least to resolve to the attribute declaration.
+ */
+ WXS_ADD_PENDING(pctxt, prohib);
+ }
+ return(WXS_BASIC_CAST prohib);
+ } else {
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: Should this go into the attr decl?
+ */
+ use->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
+ child = child->next;
+ }
+ if (isRef) {
+ if (child != NULL) {
+ if (IS_SCHEMA(child, "simpleType"))
+ /*
+ * 3.2.3 : 3.2
+ * If ref is present, then all of <simpleType>,
+ * form and type must be absent.
+ */
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ else
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+ } else {
+ if (IS_SCHEMA(child, "simpleType")) {
+ if (WXS_ATTRUSE_DECL(use)->typeName != NULL) {
+ /*
+ * 3.2.3 : 4
+ * type and <simpleType> must not both be present.
+ */
+ xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
+ NULL, node, child,
+ "The attribute 'type' and the <simpleType> child "
+ "are mutually exclusive", NULL);
+ } else
+ WXS_ATTRUSE_TYPEDEF(use) =
+ xmlSchemaParseSimpleType(pctxt, schema, child, 0);
+ child = child->next;
+ }
+ if (child != NULL)
+ xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, simpleType?)");
+ }
+ }
+ return (WXS_BASIC_CAST use);
+}
+
+
+static xmlSchemaAttributePtr
+xmlSchemaParseGlobalAttribute(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ const xmlChar *attrValue;
+ xmlSchemaAttributePtr ret;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ /*
+ * Note that the w3c spec assumes the schema to be validated with schema
+ * for schemas beforehand.
+ *
+ * 3.2.3 Constraints on XML Representations of Attribute Declarations
+ */
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /*
+ * 3.2.3 : 3.1
+ * One of ref or name must be present, but not both
+ */
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(pctxt, XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "name", NULL);
+ return (NULL);
+ }
+ if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0) {
+ return (NULL);
+ }
+ /*
+ * 3.2.6 Schema Component Constraint: xmlns Not Allowed
+ * TODO: Move this to the component layer.
+ */
+ if (xmlStrEqual(attrValue, BAD_CAST "xmlns")) {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_NO_XMLNS,
+ NULL, (xmlNodePtr) attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), NULL, NULL,
+ "The value of the attribute must not match 'xmlns'",
+ NULL, NULL);
+ return (NULL);
+ }
+ /*
+ * 3.2.6 Schema Component Constraint: xsi: Not Allowed
+ * TODO: Move this to the component layer.
+ * Or better leave it here and add it to the component layer
+ * if we have a schema construction API.
+ */
+ if (xmlStrEqual(pctxt->targetNamespace, xmlSchemaInstanceNs)) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_NO_XSI, node, NULL,
+ "The target namespace must not match '%s'",
+ xmlSchemaInstanceNs, NULL);
+ }
+
+ ret = xmlSchemaAddAttribute(pctxt, schema, attrValue,
+ pctxt->targetNamespace, node, 1);
+ if (ret == NULL)
+ return (NULL);
+ ret->flags |= XML_SCHEMAS_ATTR_GLOBAL;
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "default")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "fixed")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "type")))
+ {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrQName(pctxt, schema, NULL,
+ node, "type", &ret->typeNs, &ret->typeName);
+
+ xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+ /*
+ * Attribute "fixed".
+ */
+ ret->defValue = xmlSchemaGetProp(pctxt, node, "fixed");
+ if (ret->defValue != NULL)
+ ret->flags |= XML_SCHEMAS_ATTR_FIXED;
+ /*
+ * Attribute "default".
+ */
+ attr = xmlSchemaGetPropNode(node, "default");
+ if (attr != NULL) {
+ /*
+ * 3.2.3 : 1
+ * default and fixed must not both be present.
+ */
+ if (ret->flags & XML_SCHEMAS_ATTR_FIXED) {
+ xmlSchemaPMutualExclAttrErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_1,
+ WXS_BASIC_CAST ret, attr, "default", "fixed");
+ } else
+ ret->defValue = xmlSchemaGetNodeContent(pctxt, (xmlNodePtr) attr);
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ ret->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
+ child = child->next;
+ }
+ if (IS_SCHEMA(child, "simpleType")) {
+ if (ret->typeName != NULL) {
+ /*
+ * 3.2.3 : 4
+ * type and <simpleType> must not both be present.
+ */
+ xmlSchemaPContentErr(pctxt, XML_SCHEMAP_SRC_ATTRIBUTE_4,
+ NULL, node, child,
+ "The attribute 'type' and the <simpleType> child "
+ "are mutually exclusive", NULL);
+ } else
+ ret->subtypes = xmlSchemaParseSimpleType(pctxt, schema, child, 0);
+ child = child->next;
+ }
+ if (child != NULL)
+ xmlSchemaPContentErr(pctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, simpleType?)");
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaParseAttributeGroupRef:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parse an attribute group definition reference.
+ * Note that a reference to an attribute group does not
+ * correspond to any component at all.
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the attribute group or NULL in case of error.
+ */
+static xmlSchemaQNameRefPtr
+xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaQNameRefPtr ret;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *refNs = NULL, *ref = NULL;
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ attr = xmlSchemaGetPropNode(node, "ref");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "ref", NULL);
+ return (NULL);
+ }
+ xmlSchemaPValAttrNodeQName(pctxt, schema,
+ NULL, attr, &refNs, &ref);
+ if (xmlSchemaCheckReference(pctxt, schema, node, attr, refNs) != 0)
+ return(NULL);
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id")))
+ {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /* Attribute ID */
+ xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: We do not have a place to store the annotation, do we?
+ */
+ xmlSchemaParseAnnotation(pctxt, child, 0);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+
+ /*
+ * Handle attribute group redefinitions.
+ */
+ if (pctxt->isRedefine && pctxt->redef &&
+ (pctxt->redef->item->type ==
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP) &&
+ (ref == pctxt->redef->refName) &&
+ (refNs == pctxt->redef->refTargetNs))
+ {
+ /*
+ * SPEC src-redefine:
+ * (7.1) "If it has an <attributeGroup> among its contents
+ * the `actual value` of whose ref [attribute] is the same
+ * as the `actual value` of its own name attribute plus
+ * target namespace, then it must have exactly one such group."
+ */
+ if (pctxt->redefCounter != 0) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_REDEFINE, node, NULL,
+ "The redefining attribute group definition "
+ "'%s' must not contain more than one "
+ "reference to the redefined definition",
+ xmlSchemaFormatQName(&str, refNs, ref), NULL);
+ FREE_AND_NULL(str);
+ return(NULL);
+ }
+ pctxt->redefCounter++;
+ /*
+ * URGENT TODO: How to ensure that the reference will not be
+ * handled by the normal component resolution mechanism?
+ */
+ ret = xmlSchemaNewQNameRef(pctxt,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs);
+ if (ret == NULL)
+ return(NULL);
+ ret->node = node;
+ pctxt->redef->reference = WXS_BASIC_CAST ret;
+ } else {
+ /*
+ * Create a QName-reference helper component. We will substitute this
+ * component for the attribute uses of the referenced attribute group
+ * definition.
+ */
+ ret = xmlSchemaNewQNameRef(pctxt,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP, ref, refNs);
+ if (ret == NULL)
+ return(NULL);
+ ret->node = node;
+ /* Add to pending items, to be able to resolve the reference. */
+ WXS_ADD_PENDING(pctxt, ret);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchemaParseAttributeGroupDefinition:
+ * @pctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Attribute Group declaration
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the attribute group definition or NULL in case of error.
+ */
+static xmlSchemaAttributeGroupPtr
+xmlSchemaParseAttributeGroupDefinition(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ const xmlChar *name;
+ xmlSchemaAttributeGroupPtr ret;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ int hasRefs = 0;
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "name", NULL);
+ return (NULL);
+ }
+ /*
+ * The name is crucial, exit if invalid.
+ */
+ if (xmlSchemaPValAttrNode(pctxt,
+ NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+ return (NULL);
+ }
+ ret = xmlSchemaAddAttributeGroupDefinition(pctxt, schema,
+ name, pctxt->targetNamespace, node);
+ if (ret == NULL)
+ return (NULL);
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id")))
+ {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /* Attribute ID */
+ xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ ret->annot = xmlSchemaParseAnnotation(pctxt, child, 1);
+ child = child->next;
+ }
+ /*
+ * Parse contained attribute decls/refs.
+ */
+ if (xmlSchemaParseLocalAttributes(pctxt, schema, &child,
+ (xmlSchemaItemListPtr *) &(ret->attrUses),
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP, &hasRefs) == -1)
+ return(NULL);
+ if (hasRefs)
+ ret->flags |= XML_SCHEMAS_ATTRGROUP_HAS_REFS;
+ /*
+ * Parse the attribute wildcard.
+ */
+ if (IS_SCHEMA(child, "anyAttribute")) {
+ ret->attributeWildcard = xmlSchemaParseAnyAttribute(pctxt,
+ schema, child);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, ((attribute | attributeGroup)*, anyAttribute?))");
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchemaPValAttrFormDefault:
+ * @value: the value
+ * @flags: the flags to be modified
+ * @flagQualified: the specific flag for "qualified"
+ *
+ * Returns 0 if the value is valid, 1 otherwise.
+ */
+static int
+xmlSchemaPValAttrFormDefault(const xmlChar *value,
+ int *flags,
+ int flagQualified)
+{
+ if (xmlStrEqual(value, BAD_CAST "qualified")) {
+ if ((*flags & flagQualified) == 0)
+ *flags |= flagQualified;
+ } else if (!xmlStrEqual(value, BAD_CAST "unqualified"))
+ return (1);
+
+ return (0);
+}
+
+/**
+ * xmlSchemaPValAttrBlockFinal:
+ * @value: the value
+ * @flags: the flags to be modified
+ * @flagAll: the specific flag for "#all"
+ * @flagExtension: the specific flag for "extension"
+ * @flagRestriction: the specific flag for "restriction"
+ * @flagSubstitution: the specific flag for "substitution"
+ * @flagList: the specific flag for "list"
+ * @flagUnion: the specific flag for "union"
+ *
+ * Validates the value of the attribute "final" and "block". The value
+ * is converted into the specified flag values and returned in @flags.
+ *
+ * Returns 0 if the value is valid, 1 otherwise.
+ */
+
+static int
+xmlSchemaPValAttrBlockFinal(const xmlChar *value,
+ int *flags,
+ int flagAll,
+ int flagExtension,
+ int flagRestriction,
+ int flagSubstitution,
+ int flagList,
+ int flagUnion)
+{
+ int ret = 0;
+
+ /*
+ * TODO: This does not check for dublicate entries.
+ */
+ if ((flags == NULL) || (value == NULL))
+ return (-1);
+ if (value[0] == 0)
+ return (0);
+ if (xmlStrEqual(value, BAD_CAST "#all")) {
+ if (flagAll != -1)
+ *flags |= flagAll;
+ else {
+ if (flagExtension != -1)
+ *flags |= flagExtension;
+ if (flagRestriction != -1)
+ *flags |= flagRestriction;
+ if (flagSubstitution != -1)
+ *flags |= flagSubstitution;
+ if (flagList != -1)
+ *flags |= flagList;
+ if (flagUnion != -1)
+ *flags |= flagUnion;
+ }
+ } else {
+ const xmlChar *end, *cur = value;
+ xmlChar *item;
+
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ item = xmlStrndup(cur, end - cur);
+ if (xmlStrEqual(item, BAD_CAST "extension")) {
+ if (flagExtension != -1) {
+ if ((*flags & flagExtension) == 0)
+ *flags |= flagExtension;
+ } else
+ ret = 1;
+ } else if (xmlStrEqual(item, BAD_CAST "restriction")) {
+ if (flagRestriction != -1) {
+ if ((*flags & flagRestriction) == 0)
+ *flags |= flagRestriction;
+ } else
+ ret = 1;
+ } else if (xmlStrEqual(item, BAD_CAST "substitution")) {
+ if (flagSubstitution != -1) {
+ if ((*flags & flagSubstitution) == 0)
+ *flags |= flagSubstitution;
+ } else
+ ret = 1;
+ } else if (xmlStrEqual(item, BAD_CAST "list")) {
+ if (flagList != -1) {
+ if ((*flags & flagList) == 0)
+ *flags |= flagList;
+ } else
+ ret = 1;
+ } else if (xmlStrEqual(item, BAD_CAST "union")) {
+ if (flagUnion != -1) {
+ if ((*flags & flagUnion) == 0)
+ *flags |= flagUnion;
+ } else
+ ret = 1;
+ } else
+ ret = 1;
+ if (item != NULL)
+ xmlFree(item);
+ cur = end;
+ } while ((ret == 0) && (*cur != 0));
+ }
+
+ return (ret);
+}
+
+static int
+xmlSchemaCheckCSelectorXPath(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaIDCPtr idc,
+ xmlSchemaIDCSelectPtr selector,
+ xmlAttrPtr attr,
+ int isField)
+{
+ xmlNodePtr node;
+
+ /*
+ * c-selector-xpath:
+ * Schema Component Constraint: Selector Value OK
+ *
+ * TODO: 1 The {selector} must be a valid XPath expression, as defined
+ * in [XPath].
+ */
+ if (selector == NULL) {
+ xmlSchemaPErr(ctxt, idc->node,
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaCheckCSelectorXPath, "
+ "the selector is not specified.\n", NULL, NULL);
+ return (-1);
+ }
+ if (attr == NULL)
+ node = idc->node;
+ else
+ node = (xmlNodePtr) attr;
+ if (selector->xpath == NULL) {
+ xmlSchemaPCustomErr(ctxt,
+ /* TODO: Adjust error code. */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, node,
+ "The XPath expression of the selector is not valid", NULL);
+ return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE);
+ } else {
+ const xmlChar **nsArray = NULL;
+ xmlNsPtr *nsList = NULL;
+ /*
+ * Compile the XPath expression.
+ */
+ /*
+ * TODO: We need the array of in-scope namespaces for compilation.
+ * TODO: Call xmlPatterncompile with different options for selector/
+ * field.
+ */
+ if (attr == NULL)
+ nsList = NULL;
+ else
+ nsList = xmlGetNsList(attr->doc, attr->parent);
+ /*
+ * Build an array of prefixes and namespaces.
+ */
+ if (nsList != NULL) {
+ int i, count = 0;
+
+ for (i = 0; nsList[i] != NULL; i++)
+ count++;
+
+ nsArray = (const xmlChar **) xmlMalloc(
+ (count * 2 + 1) * sizeof(const xmlChar *));
+ if (nsArray == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating a namespace array",
+ NULL);
+ xmlFree(nsList);
+ return (-1);
+ }
+ for (i = 0; i < count; i++) {
+ nsArray[2 * i] = nsList[i]->href;
+ nsArray[2 * i + 1] = nsList[i]->prefix;
+ }
+ nsArray[count * 2] = NULL;
+ xmlFree(nsList);
+ }
+ /*
+ * TODO: Differentiate between "selector" and "field".
+ */
+ if (isField)
+ selector->xpathComp = (void *) xmlPatterncompile(selector->xpath,
+ NULL, XML_PATTERN_XSFIELD, nsArray);
+ else
+ selector->xpathComp = (void *) xmlPatterncompile(selector->xpath,
+ NULL, XML_PATTERN_XSSEL, nsArray);
+ if (nsArray != NULL)
+ xmlFree((xmlChar **) nsArray);
+
+ if (selector->xpathComp == NULL) {
+ xmlSchemaPCustomErr(ctxt,
+ /* TODO: Adjust error code? */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, node,
+ "The XPath expression '%s' could not be "
+ "compiled", selector->xpath);
+ return (XML_SCHEMAP_S4S_ATTR_INVALID_VALUE);
+ }
+ }
+ return (0);
+}
+
+#define ADD_ANNOTATION(annot) \
+ xmlSchemaAnnotPtr cur = item->annot; \
+ if (item->annot == NULL) { \
+ item->annot = annot; \
+ return (annot); \
+ } \
+ cur = item->annot; \
+ if (cur->next != NULL) { \
+ cur = cur->next; \
+ } \
+ cur->next = annot;
+
+/**
+ * xmlSchemaAssignAnnotation:
+ * @item: the schema component
+ * @annot: the annotation
+ *
+ * Adds the annotation to the given schema component.
+ *
+ * Returns the given annotaion.
+ */
+static xmlSchemaAnnotPtr
+xmlSchemaAddAnnotation(xmlSchemaAnnotItemPtr annItem,
+ xmlSchemaAnnotPtr annot)
+{
+ if ((annItem == NULL) || (annot == NULL))
+ return (NULL);
+ switch (annItem->type) {
+ case XML_SCHEMA_TYPE_ELEMENT: {
+ xmlSchemaElementPtr item = (xmlSchemaElementPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE: {
+ xmlSchemaAttributePtr item = (xmlSchemaAttributePtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_ANY_ATTRIBUTE:
+ case XML_SCHEMA_TYPE_ANY: {
+ xmlSchemaWildcardPtr item = (xmlSchemaWildcardPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_PARTICLE:
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE: {
+ xmlSchemaAnnotItemPtr item = (xmlSchemaAnnotItemPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP: {
+ xmlSchemaAttributeGroupPtr item =
+ (xmlSchemaAttributeGroupPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_NOTATION: {
+ xmlSchemaNotationPtr item = (xmlSchemaNotationPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ case XML_SCHEMA_FACET_PATTERN:
+ case XML_SCHEMA_FACET_ENUMERATION:
+ case XML_SCHEMA_FACET_WHITESPACE:
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH: {
+ xmlSchemaFacetPtr item = (xmlSchemaFacetPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_SIMPLE:
+ case XML_SCHEMA_TYPE_COMPLEX: {
+ xmlSchemaTypePtr item = (xmlSchemaTypePtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_GROUP: {
+ xmlSchemaModelGroupDefPtr item = (xmlSchemaModelGroupDefPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL: {
+ xmlSchemaModelGroupPtr item = (xmlSchemaModelGroupPtr) annItem;
+ ADD_ANNOTATION(annot)
+ }
+ break;
+ default:
+ xmlSchemaPCustomErr(NULL,
+ XML_SCHEMAP_INTERNAL,
+ NULL, NULL,
+ "Internal error: xmlSchemaAddAnnotation, "
+ "The item is not a annotated schema component", NULL);
+ break;
+ }
+ return (annot);
+}
+
+/**
+ * xmlSchemaParseIDCSelectorAndField:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parses a XML Schema identity-contraint definition's
+ * <selector> and <field> elements.
+ *
+ * Returns the parsed identity-constraint definition.
+ */
+static xmlSchemaIDCSelectPtr
+xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaIDCPtr idc,
+ xmlNodePtr node,
+ int isField)
+{
+ xmlSchemaIDCSelectPtr item;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "xpath"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Create the item.
+ */
+ item = (xmlSchemaIDCSelectPtr) xmlMalloc(sizeof(xmlSchemaIDCSelect));
+ if (item == NULL) {
+ xmlSchemaPErrMemory(ctxt,
+ "allocating a 'selector' of an identity-constraint definition",
+ NULL);
+ return (NULL);
+ }
+ memset(item, 0, sizeof(xmlSchemaIDCSelect));
+ /*
+ * Attribute "xpath" (mandatory).
+ */
+ attr = xmlSchemaGetPropNode(node, "xpath");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node,
+ "name", NULL);
+ } else {
+ item->xpath = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ /*
+ * URGENT TODO: "field"s have an other syntax than "selector"s.
+ */
+
+ if (xmlSchemaCheckCSelectorXPath(ctxt, idc, item, attr,
+ isField) == -1) {
+ xmlSchemaPErr(ctxt,
+ (xmlNodePtr) attr,
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaParseIDCSelectorAndField, "
+ "validating the XPath expression of a IDC selector.\n",
+ NULL, NULL);
+ }
+
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the parent IDC.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) idc,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?)");
+ }
+
+ return (item);
+}
+
+/**
+ * xmlSchemaParseIDC:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parses a XML Schema identity-contraint definition.
+ *
+ * Returns the parsed identity-constraint definition.
+ */
+static xmlSchemaIDCPtr
+xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ xmlSchemaTypeType idcCategory,
+ const xmlChar *targetNamespace)
+{
+ xmlSchemaIDCPtr item = NULL;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *name = NULL;
+ xmlSchemaIDCSelectPtr field = NULL, lastField = NULL;
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ ((idcCategory != XML_SCHEMA_TYPE_IDC_KEYREF) ||
+ (!xmlStrEqual(attr->name, BAD_CAST "refer")))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Attribute "name" (mandatory).
+ */
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node,
+ "name", NULL);
+ return (NULL);
+ } else if (xmlSchemaPValAttrNode(ctxt,
+ NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+ return (NULL);
+ }
+ /* Create the component. */
+ item = xmlSchemaAddIDC(ctxt, schema, name, targetNamespace,
+ idcCategory, node);
+ if (item == NULL)
+ return(NULL);
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ if (idcCategory == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ /*
+ * Attribute "refer" (mandatory).
+ */
+ attr = xmlSchemaGetPropNode(node, "refer");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node,
+ "refer", NULL);
+ } else {
+ /*
+ * Create a reference item.
+ */
+ item->ref = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_IDC_KEY,
+ NULL, NULL);
+ if (item->ref == NULL)
+ return (NULL);
+ xmlSchemaPValAttrNodeQName(ctxt, schema,
+ NULL, attr,
+ &(item->ref->targetNamespace),
+ &(item->ref->name));
+ xmlSchemaCheckReference(ctxt, schema, node, attr,
+ item->ref->targetNamespace);
+ }
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ item->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, child,
+ "A child element is missing",
+ "(annotation?, (selector, field+))");
+ }
+ /*
+ * Child element <selector>.
+ */
+ if (IS_SCHEMA(child, "selector")) {
+ item->selector = xmlSchemaParseIDCSelectorAndField(ctxt,
+ item, child, 0);
+ child = child->next;
+ /*
+ * Child elements <field>.
+ */
+ if (IS_SCHEMA(child, "field")) {
+ do {
+ field = xmlSchemaParseIDCSelectorAndField(ctxt,
+ item, child, 1);
+ if (field != NULL) {
+ field->index = item->nbFields;
+ item->nbFields++;
+ if (lastField != NULL)
+ lastField->next = field;
+ else
+ item->fields = field;
+ lastField = field;
+ }
+ child = child->next;
+ } while (IS_SCHEMA(child, "field"));
+ } else {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?, (selector, field+))");
+ }
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?, (selector, field+))");
+ }
+
+ return (item);
+}
+
+/**
+ * xmlSchemaParseElement:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ * @topLevel: indicates if this is global declaration
+ *
+ * Parses a XML schema element declaration.
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the element declaration or a particle; NULL in case
+ * of an error or if the particle has minOccurs==maxOccurs==0.
+ */
+static xmlSchemaBasicItemPtr
+xmlSchemaParseElement(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, int *isElemRef, int topLevel)
+{
+ xmlSchemaElementPtr decl = NULL;
+ xmlSchemaParticlePtr particle = NULL;
+ xmlSchemaAnnotPtr annot = NULL;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr, nameAttr;
+ int min, max, isRef = 0;
+ xmlChar *des = NULL;
+
+ /* 3.3.3 Constraints on XML Representations of Element Declarations */
+ /* TODO: Complete implementation of 3.3.6 */
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ if (isElemRef != NULL)
+ *isElemRef = 0;
+ /*
+ * If we get a "ref" attribute on a local <element> we will assume it's
+ * a reference - even if there's a "name" attribute; this seems to be more
+ * robust.
+ */
+ nameAttr = xmlSchemaGetPropNode(node, "name");
+ attr = xmlSchemaGetPropNode(node, "ref");
+ if ((topLevel) || (attr == NULL)) {
+ if (nameAttr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "name", NULL);
+ return (NULL);
+ }
+ } else
+ isRef = 1;
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ /*
+ * Skip particle part if a global declaration.
+ */
+ if (topLevel)
+ goto declaration_part;
+ /*
+ * The particle part ==================================================
+ */
+ min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger");
+ max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1, "(xs:nonNegativeInteger | unbounded)");
+ xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
+ particle = xmlSchemaAddParticle(ctxt, node, min, max);
+ if (particle == NULL)
+ goto return_null;
+
+ /* ret->flags |= XML_SCHEMAS_ELEM_REF; */
+
+ if (isRef) {
+ const xmlChar *refNs = NULL, *ref = NULL;
+ xmlSchemaQNameRefPtr refer = NULL;
+ /*
+ * The reference part =============================================
+ */
+ if (isElemRef != NULL)
+ *isElemRef = 1;
+
+ xmlSchemaPValAttrNodeQName(ctxt, schema,
+ NULL, attr, &refNs, &ref);
+ xmlSchemaCheckReference(ctxt, schema, node, attr, refNs);
+ /*
+ * SPEC (3.3.3 : 2.1) "One of ref or name must be present, but not both"
+ */
+ if (nameAttr != NULL) {
+ xmlSchemaPMutualExclAttrErr(ctxt,
+ XML_SCHEMAP_SRC_ELEMENT_2_1, NULL, nameAttr, "ref", "name");
+ }
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (xmlStrEqual(attr->name, BAD_CAST "ref") ||
+ xmlStrEqual(attr->name, BAD_CAST "name") ||
+ xmlStrEqual(attr->name, BAD_CAST "id") ||
+ xmlStrEqual(attr->name, BAD_CAST "maxOccurs") ||
+ xmlStrEqual(attr->name, BAD_CAST "minOccurs"))
+ {
+ attr = attr->next;
+ continue;
+ } else {
+ /* SPEC (3.3.3 : 2.2) */
+ xmlSchemaPCustomAttrErr(ctxt,
+ XML_SCHEMAP_SRC_ELEMENT_2_2,
+ NULL, NULL, attr,
+ "Only the attributes 'minOccurs', 'maxOccurs' and "
+ "'id' are allowed in addition to 'ref'");
+ break;
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * No children except <annotation> expected.
+ */
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL, "(annotation?)");
+ }
+ if ((min == 0) && (max == 0))
+ goto return_null;
+ /*
+ * Create the reference item and attach it to the particle.
+ */
+ refer = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_ELEMENT,
+ ref, refNs);
+ if (refer == NULL)
+ goto return_null;
+ particle->children = (xmlSchemaTreeItemPtr) refer;
+ particle->annot = annot;
+ /*
+ * Add the particle to pending components, since the reference
+ * need to be resolved.
+ */
+ WXS_ADD_PENDING(ctxt, particle);
+ return ((xmlSchemaBasicItemPtr) particle);
+ }
+ /*
+ * The declaration part ===============================================
+ */
+declaration_part:
+ {
+ const xmlChar *ns = NULL, *fixed, *name, *attrValue;
+ xmlSchemaIDCPtr curIDC = NULL, lastIDC = NULL;
+
+ if (xmlSchemaPValAttrNode(ctxt, NULL, nameAttr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0)
+ goto return_null;
+ /*
+ * Evaluate the target namespace.
+ */
+ if (topLevel) {
+ ns = ctxt->targetNamespace;
+ } else {
+ attr = xmlSchemaGetPropNode(node, "form");
+ if (attr != NULL) {
+ attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if (xmlStrEqual(attrValue, BAD_CAST "qualified")) {
+ ns = ctxt->targetNamespace;
+ } else if (!xmlStrEqual(attrValue, BAD_CAST "unqualified")) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ NULL, "(qualified | unqualified)",
+ attrValue, NULL, NULL, NULL);
+ }
+ } else if (schema->flags & XML_SCHEMAS_QUALIF_ELEM)
+ ns = ctxt->targetNamespace;
+ }
+ decl = xmlSchemaAddElement(ctxt, name, ns, node, topLevel);
+ if (decl == NULL) {
+ goto return_null;
+ }
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "type")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "default")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "fixed")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "block")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "nillable")))
+ {
+ if (topLevel == 0) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "form")))
+ {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if ((!xmlStrEqual(attr->name, BAD_CAST "final")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "abstract")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "substitutionGroup"))) {
+
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Extract/validate attributes.
+ */
+ if (topLevel) {
+ /*
+ * Process top attributes of global element declarations here.
+ */
+ decl->flags |= XML_SCHEMAS_ELEM_GLOBAL;
+ decl->flags |= XML_SCHEMAS_ELEM_TOPLEVEL;
+ xmlSchemaPValAttrQName(ctxt, schema,
+ NULL, node, "substitutionGroup",
+ &(decl->substGroupNs), &(decl->substGroup));
+ if (xmlGetBooleanProp(ctxt, node, "abstract", 0))
+ decl->flags |= XML_SCHEMAS_ELEM_ABSTRACT;
+ /*
+ * Attribute "final".
+ */
+ attr = xmlSchemaGetPropNode(node, "final");
+ if (attr == NULL) {
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_EXTENSION)
+ decl->flags |= XML_SCHEMAS_ELEM_FINAL_EXTENSION;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION)
+ decl->flags |= XML_SCHEMAS_ELEM_FINAL_RESTRICTION;
+ } else {
+ attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if (xmlSchemaPValAttrBlockFinal(attrValue, &(decl->flags),
+ -1,
+ XML_SCHEMAS_ELEM_FINAL_EXTENSION,
+ XML_SCHEMAS_ELEM_FINAL_RESTRICTION, -1, -1, -1) != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ NULL, "(#all | List of (extension | restriction))",
+ attrValue, NULL, NULL, NULL);
+ }
+ }
+ }
+ /*
+ * Attribute "block".
+ */
+ attr = xmlSchemaGetPropNode(node, "block");
+ if (attr == NULL) {
+ /*
+ * Apply default "block" values.
+ */
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION)
+ decl->flags |= XML_SCHEMAS_ELEM_BLOCK_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION)
+ decl->flags |= XML_SCHEMAS_ELEM_BLOCK_EXTENSION;
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION)
+ decl->flags |= XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION;
+ } else {
+ attrValue = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if (xmlSchemaPValAttrBlockFinal(attrValue, &(decl->flags),
+ -1,
+ XML_SCHEMAS_ELEM_BLOCK_EXTENSION,
+ XML_SCHEMAS_ELEM_BLOCK_RESTRICTION,
+ XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION, -1, -1) != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr,
+ NULL, "(#all | List of (extension | "
+ "restriction | substitution))", attrValue,
+ NULL, NULL, NULL);
+ }
+ }
+ if (xmlGetBooleanProp(ctxt, node, "nillable", 0))
+ decl->flags |= XML_SCHEMAS_ELEM_NILLABLE;
+
+ attr = xmlSchemaGetPropNode(node, "type");
+ if (attr != NULL) {
+ xmlSchemaPValAttrNodeQName(ctxt, schema,
+ NULL, attr,
+ &(decl->namedTypeNs), &(decl->namedType));
+ xmlSchemaCheckReference(ctxt, schema, node,
+ attr, decl->namedTypeNs);
+ }
+ decl->value = xmlSchemaGetProp(ctxt, node, "default");
+ attr = xmlSchemaGetPropNode(node, "fixed");
+ if (attr != NULL) {
+ fixed = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ if (decl->value != NULL) {
+ /*
+ * 3.3.3 : 1
+ * default and fixed must not both be present.
+ */
+ xmlSchemaPMutualExclAttrErr(ctxt,
+ XML_SCHEMAP_SRC_ELEMENT_1,
+ NULL, attr, "default", "fixed");
+ } else {
+ decl->flags |= XML_SCHEMAS_ELEM_FIXED;
+ decl->value = fixed;
+ }
+ }
+ /*
+ * And now for the children...
+ */
+ if (IS_SCHEMA(child, "complexType")) {
+ /*
+ * 3.3.3 : 3
+ * "type" and either <simpleType> or <complexType> are mutually
+ * exclusive
+ */
+ if (decl->namedType != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_SRC_ELEMENT_3,
+ NULL, node, child,
+ "The attribute 'type' and the <complexType> child are "
+ "mutually exclusive", NULL);
+ } else
+ WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseComplexType(ctxt, schema, child, 0);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "simpleType")) {
+ /*
+ * 3.3.3 : 3
+ * "type" and either <simpleType> or <complexType> are
+ * mutually exclusive
+ */
+ if (decl->namedType != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_SRC_ELEMENT_3,
+ NULL, node, child,
+ "The attribute 'type' and the <simpleType> child are "
+ "mutually exclusive", NULL);
+ } else
+ WXS_ELEM_TYPEDEF(decl) = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+ child = child->next;
+ }
+ while ((IS_SCHEMA(child, "unique")) ||
+ (IS_SCHEMA(child, "key")) || (IS_SCHEMA(child, "keyref"))) {
+ if (IS_SCHEMA(child, "unique")) {
+ curIDC = xmlSchemaParseIDC(ctxt, schema, child,
+ XML_SCHEMA_TYPE_IDC_UNIQUE, decl->targetNamespace);
+ } else if (IS_SCHEMA(child, "key")) {
+ curIDC = xmlSchemaParseIDC(ctxt, schema, child,
+ XML_SCHEMA_TYPE_IDC_KEY, decl->targetNamespace);
+ } else if (IS_SCHEMA(child, "keyref")) {
+ curIDC = xmlSchemaParseIDC(ctxt, schema, child,
+ XML_SCHEMA_TYPE_IDC_KEYREF, decl->targetNamespace);
+ }
+ if (lastIDC != NULL)
+ lastIDC->next = curIDC;
+ else
+ decl->idcs = (void *) curIDC;
+ lastIDC = curIDC;
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?, ((simpleType | complexType)?, "
+ "(unique | key | keyref)*))");
+ }
+ decl->annot = annot;
+ }
+ /*
+ * NOTE: Element Declaration Representation OK 4. will be checked at a
+ * different layer.
+ */
+ FREE_AND_NULL(des)
+ if (topLevel)
+ return ((xmlSchemaBasicItemPtr) decl);
+ else {
+ particle->children = (xmlSchemaTreeItemPtr) decl;
+ return ((xmlSchemaBasicItemPtr) particle);
+ }
+
+return_null:
+ FREE_AND_NULL(des);
+ if (annot != NULL) {
+ if (particle != NULL)
+ particle->annot = NULL;
+ if (decl != NULL)
+ decl->annot = NULL;
+ xmlSchemaFreeAnnot(annot);
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaParseUnion:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Union definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of internal error, 0 in case of success and a positive
+ * error code otherwise.
+ */
+static int
+xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *cur = NULL;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (-1);
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ /*
+ * Mark the simple type as being of variety "union".
+ */
+ type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION;
+ /*
+ * SPEC (Base type) (2) "If the <list> or <union> alternative is chosen,
+ * then the `simple ur-type definition`."
+ */
+ type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "memberTypes"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * Attribute "memberTypes". This is a list of QNames.
+ * TODO: Check the value to contain anything.
+ */
+ attr = xmlSchemaGetPropNode(node, "memberTypes");
+ if (attr != NULL) {
+ const xmlChar *end;
+ xmlChar *tmp;
+ const xmlChar *localName, *nsName;
+ xmlSchemaTypeLinkPtr link, lastLink = NULL;
+ xmlSchemaQNameRefPtr ref;
+
+ cur = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ type->base = cur;
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ tmp = xmlStrndup(cur, end - cur);
+ if (xmlSchemaPValAttrNodeQNameValue(ctxt, schema,
+ NULL, attr, BAD_CAST tmp, &nsName, &localName) == 0) {
+ /*
+ * Create the member type link.
+ */
+ link = (xmlSchemaTypeLinkPtr)
+ xmlMalloc(sizeof(xmlSchemaTypeLink));
+ if (link == NULL) {
+ xmlSchemaPErrMemory(ctxt, "xmlSchemaParseUnion, "
+ "allocating a type link", NULL);
+ return (-1);
+ }
+ link->type = NULL;
+ link->next = NULL;
+ if (lastLink == NULL)
+ type->memberTypes = link;
+ else
+ lastLink->next = link;
+ lastLink = link;
+ /*
+ * Create a reference item.
+ */
+ ref = xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_SIMPLE,
+ localName, nsName);
+ if (ref == NULL) {
+ FREE_AND_NULL(tmp)
+ return (-1);
+ }
+ /*
+ * Assign the reference to the link, it will be resolved
+ * later during fixup of the union simple type.
+ */
+ link->type = (xmlSchemaTypePtr) ref;
+ }
+ FREE_AND_NULL(tmp)
+ cur = end;
+ } while (*cur != 0);
+
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the simple type ancestor.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (IS_SCHEMA(child, "simpleType")) {
+ xmlSchemaTypePtr subtype, last = NULL;
+
+ /*
+ * Anchor the member types in the "subtypes" field of the
+ * simple type.
+ */
+ while (IS_SCHEMA(child, "simpleType")) {
+ subtype = (xmlSchemaTypePtr)
+ xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+ if (subtype != NULL) {
+ if (last == NULL) {
+ type->subtypes = subtype;
+ last = subtype;
+ } else {
+ last->next = subtype;
+ last = subtype;
+ }
+ last->next = NULL;
+ }
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL, "(annotation?, simpleType*)");
+ }
+ if ((attr == NULL) && (type->subtypes == NULL)) {
+ /*
+ * src-union-memberTypes-or-simpleTypes
+ * Either the memberTypes [attribute] of the <union> element must
+ * be non-empty or there must be at least one simpleType [child].
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES,
+ NULL, node,
+ "Either the attribute 'memberTypes' or "
+ "at least one <simpleType> child must be present", NULL);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaParseList:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema List definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of error, 0 if the declaration is improper and
+ * 1 in case of success.
+ */
+static xmlSchemaTypePtr
+xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ /*
+ * Mark the type as being of variety "list".
+ */
+ type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
+ /*
+ * SPEC (Base type) (2) "If the <list> or <union> alternative is chosen,
+ * then the `simple ur-type definition`."
+ */
+ type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "itemType"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+
+ /*
+ * Attribute "itemType". NOTE that we will use the "ref" and "refNs"
+ * fields for holding the reference to the itemType.
+ *
+ * REVAMP TODO: Use the "base" and "baseNs" fields, since we will remove
+ * the "ref" fields.
+ */
+ xmlSchemaPValAttrQName(ctxt, schema, NULL,
+ node, "itemType", &(type->baseNs), &(type->base));
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (IS_SCHEMA(child, "simpleType")) {
+ /*
+ * src-list-itemType-or-simpleType
+ * Either the itemType [attribute] or the <simpleType> [child] of
+ * the <list> element must be present, but not both.
+ */
+ if (type->base != NULL) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
+ NULL, node,
+ "The attribute 'itemType' and the <simpleType> child "
+ "are mutually exclusive", NULL);
+ } else {
+ type->subtypes = xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+ }
+ child = child->next;
+ } else if (type->base == NULL) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
+ NULL, node,
+ "Either the attribute 'itemType' or the <simpleType> child "
+ "must be present", NULL);
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL, "(annotation?, simpleType?)");
+ }
+ if ((type->base == NULL) &&
+ (type->subtypes == NULL) &&
+ (xmlSchemaGetPropNode(node, "itemType") == NULL)) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
+ NULL, node,
+ "Either the attribute 'itemType' or the <simpleType> child "
+ "must be present", NULL);
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaParseSimpleType:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Simple Type definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of error, 0 if the declaration is improper and
+ * 1 in case of success.
+ */
+static xmlSchemaTypePtr
+xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, int topLevel)
+{
+ xmlSchemaTypePtr type, oldCtxtType;
+ xmlNodePtr child = NULL;
+ const xmlChar *attrValue = NULL;
+ xmlAttrPtr attr;
+ int hasRestriction = 0;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ if (topLevel) {
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node,
+ "name", NULL);
+ return (NULL);
+ } else {
+ if (xmlSchemaPValAttrNode(ctxt,
+ NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &attrValue) != 0)
+ return (NULL);
+ /*
+ * Skip built-in types.
+ */
+ if (ctxt->isS4S) {
+ xmlSchemaTypePtr biType;
+
+ if (ctxt->isRedefine) {
+ /*
+ * REDEFINE: Disallow redefinition of built-in-types.
+ * TODO: It seems that the spec does not say anything
+ * about this case.
+ */
+ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
+ NULL, node,
+ "Redefinition of built-in simple types is not "
+ "supported", NULL);
+ return(NULL);
+ }
+ biType = xmlSchemaGetPredefinedType(attrValue, xmlSchemaNs);
+ if (biType != NULL)
+ return (biType);
+ }
+ }
+ }
+ /*
+ * TargetNamespace:
+ * SPEC "The `actual value` of the targetNamespace [attribute]
+ * of the <schema> ancestor element information item if present,
+ * otherwise `absent`.
+ */
+ if (topLevel == 0) {
+#ifdef ENABLE_NAMED_LOCALS
+ char buf[40];
+#endif
+ /*
+ * Parse as local simple type definition.
+ */
+#ifdef ENABLE_NAMED_LOCALS
+ snprintf(buf, 39, "#ST%d", ctxt->counter++ + 1);
+ type = xmlSchemaAddType(ctxt, schema,
+ XML_SCHEMA_TYPE_SIMPLE,
+ xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1),
+ ctxt->targetNamespace, node, 0);
+#else
+ type = xmlSchemaAddType(ctxt, schema,
+ XML_SCHEMA_TYPE_SIMPLE,
+ NULL, ctxt->targetNamespace, node, 0);
+#endif
+ if (type == NULL)
+ return (NULL);
+ type->type = XML_SCHEMA_TYPE_SIMPLE;
+ type->contentType = XML_SCHEMA_CONTENT_SIMPLE;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (!xmlStrEqual(attr->name, BAD_CAST "id")) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ } else {
+ /*
+ * Parse as global simple type definition.
+ *
+ * Note that attrValue is the value of the attribute "name" here.
+ */
+ type = xmlSchemaAddType(ctxt, schema, XML_SCHEMA_TYPE_SIMPLE,
+ attrValue, ctxt->targetNamespace, node, 1);
+ if (type == NULL)
+ return (NULL);
+ type->type = XML_SCHEMA_TYPE_SIMPLE;
+ type->contentType = XML_SCHEMA_CONTENT_SIMPLE;
+ type->flags |= XML_SCHEMAS_TYPE_GLOBAL;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "final"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Attribute "final".
+ */
+ attr = xmlSchemaGetPropNode(node, "final");
+ if (attr == NULL) {
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION)
+ type->flags |= XML_SCHEMAS_TYPE_FINAL_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_LIST)
+ type->flags |= XML_SCHEMAS_TYPE_FINAL_LIST;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_UNION)
+ type->flags |= XML_SCHEMAS_TYPE_FINAL_UNION;
+ } else {
+ attrValue = xmlSchemaGetProp(ctxt, node, "final");
+ if (xmlSchemaPValAttrBlockFinal(attrValue, &(type->flags),
+ -1, -1, XML_SCHEMAS_TYPE_FINAL_RESTRICTION, -1,
+ XML_SCHEMAS_TYPE_FINAL_LIST,
+ XML_SCHEMAS_TYPE_FINAL_UNION) != 0) {
+
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ WXS_BASIC_CAST type, (xmlNodePtr) attr,
+ NULL, "(#all | List of (list | union | restriction)",
+ attrValue, NULL, NULL, NULL);
+ }
+ }
+ }
+ type->targetNamespace = ctxt->targetNamespace;
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ oldCtxtType = ctxt->ctxtType;
+
+ ctxt->ctxtType = type;
+
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ type->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, child, NULL,
+ "(annotation?, (restriction | list | union))");
+ } else if (IS_SCHEMA(child, "restriction")) {
+ xmlSchemaParseRestriction(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SIMPLE);
+ hasRestriction = 1;
+ child = child->next;
+ } else if (IS_SCHEMA(child, "list")) {
+ xmlSchemaParseList(ctxt, schema, child);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "union")) {
+ xmlSchemaParseUnion(ctxt, schema, child);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt, XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (restriction | list | union))");
+ }
+ /*
+ * REDEFINE: SPEC src-redefine (5)
+ * "Within the [children], each <simpleType> must have a
+ * <restriction> among its [children] ... the `actual value` of whose
+ * base [attribute] must be the same as the `actual value` of its own
+ * name attribute plus target namespace;"
+ */
+ if (topLevel && ctxt->isRedefine && (! hasRestriction)) {
+ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
+ NULL, node, "This is a redefinition, thus the "
+ "<simpleType> must have a <restriction> child", NULL);
+ }
+
+ ctxt->ctxtType = oldCtxtType;
+ return (type);
+}
+
+/**
+ * xmlSchemaParseModelGroupDefRef:
+ * @ctxt: the parser context
+ * @schema: the schema being built
+ * @node: the node
+ *
+ * Parses a reference to a model group definition.
+ *
+ * We will return a particle component with a qname-component or
+ * NULL in case of an error.
+ */
+static xmlSchemaTreeItemPtr
+xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaParticlePtr item;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *ref = NULL, *refNs = NULL;
+ int min, max;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ attr = xmlSchemaGetPropNode(node, "ref");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "ref", NULL);
+ return (NULL);
+ } else if (xmlSchemaPValAttrNodeQName(ctxt, schema, NULL,
+ attr, &refNs, &ref) != 0) {
+ return (NULL);
+ }
+ xmlSchemaCheckReference(ctxt, schema, node, attr, refNs);
+ min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger");
+ max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1,
+ "(xs:nonNegativeInteger | unbounded)");
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "ref")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "minOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ item = xmlSchemaAddParticle(ctxt, node, min, max);
+ if (item == NULL)
+ return (NULL);
+ /*
+ * Create a qname-reference and set as the term; it will be substituted
+ * for the model group after the reference has been resolved.
+ */
+ item->children = (xmlSchemaTreeItemPtr)
+ xmlSchemaNewQNameRef(ctxt, XML_SCHEMA_TYPE_GROUP, ref, refNs);
+ xmlSchemaPCheckParticleCorrect_2(ctxt, item, node, min, max);
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ /* TODO: Is annotation even allowed for a model group reference? */
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: What to do exactly with the annotation?
+ */
+ item->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+ /*
+ * Corresponds to no component at all if minOccurs==maxOccurs==0.
+ */
+ if ((min == 0) && (max == 0))
+ return (NULL);
+
+ return ((xmlSchemaTreeItemPtr) item);
+}
+
+/**
+ * xmlSchemaParseModelGroupDefinition:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parses a XML schema model group definition.
+ *
+ * Note that the contraint src-redefine (6.2) can't be applied until
+ * references have been resolved. So we will do this at the
+ * component fixup level.
+ *
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of error, 0 if the declaration is improper and
+ * 1 in case of success.
+ */
+static xmlSchemaModelGroupDefPtr
+xmlSchemaParseModelGroupDefinition(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlSchemaModelGroupDefPtr item;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *name;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node,
+ "name", NULL);
+ return (NULL);
+ } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+ return (NULL);
+ }
+ item = xmlSchemaAddModelGroupDefinition(ctxt, schema, name,
+ ctxt->targetNamespace, node);
+ if (item == NULL)
+ return (NULL);
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "name")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "id"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ item->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (IS_SCHEMA(child, "all")) {
+ item->children = xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_ALL, 0);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "choice")) {
+ item->children = xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_CHOICE, 0);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "sequence")) {
+ item->children = xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SEQUENCE, 0);
+ child = child->next;
+ }
+
+
+
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (all | choice | sequence)?)");
+ }
+ return (item);
+}
+
+/**
+ * xmlSchemaCleanupDoc:
+ * @ctxt: a schema validation context
+ * @node: the root of the document.
+ *
+ * removes unwanted nodes in a schemas document tree
+ */
+static void
+xmlSchemaCleanupDoc(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr root)
+{
+ xmlNodePtr delete, cur;
+
+ if ((ctxt == NULL) || (root == NULL)) return;
+
+ /*
+ * Remove all the blank text nodes
+ */
+ delete = NULL;
+ cur = root;
+ while (cur != NULL) {
+ if (delete != NULL) {
+ xmlUnlinkNode(delete);
+ xmlFreeNode(delete);
+ delete = NULL;
+ }
+ if (cur->type == XML_TEXT_NODE) {
+ if (IS_BLANK_NODE(cur)) {
+ if (xmlNodeGetSpacePreserve(cur) != 1) {
+ delete = cur;
+ }
+ }
+ } else if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->type != XML_CDATA_SECTION_NODE)) {
+ delete = cur;
+ goto skip_children;
+ }
+
+ /*
+ * Skip to next node
+ */
+ if (cur->children != NULL) {
+ if ((cur->children->type != XML_ENTITY_DECL) &&
+ (cur->children->type != XML_ENTITY_REF_NODE) &&
+ (cur->children->type != XML_ENTITY_NODE)) {
+ cur = cur->children;
+ continue;
+ }
+ }
+ skip_children:
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == root) {
+ cur = NULL;
+ break;
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ if (delete != NULL) {
+ xmlUnlinkNode(delete);
+ xmlFreeNode(delete);
+ delete = NULL;
+ }
+}
+
+
+static void
+xmlSchemaClearSchemaDefaults(xmlSchemaPtr schema)
+{
+ if (schema->flags & XML_SCHEMAS_QUALIF_ELEM)
+ schema->flags ^= XML_SCHEMAS_QUALIF_ELEM;
+
+ if (schema->flags & XML_SCHEMAS_QUALIF_ATTR)
+ schema->flags ^= XML_SCHEMAS_QUALIF_ATTR;
+
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_EXTENSION)
+ schema->flags ^= XML_SCHEMAS_FINAL_DEFAULT_EXTENSION;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION)
+ schema->flags ^= XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_LIST)
+ schema->flags ^= XML_SCHEMAS_FINAL_DEFAULT_LIST;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_UNION)
+ schema->flags ^= XML_SCHEMAS_FINAL_DEFAULT_UNION;
+
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION)
+ schema->flags ^= XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION;
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION)
+ schema->flags ^= XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION)
+ schema->flags ^= XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION;
+}
+
+static int
+xmlSchemaParseSchemaElement(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlAttrPtr attr;
+ const xmlChar *val;
+ int res = 0, oldErrs = ctxt->nberrors;
+
+ /*
+ * Those flags should be moved to the parser context flags,
+ * since they are not visible at the component level. I.e.
+ * they are used if processing schema *documents* only.
+ */
+ res = xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ HFAILURE;
+
+ /*
+ * Since the version is of type xs:token, we won't bother to
+ * check it.
+ */
+ /* REMOVED:
+ attr = xmlSchemaGetPropNode(node, "version");
+ if (attr != NULL) {
+ res = xmlSchemaPValAttrNode(ctxt, NULL, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_TOKEN), &val);
+ HFAILURE;
+ }
+ */
+ attr = xmlSchemaGetPropNode(node, "targetNamespace");
+ if (attr != NULL) {
+ res = xmlSchemaPValAttrNode(ctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI), NULL);
+ HFAILURE;
+ if (res != 0) {
+ ctxt->stop = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
+ goto exit;
+ }
+ }
+ attr = xmlSchemaGetPropNode(node, "elementFormDefault");
+ if (attr != NULL) {
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ res = xmlSchemaPValAttrFormDefault(val, &schema->flags,
+ XML_SCHEMAS_QUALIF_ELEM);
+ HFAILURE;
+ if (res != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(qualified | unqualified)", val, NULL, NULL, NULL);
+ }
+ }
+ attr = xmlSchemaGetPropNode(node, "attributeFormDefault");
+ if (attr != NULL) {
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ res = xmlSchemaPValAttrFormDefault(val, &schema->flags,
+ XML_SCHEMAS_QUALIF_ATTR);
+ HFAILURE;
+ if (res != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(qualified | unqualified)", val, NULL, NULL, NULL);
+ }
+ }
+ attr = xmlSchemaGetPropNode(node, "finalDefault");
+ if (attr != NULL) {
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ res = xmlSchemaPValAttrBlockFinal(val, &(schema->flags), -1,
+ XML_SCHEMAS_FINAL_DEFAULT_EXTENSION,
+ XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION,
+ -1,
+ XML_SCHEMAS_FINAL_DEFAULT_LIST,
+ XML_SCHEMAS_FINAL_DEFAULT_UNION);
+ HFAILURE;
+ if (res != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(#all | List of (extension | restriction | list | union))",
+ val, NULL, NULL, NULL);
+ }
+ }
+ attr = xmlSchemaGetPropNode(node, "blockDefault");
+ if (attr != NULL) {
+ val = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
+ res = xmlSchemaPValAttrBlockFinal(val, &(schema->flags), -1,
+ XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION,
+ XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION,
+ XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION, -1, -1);
+ HFAILURE;
+ if (res != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(#all | List of (extension | restriction | substitution))",
+ val, NULL, NULL, NULL);
+ }
+ }
+
+exit:
+ if (oldErrs != ctxt->nberrors)
+ res = ctxt->err;
+ return(res);
+exit_failure:
+ return(-1);
+}
+
+/**
+ * xmlSchemaParseSchemaTopLevel:
+ * @ctxt: a schema validation context
+ * @schema: the schemas
+ * @nodes: the list of top level nodes
+ *
+ * Returns the internal XML Schema structure built from the resource or
+ * NULL in case of error
+ */
+static int
+xmlSchemaParseSchemaTopLevel(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema, xmlNodePtr nodes)
+{
+ xmlNodePtr child;
+ xmlSchemaAnnotPtr annot;
+ int res = 0, oldErrs, tmpOldErrs;
+
+ if ((ctxt == NULL) || (schema == NULL) || (nodes == NULL))
+ return(-1);
+
+ oldErrs = ctxt->nberrors;
+ child = nodes;
+ while ((IS_SCHEMA(child, "include")) ||
+ (IS_SCHEMA(child, "import")) ||
+ (IS_SCHEMA(child, "redefine")) ||
+ (IS_SCHEMA(child, "annotation"))) {
+ if (IS_SCHEMA(child, "annotation")) {
+ annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ if (schema->annot == NULL)
+ schema->annot = annot;
+ else
+ xmlSchemaFreeAnnot(annot);
+ } else if (IS_SCHEMA(child, "import")) {
+ tmpOldErrs = ctxt->nberrors;
+ res = xmlSchemaParseImport(ctxt, schema, child);
+ HFAILURE;
+ HSTOP(ctxt);
+ if (tmpOldErrs != ctxt->nberrors)
+ goto exit;
+ } else if (IS_SCHEMA(child, "include")) {
+ tmpOldErrs = ctxt->nberrors;
+ res = xmlSchemaParseInclude(ctxt, schema, child);
+ HFAILURE;
+ HSTOP(ctxt);
+ if (tmpOldErrs != ctxt->nberrors)
+ goto exit;
+ } else if (IS_SCHEMA(child, "redefine")) {
+ tmpOldErrs = ctxt->nberrors;
+ res = xmlSchemaParseRedefine(ctxt, schema, child);
+ HFAILURE;
+ HSTOP(ctxt);
+ if (tmpOldErrs != ctxt->nberrors)
+ goto exit;
+ }
+ child = child->next;
+ }
+ /*
+ * URGENT TODO: Change the functions to return int results.
+ * We need especially to catch internal errors.
+ */
+ while (child != NULL) {
+ if (IS_SCHEMA(child, "complexType")) {
+ xmlSchemaParseComplexType(ctxt, schema, child, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "simpleType")) {
+ xmlSchemaParseSimpleType(ctxt, schema, child, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "element")) {
+ xmlSchemaParseElement(ctxt, schema, child, NULL, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "attribute")) {
+ xmlSchemaParseGlobalAttribute(ctxt, schema, child);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "attributeGroup")) {
+ xmlSchemaParseAttributeGroupDefinition(ctxt, schema, child);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "group")) {
+ xmlSchemaParseModelGroupDefinition(ctxt, schema, child);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "notation")) {
+ xmlSchemaParseNotation(ctxt, schema, child);
+ child = child->next;
+ } else {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, child->parent, child,
+ NULL, "((include | import | redefine | annotation)*, "
+ "(((simpleType | complexType | group | attributeGroup) "
+ "| element | attribute | notation), annotation*)*)");
+ child = child->next;
+ }
+ while (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: We should add all annotations.
+ */
+ annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ if (schema->annot == NULL)
+ schema->annot = annot;
+ else
+ xmlSchemaFreeAnnot(annot);
+ child = child->next;
+ }
+ }
+exit:
+ ctxt->ctxtType = NULL;
+ if (oldErrs != ctxt->nberrors)
+ res = ctxt->err;
+ return(res);
+exit_failure:
+ return(-1);
+}
+
+static xmlSchemaSchemaRelationPtr
+xmlSchemaSchemaRelationCreate(void)
+{
+ xmlSchemaSchemaRelationPtr ret;
+
+ ret = (xmlSchemaSchemaRelationPtr)
+ xmlMalloc(sizeof(xmlSchemaSchemaRelation));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating schema relation", NULL);
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaSchemaRelation));
+ return(ret);
+}
+
+#if 0
+static void
+xmlSchemaSchemaRelationFree(xmlSchemaSchemaRelationPtr rel)
+{
+ xmlFree(rel);
+}
+#endif
+
+static void
+xmlSchemaRedefListFree(xmlSchemaRedefPtr redef)
+{
+ xmlSchemaRedefPtr prev;
+
+ while (redef != NULL) {
+ prev = redef;
+ redef = redef->next;
+ xmlFree(prev);
+ }
+}
+
+static void
+xmlSchemaConstructionCtxtFree(xmlSchemaConstructionCtxtPtr con)
+{
+ /*
+ * After the construction context has been freed, there will be
+ * no schema graph available any more. Only the schema buckets
+ * will stay alive, which are put into the "schemasImports" and
+ * "includes" slots of the xmlSchema.
+ */
+ if (con->buckets != NULL)
+ xmlSchemaItemListFree(con->buckets);
+ if (con->pending != NULL)
+ xmlSchemaItemListFree(con->pending);
+ if (con->substGroups != NULL)
+ xmlHashFree(con->substGroups,
+ (xmlHashDeallocator) xmlSchemaSubstGroupFree);
+ if (con->redefs != NULL)
+ xmlSchemaRedefListFree(con->redefs);
+ if (con->dict != NULL)
+ xmlDictFree(con->dict);
+ xmlFree(con);
+}
+
+static xmlSchemaConstructionCtxtPtr
+xmlSchemaConstructionCtxtCreate(xmlDictPtr dict)
+{
+ xmlSchemaConstructionCtxtPtr ret;
+
+ ret = (xmlSchemaConstructionCtxtPtr)
+ xmlMalloc(sizeof(xmlSchemaConstructionCtxt));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL,
+ "allocating schema construction context", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaConstructionCtxt));
+
+ ret->buckets = xmlSchemaItemListCreate();
+ if (ret->buckets == NULL) {
+ xmlSchemaPErrMemory(NULL,
+ "allocating list of schema buckets", NULL);
+ xmlFree(ret);
+ return (NULL);
+ }
+ ret->pending = xmlSchemaItemListCreate();
+ if (ret->pending == NULL) {
+ xmlSchemaPErrMemory(NULL,
+ "allocating list of pending global components", NULL);
+ xmlSchemaConstructionCtxtFree(ret);
+ return (NULL);
+ }
+ ret->dict = dict;
+ xmlDictReference(dict);
+ return(ret);
+}
+
+static xmlSchemaParserCtxtPtr
+xmlSchemaParserCtxtCreate(void)
+{
+ xmlSchemaParserCtxtPtr ret;
+
+ ret = (xmlSchemaParserCtxtPtr) xmlMalloc(sizeof(xmlSchemaParserCtxt));
+ if (ret == NULL) {
+ xmlSchemaPErrMemory(NULL, "allocating schema parser context",
+ NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaParserCtxt));
+ ret->type = XML_SCHEMA_CTXT_PARSER;
+ ret->attrProhibs = xmlSchemaItemListCreate();
+ if (ret->attrProhibs == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlSchemaNewParserCtxtUseDict:
+ * @URL: the location of the schema
+ * @dict: the dictionary to be used
+ *
+ * Create an XML Schemas parse context for that file/resource expected
+ * to contain an XML Schemas file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+static xmlSchemaParserCtxtPtr
+xmlSchemaNewParserCtxtUseDict(const char *URL, xmlDictPtr dict)
+{
+ xmlSchemaParserCtxtPtr ret;
+
+ ret = xmlSchemaParserCtxtCreate();
+ if (ret == NULL)
+ return (NULL);
+ ret->dict = dict;
+ xmlDictReference(dict);
+ if (URL != NULL)
+ ret->URL = xmlDictLookup(dict, (const xmlChar *) URL, -1);
+ return (ret);
+}
+
+static int
+xmlSchemaCreatePCtxtOnVCtxt(xmlSchemaValidCtxtPtr vctxt)
+{
+ if (vctxt->pctxt == NULL) {
+ if (vctxt->schema != NULL)
+ vctxt->pctxt =
+ xmlSchemaNewParserCtxtUseDict("*", vctxt->schema->dict);
+ else
+ vctxt->pctxt = xmlSchemaNewParserCtxt("*");
+ if (vctxt->pctxt == NULL) {
+ VERROR_INT("xmlSchemaCreatePCtxtOnVCtxt",
+ "failed to create a temp. parser context");
+ return (-1);
+ }
+ /* TODO: Pass user data. */
+ xmlSchemaSetParserErrors(vctxt->pctxt, vctxt->error,
+ vctxt->warning, vctxt->errCtxt);
+ xmlSchemaSetParserStructuredErrors(vctxt->pctxt, vctxt->serror,
+ vctxt->errCtxt);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaGetSchemaBucket:
+ * @pctxt: the schema parser context
+ * @schemaLocation: the URI of the schema document
+ *
+ * Returns a schema bucket if it was already parsed.
+ *
+ * Returns a schema bucket if it was already parsed from
+ * @schemaLocation, NULL otherwise.
+ */
+static xmlSchemaBucketPtr
+xmlSchemaGetSchemaBucket(xmlSchemaParserCtxtPtr pctxt,
+ const xmlChar *schemaLocation)
+{
+ xmlSchemaBucketPtr cur;
+ xmlSchemaItemListPtr list;
+
+ list = pctxt->constructor->buckets;
+ if (list->nbItems == 0)
+ return(NULL);
+ else {
+ int i;
+ for (i = 0; i < list->nbItems; i++) {
+ cur = (xmlSchemaBucketPtr) list->items[i];
+ /* Pointer comparison! */
+ if (cur->schemaLocation == schemaLocation)
+ return(cur);
+ }
+ }
+ return(NULL);
+}
+
+static xmlSchemaBucketPtr
+xmlSchemaGetChameleonSchemaBucket(xmlSchemaParserCtxtPtr pctxt,
+ const xmlChar *schemaLocation,
+ const xmlChar *targetNamespace)
+{
+ xmlSchemaBucketPtr cur;
+ xmlSchemaItemListPtr list;
+
+ list = pctxt->constructor->buckets;
+ if (list->nbItems == 0)
+ return(NULL);
+ else {
+ int i;
+ for (i = 0; i < list->nbItems; i++) {
+ cur = (xmlSchemaBucketPtr) list->items[i];
+ /* Pointer comparison! */
+ if ((cur->origTargetNamespace == NULL) &&
+ (cur->schemaLocation == schemaLocation) &&
+ (cur->targetNamespace == targetNamespace))
+ return(cur);
+ }
+ }
+ return(NULL);
+}
+
+
+#define IS_BAD_SCHEMA_DOC(b) \
+ (((b)->doc == NULL) && ((b)->schemaLocation != NULL))
+
+static xmlSchemaBucketPtr
+xmlSchemaGetSchemaBucketByTNS(xmlSchemaParserCtxtPtr pctxt,
+ const xmlChar *targetNamespace,
+ int imported)
+{
+ xmlSchemaBucketPtr cur;
+ xmlSchemaItemListPtr list;
+
+ list = pctxt->constructor->buckets;
+ if (list->nbItems == 0)
+ return(NULL);
+ else {
+ int i;
+ for (i = 0; i < list->nbItems; i++) {
+ cur = (xmlSchemaBucketPtr) list->items[i];
+ if ((! IS_BAD_SCHEMA_DOC(cur)) &&
+ (cur->origTargetNamespace == targetNamespace) &&
+ ((imported && cur->imported) ||
+ ((!imported) && (!cur->imported))))
+ return(cur);
+ }
+ }
+ return(NULL);
+}
+
+static int
+xmlSchemaParseNewDocWithContext(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaBucketPtr bucket)
+{
+ int oldFlags;
+ xmlDocPtr oldDoc;
+ xmlNodePtr node;
+ int ret, oldErrs;
+ xmlSchemaBucketPtr oldbucket = pctxt->constructor->bucket;
+
+ /*
+ * Save old values; reset the *main* schema.
+ * URGENT TODO: This is not good; move the per-document information
+ * to the parser. Get rid of passing the main schema to the
+ * parsing functions.
+ */
+ oldFlags = schema->flags;
+ oldDoc = schema->doc;
+ if (schema->flags != 0)
+ xmlSchemaClearSchemaDefaults(schema);
+ schema->doc = bucket->doc;
+ pctxt->schema = schema;
+ /*
+ * Keep the current target namespace on the parser *not* on the
+ * main schema.
+ */
+ pctxt->targetNamespace = bucket->targetNamespace;
+ WXS_CONSTRUCTOR(pctxt)->bucket = bucket;
+
+ if ((bucket->targetNamespace != NULL) &&
+ xmlStrEqual(bucket->targetNamespace, xmlSchemaNs)) {
+ /*
+ * We are parsing the schema for schemas!
+ */
+ pctxt->isS4S = 1;
+ }
+ /* Mark it as parsed, even if parsing fails. */
+ bucket->parsed++;
+ /* Compile the schema doc. */
+ node = xmlDocGetRootElement(bucket->doc);
+ ret = xmlSchemaParseSchemaElement(pctxt, schema, node);
+ if (ret != 0)
+ goto exit;
+ /* An empty schema; just get out. */
+ if (node->children == NULL)
+ goto exit;
+ oldErrs = pctxt->nberrors;
+ ret = xmlSchemaParseSchemaTopLevel(pctxt, schema, node->children);
+ if (ret != 0)
+ goto exit;
+ /*
+ * TODO: Not nice, but I'm not 100% sure we will get always an error
+ * as a result of the obove functions; so better rely on pctxt->err
+ * as well.
+ */
+ if ((ret == 0) && (oldErrs != pctxt->nberrors)) {
+ ret = pctxt->err;
+ goto exit;
+ }
+
+exit:
+ WXS_CONSTRUCTOR(pctxt)->bucket = oldbucket;
+ /* Restore schema values. */
+ schema->doc = oldDoc;
+ schema->flags = oldFlags;
+ return(ret);
+}
+
+static int
+xmlSchemaParseNewDoc(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlSchemaBucketPtr bucket)
+{
+ xmlSchemaParserCtxtPtr newpctxt;
+ int res = 0;
+
+ if (bucket == NULL)
+ return(0);
+ if (bucket->parsed) {
+ PERROR_INT("xmlSchemaParseNewDoc",
+ "reparsing a schema doc");
+ return(-1);
+ }
+ if (bucket->doc == NULL) {
+ PERROR_INT("xmlSchemaParseNewDoc",
+ "parsing a schema doc, but there's no doc");
+ return(-1);
+ }
+ if (pctxt->constructor == NULL) {
+ PERROR_INT("xmlSchemaParseNewDoc",
+ "no constructor");
+ return(-1);
+ }
+ /* Create and init the temporary parser context. */
+ newpctxt = xmlSchemaNewParserCtxtUseDict(
+ (const char *) bucket->schemaLocation, pctxt->dict);
+ if (newpctxt == NULL)
+ return(-1);
+ newpctxt->constructor = pctxt->constructor;
+ /*
+ * TODO: Can we avoid that the parser knows about the main schema?
+ * It would be better if he knows about the current schema bucket
+ * only.
+ */
+ newpctxt->schema = schema;
+ xmlSchemaSetParserErrors(newpctxt, pctxt->error, pctxt->warning,
+ pctxt->errCtxt);
+ xmlSchemaSetParserStructuredErrors(newpctxt, pctxt->serror,
+ pctxt->errCtxt);
+ newpctxt->counter = pctxt->counter;
+
+
+ res = xmlSchemaParseNewDocWithContext(newpctxt, schema, bucket);
+
+ /* Channel back errors and cleanup the temporary parser context. */
+ if (res != 0)
+ pctxt->err = res;
+ pctxt->nberrors += newpctxt->nberrors;
+ pctxt->counter = newpctxt->counter;
+ newpctxt->constructor = NULL;
+ /* Free the parser context. */
+ xmlSchemaFreeParserCtxt(newpctxt);
+ return(res);
+}
+
+static void
+xmlSchemaSchemaRelationAddChild(xmlSchemaBucketPtr bucket,
+ xmlSchemaSchemaRelationPtr rel)
+{
+ xmlSchemaSchemaRelationPtr cur = bucket->relations;
+
+ if (cur == NULL) {
+ bucket->relations = rel;
+ return;
+ }
+ while (cur->next != NULL)
+ cur = cur->next;
+ cur->next = rel;
+}
+
+
+static const xmlChar *
+xmlSchemaBuildAbsoluteURI(xmlDictPtr dict, const xmlChar* location,
+ xmlNodePtr ctxtNode)
+{
+ /*
+ * Build an absolue location URI.
+ */
+ if (location != NULL) {
+ if (ctxtNode == NULL)
+ return(location);
+ else {
+ xmlChar *base, *URI;
+ const xmlChar *ret = NULL;
+
+ base = xmlNodeGetBase(ctxtNode->doc, ctxtNode);
+ if (base == NULL) {
+ URI = xmlBuildURI(location, ctxtNode->doc->URL);
+ } else {
+ URI = xmlBuildURI(location, base);
+ xmlFree(base);
+ }
+ if (URI != NULL) {
+ ret = xmlDictLookup(dict, URI, -1);
+ xmlFree(URI);
+ return(ret);
+ }
+ }
+ }
+ return(NULL);
+}
+
+
+
+/**
+ * xmlSchemaAddSchemaDoc:
+ * @pctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parse an included (and to-be-redefined) XML schema document.
+ *
+ * Returns 0 on success, a positive error code on errors and
+ * -1 in case of an internal or API error.
+ */
+
+static int
+xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
+ int type, /* import or include or redefine */
+ const xmlChar *schemaLocation,
+ xmlDocPtr schemaDoc,
+ const char *schemaBuffer,
+ int schemaBufferLen,
+ xmlNodePtr invokingNode,
+ const xmlChar *sourceTargetNamespace,
+ const xmlChar *importNamespace,
+ xmlSchemaBucketPtr *bucket)
+{
+ const xmlChar *targetNamespace = NULL;
+ xmlSchemaSchemaRelationPtr relation = NULL;
+ xmlDocPtr doc = NULL;
+ int res = 0, err = 0, located = 0, preserveDoc = 0;
+ xmlSchemaBucketPtr bkt = NULL;
+
+ if (bucket != NULL)
+ *bucket = NULL;
+
+ switch (type) {
+ case XML_SCHEMA_SCHEMA_IMPORT:
+ case XML_SCHEMA_SCHEMA_MAIN:
+ err = XML_SCHEMAP_SRC_IMPORT;
+ break;
+ case XML_SCHEMA_SCHEMA_INCLUDE:
+ err = XML_SCHEMAP_SRC_INCLUDE;
+ break;
+ case XML_SCHEMA_SCHEMA_REDEFINE:
+ err = XML_SCHEMAP_SRC_REDEFINE;
+ break;
+ }
+
+
+ /* Special handling for the main schema:
+ * skip the location and relation logic and just parse the doc.
+ * We need just a bucket to be returned in this case.
+ */
+ if ((type == XML_SCHEMA_SCHEMA_MAIN) || (! WXS_HAS_BUCKETS(pctxt)))
+ goto doc_load;
+
+ /* Note that we expect the location to be an absulute URI. */
+ if (schemaLocation != NULL) {
+ bkt = xmlSchemaGetSchemaBucket(pctxt, schemaLocation);
+ if ((bkt != NULL) &&
+ (pctxt->constructor->bucket == bkt)) {
+ /* Report self-imports/inclusions/redefinitions. */
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
+ invokingNode, NULL,
+ "The schema must not import/include/redefine itself",
+ NULL, NULL);
+ goto exit;
+ }
+ }
+ /*
+ * Create a relation for the graph of schemas.
+ */
+ relation = xmlSchemaSchemaRelationCreate();
+ if (relation == NULL)
+ return(-1);
+ xmlSchemaSchemaRelationAddChild(pctxt->constructor->bucket,
+ relation);
+ relation->type = type;
+
+ /*
+ * Save the namespace import information.
+ */
+ if (WXS_IS_BUCKET_IMPMAIN(type)) {
+ relation->importNamespace = importNamespace;
+ if (schemaLocation == NULL) {
+ /*
+ * No location; this is just an import of the namespace.
+ * Note that we don't assign a bucket to the relation
+ * in this case.
+ */
+ goto exit;
+ }
+ targetNamespace = importNamespace;
+ }
+
+ /* Did we already fetch the doc? */
+ if (bkt != NULL) {
+ if ((WXS_IS_BUCKET_IMPMAIN(type)) && (! bkt->imported)) {
+ /*
+ * We included/redefined and then try to import a schema,
+ * but the new location provided for import was different.
+ */
+ if (schemaLocation == NULL)
+ schemaLocation = BAD_CAST "in_memory_buffer";
+ if (!xmlStrEqual(schemaLocation,
+ bkt->schemaLocation)) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
+ invokingNode, NULL,
+ "The schema document '%s' cannot be imported, since "
+ "it was already included or redefined",
+ schemaLocation, NULL);
+ goto exit;
+ }
+ } else if ((! WXS_IS_BUCKET_IMPMAIN(type)) && (bkt->imported)) {
+ /*
+ * We imported and then try to include/redefine a schema,
+ * but the new location provided for the include/redefine
+ * was different.
+ */
+ if (schemaLocation == NULL)
+ schemaLocation = BAD_CAST "in_memory_buffer";
+ if (!xmlStrEqual(schemaLocation,
+ bkt->schemaLocation)) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, err,
+ invokingNode, NULL,
+ "The schema document '%s' cannot be included or "
+ "redefined, since it was already imported",
+ schemaLocation, NULL);
+ goto exit;
+ }
+ }
+ }
+
+ if (WXS_IS_BUCKET_IMPMAIN(type)) {
+ /*
+ * Given that the schemaLocation [attribute] is only a hint, it is open
+ * to applications to ignore all but the first <import> for a given
+ * namespace, regardless of the `actual value` of schemaLocation, but
+ * such a strategy risks missing useful information when new
+ * schemaLocations are offered.
+ *
+ * We will use the first <import> that comes with a location.
+ * Further <import>s *with* a location, will result in an error.
+ * TODO: Better would be to just report a warning here, but
+ * we'll try it this way until someone complains.
+ *
+ * Schema Document Location Strategy:
+ * 3 Based on the namespace name, identify an existing schema document,
+ * either as a resource which is an XML document or a <schema> element
+ * information item, in some local schema repository;
+ * 5 Attempt to resolve the namespace name to locate such a resource.
+ *
+ * NOTE: (3) and (5) are not supported.
+ */
+ if (bkt != NULL) {
+ relation->bucket = bkt;
+ goto exit;
+ }
+ bkt = xmlSchemaGetSchemaBucketByTNS(pctxt,
+ importNamespace, 1);
+
+ if (bkt != NULL) {
+ relation->bucket = bkt;
+ if (bkt->schemaLocation == NULL) {
+ /* First given location of the schema; load the doc. */
+ bkt->schemaLocation = schemaLocation;
+ } else {
+ if (!xmlStrEqual(schemaLocation,
+ bkt->schemaLocation)) {
+ /*
+ * Additional location given; just skip it.
+ * URGENT TODO: We should report a warning here.
+ * res = XML_SCHEMAP_SRC_IMPORT;
+ */
+ if (schemaLocation == NULL)
+ schemaLocation = BAD_CAST "in_memory_buffer";
+
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_SKIP_SCHEMA,
+ invokingNode, NULL,
+ "Skipping import of schema located at '%s' for the "
+ "namespace '%s', since this namespace was already "
+ "imported with the schema located at '%s'",
+ schemaLocation, importNamespace, bkt->schemaLocation);
+ }
+ goto exit;
+ }
+ }
+ /*
+ * No bucket + first location: load the doc and create a
+ * bucket.
+ */
+ } else {
+ /* <include> and <redefine> */
+ if (bkt != NULL) {
+
+ if ((bkt->origTargetNamespace == NULL) &&
+ (bkt->targetNamespace != sourceTargetNamespace)) {
+ xmlSchemaBucketPtr chamel;
+
+ /*
+ * Chameleon include/redefine: skip loading only if it was
+ * aleady build for the targetNamespace of the including
+ * schema.
+ */
+ /*
+ * URGENT TODO: If the schema is a chameleon-include then copy
+ * the components into the including schema and modify the
+ * targetNamespace of those components, do nothing otherwise.
+ * NOTE: This is currently worked-around by compiling the
+ * chameleon for every destinct including targetNamespace; thus
+ * not performant at the moment.
+ * TODO: Check when the namespace in wildcards for chameleons
+ * needs to be converted: before we built wildcard intersections
+ * or after.
+ * Answer: after!
+ */
+ chamel = xmlSchemaGetChameleonSchemaBucket(pctxt,
+ schemaLocation, sourceTargetNamespace);
+ if (chamel != NULL) {
+ /* A fitting chameleon was already parsed; NOP. */
+ relation->bucket = chamel;
+ goto exit;
+ }
+ /*
+ * We need to parse the chameleon again for a different
+ * targetNamespace.
+ * CHAMELEON TODO: Optimize this by only parsing the
+ * chameleon once, and then copying the components to
+ * the new targetNamespace.
+ */
+ bkt = NULL;
+ } else {
+ relation->bucket = bkt;
+ goto exit;
+ }
+ }
+ }
+ if ((bkt != NULL) && (bkt->doc != NULL)) {
+ PERROR_INT("xmlSchemaAddSchemaDoc",
+ "trying to load a schema doc, but a doc is already "
+ "assigned to the schema bucket");
+ goto exit_failure;
+ }
+
+doc_load:
+ /*
+ * Load the document.
+ */
+ if (schemaDoc != NULL) {
+ doc = schemaDoc;
+ /* Don' free this one, since it was provided by the caller. */
+ preserveDoc = 1;
+ /* TODO: Does the context or the doc hold the location? */
+ if (schemaDoc->URL != NULL)
+ schemaLocation = xmlDictLookup(pctxt->dict,
+ schemaDoc->URL, -1);
+ else
+ schemaLocation = BAD_CAST "in_memory_buffer";
+ } else if ((schemaLocation != NULL) || (schemaBuffer != NULL)) {
+ xmlParserCtxtPtr parserCtxt;
+
+ parserCtxt = xmlNewParserCtxt();
+ if (parserCtxt == NULL) {
+ xmlSchemaPErrMemory(NULL, "xmlSchemaGetDoc, "
+ "allocating a parser context", NULL);
+ goto exit_failure;
+ }
+ if ((pctxt->dict != NULL) && (parserCtxt->dict != NULL)) {
+ /*
+ * TODO: Do we have to burden the schema parser dict with all
+ * the content of the schema doc?
+ */
+ xmlDictFree(parserCtxt->dict);
+ parserCtxt->dict = pctxt->dict;
+ xmlDictReference(parserCtxt->dict);
+ }
+ if (schemaLocation != NULL) {
+ /* Parse from file. */
+ doc = xmlCtxtReadFile(parserCtxt, (const char *) schemaLocation,
+ NULL, SCHEMAS_PARSE_OPTIONS);
+ } else if (schemaBuffer != NULL) {
+ /* Parse from memory buffer. */
+ doc = xmlCtxtReadMemory(parserCtxt, schemaBuffer, schemaBufferLen,
+ NULL, NULL, SCHEMAS_PARSE_OPTIONS);
+ schemaLocation = BAD_CAST "in_memory_buffer";
+ if (doc != NULL)
+ doc->URL = xmlStrdup(schemaLocation);
+ }
+ /*
+ * For <import>:
+ * 2.1 The referent is (a fragment of) a resource which is an
+ * XML document (see clause 1.1), which in turn corresponds to
+ * a <schema> element information item in a well-formed information
+ * set, which in turn corresponds to a valid schema.
+ * TODO: (2.1) fragments of XML documents are not supported.
+ *
+ * 2.2 The referent is a <schema> element information item in
+ * a well-formed information set, which in turn corresponds
+ * to a valid schema.
+ * TODO: (2.2) is not supported.
+ */
+ if (doc == NULL) {
+ xmlErrorPtr lerr;
+ lerr = xmlGetLastError();
+ /*
+ * Check if this a parser error, or if the document could
+ * just not be located.
+ * TODO: Try to find specific error codes to react only on
+ * localisation failures.
+ */
+ if ((lerr == NULL) || (lerr->domain != XML_FROM_IO)) {
+ /*
+ * We assume a parser error here.
+ */
+ located = 1;
+ /* TODO: Error code ?? */
+ res = XML_SCHEMAP_SRC_IMPORT_2_1;
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
+ invokingNode, NULL,
+ "Failed to parse the XML resource '%s'",
+ schemaLocation, NULL);
+ }
+ }
+ xmlFreeParserCtxt(parserCtxt);
+ if ((doc == NULL) && located)
+ goto exit_error;
+ } else {
+ xmlSchemaPErr(pctxt, NULL,
+ XML_SCHEMAP_NOTHING_TO_PARSE,
+ "No information for parsing was provided with the "
+ "given schema parser context.\n",
+ NULL, NULL);
+ goto exit_failure;
+ }
+ /*
+ * Preprocess the document.
+ */
+ if (doc != NULL) {
+ xmlNodePtr docElem = NULL;
+
+ located = 1;
+ docElem = xmlDocGetRootElement(doc);
+ if (docElem == NULL) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_NOROOT,
+ invokingNode, NULL,
+ "The document '%s' has no document element",
+ schemaLocation, NULL);
+ goto exit_error;
+ }
+ /*
+ * Remove all the blank text nodes.
+ */
+ xmlSchemaCleanupDoc(pctxt, docElem);
+ /*
+ * Check the schema's top level element.
+ */
+ if (!IS_SCHEMA(docElem, "schema")) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, XML_SCHEMAP_NOT_SCHEMA,
+ invokingNode, NULL,
+ "The XML document '%s' is not a schema document",
+ schemaLocation, NULL);
+ goto exit_error;
+ }
+ /*
+ * Note that we don't apply a type check for the
+ * targetNamespace value here.
+ */
+ targetNamespace = xmlSchemaGetProp(pctxt, docElem,
+ "targetNamespace");
+ }
+
+/* after_doc_loading: */
+ if ((bkt == NULL) && located) {
+ /* Only create a bucket if the schema was located. */
+ bkt = xmlSchemaBucketCreate(pctxt, type,
+ targetNamespace);
+ if (bkt == NULL)
+ goto exit_failure;
+ }
+ if (bkt != NULL) {
+ bkt->schemaLocation = schemaLocation;
+ bkt->located = located;
+ if (doc != NULL) {
+ bkt->doc = doc;
+ bkt->targetNamespace = targetNamespace;
+ bkt->origTargetNamespace = targetNamespace;
+ if (preserveDoc)
+ bkt->preserveDoc = 1;
+ }
+ if (WXS_IS_BUCKET_IMPMAIN(type))
+ bkt->imported++;
+ /*
+ * Add it to the graph of schemas.
+ */
+ if (relation != NULL)
+ relation->bucket = bkt;
+ }
+
+exit:
+ /*
+ * Return the bucket explicitely; this is needed for the
+ * main schema.
+ */
+ if (bucket != NULL)
+ *bucket = bkt;
+ return (0);
+
+exit_error:
+ if ((doc != NULL) && (! preserveDoc)) {
+ xmlFreeDoc(doc);
+ if (bkt != NULL)
+ bkt->doc = NULL;
+ }
+ return(pctxt->err);
+
+exit_failure:
+ if ((doc != NULL) && (! preserveDoc)) {
+ xmlFreeDoc(doc);
+ if (bkt != NULL)
+ bkt->doc = NULL;
+ }
+ return (-1);
+}
+
+/**
+ * xmlSchemaParseImport:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Import definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns 0 in case of success, a positive error code if
+ * not valid and -1 in case of an internal error.
+ */
+static int
+xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ xmlNodePtr child;
+ const xmlChar *namespaceName = NULL, *schemaLocation = NULL;
+ const xmlChar *thisTargetNamespace;
+ xmlAttrPtr attr;
+ int ret = 0;
+ xmlSchemaBucketPtr bucket = NULL;
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (-1);
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "namespace")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Extract and validate attributes.
+ */
+ if (xmlSchemaPValAttr(pctxt, NULL, node,
+ "namespace", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
+ &namespaceName) != 0) {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, node,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
+ NULL, namespaceName, NULL, NULL, NULL);
+ return (pctxt->err);
+ }
+
+ if (xmlSchemaPValAttr(pctxt, NULL, node,
+ "schemaLocation", xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
+ &schemaLocation) != 0) {
+ xmlSchemaPSimpleTypeErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, node,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
+ NULL, schemaLocation, NULL, NULL, NULL);
+ return (pctxt->err);
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * the annotation here is simply discarded ...
+ * TODO: really?
+ */
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(pctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+ /*
+ * Apply additional constraints.
+ *
+ * Note that it is important to use the original @targetNamespace
+ * (or none at all), to rule out imports of schemas _with_ a
+ * @targetNamespace if the importing schema is a chameleon schema
+ * (with no @targetNamespace).
+ */
+ thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace;
+ if (namespaceName != NULL) {
+ /*
+ * 1.1 If the namespace [attribute] is present, then its `actual value`
+ * must not match the `actual value` of the enclosing <schema>'s
+ * targetNamespace [attribute].
+ */
+ if (xmlStrEqual(thisTargetNamespace, namespaceName)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_SRC_IMPORT_1_1,
+ NULL, node,
+ "The value of the attribute 'namespace' must not match "
+ "the target namespace '%s' of the importing schema",
+ thisTargetNamespace);
+ return (pctxt->err);
+ }
+ } else {
+ /*
+ * 1.2 If the namespace [attribute] is not present, then the enclosing
+ * <schema> must have a targetNamespace [attribute].
+ */
+ if (thisTargetNamespace == NULL) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_SRC_IMPORT_1_2,
+ NULL, node,
+ "The attribute 'namespace' must be existent if "
+ "the importing schema has no target namespace",
+ NULL);
+ return (pctxt->err);
+ }
+ }
+ /*
+ * Locate and acquire the schema document.
+ */
+ if (schemaLocation != NULL)
+ schemaLocation = xmlSchemaBuildAbsoluteURI(pctxt->dict,
+ schemaLocation, node);
+ ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT,
+ schemaLocation, NULL, NULL, 0, node, thisTargetNamespace,
+ namespaceName, &bucket);
+
+ if (ret != 0)
+ return(ret);
+
+ /*
+ * For <import>: "It is *not* an error for the application
+ * schema reference strategy to fail."
+ * So just don't parse if no schema document was found.
+ * Note that we will get no bucket if the schema could not be
+ * located or if there was no schemaLocation.
+ */
+ if ((bucket == NULL) && (schemaLocation != NULL)) {
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA,
+ node, NULL,
+ "Failed to locate a schema at location '%s'. "
+ "Skipping the import", schemaLocation, NULL, NULL);
+ }
+
+ if ((bucket != NULL) && CAN_PARSE_SCHEMA(bucket)) {
+ ret = xmlSchemaParseNewDoc(pctxt, schema, bucket);
+ }
+
+ return (ret);
+}
+
+static int
+xmlSchemaParseIncludeOrRedefineAttrs(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ xmlChar **schemaLocation,
+ int type)
+{
+ xmlAttrPtr attr;
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL) ||
+ (schemaLocation == NULL))
+ return (-1);
+
+ *schemaLocation = NULL;
+ /*
+ * Check for illegal attributes.
+ * Applies for both <include> and <redefine>.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "schemaLocation"))) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ xmlSchemaPValAttrID(pctxt, node, BAD_CAST "id");
+ /*
+ * Preliminary step, extract the URI-Reference and make an URI
+ * from the base.
+ */
+ /*
+ * Attribute "schemaLocation" is mandatory.
+ */
+ attr = xmlSchemaGetPropNode(node, "schemaLocation");
+ if (attr != NULL) {
+ xmlChar *base = NULL;
+ xmlChar *uri = NULL;
+
+ if (xmlSchemaPValAttrNode(pctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
+ (const xmlChar **) schemaLocation) != 0)
+ goto exit_error;
+ base = xmlNodeGetBase(node->doc, node);
+ if (base == NULL) {
+ uri = xmlBuildURI(*schemaLocation, node->doc->URL);
+ } else {
+ uri = xmlBuildURI(*schemaLocation, base);
+ xmlFree(base);
+ }
+ if (uri == NULL) {
+ PERROR_INT("xmlSchemaParseIncludeOrRedefine",
+ "could not build an URI from the schemaLocation")
+ goto exit_failure;
+ }
+ (*schemaLocation) = (xmlChar *) xmlDictLookup(pctxt->dict, uri, -1);
+ xmlFree(uri);
+ } else {
+ xmlSchemaPMissingAttrErr(pctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "schemaLocation", NULL);
+ goto exit_error;
+ }
+ /*
+ * Report self-inclusion and self-redefinition.
+ */
+ if (xmlStrEqual(*schemaLocation, pctxt->URL)) {
+ if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_SRC_REDEFINE,
+ NULL, node,
+ "The schema document '%s' cannot redefine itself.",
+ *schemaLocation);
+ } else {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_SRC_INCLUDE,
+ NULL, node,
+ "The schema document '%s' cannot include itself.",
+ *schemaLocation);
+ }
+ goto exit_error;
+ }
+
+ return(0);
+exit_error:
+ return(pctxt->err);
+exit_failure:
+ return(-1);
+}
+
+static int
+xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ int type)
+{
+ xmlNodePtr child = NULL;
+ const xmlChar *schemaLocation = NULL;
+ int res = 0; /* hasRedefinitions = 0 */
+ int isChameleon = 0, wasChameleon = 0;
+ xmlSchemaBucketPtr bucket = NULL;
+
+ if ((pctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (-1);
+
+ /*
+ * Parse attributes. Note that the returned schemaLocation will
+ * be already converted to an absolute URI.
+ */
+ res = xmlSchemaParseIncludeOrRedefineAttrs(pctxt, schema,
+ node, (xmlChar **) (&schemaLocation), type);
+ if (res != 0)
+ return(res);
+ /*
+ * Load and add the schema document.
+ */
+ res = xmlSchemaAddSchemaDoc(pctxt, type, schemaLocation, NULL,
+ NULL, 0, node, pctxt->targetNamespace, NULL, &bucket);
+ if (res != 0)
+ return(res);
+ /*
+ * If we get no schema bucket back, then this means that the schema
+ * document could not be located or was broken XML or was not
+ * a schema document.
+ */
+ if ((bucket == NULL) || (bucket->doc == NULL)) {
+ if (type == XML_SCHEMA_SCHEMA_INCLUDE) {
+ /*
+ * WARNING for <include>:
+ * We will raise an error if the schema cannot be located
+ * for inclusions, since the that was the feedback from the
+ * schema people. I.e. the following spec piece will *not* be
+ * satisfied:
+ * SPEC src-include: "It is not an error for the `actual value` of the
+ * schemaLocation [attribute] to fail to resolve it all, in which
+ * case no corresponding inclusion is performed.
+ * So do we need a warning report here?"
+ */
+ res = XML_SCHEMAP_SRC_INCLUDE;
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
+ node, NULL,
+ "Failed to load the document '%s' for inclusion",
+ schemaLocation, NULL);
+ } else {
+ /*
+ * NOTE: This was changed to raise an error even if no redefinitions
+ * are specified.
+ *
+ * SPEC src-redefine (1)
+ * "If there are any element information items among the [children]
+ * other than <annotation> then the `actual value` of the
+ * schemaLocation [attribute] must successfully resolve."
+ * TODO: Ask the WG if a the location has always to resolve
+ * here as well!
+ */
+ res = XML_SCHEMAP_SRC_REDEFINE;
+ xmlSchemaCustomErr(ACTXT_CAST pctxt, res,
+ node, NULL,
+ "Failed to load the document '%s' for redefinition",
+ schemaLocation, NULL);
+ }
+ } else {
+ /*
+ * Check targetNamespace sanity before parsing the new schema.
+ * TODO: Note that we won't check further content if the
+ * targetNamespace was bad.
+ */
+ if (bucket->origTargetNamespace != NULL) {
+ /*
+ * SPEC src-include (2.1)
+ * "SII has a targetNamespace [attribute], and its `actual
+ * value` is identical to the `actual value` of the targetNamespace
+ * [attribute] of SII' (which must have such an [attribute])."
+ */
+ if (pctxt->targetNamespace == NULL) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_INCLUDE,
+ node, NULL,
+ "The target namespace of the included/redefined schema "
+ "'%s' has to be absent, since the including/redefining "
+ "schema has no target namespace",
+ schemaLocation, NULL);
+ goto exit_error;
+ } else if (!xmlStrEqual(bucket->origTargetNamespace,
+ pctxt->targetNamespace)) {
+ /* TODO: Change error function. */
+ xmlSchemaPCustomErrExt(pctxt,
+ XML_SCHEMAP_SRC_INCLUDE,
+ NULL, node,
+ "The target namespace '%s' of the included/redefined "
+ "schema '%s' differs from '%s' of the "
+ "including/redefining schema",
+ bucket->origTargetNamespace, schemaLocation,
+ pctxt->targetNamespace);
+ goto exit_error;
+ }
+ } else if (pctxt->targetNamespace != NULL) {
+ /*
+ * Chameleons: the original target namespace will
+ * differ from the resulting namespace.
+ */
+ isChameleon = 1;
+ if (bucket->parsed &&
+ bucket->origTargetNamespace != NULL) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_INCLUDE,
+ node, NULL,
+ "The target namespace of the included/redefined schema "
+ "'%s' has to be absent or the same as the "
+ "including/redefining schema's target namespace",
+ schemaLocation, NULL);
+ goto exit_error;
+ }
+ bucket->targetNamespace = pctxt->targetNamespace;
+ }
+ }
+ /*
+ * Parse the schema.
+ */
+ if (bucket && (!bucket->parsed) && (bucket->doc != NULL)) {
+ if (isChameleon) {
+ /* TODO: Get rid of this flag on the schema itself. */
+ if ((schema->flags & XML_SCHEMAS_INCLUDING_CONVERT_NS) == 0) {
+ schema->flags |= XML_SCHEMAS_INCLUDING_CONVERT_NS;
+ } else
+ wasChameleon = 1;
+ }
+ xmlSchemaParseNewDoc(pctxt, schema, bucket);
+ /* Restore chameleon flag. */
+ if (isChameleon && (!wasChameleon))
+ schema->flags ^= XML_SCHEMAS_INCLUDING_CONVERT_NS;
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
+ /*
+ * Parse (simpleType | complexType | group | attributeGroup))*
+ */
+ pctxt->redefined = bucket;
+ /*
+ * How to proceed if the redefined schema was not located?
+ */
+ pctxt->isRedefine = 1;
+ while (IS_SCHEMA(child, "annotation") ||
+ IS_SCHEMA(child, "simpleType") ||
+ IS_SCHEMA(child, "complexType") ||
+ IS_SCHEMA(child, "group") ||
+ IS_SCHEMA(child, "attributeGroup")) {
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: discard or not?
+ */
+ } else if (IS_SCHEMA(child, "simpleType")) {
+ xmlSchemaParseSimpleType(pctxt, schema, child, 1);
+ } else if (IS_SCHEMA(child, "complexType")) {
+ xmlSchemaParseComplexType(pctxt, schema, child, 1);
+ /* hasRedefinitions = 1; */
+ } else if (IS_SCHEMA(child, "group")) {
+ /* hasRedefinitions = 1; */
+ xmlSchemaParseModelGroupDefinition(pctxt,
+ schema, child);
+ } else if (IS_SCHEMA(child, "attributeGroup")) {
+ /* hasRedefinitions = 1; */
+ xmlSchemaParseAttributeGroupDefinition(pctxt, schema,
+ child);
+ }
+ child = child->next;
+ }
+ pctxt->redefined = NULL;
+ pctxt->isRedefine = 0;
+ } else {
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * TODO: discard or not?
+ */
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ res = XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED;
+ if (type == XML_SCHEMA_SCHEMA_REDEFINE) {
+ xmlSchemaPContentErr(pctxt, res,
+ NULL, node, child, NULL,
+ "(annotation | (simpleType | complexType | group | attributeGroup))*");
+ } else {
+ xmlSchemaPContentErr(pctxt, res,
+ NULL, node, child, NULL,
+ "(annotation?)");
+ }
+ }
+ return(res);
+
+exit_error:
+ return(pctxt->err);
+}
+
+static int
+xmlSchemaParseRedefine(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ int res;
+#ifndef ENABLE_REDEFINE
+ TODO
+ return(0);
+#endif
+ res = xmlSchemaParseIncludeOrRedefine(pctxt, schema, node,
+ XML_SCHEMA_SCHEMA_REDEFINE);
+ if (res != 0)
+ return(res);
+ return(0);
+}
+
+static int
+xmlSchemaParseInclude(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
+ xmlNodePtr node)
+{
+ int res;
+
+ res = xmlSchemaParseIncludeOrRedefine(pctxt, schema, node,
+ XML_SCHEMA_SCHEMA_INCLUDE);
+ if (res != 0)
+ return(res);
+ return(0);
+}
+
+/**
+ * xmlSchemaParseModelGroup:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ * @type: the "compositor" type
+ * @particleNeeded: if a a model group with a particle
+ *
+ * parse a XML schema Sequence definition.
+ * Applies parts of:
+ * Schema Representation Constraint:
+ * Redefinition Constraints and Semantics (src-redefine)
+ * (6.1), (6.1.1), (6.1.2)
+ *
+ * Schema Component Constraint:
+ * All Group Limited (cos-all-limited) (2)
+ * TODO: Actually this should go to component-level checks,
+ * but is done here due to performance. Move it to an other layer
+ * is schema construction via an API is implemented.
+ *
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns -1 in case of error, 0 if the declaration is improper and
+ * 1 in case of success.
+ */
+static xmlSchemaTreeItemPtr
+xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, xmlSchemaTypeType type,
+ int withParticle)
+{
+ xmlSchemaModelGroupPtr item;
+ xmlSchemaParticlePtr particle = NULL;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+ int min = 1, max = 1, isElemRef, hasRefs = 0;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /*
+ * Create a model group with the given compositor.
+ */
+ item = xmlSchemaAddModelGroup(ctxt, schema, type, node);
+ if (item == NULL)
+ return (NULL);
+
+ if (withParticle) {
+ if (type == XML_SCHEMA_TYPE_ALL) {
+ min = xmlGetMinOccurs(ctxt, node, 0, 1, 1, "(0 | 1)");
+ max = xmlGetMaxOccurs(ctxt, node, 1, 1, 1, "1");
+ } else {
+ /* choice + sequence */
+ min = xmlGetMinOccurs(ctxt, node, 0, -1, 1, "xs:nonNegativeInteger");
+ max = xmlGetMaxOccurs(ctxt, node, 0, UNBOUNDED, 1,
+ "(xs:nonNegativeInteger | unbounded)");
+ }
+ xmlSchemaPCheckParticleCorrect_2(ctxt, NULL, node, min, max);
+ /*
+ * Create a particle
+ */
+ particle = xmlSchemaAddParticle(ctxt, node, min, max);
+ if (particle == NULL)
+ return (NULL);
+ particle->children = (xmlSchemaTreeItemPtr) item;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "maxOccurs")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "minOccurs"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ } else {
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (!xmlStrEqual(attr->name, BAD_CAST "id")) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ }
+
+ /*
+ * Extract and validate attributes.
+ */
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ item->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ if (type == XML_SCHEMA_TYPE_ALL) {
+ xmlSchemaParticlePtr part, last = NULL;
+
+ while (IS_SCHEMA(child, "element")) {
+ part = (xmlSchemaParticlePtr) xmlSchemaParseElement(ctxt,
+ schema, child, &isElemRef, 0);
+ /*
+ * SPEC cos-all-limited (2)
+ * "The {max occurs} of all the particles in the {particles}
+ * of the ('all') group must be 0 or 1.
+ */
+ if (part != NULL) {
+ if (isElemRef)
+ hasRefs++;
+ if (part->minOccurs > 1) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ NULL, child,
+ "Invalid value for minOccurs (must be 0 or 1)",
+ NULL);
+ /* Reset to 1. */
+ part->minOccurs = 1;
+ }
+ if (part->maxOccurs > 1) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ NULL, child,
+ "Invalid value for maxOccurs (must be 0 or 1)",
+ NULL);
+ /* Reset to 1. */
+ part->maxOccurs = 1;
+ }
+ if (last == NULL)
+ item->children = (xmlSchemaTreeItemPtr) part;
+ else
+ last->next = (xmlSchemaTreeItemPtr) part;
+ last = part;
+ }
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (annotation?, element*)");
+ }
+ } else {
+ /* choice + sequence */
+ xmlSchemaTreeItemPtr part = NULL, last = NULL;
+
+ while ((IS_SCHEMA(child, "element")) ||
+ (IS_SCHEMA(child, "group")) ||
+ (IS_SCHEMA(child, "any")) ||
+ (IS_SCHEMA(child, "choice")) ||
+ (IS_SCHEMA(child, "sequence"))) {
+
+ if (IS_SCHEMA(child, "element")) {
+ part = (xmlSchemaTreeItemPtr)
+ xmlSchemaParseElement(ctxt, schema, child, &isElemRef, 0);
+ if (part && isElemRef)
+ hasRefs++;
+ } else if (IS_SCHEMA(child, "group")) {
+ part =
+ xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+ if (part != NULL)
+ hasRefs++;
+ /*
+ * Handle redefinitions.
+ */
+ if (ctxt->isRedefine && ctxt->redef &&
+ (ctxt->redef->item->type == XML_SCHEMA_TYPE_GROUP) &&
+ part && part->children)
+ {
+ if ((xmlSchemaGetQNameRefName(part->children) ==
+ ctxt->redef->refName) &&
+ (xmlSchemaGetQNameRefTargetNs(part->children) ==
+ ctxt->redef->refTargetNs))
+ {
+ /*
+ * SPEC src-redefine:
+ * (6.1) "If it has a <group> among its contents at
+ * some level the `actual value` of whose ref
+ * [attribute] is the same as the `actual value` of
+ * its own name attribute plus target namespace, then
+ * all of the following must be true:"
+ * (6.1.1) "It must have exactly one such group."
+ */
+ if (ctxt->redefCounter != 0) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_SRC_REDEFINE, child, NULL,
+ "The redefining model group definition "
+ "'%s' must not contain more than one "
+ "reference to the redefined definition",
+ xmlSchemaFormatQName(&str,
+ ctxt->redef->refTargetNs,
+ ctxt->redef->refName),
+ NULL);
+ FREE_AND_NULL(str)
+ part = NULL;
+ } else if (((WXS_PARTICLE(part))->minOccurs != 1) ||
+ ((WXS_PARTICLE(part))->maxOccurs != 1))
+ {
+ xmlChar *str = NULL;
+ /*
+ * SPEC src-redefine:
+ * (6.1.2) "The `actual value` of both that
+ * group's minOccurs and maxOccurs [attribute]
+ * must be 1 (or `absent`).
+ */
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_SRC_REDEFINE, child, NULL,
+ "The redefining model group definition "
+ "'%s' must not contain a reference to the "
+ "redefined definition with a "
+ "maxOccurs/minOccurs other than 1",
+ xmlSchemaFormatQName(&str,
+ ctxt->redef->refTargetNs,
+ ctxt->redef->refName),
+ NULL);
+ FREE_AND_NULL(str)
+ part = NULL;
+ }
+ ctxt->redef->reference = WXS_BASIC_CAST part;
+ ctxt->redefCounter++;
+ }
+ }
+ } else if (IS_SCHEMA(child, "any")) {
+ part = (xmlSchemaTreeItemPtr)
+ xmlSchemaParseAny(ctxt, schema, child);
+ } else if (IS_SCHEMA(child, "choice")) {
+ part = xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_CHOICE, 1);
+ } else if (IS_SCHEMA(child, "sequence")) {
+ part = xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SEQUENCE, 1);
+ }
+ if (part != NULL) {
+ if (last == NULL)
+ item->children = part;
+ else
+ last->next = part;
+ last = part;
+ }
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (element | group | choice | sequence | any)*)");
+ }
+ }
+ if ((max == 0) && (min == 0))
+ return (NULL);
+ if (hasRefs) {
+ /*
+ * We need to resolve references.
+ */
+ WXS_ADD_PENDING(ctxt, item);
+ }
+ if (withParticle)
+ return ((xmlSchemaTreeItemPtr) particle);
+ else
+ return ((xmlSchemaTreeItemPtr) item);
+}
+
+/**
+ * xmlSchemaParseRestriction:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Restriction definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the type definition or NULL in case of error
+ */
+static xmlSchemaTypePtr
+xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, xmlSchemaTypeType parentType)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ type->flags |= XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION;
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "base"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ /*
+ * Extract and validate attributes.
+ */
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ /*
+ * Attribute
+ */
+ /*
+ * Extract the base type. The "base" attribute is mandatory if inside
+ * a complex type or if redefining.
+ *
+ * SPEC (1.2) "...otherwise (<restriction> has no <simpleType> "
+ * among its [children]), the simple type definition which is
+ * the {content type} of the type definition `resolved` to by
+ * the `actual value` of the base [attribute]"
+ */
+ if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base",
+ &(type->baseNs), &(type->base)) == 0)
+ {
+ if ((type->base == NULL) && (type->type == XML_SCHEMA_TYPE_COMPLEX)) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "base", NULL);
+ } else if ((ctxt->isRedefine) &&
+ (type->flags & XML_SCHEMAS_TYPE_GLOBAL))
+ {
+ if (type->base == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "base", NULL);
+ } else if ((! xmlStrEqual(type->base, type->name)) ||
+ (! xmlStrEqual(type->baseNs, type->targetNamespace)))
+ {
+ xmlChar *str1 = NULL, *str2 = NULL;
+ /*
+ * REDEFINE: SPEC src-redefine (5)
+ * "Within the [children], each <simpleType> must have a
+ * <restriction> among its [children] ... the `actual value` of
+ * whose base [attribute] must be the same as the `actual value`
+ * of its own name attribute plus target namespace;"
+ */
+ xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_REDEFINE,
+ NULL, node, "This is a redefinition, but the QName "
+ "value '%s' of the 'base' attribute does not match the "
+ "type's designation '%s'",
+ xmlSchemaFormatQName(&str1, type->baseNs, type->base),
+ xmlSchemaFormatQName(&str2, type->targetNamespace,
+ type->name), NULL);
+ FREE_AND_NULL(str1);
+ FREE_AND_NULL(str2);
+ /* Avoid confusion and erase the values. */
+ type->base = NULL;
+ type->baseNs = NULL;
+ }
+ }
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the simple type ancestor.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (parentType == XML_SCHEMA_TYPE_SIMPLE) {
+ /*
+ * Corresponds to <simpleType><restriction><simpleType>.
+ */
+ if (IS_SCHEMA(child, "simpleType")) {
+ if (type->base != NULL) {
+ /*
+ * src-restriction-base-or-simpleType
+ * Either the base [attribute] or the simpleType [child] of the
+ * <restriction> element must be present, but not both.
+ */
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE,
+ NULL, node, child,
+ "The attribute 'base' and the <simpleType> child are "
+ "mutually exclusive", NULL);
+ } else {
+ type->baseType = (xmlSchemaTypePtr)
+ xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+ }
+ child = child->next;
+ } else if (type->base == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE,
+ NULL, node, child,
+ "Either the attribute 'base' or a <simpleType> child "
+ "must be present", NULL);
+ }
+ } else if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
+ /*
+ * Corresponds to <complexType><complexContent><restriction>...
+ * followed by:
+ *
+ * Model groups <all>, <choice> and <sequence>.
+ */
+ if (IS_SCHEMA(child, "all")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_ALL, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "choice")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt,
+ schema, child, XML_SCHEMA_TYPE_CHOICE, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "sequence")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SEQUENCE, 1);
+ child = child->next;
+ /*
+ * Model group reference <group>.
+ */
+ } else if (IS_SCHEMA(child, "group")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+ /*
+ * Note that the reference will be resolved in
+ * xmlSchemaResolveTypeReferences();
+ */
+ child = child->next;
+ }
+ } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) {
+ /*
+ * Corresponds to <complexType><simpleContent><restriction>...
+ *
+ * "1.1 the simple type definition corresponding to the <simpleType>
+ * among the [children] of <restriction> if there is one;"
+ */
+ if (IS_SCHEMA(child, "simpleType")) {
+ /*
+ * We will store the to-be-restricted simple type in
+ * type->contentTypeDef *temporarily*.
+ */
+ type->contentTypeDef = (xmlSchemaTypePtr)
+ xmlSchemaParseSimpleType(ctxt, schema, child, 0);
+ if ( type->contentTypeDef == NULL)
+ return (NULL);
+ child = child->next;
+ }
+ }
+
+ if ((parentType == XML_SCHEMA_TYPE_SIMPLE) ||
+ (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT)) {
+ xmlSchemaFacetPtr facet, lastfacet = NULL;
+ /*
+ * Corresponds to <complexType><simpleContent><restriction>...
+ * <simpleType><restriction>...
+ */
+
+ /*
+ * Add the facets to the simple type ancestor.
+ */
+ /*
+ * TODO: Datatypes: 4.1.3 Constraints on XML Representation of
+ * Simple Type Definition Schema Representation Constraint:
+ * *Single Facet Value*
+ */
+ while ((IS_SCHEMA(child, "minInclusive")) ||
+ (IS_SCHEMA(child, "minExclusive")) ||
+ (IS_SCHEMA(child, "maxInclusive")) ||
+ (IS_SCHEMA(child, "maxExclusive")) ||
+ (IS_SCHEMA(child, "totalDigits")) ||
+ (IS_SCHEMA(child, "fractionDigits")) ||
+ (IS_SCHEMA(child, "pattern")) ||
+ (IS_SCHEMA(child, "enumeration")) ||
+ (IS_SCHEMA(child, "whiteSpace")) ||
+ (IS_SCHEMA(child, "length")) ||
+ (IS_SCHEMA(child, "maxLength")) ||
+ (IS_SCHEMA(child, "minLength"))) {
+ facet = xmlSchemaParseFacet(ctxt, schema, child);
+ if (facet != NULL) {
+ if (lastfacet == NULL)
+ type->facets = facet;
+ else
+ lastfacet->next = facet;
+ lastfacet = facet;
+ lastfacet->next = NULL;
+ }
+ child = child->next;
+ }
+ /*
+ * Create links for derivation and validation.
+ */
+ if (type->facets != NULL) {
+ xmlSchemaFacetLinkPtr facetLink, lastFacetLink = NULL;
+
+ facet = type->facets;
+ do {
+ facetLink = (xmlSchemaFacetLinkPtr)
+ xmlMalloc(sizeof(xmlSchemaFacetLink));
+ if (facetLink == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating a facet link", NULL);
+ xmlFree(facetLink);
+ return (NULL);
+ }
+ facetLink->facet = facet;
+ facetLink->next = NULL;
+ if (lastFacetLink == NULL)
+ type->facetSet = facetLink;
+ else
+ lastFacetLink->next = facetLink;
+ lastFacetLink = facetLink;
+ facet = facet->next;
+ } while (facet != NULL);
+ }
+ }
+ if (type->type == XML_SCHEMA_TYPE_COMPLEX) {
+ /*
+ * Attribute uses/declarations.
+ */
+ if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+ (xmlSchemaItemListPtr *) &(type->attrUses),
+ XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
+ return(NULL);
+ /*
+ * Attribute wildcard.
+ */
+ if (IS_SCHEMA(child, "anyAttribute")) {
+ type->attributeWildcard =
+ xmlSchemaParseAnyAttribute(ctxt, schema, child);
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "annotation?, (group | all | choice | sequence)?, "
+ "((attribute | attributeGroup)*, anyAttribute?))");
+ } else if (parentType == XML_SCHEMA_TYPE_SIMPLE_CONTENT) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (simpleType?, (minExclusive | minInclusive | "
+ "maxExclusive | maxInclusive | totalDigits | fractionDigits | "
+ "length | minLength | maxLength | enumeration | whiteSpace | "
+ "pattern)*)?, ((attribute | attributeGroup)*, anyAttribute?))");
+ } else {
+ /* Simple type */
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (simpleType?, (minExclusive | minInclusive | "
+ "maxExclusive | maxInclusive | totalDigits | fractionDigits | "
+ "length | minLength | maxLength | enumeration | whiteSpace | "
+ "pattern)*))");
+ }
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaParseExtension:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * Parses an <extension>, which is found inside a
+ * <simpleContent> or <complexContent>.
+ * *WARNING* this interface is highly subject to change.
+ *
+ * TODO: Returns the type definition or NULL in case of error
+ */
+static xmlSchemaTypePtr
+xmlSchemaParseExtension(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, xmlSchemaTypeType parentType)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ type->flags |= XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION;
+
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "base"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+
+ /*
+ * Attribute "base" - mandatory.
+ */
+ if ((xmlSchemaPValAttrQName(ctxt, schema, NULL, node,
+ "base", &(type->baseNs), &(type->base)) == 0) &&
+ (type->base == NULL)) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING,
+ NULL, node, "base", NULL);
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the type ancestor.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
+ /*
+ * Corresponds to <complexType><complexContent><extension>... and:
+ *
+ * Model groups <all>, <choice>, <sequence> and <group>.
+ */
+ if (IS_SCHEMA(child, "all")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema,
+ child, XML_SCHEMA_TYPE_ALL, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "choice")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema,
+ child, XML_SCHEMA_TYPE_CHOICE, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "sequence")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema,
+ child, XML_SCHEMA_TYPE_SEQUENCE, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "group")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+ /*
+ * Note that the reference will be resolved in
+ * xmlSchemaResolveTypeReferences();
+ */
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ /*
+ * Attribute uses/declarations.
+ */
+ if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+ (xmlSchemaItemListPtr *) &(type->attrUses),
+ XML_SCHEMA_TYPE_EXTENSION, NULL) == -1)
+ return(NULL);
+ /*
+ * Attribute wildcard.
+ */
+ if (IS_SCHEMA(child, "anyAttribute")) {
+ ctxt->ctxtType->attributeWildcard =
+ xmlSchemaParseAnyAttribute(ctxt, schema, child);
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ if (parentType == XML_SCHEMA_TYPE_COMPLEX_CONTENT) {
+ /* Complex content extension. */
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, ((group | all | choice | sequence)?, "
+ "((attribute | attributeGroup)*, anyAttribute?)))");
+ } else {
+ /* Simple content extension. */
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, ((attribute | attributeGroup)*, "
+ "anyAttribute?))");
+ }
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaParseSimpleContent:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema SimpleContent definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the type definition or NULL in case of error
+ */
+static int
+xmlSchemaParseSimpleContent(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema, xmlNodePtr node,
+ int *hasRestrictionOrExtension)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
+ (hasRestrictionOrExtension == NULL))
+ return (-1);
+ *hasRestrictionOrExtension = 0;
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ type->contentType = XML_SCHEMA_CONTENT_SIMPLE;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id"))) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the complex type ancestor.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, NULL, NULL,
+ "(annotation?, (restriction | extension))");
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, NULL, NULL,
+ "(annotation?, (restriction | extension))");
+ }
+ if (IS_SCHEMA(child, "restriction")) {
+ xmlSchemaParseRestriction(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT);
+ (*hasRestrictionOrExtension) = 1;
+ child = child->next;
+ } else if (IS_SCHEMA(child, "extension")) {
+ xmlSchemaParseExtension(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT);
+ (*hasRestrictionOrExtension) = 1;
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child, NULL,
+ "(annotation?, (restriction | extension))");
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaParseComplexContent:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema ComplexContent definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the type definition or NULL in case of error
+ */
+static int
+xmlSchemaParseComplexContent(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaPtr schema, xmlNodePtr node,
+ int *hasRestrictionOrExtension)
+{
+ xmlSchemaTypePtr type;
+ xmlNodePtr child = NULL;
+ xmlAttrPtr attr;
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
+ (hasRestrictionOrExtension == NULL))
+ return (-1);
+ *hasRestrictionOrExtension = 0;
+ /* Not a component, don't create it. */
+ type = ctxt->ctxtType;
+ /*
+ * Check for illegal attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if ((!xmlStrEqual(attr->name, BAD_CAST "id")) &&
+ (!xmlStrEqual(attr->name, BAD_CAST "mixed")))
+ {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+
+ /*
+ * Set the 'mixed' on the complex type ancestor.
+ */
+ if (xmlGetBooleanProp(ctxt, node, "mixed", 0)) {
+ if ((type->flags & XML_SCHEMAS_TYPE_MIXED) == 0)
+ type->flags |= XML_SCHEMAS_TYPE_MIXED;
+ }
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ /*
+ * Add the annotation to the complex type ancestor.
+ */
+ xmlSchemaAddAnnotation((xmlSchemaAnnotItemPtr) type,
+ xmlSchemaParseAnnotation(ctxt, child, 1));
+ child = child->next;
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, NULL,
+ NULL, "(annotation?, (restriction | extension))");
+ }
+ if (child == NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_MISSING,
+ NULL, node, NULL,
+ NULL, "(annotation?, (restriction | extension))");
+ }
+ if (IS_SCHEMA(child, "restriction")) {
+ xmlSchemaParseRestriction(ctxt, schema, child,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT);
+ (*hasRestrictionOrExtension) = 1;
+ child = child->next;
+ } else if (IS_SCHEMA(child, "extension")) {
+ xmlSchemaParseExtension(ctxt, schema, child,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT);
+ (*hasRestrictionOrExtension) = 1;
+ child = child->next;
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?, (restriction | extension))");
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaParseComplexType:
+ * @ctxt: a schema validation context
+ * @schema: the schema being built
+ * @node: a subtree containing XML Schema informations
+ *
+ * parse a XML schema Complex Type definition
+ * *WARNING* this interface is highly subject to change
+ *
+ * Returns the type definition or NULL in case of error
+ */
+static xmlSchemaTypePtr
+xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
+ xmlNodePtr node, int topLevel)
+{
+ xmlSchemaTypePtr type, ctxtType;
+ xmlNodePtr child = NULL;
+ const xmlChar *name = NULL;
+ xmlAttrPtr attr;
+ const xmlChar *attrValue;
+#ifdef ENABLE_NAMED_LOCALS
+ char buf[40];
+#endif
+ int final = 0, block = 0, hasRestrictionOrExtension = 0;
+
+
+ if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
+ return (NULL);
+
+ ctxtType = ctxt->ctxtType;
+
+ if (topLevel) {
+ attr = xmlSchemaGetPropNode(node, "name");
+ if (attr == NULL) {
+ xmlSchemaPMissingAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_MISSING, NULL, node, "name", NULL);
+ return (NULL);
+ } else if (xmlSchemaPValAttrNode(ctxt, NULL, attr,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NCNAME), &name) != 0) {
+ return (NULL);
+ }
+ }
+
+ if (topLevel == 0) {
+ /*
+ * Parse as local complex type definition.
+ */
+#ifdef ENABLE_NAMED_LOCALS
+ snprintf(buf, 39, "#CT%d", ctxt->counter++ + 1);
+ type = xmlSchemaAddType(ctxt, schema,
+ XML_SCHEMA_TYPE_COMPLEX,
+ xmlDictLookup(ctxt->dict, (const xmlChar *)buf, -1),
+ ctxt->targetNamespace, node, 0);
+#else
+ type = xmlSchemaAddType(ctxt, schema,
+ XML_SCHEMA_TYPE_COMPLEX,
+ NULL, ctxt->targetNamespace, node, 0);
+#endif
+ if (type == NULL)
+ return (NULL);
+ name = type->name;
+ type->node = node;
+ type->type = XML_SCHEMA_TYPE_COMPLEX;
+ /*
+ * TODO: We need the target namespace.
+ */
+ } else {
+ /*
+ * Parse as global complex type definition.
+ */
+ type = xmlSchemaAddType(ctxt, schema,
+ XML_SCHEMA_TYPE_COMPLEX,
+ name, ctxt->targetNamespace, node, 1);
+ if (type == NULL)
+ return (NULL);
+ type->node = node;
+ type->type = XML_SCHEMA_TYPE_COMPLEX;
+ type->flags |= XML_SCHEMAS_TYPE_GLOBAL;
+ }
+ type->targetNamespace = ctxt->targetNamespace;
+ /*
+ * Handle attributes.
+ */
+ attr = node->properties;
+ while (attr != NULL) {
+ if (attr->ns == NULL) {
+ if (xmlStrEqual(attr->name, BAD_CAST "id")) {
+ /*
+ * Attribute "id".
+ */
+ xmlSchemaPValAttrID(ctxt, node, BAD_CAST "id");
+ } else if (xmlStrEqual(attr->name, BAD_CAST "mixed")) {
+ /*
+ * Attribute "mixed".
+ */
+ if (xmlSchemaPGetBoolNodeValue(ctxt,
+ NULL, (xmlNodePtr) attr))
+ type->flags |= XML_SCHEMAS_TYPE_MIXED;
+ } else if (topLevel) {
+ /*
+ * Attributes of global complex type definitions.
+ */
+ if (xmlStrEqual(attr->name, BAD_CAST "name")) {
+ /* Pass. */
+ } else if (xmlStrEqual(attr->name, BAD_CAST "abstract")) {
+ /*
+ * Attribute "abstract".
+ */
+ if (xmlSchemaPGetBoolNodeValue(ctxt,
+ NULL, (xmlNodePtr) attr))
+ type->flags |= XML_SCHEMAS_TYPE_ABSTRACT;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "final")) {
+ /*
+ * Attribute "final".
+ */
+ attrValue = xmlSchemaGetNodeContent(ctxt,
+ (xmlNodePtr) attr);
+ if (xmlSchemaPValAttrBlockFinal(attrValue,
+ &(type->flags),
+ -1,
+ XML_SCHEMAS_TYPE_FINAL_EXTENSION,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION,
+ -1, -1, -1) != 0)
+ {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(#all | List of (extension | restriction))",
+ attrValue, NULL, NULL, NULL);
+ } else
+ final = 1;
+ } else if (xmlStrEqual(attr->name, BAD_CAST "block")) {
+ /*
+ * Attribute "block".
+ */
+ attrValue = xmlSchemaGetNodeContent(ctxt,
+ (xmlNodePtr) attr);
+ if (xmlSchemaPValAttrBlockFinal(attrValue, &(type->flags),
+ -1,
+ XML_SCHEMAS_TYPE_BLOCK_EXTENSION,
+ XML_SCHEMAS_TYPE_BLOCK_RESTRICTION,
+ -1, -1, -1) != 0) {
+ xmlSchemaPSimpleTypeErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
+ NULL, (xmlNodePtr) attr, NULL,
+ "(#all | List of (extension | restriction)) ",
+ attrValue, NULL, NULL, NULL);
+ } else
+ block = 1;
+ } else {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ } else if (xmlStrEqual(attr->ns->href, xmlSchemaNs)) {
+ xmlSchemaPIllegalAttrErr(ctxt,
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, NULL, attr);
+ }
+ attr = attr->next;
+ }
+ if (! block) {
+ /*
+ * Apply default "block" values.
+ */
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION)
+ type->flags |= XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION)
+ type->flags |= XML_SCHEMAS_TYPE_BLOCK_EXTENSION;
+ }
+ if (! final) {
+ /*
+ * Apply default "block" values.
+ */
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION)
+ type->flags |= XML_SCHEMAS_TYPE_FINAL_RESTRICTION;
+ if (schema->flags & XML_SCHEMAS_FINAL_DEFAULT_EXTENSION)
+ type->flags |= XML_SCHEMAS_TYPE_FINAL_EXTENSION;
+ }
+ /*
+ * And now for the children...
+ */
+ child = node->children;
+ if (IS_SCHEMA(child, "annotation")) {
+ type->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
+ child = child->next;
+ }
+ ctxt->ctxtType = type;
+ if (IS_SCHEMA(child, "simpleContent")) {
+ /*
+ * <complexType><simpleContent>...
+ * 3.4.3 : 2.2
+ * Specifying mixed='true' when the <simpleContent>
+ * alternative is chosen has no effect
+ */
+ if (type->flags & XML_SCHEMAS_TYPE_MIXED)
+ type->flags ^= XML_SCHEMAS_TYPE_MIXED;
+ xmlSchemaParseSimpleContent(ctxt, schema, child,
+ &hasRestrictionOrExtension);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "complexContent")) {
+ /*
+ * <complexType><complexContent>...
+ */
+ type->contentType = XML_SCHEMA_CONTENT_EMPTY;
+ xmlSchemaParseComplexContent(ctxt, schema, child,
+ &hasRestrictionOrExtension);
+ child = child->next;
+ } else {
+ /*
+ * E.g <complexType><sequence>... or <complexType><attribute>... etc.
+ *
+ * SPEC
+ * "...the third alternative (neither <simpleContent> nor
+ * <complexContent>) is chosen. This case is understood as shorthand
+ * for complex content restricting the `ur-type definition`, and the
+ * details of the mappings should be modified as necessary.
+ */
+ type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
+ type->flags |= XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION;
+ /*
+ * Parse model groups.
+ */
+ if (IS_SCHEMA(child, "all")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_ALL, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "choice")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_CHOICE, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "sequence")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroup(ctxt, schema, child,
+ XML_SCHEMA_TYPE_SEQUENCE, 1);
+ child = child->next;
+ } else if (IS_SCHEMA(child, "group")) {
+ type->subtypes = (xmlSchemaTypePtr)
+ xmlSchemaParseModelGroupDefRef(ctxt, schema, child);
+ /*
+ * Note that the reference will be resolved in
+ * xmlSchemaResolveTypeReferences();
+ */
+ child = child->next;
+ }
+ /*
+ * Parse attribute decls/refs.
+ */
+ if (xmlSchemaParseLocalAttributes(ctxt, schema, &child,
+ (xmlSchemaItemListPtr *) &(type->attrUses),
+ XML_SCHEMA_TYPE_RESTRICTION, NULL) == -1)
+ return(NULL);
+ /*
+ * Parse attribute wildcard.
+ */
+ if (IS_SCHEMA(child, "anyAttribute")) {
+ type->attributeWildcard = xmlSchemaParseAnyAttribute(ctxt, schema, child);
+ child = child->next;
+ }
+ }
+ if (child != NULL) {
+ xmlSchemaPContentErr(ctxt,
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED,
+ NULL, node, child,
+ NULL, "(annotation?, (simpleContent | complexContent | "
+ "((group | all | choice | sequence)?, ((attribute | "
+ "attributeGroup)*, anyAttribute?))))");
+ }
+ /*
+ * REDEFINE: SPEC src-redefine (5)
+ */
+ if (topLevel && ctxt->isRedefine && (! hasRestrictionOrExtension)) {
+ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_SRC_REDEFINE,
+ NULL, node, "This is a redefinition, thus the "
+ "<complexType> must have a <restriction> or <extension> "
+ "grand-child", NULL);
+ }
+ ctxt->ctxtType = ctxtType;
+ return (type);
+}
+
+/************************************************************************
+ * *
+ * Validating using Schemas *
+ * *
+ ************************************************************************/
+
+/************************************************************************
+ * *
+ * Reading/Writing Schemas *
+ * *
+ ************************************************************************/
+
+#if 0 /* Will be enabled if it is clear what options are needed. */
+/**
+ * xmlSchemaParserCtxtSetOptions:
+ * @ctxt: a schema parser context
+ * @options: a combination of xmlSchemaParserOption
+ *
+ * Sets the options to be used during the parse.
+ *
+ * Returns 0 in case of success, -1 in case of an
+ * API error.
+ */
+static int
+xmlSchemaParserCtxtSetOptions(xmlSchemaParserCtxtPtr ctxt,
+ int options)
+
+{
+ int i;
+
+ if (ctxt == NULL)
+ return (-1);
+ /*
+ * WARNING: Change the start value if adding to the
+ * xmlSchemaParseOption.
+ */
+ for (i = 1; i < (int) sizeof(int) * 8; i++) {
+ if (options & 1<<i) {
+ return (-1);
+ }
+ }
+ ctxt->options = options;
+ return (0);
+}
+
+/**
+ * xmlSchemaValidCtxtGetOptions:
+ * @ctxt: a schema parser context
+ *
+ * Returns the option combination of the parser context.
+ */
+static int
+xmlSchemaParserCtxtGetOptions(xmlSchemaParserCtxtPtr ctxt)
+
+{
+ if (ctxt == NULL)
+ return (-1);
+ else
+ return (ctxt->options);
+}
+#endif
+
+/**
+ * xmlSchemaNewParserCtxt:
+ * @URL: the location of the schema
+ *
+ * Create an XML Schemas parse context for that file/resource expected
+ * to contain an XML Schemas file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchemaParserCtxtPtr
+xmlSchemaNewParserCtxt(const char *URL)
+{
+ xmlSchemaParserCtxtPtr ret;
+
+ if (URL == NULL)
+ return (NULL);
+
+ ret = xmlSchemaParserCtxtCreate();
+ if (ret == NULL)
+ return(NULL);
+ ret->dict = xmlDictCreate();
+ ret->URL = xmlDictLookup(ret->dict, (const xmlChar *) URL, -1);
+ return (ret);
+}
+
+/**
+ * xmlSchemaNewMemParserCtxt:
+ * @buffer: a pointer to a char array containing the schemas
+ * @size: the size of the array
+ *
+ * Create an XML Schemas parse context for that memory buffer expected
+ * to contain an XML Schemas file.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchemaParserCtxtPtr
+xmlSchemaNewMemParserCtxt(const char *buffer, int size)
+{
+ xmlSchemaParserCtxtPtr ret;
+
+ if ((buffer == NULL) || (size <= 0))
+ return (NULL);
+ ret = xmlSchemaParserCtxtCreate();
+ if (ret == NULL)
+ return(NULL);
+ ret->buffer = buffer;
+ ret->size = size;
+ ret->dict = xmlDictCreate();
+ return (ret);
+}
+
+/**
+ * xmlSchemaNewDocParserCtxt:
+ * @doc: a preparsed document tree
+ *
+ * Create an XML Schemas parse context for that document.
+ * NB. The document may be modified during the parsing process.
+ *
+ * Returns the parser context or NULL in case of error
+ */
+xmlSchemaParserCtxtPtr
+xmlSchemaNewDocParserCtxt(xmlDocPtr doc)
+{
+ xmlSchemaParserCtxtPtr ret;
+
+ if (doc == NULL)
+ return (NULL);
+ ret = xmlSchemaParserCtxtCreate();
+ if (ret == NULL)
+ return(NULL);
+ ret->doc = doc;
+ ret->dict = xmlDictCreate();
+ /* The application has responsibility for the document */
+ ret->preserve = 1;
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaFreeParserCtxt:
+ * @ctxt: the schema parser context
+ *
+ * Free the resources associated to the schema parser context
+ */
+void
+xmlSchemaFreeParserCtxt(xmlSchemaParserCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->doc != NULL && !ctxt->preserve)
+ xmlFreeDoc(ctxt->doc);
+ if (ctxt->vctxt != NULL) {
+ xmlSchemaFreeValidCtxt(ctxt->vctxt);
+ }
+ if (ctxt->ownsConstructor && (ctxt->constructor != NULL)) {
+ xmlSchemaConstructionCtxtFree(ctxt->constructor);
+ ctxt->constructor = NULL;
+ ctxt->ownsConstructor = 0;
+ }
+ if (ctxt->attrProhibs != NULL)
+ xmlSchemaItemListFree(ctxt->attrProhibs);
+ xmlDictFree(ctxt->dict);
+ xmlFree(ctxt);
+}
+
+/************************************************************************
+ * *
+ * Building the content models *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaBuildContentModelForSubstGroup:
+ *
+ * Returns 1 if nillable, 0 otherwise
+ */
+static int
+xmlSchemaBuildContentModelForSubstGroup(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaParticlePtr particle, int counter, xmlAutomataStatePtr end)
+{
+ xmlAutomataStatePtr start, tmp;
+ xmlSchemaElementPtr elemDecl, member;
+ xmlSchemaSubstGroupPtr substGroup;
+ int i;
+ int ret = 0;
+
+ elemDecl = (xmlSchemaElementPtr) particle->children;
+ /*
+ * Wrap the substitution group with a CHOICE.
+ */
+ start = pctxt->state;
+ if (end == NULL)
+ end = xmlAutomataNewState(pctxt->am);
+ substGroup = xmlSchemaSubstGroupGet(pctxt, elemDecl);
+ if (substGroup == NULL) {
+ xmlSchemaPErr(pctxt, WXS_ITEM_NODE(particle),
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaBuildContentModelForSubstGroup, "
+ "declaration is marked having a subst. group but none "
+ "available.\n", elemDecl->name, NULL);
+ return(0);
+ }
+ if (counter >= 0) {
+ /*
+ * NOTE that we put the declaration in, even if it's abstract.
+ * However, an error will be raised during *validation* if an element
+ * information item shall be validated against an abstract element
+ * declaration.
+ */
+ tmp = xmlAutomataNewCountedTrans(pctxt->am, start, NULL, counter);
+ xmlAutomataNewTransition2(pctxt->am, tmp, end,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl);
+ /*
+ * Add subst. group members.
+ */
+ for (i = 0; i < substGroup->members->nbItems; i++) {
+ member = (xmlSchemaElementPtr) substGroup->members->items[i];
+ xmlAutomataNewTransition2(pctxt->am, tmp, end,
+ member->name, member->targetNamespace, member);
+ }
+ } else if (particle->maxOccurs == 1) {
+ /*
+ * NOTE that we put the declaration in, even if it's abstract,
+ */
+ xmlAutomataNewEpsilon(pctxt->am,
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl), end);
+ /*
+ * Add subst. group members.
+ */
+ for (i = 0; i < substGroup->members->nbItems; i++) {
+ member = (xmlSchemaElementPtr) substGroup->members->items[i];
+ /*
+ * NOTE: This fixes bug #341150. xmlAutomataNewOnceTrans2()
+ * was incorrectly used instead of xmlAutomataNewTransition2()
+ * (seems like a copy&paste bug from the XML_SCHEMA_TYPE_ALL
+ * section in xmlSchemaBuildAContentModel() ).
+ * TODO: Check if xmlAutomataNewOnceTrans2() was instead
+ * intended for the above "counter" section originally. I.e.,
+ * check xs:all with subst-groups.
+ *
+ * tmp = xmlAutomataNewOnceTrans2(pctxt->am, start, NULL,
+ * member->name, member->targetNamespace,
+ * 1, 1, member);
+ */
+ tmp = xmlAutomataNewTransition2(pctxt->am, start, NULL,
+ member->name, member->targetNamespace, member);
+ xmlAutomataNewEpsilon(pctxt->am, tmp, end);
+ }
+ } else {
+ xmlAutomataStatePtr hop;
+ int maxOccurs = particle->maxOccurs == UNBOUNDED ?
+ UNBOUNDED : particle->maxOccurs - 1;
+ int minOccurs = particle->minOccurs < 1 ? 0 : particle->minOccurs - 1;
+
+ counter =
+ xmlAutomataNewCounter(pctxt->am, minOccurs,
+ maxOccurs);
+ hop = xmlAutomataNewState(pctxt->am);
+
+ xmlAutomataNewEpsilon(pctxt->am,
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl),
+ hop);
+ /*
+ * Add subst. group members.
+ */
+ for (i = 0; i < substGroup->members->nbItems; i++) {
+ member = (xmlSchemaElementPtr) substGroup->members->items[i];
+ xmlAutomataNewEpsilon(pctxt->am,
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL,
+ member->name, member->targetNamespace, member),
+ hop);
+ }
+ xmlAutomataNewCountedTrans(pctxt->am, hop, start, counter);
+ xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
+ }
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am, start, end);
+ ret = 1;
+ }
+ pctxt->state = end;
+ return(ret);
+}
+
+/**
+ * xmlSchemaBuildContentModelForElement:
+ *
+ * Returns 1 if nillable, 0 otherwise
+ */
+static int
+xmlSchemaBuildContentModelForElement(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr particle)
+{
+ int ret = 0;
+
+ if (((xmlSchemaElementPtr) particle->children)->flags &
+ XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) {
+ /*
+ * Substitution groups.
+ */
+ ret = xmlSchemaBuildContentModelForSubstGroup(ctxt, particle, -1, NULL);
+ } else {
+ xmlSchemaElementPtr elemDecl;
+ xmlAutomataStatePtr start;
+
+ elemDecl = (xmlSchemaElementPtr) particle->children;
+
+ if (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT)
+ return(0);
+ if (particle->maxOccurs == 1) {
+ start = ctxt->state;
+ ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl);
+ } else if ((particle->maxOccurs >= UNBOUNDED) &&
+ (particle->minOccurs < 2)) {
+ /* Special case. */
+ start = ctxt->state;
+ ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl);
+ ctxt->state = xmlAutomataNewTransition2(ctxt->am, ctxt->state, ctxt->state,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl);
+ } else {
+ int counter;
+ int maxOccurs = particle->maxOccurs == UNBOUNDED ?
+ UNBOUNDED : particle->maxOccurs - 1;
+ int minOccurs = particle->minOccurs < 1 ?
+ 0 : particle->minOccurs - 1;
+
+ start = xmlAutomataNewEpsilon(ctxt->am, ctxt->state, NULL);
+ counter = xmlAutomataNewCounter(ctxt->am, minOccurs, maxOccurs);
+ ctxt->state = xmlAutomataNewTransition2(ctxt->am, start, NULL,
+ elemDecl->name, elemDecl->targetNamespace, elemDecl);
+ xmlAutomataNewCountedTrans(ctxt->am, ctxt->state, start, counter);
+ ctxt->state = xmlAutomataNewCounterTrans(ctxt->am, ctxt->state,
+ NULL, counter);
+ }
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(ctxt->am, start, ctxt->state);
+ ret = 1;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlSchemaBuildAContentModel:
+ * @ctxt: the schema parser context
+ * @particle: the particle component
+ * @name: the complex type's name whose content is being built
+ *
+ * Create the automaton for the {content type} of a complex type.
+ *
+ * Returns 1 if the content is nillable, 0 otherwise
+ */
+static int
+xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaParticlePtr particle)
+{
+ int ret = 0, tmp2;
+
+ if (particle == NULL) {
+ PERROR_INT("xmlSchemaBuildAContentModel", "particle is NULL");
+ return(1);
+ }
+ if (particle->children == NULL) {
+ /*
+ * Just return in this case. A missing "term" of the particle
+ * might arise due to an invalid "term" component.
+ */
+ return(1);
+ }
+
+ switch (particle->children->type) {
+ case XML_SCHEMA_TYPE_ANY: {
+ xmlAutomataStatePtr start, end;
+ xmlSchemaWildcardPtr wild;
+ xmlSchemaWildcardNsPtr ns;
+
+ wild = (xmlSchemaWildcardPtr) particle->children;
+
+ start = pctxt->state;
+ end = xmlAutomataNewState(pctxt->am);
+
+ if (particle->maxOccurs == 1) {
+ if (wild->any == 1) {
+ /*
+ * We need to add both transitions:
+ *
+ * 1. the {"*", "*"} for elements in a namespace.
+ */
+ pctxt->state =
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL, BAD_CAST "*", BAD_CAST "*", wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
+ /*
+ * 2. the {"*"} for elements in no namespace.
+ */
+ pctxt->state =
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL, BAD_CAST "*", NULL, wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
+
+ } else if (wild->nsSet != NULL) {
+ ns = wild->nsSet;
+ do {
+ pctxt->state = start;
+ pctxt->state = xmlAutomataNewTransition2(pctxt->am,
+ pctxt->state, NULL, BAD_CAST "*", ns->value, wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
+ ns = ns->next;
+ } while (ns != NULL);
+
+ } else if (wild->negNsSet != NULL) {
+ pctxt->state = xmlAutomataNewNegTrans(pctxt->am,
+ start, end, BAD_CAST "*", wild->negNsSet->value,
+ wild);
+ }
+ } else {
+ int counter;
+ xmlAutomataStatePtr hop;
+ int maxOccurs =
+ particle->maxOccurs == UNBOUNDED ? UNBOUNDED :
+ particle->maxOccurs - 1;
+ int minOccurs =
+ particle->minOccurs < 1 ? 0 : particle->minOccurs - 1;
+
+ counter = xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs);
+ hop = xmlAutomataNewState(pctxt->am);
+ if (wild->any == 1) {
+ pctxt->state =
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL, BAD_CAST "*", BAD_CAST "*", wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
+ pctxt->state =
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL, BAD_CAST "*", NULL, wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
+ } else if (wild->nsSet != NULL) {
+ ns = wild->nsSet;
+ do {
+ pctxt->state =
+ xmlAutomataNewTransition2(pctxt->am,
+ start, NULL, BAD_CAST "*", ns->value, wild);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
+ ns = ns->next;
+ } while (ns != NULL);
+
+ } else if (wild->negNsSet != NULL) {
+ pctxt->state = xmlAutomataNewNegTrans(pctxt->am,
+ start, hop, BAD_CAST "*", wild->negNsSet->value,
+ wild);
+ }
+ xmlAutomataNewCountedTrans(pctxt->am, hop, start, counter);
+ xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
+ }
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am, start, end);
+ ret = 1;
+ }
+ pctxt->state = end;
+ break;
+ }
+ case XML_SCHEMA_TYPE_ELEMENT:
+ ret = xmlSchemaBuildContentModelForElement(pctxt, particle);
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:{
+ xmlSchemaTreeItemPtr sub;
+
+ ret = 1;
+ /*
+ * If max and min occurances are default (1) then
+ * simply iterate over the particles of the <sequence>.
+ */
+ if ((particle->minOccurs == 1) && (particle->maxOccurs == 1)) {
+ sub = particle->children->children;
+
+ while (sub != NULL) {
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 != 1) ret = 0;
+ sub = sub->next;
+ }
+ } else {
+ xmlAutomataStatePtr oldstate = pctxt->state;
+
+ if (particle->maxOccurs >= UNBOUNDED) {
+ if (particle->minOccurs > 1) {
+ xmlAutomataStatePtr tmp;
+ int counter;
+
+ pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, NULL);
+ oldstate = pctxt->state;
+
+ counter = xmlAutomataNewCounter(pctxt->am,
+ particle->minOccurs - 1, UNBOUNDED);
+
+ sub = particle->children->children;
+ while (sub != NULL) {
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 != 1) ret = 0;
+ sub = sub->next;
+ }
+ tmp = pctxt->state;
+ xmlAutomataNewCountedTrans(pctxt->am, tmp,
+ oldstate, counter);
+ pctxt->state =
+ xmlAutomataNewCounterTrans(pctxt->am, tmp,
+ NULL, counter);
+ if (ret == 1)
+ xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, pctxt->state);
+
+ } else {
+ pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, NULL);
+ oldstate = pctxt->state;
+
+ sub = particle->children->children;
+ while (sub != NULL) {
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 != 1) ret = 0;
+ sub = sub->next;
+ }
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state,
+ oldstate);
+ /*
+ * epsilon needed to block previous trans from
+ * being allowed to enter back from another
+ * construct
+ */
+ pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
+ pctxt->state, NULL);
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, pctxt->state);
+ ret = 1;
+ }
+ }
+ } else if ((particle->maxOccurs > 1)
+ || (particle->minOccurs > 1)) {
+ xmlAutomataStatePtr tmp;
+ int counter;
+
+ pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, NULL);
+ oldstate = pctxt->state;
+
+ counter = xmlAutomataNewCounter(pctxt->am,
+ particle->minOccurs - 1,
+ particle->maxOccurs - 1);
+
+ sub = particle->children->children;
+ while (sub != NULL) {
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 != 1) ret = 0;
+ sub = sub->next;
+ }
+ tmp = pctxt->state;
+ xmlAutomataNewCountedTrans(pctxt->am,
+ tmp, oldstate, counter);
+ pctxt->state =
+ xmlAutomataNewCounterTrans(pctxt->am, tmp, NULL,
+ counter);
+ if ((particle->minOccurs == 0) || (ret == 1)) {
+ xmlAutomataNewEpsilon(pctxt->am,
+ oldstate, pctxt->state);
+ ret = 1;
+ }
+ } else {
+ sub = particle->children->children;
+ while (sub != NULL) {
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 != 1) ret = 0;
+ sub = sub->next;
+ }
+
+ /*
+ * epsilon needed to block previous trans from
+ * being allowed to enter back from another
+ * construct
+ */
+ pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
+ pctxt->state, NULL);
+
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am, oldstate,
+ pctxt->state);
+ ret = 1;
+ }
+ }
+ }
+ break;
+ }
+ case XML_SCHEMA_TYPE_CHOICE:{
+ xmlSchemaTreeItemPtr sub;
+ xmlAutomataStatePtr start, end;
+
+ ret = 0;
+ start = pctxt->state;
+ end = xmlAutomataNewState(pctxt->am);
+
+ /*
+ * iterate over the subtypes and remerge the end with an
+ * epsilon transition
+ */
+ if (particle->maxOccurs == 1) {
+ sub = particle->children->children;
+ while (sub != NULL) {
+ pctxt->state = start;
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 == 1) ret = 1;
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, end);
+ sub = sub->next;
+ }
+ } else {
+ int counter;
+ xmlAutomataStatePtr hop, base;
+ int maxOccurs = particle->maxOccurs == UNBOUNDED ?
+ UNBOUNDED : particle->maxOccurs - 1;
+ int minOccurs =
+ particle->minOccurs < 1 ? 0 : particle->minOccurs - 1;
+
+ /*
+ * use a counter to keep track of the number of transtions
+ * which went through the choice.
+ */
+ counter =
+ xmlAutomataNewCounter(pctxt->am, minOccurs, maxOccurs);
+ hop = xmlAutomataNewState(pctxt->am);
+ base = xmlAutomataNewState(pctxt->am);
+
+ sub = particle->children->children;
+ while (sub != NULL) {
+ pctxt->state = base;
+ tmp2 = xmlSchemaBuildAContentModel(pctxt,
+ (xmlSchemaParticlePtr) sub);
+ if (tmp2 == 1) ret = 1;
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, hop);
+ sub = sub->next;
+ }
+ xmlAutomataNewEpsilon(pctxt->am, start, base);
+ xmlAutomataNewCountedTrans(pctxt->am, hop, base, counter);
+ xmlAutomataNewCounterTrans(pctxt->am, hop, end, counter);
+ if (ret == 1)
+ xmlAutomataNewEpsilon(pctxt->am, base, end);
+ }
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am, start, end);
+ ret = 1;
+ }
+ pctxt->state = end;
+ break;
+ }
+ case XML_SCHEMA_TYPE_ALL:{
+ xmlAutomataStatePtr start, tmp;
+ xmlSchemaParticlePtr sub;
+ xmlSchemaElementPtr elemDecl;
+
+ ret = 1;
+
+ sub = (xmlSchemaParticlePtr) particle->children->children;
+ if (sub == NULL)
+ break;
+
+ ret = 0;
+
+ start = pctxt->state;
+ tmp = xmlAutomataNewState(pctxt->am);
+ xmlAutomataNewEpsilon(pctxt->am, pctxt->state, tmp);
+ pctxt->state = tmp;
+ while (sub != NULL) {
+ pctxt->state = tmp;
+
+ elemDecl = (xmlSchemaElementPtr) sub->children;
+ if (elemDecl == NULL) {
+ PERROR_INT("xmlSchemaBuildAContentModel",
+ "<element> particle has no term");
+ return(ret);
+ };
+ /*
+ * NOTE: The {max occurs} of all the particles in the
+ * {particles} of the group must be 0 or 1; this is
+ * already ensured during the parse of the content of
+ * <all>.
+ */
+ if (elemDecl->flags & XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) {
+ int counter;
+
+ /*
+ * This is an abstract group, we need to share
+ * the same counter for all the element transitions
+ * derived from the group
+ */
+ counter = xmlAutomataNewCounter(pctxt->am,
+ sub->minOccurs, sub->maxOccurs);
+ xmlSchemaBuildContentModelForSubstGroup(pctxt,
+ sub, counter, pctxt->state);
+ } else {
+ if ((sub->minOccurs == 1) &&
+ (sub->maxOccurs == 1)) {
+ xmlAutomataNewOnceTrans2(pctxt->am, pctxt->state,
+ pctxt->state,
+ elemDecl->name,
+ elemDecl->targetNamespace,
+ 1, 1, elemDecl);
+ } else if ((sub->minOccurs == 0) &&
+ (sub->maxOccurs == 1)) {
+
+ xmlAutomataNewCountTrans2(pctxt->am, pctxt->state,
+ pctxt->state,
+ elemDecl->name,
+ elemDecl->targetNamespace,
+ 0,
+ 1,
+ elemDecl);
+ }
+ }
+ sub = (xmlSchemaParticlePtr) sub->next;
+ }
+ pctxt->state =
+ xmlAutomataNewAllTrans(pctxt->am, pctxt->state, NULL, 0);
+ if (particle->minOccurs == 0) {
+ xmlAutomataNewEpsilon(pctxt->am, start, pctxt->state);
+ ret = 1;
+ }
+ break;
+ }
+ case XML_SCHEMA_TYPE_GROUP:
+ /*
+ * If we hit a model group definition, then this means that
+ * it was empty, thus was not substituted for the containing
+ * model group. Just do nothing in this case.
+ * TODO: But the group should be substituted and not occur at
+ * all in the content model at this point. Fix this.
+ */
+ ret = 1;
+ break;
+ default:
+ xmlSchemaInternalErr2(ACTXT_CAST pctxt,
+ "xmlSchemaBuildAContentModel",
+ "found unexpected term of type '%s' in content model",
+ WXS_ITEM_TYPE_NAME(particle->children), NULL);
+ return(ret);
+ }
+ return(ret);
+}
+
+/**
+ * xmlSchemaBuildContentModel:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ * @name: the element name
+ *
+ * Builds the content model of the complex type.
+ */
+static void
+xmlSchemaBuildContentModel(xmlSchemaTypePtr type,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if ((type->type != XML_SCHEMA_TYPE_COMPLEX) ||
+ (type->contModel != NULL) ||
+ ((type->contentType != XML_SCHEMA_CONTENT_ELEMENTS) &&
+ (type->contentType != XML_SCHEMA_CONTENT_MIXED)))
+ return;
+
+#ifdef DEBUG_CONTENT
+ xmlGenericError(xmlGenericErrorContext,
+ "Building content model for %s\n", name);
+#endif
+ ctxt->am = NULL;
+ ctxt->am = xmlNewAutomata();
+ if (ctxt->am == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Cannot create automata for complex type %s\n", type->name);
+ return;
+ }
+ ctxt->state = xmlAutomataGetInitState(ctxt->am);
+ /*
+ * Build the automaton.
+ */
+ xmlSchemaBuildAContentModel(ctxt, WXS_TYPE_PARTICLE(type));
+ xmlAutomataSetFinalState(ctxt->am, ctxt->state);
+ type->contModel = xmlAutomataCompile(ctxt->am);
+ if (type->contModel == NULL) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_INTERNAL,
+ WXS_BASIC_CAST type, type->node,
+ "Failed to compile the content model", NULL);
+ } else if (xmlRegexpIsDeterminist(type->contModel) != 1) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_NOT_DETERMINISTIC,
+ /* XML_SCHEMAS_ERR_NOTDETERMINIST, */
+ WXS_BASIC_CAST type, type->node,
+ "The content model is not determinist", NULL);
+ } else {
+#ifdef DEBUG_CONTENT_REGEXP
+ xmlGenericError(xmlGenericErrorContext,
+ "Content model of %s:\n", type->name);
+ xmlRegexpPrint(stderr, type->contModel);
+#endif
+ }
+ ctxt->state = NULL;
+ xmlFreeAutomata(ctxt->am);
+ ctxt->am = NULL;
+}
+
+/**
+ * xmlSchemaResolveElementReferences:
+ * @elem: the schema element context
+ * @ctxt: the schema parser context
+ *
+ * Resolves the references of an element declaration
+ * or particle, which has an element declaration as it's
+ * term.
+ */
+static void
+xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if ((ctxt == NULL) || (elemDecl == NULL) ||
+ ((elemDecl != NULL) &&
+ (elemDecl->flags & XML_SCHEMAS_ELEM_INTERNAL_RESOLVED)))
+ return;
+ elemDecl->flags |= XML_SCHEMAS_ELEM_INTERNAL_RESOLVED;
+
+ if ((elemDecl->subtypes == NULL) && (elemDecl->namedType != NULL)) {
+ xmlSchemaTypePtr type;
+
+ /* (type definition) ... otherwise the type definition `resolved`
+ * to by the `actual value` of the type [attribute] ...
+ */
+ type = xmlSchemaGetType(ctxt->schema, elemDecl->namedType,
+ elemDecl->namedTypeNs);
+ if (type == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST elemDecl, elemDecl->node,
+ "type", elemDecl->namedType, elemDecl->namedTypeNs,
+ XML_SCHEMA_TYPE_BASIC, "type definition");
+ } else
+ elemDecl->subtypes = type;
+ }
+ if (elemDecl->substGroup != NULL) {
+ xmlSchemaElementPtr substHead;
+
+ /*
+ * FIXME TODO: Do we need a new field in _xmlSchemaElement for
+ * substitutionGroup?
+ */
+ substHead = xmlSchemaGetElem(ctxt->schema, elemDecl->substGroup,
+ elemDecl->substGroupNs);
+ if (substHead == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST elemDecl, NULL,
+ "substitutionGroup", elemDecl->substGroup,
+ elemDecl->substGroupNs, XML_SCHEMA_TYPE_ELEMENT, NULL);
+ } else {
+ xmlSchemaResolveElementReferences(substHead, ctxt);
+ /*
+ * Set the "substitution group affiliation".
+ * NOTE that now we use the "refDecl" field for this.
+ */
+ WXS_SUBST_HEAD(elemDecl) = substHead;
+ /*
+ * The type definitions is set to:
+ * SPEC "...the {type definition} of the element
+ * declaration `resolved` to by the `actual value`
+ * of the substitutionGroup [attribute], if present"
+ */
+ if (elemDecl->subtypes == NULL)
+ elemDecl->subtypes = substHead->subtypes;
+ }
+ }
+ /*
+ * SPEC "The definition of anyType serves as the default type definition
+ * for element declarations whose XML representation does not specify one."
+ */
+ if ((elemDecl->subtypes == NULL) &&
+ (elemDecl->namedType == NULL) &&
+ (elemDecl->substGroup == NULL))
+ elemDecl->subtypes = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
+}
+
+/**
+ * xmlSchemaResolveUnionMemberTypes:
+ * @ctxt: the schema parser context
+ * @type: the schema simple type definition
+ *
+ * Checks and builds the "member type definitions" property of the union
+ * simple type. This handles part (1), part (2) is done in
+ * xmlSchemaFinishMemberTypeDefinitionsProperty()
+ *
+ * Returns -1 in case of an internal error, 0 otherwise.
+ */
+static int
+xmlSchemaResolveUnionMemberTypes(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+
+ xmlSchemaTypeLinkPtr link, lastLink, newLink;
+ xmlSchemaTypePtr memberType;
+
+ /*
+ * SPEC (1) "If the <union> alternative is chosen, then [Definition:]
+ * define the explicit members as the type definitions `resolved`
+ * to by the items in the `actual value` of the memberTypes [attribute],
+ * if any, followed by the type definitions corresponding to the
+ * <simpleType>s among the [children] of <union>, if any."
+ */
+ /*
+ * Resolve references.
+ */
+ link = type->memberTypes;
+ lastLink = NULL;
+ while (link != NULL) {
+ const xmlChar *name, *nsName;
+
+ name = ((xmlSchemaQNameRefPtr) link->type)->name;
+ nsName = ((xmlSchemaQNameRefPtr) link->type)->targetNamespace;
+
+ memberType = xmlSchemaGetType(ctxt->schema, name, nsName);
+ if ((memberType == NULL) || (! WXS_IS_SIMPLE(memberType))) {
+ xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST type, type->node, "memberTypes",
+ name, nsName, XML_SCHEMA_TYPE_SIMPLE, NULL);
+ /*
+ * Remove the member type link.
+ */
+ if (lastLink == NULL)
+ type->memberTypes = link->next;
+ else
+ lastLink->next = link->next;
+ newLink = link;
+ link = link->next;
+ xmlFree(newLink);
+ } else {
+ link->type = memberType;
+ lastLink = link;
+ link = link->next;
+ }
+ }
+ /*
+ * Add local simple types,
+ */
+ memberType = type->subtypes;
+ while (memberType != NULL) {
+ link = (xmlSchemaTypeLinkPtr) xmlMalloc(sizeof(xmlSchemaTypeLink));
+ if (link == NULL) {
+ xmlSchemaPErrMemory(ctxt, "allocating a type link", NULL);
+ return (-1);
+ }
+ link->type = memberType;
+ link->next = NULL;
+ if (lastLink == NULL)
+ type->memberTypes = link;
+ else
+ lastLink->next = link;
+ lastLink = link;
+ memberType = memberType->next;
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaIsDerivedFromBuiltInType:
+ * @ctxt: the schema parser context
+ * @type: the type definition
+ * @valType: the value type
+ *
+ *
+ * Returns 1 if the type has the given value type, or
+ * is derived from such a type.
+ */
+static int
+xmlSchemaIsDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType)
+{
+ if (type == NULL)
+ return (0);
+ if (WXS_IS_COMPLEX(type))
+ return (0);
+ if (type->type == XML_SCHEMA_TYPE_BASIC) {
+ if (type->builtInType == valType)
+ return(1);
+ if ((type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) ||
+ (type->builtInType == XML_SCHEMAS_ANYTYPE))
+ return (0);
+ return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
+ }
+ return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
+}
+
+#if 0
+/**
+ * xmlSchemaIsDerivedFromBuiltInType:
+ * @ctxt: the schema parser context
+ * @type: the type definition
+ * @valType: the value type
+ *
+ *
+ * Returns 1 if the type has the given value type, or
+ * is derived from such a type.
+ */
+static int
+xmlSchemaIsUserDerivedFromBuiltInType(xmlSchemaTypePtr type, int valType)
+{
+ if (type == NULL)
+ return (0);
+ if (WXS_IS_COMPLEX(type))
+ return (0);
+ if (type->type == XML_SCHEMA_TYPE_BASIC) {
+ if (type->builtInType == valType)
+ return(1);
+ return (0);
+ } else
+ return(xmlSchemaIsDerivedFromBuiltInType(type->subtypes, valType));
+
+ return (0);
+}
+
+static xmlSchemaTypePtr
+xmlSchemaQueryBuiltInType(xmlSchemaTypePtr type)
+{
+ if (type == NULL)
+ return (NULL);
+ if (WXS_IS_COMPLEX(type))
+ return (NULL);
+ if (type->type == XML_SCHEMA_TYPE_BASIC)
+ return(type);
+ return(xmlSchemaQueryBuiltInType(type->subtypes));
+}
+#endif
+
+/**
+ * xmlSchemaGetPrimitiveType:
+ * @type: the simpleType definition
+ *
+ * Returns the primitive type of the given type or
+ * NULL in case of error.
+ */
+static xmlSchemaTypePtr
+xmlSchemaGetPrimitiveType(xmlSchemaTypePtr type)
+{
+
+ while (type != NULL) {
+ /*
+ * Note that anySimpleType is actually not a primitive type
+ * but we need that here.
+ */
+ if ((type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) ||
+ (type->flags & XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE))
+ return (type);
+ type = type->baseType;
+ }
+
+ return (NULL);
+}
+
+#if 0
+/**
+ * xmlSchemaGetBuiltInTypeAncestor:
+ * @type: the simpleType definition
+ *
+ * Returns the primitive type of the given type or
+ * NULL in case of error.
+ */
+static xmlSchemaTypePtr
+xmlSchemaGetBuiltInTypeAncestor(xmlSchemaTypePtr type)
+{
+ if (WXS_IS_LIST(type) || WXS_IS_UNION(type))
+ return (0);
+ while (type != NULL) {
+ if (type->type == XML_SCHEMA_TYPE_BASIC)
+ return (type);
+ type = type->baseType;
+ }
+
+ return (NULL);
+}
+#endif
+
+/**
+ * xmlSchemaCloneWildcardNsConstraints:
+ * @ctxt: the schema parser context
+ * @dest: the destination wildcard
+ * @source: the source wildcard
+ *
+ * Clones the namespace constraints of source
+ * and assignes them to dest.
+ * Returns -1 on internal error, 0 otherwise.
+ */
+static int
+xmlSchemaCloneWildcardNsConstraints(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaWildcardPtr dest,
+ xmlSchemaWildcardPtr source)
+{
+ xmlSchemaWildcardNsPtr cur, tmp, last;
+
+ if ((source == NULL) || (dest == NULL))
+ return(-1);
+ dest->any = source->any;
+ cur = source->nsSet;
+ last = NULL;
+ while (cur != NULL) {
+ tmp = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (tmp == NULL)
+ return(-1);
+ tmp->value = cur->value;
+ if (last == NULL)
+ dest->nsSet = tmp;
+ else
+ last->next = tmp;
+ last = tmp;
+ cur = cur->next;
+ }
+ if (dest->negNsSet != NULL)
+ xmlSchemaFreeWildcardNsSet(dest->negNsSet);
+ if (source->negNsSet != NULL) {
+ dest->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (dest->negNsSet == NULL)
+ return(-1);
+ dest->negNsSet->value = source->negNsSet->value;
+ } else
+ dest->negNsSet = NULL;
+ return(0);
+}
+
+/**
+ * xmlSchemaUnionWildcards:
+ * @ctxt: the schema parser context
+ * @completeWild: the first wildcard
+ * @curWild: the second wildcard
+ *
+ * Unions the namespace constraints of the given wildcards.
+ * @completeWild will hold the resulting union.
+ * Returns a positive error code on failure, -1 in case of an
+ * internal error, 0 otherwise.
+ */
+static int
+xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaWildcardPtr completeWild,
+ xmlSchemaWildcardPtr curWild)
+{
+ xmlSchemaWildcardNsPtr cur, curB, tmp;
+
+ /*
+ * 1 If O1 and O2 are the same value, then that value must be the
+ * value.
+ */
+ if ((completeWild->any == curWild->any) &&
+ ((completeWild->nsSet == NULL) == (curWild->nsSet == NULL)) &&
+ ((completeWild->negNsSet == NULL) == (curWild->negNsSet == NULL))) {
+
+ if ((completeWild->negNsSet == NULL) ||
+ (completeWild->negNsSet->value == curWild->negNsSet->value)) {
+
+ if (completeWild->nsSet != NULL) {
+ int found = 0;
+
+ /*
+ * Check equality of sets.
+ */
+ cur = completeWild->nsSet;
+ while (cur != NULL) {
+ found = 0;
+ curB = curWild->nsSet;
+ while (curB != NULL) {
+ if (cur->value == curB->value) {
+ found = 1;
+ break;
+ }
+ curB = curB->next;
+ }
+ if (!found)
+ break;
+ cur = cur->next;
+ }
+ if (found)
+ return(0);
+ } else
+ return(0);
+ }
+ }
+ /*
+ * 2 If either O1 or O2 is any, then any must be the value
+ */
+ if (completeWild->any != curWild->any) {
+ if (completeWild->any == 0) {
+ completeWild->any = 1;
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ if (completeWild->negNsSet != NULL) {
+ xmlFree(completeWild->negNsSet);
+ completeWild->negNsSet = NULL;
+ }
+ }
+ return (0);
+ }
+ /*
+ * 3 If both O1 and O2 are sets of (namespace names or `absent`),
+ * then the union of those sets must be the value.
+ */
+ if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
+ int found;
+ xmlSchemaWildcardNsPtr start;
+
+ cur = curWild->nsSet;
+ start = completeWild->nsSet;
+ while (cur != NULL) {
+ found = 0;
+ curB = start;
+ while (curB != NULL) {
+ if (cur->value == curB->value) {
+ found = 1;
+ break;
+ }
+ curB = curB->next;
+ }
+ if (!found) {
+ tmp = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (tmp == NULL)
+ return (-1);
+ tmp->value = cur->value;
+ tmp->next = completeWild->nsSet;
+ completeWild->nsSet = tmp;
+ }
+ cur = cur->next;
+ }
+
+ return(0);
+ }
+ /*
+ * 4 If the two are negations of different values (namespace names
+ * or `absent`), then a pair of not and `absent` must be the value.
+ */
+ if ((completeWild->negNsSet != NULL) &&
+ (curWild->negNsSet != NULL) &&
+ (completeWild->negNsSet->value != curWild->negNsSet->value)) {
+ completeWild->negNsSet->value = NULL;
+
+ return(0);
+ }
+ /*
+ * 5.
+ */
+ if (((completeWild->negNsSet != NULL) &&
+ (completeWild->negNsSet->value != NULL) &&
+ (curWild->nsSet != NULL)) ||
+ ((curWild->negNsSet != NULL) &&
+ (curWild->negNsSet->value != NULL) &&
+ (completeWild->nsSet != NULL))) {
+
+ int nsFound, absentFound = 0;
+
+ if (completeWild->nsSet != NULL) {
+ cur = completeWild->nsSet;
+ curB = curWild->negNsSet;
+ } else {
+ cur = curWild->nsSet;
+ curB = completeWild->negNsSet;
+ }
+ nsFound = 0;
+ while (cur != NULL) {
+ if (cur->value == NULL)
+ absentFound = 1;
+ else if (cur->value == curB->value)
+ nsFound = 1;
+ if (nsFound && absentFound)
+ break;
+ cur = cur->next;
+ }
+
+ if (nsFound && absentFound) {
+ /*
+ * 5.1 If the set S includes both the negated namespace
+ * name and `absent`, then any must be the value.
+ */
+ completeWild->any = 1;
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ if (completeWild->negNsSet != NULL) {
+ xmlFree(completeWild->negNsSet);
+ completeWild->negNsSet = NULL;
+ }
+ } else if (nsFound && (!absentFound)) {
+ /*
+ * 5.2 If the set S includes the negated namespace name
+ * but not `absent`, then a pair of not and `absent` must
+ * be the value.
+ */
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ if (completeWild->negNsSet == NULL) {
+ completeWild->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (completeWild->negNsSet == NULL)
+ return (-1);
+ }
+ completeWild->negNsSet->value = NULL;
+ } else if ((!nsFound) && absentFound) {
+ /*
+ * 5.3 If the set S includes `absent` but not the negated
+ * namespace name, then the union is not expressible.
+ */
+ xmlSchemaPErr(ctxt, completeWild->node,
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE,
+ "The union of the wilcard is not expressible.\n",
+ NULL, NULL);
+ return(XML_SCHEMAP_UNION_NOT_EXPRESSIBLE);
+ } else if ((!nsFound) && (!absentFound)) {
+ /*
+ * 5.4 If the set S does not include either the negated namespace
+ * name or `absent`, then whichever of O1 or O2 is a pair of not
+ * and a namespace name must be the value.
+ */
+ if (completeWild->negNsSet == NULL) {
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ completeWild->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (completeWild->negNsSet == NULL)
+ return (-1);
+ completeWild->negNsSet->value = curWild->negNsSet->value;
+ }
+ }
+ return (0);
+ }
+ /*
+ * 6.
+ */
+ if (((completeWild->negNsSet != NULL) &&
+ (completeWild->negNsSet->value == NULL) &&
+ (curWild->nsSet != NULL)) ||
+ ((curWild->negNsSet != NULL) &&
+ (curWild->negNsSet->value == NULL) &&
+ (completeWild->nsSet != NULL))) {
+
+ if (completeWild->nsSet != NULL) {
+ cur = completeWild->nsSet;
+ } else {
+ cur = curWild->nsSet;
+ }
+ while (cur != NULL) {
+ if (cur->value == NULL) {
+ /*
+ * 6.1 If the set S includes `absent`, then any must be the
+ * value.
+ */
+ completeWild->any = 1;
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ if (completeWild->negNsSet != NULL) {
+ xmlFree(completeWild->negNsSet);
+ completeWild->negNsSet = NULL;
+ }
+ return (0);
+ }
+ cur = cur->next;
+ }
+ if (completeWild->negNsSet == NULL) {
+ /*
+ * 6.2 If the set S does not include `absent`, then a pair of not
+ * and `absent` must be the value.
+ */
+ if (completeWild->nsSet != NULL) {
+ xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
+ completeWild->nsSet = NULL;
+ }
+ completeWild->negNsSet = xmlSchemaNewWildcardNsConstraint(ctxt);
+ if (completeWild->negNsSet == NULL)
+ return (-1);
+ completeWild->negNsSet->value = NULL;
+ }
+ return (0);
+ }
+ return (0);
+
+}
+
+/**
+ * xmlSchemaIntersectWildcards:
+ * @ctxt: the schema parser context
+ * @completeWild: the first wildcard
+ * @curWild: the second wildcard
+ *
+ * Intersects the namespace constraints of the given wildcards.
+ * @completeWild will hold the resulting intersection.
+ * Returns a positive error code on failure, -1 in case of an
+ * internal error, 0 otherwise.
+ */
+static int
+xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaWildcardPtr completeWild,
+ xmlSchemaWildcardPtr curWild)
+{
+ xmlSchemaWildcardNsPtr cur, curB, prev, tmp;
+
+ /*
+ * 1 If O1 and O2 are the same value, then that value must be the
+ * value.
+ */
+ if ((completeWild->any == curWild->any) &&
+ ((completeWild->nsSet == NULL) == (curWild->nsSet == NULL)) &&
+ ((completeWild->negNsSet == NULL) == (curWild->negNsSet == NULL))) {
+
+ if ((completeWild->negNsSet == NULL) ||
+ (completeWild->negNsSet->value == curWild->negNsSet->value)) {
+
+ if (completeWild->nsSet != NULL) {
+ int found = 0;
+
+ /*
+ * Check equality of sets.
+ */
+ cur = completeWild->nsSet;
+ while (cur != NULL) {
+ found = 0;
+ curB = curWild->nsSet;
+ while (curB != NULL) {
+ if (cur->value == curB->value) {
+ found = 1;
+ break;
+ }
+ curB = curB->next;
+ }
+ if (!found)
+ break;
+ cur = cur->next;
+ }
+ if (found)
+ return(0);
+ } else
+ return(0);
+ }
+ }
+ /*
+ * 2 If either O1 or O2 is any, then the other must be the value.
+ */
+ if ((completeWild->any != curWild->any) && (completeWild->any)) {
+ if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1)
+ return(-1);
+ return(0);
+ }
+ /*
+ * 3 If either O1 or O2 is a pair of not and a value (a namespace
+ * name or `absent`) and the other is a set of (namespace names or
+ * `absent`), then that set, minus the negated value if it was in
+ * the set, minus `absent` if it was in the set, must be the value.
+ */
+ if (((completeWild->negNsSet != NULL) && (curWild->nsSet != NULL)) ||
+ ((curWild->negNsSet != NULL) && (completeWild->nsSet != NULL))) {
+ const xmlChar *neg;
+
+ if (completeWild->nsSet == NULL) {
+ neg = completeWild->negNsSet->value;
+ if (xmlSchemaCloneWildcardNsConstraints(ctxt, completeWild, curWild) == -1)
+ return(-1);
+ } else
+ neg = curWild->negNsSet->value;
+ /*
+ * Remove absent and negated.
+ */
+ prev = NULL;
+ cur = completeWild->nsSet;
+ while (cur != NULL) {
+ if (cur->value == NULL) {
+ if (prev == NULL)
+ completeWild->nsSet = cur->next;
+ else
+ prev->next = cur->next;
+ xmlFree(cur);
+ break;
+ }
+ prev = cur;
+ cur = cur->next;
+ }
+ if (neg != NULL) {
+ prev = NULL;
+ cur = completeWild->nsSet;
+ while (cur != NULL) {
+ if (cur->value == neg) {
+ if (prev == NULL)
+ completeWild->nsSet = cur->next;
+ else
+ prev->next = cur->next;
+ xmlFree(cur);
+ break;
+ }
+ prev = cur;
+ cur = cur->next;
+ }
+ }
+
+ return(0);
+ }
+ /*
+ * 4 If both O1 and O2 are sets of (namespace names or `absent`),
+ * then the intersection of those sets must be the value.
+ */
+ if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
+ int found;
+
+ cur = completeWild->nsSet;
+ prev = NULL;
+ while (cur != NULL) {
+ found = 0;
+ curB = curWild->nsSet;
+ while (curB != NULL) {
+ if (cur->value == curB->value) {
+ found = 1;
+ break;
+ }
+ curB = curB->next;
+ }
+ if (!found) {
+ if (prev == NULL)
+ completeWild->nsSet = cur->next;
+ else
+ prev->next = cur->next;
+ tmp = cur->next;
+ xmlFree(cur);
+ cur = tmp;
+ continue;
+ }
+ prev = cur;
+ cur = cur->next;
+ }
+
+ return(0);
+ }
+ /* 5 If the two are negations of different namespace names,
+ * then the intersection is not expressible
+ */
+ if ((completeWild->negNsSet != NULL) &&
+ (curWild->negNsSet != NULL) &&
+ (completeWild->negNsSet->value != curWild->negNsSet->value) &&
+ (completeWild->negNsSet->value != NULL) &&
+ (curWild->negNsSet->value != NULL)) {
+
+ xmlSchemaPErr(ctxt, completeWild->node, XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE,
+ "The intersection of the wilcard is not expressible.\n",
+ NULL, NULL);
+ return(XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE);
+ }
+ /*
+ * 6 If the one is a negation of a namespace name and the other
+ * is a negation of `absent`, then the one which is the negation
+ * of a namespace name must be the value.
+ */
+ if ((completeWild->negNsSet != NULL) && (curWild->negNsSet != NULL) &&
+ (completeWild->negNsSet->value != curWild->negNsSet->value) &&
+ (completeWild->negNsSet->value == NULL)) {
+ completeWild->negNsSet->value = curWild->negNsSet->value;
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaIsWildcardNsConstraintSubset:
+ * @ctxt: the schema parser context
+ * @sub: the first wildcard
+ * @super: the second wildcard
+ *
+ * Schema Component Constraint: Wildcard Subset (cos-ns-subset)
+ *
+ * Returns 0 if the namespace constraint of @sub is an intensional
+ * subset of @super, 1 otherwise.
+ */
+static int
+xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub,
+ xmlSchemaWildcardPtr super)
+{
+ /*
+ * 1 super must be any.
+ */
+ if (super->any)
+ return (0);
+ /*
+ * 2.1 sub must be a pair of not and a namespace name or `absent`.
+ * 2.2 super must be a pair of not and the same value.
+ */
+ if ((sub->negNsSet != NULL) &&
+ (super->negNsSet != NULL) &&
+ (sub->negNsSet->value == super->negNsSet->value))
+ return (0);
+ /*
+ * 3.1 sub must be a set whose members are either namespace names or `absent`.
+ */
+ if (sub->nsSet != NULL) {
+ /*
+ * 3.2.1 super must be the same set or a superset thereof.
+ */
+ if (super->nsSet != NULL) {
+ xmlSchemaWildcardNsPtr cur, curB;
+ int found = 0;
+
+ cur = sub->nsSet;
+ while (cur != NULL) {
+ found = 0;
+ curB = super->nsSet;
+ while (curB != NULL) {
+ if (cur->value == curB->value) {
+ found = 1;
+ break;
+ }
+ curB = curB->next;
+ }
+ if (!found)
+ return (1);
+ cur = cur->next;
+ }
+ if (found)
+ return (0);
+ } else if (super->negNsSet != NULL) {
+ xmlSchemaWildcardNsPtr cur;
+ /*
+ * 3.2.2 super must be a pair of not and a namespace name or
+ * `absent` and that value must not be in sub's set.
+ */
+ cur = sub->nsSet;
+ while (cur != NULL) {
+ if (cur->value == super->negNsSet->value)
+ return (1);
+ cur = cur->next;
+ }
+ return (0);
+ }
+ }
+ return (1);
+}
+
+static int
+xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributeUsePtr attruse,
+ int *fixed,
+ const xmlChar **value,
+ xmlSchemaValPtr *val)
+{
+ *fixed = 0;
+ *value = NULL;
+ if (val != 0)
+ *val = NULL;
+
+ if (attruse->defValue != NULL) {
+ *value = attruse->defValue;
+ if (val != NULL)
+ *val = attruse->defVal;
+ if (attruse->flags & XML_SCHEMA_ATTR_USE_FIXED)
+ *fixed = 1;
+ return(1);
+ } else if ((attruse->attrDecl != NULL) &&
+ (attruse->attrDecl->defValue != NULL)) {
+ *value = attruse->attrDecl->defValue;
+ if (val != NULL)
+ *val = attruse->attrDecl->defVal;
+ if (attruse->attrDecl->flags & XML_SCHEMAS_ATTR_FIXED)
+ *fixed = 1;
+ return(1);
+ }
+ return(0);
+}
+/**
+ * xmlSchemaCheckCVCWildcardNamespace:
+ * @wild: the wildcard
+ * @ns: the namespace
+ *
+ * Validation Rule: Wildcard allows Namespace Name
+ * (cvc-wildcard-namespace)
+ *
+ * Returns 0 if the given namespace matches the wildcard,
+ * 1 otherwise and -1 on API errors.
+ */
+static int
+xmlSchemaCheckCVCWildcardNamespace(xmlSchemaWildcardPtr wild,
+ const xmlChar* ns)
+{
+ if (wild == NULL)
+ return(-1);
+
+ if (wild->any)
+ return(0);
+ else if (wild->nsSet != NULL) {
+ xmlSchemaWildcardNsPtr cur;
+
+ cur = wild->nsSet;
+ while (cur != NULL) {
+ if (xmlStrEqual(cur->value, ns))
+ return(0);
+ cur = cur->next;
+ }
+ } else if ((wild->negNsSet != NULL) && (ns != NULL) &&
+ (!xmlStrEqual(wild->negNsSet->value, ns)))
+ return(0);
+
+ return(1);
+}
+
+#define XML_SCHEMA_ACTION_DERIVE 0
+#define XML_SCHEMA_ACTION_REDEFINE 1
+
+#define WXS_ACTION_STR(a) \
+((a) == XML_SCHEMA_ACTION_DERIVE) ? (const xmlChar *) "base" : (const xmlChar *) "redefined"
+
+/*
+* Schema Component Constraint:
+* Derivation Valid (Restriction, Complex)
+* derivation-ok-restriction (2) - (4)
+*
+* ATTENTION:
+* In XML Schema 1.1 this will be:
+* Validation Rule:
+* Checking complex type subsumption (practicalSubsumption) (1, 2 and 3)
+*
+*/
+static int
+xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
+ int action,
+ xmlSchemaBasicItemPtr item,
+ xmlSchemaBasicItemPtr baseItem,
+ xmlSchemaItemListPtr uses,
+ xmlSchemaItemListPtr baseUses,
+ xmlSchemaWildcardPtr wild,
+ xmlSchemaWildcardPtr baseWild)
+{
+ xmlSchemaAttributeUsePtr cur = NULL, bcur;
+ int i, j, found; /* err = 0; */
+ const xmlChar *bEffValue;
+ int effFixed;
+
+ if (uses != NULL) {
+ for (i = 0; i < uses->nbItems; i++) {
+ cur = uses->items[i];
+ found = 0;
+ if (baseUses == NULL)
+ goto not_found;
+ for (j = 0; j < baseUses->nbItems; j++) {
+ bcur = baseUses->items[j];
+ if ((WXS_ATTRUSE_DECL_NAME(cur) ==
+ WXS_ATTRUSE_DECL_NAME(bcur)) &&
+ (WXS_ATTRUSE_DECL_TNS(cur) ==
+ WXS_ATTRUSE_DECL_TNS(bcur)))
+ {
+ /*
+ * (2.1) "If there is an attribute use in the {attribute
+ * uses} of the {base type definition} (call this B) whose
+ * {attribute declaration} has the same {name} and {target
+ * namespace}, then all of the following must be true:"
+ */
+ found = 1;
+
+ if ((cur->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
+ (bcur->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED))
+ {
+ xmlChar *str = NULL;
+ /*
+ * (2.1.1) "one of the following must be true:"
+ * (2.1.1.1) "B's {required} is false."
+ * (2.1.1.2) "R's {required} is true."
+ */
+ xmlSchemaPAttrUseErr4(pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1,
+ WXS_ITEM_NODE(item), item, cur,
+ "The 'optional' attribute use is inconsistent "
+ "with the corresponding 'required' attribute use of "
+ "the %s %s",
+ WXS_ACTION_STR(action),
+ xmlSchemaGetComponentDesignation(&str, baseItem),
+ NULL, NULL);
+ FREE_AND_NULL(str);
+ /* err = pctxt->err; */
+ } else if (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
+ WXS_ATTRUSE_TYPEDEF(cur),
+ WXS_ATTRUSE_TYPEDEF(bcur), 0) != 0)
+ {
+ xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
+
+ /*
+ * SPEC (2.1.2) "R's {attribute declaration}'s
+ * {type definition} must be validly derived from
+ * B's {type definition} given the empty set as
+ * defined in Type Derivation OK (Simple) ($3.14.6)."
+ */
+ xmlSchemaPAttrUseErr4(pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2,
+ WXS_ITEM_NODE(item), item, cur,
+ "The attribute declaration's %s "
+ "is not validly derived from "
+ "the corresponding %s of the "
+ "attribute declaration in the %s %s",
+ xmlSchemaGetComponentDesignation(&strA,
+ WXS_ATTRUSE_TYPEDEF(cur)),
+ xmlSchemaGetComponentDesignation(&strB,
+ WXS_ATTRUSE_TYPEDEF(bcur)),
+ WXS_ACTION_STR(action),
+ xmlSchemaGetComponentDesignation(&strC, baseItem));
+ /* xmlSchemaGetComponentDesignation(&str, baseItem), */
+ FREE_AND_NULL(strA);
+ FREE_AND_NULL(strB);
+ FREE_AND_NULL(strC);
+ /* err = pctxt->err; */
+ } else {
+ /*
+ * 2.1.3 [Definition:] Let the effective value
+ * constraint of an attribute use be its {value
+ * constraint}, if present, otherwise its {attribute
+ * declaration}'s {value constraint} .
+ */
+ xmlSchemaGetEffectiveValueConstraint(bcur,
+ &effFixed, &bEffValue, NULL);
+ /*
+ * 2.1.3 ... one of the following must be true
+ *
+ * 2.1.3.1 B's `effective value constraint` is
+ * `absent` or default.
+ */
+ if ((bEffValue != NULL) &&
+ (effFixed == 1)) {
+ const xmlChar *rEffValue = NULL;
+
+ xmlSchemaGetEffectiveValueConstraint(bcur,
+ &effFixed, &rEffValue, NULL);
+ /*
+ * 2.1.3.2 R's `effective value constraint` is
+ * fixed with the same string as B's.
+ * MAYBE TODO: Compare the computed values.
+ * Hmm, it says "same string" so
+ * string-equality might really be sufficient.
+ */
+ if ((effFixed == 0) ||
+ (! WXS_ARE_DEFAULT_STR_EQUAL(rEffValue, bEffValue)))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaPAttrUseErr4(pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3,
+ WXS_ITEM_NODE(item), item, cur,
+ "The effective value constraint of the "
+ "attribute use is inconsistent with "
+ "its correspondent in the %s %s",
+ WXS_ACTION_STR(action),
+ xmlSchemaGetComponentDesignation(&str,
+ baseItem),
+ NULL, NULL);
+ FREE_AND_NULL(str);
+ /* err = pctxt->err; */
+ }
+ }
+ }
+ break;
+ }
+ }
+not_found:
+ if (!found) {
+ /*
+ * (2.2) "otherwise the {base type definition} must have an
+ * {attribute wildcard} and the {target namespace} of the
+ * R's {attribute declaration} must be `valid` with respect
+ * to that wildcard, as defined in Wildcard allows Namespace
+ * Name ($3.10.4)."
+ */
+ if ((baseWild == NULL) ||
+ (xmlSchemaCheckCVCWildcardNamespace(baseWild,
+ (WXS_ATTRUSE_DECL(cur))->targetNamespace) != 0))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaPAttrUseErr4(pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2,
+ WXS_ITEM_NODE(item), item, cur,
+ "Neither a matching attribute use, "
+ "nor a matching wildcard exists in the %s %s",
+ WXS_ACTION_STR(action),
+ xmlSchemaGetComponentDesignation(&str, baseItem),
+ NULL, NULL);
+ FREE_AND_NULL(str);
+ /* err = pctxt->err; */
+ }
+ }
+ }
+ }
+ /*
+ * SPEC derivation-ok-restriction (3):
+ * (3) "For each attribute use in the {attribute uses} of the {base type
+ * definition} whose {required} is true, there must be an attribute
+ * use with an {attribute declaration} with the same {name} and
+ * {target namespace} as its {attribute declaration} in the {attribute
+ * uses} of the complex type definition itself whose {required} is true.
+ */
+ if (baseUses != NULL) {
+ for (j = 0; j < baseUses->nbItems; j++) {
+ bcur = baseUses->items[j];
+ if (bcur->occurs != XML_SCHEMAS_ATTR_USE_REQUIRED)
+ continue;
+ found = 0;
+ if (uses != NULL) {
+ for (i = 0; i < uses->nbItems; i++) {
+ cur = uses->items[i];
+ if ((WXS_ATTRUSE_DECL_NAME(cur) ==
+ WXS_ATTRUSE_DECL_NAME(bcur)) &&
+ (WXS_ATTRUSE_DECL_TNS(cur) ==
+ WXS_ATTRUSE_DECL_TNS(bcur))) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (!found) {
+ xmlChar *strA = NULL, *strB = NULL;
+
+ xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3,
+ NULL, item,
+ "A matching attribute use for the "
+ "'required' %s of the %s %s is missing",
+ xmlSchemaGetComponentDesignation(&strA, bcur),
+ WXS_ACTION_STR(action),
+ xmlSchemaGetComponentDesignation(&strB, baseItem),
+ NULL);
+ FREE_AND_NULL(strA);
+ FREE_AND_NULL(strB);
+ }
+ }
+ }
+ /*
+ * derivation-ok-restriction (4)
+ */
+ if (wild != NULL) {
+ /*
+ * (4) "If there is an {attribute wildcard}, all of the
+ * following must be true:"
+ */
+ if (baseWild == NULL) {
+ xmlChar *str = NULL;
+
+ /*
+ * (4.1) "The {base type definition} must also have one."
+ */
+ xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1,
+ NULL, item,
+ "The %s has an attribute wildcard, "
+ "but the %s %s '%s' does not have one",
+ WXS_ITEM_TYPE_NAME(item),
+ WXS_ACTION_STR(action),
+ WXS_ITEM_TYPE_NAME(baseItem),
+ xmlSchemaGetComponentQName(&str, baseItem));
+ FREE_AND_NULL(str);
+ return(pctxt->err);
+ } else if ((baseWild->any == 0) &&
+ xmlSchemaCheckCOSNSSubset(wild, baseWild))
+ {
+ xmlChar *str = NULL;
+ /*
+ * (4.2) "The complex type definition's {attribute wildcard}'s
+ * {namespace constraint} must be a subset of the {base type
+ * definition}'s {attribute wildcard}'s {namespace constraint},
+ * as defined by Wildcard Subset ($3.10.6)."
+ */
+ xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2,
+ NULL, item,
+ "The attribute wildcard is not a valid "
+ "subset of the wildcard in the %s %s '%s'",
+ WXS_ACTION_STR(action),
+ WXS_ITEM_TYPE_NAME(baseItem),
+ xmlSchemaGetComponentQName(&str, baseItem),
+ NULL);
+ FREE_AND_NULL(str);
+ return(pctxt->err);
+ }
+ /* 4.3 Unless the {base type definition} is the `ur-type
+ * definition`, the complex type definition's {attribute
+ * wildcard}'s {process contents} must be identical to or
+ * stronger than the {base type definition}'s {attribute
+ * wildcard}'s {process contents}, where strict is stronger
+ * than lax is stronger than skip.
+ */
+ if ((! WXS_IS_ANYTYPE(baseItem)) &&
+ (wild->processContents < baseWild->processContents)) {
+ xmlChar *str = NULL;
+ xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3,
+ NULL, baseItem,
+ "The {process contents} of the attribute wildcard is "
+ "weaker than the one in the %s %s '%s'",
+ WXS_ACTION_STR(action),
+ WXS_ITEM_TYPE_NAME(baseItem),
+ xmlSchemaGetComponentQName(&str, baseItem),
+ NULL);
+ FREE_AND_NULL(str)
+ return(pctxt->err);
+ }
+ }
+ return(0);
+}
+
+
+static int
+xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBasicItemPtr item,
+ xmlSchemaWildcardPtr *completeWild,
+ xmlSchemaItemListPtr list,
+ xmlSchemaItemListPtr prohibs);
+/**
+ * xmlSchemaFixupTypeAttributeUses:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ *
+ * Builds the wildcard and the attribute uses on the given complex type.
+ * Returns -1 if an internal error occurs, 0 otherwise.
+ *
+ * ATTENTION TODO: Experimantally this uses pointer comparisons for
+ * strings, so recheck this if we start to hardcode some schemata, since
+ * they might not be in the same dict.
+ * NOTE: It is allowed to "extend" the xs:anyType type.
+ */
+static int
+xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr baseType = NULL;
+ xmlSchemaAttributeUsePtr use;
+ xmlSchemaItemListPtr uses, baseUses, prohibs = NULL;
+
+ if (type->baseType == NULL) {
+ PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+ "no base type");
+ return (-1);
+ }
+ baseType = type->baseType;
+ if (WXS_IS_TYPE_NOT_FIXED(baseType))
+ if (xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt) == -1)
+ return(-1);
+
+ uses = type->attrUses;
+ baseUses = baseType->attrUses;
+ /*
+ * Expand attribute group references. And build the 'complete'
+ * wildcard, i.e. intersect multiple wildcards.
+ * Move attribute prohibitions into a separate list.
+ */
+ if (uses != NULL) {
+ if (WXS_IS_RESTRICTION(type)) {
+ /*
+ * This one will transfer all attr. prohibitions
+ * into pctxt->attrProhibs.
+ */
+ if (xmlSchemaExpandAttributeGroupRefs(pctxt,
+ WXS_BASIC_CAST type, &(type->attributeWildcard), uses,
+ pctxt->attrProhibs) == -1)
+ {
+ PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+ "failed to expand attributes");
+ }
+ if (pctxt->attrProhibs->nbItems != 0)
+ prohibs = pctxt->attrProhibs;
+ } else {
+ if (xmlSchemaExpandAttributeGroupRefs(pctxt,
+ WXS_BASIC_CAST type, &(type->attributeWildcard), uses,
+ NULL) == -1)
+ {
+ PERROR_INT("xmlSchemaFixupTypeAttributeUses",
+ "failed to expand attributes");
+ }
+ }
+ }
+ /*
+ * Inherit the attribute uses of the base type.
+ */
+ if (baseUses != NULL) {
+ int i, j;
+ xmlSchemaAttributeUseProhibPtr pro;
+
+ if (WXS_IS_RESTRICTION(type)) {
+ int usesCount;
+ xmlSchemaAttributeUsePtr tmp;
+
+ if (uses != NULL)
+ usesCount = uses->nbItems;
+ else
+ usesCount = 0;
+
+ /* Restriction. */
+ for (i = 0; i < baseUses->nbItems; i++) {
+ use = baseUses->items[i];
+ if (prohibs) {
+ /*
+ * Filter out prohibited uses.
+ */
+ for (j = 0; j < prohibs->nbItems; j++) {
+ pro = prohibs->items[j];
+ if ((WXS_ATTRUSE_DECL_NAME(use) == pro->name) &&
+ (WXS_ATTRUSE_DECL_TNS(use) ==
+ pro->targetNamespace))
+ {
+ goto inherit_next;
+ }
+ }
+ }
+ if (usesCount) {
+ /*
+ * Filter out existing uses.
+ */
+ for (j = 0; j < usesCount; j++) {
+ tmp = uses->items[j];
+ if ((WXS_ATTRUSE_DECL_NAME(use) ==
+ WXS_ATTRUSE_DECL_NAME(tmp)) &&
+ (WXS_ATTRUSE_DECL_TNS(use) ==
+ WXS_ATTRUSE_DECL_TNS(tmp)))
+ {
+ goto inherit_next;
+ }
+ }
+ }
+ if (uses == NULL) {
+ type->attrUses = xmlSchemaItemListCreate();
+ if (type->attrUses == NULL)
+ goto exit_failure;
+ uses = type->attrUses;
+ }
+ xmlSchemaItemListAddSize(uses, 2, use);
+inherit_next: {}
+ }
+ } else {
+ /* Extension. */
+ for (i = 0; i < baseUses->nbItems; i++) {
+ use = baseUses->items[i];
+ if (uses == NULL) {
+ type->attrUses = xmlSchemaItemListCreate();
+ if (type->attrUses == NULL)
+ goto exit_failure;
+ uses = type->attrUses;
+ }
+ xmlSchemaItemListAddSize(uses, baseUses->nbItems, use);
+ }
+ }
+ }
+ /*
+ * Shrink attr. uses.
+ */
+ if (uses) {
+ if (uses->nbItems == 0) {
+ xmlSchemaItemListFree(uses);
+ type->attrUses = NULL;
+ }
+ /*
+ * TODO: We could shrink the size of the array
+ * to fit the actual number of items.
+ */
+ }
+ /*
+ * Compute the complete wildcard.
+ */
+ if (WXS_IS_EXTENSION(type)) {
+ if (baseType->attributeWildcard != NULL) {
+ /*
+ * (3.2.2.1) "If the `base wildcard` is non-`absent`, then
+ * the appropriate case among the following:"
+ */
+ if (type->attributeWildcard != NULL) {
+ /*
+ * Union the complete wildcard with the base wildcard.
+ * SPEC {attribute wildcard}
+ * (3.2.2.1.2) "otherwise a wildcard whose {process contents}
+ * and {annotation} are those of the `complete wildcard`,
+ * and whose {namespace constraint} is the intensional union
+ * of the {namespace constraint} of the `complete wildcard`
+ * and of the `base wildcard`, as defined in Attribute
+ * Wildcard Union ($3.10.6)."
+ */
+ if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard,
+ baseType->attributeWildcard) == -1)
+ goto exit_failure;
+ } else {
+ /*
+ * (3.2.2.1.1) "If the `complete wildcard` is `absent`,
+ * then the `base wildcard`."
+ */
+ type->attributeWildcard = baseType->attributeWildcard;
+ }
+ } else {
+ /*
+ * (3.2.2.2) "otherwise (the `base wildcard` is `absent`) the
+ * `complete wildcard`"
+ * NOOP
+ */
+ }
+ } else {
+ /*
+ * SPEC {attribute wildcard}
+ * (3.1) "If the <restriction> alternative is chosen, then the
+ * `complete wildcard`;"
+ * NOOP
+ */
+ }
+
+ return (0);
+
+exit_failure:
+ return(-1);
+}
+
+/**
+ * xmlSchemaTypeFinalContains:
+ * @schema: the schema
+ * @type: the type definition
+ * @final: the final
+ *
+ * Evaluates if a type definition contains the given "final".
+ * This does take "finalDefault" into account as well.
+ *
+ * Returns 1 if the type does containt the given "final",
+ * 0 otherwise.
+ */
+static int
+xmlSchemaTypeFinalContains(xmlSchemaTypePtr type, int final)
+{
+ if (type == NULL)
+ return (0);
+ if (type->flags & final)
+ return (1);
+ else
+ return (0);
+}
+
+/**
+ * xmlSchemaGetUnionSimpleTypeMemberTypes:
+ * @type: the Union Simple Type
+ *
+ * Returns a list of member types of @type if existing,
+ * returns NULL otherwise.
+ */
+static xmlSchemaTypeLinkPtr
+xmlSchemaGetUnionSimpleTypeMemberTypes(xmlSchemaTypePtr type)
+{
+ while ((type != NULL) && (type->type == XML_SCHEMA_TYPE_SIMPLE)) {
+ if (type->memberTypes != NULL)
+ return (type->memberTypes);
+ else
+ type = type->baseType;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaGetParticleTotalRangeMin:
+ * @particle: the particle
+ *
+ * Schema Component Constraint: Effective Total Range
+ * (all and sequence) + (choice)
+ *
+ * Returns the minimun Effective Total Range.
+ */
+static int
+xmlSchemaGetParticleTotalRangeMin(xmlSchemaParticlePtr particle)
+{
+ if ((particle->children == NULL) ||
+ (particle->minOccurs == 0))
+ return (0);
+ if (particle->children->type == XML_SCHEMA_TYPE_CHOICE) {
+ int min = -1, cur;
+ xmlSchemaParticlePtr part =
+ (xmlSchemaParticlePtr) particle->children->children;
+
+ if (part == NULL)
+ return (0);
+ while (part != NULL) {
+ if ((part->children->type == XML_SCHEMA_TYPE_ELEMENT) ||
+ (part->children->type == XML_SCHEMA_TYPE_ANY))
+ cur = part->minOccurs;
+ else
+ cur = xmlSchemaGetParticleTotalRangeMin(part);
+ if (cur == 0)
+ return (0);
+ if ((min > cur) || (min == -1))
+ min = cur;
+ part = (xmlSchemaParticlePtr) part->next;
+ }
+ return (particle->minOccurs * min);
+ } else {
+ /* <all> and <sequence> */
+ int sum = 0;
+ xmlSchemaParticlePtr part =
+ (xmlSchemaParticlePtr) particle->children->children;
+
+ if (part == NULL)
+ return (0);
+ do {
+ if ((part->children->type == XML_SCHEMA_TYPE_ELEMENT) ||
+ (part->children->type == XML_SCHEMA_TYPE_ANY))
+ sum += part->minOccurs;
+ else
+ sum += xmlSchemaGetParticleTotalRangeMin(part);
+ part = (xmlSchemaParticlePtr) part->next;
+ } while (part != NULL);
+ return (particle->minOccurs * sum);
+ }
+}
+
+#if 0
+/**
+ * xmlSchemaGetParticleTotalRangeMax:
+ * @particle: the particle
+ *
+ * Schema Component Constraint: Effective Total Range
+ * (all and sequence) + (choice)
+ *
+ * Returns the maximum Effective Total Range.
+ */
+static int
+xmlSchemaGetParticleTotalRangeMax(xmlSchemaParticlePtr particle)
+{
+ if ((particle->children == NULL) ||
+ (particle->children->children == NULL))
+ return (0);
+ if (particle->children->type == XML_SCHEMA_TYPE_CHOICE) {
+ int max = -1, cur;
+ xmlSchemaParticlePtr part =
+ (xmlSchemaParticlePtr) particle->children->children;
+
+ for (; part != NULL; part = (xmlSchemaParticlePtr) part->next) {
+ if (part->children == NULL)
+ continue;
+ if ((part->children->type == XML_SCHEMA_TYPE_ELEMENT) ||
+ (part->children->type == XML_SCHEMA_TYPE_ANY))
+ cur = part->maxOccurs;
+ else
+ cur = xmlSchemaGetParticleTotalRangeMax(part);
+ if (cur == UNBOUNDED)
+ return (UNBOUNDED);
+ if ((max < cur) || (max == -1))
+ max = cur;
+ }
+ /* TODO: Handle overflows? */
+ return (particle->maxOccurs * max);
+ } else {
+ /* <all> and <sequence> */
+ int sum = 0, cur;
+ xmlSchemaParticlePtr part =
+ (xmlSchemaParticlePtr) particle->children->children;
+
+ for (; part != NULL; part = (xmlSchemaParticlePtr) part->next) {
+ if (part->children == NULL)
+ continue;
+ if ((part->children->type == XML_SCHEMA_TYPE_ELEMENT) ||
+ (part->children->type == XML_SCHEMA_TYPE_ANY))
+ cur = part->maxOccurs;
+ else
+ cur = xmlSchemaGetParticleTotalRangeMax(part);
+ if (cur == UNBOUNDED)
+ return (UNBOUNDED);
+ if ((cur > 0) && (particle->maxOccurs == UNBOUNDED))
+ return (UNBOUNDED);
+ sum += cur;
+ }
+ /* TODO: Handle overflows? */
+ return (particle->maxOccurs * sum);
+ }
+}
+#endif
+
+/**
+ * xmlSchemaIsParticleEmptiable:
+ * @particle: the particle
+ *
+ * Schema Component Constraint: Particle Emptiable
+ * Checks whether the given particle is emptiable.
+ *
+ * Returns 1 if emptiable, 0 otherwise.
+ */
+static int
+xmlSchemaIsParticleEmptiable(xmlSchemaParticlePtr particle)
+{
+ /*
+ * SPEC (1) "Its {min occurs} is 0."
+ */
+ if ((particle == NULL) || (particle->minOccurs == 0) ||
+ (particle->children == NULL))
+ return (1);
+ /*
+ * SPEC (2) "Its {term} is a group and the minimum part of the
+ * effective total range of that group, [...] is 0."
+ */
+ if (WXS_IS_MODEL_GROUP(particle->children)) {
+ if (xmlSchemaGetParticleTotalRangeMin(particle) == 0)
+ return (1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckCOSSTDerivedOK:
+ * @actxt: a context
+ * @type: the derived simple type definition
+ * @baseType: the base type definition
+ * @subset: the subset of ('restriction', ect.)
+ *
+ * Schema Component Constraint:
+ * Type Derivation OK (Simple) (cos-st-derived-OK)
+ *
+ * Checks wheter @type can be validly
+ * derived from @baseType.
+ *
+ * Returns 0 on success, an positive error code otherwise.
+ */
+static int
+xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+ xmlSchemaTypePtr type,
+ xmlSchemaTypePtr baseType,
+ int subset)
+{
+ /*
+ * 1 They are the same type definition.
+ * TODO: The identy check might have to be more complex than this.
+ */
+ if (type == baseType)
+ return (0);
+ /*
+ * 2.1 restriction is not in the subset, or in the {final}
+ * of its own {base type definition};
+ *
+ * NOTE that this will be used also via "xsi:type".
+ *
+ * TODO: Revise this, it looks strange. How can the "type"
+ * not be fixed or *in* fixing?
+ */
+ if (WXS_IS_TYPE_NOT_FIXED(type))
+ if (xmlSchemaTypeFixup(type, actxt) == -1)
+ return(-1);
+ if (WXS_IS_TYPE_NOT_FIXED(baseType))
+ if (xmlSchemaTypeFixup(baseType, actxt) == -1)
+ return(-1);
+ if ((subset & SUBSET_RESTRICTION) ||
+ (xmlSchemaTypeFinalContains(type->baseType,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION))) {
+ return (XML_SCHEMAP_COS_ST_DERIVED_OK_2_1);
+ }
+ /* 2.2 */
+ if (type->baseType == baseType) {
+ /*
+ * 2.2.1 D's `base type definition` is B.
+ */
+ return (0);
+ }
+ /*
+ * 2.2.2 D's `base type definition` is not the `ur-type definition`
+ * and is validly derived from B given the subset, as defined by this
+ * constraint.
+ */
+ if ((! WXS_IS_ANYTYPE(type->baseType)) &&
+ (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType,
+ baseType, subset) == 0)) {
+ return (0);
+ }
+ /*
+ * 2.2.3 D's {variety} is list or union and B is the `simple ur-type
+ * definition`.
+ */
+ if (WXS_IS_ANY_SIMPLE_TYPE(baseType) &&
+ (WXS_IS_LIST(type) || WXS_IS_UNION(type))) {
+ return (0);
+ }
+ /*
+ * 2.2.4 B's {variety} is union and D is validly derived from a type
+ * definition in B's {member type definitions} given the subset, as
+ * defined by this constraint.
+ *
+ * NOTE: This seems not to involve built-in types, since there is no
+ * built-in Union Simple Type.
+ */
+ if (WXS_IS_UNION(baseType)) {
+ xmlSchemaTypeLinkPtr cur;
+
+ cur = baseType->memberTypes;
+ while (cur != NULL) {
+ if (WXS_IS_TYPE_NOT_FIXED(cur->type))
+ if (xmlSchemaTypeFixup(cur->type, actxt) == -1)
+ return(-1);
+ if (xmlSchemaCheckCOSSTDerivedOK(actxt,
+ type, cur->type, subset) == 0)
+ {
+ /*
+ * It just has to be validly derived from at least one
+ * member-type.
+ */
+ return (0);
+ }
+ cur = cur->next;
+ }
+ }
+ return (XML_SCHEMAP_COS_ST_DERIVED_OK_2_2);
+}
+
+/**
+ * xmlSchemaCheckTypeDefCircularInternal:
+ * @pctxt: the schema parser context
+ * @ctxtType: the type definition
+ * @ancestor: an ancestor of @ctxtType
+ *
+ * Checks st-props-correct (2) + ct-props-correct (3).
+ * Circular type definitions are not allowed.
+ *
+ * Returns XML_SCHEMAP_ST_PROPS_CORRECT_2 if the given type is
+ * circular, 0 otherwise.
+ */
+static int
+xmlSchemaCheckTypeDefCircularInternal(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr ctxtType,
+ xmlSchemaTypePtr ancestor)
+{
+ int ret;
+
+ if ((ancestor == NULL) || (ancestor->type == XML_SCHEMA_TYPE_BASIC))
+ return (0);
+
+ if (ctxtType == ancestor) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_2,
+ WXS_BASIC_CAST ctxtType, WXS_ITEM_NODE(ctxtType),
+ "The definition is circular", NULL);
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_2);
+ }
+ if (ancestor->flags & XML_SCHEMAS_TYPE_MARKED) {
+ /*
+ * Avoid inifinite recursion on circular types not yet checked.
+ */
+ return (0);
+ }
+ ancestor->flags |= XML_SCHEMAS_TYPE_MARKED;
+ ret = xmlSchemaCheckTypeDefCircularInternal(pctxt, ctxtType,
+ ancestor->baseType);
+ ancestor->flags ^= XML_SCHEMAS_TYPE_MARKED;
+ return (ret);
+}
+
+/**
+ * xmlSchemaCheckTypeDefCircular:
+ * @item: the complex/simple type definition
+ * @ctxt: the parser context
+ * @name: the name
+ *
+ * Checks for circular type definitions.
+ */
+static void
+xmlSchemaCheckTypeDefCircular(xmlSchemaTypePtr item,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if ((item == NULL) ||
+ (item->type == XML_SCHEMA_TYPE_BASIC) ||
+ (item->baseType == NULL))
+ return;
+ xmlSchemaCheckTypeDefCircularInternal(ctxt, item,
+ item->baseType);
+}
+
+/*
+* Simple Type Definition Representation OK (src-simple-type) 4
+*
+* "4 Circular union type definition is disallowed. That is, if the
+* <union> alternative is chosen, there must not be any entries in the
+* memberTypes [attribute] at any depth which resolve to the component
+* corresponding to the <simpleType>."
+*
+* Note that this should work on the *representation* of a component,
+* thus assumes any union types in the member types not being yet
+* substituted. At this stage we need the variety of the types
+* to be already computed.
+*/
+static int
+xmlSchemaCheckUnionTypeDefCircularRecur(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr ctxType,
+ xmlSchemaTypeLinkPtr members)
+{
+ xmlSchemaTypeLinkPtr member;
+ xmlSchemaTypePtr memberType;
+
+ member = members;
+ while (member != NULL) {
+ memberType = member->type;
+ while ((memberType != NULL) &&
+ (memberType->type != XML_SCHEMA_TYPE_BASIC)) {
+ if (memberType == ctxType) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4,
+ WXS_BASIC_CAST ctxType, NULL,
+ "The union type definition is circular", NULL);
+ return (XML_SCHEMAP_SRC_SIMPLE_TYPE_4);
+ }
+ if ((WXS_IS_UNION(memberType)) &&
+ ((memberType->flags & XML_SCHEMAS_TYPE_MARKED) == 0))
+ {
+ int res;
+ memberType->flags |= XML_SCHEMAS_TYPE_MARKED;
+ res = xmlSchemaCheckUnionTypeDefCircularRecur(pctxt,
+ ctxType,
+ xmlSchemaGetUnionSimpleTypeMemberTypes(memberType));
+ memberType->flags ^= XML_SCHEMAS_TYPE_MARKED;
+ if (res != 0)
+ return(res);
+ }
+ memberType = memberType->baseType;
+ }
+ member = member->next;
+ }
+ return(0);
+}
+
+static int
+xmlSchemaCheckUnionTypeDefCircular(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ if (! WXS_IS_UNION(type))
+ return(0);
+ return(xmlSchemaCheckUnionTypeDefCircularRecur(pctxt, type,
+ type->memberTypes));
+}
+
+/**
+ * xmlSchemaResolveTypeReferences:
+ * @item: the complex/simple type definition
+ * @ctxt: the parser context
+ * @name: the name
+ *
+ * Resolvese type definition references
+ */
+static void
+xmlSchemaResolveTypeReferences(xmlSchemaTypePtr typeDef,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if (typeDef == NULL)
+ return;
+
+ /*
+ * Resolve the base type.
+ */
+ if (typeDef->baseType == NULL) {
+ typeDef->baseType = xmlSchemaGetType(ctxt->schema,
+ typeDef->base, typeDef->baseNs);
+ if (typeDef->baseType == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST typeDef, typeDef->node,
+ "base", typeDef->base, typeDef->baseNs,
+ XML_SCHEMA_TYPE_SIMPLE, NULL);
+ return;
+ }
+ }
+ if (WXS_IS_SIMPLE(typeDef)) {
+ if (WXS_IS_UNION(typeDef)) {
+ /*
+ * Resolve the memberTypes.
+ */
+ xmlSchemaResolveUnionMemberTypes(ctxt, typeDef);
+ return;
+ } else if (WXS_IS_LIST(typeDef)) {
+ /*
+ * Resolve the itemType.
+ */
+ if ((typeDef->subtypes == NULL) && (typeDef->base != NULL)) {
+
+ typeDef->subtypes = xmlSchemaGetType(ctxt->schema,
+ typeDef->base, typeDef->baseNs);
+
+ if ((typeDef->subtypes == NULL) ||
+ (! WXS_IS_SIMPLE(typeDef->subtypes)))
+ {
+ typeDef->subtypes = NULL;
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST typeDef, typeDef->node,
+ "itemType", typeDef->base, typeDef->baseNs,
+ XML_SCHEMA_TYPE_SIMPLE, NULL);
+ }
+ }
+ return;
+ }
+ }
+ /*
+ * The ball of letters below means, that if we have a particle
+ * which has a QName-helper component as its {term}, we want
+ * to resolve it...
+ */
+ else if ((WXS_TYPE_CONTENTTYPE(typeDef) != NULL) &&
+ ((WXS_TYPE_CONTENTTYPE(typeDef))->type ==
+ XML_SCHEMA_TYPE_PARTICLE) &&
+ (WXS_TYPE_PARTICLE_TERM(typeDef) != NULL) &&
+ ((WXS_TYPE_PARTICLE_TERM(typeDef))->type ==
+ XML_SCHEMA_EXTRA_QNAMEREF))
+ {
+ xmlSchemaQNameRefPtr ref =
+ WXS_QNAME_CAST WXS_TYPE_PARTICLE_TERM(typeDef);
+ xmlSchemaModelGroupDefPtr groupDef;
+
+ /*
+ * URGENT TODO: Test this.
+ */
+ WXS_TYPE_PARTICLE_TERM(typeDef) = NULL;
+ /*
+ * Resolve the MG definition reference.
+ */
+ groupDef =
+ WXS_MODEL_GROUPDEF_CAST xmlSchemaGetNamedComponent(ctxt->schema,
+ ref->itemType, ref->name, ref->targetNamespace);
+ if (groupDef == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
+ NULL, WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)),
+ "ref", ref->name, ref->targetNamespace, ref->itemType,
+ NULL);
+ /* Remove the particle. */
+ WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
+ } else if (WXS_MODELGROUPDEF_MODEL(groupDef) == NULL)
+ /* Remove the particle. */
+ WXS_TYPE_CONTENTTYPE(typeDef) = NULL;
+ else {
+ /*
+ * Assign the MG definition's {model group} to the
+ * particle's {term}.
+ */
+ WXS_TYPE_PARTICLE_TERM(typeDef) = WXS_MODELGROUPDEF_MODEL(groupDef);
+
+ if (WXS_MODELGROUPDEF_MODEL(groupDef)->type == XML_SCHEMA_TYPE_ALL) {
+ /*
+ * SPEC cos-all-limited (1.2)
+ * "1.2 the {term} property of a particle with
+ * {max occurs}=1 which is part of a pair which constitutes
+ * the {content type} of a complex type definition."
+ */
+ if ((WXS_TYPE_PARTICLE(typeDef))->maxOccurs != 1) {
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ /* TODO: error code */
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ WXS_ITEM_NODE(WXS_TYPE_PARTICLE(typeDef)), NULL,
+ "The particle's {max occurs} must be 1, since the "
+ "reference resolves to an 'all' model group",
+ NULL, NULL);
+ }
+ }
+ }
+ }
+}
+
+
+
+/**
+ * xmlSchemaCheckSTPropsCorrect:
+ * @ctxt: the schema parser context
+ * @type: the simple type definition
+ *
+ * Checks st-props-correct.
+ *
+ * Returns 0 if the properties are correct,
+ * if not, a positive error code and -1 on internal
+ * errors.
+ */
+static int
+xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr baseType = type->baseType;
+ xmlChar *str = NULL;
+
+ /* STATE: error funcs converted. */
+ /*
+ * Schema Component Constraint: Simple Type Definition Properties Correct
+ *
+ * NOTE: This is somehow redundant, since we actually built a simple type
+ * to have all the needed information; this acts as an self test.
+ */
+ /* Base type: If the datatype has been `derived` by `restriction`
+ * then the Simple Type Definition component from which it is `derived`,
+ * otherwise the Simple Type Definition for anySimpleType ($4.1.6).
+ */
+ if (baseType == NULL) {
+ /*
+ * TODO: Think about: "modulo the impact of Missing
+ * Sub-components ($5.3)."
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_1,
+ WXS_BASIC_CAST type, NULL,
+ "No base type existent", NULL);
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
+
+ }
+ if (! WXS_IS_SIMPLE(baseType)) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_1,
+ WXS_BASIC_CAST type, NULL,
+ "The base type '%s' is not a simple type",
+ xmlSchemaGetComponentQName(&str, baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
+ }
+ if ((WXS_IS_LIST(type) || WXS_IS_UNION(type)) &&
+ (WXS_IS_RESTRICTION(type) == 0) &&
+ ((! WXS_IS_ANY_SIMPLE_TYPE(baseType)) &&
+ (baseType->type != XML_SCHEMA_TYPE_SIMPLE))) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_1,
+ WXS_BASIC_CAST type, NULL,
+ "A type, derived by list or union, must have "
+ "the simple ur-type definition as base type, not '%s'",
+ xmlSchemaGetComponentQName(&str, baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
+ }
+ /*
+ * Variety: One of {atomic, list, union}.
+ */
+ if ((! WXS_IS_ATOMIC(type)) && (! WXS_IS_UNION(type)) &&
+ (! WXS_IS_LIST(type))) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_1,
+ WXS_BASIC_CAST type, NULL,
+ "The variety is absent", NULL);
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
+ }
+ /* TODO: Finish this. Hmm, is this finished? */
+
+ /*
+ * 3 The {final} of the {base type definition} must not contain restriction.
+ */
+ if (xmlSchemaTypeFinalContains(baseType,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_ST_PROPS_CORRECT_3,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of its base type '%s' must not contain "
+ "'restriction'",
+ xmlSchemaGetComponentQName(&str, baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_ST_PROPS_CORRECT_3);
+ }
+
+ /*
+ * 2 All simple type definitions must be derived ultimately from the `simple
+ * ur-type definition` (so circular definitions are disallowed). That is, it
+ * must be possible to reach a built-in primitive datatype or the `simple
+ * ur-type definition` by repeatedly following the {base type definition}.
+ *
+ * NOTE: this is done in xmlSchemaCheckTypeDefCircular().
+ */
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckCOSSTRestricts:
+ * @ctxt: the schema parser context
+ * @type: the simple type definition
+ *
+ * Schema Component Constraint:
+ * Derivation Valid (Restriction, Simple) (cos-st-restricts)
+
+ * Checks if the given @type (simpleType) is derived validly by restriction.
+ * STATUS:
+ *
+ * Returns -1 on internal errors, 0 if the type is validly derived,
+ * a positive error code otherwise.
+ */
+static int
+xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlChar *str = NULL;
+
+ if (type->type != XML_SCHEMA_TYPE_SIMPLE) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "given type is not a user-derived simpleType");
+ return (-1);
+ }
+
+ if (WXS_IS_ATOMIC(type)) {
+ xmlSchemaTypePtr primitive;
+ /*
+ * 1.1 The {base type definition} must be an atomic simple
+ * type definition or a built-in primitive datatype.
+ */
+ if (! WXS_IS_ATOMIC(type->baseType)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The base type '%s' is not an atomic simple type",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_1_1);
+ }
+ /* 1.2 The {final} of the {base type definition} must not contain
+ * restriction.
+ */
+ /* OPTIMIZE TODO : This is already done in xmlSchemaCheckStPropsCorrect */
+ if (xmlSchemaTypeFinalContains(type->baseType,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2,
+ WXS_BASIC_CAST type, NULL,
+ "The final of its base type '%s' must not contain 'restriction'",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_1_2);
+ }
+
+ /*
+ * 1.3.1 DF must be an allowed constraining facet for the {primitive
+ * type definition}, as specified in the appropriate subsection of 3.2
+ * Primitive datatypes.
+ */
+ if (type->facets != NULL) {
+ xmlSchemaFacetPtr facet;
+ int ok = 1;
+
+ primitive = xmlSchemaGetPrimitiveType(type);
+ if (primitive == NULL) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "failed to get primitive type");
+ return (-1);
+ }
+ facet = type->facets;
+ do {
+ if (xmlSchemaIsBuiltInTypeFacet(primitive, facet->type) == 0) {
+ ok = 0;
+ xmlSchemaPIllegalFacetAtomicErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1,
+ type, primitive, facet);
+ }
+ facet = facet->next;
+ } while (facet != NULL);
+ if (ok == 0)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1);
+ }
+ /*
+ * SPEC (1.3.2) "If there is a facet of the same kind in the {facets}
+ * of the {base type definition} (call this BF),then the DF's {value}
+ * must be a valid restriction of BF's {value} as defined in
+ * [XML Schemas: Datatypes]."
+ *
+ * NOTE (1.3.2) Facet derivation constraints are currently handled in
+ * xmlSchemaDeriveAndValidateFacets()
+ */
+ } else if (WXS_IS_LIST(type)) {
+ xmlSchemaTypePtr itemType = NULL;
+
+ itemType = type->subtypes;
+ if ((itemType == NULL) || (! WXS_IS_SIMPLE(itemType))) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "failed to evaluate the item type");
+ return (-1);
+ }
+ if (WXS_IS_TYPE_NOT_FIXED(itemType))
+ xmlSchemaTypeFixup(itemType, ACTXT_CAST pctxt);
+ /*
+ * 2.1 The {item type definition} must have a {variety} of atomic or
+ * union (in which case all the {member type definitions}
+ * must be atomic).
+ */
+ if ((! WXS_IS_ATOMIC(itemType)) &&
+ (! WXS_IS_UNION(itemType))) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1,
+ WXS_BASIC_CAST type, NULL,
+ "The item type '%s' does not have a variety of atomic or union",
+ xmlSchemaGetComponentQName(&str, itemType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_1);
+ } else if (WXS_IS_UNION(itemType)) {
+ xmlSchemaTypeLinkPtr member;
+
+ member = itemType->memberTypes;
+ while (member != NULL) {
+ if (! WXS_IS_ATOMIC(member->type)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1,
+ WXS_BASIC_CAST type, NULL,
+ "The item type is a union type, but the "
+ "member type '%s' of this item type is not atomic",
+ xmlSchemaGetComponentQName(&str, member->type));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_1);
+ }
+ member = member->next;
+ }
+ }
+
+ if (WXS_IS_ANY_SIMPLE_TYPE(type->baseType)) {
+ xmlSchemaFacetPtr facet;
+ /*
+ * This is the case if we have: <simpleType><list ..
+ */
+ /*
+ * 2.3.1
+ * 2.3.1.1 The {final} of the {item type definition} must not
+ * contain list.
+ */
+ if (xmlSchemaTypeFinalContains(itemType,
+ XML_SCHEMAS_TYPE_FINAL_LIST)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The final of its item type '%s' must not contain 'list'",
+ xmlSchemaGetComponentQName(&str, itemType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1);
+ }
+ /*
+ * 2.3.1.2 The {facets} must only contain the whiteSpace
+ * facet component.
+ * OPTIMIZE TODO: the S4S already disallows any facet
+ * to be specified.
+ */
+ if (type->facets != NULL) {
+ facet = type->facets;
+ do {
+ if (facet->type != XML_SCHEMA_FACET_WHITESPACE) {
+ xmlSchemaPIllegalFacetListUnionErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2,
+ type, facet);
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2);
+ }
+ facet = facet->next;
+ } while (facet != NULL);
+ }
+ /*
+ * MAYBE TODO: (Hmm, not really) Datatypes states:
+ * A `list` datatype can be `derived` from an `atomic` datatype
+ * whose `lexical space` allows space (such as string or anyURI)or
+ * a `union` datatype any of whose {member type definitions}'s
+ * `lexical space` allows space.
+ */
+ } else {
+ /*
+ * This is the case if we have: <simpleType><restriction ...
+ * I.e. the variety of "list" is inherited.
+ */
+ /*
+ * 2.3.2
+ * 2.3.2.1 The {base type definition} must have a {variety} of list.
+ */
+ if (! WXS_IS_LIST(type->baseType)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1,
+ WXS_BASIC_CAST type, NULL,
+ "The base type '%s' must be a list type",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1);
+ }
+ /*
+ * 2.3.2.2 The {final} of the {base type definition} must not
+ * contain restriction.
+ */
+ if (xmlSchemaTypeFinalContains(type->baseType,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of the base type '%s' must not contain 'restriction'",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2);
+ }
+ /*
+ * 2.3.2.3 The {item type definition} must be validly derived
+ * from the {base type definition}'s {item type definition} given
+ * the empty set, as defined in Type Derivation OK (Simple) ($3.14.6).
+ */
+ {
+ xmlSchemaTypePtr baseItemType;
+
+ baseItemType = type->baseType->subtypes;
+ if ((baseItemType == NULL) || (! WXS_IS_SIMPLE(baseItemType))) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "failed to eval the item type of a base type");
+ return (-1);
+ }
+ if ((itemType != baseItemType) &&
+ (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt, itemType,
+ baseItemType, 0) != 0)) {
+ xmlChar *strBIT = NULL, *strBT = NULL;
+ xmlSchemaPCustomErrExt(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3,
+ WXS_BASIC_CAST type, NULL,
+ "The item type '%s' is not validly derived from "
+ "the item type '%s' of the base type '%s'",
+ xmlSchemaGetComponentQName(&str, itemType),
+ xmlSchemaGetComponentQName(&strBIT, baseItemType),
+ xmlSchemaGetComponentQName(&strBT, type->baseType));
+
+ FREE_AND_NULL(str)
+ FREE_AND_NULL(strBIT)
+ FREE_AND_NULL(strBT)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3);
+ }
+ }
+
+ if (type->facets != NULL) {
+ xmlSchemaFacetPtr facet;
+ int ok = 1;
+ /*
+ * 2.3.2.4 Only length, minLength, maxLength, whiteSpace, pattern
+ * and enumeration facet components are allowed among the {facets}.
+ */
+ facet = type->facets;
+ do {
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ case XML_SCHEMA_FACET_WHITESPACE:
+ /*
+ * TODO: 2.5.1.2 List datatypes
+ * The value of `whiteSpace` is fixed to the value collapse.
+ */
+ case XML_SCHEMA_FACET_PATTERN:
+ case XML_SCHEMA_FACET_ENUMERATION:
+ break;
+ default: {
+ xmlSchemaPIllegalFacetListUnionErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4,
+ type, facet);
+ /*
+ * We could return, but it's nicer to report all
+ * invalid facets.
+ */
+ ok = 0;
+ }
+ }
+ facet = facet->next;
+ } while (facet != NULL);
+ if (ok == 0)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4);
+ /*
+ * SPEC (2.3.2.5) (same as 1.3.2)
+ *
+ * NOTE (2.3.2.5) This is currently done in
+ * xmlSchemaDeriveAndValidateFacets()
+ */
+ }
+ }
+ } else if (WXS_IS_UNION(type)) {
+ /*
+ * 3.1 The {member type definitions} must all have {variety} of
+ * atomic or list.
+ */
+ xmlSchemaTypeLinkPtr member;
+
+ member = type->memberTypes;
+ while (member != NULL) {
+ if (WXS_IS_TYPE_NOT_FIXED(member->type))
+ xmlSchemaTypeFixup(member->type, ACTXT_CAST pctxt);
+
+ if ((! WXS_IS_ATOMIC(member->type)) &&
+ (! WXS_IS_LIST(member->type))) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1,
+ WXS_BASIC_CAST type, NULL,
+ "The member type '%s' is neither an atomic, nor a list type",
+ xmlSchemaGetComponentQName(&str, member->type));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_1);
+ }
+ member = member->next;
+ }
+ /*
+ * 3.3.1 If the {base type definition} is the `simple ur-type
+ * definition`
+ */
+ if (type->baseType->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) {
+ /*
+ * 3.3.1.1 All of the {member type definitions} must have a
+ * {final} which does not contain union.
+ */
+ member = type->memberTypes;
+ while (member != NULL) {
+ if (xmlSchemaTypeFinalContains(member->type,
+ XML_SCHEMAS_TYPE_FINAL_UNION)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of member type '%s' contains 'union'",
+ xmlSchemaGetComponentQName(&str, member->type));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1);
+ }
+ member = member->next;
+ }
+ /*
+ * 3.3.1.2 The {facets} must be empty.
+ */
+ if (type->facetSet != NULL) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2,
+ WXS_BASIC_CAST type, NULL,
+ "No facets allowed", NULL);
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2);
+ }
+ } else {
+ /*
+ * 3.3.2.1 The {base type definition} must have a {variety} of union.
+ * I.e. the variety of "list" is inherited.
+ */
+ if (! WXS_IS_UNION(type->baseType)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1,
+ WXS_BASIC_CAST type, NULL,
+ "The base type '%s' is not a union type",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1);
+ }
+ /*
+ * 3.3.2.2 The {final} of the {base type definition} must not contain restriction.
+ */
+ if (xmlSchemaTypeFinalContains(type->baseType,
+ XML_SCHEMAS_TYPE_FINAL_RESTRICTION)) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of its base type '%s' must not contain 'restriction'",
+ xmlSchemaGetComponentQName(&str, type->baseType));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2);
+ }
+ /*
+ * 3.3.2.3 The {member type definitions}, in order, must be validly
+ * derived from the corresponding type definitions in the {base
+ * type definition}'s {member type definitions} given the empty set,
+ * as defined in Type Derivation OK (Simple) ($3.14.6).
+ */
+ {
+ xmlSchemaTypeLinkPtr baseMember;
+
+ /*
+ * OPTIMIZE: if the type is restricting, it has no local defined
+ * member types and inherits the member types of the base type;
+ * thus a check for equality can be skipped.
+ */
+ /*
+ * Even worse: I cannot see a scenario where a restricting
+ * union simple type can have other member types as the member
+ * types of it's base type. This check seems not necessary with
+ * respect to the derivation process in libxml2.
+ * But necessary if constructing types with an API.
+ */
+ if (type->memberTypes != NULL) {
+ member = type->memberTypes;
+ baseMember = xmlSchemaGetUnionSimpleTypeMemberTypes(type->baseType);
+ if ((member == NULL) && (baseMember != NULL)) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "different number of member types in base");
+ }
+ while (member != NULL) {
+ if (baseMember == NULL) {
+ PERROR_INT("xmlSchemaCheckCOSSTRestricts",
+ "different number of member types in base");
+ } else if ((member->type != baseMember->type) &&
+ (xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST pctxt,
+ member->type, baseMember->type, 0) != 0)) {
+ xmlChar *strBMT = NULL, *strBT = NULL;
+
+ xmlSchemaPCustomErrExt(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3,
+ WXS_BASIC_CAST type, NULL,
+ "The member type %s is not validly "
+ "derived from its corresponding member "
+ "type %s of the base type %s",
+ xmlSchemaGetComponentQName(&str, member->type),
+ xmlSchemaGetComponentQName(&strBMT, baseMember->type),
+ xmlSchemaGetComponentQName(&strBT, type->baseType));
+ FREE_AND_NULL(str)
+ FREE_AND_NULL(strBMT)
+ FREE_AND_NULL(strBT)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3);
+ }
+ member = member->next;
+ if (baseMember != NULL)
+ baseMember = baseMember->next;
+ }
+ }
+ }
+ /*
+ * 3.3.2.4 Only pattern and enumeration facet components are
+ * allowed among the {facets}.
+ */
+ if (type->facets != NULL) {
+ xmlSchemaFacetPtr facet;
+ int ok = 1;
+
+ facet = type->facets;
+ do {
+ if ((facet->type != XML_SCHEMA_FACET_PATTERN) &&
+ (facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
+ xmlSchemaPIllegalFacetListUnionErr(pctxt,
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4,
+ type, facet);
+ ok = 0;
+ }
+ facet = facet->next;
+ } while (facet != NULL);
+ if (ok == 0)
+ return (XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4);
+
+ }
+ /*
+ * SPEC (3.3.2.5) (same as 1.3.2)
+ *
+ * NOTE (3.3.2.5) This is currently done in
+ * xmlSchemaDeriveAndValidateFacets()
+ */
+ }
+ }
+
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckSRCSimpleType:
+ * @ctxt: the schema parser context
+ * @type: the simple type definition
+ *
+ * Checks crc-simple-type constraints.
+ *
+ * Returns 0 if the constraints are satisfied,
+ * if not a positive error code and -1 on internal
+ * errors.
+ */
+#if 0
+static int
+xmlSchemaCheckSRCSimpleType(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ /*
+ * src-simple-type.1 The corresponding simple type definition, if any,
+ * must satisfy the conditions set out in Constraints on Simple Type
+ * Definition Schema Components ($3.14.6).
+ */
+ if (WXS_IS_RESTRICTION(type)) {
+ /*
+ * src-simple-type.2 "If the <restriction> alternative is chosen,
+ * either it must have a base [attribute] or a <simpleType> among its
+ * [children], but not both."
+ * NOTE: This is checked in the parse function of <restriction>.
+ */
+ /*
+ *
+ */
+ } else if (WXS_IS_LIST(type)) {
+ /* src-simple-type.3 "If the <list> alternative is chosen, either it must have
+ * an itemType [attribute] or a <simpleType> among its [children],
+ * but not both."
+ *
+ * NOTE: This is checked in the parse function of <list>.
+ */
+ } else if (WXS_IS_UNION(type)) {
+ /*
+ * src-simple-type.4 is checked in xmlSchemaCheckUnionTypeDefCircular().
+ */
+ }
+ return (0);
+}
+#endif
+
+static int
+xmlSchemaCreateVCtxtOnPCtxt(xmlSchemaParserCtxtPtr ctxt)
+{
+ if (ctxt->vctxt == NULL) {
+ ctxt->vctxt = xmlSchemaNewValidCtxt(NULL);
+ if (ctxt->vctxt == NULL) {
+ xmlSchemaPErr(ctxt, NULL,
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaCreateVCtxtOnPCtxt, "
+ "failed to create a temp. validation context.\n",
+ NULL, NULL);
+ return (-1);
+ }
+ /* TODO: Pass user data. */
+ xmlSchemaSetValidErrors(ctxt->vctxt,
+ ctxt->error, ctxt->warning, ctxt->errCtxt);
+ xmlSchemaSetValidStructuredErrors(ctxt->vctxt,
+ ctxt->serror, ctxt->errCtxt);
+ }
+ return (0);
+}
+
+static int
+xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *retVal,
+ int fireErrors,
+ int normalize,
+ int isNormalized);
+
+/**
+ * xmlSchemaParseCheckCOSValidDefault:
+ * @pctxt: the schema parser context
+ * @type: the simple type definition
+ * @value: the default value
+ * @node: an optional node (the holder of the value)
+ *
+ * Schema Component Constraint: Element Default Valid (Immediate)
+ * (cos-valid-default)
+ * This will be used by the parser only. For the validator there's
+ * an other version.
+ *
+ * Returns 0 if the constraints are satisfied,
+ * if not, a positive error code and -1 on internal
+ * errors.
+ */
+static int
+xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val)
+{
+ int ret = 0;
+
+ /*
+ * cos-valid-default:
+ * Schema Component Constraint: Element Default Valid (Immediate)
+ * For a string to be a valid default with respect to a type
+ * definition the appropriate case among the following must be true:
+ */
+ if WXS_IS_COMPLEX(type) {
+ /*
+ * Complex type.
+ *
+ * SPEC (2.1) "its {content type} must be a simple type definition
+ * or mixed."
+ * SPEC (2.2.2) "If the {content type} is mixed, then the {content
+ * type}'s particle must be `emptiable` as defined by
+ * Particle Emptiable ($3.9.6)."
+ */
+ if ((! WXS_HAS_SIMPLE_CONTENT(type)) &&
+ ((! WXS_HAS_MIXED_CONTENT(type)) || (! WXS_EMPTIABLE(type)))) {
+ /* NOTE that this covers (2.2.2) as well. */
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1,
+ WXS_BASIC_CAST type, type->node,
+ "For a string to be a valid default, the type definition "
+ "must be a simple type or a complex type with mixed content "
+ "and a particle emptiable", NULL);
+ return(XML_SCHEMAP_COS_VALID_DEFAULT_2_1);
+ }
+ }
+ /*
+ * 1 If the type definition is a simple type definition, then the string
+ * must be `valid` with respect to that definition as defined by String
+ * Valid ($3.14.4).
+ *
+ * AND
+ *
+ * 2.2.1 If the {content type} is a simple type definition, then the
+ * string must be `valid` with respect to that simple type definition
+ * as defined by String Valid ($3.14.4).
+ */
+ if (WXS_IS_SIMPLE(type))
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
+ type, value, val, 1, 1, 0);
+ else if (WXS_HAS_SIMPLE_CONTENT(type))
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
+ type->contentTypeDef, value, val, 1, 1, 0);
+ else
+ return (ret);
+
+ if (ret < 0) {
+ PERROR_INT("xmlSchemaParseCheckCOSValidDefault",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaCheckCTPropsCorrect:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ *.(4.6) Constraints on Complex Type Definition Schema Components
+ * Schema Component Constraint:
+ * Complex Type Definition Properties Correct (ct-props-correct)
+ * STATUS: (seems) complete
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ /*
+ * TODO: Correct the error code; XML_SCHEMAP_SRC_CT_1 is used temporarily.
+ *
+ * SPEC (1) "The values of the properties of a complex type definition must
+ * be as described in the property tableau in The Complex Type Definition
+ * Schema Component ($3.4.1), modulo the impact of Missing
+ * Sub-components ($5.3)."
+ */
+ if ((type->baseType != NULL) &&
+ (WXS_IS_SIMPLE(type->baseType)) &&
+ (WXS_IS_EXTENSION(type) == 0)) {
+ /*
+ * SPEC (2) "If the {base type definition} is a simple type definition,
+ * the {derivation method} must be extension."
+ */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ NULL, WXS_BASIC_CAST type,
+ "If the base type is a simple type, the derivation method must be "
+ "'extension'", NULL, NULL);
+ return (XML_SCHEMAP_SRC_CT_1);
+ }
+ /*
+ * SPEC (3) "Circular definitions are disallowed, except for the `ur-type
+ * definition`. That is, it must be possible to reach the `ur-type
+ * definition` by repeatedly following the {base type definition}."
+ *
+ * NOTE (3) is done in xmlSchemaCheckTypeDefCircular().
+ */
+ /*
+ * NOTE that (4) and (5) need the following:
+ * - attribute uses need to be already inherited (apply attr. prohibitions)
+ * - attribute group references need to be expanded already
+ * - simple types need to be typefixed already
+ */
+ if (type->attrUses &&
+ (((xmlSchemaItemListPtr) type->attrUses)->nbItems > 1))
+ {
+ xmlSchemaItemListPtr uses = (xmlSchemaItemListPtr) type->attrUses;
+ xmlSchemaAttributeUsePtr use, tmp;
+ int i, j, hasId = 0;
+
+ for (i = uses->nbItems -1; i >= 0; i--) {
+ use = uses->items[i];
+
+ /*
+ * SPEC ct-props-correct
+ * (4) "Two distinct attribute declarations in the
+ * {attribute uses} must not have identical {name}s and
+ * {target namespace}s."
+ */
+ if (i > 0) {
+ for (j = i -1; j >= 0; j--) {
+ tmp = uses->items[j];
+ if ((WXS_ATTRUSE_DECL_NAME(use) ==
+ WXS_ATTRUSE_DECL_NAME(tmp)) &&
+ (WXS_ATTRUSE_DECL_TNS(use) ==
+ WXS_ATTRUSE_DECL_TNS(tmp)))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_AG_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST type,
+ "Duplicate %s",
+ xmlSchemaGetComponentDesignation(&str, use),
+ NULL);
+ FREE_AND_NULL(str);
+ /*
+ * Remove the duplicate.
+ */
+ if (xmlSchemaItemListRemove(uses, i) == -1)
+ goto exit_failure;
+ goto next_use;
+ }
+ }
+ }
+ /*
+ * SPEC ct-props-correct
+ * (5) "Two distinct attribute declarations in the
+ * {attribute uses} must not have {type definition}s which
+ * are or are derived from ID."
+ */
+ if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+ {
+ if (hasId) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_AG_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST type,
+ "There must not exist more than one attribute "
+ "declaration of type 'xs:ID' "
+ "(or derived from 'xs:ID'). The %s violates this "
+ "constraint",
+ xmlSchemaGetComponentDesignation(&str, use),
+ NULL);
+ FREE_AND_NULL(str);
+ if (xmlSchemaItemListRemove(uses, i) == -1)
+ goto exit_failure;
+ }
+
+ hasId = 1;
+ }
+ }
+next_use: {}
+ }
+ }
+ return (0);
+exit_failure:
+ return(-1);
+}
+
+static int
+xmlSchemaAreEqualTypes(xmlSchemaTypePtr typeA,
+ xmlSchemaTypePtr typeB)
+{
+ /*
+ * TODO: This should implement component-identity
+ * in the future.
+ */
+ if ((typeA == NULL) || (typeB == NULL))
+ return (0);
+ return (typeA == typeB);
+}
+
+/**
+ * xmlSchemaCheckCOSCTDerivedOK:
+ * @ctxt: the schema parser context
+ * @type: the to-be derived complex type definition
+ * @baseType: the base complex type definition
+ * @set: the given set
+ *
+ * Schema Component Constraint:
+ * Type Derivation OK (Complex) (cos-ct-derived-ok)
+ *
+ * STATUS: completed
+ *
+ * Returns 0 if the constraints are satisfied, or 1
+ * if not.
+ */
+static int
+xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+ xmlSchemaTypePtr type,
+ xmlSchemaTypePtr baseType,
+ int set)
+{
+ int equal = xmlSchemaAreEqualTypes(type, baseType);
+ /* TODO: Error codes. */
+ /*
+ * SPEC "For a complex type definition (call it D, for derived)
+ * to be validly derived from a type definition (call this
+ * B, for base) given a subset of {extension, restriction}
+ * all of the following must be true:"
+ */
+ if (! equal) {
+ /*
+ * SPEC (1) "If B and D are not the same type definition, then the
+ * {derivation method} of D must not be in the subset."
+ */
+ if (((set & SUBSET_EXTENSION) && (WXS_IS_EXTENSION(type))) ||
+ ((set & SUBSET_RESTRICTION) && (WXS_IS_RESTRICTION(type))))
+ return (1);
+ } else {
+ /*
+ * SPEC (2.1) "B and D must be the same type definition."
+ */
+ return (0);
+ }
+ /*
+ * SPEC (2.2) "B must be D's {base type definition}."
+ */
+ if (type->baseType == baseType)
+ return (0);
+ /*
+ * SPEC (2.3.1) "D's {base type definition} must not be the `ur-type
+ * definition`."
+ */
+ if (WXS_IS_ANYTYPE(type->baseType))
+ return (1);
+
+ if (WXS_IS_COMPLEX(type->baseType)) {
+ /*
+ * SPEC (2.3.2.1) "If D's {base type definition} is complex, then it
+ * must be validly derived from B given the subset as defined by this
+ * constraint."
+ */
+ return (xmlSchemaCheckCOSCTDerivedOK(actxt, type->baseType,
+ baseType, set));
+ } else {
+ /*
+ * SPEC (2.3.2.2) "If D's {base type definition} is simple, then it
+ * must be validly derived from B given the subset as defined in Type
+ * Derivation OK (Simple) ($3.14.6).
+ */
+ return (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType,
+ baseType, set));
+ }
+}
+
+/**
+ * xmlSchemaCheckCOSDerivedOK:
+ * @type: the derived simple type definition
+ * @baseType: the base type definition
+ *
+ * Calls:
+ * Type Derivation OK (Simple) AND Type Derivation OK (Complex)
+ *
+ * Checks wheter @type can be validly derived from @baseType.
+ *
+ * Returns 0 on success, an positive error code otherwise.
+ */
+static int
+xmlSchemaCheckCOSDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
+ xmlSchemaTypePtr type,
+ xmlSchemaTypePtr baseType,
+ int set)
+{
+ if (WXS_IS_SIMPLE(type))
+ return (xmlSchemaCheckCOSSTDerivedOK(actxt, type, baseType, set));
+ else
+ return (xmlSchemaCheckCOSCTDerivedOK(actxt, type, baseType, set));
+}
+
+/**
+ * xmlSchemaCheckCOSCTExtends:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.4.6) Constraints on Complex Type Definition Schema Components
+ * Schema Component Constraint:
+ * Derivation Valid (Extension) (cos-ct-extends)
+ *
+ * STATUS:
+ * missing:
+ * (1.5)
+ * (1.4.3.2.2.2) "Particle Valid (Extension)"
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr base = type->baseType;
+ /*
+ * TODO: Correct the error code; XML_SCHEMAP_COS_CT_EXTENDS_1_1 is used
+ * temporarily only.
+ */
+ /*
+ * SPEC (1) "If the {base type definition} is a complex type definition,
+ * then all of the following must be true:"
+ */
+ if (WXS_IS_COMPLEX(base)) {
+ /*
+ * SPEC (1.1) "The {final} of the {base type definition} must not
+ * contain extension."
+ */
+ if (base->flags & XML_SCHEMAS_TYPE_FINAL_EXTENSION) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of the base type definition "
+ "contains 'extension'", NULL);
+ return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+ }
+
+ /*
+ * ATTENTION: The constrains (1.2) and (1.3) are not applied,
+ * since they are automatically satisfied through the
+ * inheriting mechanism.
+ * Note that even if redefining components, the inheriting mechanism
+ * is used.
+ */
+#if 0
+ /*
+ * SPEC (1.2) "Its {attribute uses} must be a subset of the {attribute
+ * uses}
+ * of the complex type definition itself, that is, for every attribute
+ * use in the {attribute uses} of the {base type definition}, there
+ * must be an attribute use in the {attribute uses} of the complex
+ * type definition itself whose {attribute declaration} has the same
+ * {name}, {target namespace} and {type definition} as its attribute
+ * declaration"
+ */
+ if (base->attrUses != NULL) {
+ int i, j, found;
+ xmlSchemaAttributeUsePtr use, buse;
+
+ for (i = 0; i < (WXS_LIST_CAST base->attrUses)->nbItems; i ++) {
+ buse = (WXS_LIST_CAST base->attrUses)->items[i];
+ found = 0;
+ if (type->attrUses != NULL) {
+ use = (WXS_LIST_CAST type->attrUses)->items[j];
+ for (j = 0; j < (WXS_LIST_CAST type->attrUses)->nbItems; j ++)
+ {
+ if ((WXS_ATTRUSE_DECL_NAME(use) ==
+ WXS_ATTRUSE_DECL_NAME(buse)) &&
+ (WXS_ATTRUSE_DECL_TNS(use) ==
+ WXS_ATTRUSE_DECL_TNS(buse)) &&
+ (WXS_ATTRUSE_TYPEDEF(use) ==
+ WXS_ATTRUSE_TYPEDEF(buse))
+ {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (! found) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2,
+ NULL, WXS_BASIC_CAST type,
+ /*
+ * TODO: The report does not indicate that also the
+ * type needs to be the same.
+ */
+ "This type is missing a matching correspondent "
+ "for its {base type}'s %s in its {attribute uses}",
+ xmlSchemaGetComponentDesignation(&str,
+ buse->children),
+ NULL);
+ FREE_AND_NULL(str)
+ }
+ }
+ }
+ /*
+ * SPEC (1.3) "If it has an {attribute wildcard}, the complex type
+ * definition must also have one, and the base type definition's
+ * {attribute wildcard}'s {namespace constraint} must be a subset
+ * of the complex type definition's {attribute wildcard}'s {namespace
+ * constraint}, as defined by Wildcard Subset ($3.10.6)."
+ */
+
+ /*
+ * MAYBE TODO: Enable if ever needed. But this will be needed only
+ * if created the type via a schema construction API.
+ */
+ if (base->attributeWildcard != NULL) {
+ if (type->attributeWilcard == NULL) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3,
+ NULL, type,
+ "The base %s has an attribute wildcard, "
+ "but this type is missing an attribute wildcard",
+ xmlSchemaGetComponentDesignation(&str, base));
+ FREE_AND_NULL(str)
+
+ } else if (xmlSchemaCheckCOSNSSubset(
+ base->attributeWildcard, type->attributeWildcard))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3,
+ NULL, type,
+ "The attribute wildcard is not a valid "
+ "superset of the one in the base %s",
+ xmlSchemaGetComponentDesignation(&str, base));
+ FREE_AND_NULL(str)
+ }
+ }
+#endif
+ /*
+ * SPEC (1.4) "One of the following must be true:"
+ */
+ if ((type->contentTypeDef != NULL) &&
+ (type->contentTypeDef == base->contentTypeDef)) {
+ /*
+ * SPEC (1.4.1) "The {content type} of the {base type definition}
+ * and the {content type} of the complex type definition itself
+ * must be the same simple type definition"
+ * PASS
+ */
+ } else if ((type->contentType == XML_SCHEMA_CONTENT_EMPTY) &&
+ (base->contentType == XML_SCHEMA_CONTENT_EMPTY) ) {
+ /*
+ * SPEC (1.4.2) "The {content type} of both the {base type
+ * definition} and the complex type definition itself must
+ * be empty."
+ * PASS
+ */
+ } else {
+ /*
+ * SPEC (1.4.3) "All of the following must be true:"
+ */
+ if (type->subtypes == NULL) {
+ /*
+ * SPEC 1.4.3.1 The {content type} of the complex type
+ * definition itself must specify a particle.
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The content type must specify a particle", NULL);
+ return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+ }
+ /*
+ * SPEC (1.4.3.2) "One of the following must be true:"
+ */
+ if (base->contentType == XML_SCHEMA_CONTENT_EMPTY) {
+ /*
+ * SPEC (1.4.3.2.1) "The {content type} of the {base type
+ * definition} must be empty.
+ * PASS
+ */
+ } else {
+ /*
+ * SPEC (1.4.3.2.2) "All of the following must be true:"
+ */
+ if ((type->contentType != base->contentType) ||
+ ((type->contentType != XML_SCHEMA_CONTENT_MIXED) &&
+ (type->contentType != XML_SCHEMA_CONTENT_ELEMENTS))) {
+ /*
+ * SPEC (1.4.3.2.2.1) "Both {content type}s must be mixed
+ * or both must be element-only."
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The content type of both, the type and its base "
+ "type, must either 'mixed' or 'element-only'", NULL);
+ return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+ }
+ /*
+ * URGENT TODO SPEC (1.4.3.2.2.2) "The particle of the
+ * complex type definition must be a `valid extension`
+ * of the {base type definition}'s particle, as defined
+ * in Particle Valid (Extension) ($3.9.6)."
+ *
+ * NOTE that we won't check "Particle Valid (Extension)",
+ * since it is ensured by the derivation process in
+ * xmlSchemaTypeFixup(). We need to implement this when heading
+ * for a construction API
+ * TODO: !! This is needed to be checked if redefining a type !!
+ */
+ }
+ /*
+ * URGENT TODO (1.5)
+ */
+ }
+ } else {
+ /*
+ * SPEC (2) "If the {base type definition} is a simple type definition,
+ * then all of the following must be true:"
+ */
+ if (type->contentTypeDef != base) {
+ /*
+ * SPEC (2.1) "The {content type} must be the same simple type
+ * definition."
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The content type must be the simple base type", NULL);
+ return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+ }
+ if (base->flags & XML_SCHEMAS_TYPE_FINAL_EXTENSION) {
+ /*
+ * SPEC (2.2) "The {final} of the {base type definition} must not
+ * contain extension"
+ * NOTE that this is the same as (1.1).
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1,
+ WXS_BASIC_CAST type, NULL,
+ "The 'final' of the base type definition "
+ "contains 'extension'", NULL);
+ return (XML_SCHEMAP_COS_CT_EXTENDS_1_1);
+ }
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckDerivationOKRestriction:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.4.6) Constraints on Complex Type Definition Schema Components
+ * Schema Component Constraint:
+ * Derivation Valid (Restriction, Complex) (derivation-ok-restriction)
+ *
+ * STATUS:
+ * missing:
+ * (5.4.2) ???
+ *
+ * ATTENTION:
+ * In XML Schema 1.1 this will be:
+ * Validation Rule: Checking complex type subsumption
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr base;
+
+ /*
+ * TODO: Correct the error code; XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 is used
+ * temporarily only.
+ */
+ base = type->baseType;
+ if (! WXS_IS_COMPLEX(base)) {
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ type->node, WXS_BASIC_CAST type,
+ "The base type must be a complex type", NULL, NULL);
+ return(ctxt->err);
+ }
+ if (base->flags & XML_SCHEMAS_TYPE_FINAL_RESTRICTION) {
+ /*
+ * SPEC (1) "The {base type definition} must be a complex type
+ * definition whose {final} does not contain restriction."
+ */
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ type->node, WXS_BASIC_CAST type,
+ "The 'final' of the base type definition "
+ "contains 'restriction'", NULL, NULL);
+ return (ctxt->err);
+ }
+ /*
+ * SPEC (2), (3) and (4)
+ * Those are handled in a separate function, since the
+ * same constraints are needed for redefinition of
+ * attribute groups as well.
+ */
+ if (xmlSchemaCheckDerivationOKRestriction2to4(ctxt,
+ XML_SCHEMA_ACTION_DERIVE,
+ WXS_BASIC_CAST type, WXS_BASIC_CAST base,
+ type->attrUses, base->attrUses,
+ type->attributeWildcard,
+ base->attributeWildcard) == -1)
+ {
+ return(-1);
+ }
+ /*
+ * SPEC (5) "One of the following must be true:"
+ */
+ if (base->builtInType == XML_SCHEMAS_ANYTYPE) {
+ /*
+ * SPEC (5.1) "The {base type definition} must be the
+ * `ur-type definition`."
+ * PASS
+ */
+ } else if ((type->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||
+ (type->contentType == XML_SCHEMA_CONTENT_BASIC)) {
+ /*
+ * SPEC (5.2.1) "The {content type} of the complex type definition
+ * must be a simple type definition"
+ *
+ * SPEC (5.2.2) "One of the following must be true:"
+ */
+ if ((base->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||
+ (base->contentType == XML_SCHEMA_CONTENT_BASIC))
+ {
+ int err;
+ /*
+ * SPEC (5.2.2.1) "The {content type} of the {base type
+ * definition} must be a simple type definition from which
+ * the {content type} is validly derived given the empty
+ * set as defined in Type Derivation OK (Simple) ($3.14.6)."
+ *
+ * ATTENTION TODO: This seems not needed if the type implicitely
+ * derived from the base type.
+ *
+ */
+ err = xmlSchemaCheckCOSSTDerivedOK(ACTXT_CAST ctxt,
+ type->contentTypeDef, base->contentTypeDef, 0);
+ if (err != 0) {
+ xmlChar *strA = NULL, *strB = NULL;
+
+ if (err == -1)
+ return(-1);
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ NULL, WXS_BASIC_CAST type,
+ "The {content type} %s is not validly derived from the "
+ "base type's {content type} %s",
+ xmlSchemaGetComponentDesignation(&strA,
+ type->contentTypeDef),
+ xmlSchemaGetComponentDesignation(&strB,
+ base->contentTypeDef));
+ FREE_AND_NULL(strA);
+ FREE_AND_NULL(strB);
+ return(ctxt->err);
+ }
+ } else if ((base->contentType == XML_SCHEMA_CONTENT_MIXED) &&
+ (xmlSchemaIsParticleEmptiable(
+ (xmlSchemaParticlePtr) base->subtypes))) {
+ /*
+ * SPEC (5.2.2.2) "The {base type definition} must be mixed
+ * and have a particle which is `emptiable` as defined in
+ * Particle Emptiable ($3.9.6)."
+ * PASS
+ */
+ } else {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ WXS_BASIC_CAST type, NULL,
+ "The content type of the base type must be either "
+ "a simple type or 'mixed' and an emptiable particle", NULL);
+ return (ctxt->err);
+ }
+ } else if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) {
+ /*
+ * SPEC (5.3.1) "The {content type} of the complex type itself must
+ * be empty"
+ */
+ if (base->contentType == XML_SCHEMA_CONTENT_EMPTY) {
+ /*
+ * SPEC (5.3.2.1) "The {content type} of the {base type
+ * definition} must also be empty."
+ * PASS
+ */
+ } else if (((base->contentType == XML_SCHEMA_CONTENT_ELEMENTS) ||
+ (base->contentType == XML_SCHEMA_CONTENT_MIXED)) &&
+ xmlSchemaIsParticleEmptiable(
+ (xmlSchemaParticlePtr) base->subtypes)) {
+ /*
+ * SPEC (5.3.2.2) "The {content type} of the {base type
+ * definition} must be elementOnly or mixed and have a particle
+ * which is `emptiable` as defined in Particle Emptiable ($3.9.6)."
+ * PASS
+ */
+ } else {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ WXS_BASIC_CAST type, NULL,
+ "The content type of the base type must be either "
+ "empty or 'mixed' (or 'elements-only') and an emptiable "
+ "particle", NULL);
+ return (ctxt->err);
+ }
+ } else if ((type->contentType == XML_SCHEMA_CONTENT_ELEMENTS) ||
+ WXS_HAS_MIXED_CONTENT(type)) {
+ /*
+ * SPEC (5.4.1.1) "The {content type} of the complex type definition
+ * itself must be element-only"
+ */
+ if (WXS_HAS_MIXED_CONTENT(type) && (! WXS_HAS_MIXED_CONTENT(base))) {
+ /*
+ * SPEC (5.4.1.2) "The {content type} of the complex type
+ * definition itself and of the {base type definition} must be
+ * mixed"
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ WXS_BASIC_CAST type, NULL,
+ "If the content type is 'mixed', then the content type of the "
+ "base type must also be 'mixed'", NULL);
+ return (ctxt->err);
+ }
+ /*
+ * SPEC (5.4.2) "The particle of the complex type definition itself
+ * must be a `valid restriction` of the particle of the {content
+ * type} of the {base type definition} as defined in Particle Valid
+ * (Restriction) ($3.9.6).
+ *
+ * URGENT TODO: (5.4.2)
+ */
+ } else {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1,
+ WXS_BASIC_CAST type, NULL,
+ "The type is not a valid restriction of its base type", NULL);
+ return (ctxt->err);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckCTComponent:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.4.6) Constraints on Complex Type Definition Schema Components
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckCTComponent(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ int ret;
+ /*
+ * Complex Type Definition Properties Correct
+ */
+ ret = xmlSchemaCheckCTPropsCorrect(ctxt, type);
+ if (ret != 0)
+ return (ret);
+ if (WXS_IS_EXTENSION(type))
+ ret = xmlSchemaCheckCOSCTExtends(ctxt, type);
+ else
+ ret = xmlSchemaCheckDerivationOKRestriction(ctxt, type);
+ return (ret);
+}
+
+/**
+ * xmlSchemaCheckSRCCT:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.4.3) Constraints on XML Representations of Complex Type Definitions:
+ * Schema Representation Constraint:
+ * Complex Type Definition Representation OK (src-ct)
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr base;
+ int ret = 0;
+
+ /*
+ * TODO: Adjust the error codes here, as I used
+ * XML_SCHEMAP_SRC_CT_1 only yet.
+ */
+ base = type->baseType;
+ if (! WXS_HAS_SIMPLE_CONTENT(type)) {
+ /*
+ * 1 If the <complexContent> alternative is chosen, the type definition
+ * `resolved` to by the `actual value` of the base [attribute]
+ * must be a complex type definition;
+ */
+ if (! WXS_IS_COMPLEX(base)) {
+ xmlChar *str = NULL;
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ WXS_BASIC_CAST type, type->node,
+ "If using <complexContent>, the base type is expected to be "
+ "a complex type. The base type '%s' is a simple type",
+ xmlSchemaFormatQName(&str, base->targetNamespace,
+ base->name));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_SRC_CT_1);
+ }
+ } else {
+ /*
+ * SPEC
+ * 2 If the <simpleContent> alternative is chosen, all of the
+ * following must be true:
+ * 2.1 The type definition `resolved` to by the `actual value` of the
+ * base [attribute] must be one of the following:
+ */
+ if (WXS_IS_SIMPLE(base)) {
+ if (WXS_IS_EXTENSION(type) == 0) {
+ xmlChar *str = NULL;
+ /*
+ * 2.1.3 only if the <extension> alternative is also
+ * chosen, a simple type definition.
+ */
+ /* TODO: Change error code to ..._SRC_CT_2_1_3. */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ WXS_BASIC_CAST type, NULL,
+ "If using <simpleContent> and <restriction>, the base "
+ "type must be a complex type. The base type '%s' is "
+ "a simple type",
+ xmlSchemaFormatQName(&str, base->targetNamespace,
+ base->name));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_SRC_CT_1);
+ }
+ } else {
+ /* Base type is a complex type. */
+ if ((base->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||
+ (base->contentType == XML_SCHEMA_CONTENT_BASIC)) {
+ /*
+ * 2.1.1 a complex type definition whose {content type} is a
+ * simple type definition;
+ * PASS
+ */
+ if (base->contentTypeDef == NULL) {
+ xmlSchemaPCustomErr(ctxt, XML_SCHEMAP_INTERNAL,
+ WXS_BASIC_CAST type, NULL,
+ "Internal error: xmlSchemaCheckSRCCT, "
+ "'%s', base type has no content type",
+ type->name);
+ return (-1);
+ }
+ } else if ((base->contentType == XML_SCHEMA_CONTENT_MIXED) &&
+ (WXS_IS_RESTRICTION(type))) {
+
+ /*
+ * 2.1.2 only if the <restriction> alternative is also
+ * chosen, a complex type definition whose {content type}
+ * is mixed and a particle emptiable.
+ */
+ if (! xmlSchemaIsParticleEmptiable(
+ (xmlSchemaParticlePtr) base->subtypes)) {
+ ret = XML_SCHEMAP_SRC_CT_1;
+ } else
+ /*
+ * Attention: at this point the <simpleType> child is in
+ * ->contentTypeDef (put there during parsing).
+ */
+ if (type->contentTypeDef == NULL) {
+ xmlChar *str = NULL;
+ /*
+ * 2.2 If clause 2.1.2 above is satisfied, then there
+ * must be a <simpleType> among the [children] of
+ * <restriction>.
+ */
+ /* TODO: Change error code to ..._SRC_CT_2_2. */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ WXS_BASIC_CAST type, NULL,
+ "A <simpleType> is expected among the children "
+ "of <restriction>, if <simpleContent> is used and "
+ "the base type '%s' is a complex type",
+ xmlSchemaFormatQName(&str, base->targetNamespace,
+ base->name));
+ FREE_AND_NULL(str)
+ return (XML_SCHEMAP_SRC_CT_1);
+ }
+ } else {
+ ret = XML_SCHEMAP_SRC_CT_1;
+ }
+ }
+ if (ret > 0) {
+ xmlChar *str = NULL;
+ if (WXS_IS_RESTRICTION(type)) {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ WXS_BASIC_CAST type, NULL,
+ "If <simpleContent> and <restriction> is used, the "
+ "base type must be a simple type or a complex type with "
+ "mixed content and particle emptiable. The base type "
+ "'%s' is none of those",
+ xmlSchemaFormatQName(&str, base->targetNamespace,
+ base->name));
+ } else {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_CT_1,
+ WXS_BASIC_CAST type, NULL,
+ "If <simpleContent> and <extension> is used, the "
+ "base type must be a simple type. The base type '%s' "
+ "is a complex type",
+ xmlSchemaFormatQName(&str, base->targetNamespace,
+ base->name));
+ }
+ FREE_AND_NULL(str)
+ }
+ }
+ /*
+ * SPEC (3) "The corresponding complex type definition component must
+ * satisfy the conditions set out in Constraints on Complex Type
+ * Definition Schema Components ($3.4.6);"
+ * NOTE (3) will be done in xmlSchemaTypeFixup().
+ */
+ /*
+ * SPEC (4) If clause 2.2.1 or clause 2.2.2 in the correspondence specification
+ * above for {attribute wildcard} is satisfied, the intensional
+ * intersection must be expressible, as defined in Attribute Wildcard
+ * Intersection ($3.10.6).
+ * NOTE (4) is done in xmlSchemaFixupTypeAttributeUses().
+ */
+ return (ret);
+}
+
+#ifdef ENABLE_PARTICLE_RESTRICTION
+/**
+ * xmlSchemaCheckParticleRangeOK:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Occurrence Range OK (range-ok)
+ *
+ * STATUS: complete
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckParticleRangeOK(int rmin, int rmax,
+ int bmin, int bmax)
+{
+ if (rmin < bmin)
+ return (1);
+ if ((bmax != UNBOUNDED) &&
+ (rmax > bmax))
+ return (1);
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckRCaseNameAndTypeOK:
+ * @ctxt: the schema parser context
+ * @r: the restricting element declaration particle
+ * @b: the base element declaration particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Restriction OK (Elt:Elt -- NameAndTypeOK)
+ * (rcase-NameAndTypeOK)
+ *
+ * STATUS:
+ * MISSING (3.2.3)
+ * CLARIFY: (3.2.2)
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseNameAndTypeOK(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ xmlSchemaElementPtr elemR, elemB;
+
+ /* TODO: Error codes (rcase-NameAndTypeOK). */
+ elemR = (xmlSchemaElementPtr) r->children;
+ elemB = (xmlSchemaElementPtr) b->children;
+ /*
+ * SPEC (1) "The declarations' {name}s and {target namespace}s are
+ * the same."
+ */
+ if ((elemR != elemB) &&
+ ((! xmlStrEqual(elemR->name, elemB->name)) ||
+ (! xmlStrEqual(elemR->targetNamespace, elemB->targetNamespace))))
+ return (1);
+ /*
+ * SPEC (2) "R's occurrence range is a valid restriction of B's
+ * occurrence range as defined by Occurrence Range OK ($3.9.6)."
+ */
+ if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
+ b->minOccurs, b->maxOccurs) != 0)
+ return (1);
+ /*
+ * SPEC (3.1) "Both B's declaration's {scope} and R's declaration's
+ * {scope} are global."
+ */
+ if (elemR == elemB)
+ return (0);
+ /*
+ * SPEC (3.2.1) "Either B's {nillable} is true or R's {nillable} is false."
+ */
+ if (((elemB->flags & XML_SCHEMAS_ELEM_NILLABLE) == 0) &&
+ (elemR->flags & XML_SCHEMAS_ELEM_NILLABLE))
+ return (1);
+ /*
+ * SPEC (3.2.2) "either B's declaration's {value constraint} is absent,
+ * or is not fixed, or R's declaration's {value constraint} is fixed
+ * with the same value."
+ */
+ if ((elemB->value != NULL) && (elemB->flags & XML_SCHEMAS_ELEM_FIXED) &&
+ ((elemR->value == NULL) ||
+ ((elemR->flags & XML_SCHEMAS_ELEM_FIXED) == 0) ||
+ /* TODO: Equality of the initial value or normalized or canonical? */
+ (! xmlStrEqual(elemR->value, elemB->value))))
+ return (1);
+ /*
+ * TODO: SPEC (3.2.3) "R's declaration's {identity-constraint
+ * definitions} is a subset of B's declaration's {identity-constraint
+ * definitions}, if any."
+ */
+ if (elemB->idcs != NULL) {
+ /* TODO */
+ }
+ /*
+ * SPEC (3.2.4) "R's declaration's {disallowed substitutions} is a
+ * superset of B's declaration's {disallowed substitutions}."
+ */
+ if (((elemB->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) &&
+ ((elemR->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) == 0)) ||
+ ((elemB->flags & XML_SCHEMAS_ELEM_BLOCK_RESTRICTION) &&
+ ((elemR->flags & XML_SCHEMAS_ELEM_BLOCK_RESTRICTION) == 0)) ||
+ ((elemB->flags & XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION) &&
+ ((elemR->flags & XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION) == 0)))
+ return (1);
+ /*
+ * SPEC (3.2.5) "R's {type definition} is validly derived given
+ * {extension, list, union} from B's {type definition}"
+ *
+ * BADSPEC TODO: What's the point of adding "list" and "union" to the
+ * set, if the corresponding constraints handle "restriction" and
+ * "extension" only?
+ *
+ */
+ {
+ int set = 0;
+
+ set |= SUBSET_EXTENSION;
+ set |= SUBSET_LIST;
+ set |= SUBSET_UNION;
+ if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST ctxt, elemR->subtypes,
+ elemB->subtypes, set) != 0)
+ return (1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckRCaseNSCompat:
+ * @ctxt: the schema parser context
+ * @r: the restricting element declaration particle
+ * @b: the base wildcard particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Derivation OK (Elt:Any -- NSCompat)
+ * (rcase-NSCompat)
+ *
+ * STATUS: complete
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseNSCompat(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ /* TODO:Error codes (rcase-NSCompat). */
+ /*
+ * SPEC "For an element declaration particle to be a `valid restriction`
+ * of a wildcard particle all of the following must be true:"
+ *
+ * SPEC (1) "The element declaration's {target namespace} is `valid`
+ * with respect to the wildcard's {namespace constraint} as defined by
+ * Wildcard allows Namespace Name ($3.10.4)."
+ */
+ if (xmlSchemaCheckCVCWildcardNamespace((xmlSchemaWildcardPtr) b->children,
+ ((xmlSchemaElementPtr) r->children)->targetNamespace) != 0)
+ return (1);
+ /*
+ * SPEC (2) "R's occurrence range is a valid restriction of B's
+ * occurrence range as defined by Occurrence Range OK ($3.9.6)."
+ */
+ if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
+ b->minOccurs, b->maxOccurs) != 0)
+ return (1);
+
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckRCaseRecurseAsIfGroup:
+ * @ctxt: the schema parser context
+ * @r: the restricting element declaration particle
+ * @b: the base model group particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Derivation OK (Elt:All/Choice/Sequence -- RecurseAsIfGroup)
+ * (rcase-RecurseAsIfGroup)
+ *
+ * STATUS: TODO
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseRecurseAsIfGroup(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ /* TODO: Error codes (rcase-RecurseAsIfGroup). */
+ TODO
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckRCaseNSSubset:
+ * @ctxt: the schema parser context
+ * @r: the restricting wildcard particle
+ * @b: the base wildcard particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Derivation OK (Any:Any -- NSSubset)
+ * (rcase-NSSubset)
+ *
+ * STATUS: complete
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseNSSubset(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b,
+ int isAnyTypeBase)
+{
+ /* TODO: Error codes (rcase-NSSubset). */
+ /*
+ * SPEC (1) "R's occurrence range is a valid restriction of B's
+ * occurrence range as defined by Occurrence Range OK ($3.9.6)."
+ */
+ if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
+ b->minOccurs, b->maxOccurs))
+ return (1);
+ /*
+ * SPEC (2) "R's {namespace constraint} must be an intensional subset
+ * of B's {namespace constraint} as defined by Wildcard Subset ($3.10.6)."
+ */
+ if (xmlSchemaCheckCOSNSSubset((xmlSchemaWildcardPtr) r->children,
+ (xmlSchemaWildcardPtr) b->children))
+ return (1);
+ /*
+ * SPEC (3) "Unless B is the content model wildcard of the `ur-type
+ * definition`, R's {process contents} must be identical to or stronger
+ * than B's {process contents}, where strict is stronger than lax is
+ * stronger than skip."
+ */
+ if (! isAnyTypeBase) {
+ if ( ((xmlSchemaWildcardPtr) r->children)->processContents <
+ ((xmlSchemaWildcardPtr) b->children)->processContents)
+ return (1);
+ }
+
+ return (0);
+}
+
+/**
+ * xmlSchemaCheckCOSParticleRestrict:
+ * @ctxt: the schema parser context
+ * @type: the complex type definition
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Valid (Restriction) (cos-particle-restrict)
+ *
+ * STATUS: TODO
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckCOSParticleRestrict(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ int ret = 0;
+
+ /*part = WXS_TYPE_PARTICLE(type);
+ basePart = WXS_TYPE_PARTICLE(base);
+ */
+
+ TODO
+
+ /*
+ * SPEC (1) "They are the same particle."
+ */
+ if (r == b)
+ return (0);
+
+
+ return (0);
+}
+
+#if 0
+/**
+ * xmlSchemaCheckRCaseNSRecurseCheckCardinality:
+ * @ctxt: the schema parser context
+ * @r: the model group particle
+ * @b: the base wildcard particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Derivation OK (All/Choice/Sequence:Any --
+ * NSRecurseCheckCardinality)
+ * (rcase-NSRecurseCheckCardinality)
+ *
+ * STATUS: TODO: subst-groups
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseNSRecurseCheckCardinality(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ xmlSchemaParticlePtr part;
+ /* TODO: Error codes (rcase-NSRecurseCheckCardinality). */
+ if ((r->children == NULL) || (r->children->children == NULL))
+ return (-1);
+ /*
+ * SPEC "For a group particle to be a `valid restriction` of a
+ * wildcard particle..."
+ *
+ * SPEC (1) "Every member of the {particles} of the group is a `valid
+ * restriction` of the wildcard as defined by
+ * Particle Valid (Restriction) ($3.9.6)."
+ */
+ part = (xmlSchemaParticlePtr) r->children->children;
+ do {
+ if (xmlSchemaCheckCOSParticleRestrict(ctxt, part, b))
+ return (1);
+ part = (xmlSchemaParticlePtr) part->next;
+ } while (part != NULL);
+ /*
+ * SPEC (2) "The effective total range of the group [...] is a
+ * valid restriction of B's occurrence range as defined by
+ * Occurrence Range OK ($3.9.6)."
+ */
+ if (xmlSchemaCheckParticleRangeOK(
+ xmlSchemaGetParticleTotalRangeMin(r),
+ xmlSchemaGetParticleTotalRangeMax(r),
+ b->minOccurs, b->maxOccurs) != 0)
+ return (1);
+ return (0);
+}
+#endif
+
+/**
+ * xmlSchemaCheckRCaseRecurse:
+ * @ctxt: the schema parser context
+ * @r: the <all> or <sequence> model group particle
+ * @b: the base <all> or <sequence> model group particle
+ *
+ * (3.9.6) Constraints on Particle Schema Components
+ * Schema Component Constraint:
+ * Particle Derivation OK (All:All,Sequence:Sequence --
+ Recurse)
+ * (rcase-Recurse)
+ *
+ * STATUS: ?
+ * TODO: subst-groups
+ *
+ * Returns 0 if the constraints are satisfied, a positive
+ * error code if not and -1 if an internal error occured.
+ */
+static int
+xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaParticlePtr r,
+ xmlSchemaParticlePtr b)
+{
+ /* xmlSchemaParticlePtr part; */
+ /* TODO: Error codes (rcase-Recurse). */
+ if ((r->children == NULL) || (b->children == NULL) ||
+ (r->children->type != b->children->type))
+ return (-1);
+ /*
+ * SPEC "For an all or sequence group particle to be a `valid
+ * restriction` of another group particle with the same {compositor}..."
+ *
+ * SPEC (1) "R's occurrence range is a valid restriction of B's
+ * occurrence range as defined by Occurrence Range OK ($3.9.6)."
+ */
+ if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
+ b->minOccurs, b->maxOccurs))
+ return (1);
+
+
+ return (0);
+}
+
+#endif
+
+#define FACET_RESTR_MUTUAL_ERR(fac1, fac2) \
+ xmlSchemaPCustomErrExt(pctxt, \
+ XML_SCHEMAP_INVALID_FACET_VALUE, \
+ WXS_BASIC_CAST fac1, fac1->node, \
+ "It is an error for both '%s' and '%s' to be specified on the "\
+ "same type definition", \
+ BAD_CAST xmlSchemaFacetTypeToString(fac1->type), \
+ BAD_CAST xmlSchemaFacetTypeToString(fac2->type), NULL);
+
+#define FACET_RESTR_ERR(fac1, msg) \
+ xmlSchemaPCustomErr(pctxt, \
+ XML_SCHEMAP_INVALID_FACET_VALUE, \
+ WXS_BASIC_CAST fac1, fac1->node, \
+ msg, NULL);
+
+#define FACET_RESTR_FIXED_ERR(fac) \
+ xmlSchemaPCustomErr(pctxt, \
+ XML_SCHEMAP_INVALID_FACET_VALUE, \
+ WXS_BASIC_CAST fac, fac->node, \
+ "The base type's facet is 'fixed', thus the value must not " \
+ "differ", NULL);
+
+static void
+xmlSchemaDeriveFacetErr(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaFacetPtr facet1,
+ xmlSchemaFacetPtr facet2,
+ int lessGreater,
+ int orEqual,
+ int ofBase)
+{
+ xmlChar *msg = NULL;
+
+ msg = xmlStrdup(BAD_CAST "'");
+ msg = xmlStrcat(msg, xmlSchemaFacetTypeToString(facet1->type));
+ msg = xmlStrcat(msg, BAD_CAST "' has to be");
+ if (lessGreater == 0)
+ msg = xmlStrcat(msg, BAD_CAST " equal to");
+ if (lessGreater == 1)
+ msg = xmlStrcat(msg, BAD_CAST " greater than");
+ else
+ msg = xmlStrcat(msg, BAD_CAST " less than");
+
+ if (orEqual)
+ msg = xmlStrcat(msg, BAD_CAST " or equal to");
+ msg = xmlStrcat(msg, BAD_CAST " '");
+ msg = xmlStrcat(msg, xmlSchemaFacetTypeToString(facet2->type));
+ if (ofBase)
+ msg = xmlStrcat(msg, BAD_CAST "' of the base type");
+ else
+ msg = xmlStrcat(msg, BAD_CAST "'");
+
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_INVALID_FACET_VALUE,
+ WXS_BASIC_CAST facet1, NULL,
+ (const char *) msg, NULL);
+
+ if (msg != NULL)
+ xmlFree(msg);
+}
+
+/*
+* xmlSchemaDeriveAndValidateFacets:
+*
+* Schema Component Constraint: Simple Type Restriction (Facets)
+* (st-restrict-facets)
+*/
+static int
+xmlSchemaDeriveAndValidateFacets(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypePtr base = type->baseType;
+ xmlSchemaFacetLinkPtr link, cur, last = NULL;
+ xmlSchemaFacetPtr facet, bfacet,
+ flength = NULL, ftotdig = NULL, ffracdig = NULL,
+ fmaxlen = NULL, fminlen = NULL, /* facets of the current type */
+ fmininc = NULL, fmaxinc = NULL,
+ fminexc = NULL, fmaxexc = NULL,
+ bflength = NULL, bftotdig = NULL, bffracdig = NULL,
+ bfmaxlen = NULL, bfminlen = NULL, /* facets of the base type */
+ bfmininc = NULL, bfmaxinc = NULL,
+ bfminexc = NULL, bfmaxexc = NULL;
+ int res; /* err = 0, fixedErr; */
+
+ /*
+ * SPEC st-restrict-facets 1:
+ * "The {variety} of R is the same as that of B."
+ */
+ /*
+ * SPEC st-restrict-facets 2:
+ * "If {variety} is atomic, the {primitive type definition}
+ * of R is the same as that of B."
+ *
+ * NOTE: we leave 1 & 2 out for now, since this will be
+ * satisfied by the derivation process.
+ * CONSTRUCTION TODO: Maybe needed if using a construction API.
+ */
+ /*
+ * SPEC st-restrict-facets 3:
+ * "The {facets} of R are the union of S and the {facets}
+ * of B, eliminating duplicates. To eliminate duplicates,
+ * when a facet of the same kind occurs in both S and the
+ * {facets} of B, the one in the {facets} of B is not
+ * included, with the exception of enumeration and pattern
+ * facets, for which multiple occurrences with distinct values
+ * are allowed."
+ */
+
+ if ((type->facetSet == NULL) && (base->facetSet == NULL))
+ return (0);
+
+ last = type->facetSet;
+ if (last != NULL)
+ while (last->next != NULL)
+ last = last->next;
+
+ for (cur = type->facetSet; cur != NULL; cur = cur->next) {
+ facet = cur->facet;
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_LENGTH:
+ flength = facet; break;
+ case XML_SCHEMA_FACET_MINLENGTH:
+ fminlen = facet; break;
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ fmininc = facet; break;
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ fminexc = facet; break;
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ fmaxlen = facet; break;
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ fmaxinc = facet; break;
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ fmaxexc = facet; break;
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ ftotdig = facet; break;
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ ffracdig = facet; break;
+ default:
+ break;
+ }
+ }
+ for (cur = base->facetSet; cur != NULL; cur = cur->next) {
+ facet = cur->facet;
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_LENGTH:
+ bflength = facet; break;
+ case XML_SCHEMA_FACET_MINLENGTH:
+ bfminlen = facet; break;
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ bfmininc = facet; break;
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ bfminexc = facet; break;
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ bfmaxlen = facet; break;
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ bfmaxinc = facet; break;
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ bfmaxexc = facet; break;
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ bftotdig = facet; break;
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ bffracdig = facet; break;
+ default:
+ break;
+ }
+ }
+ /*
+ * length and minLength or maxLength (2.2) + (3.2)
+ */
+ if (flength && (fminlen || fmaxlen)) {
+ FACET_RESTR_ERR(flength, "It is an error for both 'length' and "
+ "either of 'minLength' or 'maxLength' to be specified on "
+ "the same type definition")
+ }
+ /*
+ * Mutual exclusions in the same derivation step.
+ */
+ if ((fmaxinc) && (fmaxexc)) {
+ /*
+ * SCC "maxInclusive and maxExclusive"
+ */
+ FACET_RESTR_MUTUAL_ERR(fmaxinc, fmaxexc)
+ }
+ if ((fmininc) && (fminexc)) {
+ /*
+ * SCC "minInclusive and minExclusive"
+ */
+ FACET_RESTR_MUTUAL_ERR(fmininc, fminexc)
+ }
+
+ if (flength && bflength) {
+ /*
+ * SCC "length valid restriction"
+ * The values have to be equal.
+ */
+ res = xmlSchemaCompareValues(flength->val, bflength->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != 0)
+ xmlSchemaDeriveFacetErr(pctxt, flength, bflength, 0, 0, 1);
+ if ((res != 0) && (bflength->fixed)) {
+ FACET_RESTR_FIXED_ERR(flength)
+ }
+
+ }
+ if (fminlen && bfminlen) {
+ /*
+ * SCC "minLength valid restriction"
+ * minLength >= BASE minLength
+ */
+ res = xmlSchemaCompareValues(fminlen->val, bfminlen->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1)
+ xmlSchemaDeriveFacetErr(pctxt, fminlen, bfminlen, 1, 1, 1);
+ if ((res != 0) && (bfminlen->fixed)) {
+ FACET_RESTR_FIXED_ERR(fminlen)
+ }
+ }
+ if (fmaxlen && bfmaxlen) {
+ /*
+ * SCC "maxLength valid restriction"
+ * maxLength <= BASE minLength
+ */
+ res = xmlSchemaCompareValues(fmaxlen->val, bfmaxlen->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, fmaxlen, bfmaxlen, -1, 1, 1);
+ if ((res != 0) && (bfmaxlen->fixed)) {
+ FACET_RESTR_FIXED_ERR(fmaxlen)
+ }
+ }
+ /*
+ * SCC "length and minLength or maxLength"
+ */
+ if (! flength)
+ flength = bflength;
+ if (flength) {
+ if (! fminlen)
+ fminlen = bfminlen;
+ if (fminlen) {
+ /* (1.1) length >= minLength */
+ res = xmlSchemaCompareValues(flength->val, fminlen->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1)
+ xmlSchemaDeriveFacetErr(pctxt, flength, fminlen, 1, 1, 0);
+ }
+ if (! fmaxlen)
+ fmaxlen = bfmaxlen;
+ if (fmaxlen) {
+ /* (2.1) length <= maxLength */
+ res = xmlSchemaCompareValues(flength->val, fmaxlen->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, flength, fmaxlen, -1, 1, 0);
+ }
+ }
+ if (fmaxinc) {
+ /*
+ * "maxInclusive"
+ */
+ if (fmininc) {
+ /* SCC "maxInclusive >= minInclusive" */
+ res = xmlSchemaCompareValues(fmaxinc->val, fmininc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxinc, fmininc, 1, 1, 0);
+ }
+ }
+ /*
+ * SCC "maxInclusive valid restriction"
+ */
+ if (bfmaxinc) {
+ /* maxInclusive <= BASE maxInclusive */
+ res = xmlSchemaCompareValues(fmaxinc->val, bfmaxinc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmaxinc, -1, 1, 1);
+ if ((res != 0) && (bfmaxinc->fixed)) {
+ FACET_RESTR_FIXED_ERR(fmaxinc)
+ }
+ }
+ if (bfmaxexc) {
+ /* maxInclusive < BASE maxExclusive */
+ res = xmlSchemaCompareValues(fmaxinc->val, bfmaxexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmaxexc, -1, 0, 1);
+ }
+ }
+ if (bfmininc) {
+ /* maxInclusive >= BASE minInclusive */
+ res = xmlSchemaCompareValues(fmaxinc->val, bfmininc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfmininc, 1, 1, 1);
+ }
+ }
+ if (bfminexc) {
+ /* maxInclusive > BASE minExclusive */
+ res = xmlSchemaCompareValues(fmaxinc->val, bfminexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxinc, bfminexc, 1, 0, 1);
+ }
+ }
+ }
+ if (fmaxexc) {
+ /*
+ * "maxExclusive >= minExclusive"
+ */
+ if (fminexc) {
+ res = xmlSchemaCompareValues(fmaxexc->val, fminexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxexc, fminexc, 1, 1, 0);
+ }
+ }
+ /*
+ * "maxExclusive valid restriction"
+ */
+ if (bfmaxexc) {
+ /* maxExclusive <= BASE maxExclusive */
+ res = xmlSchemaCompareValues(fmaxexc->val, bfmaxexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmaxexc, -1, 1, 1);
+ }
+ if ((res != 0) && (bfmaxexc->fixed)) {
+ FACET_RESTR_FIXED_ERR(fmaxexc)
+ }
+ }
+ if (bfmaxinc) {
+ /* maxExclusive <= BASE maxInclusive */
+ res = xmlSchemaCompareValues(fmaxexc->val, bfmaxinc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmaxinc, -1, 1, 1);
+ }
+ }
+ if (bfmininc) {
+ /* maxExclusive > BASE minInclusive */
+ res = xmlSchemaCompareValues(fmaxexc->val, bfmininc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfmininc, 1, 0, 1);
+ }
+ }
+ if (bfminexc) {
+ /* maxExclusive > BASE minExclusive */
+ res = xmlSchemaCompareValues(fmaxexc->val, bfminexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmaxexc, bfminexc, 1, 0, 1);
+ }
+ }
+ }
+ if (fminexc) {
+ /*
+ * "minExclusive < maxInclusive"
+ */
+ if (fmaxinc) {
+ res = xmlSchemaCompareValues(fminexc->val, fmaxinc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fminexc, fmaxinc, -1, 0, 0);
+ }
+ }
+ /*
+ * "minExclusive valid restriction"
+ */
+ if (bfminexc) {
+ /* minExclusive >= BASE minExclusive */
+ res = xmlSchemaCompareValues(fminexc->val, bfminexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fminexc, bfminexc, 1, 1, 1);
+ }
+ if ((res != 0) && (bfminexc->fixed)) {
+ FACET_RESTR_FIXED_ERR(fminexc)
+ }
+ }
+ if (bfmaxinc) {
+ /* minExclusive <= BASE maxInclusive */
+ res = xmlSchemaCompareValues(fminexc->val, bfmaxinc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmaxinc, -1, 1, 1);
+ }
+ }
+ if (bfmininc) {
+ /* minExclusive >= BASE minInclusive */
+ res = xmlSchemaCompareValues(fminexc->val, bfmininc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmininc, 1, 1, 1);
+ }
+ }
+ if (bfmaxexc) {
+ /* minExclusive < BASE maxExclusive */
+ res = xmlSchemaCompareValues(fminexc->val, bfmaxexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fminexc, bfmaxexc, -1, 0, 1);
+ }
+ }
+ }
+ if (fmininc) {
+ /*
+ * "minInclusive < maxExclusive"
+ */
+ if (fmaxexc) {
+ res = xmlSchemaCompareValues(fmininc->val, fmaxexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmininc, fmaxexc, -1, 0, 0);
+ }
+ }
+ /*
+ * "minExclusive valid restriction"
+ */
+ if (bfmininc) {
+ /* minInclusive >= BASE minInclusive */
+ res = xmlSchemaCompareValues(fmininc->val, bfmininc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == -1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmininc, 1, 1, 1);
+ }
+ if ((res != 0) && (bfmininc->fixed)) {
+ FACET_RESTR_FIXED_ERR(fmininc)
+ }
+ }
+ if (bfmaxinc) {
+ /* minInclusive <= BASE maxInclusive */
+ res = xmlSchemaCompareValues(fmininc->val, bfmaxinc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1) {
+ xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmaxinc, -1, 1, 1);
+ }
+ }
+ if (bfminexc) {
+ /* minInclusive > BASE minExclusive */
+ res = xmlSchemaCompareValues(fmininc->val, bfminexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != 1)
+ xmlSchemaDeriveFacetErr(pctxt, fmininc, bfminexc, 1, 0, 1);
+ }
+ if (bfmaxexc) {
+ /* minInclusive < BASE maxExclusive */
+ res = xmlSchemaCompareValues(fmininc->val, bfmaxexc->val);
+ if (res == -2)
+ goto internal_error;
+ if (res != -1)
+ xmlSchemaDeriveFacetErr(pctxt, fmininc, bfmaxexc, -1, 0, 1);
+ }
+ }
+ if (ftotdig && bftotdig) {
+ /*
+ * SCC " totalDigits valid restriction"
+ * totalDigits <= BASE totalDigits
+ */
+ res = xmlSchemaCompareValues(ftotdig->val, bftotdig->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, ftotdig, bftotdig,
+ -1, 1, 1);
+ if ((res != 0) && (bftotdig->fixed)) {
+ FACET_RESTR_FIXED_ERR(ftotdig)
+ }
+ }
+ if (ffracdig && bffracdig) {
+ /*
+ * SCC "fractionDigits valid restriction"
+ * fractionDigits <= BASE fractionDigits
+ */
+ res = xmlSchemaCompareValues(ffracdig->val, bffracdig->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, ffracdig, bffracdig,
+ -1, 1, 1);
+ if ((res != 0) && (bffracdig->fixed)) {
+ FACET_RESTR_FIXED_ERR(ffracdig)
+ }
+ }
+ /*
+ * SCC "fractionDigits less than or equal to totalDigits"
+ */
+ if (! ftotdig)
+ ftotdig = bftotdig;
+ if (! ffracdig)
+ ffracdig = bffracdig;
+ if (ftotdig && ffracdig) {
+ res = xmlSchemaCompareValues(ffracdig->val, ftotdig->val);
+ if (res == -2)
+ goto internal_error;
+ if (res == 1)
+ xmlSchemaDeriveFacetErr(pctxt, ffracdig, ftotdig,
+ -1, 1, 0);
+ }
+ /*
+ * *Enumerations* won' be added here, since only the first set
+ * of enumerations in the ancestor-or-self axis is used
+ * for validation, plus we need to use the base type of those
+ * enumerations for whitespace.
+ *
+ * *Patterns*: won't be add here, since they are ORed at
+ * type level and ANDed at ancestor level. This will
+ * happed during validation by walking the base axis
+ * of the type.
+ */
+ for (cur = base->facetSet; cur != NULL; cur = cur->next) {
+ bfacet = cur->facet;
+ /*
+ * Special handling of enumerations and patterns.
+ * TODO: hmm, they should not appear in the set, so remove this.
+ */
+ if ((bfacet->type == XML_SCHEMA_FACET_PATTERN) ||
+ (bfacet->type == XML_SCHEMA_FACET_ENUMERATION))
+ continue;
+ /*
+ * Search for a duplicate facet in the current type.
+ */
+ link = type->facetSet;
+ /* err = 0; */
+ /* fixedErr = 0; */
+ while (link != NULL) {
+ facet = link->facet;
+ if (facet->type == bfacet->type) {
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_WHITESPACE:
+ /*
+ * The whitespace must be stronger.
+ */
+ if (facet->whitespace < bfacet->whitespace) {
+ FACET_RESTR_ERR(facet,
+ "The 'whitespace' value has to be equal to "
+ "or stronger than the 'whitespace' value of "
+ "the base type")
+ }
+ if ((bfacet->fixed) &&
+ (facet->whitespace != bfacet->whitespace)) {
+ FACET_RESTR_FIXED_ERR(facet)
+ }
+ break;
+ default:
+ break;
+ }
+ /* Duplicate found. */
+ break;
+ }
+ link = link->next;
+ }
+ /*
+ * If no duplicate was found: add the base types's facet
+ * to the set.
+ */
+ if (link == NULL) {
+ link = (xmlSchemaFacetLinkPtr)
+ xmlMalloc(sizeof(xmlSchemaFacetLink));
+ if (link == NULL) {
+ xmlSchemaPErrMemory(pctxt,
+ "deriving facets, creating a facet link", NULL);
+ return (-1);
+ }
+ link->facet = cur->facet;
+ link->next = NULL;
+ if (last == NULL)
+ type->facetSet = link;
+ else
+ last->next = link;
+ last = link;
+ }
+
+ }
+
+ return (0);
+internal_error:
+ PERROR_INT("xmlSchemaDeriveAndValidateFacets",
+ "an error occured");
+ return (-1);
+}
+
+static int
+xmlSchemaFinishMemberTypeDefinitionsProperty(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ xmlSchemaTypeLinkPtr link, lastLink, prevLink, subLink, newLink;
+ /*
+ * The actual value is then formed by replacing any union type
+ * definition in the `explicit members` with the members of their
+ * {member type definitions}, in order.
+ *
+ * TODO: There's a bug entry at
+ * "http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0287.html"
+ * which indicates that we'll keep the union types the future.
+ */
+ link = type->memberTypes;
+ while (link != NULL) {
+
+ if (WXS_IS_TYPE_NOT_FIXED(link->type))
+ xmlSchemaTypeFixup(link->type, ACTXT_CAST pctxt);
+
+ if (WXS_IS_UNION(link->type)) {
+ subLink = xmlSchemaGetUnionSimpleTypeMemberTypes(link->type);
+ if (subLink != NULL) {
+ link->type = subLink->type;
+ if (subLink->next != NULL) {
+ lastLink = link->next;
+ subLink = subLink->next;
+ prevLink = link;
+ while (subLink != NULL) {
+ newLink = (xmlSchemaTypeLinkPtr)
+ xmlMalloc(sizeof(xmlSchemaTypeLink));
+ if (newLink == NULL) {
+ xmlSchemaPErrMemory(pctxt, "allocating a type link",
+ NULL);
+ return (-1);
+ }
+ newLink->type = subLink->type;
+ prevLink->next = newLink;
+ prevLink = newLink;
+ newLink->next = lastLink;
+
+ subLink = subLink->next;
+ }
+ }
+ }
+ }
+ link = link->next;
+ }
+ return (0);
+}
+
+static void
+xmlSchemaTypeFixupOptimFacets(xmlSchemaTypePtr type)
+{
+ int has = 0, needVal = 0, normVal = 0;
+
+ has = (type->baseType->flags & XML_SCHEMAS_TYPE_HAS_FACETS) ? 1 : 0;
+ if (has) {
+ needVal = (type->baseType->flags &
+ XML_SCHEMAS_TYPE_FACETSNEEDVALUE) ? 1 : 0;
+ normVal = (type->baseType->flags &
+ XML_SCHEMAS_TYPE_NORMVALUENEEDED) ? 1 : 0;
+ }
+ if (type->facets != NULL) {
+ xmlSchemaFacetPtr fac;
+
+ for (fac = type->facets; fac != NULL; fac = fac->next) {
+ switch (fac->type) {
+ case XML_SCHEMA_FACET_WHITESPACE:
+ break;
+ case XML_SCHEMA_FACET_PATTERN:
+ normVal = 1;
+ has = 1;
+ break;
+ case XML_SCHEMA_FACET_ENUMERATION:
+ needVal = 1;
+ normVal = 1;
+ has = 1;
+ break;
+ default:
+ has = 1;
+ break;
+ }
+ }
+ }
+ if (normVal)
+ type->flags |= XML_SCHEMAS_TYPE_NORMVALUENEEDED;
+ if (needVal)
+ type->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE;
+ if (has)
+ type->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;
+
+ if (has && (! needVal) && WXS_IS_ATOMIC(type)) {
+ xmlSchemaTypePtr prim = xmlSchemaGetPrimitiveType(type);
+ /*
+ * OPTIMIZE VAL TODO: Some facets need a computed value.
+ */
+ if ((prim->builtInType != XML_SCHEMAS_ANYSIMPLETYPE) &&
+ (prim->builtInType != XML_SCHEMAS_STRING)) {
+ type->flags |= XML_SCHEMAS_TYPE_FACETSNEEDVALUE;
+ }
+ }
+}
+
+static int
+xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type)
+{
+
+
+ /*
+ * Evaluate the whitespace-facet value.
+ */
+ if (WXS_IS_LIST(type)) {
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;
+ return (0);
+ } else if (WXS_IS_UNION(type))
+ return (0);
+
+ if (type->facetSet != NULL) {
+ xmlSchemaFacetLinkPtr lin;
+
+ for (lin = type->facetSet; lin != NULL; lin = lin->next) {
+ if (lin->facet->type == XML_SCHEMA_FACET_WHITESPACE) {
+ switch (lin->facet->whitespace) {
+ case XML_SCHEMAS_FACET_PRESERVE:
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE;
+ break;
+ case XML_SCHEMAS_FACET_REPLACE:
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_REPLACE;
+ break;
+ case XML_SCHEMAS_FACET_COLLAPSE:
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;
+ break;
+ default:
+ return (-1);
+ }
+ return (0);
+ }
+ }
+ }
+ /*
+ * For all `atomic` datatypes other than string (and types `derived`
+ * by `restriction` from it) the value of whiteSpace is fixed to
+ * collapse
+ */
+ {
+ xmlSchemaTypePtr anc;
+
+ for (anc = type->baseType; anc != NULL &&
+ anc->builtInType != XML_SCHEMAS_ANYTYPE;
+ anc = anc->baseType) {
+
+ if (anc->type == XML_SCHEMA_TYPE_BASIC) {
+ if (anc->builtInType == XML_SCHEMAS_NORMSTRING) {
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_REPLACE;
+
+ } else if ((anc->builtInType == XML_SCHEMAS_STRING) ||
+ (anc->builtInType == XML_SCHEMAS_ANYSIMPLETYPE)) {
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE;
+
+ } else
+ type->flags |= XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE;
+ break;
+ }
+ }
+ }
+ return (0);
+}
+
+static int
+xmlSchemaFixupSimpleTypeStageOne(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ if (type->type != XML_SCHEMA_TYPE_SIMPLE)
+ return(0);
+ if (! WXS_IS_TYPE_NOT_FIXED_1(type))
+ return(0);
+ type->flags |= XML_SCHEMAS_TYPE_FIXUP_1;
+
+ if (WXS_IS_LIST(type)) {
+ /*
+ * Corresponds to <simpleType><list>...
+ */
+ if (type->subtypes == NULL) {
+ /*
+ * This one is really needed, so get out.
+ */
+ PERROR_INT("xmlSchemaFixupSimpleTypeStageOne",
+ "list type has no item-type assigned");
+ return(-1);
+ }
+ } else if (WXS_IS_UNION(type)) {
+ /*
+ * Corresponds to <simpleType><union>...
+ */
+ if (type->memberTypes == NULL) {
+ /*
+ * This one is really needed, so get out.
+ */
+ PERROR_INT("xmlSchemaFixupSimpleTypeStageOne",
+ "union type has no member-types assigned");
+ return(-1);
+ }
+ } else {
+ /*
+ * Corresponds to <simpleType><restriction>...
+ */
+ if (type->baseType == NULL) {
+ PERROR_INT("xmlSchemaFixupSimpleTypeStageOne",
+ "type has no base-type assigned");
+ return(-1);
+ }
+ if (WXS_IS_TYPE_NOT_FIXED_1(type->baseType))
+ if (xmlSchemaFixupSimpleTypeStageOne(pctxt, type->baseType) == -1)
+ return(-1);
+ /*
+ * Variety
+ * If the <restriction> alternative is chosen, then the
+ * {variety} of the {base type definition}.
+ */
+ if (WXS_IS_ATOMIC(type->baseType))
+ type->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
+ else if (WXS_IS_LIST(type->baseType)) {
+ type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
+ /*
+ * Inherit the itemType.
+ */
+ type->subtypes = type->baseType->subtypes;
+ } else if (WXS_IS_UNION(type->baseType)) {
+ type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION;
+ /*
+ * NOTE that we won't assign the memberTypes of the base,
+ * since this will make trouble when freeing them; we will
+ * use a lookup function to access them instead.
+ */
+ }
+ }
+ return(0);
+}
+
+#ifdef DEBUG_TYPE
+static void
+xmlSchemaDebugFixedType(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ if (type->node != NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "Type of %s : %s:%d :", name,
+ type->node->doc->URL,
+ xmlGetLineNo(type->node));
+ } else {
+ xmlGenericError(xmlGenericErrorContext, "Type of %s :", name);
+ }
+ if ((WXS_IS_SIMPLE(type)) || (WXS_IS_COMPLEX(type))) {
+ switch (type->contentType) {
+ case XML_SCHEMA_CONTENT_SIMPLE:
+ xmlGenericError(xmlGenericErrorContext, "simple\n");
+ break;
+ case XML_SCHEMA_CONTENT_ELEMENTS:
+ xmlGenericError(xmlGenericErrorContext, "elements\n");
+ break;
+ case XML_SCHEMA_CONTENT_UNKNOWN:
+ xmlGenericError(xmlGenericErrorContext, "unknown !!!\n");
+ break;
+ case XML_SCHEMA_CONTENT_EMPTY:
+ xmlGenericError(xmlGenericErrorContext, "empty\n");
+ break;
+ case XML_SCHEMA_CONTENT_MIXED:
+ if (xmlSchemaIsParticleEmptiable((xmlSchemaParticlePtr)
+ type->subtypes))
+ xmlGenericError(xmlGenericErrorContext,
+ "mixed as emptiable particle\n");
+ else
+ xmlGenericError(xmlGenericErrorContext, "mixed\n");
+ break;
+ /* Removed, since not used. */
+ /*
+ case XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS:
+ xmlGenericError(xmlGenericErrorContext, "mixed or elems\n");
+ break;
+ */
+ case XML_SCHEMA_CONTENT_BASIC:
+ xmlGenericError(xmlGenericErrorContext, "basic\n");
+ break;
+ default:
+ xmlGenericError(xmlGenericErrorContext,
+ "not registered !!!\n");
+ break;
+ }
+ }
+}
+#endif
+
+/*
+* 3.14.6 Constraints on Simple Type Definition Schema Components
+*/
+static int
+xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ int res, olderrs = pctxt->nberrors;
+
+ if (type->type != XML_SCHEMA_TYPE_SIMPLE)
+ return(-1);
+
+ if (! WXS_IS_TYPE_NOT_FIXED(type))
+ return(0);
+
+ type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;
+ type->contentType = XML_SCHEMA_CONTENT_SIMPLE;
+
+ if (type->baseType == NULL) {
+ PERROR_INT("xmlSchemaFixupSimpleTypeStageTwo",
+ "missing baseType");
+ goto exit_failure;
+ }
+ if (WXS_IS_TYPE_NOT_FIXED(type->baseType))
+ xmlSchemaTypeFixup(type->baseType, ACTXT_CAST pctxt);
+ /*
+ * If a member type of a union is a union itself, we need to substitute
+ * that member type for its member types.
+ * NOTE that this might change in WXS 1.1; i.e. we will keep the union
+ * types in WXS 1.1.
+ */
+ if ((type->memberTypes != NULL) &&
+ (xmlSchemaFinishMemberTypeDefinitionsProperty(pctxt, type) == -1))
+ return(-1);
+ /*
+ * SPEC src-simple-type 1
+ * "The corresponding simple type definition, if any, must satisfy
+ * the conditions set out in Constraints on Simple Type Definition
+ * Schema Components ($3.14.6)."
+ */
+ /*
+ * Schema Component Constraint: Simple Type Definition Properties Correct
+ * (st-props-correct)
+ */
+ res = xmlSchemaCheckSTPropsCorrect(pctxt, type);
+ HFAILURE HERROR
+ /*
+ * Schema Component Constraint: Derivation Valid (Restriction, Simple)
+ * (cos-st-restricts)
+ */
+ res = xmlSchemaCheckCOSSTRestricts(pctxt, type);
+ HFAILURE HERROR
+ /*
+ * TODO: Removed the error report, since it got annoying to get an
+ * extra error report, if anything failed until now.
+ * Enable this if needed.
+ *
+ * xmlSchemaPErr(ctxt, type->node,
+ * XML_SCHEMAP_SRC_SIMPLE_TYPE_1,
+ * "Simple type '%s' does not satisfy the constraints "
+ * "on simple type definitions.\n",
+ * type->name, NULL);
+ */
+ /*
+ * Schema Component Constraint: Simple Type Restriction (Facets)
+ * (st-restrict-facets)
+ */
+ res = xmlSchemaCheckFacetValues(type, pctxt);
+ HFAILURE HERROR
+ if ((type->facetSet != NULL) ||
+ (type->baseType->facetSet != NULL)) {
+ res = xmlSchemaDeriveAndValidateFacets(pctxt, type);
+ HFAILURE HERROR
+ }
+ /*
+ * Whitespace value.
+ */
+ res = xmlSchemaTypeFixupWhitespace(type);
+ HFAILURE HERROR
+ xmlSchemaTypeFixupOptimFacets(type);
+
+exit_error:
+#ifdef DEBUG_TYPE
+ xmlSchemaDebugFixedType(pctxt, type);
+#endif
+ if (olderrs != pctxt->nberrors)
+ return(pctxt->err);
+ return(0);
+
+exit_failure:
+#ifdef DEBUG_TYPE
+ xmlSchemaDebugFixedType(pctxt, type);
+#endif
+ return(-1);
+}
+
+static int
+xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaTypePtr type)
+{
+ int res = 0, olderrs = pctxt->nberrors;
+ xmlSchemaTypePtr baseType = type->baseType;
+
+ if (! WXS_IS_TYPE_NOT_FIXED(type))
+ return(0);
+ type->flags |= XML_SCHEMAS_TYPE_INTERNAL_RESOLVED;
+ if (baseType == NULL) {
+ PERROR_INT("xmlSchemaFixupComplexType",
+ "missing baseType");
+ goto exit_failure;
+ }
+ /*
+ * Fixup the base type.
+ */
+ if (WXS_IS_TYPE_NOT_FIXED(baseType))
+ xmlSchemaTypeFixup(baseType, ACTXT_CAST pctxt);
+ if (baseType->flags & XML_SCHEMAS_TYPE_INTERNAL_INVALID) {
+ /*
+ * Skip fixup if the base type is invalid.
+ * TODO: Generate a warning!
+ */
+ return(0);
+ }
+ /*
+ * This basically checks if the base type can be derived.
+ */
+ res = xmlSchemaCheckSRCCT(pctxt, type);
+ HFAILURE HERROR
+ /*
+ * Fixup the content type.
+ */
+ if (type->contentType == XML_SCHEMA_CONTENT_SIMPLE) {
+ /*
+ * Corresponds to <complexType><simpleContent>...
+ */
+ if ((WXS_IS_COMPLEX(baseType)) &&
+ (baseType->contentTypeDef != NULL) &&
+ (WXS_IS_RESTRICTION(type))) {
+ xmlSchemaTypePtr contentBase, content;
+#ifdef ENABLE_NAMED_LOCALS
+ char buf[30];
+ const xmlChar *tmpname;
+#endif
+ /*
+ * SPEC (1) If <restriction> + base type is <complexType>,
+ * "whose own {content type} is a simple type..."
+ */
+ if (type->contentTypeDef != NULL) {
+ /*
+ * SPEC (1.1) "the simple type definition corresponding to the
+ * <simpleType> among the [children] of <restriction> if there
+ * is one;"
+ * Note that this "<simpleType> among the [children]" was put
+ * into ->contentTypeDef during parsing.
+ */
+ contentBase = type->contentTypeDef;
+ type->contentTypeDef = NULL;
+ } else {
+ /*
+ * (1.2) "...otherwise (<restriction> has no <simpleType>
+ * among its [children]), the simple type definition which
+ * is the {content type} of the ... base type."
+ */
+ contentBase = baseType->contentTypeDef;
+ }
+ /*
+ * SPEC
+ * "... a simple type definition which restricts the simple
+ * type definition identified in clause 1.1 or clause 1.2
+ * with a set of facet components"
+ *
+ * Create the anonymous simple type, which will be the content
+ * type of the complex type.
+ */
+#ifdef ENABLE_NAMED_LOCALS
+ snprintf(buf, 29, "#scST%d", ++(pctxt->counter));
+ tmpname = xmlDictLookup(pctxt->dict, BAD_CAST buf, -1);
+ content = xmlSchemaAddType(pctxt, pctxt->schema,
+ XML_SCHEMA_TYPE_SIMPLE, tmpname, type->targetNamespace,
+ type->node, 0);
+#else
+ content = xmlSchemaAddType(pctxt, pctxt->schema,
+ XML_SCHEMA_TYPE_SIMPLE, NULL, type->targetNamespace,
+ type->node, 0);
+#endif
+ if (content == NULL)
+ goto exit_failure;
+ /*
+ * We will use the same node as for the <complexType>
+ * to have it somehow anchored in the schema doc.
+ */
+ content->type = XML_SCHEMA_TYPE_SIMPLE;
+ content->baseType = contentBase;
+ /*
+ * Move the facets, previously anchored on the
+ * complexType during parsing.
+ */
+ content->facets = type->facets;
+ type->facets = NULL;
+ content->facetSet = type->facetSet;
+ type->facetSet = NULL;
+
+ type->contentTypeDef = content;
+ if (WXS_IS_TYPE_NOT_FIXED(contentBase))
+ xmlSchemaTypeFixup(contentBase, ACTXT_CAST pctxt);
+ /*
+ * Fixup the newly created type. We don't need to check
+ * for circularity here.
+ */
+ res = xmlSchemaFixupSimpleTypeStageOne(pctxt, content);
+ HFAILURE HERROR
+ res = xmlSchemaFixupSimpleTypeStageTwo(pctxt, content);
+ HFAILURE HERROR
+
+ } else if ((WXS_IS_COMPLEX(baseType)) &&
+ (baseType->contentType == XML_SCHEMA_CONTENT_MIXED) &&
+ (WXS_IS_RESTRICTION(type))) {
+ /*
+ * SPEC (2) If <restriction> + base is a mixed <complexType> with
+ * an emptiable particle, then a simple type definition which
+ * restricts the <restriction>'s <simpleType> child.
+ */
+ if ((type->contentTypeDef == NULL) ||
+ (type->contentTypeDef->baseType == NULL)) {
+ /*
+ * TODO: Check if this ever happens.
+ */
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_INTERNAL,
+ WXS_BASIC_CAST type, NULL,
+ "Internal error: xmlSchemaTypeFixup, "
+ "complex type '%s': the <simpleContent><restriction> "
+ "is missing a <simpleType> child, but was not catched "
+ "by xmlSchemaCheckSRCCT()", type->name);
+ goto exit_failure;
+ }
+ } else if ((WXS_IS_COMPLEX(baseType)) && WXS_IS_EXTENSION(type)) {
+ /*
+ * SPEC (3) If <extension> + base is <complexType> with
+ * <simpleType> content, "...then the {content type} of that
+ * complex type definition"
+ */
+ if (baseType->contentTypeDef == NULL) {
+ /*
+ * TODO: Check if this ever happens. xmlSchemaCheckSRCCT
+ * should have catched this already.
+ */
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_INTERNAL,
+ WXS_BASIC_CAST type, NULL,
+ "Internal error: xmlSchemaTypeFixup, "
+ "complex type '%s': the <extension>ed base type is "
+ "a complex type with no simple content type",
+ type->name);
+ goto exit_failure;
+ }
+ type->contentTypeDef = baseType->contentTypeDef;
+ } else if ((WXS_IS_SIMPLE(baseType)) && WXS_IS_EXTENSION(type)) {
+ /*
+ * SPEC (4) <extension> + base is <simpleType>
+ * "... then that simple type definition"
+ */
+ type->contentTypeDef = baseType;
+ } else {
+ /*
+ * TODO: Check if this ever happens.
+ */
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_INTERNAL,
+ WXS_BASIC_CAST type, NULL,
+ "Internal error: xmlSchemaTypeFixup, "
+ "complex type '%s' with <simpleContent>: unhandled "
+ "derivation case", type->name);
+ goto exit_failure;
+ }
+ } else {
+ int dummySequence = 0;
+ xmlSchemaParticlePtr particle =
+ (xmlSchemaParticlePtr) type->subtypes;
+ /*
+ * Corresponds to <complexType><complexContent>...
+ *
+ * NOTE that the effective mixed was already set during parsing of
+ * <complexType> and <complexContent>; its flag value is
+ * XML_SCHEMAS_TYPE_MIXED.
+ *
+ * Compute the "effective content":
+ * (2.1.1) + (2.1.2) + (2.1.3)
+ */
+ if ((particle == NULL) ||
+ ((particle->type == XML_SCHEMA_TYPE_PARTICLE) &&
+ ((particle->children->type == XML_SCHEMA_TYPE_ALL) ||
+ (particle->children->type == XML_SCHEMA_TYPE_SEQUENCE) ||
+ ((particle->children->type == XML_SCHEMA_TYPE_CHOICE) &&
+ (particle->minOccurs == 0))) &&
+ ( ((xmlSchemaTreeItemPtr) particle->children)->children == NULL))) {
+ if (type->flags & XML_SCHEMAS_TYPE_MIXED) {
+ /*
+ * SPEC (2.1.4) "If the `effective mixed` is true, then
+ * a particle whose properties are as follows:..."
+ *
+ * Empty sequence model group with
+ * minOccurs/maxOccurs = 1 (i.e. a "particle emptiable").
+ * NOTE that we sill assign it the <complexType> node to
+ * somehow anchor it in the doc.
+ */
+ if ((particle == NULL) ||
+ (particle->children->type != XML_SCHEMA_TYPE_SEQUENCE)) {
+ /*
+ * Create the particle.
+ */
+ particle = xmlSchemaAddParticle(pctxt,
+ type->node, 1, 1);
+ if (particle == NULL)
+ goto exit_failure;
+ /*
+ * Create the model group.
+ */ /* URGENT TODO: avoid adding to pending items. */
+ particle->children = (xmlSchemaTreeItemPtr)
+ xmlSchemaAddModelGroup(pctxt, pctxt->schema,
+ XML_SCHEMA_TYPE_SEQUENCE, type->node);
+ if (particle->children == NULL)
+ goto exit_failure;
+
+ type->subtypes = (xmlSchemaTypePtr) particle;
+ }
+ dummySequence = 1;
+ type->contentType = XML_SCHEMA_CONTENT_ELEMENTS;
+ } else {
+ /*
+ * SPEC (2.1.5) "otherwise empty"
+ */
+ type->contentType = XML_SCHEMA_CONTENT_EMPTY;
+ }
+ } else {
+ /*
+ * SPEC (2.2) "otherwise the particle corresponding to the
+ * <all>, <choice>, <group> or <sequence> among the
+ * [children]."
+ */
+ type->contentType = XML_SCHEMA_CONTENT_ELEMENTS;
+ }
+ /*
+ * Compute the "content type".
+ */
+ if (WXS_IS_RESTRICTION(type)) {
+ /*
+ * SPEC (3.1) "If <restriction>..."
+ * (3.1.1) + (3.1.2) */
+ if (type->contentType != XML_SCHEMA_CONTENT_EMPTY) {
+ if (type->flags & XML_SCHEMAS_TYPE_MIXED)
+ type->contentType = XML_SCHEMA_CONTENT_MIXED;
+ }
+ } else {
+ /*
+ * SPEC (3.2) "If <extension>..."
+ */
+ if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) {
+ /*
+ * SPEC (3.2.1)
+ * "If the `effective content` is empty, then the
+ * {content type} of the [...] base ..."
+ */
+ type->contentType = baseType->contentType;
+ type->subtypes = baseType->subtypes;
+ /*
+ * Fixes bug #347316:
+ * This is the case when the base type has a simple
+ * type definition as content.
+ */
+ type->contentTypeDef = baseType->contentTypeDef;
+ /*
+ * NOTE that the effective mixed is ignored here.
+ */
+ } else if (baseType->contentType == XML_SCHEMA_CONTENT_EMPTY) {
+ /*
+ * SPEC (3.2.2)
+ */
+ if (type->flags & XML_SCHEMAS_TYPE_MIXED)
+ type->contentType = XML_SCHEMA_CONTENT_MIXED;
+ } else {
+ /*
+ * SPEC (3.2.3)
+ */
+ if (type->flags & XML_SCHEMAS_TYPE_MIXED)
+ type->contentType = XML_SCHEMA_CONTENT_MIXED;
+ /*
+ * "A model group whose {compositor} is sequence and whose
+ * {particles} are..."
+ */
+ if ((WXS_TYPE_PARTICLE(type) != NULL) &&
+ (WXS_TYPE_PARTICLE_TERM(type) != NULL) &&
+ ((WXS_TYPE_PARTICLE_TERM(type))->type ==
+ XML_SCHEMA_TYPE_ALL))
+ {
+ /*
+ * SPEC cos-all-limited (1)
+ */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ /* TODO: error code */
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ WXS_ITEM_NODE(type), NULL,
+ "The type has an 'all' model group in its "
+ "{content type} and thus cannot be derived from "
+ "a non-empty type, since this would produce a "
+ "'sequence' model group containing the 'all' "
+ "model group; 'all' model groups are not "
+ "allowed to appear inside other model groups",
+ NULL, NULL);
+
+ } else if ((WXS_TYPE_PARTICLE(baseType) != NULL) &&
+ (WXS_TYPE_PARTICLE_TERM(baseType) != NULL) &&
+ ((WXS_TYPE_PARTICLE_TERM(baseType))->type ==
+ XML_SCHEMA_TYPE_ALL))
+ {
+ /*
+ * SPEC cos-all-limited (1)
+ */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ /* TODO: error code */
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ WXS_ITEM_NODE(type), NULL,
+ "A type cannot be derived by extension from a type "
+ "which has an 'all' model group in its "
+ "{content type}, since this would produce a "
+ "'sequence' model group containing the 'all' "
+ "model group; 'all' model groups are not "
+ "allowed to appear inside other model groups",
+ NULL, NULL);
+
+ } else if (! dummySequence) {
+ xmlSchemaTreeItemPtr effectiveContent =
+ (xmlSchemaTreeItemPtr) type->subtypes;
+ /*
+ * Create the particle.
+ */
+ particle = xmlSchemaAddParticle(pctxt,
+ type->node, 1, 1);
+ if (particle == NULL)
+ goto exit_failure;
+ /*
+ * Create the "sequence" model group.
+ */
+ particle->children = (xmlSchemaTreeItemPtr)
+ xmlSchemaAddModelGroup(pctxt, pctxt->schema,
+ XML_SCHEMA_TYPE_SEQUENCE, type->node);
+ if (particle->children == NULL)
+ goto exit_failure;
+ WXS_TYPE_CONTENTTYPE(type) = (xmlSchemaTypePtr) particle;
+ /*
+ * SPEC "the particle of the {content type} of
+ * the ... base ..."
+ * Create a duplicate of the base type's particle
+ * and assign its "term" to it.
+ */
+ particle->children->children =
+ (xmlSchemaTreeItemPtr) xmlSchemaAddParticle(pctxt,
+ type->node,
+ ((xmlSchemaParticlePtr) baseType->subtypes)->minOccurs,
+ ((xmlSchemaParticlePtr) baseType->subtypes)->maxOccurs);
+ if (particle->children->children == NULL)
+ goto exit_failure;
+ particle = (xmlSchemaParticlePtr)
+ particle->children->children;
+ particle->children =
+ ((xmlSchemaParticlePtr) baseType->subtypes)->children;
+ /*
+ * SPEC "followed by the `effective content`."
+ */
+ particle->next = effectiveContent;
+ /*
+ * This all will result in:
+ * new-particle
+ * --> new-sequence(
+ * new-particle
+ * --> base-model,
+ * this-particle
+ * --> this-model
+ * )
+ */
+ } else {
+ /*
+ * This is the case when there is already an empty
+ * <sequence> with minOccurs==maxOccurs==1.
+ * Just add the base types's content type.
+ * NOTE that, although we miss to add an intermediate
+ * <sequence>, this should produce no difference to
+ * neither the regex compilation of the content model,
+ * nor to the complex type contraints.
+ */
+ particle->children->children =
+ (xmlSchemaTreeItemPtr) baseType->subtypes;
+ }
+ }
+ }
+ }
+ /*
+ * Now fixup attribute uses:
+ * - expand attr. group references
+ * - intersect attribute wildcards
+ * - inherit attribute uses of the base type
+ * - inherit or union attr. wildcards if extending
+ * - apply attr. use prohibitions if restricting
+ */
+ res = xmlSchemaFixupTypeAttributeUses(pctxt, type);
+ HFAILURE HERROR
+ /*
+ * Apply the complex type component constraints; this will not
+ * check attributes, since this is done in
+ * xmlSchemaFixupTypeAttributeUses().
+ */
+ res = xmlSchemaCheckCTComponent(pctxt, type);
+ HFAILURE HERROR
+
+#ifdef DEBUG_TYPE
+ xmlSchemaDebugFixedType(pctxt, type);
+#endif
+ if (olderrs != pctxt->nberrors)
+ return(pctxt->err);
+ else
+ return(0);
+
+exit_error:
+ type->flags |= XML_SCHEMAS_TYPE_INTERNAL_INVALID;
+#ifdef DEBUG_TYPE
+ xmlSchemaDebugFixedType(pctxt, type);
+#endif
+ return(pctxt->err);
+
+exit_failure:
+ type->flags |= XML_SCHEMAS_TYPE_INTERNAL_INVALID;
+#ifdef DEBUG_TYPE
+ xmlSchemaDebugFixedType(pctxt, type);
+#endif
+ return(-1);
+}
+
+
+/**
+ * xmlSchemaTypeFixup:
+ * @typeDecl: the schema type definition
+ * @ctxt: the schema parser context
+ *
+ * Fixes the content model of the type.
+ * URGENT TODO: We need an int result!
+ */
+static int
+xmlSchemaTypeFixup(xmlSchemaTypePtr type,
+ xmlSchemaAbstractCtxtPtr actxt)
+{
+ if (type == NULL)
+ return(0);
+ if (actxt->type != XML_SCHEMA_CTXT_PARSER) {
+ AERROR_INT("xmlSchemaTypeFixup",
+ "this function needs a parser context");
+ return(-1);
+ }
+ if (! WXS_IS_TYPE_NOT_FIXED(type))
+ return(0);
+ if (type->type == XML_SCHEMA_TYPE_COMPLEX)
+ return(xmlSchemaFixupComplexType(PCTXT_CAST actxt, type));
+ else if (type->type == XML_SCHEMA_TYPE_SIMPLE)
+ return(xmlSchemaFixupSimpleTypeStageTwo(PCTXT_CAST actxt, type));
+ return(0);
+}
+
+/**
+ * xmlSchemaCheckFacet:
+ * @facet: the facet
+ * @typeDecl: the schema type definition
+ * @pctxt: the schema parser context or NULL
+ * @name: the optional name of the type
+ *
+ * Checks and computes the values of facets.
+ *
+ * Returns 0 if valid, a positive error code if not valid and
+ * -1 in case of an internal or API error.
+ */
+int
+xmlSchemaCheckFacet(xmlSchemaFacetPtr facet,
+ xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr pctxt,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ int ret = 0, ctxtGiven;
+
+ if ((facet == NULL) || (typeDecl == NULL))
+ return(-1);
+ /*
+ * TODO: will the parser context be given if used from
+ * the relaxNG module?
+ */
+ if (pctxt == NULL)
+ ctxtGiven = 0;
+ else
+ ctxtGiven = 1;
+
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ case XML_SCHEMA_FACET_ENUMERATION: {
+ /*
+ * Okay we need to validate the value
+ * at that point.
+ */
+ xmlSchemaTypePtr base;
+
+ /* 4.3.5.5 Constraints on enumeration Schema Components
+ * Schema Component Constraint: enumeration valid restriction
+ * It is an `error` if any member of {value} is not in the
+ * `value space` of {base type definition}.
+ *
+ * minInclusive, maxInclusive, minExclusive, maxExclusive:
+ * The value `must` be in the
+ * `value space` of the `base type`.
+ */
+ /*
+ * This function is intended to deliver a compiled value
+ * on the facet. In this implementation of XML Schemata the
+ * type holding a facet, won't be a built-in type.
+ * Thus to ensure that other API
+ * calls (relaxng) do work, if the given type is a built-in
+ * type, we will assume that the given built-in type *is
+ * already* the base type.
+ */
+ if (typeDecl->type != XML_SCHEMA_TYPE_BASIC) {
+ base = typeDecl->baseType;
+ if (base == NULL) {
+ PERROR_INT("xmlSchemaCheckFacet",
+ "a type user derived type has no base type");
+ return (-1);
+ }
+ } else
+ base = typeDecl;
+
+ if (! ctxtGiven) {
+ /*
+ * A context is needed if called from RelaxNG.
+ */
+ pctxt = xmlSchemaNewParserCtxt("*");
+ if (pctxt == NULL)
+ return (-1);
+ }
+ /*
+ * NOTE: This call does not check the content nodes,
+ * since they are not available:
+ * facet->node is just the node holding the facet
+ * definition, *not* the attribute holding the *value*
+ * of the facet.
+ */
+ ret = xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST pctxt, facet->node, base,
+ facet->value, &(facet->val), 1, 1, 0);
+ if (ret != 0) {
+ if (ret < 0) {
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_INTERNAL, facet->node, NULL,
+ "Internal error: xmlSchemaCheckFacet, "
+ "failed to validate the value '%s' of the "
+ "facet '%s' against the base type",
+ facet->value, xmlSchemaFacetTypeToString(facet->type));
+ }
+ goto internal_error;
+ }
+ ret = XML_SCHEMAP_INVALID_FACET_VALUE;
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ ret, facet->node, WXS_BASIC_CAST facet,
+ "The value '%s' of the facet does not validate "
+ "against the base type '%s'",
+ facet->value,
+ xmlSchemaFormatQName(&str,
+ base->targetNamespace, base->name));
+ FREE_AND_NULL(str);
+ }
+ goto exit;
+ } else if (facet->val == NULL) {
+ if (ctxtGiven) {
+ PERROR_INT("xmlSchemaCheckFacet",
+ "value was not computed");
+ }
+ TODO
+ }
+ break;
+ }
+ case XML_SCHEMA_FACET_PATTERN:
+ facet->regexp = xmlRegexpCompile(facet->value);
+ if (facet->regexp == NULL) {
+ ret = XML_SCHEMAP_REGEXP_INVALID;
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ ret, facet->node, WXS_BASIC_CAST typeDecl,
+ "The value '%s' of the facet 'pattern' is not a "
+ "valid regular expression",
+ facet->value, NULL);
+ }
+ }
+ break;
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH:
+
+ if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) {
+ ret = xmlSchemaValidatePredefinedType(
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_PINTEGER),
+ facet->value, &(facet->val));
+ } else {
+ ret = xmlSchemaValidatePredefinedType(
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_NNINTEGER),
+ facet->value, &(facet->val));
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ PERROR_INT("xmlSchemaCheckFacet",
+ "validating facet value");
+ }
+ goto internal_error;
+ }
+ ret = XML_SCHEMAP_INVALID_FACET_VALUE;
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ /* error code */
+ xmlSchemaCustomErr4(ACTXT_CAST pctxt,
+ ret, facet->node, WXS_BASIC_CAST typeDecl,
+ "The value '%s' of the facet '%s' is not a valid '%s'",
+ facet->value,
+ xmlSchemaFacetTypeToString(facet->type),
+ (facet->type != XML_SCHEMA_FACET_TOTALDIGITS) ?
+ BAD_CAST "nonNegativeInteger" :
+ BAD_CAST "positiveInteger",
+ NULL);
+ }
+ }
+ break;
+
+ case XML_SCHEMA_FACET_WHITESPACE:{
+ if (xmlStrEqual(facet->value, BAD_CAST "preserve")) {
+ facet->whitespace = XML_SCHEMAS_FACET_PRESERVE;
+ } else if (xmlStrEqual(facet->value, BAD_CAST "replace")) {
+ facet->whitespace = XML_SCHEMAS_FACET_REPLACE;
+ } else if (xmlStrEqual(facet->value, BAD_CAST "collapse")) {
+ facet->whitespace = XML_SCHEMAS_FACET_COLLAPSE;
+ } else {
+ ret = XML_SCHEMAP_INVALID_FACET_VALUE;
+ /* No error message for RelaxNG. */
+ if (ctxtGiven) {
+ /* error was previously: XML_SCHEMAP_INVALID_WHITE_SPACE */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ ret, facet->node, WXS_BASIC_CAST typeDecl,
+ "The value '%s' of the facet 'whitespace' is not "
+ "valid", facet->value, NULL);
+ }
+ }
+ }
+ default:
+ break;
+ }
+exit:
+ if ((! ctxtGiven) && (pctxt != NULL))
+ xmlSchemaFreeParserCtxt(pctxt);
+ return (ret);
+internal_error:
+ if ((! ctxtGiven) && (pctxt != NULL))
+ xmlSchemaFreeParserCtxt(pctxt);
+ return (-1);
+}
+
+/**
+ * xmlSchemaCheckFacetValues:
+ * @typeDecl: the schema type definition
+ * @ctxt: the schema parser context
+ *
+ * Checks the default values types, especially for facets
+ */
+static int
+xmlSchemaCheckFacetValues(xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr pctxt)
+{
+ int res, olderrs = pctxt->nberrors;
+ const xmlChar *name = typeDecl->name;
+ /*
+ * NOTE: It is intended to use the facets list, instead
+ * of facetSet.
+ */
+ if (typeDecl->facets != NULL) {
+ xmlSchemaFacetPtr facet = typeDecl->facets;
+
+ /*
+ * Temporarily assign the "schema" to the validation context
+ * of the parser context. This is needed for NOTATION validation.
+ */
+ if (pctxt->vctxt == NULL) {
+ if (xmlSchemaCreateVCtxtOnPCtxt(pctxt) == -1)
+ return(-1);
+ }
+ pctxt->vctxt->schema = pctxt->schema;
+ while (facet != NULL) {
+ res = xmlSchemaCheckFacet(facet, typeDecl, pctxt, name);
+ HFAILURE
+ facet = facet->next;
+ }
+ pctxt->vctxt->schema = NULL;
+ }
+ if (olderrs != pctxt->nberrors)
+ return(pctxt->err);
+ return(0);
+exit_failure:
+ return(-1);
+}
+
+/**
+ * xmlSchemaGetCircModelGrDefRef:
+ * @ctxtMGroup: the searched model group
+ * @selfMGroup: the second searched model group
+ * @particle: the first particle
+ *
+ * This one is intended to be used by
+ * xmlSchemaCheckGroupDefCircular only.
+ *
+ * Returns the particle with the circular model group definition reference,
+ * otherwise NULL.
+ */
+static xmlSchemaTreeItemPtr
+xmlSchemaGetCircModelGrDefRef(xmlSchemaModelGroupDefPtr groupDef,
+ xmlSchemaTreeItemPtr particle)
+{
+ xmlSchemaTreeItemPtr circ = NULL;
+ xmlSchemaTreeItemPtr term;
+ xmlSchemaModelGroupDefPtr gdef;
+
+ for (; particle != NULL; particle = particle->next) {
+ term = particle->children;
+ if (term == NULL)
+ continue;
+ switch (term->type) {
+ case XML_SCHEMA_TYPE_GROUP:
+ gdef = (xmlSchemaModelGroupDefPtr) term;
+ if (gdef == groupDef)
+ return (particle);
+ /*
+ * Mark this model group definition to avoid infinite
+ * recursion on circular references not yet examined.
+ */
+ if (gdef->flags & XML_SCHEMA_MODEL_GROUP_DEF_MARKED)
+ continue;
+ if (gdef->children != NULL) {
+ gdef->flags |= XML_SCHEMA_MODEL_GROUP_DEF_MARKED;
+ circ = xmlSchemaGetCircModelGrDefRef(groupDef,
+ gdef->children->children);
+ gdef->flags ^= XML_SCHEMA_MODEL_GROUP_DEF_MARKED;
+ if (circ != NULL)
+ return (circ);
+ }
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ circ = xmlSchemaGetCircModelGrDefRef(groupDef, term->children);
+ if (circ != NULL)
+ return (circ);
+ break;
+ default:
+ break;
+ }
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaCheckGroupDefCircular:
+ * @item: the model group definition
+ * @ctxt: the parser context
+ * @name: the name
+ *
+ * Checks for circular references to model group definitions.
+ */
+static void
+xmlSchemaCheckGroupDefCircular(xmlSchemaModelGroupDefPtr item,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ /*
+ * Schema Component Constraint: Model Group Correct
+ * 2 Circular groups are disallowed. That is, within the {particles}
+ * of a group there must not be at any depth a particle whose {term}
+ * is the group itself.
+ */
+ if ((item == NULL) ||
+ (item->type != XML_SCHEMA_TYPE_GROUP) ||
+ (item->children == NULL))
+ return;
+ {
+ xmlSchemaTreeItemPtr circ;
+
+ circ = xmlSchemaGetCircModelGrDefRef(item, item->children->children);
+ if (circ != NULL) {
+ xmlChar *str = NULL;
+ /*
+ * TODO: The error report is not adequate: this constraint
+ * is defined for model groups but not definitions, but since
+ * there cannot be any circular model groups without a model group
+ * definition (if not using a construction API), we check those
+ * defintions only.
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_MG_PROPS_CORRECT_2,
+ NULL, WXS_ITEM_NODE(circ),
+ "Circular reference to the model group definition '%s' "
+ "defined", xmlSchemaFormatQName(&str,
+ item->targetNamespace, item->name));
+ FREE_AND_NULL(str)
+ /*
+ * NOTE: We will cut the reference to avoid further
+ * confusion of the processor. This is a fatal error.
+ */
+ circ->children = NULL;
+ }
+ }
+}
+
+/**
+ * xmlSchemaModelGroupToModelGroupDefFixup:
+ * @ctxt: the parser context
+ * @mg: the model group
+ *
+ * Assigns the model group of model group definitions to the "term"
+ * of the referencing particle.
+ * In xmlSchemaResolveModelGroupParticleReferences the model group
+ * definitions were assigned to the "term", since needed for the
+ * circularity check.
+ *
+ * Schema Component Constraint:
+ * All Group Limited (cos-all-limited) (1.2)
+ */
+static void
+xmlSchemaModelGroupToModelGroupDefFixup(
+ xmlSchemaParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
+ xmlSchemaModelGroupPtr mg)
+{
+ xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg);
+
+ while (particle != NULL) {
+ if ((WXS_PARTICLE_TERM(particle) == NULL) ||
+ ((WXS_PARTICLE_TERM(particle))->type !=
+ XML_SCHEMA_TYPE_GROUP))
+ {
+ particle = WXS_PTC_CAST particle->next;
+ continue;
+ }
+ if (WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle)) == NULL) {
+ /*
+ * TODO: Remove the particle.
+ */
+ WXS_PARTICLE_TERM(particle) = NULL;
+ particle = WXS_PTC_CAST particle->next;
+ continue;
+ }
+ /*
+ * Assign the model group to the {term} of the particle.
+ */
+ WXS_PARTICLE_TERM(particle) =
+ WXS_TREE_CAST WXS_MODELGROUPDEF_MODEL(WXS_PARTICLE_TERM(particle));
+
+ particle = WXS_PTC_CAST particle->next;
+ }
+}
+
+/**
+ * xmlSchemaCheckAttrGroupCircularRecur:
+ * @ctxtGr: the searched attribute group
+ * @attr: the current attribute list to be processed
+ *
+ * This one is intended to be used by
+ * xmlSchemaCheckAttrGroupCircular only.
+ *
+ * Returns the circular attribute grou reference, otherwise NULL.
+ */
+static xmlSchemaQNameRefPtr
+xmlSchemaCheckAttrGroupCircularRecur(xmlSchemaAttributeGroupPtr ctxtGr,
+ xmlSchemaItemListPtr list)
+{
+ xmlSchemaAttributeGroupPtr gr;
+ xmlSchemaQNameRefPtr ref, circ;
+ int i;
+ /*
+ * We will search for an attribute group reference which
+ * references the context attribute group.
+ */
+ for (i = 0; i < list->nbItems; i++) {
+ ref = list->items[i];
+ if ((ref->type == XML_SCHEMA_EXTRA_QNAMEREF) &&
+ (ref->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP) &&
+ (ref->item != NULL))
+ {
+ gr = WXS_ATTR_GROUP_CAST ref->item;
+ if (gr == ctxtGr)
+ return(ref);
+ if (gr->flags & XML_SCHEMAS_ATTRGROUP_MARKED)
+ continue;
+ /*
+ * Mark as visited to avoid infinite recursion on
+ * circular references not yet examined.
+ */
+ if ((gr->attrUses) &&
+ (gr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS))
+ {
+ gr->flags |= XML_SCHEMAS_ATTRGROUP_MARKED;
+ circ = xmlSchemaCheckAttrGroupCircularRecur(ctxtGr,
+ (xmlSchemaItemListPtr) gr->attrUses);
+ gr->flags ^= XML_SCHEMAS_ATTRGROUP_MARKED;
+ if (circ != NULL)
+ return (circ);
+ }
+
+ }
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaCheckAttrGroupCircular:
+ * attrGr: the attribute group definition
+ * @ctxt: the parser context
+ * @name: the name
+ *
+ * Checks for circular references of attribute groups.
+ */
+static int
+xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ /*
+ * Schema Representation Constraint:
+ * Attribute Group Definition Representation OK
+ * 3 Circular group reference is disallowed outside <redefine>.
+ * That is, unless this element information item's parent is
+ * <redefine>, then among the [children], if any, there must
+ * not be an <attributeGroup> with ref [attribute] which resolves
+ * to the component corresponding to this <attributeGroup>. Indirect
+ * circularity is also ruled out. That is, when QName resolution
+ * (Schema Document) ($3.15.3) is applied to a `QName` arising from
+ * any <attributeGroup>s with a ref [attribute] among the [children],
+ * it must not be the case that a `QName` is encountered at any depth
+ * which resolves to the component corresponding to this <attributeGroup>.
+ */
+ if (attrGr->attrUses == NULL)
+ return(0);
+ else if ((attrGr->flags & XML_SCHEMAS_ATTRGROUP_HAS_REFS) == 0)
+ return(0);
+ else {
+ xmlSchemaQNameRefPtr circ;
+
+ circ = xmlSchemaCheckAttrGroupCircularRecur(attrGr,
+ (xmlSchemaItemListPtr) attrGr->attrUses);
+ if (circ != NULL) {
+ xmlChar *str = NULL;
+ /*
+ * TODO: Report the referenced attr group as QName.
+ */
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3,
+ NULL, WXS_ITEM_NODE(WXS_BASIC_CAST circ),
+ "Circular reference to the attribute group '%s' "
+ "defined", xmlSchemaGetComponentQName(&str, attrGr));
+ FREE_AND_NULL(str);
+ /*
+ * NOTE: We will cut the reference to avoid further
+ * confusion of the processor.
+ * BADSPEC TODO: The spec should define how to process in this case.
+ */
+ circ->item = NULL;
+ return(ctxt->err);
+ }
+ }
+ return(0);
+}
+
+static int
+xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaAttributeGroupPtr attrGr);
+
+/**
+ * xmlSchemaExpandAttributeGroupRefs:
+ * @pctxt: the parser context
+ * @node: the node of the component holding the attribute uses
+ * @completeWild: the intersected wildcard to be returned
+ * @list: the attribute uses
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ * Attribute use prohibitions are removed from the list
+ * and returned via the @prohibs list.
+ * Pointlessness of attr. prohibs, if a matching attr. decl
+ * is existent a well, are checked.
+ */
+static int
+xmlSchemaExpandAttributeGroupRefs(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBasicItemPtr item,
+ xmlSchemaWildcardPtr *completeWild,
+ xmlSchemaItemListPtr list,
+ xmlSchemaItemListPtr prohibs)
+{
+ xmlSchemaAttributeGroupPtr gr;
+ xmlSchemaAttributeUsePtr use;
+ xmlSchemaItemListPtr sublist;
+ int i, j;
+ int created = (*completeWild == NULL) ? 0 : 1;
+
+ if (prohibs)
+ prohibs->nbItems = 0;
+
+ for (i = 0; i < list->nbItems; i++) {
+ use = list->items[i];
+
+ if (use->type == XML_SCHEMA_EXTRA_ATTR_USE_PROHIB) {
+ if (prohibs == NULL) {
+ PERROR_INT("xmlSchemaExpandAttributeGroupRefs",
+ "unexpected attr prohibition found");
+ return(-1);
+ }
+ /*
+ * Remove from attribute uses.
+ */
+ if (xmlSchemaItemListRemove(list, i) == -1)
+ return(-1);
+ i--;
+ /*
+ * Note that duplicate prohibitions were already
+ * handled at parsing time.
+ */
+ /*
+ * Add to list of prohibitions.
+ */
+ xmlSchemaItemListAddSize(prohibs, 2, use);
+ continue;
+ }
+ if ((use->type == XML_SCHEMA_EXTRA_QNAMEREF) &&
+ ((WXS_QNAME_CAST use)->itemType == XML_SCHEMA_TYPE_ATTRIBUTEGROUP))
+ {
+ if ((WXS_QNAME_CAST use)->item == NULL)
+ return(-1);
+ gr = WXS_ATTR_GROUP_CAST (WXS_QNAME_CAST use)->item;
+ /*
+ * Expand the referenced attr. group.
+ * TODO: remove this, this is done in a previous step, so
+ * already done here.
+ */
+ if ((gr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED) == 0) {
+ if (xmlSchemaAttributeGroupExpandRefs(pctxt, gr) == -1)
+ return(-1);
+ }
+ /*
+ * Build the 'complete' wildcard; i.e. intersect multiple
+ * wildcards.
+ */
+ if (gr->attributeWildcard != NULL) {
+ if (*completeWild == NULL) {
+ *completeWild = gr->attributeWildcard;
+ } else {
+ if (! created) {
+ xmlSchemaWildcardPtr tmpWild;
+
+ /*
+ * Copy the first encountered wildcard as context,
+ * except for the annotation.
+ *
+ * Although the complete wildcard might not correspond
+ * to any node in the schema, we will anchor it on
+ * the node of the owner component.
+ */
+ tmpWild = xmlSchemaAddWildcard(pctxt, pctxt->schema,
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ WXS_ITEM_NODE(item));
+ if (tmpWild == NULL)
+ return(-1);
+ if (xmlSchemaCloneWildcardNsConstraints(pctxt,
+ tmpWild, *completeWild) == -1)
+ return (-1);
+ tmpWild->processContents = (*completeWild)->processContents;
+ *completeWild = tmpWild;
+ created = 1;
+ }
+
+ if (xmlSchemaIntersectWildcards(pctxt, *completeWild,
+ gr->attributeWildcard) == -1)
+ return(-1);
+ }
+ }
+ /*
+ * Just remove the reference if the referenced group does not
+ * contain any attribute uses.
+ */
+ sublist = ((xmlSchemaItemListPtr) gr->attrUses);
+ if ((sublist == NULL) || sublist->nbItems == 0) {
+ if (xmlSchemaItemListRemove(list, i) == -1)
+ return(-1);
+ i--;
+ continue;
+ }
+ /*
+ * Add the attribute uses.
+ */
+ list->items[i] = sublist->items[0];
+ if (sublist->nbItems != 1) {
+ for (j = 1; j < sublist->nbItems; j++) {
+ i++;
+ if (xmlSchemaItemListInsert(list,
+ sublist->items[j], i) == -1)
+ return(-1);
+ }
+ }
+ }
+
+ }
+ /*
+ * Handle pointless prohibitions of declared attributes.
+ */
+ if (prohibs && (prohibs->nbItems != 0) && (list->nbItems != 0)) {
+ xmlSchemaAttributeUseProhibPtr prohib;
+
+ for (i = prohibs->nbItems -1; i >= 0; i--) {
+ prohib = prohibs->items[i];
+ for (j = 0; j < list->nbItems; j++) {
+ use = list->items[j];
+
+ if ((prohib->name == WXS_ATTRUSE_DECL_NAME(use)) &&
+ (prohib->targetNamespace == WXS_ATTRUSE_DECL_TNS(use)))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomWarning(ACTXT_CAST pctxt,
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH,
+ prohib->node, NULL,
+ "Skipping pointless attribute use prohibition "
+ "'%s', since a corresponding attribute use "
+ "exists already in the type definition",
+ xmlSchemaFormatQName(&str,
+ prohib->targetNamespace, prohib->name),
+ NULL, NULL);
+ FREE_AND_NULL(str);
+ /*
+ * Remove the prohibition.
+ */
+ if (xmlSchemaItemListRemove(prohibs, i) == -1)
+ return(-1);
+ break;
+ }
+ }
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaAttributeGroupExpandRefs:
+ * @pctxt: the parser context
+ * @attrGr: the attribute group definition
+ *
+ * Computation of:
+ * {attribute uses} property
+ * {attribute wildcard} property
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ */
+static int
+xmlSchemaAttributeGroupExpandRefs(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaAttributeGroupPtr attrGr)
+{
+ if ((attrGr->attrUses == NULL) ||
+ (attrGr->flags & XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED))
+ return(0);
+
+ attrGr->flags |= XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED;
+ if (xmlSchemaExpandAttributeGroupRefs(pctxt, WXS_BASIC_CAST attrGr,
+ &(attrGr->attributeWildcard), attrGr->attrUses, NULL) == -1)
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlSchemaAttributeGroupExpandRefs:
+ * @pctxt: the parser context
+ * @attrGr: the attribute group definition
+ *
+ * Substitutes contained attribute group references
+ * for their attribute uses. Wilcards are intersected.
+ *
+ * Schema Component Constraint:
+ * Attribute Group Definition Properties Correct (ag-props-correct)
+ */
+static int
+xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaAttributeGroupPtr attrGr)
+{
+ /*
+ * SPEC ag-props-correct
+ * (1) "The values of the properties of an attribute group definition
+ * must be as described in the property tableau in The Attribute
+ * Group Definition Schema Component ($3.6.1), modulo the impact of
+ * Missing Sub-components ($5.3);"
+ */
+
+ if ((attrGr->attrUses != NULL) &&
+ (WXS_LIST_CAST attrGr->attrUses)->nbItems > 1)
+ {
+ xmlSchemaItemListPtr uses = WXS_LIST_CAST attrGr->attrUses;
+ xmlSchemaAttributeUsePtr use, tmp;
+ int i, j, hasId = 0;
+
+ for (i = uses->nbItems -1; i >= 0; i--) {
+ use = uses->items[i];
+ /*
+ * SPEC ag-props-correct
+ * (2) "Two distinct members of the {attribute uses} must not have
+ * {attribute declaration}s both of whose {name}s match and whose
+ * {target namespace}s are identical."
+ */
+ if (i > 0) {
+ for (j = i -1; j >= 0; j--) {
+ tmp = uses->items[j];
+ if ((WXS_ATTRUSE_DECL_NAME(use) ==
+ WXS_ATTRUSE_DECL_NAME(tmp)) &&
+ (WXS_ATTRUSE_DECL_TNS(use) ==
+ WXS_ATTRUSE_DECL_TNS(tmp)))
+ {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_AG_PROPS_CORRECT,
+ attrGr->node, WXS_BASIC_CAST attrGr,
+ "Duplicate %s",
+ xmlSchemaGetComponentDesignation(&str, use),
+ NULL);
+ FREE_AND_NULL(str);
+ /*
+ * Remove the duplicate.
+ */
+ if (xmlSchemaItemListRemove(uses, i) == -1)
+ return(-1);
+ goto next_use;
+ }
+ }
+ }
+ /*
+ * SPEC ag-props-correct
+ * (3) "Two distinct members of the {attribute uses} must not have
+ * {attribute declaration}s both of whose {type definition}s are or
+ * are derived from ID."
+ * TODO: Does 'derived' include member-types of unions?
+ */
+ if (WXS_ATTRUSE_TYPEDEF(use) != NULL) {
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+ {
+ if (hasId) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_AG_PROPS_CORRECT,
+ attrGr->node, WXS_BASIC_CAST attrGr,
+ "There must not exist more than one attribute "
+ "declaration of type 'xs:ID' "
+ "(or derived from 'xs:ID'). The %s violates this "
+ "constraint",
+ xmlSchemaGetComponentDesignation(&str, use),
+ NULL);
+ FREE_AND_NULL(str);
+ if (xmlSchemaItemListRemove(uses, i) == -1)
+ return(-1);
+ }
+ hasId = 1;
+ }
+ }
+next_use: {}
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaResolveAttrGroupReferences:
+ * @attrgrpDecl: the schema attribute definition
+ * @ctxt: the schema parser context
+ * @name: the attribute name
+ *
+ * Resolves references to attribute group definitions.
+ */
+static int
+xmlSchemaResolveAttrGroupReferences(xmlSchemaQNameRefPtr ref,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ xmlSchemaAttributeGroupPtr group;
+
+ if (ref->item != NULL)
+ return(0);
+ group = xmlSchemaGetAttributeGroup(ctxt->schema,
+ ref->name,
+ ref->targetNamespace);
+ if (group == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ NULL, ref->node,
+ "ref", ref->name, ref->targetNamespace,
+ ref->itemType, NULL);
+ return(ctxt->err);
+ }
+ ref->item = WXS_BASIC_CAST group;
+ return(0);
+}
+
+/**
+ * xmlSchemaCheckAttrPropsCorrect:
+ * @item: an schema attribute declaration/use
+ * @ctxt: a schema parser context
+ * @name: the name of the attribute
+ *
+ *
+ * Schema Component Constraint:
+ * Attribute Declaration Properties Correct (a-props-correct)
+ *
+ * Validates the value constraints of an attribute declaration/use.
+ * NOTE that this needs the simle type definitions to be already
+ * builded and checked.
+ */
+static int
+xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaAttributePtr attr)
+{
+
+ /*
+ * SPEC a-props-correct (1)
+ * "The values of the properties of an attribute declaration must
+ * be as described in the property tableau in The Attribute
+ * Declaration Schema Component ($3.2.1), modulo the impact of
+ * Missing Sub-components ($5.3)."
+ */
+
+ if (WXS_ATTR_TYPEDEF(attr) == NULL)
+ return(0);
+
+ if (attr->defValue != NULL) {
+ int ret;
+
+ /*
+ * SPEC a-props-correct (3)
+ * "If the {type definition} is or is derived from ID then there
+ * must not be a {value constraint}."
+ */
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ WXS_ATTR_TYPEDEF(attr), XML_SCHEMAS_ID))
+ {
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_A_PROPS_CORRECT_3,
+ NULL, WXS_BASIC_CAST attr,
+ "Value constraints are not allowed if the type definition "
+ "is or is derived from xs:ID",
+ NULL, NULL);
+ return(pctxt->err);
+ }
+ /*
+ * SPEC a-props-correct (2)
+ * "if there is a {value constraint}, the canonical lexical
+ * representation of its value must be `valid` with respect
+ * to the {type definition} as defined in String Valid ($3.14.4)."
+ * TODO: Don't care about the *canonical* stuff here, this requirement
+ * will be removed in WXS 1.1 anyway.
+ */
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt,
+ attr->node, WXS_ATTR_TYPEDEF(attr),
+ attr->defValue, &(attr->defVal),
+ 1, 1, 0);
+ if (ret != 0) {
+ if (ret < 0) {
+ PERROR_INT("xmlSchemaCheckAttrPropsCorrect",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ return(-1);
+ }
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_A_PROPS_CORRECT_2,
+ NULL, WXS_BASIC_CAST attr,
+ "The value of the value constraint is not valid",
+ NULL, NULL);
+ return(pctxt->err);
+ }
+ }
+
+ return(0);
+}
+
+static xmlSchemaElementPtr
+xmlSchemaCheckSubstGroupCircular(xmlSchemaElementPtr elemDecl,
+ xmlSchemaElementPtr ancestor)
+{
+ xmlSchemaElementPtr ret;
+
+ if (WXS_SUBST_HEAD(ancestor) == NULL)
+ return (NULL);
+ if (WXS_SUBST_HEAD(ancestor) == elemDecl)
+ return (ancestor);
+
+ if (WXS_SUBST_HEAD(ancestor)->flags & XML_SCHEMAS_ELEM_CIRCULAR)
+ return (NULL);
+ WXS_SUBST_HEAD(ancestor)->flags |= XML_SCHEMAS_ELEM_CIRCULAR;
+ ret = xmlSchemaCheckSubstGroupCircular(elemDecl,
+ WXS_SUBST_HEAD(ancestor));
+ WXS_SUBST_HEAD(ancestor)->flags ^= XML_SCHEMAS_ELEM_CIRCULAR;
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaCheckElemPropsCorrect:
+ * @ctxt: a schema parser context
+ * @decl: the element declaration
+ * @name: the name of the attribute
+ *
+ * Schema Component Constraint:
+ * Element Declaration Properties Correct (e-props-correct)
+ *
+ * STATUS:
+ * missing: (6)
+ */
+static int
+xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaElementPtr elemDecl)
+{
+ int ret = 0;
+ xmlSchemaTypePtr typeDef = WXS_ELEM_TYPEDEF(elemDecl);
+ /*
+ * SPEC (1) "The values of the properties of an element declaration
+ * must be as described in the property tableau in The Element
+ * Declaration Schema Component ($3.3.1), modulo the impact of Missing
+ * Sub-components ($5.3)."
+ */
+ if (WXS_SUBST_HEAD(elemDecl) != NULL) {
+ xmlSchemaElementPtr head = WXS_SUBST_HEAD(elemDecl), circ;
+
+ xmlSchemaCheckElementDeclComponent(head, pctxt);
+ /*
+ * SPEC (3) "If there is a non-`absent` {substitution group
+ * affiliation}, then {scope} must be global."
+ */
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_GLOBAL) == 0) {
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_E_PROPS_CORRECT_3,
+ WXS_BASIC_CAST elemDecl, NULL,
+ "Only global element declarations can have a "
+ "substitution group affiliation", NULL);
+ ret = XML_SCHEMAP_E_PROPS_CORRECT_3;
+ }
+ /*
+ * TODO: SPEC (6) "Circular substitution groups are disallowed.
+ * That is, it must not be possible to return to an element declaration
+ * by repeatedly following the {substitution group affiliation}
+ * property."
+ */
+ if (head == elemDecl)
+ circ = head;
+ else if (WXS_SUBST_HEAD(head) != NULL)
+ circ = xmlSchemaCheckSubstGroupCircular(head, head);
+ else
+ circ = NULL;
+ if (circ != NULL) {
+ xmlChar *strA = NULL, *strB = NULL;
+
+ xmlSchemaPCustomErrExt(pctxt,
+ XML_SCHEMAP_E_PROPS_CORRECT_6,
+ WXS_BASIC_CAST circ, NULL,
+ "The element declaration '%s' defines a circular "
+ "substitution group to element declaration '%s'",
+ xmlSchemaGetComponentQName(&strA, circ),
+ xmlSchemaGetComponentQName(&strB, head),
+ NULL);
+ FREE_AND_NULL(strA)
+ FREE_AND_NULL(strB)
+ ret = XML_SCHEMAP_E_PROPS_CORRECT_6;
+ }
+ /*
+ * SPEC (4) "If there is a {substitution group affiliation},
+ * the {type definition}
+ * of the element declaration must be validly derived from the {type
+ * definition} of the {substitution group affiliation}, given the value
+ * of the {substitution group exclusions} of the {substitution group
+ * affiliation}, as defined in Type Derivation OK (Complex) ($3.4.6)
+ * (if the {type definition} is complex) or as defined in
+ * Type Derivation OK (Simple) ($3.14.6) (if the {type definition} is
+ * simple)."
+ *
+ * NOTE: {substitution group exclusions} means the values of the
+ * attribute "final".
+ */
+
+ if (typeDef != WXS_ELEM_TYPEDEF(WXS_SUBST_HEAD(elemDecl))) {
+ int set = 0;
+
+ if (head->flags & XML_SCHEMAS_ELEM_FINAL_EXTENSION)
+ set |= SUBSET_EXTENSION;
+ if (head->flags & XML_SCHEMAS_ELEM_FINAL_RESTRICTION)
+ set |= SUBSET_RESTRICTION;
+
+ if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST pctxt, typeDef,
+ WXS_ELEM_TYPEDEF(head), set) != 0) {
+ xmlChar *strA = NULL, *strB = NULL, *strC = NULL;
+
+ ret = XML_SCHEMAP_E_PROPS_CORRECT_4;
+ xmlSchemaPCustomErrExt(pctxt,
+ XML_SCHEMAP_E_PROPS_CORRECT_4,
+ WXS_BASIC_CAST elemDecl, NULL,
+ "The type definition '%s' was "
+ "either rejected by the substitution group "
+ "affiliation '%s', or not validly derived from its type "
+ "definition '%s'",
+ xmlSchemaGetComponentQName(&strA, typeDef),
+ xmlSchemaGetComponentQName(&strB, head),
+ xmlSchemaGetComponentQName(&strC, WXS_ELEM_TYPEDEF(head)));
+ FREE_AND_NULL(strA)
+ FREE_AND_NULL(strB)
+ FREE_AND_NULL(strC)
+ }
+ }
+ }
+ /*
+ * SPEC (5) "If the {type definition} or {type definition}'s
+ * {content type}
+ * is or is derived from ID then there must not be a {value constraint}.
+ * Note: The use of ID as a type definition for elements goes beyond
+ * XML 1.0, and should be avoided if backwards compatibility is desired"
+ */
+ if ((elemDecl->value != NULL) &&
+ ((WXS_IS_SIMPLE(typeDef) &&
+ xmlSchemaIsDerivedFromBuiltInType(typeDef, XML_SCHEMAS_ID)) ||
+ (WXS_IS_COMPLEX(typeDef) &&
+ WXS_HAS_SIMPLE_CONTENT(typeDef) &&
+ xmlSchemaIsDerivedFromBuiltInType(typeDef->contentTypeDef,
+ XML_SCHEMAS_ID)))) {
+
+ ret = XML_SCHEMAP_E_PROPS_CORRECT_5;
+ xmlSchemaPCustomErr(pctxt,
+ XML_SCHEMAP_E_PROPS_CORRECT_5,
+ WXS_BASIC_CAST elemDecl, NULL,
+ "The type definition (or type definition's content type) is or "
+ "is derived from ID; value constraints are not allowed in "
+ "conjunction with such a type definition", NULL);
+ } else if (elemDecl->value != NULL) {
+ int vcret;
+ xmlNodePtr node = NULL;
+
+ /*
+ * SPEC (2) "If there is a {value constraint}, the canonical lexical
+ * representation of its value must be `valid` with respect to the
+ * {type definition} as defined in Element Default Valid (Immediate)
+ * ($3.3.6)."
+ */
+ if (typeDef == NULL) {
+ xmlSchemaPErr(pctxt, elemDecl->node,
+ XML_SCHEMAP_INTERNAL,
+ "Internal error: xmlSchemaCheckElemPropsCorrect, "
+ "type is missing... skipping validation of "
+ "the value constraint", NULL, NULL);
+ return (-1);
+ }
+ if (elemDecl->node != NULL) {
+ if (elemDecl->flags & XML_SCHEMAS_ELEM_FIXED)
+ node = (xmlNodePtr) xmlHasProp(elemDecl->node,
+ BAD_CAST "fixed");
+ else
+ node = (xmlNodePtr) xmlHasProp(elemDecl->node,
+ BAD_CAST "default");
+ }
+ vcret = xmlSchemaParseCheckCOSValidDefault(pctxt, node,
+ typeDef, elemDecl->value, &(elemDecl->defVal));
+ if (vcret != 0) {
+ if (vcret < 0) {
+ PERROR_INT("xmlSchemaElemCheckValConstr",
+ "failed to validate the value constraint of an "
+ "element declaration");
+ return (-1);
+ }
+ return (vcret);
+ }
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlSchemaCheckElemSubstGroup:
+ * @ctxt: a schema parser context
+ * @decl: the element declaration
+ * @name: the name of the attribute
+ *
+ * Schema Component Constraint:
+ * Substitution Group (cos-equiv-class)
+ *
+ * In Libxml2 the subst. groups will be precomputed, in terms of that
+ * a list will be built for each subst. group head, holding all direct
+ * referents to this head.
+ * NOTE that this function needs:
+ * 1. circular subst. groups to be checked beforehand
+ * 2. the declaration's type to be derived from the head's type
+ *
+ * STATUS:
+ *
+ */
+static void
+xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaElementPtr elemDecl)
+{
+ if ((WXS_SUBST_HEAD(elemDecl) == NULL) ||
+ /* SPEC (1) "Its {abstract} is false." */
+ (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT))
+ return;
+ {
+ xmlSchemaElementPtr head;
+ xmlSchemaTypePtr headType, type;
+ int set, methSet;
+ /*
+ * SPEC (2) "It is validly substitutable for HEAD subject to HEAD's
+ * {disallowed substitutions} as the blocking constraint, as defined in
+ * Substitution Group OK (Transitive) ($3.3.6)."
+ */
+ for (head = WXS_SUBST_HEAD(elemDecl); head != NULL;
+ head = WXS_SUBST_HEAD(head)) {
+ set = 0;
+ methSet = 0;
+ /*
+ * The blocking constraints.
+ */
+ if (head->flags & XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION)
+ continue;
+ headType = head->subtypes;
+ type = elemDecl->subtypes;
+ if (headType == type)
+ goto add_member;
+ if (head->flags & XML_SCHEMAS_ELEM_BLOCK_RESTRICTION)
+ set |= XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;
+ if (head->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION)
+ set |= XML_SCHEMAS_TYPE_BLOCK_EXTENSION;
+ /*
+ * SPEC: Substitution Group OK (Transitive) (2.3)
+ * "The set of all {derivation method}s involved in the
+ * derivation of D's {type definition} from C's {type definition}
+ * does not intersect with the union of the blocking constraint,
+ * C's {prohibited substitutions} (if C is complex, otherwise the
+ * empty set) and the {prohibited substitutions} (respectively the
+ * empty set) of any intermediate {type definition}s in the
+ * derivation of D's {type definition} from C's {type definition}."
+ */
+ /*
+ * OPTIMIZE TODO: Optimize this a bit, since, if traversing the
+ * subst.head axis, the methSet does not need to be computed for
+ * the full depth over and over.
+ */
+ /*
+ * The set of all {derivation method}s involved in the derivation
+ */
+ while ((type != NULL) && (type != headType)) {
+ if ((WXS_IS_EXTENSION(type)) &&
+ ((methSet & XML_SCHEMAS_TYPE_BLOCK_RESTRICTION) == 0))
+ methSet |= XML_SCHEMAS_TYPE_BLOCK_EXTENSION;
+
+ if (WXS_IS_RESTRICTION(type) &&
+ ((methSet & XML_SCHEMAS_TYPE_BLOCK_RESTRICTION) == 0))
+ methSet |= XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;
+
+ type = type->baseType;
+ }
+ /*
+ * The {prohibited substitutions} of all intermediate types +
+ * the head's type.
+ */
+ type = elemDecl->subtypes->baseType;
+ while (type != NULL) {
+ if (WXS_IS_COMPLEX(type)) {
+ if ((type->flags &
+ XML_SCHEMAS_TYPE_BLOCK_EXTENSION) &&
+ ((set & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) == 0))
+ set |= XML_SCHEMAS_TYPE_BLOCK_EXTENSION;
+ if ((type->flags &
+ XML_SCHEMAS_TYPE_BLOCK_RESTRICTION) &&
+ ((set & XML_SCHEMAS_TYPE_BLOCK_RESTRICTION) == 0))
+ set |= XML_SCHEMAS_TYPE_BLOCK_RESTRICTION;
+ } else
+ break;
+ if (type == headType)
+ break;
+ type = type->baseType;
+ }
+ if ((set != 0) &&
+ (((set & XML_SCHEMAS_TYPE_BLOCK_EXTENSION) &&
+ (methSet & XML_SCHEMAS_TYPE_BLOCK_EXTENSION)) ||
+ ((set & XML_SCHEMAS_TYPE_BLOCK_RESTRICTION) &&
+ (methSet & XML_SCHEMAS_TYPE_BLOCK_RESTRICTION)))) {
+ continue;
+ }
+add_member:
+ xmlSchemaAddElementSubstitutionMember(ctxt, head, elemDecl);
+ if ((head->flags & XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD) == 0)
+ head->flags |= XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD;
+ }
+ }
+}
+
+#ifdef WXS_ELEM_DECL_CONS_ENABLED /* enable when finished */
+/**
+ * xmlSchemaCheckElementDeclComponent
+ * @pctxt: the schema parser context
+ * @ctxtComponent: the context component (an element declaration)
+ * @ctxtParticle: the first particle of the context component
+ * @searchParticle: the element declaration particle to be analysed
+ *
+ * Schema Component Constraint: Element Declarations Consistent
+ */
+static int
+xmlSchemaCheckElementDeclConsistent(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBasicItemPtr ctxtComponent,
+ xmlSchemaParticlePtr ctxtParticle,
+ xmlSchemaParticlePtr searchParticle,
+ xmlSchemaParticlePtr curParticle,
+ int search)
+{
+ return(0);
+
+ int ret = 0;
+ xmlSchemaParticlePtr cur = curParticle;
+ if (curParticle == NULL) {
+ return(0);
+ }
+ if (WXS_PARTICLE_TERM(curParticle) == NULL) {
+ /*
+ * Just return in this case. A missing "term" of the particle
+ * might arise due to an invalid "term" component.
+ */
+ return(0);
+ }
+ while (cur != NULL) {
+ switch (WXS_PARTICLE_TERM(cur)->type) {
+ case XML_SCHEMA_TYPE_ANY:
+ break;
+ case XML_SCHEMA_TYPE_ELEMENT:
+ if (search == 0) {
+ ret = xmlSchemaCheckElementDeclConsistent(pctxt,
+ ctxtComponent, ctxtParticle, cur, ctxtParticle, 1);
+ if (ret != 0)
+ return(ret);
+ } else {
+ xmlSchemaElementPtr elem =
+ WXS_ELEM_CAST(WXS_PARTICLE_TERM(cur));
+ /*
+ * SPEC Element Declarations Consistent:
+ * "If the {particles} contains, either directly,
+ * indirectly (that is, within the {particles} of a
+ * contained model group, recursively) or `implicitly`
+ * two or more element declaration particles with
+ * the same {name} and {target namespace}, then
+ * all their type definitions must be the same
+ * top-level definition [...]"
+ */
+ if (xmlStrEqual(WXS_PARTICLE_TERM_AS_ELEM(cur)->name,
+ WXS_PARTICLE_TERM_AS_ELEM(searchParticle)->name) &&
+ xmlStrEqual(WXS_PARTICLE_TERM_AS_ELEM(cur)->targetNamespace,
+ WXS_PARTICLE_TERM_AS_ELEM(searchParticle)->targetNamespace))
+ {
+ xmlChar *strA = NULL, *strB = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ /* TODO: error code */
+ XML_SCHEMAP_COS_NONAMBIG,
+ WXS_ITEM_NODE(cur), NULL,
+ "In the content model of %s, there are multiple "
+ "element declarations for '%s' with different "
+ "type definitions",
+ xmlSchemaGetComponentDesignation(&strA,
+ ctxtComponent),
+ xmlSchemaFormatQName(&strB,
+ WXS_PARTICLE_TERM_AS_ELEM(cur)->targetNamespace,
+ WXS_PARTICLE_TERM_AS_ELEM(cur)->name));
+ FREE_AND_NULL(strA);
+ FREE_AND_NULL(strB);
+ return(XML_SCHEMAP_COS_NONAMBIG);
+ }
+ }
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE: {
+ break;
+ }
+ case XML_SCHEMA_TYPE_CHOICE:{
+ /*
+ xmlSchemaTreeItemPtr sub;
+
+ sub = WXS_PARTICLE_TERM(particle)->children; (xmlSchemaParticlePtr)
+ while (sub != NULL) {
+ ret = xmlSchemaCheckElementDeclConsistent(pctxt, ctxtComponent,
+ ctxtParticle, ctxtElem);
+ if (ret != 0)
+ return(ret);
+ sub = sub->next;
+ }
+ */
+ break;
+ }
+ case XML_SCHEMA_TYPE_ALL:
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ break;
+ default:
+ xmlSchemaInternalErr2(ACTXT_CAST pctxt,
+ "xmlSchemaCheckElementDeclConsistent",
+ "found unexpected term of type '%s' in content model",
+ WXS_ITEM_TYPE_NAME(WXS_PARTICLE_TERM(cur)), NULL);
+ return(-1);
+ }
+ cur = (xmlSchemaParticlePtr) cur->next;
+ }
+
+exit:
+ return(ret);
+}
+#endif
+
+/**
+ * xmlSchemaCheckElementDeclComponent
+ * @item: an schema element declaration/particle
+ * @ctxt: a schema parser context
+ * @name: the name of the attribute
+ *
+ * Validates the value constraints of an element declaration.
+ * Adds substitution group members.
+ */
+static void
+xmlSchemaCheckElementDeclComponent(xmlSchemaElementPtr elemDecl,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if (elemDecl == NULL)
+ return;
+ if (elemDecl->flags & XML_SCHEMAS_ELEM_INTERNAL_CHECKED)
+ return;
+ elemDecl->flags |= XML_SCHEMAS_ELEM_INTERNAL_CHECKED;
+ if (xmlSchemaCheckElemPropsCorrect(ctxt, elemDecl) == 0) {
+ /*
+ * Adds substitution group members.
+ */
+ xmlSchemaCheckElemSubstGroup(ctxt, elemDecl);
+ }
+}
+
+/**
+ * xmlSchemaResolveModelGroupParticleReferences:
+ * @particle: a particle component
+ * @ctxt: a parser context
+ *
+ * Resolves references of a model group's {particles} to
+ * model group definitions and to element declarations.
+ */
+static void
+xmlSchemaResolveModelGroupParticleReferences(
+ xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaModelGroupPtr mg)
+{
+ xmlSchemaParticlePtr particle = WXS_MODELGROUP_PARTICLE(mg);
+ xmlSchemaQNameRefPtr ref;
+ xmlSchemaBasicItemPtr refItem;
+
+ /*
+ * URGENT TODO: Test this.
+ */
+ while (particle != NULL) {
+ if ((WXS_PARTICLE_TERM(particle) == NULL) ||
+ ((WXS_PARTICLE_TERM(particle))->type !=
+ XML_SCHEMA_EXTRA_QNAMEREF))
+ {
+ goto next_particle;
+ }
+ ref = WXS_QNAME_CAST WXS_PARTICLE_TERM(particle);
+ /*
+ * Resolve the reference.
+ * NULL the {term} by default.
+ */
+ particle->children = NULL;
+
+ refItem = xmlSchemaGetNamedComponent(ctxt->schema,
+ ref->itemType, ref->name, ref->targetNamespace);
+ if (refItem == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt, XML_SCHEMAP_SRC_RESOLVE,
+ NULL, WXS_ITEM_NODE(particle), "ref", ref->name,
+ ref->targetNamespace, ref->itemType, NULL);
+ /* TODO: remove the particle. */
+ goto next_particle;
+ }
+ if (refItem->type == XML_SCHEMA_TYPE_GROUP) {
+ if (WXS_MODELGROUPDEF_MODEL(refItem) == NULL)
+ /* TODO: remove the particle. */
+ goto next_particle;
+ /*
+ * NOTE that we will assign the model group definition
+ * itself to the "term" of the particle. This will ease
+ * the check for circular model group definitions. After
+ * that the "term" will be assigned the model group of the
+ * model group definition.
+ */
+ if ((WXS_MODELGROUPDEF_MODEL(refItem))->type ==
+ XML_SCHEMA_TYPE_ALL) {
+ /*
+ * SPEC cos-all-limited (1)
+ * SPEC cos-all-limited (1.2)
+ * "It appears only as the value of one or both of the
+ * following properties:"
+ * (1.1) "the {model group} property of a model group
+ * definition."
+ * (1.2) "the {term} property of a particle [... of] the "
+ * {content type} of a complex type definition."
+ */
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ /* TODO: error code */
+ XML_SCHEMAP_COS_ALL_LIMITED,
+ WXS_ITEM_NODE(particle), NULL,
+ "A model group definition is referenced, but "
+ "it contains an 'all' model group, which "
+ "cannot be contained by model groups",
+ NULL, NULL);
+ /* TODO: remove the particle. */
+ goto next_particle;
+ }
+ particle->children = (xmlSchemaTreeItemPtr) refItem;
+ } else {
+ /*
+ * TODO: Are referenced element declarations the only
+ * other components we expect here?
+ */
+ particle->children = (xmlSchemaTreeItemPtr) refItem;
+ }
+next_particle:
+ particle = WXS_PTC_CAST particle->next;
+ }
+}
+
+static int
+xmlSchemaAreValuesEqual(xmlSchemaValPtr x,
+ xmlSchemaValPtr y)
+{
+ xmlSchemaTypePtr tx, ty, ptx, pty;
+ int ret;
+
+ while (x != NULL) {
+ /* Same types. */
+ tx = xmlSchemaGetBuiltInType(xmlSchemaGetValType(x));
+ ty = xmlSchemaGetBuiltInType(xmlSchemaGetValType(y));
+ ptx = xmlSchemaGetPrimitiveType(tx);
+ pty = xmlSchemaGetPrimitiveType(ty);
+ /*
+ * (1) if a datatype T' is `derived` by `restriction` from an
+ * atomic datatype T then the `value space` of T' is a subset of
+ * the `value space` of T. */
+ /*
+ * (2) if datatypes T' and T'' are `derived` by `restriction`
+ * from a common atomic ancestor T then the `value space`s of T'
+ * and T'' may overlap.
+ */
+ if (ptx != pty)
+ return(0);
+ /*
+ * We assume computed values to be normalized, so do a fast
+ * string comparison for string based types.
+ */
+ if ((ptx->builtInType == XML_SCHEMAS_STRING) ||
+ WXS_IS_ANY_SIMPLE_TYPE(ptx)) {
+ if (! xmlStrEqual(
+ xmlSchemaValueGetAsString(x),
+ xmlSchemaValueGetAsString(y)))
+ return (0);
+ } else {
+ ret = xmlSchemaCompareValuesWhtsp(
+ x, XML_SCHEMA_WHITESPACE_PRESERVE,
+ y, XML_SCHEMA_WHITESPACE_PRESERVE);
+ if (ret == -2)
+ return(-1);
+ if (ret != 0)
+ return(0);
+ }
+ /*
+ * Lists.
+ */
+ x = xmlSchemaValueGetNext(x);
+ if (x != NULL) {
+ y = xmlSchemaValueGetNext(y);
+ if (y == NULL)
+ return (0);
+ } else if (xmlSchemaValueGetNext(y) != NULL)
+ return (0);
+ else
+ return (1);
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaResolveAttrUseReferences:
+ * @item: an attribute use
+ * @ctxt: a parser context
+ *
+ * Resolves the referenced attribute declaration.
+ */
+static int
+xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ if ((ctxt == NULL) || (ause == NULL))
+ return(-1);
+ if ((ause->attrDecl == NULL) ||
+ (ause->attrDecl->type != XML_SCHEMA_EXTRA_QNAMEREF))
+ return(0);
+
+ {
+ xmlSchemaQNameRefPtr ref = WXS_QNAME_CAST ause->attrDecl;
+
+ /*
+ * TODO: Evaluate, what errors could occur if the declaration is not
+ * found.
+ */
+ ause->attrDecl = xmlSchemaGetAttributeDecl(ctxt->schema,
+ ref->name, ref->targetNamespace);
+ if (ause->attrDecl == NULL) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST ause, ause->node,
+ "ref", ref->name, ref->targetNamespace,
+ XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
+ return(ctxt->err);;
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaCheckAttrUsePropsCorrect:
+ * @ctxt: a parser context
+ * @use: an attribute use
+ *
+ * Schema Component Constraint:
+ * Attribute Use Correct (au-props-correct)
+ *
+ */
+static int
+xmlSchemaCheckAttrUsePropsCorrect(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaAttributeUsePtr use)
+{
+ if ((ctxt == NULL) || (use == NULL))
+ return(-1);
+ if ((use->defValue == NULL) || (WXS_ATTRUSE_DECL(use) == NULL) ||
+ ((WXS_ATTRUSE_DECL(use))->type != XML_SCHEMA_TYPE_ATTRIBUTE))
+ return(0);
+
+ /*
+ * SPEC au-props-correct (1)
+ * "The values of the properties of an attribute use must be as
+ * described in the property tableau in The Attribute Use Schema
+ * Component ($3.5.1), modulo the impact of Missing
+ * Sub-components ($5.3)."
+ */
+
+ if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) &&
+ ((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMAS_ATTR_FIXED) &&
+ ((use->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0))
+ {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_AU_PROPS_CORRECT_2,
+ WXS_BASIC_CAST use, NULL,
+ "The attribute declaration has a 'fixed' value constraint "
+ ", thus the attribute use must also have a 'fixed' value "
+ "constraint",
+ NULL);
+ return(ctxt->err);
+ }
+ /*
+ * Compute and check the value constraint's value.
+ */
+ if ((use->defVal != NULL) && (WXS_ATTRUSE_TYPEDEF(use) != NULL)) {
+ int ret;
+ /*
+ * TODO: The spec seems to be missing a check of the
+ * value constraint of the attribute use. We will do it here.
+ */
+ /*
+ * SPEC a-props-correct (3)
+ */
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ WXS_ATTRUSE_TYPEDEF(use), XML_SCHEMAS_ID))
+ {
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_AU_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST use,
+ "Value constraints are not allowed if the type definition "
+ "is or is derived from xs:ID",
+ NULL, NULL);
+ return(ctxt->err);
+ }
+
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST ctxt,
+ use->node, WXS_ATTRUSE_TYPEDEF(use),
+ use->defValue, &(use->defVal),
+ 1, 1, 0);
+ if (ret != 0) {
+ if (ret < 0) {
+ PERROR_INT2("xmlSchemaCheckAttrUsePropsCorrect",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ return(-1);
+ }
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAP_AU_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST use,
+ "The value of the value constraint is not valid",
+ NULL, NULL);
+ return(ctxt->err);
+ }
+ }
+ /*
+ * SPEC au-props-correct (2)
+ * "If the {attribute declaration} has a fixed
+ * {value constraint}, then if the attribute use itself has a
+ * {value constraint}, it must also be fixed and its value must match
+ * that of the {attribute declaration}'s {value constraint}."
+ */
+ if (((WXS_ATTRUSE_DECL(use))->defVal != NULL) &&
+ (((WXS_ATTRUSE_DECL(use))->flags & XML_SCHEMA_ATTR_USE_FIXED) == 0))
+ {
+ if (! xmlSchemaAreValuesEqual(use->defVal,
+ (WXS_ATTRUSE_DECL(use))->defVal))
+ {
+ xmlSchemaPCustomErr(ctxt,
+ XML_SCHEMAP_AU_PROPS_CORRECT_2,
+ WXS_BASIC_CAST use, NULL,
+ "The 'fixed' value constraint of the attribute use "
+ "must match the attribute declaration's value "
+ "constraint '%s'",
+ (WXS_ATTRUSE_DECL(use))->defValue);
+ }
+ return(ctxt->err);
+ }
+ return(0);
+}
+
+
+
+
+/**
+ * xmlSchemaResolveAttrTypeReferences:
+ * @item: an attribute declaration
+ * @ctxt: a parser context
+ *
+ * Resolves the referenced type definition component.
+ */
+static int
+xmlSchemaResolveAttrTypeReferences(xmlSchemaAttributePtr item,
+ xmlSchemaParserCtxtPtr ctxt)
+{
+ /*
+ * The simple type definition corresponding to the <simpleType> element
+ * information item in the [children], if present, otherwise the simple
+ * type definition `resolved` to by the `actual value` of the type
+ * [attribute], if present, otherwise the `simple ur-type definition`.
+ */
+ if (item->flags & XML_SCHEMAS_ATTR_INTERNAL_RESOLVED)
+ return(0);
+ item->flags |= XML_SCHEMAS_ATTR_INTERNAL_RESOLVED;
+ if (item->subtypes != NULL)
+ return(0);
+ if (item->typeName != NULL) {
+ xmlSchemaTypePtr type;
+
+ type = xmlSchemaGetType(ctxt->schema, item->typeName,
+ item->typeNs);
+ if ((type == NULL) || (! WXS_IS_SIMPLE(type))) {
+ xmlSchemaPResCompAttrErr(ctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST item, item->node,
+ "type", item->typeName, item->typeNs,
+ XML_SCHEMA_TYPE_SIMPLE, NULL);
+ return(ctxt->err);
+ } else
+ item->subtypes = type;
+
+ } else {
+ /*
+ * The type defaults to the xs:anySimpleType.
+ */
+ item->subtypes = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaResolveIDCKeyReferences:
+ * @idc: the identity-constraint definition
+ * @ctxt: the schema parser context
+ * @name: the attribute name
+ *
+ * Resolve keyRef references to key/unique IDCs.
+ * Schema Component Constraint:
+ * Identity-constraint Definition Properties Correct (c-props-correct)
+ */
+static int
+xmlSchemaResolveIDCKeyReferences(xmlSchemaIDCPtr idc,
+ xmlSchemaParserCtxtPtr pctxt)
+{
+ if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF)
+ return(0);
+ if (idc->ref->name != NULL) {
+ idc->ref->item = (xmlSchemaBasicItemPtr)
+ xmlSchemaGetIDC(pctxt->schema, idc->ref->name,
+ idc->ref->targetNamespace);
+ if (idc->ref->item == NULL) {
+ /*
+ * TODO: It is actually not an error to fail to resolve
+ * at this stage. BUT we need to be that strict!
+ */
+ xmlSchemaPResCompAttrErr(pctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ WXS_BASIC_CAST idc, idc->node,
+ "refer", idc->ref->name,
+ idc->ref->targetNamespace,
+ XML_SCHEMA_TYPE_IDC_KEY, NULL);
+ return(pctxt->err);
+ } else if (idc->ref->item->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ /*
+ * SPEC c-props-correct (1)
+ */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_C_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST idc,
+ "The keyref references a keyref",
+ NULL, NULL);
+ idc->ref->item = NULL;
+ return(pctxt->err);
+ } else {
+ if (idc->nbFields !=
+ ((xmlSchemaIDCPtr) idc->ref->item)->nbFields) {
+ xmlChar *str = NULL;
+ xmlSchemaIDCPtr refer;
+
+ refer = (xmlSchemaIDCPtr) idc->ref->item;
+ /*
+ * SPEC c-props-correct(2)
+ * "If the {identity-constraint category} is keyref,
+ * the cardinality of the {fields} must equal that of
+ * the {fields} of the {referenced key}.
+ */
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_C_PROPS_CORRECT,
+ NULL, WXS_BASIC_CAST idc,
+ "The cardinality of the keyref differs from the "
+ "cardinality of the referenced key/unique '%s'",
+ xmlSchemaFormatQName(&str, refer->targetNamespace,
+ refer->name),
+ NULL);
+ FREE_AND_NULL(str)
+ return(pctxt->err);
+ }
+ }
+ }
+ return(0);
+}
+
+static int
+xmlSchemaResolveAttrUseProhibReferences(xmlSchemaAttributeUseProhibPtr prohib,
+ xmlSchemaParserCtxtPtr pctxt)
+{
+ if (xmlSchemaGetAttributeDecl(pctxt->schema, prohib->name,
+ prohib->targetNamespace) == NULL) {
+
+ xmlSchemaPResCompAttrErr(pctxt,
+ XML_SCHEMAP_SRC_RESOLVE,
+ NULL, prohib->node,
+ "ref", prohib->name, prohib->targetNamespace,
+ XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
+ return(XML_SCHEMAP_SRC_RESOLVE);
+ }
+ return(0);
+}
+
+#define WXS_REDEFINED_TYPE(c) \
+(((xmlSchemaTypePtr) item)->flags & XML_SCHEMAS_TYPE_REDEFINED)
+
+#define WXS_REDEFINED_MODEL_GROUP_DEF(c) \
+(((xmlSchemaModelGroupDefPtr) item)->flags & XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED)
+
+#define WXS_REDEFINED_ATTR_GROUP(c) \
+(((xmlSchemaAttributeGroupPtr) item)->flags & XML_SCHEMAS_ATTRGROUP_REDEFINED)
+
+static int
+xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
+{
+ int err = 0;
+ xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
+ xmlSchemaBasicItemPtr prev, item;
+ int wasRedefined;
+
+ if (redef == NULL)
+ return(0);
+
+ do {
+ item = redef->item;
+ /*
+ * First try to locate the redefined component in the
+ * schema graph starting with the redefined schema.
+ * NOTE: According to this schema bug entry:
+ * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005OctDec/0019.html
+ * it's not clear if the referenced component needs to originate
+ * from the <redefine>d schema _document_ or the schema; the latter
+ * would include all imported and included sub-schemas of the
+ * <redefine>d schema. Currenlty we latter approach is used.
+ * SUPPLEMENT: It seems that the WG moves towards the latter
+ * approach, so we are doing it right.
+ *
+ */
+ prev = xmlSchemaFindRedefCompInGraph(
+ redef->targetBucket, item->type,
+ redef->refName, redef->refTargetNs);
+ if (prev == NULL) {
+ xmlChar *str = NULL;
+ xmlNodePtr node;
+
+ /*
+ * SPEC src-redefine:
+ * (6.2.1) "The `actual value` of its own name attribute plus
+ * target namespace must successfully `resolve` to a model
+ * group definition in I."
+ * (7.2.1) "The `actual value` of its own name attribute plus
+ * target namespace must successfully `resolve` to an attribute
+ * group definition in I."
+
+ *
+ * Note that, if we are redefining with the use of references
+ * to components, the spec assumes the src-resolve to be used;
+ * but this won't assure that we search only *inside* the
+ * redefined schema.
+ */
+ if (redef->reference)
+ node = WXS_ITEM_NODE(redef->reference);
+ else
+ node = WXS_ITEM_NODE(item);
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ /*
+ * TODO: error code.
+ * Probably XML_SCHEMAP_SRC_RESOLVE, if this is using the
+ * reference kind.
+ */
+ XML_SCHEMAP_SRC_REDEFINE, node, NULL,
+ "The %s '%s' to be redefined could not be found in "
+ "the redefined schema",
+ WXS_ITEM_TYPE_NAME(item),
+ xmlSchemaFormatQName(&str, redef->refTargetNs,
+ redef->refName));
+ FREE_AND_NULL(str);
+ err = pctxt->err;
+ redef = redef->next;
+ continue;
+ }
+ /*
+ * TODO: Obtaining and setting the redefinition state is really
+ * clumsy.
+ */
+ wasRedefined = 0;
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if ((WXS_TYPE_CAST prev)->flags &
+ XML_SCHEMAS_TYPE_REDEFINED)
+ {
+ wasRedefined = 1;
+ break;
+ }
+ /* Mark it as redefined. */
+ (WXS_TYPE_CAST prev)->flags |= XML_SCHEMAS_TYPE_REDEFINED;
+ /*
+ * Assign the redefined type to the
+ * base type of the redefining type.
+ * TODO: How
+ */
+ ((xmlSchemaTypePtr) item)->baseType =
+ (xmlSchemaTypePtr) prev;
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ if ((WXS_MODEL_GROUPDEF_CAST prev)->flags &
+ XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED)
+ {
+ wasRedefined = 1;
+ break;
+ }
+ /* Mark it as redefined. */
+ (WXS_MODEL_GROUPDEF_CAST prev)->flags |=
+ XML_SCHEMA_MODEL_GROUP_DEF_REDEFINED;
+ if (redef->reference != NULL) {
+ /*
+ * Overwrite the QName-reference with the
+ * referenced model group def.
+ */
+ (WXS_PTC_CAST redef->reference)->children =
+ WXS_TREE_CAST prev;
+ }
+ redef->target = prev;
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ if ((WXS_ATTR_GROUP_CAST prev)->flags &
+ XML_SCHEMAS_ATTRGROUP_REDEFINED)
+ {
+ wasRedefined = 1;
+ break;
+ }
+ (WXS_ATTR_GROUP_CAST prev)->flags |=
+ XML_SCHEMAS_ATTRGROUP_REDEFINED;
+ if (redef->reference != NULL) {
+ /*
+ * Assign the redefined attribute group to the
+ * QName-reference component.
+ * This is the easy case, since we will just
+ * expand the redefined group.
+ */
+ (WXS_QNAME_CAST redef->reference)->item = prev;
+ redef->target = NULL;
+ } else {
+ /*
+ * This is the complicated case: we need
+ * to apply src-redefine (7.2.2) at a later
+ * stage, i.e. when attribute group references
+ * have beed expanded and simple types have
+ * beed fixed.
+ */
+ redef->target = prev;
+ }
+ break;
+ default:
+ PERROR_INT("xmlSchemaResolveRedefReferences",
+ "Unexpected redefined component type");
+ return(-1);
+ }
+ if (wasRedefined) {
+ xmlChar *str = NULL;
+ xmlNodePtr node;
+
+ if (redef->reference)
+ node = WXS_ITEM_NODE(redef->reference);
+ else
+ node = WXS_ITEM_NODE(redef->item);
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ /* TODO: error code. */
+ XML_SCHEMAP_SRC_REDEFINE,
+ node, NULL,
+ "The referenced %s was already redefined. Multiple "
+ "redefinition of the same component is not supported",
+ xmlSchemaGetComponentDesignation(&str, prev),
+ NULL);
+ FREE_AND_NULL(str)
+ err = pctxt->err;
+ redef = redef->next;
+ continue;
+ }
+ redef = redef->next;
+ } while (redef != NULL);
+
+ return(err);
+}
+
+static int
+xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt)
+{
+ int err = 0;
+ xmlSchemaRedefPtr redef = WXS_CONSTRUCTOR(pctxt)->redefs;
+ xmlSchemaBasicItemPtr item;
+
+ if (redef == NULL)
+ return(0);
+
+ do {
+ if (redef->target == NULL) {
+ redef = redef->next;
+ continue;
+ }
+ item = redef->item;
+
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SIMPLE:
+ case XML_SCHEMA_TYPE_COMPLEX:
+ /*
+ * Since the spec wants the {name} of the redefined
+ * type to be 'absent', we'll NULL it.
+ */
+ (WXS_TYPE_CAST redef->target)->name = NULL;
+
+ /*
+ * TODO: Seems like there's nothing more to do. The normal
+ * inheritance mechanism is used. But not 100% sure.
+ */
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ /*
+ * URGENT TODO:
+ * SPEC src-redefine:
+ * (6.2.2) "The {model group} of the model group definition
+ * which corresponds to it per XML Representation of Model
+ * Group Definition Schema Components ($3.7.2) must be a
+ * `valid restriction` of the {model group} of that model
+ * group definition in I, as defined in Particle Valid
+ * (Restriction) ($3.9.6)."
+ */
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ /*
+ * SPEC src-redefine:
+ * (7.2.2) "The {attribute uses} and {attribute wildcard} of
+ * the attribute group definition which corresponds to it
+ * per XML Representation of Attribute Group Definition Schema
+ * Components ($3.6.2) must be `valid restrictions` of the
+ * {attribute uses} and {attribute wildcard} of that attribute
+ * group definition in I, as defined in clause 2, clause 3 and
+ * clause 4 of Derivation Valid (Restriction, Complex)
+ * ($3.4.6) (where references to the base type definition are
+ * understood as references to the attribute group definition
+ * in I)."
+ */
+ err = xmlSchemaCheckDerivationOKRestriction2to4(pctxt,
+ XML_SCHEMA_ACTION_REDEFINE,
+ item, redef->target,
+ (WXS_ATTR_GROUP_CAST item)->attrUses,
+ (WXS_ATTR_GROUP_CAST redef->target)->attrUses,
+ (WXS_ATTR_GROUP_CAST item)->attributeWildcard,
+ (WXS_ATTR_GROUP_CAST redef->target)->attributeWildcard);
+ if (err == -1)
+ return(-1);
+ break;
+ default:
+ break;
+ }
+ redef = redef->next;
+ } while (redef != NULL);
+ return(0);
+}
+
+
+static int
+xmlSchemaAddComponents(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBucketPtr bucket)
+{
+ xmlSchemaBasicItemPtr item;
+ int err;
+ xmlHashTablePtr *table;
+ const xmlChar *name;
+ int i;
+
+#define WXS_GET_GLOBAL_HASH(c, slot) { \
+ if (WXS_IS_BUCKET_IMPMAIN((c)->type)) \
+ table = &(WXS_IMPBUCKET((c))->schema->slot); \
+ else \
+ table = &(WXS_INCBUCKET((c))->ownerImport->schema->slot); }
+
+ /*
+ * Add global components to the schema's hash tables.
+ * This is the place where duplicate components will be
+ * detected.
+ * TODO: I think normally we should support imports of the
+ * same namespace from multiple locations. We don't do currently,
+ * but if we do then according to:
+ * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2224
+ * we would need, if imported directly, to import redefined
+ * components as well to be able to catch clashing components.
+ * (I hope I'll still know what this means after some months :-()
+ */
+ if (bucket == NULL)
+ return(-1);
+ if (bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED)
+ return(0);
+ bucket->flags |= XML_SCHEMA_BUCKET_COMPS_ADDED;
+
+ for (i = 0; i < bucket->globals->nbItems; i++) {
+ item = bucket->globals->items[i];
+ table = NULL;
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if (WXS_REDEFINED_TYPE(item))
+ continue;
+ name = (WXS_TYPE_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, typeDecl)
+ break;
+ case XML_SCHEMA_TYPE_ELEMENT:
+ name = (WXS_ELEM_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, elemDecl)
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ name = (WXS_ATTR_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, attrDecl)
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ if (WXS_REDEFINED_MODEL_GROUP_DEF(item))
+ continue;
+ name = (WXS_MODEL_GROUPDEF_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, groupDecl)
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ if (WXS_REDEFINED_ATTR_GROUP(item))
+ continue;
+ name = (WXS_ATTR_GROUP_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, attrgrpDecl)
+ break;
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ name = (WXS_IDC_CAST item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, idcDef)
+ break;
+ case XML_SCHEMA_TYPE_NOTATION:
+ name = ((xmlSchemaNotationPtr) item)->name;
+ WXS_GET_GLOBAL_HASH(bucket, notaDecl)
+ break;
+ default:
+ PERROR_INT("xmlSchemaAddComponents",
+ "Unexpected global component type");
+ continue;
+ }
+ if (*table == NULL) {
+ *table = xmlHashCreateDict(10, pctxt->dict);
+ if (*table == NULL) {
+ PERROR_INT("xmlSchemaAddComponents",
+ "failed to create a component hash table");
+ return(-1);
+ }
+ }
+ err = xmlHashAddEntry(*table, name, item);
+ if (err != 0) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST pctxt,
+ XML_SCHEMAP_REDEFINED_TYPE,
+ WXS_ITEM_NODE(item),
+ WXS_BASIC_CAST item,
+ "A global %s '%s' does already exist",
+ WXS_ITEM_TYPE_NAME(item),
+ xmlSchemaGetComponentQName(&str, item));
+ FREE_AND_NULL(str);
+ }
+ }
+ /*
+ * Process imported/included schemas.
+ */
+ if (bucket->relations != NULL) {
+ xmlSchemaSchemaRelationPtr rel = bucket->relations;
+ do {
+ if ((rel->bucket != NULL) &&
+ ((rel->bucket->flags & XML_SCHEMA_BUCKET_COMPS_ADDED) == 0)) {
+ if (xmlSchemaAddComponents(pctxt, rel->bucket) == -1)
+ return(-1);
+ }
+ rel = rel->next;
+ } while (rel != NULL);
+ }
+ return(0);
+}
+
+static int
+xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
+ xmlSchemaBucketPtr rootBucket)
+{
+ xmlSchemaConstructionCtxtPtr con = pctxt->constructor;
+ xmlSchemaTreeItemPtr item, *items;
+ int nbItems, i, ret = 0;
+ xmlSchemaBucketPtr oldbucket = con->bucket;
+ xmlSchemaElementPtr elemDecl;
+
+#define FIXHFAILURE if (pctxt->err == XML_SCHEMAP_INTERNAL) goto exit_failure;
+
+ if ((con->pending == NULL) ||
+ (con->pending->nbItems == 0))
+ return(0);
+
+ /*
+ * Since xmlSchemaFixupComplexType() will create new particles
+ * (local components), and those particle components need a bucket
+ * on the constructor, we'll assure here that the constructor has
+ * a bucket.
+ * TODO: Think about storing locals _only_ on the main bucket.
+ */
+ if (con->bucket == NULL)
+ con->bucket = rootBucket;
+
+ /* TODO:
+ * SPEC (src-redefine):
+ * (6.2) "If it has no such self-reference, then all of the
+ * following must be true:"
+
+ * (6.2.2) The {model group} of the model group definition which
+ * corresponds to it per XML Representation of Model Group
+ * Definition Schema Components ($3.7.2) must be a `valid
+ * restriction` of the {model group} of that model group definition
+ * in I, as defined in Particle Valid (Restriction) ($3.9.6)."
+ */
+ xmlSchemaCheckSRCRedefineFirst(pctxt);
+
+ /*
+ * Add global components to the schemata's hash tables.
+ */
+ xmlSchemaAddComponents(pctxt, rootBucket);
+
+ pctxt->ctxtType = NULL;
+ items = (xmlSchemaTreeItemPtr *) con->pending->items;
+ nbItems = con->pending->nbItems;
+ /*
+ * Now that we have parsed *all* the schema document(s) and converted
+ * them to schema components, we can resolve references, apply component
+ * constraints, create the FSA from the content model, etc.
+ */
+ /*
+ * Resolve references of..
+ *
+ * 1. element declarations:
+ * - the type definition
+ * - the substitution group affiliation
+ * 2. simple/complex types:
+ * - the base type definition
+ * - the memberTypes of union types
+ * - the itemType of list types
+ * 3. attributes declarations and attribute uses:
+ * - the type definition
+ * - if an attribute use, then the attribute declaration
+ * 4. attribute group references:
+ * - the attribute group definition
+ * 5. particles:
+ * - the term of the particle (e.g. a model group)
+ * 6. IDC key-references:
+ * - the referenced IDC 'key' or 'unique' definition
+ * 7. Attribute prohibitions which had a "ref" attribute.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ xmlSchemaResolveElementReferences(
+ (xmlSchemaElementPtr) item, pctxt);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ xmlSchemaResolveTypeReferences(
+ (xmlSchemaTypePtr) item, pctxt);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ xmlSchemaResolveAttrTypeReferences(
+ (xmlSchemaAttributePtr) item, pctxt);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ xmlSchemaResolveAttrUseReferences(
+ (xmlSchemaAttributeUsePtr) item, pctxt);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_EXTRA_QNAMEREF:
+ if ((WXS_QNAME_CAST item)->itemType ==
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP)
+ {
+ xmlSchemaResolveAttrGroupReferences(
+ WXS_QNAME_CAST item, pctxt);
+ }
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ case XML_SCHEMA_TYPE_ALL:
+ xmlSchemaResolveModelGroupParticleReferences(pctxt,
+ WXS_MODEL_GROUP_CAST item);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_TYPE_IDC_KEY:
+ case XML_SCHEMA_TYPE_IDC_UNIQUE:
+ case XML_SCHEMA_TYPE_IDC_KEYREF:
+ xmlSchemaResolveIDCKeyReferences(
+ (xmlSchemaIDCPtr) item, pctxt);
+ FIXHFAILURE;
+ break;
+ case XML_SCHEMA_EXTRA_ATTR_USE_PROHIB:
+ /*
+ * Handle attribue prohibition which had a
+ * "ref" attribute.
+ */
+ xmlSchemaResolveAttrUseProhibReferences(
+ WXS_ATTR_PROHIB_CAST item, pctxt);
+ FIXHFAILURE;
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Now that all references are resolved we
+ * can check for circularity of...
+ * 1. the base axis of type definitions
+ * 2. nested model group definitions
+ * 3. nested attribute group definitions
+ * TODO: check for circual substitution groups.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ /*
+ * Let's better stop on the first error here.
+ */
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ case XML_SCHEMA_TYPE_SIMPLE:
+ xmlSchemaCheckTypeDefCircular(
+ (xmlSchemaTypePtr) item, pctxt);
+ FIXHFAILURE;
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ break;
+ case XML_SCHEMA_TYPE_GROUP:
+ xmlSchemaCheckGroupDefCircular(
+ (xmlSchemaModelGroupDefPtr) item, pctxt);
+ FIXHFAILURE;
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ break;
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ xmlSchemaCheckAttrGroupCircular(
+ (xmlSchemaAttributeGroupPtr) item, pctxt);
+ FIXHFAILURE;
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * Model group definition references:
+ * Such a reference is reflected by a particle at the component
+ * level. Until now the 'term' of such particles pointed
+ * to the model group definition; this was done, in order to
+ * ease circularity checks. Now we need to set the 'term' of
+ * such particles to the model group of the model group definition.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SEQUENCE:
+ case XML_SCHEMA_TYPE_CHOICE:
+ xmlSchemaModelGroupToModelGroupDefFixup(pctxt,
+ WXS_MODEL_GROUP_CAST item);
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * Expand attribute group references of attribute group definitions.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ if ((! WXS_ATTR_GROUP_EXPANDED(item)) &&
+ WXS_ATTR_GROUP_HAS_REFS(item))
+ {
+ xmlSchemaAttributeGroupExpandRefs(pctxt,
+ WXS_ATTR_GROUP_CAST item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * First compute the variety of simple types. This is needed as
+ * a seperate step, since otherwise we won't be able to detect
+ * circular union types in all cases.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if (WXS_IS_TYPE_NOT_FIXED_1((xmlSchemaTypePtr) item)) {
+ xmlSchemaFixupSimpleTypeStageOne(pctxt,
+ (xmlSchemaTypePtr) item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * Detect circular union types. Note that this needs the variety to
+ * be already computed.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if (((xmlSchemaTypePtr) item)->memberTypes != NULL) {
+ xmlSchemaCheckUnionTypeDefCircular(pctxt,
+ (xmlSchemaTypePtr) item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Do the complete type fixup for simple types.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_SIMPLE:
+ if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) {
+ xmlSchemaFixupSimpleTypeStageTwo(pctxt, WXS_TYPE_CAST item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * At this point we need build and check all simple types.
+ */
+ /*
+ * Apply contraints for attribute declarations.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ATTRIBUTE:
+ xmlSchemaCheckAttrPropsCorrect(pctxt, WXS_ATTR_CAST item);
+ FIXHFAILURE;
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * Apply constraints for attribute uses.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ATTRIBUTE_USE:
+ if (((xmlSchemaAttributeUsePtr)item)->defValue != NULL) {
+ xmlSchemaCheckAttrUsePropsCorrect(pctxt,
+ WXS_ATTR_USE_CAST item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Apply constraints for attribute group definitions.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
+ if (( (WXS_ATTR_GROUP_CAST item)->attrUses != NULL) &&
+ ( (WXS_LIST_CAST (WXS_ATTR_GROUP_CAST item)->attrUses)->nbItems > 1))
+ {
+ xmlSchemaCheckAGPropsCorrect(pctxt, WXS_ATTR_GROUP_CAST item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Apply constraints for redefinitions.
+ */
+ if (WXS_CONSTRUCTOR(pctxt)->redefs != NULL)
+ xmlSchemaCheckSRCRedefineSecond(pctxt);
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Complex types are builded and checked.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = con->pending->items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ if (WXS_IS_TYPE_NOT_FIXED(WXS_TYPE_CAST item)) {
+ xmlSchemaFixupComplexType(pctxt, WXS_TYPE_CAST item);
+ FIXHFAILURE;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * The list could have changed, since xmlSchemaFixupComplexType()
+ * will create particles and model groups in some cases.
+ */
+ items = (xmlSchemaTreeItemPtr *) con->pending->items;
+ nbItems = con->pending->nbItems;
+
+ /*
+ * Apply some constraints for element declarations.
+ */
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_ELEMENT:
+ elemDecl = (xmlSchemaElementPtr) item;
+
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_INTERNAL_CHECKED) == 0)
+ {
+ xmlSchemaCheckElementDeclComponent(
+ (xmlSchemaElementPtr) elemDecl, pctxt);
+ FIXHFAILURE;
+ }
+
+#ifdef WXS_ELEM_DECL_CONS_ENABLED
+ /*
+ * Schema Component Constraint: Element Declarations Consistent
+ * Apply this constraint to local types of element declarations.
+ */
+ if ((WXS_ELEM_TYPEDEF(elemDecl) != NULL) &&
+ (WXS_IS_COMPLEX(WXS_ELEM_TYPEDEF(elemDecl))) &&
+ (WXS_TYPE_IS_LOCAL(WXS_ELEM_TYPEDEF(elemDecl))))
+ {
+ xmlSchemaCheckElementDeclConsistent(pctxt,
+ WXS_BASIC_CAST elemDecl,
+ WXS_TYPE_PARTICLE(WXS_ELEM_TYPEDEF(elemDecl)),
+ NULL, NULL, 0);
+ }
+#endif
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+
+ /*
+ * Finally we can build the automaton from the content model of
+ * complex types.
+ */
+
+ for (i = 0; i < nbItems; i++) {
+ item = items[i];
+ switch (item->type) {
+ case XML_SCHEMA_TYPE_COMPLEX:
+ xmlSchemaBuildContentModel((xmlSchemaTypePtr) item, pctxt);
+ /* FIXHFAILURE; */
+ break;
+ default:
+ break;
+ }
+ }
+ if (pctxt->nberrors != 0)
+ goto exit_error;
+ /*
+ * URGENT TODO: cos-element-consistent
+ */
+ goto exit;
+
+exit_error:
+ ret = pctxt->err;
+ goto exit;
+
+exit_failure:
+ ret = -1;
+
+exit:
+ /*
+ * Reset the constructor. This is needed for XSI acquisition, since
+ * those items will be processed over and over again for every XSI
+ * if not cleared here.
+ */
+ con->bucket = oldbucket;
+ con->pending->nbItems = 0;
+ if (con->substGroups != NULL) {
+ xmlHashFree(con->substGroups,
+ (xmlHashDeallocator) xmlSchemaSubstGroupFree);
+ con->substGroups = NULL;
+ }
+ if (con->redefs != NULL) {
+ xmlSchemaRedefListFree(con->redefs);
+ con->redefs = NULL;
+ }
+ return(ret);
+}
+/**
+ * xmlSchemaParse:
+ * @ctxt: a schema validation context
+ *
+ * parse a schema definition resource and build an internal
+ * XML Shema struture which can be used to validate instances.
+ *
+ * Returns the internal XML Schema structure built from the resource or
+ * NULL in case of error
+ */
+xmlSchemaPtr
+xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt)
+{
+ xmlSchemaPtr mainSchema = NULL;
+ xmlSchemaBucketPtr bucket = NULL;
+ int res;
+
+ /*
+ * This one is used if the schema to be parsed was specified via
+ * the API; i.e. not automatically by the validated instance document.
+ */
+
+ xmlSchemaInitTypes();
+
+ if (ctxt == NULL)
+ return (NULL);
+
+ /* TODO: Init the context. Is this all we need?*/
+ ctxt->nberrors = 0;
+ ctxt->err = 0;
+ ctxt->counter = 0;
+
+ /* Create the *main* schema. */
+ mainSchema = xmlSchemaNewSchema(ctxt);
+ if (mainSchema == NULL)
+ goto exit_failure;
+ /*
+ * Create the schema constructor.
+ */
+ if (ctxt->constructor == NULL) {
+ ctxt->constructor = xmlSchemaConstructionCtxtCreate(ctxt->dict);
+ if (ctxt->constructor == NULL)
+ return(NULL);
+ /* Take ownership of the constructor to be able to free it. */
+ ctxt->ownsConstructor = 1;
+ }
+ ctxt->constructor->mainSchema = mainSchema;
+ /*
+ * Locate and add the schema document.
+ */
+ res = xmlSchemaAddSchemaDoc(ctxt, XML_SCHEMA_SCHEMA_MAIN,
+ ctxt->URL, ctxt->doc, ctxt->buffer, ctxt->size, NULL,
+ NULL, NULL, &bucket);
+ if (res == -1)
+ goto exit_failure;
+ if (res != 0)
+ goto exit;
+
+ if (bucket == NULL) {
+ /* TODO: Error code, actually we failed to *locate* the schema. */
+ if (ctxt->URL)
+ xmlSchemaCustomErr(ACTXT_CAST ctxt, XML_SCHEMAP_FAILED_LOAD,
+ NULL, NULL,
+ "Failed to locate the main schema resource at '%s'",
+ ctxt->URL, NULL);
+ else
+ xmlSchemaCustomErr(ACTXT_CAST ctxt, XML_SCHEMAP_FAILED_LOAD,
+ NULL, NULL,
+ "Failed to locate the main schema resource",
+ NULL, NULL);
+ goto exit;
+ }
+ /* Then do the parsing for good. */
+ if (xmlSchemaParseNewDocWithContext(ctxt, mainSchema, bucket) == -1)
+ goto exit_failure;
+ if (ctxt->nberrors != 0)
+ goto exit;
+
+ mainSchema->doc = bucket->doc;
+ mainSchema->preserve = ctxt->preserve;
+
+ ctxt->schema = mainSchema;
+
+ if (xmlSchemaFixupComponents(ctxt, WXS_CONSTRUCTOR(ctxt)->mainBucket) == -1)
+ goto exit_failure;
+
+ /*
+ * TODO: This is not nice, since we cannot distinguish from the
+ * result if there was an internal error or not.
+ */
+exit:
+ if (ctxt->nberrors != 0) {
+ if (mainSchema) {
+ xmlSchemaFree(mainSchema);
+ mainSchema = NULL;
+ }
+ if (ctxt->constructor) {
+ xmlSchemaConstructionCtxtFree(ctxt->constructor);
+ ctxt->constructor = NULL;
+ ctxt->ownsConstructor = 0;
+ }
+ }
+ ctxt->schema = NULL;
+ return(mainSchema);
+exit_failure:
+ /*
+ * Quite verbose, but should catch internal errors, which were
+ * not communitated.
+ */
+ if (mainSchema) {
+ xmlSchemaFree(mainSchema);
+ mainSchema = NULL;
+ }
+ if (ctxt->constructor) {
+ xmlSchemaConstructionCtxtFree(ctxt->constructor);
+ ctxt->constructor = NULL;
+ ctxt->ownsConstructor = 0;
+ }
+ PERROR_INT2("xmlSchemaParse",
+ "An internal error occured");
+ ctxt->schema = NULL;
+ return(NULL);
+}
+
+/**
+ * xmlSchemaSetParserErrors:
+ * @ctxt: a schema validation context
+ * @err: the error callback
+ * @warn: the warning callback
+ * @ctx: contextual data for the callbacks
+ *
+ * Set the callback functions used to handle errors for a validation context
+ */
+void
+xmlSchemaSetParserErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->error = err;
+ ctxt->warning = warn;
+ ctxt->errCtxt = ctx;
+ if (ctxt->vctxt != NULL)
+ xmlSchemaSetValidErrors(ctxt->vctxt, err, warn, ctx);
+}
+
+/**
+ * xmlSchemaSetParserStructuredErrors:
+ * @ctxt: a schema parser context
+ * @serror: the structured error function
+ * @ctx: the functions context
+ *
+ * Set the structured error callback
+ */
+void
+xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->serror = serror;
+ ctxt->errCtxt = ctx;
+ if (ctxt->vctxt != NULL)
+ xmlSchemaSetValidStructuredErrors(ctxt->vctxt, serror, ctx);
+}
+
+/**
+ * xmlSchemaGetParserErrors:
+ * @ctxt: a XMl-Schema parser context
+ * @err: the error callback result
+ * @warn: the warning callback result
+ * @ctx: contextual data for the callbacks result
+ *
+ * Get the callback information used to handle errors for a parser context
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+int
+xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn, void **ctx)
+{
+ if (ctxt == NULL)
+ return(-1);
+ if (err != NULL)
+ *err = ctxt->error;
+ if (warn != NULL)
+ *warn = ctxt->warning;
+ if (ctx != NULL)
+ *ctx = ctxt->errCtxt;
+ return(0);
+}
+
+/**
+ * xmlSchemaFacetTypeToString:
+ * @type: the facet type
+ *
+ * Convert the xmlSchemaTypeType to a char string.
+ *
+ * Returns the char string representation of the facet type if the
+ * type is a facet and an "Internal Error" string otherwise.
+ */
+static const xmlChar *
+xmlSchemaFacetTypeToString(xmlSchemaTypeType type)
+{
+ switch (type) {
+ case XML_SCHEMA_FACET_PATTERN:
+ return (BAD_CAST "pattern");
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ return (BAD_CAST "maxExclusive");
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ return (BAD_CAST "maxInclusive");
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ return (BAD_CAST "minExclusive");
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ return (BAD_CAST "minInclusive");
+ case XML_SCHEMA_FACET_WHITESPACE:
+ return (BAD_CAST "whiteSpace");
+ case XML_SCHEMA_FACET_ENUMERATION:
+ return (BAD_CAST "enumeration");
+ case XML_SCHEMA_FACET_LENGTH:
+ return (BAD_CAST "length");
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ return (BAD_CAST "maxLength");
+ case XML_SCHEMA_FACET_MINLENGTH:
+ return (BAD_CAST "minLength");
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ return (BAD_CAST "totalDigits");
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+ return (BAD_CAST "fractionDigits");
+ default:
+ break;
+ }
+ return (BAD_CAST "Internal Error");
+}
+
+static xmlSchemaWhitespaceValueType
+xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
+{
+ /*
+ * The normalization type can be changed only for types which are derived
+ * from xsd:string.
+ */
+ if (type->type == XML_SCHEMA_TYPE_BASIC) {
+ /*
+ * Note that we assume a whitespace of preserve for anySimpleType.
+ */
+ if ((type->builtInType == XML_SCHEMAS_STRING) ||
+ (type->builtInType == XML_SCHEMAS_ANYSIMPLETYPE))
+ return(XML_SCHEMA_WHITESPACE_PRESERVE);
+ else if (type->builtInType == XML_SCHEMAS_NORMSTRING)
+ return(XML_SCHEMA_WHITESPACE_REPLACE);
+ else {
+ /*
+ * For all `atomic` datatypes other than string (and types `derived`
+ * by `restriction` from it) the value of whiteSpace is fixed to
+ * collapse
+ * Note that this includes built-in list datatypes.
+ */
+ return(XML_SCHEMA_WHITESPACE_COLLAPSE);
+ }
+ } else if (WXS_IS_LIST(type)) {
+ /*
+ * For list types the facet "whiteSpace" is fixed to "collapse".
+ */
+ return (XML_SCHEMA_WHITESPACE_COLLAPSE);
+ } else if (WXS_IS_UNION(type)) {
+ return (XML_SCHEMA_WHITESPACE_UNKNOWN);
+ } else if (WXS_IS_ATOMIC(type)) {
+ if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE)
+ return (XML_SCHEMA_WHITESPACE_PRESERVE);
+ else if (type->flags & XML_SCHEMAS_TYPE_WHITESPACE_REPLACE)
+ return (XML_SCHEMA_WHITESPACE_REPLACE);
+ else
+ return (XML_SCHEMA_WHITESPACE_COLLAPSE);
+ }
+ return (-1);
+}
+
+/************************************************************************
+ * *
+ * Simple type validation *
+ * *
+ ************************************************************************/
+
+
+/************************************************************************
+ * *
+ * DOM Validation code *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaAssembleByLocation:
+ * @pctxt: a schema parser context
+ * @vctxt: a schema validation context
+ * @schema: the existing schema
+ * @node: the node that fired the assembling
+ * @nsName: the namespace name of the new schema
+ * @location: the location of the schema
+ *
+ * Expands an existing schema by an additional schema.
+ *
+ * Returns 0 if the new schema is correct, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaAssembleByLocation(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ const xmlChar *nsName,
+ const xmlChar *location)
+{
+ int ret = 0;
+ xmlSchemaParserCtxtPtr pctxt;
+ xmlSchemaBucketPtr bucket = NULL;
+
+ if ((vctxt == NULL) || (schema == NULL))
+ return (-1);
+
+ if (vctxt->pctxt == NULL) {
+ VERROR_INT("xmlSchemaAssembleByLocation",
+ "no parser context available");
+ return(-1);
+ }
+ pctxt = vctxt->pctxt;
+ if (pctxt->constructor == NULL) {
+ PERROR_INT("xmlSchemaAssembleByLocation",
+ "no constructor");
+ return(-1);
+ }
+ /*
+ * Acquire the schema document.
+ */
+ location = xmlSchemaBuildAbsoluteURI(pctxt->dict,
+ location, node);
+ /*
+ * Note that we pass XML_SCHEMA_SCHEMA_IMPORT here;
+ * the process will automatically change this to
+ * XML_SCHEMA_SCHEMA_MAIN if it is the first schema document.
+ */
+ ret = xmlSchemaAddSchemaDoc(pctxt, XML_SCHEMA_SCHEMA_IMPORT,
+ location, NULL, NULL, 0, node, NULL, nsName,
+ &bucket);
+ if (ret != 0)
+ return(ret);
+ if (bucket == NULL) {
+ /*
+ * Generate a warning that the document could not be located.
+ */
+ xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC,
+ node, NULL,
+ "The document at location '%s' could not be acquired",
+ location, NULL, NULL);
+ return(ret);
+ }
+ /*
+ * The first located schema will be handled as if all other
+ * schemas imported by XSI were imported by this first schema.
+ */
+ if ((bucket != NULL) &&
+ (WXS_CONSTRUCTOR(pctxt)->bucket == NULL))
+ WXS_CONSTRUCTOR(pctxt)->bucket = bucket;
+ /*
+ * TODO: Is this handled like an import? I.e. is it not an error
+ * if the schema cannot be located?
+ */
+ if ((bucket == NULL) || (! CAN_PARSE_SCHEMA(bucket)))
+ return(0);
+ /*
+ * We will reuse the parser context for every schema imported
+ * directly via XSI. So reset the context.
+ */
+ pctxt->nberrors = 0;
+ pctxt->err = 0;
+ pctxt->doc = bucket->doc;
+
+ ret = xmlSchemaParseNewDocWithContext(pctxt, schema, bucket);
+ if (ret == -1) {
+ pctxt->doc = NULL;
+ goto exit_failure;
+ }
+ /* Paranoid error channelling. */
+ if ((ret == 0) && (pctxt->nberrors != 0))
+ ret = pctxt->err;
+ if (pctxt->nberrors == 0) {
+ /*
+ * Only bother to fixup pending components, if there was
+ * no error yet.
+ * For every XSI acquired schema (and its sub-schemata) we will
+ * fixup the components.
+ */
+ xmlSchemaFixupComponents(pctxt, bucket);
+ ret = pctxt->err;
+ /*
+ * Not nice, but we need somehow to channel the schema parser
+ * error to the validation context.
+ */
+ if ((ret != 0) && (vctxt->err == 0))
+ vctxt->err = ret;
+ vctxt->nberrors += pctxt->nberrors;
+ } else {
+ /* Add to validation error sum. */
+ vctxt->nberrors += pctxt->nberrors;
+ }
+ pctxt->doc = NULL;
+ return(ret);
+exit_failure:
+ pctxt->doc = NULL;
+ return (-1);
+}
+
+static xmlSchemaAttrInfoPtr
+xmlSchemaGetMetaAttrInfo(xmlSchemaValidCtxtPtr vctxt,
+ int metaType)
+{
+ if (vctxt->nbAttrInfos == 0)
+ return (NULL);
+ {
+ int i;
+ xmlSchemaAttrInfoPtr iattr;
+
+ for (i = 0; i < vctxt->nbAttrInfos; i++) {
+ iattr = vctxt->attrInfos[i];
+ if (iattr->metaType == metaType)
+ return (iattr);
+ }
+
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaAssembleByXSI:
+ * @vctxt: a schema validation context
+ *
+ * Expands an existing schema by an additional schema using
+ * the xsi:schemaLocation or xsi:noNamespaceSchemaLocation attribute
+ * of an instance. If xsi:noNamespaceSchemaLocation is used, @noNamespace
+ * must be set to 1.
+ *
+ * Returns 0 if the new schema is correct, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaAssembleByXSI(xmlSchemaValidCtxtPtr vctxt)
+{
+ const xmlChar *cur, *end;
+ const xmlChar *nsname = NULL, *location;
+ int count = 0;
+ int ret = 0;
+ xmlSchemaAttrInfoPtr iattr;
+
+ /*
+ * Parse the value; we will assume an even number of values
+ * to be given (this is how Xerces and XSV work).
+ *
+ * URGENT TODO: !! This needs to work for both
+ * @noNamespaceSchemaLocation AND @schemaLocation on the same
+ * element !!
+ */
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC);
+ if (iattr == NULL)
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC);
+ if (iattr == NULL)
+ return (0);
+ cur = iattr->value;
+ do {
+ /*
+ * TODO: Move the string parsing mechanism away from here.
+ */
+ if (iattr->metaType == XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC) {
+ /*
+ * Get the namespace name.
+ */
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ count++; /* TODO: Don't use the schema's dict. */
+ nsname = xmlDictLookup(vctxt->schema->dict, cur, end - cur);
+ cur = end;
+ }
+ /*
+ * Get the URI.
+ */
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur) {
+ if (iattr->metaType ==
+ XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC)
+ {
+ /*
+ * If using @schemaLocation then tuples are expected.
+ * I.e. the namespace name *and* the document's URI.
+ */
+ xmlSchemaCustomWarning(ACTXT_CAST vctxt, XML_SCHEMAV_MISC,
+ iattr->node, NULL,
+ "The value must consist of tuples: the target namespace "
+ "name and the document's URI", NULL, NULL, NULL);
+ }
+ break;
+ }
+ count++; /* TODO: Don't use the schema's dict. */
+ location = xmlDictLookup(vctxt->schema->dict, cur, end - cur);
+ cur = end;
+ ret = xmlSchemaAssembleByLocation(vctxt, vctxt->schema,
+ iattr->node, nsname, location);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaAssembleByXSI",
+ "assembling schemata");
+ return (-1);
+ }
+ } while (*cur != 0);
+ return (ret);
+}
+
+static const xmlChar *
+xmlSchemaLookupNamespace(xmlSchemaValidCtxtPtr vctxt,
+ const xmlChar *prefix)
+{
+ if (vctxt->sax != NULL) {
+ int i, j;
+ xmlSchemaNodeInfoPtr inode;
+
+ for (i = vctxt->depth; i >= 0; i--) {
+ if (vctxt->elemInfos[i]->nbNsBindings != 0) {
+ inode = vctxt->elemInfos[i];
+ for (j = 0; j < inode->nbNsBindings * 2; j += 2) {
+ if (((prefix == NULL) &&
+ (inode->nsBindings[j] == NULL)) ||
+ ((prefix != NULL) && xmlStrEqual(prefix,
+ inode->nsBindings[j]))) {
+
+ /*
+ * Note that the namespace bindings are already
+ * in a string dict.
+ */
+ return (inode->nsBindings[j+1]);
+ }
+ }
+ }
+ }
+ return (NULL);
+#ifdef LIBXML_READER_ENABLED
+ } else if (vctxt->reader != NULL) {
+ xmlChar *nsName;
+
+ nsName = xmlTextReaderLookupNamespace(vctxt->reader, prefix);
+ if (nsName != NULL) {
+ const xmlChar *ret;
+
+ ret = xmlDictLookup(vctxt->dict, nsName, -1);
+ xmlFree(nsName);
+ return (ret);
+ } else
+ return (NULL);
+#endif
+ } else {
+ xmlNsPtr ns;
+
+ if ((vctxt->inode->node == NULL) ||
+ (vctxt->inode->node->doc == NULL)) {
+ VERROR_INT("xmlSchemaLookupNamespace",
+ "no node or node's doc avaliable");
+ return (NULL);
+ }
+ ns = xmlSearchNs(vctxt->inode->node->doc,
+ vctxt->inode->node, prefix);
+ if (ns != NULL)
+ return (ns->href);
+ return (NULL);
+ }
+}
+
+/*
+* This one works on the schema of the validation context.
+*/
+static int
+xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaPtr schema,
+ xmlNodePtr node,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ int valNeeded)
+{
+ int ret;
+
+ if (vctxt && (vctxt->schema == NULL)) {
+ VERROR_INT("xmlSchemaValidateNotation",
+ "a schema is needed on the validation context");
+ return (-1);
+ }
+ ret = xmlValidateQName(value, 1);
+ if (ret != 0)
+ return (ret);
+ {
+ xmlChar *localName = NULL;
+ xmlChar *prefix = NULL;
+
+ localName = xmlSplitQName2(value, &prefix);
+ if (prefix != NULL) {
+ const xmlChar *nsName = NULL;
+
+ if (vctxt != NULL)
+ nsName = xmlSchemaLookupNamespace(vctxt, BAD_CAST prefix);
+ else if (node != NULL) {
+ xmlNsPtr ns = xmlSearchNs(node->doc, node, prefix);
+ if (ns != NULL)
+ nsName = ns->href;
+ } else {
+ xmlFree(prefix);
+ xmlFree(localName);
+ return (1);
+ }
+ if (nsName == NULL) {
+ xmlFree(prefix);
+ xmlFree(localName);
+ return (1);
+ }
+ if (xmlSchemaGetNotation(schema, localName, nsName) != NULL) {
+ if ((valNeeded) && (val != NULL)) {
+ (*val) = xmlSchemaNewNOTATIONValue(xmlStrdup(localName),
+ xmlStrdup(nsName));
+ if (*val == NULL)
+ ret = -1;
+ }
+ } else
+ ret = 1;
+ xmlFree(prefix);
+ xmlFree(localName);
+ } else {
+ if (xmlSchemaGetNotation(schema, value, NULL) != NULL) {
+ if (valNeeded && (val != NULL)) {
+ (*val) = xmlSchemaNewNOTATIONValue(
+ BAD_CAST xmlStrdup(value), NULL);
+ if (*val == NULL)
+ ret = -1;
+ }
+ } else
+ return (1);
+ }
+ }
+ return (ret);
+}
+
+static int
+xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt,
+ const xmlChar* lname,
+ const xmlChar* nsname)
+{
+ int i;
+
+ lname = xmlDictLookup(vctxt->dict, lname, -1);
+ if (lname == NULL)
+ return(-1);
+ if (nsname != NULL) {
+ nsname = xmlDictLookup(vctxt->dict, nsname, -1);
+ if (nsname == NULL)
+ return(-1);
+ }
+ for (i = 0; i < vctxt->nodeQNames->nbItems; i += 2) {
+ if ((vctxt->nodeQNames->items [i] == lname) &&
+ (vctxt->nodeQNames->items[i +1] == nsname))
+ /* Already there */
+ return(i);
+ }
+ /* Add new entry. */
+ i = vctxt->nodeQNames->nbItems;
+ xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) lname);
+ xmlSchemaItemListAdd(vctxt->nodeQNames, (void *) nsname);
+ return(i);
+}
+
+/************************************************************************
+ * *
+ * Validation of identity-constraints (IDC) *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaAugmentIDC:
+ * @idcDef: the IDC definition
+ *
+ * Creates an augmented IDC definition item.
+ *
+ * Returns the item, or NULL on internal errors.
+ */
+static void
+xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef,
+ xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaIDCAugPtr aidc;
+
+ aidc = (xmlSchemaIDCAugPtr) xmlMalloc(sizeof(xmlSchemaIDCAug));
+ if (aidc == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "xmlSchemaAugmentIDC: allocating an augmented IDC definition",
+ NULL);
+ return;
+ }
+ aidc->keyrefDepth = -1;
+ aidc->def = idcDef;
+ aidc->next = NULL;
+ if (vctxt->aidcs == NULL)
+ vctxt->aidcs = aidc;
+ else {
+ aidc->next = vctxt->aidcs;
+ vctxt->aidcs = aidc;
+ }
+ /*
+ * Save if we have keyrefs at all.
+ */
+ if ((vctxt->hasKeyrefs == 0) &&
+ (idcDef->type == XML_SCHEMA_TYPE_IDC_KEYREF))
+ vctxt->hasKeyrefs = 1;
+}
+
+/**
+ * xmlSchemaAugmentImportedIDC:
+ * @imported: the imported schema
+ *
+ * Creates an augmented IDC definition for the imported schema.
+ */
+static void
+xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported, xmlSchemaValidCtxtPtr vctxt) {
+ if (imported->schema->idcDef != NULL) {
+ xmlHashScan(imported->schema->idcDef ,
+ (xmlHashScanner) xmlSchemaAugmentIDC, vctxt);
+ }
+}
+
+/**
+ * xmlSchemaIDCNewBinding:
+ * @idcDef: the IDC definition of this binding
+ *
+ * Creates a new IDC binding.
+ *
+ * Returns the new IDC binding, NULL on internal errors.
+ */
+static xmlSchemaPSVIIDCBindingPtr
+xmlSchemaIDCNewBinding(xmlSchemaIDCPtr idcDef)
+{
+ xmlSchemaPSVIIDCBindingPtr ret;
+
+ ret = (xmlSchemaPSVIIDCBindingPtr) xmlMalloc(
+ sizeof(xmlSchemaPSVIIDCBinding));
+ if (ret == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating a PSVI IDC binding item", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaPSVIIDCBinding));
+ ret->definition = idcDef;
+ return (ret);
+}
+
+/**
+ * xmlSchemaIDCStoreNodeTableItem:
+ * @vctxt: the WXS validation context
+ * @item: the IDC node table item
+ *
+ * The validation context is used to store IDC node table items.
+ * They are stored to avoid copying them if IDC node-tables are merged
+ * with corresponding parent IDC node-tables (bubbling).
+ *
+ * Returns 0 if succeeded, -1 on internal errors.
+ */
+static int
+xmlSchemaIDCStoreNodeTableItem(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaPSVIIDCNodePtr item)
+{
+ /*
+ * Add to gobal list.
+ */
+ if (vctxt->idcNodes == NULL) {
+ vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *)
+ xmlMalloc(20 * sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (vctxt->idcNodes == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating the IDC node table item list", NULL);
+ return (-1);
+ }
+ vctxt->sizeIdcNodes = 20;
+ } else if (vctxt->sizeIdcNodes <= vctxt->nbIdcNodes) {
+ vctxt->sizeIdcNodes *= 2;
+ vctxt->idcNodes = (xmlSchemaPSVIIDCNodePtr *)
+ xmlRealloc(vctxt->idcNodes, vctxt->sizeIdcNodes *
+ sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (vctxt->idcNodes == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "re-allocating the IDC node table item list", NULL);
+ return (-1);
+ }
+ }
+ vctxt->idcNodes[vctxt->nbIdcNodes++] = item;
+
+ return (0);
+}
+
+/**
+ * xmlSchemaIDCStoreKey:
+ * @vctxt: the WXS validation context
+ * @item: the IDC key
+ *
+ * The validation context is used to store an IDC key.
+ *
+ * Returns 0 if succeeded, -1 on internal errors.
+ */
+static int
+xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaPSVIIDCKeyPtr key)
+{
+ /*
+ * Add to gobal list.
+ */
+ if (vctxt->idcKeys == NULL) {
+ vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *)
+ xmlMalloc(40 * sizeof(xmlSchemaPSVIIDCKeyPtr));
+ if (vctxt->idcKeys == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating the IDC key storage list", NULL);
+ return (-1);
+ }
+ vctxt->sizeIdcKeys = 40;
+ } else if (vctxt->sizeIdcKeys <= vctxt->nbIdcKeys) {
+ vctxt->sizeIdcKeys *= 2;
+ vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *)
+ xmlRealloc(vctxt->idcKeys, vctxt->sizeIdcKeys *
+ sizeof(xmlSchemaPSVIIDCKeyPtr));
+ if (vctxt->idcKeys == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "re-allocating the IDC key storage list", NULL);
+ return (-1);
+ }
+ }
+ vctxt->idcKeys[vctxt->nbIdcKeys++] = key;
+
+ return (0);
+}
+
+/**
+ * xmlSchemaIDCAppendNodeTableItem:
+ * @bind: the IDC binding
+ * @ntItem: the node-table item
+ *
+ * Appends the IDC node-table item to the binding.
+ *
+ * Returns 0 on success and -1 on internal errors.
+ */
+static int
+xmlSchemaIDCAppendNodeTableItem(xmlSchemaPSVIIDCBindingPtr bind,
+ xmlSchemaPSVIIDCNodePtr ntItem)
+{
+ if (bind->nodeTable == NULL) {
+ bind->sizeNodes = 10;
+ bind->nodeTable = (xmlSchemaPSVIIDCNodePtr *)
+ xmlMalloc(10 * sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (bind->nodeTable == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an array of IDC node-table items", NULL);
+ return(-1);
+ }
+ } else if (bind->sizeNodes <= bind->nbNodes) {
+ bind->sizeNodes *= 2;
+ bind->nodeTable = (xmlSchemaPSVIIDCNodePtr *)
+ xmlRealloc(bind->nodeTable, bind->sizeNodes *
+ sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (bind->nodeTable == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "re-allocating an array of IDC node-table items", NULL);
+ return(-1);
+ }
+ }
+ bind->nodeTable[bind->nbNodes++] = ntItem;
+ return(0);
+}
+
+/**
+ * xmlSchemaIDCAcquireBinding:
+ * @vctxt: the WXS validation context
+ * @matcher: the IDC matcher
+ *
+ * Looks up an PSVI IDC binding, for the IDC definition and
+ * of the given matcher. If none found, a new one is created
+ * and added to the IDC table.
+ *
+ * Returns an IDC binding or NULL on internal errors.
+ */
+static xmlSchemaPSVIIDCBindingPtr
+xmlSchemaIDCAcquireBinding(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaIDCMatcherPtr matcher)
+{
+ xmlSchemaNodeInfoPtr ielem;
+
+ ielem = vctxt->elemInfos[matcher->depth];
+
+ if (ielem->idcTable == NULL) {
+ ielem->idcTable = xmlSchemaIDCNewBinding(matcher->aidc->def);
+ if (ielem->idcTable == NULL)
+ return (NULL);
+ return(ielem->idcTable);
+ } else {
+ xmlSchemaPSVIIDCBindingPtr bind = NULL;
+
+ bind = ielem->idcTable;
+ do {
+ if (bind->definition == matcher->aidc->def)
+ return(bind);
+ if (bind->next == NULL) {
+ bind->next = xmlSchemaIDCNewBinding(matcher->aidc->def);
+ if (bind->next == NULL)
+ return (NULL);
+ return(bind->next);
+ }
+ bind = bind->next;
+ } while (bind != NULL);
+ }
+ return (NULL);
+}
+
+static xmlSchemaItemListPtr
+xmlSchemaIDCAcquireTargetList(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED,
+ xmlSchemaIDCMatcherPtr matcher)
+{
+ if (matcher->targets == NULL)
+ matcher->targets = xmlSchemaItemListCreate();
+ return(matcher->targets);
+}
+
+/**
+ * xmlSchemaIDCFreeKey:
+ * @key: the IDC key
+ *
+ * Frees an IDC key together with its compiled value.
+ */
+static void
+xmlSchemaIDCFreeKey(xmlSchemaPSVIIDCKeyPtr key)
+{
+ if (key->val != NULL)
+ xmlSchemaFreeValue(key->val);
+ xmlFree(key);
+}
+
+/**
+ * xmlSchemaIDCFreeBinding:
+ *
+ * Frees an IDC binding. Note that the node table-items
+ * are not freed.
+ */
+static void
+xmlSchemaIDCFreeBinding(xmlSchemaPSVIIDCBindingPtr bind)
+{
+ if (bind->nodeTable != NULL)
+ xmlFree(bind->nodeTable);
+ if (bind->dupls != NULL)
+ xmlSchemaItemListFree(bind->dupls);
+ xmlFree(bind);
+}
+
+/**
+ * xmlSchemaIDCFreeIDCTable:
+ * @bind: the first IDC binding in the list
+ *
+ * Frees an IDC table, i.e. all the IDC bindings in the list.
+ */
+static void
+xmlSchemaIDCFreeIDCTable(xmlSchemaPSVIIDCBindingPtr bind)
+{
+ xmlSchemaPSVIIDCBindingPtr prev;
+
+ while (bind != NULL) {
+ prev = bind;
+ bind = bind->next;
+ xmlSchemaIDCFreeBinding(prev);
+ }
+}
+
+/**
+ * xmlSchemaIDCFreeMatcherList:
+ * @matcher: the first IDC matcher in the list
+ *
+ * Frees a list of IDC matchers.
+ */
+static void
+xmlSchemaIDCFreeMatcherList(xmlSchemaIDCMatcherPtr matcher)
+{
+ xmlSchemaIDCMatcherPtr next;
+
+ while (matcher != NULL) {
+ next = matcher->next;
+ if (matcher->keySeqs != NULL) {
+ int i;
+ for (i = 0; i < matcher->sizeKeySeqs; i++)
+ if (matcher->keySeqs[i] != NULL)
+ xmlFree(matcher->keySeqs[i]);
+ xmlFree(matcher->keySeqs);
+ }
+ if (matcher->targets != NULL) {
+ if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ int i;
+ xmlSchemaPSVIIDCNodePtr idcNode;
+ /*
+ * Node-table items for keyrefs are not stored globally
+ * to the validation context, since they are not bubbled.
+ * We need to free them here.
+ */
+ for (i = 0; i < matcher->targets->nbItems; i++) {
+ idcNode =
+ (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
+ xmlFree(idcNode->keys);
+ xmlFree(idcNode);
+ }
+ }
+ xmlSchemaItemListFree(matcher->targets);
+ }
+ xmlFree(matcher);
+ matcher = next;
+ }
+}
+
+/**
+ * xmlSchemaIDCReleaseMatcherList:
+ * @vctxt: the WXS validation context
+ * @matcher: the first IDC matcher in the list
+ *
+ * Caches a list of IDC matchers for reuse.
+ */
+static void
+xmlSchemaIDCReleaseMatcherList(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaIDCMatcherPtr matcher)
+{
+ xmlSchemaIDCMatcherPtr next;
+
+ while (matcher != NULL) {
+ next = matcher->next;
+ if (matcher->keySeqs != NULL) {
+ int i;
+ /*
+ * Don't free the array, but only the content.
+ */
+ for (i = 0; i < matcher->sizeKeySeqs; i++)
+ if (matcher->keySeqs[i] != NULL) {
+ xmlFree(matcher->keySeqs[i]);
+ matcher->keySeqs[i] = NULL;
+ }
+ }
+ if (matcher->targets) {
+ if (matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ int i;
+ xmlSchemaPSVIIDCNodePtr idcNode;
+ /*
+ * Node-table items for keyrefs are not stored globally
+ * to the validation context, since they are not bubbled.
+ * We need to free them here.
+ */
+ for (i = 0; i < matcher->targets->nbItems; i++) {
+ idcNode =
+ (xmlSchemaPSVIIDCNodePtr) matcher->targets->items[i];
+ xmlFree(idcNode->keys);
+ xmlFree(idcNode);
+ }
+ }
+ xmlSchemaItemListFree(matcher->targets);
+ matcher->targets = NULL;
+ }
+ matcher->next = NULL;
+ /*
+ * Cache the matcher.
+ */
+ if (vctxt->idcMatcherCache != NULL)
+ matcher->nextCached = vctxt->idcMatcherCache;
+ vctxt->idcMatcherCache = matcher;
+
+ matcher = next;
+ }
+}
+
+/**
+ * xmlSchemaIDCAddStateObject:
+ * @vctxt: the WXS validation context
+ * @matcher: the IDC matcher
+ * @sel: the XPath information
+ * @parent: the parent "selector" state object if any
+ * @type: "selector" or "field"
+ *
+ * Creates/reuses and activates state objects for the given
+ * XPath information; if the XPath expression consists of unions,
+ * multiple state objects are created for every unioned expression.
+ *
+ * Returns 0 on success and -1 on internal errors.
+ */
+static int
+xmlSchemaIDCAddStateObject(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaIDCMatcherPtr matcher,
+ xmlSchemaIDCSelectPtr sel,
+ int type)
+{
+ xmlSchemaIDCStateObjPtr sto;
+
+ /*
+ * Reuse the state objects from the pool.
+ */
+ if (vctxt->xpathStatePool != NULL) {
+ sto = vctxt->xpathStatePool;
+ vctxt->xpathStatePool = sto->next;
+ sto->next = NULL;
+ } else {
+ /*
+ * Create a new state object.
+ */
+ sto = (xmlSchemaIDCStateObjPtr) xmlMalloc(sizeof(xmlSchemaIDCStateObj));
+ if (sto == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an IDC state object", NULL);
+ return (-1);
+ }
+ memset(sto, 0, sizeof(xmlSchemaIDCStateObj));
+ }
+ /*
+ * Add to global list.
+ */
+ if (vctxt->xpathStates != NULL)
+ sto->next = vctxt->xpathStates;
+ vctxt->xpathStates = sto;
+
+ /*
+ * Free the old xpath validation context.
+ */
+ if (sto->xpathCtxt != NULL)
+ xmlFreeStreamCtxt((xmlStreamCtxtPtr) sto->xpathCtxt);
+
+ /*
+ * Create a new XPath (pattern) validation context.
+ */
+ sto->xpathCtxt = (void *) xmlPatternGetStreamCtxt(
+ (xmlPatternPtr) sel->xpathComp);
+ if (sto->xpathCtxt == NULL) {
+ VERROR_INT("xmlSchemaIDCAddStateObject",
+ "failed to create an XPath validation context");
+ return (-1);
+ }
+ sto->type = type;
+ sto->depth = vctxt->depth;
+ sto->matcher = matcher;
+ sto->sel = sel;
+ sto->nbHistory = 0;
+
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: STO push '%s'\n",
+ sto->sel->xpath);
+#endif
+ return (0);
+}
+
+/**
+ * xmlSchemaXPathEvaluate:
+ * @vctxt: the WXS validation context
+ * @nodeType: the nodeType of the current node
+ *
+ * Evaluates all active XPath state objects.
+ *
+ * Returns the number of IC "field" state objects which resolved to
+ * this node, 0 if none resolved and -1 on internal errors.
+ */
+static int
+xmlSchemaXPathEvaluate(xmlSchemaValidCtxtPtr vctxt,
+ xmlElementType nodeType)
+{
+ xmlSchemaIDCStateObjPtr sto, head = NULL, first;
+ int res, resolved = 0, depth = vctxt->depth;
+
+ if (vctxt->xpathStates == NULL)
+ return (0);
+
+ if (nodeType == XML_ATTRIBUTE_NODE)
+ depth++;
+#ifdef DEBUG_IDC
+ {
+ xmlChar *str = NULL;
+ xmlGenericError(xmlGenericErrorContext,
+ "IDC: EVAL on %s, depth %d, type %d\n",
+ xmlSchemaFormatQName(&str, vctxt->inode->nsName,
+ vctxt->inode->localName), depth, nodeType);
+ FREE_AND_NULL(str)
+ }
+#endif
+ /*
+ * Process all active XPath state objects.
+ */
+ first = vctxt->xpathStates;
+ sto = first;
+ while (sto != head) {
+#ifdef DEBUG_IDC
+ if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR)
+ xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] selector '%s'\n",
+ sto->matcher->aidc->def->name, sto->sel->xpath);
+ else
+ xmlGenericError(xmlGenericErrorContext, "IDC: ['%s'] field '%s'\n",
+ sto->matcher->aidc->def->name, sto->sel->xpath);
+#endif
+ if (nodeType == XML_ELEMENT_NODE)
+ res = xmlStreamPush((xmlStreamCtxtPtr) sto->xpathCtxt,
+ vctxt->inode->localName, vctxt->inode->nsName);
+ else
+ res = xmlStreamPushAttr((xmlStreamCtxtPtr) sto->xpathCtxt,
+ vctxt->inode->localName, vctxt->inode->nsName);
+
+ if (res == -1) {
+ VERROR_INT("xmlSchemaXPathEvaluate",
+ "calling xmlStreamPush()");
+ return (-1);
+ }
+ if (res == 0)
+ goto next_sto;
+ /*
+ * Full match.
+ */
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: "
+ "MATCH\n");
+#endif
+ /*
+ * Register a match in the state object history.
+ */
+ if (sto->history == NULL) {
+ sto->history = (int *) xmlMalloc(5 * sizeof(int));
+ if (sto->history == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating the state object history", NULL);
+ return(-1);
+ }
+ sto->sizeHistory = 5;
+ } else if (sto->sizeHistory <= sto->nbHistory) {
+ sto->sizeHistory *= 2;
+ sto->history = (int *) xmlRealloc(sto->history,
+ sto->sizeHistory * sizeof(int));
+ if (sto->history == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "re-allocating the state object history", NULL);
+ return(-1);
+ }
+ }
+ sto->history[sto->nbHistory++] = depth;
+
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: push match '%d'\n",
+ vctxt->depth);
+#endif
+
+ if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) {
+ xmlSchemaIDCSelectPtr sel;
+ /*
+ * Activate state objects for the IDC fields of
+ * the IDC selector.
+ */
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: "
+ "activating field states\n");
+#endif
+ sel = sto->matcher->aidc->def->fields;
+ while (sel != NULL) {
+ if (xmlSchemaIDCAddStateObject(vctxt, sto->matcher,
+ sel, XPATH_STATE_OBJ_TYPE_IDC_FIELD) == -1)
+ return (-1);
+ sel = sel->next;
+ }
+ } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) {
+ /*
+ * An IDC key node was found by the IDC field.
+ */
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext,
+ "IDC: key found\n");
+#endif
+ /*
+ * Notify that the character value of this node is
+ * needed.
+ */
+ if (resolved == 0) {
+ if ((vctxt->inode->flags &
+ XML_SCHEMA_NODE_INFO_VALUE_NEEDED) == 0)
+ vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED;
+ }
+ resolved++;
+ }
+next_sto:
+ if (sto->next == NULL) {
+ /*
+ * Evaluate field state objects created on this node as well.
+ */
+ head = first;
+ sto = vctxt->xpathStates;
+ } else
+ sto = sto->next;
+ }
+ return (resolved);
+}
+
+static const xmlChar *
+xmlSchemaFormatIDCKeySequence(xmlSchemaValidCtxtPtr vctxt,
+ xmlChar **buf,
+ xmlSchemaPSVIIDCKeyPtr *seq,
+ int count)
+{
+ int i, res;
+ xmlChar *value = NULL;
+
+ *buf = xmlStrdup(BAD_CAST "[");
+ for (i = 0; i < count; i++) {
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ res = xmlSchemaGetCanonValueWhtspExt(seq[i]->val,
+ xmlSchemaGetWhiteSpaceFacetValue(seq[i]->type),
+ &value);
+ if (res == 0)
+ *buf = xmlStrcat(*buf, BAD_CAST value);
+ else {
+ VERROR_INT("xmlSchemaFormatIDCKeySequence",
+ "failed to compute a canonical value");
+ *buf = xmlStrcat(*buf, BAD_CAST "???");
+ }
+ if (i < count -1)
+ *buf = xmlStrcat(*buf, BAD_CAST "', ");
+ else
+ *buf = xmlStrcat(*buf, BAD_CAST "'");
+ if (value != NULL) {
+ xmlFree(value);
+ value = NULL;
+ }
+ }
+ *buf = xmlStrcat(*buf, BAD_CAST "]");
+
+ return (BAD_CAST *buf);
+}
+
+/**
+ * xmlSchemaXPathPop:
+ * @vctxt: the WXS validation context
+ *
+ * Pops all XPath states.
+ *
+ * Returns 0 on success and -1 on internal errors.
+ */
+static int
+xmlSchemaXPathPop(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaIDCStateObjPtr sto;
+ int res;
+
+ if (vctxt->xpathStates == NULL)
+ return(0);
+ sto = vctxt->xpathStates;
+ do {
+ res = xmlStreamPop((xmlStreamCtxtPtr) sto->xpathCtxt);
+ if (res == -1)
+ return (-1);
+ sto = sto->next;
+ } while (sto != NULL);
+ return(0);
+}
+
+/**
+ * xmlSchemaXPathProcessHistory:
+ * @vctxt: the WXS validation context
+ * @type: the simple/complex type of the current node if any at all
+ * @val: the precompiled value
+ *
+ * Processes and pops the history items of the IDC state objects.
+ * IDC key-sequences are validated/created on IDC bindings.
+ *
+ * Returns 0 on success and -1 on internal errors.
+ */
+static int
+xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt,
+ int depth)
+{
+ xmlSchemaIDCStateObjPtr sto, nextsto;
+ int res, matchDepth;
+ xmlSchemaPSVIIDCKeyPtr key = NULL;
+ xmlSchemaTypePtr type = vctxt->inode->typeDef, simpleType = NULL;
+
+ if (vctxt->xpathStates == NULL)
+ return (0);
+ sto = vctxt->xpathStates;
+
+#ifdef DEBUG_IDC
+ {
+ xmlChar *str = NULL;
+ xmlGenericError(xmlGenericErrorContext,
+ "IDC: BACK on %s, depth %d\n",
+ xmlSchemaFormatQName(&str, vctxt->inode->nsName,
+ vctxt->inode->localName), vctxt->depth);
+ FREE_AND_NULL(str)
+ }
+#endif
+ /*
+ * Evaluate the state objects.
+ */
+ while (sto != NULL) {
+ res = xmlStreamPop((xmlStreamCtxtPtr) sto->xpathCtxt);
+ if (res == -1) {
+ VERROR_INT("xmlSchemaXPathProcessHistory",
+ "calling xmlStreamPop()");
+ return (-1);
+ }
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: stream pop '%s'\n",
+ sto->sel->xpath);
+#endif
+ if (sto->nbHistory == 0)
+ goto deregister_check;
+
+ matchDepth = sto->history[sto->nbHistory -1];
+
+ /*
+ * Only matches at the current depth are of interest.
+ */
+ if (matchDepth != depth) {
+ sto = sto->next;
+ continue;
+ }
+ if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_FIELD) {
+ /*
+ * NOTE: According to
+ * http://www.w3.org/Bugs/Public/show_bug.cgi?id=2198
+ * ... the simple-content of complex types is also allowed.
+ */
+
+ if (WXS_IS_COMPLEX(type)) {
+ if (WXS_HAS_SIMPLE_CONTENT(type)) {
+ /*
+ * Sanity check for complex types with simple content.
+ */
+ simpleType = type->contentTypeDef;
+ if (simpleType == NULL) {
+ VERROR_INT("xmlSchemaXPathProcessHistory",
+ "field resolves to a CT with simple content "
+ "but the CT is missing the ST definition");
+ return (-1);
+ }
+ } else
+ simpleType = NULL;
+ } else
+ simpleType = type;
+ if (simpleType == NULL) {
+ xmlChar *str = NULL;
+
+ /*
+ * Not qualified if the field resolves to a node of non
+ * simple type.
+ */
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_IDC, NULL,
+ WXS_BASIC_CAST sto->matcher->aidc->def,
+ "The XPath '%s' of a field of %s does evaluate to a node of "
+ "non-simple type",
+ sto->sel->xpath,
+ xmlSchemaGetIDCDesignation(&str, sto->matcher->aidc->def));
+ FREE_AND_NULL(str);
+ sto->nbHistory--;
+ goto deregister_check;
+ }
+
+ if ((key == NULL) && (vctxt->inode->val == NULL)) {
+ /*
+ * Failed to provide the normalized value; maybe
+ * the value was invalid.
+ */
+ VERROR(XML_SCHEMAV_CVC_IDC,
+ WXS_BASIC_CAST sto->matcher->aidc->def,
+ "Warning: No precomputed value available, the value "
+ "was either invalid or something strange happend");
+ sto->nbHistory--;
+ goto deregister_check;
+ } else {
+ xmlSchemaIDCMatcherPtr matcher = sto->matcher;
+ xmlSchemaPSVIIDCKeyPtr *keySeq;
+ int pos, idx;
+
+ /*
+ * The key will be anchored on the matcher's list of
+ * key-sequences. The position in this list is determined
+ * by the target node's depth relative to the matcher's
+ * depth of creation (i.e. the depth of the scope element).
+ *
+ * Element Depth Pos List-entries
+ * <scope> 0 NULL
+ * <bar> 1 NULL
+ * <target/> 2 2 target
+ * <bar>
+ * </scope>
+ *
+ * The size of the list is only dependant on the depth of
+ * the tree.
+ * An entry will be NULLed in selector_leave, i.e. when
+ * we hit the target's
+ */
+ pos = sto->depth - matcher->depth;
+ idx = sto->sel->index;
+
+ /*
+ * Create/grow the array of key-sequences.
+ */
+ if (matcher->keySeqs == NULL) {
+ if (pos > 9)
+ matcher->sizeKeySeqs = pos * 2;
+ else
+ matcher->sizeKeySeqs = 10;
+ matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
+ xmlMalloc(matcher->sizeKeySeqs *
+ sizeof(xmlSchemaPSVIIDCKeyPtr *));
+ if (matcher->keySeqs == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an array of key-sequences",
+ NULL);
+ return(-1);
+ }
+ memset(matcher->keySeqs, 0,
+ matcher->sizeKeySeqs *
+ sizeof(xmlSchemaPSVIIDCKeyPtr *));
+ } else if (pos >= matcher->sizeKeySeqs) {
+ int i = matcher->sizeKeySeqs;
+
+ matcher->sizeKeySeqs *= 2;
+ matcher->keySeqs = (xmlSchemaPSVIIDCKeyPtr **)
+ xmlRealloc(matcher->keySeqs,
+ matcher->sizeKeySeqs *
+ sizeof(xmlSchemaPSVIIDCKeyPtr *));
+ if (matcher->keySeqs == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "reallocating an array of key-sequences",
+ NULL);
+ return (-1);
+ }
+ /*
+ * The array needs to be NULLed.
+ * TODO: Use memset?
+ */
+ for (; i < matcher->sizeKeySeqs; i++)
+ matcher->keySeqs[i] = NULL;
+ }
+
+ /*
+ * Get/create the key-sequence.
+ */
+ keySeq = matcher->keySeqs[pos];
+ if (keySeq == NULL) {
+ goto create_sequence;
+ } else if (keySeq[idx] != NULL) {
+ xmlChar *str = NULL;
+ /*
+ * cvc-identity-constraint:
+ * 3 For each node in the `target node set` all
+ * of the {fields}, with that node as the context
+ * node, evaluate to either an empty node-set or
+ * a node-set with exactly one member, which must
+ * have a simple type.
+ *
+ * The key was already set; report an error.
+ */
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_IDC, NULL,
+ WXS_BASIC_CAST matcher->aidc->def,
+ "The XPath '%s' of a field of %s evaluates to a "
+ "node-set with more than one member",
+ sto->sel->xpath,
+ xmlSchemaGetIDCDesignation(&str, matcher->aidc->def));
+ FREE_AND_NULL(str);
+ sto->nbHistory--;
+ goto deregister_check;
+ } else
+ goto create_key;
+
+create_sequence:
+ /*
+ * Create a key-sequence.
+ */
+ keySeq = (xmlSchemaPSVIIDCKeyPtr *) xmlMalloc(
+ matcher->aidc->def->nbFields *
+ sizeof(xmlSchemaPSVIIDCKeyPtr));
+ if (keySeq == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an IDC key-sequence", NULL);
+ return(-1);
+ }
+ memset(keySeq, 0, matcher->aidc->def->nbFields *
+ sizeof(xmlSchemaPSVIIDCKeyPtr));
+ matcher->keySeqs[pos] = keySeq;
+create_key:
+ /*
+ * Create a key once per node only.
+ */
+ if (key == NULL) {
+ key = (xmlSchemaPSVIIDCKeyPtr) xmlMalloc(
+ sizeof(xmlSchemaPSVIIDCKey));
+ if (key == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating a IDC key", NULL);
+ xmlFree(keySeq);
+ matcher->keySeqs[pos] = NULL;
+ return(-1);
+ }
+ /*
+ * Consume the compiled value.
+ */
+ key->type = simpleType;
+ key->val = vctxt->inode->val;
+ vctxt->inode->val = NULL;
+ /*
+ * Store the key in a global list.
+ */
+ if (xmlSchemaIDCStoreKey(vctxt, key) == -1) {
+ xmlSchemaIDCFreeKey(key);
+ return (-1);
+ }
+ }
+ keySeq[idx] = key;
+ }
+ } else if (sto->type == XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) {
+
+ xmlSchemaPSVIIDCKeyPtr **keySeq = NULL;
+ /* xmlSchemaPSVIIDCBindingPtr bind; */
+ xmlSchemaPSVIIDCNodePtr ntItem;
+ xmlSchemaIDCMatcherPtr matcher;
+ xmlSchemaIDCPtr idc;
+ xmlSchemaItemListPtr targets;
+ int pos, i, j, nbKeys;
+ /*
+ * Here we have the following scenario:
+ * An IDC 'selector' state object resolved to a target node,
+ * during the time this target node was in the
+ * ancestor-or-self axis, the 'field' state object(s) looked
+ * out for matching nodes to create a key-sequence for this
+ * target node. Now we are back to this target node and need
+ * to put the key-sequence, together with the target node
+ * itself, into the node-table of the corresponding IDC
+ * binding.
+ */
+ matcher = sto->matcher;
+ idc = matcher->aidc->def;
+ nbKeys = idc->nbFields;
+ pos = depth - matcher->depth;
+ /*
+ * Check if the matcher has any key-sequences at all, plus
+ * if it has a key-sequence for the current target node.
+ */
+ if ((matcher->keySeqs == NULL) ||
+ (matcher->sizeKeySeqs <= pos)) {
+ if (idc->type == XML_SCHEMA_TYPE_IDC_KEY)
+ goto selector_key_error;
+ else
+ goto selector_leave;
+ }
+
+ keySeq = &(matcher->keySeqs[pos]);
+ if (*keySeq == NULL) {
+ if (idc->type == XML_SCHEMA_TYPE_IDC_KEY)
+ goto selector_key_error;
+ else
+ goto selector_leave;
+ }
+
+ for (i = 0; i < nbKeys; i++) {
+ if ((*keySeq)[i] == NULL) {
+ /*
+ * Not qualified, if not all fields did resolve.
+ */
+ if (idc->type == XML_SCHEMA_TYPE_IDC_KEY) {
+ /*
+ * All fields of a "key" IDC must resolve.
+ */
+ goto selector_key_error;
+ }
+ goto selector_leave;
+ }
+ }
+ /*
+ * All fields did resolve.
+ */
+
+ /*
+ * 4.1 If the {identity-constraint category} is unique(/key),
+ * then no two members of the `qualified node set` have
+ * `key-sequences` whose members are pairwise equal, as
+ * defined by Equal in [XML Schemas: Datatypes].
+ *
+ * Get the IDC binding from the matcher and check for
+ * duplicate key-sequences.
+ */
+#if 0
+ bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
+#endif
+ targets = xmlSchemaIDCAcquireTargetList(vctxt, matcher);
+ if ((idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) &&
+ (targets->nbItems != 0)) {
+ xmlSchemaPSVIIDCKeyPtr ckey, bkey, *bkeySeq;
+
+ i = 0;
+ res = 0;
+ /*
+ * Compare the key-sequences, key by key.
+ */
+ do {
+ bkeySeq =
+ ((xmlSchemaPSVIIDCNodePtr) targets->items[i])->keys;
+ for (j = 0; j < nbKeys; j++) {
+ ckey = (*keySeq)[j];
+ bkey = bkeySeq[j];
+ res = xmlSchemaAreValuesEqual(ckey->val, bkey->val);
+ if (res == -1) {
+ return (-1);
+ } else if (res == 0) {
+ /*
+ * One of the keys differs, so the key-sequence
+ * won't be equal; get out.
+ */
+ break;
+ }
+ }
+ if (res == 1) {
+ /*
+ * Duplicate key-sequence found.
+ */
+ break;
+ }
+ i++;
+ } while (i < targets->nbItems);
+ if (i != targets->nbItems) {
+ xmlChar *str = NULL, *strB = NULL;
+ /*
+ * TODO: Try to report the key-sequence.
+ */
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_IDC, NULL,
+ WXS_BASIC_CAST idc,
+ "Duplicate key-sequence %s in %s",
+ xmlSchemaFormatIDCKeySequence(vctxt, &str,
+ (*keySeq), nbKeys),
+ xmlSchemaGetIDCDesignation(&strB, idc));
+ FREE_AND_NULL(str);
+ FREE_AND_NULL(strB);
+ goto selector_leave;
+ }
+ }
+ /*
+ * Add a node-table item to the IDC binding.
+ */
+ ntItem = (xmlSchemaPSVIIDCNodePtr) xmlMalloc(
+ sizeof(xmlSchemaPSVIIDCNode));
+ if (ntItem == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an IDC node-table item", NULL);
+ xmlFree(*keySeq);
+ *keySeq = NULL;
+ return(-1);
+ }
+ memset(ntItem, 0, sizeof(xmlSchemaPSVIIDCNode));
+
+ /*
+ * Store the node-table item in a global list.
+ */
+ if (idc->type != XML_SCHEMA_TYPE_IDC_KEYREF) {
+ if (xmlSchemaIDCStoreNodeTableItem(vctxt, ntItem) == -1) {
+ xmlFree(ntItem);
+ xmlFree(*keySeq);
+ *keySeq = NULL;
+ return (-1);
+ }
+ ntItem->nodeQNameID = -1;
+ } else {
+ /*
+ * Save a cached QName for this node on the IDC node, to be
+ * able to report it, even if the node is not saved.
+ */
+ ntItem->nodeQNameID = xmlSchemaVAddNodeQName(vctxt,
+ vctxt->inode->localName, vctxt->inode->nsName);
+ if (ntItem->nodeQNameID == -1) {
+ xmlFree(ntItem);
+ xmlFree(*keySeq);
+ *keySeq = NULL;
+ return (-1);
+ }
+ }
+ /*
+ * Init the node-table item: Save the node, position and
+ * consume the key-sequence.
+ */
+ ntItem->node = vctxt->node;
+ ntItem->nodeLine = vctxt->inode->nodeLine;
+ ntItem->keys = *keySeq;
+ *keySeq = NULL;
+#if 0
+ if (xmlSchemaIDCAppendNodeTableItem(bind, ntItem) == -1)
+#endif
+ if (xmlSchemaItemListAdd(targets, ntItem) == -1) {
+ if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ /*
+ * Free the item, since keyref items won't be
+ * put on a global list.
+ */
+ xmlFree(ntItem->keys);
+ xmlFree(ntItem);
+ }
+ return (-1);
+ }
+
+ goto selector_leave;
+selector_key_error:
+ {
+ xmlChar *str = NULL;
+ /*
+ * 4.2.1 (KEY) The `target node set` and the
+ * `qualified node set` are equal, that is, every
+ * member of the `target node set` is also a member
+ * of the `qualified node set` and vice versa.
+ */
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_IDC, NULL,
+ WXS_BASIC_CAST idc,
+ "Not all fields of %s evaluate to a node",
+ xmlSchemaGetIDCDesignation(&str, idc), NULL);
+ FREE_AND_NULL(str);
+ }
+selector_leave:
+ /*
+ * Free the key-sequence if not added to the IDC table.
+ */
+ if ((keySeq != NULL) && (*keySeq != NULL)) {
+ xmlFree(*keySeq);
+ *keySeq = NULL;
+ }
+ } /* if selector */
+
+ sto->nbHistory--;
+
+deregister_check:
+ /*
+ * Deregister state objects if they reach the depth of creation.
+ */
+ if ((sto->nbHistory == 0) && (sto->depth == depth)) {
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: STO pop '%s'\n",
+ sto->sel->xpath);
+#endif
+ if (vctxt->xpathStates != sto) {
+ VERROR_INT("xmlSchemaXPathProcessHistory",
+ "The state object to be removed is not the first "
+ "in the list");
+ }
+ nextsto = sto->next;
+ /*
+ * Unlink from the list of active XPath state objects.
+ */
+ vctxt->xpathStates = sto->next;
+ sto->next = vctxt->xpathStatePool;
+ /*
+ * Link it to the pool of reusable state objects.
+ */
+ vctxt->xpathStatePool = sto;
+ sto = nextsto;
+ } else
+ sto = sto->next;
+ } /* while (sto != NULL) */
+ return (0);
+}
+
+/**
+ * xmlSchemaIDCRegisterMatchers:
+ * @vctxt: the WXS validation context
+ * @elemDecl: the element declaration
+ *
+ * Creates helper objects to evaluate IDC selectors/fields
+ * successively.
+ *
+ * Returns 0 if OK and -1 on internal errors.
+ */
+static int
+xmlSchemaIDCRegisterMatchers(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaElementPtr elemDecl)
+{
+ xmlSchemaIDCMatcherPtr matcher, last = NULL;
+ xmlSchemaIDCPtr idc, refIdc;
+ xmlSchemaIDCAugPtr aidc;
+
+ idc = (xmlSchemaIDCPtr) elemDecl->idcs;
+ if (idc == NULL)
+ return (0);
+
+#ifdef DEBUG_IDC
+ {
+ xmlChar *str = NULL;
+ xmlGenericError(xmlGenericErrorContext,
+ "IDC: REGISTER on %s, depth %d\n",
+ (char *) xmlSchemaFormatQName(&str, vctxt->inode->nsName,
+ vctxt->inode->localName), vctxt->depth);
+ FREE_AND_NULL(str)
+ }
+#endif
+ if (vctxt->inode->idcMatchers != NULL) {
+ VERROR_INT("xmlSchemaIDCRegisterMatchers",
+ "The chain of IDC matchers is expected to be empty");
+ return (-1);
+ }
+ do {
+ if (idc->type == XML_SCHEMA_TYPE_IDC_KEYREF) {
+ /*
+ * Since IDCs bubbles are expensive we need to know the
+ * depth at which the bubbles should stop; this will be
+ * the depth of the top-most keyref IDC. If no keyref
+ * references a key/unique IDC, the keyrefDepth will
+ * be -1, indicating that no bubbles are needed.
+ */
+ refIdc = (xmlSchemaIDCPtr) idc->ref->item;
+ if (refIdc != NULL) {
+ /*
+ * Remember that we have keyrefs on this node.
+ */
+ vctxt->inode->hasKeyrefs = 1;
+ /*
+ * Lookup the referenced augmented IDC info.
+ */
+ aidc = vctxt->aidcs;
+ while (aidc != NULL) {
+ if (aidc->def == refIdc)
+ break;
+ aidc = aidc->next;
+ }
+ if (aidc == NULL) {
+ VERROR_INT("xmlSchemaIDCRegisterMatchers",
+ "Could not find an augmented IDC item for an IDC "
+ "definition");
+ return (-1);
+ }
+ if ((aidc->keyrefDepth == -1) ||
+ (vctxt->depth < aidc->keyrefDepth))
+ aidc->keyrefDepth = vctxt->depth;
+ }
+ }
+ /*
+ * Lookup the augmented IDC item for the IDC definition.
+ */
+ aidc = vctxt->aidcs;
+ while (aidc != NULL) {
+ if (aidc->def == idc)
+ break;
+ aidc = aidc->next;
+ }
+ if (aidc == NULL) {
+ VERROR_INT("xmlSchemaIDCRegisterMatchers",
+ "Could not find an augmented IDC item for an IDC definition");
+ return (-1);
+ }
+ /*
+ * Create an IDC matcher for every IDC definition.
+ */
+ if (vctxt->idcMatcherCache != NULL) {
+ /*
+ * Reuse a cached matcher.
+ */
+ matcher = vctxt->idcMatcherCache;
+ vctxt->idcMatcherCache = matcher->nextCached;
+ matcher->nextCached = NULL;
+ } else {
+ matcher = (xmlSchemaIDCMatcherPtr)
+ xmlMalloc(sizeof(xmlSchemaIDCMatcher));
+ if (matcher == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating an IDC matcher", NULL);
+ return (-1);
+ }
+ memset(matcher, 0, sizeof(xmlSchemaIDCMatcher));
+ }
+ if (last == NULL)
+ vctxt->inode->idcMatchers = matcher;
+ else
+ last->next = matcher;
+ last = matcher;
+
+ matcher->type = IDC_MATCHER;
+ matcher->depth = vctxt->depth;
+ matcher->aidc = aidc;
+ matcher->idcType = aidc->def->type;
+#ifdef DEBUG_IDC
+ xmlGenericError(xmlGenericErrorContext, "IDC: register matcher\n");
+#endif
+ /*
+ * Init the automaton state object.
+ */
+ if (xmlSchemaIDCAddStateObject(vctxt, matcher,
+ idc->selector, XPATH_STATE_OBJ_TYPE_IDC_SELECTOR) == -1)
+ return (-1);
+
+ idc = idc->next;
+ } while (idc != NULL);
+ return (0);
+}
+
+static int
+xmlSchemaIDCFillNodeTables(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaNodeInfoPtr ielem)
+{
+ xmlSchemaPSVIIDCBindingPtr bind;
+ int res, i, j, k, nbTargets, nbFields, nbDupls, nbNodeTable;
+ xmlSchemaPSVIIDCKeyPtr *keys, *ntkeys;
+ xmlSchemaPSVIIDCNodePtr *targets, *dupls;
+
+ xmlSchemaIDCMatcherPtr matcher = ielem->idcMatchers;
+ /* vctxt->createIDCNodeTables */
+ while (matcher != NULL) {
+ /*
+ * Skip keyref IDCs and empty IDC target-lists.
+ */
+ if ((matcher->aidc->def->type == XML_SCHEMA_TYPE_IDC_KEYREF) ||
+ WXS_ILIST_IS_EMPTY(matcher->targets))
+ {
+ matcher = matcher->next;
+ continue;
+ }
+ /*
+ * If we _want_ the IDC node-table to be created in any case
+ * then do so. Otherwise create them only if keyrefs need them.
+ */
+ if ((! vctxt->createIDCNodeTables) &&
+ ((matcher->aidc->keyrefDepth == -1) ||
+ (matcher->aidc->keyrefDepth > vctxt->depth)))
+ {
+ matcher = matcher->next;
+ continue;
+ }
+ /*
+ * Get/create the IDC binding on this element for the IDC definition.
+ */
+ bind = xmlSchemaIDCAcquireBinding(vctxt, matcher);
+
+ if (! WXS_ILIST_IS_EMPTY(bind->dupls)) {
+ dupls = (xmlSchemaPSVIIDCNodePtr *) bind->dupls->items;
+ nbDupls = bind->dupls->nbItems;
+ } else {
+ dupls = NULL;
+ nbDupls = 0;
+ }
+ if (bind->nodeTable != NULL) {
+ nbNodeTable = bind->nbNodes;
+ } else {
+ nbNodeTable = 0;
+ }
+
+ if ((nbNodeTable == 0) && (nbDupls == 0)) {
+ /*
+ * Transfer all IDC target-nodes to the IDC node-table.
+ */
+ bind->nodeTable =
+ (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
+ bind->sizeNodes = matcher->targets->sizeItems;
+ bind->nbNodes = matcher->targets->nbItems;
+
+ matcher->targets->items = NULL;
+ matcher->targets->sizeItems = 0;
+ matcher->targets->nbItems = 0;
+ } else {
+ /*
+ * Compare the key-sequences and add to the IDC node-table.
+ */
+ nbTargets = matcher->targets->nbItems;
+ targets = (xmlSchemaPSVIIDCNodePtr *) matcher->targets->items;
+ nbFields = matcher->aidc->def->nbFields;
+ i = 0;
+ do {
+ keys = targets[i]->keys;
+ if (nbDupls) {
+ /*
+ * Search in already found duplicates first.
+ */
+ j = 0;
+ do {
+ if (nbFields == 1) {
+ res = xmlSchemaAreValuesEqual(keys[0]->val,
+ dupls[j]->keys[0]->val);
+ if (res == -1)
+ goto internal_error;
+ if (res == 1) {
+ /*
+ * Equal key-sequence.
+ */
+ goto next_target;
+ }
+ } else {
+ res = 0;
+ ntkeys = dupls[j]->keys;
+ for (k = 0; k < nbFields; k++) {
+ res = xmlSchemaAreValuesEqual(keys[k]->val,
+ ntkeys[k]->val);
+ if (res == -1)
+ goto internal_error;
+ if (res == 0) {
+ /*
+ * One of the keys differs.
+ */
+ break;
+ }
+ }
+ if (res == 1) {
+ /*
+ * Equal key-sequence found.
+ */
+ goto next_target;
+ }
+ }
+ j++;
+ } while (j < nbDupls);
+ }
+ if (nbNodeTable) {
+ j = 0;
+ do {
+ if (nbFields == 1) {
+ res = xmlSchemaAreValuesEqual(keys[0]->val,
+ bind->nodeTable[j]->keys[0]->val);
+ if (res == -1)
+ goto internal_error;
+ if (res == 0) {
+ /*
+ * The key-sequence differs.
+ */
+ goto next_node_table_entry;
+ }
+ } else {
+ res = 0;
+ ntkeys = bind->nodeTable[j]->keys;
+ for (k = 0; k < nbFields; k++) {
+ res = xmlSchemaAreValuesEqual(keys[k]->val,
+ ntkeys[k]->val);
+ if (res == -1)
+ goto internal_error;
+ if (res == 0) {
+ /*
+ * One of the keys differs.
+ */
+ goto next_node_table_entry;
+ }
+ }
+ }
+ /*
+ * Add the duplicate to the list of duplicates.
+ */
+ if (bind->dupls == NULL) {
+ bind->dupls = xmlSchemaItemListCreate();
+ if (bind->dupls == NULL)
+ goto internal_error;
+ }
+ if (xmlSchemaItemListAdd(bind->dupls, bind->nodeTable[j]) == -1)
+ goto internal_error;
+ /*
+ * Remove the duplicate entry from the IDC node-table.
+ */
+ bind->nodeTable[j] = bind->nodeTable[bind->nbNodes -1];
+ bind->nbNodes--;
+
+ goto next_target;
+
+next_node_table_entry:
+ j++;
+ } while (j < nbNodeTable);
+ }
+ /*
+ * If everything is fine, then add the IDC target-node to
+ * the IDC node-table.
+ */
+ if (xmlSchemaIDCAppendNodeTableItem(bind, targets[i]) == -1)
+ goto internal_error;
+
+next_target:
+ i++;
+ } while (i < nbTargets);
+ }
+ matcher = matcher->next;
+ }
+ return(0);
+
+internal_error:
+ return(-1);
+}
+
+/**
+ * xmlSchemaBubbleIDCNodeTables:
+ * @depth: the current tree depth
+ *
+ * Merges IDC bindings of an element at @depth into the corresponding IDC
+ * bindings of its parent element. If a duplicate note-table entry is found,
+ * both, the parent node-table entry and child entry are discarded from the
+ * node-table of the parent.
+ *
+ * Returns 0 if OK and -1 on internal errors.
+ */
+static int
+xmlSchemaBubbleIDCNodeTables(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaPSVIIDCBindingPtr bind; /* IDC bindings of the current node. */
+ xmlSchemaPSVIIDCBindingPtr *parTable, parBind = NULL; /* parent IDC bindings. */
+ xmlSchemaPSVIIDCNodePtr node, parNode = NULL, *dupls, *parNodes; /* node-table entries. */
+ xmlSchemaIDCAugPtr aidc;
+ int i, j, k, ret = 0, nbFields, oldNum, oldDupls;
+
+ bind = vctxt->inode->idcTable;
+ if (bind == NULL) {
+ /* Fine, no table, no bubbles. */
+ return (0);
+ }
+
+ parTable = &(vctxt->elemInfos[vctxt->depth -1]->idcTable);
+ /*
+ * Walk all bindings; create new or add to existing bindings.
+ * Remove duplicate key-sequences.
+ */
+ while (bind != NULL) {
+
+ if ((bind->nbNodes == 0) && WXS_ILIST_IS_EMPTY(bind->dupls))
+ goto next_binding;
+ /*
+ * Check if the key/unique IDC table needs to be bubbled.
+ */
+ if (! vctxt->createIDCNodeTables) {
+ aidc = vctxt->aidcs;
+ do {
+ if (aidc->def == bind->definition) {
+ if ((aidc->keyrefDepth == -1) ||
+ (aidc->keyrefDepth >= vctxt->depth)) {
+ goto next_binding;
+ }
+ break;
+ }
+ aidc = aidc->next;
+ } while (aidc != NULL);
+ }
+
+ if (parTable != NULL)
+ parBind = *parTable;
+ /*
+ * Search a matching parent binding for the
+ * IDC definition.
+ */
+ while (parBind != NULL) {
+ if (parBind->definition == bind->definition)
+ break;
+ parBind = parBind->next;
+ }
+
+ if (parBind != NULL) {
+ /*
+ * Compare every node-table entry of the child node,
+ * i.e. the key-sequence within, ...
+ */
+ oldNum = parBind->nbNodes; /* Skip newly added items. */
+
+ if (! WXS_ILIST_IS_EMPTY(parBind->dupls)) {
+ oldDupls = parBind->dupls->nbItems;
+ dupls = (xmlSchemaPSVIIDCNodePtr *) parBind->dupls->items;
+ } else {
+ dupls = NULL;
+ oldDupls = 0;
+ }
+
+ parNodes = parBind->nodeTable;
+ nbFields = bind->definition->nbFields;
+
+ for (i = 0; i < bind->nbNodes; i++) {
+ node = bind->nodeTable[i];
+ if (node == NULL)
+ continue;
+ /*
+ * ...with every key-sequence of the parent node, already
+ * evaluated to be a duplicate key-sequence.
+ */
+ if (oldDupls) {
+ j = 0;
+ while (j < oldDupls) {
+ if (nbFields == 1) {
+ ret = xmlSchemaAreValuesEqual(
+ node->keys[0]->val,
+ dupls[j]->keys[0]->val);
+ if (ret == -1)
+ goto internal_error;
+ if (ret == 0) {
+ j++;
+ continue;
+ }
+ } else {
+ parNode = dupls[j];
+ for (k = 0; k < nbFields; k++) {
+ ret = xmlSchemaAreValuesEqual(
+ node->keys[k]->val,
+ parNode->keys[k]->val);
+ if (ret == -1)
+ goto internal_error;
+ if (ret == 0)
+ break;
+ }
+ }
+ if (ret == 1)
+ /* Duplicate found. */
+ break;
+ j++;
+ }
+ if (j != oldDupls) {
+ /* Duplicate found. Skip this entry. */
+ continue;
+ }
+ }
+ /*
+ * ... and with every key-sequence of the parent node.
+ */
+ if (oldNum) {
+ j = 0;
+ while (j < oldNum) {
+ parNode = parNodes[j];
+ if (nbFields == 1) {
+ ret = xmlSchemaAreValuesEqual(
+ node->keys[0]->val,
+ parNode->keys[0]->val);
+ if (ret == -1)
+ goto internal_error;
+ if (ret == 0) {
+ j++;
+ continue;
+ }
+ } else {
+ for (k = 0; k < nbFields; k++) {
+ ret = xmlSchemaAreValuesEqual(
+ node->keys[k]->val,
+ parNode->keys[k]->val);
+ if (ret == -1)
+ goto internal_error;
+ if (ret == 0)
+ break;
+ }
+ }
+ if (ret == 1)
+ /* Duplicate found. */
+ break;
+ j++;
+ }
+ if (j != oldNum) {
+ /*
+ * Handle duplicates. Move the duplicate in
+ * the parent's node-table to the list of
+ * duplicates.
+ */
+ oldNum--;
+ parBind->nbNodes--;
+ /*
+ * Move last old item to pos of duplicate.
+ */
+ parNodes[j] = parNodes[oldNum];
+
+ if (parBind->nbNodes != oldNum) {
+ /*
+ * If new items exist, move last new item to
+ * last of old items.
+ */
+ parNodes[oldNum] =
+ parNodes[parBind->nbNodes];
+ }
+ if (parBind->dupls == NULL) {
+ parBind->dupls = xmlSchemaItemListCreate();
+ if (parBind->dupls == NULL)
+ goto internal_error;
+ }
+ xmlSchemaItemListAdd(parBind->dupls, parNode);
+ } else {
+ /*
+ * Add the node-table entry (node and key-sequence) of
+ * the child node to the node table of the parent node.
+ */
+ if (parBind->nodeTable == NULL) {
+ parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *)
+ xmlMalloc(10 * sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (parBind->nodeTable == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating IDC list of node-table items", NULL);
+ goto internal_error;
+ }
+ parBind->sizeNodes = 1;
+ } else if (parBind->nbNodes >= parBind->sizeNodes) {
+ parBind->sizeNodes *= 2;
+ parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *)
+ xmlRealloc(parBind->nodeTable, parBind->sizeNodes *
+ sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (parBind->nodeTable == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "re-allocating IDC list of node-table items", NULL);
+ goto internal_error;
+ }
+ }
+ parNodes = parBind->nodeTable;
+ /*
+ * Append the new node-table entry to the 'new node-table
+ * entries' section.
+ */
+ parNodes[parBind->nbNodes++] = node;
+ }
+
+ }
+
+ }
+ } else {
+ /*
+ * No binding for the IDC was found: create a new one and
+ * copy all node-tables.
+ */
+ parBind = xmlSchemaIDCNewBinding(bind->definition);
+ if (parBind == NULL)
+ goto internal_error;
+
+ /*
+ * TODO: Hmm, how to optimize the initial number of
+ * allocated entries?
+ */
+ if (bind->nbNodes != 0) {
+ /*
+ * Add all IDC node-table entries.
+ */
+ if (! vctxt->psviExposeIDCNodeTables) {
+ /*
+ * Just move the entries.
+ * NOTE: this is quite save here, since
+ * all the keyref lookups have already been
+ * performed.
+ */
+ parBind->nodeTable = bind->nodeTable;
+ bind->nodeTable = NULL;
+ parBind->sizeNodes = bind->sizeNodes;
+ bind->sizeNodes = 0;
+ parBind->nbNodes = bind->nbNodes;
+ bind->nbNodes = 0;
+ } else {
+ /*
+ * Copy the entries.
+ */
+ parBind->nodeTable = (xmlSchemaPSVIIDCNodePtr *)
+ xmlMalloc(bind->nbNodes *
+ sizeof(xmlSchemaPSVIIDCNodePtr));
+ if (parBind->nodeTable == NULL) {
+ xmlSchemaVErrMemory(NULL,
+ "allocating an array of IDC node-table "
+ "items", NULL);
+ xmlSchemaIDCFreeBinding(parBind);
+ goto internal_error;
+ }
+ parBind->sizeNodes = bind->nbNodes;
+ parBind->nbNodes = bind->nbNodes;
+ memcpy(parBind->nodeTable, bind->nodeTable,
+ bind->nbNodes * sizeof(xmlSchemaPSVIIDCNodePtr));
+ }
+ }
+ if (bind->dupls) {
+ /*
+ * Move the duplicates.
+ */
+ if (parBind->dupls != NULL)
+ xmlSchemaItemListFree(parBind->dupls);
+ parBind->dupls = bind->dupls;
+ bind->dupls = NULL;
+ }
+ if (parTable != NULL) {
+ if (*parTable == NULL)
+ *parTable = parBind;
+ else {
+ parBind->next = *parTable;
+ *parTable = parBind;
+ }
+ }
+ }
+
+next_binding:
+ bind = bind->next;
+ }
+ return (0);
+
+internal_error:
+ return(-1);
+}
+
+/**
+ * xmlSchemaCheckCVCIDCKeyRef:
+ * @vctxt: the WXS validation context
+ * @elemDecl: the element declaration
+ *
+ * Check the cvc-idc-keyref constraints.
+ */
+static int
+xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaIDCMatcherPtr matcher;
+ xmlSchemaPSVIIDCBindingPtr bind;
+
+ matcher = vctxt->inode->idcMatchers;
+ /*
+ * Find a keyref.
+ */
+ while (matcher != NULL) {
+ if ((matcher->idcType == XML_SCHEMA_TYPE_IDC_KEYREF) &&
+ matcher->targets &&
+ matcher->targets->nbItems)
+ {
+ int i, j, k, res, nbFields, hasDupls;
+ xmlSchemaPSVIIDCKeyPtr *refKeys, *keys;
+ xmlSchemaPSVIIDCNodePtr refNode = NULL;
+
+ nbFields = matcher->aidc->def->nbFields;
+
+ /*
+ * Find the IDC node-table for the referenced IDC key/unique.
+ */
+ bind = vctxt->inode->idcTable;
+ while (bind != NULL) {
+ if ((xmlSchemaIDCPtr) matcher->aidc->def->ref->item ==
+ bind->definition)
+ break;
+ bind = bind->next;
+ }
+ hasDupls = (bind && bind->dupls && bind->dupls->nbItems) ? 1 : 0;
+ /*
+ * Search for a matching key-sequences.
+ */
+ for (i = 0; i < matcher->targets->nbItems; i++) {
+ res = 0;
+ refNode = matcher->targets->items[i];
+ if (bind != NULL) {
+ refKeys = refNode->keys;
+ for (j = 0; j < bind->nbNodes; j++) {
+ keys = bind->nodeTable[j]->keys;
+ for (k = 0; k < nbFields; k++) {
+ res = xmlSchemaAreValuesEqual(keys[k]->val,
+ refKeys[k]->val);
+ if (res == 0)
+ break;
+ else if (res == -1) {
+ return (-1);
+ }
+ }
+ if (res == 1) {
+ /*
+ * Match found.
+ */
+ break;
+ }
+ }
+ if ((res == 0) && hasDupls) {
+ /*
+ * Search in duplicates
+ */
+ for (j = 0; j < bind->dupls->nbItems; j++) {
+ keys = ((xmlSchemaPSVIIDCNodePtr)
+ bind->dupls->items[j])->keys;
+ for (k = 0; k < nbFields; k++) {
+ res = xmlSchemaAreValuesEqual(keys[k]->val,
+ refKeys[k]->val);
+ if (res == 0)
+ break;
+ else if (res == -1) {
+ return (-1);
+ }
+ }
+ if (res == 1) {
+ /*
+ * Match in duplicates found.
+ */
+ xmlChar *str = NULL, *strB = NULL;
+ xmlSchemaKeyrefErr(vctxt,
+ XML_SCHEMAV_CVC_IDC, refNode,
+ (xmlSchemaTypePtr) matcher->aidc->def,
+ "More than one match found for "
+ "key-sequence %s of keyref '%s'",
+ xmlSchemaFormatIDCKeySequence(vctxt, &str,
+ refNode->keys, nbFields),
+ xmlSchemaGetComponentQName(&strB,
+ matcher->aidc->def));
+ FREE_AND_NULL(str);
+ FREE_AND_NULL(strB);
+ break;
+ }
+ }
+ }
+ }
+
+ if (res == 0) {
+ xmlChar *str = NULL, *strB = NULL;
+ xmlSchemaKeyrefErr(vctxt,
+ XML_SCHEMAV_CVC_IDC, refNode,
+ (xmlSchemaTypePtr) matcher->aidc->def,
+ "No match found for key-sequence %s of keyref '%s'",
+ xmlSchemaFormatIDCKeySequence(vctxt, &str,
+ refNode->keys, nbFields),
+ xmlSchemaGetComponentQName(&strB, matcher->aidc->def));
+ FREE_AND_NULL(str);
+ FREE_AND_NULL(strB);
+ }
+ }
+ }
+ matcher = matcher->next;
+ }
+ /* TODO: Return an error if any error encountered. */
+ return (0);
+}
+
+/************************************************************************
+ * *
+ * XML Reader validation code *
+ * *
+ ************************************************************************/
+
+static xmlSchemaAttrInfoPtr
+xmlSchemaGetFreshAttrInfo(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaAttrInfoPtr iattr;
+ /*
+ * Grow/create list of attribute infos.
+ */
+ if (vctxt->attrInfos == NULL) {
+ vctxt->attrInfos = (xmlSchemaAttrInfoPtr *)
+ xmlMalloc(sizeof(xmlSchemaAttrInfoPtr));
+ vctxt->sizeAttrInfos = 1;
+ if (vctxt->attrInfos == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating attribute info list", NULL);
+ return (NULL);
+ }
+ } else if (vctxt->sizeAttrInfos <= vctxt->nbAttrInfos) {
+ vctxt->sizeAttrInfos++;
+ vctxt->attrInfos = (xmlSchemaAttrInfoPtr *)
+ xmlRealloc(vctxt->attrInfos,
+ vctxt->sizeAttrInfos * sizeof(xmlSchemaAttrInfoPtr));
+ if (vctxt->attrInfos == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "re-allocating attribute info list", NULL);
+ return (NULL);
+ }
+ } else {
+ iattr = vctxt->attrInfos[vctxt->nbAttrInfos++];
+ if (iattr->localName != NULL) {
+ VERROR_INT("xmlSchemaGetFreshAttrInfo",
+ "attr info not cleared");
+ return (NULL);
+ }
+ iattr->nodeType = XML_ATTRIBUTE_NODE;
+ return (iattr);
+ }
+ /*
+ * Create an attribute info.
+ */
+ iattr = (xmlSchemaAttrInfoPtr)
+ xmlMalloc(sizeof(xmlSchemaAttrInfo));
+ if (iattr == NULL) {
+ xmlSchemaVErrMemory(vctxt, "creating new attribute info", NULL);
+ return (NULL);
+ }
+ memset(iattr, 0, sizeof(xmlSchemaAttrInfo));
+ iattr->nodeType = XML_ATTRIBUTE_NODE;
+ vctxt->attrInfos[vctxt->nbAttrInfos++] = iattr;
+
+ return (iattr);
+}
+
+static int
+xmlSchemaValidatorPushAttribute(xmlSchemaValidCtxtPtr vctxt,
+ xmlNodePtr attrNode,
+ int nodeLine,
+ const xmlChar *localName,
+ const xmlChar *nsName,
+ int ownedNames,
+ xmlChar *value,
+ int ownedValue)
+{
+ xmlSchemaAttrInfoPtr attr;
+
+ attr = xmlSchemaGetFreshAttrInfo(vctxt);
+ if (attr == NULL) {
+ VERROR_INT("xmlSchemaPushAttribute",
+ "calling xmlSchemaGetFreshAttrInfo()");
+ return (-1);
+ }
+ attr->node = attrNode;
+ attr->nodeLine = nodeLine;
+ attr->state = XML_SCHEMAS_ATTR_UNKNOWN;
+ attr->localName = localName;
+ attr->nsName = nsName;
+ if (ownedNames)
+ attr->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES;
+ /*
+ * Evaluate if it's an XSI attribute.
+ */
+ if (nsName != NULL) {
+ if (xmlStrEqual(localName, BAD_CAST "nil")) {
+ if (xmlStrEqual(attr->nsName, xmlSchemaInstanceNs)) {
+ attr->metaType = XML_SCHEMA_ATTR_INFO_META_XSI_NIL;
+ }
+ } else if (xmlStrEqual(localName, BAD_CAST "type")) {
+ if (xmlStrEqual(attr->nsName, xmlSchemaInstanceNs)) {
+ attr->metaType = XML_SCHEMA_ATTR_INFO_META_XSI_TYPE;
+ }
+ } else if (xmlStrEqual(localName, BAD_CAST "schemaLocation")) {
+ if (xmlStrEqual(attr->nsName, xmlSchemaInstanceNs)) {
+ attr->metaType = XML_SCHEMA_ATTR_INFO_META_XSI_SCHEMA_LOC;
+ }
+ } else if (xmlStrEqual(localName, BAD_CAST "noNamespaceSchemaLocation")) {
+ if (xmlStrEqual(attr->nsName, xmlSchemaInstanceNs)) {
+ attr->metaType = XML_SCHEMA_ATTR_INFO_META_XSI_NO_NS_SCHEMA_LOC;
+ }
+ } else if (xmlStrEqual(attr->nsName, xmlNamespaceNs)) {
+ attr->metaType = XML_SCHEMA_ATTR_INFO_META_XMLNS;
+ }
+ }
+ attr->value = value;
+ if (ownedValue)
+ attr->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES;
+ if (attr->metaType != 0)
+ attr->state = XML_SCHEMAS_ATTR_META;
+ return (0);
+}
+
+/**
+ * xmlSchemaClearElemInfo:
+ * @vctxt: the WXS validation context
+ * @ielem: the element information item
+ */
+static void
+xmlSchemaClearElemInfo(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaNodeInfoPtr ielem)
+{
+ ielem->hasKeyrefs = 0;
+ ielem->appliedXPath = 0;
+ if (ielem->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) {
+ FREE_AND_NULL(ielem->localName);
+ FREE_AND_NULL(ielem->nsName);
+ } else {
+ ielem->localName = NULL;
+ ielem->nsName = NULL;
+ }
+ if (ielem->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) {
+ FREE_AND_NULL(ielem->value);
+ } else {
+ ielem->value = NULL;
+ }
+ if (ielem->val != NULL) {
+ /*
+ * PSVI TODO: Be careful not to free it when the value is
+ * exposed via PSVI.
+ */
+ xmlSchemaFreeValue(ielem->val);
+ ielem->val = NULL;
+ }
+ if (ielem->idcMatchers != NULL) {
+ /*
+ * REVISIT OPTIMIZE TODO: Use a pool of IDC matchers.
+ * Does it work?
+ */
+ xmlSchemaIDCReleaseMatcherList(vctxt, ielem->idcMatchers);
+#if 0
+ xmlSchemaIDCFreeMatcherList(ielem->idcMatchers);
+#endif
+ ielem->idcMatchers = NULL;
+ }
+ if (ielem->idcTable != NULL) {
+ /*
+ * OPTIMIZE TODO: Use a pool of IDC tables??.
+ */
+ xmlSchemaIDCFreeIDCTable(ielem->idcTable);
+ ielem->idcTable = NULL;
+ }
+ if (ielem->regexCtxt != NULL) {
+ xmlRegFreeExecCtxt(ielem->regexCtxt);
+ ielem->regexCtxt = NULL;
+ }
+ if (ielem->nsBindings != NULL) {
+ xmlFree((xmlChar **)ielem->nsBindings);
+ ielem->nsBindings = NULL;
+ ielem->nbNsBindings = 0;
+ ielem->sizeNsBindings = 0;
+ }
+}
+
+/**
+ * xmlSchemaGetFreshElemInfo:
+ * @vctxt: the schema validation context
+ *
+ * Creates/reuses and initializes the element info item for
+ * the currect tree depth.
+ *
+ * Returns the element info item or NULL on API or internal errors.
+ */
+static xmlSchemaNodeInfoPtr
+xmlSchemaGetFreshElemInfo(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaNodeInfoPtr info = NULL;
+
+ if (vctxt->depth > vctxt->sizeElemInfos) {
+ VERROR_INT("xmlSchemaGetFreshElemInfo",
+ "inconsistent depth encountered");
+ return (NULL);
+ }
+ if (vctxt->elemInfos == NULL) {
+ vctxt->elemInfos = (xmlSchemaNodeInfoPtr *)
+ xmlMalloc(10 * sizeof(xmlSchemaNodeInfoPtr));
+ if (vctxt->elemInfos == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating the element info array", NULL);
+ return (NULL);
+ }
+ memset(vctxt->elemInfos, 0, 10 * sizeof(xmlSchemaNodeInfoPtr));
+ vctxt->sizeElemInfos = 10;
+ } else if (vctxt->sizeElemInfos <= vctxt->depth) {
+ int i = vctxt->sizeElemInfos;
+
+ vctxt->sizeElemInfos *= 2;
+ vctxt->elemInfos = (xmlSchemaNodeInfoPtr *)
+ xmlRealloc(vctxt->elemInfos, vctxt->sizeElemInfos *
+ sizeof(xmlSchemaNodeInfoPtr));
+ if (vctxt->elemInfos == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "re-allocating the element info array", NULL);
+ return (NULL);
+ }
+ /*
+ * We need the new memory to be NULLed.
+ * TODO: Use memset instead?
+ */
+ for (; i < vctxt->sizeElemInfos; i++)
+ vctxt->elemInfos[i] = NULL;
+ } else
+ info = vctxt->elemInfos[vctxt->depth];
+
+ if (info == NULL) {
+ info = (xmlSchemaNodeInfoPtr)
+ xmlMalloc(sizeof(xmlSchemaNodeInfo));
+ if (info == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating an element info", NULL);
+ return (NULL);
+ }
+ vctxt->elemInfos[vctxt->depth] = info;
+ } else {
+ if (info->localName != NULL) {
+ VERROR_INT("xmlSchemaGetFreshElemInfo",
+ "elem info has not been cleared");
+ return (NULL);
+ }
+ }
+ memset(info, 0, sizeof(xmlSchemaNodeInfo));
+ info->nodeType = XML_ELEMENT_NODE;
+ info->depth = vctxt->depth;
+
+ return (info);
+}
+
+#define ACTIVATE_ATTRIBUTE(item) vctxt->inode = (xmlSchemaNodeInfoPtr) item;
+#define ACTIVATE_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth];
+#define ACTIVATE_PARENT_ELEM vctxt->inode = vctxt->elemInfos[vctxt->depth -1];
+
+static int
+xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type,
+ xmlSchemaValType valType,
+ const xmlChar * value,
+ xmlSchemaValPtr val,
+ unsigned long length,
+ int fireErrors)
+{
+ int ret, error = 0;
+
+ xmlSchemaTypePtr tmpType;
+ xmlSchemaFacetLinkPtr facetLink;
+ xmlSchemaFacetPtr facet;
+ unsigned long len = 0;
+ xmlSchemaWhitespaceValueType ws;
+
+ /*
+ * In Libxml2, derived built-in types have currently no explicit facets.
+ */
+ if (type->type == XML_SCHEMA_TYPE_BASIC)
+ return (0);
+
+ /*
+ * NOTE: Do not jump away, if the facetSet of the given type is
+ * empty: until now, "pattern" and "enumeration" facets of the
+ * *base types* need to be checked as well.
+ */
+ if (type->facetSet == NULL)
+ goto pattern_and_enum;
+
+ if (! WXS_IS_ATOMIC(type)) {
+ if (WXS_IS_LIST(type))
+ goto WXS_IS_LIST;
+ else
+ goto pattern_and_enum;
+ }
+ /*
+ * Whitespace handling is only of importance for string-based
+ * types.
+ */
+ tmpType = xmlSchemaGetPrimitiveType(type);
+ if ((tmpType->builtInType == XML_SCHEMAS_STRING) ||
+ WXS_IS_ANY_SIMPLE_TYPE(tmpType)) {
+ ws = xmlSchemaGetWhiteSpaceFacetValue(type);
+ } else
+ ws = XML_SCHEMA_WHITESPACE_COLLAPSE;
+ /*
+ * If the value was not computed (for string or
+ * anySimpleType based types), then use the provided
+ * type.
+ */
+ if (val == NULL)
+ valType = valType;
+ else
+ valType = xmlSchemaGetValType(val);
+
+ ret = 0;
+ for (facetLink = type->facetSet; facetLink != NULL;
+ facetLink = facetLink->next) {
+ /*
+ * Skip the pattern "whiteSpace": it is used to
+ * format the character content beforehand.
+ */
+ switch (facetLink->facet->type) {
+ case XML_SCHEMA_FACET_WHITESPACE:
+ case XML_SCHEMA_FACET_PATTERN:
+ case XML_SCHEMA_FACET_ENUMERATION:
+ continue;
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ ret = xmlSchemaValidateLengthFacetWhtsp(facetLink->facet,
+ valType, value, val, &len, ws);
+ break;
+ default:
+ ret = xmlSchemaValidateFacetWhtsp(facetLink->facet, ws,
+ valType, value, val, ws);
+ break;
+ }
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaValidateFacets",
+ "validating against a atomic type facet");
+ return (-1);
+ } else if (ret > 0) {
+ if (fireErrors)
+ xmlSchemaFacetErr(actxt, ret, node,
+ value, len, type, facetLink->facet, NULL, NULL, NULL);
+ else
+ return (ret);
+ if (error == 0)
+ error = ret;
+ }
+ ret = 0;
+ }
+
+WXS_IS_LIST:
+ if (! WXS_IS_LIST(type))
+ goto pattern_and_enum;
+ /*
+ * "length", "minLength" and "maxLength" of list types.
+ */
+ ret = 0;
+ for (facetLink = type->facetSet; facetLink != NULL;
+ facetLink = facetLink->next) {
+
+ switch (facetLink->facet->type) {
+ case XML_SCHEMA_FACET_LENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH:
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ ret = xmlSchemaValidateListSimpleTypeFacet(facetLink->facet,
+ value, length, NULL);
+ break;
+ default:
+ continue;
+ }
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaValidateFacets",
+ "validating against a list type facet");
+ return (-1);
+ } else if (ret > 0) {
+ if (fireErrors)
+ xmlSchemaFacetErr(actxt, ret, node,
+ value, length, type, facetLink->facet, NULL, NULL, NULL);
+ else
+ return (ret);
+ if (error == 0)
+ error = ret;
+ }
+ ret = 0;
+ }
+
+pattern_and_enum:
+ if (error >= 0) {
+ int found = 0;
+ /*
+ * Process enumerations. Facet values are in the value space
+ * of the defining type's base type. This seems to be a bug in the
+ * XML Schema 1.0 spec. Use the whitespace type of the base type.
+ * Only the first set of enumerations in the ancestor-or-self axis
+ * is used for validation.
+ */
+ ret = 0;
+ tmpType = type;
+ do {
+ for (facet = tmpType->facets; facet != NULL; facet = facet->next) {
+ if (facet->type != XML_SCHEMA_FACET_ENUMERATION)
+ continue;
+ found = 1;
+ ret = xmlSchemaAreValuesEqual(facet->val, val);
+ if (ret == 1)
+ break;
+ else if (ret < 0) {
+ AERROR_INT("xmlSchemaValidateFacets",
+ "validating against an enumeration facet");
+ return (-1);
+ }
+ }
+ if (ret != 0)
+ break;
+ /*
+ * Break on the first set of enumerations. Any additional
+ * enumerations which might be existent on the ancestors
+ * of the current type are restricted by this set; thus
+ * *must* *not* be taken into account.
+ */
+ if (found)
+ break;
+ tmpType = tmpType->baseType;
+ } while ((tmpType != NULL) &&
+ (tmpType->type != XML_SCHEMA_TYPE_BASIC));
+ if (found && (ret == 0)) {
+ ret = XML_SCHEMAV_CVC_ENUMERATION_VALID;
+ if (fireErrors) {
+ xmlSchemaFacetErr(actxt, ret, node,
+ value, 0, type, NULL, NULL, NULL, NULL);
+ } else
+ return (ret);
+ if (error == 0)
+ error = ret;
+ }
+ }
+
+ if (error >= 0) {
+ int found;
+ /*
+ * Process patters. Pattern facets are ORed at type level
+ * and ANDed if derived. Walk the base type axis.
+ */
+ tmpType = type;
+ facet = NULL;
+ do {
+ found = 0;
+ for (facetLink = tmpType->facetSet; facetLink != NULL;
+ facetLink = facetLink->next) {
+ if (facetLink->facet->type != XML_SCHEMA_FACET_PATTERN)
+ continue;
+ found = 1;
+ /*
+ * NOTE that for patterns, @value needs to be the
+ * normalized vaule.
+ */
+ ret = xmlRegexpExec(facetLink->facet->regexp, value);
+ if (ret == 1)
+ break;
+ else if (ret < 0) {
+ AERROR_INT("xmlSchemaValidateFacets",
+ "validating against a pattern facet");
+ return (-1);
+ } else {
+ /*
+ * Save the last non-validating facet.
+ */
+ facet = facetLink->facet;
+ }
+ }
+ if (found && (ret != 1)) {
+ ret = XML_SCHEMAV_CVC_PATTERN_VALID;
+ if (fireErrors) {
+ xmlSchemaFacetErr(actxt, ret, node,
+ value, 0, type, facet, NULL, NULL, NULL);
+ } else
+ return (ret);
+ if (error == 0)
+ error = ret;
+ break;
+ }
+ tmpType = tmpType->baseType;
+ } while ((tmpType != NULL) && (tmpType->type != XML_SCHEMA_TYPE_BASIC));
+ }
+
+ return (error);
+}
+
+static xmlChar *
+xmlSchemaNormalizeValue(xmlSchemaTypePtr type,
+ const xmlChar *value)
+{
+ switch (xmlSchemaGetWhiteSpaceFacetValue(type)) {
+ case XML_SCHEMA_WHITESPACE_COLLAPSE:
+ return (xmlSchemaCollapseString(value));
+ case XML_SCHEMA_WHITESPACE_REPLACE:
+ return (xmlSchemaWhiteSpaceReplace(value));
+ default:
+ return (NULL);
+ }
+}
+
+static int
+xmlSchemaValidateQName(xmlSchemaValidCtxtPtr vctxt,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ int valNeeded)
+{
+ int ret;
+ const xmlChar *nsName;
+ xmlChar *local, *prefix = NULL;
+
+ ret = xmlValidateQName(value, 1);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaValidateQName",
+ "calling xmlValidateQName()");
+ return (-1);
+ }
+ return( XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1);
+ }
+ /*
+ * NOTE: xmlSplitQName2 will always return a duplicated
+ * strings.
+ */
+ local = xmlSplitQName2(value, &prefix);
+ if (local == NULL)
+ local = xmlStrdup(value);
+ /*
+ * OPTIMIZE TODO: Use flags for:
+ * - is there any namespace binding?
+ * - is there a default namespace?
+ */
+ nsName = xmlSchemaLookupNamespace(vctxt, prefix);
+
+ if (prefix != NULL) {
+ xmlFree(prefix);
+ /*
+ * A namespace must be found if the prefix is
+ * NOT NULL.
+ */
+ if (nsName == NULL) {
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
+ xmlSchemaCustomErr(ACTXT_CAST vctxt, ret, NULL,
+ WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+ "The QName value '%s' has no "
+ "corresponding namespace declaration in "
+ "scope", value, NULL);
+ if (local != NULL)
+ xmlFree(local);
+ return (ret);
+ }
+ }
+ if (valNeeded && val) {
+ if (nsName != NULL)
+ *val = xmlSchemaNewQNameValue(
+ BAD_CAST xmlStrdup(nsName), BAD_CAST local);
+ else
+ *val = xmlSchemaNewQNameValue(NULL,
+ BAD_CAST local);
+ } else
+ xmlFree(local);
+ return (0);
+}
+
+/*
+* cvc-simple-type
+*/
+static int
+xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
+ xmlNodePtr node,
+ xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *retVal,
+ int fireErrors,
+ int normalize,
+ int isNormalized)
+{
+ int ret = 0, valNeeded = (retVal) ? 1 : 0;
+ xmlSchemaValPtr val = NULL;
+ /* xmlSchemaWhitespaceValueType ws; */
+ xmlChar *normValue = NULL;
+
+#define NORMALIZE(atype) \
+ if ((! isNormalized) && \
+ (normalize || (type->flags & XML_SCHEMAS_TYPE_NORMVALUENEEDED))) { \
+ normValue = xmlSchemaNormalizeValue(atype, value); \
+ if (normValue != NULL) \
+ value = normValue; \
+ isNormalized = 1; \
+ }
+
+ if ((retVal != NULL) && (*retVal != NULL)) {
+ xmlSchemaFreeValue(*retVal);
+ *retVal = NULL;
+ }
+ /*
+ * 3.14.4 Simple Type Definition Validation Rules
+ * Validation Rule: String Valid
+ */
+ /*
+ * 1 It is schema-valid with respect to that definition as defined
+ * by Datatype Valid in [XML Schemas: Datatypes].
+ */
+ /*
+ * 2.1 If The definition is ENTITY or is validly derived from ENTITY given
+ * the empty set, as defined in Type Derivation OK (Simple) ($3.14.6), then
+ * the string must be a `declared entity name`.
+ */
+ /*
+ * 2.2 If The definition is ENTITIES or is validly derived from ENTITIES
+ * given the empty set, as defined in Type Derivation OK (Simple) ($3.14.6),
+ * then every whitespace-delimited substring of the string must be a `declared
+ * entity name`.
+ */
+ /*
+ * 2.3 otherwise no further condition applies.
+ */
+ if ((! valNeeded) && (type->flags & XML_SCHEMAS_TYPE_FACETSNEEDVALUE))
+ valNeeded = 1;
+ if (value == NULL)
+ value = BAD_CAST "";
+ if (WXS_IS_ANY_SIMPLE_TYPE(type) || WXS_IS_ATOMIC(type)) {
+ xmlSchemaTypePtr biType; /* The built-in type. */
+ /*
+ * SPEC (1.2.1) "if {variety} is `atomic` then the string must `match`
+ * a literal in the `lexical space` of {base type definition}"
+ */
+ /*
+ * Whitespace-normalize.
+ */
+ NORMALIZE(type);
+ if (type->type != XML_SCHEMA_TYPE_BASIC) {
+ /*
+ * Get the built-in type.
+ */
+ biType = type->baseType;
+ while ((biType != NULL) &&
+ (biType->type != XML_SCHEMA_TYPE_BASIC))
+ biType = biType->baseType;
+
+ if (biType == NULL) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "could not get the built-in type");
+ goto internal_error;
+ }
+ } else
+ biType = type;
+ /*
+ * NOTATIONs need to be processed here, since they need
+ * to lookup in the hashtable of NOTATION declarations of the schema.
+ */
+ if (actxt->type == XML_SCHEMA_CTXT_VALIDATOR) {
+ switch (biType->builtInType) {
+ case XML_SCHEMAS_NOTATION:
+ ret = xmlSchemaValidateNotation(
+ (xmlSchemaValidCtxtPtr) actxt,
+ ((xmlSchemaValidCtxtPtr) actxt)->schema,
+ NULL, value, &val, valNeeded);
+ break;
+ case XML_SCHEMAS_QNAME:
+ ret = xmlSchemaValidateQName((xmlSchemaValidCtxtPtr) actxt,
+ value, &val, valNeeded);
+ break;
+ default:
+ /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */
+ if (valNeeded)
+ ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
+ value, &val, node);
+ else
+ ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
+ value, NULL, node);
+ break;
+ }
+ } else if (actxt->type == XML_SCHEMA_CTXT_PARSER) {
+ switch (biType->builtInType) {
+ case XML_SCHEMAS_NOTATION:
+ ret = xmlSchemaValidateNotation(NULL,
+ ((xmlSchemaParserCtxtPtr) actxt)->schema, node,
+ value, &val, valNeeded);
+ break;
+ default:
+ /* ws = xmlSchemaGetWhiteSpaceFacetValue(type); */
+ if (valNeeded)
+ ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
+ value, &val, node);
+ else
+ ret = xmlSchemaValPredefTypeNodeNoNorm(biType,
+ value, NULL, node);
+ break;
+ }
+ } else {
+ /*
+ * Validation via a public API is not implemented yet.
+ */
+ TODO
+ goto internal_error;
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating against a built-in type");
+ goto internal_error;
+ }
+ if (WXS_IS_LIST(type))
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
+ else
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
+ }
+ if ((ret == 0) && (type->flags & XML_SCHEMAS_TYPE_HAS_FACETS)) {
+ /*
+ * Check facets.
+ */
+ ret = xmlSchemaValidateFacets(actxt, node, type,
+ (xmlSchemaValType) biType->builtInType, value, val,
+ 0, fireErrors);
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating facets of atomic simple type");
+ goto internal_error;
+ }
+ if (WXS_IS_LIST(type))
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
+ else
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1;
+ }
+ }
+ if (fireErrors && (ret > 0))
+ xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1);
+ } else if (WXS_IS_LIST(type)) {
+
+ xmlSchemaTypePtr itemType;
+ const xmlChar *cur, *end;
+ xmlChar *tmpValue = NULL;
+ unsigned long len = 0;
+ xmlSchemaValPtr prevVal = NULL, curVal = NULL;
+ /* 1.2.2 if {variety} is `list` then the string must be a sequence
+ * of white space separated tokens, each of which `match`es a literal
+ * in the `lexical space` of {item type definition}
+ */
+ /*
+ * Note that XML_SCHEMAS_TYPE_NORMVALUENEEDED will be set if
+ * the list type has an enum or pattern facet.
+ */
+ NORMALIZE(type);
+ /*
+ * VAL TODO: Optimize validation of empty values.
+ * VAL TODO: We do not have computed values for lists.
+ */
+ itemType = WXS_LIST_ITEMTYPE(type);
+ cur = value;
+ do {
+ while (IS_BLANK_CH(*cur))
+ cur++;
+ end = cur;
+ while ((*end != 0) && (!(IS_BLANK_CH(*end))))
+ end++;
+ if (end == cur)
+ break;
+ tmpValue = xmlStrndup(cur, end - cur);
+ len++;
+
+ if (valNeeded)
+ ret = xmlSchemaVCheckCVCSimpleType(actxt, node, itemType,
+ tmpValue, &curVal, fireErrors, 0, 1);
+ else
+ ret = xmlSchemaVCheckCVCSimpleType(actxt, node, itemType,
+ tmpValue, NULL, fireErrors, 0, 1);
+ FREE_AND_NULL(tmpValue);
+ if (curVal != NULL) {
+ /*
+ * Add to list of computed values.
+ */
+ if (val == NULL)
+ val = curVal;
+ else
+ xmlSchemaValueAppend(prevVal, curVal);
+ prevVal = curVal;
+ curVal = NULL;
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating an item of list simple type");
+ goto internal_error;
+ }
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
+ break;
+ }
+ cur = end;
+ } while (*cur != 0);
+ FREE_AND_NULL(tmpValue);
+ if ((ret == 0) && (type->flags & XML_SCHEMAS_TYPE_HAS_FACETS)) {
+ /*
+ * Apply facets (pattern, enumeration).
+ */
+ ret = xmlSchemaValidateFacets(actxt, node, type,
+ XML_SCHEMAS_UNKNOWN, value, val,
+ len, fireErrors);
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating facets of list simple type");
+ goto internal_error;
+ }
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2;
+ }
+ }
+ if (fireErrors && (ret > 0)) {
+ /*
+ * Report the normalized value.
+ */
+ normalize = 1;
+ NORMALIZE(type);
+ xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1);
+ }
+ } else if (WXS_IS_UNION(type)) {
+ xmlSchemaTypeLinkPtr memberLink;
+ /*
+ * TODO: For all datatypes `derived` by `union` whiteSpace does
+ * not apply directly; however, the normalization behavior of `union`
+ * types is controlled by the value of whiteSpace on that one of the
+ * `memberTypes` against which the `union` is successfully validated.
+ *
+ * This means that the value is normalized by the first validating
+ * member type, then the facets of the union type are applied. This
+ * needs changing of the value!
+ */
+
+ /*
+ * 1.2.3 if {variety} is `union` then the string must `match` a
+ * literal in the `lexical space` of at least one member of
+ * {member type definitions}
+ */
+ memberLink = xmlSchemaGetUnionSimpleTypeMemberTypes(type);
+ if (memberLink == NULL) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "union simple type has no member types");
+ goto internal_error;
+ }
+ /*
+ * Always normalize union type values, since we currently
+ * cannot store the whitespace information with the value
+ * itself; otherwise a later value-comparison would be
+ * not possible.
+ */
+ while (memberLink != NULL) {
+ if (valNeeded)
+ ret = xmlSchemaVCheckCVCSimpleType(actxt, node,
+ memberLink->type, value, &val, 0, 1, 0);
+ else
+ ret = xmlSchemaVCheckCVCSimpleType(actxt, node,
+ memberLink->type, value, NULL, 0, 1, 0);
+ if (ret <= 0)
+ break;
+ memberLink = memberLink->next;
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating members of union simple type");
+ goto internal_error;
+ }
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3;
+ }
+ /*
+ * Apply facets (pattern, enumeration).
+ */
+ if ((ret == 0) && (type->flags & XML_SCHEMAS_TYPE_HAS_FACETS)) {
+ /*
+ * The normalization behavior of `union` types is controlled by
+ * the value of whiteSpace on that one of the `memberTypes`
+ * against which the `union` is successfully validated.
+ */
+ NORMALIZE(memberLink->type);
+ ret = xmlSchemaValidateFacets(actxt, node, type,
+ XML_SCHEMAS_UNKNOWN, value, val,
+ 0, fireErrors);
+ if (ret != 0) {
+ if (ret < 0) {
+ AERROR_INT("xmlSchemaVCheckCVCSimpleType",
+ "validating facets of union simple type");
+ goto internal_error;
+ }
+ ret = XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3;
+ }
+ }
+ if (fireErrors && (ret > 0))
+ xmlSchemaSimpleTypeErr(actxt, ret, node, value, type, 1);
+ }
+
+ if (normValue != NULL)
+ xmlFree(normValue);
+ if (ret == 0) {
+ if (retVal != NULL)
+ *retVal = val;
+ else if (val != NULL)
+ xmlSchemaFreeValue(val);
+ } else if (val != NULL)
+ xmlSchemaFreeValue(val);
+ return (ret);
+internal_error:
+ if (normValue != NULL)
+ xmlFree(normValue);
+ if (val != NULL)
+ xmlSchemaFreeValue(val);
+ return (-1);
+}
+
+static int
+xmlSchemaVExpandQName(xmlSchemaValidCtxtPtr vctxt,
+ const xmlChar *value,
+ const xmlChar **nsName,
+ const xmlChar **localName)
+{
+ int ret = 0;
+
+ if ((nsName == NULL) || (localName == NULL))
+ return (-1);
+ *nsName = NULL;
+ *localName = NULL;
+
+ ret = xmlValidateQName(value, 1);
+ if (ret == -1)
+ return (-1);
+ if (ret > 0) {
+ xmlSchemaSimpleTypeErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL,
+ value, xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME), 1);
+ return (1);
+ }
+ {
+ xmlChar *local = NULL;
+ xmlChar *prefix;
+
+ /*
+ * NOTE: xmlSplitQName2 will return a duplicated
+ * string.
+ */
+ local = xmlSplitQName2(value, &prefix);
+ if (local == NULL)
+ *localName = xmlDictLookup(vctxt->dict, value, -1);
+ else {
+ *localName = xmlDictLookup(vctxt->dict, local, -1);
+ xmlFree(local);
+ }
+
+ *nsName = xmlSchemaLookupNamespace(vctxt, prefix);
+
+ if (prefix != NULL) {
+ xmlFree(prefix);
+ /*
+ * A namespace must be found if the prefix is NOT NULL.
+ */
+ if (*nsName == NULL) {
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, NULL,
+ WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+ "The QName value '%s' has no "
+ "corresponding namespace declaration in scope",
+ value, NULL);
+ return (2);
+ }
+ }
+ }
+ return (0);
+}
+
+static int
+xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaAttrInfoPtr iattr,
+ xmlSchemaTypePtr *localType,
+ xmlSchemaElementPtr elemDecl)
+{
+ int ret = 0;
+ /*
+ * cvc-elt (3.3.4) : (4)
+ * AND
+ * Schema-Validity Assessment (Element) (cvc-assess-elt)
+ * (1.2.1.2.1) - (1.2.1.2.4)
+ * Handle 'xsi:type'.
+ */
+ if (localType == NULL)
+ return (-1);
+ *localType = NULL;
+ if (iattr == NULL)
+ return (0);
+ else {
+ const xmlChar *nsName = NULL, *local = NULL;
+ /*
+ * TODO: We should report a *warning* that the type was overriden
+ * by the instance.
+ */
+ ACTIVATE_ATTRIBUTE(iattr);
+ /*
+ * (cvc-elt) (3.3.4) : (4.1)
+ * (cvc-assess-elt) (1.2.1.2.2)
+ */
+ ret = xmlSchemaVExpandQName(vctxt, iattr->value,
+ &nsName, &local);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidateElementByDeclaration",
+ "calling xmlSchemaQNameExpand() to validate the "
+ "attribute 'xsi:type'");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ /*
+ * (cvc-elt) (3.3.4) : (4.2)
+ * (cvc-assess-elt) (1.2.1.2.3)
+ */
+ *localType = xmlSchemaGetType(vctxt->schema, local, nsName);
+ if (*localType == NULL) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_ELT_4_2, NULL,
+ WXS_BASIC_CAST xmlSchemaGetBuiltInType(XML_SCHEMAS_QNAME),
+ "The QName value '%s' of the xsi:type attribute does not "
+ "resolve to a type definition",
+ xmlSchemaFormatQName(&str, nsName, local), NULL);
+ FREE_AND_NULL(str);
+ ret = vctxt->err;
+ goto exit;
+ }
+ if (elemDecl != NULL) {
+ int set = 0;
+
+ /*
+ * SPEC cvc-elt (3.3.4) : (4.3) (Type Derivation OK)
+ * "The `local type definition` must be validly
+ * derived from the {type definition} given the union of
+ * the {disallowed substitutions} and the {type definition}'s
+ * {prohibited substitutions}, as defined in
+ * Type Derivation OK (Complex) ($3.4.6)
+ * (if it is a complex type definition),
+ * or given {disallowed substitutions} as defined in Type
+ * Derivation OK (Simple) ($3.14.6) (if it is a simple type
+ * definition)."
+ *
+ * {disallowed substitutions}: the "block" on the element decl.
+ * {prohibited substitutions}: the "block" on the type def.
+ */
+ /*
+ * OPTIMIZE TODO: We could map types already evaluated
+ * to be validly derived from other types to avoid checking
+ * this over and over for the same types.
+ */
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_BLOCK_EXTENSION) ||
+ (elemDecl->subtypes->flags &
+ XML_SCHEMAS_TYPE_BLOCK_EXTENSION))
+ set |= SUBSET_EXTENSION;
+
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_BLOCK_RESTRICTION) ||
+ (elemDecl->subtypes->flags &
+ XML_SCHEMAS_TYPE_BLOCK_RESTRICTION))
+ set |= SUBSET_RESTRICTION;
+
+ /*
+ * REMOVED and CHANGED since this produced a parser context
+ * which adds to the string dict of the schema. So this would
+ * change the schema and we don't want this. We don't need
+ * the parser context anymore.
+ *
+ * if ((vctxt->pctxt == NULL) &&
+ * (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1))
+ * return (-1);
+ */
+
+ if (xmlSchemaCheckCOSDerivedOK(ACTXT_CAST vctxt, *localType,
+ elemDecl->subtypes, set) != 0) {
+ xmlChar *str = NULL;
+
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_ELT_4_3, NULL, NULL,
+ "The type definition '%s', specified by xsi:type, is "
+ "blocked or not validly derived from the type definition "
+ "of the element declaration",
+ xmlSchemaFormatQName(&str,
+ (*localType)->targetNamespace,
+ (*localType)->name),
+ NULL);
+ FREE_AND_NULL(str);
+ ret = vctxt->err;
+ *localType = NULL;
+ }
+ }
+ }
+exit:
+ ACTIVATE_ELEM;
+ return (ret);
+internal_error:
+ ACTIVATE_ELEM;
+ return (-1);
+}
+
+static int
+xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaElementPtr elemDecl = vctxt->inode->decl;
+ xmlSchemaTypePtr actualType;
+
+ /*
+ * cvc-elt (3.3.4) : 1
+ */
+ if (elemDecl == NULL) {
+ VERROR(XML_SCHEMAV_CVC_ELT_1, NULL,
+ "No matching declaration available");
+ return (vctxt->err);
+ }
+ actualType = WXS_ELEM_TYPEDEF(elemDecl);
+ /*
+ * cvc-elt (3.3.4) : 2
+ */
+ if (elemDecl->flags & XML_SCHEMAS_ELEM_ABSTRACT) {
+ VERROR(XML_SCHEMAV_CVC_ELT_2, NULL,
+ "The element declaration is abstract");
+ return (vctxt->err);
+ }
+ if (actualType == NULL) {
+ VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
+ "The type definition is absent");
+ return (XML_SCHEMAV_CVC_TYPE_1);
+ }
+ if (vctxt->nbAttrInfos != 0) {
+ int ret;
+ xmlSchemaAttrInfoPtr iattr;
+ /*
+ * cvc-elt (3.3.4) : 3
+ * Handle 'xsi:nil'.
+ */
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_NIL);
+ if (iattr) {
+ ACTIVATE_ATTRIBUTE(iattr);
+ /*
+ * Validate the value.
+ */
+ ret = xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST vctxt, NULL,
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_BOOLEAN),
+ iattr->value, &(iattr->val), 1, 0, 0);
+ ACTIVATE_ELEM;
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidateElemDecl",
+ "calling xmlSchemaVCheckCVCSimpleType() to "
+ "validate the attribute 'xsi:nil'");
+ return (-1);
+ }
+ if (ret == 0) {
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_NILLABLE) == 0) {
+ /*
+ * cvc-elt (3.3.4) : 3.1
+ */
+ VERROR(XML_SCHEMAV_CVC_ELT_3_1, NULL,
+ "The element is not 'nillable'");
+ /* Does not return an error on purpose. */
+ } else {
+ if (xmlSchemaValueGetAsBoolean(iattr->val)) {
+ /*
+ * cvc-elt (3.3.4) : 3.2.2
+ */
+ if ((elemDecl->flags & XML_SCHEMAS_ELEM_FIXED) &&
+ (elemDecl->value != NULL)) {
+ VERROR(XML_SCHEMAV_CVC_ELT_3_2_2, NULL,
+ "The element cannot be 'nilled' because "
+ "there is a fixed value constraint defined "
+ "for it");
+ /* Does not return an error on purpose. */
+ } else
+ vctxt->inode->flags |=
+ XML_SCHEMA_ELEM_INFO_NILLED;
+ }
+ }
+ }
+ }
+ /*
+ * cvc-elt (3.3.4) : 4
+ * Handle 'xsi:type'.
+ */
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_TYPE);
+ if (iattr) {
+ xmlSchemaTypePtr localType = NULL;
+
+ ret = xmlSchemaProcessXSIType(vctxt, iattr, &localType,
+ elemDecl);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaValidateElemDecl",
+ "calling xmlSchemaProcessXSIType() to "
+ "process the attribute 'xsi:type'");
+ return (-1);
+ }
+ /* Does not return an error on purpose. */
+ }
+ if (localType != NULL) {
+ vctxt->inode->flags |= XML_SCHEMA_ELEM_INFO_LOCAL_TYPE;
+ actualType = localType;
+ }
+ }
+ }
+ /*
+ * IDC: Register identity-constraint XPath matchers.
+ */
+ if ((elemDecl->idcs != NULL) &&
+ (xmlSchemaIDCRegisterMatchers(vctxt, elemDecl) == -1))
+ return (-1);
+ /*
+ * No actual type definition.
+ */
+ if (actualType == NULL) {
+ VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
+ "The type definition is absent");
+ return (XML_SCHEMAV_CVC_TYPE_1);
+ }
+ /*
+ * Remember the actual type definition.
+ */
+ vctxt->inode->typeDef = actualType;
+
+ return (0);
+}
+
+static int
+xmlSchemaVAttributesSimple(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaAttrInfoPtr iattr;
+ int ret = 0, i;
+
+ /*
+ * SPEC cvc-type (3.1.1)
+ * "The attributes of must be empty, excepting those whose namespace
+ * name is identical to http://www.w3.org/2001/XMLSchema-instance and
+ * whose local name is one of type, nil, schemaLocation or
+ * noNamespaceSchemaLocation."
+ */
+ if (vctxt->nbAttrInfos == 0)
+ return (0);
+ for (i = 0; i < vctxt->nbAttrInfos; i++) {
+ iattr = vctxt->attrInfos[i];
+ if (! iattr->metaType) {
+ ACTIVATE_ATTRIBUTE(iattr)
+ xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_TYPE_3_1_1, iattr, NULL);
+ ret = XML_SCHEMAV_CVC_TYPE_3_1_1;
+ }
+ }
+ ACTIVATE_ELEM
+ return (ret);
+}
+
+/*
+* Cleanup currently used attribute infos.
+*/
+static void
+xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt)
+{
+ int i;
+ xmlSchemaAttrInfoPtr attr;
+
+ if (vctxt->nbAttrInfos == 0)
+ return;
+ for (i = 0; i < vctxt->nbAttrInfos; i++) {
+ attr = vctxt->attrInfos[i];
+ if (attr->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) {
+ if (attr->localName != NULL)
+ xmlFree((xmlChar *) attr->localName);
+ if (attr->nsName != NULL)
+ xmlFree((xmlChar *) attr->nsName);
+ }
+ if (attr->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) {
+ if (attr->value != NULL)
+ xmlFree((xmlChar *) attr->value);
+ }
+ if (attr->val != NULL) {
+ xmlSchemaFreeValue(attr->val);
+ attr->val = NULL;
+ }
+ memset(attr, 0, sizeof(xmlSchemaAttrInfo));
+ }
+ vctxt->nbAttrInfos = 0;
+}
+
+/*
+* 3.4.4 Complex Type Definition Validation Rules
+* Element Locally Valid (Complex Type) (cvc-complex-type)
+* 3.2.4 Attribute Declaration Validation Rules
+* Validation Rule: Attribute Locally Valid (cvc-attribute)
+* Attribute Locally Valid (Use) (cvc-au)
+*
+* Only "assessed" attribute information items will be visible to
+* IDCs. I.e. not "lax" (without declaration) and "skip" wild attributes.
+*/
+static int
+xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaTypePtr type = vctxt->inode->typeDef;
+ xmlSchemaItemListPtr attrUseList;
+ xmlSchemaAttributeUsePtr attrUse = NULL;
+ xmlSchemaAttributePtr attrDecl = NULL;
+ xmlSchemaAttrInfoPtr iattr, tmpiattr;
+ int i, j, found, nbAttrs, nbUses;
+ int xpathRes = 0, res, wildIDs = 0, fixed;
+ xmlNodePtr defAttrOwnerElem = NULL;
+
+ /*
+ * SPEC (cvc-attribute)
+ * (1) "The declaration must not be `absent` (see Missing
+ * Sub-components ($5.3) for how this can fail to be
+ * the case)."
+ * (2) "Its {type definition} must not be absent."
+ *
+ * NOTE (1) + (2): This is not handled here, since we currently do not
+ * allow validation against schemas which have missing sub-components.
+ *
+ * SPEC (cvc-complex-type)
+ * (3) "For each attribute information item in the element information
+ * item's [attributes] excepting those whose [namespace name] is
+ * identical to http://www.w3.org/2001/XMLSchema-instance and whose
+ * [local name] is one of type, nil, schemaLocation or
+ * noNamespaceSchemaLocation, the appropriate case among the following
+ * must be true:
+ *
+ */
+ attrUseList = (xmlSchemaItemListPtr) type->attrUses;
+ /*
+ * @nbAttrs is the number of attributes present in the instance.
+ */
+ nbAttrs = vctxt->nbAttrInfos;
+ if (attrUseList != NULL)
+ nbUses = attrUseList->nbItems;
+ else
+ nbUses = 0;
+ for (i = 0; i < nbUses; i++) {
+ found = 0;
+ attrUse = attrUseList->items[i];
+ attrDecl = WXS_ATTRUSE_DECL(attrUse);
+ for (j = 0; j < nbAttrs; j++) {
+ iattr = vctxt->attrInfos[j];
+ /*
+ * SPEC (cvc-complex-type) (3)
+ * Skip meta attributes.
+ */
+ if (iattr->metaType)
+ continue;
+ if (iattr->localName[0] != attrDecl->name[0])
+ continue;
+ if (!xmlStrEqual(iattr->localName, attrDecl->name))
+ continue;
+ if (!xmlStrEqual(iattr->nsName, attrDecl->targetNamespace))
+ continue;
+ found = 1;
+ /*
+ * SPEC (cvc-complex-type)
+ * (3.1) "If there is among the {attribute uses} an attribute
+ * use with an {attribute declaration} whose {name} matches
+ * the attribute information item's [local name] and whose
+ * {target namespace} is identical to the attribute information
+ * item's [namespace name] (where an `absent` {target namespace}
+ * is taken to be identical to a [namespace name] with no value),
+ * then the attribute information must be `valid` with respect
+ * to that attribute use as per Attribute Locally Valid (Use)
+ * ($3.5.4). In this case the {attribute declaration} of that
+ * attribute use is the `context-determined declaration` for the
+ * attribute information item with respect to Schema-Validity
+ * Assessment (Attribute) ($3.2.4) and
+ * Assessment Outcome (Attribute) ($3.2.5).
+ */
+ iattr->state = XML_SCHEMAS_ATTR_ASSESSED;
+ iattr->use = attrUse;
+ /*
+ * Context-determined declaration.
+ */
+ iattr->decl = attrDecl;
+ iattr->typeDef = attrDecl->subtypes;
+ break;
+ }
+
+ if (found)
+ continue;
+
+ if (attrUse->occurs == XML_SCHEMAS_ATTR_USE_REQUIRED) {
+ /*
+ * Handle non-existent, required attributes.
+ *
+ * SPEC (cvc-complex-type)
+ * (4) "The {attribute declaration} of each attribute use in
+ * the {attribute uses} whose {required} is true matches one
+ * of the attribute information items in the element information
+ * item's [attributes] as per clause 3.1 above."
+ */
+ tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt);
+ if (tmpiattr == NULL) {
+ VERROR_INT(
+ "xmlSchemaVAttributesComplex",
+ "calling xmlSchemaGetFreshAttrInfo()");
+ return (-1);
+ }
+ tmpiattr->state = XML_SCHEMAS_ATTR_ERR_MISSING;
+ tmpiattr->use = attrUse;
+ tmpiattr->decl = attrDecl;
+ } else if ((attrUse->occurs == XML_SCHEMAS_ATTR_USE_OPTIONAL) &&
+ ((attrUse->defValue != NULL) ||
+ (attrDecl->defValue != NULL))) {
+ /*
+ * Handle non-existent, optional, default/fixed attributes.
+ */
+ tmpiattr = xmlSchemaGetFreshAttrInfo(vctxt);
+ if (tmpiattr == NULL) {
+ VERROR_INT(
+ "xmlSchemaVAttributesComplex",
+ "calling xmlSchemaGetFreshAttrInfo()");
+ return (-1);
+ }
+ tmpiattr->state = XML_SCHEMAS_ATTR_DEFAULT;
+ tmpiattr->use = attrUse;
+ tmpiattr->decl = attrDecl;
+ tmpiattr->typeDef = attrDecl->subtypes;
+ tmpiattr->localName = attrDecl->name;
+ tmpiattr->nsName = attrDecl->targetNamespace;
+ }
+ }
+
+ if (vctxt->nbAttrInfos == 0)
+ return (0);
+ /*
+ * Validate against the wildcard.
+ */
+ if (type->attributeWildcard != NULL) {
+ /*
+ * SPEC (cvc-complex-type)
+ * (3.2.1) "There must be an {attribute wildcard}."
+ */
+ for (i = 0; i < nbAttrs; i++) {
+ iattr = vctxt->attrInfos[i];
+ /*
+ * SPEC (cvc-complex-type) (3)
+ * Skip meta attributes.
+ */
+ if (iattr->state != XML_SCHEMAS_ATTR_UNKNOWN)
+ continue;
+ /*
+ * SPEC (cvc-complex-type)
+ * (3.2.2) "The attribute information item must be `valid` with
+ * respect to it as defined in Item Valid (Wildcard) ($3.10.4)."
+ *
+ * SPEC Item Valid (Wildcard) (cvc-wildcard)
+ * "... its [namespace name] must be `valid` with respect to
+ * the wildcard constraint, as defined in Wildcard allows
+ * Namespace Name ($3.10.4)."
+ */
+ if (xmlSchemaCheckCVCWildcardNamespace(type->attributeWildcard,
+ iattr->nsName) == 0) {
+ /*
+ * Handle processContents.
+ *
+ * SPEC (cvc-wildcard):
+ * processContents | context-determined declaration:
+ * "strict" "mustFind"
+ * "lax" "none"
+ * "skip" "skip"
+ */
+ if (type->attributeWildcard->processContents ==
+ XML_SCHEMAS_ANY_SKIP) {
+ /*
+ * context-determined declaration = "skip"
+ *
+ * SPEC PSVI Assessment Outcome (Attribute)
+ * [validity] = "notKnown"
+ * [validation attempted] = "none"
+ */
+ iattr->state = XML_SCHEMAS_ATTR_WILD_SKIP;
+ continue;
+ }
+ /*
+ * Find an attribute declaration.
+ */
+ iattr->decl = xmlSchemaGetAttributeDecl(vctxt->schema,
+ iattr->localName, iattr->nsName);
+ if (iattr->decl != NULL) {
+ iattr->state = XML_SCHEMAS_ATTR_ASSESSED;
+ /*
+ * SPEC (cvc-complex-type)
+ * (5) "Let [Definition:] the wild IDs be the set of
+ * all attribute information item to which clause 3.2
+ * applied and whose `validation` resulted in a
+ * `context-determined declaration` of mustFind or no
+ * `context-determined declaration` at all, and whose
+ * [local name] and [namespace name] resolve (as
+ * defined by QName resolution (Instance) ($3.15.4)) to
+ * an attribute declaration whose {type definition} is
+ * or is derived from ID. Then all of the following
+ * must be true:"
+ */
+ iattr->typeDef = WXS_ATTR_TYPEDEF(iattr->decl);
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ iattr->typeDef, XML_SCHEMAS_ID)) {
+ /*
+ * SPEC (5.1) "There must be no more than one
+ * item in `wild IDs`."
+ */
+ if (wildIDs != 0) {
+ /* VAL TODO */
+ iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_DUPLICATE_ID;
+ TODO
+ continue;
+ }
+ wildIDs++;
+ /*
+ * SPEC (cvc-complex-type)
+ * (5.2) "If `wild IDs` is non-empty, there must not
+ * be any attribute uses among the {attribute uses}
+ * whose {attribute declaration}'s {type definition}
+ * is or is derived from ID."
+ */
+ if (attrUseList != NULL) {
+ for (j = 0; j < attrUseList->nbItems; j++) {
+ if (xmlSchemaIsDerivedFromBuiltInType(
+ WXS_ATTRUSE_TYPEDEF(attrUseList->items[j]),
+ XML_SCHEMAS_ID)) {
+ /* URGENT VAL TODO: implement */
+ iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_AND_USE_ID;
+ TODO
+ break;
+ }
+ }
+ }
+ }
+ } else if (type->attributeWildcard->processContents ==
+ XML_SCHEMAS_ANY_LAX) {
+ iattr->state = XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL;
+ /*
+ * SPEC PSVI Assessment Outcome (Attribute)
+ * [validity] = "notKnown"
+ * [validation attempted] = "none"
+ */
+ } else {
+ iattr->state = XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL;
+ }
+ }
+ }
+ }
+
+ if (vctxt->nbAttrInfos == 0)
+ return (0);
+
+ /*
+ * Get the owner element; needed for creation of default attributes.
+ * This fixes bug #341337, reported by David Grohmann.
+ */
+ if (vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) {
+ xmlSchemaNodeInfoPtr ielem = vctxt->elemInfos[vctxt->depth];
+ if (ielem && ielem->node && ielem->node->doc)
+ defAttrOwnerElem = ielem->node;
+ }
+ /*
+ * Validate values, create default attributes, evaluate IDCs.
+ */
+ for (i = 0; i < vctxt->nbAttrInfos; i++) {
+ iattr = vctxt->attrInfos[i];
+ /*
+ * VAL TODO: Note that we won't try to resolve IDCs to
+ * "lax" and "skip" validated attributes. Check what to
+ * do in this case.
+ */
+ if ((iattr->state != XML_SCHEMAS_ATTR_ASSESSED) &&
+ (iattr->state != XML_SCHEMAS_ATTR_DEFAULT))
+ continue;
+ /*
+ * VAL TODO: What to do if the type definition is missing?
+ */
+ if (iattr->typeDef == NULL) {
+ iattr->state = XML_SCHEMAS_ATTR_ERR_NO_TYPE;
+ continue;
+ }
+
+ ACTIVATE_ATTRIBUTE(iattr);
+ fixed = 0;
+ xpathRes = 0;
+
+ if (vctxt->xpathStates != NULL) {
+ /*
+ * Evaluate IDCs.
+ */
+ xpathRes = xmlSchemaXPathEvaluate(vctxt,
+ XML_ATTRIBUTE_NODE);
+ if (xpathRes == -1) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "calling xmlSchemaXPathEvaluate()");
+ goto internal_error;
+ }
+ }
+
+ if (iattr->state == XML_SCHEMAS_ATTR_DEFAULT) {
+ /*
+ * Default/fixed attributes.
+ * We need the value only if we need to resolve IDCs or
+ * will create default attributes.
+ */
+ if ((xpathRes) || (defAttrOwnerElem)) {
+ if (iattr->use->defValue != NULL) {
+ iattr->value = (xmlChar *) iattr->use->defValue;
+ iattr->val = iattr->use->defVal;
+ } else {
+ iattr->value = (xmlChar *) iattr->decl->defValue;
+ iattr->val = iattr->decl->defVal;
+ }
+ /*
+ * IDCs will consume the precomputed default value,
+ * so we need to clone it.
+ */
+ if (iattr->val == NULL) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "default/fixed value on an attribute use was "
+ "not precomputed");
+ goto internal_error;
+ }
+ iattr->val = xmlSchemaCopyValue(iattr->val);
+ if (iattr->val == NULL) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "calling xmlSchemaCopyValue()");
+ goto internal_error;
+ }
+ }
+ /*
+ * PSVI: Add the default attribute to the current element.
+ * VAL TODO: Should we use the *normalized* value? This currently
+ * uses the *initial* value.
+ */
+
+ if (defAttrOwnerElem) {
+ xmlChar *normValue;
+ const xmlChar *value;
+
+ value = iattr->value;
+ /*
+ * Normalize the value.
+ */
+ normValue = xmlSchemaNormalizeValue(iattr->typeDef,
+ iattr->value);
+ if (normValue != NULL)
+ value = BAD_CAST normValue;
+
+ if (iattr->nsName == NULL) {
+ if (xmlNewProp(defAttrOwnerElem,
+ iattr->localName, value) == NULL) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "callling xmlNewProp()");
+ if (normValue != NULL)
+ xmlFree(normValue);
+ goto internal_error;
+ }
+ } else {
+ xmlNsPtr ns;
+
+ ns = xmlSearchNsByHref(defAttrOwnerElem->doc,
+ defAttrOwnerElem, iattr->nsName);
+ if (ns == NULL) {
+ xmlChar prefix[12];
+ int counter = 0;
+
+ /*
+ * Create a namespace declaration on the validation
+ * root node if no namespace declaration is in scope.
+ */
+ do {
+ snprintf((char *) prefix, 12, "p%d", counter++);
+ ns = xmlSearchNs(defAttrOwnerElem->doc,
+ defAttrOwnerElem, BAD_CAST prefix);
+ if (counter > 1000) {
+ VERROR_INT(
+ "xmlSchemaVAttributesComplex",
+ "could not compute a ns prefix for a "
+ "default/fixed attribute");
+ if (normValue != NULL)
+ xmlFree(normValue);
+ goto internal_error;
+ }
+ } while (ns != NULL);
+ ns = xmlNewNs(vctxt->validationRoot,
+ iattr->nsName, BAD_CAST prefix);
+ }
+ /*
+ * TODO:
+ * http://lists.w3.org/Archives/Public/www-xml-schema-comments/2005JulSep/0406.html
+ * If we have QNames: do we need to ensure there's a
+ * prefix defined for the QName?
+ */
+ xmlNewNsProp(defAttrOwnerElem, ns, iattr->localName, value);
+ }
+ if (normValue != NULL)
+ xmlFree(normValue);
+ }
+ /*
+ * Go directly to IDC evaluation.
+ */
+ goto eval_idcs;
+ }
+ /*
+ * Validate the value.
+ */
+ if (vctxt->value != NULL) {
+ /*
+ * Free last computed value; just for safety reasons.
+ */
+ xmlSchemaFreeValue(vctxt->value);
+ vctxt->value = NULL;
+ }
+ /*
+ * Note that the attribute *use* can be unavailable, if
+ * the attribute was a wild attribute.
+ */
+ if ((iattr->decl->flags & XML_SCHEMAS_ATTR_FIXED) ||
+ ((iattr->use != NULL) &&
+ (iattr->use->flags & XML_SCHEMAS_ATTR_FIXED)))
+ fixed = 1;
+ else
+ fixed = 0;
+ /*
+ * SPEC (cvc-attribute)
+ * (3) "The item's `normalized value` must be locally `valid`
+ * with respect to that {type definition} as per
+ * String Valid ($3.14.4)."
+ *
+ * VAL TODO: Do we already have the
+ * "normalized attribute value" here?
+ */
+ if (xpathRes || fixed) {
+ iattr->flags |= XML_SCHEMA_NODE_INFO_VALUE_NEEDED;
+ /*
+ * Request a computed value.
+ */
+ res = xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST vctxt,
+ iattr->node, iattr->typeDef, iattr->value, &(iattr->val),
+ 1, 1, 0);
+ } else {
+ res = xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST vctxt,
+ iattr->node, iattr->typeDef, iattr->value, NULL,
+ 1, 0, 0);
+ }
+
+ if (res != 0) {
+ if (res == -1) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "calling xmlSchemaStreamValidateSimpleTypeValue()");
+ goto internal_error;
+ }
+ iattr->state = XML_SCHEMAS_ATTR_INVALID_VALUE;
+ /*
+ * SPEC PSVI Assessment Outcome (Attribute)
+ * [validity] = "invalid"
+ */
+ goto eval_idcs;
+ }
+
+ if (fixed) {
+ /*
+ * SPEC Attribute Locally Valid (Use) (cvc-au)
+ * "For an attribute information item to be `valid`
+ * with respect to an attribute use its *normalized*
+ * value must match the *canonical* lexical
+ * representation of the attribute use's {value
+ * constraint}value, if it is present and fixed."
+ *
+ * VAL TODO: The requirement for the *canonical* value
+ * will be removed in XML Schema 1.1.
+ */
+ /*
+ * SPEC Attribute Locally Valid (cvc-attribute)
+ * (4) "The item's *actual* value must match the *value* of
+ * the {value constraint}, if it is present and fixed."
+ */
+ if (iattr->val == NULL) {
+ /* VAL TODO: A value was not precomputed. */
+ TODO
+ goto eval_idcs;
+ }
+ if ((iattr->use != NULL) &&
+ (iattr->use->defValue != NULL)) {
+ if (iattr->use->defVal == NULL) {
+ /* VAL TODO: A default value was not precomputed. */
+ TODO
+ goto eval_idcs;
+ }
+ iattr->vcValue = iattr->use->defValue;
+ /*
+ if (xmlSchemaCompareValuesWhtsp(attr->val,
+ (xmlSchemaWhitespaceValueType) ws,
+ attr->use->defVal,
+ (xmlSchemaWhitespaceValueType) ws) != 0) {
+ */
+ if (! xmlSchemaAreValuesEqual(iattr->val, iattr->use->defVal))
+ iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
+ } else {
+ if (iattr->decl->defVal == NULL) {
+ /* VAL TODO: A default value was not precomputed. */
+ TODO
+ goto eval_idcs;
+ }
+ iattr->vcValue = iattr->decl->defValue;
+ /*
+ if (xmlSchemaCompareValuesWhtsp(attr->val,
+ (xmlSchemaWhitespaceValueType) ws,
+ attrDecl->defVal,
+ (xmlSchemaWhitespaceValueType) ws) != 0) {
+ */
+ if (! xmlSchemaAreValuesEqual(iattr->val, iattr->decl->defVal))
+ iattr->state = XML_SCHEMAS_ATTR_ERR_FIXED_VALUE;
+ }
+ /*
+ * [validity] = "valid"
+ */
+ }
+eval_idcs:
+ /*
+ * Evaluate IDCs.
+ */
+ if (xpathRes) {
+ if (xmlSchemaXPathProcessHistory(vctxt,
+ vctxt->depth +1) == -1) {
+ VERROR_INT("xmlSchemaVAttributesComplex",
+ "calling xmlSchemaXPathEvaluate()");
+ goto internal_error;
+ }
+ } else if (vctxt->xpathStates != NULL)
+ xmlSchemaXPathPop(vctxt);
+ }
+
+ /*
+ * Report errors.
+ */
+ for (i = 0; i < vctxt->nbAttrInfos; i++) {
+ iattr = vctxt->attrInfos[i];
+ if ((iattr->state == XML_SCHEMAS_ATTR_META) ||
+ (iattr->state == XML_SCHEMAS_ATTR_ASSESSED) ||
+ (iattr->state == XML_SCHEMAS_ATTR_WILD_SKIP) ||
+ (iattr->state == XML_SCHEMAS_ATTR_WILD_LAX_NO_DECL))
+ continue;
+ ACTIVATE_ATTRIBUTE(iattr);
+ switch (iattr->state) {
+ case XML_SCHEMAS_ATTR_ERR_MISSING: {
+ xmlChar *str = NULL;
+ ACTIVATE_ELEM;
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, NULL, NULL,
+ "The attribute '%s' is required but missing",
+ xmlSchemaFormatQName(&str,
+ iattr->decl->targetNamespace,
+ iattr->decl->name),
+ NULL);
+ FREE_AND_NULL(str)
+ break;
+ }
+ case XML_SCHEMAS_ATTR_ERR_NO_TYPE:
+ VERROR(XML_SCHEMAV_CVC_ATTRIBUTE_2, NULL,
+ "The type definition is absent");
+ break;
+ case XML_SCHEMAS_ATTR_ERR_FIXED_VALUE:
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_AU, NULL, NULL,
+ "The value '%s' does not match the fixed "
+ "value constraint '%s'",
+ iattr->value, iattr->vcValue);
+ break;
+ case XML_SCHEMAS_ATTR_ERR_WILD_STRICT_NO_DECL:
+ VERROR(XML_SCHEMAV_CVC_WILDCARD, NULL,
+ "No matching global attribute declaration available, but "
+ "demanded by the strict wildcard");
+ break;
+ case XML_SCHEMAS_ATTR_UNKNOWN:
+ if (iattr->metaType)
+ break;
+ /*
+ * MAYBE VAL TODO: One might report different error messages
+ * for the following errors.
+ */
+ if (type->attributeWildcard == NULL) {
+ xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, iattr, NULL);
+ } else {
+ xmlSchemaIllegalAttrErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, iattr, NULL);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ ACTIVATE_ELEM;
+ return (0);
+internal_error:
+ ACTIVATE_ELEM;
+ return (-1);
+}
+
+static int
+xmlSchemaValidateElemWildcard(xmlSchemaValidCtxtPtr vctxt,
+ int *skip)
+{
+ xmlSchemaWildcardPtr wild = (xmlSchemaWildcardPtr) vctxt->inode->decl;
+ /*
+ * The namespace of the element was already identified to be
+ * matching the wildcard.
+ */
+ if ((skip == NULL) || (wild == NULL) ||
+ (wild->type != XML_SCHEMA_TYPE_ANY)) {
+ VERROR_INT("xmlSchemaValidateElemWildcard",
+ "bad arguments");
+ return (-1);
+ }
+ *skip = 0;
+ if (wild->processContents == XML_SCHEMAS_ANY_SKIP) {
+ /*
+ * URGENT VAL TODO: Either we need to position the stream to the
+ * next sibling, or walk the whole subtree.
+ */
+ *skip = 1;
+ return (0);
+ }
+ {
+ xmlSchemaElementPtr decl = NULL;
+
+ decl = xmlSchemaGetElem(vctxt->schema,
+ vctxt->inode->localName, vctxt->inode->nsName);
+ if (decl != NULL) {
+ vctxt->inode->decl = decl;
+ return (0);
+ }
+ }
+ if (wild->processContents == XML_SCHEMAS_ANY_STRICT) {
+ /* VAL TODO: Change to proper error code. */
+ VERROR(XML_SCHEMAV_CVC_ELT_1, NULL, /* WXS_BASIC_CAST wild */
+ "No matching global element declaration available, but "
+ "demanded by the strict wildcard");
+ return (vctxt->err);
+ }
+ if (vctxt->nbAttrInfos != 0) {
+ xmlSchemaAttrInfoPtr iattr;
+ /*
+ * SPEC Validation Rule: Schema-Validity Assessment (Element)
+ * (1.2.1.2.1) - (1.2.1.2.3 )
+ *
+ * Use the xsi:type attribute for the type definition.
+ */
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_TYPE);
+ if (iattr != NULL) {
+ if (xmlSchemaProcessXSIType(vctxt, iattr,
+ &(vctxt->inode->typeDef), NULL) == -1) {
+ VERROR_INT("xmlSchemaValidateElemWildcard",
+ "calling xmlSchemaProcessXSIType() to "
+ "process the attribute 'xsi:nil'");
+ return (-1);
+ }
+ /*
+ * Don't return an error on purpose.
+ */
+ return (0);
+ }
+ }
+ /*
+ * SPEC Validation Rule: Schema-Validity Assessment (Element)
+ *
+ * Fallback to "anyType".
+ */
+ vctxt->inode->typeDef =
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
+ return (0);
+}
+
+/*
+* xmlSchemaCheckCOSValidDefault:
+*
+* This will be called if: not nilled, no content and a default/fixed
+* value is provided.
+*/
+
+static int
+xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
+ const xmlChar *value,
+ xmlSchemaValPtr *val)
+{
+ int ret = 0;
+ xmlSchemaNodeInfoPtr inode = vctxt->inode;
+
+ /*
+ * cos-valid-default:
+ * Schema Component Constraint: Element Default Valid (Immediate)
+ * For a string to be a valid default with respect to a type
+ * definition the appropriate case among the following must be true:
+ */
+ if WXS_IS_COMPLEX(inode->typeDef) {
+ /*
+ * Complex type.
+ *
+ * SPEC (2.1) "its {content type} must be a simple type definition
+ * or mixed."
+ * SPEC (2.2.2) "If the {content type} is mixed, then the {content
+ * type}'s particle must be `emptiable` as defined by
+ * Particle Emptiable ($3.9.6)."
+ */
+ if ((! WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) &&
+ ((! WXS_HAS_MIXED_CONTENT(inode->typeDef)) ||
+ (! WXS_EMPTIABLE(inode->typeDef)))) {
+ ret = XML_SCHEMAP_COS_VALID_DEFAULT_2_1;
+ /* NOTE that this covers (2.2.2) as well. */
+ VERROR(ret, NULL,
+ "For a string to be a valid default, the type definition "
+ "must be a simple type or a complex type with simple content "
+ "or mixed content and a particle emptiable");
+ return(ret);
+ }
+ }
+ /*
+ * 1 If the type definition is a simple type definition, then the string
+ * must be `valid` with respect to that definition as defined by String
+ * Valid ($3.14.4).
+ *
+ * AND
+ *
+ * 2.2.1 If the {content type} is a simple type definition, then the
+ * string must be `valid` with respect to that simple type definition
+ * as defined by String Valid ($3.14.4).
+ */
+ if (WXS_IS_SIMPLE(inode->typeDef)) {
+
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt,
+ NULL, inode->typeDef, value, val, 1, 1, 0);
+
+ } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
+
+ ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST vctxt,
+ NULL, inode->typeDef->contentTypeDef, value, val, 1, 1, 0);
+ }
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaCheckCOSValidDefault",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ }
+ return (ret);
+}
+
+static void
+xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED,
+ xmlSchemaElementPtr item,
+ xmlSchemaNodeInfoPtr inode)
+{
+ inode->decl = item;
+#ifdef DEBUG_CONTENT
+ {
+ xmlChar *str = NULL;
+
+ if (item->type == XML_SCHEMA_TYPE_ELEMENT) {
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON callback for '%s' [declaration]\n",
+ xmlSchemaFormatQName(&str,
+ inode->localName, inode->nsName));
+ } else {
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON callback for '%s' [wildcard]\n",
+ xmlSchemaFormatQName(&str,
+ inode->localName, inode->nsName));
+
+ }
+ FREE_AND_NULL(str)
+ }
+#endif
+}
+
+static int
+xmlSchemaValidatorPushElem(xmlSchemaValidCtxtPtr vctxt)
+{
+ vctxt->inode = xmlSchemaGetFreshElemInfo(vctxt);
+ if (vctxt->inode == NULL) {
+ VERROR_INT("xmlSchemaValidatorPushElem",
+ "calling xmlSchemaGetFreshElemInfo()");
+ return (-1);
+ }
+ vctxt->nbAttrInfos = 0;
+ return (0);
+}
+
+static int
+xmlSchemaVCheckINodeDataType(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaNodeInfoPtr inode,
+ xmlSchemaTypePtr type,
+ const xmlChar *value)
+{
+ if (inode->flags & XML_SCHEMA_NODE_INFO_VALUE_NEEDED)
+ return (xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST vctxt, NULL,
+ type, value, &(inode->val), 1, 1, 0));
+ else
+ return (xmlSchemaVCheckCVCSimpleType(
+ ACTXT_CAST vctxt, NULL,
+ type, value, NULL, 1, 0, 0));
+}
+
+
+
+/*
+* Process END of element.
+*/
+static int
+xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
+{
+ int ret = 0;
+ xmlSchemaNodeInfoPtr inode = vctxt->inode;
+
+ if (vctxt->nbAttrInfos != 0)
+ xmlSchemaClearAttrInfos(vctxt);
+ if (inode->flags & XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED) {
+ /*
+ * This element was not expected;
+ * we will not validate child elements of broken parents.
+ * Skip validation of all content of the parent.
+ */
+ vctxt->skipDepth = vctxt->depth -1;
+ goto end_elem;
+ }
+ if ((inode->typeDef == NULL) ||
+ (inode->flags & XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE)) {
+ /*
+ * 1. the type definition might be missing if the element was
+ * error prone
+ * 2. it might be abstract.
+ */
+ goto end_elem;
+ }
+ /*
+ * Check the content model.
+ */
+ if ((inode->typeDef->contentType == XML_SCHEMA_CONTENT_MIXED) ||
+ (inode->typeDef->contentType == XML_SCHEMA_CONTENT_ELEMENTS)) {
+
+ /*
+ * Workaround for "anyType".
+ */
+ if (inode->typeDef->builtInType == XML_SCHEMAS_ANYTYPE)
+ goto character_content;
+
+ if ((inode->flags & XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT) == 0) {
+ xmlChar *values[10];
+ int terminal, nbval = 10, nbneg;
+
+ if (inode->regexCtxt == NULL) {
+ /*
+ * Create the regex context.
+ */
+ inode->regexCtxt =
+ xmlRegNewExecCtxt(inode->typeDef->contModel,
+ (xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
+ vctxt);
+ if (inode->regexCtxt == NULL) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "failed to create a regex context");
+ goto internal_error;
+ }
+#ifdef DEBUG_AUTOMATA
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON create on '%s'\n", inode->localName);
+#endif
+ }
+
+ /*
+ * Do not check further content if the node has been nilled
+ */
+ if (INODE_NILLED(inode)) {
+ ret = 0;
+#ifdef DEBUG_AUTOMATA
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON succeeded on nilled '%s'\n",
+ inode->localName);
+#endif
+ goto skip_nilled;
+ }
+
+ /*
+ * Get hold of the still expected content, since a further
+ * call to xmlRegExecPushString() will loose this information.
+ */
+ xmlRegExecNextValues(inode->regexCtxt,
+ &nbval, &nbneg, &values[0], &terminal);
+ ret = xmlRegExecPushString(inode->regexCtxt, NULL, NULL);
+ if ((ret<0) || ((ret==0) && (!INODE_NILLED(inode)))) {
+ /*
+ * Still missing something.
+ */
+ ret = 1;
+ inode->flags |=
+ XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT;
+ xmlSchemaComplexTypeErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_ELEMENT_CONTENT, NULL, NULL,
+ "Missing child element(s)",
+ nbval, nbneg, values);
+#ifdef DEBUG_AUTOMATA
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON missing ERROR on '%s'\n",
+ inode->localName);
+#endif
+ } else {
+ /*
+ * Content model is satisfied.
+ */
+ ret = 0;
+#ifdef DEBUG_AUTOMATA
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON succeeded on '%s'\n",
+ inode->localName);
+#endif
+ }
+
+ }
+ }
+
+skip_nilled:
+
+ if (inode->typeDef->contentType == XML_SCHEMA_CONTENT_ELEMENTS)
+ goto end_elem;
+
+character_content:
+
+ if (vctxt->value != NULL) {
+ xmlSchemaFreeValue(vctxt->value);
+ vctxt->value = NULL;
+ }
+ /*
+ * Check character content.
+ */
+ if (inode->decl == NULL) {
+ /*
+ * Speedup if no declaration exists.
+ */
+ if (WXS_IS_SIMPLE(inode->typeDef)) {
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef, inode->value);
+ } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef->contentTypeDef,
+ inode->value);
+ }
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ goto internal_error;
+ }
+ goto end_elem;
+ }
+ /*
+ * cvc-elt (3.3.4) : 5
+ * The appropriate case among the following must be true:
+ */
+ /*
+ * cvc-elt (3.3.4) : 5.1
+ * If the declaration has a {value constraint},
+ * the item has neither element nor character [children] and
+ * clause 3.2 has not applied, then all of the following must be true:
+ */
+ if ((inode->decl->value != NULL) &&
+ (inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY) &&
+ (! INODE_NILLED(inode))) {
+ /*
+ * cvc-elt (3.3.4) : 5.1.1
+ * If the `actual type definition` is a `local type definition`
+ * then the canonical lexical representation of the {value constraint}
+ * value must be a valid default for the `actual type definition` as
+ * defined in Element Default Valid (Immediate) ($3.3.6).
+ */
+ /*
+ * NOTE: 'local' above means types acquired by xsi:type.
+ * NOTE: Although the *canonical* value is stated, it is not
+ * relevant if canonical or not. Additionally XML Schema 1.1
+ * will removed this requirement as well.
+ */
+ if (inode->flags & XML_SCHEMA_ELEM_INFO_LOCAL_TYPE) {
+
+ ret = xmlSchemaCheckCOSValidDefault(vctxt,
+ inode->decl->value, &(inode->val));
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "calling xmlSchemaCheckCOSValidDefault()");
+ goto internal_error;
+ }
+ goto end_elem;
+ }
+ /*
+ * Stop here, to avoid redundant validation of the value
+ * (see following).
+ */
+ goto default_psvi;
+ }
+ /*
+ * cvc-elt (3.3.4) : 5.1.2
+ * The element information item with the canonical lexical
+ * representation of the {value constraint} value used as its
+ * `normalized value` must be `valid` with respect to the
+ * `actual type definition` as defined by Element Locally Valid (Type)
+ * ($3.3.4).
+ */
+ if (WXS_IS_SIMPLE(inode->typeDef)) {
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef, inode->decl->value);
+ } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef->contentTypeDef,
+ inode->decl->value);
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ goto internal_error;
+ }
+ goto end_elem;
+ }
+
+default_psvi:
+ /*
+ * PSVI: Create a text node on the instance element.
+ */
+ if ((vctxt->options & XML_SCHEMA_VAL_VC_I_CREATE) &&
+ (inode->node != NULL)) {
+ xmlNodePtr textChild;
+ xmlChar *normValue;
+ /*
+ * VAL TODO: Normalize the value.
+ */
+ normValue = xmlSchemaNormalizeValue(inode->typeDef,
+ inode->decl->value);
+ if (normValue != NULL) {
+ textChild = xmlNewText(BAD_CAST normValue);
+ xmlFree(normValue);
+ } else
+ textChild = xmlNewText(inode->decl->value);
+ if (textChild == NULL) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "calling xmlNewText()");
+ goto internal_error;
+ } else
+ xmlAddChild(inode->node, textChild);
+ }
+
+ } else if (! INODE_NILLED(inode)) {
+ /*
+ * 5.2.1 The element information item must be `valid` with respect
+ * to the `actual type definition` as defined by Element Locally
+ * Valid (Type) ($3.3.4).
+ */
+ if (WXS_IS_SIMPLE(inode->typeDef)) {
+ /*
+ * SPEC (cvc-type) (3.1)
+ * "If the type definition is a simple type definition, ..."
+ * (3.1.3) "If clause 3.2 of Element Locally Valid
+ * (Element) ($3.3.4) did not apply, then the `normalized value`
+ * must be `valid` with respect to the type definition as defined
+ * by String Valid ($3.14.4).
+ */
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef, inode->value);
+ } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
+ /*
+ * SPEC (cvc-type) (3.2) "If the type definition is a complex type
+ * definition, then the element information item must be
+ * `valid` with respect to the type definition as per
+ * Element Locally Valid (Complex Type) ($3.4.4);"
+ *
+ * SPEC (cvc-complex-type) (2.2)
+ * "If the {content type} is a simple type definition, ...
+ * the `normalized value` of the element information item is
+ * `valid` with respect to that simple type definition as
+ * defined by String Valid ($3.14.4)."
+ */
+ ret = xmlSchemaVCheckINodeDataType(vctxt,
+ inode, inode->typeDef->contentTypeDef, inode->value);
+ }
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidatorPopElem",
+ "calling xmlSchemaVCheckCVCSimpleType()");
+ goto internal_error;
+ }
+ goto end_elem;
+ }
+ /*
+ * 5.2.2 If there is a fixed {value constraint} and clause 3.2 has
+ * not applied, all of the following must be true:
+ */
+ if ((inode->decl->value != NULL) &&
+ (inode->decl->flags & XML_SCHEMAS_ELEM_FIXED)) {
+
+ /*
+ * TODO: We will need a computed value, when comparison is
+ * done on computed values.
+ */
+ /*
+ * 5.2.2.1 The element information item must have no element
+ * information item [children].
+ */
+ if (inode->flags &
+ XML_SCHEMA_ELEM_INFO_HAS_ELEM_CONTENT) {
+ ret = XML_SCHEMAV_CVC_ELT_5_2_2_1;
+ VERROR(ret, NULL,
+ "The content must not containt element nodes since "
+ "there is a fixed value constraint");
+ goto end_elem;
+ } else {
+ /*
+ * 5.2.2.2 The appropriate case among the following must
+ * be true:
+ */
+ if (WXS_HAS_MIXED_CONTENT(inode->typeDef)) {
+ /*
+ * 5.2.2.2.1 If the {content type} of the `actual type
+ * definition` is mixed, then the *initial value* of the
+ * item must match the canonical lexical representation
+ * of the {value constraint} value.
+ *
+ * ... the *initial value* of an element information
+ * item is the string composed of, in order, the
+ * [character code] of each character information item in
+ * the [children] of that element information item.
+ */
+ if (! xmlStrEqual(inode->value, inode->decl->value)){
+ /*
+ * VAL TODO: Report invalid & expected values as well.
+ * VAL TODO: Implement the canonical stuff.
+ */
+ ret = XML_SCHEMAV_CVC_ELT_5_2_2_2_1;
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ ret, NULL, NULL,
+ "The initial value '%s' does not match the fixed "
+ "value constraint '%s'",
+ inode->value, inode->decl->value);
+ goto end_elem;
+ }
+ } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
+ /*
+ * 5.2.2.2.2 If the {content type} of the `actual type
+ * definition` is a simple type definition, then the
+ * *actual value* of the item must match the canonical
+ * lexical representation of the {value constraint} value.
+ */
+ /*
+ * VAL TODO: *actual value* is the normalized value, impl.
+ * this.
+ * VAL TODO: Report invalid & expected values as well.
+ * VAL TODO: Implement a comparison with the computed values.
+ */
+ if (! xmlStrEqual(inode->value,
+ inode->decl->value)) {
+ ret = XML_SCHEMAV_CVC_ELT_5_2_2_2_2;
+ xmlSchemaCustomErr(ACTXT_CAST vctxt,
+ ret, NULL, NULL,
+ "The actual value '%s' does not match the fixed "
+ "value constraint '%s'",
+ inode->value,
+ inode->decl->value);
+ goto end_elem;
+ }
+ }
+ }
+ }
+ }
+
+end_elem:
+ if (vctxt->depth < 0) {
+ /* TODO: raise error? */
+ return (0);
+ }
+ if (vctxt->depth == vctxt->skipDepth)
+ vctxt->skipDepth = -1;
+ /*
+ * Evaluate the history of XPath state objects.
+ */
+ if (inode->appliedXPath &&
+ (xmlSchemaXPathProcessHistory(vctxt, vctxt->depth) == -1))
+ goto internal_error;
+ /*
+ * MAYBE TODO:
+ * SPEC (6) "The element information item must be `valid` with
+ * respect to each of the {identity-constraint definitions} as per
+ * Identity-constraint Satisfied ($3.11.4)."
+ */
+ /*
+ * PSVI TODO: If we expose IDC node-tables via PSVI then the tables
+ * need to be built in any case.
+ * We will currently build IDC node-tables and bubble them only if
+ * keyrefs do exist.
+ */
+
+ /*
+ * Add the current IDC target-nodes to the IDC node-tables.
+ */
+ if ((inode->idcMatchers != NULL) &&
+ (vctxt->hasKeyrefs || vctxt->createIDCNodeTables))
+ {
+ if (xmlSchemaIDCFillNodeTables(vctxt, inode) == -1)
+ goto internal_error;
+ }
+ /*
+ * Validate IDC keyrefs.
+ */
+ if (vctxt->inode->hasKeyrefs)
+ if (xmlSchemaCheckCVCIDCKeyRef(vctxt) == -1)
+ goto internal_error;
+ /*
+ * Merge/free the IDC table.
+ */
+ if (inode->idcTable != NULL) {
+#ifdef DEBUG_IDC_NODE_TABLE
+ xmlSchemaDebugDumpIDCTable(stdout,
+ inode->nsName,
+ inode->localName,
+ inode->idcTable);
+#endif
+ if ((vctxt->depth > 0) &&
+ (vctxt->hasKeyrefs || vctxt->createIDCNodeTables))
+ {
+ /*
+ * Merge the IDC node table with the table of the parent node.
+ */
+ if (xmlSchemaBubbleIDCNodeTables(vctxt) == -1)
+ goto internal_error;
+ }
+ }
+ /*
+ * Clear the current ielem.
+ * VAL TODO: Don't free the PSVI IDC tables if they are
+ * requested for the PSVI.
+ */
+ xmlSchemaClearElemInfo(vctxt, inode);
+ /*
+ * Skip further processing if we are on the validation root.
+ */
+ if (vctxt->depth == 0) {
+ vctxt->depth--;
+ vctxt->inode = NULL;
+ return (0);
+ }
+ /*
+ * Reset the keyrefDepth if needed.
+ */
+ if (vctxt->aidcs != NULL) {
+ xmlSchemaIDCAugPtr aidc = vctxt->aidcs;
+ do {
+ if (aidc->keyrefDepth == vctxt->depth) {
+ /*
+ * A 'keyrefDepth' of a key/unique IDC matches the current
+ * depth, this means that we are leaving the scope of the
+ * top-most keyref IDC which refers to this IDC.
+ */
+ aidc->keyrefDepth = -1;
+ }
+ aidc = aidc->next;
+ } while (aidc != NULL);
+ }
+ vctxt->depth--;
+ vctxt->inode = vctxt->elemInfos[vctxt->depth];
+ /*
+ * VAL TODO: 7 If the element information item is the `validation root`, it must be
+ * `valid` per Validation Root Valid (ID/IDREF) ($3.3.4).
+ */
+ return (ret);
+
+internal_error:
+ vctxt->err = -1;
+ return (-1);
+}
+
+/*
+* 3.4.4 Complex Type Definition Validation Rules
+* Validation Rule: Element Locally Valid (Complex Type) (cvc-complex-type)
+*/
+static int
+xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlSchemaNodeInfoPtr pielem;
+ xmlSchemaTypePtr ptype;
+ int ret = 0;
+
+ if (vctxt->depth <= 0) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "not intended for the validation root");
+ return (-1);
+ }
+ pielem = vctxt->elemInfos[vctxt->depth -1];
+ if (pielem->flags & XML_SCHEMA_ELEM_INFO_EMPTY)
+ pielem->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY;
+ /*
+ * Handle 'nilled' elements.
+ */
+ if (INODE_NILLED(pielem)) {
+ /*
+ * SPEC (cvc-elt) (3.3.4) : (3.2.1)
+ */
+ ACTIVATE_PARENT_ELEM;
+ ret = XML_SCHEMAV_CVC_ELT_3_2_1;
+ VERROR(ret, NULL,
+ "Neither character nor element content is allowed, "
+ "because the element was 'nilled'");
+ ACTIVATE_ELEM;
+ goto unexpected_elem;
+ }
+
+ ptype = pielem->typeDef;
+
+ if (ptype->builtInType == XML_SCHEMAS_ANYTYPE) {
+ /*
+ * Workaround for "anyType": we have currently no content model
+ * assigned for "anyType", so handle it explicitely.
+ * "anyType" has an unbounded, lax "any" wildcard.
+ */
+ vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema,
+ vctxt->inode->localName,
+ vctxt->inode->nsName);
+
+ if (vctxt->inode->decl == NULL) {
+ xmlSchemaAttrInfoPtr iattr;
+ /*
+ * Process "xsi:type".
+ * SPEC (cvc-assess-elt) (1.2.1.2.1) - (1.2.1.2.3)
+ */
+ iattr = xmlSchemaGetMetaAttrInfo(vctxt,
+ XML_SCHEMA_ATTR_INFO_META_XSI_TYPE);
+ if (iattr != NULL) {
+ ret = xmlSchemaProcessXSIType(vctxt, iattr,
+ &(vctxt->inode->typeDef), NULL);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "calling xmlSchemaProcessXSIType() to "
+ "process the attribute 'xsi:nil'");
+ return (-1);
+ }
+ return (ret);
+ }
+ } else {
+ /*
+ * Fallback to "anyType".
+ *
+ * SPEC (cvc-assess-elt)
+ * "If the item cannot be `strictly assessed`, [...]
+ * an element information item's schema validity may be laxly
+ * assessed if its `context-determined declaration` is not
+ * skip by `validating` with respect to the `ur-type
+ * definition` as per Element Locally Valid (Type) ($3.3.4)."
+ */
+ vctxt->inode->typeDef =
+ xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
+ }
+ }
+ return (0);
+ }
+
+ switch (ptype->contentType) {
+ case XML_SCHEMA_CONTENT_EMPTY:
+ /*
+ * SPEC (2.1) "If the {content type} is empty, then the
+ * element information item has no character or element
+ * information item [children]."
+ */
+ ACTIVATE_PARENT_ELEM
+ ret = XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1;
+ VERROR(ret, NULL,
+ "Element content is not allowed, "
+ "because the content type is empty");
+ ACTIVATE_ELEM
+ goto unexpected_elem;
+ break;
+
+ case XML_SCHEMA_CONTENT_MIXED:
+ case XML_SCHEMA_CONTENT_ELEMENTS: {
+ xmlRegExecCtxtPtr regexCtxt;
+ xmlChar *values[10];
+ int terminal, nbval = 10, nbneg;
+
+ /* VAL TODO: Optimized "anyType" validation.*/
+
+ if (ptype->contModel == NULL) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "type has elem content but no content model");
+ return (-1);
+ }
+ /*
+ * Safety belf for evaluation if the cont. model was already
+ * examined to be invalid.
+ */
+ if (pielem->flags & XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "validating elem, but elem content is already invalid");
+ return (-1);
+ }
+
+ regexCtxt = pielem->regexCtxt;
+ if (regexCtxt == NULL) {
+ /*
+ * Create the regex context.
+ */
+ regexCtxt = xmlRegNewExecCtxt(ptype->contModel,
+ (xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
+ vctxt);
+ if (regexCtxt == NULL) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "failed to create a regex context");
+ return (-1);
+ }
+ pielem->regexCtxt = regexCtxt;
+#ifdef DEBUG_AUTOMATA
+ xmlGenericError(xmlGenericErrorContext, "AUTOMATA create on '%s'\n",
+ pielem->localName);
+#endif
+ }
+
+ /*
+ * SPEC (2.4) "If the {content type} is element-only or mixed,
+ * then the sequence of the element information item's
+ * element information item [children], if any, taken in
+ * order, is `valid` with respect to the {content type}'s
+ * particle, as defined in Element Sequence Locally Valid
+ * (Particle) ($3.9.4)."
+ */
+ ret = xmlRegExecPushString2(regexCtxt,
+ vctxt->inode->localName,
+ vctxt->inode->nsName,
+ vctxt->inode);
+#ifdef DEBUG_AUTOMATA
+ if (ret < 0)
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON push ERROR for '%s' on '%s'\n",
+ vctxt->inode->localName, pielem->localName);
+ else
+ xmlGenericError(xmlGenericErrorContext,
+ "AUTOMATON push OK for '%s' on '%s'\n",
+ vctxt->inode->localName, pielem->localName);
+#endif
+ if (vctxt->err == XML_SCHEMAV_INTERNAL) {
+ VERROR_INT("xmlSchemaValidateChildElem",
+ "calling xmlRegExecPushString2()");
+ return (-1);
+ }
+ if (ret < 0) {
+ xmlRegExecErrInfo(regexCtxt, NULL, &nbval, &nbneg,
+ &values[0], &terminal);
+ xmlSchemaComplexTypeErr(ACTXT_CAST vctxt,
+ XML_SCHEMAV_ELEMENT_CONTENT, NULL,NULL,
+ "This element is not expected",
+ nbval, nbneg, values);
+ ret = vctxt->err;
+ goto unexpected_elem;
+ } else
+ ret = 0;
+ }
+ break;
+ case XML_SCHEMA_CONTENT_SIMPLE:
+ case XML_SCHEMA_CONTENT_BASIC:
+ ACTIVATE_PARENT_ELEM
+ if (WXS_IS_COMPLEX(ptype)) {
+ /*
+ * SPEC (cvc-complex-type) (2.2)
+ * "If the {content type} is a simple type definition, then
+ * the element information item has no element information
+ * item [children], ..."
+ */
+ ret = XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2;
+ VERROR(ret, NULL, "Element content is not allowed, "
+ "because the content type is a simple type definition");
+ } else {
+ /*
+ * SPEC (cvc-type) (3.1.2) "The element information item must
+ * have no element information item [children]."
+ */
+ ret = XML_SCHEMAV_CVC_TYPE_3_1_2;
+ VERROR(ret, NULL, "Element content is not allowed, "
+ "because the type definition is simple");
+ }
+ ACTIVATE_ELEM
+ ret = vctxt->err;
+ goto unexpected_elem;
+ break;
+
+ default:
+ break;
+ }
+ return (ret);
+unexpected_elem:
+ /*
+ * Pop this element and set the skipDepth to skip
+ * all further content of the parent element.
+ */
+ vctxt->skipDepth = vctxt->depth;
+ vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_NOT_EXPECTED;
+ pielem->flags |= XML_SCHEMA_ELEM_INFO_ERR_BAD_CONTENT;
+ return (ret);
+}
+
+#define XML_SCHEMA_PUSH_TEXT_PERSIST 1
+#define XML_SCHEMA_PUSH_TEXT_CREATED 2
+#define XML_SCHEMA_PUSH_TEXT_VOLATILE 3
+
+static int
+xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt,
+ int nodeType, const xmlChar *value, int len,
+ int mode, int *consumed)
+{
+ /*
+ * Unfortunately we have to duplicate the text sometimes.
+ * OPTIMIZE: Maybe we could skip it, if:
+ * 1. content type is simple
+ * 2. whitespace is "collapse"
+ * 3. it consists of whitespace only
+ *
+ * Process character content.
+ */
+ if (consumed != NULL)
+ *consumed = 0;
+ if (INODE_NILLED(vctxt->inode)) {
+ /*
+ * SPEC cvc-elt (3.3.4 - 3.2.1)
+ * "The element information item must have no character or
+ * element information item [children]."
+ */
+ VERROR(XML_SCHEMAV_CVC_ELT_3_2_1, NULL,
+ "Neither character nor element content is allowed "
+ "because the element is 'nilled'");
+ return (vctxt->err);
+ }
+ /*
+ * SPEC (2.1) "If the {content type} is empty, then the
+ * element information item has no character or element
+ * information item [children]."
+ */
+ if (vctxt->inode->typeDef->contentType ==
+ XML_SCHEMA_CONTENT_EMPTY) {
+ VERROR(XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, NULL,
+ "Character content is not allowed, "
+ "because the content type is empty");
+ return (vctxt->err);
+ }
+
+ if (vctxt->inode->typeDef->contentType ==
+ XML_SCHEMA_CONTENT_ELEMENTS) {
+ if ((nodeType != XML_TEXT_NODE) ||
+ (! xmlSchemaIsBlank((xmlChar *) value, len))) {
+ /*
+ * SPEC cvc-complex-type (2.3)
+ * "If the {content type} is element-only, then the
+ * element information item has no character information
+ * item [children] other than those whose [character
+ * code] is defined as a white space in [XML 1.0 (Second
+ * Edition)]."
+ */
+ VERROR(XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, NULL,
+ "Character content other than whitespace is not allowed "
+ "because the content type is 'element-only'");
+ return (vctxt->err);
+ }
+ return (0);
+ }
+
+ if ((value == NULL) || (value[0] == 0))
+ return (0);
+ /*
+ * Save the value.
+ * NOTE that even if the content type is *mixed*, we need the
+ * *initial value* for default/fixed value constraints.
+ */
+ if ((vctxt->inode->typeDef->contentType == XML_SCHEMA_CONTENT_MIXED) &&
+ ((vctxt->inode->decl == NULL) ||
+ (vctxt->inode->decl->value == NULL)))
+ return (0);
+
+ if (vctxt->inode->value == NULL) {
+ /*
+ * Set the value.
+ */
+ switch (mode) {
+ case XML_SCHEMA_PUSH_TEXT_PERSIST:
+ /*
+ * When working on a tree.
+ */
+ vctxt->inode->value = value;
+ break;
+ case XML_SCHEMA_PUSH_TEXT_CREATED:
+ /*
+ * When working with the reader.
+ * The value will be freed by the element info.
+ */
+ vctxt->inode->value = value;
+ if (consumed != NULL)
+ *consumed = 1;
+ vctxt->inode->flags |=
+ XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES;
+ break;
+ case XML_SCHEMA_PUSH_TEXT_VOLATILE:
+ /*
+ * When working with SAX.
+ * The value will be freed by the element info.
+ */
+ if (len != -1)
+ vctxt->inode->value = BAD_CAST xmlStrndup(value, len);
+ else
+ vctxt->inode->value = BAD_CAST xmlStrdup(value);
+ vctxt->inode->flags |=
+ XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES;
+ break;
+ default:
+ break;
+ }
+ } else {
+ if (len < 0)
+ len = xmlStrlen(value);
+ /*
+ * Concat the value.
+ */
+ if (vctxt->inode->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES) {
+ vctxt->inode->value = BAD_CAST xmlStrncat(
+ (xmlChar *) vctxt->inode->value, value, len);
+ } else {
+ vctxt->inode->value =
+ BAD_CAST xmlStrncatNew(vctxt->inode->value, value, len);
+ vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_VALUES;
+ }
+ }
+
+ return (0);
+}
+
+static int
+xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt)
+{
+ int ret = 0;
+
+ if ((vctxt->skipDepth != -1) &&
+ (vctxt->depth >= vctxt->skipDepth)) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "in skip-state");
+ goto internal_error;
+ }
+ if (vctxt->xsiAssemble) {
+ /*
+ * We will stop validation if there was an error during
+ * dynamic schema construction.
+ * Note that we simply set @skipDepth to 0, this could
+ * mean that a streaming document via SAX would be
+ * still read to the end but it won't be validated any more.
+ * TODO: If we are sure how to stop the validation at once
+ * for all input scenarios, then this should be changed to
+ * instantly stop the validation.
+ */
+ ret = xmlSchemaAssembleByXSI(vctxt);
+ if (ret != 0) {
+ if (ret == -1)
+ goto internal_error;
+ vctxt->skipDepth = 0;
+ return(ret);
+ }
+ /*
+ * Augment the IDC definitions for the main schema and all imported ones
+ * NOTE: main schema is the first in the imported list
+ */
+ xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt);
+ }
+ if (vctxt->depth > 0) {
+ /*
+ * Validate this element against the content model
+ * of the parent.
+ */
+ ret = xmlSchemaValidateChildElem(vctxt);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "calling xmlSchemaStreamValidateChildElement()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ if (vctxt->depth == vctxt->skipDepth)
+ goto exit;
+ if ((vctxt->inode->decl == NULL) &&
+ (vctxt->inode->typeDef == NULL)) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "the child element was valid but neither the "
+ "declaration nor the type was set");
+ goto internal_error;
+ }
+ } else {
+ /*
+ * Get the declaration of the validation root.
+ */
+ vctxt->inode->decl = xmlSchemaGetElem(vctxt->schema,
+ vctxt->inode->localName,
+ vctxt->inode->nsName);
+ if (vctxt->inode->decl == NULL) {
+ ret = XML_SCHEMAV_CVC_ELT_1;
+ VERROR(ret, NULL,
+ "No matching global declaration available "
+ "for the validation root");
+ goto exit;
+ }
+ }
+
+ if (vctxt->inode->decl == NULL)
+ goto type_validation;
+
+ if (vctxt->inode->decl->type == XML_SCHEMA_TYPE_ANY) {
+ int skip;
+ /*
+ * Wildcards.
+ */
+ ret = xmlSchemaValidateElemWildcard(vctxt, &skip);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "calling xmlSchemaValidateElemWildcard()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ if (skip) {
+ vctxt->skipDepth = vctxt->depth;
+ goto exit;
+ }
+ /*
+ * The declaration might be set by the wildcard validation,
+ * when the processContents is "lax" or "strict".
+ */
+ if (vctxt->inode->decl->type != XML_SCHEMA_TYPE_ELEMENT) {
+ /*
+ * Clear the "decl" field to not confuse further processing.
+ */
+ vctxt->inode->decl = NULL;
+ goto type_validation;
+ }
+ }
+ /*
+ * Validate against the declaration.
+ */
+ ret = xmlSchemaValidateElemDecl(vctxt);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "calling xmlSchemaValidateElemDecl()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ /*
+ * Validate against the type definition.
+ */
+type_validation:
+
+ if (vctxt->inode->typeDef == NULL) {
+ vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
+ ret = XML_SCHEMAV_CVC_TYPE_1;
+ VERROR(ret, NULL,
+ "The type definition is absent");
+ goto exit;
+ }
+ if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) {
+ vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
+ ret = XML_SCHEMAV_CVC_TYPE_2;
+ VERROR(ret, NULL,
+ "The type definition is abstract");
+ goto exit;
+ }
+ /*
+ * Evaluate IDCs. Do it here, since new IDC matchers are registered
+ * during validation against the declaration. This must be done
+ * _before_ attribute validation.
+ */
+ if (vctxt->xpathStates != NULL) {
+ ret = xmlSchemaXPathEvaluate(vctxt, XML_ELEMENT_NODE);
+ vctxt->inode->appliedXPath = 1;
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "calling xmlSchemaXPathEvaluate()");
+ goto internal_error;
+ }
+ }
+ /*
+ * Validate attributes.
+ */
+ if (WXS_IS_COMPLEX(vctxt->inode->typeDef)) {
+ if ((vctxt->nbAttrInfos != 0) ||
+ (vctxt->inode->typeDef->attrUses != NULL)) {
+
+ ret = xmlSchemaVAttributesComplex(vctxt);
+ }
+ } else if (vctxt->nbAttrInfos != 0) {
+
+ ret = xmlSchemaVAttributesSimple(vctxt);
+ }
+ /*
+ * Clear registered attributes.
+ */
+ if (vctxt->nbAttrInfos != 0)
+ xmlSchemaClearAttrInfos(vctxt);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaValidateElem",
+ "calling attributes validation");
+ goto internal_error;
+ }
+ /*
+ * Don't return an error if attributes are invalid on purpose.
+ */
+ ret = 0;
+
+exit:
+ if (ret != 0)
+ vctxt->skipDepth = vctxt->depth;
+ return (ret);
+internal_error:
+ return (-1);
+}
+
+#ifdef XML_SCHEMA_READER_ENABLED
+static int
+xmlSchemaVReaderWalk(xmlSchemaValidCtxtPtr vctxt)
+{
+ const int WHTSP = 13, SIGN_WHTSP = 14, END_ELEM = 15;
+ int depth, nodeType, ret = 0, consumed;
+ xmlSchemaNodeInfoPtr ielem;
+
+ vctxt->depth = -1;
+ ret = xmlTextReaderRead(vctxt->reader);
+ /*
+ * Move to the document element.
+ */
+ while (ret == 1) {
+ nodeType = xmlTextReaderNodeType(vctxt->reader);
+ if (nodeType == XML_ELEMENT_NODE)
+ goto root_found;
+ ret = xmlTextReaderRead(vctxt->reader);
+ }
+ goto exit;
+
+root_found:
+
+ do {
+ depth = xmlTextReaderDepth(vctxt->reader);
+ nodeType = xmlTextReaderNodeType(vctxt->reader);
+
+ if (nodeType == XML_ELEMENT_NODE) {
+
+ vctxt->depth++;
+ if (xmlSchemaValidatorPushElem(vctxt) == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlSchemaValidatorPushElem()");
+ goto internal_error;
+ }
+ ielem = vctxt->inode;
+ ielem->localName = xmlTextReaderLocalName(vctxt->reader);
+ ielem->nsName = xmlTextReaderNamespaceUri(vctxt->reader);
+ ielem->flags |= XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES;
+ /*
+ * Is the element empty?
+ */
+ ret = xmlTextReaderIsEmptyElement(vctxt->reader);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlTextReaderIsEmptyElement()");
+ goto internal_error;
+ }
+ if (ret) {
+ ielem->flags |= XML_SCHEMA_ELEM_INFO_EMPTY;
+ }
+ /*
+ * Register attributes.
+ */
+ vctxt->nbAttrInfos = 0;
+ ret = xmlTextReaderMoveToFirstAttribute(vctxt->reader);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlTextReaderMoveToFirstAttribute()");
+ goto internal_error;
+ }
+ if (ret == 1) {
+ do {
+ /*
+ * VAL TODO: How do we know that the reader works on a
+ * node tree, to be able to pass a node here?
+ */
+ if (xmlSchemaValidatorPushAttribute(vctxt, NULL,
+ (const xmlChar *) xmlTextReaderLocalName(vctxt->reader),
+ xmlTextReaderNamespaceUri(vctxt->reader), 1,
+ xmlTextReaderValue(vctxt->reader), 1) == -1) {
+
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlSchemaValidatorPushAttribute()");
+ goto internal_error;
+ }
+ ret = xmlTextReaderMoveToNextAttribute(vctxt->reader);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlTextReaderMoveToFirstAttribute()");
+ goto internal_error;
+ }
+ } while (ret == 1);
+ /*
+ * Back to element position.
+ */
+ ret = xmlTextReaderMoveToElement(vctxt->reader);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlTextReaderMoveToElement()");
+ goto internal_error;
+ }
+ }
+ /*
+ * Validate the element.
+ */
+ ret= xmlSchemaValidateElem(vctxt);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlSchemaValidateElem()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ if (vctxt->depth == vctxt->skipDepth) {
+ int curDepth;
+ /*
+ * Skip all content.
+ */
+ if ((ielem->flags & XML_SCHEMA_ELEM_INFO_EMPTY) == 0) {
+ ret = xmlTextReaderRead(vctxt->reader);
+ curDepth = xmlTextReaderDepth(vctxt->reader);
+ while ((ret == 1) && (curDepth != depth)) {
+ ret = xmlTextReaderRead(vctxt->reader);
+ curDepth = xmlTextReaderDepth(vctxt->reader);
+ }
+ if (ret < 0) {
+ /*
+ * VAL TODO: A reader error occured; what to do here?
+ */
+ ret = 1;
+ goto exit;
+ }
+ }
+ goto leave_elem;
+ }
+ /*
+ * READER VAL TODO: Is an END_ELEM really never called
+ * if the elem is empty?
+ */
+ if (ielem->flags & XML_SCHEMA_ELEM_INFO_EMPTY)
+ goto leave_elem;
+ } else if (nodeType == END_ELEM) {
+ /*
+ * Process END of element.
+ */
+leave_elem:
+ ret = xmlSchemaValidatorPopElem(vctxt);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlSchemaValidatorPopElem()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+ if (vctxt->depth >= 0)
+ ielem = vctxt->inode;
+ else
+ ielem = NULL;
+ } else if ((nodeType == XML_TEXT_NODE) ||
+ (nodeType == XML_CDATA_SECTION_NODE) ||
+ (nodeType == WHTSP) ||
+ (nodeType == SIGN_WHTSP)) {
+ /*
+ * Process character content.
+ */
+ xmlChar *value;
+
+ if ((nodeType == WHTSP) || (nodeType == SIGN_WHTSP))
+ nodeType = XML_TEXT_NODE;
+
+ value = xmlTextReaderValue(vctxt->reader);
+ ret = xmlSchemaVPushText(vctxt, nodeType, BAD_CAST value,
+ -1, XML_SCHEMA_PUSH_TEXT_CREATED, &consumed);
+ if (! consumed)
+ xmlFree(value);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaVReaderWalk",
+ "calling xmlSchemaVPushText()");
+ goto internal_error;
+ }
+ } else if ((nodeType == XML_ENTITY_NODE) ||
+ (nodeType == XML_ENTITY_REF_NODE)) {
+ /*
+ * VAL TODO: What to do with entities?
+ */
+ TODO
+ }
+ /*
+ * Read next node.
+ */
+ ret = xmlTextReaderRead(vctxt->reader);
+ } while (ret == 1);
+
+exit:
+ return (ret);
+internal_error:
+ return (-1);
+}
+#endif
+
+/************************************************************************
+ * *
+ * SAX validation handlers *
+ * *
+ ************************************************************************/
+
+/*
+* Process text content.
+*/
+static void
+xmlSchemaSAXHandleText(void *ctx,
+ const xmlChar * ch,
+ int len)
+{
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx;
+
+ if (vctxt->depth < 0)
+ return;
+ if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth))
+ return;
+ if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY)
+ vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY;
+ if (xmlSchemaVPushText(vctxt, XML_TEXT_NODE, ch, len,
+ XML_SCHEMA_PUSH_TEXT_VOLATILE, NULL) == -1) {
+ VERROR_INT("xmlSchemaSAXHandleCDataSection",
+ "calling xmlSchemaVPushText()");
+ vctxt->err = -1;
+ xmlStopParser(vctxt->parserCtxt);
+ }
+}
+
+/*
+* Process CDATA content.
+*/
+static void
+xmlSchemaSAXHandleCDataSection(void *ctx,
+ const xmlChar * ch,
+ int len)
+{
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx;
+
+ if (vctxt->depth < 0)
+ return;
+ if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth))
+ return;
+ if (vctxt->inode->flags & XML_SCHEMA_ELEM_INFO_EMPTY)
+ vctxt->inode->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY;
+ if (xmlSchemaVPushText(vctxt, XML_CDATA_SECTION_NODE, ch, len,
+ XML_SCHEMA_PUSH_TEXT_VOLATILE, NULL) == -1) {
+ VERROR_INT("xmlSchemaSAXHandleCDataSection",
+ "calling xmlSchemaVPushText()");
+ vctxt->err = -1;
+ xmlStopParser(vctxt->parserCtxt);
+ }
+}
+
+static void
+xmlSchemaSAXHandleReference(void *ctx ATTRIBUTE_UNUSED,
+ const xmlChar * name ATTRIBUTE_UNUSED)
+{
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx;
+
+ if (vctxt->depth < 0)
+ return;
+ if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth))
+ return;
+ /* SAX VAL TODO: What to do here? */
+ TODO
+}
+
+static void
+xmlSchemaSAXHandleStartElementNs(void *ctx,
+ const xmlChar * localname,
+ const xmlChar * prefix ATTRIBUTE_UNUSED,
+ const xmlChar * URI,
+ int nb_namespaces,
+ const xmlChar ** namespaces,
+ int nb_attributes,
+ int nb_defaulted ATTRIBUTE_UNUSED,
+ const xmlChar ** attributes)
+{
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx;
+ int ret;
+ xmlSchemaNodeInfoPtr ielem;
+ int i, j;
+
+ /*
+ * SAX VAL TODO: What to do with nb_defaulted?
+ */
+ /*
+ * Skip elements if inside a "skip" wildcard or invalid.
+ */
+ vctxt->depth++;
+ if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth))
+ return;
+ /*
+ * Push the element.
+ */
+ if (xmlSchemaValidatorPushElem(vctxt) == -1) {
+ VERROR_INT("xmlSchemaSAXHandleStartElementNs",
+ "calling xmlSchemaValidatorPushElem()");
+ goto internal_error;
+ }
+ ielem = vctxt->inode;
+ /*
+ * TODO: Is this OK?
+ */
+ ielem->nodeLine = xmlSAX2GetLineNumber(vctxt->parserCtxt);
+ ielem->localName = localname;
+ ielem->nsName = URI;
+ ielem->flags |= XML_SCHEMA_ELEM_INFO_EMPTY;
+ /*
+ * Register namespaces on the elem info.
+ */
+ if (nb_namespaces != 0) {
+ /*
+ * Although the parser builds its own namespace list,
+ * we have no access to it, so we'll use an own one.
+ */
+ for (i = 0, j = 0; i < nb_namespaces; i++, j += 2) {
+ /*
+ * Store prefix and namespace name.
+ */
+ if (ielem->nsBindings == NULL) {
+ ielem->nsBindings =
+ (const xmlChar **) xmlMalloc(10 *
+ sizeof(const xmlChar *));
+ if (ielem->nsBindings == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "allocating namespace bindings for SAX validation",
+ NULL);
+ goto internal_error;
+ }
+ ielem->nbNsBindings = 0;
+ ielem->sizeNsBindings = 5;
+ } else if (ielem->sizeNsBindings <= ielem->nbNsBindings) {
+ ielem->sizeNsBindings *= 2;
+ ielem->nsBindings =
+ (const xmlChar **) xmlRealloc(
+ (void *) ielem->nsBindings,
+ ielem->sizeNsBindings * 2 * sizeof(const xmlChar *));
+ if (ielem->nsBindings == NULL) {
+ xmlSchemaVErrMemory(vctxt,
+ "re-allocating namespace bindings for SAX validation",
+ NULL);
+ goto internal_error;
+ }
+ }
+
+ ielem->nsBindings[ielem->nbNsBindings * 2] = namespaces[j];
+ if (namespaces[j+1][0] == 0) {
+ /*
+ * Handle xmlns="".
+ */
+ ielem->nsBindings[ielem->nbNsBindings * 2 + 1] = NULL;
+ } else
+ ielem->nsBindings[ielem->nbNsBindings * 2 + 1] =
+ namespaces[j+1];
+ ielem->nbNsBindings++;
+ }
+ }
+ /*
+ * Register attributes.
+ * SAX VAL TODO: We are not adding namespace declaration
+ * attributes yet.
+ */
+ if (nb_attributes != 0) {
+ xmlChar *value;
+
+ for (j = 0, i = 0; i < nb_attributes; i++, j += 5) {
+ /*
+ * Duplicate the value.
+ */
+ value = xmlStrndup(attributes[j+3],
+ attributes[j+4] - attributes[j+3]);
+ /*
+ * TODO: Set the node line.
+ */
+ ret = xmlSchemaValidatorPushAttribute(vctxt,
+ NULL, ielem->nodeLine, attributes[j], attributes[j+2], 0,
+ value, 1);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaSAXHandleStartElementNs",
+ "calling xmlSchemaValidatorPushAttribute()");
+ goto internal_error;
+ }
+ }
+ }
+ /*
+ * Validate the element.
+ */
+ ret = xmlSchemaValidateElem(vctxt);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaSAXHandleStartElementNs",
+ "calling xmlSchemaValidateElem()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+
+exit:
+ return;
+internal_error:
+ vctxt->err = -1;
+ xmlStopParser(vctxt->parserCtxt);
+ return;
+}
+
+static void
+xmlSchemaSAXHandleEndElementNs(void *ctx,
+ const xmlChar * localname ATTRIBUTE_UNUSED,
+ const xmlChar * prefix ATTRIBUTE_UNUSED,
+ const xmlChar * URI ATTRIBUTE_UNUSED)
+{
+ xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx;
+ int res;
+
+ /*
+ * Skip elements if inside a "skip" wildcard or if invalid.
+ */
+ if (vctxt->skipDepth != -1) {
+ if (vctxt->depth > vctxt->skipDepth) {
+ vctxt->depth--;
+ return;
+ } else
+ vctxt->skipDepth = -1;
+ }
+ /*
+ * SAX VAL TODO: Just a temporary check.
+ */
+ if ((!xmlStrEqual(vctxt->inode->localName, localname)) ||
+ (!xmlStrEqual(vctxt->inode->nsName, URI))) {
+ VERROR_INT("xmlSchemaSAXHandleEndElementNs",
+ "elem pop mismatch");
+ }
+ res = xmlSchemaValidatorPopElem(vctxt);
+ if (res != 0) {
+ if (res < 0) {
+ VERROR_INT("xmlSchemaSAXHandleEndElementNs",
+ "calling xmlSchemaValidatorPopElem()");
+ goto internal_error;
+ }
+ goto exit;
+ }
+exit:
+ return;
+internal_error:
+ vctxt->err = -1;
+ xmlStopParser(vctxt->parserCtxt);
+ return;
+}
+
+/************************************************************************
+ * *
+ * Validation interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaNewValidCtxt:
+ * @schema: a precompiled XML Schemas
+ *
+ * Create an XML Schemas validation context based on the given schema.
+ *
+ * Returns the validation context or NULL in case of error
+ */
+xmlSchemaValidCtxtPtr
+xmlSchemaNewValidCtxt(xmlSchemaPtr schema)
+{
+ xmlSchemaValidCtxtPtr ret;
+
+ ret = (xmlSchemaValidCtxtPtr) xmlMalloc(sizeof(xmlSchemaValidCtxt));
+ if (ret == NULL) {
+ xmlSchemaVErrMemory(NULL, "allocating validation context", NULL);
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaValidCtxt));
+ ret->type = XML_SCHEMA_CTXT_VALIDATOR;
+ ret->dict = xmlDictCreate();
+ ret->nodeQNames = xmlSchemaItemListCreate();
+ ret->schema = schema;
+ return (ret);
+}
+
+/**
+ * xmlSchemaValidateSetFilename:
+ * @vctxt: the schema validation context
+ * @filename: the file name
+ *
+ * Workaround to provide file error reporting information when this is
+ * not provided by current APIs
+ */
+void
+xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, const char *filename) {
+ if (vctxt == NULL)
+ return;
+ if (vctxt->filename != NULL)
+ xmlFree(vctxt->filename);
+ if (filename != NULL)
+ vctxt->filename = (char *) xmlStrdup((const xmlChar *) filename);
+ else
+ vctxt->filename = NULL;
+}
+
+/**
+ * xmlSchemaClearValidCtxt:
+ * @vctxt: the schema validation context
+ *
+ * Free the resources associated to the schema validation context;
+ * leaves some fields alive intended for reuse of the context.
+ */
+static void
+xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt)
+{
+ if (vctxt == NULL)
+ return;
+
+ /*
+ * TODO: Should we clear the flags?
+ * Might be problematic if one reuses the context
+ * and assumes that the options remain the same.
+ */
+ vctxt->flags = 0;
+ vctxt->validationRoot = NULL;
+ vctxt->doc = NULL;
+#ifdef LIBXML_READER_ENABLED
+ vctxt->reader = NULL;
+#endif
+ vctxt->hasKeyrefs = 0;
+
+ if (vctxt->value != NULL) {
+ xmlSchemaFreeValue(vctxt->value);
+ vctxt->value = NULL;
+ }
+ /*
+ * Augmented IDC information.
+ */
+ if (vctxt->aidcs != NULL) {
+ xmlSchemaIDCAugPtr cur = vctxt->aidcs, next;
+ do {
+ next = cur->next;
+ xmlFree(cur);
+ cur = next;
+ } while (cur != NULL);
+ vctxt->aidcs = NULL;
+ }
+ if (vctxt->idcMatcherCache != NULL) {
+ xmlSchemaIDCMatcherPtr matcher = vctxt->idcMatcherCache, tmp;
+
+ while (matcher) {
+ tmp = matcher;
+ matcher = matcher->nextCached;
+ xmlSchemaIDCFreeMatcherList(tmp);
+ }
+ vctxt->idcMatcherCache = NULL;
+ }
+
+
+ if (vctxt->idcNodes != NULL) {
+ int i;
+ xmlSchemaPSVIIDCNodePtr item;
+
+ for (i = 0; i < vctxt->nbIdcNodes; i++) {
+ item = vctxt->idcNodes[i];
+ xmlFree(item->keys);
+ xmlFree(item);
+ }
+ xmlFree(vctxt->idcNodes);
+ vctxt->idcNodes = NULL;
+ vctxt->nbIdcNodes = 0;
+ vctxt->sizeIdcNodes = 0;
+ }
+ /*
+ * Note that we won't delete the XPath state pool here.
+ */
+ if (vctxt->xpathStates != NULL) {
+ xmlSchemaFreeIDCStateObjList(vctxt->xpathStates);
+ vctxt->xpathStates = NULL;
+ }
+ /*
+ * Attribute info.
+ */
+ if (vctxt->nbAttrInfos != 0) {
+ xmlSchemaClearAttrInfos(vctxt);
+ }
+ /*
+ * Element info.
+ */
+ if (vctxt->elemInfos != NULL) {
+ int i;
+ xmlSchemaNodeInfoPtr ei;
+
+ for (i = 0; i < vctxt->sizeElemInfos; i++) {
+ ei = vctxt->elemInfos[i];
+ if (ei == NULL)
+ break;
+ xmlSchemaClearElemInfo(vctxt, ei);
+ }
+ }
+ xmlSchemaItemListClear(vctxt->nodeQNames);
+ /* Recreate the dict. */
+ xmlDictFree(vctxt->dict);
+ /*
+ * TODO: Is is save to recreate it? Do we have a scenario
+ * where the user provides the dict?
+ */
+ vctxt->dict = xmlDictCreate();
+
+ if (vctxt->filename != NULL) {
+ xmlFree(vctxt->filename);
+ vctxt->filename = NULL;
+ }
+}
+
+/**
+ * xmlSchemaFreeValidCtxt:
+ * @ctxt: the schema validation context
+ *
+ * Free the resources associated to the schema validation context
+ */
+void
+xmlSchemaFreeValidCtxt(xmlSchemaValidCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return;
+ if (ctxt->value != NULL)
+ xmlSchemaFreeValue(ctxt->value);
+ if (ctxt->pctxt != NULL)
+ xmlSchemaFreeParserCtxt(ctxt->pctxt);
+ if (ctxt->idcNodes != NULL) {
+ int i;
+ xmlSchemaPSVIIDCNodePtr item;
+
+ for (i = 0; i < ctxt->nbIdcNodes; i++) {
+ item = ctxt->idcNodes[i];
+ xmlFree(item->keys);
+ xmlFree(item);
+ }
+ xmlFree(ctxt->idcNodes);
+ }
+ if (ctxt->idcKeys != NULL) {
+ int i;
+ for (i = 0; i < ctxt->nbIdcKeys; i++)
+ xmlSchemaIDCFreeKey(ctxt->idcKeys[i]);
+ xmlFree(ctxt->idcKeys);
+ }
+
+ if (ctxt->xpathStates != NULL) {
+ xmlSchemaFreeIDCStateObjList(ctxt->xpathStates);
+ ctxt->xpathStates = NULL;
+ }
+ if (ctxt->xpathStatePool != NULL) {
+ xmlSchemaFreeIDCStateObjList(ctxt->xpathStatePool);
+ ctxt->xpathStatePool = NULL;
+ }
+
+ /*
+ * Augmented IDC information.
+ */
+ if (ctxt->aidcs != NULL) {
+ xmlSchemaIDCAugPtr cur = ctxt->aidcs, next;
+ do {
+ next = cur->next;
+ xmlFree(cur);
+ cur = next;
+ } while (cur != NULL);
+ }
+ if (ctxt->attrInfos != NULL) {
+ int i;
+ xmlSchemaAttrInfoPtr attr;
+
+ /* Just a paranoid call to the cleanup. */
+ if (ctxt->nbAttrInfos != 0)
+ xmlSchemaClearAttrInfos(ctxt);
+ for (i = 0; i < ctxt->sizeAttrInfos; i++) {
+ attr = ctxt->attrInfos[i];
+ xmlFree(attr);
+ }
+ xmlFree(ctxt->attrInfos);
+ }
+ if (ctxt->elemInfos != NULL) {
+ int i;
+ xmlSchemaNodeInfoPtr ei;
+
+ for (i = 0; i < ctxt->sizeElemInfos; i++) {
+ ei = ctxt->elemInfos[i];
+ if (ei == NULL)
+ break;
+ xmlSchemaClearElemInfo(ctxt, ei);
+ xmlFree(ei);
+ }
+ xmlFree(ctxt->elemInfos);
+ }
+ if (ctxt->nodeQNames != NULL)
+ xmlSchemaItemListFree(ctxt->nodeQNames);
+ if (ctxt->dict != NULL)
+ xmlDictFree(ctxt->dict);
+ if (ctxt->filename != NULL)
+ xmlFree(ctxt->filename);
+ xmlFree(ctxt);
+}
+
+/**
+ * xmlSchemaIsValid:
+ * @ctxt: the schema validation context
+ *
+ * Check if any error was detected during validation.
+ *
+ * Returns 1 if valid so far, 0 if errors were detected, and -1 in case
+ * of internal error.
+ */
+int
+xmlSchemaIsValid(xmlSchemaValidCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return(-1);
+ return(ctxt->err == 0);
+}
+
+/**
+ * xmlSchemaSetValidErrors:
+ * @ctxt: a schema validation context
+ * @err: the error function
+ * @warn: the warning function
+ * @ctx: the functions context
+ *
+ * Set the error and warning callback informations
+ */
+void
+xmlSchemaSetValidErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->error = err;
+ ctxt->warning = warn;
+ ctxt->errCtxt = ctx;
+ if (ctxt->pctxt != NULL)
+ xmlSchemaSetParserErrors(ctxt->pctxt, err, warn, ctx);
+}
+
+/**
+ * xmlSchemaSetValidStructuredErrors:
+ * @ctxt: a schema validation context
+ * @serror: the structured error function
+ * @ctx: the functions context
+ *
+ * Set the structured error callback
+ */
+void
+xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx)
+{
+ if (ctxt == NULL)
+ return;
+ ctxt->serror = serror;
+ ctxt->error = NULL;
+ ctxt->warning = NULL;
+ ctxt->errCtxt = ctx;
+ if (ctxt->pctxt != NULL)
+ xmlSchemaSetParserStructuredErrors(ctxt->pctxt, serror, ctx);
+}
+
+/**
+ * xmlSchemaGetValidErrors:
+ * @ctxt: a XML-Schema validation context
+ * @err: the error function result
+ * @warn: the warning function result
+ * @ctx: the functions context result
+ *
+ * Get the error and warning callback informations
+ *
+ * Returns -1 in case of error and 0 otherwise
+ */
+int
+xmlSchemaGetValidErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn, void **ctx)
+{
+ if (ctxt == NULL)
+ return (-1);
+ if (err != NULL)
+ *err = ctxt->error;
+ if (warn != NULL)
+ *warn = ctxt->warning;
+ if (ctx != NULL)
+ *ctx = ctxt->errCtxt;
+ return (0);
+}
+
+
+/**
+ * xmlSchemaSetValidOptions:
+ * @ctxt: a schema validation context
+ * @options: a combination of xmlSchemaValidOption
+ *
+ * Sets the options to be used during the validation.
+ *
+ * Returns 0 in case of success, -1 in case of an
+ * API error.
+ */
+int
+xmlSchemaSetValidOptions(xmlSchemaValidCtxtPtr ctxt,
+ int options)
+
+{
+ int i;
+
+ if (ctxt == NULL)
+ return (-1);
+ /*
+ * WARNING: Change the start value if adding to the
+ * xmlSchemaValidOption.
+ * TODO: Is there an other, more easy to maintain,
+ * way?
+ */
+ for (i = 1; i < (int) sizeof(int) * 8; i++) {
+ if (options & 1<<i)
+ return (-1);
+ }
+ ctxt->options = options;
+ return (0);
+}
+
+/**
+ * xmlSchemaValidCtxtGetOptions:
+ * @ctxt: a schema validation context
+ *
+ * Get the validation context options.
+ *
+ * Returns the option combination or -1 on error.
+ */
+int
+xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt)
+
+{
+ if (ctxt == NULL)
+ return (-1);
+ else
+ return (ctxt->options);
+}
+
+static int
+xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt)
+{
+ xmlAttrPtr attr;
+ int ret = 0;
+ xmlSchemaNodeInfoPtr ielem = NULL;
+ xmlNodePtr node, valRoot;
+ const xmlChar *nsName;
+
+ /* DOC VAL TODO: Move this to the start function. */
+ if (vctxt->validationRoot != NULL)
+ valRoot = vctxt->validationRoot;
+ else
+ valRoot = xmlDocGetRootElement(vctxt->doc);
+ if (valRoot == NULL) {
+ /* VAL TODO: Error code? */
+ VERROR(1, NULL, "The document has no document element");
+ return (1);
+ }
+ vctxt->depth = -1;
+ vctxt->validationRoot = valRoot;
+ node = valRoot;
+ while (node != NULL) {
+ if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth))
+ goto next_sibling;
+ if (node->type == XML_ELEMENT_NODE) {
+
+ /*
+ * Init the node-info.
+ */
+ vctxt->depth++;
+ if (xmlSchemaValidatorPushElem(vctxt) == -1)
+ goto internal_error;
+ ielem = vctxt->inode;
+ ielem->node = node;
+ ielem->nodeLine = node->line;
+ ielem->localName = node->name;
+ if (node->ns != NULL)
+ ielem->nsName = node->ns->href;
+ ielem->flags |= XML_SCHEMA_ELEM_INFO_EMPTY;
+ /*
+ * Register attributes.
+ * DOC VAL TODO: We do not register namespace declaration
+ * attributes yet.
+ */
+ vctxt->nbAttrInfos = 0;
+ if (node->properties != NULL) {
+ attr = node->properties;
+ do {
+ if (attr->ns != NULL)
+ nsName = attr->ns->href;
+ else
+ nsName = NULL;
+ ret = xmlSchemaValidatorPushAttribute(vctxt,
+ (xmlNodePtr) attr,
+ /*
+ * Note that we give it the line number of the
+ * parent element.
+ */
+ ielem->nodeLine,
+ attr->name, nsName, 0,
+ xmlNodeListGetString(attr->doc, attr->children, 1), 1);
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaDocWalk",
+ "calling xmlSchemaValidatorPushAttribute()");
+ goto internal_error;
+ }
+ attr = attr->next;
+ } while (attr);
+ }
+ /*
+ * Validate the element.
+ */
+ ret = xmlSchemaValidateElem(vctxt);
+ if (ret != 0) {
+ if (ret == -1) {
+ VERROR_INT("xmlSchemaDocWalk",
+ "calling xmlSchemaValidateElem()");
+ goto internal_error;
+ }
+ /*
+ * Don't stop validation; just skip the content
+ * of this element.
+ */
+ goto leave_node;
+ }
+ if ((vctxt->skipDepth != -1) &&
+ (vctxt->depth >= vctxt->skipDepth))
+ goto leave_node;
+ } else if ((node->type == XML_TEXT_NODE) ||
+ (node->type == XML_CDATA_SECTION_NODE)) {
+ /*
+ * Process character content.
+ */
+ if ((ielem != NULL) && (ielem->flags & XML_SCHEMA_ELEM_INFO_EMPTY))
+ ielem->flags ^= XML_SCHEMA_ELEM_INFO_EMPTY;
+ ret = xmlSchemaVPushText(vctxt, node->type, node->content,
+ -1, XML_SCHEMA_PUSH_TEXT_PERSIST, NULL);
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaVDocWalk",
+ "calling xmlSchemaVPushText()");
+ goto internal_error;
+ }
+ /*
+ * DOC VAL TODO: Should we skip further validation of the
+ * element content here?
+ */
+ } else if ((node->type == XML_ENTITY_NODE) ||
+ (node->type == XML_ENTITY_REF_NODE)) {
+ /*
+ * DOC VAL TODO: What to do with entities?
+ */
+ VERROR_INT("xmlSchemaVDocWalk",
+ "there is at least one entity reference in the node-tree "
+ "currently being validated. Processing of entities with "
+ "this XML Schema processor is not supported (yet). Please "
+ "substitute entities before validation.");
+ goto internal_error;
+ } else {
+ goto leave_node;
+ /*
+ * DOC VAL TODO: XInclude nodes, etc.
+ */
+ }
+ /*
+ * Walk the doc.
+ */
+ if (node->children != NULL) {
+ node = node->children;
+ continue;
+ }
+leave_node:
+ if (node->type == XML_ELEMENT_NODE) {
+ /*
+ * Leaving the scope of an element.
+ */
+ if (node != vctxt->inode->node) {
+ VERROR_INT("xmlSchemaVDocWalk",
+ "element position mismatch");
+ goto internal_error;
+ }
+ ret = xmlSchemaValidatorPopElem(vctxt);
+ if (ret != 0) {
+ if (ret < 0) {
+ VERROR_INT("xmlSchemaVDocWalk",
+ "calling xmlSchemaValidatorPopElem()");
+ goto internal_error;
+ }
+ }
+ if (node == valRoot)
+ goto exit;
+ }
+next_sibling:
+ if (node->next != NULL)
+ node = node->next;
+ else {
+ node = node->parent;
+ goto leave_node;
+ }
+ }
+
+exit:
+ return (ret);
+internal_error:
+ return (-1);
+}
+
+static int
+xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) {
+ /*
+ * Some initialization.
+ */
+ vctxt->err = 0;
+ vctxt->nberrors = 0;
+ vctxt->depth = -1;
+ vctxt->skipDepth = -1;
+ vctxt->xsiAssemble = 0;
+ vctxt->hasKeyrefs = 0;
+#ifdef ENABLE_IDC_NODE_TABLES_TEST
+ vctxt->createIDCNodeTables = 1;
+#else
+ vctxt->createIDCNodeTables = 0;
+#endif
+ /*
+ * Create a schema + parser if necessary.
+ */
+ if (vctxt->schema == NULL) {
+ xmlSchemaParserCtxtPtr pctxt;
+
+ vctxt->xsiAssemble = 1;
+ /*
+ * If not schema was given then we will create a schema
+ * dynamically using XSI schema locations.
+ *
+ * Create the schema parser context.
+ */
+ if ((vctxt->pctxt == NULL) &&
+ (xmlSchemaCreatePCtxtOnVCtxt(vctxt) == -1))
+ return (-1);
+ pctxt = vctxt->pctxt;
+ pctxt->xsiAssemble = 1;
+ /*
+ * Create the schema.
+ */
+ vctxt->schema = xmlSchemaNewSchema(pctxt);
+ if (vctxt->schema == NULL)
+ return (-1);
+ /*
+ * Create the schema construction context.
+ */
+ pctxt->constructor = xmlSchemaConstructionCtxtCreate(pctxt->dict);
+ if (pctxt->constructor == NULL)
+ return(-1);
+ pctxt->constructor->mainSchema = vctxt->schema;
+ /*
+ * Take ownership of the constructor to be able to free it.
+ */
+ pctxt->ownsConstructor = 1;
+ }
+ /*
+ * Augment the IDC definitions for the main schema and all imported ones
+ * NOTE: main schema if the first in the imported list
+ */
+ xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt);
+
+ return(0);
+}
+
+static void
+xmlSchemaPostRun(xmlSchemaValidCtxtPtr vctxt) {
+ if (vctxt->xsiAssemble) {
+ if (vctxt->schema != NULL) {
+ xmlSchemaFree(vctxt->schema);
+ vctxt->schema = NULL;
+ }
+ }
+ xmlSchemaClearValidCtxt(vctxt);
+}
+
+static int
+xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt)
+{
+ int ret = 0;
+
+ if (xmlSchemaPreRun(vctxt) < 0)
+ return(-1);
+
+ if (vctxt->doc != NULL) {
+ /*
+ * Tree validation.
+ */
+ ret = xmlSchemaVDocWalk(vctxt);
+#ifdef LIBXML_READER_ENABLED
+ } else if (vctxt->reader != NULL) {
+ /*
+ * XML Reader validation.
+ */
+#ifdef XML_SCHEMA_READER_ENABLED
+ ret = xmlSchemaVReaderWalk(vctxt);
+#endif
+#endif
+ } else if ((vctxt->sax != NULL) && (vctxt->parserCtxt != NULL)) {
+ /*
+ * SAX validation.
+ */
+ ret = xmlParseDocument(vctxt->parserCtxt);
+ } else {
+ VERROR_INT("xmlSchemaVStart",
+ "no instance to validate");
+ ret = -1;
+ }
+
+ xmlSchemaPostRun(vctxt);
+ if (ret == 0)
+ ret = vctxt->err;
+ return (ret);
+}
+
+/**
+ * xmlSchemaValidateOneElement:
+ * @ctxt: a schema validation context
+ * @elem: an element node
+ *
+ * Validate a branch of a tree, starting with the given @elem.
+ *
+ * Returns 0 if the element and its subtree is valid, a positive error
+ * code number otherwise and -1 in case of an internal or API error.
+ */
+int
+xmlSchemaValidateOneElement(xmlSchemaValidCtxtPtr ctxt, xmlNodePtr elem)
+{
+ if ((ctxt == NULL) || (elem == NULL) || (elem->type != XML_ELEMENT_NODE))
+ return (-1);
+
+ if (ctxt->schema == NULL)
+ return (-1);
+
+ ctxt->doc = elem->doc;
+ ctxt->node = elem;
+ ctxt->validationRoot = elem;
+ return(xmlSchemaVStart(ctxt));
+}
+
+/**
+ * xmlSchemaValidateDoc:
+ * @ctxt: a schema validation context
+ * @doc: a parsed document tree
+ *
+ * Validate a document tree in memory.
+ *
+ * Returns 0 if the document is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc)
+{
+ if ((ctxt == NULL) || (doc == NULL))
+ return (-1);
+
+ ctxt->doc = doc;
+ ctxt->node = xmlDocGetRootElement(doc);
+ if (ctxt->node == NULL) {
+ xmlSchemaCustomErr(ACTXT_CAST ctxt,
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING,
+ (xmlNodePtr) doc, NULL,
+ "The document has no document element", NULL, NULL);
+ return (ctxt->err);
+ }
+ ctxt->validationRoot = ctxt->node;
+ return (xmlSchemaVStart(ctxt));
+}
+
+
+/************************************************************************
+ * *
+ * Function and data for SAX streaming API *
+ * *
+ ************************************************************************/
+typedef struct _xmlSchemaSplitSAXData xmlSchemaSplitSAXData;
+typedef xmlSchemaSplitSAXData *xmlSchemaSplitSAXDataPtr;
+
+struct _xmlSchemaSplitSAXData {
+ xmlSAXHandlerPtr user_sax;
+ void *user_data;
+ xmlSchemaValidCtxtPtr ctxt;
+ xmlSAXHandlerPtr schemas_sax;
+};
+
+#define XML_SAX_PLUG_MAGIC 0xdc43ba21
+
+struct _xmlSchemaSAXPlug {
+ unsigned int magic;
+
+ /* the original callbacks informations */
+ xmlSAXHandlerPtr *user_sax_ptr;
+ xmlSAXHandlerPtr user_sax;
+ void **user_data_ptr;
+ void *user_data;
+
+ /* the block plugged back and validation informations */
+ xmlSAXHandler schemas_sax;
+ xmlSchemaValidCtxtPtr ctxt;
+};
+
+/* All those functions just bounces to the user provided SAX handlers */
+static void
+internalSubsetSplit(void *ctx, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->internalSubset != NULL))
+ ctxt->user_sax->internalSubset(ctxt->user_data, name, ExternalID,
+ SystemID);
+}
+
+static int
+isStandaloneSplit(void *ctx)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->isStandalone != NULL))
+ return(ctxt->user_sax->isStandalone(ctxt->user_data));
+ return(0);
+}
+
+static int
+hasInternalSubsetSplit(void *ctx)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->hasInternalSubset != NULL))
+ return(ctxt->user_sax->hasInternalSubset(ctxt->user_data));
+ return(0);
+}
+
+static int
+hasExternalSubsetSplit(void *ctx)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->hasExternalSubset != NULL))
+ return(ctxt->user_sax->hasExternalSubset(ctxt->user_data));
+ return(0);
+}
+
+static void
+externalSubsetSplit(void *ctx, const xmlChar *name,
+ const xmlChar *ExternalID, const xmlChar *SystemID)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->externalSubset != NULL))
+ ctxt->user_sax->externalSubset(ctxt->user_data, name, ExternalID,
+ SystemID);
+}
+
+static xmlParserInputPtr
+resolveEntitySplit(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->resolveEntity != NULL))
+ return(ctxt->user_sax->resolveEntity(ctxt->user_data, publicId,
+ systemId));
+ return(NULL);
+}
+
+static xmlEntityPtr
+getEntitySplit(void *ctx, const xmlChar *name)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->getEntity != NULL))
+ return(ctxt->user_sax->getEntity(ctxt->user_data, name));
+ return(NULL);
+}
+
+static xmlEntityPtr
+getParameterEntitySplit(void *ctx, const xmlChar *name)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->getParameterEntity != NULL))
+ return(ctxt->user_sax->getParameterEntity(ctxt->user_data, name));
+ return(NULL);
+}
+
+
+static void
+entityDeclSplit(void *ctx, const xmlChar *name, int type,
+ const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->entityDecl != NULL))
+ ctxt->user_sax->entityDecl(ctxt->user_data, name, type, publicId,
+ systemId, content);
+}
+
+static void
+attributeDeclSplit(void *ctx, const xmlChar * elem,
+ const xmlChar * name, int type, int def,
+ const xmlChar * defaultValue, xmlEnumerationPtr tree)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->attributeDecl != NULL)) {
+ ctxt->user_sax->attributeDecl(ctxt->user_data, elem, name, type,
+ def, defaultValue, tree);
+ } else {
+ xmlFreeEnumeration(tree);
+ }
+}
+
+static void
+elementDeclSplit(void *ctx, const xmlChar *name, int type,
+ xmlElementContentPtr content)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->elementDecl != NULL))
+ ctxt->user_sax->elementDecl(ctxt->user_data, name, type, content);
+}
+
+static void
+notationDeclSplit(void *ctx, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->notationDecl != NULL))
+ ctxt->user_sax->notationDecl(ctxt->user_data, name, publicId,
+ systemId);
+}
+
+static void
+unparsedEntityDeclSplit(void *ctx, const xmlChar *name,
+ const xmlChar *publicId, const xmlChar *systemId,
+ const xmlChar *notationName)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->unparsedEntityDecl != NULL))
+ ctxt->user_sax->unparsedEntityDecl(ctxt->user_data, name, publicId,
+ systemId, notationName);
+}
+
+static void
+setDocumentLocatorSplit(void *ctx, xmlSAXLocatorPtr loc)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->setDocumentLocator != NULL))
+ ctxt->user_sax->setDocumentLocator(ctxt->user_data, loc);
+}
+
+static void
+startDocumentSplit(void *ctx)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->startDocument != NULL))
+ ctxt->user_sax->startDocument(ctxt->user_data);
+}
+
+static void
+endDocumentSplit(void *ctx)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->endDocument != NULL))
+ ctxt->user_sax->endDocument(ctxt->user_data);
+}
+
+static void
+processingInstructionSplit(void *ctx, const xmlChar *target,
+ const xmlChar *data)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->processingInstruction != NULL))
+ ctxt->user_sax->processingInstruction(ctxt->user_data, target, data);
+}
+
+static void
+commentSplit(void *ctx, const xmlChar *value)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->comment != NULL))
+ ctxt->user_sax->comment(ctxt->user_data, value);
+}
+
+/*
+ * Varargs error callbacks to the user application, harder ...
+ */
+
+static void XMLCDECL
+warningSplit(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) {
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->warning != NULL)) {
+ TODO
+ }
+}
+static void XMLCDECL
+errorSplit(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) {
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->error != NULL)) {
+ TODO
+ }
+}
+static void XMLCDECL
+fatalErrorSplit(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) {
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->fatalError != NULL)) {
+ TODO
+ }
+}
+
+/*
+ * Those are function where both the user handler and the schemas handler
+ * need to be called.
+ */
+static void
+charactersSplit(void *ctx, const xmlChar *ch, int len)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt->user_sax != NULL) && (ctxt->user_sax->characters != NULL))
+ ctxt->user_sax->characters(ctxt->user_data, ch, len);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleText(ctxt->ctxt, ch, len);
+}
+
+static void
+ignorableWhitespaceSplit(void *ctx, const xmlChar *ch, int len)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->ignorableWhitespace != NULL))
+ ctxt->user_sax->ignorableWhitespace(ctxt->user_data, ch, len);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleText(ctxt->ctxt, ch, len);
+}
+
+static void
+cdataBlockSplit(void *ctx, const xmlChar *value, int len)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->cdataBlock != NULL))
+ ctxt->user_sax->cdataBlock(ctxt->user_data, value, len);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleCDataSection(ctxt->ctxt, value, len);
+}
+
+static void
+referenceSplit(void *ctx, const xmlChar *name)
+{
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt != NULL) && (ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->reference != NULL))
+ ctxt->user_sax->reference(ctxt->user_data, name);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleReference(ctxt->user_data, name);
+}
+
+static void
+startElementNsSplit(void *ctx, const xmlChar * localname,
+ const xmlChar * prefix, const xmlChar * URI,
+ int nb_namespaces, const xmlChar ** namespaces,
+ int nb_attributes, int nb_defaulted,
+ const xmlChar ** attributes) {
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->startElementNs != NULL))
+ ctxt->user_sax->startElementNs(ctxt->user_data, localname, prefix,
+ URI, nb_namespaces, namespaces,
+ nb_attributes, nb_defaulted,
+ attributes);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleStartElementNs(ctxt->ctxt, localname, prefix,
+ URI, nb_namespaces, namespaces,
+ nb_attributes, nb_defaulted,
+ attributes);
+}
+
+static void
+endElementNsSplit(void *ctx, const xmlChar * localname,
+ const xmlChar * prefix, const xmlChar * URI) {
+ xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx;
+ if (ctxt == NULL)
+ return;
+ if ((ctxt->user_sax != NULL) &&
+ (ctxt->user_sax->endElementNs != NULL))
+ ctxt->user_sax->endElementNs(ctxt->user_data, localname, prefix, URI);
+ if (ctxt->ctxt != NULL)
+ xmlSchemaSAXHandleEndElementNs(ctxt->ctxt, localname, prefix, URI);
+}
+
+/**
+ * xmlSchemaSAXPlug:
+ * @ctxt: a schema validation context
+ * @sax: a pointer to the original xmlSAXHandlerPtr
+ * @user_data: a pointer to the original SAX user data pointer
+ *
+ * Plug a SAX based validation layer in a SAX parsing event flow.
+ * The original @saxptr and @dataptr data are replaced by new pointers
+ * but the calls to the original will be maintained.
+ *
+ * Returns a pointer to a data structure needed to unplug the validation layer
+ * or NULL in case of errors.
+ */
+xmlSchemaSAXPlugPtr
+xmlSchemaSAXPlug(xmlSchemaValidCtxtPtr ctxt,
+ xmlSAXHandlerPtr *sax, void **user_data)
+{
+ xmlSchemaSAXPlugPtr ret;
+ xmlSAXHandlerPtr old_sax;
+
+ if ((ctxt == NULL) || (sax == NULL) || (user_data == NULL))
+ return(NULL);
+
+ /*
+ * We only allow to plug into SAX2 event streams
+ */
+ old_sax = *sax;
+ if ((old_sax != NULL) && (old_sax->initialized != XML_SAX2_MAGIC))
+ return(NULL);
+ if ((old_sax != NULL) &&
+ (old_sax->startElementNs == NULL) && (old_sax->endElementNs == NULL) &&
+ ((old_sax->startElement != NULL) || (old_sax->endElement != NULL)))
+ return(NULL);
+
+ /*
+ * everything seems right allocate the local data needed for that layer
+ */
+ ret = (xmlSchemaSAXPlugPtr) xmlMalloc(sizeof(xmlSchemaSAXPlugStruct));
+ if (ret == NULL) {
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaSAXPlugStruct));
+ ret->magic = XML_SAX_PLUG_MAGIC;
+ ret->schemas_sax.initialized = XML_SAX2_MAGIC;
+ ret->ctxt = ctxt;
+ ret->user_sax_ptr = sax;
+ ret->user_sax = old_sax;
+ if (old_sax == NULL) {
+ /*
+ * go direct, no need for the split block and functions.
+ */
+ ret->schemas_sax.startElementNs = xmlSchemaSAXHandleStartElementNs;
+ ret->schemas_sax.endElementNs = xmlSchemaSAXHandleEndElementNs;
+ /*
+ * Note that we use the same text-function for both, to prevent
+ * the parser from testing for ignorable whitespace.
+ */
+ ret->schemas_sax.ignorableWhitespace = xmlSchemaSAXHandleText;
+ ret->schemas_sax.characters = xmlSchemaSAXHandleText;
+
+ ret->schemas_sax.cdataBlock = xmlSchemaSAXHandleCDataSection;
+ ret->schemas_sax.reference = xmlSchemaSAXHandleReference;
+
+ ret->user_data = ctxt;
+ *user_data = ctxt;
+ } else {
+ /*
+ * for each callback unused by Schemas initialize it to the Split
+ * routine only if non NULL in the user block, this can speed up
+ * things at the SAX level.
+ */
+ if (old_sax->internalSubset != NULL)
+ ret->schemas_sax.internalSubset = internalSubsetSplit;
+ if (old_sax->isStandalone != NULL)
+ ret->schemas_sax.isStandalone = isStandaloneSplit;
+ if (old_sax->hasInternalSubset != NULL)
+ ret->schemas_sax.hasInternalSubset = hasInternalSubsetSplit;
+ if (old_sax->hasExternalSubset != NULL)
+ ret->schemas_sax.hasExternalSubset = hasExternalSubsetSplit;
+ if (old_sax->resolveEntity != NULL)
+ ret->schemas_sax.resolveEntity = resolveEntitySplit;
+ if (old_sax->getEntity != NULL)
+ ret->schemas_sax.getEntity = getEntitySplit;
+ if (old_sax->entityDecl != NULL)
+ ret->schemas_sax.entityDecl = entityDeclSplit;
+ if (old_sax->notationDecl != NULL)
+ ret->schemas_sax.notationDecl = notationDeclSplit;
+ if (old_sax->attributeDecl != NULL)
+ ret->schemas_sax.attributeDecl = attributeDeclSplit;
+ if (old_sax->elementDecl != NULL)
+ ret->schemas_sax.elementDecl = elementDeclSplit;
+ if (old_sax->unparsedEntityDecl != NULL)
+ ret->schemas_sax.unparsedEntityDecl = unparsedEntityDeclSplit;
+ if (old_sax->setDocumentLocator != NULL)
+ ret->schemas_sax.setDocumentLocator = setDocumentLocatorSplit;
+ if (old_sax->startDocument != NULL)
+ ret->schemas_sax.startDocument = startDocumentSplit;
+ if (old_sax->endDocument != NULL)
+ ret->schemas_sax.endDocument = endDocumentSplit;
+ if (old_sax->processingInstruction != NULL)
+ ret->schemas_sax.processingInstruction = processingInstructionSplit;
+ if (old_sax->comment != NULL)
+ ret->schemas_sax.comment = commentSplit;
+ if (old_sax->warning != NULL)
+ ret->schemas_sax.warning = warningSplit;
+ if (old_sax->error != NULL)
+ ret->schemas_sax.error = errorSplit;
+ if (old_sax->fatalError != NULL)
+ ret->schemas_sax.fatalError = fatalErrorSplit;
+ if (old_sax->getParameterEntity != NULL)
+ ret->schemas_sax.getParameterEntity = getParameterEntitySplit;
+ if (old_sax->externalSubset != NULL)
+ ret->schemas_sax.externalSubset = externalSubsetSplit;
+
+ /*
+ * the 6 schemas callback have to go to the splitter functions
+ * Note that we use the same text-function for ignorableWhitespace
+ * if possible, to prevent the parser from testing for ignorable
+ * whitespace.
+ */
+ ret->schemas_sax.characters = charactersSplit;
+ if ((old_sax->ignorableWhitespace != NULL) &&
+ (old_sax->ignorableWhitespace != old_sax->characters))
+ ret->schemas_sax.ignorableWhitespace = ignorableWhitespaceSplit;
+ else
+ ret->schemas_sax.ignorableWhitespace = charactersSplit;
+ ret->schemas_sax.cdataBlock = cdataBlockSplit;
+ ret->schemas_sax.reference = referenceSplit;
+ ret->schemas_sax.startElementNs = startElementNsSplit;
+ ret->schemas_sax.endElementNs = endElementNsSplit;
+
+ ret->user_data_ptr = user_data;
+ ret->user_data = *user_data;
+ *user_data = ret;
+ }
+
+ /*
+ * plug the pointers back.
+ */
+ *sax = &(ret->schemas_sax);
+ ctxt->sax = *sax;
+ ctxt->flags |= XML_SCHEMA_VALID_CTXT_FLAG_STREAM;
+ xmlSchemaPreRun(ctxt);
+ return(ret);
+}
+
+/**
+ * xmlSchemaSAXUnplug:
+ * @plug: a data structure returned by xmlSchemaSAXPlug
+ *
+ * Unplug a SAX based validation layer in a SAX parsing event flow.
+ * The original pointers used in the call are restored.
+ *
+ * Returns 0 in case of success and -1 in case of failure.
+ */
+int
+xmlSchemaSAXUnplug(xmlSchemaSAXPlugPtr plug)
+{
+ xmlSAXHandlerPtr *sax;
+ void **user_data;
+
+ if ((plug == NULL) || (plug->magic != XML_SAX_PLUG_MAGIC))
+ return(-1);
+ plug->magic = 0;
+
+ xmlSchemaPostRun(plug->ctxt);
+ /* restore the data */
+ sax = plug->user_sax_ptr;
+ *sax = plug->user_sax;
+ if (plug->user_sax != NULL) {
+ user_data = plug->user_data_ptr;
+ *user_data = plug->user_data;
+ }
+
+ /* free and return */
+ xmlFree(plug);
+ return(0);
+}
+
+/**
+ * xmlSchemaValidateSetLocator:
+ * @vctxt: a schema validation context
+ * @f: the locator function pointer
+ * @ctxt: the locator context
+ *
+ * Allows to set a locator function to the validation context,
+ * which will be used to provide file and line information since
+ * those are not provided as part of the SAX validation flow
+ * Setting @f to NULL disable the locator.
+ */
+
+void
+xmlSchemaValidateSetLocator(xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaValidityLocatorFunc f,
+ void *ctxt)
+{
+ if (vctxt == NULL) return;
+ vctxt->locFunc = f;
+ vctxt->locCtxt = ctxt;
+}
+
+/**
+ * xmlSchemaValidateStreamLocator:
+ * @ctx: the xmlTextReaderPtr used
+ * @file: returned file information
+ * @line: returned line information
+ *
+ * Internal locator function for the readers
+ *
+ * Returns 0 in case the Schema validation could be (des)activated and
+ * -1 in case of error.
+ */
+static int
+xmlSchemaValidateStreamLocator(void *ctx, const char **file,
+ unsigned long *line) {
+ xmlParserCtxtPtr ctxt;
+
+ if ((ctx == NULL) || ((file == NULL) && (line == NULL)))
+ return(-1);
+
+ if (file != NULL)
+ *file = NULL;
+ if (line != NULL)
+ *line = 0;
+
+ ctxt = (xmlParserCtxtPtr) ctx;
+ if (ctxt->input != NULL) {
+ if (file != NULL)
+ *file = ctxt->input->filename;
+ if (line != NULL)
+ *line = ctxt->input->line;
+ return(0);
+ }
+ return(-1);
+}
+
+/**
+ * xmlSchemaValidateStream:
+ * @ctxt: a schema validation context
+ * @input: the input to use for reading the data
+ * @enc: an optional encoding information
+ * @sax: a SAX handler for the resulting events
+ * @user_data: the context to provide to the SAX handler.
+ *
+ * Validate an input based on a flow of SAX event from the parser
+ * and forward the events to the @sax handler with the provided @user_data
+ * the user provided @sax handler must be a SAX2 one.
+ *
+ * Returns 0 if the document is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValidateStream(xmlSchemaValidCtxtPtr ctxt,
+ xmlParserInputBufferPtr input, xmlCharEncoding enc,
+ xmlSAXHandlerPtr sax, void *user_data)
+{
+ xmlSchemaSAXPlugPtr plug = NULL;
+ xmlSAXHandlerPtr old_sax = NULL;
+ xmlParserCtxtPtr pctxt = NULL;
+ xmlParserInputPtr inputStream = NULL;
+ int ret;
+
+ if ((ctxt == NULL) || (input == NULL))
+ return (-1);
+
+ /*
+ * prepare the parser
+ */
+ pctxt = xmlNewParserCtxt();
+ if (pctxt == NULL)
+ return (-1);
+ old_sax = pctxt->sax;
+ pctxt->sax = sax;
+ pctxt->userData = user_data;
+#if 0
+ if (options)
+ xmlCtxtUseOptions(pctxt, options);
+#endif
+ pctxt->linenumbers = 1;
+ xmlSchemaValidateSetLocator(ctxt, xmlSchemaValidateStreamLocator, pctxt);
+
+ inputStream = xmlNewIOInputStream(pctxt, input, enc);;
+ if (inputStream == NULL) {
+ ret = -1;
+ goto done;
+ }
+ inputPush(pctxt, inputStream);
+ ctxt->parserCtxt = pctxt;
+ ctxt->input = input;
+
+ /*
+ * Plug the validation and launch the parsing
+ */
+ plug = xmlSchemaSAXPlug(ctxt, &(pctxt->sax), &(pctxt->userData));
+ if (plug == NULL) {
+ ret = -1;
+ goto done;
+ }
+ ctxt->input = input;
+ ctxt->enc = enc;
+ ctxt->sax = pctxt->sax;
+ ctxt->flags |= XML_SCHEMA_VALID_CTXT_FLAG_STREAM;
+ ret = xmlSchemaVStart(ctxt);
+
+ if ((ret == 0) && (! ctxt->parserCtxt->wellFormed)) {
+ ret = ctxt->parserCtxt->errNo;
+ if (ret == 0)
+ ret = 1;
+ }
+
+done:
+ ctxt->parserCtxt = NULL;
+ ctxt->sax = NULL;
+ ctxt->input = NULL;
+ if (plug != NULL) {
+ xmlSchemaSAXUnplug(plug);
+ }
+ /* cleanup */
+ if (pctxt != NULL) {
+ pctxt->sax = old_sax;
+ xmlFreeParserCtxt(pctxt);
+ }
+ return (ret);
+}
+
+/**
+ * xmlSchemaValidateFile:
+ * @ctxt: a schema validation context
+ * @filename: the URI of the instance
+ * @options: a future set of options, currently unused
+ *
+ * Do a schemas validation of the given resource, it will use the
+ * SAX streamable validation internally.
+ *
+ * Returns 0 if the document is valid, a positive error code
+ * number otherwise and -1 in case of an internal or API error.
+ */
+int
+xmlSchemaValidateFile(xmlSchemaValidCtxtPtr ctxt,
+ const char * filename,
+ int options ATTRIBUTE_UNUSED)
+{
+ int ret;
+ xmlParserInputBufferPtr input;
+
+ if ((ctxt == NULL) || (filename == NULL))
+ return (-1);
+
+ input = xmlParserInputBufferCreateFilename(filename,
+ XML_CHAR_ENCODING_NONE);
+ if (input == NULL)
+ return (-1);
+ ret = xmlSchemaValidateStream(ctxt, input, XML_CHAR_ENCODING_NONE,
+ NULL, NULL);
+ return (ret);
+}
+
+/**
+ * xmlSchemaValidCtxtGetParserCtxt:
+ * @ctxt: a schema validation context
+ *
+ * allow access to the parser context of the schema validation context
+ *
+ * Returns the parser context of the schema validation context or NULL
+ * in case of error.
+ */
+xmlParserCtxtPtr
+xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt)
+{
+ if (ctxt == NULL)
+ return(NULL);
+ return (ctxt->parserCtxt);
+}
+
+#define bottom_xmlschemas
+#include "elfgcchack.h"
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
new file mode 100644
index 0000000..ff64f50
--- /dev/null
+++ b/xmlschemastypes.c
@@ -0,0 +1,6139 @@
+/*
+ * schemastypes.c : implementation of the XML Schema Datatypes
+ * definition and validity checking
+ *
+ * See Copyright for the status of this software.
+ *
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+#include <libxml/hash.h>
+#include <libxml/valid.h>
+#include <libxml/xpath.h>
+#include <libxml/uri.h>
+
+#include <libxml/xmlschemas.h>
+#include <libxml/schemasInternals.h>
+#include <libxml/xmlschemastypes.h>
+
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+#ifdef HAVE_FLOAT_H
+#include <float.h>
+#endif
+
+#define DEBUG
+
+#ifndef LIBXML_XPATH_ENABLED
+extern double xmlXPathNAN;
+extern double xmlXPathPINF;
+extern double xmlXPathNINF;
+#endif
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#define XML_SCHEMAS_NAMESPACE_NAME \
+ (const xmlChar *)"http://www.w3.org/2001/XMLSchema"
+
+#define IS_WSP_REPLACE_CH(c) ((((c) == 0x9) || ((c) == 0xa)) || \
+ ((c) == 0xd))
+
+#define IS_WSP_SPACE_CH(c) ((c) == 0x20)
+
+#define IS_WSP_BLANK_CH(c) IS_BLANK_CH(c)
+
+/* Date value */
+typedef struct _xmlSchemaValDate xmlSchemaValDate;
+typedef xmlSchemaValDate *xmlSchemaValDatePtr;
+struct _xmlSchemaValDate {
+ long year;
+ unsigned int mon :4; /* 1 <= mon <= 12 */
+ unsigned int day :5; /* 1 <= day <= 31 */
+ unsigned int hour :5; /* 0 <= hour <= 23 */
+ unsigned int min :6; /* 0 <= min <= 59 */
+ double sec;
+ unsigned int tz_flag :1; /* is tzo explicitely set? */
+ signed int tzo :12; /* -1440 <= tzo <= 1440;
+ currently only -840 to +840 are needed */
+};
+
+/* Duration value */
+typedef struct _xmlSchemaValDuration xmlSchemaValDuration;
+typedef xmlSchemaValDuration *xmlSchemaValDurationPtr;
+struct _xmlSchemaValDuration {
+ long mon; /* mon stores years also */
+ long day;
+ double sec; /* sec stores min and hour also */
+};
+
+typedef struct _xmlSchemaValDecimal xmlSchemaValDecimal;
+typedef xmlSchemaValDecimal *xmlSchemaValDecimalPtr;
+struct _xmlSchemaValDecimal {
+ /* would use long long but not portable */
+ unsigned long lo;
+ unsigned long mi;
+ unsigned long hi;
+ unsigned int extra;
+ unsigned int sign:1;
+ unsigned int frac:7;
+ unsigned int total:8;
+};
+
+typedef struct _xmlSchemaValQName xmlSchemaValQName;
+typedef xmlSchemaValQName *xmlSchemaValQNamePtr;
+struct _xmlSchemaValQName {
+ xmlChar *name;
+ xmlChar *uri;
+};
+
+typedef struct _xmlSchemaValHex xmlSchemaValHex;
+typedef xmlSchemaValHex *xmlSchemaValHexPtr;
+struct _xmlSchemaValHex {
+ xmlChar *str;
+ unsigned int total;
+};
+
+typedef struct _xmlSchemaValBase64 xmlSchemaValBase64;
+typedef xmlSchemaValBase64 *xmlSchemaValBase64Ptr;
+struct _xmlSchemaValBase64 {
+ xmlChar *str;
+ unsigned int total;
+};
+
+struct _xmlSchemaVal {
+ xmlSchemaValType type;
+ struct _xmlSchemaVal *next;
+ union {
+ xmlSchemaValDecimal decimal;
+ xmlSchemaValDate date;
+ xmlSchemaValDuration dur;
+ xmlSchemaValQName qname;
+ xmlSchemaValHex hex;
+ xmlSchemaValBase64 base64;
+ float f;
+ double d;
+ int b;
+ xmlChar *str;
+ } value;
+};
+
+static int xmlSchemaTypesInitialized = 0;
+static xmlHashTablePtr xmlSchemaTypesBank = NULL;
+
+/*
+ * Basic types
+ */
+static xmlSchemaTypePtr xmlSchemaTypeStringDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeAnyTypeDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeAnySimpleTypeDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeDecimalDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeDatetimeDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeDateDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeTimeDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeGYearDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeGYearMonthDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeGDayDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeGMonthDayDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeGMonthDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeDurationDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeFloatDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeBooleanDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeDoubleDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeHexBinaryDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeBase64BinaryDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeAnyURIDef = NULL;
+
+/*
+ * Derived types
+ */
+static xmlSchemaTypePtr xmlSchemaTypePositiveIntegerDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNonPositiveIntegerDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNegativeIntegerDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNonNegativeIntegerDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeIntegerDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeLongDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeIntDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeShortDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeByteDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeUnsignedLongDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeUnsignedIntDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeUnsignedShortDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeUnsignedByteDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNormStringDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeTokenDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeLanguageDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNameDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeQNameDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNCNameDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeIdDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeIdrefDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeIdrefsDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeEntityDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeEntitiesDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNotationDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNmtokenDef = NULL;
+static xmlSchemaTypePtr xmlSchemaTypeNmtokensDef = NULL;
+
+/************************************************************************
+ * *
+ * Datatype error handlers *
+ * *
+ ************************************************************************/
+/**
+ * xmlSchemaTypeErrMemory:
+ * @extra: extra informations
+ *
+ * Handle an out of memory condition
+ */
+static void
+xmlSchemaTypeErrMemory(xmlNodePtr node, const char *extra)
+{
+ __xmlSimpleError(XML_FROM_DATATYPE, XML_ERR_NO_MEMORY, node, NULL, extra);
+}
+
+/************************************************************************
+ * *
+ * Base types support *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlSchemaNewValue:
+ * @type: the value type
+ *
+ * Allocate a new simple type value
+ *
+ * Returns a pointer to the new value or NULL in case of error
+ */
+static xmlSchemaValPtr
+xmlSchemaNewValue(xmlSchemaValType type) {
+ xmlSchemaValPtr value;
+
+ value = (xmlSchemaValPtr) xmlMalloc(sizeof(xmlSchemaVal));
+ if (value == NULL) {
+ return(NULL);
+ }
+ memset(value, 0, sizeof(xmlSchemaVal));
+ value->type = type;
+ return(value);
+}
+
+static xmlSchemaFacetPtr
+xmlSchemaNewMinLengthFacet(int value)
+{
+ xmlSchemaFacetPtr ret;
+
+ ret = xmlSchemaNewFacet();
+ if (ret == NULL) {
+ return(NULL);
+ }
+ ret->type = XML_SCHEMA_FACET_MINLENGTH;
+ ret->val = xmlSchemaNewValue(XML_SCHEMAS_NNINTEGER);
+ if (ret->val == NULL) {
+ xmlFree(ret);
+ return(NULL);
+ }
+ ret->val->value.decimal.lo = value;
+ return (ret);
+}
+
+/*
+ * xmlSchemaInitBasicType:
+ * @name: the type name
+ * @type: the value type associated
+ *
+ * Initialize one primitive built-in type
+ */
+static xmlSchemaTypePtr
+xmlSchemaInitBasicType(const char *name, xmlSchemaValType type,
+ xmlSchemaTypePtr baseType) {
+ xmlSchemaTypePtr ret;
+
+ ret = (xmlSchemaTypePtr) xmlMalloc(sizeof(xmlSchemaType));
+ if (ret == NULL) {
+ xmlSchemaTypeErrMemory(NULL, "could not initialize basic types");
+ return(NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaType));
+ ret->name = (const xmlChar *)name;
+ ret->targetNamespace = XML_SCHEMAS_NAMESPACE_NAME;
+ ret->type = XML_SCHEMA_TYPE_BASIC;
+ ret->baseType = baseType;
+ ret->contentType = XML_SCHEMA_CONTENT_BASIC;
+ /*
+ * Primitive types.
+ */
+ switch (type) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_DECIMAL:
+ case XML_SCHEMAS_DATE:
+ case XML_SCHEMAS_DATETIME:
+ case XML_SCHEMAS_TIME:
+ case XML_SCHEMAS_GYEAR:
+ case XML_SCHEMAS_GYEARMONTH:
+ case XML_SCHEMAS_GMONTH:
+ case XML_SCHEMAS_GMONTHDAY:
+ case XML_SCHEMAS_GDAY:
+ case XML_SCHEMAS_DURATION:
+ case XML_SCHEMAS_FLOAT:
+ case XML_SCHEMAS_DOUBLE:
+ case XML_SCHEMAS_BOOLEAN:
+ case XML_SCHEMAS_ANYURI:
+ case XML_SCHEMAS_HEXBINARY:
+ case XML_SCHEMAS_BASE64BINARY:
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_NOTATION:
+ ret->flags |= XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE;
+ break;
+ default:
+ break;
+ }
+ /*
+ * Set variety.
+ */
+ switch (type) {
+ case XML_SCHEMAS_ANYTYPE:
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ break;
+ case XML_SCHEMAS_IDREFS:
+ case XML_SCHEMAS_NMTOKENS:
+ case XML_SCHEMAS_ENTITIES:
+ ret->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
+ ret->facets = xmlSchemaNewMinLengthFacet(1);
+ ret->flags |= XML_SCHEMAS_TYPE_HAS_FACETS;
+ break;
+ default:
+ ret->flags |= XML_SCHEMAS_TYPE_VARIETY_ATOMIC;
+ break;
+ }
+ xmlHashAddEntry2(xmlSchemaTypesBank, ret->name,
+ XML_SCHEMAS_NAMESPACE_NAME, ret);
+ ret->builtInType = type;
+ return(ret);
+}
+
+/*
+* WARNING: Those type reside normally in xmlschemas.c but are
+* redefined here locally in oder of being able to use them for xs:anyType-
+* TODO: Remove those definition if we move the types to a header file.
+* TODO: Always keep those structs up-to-date with the originals.
+*/
+#define UNBOUNDED (1 << 30)
+
+typedef struct _xmlSchemaTreeItem xmlSchemaTreeItem;
+typedef xmlSchemaTreeItem *xmlSchemaTreeItemPtr;
+struct _xmlSchemaTreeItem {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next;
+ xmlSchemaTreeItemPtr children;
+};
+
+typedef struct _xmlSchemaParticle xmlSchemaParticle;
+typedef xmlSchemaParticle *xmlSchemaParticlePtr;
+struct _xmlSchemaParticle {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next;
+ xmlSchemaTreeItemPtr children;
+ int minOccurs;
+ int maxOccurs;
+ xmlNodePtr node;
+};
+
+typedef struct _xmlSchemaModelGroup xmlSchemaModelGroup;
+typedef xmlSchemaModelGroup *xmlSchemaModelGroupPtr;
+struct _xmlSchemaModelGroup {
+ xmlSchemaTypeType type;
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTreeItemPtr next;
+ xmlSchemaTreeItemPtr children;
+ xmlNodePtr node;
+};
+
+static xmlSchemaParticlePtr
+xmlSchemaAddParticle(void)
+{
+ xmlSchemaParticlePtr ret = NULL;
+
+ ret = (xmlSchemaParticlePtr)
+ xmlMalloc(sizeof(xmlSchemaParticle));
+ if (ret == NULL) {
+ xmlSchemaTypeErrMemory(NULL, "allocating particle component");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlSchemaParticle));
+ ret->type = XML_SCHEMA_TYPE_PARTICLE;
+ ret->minOccurs = 1;
+ ret->maxOccurs = 1;
+ return (ret);
+}
+
+/*
+ * xmlSchemaInitTypes:
+ *
+ * Initialize the default XML Schemas type library
+ */
+void
+xmlSchemaInitTypes(void)
+{
+ if (xmlSchemaTypesInitialized != 0)
+ return;
+ xmlSchemaTypesBank = xmlHashCreate(40);
+
+
+ /*
+ * 3.4.7 Built-in Complex Type Definition
+ */
+ xmlSchemaTypeAnyTypeDef = xmlSchemaInitBasicType("anyType",
+ XML_SCHEMAS_ANYTYPE,
+ NULL);
+ xmlSchemaTypeAnyTypeDef->baseType = xmlSchemaTypeAnyTypeDef;
+ xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
+ /*
+ * Init the content type.
+ */
+ xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
+ {
+ xmlSchemaParticlePtr particle;
+ xmlSchemaModelGroupPtr sequence;
+ xmlSchemaWildcardPtr wild;
+ /* First particle. */
+ particle = xmlSchemaAddParticle();
+ if (particle == NULL)
+ return;
+ xmlSchemaTypeAnyTypeDef->subtypes = (xmlSchemaTypePtr) particle;
+ /* Sequence model group. */
+ sequence = (xmlSchemaModelGroupPtr)
+ xmlMalloc(sizeof(xmlSchemaModelGroup));
+ if (sequence == NULL) {
+ xmlSchemaTypeErrMemory(NULL, "allocating model group component");
+ return;
+ }
+ memset(sequence, 0, sizeof(xmlSchemaModelGroup));
+ sequence->type = XML_SCHEMA_TYPE_SEQUENCE;
+ particle->children = (xmlSchemaTreeItemPtr) sequence;
+ /* Second particle. */
+ particle = xmlSchemaAddParticle();
+ if (particle == NULL)
+ return;
+ particle->minOccurs = 0;
+ particle->maxOccurs = UNBOUNDED;
+ sequence->children = (xmlSchemaTreeItemPtr) particle;
+ /* The wildcard */
+ wild = (xmlSchemaWildcardPtr) xmlMalloc(sizeof(xmlSchemaWildcard));
+ if (wild == NULL) {
+ xmlSchemaTypeErrMemory(NULL, "allocating wildcard component");
+ return;
+ }
+ memset(wild, 0, sizeof(xmlSchemaWildcard));
+ wild->type = XML_SCHEMA_TYPE_ANY;
+ wild->any = 1;
+ wild->processContents = XML_SCHEMAS_ANY_LAX;
+ particle->children = (xmlSchemaTreeItemPtr) wild;
+ /*
+ * Create the attribute wildcard.
+ */
+ wild = (xmlSchemaWildcardPtr) xmlMalloc(sizeof(xmlSchemaWildcard));
+ if (wild == NULL) {
+ xmlSchemaTypeErrMemory(NULL, "could not create an attribute "
+ "wildcard on anyType");
+ return;
+ }
+ memset(wild, 0, sizeof(xmlSchemaWildcard));
+ wild->any = 1;
+ wild->processContents = XML_SCHEMAS_ANY_LAX;
+ xmlSchemaTypeAnyTypeDef->attributeWildcard = wild;
+ }
+ xmlSchemaTypeAnySimpleTypeDef = xmlSchemaInitBasicType("anySimpleType",
+ XML_SCHEMAS_ANYSIMPLETYPE,
+ xmlSchemaTypeAnyTypeDef);
+ /*
+ * primitive datatypes
+ */
+ xmlSchemaTypeStringDef = xmlSchemaInitBasicType("string",
+ XML_SCHEMAS_STRING,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeDecimalDef = xmlSchemaInitBasicType("decimal",
+ XML_SCHEMAS_DECIMAL,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeDateDef = xmlSchemaInitBasicType("date",
+ XML_SCHEMAS_DATE,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeDatetimeDef = xmlSchemaInitBasicType("dateTime",
+ XML_SCHEMAS_DATETIME,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeTimeDef = xmlSchemaInitBasicType("time",
+ XML_SCHEMAS_TIME,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeGYearDef = xmlSchemaInitBasicType("gYear",
+ XML_SCHEMAS_GYEAR,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeGYearMonthDef = xmlSchemaInitBasicType("gYearMonth",
+ XML_SCHEMAS_GYEARMONTH,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeGMonthDef = xmlSchemaInitBasicType("gMonth",
+ XML_SCHEMAS_GMONTH,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeGMonthDayDef = xmlSchemaInitBasicType("gMonthDay",
+ XML_SCHEMAS_GMONTHDAY,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeGDayDef = xmlSchemaInitBasicType("gDay",
+ XML_SCHEMAS_GDAY,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeDurationDef = xmlSchemaInitBasicType("duration",
+ XML_SCHEMAS_DURATION,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeFloatDef = xmlSchemaInitBasicType("float",
+ XML_SCHEMAS_FLOAT,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeDoubleDef = xmlSchemaInitBasicType("double",
+ XML_SCHEMAS_DOUBLE,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeBooleanDef = xmlSchemaInitBasicType("boolean",
+ XML_SCHEMAS_BOOLEAN,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeAnyURIDef = xmlSchemaInitBasicType("anyURI",
+ XML_SCHEMAS_ANYURI,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeHexBinaryDef = xmlSchemaInitBasicType("hexBinary",
+ XML_SCHEMAS_HEXBINARY,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeBase64BinaryDef
+ = xmlSchemaInitBasicType("base64Binary", XML_SCHEMAS_BASE64BINARY,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeNotationDef = xmlSchemaInitBasicType("NOTATION",
+ XML_SCHEMAS_NOTATION,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeQNameDef = xmlSchemaInitBasicType("QName",
+ XML_SCHEMAS_QNAME,
+ xmlSchemaTypeAnySimpleTypeDef);
+
+ /*
+ * derived datatypes
+ */
+ xmlSchemaTypeIntegerDef = xmlSchemaInitBasicType("integer",
+ XML_SCHEMAS_INTEGER,
+ xmlSchemaTypeDecimalDef);
+ xmlSchemaTypeNonPositiveIntegerDef =
+ xmlSchemaInitBasicType("nonPositiveInteger",
+ XML_SCHEMAS_NPINTEGER,
+ xmlSchemaTypeIntegerDef);
+ xmlSchemaTypeNegativeIntegerDef =
+ xmlSchemaInitBasicType("negativeInteger", XML_SCHEMAS_NINTEGER,
+ xmlSchemaTypeNonPositiveIntegerDef);
+ xmlSchemaTypeLongDef =
+ xmlSchemaInitBasicType("long", XML_SCHEMAS_LONG,
+ xmlSchemaTypeIntegerDef);
+ xmlSchemaTypeIntDef = xmlSchemaInitBasicType("int", XML_SCHEMAS_INT,
+ xmlSchemaTypeLongDef);
+ xmlSchemaTypeShortDef = xmlSchemaInitBasicType("short",
+ XML_SCHEMAS_SHORT,
+ xmlSchemaTypeIntDef);
+ xmlSchemaTypeByteDef = xmlSchemaInitBasicType("byte",
+ XML_SCHEMAS_BYTE,
+ xmlSchemaTypeShortDef);
+ xmlSchemaTypeNonNegativeIntegerDef =
+ xmlSchemaInitBasicType("nonNegativeInteger",
+ XML_SCHEMAS_NNINTEGER,
+ xmlSchemaTypeIntegerDef);
+ xmlSchemaTypeUnsignedLongDef =
+ xmlSchemaInitBasicType("unsignedLong", XML_SCHEMAS_ULONG,
+ xmlSchemaTypeNonNegativeIntegerDef);
+ xmlSchemaTypeUnsignedIntDef =
+ xmlSchemaInitBasicType("unsignedInt", XML_SCHEMAS_UINT,
+ xmlSchemaTypeUnsignedLongDef);
+ xmlSchemaTypeUnsignedShortDef =
+ xmlSchemaInitBasicType("unsignedShort", XML_SCHEMAS_USHORT,
+ xmlSchemaTypeUnsignedIntDef);
+ xmlSchemaTypeUnsignedByteDef =
+ xmlSchemaInitBasicType("unsignedByte", XML_SCHEMAS_UBYTE,
+ xmlSchemaTypeUnsignedShortDef);
+ xmlSchemaTypePositiveIntegerDef =
+ xmlSchemaInitBasicType("positiveInteger", XML_SCHEMAS_PINTEGER,
+ xmlSchemaTypeNonNegativeIntegerDef);
+ xmlSchemaTypeNormStringDef = xmlSchemaInitBasicType("normalizedString",
+ XML_SCHEMAS_NORMSTRING,
+ xmlSchemaTypeStringDef);
+ xmlSchemaTypeTokenDef = xmlSchemaInitBasicType("token",
+ XML_SCHEMAS_TOKEN,
+ xmlSchemaTypeNormStringDef);
+ xmlSchemaTypeLanguageDef = xmlSchemaInitBasicType("language",
+ XML_SCHEMAS_LANGUAGE,
+ xmlSchemaTypeTokenDef);
+ xmlSchemaTypeNameDef = xmlSchemaInitBasicType("Name",
+ XML_SCHEMAS_NAME,
+ xmlSchemaTypeTokenDef);
+ xmlSchemaTypeNmtokenDef = xmlSchemaInitBasicType("NMTOKEN",
+ XML_SCHEMAS_NMTOKEN,
+ xmlSchemaTypeTokenDef);
+ xmlSchemaTypeNCNameDef = xmlSchemaInitBasicType("NCName",
+ XML_SCHEMAS_NCNAME,
+ xmlSchemaTypeNameDef);
+ xmlSchemaTypeIdDef = xmlSchemaInitBasicType("ID", XML_SCHEMAS_ID,
+ xmlSchemaTypeNCNameDef);
+ xmlSchemaTypeIdrefDef = xmlSchemaInitBasicType("IDREF",
+ XML_SCHEMAS_IDREF,
+ xmlSchemaTypeNCNameDef);
+ xmlSchemaTypeEntityDef = xmlSchemaInitBasicType("ENTITY",
+ XML_SCHEMAS_ENTITY,
+ xmlSchemaTypeNCNameDef);
+ /*
+ * Derived list types.
+ */
+ /* ENTITIES */
+ xmlSchemaTypeEntitiesDef = xmlSchemaInitBasicType("ENTITIES",
+ XML_SCHEMAS_ENTITIES,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeEntitiesDef->subtypes = xmlSchemaTypeEntityDef;
+ /* IDREFS */
+ xmlSchemaTypeIdrefsDef = xmlSchemaInitBasicType("IDREFS",
+ XML_SCHEMAS_IDREFS,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeIdrefsDef->subtypes = xmlSchemaTypeIdrefDef;
+
+ /* NMTOKENS */
+ xmlSchemaTypeNmtokensDef = xmlSchemaInitBasicType("NMTOKENS",
+ XML_SCHEMAS_NMTOKENS,
+ xmlSchemaTypeAnySimpleTypeDef);
+ xmlSchemaTypeNmtokensDef->subtypes = xmlSchemaTypeNmtokenDef;
+
+ xmlSchemaTypesInitialized = 1;
+}
+
+/**
+ * xmlSchemaCleanupTypes:
+ *
+ * Cleanup the default XML Schemas type library
+ */
+void
+xmlSchemaCleanupTypes(void) {
+ if (xmlSchemaTypesInitialized == 0)
+ return;
+ /*
+ * Free xs:anyType.
+ */
+ {
+ xmlSchemaParticlePtr particle;
+ /* Attribute wildcard. */
+ xmlSchemaFreeWildcard(xmlSchemaTypeAnyTypeDef->attributeWildcard);
+ /* Content type. */
+ particle = (xmlSchemaParticlePtr) xmlSchemaTypeAnyTypeDef->subtypes;
+ /* Wildcard. */
+ xmlSchemaFreeWildcard((xmlSchemaWildcardPtr)
+ particle->children->children->children);
+ xmlFree((xmlSchemaParticlePtr) particle->children->children);
+ /* Sequence model group. */
+ xmlFree((xmlSchemaModelGroupPtr) particle->children);
+ xmlFree((xmlSchemaParticlePtr) particle);
+ xmlSchemaTypeAnyTypeDef->subtypes = NULL;
+ }
+ xmlHashFree(xmlSchemaTypesBank, (xmlHashDeallocator) xmlSchemaFreeType);
+ xmlSchemaTypesInitialized = 0;
+}
+
+/**
+ * xmlSchemaIsBuiltInTypeFacet:
+ * @type: the built-in type
+ * @facetType: the facet type
+ *
+ * Evaluates if a specific facet can be
+ * used in conjunction with a type.
+ *
+ * Returns 1 if the facet can be used with the given built-in type,
+ * 0 otherwise and -1 in case the type is not a built-in type.
+ */
+int
+xmlSchemaIsBuiltInTypeFacet(xmlSchemaTypePtr type, int facetType)
+{
+ if (type == NULL)
+ return (-1);
+ if (type->type != XML_SCHEMA_TYPE_BASIC)
+ return (-1);
+ switch (type->builtInType) {
+ case XML_SCHEMAS_BOOLEAN:
+ if ((facetType == XML_SCHEMA_FACET_PATTERN) ||
+ (facetType == XML_SCHEMA_FACET_WHITESPACE))
+ return (1);
+ else
+ return (0);
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NOTATION:
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_ANYURI:
+ case XML_SCHEMAS_BASE64BINARY:
+ case XML_SCHEMAS_HEXBINARY:
+ if ((facetType == XML_SCHEMA_FACET_LENGTH) ||
+ (facetType == XML_SCHEMA_FACET_MINLENGTH) ||
+ (facetType == XML_SCHEMA_FACET_MAXLENGTH) ||
+ (facetType == XML_SCHEMA_FACET_PATTERN) ||
+ (facetType == XML_SCHEMA_FACET_ENUMERATION) ||
+ (facetType == XML_SCHEMA_FACET_WHITESPACE))
+ return (1);
+ else
+ return (0);
+ case XML_SCHEMAS_DECIMAL:
+ if ((facetType == XML_SCHEMA_FACET_TOTALDIGITS) ||
+ (facetType == XML_SCHEMA_FACET_FRACTIONDIGITS) ||
+ (facetType == XML_SCHEMA_FACET_PATTERN) ||
+ (facetType == XML_SCHEMA_FACET_WHITESPACE) ||
+ (facetType == XML_SCHEMA_FACET_ENUMERATION) ||
+ (facetType == XML_SCHEMA_FACET_MAXINCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MININCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
+ return (1);
+ else
+ return (0);
+ case XML_SCHEMAS_TIME:
+ case XML_SCHEMAS_GDAY:
+ case XML_SCHEMAS_GMONTH:
+ case XML_SCHEMAS_GMONTHDAY:
+ case XML_SCHEMAS_GYEAR:
+ case XML_SCHEMAS_GYEARMONTH:
+ case XML_SCHEMAS_DATE:
+ case XML_SCHEMAS_DATETIME:
+ case XML_SCHEMAS_DURATION:
+ case XML_SCHEMAS_FLOAT:
+ case XML_SCHEMAS_DOUBLE:
+ if ((facetType == XML_SCHEMA_FACET_PATTERN) ||
+ (facetType == XML_SCHEMA_FACET_ENUMERATION) ||
+ (facetType == XML_SCHEMA_FACET_WHITESPACE) ||
+ (facetType == XML_SCHEMA_FACET_MAXINCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MAXEXCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MININCLUSIVE) ||
+ (facetType == XML_SCHEMA_FACET_MINEXCLUSIVE))
+ return (1);
+ else
+ return (0);
+ default:
+ break;
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaGetBuiltInType:
+ * @type: the type of the built in type
+ *
+ * Gives you the type struct for a built-in
+ * type by its type id.
+ *
+ * Returns the type if found, NULL otherwise.
+ */
+xmlSchemaTypePtr
+xmlSchemaGetBuiltInType(xmlSchemaValType type)
+{
+ if (xmlSchemaTypesInitialized == 0)
+ xmlSchemaInitTypes();
+ switch (type) {
+
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ return (xmlSchemaTypeAnySimpleTypeDef);
+ case XML_SCHEMAS_STRING:
+ return (xmlSchemaTypeStringDef);
+ case XML_SCHEMAS_NORMSTRING:
+ return (xmlSchemaTypeNormStringDef);
+ case XML_SCHEMAS_DECIMAL:
+ return (xmlSchemaTypeDecimalDef);
+ case XML_SCHEMAS_TIME:
+ return (xmlSchemaTypeTimeDef);
+ case XML_SCHEMAS_GDAY:
+ return (xmlSchemaTypeGDayDef);
+ case XML_SCHEMAS_GMONTH:
+ return (xmlSchemaTypeGMonthDef);
+ case XML_SCHEMAS_GMONTHDAY:
+ return (xmlSchemaTypeGMonthDayDef);
+ case XML_SCHEMAS_GYEAR:
+ return (xmlSchemaTypeGYearDef);
+ case XML_SCHEMAS_GYEARMONTH:
+ return (xmlSchemaTypeGYearMonthDef);
+ case XML_SCHEMAS_DATE:
+ return (xmlSchemaTypeDateDef);
+ case XML_SCHEMAS_DATETIME:
+ return (xmlSchemaTypeDatetimeDef);
+ case XML_SCHEMAS_DURATION:
+ return (xmlSchemaTypeDurationDef);
+ case XML_SCHEMAS_FLOAT:
+ return (xmlSchemaTypeFloatDef);
+ case XML_SCHEMAS_DOUBLE:
+ return (xmlSchemaTypeDoubleDef);
+ case XML_SCHEMAS_BOOLEAN:
+ return (xmlSchemaTypeBooleanDef);
+ case XML_SCHEMAS_TOKEN:
+ return (xmlSchemaTypeTokenDef);
+ case XML_SCHEMAS_LANGUAGE:
+ return (xmlSchemaTypeLanguageDef);
+ case XML_SCHEMAS_NMTOKEN:
+ return (xmlSchemaTypeNmtokenDef);
+ case XML_SCHEMAS_NMTOKENS:
+ return (xmlSchemaTypeNmtokensDef);
+ case XML_SCHEMAS_NAME:
+ return (xmlSchemaTypeNameDef);
+ case XML_SCHEMAS_QNAME:
+ return (xmlSchemaTypeQNameDef);
+ case XML_SCHEMAS_NCNAME:
+ return (xmlSchemaTypeNCNameDef);
+ case XML_SCHEMAS_ID:
+ return (xmlSchemaTypeIdDef);
+ case XML_SCHEMAS_IDREF:
+ return (xmlSchemaTypeIdrefDef);
+ case XML_SCHEMAS_IDREFS:
+ return (xmlSchemaTypeIdrefsDef);
+ case XML_SCHEMAS_ENTITY:
+ return (xmlSchemaTypeEntityDef);
+ case XML_SCHEMAS_ENTITIES:
+ return (xmlSchemaTypeEntitiesDef);
+ case XML_SCHEMAS_NOTATION:
+ return (xmlSchemaTypeNotationDef);
+ case XML_SCHEMAS_ANYURI:
+ return (xmlSchemaTypeAnyURIDef);
+ case XML_SCHEMAS_INTEGER:
+ return (xmlSchemaTypeIntegerDef);
+ case XML_SCHEMAS_NPINTEGER:
+ return (xmlSchemaTypeNonPositiveIntegerDef);
+ case XML_SCHEMAS_NINTEGER:
+ return (xmlSchemaTypeNegativeIntegerDef);
+ case XML_SCHEMAS_NNINTEGER:
+ return (xmlSchemaTypeNonNegativeIntegerDef);
+ case XML_SCHEMAS_PINTEGER:
+ return (xmlSchemaTypePositiveIntegerDef);
+ case XML_SCHEMAS_INT:
+ return (xmlSchemaTypeIntDef);
+ case XML_SCHEMAS_UINT:
+ return (xmlSchemaTypeUnsignedIntDef);
+ case XML_SCHEMAS_LONG:
+ return (xmlSchemaTypeLongDef);
+ case XML_SCHEMAS_ULONG:
+ return (xmlSchemaTypeUnsignedLongDef);
+ case XML_SCHEMAS_SHORT:
+ return (xmlSchemaTypeShortDef);
+ case XML_SCHEMAS_USHORT:
+ return (xmlSchemaTypeUnsignedShortDef);
+ case XML_SCHEMAS_BYTE:
+ return (xmlSchemaTypeByteDef);
+ case XML_SCHEMAS_UBYTE:
+ return (xmlSchemaTypeUnsignedByteDef);
+ case XML_SCHEMAS_HEXBINARY:
+ return (xmlSchemaTypeHexBinaryDef);
+ case XML_SCHEMAS_BASE64BINARY:
+ return (xmlSchemaTypeBase64BinaryDef);
+ case XML_SCHEMAS_ANYTYPE:
+ return (xmlSchemaTypeAnyTypeDef);
+ default:
+ return (NULL);
+ }
+}
+
+/**
+ * xmlSchemaValueAppend:
+ * @prev: the value
+ * @cur: the value to be appended
+ *
+ * Appends a next sibling to a list of computed values.
+ *
+ * Returns 0 if succeeded and -1 on API errors.
+ */
+int
+xmlSchemaValueAppend(xmlSchemaValPtr prev, xmlSchemaValPtr cur) {
+
+ if ((prev == NULL) || (cur == NULL))
+ return (-1);
+ prev->next = cur;
+ return (0);
+}
+
+/**
+ * xmlSchemaValueGetNext:
+ * @cur: the value
+ *
+ * Accessor for the next sibling of a list of computed values.
+ *
+ * Returns the next value or NULL if there was none, or on
+ * API errors.
+ */
+xmlSchemaValPtr
+xmlSchemaValueGetNext(xmlSchemaValPtr cur) {
+
+ if (cur == NULL)
+ return (NULL);
+ return (cur->next);
+}
+
+/**
+ * xmlSchemaValueGetAsString:
+ * @val: the value
+ *
+ * Accessor for the string value of a computed value.
+ *
+ * Returns the string value or NULL if there was none, or on
+ * API errors.
+ */
+const xmlChar *
+xmlSchemaValueGetAsString(xmlSchemaValPtr val)
+{
+ if (val == NULL)
+ return (NULL);
+ switch (val->type) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_ENTITY:
+ case XML_SCHEMAS_ANYURI:
+ return (BAD_CAST val->value.str);
+ default:
+ break;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlSchemaValueGetAsBoolean:
+ * @val: the value
+ *
+ * Accessor for the boolean value of a computed value.
+ *
+ * Returns 1 if true and 0 if false, or in case of an error. Hmm.
+ */
+int
+xmlSchemaValueGetAsBoolean(xmlSchemaValPtr val)
+{
+ if ((val == NULL) || (val->type != XML_SCHEMAS_BOOLEAN))
+ return (0);
+ return (val->value.b);
+}
+
+/**
+ * xmlSchemaNewStringValue:
+ * @type: the value type
+ * @value: the value
+ *
+ * Allocate a new simple type value. The type can be
+ * of XML_SCHEMAS_STRING.
+ * WARNING: This one is intended to be expanded for other
+ * string based types. We need this for anySimpleType as well.
+ * The given value is consumed and freed with the struct.
+ *
+ * Returns a pointer to the new value or NULL in case of error
+ */
+xmlSchemaValPtr
+xmlSchemaNewStringValue(xmlSchemaValType type,
+ const xmlChar *value)
+{
+ xmlSchemaValPtr val;
+
+ if (type != XML_SCHEMAS_STRING)
+ return(NULL);
+ val = (xmlSchemaValPtr) xmlMalloc(sizeof(xmlSchemaVal));
+ if (val == NULL) {
+ return(NULL);
+ }
+ memset(val, 0, sizeof(xmlSchemaVal));
+ val->type = type;
+ val->value.str = (xmlChar *) value;
+ return(val);
+}
+
+/**
+ * xmlSchemaNewNOTATIONValue:
+ * @name: the notation name
+ * @ns: the notation namespace name or NULL
+ *
+ * Allocate a new NOTATION value.
+ * The given values are consumed and freed with the struct.
+ *
+ * Returns a pointer to the new value or NULL in case of error
+ */
+xmlSchemaValPtr
+xmlSchemaNewNOTATIONValue(const xmlChar *name,
+ const xmlChar *ns)
+{
+ xmlSchemaValPtr val;
+
+ val = xmlSchemaNewValue(XML_SCHEMAS_NOTATION);
+ if (val == NULL)
+ return (NULL);
+
+ val->value.qname.name = (xmlChar *)name;
+ if (ns != NULL)
+ val->value.qname.uri = (xmlChar *)ns;
+ return(val);
+}
+
+/**
+ * xmlSchemaNewQNameValue:
+ * @namespaceName: the namespace name
+ * @localName: the local name
+ *
+ * Allocate a new QName value.
+ * The given values are consumed and freed with the struct.
+ *
+ * Returns a pointer to the new value or NULL in case of an error.
+ */
+xmlSchemaValPtr
+xmlSchemaNewQNameValue(const xmlChar *namespaceName,
+ const xmlChar *localName)
+{
+ xmlSchemaValPtr val;
+
+ val = xmlSchemaNewValue(XML_SCHEMAS_QNAME);
+ if (val == NULL)
+ return (NULL);
+
+ val->value.qname.name = (xmlChar *) localName;
+ val->value.qname.uri = (xmlChar *) namespaceName;
+ return(val);
+}
+
+/**
+ * xmlSchemaFreeValue:
+ * @value: the value to free
+ *
+ * Cleanup the default XML Schemas type library
+ */
+void
+xmlSchemaFreeValue(xmlSchemaValPtr value) {
+ xmlSchemaValPtr prev;
+
+ while (value != NULL) {
+ switch (value->type) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NMTOKENS:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_IDREFS:
+ case XML_SCHEMAS_ENTITY:
+ case XML_SCHEMAS_ENTITIES:
+ case XML_SCHEMAS_ANYURI:
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ if (value->value.str != NULL)
+ xmlFree(value->value.str);
+ break;
+ case XML_SCHEMAS_NOTATION:
+ case XML_SCHEMAS_QNAME:
+ if (value->value.qname.uri != NULL)
+ xmlFree(value->value.qname.uri);
+ if (value->value.qname.name != NULL)
+ xmlFree(value->value.qname.name);
+ break;
+ case XML_SCHEMAS_HEXBINARY:
+ if (value->value.hex.str != NULL)
+ xmlFree(value->value.hex.str);
+ break;
+ case XML_SCHEMAS_BASE64BINARY:
+ if (value->value.base64.str != NULL)
+ xmlFree(value->value.base64.str);
+ break;
+ default:
+ break;
+ }
+ prev = value;
+ value = value->next;
+ xmlFree(prev);
+ }
+}
+
+/**
+ * xmlSchemaGetPredefinedType:
+ * @name: the type name
+ * @ns: the URI of the namespace usually "http://www.w3.org/2001/XMLSchema"
+ *
+ * Lookup a type in the default XML Schemas type library
+ *
+ * Returns the type if found, NULL otherwise
+ */
+xmlSchemaTypePtr
+xmlSchemaGetPredefinedType(const xmlChar *name, const xmlChar *ns) {
+ if (xmlSchemaTypesInitialized == 0)
+ xmlSchemaInitTypes();
+ if (name == NULL)
+ return(NULL);
+ return((xmlSchemaTypePtr) xmlHashLookup2(xmlSchemaTypesBank, name, ns));
+}
+
+/**
+ * xmlSchemaGetBuiltInListSimpleTypeItemType:
+ * @type: the built-in simple type.
+ *
+ * Lookup function
+ *
+ * Returns the item type of @type as defined by the built-in datatype
+ * hierarchy of XML Schema Part 2: Datatypes, or NULL in case of an error.
+ */
+xmlSchemaTypePtr
+xmlSchemaGetBuiltInListSimpleTypeItemType(xmlSchemaTypePtr type)
+{
+ if ((type == NULL) || (type->type != XML_SCHEMA_TYPE_BASIC))
+ return (NULL);
+ switch (type->builtInType) {
+ case XML_SCHEMAS_NMTOKENS:
+ return (xmlSchemaTypeNmtokenDef );
+ case XML_SCHEMAS_IDREFS:
+ return (xmlSchemaTypeIdrefDef);
+ case XML_SCHEMAS_ENTITIES:
+ return (xmlSchemaTypeEntityDef);
+ default:
+ return (NULL);
+ }
+}
+
+/****************************************************************
+ * *
+ * Convenience macros and functions *
+ * *
+ ****************************************************************/
+
+#define IS_TZO_CHAR(c) \
+ ((c == 0) || (c == 'Z') || (c == '+') || (c == '-'))
+
+#define VALID_YEAR(yr) (yr != 0)
+#define VALID_MONTH(mon) ((mon >= 1) && (mon <= 12))
+/* VALID_DAY should only be used when month is unknown */
+#define VALID_DAY(day) ((day >= 1) && (day <= 31))
+#define VALID_HOUR(hr) ((hr >= 0) && (hr <= 23))
+#define VALID_MIN(min) ((min >= 0) && (min <= 59))
+#define VALID_SEC(sec) ((sec >= 0) && (sec < 60))
+#define VALID_TZO(tzo) ((tzo > -840) && (tzo < 840))
+#define IS_LEAP(y) \
+ (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0))
+
+static const unsigned int daysInMonth[12] =
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+static const unsigned int daysInMonthLeap[12] =
+ { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+
+#define MAX_DAYINMONTH(yr,mon) \
+ (IS_LEAP(yr) ? daysInMonthLeap[mon - 1] : daysInMonth[mon - 1])
+
+#define VALID_MDAY(dt) \
+ (IS_LEAP(dt->year) ? \
+ (dt->day <= daysInMonthLeap[dt->mon - 1]) : \
+ (dt->day <= daysInMonth[dt->mon - 1]))
+
+#define VALID_DATE(dt) \
+ (VALID_YEAR(dt->year) && VALID_MONTH(dt->mon) && VALID_MDAY(dt))
+
+#define VALID_TIME(dt) \
+ (VALID_HOUR(dt->hour) && VALID_MIN(dt->min) && \
+ VALID_SEC(dt->sec) && VALID_TZO(dt->tzo))
+
+#define VALID_DATETIME(dt) \
+ (VALID_DATE(dt) && VALID_TIME(dt))
+
+#define SECS_PER_MIN (60)
+#define SECS_PER_HOUR (60 * SECS_PER_MIN)
+#define SECS_PER_DAY (24 * SECS_PER_HOUR)
+
+static const long dayInYearByMonth[12] =
+ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
+static const long dayInLeapYearByMonth[12] =
+ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 };
+
+#define DAY_IN_YEAR(day, month, year) \
+ ((IS_LEAP(year) ? \
+ dayInLeapYearByMonth[month - 1] : \
+ dayInYearByMonth[month - 1]) + day)
+
+#ifdef DEBUG
+#define DEBUG_DATE(dt) \
+ xmlGenericError(xmlGenericErrorContext, \
+ "type=%o %04ld-%02u-%02uT%02u:%02u:%03f", \
+ dt->type,dt->value.date.year,dt->value.date.mon, \
+ dt->value.date.day,dt->value.date.hour,dt->value.date.min, \
+ dt->value.date.sec); \
+ if (dt->value.date.tz_flag) \
+ if (dt->value.date.tzo != 0) \
+ xmlGenericError(xmlGenericErrorContext, \
+ "%+05d\n",dt->value.date.tzo); \
+ else \
+ xmlGenericError(xmlGenericErrorContext, "Z\n"); \
+ else \
+ xmlGenericError(xmlGenericErrorContext,"\n")
+#else
+#define DEBUG_DATE(dt)
+#endif
+
+/**
+ * _xmlSchemaParseGYear:
+ * @dt: pointer to a date structure
+ * @str: pointer to the string to analyze
+ *
+ * Parses a xs:gYear without time zone and fills in the appropriate
+ * field of the @dt structure. @str is updated to point just after the
+ * xs:gYear. It is supposed that @dt->year is big enough to contain
+ * the year.
+ *
+ * Returns 0 or the error code
+ */
+static int
+_xmlSchemaParseGYear (xmlSchemaValDatePtr dt, const xmlChar **str) {
+ const xmlChar *cur = *str, *firstChar;
+ int isneg = 0, digcnt = 0;
+
+ if (((*cur < '0') || (*cur > '9')) &&
+ (*cur != '-') && (*cur != '+'))
+ return -1;
+
+ if (*cur == '-') {
+ isneg = 1;
+ cur++;
+ }
+
+ firstChar = cur;
+
+ while ((*cur >= '0') && (*cur <= '9')) {
+ dt->year = dt->year * 10 + (*cur - '0');
+ cur++;
+ digcnt++;
+ }
+
+ /* year must be at least 4 digits (CCYY); over 4
+ * digits cannot have a leading zero. */
+ if ((digcnt < 4) || ((digcnt > 4) && (*firstChar == '0')))
+ return 1;
+
+ if (isneg)
+ dt->year = - dt->year;
+
+ if (!VALID_YEAR(dt->year))
+ return 2;
+
+ *str = cur;
+ return 0;
+}
+
+/**
+ * PARSE_2_DIGITS:
+ * @num: the integer to fill in
+ * @cur: an #xmlChar *
+ * @invalid: an integer
+ *
+ * Parses a 2-digits integer and updates @num with the value. @cur is
+ * updated to point just after the integer.
+ * In case of error, @invalid is set to %TRUE, values of @num and
+ * @cur are undefined.
+ */
+#define PARSE_2_DIGITS(num, cur, invalid) \
+ if ((cur[0] < '0') || (cur[0] > '9') || \
+ (cur[1] < '0') || (cur[1] > '9')) \
+ invalid = 1; \
+ else \
+ num = (cur[0] - '0') * 10 + (cur[1] - '0'); \
+ cur += 2;
+
+/**
+ * PARSE_FLOAT:
+ * @num: the double to fill in
+ * @cur: an #xmlChar *
+ * @invalid: an integer
+ *
+ * Parses a float and updates @num with the value. @cur is
+ * updated to point just after the float. The float must have a
+ * 2-digits integer part and may or may not have a decimal part.
+ * In case of error, @invalid is set to %TRUE, values of @num and
+ * @cur are undefined.
+ */
+#define PARSE_FLOAT(num, cur, invalid) \
+ PARSE_2_DIGITS(num, cur, invalid); \
+ if (!invalid && (*cur == '.')) { \
+ double mult = 1; \
+ cur++; \
+ if ((*cur < '0') || (*cur > '9')) \
+ invalid = 1; \
+ while ((*cur >= '0') && (*cur <= '9')) { \
+ mult /= 10; \
+ num += (*cur - '0') * mult; \
+ cur++; \
+ } \
+ }
+
+/**
+ * _xmlSchemaParseGMonth:
+ * @dt: pointer to a date structure
+ * @str: pointer to the string to analyze
+ *
+ * Parses a xs:gMonth without time zone and fills in the appropriate
+ * field of the @dt structure. @str is updated to point just after the
+ * xs:gMonth.
+ *
+ * Returns 0 or the error code
+ */
+static int
+_xmlSchemaParseGMonth (xmlSchemaValDatePtr dt, const xmlChar **str) {
+ const xmlChar *cur = *str;
+ int ret = 0;
+ unsigned int value = 0;
+
+ PARSE_2_DIGITS(value, cur, ret);
+ if (ret != 0)
+ return ret;
+
+ if (!VALID_MONTH(value))
+ return 2;
+
+ dt->mon = value;
+
+ *str = cur;
+ return 0;
+}
+
+/**
+ * _xmlSchemaParseGDay:
+ * @dt: pointer to a date structure
+ * @str: pointer to the string to analyze
+ *
+ * Parses a xs:gDay without time zone and fills in the appropriate
+ * field of the @dt structure. @str is updated to point just after the
+ * xs:gDay.
+ *
+ * Returns 0 or the error code
+ */
+static int
+_xmlSchemaParseGDay (xmlSchemaValDatePtr dt, const xmlChar **str) {
+ const xmlChar *cur = *str;
+ int ret = 0;
+ unsigned int value = 0;
+
+ PARSE_2_DIGITS(value, cur, ret);
+ if (ret != 0)
+ return ret;
+
+ if (!VALID_DAY(value))
+ return 2;
+
+ dt->day = value;
+ *str = cur;
+ return 0;
+}
+
+/**
+ * _xmlSchemaParseTime:
+ * @dt: pointer to a date structure
+ * @str: pointer to the string to analyze
+ *
+ * Parses a xs:time without time zone and fills in the appropriate
+ * fields of the @dt structure. @str is updated to point just after the
+ * xs:time.
+ * In case of error, values of @dt fields are undefined.
+ *
+ * Returns 0 or the error code
+ */
+static int
+_xmlSchemaParseTime (xmlSchemaValDatePtr dt, const xmlChar **str) {
+ const xmlChar *cur = *str;
+ int ret = 0;
+ int value = 0;
+
+ PARSE_2_DIGITS(value, cur, ret);
+ if (ret != 0)
+ return ret;
+ if (*cur != ':')
+ return 1;
+ if (!VALID_HOUR(value))
+ return 2;
+ cur++;
+
+ /* the ':' insures this string is xs:time */
+ dt->hour = value;
+
+ PARSE_2_DIGITS(value, cur, ret);
+ if (ret != 0)
+ return ret;
+ if (!VALID_MIN(value))
+ return 2;
+ dt->min = value;
+
+ if (*cur != ':')
+ return 1;
+ cur++;
+
+ PARSE_FLOAT(dt->sec, cur, ret);
+ if (ret != 0)
+ return ret;
+
+ if ((!VALID_SEC(dt->sec)) || (!VALID_TZO(dt->tzo)))
+ return 2;
+
+ *str = cur;
+ return 0;
+}
+
+/**
+ * _xmlSchemaParseTimeZone:
+ * @dt: pointer to a date structure
+ * @str: pointer to the string to analyze
+ *
+ * Parses a time zone without time zone and fills in the appropriate
+ * field of the @dt structure. @str is updated to point just after the
+ * time zone.
+ *
+ * Returns 0 or the error code
+ */
+static int
+_xmlSchemaParseTimeZone (xmlSchemaValDatePtr dt, const xmlChar **str) {
+ const xmlChar *cur;
+ int ret = 0;
+
+ if (str == NULL)
+ return -1;
+ cur = *str;
+
+ switch (*cur) {
+ case 0:
+ dt->tz_flag = 0;
+ dt->tzo = 0;
+ break;
+
+ case 'Z':
+ dt->tz_flag = 1;
+ dt->tzo = 0;
+ cur++;
+ break;
+
+ case '+':
+ case '-': {
+ int isneg = 0, tmp = 0;
+ isneg = (*cur == '-');
+
+ cur++;
+
+ PARSE_2_DIGITS(tmp, cur, ret);
+ if (ret != 0)
+ return ret;
+ if (!VALID_HOUR(tmp))
+ return 2;
+
+ if (*cur != ':')
+ return 1;
+ cur++;
+
+ dt->tzo = tmp * 60;
+
+ PARSE_2_DIGITS(tmp, cur, ret);
+ if (ret != 0)
+ return ret;
+ if (!VALID_MIN(tmp))
+ return 2;
+
+ dt->tzo += tmp;
+ if (isneg)
+ dt->tzo = - dt->tzo;
+
+ if (!VALID_TZO(dt->tzo))
+ return 2;
+
+ dt->tz_flag = 1;
+ break;
+ }
+ default:
+ return 1;
+ }
+
+ *str = cur;
+ return 0;
+}
+
+/**
+ * _xmlSchemaBase64Decode:
+ * @ch: a character
+ *
+ * Converts a base64 encoded character to its base 64 value.
+ *
+ * Returns 0-63 (value), 64 (pad), or -1 (not recognized)
+ */
+static int
+_xmlSchemaBase64Decode (const xmlChar ch) {
+ if (('A' <= ch) && (ch <= 'Z')) return ch - 'A';
+ if (('a' <= ch) && (ch <= 'z')) return ch - 'a' + 26;
+ if (('0' <= ch) && (ch <= '9')) return ch - '0' + 52;
+ if ('+' == ch) return 62;
+ if ('/' == ch) return 63;
+ if ('=' == ch) return 64;
+ return -1;
+}
+
+/****************************************************************
+ * *
+ * XML Schema Dates/Times Datatypes Handling *
+ * *
+ ****************************************************************/
+
+/**
+ * PARSE_DIGITS:
+ * @num: the integer to fill in
+ * @cur: an #xmlChar *
+ * @num_type: an integer flag
+ *
+ * Parses a digits integer and updates @num with the value. @cur is
+ * updated to point just after the integer.
+ * In case of error, @num_type is set to -1, values of @num and
+ * @cur are undefined.
+ */
+#define PARSE_DIGITS(num, cur, num_type) \
+ if ((*cur < '0') || (*cur > '9')) \
+ num_type = -1; \
+ else \
+ while ((*cur >= '0') && (*cur <= '9')) { \
+ num = num * 10 + (*cur - '0'); \
+ cur++; \
+ }
+
+/**
+ * PARSE_NUM:
+ * @num: the double to fill in
+ * @cur: an #xmlChar *
+ * @num_type: an integer flag
+ *
+ * Parses a float or integer and updates @num with the value. @cur is
+ * updated to point just after the number. If the number is a float,
+ * then it must have an integer part and a decimal part; @num_type will
+ * be set to 1. If there is no decimal part, @num_type is set to zero.
+ * In case of error, @num_type is set to -1, values of @num and
+ * @cur are undefined.
+ */
+#define PARSE_NUM(num, cur, num_type) \
+ num = 0; \
+ PARSE_DIGITS(num, cur, num_type); \
+ if (!num_type && (*cur == '.')) { \
+ double mult = 1; \
+ cur++; \
+ if ((*cur < '0') || (*cur > '9')) \
+ num_type = -1; \
+ else \
+ num_type = 1; \
+ while ((*cur >= '0') && (*cur <= '9')) { \
+ mult /= 10; \
+ num += (*cur - '0') * mult; \
+ cur++; \
+ } \
+ }
+
+/**
+ * xmlSchemaValidateDates:
+ * @type: the expected type or XML_SCHEMAS_UNKNOWN
+ * @dateTime: string to analyze
+ * @val: the return computed value
+ *
+ * Check that @dateTime conforms to the lexical space of one of the date types.
+ * if true a value is computed and returned in @val.
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateDates (xmlSchemaValType type,
+ const xmlChar *dateTime, xmlSchemaValPtr *val,
+ int collapse) {
+ xmlSchemaValPtr dt;
+ int ret;
+ const xmlChar *cur = dateTime;
+
+#define RETURN_TYPE_IF_VALID(t) \
+ if (IS_TZO_CHAR(*cur)) { \
+ ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur); \
+ if (ret == 0) { \
+ if (*cur != 0) \
+ goto error; \
+ dt->type = t; \
+ goto done; \
+ } \
+ }
+
+ if (dateTime == NULL)
+ return -1;
+
+ if (collapse)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ if ((*cur != '-') && (*cur < '0') && (*cur > '9'))
+ return 1;
+
+ dt = xmlSchemaNewValue(XML_SCHEMAS_UNKNOWN);
+ if (dt == NULL)
+ return -1;
+
+ if ((cur[0] == '-') && (cur[1] == '-')) {
+ /*
+ * It's an incomplete date (xs:gMonthDay, xs:gMonth or
+ * xs:gDay)
+ */
+ cur += 2;
+
+ /* is it an xs:gDay? */
+ if (*cur == '-') {
+ if (type == XML_SCHEMAS_GMONTH)
+ goto error;
+ ++cur;
+ ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
+ if (ret != 0)
+ goto error;
+
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_GDAY);
+
+ goto error;
+ }
+
+ /*
+ * it should be an xs:gMonthDay or xs:gMonth
+ */
+ ret = _xmlSchemaParseGMonth(&(dt->value.date), &cur);
+ if (ret != 0)
+ goto error;
+
+ /*
+ * a '-' char could indicate this type is xs:gMonthDay or
+ * a negative time zone offset. Check for xs:gMonthDay first.
+ * Also the first three char's of a negative tzo (-MM:SS) can
+ * appear to be a valid day; so even if the day portion
+ * of the xs:gMonthDay verifies, we must insure it was not
+ * a tzo.
+ */
+ if (*cur == '-') {
+ const xmlChar *rewnd = cur;
+ cur++;
+
+ ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
+ if ((ret == 0) && ((*cur == 0) || (*cur != ':'))) {
+
+ /*
+ * we can use the VALID_MDAY macro to validate the month
+ * and day because the leap year test will flag year zero
+ * as a leap year (even though zero is an invalid year).
+ * FUTURE TODO: Zero will become valid in XML Schema 1.1
+ * probably.
+ */
+ if (VALID_MDAY((&(dt->value.date)))) {
+
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_GMONTHDAY);
+
+ goto error;
+ }
+ }
+
+ /*
+ * not xs:gMonthDay so rewind and check if just xs:gMonth
+ * with an optional time zone.
+ */
+ cur = rewnd;
+ }
+
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_GMONTH);
+
+ goto error;
+ }
+
+ /*
+ * It's a right-truncated date or an xs:time.
+ * Try to parse an xs:time then fallback on right-truncated dates.
+ */
+ if ((*cur >= '0') && (*cur <= '9')) {
+ ret = _xmlSchemaParseTime(&(dt->value.date), &cur);
+ if (ret == 0) {
+ /* it's an xs:time */
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_TIME);
+ }
+ }
+
+ /* fallback on date parsing */
+ cur = dateTime;
+
+ ret = _xmlSchemaParseGYear(&(dt->value.date), &cur);
+ if (ret != 0)
+ goto error;
+
+ /* is it an xs:gYear? */
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_GYEAR);
+
+ if (*cur != '-')
+ goto error;
+ cur++;
+
+ ret = _xmlSchemaParseGMonth(&(dt->value.date), &cur);
+ if (ret != 0)
+ goto error;
+
+ /* is it an xs:gYearMonth? */
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_GYEARMONTH);
+
+ if (*cur != '-')
+ goto error;
+ cur++;
+
+ ret = _xmlSchemaParseGDay(&(dt->value.date), &cur);
+ if ((ret != 0) || !VALID_DATE((&(dt->value.date))))
+ goto error;
+
+ /* is it an xs:date? */
+ RETURN_TYPE_IF_VALID(XML_SCHEMAS_DATE);
+
+ if (*cur != 'T')
+ goto error;
+ cur++;
+
+ /* it should be an xs:dateTime */
+ ret = _xmlSchemaParseTime(&(dt->value.date), &cur);
+ if (ret != 0)
+ goto error;
+
+ ret = _xmlSchemaParseTimeZone(&(dt->value.date), &cur);
+ if (collapse)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date))))))
+ goto error;
+
+
+ dt->type = XML_SCHEMAS_DATETIME;
+
+done:
+#if 1
+ if ((type != XML_SCHEMAS_UNKNOWN) && (type != dt->type))
+ goto error;
+#else
+ /*
+ * insure the parsed type is equal to or less significant (right
+ * truncated) than the desired type.
+ */
+ if ((type != XML_SCHEMAS_UNKNOWN) && (type != dt->type)) {
+
+ /* time only matches time */
+ if ((type == XML_SCHEMAS_TIME) && (dt->type == XML_SCHEMAS_TIME))
+ goto error;
+
+ if ((type == XML_SCHEMAS_DATETIME) &&
+ ((dt->type != XML_SCHEMAS_DATE) ||
+ (dt->type != XML_SCHEMAS_GYEARMONTH) ||
+ (dt->type != XML_SCHEMAS_GYEAR)))
+ goto error;
+
+ if ((type == XML_SCHEMAS_DATE) &&
+ ((dt->type != XML_SCHEMAS_GYEAR) ||
+ (dt->type != XML_SCHEMAS_GYEARMONTH)))
+ goto error;
+
+ if ((type == XML_SCHEMAS_GYEARMONTH) && (dt->type != XML_SCHEMAS_GYEAR))
+ goto error;
+
+ if ((type == XML_SCHEMAS_GMONTHDAY) && (dt->type != XML_SCHEMAS_GMONTH))
+ goto error;
+ }
+#endif
+
+ if (val != NULL)
+ *val = dt;
+ else
+ xmlSchemaFreeValue(dt);
+
+ return 0;
+
+error:
+ if (dt != NULL)
+ xmlSchemaFreeValue(dt);
+ return 1;
+}
+
+/**
+ * xmlSchemaValidateDuration:
+ * @type: the predefined type
+ * @duration: string to analyze
+ * @val: the return computed value
+ *
+ * Check that @duration conforms to the lexical space of the duration type.
+ * if true a value is computed and returned in @val.
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateDuration (xmlSchemaTypePtr type ATTRIBUTE_UNUSED,
+ const xmlChar *duration, xmlSchemaValPtr *val,
+ int collapse) {
+ const xmlChar *cur = duration;
+ xmlSchemaValPtr dur;
+ int isneg = 0;
+ unsigned int seq = 0;
+ double num;
+ int num_type = 0; /* -1 = invalid, 0 = int, 1 = floating */
+ const xmlChar desig[] = {'Y', 'M', 'D', 'H', 'M', 'S'};
+ const double multi[] = { 0.0, 0.0, 86400.0, 3600.0, 60.0, 1.0, 0.0};
+
+ if (duration == NULL)
+ return -1;
+
+ if (collapse)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ if (*cur == '-') {
+ isneg = 1;
+ cur++;
+ }
+
+ /* duration must start with 'P' (after sign) */
+ if (*cur++ != 'P')
+ return 1;
+
+ if (*cur == 0)
+ return 1;
+
+ dur = xmlSchemaNewValue(XML_SCHEMAS_DURATION);
+ if (dur == NULL)
+ return -1;
+
+ while (*cur != 0) {
+
+ /* input string should be empty or invalid date/time item */
+ if (seq >= sizeof(desig))
+ goto error;
+
+ /* T designator must be present for time items */
+ if (*cur == 'T') {
+ if (seq <= 3) {
+ seq = 3;
+ cur++;
+ } else
+ return 1;
+ } else if (seq == 3)
+ goto error;
+
+ /* parse the number portion of the item */
+ PARSE_NUM(num, cur, num_type);
+
+ if ((num_type == -1) || (*cur == 0))
+ goto error;
+
+ /* update duration based on item type */
+ while (seq < sizeof(desig)) {
+ if (*cur == desig[seq]) {
+
+ /* verify numeric type; only seconds can be float */
+ if ((num_type != 0) && (seq < (sizeof(desig)-1)))
+ goto error;
+
+ switch (seq) {
+ case 0:
+ dur->value.dur.mon = (long)num * 12;
+ break;
+ case 1:
+ dur->value.dur.mon += (long)num;
+ break;
+ default:
+ /* convert to seconds using multiplier */
+ dur->value.dur.sec += num * multi[seq];
+ seq++;
+ break;
+ }
+
+ break; /* exit loop */
+ }
+ /* no date designators found? */
+ if ((++seq == 3) || (seq == 6))
+ goto error;
+ }
+ cur++;
+ if (collapse)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ }
+
+ if (isneg) {
+ dur->value.dur.mon = -dur->value.dur.mon;
+ dur->value.dur.day = -dur->value.dur.day;
+ dur->value.dur.sec = -dur->value.dur.sec;
+ }
+
+ if (val != NULL)
+ *val = dur;
+ else
+ xmlSchemaFreeValue(dur);
+
+ return 0;
+
+error:
+ if (dur != NULL)
+ xmlSchemaFreeValue(dur);
+ return 1;
+}
+
+/**
+ * xmlSchemaStrip:
+ * @value: a value
+ *
+ * Removes the leading and ending spaces of a string
+ *
+ * Returns the new string or NULL if no change was required.
+ */
+static xmlChar *
+xmlSchemaStrip(const xmlChar *value) {
+ const xmlChar *start = value, *end, *f;
+
+ if (value == NULL) return(NULL);
+ while ((*start != 0) && (IS_BLANK_CH(*start))) start++;
+ end = start;
+ while (*end != 0) end++;
+ f = end;
+ end--;
+ while ((end > start) && (IS_BLANK_CH(*end))) end--;
+ end++;
+ if ((start == value) && (f == end)) return(NULL);
+ return(xmlStrndup(start, end - start));
+}
+
+/**
+ * xmlSchemaWhiteSpaceReplace:
+ * @value: a value
+ *
+ * Replaces 0xd, 0x9 and 0xa with a space.
+ *
+ * Returns the new string or NULL if no change was required.
+ */
+xmlChar *
+xmlSchemaWhiteSpaceReplace(const xmlChar *value) {
+ const xmlChar *cur = value;
+ xmlChar *ret = NULL, *mcur;
+
+ if (value == NULL)
+ return(NULL);
+
+ while ((*cur != 0) &&
+ (((*cur) != 0xd) && ((*cur) != 0x9) && ((*cur) != 0xa))) {
+ cur++;
+ }
+ if (*cur == 0)
+ return (NULL);
+ ret = xmlStrdup(value);
+ /* TODO FIXME: I guess gcc will bark at this. */
+ mcur = (xmlChar *) (ret + (cur - value));
+ do {
+ if ( ((*mcur) == 0xd) || ((*mcur) == 0x9) || ((*mcur) == 0xa) )
+ *mcur = ' ';
+ mcur++;
+ } while (*mcur != 0);
+ return(ret);
+}
+
+/**
+ * xmlSchemaCollapseString:
+ * @value: a value
+ *
+ * Removes and normalize white spaces in the string
+ *
+ * Returns the new string or NULL if no change was required.
+ */
+xmlChar *
+xmlSchemaCollapseString(const xmlChar *value) {
+ const xmlChar *start = value, *end, *f;
+ xmlChar *g;
+ int col = 0;
+
+ if (value == NULL) return(NULL);
+ while ((*start != 0) && (IS_BLANK_CH(*start))) start++;
+ end = start;
+ while (*end != 0) {
+ if ((*end == ' ') && (IS_BLANK_CH(end[1]))) {
+ col = end - start;
+ break;
+ } else if ((*end == 0xa) || (*end == 0x9) || (*end == 0xd)) {
+ col = end - start;
+ break;
+ }
+ end++;
+ }
+ if (col == 0) {
+ f = end;
+ end--;
+ while ((end > start) && (IS_BLANK_CH(*end))) end--;
+ end++;
+ if ((start == value) && (f == end)) return(NULL);
+ return(xmlStrndup(start, end - start));
+ }
+ start = xmlStrdup(start);
+ if (start == NULL) return(NULL);
+ g = (xmlChar *) (start + col);
+ end = g;
+ while (*end != 0) {
+ if (IS_BLANK_CH(*end)) {
+ end++;
+ while (IS_BLANK_CH(*end)) end++;
+ if (*end != 0)
+ *g++ = ' ';
+ } else
+ *g++ = *end++;
+ }
+ *g = 0;
+ return((xmlChar *) start);
+}
+
+/**
+ * xmlSchemaValAtomicListNode:
+ * @type: the predefined atomic type for a token in the list
+ * @value: the list value to check
+ * @ret: the return computed value
+ * @node: the node containing the value
+ *
+ * Check that a value conforms to the lexical space of the predefined
+ * list type. if true a value is computed and returned in @ret.
+ *
+ * Returns the number of items if this validates, a negative error code
+ * number otherwise
+ */
+static int
+xmlSchemaValAtomicListNode(xmlSchemaTypePtr type, const xmlChar *value,
+ xmlSchemaValPtr *ret, xmlNodePtr node) {
+ xmlChar *val, *cur, *endval;
+ int nb_values = 0;
+ int tmp = 0;
+
+ if (value == NULL) {
+ return(-1);
+ }
+ val = xmlStrdup(value);
+ if (val == NULL) {
+ return(-1);
+ }
+ if (ret != NULL) {
+ *ret = NULL;
+ }
+ cur = val;
+ /*
+ * Split the list
+ */
+ while (IS_BLANK_CH(*cur)) *cur++ = 0;
+ while (*cur != 0) {
+ if (IS_BLANK_CH(*cur)) {
+ *cur = 0;
+ cur++;
+ while (IS_BLANK_CH(*cur)) *cur++ = 0;
+ } else {
+ nb_values++;
+ cur++;
+ while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
+ }
+ }
+ if (nb_values == 0) {
+ xmlFree(val);
+ return(nb_values);
+ }
+ endval = cur;
+ cur = val;
+ while ((*cur == 0) && (cur != endval)) cur++;
+ while (cur != endval) {
+ tmp = xmlSchemaValPredefTypeNode(type, cur, NULL, node);
+ if (tmp != 0)
+ break;
+ while (*cur != 0) cur++;
+ while ((*cur == 0) && (cur != endval)) cur++;
+ }
+ /* TODO what return value ? c.f. bug #158628
+ if (ret != NULL) {
+ TODO
+ } */
+ xmlFree(val);
+ if (tmp == 0)
+ return(nb_values);
+ return(-1);
+}
+
+/**
+ * xmlSchemaParseUInt:
+ * @str: pointer to the string R/W
+ * @llo: pointer to the low result
+ * @lmi: pointer to the mid result
+ * @lhi: pointer to the high result
+ *
+ * Parse an unsigned long into 3 fields.
+ *
+ * Returns the number of significant digits in the number or
+ * -1 if overflow of the capacity and -2 if it's not a number.
+ */
+static int
+xmlSchemaParseUInt(const xmlChar **str, unsigned long *llo,
+ unsigned long *lmi, unsigned long *lhi) {
+ unsigned long lo = 0, mi = 0, hi = 0;
+ const xmlChar *tmp, *cur = *str;
+ int ret = 0, i = 0;
+
+ if (!((*cur >= '0') && (*cur <= '9')))
+ return(-2);
+
+ while (*cur == '0') { /* ignore leading zeroes */
+ cur++;
+ }
+ tmp = cur;
+ while ((*tmp != 0) && (*tmp >= '0') && (*tmp <= '9')) {
+ i++;tmp++;ret++;
+ }
+ if (i > 24) {
+ *str = tmp;
+ return(-1);
+ }
+ while (i > 16) {
+ hi = hi * 10 + (*cur++ - '0');
+ i--;
+ }
+ while (i > 8) {
+ mi = mi * 10 + (*cur++ - '0');
+ i--;
+ }
+ while (i > 0) {
+ lo = lo * 10 + (*cur++ - '0');
+ i--;
+ }
+
+ *str = cur;
+ *llo = lo;
+ *lmi = mi;
+ *lhi = hi;
+ return(ret);
+}
+
+/**
+ * xmlSchemaValAtomicType:
+ * @type: the predefined type
+ * @value: the value to check
+ * @val: the return computed value
+ * @node: the node containing the value
+ * flags: flags to control the vlidation
+ *
+ * Check that a value conforms to the lexical space of the atomic type.
+ * if true a value is computed and returned in @val.
+ * This checks the value space for list types as well (IDREFS, NMTOKENS).
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value,
+ xmlSchemaValPtr * val, xmlNodePtr node, int flags,
+ xmlSchemaWhitespaceValueType ws,
+ int normOnTheFly, int applyNorm, int createStringValue)
+{
+ xmlSchemaValPtr v;
+ xmlChar *norm = NULL;
+ int ret = 0;
+
+ if (xmlSchemaTypesInitialized == 0)
+ xmlSchemaInitTypes();
+ if (type == NULL)
+ return (-1);
+
+ /*
+ * validating a non existant text node is similar to validating
+ * an empty one.
+ */
+ if (value == NULL)
+ value = BAD_CAST "";
+
+ if (val != NULL)
+ *val = NULL;
+ if ((flags == 0) && (value != NULL)) {
+
+ if ((type->builtInType != XML_SCHEMAS_STRING) &&
+ (type->builtInType != XML_SCHEMAS_ANYTYPE) &&
+ (type->builtInType != XML_SCHEMAS_ANYSIMPLETYPE)) {
+ if (type->builtInType == XML_SCHEMAS_NORMSTRING)
+ norm = xmlSchemaWhiteSpaceReplace(value);
+ else
+ norm = xmlSchemaCollapseString(value);
+ if (norm != NULL)
+ value = norm;
+ }
+ }
+
+ switch (type->builtInType) {
+ case XML_SCHEMAS_UNKNOWN:
+ goto error;
+ case XML_SCHEMAS_ANYTYPE:
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ if ((createStringValue) && (val != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_ANYSIMPLETYPE);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ case XML_SCHEMAS_STRING:
+ if (! normOnTheFly) {
+ const xmlChar *cur = value;
+
+ if (ws == XML_SCHEMA_WHITESPACE_REPLACE) {
+ while (*cur != 0) {
+ if ((*cur == 0xd) || (*cur == 0xa) || (*cur == 0x9)) {
+ goto return1;
+ } else {
+ cur++;
+ }
+ }
+ } else if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE) {
+ while (*cur != 0) {
+ if ((*cur == 0xd) || (*cur == 0xa) || (*cur == 0x9)) {
+ goto return1;
+ } else if IS_WSP_SPACE_CH(*cur) {
+ cur++;
+ if IS_WSP_SPACE_CH(*cur)
+ goto return1;
+ } else {
+ cur++;
+ }
+ }
+ }
+ }
+ if (createStringValue && (val != NULL)) {
+ if (applyNorm) {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ norm = xmlSchemaCollapseString(value);
+ else if (ws == XML_SCHEMA_WHITESPACE_REPLACE)
+ norm = xmlSchemaWhiteSpaceReplace(value);
+ if (norm != NULL)
+ value = norm;
+ }
+ v = xmlSchemaNewValue(XML_SCHEMAS_STRING);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ case XML_SCHEMAS_NORMSTRING:{
+ if (normOnTheFly) {
+ if (applyNorm) {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ norm = xmlSchemaCollapseString(value);
+ else
+ norm = xmlSchemaWhiteSpaceReplace(value);
+ if (norm != NULL)
+ value = norm;
+ }
+ } else {
+ const xmlChar *cur = value;
+ while (*cur != 0) {
+ if ((*cur == 0xd) || (*cur == 0xa) || (*cur == 0x9)) {
+ goto return1;
+ } else {
+ cur++;
+ }
+ }
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_NORMSTRING);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_DECIMAL:{
+ const xmlChar *cur = value;
+ unsigned int len, neg, integ, hasLeadingZeroes;
+ xmlChar cval[25];
+ xmlChar *cptr = cval;
+
+ if ((cur == NULL) || (*cur == 0))
+ goto return1;
+
+ /*
+ * xs:decimal has a whitespace-facet value of 'collapse'.
+ */
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ /*
+ * First we handle an optional sign.
+ */
+ neg = 0;
+ if (*cur == '-') {
+ neg = 1;
+ cur++;
+ } else if (*cur == '+')
+ cur++;
+ /*
+ * Disallow: "", "-", "- "
+ */
+ if (*cur == 0)
+ goto return1;
+ /*
+ * Next we "pre-parse" the number, in preparation for calling
+ * the common routine xmlSchemaParseUInt. We get rid of any
+ * leading zeroes (because we have reserved only 25 chars),
+ * and note the position of a decimal point.
+ */
+ len = 0;
+ integ = ~0u;
+ hasLeadingZeroes = 0;
+ /*
+ * Skip leading zeroes.
+ */
+ while (*cur == '0') {
+ cur++;
+ hasLeadingZeroes = 1;
+ }
+ if (*cur != 0) {
+ do {
+ if ((*cur >= '0') && (*cur <= '9')) {
+ *cptr++ = *cur++;
+ len++;
+ } else if (*cur == '.') {
+ cur++;
+ integ = len;
+ do {
+ if ((*cur >= '0') && (*cur <= '9')) {
+ *cptr++ = *cur++;
+ len++;
+ } else
+ break;
+ } while (len < 24);
+ /*
+ * Disallow "." but allow "00."
+ */
+ if ((len == 0) && (!hasLeadingZeroes))
+ goto return1;
+ break;
+ } else
+ break;
+ } while (len < 24);
+ }
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if (*cur != 0)
+ goto return1; /* error if any extraneous chars */
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_DECIMAL);
+ if (v != NULL) {
+ /*
+ * Now evaluate the significant digits of the number
+ */
+ if (len != 0) {
+
+ if (integ != ~0u) {
+ /*
+ * Get rid of trailing zeroes in the
+ * fractional part.
+ */
+ while ((len != integ) && (*(cptr-1) == '0')) {
+ cptr--;
+ len--;
+ }
+ }
+ /*
+ * Terminate the (preparsed) string.
+ */
+ if (len != 0) {
+ *cptr = 0;
+ cptr = cval;
+
+ xmlSchemaParseUInt((const xmlChar **)&cptr,
+ &v->value.decimal.lo,
+ &v->value.decimal.mi,
+ &v->value.decimal.hi);
+ }
+ }
+ /*
+ * Set the total digits to 1 if a zero value.
+ */
+ v->value.decimal.sign = neg;
+ if (len == 0) {
+ /* Speedup for zero values. */
+ v->value.decimal.total = 1;
+ } else {
+ v->value.decimal.total = len;
+ if (integ == ~0u)
+ v->value.decimal.frac = 0;
+ else
+ v->value.decimal.frac = len - integ;
+ }
+ *val = v;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_TIME:
+ case XML_SCHEMAS_GDAY:
+ case XML_SCHEMAS_GMONTH:
+ case XML_SCHEMAS_GMONTHDAY:
+ case XML_SCHEMAS_GYEAR:
+ case XML_SCHEMAS_GYEARMONTH:
+ case XML_SCHEMAS_DATE:
+ case XML_SCHEMAS_DATETIME:
+ ret = xmlSchemaValidateDates(type->builtInType, value, val,
+ normOnTheFly);
+ break;
+ case XML_SCHEMAS_DURATION:
+ ret = xmlSchemaValidateDuration(type, value, val,
+ normOnTheFly);
+ break;
+ case XML_SCHEMAS_FLOAT:
+ case XML_SCHEMAS_DOUBLE: {
+ const xmlChar *cur = value;
+ int neg = 0;
+ int digits_before = 0;
+ int digits_after = 0;
+
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ if ((cur[0] == 'N') && (cur[1] == 'a') && (cur[2] == 'N')) {
+ cur += 3;
+ if (*cur != 0)
+ goto return1;
+ if (val != NULL) {
+ if (type == xmlSchemaTypeFloatDef) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_FLOAT);
+ if (v != NULL) {
+ v->value.f = (float) xmlXPathNAN;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto error;
+ }
+ } else {
+ v = xmlSchemaNewValue(XML_SCHEMAS_DOUBLE);
+ if (v != NULL) {
+ v->value.d = xmlXPathNAN;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto error;
+ }
+ }
+ *val = v;
+ }
+ goto return0;
+ }
+ if (*cur == '-') {
+ neg = 1;
+ cur++;
+ }
+ if ((cur[0] == 'I') && (cur[1] == 'N') && (cur[2] == 'F')) {
+ cur += 3;
+ if (*cur != 0)
+ goto return1;
+ if (val != NULL) {
+ if (type == xmlSchemaTypeFloatDef) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_FLOAT);
+ if (v != NULL) {
+ if (neg)
+ v->value.f = (float) xmlXPathNINF;
+ else
+ v->value.f = (float) xmlXPathPINF;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto error;
+ }
+ } else {
+ v = xmlSchemaNewValue(XML_SCHEMAS_DOUBLE);
+ if (v != NULL) {
+ if (neg)
+ v->value.d = xmlXPathNINF;
+ else
+ v->value.d = xmlXPathPINF;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto error;
+ }
+ }
+ *val = v;
+ }
+ goto return0;
+ }
+ if ((neg == 0) && (*cur == '+'))
+ cur++;
+ if ((cur[0] == 0) || (cur[0] == '+') || (cur[0] == '-'))
+ goto return1;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ cur++;
+ digits_before++;
+ }
+ if (*cur == '.') {
+ cur++;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ cur++;
+ digits_after++;
+ }
+ }
+ if ((digits_before == 0) && (digits_after == 0))
+ goto return1;
+ if ((*cur == 'e') || (*cur == 'E')) {
+ cur++;
+ if ((*cur == '-') || (*cur == '+'))
+ cur++;
+ while ((*cur >= '0') && (*cur <= '9'))
+ cur++;
+ }
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ if (*cur != 0)
+ goto return1;
+ if (val != NULL) {
+ if (type == xmlSchemaTypeFloatDef) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_FLOAT);
+ if (v != NULL) {
+ /*
+ * TODO: sscanf seems not to give the correct
+ * value for extremely high/low values.
+ * E.g. "1E-149" results in zero.
+ */
+ if (sscanf((const char *) value, "%f",
+ &(v->value.f)) == 1) {
+ *val = v;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto return1;
+ }
+ } else {
+ goto error;
+ }
+ } else {
+ v = xmlSchemaNewValue(XML_SCHEMAS_DOUBLE);
+ if (v != NULL) {
+ /*
+ * TODO: sscanf seems not to give the correct
+ * value for extremely high/low values.
+ */
+ if (sscanf((const char *) value, "%lf",
+ &(v->value.d)) == 1) {
+ *val = v;
+ } else {
+ xmlSchemaFreeValue(v);
+ goto return1;
+ }
+ } else {
+ goto error;
+ }
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_BOOLEAN:{
+ const xmlChar *cur = value;
+
+ if (normOnTheFly) {
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if (*cur == '0') {
+ ret = 0;
+ cur++;
+ } else if (*cur == '1') {
+ ret = 1;
+ cur++;
+ } else if (*cur == 't') {
+ cur++;
+ if ((*cur++ == 'r') && (*cur++ == 'u') &&
+ (*cur++ == 'e')) {
+ ret = 1;
+ } else
+ goto return1;
+ } else if (*cur == 'f') {
+ cur++;
+ if ((*cur++ == 'a') && (*cur++ == 'l') &&
+ (*cur++ == 's') && (*cur++ == 'e')) {
+ ret = 0;
+ } else
+ goto return1;
+ } else
+ goto return1;
+ if (*cur != 0) {
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if (*cur != 0)
+ goto return1;
+ }
+ } else {
+ if ((cur[0] == '0') && (cur[1] == 0))
+ ret = 0;
+ else if ((cur[0] == '1') && (cur[1] == 0))
+ ret = 1;
+ else if ((cur[0] == 't') && (cur[1] == 'r')
+ && (cur[2] == 'u') && (cur[3] == 'e')
+ && (cur[4] == 0))
+ ret = 1;
+ else if ((cur[0] == 'f') && (cur[1] == 'a')
+ && (cur[2] == 'l') && (cur[3] == 's')
+ && (cur[4] == 'e') && (cur[5] == 0))
+ ret = 0;
+ else
+ goto return1;
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_BOOLEAN);
+ if (v != NULL) {
+ v->value.b = ret;
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_TOKEN:{
+ const xmlChar *cur = value;
+
+ if (! normOnTheFly) {
+ while (*cur != 0) {
+ if ((*cur == 0xd) || (*cur == 0xa) || (*cur == 0x9)) {
+ goto return1;
+ } else if (*cur == ' ') {
+ cur++;
+ if (*cur == 0)
+ goto return1;
+ if (*cur == ' ')
+ goto return1;
+ } else {
+ cur++;
+ }
+ }
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_TOKEN);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_LANGUAGE:
+ if (normOnTheFly) {
+ norm = xmlSchemaCollapseString(value);
+ if (norm != NULL)
+ value = norm;
+ }
+ if (xmlCheckLanguageID(value) == 1) {
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_LANGUAGE);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ }
+ goto return1;
+ case XML_SCHEMAS_NMTOKEN:
+ if (xmlValidateNMToken(value, 1) == 0) {
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_NMTOKEN);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto return0;
+ }
+ goto return1;
+ case XML_SCHEMAS_NMTOKENS:
+ ret = xmlSchemaValAtomicListNode(xmlSchemaTypeNmtokenDef,
+ value, val, node);
+ if (ret > 0)
+ ret = 0;
+ else
+ ret = 1;
+ goto done;
+ case XML_SCHEMAS_NAME:
+ ret = xmlValidateName(value, 1);
+ if ((ret == 0) && (val != NULL) && (value != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_NAME);
+ if (v != NULL) {
+ const xmlChar *start = value, *end;
+ while (IS_BLANK_CH(*start)) start++;
+ end = start;
+ while ((*end != 0) && (!IS_BLANK_CH(*end))) end++;
+ v->value.str = xmlStrndup(start, end - start);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto done;
+ case XML_SCHEMAS_QNAME:{
+ const xmlChar *uri = NULL;
+ xmlChar *local = NULL;
+
+ ret = xmlValidateQName(value, 1);
+ if (ret != 0)
+ goto done;
+ if (node != NULL) {
+ xmlChar *prefix;
+ xmlNsPtr ns;
+
+ local = xmlSplitQName2(value, &prefix);
+ ns = xmlSearchNs(node->doc, node, prefix);
+ if ((ns == NULL) && (prefix != NULL)) {
+ xmlFree(prefix);
+ if (local != NULL)
+ xmlFree(local);
+ goto return1;
+ }
+ if (ns != NULL)
+ uri = ns->href;
+ if (prefix != NULL)
+ xmlFree(prefix);
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_QNAME);
+ if (v == NULL) {
+ if (local != NULL)
+ xmlFree(local);
+ goto error;
+ }
+ if (local != NULL)
+ v->value.qname.name = local;
+ else
+ v->value.qname.name = xmlStrdup(value);
+ if (uri != NULL)
+ v->value.qname.uri = xmlStrdup(uri);
+ *val = v;
+ } else
+ if (local != NULL)
+ xmlFree(local);
+ goto done;
+ }
+ case XML_SCHEMAS_NCNAME:
+ ret = xmlValidateNCName(value, 1);
+ if ((ret == 0) && (val != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_NCNAME);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ goto done;
+ case XML_SCHEMAS_ID:
+ ret = xmlValidateNCName(value, 1);
+ if ((ret == 0) && (val != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_ID);
+ if (v != NULL) {
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ } else {
+ goto error;
+ }
+ }
+ if ((ret == 0) && (node != NULL) &&
+ (node->type == XML_ATTRIBUTE_NODE)) {
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ /*
+ * NOTE: the IDness might have already be declared in the DTD
+ */
+ if (attr->atype != XML_ATTRIBUTE_ID) {
+ xmlIDPtr res;
+ xmlChar *strip;
+
+ strip = xmlSchemaStrip(value);
+ if (strip != NULL) {
+ res = xmlAddID(NULL, node->doc, strip, attr);
+ xmlFree(strip);
+ } else
+ res = xmlAddID(NULL, node->doc, value, attr);
+ if (res == NULL) {
+ ret = 2;
+ } else {
+ attr->atype = XML_ATTRIBUTE_ID;
+ }
+ }
+ }
+ goto done;
+ case XML_SCHEMAS_IDREF:
+ ret = xmlValidateNCName(value, 1);
+ if ((ret == 0) && (val != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_IDREF);
+ if (v == NULL)
+ goto error;
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ }
+ if ((ret == 0) && (node != NULL) &&
+ (node->type == XML_ATTRIBUTE_NODE)) {
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+ xmlChar *strip;
+
+ strip = xmlSchemaStrip(value);
+ if (strip != NULL) {
+ xmlAddRef(NULL, node->doc, strip, attr);
+ xmlFree(strip);
+ } else
+ xmlAddRef(NULL, node->doc, value, attr);
+ attr->atype = XML_ATTRIBUTE_IDREF;
+ }
+ goto done;
+ case XML_SCHEMAS_IDREFS:
+ ret = xmlSchemaValAtomicListNode(xmlSchemaTypeIdrefDef,
+ value, val, node);
+ if (ret < 0)
+ ret = 2;
+ else
+ ret = 0;
+ if ((ret == 0) && (node != NULL) &&
+ (node->type == XML_ATTRIBUTE_NODE)) {
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ attr->atype = XML_ATTRIBUTE_IDREFS;
+ }
+ goto done;
+ case XML_SCHEMAS_ENTITY:{
+ xmlChar *strip;
+
+ ret = xmlValidateNCName(value, 1);
+ if ((node == NULL) || (node->doc == NULL))
+ ret = 3;
+ if (ret == 0) {
+ xmlEntityPtr ent;
+
+ strip = xmlSchemaStrip(value);
+ if (strip != NULL) {
+ ent = xmlGetDocEntity(node->doc, strip);
+ xmlFree(strip);
+ } else {
+ ent = xmlGetDocEntity(node->doc, value);
+ }
+ if ((ent == NULL) ||
+ (ent->etype !=
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY))
+ ret = 4;
+ }
+ if ((ret == 0) && (val != NULL)) {
+ TODO;
+ }
+ if ((ret == 0) && (node != NULL) &&
+ (node->type == XML_ATTRIBUTE_NODE)) {
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ attr->atype = XML_ATTRIBUTE_ENTITY;
+ }
+ goto done;
+ }
+ case XML_SCHEMAS_ENTITIES:
+ if ((node == NULL) || (node->doc == NULL))
+ goto return3;
+ ret = xmlSchemaValAtomicListNode(xmlSchemaTypeEntityDef,
+ value, val, node);
+ if (ret <= 0)
+ ret = 1;
+ else
+ ret = 0;
+ if ((ret == 0) && (node != NULL) &&
+ (node->type == XML_ATTRIBUTE_NODE)) {
+ xmlAttrPtr attr = (xmlAttrPtr) node;
+
+ attr->atype = XML_ATTRIBUTE_ENTITIES;
+ }
+ goto done;
+ case XML_SCHEMAS_NOTATION:{
+ xmlChar *uri = NULL;
+ xmlChar *local = NULL;
+
+ ret = xmlValidateQName(value, 1);
+ if ((ret == 0) && (node != NULL)) {
+ xmlChar *prefix;
+
+ local = xmlSplitQName2(value, &prefix);
+ if (prefix != NULL) {
+ xmlNsPtr ns;
+
+ ns = xmlSearchNs(node->doc, node, prefix);
+ if (ns == NULL)
+ ret = 1;
+ else if (val != NULL)
+ uri = xmlStrdup(ns->href);
+ }
+ if ((local != NULL) && ((val == NULL) || (ret != 0)))
+ xmlFree(local);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ }
+ if ((node == NULL) || (node->doc == NULL))
+ ret = 3;
+ if (ret == 0) {
+ ret = xmlValidateNotationUse(NULL, node->doc, value);
+ if (ret == 1)
+ ret = 0;
+ else
+ ret = 1;
+ }
+ if ((ret == 0) && (val != NULL)) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_NOTATION);
+ if (v != NULL) {
+ if (local != NULL)
+ v->value.qname.name = local;
+ else
+ v->value.qname.name = xmlStrdup(value);
+ if (uri != NULL)
+ v->value.qname.uri = uri;
+
+ *val = v;
+ } else {
+ if (local != NULL)
+ xmlFree(local);
+ if (uri != NULL)
+ xmlFree(uri);
+ goto error;
+ }
+ }
+ goto done;
+ }
+ case XML_SCHEMAS_ANYURI:{
+ if (*value != 0) {
+ xmlURIPtr uri;
+ xmlChar *tmpval, *cur;
+ if (normOnTheFly) {
+ norm = xmlSchemaCollapseString(value);
+ if (norm != NULL)
+ value = norm;
+ }
+ tmpval = xmlStrdup(value);
+ for (cur = tmpval; *cur; ++cur) {
+ if (*cur < 32 || *cur >= 127 || *cur == ' ' ||
+ *cur == '<' || *cur == '>' || *cur == '"' ||
+ *cur == '{' || *cur == '}' || *cur == '|' ||
+ *cur == '\\' || *cur == '^' || *cur == '`' ||
+ *cur == '\'')
+ *cur = '_';
+ }
+ uri = xmlParseURI((const char *) tmpval);
+ xmlFree(tmpval);
+ if (uri == NULL)
+ goto return1;
+ xmlFreeURI(uri);
+ }
+
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_ANYURI);
+ if (v == NULL)
+ goto error;
+ v->value.str = xmlStrdup(value);
+ *val = v;
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_HEXBINARY:{
+ const xmlChar *cur = value, *start;
+ xmlChar *base;
+ int total, i = 0;
+
+ if (cur == NULL)
+ goto return1;
+
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ start = cur;
+ while (((*cur >= '0') && (*cur <= '9')) ||
+ ((*cur >= 'A') && (*cur <= 'F')) ||
+ ((*cur >= 'a') && (*cur <= 'f'))) {
+ i++;
+ cur++;
+ }
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+
+ if (*cur != 0)
+ goto return1;
+ if ((i % 2) != 0)
+ goto return1;
+
+ if (val != NULL) {
+
+ v = xmlSchemaNewValue(XML_SCHEMAS_HEXBINARY);
+ if (v == NULL)
+ goto error;
+ /*
+ * Copy only the normalized piece.
+ * CRITICAL TODO: Check this.
+ */
+ cur = xmlStrndup(start, i);
+ if (cur == NULL) {
+ xmlSchemaTypeErrMemory(node, "allocating hexbin data");
+ xmlFree(v);
+ goto return1;
+ }
+
+ total = i / 2; /* number of octets */
+
+ base = (xmlChar *) cur;
+ while (i-- > 0) {
+ if (*base >= 'a')
+ *base = *base - ('a' - 'A');
+ base++;
+ }
+
+ v->value.hex.str = (xmlChar *) cur;
+ v->value.hex.total = total;
+ *val = v;
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_BASE64BINARY:{
+ /* ISSUE:
+ *
+ * Ignore all stray characters? (yes, currently)
+ * Worry about long lines? (no, currently)
+ *
+ * rfc2045.txt:
+ *
+ * "The encoded output stream must be represented in lines of
+ * no more than 76 characters each. All line breaks or other
+ * characters not found in Table 1 must be ignored by decoding
+ * software. In base64 data, characters other than those in
+ * Table 1, line breaks, and other white space probably
+ * indicate a transmission error, about which a warning
+ * message or even a message rejection might be appropriate
+ * under some circumstances." */
+ const xmlChar *cur = value;
+ xmlChar *base;
+ int total, i = 0, pad = 0;
+
+ if (cur == NULL)
+ goto return1;
+
+ for (; *cur; ++cur) {
+ int decc;
+
+ decc = _xmlSchemaBase64Decode(*cur);
+ if (decc < 0) ;
+ else if (decc < 64)
+ i++;
+ else
+ break;
+ }
+ for (; *cur; ++cur) {
+ int decc;
+
+ decc = _xmlSchemaBase64Decode(*cur);
+ if (decc < 0) ;
+ else if (decc < 64)
+ goto return1;
+ if (decc == 64)
+ pad++;
+ }
+
+ /* rfc2045.txt: "Special processing is performed if fewer than
+ * 24 bits are available at the end of the data being encoded.
+ * A full encoding quantum is always completed at the end of a
+ * body. When fewer than 24 input bits are available in an
+ * input group, zero bits are added (on the right) to form an
+ * integral number of 6-bit groups. Padding at the end of the
+ * data is performed using the "=" character. Since all
+ * base64 input is an integral number of octets, only the
+ * following cases can arise: (1) the final quantum of
+ * encoding input is an integral multiple of 24 bits; here,
+ * the final unit of encoded output will be an integral
+ * multiple ofindent: Standard input:701: Warning:old style
+ * assignment ambiguity in "=*". Assuming "= *" 4 characters
+ * with no "=" padding, (2) the final
+ * quantum of encoding input is exactly 8 bits; here, the
+ * final unit of encoded output will be two characters
+ * followed by two "=" padding characters, or (3) the final
+ * quantum of encoding input is exactly 16 bits; here, the
+ * final unit of encoded output will be three characters
+ * followed by one "=" padding character." */
+
+ total = 3 * (i / 4);
+ if (pad == 0) {
+ if (i % 4 != 0)
+ goto return1;
+ } else if (pad == 1) {
+ int decc;
+
+ if (i % 4 != 3)
+ goto return1;
+ for (decc = _xmlSchemaBase64Decode(*cur);
+ (decc < 0) || (decc > 63);
+ decc = _xmlSchemaBase64Decode(*cur))
+ --cur;
+ /* 16bits in 24bits means 2 pad bits: nnnnnn nnmmmm mmmm00*/
+ /* 00111100 -> 0x3c */
+ if (decc & ~0x3c)
+ goto return1;
+ total += 2;
+ } else if (pad == 2) {
+ int decc;
+
+ if (i % 4 != 2)
+ goto return1;
+ for (decc = _xmlSchemaBase64Decode(*cur);
+ (decc < 0) || (decc > 63);
+ decc = _xmlSchemaBase64Decode(*cur))
+ --cur;
+ /* 8bits in 12bits means 4 pad bits: nnnnnn nn0000 */
+ /* 00110000 -> 0x30 */
+ if (decc & ~0x30)
+ goto return1;
+ total += 1;
+ } else
+ goto return1;
+
+ if (val != NULL) {
+ v = xmlSchemaNewValue(XML_SCHEMAS_BASE64BINARY);
+ if (v == NULL)
+ goto error;
+ base =
+ (xmlChar *) xmlMallocAtomic((i + pad + 1) *
+ sizeof(xmlChar));
+ if (base == NULL) {
+ xmlSchemaTypeErrMemory(node, "allocating base64 data");
+ xmlFree(v);
+ goto return1;
+ }
+ v->value.base64.str = base;
+ for (cur = value; *cur; ++cur)
+ if (_xmlSchemaBase64Decode(*cur) >= 0) {
+ *base = *cur;
+ ++base;
+ }
+ *base = 0;
+ v->value.base64.total = total;
+ *val = v;
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_INTEGER:
+ case XML_SCHEMAS_PINTEGER:
+ case XML_SCHEMAS_NPINTEGER:
+ case XML_SCHEMAS_NINTEGER:
+ case XML_SCHEMAS_NNINTEGER:{
+ const xmlChar *cur = value;
+ unsigned long lo, mi, hi;
+ int sign = 0;
+
+ if (cur == NULL)
+ goto return1;
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if (*cur == '-') {
+ sign = 1;
+ cur++;
+ } else if (*cur == '+')
+ cur++;
+ ret = xmlSchemaParseUInt(&cur, &lo, &mi, &hi);
+ if (ret < 0)
+ goto return1;
+ if (normOnTheFly)
+ while IS_WSP_BLANK_CH(*cur) cur++;
+ if (*cur != 0)
+ goto return1;
+ if (type->builtInType == XML_SCHEMAS_NPINTEGER) {
+ if ((sign == 0) &&
+ ((hi != 0) || (mi != 0) || (lo != 0)))
+ goto return1;
+ } else if (type->builtInType == XML_SCHEMAS_PINTEGER) {
+ if (sign == 1)
+ goto return1;
+ if ((hi == 0) && (mi == 0) && (lo == 0))
+ goto return1;
+ } else if (type->builtInType == XML_SCHEMAS_NINTEGER) {
+ if (sign == 0)
+ goto return1;
+ if ((hi == 0) && (mi == 0) && (lo == 0))
+ goto return1;
+ } else if (type->builtInType == XML_SCHEMAS_NNINTEGER) {
+ if ((sign == 1) &&
+ ((hi != 0) || (mi != 0) || (lo != 0)))
+ goto return1;
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(type->builtInType);
+ if (v != NULL) {
+ if (ret == 0)
+ ret++;
+ v->value.decimal.lo = lo;
+ v->value.decimal.mi = mi;
+ v->value.decimal.hi = hi;
+ v->value.decimal.sign = sign;
+ v->value.decimal.frac = 0;
+ v->value.decimal.total = ret;
+ *val = v;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_LONG:
+ case XML_SCHEMAS_BYTE:
+ case XML_SCHEMAS_SHORT:
+ case XML_SCHEMAS_INT:{
+ const xmlChar *cur = value;
+ unsigned long lo, mi, hi;
+ int sign = 0;
+
+ if (cur == NULL)
+ goto return1;
+ if (*cur == '-') {
+ sign = 1;
+ cur++;
+ } else if (*cur == '+')
+ cur++;
+ ret = xmlSchemaParseUInt(&cur, &lo, &mi, &hi);
+ if (ret < 0)
+ goto return1;
+ if (*cur != 0)
+ goto return1;
+ if (type->builtInType == XML_SCHEMAS_LONG) {
+ if (hi >= 922) {
+ if (hi > 922)
+ goto return1;
+ if (mi >= 33720368) {
+ if (mi > 33720368)
+ goto return1;
+ if ((sign == 0) && (lo > 54775807))
+ goto return1;
+ if ((sign == 1) && (lo > 54775808))
+ goto return1;
+ }
+ }
+ } else if (type->builtInType == XML_SCHEMAS_INT) {
+ if (hi != 0)
+ goto return1;
+ if (mi >= 21) {
+ if (mi > 21)
+ goto return1;
+ if ((sign == 0) && (lo > 47483647))
+ goto return1;
+ if ((sign == 1) && (lo > 47483648))
+ goto return1;
+ }
+ } else if (type->builtInType == XML_SCHEMAS_SHORT) {
+ if ((mi != 0) || (hi != 0))
+ goto return1;
+ if ((sign == 1) && (lo > 32768))
+ goto return1;
+ if ((sign == 0) && (lo > 32767))
+ goto return1;
+ } else if (type->builtInType == XML_SCHEMAS_BYTE) {
+ if ((mi != 0) || (hi != 0))
+ goto return1;
+ if ((sign == 1) && (lo > 128))
+ goto return1;
+ if ((sign == 0) && (lo > 127))
+ goto return1;
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(type->builtInType);
+ if (v != NULL) {
+ v->value.decimal.lo = lo;
+ v->value.decimal.mi = mi;
+ v->value.decimal.hi = hi;
+ v->value.decimal.sign = sign;
+ v->value.decimal.frac = 0;
+ v->value.decimal.total = ret;
+ *val = v;
+ }
+ }
+ goto return0;
+ }
+ case XML_SCHEMAS_UINT:
+ case XML_SCHEMAS_ULONG:
+ case XML_SCHEMAS_USHORT:
+ case XML_SCHEMAS_UBYTE:{
+ const xmlChar *cur = value;
+ unsigned long lo, mi, hi;
+
+ if (cur == NULL)
+ goto return1;
+ ret = xmlSchemaParseUInt(&cur, &lo, &mi, &hi);
+ if (ret < 0)
+ goto return1;
+ if (*cur != 0)
+ goto return1;
+ if (type->builtInType == XML_SCHEMAS_ULONG) {
+ if (hi >= 1844) {
+ if (hi > 1844)
+ goto return1;
+ if (mi >= 67440737) {
+ if (mi > 67440737)
+ goto return1;
+ if (lo > 9551615)
+ goto return1;
+ }
+ }
+ } else if (type->builtInType == XML_SCHEMAS_UINT) {
+ if (hi != 0)
+ goto return1;
+ if (mi >= 42) {
+ if (mi > 42)
+ goto return1;
+ if (lo > 94967295)
+ goto return1;
+ }
+ } else if (type->builtInType == XML_SCHEMAS_USHORT) {
+ if ((mi != 0) || (hi != 0))
+ goto return1;
+ if (lo > 65535)
+ goto return1;
+ } else if (type->builtInType == XML_SCHEMAS_UBYTE) {
+ if ((mi != 0) || (hi != 0))
+ goto return1;
+ if (lo > 255)
+ goto return1;
+ }
+ if (val != NULL) {
+ v = xmlSchemaNewValue(type->builtInType);
+ if (v != NULL) {
+ v->value.decimal.lo = lo;
+ v->value.decimal.mi = mi;
+ v->value.decimal.hi = hi;
+ v->value.decimal.sign = 0;
+ v->value.decimal.frac = 0;
+ v->value.decimal.total = ret;
+ *val = v;
+ }
+ }
+ goto return0;
+ }
+ }
+
+ done:
+ if (norm != NULL)
+ xmlFree(norm);
+ return (ret);
+ return3:
+ if (norm != NULL)
+ xmlFree(norm);
+ return (3);
+ return1:
+ if (norm != NULL)
+ xmlFree(norm);
+ return (1);
+ return0:
+ if (norm != NULL)
+ xmlFree(norm);
+ return (0);
+ error:
+ if (norm != NULL)
+ xmlFree(norm);
+ return (-1);
+}
+
+/**
+ * xmlSchemaValPredefTypeNode:
+ * @type: the predefined type
+ * @value: the value to check
+ * @val: the return computed value
+ * @node: the node containing the value
+ *
+ * Check that a value conforms to the lexical space of the predefined type.
+ * if true a value is computed and returned in @val.
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValPredefTypeNode(xmlSchemaTypePtr type, const xmlChar *value,
+ xmlSchemaValPtr *val, xmlNodePtr node) {
+ return(xmlSchemaValAtomicType(type, value, val, node, 0,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, 1, 1, 0));
+}
+
+/**
+ * xmlSchemaValPredefTypeNodeNoNorm:
+ * @type: the predefined type
+ * @value: the value to check
+ * @val: the return computed value
+ * @node: the node containing the value
+ *
+ * Check that a value conforms to the lexical space of the predefined type.
+ * if true a value is computed and returned in @val.
+ * This one does apply any normalization to the value.
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, const xmlChar *value,
+ xmlSchemaValPtr *val, xmlNodePtr node) {
+ return(xmlSchemaValAtomicType(type, value, val, node, 1,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, 1, 0, 1));
+}
+
+/**
+ * xmlSchemaValidatePredefinedType:
+ * @type: the predefined type
+ * @value: the value to check
+ * @val: the return computed value
+ *
+ * Check that a value conforms to the lexical space of the predefined type.
+ * if true a value is computed and returned in @val.
+ *
+ * Returns 0 if this validates, a positive error code number otherwise
+ * and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValidatePredefinedType(xmlSchemaTypePtr type, const xmlChar *value,
+ xmlSchemaValPtr *val) {
+ return(xmlSchemaValPredefTypeNode(type, value, val, NULL));
+}
+
+/**
+ * xmlSchemaCompareDecimals:
+ * @x: a first decimal value
+ * @y: a second decimal value
+ *
+ * Compare 2 decimals
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y and -2 in case of error
+ */
+static int
+xmlSchemaCompareDecimals(xmlSchemaValPtr x, xmlSchemaValPtr y)
+{
+ xmlSchemaValPtr swp;
+ int order = 1, integx, integy, dlen;
+ unsigned long hi, mi, lo;
+
+ /*
+ * First test: If x is -ve and not zero
+ */
+ if ((x->value.decimal.sign) &&
+ ((x->value.decimal.lo != 0) ||
+ (x->value.decimal.mi != 0) ||
+ (x->value.decimal.hi != 0))) {
+ /*
+ * Then if y is -ve and not zero reverse the compare
+ */
+ if ((y->value.decimal.sign) &&
+ ((y->value.decimal.lo != 0) ||
+ (y->value.decimal.mi != 0) ||
+ (y->value.decimal.hi != 0)))
+ order = -1;
+ /*
+ * Otherwise (y >= 0) we have the answer
+ */
+ else
+ return (-1);
+ /*
+ * If x is not -ve and y is -ve we have the answer
+ */
+ } else if ((y->value.decimal.sign) &&
+ ((y->value.decimal.lo != 0) ||
+ (y->value.decimal.mi != 0) ||
+ (y->value.decimal.hi != 0))) {
+ return (1);
+ }
+ /*
+ * If it's not simply determined by a difference in sign,
+ * then we need to compare the actual values of the two nums.
+ * To do this, we start by looking at the integral parts.
+ * If the number of integral digits differ, then we have our
+ * answer.
+ */
+ integx = x->value.decimal.total - x->value.decimal.frac;
+ integy = y->value.decimal.total - y->value.decimal.frac;
+ /*
+ * NOTE: We changed the "total" for values like "0.1"
+ * (or "-0.1" or ".1") to be 1, which was 2 previously.
+ * Therefore the special case, when such values are
+ * compared with 0, needs to be handled separately;
+ * otherwise a zero would be recognized incorrectly as
+ * greater than those values. This has the nice side effect
+ * that we gain an overall optimized comparison with zeroes.
+ * Note that a "0" has a "total" of 1 already.
+ */
+ if (integx == 1) {
+ if (x->value.decimal.lo == 0) {
+ if (integy != 1)
+ return -order;
+ else if (y->value.decimal.lo != 0)
+ return -order;
+ else
+ return(0);
+ }
+ }
+ if (integy == 1) {
+ if (y->value.decimal.lo == 0) {
+ if (integx != 1)
+ return order;
+ else if (x->value.decimal.lo != 0)
+ return order;
+ else
+ return(0);
+ }
+ }
+
+ if (integx > integy)
+ return order;
+ else if (integy > integx)
+ return -order;
+
+ /*
+ * If the number of integral digits is the same for both numbers,
+ * then things get a little more complicated. We need to "normalize"
+ * the numbers in order to properly compare them. To do this, we
+ * look at the total length of each number (length => number of
+ * significant digits), and divide the "shorter" by 10 (decreasing
+ * the length) until they are of equal length.
+ */
+ dlen = x->value.decimal.total - y->value.decimal.total;
+ if (dlen < 0) { /* y has more digits than x */
+ swp = x;
+ hi = y->value.decimal.hi;
+ mi = y->value.decimal.mi;
+ lo = y->value.decimal.lo;
+ dlen = -dlen;
+ order = -order;
+ } else { /* x has more digits than y */
+ swp = y;
+ hi = x->value.decimal.hi;
+ mi = x->value.decimal.mi;
+ lo = x->value.decimal.lo;
+ }
+ while (dlen > 8) { /* in effect, right shift by 10**8 */
+ lo = mi;
+ mi = hi;
+ hi = 0;
+ dlen -= 8;
+ }
+ while (dlen > 0) {
+ unsigned long rem1, rem2;
+ rem1 = (hi % 10) * 100000000L;
+ hi = hi / 10;
+ rem2 = (mi % 10) * 100000000L;
+ mi = (mi + rem1) / 10;
+ lo = (lo + rem2) / 10;
+ dlen--;
+ }
+ if (hi > swp->value.decimal.hi) {
+ return order;
+ } else if (hi == swp->value.decimal.hi) {
+ if (mi > swp->value.decimal.mi) {
+ return order;
+ } else if (mi == swp->value.decimal.mi) {
+ if (lo > swp->value.decimal.lo) {
+ return order;
+ } else if (lo == swp->value.decimal.lo) {
+ if (x->value.decimal.total == y->value.decimal.total) {
+ return 0;
+ } else {
+ return order;
+ }
+ }
+ }
+ }
+ return -order;
+}
+
+/**
+ * xmlSchemaCompareDurations:
+ * @x: a first duration value
+ * @y: a second duration value
+ *
+ * Compare 2 durations
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y)
+{
+ long carry, mon, day;
+ double sec;
+ int invert = 1;
+ long xmon, xday, myear, minday, maxday;
+ static const long dayRange [2][12] = {
+ { 0, 28, 59, 89, 120, 150, 181, 212, 242, 273, 303, 334, },
+ { 0, 31, 62, 92, 123, 153, 184, 215, 245, 276, 306, 337} };
+
+ if ((x == NULL) || (y == NULL))
+ return -2;
+
+ /* months */
+ mon = x->value.dur.mon - y->value.dur.mon;
+
+ /* seconds */
+ sec = x->value.dur.sec - y->value.dur.sec;
+ carry = (long)(sec / SECS_PER_DAY);
+ sec -= ((double)carry) * SECS_PER_DAY;
+
+ /* days */
+ day = x->value.dur.day - y->value.dur.day + carry;
+
+ /* easy test */
+ if (mon == 0) {
+ if (day == 0)
+ if (sec == 0.0)
+ return 0;
+ else if (sec < 0.0)
+ return -1;
+ else
+ return 1;
+ else if (day < 0)
+ return -1;
+ else
+ return 1;
+ }
+
+ if (mon > 0) {
+ if ((day >= 0) && (sec >= 0.0))
+ return 1;
+ else {
+ xmon = mon;
+ xday = -day;
+ }
+ } else if ((day <= 0) && (sec <= 0.0)) {
+ return -1;
+ } else {
+ invert = -1;
+ xmon = -mon;
+ xday = day;
+ }
+
+ myear = xmon / 12;
+ if (myear == 0) {
+ minday = 0;
+ maxday = 0;
+ } else {
+ maxday = 366 * ((myear + 3) / 4) +
+ 365 * ((myear - 1) % 4);
+ minday = maxday - 1;
+ }
+
+ xmon = xmon % 12;
+ minday += dayRange[0][xmon];
+ maxday += dayRange[1][xmon];
+
+ if ((maxday == minday) && (maxday == xday))
+ return(0); /* can this really happen ? */
+ if (maxday < xday)
+ return(-invert);
+ if (minday > xday)
+ return(invert);
+
+ /* indeterminate */
+ return 2;
+}
+
+/*
+ * macros for adding date/times and durations
+ */
+#define FQUOTIENT(a,b) (floor(((double)a/(double)b)))
+#define MODULO(a,b) (a - FQUOTIENT(a,b) * b)
+#define FQUOTIENT_RANGE(a,low,high) (FQUOTIENT((a-low),(high-low)))
+#define MODULO_RANGE(a,low,high) ((MODULO((a-low),(high-low)))+low)
+
+/**
+ * xmlSchemaDupVal:
+ * @v: the #xmlSchemaValPtr value to duplicate
+ *
+ * Makes a copy of @v. The calling program is responsible for freeing
+ * the returned value.
+ *
+ * returns a pointer to a duplicated #xmlSchemaValPtr or NULL if error.
+ */
+static xmlSchemaValPtr
+xmlSchemaDupVal (xmlSchemaValPtr v)
+{
+ xmlSchemaValPtr ret = xmlSchemaNewValue(v->type);
+ if (ret == NULL)
+ return NULL;
+
+ memcpy(ret, v, sizeof(xmlSchemaVal));
+ ret->next = NULL;
+ return ret;
+}
+
+/**
+ * xmlSchemaCopyValue:
+ * @val: the precomputed value to be copied
+ *
+ * Copies the precomputed value. This duplicates any string within.
+ *
+ * Returns the copy or NULL if a copy for a data-type is not implemented.
+ */
+xmlSchemaValPtr
+xmlSchemaCopyValue(xmlSchemaValPtr val)
+{
+ xmlSchemaValPtr ret = NULL, prev = NULL, cur;
+
+ /*
+ * Copy the string values.
+ */
+ while (val != NULL) {
+ switch (val->type) {
+ case XML_SCHEMAS_ANYTYPE:
+ case XML_SCHEMAS_IDREFS:
+ case XML_SCHEMAS_ENTITIES:
+ case XML_SCHEMAS_NMTOKENS:
+ xmlSchemaFreeValue(ret);
+ return (NULL);
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_ENTITY:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_ANYURI:
+ cur = xmlSchemaDupVal(val);
+ if (val->value.str != NULL)
+ cur->value.str = xmlStrdup(BAD_CAST val->value.str);
+ break;
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_NOTATION:
+ cur = xmlSchemaDupVal(val);
+ if (val->value.qname.name != NULL)
+ cur->value.qname.name =
+ xmlStrdup(BAD_CAST val->value.qname.name);
+ if (val->value.qname.uri != NULL)
+ cur->value.qname.uri =
+ xmlStrdup(BAD_CAST val->value.qname.uri);
+ break;
+ case XML_SCHEMAS_HEXBINARY:
+ cur = xmlSchemaDupVal(val);
+ if (val->value.hex.str != NULL)
+ cur->value.hex.str = xmlStrdup(BAD_CAST val->value.hex.str);
+ break;
+ case XML_SCHEMAS_BASE64BINARY:
+ cur = xmlSchemaDupVal(val);
+ if (val->value.base64.str != NULL)
+ cur->value.base64.str =
+ xmlStrdup(BAD_CAST val->value.base64.str);
+ break;
+ default:
+ cur = xmlSchemaDupVal(val);
+ break;
+ }
+ if (ret == NULL)
+ ret = cur;
+ else
+ prev->next = cur;
+ prev = cur;
+ val = val->next;
+ }
+ return (ret);
+}
+
+/**
+ * _xmlSchemaDateAdd:
+ * @dt: an #xmlSchemaValPtr
+ * @dur: an #xmlSchemaValPtr of type #XS_DURATION
+ *
+ * Compute a new date/time from @dt and @dur. This function assumes @dt
+ * is either #XML_SCHEMAS_DATETIME, #XML_SCHEMAS_DATE, #XML_SCHEMAS_GYEARMONTH,
+ * or #XML_SCHEMAS_GYEAR. The returned #xmlSchemaVal is the same type as
+ * @dt. The calling program is responsible for freeing the returned value.
+ *
+ * Returns a pointer to a new #xmlSchemaVal or NULL if error.
+ */
+static xmlSchemaValPtr
+_xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
+{
+ xmlSchemaValPtr ret, tmp;
+ long carry, tempdays, temp;
+ xmlSchemaValDatePtr r, d;
+ xmlSchemaValDurationPtr u;
+
+ if ((dt == NULL) || (dur == NULL))
+ return NULL;
+
+ ret = xmlSchemaNewValue(dt->type);
+ if (ret == NULL)
+ return NULL;
+
+ /* make a copy so we don't alter the original value */
+ tmp = xmlSchemaDupVal(dt);
+ if (tmp == NULL) {
+ xmlSchemaFreeValue(ret);
+ return NULL;
+ }
+
+ r = &(ret->value.date);
+ d = &(tmp->value.date);
+ u = &(dur->value.dur);
+
+ /* normalization */
+ if (d->mon == 0)
+ d->mon = 1;
+
+ /* normalize for time zone offset */
+ u->sec -= (d->tzo * 60);
+ d->tzo = 0;
+
+ /* normalization */
+ if (d->day == 0)
+ d->day = 1;
+
+ /* month */
+ carry = d->mon + u->mon;
+ r->mon = (unsigned int) MODULO_RANGE(carry, 1, 13);
+ carry = (long) FQUOTIENT_RANGE(carry, 1, 13);
+
+ /* year (may be modified later) */
+ r->year = d->year + carry;
+ if (r->year == 0) {
+ if (d->year > 0)
+ r->year--;
+ else
+ r->year++;
+ }
+
+ /* time zone */
+ r->tzo = d->tzo;
+ r->tz_flag = d->tz_flag;
+
+ /* seconds */
+ r->sec = d->sec + u->sec;
+ carry = (long) FQUOTIENT((long)r->sec, 60);
+ if (r->sec != 0.0) {
+ r->sec = MODULO(r->sec, 60.0);
+ }
+
+ /* minute */
+ carry += d->min;
+ r->min = (unsigned int) MODULO(carry, 60);
+ carry = (long) FQUOTIENT(carry, 60);
+
+ /* hours */
+ carry += d->hour;
+ r->hour = (unsigned int) MODULO(carry, 24);
+ carry = (long)FQUOTIENT(carry, 24);
+
+ /*
+ * days
+ * Note we use tempdays because the temporary values may need more
+ * than 5 bits
+ */
+ if ((VALID_YEAR(r->year)) && (VALID_MONTH(r->mon)) &&
+ (d->day > MAX_DAYINMONTH(r->year, r->mon)))
+ tempdays = MAX_DAYINMONTH(r->year, r->mon);
+ else if (d->day < 1)
+ tempdays = 1;
+ else
+ tempdays = d->day;
+
+ tempdays += u->day + carry;
+
+ while (1) {
+ if (tempdays < 1) {
+ long tmon = (long) MODULO_RANGE((int)r->mon-1, 1, 13);
+ long tyr = r->year + (long)FQUOTIENT_RANGE((int)r->mon-1, 1, 13);
+ if (tyr == 0)
+ tyr--;
+ /*
+ * Coverity detected an overrun in daysInMonth
+ * of size 12 at position 12 with index variable "((r)->mon - 1)"
+ */
+ if (tmon < 1)
+ tmon = 1;
+ if (tmon > 12)
+ tmon = 12;
+ tempdays += MAX_DAYINMONTH(tyr, tmon);
+ carry = -1;
+ } else if (VALID_YEAR(r->year) && VALID_MONTH(r->mon) &&
+ tempdays > (long) MAX_DAYINMONTH(r->year, r->mon)) {
+ tempdays = tempdays - MAX_DAYINMONTH(r->year, r->mon);
+ carry = 1;
+ } else
+ break;
+
+ temp = r->mon + carry;
+ r->mon = (unsigned int) MODULO_RANGE(temp, 1, 13);
+ r->year = r->year + (unsigned int) FQUOTIENT_RANGE(temp, 1, 13);
+ if (r->year == 0) {
+ if (temp < 1)
+ r->year--;
+ else
+ r->year++;
+ }
+ }
+
+ r->day = tempdays;
+
+ /*
+ * adjust the date/time type to the date values
+ */
+ if (ret->type != XML_SCHEMAS_DATETIME) {
+ if ((r->hour) || (r->min) || (r->sec))
+ ret->type = XML_SCHEMAS_DATETIME;
+ else if (ret->type != XML_SCHEMAS_DATE) {
+ if ((r->mon != 1) && (r->day != 1))
+ ret->type = XML_SCHEMAS_DATE;
+ else if ((ret->type != XML_SCHEMAS_GYEARMONTH) && (r->mon != 1))
+ ret->type = XML_SCHEMAS_GYEARMONTH;
+ }
+ }
+
+ xmlSchemaFreeValue(tmp);
+
+ return ret;
+}
+
+/**
+ * xmlSchemaDateNormalize:
+ * @dt: an #xmlSchemaValPtr of a date/time type value.
+ * @offset: number of seconds to adjust @dt by.
+ *
+ * Normalize @dt to GMT time. The @offset parameter is subtracted from
+ * the return value is a time-zone offset is present on @dt.
+ *
+ * Returns a normalized copy of @dt or NULL if error.
+ */
+static xmlSchemaValPtr
+xmlSchemaDateNormalize (xmlSchemaValPtr dt, double offset)
+{
+ xmlSchemaValPtr dur, ret;
+
+ if (dt == NULL)
+ return NULL;
+
+ if (((dt->type != XML_SCHEMAS_TIME) &&
+ (dt->type != XML_SCHEMAS_DATETIME) &&
+ (dt->type != XML_SCHEMAS_DATE)) || (dt->value.date.tzo == 0))
+ return xmlSchemaDupVal(dt);
+
+ dur = xmlSchemaNewValue(XML_SCHEMAS_DURATION);
+ if (dur == NULL)
+ return NULL;
+
+ dur->value.date.sec -= offset;
+
+ ret = _xmlSchemaDateAdd(dt, dur);
+ if (ret == NULL)
+ return NULL;
+
+ xmlSchemaFreeValue(dur);
+
+ /* ret->value.date.tzo = 0; */
+ return ret;
+}
+
+/**
+ * _xmlSchemaDateCastYMToDays:
+ * @dt: an #xmlSchemaValPtr
+ *
+ * Convert mon and year of @dt to total number of days. Take the
+ * number of years since (or before) 1 AD and add the number of leap
+ * years. This is a function because negative
+ * years must be handled a little differently and there is no zero year.
+ *
+ * Returns number of days.
+ */
+static long
+_xmlSchemaDateCastYMToDays (const xmlSchemaValPtr dt)
+{
+ long ret;
+ int mon;
+
+ mon = dt->value.date.mon;
+ if (mon <= 0) mon = 1; /* normalization */
+
+ if (dt->value.date.year <= 0)
+ ret = (dt->value.date.year * 365) +
+ (((dt->value.date.year+1)/4)-((dt->value.date.year+1)/100)+
+ ((dt->value.date.year+1)/400)) +
+ DAY_IN_YEAR(0, mon, dt->value.date.year);
+ else
+ ret = ((dt->value.date.year-1) * 365) +
+ (((dt->value.date.year-1)/4)-((dt->value.date.year-1)/100)+
+ ((dt->value.date.year-1)/400)) +
+ DAY_IN_YEAR(0, mon, dt->value.date.year);
+
+ return ret;
+}
+
+/**
+ * TIME_TO_NUMBER:
+ * @dt: an #xmlSchemaValPtr
+ *
+ * Calculates the number of seconds in the time portion of @dt.
+ *
+ * Returns seconds.
+ */
+#define TIME_TO_NUMBER(dt) \
+ ((double)((dt->value.date.hour * SECS_PER_HOUR) + \
+ (dt->value.date.min * SECS_PER_MIN) + \
+ (dt->value.date.tzo * SECS_PER_MIN)) + \
+ dt->value.date.sec)
+
+/**
+ * xmlSchemaCompareDates:
+ * @x: a first date/time value
+ * @y: a second date/time value
+ *
+ * Compare 2 date/times
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareDates (xmlSchemaValPtr x, xmlSchemaValPtr y)
+{
+ unsigned char xmask, ymask, xor_mask, and_mask;
+ xmlSchemaValPtr p1, p2, q1, q2;
+ long p1d, p2d, q1d, q2d;
+
+ if ((x == NULL) || (y == NULL))
+ return -2;
+
+ if (x->value.date.tz_flag) {
+
+ if (!y->value.date.tz_flag) {
+ p1 = xmlSchemaDateNormalize(x, 0);
+ p1d = _xmlSchemaDateCastYMToDays(p1) + p1->value.date.day;
+ /* normalize y + 14:00 */
+ q1 = xmlSchemaDateNormalize(y, (14 * SECS_PER_HOUR));
+
+ q1d = _xmlSchemaDateCastYMToDays(q1) + q1->value.date.day;
+ if (p1d < q1d) {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ return -1;
+ } else if (p1d == q1d) {
+ double sec;
+
+ sec = TIME_TO_NUMBER(p1) - TIME_TO_NUMBER(q1);
+ if (sec < 0.0) {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ return -1;
+ } else {
+ int ret = 0;
+ /* normalize y - 14:00 */
+ q2 = xmlSchemaDateNormalize(y, -(14 * SECS_PER_HOUR));
+ q2d = _xmlSchemaDateCastYMToDays(q2) + q2->value.date.day;
+ if (p1d > q2d)
+ ret = 1;
+ else if (p1d == q2d) {
+ sec = TIME_TO_NUMBER(p1) - TIME_TO_NUMBER(q2);
+ if (sec > 0.0)
+ ret = 1;
+ else
+ ret = 2; /* indeterminate */
+ }
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ xmlSchemaFreeValue(q2);
+ if (ret != 0)
+ return(ret);
+ }
+ } else {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ }
+ }
+ } else if (y->value.date.tz_flag) {
+ q1 = xmlSchemaDateNormalize(y, 0);
+ q1d = _xmlSchemaDateCastYMToDays(q1) + q1->value.date.day;
+
+ /* normalize x - 14:00 */
+ p1 = xmlSchemaDateNormalize(x, -(14 * SECS_PER_HOUR));
+ p1d = _xmlSchemaDateCastYMToDays(p1) + p1->value.date.day;
+
+ if (p1d < q1d) {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ return -1;
+ } else if (p1d == q1d) {
+ double sec;
+
+ sec = TIME_TO_NUMBER(p1) - TIME_TO_NUMBER(q1);
+ if (sec < 0.0) {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ return -1;
+ } else {
+ int ret = 0;
+ /* normalize x + 14:00 */
+ p2 = xmlSchemaDateNormalize(x, (14 * SECS_PER_HOUR));
+ p2d = _xmlSchemaDateCastYMToDays(p2) + p2->value.date.day;
+
+ if (p2d > q1d) {
+ ret = 1;
+ } else if (p2d == q1d) {
+ sec = TIME_TO_NUMBER(p2) - TIME_TO_NUMBER(q1);
+ if (sec > 0.0)
+ ret = 1;
+ else
+ ret = 2; /* indeterminate */
+ }
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ xmlSchemaFreeValue(p2);
+ if (ret != 0)
+ return(ret);
+ }
+ } else {
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ }
+ }
+
+ /*
+ * if the same type then calculate the difference
+ */
+ if (x->type == y->type) {
+ int ret = 0;
+ q1 = xmlSchemaDateNormalize(y, 0);
+ q1d = _xmlSchemaDateCastYMToDays(q1) + q1->value.date.day;
+
+ p1 = xmlSchemaDateNormalize(x, 0);
+ p1d = _xmlSchemaDateCastYMToDays(p1) + p1->value.date.day;
+
+ if (p1d < q1d) {
+ ret = -1;
+ } else if (p1d > q1d) {
+ ret = 1;
+ } else {
+ double sec;
+
+ sec = TIME_TO_NUMBER(p1) - TIME_TO_NUMBER(q1);
+ if (sec < 0.0)
+ ret = -1;
+ else if (sec > 0.0)
+ ret = 1;
+
+ }
+ xmlSchemaFreeValue(p1);
+ xmlSchemaFreeValue(q1);
+ return(ret);
+ }
+
+ switch (x->type) {
+ case XML_SCHEMAS_DATETIME:
+ xmask = 0xf;
+ break;
+ case XML_SCHEMAS_DATE:
+ xmask = 0x7;
+ break;
+ case XML_SCHEMAS_GYEAR:
+ xmask = 0x1;
+ break;
+ case XML_SCHEMAS_GMONTH:
+ xmask = 0x2;
+ break;
+ case XML_SCHEMAS_GDAY:
+ xmask = 0x3;
+ break;
+ case XML_SCHEMAS_GYEARMONTH:
+ xmask = 0x3;
+ break;
+ case XML_SCHEMAS_GMONTHDAY:
+ xmask = 0x6;
+ break;
+ case XML_SCHEMAS_TIME:
+ xmask = 0x8;
+ break;
+ default:
+ xmask = 0;
+ break;
+ }
+
+ switch (y->type) {
+ case XML_SCHEMAS_DATETIME:
+ ymask = 0xf;
+ break;
+ case XML_SCHEMAS_DATE:
+ ymask = 0x7;
+ break;
+ case XML_SCHEMAS_GYEAR:
+ ymask = 0x1;
+ break;
+ case XML_SCHEMAS_GMONTH:
+ ymask = 0x2;
+ break;
+ case XML_SCHEMAS_GDAY:
+ ymask = 0x3;
+ break;
+ case XML_SCHEMAS_GYEARMONTH:
+ ymask = 0x3;
+ break;
+ case XML_SCHEMAS_GMONTHDAY:
+ ymask = 0x6;
+ break;
+ case XML_SCHEMAS_TIME:
+ ymask = 0x8;
+ break;
+ default:
+ ymask = 0;
+ break;
+ }
+
+ xor_mask = xmask ^ ymask; /* mark type differences */
+ and_mask = xmask & ymask; /* mark field specification */
+
+ /* year */
+ if (xor_mask & 1)
+ return 2; /* indeterminate */
+ else if (and_mask & 1) {
+ if (x->value.date.year < y->value.date.year)
+ return -1;
+ else if (x->value.date.year > y->value.date.year)
+ return 1;
+ }
+
+ /* month */
+ if (xor_mask & 2)
+ return 2; /* indeterminate */
+ else if (and_mask & 2) {
+ if (x->value.date.mon < y->value.date.mon)
+ return -1;
+ else if (x->value.date.mon > y->value.date.mon)
+ return 1;
+ }
+
+ /* day */
+ if (xor_mask & 4)
+ return 2; /* indeterminate */
+ else if (and_mask & 4) {
+ if (x->value.date.day < y->value.date.day)
+ return -1;
+ else if (x->value.date.day > y->value.date.day)
+ return 1;
+ }
+
+ /* time */
+ if (xor_mask & 8)
+ return 2; /* indeterminate */
+ else if (and_mask & 8) {
+ if (x->value.date.hour < y->value.date.hour)
+ return -1;
+ else if (x->value.date.hour > y->value.date.hour)
+ return 1;
+ else if (x->value.date.min < y->value.date.min)
+ return -1;
+ else if (x->value.date.min > y->value.date.min)
+ return 1;
+ else if (x->value.date.sec < y->value.date.sec)
+ return -1;
+ else if (x->value.date.sec > y->value.date.sec)
+ return 1;
+ }
+
+ return 0;
+}
+
+/**
+ * xmlSchemaComparePreserveReplaceStrings:
+ * @x: a first string value
+ * @y: a second string value
+ * @invert: inverts the result if x < y or x > y.
+ *
+ * Compare 2 string for their normalized values.
+ * @x is a string with whitespace of "preserve", @y is
+ * a string with a whitespace of "replace". I.e. @x could
+ * be an "xsd:string" and @y an "xsd:normalizedString".
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaComparePreserveReplaceStrings(const xmlChar *x,
+ const xmlChar *y,
+ int invert)
+{
+ int tmp;
+
+ while ((*x != 0) && (*y != 0)) {
+ if (IS_WSP_REPLACE_CH(*y)) {
+ if (! IS_WSP_SPACE_CH(*x)) {
+ if ((*x - 0x20) < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ } else {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ } else {
+ tmp = *x - *y;
+ if (tmp < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ }
+ if (tmp > 0) {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ x++;
+ y++;
+ }
+ if (*x != 0) {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ if (*y != 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaComparePreserveCollapseStrings:
+ * @x: a first string value
+ * @y: a second string value
+ *
+ * Compare 2 string for their normalized values.
+ * @x is a string with whitespace of "preserve", @y is
+ * a string with a whitespace of "collapse". I.e. @x could
+ * be an "xsd:string" and @y an "xsd:normalizedString".
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaComparePreserveCollapseStrings(const xmlChar *x,
+ const xmlChar *y,
+ int invert)
+{
+ int tmp;
+
+ /*
+ * Skip leading blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+
+ while ((*x != 0) && (*y != 0)) {
+ if IS_WSP_BLANK_CH(*y) {
+ if (! IS_WSP_SPACE_CH(*x)) {
+ /*
+ * The yv character would have been replaced to 0x20.
+ */
+ if ((*x - 0x20) < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ } else {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ x++;
+ y++;
+ /*
+ * Skip contiguous blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+ } else {
+ tmp = *x++ - *y++;
+ if (tmp < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ }
+ if (tmp > 0) {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ }
+ if (*x != 0) {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ if (*y != 0) {
+ /*
+ * Skip trailing blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+ if (*y != 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaComparePreserveCollapseStrings:
+ * @x: a first string value
+ * @y: a second string value
+ *
+ * Compare 2 string for their normalized values.
+ * @x is a string with whitespace of "preserve", @y is
+ * a string with a whitespace of "collapse". I.e. @x could
+ * be an "xsd:string" and @y an "xsd:normalizedString".
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareReplaceCollapseStrings(const xmlChar *x,
+ const xmlChar *y,
+ int invert)
+{
+ int tmp;
+
+ /*
+ * Skip leading blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+
+ while ((*x != 0) && (*y != 0)) {
+ if IS_WSP_BLANK_CH(*y) {
+ if (! IS_WSP_BLANK_CH(*x)) {
+ /*
+ * The yv character would have been replaced to 0x20.
+ */
+ if ((*x - 0x20) < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ } else {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ x++;
+ y++;
+ /*
+ * Skip contiguous blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+ } else {
+ if IS_WSP_BLANK_CH(*x) {
+ /*
+ * The xv character would have been replaced to 0x20.
+ */
+ if ((0x20 - *y) < 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ } else {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ }
+ tmp = *x++ - *y++;
+ if (tmp < 0)
+ return(-1);
+ if (tmp > 0)
+ return(1);
+ }
+ }
+ if (*x != 0) {
+ if (invert)
+ return(-1);
+ else
+ return(1);
+ }
+ if (*y != 0) {
+ /*
+ * Skip trailing blank chars of the collapsed string.
+ */
+ while IS_WSP_BLANK_CH(*y)
+ y++;
+ if (*y != 0) {
+ if (invert)
+ return(1);
+ else
+ return(-1);
+ }
+ }
+ return(0);
+}
+
+
+/**
+ * xmlSchemaCompareReplacedStrings:
+ * @x: a first string value
+ * @y: a second string value
+ *
+ * Compare 2 string for their normalized values.
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareReplacedStrings(const xmlChar *x,
+ const xmlChar *y)
+{
+ int tmp;
+
+ while ((*x != 0) && (*y != 0)) {
+ if IS_WSP_BLANK_CH(*y) {
+ if (! IS_WSP_BLANK_CH(*x)) {
+ if ((*x - 0x20) < 0)
+ return(-1);
+ else
+ return(1);
+ }
+ } else {
+ if IS_WSP_BLANK_CH(*x) {
+ if ((0x20 - *y) < 0)
+ return(-1);
+ else
+ return(1);
+ }
+ tmp = *x - *y;
+ if (tmp < 0)
+ return(-1);
+ if (tmp > 0)
+ return(1);
+ }
+ x++;
+ y++;
+ }
+ if (*x != 0)
+ return(1);
+ if (*y != 0)
+ return(-1);
+ return(0);
+}
+
+/**
+ * xmlSchemaCompareNormStrings:
+ * @x: a first string value
+ * @y: a second string value
+ *
+ * Compare 2 string for their normalized values.
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareNormStrings(const xmlChar *x,
+ const xmlChar *y) {
+ int tmp;
+
+ while (IS_BLANK_CH(*x)) x++;
+ while (IS_BLANK_CH(*y)) y++;
+ while ((*x != 0) && (*y != 0)) {
+ if (IS_BLANK_CH(*x)) {
+ if (!IS_BLANK_CH(*y)) {
+ tmp = *x - *y;
+ return(tmp);
+ }
+ while (IS_BLANK_CH(*x)) x++;
+ while (IS_BLANK_CH(*y)) y++;
+ } else {
+ tmp = *x++ - *y++;
+ if (tmp < 0)
+ return(-1);
+ if (tmp > 0)
+ return(1);
+ }
+ }
+ if (*x != 0) {
+ while (IS_BLANK_CH(*x)) x++;
+ if (*x != 0)
+ return(1);
+ }
+ if (*y != 0) {
+ while (IS_BLANK_CH(*y)) y++;
+ if (*y != 0)
+ return(-1);
+ }
+ return(0);
+}
+
+/**
+ * xmlSchemaCompareFloats:
+ * @x: a first float or double value
+ * @y: a second float or double value
+ *
+ * Compare 2 values
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareFloats(xmlSchemaValPtr x, xmlSchemaValPtr y) {
+ double d1, d2;
+
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+
+ /*
+ * Cast everything to doubles.
+ */
+ if (x->type == XML_SCHEMAS_DOUBLE)
+ d1 = x->value.d;
+ else if (x->type == XML_SCHEMAS_FLOAT)
+ d1 = x->value.f;
+ else
+ return(-2);
+
+ if (y->type == XML_SCHEMAS_DOUBLE)
+ d2 = y->value.d;
+ else if (y->type == XML_SCHEMAS_FLOAT)
+ d2 = y->value.f;
+ else
+ return(-2);
+
+ /*
+ * Check for special cases.
+ */
+ if (xmlXPathIsNaN(d1)) {
+ if (xmlXPathIsNaN(d2))
+ return(0);
+ return(1);
+ }
+ if (xmlXPathIsNaN(d2))
+ return(-1);
+ if (d1 == xmlXPathPINF) {
+ if (d2 == xmlXPathPINF)
+ return(0);
+ return(1);
+ }
+ if (d2 == xmlXPathPINF)
+ return(-1);
+ if (d1 == xmlXPathNINF) {
+ if (d2 == xmlXPathNINF)
+ return(0);
+ return(-1);
+ }
+ if (d2 == xmlXPathNINF)
+ return(1);
+
+ /*
+ * basic tests, the last one we should have equality, but
+ * portability is more important than speed and handling
+ * NaN or Inf in a portable way is always a challenge, so ...
+ */
+ if (d1 < d2)
+ return(-1);
+ if (d1 > d2)
+ return(1);
+ if (d1 == d2)
+ return(0);
+ return(2);
+}
+
+/**
+ * xmlSchemaCompareValues:
+ * @x: a first value
+ * @xvalue: the first value as a string (optional)
+ * @xwtsp: the whitespace type
+ * @y: a second value
+ * @xvalue: the second value as a string (optional)
+ * @ywtsp: the whitespace type
+ *
+ * Compare 2 values
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, 3 if not
+ * comparable and -2 in case of error
+ */
+static int
+xmlSchemaCompareValuesInternal(xmlSchemaValType xtype,
+ xmlSchemaValPtr x,
+ const xmlChar *xvalue,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValType ytype,
+ xmlSchemaValPtr y,
+ const xmlChar *yvalue,
+ xmlSchemaWhitespaceValueType yws)
+{
+ switch (xtype) {
+ case XML_SCHEMAS_UNKNOWN:
+ case XML_SCHEMAS_ANYTYPE:
+ return(-2);
+ case XML_SCHEMAS_INTEGER:
+ case XML_SCHEMAS_NPINTEGER:
+ case XML_SCHEMAS_NINTEGER:
+ case XML_SCHEMAS_NNINTEGER:
+ case XML_SCHEMAS_PINTEGER:
+ case XML_SCHEMAS_INT:
+ case XML_SCHEMAS_UINT:
+ case XML_SCHEMAS_LONG:
+ case XML_SCHEMAS_ULONG:
+ case XML_SCHEMAS_SHORT:
+ case XML_SCHEMAS_USHORT:
+ case XML_SCHEMAS_BYTE:
+ case XML_SCHEMAS_UBYTE:
+ case XML_SCHEMAS_DECIMAL:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (ytype == xtype)
+ return(xmlSchemaCompareDecimals(x, y));
+ if ((ytype == XML_SCHEMAS_DECIMAL) ||
+ (ytype == XML_SCHEMAS_INTEGER) ||
+ (ytype == XML_SCHEMAS_NPINTEGER) ||
+ (ytype == XML_SCHEMAS_NINTEGER) ||
+ (ytype == XML_SCHEMAS_NNINTEGER) ||
+ (ytype == XML_SCHEMAS_PINTEGER) ||
+ (ytype == XML_SCHEMAS_INT) ||
+ (ytype == XML_SCHEMAS_UINT) ||
+ (ytype == XML_SCHEMAS_LONG) ||
+ (ytype == XML_SCHEMAS_ULONG) ||
+ (ytype == XML_SCHEMAS_SHORT) ||
+ (ytype == XML_SCHEMAS_USHORT) ||
+ (ytype == XML_SCHEMAS_BYTE) ||
+ (ytype == XML_SCHEMAS_UBYTE))
+ return(xmlSchemaCompareDecimals(x, y));
+ return(-2);
+ case XML_SCHEMAS_DURATION:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (ytype == XML_SCHEMAS_DURATION)
+ return(xmlSchemaCompareDurations(x, y));
+ return(-2);
+ case XML_SCHEMAS_TIME:
+ case XML_SCHEMAS_GDAY:
+ case XML_SCHEMAS_GMONTH:
+ case XML_SCHEMAS_GMONTHDAY:
+ case XML_SCHEMAS_GYEAR:
+ case XML_SCHEMAS_GYEARMONTH:
+ case XML_SCHEMAS_DATE:
+ case XML_SCHEMAS_DATETIME:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if ((ytype == XML_SCHEMAS_DATETIME) ||
+ (ytype == XML_SCHEMAS_TIME) ||
+ (ytype == XML_SCHEMAS_GDAY) ||
+ (ytype == XML_SCHEMAS_GMONTH) ||
+ (ytype == XML_SCHEMAS_GMONTHDAY) ||
+ (ytype == XML_SCHEMAS_GYEAR) ||
+ (ytype == XML_SCHEMAS_DATE) ||
+ (ytype == XML_SCHEMAS_GYEARMONTH))
+ return (xmlSchemaCompareDates(x, y));
+ return (-2);
+ /*
+ * Note that we will support comparison of string types against
+ * anySimpleType as well.
+ */
+ case XML_SCHEMAS_ANYSIMPLETYPE:
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_ENTITY:
+ case XML_SCHEMAS_ANYURI:
+ {
+ const xmlChar *xv, *yv;
+
+ if (x == NULL)
+ xv = xvalue;
+ else
+ xv = x->value.str;
+ if (y == NULL)
+ yv = yvalue;
+ else
+ yv = y->value.str;
+ /*
+ * TODO: Compare those against QName.
+ */
+ if (ytype == XML_SCHEMAS_QNAME) {
+ TODO
+ if (y == NULL)
+ return(-2);
+ return (-2);
+ }
+ if ((ytype == XML_SCHEMAS_ANYSIMPLETYPE) ||
+ (ytype == XML_SCHEMAS_STRING) ||
+ (ytype == XML_SCHEMAS_NORMSTRING) ||
+ (ytype == XML_SCHEMAS_TOKEN) ||
+ (ytype == XML_SCHEMAS_LANGUAGE) ||
+ (ytype == XML_SCHEMAS_NMTOKEN) ||
+ (ytype == XML_SCHEMAS_NAME) ||
+ (ytype == XML_SCHEMAS_NCNAME) ||
+ (ytype == XML_SCHEMAS_ID) ||
+ (ytype == XML_SCHEMAS_IDREF) ||
+ (ytype == XML_SCHEMAS_ENTITY) ||
+ (ytype == XML_SCHEMAS_ANYURI)) {
+
+ if (xws == XML_SCHEMA_WHITESPACE_PRESERVE) {
+
+ if (yws == XML_SCHEMA_WHITESPACE_PRESERVE) {
+ /* TODO: What about x < y or x > y. */
+ if (xmlStrEqual(xv, yv))
+ return (0);
+ else
+ return (2);
+ } else if (yws == XML_SCHEMA_WHITESPACE_REPLACE)
+ return (xmlSchemaComparePreserveReplaceStrings(xv, yv, 0));
+ else if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ return (xmlSchemaComparePreserveCollapseStrings(xv, yv, 0));
+
+ } else if (xws == XML_SCHEMA_WHITESPACE_REPLACE) {
+
+ if (yws == XML_SCHEMA_WHITESPACE_PRESERVE)
+ return (xmlSchemaComparePreserveReplaceStrings(yv, xv, 1));
+ if (yws == XML_SCHEMA_WHITESPACE_REPLACE)
+ return (xmlSchemaCompareReplacedStrings(xv, yv));
+ if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ return (xmlSchemaCompareReplaceCollapseStrings(xv, yv, 0));
+
+ } else if (xws == XML_SCHEMA_WHITESPACE_COLLAPSE) {
+
+ if (yws == XML_SCHEMA_WHITESPACE_PRESERVE)
+ return (xmlSchemaComparePreserveCollapseStrings(yv, xv, 1));
+ if (yws == XML_SCHEMA_WHITESPACE_REPLACE)
+ return (xmlSchemaCompareReplaceCollapseStrings(yv, xv, 1));
+ if (yws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ return (xmlSchemaCompareNormStrings(xv, yv));
+ } else
+ return (-2);
+
+ }
+ return (-2);
+ }
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_NOTATION:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if ((ytype == XML_SCHEMAS_QNAME) ||
+ (ytype == XML_SCHEMAS_NOTATION)) {
+ if ((xmlStrEqual(x->value.qname.name, y->value.qname.name)) &&
+ (xmlStrEqual(x->value.qname.uri, y->value.qname.uri)))
+ return(0);
+ return(2);
+ }
+ return (-2);
+ case XML_SCHEMAS_FLOAT:
+ case XML_SCHEMAS_DOUBLE:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if ((ytype == XML_SCHEMAS_FLOAT) ||
+ (ytype == XML_SCHEMAS_DOUBLE))
+ return (xmlSchemaCompareFloats(x, y));
+ return (-2);
+ case XML_SCHEMAS_BOOLEAN:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (ytype == XML_SCHEMAS_BOOLEAN) {
+ if (x->value.b == y->value.b)
+ return(0);
+ if (x->value.b == 0)
+ return(-1);
+ return(1);
+ }
+ return (-2);
+ case XML_SCHEMAS_HEXBINARY:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (ytype == XML_SCHEMAS_HEXBINARY) {
+ if (x->value.hex.total == y->value.hex.total) {
+ int ret = xmlStrcmp(x->value.hex.str, y->value.hex.str);
+ if (ret > 0)
+ return(1);
+ else if (ret == 0)
+ return(0);
+ }
+ else if (x->value.hex.total > y->value.hex.total)
+ return(1);
+
+ return(-1);
+ }
+ return (-2);
+ case XML_SCHEMAS_BASE64BINARY:
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (ytype == XML_SCHEMAS_BASE64BINARY) {
+ if (x->value.base64.total == y->value.base64.total) {
+ int ret = xmlStrcmp(x->value.base64.str,
+ y->value.base64.str);
+ if (ret > 0)
+ return(1);
+ else if (ret == 0)
+ return(0);
+ else
+ return(-1);
+ }
+ else if (x->value.base64.total > y->value.base64.total)
+ return(1);
+ else
+ return(-1);
+ }
+ return (-2);
+ case XML_SCHEMAS_IDREFS:
+ case XML_SCHEMAS_ENTITIES:
+ case XML_SCHEMAS_NMTOKENS:
+ TODO
+ break;
+ }
+ return -2;
+}
+
+/**
+ * xmlSchemaCompareValues:
+ * @x: a first value
+ * @y: a second value
+ *
+ * Compare 2 values
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+int
+xmlSchemaCompareValues(xmlSchemaValPtr x, xmlSchemaValPtr y) {
+ xmlSchemaWhitespaceValueType xws, yws;
+
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ if (x->type == XML_SCHEMAS_STRING)
+ xws = XML_SCHEMA_WHITESPACE_PRESERVE;
+ else if (x->type == XML_SCHEMAS_NORMSTRING)
+ xws = XML_SCHEMA_WHITESPACE_REPLACE;
+ else
+ xws = XML_SCHEMA_WHITESPACE_COLLAPSE;
+
+ if (y->type == XML_SCHEMAS_STRING)
+ yws = XML_SCHEMA_WHITESPACE_PRESERVE;
+ else if (y->type == XML_SCHEMAS_NORMSTRING)
+ yws = XML_SCHEMA_WHITESPACE_REPLACE;
+ else
+ yws = XML_SCHEMA_WHITESPACE_COLLAPSE;
+
+ return(xmlSchemaCompareValuesInternal(x->type, x, NULL, xws, y->type,
+ y, NULL, yws));
+}
+
+/**
+ * xmlSchemaCompareValuesWhtsp:
+ * @x: a first value
+ * @xws: the whitespace value of x
+ * @y: a second value
+ * @yws: the whitespace value of y
+ *
+ * Compare 2 values
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+int
+xmlSchemaCompareValuesWhtsp(xmlSchemaValPtr x,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValPtr y,
+ xmlSchemaWhitespaceValueType yws)
+{
+ if ((x == NULL) || (y == NULL))
+ return(-2);
+ return(xmlSchemaCompareValuesInternal(x->type, x, NULL, xws, y->type,
+ y, NULL, yws));
+}
+
+/**
+ * xmlSchemaCompareValuesWhtspExt:
+ * @x: a first value
+ * @xws: the whitespace value of x
+ * @y: a second value
+ * @yws: the whitespace value of y
+ *
+ * Compare 2 values
+ *
+ * Returns -1 if x < y, 0 if x == y, 1 if x > y, 2 if x <> y, and -2 in
+ * case of error
+ */
+static int
+xmlSchemaCompareValuesWhtspExt(xmlSchemaValType xtype,
+ xmlSchemaValPtr x,
+ const xmlChar *xvalue,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValType ytype,
+ xmlSchemaValPtr y,
+ const xmlChar *yvalue,
+ xmlSchemaWhitespaceValueType yws)
+{
+ return(xmlSchemaCompareValuesInternal(xtype, x, xvalue, xws, ytype, y,
+ yvalue, yws));
+}
+
+/**
+ * xmlSchemaNormLen:
+ * @value: a string
+ *
+ * Computes the UTF8 length of the normalized value of the string
+ *
+ * Returns the length or -1 in case of error.
+ */
+static int
+xmlSchemaNormLen(const xmlChar *value) {
+ const xmlChar *utf;
+ int ret = 0;
+
+ if (value == NULL)
+ return(-1);
+ utf = value;
+ while (IS_BLANK_CH(*utf)) utf++;
+ while (*utf != 0) {
+ if (utf[0] & 0x80) {
+ if ((utf[1] & 0xc0) != 0x80)
+ return(-1);
+ if ((utf[0] & 0xe0) == 0xe0) {
+ if ((utf[2] & 0xc0) != 0x80)
+ return(-1);
+ if ((utf[0] & 0xf0) == 0xf0) {
+ if ((utf[0] & 0xf8) != 0xf0 || (utf[3] & 0xc0) != 0x80)
+ return(-1);
+ utf += 4;
+ } else {
+ utf += 3;
+ }
+ } else {
+ utf += 2;
+ }
+ } else if (IS_BLANK_CH(*utf)) {
+ while (IS_BLANK_CH(*utf)) utf++;
+ if (*utf == 0)
+ break;
+ } else {
+ utf++;
+ }
+ ret++;
+ }
+ return(ret);
+}
+
+/**
+ * xmlSchemaGetFacetValueAsULong:
+ * @facet: an schemas type facet
+ *
+ * Extract the value of a facet
+ *
+ * Returns the value as a long
+ */
+unsigned long
+xmlSchemaGetFacetValueAsULong(xmlSchemaFacetPtr facet)
+{
+ /*
+ * TODO: Check if this is a decimal.
+ */
+ if (facet == NULL)
+ return 0;
+ return ((unsigned long) facet->val->value.decimal.lo);
+}
+
+/**
+ * xmlSchemaValidateListSimpleTypeFacet:
+ * @facet: the facet to check
+ * @value: the lexical repr of the value to validate
+ * @actualLen: the number of list items
+ * @expectedLen: the resulting expected number of list items
+ *
+ * Checks the value of a list simple type against a facet.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * number otherwise and -1 in case of an internal error.
+ */
+int
+xmlSchemaValidateListSimpleTypeFacet(xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ unsigned long actualLen,
+ unsigned long *expectedLen)
+{
+ if (facet == NULL)
+ return(-1);
+ /*
+ * TODO: Check if this will work with large numbers.
+ * (compare value.decimal.mi and value.decimal.hi as well?).
+ */
+ if (facet->type == XML_SCHEMA_FACET_LENGTH) {
+ if (actualLen != facet->val->value.decimal.lo) {
+ if (expectedLen != NULL)
+ *expectedLen = facet->val->value.decimal.lo;
+ return (XML_SCHEMAV_CVC_LENGTH_VALID);
+ }
+ } else if (facet->type == XML_SCHEMA_FACET_MINLENGTH) {
+ if (actualLen < facet->val->value.decimal.lo) {
+ if (expectedLen != NULL)
+ *expectedLen = facet->val->value.decimal.lo;
+ return (XML_SCHEMAV_CVC_MINLENGTH_VALID);
+ }
+ } else if (facet->type == XML_SCHEMA_FACET_MAXLENGTH) {
+ if (actualLen > facet->val->value.decimal.lo) {
+ if (expectedLen != NULL)
+ *expectedLen = facet->val->value.decimal.lo;
+ return (XML_SCHEMAV_CVC_MAXLENGTH_VALID);
+ }
+ } else
+ /*
+ * NOTE: That we can pass NULL as xmlSchemaValPtr to
+ * xmlSchemaValidateFacet, since the remaining facet types
+ * are: XML_SCHEMA_FACET_PATTERN, XML_SCHEMA_FACET_ENUMERATION.
+ */
+ return(xmlSchemaValidateFacet(NULL, facet, value, NULL));
+ return (0);
+}
+
+/**
+ * xmlSchemaValidateLengthFacet:
+ * @type: the built-in type
+ * @facet: the facet to check
+ * @value: the lexical repr. of the value to be validated
+ * @val: the precomputed value
+ * @ws: the whitespace type of the value
+ * @length: the actual length of the value
+ *
+ * Checka a value against a "length", "minLength" and "maxLength"
+ * facet; sets @length to the computed length of @value.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * otherwise and -1 in case of an internal or API error.
+ */
+static int
+xmlSchemaValidateLengthFacetInternal(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws)
+{
+ unsigned int len = 0;
+
+ if ((length == NULL) || (facet == NULL))
+ return (-1);
+ *length = 0;
+ if ((facet->type != XML_SCHEMA_FACET_LENGTH) &&
+ (facet->type != XML_SCHEMA_FACET_MAXLENGTH) &&
+ (facet->type != XML_SCHEMA_FACET_MINLENGTH))
+ return (-1);
+
+ /*
+ * TODO: length, maxLength and minLength must be of type
+ * nonNegativeInteger only. Check if decimal is used somehow.
+ */
+ if ((facet->val == NULL) ||
+ ((facet->val->type != XML_SCHEMAS_DECIMAL) &&
+ (facet->val->type != XML_SCHEMAS_NNINTEGER)) ||
+ (facet->val->value.decimal.frac != 0)) {
+ return(-1);
+ }
+ if ((val != NULL) && (val->type == XML_SCHEMAS_HEXBINARY))
+ len = val->value.hex.total;
+ else if ((val != NULL) && (val->type == XML_SCHEMAS_BASE64BINARY))
+ len = val->value.base64.total;
+ else {
+ switch (valType) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ if (ws == XML_SCHEMA_WHITESPACE_UNKNOWN) {
+ /*
+ * This is to ensure API compatibility with the old
+ * xmlSchemaValidateLengthFacet(). Anyway, this was and
+ * is not the correct handling.
+ * TODO: Get rid of this case somehow.
+ */
+ if (valType == XML_SCHEMAS_STRING)
+ len = xmlUTF8Strlen(value);
+ else
+ len = xmlSchemaNormLen(value);
+ } else if (value != NULL) {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ len = xmlSchemaNormLen(value);
+ else
+ /*
+ * Should be OK for "preserve" as well.
+ */
+ len = xmlUTF8Strlen(value);
+ }
+ break;
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ /*
+ * FIXME: What exactly to do with anyURI?
+ */
+ case XML_SCHEMAS_ANYURI:
+ if (value != NULL)
+ len = xmlSchemaNormLen(value);
+ break;
+ case XML_SCHEMAS_QNAME:
+ case XML_SCHEMAS_NOTATION:
+ /*
+ * For QName and NOTATION, those facets are
+ * deprecated and should be ignored.
+ */
+ return (0);
+ default:
+ TODO
+ }
+ }
+ *length = (unsigned long) len;
+ /*
+ * TODO: Return the whole expected value, i.e. "lo", "mi" and "hi".
+ */
+ if (facet->type == XML_SCHEMA_FACET_LENGTH) {
+ if (len != facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_LENGTH_VALID);
+ } else if (facet->type == XML_SCHEMA_FACET_MINLENGTH) {
+ if (len < facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_MINLENGTH_VALID);
+ } else {
+ if (len > facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_MAXLENGTH_VALID);
+ }
+
+ return (0);
+}
+
+/**
+ * xmlSchemaValidateLengthFacet:
+ * @type: the built-in type
+ * @facet: the facet to check
+ * @value: the lexical repr. of the value to be validated
+ * @val: the precomputed value
+ * @length: the actual length of the value
+ *
+ * Checka a value against a "length", "minLength" and "maxLength"
+ * facet; sets @length to the computed length of @value.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * otherwise and -1 in case of an internal or API error.
+ */
+int
+xmlSchemaValidateLengthFacet(xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length)
+{
+ if (type == NULL)
+ return(-1);
+ return (xmlSchemaValidateLengthFacetInternal(facet,
+ type->builtInType, value, val, length,
+ XML_SCHEMA_WHITESPACE_UNKNOWN));
+}
+
+/**
+ * xmlSchemaValidateLengthFacetWhtsp:
+ * @facet: the facet to check
+ * @valType: the built-in type
+ * @value: the lexical repr. of the value to be validated
+ * @val: the precomputed value
+ * @ws: the whitespace type of the value
+ * @length: the actual length of the value
+ *
+ * Checka a value against a "length", "minLength" and "maxLength"
+ * facet; sets @length to the computed length of @value.
+ *
+ * Returns 0 if the value is valid, a positive error code
+ * otherwise and -1 in case of an internal or API error.
+ */
+int
+xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws)
+{
+ return (xmlSchemaValidateLengthFacetInternal(facet, valType, value, val,
+ length, ws));
+}
+
+/**
+ * xmlSchemaValidateFacetInternal:
+ * @facet: the facet to check
+ * @fws: the whitespace type of the facet's value
+ * @valType: the built-in type of the value
+ * @value: the lexical repr of the value to validate
+ * @val: the precomputed value
+ * @ws: the whitespace type of the value
+ *
+ * Check a value against a facet condition
+ *
+ * Returns 0 if the element is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+static int
+xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws)
+{
+ int ret;
+
+ if (facet == NULL)
+ return(-1);
+
+ switch (facet->type) {
+ case XML_SCHEMA_FACET_PATTERN:
+ /*
+ * NOTE that for patterns, the @value needs to be the normalized
+ * value, *not* the lexical initial value or the canonical value.
+ */
+ if (value == NULL)
+ return(-1);
+ ret = xmlRegexpExec(facet->regexp, value);
+ if (ret == 1)
+ return(0);
+ if (ret == 0)
+ return(XML_SCHEMAV_CVC_PATTERN_VALID);
+ return(ret);
+ case XML_SCHEMA_FACET_MAXEXCLUSIVE:
+ ret = xmlSchemaCompareValues(val, facet->val);
+ if (ret == -2)
+ return(-1);
+ if (ret == -1)
+ return(0);
+ return(XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID);
+ case XML_SCHEMA_FACET_MAXINCLUSIVE:
+ ret = xmlSchemaCompareValues(val, facet->val);
+ if (ret == -2)
+ return(-1);
+ if ((ret == -1) || (ret == 0))
+ return(0);
+ return(XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID);
+ case XML_SCHEMA_FACET_MINEXCLUSIVE:
+ ret = xmlSchemaCompareValues(val, facet->val);
+ if (ret == -2)
+ return(-1);
+ if (ret == 1)
+ return(0);
+ return(XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID);
+ case XML_SCHEMA_FACET_MININCLUSIVE:
+ ret = xmlSchemaCompareValues(val, facet->val);
+ if (ret == -2)
+ return(-1);
+ if ((ret == 1) || (ret == 0))
+ return(0);
+ return(XML_SCHEMAV_CVC_MININCLUSIVE_VALID);
+ case XML_SCHEMA_FACET_WHITESPACE:
+ /* TODO whitespaces */
+ /*
+ * NOTE: Whitespace should be handled to normalize
+ * the value to be validated against a the facets;
+ * not to normalize the value in-between.
+ */
+ return(0);
+ case XML_SCHEMA_FACET_ENUMERATION:
+ if (ws == XML_SCHEMA_WHITESPACE_UNKNOWN) {
+ /*
+ * This is to ensure API compatibility with the old
+ * xmlSchemaValidateFacet().
+ * TODO: Get rid of this case.
+ */
+ if ((facet->value != NULL) &&
+ (xmlStrEqual(facet->value, value)))
+ return(0);
+ } else {
+ ret = xmlSchemaCompareValuesWhtspExt(facet->val->type,
+ facet->val, facet->value, fws, valType, val,
+ value, ws);
+ if (ret == -2)
+ return(-1);
+ if (ret == 0)
+ return(0);
+ }
+ return(XML_SCHEMAV_CVC_ENUMERATION_VALID);
+ case XML_SCHEMA_FACET_LENGTH:
+ /*
+ * SPEC (1.3) "if {primitive type definition} is QName or NOTATION,
+ * then any {value} is facet-valid."
+ */
+ if ((valType == XML_SCHEMAS_QNAME) ||
+ (valType == XML_SCHEMAS_NOTATION))
+ return (0);
+ /* No break on purpose. */
+ case XML_SCHEMA_FACET_MAXLENGTH:
+ case XML_SCHEMA_FACET_MINLENGTH: {
+ unsigned int len = 0;
+
+ if ((valType == XML_SCHEMAS_QNAME) ||
+ (valType == XML_SCHEMAS_NOTATION))
+ return (0);
+ /*
+ * TODO: length, maxLength and minLength must be of type
+ * nonNegativeInteger only. Check if decimal is used somehow.
+ */
+ if ((facet->val == NULL) ||
+ ((facet->val->type != XML_SCHEMAS_DECIMAL) &&
+ (facet->val->type != XML_SCHEMAS_NNINTEGER)) ||
+ (facet->val->value.decimal.frac != 0)) {
+ return(-1);
+ }
+ if ((val != NULL) && (val->type == XML_SCHEMAS_HEXBINARY))
+ len = val->value.hex.total;
+ else if ((val != NULL) && (val->type == XML_SCHEMAS_BASE64BINARY))
+ len = val->value.base64.total;
+ else {
+ switch (valType) {
+ case XML_SCHEMAS_STRING:
+ case XML_SCHEMAS_NORMSTRING:
+ if (ws == XML_SCHEMA_WHITESPACE_UNKNOWN) {
+ /*
+ * This is to ensure API compatibility with the old
+ * xmlSchemaValidateFacet(). Anyway, this was and
+ * is not the correct handling.
+ * TODO: Get rid of this case somehow.
+ */
+ if (valType == XML_SCHEMAS_STRING)
+ len = xmlUTF8Strlen(value);
+ else
+ len = xmlSchemaNormLen(value);
+ } else if (value != NULL) {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ len = xmlSchemaNormLen(value);
+ else
+ /*
+ * Should be OK for "preserve" as well.
+ */
+ len = xmlUTF8Strlen(value);
+ }
+ break;
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_ANYURI:
+ if (value != NULL)
+ len = xmlSchemaNormLen(value);
+ break;
+ default:
+ TODO
+ }
+ }
+ if (facet->type == XML_SCHEMA_FACET_LENGTH) {
+ if (len != facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_LENGTH_VALID);
+ } else if (facet->type == XML_SCHEMA_FACET_MINLENGTH) {
+ if (len < facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_MINLENGTH_VALID);
+ } else {
+ if (len > facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_MAXLENGTH_VALID);
+ }
+ break;
+ }
+ case XML_SCHEMA_FACET_TOTALDIGITS:
+ case XML_SCHEMA_FACET_FRACTIONDIGITS:
+
+ if ((facet->val == NULL) ||
+ ((facet->val->type != XML_SCHEMAS_PINTEGER) &&
+ (facet->val->type != XML_SCHEMAS_NNINTEGER)) ||
+ (facet->val->value.decimal.frac != 0)) {
+ return(-1);
+ }
+ if ((val == NULL) ||
+ ((val->type != XML_SCHEMAS_DECIMAL) &&
+ (val->type != XML_SCHEMAS_INTEGER) &&
+ (val->type != XML_SCHEMAS_NPINTEGER) &&
+ (val->type != XML_SCHEMAS_NINTEGER) &&
+ (val->type != XML_SCHEMAS_NNINTEGER) &&
+ (val->type != XML_SCHEMAS_PINTEGER) &&
+ (val->type != XML_SCHEMAS_INT) &&
+ (val->type != XML_SCHEMAS_UINT) &&
+ (val->type != XML_SCHEMAS_LONG) &&
+ (val->type != XML_SCHEMAS_ULONG) &&
+ (val->type != XML_SCHEMAS_SHORT) &&
+ (val->type != XML_SCHEMAS_USHORT) &&
+ (val->type != XML_SCHEMAS_BYTE) &&
+ (val->type != XML_SCHEMAS_UBYTE))) {
+ return(-1);
+ }
+ if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) {
+ if (val->value.decimal.total > facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_TOTALDIGITS_VALID);
+
+ } else if (facet->type == XML_SCHEMA_FACET_FRACTIONDIGITS) {
+ if (val->value.decimal.frac > facet->val->value.decimal.lo)
+ return(XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID);
+ }
+ break;
+ default:
+ TODO
+ }
+ return(0);
+
+}
+
+/**
+ * xmlSchemaValidateFacet:
+ * @base: the base type
+ * @facet: the facet to check
+ * @value: the lexical repr of the value to validate
+ * @val: the precomputed value
+ *
+ * Check a value against a facet condition
+ *
+ * Returns 0 if the element is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValidateFacet(xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val)
+{
+ /*
+ * This tries to ensure API compatibility regarding the old
+ * xmlSchemaValidateFacet() and the new xmlSchemaValidateFacetInternal() and
+ * xmlSchemaValidateFacetWhtsp().
+ */
+ if (val != NULL)
+ return(xmlSchemaValidateFacetInternal(facet,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, val->type, value, val,
+ XML_SCHEMA_WHITESPACE_UNKNOWN));
+ else if (base != NULL)
+ return(xmlSchemaValidateFacetInternal(facet,
+ XML_SCHEMA_WHITESPACE_UNKNOWN, base->builtInType, value, val,
+ XML_SCHEMA_WHITESPACE_UNKNOWN));
+ return(-1);
+}
+
+/**
+ * xmlSchemaValidateFacetWhtsp:
+ * @facet: the facet to check
+ * @fws: the whitespace type of the facet's value
+ * @valType: the built-in type of the value
+ * @value: the lexical (or normalized for pattern) repr of the value to validate
+ * @val: the precomputed value
+ * @ws: the whitespace type of the value
+ *
+ * Check a value against a facet condition. This takes value normalization
+ * according to the specified whitespace types into account.
+ * Note that @value needs to be the *normalized* value if the facet
+ * is of type "pattern".
+ *
+ * Returns 0 if the element is schemas valid, a positive error code
+ * number otherwise and -1 in case of internal or API error.
+ */
+int
+xmlSchemaValidateFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws)
+{
+ return(xmlSchemaValidateFacetInternal(facet, fws, valType,
+ value, val, ws));
+}
+
+#if 0
+#ifndef DBL_DIG
+#define DBL_DIG 16
+#endif
+#ifndef DBL_EPSILON
+#define DBL_EPSILON 1E-9
+#endif
+
+#define INTEGER_DIGITS DBL_DIG
+#define FRACTION_DIGITS (DBL_DIG + 1)
+#define EXPONENT_DIGITS (3 + 2)
+
+/**
+ * xmlXPathFormatNumber:
+ * @number: number to format
+ * @buffer: output buffer
+ * @buffersize: size of output buffer
+ *
+ * Convert the number into a string representation.
+ */
+static void
+xmlSchemaFormatFloat(double number, char buffer[], int buffersize)
+{
+ switch (xmlXPathIsInf(number)) {
+ case 1:
+ if (buffersize > (int)sizeof("INF"))
+ snprintf(buffer, buffersize, "INF");
+ break;
+ case -1:
+ if (buffersize > (int)sizeof("-INF"))
+ snprintf(buffer, buffersize, "-INF");
+ break;
+ default:
+ if (xmlXPathIsNaN(number)) {
+ if (buffersize > (int)sizeof("NaN"))
+ snprintf(buffer, buffersize, "NaN");
+ } else if (number == 0) {
+ snprintf(buffer, buffersize, "0.0E0");
+ } else {
+ /* 3 is sign, decimal point, and terminating zero */
+ char work[DBL_DIG + EXPONENT_DIGITS + 3];
+ int integer_place, fraction_place;
+ char *ptr;
+ char *after_fraction;
+ double absolute_value;
+ int size;
+
+ absolute_value = fabs(number);
+
+ /*
+ * Result is in work, and after_fraction points
+ * just past the fractional part.
+ * Use scientific notation
+ */
+ integer_place = DBL_DIG + EXPONENT_DIGITS + 1;
+ fraction_place = DBL_DIG - 1;
+ snprintf(work, sizeof(work),"%*.*e",
+ integer_place, fraction_place, number);
+ after_fraction = strchr(work + DBL_DIG, 'e');
+ /* Remove fractional trailing zeroes */
+ ptr = after_fraction;
+ while (*(--ptr) == '0')
+ ;
+ if (*ptr != '.')
+ ptr++;
+ while ((*ptr++ = *after_fraction++) != 0);
+
+ /* Finally copy result back to caller */
+ size = strlen(work) + 1;
+ if (size > buffersize) {
+ work[buffersize - 1] = 0;
+ size = buffersize;
+ }
+ memmove(buffer, work, size);
+ }
+ break;
+ }
+}
+#endif
+
+/**
+ * xmlSchemaGetCanonValue:
+ * @val: the precomputed value
+ * @retValue: the returned value
+ *
+ * Get the canonical lexical representation of the value.
+ * The caller has to FREE the returned retValue.
+ *
+ * WARNING: Some value types are not supported yet, resulting
+ * in a @retValue of "???".
+ *
+ * TODO: XML Schema 1.0 does not define canonical representations
+ * for: duration, gYearMonth, gYear, gMonthDay, gMonth, gDay,
+ * anyURI, QName, NOTATION. This will be fixed in XML Schema 1.1.
+ *
+ *
+ * Returns 0 if the value could be built, 1 if the value type is
+ * not supported yet and -1 in case of API errors.
+ */
+int
+xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
+{
+ if ((retValue == NULL) || (val == NULL))
+ return (-1);
+ *retValue = NULL;
+ switch (val->type) {
+ case XML_SCHEMAS_STRING:
+ if (val->value.str == NULL)
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "");
+ else
+ *retValue =
+ BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
+ break;
+ case XML_SCHEMAS_NORMSTRING:
+ if (val->value.str == NULL)
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "");
+ else {
+ *retValue = xmlSchemaWhiteSpaceReplace(
+ (const xmlChar *) val->value.str);
+ if ((*retValue) == NULL)
+ *retValue = BAD_CAST xmlStrdup(
+ (const xmlChar *) val->value.str);
+ }
+ break;
+ case XML_SCHEMAS_TOKEN:
+ case XML_SCHEMAS_LANGUAGE:
+ case XML_SCHEMAS_NMTOKEN:
+ case XML_SCHEMAS_NAME:
+ case XML_SCHEMAS_NCNAME:
+ case XML_SCHEMAS_ID:
+ case XML_SCHEMAS_IDREF:
+ case XML_SCHEMAS_ENTITY:
+ case XML_SCHEMAS_NOTATION: /* Unclear */
+ case XML_SCHEMAS_ANYURI: /* Unclear */
+ if (val->value.str == NULL)
+ return (-1);
+ *retValue =
+ BAD_CAST xmlSchemaCollapseString(BAD_CAST val->value.str);
+ if (*retValue == NULL)
+ *retValue =
+ BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
+ break;
+ case XML_SCHEMAS_QNAME:
+ /* TODO: Unclear in XML Schema 1.0. */
+ if (val->value.qname.uri == NULL) {
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST val->value.qname.name);
+ return (0);
+ } else {
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "{");
+ *retValue = BAD_CAST xmlStrcat((xmlChar *) (*retValue),
+ BAD_CAST val->value.qname.uri);
+ *retValue = BAD_CAST xmlStrcat((xmlChar *) (*retValue),
+ BAD_CAST "}");
+ *retValue = BAD_CAST xmlStrcat((xmlChar *) (*retValue),
+ BAD_CAST val->value.qname.uri);
+ }
+ break;
+ case XML_SCHEMAS_DECIMAL:
+ /*
+ * TODO: Lookout for a more simple implementation.
+ */
+ if ((val->value.decimal.total == 1) &&
+ (val->value.decimal.lo == 0)) {
+ *retValue = xmlStrdup(BAD_CAST "0.0");
+ } else {
+ xmlSchemaValDecimal dec = val->value.decimal;
+ int bufsize;
+ char *buf = NULL, *offs;
+
+ /* Add room for the decimal point as well. */
+ bufsize = dec.total + 2;
+ if (dec.sign)
+ bufsize++;
+ /* Add room for leading/trailing zero. */
+ if ((dec.frac == 0) || (dec.frac == dec.total))
+ bufsize++;
+ buf = xmlMalloc(bufsize);
+ if (buf == NULL)
+ return(-1);
+ offs = buf;
+ if (dec.sign)
+ *offs++ = '-';
+ if (dec.frac == dec.total) {
+ *offs++ = '0';
+ *offs++ = '.';
+ }
+ if (dec.hi != 0)
+ snprintf(offs, bufsize - (offs - buf),
+ "%lu%lu%lu", dec.hi, dec.mi, dec.lo);
+ else if (dec.mi != 0)
+ snprintf(offs, bufsize - (offs - buf),
+ "%lu%lu", dec.mi, dec.lo);
+ else
+ snprintf(offs, bufsize - (offs - buf),
+ "%lu", dec.lo);
+
+ if (dec.frac != 0) {
+ if (dec.frac != dec.total) {
+ int diff = dec.total - dec.frac;
+ /*
+ * Insert the decimal point.
+ */
+ memmove(offs + diff + 1, offs + diff, dec.frac +1);
+ offs[diff] = '.';
+ } else {
+ unsigned int i = 0;
+ /*
+ * Insert missing zeroes behind the decimal point.
+ */
+ while (*(offs + i) != 0)
+ i++;
+ if (i < dec.total) {
+ memmove(offs + (dec.total - i), offs, i +1);
+ memset(offs, '0', dec.total - i);
+ }
+ }
+ } else {
+ /*
+ * Append decimal point and zero.
+ */
+ offs = buf + bufsize - 1;
+ *offs-- = 0;
+ *offs-- = '0';
+ *offs-- = '.';
+ }
+ *retValue = BAD_CAST buf;
+ }
+ break;
+ case XML_SCHEMAS_INTEGER:
+ case XML_SCHEMAS_PINTEGER:
+ case XML_SCHEMAS_NPINTEGER:
+ case XML_SCHEMAS_NINTEGER:
+ case XML_SCHEMAS_NNINTEGER:
+ case XML_SCHEMAS_LONG:
+ case XML_SCHEMAS_BYTE:
+ case XML_SCHEMAS_SHORT:
+ case XML_SCHEMAS_INT:
+ case XML_SCHEMAS_UINT:
+ case XML_SCHEMAS_ULONG:
+ case XML_SCHEMAS_USHORT:
+ case XML_SCHEMAS_UBYTE:
+ if ((val->value.decimal.total == 1) &&
+ (val->value.decimal.lo == 0))
+ *retValue = xmlStrdup(BAD_CAST "0");
+ else {
+ xmlSchemaValDecimal dec = val->value.decimal;
+ int bufsize = dec.total + 1;
+
+ /* Add room for the decimal point as well. */
+ if (dec.sign)
+ bufsize++;
+ *retValue = xmlMalloc(bufsize);
+ if (*retValue == NULL)
+ return(-1);
+ if (dec.hi != 0) {
+ if (dec.sign)
+ snprintf((char *) *retValue, bufsize,
+ "-%lu%lu%lu", dec.hi, dec.mi, dec.lo);
+ else
+ snprintf((char *) *retValue, bufsize,
+ "%lu%lu%lu", dec.hi, dec.mi, dec.lo);
+ } else if (dec.mi != 0) {
+ if (dec.sign)
+ snprintf((char *) *retValue, bufsize,
+ "-%lu%lu", dec.mi, dec.lo);
+ else
+ snprintf((char *) *retValue, bufsize,
+ "%lu%lu", dec.mi, dec.lo);
+ } else {
+ if (dec.sign)
+ snprintf((char *) *retValue, bufsize, "-%lu", dec.lo);
+ else
+ snprintf((char *) *retValue, bufsize, "%lu", dec.lo);
+ }
+ }
+ break;
+ case XML_SCHEMAS_BOOLEAN:
+ if (val->value.b)
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "true");
+ else
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "false");
+ break;
+ case XML_SCHEMAS_DURATION: {
+ char buf[100];
+ unsigned long year;
+ unsigned long mon, day, hour = 0, min = 0;
+ double sec = 0, left;
+
+ /* TODO: Unclear in XML Schema 1.0 */
+ /*
+ * TODO: This results in a normalized output of the value
+ * - which is NOT conformant to the spec -
+ * since the exact values of each property are not
+ * recoverable. Think about extending the structure to
+ * provide a field for every property.
+ */
+ year = (unsigned long) FQUOTIENT(labs(val->value.dur.mon), 12);
+ mon = labs(val->value.dur.mon) - 12 * year;
+
+ day = (unsigned long) FQUOTIENT(fabs(val->value.dur.sec), 86400);
+ left = fabs(val->value.dur.sec) - day * 86400;
+ if (left > 0) {
+ hour = (unsigned long) FQUOTIENT(left, 3600);
+ left = left - (hour * 3600);
+ if (left > 0) {
+ min = (unsigned long) FQUOTIENT(left, 60);
+ sec = left - (min * 60);
+ }
+ }
+ if ((val->value.dur.mon < 0) || (val->value.dur.sec < 0))
+ snprintf(buf, 100, "P%luY%luM%luDT%luH%luM%.14gS",
+ year, mon, day, hour, min, sec);
+ else
+ snprintf(buf, 100, "-P%luY%luM%luDT%luH%luM%.14gS",
+ year, mon, day, hour, min, sec);
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_GYEAR: {
+ char buf[30];
+ /* TODO: Unclear in XML Schema 1.0 */
+ /* TODO: What to do with the timezone? */
+ snprintf(buf, 30, "%04ld", val->value.date.year);
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_GMONTH: {
+ /* TODO: Unclear in XML Schema 1.0 */
+ /* TODO: What to do with the timezone? */
+ *retValue = xmlMalloc(6);
+ if (*retValue == NULL)
+ return(-1);
+ snprintf((char *) *retValue, 6, "--%02u",
+ val->value.date.mon);
+ }
+ break;
+ case XML_SCHEMAS_GDAY: {
+ /* TODO: Unclear in XML Schema 1.0 */
+ /* TODO: What to do with the timezone? */
+ *retValue = xmlMalloc(6);
+ if (*retValue == NULL)
+ return(-1);
+ snprintf((char *) *retValue, 6, "---%02u",
+ val->value.date.day);
+ }
+ break;
+ case XML_SCHEMAS_GMONTHDAY: {
+ /* TODO: Unclear in XML Schema 1.0 */
+ /* TODO: What to do with the timezone? */
+ *retValue = xmlMalloc(8);
+ if (*retValue == NULL)
+ return(-1);
+ snprintf((char *) *retValue, 8, "--%02u-%02u",
+ val->value.date.mon, val->value.date.day);
+ }
+ break;
+ case XML_SCHEMAS_GYEARMONTH: {
+ char buf[35];
+ /* TODO: Unclear in XML Schema 1.0 */
+ /* TODO: What to do with the timezone? */
+ if (val->value.date.year < 0)
+ snprintf(buf, 35, "-%04ld-%02u",
+ labs(val->value.date.year),
+ val->value.date.mon);
+ else
+ snprintf(buf, 35, "%04ld-%02u",
+ val->value.date.year, val->value.date.mon);
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_TIME:
+ {
+ char buf[30];
+
+ if (val->value.date.tz_flag) {
+ xmlSchemaValPtr norm;
+
+ norm = xmlSchemaDateNormalize(val, 0);
+ if (norm == NULL)
+ return (-1);
+ /*
+ * TODO: Check if "%.14g" is portable.
+ */
+ snprintf(buf, 30,
+ "%02u:%02u:%02.14gZ",
+ norm->value.date.hour,
+ norm->value.date.min,
+ norm->value.date.sec);
+ xmlSchemaFreeValue(norm);
+ } else {
+ snprintf(buf, 30,
+ "%02u:%02u:%02.14g",
+ val->value.date.hour,
+ val->value.date.min,
+ val->value.date.sec);
+ }
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_DATE:
+ {
+ char buf[30];
+
+ if (val->value.date.tz_flag) {
+ xmlSchemaValPtr norm;
+
+ norm = xmlSchemaDateNormalize(val, 0);
+ if (norm == NULL)
+ return (-1);
+ /*
+ * TODO: Append the canonical value of the
+ * recoverable timezone and not "Z".
+ */
+ snprintf(buf, 30,
+ "%04ld:%02u:%02uZ",
+ norm->value.date.year, norm->value.date.mon,
+ norm->value.date.day);
+ xmlSchemaFreeValue(norm);
+ } else {
+ snprintf(buf, 30,
+ "%04ld:%02u:%02u",
+ val->value.date.year, val->value.date.mon,
+ val->value.date.day);
+ }
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_DATETIME:
+ {
+ char buf[50];
+
+ if (val->value.date.tz_flag) {
+ xmlSchemaValPtr norm;
+
+ norm = xmlSchemaDateNormalize(val, 0);
+ if (norm == NULL)
+ return (-1);
+ /*
+ * TODO: Check if "%.14g" is portable.
+ */
+ snprintf(buf, 50,
+ "%04ld:%02u:%02uT%02u:%02u:%02.14gZ",
+ norm->value.date.year, norm->value.date.mon,
+ norm->value.date.day, norm->value.date.hour,
+ norm->value.date.min, norm->value.date.sec);
+ xmlSchemaFreeValue(norm);
+ } else {
+ snprintf(buf, 50,
+ "%04ld:%02u:%02uT%02u:%02u:%02.14g",
+ val->value.date.year, val->value.date.mon,
+ val->value.date.day, val->value.date.hour,
+ val->value.date.min, val->value.date.sec);
+ }
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_HEXBINARY:
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST val->value.hex.str);
+ break;
+ case XML_SCHEMAS_BASE64BINARY:
+ /*
+ * TODO: Is the following spec piece implemented?:
+ * SPEC: "Note: For some values the canonical form defined
+ * above does not conform to [RFC 2045], which requires breaking
+ * with linefeeds at appropriate intervals."
+ */
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST val->value.base64.str);
+ break;
+ case XML_SCHEMAS_FLOAT: {
+ char buf[30];
+ /*
+ * |m| < 16777216, -149 <= e <= 104.
+ * TODO: Handle, NaN, INF, -INF. The format is not
+ * yet conformant. The c type float does not cover
+ * the whole range.
+ */
+ snprintf(buf, 30, "%01.14e", val->value.f);
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ case XML_SCHEMAS_DOUBLE: {
+ char buf[40];
+ /* |m| < 9007199254740992, -1075 <= e <= 970 */
+ /*
+ * TODO: Handle, NaN, INF, -INF. The format is not
+ * yet conformant. The c type float does not cover
+ * the whole range.
+ */
+ snprintf(buf, 40, "%01.14e", val->value.d);
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST buf);
+ }
+ break;
+ default:
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "???");
+ return (1);
+ }
+ if (*retValue == NULL)
+ return(-1);
+ return (0);
+}
+
+/**
+ * xmlSchemaGetCanonValueWhtsp:
+ * @val: the precomputed value
+ * @retValue: the returned value
+ * @ws: the whitespace type of the value
+ *
+ * Get the canonical representation of the value.
+ * The caller has to free the returned @retValue.
+ *
+ * Returns 0 if the value could be built, 1 if the value type is
+ * not supported yet and -1 in case of API errors.
+ */
+int
+xmlSchemaGetCanonValueWhtsp(xmlSchemaValPtr val,
+ const xmlChar **retValue,
+ xmlSchemaWhitespaceValueType ws)
+{
+ if ((retValue == NULL) || (val == NULL))
+ return (-1);
+ if ((ws == XML_SCHEMA_WHITESPACE_UNKNOWN) ||
+ (ws > XML_SCHEMA_WHITESPACE_COLLAPSE))
+ return (-1);
+
+ *retValue = NULL;
+ switch (val->type) {
+ case XML_SCHEMAS_STRING:
+ if (val->value.str == NULL)
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "");
+ else if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ *retValue = xmlSchemaCollapseString(val->value.str);
+ else if (ws == XML_SCHEMA_WHITESPACE_REPLACE)
+ *retValue = xmlSchemaWhiteSpaceReplace(val->value.str);
+ if ((*retValue) == NULL)
+ *retValue = BAD_CAST xmlStrdup(val->value.str);
+ break;
+ case XML_SCHEMAS_NORMSTRING:
+ if (val->value.str == NULL)
+ *retValue = BAD_CAST xmlStrdup(BAD_CAST "");
+ else {
+ if (ws == XML_SCHEMA_WHITESPACE_COLLAPSE)
+ *retValue = xmlSchemaCollapseString(val->value.str);
+ else
+ *retValue = xmlSchemaWhiteSpaceReplace(val->value.str);
+ if ((*retValue) == NULL)
+ *retValue = BAD_CAST xmlStrdup(val->value.str);
+ }
+ break;
+ default:
+ return (xmlSchemaGetCanonValue(val, retValue));
+ }
+ return (0);
+}
+
+/**
+ * xmlSchemaGetValType:
+ * @val: a schemas value
+ *
+ * Accessor for the type of a value
+ *
+ * Returns the xmlSchemaValType of the value
+ */
+xmlSchemaValType
+xmlSchemaGetValType(xmlSchemaValPtr val)
+{
+ if (val == NULL)
+ return(XML_SCHEMAS_UNKNOWN);
+ return (val->type);
+}
+
+#define bottom_xmlschemastypes
+#include "elfgcchack.h"
+#endif /* LIBXML_SCHEMAS_ENABLED */
diff --git a/xmlstring.c b/xmlstring.c
new file mode 100644
index 0000000..a37220d
--- /dev/null
+++ b/xmlstring.c
@@ -0,0 +1,984 @@
+/*
+ * string.c : an XML string utilities module
+ *
+ * This module provides various utility functions for manipulating
+ * the xmlChar* type. All functions named xmlStr* have been moved here
+ * from the parser.c file (their original home).
+ *
+ * See Copyright for the status of this software.
+ *
+ * UTF8 string routines from:
+ * William Brack <wbrack@mmm.com.hk>
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parserInternals.h>
+#include <libxml/xmlstring.h>
+
+/************************************************************************
+ * *
+ * Commodity functions to handle xmlChars *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlStrndup:
+ * @cur: the input xmlChar *
+ * @len: the len of @cur
+ *
+ * a strndup for array of xmlChar's
+ *
+ * Returns a new xmlChar * or NULL
+ */
+xmlChar *
+xmlStrndup(const xmlChar *cur, int len) {
+ xmlChar *ret;
+
+ if ((cur == NULL) || (len < 0)) return(NULL);
+ ret = (xmlChar *) xmlMallocAtomic((len + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlErrMemory(NULL, NULL);
+ return(NULL);
+ }
+ memcpy(ret, cur, len * sizeof(xmlChar));
+ ret[len] = 0;
+ return(ret);
+}
+
+/**
+ * xmlStrdup:
+ * @cur: the input xmlChar *
+ *
+ * a strdup for array of xmlChar's. Since they are supposed to be
+ * encoded in UTF-8 or an encoding with 8bit based chars, we assume
+ * a termination mark of '0'.
+ *
+ * Returns a new xmlChar * or NULL
+ */
+xmlChar *
+xmlStrdup(const xmlChar *cur) {
+ const xmlChar *p = cur;
+
+ if (cur == NULL) return(NULL);
+ while (*p != 0) p++; /* non input consuming */
+ return(xmlStrndup(cur, p - cur));
+}
+
+/**
+ * xmlCharStrndup:
+ * @cur: the input char *
+ * @len: the len of @cur
+ *
+ * a strndup for char's to xmlChar's
+ *
+ * Returns a new xmlChar * or NULL
+ */
+
+xmlChar *
+xmlCharStrndup(const char *cur, int len) {
+ int i;
+ xmlChar *ret;
+
+ if ((cur == NULL) || (len < 0)) return(NULL);
+ ret = (xmlChar *) xmlMallocAtomic((len + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlErrMemory(NULL, NULL);
+ return(NULL);
+ }
+ for (i = 0;i < len;i++) {
+ ret[i] = (xmlChar) cur[i];
+ if (ret[i] == 0) return(ret);
+ }
+ ret[len] = 0;
+ return(ret);
+}
+
+/**
+ * xmlCharStrdup:
+ * @cur: the input char *
+ *
+ * a strdup for char's to xmlChar's
+ *
+ * Returns a new xmlChar * or NULL
+ */
+
+xmlChar *
+xmlCharStrdup(const char *cur) {
+ const char *p = cur;
+
+ if (cur == NULL) return(NULL);
+ while (*p != '\0') p++; /* non input consuming */
+ return(xmlCharStrndup(cur, p - cur));
+}
+
+/**
+ * xmlStrcmp:
+ * @str1: the first xmlChar *
+ * @str2: the second xmlChar *
+ *
+ * a strcmp for xmlChar's
+ *
+ * Returns the integer result of the comparison
+ */
+
+int
+xmlStrcmp(const xmlChar *str1, const xmlChar *str2) {
+ register int tmp;
+
+ if (str1 == str2) return(0);
+ if (str1 == NULL) return(-1);
+ if (str2 == NULL) return(1);
+ do {
+ tmp = *str1++ - *str2;
+ if (tmp != 0) return(tmp);
+ } while (*str2++ != 0);
+ return 0;
+}
+
+/**
+ * xmlStrEqual:
+ * @str1: the first xmlChar *
+ * @str2: the second xmlChar *
+ *
+ * Check if both strings are equal of have same content.
+ * Should be a bit more readable and faster than xmlStrcmp()
+ *
+ * Returns 1 if they are equal, 0 if they are different
+ */
+
+int
+xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
+ if (str1 == str2) return(1);
+ if (str1 == NULL) return(0);
+ if (str2 == NULL) return(0);
+ do {
+ if (*str1++ != *str2) return(0);
+ } while (*str2++);
+ return(1);
+}
+
+/**
+ * xmlStrQEqual:
+ * @pref: the prefix of the QName
+ * @name: the localname of the QName
+ * @str: the second xmlChar *
+ *
+ * Check if a QName is Equal to a given string
+ *
+ * Returns 1 if they are equal, 0 if they are different
+ */
+
+int
+xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str) {
+ if (pref == NULL) return(xmlStrEqual(name, str));
+ if (name == NULL) return(0);
+ if (str == NULL) return(0);
+
+ do {
+ if (*pref++ != *str) return(0);
+ } while ((*str++) && (*pref));
+ if (*str++ != ':') return(0);
+ do {
+ if (*name++ != *str) return(0);
+ } while (*str++);
+ return(1);
+}
+
+/**
+ * xmlStrncmp:
+ * @str1: the first xmlChar *
+ * @str2: the second xmlChar *
+ * @len: the max comparison length
+ *
+ * a strncmp for xmlChar's
+ *
+ * Returns the integer result of the comparison
+ */
+
+int
+xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) {
+ register int tmp;
+
+ if (len <= 0) return(0);
+ if (str1 == str2) return(0);
+ if (str1 == NULL) return(-1);
+ if (str2 == NULL) return(1);
+#ifdef __GNUC__
+ tmp = strncmp((const char *)str1, (const char *)str2, len);
+ return tmp;
+#else
+ do {
+ tmp = *str1++ - *str2;
+ if (tmp != 0 || --len == 0) return(tmp);
+ } while (*str2++ != 0);
+ return 0;
+#endif
+}
+
+static const xmlChar casemap[256] = {
+ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
+ 0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+ 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
+ 0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+ 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
+ 0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+ 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
+ 0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+ 0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
+ 0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+ 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
+ 0x78,0x79,0x7A,0x7B,0x5C,0x5D,0x5E,0x5F,
+ 0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
+ 0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+ 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,
+ 0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+ 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+ 0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
+ 0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,
+ 0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
+ 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,
+ 0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
+ 0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,
+ 0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
+ 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,
+ 0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+ 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,
+ 0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
+ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,
+ 0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
+ 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
+ 0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
+};
+
+/**
+ * xmlStrcasecmp:
+ * @str1: the first xmlChar *
+ * @str2: the second xmlChar *
+ *
+ * a strcasecmp for xmlChar's
+ *
+ * Returns the integer result of the comparison
+ */
+
+int
+xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2) {
+ register int tmp;
+
+ if (str1 == str2) return(0);
+ if (str1 == NULL) return(-1);
+ if (str2 == NULL) return(1);
+ do {
+ tmp = casemap[*str1++] - casemap[*str2];
+ if (tmp != 0) return(tmp);
+ } while (*str2++ != 0);
+ return 0;
+}
+
+/**
+ * xmlStrncasecmp:
+ * @str1: the first xmlChar *
+ * @str2: the second xmlChar *
+ * @len: the max comparison length
+ *
+ * a strncasecmp for xmlChar's
+ *
+ * Returns the integer result of the comparison
+ */
+
+int
+xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len) {
+ register int tmp;
+
+ if (len <= 0) return(0);
+ if (str1 == str2) return(0);
+ if (str1 == NULL) return(-1);
+ if (str2 == NULL) return(1);
+ do {
+ tmp = casemap[*str1++] - casemap[*str2];
+ if (tmp != 0 || --len == 0) return(tmp);
+ } while (*str2++ != 0);
+ return 0;
+}
+
+/**
+ * xmlStrchr:
+ * @str: the xmlChar * array
+ * @val: the xmlChar to search
+ *
+ * a strchr for xmlChar's
+ *
+ * Returns the xmlChar * for the first occurrence or NULL.
+ */
+
+const xmlChar *
+xmlStrchr(const xmlChar *str, xmlChar val) {
+ if (str == NULL) return(NULL);
+ while (*str != 0) { /* non input consuming */
+ if (*str == val) return((xmlChar *) str);
+ str++;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlStrstr:
+ * @str: the xmlChar * array (haystack)
+ * @val: the xmlChar to search (needle)
+ *
+ * a strstr for xmlChar's
+ *
+ * Returns the xmlChar * for the first occurrence or NULL.
+ */
+
+const xmlChar *
+xmlStrstr(const xmlChar *str, const xmlChar *val) {
+ int n;
+
+ if (str == NULL) return(NULL);
+ if (val == NULL) return(NULL);
+ n = xmlStrlen(val);
+
+ if (n == 0) return(str);
+ while (*str != 0) { /* non input consuming */
+ if (*str == *val) {
+ if (!xmlStrncmp(str, val, n)) return((const xmlChar *) str);
+ }
+ str++;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlStrcasestr:
+ * @str: the xmlChar * array (haystack)
+ * @val: the xmlChar to search (needle)
+ *
+ * a case-ignoring strstr for xmlChar's
+ *
+ * Returns the xmlChar * for the first occurrence or NULL.
+ */
+
+const xmlChar *
+xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
+ int n;
+
+ if (str == NULL) return(NULL);
+ if (val == NULL) return(NULL);
+ n = xmlStrlen(val);
+
+ if (n == 0) return(str);
+ while (*str != 0) { /* non input consuming */
+ if (casemap[*str] == casemap[*val])
+ if (!xmlStrncasecmp(str, val, n)) return(str);
+ str++;
+ }
+ return(NULL);
+}
+
+/**
+ * xmlStrsub:
+ * @str: the xmlChar * array (haystack)
+ * @start: the index of the first char (zero based)
+ * @len: the length of the substring
+ *
+ * Extract a substring of a given string
+ *
+ * Returns the xmlChar * for the first occurrence or NULL.
+ */
+
+xmlChar *
+xmlStrsub(const xmlChar *str, int start, int len) {
+ int i;
+
+ if (str == NULL) return(NULL);
+ if (start < 0) return(NULL);
+ if (len < 0) return(NULL);
+
+ for (i = 0;i < start;i++) {
+ if (*str == 0) return(NULL);
+ str++;
+ }
+ if (*str == 0) return(NULL);
+ return(xmlStrndup(str, len));
+}
+
+/**
+ * xmlStrlen:
+ * @str: the xmlChar * array
+ *
+ * length of a xmlChar's string
+ *
+ * Returns the number of xmlChar contained in the ARRAY.
+ */
+
+int
+xmlStrlen(const xmlChar *str) {
+ int len = 0;
+
+ if (str == NULL) return(0);
+ while (*str != 0) { /* non input consuming */
+ str++;
+ len++;
+ }
+ return(len);
+}
+
+/**
+ * xmlStrncat:
+ * @cur: the original xmlChar * array
+ * @add: the xmlChar * array added
+ * @len: the length of @add
+ *
+ * a strncat for array of xmlChar's, it will extend @cur with the len
+ * first bytes of @add. Note that if @len < 0 then this is an API error
+ * and NULL will be returned.
+ *
+ * Returns a new xmlChar *, the original @cur is reallocated if needed
+ * and should not be freed
+ */
+
+xmlChar *
+xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
+ int size;
+ xmlChar *ret;
+
+ if ((add == NULL) || (len == 0))
+ return(cur);
+ if (len < 0)
+ return(NULL);
+ if (cur == NULL)
+ return(xmlStrndup(add, len));
+
+ size = xmlStrlen(cur);
+ ret = (xmlChar *) xmlRealloc(cur, (size + len + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlErrMemory(NULL, NULL);
+ return(cur);
+ }
+ memcpy(&ret[size], add, len * sizeof(xmlChar));
+ ret[size + len] = 0;
+ return(ret);
+}
+
+/**
+ * xmlStrncatNew:
+ * @str1: first xmlChar string
+ * @str2: second xmlChar string
+ * @len: the len of @str2 or < 0
+ *
+ * same as xmlStrncat, but creates a new string. The original
+ * two strings are not freed. If @len is < 0 then the length
+ * will be calculated automatically.
+ *
+ * Returns a new xmlChar * or NULL
+ */
+xmlChar *
+xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
+ int size;
+ xmlChar *ret;
+
+ if (len < 0)
+ len = xmlStrlen(str2);
+ if ((str2 == NULL) || (len == 0))
+ return(xmlStrdup(str1));
+ if (str1 == NULL)
+ return(xmlStrndup(str2, len));
+
+ size = xmlStrlen(str1);
+ ret = (xmlChar *) xmlMalloc((size + len + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlErrMemory(NULL, NULL);
+ return(xmlStrndup(str1, size));
+ }
+ memcpy(ret, str1, size * sizeof(xmlChar));
+ memcpy(&ret[size], str2, len * sizeof(xmlChar));
+ ret[size + len] = 0;
+ return(ret);
+}
+
+/**
+ * xmlStrcat:
+ * @cur: the original xmlChar * array
+ * @add: the xmlChar * array added
+ *
+ * a strcat for array of xmlChar's. Since they are supposed to be
+ * encoded in UTF-8 or an encoding with 8bit based chars, we assume
+ * a termination mark of '0'.
+ *
+ * Returns a new xmlChar * containing the concatenated string.
+ */
+xmlChar *
+xmlStrcat(xmlChar *cur, const xmlChar *add) {
+ const xmlChar *p = add;
+
+ if (add == NULL) return(cur);
+ if (cur == NULL)
+ return(xmlStrdup(add));
+
+ while (*p != 0) p++; /* non input consuming */
+ return(xmlStrncat(cur, add, p - add));
+}
+
+/**
+ * xmlStrPrintf:
+ * @buf: the result buffer.
+ * @len: the result buffer length.
+ * @msg: the message with printf formatting.
+ * @...: extra parameters for the message.
+ *
+ * Formats @msg and places result into @buf.
+ *
+ * Returns the number of characters written to @buf or -1 if an error occurs.
+ */
+int XMLCDECL
+xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
+ va_list args;
+ int ret;
+
+ if((buf == NULL) || (msg == NULL)) {
+ return(-1);
+ }
+
+ va_start(args, msg);
+ ret = vsnprintf((char *) buf, len, (const char *) msg, args);
+ va_end(args);
+ buf[len - 1] = 0; /* be safe ! */
+
+ return(ret);
+}
+
+/**
+ * xmlStrVPrintf:
+ * @buf: the result buffer.
+ * @len: the result buffer length.
+ * @msg: the message with printf formatting.
+ * @ap: extra parameters for the message.
+ *
+ * Formats @msg and places result into @buf.
+ *
+ * Returns the number of characters written to @buf or -1 if an error occurs.
+ */
+int
+xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) {
+ int ret;
+
+ if((buf == NULL) || (msg == NULL)) {
+ return(-1);
+ }
+
+ ret = vsnprintf((char *) buf, len, (const char *) msg, ap);
+ buf[len - 1] = 0; /* be safe ! */
+
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Generic UTF8 handling routines *
+ * *
+ * From rfc2044: encoding of the Unicode values on UTF-8: *
+ * *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary) *
+ * 0000 0000-0000 007F 0xxxxxxx *
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx *
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx *
+ * *
+ * I hope we won't use values > 0xFFFF anytime soon ! *
+ * *
+ ************************************************************************/
+
+
+/**
+ * xmlUTF8Size:
+ * @utf: pointer to the UTF8 character
+ *
+ * calculates the internal size of a UTF8 character
+ *
+ * returns the numbers of bytes in the character, -1 on format error
+ */
+int
+xmlUTF8Size(const xmlChar *utf) {
+ xmlChar mask;
+ int len;
+
+ if (utf == NULL)
+ return -1;
+ if (*utf < 0x80)
+ return 1;
+ /* check valid UTF8 character */
+ if (!(*utf & 0x40))
+ return -1;
+ /* determine number of bytes in char */
+ len = 2;
+ for (mask=0x20; mask != 0; mask>>=1) {
+ if (!(*utf & mask))
+ return len;
+ len++;
+ }
+ return -1;
+}
+
+/**
+ * xmlUTF8Charcmp:
+ * @utf1: pointer to first UTF8 char
+ * @utf2: pointer to second UTF8 char
+ *
+ * compares the two UCS4 values
+ *
+ * returns result of the compare as with xmlStrncmp
+ */
+int
+xmlUTF8Charcmp(const xmlChar *utf1, const xmlChar *utf2) {
+
+ if (utf1 == NULL ) {
+ if (utf2 == NULL)
+ return 0;
+ return -1;
+ }
+ return xmlStrncmp(utf1, utf2, xmlUTF8Size(utf1));
+}
+
+/**
+ * xmlUTF8Strlen:
+ * @utf: a sequence of UTF-8 encoded bytes
+ *
+ * compute the length of an UTF8 string, it doesn't do a full UTF8
+ * checking of the content of the string.
+ *
+ * Returns the number of characters in the string or -1 in case of error
+ */
+int
+xmlUTF8Strlen(const xmlChar *utf) {
+ int ret = 0;
+
+ if (utf == NULL)
+ return(-1);
+
+ while (*utf != 0) {
+ if (utf[0] & 0x80) {
+ if ((utf[1] & 0xc0) != 0x80)
+ return(-1);
+ if ((utf[0] & 0xe0) == 0xe0) {
+ if ((utf[2] & 0xc0) != 0x80)
+ return(-1);
+ if ((utf[0] & 0xf0) == 0xf0) {
+ if ((utf[0] & 0xf8) != 0xf0 || (utf[3] & 0xc0) != 0x80)
+ return(-1);
+ utf += 4;
+ } else {
+ utf += 3;
+ }
+ } else {
+ utf += 2;
+ }
+ } else {
+ utf++;
+ }
+ ret++;
+ }
+ return(ret);
+}
+
+/**
+ * xmlGetUTF8Char:
+ * @utf: a sequence of UTF-8 encoded bytes
+ * @len: a pointer to the minimum number of bytes present in
+ * the sequence. This is used to assure the next character
+ * is completely contained within the sequence.
+ *
+ * Read the first UTF8 character from @utf
+ *
+ * Returns the char value or -1 in case of error, and sets *len to
+ * the actual number of bytes consumed (0 in case of error)
+ */
+int
+xmlGetUTF8Char(const unsigned char *utf, int *len) {
+ unsigned int c;
+
+ if (utf == NULL)
+ goto error;
+ if (len == NULL)
+ goto error;
+ if (*len < 1)
+ goto error;
+
+ c = utf[0];
+ if (c & 0x80) {
+ if (*len < 2)
+ goto error;
+ if ((utf[1] & 0xc0) != 0x80)
+ goto error;
+ if ((c & 0xe0) == 0xe0) {
+ if (*len < 3)
+ goto error;
+ if ((utf[2] & 0xc0) != 0x80)
+ goto error;
+ if ((c & 0xf0) == 0xf0) {
+ if (*len < 4)
+ goto error;
+ if ((c & 0xf8) != 0xf0 || (utf[3] & 0xc0) != 0x80)
+ goto error;
+ *len = 4;
+ /* 4-byte code */
+ c = (utf[0] & 0x7) << 18;
+ c |= (utf[1] & 0x3f) << 12;
+ c |= (utf[2] & 0x3f) << 6;
+ c |= utf[3] & 0x3f;
+ } else {
+ /* 3-byte code */
+ *len = 3;
+ c = (utf[0] & 0xf) << 12;
+ c |= (utf[1] & 0x3f) << 6;
+ c |= utf[2] & 0x3f;
+ }
+ } else {
+ /* 2-byte code */
+ *len = 2;
+ c = (utf[0] & 0x1f) << 6;
+ c |= utf[1] & 0x3f;
+ }
+ } else {
+ /* 1-byte code */
+ *len = 1;
+ }
+ return(c);
+
+error:
+ if (len != NULL)
+ *len = 0;
+ return(-1);
+}
+
+/**
+ * xmlCheckUTF8:
+ * @utf: Pointer to putative UTF-8 encoded string.
+ *
+ * Checks @utf for being valid UTF-8. @utf is assumed to be
+ * null-terminated. This function is not super-strict, as it will
+ * allow longer UTF-8 sequences than necessary. Note that Java is
+ * capable of producing these sequences if provoked. Also note, this
+ * routine checks for the 4-byte maximum size, but does not check for
+ * 0x10ffff maximum value.
+ *
+ * Return value: true if @utf is valid.
+ **/
+int
+xmlCheckUTF8(const unsigned char *utf)
+{
+ int ix;
+ unsigned char c;
+
+ if (utf == NULL)
+ return(0);
+ /*
+ * utf is a string of 1, 2, 3 or 4 bytes. The valid strings
+ * are as follows (in "bit format"):
+ * 0xxxxxxx valid 1-byte
+ * 110xxxxx 10xxxxxx valid 2-byte
+ * 1110xxxx 10xxxxxx 10xxxxxx valid 3-byte
+ * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx valid 4-byte
+ */
+ for (ix = 0; (c = utf[ix]);) { /* string is 0-terminated */
+ if ((c & 0x80) == 0x00) { /* 1-byte code, starts with 10 */
+ ix++;
+ } else if ((c & 0xe0) == 0xc0) {/* 2-byte code, starts with 110 */
+ if ((utf[ix+1] & 0xc0 ) != 0x80)
+ return 0;
+ ix += 2;
+ } else if ((c & 0xf0) == 0xe0) {/* 3-byte code, starts with 1110 */
+ if (((utf[ix+1] & 0xc0) != 0x80) ||
+ ((utf[ix+2] & 0xc0) != 0x80))
+ return 0;
+ ix += 3;
+ } else if ((c & 0xf8) == 0xf0) {/* 4-byte code, starts with 11110 */
+ if (((utf[ix+1] & 0xc0) != 0x80) ||
+ ((utf[ix+2] & 0xc0) != 0x80) ||
+ ((utf[ix+3] & 0xc0) != 0x80))
+ return 0;
+ ix += 4;
+ } else /* unknown encoding */
+ return 0;
+ }
+ return(1);
+}
+
+/**
+ * xmlUTF8Strsize:
+ * @utf: a sequence of UTF-8 encoded bytes
+ * @len: the number of characters in the array
+ *
+ * storage size of an UTF8 string
+ * the behaviour is not garanteed if the input string is not UTF-8
+ *
+ * Returns the storage size of
+ * the first 'len' characters of ARRAY
+ */
+
+int
+xmlUTF8Strsize(const xmlChar *utf, int len) {
+ const xmlChar *ptr=utf;
+ xmlChar ch;
+
+ if (utf == NULL)
+ return(0);
+
+ if (len <= 0)
+ return(0);
+
+ while ( len-- > 0) {
+ if ( !*ptr )
+ break;
+ if ( (ch = *ptr++) & 0x80)
+ while ((ch<<=1) & 0x80 ) {
+ ptr++;
+ if (*ptr == 0) break;
+ }
+ }
+ return (ptr - utf);
+}
+
+
+/**
+ * xmlUTF8Strndup:
+ * @utf: the input UTF8 *
+ * @len: the len of @utf (in chars)
+ *
+ * a strndup for array of UTF8's
+ *
+ * Returns a new UTF8 * or NULL
+ */
+xmlChar *
+xmlUTF8Strndup(const xmlChar *utf, int len) {
+ xmlChar *ret;
+ int i;
+
+ if ((utf == NULL) || (len < 0)) return(NULL);
+ i = xmlUTF8Strsize(utf, len);
+ ret = (xmlChar *) xmlMallocAtomic((i + 1) * sizeof(xmlChar));
+ if (ret == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "malloc of %ld byte failed\n",
+ (len + 1) * (long)sizeof(xmlChar));
+ return(NULL);
+ }
+ memcpy(ret, utf, i * sizeof(xmlChar));
+ ret[i] = 0;
+ return(ret);
+}
+
+/**
+ * xmlUTF8Strpos:
+ * @utf: the input UTF8 *
+ * @pos: the position of the desired UTF8 char (in chars)
+ *
+ * a function to provide the equivalent of fetching a
+ * character from a string array
+ *
+ * Returns a pointer to the UTF8 character or NULL
+ */
+const xmlChar *
+xmlUTF8Strpos(const xmlChar *utf, int pos) {
+ xmlChar ch;
+
+ if (utf == NULL) return(NULL);
+ if (pos < 0)
+ return(NULL);
+ while (pos--) {
+ if ((ch=*utf++) == 0) return(NULL);
+ if ( ch & 0x80 ) {
+ /* if not simple ascii, verify proper format */
+ if ( (ch & 0xc0) != 0xc0 )
+ return(NULL);
+ /* then skip over remaining bytes for this char */
+ while ( (ch <<= 1) & 0x80 )
+ if ( (*utf++ & 0xc0) != 0x80 )
+ return(NULL);
+ }
+ }
+ return((xmlChar *)utf);
+}
+
+/**
+ * xmlUTF8Strloc:
+ * @utf: the input UTF8 *
+ * @utfchar: the UTF8 character to be found
+ *
+ * a function to provide the relative location of a UTF8 char
+ *
+ * Returns the relative character position of the desired char
+ * or -1 if not found
+ */
+int
+xmlUTF8Strloc(const xmlChar *utf, const xmlChar *utfchar) {
+ int i, size;
+ xmlChar ch;
+
+ if (utf==NULL || utfchar==NULL) return -1;
+ size = xmlUTF8Strsize(utfchar, 1);
+ for(i=0; (ch=*utf) != 0; i++) {
+ if (xmlStrncmp(utf, utfchar, size)==0)
+ return(i);
+ utf++;
+ if ( ch & 0x80 ) {
+ /* if not simple ascii, verify proper format */
+ if ( (ch & 0xc0) != 0xc0 )
+ return(-1);
+ /* then skip over remaining bytes for this char */
+ while ( (ch <<= 1) & 0x80 )
+ if ( (*utf++ & 0xc0) != 0x80 )
+ return(-1);
+ }
+ }
+
+ return(-1);
+}
+/**
+ * xmlUTF8Strsub:
+ * @utf: a sequence of UTF-8 encoded bytes
+ * @start: relative pos of first char
+ * @len: total number to copy
+ *
+ * Create a substring from a given UTF-8 string
+ * Note: positions are given in units of UTF-8 chars
+ *
+ * Returns a pointer to a newly created string
+ * or NULL if any problem
+ */
+
+xmlChar *
+xmlUTF8Strsub(const xmlChar *utf, int start, int len) {
+ int i;
+ xmlChar ch;
+
+ if (utf == NULL) return(NULL);
+ if (start < 0) return(NULL);
+ if (len < 0) return(NULL);
+
+ /*
+ * Skip over any leading chars
+ */
+ for (i = 0;i < start;i++) {
+ if ((ch=*utf++) == 0) return(NULL);
+ if ( ch & 0x80 ) {
+ /* if not simple ascii, verify proper format */
+ if ( (ch & 0xc0) != 0xc0 )
+ return(NULL);
+ /* then skip over remaining bytes for this char */
+ while ( (ch <<= 1) & 0x80 )
+ if ( (*utf++ & 0xc0) != 0x80 )
+ return(NULL);
+ }
+ }
+
+ return(xmlUTF8Strndup(utf, len));
+}
+
+#define bottom_xmlstring
+#include "elfgcchack.h"
diff --git a/xmlunicode.c b/xmlunicode.c
new file mode 100644
index 0000000..ce6e9a4
--- /dev/null
+++ b/xmlunicode.c
@@ -0,0 +1,3179 @@
+/*
+ * xmlunicode.c: this module implements the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: Mon Mar 27 11:09:52 2006
+ * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
+ * Daniel Veillard <veillard@redhat.com>
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#include <string.h>
+#include <libxml/xmlversion.h>
+#include <libxml/xmlunicode.h>
+#include <libxml/chvalid.h>
+
+typedef int (xmlIntFunc)(int); /* just to keep one's mind untwisted */
+
+typedef struct {
+ const char *rangename;
+ xmlIntFunc *func;
+} xmlUnicodeRange;
+
+typedef struct {
+ xmlUnicodeRange *table;
+ int numentries;
+} xmlUnicodeNameTable;
+
+
+static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname);
+
+static xmlUnicodeRange xmlUnicodeBlocks[] = {
+ {"AegeanNumbers", xmlUCSIsAegeanNumbers},
+ {"AlphabeticPresentationForms", xmlUCSIsAlphabeticPresentationForms},
+ {"Arabic", xmlUCSIsArabic},
+ {"ArabicPresentationForms-A", xmlUCSIsArabicPresentationFormsA},
+ {"ArabicPresentationForms-B", xmlUCSIsArabicPresentationFormsB},
+ {"Armenian", xmlUCSIsArmenian},
+ {"Arrows", xmlUCSIsArrows},
+ {"BasicLatin", xmlUCSIsBasicLatin},
+ {"Bengali", xmlUCSIsBengali},
+ {"BlockElements", xmlUCSIsBlockElements},
+ {"Bopomofo", xmlUCSIsBopomofo},
+ {"BopomofoExtended", xmlUCSIsBopomofoExtended},
+ {"BoxDrawing", xmlUCSIsBoxDrawing},
+ {"BraillePatterns", xmlUCSIsBraillePatterns},
+ {"Buhid", xmlUCSIsBuhid},
+ {"ByzantineMusicalSymbols", xmlUCSIsByzantineMusicalSymbols},
+ {"CJKCompatibility", xmlUCSIsCJKCompatibility},
+ {"CJKCompatibilityForms", xmlUCSIsCJKCompatibilityForms},
+ {"CJKCompatibilityIdeographs", xmlUCSIsCJKCompatibilityIdeographs},
+ {"CJKCompatibilityIdeographsSupplement", xmlUCSIsCJKCompatibilityIdeographsSupplement},
+ {"CJKRadicalsSupplement", xmlUCSIsCJKRadicalsSupplement},
+ {"CJKSymbolsandPunctuation", xmlUCSIsCJKSymbolsandPunctuation},
+ {"CJKUnifiedIdeographs", xmlUCSIsCJKUnifiedIdeographs},
+ {"CJKUnifiedIdeographsExtensionA", xmlUCSIsCJKUnifiedIdeographsExtensionA},
+ {"CJKUnifiedIdeographsExtensionB", xmlUCSIsCJKUnifiedIdeographsExtensionB},
+ {"Cherokee", xmlUCSIsCherokee},
+ {"CombiningDiacriticalMarks", xmlUCSIsCombiningDiacriticalMarks},
+ {"CombiningDiacriticalMarksforSymbols", xmlUCSIsCombiningDiacriticalMarksforSymbols},
+ {"CombiningHalfMarks", xmlUCSIsCombiningHalfMarks},
+ {"CombiningMarksforSymbols", xmlUCSIsCombiningMarksforSymbols},
+ {"ControlPictures", xmlUCSIsControlPictures},
+ {"CurrencySymbols", xmlUCSIsCurrencySymbols},
+ {"CypriotSyllabary", xmlUCSIsCypriotSyllabary},
+ {"Cyrillic", xmlUCSIsCyrillic},
+ {"CyrillicSupplement", xmlUCSIsCyrillicSupplement},
+ {"Deseret", xmlUCSIsDeseret},
+ {"Devanagari", xmlUCSIsDevanagari},
+ {"Dingbats", xmlUCSIsDingbats},
+ {"EnclosedAlphanumerics", xmlUCSIsEnclosedAlphanumerics},
+ {"EnclosedCJKLettersandMonths", xmlUCSIsEnclosedCJKLettersandMonths},
+ {"Ethiopic", xmlUCSIsEthiopic},
+ {"GeneralPunctuation", xmlUCSIsGeneralPunctuation},
+ {"GeometricShapes", xmlUCSIsGeometricShapes},
+ {"Georgian", xmlUCSIsGeorgian},
+ {"Gothic", xmlUCSIsGothic},
+ {"Greek", xmlUCSIsGreek},
+ {"GreekExtended", xmlUCSIsGreekExtended},
+ {"GreekandCoptic", xmlUCSIsGreekandCoptic},
+ {"Gujarati", xmlUCSIsGujarati},
+ {"Gurmukhi", xmlUCSIsGurmukhi},
+ {"HalfwidthandFullwidthForms", xmlUCSIsHalfwidthandFullwidthForms},
+ {"HangulCompatibilityJamo", xmlUCSIsHangulCompatibilityJamo},
+ {"HangulJamo", xmlUCSIsHangulJamo},
+ {"HangulSyllables", xmlUCSIsHangulSyllables},
+ {"Hanunoo", xmlUCSIsHanunoo},
+ {"Hebrew", xmlUCSIsHebrew},
+ {"HighPrivateUseSurrogates", xmlUCSIsHighPrivateUseSurrogates},
+ {"HighSurrogates", xmlUCSIsHighSurrogates},
+ {"Hiragana", xmlUCSIsHiragana},
+ {"IPAExtensions", xmlUCSIsIPAExtensions},
+ {"IdeographicDescriptionCharacters", xmlUCSIsIdeographicDescriptionCharacters},
+ {"Kanbun", xmlUCSIsKanbun},
+ {"KangxiRadicals", xmlUCSIsKangxiRadicals},
+ {"Kannada", xmlUCSIsKannada},
+ {"Katakana", xmlUCSIsKatakana},
+ {"KatakanaPhoneticExtensions", xmlUCSIsKatakanaPhoneticExtensions},
+ {"Khmer", xmlUCSIsKhmer},
+ {"KhmerSymbols", xmlUCSIsKhmerSymbols},
+ {"Lao", xmlUCSIsLao},
+ {"Latin-1Supplement", xmlUCSIsLatin1Supplement},
+ {"LatinExtended-A", xmlUCSIsLatinExtendedA},
+ {"LatinExtended-B", xmlUCSIsLatinExtendedB},
+ {"LatinExtendedAdditional", xmlUCSIsLatinExtendedAdditional},
+ {"LetterlikeSymbols", xmlUCSIsLetterlikeSymbols},
+ {"Limbu", xmlUCSIsLimbu},
+ {"LinearBIdeograms", xmlUCSIsLinearBIdeograms},
+ {"LinearBSyllabary", xmlUCSIsLinearBSyllabary},
+ {"LowSurrogates", xmlUCSIsLowSurrogates},
+ {"Malayalam", xmlUCSIsMalayalam},
+ {"MathematicalAlphanumericSymbols", xmlUCSIsMathematicalAlphanumericSymbols},
+ {"MathematicalOperators", xmlUCSIsMathematicalOperators},
+ {"MiscellaneousMathematicalSymbols-A", xmlUCSIsMiscellaneousMathematicalSymbolsA},
+ {"MiscellaneousMathematicalSymbols-B", xmlUCSIsMiscellaneousMathematicalSymbolsB},
+ {"MiscellaneousSymbols", xmlUCSIsMiscellaneousSymbols},
+ {"MiscellaneousSymbolsandArrows", xmlUCSIsMiscellaneousSymbolsandArrows},
+ {"MiscellaneousTechnical", xmlUCSIsMiscellaneousTechnical},
+ {"Mongolian", xmlUCSIsMongolian},
+ {"MusicalSymbols", xmlUCSIsMusicalSymbols},
+ {"Myanmar", xmlUCSIsMyanmar},
+ {"NumberForms", xmlUCSIsNumberForms},
+ {"Ogham", xmlUCSIsOgham},
+ {"OldItalic", xmlUCSIsOldItalic},
+ {"OpticalCharacterRecognition", xmlUCSIsOpticalCharacterRecognition},
+ {"Oriya", xmlUCSIsOriya},
+ {"Osmanya", xmlUCSIsOsmanya},
+ {"PhoneticExtensions", xmlUCSIsPhoneticExtensions},
+ {"PrivateUse", xmlUCSIsPrivateUse},
+ {"PrivateUseArea", xmlUCSIsPrivateUseArea},
+ {"Runic", xmlUCSIsRunic},
+ {"Shavian", xmlUCSIsShavian},
+ {"Sinhala", xmlUCSIsSinhala},
+ {"SmallFormVariants", xmlUCSIsSmallFormVariants},
+ {"SpacingModifierLetters", xmlUCSIsSpacingModifierLetters},
+ {"Specials", xmlUCSIsSpecials},
+ {"SuperscriptsandSubscripts", xmlUCSIsSuperscriptsandSubscripts},
+ {"SupplementalArrows-A", xmlUCSIsSupplementalArrowsA},
+ {"SupplementalArrows-B", xmlUCSIsSupplementalArrowsB},
+ {"SupplementalMathematicalOperators", xmlUCSIsSupplementalMathematicalOperators},
+ {"SupplementaryPrivateUseArea-A", xmlUCSIsSupplementaryPrivateUseAreaA},
+ {"SupplementaryPrivateUseArea-B", xmlUCSIsSupplementaryPrivateUseAreaB},
+ {"Syriac", xmlUCSIsSyriac},
+ {"Tagalog", xmlUCSIsTagalog},
+ {"Tagbanwa", xmlUCSIsTagbanwa},
+ {"Tags", xmlUCSIsTags},
+ {"TaiLe", xmlUCSIsTaiLe},
+ {"TaiXuanJingSymbols", xmlUCSIsTaiXuanJingSymbols},
+ {"Tamil", xmlUCSIsTamil},
+ {"Telugu", xmlUCSIsTelugu},
+ {"Thaana", xmlUCSIsThaana},
+ {"Thai", xmlUCSIsThai},
+ {"Tibetan", xmlUCSIsTibetan},
+ {"Ugaritic", xmlUCSIsUgaritic},
+ {"UnifiedCanadianAboriginalSyllabics", xmlUCSIsUnifiedCanadianAboriginalSyllabics},
+ {"VariationSelectors", xmlUCSIsVariationSelectors},
+ {"VariationSelectorsSupplement", xmlUCSIsVariationSelectorsSupplement},
+ {"YiRadicals", xmlUCSIsYiRadicals},
+ {"YiSyllables", xmlUCSIsYiSyllables},
+ {"YijingHexagramSymbols", xmlUCSIsYijingHexagramSymbols}};
+
+static xmlUnicodeRange xmlUnicodeCats[] = {
+ {"C", xmlUCSIsCatC},
+ {"Cc", xmlUCSIsCatCc},
+ {"Cf", xmlUCSIsCatCf},
+ {"Co", xmlUCSIsCatCo},
+ {"Cs", xmlUCSIsCatCs},
+ {"L", xmlUCSIsCatL},
+ {"Ll", xmlUCSIsCatLl},
+ {"Lm", xmlUCSIsCatLm},
+ {"Lo", xmlUCSIsCatLo},
+ {"Lt", xmlUCSIsCatLt},
+ {"Lu", xmlUCSIsCatLu},
+ {"M", xmlUCSIsCatM},
+ {"Mc", xmlUCSIsCatMc},
+ {"Me", xmlUCSIsCatMe},
+ {"Mn", xmlUCSIsCatMn},
+ {"N", xmlUCSIsCatN},
+ {"Nd", xmlUCSIsCatNd},
+ {"Nl", xmlUCSIsCatNl},
+ {"No", xmlUCSIsCatNo},
+ {"P", xmlUCSIsCatP},
+ {"Pc", xmlUCSIsCatPc},
+ {"Pd", xmlUCSIsCatPd},
+ {"Pe", xmlUCSIsCatPe},
+ {"Pf", xmlUCSIsCatPf},
+ {"Pi", xmlUCSIsCatPi},
+ {"Po", xmlUCSIsCatPo},
+ {"Ps", xmlUCSIsCatPs},
+ {"S", xmlUCSIsCatS},
+ {"Sc", xmlUCSIsCatSc},
+ {"Sk", xmlUCSIsCatSk},
+ {"Sm", xmlUCSIsCatSm},
+ {"So", xmlUCSIsCatSo},
+ {"Z", xmlUCSIsCatZ},
+ {"Zl", xmlUCSIsCatZl},
+ {"Zp", xmlUCSIsCatZp},
+ {"Zs", xmlUCSIsCatZs}};
+
+static const xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f},
+ {0xad, 0xad}, {0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f},
+ {0x17b4, 0x17b5}, {0x200b, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063},
+ {0x206a, 0x206f}, {0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00},
+ {0xdfff, 0xe000}, {0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
+static const xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
+ {0xe0020, 0xe007f}, {0xf0000, 0xf0000}, {0xffffd, 0xffffd},
+ {0x100000, 0x100000}, {0x10fffd, 0x10fffd} };
+static xmlChRangeGroup xmlCG = {18,7,xmlCS,xmlCL};
+
+static const xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
+ {0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200b, 0x200f},
+ {0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f}, {0xfeff, 0xfeff},
+ {0xfff9, 0xfffb} };
+static const xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
+ {0xe0020, 0xe007f} };
+static xmlChRangeGroup xmlCfG = {11,3,xmlCfS,xmlCfL};
+
+static const xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a},
+ {0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6},
+ {0xf8, 0x236}, {0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4},
+ {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a},
+ {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5},
+ {0x3f7, 0x3fb}, {0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5},
+ {0x4f8, 0x4f9}, {0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559},
+ {0x561, 0x587}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
+ {0x640, 0x64a}, {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5},
+ {0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff},
+ {0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5},
+ {0x7b1, 0x7b1}, {0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950},
+ {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
+ {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd},
+ {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
+ {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
+ {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
+ {0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
+ {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
+ {0xad0, 0xad0}, {0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
+ {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39},
+ {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71},
+ {0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95},
+ {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4},
+ {0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c},
+ {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39},
+ {0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8},
+ {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde},
+ {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
+ {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1},
+ {0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30},
+ {0xe32, 0xe33}, {0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84},
+ {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
+ {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
+ {0xeaa, 0xeab}, {0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd},
+ {0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00},
+ {0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021},
+ {0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5},
+ {0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
+ {0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
+ {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
+ {0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
+ {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
+ {0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
+ {0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
+ {0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
+ {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
+ {0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
+ {0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877},
+ {0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
+ {0x1d00, 0x1d6b}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15},
+ {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
+ {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d},
+ {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4},
+ {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
+ {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f},
+ {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115},
+ {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128},
+ {0x212a, 0x212d}, {0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f},
+ {0x2145, 0x2149}, {0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c},
+ {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff},
+ {0x3105, 0x312c}, {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff},
+ {0x3400, 0x3400}, {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5},
+ {0xa000, 0xa48c}, {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d},
+ {0xfa30, 0xfa6a}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d},
+ {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e},
+ {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d},
+ {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74},
+ {0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe},
+ {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
+static const xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
+ {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
+ {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
+ {0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10400, 0x1049d},
+ {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080a, 0x10835},
+ {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x1083f},
+ {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d49e, 0x1d49f},
+ {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, {0x1d4a9, 0x1d4ac},
+ {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
+ {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
+ {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
+ {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550},
+ {0x1d552, 0x1d6a3}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da},
+ {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734},
+ {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788},
+ {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9},
+ {0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
+static xmlChRangeGroup xmlLG = {279,50,xmlLS,xmlLL};
+
+static const xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa},
+ {0xb5, 0xb5}, {0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
+ {0x103, 0x103}, {0x105, 0x105}, {0x107, 0x107}, {0x109, 0x109},
+ {0x10b, 0x10b}, {0x10d, 0x10d}, {0x10f, 0x10f}, {0x111, 0x111},
+ {0x113, 0x113}, {0x115, 0x115}, {0x117, 0x117}, {0x119, 0x119},
+ {0x11b, 0x11b}, {0x11d, 0x11d}, {0x11f, 0x11f}, {0x121, 0x121},
+ {0x123, 0x123}, {0x125, 0x125}, {0x127, 0x127}, {0x129, 0x129},
+ {0x12b, 0x12b}, {0x12d, 0x12d}, {0x12f, 0x12f}, {0x131, 0x131},
+ {0x133, 0x133}, {0x135, 0x135}, {0x137, 0x138}, {0x13a, 0x13a},
+ {0x13c, 0x13c}, {0x13e, 0x13e}, {0x140, 0x140}, {0x142, 0x142},
+ {0x144, 0x144}, {0x146, 0x146}, {0x148, 0x149}, {0x14b, 0x14b},
+ {0x14d, 0x14d}, {0x14f, 0x14f}, {0x151, 0x151}, {0x153, 0x153},
+ {0x155, 0x155}, {0x157, 0x157}, {0x159, 0x159}, {0x15b, 0x15b},
+ {0x15d, 0x15d}, {0x15f, 0x15f}, {0x161, 0x161}, {0x163, 0x163},
+ {0x165, 0x165}, {0x167, 0x167}, {0x169, 0x169}, {0x16b, 0x16b},
+ {0x16d, 0x16d}, {0x16f, 0x16f}, {0x171, 0x171}, {0x173, 0x173},
+ {0x175, 0x175}, {0x177, 0x177}, {0x17a, 0x17a}, {0x17c, 0x17c},
+ {0x17e, 0x180}, {0x183, 0x183}, {0x185, 0x185}, {0x188, 0x188},
+ {0x18c, 0x18d}, {0x192, 0x192}, {0x195, 0x195}, {0x199, 0x19b},
+ {0x19e, 0x19e}, {0x1a1, 0x1a1}, {0x1a3, 0x1a3}, {0x1a5, 0x1a5},
+ {0x1a8, 0x1a8}, {0x1aa, 0x1ab}, {0x1ad, 0x1ad}, {0x1b0, 0x1b0},
+ {0x1b4, 0x1b4}, {0x1b6, 0x1b6}, {0x1b9, 0x1ba}, {0x1bd, 0x1bf},
+ {0x1c6, 0x1c6}, {0x1c9, 0x1c9}, {0x1cc, 0x1cc}, {0x1ce, 0x1ce},
+ {0x1d0, 0x1d0}, {0x1d2, 0x1d2}, {0x1d4, 0x1d4}, {0x1d6, 0x1d6},
+ {0x1d8, 0x1d8}, {0x1da, 0x1da}, {0x1dc, 0x1dd}, {0x1df, 0x1df},
+ {0x1e1, 0x1e1}, {0x1e3, 0x1e3}, {0x1e5, 0x1e5}, {0x1e7, 0x1e7},
+ {0x1e9, 0x1e9}, {0x1eb, 0x1eb}, {0x1ed, 0x1ed}, {0x1ef, 0x1f0},
+ {0x1f3, 0x1f3}, {0x1f5, 0x1f5}, {0x1f9, 0x1f9}, {0x1fb, 0x1fb},
+ {0x1fd, 0x1fd}, {0x1ff, 0x1ff}, {0x201, 0x201}, {0x203, 0x203},
+ {0x205, 0x205}, {0x207, 0x207}, {0x209, 0x209}, {0x20b, 0x20b},
+ {0x20d, 0x20d}, {0x20f, 0x20f}, {0x211, 0x211}, {0x213, 0x213},
+ {0x215, 0x215}, {0x217, 0x217}, {0x219, 0x219}, {0x21b, 0x21b},
+ {0x21d, 0x21d}, {0x21f, 0x21f}, {0x221, 0x221}, {0x223, 0x223},
+ {0x225, 0x225}, {0x227, 0x227}, {0x229, 0x229}, {0x22b, 0x22b},
+ {0x22d, 0x22d}, {0x22f, 0x22f}, {0x231, 0x231}, {0x233, 0x236},
+ {0x250, 0x2af}, {0x390, 0x390}, {0x3ac, 0x3ce}, {0x3d0, 0x3d1},
+ {0x3d5, 0x3d7}, {0x3d9, 0x3d9}, {0x3db, 0x3db}, {0x3dd, 0x3dd},
+ {0x3df, 0x3df}, {0x3e1, 0x3e1}, {0x3e3, 0x3e3}, {0x3e5, 0x3e5},
+ {0x3e7, 0x3e7}, {0x3e9, 0x3e9}, {0x3eb, 0x3eb}, {0x3ed, 0x3ed},
+ {0x3ef, 0x3f3}, {0x3f5, 0x3f5}, {0x3f8, 0x3f8}, {0x3fb, 0x3fb},
+ {0x430, 0x45f}, {0x461, 0x461}, {0x463, 0x463}, {0x465, 0x465},
+ {0x467, 0x467}, {0x469, 0x469}, {0x46b, 0x46b}, {0x46d, 0x46d},
+ {0x46f, 0x46f}, {0x471, 0x471}, {0x473, 0x473}, {0x475, 0x475},
+ {0x477, 0x477}, {0x479, 0x479}, {0x47b, 0x47b}, {0x47d, 0x47d},
+ {0x47f, 0x47f}, {0x481, 0x481}, {0x48b, 0x48b}, {0x48d, 0x48d},
+ {0x48f, 0x48f}, {0x491, 0x491}, {0x493, 0x493}, {0x495, 0x495},
+ {0x497, 0x497}, {0x499, 0x499}, {0x49b, 0x49b}, {0x49d, 0x49d},
+ {0x49f, 0x49f}, {0x4a1, 0x4a1}, {0x4a3, 0x4a3}, {0x4a5, 0x4a5},
+ {0x4a7, 0x4a7}, {0x4a9, 0x4a9}, {0x4ab, 0x4ab}, {0x4ad, 0x4ad},
+ {0x4af, 0x4af}, {0x4b1, 0x4b1}, {0x4b3, 0x4b3}, {0x4b5, 0x4b5},
+ {0x4b7, 0x4b7}, {0x4b9, 0x4b9}, {0x4bb, 0x4bb}, {0x4bd, 0x4bd},
+ {0x4bf, 0x4bf}, {0x4c2, 0x4c2}, {0x4c4, 0x4c4}, {0x4c6, 0x4c6},
+ {0x4c8, 0x4c8}, {0x4ca, 0x4ca}, {0x4cc, 0x4cc}, {0x4ce, 0x4ce},
+ {0x4d1, 0x4d1}, {0x4d3, 0x4d3}, {0x4d5, 0x4d5}, {0x4d7, 0x4d7},
+ {0x4d9, 0x4d9}, {0x4db, 0x4db}, {0x4dd, 0x4dd}, {0x4df, 0x4df},
+ {0x4e1, 0x4e1}, {0x4e3, 0x4e3}, {0x4e5, 0x4e5}, {0x4e7, 0x4e7},
+ {0x4e9, 0x4e9}, {0x4eb, 0x4eb}, {0x4ed, 0x4ed}, {0x4ef, 0x4ef},
+ {0x4f1, 0x4f1}, {0x4f3, 0x4f3}, {0x4f5, 0x4f5}, {0x4f9, 0x4f9},
+ {0x501, 0x501}, {0x503, 0x503}, {0x505, 0x505}, {0x507, 0x507},
+ {0x509, 0x509}, {0x50b, 0x50b}, {0x50d, 0x50d}, {0x50f, 0x50f},
+ {0x561, 0x587}, {0x1d00, 0x1d2b}, {0x1d62, 0x1d6b}, {0x1e01, 0x1e01},
+ {0x1e03, 0x1e03}, {0x1e05, 0x1e05}, {0x1e07, 0x1e07}, {0x1e09, 0x1e09},
+ {0x1e0b, 0x1e0b}, {0x1e0d, 0x1e0d}, {0x1e0f, 0x1e0f}, {0x1e11, 0x1e11},
+ {0x1e13, 0x1e13}, {0x1e15, 0x1e15}, {0x1e17, 0x1e17}, {0x1e19, 0x1e19},
+ {0x1e1b, 0x1e1b}, {0x1e1d, 0x1e1d}, {0x1e1f, 0x1e1f}, {0x1e21, 0x1e21},
+ {0x1e23, 0x1e23}, {0x1e25, 0x1e25}, {0x1e27, 0x1e27}, {0x1e29, 0x1e29},
+ {0x1e2b, 0x1e2b}, {0x1e2d, 0x1e2d}, {0x1e2f, 0x1e2f}, {0x1e31, 0x1e31},
+ {0x1e33, 0x1e33}, {0x1e35, 0x1e35}, {0x1e37, 0x1e37}, {0x1e39, 0x1e39},
+ {0x1e3b, 0x1e3b}, {0x1e3d, 0x1e3d}, {0x1e3f, 0x1e3f}, {0x1e41, 0x1e41},
+ {0x1e43, 0x1e43}, {0x1e45, 0x1e45}, {0x1e47, 0x1e47}, {0x1e49, 0x1e49},
+ {0x1e4b, 0x1e4b}, {0x1e4d, 0x1e4d}, {0x1e4f, 0x1e4f}, {0x1e51, 0x1e51},
+ {0x1e53, 0x1e53}, {0x1e55, 0x1e55}, {0x1e57, 0x1e57}, {0x1e59, 0x1e59},
+ {0x1e5b, 0x1e5b}, {0x1e5d, 0x1e5d}, {0x1e5f, 0x1e5f}, {0x1e61, 0x1e61},
+ {0x1e63, 0x1e63}, {0x1e65, 0x1e65}, {0x1e67, 0x1e67}, {0x1e69, 0x1e69},
+ {0x1e6b, 0x1e6b}, {0x1e6d, 0x1e6d}, {0x1e6f, 0x1e6f}, {0x1e71, 0x1e71},
+ {0x1e73, 0x1e73}, {0x1e75, 0x1e75}, {0x1e77, 0x1e77}, {0x1e79, 0x1e79},
+ {0x1e7b, 0x1e7b}, {0x1e7d, 0x1e7d}, {0x1e7f, 0x1e7f}, {0x1e81, 0x1e81},
+ {0x1e83, 0x1e83}, {0x1e85, 0x1e85}, {0x1e87, 0x1e87}, {0x1e89, 0x1e89},
+ {0x1e8b, 0x1e8b}, {0x1e8d, 0x1e8d}, {0x1e8f, 0x1e8f}, {0x1e91, 0x1e91},
+ {0x1e93, 0x1e93}, {0x1e95, 0x1e9b}, {0x1ea1, 0x1ea1}, {0x1ea3, 0x1ea3},
+ {0x1ea5, 0x1ea5}, {0x1ea7, 0x1ea7}, {0x1ea9, 0x1ea9}, {0x1eab, 0x1eab},
+ {0x1ead, 0x1ead}, {0x1eaf, 0x1eaf}, {0x1eb1, 0x1eb1}, {0x1eb3, 0x1eb3},
+ {0x1eb5, 0x1eb5}, {0x1eb7, 0x1eb7}, {0x1eb9, 0x1eb9}, {0x1ebb, 0x1ebb},
+ {0x1ebd, 0x1ebd}, {0x1ebf, 0x1ebf}, {0x1ec1, 0x1ec1}, {0x1ec3, 0x1ec3},
+ {0x1ec5, 0x1ec5}, {0x1ec7, 0x1ec7}, {0x1ec9, 0x1ec9}, {0x1ecb, 0x1ecb},
+ {0x1ecd, 0x1ecd}, {0x1ecf, 0x1ecf}, {0x1ed1, 0x1ed1}, {0x1ed3, 0x1ed3},
+ {0x1ed5, 0x1ed5}, {0x1ed7, 0x1ed7}, {0x1ed9, 0x1ed9}, {0x1edb, 0x1edb},
+ {0x1edd, 0x1edd}, {0x1edf, 0x1edf}, {0x1ee1, 0x1ee1}, {0x1ee3, 0x1ee3},
+ {0x1ee5, 0x1ee5}, {0x1ee7, 0x1ee7}, {0x1ee9, 0x1ee9}, {0x1eeb, 0x1eeb},
+ {0x1eed, 0x1eed}, {0x1eef, 0x1eef}, {0x1ef1, 0x1ef1}, {0x1ef3, 0x1ef3},
+ {0x1ef5, 0x1ef5}, {0x1ef7, 0x1ef7}, {0x1ef9, 0x1ef9}, {0x1f00, 0x1f07},
+ {0x1f10, 0x1f15}, {0x1f20, 0x1f27}, {0x1f30, 0x1f37}, {0x1f40, 0x1f45},
+ {0x1f50, 0x1f57}, {0x1f60, 0x1f67}, {0x1f70, 0x1f7d}, {0x1f80, 0x1f87},
+ {0x1f90, 0x1f97}, {0x1fa0, 0x1fa7}, {0x1fb0, 0x1fb4}, {0x1fb6, 0x1fb7},
+ {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fc7}, {0x1fd0, 0x1fd3},
+ {0x1fd6, 0x1fd7}, {0x1fe0, 0x1fe7}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ff7},
+ {0x2071, 0x2071}, {0x207f, 0x207f}, {0x210a, 0x210a}, {0x210e, 0x210f},
+ {0x2113, 0x2113}, {0x212f, 0x212f}, {0x2134, 0x2134}, {0x2139, 0x2139},
+ {0x213d, 0x213d}, {0x2146, 0x2149}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
+ {0xff41, 0xff5a} };
+static const xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
+ {0x1d44e, 0x1d454}, {0x1d456, 0x1d467}, {0x1d482, 0x1d49b},
+ {0x1d4b6, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
+ {0x1d4c5, 0x1d4cf}, {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537},
+ {0x1d552, 0x1d56b}, {0x1d586, 0x1d59f}, {0x1d5ba, 0x1d5d3},
+ {0x1d5ee, 0x1d607}, {0x1d622, 0x1d63b}, {0x1d656, 0x1d66f},
+ {0x1d68a, 0x1d6a3}, {0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6e1},
+ {0x1d6fc, 0x1d714}, {0x1d716, 0x1d71b}, {0x1d736, 0x1d74e},
+ {0x1d750, 0x1d755}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d78f},
+ {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9} };
+static xmlChRangeGroup xmlLlG = {396,28,xmlLlS,xmlLlL};
+
+static const xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
+ {0x2e0, 0x2e4}, {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x559, 0x559},
+ {0x640, 0x640}, {0x6e5, 0x6e6}, {0xe46, 0xe46}, {0xec6, 0xec6},
+ {0x17d7, 0x17d7}, {0x1843, 0x1843}, {0x1d2c, 0x1d61}, {0x3005, 0x3005},
+ {0x3031, 0x3035}, {0x303b, 0x303b}, {0x309d, 0x309e}, {0x30fc, 0x30fe},
+ {0xff70, 0xff70}, {0xff9e, 0xff9f} };
+static xmlChRangeGroup xmlLmG = {20,0,xmlLmS,NULL};
+
+static const xmlChSRange xmlLoS[] = {{0x1bb, 0x1bb}, {0x1c0, 0x1c3},
+ {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
+ {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6ee, 0x6ef},
+ {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710}, {0x712, 0x72f},
+ {0x74d, 0x74f}, {0x780, 0x7a5}, {0x7b1, 0x7b1}, {0x904, 0x939},
+ {0x93d, 0x93d}, {0x950, 0x950}, {0x958, 0x961}, {0x985, 0x98c},
+ {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2},
+ {0x9b6, 0x9b9}, {0x9bd, 0x9bd}, {0x9dc, 0x9dd}, {0x9df, 0x9e1},
+ {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10}, {0xa13, 0xa28},
+ {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36}, {0xa38, 0xa39},
+ {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74}, {0xa85, 0xa8d},
+ {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3},
+ {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0}, {0xae0, 0xae1},
+ {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28}, {0xb2a, 0xb30},
+ {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3d, 0xb3d}, {0xb5c, 0xb5d},
+ {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83}, {0xb85, 0xb8a},
+ {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
+ {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
+ {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
+ {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
+ {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
+ {0xcbd, 0xcbd}, {0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c},
+ {0xd0e, 0xd10}, {0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61},
+ {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdbd, 0xdbd},
+ {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45},
+ {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a},
+ {0xe8d, 0xe8d}, {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3},
+ {0xea5, 0xea5}, {0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeb0},
+ {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xedc, 0xedd},
+ {0xf00, 0xf00}, {0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b},
+ {0x1000, 0x1021}, {0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055},
+ {0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
+ {0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
+ {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
+ {0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
+ {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
+ {0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
+ {0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
+ {0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
+ {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
+ {0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
+ {0x1780, 0x17b3}, {0x17dc, 0x17dc}, {0x1820, 0x1842}, {0x1844, 0x1877},
+ {0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
+ {0x2135, 0x2138}, {0x3006, 0x3006}, {0x303c, 0x303c}, {0x3041, 0x3096},
+ {0x309f, 0x309f}, {0x30a1, 0x30fa}, {0x30ff, 0x30ff}, {0x3105, 0x312c},
+ {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff}, {0x3400, 0x3400},
+ {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5}, {0xa000, 0xa48c},
+ {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d}, {0xfa30, 0xfa6a},
+ {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c},
+ {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1},
+ {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb},
+ {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff66, 0xff6f}, {0xff71, 0xff9d},
+ {0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
+ {0xffda, 0xffdc} };
+static const xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
+ {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
+ {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
+ {0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10450, 0x1049d},
+ {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080a, 0x10835},
+ {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x1083f},
+ {0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
+static xmlChRangeGroup xmlLoG = {211,20,xmlLoS,xmlLoL};
+
+static const xmlChSRange xmlLtS[] = {{0x1c5, 0x1c5}, {0x1c8, 0x1c8},
+ {0x1cb, 0x1cb}, {0x1f2, 0x1f2}, {0x1f88, 0x1f8f}, {0x1f98, 0x1f9f},
+ {0x1fa8, 0x1faf}, {0x1fbc, 0x1fbc}, {0x1fcc, 0x1fcc}, {0x1ffc, 0x1ffc} };
+static xmlChRangeGroup xmlLtG = {10,0,xmlLtS,NULL};
+
+static const xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6},
+ {0xd8, 0xde}, {0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104},
+ {0x106, 0x106}, {0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c},
+ {0x10e, 0x10e}, {0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114},
+ {0x116, 0x116}, {0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c},
+ {0x11e, 0x11e}, {0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124},
+ {0x126, 0x126}, {0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c},
+ {0x12e, 0x12e}, {0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134},
+ {0x136, 0x136}, {0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d},
+ {0x13f, 0x13f}, {0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145},
+ {0x147, 0x147}, {0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e},
+ {0x150, 0x150}, {0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156},
+ {0x158, 0x158}, {0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e},
+ {0x160, 0x160}, {0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166},
+ {0x168, 0x168}, {0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e},
+ {0x170, 0x170}, {0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176},
+ {0x178, 0x179}, {0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182},
+ {0x184, 0x184}, {0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191},
+ {0x193, 0x194}, {0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0},
+ {0x1a2, 0x1a2}, {0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9},
+ {0x1ac, 0x1ac}, {0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5},
+ {0x1b7, 0x1b8}, {0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7},
+ {0x1ca, 0x1ca}, {0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1},
+ {0x1d3, 0x1d3}, {0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9},
+ {0x1db, 0x1db}, {0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2},
+ {0x1e4, 0x1e4}, {0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea},
+ {0x1ec, 0x1ec}, {0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4},
+ {0x1f6, 0x1f8}, {0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe},
+ {0x200, 0x200}, {0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206},
+ {0x208, 0x208}, {0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e},
+ {0x210, 0x210}, {0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216},
+ {0x218, 0x218}, {0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e},
+ {0x220, 0x220}, {0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226},
+ {0x228, 0x228}, {0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e},
+ {0x230, 0x230}, {0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a},
+ {0x38c, 0x38c}, {0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab},
+ {0x3d2, 0x3d4}, {0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
+ {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4},
+ {0x3e6, 0x3e6}, {0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec},
+ {0x3ee, 0x3ee}, {0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa},
+ {0x400, 0x42f}, {0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464},
+ {0x466, 0x466}, {0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c},
+ {0x46e, 0x46e}, {0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474},
+ {0x476, 0x476}, {0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c},
+ {0x47e, 0x47e}, {0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c},
+ {0x48e, 0x48e}, {0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494},
+ {0x496, 0x496}, {0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c},
+ {0x49e, 0x49e}, {0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4},
+ {0x4a6, 0x4a6}, {0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac},
+ {0x4ae, 0x4ae}, {0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4},
+ {0x4b6, 0x4b6}, {0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc},
+ {0x4be, 0x4be}, {0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5},
+ {0x4c7, 0x4c7}, {0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd},
+ {0x4d0, 0x4d0}, {0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6},
+ {0x4d8, 0x4d8}, {0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de},
+ {0x4e0, 0x4e0}, {0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6},
+ {0x4e8, 0x4e8}, {0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee},
+ {0x4f0, 0x4f0}, {0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8},
+ {0x500, 0x500}, {0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506},
+ {0x508, 0x508}, {0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e},
+ {0x531, 0x556}, {0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02},
+ {0x1e04, 0x1e04}, {0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a},
+ {0x1e0c, 0x1e0c}, {0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12},
+ {0x1e14, 0x1e14}, {0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a},
+ {0x1e1c, 0x1e1c}, {0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22},
+ {0x1e24, 0x1e24}, {0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a},
+ {0x1e2c, 0x1e2c}, {0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32},
+ {0x1e34, 0x1e34}, {0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a},
+ {0x1e3c, 0x1e3c}, {0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42},
+ {0x1e44, 0x1e44}, {0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a},
+ {0x1e4c, 0x1e4c}, {0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52},
+ {0x1e54, 0x1e54}, {0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a},
+ {0x1e5c, 0x1e5c}, {0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62},
+ {0x1e64, 0x1e64}, {0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a},
+ {0x1e6c, 0x1e6c}, {0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72},
+ {0x1e74, 0x1e74}, {0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a},
+ {0x1e7c, 0x1e7c}, {0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82},
+ {0x1e84, 0x1e84}, {0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a},
+ {0x1e8c, 0x1e8c}, {0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92},
+ {0x1e94, 0x1e94}, {0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4},
+ {0x1ea6, 0x1ea6}, {0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac},
+ {0x1eae, 0x1eae}, {0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4},
+ {0x1eb6, 0x1eb6}, {0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc},
+ {0x1ebe, 0x1ebe}, {0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4},
+ {0x1ec6, 0x1ec6}, {0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc},
+ {0x1ece, 0x1ece}, {0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4},
+ {0x1ed6, 0x1ed6}, {0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc},
+ {0x1ede, 0x1ede}, {0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4},
+ {0x1ee6, 0x1ee6}, {0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec},
+ {0x1eee, 0x1eee}, {0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4},
+ {0x1ef6, 0x1ef6}, {0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d},
+ {0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59},
+ {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f},
+ {0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec},
+ {0x1ff8, 0x1ffb}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d},
+ {0x2110, 0x2112}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124},
+ {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131},
+ {0x2133, 0x2133}, {0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
+static const xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
+ {0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c},
+ {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6},
+ {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9},
+ {0x1d504, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
+ {0x1d516, 0x1d51c}, {0x1d538, 0x1d539}, {0x1d53b, 0x1d53e},
+ {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550},
+ {0x1d56c, 0x1d585}, {0x1d5a0, 0x1d5b9}, {0x1d5d4, 0x1d5ed},
+ {0x1d608, 0x1d621}, {0x1d63c, 0x1d655}, {0x1d670, 0x1d689},
+ {0x1d6a8, 0x1d6c0}, {0x1d6e2, 0x1d6fa}, {0x1d71c, 0x1d734},
+ {0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8} };
+static xmlChRangeGroup xmlLuG = {390,31,xmlLuS,xmlLuL};
+
+static const xmlChSRange xmlMS[] = {{0x300, 0x357}, {0x35d, 0x36f},
+ {0x483, 0x486}, {0x488, 0x489}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
+ {0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
+ {0x610, 0x615}, {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc},
+ {0x6de, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x711, 0x711},
+ {0x730, 0x74a}, {0x7a6, 0x7b0}, {0x901, 0x903}, {0x93c, 0x93c},
+ {0x93e, 0x94d}, {0x951, 0x954}, {0x962, 0x963}, {0x981, 0x983},
+ {0x9bc, 0x9bc}, {0x9be, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
+ {0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa01, 0xa03}, {0xa3c, 0xa3c},
+ {0xa3e, 0xa42}, {0xa47, 0xa48}, {0xa4b, 0xa4d}, {0xa70, 0xa71},
+ {0xa81, 0xa83}, {0xabc, 0xabc}, {0xabe, 0xac5}, {0xac7, 0xac9},
+ {0xacb, 0xacd}, {0xae2, 0xae3}, {0xb01, 0xb03}, {0xb3c, 0xb3c},
+ {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d}, {0xb56, 0xb57},
+ {0xb82, 0xb82}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd},
+ {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44}, {0xc46, 0xc48},
+ {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83}, {0xcbc, 0xcbc},
+ {0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
+ {0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
+ {0xd57, 0xd57}, {0xd82, 0xd83}, {0xdca, 0xdca}, {0xdcf, 0xdd4},
+ {0xdd6, 0xdd6}, {0xdd8, 0xddf}, {0xdf2, 0xdf3}, {0xe31, 0xe31},
+ {0xe34, 0xe3a}, {0xe47, 0xe4e}, {0xeb1, 0xeb1}, {0xeb4, 0xeb9},
+ {0xebb, 0xebc}, {0xec8, 0xecd}, {0xf18, 0xf19}, {0xf35, 0xf35},
+ {0xf37, 0xf37}, {0xf39, 0xf39}, {0xf3e, 0xf3f}, {0xf71, 0xf84},
+ {0xf86, 0xf87}, {0xf90, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6},
+ {0x102c, 0x1032}, {0x1036, 0x1039}, {0x1056, 0x1059}, {0x1712, 0x1714},
+ {0x1732, 0x1734}, {0x1752, 0x1753}, {0x1772, 0x1773}, {0x17b6, 0x17d3},
+ {0x17dd, 0x17dd}, {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x192b},
+ {0x1930, 0x193b}, {0x20d0, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a},
+ {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
+static const xmlChLRange xmlML[] = {{0x1d165, 0x1d169}, {0x1d16d, 0x1d172},
+ {0x1d17b, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad},
+ {0xe0100, 0xe01ef} };
+static xmlChRangeGroup xmlMG = {113,6,xmlMS,xmlML};
+
+static const xmlChSRange xmlMcS[] = {{0x903, 0x903}, {0x93e, 0x940},
+ {0x949, 0x94c}, {0x982, 0x983}, {0x9be, 0x9c0}, {0x9c7, 0x9c8},
+ {0x9cb, 0x9cc}, {0x9d7, 0x9d7}, {0xa03, 0xa03}, {0xa3e, 0xa40},
+ {0xa83, 0xa83}, {0xabe, 0xac0}, {0xac9, 0xac9}, {0xacb, 0xacc},
+ {0xb02, 0xb03}, {0xb3e, 0xb3e}, {0xb40, 0xb40}, {0xb47, 0xb48},
+ {0xb4b, 0xb4c}, {0xb57, 0xb57}, {0xbbe, 0xbbf}, {0xbc1, 0xbc2},
+ {0xbc6, 0xbc8}, {0xbca, 0xbcc}, {0xbd7, 0xbd7}, {0xc01, 0xc03},
+ {0xc41, 0xc44}, {0xc82, 0xc83}, {0xcbe, 0xcbe}, {0xcc0, 0xcc4},
+ {0xcc7, 0xcc8}, {0xcca, 0xccb}, {0xcd5, 0xcd6}, {0xd02, 0xd03},
+ {0xd3e, 0xd40}, {0xd46, 0xd48}, {0xd4a, 0xd4c}, {0xd57, 0xd57},
+ {0xd82, 0xd83}, {0xdcf, 0xdd1}, {0xdd8, 0xddf}, {0xdf2, 0xdf3},
+ {0xf3e, 0xf3f}, {0xf7f, 0xf7f}, {0x102c, 0x102c}, {0x1031, 0x1031},
+ {0x1038, 0x1038}, {0x1056, 0x1057}, {0x17b6, 0x17b6}, {0x17be, 0x17c5},
+ {0x17c7, 0x17c8}, {0x1923, 0x1926}, {0x1929, 0x192b}, {0x1930, 0x1931},
+ {0x1933, 0x1938} };
+static const xmlChLRange xmlMcL[] = {{0x1d165, 0x1d166}, {0x1d16d, 0x1d172} };
+static xmlChRangeGroup xmlMcG = {55,2,xmlMcS,xmlMcL};
+
+static const xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
+ {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, {0x5bb, 0x5bd},
+ {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, {0x610, 0x615},
+ {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6df, 0x6e4},
+ {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x711, 0x711}, {0x730, 0x74a},
+ {0x7a6, 0x7b0}, {0x901, 0x902}, {0x93c, 0x93c}, {0x941, 0x948},
+ {0x94d, 0x94d}, {0x951, 0x954}, {0x962, 0x963}, {0x981, 0x981},
+ {0x9bc, 0x9bc}, {0x9c1, 0x9c4}, {0x9cd, 0x9cd}, {0x9e2, 0x9e3},
+ {0xa01, 0xa02}, {0xa3c, 0xa3c}, {0xa41, 0xa42}, {0xa47, 0xa48},
+ {0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa82}, {0xabc, 0xabc},
+ {0xac1, 0xac5}, {0xac7, 0xac8}, {0xacd, 0xacd}, {0xae2, 0xae3},
+ {0xb01, 0xb01}, {0xb3c, 0xb3c}, {0xb3f, 0xb3f}, {0xb41, 0xb43},
+ {0xb4d, 0xb4d}, {0xb56, 0xb56}, {0xb82, 0xb82}, {0xbc0, 0xbc0},
+ {0xbcd, 0xbcd}, {0xc3e, 0xc40}, {0xc46, 0xc48}, {0xc4a, 0xc4d},
+ {0xc55, 0xc56}, {0xcbc, 0xcbc}, {0xcbf, 0xcbf}, {0xcc6, 0xcc6},
+ {0xccc, 0xccd}, {0xd41, 0xd43}, {0xd4d, 0xd4d}, {0xdca, 0xdca},
+ {0xdd2, 0xdd4}, {0xdd6, 0xdd6}, {0xe31, 0xe31}, {0xe34, 0xe3a},
+ {0xe47, 0xe4e}, {0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc},
+ {0xec8, 0xecd}, {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37},
+ {0xf39, 0xf39}, {0xf71, 0xf7e}, {0xf80, 0xf84}, {0xf86, 0xf87},
+ {0xf90, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6}, {0x102d, 0x1030},
+ {0x1032, 0x1032}, {0x1036, 0x1037}, {0x1039, 0x1039}, {0x1058, 0x1059},
+ {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, {0x1772, 0x1773},
+ {0x17b7, 0x17bd}, {0x17c6, 0x17c6}, {0x17c9, 0x17d3}, {0x17dd, 0x17dd},
+ {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x1922}, {0x1927, 0x1928},
+ {0x1932, 0x1932}, {0x1939, 0x193b}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1},
+ {0x20e5, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e},
+ {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
+static const xmlChLRange xmlMnL[] = {{0x1d167, 0x1d169}, {0x1d17b, 0x1d182},
+ {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0xe0100, 0xe01ef} };
+static xmlChRangeGroup xmlMnG = {108,5,xmlMnS,xmlMnL};
+
+static const xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3},
+ {0xb9, 0xb9}, {0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9},
+ {0x966, 0x96f}, {0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f},
+ {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f},
+ {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
+ {0xf20, 0xf33}, {0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0},
+ {0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f},
+ {0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183},
+ {0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007},
+ {0x3021, 0x3029}, {0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229},
+ {0x3251, 0x325f}, {0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
+static const xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
+ {0x1034a, 0x1034a}, {0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
+static xmlChRangeGroup xmlNG = {42,5,xmlNS,xmlNL};
+
+static const xmlChSRange xmlNdS[] = {{0x30, 0x39}, {0x660, 0x669},
+ {0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
+ {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
+ {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
+ {0xf20, 0xf29}, {0x1040, 0x1049}, {0x1369, 0x1371}, {0x17e0, 0x17e9},
+ {0x1810, 0x1819}, {0x1946, 0x194f}, {0xff10, 0xff19} };
+static const xmlChLRange xmlNdL[] = {{0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
+static xmlChRangeGroup xmlNdG = {21,2,xmlNdS,xmlNdL};
+
+static const xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9},
+ {0xbc, 0xbe}, {0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33},
+ {0x1372, 0x137c}, {0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079},
+ {0x2080, 0x2089}, {0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff},
+ {0x2776, 0x2793}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
+ {0x3280, 0x3289}, {0x32b1, 0x32bf} };
+static const xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
+static xmlChRangeGroup xmlNoG = {20,2,xmlNoS,xmlNoL};
+
+static const xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a},
+ {0x2c, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f},
+ {0x7b, 0x7b}, {0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7},
+ {0xbb, 0xbb}, {0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387},
+ {0x55a, 0x55f}, {0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0},
+ {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b},
+ {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d},
+ {0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f},
+ {0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85},
+ {0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
+ {0x169b, 0x169c}, {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6},
+ {0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027},
+ {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057},
+ {0x207d, 0x207e}, {0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6},
+ {0x2768, 0x2775}, {0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db},
+ {0x29fc, 0x29fd}, {0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f},
+ {0x3030, 0x3030}, {0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb},
+ {0xfd3e, 0xfd3f}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63},
+ {0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a},
+ {0xff0c, 0xff0f}, {0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d},
+ {0xff3f, 0xff3f}, {0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
+static const xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
+static xmlChRangeGroup xmlPG = {84,2,xmlPS,xmlPL};
+
+static const xmlChSRange xmlPdS[] = {{0x2d, 0x2d}, {0x58a, 0x58a},
+ {0x1806, 0x1806}, {0x2010, 0x2015}, {0x301c, 0x301c}, {0x3030, 0x3030},
+ {0x30a0, 0x30a0}, {0xfe31, 0xfe32}, {0xfe58, 0xfe58}, {0xfe63, 0xfe63},
+ {0xff0d, 0xff0d} };
+static xmlChRangeGroup xmlPdG = {11,0,xmlPdS,NULL};
+
+static const xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d},
+ {0x7d, 0x7d}, {0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c},
+ {0x2046, 0x2046}, {0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a},
+ {0x23b5, 0x23b5}, {0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d},
+ {0x276f, 0x276f}, {0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775},
+ {0x27e7, 0x27e7}, {0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984},
+ {0x2986, 0x2986}, {0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c},
+ {0x298e, 0x298e}, {0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994},
+ {0x2996, 0x2996}, {0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db},
+ {0x29fd, 0x29fd}, {0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d},
+ {0x300f, 0x300f}, {0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017},
+ {0x3019, 0x3019}, {0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f},
+ {0xfe36, 0xfe36}, {0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c},
+ {0xfe3e, 0xfe3e}, {0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44},
+ {0xfe48, 0xfe48}, {0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e},
+ {0xff09, 0xff09}, {0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60},
+ {0xff63, 0xff63} };
+static xmlChRangeGroup xmlPeG = {63,0,xmlPeS,NULL};
+
+static const xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27},
+ {0x2a, 0x2a}, {0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40},
+ {0x5c, 0x5c}, {0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
+ {0x387, 0x387}, {0x55a, 0x55f}, {0x589, 0x589}, {0x5be, 0x5be},
+ {0x5c0, 0x5c0}, {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d},
+ {0x61b, 0x61b}, {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4},
+ {0x700, 0x70d}, {0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4},
+ {0xe4f, 0xe4f}, {0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf85, 0xf85},
+ {0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
+ {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6}, {0x17d8, 0x17da},
+ {0x1800, 0x1805}, {0x1807, 0x180a}, {0x1944, 0x1945}, {0x2016, 0x2017},
+ {0x2020, 0x2027}, {0x2030, 0x2038}, {0x203b, 0x203e}, {0x2041, 0x2043},
+ {0x2047, 0x2051}, {0x2053, 0x2053}, {0x2057, 0x2057}, {0x23b6, 0x23b6},
+ {0x3001, 0x3003}, {0x303d, 0x303d}, {0xfe30, 0xfe30}, {0xfe45, 0xfe46},
+ {0xfe49, 0xfe4c}, {0xfe50, 0xfe52}, {0xfe54, 0xfe57}, {0xfe5f, 0xfe61},
+ {0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff07},
+ {0xff0a, 0xff0a}, {0xff0c, 0xff0c}, {0xff0e, 0xff0f}, {0xff1a, 0xff1b},
+ {0xff1f, 0xff20}, {0xff3c, 0xff3c}, {0xff61, 0xff61}, {0xff64, 0xff64} };
+static const xmlChLRange xmlPoL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
+static xmlChRangeGroup xmlPoG = {72,2,xmlPoS,xmlPoL};
+
+static const xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b},
+ {0x7b, 0x7b}, {0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b},
+ {0x201a, 0x201a}, {0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d},
+ {0x208d, 0x208d}, {0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768},
+ {0x276a, 0x276a}, {0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770},
+ {0x2772, 0x2772}, {0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8},
+ {0x27ea, 0x27ea}, {0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987},
+ {0x2989, 0x2989}, {0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f},
+ {0x2991, 0x2991}, {0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997},
+ {0x29d8, 0x29d8}, {0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008},
+ {0x300a, 0x300a}, {0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010},
+ {0x3014, 0x3014}, {0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a},
+ {0x301d, 0x301d}, {0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37},
+ {0xfe39, 0xfe39}, {0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f},
+ {0xfe41, 0xfe41}, {0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59},
+ {0xfe5b, 0xfe5b}, {0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b},
+ {0xff5b, 0xff5b}, {0xff5f, 0xff5f}, {0xff62, 0xff62} };
+static xmlChRangeGroup xmlPsG = {65,0,xmlPsS,NULL};
+
+static const xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b},
+ {0x3c, 0x3e}, {0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e},
+ {0xa2, 0xa9}, {0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6},
+ {0xb8, 0xb8}, {0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5},
+ {0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
+ {0x384, 0x385}, {0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f},
+ {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa},
+ {0xaf1, 0xaf1}, {0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f},
+ {0xf01, 0xf03}, {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34},
+ {0xf36, 0xf36}, {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc},
+ {0xfcf, 0xfcf}, {0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff},
+ {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf},
+ {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052},
+ {0x207a, 0x207c}, {0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101},
+ {0x2103, 0x2106}, {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118},
+ {0x211e, 0x2123}, {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129},
+ {0x212e, 0x212e}, {0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144},
+ {0x214a, 0x214b}, {0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0},
+ {0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617},
+ {0x2619, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704},
+ {0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d},
+ {0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767},
+ {0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5},
+ {0x27f0, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d},
+ {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
+ {0x3004, 0x3004}, {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037},
+ {0x303e, 0x303f}, {0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f},
+ {0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d},
+ {0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff},
+ {0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd},
+ {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
+ {0xff0b, 0xff0b}, {0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40},
+ {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee},
+ {0xfffc, 0xfffd} };
+static const xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
+ {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
+ {0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
+ {0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356}, {0x1d6c1, 0x1d6c1},
+ {0x1d6db, 0x1d6db}, {0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715},
+ {0x1d735, 0x1d735}, {0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f},
+ {0x1d789, 0x1d789}, {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
+static xmlChRangeGroup xmlSG = {133,20,xmlSS,xmlSL};
+
+static const xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5},
+ {0x9f2, 0x9f3}, {0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f},
+ {0x17db, 0x17db}, {0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69},
+ {0xff04, 0xff04}, {0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
+static xmlChRangeGroup xmlScG = {13,0,xmlScS,NULL};
+
+static const xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60},
+ {0xa8, 0xa8}, {0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
+ {0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
+ {0x384, 0x385}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf},
+ {0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x309b, 0x309c},
+ {0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xffe3, 0xffe3} };
+static xmlChRangeGroup xmlSkG = {22,0,xmlSkS,NULL};
+
+static const xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e},
+ {0x7c, 0x7c}, {0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7},
+ {0xf7, 0xf7}, {0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052},
+ {0x207a, 0x207c}, {0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b},
+ {0x2190, 0x2194}, {0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3},
+ {0x21a6, 0x21a6}, {0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2},
+ {0x21d4, 0x21d4}, {0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321},
+ {0x237c, 0x237c}, {0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1},
+ {0x25f8, 0x25ff}, {0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff},
+ {0x2900, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff},
+ {0xfb29, 0xfb29}, {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b},
+ {0xff1c, 0xff1e}, {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2},
+ {0xffe9, 0xffec} };
+static const xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
+ {0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715}, {0x1d735, 0x1d735},
+ {0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f}, {0x1d789, 0x1d789},
+ {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
+static xmlChRangeGroup xmlSmG = {48,10,xmlSmS,xmlSmL};
+
+static const xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9},
+ {0xae, 0xae}, {0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482},
+ {0x60e, 0x60f}, {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa},
+ {0xb70, 0xb70}, {0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03},
+ {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
+ {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
+ {0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106},
+ {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
+ {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
+ {0x2132, 0x2132}, {0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199},
+ {0x219c, 0x219f}, {0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad},
+ {0x21af, 0x21cd}, {0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3},
+ {0x2300, 0x2307}, {0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b},
+ {0x237d, 0x239a}, {0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a},
+ {0x249c, 0x24e9}, {0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7},
+ {0x2600, 0x2617}, {0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691},
+ {0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727},
+ {0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756},
+ {0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af},
+ {0x27b1, 0x27be}, {0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99},
+ {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
+ {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
+ {0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243},
+ {0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0},
+ {0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6},
+ {0xfdfd, 0xfdfd}, {0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee},
+ {0xfffc, 0xfffd} };
+static const xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
+ {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
+ {0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
+ {0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356} };
+static xmlChRangeGroup xmlSoG = {103,10,xmlSoS,xmlSoL};
+
+static const xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0},
+ {0x1680, 0x1680}, {0x180e, 0x180e}, {0x2000, 0x200a}, {0x2028, 0x2029},
+ {0x202f, 0x202f}, {0x205f, 0x205f}, {0x3000, 0x3000} };
+static xmlChRangeGroup xmlZG = {9,0,xmlZS,NULL};
+
+static xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
+static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
+
+/**
+ * xmlUnicodeLookup:
+ * @tptr: pointer to the name table
+ * @name: name to be found
+ *
+ * binary table lookup for user-supplied name
+ *
+ * Returns pointer to range function if found, otherwise NULL
+ */
+static xmlIntFunc
+*xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) {
+ int low, high, mid, cmp;
+ xmlUnicodeRange *sptr;
+
+ if ((tptr == NULL) || (tname == NULL)) return(NULL);
+
+ low = 0;
+ high = tptr->numentries - 1;
+ sptr = tptr->table;
+ while (low <= high) {
+ mid = (low + high) / 2;
+ if ((cmp=strcmp(tname, sptr[mid].rangename)) == 0)
+ return (sptr[mid].func);
+ if (cmp < 0)
+ high = mid - 1;
+ else
+ low = mid + 1;
+ }
+ return (NULL);
+}
+
+/**
+ * xmlUCSIsAegeanNumbers:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of AegeanNumbers UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsAegeanNumbers(int code) {
+ return(((code >= 0x10100) && (code <= 0x1013F)));
+}
+
+/**
+ * xmlUCSIsAlphabeticPresentationForms:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of AlphabeticPresentationForms UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsAlphabeticPresentationForms(int code) {
+ return(((code >= 0xFB00) && (code <= 0xFB4F)));
+}
+
+/**
+ * xmlUCSIsArabic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Arabic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsArabic(int code) {
+ return(((code >= 0x0600) && (code <= 0x06FF)));
+}
+
+/**
+ * xmlUCSIsArabicPresentationFormsA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of ArabicPresentationForms-A UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsArabicPresentationFormsA(int code) {
+ return(((code >= 0xFB50) && (code <= 0xFDFF)));
+}
+
+/**
+ * xmlUCSIsArabicPresentationFormsB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of ArabicPresentationForms-B UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsArabicPresentationFormsB(int code) {
+ return(((code >= 0xFE70) && (code <= 0xFEFF)));
+}
+
+/**
+ * xmlUCSIsArmenian:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Armenian UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsArmenian(int code) {
+ return(((code >= 0x0530) && (code <= 0x058F)));
+}
+
+/**
+ * xmlUCSIsArrows:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Arrows UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsArrows(int code) {
+ return(((code >= 0x2190) && (code <= 0x21FF)));
+}
+
+/**
+ * xmlUCSIsBasicLatin:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of BasicLatin UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBasicLatin(int code) {
+ return(((code >= 0x0000) && (code <= 0x007F)));
+}
+
+/**
+ * xmlUCSIsBengali:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Bengali UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBengali(int code) {
+ return(((code >= 0x0980) && (code <= 0x09FF)));
+}
+
+/**
+ * xmlUCSIsBlockElements:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of BlockElements UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBlockElements(int code) {
+ return(((code >= 0x2580) && (code <= 0x259F)));
+}
+
+/**
+ * xmlUCSIsBopomofo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Bopomofo UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBopomofo(int code) {
+ return(((code >= 0x3100) && (code <= 0x312F)));
+}
+
+/**
+ * xmlUCSIsBopomofoExtended:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of BopomofoExtended UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBopomofoExtended(int code) {
+ return(((code >= 0x31A0) && (code <= 0x31BF)));
+}
+
+/**
+ * xmlUCSIsBoxDrawing:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of BoxDrawing UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBoxDrawing(int code) {
+ return(((code >= 0x2500) && (code <= 0x257F)));
+}
+
+/**
+ * xmlUCSIsBraillePatterns:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of BraillePatterns UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBraillePatterns(int code) {
+ return(((code >= 0x2800) && (code <= 0x28FF)));
+}
+
+/**
+ * xmlUCSIsBuhid:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Buhid UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsBuhid(int code) {
+ return(((code >= 0x1740) && (code <= 0x175F)));
+}
+
+/**
+ * xmlUCSIsByzantineMusicalSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of ByzantineMusicalSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsByzantineMusicalSymbols(int code) {
+ return(((code >= 0x1D000) && (code <= 0x1D0FF)));
+}
+
+/**
+ * xmlUCSIsCJKCompatibility:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKCompatibility UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKCompatibility(int code) {
+ return(((code >= 0x3300) && (code <= 0x33FF)));
+}
+
+/**
+ * xmlUCSIsCJKCompatibilityForms:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKCompatibilityForms UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKCompatibilityForms(int code) {
+ return(((code >= 0xFE30) && (code <= 0xFE4F)));
+}
+
+/**
+ * xmlUCSIsCJKCompatibilityIdeographs:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKCompatibilityIdeographs UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKCompatibilityIdeographs(int code) {
+ return(((code >= 0xF900) && (code <= 0xFAFF)));
+}
+
+/**
+ * xmlUCSIsCJKCompatibilityIdeographsSupplement:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKCompatibilityIdeographsSupplement(int code) {
+ return(((code >= 0x2F800) && (code <= 0x2FA1F)));
+}
+
+/**
+ * xmlUCSIsCJKRadicalsSupplement:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKRadicalsSupplement UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKRadicalsSupplement(int code) {
+ return(((code >= 0x2E80) && (code <= 0x2EFF)));
+}
+
+/**
+ * xmlUCSIsCJKSymbolsandPunctuation:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKSymbolsandPunctuation UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKSymbolsandPunctuation(int code) {
+ return(((code >= 0x3000) && (code <= 0x303F)));
+}
+
+/**
+ * xmlUCSIsCJKUnifiedIdeographs:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKUnifiedIdeographs UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKUnifiedIdeographs(int code) {
+ return(((code >= 0x4E00) && (code <= 0x9FFF)));
+}
+
+/**
+ * xmlUCSIsCJKUnifiedIdeographsExtensionA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKUnifiedIdeographsExtensionA(int code) {
+ return(((code >= 0x3400) && (code <= 0x4DBF)));
+}
+
+/**
+ * xmlUCSIsCJKUnifiedIdeographsExtensionB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCJKUnifiedIdeographsExtensionB(int code) {
+ return(((code >= 0x20000) && (code <= 0x2A6DF)));
+}
+
+/**
+ * xmlUCSIsCherokee:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Cherokee UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCherokee(int code) {
+ return(((code >= 0x13A0) && (code <= 0x13FF)));
+}
+
+/**
+ * xmlUCSIsCombiningDiacriticalMarks:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CombiningDiacriticalMarks UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCombiningDiacriticalMarks(int code) {
+ return(((code >= 0x0300) && (code <= 0x036F)));
+}
+
+/**
+ * xmlUCSIsCombiningDiacriticalMarksforSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCombiningDiacriticalMarksforSymbols(int code) {
+ return(((code >= 0x20D0) && (code <= 0x20FF)));
+}
+
+/**
+ * xmlUCSIsCombiningHalfMarks:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CombiningHalfMarks UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCombiningHalfMarks(int code) {
+ return(((code >= 0xFE20) && (code <= 0xFE2F)));
+}
+
+/**
+ * xmlUCSIsCombiningMarksforSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CombiningMarksforSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCombiningMarksforSymbols(int code) {
+ return(((code >= 0x20D0) && (code <= 0x20FF)));
+}
+
+/**
+ * xmlUCSIsControlPictures:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of ControlPictures UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsControlPictures(int code) {
+ return(((code >= 0x2400) && (code <= 0x243F)));
+}
+
+/**
+ * xmlUCSIsCurrencySymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CurrencySymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCurrencySymbols(int code) {
+ return(((code >= 0x20A0) && (code <= 0x20CF)));
+}
+
+/**
+ * xmlUCSIsCypriotSyllabary:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CypriotSyllabary UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCypriotSyllabary(int code) {
+ return(((code >= 0x10800) && (code <= 0x1083F)));
+}
+
+/**
+ * xmlUCSIsCyrillic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Cyrillic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCyrillic(int code) {
+ return(((code >= 0x0400) && (code <= 0x04FF)));
+}
+
+/**
+ * xmlUCSIsCyrillicSupplement:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of CyrillicSupplement UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCyrillicSupplement(int code) {
+ return(((code >= 0x0500) && (code <= 0x052F)));
+}
+
+/**
+ * xmlUCSIsDeseret:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Deseret UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsDeseret(int code) {
+ return(((code >= 0x10400) && (code <= 0x1044F)));
+}
+
+/**
+ * xmlUCSIsDevanagari:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Devanagari UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsDevanagari(int code) {
+ return(((code >= 0x0900) && (code <= 0x097F)));
+}
+
+/**
+ * xmlUCSIsDingbats:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Dingbats UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsDingbats(int code) {
+ return(((code >= 0x2700) && (code <= 0x27BF)));
+}
+
+/**
+ * xmlUCSIsEnclosedAlphanumerics:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of EnclosedAlphanumerics UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsEnclosedAlphanumerics(int code) {
+ return(((code >= 0x2460) && (code <= 0x24FF)));
+}
+
+/**
+ * xmlUCSIsEnclosedCJKLettersandMonths:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of EnclosedCJKLettersandMonths UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsEnclosedCJKLettersandMonths(int code) {
+ return(((code >= 0x3200) && (code <= 0x32FF)));
+}
+
+/**
+ * xmlUCSIsEthiopic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Ethiopic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsEthiopic(int code) {
+ return(((code >= 0x1200) && (code <= 0x137F)));
+}
+
+/**
+ * xmlUCSIsGeneralPunctuation:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of GeneralPunctuation UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGeneralPunctuation(int code) {
+ return(((code >= 0x2000) && (code <= 0x206F)));
+}
+
+/**
+ * xmlUCSIsGeometricShapes:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of GeometricShapes UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGeometricShapes(int code) {
+ return(((code >= 0x25A0) && (code <= 0x25FF)));
+}
+
+/**
+ * xmlUCSIsGeorgian:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Georgian UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGeorgian(int code) {
+ return(((code >= 0x10A0) && (code <= 0x10FF)));
+}
+
+/**
+ * xmlUCSIsGothic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Gothic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGothic(int code) {
+ return(((code >= 0x10330) && (code <= 0x1034F)));
+}
+
+/**
+ * xmlUCSIsGreek:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Greek UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGreek(int code) {
+ return(((code >= 0x0370) && (code <= 0x03FF)));
+}
+
+/**
+ * xmlUCSIsGreekExtended:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of GreekExtended UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGreekExtended(int code) {
+ return(((code >= 0x1F00) && (code <= 0x1FFF)));
+}
+
+/**
+ * xmlUCSIsGreekandCoptic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of GreekandCoptic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGreekandCoptic(int code) {
+ return(((code >= 0x0370) && (code <= 0x03FF)));
+}
+
+/**
+ * xmlUCSIsGujarati:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Gujarati UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGujarati(int code) {
+ return(((code >= 0x0A80) && (code <= 0x0AFF)));
+}
+
+/**
+ * xmlUCSIsGurmukhi:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Gurmukhi UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsGurmukhi(int code) {
+ return(((code >= 0x0A00) && (code <= 0x0A7F)));
+}
+
+/**
+ * xmlUCSIsHalfwidthandFullwidthForms:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HalfwidthandFullwidthForms UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHalfwidthandFullwidthForms(int code) {
+ return(((code >= 0xFF00) && (code <= 0xFFEF)));
+}
+
+/**
+ * xmlUCSIsHangulCompatibilityJamo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HangulCompatibilityJamo UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHangulCompatibilityJamo(int code) {
+ return(((code >= 0x3130) && (code <= 0x318F)));
+}
+
+/**
+ * xmlUCSIsHangulJamo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HangulJamo UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHangulJamo(int code) {
+ return(((code >= 0x1100) && (code <= 0x11FF)));
+}
+
+/**
+ * xmlUCSIsHangulSyllables:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HangulSyllables UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHangulSyllables(int code) {
+ return(((code >= 0xAC00) && (code <= 0xD7AF)));
+}
+
+/**
+ * xmlUCSIsHanunoo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Hanunoo UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHanunoo(int code) {
+ return(((code >= 0x1720) && (code <= 0x173F)));
+}
+
+/**
+ * xmlUCSIsHebrew:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Hebrew UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHebrew(int code) {
+ return(((code >= 0x0590) && (code <= 0x05FF)));
+}
+
+/**
+ * xmlUCSIsHighPrivateUseSurrogates:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HighPrivateUseSurrogates UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHighPrivateUseSurrogates(int code) {
+ return(((code >= 0xDB80) && (code <= 0xDBFF)));
+}
+
+/**
+ * xmlUCSIsHighSurrogates:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of HighSurrogates UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHighSurrogates(int code) {
+ return(((code >= 0xD800) && (code <= 0xDB7F)));
+}
+
+/**
+ * xmlUCSIsHiragana:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Hiragana UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsHiragana(int code) {
+ return(((code >= 0x3040) && (code <= 0x309F)));
+}
+
+/**
+ * xmlUCSIsIPAExtensions:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of IPAExtensions UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsIPAExtensions(int code) {
+ return(((code >= 0x0250) && (code <= 0x02AF)));
+}
+
+/**
+ * xmlUCSIsIdeographicDescriptionCharacters:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of IdeographicDescriptionCharacters UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsIdeographicDescriptionCharacters(int code) {
+ return(((code >= 0x2FF0) && (code <= 0x2FFF)));
+}
+
+/**
+ * xmlUCSIsKanbun:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Kanbun UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKanbun(int code) {
+ return(((code >= 0x3190) && (code <= 0x319F)));
+}
+
+/**
+ * xmlUCSIsKangxiRadicals:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of KangxiRadicals UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKangxiRadicals(int code) {
+ return(((code >= 0x2F00) && (code <= 0x2FDF)));
+}
+
+/**
+ * xmlUCSIsKannada:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Kannada UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKannada(int code) {
+ return(((code >= 0x0C80) && (code <= 0x0CFF)));
+}
+
+/**
+ * xmlUCSIsKatakana:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Katakana UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKatakana(int code) {
+ return(((code >= 0x30A0) && (code <= 0x30FF)));
+}
+
+/**
+ * xmlUCSIsKatakanaPhoneticExtensions:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of KatakanaPhoneticExtensions UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKatakanaPhoneticExtensions(int code) {
+ return(((code >= 0x31F0) && (code <= 0x31FF)));
+}
+
+/**
+ * xmlUCSIsKhmer:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Khmer UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKhmer(int code) {
+ return(((code >= 0x1780) && (code <= 0x17FF)));
+}
+
+/**
+ * xmlUCSIsKhmerSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of KhmerSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsKhmerSymbols(int code) {
+ return(((code >= 0x19E0) && (code <= 0x19FF)));
+}
+
+/**
+ * xmlUCSIsLao:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Lao UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLao(int code) {
+ return(((code >= 0x0E80) && (code <= 0x0EFF)));
+}
+
+/**
+ * xmlUCSIsLatin1Supplement:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Latin-1Supplement UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLatin1Supplement(int code) {
+ return(((code >= 0x0080) && (code <= 0x00FF)));
+}
+
+/**
+ * xmlUCSIsLatinExtendedA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LatinExtended-A UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLatinExtendedA(int code) {
+ return(((code >= 0x0100) && (code <= 0x017F)));
+}
+
+/**
+ * xmlUCSIsLatinExtendedB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LatinExtended-B UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLatinExtendedB(int code) {
+ return(((code >= 0x0180) && (code <= 0x024F)));
+}
+
+/**
+ * xmlUCSIsLatinExtendedAdditional:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LatinExtendedAdditional UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLatinExtendedAdditional(int code) {
+ return(((code >= 0x1E00) && (code <= 0x1EFF)));
+}
+
+/**
+ * xmlUCSIsLetterlikeSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LetterlikeSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLetterlikeSymbols(int code) {
+ return(((code >= 0x2100) && (code <= 0x214F)));
+}
+
+/**
+ * xmlUCSIsLimbu:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Limbu UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLimbu(int code) {
+ return(((code >= 0x1900) && (code <= 0x194F)));
+}
+
+/**
+ * xmlUCSIsLinearBIdeograms:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LinearBIdeograms UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLinearBIdeograms(int code) {
+ return(((code >= 0x10080) && (code <= 0x100FF)));
+}
+
+/**
+ * xmlUCSIsLinearBSyllabary:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LinearBSyllabary UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLinearBSyllabary(int code) {
+ return(((code >= 0x10000) && (code <= 0x1007F)));
+}
+
+/**
+ * xmlUCSIsLowSurrogates:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of LowSurrogates UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsLowSurrogates(int code) {
+ return(((code >= 0xDC00) && (code <= 0xDFFF)));
+}
+
+/**
+ * xmlUCSIsMalayalam:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Malayalam UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMalayalam(int code) {
+ return(((code >= 0x0D00) && (code <= 0x0D7F)));
+}
+
+/**
+ * xmlUCSIsMathematicalAlphanumericSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MathematicalAlphanumericSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMathematicalAlphanumericSymbols(int code) {
+ return(((code >= 0x1D400) && (code <= 0x1D7FF)));
+}
+
+/**
+ * xmlUCSIsMathematicalOperators:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MathematicalOperators UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMathematicalOperators(int code) {
+ return(((code >= 0x2200) && (code <= 0x22FF)));
+}
+
+/**
+ * xmlUCSIsMiscellaneousMathematicalSymbolsA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMiscellaneousMathematicalSymbolsA(int code) {
+ return(((code >= 0x27C0) && (code <= 0x27EF)));
+}
+
+/**
+ * xmlUCSIsMiscellaneousMathematicalSymbolsB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMiscellaneousMathematicalSymbolsB(int code) {
+ return(((code >= 0x2980) && (code <= 0x29FF)));
+}
+
+/**
+ * xmlUCSIsMiscellaneousSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MiscellaneousSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMiscellaneousSymbols(int code) {
+ return(((code >= 0x2600) && (code <= 0x26FF)));
+}
+
+/**
+ * xmlUCSIsMiscellaneousSymbolsandArrows:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMiscellaneousSymbolsandArrows(int code) {
+ return(((code >= 0x2B00) && (code <= 0x2BFF)));
+}
+
+/**
+ * xmlUCSIsMiscellaneousTechnical:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MiscellaneousTechnical UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMiscellaneousTechnical(int code) {
+ return(((code >= 0x2300) && (code <= 0x23FF)));
+}
+
+/**
+ * xmlUCSIsMongolian:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Mongolian UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMongolian(int code) {
+ return(((code >= 0x1800) && (code <= 0x18AF)));
+}
+
+/**
+ * xmlUCSIsMusicalSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of MusicalSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMusicalSymbols(int code) {
+ return(((code >= 0x1D100) && (code <= 0x1D1FF)));
+}
+
+/**
+ * xmlUCSIsMyanmar:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Myanmar UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsMyanmar(int code) {
+ return(((code >= 0x1000) && (code <= 0x109F)));
+}
+
+/**
+ * xmlUCSIsNumberForms:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of NumberForms UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsNumberForms(int code) {
+ return(((code >= 0x2150) && (code <= 0x218F)));
+}
+
+/**
+ * xmlUCSIsOgham:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Ogham UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsOgham(int code) {
+ return(((code >= 0x1680) && (code <= 0x169F)));
+}
+
+/**
+ * xmlUCSIsOldItalic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of OldItalic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsOldItalic(int code) {
+ return(((code >= 0x10300) && (code <= 0x1032F)));
+}
+
+/**
+ * xmlUCSIsOpticalCharacterRecognition:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of OpticalCharacterRecognition UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsOpticalCharacterRecognition(int code) {
+ return(((code >= 0x2440) && (code <= 0x245F)));
+}
+
+/**
+ * xmlUCSIsOriya:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Oriya UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsOriya(int code) {
+ return(((code >= 0x0B00) && (code <= 0x0B7F)));
+}
+
+/**
+ * xmlUCSIsOsmanya:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Osmanya UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsOsmanya(int code) {
+ return(((code >= 0x10480) && (code <= 0x104AF)));
+}
+
+/**
+ * xmlUCSIsPhoneticExtensions:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of PhoneticExtensions UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsPhoneticExtensions(int code) {
+ return(((code >= 0x1D00) && (code <= 0x1D7F)));
+}
+
+/**
+ * xmlUCSIsPrivateUse:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of PrivateUse UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsPrivateUse(int code) {
+ return(((code >= 0xE000) && (code <= 0xF8FF)) ||
+ ((code >= 0xF0000) && (code <= 0xFFFFF)) ||
+ ((code >= 0x100000) && (code <= 0x10FFFF)));
+}
+
+/**
+ * xmlUCSIsPrivateUseArea:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of PrivateUseArea UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsPrivateUseArea(int code) {
+ return(((code >= 0xE000) && (code <= 0xF8FF)));
+}
+
+/**
+ * xmlUCSIsRunic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Runic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsRunic(int code) {
+ return(((code >= 0x16A0) && (code <= 0x16FF)));
+}
+
+/**
+ * xmlUCSIsShavian:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Shavian UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsShavian(int code) {
+ return(((code >= 0x10450) && (code <= 0x1047F)));
+}
+
+/**
+ * xmlUCSIsSinhala:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Sinhala UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSinhala(int code) {
+ return(((code >= 0x0D80) && (code <= 0x0DFF)));
+}
+
+/**
+ * xmlUCSIsSmallFormVariants:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SmallFormVariants UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSmallFormVariants(int code) {
+ return(((code >= 0xFE50) && (code <= 0xFE6F)));
+}
+
+/**
+ * xmlUCSIsSpacingModifierLetters:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SpacingModifierLetters UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSpacingModifierLetters(int code) {
+ return(((code >= 0x02B0) && (code <= 0x02FF)));
+}
+
+/**
+ * xmlUCSIsSpecials:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Specials UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSpecials(int code) {
+ return(((code >= 0xFFF0) && (code <= 0xFFFF)));
+}
+
+/**
+ * xmlUCSIsSuperscriptsandSubscripts:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SuperscriptsandSubscripts UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSuperscriptsandSubscripts(int code) {
+ return(((code >= 0x2070) && (code <= 0x209F)));
+}
+
+/**
+ * xmlUCSIsSupplementalArrowsA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SupplementalArrows-A UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSupplementalArrowsA(int code) {
+ return(((code >= 0x27F0) && (code <= 0x27FF)));
+}
+
+/**
+ * xmlUCSIsSupplementalArrowsB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SupplementalArrows-B UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSupplementalArrowsB(int code) {
+ return(((code >= 0x2900) && (code <= 0x297F)));
+}
+
+/**
+ * xmlUCSIsSupplementalMathematicalOperators:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SupplementalMathematicalOperators UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSupplementalMathematicalOperators(int code) {
+ return(((code >= 0x2A00) && (code <= 0x2AFF)));
+}
+
+/**
+ * xmlUCSIsSupplementaryPrivateUseAreaA:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSupplementaryPrivateUseAreaA(int code) {
+ return(((code >= 0xF0000) && (code <= 0xFFFFF)));
+}
+
+/**
+ * xmlUCSIsSupplementaryPrivateUseAreaB:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSupplementaryPrivateUseAreaB(int code) {
+ return(((code >= 0x100000) && (code <= 0x10FFFF)));
+}
+
+/**
+ * xmlUCSIsSyriac:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Syriac UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsSyriac(int code) {
+ return(((code >= 0x0700) && (code <= 0x074F)));
+}
+
+/**
+ * xmlUCSIsTagalog:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Tagalog UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTagalog(int code) {
+ return(((code >= 0x1700) && (code <= 0x171F)));
+}
+
+/**
+ * xmlUCSIsTagbanwa:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Tagbanwa UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTagbanwa(int code) {
+ return(((code >= 0x1760) && (code <= 0x177F)));
+}
+
+/**
+ * xmlUCSIsTags:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Tags UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTags(int code) {
+ return(((code >= 0xE0000) && (code <= 0xE007F)));
+}
+
+/**
+ * xmlUCSIsTaiLe:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of TaiLe UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTaiLe(int code) {
+ return(((code >= 0x1950) && (code <= 0x197F)));
+}
+
+/**
+ * xmlUCSIsTaiXuanJingSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of TaiXuanJingSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTaiXuanJingSymbols(int code) {
+ return(((code >= 0x1D300) && (code <= 0x1D35F)));
+}
+
+/**
+ * xmlUCSIsTamil:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Tamil UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTamil(int code) {
+ return(((code >= 0x0B80) && (code <= 0x0BFF)));
+}
+
+/**
+ * xmlUCSIsTelugu:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Telugu UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTelugu(int code) {
+ return(((code >= 0x0C00) && (code <= 0x0C7F)));
+}
+
+/**
+ * xmlUCSIsThaana:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Thaana UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsThaana(int code) {
+ return(((code >= 0x0780) && (code <= 0x07BF)));
+}
+
+/**
+ * xmlUCSIsThai:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Thai UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsThai(int code) {
+ return(((code >= 0x0E00) && (code <= 0x0E7F)));
+}
+
+/**
+ * xmlUCSIsTibetan:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Tibetan UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsTibetan(int code) {
+ return(((code >= 0x0F00) && (code <= 0x0FFF)));
+}
+
+/**
+ * xmlUCSIsUgaritic:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Ugaritic UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsUgaritic(int code) {
+ return(((code >= 0x10380) && (code <= 0x1039F)));
+}
+
+/**
+ * xmlUCSIsUnifiedCanadianAboriginalSyllabics:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsUnifiedCanadianAboriginalSyllabics(int code) {
+ return(((code >= 0x1400) && (code <= 0x167F)));
+}
+
+/**
+ * xmlUCSIsVariationSelectors:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of VariationSelectors UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsVariationSelectors(int code) {
+ return(((code >= 0xFE00) && (code <= 0xFE0F)));
+}
+
+/**
+ * xmlUCSIsVariationSelectorsSupplement:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of VariationSelectorsSupplement UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsVariationSelectorsSupplement(int code) {
+ return(((code >= 0xE0100) && (code <= 0xE01EF)));
+}
+
+/**
+ * xmlUCSIsYiRadicals:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of YiRadicals UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsYiRadicals(int code) {
+ return(((code >= 0xA490) && (code <= 0xA4CF)));
+}
+
+/**
+ * xmlUCSIsYiSyllables:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of YiSyllables UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsYiSyllables(int code) {
+ return(((code >= 0xA000) && (code <= 0xA48F)));
+}
+
+/**
+ * xmlUCSIsYijingHexagramSymbols:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of YijingHexagramSymbols UCS Block
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsYijingHexagramSymbols(int code) {
+ return(((code >= 0x4DC0) && (code <= 0x4DFF)));
+}
+
+/**
+ * xmlUCSIsBlock:
+ * @code: UCS code point
+ * @block: UCS block name
+ *
+ * Check whether the character is part of the UCS Block
+ *
+ * Returns 1 if true, 0 if false and -1 on unknown block
+ */
+int
+xmlUCSIsBlock(int code, const char *block) {
+ xmlIntFunc *func;
+
+ func = xmlUnicodeLookup(&xmlUnicodeBlockTbl, block);
+ if (func == NULL)
+ return (-1);
+ return (func(code));
+}
+
+/**
+ * xmlUCSIsCatC:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of C UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatC(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlCG));
+}
+
+/**
+ * xmlUCSIsCatCc:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Cc UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatCc(int code) {
+ return(((code >= 0x0) && (code <= 0x1f)) ||
+ ((code >= 0x7f) && (code <= 0x9f)));
+}
+
+/**
+ * xmlUCSIsCatCf:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Cf UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatCf(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlCfG));
+}
+
+/**
+ * xmlUCSIsCatCo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Co UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatCo(int code) {
+ return((code == 0xe000) ||
+ (code == 0xf8ff) ||
+ (code == 0xf0000) ||
+ (code == 0xffffd) ||
+ (code == 0x100000) ||
+ (code == 0x10fffd));
+}
+
+/**
+ * xmlUCSIsCatCs:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Cs UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatCs(int code) {
+ return((code == 0xd800) ||
+ ((code >= 0xdb7f) && (code <= 0xdb80)) ||
+ ((code >= 0xdbff) && (code <= 0xdc00)) ||
+ (code == 0xdfff));
+}
+
+/**
+ * xmlUCSIsCatL:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of L UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatL(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLG));
+}
+
+/**
+ * xmlUCSIsCatLl:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Ll UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatLl(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLlG));
+}
+
+/**
+ * xmlUCSIsCatLm:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Lm UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatLm(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLmG));
+}
+
+/**
+ * xmlUCSIsCatLo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Lo UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatLo(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLoG));
+}
+
+/**
+ * xmlUCSIsCatLt:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Lt UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatLt(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLtG));
+}
+
+/**
+ * xmlUCSIsCatLu:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Lu UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatLu(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlLuG));
+}
+
+/**
+ * xmlUCSIsCatM:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of M UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatM(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlMG));
+}
+
+/**
+ * xmlUCSIsCatMc:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Mc UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatMc(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlMcG));
+}
+
+/**
+ * xmlUCSIsCatMe:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Me UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatMe(int code) {
+ return(((code >= 0x488) && (code <= 0x489)) ||
+ (code == 0x6de) ||
+ ((code >= 0x20dd) && (code <= 0x20e0)) ||
+ ((code >= 0x20e2) && (code <= 0x20e4)));
+}
+
+/**
+ * xmlUCSIsCatMn:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Mn UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatMn(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlMnG));
+}
+
+/**
+ * xmlUCSIsCatN:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of N UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatN(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlNG));
+}
+
+/**
+ * xmlUCSIsCatNd:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Nd UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatNd(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlNdG));
+}
+
+/**
+ * xmlUCSIsCatNl:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Nl UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatNl(int code) {
+ return(((code >= 0x16ee) && (code <= 0x16f0)) ||
+ ((code >= 0x2160) && (code <= 0x2183)) ||
+ (code == 0x3007) ||
+ ((code >= 0x3021) && (code <= 0x3029)) ||
+ ((code >= 0x3038) && (code <= 0x303a)) ||
+ (code == 0x1034a));
+}
+
+/**
+ * xmlUCSIsCatNo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of No UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatNo(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlNoG));
+}
+
+/**
+ * xmlUCSIsCatP:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of P UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatP(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlPG));
+}
+
+/**
+ * xmlUCSIsCatPc:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Pc UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPc(int code) {
+ return((code == 0x5f) ||
+ ((code >= 0x203f) && (code <= 0x2040)) ||
+ (code == 0x2054) ||
+ (code == 0x30fb) ||
+ ((code >= 0xfe33) && (code <= 0xfe34)) ||
+ ((code >= 0xfe4d) && (code <= 0xfe4f)) ||
+ (code == 0xff3f) ||
+ (code == 0xff65));
+}
+
+/**
+ * xmlUCSIsCatPd:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Pd UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPd(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlPdG));
+}
+
+/**
+ * xmlUCSIsCatPe:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Pe UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPe(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlPeG));
+}
+
+/**
+ * xmlUCSIsCatPf:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Pf UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPf(int code) {
+ return((code == 0xbb) ||
+ (code == 0x2019) ||
+ (code == 0x201d) ||
+ (code == 0x203a));
+}
+
+/**
+ * xmlUCSIsCatPi:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Pi UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPi(int code) {
+ return((code == 0xab) ||
+ (code == 0x2018) ||
+ ((code >= 0x201b) && (code <= 0x201c)) ||
+ (code == 0x201f) ||
+ (code == 0x2039));
+}
+
+/**
+ * xmlUCSIsCatPo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Po UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPo(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlPoG));
+}
+
+/**
+ * xmlUCSIsCatPs:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Ps UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatPs(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlPsG));
+}
+
+/**
+ * xmlUCSIsCatS:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of S UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatS(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlSG));
+}
+
+/**
+ * xmlUCSIsCatSc:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Sc UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatSc(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlScG));
+}
+
+/**
+ * xmlUCSIsCatSk:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Sk UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatSk(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlSkG));
+}
+
+/**
+ * xmlUCSIsCatSm:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Sm UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatSm(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlSmG));
+}
+
+/**
+ * xmlUCSIsCatSo:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of So UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatSo(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlSoG));
+}
+
+/**
+ * xmlUCSIsCatZ:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Z UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatZ(int code) {
+ return(xmlCharInRange((unsigned int)code, &xmlZG));
+}
+
+/**
+ * xmlUCSIsCatZl:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Zl UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatZl(int code) {
+ return((code == 0x2028));
+}
+
+/**
+ * xmlUCSIsCatZp:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Zp UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatZp(int code) {
+ return((code == 0x2029));
+}
+
+/**
+ * xmlUCSIsCatZs:
+ * @code: UCS code point
+ *
+ * Check whether the character is part of Zs UCS Category
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlUCSIsCatZs(int code) {
+ return((code == 0x20) ||
+ (code == 0xa0) ||
+ (code == 0x1680) ||
+ (code == 0x180e) ||
+ ((code >= 0x2000) && (code <= 0x200a)) ||
+ (code == 0x202f) ||
+ (code == 0x205f) ||
+ (code == 0x3000));
+}
+
+/**
+ * xmlUCSIsCat:
+ * @code: UCS code point
+ * @cat: UCS Category name
+ *
+ * Check whether the character is part of the UCS Category
+ *
+ * Returns 1 if true, 0 if false and -1 on unknown category
+ */
+int
+xmlUCSIsCat(int code, const char *cat) {
+ xmlIntFunc *func;
+
+ func = xmlUnicodeLookup(&xmlUnicodeCatTbl, cat);
+ if (func == NULL)
+ return (-1);
+ return (func(code));
+}
+
+#define bottom_xmlunicode
+#include "elfgcchack.h"
+#endif /* LIBXML_UNICODE_ENABLED */
diff --git a/xmlwriter.c b/xmlwriter.c
new file mode 100644
index 0000000..fac20ac
--- /dev/null
+++ b/xmlwriter.c
@@ -0,0 +1,4743 @@
+
+/*
+ * xmlwriter.c: XML text writer implementation
+ *
+ * For license and disclaimer see the license and disclaimer of
+ * libxml2.
+ *
+ * alfred@mickautsch.de
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+#include <string.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/uri.h>
+#include <libxml/HTMLtree.h>
+
+#ifdef LIBXML_WRITER_ENABLED
+
+#include <libxml/xmlwriter.h>
+
+#include "buf.h"
+#include "enc.h"
+#include "save.h"
+
+#define B64LINELEN 72
+#define B64CRLF "\r\n"
+
+/*
+ * The following VA_COPY was coded following an example in
+ * the Samba project. It may not be sufficient for some
+ * esoteric implementations of va_list but (hopefully) will
+ * be sufficient for libxml2.
+ */
+#ifndef VA_COPY
+ #ifdef HAVE_VA_COPY
+ #define VA_COPY(dest, src) va_copy(dest, src)
+ #else
+ #ifdef HAVE___VA_COPY
+ #define VA_COPY(dest,src) __va_copy(dest, src)
+ #else
+ #ifndef VA_LIST_IS_ARRAY
+ #define VA_COPY(dest,src) (dest) = (src)
+ #else
+ #include <string.h>
+ #define VA_COPY(dest,src) memcpy((char *)(dest),(char *)(src),sizeof(va_list))
+ #endif
+ #endif
+ #endif
+#endif
+
+/*
+ * Types are kept private
+ */
+typedef enum {
+ XML_TEXTWRITER_NONE = 0,
+ XML_TEXTWRITER_NAME,
+ XML_TEXTWRITER_ATTRIBUTE,
+ XML_TEXTWRITER_TEXT,
+ XML_TEXTWRITER_PI,
+ XML_TEXTWRITER_PI_TEXT,
+ XML_TEXTWRITER_CDATA,
+ XML_TEXTWRITER_DTD,
+ XML_TEXTWRITER_DTD_TEXT,
+ XML_TEXTWRITER_DTD_ELEM,
+ XML_TEXTWRITER_DTD_ELEM_TEXT,
+ XML_TEXTWRITER_DTD_ATTL,
+ XML_TEXTWRITER_DTD_ATTL_TEXT,
+ XML_TEXTWRITER_DTD_ENTY, /* entity */
+ XML_TEXTWRITER_DTD_ENTY_TEXT,
+ XML_TEXTWRITER_DTD_PENT, /* parameter entity */
+ XML_TEXTWRITER_COMMENT
+} xmlTextWriterState;
+
+typedef struct _xmlTextWriterStackEntry xmlTextWriterStackEntry;
+
+struct _xmlTextWriterStackEntry {
+ xmlChar *name;
+ xmlTextWriterState state;
+};
+
+typedef struct _xmlTextWriterNsStackEntry xmlTextWriterNsStackEntry;
+struct _xmlTextWriterNsStackEntry {
+ xmlChar *prefix;
+ xmlChar *uri;
+ xmlLinkPtr elem;
+};
+
+struct _xmlTextWriter {
+ xmlOutputBufferPtr out; /* output buffer */
+ xmlListPtr nodes; /* element name stack */
+ xmlListPtr nsstack; /* name spaces stack */
+ int level;
+ int indent; /* enable indent */
+ int doindent; /* internal indent flag */
+ xmlChar *ichar; /* indent character */
+ char qchar; /* character used for quoting attribute values */
+ xmlParserCtxtPtr ctxt;
+ int no_doc_free;
+ xmlDocPtr doc;
+};
+
+static void xmlFreeTextWriterStackEntry(xmlLinkPtr lk);
+static int xmlCmpTextWriterStackEntry(const void *data0,
+ const void *data1);
+static int xmlTextWriterOutputNSDecl(xmlTextWriterPtr writer);
+static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk);
+static int xmlCmpTextWriterNsStackEntry(const void *data0,
+ const void *data1);
+static int xmlTextWriterWriteDocCallback(void *context,
+ const xmlChar * str, int len);
+static int xmlTextWriterCloseDocCallback(void *context);
+
+static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr);
+static int xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len,
+ const unsigned char *data);
+static void xmlTextWriterStartDocumentCallback(void *ctx);
+static int xmlTextWriterWriteIndent(xmlTextWriterPtr writer);
+static int
+ xmlTextWriterHandleStateDependencies(xmlTextWriterPtr writer,
+ xmlTextWriterStackEntry * p);
+
+/**
+ * xmlWriterErrMsg:
+ * @ctxt: a writer context
+ * @error: the error number
+ * @msg: the error message
+ *
+ * Handle a writer error
+ */
+static void
+xmlWriterErrMsg(xmlTextWriterPtr ctxt, xmlParserErrors error,
+ const char *msg)
+{
+ if (ctxt != NULL) {
+ __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
+ NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
+ } else {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
+ XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
+ }
+}
+
+/**
+ * xmlWriterErrMsgInt:
+ * @ctxt: a writer context
+ * @error: the error number
+ * @msg: the error message
+ * @val: an int
+ *
+ * Handle a writer error
+ */
+static void
+xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error,
+ const char *msg, int val)
+{
+ if (ctxt != NULL) {
+ __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
+ NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
+ NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
+ } else {
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
+ XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
+ }
+}
+
+/**
+ * xmlNewTextWriter:
+ * @out: an xmlOutputBufferPtr
+ *
+ * Create a new xmlNewTextWriter structure using an xmlOutputBufferPtr
+ * NOTE: the @out parameter will be deallocated when the writer is closed
+ * (if the call succeed.)
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriter(xmlOutputBufferPtr out)
+{
+ xmlTextWriterPtr ret;
+
+ ret = (xmlTextWriterPtr) xmlMalloc(sizeof(xmlTextWriter));
+ if (ret == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriter : out of memory!\n");
+ return NULL;
+ }
+ memset(ret, 0, (size_t) sizeof(xmlTextWriter));
+
+ ret->nodes = xmlListCreate((xmlListDeallocator)
+ xmlFreeTextWriterStackEntry,
+ (xmlListDataCompare)
+ xmlCmpTextWriterStackEntry);
+ if (ret->nodes == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriter : out of memory!\n");
+ xmlFree(ret);
+ return NULL;
+ }
+
+ ret->nsstack = xmlListCreate((xmlListDeallocator)
+ xmlFreeTextWriterNsStackEntry,
+ (xmlListDataCompare)
+ xmlCmpTextWriterNsStackEntry);
+ if (ret->nsstack == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriter : out of memory!\n");
+ xmlListDelete(ret->nodes);
+ xmlFree(ret);
+ return NULL;
+ }
+
+ ret->out = out;
+ ret->ichar = xmlStrdup(BAD_CAST " ");
+ ret->qchar = '"';
+
+ if (!ret->ichar) {
+ xmlListDelete(ret->nodes);
+ xmlListDelete(ret->nsstack);
+ xmlFree(ret);
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriter : out of memory!\n");
+ return NULL;
+ }
+
+ ret->doc = xmlNewDoc(NULL);
+
+ ret->no_doc_free = 0;
+
+ return ret;
+}
+
+/**
+ * xmlNewTextWriterFilename:
+ * @uri: the URI of the resource for the output
+ * @compression: compress the output?
+ *
+ * Create a new xmlNewTextWriter structure with @uri as output
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriterFilename(const char *uri, int compression)
+{
+ xmlTextWriterPtr ret;
+ xmlOutputBufferPtr out;
+
+ out = xmlOutputBufferCreateFilename(uri, NULL, compression);
+ if (out == NULL) {
+ xmlWriterErrMsg(NULL, XML_IO_EIO,
+ "xmlNewTextWriterFilename : cannot open uri\n");
+ return NULL;
+ }
+
+ ret = xmlNewTextWriter(out);
+ if (ret == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriterFilename : out of memory!\n");
+ xmlOutputBufferClose(out);
+ return NULL;
+ }
+
+ ret->indent = 0;
+ ret->doindent = 0;
+ return ret;
+}
+
+/**
+ * xmlNewTextWriterMemory:
+ * @buf: xmlBufferPtr
+ * @compression: compress the output?
+ *
+ * Create a new xmlNewTextWriter structure with @buf as output
+ * TODO: handle compression
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriterMemory(xmlBufferPtr buf, int compression ATTRIBUTE_UNUSED)
+{
+ xmlTextWriterPtr ret;
+ xmlOutputBufferPtr out;
+
+/*::todo handle compression */
+ out = xmlOutputBufferCreateBuffer(buf, NULL);
+
+ if (out == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriterMemory : out of memory!\n");
+ return NULL;
+ }
+
+ ret = xmlNewTextWriter(out);
+ if (ret == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlNewTextWriterMemory : out of memory!\n");
+ xmlOutputBufferClose(out);
+ return NULL;
+ }
+
+ return ret;
+}
+
+/**
+ * xmlNewTextWriterPushParser:
+ * @ctxt: xmlParserCtxtPtr to hold the new XML document tree
+ * @compression: compress the output?
+ *
+ * Create a new xmlNewTextWriter structure with @ctxt as output
+ * NOTE: the @ctxt context will be freed with the resulting writer
+ * (if the call succeeds).
+ * TODO: handle compression
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt,
+ int compression ATTRIBUTE_UNUSED)
+{
+ xmlTextWriterPtr ret;
+ xmlOutputBufferPtr out;
+
+ if (ctxt == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterPushParser : invalid context!\n");
+ return NULL;
+ }
+
+ out = xmlOutputBufferCreateIO((xmlOutputWriteCallback)
+ xmlTextWriterWriteDocCallback,
+ (xmlOutputCloseCallback)
+ xmlTextWriterCloseDocCallback,
+ (void *) ctxt, NULL);
+ if (out == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterPushParser : error at xmlOutputBufferCreateIO!\n");
+ return NULL;
+ }
+
+ ret = xmlNewTextWriter(out);
+ if (ret == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterPushParser : error at xmlNewTextWriter!\n");
+ xmlOutputBufferClose(out);
+ return NULL;
+ }
+
+ ret->ctxt = ctxt;
+
+ return ret;
+}
+
+/**
+ * xmlNewTextWriterDoc:
+ * @doc: address of a xmlDocPtr to hold the new XML document tree
+ * @compression: compress the output?
+ *
+ * Create a new xmlNewTextWriter structure with @*doc as output
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriterDoc(xmlDocPtr * doc, int compression)
+{
+ xmlTextWriterPtr ret;
+ xmlSAXHandler saxHandler;
+ xmlParserCtxtPtr ctxt;
+
+ memset(&saxHandler, '\0', sizeof(saxHandler));
+ xmlSAX2InitDefaultSAXHandler(&saxHandler, 1);
+ saxHandler.startDocument = xmlTextWriterStartDocumentCallback;
+ saxHandler.startElement = xmlSAX2StartElement;
+ saxHandler.endElement = xmlSAX2EndElement;
+
+ ctxt = xmlCreatePushParserCtxt(&saxHandler, NULL, NULL, 0, NULL);
+ if (ctxt == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n");
+ return NULL;
+ }
+ /*
+ * For some reason this seems to completely break if node names
+ * are interned.
+ */
+ ctxt->dictNames = 0;
+
+ ctxt->myDoc = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION);
+ if (ctxt->myDoc == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterDoc : error at xmlNewDoc!\n");
+ return NULL;
+ }
+
+ ret = xmlNewTextWriterPushParser(ctxt, compression);
+ if (ret == NULL) {
+ xmlFreeDoc(ctxt->myDoc);
+ xmlFreeParserCtxt(ctxt);
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n");
+ return NULL;
+ }
+
+ xmlSetDocCompressMode(ctxt->myDoc, compression);
+
+ if (doc != NULL) {
+ *doc = ctxt->myDoc;
+ ret->no_doc_free = 1;
+ }
+
+ return ret;
+}
+
+/**
+ * xmlNewTextWriterTree:
+ * @doc: xmlDocPtr
+ * @node: xmlNodePtr or NULL for doc->children
+ * @compression: compress the output?
+ *
+ * Create a new xmlNewTextWriter structure with @doc as output
+ * starting at @node
+ *
+ * Returns the new xmlTextWriterPtr or NULL in case of error
+ */
+xmlTextWriterPtr
+xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node, int compression)
+{
+ xmlTextWriterPtr ret;
+ xmlSAXHandler saxHandler;
+ xmlParserCtxtPtr ctxt;
+
+ if (doc == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterTree : invalid document tree!\n");
+ return NULL;
+ }
+
+ memset(&saxHandler, '\0', sizeof(saxHandler));
+ xmlSAX2InitDefaultSAXHandler(&saxHandler, 1);
+ saxHandler.startDocument = xmlTextWriterStartDocumentCallback;
+ saxHandler.startElement = xmlSAX2StartElement;
+ saxHandler.endElement = xmlSAX2EndElement;
+
+ ctxt = xmlCreatePushParserCtxt(&saxHandler, NULL, NULL, 0, NULL);
+ if (ctxt == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n");
+ return NULL;
+ }
+ /*
+ * For some reason this seems to completely break if node names
+ * are interned.
+ */
+ ctxt->dictNames = 0;
+
+ ret = xmlNewTextWriterPushParser(ctxt, compression);
+ if (ret == NULL) {
+ xmlFreeParserCtxt(ctxt);
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n");
+ return NULL;
+ }
+
+ ctxt->myDoc = doc;
+ ctxt->node = node;
+ ret->no_doc_free = 1;
+
+ xmlSetDocCompressMode(doc, compression);
+
+ return ret;
+}
+
+/**
+ * xmlFreeTextWriter:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Deallocate all the resources associated to the writer
+ */
+void
+xmlFreeTextWriter(xmlTextWriterPtr writer)
+{
+ if (writer == NULL)
+ return;
+
+ if (writer->out != NULL)
+ xmlOutputBufferClose(writer->out);
+
+ if (writer->nodes != NULL)
+ xmlListDelete(writer->nodes);
+
+ if (writer->nsstack != NULL)
+ xmlListDelete(writer->nsstack);
+
+ if (writer->ctxt != NULL) {
+ if ((writer->ctxt->myDoc != NULL) && (writer->no_doc_free == 0)) {
+ xmlFreeDoc(writer->ctxt->myDoc);
+ writer->ctxt->myDoc = NULL;
+ }
+ xmlFreeParserCtxt(writer->ctxt);
+ }
+
+ if (writer->doc != NULL)
+ xmlFreeDoc(writer->doc);
+
+ if (writer->ichar != NULL)
+ xmlFree(writer->ichar);
+ xmlFree(writer);
+}
+
+/**
+ * xmlTextWriterStartDocument:
+ * @writer: the xmlTextWriterPtr
+ * @version: the xml version ("1.0") or NULL for default ("1.0")
+ * @encoding: the encoding or NULL for default
+ * @standalone: "yes" or "no" or NULL for default
+ *
+ * Start a new xml document
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version,
+ const char *encoding, const char *standalone)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlCharEncodingHandlerPtr encoder;
+
+ if ((writer == NULL) || (writer->out == NULL)) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartDocument : invalid writer!\n");
+ return -1;
+ }
+
+ lk = xmlListFront(writer->nodes);
+ if ((lk != NULL) && (xmlLinkGetData(lk) != NULL)) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartDocument : not allowed in this context!\n");
+ return -1;
+ }
+
+ encoder = NULL;
+ if (encoding != NULL) {
+ encoder = xmlFindCharEncodingHandler(encoding);
+ if (encoder == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDocument : out of memory!\n");
+ return -1;
+ }
+ }
+
+ writer->out->encoder = encoder;
+ if (encoder != NULL) {
+ if (writer->out->conv == NULL) {
+ writer->out->conv = xmlBufCreateSize(4000);
+ }
+ xmlCharEncOutput(writer->out, 1);
+ if ((writer->doc != NULL) && (writer->doc->encoding == NULL))
+ writer->doc->encoding = xmlStrdup((xmlChar *)writer->out->encoder->name);
+ } else
+ writer->out->conv = NULL;
+
+ sum = 0;
+ count = xmlOutputBufferWriteString(writer->out, "<?xml version=");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (version != 0)
+ count = xmlOutputBufferWriteString(writer->out, version);
+ else
+ count = xmlOutputBufferWriteString(writer->out, "1.0");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->out->encoder != 0) {
+ count = xmlOutputBufferWriteString(writer->out, " encoding=");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out,
+ writer->out->encoder->name);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (standalone != 0) {
+ count = xmlOutputBufferWriteString(writer->out, " standalone=");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, standalone);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "?>\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndDocument:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml document. All open elements are closed, and
+ * the content is flushed to the output.
+ *
+ * Returns the bytes written or -1 in case of error
+ */
+int
+xmlTextWriterEndDocument(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterEndDocument : invalid writer!\n");
+ return -1;
+ }
+
+ sum = 0;
+ while ((lk = xmlListFront(writer->nodes)) != NULL) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ break;
+ switch (p->state) {
+ case XML_TEXTWRITER_NAME:
+ case XML_TEXTWRITER_ATTRIBUTE:
+ case XML_TEXTWRITER_TEXT:
+ count = xmlTextWriterEndElement(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ case XML_TEXTWRITER_PI:
+ case XML_TEXTWRITER_PI_TEXT:
+ count = xmlTextWriterEndPI(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ case XML_TEXTWRITER_CDATA:
+ count = xmlTextWriterEndCDATA(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ case XML_TEXTWRITER_DTD:
+ case XML_TEXTWRITER_DTD_TEXT:
+ case XML_TEXTWRITER_DTD_ELEM:
+ case XML_TEXTWRITER_DTD_ELEM_TEXT:
+ case XML_TEXTWRITER_DTD_ATTL:
+ case XML_TEXTWRITER_DTD_ATTL_TEXT:
+ case XML_TEXTWRITER_DTD_ENTY:
+ case XML_TEXTWRITER_DTD_ENTY_TEXT:
+ case XML_TEXTWRITER_DTD_PENT:
+ count = xmlTextWriterEndDTD(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ case XML_TEXTWRITER_COMMENT:
+ count = xmlTextWriterEndComment(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ sum += xmlTextWriterFlush(writer);
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartComment:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Start an xml comment.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartComment(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartComment : invalid writer!\n");
+ return -1;
+ }
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_TEXT:
+ case XML_TEXTWRITER_NONE:
+ break;
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent) {
+ count =
+ xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ p->state = XML_TEXTWRITER_TEXT;
+ break;
+ default:
+ return -1;
+ }
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartElement : out of memory!\n");
+ return -1;
+ }
+
+ p->name = NULL;
+ p->state = XML_TEXTWRITER_COMMENT;
+
+ xmlListPushFront(writer->nodes, p);
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<!--");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndComment:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End the current xml coment.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndComment(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterEndComment : invalid writer!\n");
+ return -1;
+ }
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterEndComment : not allowed in this context!\n");
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_COMMENT:
+ count = xmlOutputBufferWriteString(writer->out, "-->");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatComment:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write an xml comment.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatComment(writer, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatComment:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write an xml comment.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteVFormatComment : invalid writer!\n");
+ return -1;
+ }
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteComment(writer, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteComment:
+ * @writer: the xmlTextWriterPtr
+ * @content: comment string
+ *
+ * Write an xml comment.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartComment(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterWriteString(writer, content);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterEndComment(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: element name
+ *
+ * Start an xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartElement(xmlTextWriterPtr writer, const xmlChar * name)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_PI:
+ case XML_TEXTWRITER_PI_TEXT:
+ return -1;
+ case XML_TEXTWRITER_NONE:
+ break;
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent)
+ count =
+ xmlOutputBufferWriteString(writer->out, "\n");
+ p->state = XML_TEXTWRITER_TEXT;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartElement : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(name);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartElement : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->state = XML_TEXTWRITER_NAME;
+
+ xmlListPushFront(writer->nodes, p);
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) p->name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartElementNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix or NULL
+ * @name: element local name
+ * @namespaceURI: namespace URI or NULL
+ *
+ * Start an xml element with namespace support.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix, const xmlChar * name,
+ const xmlChar * namespaceURI)
+{
+ int count;
+ int sum;
+ xmlChar *buf;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ buf = NULL;
+ if (prefix != 0) {
+ buf = xmlStrdup(prefix);
+ buf = xmlStrcat(buf, BAD_CAST ":");
+ }
+ buf = xmlStrcat(buf, name);
+
+ sum = 0;
+ count = xmlTextWriterStartElement(writer, buf);
+ xmlFree(buf);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ if (namespaceURI != 0) {
+ xmlTextWriterNsStackEntry *p = (xmlTextWriterNsStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterNsStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartElementNS : out of memory!\n");
+ return -1;
+ }
+
+ buf = xmlStrdup(BAD_CAST "xmlns");
+ if (prefix != 0) {
+ buf = xmlStrcat(buf, BAD_CAST ":");
+ buf = xmlStrcat(buf, prefix);
+ }
+
+ p->prefix = buf;
+ p->uri = xmlStrdup(namespaceURI);
+ if (p->uri == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartElementNS : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->elem = xmlListFront(writer->nodes);
+
+ xmlListPushFront(writer->nsstack, p);
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndElement:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End the current xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndElement(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ xmlListDelete(writer->nsstack);
+ writer->nsstack = NULL;
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0) {
+ xmlListDelete(writer->nsstack);
+ writer->nsstack = NULL;
+ return -1;
+ }
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0) {
+ xmlListDelete(writer->nsstack);
+ writer->nsstack = NULL;
+ return -1;
+ }
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ if (writer->indent) /* next element needs indent */
+ writer->doindent = 1;
+ count = xmlOutputBufferWriteString(writer->out, "/>");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ case XML_TEXTWRITER_TEXT:
+ if ((writer->indent) && (writer->doindent)) {
+ count = xmlTextWriterWriteIndent(writer);
+ sum += count;
+ writer->doindent = 1;
+ } else
+ writer->doindent = 1;
+ count = xmlOutputBufferWriteString(writer->out, "</");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out,
+ (const char *) p->name);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterFullEndElement:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End the current xml element. Writes an end tag even if the element is empty
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterFullEndElement(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent)
+ writer->doindent = 0;
+ /* fallthrough */
+ case XML_TEXTWRITER_TEXT:
+ if ((writer->indent) && (writer->doindent)) {
+ count = xmlTextWriterWriteIndent(writer);
+ sum += count;
+ writer->doindent = 1;
+ } else
+ writer->doindent = 1;
+ count = xmlOutputBufferWriteString(writer->out, "</");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out,
+ (const char *) p->name);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatRaw:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted raw xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer, const char *format,
+ ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatRaw(writer, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatRaw:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted raw xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer, const char *format,
+ va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteRaw(writer, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteRawLen:
+ * @writer: the xmlTextWriterPtr
+ * @content: text string
+ * @len: length of the text string
+ *
+ * Write an xml text.
+ * TODO: what about entities and special chars??
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteRawLen(xmlTextWriterPtr writer, const xmlChar * content,
+ int len)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteRawLen : invalid writer!\n");
+ return -1;
+ }
+
+ if ((content == NULL) || (len < 0)) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteRawLen : invalid content!\n");
+ return -1;
+ }
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ count = xmlTextWriterHandleStateDependencies(writer, p);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (writer->indent)
+ writer->doindent = 0;
+
+ if (content != NULL) {
+ count =
+ xmlOutputBufferWrite(writer->out, len, (const char *) content);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteRaw:
+ * @writer: the xmlTextWriterPtr
+ * @content: text string
+ *
+ * Write a raw xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteRaw(xmlTextWriterPtr writer, const xmlChar * content)
+{
+ return xmlTextWriterWriteRawLen(writer, content, xmlStrlen(content));
+}
+
+/**
+ * xmlTextWriterWriteFormatString:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatString(xmlTextWriterPtr writer, const char *format,
+ ...)
+{
+ int rc;
+ va_list ap;
+
+ if ((writer == NULL) || (format == NULL))
+ return -1;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatString(writer, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatString:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatString(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if ((writer == NULL) || (format == NULL))
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteString(writer, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteString:
+ * @writer: the xmlTextWriterPtr
+ * @content: text string
+ *
+ * Write an xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+ xmlChar *buf;
+
+ if ((writer == NULL) || (content == NULL))
+ return -1;
+
+ sum = 0;
+ buf = (xmlChar *) content;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_NAME:
+ case XML_TEXTWRITER_TEXT:
+#if 0
+ buf = NULL;
+ xmlOutputBufferWriteEscape(writer->out, content, NULL);
+#endif
+ buf = xmlEncodeSpecialChars(NULL, content);
+ break;
+ case XML_TEXTWRITER_ATTRIBUTE:
+ buf = NULL;
+ xmlBufAttrSerializeTxtContent(writer->out->buffer,
+ writer->doc, NULL, content);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ if (buf != NULL) {
+ count = xmlTextWriterWriteRaw(writer, buf);
+
+ if (buf != content) /* buf was allocated by us, so free it */
+ xmlFree(buf);
+
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlOutputBufferWriteBase64:
+ * @out: the xmlOutputBufferPtr
+ * @data: binary data
+ * @len: the number of bytes to encode
+ *
+ * Write base64 encoded data to an xmlOutputBuffer.
+ * Adapted from John Walker's base64.c (http://www.fourmilab.ch/).
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+static int
+xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len,
+ const unsigned char *data)
+{
+ static unsigned char dtable[64] =
+ {'A','B','C','D','E','F','G','H','I','J','K','L','M',
+ 'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
+ 'a','b','c','d','e','f','g','h','i','j','k','l','m',
+ 'n','o','p','q','r','s','t','u','v','w','x','y','z',
+ '0','1','2','3','4','5','6','7','8','9','+','/'};
+
+ int i;
+ int linelen;
+ int count;
+ int sum;
+
+ if ((out == NULL) || (len < 0) || (data == NULL))
+ return(-1);
+
+ linelen = 0;
+ sum = 0;
+
+ i = 0;
+ while (1) {
+ unsigned char igroup[3];
+ unsigned char ogroup[4];
+ int c;
+ int n;
+
+ igroup[0] = igroup[1] = igroup[2] = 0;
+ for (n = 0; n < 3 && i < len; n++, i++) {
+ c = data[i];
+ igroup[n] = (unsigned char) c;
+ }
+
+ if (n > 0) {
+ ogroup[0] = dtable[igroup[0] >> 2];
+ ogroup[1] = dtable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)];
+ ogroup[2] =
+ dtable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)];
+ ogroup[3] = dtable[igroup[2] & 0x3F];
+
+ if (n < 3) {
+ ogroup[3] = '=';
+ if (n < 2) {
+ ogroup[2] = '=';
+ }
+ }
+
+ if (linelen >= B64LINELEN) {
+ count = xmlOutputBufferWrite(out, 2, B64CRLF);
+ if (count == -1)
+ return -1;
+ sum += count;
+ linelen = 0;
+ }
+ count = xmlOutputBufferWrite(out, 4, (const char *) ogroup);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ linelen += 4;
+ }
+
+ if (i >= len)
+ break;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteBase64:
+ * @writer: the xmlTextWriterPtr
+ * @data: binary data
+ * @start: the position within the data of the first byte to encode
+ * @len: the number of bytes to encode
+ *
+ * Write an base64 encoded xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteBase64(xmlTextWriterPtr writer, const char *data,
+ int start, int len)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if ((writer == NULL) || (data == NULL) || (start < 0) || (len < 0))
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ count = xmlTextWriterHandleStateDependencies(writer, p);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ }
+
+ if (writer->indent)
+ writer->doindent = 0;
+
+ count =
+ xmlOutputBufferWriteBase64(writer->out, len,
+ (unsigned char *) data + start);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlOutputBufferWriteBinHex:
+ * @out: the xmlOutputBufferPtr
+ * @data: binary data
+ * @len: the number of bytes to encode
+ *
+ * Write hqx encoded data to an xmlOutputBuffer.
+ * ::todo
+ *
+ * Returns the bytes written (may be 0 because of buffering)
+ * or -1 in case of error
+ */
+static int
+xmlOutputBufferWriteBinHex(xmlOutputBufferPtr out,
+ int len, const unsigned char *data)
+{
+ int count;
+ int sum;
+ static char hex[16] =
+ {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
+ int i;
+
+ if ((out == NULL) || (data == NULL) || (len < 0)) {
+ return -1;
+ }
+
+ sum = 0;
+ for (i = 0; i < len; i++) {
+ count =
+ xmlOutputBufferWrite(out, 1,
+ (const char *) &hex[data[i] >> 4]);
+ if (count == -1)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWrite(out, 1,
+ (const char *) &hex[data[i] & 0xF]);
+ if (count == -1)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteBinHex:
+ * @writer: the xmlTextWriterPtr
+ * @data: binary data
+ * @start: the position within the data of the first byte to encode
+ * @len: the number of bytes to encode
+ *
+ * Write a BinHex encoded xml text.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteBinHex(xmlTextWriterPtr writer, const char *data,
+ int start, int len)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if ((writer == NULL) || (data == NULL) || (start < 0) || (len < 0))
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ count = xmlTextWriterHandleStateDependencies(writer, p);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ }
+
+ if (writer->indent)
+ writer->doindent = 0;
+
+ count =
+ xmlOutputBufferWriteBinHex(writer->out, len,
+ (unsigned char *) data + start);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartAttribute:
+ * @writer: the xmlTextWriterPtr
+ * @name: element name
+ *
+ * Start an xml attribute.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartAttribute(xmlTextWriterPtr writer, const xmlChar * name)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ switch (p->state) {
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ count = xmlOutputBufferWriteString(writer->out, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out,
+ (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, "=");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ p->state = XML_TEXTWRITER_ATTRIBUTE;
+ break;
+ default:
+ return -1;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartAttributeNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix or NULL
+ * @name: element local name
+ * @namespaceURI: namespace URI or NULL
+ *
+ * Start an xml attribute with namespace support.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix, const xmlChar * name,
+ const xmlChar * namespaceURI)
+{
+ int count;
+ int sum;
+ xmlChar *buf;
+ xmlTextWriterNsStackEntry *p;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ /* Handle namespace first in case of error */
+ if (namespaceURI != 0) {
+ xmlTextWriterNsStackEntry nsentry, *curns;
+
+ buf = xmlStrdup(BAD_CAST "xmlns");
+ if (prefix != 0) {
+ buf = xmlStrcat(buf, BAD_CAST ":");
+ buf = xmlStrcat(buf, prefix);
+ }
+
+ nsentry.prefix = buf;
+ nsentry.uri = (xmlChar *)namespaceURI;
+ nsentry.elem = xmlListFront(writer->nodes);
+
+ curns = (xmlTextWriterNsStackEntry *)xmlListSearch(writer->nsstack,
+ (void *)&nsentry);
+ if ((curns != NULL)) {
+ xmlFree(buf);
+ if (xmlStrcmp(curns->uri, namespaceURI) == 0) {
+ /* Namespace already defined on element skip */
+ buf = NULL;
+ } else {
+ /* Prefix mismatch so error out */
+ return -1;
+ }
+ }
+
+ /* Do not add namespace decl to list - it is already there */
+ if (buf != NULL) {
+ p = (xmlTextWriterNsStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterNsStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartAttributeNS : out of memory!\n");
+ return -1;
+ }
+
+ p->prefix = buf;
+ p->uri = xmlStrdup(namespaceURI);
+ if (p->uri == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartAttributeNS : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->elem = xmlListFront(writer->nodes);
+
+ xmlListPushFront(writer->nsstack, p);
+ }
+ }
+
+ buf = NULL;
+ if (prefix != 0) {
+ buf = xmlStrdup(prefix);
+ buf = xmlStrcat(buf, BAD_CAST ":");
+ }
+ buf = xmlStrcat(buf, name);
+
+ sum = 0;
+ count = xmlTextWriterStartAttribute(writer, buf);
+ xmlFree(buf);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndAttribute:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End the current xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndAttribute(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0) {
+ return -1;
+ }
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_ATTRIBUTE:
+ p->state = XML_TEXTWRITER_NAME;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0) {
+ return -1;
+ }
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatAttribute:
+ * @writer: the xmlTextWriterPtr
+ * @name: attribute name
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml attribute.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name, const char *format,
+ ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatAttribute(writer, name, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatAttribute:
+ * @writer: the xmlTextWriterPtr
+ * @name: attribute name
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml attribute.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteAttribute(writer, name, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteAttribute:
+ * @writer: the xmlTextWriterPtr
+ * @name: attribute name
+ * @content: attribute content
+ *
+ * Write an xml attribute.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartAttribute(writer, name);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterWriteString(writer, content);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatAttributeNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: attribute local name
+ * @namespaceURI: namespace URI
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml attribute.with namespace support
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatAttributeNS(writer, prefix, name,
+ namespaceURI, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatAttributeNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: attribute local name
+ * @namespaceURI: namespace URI
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml attribute.with namespace support
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteAttributeNS(writer, prefix, name, namespaceURI,
+ buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteAttributeNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: attribute local name
+ * @namespaceURI: namespace URI
+ * @content: attribute content
+ *
+ * Write an xml attribute.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix, const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ sum = 0;
+ count = xmlTextWriterStartAttributeNS(writer, prefix, name, namespaceURI);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterWriteString(writer, content);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: element name
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name, const char *format,
+ ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatElement(writer, name, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: element name
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name, const char *format,
+ va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteElement(writer, name, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: element name
+ * @content: element content
+ *
+ * Write an xml element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartElement(writer, name);
+ if (count == -1)
+ return -1;
+ sum += count;
+ if (content != NULL) {
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+ }
+ count = xmlTextWriterEndElement(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatElementNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: element local name
+ * @namespaceURI: namespace URI
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml element with namespace support.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatElementNS(writer, prefix, name,
+ namespaceURI, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatElementNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: element local name
+ * @namespaceURI: namespace URI
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml element with namespace support.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI,
+ buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteElementNS:
+ * @writer: the xmlTextWriterPtr
+ * @prefix: namespace prefix
+ * @name: element local name
+ * @namespaceURI: namespace URI
+ * @content: element content
+ *
+ * Write an xml element with namespace support.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix, const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ if ((writer == NULL) || (name == NULL) || (*name == '\0'))
+ return -1;
+
+ sum = 0;
+ count =
+ xmlTextWriterStartElementNS(writer, prefix, name, namespaceURI);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+ count = xmlTextWriterEndElement(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartPI:
+ * @writer: the xmlTextWriterPtr
+ * @target: PI target
+ *
+ * Start an xml PI.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartPI(xmlTextWriterPtr writer, const xmlChar * target)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if ((writer == NULL) || (target == NULL) || (*target == '\0'))
+ return -1;
+
+ if (xmlStrcasecmp(target, (const xmlChar *) "xml") == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartPI : target name [Xx][Mm][Ll] is reserved for xml standardization!\n");
+ return -1;
+ }
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ p->state = XML_TEXTWRITER_TEXT;
+ break;
+ case XML_TEXTWRITER_NONE:
+ case XML_TEXTWRITER_TEXT:
+ case XML_TEXTWRITER_DTD:
+ break;
+ case XML_TEXTWRITER_PI:
+ case XML_TEXTWRITER_PI_TEXT:
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartPI : nested PI!\n");
+ return -1;
+ default:
+ return -1;
+ }
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartPI : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(target);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartPI : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->state = XML_TEXTWRITER_PI;
+
+ xmlListPushFront(writer->nodes, p);
+
+ count = xmlOutputBufferWriteString(writer->out, "<?");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) p->name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndPI:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End the current xml PI.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndPI(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return 0;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return 0;
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_PI:
+ case XML_TEXTWRITER_PI_TEXT:
+ count = xmlOutputBufferWriteString(writer->out, "?>");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatPI:
+ * @writer: the xmlTextWriterPtr
+ * @target: PI target
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted PI.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer, const xmlChar * target,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatPI(writer, target, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatPI:
+ * @writer: the xmlTextWriterPtr
+ * @target: PI target
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml PI.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target, const char *format,
+ va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWritePI(writer, target, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWritePI:
+ * @writer: the xmlTextWriterPtr
+ * @target: PI target
+ * @content: PI content
+ *
+ * Write an xml PI.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWritePI(xmlTextWriterPtr writer, const xmlChar * target,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartPI(writer, target);
+ if (count == -1)
+ return -1;
+ sum += count;
+ if (content != 0) {
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+ }
+ count = xmlTextWriterEndPI(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartCDATA:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Start an xml CDATA section.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartCDATA(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_NONE:
+ case XML_TEXTWRITER_TEXT:
+ case XML_TEXTWRITER_PI:
+ case XML_TEXTWRITER_PI_TEXT:
+ break;
+ case XML_TEXTWRITER_ATTRIBUTE:
+ count = xmlTextWriterEndAttribute(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ p->state = XML_TEXTWRITER_TEXT;
+ break;
+ case XML_TEXTWRITER_CDATA:
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartCDATA : CDATA not allowed in this context!\n");
+ return -1;
+ default:
+ return -1;
+ }
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartCDATA : out of memory!\n");
+ return -1;
+ }
+
+ p->name = NULL;
+ p->state = XML_TEXTWRITER_CDATA;
+
+ xmlListPushFront(writer->nodes, p);
+
+ count = xmlOutputBufferWriteString(writer->out, "<![CDATA[");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndCDATA:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml CDATA section.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndCDATA(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_CDATA:
+ count = xmlOutputBufferWriteString(writer->out, "]]>");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatCDATA:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted xml CDATA.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer, const char *format,
+ ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatCDATA(writer, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatCDATA:
+ * @writer: the xmlTextWriterPtr
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted xml CDATA.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer, const char *format,
+ va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteCDATA(writer, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteCDATA:
+ * @writer: the xmlTextWriterPtr
+ * @content: CDATA content
+ *
+ * Write an xml CDATA.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteCDATA(xmlTextWriterPtr writer, const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartCDATA(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+ if (content != 0) {
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+ }
+ count = xmlTextWriterEndCDATA(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartDTD:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ *
+ * Start an xml DTD.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid, const xmlChar * sysid)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL || name == NULL || *name == '\0')
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if ((lk != NULL) && (xmlLinkGetData(lk) != NULL)) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartDTD : DTD allowed only in prolog!\n");
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTD : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(name);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTD : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->state = XML_TEXTWRITER_DTD;
+
+ xmlListPushFront(writer->nodes, p);
+
+ count = xmlOutputBufferWriteString(writer->out, "<!DOCTYPE ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ if (pubid != 0) {
+ if (sysid == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterStartDTD : system identifier needed!\n");
+ return -1;
+ }
+
+ if (writer->indent)
+ count = xmlOutputBufferWrite(writer->out, 1, "\n");
+ else
+ count = xmlOutputBufferWrite(writer->out, 1, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWriteString(writer->out, "PUBLIC ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) pubid);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (sysid != 0) {
+ if (pubid == 0) {
+ if (writer->indent)
+ count = xmlOutputBufferWrite(writer->out, 1, "\n");
+ else
+ count = xmlOutputBufferWrite(writer->out, 1, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, "SYSTEM ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ } else {
+ if (writer->indent)
+ count = xmlOutputBufferWriteString(writer->out, "\n ");
+ else
+ count = xmlOutputBufferWrite(writer->out, 1, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) sysid);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndDTD:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml DTD.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndDTD(xmlTextWriterPtr writer)
+{
+ int loop;
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ sum = 0;
+ loop = 1;
+ while (loop) {
+ lk = xmlListFront(writer->nodes);
+ if (lk == NULL)
+ break;
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ break;
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD_TEXT:
+ count = xmlOutputBufferWriteString(writer->out, "]");
+ if (count < 0)
+ return -1;
+ sum += count;
+ /* fallthrough */
+ case XML_TEXTWRITER_DTD:
+ count = xmlOutputBufferWriteString(writer->out, ">");
+
+ if (writer->indent) {
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ }
+
+ xmlListPopFront(writer->nodes);
+ break;
+ case XML_TEXTWRITER_DTD_ELEM:
+ case XML_TEXTWRITER_DTD_ELEM_TEXT:
+ count = xmlTextWriterEndDTDElement(writer);
+ break;
+ case XML_TEXTWRITER_DTD_ATTL:
+ case XML_TEXTWRITER_DTD_ATTL_TEXT:
+ count = xmlTextWriterEndDTDAttlist(writer);
+ break;
+ case XML_TEXTWRITER_DTD_ENTY:
+ case XML_TEXTWRITER_DTD_PENT:
+ case XML_TEXTWRITER_DTD_ENTY_TEXT:
+ count = xmlTextWriterEndDTDEntity(writer);
+ break;
+ case XML_TEXTWRITER_COMMENT:
+ count = xmlTextWriterEndComment(writer);
+ break;
+ default:
+ loop = 0;
+ continue;
+ }
+
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatDTD:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a DTD with a formatted markup declarations part.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid, const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatDTD(writer, name, pubid, sysid, format,
+ ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatDTD:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a DTD with a formatted markup declarations part.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteDTD(writer, name, pubid, sysid, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteDTD:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @subset: string content of the DTD
+ *
+ * Write a DTD.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid, const xmlChar * subset)
+{
+ int count;
+ int sum;
+
+ sum = 0;
+ count = xmlTextWriterStartDTD(writer, name, pubid, sysid);
+ if (count == -1)
+ return -1;
+ sum += count;
+ if (subset != 0) {
+ count = xmlTextWriterWriteString(writer, subset);
+ if (count == -1)
+ return -1;
+ sum += count;
+ }
+ count = xmlTextWriterEndDTD(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartDTDElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD element
+ *
+ * Start an xml DTD element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartDTDElement(xmlTextWriterPtr writer, const xmlChar * name)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL || name == NULL || *name == '\0')
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD:
+ count = xmlOutputBufferWriteString(writer->out, " [");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ p->state = XML_TEXTWRITER_DTD_TEXT;
+ /* fallthrough */
+ case XML_TEXTWRITER_DTD_TEXT:
+ case XML_TEXTWRITER_NONE:
+ break;
+ default:
+ return -1;
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDElement : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(name);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDElement : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->state = XML_TEXTWRITER_DTD_ELEM;
+
+ xmlListPushFront(writer->nodes, p);
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<!ELEMENT ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndDTDElement:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml DTD element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndDTDElement(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD_ELEM:
+ case XML_TEXTWRITER_DTD_ELEM_TEXT:
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatDTDElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD element
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted DTD element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatDTDElement(writer, name, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatDTDElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD element
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted DTD element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteDTDElement(writer, name, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteDTDElement:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD element
+ * @content: content of the element
+ *
+ * Write a DTD element.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name, const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ if (content == NULL)
+ return -1;
+
+ sum = 0;
+ count = xmlTextWriterStartDTDElement(writer, name);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterEndDTDElement(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartDTDAttlist:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD ATTLIST
+ *
+ * Start an xml DTD ATTLIST.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer, const xmlChar * name)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL || name == NULL || *name == '\0')
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD:
+ count = xmlOutputBufferWriteString(writer->out, " [");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ p->state = XML_TEXTWRITER_DTD_TEXT;
+ /* fallthrough */
+ case XML_TEXTWRITER_DTD_TEXT:
+ case XML_TEXTWRITER_NONE:
+ break;
+ default:
+ return -1;
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDAttlist : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(name);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDAttlist : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+ p->state = XML_TEXTWRITER_DTD_ATTL;
+
+ xmlListPushFront(writer->nodes, p);
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<!ATTLIST ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndDTDAttlist:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml DTD attribute list.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndDTDAttlist(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD_ATTL:
+ case XML_TEXTWRITER_DTD_ATTL_TEXT:
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatDTDAttlist:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD ATTLIST
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted DTD ATTLIST.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatDTDAttlist(writer, name, format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatDTDAttlist:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD ATTLIST
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted DTD ATTLIST.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteDTDAttlist(writer, name, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteDTDAttlist:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the DTD ATTLIST
+ * @content: content of the ATTLIST
+ *
+ * Write a DTD ATTLIST.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name, const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ if (content == NULL)
+ return -1;
+
+ sum = 0;
+ count = xmlTextWriterStartDTDAttlist(writer, name);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterEndDTDAttlist(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterStartDTDEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD ATTLIST
+ *
+ * Start an xml DTD ATTLIST.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
+ int pe, const xmlChar * name)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL || name == NULL || *name == '\0')
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk != 0) {
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD:
+ count = xmlOutputBufferWriteString(writer->out, " [");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent) {
+ count =
+ xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ p->state = XML_TEXTWRITER_DTD_TEXT;
+ /* fallthrough */
+ case XML_TEXTWRITER_DTD_TEXT:
+ case XML_TEXTWRITER_NONE:
+ break;
+ default:
+ return -1;
+ }
+ }
+ }
+
+ p = (xmlTextWriterStackEntry *)
+ xmlMalloc(sizeof(xmlTextWriterStackEntry));
+ if (p == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDElement : out of memory!\n");
+ return -1;
+ }
+
+ p->name = xmlStrdup(name);
+ if (p->name == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
+ "xmlTextWriterStartDTDElement : out of memory!\n");
+ xmlFree(p);
+ return -1;
+ }
+
+ if (pe != 0)
+ p->state = XML_TEXTWRITER_DTD_PENT;
+ else
+ p->state = XML_TEXTWRITER_DTD_ENTY;
+
+ xmlListPushFront(writer->nodes, p);
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<!ENTITY ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ if (pe != 0) {
+ count = xmlOutputBufferWriteString(writer->out, "% ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterEndDTDEntity:
+ * @writer: the xmlTextWriterPtr
+ *
+ * End an xml DTD entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL)
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0)
+ return -1;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD_ENTY_TEXT:
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ case XML_TEXTWRITER_DTD_ENTY:
+ case XML_TEXTWRITER_DTD_PENT:
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+ break;
+ default:
+ return -1;
+ }
+
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ xmlListPopFront(writer->nodes);
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteFormatDTDInternalEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD entity
+ * @format: format string (see printf)
+ * @...: extra parameters for the format
+ *
+ * Write a formatted DTD internal entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int XMLCDECL
+xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+{
+ int rc;
+ va_list ap;
+
+ va_start(ap, format);
+
+ rc = xmlTextWriterWriteVFormatDTDInternalEntity(writer, pe, name,
+ format, ap);
+
+ va_end(ap);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteVFormatDTDInternalEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD entity
+ * @format: format string (see printf)
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Write a formatted DTD internal entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+{
+ int rc;
+ xmlChar *buf;
+
+ if (writer == NULL)
+ return -1;
+
+ buf = xmlTextWriterVSprintf(format, argptr);
+ if (buf == NULL)
+ return -1;
+
+ rc = xmlTextWriterWriteDTDInternalEntity(writer, pe, name, buf);
+
+ xmlFree(buf);
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteDTDEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD entity
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @ndataid: the xml notation name.
+ * @content: content of the entity
+ *
+ * Write a DTD entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid,
+ const xmlChar * content)
+{
+ if ((content == NULL) && (pubid == NULL) && (sysid == NULL))
+ return -1;
+ if ((pe != 0) && (ndataid != NULL))
+ return -1;
+
+ if ((pubid == NULL) && (sysid == NULL))
+ return xmlTextWriterWriteDTDInternalEntity(writer, pe, name,
+ content);
+
+ return xmlTextWriterWriteDTDExternalEntity(writer, pe, name, pubid,
+ sysid, ndataid);
+}
+
+/**
+ * xmlTextWriterWriteDTDInternalEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD entity
+ * @content: content of the entity
+ *
+ * Write a DTD internal entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * content)
+{
+ int count;
+ int sum;
+
+ if ((name == NULL) || (*name == '\0') || (content == NULL))
+ return -1;
+
+ sum = 0;
+ count = xmlTextWriterStartDTDEntity(writer, pe, name);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterWriteString(writer, content);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterEndDTDEntity(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteDTDExternalEntity:
+ * @writer: the xmlTextWriterPtr
+ * @pe: TRUE if this is a parameter entity, FALSE if not
+ * @name: the name of the DTD entity
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @ndataid: the xml notation name.
+ *
+ * Write a DTD external entity. The entity must have been started with xmlTextWriterStartDTDEntity
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid)
+{
+ int count;
+ int sum;
+
+ if (((pubid == NULL) && (sysid == NULL)))
+ return -1;
+ if ((pe != 0) && (ndataid != NULL))
+ return -1;
+
+ sum = 0;
+ count = xmlTextWriterStartDTDEntity(writer, pe, name);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ count =
+ xmlTextWriterWriteDTDExternalEntityContents(writer, pubid, sysid,
+ ndataid);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlTextWriterEndDTDEntity(writer);
+ if (count == -1)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteDTDExternalEntityContents:
+ * @writer: the xmlTextWriterPtr
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ * @ndataid: the xml notation name.
+ *
+ * Write the contents of a DTD external entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr writer,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDTDExternalEntityContents: xmlTextWriterPtr invalid!\n");
+ return -1;
+ }
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDTDExternalEntityContents: you must call xmlTextWriterStartDTDEntity before the call to this function!\n");
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return -1;
+
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD_ENTY:
+ break;
+ case XML_TEXTWRITER_DTD_PENT:
+ if (ndataid != NULL) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDTDExternalEntityContents: notation not allowed with parameter entities!\n");
+ return -1;
+ }
+ break;
+ default:
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDTDExternalEntityContents: you must call xmlTextWriterStartDTDEntity before the call to this function!\n");
+ return -1;
+ }
+
+ if (pubid != 0) {
+ if (sysid == 0) {
+ xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDTDExternalEntityContents: system identifier needed!\n");
+ return -1;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, " PUBLIC ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) pubid);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (sysid != 0) {
+ if (pubid == 0) {
+ count = xmlOutputBufferWriteString(writer->out, " SYSTEM");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) sysid);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (ndataid != NULL) {
+ count = xmlOutputBufferWriteString(writer->out, " NDATA ");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ count =
+ xmlOutputBufferWriteString(writer->out,
+ (const char *) ndataid);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterWriteDTDNotation:
+ * @writer: the xmlTextWriterPtr
+ * @name: the name of the xml notation
+ * @pubid: the public identifier, which is an alternative to the system identifier
+ * @sysid: the system identifier, which is the URI of the DTD
+ *
+ * Write a DTD entity.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid, const xmlChar * sysid)
+{
+ int count;
+ int sum;
+ xmlLinkPtr lk;
+ xmlTextWriterStackEntry *p;
+
+ if (writer == NULL || name == NULL || *name == '\0')
+ return -1;
+
+ sum = 0;
+ lk = xmlListFront(writer->nodes);
+ if (lk == 0) {
+ return -1;
+ }
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p != 0) {
+ switch (p->state) {
+ case XML_TEXTWRITER_DTD:
+ count = xmlOutputBufferWriteString(writer->out, " [");
+ if (count < 0)
+ return -1;
+ sum += count;
+ if (writer->indent) {
+ count = xmlOutputBufferWriteString(writer->out, "\n");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ p->state = XML_TEXTWRITER_DTD_TEXT;
+ /* fallthrough */
+ case XML_TEXTWRITER_DTD_TEXT:
+ break;
+ default:
+ return -1;
+ }
+ }
+
+ if (writer->indent) {
+ count = xmlTextWriterWriteIndent(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, "<!NOTATION ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWriteString(writer->out, (const char *) name);
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ if (pubid != 0) {
+ count = xmlOutputBufferWriteString(writer->out, " PUBLIC ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) pubid);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ if (sysid != 0) {
+ if (pubid == 0) {
+ count = xmlOutputBufferWriteString(writer->out, " SYSTEM");
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+ count = xmlOutputBufferWriteString(writer->out, " ");
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count =
+ xmlOutputBufferWriteString(writer->out, (const char *) sysid);
+ if (count < 0)
+ return -1;
+ sum += count;
+ count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ count = xmlOutputBufferWriteString(writer->out, ">");
+ if (count < 0)
+ return -1;
+ sum += count;
+
+ return sum;
+}
+
+/**
+ * xmlTextWriterFlush:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Flush the output buffer.
+ *
+ * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
+ */
+int
+xmlTextWriterFlush(xmlTextWriterPtr writer)
+{
+ int count;
+
+ if (writer == NULL)
+ return -1;
+
+ if (writer->out == NULL)
+ count = 0;
+ else
+ count = xmlOutputBufferFlush(writer->out);
+
+ return count;
+}
+
+/**
+ * misc
+ */
+
+/**
+ * xmlFreeTextWriterStackEntry:
+ * @lk: the xmlLinkPtr
+ *
+ * Free callback for the xmlList.
+ */
+static void
+xmlFreeTextWriterStackEntry(xmlLinkPtr lk)
+{
+ xmlTextWriterStackEntry *p;
+
+ p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return;
+
+ if (p->name != 0)
+ xmlFree(p->name);
+ xmlFree(p);
+}
+
+/**
+ * xmlCmpTextWriterStackEntry:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Compare callback for the xmlList.
+ *
+ * Returns -1, 0, 1
+ */
+static int
+xmlCmpTextWriterStackEntry(const void *data0, const void *data1)
+{
+ xmlTextWriterStackEntry *p0;
+ xmlTextWriterStackEntry *p1;
+
+ if (data0 == data1)
+ return 0;
+
+ if (data0 == 0)
+ return -1;
+
+ if (data1 == 0)
+ return 1;
+
+ p0 = (xmlTextWriterStackEntry *) data0;
+ p1 = (xmlTextWriterStackEntry *) data1;
+
+ return xmlStrcmp(p0->name, p1->name);
+}
+
+/**
+ * misc
+ */
+
+/**
+ * xmlTextWriterOutputNSDecl:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Output the current namespace declarations.
+ */
+static int
+xmlTextWriterOutputNSDecl(xmlTextWriterPtr writer)
+{
+ xmlLinkPtr lk;
+ xmlTextWriterNsStackEntry *np;
+ int count;
+ int sum;
+
+ sum = 0;
+ while (!xmlListEmpty(writer->nsstack)) {
+ xmlChar *namespaceURI = NULL;
+ xmlChar *prefix = NULL;
+
+ lk = xmlListFront(writer->nsstack);
+ np = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk);
+
+ if (np != 0) {
+ namespaceURI = xmlStrdup(np->uri);
+ prefix = xmlStrdup(np->prefix);
+ }
+
+ xmlListPopFront(writer->nsstack);
+
+ if (np != 0) {
+ count = xmlTextWriterWriteAttribute(writer, prefix, namespaceURI);
+ xmlFree(namespaceURI);
+ xmlFree(prefix);
+
+ if (count < 0) {
+ xmlListDelete(writer->nsstack);
+ writer->nsstack = NULL;
+ return -1;
+ }
+ sum += count;
+ }
+ }
+ return sum;
+}
+
+/**
+ * xmlFreeTextWriterNsStackEntry:
+ * @lk: the xmlLinkPtr
+ *
+ * Free callback for the xmlList.
+ */
+static void
+xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk)
+{
+ xmlTextWriterNsStackEntry *p;
+
+ p = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk);
+ if (p == 0)
+ return;
+
+ if (p->prefix != 0)
+ xmlFree(p->prefix);
+ if (p->uri != 0)
+ xmlFree(p->uri);
+
+ xmlFree(p);
+}
+
+/**
+ * xmlCmpTextWriterNsStackEntry:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Compare callback for the xmlList.
+ *
+ * Returns -1, 0, 1
+ */
+static int
+xmlCmpTextWriterNsStackEntry(const void *data0, const void *data1)
+{
+ xmlTextWriterNsStackEntry *p0;
+ xmlTextWriterNsStackEntry *p1;
+ int rc;
+
+ if (data0 == data1)
+ return 0;
+
+ if (data0 == 0)
+ return -1;
+
+ if (data1 == 0)
+ return 1;
+
+ p0 = (xmlTextWriterNsStackEntry *) data0;
+ p1 = (xmlTextWriterNsStackEntry *) data1;
+
+ rc = xmlStrcmp(p0->prefix, p1->prefix);
+
+ if ((rc != 0) || (p0->elem != p1->elem))
+ rc = -1;
+
+ return rc;
+}
+
+/**
+ * xmlTextWriterWriteDocCallback:
+ * @context: the xmlBufferPtr
+ * @str: the data to write
+ * @len: the length of the data
+ *
+ * Write callback for the xmlOutputBuffer with target xmlBuffer
+ *
+ * Returns -1, 0, 1
+ */
+static int
+xmlTextWriterWriteDocCallback(void *context, const xmlChar * str, int len)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context;
+ int rc;
+
+ if ((rc = xmlParseChunk(ctxt, (const char *) str, len, 0)) != 0) {
+ xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDocCallback : XML error %d !\n",
+ rc);
+ return -1;
+ }
+
+ return len;
+}
+
+/**
+ * xmlTextWriterCloseDocCallback:
+ * @context: the xmlBufferPtr
+ *
+ * Close callback for the xmlOutputBuffer with target xmlBuffer
+ *
+ * Returns -1, 0, 1
+ */
+static int
+xmlTextWriterCloseDocCallback(void *context)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context;
+ int rc;
+
+ if ((rc = xmlParseChunk(ctxt, NULL, 0, 1)) != 0) {
+ xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR,
+ "xmlTextWriterWriteDocCallback : XML error %d !\n",
+ rc);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * xmlTextWriterVSprintf:
+ * @format: see printf
+ * @argptr: pointer to the first member of the variable argument list.
+ *
+ * Utility function for formatted output
+ *
+ * Returns a new xmlChar buffer with the data or NULL on error. This buffer must be freed.
+ */
+static xmlChar *
+xmlTextWriterVSprintf(const char *format, va_list argptr)
+{
+ int size;
+ int count;
+ xmlChar *buf;
+ va_list locarg;
+
+ size = BUFSIZ;
+ buf = (xmlChar *) xmlMalloc(size);
+ if (buf == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlTextWriterVSprintf : out of memory!\n");
+ return NULL;
+ }
+
+ VA_COPY(locarg, argptr);
+ while (((count = vsnprintf((char *) buf, size, format, locarg)) < 0)
+ || (count == size - 1) || (count == size) || (count > size)) {
+ va_end(locarg);
+ xmlFree(buf);
+ size += BUFSIZ;
+ buf = (xmlChar *) xmlMalloc(size);
+ if (buf == NULL) {
+ xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
+ "xmlTextWriterVSprintf : out of memory!\n");
+ return NULL;
+ }
+ VA_COPY(locarg, argptr);
+ }
+ va_end(locarg);
+
+ return buf;
+}
+
+/**
+ * xmlTextWriterStartDocumentCallback:
+ * @ctx: the user data (XML parser context)
+ *
+ * called at the start of document processing.
+ */
+static void
+xmlTextWriterStartDocumentCallback(void *ctx)
+{
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ xmlDocPtr doc;
+
+ if (ctxt->html) {
+#ifdef LIBXML_HTML_ENABLED
+ if (ctxt->myDoc == NULL)
+ ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL);
+ if (ctxt->myDoc == NULL) {
+ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+ ctxt->sax->error(ctxt->userData,
+ "SAX.startDocument(): out of memory\n");
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return;
+ }
+#else
+ xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
+ "libxml2 built without HTML support\n");
+ ctxt->errNo = XML_ERR_INTERNAL_ERROR;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return;
+#endif
+ } else {
+ doc = ctxt->myDoc;
+ if (doc == NULL)
+ doc = ctxt->myDoc = xmlNewDoc(ctxt->version);
+ if (doc != NULL) {
+ if (doc->children == NULL) {
+ if (ctxt->encoding != NULL)
+ doc->encoding = xmlStrdup(ctxt->encoding);
+ else
+ doc->encoding = NULL;
+ doc->standalone = ctxt->standalone;
+ }
+ } else {
+ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+ ctxt->sax->error(ctxt->userData,
+ "SAX.startDocument(): out of memory\n");
+ ctxt->errNo = XML_ERR_NO_MEMORY;
+ ctxt->instate = XML_PARSER_EOF;
+ ctxt->disableSAX = 1;
+ return;
+ }
+ }
+ if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) &&
+ (ctxt->input != NULL) && (ctxt->input->filename != NULL)) {
+ ctxt->myDoc->URL =
+ xmlCanonicPath((const xmlChar *) ctxt->input->filename);
+ if (ctxt->myDoc->URL == NULL)
+ ctxt->myDoc->URL =
+ xmlStrdup((const xmlChar *) ctxt->input->filename);
+ }
+}
+
+/**
+ * xmlTextWriterSetIndent:
+ * @writer: the xmlTextWriterPtr
+ * @indent: do indentation?
+ *
+ * Set indentation output. indent = 0 do not indentation. indent > 0 do indentation.
+ *
+ * Returns -1 on error or 0 otherwise.
+ */
+int
+xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent)
+{
+ if ((writer == NULL) || (indent < 0))
+ return -1;
+
+ writer->indent = indent;
+ writer->doindent = 1;
+
+ return 0;
+}
+
+/**
+ * xmlTextWriterSetIndentString:
+ * @writer: the xmlTextWriterPtr
+ * @str: the xmlChar string
+ *
+ * Set string indentation.
+ *
+ * Returns -1 on error or 0 otherwise.
+ */
+int
+xmlTextWriterSetIndentString(xmlTextWriterPtr writer, const xmlChar * str)
+{
+ if ((writer == NULL) || (!str))
+ return -1;
+
+ if (writer->ichar != NULL)
+ xmlFree(writer->ichar);
+ writer->ichar = xmlStrdup(str);
+
+ if (!writer->ichar)
+ return -1;
+ else
+ return 0;
+}
+
+/**
+ * xmlTextWriterSetQuoteChar:
+ * @writer: the xmlTextWriterPtr
+ * @quotechar: the quote character
+ *
+ * Set the character used for quoting attributes.
+ *
+ * Returns -1 on error or 0 otherwise.
+ */
+int
+xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar)
+{
+ if ((writer == NULL) || ((quotechar != '\'') && (quotechar != '"')))
+ return -1;
+
+ writer->qchar = quotechar;
+
+ return 0;
+}
+
+/**
+ * xmlTextWriterWriteIndent:
+ * @writer: the xmlTextWriterPtr
+ *
+ * Write indent string.
+ *
+ * Returns -1 on error or the number of strings written.
+ */
+static int
+xmlTextWriterWriteIndent(xmlTextWriterPtr writer)
+{
+ int lksize;
+ int i;
+ int ret;
+
+ lksize = xmlListSize(writer->nodes);
+ if (lksize < 1)
+ return (-1); /* list is empty */
+ for (i = 0; i < (lksize - 1); i++) {
+ ret = xmlOutputBufferWriteString(writer->out,
+ (const char *) writer->ichar);
+ if (ret == -1)
+ return (-1);
+ }
+
+ return (lksize - 1);
+}
+
+/**
+ * xmlTextWriterHandleStateDependencies:
+ * @writer: the xmlTextWriterPtr
+ * @p: the xmlTextWriterStackEntry
+ *
+ * Write state dependent strings.
+ *
+ * Returns -1 on error or the number of characters written.
+ */
+static int
+xmlTextWriterHandleStateDependencies(xmlTextWriterPtr writer,
+ xmlTextWriterStackEntry * p)
+{
+ int count;
+ int sum;
+ char extra[3];
+
+ if (writer == NULL)
+ return -1;
+
+ if (p == NULL)
+ return 0;
+
+ sum = 0;
+ extra[0] = extra[1] = extra[2] = '\0';
+ if (p != 0) {
+ sum = 0;
+ switch (p->state) {
+ case XML_TEXTWRITER_NAME:
+ /* Output namespace declarations */
+ count = xmlTextWriterOutputNSDecl(writer);
+ if (count < 0)
+ return -1;
+ sum += count;
+ extra[0] = '>';
+ p->state = XML_TEXTWRITER_TEXT;
+ break;
+ case XML_TEXTWRITER_PI:
+ extra[0] = ' ';
+ p->state = XML_TEXTWRITER_PI_TEXT;
+ break;
+ case XML_TEXTWRITER_DTD:
+ extra[0] = ' ';
+ extra[1] = '[';
+ p->state = XML_TEXTWRITER_DTD_TEXT;
+ break;
+ case XML_TEXTWRITER_DTD_ELEM:
+ extra[0] = ' ';
+ p->state = XML_TEXTWRITER_DTD_ELEM_TEXT;
+ break;
+ case XML_TEXTWRITER_DTD_ATTL:
+ extra[0] = ' ';
+ p->state = XML_TEXTWRITER_DTD_ATTL_TEXT;
+ break;
+ case XML_TEXTWRITER_DTD_ENTY:
+ case XML_TEXTWRITER_DTD_PENT:
+ extra[0] = ' ';
+ extra[1] = writer->qchar;
+ p->state = XML_TEXTWRITER_DTD_ENTY_TEXT;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (*extra != '\0') {
+ count = xmlOutputBufferWriteString(writer->out, extra);
+ if (count < 0)
+ return -1;
+ sum += count;
+ }
+
+ return sum;
+}
+
+#define bottom_xmlwriter
+#include "elfgcchack.h"
+#endif
diff --git a/xpath.c b/xpath.c
new file mode 100644
index 0000000..dc41ce6
--- /dev/null
+++ b/xpath.c
@@ -0,0 +1,15377 @@
+/*
+ * xpath.c: XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ *f
+ * Reference: W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ * Public reference:
+ * http://www.w3.org/TR/xpath
+ *
+ * See Copyright for the status of this software
+ *
+ * Author: daniel@veillard.com
+ *
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+#include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+#ifdef HAVE_FLOAT_H
+#include <float.h>
+#endif
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#include <libxml/xmlmemory.h>
+#include <libxml/tree.h>
+#include <libxml/valid.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/parserInternals.h>
+#include <libxml/hash.h>
+#ifdef LIBXML_XPTR_ENABLED
+#include <libxml/xpointer.h>
+#endif
+#ifdef LIBXML_DEBUG_ENABLED
+#include <libxml/debugXML.h>
+#endif
+#include <libxml/xmlerror.h>
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#ifdef LIBXML_PATTERN_ENABLED
+#include <libxml/pattern.h>
+#endif
+
+#include "buf.h"
+
+#ifdef LIBXML_PATTERN_ENABLED
+#define XPATH_STREAMING
+#endif
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/**
+ * WITH_TIM_SORT:
+ *
+ * Use the Timsort algorithm provided in timsort.h to sort
+ * nodeset as this is a great improvement over the old Shell sort
+ * used in xmlXPathNodeSetSort()
+ */
+#define WITH_TIM_SORT
+
+/*
+* XP_OPTIMIZED_NON_ELEM_COMPARISON:
+* If defined, this will use xmlXPathCmpNodesExt() instead of
+* xmlXPathCmpNodes(). The new function is optimized comparison of
+* non-element nodes; actually it will speed up comparison only if
+* xmlXPathOrderDocElems() was called in order to index the elements of
+* a tree in document order; Libxslt does such an indexing, thus it will
+* benefit from this optimization.
+*/
+#define XP_OPTIMIZED_NON_ELEM_COMPARISON
+
+/*
+* XP_OPTIMIZED_FILTER_FIRST:
+* If defined, this will optimize expressions like "key('foo', 'val')[b][1]"
+* in a way, that it stop evaluation at the first node.
+*/
+#define XP_OPTIMIZED_FILTER_FIRST
+
+/*
+* XP_DEBUG_OBJ_USAGE:
+* Internal flag to enable tracking of how much XPath objects have been
+* created.
+*/
+/* #define XP_DEBUG_OBJ_USAGE */
+
+/*
+ * XPATH_MAX_STEPS:
+ * when compiling an XPath expression we arbitrary limit the maximum
+ * number of step operation in the compiled expression. 1000000 is
+ * an insanely large value which should never be reached under normal
+ * circumstances
+ */
+#define XPATH_MAX_STEPS 1000000
+
+/*
+ * XPATH_MAX_STACK_DEPTH:
+ * when evaluating an XPath expression we arbitrary limit the maximum
+ * number of object allowed to be pushed on the stack. 1000000 is
+ * an insanely large value which should never be reached under normal
+ * circumstances
+ */
+#define XPATH_MAX_STACK_DEPTH 1000000
+
+/*
+ * XPATH_MAX_NODESET_LENGTH:
+ * when evaluating an XPath expression nodesets are created and we
+ * arbitrary limit the maximum length of those node set. 10000000 is
+ * an insanely large value which should never be reached under normal
+ * circumstances, one would first need to construct an in memory tree
+ * with more than 10 millions nodes.
+ */
+#define XPATH_MAX_NODESET_LENGTH 10000000
+
+/*
+ * TODO:
+ * There are a few spots where some tests are done which depend upon ascii
+ * data. These should be enhanced for full UTF8 support (see particularly
+ * any use of the macros IS_ASCII_CHARACTER and IS_ASCII_DIGIT)
+ */
+
+#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
+/**
+ * xmlXPathCmpNodesExt:
+ * @node1: the first node
+ * @node2: the second node
+ *
+ * Compare two nodes w.r.t document order.
+ * This one is optimized for handling of non-element nodes.
+ *
+ * Returns -2 in case of error 1 if first point < second point, 0 if
+ * it's the same node, -1 otherwise
+ */
+static int
+xmlXPathCmpNodesExt(xmlNodePtr node1, xmlNodePtr node2) {
+ int depth1, depth2;
+ int misc = 0, precedence1 = 0, precedence2 = 0;
+ xmlNodePtr miscNode1 = NULL, miscNode2 = NULL;
+ xmlNodePtr cur, root;
+ long l1, l2;
+
+ if ((node1 == NULL) || (node2 == NULL))
+ return(-2);
+
+ if (node1 == node2)
+ return(0);
+
+ /*
+ * a couple of optimizations which will avoid computations in most cases
+ */
+ switch (node1->type) {
+ case XML_ELEMENT_NODE:
+ if (node2->type == XML_ELEMENT_NODE) {
+ if ((0 > (long) node1->content) && /* TODO: Would a != 0 suffice here? */
+ (0 > (long) node2->content) &&
+ (node1->doc == node2->doc))
+ {
+ l1 = -((long) node1->content);
+ l2 = -((long) node2->content);
+ if (l1 < l2)
+ return(1);
+ if (l1 > l2)
+ return(-1);
+ } else
+ goto turtle_comparison;
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:
+ precedence1 = 1; /* element is owner */
+ miscNode1 = node1;
+ node1 = node1->parent;
+ misc = 1;
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE: {
+ miscNode1 = node1;
+ /*
+ * Find nearest element node.
+ */
+ if (node1->prev != NULL) {
+ do {
+ node1 = node1->prev;
+ if (node1->type == XML_ELEMENT_NODE) {
+ precedence1 = 3; /* element in prev-sibl axis */
+ break;
+ }
+ if (node1->prev == NULL) {
+ precedence1 = 2; /* element is parent */
+ /*
+ * URGENT TODO: Are there any cases, where the
+ * parent of such a node is not an element node?
+ */
+ node1 = node1->parent;
+ break;
+ }
+ } while (1);
+ } else {
+ precedence1 = 2; /* element is parent */
+ node1 = node1->parent;
+ }
+ if ((node1 == NULL) || (node1->type != XML_ELEMENT_NODE) ||
+ (0 <= (long) node1->content)) {
+ /*
+ * Fallback for whatever case.
+ */
+ node1 = miscNode1;
+ precedence1 = 0;
+ } else
+ misc = 1;
+ }
+ break;
+ case XML_NAMESPACE_DECL:
+ /*
+ * TODO: why do we return 1 for namespace nodes?
+ */
+ return(1);
+ default:
+ break;
+ }
+ switch (node2->type) {
+ case XML_ELEMENT_NODE:
+ break;
+ case XML_ATTRIBUTE_NODE:
+ precedence2 = 1; /* element is owner */
+ miscNode2 = node2;
+ node2 = node2->parent;
+ misc = 1;
+ break;
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE: {
+ miscNode2 = node2;
+ if (node2->prev != NULL) {
+ do {
+ node2 = node2->prev;
+ if (node2->type == XML_ELEMENT_NODE) {
+ precedence2 = 3; /* element in prev-sibl axis */
+ break;
+ }
+ if (node2->prev == NULL) {
+ precedence2 = 2; /* element is parent */
+ node2 = node2->parent;
+ break;
+ }
+ } while (1);
+ } else {
+ precedence2 = 2; /* element is parent */
+ node2 = node2->parent;
+ }
+ if ((node2 == NULL) || (node2->type != XML_ELEMENT_NODE) ||
+ (0 <= (long) node2->content))
+ {
+ node2 = miscNode2;
+ precedence2 = 0;
+ } else
+ misc = 1;
+ }
+ break;
+ case XML_NAMESPACE_DECL:
+ return(1);
+ default:
+ break;
+ }
+ if (misc) {
+ if (node1 == node2) {
+ if (precedence1 == precedence2) {
+ /*
+ * The ugly case; but normally there aren't many
+ * adjacent non-element nodes around.
+ */
+ cur = miscNode2->prev;
+ while (cur != NULL) {
+ if (cur == miscNode1)
+ return(1);
+ if (cur->type == XML_ELEMENT_NODE)
+ return(-1);
+ cur = cur->prev;
+ }
+ return (-1);
+ } else {
+ /*
+ * Evaluate based on higher precedence wrt to the element.
+ * TODO: This assumes attributes are sorted before content.
+ * Is this 100% correct?
+ */
+ if (precedence1 < precedence2)
+ return(1);
+ else
+ return(-1);
+ }
+ }
+ /*
+ * Special case: One of the helper-elements is contained by the other.
+ * <foo>
+ * <node2>
+ * <node1>Text-1(precedence1 == 2)</node1>
+ * </node2>
+ * Text-6(precedence2 == 3)
+ * </foo>
+ */
+ if ((precedence2 == 3) && (precedence1 > 1)) {
+ cur = node1->parent;
+ while (cur) {
+ if (cur == node2)
+ return(1);
+ cur = cur->parent;
+ }
+ }
+ if ((precedence1 == 3) && (precedence2 > 1)) {
+ cur = node2->parent;
+ while (cur) {
+ if (cur == node1)
+ return(-1);
+ cur = cur->parent;
+ }
+ }
+ }
+
+ /*
+ * Speedup using document order if availble.
+ */
+ if ((node1->type == XML_ELEMENT_NODE) &&
+ (node2->type == XML_ELEMENT_NODE) &&
+ (0 > (long) node1->content) &&
+ (0 > (long) node2->content) &&
+ (node1->doc == node2->doc)) {
+
+ l1 = -((long) node1->content);
+ l2 = -((long) node2->content);
+ if (l1 < l2)
+ return(1);
+ if (l1 > l2)
+ return(-1);
+ }
+
+turtle_comparison:
+
+ if (node1 == node2->prev)
+ return(1);
+ if (node1 == node2->next)
+ return(-1);
+ /*
+ * compute depth to root
+ */
+ for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
+ if (cur == node1)
+ return(1);
+ depth2++;
+ }
+ root = cur;
+ for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
+ if (cur == node2)
+ return(-1);
+ depth1++;
+ }
+ /*
+ * Distinct document (or distinct entities :-( ) case.
+ */
+ if (root != cur) {
+ return(-2);
+ }
+ /*
+ * get the nearest common ancestor.
+ */
+ while (depth1 > depth2) {
+ depth1--;
+ node1 = node1->parent;
+ }
+ while (depth2 > depth1) {
+ depth2--;
+ node2 = node2->parent;
+ }
+ while (node1->parent != node2->parent) {
+ node1 = node1->parent;
+ node2 = node2->parent;
+ /* should not happen but just in case ... */
+ if ((node1 == NULL) || (node2 == NULL))
+ return(-2);
+ }
+ /*
+ * Find who's first.
+ */
+ if (node1 == node2->prev)
+ return(1);
+ if (node1 == node2->next)
+ return(-1);
+ /*
+ * Speedup using document order if availble.
+ */
+ if ((node1->type == XML_ELEMENT_NODE) &&
+ (node2->type == XML_ELEMENT_NODE) &&
+ (0 > (long) node1->content) &&
+ (0 > (long) node2->content) &&
+ (node1->doc == node2->doc)) {
+
+ l1 = -((long) node1->content);
+ l2 = -((long) node2->content);
+ if (l1 < l2)
+ return(1);
+ if (l1 > l2)
+ return(-1);
+ }
+
+ for (cur = node1->next;cur != NULL;cur = cur->next)
+ if (cur == node2)
+ return(1);
+ return(-1); /* assume there is no sibling list corruption */
+}
+#endif /* XP_OPTIMIZED_NON_ELEM_COMPARISON */
+
+/*
+ * Wrapper for the Timsort argorithm from timsort.h
+ */
+#ifdef WITH_TIM_SORT
+#define SORT_NAME libxml_domnode
+#define SORT_TYPE xmlNodePtr
+/**
+ * wrap_cmp:
+ * @x: a node
+ * @y: another node
+ *
+ * Comparison function for the Timsort implementation
+ *
+ * Returns -2 in case of error -1 if first point < second point, 0 if
+ * it's the same node, +1 otherwise
+ */
+static
+int wrap_cmp( xmlNodePtr x, xmlNodePtr y );
+#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
+ static int wrap_cmp( xmlNodePtr x, xmlNodePtr y )
+ {
+ int res = xmlXPathCmpNodesExt(x, y);
+ return res == -2 ? res : -res;
+ }
+#else
+ static int wrap_cmp( xmlNodePtr x, xmlNodePtr y )
+ {
+ int res = xmlXPathCmpNodes(x, y);
+ return res == -2 ? res : -res;
+ }
+#endif
+#define SORT_CMP(x, y) (wrap_cmp(x, y))
+#include "timsort.h"
+#endif /* WITH_TIM_SORT */
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+
+/************************************************************************
+ * *
+ * Floating point stuff *
+ * *
+ ************************************************************************/
+
+#ifndef TRIO_REPLACE_STDIO
+#define TRIO_PUBLIC static
+#endif
+#include "trionan.c"
+
+/*
+ * The lack of portability of this section of the libc is annoying !
+ */
+double xmlXPathNAN = 0;
+double xmlXPathPINF = 1;
+double xmlXPathNINF = -1;
+static double xmlXPathNZERO = 0; /* not exported from headers */
+static int xmlXPathInitialized = 0;
+
+/**
+ * xmlXPathInit:
+ *
+ * Initialize the XPath environment
+ */
+void
+xmlXPathInit(void) {
+ if (xmlXPathInitialized) return;
+
+ xmlXPathPINF = trio_pinf();
+ xmlXPathNINF = trio_ninf();
+ xmlXPathNAN = trio_nan();
+ xmlXPathNZERO = trio_nzero();
+
+ xmlXPathInitialized = 1;
+}
+
+/**
+ * xmlXPathIsNaN:
+ * @val: a double value
+ *
+ * Provides a portable isnan() function to detect whether a double
+ * is a NotaNumber. Based on trio code
+ * http://sourceforge.net/projects/ctrio/
+ *
+ * Returns 1 if the value is a NaN, 0 otherwise
+ */
+int
+xmlXPathIsNaN(double val) {
+ return(trio_isnan(val));
+}
+
+/**
+ * xmlXPathIsInf:
+ * @val: a double value
+ *
+ * Provides a portable isinf() function to detect whether a double
+ * is a +Infinite or -Infinite. Based on trio code
+ * http://sourceforge.net/projects/ctrio/
+ *
+ * Returns 1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise
+ */
+int
+xmlXPathIsInf(double val) {
+ return(trio_isinf(val));
+}
+
+#endif /* SCHEMAS or XPATH */
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlXPathGetSign:
+ * @val: a double value
+ *
+ * Provides a portable function to detect the sign of a double
+ * Modified from trio code
+ * http://sourceforge.net/projects/ctrio/
+ *
+ * Returns 1 if the value is Negative, 0 if positive
+ */
+static int
+xmlXPathGetSign(double val) {
+ return(trio_signbit(val));
+}
+
+
+/*
+ * TODO: when compatibility allows remove all "fake node libxslt" strings
+ * the test should just be name[0] = ' '
+ */
+#ifdef DEBUG_XPATH_EXPRESSION
+#define DEBUG_STEP
+#define DEBUG_EXPR
+#define DEBUG_EVAL_COUNTS
+#endif
+
+static xmlNs xmlXPathXMLNamespaceStruct = {
+ NULL,
+ XML_NAMESPACE_DECL,
+ XML_XML_NAMESPACE,
+ BAD_CAST "xml",
+ NULL,
+ NULL
+};
+static xmlNsPtr xmlXPathXMLNamespace = &xmlXPathXMLNamespaceStruct;
+#ifndef LIBXML_THREAD_ENABLED
+/*
+ * Optimizer is disabled only when threaded apps are detected while
+ * the library ain't compiled for thread safety.
+ */
+static int xmlXPathDisableOptimizer = 0;
+#endif
+
+/************************************************************************
+ * *
+ * Error handling routines *
+ * *
+ ************************************************************************/
+
+/**
+ * XP_ERRORNULL:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return NULL.
+ */
+#define XP_ERRORNULL(X) \
+ { xmlXPathErr(ctxt, X); return(NULL); }
+
+/*
+ * The array xmlXPathErrorMessages corresponds to the enum xmlXPathError
+ */
+static const char *xmlXPathErrorMessages[] = {
+ "Ok\n",
+ "Number encoding\n",
+ "Unfinished literal\n",
+ "Start of literal\n",
+ "Expected $ for variable reference\n",
+ "Undefined variable\n",
+ "Invalid predicate\n",
+ "Invalid expression\n",
+ "Missing closing curly brace\n",
+ "Unregistered function\n",
+ "Invalid operand\n",
+ "Invalid type\n",
+ "Invalid number of arguments\n",
+ "Invalid context size\n",
+ "Invalid context position\n",
+ "Memory allocation error\n",
+ "Syntax error\n",
+ "Resource error\n",
+ "Sub resource error\n",
+ "Undefined namespace prefix\n",
+ "Encoding error\n",
+ "Char out of XML range\n",
+ "Invalid or incomplete context\n",
+ "Stack usage error\n",
+ "Forbidden variable\n",
+ "?? Unknown error ??\n" /* Must be last in the list! */
+};
+#define MAXERRNO ((int)(sizeof(xmlXPathErrorMessages) / \
+ sizeof(xmlXPathErrorMessages[0])) - 1)
+/**
+ * xmlXPathErrMemory:
+ * @ctxt: an XPath context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlXPathErrMemory(xmlXPathContextPtr ctxt, const char *extra)
+{
+ if (ctxt != NULL) {
+ if (extra) {
+ xmlChar buf[200];
+
+ xmlStrPrintf(buf, 200,
+ BAD_CAST "Memory allocation failed : %s\n",
+ extra);
+ ctxt->lastError.message = (char *) xmlStrdup(buf);
+ } else {
+ ctxt->lastError.message = (char *)
+ xmlStrdup(BAD_CAST "Memory allocation failed\n");
+ }
+ ctxt->lastError.domain = XML_FROM_XPATH;
+ ctxt->lastError.code = XML_ERR_NO_MEMORY;
+ if (ctxt->error != NULL)
+ ctxt->error(ctxt->userData, &ctxt->lastError);
+ } else {
+ if (extra)
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_XPATH,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0,
+ extra, NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+ else
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_XPATH,
+ XML_ERR_NO_MEMORY, XML_ERR_FATAL, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ "Memory allocation failed\n");
+ }
+}
+
+/**
+ * xmlXPathPErrMemory:
+ * @ctxt: an XPath parser context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlXPathPErrMemory(xmlXPathParserContextPtr ctxt, const char *extra)
+{
+ if (ctxt == NULL)
+ xmlXPathErrMemory(NULL, extra);
+ else {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ xmlXPathErrMemory(ctxt->context, extra);
+ }
+}
+
+/**
+ * xmlXPathErr:
+ * @ctxt: a XPath parser context
+ * @error: the error code
+ *
+ * Handle an XPath error
+ */
+void
+xmlXPathErr(xmlXPathParserContextPtr ctxt, int error)
+{
+ if ((error < 0) || (error > MAXERRNO))
+ error = MAXERRNO;
+ if (ctxt == NULL) {
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_XPATH,
+ error + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK,
+ XML_ERR_ERROR, NULL, 0,
+ NULL, NULL, NULL, 0, 0,
+ "%s", xmlXPathErrorMessages[error]);
+ return;
+ }
+ ctxt->error = error;
+ if (ctxt->context == NULL) {
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_XPATH,
+ error + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) ctxt->base, NULL, NULL,
+ ctxt->cur - ctxt->base, 0,
+ "%s", xmlXPathErrorMessages[error]);
+ return;
+ }
+
+ /* cleanup current last error */
+ xmlResetError(&ctxt->context->lastError);
+
+ ctxt->context->lastError.domain = XML_FROM_XPATH;
+ ctxt->context->lastError.code = error + XML_XPATH_EXPRESSION_OK -
+ XPATH_EXPRESSION_OK;
+ ctxt->context->lastError.level = XML_ERR_ERROR;
+ ctxt->context->lastError.str1 = (char *) xmlStrdup(ctxt->base);
+ ctxt->context->lastError.int1 = ctxt->cur - ctxt->base;
+ ctxt->context->lastError.node = ctxt->context->debugNode;
+ if (ctxt->context->error != NULL) {
+ ctxt->context->error(ctxt->context->userData,
+ &ctxt->context->lastError);
+ } else {
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, ctxt->context->debugNode, XML_FROM_XPATH,
+ error + XML_XPATH_EXPRESSION_OK - XPATH_EXPRESSION_OK,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) ctxt->base, NULL, NULL,
+ ctxt->cur - ctxt->base, 0,
+ "%s", xmlXPathErrorMessages[error]);
+ }
+
+}
+
+/**
+ * xmlXPatherror:
+ * @ctxt: the XPath Parser context
+ * @file: the file name
+ * @line: the line number
+ * @no: the error number
+ *
+ * Formats an error message.
+ */
+void
+xmlXPatherror(xmlXPathParserContextPtr ctxt, const char *file ATTRIBUTE_UNUSED,
+ int line ATTRIBUTE_UNUSED, int no) {
+ xmlXPathErr(ctxt, no);
+}
+
+/************************************************************************
+ * *
+ * Utilities *
+ * *
+ ************************************************************************/
+
+/**
+ * xsltPointerList:
+ *
+ * Pointer-list for various purposes.
+ */
+typedef struct _xmlPointerList xmlPointerList;
+typedef xmlPointerList *xmlPointerListPtr;
+struct _xmlPointerList {
+ void **items;
+ int number;
+ int size;
+};
+/*
+* TODO: Since such a list-handling is used in xmlschemas.c and libxslt
+* and here, we should make the functions public.
+*/
+static int
+xmlPointerListAddSize(xmlPointerListPtr list,
+ void *item,
+ int initialSize)
+{
+ if (list->items == NULL) {
+ if (initialSize <= 0)
+ initialSize = 1;
+ list->items = (void **) xmlMalloc(initialSize * sizeof(void *));
+ if (list->items == NULL) {
+ xmlXPathErrMemory(NULL,
+ "xmlPointerListCreate: allocating item\n");
+ return(-1);
+ }
+ list->number = 0;
+ list->size = initialSize;
+ } else if (list->size <= list->number) {
+ if (list->size > 50000000) {
+ xmlXPathErrMemory(NULL,
+ "xmlPointerListAddSize: re-allocating item\n");
+ return(-1);
+ }
+ list->size *= 2;
+ list->items = (void **) xmlRealloc(list->items,
+ list->size * sizeof(void *));
+ if (list->items == NULL) {
+ xmlXPathErrMemory(NULL,
+ "xmlPointerListAddSize: re-allocating item\n");
+ list->size = 0;
+ return(-1);
+ }
+ }
+ list->items[list->number++] = item;
+ return(0);
+}
+
+/**
+ * xsltPointerListCreate:
+ *
+ * Creates an xsltPointerList structure.
+ *
+ * Returns a xsltPointerList structure or NULL in case of an error.
+ */
+static xmlPointerListPtr
+xmlPointerListCreate(int initialSize)
+{
+ xmlPointerListPtr ret;
+
+ ret = xmlMalloc(sizeof(xmlPointerList));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL,
+ "xmlPointerListCreate: allocating item\n");
+ return (NULL);
+ }
+ memset(ret, 0, sizeof(xmlPointerList));
+ if (initialSize > 0) {
+ xmlPointerListAddSize(ret, NULL, initialSize);
+ ret->number = 0;
+ }
+ return (ret);
+}
+
+/**
+ * xsltPointerListFree:
+ *
+ * Frees the xsltPointerList structure. This does not free
+ * the content of the list.
+ */
+static void
+xmlPointerListFree(xmlPointerListPtr list)
+{
+ if (list == NULL)
+ return;
+ if (list->items != NULL)
+ xmlFree(list->items);
+ xmlFree(list);
+}
+
+/************************************************************************
+ * *
+ * Parser Types *
+ * *
+ ************************************************************************/
+
+/*
+ * Types are private:
+ */
+
+typedef enum {
+ XPATH_OP_END=0,
+ XPATH_OP_AND,
+ XPATH_OP_OR,
+ XPATH_OP_EQUAL,
+ XPATH_OP_CMP,
+ XPATH_OP_PLUS,
+ XPATH_OP_MULT,
+ XPATH_OP_UNION,
+ XPATH_OP_ROOT,
+ XPATH_OP_NODE,
+ XPATH_OP_RESET, /* 10 */
+ XPATH_OP_COLLECT,
+ XPATH_OP_VALUE, /* 12 */
+ XPATH_OP_VARIABLE,
+ XPATH_OP_FUNCTION,
+ XPATH_OP_ARG,
+ XPATH_OP_PREDICATE,
+ XPATH_OP_FILTER, /* 17 */
+ XPATH_OP_SORT /* 18 */
+#ifdef LIBXML_XPTR_ENABLED
+ ,XPATH_OP_RANGETO
+#endif
+} xmlXPathOp;
+
+typedef enum {
+ AXIS_ANCESTOR = 1,
+ AXIS_ANCESTOR_OR_SELF,
+ AXIS_ATTRIBUTE,
+ AXIS_CHILD,
+ AXIS_DESCENDANT,
+ AXIS_DESCENDANT_OR_SELF,
+ AXIS_FOLLOWING,
+ AXIS_FOLLOWING_SIBLING,
+ AXIS_NAMESPACE,
+ AXIS_PARENT,
+ AXIS_PRECEDING,
+ AXIS_PRECEDING_SIBLING,
+ AXIS_SELF
+} xmlXPathAxisVal;
+
+typedef enum {
+ NODE_TEST_NONE = 0,
+ NODE_TEST_TYPE = 1,
+ NODE_TEST_PI = 2,
+ NODE_TEST_ALL = 3,
+ NODE_TEST_NS = 4,
+ NODE_TEST_NAME = 5
+} xmlXPathTestVal;
+
+typedef enum {
+ NODE_TYPE_NODE = 0,
+ NODE_TYPE_COMMENT = XML_COMMENT_NODE,
+ NODE_TYPE_TEXT = XML_TEXT_NODE,
+ NODE_TYPE_PI = XML_PI_NODE
+} xmlXPathTypeVal;
+
+typedef struct _xmlXPathStepOp xmlXPathStepOp;
+typedef xmlXPathStepOp *xmlXPathStepOpPtr;
+struct _xmlXPathStepOp {
+ xmlXPathOp op; /* The identifier of the operation */
+ int ch1; /* First child */
+ int ch2; /* Second child */
+ int value;
+ int value2;
+ int value3;
+ void *value4;
+ void *value5;
+ void *cache;
+ void *cacheURI;
+};
+
+struct _xmlXPathCompExpr {
+ int nbStep; /* Number of steps in this expression */
+ int maxStep; /* Maximum number of steps allocated */
+ xmlXPathStepOp *steps; /* ops for computation of this expression */
+ int last; /* index of last step in expression */
+ xmlChar *expr; /* the expression being computed */
+ xmlDictPtr dict; /* the dictionnary to use if any */
+#ifdef DEBUG_EVAL_COUNTS
+ int nb;
+ xmlChar *string;
+#endif
+#ifdef XPATH_STREAMING
+ xmlPatternPtr stream;
+#endif
+};
+
+/************************************************************************
+ * *
+ * Forward declarations *
+ * *
+ ************************************************************************/
+static void
+xmlXPathFreeValueTree(xmlNodeSetPtr obj);
+static void
+xmlXPathReleaseObject(xmlXPathContextPtr ctxt, xmlXPathObjectPtr obj);
+static int
+xmlXPathCompOpEvalFirst(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op, xmlNodePtr *first);
+static int
+xmlXPathCompOpEvalToBoolean(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ int isPredicate);
+
+/************************************************************************
+ * *
+ * Parser Type functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathNewCompExpr:
+ *
+ * Create a new Xpath component
+ *
+ * Returns the newly allocated xmlXPathCompExprPtr or NULL in case of error
+ */
+static xmlXPathCompExprPtr
+xmlXPathNewCompExpr(void) {
+ xmlXPathCompExprPtr cur;
+
+ cur = (xmlXPathCompExprPtr) xmlMalloc(sizeof(xmlXPathCompExpr));
+ if (cur == NULL) {
+ xmlXPathErrMemory(NULL, "allocating component\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlXPathCompExpr));
+ cur->maxStep = 10;
+ cur->nbStep = 0;
+ cur->steps = (xmlXPathStepOp *) xmlMalloc(cur->maxStep *
+ sizeof(xmlXPathStepOp));
+ if (cur->steps == NULL) {
+ xmlXPathErrMemory(NULL, "allocating steps\n");
+ xmlFree(cur);
+ return(NULL);
+ }
+ memset(cur->steps, 0, cur->maxStep * sizeof(xmlXPathStepOp));
+ cur->last = -1;
+#ifdef DEBUG_EVAL_COUNTS
+ cur->nb = 0;
+#endif
+ return(cur);
+}
+
+/**
+ * xmlXPathFreeCompExpr:
+ * @comp: an XPATH comp
+ *
+ * Free up the memory allocated by @comp
+ */
+void
+xmlXPathFreeCompExpr(xmlXPathCompExprPtr comp)
+{
+ xmlXPathStepOpPtr op;
+ int i;
+
+ if (comp == NULL)
+ return;
+ if (comp->dict == NULL) {
+ for (i = 0; i < comp->nbStep; i++) {
+ op = &comp->steps[i];
+ if (op->value4 != NULL) {
+ if (op->op == XPATH_OP_VALUE)
+ xmlXPathFreeObject(op->value4);
+ else
+ xmlFree(op->value4);
+ }
+ if (op->value5 != NULL)
+ xmlFree(op->value5);
+ }
+ } else {
+ for (i = 0; i < comp->nbStep; i++) {
+ op = &comp->steps[i];
+ if (op->value4 != NULL) {
+ if (op->op == XPATH_OP_VALUE)
+ xmlXPathFreeObject(op->value4);
+ }
+ }
+ xmlDictFree(comp->dict);
+ }
+ if (comp->steps != NULL) {
+ xmlFree(comp->steps);
+ }
+#ifdef DEBUG_EVAL_COUNTS
+ if (comp->string != NULL) {
+ xmlFree(comp->string);
+ }
+#endif
+#ifdef XPATH_STREAMING
+ if (comp->stream != NULL) {
+ xmlFreePatternList(comp->stream);
+ }
+#endif
+ if (comp->expr != NULL) {
+ xmlFree(comp->expr);
+ }
+
+ xmlFree(comp);
+}
+
+/**
+ * xmlXPathCompExprAdd:
+ * @comp: the compiled expression
+ * @ch1: first child index
+ * @ch2: second child index
+ * @op: an op
+ * @value: the first int value
+ * @value2: the second int value
+ * @value3: the third int value
+ * @value4: the first string value
+ * @value5: the second string value
+ *
+ * Add a step to an XPath Compiled Expression
+ *
+ * Returns -1 in case of failure, the index otherwise
+ */
+static int
+xmlXPathCompExprAdd(xmlXPathCompExprPtr comp, int ch1, int ch2,
+ xmlXPathOp op, int value,
+ int value2, int value3, void *value4, void *value5) {
+ if (comp->nbStep >= comp->maxStep) {
+ xmlXPathStepOp *real;
+
+ if (comp->maxStep >= XPATH_MAX_STEPS) {
+ xmlXPathErrMemory(NULL, "adding step\n");
+ return(-1);
+ }
+ comp->maxStep *= 2;
+ real = (xmlXPathStepOp *) xmlRealloc(comp->steps,
+ comp->maxStep * sizeof(xmlXPathStepOp));
+ if (real == NULL) {
+ comp->maxStep /= 2;
+ xmlXPathErrMemory(NULL, "adding step\n");
+ return(-1);
+ }
+ comp->steps = real;
+ }
+ comp->last = comp->nbStep;
+ comp->steps[comp->nbStep].ch1 = ch1;
+ comp->steps[comp->nbStep].ch2 = ch2;
+ comp->steps[comp->nbStep].op = op;
+ comp->steps[comp->nbStep].value = value;
+ comp->steps[comp->nbStep].value2 = value2;
+ comp->steps[comp->nbStep].value3 = value3;
+ if ((comp->dict != NULL) &&
+ ((op == XPATH_OP_FUNCTION) || (op == XPATH_OP_VARIABLE) ||
+ (op == XPATH_OP_COLLECT))) {
+ if (value4 != NULL) {
+ comp->steps[comp->nbStep].value4 = (xmlChar *)
+ (void *)xmlDictLookup(comp->dict, value4, -1);
+ xmlFree(value4);
+ } else
+ comp->steps[comp->nbStep].value4 = NULL;
+ if (value5 != NULL) {
+ comp->steps[comp->nbStep].value5 = (xmlChar *)
+ (void *)xmlDictLookup(comp->dict, value5, -1);
+ xmlFree(value5);
+ } else
+ comp->steps[comp->nbStep].value5 = NULL;
+ } else {
+ comp->steps[comp->nbStep].value4 = value4;
+ comp->steps[comp->nbStep].value5 = value5;
+ }
+ comp->steps[comp->nbStep].cache = NULL;
+ return(comp->nbStep++);
+}
+
+/**
+ * xmlXPathCompSwap:
+ * @comp: the compiled expression
+ * @op: operation index
+ *
+ * Swaps 2 operations in the compiled expression
+ */
+static void
+xmlXPathCompSwap(xmlXPathStepOpPtr op) {
+ int tmp;
+
+#ifndef LIBXML_THREAD_ENABLED
+ /*
+ * Since this manipulates possibly shared variables, this is
+ * disabled if one detects that the library is used in a multithreaded
+ * application
+ */
+ if (xmlXPathDisableOptimizer)
+ return;
+#endif
+
+ tmp = op->ch1;
+ op->ch1 = op->ch2;
+ op->ch2 = tmp;
+}
+
+#define PUSH_FULL_EXPR(op, op1, op2, val, val2, val3, val4, val5) \
+ xmlXPathCompExprAdd(ctxt->comp, (op1), (op2), \
+ (op), (val), (val2), (val3), (val4), (val5))
+#define PUSH_LONG_EXPR(op, val, val2, val3, val4, val5) \
+ xmlXPathCompExprAdd(ctxt->comp, ctxt->comp->last, -1, \
+ (op), (val), (val2), (val3), (val4), (val5))
+
+#define PUSH_LEAVE_EXPR(op, val, val2) \
+xmlXPathCompExprAdd(ctxt->comp, -1, -1, (op), (val), (val2), 0 ,NULL ,NULL)
+
+#define PUSH_UNARY_EXPR(op, ch, val, val2) \
+xmlXPathCompExprAdd(ctxt->comp, (ch), -1, (op), (val), (val2), 0 ,NULL ,NULL)
+
+#define PUSH_BINARY_EXPR(op, ch1, ch2, val, val2) \
+xmlXPathCompExprAdd(ctxt->comp, (ch1), (ch2), (op), \
+ (val), (val2), 0 ,NULL ,NULL)
+
+/************************************************************************
+ * *
+ * XPath object cache structures *
+ * *
+ ************************************************************************/
+
+/* #define XP_DEFAULT_CACHE_ON */
+
+#define XP_HAS_CACHE(c) ((c != NULL) && ((c)->cache != NULL))
+
+typedef struct _xmlXPathContextCache xmlXPathContextCache;
+typedef xmlXPathContextCache *xmlXPathContextCachePtr;
+struct _xmlXPathContextCache {
+ xmlPointerListPtr nodesetObjs; /* contains xmlXPathObjectPtr */
+ xmlPointerListPtr stringObjs; /* contains xmlXPathObjectPtr */
+ xmlPointerListPtr booleanObjs; /* contains xmlXPathObjectPtr */
+ xmlPointerListPtr numberObjs; /* contains xmlXPathObjectPtr */
+ xmlPointerListPtr miscObjs; /* contains xmlXPathObjectPtr */
+ int maxNodeset;
+ int maxString;
+ int maxBoolean;
+ int maxNumber;
+ int maxMisc;
+#ifdef XP_DEBUG_OBJ_USAGE
+ int dbgCachedAll;
+ int dbgCachedNodeset;
+ int dbgCachedString;
+ int dbgCachedBool;
+ int dbgCachedNumber;
+ int dbgCachedPoint;
+ int dbgCachedRange;
+ int dbgCachedLocset;
+ int dbgCachedUsers;
+ int dbgCachedXSLTTree;
+ int dbgCachedUndefined;
+
+
+ int dbgReusedAll;
+ int dbgReusedNodeset;
+ int dbgReusedString;
+ int dbgReusedBool;
+ int dbgReusedNumber;
+ int dbgReusedPoint;
+ int dbgReusedRange;
+ int dbgReusedLocset;
+ int dbgReusedUsers;
+ int dbgReusedXSLTTree;
+ int dbgReusedUndefined;
+
+#endif
+};
+
+/************************************************************************
+ * *
+ * Debugging related functions *
+ * *
+ ************************************************************************/
+
+#define STRANGE \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Internal error at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#ifdef LIBXML_DEBUG_ENABLED
+static void
+xmlXPathDebugDumpNode(FILE *output, xmlNodePtr cur, int depth) {
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+ if (cur == NULL) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "Node is NULL !\n");
+ return;
+
+ }
+
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ fprintf(output, "%s", shift);
+ fprintf(output, " /\n");
+ } else if (cur->type == XML_ATTRIBUTE_NODE)
+ xmlDebugDumpAttr(output, (xmlAttrPtr)cur, depth);
+ else
+ xmlDebugDumpOneNode(output, cur, depth);
+}
+static void
+xmlXPathDebugDumpNodeList(FILE *output, xmlNodePtr cur, int depth) {
+ xmlNodePtr tmp;
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+ if (cur == NULL) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "Node is NULL !\n");
+ return;
+
+ }
+
+ while (cur != NULL) {
+ tmp = cur;
+ cur = cur->next;
+ xmlDebugDumpOneNode(output, tmp, depth);
+ }
+}
+
+static void
+xmlXPathDebugDumpNodeSet(FILE *output, xmlNodeSetPtr cur, int depth) {
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+ if (cur == NULL) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "NodeSet is NULL !\n");
+ return;
+
+ }
+
+ if (cur != NULL) {
+ fprintf(output, "Set contains %d nodes:\n", cur->nodeNr);
+ for (i = 0;i < cur->nodeNr;i++) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "%d", i + 1);
+ xmlXPathDebugDumpNode(output, cur->nodeTab[i], depth + 1);
+ }
+ }
+}
+
+static void
+xmlXPathDebugDumpValueTree(FILE *output, xmlNodeSetPtr cur, int depth) {
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+ if ((cur == NULL) || (cur->nodeNr == 0) || (cur->nodeTab[0] == NULL)) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "Value Tree is NULL !\n");
+ return;
+
+ }
+
+ fprintf(output, "%s", shift);
+ fprintf(output, "%d", i + 1);
+ xmlXPathDebugDumpNodeList(output, cur->nodeTab[0]->children, depth + 1);
+}
+#if defined(LIBXML_XPTR_ENABLED)
+static void
+xmlXPathDebugDumpLocationSet(FILE *output, xmlLocationSetPtr cur, int depth) {
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+ if (cur == NULL) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "LocationSet is NULL !\n");
+ return;
+
+ }
+
+ for (i = 0;i < cur->locNr;i++) {
+ fprintf(output, "%s", shift);
+ fprintf(output, "%d : ", i + 1);
+ xmlXPathDebugDumpObject(output, cur->locTab[i], depth + 1);
+ }
+}
+#endif /* LIBXML_XPTR_ENABLED */
+
+/**
+ * xmlXPathDebugDumpObject:
+ * @output: the FILE * to dump the output
+ * @cur: the object to inspect
+ * @depth: indentation level
+ *
+ * Dump the content of the object for debugging purposes
+ */
+void
+xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth) {
+ int i;
+ char shift[100];
+
+ if (output == NULL) return;
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+
+ fprintf(output, "%s", shift);
+
+ if (cur == NULL) {
+ fprintf(output, "Object is empty (NULL)\n");
+ return;
+ }
+ switch(cur->type) {
+ case XPATH_UNDEFINED:
+ fprintf(output, "Object is uninitialized\n");
+ break;
+ case XPATH_NODESET:
+ fprintf(output, "Object is a Node Set :\n");
+ xmlXPathDebugDumpNodeSet(output, cur->nodesetval, depth);
+ break;
+ case XPATH_XSLT_TREE:
+ fprintf(output, "Object is an XSLT value tree :\n");
+ xmlXPathDebugDumpValueTree(output, cur->nodesetval, depth);
+ break;
+ case XPATH_BOOLEAN:
+ fprintf(output, "Object is a Boolean : ");
+ if (cur->boolval) fprintf(output, "true\n");
+ else fprintf(output, "false\n");
+ break;
+ case XPATH_NUMBER:
+ switch (xmlXPathIsInf(cur->floatval)) {
+ case 1:
+ fprintf(output, "Object is a number : Infinity\n");
+ break;
+ case -1:
+ fprintf(output, "Object is a number : -Infinity\n");
+ break;
+ default:
+ if (xmlXPathIsNaN(cur->floatval)) {
+ fprintf(output, "Object is a number : NaN\n");
+ } else if (cur->floatval == 0 && xmlXPathGetSign(cur->floatval) != 0) {
+ fprintf(output, "Object is a number : 0\n");
+ } else {
+ fprintf(output, "Object is a number : %0g\n", cur->floatval);
+ }
+ }
+ break;
+ case XPATH_STRING:
+ fprintf(output, "Object is a string : ");
+ xmlDebugDumpString(output, cur->stringval);
+ fprintf(output, "\n");
+ break;
+ case XPATH_POINT:
+ fprintf(output, "Object is a point : index %d in node", cur->index);
+ xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user, depth + 1);
+ fprintf(output, "\n");
+ break;
+ case XPATH_RANGE:
+ if ((cur->user2 == NULL) ||
+ ((cur->user2 == cur->user) && (cur->index == cur->index2))) {
+ fprintf(output, "Object is a collapsed range :\n");
+ fprintf(output, "%s", shift);
+ if (cur->index >= 0)
+ fprintf(output, "index %d in ", cur->index);
+ fprintf(output, "node\n");
+ xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user,
+ depth + 1);
+ } else {
+ fprintf(output, "Object is a range :\n");
+ fprintf(output, "%s", shift);
+ fprintf(output, "From ");
+ if (cur->index >= 0)
+ fprintf(output, "index %d in ", cur->index);
+ fprintf(output, "node\n");
+ xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user,
+ depth + 1);
+ fprintf(output, "%s", shift);
+ fprintf(output, "To ");
+ if (cur->index2 >= 0)
+ fprintf(output, "index %d in ", cur->index2);
+ fprintf(output, "node\n");
+ xmlXPathDebugDumpNode(output, (xmlNodePtr) cur->user2,
+ depth + 1);
+ fprintf(output, "\n");
+ }
+ break;
+ case XPATH_LOCATIONSET:
+#if defined(LIBXML_XPTR_ENABLED)
+ fprintf(output, "Object is a Location Set:\n");
+ xmlXPathDebugDumpLocationSet(output,
+ (xmlLocationSetPtr) cur->user, depth);
+#endif
+ break;
+ case XPATH_USERS:
+ fprintf(output, "Object is user defined\n");
+ break;
+ }
+}
+
+static void
+xmlXPathDebugDumpStepOp(FILE *output, xmlXPathCompExprPtr comp,
+ xmlXPathStepOpPtr op, int depth) {
+ int i;
+ char shift[100];
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+ fprintf(output, "%s", shift);
+ if (op == NULL) {
+ fprintf(output, "Step is NULL\n");
+ return;
+ }
+ switch (op->op) {
+ case XPATH_OP_END:
+ fprintf(output, "END"); break;
+ case XPATH_OP_AND:
+ fprintf(output, "AND"); break;
+ case XPATH_OP_OR:
+ fprintf(output, "OR"); break;
+ case XPATH_OP_EQUAL:
+ if (op->value)
+ fprintf(output, "EQUAL =");
+ else
+ fprintf(output, "EQUAL !=");
+ break;
+ case XPATH_OP_CMP:
+ if (op->value)
+ fprintf(output, "CMP <");
+ else
+ fprintf(output, "CMP >");
+ if (!op->value2)
+ fprintf(output, "=");
+ break;
+ case XPATH_OP_PLUS:
+ if (op->value == 0)
+ fprintf(output, "PLUS -");
+ else if (op->value == 1)
+ fprintf(output, "PLUS +");
+ else if (op->value == 2)
+ fprintf(output, "PLUS unary -");
+ else if (op->value == 3)
+ fprintf(output, "PLUS unary - -");
+ break;
+ case XPATH_OP_MULT:
+ if (op->value == 0)
+ fprintf(output, "MULT *");
+ else if (op->value == 1)
+ fprintf(output, "MULT div");
+ else
+ fprintf(output, "MULT mod");
+ break;
+ case XPATH_OP_UNION:
+ fprintf(output, "UNION"); break;
+ case XPATH_OP_ROOT:
+ fprintf(output, "ROOT"); break;
+ case XPATH_OP_NODE:
+ fprintf(output, "NODE"); break;
+ case XPATH_OP_RESET:
+ fprintf(output, "RESET"); break;
+ case XPATH_OP_SORT:
+ fprintf(output, "SORT"); break;
+ case XPATH_OP_COLLECT: {
+ xmlXPathAxisVal axis = (xmlXPathAxisVal)op->value;
+ xmlXPathTestVal test = (xmlXPathTestVal)op->value2;
+ xmlXPathTypeVal type = (xmlXPathTypeVal)op->value3;
+ const xmlChar *prefix = op->value4;
+ const xmlChar *name = op->value5;
+
+ fprintf(output, "COLLECT ");
+ switch (axis) {
+ case AXIS_ANCESTOR:
+ fprintf(output, " 'ancestors' "); break;
+ case AXIS_ANCESTOR_OR_SELF:
+ fprintf(output, " 'ancestors-or-self' "); break;
+ case AXIS_ATTRIBUTE:
+ fprintf(output, " 'attributes' "); break;
+ case AXIS_CHILD:
+ fprintf(output, " 'child' "); break;
+ case AXIS_DESCENDANT:
+ fprintf(output, " 'descendant' "); break;
+ case AXIS_DESCENDANT_OR_SELF:
+ fprintf(output, " 'descendant-or-self' "); break;
+ case AXIS_FOLLOWING:
+ fprintf(output, " 'following' "); break;
+ case AXIS_FOLLOWING_SIBLING:
+ fprintf(output, " 'following-siblings' "); break;
+ case AXIS_NAMESPACE:
+ fprintf(output, " 'namespace' "); break;
+ case AXIS_PARENT:
+ fprintf(output, " 'parent' "); break;
+ case AXIS_PRECEDING:
+ fprintf(output, " 'preceding' "); break;
+ case AXIS_PRECEDING_SIBLING:
+ fprintf(output, " 'preceding-sibling' "); break;
+ case AXIS_SELF:
+ fprintf(output, " 'self' "); break;
+ }
+ switch (test) {
+ case NODE_TEST_NONE:
+ fprintf(output, "'none' "); break;
+ case NODE_TEST_TYPE:
+ fprintf(output, "'type' "); break;
+ case NODE_TEST_PI:
+ fprintf(output, "'PI' "); break;
+ case NODE_TEST_ALL:
+ fprintf(output, "'all' "); break;
+ case NODE_TEST_NS:
+ fprintf(output, "'namespace' "); break;
+ case NODE_TEST_NAME:
+ fprintf(output, "'name' "); break;
+ }
+ switch (type) {
+ case NODE_TYPE_NODE:
+ fprintf(output, "'node' "); break;
+ case NODE_TYPE_COMMENT:
+ fprintf(output, "'comment' "); break;
+ case NODE_TYPE_TEXT:
+ fprintf(output, "'text' "); break;
+ case NODE_TYPE_PI:
+ fprintf(output, "'PI' "); break;
+ }
+ if (prefix != NULL)
+ fprintf(output, "%s:", prefix);
+ if (name != NULL)
+ fprintf(output, "%s", (const char *) name);
+ break;
+
+ }
+ case XPATH_OP_VALUE: {
+ xmlXPathObjectPtr object = (xmlXPathObjectPtr) op->value4;
+
+ fprintf(output, "ELEM ");
+ xmlXPathDebugDumpObject(output, object, 0);
+ goto finish;
+ }
+ case XPATH_OP_VARIABLE: {
+ const xmlChar *prefix = op->value5;
+ const xmlChar *name = op->value4;
+
+ if (prefix != NULL)
+ fprintf(output, "VARIABLE %s:%s", prefix, name);
+ else
+ fprintf(output, "VARIABLE %s", name);
+ break;
+ }
+ case XPATH_OP_FUNCTION: {
+ int nbargs = op->value;
+ const xmlChar *prefix = op->value5;
+ const xmlChar *name = op->value4;
+
+ if (prefix != NULL)
+ fprintf(output, "FUNCTION %s:%s(%d args)",
+ prefix, name, nbargs);
+ else
+ fprintf(output, "FUNCTION %s(%d args)", name, nbargs);
+ break;
+ }
+ case XPATH_OP_ARG: fprintf(output, "ARG"); break;
+ case XPATH_OP_PREDICATE: fprintf(output, "PREDICATE"); break;
+ case XPATH_OP_FILTER: fprintf(output, "FILTER"); break;
+#ifdef LIBXML_XPTR_ENABLED
+ case XPATH_OP_RANGETO: fprintf(output, "RANGETO"); break;
+#endif
+ default:
+ fprintf(output, "UNKNOWN %d\n", op->op); return;
+ }
+ fprintf(output, "\n");
+finish:
+ if (op->ch1 >= 0)
+ xmlXPathDebugDumpStepOp(output, comp, &comp->steps[op->ch1], depth + 1);
+ if (op->ch2 >= 0)
+ xmlXPathDebugDumpStepOp(output, comp, &comp->steps[op->ch2], depth + 1);
+}
+
+/**
+ * xmlXPathDebugDumpCompExpr:
+ * @output: the FILE * for the output
+ * @comp: the precompiled XPath expression
+ * @depth: the indentation level.
+ *
+ * Dumps the tree of the compiled XPath expression.
+ */
+void
+xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp,
+ int depth) {
+ int i;
+ char shift[100];
+
+ if ((output == NULL) || (comp == NULL)) return;
+
+ for (i = 0;((i < depth) && (i < 25));i++)
+ shift[2 * i] = shift[2 * i + 1] = ' ';
+ shift[2 * i] = shift[2 * i + 1] = 0;
+
+ fprintf(output, "%s", shift);
+
+ fprintf(output, "Compiled Expression : %d elements\n",
+ comp->nbStep);
+ i = comp->last;
+ xmlXPathDebugDumpStepOp(output, comp, &comp->steps[i], depth + 1);
+}
+
+#ifdef XP_DEBUG_OBJ_USAGE
+
+/*
+* XPath object usage related debugging variables.
+*/
+static int xmlXPathDebugObjCounterUndefined = 0;
+static int xmlXPathDebugObjCounterNodeset = 0;
+static int xmlXPathDebugObjCounterBool = 0;
+static int xmlXPathDebugObjCounterNumber = 0;
+static int xmlXPathDebugObjCounterString = 0;
+static int xmlXPathDebugObjCounterPoint = 0;
+static int xmlXPathDebugObjCounterRange = 0;
+static int xmlXPathDebugObjCounterLocset = 0;
+static int xmlXPathDebugObjCounterUsers = 0;
+static int xmlXPathDebugObjCounterXSLTTree = 0;
+static int xmlXPathDebugObjCounterAll = 0;
+
+static int xmlXPathDebugObjTotalUndefined = 0;
+static int xmlXPathDebugObjTotalNodeset = 0;
+static int xmlXPathDebugObjTotalBool = 0;
+static int xmlXPathDebugObjTotalNumber = 0;
+static int xmlXPathDebugObjTotalString = 0;
+static int xmlXPathDebugObjTotalPoint = 0;
+static int xmlXPathDebugObjTotalRange = 0;
+static int xmlXPathDebugObjTotalLocset = 0;
+static int xmlXPathDebugObjTotalUsers = 0;
+static int xmlXPathDebugObjTotalXSLTTree = 0;
+static int xmlXPathDebugObjTotalAll = 0;
+
+static int xmlXPathDebugObjMaxUndefined = 0;
+static int xmlXPathDebugObjMaxNodeset = 0;
+static int xmlXPathDebugObjMaxBool = 0;
+static int xmlXPathDebugObjMaxNumber = 0;
+static int xmlXPathDebugObjMaxString = 0;
+static int xmlXPathDebugObjMaxPoint = 0;
+static int xmlXPathDebugObjMaxRange = 0;
+static int xmlXPathDebugObjMaxLocset = 0;
+static int xmlXPathDebugObjMaxUsers = 0;
+static int xmlXPathDebugObjMaxXSLTTree = 0;
+static int xmlXPathDebugObjMaxAll = 0;
+
+/* REVISIT TODO: Make this static when committing */
+static void
+xmlXPathDebugObjUsageReset(xmlXPathContextPtr ctxt)
+{
+ if (ctxt != NULL) {
+ if (ctxt->cache != NULL) {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ cache->dbgCachedAll = 0;
+ cache->dbgCachedNodeset = 0;
+ cache->dbgCachedString = 0;
+ cache->dbgCachedBool = 0;
+ cache->dbgCachedNumber = 0;
+ cache->dbgCachedPoint = 0;
+ cache->dbgCachedRange = 0;
+ cache->dbgCachedLocset = 0;
+ cache->dbgCachedUsers = 0;
+ cache->dbgCachedXSLTTree = 0;
+ cache->dbgCachedUndefined = 0;
+
+ cache->dbgReusedAll = 0;
+ cache->dbgReusedNodeset = 0;
+ cache->dbgReusedString = 0;
+ cache->dbgReusedBool = 0;
+ cache->dbgReusedNumber = 0;
+ cache->dbgReusedPoint = 0;
+ cache->dbgReusedRange = 0;
+ cache->dbgReusedLocset = 0;
+ cache->dbgReusedUsers = 0;
+ cache->dbgReusedXSLTTree = 0;
+ cache->dbgReusedUndefined = 0;
+ }
+ }
+
+ xmlXPathDebugObjCounterUndefined = 0;
+ xmlXPathDebugObjCounterNodeset = 0;
+ xmlXPathDebugObjCounterBool = 0;
+ xmlXPathDebugObjCounterNumber = 0;
+ xmlXPathDebugObjCounterString = 0;
+ xmlXPathDebugObjCounterPoint = 0;
+ xmlXPathDebugObjCounterRange = 0;
+ xmlXPathDebugObjCounterLocset = 0;
+ xmlXPathDebugObjCounterUsers = 0;
+ xmlXPathDebugObjCounterXSLTTree = 0;
+ xmlXPathDebugObjCounterAll = 0;
+
+ xmlXPathDebugObjTotalUndefined = 0;
+ xmlXPathDebugObjTotalNodeset = 0;
+ xmlXPathDebugObjTotalBool = 0;
+ xmlXPathDebugObjTotalNumber = 0;
+ xmlXPathDebugObjTotalString = 0;
+ xmlXPathDebugObjTotalPoint = 0;
+ xmlXPathDebugObjTotalRange = 0;
+ xmlXPathDebugObjTotalLocset = 0;
+ xmlXPathDebugObjTotalUsers = 0;
+ xmlXPathDebugObjTotalXSLTTree = 0;
+ xmlXPathDebugObjTotalAll = 0;
+
+ xmlXPathDebugObjMaxUndefined = 0;
+ xmlXPathDebugObjMaxNodeset = 0;
+ xmlXPathDebugObjMaxBool = 0;
+ xmlXPathDebugObjMaxNumber = 0;
+ xmlXPathDebugObjMaxString = 0;
+ xmlXPathDebugObjMaxPoint = 0;
+ xmlXPathDebugObjMaxRange = 0;
+ xmlXPathDebugObjMaxLocset = 0;
+ xmlXPathDebugObjMaxUsers = 0;
+ xmlXPathDebugObjMaxXSLTTree = 0;
+ xmlXPathDebugObjMaxAll = 0;
+
+}
+
+static void
+xmlXPathDebugObjUsageRequested(xmlXPathContextPtr ctxt,
+ xmlXPathObjectType objType)
+{
+ int isCached = 0;
+
+ if (ctxt != NULL) {
+ if (ctxt->cache != NULL) {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ isCached = 1;
+
+ cache->dbgReusedAll++;
+ switch (objType) {
+ case XPATH_UNDEFINED:
+ cache->dbgReusedUndefined++;
+ break;
+ case XPATH_NODESET:
+ cache->dbgReusedNodeset++;
+ break;
+ case XPATH_BOOLEAN:
+ cache->dbgReusedBool++;
+ break;
+ case XPATH_NUMBER:
+ cache->dbgReusedNumber++;
+ break;
+ case XPATH_STRING:
+ cache->dbgReusedString++;
+ break;
+ case XPATH_POINT:
+ cache->dbgReusedPoint++;
+ break;
+ case XPATH_RANGE:
+ cache->dbgReusedRange++;
+ break;
+ case XPATH_LOCATIONSET:
+ cache->dbgReusedLocset++;
+ break;
+ case XPATH_USERS:
+ cache->dbgReusedUsers++;
+ break;
+ case XPATH_XSLT_TREE:
+ cache->dbgReusedXSLTTree++;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ switch (objType) {
+ case XPATH_UNDEFINED:
+ if (! isCached)
+ xmlXPathDebugObjTotalUndefined++;
+ xmlXPathDebugObjCounterUndefined++;
+ if (xmlXPathDebugObjCounterUndefined >
+ xmlXPathDebugObjMaxUndefined)
+ xmlXPathDebugObjMaxUndefined =
+ xmlXPathDebugObjCounterUndefined;
+ break;
+ case XPATH_NODESET:
+ if (! isCached)
+ xmlXPathDebugObjTotalNodeset++;
+ xmlXPathDebugObjCounterNodeset++;
+ if (xmlXPathDebugObjCounterNodeset >
+ xmlXPathDebugObjMaxNodeset)
+ xmlXPathDebugObjMaxNodeset =
+ xmlXPathDebugObjCounterNodeset;
+ break;
+ case XPATH_BOOLEAN:
+ if (! isCached)
+ xmlXPathDebugObjTotalBool++;
+ xmlXPathDebugObjCounterBool++;
+ if (xmlXPathDebugObjCounterBool >
+ xmlXPathDebugObjMaxBool)
+ xmlXPathDebugObjMaxBool =
+ xmlXPathDebugObjCounterBool;
+ break;
+ case XPATH_NUMBER:
+ if (! isCached)
+ xmlXPathDebugObjTotalNumber++;
+ xmlXPathDebugObjCounterNumber++;
+ if (xmlXPathDebugObjCounterNumber >
+ xmlXPathDebugObjMaxNumber)
+ xmlXPathDebugObjMaxNumber =
+ xmlXPathDebugObjCounterNumber;
+ break;
+ case XPATH_STRING:
+ if (! isCached)
+ xmlXPathDebugObjTotalString++;
+ xmlXPathDebugObjCounterString++;
+ if (xmlXPathDebugObjCounterString >
+ xmlXPathDebugObjMaxString)
+ xmlXPathDebugObjMaxString =
+ xmlXPathDebugObjCounterString;
+ break;
+ case XPATH_POINT:
+ if (! isCached)
+ xmlXPathDebugObjTotalPoint++;
+ xmlXPathDebugObjCounterPoint++;
+ if (xmlXPathDebugObjCounterPoint >
+ xmlXPathDebugObjMaxPoint)
+ xmlXPathDebugObjMaxPoint =
+ xmlXPathDebugObjCounterPoint;
+ break;
+ case XPATH_RANGE:
+ if (! isCached)
+ xmlXPathDebugObjTotalRange++;
+ xmlXPathDebugObjCounterRange++;
+ if (xmlXPathDebugObjCounterRange >
+ xmlXPathDebugObjMaxRange)
+ xmlXPathDebugObjMaxRange =
+ xmlXPathDebugObjCounterRange;
+ break;
+ case XPATH_LOCATIONSET:
+ if (! isCached)
+ xmlXPathDebugObjTotalLocset++;
+ xmlXPathDebugObjCounterLocset++;
+ if (xmlXPathDebugObjCounterLocset >
+ xmlXPathDebugObjMaxLocset)
+ xmlXPathDebugObjMaxLocset =
+ xmlXPathDebugObjCounterLocset;
+ break;
+ case XPATH_USERS:
+ if (! isCached)
+ xmlXPathDebugObjTotalUsers++;
+ xmlXPathDebugObjCounterUsers++;
+ if (xmlXPathDebugObjCounterUsers >
+ xmlXPathDebugObjMaxUsers)
+ xmlXPathDebugObjMaxUsers =
+ xmlXPathDebugObjCounterUsers;
+ break;
+ case XPATH_XSLT_TREE:
+ if (! isCached)
+ xmlXPathDebugObjTotalXSLTTree++;
+ xmlXPathDebugObjCounterXSLTTree++;
+ if (xmlXPathDebugObjCounterXSLTTree >
+ xmlXPathDebugObjMaxXSLTTree)
+ xmlXPathDebugObjMaxXSLTTree =
+ xmlXPathDebugObjCounterXSLTTree;
+ break;
+ default:
+ break;
+ }
+ if (! isCached)
+ xmlXPathDebugObjTotalAll++;
+ xmlXPathDebugObjCounterAll++;
+ if (xmlXPathDebugObjCounterAll >
+ xmlXPathDebugObjMaxAll)
+ xmlXPathDebugObjMaxAll =
+ xmlXPathDebugObjCounterAll;
+}
+
+static void
+xmlXPathDebugObjUsageReleased(xmlXPathContextPtr ctxt,
+ xmlXPathObjectType objType)
+{
+ int isCached = 0;
+
+ if (ctxt != NULL) {
+ if (ctxt->cache != NULL) {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ isCached = 1;
+
+ cache->dbgCachedAll++;
+ switch (objType) {
+ case XPATH_UNDEFINED:
+ cache->dbgCachedUndefined++;
+ break;
+ case XPATH_NODESET:
+ cache->dbgCachedNodeset++;
+ break;
+ case XPATH_BOOLEAN:
+ cache->dbgCachedBool++;
+ break;
+ case XPATH_NUMBER:
+ cache->dbgCachedNumber++;
+ break;
+ case XPATH_STRING:
+ cache->dbgCachedString++;
+ break;
+ case XPATH_POINT:
+ cache->dbgCachedPoint++;
+ break;
+ case XPATH_RANGE:
+ cache->dbgCachedRange++;
+ break;
+ case XPATH_LOCATIONSET:
+ cache->dbgCachedLocset++;
+ break;
+ case XPATH_USERS:
+ cache->dbgCachedUsers++;
+ break;
+ case XPATH_XSLT_TREE:
+ cache->dbgCachedXSLTTree++;
+ break;
+ default:
+ break;
+ }
+
+ }
+ }
+ switch (objType) {
+ case XPATH_UNDEFINED:
+ xmlXPathDebugObjCounterUndefined--;
+ break;
+ case XPATH_NODESET:
+ xmlXPathDebugObjCounterNodeset--;
+ break;
+ case XPATH_BOOLEAN:
+ xmlXPathDebugObjCounterBool--;
+ break;
+ case XPATH_NUMBER:
+ xmlXPathDebugObjCounterNumber--;
+ break;
+ case XPATH_STRING:
+ xmlXPathDebugObjCounterString--;
+ break;
+ case XPATH_POINT:
+ xmlXPathDebugObjCounterPoint--;
+ break;
+ case XPATH_RANGE:
+ xmlXPathDebugObjCounterRange--;
+ break;
+ case XPATH_LOCATIONSET:
+ xmlXPathDebugObjCounterLocset--;
+ break;
+ case XPATH_USERS:
+ xmlXPathDebugObjCounterUsers--;
+ break;
+ case XPATH_XSLT_TREE:
+ xmlXPathDebugObjCounterXSLTTree--;
+ break;
+ default:
+ break;
+ }
+ xmlXPathDebugObjCounterAll--;
+}
+
+/* REVISIT TODO: Make this static when committing */
+static void
+xmlXPathDebugObjUsageDisplay(xmlXPathContextPtr ctxt)
+{
+ int reqAll, reqNodeset, reqString, reqBool, reqNumber,
+ reqXSLTTree, reqUndefined;
+ int caAll = 0, caNodeset = 0, caString = 0, caBool = 0,
+ caNumber = 0, caXSLTTree = 0, caUndefined = 0;
+ int reAll = 0, reNodeset = 0, reString = 0, reBool = 0,
+ reNumber = 0, reXSLTTree = 0, reUndefined = 0;
+ int leftObjs = xmlXPathDebugObjCounterAll;
+
+ reqAll = xmlXPathDebugObjTotalAll;
+ reqNodeset = xmlXPathDebugObjTotalNodeset;
+ reqString = xmlXPathDebugObjTotalString;
+ reqBool = xmlXPathDebugObjTotalBool;
+ reqNumber = xmlXPathDebugObjTotalNumber;
+ reqXSLTTree = xmlXPathDebugObjTotalXSLTTree;
+ reqUndefined = xmlXPathDebugObjTotalUndefined;
+
+ printf("# XPath object usage:\n");
+
+ if (ctxt != NULL) {
+ if (ctxt->cache != NULL) {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ reAll = cache->dbgReusedAll;
+ reqAll += reAll;
+ reNodeset = cache->dbgReusedNodeset;
+ reqNodeset += reNodeset;
+ reString = cache->dbgReusedString;
+ reqString += reString;
+ reBool = cache->dbgReusedBool;
+ reqBool += reBool;
+ reNumber = cache->dbgReusedNumber;
+ reqNumber += reNumber;
+ reXSLTTree = cache->dbgReusedXSLTTree;
+ reqXSLTTree += reXSLTTree;
+ reUndefined = cache->dbgReusedUndefined;
+ reqUndefined += reUndefined;
+
+ caAll = cache->dbgCachedAll;
+ caBool = cache->dbgCachedBool;
+ caNodeset = cache->dbgCachedNodeset;
+ caString = cache->dbgCachedString;
+ caNumber = cache->dbgCachedNumber;
+ caXSLTTree = cache->dbgCachedXSLTTree;
+ caUndefined = cache->dbgCachedUndefined;
+
+ if (cache->nodesetObjs)
+ leftObjs -= cache->nodesetObjs->number;
+ if (cache->stringObjs)
+ leftObjs -= cache->stringObjs->number;
+ if (cache->booleanObjs)
+ leftObjs -= cache->booleanObjs->number;
+ if (cache->numberObjs)
+ leftObjs -= cache->numberObjs->number;
+ if (cache->miscObjs)
+ leftObjs -= cache->miscObjs->number;
+ }
+ }
+
+ printf("# all\n");
+ printf("# total : %d\n", reqAll);
+ printf("# left : %d\n", leftObjs);
+ printf("# created: %d\n", xmlXPathDebugObjTotalAll);
+ printf("# reused : %d\n", reAll);
+ printf("# max : %d\n", xmlXPathDebugObjMaxAll);
+
+ printf("# node-sets\n");
+ printf("# total : %d\n", reqNodeset);
+ printf("# created: %d\n", xmlXPathDebugObjTotalNodeset);
+ printf("# reused : %d\n", reNodeset);
+ printf("# max : %d\n", xmlXPathDebugObjMaxNodeset);
+
+ printf("# strings\n");
+ printf("# total : %d\n", reqString);
+ printf("# created: %d\n", xmlXPathDebugObjTotalString);
+ printf("# reused : %d\n", reString);
+ printf("# max : %d\n", xmlXPathDebugObjMaxString);
+
+ printf("# booleans\n");
+ printf("# total : %d\n", reqBool);
+ printf("# created: %d\n", xmlXPathDebugObjTotalBool);
+ printf("# reused : %d\n", reBool);
+ printf("# max : %d\n", xmlXPathDebugObjMaxBool);
+
+ printf("# numbers\n");
+ printf("# total : %d\n", reqNumber);
+ printf("# created: %d\n", xmlXPathDebugObjTotalNumber);
+ printf("# reused : %d\n", reNumber);
+ printf("# max : %d\n", xmlXPathDebugObjMaxNumber);
+
+ printf("# XSLT result tree fragments\n");
+ printf("# total : %d\n", reqXSLTTree);
+ printf("# created: %d\n", xmlXPathDebugObjTotalXSLTTree);
+ printf("# reused : %d\n", reXSLTTree);
+ printf("# max : %d\n", xmlXPathDebugObjMaxXSLTTree);
+
+ printf("# undefined\n");
+ printf("# total : %d\n", reqUndefined);
+ printf("# created: %d\n", xmlXPathDebugObjTotalUndefined);
+ printf("# reused : %d\n", reUndefined);
+ printf("# max : %d\n", xmlXPathDebugObjMaxUndefined);
+
+}
+
+#endif /* XP_DEBUG_OBJ_USAGE */
+
+#endif /* LIBXML_DEBUG_ENABLED */
+
+/************************************************************************
+ * *
+ * XPath object caching *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathNewCache:
+ *
+ * Create a new object cache
+ *
+ * Returns the xmlXPathCache just allocated.
+ */
+static xmlXPathContextCachePtr
+xmlXPathNewCache(void)
+{
+ xmlXPathContextCachePtr ret;
+
+ ret = (xmlXPathContextCachePtr) xmlMalloc(sizeof(xmlXPathContextCache));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating object cache\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathContextCache));
+ ret->maxNodeset = 100;
+ ret->maxString = 100;
+ ret->maxBoolean = 100;
+ ret->maxNumber = 100;
+ ret->maxMisc = 100;
+ return(ret);
+}
+
+static void
+xmlXPathCacheFreeObjectList(xmlPointerListPtr list)
+{
+ int i;
+ xmlXPathObjectPtr obj;
+
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < list->number; i++) {
+ obj = list->items[i];
+ /*
+ * Note that it is already assured that we don't need to
+ * look out for namespace nodes in the node-set.
+ */
+ if (obj->nodesetval != NULL) {
+ if (obj->nodesetval->nodeTab != NULL)
+ xmlFree(obj->nodesetval->nodeTab);
+ xmlFree(obj->nodesetval);
+ }
+ xmlFree(obj);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjCounterAll--;
+#endif
+ }
+ xmlPointerListFree(list);
+}
+
+static void
+xmlXPathFreeCache(xmlXPathContextCachePtr cache)
+{
+ if (cache == NULL)
+ return;
+ if (cache->nodesetObjs)
+ xmlXPathCacheFreeObjectList(cache->nodesetObjs);
+ if (cache->stringObjs)
+ xmlXPathCacheFreeObjectList(cache->stringObjs);
+ if (cache->booleanObjs)
+ xmlXPathCacheFreeObjectList(cache->booleanObjs);
+ if (cache->numberObjs)
+ xmlXPathCacheFreeObjectList(cache->numberObjs);
+ if (cache->miscObjs)
+ xmlXPathCacheFreeObjectList(cache->miscObjs);
+ xmlFree(cache);
+}
+
+/**
+ * xmlXPathContextSetCache:
+ *
+ * @ctxt: the XPath context
+ * @active: enables/disables (creates/frees) the cache
+ * @value: a value with semantics dependant on @options
+ * @options: options (currently only the value 0 is used)
+ *
+ * Creates/frees an object cache on the XPath context.
+ * If activates XPath objects (xmlXPathObject) will be cached internally
+ * to be reused.
+ * @options:
+ * 0: This will set the XPath object caching:
+ * @value:
+ * This will set the maximum number of XPath objects
+ * to be cached per slot
+ * There are 5 slots for: node-set, string, number, boolean, and
+ * misc objects. Use <0 for the default number (100).
+ * Other values for @options have currently no effect.
+ *
+ * Returns 0 if the setting succeeded, and -1 on API or internal errors.
+ */
+int
+xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
+ int active,
+ int value,
+ int options)
+{
+ if (ctxt == NULL)
+ return(-1);
+ if (active) {
+ xmlXPathContextCachePtr cache;
+
+ if (ctxt->cache == NULL) {
+ ctxt->cache = xmlXPathNewCache();
+ if (ctxt->cache == NULL)
+ return(-1);
+ }
+ cache = (xmlXPathContextCachePtr) ctxt->cache;
+ if (options == 0) {
+ if (value < 0)
+ value = 100;
+ cache->maxNodeset = value;
+ cache->maxString = value;
+ cache->maxNumber = value;
+ cache->maxBoolean = value;
+ cache->maxMisc = value;
+ }
+ } else if (ctxt->cache != NULL) {
+ xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
+ ctxt->cache = NULL;
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathCacheWrapNodeSet:
+ * @ctxt: the XPath context
+ * @val: the NodePtr value
+ *
+ * This is the cached version of xmlXPathWrapNodeSet().
+ * Wrap the Nodeset @val in a new xmlXPathObjectPtr
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheWrapNodeSet(xmlXPathContextPtr ctxt, xmlNodeSetPtr val)
+{
+ if ((ctxt != NULL) && (ctxt->cache != NULL)) {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+ ret->type = XPATH_NODESET;
+ ret->nodesetval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_NODESET);
+#endif
+ return(ret);
+ }
+ }
+
+ return(xmlXPathWrapNodeSet(val));
+
+}
+
+/**
+ * xmlXPathCacheWrapString:
+ * @ctxt: the XPath context
+ * @val: the xmlChar * value
+ *
+ * This is the cached version of xmlXPathWrapString().
+ * Wraps the @val string into an XPath object.
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheWrapString(xmlXPathContextPtr ctxt, xmlChar *val)
+{
+ if ((ctxt != NULL) && (ctxt->cache != NULL)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->stringObjs != NULL) &&
+ (cache->stringObjs->number != 0))
+ {
+
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->stringObjs->items[--cache->stringObjs->number];
+ ret->type = XPATH_STRING;
+ ret->stringval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+ /*
+ * Fallback to misc-cache.
+ */
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_STRING;
+ ret->stringval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathWrapString(val));
+}
+
+/**
+ * xmlXPathCacheNewNodeSet:
+ * @ctxt: the XPath context
+ * @val: the NodePtr value
+ *
+ * This is the cached version of xmlXPathNewNodeSet().
+ * Acquire an xmlXPathObjectPtr of type NodeSet and initialize
+ * it with the single Node @val
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheNewNodeSet(xmlXPathContextPtr ctxt, xmlNodePtr val)
+{
+ if ((ctxt != NULL) && (ctxt->cache)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->nodesetObjs != NULL) &&
+ (cache->nodesetObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+ /*
+ * Use the nodset-cache.
+ */
+ ret = (xmlXPathObjectPtr)
+ cache->nodesetObjs->items[--cache->nodesetObjs->number];
+ ret->type = XPATH_NODESET;
+ ret->boolval = 0;
+ if (val) {
+ if ((ret->nodesetval->nodeMax == 0) ||
+ (val->type == XML_NAMESPACE_DECL))
+ {
+ xmlXPathNodeSetAddUnique(ret->nodesetval, val);
+ } else {
+ ret->nodesetval->nodeTab[0] = val;
+ ret->nodesetval->nodeNr = 1;
+ }
+ }
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_NODESET);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+ /*
+ * Fallback to misc-cache.
+ */
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_NODESET;
+ ret->boolval = 0;
+ ret->nodesetval = xmlXPathNodeSetCreate(val);
+ if (ret->nodesetval == NULL) {
+ ctxt->lastError.domain = XML_FROM_XPATH;
+ ctxt->lastError.code = XML_ERR_NO_MEMORY;
+ return(NULL);
+ }
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_NODESET);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathNewNodeSet(val));
+}
+
+/**
+ * xmlXPathCacheNewCString:
+ * @ctxt: the XPath context
+ * @val: the char * value
+ *
+ * This is the cached version of xmlXPathNewCString().
+ * Acquire an xmlXPathObjectPtr of type string and of value @val
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheNewCString(xmlXPathContextPtr ctxt, const char *val)
+{
+ if ((ctxt != NULL) && (ctxt->cache)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->stringObjs != NULL) &&
+ (cache->stringObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->stringObjs->items[--cache->stringObjs->number];
+
+ ret->type = XPATH_STRING;
+ ret->stringval = xmlStrdup(BAD_CAST val);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_STRING;
+ ret->stringval = xmlStrdup(BAD_CAST val);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathNewCString(val));
+}
+
+/**
+ * xmlXPathCacheNewString:
+ * @ctxt: the XPath context
+ * @val: the xmlChar * value
+ *
+ * This is the cached version of xmlXPathNewString().
+ * Acquire an xmlXPathObjectPtr of type string and of value @val
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheNewString(xmlXPathContextPtr ctxt, const xmlChar *val)
+{
+ if ((ctxt != NULL) && (ctxt->cache)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->stringObjs != NULL) &&
+ (cache->stringObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->stringObjs->items[--cache->stringObjs->number];
+ ret->type = XPATH_STRING;
+ if (val != NULL)
+ ret->stringval = xmlStrdup(val);
+ else
+ ret->stringval = xmlStrdup((const xmlChar *)"");
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_STRING;
+ if (val != NULL)
+ ret->stringval = xmlStrdup(val);
+ else
+ ret->stringval = xmlStrdup((const xmlChar *)"");
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_STRING);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathNewString(val));
+}
+
+/**
+ * xmlXPathCacheNewBoolean:
+ * @ctxt: the XPath context
+ * @val: the boolean value
+ *
+ * This is the cached version of xmlXPathNewBoolean().
+ * Acquires an xmlXPathObjectPtr of type boolean and of value @val
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheNewBoolean(xmlXPathContextPtr ctxt, int val)
+{
+ if ((ctxt != NULL) && (ctxt->cache)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->booleanObjs != NULL) &&
+ (cache->booleanObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->booleanObjs->items[--cache->booleanObjs->number];
+ ret->type = XPATH_BOOLEAN;
+ ret->boolval = (val != 0);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_BOOLEAN);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_BOOLEAN;
+ ret->boolval = (val != 0);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_BOOLEAN);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathNewBoolean(val));
+}
+
+/**
+ * xmlXPathCacheNewFloat:
+ * @ctxt: the XPath context
+ * @val: the double value
+ *
+ * This is the cached version of xmlXPathNewFloat().
+ * Acquires an xmlXPathObjectPtr of type double and of value @val
+ *
+ * Returns the created or reused object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheNewFloat(xmlXPathContextPtr ctxt, double val)
+{
+ if ((ctxt != NULL) && (ctxt->cache)) {
+ xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
+
+ if ((cache->numberObjs != NULL) &&
+ (cache->numberObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->numberObjs->items[--cache->numberObjs->number];
+ ret->type = XPATH_NUMBER;
+ ret->floatval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_NUMBER);
+#endif
+ return(ret);
+ } else if ((cache->miscObjs != NULL) &&
+ (cache->miscObjs->number != 0))
+ {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr)
+ cache->miscObjs->items[--cache->miscObjs->number];
+
+ ret->type = XPATH_NUMBER;
+ ret->floatval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(ctxt, XPATH_NUMBER);
+#endif
+ return(ret);
+ }
+ }
+ return(xmlXPathNewFloat(val));
+}
+
+/**
+ * xmlXPathCacheConvertString:
+ * @ctxt: the XPath context
+ * @val: an XPath object
+ *
+ * This is the cached version of xmlXPathConvertString().
+ * Converts an existing object to its string() equivalent
+ *
+ * Returns a created or reused object, the old one is freed (cached)
+ * (or the operation is done directly on @val)
+ */
+
+static xmlXPathObjectPtr
+xmlXPathCacheConvertString(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
+ xmlChar *res = NULL;
+
+ if (val == NULL)
+ return(xmlXPathCacheNewCString(ctxt, ""));
+
+ switch (val->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext, "STRING: undefined\n");
+#endif
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ res = xmlXPathCastNodeSetToString(val->nodesetval);
+ break;
+ case XPATH_STRING:
+ return(val);
+ case XPATH_BOOLEAN:
+ res = xmlXPathCastBooleanToString(val->boolval);
+ break;
+ case XPATH_NUMBER:
+ res = xmlXPathCastNumberToString(val->floatval);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO;
+ break;
+ }
+ xmlXPathReleaseObject(ctxt, val);
+ if (res == NULL)
+ return(xmlXPathCacheNewCString(ctxt, ""));
+ return(xmlXPathCacheWrapString(ctxt, res));
+}
+
+/**
+ * xmlXPathCacheObjectCopy:
+ * @ctxt: the XPath context
+ * @val: the original object
+ *
+ * This is the cached version of xmlXPathObjectCopy().
+ * Acquire a copy of a given object
+ *
+ * Returns a created or reused created object.
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheObjectCopy(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val)
+{
+ if (val == NULL)
+ return(NULL);
+
+ if (XP_HAS_CACHE(ctxt)) {
+ switch (val->type) {
+ case XPATH_NODESET:
+ return(xmlXPathCacheWrapNodeSet(ctxt,
+ xmlXPathNodeSetMerge(NULL, val->nodesetval)));
+ case XPATH_STRING:
+ return(xmlXPathCacheNewString(ctxt, val->stringval));
+ case XPATH_BOOLEAN:
+ return(xmlXPathCacheNewBoolean(ctxt, val->boolval));
+ case XPATH_NUMBER:
+ return(xmlXPathCacheNewFloat(ctxt, val->floatval));
+ default:
+ break;
+ }
+ }
+ return(xmlXPathObjectCopy(val));
+}
+
+/**
+ * xmlXPathCacheConvertBoolean:
+ * @ctxt: the XPath context
+ * @val: an XPath object
+ *
+ * This is the cached version of xmlXPathConvertBoolean().
+ * Converts an existing object to its boolean() equivalent
+ *
+ * Returns a created or reused object, the old one is freed (or the operation
+ * is done directly on @val)
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheConvertBoolean(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
+ xmlXPathObjectPtr ret;
+
+ if (val == NULL)
+ return(xmlXPathCacheNewBoolean(ctxt, 0));
+ if (val->type == XPATH_BOOLEAN)
+ return(val);
+ ret = xmlXPathCacheNewBoolean(ctxt, xmlXPathCastToBoolean(val));
+ xmlXPathReleaseObject(ctxt, val);
+ return(ret);
+}
+
+/**
+ * xmlXPathCacheConvertNumber:
+ * @ctxt: the XPath context
+ * @val: an XPath object
+ *
+ * This is the cached version of xmlXPathConvertNumber().
+ * Converts an existing object to its number() equivalent
+ *
+ * Returns a created or reused object, the old one is freed (or the operation
+ * is done directly on @val)
+ */
+static xmlXPathObjectPtr
+xmlXPathCacheConvertNumber(xmlXPathContextPtr ctxt, xmlXPathObjectPtr val) {
+ xmlXPathObjectPtr ret;
+
+ if (val == NULL)
+ return(xmlXPathCacheNewFloat(ctxt, 0.0));
+ if (val->type == XPATH_NUMBER)
+ return(val);
+ ret = xmlXPathCacheNewFloat(ctxt, xmlXPathCastToNumber(val));
+ xmlXPathReleaseObject(ctxt, val);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Parser stacks related functions and macros *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathSetFrame:
+ * @ctxt: an XPath parser context
+ *
+ * Set the callee evaluation frame
+ *
+ * Returns the previous frame value to be restored once done
+ */
+static int
+xmlXPathSetFrame(xmlXPathParserContextPtr ctxt) {
+ int ret;
+
+ if (ctxt == NULL)
+ return(0);
+ ret = ctxt->valueFrame;
+ ctxt->valueFrame = ctxt->valueNr;
+ return(ret);
+}
+
+/**
+ * xmlXPathPopFrame:
+ * @ctxt: an XPath parser context
+ * @frame: the previous frame value
+ *
+ * Remove the callee evaluation frame
+ */
+static void
+xmlXPathPopFrame(xmlXPathParserContextPtr ctxt, int frame) {
+ if (ctxt == NULL)
+ return;
+ if (ctxt->valueNr < ctxt->valueFrame) {
+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_STACK_ERROR);
+ }
+ ctxt->valueFrame = frame;
+}
+
+/**
+ * valuePop:
+ * @ctxt: an XPath evaluation context
+ *
+ * Pops the top XPath object from the value stack
+ *
+ * Returns the XPath object just removed
+ */
+xmlXPathObjectPtr
+valuePop(xmlXPathParserContextPtr ctxt)
+{
+ xmlXPathObjectPtr ret;
+
+ if ((ctxt == NULL) || (ctxt->valueNr <= 0))
+ return (NULL);
+
+ if (ctxt->valueNr <= ctxt->valueFrame) {
+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_STACK_ERROR);
+ return (NULL);
+ }
+
+ ctxt->valueNr--;
+ if (ctxt->valueNr > 0)
+ ctxt->value = ctxt->valueTab[ctxt->valueNr - 1];
+ else
+ ctxt->value = NULL;
+ ret = ctxt->valueTab[ctxt->valueNr];
+ ctxt->valueTab[ctxt->valueNr] = NULL;
+ return (ret);
+}
+/**
+ * valuePush:
+ * @ctxt: an XPath evaluation context
+ * @value: the XPath object
+ *
+ * Pushes a new XPath object on top of the value stack
+ *
+ * returns the number of items on the value stack
+ */
+int
+valuePush(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr value)
+{
+ if ((ctxt == NULL) || (value == NULL)) return(-1);
+ if (ctxt->valueNr >= ctxt->valueMax) {
+ xmlXPathObjectPtr *tmp;
+
+ if (ctxt->valueMax >= XPATH_MAX_STACK_DEPTH) {
+ xmlXPathErrMemory(NULL, "XPath stack depth limit reached\n");
+ ctxt->error = XPATH_MEMORY_ERROR;
+ return (0);
+ }
+ tmp = (xmlXPathObjectPtr *) xmlRealloc(ctxt->valueTab,
+ 2 * ctxt->valueMax *
+ sizeof(ctxt->valueTab[0]));
+ if (tmp == NULL) {
+ xmlXPathErrMemory(NULL, "pushing value\n");
+ ctxt->error = XPATH_MEMORY_ERROR;
+ return (0);
+ }
+ ctxt->valueMax *= 2;
+ ctxt->valueTab = tmp;
+ }
+ ctxt->valueTab[ctxt->valueNr] = value;
+ ctxt->value = value;
+ return (ctxt->valueNr++);
+}
+
+/**
+ * xmlXPathPopBoolean:
+ * @ctxt: an XPath parser context
+ *
+ * Pops a boolean from the stack, handling conversion if needed.
+ * Check error with #xmlXPathCheckError.
+ *
+ * Returns the boolean
+ */
+int
+xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr obj;
+ int ret;
+
+ obj = valuePop(ctxt);
+ if (obj == NULL) {
+ xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
+ return(0);
+ }
+ if (obj->type != XPATH_BOOLEAN)
+ ret = xmlXPathCastToBoolean(obj);
+ else
+ ret = obj->boolval;
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return(ret);
+}
+
+/**
+ * xmlXPathPopNumber:
+ * @ctxt: an XPath parser context
+ *
+ * Pops a number from the stack, handling conversion if needed.
+ * Check error with #xmlXPathCheckError.
+ *
+ * Returns the number
+ */
+double
+xmlXPathPopNumber (xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr obj;
+ double ret;
+
+ obj = valuePop(ctxt);
+ if (obj == NULL) {
+ xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
+ return(0);
+ }
+ if (obj->type != XPATH_NUMBER)
+ ret = xmlXPathCastToNumber(obj);
+ else
+ ret = obj->floatval;
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return(ret);
+}
+
+/**
+ * xmlXPathPopString:
+ * @ctxt: an XPath parser context
+ *
+ * Pops a string from the stack, handling conversion if needed.
+ * Check error with #xmlXPathCheckError.
+ *
+ * Returns the string
+ */
+xmlChar *
+xmlXPathPopString (xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr obj;
+ xmlChar * ret;
+
+ obj = valuePop(ctxt);
+ if (obj == NULL) {
+ xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
+ return(NULL);
+ }
+ ret = xmlXPathCastToString(obj); /* this does required strdup */
+ /* TODO: needs refactoring somewhere else */
+ if (obj->stringval == ret)
+ obj->stringval = NULL;
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return(ret);
+}
+
+/**
+ * xmlXPathPopNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Pops a node-set from the stack, handling conversion if needed.
+ * Check error with #xmlXPathCheckError.
+ *
+ * Returns the node-set
+ */
+xmlNodeSetPtr
+xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr obj;
+ xmlNodeSetPtr ret;
+
+ if (ctxt == NULL) return(NULL);
+ if (ctxt->value == NULL) {
+ xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
+ return(NULL);
+ }
+ if (!xmlXPathStackIsNodeSet(ctxt)) {
+ xmlXPathSetTypeError(ctxt);
+ return(NULL);
+ }
+ obj = valuePop(ctxt);
+ ret = obj->nodesetval;
+#if 0
+ /* to fix memory leak of not clearing obj->user */
+ if (obj->boolval && obj->user != NULL)
+ xmlFreeNodeList((xmlNodePtr) obj->user);
+#endif
+ obj->nodesetval = NULL;
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return(ret);
+}
+
+/**
+ * xmlXPathPopExternal:
+ * @ctxt: an XPath parser context
+ *
+ * Pops an external object from the stack, handling conversion if needed.
+ * Check error with #xmlXPathCheckError.
+ *
+ * Returns the object
+ */
+void *
+xmlXPathPopExternal (xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr obj;
+ void * ret;
+
+ if ((ctxt == NULL) || (ctxt->value == NULL)) {
+ xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
+ return(NULL);
+ }
+ if (ctxt->value->type != XPATH_USERS) {
+ xmlXPathSetTypeError(ctxt);
+ return(NULL);
+ }
+ obj = valuePop(ctxt);
+ ret = obj->user;
+ obj->user = NULL;
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return(ret);
+}
+
+/*
+ * Macros for accessing the content. Those should be used only by the parser,
+ * and not exported.
+ *
+ * Dirty macros, i.e. one need to make assumption on the context to use them
+ *
+ * CUR_PTR return the current pointer to the xmlChar to be parsed.
+ * CUR returns the current xmlChar value, i.e. a 8 bit value
+ * in ISO-Latin or UTF-8.
+ * This should be used internally by the parser
+ * only to compare to ASCII values otherwise it would break when
+ * running with UTF-8 encoding.
+ * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
+ * to compare on ASCII based substring.
+ * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
+ * strings within the parser.
+ * CURRENT Returns the current char value, with the full decoding of
+ * UTF-8 if we are using this mode. It returns an int.
+ * NEXT Skip to the next character, this does the proper decoding
+ * in UTF-8 mode. It also pop-up unfinished entities on the fly.
+ * It returns the pointer to the current xmlChar.
+ */
+
+#define CUR (*ctxt->cur)
+#define SKIP(val) ctxt->cur += (val)
+#define NXT(val) ctxt->cur[(val)]
+#define CUR_PTR ctxt->cur
+#define CUR_CHAR(l) xmlXPathCurrentChar(ctxt, &l)
+
+#define COPY_BUF(l,b,i,v) \
+ if (l == 1) b[i++] = (xmlChar) v; \
+ else i += xmlCopyChar(l,&b[i],v)
+
+#define NEXTL(l) ctxt->cur += l
+
+#define SKIP_BLANKS \
+ while (IS_BLANK_CH(*(ctxt->cur))) NEXT
+
+#define CURRENT (*ctxt->cur)
+#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
+
+
+#ifndef DBL_DIG
+#define DBL_DIG 16
+#endif
+#ifndef DBL_EPSILON
+#define DBL_EPSILON 1E-9
+#endif
+
+#define UPPER_DOUBLE 1E9
+#define LOWER_DOUBLE 1E-5
+#define LOWER_DOUBLE_EXP 5
+
+#define INTEGER_DIGITS DBL_DIG
+#define FRACTION_DIGITS (DBL_DIG + 1 + (LOWER_DOUBLE_EXP))
+#define EXPONENT_DIGITS (3 + 2)
+
+/**
+ * xmlXPathFormatNumber:
+ * @number: number to format
+ * @buffer: output buffer
+ * @buffersize: size of output buffer
+ *
+ * Convert the number into a string representation.
+ */
+static void
+xmlXPathFormatNumber(double number, char buffer[], int buffersize)
+{
+ switch (xmlXPathIsInf(number)) {
+ case 1:
+ if (buffersize > (int)sizeof("Infinity"))
+ snprintf(buffer, buffersize, "Infinity");
+ break;
+ case -1:
+ if (buffersize > (int)sizeof("-Infinity"))
+ snprintf(buffer, buffersize, "-Infinity");
+ break;
+ default:
+ if (xmlXPathIsNaN(number)) {
+ if (buffersize > (int)sizeof("NaN"))
+ snprintf(buffer, buffersize, "NaN");
+ } else if (number == 0 && xmlXPathGetSign(number) != 0) {
+ snprintf(buffer, buffersize, "0");
+ } else if (number == ((int) number)) {
+ char work[30];
+ char *ptr, *cur;
+ int value = (int) number;
+
+ ptr = &buffer[0];
+ if (value == 0) {
+ *ptr++ = '0';
+ } else {
+ snprintf(work, 29, "%d", value);
+ cur = &work[0];
+ while ((*cur) && (ptr - buffer < buffersize)) {
+ *ptr++ = *cur++;
+ }
+ }
+ if (ptr - buffer < buffersize) {
+ *ptr = 0;
+ } else if (buffersize > 0) {
+ ptr--;
+ *ptr = 0;
+ }
+ } else {
+ /*
+ For the dimension of work,
+ DBL_DIG is number of significant digits
+ EXPONENT is only needed for "scientific notation"
+ 3 is sign, decimal point, and terminating zero
+ LOWER_DOUBLE_EXP is max number of leading zeroes in fraction
+ Note that this dimension is slightly (a few characters)
+ larger than actually necessary.
+ */
+ char work[DBL_DIG + EXPONENT_DIGITS + 3 + LOWER_DOUBLE_EXP];
+ int integer_place, fraction_place;
+ char *ptr;
+ char *after_fraction;
+ double absolute_value;
+ int size;
+
+ absolute_value = fabs(number);
+
+ /*
+ * First choose format - scientific or regular floating point.
+ * In either case, result is in work, and after_fraction points
+ * just past the fractional part.
+ */
+ if ( ((absolute_value > UPPER_DOUBLE) ||
+ (absolute_value < LOWER_DOUBLE)) &&
+ (absolute_value != 0.0) ) {
+ /* Use scientific notation */
+ integer_place = DBL_DIG + EXPONENT_DIGITS + 1;
+ fraction_place = DBL_DIG - 1;
+ size = snprintf(work, sizeof(work),"%*.*e",
+ integer_place, fraction_place, number);
+ while ((size > 0) && (work[size] != 'e')) size--;
+
+ }
+ else {
+ /* Use regular notation */
+ if (absolute_value > 0.0) {
+ integer_place = (int)log10(absolute_value);
+ if (integer_place > 0)
+ fraction_place = DBL_DIG - integer_place - 1;
+ else
+ fraction_place = DBL_DIG - integer_place;
+ } else {
+ fraction_place = 1;
+ }
+ size = snprintf(work, sizeof(work), "%0.*f",
+ fraction_place, number);
+ }
+
+ /* Remove leading spaces sometimes inserted by snprintf */
+ while (work[0] == ' ') {
+ for (ptr = &work[0];(ptr[0] = ptr[1]);ptr++);
+ size--;
+ }
+
+ /* Remove fractional trailing zeroes */
+ after_fraction = work + size;
+ ptr = after_fraction;
+ while (*(--ptr) == '0')
+ ;
+ if (*ptr != '.')
+ ptr++;
+ while ((*ptr++ = *after_fraction++) != 0);
+
+ /* Finally copy result back to caller */
+ size = strlen(work) + 1;
+ if (size > buffersize) {
+ work[buffersize - 1] = 0;
+ size = buffersize;
+ }
+ memmove(buffer, work, size);
+ }
+ break;
+ }
+}
+
+
+/************************************************************************
+ * *
+ * Routines to handle NodeSets *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathOrderDocElems:
+ * @doc: an input document
+ *
+ * Call this routine to speed up XPath computation on static documents.
+ * This stamps all the element nodes with the document order
+ * Like for line information, the order is kept in the element->content
+ * field, the value stored is actually - the node number (starting at -1)
+ * to be able to differentiate from line numbers.
+ *
+ * Returns the number of elements found in the document or -1 in case
+ * of error.
+ */
+long
+xmlXPathOrderDocElems(xmlDocPtr doc) {
+ long count = 0;
+ xmlNodePtr cur;
+
+ if (doc == NULL)
+ return(-1);
+ cur = doc->children;
+ while (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE) {
+ cur->content = (void *) (-(++count));
+ if (cur->children != NULL) {
+ cur = cur->children;
+ continue;
+ }
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ continue;
+ }
+ do {
+ cur = cur->parent;
+ if (cur == NULL)
+ break;
+ if (cur == (xmlNodePtr) doc) {
+ cur = NULL;
+ break;
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+ }
+ return(count);
+}
+
+/**
+ * xmlXPathCmpNodes:
+ * @node1: the first node
+ * @node2: the second node
+ *
+ * Compare two nodes w.r.t document order
+ *
+ * Returns -2 in case of error 1 if first point < second point, 0 if
+ * it's the same node, -1 otherwise
+ */
+int
+xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
+ int depth1, depth2;
+ int attr1 = 0, attr2 = 0;
+ xmlNodePtr attrNode1 = NULL, attrNode2 = NULL;
+ xmlNodePtr cur, root;
+
+ if ((node1 == NULL) || (node2 == NULL))
+ return(-2);
+ /*
+ * a couple of optimizations which will avoid computations in most cases
+ */
+ if (node1 == node2) /* trivial case */
+ return(0);
+ if (node1->type == XML_ATTRIBUTE_NODE) {
+ attr1 = 1;
+ attrNode1 = node1;
+ node1 = node1->parent;
+ }
+ if (node2->type == XML_ATTRIBUTE_NODE) {
+ attr2 = 1;
+ attrNode2 = node2;
+ node2 = node2->parent;
+ }
+ if (node1 == node2) {
+ if (attr1 == attr2) {
+ /* not required, but we keep attributes in order */
+ if (attr1 != 0) {
+ cur = attrNode2->prev;
+ while (cur != NULL) {
+ if (cur == attrNode1)
+ return (1);
+ cur = cur->prev;
+ }
+ return (-1);
+ }
+ return(0);
+ }
+ if (attr2 == 1)
+ return(1);
+ return(-1);
+ }
+ if ((node1->type == XML_NAMESPACE_DECL) ||
+ (node2->type == XML_NAMESPACE_DECL))
+ return(1);
+ if (node1 == node2->prev)
+ return(1);
+ if (node1 == node2->next)
+ return(-1);
+
+ /*
+ * Speedup using document order if availble.
+ */
+ if ((node1->type == XML_ELEMENT_NODE) &&
+ (node2->type == XML_ELEMENT_NODE) &&
+ (0 > (long) node1->content) &&
+ (0 > (long) node2->content) &&
+ (node1->doc == node2->doc)) {
+ long l1, l2;
+
+ l1 = -((long) node1->content);
+ l2 = -((long) node2->content);
+ if (l1 < l2)
+ return(1);
+ if (l1 > l2)
+ return(-1);
+ }
+
+ /*
+ * compute depth to root
+ */
+ for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
+ if (cur == node1)
+ return(1);
+ depth2++;
+ }
+ root = cur;
+ for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
+ if (cur == node2)
+ return(-1);
+ depth1++;
+ }
+ /*
+ * Distinct document (or distinct entities :-( ) case.
+ */
+ if (root != cur) {
+ return(-2);
+ }
+ /*
+ * get the nearest common ancestor.
+ */
+ while (depth1 > depth2) {
+ depth1--;
+ node1 = node1->parent;
+ }
+ while (depth2 > depth1) {
+ depth2--;
+ node2 = node2->parent;
+ }
+ while (node1->parent != node2->parent) {
+ node1 = node1->parent;
+ node2 = node2->parent;
+ /* should not happen but just in case ... */
+ if ((node1 == NULL) || (node2 == NULL))
+ return(-2);
+ }
+ /*
+ * Find who's first.
+ */
+ if (node1 == node2->prev)
+ return(1);
+ if (node1 == node2->next)
+ return(-1);
+ /*
+ * Speedup using document order if availble.
+ */
+ if ((node1->type == XML_ELEMENT_NODE) &&
+ (node2->type == XML_ELEMENT_NODE) &&
+ (0 > (long) node1->content) &&
+ (0 > (long) node2->content) &&
+ (node1->doc == node2->doc)) {
+ long l1, l2;
+
+ l1 = -((long) node1->content);
+ l2 = -((long) node2->content);
+ if (l1 < l2)
+ return(1);
+ if (l1 > l2)
+ return(-1);
+ }
+
+ for (cur = node1->next;cur != NULL;cur = cur->next)
+ if (cur == node2)
+ return(1);
+ return(-1); /* assume there is no sibling list corruption */
+}
+
+/**
+ * xmlXPathNodeSetSort:
+ * @set: the node set
+ *
+ * Sort the node set in document order
+ */
+void
+xmlXPathNodeSetSort(xmlNodeSetPtr set) {
+#ifndef WITH_TIM_SORT
+ int i, j, incr, len;
+ xmlNodePtr tmp;
+#endif
+
+ if (set == NULL)
+ return;
+
+#ifndef WITH_TIM_SORT
+ /*
+ * Use the old Shell's sort implementation to sort the node-set
+ * Timsort ought to be quite faster
+ */
+ len = set->nodeNr;
+ for (incr = len / 2; incr > 0; incr /= 2) {
+ for (i = incr; i < len; i++) {
+ j = i - incr;
+ while (j >= 0) {
+#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
+ if (xmlXPathCmpNodesExt(set->nodeTab[j],
+ set->nodeTab[j + incr]) == -1)
+#else
+ if (xmlXPathCmpNodes(set->nodeTab[j],
+ set->nodeTab[j + incr]) == -1)
+#endif
+ {
+ tmp = set->nodeTab[j];
+ set->nodeTab[j] = set->nodeTab[j + incr];
+ set->nodeTab[j + incr] = tmp;
+ j -= incr;
+ } else
+ break;
+ }
+ }
+ }
+#else /* WITH_TIM_SORT */
+ libxml_domnode_tim_sort(set->nodeTab, set->nodeNr);
+#endif /* WITH_TIM_SORT */
+}
+
+#define XML_NODESET_DEFAULT 10
+/**
+ * xmlXPathNodeSetDupNs:
+ * @node: the parent node of the namespace XPath node
+ * @ns: the libxml namespace declaration node.
+ *
+ * Namespace node in libxml don't match the XPath semantic. In a node set
+ * the namespace nodes are duplicated and the next pointer is set to the
+ * parent node in the XPath semantic.
+ *
+ * Returns the newly created object.
+ */
+static xmlNodePtr
+xmlXPathNodeSetDupNs(xmlNodePtr node, xmlNsPtr ns) {
+ xmlNsPtr cur;
+
+ if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
+ return(NULL);
+ if ((node == NULL) || (node->type == XML_NAMESPACE_DECL))
+ return((xmlNodePtr) ns);
+
+ /*
+ * Allocate a new Namespace and fill the fields.
+ */
+ cur = (xmlNsPtr) xmlMalloc(sizeof(xmlNs));
+ if (cur == NULL) {
+ xmlXPathErrMemory(NULL, "duplicating namespace\n");
+ return(NULL);
+ }
+ memset(cur, 0, sizeof(xmlNs));
+ cur->type = XML_NAMESPACE_DECL;
+ if (ns->href != NULL)
+ cur->href = xmlStrdup(ns->href);
+ if (ns->prefix != NULL)
+ cur->prefix = xmlStrdup(ns->prefix);
+ cur->next = (xmlNsPtr) node;
+ return((xmlNodePtr) cur);
+}
+
+/**
+ * xmlXPathNodeSetFreeNs:
+ * @ns: the XPath namespace node found in a nodeset.
+ *
+ * Namespace nodes in libxml don't match the XPath semantic. In a node set
+ * the namespace nodes are duplicated and the next pointer is set to the
+ * parent node in the XPath semantic. Check if such a node needs to be freed
+ */
+void
+xmlXPathNodeSetFreeNs(xmlNsPtr ns) {
+ if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
+ return;
+
+ if ((ns->next != NULL) && (ns->next->type != XML_NAMESPACE_DECL)) {
+ if (ns->href != NULL)
+ xmlFree((xmlChar *)ns->href);
+ if (ns->prefix != NULL)
+ xmlFree((xmlChar *)ns->prefix);
+ xmlFree(ns);
+ }
+}
+
+/**
+ * xmlXPathNodeSetCreate:
+ * @val: an initial xmlNodePtr, or NULL
+ *
+ * Create a new xmlNodeSetPtr of type double and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlNodeSetPtr
+xmlXPathNodeSetCreate(xmlNodePtr val) {
+ xmlNodeSetPtr ret;
+
+ ret = (xmlNodeSetPtr) xmlMalloc(sizeof(xmlNodeSet));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating nodeset\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlNodeSet));
+ if (val != NULL) {
+ ret->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
+ sizeof(xmlNodePtr));
+ if (ret->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "creating nodeset\n");
+ xmlFree(ret);
+ return(NULL);
+ }
+ memset(ret->nodeTab, 0 ,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ ret->nodeMax = XML_NODESET_DEFAULT;
+ if (val->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) val;
+
+ ret->nodeTab[ret->nodeNr++] =
+ xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ } else
+ ret->nodeTab[ret->nodeNr++] = val;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathNodeSetCreateSize:
+ * @size: the initial size of the set
+ *
+ * Create a new xmlNodeSetPtr of type double and of value @val
+ *
+ * Returns the newly created object.
+ */
+static xmlNodeSetPtr
+xmlXPathNodeSetCreateSize(int size) {
+ xmlNodeSetPtr ret;
+
+ ret = (xmlNodeSetPtr) xmlMalloc(sizeof(xmlNodeSet));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating nodeset\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlNodeSet));
+ if (size < XML_NODESET_DEFAULT)
+ size = XML_NODESET_DEFAULT;
+ ret->nodeTab = (xmlNodePtr *) xmlMalloc(size * sizeof(xmlNodePtr));
+ if (ret->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "creating nodeset\n");
+ xmlFree(ret);
+ return(NULL);
+ }
+ memset(ret->nodeTab, 0 , size * (size_t) sizeof(xmlNodePtr));
+ ret->nodeMax = size;
+ return(ret);
+}
+
+/**
+ * xmlXPathNodeSetContains:
+ * @cur: the node-set
+ * @val: the node
+ *
+ * checks whether @cur contains @val
+ *
+ * Returns true (1) if @cur contains @val, false (0) otherwise
+ */
+int
+xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val) {
+ int i;
+
+ if ((cur == NULL) || (val == NULL)) return(0);
+ if (val->type == XML_NAMESPACE_DECL) {
+ for (i = 0; i < cur->nodeNr; i++) {
+ if (cur->nodeTab[i]->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns1, ns2;
+
+ ns1 = (xmlNsPtr) val;
+ ns2 = (xmlNsPtr) cur->nodeTab[i];
+ if (ns1 == ns2)
+ return(1);
+ if ((ns1->next != NULL) && (ns2->next == ns1->next) &&
+ (xmlStrEqual(ns1->prefix, ns2->prefix)))
+ return(1);
+ }
+ }
+ } else {
+ for (i = 0; i < cur->nodeNr; i++) {
+ if (cur->nodeTab[i] == val)
+ return(1);
+ }
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathNodeSetAddNs:
+ * @cur: the initial node set
+ * @node: the hosting node
+ * @ns: a the namespace node
+ *
+ * add a new namespace node to an existing NodeSet
+ *
+ * Returns 0 in case of success and -1 in case of error
+ */
+int
+xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, xmlNodePtr node, xmlNsPtr ns) {
+ int i;
+
+
+ if ((cur == NULL) || (ns == NULL) || (node == NULL) ||
+ (ns->type != XML_NAMESPACE_DECL) ||
+ (node->type != XML_ELEMENT_NODE))
+ return(-1);
+
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+ /*
+ * prevent duplicates
+ */
+ for (i = 0;i < cur->nodeNr;i++) {
+ if ((cur->nodeTab[i] != NULL) &&
+ (cur->nodeTab[i]->type == XML_NAMESPACE_DECL) &&
+ (((xmlNsPtr)cur->nodeTab[i])->next == (xmlNsPtr) node) &&
+ (xmlStrEqual(ns->prefix, ((xmlNsPtr)cur->nodeTab[i])->prefix)))
+ return(0);
+ }
+
+ /*
+ * grow the nodeTab if needed
+ */
+ if (cur->nodeMax == 0) {
+ cur->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
+ sizeof(xmlNodePtr));
+ if (cur->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ memset(cur->nodeTab, 0 ,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ cur->nodeMax = XML_NODESET_DEFAULT;
+ } else if (cur->nodeNr == cur->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n");
+ return(-1);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 *
+ sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ cur->nodeMax *= 2;
+ cur->nodeTab = temp;
+ }
+ cur->nodeTab[cur->nodeNr++] = xmlXPathNodeSetDupNs(node, ns);
+ return(0);
+}
+
+/**
+ * xmlXPathNodeSetAdd:
+ * @cur: the initial node set
+ * @val: a new xmlNodePtr
+ *
+ * add a new xmlNodePtr to an existing NodeSet
+ *
+ * Returns 0 in case of success, and -1 in case of error
+ */
+int
+xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) {
+ int i;
+
+ if ((cur == NULL) || (val == NULL)) return(-1);
+
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+ /*
+ * prevent duplcates
+ */
+ for (i = 0;i < cur->nodeNr;i++)
+ if (cur->nodeTab[i] == val) return(0);
+
+ /*
+ * grow the nodeTab if needed
+ */
+ if (cur->nodeMax == 0) {
+ cur->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
+ sizeof(xmlNodePtr));
+ if (cur->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ memset(cur->nodeTab, 0 ,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ cur->nodeMax = XML_NODESET_DEFAULT;
+ } else if (cur->nodeNr == cur->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n");
+ return(-1);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 *
+ sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ cur->nodeMax *= 2;
+ cur->nodeTab = temp;
+ }
+ if (val->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) val;
+
+ cur->nodeTab[cur->nodeNr++] =
+ xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ } else
+ cur->nodeTab[cur->nodeNr++] = val;
+ return(0);
+}
+
+/**
+ * xmlXPathNodeSetAddUnique:
+ * @cur: the initial node set
+ * @val: a new xmlNodePtr
+ *
+ * add a new xmlNodePtr to an existing NodeSet, optimized version
+ * when we are sure the node is not already in the set.
+ *
+ * Returns 0 in case of success and -1 in case of failure
+ */
+int
+xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
+ if ((cur == NULL) || (val == NULL)) return(-1);
+
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+ /*
+ * grow the nodeTab if needed
+ */
+ if (cur->nodeMax == 0) {
+ cur->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
+ sizeof(xmlNodePtr));
+ if (cur->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ memset(cur->nodeTab, 0 ,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ cur->nodeMax = XML_NODESET_DEFAULT;
+ } else if (cur->nodeNr == cur->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (cur->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "growing nodeset hit limit\n");
+ return(-1);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 *
+ sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "growing nodeset\n");
+ return(-1);
+ }
+ cur->nodeTab = temp;
+ cur->nodeMax *= 2;
+ }
+ if (val->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) val;
+
+ cur->nodeTab[cur->nodeNr++] =
+ xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ } else
+ cur->nodeTab[cur->nodeNr++] = val;
+ return(0);
+}
+
+/**
+ * xmlXPathNodeSetMerge:
+ * @val1: the first NodeSet or NULL
+ * @val2: the second NodeSet
+ *
+ * Merges two nodesets, all nodes from @val2 are added to @val1
+ * if @val1 is NULL, a new set is created and copied from @val2
+ *
+ * Returns @val1 once extended or NULL in case of error.
+ */
+xmlNodeSetPtr
+xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) {
+ int i, j, initNr, skip;
+ xmlNodePtr n1, n2;
+
+ if (val2 == NULL) return(val1);
+ if (val1 == NULL) {
+ val1 = xmlXPathNodeSetCreate(NULL);
+ if (val1 == NULL)
+ return (NULL);
+#if 0
+ /*
+ * TODO: The optimization won't work in every case, since
+ * those nasty namespace nodes need to be added with
+ * xmlXPathNodeSetDupNs() to the set; thus a pure
+ * memcpy is not possible.
+ * If there was a flag on the nodesetval, indicating that
+ * some temporary nodes are in, that would be helpfull.
+ */
+ /*
+ * Optimization: Create an equally sized node-set
+ * and memcpy the content.
+ */
+ val1 = xmlXPathNodeSetCreateSize(val2->nodeNr);
+ if (val1 == NULL)
+ return(NULL);
+ if (val2->nodeNr != 0) {
+ if (val2->nodeNr == 1)
+ *(val1->nodeTab) = *(val2->nodeTab);
+ else {
+ memcpy(val1->nodeTab, val2->nodeTab,
+ val2->nodeNr * sizeof(xmlNodePtr));
+ }
+ val1->nodeNr = val2->nodeNr;
+ }
+ return(val1);
+#endif
+ }
+
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+ initNr = val1->nodeNr;
+
+ for (i = 0;i < val2->nodeNr;i++) {
+ n2 = val2->nodeTab[i];
+ /*
+ * check against duplicates
+ */
+ skip = 0;
+ for (j = 0; j < initNr; j++) {
+ n1 = val1->nodeTab[j];
+ if (n1 == n2) {
+ skip = 1;
+ break;
+ } else if ((n1->type == XML_NAMESPACE_DECL) &&
+ (n2->type == XML_NAMESPACE_DECL)) {
+ if ((((xmlNsPtr) n1)->next == ((xmlNsPtr) n2)->next) &&
+ (xmlStrEqual(((xmlNsPtr) n1)->prefix,
+ ((xmlNsPtr) n2)->prefix)))
+ {
+ skip = 1;
+ break;
+ }
+ }
+ }
+ if (skip)
+ continue;
+
+ /*
+ * grow the nodeTab if needed
+ */
+ if (val1->nodeMax == 0) {
+ val1->nodeTab = (xmlNodePtr *) xmlMalloc(XML_NODESET_DEFAULT *
+ sizeof(xmlNodePtr));
+ if (val1->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ memset(val1->nodeTab, 0 ,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ val1->nodeMax = XML_NODESET_DEFAULT;
+ } else if (val1->nodeNr == val1->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (val1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
+ return(NULL);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * 2 *
+ sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ val1->nodeTab = temp;
+ val1->nodeMax *= 2;
+ }
+ if (n2->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) n2;
+
+ val1->nodeTab[val1->nodeNr++] =
+ xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ } else
+ val1->nodeTab[val1->nodeNr++] = n2;
+ }
+
+ return(val1);
+}
+
+
+/**
+ * xmlXPathNodeSetMergeAndClear:
+ * @set1: the first NodeSet or NULL
+ * @set2: the second NodeSet
+ * @hasSet2NsNodes: 1 if set2 contains namespaces nodes
+ *
+ * Merges two nodesets, all nodes from @set2 are added to @set1
+ * if @set1 is NULL, a new set is created and copied from @set2.
+ * Checks for duplicate nodes. Clears set2.
+ *
+ * Returns @set1 once extended or NULL in case of error.
+ */
+static xmlNodeSetPtr
+xmlXPathNodeSetMergeAndClear(xmlNodeSetPtr set1, xmlNodeSetPtr set2,
+ int hasNullEntries)
+{
+ if ((set1 == NULL) && (hasNullEntries == 0)) {
+ /*
+ * Note that doing a memcpy of the list, namespace nodes are
+ * just assigned to set1, since set2 is cleared anyway.
+ */
+ set1 = xmlXPathNodeSetCreateSize(set2->nodeNr);
+ if (set1 == NULL)
+ return(NULL);
+ if (set2->nodeNr != 0) {
+ memcpy(set1->nodeTab, set2->nodeTab,
+ set2->nodeNr * sizeof(xmlNodePtr));
+ set1->nodeNr = set2->nodeNr;
+ }
+ } else {
+ int i, j, initNbSet1;
+ xmlNodePtr n1, n2;
+
+ if (set1 == NULL)
+ set1 = xmlXPathNodeSetCreate(NULL);
+ if (set1 == NULL)
+ return (NULL);
+
+ initNbSet1 = set1->nodeNr;
+ for (i = 0;i < set2->nodeNr;i++) {
+ n2 = set2->nodeTab[i];
+ /*
+ * Skip NULLed entries.
+ */
+ if (n2 == NULL)
+ continue;
+ /*
+ * Skip duplicates.
+ */
+ for (j = 0; j < initNbSet1; j++) {
+ n1 = set1->nodeTab[j];
+ if (n1 == n2) {
+ goto skip_node;
+ } else if ((n1->type == XML_NAMESPACE_DECL) &&
+ (n2->type == XML_NAMESPACE_DECL))
+ {
+ if ((((xmlNsPtr) n1)->next == ((xmlNsPtr) n2)->next) &&
+ (xmlStrEqual(((xmlNsPtr) n1)->prefix,
+ ((xmlNsPtr) n2)->prefix)))
+ {
+ /*
+ * Free the namespace node.
+ */
+ set2->nodeTab[i] = NULL;
+ xmlXPathNodeSetFreeNs((xmlNsPtr) n2);
+ goto skip_node;
+ }
+ }
+ }
+ /*
+ * grow the nodeTab if needed
+ */
+ if (set1->nodeMax == 0) {
+ set1->nodeTab = (xmlNodePtr *) xmlMalloc(
+ XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
+ if (set1->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ memset(set1->nodeTab, 0,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ set1->nodeMax = XML_NODESET_DEFAULT;
+ } else if (set1->nodeNr >= set1->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
+ return(NULL);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(
+ set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ set1->nodeTab = temp;
+ set1->nodeMax *= 2;
+ }
+ if (n2->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) n2;
+
+ set1->nodeTab[set1->nodeNr++] =
+ xmlXPathNodeSetDupNs((xmlNodePtr) ns->next, ns);
+ } else
+ set1->nodeTab[set1->nodeNr++] = n2;
+skip_node:
+ {}
+ }
+ }
+ set2->nodeNr = 0;
+ return(set1);
+}
+
+/**
+ * xmlXPathNodeSetMergeAndClearNoDupls:
+ * @set1: the first NodeSet or NULL
+ * @set2: the second NodeSet
+ * @hasSet2NsNodes: 1 if set2 contains namespaces nodes
+ *
+ * Merges two nodesets, all nodes from @set2 are added to @set1
+ * if @set1 is NULL, a new set is created and copied from @set2.
+ * Doesn't chack for duplicate nodes. Clears set2.
+ *
+ * Returns @set1 once extended or NULL in case of error.
+ */
+static xmlNodeSetPtr
+xmlXPathNodeSetMergeAndClearNoDupls(xmlNodeSetPtr set1, xmlNodeSetPtr set2,
+ int hasNullEntries)
+{
+ if (set2 == NULL)
+ return(set1);
+ if ((set1 == NULL) && (hasNullEntries == 0)) {
+ /*
+ * Note that doing a memcpy of the list, namespace nodes are
+ * just assigned to set1, since set2 is cleared anyway.
+ */
+ set1 = xmlXPathNodeSetCreateSize(set2->nodeNr);
+ if (set1 == NULL)
+ return(NULL);
+ if (set2->nodeNr != 0) {
+ memcpy(set1->nodeTab, set2->nodeTab,
+ set2->nodeNr * sizeof(xmlNodePtr));
+ set1->nodeNr = set2->nodeNr;
+ }
+ } else {
+ int i;
+ xmlNodePtr n2;
+
+ if (set1 == NULL)
+ set1 = xmlXPathNodeSetCreate(NULL);
+ if (set1 == NULL)
+ return (NULL);
+
+ for (i = 0;i < set2->nodeNr;i++) {
+ n2 = set2->nodeTab[i];
+ /*
+ * Skip NULLed entries.
+ */
+ if (n2 == NULL)
+ continue;
+ if (set1->nodeMax == 0) {
+ set1->nodeTab = (xmlNodePtr *) xmlMalloc(
+ XML_NODESET_DEFAULT * sizeof(xmlNodePtr));
+ if (set1->nodeTab == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ memset(set1->nodeTab, 0,
+ XML_NODESET_DEFAULT * (size_t) sizeof(xmlNodePtr));
+ set1->nodeMax = XML_NODESET_DEFAULT;
+ } else if (set1->nodeNr >= set1->nodeMax) {
+ xmlNodePtr *temp;
+
+ if (set1->nodeMax >= XPATH_MAX_NODESET_LENGTH) {
+ xmlXPathErrMemory(NULL, "merging nodeset hit limit\n");
+ return(NULL);
+ }
+ temp = (xmlNodePtr *) xmlRealloc(
+ set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr));
+ if (temp == NULL) {
+ xmlXPathErrMemory(NULL, "merging nodeset\n");
+ return(NULL);
+ }
+ set1->nodeTab = temp;
+ set1->nodeMax *= 2;
+ }
+ set1->nodeTab[set1->nodeNr++] = n2;
+ }
+ }
+ set2->nodeNr = 0;
+ return(set1);
+}
+
+/**
+ * xmlXPathNodeSetDel:
+ * @cur: the initial node set
+ * @val: an xmlNodePtr
+ *
+ * Removes an xmlNodePtr from an existing NodeSet
+ */
+void
+xmlXPathNodeSetDel(xmlNodeSetPtr cur, xmlNodePtr val) {
+ int i;
+
+ if (cur == NULL) return;
+ if (val == NULL) return;
+
+ /*
+ * find node in nodeTab
+ */
+ for (i = 0;i < cur->nodeNr;i++)
+ if (cur->nodeTab[i] == val) break;
+
+ if (i >= cur->nodeNr) { /* not found */
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathNodeSetDel: Node %s wasn't found in NodeList\n",
+ val->name);
+#endif
+ return;
+ }
+ if ((cur->nodeTab[i] != NULL) &&
+ (cur->nodeTab[i]->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) cur->nodeTab[i]);
+ cur->nodeNr--;
+ for (;i < cur->nodeNr;i++)
+ cur->nodeTab[i] = cur->nodeTab[i + 1];
+ cur->nodeTab[cur->nodeNr] = NULL;
+}
+
+/**
+ * xmlXPathNodeSetRemove:
+ * @cur: the initial node set
+ * @val: the index to remove
+ *
+ * Removes an entry from an existing NodeSet list.
+ */
+void
+xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val) {
+ if (cur == NULL) return;
+ if (val >= cur->nodeNr) return;
+ if ((cur->nodeTab[val] != NULL) &&
+ (cur->nodeTab[val]->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) cur->nodeTab[val]);
+ cur->nodeNr--;
+ for (;val < cur->nodeNr;val++)
+ cur->nodeTab[val] = cur->nodeTab[val + 1];
+ cur->nodeTab[cur->nodeNr] = NULL;
+}
+
+/**
+ * xmlXPathFreeNodeSet:
+ * @obj: the xmlNodeSetPtr to free
+ *
+ * Free the NodeSet compound (not the actual nodes !).
+ */
+void
+xmlXPathFreeNodeSet(xmlNodeSetPtr obj) {
+ if (obj == NULL) return;
+ if (obj->nodeTab != NULL) {
+ int i;
+
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+ for (i = 0;i < obj->nodeNr;i++)
+ if ((obj->nodeTab[i] != NULL) &&
+ (obj->nodeTab[i]->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) obj->nodeTab[i]);
+ xmlFree(obj->nodeTab);
+ }
+ xmlFree(obj);
+}
+
+/**
+ * xmlXPathNodeSetClear:
+ * @set: the node set to clear
+ *
+ * Clears the list from all temporary XPath objects (e.g. namespace nodes
+ * are feed), but does *not* free the list itself. Sets the length of the
+ * list to 0.
+ */
+static void
+xmlXPathNodeSetClear(xmlNodeSetPtr set, int hasNsNodes)
+{
+ if ((set == NULL) || (set->nodeNr <= 0))
+ return;
+ else if (hasNsNodes) {
+ int i;
+ xmlNodePtr node;
+
+ for (i = 0; i < set->nodeNr; i++) {
+ node = set->nodeTab[i];
+ if ((node != NULL) &&
+ (node->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) node);
+ }
+ }
+ set->nodeNr = 0;
+}
+
+/**
+ * xmlXPathNodeSetClearFromPos:
+ * @set: the node set to be cleared
+ * @pos: the start position to clear from
+ *
+ * Clears the list from temporary XPath objects (e.g. namespace nodes
+ * are feed) starting with the entry at @pos, but does *not* free the list
+ * itself. Sets the length of the list to @pos.
+ */
+static void
+xmlXPathNodeSetClearFromPos(xmlNodeSetPtr set, int pos, int hasNsNodes)
+{
+ if ((set == NULL) || (set->nodeNr <= 0) || (pos >= set->nodeNr))
+ return;
+ else if ((hasNsNodes)) {
+ int i;
+ xmlNodePtr node;
+
+ for (i = pos; i < set->nodeNr; i++) {
+ node = set->nodeTab[i];
+ if ((node != NULL) &&
+ (node->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) node);
+ }
+ }
+ set->nodeNr = pos;
+}
+
+/**
+ * xmlXPathFreeValueTree:
+ * @obj: the xmlNodeSetPtr to free
+ *
+ * Free the NodeSet compound and the actual tree, this is different
+ * from xmlXPathFreeNodeSet()
+ */
+static void
+xmlXPathFreeValueTree(xmlNodeSetPtr obj) {
+ int i;
+
+ if (obj == NULL) return;
+
+ if (obj->nodeTab != NULL) {
+ for (i = 0;i < obj->nodeNr;i++) {
+ if (obj->nodeTab[i] != NULL) {
+ if (obj->nodeTab[i]->type == XML_NAMESPACE_DECL) {
+ xmlXPathNodeSetFreeNs((xmlNsPtr) obj->nodeTab[i]);
+ } else {
+ xmlFreeNodeList(obj->nodeTab[i]);
+ }
+ }
+ }
+ xmlFree(obj->nodeTab);
+ }
+ xmlFree(obj);
+}
+
+#if defined(DEBUG) || defined(DEBUG_STEP)
+/**
+ * xmlGenericErrorContextNodeSet:
+ * @output: a FILE * for the output
+ * @obj: the xmlNodeSetPtr to display
+ *
+ * Quick display of a NodeSet
+ */
+void
+xmlGenericErrorContextNodeSet(FILE *output, xmlNodeSetPtr obj) {
+ int i;
+
+ if (output == NULL) output = xmlGenericErrorContext;
+ if (obj == NULL) {
+ fprintf(output, "NodeSet == NULL !\n");
+ return;
+ }
+ if (obj->nodeNr == 0) {
+ fprintf(output, "NodeSet is empty\n");
+ return;
+ }
+ if (obj->nodeTab == NULL) {
+ fprintf(output, " nodeTab == NULL !\n");
+ return;
+ }
+ for (i = 0; i < obj->nodeNr; i++) {
+ if (obj->nodeTab[i] == NULL) {
+ fprintf(output, " NULL !\n");
+ return;
+ }
+ if ((obj->nodeTab[i]->type == XML_DOCUMENT_NODE) ||
+ (obj->nodeTab[i]->type == XML_HTML_DOCUMENT_NODE))
+ fprintf(output, " /");
+ else if (obj->nodeTab[i]->name == NULL)
+ fprintf(output, " noname!");
+ else fprintf(output, " %s", obj->nodeTab[i]->name);
+ }
+ fprintf(output, "\n");
+}
+#endif
+
+/**
+ * xmlXPathNewNodeSet:
+ * @val: the NodePtr value
+ *
+ * Create a new xmlXPathObjectPtr of type NodeSet and initialize
+ * it with the single Node @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewNodeSet(xmlNodePtr val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating nodeset\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_NODESET;
+ ret->boolval = 0;
+ ret->nodesetval = xmlXPathNodeSetCreate(val);
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_NODESET);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathNewValueTree:
+ * @val: the NodePtr value
+ *
+ * Create a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize
+ * it with the tree root @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewValueTree(xmlNodePtr val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating result value tree\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_XSLT_TREE;
+ ret->boolval = 1;
+ ret->user = (void *) val;
+ ret->nodesetval = xmlXPathNodeSetCreate(val);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_XSLT_TREE);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathNewNodeSetList:
+ * @val: an existing NodeSet
+ *
+ * Create a new xmlXPathObjectPtr of type NodeSet and initialize
+ * it with the Nodeset @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewNodeSetList(xmlNodeSetPtr val)
+{
+ xmlXPathObjectPtr ret;
+ int i;
+
+ if (val == NULL)
+ ret = NULL;
+ else if (val->nodeTab == NULL)
+ ret = xmlXPathNewNodeSet(NULL);
+ else {
+ ret = xmlXPathNewNodeSet(val->nodeTab[0]);
+ if (ret) {
+ for (i = 1; i < val->nodeNr; ++i) {
+ if (xmlXPathNodeSetAddUnique(ret->nodesetval, val->nodeTab[i])
+ < 0) break;
+ }
+ }
+ }
+
+ return (ret);
+}
+
+/**
+ * xmlXPathWrapNodeSet:
+ * @val: the NodePtr value
+ *
+ * Wrap the Nodeset @val in a new xmlXPathObjectPtr
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathWrapNodeSet(xmlNodeSetPtr val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating node set object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_NODESET;
+ ret->nodesetval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_NODESET);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathFreeNodeSetList:
+ * @obj: an existing NodeSetList object
+ *
+ * Free up the xmlXPathObjectPtr @obj but don't deallocate the objects in
+ * the list contrary to xmlXPathFreeObject().
+ */
+void
+xmlXPathFreeNodeSetList(xmlXPathObjectPtr obj) {
+ if (obj == NULL) return;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageReleased(NULL, obj->type);
+#endif
+ xmlFree(obj);
+}
+
+/**
+ * xmlXPathDifference:
+ * @nodes1: a node-set
+ * @nodes2: a node-set
+ *
+ * Implements the EXSLT - Sets difference() function:
+ * node-set set:difference (node-set, node-set)
+ *
+ * Returns the difference between the two node sets, or nodes1 if
+ * nodes2 is empty
+ */
+xmlNodeSetPtr
+xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ xmlNodeSetPtr ret;
+ int i, l1;
+ xmlNodePtr cur;
+
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(nodes1);
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ if (xmlXPathNodeSetIsEmpty(nodes1))
+ return(ret);
+
+ l1 = xmlXPathNodeSetGetLength(nodes1);
+
+ for (i = 0; i < l1; i++) {
+ cur = xmlXPathNodeSetItem(nodes1, i);
+ if (!xmlXPathNodeSetContains(nodes2, cur)) {
+ if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+ break;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathIntersection:
+ * @nodes1: a node-set
+ * @nodes2: a node-set
+ *
+ * Implements the EXSLT - Sets intersection() function:
+ * node-set set:intersection (node-set, node-set)
+ *
+ * Returns a node set comprising the nodes that are within both the
+ * node sets passed as arguments
+ */
+xmlNodeSetPtr
+xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ xmlNodeSetPtr ret = xmlXPathNodeSetCreate(NULL);
+ int i, l1;
+ xmlNodePtr cur;
+
+ if (ret == NULL)
+ return(ret);
+ if (xmlXPathNodeSetIsEmpty(nodes1))
+ return(ret);
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(ret);
+
+ l1 = xmlXPathNodeSetGetLength(nodes1);
+
+ for (i = 0; i < l1; i++) {
+ cur = xmlXPathNodeSetItem(nodes1, i);
+ if (xmlXPathNodeSetContains(nodes2, cur)) {
+ if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+ break;
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathDistinctSorted:
+ * @nodes: a node-set, sorted by document order
+ *
+ * Implements the EXSLT - Sets distinct() function:
+ * node-set set:distinct (node-set)
+ *
+ * Returns a subset of the nodes contained in @nodes, or @nodes if
+ * it is empty
+ */
+xmlNodeSetPtr
+xmlXPathDistinctSorted (xmlNodeSetPtr nodes) {
+ xmlNodeSetPtr ret;
+ xmlHashTablePtr hash;
+ int i, l;
+ xmlChar * strval;
+ xmlNodePtr cur;
+
+ if (xmlXPathNodeSetIsEmpty(nodes))
+ return(nodes);
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ if (ret == NULL)
+ return(ret);
+ l = xmlXPathNodeSetGetLength(nodes);
+ hash = xmlHashCreate (l);
+ for (i = 0; i < l; i++) {
+ cur = xmlXPathNodeSetItem(nodes, i);
+ strval = xmlXPathCastNodeToString(cur);
+ if (xmlHashLookup(hash, strval) == NULL) {
+ xmlHashAddEntry(hash, strval, strval);
+ if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+ break;
+ } else {
+ xmlFree(strval);
+ }
+ }
+ xmlHashFree(hash, (xmlHashDeallocator) xmlFree);
+ return(ret);
+}
+
+/**
+ * xmlXPathDistinct:
+ * @nodes: a node-set
+ *
+ * Implements the EXSLT - Sets distinct() function:
+ * node-set set:distinct (node-set)
+ * @nodes is sorted by document order, then #exslSetsDistinctSorted
+ * is called with the sorted node-set
+ *
+ * Returns a subset of the nodes contained in @nodes, or @nodes if
+ * it is empty
+ */
+xmlNodeSetPtr
+xmlXPathDistinct (xmlNodeSetPtr nodes) {
+ if (xmlXPathNodeSetIsEmpty(nodes))
+ return(nodes);
+
+ xmlXPathNodeSetSort(nodes);
+ return(xmlXPathDistinctSorted(nodes));
+}
+
+/**
+ * xmlXPathHasSameNodes:
+ * @nodes1: a node-set
+ * @nodes2: a node-set
+ *
+ * Implements the EXSLT - Sets has-same-nodes function:
+ * boolean set:has-same-node(node-set, node-set)
+ *
+ * Returns true (1) if @nodes1 shares any node with @nodes2, false (0)
+ * otherwise
+ */
+int
+xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ int i, l;
+ xmlNodePtr cur;
+
+ if (xmlXPathNodeSetIsEmpty(nodes1) ||
+ xmlXPathNodeSetIsEmpty(nodes2))
+ return(0);
+
+ l = xmlXPathNodeSetGetLength(nodes1);
+ for (i = 0; i < l; i++) {
+ cur = xmlXPathNodeSetItem(nodes1, i);
+ if (xmlXPathNodeSetContains(nodes2, cur))
+ return(1);
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathNodeLeadingSorted:
+ * @nodes: a node-set, sorted by document order
+ * @node: a node
+ *
+ * Implements the EXSLT - Sets leading() function:
+ * node-set set:leading (node-set, node-set)
+ *
+ * Returns the nodes in @nodes that precede @node in document order,
+ * @nodes if @node is NULL or an empty node-set if @nodes
+ * doesn't contain @node
+ */
+xmlNodeSetPtr
+xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes, xmlNodePtr node) {
+ int i, l;
+ xmlNodePtr cur;
+ xmlNodeSetPtr ret;
+
+ if (node == NULL)
+ return(nodes);
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ if (ret == NULL)
+ return(ret);
+ if (xmlXPathNodeSetIsEmpty(nodes) ||
+ (!xmlXPathNodeSetContains(nodes, node)))
+ return(ret);
+
+ l = xmlXPathNodeSetGetLength(nodes);
+ for (i = 0; i < l; i++) {
+ cur = xmlXPathNodeSetItem(nodes, i);
+ if (cur == node)
+ break;
+ if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathNodeLeading:
+ * @nodes: a node-set
+ * @node: a node
+ *
+ * Implements the EXSLT - Sets leading() function:
+ * node-set set:leading (node-set, node-set)
+ * @nodes is sorted by document order, then #exslSetsNodeLeadingSorted
+ * is called.
+ *
+ * Returns the nodes in @nodes that precede @node in document order,
+ * @nodes if @node is NULL or an empty node-set if @nodes
+ * doesn't contain @node
+ */
+xmlNodeSetPtr
+xmlXPathNodeLeading (xmlNodeSetPtr nodes, xmlNodePtr node) {
+ xmlXPathNodeSetSort(nodes);
+ return(xmlXPathNodeLeadingSorted(nodes, node));
+}
+
+/**
+ * xmlXPathLeadingSorted:
+ * @nodes1: a node-set, sorted by document order
+ * @nodes2: a node-set, sorted by document order
+ *
+ * Implements the EXSLT - Sets leading() function:
+ * node-set set:leading (node-set, node-set)
+ *
+ * Returns the nodes in @nodes1 that precede the first node in @nodes2
+ * in document order, @nodes1 if @nodes2 is NULL or empty or
+ * an empty node-set if @nodes1 doesn't contain @nodes2
+ */
+xmlNodeSetPtr
+xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(nodes1);
+ return(xmlXPathNodeLeadingSorted(nodes1,
+ xmlXPathNodeSetItem(nodes2, 1)));
+}
+
+/**
+ * xmlXPathLeading:
+ * @nodes1: a node-set
+ * @nodes2: a node-set
+ *
+ * Implements the EXSLT - Sets leading() function:
+ * node-set set:leading (node-set, node-set)
+ * @nodes1 and @nodes2 are sorted by document order, then
+ * #exslSetsLeadingSorted is called.
+ *
+ * Returns the nodes in @nodes1 that precede the first node in @nodes2
+ * in document order, @nodes1 if @nodes2 is NULL or empty or
+ * an empty node-set if @nodes1 doesn't contain @nodes2
+ */
+xmlNodeSetPtr
+xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(nodes1);
+ if (xmlXPathNodeSetIsEmpty(nodes1))
+ return(xmlXPathNodeSetCreate(NULL));
+ xmlXPathNodeSetSort(nodes1);
+ xmlXPathNodeSetSort(nodes2);
+ return(xmlXPathNodeLeadingSorted(nodes1,
+ xmlXPathNodeSetItem(nodes2, 1)));
+}
+
+/**
+ * xmlXPathNodeTrailingSorted:
+ * @nodes: a node-set, sorted by document order
+ * @node: a node
+ *
+ * Implements the EXSLT - Sets trailing() function:
+ * node-set set:trailing (node-set, node-set)
+ *
+ * Returns the nodes in @nodes that follow @node in document order,
+ * @nodes if @node is NULL or an empty node-set if @nodes
+ * doesn't contain @node
+ */
+xmlNodeSetPtr
+xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes, xmlNodePtr node) {
+ int i, l;
+ xmlNodePtr cur;
+ xmlNodeSetPtr ret;
+
+ if (node == NULL)
+ return(nodes);
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ if (ret == NULL)
+ return(ret);
+ if (xmlXPathNodeSetIsEmpty(nodes) ||
+ (!xmlXPathNodeSetContains(nodes, node)))
+ return(ret);
+
+ l = xmlXPathNodeSetGetLength(nodes);
+ for (i = l - 1; i >= 0; i--) {
+ cur = xmlXPathNodeSetItem(nodes, i);
+ if (cur == node)
+ break;
+ if (xmlXPathNodeSetAddUnique(ret, cur) < 0)
+ break;
+ }
+ xmlXPathNodeSetSort(ret); /* bug 413451 */
+ return(ret);
+}
+
+/**
+ * xmlXPathNodeTrailing:
+ * @nodes: a node-set
+ * @node: a node
+ *
+ * Implements the EXSLT - Sets trailing() function:
+ * node-set set:trailing (node-set, node-set)
+ * @nodes is sorted by document order, then #xmlXPathNodeTrailingSorted
+ * is called.
+ *
+ * Returns the nodes in @nodes that follow @node in document order,
+ * @nodes if @node is NULL or an empty node-set if @nodes
+ * doesn't contain @node
+ */
+xmlNodeSetPtr
+xmlXPathNodeTrailing (xmlNodeSetPtr nodes, xmlNodePtr node) {
+ xmlXPathNodeSetSort(nodes);
+ return(xmlXPathNodeTrailingSorted(nodes, node));
+}
+
+/**
+ * xmlXPathTrailingSorted:
+ * @nodes1: a node-set, sorted by document order
+ * @nodes2: a node-set, sorted by document order
+ *
+ * Implements the EXSLT - Sets trailing() function:
+ * node-set set:trailing (node-set, node-set)
+ *
+ * Returns the nodes in @nodes1 that follow the first node in @nodes2
+ * in document order, @nodes1 if @nodes2 is NULL or empty or
+ * an empty node-set if @nodes1 doesn't contain @nodes2
+ */
+xmlNodeSetPtr
+xmlXPathTrailingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(nodes1);
+ return(xmlXPathNodeTrailingSorted(nodes1,
+ xmlXPathNodeSetItem(nodes2, 0)));
+}
+
+/**
+ * xmlXPathTrailing:
+ * @nodes1: a node-set
+ * @nodes2: a node-set
+ *
+ * Implements the EXSLT - Sets trailing() function:
+ * node-set set:trailing (node-set, node-set)
+ * @nodes1 and @nodes2 are sorted by document order, then
+ * #xmlXPathTrailingSorted is called.
+ *
+ * Returns the nodes in @nodes1 that follow the first node in @nodes2
+ * in document order, @nodes1 if @nodes2 is NULL or empty or
+ * an empty node-set if @nodes1 doesn't contain @nodes2
+ */
+xmlNodeSetPtr
+xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
+ if (xmlXPathNodeSetIsEmpty(nodes2))
+ return(nodes1);
+ if (xmlXPathNodeSetIsEmpty(nodes1))
+ return(xmlXPathNodeSetCreate(NULL));
+ xmlXPathNodeSetSort(nodes1);
+ xmlXPathNodeSetSort(nodes2);
+ return(xmlXPathNodeTrailingSorted(nodes1,
+ xmlXPathNodeSetItem(nodes2, 0)));
+}
+
+/************************************************************************
+ * *
+ * Routines to handle extra functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathRegisterFunc:
+ * @ctxt: the XPath context
+ * @name: the function name
+ * @f: the function implementation or NULL
+ *
+ * Register a new function. If @f is NULL it unregisters the function
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlXPathRegisterFunc(xmlXPathContextPtr ctxt, const xmlChar *name,
+ xmlXPathFunction f) {
+ return(xmlXPathRegisterFuncNS(ctxt, name, NULL, f));
+}
+
+/**
+ * xmlXPathRegisterFuncNS:
+ * @ctxt: the XPath context
+ * @name: the function name
+ * @ns_uri: the function namespace URI
+ * @f: the function implementation or NULL
+ *
+ * Register a new function. If @f is NULL it unregisters the function
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name,
+ const xmlChar *ns_uri, xmlXPathFunction f) {
+ if (ctxt == NULL)
+ return(-1);
+ if (name == NULL)
+ return(-1);
+
+ if (ctxt->funcHash == NULL)
+ ctxt->funcHash = xmlHashCreate(0);
+ if (ctxt->funcHash == NULL)
+ return(-1);
+ if (f == NULL)
+ return(xmlHashRemoveEntry2(ctxt->funcHash, name, ns_uri, NULL));
+ return(xmlHashAddEntry2(ctxt->funcHash, name, ns_uri, XML_CAST_FPTR(f)));
+}
+
+/**
+ * xmlXPathRegisterFuncLookup:
+ * @ctxt: the XPath context
+ * @f: the lookup function
+ * @funcCtxt: the lookup data
+ *
+ * Registers an external mechanism to do function lookup.
+ */
+void
+xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt) {
+ if (ctxt == NULL)
+ return;
+ ctxt->funcLookupFunc = f;
+ ctxt->funcLookupData = funcCtxt;
+}
+
+/**
+ * xmlXPathFunctionLookup:
+ * @ctxt: the XPath context
+ * @name: the function name
+ *
+ * Search in the Function array of the context for the given
+ * function.
+ *
+ * Returns the xmlXPathFunction or NULL if not found
+ */
+xmlXPathFunction
+xmlXPathFunctionLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
+ if (ctxt == NULL)
+ return (NULL);
+
+ if (ctxt->funcLookupFunc != NULL) {
+ xmlXPathFunction ret;
+ xmlXPathFuncLookupFunc f;
+
+ f = ctxt->funcLookupFunc;
+ ret = f(ctxt->funcLookupData, name, NULL);
+ if (ret != NULL)
+ return(ret);
+ }
+ return(xmlXPathFunctionLookupNS(ctxt, name, NULL));
+}
+
+/**
+ * xmlXPathFunctionLookupNS:
+ * @ctxt: the XPath context
+ * @name: the function name
+ * @ns_uri: the function namespace URI
+ *
+ * Search in the Function array of the context for the given
+ * function.
+ *
+ * Returns the xmlXPathFunction or NULL if not found
+ */
+xmlXPathFunction
+xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
+ const xmlChar *ns_uri) {
+ xmlXPathFunction ret;
+
+ if (ctxt == NULL)
+ return(NULL);
+ if (name == NULL)
+ return(NULL);
+
+ if (ctxt->funcLookupFunc != NULL) {
+ xmlXPathFuncLookupFunc f;
+
+ f = ctxt->funcLookupFunc;
+ ret = f(ctxt->funcLookupData, name, ns_uri);
+ if (ret != NULL)
+ return(ret);
+ }
+
+ if (ctxt->funcHash == NULL)
+ return(NULL);
+
+ XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->funcHash, name, ns_uri);
+ return(ret);
+}
+
+/**
+ * xmlXPathRegisteredFuncsCleanup:
+ * @ctxt: the XPath context
+ *
+ * Cleanup the XPath context data associated to registered functions
+ */
+void
+xmlXPathRegisteredFuncsCleanup(xmlXPathContextPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+
+ xmlHashFree(ctxt->funcHash, NULL);
+ ctxt->funcHash = NULL;
+}
+
+/************************************************************************
+ * *
+ * Routines to handle Variables *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathRegisterVariable:
+ * @ctxt: the XPath context
+ * @name: the variable name
+ * @value: the variable value or NULL
+ *
+ * Register a new variable value. If @value is NULL it unregisters
+ * the variable
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlXPathRegisterVariable(xmlXPathContextPtr ctxt, const xmlChar *name,
+ xmlXPathObjectPtr value) {
+ return(xmlXPathRegisterVariableNS(ctxt, name, NULL, value));
+}
+
+/**
+ * xmlXPathRegisterVariableNS:
+ * @ctxt: the XPath context
+ * @name: the variable name
+ * @ns_uri: the variable namespace URI
+ * @value: the variable value or NULL
+ *
+ * Register a new variable value. If @value is NULL it unregisters
+ * the variable
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlXPathRegisterVariableNS(xmlXPathContextPtr ctxt, const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathObjectPtr value) {
+ if (ctxt == NULL)
+ return(-1);
+ if (name == NULL)
+ return(-1);
+
+ if (ctxt->varHash == NULL)
+ ctxt->varHash = xmlHashCreate(0);
+ if (ctxt->varHash == NULL)
+ return(-1);
+ if (value == NULL)
+ return(xmlHashRemoveEntry2(ctxt->varHash, name, ns_uri,
+ (xmlHashDeallocator)xmlXPathFreeObject));
+ return(xmlHashUpdateEntry2(ctxt->varHash, name, ns_uri,
+ (void *) value,
+ (xmlHashDeallocator)xmlXPathFreeObject));
+}
+
+/**
+ * xmlXPathRegisterVariableLookup:
+ * @ctxt: the XPath context
+ * @f: the lookup function
+ * @data: the lookup data
+ *
+ * register an external mechanism to do variable lookup
+ */
+void
+xmlXPathRegisterVariableLookup(xmlXPathContextPtr ctxt,
+ xmlXPathVariableLookupFunc f, void *data) {
+ if (ctxt == NULL)
+ return;
+ ctxt->varLookupFunc = f;
+ ctxt->varLookupData = data;
+}
+
+/**
+ * xmlXPathVariableLookup:
+ * @ctxt: the XPath context
+ * @name: the variable name
+ *
+ * Search in the Variable array of the context for the given
+ * variable value.
+ *
+ * Returns a copy of the value or NULL if not found
+ */
+xmlXPathObjectPtr
+xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name) {
+ if (ctxt == NULL)
+ return(NULL);
+
+ if (ctxt->varLookupFunc != NULL) {
+ xmlXPathObjectPtr ret;
+
+ ret = ((xmlXPathVariableLookupFunc)ctxt->varLookupFunc)
+ (ctxt->varLookupData, name, NULL);
+ return(ret);
+ }
+ return(xmlXPathVariableLookupNS(ctxt, name, NULL));
+}
+
+/**
+ * xmlXPathVariableLookupNS:
+ * @ctxt: the XPath context
+ * @name: the variable name
+ * @ns_uri: the variable namespace URI
+ *
+ * Search in the Variable array of the context for the given
+ * variable value.
+ *
+ * Returns the a copy of the value or NULL if not found
+ */
+xmlXPathObjectPtr
+xmlXPathVariableLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
+ const xmlChar *ns_uri) {
+ if (ctxt == NULL)
+ return(NULL);
+
+ if (ctxt->varLookupFunc != NULL) {
+ xmlXPathObjectPtr ret;
+
+ ret = ((xmlXPathVariableLookupFunc)ctxt->varLookupFunc)
+ (ctxt->varLookupData, name, ns_uri);
+ if (ret != NULL) return(ret);
+ }
+
+ if (ctxt->varHash == NULL)
+ return(NULL);
+ if (name == NULL)
+ return(NULL);
+
+ return(xmlXPathCacheObjectCopy(ctxt, (xmlXPathObjectPtr)
+ xmlHashLookup2(ctxt->varHash, name, ns_uri)));
+}
+
+/**
+ * xmlXPathRegisteredVariablesCleanup:
+ * @ctxt: the XPath context
+ *
+ * Cleanup the XPath context data associated to registered variables
+ */
+void
+xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+
+ xmlHashFree(ctxt->varHash, (xmlHashDeallocator)xmlXPathFreeObject);
+ ctxt->varHash = NULL;
+}
+
+/**
+ * xmlXPathRegisterNs:
+ * @ctxt: the XPath context
+ * @prefix: the namespace prefix cannot be NULL or empty string
+ * @ns_uri: the namespace name
+ *
+ * Register a new namespace. If @ns_uri is NULL it unregisters
+ * the namespace
+ *
+ * Returns 0 in case of success, -1 in case of error
+ */
+int
+xmlXPathRegisterNs(xmlXPathContextPtr ctxt, const xmlChar *prefix,
+ const xmlChar *ns_uri) {
+ if (ctxt == NULL)
+ return(-1);
+ if (prefix == NULL)
+ return(-1);
+ if (prefix[0] == 0)
+ return(-1);
+
+ if (ctxt->nsHash == NULL)
+ ctxt->nsHash = xmlHashCreate(10);
+ if (ctxt->nsHash == NULL)
+ return(-1);
+ if (ns_uri == NULL)
+ return(xmlHashRemoveEntry(ctxt->nsHash, prefix,
+ (xmlHashDeallocator)xmlFree));
+ return(xmlHashUpdateEntry(ctxt->nsHash, prefix, (void *) xmlStrdup(ns_uri),
+ (xmlHashDeallocator)xmlFree));
+}
+
+/**
+ * xmlXPathNsLookup:
+ * @ctxt: the XPath context
+ * @prefix: the namespace prefix value
+ *
+ * Search in the namespace declaration array of the context for the given
+ * namespace name associated to the given prefix
+ *
+ * Returns the value or NULL if not found
+ */
+const xmlChar *
+xmlXPathNsLookup(xmlXPathContextPtr ctxt, const xmlChar *prefix) {
+ if (ctxt == NULL)
+ return(NULL);
+ if (prefix == NULL)
+ return(NULL);
+
+#ifdef XML_XML_NAMESPACE
+ if (xmlStrEqual(prefix, (const xmlChar *) "xml"))
+ return(XML_XML_NAMESPACE);
+#endif
+
+ if (ctxt->namespaces != NULL) {
+ int i;
+
+ for (i = 0;i < ctxt->nsNr;i++) {
+ if ((ctxt->namespaces[i] != NULL) &&
+ (xmlStrEqual(ctxt->namespaces[i]->prefix, prefix)))
+ return(ctxt->namespaces[i]->href);
+ }
+ }
+
+ return((const xmlChar *) xmlHashLookup(ctxt->nsHash, prefix));
+}
+
+/**
+ * xmlXPathRegisteredNsCleanup:
+ * @ctxt: the XPath context
+ *
+ * Cleanup the XPath context data associated to registered variables
+ */
+void
+xmlXPathRegisteredNsCleanup(xmlXPathContextPtr ctxt) {
+ if (ctxt == NULL)
+ return;
+
+ xmlHashFree(ctxt->nsHash, (xmlHashDeallocator)xmlFree);
+ ctxt->nsHash = NULL;
+}
+
+/************************************************************************
+ * *
+ * Routines to handle Values *
+ * *
+ ************************************************************************/
+
+/* Allocations are terrible, one needs to optimize all this !!! */
+
+/**
+ * xmlXPathNewFloat:
+ * @val: the double value
+ *
+ * Create a new xmlXPathObjectPtr of type double and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewFloat(double val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating float object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_NUMBER;
+ ret->floatval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_NUMBER);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathNewBoolean:
+ * @val: the boolean value
+ *
+ * Create a new xmlXPathObjectPtr of type boolean and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewBoolean(int val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating boolean object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_BOOLEAN;
+ ret->boolval = (val != 0);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_BOOLEAN);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathNewString:
+ * @val: the xmlChar * value
+ *
+ * Create a new xmlXPathObjectPtr of type string and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewString(const xmlChar *val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating string object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_STRING;
+ if (val != NULL)
+ ret->stringval = xmlStrdup(val);
+ else
+ ret->stringval = xmlStrdup((const xmlChar *)"");
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_STRING);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathWrapString:
+ * @val: the xmlChar * value
+ *
+ * Wraps the @val string into an XPath object.
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathWrapString (xmlChar *val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating string object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_STRING;
+ ret->stringval = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_STRING);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathNewCString:
+ * @val: the char * value
+ *
+ * Create a new xmlXPathObjectPtr of type string and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathNewCString(const char *val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating string object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_STRING;
+ ret->stringval = xmlStrdup(BAD_CAST val);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_STRING);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathWrapCString:
+ * @val: the char * value
+ *
+ * Wraps a string into an XPath object.
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathWrapCString (char * val) {
+ return(xmlXPathWrapString((xmlChar *)(val)));
+}
+
+/**
+ * xmlXPathWrapExternal:
+ * @val: the user data
+ *
+ * Wraps the @val data into an XPath object.
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathWrapExternal (void *val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating user object\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_USERS;
+ ret->user = val;
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, XPATH_USERS);
+#endif
+ return(ret);
+}
+
+/**
+ * xmlXPathObjectCopy:
+ * @val: the original object
+ *
+ * allocate a new copy of a given object
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPathObjectCopy(xmlXPathObjectPtr val) {
+ xmlXPathObjectPtr ret;
+
+ if (val == NULL)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "copying object\n");
+ return(NULL);
+ }
+ memcpy(ret, val , (size_t) sizeof(xmlXPathObject));
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageRequested(NULL, val->type);
+#endif
+ switch (val->type) {
+ case XPATH_BOOLEAN:
+ case XPATH_NUMBER:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ break;
+ case XPATH_STRING:
+ ret->stringval = xmlStrdup(val->stringval);
+ break;
+ case XPATH_XSLT_TREE:
+#if 0
+/*
+ Removed 11 July 2004 - the current handling of xslt tmpRVT nodes means that
+ this previous handling is no longer correct, and can cause some serious
+ problems (ref. bug 145547)
+*/
+ if ((val->nodesetval != NULL) &&
+ (val->nodesetval->nodeTab != NULL)) {
+ xmlNodePtr cur, tmp;
+ xmlDocPtr top;
+
+ ret->boolval = 1;
+ top = xmlNewDoc(NULL);
+ top->name = (char *)
+ xmlStrdup(val->nodesetval->nodeTab[0]->name);
+ ret->user = top;
+ if (top != NULL) {
+ top->doc = top;
+ cur = val->nodesetval->nodeTab[0]->children;
+ while (cur != NULL) {
+ tmp = xmlDocCopyNode(cur, top, 1);
+ xmlAddChild((xmlNodePtr) top, tmp);
+ cur = cur->next;
+ }
+ }
+
+ ret->nodesetval = xmlXPathNodeSetCreate((xmlNodePtr) top);
+ } else
+ ret->nodesetval = xmlXPathNodeSetCreate(NULL);
+ /* Deallocate the copied tree value */
+ break;
+#endif
+ case XPATH_NODESET:
+ ret->nodesetval = xmlXPathNodeSetMerge(NULL, val->nodesetval);
+ /* Do not deallocate the copied tree value */
+ ret->boolval = 0;
+ break;
+ case XPATH_LOCATIONSET:
+#ifdef LIBXML_XPTR_ENABLED
+ {
+ xmlLocationSetPtr loc = val->user;
+ ret->user = (void *) xmlXPtrLocationSetMerge(NULL, loc);
+ break;
+ }
+#endif
+ case XPATH_USERS:
+ ret->user = val->user;
+ break;
+ case XPATH_UNDEFINED:
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathObjectCopy: unsupported type %d\n",
+ val->type);
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathFreeObject:
+ * @obj: the object to free
+ *
+ * Free up an xmlXPathObjectPtr object.
+ */
+void
+xmlXPathFreeObject(xmlXPathObjectPtr obj) {
+ if (obj == NULL) return;
+ if ((obj->type == XPATH_NODESET) || (obj->type == XPATH_XSLT_TREE)) {
+ if (obj->boolval) {
+#if 0
+ if (obj->user != NULL) {
+ xmlXPathFreeNodeSet(obj->nodesetval);
+ xmlFreeNodeList((xmlNodePtr) obj->user);
+ } else
+#endif
+ obj->type = XPATH_XSLT_TREE; /* TODO: Just for debugging. */
+ if (obj->nodesetval != NULL)
+ xmlXPathFreeValueTree(obj->nodesetval);
+ } else {
+ if (obj->nodesetval != NULL)
+ xmlXPathFreeNodeSet(obj->nodesetval);
+ }
+#ifdef LIBXML_XPTR_ENABLED
+ } else if (obj->type == XPATH_LOCATIONSET) {
+ if (obj->user != NULL)
+ xmlXPtrFreeLocationSet(obj->user);
+#endif
+ } else if (obj->type == XPATH_STRING) {
+ if (obj->stringval != NULL)
+ xmlFree(obj->stringval);
+ }
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageReleased(NULL, obj->type);
+#endif
+ xmlFree(obj);
+}
+
+/**
+ * xmlXPathReleaseObject:
+ * @obj: the xmlXPathObjectPtr to free or to cache
+ *
+ * Depending on the state of the cache this frees the given
+ * XPath object or stores it in the cache.
+ */
+static void
+xmlXPathReleaseObject(xmlXPathContextPtr ctxt, xmlXPathObjectPtr obj)
+{
+#define XP_CACHE_ADD(sl, o) if (sl == NULL) { \
+ sl = xmlPointerListCreate(10); if (sl == NULL) goto free_obj; } \
+ if (xmlPointerListAddSize(sl, obj, 0) == -1) goto free_obj;
+
+#define XP_CACHE_WANTS(sl, n) ((sl == NULL) || ((sl)->number < n))
+
+ if (obj == NULL)
+ return;
+ if ((ctxt == NULL) || (ctxt->cache == NULL)) {
+ xmlXPathFreeObject(obj);
+ } else {
+ xmlXPathContextCachePtr cache =
+ (xmlXPathContextCachePtr) ctxt->cache;
+
+ switch (obj->type) {
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ if (obj->nodesetval != NULL) {
+ if (obj->boolval) {
+ /*
+ * It looks like the @boolval is used for
+ * evaluation if this an XSLT Result Tree Fragment.
+ * TODO: Check if this assumption is correct.
+ */
+ obj->type = XPATH_XSLT_TREE; /* just for debugging */
+ xmlXPathFreeValueTree(obj->nodesetval);
+ obj->nodesetval = NULL;
+ } else if ((obj->nodesetval->nodeMax <= 40) &&
+ (XP_CACHE_WANTS(cache->nodesetObjs,
+ cache->maxNodeset)))
+ {
+ XP_CACHE_ADD(cache->nodesetObjs, obj);
+ goto obj_cached;
+ } else {
+ xmlXPathFreeNodeSet(obj->nodesetval);
+ obj->nodesetval = NULL;
+ }
+ }
+ break;
+ case XPATH_STRING:
+ if (obj->stringval != NULL)
+ xmlFree(obj->stringval);
+
+ if (XP_CACHE_WANTS(cache->stringObjs, cache->maxString)) {
+ XP_CACHE_ADD(cache->stringObjs, obj);
+ goto obj_cached;
+ }
+ break;
+ case XPATH_BOOLEAN:
+ if (XP_CACHE_WANTS(cache->booleanObjs, cache->maxBoolean)) {
+ XP_CACHE_ADD(cache->booleanObjs, obj);
+ goto obj_cached;
+ }
+ break;
+ case XPATH_NUMBER:
+ if (XP_CACHE_WANTS(cache->numberObjs, cache->maxNumber)) {
+ XP_CACHE_ADD(cache->numberObjs, obj);
+ goto obj_cached;
+ }
+ break;
+#ifdef LIBXML_XPTR_ENABLED
+ case XPATH_LOCATIONSET:
+ if (obj->user != NULL) {
+ xmlXPtrFreeLocationSet(obj->user);
+ }
+ goto free_obj;
+#endif
+ default:
+ goto free_obj;
+ }
+
+ /*
+ * Fallback to adding to the misc-objects slot.
+ */
+ if (XP_CACHE_WANTS(cache->miscObjs, cache->maxMisc)) {
+ XP_CACHE_ADD(cache->miscObjs, obj);
+ } else
+ goto free_obj;
+
+obj_cached:
+
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageReleased(ctxt, obj->type);
+#endif
+
+ if (obj->nodesetval != NULL) {
+ xmlNodeSetPtr tmpset = obj->nodesetval;
+
+ /*
+ * TODO: Due to those nasty ns-nodes, we need to traverse
+ * the list and free the ns-nodes.
+ * URGENT TODO: Check if it's actually slowing things down.
+ * Maybe we shouldn't try to preserve the list.
+ */
+ if (tmpset->nodeNr > 1) {
+ int i;
+ xmlNodePtr node;
+
+ for (i = 0; i < tmpset->nodeNr; i++) {
+ node = tmpset->nodeTab[i];
+ if ((node != NULL) &&
+ (node->type == XML_NAMESPACE_DECL))
+ {
+ xmlXPathNodeSetFreeNs((xmlNsPtr) node);
+ }
+ }
+ } else if (tmpset->nodeNr == 1) {
+ if ((tmpset->nodeTab[0] != NULL) &&
+ (tmpset->nodeTab[0]->type == XML_NAMESPACE_DECL))
+ xmlXPathNodeSetFreeNs((xmlNsPtr) tmpset->nodeTab[0]);
+ }
+ tmpset->nodeNr = 0;
+ memset(obj, 0, sizeof(xmlXPathObject));
+ obj->nodesetval = tmpset;
+ } else
+ memset(obj, 0, sizeof(xmlXPathObject));
+
+ return;
+
+free_obj:
+ /*
+ * Cache is full; free the object.
+ */
+ if (obj->nodesetval != NULL)
+ xmlXPathFreeNodeSet(obj->nodesetval);
+#ifdef XP_DEBUG_OBJ_USAGE
+ xmlXPathDebugObjUsageReleased(NULL, obj->type);
+#endif
+ xmlFree(obj);
+ }
+ return;
+}
+
+
+/************************************************************************
+ * *
+ * Type Casting Routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathCastBooleanToString:
+ * @val: a boolean
+ *
+ * Converts a boolean to its string value.
+ *
+ * Returns a newly allocated string.
+ */
+xmlChar *
+xmlXPathCastBooleanToString (int val) {
+ xmlChar *ret;
+ if (val)
+ ret = xmlStrdup((const xmlChar *) "true");
+ else
+ ret = xmlStrdup((const xmlChar *) "false");
+ return(ret);
+}
+
+/**
+ * xmlXPathCastNumberToString:
+ * @val: a number
+ *
+ * Converts a number to its string value.
+ *
+ * Returns a newly allocated string.
+ */
+xmlChar *
+xmlXPathCastNumberToString (double val) {
+ xmlChar *ret;
+ switch (xmlXPathIsInf(val)) {
+ case 1:
+ ret = xmlStrdup((const xmlChar *) "Infinity");
+ break;
+ case -1:
+ ret = xmlStrdup((const xmlChar *) "-Infinity");
+ break;
+ default:
+ if (xmlXPathIsNaN(val)) {
+ ret = xmlStrdup((const xmlChar *) "NaN");
+ } else if (val == 0 && xmlXPathGetSign(val) != 0) {
+ ret = xmlStrdup((const xmlChar *) "0");
+ } else {
+ /* could be improved */
+ char buf[100];
+ xmlXPathFormatNumber(val, buf, 99);
+ buf[99] = 0;
+ ret = xmlStrdup((const xmlChar *) buf);
+ }
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathCastNodeToString:
+ * @node: a node
+ *
+ * Converts a node to its string value.
+ *
+ * Returns a newly allocated string.
+ */
+xmlChar *
+xmlXPathCastNodeToString (xmlNodePtr node) {
+xmlChar *ret;
+ if ((ret = xmlNodeGetContent(node)) == NULL)
+ ret = xmlStrdup((const xmlChar *) "");
+ return(ret);
+}
+
+/**
+ * xmlXPathCastNodeSetToString:
+ * @ns: a node-set
+ *
+ * Converts a node-set to its string value.
+ *
+ * Returns a newly allocated string.
+ */
+xmlChar *
+xmlXPathCastNodeSetToString (xmlNodeSetPtr ns) {
+ if ((ns == NULL) || (ns->nodeNr == 0) || (ns->nodeTab == NULL))
+ return(xmlStrdup((const xmlChar *) ""));
+
+ if (ns->nodeNr > 1)
+ xmlXPathNodeSetSort(ns);
+ return(xmlXPathCastNodeToString(ns->nodeTab[0]));
+}
+
+/**
+ * xmlXPathCastToString:
+ * @val: an XPath object
+ *
+ * Converts an existing object to its string() equivalent
+ *
+ * Returns the allocated string value of the object, NULL in case of error.
+ * It's up to the caller to free the string memory with xmlFree().
+ */
+xmlChar *
+xmlXPathCastToString(xmlXPathObjectPtr val) {
+ xmlChar *ret = NULL;
+
+ if (val == NULL)
+ return(xmlStrdup((const xmlChar *) ""));
+ switch (val->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext, "String: undefined\n");
+#endif
+ ret = xmlStrdup((const xmlChar *) "");
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ ret = xmlXPathCastNodeSetToString(val->nodesetval);
+ break;
+ case XPATH_STRING:
+ return(xmlStrdup(val->stringval));
+ case XPATH_BOOLEAN:
+ ret = xmlXPathCastBooleanToString(val->boolval);
+ break;
+ case XPATH_NUMBER: {
+ ret = xmlXPathCastNumberToString(val->floatval);
+ break;
+ }
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ ret = xmlStrdup((const xmlChar *) "");
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathConvertString:
+ * @val: an XPath object
+ *
+ * Converts an existing object to its string() equivalent
+ *
+ * Returns the new object, the old one is freed (or the operation
+ * is done directly on @val)
+ */
+xmlXPathObjectPtr
+xmlXPathConvertString(xmlXPathObjectPtr val) {
+ xmlChar *res = NULL;
+
+ if (val == NULL)
+ return(xmlXPathNewCString(""));
+
+ switch (val->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext, "STRING: undefined\n");
+#endif
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ res = xmlXPathCastNodeSetToString(val->nodesetval);
+ break;
+ case XPATH_STRING:
+ return(val);
+ case XPATH_BOOLEAN:
+ res = xmlXPathCastBooleanToString(val->boolval);
+ break;
+ case XPATH_NUMBER:
+ res = xmlXPathCastNumberToString(val->floatval);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO;
+ break;
+ }
+ xmlXPathFreeObject(val);
+ if (res == NULL)
+ return(xmlXPathNewCString(""));
+ return(xmlXPathWrapString(res));
+}
+
+/**
+ * xmlXPathCastBooleanToNumber:
+ * @val: a boolean
+ *
+ * Converts a boolean to its number value
+ *
+ * Returns the number value
+ */
+double
+xmlXPathCastBooleanToNumber(int val) {
+ if (val)
+ return(1.0);
+ return(0.0);
+}
+
+/**
+ * xmlXPathCastStringToNumber:
+ * @val: a string
+ *
+ * Converts a string to its number value
+ *
+ * Returns the number value
+ */
+double
+xmlXPathCastStringToNumber(const xmlChar * val) {
+ return(xmlXPathStringEvalNumber(val));
+}
+
+/**
+ * xmlXPathCastNodeToNumber:
+ * @node: a node
+ *
+ * Converts a node to its number value
+ *
+ * Returns the number value
+ */
+double
+xmlXPathCastNodeToNumber (xmlNodePtr node) {
+ xmlChar *strval;
+ double ret;
+
+ if (node == NULL)
+ return(xmlXPathNAN);
+ strval = xmlXPathCastNodeToString(node);
+ if (strval == NULL)
+ return(xmlXPathNAN);
+ ret = xmlXPathCastStringToNumber(strval);
+ xmlFree(strval);
+
+ return(ret);
+}
+
+/**
+ * xmlXPathCastNodeSetToNumber:
+ * @ns: a node-set
+ *
+ * Converts a node-set to its number value
+ *
+ * Returns the number value
+ */
+double
+xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns) {
+ xmlChar *str;
+ double ret;
+
+ if (ns == NULL)
+ return(xmlXPathNAN);
+ str = xmlXPathCastNodeSetToString(ns);
+ ret = xmlXPathCastStringToNumber(str);
+ xmlFree(str);
+ return(ret);
+}
+
+/**
+ * xmlXPathCastToNumber:
+ * @val: an XPath object
+ *
+ * Converts an XPath object to its number value
+ *
+ * Returns the number value
+ */
+double
+xmlXPathCastToNumber(xmlXPathObjectPtr val) {
+ double ret = 0.0;
+
+ if (val == NULL)
+ return(xmlXPathNAN);
+ switch (val->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEGUB_EXPR
+ xmlGenericError(xmlGenericErrorContext, "NUMBER: undefined\n");
+#endif
+ ret = xmlXPathNAN;
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ ret = xmlXPathCastNodeSetToNumber(val->nodesetval);
+ break;
+ case XPATH_STRING:
+ ret = xmlXPathCastStringToNumber(val->stringval);
+ break;
+ case XPATH_NUMBER:
+ ret = val->floatval;
+ break;
+ case XPATH_BOOLEAN:
+ ret = xmlXPathCastBooleanToNumber(val->boolval);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO;
+ ret = xmlXPathNAN;
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathConvertNumber:
+ * @val: an XPath object
+ *
+ * Converts an existing object to its number() equivalent
+ *
+ * Returns the new object, the old one is freed (or the operation
+ * is done directly on @val)
+ */
+xmlXPathObjectPtr
+xmlXPathConvertNumber(xmlXPathObjectPtr val) {
+ xmlXPathObjectPtr ret;
+
+ if (val == NULL)
+ return(xmlXPathNewFloat(0.0));
+ if (val->type == XPATH_NUMBER)
+ return(val);
+ ret = xmlXPathNewFloat(xmlXPathCastToNumber(val));
+ xmlXPathFreeObject(val);
+ return(ret);
+}
+
+/**
+ * xmlXPathCastNumberToBoolean:
+ * @val: a number
+ *
+ * Converts a number to its boolean value
+ *
+ * Returns the boolean value
+ */
+int
+xmlXPathCastNumberToBoolean (double val) {
+ if (xmlXPathIsNaN(val) || (val == 0.0))
+ return(0);
+ return(1);
+}
+
+/**
+ * xmlXPathCastStringToBoolean:
+ * @val: a string
+ *
+ * Converts a string to its boolean value
+ *
+ * Returns the boolean value
+ */
+int
+xmlXPathCastStringToBoolean (const xmlChar *val) {
+ if ((val == NULL) || (xmlStrlen(val) == 0))
+ return(0);
+ return(1);
+}
+
+/**
+ * xmlXPathCastNodeSetToBoolean:
+ * @ns: a node-set
+ *
+ * Converts a node-set to its boolean value
+ *
+ * Returns the boolean value
+ */
+int
+xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns) {
+ if ((ns == NULL) || (ns->nodeNr == 0))
+ return(0);
+ return(1);
+}
+
+/**
+ * xmlXPathCastToBoolean:
+ * @val: an XPath object
+ *
+ * Converts an XPath object to its boolean value
+ *
+ * Returns the boolean value
+ */
+int
+xmlXPathCastToBoolean (xmlXPathObjectPtr val) {
+ int ret = 0;
+
+ if (val == NULL)
+ return(0);
+ switch (val->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext, "BOOLEAN: undefined\n");
+#endif
+ ret = 0;
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ ret = xmlXPathCastNodeSetToBoolean(val->nodesetval);
+ break;
+ case XPATH_STRING:
+ ret = xmlXPathCastStringToBoolean(val->stringval);
+ break;
+ case XPATH_NUMBER:
+ ret = xmlXPathCastNumberToBoolean(val->floatval);
+ break;
+ case XPATH_BOOLEAN:
+ ret = val->boolval;
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO;
+ ret = 0;
+ break;
+ }
+ return(ret);
+}
+
+
+/**
+ * xmlXPathConvertBoolean:
+ * @val: an XPath object
+ *
+ * Converts an existing object to its boolean() equivalent
+ *
+ * Returns the new object, the old one is freed (or the operation
+ * is done directly on @val)
+ */
+xmlXPathObjectPtr
+xmlXPathConvertBoolean(xmlXPathObjectPtr val) {
+ xmlXPathObjectPtr ret;
+
+ if (val == NULL)
+ return(xmlXPathNewBoolean(0));
+ if (val->type == XPATH_BOOLEAN)
+ return(val);
+ ret = xmlXPathNewBoolean(xmlXPathCastToBoolean(val));
+ xmlXPathFreeObject(val);
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * Routines to handle XPath contexts *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathNewContext:
+ * @doc: the XML document
+ *
+ * Create a new xmlXPathContext
+ *
+ * Returns the xmlXPathContext just allocated. The caller will need to free it.
+ */
+xmlXPathContextPtr
+xmlXPathNewContext(xmlDocPtr doc) {
+ xmlXPathContextPtr ret;
+
+ ret = (xmlXPathContextPtr) xmlMalloc(sizeof(xmlXPathContext));
+ if (ret == NULL) {
+ xmlXPathErrMemory(NULL, "creating context\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathContext));
+ ret->doc = doc;
+ ret->node = NULL;
+
+ ret->varHash = NULL;
+
+ ret->nb_types = 0;
+ ret->max_types = 0;
+ ret->types = NULL;
+
+ ret->funcHash = xmlHashCreate(0);
+
+ ret->nb_axis = 0;
+ ret->max_axis = 0;
+ ret->axis = NULL;
+
+ ret->nsHash = NULL;
+ ret->user = NULL;
+
+ ret->contextSize = -1;
+ ret->proximityPosition = -1;
+
+#ifdef XP_DEFAULT_CACHE_ON
+ if (xmlXPathContextSetCache(ret, 1, -1, 0) == -1) {
+ xmlXPathFreeContext(ret);
+ return(NULL);
+ }
+#endif
+
+ xmlXPathRegisterAllFunctions(ret);
+
+ return(ret);
+}
+
+/**
+ * xmlXPathFreeContext:
+ * @ctxt: the context to free
+ *
+ * Free up an xmlXPathContext
+ */
+void
+xmlXPathFreeContext(xmlXPathContextPtr ctxt) {
+ if (ctxt == NULL) return;
+
+ if (ctxt->cache != NULL)
+ xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
+ xmlXPathRegisteredNsCleanup(ctxt);
+ xmlXPathRegisteredFuncsCleanup(ctxt);
+ xmlXPathRegisteredVariablesCleanup(ctxt);
+ xmlResetError(&ctxt->lastError);
+ xmlFree(ctxt);
+}
+
+/************************************************************************
+ * *
+ * Routines to handle XPath parser contexts *
+ * *
+ ************************************************************************/
+
+#define CHECK_CTXT(ctxt) \
+ if (ctxt == NULL) { \
+ __xmlRaiseError(NULL, NULL, NULL, \
+ NULL, NULL, XML_FROM_XPATH, \
+ XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
+ __FILE__, __LINE__, \
+ NULL, NULL, NULL, 0, 0, \
+ "NULL context pointer\n"); \
+ return(NULL); \
+ } \
+
+#define CHECK_CTXT_NEG(ctxt) \
+ if (ctxt == NULL) { \
+ __xmlRaiseError(NULL, NULL, NULL, \
+ NULL, NULL, XML_FROM_XPATH, \
+ XML_ERR_INTERNAL_ERROR, XML_ERR_FATAL, \
+ __FILE__, __LINE__, \
+ NULL, NULL, NULL, 0, 0, \
+ "NULL context pointer\n"); \
+ return(-1); \
+ } \
+
+
+#define CHECK_CONTEXT(ctxt) \
+ if ((ctxt == NULL) || (ctxt->doc == NULL) || \
+ (ctxt->doc->children == NULL)) { \
+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_INVALID_CTXT); \
+ return(NULL); \
+ }
+
+
+/**
+ * xmlXPathNewParserContext:
+ * @str: the XPath expression
+ * @ctxt: the XPath context
+ *
+ * Create a new xmlXPathParserContext
+ *
+ * Returns the xmlXPathParserContext just allocated.
+ */
+xmlXPathParserContextPtr
+xmlXPathNewParserContext(const xmlChar *str, xmlXPathContextPtr ctxt) {
+ xmlXPathParserContextPtr ret;
+
+ ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext));
+ if (ret == NULL) {
+ xmlXPathErrMemory(ctxt, "creating parser context\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathParserContext));
+ ret->cur = ret->base = str;
+ ret->context = ctxt;
+
+ ret->comp = xmlXPathNewCompExpr();
+ if (ret->comp == NULL) {
+ xmlFree(ret->valueTab);
+ xmlFree(ret);
+ return(NULL);
+ }
+ if ((ctxt != NULL) && (ctxt->dict != NULL)) {
+ ret->comp->dict = ctxt->dict;
+ xmlDictReference(ret->comp->dict);
+ }
+
+ return(ret);
+}
+
+/**
+ * xmlXPathCompParserContext:
+ * @comp: the XPath compiled expression
+ * @ctxt: the XPath context
+ *
+ * Create a new xmlXPathParserContext when processing a compiled expression
+ *
+ * Returns the xmlXPathParserContext just allocated.
+ */
+static xmlXPathParserContextPtr
+xmlXPathCompParserContext(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt) {
+ xmlXPathParserContextPtr ret;
+
+ ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext));
+ if (ret == NULL) {
+ xmlXPathErrMemory(ctxt, "creating evaluation context\n");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathParserContext));
+
+ /* Allocate the value stack */
+ ret->valueTab = (xmlXPathObjectPtr *)
+ xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
+ if (ret->valueTab == NULL) {
+ xmlFree(ret);
+ xmlXPathErrMemory(ctxt, "creating evaluation context\n");
+ return(NULL);
+ }
+ ret->valueNr = 0;
+ ret->valueMax = 10;
+ ret->value = NULL;
+ ret->valueFrame = 0;
+
+ ret->context = ctxt;
+ ret->comp = comp;
+
+ return(ret);
+}
+
+/**
+ * xmlXPathFreeParserContext:
+ * @ctxt: the context to free
+ *
+ * Free up an xmlXPathParserContext
+ */
+void
+xmlXPathFreeParserContext(xmlXPathParserContextPtr ctxt) {
+ if (ctxt->valueTab != NULL) {
+ xmlFree(ctxt->valueTab);
+ }
+ if (ctxt->comp != NULL) {
+#ifdef XPATH_STREAMING
+ if (ctxt->comp->stream != NULL) {
+ xmlFreePatternList(ctxt->comp->stream);
+ ctxt->comp->stream = NULL;
+ }
+#endif
+ xmlXPathFreeCompExpr(ctxt->comp);
+ }
+ xmlFree(ctxt);
+}
+
+/************************************************************************
+ * *
+ * The implicit core function library *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathNodeValHash:
+ * @node: a node pointer
+ *
+ * Function computing the beginning of the string value of the node,
+ * used to speed up comparisons
+ *
+ * Returns an int usable as a hash
+ */
+static unsigned int
+xmlXPathNodeValHash(xmlNodePtr node) {
+ int len = 2;
+ const xmlChar * string = NULL;
+ xmlNodePtr tmp = NULL;
+ unsigned int ret = 0;
+
+ if (node == NULL)
+ return(0);
+
+ if (node->type == XML_DOCUMENT_NODE) {
+ tmp = xmlDocGetRootElement((xmlDocPtr) node);
+ if (tmp == NULL)
+ node = node->children;
+ else
+ node = tmp;
+
+ if (node == NULL)
+ return(0);
+ }
+
+ switch (node->type) {
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ string = node->content;
+ if (string == NULL)
+ return(0);
+ if (string[0] == 0)
+ return(0);
+ return(((unsigned int) string[0]) +
+ (((unsigned int) string[1]) << 8));
+ case XML_NAMESPACE_DECL:
+ string = ((xmlNsPtr)node)->href;
+ if (string == NULL)
+ return(0);
+ if (string[0] == 0)
+ return(0);
+ return(((unsigned int) string[0]) +
+ (((unsigned int) string[1]) << 8));
+ case XML_ATTRIBUTE_NODE:
+ tmp = ((xmlAttrPtr) node)->children;
+ break;
+ case XML_ELEMENT_NODE:
+ tmp = node->children;
+ break;
+ default:
+ return(0);
+ }
+ while (tmp != NULL) {
+ switch (tmp->type) {
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ string = tmp->content;
+ break;
+ case XML_NAMESPACE_DECL:
+ string = ((xmlNsPtr)tmp)->href;
+ break;
+ default:
+ break;
+ }
+ if ((string != NULL) && (string[0] != 0)) {
+ if (len == 1) {
+ return(ret + (((unsigned int) string[0]) << 8));
+ }
+ if (string[1] == 0) {
+ len = 1;
+ ret = (unsigned int) string[0];
+ } else {
+ return(((unsigned int) string[0]) +
+ (((unsigned int) string[1]) << 8));
+ }
+ }
+ /*
+ * Skip to next node
+ */
+ if ((tmp->children != NULL) && (tmp->type != XML_DTD_NODE)) {
+ if (tmp->children->type != XML_ENTITY_DECL) {
+ tmp = tmp->children;
+ continue;
+ }
+ }
+ if (tmp == node)
+ break;
+
+ if (tmp->next != NULL) {
+ tmp = tmp->next;
+ continue;
+ }
+
+ do {
+ tmp = tmp->parent;
+ if (tmp == NULL)
+ break;
+ if (tmp == node) {
+ tmp = NULL;
+ break;
+ }
+ if (tmp->next != NULL) {
+ tmp = tmp->next;
+ break;
+ }
+ } while (tmp != NULL);
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathStringHash:
+ * @string: a string
+ *
+ * Function computing the beginning of the string value of the node,
+ * used to speed up comparisons
+ *
+ * Returns an int usable as a hash
+ */
+static unsigned int
+xmlXPathStringHash(const xmlChar * string) {
+ if (string == NULL)
+ return((unsigned int) 0);
+ if (string[0] == 0)
+ return(0);
+ return(((unsigned int) string[0]) +
+ (((unsigned int) string[1]) << 8));
+}
+
+/**
+ * xmlXPathCompareNodeSetFloat:
+ * @ctxt: the XPath Parser context
+ * @inf: less than (1) or greater than (0)
+ * @strict: is the comparison strict
+ * @arg: the node set
+ * @f: the value
+ *
+ * Implement the compare operation between a nodeset and a number
+ * @ns < @val (1, 1, ...
+ * @ns <= @val (1, 0, ...
+ * @ns > @val (0, 1, ...
+ * @ns >= @val (0, 0, ...
+ *
+ * If one object to be compared is a node-set and the other is a number,
+ * then the comparison will be true if and only if there is a node in the
+ * node-set such that the result of performing the comparison on the number
+ * to be compared and on the result of converting the string-value of that
+ * node to a number using the number function is true.
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathCompareNodeSetFloat(xmlXPathParserContextPtr ctxt, int inf, int strict,
+ xmlXPathObjectPtr arg, xmlXPathObjectPtr f) {
+ int i, ret = 0;
+ xmlNodeSetPtr ns;
+ xmlChar *str2;
+
+ if ((f == NULL) || (arg == NULL) ||
+ ((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE))) {
+ xmlXPathReleaseObject(ctxt->context, arg);
+ xmlXPathReleaseObject(ctxt->context, f);
+ return(0);
+ }
+ ns = arg->nodesetval;
+ if (ns != NULL) {
+ for (i = 0;i < ns->nodeNr;i++) {
+ str2 = xmlXPathCastNodeToString(ns->nodeTab[i]);
+ if (str2 != NULL) {
+ valuePush(ctxt,
+ xmlXPathCacheNewString(ctxt->context, str2));
+ xmlFree(str2);
+ xmlXPathNumberFunction(ctxt, 1);
+ valuePush(ctxt, xmlXPathCacheObjectCopy(ctxt->context, f));
+ ret = xmlXPathCompareValues(ctxt, inf, strict);
+ if (ret)
+ break;
+ }
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, arg);
+ xmlXPathReleaseObject(ctxt->context, f);
+ return(ret);
+}
+
+/**
+ * xmlXPathCompareNodeSetString:
+ * @ctxt: the XPath Parser context
+ * @inf: less than (1) or greater than (0)
+ * @strict: is the comparison strict
+ * @arg: the node set
+ * @s: the value
+ *
+ * Implement the compare operation between a nodeset and a string
+ * @ns < @val (1, 1, ...
+ * @ns <= @val (1, 0, ...
+ * @ns > @val (0, 1, ...
+ * @ns >= @val (0, 0, ...
+ *
+ * If one object to be compared is a node-set and the other is a string,
+ * then the comparison will be true if and only if there is a node in
+ * the node-set such that the result of performing the comparison on the
+ * string-value of the node and the other string is true.
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathCompareNodeSetString(xmlXPathParserContextPtr ctxt, int inf, int strict,
+ xmlXPathObjectPtr arg, xmlXPathObjectPtr s) {
+ int i, ret = 0;
+ xmlNodeSetPtr ns;
+ xmlChar *str2;
+
+ if ((s == NULL) || (arg == NULL) ||
+ ((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE))) {
+ xmlXPathReleaseObject(ctxt->context, arg);
+ xmlXPathReleaseObject(ctxt->context, s);
+ return(0);
+ }
+ ns = arg->nodesetval;
+ if (ns != NULL) {
+ for (i = 0;i < ns->nodeNr;i++) {
+ str2 = xmlXPathCastNodeToString(ns->nodeTab[i]);
+ if (str2 != NULL) {
+ valuePush(ctxt,
+ xmlXPathCacheNewString(ctxt->context, str2));
+ xmlFree(str2);
+ valuePush(ctxt, xmlXPathCacheObjectCopy(ctxt->context, s));
+ ret = xmlXPathCompareValues(ctxt, inf, strict);
+ if (ret)
+ break;
+ }
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, arg);
+ xmlXPathReleaseObject(ctxt->context, s);
+ return(ret);
+}
+
+/**
+ * xmlXPathCompareNodeSets:
+ * @inf: less than (1) or greater than (0)
+ * @strict: is the comparison strict
+ * @arg1: the first node set object
+ * @arg2: the second node set object
+ *
+ * Implement the compare operation on nodesets:
+ *
+ * If both objects to be compared are node-sets, then the comparison
+ * will be true if and only if there is a node in the first node-set
+ * and a node in the second node-set such that the result of performing
+ * the comparison on the string-values of the two nodes is true.
+ * ....
+ * When neither object to be compared is a node-set and the operator
+ * is <=, <, >= or >, then the objects are compared by converting both
+ * objects to numbers and comparing the numbers according to IEEE 754.
+ * ....
+ * The number function converts its argument to a number as follows:
+ * - a string that consists of optional whitespace followed by an
+ * optional minus sign followed by a Number followed by whitespace
+ * is converted to the IEEE 754 number that is nearest (according
+ * to the IEEE 754 round-to-nearest rule) to the mathematical value
+ * represented by the string; any other string is converted to NaN
+ *
+ * Conclusion all nodes need to be converted first to their string value
+ * and then the comparison must be done when possible
+ */
+static int
+xmlXPathCompareNodeSets(int inf, int strict,
+ xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2) {
+ int i, j, init = 0;
+ double val1;
+ double *values2;
+ int ret = 0;
+ xmlNodeSetPtr ns1;
+ xmlNodeSetPtr ns2;
+
+ if ((arg1 == NULL) ||
+ ((arg1->type != XPATH_NODESET) && (arg1->type != XPATH_XSLT_TREE))) {
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+ if ((arg2 == NULL) ||
+ ((arg2->type != XPATH_NODESET) && (arg2->type != XPATH_XSLT_TREE))) {
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+
+ ns1 = arg1->nodesetval;
+ ns2 = arg2->nodesetval;
+
+ if ((ns1 == NULL) || (ns1->nodeNr <= 0)) {
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+ if ((ns2 == NULL) || (ns2->nodeNr <= 0)) {
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+
+ values2 = (double *) xmlMalloc(ns2->nodeNr * sizeof(double));
+ if (values2 == NULL) {
+ xmlXPathErrMemory(NULL, "comparing nodesets\n");
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+ for (i = 0;i < ns1->nodeNr;i++) {
+ val1 = xmlXPathCastNodeToNumber(ns1->nodeTab[i]);
+ if (xmlXPathIsNaN(val1))
+ continue;
+ for (j = 0;j < ns2->nodeNr;j++) {
+ if (init == 0) {
+ values2[j] = xmlXPathCastNodeToNumber(ns2->nodeTab[j]);
+ }
+ if (xmlXPathIsNaN(values2[j]))
+ continue;
+ if (inf && strict)
+ ret = (val1 < values2[j]);
+ else if (inf && !strict)
+ ret = (val1 <= values2[j]);
+ else if (!inf && strict)
+ ret = (val1 > values2[j]);
+ else if (!inf && !strict)
+ ret = (val1 >= values2[j]);
+ if (ret)
+ break;
+ }
+ if (ret)
+ break;
+ init = 1;
+ }
+ xmlFree(values2);
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ return(ret);
+}
+
+/**
+ * xmlXPathCompareNodeSetValue:
+ * @ctxt: the XPath Parser context
+ * @inf: less than (1) or greater than (0)
+ * @strict: is the comparison strict
+ * @arg: the node set
+ * @val: the value
+ *
+ * Implement the compare operation between a nodeset and a value
+ * @ns < @val (1, 1, ...
+ * @ns <= @val (1, 0, ...
+ * @ns > @val (0, 1, ...
+ * @ns >= @val (0, 0, ...
+ *
+ * If one object to be compared is a node-set and the other is a boolean,
+ * then the comparison will be true if and only if the result of performing
+ * the comparison on the boolean and on the result of converting
+ * the node-set to a boolean using the boolean function is true.
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathCompareNodeSetValue(xmlXPathParserContextPtr ctxt, int inf, int strict,
+ xmlXPathObjectPtr arg, xmlXPathObjectPtr val) {
+ if ((val == NULL) || (arg == NULL) ||
+ ((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE)))
+ return(0);
+
+ switch(val->type) {
+ case XPATH_NUMBER:
+ return(xmlXPathCompareNodeSetFloat(ctxt, inf, strict, arg, val));
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ return(xmlXPathCompareNodeSets(inf, strict, arg, val));
+ case XPATH_STRING:
+ return(xmlXPathCompareNodeSetString(ctxt, inf, strict, arg, val));
+ case XPATH_BOOLEAN:
+ valuePush(ctxt, arg);
+ xmlXPathBooleanFunction(ctxt, 1);
+ valuePush(ctxt, val);
+ return(xmlXPathCompareValues(ctxt, inf, strict));
+ default:
+ TODO
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathEqualNodeSetString:
+ * @arg: the nodeset object argument
+ * @str: the string to compare to.
+ * @neq: flag to show whether for '=' (0) or '!=' (1)
+ *
+ * Implement the equal operation on XPath objects content: @arg1 == @arg2
+ * If one object to be compared is a node-set and the other is a string,
+ * then the comparison will be true if and only if there is a node in
+ * the node-set such that the result of performing the comparison on the
+ * string-value of the node and the other string is true.
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathEqualNodeSetString(xmlXPathObjectPtr arg, const xmlChar * str, int neq)
+{
+ int i;
+ xmlNodeSetPtr ns;
+ xmlChar *str2;
+ unsigned int hash;
+
+ if ((str == NULL) || (arg == NULL) ||
+ ((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE)))
+ return (0);
+ ns = arg->nodesetval;
+ /*
+ * A NULL nodeset compared with a string is always false
+ * (since there is no node equal, and no node not equal)
+ */
+ if ((ns == NULL) || (ns->nodeNr <= 0) )
+ return (0);
+ hash = xmlXPathStringHash(str);
+ for (i = 0; i < ns->nodeNr; i++) {
+ if (xmlXPathNodeValHash(ns->nodeTab[i]) == hash) {
+ str2 = xmlNodeGetContent(ns->nodeTab[i]);
+ if ((str2 != NULL) && (xmlStrEqual(str, str2))) {
+ xmlFree(str2);
+ if (neq)
+ continue;
+ return (1);
+ } else if ((str2 == NULL) && (xmlStrEqual(str, BAD_CAST ""))) {
+ if (neq)
+ continue;
+ return (1);
+ } else if (neq) {
+ if (str2 != NULL)
+ xmlFree(str2);
+ return (1);
+ }
+ if (str2 != NULL)
+ xmlFree(str2);
+ } else if (neq)
+ return (1);
+ }
+ return (0);
+}
+
+/**
+ * xmlXPathEqualNodeSetFloat:
+ * @arg: the nodeset object argument
+ * @f: the float to compare to
+ * @neq: flag to show whether to compare '=' (0) or '!=' (1)
+ *
+ * Implement the equal operation on XPath objects content: @arg1 == @arg2
+ * If one object to be compared is a node-set and the other is a number,
+ * then the comparison will be true if and only if there is a node in
+ * the node-set such that the result of performing the comparison on the
+ * number to be compared and on the result of converting the string-value
+ * of that node to a number using the number function is true.
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathEqualNodeSetFloat(xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr arg, double f, int neq) {
+ int i, ret=0;
+ xmlNodeSetPtr ns;
+ xmlChar *str2;
+ xmlXPathObjectPtr val;
+ double v;
+
+ if ((arg == NULL) ||
+ ((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE)))
+ return(0);
+
+ ns = arg->nodesetval;
+ if (ns != NULL) {
+ for (i=0;i<ns->nodeNr;i++) {
+ str2 = xmlXPathCastNodeToString(ns->nodeTab[i]);
+ if (str2 != NULL) {
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context, str2));
+ xmlFree(str2);
+ xmlXPathNumberFunction(ctxt, 1);
+ val = valuePop(ctxt);
+ v = val->floatval;
+ xmlXPathReleaseObject(ctxt->context, val);
+ if (!xmlXPathIsNaN(v)) {
+ if ((!neq) && (v==f)) {
+ ret = 1;
+ break;
+ } else if ((neq) && (v!=f)) {
+ ret = 1;
+ break;
+ }
+ } else { /* NaN is unequal to any value */
+ if (neq)
+ ret = 1;
+ }
+ }
+ }
+ }
+
+ return(ret);
+}
+
+
+/**
+ * xmlXPathEqualNodeSets:
+ * @arg1: first nodeset object argument
+ * @arg2: second nodeset object argument
+ * @neq: flag to show whether to test '=' (0) or '!=' (1)
+ *
+ * Implement the equal / not equal operation on XPath nodesets:
+ * @arg1 == @arg2 or @arg1 != @arg2
+ * If both objects to be compared are node-sets, then the comparison
+ * will be true if and only if there is a node in the first node-set and
+ * a node in the second node-set such that the result of performing the
+ * comparison on the string-values of the two nodes is true.
+ *
+ * (needless to say, this is a costly operation)
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+static int
+xmlXPathEqualNodeSets(xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2, int neq) {
+ int i, j;
+ unsigned int *hashs1;
+ unsigned int *hashs2;
+ xmlChar **values1;
+ xmlChar **values2;
+ int ret = 0;
+ xmlNodeSetPtr ns1;
+ xmlNodeSetPtr ns2;
+
+ if ((arg1 == NULL) ||
+ ((arg1->type != XPATH_NODESET) && (arg1->type != XPATH_XSLT_TREE)))
+ return(0);
+ if ((arg2 == NULL) ||
+ ((arg2->type != XPATH_NODESET) && (arg2->type != XPATH_XSLT_TREE)))
+ return(0);
+
+ ns1 = arg1->nodesetval;
+ ns2 = arg2->nodesetval;
+
+ if ((ns1 == NULL) || (ns1->nodeNr <= 0))
+ return(0);
+ if ((ns2 == NULL) || (ns2->nodeNr <= 0))
+ return(0);
+
+ /*
+ * for equal, check if there is a node pertaining to both sets
+ */
+ if (neq == 0)
+ for (i = 0;i < ns1->nodeNr;i++)
+ for (j = 0;j < ns2->nodeNr;j++)
+ if (ns1->nodeTab[i] == ns2->nodeTab[j])
+ return(1);
+
+ values1 = (xmlChar **) xmlMalloc(ns1->nodeNr * sizeof(xmlChar *));
+ if (values1 == NULL) {
+ xmlXPathErrMemory(NULL, "comparing nodesets\n");
+ return(0);
+ }
+ hashs1 = (unsigned int *) xmlMalloc(ns1->nodeNr * sizeof(unsigned int));
+ if (hashs1 == NULL) {
+ xmlXPathErrMemory(NULL, "comparing nodesets\n");
+ xmlFree(values1);
+ return(0);
+ }
+ memset(values1, 0, ns1->nodeNr * sizeof(xmlChar *));
+ values2 = (xmlChar **) xmlMalloc(ns2->nodeNr * sizeof(xmlChar *));
+ if (values2 == NULL) {
+ xmlXPathErrMemory(NULL, "comparing nodesets\n");
+ xmlFree(hashs1);
+ xmlFree(values1);
+ return(0);
+ }
+ hashs2 = (unsigned int *) xmlMalloc(ns2->nodeNr * sizeof(unsigned int));
+ if (hashs2 == NULL) {
+ xmlXPathErrMemory(NULL, "comparing nodesets\n");
+ xmlFree(hashs1);
+ xmlFree(values1);
+ xmlFree(values2);
+ return(0);
+ }
+ memset(values2, 0, ns2->nodeNr * sizeof(xmlChar *));
+ for (i = 0;i < ns1->nodeNr;i++) {
+ hashs1[i] = xmlXPathNodeValHash(ns1->nodeTab[i]);
+ for (j = 0;j < ns2->nodeNr;j++) {
+ if (i == 0)
+ hashs2[j] = xmlXPathNodeValHash(ns2->nodeTab[j]);
+ if (hashs1[i] != hashs2[j]) {
+ if (neq) {
+ ret = 1;
+ break;
+ }
+ }
+ else {
+ if (values1[i] == NULL)
+ values1[i] = xmlNodeGetContent(ns1->nodeTab[i]);
+ if (values2[j] == NULL)
+ values2[j] = xmlNodeGetContent(ns2->nodeTab[j]);
+ ret = xmlStrEqual(values1[i], values2[j]) ^ neq;
+ if (ret)
+ break;
+ }
+ }
+ if (ret)
+ break;
+ }
+ for (i = 0;i < ns1->nodeNr;i++)
+ if (values1[i] != NULL)
+ xmlFree(values1[i]);
+ for (j = 0;j < ns2->nodeNr;j++)
+ if (values2[j] != NULL)
+ xmlFree(values2[j]);
+ xmlFree(values1);
+ xmlFree(values2);
+ xmlFree(hashs1);
+ xmlFree(hashs2);
+ return(ret);
+}
+
+static int
+xmlXPathEqualValuesCommon(xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr arg1, xmlXPathObjectPtr arg2) {
+ int ret = 0;
+ /*
+ *At this point we are assured neither arg1 nor arg2
+ *is a nodeset, so we can just pick the appropriate routine.
+ */
+ switch (arg1->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: undefined\n");
+#endif
+ break;
+ case XPATH_BOOLEAN:
+ switch (arg2->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: undefined\n");
+#endif
+ break;
+ case XPATH_BOOLEAN:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: %d boolean %d \n",
+ arg1->boolval, arg2->boolval);
+#endif
+ ret = (arg1->boolval == arg2->boolval);
+ break;
+ case XPATH_NUMBER:
+ ret = (arg1->boolval ==
+ xmlXPathCastNumberToBoolean(arg2->floatval));
+ break;
+ case XPATH_STRING:
+ if ((arg2->stringval == NULL) ||
+ (arg2->stringval[0] == 0)) ret = 0;
+ else
+ ret = 1;
+ ret = (arg1->boolval == ret);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ break;
+ }
+ break;
+ case XPATH_NUMBER:
+ switch (arg2->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: undefined\n");
+#endif
+ break;
+ case XPATH_BOOLEAN:
+ ret = (arg2->boolval==
+ xmlXPathCastNumberToBoolean(arg1->floatval));
+ break;
+ case XPATH_STRING:
+ valuePush(ctxt, arg2);
+ xmlXPathNumberFunction(ctxt, 1);
+ arg2 = valuePop(ctxt);
+ /* no break on purpose */
+ case XPATH_NUMBER:
+ /* Hand check NaN and Infinity equalities */
+ if (xmlXPathIsNaN(arg1->floatval) ||
+ xmlXPathIsNaN(arg2->floatval)) {
+ ret = 0;
+ } else if (xmlXPathIsInf(arg1->floatval) == 1) {
+ if (xmlXPathIsInf(arg2->floatval) == 1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg1->floatval) == -1) {
+ if (xmlXPathIsInf(arg2->floatval) == -1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg2->floatval) == 1) {
+ if (xmlXPathIsInf(arg1->floatval) == 1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg2->floatval) == -1) {
+ if (xmlXPathIsInf(arg1->floatval) == -1)
+ ret = 1;
+ else
+ ret = 0;
+ } else {
+ ret = (arg1->floatval == arg2->floatval);
+ }
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ break;
+ }
+ break;
+ case XPATH_STRING:
+ switch (arg2->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: undefined\n");
+#endif
+ break;
+ case XPATH_BOOLEAN:
+ if ((arg1->stringval == NULL) ||
+ (arg1->stringval[0] == 0)) ret = 0;
+ else
+ ret = 1;
+ ret = (arg2->boolval == ret);
+ break;
+ case XPATH_STRING:
+ ret = xmlStrEqual(arg1->stringval, arg2->stringval);
+ break;
+ case XPATH_NUMBER:
+ valuePush(ctxt, arg1);
+ xmlXPathNumberFunction(ctxt, 1);
+ arg1 = valuePop(ctxt);
+ /* Hand check NaN and Infinity equalities */
+ if (xmlXPathIsNaN(arg1->floatval) ||
+ xmlXPathIsNaN(arg2->floatval)) {
+ ret = 0;
+ } else if (xmlXPathIsInf(arg1->floatval) == 1) {
+ if (xmlXPathIsInf(arg2->floatval) == 1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg1->floatval) == -1) {
+ if (xmlXPathIsInf(arg2->floatval) == -1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg2->floatval) == 1) {
+ if (xmlXPathIsInf(arg1->floatval) == 1)
+ ret = 1;
+ else
+ ret = 0;
+ } else if (xmlXPathIsInf(arg2->floatval) == -1) {
+ if (xmlXPathIsInf(arg1->floatval) == -1)
+ ret = 1;
+ else
+ ret = 0;
+ } else {
+ ret = (arg1->floatval == arg2->floatval);
+ }
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ break;
+ }
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ break;
+ }
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return(ret);
+}
+
+/**
+ * xmlXPathEqualValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the equal operation on XPath objects content: @arg1 == @arg2
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+int
+xmlXPathEqualValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg1, arg2, argtmp;
+ int ret = 0;
+
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(0);
+ arg2 = valuePop(ctxt);
+ arg1 = valuePop(ctxt);
+ if ((arg1 == NULL) || (arg2 == NULL)) {
+ if (arg1 != NULL)
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ else
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ XP_ERROR0(XPATH_INVALID_OPERAND);
+ }
+
+ if (arg1 == arg2) {
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: by pointer\n");
+#endif
+ xmlXPathFreeObject(arg1);
+ return(1);
+ }
+
+ /*
+ *If either argument is a nodeset, it's a 'special case'
+ */
+ if ((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE) ||
+ (arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE)) {
+ /*
+ *Hack it to assure arg1 is the nodeset
+ */
+ if ((arg1->type != XPATH_NODESET) && (arg1->type != XPATH_XSLT_TREE)) {
+ argtmp = arg2;
+ arg2 = arg1;
+ arg1 = argtmp;
+ }
+ switch (arg2->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "Equal: undefined\n");
+#endif
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ ret = xmlXPathEqualNodeSets(arg1, arg2, 0);
+ break;
+ case XPATH_BOOLEAN:
+ if ((arg1->nodesetval == NULL) ||
+ (arg1->nodesetval->nodeNr == 0)) ret = 0;
+ else
+ ret = 1;
+ ret = (ret == arg2->boolval);
+ break;
+ case XPATH_NUMBER:
+ ret = xmlXPathEqualNodeSetFloat(ctxt, arg1, arg2->floatval, 0);
+ break;
+ case XPATH_STRING:
+ ret = xmlXPathEqualNodeSetString(arg1, arg2->stringval, 0);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ }
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return(ret);
+ }
+
+ return (xmlXPathEqualValuesCommon(ctxt, arg1, arg2));
+}
+
+/**
+ * xmlXPathNotEqualValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the equal operation on XPath objects content: @arg1 == @arg2
+ *
+ * Returns 0 or 1 depending on the results of the test.
+ */
+int
+xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg1, arg2, argtmp;
+ int ret = 0;
+
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(0);
+ arg2 = valuePop(ctxt);
+ arg1 = valuePop(ctxt);
+ if ((arg1 == NULL) || (arg2 == NULL)) {
+ if (arg1 != NULL)
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ else
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ XP_ERROR0(XPATH_INVALID_OPERAND);
+ }
+
+ if (arg1 == arg2) {
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "NotEqual: by pointer\n");
+#endif
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ return(0);
+ }
+
+ /*
+ *If either argument is a nodeset, it's a 'special case'
+ */
+ if ((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE) ||
+ (arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE)) {
+ /*
+ *Hack it to assure arg1 is the nodeset
+ */
+ if ((arg1->type != XPATH_NODESET) && (arg1->type != XPATH_XSLT_TREE)) {
+ argtmp = arg2;
+ arg2 = arg1;
+ arg1 = argtmp;
+ }
+ switch (arg2->type) {
+ case XPATH_UNDEFINED:
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "NotEqual: undefined\n");
+#endif
+ break;
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ ret = xmlXPathEqualNodeSets(arg1, arg2, 1);
+ break;
+ case XPATH_BOOLEAN:
+ if ((arg1->nodesetval == NULL) ||
+ (arg1->nodesetval->nodeNr == 0)) ret = 0;
+ else
+ ret = 1;
+ ret = (ret != arg2->boolval);
+ break;
+ case XPATH_NUMBER:
+ ret = xmlXPathEqualNodeSetFloat(ctxt, arg1, arg2->floatval, 1);
+ break;
+ case XPATH_STRING:
+ ret = xmlXPathEqualNodeSetString(arg1, arg2->stringval,1);
+ break;
+ case XPATH_USERS:
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ case XPATH_LOCATIONSET:
+ TODO
+ break;
+ }
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return(ret);
+ }
+
+ return (!xmlXPathEqualValuesCommon(ctxt, arg1, arg2));
+}
+
+/**
+ * xmlXPathCompareValues:
+ * @ctxt: the XPath Parser context
+ * @inf: less than (1) or greater than (0)
+ * @strict: is the comparison strict
+ *
+ * Implement the compare operation on XPath objects:
+ * @arg1 < @arg2 (1, 1, ...
+ * @arg1 <= @arg2 (1, 0, ...
+ * @arg1 > @arg2 (0, 1, ...
+ * @arg1 >= @arg2 (0, 0, ...
+ *
+ * When neither object to be compared is a node-set and the operator is
+ * <=, <, >=, >, then the objects are compared by converted both objects
+ * to numbers and comparing the numbers according to IEEE 754. The <
+ * comparison will be true if and only if the first number is less than the
+ * second number. The <= comparison will be true if and only if the first
+ * number is less than or equal to the second number. The > comparison
+ * will be true if and only if the first number is greater than the second
+ * number. The >= comparison will be true if and only if the first number
+ * is greater than or equal to the second number.
+ *
+ * Returns 1 if the comparison succeeded, 0 if it failed
+ */
+int
+xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) {
+ int ret = 0, arg1i = 0, arg2i = 0;
+ xmlXPathObjectPtr arg1, arg2;
+
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(0);
+ arg2 = valuePop(ctxt);
+ arg1 = valuePop(ctxt);
+ if ((arg1 == NULL) || (arg2 == NULL)) {
+ if (arg1 != NULL)
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ else
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ XP_ERROR0(XPATH_INVALID_OPERAND);
+ }
+
+ if ((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE) ||
+ (arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE)) {
+ /*
+ * If either argument is a XPATH_NODESET or XPATH_XSLT_TREE the two arguments
+ * are not freed from within this routine; they will be freed from the
+ * called routine, e.g. xmlXPathCompareNodeSets or xmlXPathCompareNodeSetValue
+ */
+ if (((arg2->type == XPATH_NODESET) || (arg2->type == XPATH_XSLT_TREE)) &&
+ ((arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE))){
+ ret = xmlXPathCompareNodeSets(inf, strict, arg1, arg2);
+ } else {
+ if ((arg1->type == XPATH_NODESET) || (arg1->type == XPATH_XSLT_TREE)) {
+ ret = xmlXPathCompareNodeSetValue(ctxt, inf, strict,
+ arg1, arg2);
+ } else {
+ ret = xmlXPathCompareNodeSetValue(ctxt, !inf, strict,
+ arg2, arg1);
+ }
+ }
+ return(ret);
+ }
+
+ if (arg1->type != XPATH_NUMBER) {
+ valuePush(ctxt, arg1);
+ xmlXPathNumberFunction(ctxt, 1);
+ arg1 = valuePop(ctxt);
+ }
+ if (arg1->type != XPATH_NUMBER) {
+ xmlXPathFreeObject(arg1);
+ xmlXPathFreeObject(arg2);
+ XP_ERROR0(XPATH_INVALID_OPERAND);
+ }
+ if (arg2->type != XPATH_NUMBER) {
+ valuePush(ctxt, arg2);
+ xmlXPathNumberFunction(ctxt, 1);
+ arg2 = valuePop(ctxt);
+ }
+ if (arg2->type != XPATH_NUMBER) {
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ XP_ERROR0(XPATH_INVALID_OPERAND);
+ }
+ /*
+ * Add tests for infinity and nan
+ * => feedback on 3.4 for Inf and NaN
+ */
+ /* Hand check NaN and Infinity comparisons */
+ if (xmlXPathIsNaN(arg1->floatval) || xmlXPathIsNaN(arg2->floatval)) {
+ ret=0;
+ } else {
+ arg1i=xmlXPathIsInf(arg1->floatval);
+ arg2i=xmlXPathIsInf(arg2->floatval);
+ if (inf && strict) {
+ if ((arg1i == -1 && arg2i != -1) ||
+ (arg2i == 1 && arg1i != 1)) {
+ ret = 1;
+ } else if (arg1i == 0 && arg2i == 0) {
+ ret = (arg1->floatval < arg2->floatval);
+ } else {
+ ret = 0;
+ }
+ }
+ else if (inf && !strict) {
+ if (arg1i == -1 || arg2i == 1) {
+ ret = 1;
+ } else if (arg1i == 0 && arg2i == 0) {
+ ret = (arg1->floatval <= arg2->floatval);
+ } else {
+ ret = 0;
+ }
+ }
+ else if (!inf && strict) {
+ if ((arg1i == 1 && arg2i != 1) ||
+ (arg2i == -1 && arg1i != -1)) {
+ ret = 1;
+ } else if (arg1i == 0 && arg2i == 0) {
+ ret = (arg1->floatval > arg2->floatval);
+ } else {
+ ret = 0;
+ }
+ }
+ else if (!inf && !strict) {
+ if (arg1i == 1 || arg2i == -1) {
+ ret = 1;
+ } else if (arg1i == 0 && arg2i == 0) {
+ ret = (arg1->floatval >= arg2->floatval);
+ } else {
+ ret = 0;
+ }
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return(ret);
+}
+
+/**
+ * xmlXPathValueFlipSign:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the unary - operation on an XPath object
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return;
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ if (xmlXPathIsNaN(ctxt->value->floatval))
+ ctxt->value->floatval=xmlXPathNAN;
+ else if (xmlXPathIsInf(ctxt->value->floatval) == 1)
+ ctxt->value->floatval=xmlXPathNINF;
+ else if (xmlXPathIsInf(ctxt->value->floatval) == -1)
+ ctxt->value->floatval=xmlXPathPINF;
+ else if (ctxt->value->floatval == 0) {
+ if (xmlXPathGetSign(ctxt->value->floatval) == 0)
+ ctxt->value->floatval = xmlXPathNZERO;
+ else
+ ctxt->value->floatval = 0;
+ }
+ else
+ ctxt->value->floatval = - ctxt->value->floatval;
+}
+
+/**
+ * xmlXPathAddValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the add operation on XPath objects:
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathAddValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg;
+ double val;
+
+ arg = valuePop(ctxt);
+ if (arg == NULL)
+ XP_ERROR(XPATH_INVALID_OPERAND);
+ val = xmlXPathCastToNumber(arg);
+ xmlXPathReleaseObject(ctxt->context, arg);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ ctxt->value->floatval += val;
+}
+
+/**
+ * xmlXPathSubValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the subtraction operation on XPath objects:
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathSubValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg;
+ double val;
+
+ arg = valuePop(ctxt);
+ if (arg == NULL)
+ XP_ERROR(XPATH_INVALID_OPERAND);
+ val = xmlXPathCastToNumber(arg);
+ xmlXPathReleaseObject(ctxt->context, arg);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ ctxt->value->floatval -= val;
+}
+
+/**
+ * xmlXPathMultValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the multiply operation on XPath objects:
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathMultValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg;
+ double val;
+
+ arg = valuePop(ctxt);
+ if (arg == NULL)
+ XP_ERROR(XPATH_INVALID_OPERAND);
+ val = xmlXPathCastToNumber(arg);
+ xmlXPathReleaseObject(ctxt->context, arg);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ ctxt->value->floatval *= val;
+}
+
+/**
+ * xmlXPathDivValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the div operation on XPath objects @arg1 / @arg2:
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathDivValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg;
+ double val;
+
+ arg = valuePop(ctxt);
+ if (arg == NULL)
+ XP_ERROR(XPATH_INVALID_OPERAND);
+ val = xmlXPathCastToNumber(arg);
+ xmlXPathReleaseObject(ctxt->context, arg);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ if (xmlXPathIsNaN(val) || xmlXPathIsNaN(ctxt->value->floatval))
+ ctxt->value->floatval = xmlXPathNAN;
+ else if (val == 0 && xmlXPathGetSign(val) != 0) {
+ if (ctxt->value->floatval == 0)
+ ctxt->value->floatval = xmlXPathNAN;
+ else if (ctxt->value->floatval > 0)
+ ctxt->value->floatval = xmlXPathNINF;
+ else if (ctxt->value->floatval < 0)
+ ctxt->value->floatval = xmlXPathPINF;
+ }
+ else if (val == 0) {
+ if (ctxt->value->floatval == 0)
+ ctxt->value->floatval = xmlXPathNAN;
+ else if (ctxt->value->floatval > 0)
+ ctxt->value->floatval = xmlXPathPINF;
+ else if (ctxt->value->floatval < 0)
+ ctxt->value->floatval = xmlXPathNINF;
+ } else
+ ctxt->value->floatval /= val;
+}
+
+/**
+ * xmlXPathModValues:
+ * @ctxt: the XPath Parser context
+ *
+ * Implement the mod operation on XPath objects: @arg1 / @arg2
+ * The numeric operators convert their operands to numbers as if
+ * by calling the number function.
+ */
+void
+xmlXPathModValues(xmlXPathParserContextPtr ctxt) {
+ xmlXPathObjectPtr arg;
+ double arg1, arg2;
+
+ arg = valuePop(ctxt);
+ if (arg == NULL)
+ XP_ERROR(XPATH_INVALID_OPERAND);
+ arg2 = xmlXPathCastToNumber(arg);
+ xmlXPathReleaseObject(ctxt->context, arg);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ arg1 = ctxt->value->floatval;
+ if (arg2 == 0)
+ ctxt->value->floatval = xmlXPathNAN;
+ else {
+ ctxt->value->floatval = fmod(arg1, arg2);
+ }
+}
+
+/************************************************************************
+ * *
+ * The traversal functions *
+ * *
+ ************************************************************************/
+
+/*
+ * A traversal function enumerates nodes along an axis.
+ * Initially it must be called with NULL, and it indicates
+ * termination on the axis by returning NULL.
+ */
+typedef xmlNodePtr (*xmlXPathTraversalFunction)
+ (xmlXPathParserContextPtr ctxt, xmlNodePtr cur);
+
+/*
+ * xmlXPathTraversalFunctionExt:
+ * A traversal function enumerates nodes along an axis.
+ * Initially it must be called with NULL, and it indicates
+ * termination on the axis by returning NULL.
+ * The context node of the traversal is specified via @contextNode.
+ */
+typedef xmlNodePtr (*xmlXPathTraversalFunctionExt)
+ (xmlNodePtr cur, xmlNodePtr contextNode);
+
+/*
+ * xmlXPathNodeSetMergeFunction:
+ * Used for merging node sets in xmlXPathCollectAndTest().
+ */
+typedef xmlNodeSetPtr (*xmlXPathNodeSetMergeFunction)
+ (xmlNodeSetPtr, xmlNodeSetPtr, int);
+
+
+/**
+ * xmlXPathNextSelf:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "self" direction
+ * The self axis contains just the context node itself
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL)
+ return(ctxt->context->node);
+ return(NULL);
+}
+
+/**
+ * xmlXPathNextChild:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "child" direction
+ * The child axis contains the children of the context node in document order.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextChild(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ if (ctxt->context->node == NULL) return(NULL);
+ switch (ctxt->context->node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ return(ctxt->context->node->children);
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(((xmlDocPtr) ctxt->context->node)->children);
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_ATTRIBUTE_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ return(NULL);
+ }
+ return(NULL);
+ }
+ if ((cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE))
+ return(NULL);
+ return(cur->next);
+}
+
+/**
+ * xmlXPathNextChildElement:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "child" direction and nodes of type element.
+ * The child axis contains the children of the context node in document order.
+ *
+ * Returns the next element following that axis
+ */
+static xmlNodePtr
+xmlXPathNextChildElement(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ cur = ctxt->context->node;
+ if (cur == NULL) return(NULL);
+ /*
+ * Get the first element child.
+ */
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_ENTITY_REF_NODE: /* URGENT TODO: entify-refs as well? */
+ case XML_ENTITY_NODE:
+ cur = cur->children;
+ if (cur != NULL) {
+ if (cur->type == XML_ELEMENT_NODE)
+ return(cur);
+ do {
+ cur = cur->next;
+ } while ((cur != NULL) &&
+ (cur->type != XML_ELEMENT_NODE));
+ return(cur);
+ }
+ return(NULL);
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(xmlDocGetRootElement((xmlDocPtr) cur));
+ default:
+ return(NULL);
+ }
+ return(NULL);
+ }
+ /*
+ * Get the next sibling element node.
+ */
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_XINCLUDE_END:
+ break;
+ /* case XML_DTD_NODE: */ /* URGENT TODO: DTD-node as well? */
+ default:
+ return(NULL);
+ }
+ if (cur->next != NULL) {
+ if (cur->next->type == XML_ELEMENT_NODE)
+ return(cur->next);
+ cur = cur->next;
+ do {
+ cur = cur->next;
+ } while ((cur != NULL) && (cur->type != XML_ELEMENT_NODE));
+ return(cur);
+ }
+ return(NULL);
+}
+
+#if 0
+/**
+ * xmlXPathNextDescendantOrSelfElemParent:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "descendant-or-self" axis.
+ * Additionally it returns only nodes which can be parents of
+ * element nodes.
+ *
+ *
+ * Returns the next element following that axis
+ */
+static xmlNodePtr
+xmlXPathNextDescendantOrSelfElemParent(xmlNodePtr cur,
+ xmlNodePtr contextNode)
+{
+ if (cur == NULL) {
+ if (contextNode == NULL)
+ return(NULL);
+ switch (contextNode->type) {
+ case XML_ELEMENT_NODE:
+ case XML_XINCLUDE_START:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ return(contextNode);
+ default:
+ return(NULL);
+ }
+ return(NULL);
+ } else {
+ xmlNodePtr start = cur;
+
+ while (cur != NULL) {
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ /* TODO: OK to have XInclude here? */
+ case XML_XINCLUDE_START:
+ case XML_DOCUMENT_FRAG_NODE:
+ if (cur != start)
+ return(cur);
+ if (cur->children != NULL) {
+ cur = cur->children;
+ continue;
+ }
+ break;
+ /* Not sure if we need those here. */
+ case XML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_HTML_DOCUMENT_NODE:
+ if (cur != start)
+ return(cur);
+ return(xmlDocGetRootElement((xmlDocPtr) cur));
+ default:
+ break;
+ }
+
+next_sibling:
+ if ((cur == NULL) || (cur == contextNode))
+ return(NULL);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ } else {
+ cur = cur->parent;
+ goto next_sibling;
+ }
+ }
+ }
+ return(NULL);
+}
+#endif
+
+/**
+ * xmlXPathNextDescendant:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "descendant" direction
+ * the descendant axis contains the descendants of the context node in document
+ * order; a descendant is a child or a child of a child and so on.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ if (ctxt->context->node == NULL)
+ return(NULL);
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+
+ if (ctxt->context->node == (xmlNodePtr) ctxt->context->doc)
+ return(ctxt->context->doc->children);
+ return(ctxt->context->node->children);
+ }
+
+ if (cur->type == XML_NAMESPACE_DECL)
+ return(NULL);
+ if (cur->children != NULL) {
+ /*
+ * Do not descend on entities declarations
+ */
+ if (cur->children->type != XML_ENTITY_DECL) {
+ cur = cur->children;
+ /*
+ * Skip DTDs
+ */
+ if (cur->type != XML_DTD_NODE)
+ return(cur);
+ }
+ }
+
+ if (cur == ctxt->context->node) return(NULL);
+
+ while (cur->next != NULL) {
+ cur = cur->next;
+ if ((cur->type != XML_ENTITY_DECL) &&
+ (cur->type != XML_DTD_NODE))
+ return(cur);
+ }
+
+ do {
+ cur = cur->parent;
+ if (cur == NULL) break;
+ if (cur == ctxt->context->node) return(NULL);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ return(cur);
+ }
+ } while (cur != NULL);
+ return(cur);
+}
+
+/**
+ * xmlXPathNextDescendantOrSelf:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "descendant-or-self" direction
+ * the descendant-or-self axis contains the context node and the descendants
+ * of the context node in document order; thus the context node is the first
+ * node on the axis, and the first child of the context node is the second node
+ * on the axis
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ if (ctxt->context->node == NULL)
+ return(NULL);
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ return(ctxt->context->node);
+ }
+
+ return(xmlXPathNextDescendant(ctxt, cur));
+}
+
+/**
+ * xmlXPathNextParent:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "parent" direction
+ * The parent axis contains the parent of the context node, if there is one.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextParent(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ /*
+ * the parent of an attribute or namespace node is the element
+ * to which the attribute or namespace node is attached
+ * Namespace handling !!!
+ */
+ if (cur == NULL) {
+ if (ctxt->context->node == NULL) return(NULL);
+ switch (ctxt->context->node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ case XML_ENTITY_DECL:
+ if (ctxt->context->node->parent == NULL)
+ return((xmlNodePtr) ctxt->context->doc);
+ if ((ctxt->context->node->parent->type == XML_ELEMENT_NODE) &&
+ ((ctxt->context->node->parent->name[0] == ' ') ||
+ (xmlStrEqual(ctxt->context->node->parent->name,
+ BAD_CAST "fake node libxslt"))))
+ return(NULL);
+ return(ctxt->context->node->parent);
+ case XML_ATTRIBUTE_NODE: {
+ xmlAttrPtr att = (xmlAttrPtr) ctxt->context->node;
+
+ return(att->parent);
+ }
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(NULL);
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) ctxt->context->node;
+
+ if ((ns->next != NULL) &&
+ (ns->next->type != XML_NAMESPACE_DECL))
+ return((xmlNodePtr) ns->next);
+ return(NULL);
+ }
+ }
+ }
+ return(NULL);
+}
+
+/**
+ * xmlXPathNextAncestor:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "ancestor" direction
+ * the ancestor axis contains the ancestors of the context node; the ancestors
+ * of the context node consist of the parent of context node and the parent's
+ * parent and so on; the nodes are ordered in reverse document order; thus the
+ * parent is the first node on the axis, and the parent's parent is the second
+ * node on the axis
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ /*
+ * the parent of an attribute or namespace node is the element
+ * to which the attribute or namespace node is attached
+ * !!!!!!!!!!!!!
+ */
+ if (cur == NULL) {
+ if (ctxt->context->node == NULL) return(NULL);
+ switch (ctxt->context->node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_NOTATION_NODE:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ if (ctxt->context->node->parent == NULL)
+ return((xmlNodePtr) ctxt->context->doc);
+ if ((ctxt->context->node->parent->type == XML_ELEMENT_NODE) &&
+ ((ctxt->context->node->parent->name[0] == ' ') ||
+ (xmlStrEqual(ctxt->context->node->parent->name,
+ BAD_CAST "fake node libxslt"))))
+ return(NULL);
+ return(ctxt->context->node->parent);
+ case XML_ATTRIBUTE_NODE: {
+ xmlAttrPtr tmp = (xmlAttrPtr) ctxt->context->node;
+
+ return(tmp->parent);
+ }
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(NULL);
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) ctxt->context->node;
+
+ if ((ns->next != NULL) &&
+ (ns->next->type != XML_NAMESPACE_DECL))
+ return((xmlNodePtr) ns->next);
+ /* Bad, how did that namespace end up here ? */
+ return(NULL);
+ }
+ }
+ return(NULL);
+ }
+ if (cur == ctxt->context->doc->children)
+ return((xmlNodePtr) ctxt->context->doc);
+ if (cur == (xmlNodePtr) ctxt->context->doc)
+ return(NULL);
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ if (cur->parent == NULL)
+ return(NULL);
+ if ((cur->parent->type == XML_ELEMENT_NODE) &&
+ ((cur->parent->name[0] == ' ') ||
+ (xmlStrEqual(cur->parent->name,
+ BAD_CAST "fake node libxslt"))))
+ return(NULL);
+ return(cur->parent);
+ case XML_ATTRIBUTE_NODE: {
+ xmlAttrPtr att = (xmlAttrPtr) ctxt->context->node;
+
+ return(att->parent);
+ }
+ case XML_NAMESPACE_DECL: {
+ xmlNsPtr ns = (xmlNsPtr) ctxt->context->node;
+
+ if ((ns->next != NULL) &&
+ (ns->next->type != XML_NAMESPACE_DECL))
+ return((xmlNodePtr) ns->next);
+ /* Bad, how did that namespace end up here ? */
+ return(NULL);
+ }
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ return(NULL);
+ }
+ return(NULL);
+}
+
+/**
+ * xmlXPathNextAncestorOrSelf:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "ancestor-or-self" direction
+ * he ancestor-or-self axis contains the context node and ancestors of
+ * the context node in reverse document order; thus the context node is
+ * the first node on the axis, and the context node's parent the second;
+ * parent here is defined the same as with the parent axis.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL)
+ return(ctxt->context->node);
+ return(xmlXPathNextAncestor(ctxt, cur));
+}
+
+/**
+ * xmlXPathNextFollowingSibling:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "following-sibling" direction
+ * The following-sibling axis contains the following siblings of the context
+ * node in document order.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ if (cur == (xmlNodePtr) ctxt->context->doc)
+ return(NULL);
+ if (cur == NULL)
+ return(ctxt->context->node->next);
+ return(cur->next);
+}
+
+/**
+ * xmlXPathNextPrecedingSibling:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "preceding-sibling" direction
+ * The preceding-sibling axis contains the preceding siblings of the context
+ * node in reverse document order; the first preceding sibling is first on the
+ * axis; the sibling preceding that node is the second on the axis and so on.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||
+ (ctxt->context->node->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ if (cur == (xmlNodePtr) ctxt->context->doc)
+ return(NULL);
+ if (cur == NULL)
+ return(ctxt->context->node->prev);
+ if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE)) {
+ cur = cur->prev;
+ if (cur == NULL)
+ return(ctxt->context->node->prev);
+ }
+ return(cur->prev);
+}
+
+/**
+ * xmlXPathNextFollowing:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "following" direction
+ * The following axis contains all nodes in the same document as the context
+ * node that are after the context node in document order, excluding any
+ * descendants and excluding attribute nodes and namespace nodes; the nodes
+ * are ordered in document order
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if ((cur != NULL) && (cur->type != XML_ATTRIBUTE_NODE) &&
+ (cur->type != XML_NAMESPACE_DECL) && (cur->children != NULL))
+ return(cur->children);
+
+ if (cur == NULL) {
+ cur = ctxt->context->node;
+ if (cur->type == XML_NAMESPACE_DECL)
+ return(NULL);
+ if (cur->type == XML_ATTRIBUTE_NODE)
+ cur = cur->parent;
+ }
+ if (cur == NULL) return(NULL) ; /* ERROR */
+ if (cur->next != NULL) return(cur->next) ;
+ do {
+ cur = cur->parent;
+ if (cur == NULL) break;
+ if (cur == (xmlNodePtr) ctxt->context->doc) return(NULL);
+ if (cur->next != NULL) return(cur->next);
+ } while (cur != NULL);
+ return(cur);
+}
+
+/*
+ * xmlXPathIsAncestor:
+ * @ancestor: the ancestor node
+ * @node: the current node
+ *
+ * Check that @ancestor is a @node's ancestor
+ *
+ * returns 1 if @ancestor is a @node's ancestor, 0 otherwise.
+ */
+static int
+xmlXPathIsAncestor(xmlNodePtr ancestor, xmlNodePtr node) {
+ if ((ancestor == NULL) || (node == NULL)) return(0);
+ if (node->type == XML_NAMESPACE_DECL)
+ return(0);
+ if (ancestor->type == XML_NAMESPACE_DECL)
+ return(0);
+ /* nodes need to be in the same document */
+ if (ancestor->doc != node->doc) return(0);
+ /* avoid searching if ancestor or node is the root node */
+ if (ancestor == (xmlNodePtr) node->doc) return(1);
+ if (node == (xmlNodePtr) ancestor->doc) return(0);
+ while (node->parent != NULL) {
+ if (node->parent == ancestor)
+ return(1);
+ node = node->parent;
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathNextPreceding:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "preceding" direction
+ * the preceding axis contains all nodes in the same document as the context
+ * node that are before the context node in document order, excluding any
+ * ancestors and excluding attribute nodes and namespace nodes; the nodes are
+ * ordered in reverse document order
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)
+{
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ cur = ctxt->context->node;
+ if (cur->type == XML_NAMESPACE_DECL)
+ return(NULL);
+ if (cur->type == XML_ATTRIBUTE_NODE)
+ return(cur->parent);
+ }
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return (NULL);
+ if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
+ cur = cur->prev;
+ do {
+ if (cur->prev != NULL) {
+ for (cur = cur->prev; cur->last != NULL; cur = cur->last) ;
+ return (cur);
+ }
+
+ cur = cur->parent;
+ if (cur == NULL)
+ return (NULL);
+ if (cur == ctxt->context->doc->children)
+ return (NULL);
+ } while (xmlXPathIsAncestor(cur, ctxt->context->node));
+ return (cur);
+}
+
+/**
+ * xmlXPathNextPrecedingInternal:
+ * @ctxt: the XPath Parser context
+ * @cur: the current node in the traversal
+ *
+ * Traversal function for the "preceding" direction
+ * the preceding axis contains all nodes in the same document as the context
+ * node that are before the context node in document order, excluding any
+ * ancestors and excluding attribute nodes and namespace nodes; the nodes are
+ * ordered in reverse document order
+ * This is a faster implementation but internal only since it requires a
+ * state kept in the parser context: ctxt->ancestor.
+ *
+ * Returns the next element following that axis
+ */
+static xmlNodePtr
+xmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur)
+{
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (cur == NULL) {
+ cur = ctxt->context->node;
+ if (cur == NULL)
+ return (NULL);
+ if (cur->type == XML_NAMESPACE_DECL)
+ return (NULL);
+ ctxt->ancestor = cur->parent;
+ }
+ if (cur->type == XML_NAMESPACE_DECL)
+ return(NULL);
+ if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))
+ cur = cur->prev;
+ while (cur->prev == NULL) {
+ cur = cur->parent;
+ if (cur == NULL)
+ return (NULL);
+ if (cur == ctxt->context->doc->children)
+ return (NULL);
+ if (cur != ctxt->ancestor)
+ return (cur);
+ ctxt->ancestor = cur->parent;
+ }
+ cur = cur->prev;
+ while (cur->last != NULL)
+ cur = cur->last;
+ return (cur);
+}
+
+/**
+ * xmlXPathNextNamespace:
+ * @ctxt: the XPath Parser context
+ * @cur: the current attribute in the traversal
+ *
+ * Traversal function for the "namespace" direction
+ * the namespace axis contains the namespace nodes of the context node;
+ * the order of nodes on this axis is implementation-defined; the axis will
+ * be empty unless the context node is an element
+ *
+ * We keep the XML namespace node at the end of the list.
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (ctxt->context->node->type != XML_ELEMENT_NODE) return(NULL);
+ if (ctxt->context->tmpNsList == NULL && cur != (xmlNodePtr) xmlXPathXMLNamespace) {
+ if (ctxt->context->tmpNsList != NULL)
+ xmlFree(ctxt->context->tmpNsList);
+ ctxt->context->tmpNsList =
+ xmlGetNsList(ctxt->context->doc, ctxt->context->node);
+ ctxt->context->tmpNsNr = 0;
+ if (ctxt->context->tmpNsList != NULL) {
+ while (ctxt->context->tmpNsList[ctxt->context->tmpNsNr] != NULL) {
+ ctxt->context->tmpNsNr++;
+ }
+ }
+ return((xmlNodePtr) xmlXPathXMLNamespace);
+ }
+ if (ctxt->context->tmpNsNr > 0) {
+ return (xmlNodePtr)ctxt->context->tmpNsList[--ctxt->context->tmpNsNr];
+ } else {
+ if (ctxt->context->tmpNsList != NULL)
+ xmlFree(ctxt->context->tmpNsList);
+ ctxt->context->tmpNsList = NULL;
+ return(NULL);
+ }
+}
+
+/**
+ * xmlXPathNextAttribute:
+ * @ctxt: the XPath Parser context
+ * @cur: the current attribute in the traversal
+ *
+ * Traversal function for the "attribute" direction
+ * TODO: support DTD inherited default attributes
+ *
+ * Returns the next element following that axis
+ */
+xmlNodePtr
+xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {
+ if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);
+ if (ctxt->context->node == NULL)
+ return(NULL);
+ if (ctxt->context->node->type != XML_ELEMENT_NODE)
+ return(NULL);
+ if (cur == NULL) {
+ if (ctxt->context->node == (xmlNodePtr) ctxt->context->doc)
+ return(NULL);
+ return((xmlNodePtr)ctxt->context->node->properties);
+ }
+ return((xmlNodePtr)cur->next);
+}
+
+/************************************************************************
+ * *
+ * NodeTest Functions *
+ * *
+ ************************************************************************/
+
+#define IS_FUNCTION 200
+
+
+/************************************************************************
+ * *
+ * Implicit tree core function library *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathRoot:
+ * @ctxt: the XPath Parser context
+ *
+ * Initialize the context to the root of the document
+ */
+void
+xmlXPathRoot(xmlXPathParserContextPtr ctxt) {
+ if ((ctxt == NULL) || (ctxt->context == NULL))
+ return;
+ ctxt->context->node = (xmlNodePtr) ctxt->context->doc;
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+}
+
+/************************************************************************
+ * *
+ * The explicit core function library *
+ *http://www.w3.org/Style/XSL/Group/1999/07/xpath-19990705.html#corelib *
+ * *
+ ************************************************************************/
+
+
+/**
+ * xmlXPathLastFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the last() XPath function
+ * number last()
+ * The last function returns the number of nodes in the context node list.
+ */
+void
+xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+ if (ctxt->context->contextSize >= 0) {
+ valuePush(ctxt,
+ xmlXPathCacheNewFloat(ctxt->context,
+ (double) ctxt->context->contextSize));
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext,
+ "last() : %d\n", ctxt->context->contextSize);
+#endif
+ } else {
+ XP_ERROR(XPATH_INVALID_CTXT_SIZE);
+ }
+}
+
+/**
+ * xmlXPathPositionFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the position() XPath function
+ * number position()
+ * The position function returns the position of the context node in the
+ * context node list. The first position is 1, and so the last position
+ * will be equal to last().
+ */
+void
+xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+ if (ctxt->context->proximityPosition >= 0) {
+ valuePush(ctxt,
+ xmlXPathCacheNewFloat(ctxt->context,
+ (double) ctxt->context->proximityPosition));
+#ifdef DEBUG_EXPR
+ xmlGenericError(xmlGenericErrorContext, "position() : %d\n",
+ ctxt->context->proximityPosition);
+#endif
+ } else {
+ XP_ERROR(XPATH_INVALID_CTXT_POSITION);
+ }
+}
+
+/**
+ * xmlXPathCountFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the count() XPath function
+ * number count(node-set)
+ */
+void
+xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_XSLT_TREE)))
+ XP_ERROR(XPATH_INVALID_TYPE);
+ cur = valuePop(ctxt);
+
+ if ((cur == NULL) || (cur->nodesetval == NULL))
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, (double) 0));
+ else if ((cur->type == XPATH_NODESET) || (cur->type == XPATH_XSLT_TREE)) {
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context,
+ (double) cur->nodesetval->nodeNr));
+ } else {
+ if ((cur->nodesetval->nodeNr != 1) ||
+ (cur->nodesetval->nodeTab == NULL)) {
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, (double) 0));
+ } else {
+ xmlNodePtr tmp;
+ int i = 0;
+
+ tmp = cur->nodesetval->nodeTab[0];
+ if ((tmp != NULL) && (tmp->type != XML_NAMESPACE_DECL)) {
+ tmp = tmp->children;
+ while (tmp != NULL) {
+ tmp = tmp->next;
+ i++;
+ }
+ }
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, (double) i));
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+/**
+ * xmlXPathGetElementsByIds:
+ * @doc: the document
+ * @ids: a whitespace separated list of IDs
+ *
+ * Selects elements by their unique ID.
+ *
+ * Returns a node-set of selected elements.
+ */
+static xmlNodeSetPtr
+xmlXPathGetElementsByIds (xmlDocPtr doc, const xmlChar *ids) {
+ xmlNodeSetPtr ret;
+ const xmlChar *cur = ids;
+ xmlChar *ID;
+ xmlAttrPtr attr;
+ xmlNodePtr elem = NULL;
+
+ if (ids == NULL) return(NULL);
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ if (ret == NULL)
+ return(ret);
+
+ while (IS_BLANK_CH(*cur)) cur++;
+ while (*cur != 0) {
+ while ((!IS_BLANK_CH(*cur)) && (*cur != 0))
+ cur++;
+
+ ID = xmlStrndup(ids, cur - ids);
+ if (ID != NULL) {
+ /*
+ * We used to check the fact that the value passed
+ * was an NCName, but this generated much troubles for
+ * me and Aleksey Sanin, people blatantly violated that
+ * constaint, like Visa3D spec.
+ * if (xmlValidateNCName(ID, 1) == 0)
+ */
+ attr = xmlGetID(doc, ID);
+ if (attr != NULL) {
+ if (attr->type == XML_ATTRIBUTE_NODE)
+ elem = attr->parent;
+ else if (attr->type == XML_ELEMENT_NODE)
+ elem = (xmlNodePtr) attr;
+ else
+ elem = NULL;
+ if (elem != NULL)
+ xmlXPathNodeSetAdd(ret, elem);
+ }
+ xmlFree(ID);
+ }
+
+ while (IS_BLANK_CH(*cur)) cur++;
+ ids = cur;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathIdFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the id() XPath function
+ * node-set id(object)
+ * The id function selects elements by their unique ID
+ * (see [5.2.1 Unique IDs]). When the argument to id is of type node-set,
+ * then the result is the union of the result of applying id to the
+ * string value of each of the nodes in the argument node-set. When the
+ * argument to id is of any other type, the argument is converted to a
+ * string as if by a call to the string function; the string is split
+ * into a whitespace-separated list of tokens (whitespace is any sequence
+ * of characters matching the production S); the result is a node-set
+ * containing the elements in the same document as the context node that
+ * have a unique ID equal to any of the tokens in the list.
+ */
+void
+xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlChar *tokens;
+ xmlNodeSetPtr ret;
+ xmlXPathObjectPtr obj;
+
+ CHECK_ARITY(1);
+ obj = valuePop(ctxt);
+ if (obj == NULL) XP_ERROR(XPATH_INVALID_OPERAND);
+ if ((obj->type == XPATH_NODESET) || (obj->type == XPATH_XSLT_TREE)) {
+ xmlNodeSetPtr ns;
+ int i;
+
+ ret = xmlXPathNodeSetCreate(NULL);
+ /*
+ * FIXME -- in an out-of-memory condition this will behave badly.
+ * The solution is not clear -- we already popped an item from
+ * ctxt, so the object is in a corrupt state.
+ */
+
+ if (obj->nodesetval != NULL) {
+ for (i = 0; i < obj->nodesetval->nodeNr; i++) {
+ tokens =
+ xmlXPathCastNodeToString(obj->nodesetval->nodeTab[i]);
+ ns = xmlXPathGetElementsByIds(ctxt->context->doc, tokens);
+ ret = xmlXPathNodeSetMerge(ret, ns);
+ xmlXPathFreeNodeSet(ns);
+ if (tokens != NULL)
+ xmlFree(tokens);
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, obj);
+ valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt->context, ret));
+ return;
+ }
+ obj = xmlXPathCacheConvertString(ctxt->context, obj);
+ ret = xmlXPathGetElementsByIds(ctxt->context->doc, obj->stringval);
+ valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt->context, ret));
+ xmlXPathReleaseObject(ctxt->context, obj);
+ return;
+}
+
+/**
+ * xmlXPathLocalNameFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the local-name() XPath function
+ * string local-name(node-set?)
+ * The local-name function returns a string containing the local part
+ * of the name of the node in the argument node-set that is first in
+ * document order. If the node-set is empty or the first node has no
+ * name, an empty string is returned. If the argument is omitted it
+ * defaults to the context node.
+ */
+void
+xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ if (ctxt == NULL) return;
+
+ if (nargs == 0) {
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ nargs = 1;
+ }
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_XSLT_TREE)))
+ XP_ERROR(XPATH_INVALID_TYPE);
+ cur = valuePop(ctxt);
+
+ if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr == 0)) {
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ } else {
+ int i = 0; /* Should be first in document order !!!!! */
+ switch (cur->nodesetval->nodeTab[i]->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ case XML_PI_NODE:
+ if (cur->nodesetval->nodeTab[i]->name[0] == ' ')
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ else
+ valuePush(ctxt,
+ xmlXPathCacheNewString(ctxt->context,
+ cur->nodesetval->nodeTab[i]->name));
+ break;
+ case XML_NAMESPACE_DECL:
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ ((xmlNsPtr)cur->nodesetval->nodeTab[i])->prefix));
+ break;
+ default:
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+/**
+ * xmlXPathNamespaceURIFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the namespace-uri() XPath function
+ * string namespace-uri(node-set?)
+ * The namespace-uri function returns a string containing the
+ * namespace URI of the expanded name of the node in the argument
+ * node-set that is first in document order. If the node-set is empty,
+ * the first node has no name, or the expanded name has no namespace
+ * URI, an empty string is returned. If the argument is omitted it
+ * defaults to the context node.
+ */
+void
+xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ if (ctxt == NULL) return;
+
+ if (nargs == 0) {
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ nargs = 1;
+ }
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_XSLT_TREE)))
+ XP_ERROR(XPATH_INVALID_TYPE);
+ cur = valuePop(ctxt);
+
+ if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr == 0)) {
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ } else {
+ int i = 0; /* Should be first in document order !!!!! */
+ switch (cur->nodesetval->nodeTab[i]->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if (cur->nodesetval->nodeTab[i]->ns == NULL)
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ else
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ cur->nodesetval->nodeTab[i]->ns->href));
+ break;
+ default:
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+/**
+ * xmlXPathNameFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the name() XPath function
+ * string name(node-set?)
+ * The name function returns a string containing a QName representing
+ * the name of the node in the argument node-set that is first in document
+ * order. The QName must represent the name with respect to the namespace
+ * declarations in effect on the node whose name is being represented.
+ * Typically, this will be the form in which the name occurred in the XML
+ * source. This need not be the case if there are namespace declarations
+ * in effect on the node that associate multiple prefixes with the same
+ * namespace. However, an implementation may include information about
+ * the original prefix in its representation of nodes; in this case, an
+ * implementation can ensure that the returned string is always the same
+ * as the QName used in the XML source. If the argument it omitted it
+ * defaults to the context node.
+ * Libxml keep the original prefix so the "real qualified name" used is
+ * returned.
+ */
+static void
+xmlXPathNameFunction(xmlXPathParserContextPtr ctxt, int nargs)
+{
+ xmlXPathObjectPtr cur;
+
+ if (nargs == 0) {
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ nargs = 1;
+ }
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_XSLT_TREE)))
+ XP_ERROR(XPATH_INVALID_TYPE);
+ cur = valuePop(ctxt);
+
+ if ((cur->nodesetval == NULL) || (cur->nodesetval->nodeNr == 0)) {
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ } else {
+ int i = 0; /* Should be first in document order !!!!! */
+
+ switch (cur->nodesetval->nodeTab[i]->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if (cur->nodesetval->nodeTab[i]->name[0] == ' ')
+ valuePush(ctxt,
+ xmlXPathCacheNewCString(ctxt->context, ""));
+ else if ((cur->nodesetval->nodeTab[i]->ns == NULL) ||
+ (cur->nodesetval->nodeTab[i]->ns->prefix == NULL)) {
+ valuePush(ctxt,
+ xmlXPathCacheNewString(ctxt->context,
+ cur->nodesetval->nodeTab[i]->name));
+ } else {
+ xmlChar *fullname;
+
+ fullname = xmlBuildQName(cur->nodesetval->nodeTab[i]->name,
+ cur->nodesetval->nodeTab[i]->ns->prefix,
+ NULL, 0);
+ if (fullname == cur->nodesetval->nodeTab[i]->name)
+ fullname = xmlStrdup(cur->nodesetval->nodeTab[i]->name);
+ if (fullname == NULL) {
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ valuePush(ctxt, xmlXPathCacheWrapString(
+ ctxt->context, fullname));
+ }
+ break;
+ default:
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ cur->nodesetval->nodeTab[i]));
+ xmlXPathLocalNameFunction(ctxt, 1);
+ }
+ }
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+
+/**
+ * xmlXPathStringFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the string() XPath function
+ * string string(object?)
+ * The string function converts an object to a string as follows:
+ * - A node-set is converted to a string by returning the value of
+ * the node in the node-set that is first in document order.
+ * If the node-set is empty, an empty string is returned.
+ * - A number is converted to a string as follows
+ * + NaN is converted to the string NaN
+ * + positive zero is converted to the string 0
+ * + negative zero is converted to the string 0
+ * + positive infinity is converted to the string Infinity
+ * + negative infinity is converted to the string -Infinity
+ * + if the number is an integer, the number is represented in
+ * decimal form as a Number with no decimal point and no leading
+ * zeros, preceded by a minus sign (-) if the number is negative
+ * + otherwise, the number is represented in decimal form as a
+ * Number including a decimal point with at least one digit
+ * before the decimal point and at least one digit after the
+ * decimal point, preceded by a minus sign (-) if the number
+ * is negative; there must be no leading zeros before the decimal
+ * point apart possibly from the one required digit immediately
+ * before the decimal point; beyond the one required digit
+ * after the decimal point there must be as many, but only as
+ * many, more digits as are needed to uniquely distinguish the
+ * number from all other IEEE 754 numeric values.
+ * - The boolean false value is converted to the string false.
+ * The boolean true value is converted to the string true.
+ *
+ * If the argument is omitted, it defaults to a node-set with the
+ * context node as its only member.
+ */
+void
+xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ if (ctxt == NULL) return;
+ if (nargs == 0) {
+ valuePush(ctxt,
+ xmlXPathCacheWrapString(ctxt->context,
+ xmlXPathCastNodeToString(ctxt->context->node)));
+ return;
+ }
+
+ CHECK_ARITY(1);
+ cur = valuePop(ctxt);
+ if (cur == NULL) XP_ERROR(XPATH_INVALID_OPERAND);
+ valuePush(ctxt, xmlXPathCacheConvertString(ctxt->context, cur));
+}
+
+/**
+ * xmlXPathStringLengthFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the string-length() XPath function
+ * number string-length(string?)
+ * The string-length returns the number of characters in the string
+ * (see [3.6 Strings]). If the argument is omitted, it defaults to
+ * the context node converted to a string, in other words the value
+ * of the context node.
+ */
+void
+xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ if (nargs == 0) {
+ if ((ctxt == NULL) || (ctxt->context == NULL))
+ return;
+ if (ctxt->context->node == NULL) {
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, 0));
+ } else {
+ xmlChar *content;
+
+ content = xmlXPathCastNodeToString(ctxt->context->node);
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context,
+ xmlUTF8Strlen(content)));
+ xmlFree(content);
+ }
+ return;
+ }
+ CHECK_ARITY(1);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ cur = valuePop(ctxt);
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context,
+ xmlUTF8Strlen(cur->stringval)));
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+/**
+ * xmlXPathConcatFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the concat() XPath function
+ * string concat(string, string, string*)
+ * The concat function returns the concatenation of its arguments.
+ */
+void
+xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur, newobj;
+ xmlChar *tmp;
+
+ if (ctxt == NULL) return;
+ if (nargs < 2) {
+ CHECK_ARITY(2);
+ }
+
+ CAST_TO_STRING;
+ cur = valuePop(ctxt);
+ if ((cur == NULL) || (cur->type != XPATH_STRING)) {
+ xmlXPathReleaseObject(ctxt->context, cur);
+ return;
+ }
+ nargs--;
+
+ while (nargs > 0) {
+ CAST_TO_STRING;
+ newobj = valuePop(ctxt);
+ if ((newobj == NULL) || (newobj->type != XPATH_STRING)) {
+ xmlXPathReleaseObject(ctxt->context, newobj);
+ xmlXPathReleaseObject(ctxt->context, cur);
+ XP_ERROR(XPATH_INVALID_TYPE);
+ }
+ tmp = xmlStrcat(newobj->stringval, cur->stringval);
+ newobj->stringval = cur->stringval;
+ cur->stringval = tmp;
+ xmlXPathReleaseObject(ctxt->context, newobj);
+ nargs--;
+ }
+ valuePush(ctxt, cur);
+}
+
+/**
+ * xmlXPathContainsFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the contains() XPath function
+ * boolean contains(string, string)
+ * The contains function returns true if the first argument string
+ * contains the second argument string, and otherwise returns false.
+ */
+void
+xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr hay, needle;
+
+ CHECK_ARITY(2);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ needle = valuePop(ctxt);
+ CAST_TO_STRING;
+ hay = valuePop(ctxt);
+
+ if ((hay == NULL) || (hay->type != XPATH_STRING)) {
+ xmlXPathReleaseObject(ctxt->context, hay);
+ xmlXPathReleaseObject(ctxt->context, needle);
+ XP_ERROR(XPATH_INVALID_TYPE);
+ }
+ if (xmlStrstr(hay->stringval, needle->stringval))
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 1));
+ else
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 0));
+ xmlXPathReleaseObject(ctxt->context, hay);
+ xmlXPathReleaseObject(ctxt->context, needle);
+}
+
+/**
+ * xmlXPathStartsWithFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the starts-with() XPath function
+ * boolean starts-with(string, string)
+ * The starts-with function returns true if the first argument string
+ * starts with the second argument string, and otherwise returns false.
+ */
+void
+xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr hay, needle;
+ int n;
+
+ CHECK_ARITY(2);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ needle = valuePop(ctxt);
+ CAST_TO_STRING;
+ hay = valuePop(ctxt);
+
+ if ((hay == NULL) || (hay->type != XPATH_STRING)) {
+ xmlXPathReleaseObject(ctxt->context, hay);
+ xmlXPathReleaseObject(ctxt->context, needle);
+ XP_ERROR(XPATH_INVALID_TYPE);
+ }
+ n = xmlStrlen(needle->stringval);
+ if (xmlStrncmp(hay->stringval, needle->stringval, n))
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 0));
+ else
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 1));
+ xmlXPathReleaseObject(ctxt->context, hay);
+ xmlXPathReleaseObject(ctxt->context, needle);
+}
+
+/**
+ * xmlXPathSubstringFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the substring() XPath function
+ * string substring(string, number, number?)
+ * The substring function returns the substring of the first argument
+ * starting at the position specified in the second argument with
+ * length specified in the third argument. For example,
+ * substring("12345",2,3) returns "234". If the third argument is not
+ * specified, it returns the substring starting at the position specified
+ * in the second argument and continuing to the end of the string. For
+ * example, substring("12345",2) returns "2345". More precisely, each
+ * character in the string (see [3.6 Strings]) is considered to have a
+ * numeric position: the position of the first character is 1, the position
+ * of the second character is 2 and so on. The returned substring contains
+ * those characters for which the position of the character is greater than
+ * or equal to the second argument and, if the third argument is specified,
+ * less than the sum of the second and third arguments; the comparisons
+ * and addition used for the above follow the standard IEEE 754 rules. Thus:
+ * - substring("12345", 1.5, 2.6) returns "234"
+ * - substring("12345", 0, 3) returns "12"
+ * - substring("12345", 0 div 0, 3) returns ""
+ * - substring("12345", 1, 0 div 0) returns ""
+ * - substring("12345", -42, 1 div 0) returns "12345"
+ * - substring("12345", -1 div 0, 1 div 0) returns ""
+ */
+void
+xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr str, start, len;
+ double le=0, in;
+ int i, l, m;
+ xmlChar *ret;
+
+ if (nargs < 2) {
+ CHECK_ARITY(2);
+ }
+ if (nargs > 3) {
+ CHECK_ARITY(3);
+ }
+ /*
+ * take care of possible last (position) argument
+ */
+ if (nargs == 3) {
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ len = valuePop(ctxt);
+ le = len->floatval;
+ xmlXPathReleaseObject(ctxt->context, len);
+ }
+
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+ start = valuePop(ctxt);
+ in = start->floatval;
+ xmlXPathReleaseObject(ctxt->context, start);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ str = valuePop(ctxt);
+ m = xmlUTF8Strlen((const unsigned char *)str->stringval);
+
+ /*
+ * If last pos not present, calculate last position
+ */
+ if (nargs != 3) {
+ le = (double)m;
+ if (in < 1.0)
+ in = 1.0;
+ }
+
+ /* Need to check for the special cases where either
+ * the index is NaN, the length is NaN, or both
+ * arguments are infinity (relying on Inf + -Inf = NaN)
+ */
+ if (!xmlXPathIsInf(in) && !xmlXPathIsNaN(in + le)) {
+ /*
+ * To meet the requirements of the spec, the arguments
+ * must be converted to integer format before
+ * initial index calculations are done
+ *
+ * First we go to integer form, rounding up
+ * and checking for special cases
+ */
+ i = (int) in;
+ if (((double)i)+0.5 <= in) i++;
+
+ if (xmlXPathIsInf(le) == 1) {
+ l = m;
+ if (i < 1)
+ i = 1;
+ }
+ else if (xmlXPathIsInf(le) == -1 || le < 0.0)
+ l = 0;
+ else {
+ l = (int) le;
+ if (((double)l)+0.5 <= le) l++;
+ }
+
+ /* Now we normalize inidices */
+ i -= 1;
+ l += i;
+ if (i < 0)
+ i = 0;
+ if (l > m)
+ l = m;
+
+ /* number of chars to copy */
+ l -= i;
+
+ ret = xmlUTF8Strsub(str->stringval, i, l);
+ }
+ else {
+ ret = NULL;
+ }
+ if (ret == NULL)
+ valuePush(ctxt, xmlXPathCacheNewCString(ctxt->context, ""));
+ else {
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context, ret));
+ xmlFree(ret);
+ }
+ xmlXPathReleaseObject(ctxt->context, str);
+}
+
+/**
+ * xmlXPathSubstringBeforeFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the substring-before() XPath function
+ * string substring-before(string, string)
+ * The substring-before function returns the substring of the first
+ * argument string that precedes the first occurrence of the second
+ * argument string in the first argument string, or the empty string
+ * if the first argument string does not contain the second argument
+ * string. For example, substring-before("1999/04/01","/") returns 1999.
+ */
+void
+xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr str;
+ xmlXPathObjectPtr find;
+ xmlBufPtr target;
+ const xmlChar *point;
+ int offset;
+
+ CHECK_ARITY(2);
+ CAST_TO_STRING;
+ find = valuePop(ctxt);
+ CAST_TO_STRING;
+ str = valuePop(ctxt);
+
+ target = xmlBufCreate();
+ if (target) {
+ point = xmlStrstr(str->stringval, find->stringval);
+ if (point) {
+ offset = (int)(point - str->stringval);
+ xmlBufAdd(target, str->stringval, offset);
+ }
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ xmlBufContent(target)));
+ xmlBufFree(target);
+ }
+ xmlXPathReleaseObject(ctxt->context, str);
+ xmlXPathReleaseObject(ctxt->context, find);
+}
+
+/**
+ * xmlXPathSubstringAfterFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the substring-after() XPath function
+ * string substring-after(string, string)
+ * The substring-after function returns the substring of the first
+ * argument string that follows the first occurrence of the second
+ * argument string in the first argument string, or the empty stringi
+ * if the first argument string does not contain the second argument
+ * string. For example, substring-after("1999/04/01","/") returns 04/01,
+ * and substring-after("1999/04/01","19") returns 99/04/01.
+ */
+void
+xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr str;
+ xmlXPathObjectPtr find;
+ xmlBufPtr target;
+ const xmlChar *point;
+ int offset;
+
+ CHECK_ARITY(2);
+ CAST_TO_STRING;
+ find = valuePop(ctxt);
+ CAST_TO_STRING;
+ str = valuePop(ctxt);
+
+ target = xmlBufCreate();
+ if (target) {
+ point = xmlStrstr(str->stringval, find->stringval);
+ if (point) {
+ offset = (int)(point - str->stringval) + xmlStrlen(find->stringval);
+ xmlBufAdd(target, &str->stringval[offset],
+ xmlStrlen(str->stringval) - offset);
+ }
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ xmlBufContent(target)));
+ xmlBufFree(target);
+ }
+ xmlXPathReleaseObject(ctxt->context, str);
+ xmlXPathReleaseObject(ctxt->context, find);
+}
+
+/**
+ * xmlXPathNormalizeFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the normalize-space() XPath function
+ * string normalize-space(string?)
+ * The normalize-space function returns the argument string with white
+ * space normalized by stripping leading and trailing whitespace
+ * and replacing sequences of whitespace characters by a single
+ * space. Whitespace characters are the same allowed by the S production
+ * in XML. If the argument is omitted, it defaults to the context
+ * node converted to a string, in other words the value of the context node.
+ */
+void
+xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr obj = NULL;
+ xmlChar *source = NULL;
+ xmlBufPtr target;
+ xmlChar blank;
+
+ if (ctxt == NULL) return;
+ if (nargs == 0) {
+ /* Use current context node */
+ valuePush(ctxt,
+ xmlXPathCacheWrapString(ctxt->context,
+ xmlXPathCastNodeToString(ctxt->context->node)));
+ nargs = 1;
+ }
+
+ CHECK_ARITY(1);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ obj = valuePop(ctxt);
+ source = obj->stringval;
+
+ target = xmlBufCreate();
+ if (target && source) {
+
+ /* Skip leading whitespaces */
+ while (IS_BLANK_CH(*source))
+ source++;
+
+ /* Collapse intermediate whitespaces, and skip trailing whitespaces */
+ blank = 0;
+ while (*source) {
+ if (IS_BLANK_CH(*source)) {
+ blank = 0x20;
+ } else {
+ if (blank) {
+ xmlBufAdd(target, &blank, 1);
+ blank = 0;
+ }
+ xmlBufAdd(target, source, 1);
+ }
+ source++;
+ }
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ xmlBufContent(target)));
+ xmlBufFree(target);
+ }
+ xmlXPathReleaseObject(ctxt->context, obj);
+}
+
+/**
+ * xmlXPathTranslateFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the translate() XPath function
+ * string translate(string, string, string)
+ * The translate function returns the first argument string with
+ * occurrences of characters in the second argument string replaced
+ * by the character at the corresponding position in the third argument
+ * string. For example, translate("bar","abc","ABC") returns the string
+ * BAr. If there is a character in the second argument string with no
+ * character at a corresponding position in the third argument string
+ * (because the second argument string is longer than the third argument
+ * string), then occurrences of that character in the first argument
+ * string are removed. For example, translate("--aaa--","abc-","ABC")
+ * returns "AAA". If a character occurs more than once in second
+ * argument string, then the first occurrence determines the replacement
+ * character. If the third argument string is longer than the second
+ * argument string, then excess characters are ignored.
+ */
+void
+xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr str;
+ xmlXPathObjectPtr from;
+ xmlXPathObjectPtr to;
+ xmlBufPtr target;
+ int offset, max;
+ xmlChar ch;
+ const xmlChar *point;
+ xmlChar *cptr;
+
+ CHECK_ARITY(3);
+
+ CAST_TO_STRING;
+ to = valuePop(ctxt);
+ CAST_TO_STRING;
+ from = valuePop(ctxt);
+ CAST_TO_STRING;
+ str = valuePop(ctxt);
+
+ target = xmlBufCreate();
+ if (target) {
+ max = xmlUTF8Strlen(to->stringval);
+ for (cptr = str->stringval; (ch=*cptr); ) {
+ offset = xmlUTF8Strloc(from->stringval, cptr);
+ if (offset >= 0) {
+ if (offset < max) {
+ point = xmlUTF8Strpos(to->stringval, offset);
+ if (point)
+ xmlBufAdd(target, point, xmlUTF8Strsize(point, 1));
+ }
+ } else
+ xmlBufAdd(target, cptr, xmlUTF8Strsize(cptr, 1));
+
+ /* Step to next character in input */
+ cptr++;
+ if ( ch & 0x80 ) {
+ /* if not simple ascii, verify proper format */
+ if ( (ch & 0xc0) != 0xc0 ) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathTranslateFunction: Invalid UTF8 string\n");
+ /* not asserting an XPath error is probably better */
+ break;
+ }
+ /* then skip over remaining bytes for this char */
+ while ( (ch <<= 1) & 0x80 )
+ if ( (*cptr++ & 0xc0) != 0x80 ) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathTranslateFunction: Invalid UTF8 string\n");
+ /* not asserting an XPath error is probably better */
+ break;
+ }
+ if (ch & 0x80) /* must have had error encountered */
+ break;
+ }
+ }
+ }
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ xmlBufContent(target)));
+ xmlBufFree(target);
+ xmlXPathReleaseObject(ctxt->context, str);
+ xmlXPathReleaseObject(ctxt->context, from);
+ xmlXPathReleaseObject(ctxt->context, to);
+}
+
+/**
+ * xmlXPathBooleanFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the boolean() XPath function
+ * boolean boolean(object)
+ * The boolean function converts its argument to a boolean as follows:
+ * - a number is true if and only if it is neither positive or
+ * negative zero nor NaN
+ * - a node-set is true if and only if it is non-empty
+ * - a string is true if and only if its length is non-zero
+ */
+void
+xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+
+ CHECK_ARITY(1);
+ cur = valuePop(ctxt);
+ if (cur == NULL) XP_ERROR(XPATH_INVALID_OPERAND);
+ cur = xmlXPathCacheConvertBoolean(ctxt->context, cur);
+ valuePush(ctxt, cur);
+}
+
+/**
+ * xmlXPathNotFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the not() XPath function
+ * boolean not(boolean)
+ * The not function returns true if its argument is false,
+ * and false otherwise.
+ */
+void
+xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(1);
+ CAST_TO_BOOLEAN;
+ CHECK_TYPE(XPATH_BOOLEAN);
+ ctxt->value->boolval = ! ctxt->value->boolval;
+}
+
+/**
+ * xmlXPathTrueFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the true() XPath function
+ * boolean true()
+ */
+void
+xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 1));
+}
+
+/**
+ * xmlXPathFalseFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the false() XPath function
+ * boolean false()
+ */
+void
+xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, 0));
+}
+
+/**
+ * xmlXPathLangFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the lang() XPath function
+ * boolean lang(string)
+ * The lang function returns true or false depending on whether the
+ * language of the context node as specified by xml:lang attributes
+ * is the same as or is a sublanguage of the language specified by
+ * the argument string. The language of the context node is determined
+ * by the value of the xml:lang attribute on the context node, or, if
+ * the context node has no xml:lang attribute, by the value of the
+ * xml:lang attribute on the nearest ancestor of the context node that
+ * has an xml:lang attribute. If there is no such attribute, then lang
+ * returns false. If there is such an attribute, then lang returns
+ * true if the attribute value is equal to the argument ignoring case,
+ * or if there is some suffix starting with - such that the attribute
+ * value is equal to the argument ignoring that suffix of the attribute
+ * value and ignoring case.
+ */
+void
+xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr val = NULL;
+ const xmlChar *theLang = NULL;
+ const xmlChar *lang;
+ int ret = 0;
+ int i;
+
+ CHECK_ARITY(1);
+ CAST_TO_STRING;
+ CHECK_TYPE(XPATH_STRING);
+ val = valuePop(ctxt);
+ lang = val->stringval;
+ theLang = xmlNodeGetLang(ctxt->context->node);
+ if ((theLang != NULL) && (lang != NULL)) {
+ for (i = 0;lang[i] != 0;i++)
+ if (toupper(lang[i]) != toupper(theLang[i]))
+ goto not_equal;
+ if ((theLang[i] == 0) || (theLang[i] == '-'))
+ ret = 1;
+ }
+not_equal:
+ if (theLang != NULL)
+ xmlFree((void *)theLang);
+
+ xmlXPathReleaseObject(ctxt->context, val);
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, ret));
+}
+
+/**
+ * xmlXPathNumberFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the number() XPath function
+ * number number(object?)
+ */
+void
+xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+ double res;
+
+ if (ctxt == NULL) return;
+ if (nargs == 0) {
+ if (ctxt->context->node == NULL) {
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, 0.0));
+ } else {
+ xmlChar* content = xmlNodeGetContent(ctxt->context->node);
+
+ res = xmlXPathStringEvalNumber(content);
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, res));
+ xmlFree(content);
+ }
+ return;
+ }
+
+ CHECK_ARITY(1);
+ cur = valuePop(ctxt);
+ valuePush(ctxt, xmlXPathCacheConvertNumber(ctxt->context, cur));
+}
+
+/**
+ * xmlXPathSumFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the sum() XPath function
+ * number sum(node-set)
+ * The sum function returns the sum of the values of the nodes in
+ * the argument node-set.
+ */
+void
+xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr cur;
+ int i;
+ double res = 0.0;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_XSLT_TREE)))
+ XP_ERROR(XPATH_INVALID_TYPE);
+ cur = valuePop(ctxt);
+
+ if ((cur->nodesetval != NULL) && (cur->nodesetval->nodeNr != 0)) {
+ for (i = 0; i < cur->nodesetval->nodeNr; i++) {
+ res += xmlXPathCastNodeToNumber(cur->nodesetval->nodeTab[i]);
+ }
+ }
+ valuePush(ctxt, xmlXPathCacheNewFloat(ctxt->context, res));
+ xmlXPathReleaseObject(ctxt->context, cur);
+}
+
+/*
+ * To assure working code on multiple platforms, we want to only depend
+ * upon the characteristic truncation of converting a floating point value
+ * to an integer. Unfortunately, because of the different storage sizes
+ * of our internal floating point value (double) and integer (int), we
+ * can't directly convert (see bug 301162). This macro is a messy
+ * 'workaround'
+ */
+#define XTRUNC(f, v) \
+ f = fmod((v), INT_MAX); \
+ f = (v) - (f) + (double)((int)(f));
+
+/**
+ * xmlXPathFloorFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the floor() XPath function
+ * number floor(number)
+ * The floor function returns the largest (closest to positive infinity)
+ * number that is not greater than the argument and that is an integer.
+ */
+void
+xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ double f;
+
+ CHECK_ARITY(1);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+
+ XTRUNC(f, ctxt->value->floatval);
+ if (f != ctxt->value->floatval) {
+ if (ctxt->value->floatval > 0)
+ ctxt->value->floatval = f;
+ else
+ ctxt->value->floatval = f - 1;
+ }
+}
+
+/**
+ * xmlXPathCeilingFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the ceiling() XPath function
+ * number ceiling(number)
+ * The ceiling function returns the smallest (closest to negative infinity)
+ * number that is not less than the argument and that is an integer.
+ */
+void
+xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ double f;
+
+ CHECK_ARITY(1);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+
+#if 0
+ ctxt->value->floatval = ceil(ctxt->value->floatval);
+#else
+ XTRUNC(f, ctxt->value->floatval);
+ if (f != ctxt->value->floatval) {
+ if (ctxt->value->floatval > 0)
+ ctxt->value->floatval = f + 1;
+ else {
+ if (ctxt->value->floatval < 0 && f == 0)
+ ctxt->value->floatval = xmlXPathNZERO;
+ else
+ ctxt->value->floatval = f;
+ }
+
+ }
+#endif
+}
+
+/**
+ * xmlXPathRoundFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the round() XPath function
+ * number round(number)
+ * The round function returns the number that is closest to the
+ * argument and that is an integer. If there are two such numbers,
+ * then the one that is even is returned.
+ */
+void
+xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ double f;
+
+ CHECK_ARITY(1);
+ CAST_TO_NUMBER;
+ CHECK_TYPE(XPATH_NUMBER);
+
+ if ((xmlXPathIsNaN(ctxt->value->floatval)) ||
+ (xmlXPathIsInf(ctxt->value->floatval) == 1) ||
+ (xmlXPathIsInf(ctxt->value->floatval) == -1) ||
+ (ctxt->value->floatval == 0.0))
+ return;
+
+ XTRUNC(f, ctxt->value->floatval);
+ if (ctxt->value->floatval < 0) {
+ if (ctxt->value->floatval < f - 0.5)
+ ctxt->value->floatval = f - 1;
+ else
+ ctxt->value->floatval = f;
+ if (ctxt->value->floatval == 0)
+ ctxt->value->floatval = xmlXPathNZERO;
+ } else {
+ if (ctxt->value->floatval < f + 0.5)
+ ctxt->value->floatval = f;
+ else
+ ctxt->value->floatval = f + 1;
+ }
+}
+
+/************************************************************************
+ * *
+ * The Parser *
+ * *
+ ************************************************************************/
+
+/*
+ * a few forward declarations since we use a recursive call based
+ * implementation.
+ */
+static void xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort);
+static void xmlXPathCompPredicate(xmlXPathParserContextPtr ctxt, int filter);
+static void xmlXPathCompLocationPath(xmlXPathParserContextPtr ctxt);
+static void xmlXPathCompRelativeLocationPath(xmlXPathParserContextPtr ctxt);
+static xmlChar * xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt,
+ int qualified);
+
+/**
+ * xmlXPathCurrentChar:
+ * @ctxt: the XPath parser context
+ * @cur: pointer to the beginning of the char
+ * @len: pointer to the length of the char read
+ *
+ * The current char value, if using UTF-8 this may actually span multiple
+ * bytes in the input buffer.
+ *
+ * Returns the current char value and its length
+ */
+
+static int
+xmlXPathCurrentChar(xmlXPathParserContextPtr ctxt, int *len) {
+ unsigned char c;
+ unsigned int val;
+ const xmlChar *cur;
+
+ if (ctxt == NULL)
+ return(0);
+ cur = ctxt->cur;
+
+ /*
+ * We are supposed to handle UTF8, check it's valid
+ * From rfc2044: encoding of the Unicode values on UTF-8:
+ *
+ * UCS-4 range (hex.) UTF-8 octet sequence (binary)
+ * 0000 0000-0000 007F 0xxxxxxx
+ * 0000 0080-0000 07FF 110xxxxx 10xxxxxx
+ * 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
+ *
+ * Check for the 0x110000 limit too
+ */
+ c = *cur;
+ if (c & 0x80) {
+ if ((cur[1] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xe0) == 0xe0) {
+
+ if ((cur[2] & 0xc0) != 0x80)
+ goto encoding_error;
+ if ((c & 0xf0) == 0xf0) {
+ if (((c & 0xf8) != 0xf0) ||
+ ((cur[3] & 0xc0) != 0x80))
+ goto encoding_error;
+ /* 4-byte code */
+ *len = 4;
+ val = (cur[0] & 0x7) << 18;
+ val |= (cur[1] & 0x3f) << 12;
+ val |= (cur[2] & 0x3f) << 6;
+ val |= cur[3] & 0x3f;
+ } else {
+ /* 3-byte code */
+ *len = 3;
+ val = (cur[0] & 0xf) << 12;
+ val |= (cur[1] & 0x3f) << 6;
+ val |= cur[2] & 0x3f;
+ }
+ } else {
+ /* 2-byte code */
+ *len = 2;
+ val = (cur[0] & 0x1f) << 6;
+ val |= cur[1] & 0x3f;
+ }
+ if (!IS_CHAR(val)) {
+ XP_ERROR0(XPATH_INVALID_CHAR_ERROR);
+ }
+ return(val);
+ } else {
+ /* 1-byte code */
+ *len = 1;
+ return((int) *cur);
+ }
+encoding_error:
+ /*
+ * If we detect an UTF8 error that probably means that the
+ * input encoding didn't get properly advertised in the
+ * declaration header. Report the error and switch the encoding
+ * to ISO-Latin-1 (if you don't like this policy, just declare the
+ * encoding !)
+ */
+ *len = 0;
+ XP_ERROR0(XPATH_ENCODING_ERROR);
+}
+
+/**
+ * xmlXPathParseNCName:
+ * @ctxt: the XPath Parser context
+ *
+ * parse an XML namespace non qualified name.
+ *
+ * [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
+ *
+ * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
+ * CombiningChar | Extender
+ *
+ * Returns the namespace name or NULL
+ */
+
+xmlChar *
+xmlXPathParseNCName(xmlXPathParserContextPtr ctxt) {
+ const xmlChar *in;
+ xmlChar *ret;
+ int count = 0;
+
+ if ((ctxt == NULL) || (ctxt->cur == NULL)) return(NULL);
+ /*
+ * Accelerator for simple ASCII names
+ */
+ in = ctxt->cur;
+ if (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ (*in == '_')) {
+ in++;
+ while (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ ((*in >= 0x30) && (*in <= 0x39)) ||
+ (*in == '_') || (*in == '.') ||
+ (*in == '-'))
+ in++;
+ if ((*in == ' ') || (*in == '>') || (*in == '/') ||
+ (*in == '[') || (*in == ']') || (*in == ':') ||
+ (*in == '@') || (*in == '*')) {
+ count = in - ctxt->cur;
+ if (count == 0)
+ return(NULL);
+ ret = xmlStrndup(ctxt->cur, count);
+ ctxt->cur = in;
+ return(ret);
+ }
+ }
+ return(xmlXPathParseNameComplex(ctxt, 0));
+}
+
+
+/**
+ * xmlXPathParseQName:
+ * @ctxt: the XPath Parser context
+ * @prefix: a xmlChar **
+ *
+ * parse an XML qualified name
+ *
+ * [NS 5] QName ::= (Prefix ':')? LocalPart
+ *
+ * [NS 6] Prefix ::= NCName
+ *
+ * [NS 7] LocalPart ::= NCName
+ *
+ * Returns the function returns the local part, and prefix is updated
+ * to get the Prefix if any.
+ */
+
+static xmlChar *
+xmlXPathParseQName(xmlXPathParserContextPtr ctxt, xmlChar **prefix) {
+ xmlChar *ret = NULL;
+
+ *prefix = NULL;
+ ret = xmlXPathParseNCName(ctxt);
+ if (ret && CUR == ':') {
+ *prefix = ret;
+ NEXT;
+ ret = xmlXPathParseNCName(ctxt);
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathParseName:
+ * @ctxt: the XPath Parser context
+ *
+ * parse an XML name
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * Returns the namespace name or NULL
+ */
+
+xmlChar *
+xmlXPathParseName(xmlXPathParserContextPtr ctxt) {
+ const xmlChar *in;
+ xmlChar *ret;
+ size_t count = 0;
+
+ if ((ctxt == NULL) || (ctxt->cur == NULL)) return(NULL);
+ /*
+ * Accelerator for simple ASCII names
+ */
+ in = ctxt->cur;
+ if (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ (*in == '_') || (*in == ':')) {
+ in++;
+ while (((*in >= 0x61) && (*in <= 0x7A)) ||
+ ((*in >= 0x41) && (*in <= 0x5A)) ||
+ ((*in >= 0x30) && (*in <= 0x39)) ||
+ (*in == '_') || (*in == '-') ||
+ (*in == ':') || (*in == '.'))
+ in++;
+ if ((*in > 0) && (*in < 0x80)) {
+ count = in - ctxt->cur;
+ if (count > XML_MAX_NAME_LENGTH) {
+ ctxt->cur = in;
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+ ret = xmlStrndup(ctxt->cur, count);
+ ctxt->cur = in;
+ return(ret);
+ }
+ }
+ return(xmlXPathParseNameComplex(ctxt, 1));
+}
+
+static xmlChar *
+xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
+ xmlChar buf[XML_MAX_NAMELEN + 5];
+ int len = 0, l;
+ int c;
+
+ /*
+ * Handler for more complex cases
+ */
+ c = CUR_CHAR(l);
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (c == '[') || (c == ']') || (c == '@') || /* accelerators */
+ (c == '*') || /* accelerators */
+ (!IS_LETTER(c) && (c != '_') &&
+ ((qualified) && (c != ':')))) {
+ return(NULL);
+ }
+
+ while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
+ ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || ((qualified) && (c == ':')) ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))) {
+ COPY_BUF(l,buf,len,c);
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ if (len >= XML_MAX_NAMELEN) {
+ /*
+ * Okay someone managed to make a huge name, so he's ready to pay
+ * for the processing speed.
+ */
+ xmlChar *buffer;
+ int max = len * 2;
+
+ if (len > XML_MAX_NAME_LENGTH) {
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+ buffer = (xmlChar *) xmlMallocAtomic(max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ XP_ERRORNULL(XPATH_MEMORY_ERROR);
+ }
+ memcpy(buffer, buf, len);
+ while ((IS_LETTER(c)) || (IS_DIGIT(c)) || /* test bigname.xml */
+ (c == '.') || (c == '-') ||
+ (c == '_') || ((qualified) && (c == ':')) ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c))) {
+ if (len + 10 > max) {
+ if (max > XML_MAX_NAME_LENGTH) {
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+ max *= 2;
+ buffer = (xmlChar *) xmlRealloc(buffer,
+ max * sizeof(xmlChar));
+ if (buffer == NULL) {
+ XP_ERRORNULL(XPATH_MEMORY_ERROR);
+ }
+ }
+ COPY_BUF(l,buffer,len,c);
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ }
+ buffer[len] = 0;
+ return(buffer);
+ }
+ }
+ if (len == 0)
+ return(NULL);
+ return(xmlStrndup(buf, len));
+}
+
+#define MAX_FRAC 20
+
+/*
+ * These are used as divisors for the fractional part of a number.
+ * Since the table includes 1.0 (representing '0' fractional digits),
+ * it must be dimensioned at MAX_FRAC+1 (bug 133921)
+ */
+static double my_pow10[MAX_FRAC+1] = {
+ 1.0, 10.0, 100.0, 1000.0, 10000.0,
+ 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0,
+ 10000000000.0, 100000000000.0, 1000000000000.0, 10000000000000.0,
+ 100000000000000.0,
+ 1000000000000000.0, 10000000000000000.0, 100000000000000000.0,
+ 1000000000000000000.0, 10000000000000000000.0, 100000000000000000000.0
+};
+
+/**
+ * xmlXPathStringEvalNumber:
+ * @str: A string to scan
+ *
+ * [30a] Float ::= Number ('e' Digits?)?
+ *
+ * [30] Number ::= Digits ('.' Digits?)?
+ * | '.' Digits
+ * [31] Digits ::= [0-9]+
+ *
+ * Compile a Number in the string
+ * In complement of the Number expression, this function also handles
+ * negative values : '-' Number.
+ *
+ * Returns the double value.
+ */
+double
+xmlXPathStringEvalNumber(const xmlChar *str) {
+ const xmlChar *cur = str;
+ double ret;
+ int ok = 0;
+ int isneg = 0;
+ int exponent = 0;
+ int is_exponent_negative = 0;
+#ifdef __GNUC__
+ unsigned long tmp = 0;
+ double temp;
+#endif
+ if (cur == NULL) return(0);
+ while (IS_BLANK_CH(*cur)) cur++;
+ if ((*cur != '.') && ((*cur < '0') || (*cur > '9')) && (*cur != '-')) {
+ return(xmlXPathNAN);
+ }
+ if (*cur == '-') {
+ isneg = 1;
+ cur++;
+ }
+
+#ifdef __GNUC__
+ /*
+ * tmp/temp is a workaround against a gcc compiler bug
+ * http://veillard.com/gcc.bug
+ */
+ ret = 0;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret = ret * 10;
+ tmp = (*cur - '0');
+ ok = 1;
+ cur++;
+ temp = (double) tmp;
+ ret = ret + temp;
+ }
+#else
+ ret = 0;
+ while ((*cur >= '0') && (*cur <= '9')) {
+ ret = ret * 10 + (*cur - '0');
+ ok = 1;
+ cur++;
+ }
+#endif
+
+ if (*cur == '.') {
+ int v, frac = 0;
+ double fraction = 0;
+
+ cur++;
+ if (((*cur < '0') || (*cur > '9')) && (!ok)) {
+ return(xmlXPathNAN);
+ }
+ while (((*cur >= '0') && (*cur <= '9')) && (frac < MAX_FRAC)) {
+ v = (*cur - '0');
+ fraction = fraction * 10 + v;
+ frac = frac + 1;
+ cur++;
+ }
+ fraction /= my_pow10[frac];
+ ret = ret + fraction;
+ while ((*cur >= '0') && (*cur <= '9'))
+ cur++;
+ }
+ if ((*cur == 'e') || (*cur == 'E')) {
+ cur++;
+ if (*cur == '-') {
+ is_exponent_negative = 1;
+ cur++;
+ } else if (*cur == '+') {
+ cur++;
+ }
+ while ((*cur >= '0') && (*cur <= '9')) {
+ exponent = exponent * 10 + (*cur - '0');
+ cur++;
+ }
+ }
+ while (IS_BLANK_CH(*cur)) cur++;
+ if (*cur != 0) return(xmlXPathNAN);
+ if (isneg) ret = -ret;
+ if (is_exponent_negative) exponent = -exponent;
+ ret *= pow(10.0, (double)exponent);
+ return(ret);
+}
+
+/**
+ * xmlXPathCompNumber:
+ * @ctxt: the XPath Parser context
+ *
+ * [30] Number ::= Digits ('.' Digits?)?
+ * | '.' Digits
+ * [31] Digits ::= [0-9]+
+ *
+ * Compile a Number, then push it on the stack
+ *
+ */
+static void
+xmlXPathCompNumber(xmlXPathParserContextPtr ctxt)
+{
+ double ret = 0.0;
+ int ok = 0;
+ int exponent = 0;
+ int is_exponent_negative = 0;
+#ifdef __GNUC__
+ unsigned long tmp = 0;
+ double temp;
+#endif
+
+ CHECK_ERROR;
+ if ((CUR != '.') && ((CUR < '0') || (CUR > '9'))) {
+ XP_ERROR(XPATH_NUMBER_ERROR);
+ }
+#ifdef __GNUC__
+ /*
+ * tmp/temp is a workaround against a gcc compiler bug
+ * http://veillard.com/gcc.bug
+ */
+ ret = 0;
+ while ((CUR >= '0') && (CUR <= '9')) {
+ ret = ret * 10;
+ tmp = (CUR - '0');
+ ok = 1;
+ NEXT;
+ temp = (double) tmp;
+ ret = ret + temp;
+ }
+#else
+ ret = 0;
+ while ((CUR >= '0') && (CUR <= '9')) {
+ ret = ret * 10 + (CUR - '0');
+ ok = 1;
+ NEXT;
+ }
+#endif
+ if (CUR == '.') {
+ int v, frac = 0;
+ double fraction = 0;
+
+ NEXT;
+ if (((CUR < '0') || (CUR > '9')) && (!ok)) {
+ XP_ERROR(XPATH_NUMBER_ERROR);
+ }
+ while ((CUR >= '0') && (CUR <= '9') && (frac < MAX_FRAC)) {
+ v = (CUR - '0');
+ fraction = fraction * 10 + v;
+ frac = frac + 1;
+ NEXT;
+ }
+ fraction /= my_pow10[frac];
+ ret = ret + fraction;
+ while ((CUR >= '0') && (CUR <= '9'))
+ NEXT;
+ }
+ if ((CUR == 'e') || (CUR == 'E')) {
+ NEXT;
+ if (CUR == '-') {
+ is_exponent_negative = 1;
+ NEXT;
+ } else if (CUR == '+') {
+ NEXT;
+ }
+ while ((CUR >= '0') && (CUR <= '9')) {
+ exponent = exponent * 10 + (CUR - '0');
+ NEXT;
+ }
+ if (is_exponent_negative)
+ exponent = -exponent;
+ ret *= pow(10.0, (double) exponent);
+ }
+ PUSH_LONG_EXPR(XPATH_OP_VALUE, XPATH_NUMBER, 0, 0,
+ xmlXPathCacheNewFloat(ctxt->context, ret), NULL);
+}
+
+/**
+ * xmlXPathParseLiteral:
+ * @ctxt: the XPath Parser context
+ *
+ * Parse a Literal
+ *
+ * [29] Literal ::= '"' [^"]* '"'
+ * | "'" [^']* "'"
+ *
+ * Returns the value found or NULL in case of error
+ */
+static xmlChar *
+xmlXPathParseLiteral(xmlXPathParserContextPtr ctxt) {
+ const xmlChar *q;
+ xmlChar *ret = NULL;
+
+ if (CUR == '"') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ XP_ERRORNULL(XPATH_UNFINISHED_LITERAL_ERROR);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else if (CUR == '\'') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ XP_ERRORNULL(XPATH_UNFINISHED_LITERAL_ERROR);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else {
+ XP_ERRORNULL(XPATH_START_LITERAL_ERROR);
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathCompLiteral:
+ * @ctxt: the XPath Parser context
+ *
+ * Parse a Literal and push it on the stack.
+ *
+ * [29] Literal ::= '"' [^"]* '"'
+ * | "'" [^']* "'"
+ *
+ * TODO: xmlXPathCompLiteral memory allocation could be improved.
+ */
+static void
+xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
+ const xmlChar *q;
+ xmlChar *ret = NULL;
+
+ if (CUR == '"') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '"'))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else if (CUR == '\'') {
+ NEXT;
+ q = CUR_PTR;
+ while ((IS_CHAR_CH(CUR)) && (CUR != '\''))
+ NEXT;
+ if (!IS_CHAR_CH(CUR)) {
+ XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
+ } else {
+ ret = xmlStrndup(q, CUR_PTR - q);
+ NEXT;
+ }
+ } else {
+ XP_ERROR(XPATH_START_LITERAL_ERROR);
+ }
+ if (ret == NULL) return;
+ PUSH_LONG_EXPR(XPATH_OP_VALUE, XPATH_STRING, 0, 0,
+ xmlXPathCacheNewString(ctxt->context, ret), NULL);
+ xmlFree(ret);
+}
+
+/**
+ * xmlXPathCompVariableReference:
+ * @ctxt: the XPath Parser context
+ *
+ * Parse a VariableReference, evaluate it and push it on the stack.
+ *
+ * The variable bindings consist of a mapping from variable names
+ * to variable values. The value of a variable is an object, which can be
+ * of any of the types that are possible for the value of an expression,
+ * and may also be of additional types not specified here.
+ *
+ * Early evaluation is possible since:
+ * The variable bindings [...] used to evaluate a subexpression are
+ * always the same as those used to evaluate the containing expression.
+ *
+ * [36] VariableReference ::= '$' QName
+ */
+static void
+xmlXPathCompVariableReference(xmlXPathParserContextPtr ctxt) {
+ xmlChar *name;
+ xmlChar *prefix;
+
+ SKIP_BLANKS;
+ if (CUR != '$') {
+ XP_ERROR(XPATH_VARIABLE_REF_ERROR);
+ }
+ NEXT;
+ name = xmlXPathParseQName(ctxt, &prefix);
+ if (name == NULL) {
+ XP_ERROR(XPATH_VARIABLE_REF_ERROR);
+ }
+ ctxt->comp->last = -1;
+ PUSH_LONG_EXPR(XPATH_OP_VARIABLE, 0, 0, 0,
+ name, prefix);
+ SKIP_BLANKS;
+ if ((ctxt->context != NULL) && (ctxt->context->flags & XML_XPATH_NOVAR)) {
+ XP_ERROR(XPATH_FORBID_VARIABLE_ERROR);
+ }
+}
+
+/**
+ * xmlXPathIsNodeType:
+ * @name: a name string
+ *
+ * Is the name given a NodeType one.
+ *
+ * [38] NodeType ::= 'comment'
+ * | 'text'
+ * | 'processing-instruction'
+ * | 'node'
+ *
+ * Returns 1 if true 0 otherwise
+ */
+int
+xmlXPathIsNodeType(const xmlChar *name) {
+ if (name == NULL)
+ return(0);
+
+ if (xmlStrEqual(name, BAD_CAST "node"))
+ return(1);
+ if (xmlStrEqual(name, BAD_CAST "text"))
+ return(1);
+ if (xmlStrEqual(name, BAD_CAST "comment"))
+ return(1);
+ if (xmlStrEqual(name, BAD_CAST "processing-instruction"))
+ return(1);
+ return(0);
+}
+
+/**
+ * xmlXPathCompFunctionCall:
+ * @ctxt: the XPath Parser context
+ *
+ * [16] FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument)*)? ')'
+ * [17] Argument ::= Expr
+ *
+ * Compile a function call, the evaluation of all arguments are
+ * pushed on the stack
+ */
+static void
+xmlXPathCompFunctionCall(xmlXPathParserContextPtr ctxt) {
+ xmlChar *name;
+ xmlChar *prefix;
+ int nbargs = 0;
+ int sort = 1;
+
+ name = xmlXPathParseQName(ctxt, &prefix);
+ if (name == NULL) {
+ xmlFree(prefix);
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ SKIP_BLANKS;
+#ifdef DEBUG_EXPR
+ if (prefix == NULL)
+ xmlGenericError(xmlGenericErrorContext, "Calling function %s\n",
+ name);
+ else
+ xmlGenericError(xmlGenericErrorContext, "Calling function %s:%s\n",
+ prefix, name);
+#endif
+
+ if (CUR != '(') {
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+
+ /*
+ * Optimization for count(): we don't need the node-set to be sorted.
+ */
+ if ((prefix == NULL) && (name[0] == 'c') &&
+ xmlStrEqual(name, BAD_CAST "count"))
+ {
+ sort = 0;
+ }
+ ctxt->comp->last = -1;
+ if (CUR != ')') {
+ while (CUR != 0) {
+ int op1 = ctxt->comp->last;
+ ctxt->comp->last = -1;
+ xmlXPathCompileExpr(ctxt, sort);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlFree(name);
+ xmlFree(prefix);
+ return;
+ }
+ PUSH_BINARY_EXPR(XPATH_OP_ARG, op1, ctxt->comp->last, 0, 0);
+ nbargs++;
+ if (CUR == ')') break;
+ if (CUR != ',') {
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ }
+ }
+ PUSH_LONG_EXPR(XPATH_OP_FUNCTION, nbargs, 0, 0,
+ name, prefix);
+ NEXT;
+ SKIP_BLANKS;
+}
+
+/**
+ * xmlXPathCompPrimaryExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [15] PrimaryExpr ::= VariableReference
+ * | '(' Expr ')'
+ * | Literal
+ * | Number
+ * | FunctionCall
+ *
+ * Compile a primary expression.
+ */
+static void
+xmlXPathCompPrimaryExpr(xmlXPathParserContextPtr ctxt) {
+ SKIP_BLANKS;
+ if (CUR == '$') xmlXPathCompVariableReference(ctxt);
+ else if (CUR == '(') {
+ NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompileExpr(ctxt, 1);
+ CHECK_ERROR;
+ if (CUR != ')') {
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ } else if (IS_ASCII_DIGIT(CUR) || (CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) {
+ xmlXPathCompNumber(ctxt);
+ } else if ((CUR == '\'') || (CUR == '"')) {
+ xmlXPathCompLiteral(ctxt);
+ } else {
+ xmlXPathCompFunctionCall(ctxt);
+ }
+ SKIP_BLANKS;
+}
+
+/**
+ * xmlXPathCompFilterExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [20] FilterExpr ::= PrimaryExpr
+ * | FilterExpr Predicate
+ *
+ * Compile a filter expression.
+ * Square brackets are used to filter expressions in the same way that
+ * they are used in location paths. It is an error if the expression to
+ * be filtered does not evaluate to a node-set. The context node list
+ * used for evaluating the expression in square brackets is the node-set
+ * to be filtered listed in document order.
+ */
+
+static void
+xmlXPathCompFilterExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompPrimaryExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+
+ while (CUR == '[') {
+ xmlXPathCompPredicate(ctxt, 1);
+ SKIP_BLANKS;
+ }
+
+
+}
+
+/**
+ * xmlXPathScanName:
+ * @ctxt: the XPath Parser context
+ *
+ * Trickery: parse an XML name but without consuming the input flow
+ * Needed to avoid insanity in the parser state.
+ *
+ * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
+ * CombiningChar | Extender
+ *
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ *
+ * [6] Names ::= Name (S Name)*
+ *
+ * Returns the Name parsed or NULL
+ */
+
+static xmlChar *
+xmlXPathScanName(xmlXPathParserContextPtr ctxt) {
+ int len = 0, l;
+ int c;
+ const xmlChar *cur;
+ xmlChar *ret;
+
+ cur = ctxt->cur;
+
+ c = CUR_CHAR(l);
+ if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
+ (!IS_LETTER(c) && (c != '_') &&
+ (c != ':'))) {
+ return(NULL);
+ }
+
+ while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
+ ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
+ (c == '.') || (c == '-') ||
+ (c == '_') || (c == ':') ||
+ (IS_COMBINING(c)) ||
+ (IS_EXTENDER(c)))) {
+ len += l;
+ NEXTL(l);
+ c = CUR_CHAR(l);
+ }
+ ret = xmlStrndup(cur, ctxt->cur - cur);
+ ctxt->cur = cur;
+ return(ret);
+}
+
+/**
+ * xmlXPathCompPathExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [19] PathExpr ::= LocationPath
+ * | FilterExpr
+ * | FilterExpr '/' RelativeLocationPath
+ * | FilterExpr '//' RelativeLocationPath
+ *
+ * Compile a path expression.
+ * The / operator and // operators combine an arbitrary expression
+ * and a relative location path. It is an error if the expression
+ * does not evaluate to a node-set.
+ * The / operator does composition in the same way as when / is
+ * used in a location path. As in location paths, // is short for
+ * /descendant-or-self::node()/.
+ */
+
+static void
+xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
+ int lc = 1; /* Should we branch to LocationPath ? */
+ xmlChar *name = NULL; /* we may have to preparse a name to find out */
+
+ SKIP_BLANKS;
+ if ((CUR == '$') || (CUR == '(') ||
+ (IS_ASCII_DIGIT(CUR)) ||
+ (CUR == '\'') || (CUR == '"') ||
+ (CUR == '.' && IS_ASCII_DIGIT(NXT(1)))) {
+ lc = 0;
+ } else if (CUR == '*') {
+ /* relative or absolute location path */
+ lc = 1;
+ } else if (CUR == '/') {
+ /* relative or absolute location path */
+ lc = 1;
+ } else if (CUR == '@') {
+ /* relative abbreviated attribute location path */
+ lc = 1;
+ } else if (CUR == '.') {
+ /* relative abbreviated attribute location path */
+ lc = 1;
+ } else {
+ /*
+ * Problem is finding if we have a name here whether it's:
+ * - a nodetype
+ * - a function call in which case it's followed by '('
+ * - an axis in which case it's followed by ':'
+ * - a element name
+ * We do an a priori analysis here rather than having to
+ * maintain parsed token content through the recursive function
+ * calls. This looks uglier but makes the code easier to
+ * read/write/debug.
+ */
+ SKIP_BLANKS;
+ name = xmlXPathScanName(ctxt);
+ if ((name != NULL) && (xmlStrstr(name, (xmlChar *) "::") != NULL)) {
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: Axis\n");
+#endif
+ lc = 1;
+ xmlFree(name);
+ } else if (name != NULL) {
+ int len =xmlStrlen(name);
+
+
+ while (NXT(len) != 0) {
+ if (NXT(len) == '/') {
+ /* element name */
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: AbbrRelLocation\n");
+#endif
+ lc = 1;
+ break;
+ } else if (IS_BLANK_CH(NXT(len))) {
+ /* ignore blanks */
+ ;
+ } else if (NXT(len) == ':') {
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: AbbrRelLocation\n");
+#endif
+ lc = 1;
+ break;
+ } else if ((NXT(len) == '(')) {
+ /* Note Type or Function */
+ if (xmlXPathIsNodeType(name)) {
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: Type search\n");
+#endif
+ lc = 1;
+ } else {
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: function call\n");
+#endif
+ lc = 0;
+ }
+ break;
+ } else if ((NXT(len) == '[')) {
+ /* element name */
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: AbbrRelLocation\n");
+#endif
+ lc = 1;
+ break;
+ } else if ((NXT(len) == '<') || (NXT(len) == '>') ||
+ (NXT(len) == '=')) {
+ lc = 1;
+ break;
+ } else {
+ lc = 1;
+ break;
+ }
+ len++;
+ }
+ if (NXT(len) == 0) {
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "PathExpr: AbbrRelLocation\n");
+#endif
+ /* element name */
+ lc = 1;
+ }
+ xmlFree(name);
+ } else {
+ /* make sure all cases are covered explicitly */
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ }
+
+ if (lc) {
+ if (CUR == '/') {
+ PUSH_LEAVE_EXPR(XPATH_OP_ROOT, 0, 0);
+ } else {
+ PUSH_LEAVE_EXPR(XPATH_OP_NODE, 0, 0);
+ }
+ xmlXPathCompLocationPath(ctxt);
+ } else {
+ xmlXPathCompFilterExpr(ctxt);
+ CHECK_ERROR;
+ if ((CUR == '/') && (NXT(1) == '/')) {
+ SKIP(2);
+ SKIP_BLANKS;
+
+ PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF,
+ NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL);
+ PUSH_UNARY_EXPR(XPATH_OP_RESET, ctxt->comp->last, 1, 0);
+
+ xmlXPathCompRelativeLocationPath(ctxt);
+ } else if (CUR == '/') {
+ xmlXPathCompRelativeLocationPath(ctxt);
+ }
+ }
+ SKIP_BLANKS;
+}
+
+/**
+ * xmlXPathCompUnionExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [18] UnionExpr ::= PathExpr
+ * | UnionExpr '|' PathExpr
+ *
+ * Compile an union expression.
+ */
+
+static void
+xmlXPathCompUnionExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompPathExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while (CUR == '|') {
+ int op1 = ctxt->comp->last;
+ PUSH_LEAVE_EXPR(XPATH_OP_NODE, 0, 0);
+
+ NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompPathExpr(ctxt);
+
+ PUSH_BINARY_EXPR(XPATH_OP_UNION, op1, ctxt->comp->last, 0, 0);
+
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompUnaryExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [27] UnaryExpr ::= UnionExpr
+ * | '-' UnaryExpr
+ *
+ * Compile an unary expression.
+ */
+
+static void
+xmlXPathCompUnaryExpr(xmlXPathParserContextPtr ctxt) {
+ int minus = 0;
+ int found = 0;
+
+ SKIP_BLANKS;
+ while (CUR == '-') {
+ minus = 1 - minus;
+ found = 1;
+ NEXT;
+ SKIP_BLANKS;
+ }
+
+ xmlXPathCompUnionExpr(ctxt);
+ CHECK_ERROR;
+ if (found) {
+ if (minus)
+ PUSH_UNARY_EXPR(XPATH_OP_PLUS, ctxt->comp->last, 2, 0);
+ else
+ PUSH_UNARY_EXPR(XPATH_OP_PLUS, ctxt->comp->last, 3, 0);
+ }
+}
+
+/**
+ * xmlXPathCompMultiplicativeExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [26] MultiplicativeExpr ::= UnaryExpr
+ * | MultiplicativeExpr MultiplyOperator UnaryExpr
+ * | MultiplicativeExpr 'div' UnaryExpr
+ * | MultiplicativeExpr 'mod' UnaryExpr
+ * [34] MultiplyOperator ::= '*'
+ *
+ * Compile an Additive expression.
+ */
+
+static void
+xmlXPathCompMultiplicativeExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompUnaryExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == '*') ||
+ ((CUR == 'd') && (NXT(1) == 'i') && (NXT(2) == 'v')) ||
+ ((CUR == 'm') && (NXT(1) == 'o') && (NXT(2) == 'd'))) {
+ int op = -1;
+ int op1 = ctxt->comp->last;
+
+ if (CUR == '*') {
+ op = 0;
+ NEXT;
+ } else if (CUR == 'd') {
+ op = 1;
+ SKIP(3);
+ } else if (CUR == 'm') {
+ op = 2;
+ SKIP(3);
+ }
+ SKIP_BLANKS;
+ xmlXPathCompUnaryExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_MULT, op1, ctxt->comp->last, op, 0);
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompAdditiveExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [25] AdditiveExpr ::= MultiplicativeExpr
+ * | AdditiveExpr '+' MultiplicativeExpr
+ * | AdditiveExpr '-' MultiplicativeExpr
+ *
+ * Compile an Additive expression.
+ */
+
+static void
+xmlXPathCompAdditiveExpr(xmlXPathParserContextPtr ctxt) {
+
+ xmlXPathCompMultiplicativeExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == '+') || (CUR == '-')) {
+ int plus;
+ int op1 = ctxt->comp->last;
+
+ if (CUR == '+') plus = 1;
+ else plus = 0;
+ NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompMultiplicativeExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_PLUS, op1, ctxt->comp->last, plus, 0);
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompRelationalExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [24] RelationalExpr ::= AdditiveExpr
+ * | RelationalExpr '<' AdditiveExpr
+ * | RelationalExpr '>' AdditiveExpr
+ * | RelationalExpr '<=' AdditiveExpr
+ * | RelationalExpr '>=' AdditiveExpr
+ *
+ * A <= B > C is allowed ? Answer from James, yes with
+ * (AdditiveExpr <= AdditiveExpr) > AdditiveExpr
+ * which is basically what got implemented.
+ *
+ * Compile a Relational expression, then push the result
+ * on the stack
+ */
+
+static void
+xmlXPathCompRelationalExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompAdditiveExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == '<') ||
+ (CUR == '>') ||
+ ((CUR == '<') && (NXT(1) == '=')) ||
+ ((CUR == '>') && (NXT(1) == '='))) {
+ int inf, strict;
+ int op1 = ctxt->comp->last;
+
+ if (CUR == '<') inf = 1;
+ else inf = 0;
+ if (NXT(1) == '=') strict = 0;
+ else strict = 1;
+ NEXT;
+ if (!strict) NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompAdditiveExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_CMP, op1, ctxt->comp->last, inf, strict);
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompEqualityExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [23] EqualityExpr ::= RelationalExpr
+ * | EqualityExpr '=' RelationalExpr
+ * | EqualityExpr '!=' RelationalExpr
+ *
+ * A != B != C is allowed ? Answer from James, yes with
+ * (RelationalExpr = RelationalExpr) = RelationalExpr
+ * (RelationalExpr != RelationalExpr) != RelationalExpr
+ * which is basically what got implemented.
+ *
+ * Compile an Equality expression.
+ *
+ */
+static void
+xmlXPathCompEqualityExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompRelationalExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == '=') || ((CUR == '!') && (NXT(1) == '='))) {
+ int eq;
+ int op1 = ctxt->comp->last;
+
+ if (CUR == '=') eq = 1;
+ else eq = 0;
+ NEXT;
+ if (!eq) NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompRelationalExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_EQUAL, op1, ctxt->comp->last, eq, 0);
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompAndExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [22] AndExpr ::= EqualityExpr
+ * | AndExpr 'and' EqualityExpr
+ *
+ * Compile an AND expression.
+ *
+ */
+static void
+xmlXPathCompAndExpr(xmlXPathParserContextPtr ctxt) {
+ xmlXPathCompEqualityExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == 'a') && (NXT(1) == 'n') && (NXT(2) == 'd')) {
+ int op1 = ctxt->comp->last;
+ SKIP(3);
+ SKIP_BLANKS;
+ xmlXPathCompEqualityExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_AND, op1, ctxt->comp->last, 0, 0);
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompileExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * [14] Expr ::= OrExpr
+ * [21] OrExpr ::= AndExpr
+ * | OrExpr 'or' AndExpr
+ *
+ * Parse and compile an expression
+ */
+static void
+xmlXPathCompileExpr(xmlXPathParserContextPtr ctxt, int sort) {
+ xmlXPathCompAndExpr(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while ((CUR == 'o') && (NXT(1) == 'r')) {
+ int op1 = ctxt->comp->last;
+ SKIP(2);
+ SKIP_BLANKS;
+ xmlXPathCompAndExpr(ctxt);
+ CHECK_ERROR;
+ PUSH_BINARY_EXPR(XPATH_OP_OR, op1, ctxt->comp->last, 0, 0);
+ SKIP_BLANKS;
+ }
+ if ((sort) && (ctxt->comp->steps[ctxt->comp->last].op != XPATH_OP_VALUE)) {
+ /* more ops could be optimized too */
+ /*
+ * This is the main place to eliminate sorting for
+ * operations which don't require a sorted node-set.
+ * E.g. count().
+ */
+ PUSH_UNARY_EXPR(XPATH_OP_SORT, ctxt->comp->last , 0, 0);
+ }
+}
+
+/**
+ * xmlXPathCompPredicate:
+ * @ctxt: the XPath Parser context
+ * @filter: act as a filter
+ *
+ * [8] Predicate ::= '[' PredicateExpr ']'
+ * [9] PredicateExpr ::= Expr
+ *
+ * Compile a predicate expression
+ */
+static void
+xmlXPathCompPredicate(xmlXPathParserContextPtr ctxt, int filter) {
+ int op1 = ctxt->comp->last;
+
+ SKIP_BLANKS;
+ if (CUR != '[') {
+ XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+
+ ctxt->comp->last = -1;
+ /*
+ * This call to xmlXPathCompileExpr() will deactivate sorting
+ * of the predicate result.
+ * TODO: Sorting is still activated for filters, since I'm not
+ * sure if needed. Normally sorting should not be needed, since
+ * a filter can only diminish the number of items in a sequence,
+ * but won't change its order; so if the initial sequence is sorted,
+ * subsequent sorting is not needed.
+ */
+ if (! filter)
+ xmlXPathCompileExpr(ctxt, 0);
+ else
+ xmlXPathCompileExpr(ctxt, 1);
+ CHECK_ERROR;
+
+ if (CUR != ']') {
+ XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);
+ }
+
+ if (filter)
+ PUSH_BINARY_EXPR(XPATH_OP_FILTER, op1, ctxt->comp->last, 0, 0);
+ else
+ PUSH_BINARY_EXPR(XPATH_OP_PREDICATE, op1, ctxt->comp->last, 0, 0);
+
+ NEXT;
+ SKIP_BLANKS;
+}
+
+/**
+ * xmlXPathCompNodeTest:
+ * @ctxt: the XPath Parser context
+ * @test: pointer to a xmlXPathTestVal
+ * @type: pointer to a xmlXPathTypeVal
+ * @prefix: placeholder for a possible name prefix
+ *
+ * [7] NodeTest ::= NameTest
+ * | NodeType '(' ')'
+ * | 'processing-instruction' '(' Literal ')'
+ *
+ * [37] NameTest ::= '*'
+ * | NCName ':' '*'
+ * | QName
+ * [38] NodeType ::= 'comment'
+ * | 'text'
+ * | 'processing-instruction'
+ * | 'node'
+ *
+ * Returns the name found and updates @test, @type and @prefix appropriately
+ */
+static xmlChar *
+xmlXPathCompNodeTest(xmlXPathParserContextPtr ctxt, xmlXPathTestVal *test,
+ xmlXPathTypeVal *type, const xmlChar **prefix,
+ xmlChar *name) {
+ int blanks;
+
+ if ((test == NULL) || (type == NULL) || (prefix == NULL)) {
+ STRANGE;
+ return(NULL);
+ }
+ *type = (xmlXPathTypeVal) 0;
+ *test = (xmlXPathTestVal) 0;
+ *prefix = NULL;
+ SKIP_BLANKS;
+
+ if ((name == NULL) && (CUR == '*')) {
+ /*
+ * All elements
+ */
+ NEXT;
+ *test = NODE_TEST_ALL;
+ return(NULL);
+ }
+
+ if (name == NULL)
+ name = xmlXPathParseNCName(ctxt);
+ if (name == NULL) {
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+
+ blanks = IS_BLANK_CH(CUR);
+ SKIP_BLANKS;
+ if (CUR == '(') {
+ NEXT;
+ /*
+ * NodeType or PI search
+ */
+ if (xmlStrEqual(name, BAD_CAST "comment"))
+ *type = NODE_TYPE_COMMENT;
+ else if (xmlStrEqual(name, BAD_CAST "node"))
+ *type = NODE_TYPE_NODE;
+ else if (xmlStrEqual(name, BAD_CAST "processing-instruction"))
+ *type = NODE_TYPE_PI;
+ else if (xmlStrEqual(name, BAD_CAST "text"))
+ *type = NODE_TYPE_TEXT;
+ else {
+ if (name != NULL)
+ xmlFree(name);
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+
+ *test = NODE_TEST_TYPE;
+
+ SKIP_BLANKS;
+ if (*type == NODE_TYPE_PI) {
+ /*
+ * Specific case: search a PI by name.
+ */
+ if (name != NULL)
+ xmlFree(name);
+ name = NULL;
+ if (CUR != ')') {
+ name = xmlXPathParseLiteral(ctxt);
+ CHECK_ERROR NULL;
+ *test = NODE_TEST_PI;
+ SKIP_BLANKS;
+ }
+ }
+ if (CUR != ')') {
+ if (name != NULL)
+ xmlFree(name);
+ XP_ERRORNULL(XPATH_UNCLOSED_ERROR);
+ }
+ NEXT;
+ return(name);
+ }
+ *test = NODE_TEST_NAME;
+ if ((!blanks) && (CUR == ':')) {
+ NEXT;
+
+ /*
+ * Since currently the parser context don't have a
+ * namespace list associated:
+ * The namespace name for this prefix can be computed
+ * only at evaluation time. The compilation is done
+ * outside of any context.
+ */
+#if 0
+ *prefix = xmlXPathNsLookup(ctxt->context, name);
+ if (name != NULL)
+ xmlFree(name);
+ if (*prefix == NULL) {
+ XP_ERROR0(XPATH_UNDEF_PREFIX_ERROR);
+ }
+#else
+ *prefix = name;
+#endif
+
+ if (CUR == '*') {
+ /*
+ * All elements
+ */
+ NEXT;
+ *test = NODE_TEST_ALL;
+ return(NULL);
+ }
+
+ name = xmlXPathParseNCName(ctxt);
+ if (name == NULL) {
+ XP_ERRORNULL(XPATH_EXPR_ERROR);
+ }
+ }
+ return(name);
+}
+
+/**
+ * xmlXPathIsAxisName:
+ * @name: a preparsed name token
+ *
+ * [6] AxisName ::= 'ancestor'
+ * | 'ancestor-or-self'
+ * | 'attribute'
+ * | 'child'
+ * | 'descendant'
+ * | 'descendant-or-self'
+ * | 'following'
+ * | 'following-sibling'
+ * | 'namespace'
+ * | 'parent'
+ * | 'preceding'
+ * | 'preceding-sibling'
+ * | 'self'
+ *
+ * Returns the axis or 0
+ */
+static xmlXPathAxisVal
+xmlXPathIsAxisName(const xmlChar *name) {
+ xmlXPathAxisVal ret = (xmlXPathAxisVal) 0;
+ switch (name[0]) {
+ case 'a':
+ if (xmlStrEqual(name, BAD_CAST "ancestor"))
+ ret = AXIS_ANCESTOR;
+ if (xmlStrEqual(name, BAD_CAST "ancestor-or-self"))
+ ret = AXIS_ANCESTOR_OR_SELF;
+ if (xmlStrEqual(name, BAD_CAST "attribute"))
+ ret = AXIS_ATTRIBUTE;
+ break;
+ case 'c':
+ if (xmlStrEqual(name, BAD_CAST "child"))
+ ret = AXIS_CHILD;
+ break;
+ case 'd':
+ if (xmlStrEqual(name, BAD_CAST "descendant"))
+ ret = AXIS_DESCENDANT;
+ if (xmlStrEqual(name, BAD_CAST "descendant-or-self"))
+ ret = AXIS_DESCENDANT_OR_SELF;
+ break;
+ case 'f':
+ if (xmlStrEqual(name, BAD_CAST "following"))
+ ret = AXIS_FOLLOWING;
+ if (xmlStrEqual(name, BAD_CAST "following-sibling"))
+ ret = AXIS_FOLLOWING_SIBLING;
+ break;
+ case 'n':
+ if (xmlStrEqual(name, BAD_CAST "namespace"))
+ ret = AXIS_NAMESPACE;
+ break;
+ case 'p':
+ if (xmlStrEqual(name, BAD_CAST "parent"))
+ ret = AXIS_PARENT;
+ if (xmlStrEqual(name, BAD_CAST "preceding"))
+ ret = AXIS_PRECEDING;
+ if (xmlStrEqual(name, BAD_CAST "preceding-sibling"))
+ ret = AXIS_PRECEDING_SIBLING;
+ break;
+ case 's':
+ if (xmlStrEqual(name, BAD_CAST "self"))
+ ret = AXIS_SELF;
+ break;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPathCompStep:
+ * @ctxt: the XPath Parser context
+ *
+ * [4] Step ::= AxisSpecifier NodeTest Predicate*
+ * | AbbreviatedStep
+ *
+ * [12] AbbreviatedStep ::= '.' | '..'
+ *
+ * [5] AxisSpecifier ::= AxisName '::'
+ * | AbbreviatedAxisSpecifier
+ *
+ * [13] AbbreviatedAxisSpecifier ::= '@'?
+ *
+ * Modified for XPtr range support as:
+ *
+ * [4xptr] Step ::= AxisSpecifier NodeTest Predicate*
+ * | AbbreviatedStep
+ * | 'range-to' '(' Expr ')' Predicate*
+ *
+ * Compile one step in a Location Path
+ * A location step of . is short for self::node(). This is
+ * particularly useful in conjunction with //. For example, the
+ * location path .//para is short for
+ * self::node()/descendant-or-self::node()/child::para
+ * and so will select all para descendant elements of the context
+ * node.
+ * Similarly, a location step of .. is short for parent::node().
+ * For example, ../title is short for parent::node()/child::title
+ * and so will select the title children of the parent of the context
+ * node.
+ */
+static void
+xmlXPathCompStep(xmlXPathParserContextPtr ctxt) {
+#ifdef LIBXML_XPTR_ENABLED
+ int rangeto = 0;
+ int op2 = -1;
+#endif
+
+ SKIP_BLANKS;
+ if ((CUR == '.') && (NXT(1) == '.')) {
+ SKIP(2);
+ SKIP_BLANKS;
+ PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_PARENT,
+ NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL);
+ } else if (CUR == '.') {
+ NEXT;
+ SKIP_BLANKS;
+ } else {
+ xmlChar *name = NULL;
+ const xmlChar *prefix = NULL;
+ xmlXPathTestVal test = (xmlXPathTestVal) 0;
+ xmlXPathAxisVal axis = (xmlXPathAxisVal) 0;
+ xmlXPathTypeVal type = (xmlXPathTypeVal) 0;
+ int op1;
+
+ /*
+ * The modification needed for XPointer change to the production
+ */
+#ifdef LIBXML_XPTR_ENABLED
+ if (ctxt->xptr) {
+ name = xmlXPathParseNCName(ctxt);
+ if ((name != NULL) && (xmlStrEqual(name, BAD_CAST "range-to"))) {
+ op2 = ctxt->comp->last;
+ xmlFree(name);
+ SKIP_BLANKS;
+ if (CUR != '(') {
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+
+ xmlXPathCompileExpr(ctxt, 1);
+ /* PUSH_BINARY_EXPR(XPATH_OP_RANGETO, op2, ctxt->comp->last, 0, 0); */
+ CHECK_ERROR;
+
+ SKIP_BLANKS;
+ if (CUR != ')') {
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ NEXT;
+ rangeto = 1;
+ goto eval_predicates;
+ }
+ }
+#endif
+ if (CUR == '*') {
+ axis = AXIS_CHILD;
+ } else {
+ if (name == NULL)
+ name = xmlXPathParseNCName(ctxt);
+ if (name != NULL) {
+ axis = xmlXPathIsAxisName(name);
+ if (axis != 0) {
+ SKIP_BLANKS;
+ if ((CUR == ':') && (NXT(1) == ':')) {
+ SKIP(2);
+ xmlFree(name);
+ name = NULL;
+ } else {
+ /* an element name can conflict with an axis one :-\ */
+ axis = AXIS_CHILD;
+ }
+ } else {
+ axis = AXIS_CHILD;
+ }
+ } else if (CUR == '@') {
+ NEXT;
+ axis = AXIS_ATTRIBUTE;
+ } else {
+ axis = AXIS_CHILD;
+ }
+ }
+
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlFree(name);
+ return;
+ }
+
+ name = xmlXPathCompNodeTest(ctxt, &test, &type, &prefix, name);
+ if (test == 0)
+ return;
+
+ if ((prefix != NULL) && (ctxt->context != NULL) &&
+ (ctxt->context->flags & XML_XPATH_CHECKNS)) {
+ if (xmlXPathNsLookup(ctxt->context, prefix) == NULL) {
+ xmlXPathErr(ctxt, XPATH_UNDEF_PREFIX_ERROR);
+ }
+ }
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "Basis : computing new set\n");
+#endif
+
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext, "Basis : ");
+ if (ctxt->value == NULL)
+ xmlGenericError(xmlGenericErrorContext, "no value\n");
+ else if (ctxt->value->nodesetval == NULL)
+ xmlGenericError(xmlGenericErrorContext, "Empty\n");
+ else
+ xmlGenericErrorContextNodeSet(stdout, ctxt->value->nodesetval);
+#endif
+
+#ifdef LIBXML_XPTR_ENABLED
+eval_predicates:
+#endif
+ op1 = ctxt->comp->last;
+ ctxt->comp->last = -1;
+
+ SKIP_BLANKS;
+ while (CUR == '[') {
+ xmlXPathCompPredicate(ctxt, 0);
+ }
+
+#ifdef LIBXML_XPTR_ENABLED
+ if (rangeto) {
+ PUSH_BINARY_EXPR(XPATH_OP_RANGETO, op2, op1, 0, 0);
+ } else
+#endif
+ PUSH_FULL_EXPR(XPATH_OP_COLLECT, op1, ctxt->comp->last, axis,
+ test, type, (void *)prefix, (void *)name);
+
+ }
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext, "Step : ");
+ if (ctxt->value == NULL)
+ xmlGenericError(xmlGenericErrorContext, "no value\n");
+ else if (ctxt->value->nodesetval == NULL)
+ xmlGenericError(xmlGenericErrorContext, "Empty\n");
+ else
+ xmlGenericErrorContextNodeSet(xmlGenericErrorContext,
+ ctxt->value->nodesetval);
+#endif
+}
+
+/**
+ * xmlXPathCompRelativeLocationPath:
+ * @ctxt: the XPath Parser context
+ *
+ * [3] RelativeLocationPath ::= Step
+ * | RelativeLocationPath '/' Step
+ * | AbbreviatedRelativeLocationPath
+ * [11] AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step
+ *
+ * Compile a relative location path.
+ */
+static void
+xmlXPathCompRelativeLocationPath
+(xmlXPathParserContextPtr ctxt) {
+ SKIP_BLANKS;
+ if ((CUR == '/') && (NXT(1) == '/')) {
+ SKIP(2);
+ SKIP_BLANKS;
+ PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF,
+ NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL);
+ } else if (CUR == '/') {
+ NEXT;
+ SKIP_BLANKS;
+ }
+ xmlXPathCompStep(ctxt);
+ CHECK_ERROR;
+ SKIP_BLANKS;
+ while (CUR == '/') {
+ if ((CUR == '/') && (NXT(1) == '/')) {
+ SKIP(2);
+ SKIP_BLANKS;
+ PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF,
+ NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL);
+ xmlXPathCompStep(ctxt);
+ } else if (CUR == '/') {
+ NEXT;
+ SKIP_BLANKS;
+ xmlXPathCompStep(ctxt);
+ }
+ SKIP_BLANKS;
+ }
+}
+
+/**
+ * xmlXPathCompLocationPath:
+ * @ctxt: the XPath Parser context
+ *
+ * [1] LocationPath ::= RelativeLocationPath
+ * | AbsoluteLocationPath
+ * [2] AbsoluteLocationPath ::= '/' RelativeLocationPath?
+ * | AbbreviatedAbsoluteLocationPath
+ * [10] AbbreviatedAbsoluteLocationPath ::=
+ * '//' RelativeLocationPath
+ *
+ * Compile a location path
+ *
+ * // is short for /descendant-or-self::node()/. For example,
+ * //para is short for /descendant-or-self::node()/child::para and
+ * so will select any para element in the document (even a para element
+ * that is a document element will be selected by //para since the
+ * document element node is a child of the root node); div//para is
+ * short for div/descendant-or-self::node()/child::para and so will
+ * select all para descendants of div children.
+ */
+static void
+xmlXPathCompLocationPath(xmlXPathParserContextPtr ctxt) {
+ SKIP_BLANKS;
+ if (CUR != '/') {
+ xmlXPathCompRelativeLocationPath(ctxt);
+ } else {
+ while (CUR == '/') {
+ if ((CUR == '/') && (NXT(1) == '/')) {
+ SKIP(2);
+ SKIP_BLANKS;
+ PUSH_LONG_EXPR(XPATH_OP_COLLECT, AXIS_DESCENDANT_OR_SELF,
+ NODE_TEST_TYPE, NODE_TYPE_NODE, NULL, NULL);
+ xmlXPathCompRelativeLocationPath(ctxt);
+ } else if (CUR == '/') {
+ NEXT;
+ SKIP_BLANKS;
+ if ((CUR != 0 ) &&
+ ((IS_ASCII_LETTER(CUR)) || (CUR == '_') || (CUR == '.') ||
+ (CUR == '@') || (CUR == '*')))
+ xmlXPathCompRelativeLocationPath(ctxt);
+ }
+ CHECK_ERROR;
+ }
+ }
+}
+
+/************************************************************************
+ * *
+ * XPath precompiled expression evaluation *
+ * *
+ ************************************************************************/
+
+static int
+xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op);
+
+#ifdef DEBUG_STEP
+static void
+xmlXPathDebugDumpStepAxis(xmlXPathStepOpPtr op,
+ int nbNodes)
+{
+ xmlGenericError(xmlGenericErrorContext, "new step : ");
+ switch (op->value) {
+ case AXIS_ANCESTOR:
+ xmlGenericError(xmlGenericErrorContext, "axis 'ancestors' ");
+ break;
+ case AXIS_ANCESTOR_OR_SELF:
+ xmlGenericError(xmlGenericErrorContext,
+ "axis 'ancestors-or-self' ");
+ break;
+ case AXIS_ATTRIBUTE:
+ xmlGenericError(xmlGenericErrorContext, "axis 'attributes' ");
+ break;
+ case AXIS_CHILD:
+ xmlGenericError(xmlGenericErrorContext, "axis 'child' ");
+ break;
+ case AXIS_DESCENDANT:
+ xmlGenericError(xmlGenericErrorContext, "axis 'descendant' ");
+ break;
+ case AXIS_DESCENDANT_OR_SELF:
+ xmlGenericError(xmlGenericErrorContext,
+ "axis 'descendant-or-self' ");
+ break;
+ case AXIS_FOLLOWING:
+ xmlGenericError(xmlGenericErrorContext, "axis 'following' ");
+ break;
+ case AXIS_FOLLOWING_SIBLING:
+ xmlGenericError(xmlGenericErrorContext,
+ "axis 'following-siblings' ");
+ break;
+ case AXIS_NAMESPACE:
+ xmlGenericError(xmlGenericErrorContext, "axis 'namespace' ");
+ break;
+ case AXIS_PARENT:
+ xmlGenericError(xmlGenericErrorContext, "axis 'parent' ");
+ break;
+ case AXIS_PRECEDING:
+ xmlGenericError(xmlGenericErrorContext, "axis 'preceding' ");
+ break;
+ case AXIS_PRECEDING_SIBLING:
+ xmlGenericError(xmlGenericErrorContext,
+ "axis 'preceding-sibling' ");
+ break;
+ case AXIS_SELF:
+ xmlGenericError(xmlGenericErrorContext, "axis 'self' ");
+ break;
+ }
+ xmlGenericError(xmlGenericErrorContext,
+ " context contains %d nodes\n", nbNodes);
+ switch (op->value2) {
+ case NODE_TEST_NONE:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for none !!!\n");
+ break;
+ case NODE_TEST_TYPE:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for type %d\n", op->value3);
+ break;
+ case NODE_TEST_PI:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for PI !!!\n");
+ break;
+ case NODE_TEST_ALL:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for *\n");
+ break;
+ case NODE_TEST_NS:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for namespace %s\n",
+ op->value5);
+ break;
+ case NODE_TEST_NAME:
+ xmlGenericError(xmlGenericErrorContext,
+ " searching for name %s\n", op->value5);
+ if (op->value4)
+ xmlGenericError(xmlGenericErrorContext,
+ " with namespace %s\n", op->value4);
+ break;
+ }
+ xmlGenericError(xmlGenericErrorContext, "Testing : ");
+}
+#endif /* DEBUG_STEP */
+
+static int
+xmlXPathCompOpEvalPredicate(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ xmlNodeSetPtr set,
+ int contextSize,
+ int hasNsNodes)
+{
+ if (op->ch1 != -1) {
+ xmlXPathCompExprPtr comp = ctxt->comp;
+ /*
+ * Process inner predicates first.
+ */
+ if (comp->steps[op->ch1].op != XPATH_OP_PREDICATE) {
+ /*
+ * TODO: raise an internal error.
+ */
+ }
+ contextSize = xmlXPathCompOpEvalPredicate(ctxt,
+ &comp->steps[op->ch1], set, contextSize, hasNsNodes);
+ CHECK_ERROR0;
+ if (contextSize <= 0)
+ return(0);
+ }
+ if (op->ch2 != -1) {
+ xmlXPathContextPtr xpctxt = ctxt->context;
+ xmlNodePtr contextNode, oldContextNode;
+ xmlDocPtr oldContextDoc;
+ int i, res, contextPos = 0, newContextSize;
+ xmlXPathStepOpPtr exprOp;
+ xmlXPathObjectPtr contextObj = NULL, exprRes = NULL;
+
+#ifdef LIBXML_XPTR_ENABLED
+ /*
+ * URGENT TODO: Check the following:
+ * We don't expect location sets if evaluating prediates, right?
+ * Only filters should expect location sets, right?
+ */
+#endif
+ /*
+ * SPEC XPath 1.0:
+ * "For each node in the node-set to be filtered, the
+ * PredicateExpr is evaluated with that node as the
+ * context node, with the number of nodes in the
+ * node-set as the context size, and with the proximity
+ * position of the node in the node-set with respect to
+ * the axis as the context position;"
+ * @oldset is the node-set" to be filtered.
+ *
+ * SPEC XPath 1.0:
+ * "only predicates change the context position and
+ * context size (see [2.4 Predicates])."
+ * Example:
+ * node-set context pos
+ * nA 1
+ * nB 2
+ * nC 3
+ * After applying predicate [position() > 1] :
+ * node-set context pos
+ * nB 1
+ * nC 2
+ */
+ oldContextNode = xpctxt->node;
+ oldContextDoc = xpctxt->doc;
+ /*
+ * Get the expression of this predicate.
+ */
+ exprOp = &ctxt->comp->steps[op->ch2];
+ newContextSize = 0;
+ for (i = 0; i < set->nodeNr; i++) {
+ if (set->nodeTab[i] == NULL)
+ continue;
+
+ contextNode = set->nodeTab[i];
+ xpctxt->node = contextNode;
+ xpctxt->contextSize = contextSize;
+ xpctxt->proximityPosition = ++contextPos;
+
+ /*
+ * Also set the xpath document in case things like
+ * key() are evaluated in the predicate.
+ */
+ if ((contextNode->type != XML_NAMESPACE_DECL) &&
+ (contextNode->doc != NULL))
+ xpctxt->doc = contextNode->doc;
+ /*
+ * Evaluate the predicate expression with 1 context node
+ * at a time; this node is packaged into a node set; this
+ * node set is handed over to the evaluation mechanism.
+ */
+ if (contextObj == NULL)
+ contextObj = xmlXPathCacheNewNodeSet(xpctxt, contextNode);
+ else {
+ if (xmlXPathNodeSetAddUnique(contextObj->nodesetval,
+ contextNode) < 0) {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ goto evaluation_exit;
+ }
+ }
+
+ valuePush(ctxt, contextObj);
+
+ res = xmlXPathCompOpEvalToBoolean(ctxt, exprOp, 1);
+
+ if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
+ xmlXPathNodeSetClear(set, hasNsNodes);
+ newContextSize = 0;
+ goto evaluation_exit;
+ }
+
+ if (res != 0) {
+ newContextSize++;
+ } else {
+ /*
+ * Remove the entry from the initial node set.
+ */
+ set->nodeTab[i] = NULL;
+ if (contextNode->type == XML_NAMESPACE_DECL)
+ xmlXPathNodeSetFreeNs((xmlNsPtr) contextNode);
+ }
+ if (ctxt->value == contextObj) {
+ /*
+ * Don't free the temporary XPath object holding the
+ * context node, in order to avoid massive recreation
+ * inside this loop.
+ */
+ valuePop(ctxt);
+ xmlXPathNodeSetClear(contextObj->nodesetval, hasNsNodes);
+ } else {
+ /*
+ * TODO: The object was lost in the evaluation machinery.
+ * Can this happen? Maybe in internal-error cases.
+ */
+ contextObj = NULL;
+ }
+ }
+
+ if (contextObj != NULL) {
+ if (ctxt->value == contextObj)
+ valuePop(ctxt);
+ xmlXPathReleaseObject(xpctxt, contextObj);
+ }
+evaluation_exit:
+ if (exprRes != NULL)
+ xmlXPathReleaseObject(ctxt->context, exprRes);
+ /*
+ * Reset/invalidate the context.
+ */
+ xpctxt->node = oldContextNode;
+ xpctxt->doc = oldContextDoc;
+ xpctxt->contextSize = -1;
+ xpctxt->proximityPosition = -1;
+ return(newContextSize);
+ }
+ return(contextSize);
+}
+
+static int
+xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ xmlNodeSetPtr set,
+ int contextSize,
+ int minPos,
+ int maxPos,
+ int hasNsNodes)
+{
+ if (op->ch1 != -1) {
+ xmlXPathCompExprPtr comp = ctxt->comp;
+ if (comp->steps[op->ch1].op != XPATH_OP_PREDICATE) {
+ /*
+ * TODO: raise an internal error.
+ */
+ }
+ contextSize = xmlXPathCompOpEvalPredicate(ctxt,
+ &comp->steps[op->ch1], set, contextSize, hasNsNodes);
+ CHECK_ERROR0;
+ if (contextSize <= 0)
+ return(0);
+ }
+ /*
+ * Check if the node set contains a sufficient number of nodes for
+ * the requested range.
+ */
+ if (contextSize < minPos) {
+ xmlXPathNodeSetClear(set, hasNsNodes);
+ return(0);
+ }
+ if (op->ch2 == -1) {
+ /*
+ * TODO: Can this ever happen?
+ */
+ return (contextSize);
+ } else {
+ xmlDocPtr oldContextDoc;
+ int i, pos = 0, newContextSize = 0, contextPos = 0, res;
+ xmlXPathStepOpPtr exprOp;
+ xmlXPathObjectPtr contextObj = NULL, exprRes = NULL;
+ xmlNodePtr oldContextNode, contextNode = NULL;
+ xmlXPathContextPtr xpctxt = ctxt->context;
+ int frame;
+
+#ifdef LIBXML_XPTR_ENABLED
+ /*
+ * URGENT TODO: Check the following:
+ * We don't expect location sets if evaluating prediates, right?
+ * Only filters should expect location sets, right?
+ */
+#endif /* LIBXML_XPTR_ENABLED */
+
+ /*
+ * Save old context.
+ */
+ oldContextNode = xpctxt->node;
+ oldContextDoc = xpctxt->doc;
+ /*
+ * Get the expression of this predicate.
+ */
+ exprOp = &ctxt->comp->steps[op->ch2];
+ for (i = 0; i < set->nodeNr; i++) {
+ xmlXPathObjectPtr tmp;
+
+ if (set->nodeTab[i] == NULL)
+ continue;
+
+ contextNode = set->nodeTab[i];
+ xpctxt->node = contextNode;
+ xpctxt->contextSize = contextSize;
+ xpctxt->proximityPosition = ++contextPos;
+
+ /*
+ * Initialize the new set.
+ * Also set the xpath document in case things like
+ * key() evaluation are attempted on the predicate
+ */
+ if ((contextNode->type != XML_NAMESPACE_DECL) &&
+ (contextNode->doc != NULL))
+ xpctxt->doc = contextNode->doc;
+ /*
+ * Evaluate the predicate expression with 1 context node
+ * at a time; this node is packaged into a node set; this
+ * node set is handed over to the evaluation mechanism.
+ */
+ if (contextObj == NULL)
+ contextObj = xmlXPathCacheNewNodeSet(xpctxt, contextNode);
+ else {
+ if (xmlXPathNodeSetAddUnique(contextObj->nodesetval,
+ contextNode) < 0) {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ goto evaluation_exit;
+ }
+ }
+
+ frame = xmlXPathSetFrame(ctxt);
+ valuePush(ctxt, contextObj);
+ res = xmlXPathCompOpEvalToBoolean(ctxt, exprOp, 1);
+ tmp = valuePop(ctxt);
+ xmlXPathPopFrame(ctxt, frame);
+
+ if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) {
+ while (tmp != contextObj) {
+ /*
+ * Free up the result
+ * then pop off contextObj, which will be freed later
+ */
+ xmlXPathReleaseObject(xpctxt, tmp);
+ tmp = valuePop(ctxt);
+ }
+ goto evaluation_error;
+ }
+ /* push the result back onto the stack */
+ valuePush(ctxt, tmp);
+
+ if (res)
+ pos++;
+
+ if (res && (pos >= minPos) && (pos <= maxPos)) {
+ /*
+ * Fits in the requested range.
+ */
+ newContextSize++;
+ if (minPos == maxPos) {
+ /*
+ * Only 1 node was requested.
+ */
+ if (contextNode->type == XML_NAMESPACE_DECL) {
+ /*
+ * As always: take care of those nasty
+ * namespace nodes.
+ */
+ set->nodeTab[i] = NULL;
+ }
+ xmlXPathNodeSetClear(set, hasNsNodes);
+ set->nodeNr = 1;
+ set->nodeTab[0] = contextNode;
+ goto evaluation_exit;
+ }
+ if (pos == maxPos) {
+ /*
+ * We are done.
+ */
+ xmlXPathNodeSetClearFromPos(set, i +1, hasNsNodes);
+ goto evaluation_exit;
+ }
+ } else {
+ /*
+ * Remove the entry from the initial node set.
+ */
+ set->nodeTab[i] = NULL;
+ if (contextNode->type == XML_NAMESPACE_DECL)
+ xmlXPathNodeSetFreeNs((xmlNsPtr) contextNode);
+ }
+ if (exprRes != NULL) {
+ xmlXPathReleaseObject(ctxt->context, exprRes);
+ exprRes = NULL;
+ }
+ if (ctxt->value == contextObj) {
+ /*
+ * Don't free the temporary XPath object holding the
+ * context node, in order to avoid massive recreation
+ * inside this loop.
+ */
+ valuePop(ctxt);
+ xmlXPathNodeSetClear(contextObj->nodesetval, hasNsNodes);
+ } else {
+ /*
+ * The object was lost in the evaluation machinery.
+ * Can this happen? Maybe in case of internal-errors.
+ */
+ contextObj = NULL;
+ }
+ }
+ goto evaluation_exit;
+
+evaluation_error:
+ xmlXPathNodeSetClear(set, hasNsNodes);
+ newContextSize = 0;
+
+evaluation_exit:
+ if (contextObj != NULL) {
+ if (ctxt->value == contextObj)
+ valuePop(ctxt);
+ xmlXPathReleaseObject(xpctxt, contextObj);
+ }
+ if (exprRes != NULL)
+ xmlXPathReleaseObject(ctxt->context, exprRes);
+ /*
+ * Reset/invalidate the context.
+ */
+ xpctxt->node = oldContextNode;
+ xpctxt->doc = oldContextDoc;
+ xpctxt->contextSize = -1;
+ xpctxt->proximityPosition = -1;
+ return(newContextSize);
+ }
+ return(contextSize);
+}
+
+static int
+xmlXPathIsPositionalPredicate(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ int *maxPos)
+{
+
+ xmlXPathStepOpPtr exprOp;
+
+ /*
+ * BIG NOTE: This is not intended for XPATH_OP_FILTER yet!
+ */
+
+ /*
+ * If not -1, then ch1 will point to:
+ * 1) For predicates (XPATH_OP_PREDICATE):
+ * - an inner predicate operator
+ * 2) For filters (XPATH_OP_FILTER):
+ * - an inner filter operater OR
+ * - an expression selecting the node set.
+ * E.g. "key('a', 'b')" or "(//foo | //bar)".
+ */
+ if ((op->op != XPATH_OP_PREDICATE) && (op->op != XPATH_OP_FILTER))
+ return(0);
+
+ if (op->ch2 != -1) {
+ exprOp = &ctxt->comp->steps[op->ch2];
+ } else
+ return(0);
+
+ if ((exprOp != NULL) &&
+ (exprOp->op == XPATH_OP_VALUE) &&
+ (exprOp->value4 != NULL) &&
+ (((xmlXPathObjectPtr) exprOp->value4)->type == XPATH_NUMBER))
+ {
+ /*
+ * We have a "[n]" predicate here.
+ * TODO: Unfortunately this simplistic test here is not
+ * able to detect a position() predicate in compound
+ * expressions like "[@attr = 'a" and position() = 1],
+ * and even not the usage of position() in
+ * "[position() = 1]"; thus - obviously - a position-range,
+ * like it "[position() < 5]", is also not detected.
+ * Maybe we could rewrite the AST to ease the optimization.
+ */
+ *maxPos = (int) ((xmlXPathObjectPtr) exprOp->value4)->floatval;
+
+ if (((xmlXPathObjectPtr) exprOp->value4)->floatval ==
+ (float) *maxPos)
+ {
+ return(1);
+ }
+ }
+ return(0);
+}
+
+static int
+xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ xmlNodePtr * first, xmlNodePtr * last,
+ int toBool)
+{
+
+#define XP_TEST_HIT \
+ if (hasAxisRange != 0) { \
+ if (++pos == maxPos) { \
+ if (addNode(seq, cur) < 0) \
+ ctxt->error = XPATH_MEMORY_ERROR; \
+ goto axis_range_end; } \
+ } else { \
+ if (addNode(seq, cur) < 0) \
+ ctxt->error = XPATH_MEMORY_ERROR; \
+ if (breakOnFirstHit) goto first_hit; }
+
+#define XP_TEST_HIT_NS \
+ if (hasAxisRange != 0) { \
+ if (++pos == maxPos) { \
+ hasNsNodes = 1; \
+ if (xmlXPathNodeSetAddNs(seq, xpctxt->node, (xmlNsPtr) cur) < 0) \
+ ctxt->error = XPATH_MEMORY_ERROR; \
+ goto axis_range_end; } \
+ } else { \
+ hasNsNodes = 1; \
+ if (xmlXPathNodeSetAddNs(seq, xpctxt->node, (xmlNsPtr) cur) < 0) \
+ ctxt->error = XPATH_MEMORY_ERROR; \
+ if (breakOnFirstHit) goto first_hit; }
+
+ xmlXPathAxisVal axis = (xmlXPathAxisVal) op->value;
+ xmlXPathTestVal test = (xmlXPathTestVal) op->value2;
+ xmlXPathTypeVal type = (xmlXPathTypeVal) op->value3;
+ const xmlChar *prefix = op->value4;
+ const xmlChar *name = op->value5;
+ const xmlChar *URI = NULL;
+
+#ifdef DEBUG_STEP
+ int nbMatches = 0, prevMatches = 0;
+#endif
+ int total = 0, hasNsNodes = 0;
+ /* The popped object holding the context nodes */
+ xmlXPathObjectPtr obj;
+ /* The set of context nodes for the node tests */
+ xmlNodeSetPtr contextSeq;
+ int contextIdx;
+ xmlNodePtr contextNode;
+ /* The final resulting node set wrt to all context nodes */
+ xmlNodeSetPtr outSeq;
+ /*
+ * The temporary resulting node set wrt 1 context node.
+ * Used to feed predicate evaluation.
+ */
+ xmlNodeSetPtr seq;
+ xmlNodePtr cur;
+ /* First predicate operator */
+ xmlXPathStepOpPtr predOp;
+ int maxPos; /* The requested position() (when a "[n]" predicate) */
+ int hasPredicateRange, hasAxisRange, pos, size, newSize;
+ int breakOnFirstHit;
+
+ xmlXPathTraversalFunction next = NULL;
+ int (*addNode) (xmlNodeSetPtr, xmlNodePtr);
+ xmlXPathNodeSetMergeFunction mergeAndClear;
+ xmlNodePtr oldContextNode;
+ xmlXPathContextPtr xpctxt = ctxt->context;
+
+
+ CHECK_TYPE0(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ /*
+ * Setup namespaces.
+ */
+ if (prefix != NULL) {
+ URI = xmlXPathNsLookup(xpctxt, prefix);
+ if (URI == NULL) {
+ xmlXPathReleaseObject(xpctxt, obj);
+ XP_ERROR0(XPATH_UNDEF_PREFIX_ERROR);
+ }
+ }
+ /*
+ * Setup axis.
+ *
+ * MAYBE FUTURE TODO: merging optimizations:
+ * - If the nodes to be traversed wrt to the initial nodes and
+ * the current axis cannot overlap, then we could avoid searching
+ * for duplicates during the merge.
+ * But the question is how/when to evaluate if they cannot overlap.
+ * Example: if we know that for two initial nodes, the one is
+ * not in the ancestor-or-self axis of the other, then we could safely
+ * avoid a duplicate-aware merge, if the axis to be traversed is e.g.
+ * the descendant-or-self axis.
+ */
+ mergeAndClear = xmlXPathNodeSetMergeAndClear;
+ switch (axis) {
+ case AXIS_ANCESTOR:
+ first = NULL;
+ next = xmlXPathNextAncestor;
+ break;
+ case AXIS_ANCESTOR_OR_SELF:
+ first = NULL;
+ next = xmlXPathNextAncestorOrSelf;
+ break;
+ case AXIS_ATTRIBUTE:
+ first = NULL;
+ last = NULL;
+ next = xmlXPathNextAttribute;
+ mergeAndClear = xmlXPathNodeSetMergeAndClearNoDupls;
+ break;
+ case AXIS_CHILD:
+ last = NULL;
+ if (((test == NODE_TEST_NAME) || (test == NODE_TEST_ALL)) &&
+ (type == NODE_TYPE_NODE))
+ {
+ /*
+ * Optimization if an element node type is 'element'.
+ */
+ next = xmlXPathNextChildElement;
+ } else
+ next = xmlXPathNextChild;
+ mergeAndClear = xmlXPathNodeSetMergeAndClearNoDupls;
+ break;
+ case AXIS_DESCENDANT:
+ last = NULL;
+ next = xmlXPathNextDescendant;
+ break;
+ case AXIS_DESCENDANT_OR_SELF:
+ last = NULL;
+ next = xmlXPathNextDescendantOrSelf;
+ break;
+ case AXIS_FOLLOWING:
+ last = NULL;
+ next = xmlXPathNextFollowing;
+ break;
+ case AXIS_FOLLOWING_SIBLING:
+ last = NULL;
+ next = xmlXPathNextFollowingSibling;
+ break;
+ case AXIS_NAMESPACE:
+ first = NULL;
+ last = NULL;
+ next = (xmlXPathTraversalFunction) xmlXPathNextNamespace;
+ mergeAndClear = xmlXPathNodeSetMergeAndClearNoDupls;
+ break;
+ case AXIS_PARENT:
+ first = NULL;
+ next = xmlXPathNextParent;
+ break;
+ case AXIS_PRECEDING:
+ first = NULL;
+ next = xmlXPathNextPrecedingInternal;
+ break;
+ case AXIS_PRECEDING_SIBLING:
+ first = NULL;
+ next = xmlXPathNextPrecedingSibling;
+ break;
+ case AXIS_SELF:
+ first = NULL;
+ last = NULL;
+ next = xmlXPathNextSelf;
+ mergeAndClear = xmlXPathNodeSetMergeAndClearNoDupls;
+ break;
+ }
+
+#ifdef DEBUG_STEP
+ xmlXPathDebugDumpStepAxis(op,
+ (obj->nodesetval != NULL) ? obj->nodesetval->nodeNr : 0);
+#endif
+
+ if (next == NULL) {
+ xmlXPathReleaseObject(xpctxt, obj);
+ return(0);
+ }
+ contextSeq = obj->nodesetval;
+ if ((contextSeq == NULL) || (contextSeq->nodeNr <= 0)) {
+ xmlXPathReleaseObject(xpctxt, obj);
+ valuePush(ctxt, xmlXPathCacheWrapNodeSet(xpctxt, NULL));
+ return(0);
+ }
+ /*
+ * Predicate optimization ---------------------------------------------
+ * If this step has a last predicate, which contains a position(),
+ * then we'll optimize (although not exactly "position()", but only
+ * the short-hand form, i.e., "[n]".
+ *
+ * Example - expression "/foo[parent::bar][1]":
+ *
+ * COLLECT 'child' 'name' 'node' foo -- op (we are here)
+ * ROOT -- op->ch1
+ * PREDICATE -- op->ch2 (predOp)
+ * PREDICATE -- predOp->ch1 = [parent::bar]
+ * SORT
+ * COLLECT 'parent' 'name' 'node' bar
+ * NODE
+ * ELEM Object is a number : 1 -- predOp->ch2 = [1]
+ *
+ */
+ maxPos = 0;
+ predOp = NULL;
+ hasPredicateRange = 0;
+ hasAxisRange = 0;
+ if (op->ch2 != -1) {
+ /*
+ * There's at least one predicate. 16 == XPATH_OP_PREDICATE
+ */
+ predOp = &ctxt->comp->steps[op->ch2];
+ if (xmlXPathIsPositionalPredicate(ctxt, predOp, &maxPos)) {
+ if (predOp->ch1 != -1) {
+ /*
+ * Use the next inner predicate operator.
+ */
+ predOp = &ctxt->comp->steps[predOp->ch1];
+ hasPredicateRange = 1;
+ } else {
+ /*
+ * There's no other predicate than the [n] predicate.
+ */
+ predOp = NULL;
+ hasAxisRange = 1;
+ }
+ }
+ }
+ breakOnFirstHit = ((toBool) && (predOp == NULL)) ? 1 : 0;
+ /*
+ * Axis traversal -----------------------------------------------------
+ */
+ /*
+ * 2.3 Node Tests
+ * - For the attribute axis, the principal node type is attribute.
+ * - For the namespace axis, the principal node type is namespace.
+ * - For other axes, the principal node type is element.
+ *
+ * A node test * is true for any node of the
+ * principal node type. For example, child::* will
+ * select all element children of the context node
+ */
+ oldContextNode = xpctxt->node;
+ addNode = xmlXPathNodeSetAddUnique;
+ outSeq = NULL;
+ seq = NULL;
+ contextNode = NULL;
+ contextIdx = 0;
+
+
+ while (((contextIdx < contextSeq->nodeNr) || (contextNode != NULL)) &&
+ (ctxt->error == XPATH_EXPRESSION_OK)) {
+ xpctxt->node = contextSeq->nodeTab[contextIdx++];
+
+ if (seq == NULL) {
+ seq = xmlXPathNodeSetCreate(NULL);
+ if (seq == NULL) {
+ total = 0;
+ goto error;
+ }
+ }
+ /*
+ * Traverse the axis and test the nodes.
+ */
+ pos = 0;
+ cur = NULL;
+ hasNsNodes = 0;
+ do {
+ cur = next(ctxt, cur);
+ if (cur == NULL)
+ break;
+
+ /*
+ * QUESTION TODO: What does the "first" and "last" stuff do?
+ */
+ if ((first != NULL) && (*first != NULL)) {
+ if (*first == cur)
+ break;
+ if (((total % 256) == 0) &&
+#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
+ (xmlXPathCmpNodesExt(*first, cur) >= 0))
+#else
+ (xmlXPathCmpNodes(*first, cur) >= 0))
+#endif
+ {
+ break;
+ }
+ }
+ if ((last != NULL) && (*last != NULL)) {
+ if (*last == cur)
+ break;
+ if (((total % 256) == 0) &&
+#ifdef XP_OPTIMIZED_NON_ELEM_COMPARISON
+ (xmlXPathCmpNodesExt(cur, *last) >= 0))
+#else
+ (xmlXPathCmpNodes(cur, *last) >= 0))
+#endif
+ {
+ break;
+ }
+ }
+
+ total++;
+
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext, " %s", cur->name);
+#endif
+
+ switch (test) {
+ case NODE_TEST_NONE:
+ total = 0;
+ STRANGE
+ goto error;
+ case NODE_TEST_TYPE:
+ /*
+ * TODO: Don't we need to use
+ * xmlXPathNodeSetAddNs() for namespace nodes here?
+ * Surprisingly, some c14n tests fail, if we do this.
+ */
+ if (type == NODE_TYPE_NODE) {
+ switch (cur->type) {
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_TEXT_NODE:
+ case XML_NAMESPACE_DECL:
+ XP_TEST_HIT
+ break;
+ default:
+ break;
+ }
+ } else if (cur->type == type) {
+ if (cur->type == XML_NAMESPACE_DECL)
+ XP_TEST_HIT_NS
+ else
+ XP_TEST_HIT
+ } else if ((type == NODE_TYPE_TEXT) &&
+ (cur->type == XML_CDATA_SECTION_NODE))
+ {
+ XP_TEST_HIT
+ }
+ break;
+ case NODE_TEST_PI:
+ if ((cur->type == XML_PI_NODE) &&
+ ((name == NULL) || xmlStrEqual(name, cur->name)))
+ {
+ XP_TEST_HIT
+ }
+ break;
+ case NODE_TEST_ALL:
+ if (axis == AXIS_ATTRIBUTE) {
+ if (cur->type == XML_ATTRIBUTE_NODE)
+ {
+ if (prefix == NULL)
+ {
+ XP_TEST_HIT
+ } else if ((cur->ns != NULL) &&
+ (xmlStrEqual(URI, cur->ns->href)))
+ {
+ XP_TEST_HIT
+ }
+ }
+ } else if (axis == AXIS_NAMESPACE) {
+ if (cur->type == XML_NAMESPACE_DECL)
+ {
+ XP_TEST_HIT_NS
+ }
+ } else {
+ if (cur->type == XML_ELEMENT_NODE) {
+ if (prefix == NULL)
+ {
+ XP_TEST_HIT
+
+ } else if ((cur->ns != NULL) &&
+ (xmlStrEqual(URI, cur->ns->href)))
+ {
+ XP_TEST_HIT
+ }
+ }
+ }
+ break;
+ case NODE_TEST_NS:{
+ TODO;
+ break;
+ }
+ case NODE_TEST_NAME:
+ if (axis == AXIS_ATTRIBUTE) {
+ if (cur->type != XML_ATTRIBUTE_NODE)
+ break;
+ } else if (axis == AXIS_NAMESPACE) {
+ if (cur->type != XML_NAMESPACE_DECL)
+ break;
+ } else {
+ if (cur->type != XML_ELEMENT_NODE)
+ break;
+ }
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ if (xmlStrEqual(name, cur->name)) {
+ if (prefix == NULL) {
+ if (cur->ns == NULL)
+ {
+ XP_TEST_HIT
+ }
+ } else {
+ if ((cur->ns != NULL) &&
+ (xmlStrEqual(URI, cur->ns->href)))
+ {
+ XP_TEST_HIT
+ }
+ }
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:{
+ xmlAttrPtr attr = (xmlAttrPtr) cur;
+
+ if (xmlStrEqual(name, attr->name)) {
+ if (prefix == NULL) {
+ if ((attr->ns == NULL) ||
+ (attr->ns->prefix == NULL))
+ {
+ XP_TEST_HIT
+ }
+ } else {
+ if ((attr->ns != NULL) &&
+ (xmlStrEqual(URI,
+ attr->ns->href)))
+ {
+ XP_TEST_HIT
+ }
+ }
+ }
+ break;
+ }
+ case XML_NAMESPACE_DECL:
+ if (cur->type == XML_NAMESPACE_DECL) {
+ xmlNsPtr ns = (xmlNsPtr) cur;
+
+ if ((ns->prefix != NULL) && (name != NULL)
+ && (xmlStrEqual(ns->prefix, name)))
+ {
+ XP_TEST_HIT_NS
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ } /* switch(test) */
+ } while ((cur != NULL) && (ctxt->error == XPATH_EXPRESSION_OK));
+
+ goto apply_predicates;
+
+axis_range_end: /* ----------------------------------------------------- */
+ /*
+ * We have a "/foo[n]", and position() = n was reached.
+ * Note that we can have as well "/foo/::parent::foo[1]", so
+ * a duplicate-aware merge is still needed.
+ * Merge with the result.
+ */
+ if (outSeq == NULL) {
+ outSeq = seq;
+ seq = NULL;
+ } else
+ outSeq = mergeAndClear(outSeq, seq, 0);
+ /*
+ * Break if only a true/false result was requested.
+ */
+ if (toBool)
+ break;
+ continue;
+
+first_hit: /* ---------------------------------------------------------- */
+ /*
+ * Break if only a true/false result was requested and
+ * no predicates existed and a node test succeeded.
+ */
+ if (outSeq == NULL) {
+ outSeq = seq;
+ seq = NULL;
+ } else
+ outSeq = mergeAndClear(outSeq, seq, 0);
+ break;
+
+#ifdef DEBUG_STEP
+ if (seq != NULL)
+ nbMatches += seq->nodeNr;
+#endif
+
+apply_predicates: /* --------------------------------------------------- */
+ if (ctxt->error != XPATH_EXPRESSION_OK)
+ goto error;
+
+ /*
+ * Apply predicates.
+ */
+ if ((predOp != NULL) && (seq->nodeNr > 0)) {
+ /*
+ * E.g. when we have a "/foo[some expression][n]".
+ */
+ /*
+ * QUESTION TODO: The old predicate evaluation took into
+ * account location-sets.
+ * (E.g. ctxt->value->type == XPATH_LOCATIONSET)
+ * Do we expect such a set here?
+ * All what I learned now from the evaluation semantics
+ * does not indicate that a location-set will be processed
+ * here, so this looks OK.
+ */
+ /*
+ * Iterate over all predicates, starting with the outermost
+ * predicate.
+ * TODO: Problem: we cannot execute the inner predicates first
+ * since we cannot go back *up* the operator tree!
+ * Options we have:
+ * 1) Use of recursive functions (like is it currently done
+ * via xmlXPathCompOpEval())
+ * 2) Add a predicate evaluation information stack to the
+ * context struct
+ * 3) Change the way the operators are linked; we need a
+ * "parent" field on xmlXPathStepOp
+ *
+ * For the moment, I'll try to solve this with a recursive
+ * function: xmlXPathCompOpEvalPredicate().
+ */
+ size = seq->nodeNr;
+ if (hasPredicateRange != 0)
+ newSize = xmlXPathCompOpEvalPositionalPredicate(ctxt,
+ predOp, seq, size, maxPos, maxPos, hasNsNodes);
+ else
+ newSize = xmlXPathCompOpEvalPredicate(ctxt,
+ predOp, seq, size, hasNsNodes);
+
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ total = 0;
+ goto error;
+ }
+ /*
+ * Add the filtered set of nodes to the result node set.
+ */
+ if (newSize == 0) {
+ /*
+ * The predicates filtered all nodes out.
+ */
+ xmlXPathNodeSetClear(seq, hasNsNodes);
+ } else if (seq->nodeNr > 0) {
+ /*
+ * Add to result set.
+ */
+ if (outSeq == NULL) {
+ if (size != newSize) {
+ /*
+ * We need to merge and clear here, since
+ * the sequence will contained NULLed entries.
+ */
+ outSeq = mergeAndClear(NULL, seq, 1);
+ } else {
+ outSeq = seq;
+ seq = NULL;
+ }
+ } else
+ outSeq = mergeAndClear(outSeq, seq,
+ (size != newSize) ? 1: 0);
+ /*
+ * Break if only a true/false result was requested.
+ */
+ if (toBool)
+ break;
+ }
+ } else if (seq->nodeNr > 0) {
+ /*
+ * Add to result set.
+ */
+ if (outSeq == NULL) {
+ outSeq = seq;
+ seq = NULL;
+ } else {
+ outSeq = mergeAndClear(outSeq, seq, 0);
+ }
+ }
+ }
+
+error:
+ if ((obj->boolval) && (obj->user != NULL)) {
+ /*
+ * QUESTION TODO: What does this do and why?
+ * TODO: Do we have to do this also for the "error"
+ * cleanup further down?
+ */
+ ctxt->value->boolval = 1;
+ ctxt->value->user = obj->user;
+ obj->user = NULL;
+ obj->boolval = 0;
+ }
+ xmlXPathReleaseObject(xpctxt, obj);
+
+ /*
+ * Ensure we return at least an emtpy set.
+ */
+ if (outSeq == NULL) {
+ if ((seq != NULL) && (seq->nodeNr == 0))
+ outSeq = seq;
+ else
+ outSeq = xmlXPathNodeSetCreate(NULL);
+ /* XXX what if xmlXPathNodeSetCreate returned NULL here? */
+ }
+ if ((seq != NULL) && (seq != outSeq)) {
+ xmlXPathFreeNodeSet(seq);
+ }
+ /*
+ * Hand over the result. Better to push the set also in
+ * case of errors.
+ */
+ valuePush(ctxt, xmlXPathCacheWrapNodeSet(xpctxt, outSeq));
+ /*
+ * Reset the context node.
+ */
+ xpctxt->node = oldContextNode;
+
+#ifdef DEBUG_STEP
+ xmlGenericError(xmlGenericErrorContext,
+ "\nExamined %d nodes, found %d nodes at that step\n",
+ total, nbMatches);
+#endif
+
+ return(total);
+}
+
+static int
+xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op, xmlNodePtr * first);
+
+/**
+ * xmlXPathCompOpEvalFirst:
+ * @ctxt: the XPath parser context with the compiled expression
+ * @op: an XPath compiled operation
+ * @first: the first elem found so far
+ *
+ * Evaluate the Precompiled XPath operation searching only the first
+ * element in document order
+ *
+ * Returns the number of examined objects.
+ */
+static int
+xmlXPathCompOpEvalFirst(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op, xmlNodePtr * first)
+{
+ int total = 0, cur;
+ xmlXPathCompExprPtr comp;
+ xmlXPathObjectPtr arg1, arg2;
+
+ CHECK_ERROR0;
+ comp = ctxt->comp;
+ switch (op->op) {
+ case XPATH_OP_END:
+ return (0);
+ case XPATH_OP_UNION:
+ total =
+ xmlXPathCompOpEvalFirst(ctxt, &comp->steps[op->ch1],
+ first);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL)
+ && (ctxt->value->type == XPATH_NODESET)
+ && (ctxt->value->nodesetval != NULL)
+ && (ctxt->value->nodesetval->nodeNr >= 1)) {
+ /*
+ * limit tree traversing to first node in the result
+ */
+ /*
+ * OPTIMIZE TODO: This implicitely sorts
+ * the result, even if not needed. E.g. if the argument
+ * of the count() function, no sorting is needed.
+ * OPTIMIZE TODO: How do we know if the node-list wasn't
+ * aready sorted?
+ */
+ if (ctxt->value->nodesetval->nodeNr > 1)
+ xmlXPathNodeSetSort(ctxt->value->nodesetval);
+ *first = ctxt->value->nodesetval->nodeTab[0];
+ }
+ cur =
+ xmlXPathCompOpEvalFirst(ctxt, &comp->steps[op->ch2],
+ first);
+ CHECK_ERROR0;
+ CHECK_TYPE0(XPATH_NODESET);
+ arg2 = valuePop(ctxt);
+
+ CHECK_TYPE0(XPATH_NODESET);
+ arg1 = valuePop(ctxt);
+
+ arg1->nodesetval = xmlXPathNodeSetMerge(arg1->nodesetval,
+ arg2->nodesetval);
+ valuePush(ctxt, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ /* optimizer */
+ if (total > cur)
+ xmlXPathCompSwap(op);
+ return (total + cur);
+ case XPATH_OP_ROOT:
+ xmlXPathRoot(ctxt);
+ return (0);
+ case XPATH_OP_NODE:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ return (total);
+ case XPATH_OP_RESET:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ ctxt->context->node = NULL;
+ return (total);
+ case XPATH_OP_COLLECT:{
+ if (op->ch1 == -1)
+ return (total);
+
+ total = xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+
+ total += xmlXPathNodeCollectAndTest(ctxt, op, first, NULL, 0);
+ return (total);
+ }
+ case XPATH_OP_VALUE:
+ valuePush(ctxt,
+ xmlXPathCacheObjectCopy(ctxt->context,
+ (xmlXPathObjectPtr) op->value4));
+ return (0);
+ case XPATH_OP_SORT:
+ if (op->ch1 != -1)
+ total +=
+ xmlXPathCompOpEvalFirst(ctxt, &comp->steps[op->ch1],
+ first);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL)
+ && (ctxt->value->type == XPATH_NODESET)
+ && (ctxt->value->nodesetval != NULL)
+ && (ctxt->value->nodesetval->nodeNr > 1))
+ xmlXPathNodeSetSort(ctxt->value->nodesetval);
+ return (total);
+#ifdef XP_OPTIMIZED_FILTER_FIRST
+ case XPATH_OP_FILTER:
+ total += xmlXPathCompOpEvalFilterFirst(ctxt, op, first);
+ return (total);
+#endif
+ default:
+ return (xmlXPathCompOpEval(ctxt, op));
+ }
+}
+
+/**
+ * xmlXPathCompOpEvalLast:
+ * @ctxt: the XPath parser context with the compiled expression
+ * @op: an XPath compiled operation
+ * @last: the last elem found so far
+ *
+ * Evaluate the Precompiled XPath operation searching only the last
+ * element in document order
+ *
+ * Returns the number of nodes traversed
+ */
+static int
+xmlXPathCompOpEvalLast(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op,
+ xmlNodePtr * last)
+{
+ int total = 0, cur;
+ xmlXPathCompExprPtr comp;
+ xmlXPathObjectPtr arg1, arg2;
+ xmlNodePtr bak;
+ xmlDocPtr bakd;
+ int pp;
+ int cs;
+
+ CHECK_ERROR0;
+ comp = ctxt->comp;
+ switch (op->op) {
+ case XPATH_OP_END:
+ return (0);
+ case XPATH_OP_UNION:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total =
+ xmlXPathCompOpEvalLast(ctxt, &comp->steps[op->ch1], last);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL)
+ && (ctxt->value->type == XPATH_NODESET)
+ && (ctxt->value->nodesetval != NULL)
+ && (ctxt->value->nodesetval->nodeNr >= 1)) {
+ /*
+ * limit tree traversing to first node in the result
+ */
+ if (ctxt->value->nodesetval->nodeNr > 1)
+ xmlXPathNodeSetSort(ctxt->value->nodesetval);
+ *last =
+ ctxt->value->nodesetval->nodeTab[ctxt->value->
+ nodesetval->nodeNr -
+ 1];
+ }
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ cur =
+ xmlXPathCompOpEvalLast(ctxt, &comp->steps[op->ch2], last);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL)
+ && (ctxt->value->type == XPATH_NODESET)
+ && (ctxt->value->nodesetval != NULL)
+ && (ctxt->value->nodesetval->nodeNr >= 1)) { /* TODO: NOP ? */
+ }
+ CHECK_TYPE0(XPATH_NODESET);
+ arg2 = valuePop(ctxt);
+
+ CHECK_TYPE0(XPATH_NODESET);
+ arg1 = valuePop(ctxt);
+
+ arg1->nodesetval = xmlXPathNodeSetMerge(arg1->nodesetval,
+ arg2->nodesetval);
+ valuePush(ctxt, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ /* optimizer */
+ if (total > cur)
+ xmlXPathCompSwap(op);
+ return (total + cur);
+ case XPATH_OP_ROOT:
+ xmlXPathRoot(ctxt);
+ return (0);
+ case XPATH_OP_NODE:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ return (total);
+ case XPATH_OP_RESET:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ ctxt->context->node = NULL;
+ return (total);
+ case XPATH_OP_COLLECT:{
+ if (op->ch1 == -1)
+ return (0);
+
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+
+ total += xmlXPathNodeCollectAndTest(ctxt, op, NULL, last, 0);
+ return (total);
+ }
+ case XPATH_OP_VALUE:
+ valuePush(ctxt,
+ xmlXPathCacheObjectCopy(ctxt->context,
+ (xmlXPathObjectPtr) op->value4));
+ return (0);
+ case XPATH_OP_SORT:
+ if (op->ch1 != -1)
+ total +=
+ xmlXPathCompOpEvalLast(ctxt, &comp->steps[op->ch1],
+ last);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL)
+ && (ctxt->value->type == XPATH_NODESET)
+ && (ctxt->value->nodesetval != NULL)
+ && (ctxt->value->nodesetval->nodeNr > 1))
+ xmlXPathNodeSetSort(ctxt->value->nodesetval);
+ return (total);
+ default:
+ return (xmlXPathCompOpEval(ctxt, op));
+ }
+}
+
+#ifdef XP_OPTIMIZED_FILTER_FIRST
+static int
+xmlXPathCompOpEvalFilterFirst(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op, xmlNodePtr * first)
+{
+ int total = 0;
+ xmlXPathCompExprPtr comp;
+ xmlXPathObjectPtr res;
+ xmlXPathObjectPtr obj;
+ xmlNodeSetPtr oldset;
+ xmlNodePtr oldnode;
+ xmlDocPtr oldDoc;
+ int i;
+
+ CHECK_ERROR0;
+ comp = ctxt->comp;
+ /*
+ * Optimization for ()[last()] selection i.e. the last elem
+ */
+ if ((op->ch1 != -1) && (op->ch2 != -1) &&
+ (comp->steps[op->ch1].op == XPATH_OP_SORT) &&
+ (comp->steps[op->ch2].op == XPATH_OP_SORT)) {
+ int f = comp->steps[op->ch2].ch1;
+
+ if ((f != -1) &&
+ (comp->steps[f].op == XPATH_OP_FUNCTION) &&
+ (comp->steps[f].value5 == NULL) &&
+ (comp->steps[f].value == 0) &&
+ (comp->steps[f].value4 != NULL) &&
+ (xmlStrEqual
+ (comp->steps[f].value4, BAD_CAST "last"))) {
+ xmlNodePtr last = NULL;
+
+ total +=
+ xmlXPathCompOpEvalLast(ctxt,
+ &comp->steps[op->ch1],
+ &last);
+ CHECK_ERROR0;
+ /*
+ * The nodeset should be in document order,
+ * Keep only the last value
+ */
+ if ((ctxt->value != NULL) &&
+ (ctxt->value->type == XPATH_NODESET) &&
+ (ctxt->value->nodesetval != NULL) &&
+ (ctxt->value->nodesetval->nodeTab != NULL) &&
+ (ctxt->value->nodesetval->nodeNr > 1)) {
+ ctxt->value->nodesetval->nodeTab[0] =
+ ctxt->value->nodesetval->nodeTab[ctxt->
+ value->
+ nodesetval->
+ nodeNr -
+ 1];
+ ctxt->value->nodesetval->nodeNr = 1;
+ *first = *(ctxt->value->nodesetval->nodeTab);
+ }
+ return (total);
+ }
+ }
+
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 == -1)
+ return (total);
+ if (ctxt->value == NULL)
+ return (total);
+
+#ifdef LIBXML_XPTR_ENABLED
+ oldnode = ctxt->context->node;
+ /*
+ * Hum are we filtering the result of an XPointer expression
+ */
+ if (ctxt->value->type == XPATH_LOCATIONSET) {
+ xmlXPathObjectPtr tmp = NULL;
+ xmlLocationSetPtr newlocset = NULL;
+ xmlLocationSetPtr oldlocset;
+
+ /*
+ * Extract the old locset, and then evaluate the result of the
+ * expression for all the element in the locset. use it to grow
+ * up a new locset.
+ */
+ CHECK_TYPE0(XPATH_LOCATIONSET);
+ obj = valuePop(ctxt);
+ oldlocset = obj->user;
+ ctxt->context->node = NULL;
+
+ if ((oldlocset == NULL) || (oldlocset->locNr == 0)) {
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ res = valuePop(ctxt);
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ valuePush(ctxt, obj);
+ CHECK_ERROR0;
+ return (total);
+ }
+ newlocset = xmlXPtrLocationSetCreate(NULL);
+
+ for (i = 0; i < oldlocset->locNr; i++) {
+ /*
+ * Run the evaluation with a node list made of a
+ * single item in the nodelocset.
+ */
+ ctxt->context->node = oldlocset->locTab[i]->user;
+ ctxt->context->contextSize = oldlocset->locNr;
+ ctxt->context->proximityPosition = i + 1;
+ if (tmp == NULL) {
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ } else {
+ if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+ ctxt->context->node) < 0) {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ }
+ }
+ valuePush(ctxt, tmp);
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+ /*
+ * The result of the evaluation need to be tested to
+ * decided whether the filter succeeded or not
+ */
+ res = valuePop(ctxt);
+ if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
+ xmlXPtrLocationSetAdd(newlocset,
+ xmlXPathCacheObjectCopy(ctxt->context,
+ oldlocset->locTab[i]));
+ }
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ valuePop(ctxt);
+ xmlXPathNodeSetClear(tmp->nodesetval, 1);
+ /*
+ * REVISIT TODO: Don't create a temporary nodeset
+ * for everly iteration.
+ */
+ /* OLD: xmlXPathFreeObject(res); */
+ } else
+ tmp = NULL;
+ ctxt->context->node = NULL;
+ /*
+ * Only put the first node in the result, then leave.
+ */
+ if (newlocset->locNr > 0) {
+ *first = (xmlNodePtr) oldlocset->locTab[i]->user;
+ break;
+ }
+ }
+ if (tmp != NULL) {
+ xmlXPathReleaseObject(ctxt->context, tmp);
+ }
+ /*
+ * The result is used as the new evaluation locset.
+ */
+ xmlXPathReleaseObject(ctxt->context, obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newlocset));
+ ctxt->context->node = oldnode;
+ return (total);
+ }
+#endif /* LIBXML_XPTR_ENABLED */
+
+ /*
+ * Extract the old set, and then evaluate the result of the
+ * expression for all the element in the set. use it to grow
+ * up a new set.
+ */
+ CHECK_TYPE0(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ oldset = obj->nodesetval;
+
+ oldnode = ctxt->context->node;
+ oldDoc = ctxt->context->doc;
+ ctxt->context->node = NULL;
+
+ if ((oldset == NULL) || (oldset->nodeNr == 0)) {
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+ /* QUESTION TODO: Why was this code commented out?
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ res = valuePop(ctxt);
+ if (res != NULL)
+ xmlXPathFreeObject(res);
+ */
+ valuePush(ctxt, obj);
+ ctxt->context->node = oldnode;
+ CHECK_ERROR0;
+ } else {
+ xmlNodeSetPtr newset;
+ xmlXPathObjectPtr tmp = NULL;
+ /*
+ * Initialize the new set.
+ * Also set the xpath document in case things like
+ * key() evaluation are attempted on the predicate
+ */
+ newset = xmlXPathNodeSetCreate(NULL);
+ /* XXX what if xmlXPathNodeSetCreate returned NULL? */
+
+ for (i = 0; i < oldset->nodeNr; i++) {
+ /*
+ * Run the evaluation with a node list made of
+ * a single item in the nodeset.
+ */
+ ctxt->context->node = oldset->nodeTab[i];
+ if ((oldset->nodeTab[i]->type != XML_NAMESPACE_DECL) &&
+ (oldset->nodeTab[i]->doc != NULL))
+ ctxt->context->doc = oldset->nodeTab[i]->doc;
+ if (tmp == NULL) {
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ } else {
+ if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+ ctxt->context->node) < 0) {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ }
+ }
+ valuePush(ctxt, tmp);
+ ctxt->context->contextSize = oldset->nodeNr;
+ ctxt->context->proximityPosition = i + 1;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeNodeSet(newset);
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+ /*
+ * The result of the evaluation needs to be tested to
+ * decide whether the filter succeeded or not
+ */
+ res = valuePop(ctxt);
+ if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
+ if (xmlXPathNodeSetAdd(newset, oldset->nodeTab[i]) < 0)
+ ctxt->error = XPATH_MEMORY_ERROR;
+ }
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ valuePop(ctxt);
+ /*
+ * Don't free the temporary nodeset
+ * in order to avoid massive recreation inside this
+ * loop.
+ */
+ xmlXPathNodeSetClear(tmp->nodesetval, 1);
+ } else
+ tmp = NULL;
+ ctxt->context->node = NULL;
+ /*
+ * Only put the first node in the result, then leave.
+ */
+ if (newset->nodeNr > 0) {
+ *first = *(newset->nodeTab);
+ break;
+ }
+ }
+ if (tmp != NULL) {
+ xmlXPathReleaseObject(ctxt->context, tmp);
+ }
+ /*
+ * The result is used as the new evaluation set.
+ */
+ xmlXPathReleaseObject(ctxt->context, obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ /* may want to move this past the '}' later */
+ ctxt->context->doc = oldDoc;
+ valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt->context, newset));
+ }
+ ctxt->context->node = oldnode;
+ return(total);
+}
+#endif /* XP_OPTIMIZED_FILTER_FIRST */
+
+/**
+ * xmlXPathCompOpEval:
+ * @ctxt: the XPath parser context with the compiled expression
+ * @op: an XPath compiled operation
+ *
+ * Evaluate the Precompiled XPath operation
+ * Returns the number of nodes traversed
+ */
+static int
+xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+{
+ int total = 0;
+ int equal, ret;
+ xmlXPathCompExprPtr comp;
+ xmlXPathObjectPtr arg1, arg2;
+ xmlNodePtr bak;
+ xmlDocPtr bakd;
+ int pp;
+ int cs;
+
+ CHECK_ERROR0;
+ comp = ctxt->comp;
+ switch (op->op) {
+ case XPATH_OP_END:
+ return (0);
+ case XPATH_OP_AND:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ xmlXPathBooleanFunction(ctxt, 1);
+ if ((ctxt->value == NULL) || (ctxt->value->boolval == 0))
+ return (total);
+ arg2 = valuePop(ctxt);
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ if (ctxt->error) {
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+ arg1 = valuePop(ctxt);
+ arg1->boolval &= arg2->boolval;
+ valuePush(ctxt, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_OR:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ xmlXPathBooleanFunction(ctxt, 1);
+ if ((ctxt->value == NULL) || (ctxt->value->boolval == 1))
+ return (total);
+ arg2 = valuePop(ctxt);
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ if (ctxt->error) {
+ xmlXPathFreeObject(arg2);
+ return(0);
+ }
+ xmlXPathBooleanFunction(ctxt, 1);
+ arg1 = valuePop(ctxt);
+ arg1->boolval |= arg2->boolval;
+ valuePush(ctxt, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_EQUAL:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ if (op->value)
+ equal = xmlXPathEqualValues(ctxt);
+ else
+ equal = xmlXPathNotEqualValues(ctxt);
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, equal));
+ return (total);
+ case XPATH_OP_CMP:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ ret = xmlXPathCompareValues(ctxt, op->value, op->value2);
+ valuePush(ctxt, xmlXPathCacheNewBoolean(ctxt->context, ret));
+ return (total);
+ case XPATH_OP_PLUS:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1) {
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ }
+ CHECK_ERROR0;
+ if (op->value == 0)
+ xmlXPathSubValues(ctxt);
+ else if (op->value == 1)
+ xmlXPathAddValues(ctxt);
+ else if (op->value == 2)
+ xmlXPathValueFlipSign(ctxt);
+ else if (op->value == 3) {
+ CAST_TO_NUMBER;
+ CHECK_TYPE0(XPATH_NUMBER);
+ }
+ return (total);
+ case XPATH_OP_MULT:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ if (op->value == 0)
+ xmlXPathMultValues(ctxt);
+ else if (op->value == 1)
+ xmlXPathDivValues(ctxt);
+ else if (op->value == 2)
+ xmlXPathModValues(ctxt);
+ return (total);
+ case XPATH_OP_UNION:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ ctxt->context->doc = bakd;
+ ctxt->context->node = bak;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->contextSize = cs;
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ CHECK_TYPE0(XPATH_NODESET);
+ arg2 = valuePop(ctxt);
+
+ CHECK_TYPE0(XPATH_NODESET);
+ arg1 = valuePop(ctxt);
+
+ if ((arg1->nodesetval == NULL) ||
+ ((arg2->nodesetval != NULL) &&
+ (arg2->nodesetval->nodeNr != 0)))
+ {
+ arg1->nodesetval = xmlXPathNodeSetMerge(arg1->nodesetval,
+ arg2->nodesetval);
+ }
+
+ valuePush(ctxt, arg1);
+ xmlXPathReleaseObject(ctxt->context, arg2);
+ return (total);
+ case XPATH_OP_ROOT:
+ xmlXPathRoot(ctxt);
+ return (total);
+ case XPATH_OP_NODE:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node));
+ return (total);
+ case XPATH_OP_RESET:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ ctxt->context->node = NULL;
+ return (total);
+ case XPATH_OP_COLLECT:{
+ if (op->ch1 == -1)
+ return (total);
+
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+
+ total += xmlXPathNodeCollectAndTest(ctxt, op, NULL, NULL, 0);
+ return (total);
+ }
+ case XPATH_OP_VALUE:
+ valuePush(ctxt,
+ xmlXPathCacheObjectCopy(ctxt->context,
+ (xmlXPathObjectPtr) op->value4));
+ return (total);
+ case XPATH_OP_VARIABLE:{
+ xmlXPathObjectPtr val;
+
+ if (op->ch1 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ if (op->value5 == NULL) {
+ val = xmlXPathVariableLookup(ctxt->context, op->value4);
+ if (val == NULL) {
+ ctxt->error = XPATH_UNDEF_VARIABLE_ERROR;
+ return(0);
+ }
+ valuePush(ctxt, val);
+ } else {
+ const xmlChar *URI;
+
+ URI = xmlXPathNsLookup(ctxt->context, op->value5);
+ if (URI == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n",
+ (char *) op->value4, (char *)op->value5);
+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
+ return (total);
+ }
+ val = xmlXPathVariableLookupNS(ctxt->context,
+ op->value4, URI);
+ if (val == NULL) {
+ ctxt->error = XPATH_UNDEF_VARIABLE_ERROR;
+ return(0);
+ }
+ valuePush(ctxt, val);
+ }
+ return (total);
+ }
+ case XPATH_OP_FUNCTION:{
+ xmlXPathFunction func;
+ const xmlChar *oldFunc, *oldFuncURI;
+ int i;
+ int frame;
+
+ frame = xmlXPathSetFrame(ctxt);
+ if (op->ch1 != -1) {
+ total +=
+ xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathPopFrame(ctxt, frame);
+ return (total);
+ }
+ }
+ if (ctxt->valueNr < ctxt->valueFrame + op->value) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompOpEval: parameter error\n");
+ ctxt->error = XPATH_INVALID_OPERAND;
+ xmlXPathPopFrame(ctxt, frame);
+ return (total);
+ }
+ for (i = 0; i < op->value; i++) {
+ if (ctxt->valueTab[(ctxt->valueNr - 1) - i] == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompOpEval: parameter error\n");
+ ctxt->error = XPATH_INVALID_OPERAND;
+ xmlXPathPopFrame(ctxt, frame);
+ return (total);
+ }
+ }
+ if (op->cache != NULL)
+ XML_CAST_FPTR(func) = op->cache;
+ else {
+ const xmlChar *URI = NULL;
+
+ if (op->value5 == NULL)
+ func =
+ xmlXPathFunctionLookup(ctxt->context,
+ op->value4);
+ else {
+ URI = xmlXPathNsLookup(ctxt->context, op->value5);
+ if (URI == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n",
+ (char *)op->value4, (char *)op->value5);
+ xmlXPathPopFrame(ctxt, frame);
+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR;
+ return (total);
+ }
+ func = xmlXPathFunctionLookupNS(ctxt->context,
+ op->value4, URI);
+ }
+ if (func == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompOpEval: function %s not found\n",
+ (char *)op->value4);
+ XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR);
+ }
+ op->cache = XML_CAST_FPTR(func);
+ op->cacheURI = (void *) URI;
+ }
+ oldFunc = ctxt->context->function;
+ oldFuncURI = ctxt->context->functionURI;
+ ctxt->context->function = op->value4;
+ ctxt->context->functionURI = op->cacheURI;
+ func(ctxt, op->value);
+ ctxt->context->function = oldFunc;
+ ctxt->context->functionURI = oldFuncURI;
+ xmlXPathPopFrame(ctxt, frame);
+ return (total);
+ }
+ case XPATH_OP_ARG:
+ bakd = ctxt->context->doc;
+ bak = ctxt->context->node;
+ pp = ctxt->context->proximityPosition;
+ cs = ctxt->context->contextSize;
+ if (op->ch1 != -1) {
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ ctxt->context->contextSize = cs;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->node = bak;
+ ctxt->context->doc = bakd;
+ CHECK_ERROR0;
+ }
+ if (op->ch2 != -1) {
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch2]);
+ ctxt->context->contextSize = cs;
+ ctxt->context->proximityPosition = pp;
+ ctxt->context->node = bak;
+ ctxt->context->doc = bakd;
+ CHECK_ERROR0;
+ }
+ return (total);
+ case XPATH_OP_PREDICATE:
+ case XPATH_OP_FILTER:{
+ xmlXPathObjectPtr res;
+ xmlXPathObjectPtr obj, tmp;
+ xmlNodeSetPtr newset = NULL;
+ xmlNodeSetPtr oldset;
+ xmlNodePtr oldnode;
+ xmlDocPtr oldDoc;
+ int i;
+
+ /*
+ * Optimization for ()[1] selection i.e. the first elem
+ */
+ if ((op->ch1 != -1) && (op->ch2 != -1) &&
+#ifdef XP_OPTIMIZED_FILTER_FIRST
+ /*
+ * FILTER TODO: Can we assume that the inner processing
+ * will result in an ordered list if we have an
+ * XPATH_OP_FILTER?
+ * What about an additional field or flag on
+ * xmlXPathObject like @sorted ? This way we wouln'd need
+ * to assume anything, so it would be more robust and
+ * easier to optimize.
+ */
+ ((comp->steps[op->ch1].op == XPATH_OP_SORT) || /* 18 */
+ (comp->steps[op->ch1].op == XPATH_OP_FILTER)) && /* 17 */
+#else
+ (comp->steps[op->ch1].op == XPATH_OP_SORT) &&
+#endif
+ (comp->steps[op->ch2].op == XPATH_OP_VALUE)) { /* 12 */
+ xmlXPathObjectPtr val;
+
+ val = comp->steps[op->ch2].value4;
+ if ((val != NULL) && (val->type == XPATH_NUMBER) &&
+ (val->floatval == 1.0)) {
+ xmlNodePtr first = NULL;
+
+ total +=
+ xmlXPathCompOpEvalFirst(ctxt,
+ &comp->steps[op->ch1],
+ &first);
+ CHECK_ERROR0;
+ /*
+ * The nodeset should be in document order,
+ * Keep only the first value
+ */
+ if ((ctxt->value != NULL) &&
+ (ctxt->value->type == XPATH_NODESET) &&
+ (ctxt->value->nodesetval != NULL) &&
+ (ctxt->value->nodesetval->nodeNr > 1))
+ ctxt->value->nodesetval->nodeNr = 1;
+ return (total);
+ }
+ }
+ /*
+ * Optimization for ()[last()] selection i.e. the last elem
+ */
+ if ((op->ch1 != -1) && (op->ch2 != -1) &&
+ (comp->steps[op->ch1].op == XPATH_OP_SORT) &&
+ (comp->steps[op->ch2].op == XPATH_OP_SORT)) {
+ int f = comp->steps[op->ch2].ch1;
+
+ if ((f != -1) &&
+ (comp->steps[f].op == XPATH_OP_FUNCTION) &&
+ (comp->steps[f].value5 == NULL) &&
+ (comp->steps[f].value == 0) &&
+ (comp->steps[f].value4 != NULL) &&
+ (xmlStrEqual
+ (comp->steps[f].value4, BAD_CAST "last"))) {
+ xmlNodePtr last = NULL;
+
+ total +=
+ xmlXPathCompOpEvalLast(ctxt,
+ &comp->steps[op->ch1],
+ &last);
+ CHECK_ERROR0;
+ /*
+ * The nodeset should be in document order,
+ * Keep only the last value
+ */
+ if ((ctxt->value != NULL) &&
+ (ctxt->value->type == XPATH_NODESET) &&
+ (ctxt->value->nodesetval != NULL) &&
+ (ctxt->value->nodesetval->nodeTab != NULL) &&
+ (ctxt->value->nodesetval->nodeNr > 1)) {
+ ctxt->value->nodesetval->nodeTab[0] =
+ ctxt->value->nodesetval->nodeTab[ctxt->
+ value->
+ nodesetval->
+ nodeNr -
+ 1];
+ ctxt->value->nodesetval->nodeNr = 1;
+ }
+ return (total);
+ }
+ }
+ /*
+ * Process inner predicates first.
+ * Example "index[parent::book][1]":
+ * ...
+ * PREDICATE <-- we are here "[1]"
+ * PREDICATE <-- process "[parent::book]" first
+ * SORT
+ * COLLECT 'parent' 'name' 'node' book
+ * NODE
+ * ELEM Object is a number : 1
+ */
+ if (op->ch1 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if (op->ch2 == -1)
+ return (total);
+ if (ctxt->value == NULL)
+ return (total);
+
+ oldnode = ctxt->context->node;
+
+#ifdef LIBXML_XPTR_ENABLED
+ /*
+ * Hum are we filtering the result of an XPointer expression
+ */
+ if (ctxt->value->type == XPATH_LOCATIONSET) {
+ xmlLocationSetPtr newlocset = NULL;
+ xmlLocationSetPtr oldlocset;
+
+ /*
+ * Extract the old locset, and then evaluate the result of the
+ * expression for all the element in the locset. use it to grow
+ * up a new locset.
+ */
+ CHECK_TYPE0(XPATH_LOCATIONSET);
+ obj = valuePop(ctxt);
+ oldlocset = obj->user;
+ ctxt->context->node = NULL;
+
+ if ((oldlocset == NULL) || (oldlocset->locNr == 0)) {
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ res = valuePop(ctxt);
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ valuePush(ctxt, obj);
+ CHECK_ERROR0;
+ return (total);
+ }
+ newlocset = xmlXPtrLocationSetCreate(NULL);
+
+ for (i = 0; i < oldlocset->locNr; i++) {
+ /*
+ * Run the evaluation with a node list made of a
+ * single item in the nodelocset.
+ */
+ ctxt->context->node = oldlocset->locTab[i]->user;
+ ctxt->context->contextSize = oldlocset->locNr;
+ ctxt->context->proximityPosition = i + 1;
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ valuePush(ctxt, tmp);
+
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+
+ /*
+ * The result of the evaluation need to be tested to
+ * decided whether the filter succeeded or not
+ */
+ res = valuePop(ctxt);
+ if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
+ xmlXPtrLocationSetAdd(newlocset,
+ xmlXPathObjectCopy
+ (oldlocset->locTab[i]));
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ res = valuePop(ctxt);
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+
+ ctxt->context->node = NULL;
+ }
+
+ /*
+ * The result is used as the new evaluation locset.
+ */
+ xmlXPathReleaseObject(ctxt->context, obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newlocset));
+ ctxt->context->node = oldnode;
+ return (total);
+ }
+#endif /* LIBXML_XPTR_ENABLED */
+
+ /*
+ * Extract the old set, and then evaluate the result of the
+ * expression for all the element in the set. use it to grow
+ * up a new set.
+ */
+ CHECK_TYPE0(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ oldset = obj->nodesetval;
+
+ oldnode = ctxt->context->node;
+ oldDoc = ctxt->context->doc;
+ ctxt->context->node = NULL;
+
+ if ((oldset == NULL) || (oldset->nodeNr == 0)) {
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+/*
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ CHECK_ERROR0;
+ res = valuePop(ctxt);
+ if (res != NULL)
+ xmlXPathFreeObject(res);
+*/
+ valuePush(ctxt, obj);
+ ctxt->context->node = oldnode;
+ CHECK_ERROR0;
+ } else {
+ tmp = NULL;
+ /*
+ * Initialize the new set.
+ * Also set the xpath document in case things like
+ * key() evaluation are attempted on the predicate
+ */
+ newset = xmlXPathNodeSetCreate(NULL);
+ /*
+ * SPEC XPath 1.0:
+ * "For each node in the node-set to be filtered, the
+ * PredicateExpr is evaluated with that node as the
+ * context node, with the number of nodes in the
+ * node-set as the context size, and with the proximity
+ * position of the node in the node-set with respect to
+ * the axis as the context position;"
+ * @oldset is the node-set" to be filtered.
+ *
+ * SPEC XPath 1.0:
+ * "only predicates change the context position and
+ * context size (see [2.4 Predicates])."
+ * Example:
+ * node-set context pos
+ * nA 1
+ * nB 2
+ * nC 3
+ * After applying predicate [position() > 1] :
+ * node-set context pos
+ * nB 1
+ * nC 2
+ *
+ * removed the first node in the node-set, then
+ * the context position of the
+ */
+ for (i = 0; i < oldset->nodeNr; i++) {
+ /*
+ * Run the evaluation with a node list made of
+ * a single item in the nodeset.
+ */
+ ctxt->context->node = oldset->nodeTab[i];
+ if ((oldset->nodeTab[i]->type != XML_NAMESPACE_DECL) &&
+ (oldset->nodeTab[i]->doc != NULL))
+ ctxt->context->doc = oldset->nodeTab[i]->doc;
+ if (tmp == NULL) {
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ } else {
+ if (xmlXPathNodeSetAddUnique(tmp->nodesetval,
+ ctxt->context->node) < 0) {
+ ctxt->error = XPATH_MEMORY_ERROR;
+ }
+ }
+ valuePush(ctxt, tmp);
+ ctxt->context->contextSize = oldset->nodeNr;
+ ctxt->context->proximityPosition = i + 1;
+ /*
+ * Evaluate the predicate against the context node.
+ * Can/should we optimize position() predicates
+ * here (e.g. "[1]")?
+ */
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeNodeSet(newset);
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+
+ /*
+ * The result of the evaluation needs to be tested to
+ * decide whether the filter succeeded or not
+ */
+ /*
+ * OPTIMIZE TODO: Can we use
+ * xmlXPathNodeSetAdd*Unique()* instead?
+ */
+ res = valuePop(ctxt);
+ if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
+ if (xmlXPathNodeSetAdd(newset, oldset->nodeTab[i])
+ < 0)
+ ctxt->error = XPATH_MEMORY_ERROR;
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ valuePop(ctxt);
+ xmlXPathNodeSetClear(tmp->nodesetval, 1);
+ /*
+ * Don't free the temporary nodeset
+ * in order to avoid massive recreation inside this
+ * loop.
+ */
+ } else
+ tmp = NULL;
+ ctxt->context->node = NULL;
+ }
+ if (tmp != NULL)
+ xmlXPathReleaseObject(ctxt->context, tmp);
+ /*
+ * The result is used as the new evaluation set.
+ */
+ xmlXPathReleaseObject(ctxt->context, obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ /* may want to move this past the '}' later */
+ ctxt->context->doc = oldDoc;
+ valuePush(ctxt,
+ xmlXPathCacheWrapNodeSet(ctxt->context, newset));
+ }
+ ctxt->context->node = oldnode;
+ return (total);
+ }
+ case XPATH_OP_SORT:
+ if (op->ch1 != -1)
+ total += xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ CHECK_ERROR0;
+ if ((ctxt->value != NULL) &&
+ (ctxt->value->type == XPATH_NODESET) &&
+ (ctxt->value->nodesetval != NULL) &&
+ (ctxt->value->nodesetval->nodeNr > 1))
+ {
+ xmlXPathNodeSetSort(ctxt->value->nodesetval);
+ }
+ return (total);
+#ifdef LIBXML_XPTR_ENABLED
+ case XPATH_OP_RANGETO:{
+ xmlXPathObjectPtr range;
+ xmlXPathObjectPtr res, obj;
+ xmlXPathObjectPtr tmp;
+ xmlLocationSetPtr newlocset = NULL;
+ xmlLocationSetPtr oldlocset;
+ xmlNodeSetPtr oldset;
+ int i, j;
+
+ if (op->ch1 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
+ if (op->ch2 == -1)
+ return (total);
+
+ if (ctxt->value->type == XPATH_LOCATIONSET) {
+ /*
+ * Extract the old locset, and then evaluate the result of the
+ * expression for all the element in the locset. use it to grow
+ * up a new locset.
+ */
+ CHECK_TYPE0(XPATH_LOCATIONSET);
+ obj = valuePop(ctxt);
+ oldlocset = obj->user;
+
+ if ((oldlocset == NULL) || (oldlocset->locNr == 0)) {
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+ total += xmlXPathCompOpEval(ctxt,&comp->steps[op->ch2]);
+ res = valuePop(ctxt);
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ valuePush(ctxt, obj);
+ CHECK_ERROR0;
+ return (total);
+ }
+ newlocset = xmlXPtrLocationSetCreate(NULL);
+
+ for (i = 0; i < oldlocset->locNr; i++) {
+ /*
+ * Run the evaluation with a node list made of a
+ * single item in the nodelocset.
+ */
+ ctxt->context->node = oldlocset->locTab[i]->user;
+ ctxt->context->contextSize = oldlocset->locNr;
+ ctxt->context->proximityPosition = i + 1;
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ valuePush(ctxt, tmp);
+
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+
+ res = valuePop(ctxt);
+ if (res->type == XPATH_LOCATIONSET) {
+ xmlLocationSetPtr rloc =
+ (xmlLocationSetPtr)res->user;
+ for (j=0; j<rloc->locNr; j++) {
+ range = xmlXPtrNewRange(
+ oldlocset->locTab[i]->user,
+ oldlocset->locTab[i]->index,
+ rloc->locTab[j]->user2,
+ rloc->locTab[j]->index2);
+ if (range != NULL) {
+ xmlXPtrLocationSetAdd(newlocset, range);
+ }
+ }
+ } else {
+ range = xmlXPtrNewRangeNodeObject(
+ (xmlNodePtr)oldlocset->locTab[i]->user, res);
+ if (range != NULL) {
+ xmlXPtrLocationSetAdd(newlocset,range);
+ }
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ res = valuePop(ctxt);
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+
+ ctxt->context->node = NULL;
+ }
+ } else { /* Not a location set */
+ CHECK_TYPE0(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ oldset = obj->nodesetval;
+ ctxt->context->node = NULL;
+
+ newlocset = xmlXPtrLocationSetCreate(NULL);
+
+ if (oldset != NULL) {
+ for (i = 0; i < oldset->nodeNr; i++) {
+ /*
+ * Run the evaluation with a node list made of a single item
+ * in the nodeset.
+ */
+ ctxt->context->node = oldset->nodeTab[i];
+ /*
+ * OPTIMIZE TODO: Avoid recreation for every iteration.
+ */
+ tmp = xmlXPathCacheNewNodeSet(ctxt->context,
+ ctxt->context->node);
+ valuePush(ctxt, tmp);
+
+ if (op->ch2 != -1)
+ total +=
+ xmlXPathCompOpEval(ctxt,
+ &comp->steps[op->ch2]);
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(obj);
+ return(0);
+ }
+
+ res = valuePop(ctxt);
+ range =
+ xmlXPtrNewRangeNodeObject(oldset->nodeTab[i],
+ res);
+ if (range != NULL) {
+ xmlXPtrLocationSetAdd(newlocset, range);
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL) {
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+ if (ctxt->value == tmp) {
+ res = valuePop(ctxt);
+ xmlXPathReleaseObject(ctxt->context, res);
+ }
+
+ ctxt->context->node = NULL;
+ }
+ }
+ }
+
+ /*
+ * The result is used as the new evaluation set.
+ */
+ xmlXPathReleaseObject(ctxt->context, obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newlocset));
+ return (total);
+ }
+#endif /* LIBXML_XPTR_ENABLED */
+ }
+ xmlGenericError(xmlGenericErrorContext,
+ "XPath: unknown precompiled operation %d\n", op->op);
+ ctxt->error = XPATH_INVALID_OPERAND;
+ return (total);
+}
+
+/**
+ * xmlXPathCompOpEvalToBoolean:
+ * @ctxt: the XPath parser context
+ *
+ * Evaluates if the expression evaluates to true.
+ *
+ * Returns 1 if true, 0 if false and -1 on API or internal errors.
+ */
+static int
+xmlXPathCompOpEvalToBoolean(xmlXPathParserContextPtr ctxt,
+ xmlXPathStepOpPtr op,
+ int isPredicate)
+{
+ xmlXPathObjectPtr resObj = NULL;
+
+start:
+ /* comp = ctxt->comp; */
+ switch (op->op) {
+ case XPATH_OP_END:
+ return (0);
+ case XPATH_OP_VALUE:
+ resObj = (xmlXPathObjectPtr) op->value4;
+ if (isPredicate)
+ return(xmlXPathEvaluatePredicateResult(ctxt, resObj));
+ return(xmlXPathCastToBoolean(resObj));
+ case XPATH_OP_SORT:
+ /*
+ * We don't need sorting for boolean results. Skip this one.
+ */
+ if (op->ch1 != -1) {
+ op = &ctxt->comp->steps[op->ch1];
+ goto start;
+ }
+ return(0);
+ case XPATH_OP_COLLECT:
+ if (op->ch1 == -1)
+ return(0);
+
+ xmlXPathCompOpEval(ctxt, &ctxt->comp->steps[op->ch1]);
+ if (ctxt->error != XPATH_EXPRESSION_OK)
+ return(-1);
+
+ xmlXPathNodeCollectAndTest(ctxt, op, NULL, NULL, 1);
+ if (ctxt->error != XPATH_EXPRESSION_OK)
+ return(-1);
+
+ resObj = valuePop(ctxt);
+ if (resObj == NULL)
+ return(-1);
+ break;
+ default:
+ /*
+ * Fallback to call xmlXPathCompOpEval().
+ */
+ xmlXPathCompOpEval(ctxt, op);
+ if (ctxt->error != XPATH_EXPRESSION_OK)
+ return(-1);
+
+ resObj = valuePop(ctxt);
+ if (resObj == NULL)
+ return(-1);
+ break;
+ }
+
+ if (resObj) {
+ int res;
+
+ if (resObj->type == XPATH_BOOLEAN) {
+ res = resObj->boolval;
+ } else if (isPredicate) {
+ /*
+ * For predicates a result of type "number" is handled
+ * differently:
+ * SPEC XPath 1.0:
+ * "If the result is a number, the result will be converted
+ * to true if the number is equal to the context position
+ * and will be converted to false otherwise;"
+ */
+ res = xmlXPathEvaluatePredicateResult(ctxt, resObj);
+ } else {
+ res = xmlXPathCastToBoolean(resObj);
+ }
+ xmlXPathReleaseObject(ctxt->context, resObj);
+ return(res);
+ }
+
+ return(0);
+}
+
+#ifdef XPATH_STREAMING
+/**
+ * xmlXPathRunStreamEval:
+ * @ctxt: the XPath parser context with the compiled expression
+ *
+ * Evaluate the Precompiled Streamable XPath expression in the given context.
+ */
+static int
+xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp,
+ xmlXPathObjectPtr *resultSeq, int toBool)
+{
+ int max_depth, min_depth;
+ int from_root;
+ int ret, depth;
+ int eval_all_nodes;
+ xmlNodePtr cur = NULL, limit = NULL;
+ xmlStreamCtxtPtr patstream = NULL;
+
+ int nb_nodes = 0;
+
+ if ((ctxt == NULL) || (comp == NULL))
+ return(-1);
+ max_depth = xmlPatternMaxDepth(comp);
+ if (max_depth == -1)
+ return(-1);
+ if (max_depth == -2)
+ max_depth = 10000;
+ min_depth = xmlPatternMinDepth(comp);
+ if (min_depth == -1)
+ return(-1);
+ from_root = xmlPatternFromRoot(comp);
+ if (from_root < 0)
+ return(-1);
+#if 0
+ printf("stream eval: depth %d from root %d\n", max_depth, from_root);
+#endif
+
+ if (! toBool) {
+ if (resultSeq == NULL)
+ return(-1);
+ *resultSeq = xmlXPathCacheNewNodeSet(ctxt, NULL);
+ if (*resultSeq == NULL)
+ return(-1);
+ }
+
+ /*
+ * handle the special cases of "/" amd "." being matched
+ */
+ if (min_depth == 0) {
+ if (from_root) {
+ /* Select "/" */
+ if (toBool)
+ return(1);
+ xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval,
+ (xmlNodePtr) ctxt->doc);
+ } else {
+ /* Select "self::node()" */
+ if (toBool)
+ return(1);
+ xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval, ctxt->node);
+ }
+ }
+ if (max_depth == 0) {
+ return(0);
+ }
+
+ if (from_root) {
+ cur = (xmlNodePtr)ctxt->doc;
+ } else if (ctxt->node != NULL) {
+ switch (ctxt->node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ cur = ctxt->node;
+ break;
+ case XML_ATTRIBUTE_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ case XML_NAMESPACE_DECL:
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ break;
+ }
+ limit = cur;
+ }
+ if (cur == NULL) {
+ return(0);
+ }
+
+ patstream = xmlPatternGetStreamCtxt(comp);
+ if (patstream == NULL) {
+ /*
+ * QUESTION TODO: Is this an error?
+ */
+ return(0);
+ }
+
+ eval_all_nodes = xmlStreamWantsAnyNode(patstream);
+
+ if (from_root) {
+ ret = xmlStreamPush(patstream, NULL, NULL);
+ if (ret < 0) {
+ } else if (ret == 1) {
+ if (toBool)
+ goto return_1;
+ xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval, cur);
+ }
+ }
+ depth = 0;
+ goto scan_children;
+next_node:
+ do {
+ nb_nodes++;
+
+ switch (cur->type) {
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_COMMENT_NODE:
+ case XML_PI_NODE:
+ if (cur->type == XML_ELEMENT_NODE) {
+ ret = xmlStreamPush(patstream, cur->name,
+ (cur->ns ? cur->ns->href : NULL));
+ } else if (eval_all_nodes)
+ ret = xmlStreamPushNode(patstream, NULL, NULL, cur->type);
+ else
+ break;
+
+ if (ret < 0) {
+ /* NOP. */
+ } else if (ret == 1) {
+ if (toBool)
+ goto return_1;
+ if (xmlXPathNodeSetAddUnique((*resultSeq)->nodesetval, cur)
+ < 0) {
+ ctxt->lastError.domain = XML_FROM_XPATH;
+ ctxt->lastError.code = XML_ERR_NO_MEMORY;
+ }
+ }
+ if ((cur->children == NULL) || (depth >= max_depth)) {
+ ret = xmlStreamPop(patstream);
+ while (cur->next != NULL) {
+ cur = cur->next;
+ if ((cur->type != XML_ENTITY_DECL) &&
+ (cur->type != XML_DTD_NODE))
+ goto next_node;
+ }
+ }
+ default:
+ break;
+ }
+
+scan_children:
+ if (cur->type == XML_NAMESPACE_DECL) break;
+ if ((cur->children != NULL) && (depth < max_depth)) {
+ /*
+ * Do not descend on entities declarations
+ */
+ if (cur->children->type != XML_ENTITY_DECL) {
+ cur = cur->children;
+ depth++;
+ /*
+ * Skip DTDs
+ */
+ if (cur->type != XML_DTD_NODE)
+ continue;
+ }
+ }
+
+ if (cur == limit)
+ break;
+
+ while (cur->next != NULL) {
+ cur = cur->next;
+ if ((cur->type != XML_ENTITY_DECL) &&
+ (cur->type != XML_DTD_NODE))
+ goto next_node;
+ }
+
+ do {
+ cur = cur->parent;
+ depth--;
+ if ((cur == NULL) || (cur == limit))
+ goto done;
+ if (cur->type == XML_ELEMENT_NODE) {
+ ret = xmlStreamPop(patstream);
+ } else if ((eval_all_nodes) &&
+ ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE) ||
+ (cur->type == XML_COMMENT_NODE) ||
+ (cur->type == XML_PI_NODE)))
+ {
+ ret = xmlStreamPop(patstream);
+ }
+ if (cur->next != NULL) {
+ cur = cur->next;
+ break;
+ }
+ } while (cur != NULL);
+
+ } while ((cur != NULL) && (depth >= 0));
+
+done:
+
+#if 0
+ printf("stream eval: checked %d nodes selected %d\n",
+ nb_nodes, retObj->nodesetval->nodeNr);
+#endif
+
+ if (patstream)
+ xmlFreeStreamCtxt(patstream);
+ return(0);
+
+return_1:
+ if (patstream)
+ xmlFreeStreamCtxt(patstream);
+ return(1);
+}
+#endif /* XPATH_STREAMING */
+
+/**
+ * xmlXPathRunEval:
+ * @ctxt: the XPath parser context with the compiled expression
+ * @toBool: evaluate to a boolean result
+ *
+ * Evaluate the Precompiled XPath expression in the given context.
+ */
+static int
+xmlXPathRunEval(xmlXPathParserContextPtr ctxt, int toBool)
+{
+ xmlXPathCompExprPtr comp;
+
+ if ((ctxt == NULL) || (ctxt->comp == NULL))
+ return(-1);
+
+ if (ctxt->valueTab == NULL) {
+ /* Allocate the value stack */
+ ctxt->valueTab = (xmlXPathObjectPtr *)
+ xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
+ if (ctxt->valueTab == NULL) {
+ xmlXPathPErrMemory(ctxt, "creating evaluation context\n");
+ xmlFree(ctxt);
+ }
+ ctxt->valueNr = 0;
+ ctxt->valueMax = 10;
+ ctxt->value = NULL;
+ ctxt->valueFrame = 0;
+ }
+#ifdef XPATH_STREAMING
+ if (ctxt->comp->stream) {
+ int res;
+
+ if (toBool) {
+ /*
+ * Evaluation to boolean result.
+ */
+ res = xmlXPathRunStreamEval(ctxt->context,
+ ctxt->comp->stream, NULL, 1);
+ if (res != -1)
+ return(res);
+ } else {
+ xmlXPathObjectPtr resObj = NULL;
+
+ /*
+ * Evaluation to a sequence.
+ */
+ res = xmlXPathRunStreamEval(ctxt->context,
+ ctxt->comp->stream, &resObj, 0);
+
+ if ((res != -1) && (resObj != NULL)) {
+ valuePush(ctxt, resObj);
+ return(0);
+ }
+ if (resObj != NULL)
+ xmlXPathReleaseObject(ctxt->context, resObj);
+ }
+ /*
+ * QUESTION TODO: This falls back to normal XPath evaluation
+ * if res == -1. Is this intended?
+ */
+ }
+#endif
+ comp = ctxt->comp;
+ if (comp->last < 0) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathRunEval: last is less than zero\n");
+ return(-1);
+ }
+ if (toBool)
+ return(xmlXPathCompOpEvalToBoolean(ctxt,
+ &comp->steps[comp->last], 0));
+ else
+ xmlXPathCompOpEval(ctxt, &comp->steps[comp->last]);
+
+ return(0);
+}
+
+/************************************************************************
+ * *
+ * Public interfaces *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPathEvalPredicate:
+ * @ctxt: the XPath context
+ * @res: the Predicate Expression evaluation result
+ *
+ * Evaluate a predicate result for the current node.
+ * A PredicateExpr is evaluated by evaluating the Expr and converting
+ * the result to a boolean. If the result is a number, the result will
+ * be converted to true if the number is equal to the position of the
+ * context node in the context node list (as returned by the position
+ * function) and will be converted to false otherwise; if the result
+ * is not a number, then the result will be converted as if by a call
+ * to the boolean function.
+ *
+ * Returns 1 if predicate is true, 0 otherwise
+ */
+int
+xmlXPathEvalPredicate(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res) {
+ if ((ctxt == NULL) || (res == NULL)) return(0);
+ switch (res->type) {
+ case XPATH_BOOLEAN:
+ return(res->boolval);
+ case XPATH_NUMBER:
+ return(res->floatval == ctxt->proximityPosition);
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ if (res->nodesetval == NULL)
+ return(0);
+ return(res->nodesetval->nodeNr != 0);
+ case XPATH_STRING:
+ return((res->stringval != NULL) &&
+ (xmlStrlen(res->stringval) != 0));
+ default:
+ STRANGE
+ }
+ return(0);
+}
+
+/**
+ * xmlXPathEvaluatePredicateResult:
+ * @ctxt: the XPath Parser context
+ * @res: the Predicate Expression evaluation result
+ *
+ * Evaluate a predicate result for the current node.
+ * A PredicateExpr is evaluated by evaluating the Expr and converting
+ * the result to a boolean. If the result is a number, the result will
+ * be converted to true if the number is equal to the position of the
+ * context node in the context node list (as returned by the position
+ * function) and will be converted to false otherwise; if the result
+ * is not a number, then the result will be converted as if by a call
+ * to the boolean function.
+ *
+ * Returns 1 if predicate is true, 0 otherwise
+ */
+int
+xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr res) {
+ if ((ctxt == NULL) || (res == NULL)) return(0);
+ switch (res->type) {
+ case XPATH_BOOLEAN:
+ return(res->boolval);
+ case XPATH_NUMBER:
+#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER == 1200))
+ return((res->floatval == ctxt->context->proximityPosition) &&
+ (!xmlXPathIsNaN(res->floatval))); /* MSC pbm Mark Vakoc !*/
+#else
+ return(res->floatval == ctxt->context->proximityPosition);
+#endif
+ case XPATH_NODESET:
+ case XPATH_XSLT_TREE:
+ if (res->nodesetval == NULL)
+ return(0);
+ return(res->nodesetval->nodeNr != 0);
+ case XPATH_STRING:
+ return((res->stringval != NULL) && (res->stringval[0] != 0));
+#ifdef LIBXML_XPTR_ENABLED
+ case XPATH_LOCATIONSET:{
+ xmlLocationSetPtr ptr = res->user;
+ if (ptr == NULL)
+ return(0);
+ return (ptr->locNr != 0);
+ }
+#endif
+ default:
+ STRANGE
+ }
+ return(0);
+}
+
+#ifdef XPATH_STREAMING
+/**
+ * xmlXPathTryStreamCompile:
+ * @ctxt: an XPath context
+ * @str: the XPath expression
+ *
+ * Try to compile the XPath expression as a streamable subset.
+ *
+ * Returns the compiled expression or NULL if failed to compile.
+ */
+static xmlXPathCompExprPtr
+xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
+ /*
+ * Optimization: use streaming patterns when the XPath expression can
+ * be compiled to a stream lookup
+ */
+ xmlPatternPtr stream;
+ xmlXPathCompExprPtr comp;
+ xmlDictPtr dict = NULL;
+ const xmlChar **namespaces = NULL;
+ xmlNsPtr ns;
+ int i, j;
+
+ if ((!xmlStrchr(str, '[')) && (!xmlStrchr(str, '(')) &&
+ (!xmlStrchr(str, '@'))) {
+ const xmlChar *tmp;
+
+ /*
+ * We don't try to handle expressions using the verbose axis
+ * specifiers ("::"), just the simplied form at this point.
+ * Additionally, if there is no list of namespaces available and
+ * there's a ":" in the expression, indicating a prefixed QName,
+ * then we won't try to compile either. xmlPatterncompile() needs
+ * to have a list of namespaces at compilation time in order to
+ * compile prefixed name tests.
+ */
+ tmp = xmlStrchr(str, ':');
+ if ((tmp != NULL) &&
+ ((ctxt == NULL) || (ctxt->nsNr == 0) || (tmp[1] == ':')))
+ return(NULL);
+
+ if (ctxt != NULL) {
+ dict = ctxt->dict;
+ if (ctxt->nsNr > 0) {
+ namespaces = xmlMalloc(2 * (ctxt->nsNr + 1) * sizeof(xmlChar*));
+ if (namespaces == NULL) {
+ xmlXPathErrMemory(ctxt, "allocating namespaces array\n");
+ return(NULL);
+ }
+ for (i = 0, j = 0; (j < ctxt->nsNr); j++) {
+ ns = ctxt->namespaces[j];
+ namespaces[i++] = ns->href;
+ namespaces[i++] = ns->prefix;
+ }
+ namespaces[i++] = NULL;
+ namespaces[i] = NULL;
+ }
+ }
+
+ stream = xmlPatterncompile(str, dict, XML_PATTERN_XPATH,
+ &namespaces[0]);
+ if (namespaces != NULL) {
+ xmlFree((xmlChar **)namespaces);
+ }
+ if ((stream != NULL) && (xmlPatternStreamable(stream) == 1)) {
+ comp = xmlXPathNewCompExpr();
+ if (comp == NULL) {
+ xmlXPathErrMemory(ctxt, "allocating streamable expression\n");
+ return(NULL);
+ }
+ comp->stream = stream;
+ comp->dict = dict;
+ if (comp->dict)
+ xmlDictReference(comp->dict);
+ return(comp);
+ }
+ xmlFreePattern(stream);
+ }
+ return(NULL);
+}
+#endif /* XPATH_STREAMING */
+
+static void
+xmlXPathOptimizeExpression(xmlXPathCompExprPtr comp, xmlXPathStepOpPtr op)
+{
+ /*
+ * Try to rewrite "descendant-or-self::node()/foo" to an optimized
+ * internal representation.
+ */
+
+ if ((op->op == XPATH_OP_COLLECT /* 11 */) &&
+ (op->ch1 != -1) &&
+ (op->ch2 == -1 /* no predicate */))
+ {
+ xmlXPathStepOpPtr prevop = &comp->steps[op->ch1];
+
+ if ((prevop->op == XPATH_OP_COLLECT /* 11 */) &&
+ ((xmlXPathAxisVal) prevop->value ==
+ AXIS_DESCENDANT_OR_SELF) &&
+ (prevop->ch2 == -1) &&
+ ((xmlXPathTestVal) prevop->value2 == NODE_TEST_TYPE) &&
+ ((xmlXPathTypeVal) prevop->value3 == NODE_TYPE_NODE))
+ {
+ /*
+ * This is a "descendant-or-self::node()" without predicates.
+ * Try to eliminate it.
+ */
+
+ switch ((xmlXPathAxisVal) op->value) {
+ case AXIS_CHILD:
+ case AXIS_DESCENDANT:
+ /*
+ * Convert "descendant-or-self::node()/child::" or
+ * "descendant-or-self::node()/descendant::" to
+ * "descendant::"
+ */
+ op->ch1 = prevop->ch1;
+ op->value = AXIS_DESCENDANT;
+ break;
+ case AXIS_SELF:
+ case AXIS_DESCENDANT_OR_SELF:
+ /*
+ * Convert "descendant-or-self::node()/self::" or
+ * "descendant-or-self::node()/descendant-or-self::" to
+ * to "descendant-or-self::"
+ */
+ op->ch1 = prevop->ch1;
+ op->value = AXIS_DESCENDANT_OR_SELF;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ /* Recurse */
+ if (op->ch1 != -1)
+ xmlXPathOptimizeExpression(comp, &comp->steps[op->ch1]);
+ if (op->ch2 != -1)
+ xmlXPathOptimizeExpression(comp, &comp->steps[op->ch2]);
+}
+
+/**
+ * xmlXPathCtxtCompile:
+ * @ctxt: an XPath context
+ * @str: the XPath expression
+ *
+ * Compile an XPath expression
+ *
+ * Returns the xmlXPathCompExprPtr resulting from the compilation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathCompExprPtr
+xmlXPathCtxtCompile(xmlXPathContextPtr ctxt, const xmlChar *str) {
+ xmlXPathParserContextPtr pctxt;
+ xmlXPathCompExprPtr comp;
+
+#ifdef XPATH_STREAMING
+ comp = xmlXPathTryStreamCompile(ctxt, str);
+ if (comp != NULL)
+ return(comp);
+#endif
+
+ xmlXPathInit();
+
+ pctxt = xmlXPathNewParserContext(str, ctxt);
+ if (pctxt == NULL)
+ return NULL;
+ xmlXPathCompileExpr(pctxt, 1);
+
+ if( pctxt->error != XPATH_EXPRESSION_OK )
+ {
+ xmlXPathFreeParserContext(pctxt);
+ return(NULL);
+ }
+
+ if (*pctxt->cur != 0) {
+ /*
+ * aleksey: in some cases this line prints *second* error message
+ * (see bug #78858) and probably this should be fixed.
+ * However, we are not sure that all error messages are printed
+ * out in other places. It's not critical so we leave it as-is for now
+ */
+ xmlXPatherror(pctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
+ comp = NULL;
+ } else {
+ comp = pctxt->comp;
+ pctxt->comp = NULL;
+ }
+ xmlXPathFreeParserContext(pctxt);
+
+ if (comp != NULL) {
+ comp->expr = xmlStrdup(str);
+#ifdef DEBUG_EVAL_COUNTS
+ comp->string = xmlStrdup(str);
+ comp->nb = 0;
+#endif
+ if ((comp->nbStep > 1) && (comp->last >= 0)) {
+ xmlXPathOptimizeExpression(comp, &comp->steps[comp->last]);
+ }
+ }
+ return(comp);
+}
+
+/**
+ * xmlXPathCompile:
+ * @str: the XPath expression
+ *
+ * Compile an XPath expression
+ *
+ * Returns the xmlXPathCompExprPtr resulting from the compilation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathCompExprPtr
+xmlXPathCompile(const xmlChar *str) {
+ return(xmlXPathCtxtCompile(NULL, str));
+}
+
+/**
+ * xmlXPathCompiledEvalInternal:
+ * @comp: the compiled XPath expression
+ * @ctxt: the XPath context
+ * @resObj: the resulting XPath object or NULL
+ * @toBool: 1 if only a boolean result is requested
+ *
+ * Evaluate the Precompiled XPath expression in the given context.
+ * The caller has to free @resObj.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+static int
+xmlXPathCompiledEvalInternal(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt,
+ xmlXPathObjectPtr *resObj,
+ int toBool)
+{
+ xmlXPathParserContextPtr pctxt;
+#ifndef LIBXML_THREAD_ENABLED
+ static int reentance = 0;
+#endif
+ int res;
+
+ CHECK_CTXT_NEG(ctxt)
+
+ if (comp == NULL)
+ return(-1);
+ xmlXPathInit();
+
+#ifndef LIBXML_THREAD_ENABLED
+ reentance++;
+ if (reentance > 1)
+ xmlXPathDisableOptimizer = 1;
+#endif
+
+#ifdef DEBUG_EVAL_COUNTS
+ comp->nb++;
+ if ((comp->string != NULL) && (comp->nb > 100)) {
+ fprintf(stderr, "100 x %s\n", comp->string);
+ comp->nb = 0;
+ }
+#endif
+ pctxt = xmlXPathCompParserContext(comp, ctxt);
+ res = xmlXPathRunEval(pctxt, toBool);
+
+ if (resObj) {
+ if (pctxt->value == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompiledEval: evaluation failed\n");
+ *resObj = NULL;
+ } else {
+ *resObj = valuePop(pctxt);
+ }
+ }
+
+ /*
+ * Pop all remaining objects from the stack.
+ */
+ if (pctxt->valueNr > 0) {
+ xmlXPathObjectPtr tmp;
+ int stack = 0;
+
+ do {
+ tmp = valuePop(pctxt);
+ if (tmp != NULL) {
+ stack++;
+ xmlXPathReleaseObject(ctxt, tmp);
+ }
+ } while (tmp != NULL);
+ if ((stack != 0) &&
+ ((toBool) || ((resObj) && (*resObj))))
+ {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathCompiledEval: %d objects left on the stack.\n",
+ stack);
+ }
+ }
+
+ if ((pctxt->error != XPATH_EXPRESSION_OK) && (resObj) && (*resObj)) {
+ xmlXPathFreeObject(*resObj);
+ *resObj = NULL;
+ }
+ pctxt->comp = NULL;
+ xmlXPathFreeParserContext(pctxt);
+#ifndef LIBXML_THREAD_ENABLED
+ reentance--;
+#endif
+
+ return(res);
+}
+
+/**
+ * xmlXPathCompiledEval:
+ * @comp: the compiled XPath expression
+ * @ctx: the XPath context
+ *
+ * Evaluate the Precompiled XPath expression in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx)
+{
+ xmlXPathObjectPtr res = NULL;
+
+ xmlXPathCompiledEvalInternal(comp, ctx, &res, 0);
+ return(res);
+}
+
+/**
+ * xmlXPathCompiledEvalToBoolean:
+ * @comp: the compiled XPath expression
+ * @ctxt: the XPath context
+ *
+ * Applies the XPath boolean() function on the result of the given
+ * compiled expression.
+ *
+ * Returns 1 if the expression evaluated to true, 0 if to false and
+ * -1 in API and internal errors.
+ */
+int
+xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt)
+{
+ return(xmlXPathCompiledEvalInternal(comp, ctxt, NULL, 1));
+}
+
+/**
+ * xmlXPathEvalExpr:
+ * @ctxt: the XPath Parser context
+ *
+ * Parse and evaluate an XPath expression in the given context,
+ * then push the result on the context stack
+ */
+void
+xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) {
+#ifdef XPATH_STREAMING
+ xmlXPathCompExprPtr comp;
+#endif
+
+ if (ctxt == NULL) return;
+
+#ifdef XPATH_STREAMING
+ comp = xmlXPathTryStreamCompile(ctxt->context, ctxt->base);
+ if (comp != NULL) {
+ if (ctxt->comp != NULL)
+ xmlXPathFreeCompExpr(ctxt->comp);
+ ctxt->comp = comp;
+ if (ctxt->cur != NULL)
+ while (*ctxt->cur != 0) ctxt->cur++;
+ } else
+#endif
+ {
+ xmlXPathCompileExpr(ctxt, 1);
+ if ((ctxt->error == XPATH_EXPRESSION_OK) &&
+ (ctxt->comp != NULL) &&
+ (ctxt->comp->nbStep > 1) &&
+ (ctxt->comp->last >= 0))
+ {
+ xmlXPathOptimizeExpression(ctxt->comp,
+ &ctxt->comp->steps[ctxt->comp->last]);
+ }
+ }
+ CHECK_ERROR;
+ xmlXPathRunEval(ctxt, 0);
+}
+
+/**
+ * xmlXPathEval:
+ * @str: the XPath expression
+ * @ctx: the XPath context
+ *
+ * Evaluate the XPath Location Path in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) {
+ xmlXPathParserContextPtr ctxt;
+ xmlXPathObjectPtr res, tmp, init = NULL;
+ int stack = 0;
+
+ CHECK_CTXT(ctx)
+
+ xmlXPathInit();
+
+ ctxt = xmlXPathNewParserContext(str, ctx);
+ if (ctxt == NULL)
+ return NULL;
+ xmlXPathEvalExpr(ctxt);
+
+ if (ctxt->value == NULL) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathEval: evaluation failed\n");
+ res = NULL;
+ } else if ((*ctxt->cur != 0) && (ctxt->comp != NULL)
+#ifdef XPATH_STREAMING
+ && (ctxt->comp->stream == NULL)
+#endif
+ ) {
+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
+ res = NULL;
+ } else {
+ res = valuePop(ctxt);
+ }
+
+ do {
+ tmp = valuePop(ctxt);
+ if (tmp != NULL) {
+ if (tmp != init)
+ stack++;
+ xmlXPathReleaseObject(ctx, tmp);
+ }
+ } while (tmp != NULL);
+ if ((stack != 0) && (res != NULL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathEval: %d object left on the stack\n",
+ stack);
+ }
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(res);
+ res = NULL;
+ }
+
+ xmlXPathFreeParserContext(ctxt);
+ return(res);
+}
+
+/**
+ * xmlXPathSetContextNode:
+ * @node: the node to to use as the context node
+ * @ctx: the XPath context
+ *
+ * Sets 'node' as the context node. The node must be in the same
+ * document as that associated with the context.
+ *
+ * Returns -1 in case of error or 0 if successful
+ */
+int
+xmlXPathSetContextNode(xmlNodePtr node, xmlXPathContextPtr ctx) {
+ if ((node == NULL) || (ctx == NULL))
+ return(-1);
+
+ if (node->doc == ctx->doc) {
+ ctx->node = node;
+ return(0);
+ }
+ return(-1);
+}
+
+/**
+ * xmlXPathNodeEval:
+ * @node: the node to to use as the context node
+ * @str: the XPath expression
+ * @ctx: the XPath context
+ *
+ * Evaluate the XPath Location Path in the given context. The node 'node'
+ * is set as the context node. The context node is not restored.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathNodeEval(xmlNodePtr node, const xmlChar *str, xmlXPathContextPtr ctx) {
+ if (str == NULL)
+ return(NULL);
+ if (xmlXPathSetContextNode(node, ctx) < 0)
+ return(NULL);
+ return(xmlXPathEval(str, ctx));
+}
+
+/**
+ * xmlXPathEvalExpression:
+ * @str: the XPath expression
+ * @ctxt: the XPath context
+ *
+ * Evaluate the XPath expression in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPathEvalExpression(const xmlChar *str, xmlXPathContextPtr ctxt) {
+ xmlXPathParserContextPtr pctxt;
+ xmlXPathObjectPtr res, tmp;
+ int stack = 0;
+
+ CHECK_CTXT(ctxt)
+
+ xmlXPathInit();
+
+ pctxt = xmlXPathNewParserContext(str, ctxt);
+ if (pctxt == NULL)
+ return NULL;
+ xmlXPathEvalExpr(pctxt);
+
+ if ((*pctxt->cur != 0) || (pctxt->error != XPATH_EXPRESSION_OK)) {
+ xmlXPatherror(pctxt, __FILE__, __LINE__, XPATH_EXPR_ERROR);
+ res = NULL;
+ } else {
+ res = valuePop(pctxt);
+ }
+ do {
+ tmp = valuePop(pctxt);
+ if (tmp != NULL) {
+ xmlXPathReleaseObject(ctxt, tmp);
+ stack++;
+ }
+ } while (tmp != NULL);
+ if ((stack != 0) && (res != NULL)) {
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPathEvalExpression: %d object left on the stack\n",
+ stack);
+ }
+ xmlXPathFreeParserContext(pctxt);
+ return(res);
+}
+
+/************************************************************************
+ * *
+ * Extra functions not pertaining to the XPath spec *
+ * *
+ ************************************************************************/
+/**
+ * xmlXPathEscapeUriFunction:
+ * @ctxt: the XPath Parser context
+ * @nargs: the number of arguments
+ *
+ * Implement the escape-uri() XPath function
+ * string escape-uri(string $str, bool $escape-reserved)
+ *
+ * This function applies the URI escaping rules defined in section 2 of [RFC
+ * 2396] to the string supplied as $uri-part, which typically represents all
+ * or part of a URI. The effect of the function is to replace any special
+ * character in the string by an escape sequence of the form %xx%yy...,
+ * where xxyy... is the hexadecimal representation of the octets used to
+ * represent the character in UTF-8.
+ *
+ * The set of characters that are escaped depends on the setting of the
+ * boolean argument $escape-reserved.
+ *
+ * If $escape-reserved is true, all characters are escaped other than lower
+ * case letters a-z, upper case letters A-Z, digits 0-9, and the characters
+ * referred to in [RFC 2396] as "marks": specifically, "-" | "_" | "." | "!"
+ * | "~" | "*" | "'" | "(" | ")". The "%" character itself is escaped only
+ * if it is not followed by two hexadecimal digits (that is, 0-9, a-f, and
+ * A-F).
+ *
+ * If $escape-reserved is false, the behavior differs in that characters
+ * referred to in [RFC 2396] as reserved characters are not escaped. These
+ * characters are ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ",".
+ *
+ * [RFC 2396] does not define whether escaped URIs should use lower case or
+ * upper case for hexadecimal digits. To ensure that escaped URIs can be
+ * compared using string comparison functions, this function must always use
+ * the upper-case letters A-F.
+ *
+ * Generally, $escape-reserved should be set to true when escaping a string
+ * that is to form a single part of a URI, and to false when escaping an
+ * entire URI or URI reference.
+ *
+ * In the case of non-ascii characters, the string is encoded according to
+ * utf-8 and then converted according to RFC 2396.
+ *
+ * Examples
+ * xf:escape-uri ("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles#ocean"), true())
+ * returns "gopher%3A%2F%2Fspinaltap.micro.umn.edu%2F00%2FWeather%2FCalifornia%2FLos%20Angeles%23ocean"
+ * xf:escape-uri ("gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles#ocean"), false())
+ * returns "gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles%23ocean"
+ *
+ */
+static void
+xmlXPathEscapeUriFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr str;
+ int escape_reserved;
+ xmlBufPtr target;
+ xmlChar *cptr;
+ xmlChar escape[4];
+
+ CHECK_ARITY(2);
+
+ escape_reserved = xmlXPathPopBoolean(ctxt);
+
+ CAST_TO_STRING;
+ str = valuePop(ctxt);
+
+ target = xmlBufCreate();
+
+ escape[0] = '%';
+ escape[3] = 0;
+
+ if (target) {
+ for (cptr = str->stringval; *cptr; cptr++) {
+ if ((*cptr >= 'A' && *cptr <= 'Z') ||
+ (*cptr >= 'a' && *cptr <= 'z') ||
+ (*cptr >= '0' && *cptr <= '9') ||
+ *cptr == '-' || *cptr == '_' || *cptr == '.' ||
+ *cptr == '!' || *cptr == '~' || *cptr == '*' ||
+ *cptr == '\''|| *cptr == '(' || *cptr == ')' ||
+ (*cptr == '%' &&
+ ((cptr[1] >= 'A' && cptr[1] <= 'F') ||
+ (cptr[1] >= 'a' && cptr[1] <= 'f') ||
+ (cptr[1] >= '0' && cptr[1] <= '9')) &&
+ ((cptr[2] >= 'A' && cptr[2] <= 'F') ||
+ (cptr[2] >= 'a' && cptr[2] <= 'f') ||
+ (cptr[2] >= '0' && cptr[2] <= '9'))) ||
+ (!escape_reserved &&
+ (*cptr == ';' || *cptr == '/' || *cptr == '?' ||
+ *cptr == ':' || *cptr == '@' || *cptr == '&' ||
+ *cptr == '=' || *cptr == '+' || *cptr == '$' ||
+ *cptr == ','))) {
+ xmlBufAdd(target, cptr, 1);
+ } else {
+ if ((*cptr >> 4) < 10)
+ escape[1] = '0' + (*cptr >> 4);
+ else
+ escape[1] = 'A' - 10 + (*cptr >> 4);
+ if ((*cptr & 0xF) < 10)
+ escape[2] = '0' + (*cptr & 0xF);
+ else
+ escape[2] = 'A' - 10 + (*cptr & 0xF);
+
+ xmlBufAdd(target, &escape[0], 3);
+ }
+ }
+ }
+ valuePush(ctxt, xmlXPathCacheNewString(ctxt->context,
+ xmlBufContent(target)));
+ xmlBufFree(target);
+ xmlXPathReleaseObject(ctxt->context, str);
+}
+
+/**
+ * xmlXPathRegisterAllFunctions:
+ * @ctxt: the XPath context
+ *
+ * Registers all default XPath functions in this context
+ */
+void
+xmlXPathRegisterAllFunctions(xmlXPathContextPtr ctxt)
+{
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"boolean",
+ xmlXPathBooleanFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"ceiling",
+ xmlXPathCeilingFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"count",
+ xmlXPathCountFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"concat",
+ xmlXPathConcatFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"contains",
+ xmlXPathContainsFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"id",
+ xmlXPathIdFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"false",
+ xmlXPathFalseFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"floor",
+ xmlXPathFloorFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"last",
+ xmlXPathLastFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"lang",
+ xmlXPathLangFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"local-name",
+ xmlXPathLocalNameFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"not",
+ xmlXPathNotFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"name",
+ xmlXPathNameFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"namespace-uri",
+ xmlXPathNamespaceURIFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"normalize-space",
+ xmlXPathNormalizeFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"number",
+ xmlXPathNumberFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"position",
+ xmlXPathPositionFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"round",
+ xmlXPathRoundFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"string",
+ xmlXPathStringFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"string-length",
+ xmlXPathStringLengthFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"starts-with",
+ xmlXPathStartsWithFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring",
+ xmlXPathSubstringFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring-before",
+ xmlXPathSubstringBeforeFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"substring-after",
+ xmlXPathSubstringAfterFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"sum",
+ xmlXPathSumFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"true",
+ xmlXPathTrueFunction);
+ xmlXPathRegisterFunc(ctxt, (const xmlChar *)"translate",
+ xmlXPathTranslateFunction);
+
+ xmlXPathRegisterFuncNS(ctxt, (const xmlChar *)"escape-uri",
+ (const xmlChar *)"http://www.w3.org/2002/08/xquery-functions",
+ xmlXPathEscapeUriFunction);
+}
+
+#endif /* LIBXML_XPATH_ENABLED */
+#define bottom_xpath
+#include "elfgcchack.h"
diff --git a/xpointer.c b/xpointer.c
new file mode 100644
index 0000000..4b4ac2e
--- /dev/null
+++ b/xpointer.c
@@ -0,0 +1,3031 @@
+/*
+ * xpointer.c : Code to handle XML Pointer
+ *
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#define IN_LIBXML
+#include "libxml.h"
+
+/*
+ * TODO: better handling of error cases, the full expression should
+ * be parsed beforehand instead of a progressive evaluation
+ * TODO: Access into entities references are not supported now ...
+ * need a start to be able to pop out of entities refs since
+ * parent is the endity declaration, not the ref.
+ */
+
+#include <string.h>
+#include <libxml/xpointer.h>
+#include <libxml/xmlmemory.h>
+#include <libxml/parserInternals.h>
+#include <libxml/uri.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/xmlerror.h>
+#include <libxml/globals.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+/* Add support of the xmlns() xpointer scheme to initialize the namespaces */
+#define XPTR_XMLNS_SCHEME
+
+/* #define DEBUG_RANGES */
+#ifdef DEBUG_RANGES
+#ifdef LIBXML_DEBUG_ENABLED
+#include <libxml/debugXML.h>
+#endif
+#endif
+
+#define TODO \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+#define STRANGE \
+ xmlGenericError(xmlGenericErrorContext, \
+ "Internal error at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/************************************************************************
+ * *
+ * Some factorized error routines *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPtrErrMemory:
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlXPtrErrMemory(const char *extra)
+{
+ __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_XPOINTER,
+ XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, extra,
+ NULL, NULL, 0, 0,
+ "Memory allocation failed : %s\n", extra);
+}
+
+/**
+ * xmlXPtrErr:
+ * @ctxt: an XPTR evaluation context
+ * @extra: extra informations
+ *
+ * Handle a redefinition of attribute error
+ */
+static void
+xmlXPtrErr(xmlXPathParserContextPtr ctxt, int error,
+ const char * msg, const xmlChar *extra)
+{
+ if (ctxt != NULL)
+ ctxt->error = error;
+ if ((ctxt == NULL) || (ctxt->context == NULL)) {
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, NULL, XML_FROM_XPOINTER, error,
+ XML_ERR_ERROR, NULL, 0,
+ (const char *) extra, NULL, NULL, 0, 0,
+ msg, extra);
+ return;
+ }
+ ctxt->context->lastError.domain = XML_FROM_XPOINTER;
+ ctxt->context->lastError.code = error;
+ ctxt->context->lastError.level = XML_ERR_ERROR;
+ ctxt->context->lastError.str1 = (char *) xmlStrdup(ctxt->base);
+ ctxt->context->lastError.int1 = ctxt->cur - ctxt->base;
+ ctxt->context->lastError.node = ctxt->context->debugNode;
+ if (ctxt->context->error != NULL) {
+ ctxt->context->error(ctxt->context->userData,
+ &ctxt->context->lastError);
+ } else {
+ __xmlRaiseError(NULL, NULL, NULL,
+ NULL, ctxt->context->debugNode, XML_FROM_XPOINTER,
+ error, XML_ERR_ERROR, NULL, 0,
+ (const char *) extra, (const char *) ctxt->base, NULL,
+ ctxt->cur - ctxt->base, 0,
+ msg, extra);
+ }
+}
+
+/************************************************************************
+ * *
+ * A few helper functions for child sequences *
+ * *
+ ************************************************************************/
+/* xmlXPtrAdvanceNode is a private function, but used by xinclude.c */
+xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level);
+/**
+ * xmlXPtrGetArity:
+ * @cur: the node
+ *
+ * Returns the number of child for an element, -1 in case of error
+ */
+static int
+xmlXPtrGetArity(xmlNodePtr cur) {
+ int i;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(-1);
+ cur = cur->children;
+ for (i = 0;cur != NULL;cur = cur->next) {
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ i++;
+ }
+ }
+ return(i);
+}
+
+/**
+ * xmlXPtrGetIndex:
+ * @cur: the node
+ *
+ * Returns the index of the node in its parent children list, -1
+ * in case of error
+ */
+static int
+xmlXPtrGetIndex(xmlNodePtr cur) {
+ int i;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(-1);
+ for (i = 1;cur != NULL;cur = cur->prev) {
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ i++;
+ }
+ }
+ return(i);
+}
+
+/**
+ * xmlXPtrGetNthChild:
+ * @cur: the node
+ * @no: the child number
+ *
+ * Returns the @no'th element child of @cur or NULL
+ */
+static xmlNodePtr
+xmlXPtrGetNthChild(xmlNodePtr cur, int no) {
+ int i;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(cur);
+ cur = cur->children;
+ for (i = 0;i <= no;cur = cur->next) {
+ if (cur == NULL)
+ return(cur);
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ i++;
+ if (i == no)
+ break;
+ }
+ }
+ return(cur);
+}
+
+/************************************************************************
+ * *
+ * Handling of XPointer specific types *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPtrCmpPoints:
+ * @node1: the first node
+ * @index1: the first index
+ * @node2: the second node
+ * @index2: the second index
+ *
+ * Compare two points w.r.t document order
+ *
+ * Returns -2 in case of error 1 if first point < second point, 0 if
+ * that's the same point, -1 otherwise
+ */
+static int
+xmlXPtrCmpPoints(xmlNodePtr node1, int index1, xmlNodePtr node2, int index2) {
+ if ((node1 == NULL) || (node2 == NULL))
+ return(-2);
+ /*
+ * a couple of optimizations which will avoid computations in most cases
+ */
+ if (node1 == node2) {
+ if (index1 < index2)
+ return(1);
+ if (index1 > index2)
+ return(-1);
+ return(0);
+ }
+ return(xmlXPathCmpNodes(node1, node2));
+}
+
+/**
+ * xmlXPtrNewPoint:
+ * @node: the xmlNodePtr
+ * @indx: the indx within the node
+ *
+ * Create a new xmlXPathObjectPtr of type point
+ *
+ * Returns the newly created object.
+ */
+static xmlXPathObjectPtr
+xmlXPtrNewPoint(xmlNodePtr node, int indx) {
+ xmlXPathObjectPtr ret;
+
+ if (node == NULL)
+ return(NULL);
+ if (indx < 0)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating point");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_POINT;
+ ret->user = (void *) node;
+ ret->index = indx;
+ return(ret);
+}
+
+/**
+ * xmlXPtrRangeCheckOrder:
+ * @range: an object range
+ *
+ * Make sure the points in the range are in the right order
+ */
+static void
+xmlXPtrRangeCheckOrder(xmlXPathObjectPtr range) {
+ int tmp;
+ xmlNodePtr tmp2;
+ if (range == NULL)
+ return;
+ if (range->type != XPATH_RANGE)
+ return;
+ if (range->user2 == NULL)
+ return;
+ tmp = xmlXPtrCmpPoints(range->user, range->index,
+ range->user2, range->index2);
+ if (tmp == -1) {
+ tmp2 = range->user;
+ range->user = range->user2;
+ range->user2 = tmp2;
+ tmp = range->index;
+ range->index = range->index2;
+ range->index2 = tmp;
+ }
+}
+
+/**
+ * xmlXPtrRangesEqual:
+ * @range1: the first range
+ * @range2: the second range
+ *
+ * Compare two ranges
+ *
+ * Returns 1 if equal, 0 otherwise
+ */
+static int
+xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) {
+ if (range1 == range2)
+ return(1);
+ if ((range1 == NULL) || (range2 == NULL))
+ return(0);
+ if (range1->type != range2->type)
+ return(0);
+ if (range1->type != XPATH_RANGE)
+ return(0);
+ if (range1->user != range2->user)
+ return(0);
+ if (range1->index != range2->index)
+ return(0);
+ if (range1->user2 != range2->user2)
+ return(0);
+ if (range1->index2 != range2->index2)
+ return(0);
+ return(1);
+}
+
+/**
+ * xmlXPtrNewRange:
+ * @start: the starting node
+ * @startindex: the start index
+ * @end: the ending point
+ * @endindex: the ending index
+ *
+ * Create a new xmlXPathObjectPtr of type range
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRange(xmlNodePtr start, int startindex,
+ xmlNodePtr end, int endindex) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+ if (startindex < 0)
+ return(NULL);
+ if (endindex < 0)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start;
+ ret->index = startindex;
+ ret->user2 = end;
+ ret->index2 = endindex;
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewRangePoints:
+ * @start: the starting point
+ * @end: the ending point
+ *
+ * Create a new xmlXPathObjectPtr of type range using 2 Points
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+ if (start->type != XPATH_POINT)
+ return(NULL);
+ if (end->type != XPATH_POINT)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start->user;
+ ret->index = start->index;
+ ret->user2 = end->user;
+ ret->index2 = end->index;
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewRangePointNode:
+ * @start: the starting point
+ * @end: the ending node
+ *
+ * Create a new xmlXPathObjectPtr of type range from a point to a node
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+ if (start->type != XPATH_POINT)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start->user;
+ ret->index = start->index;
+ ret->user2 = end;
+ ret->index2 = -1;
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewRangeNodePoint:
+ * @start: the starting node
+ * @end: the ending point
+ *
+ * Create a new xmlXPathObjectPtr of type range from a node to a point
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+ if (start->type != XPATH_POINT)
+ return(NULL);
+ if (end->type != XPATH_POINT)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start;
+ ret->index = -1;
+ ret->user2 = end->user;
+ ret->index2 = end->index;
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewRangeNodes:
+ * @start: the starting node
+ * @end: the ending node
+ *
+ * Create a new xmlXPathObjectPtr of type range using 2 nodes
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start;
+ ret->index = -1;
+ ret->user2 = end;
+ ret->index2 = -1;
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewCollapsedRange:
+ * @start: the starting and ending node
+ *
+ * Create a new xmlXPathObjectPtr of type range using a single nodes
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewCollapsedRange(xmlNodePtr start) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start;
+ ret->index = -1;
+ ret->user2 = NULL;
+ ret->index2 = -1;
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewRangeNodeObject:
+ * @start: the starting node
+ * @end: the ending object
+ *
+ * Create a new xmlXPathObjectPtr of type range from a not to an object
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) {
+ xmlXPathObjectPtr ret;
+
+ if (start == NULL)
+ return(NULL);
+ if (end == NULL)
+ return(NULL);
+ switch (end->type) {
+ case XPATH_POINT:
+ case XPATH_RANGE:
+ break;
+ case XPATH_NODESET:
+ /*
+ * Empty set ...
+ */
+ if (end->nodesetval->nodeNr <= 0)
+ return(NULL);
+ break;
+ default:
+ /* TODO */
+ return(NULL);
+ }
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating range");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_RANGE;
+ ret->user = start;
+ ret->index = -1;
+ switch (end->type) {
+ case XPATH_POINT:
+ ret->user2 = end->user;
+ ret->index2 = end->index;
+ break;
+ case XPATH_RANGE:
+ ret->user2 = end->user2;
+ ret->index2 = end->index2;
+ break;
+ case XPATH_NODESET: {
+ ret->user2 = end->nodesetval->nodeTab[end->nodesetval->nodeNr - 1];
+ ret->index2 = -1;
+ break;
+ }
+ default:
+ STRANGE
+ return(NULL);
+ }
+ xmlXPtrRangeCheckOrder(ret);
+ return(ret);
+}
+
+#define XML_RANGESET_DEFAULT 10
+
+/**
+ * xmlXPtrLocationSetCreate:
+ * @val: an initial xmlXPathObjectPtr, or NULL
+ *
+ * Create a new xmlLocationSetPtr of type double and of value @val
+ *
+ * Returns the newly created object.
+ */
+xmlLocationSetPtr
+xmlXPtrLocationSetCreate(xmlXPathObjectPtr val) {
+ xmlLocationSetPtr ret;
+
+ ret = (xmlLocationSetPtr) xmlMalloc(sizeof(xmlLocationSet));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating locationset");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlLocationSet));
+ if (val != NULL) {
+ ret->locTab = (xmlXPathObjectPtr *) xmlMalloc(XML_RANGESET_DEFAULT *
+ sizeof(xmlXPathObjectPtr));
+ if (ret->locTab == NULL) {
+ xmlXPtrErrMemory("allocating locationset");
+ xmlFree(ret);
+ return(NULL);
+ }
+ memset(ret->locTab, 0 ,
+ XML_RANGESET_DEFAULT * (size_t) sizeof(xmlXPathObjectPtr));
+ ret->locMax = XML_RANGESET_DEFAULT;
+ ret->locTab[ret->locNr++] = val;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPtrLocationSetAdd:
+ * @cur: the initial range set
+ * @val: a new xmlXPathObjectPtr
+ *
+ * add a new xmlXPathObjectPtr to an existing LocationSet
+ * If the location already exist in the set @val is freed.
+ */
+void
+xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
+ int i;
+
+ if ((cur == NULL) || (val == NULL)) return;
+
+ /*
+ * check against doublons
+ */
+ for (i = 0;i < cur->locNr;i++) {
+ if (xmlXPtrRangesEqual(cur->locTab[i], val)) {
+ xmlXPathFreeObject(val);
+ return;
+ }
+ }
+
+ /*
+ * grow the locTab if needed
+ */
+ if (cur->locMax == 0) {
+ cur->locTab = (xmlXPathObjectPtr *) xmlMalloc(XML_RANGESET_DEFAULT *
+ sizeof(xmlXPathObjectPtr));
+ if (cur->locTab == NULL) {
+ xmlXPtrErrMemory("adding location to set");
+ return;
+ }
+ memset(cur->locTab, 0 ,
+ XML_RANGESET_DEFAULT * (size_t) sizeof(xmlXPathObjectPtr));
+ cur->locMax = XML_RANGESET_DEFAULT;
+ } else if (cur->locNr == cur->locMax) {
+ xmlXPathObjectPtr *temp;
+
+ cur->locMax *= 2;
+ temp = (xmlXPathObjectPtr *) xmlRealloc(cur->locTab, cur->locMax *
+ sizeof(xmlXPathObjectPtr));
+ if (temp == NULL) {
+ xmlXPtrErrMemory("adding location to set");
+ return;
+ }
+ cur->locTab = temp;
+ }
+ cur->locTab[cur->locNr++] = val;
+}
+
+/**
+ * xmlXPtrLocationSetMerge:
+ * @val1: the first LocationSet
+ * @val2: the second LocationSet
+ *
+ * Merges two rangesets, all ranges from @val2 are added to @val1
+ *
+ * Returns val1 once extended or NULL in case of error.
+ */
+xmlLocationSetPtr
+xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2) {
+ int i;
+
+ if (val1 == NULL) return(NULL);
+ if (val2 == NULL) return(val1);
+
+ /*
+ * !!!!! this can be optimized a lot, knowing that both
+ * val1 and val2 already have unicity of their values.
+ */
+
+ for (i = 0;i < val2->locNr;i++)
+ xmlXPtrLocationSetAdd(val1, val2->locTab[i]);
+
+ return(val1);
+}
+
+/**
+ * xmlXPtrLocationSetDel:
+ * @cur: the initial range set
+ * @val: an xmlXPathObjectPtr
+ *
+ * Removes an xmlXPathObjectPtr from an existing LocationSet
+ */
+void
+xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
+ int i;
+
+ if (cur == NULL) return;
+ if (val == NULL) return;
+
+ /*
+ * check against doublons
+ */
+ for (i = 0;i < cur->locNr;i++)
+ if (cur->locTab[i] == val) break;
+
+ if (i >= cur->locNr) {
+#ifdef DEBUG
+ xmlGenericError(xmlGenericErrorContext,
+ "xmlXPtrLocationSetDel: Range wasn't found in RangeList\n");
+#endif
+ return;
+ }
+ cur->locNr--;
+ for (;i < cur->locNr;i++)
+ cur->locTab[i] = cur->locTab[i + 1];
+ cur->locTab[cur->locNr] = NULL;
+}
+
+/**
+ * xmlXPtrLocationSetRemove:
+ * @cur: the initial range set
+ * @val: the index to remove
+ *
+ * Removes an entry from an existing LocationSet list.
+ */
+void
+xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val) {
+ if (cur == NULL) return;
+ if (val >= cur->locNr) return;
+ cur->locNr--;
+ for (;val < cur->locNr;val++)
+ cur->locTab[val] = cur->locTab[val + 1];
+ cur->locTab[cur->locNr] = NULL;
+}
+
+/**
+ * xmlXPtrFreeLocationSet:
+ * @obj: the xmlLocationSetPtr to free
+ *
+ * Free the LocationSet compound (not the actual ranges !).
+ */
+void
+xmlXPtrFreeLocationSet(xmlLocationSetPtr obj) {
+ int i;
+
+ if (obj == NULL) return;
+ if (obj->locTab != NULL) {
+ for (i = 0;i < obj->locNr; i++) {
+ xmlXPathFreeObject(obj->locTab[i]);
+ }
+ xmlFree(obj->locTab);
+ }
+ xmlFree(obj);
+}
+
+/**
+ * xmlXPtrNewLocationSetNodes:
+ * @start: the start NodePtr value
+ * @end: the end NodePtr value or NULL
+ *
+ * Create a new xmlXPathObjectPtr of type LocationSet and initialize
+ * it with the single range made of the two nodes @start and @end
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewLocationSetNodes(xmlNodePtr start, xmlNodePtr end) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating locationset");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_LOCATIONSET;
+ if (end == NULL)
+ ret->user = xmlXPtrLocationSetCreate(xmlXPtrNewCollapsedRange(start));
+ else
+ ret->user = xmlXPtrLocationSetCreate(xmlXPtrNewRangeNodes(start,end));
+ return(ret);
+}
+
+/**
+ * xmlXPtrNewLocationSetNodeSet:
+ * @set: a node set
+ *
+ * Create a new xmlXPathObjectPtr of type LocationSet and initialize
+ * it with all the nodes from @set
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating locationset");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_LOCATIONSET;
+ if (set != NULL) {
+ int i;
+ xmlLocationSetPtr newset;
+
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL)
+ return(ret);
+
+ for (i = 0;i < set->nodeNr;i++)
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrNewCollapsedRange(set->nodeTab[i]));
+
+ ret->user = (void *) newset;
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPtrWrapLocationSet:
+ * @val: the LocationSet value
+ *
+ * Wrap the LocationSet @val in a new xmlXPathObjectPtr
+ *
+ * Returns the newly created object.
+ */
+xmlXPathObjectPtr
+xmlXPtrWrapLocationSet(xmlLocationSetPtr val) {
+ xmlXPathObjectPtr ret;
+
+ ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject));
+ if (ret == NULL) {
+ xmlXPtrErrMemory("allocating locationset");
+ return(NULL);
+ }
+ memset(ret, 0 , (size_t) sizeof(xmlXPathObject));
+ ret->type = XPATH_LOCATIONSET;
+ ret->user = (void *) val;
+ return(ret);
+}
+
+/************************************************************************
+ * *
+ * The parser *
+ * *
+ ************************************************************************/
+
+static void xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name);
+
+/*
+ * Macros for accessing the content. Those should be used only by the parser,
+ * and not exported.
+ *
+ * Dirty macros, i.e. one need to make assumption on the context to use them
+ *
+ * CUR_PTR return the current pointer to the xmlChar to be parsed.
+ * CUR returns the current xmlChar value, i.e. a 8 bit value
+ * in ISO-Latin or UTF-8.
+ * This should be used internally by the parser
+ * only to compare to ASCII values otherwise it would break when
+ * running with UTF-8 encoding.
+ * NXT(n) returns the n'th next xmlChar. Same as CUR is should be used only
+ * to compare on ASCII based substring.
+ * SKIP(n) Skip n xmlChar, and must also be used only to skip ASCII defined
+ * strings within the parser.
+ * CURRENT Returns the current char value, with the full decoding of
+ * UTF-8 if we are using this mode. It returns an int.
+ * NEXT Skip to the next character, this does the proper decoding
+ * in UTF-8 mode. It also pop-up unfinished entities on the fly.
+ * It returns the pointer to the current xmlChar.
+ */
+
+#define CUR (*ctxt->cur)
+#define SKIP(val) ctxt->cur += (val)
+#define NXT(val) ctxt->cur[(val)]
+#define CUR_PTR ctxt->cur
+
+#define SKIP_BLANKS \
+ while (IS_BLANK_CH(*(ctxt->cur))) NEXT
+
+#define CURRENT (*ctxt->cur)
+#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
+
+/*
+ * xmlXPtrGetChildNo:
+ * @ctxt: the XPointer Parser context
+ * @index: the child number
+ *
+ * Move the current node of the nodeset on the stack to the
+ * given child if found
+ */
+static void
+xmlXPtrGetChildNo(xmlXPathParserContextPtr ctxt, int indx) {
+ xmlNodePtr cur = NULL;
+ xmlXPathObjectPtr obj;
+ xmlNodeSetPtr oldset;
+
+ CHECK_TYPE(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ oldset = obj->nodesetval;
+ if ((indx <= 0) || (oldset == NULL) || (oldset->nodeNr != 1)) {
+ xmlXPathFreeObject(obj);
+ valuePush(ctxt, xmlXPathNewNodeSet(NULL));
+ return;
+ }
+ cur = xmlXPtrGetNthChild(oldset->nodeTab[0], indx);
+ if (cur == NULL) {
+ xmlXPathFreeObject(obj);
+ valuePush(ctxt, xmlXPathNewNodeSet(NULL));
+ return;
+ }
+ oldset->nodeTab[0] = cur;
+ valuePush(ctxt, obj);
+}
+
+/**
+ * xmlXPtrEvalXPtrPart:
+ * @ctxt: the XPointer Parser context
+ * @name: the preparsed Scheme for the XPtrPart
+ *
+ * XPtrPart ::= 'xpointer' '(' XPtrExpr ')'
+ * | Scheme '(' SchemeSpecificExpr ')'
+ *
+ * Scheme ::= NCName - 'xpointer' [VC: Non-XPointer schemes]
+ *
+ * SchemeSpecificExpr ::= StringWithBalancedParens
+ *
+ * StringWithBalancedParens ::=
+ * [^()]* ('(' StringWithBalancedParens ')' [^()]*)*
+ * [VC: Parenthesis escaping]
+ *
+ * XPtrExpr ::= Expr [VC: Parenthesis escaping]
+ *
+ * VC: Parenthesis escaping:
+ * The end of an XPointer part is signaled by the right parenthesis ")"
+ * character that is balanced with the left parenthesis "(" character
+ * that began the part. Any unbalanced parenthesis character inside the
+ * expression, even within literals, must be escaped with a circumflex (^)
+ * character preceding it. If the expression contains any literal
+ * occurrences of the circumflex, each must be escaped with an additional
+ * circumflex (that is, ^^). If the unescaped parentheses in the expression
+ * are not balanced, a syntax error results.
+ *
+ * Parse and evaluate an XPtrPart. Basically it generates the unescaped
+ * string and if the scheme is 'xpointer' it will call the XPath interpreter.
+ *
+ * TODO: there is no new scheme registration mechanism
+ */
+
+static void
+xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) {
+ xmlChar *buffer, *cur;
+ int len;
+ int level;
+
+ if (name == NULL)
+ name = xmlXPathParseName(ctxt);
+ if (name == NULL)
+ XP_ERROR(XPATH_EXPR_ERROR);
+
+ if (CUR != '(')
+ XP_ERROR(XPATH_EXPR_ERROR);
+ NEXT;
+ level = 1;
+
+ len = xmlStrlen(ctxt->cur);
+ len++;
+ buffer = (xmlChar *) xmlMallocAtomic(len * sizeof (xmlChar));
+ if (buffer == NULL) {
+ xmlXPtrErrMemory("allocating buffer");
+ return;
+ }
+
+ cur = buffer;
+ while (CUR != 0) {
+ if (CUR == ')') {
+ level--;
+ if (level == 0) {
+ NEXT;
+ break;
+ }
+ } else if (CUR == '(') {
+ level++;
+ } else if (CUR == '^') {
+ if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) {
+ NEXT;
+ }
+ }
+ *cur++ = CUR;
+ NEXT;
+ }
+ *cur = 0;
+
+ if ((level != 0) && (CUR == 0)) {
+ xmlFree(buffer);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+
+ if (xmlStrEqual(name, (xmlChar *) "xpointer")) {
+ const xmlChar *left = CUR_PTR;
+
+ CUR_PTR = buffer;
+ /*
+ * To evaluate an xpointer scheme element (4.3) we need:
+ * context initialized to the root
+ * context position initalized to 1
+ * context size initialized to 1
+ */
+ ctxt->context->node = (xmlNodePtr)ctxt->context->doc;
+ ctxt->context->proximityPosition = 1;
+ ctxt->context->contextSize = 1;
+ xmlXPathEvalExpr(ctxt);
+ CUR_PTR=left;
+ } else if (xmlStrEqual(name, (xmlChar *) "element")) {
+ const xmlChar *left = CUR_PTR;
+ xmlChar *name2;
+
+ CUR_PTR = buffer;
+ if (buffer[0] == '/') {
+ xmlXPathRoot(ctxt);
+ xmlXPtrEvalChildSeq(ctxt, NULL);
+ } else {
+ name2 = xmlXPathParseName(ctxt);
+ if (name2 == NULL) {
+ CUR_PTR = left;
+ xmlFree(buffer);
+ XP_ERROR(XPATH_EXPR_ERROR);
+ }
+ xmlXPtrEvalChildSeq(ctxt, name2);
+ }
+ CUR_PTR = left;
+#ifdef XPTR_XMLNS_SCHEME
+ } else if (xmlStrEqual(name, (xmlChar *) "xmlns")) {
+ const xmlChar *left = CUR_PTR;
+ xmlChar *prefix;
+ xmlChar *URI;
+ xmlURIPtr value;
+
+ CUR_PTR = buffer;
+ prefix = xmlXPathParseNCName(ctxt);
+ if (prefix == NULL) {
+ xmlFree(buffer);
+ xmlFree(name);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+ SKIP_BLANKS;
+ if (CUR != '=') {
+ xmlFree(prefix);
+ xmlFree(buffer);
+ xmlFree(name);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+ /* @@ check escaping in the XPointer WD */
+
+ value = xmlParseURI((const char *)ctxt->cur);
+ if (value == NULL) {
+ xmlFree(prefix);
+ xmlFree(buffer);
+ xmlFree(name);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+ URI = xmlSaveUri(value);
+ xmlFreeURI(value);
+ if (URI == NULL) {
+ xmlFree(prefix);
+ xmlFree(buffer);
+ xmlFree(name);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+
+ xmlXPathRegisterNs(ctxt->context, prefix, URI);
+ CUR_PTR = left;
+ xmlFree(URI);
+ xmlFree(prefix);
+#endif /* XPTR_XMLNS_SCHEME */
+ } else {
+ xmlXPtrErr(ctxt, XML_XPTR_UNKNOWN_SCHEME,
+ "unsupported scheme '%s'\n", name);
+ }
+ xmlFree(buffer);
+ xmlFree(name);
+}
+
+/**
+ * xmlXPtrEvalFullXPtr:
+ * @ctxt: the XPointer Parser context
+ * @name: the preparsed Scheme for the first XPtrPart
+ *
+ * FullXPtr ::= XPtrPart (S? XPtrPart)*
+ *
+ * As the specs says:
+ * -----------
+ * When multiple XPtrParts are provided, they must be evaluated in
+ * left-to-right order. If evaluation of one part fails, the nexti
+ * is evaluated. The following conditions cause XPointer part failure:
+ *
+ * - An unknown scheme
+ * - A scheme that does not locate any sub-resource present in the resource
+ * - A scheme that is not applicable to the media type of the resource
+ *
+ * The XPointer application must consume a failed XPointer part and
+ * attempt to evaluate the next one, if any. The result of the first
+ * XPointer part whose evaluation succeeds is taken to be the fragment
+ * located by the XPointer as a whole. If all the parts fail, the result
+ * for the XPointer as a whole is a sub-resource error.
+ * -----------
+ *
+ * Parse and evaluate a Full XPtr i.e. possibly a cascade of XPath based
+ * expressions or other schemes.
+ */
+static void
+xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) {
+ if (name == NULL)
+ name = xmlXPathParseName(ctxt);
+ if (name == NULL)
+ XP_ERROR(XPATH_EXPR_ERROR);
+ while (name != NULL) {
+ ctxt->error = XPATH_EXPRESSION_OK;
+ xmlXPtrEvalXPtrPart(ctxt, name);
+
+ /* in case of syntax error, break here */
+ if ((ctxt->error != XPATH_EXPRESSION_OK) &&
+ (ctxt->error != XML_XPTR_UNKNOWN_SCHEME))
+ return;
+
+ /*
+ * If the returned value is a non-empty nodeset
+ * or location set, return here.
+ */
+ if (ctxt->value != NULL) {
+ xmlXPathObjectPtr obj = ctxt->value;
+
+ switch (obj->type) {
+ case XPATH_LOCATIONSET: {
+ xmlLocationSetPtr loc = ctxt->value->user;
+ if ((loc != NULL) && (loc->locNr > 0))
+ return;
+ break;
+ }
+ case XPATH_NODESET: {
+ xmlNodeSetPtr loc = ctxt->value->nodesetval;
+ if ((loc != NULL) && (loc->nodeNr > 0))
+ return;
+ break;
+ }
+ default:
+ break;
+ }
+
+ /*
+ * Evaluating to improper values is equivalent to
+ * a sub-resource error, clean-up the stack
+ */
+ do {
+ obj = valuePop(ctxt);
+ if (obj != NULL) {
+ xmlXPathFreeObject(obj);
+ }
+ } while (obj != NULL);
+ }
+
+ /*
+ * Is there another XPointer part.
+ */
+ SKIP_BLANKS;
+ name = xmlXPathParseName(ctxt);
+ }
+}
+
+/**
+ * xmlXPtrEvalChildSeq:
+ * @ctxt: the XPointer Parser context
+ * @name: a possible ID name of the child sequence
+ *
+ * ChildSeq ::= '/1' ('/' [0-9]*)*
+ * | Name ('/' [0-9]*)+
+ *
+ * Parse and evaluate a Child Sequence. This routine also handle the
+ * case of a Bare Name used to get a document ID.
+ */
+static void
+xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) {
+ /*
+ * XPointer don't allow by syntax to address in mutirooted trees
+ * this might prove useful in some cases, warn about it.
+ */
+ if ((name == NULL) && (CUR == '/') && (NXT(1) != '1')) {
+ xmlXPtrErr(ctxt, XML_XPTR_CHILDSEQ_START,
+ "warning: ChildSeq not starting by /1\n", NULL);
+ }
+
+ if (name != NULL) {
+ valuePush(ctxt, xmlXPathNewString(name));
+ xmlFree(name);
+ xmlXPathIdFunction(ctxt, 1);
+ CHECK_ERROR;
+ }
+
+ while (CUR == '/') {
+ int child = 0;
+ NEXT;
+
+ while ((CUR >= '0') && (CUR <= '9')) {
+ child = child * 10 + (CUR - '0');
+ NEXT;
+ }
+ xmlXPtrGetChildNo(ctxt, child);
+ }
+}
+
+
+/**
+ * xmlXPtrEvalXPointer:
+ * @ctxt: the XPointer Parser context
+ *
+ * XPointer ::= Name
+ * | ChildSeq
+ * | FullXPtr
+ *
+ * Parse and evaluate an XPointer
+ */
+static void
+xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) {
+ if (ctxt->valueTab == NULL) {
+ /* Allocate the value stack */
+ ctxt->valueTab = (xmlXPathObjectPtr *)
+ xmlMalloc(10 * sizeof(xmlXPathObjectPtr));
+ if (ctxt->valueTab == NULL) {
+ xmlXPtrErrMemory("allocating evaluation context");
+ return;
+ }
+ ctxt->valueNr = 0;
+ ctxt->valueMax = 10;
+ ctxt->value = NULL;
+ ctxt->valueFrame = 0;
+ }
+ SKIP_BLANKS;
+ if (CUR == '/') {
+ xmlXPathRoot(ctxt);
+ xmlXPtrEvalChildSeq(ctxt, NULL);
+ } else {
+ xmlChar *name;
+
+ name = xmlXPathParseName(ctxt);
+ if (name == NULL)
+ XP_ERROR(XPATH_EXPR_ERROR);
+ if (CUR == '(') {
+ xmlXPtrEvalFullXPtr(ctxt, name);
+ /* Short evaluation */
+ return;
+ } else {
+ /* this handle both Bare Names and Child Sequences */
+ xmlXPtrEvalChildSeq(ctxt, name);
+ }
+ }
+ SKIP_BLANKS;
+ if (CUR != 0)
+ XP_ERROR(XPATH_EXPR_ERROR);
+}
+
+
+/************************************************************************
+ * *
+ * General routines *
+ * *
+ ************************************************************************/
+
+static
+void xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs);
+static
+void xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+/**
+ * xmlXPtrNewContext:
+ * @doc: the XML document
+ * @here: the node that directly contains the XPointer being evaluated or NULL
+ * @origin: the element from which a user or program initiated traversal of
+ * the link, or NULL.
+ *
+ * Create a new XPointer context
+ *
+ * Returns the xmlXPathContext just allocated.
+ */
+xmlXPathContextPtr
+xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) {
+ xmlXPathContextPtr ret;
+
+ ret = xmlXPathNewContext(doc);
+ if (ret == NULL)
+ return(ret);
+ ret->xptr = 1;
+ ret->here = here;
+ ret->origin = origin;
+
+ xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
+ xmlXPtrRangeToFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"range",
+ xmlXPtrRangeFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
+ xmlXPtrRangeInsideFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"string-range",
+ xmlXPtrStringRangeFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"start-point",
+ xmlXPtrStartPointFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"end-point",
+ xmlXPtrEndPointFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"here",
+ xmlXPtrHereFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)" origin",
+ xmlXPtrOriginFunction);
+
+ return(ret);
+}
+
+/**
+ * xmlXPtrEval:
+ * @str: the XPointer expression
+ * @ctx: the XPointer context
+ *
+ * Evaluate the XPath Location Path in the given context.
+ *
+ * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL.
+ * the caller has to free the object.
+ */
+xmlXPathObjectPtr
+xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) {
+ xmlXPathParserContextPtr ctxt;
+ xmlXPathObjectPtr res = NULL, tmp;
+ xmlXPathObjectPtr init = NULL;
+ int stack = 0;
+
+ xmlXPathInit();
+
+ if ((ctx == NULL) || (str == NULL))
+ return(NULL);
+
+ ctxt = xmlXPathNewParserContext(str, ctx);
+ if (ctxt == NULL)
+ return(NULL);
+ ctxt->xptr = 1;
+ xmlXPtrEvalXPointer(ctxt);
+
+ if ((ctxt->value != NULL) &&
+ (ctxt->value->type != XPATH_NODESET) &&
+ (ctxt->value->type != XPATH_LOCATIONSET)) {
+ xmlXPtrErr(ctxt, XML_XPTR_EVAL_FAILED,
+ "xmlXPtrEval: evaluation failed to return a node set\n",
+ NULL);
+ } else {
+ res = valuePop(ctxt);
+ }
+
+ do {
+ tmp = valuePop(ctxt);
+ if (tmp != NULL) {
+ if (tmp != init) {
+ if (tmp->type == XPATH_NODESET) {
+ /*
+ * Evaluation may push a root nodeset which is unused
+ */
+ xmlNodeSetPtr set;
+ set = tmp->nodesetval;
+ if ((set->nodeNr != 1) ||
+ (set->nodeTab[0] != (xmlNodePtr) ctx->doc))
+ stack++;
+ } else
+ stack++;
+ }
+ xmlXPathFreeObject(tmp);
+ }
+ } while (tmp != NULL);
+ if (stack != 0) {
+ xmlXPtrErr(ctxt, XML_XPTR_EXTRA_OBJECTS,
+ "xmlXPtrEval: object(s) left on the eval stack\n",
+ NULL);
+ }
+ if (ctxt->error != XPATH_EXPRESSION_OK) {
+ xmlXPathFreeObject(res);
+ res = NULL;
+ }
+
+ xmlXPathFreeParserContext(ctxt);
+ return(res);
+}
+
+/**
+ * xmlXPtrBuildRangeNodeList:
+ * @range: a range object
+ *
+ * Build a node list tree copy of the range
+ *
+ * Returns an xmlNodePtr list or NULL.
+ * the caller has to free the node tree.
+ */
+static xmlNodePtr
+xmlXPtrBuildRangeNodeList(xmlXPathObjectPtr range) {
+ /* pointers to generated nodes */
+ xmlNodePtr list = NULL, last = NULL, parent = NULL, tmp;
+ /* pointers to traversal nodes */
+ xmlNodePtr start, cur, end;
+ int index1, index2;
+
+ if (range == NULL)
+ return(NULL);
+ if (range->type != XPATH_RANGE)
+ return(NULL);
+ start = (xmlNodePtr) range->user;
+
+ if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ end = range->user2;
+ if (end == NULL)
+ return(xmlCopyNode(start, 1));
+ if (end->type == XML_NAMESPACE_DECL)
+ return(NULL);
+
+ cur = start;
+ index1 = range->index;
+ index2 = range->index2;
+ while (cur != NULL) {
+ if (cur == end) {
+ if (cur->type == XML_TEXT_NODE) {
+ const xmlChar *content = cur->content;
+ int len;
+
+ if (content == NULL) {
+ tmp = xmlNewTextLen(NULL, 0);
+ } else {
+ len = index2;
+ if ((cur == start) && (index1 > 1)) {
+ content += (index1 - 1);
+ len -= (index1 - 1);
+ index1 = 0;
+ } else {
+ len = index2;
+ }
+ tmp = xmlNewTextLen(content, len);
+ }
+ /* single sub text node selection */
+ if (list == NULL)
+ return(tmp);
+ /* prune and return full set */
+ if (last != NULL)
+ xmlAddNextSibling(last, tmp);
+ else
+ xmlAddChild(parent, tmp);
+ return(list);
+ } else {
+ tmp = xmlCopyNode(cur, 0);
+ if (list == NULL)
+ list = tmp;
+ else {
+ if (last != NULL)
+ xmlAddNextSibling(last, tmp);
+ else
+ xmlAddChild(parent, tmp);
+ }
+ last = NULL;
+ parent = tmp;
+
+ if (index2 > 1) {
+ end = xmlXPtrGetNthChild(cur, index2 - 1);
+ index2 = 0;
+ }
+ if ((cur == start) && (index1 > 1)) {
+ cur = xmlXPtrGetNthChild(cur, index1 - 1);
+ index1 = 0;
+ } else {
+ cur = cur->children;
+ }
+ /*
+ * Now gather the remaining nodes from cur to end
+ */
+ continue; /* while */
+ }
+ } else if ((cur == start) &&
+ (list == NULL) /* looks superfluous but ... */ ) {
+ if ((cur->type == XML_TEXT_NODE) ||
+ (cur->type == XML_CDATA_SECTION_NODE)) {
+ const xmlChar *content = cur->content;
+
+ if (content == NULL) {
+ tmp = xmlNewTextLen(NULL, 0);
+ } else {
+ if (index1 > 1) {
+ content += (index1 - 1);
+ }
+ tmp = xmlNewText(content);
+ }
+ last = list = tmp;
+ } else {
+ if ((cur == start) && (index1 > 1)) {
+ tmp = xmlCopyNode(cur, 0);
+ list = tmp;
+ parent = tmp;
+ last = NULL;
+ cur = xmlXPtrGetNthChild(cur, index1 - 1);
+ index1 = 0;
+ /*
+ * Now gather the remaining nodes from cur to end
+ */
+ continue; /* while */
+ }
+ tmp = xmlCopyNode(cur, 1);
+ list = tmp;
+ parent = NULL;
+ last = tmp;
+ }
+ } else {
+ tmp = NULL;
+ switch (cur->type) {
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_NODE:
+ /* Do not copy DTD informations */
+ break;
+ case XML_ENTITY_DECL:
+ TODO /* handle crossing entities -> stack needed */
+ break;
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ /* don't consider it part of the tree content */
+ break;
+ case XML_ATTRIBUTE_NODE:
+ /* Humm, should not happen ! */
+ STRANGE
+ break;
+ default:
+ tmp = xmlCopyNode(cur, 1);
+ break;
+ }
+ if (tmp != NULL) {
+ if ((list == NULL) || ((last == NULL) && (parent == NULL))) {
+ STRANGE
+ return(NULL);
+ }
+ if (last != NULL)
+ xmlAddNextSibling(last, tmp);
+ else {
+ xmlAddChild(parent, tmp);
+ last = tmp;
+ }
+ }
+ }
+ /*
+ * Skip to next node in document order
+ */
+ if ((list == NULL) || ((last == NULL) && (parent == NULL))) {
+ STRANGE
+ return(NULL);
+ }
+ cur = xmlXPtrAdvanceNode(cur, NULL);
+ }
+ return(list);
+}
+
+/**
+ * xmlXPtrBuildNodeList:
+ * @obj: the XPointer result from the evaluation.
+ *
+ * Build a node list tree copy of the XPointer result.
+ * This will drop Attributes and Namespace declarations.
+ *
+ * Returns an xmlNodePtr list or NULL.
+ * the caller has to free the node tree.
+ */
+xmlNodePtr
+xmlXPtrBuildNodeList(xmlXPathObjectPtr obj) {
+ xmlNodePtr list = NULL, last = NULL;
+ int i;
+
+ if (obj == NULL)
+ return(NULL);
+ switch (obj->type) {
+ case XPATH_NODESET: {
+ xmlNodeSetPtr set = obj->nodesetval;
+ if (set == NULL)
+ return(NULL);
+ for (i = 0;i < set->nodeNr;i++) {
+ if (set->nodeTab[i] == NULL)
+ continue;
+ switch (set->nodeTab[i]->type) {
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_ENTITY_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
+#ifdef LIBXML_DOCB_ENABLED
+ case XML_DOCB_DOCUMENT_NODE:
+#endif
+ case XML_XINCLUDE_START:
+ case XML_XINCLUDE_END:
+ break;
+ case XML_ATTRIBUTE_NODE:
+ case XML_NAMESPACE_DECL:
+ case XML_DOCUMENT_TYPE_NODE:
+ case XML_DOCUMENT_FRAG_NODE:
+ case XML_NOTATION_NODE:
+ case XML_DTD_NODE:
+ case XML_ELEMENT_DECL:
+ case XML_ATTRIBUTE_DECL:
+ case XML_ENTITY_DECL:
+ continue; /* for */
+ }
+ if (last == NULL)
+ list = last = xmlCopyNode(set->nodeTab[i], 1);
+ else {
+ xmlAddNextSibling(last, xmlCopyNode(set->nodeTab[i], 1));
+ if (last->next != NULL)
+ last = last->next;
+ }
+ }
+ break;
+ }
+ case XPATH_LOCATIONSET: {
+ xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
+ if (set == NULL)
+ return(NULL);
+ for (i = 0;i < set->locNr;i++) {
+ if (last == NULL)
+ list = last = xmlXPtrBuildNodeList(set->locTab[i]);
+ else
+ xmlAddNextSibling(last,
+ xmlXPtrBuildNodeList(set->locTab[i]));
+ if (last != NULL) {
+ while (last->next != NULL)
+ last = last->next;
+ }
+ }
+ break;
+ }
+ case XPATH_RANGE:
+ return(xmlXPtrBuildRangeNodeList(obj));
+ case XPATH_POINT:
+ return(xmlCopyNode(obj->user, 0));
+ default:
+ break;
+ }
+ return(list);
+}
+
+/************************************************************************
+ * *
+ * XPointer functions *
+ * *
+ ************************************************************************/
+
+/**
+ * xmlXPtrNbLocChildren:
+ * @node: an xmlNodePtr
+ *
+ * Count the number of location children of @node or the length of the
+ * string value in case of text/PI/Comments nodes
+ *
+ * Returns the number of location children
+ */
+static int
+xmlXPtrNbLocChildren(xmlNodePtr node) {
+ int ret = 0;
+ if (node == NULL)
+ return(-1);
+ switch (node->type) {
+ case XML_HTML_DOCUMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_ELEMENT_NODE:
+ node = node->children;
+ while (node != NULL) {
+ if (node->type == XML_ELEMENT_NODE)
+ ret++;
+ node = node->next;
+ }
+ break;
+ case XML_ATTRIBUTE_NODE:
+ return(-1);
+
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ ret = xmlStrlen(node->content);
+ break;
+ default:
+ return(-1);
+ }
+ return(ret);
+}
+
+/**
+ * xmlXPtrHereFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing here() operation
+ * as described in 5.4.3
+ */
+static void
+xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+
+ if (ctxt->context->here == NULL)
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+
+ valuePush(ctxt, xmlXPtrNewLocationSetNodes(ctxt->context->here, NULL));
+}
+
+/**
+ * xmlXPtrOriginFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing origin() operation
+ * as described in 5.4.3
+ */
+static void
+xmlXPtrOriginFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ CHECK_ARITY(0);
+
+ if (ctxt->context->origin == NULL)
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+
+ valuePush(ctxt, xmlXPtrNewLocationSetNodes(ctxt->context->origin, NULL));
+}
+
+/**
+ * xmlXPtrStartPointFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing start-point() operation
+ * as described in 5.4.3
+ * ----------------
+ * location-set start-point(location-set)
+ *
+ * For each location x in the argument location-set, start-point adds a
+ * location of type point to the result location-set. That point represents
+ * the start point of location x and is determined by the following rules:
+ *
+ * - If x is of type point, the start point is x.
+ * - If x is of type range, the start point is the start point of x.
+ * - If x is of type root, element, text, comment, or processing instruction,
+ * - the container node of the start point is x and the index is 0.
+ * - If x is of type attribute or namespace, the function must signal a
+ * syntax error.
+ * ----------------
+ *
+ */
+static void
+xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr tmp, obj, point;
+ xmlLocationSetPtr newset = NULL;
+ xmlLocationSetPtr oldset = NULL;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_LOCATIONSET) &&
+ (ctxt->value->type != XPATH_NODESET)))
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+ obj = valuePop(ctxt);
+ if (obj->type == XPATH_NODESET) {
+ /*
+ * First convert to a location set
+ */
+ tmp = xmlXPtrNewLocationSetNodeSet(obj->nodesetval);
+ xmlXPathFreeObject(obj);
+ if (tmp == NULL)
+ XP_ERROR(XPATH_MEMORY_ERROR)
+ obj = tmp;
+ }
+
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL) {
+ xmlXPathFreeObject(obj);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ oldset = (xmlLocationSetPtr) obj->user;
+ if (oldset != NULL) {
+ int i;
+
+ for (i = 0; i < oldset->locNr; i++) {
+ tmp = oldset->locTab[i];
+ if (tmp == NULL)
+ continue;
+ point = NULL;
+ switch (tmp->type) {
+ case XPATH_POINT:
+ point = xmlXPtrNewPoint(tmp->user, tmp->index);
+ break;
+ case XPATH_RANGE: {
+ xmlNodePtr node = tmp->user;
+ if (node != NULL) {
+ if (node->type == XML_ATTRIBUTE_NODE) {
+ /* TODO: Namespace Nodes ??? */
+ xmlXPathFreeObject(obj);
+ xmlXPtrFreeLocationSet(newset);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+ point = xmlXPtrNewPoint(node, tmp->index);
+ }
+ break;
+ }
+ default:
+ /*** Should we raise an error ?
+ xmlXPathFreeObject(obj);
+ xmlXPathFreeObject(newset);
+ XP_ERROR(XPATH_INVALID_TYPE)
+ ***/
+ break;
+ }
+ if (point != NULL)
+ xmlXPtrLocationSetAdd(newset, point);
+ }
+ }
+ xmlXPathFreeObject(obj);
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+}
+
+/**
+ * xmlXPtrEndPointFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing end-point() operation
+ * as described in 5.4.3
+ * ----------------------------
+ * location-set end-point(location-set)
+ *
+ * For each location x in the argument location-set, end-point adds a
+ * location of type point to the result location-set. That point represents
+ * the end point of location x and is determined by the following rules:
+ *
+ * - If x is of type point, the resulting point is x.
+ * - If x is of type range, the resulting point is the end point of x.
+ * - If x is of type root or element, the container node of the resulting
+ * point is x and the index is the number of location children of x.
+ * - If x is of type text, comment, or processing instruction, the container
+ * node of the resulting point is x and the index is the length of the
+ * string-value of x.
+ * - If x is of type attribute or namespace, the function must signal a
+ * syntax error.
+ * ----------------------------
+ */
+static void
+xmlXPtrEndPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr tmp, obj, point;
+ xmlLocationSetPtr newset = NULL;
+ xmlLocationSetPtr oldset = NULL;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_LOCATIONSET) &&
+ (ctxt->value->type != XPATH_NODESET)))
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+ obj = valuePop(ctxt);
+ if (obj->type == XPATH_NODESET) {
+ /*
+ * First convert to a location set
+ */
+ tmp = xmlXPtrNewLocationSetNodeSet(obj->nodesetval);
+ xmlXPathFreeObject(obj);
+ if (tmp == NULL)
+ XP_ERROR(XPATH_MEMORY_ERROR)
+ obj = tmp;
+ }
+
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL) {
+ xmlXPathFreeObject(obj);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ oldset = (xmlLocationSetPtr) obj->user;
+ if (oldset != NULL) {
+ int i;
+
+ for (i = 0; i < oldset->locNr; i++) {
+ tmp = oldset->locTab[i];
+ if (tmp == NULL)
+ continue;
+ point = NULL;
+ switch (tmp->type) {
+ case XPATH_POINT:
+ point = xmlXPtrNewPoint(tmp->user, tmp->index);
+ break;
+ case XPATH_RANGE: {
+ xmlNodePtr node = tmp->user2;
+ if (node != NULL) {
+ if (node->type == XML_ATTRIBUTE_NODE) {
+ /* TODO: Namespace Nodes ??? */
+ xmlXPathFreeObject(obj);
+ xmlXPtrFreeLocationSet(newset);
+ XP_ERROR(XPTR_SYNTAX_ERROR);
+ }
+ point = xmlXPtrNewPoint(node, tmp->index2);
+ } else if (tmp->user == NULL) {
+ point = xmlXPtrNewPoint(node,
+ xmlXPtrNbLocChildren(node));
+ }
+ break;
+ }
+ default:
+ /*** Should we raise an error ?
+ xmlXPathFreeObject(obj);
+ xmlXPathFreeObject(newset);
+ XP_ERROR(XPATH_INVALID_TYPE)
+ ***/
+ break;
+ }
+ if (point != NULL)
+ xmlXPtrLocationSetAdd(newset, point);
+ }
+ }
+ xmlXPathFreeObject(obj);
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+}
+
+
+/**
+ * xmlXPtrCoveringRange:
+ * @ctxt: the XPointer Parser context
+ * @loc: the location for which the covering range must be computed
+ *
+ * A covering range is a range that wholly encompasses a location
+ * Section 5.3.3. Covering Ranges for All Location Types
+ * http://www.w3.org/TR/xptr#N2267
+ *
+ * Returns a new location or NULL in case of error
+ */
+static xmlXPathObjectPtr
+xmlXPtrCoveringRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
+ if (loc == NULL)
+ return(NULL);
+ if ((ctxt == NULL) || (ctxt->context == NULL) ||
+ (ctxt->context->doc == NULL))
+ return(NULL);
+ switch (loc->type) {
+ case XPATH_POINT:
+ return(xmlXPtrNewRange(loc->user, loc->index,
+ loc->user, loc->index));
+ case XPATH_RANGE:
+ if (loc->user2 != NULL) {
+ return(xmlXPtrNewRange(loc->user, loc->index,
+ loc->user2, loc->index2));
+ } else {
+ xmlNodePtr node = (xmlNodePtr) loc->user;
+ if (node == (xmlNodePtr) ctxt->context->doc) {
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlXPtrGetArity(node)));
+ } else {
+ switch (node->type) {
+ case XML_ATTRIBUTE_NODE:
+ /* !!! our model is slightly different than XPath */
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlXPtrGetArity(node)));
+ case XML_ELEMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE: {
+ int indx = xmlXPtrGetIndex(node);
+
+ node = node->parent;
+ return(xmlXPtrNewRange(node, indx - 1,
+ node, indx + 1));
+ }
+ default:
+ return(NULL);
+ }
+ }
+ }
+ default:
+ TODO /* missed one case ??? */
+ }
+ return(NULL);
+}
+
+/**
+ * xmlXPtrRangeFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing the range() function 5.4.3
+ * location-set range(location-set )
+ *
+ * The range function returns ranges covering the locations in
+ * the argument location-set. For each location x in the argument
+ * location-set, a range location representing the covering range of
+ * x is added to the result location-set.
+ */
+static void
+xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ int i;
+ xmlXPathObjectPtr set;
+ xmlLocationSetPtr oldset;
+ xmlLocationSetPtr newset;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_LOCATIONSET) &&
+ (ctxt->value->type != XPATH_NODESET)))
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+ set = valuePop(ctxt);
+ if (set->type == XPATH_NODESET) {
+ xmlXPathObjectPtr tmp;
+
+ /*
+ * First convert to a location set
+ */
+ tmp = xmlXPtrNewLocationSetNodeSet(set->nodesetval);
+ xmlXPathFreeObject(set);
+ if (tmp == NULL)
+ XP_ERROR(XPATH_MEMORY_ERROR)
+ set = tmp;
+ }
+ oldset = (xmlLocationSetPtr) set->user;
+
+ /*
+ * The loop is to compute the covering range for each item and add it
+ */
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL) {
+ xmlXPathFreeObject(set);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ for (i = 0;i < oldset->locNr;i++) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrCoveringRange(ctxt, oldset->locTab[i]));
+ }
+
+ /*
+ * Save the new value and cleanup
+ */
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+ xmlXPathFreeObject(set);
+}
+
+/**
+ * xmlXPtrInsideRange:
+ * @ctxt: the XPointer Parser context
+ * @loc: the location for which the inside range must be computed
+ *
+ * A inside range is a range described in the range-inside() description
+ *
+ * Returns a new location or NULL in case of error
+ */
+static xmlXPathObjectPtr
+xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) {
+ if (loc == NULL)
+ return(NULL);
+ if ((ctxt == NULL) || (ctxt->context == NULL) ||
+ (ctxt->context->doc == NULL))
+ return(NULL);
+ switch (loc->type) {
+ case XPATH_POINT: {
+ xmlNodePtr node = (xmlNodePtr) loc->user;
+ switch (node->type) {
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE: {
+ if (node->content == NULL) {
+ return(xmlXPtrNewRange(node, 0, node, 0));
+ } else {
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlStrlen(node->content)));
+ }
+ }
+ case XML_ATTRIBUTE_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE: {
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlXPtrGetArity(node)));
+ }
+ default:
+ break;
+ }
+ return(NULL);
+ }
+ case XPATH_RANGE: {
+ xmlNodePtr node = (xmlNodePtr) loc->user;
+ if (loc->user2 != NULL) {
+ return(xmlXPtrNewRange(node, loc->index,
+ loc->user2, loc->index2));
+ } else {
+ switch (node->type) {
+ case XML_PI_NODE:
+ case XML_COMMENT_NODE:
+ case XML_TEXT_NODE:
+ case XML_CDATA_SECTION_NODE: {
+ if (node->content == NULL) {
+ return(xmlXPtrNewRange(node, 0, node, 0));
+ } else {
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlStrlen(node->content)));
+ }
+ }
+ case XML_ATTRIBUTE_NODE:
+ case XML_ELEMENT_NODE:
+ case XML_ENTITY_REF_NODE:
+ case XML_DOCUMENT_NODE:
+ case XML_NOTATION_NODE:
+ case XML_HTML_DOCUMENT_NODE: {
+ return(xmlXPtrNewRange(node, 0, node,
+ xmlXPtrGetArity(node)));
+ }
+ default:
+ break;
+ }
+ return(NULL);
+ }
+ }
+ default:
+ TODO /* missed one case ??? */
+ }
+ return(NULL);
+}
+
+/**
+ * xmlXPtrRangeInsideFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing the range-inside() function 5.4.3
+ * location-set range-inside(location-set )
+ *
+ * The range-inside function returns ranges covering the contents of
+ * the locations in the argument location-set. For each location x in
+ * the argument location-set, a range location is added to the result
+ * location-set. If x is a range location, then x is added to the
+ * result location-set. If x is not a range location, then x is used
+ * as the container location of the start and end points of the range
+ * location to be added; the index of the start point of the range is
+ * zero; if the end point is a character point then its index is the
+ * length of the string-value of x, and otherwise is the number of
+ * location children of x.
+ *
+ */
+static void
+xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ int i;
+ xmlXPathObjectPtr set;
+ xmlLocationSetPtr oldset;
+ xmlLocationSetPtr newset;
+
+ CHECK_ARITY(1);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_LOCATIONSET) &&
+ (ctxt->value->type != XPATH_NODESET)))
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+ set = valuePop(ctxt);
+ if (set->type == XPATH_NODESET) {
+ xmlXPathObjectPtr tmp;
+
+ /*
+ * First convert to a location set
+ */
+ tmp = xmlXPtrNewLocationSetNodeSet(set->nodesetval);
+ xmlXPathFreeObject(set);
+ if (tmp == NULL)
+ XP_ERROR(XPATH_MEMORY_ERROR)
+ set = tmp;
+ }
+ oldset = (xmlLocationSetPtr) set->user;
+
+ /*
+ * The loop is to compute the covering range for each item and add it
+ */
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL) {
+ xmlXPathFreeObject(set);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ for (i = 0;i < oldset->locNr;i++) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrInsideRange(ctxt, oldset->locTab[i]));
+ }
+
+ /*
+ * Save the new value and cleanup
+ */
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+ xmlXPathFreeObject(set);
+}
+
+/**
+ * xmlXPtrRangeToFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Implement the range-to() XPointer function
+ */
+void
+xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ xmlXPathObjectPtr range;
+ const xmlChar *cur;
+ xmlXPathObjectPtr res, obj;
+ xmlXPathObjectPtr tmp;
+ xmlLocationSetPtr newset = NULL;
+ xmlNodeSetPtr oldset;
+ int i;
+
+ if (ctxt == NULL) return;
+ CHECK_ARITY(1);
+ /*
+ * Save the expression pointer since we will have to evaluate
+ * it multiple times. Initialize the new set.
+ */
+ CHECK_TYPE(XPATH_NODESET);
+ obj = valuePop(ctxt);
+ oldset = obj->nodesetval;
+ ctxt->context->node = NULL;
+
+ cur = ctxt->cur;
+ newset = xmlXPtrLocationSetCreate(NULL);
+
+ for (i = 0; i < oldset->nodeNr; i++) {
+ ctxt->cur = cur;
+
+ /*
+ * Run the evaluation with a node list made of a single item
+ * in the nodeset.
+ */
+ ctxt->context->node = oldset->nodeTab[i];
+ tmp = xmlXPathNewNodeSet(ctxt->context->node);
+ valuePush(ctxt, tmp);
+
+ xmlXPathEvalExpr(ctxt);
+ CHECK_ERROR;
+
+ /*
+ * The result of the evaluation need to be tested to
+ * decided whether the filter succeeded or not
+ */
+ res = valuePop(ctxt);
+ range = xmlXPtrNewRangeNodeObject(oldset->nodeTab[i], res);
+ if (range != NULL) {
+ xmlXPtrLocationSetAdd(newset, range);
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL)
+ xmlXPathFreeObject(res);
+ if (ctxt->value == tmp) {
+ res = valuePop(ctxt);
+ xmlXPathFreeObject(res);
+ }
+
+ ctxt->context->node = NULL;
+ }
+
+ /*
+ * The result is used as the new evaluation set.
+ */
+ xmlXPathFreeObject(obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+}
+
+/**
+ * xmlXPtrAdvanceNode:
+ * @cur: the node
+ * @level: incremented/decremented to show level in tree
+ *
+ * Advance to the next element or text node in document order
+ * TODO: add a stack for entering/exiting entities
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+xmlNodePtr
+xmlXPtrAdvanceNode(xmlNodePtr cur, int *level) {
+next:
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(NULL);
+ if (cur->children != NULL) {
+ cur = cur->children ;
+ if (level != NULL)
+ (*level)++;
+ goto found;
+ }
+skip: /* This label should only be needed if something is wrong! */
+ if (cur->next != NULL) {
+ cur = cur->next;
+ goto found;
+ }
+ do {
+ cur = cur->parent;
+ if (level != NULL)
+ (*level)--;
+ if (cur == NULL) return(NULL);
+ if (cur->next != NULL) {
+ cur = cur->next;
+ goto found;
+ }
+ } while (cur != NULL);
+
+found:
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->type != XML_TEXT_NODE) &&
+ (cur->type != XML_DOCUMENT_NODE) &&
+ (cur->type != XML_HTML_DOCUMENT_NODE) &&
+ (cur->type != XML_CDATA_SECTION_NODE)) {
+ if (cur->type == XML_ENTITY_REF_NODE) { /* Shouldn't happen */
+ TODO
+ goto skip;
+ }
+ goto next;
+ }
+ return(cur);
+}
+
+/**
+ * xmlXPtrAdvanceChar:
+ * @node: the node
+ * @indx: the indx
+ * @bytes: the number of bytes
+ *
+ * Advance a point of the associated number of bytes (not UTF8 chars)
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+static int
+xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) {
+ xmlNodePtr cur;
+ int pos;
+ int len;
+
+ if ((node == NULL) || (indx == NULL))
+ return(-1);
+ cur = *node;
+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
+ return(-1);
+ pos = *indx;
+
+ while (bytes >= 0) {
+ /*
+ * First position to the beginning of the first text node
+ * corresponding to this point
+ */
+ while ((cur != NULL) &&
+ ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE))) {
+ if (pos > 0) {
+ cur = xmlXPtrGetNthChild(cur, pos);
+ pos = 0;
+ } else {
+ cur = xmlXPtrAdvanceNode(cur, NULL);
+ pos = 0;
+ }
+ }
+
+ if (cur == NULL) {
+ *node = NULL;
+ *indx = 0;
+ return(-1);
+ }
+
+ /*
+ * if there is no move needed return the current value.
+ */
+ if (pos == 0) pos = 1;
+ if (bytes == 0) {
+ *node = cur;
+ *indx = pos;
+ return(0);
+ }
+ /*
+ * We should have a text (or cdata) node ...
+ */
+ len = 0;
+ if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->content != NULL)) {
+ len = xmlStrlen(cur->content);
+ }
+ if (pos > len) {
+ /* Strange, the indx in the text node is greater than it's len */
+ STRANGE
+ pos = len;
+ }
+ if (pos + bytes >= len) {
+ bytes -= (len - pos);
+ cur = xmlXPtrAdvanceNode(cur, NULL);
+ pos = 0;
+ } else if (pos + bytes < len) {
+ pos += bytes;
+ *node = cur;
+ *indx = pos;
+ return(0);
+ }
+ }
+ return(-1);
+}
+
+/**
+ * xmlXPtrMatchString:
+ * @string: the string to search
+ * @start: the start textnode
+ * @startindex: the start index
+ * @end: the end textnode IN/OUT
+ * @endindex: the end index IN/OUT
+ *
+ * Check whether the document contains @string at the position
+ * (@start, @startindex) and limited by the (@end, @endindex) point
+ *
+ * Returns -1 in case of failure, 0 if not found, 1 if found in which case
+ * (@start, @startindex) will indicate the position of the beginning
+ * of the range and (@end, @endindex) will indicate the end
+ * of the range
+ */
+static int
+xmlXPtrMatchString(const xmlChar *string, xmlNodePtr start, int startindex,
+ xmlNodePtr *end, int *endindex) {
+ xmlNodePtr cur;
+ int pos; /* 0 based */
+ int len; /* in bytes */
+ int stringlen; /* in bytes */
+ int match;
+
+ if (string == NULL)
+ return(-1);
+ if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
+ return(-1);
+ if ((end == NULL) || (*end == NULL) ||
+ ((*end)->type == XML_NAMESPACE_DECL) || (endindex == NULL))
+ return(-1);
+ cur = start;
+ pos = startindex - 1;
+ stringlen = xmlStrlen(string);
+
+ while (stringlen > 0) {
+ if ((cur == *end) && (pos + stringlen > *endindex))
+ return(0);
+
+ if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
+ len = xmlStrlen(cur->content);
+ if (len >= pos + stringlen) {
+ match = (!xmlStrncmp(&cur->content[pos], string, stringlen));
+ if (match) {
+#ifdef DEBUG_RANGES
+ xmlGenericError(xmlGenericErrorContext,
+ "found range %d bytes at index %d of ->",
+ stringlen, pos + 1);
+ xmlDebugDumpString(stdout, cur->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ *end = cur;
+ *endindex = pos + stringlen;
+ return(1);
+ } else {
+ return(0);
+ }
+ } else {
+ int sub = len - pos;
+ match = (!xmlStrncmp(&cur->content[pos], string, sub));
+ if (match) {
+#ifdef DEBUG_RANGES
+ xmlGenericError(xmlGenericErrorContext,
+ "found subrange %d bytes at index %d of ->",
+ sub, pos + 1);
+ xmlDebugDumpString(stdout, cur->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ string = &string[sub];
+ stringlen -= sub;
+ } else {
+ return(0);
+ }
+ }
+ }
+ cur = xmlXPtrAdvanceNode(cur, NULL);
+ if (cur == NULL)
+ return(0);
+ pos = 0;
+ }
+ return(1);
+}
+
+/**
+ * xmlXPtrSearchString:
+ * @string: the string to search
+ * @start: the start textnode IN/OUT
+ * @startindex: the start index IN/OUT
+ * @end: the end textnode
+ * @endindex: the end index
+ *
+ * Search the next occurrence of @string within the document content
+ * until the (@end, @endindex) point is reached
+ *
+ * Returns -1 in case of failure, 0 if not found, 1 if found in which case
+ * (@start, @startindex) will indicate the position of the beginning
+ * of the range and (@end, @endindex) will indicate the end
+ * of the range
+ */
+static int
+xmlXPtrSearchString(const xmlChar *string, xmlNodePtr *start, int *startindex,
+ xmlNodePtr *end, int *endindex) {
+ xmlNodePtr cur;
+ const xmlChar *str;
+ int pos; /* 0 based */
+ int len; /* in bytes */
+ xmlChar first;
+
+ if (string == NULL)
+ return(-1);
+ if ((start == NULL) || (*start == NULL) ||
+ ((*start)->type == XML_NAMESPACE_DECL) || (startindex == NULL))
+ return(-1);
+ if ((end == NULL) || (endindex == NULL))
+ return(-1);
+ cur = *start;
+ pos = *startindex - 1;
+ first = string[0];
+
+ while (cur != NULL) {
+ if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
+ len = xmlStrlen(cur->content);
+ while (pos <= len) {
+ if (first != 0) {
+ str = xmlStrchr(&cur->content[pos], first);
+ if (str != NULL) {
+ pos = (str - (xmlChar *)(cur->content));
+#ifdef DEBUG_RANGES
+ xmlGenericError(xmlGenericErrorContext,
+ "found '%c' at index %d of ->",
+ first, pos + 1);
+ xmlDebugDumpString(stdout, cur->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ if (xmlXPtrMatchString(string, cur, pos + 1,
+ end, endindex)) {
+ *start = cur;
+ *startindex = pos + 1;
+ return(1);
+ }
+ pos++;
+ } else {
+ pos = len + 1;
+ }
+ } else {
+ /*
+ * An empty string is considered to match before each
+ * character of the string-value and after the final
+ * character.
+ */
+#ifdef DEBUG_RANGES
+ xmlGenericError(xmlGenericErrorContext,
+ "found '' at index %d of ->",
+ pos + 1);
+ xmlDebugDumpString(stdout, cur->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ *start = cur;
+ *startindex = pos + 1;
+ *end = cur;
+ *endindex = pos + 1;
+ return(1);
+ }
+ }
+ }
+ if ((cur == *end) && (pos >= *endindex))
+ return(0);
+ cur = xmlXPtrAdvanceNode(cur, NULL);
+ if (cur == NULL)
+ return(0);
+ pos = 1;
+ }
+ return(0);
+}
+
+/**
+ * xmlXPtrGetLastChar:
+ * @node: the node
+ * @index: the index
+ *
+ * Computes the point coordinates of the last char of this point
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+static int
+xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) {
+ xmlNodePtr cur;
+ int pos, len = 0;
+
+ if ((node == NULL) || (*node == NULL) ||
+ ((*node)->type == XML_NAMESPACE_DECL) || (indx == NULL))
+ return(-1);
+ cur = *node;
+ pos = *indx;
+
+ if ((cur->type == XML_ELEMENT_NODE) ||
+ (cur->type == XML_DOCUMENT_NODE) ||
+ (cur->type == XML_HTML_DOCUMENT_NODE)) {
+ if (pos > 0) {
+ cur = xmlXPtrGetNthChild(cur, pos);
+ }
+ }
+ while (cur != NULL) {
+ if (cur->last != NULL)
+ cur = cur->last;
+ else if ((cur->type != XML_ELEMENT_NODE) &&
+ (cur->content != NULL)) {
+ len = xmlStrlen(cur->content);
+ break;
+ } else {
+ return(-1);
+ }
+ }
+ if (cur == NULL)
+ return(-1);
+ *node = cur;
+ *indx = len;
+ return(0);
+}
+
+/**
+ * xmlXPtrGetStartPoint:
+ * @obj: an range
+ * @node: the resulting node
+ * @indx: the resulting index
+ *
+ * read the object and return the start point coordinates.
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+static int
+xmlXPtrGetStartPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
+ if ((obj == NULL) || (node == NULL) || (indx == NULL))
+ return(-1);
+
+ switch (obj->type) {
+ case XPATH_POINT:
+ *node = obj->user;
+ if (obj->index <= 0)
+ *indx = 0;
+ else
+ *indx = obj->index;
+ return(0);
+ case XPATH_RANGE:
+ *node = obj->user;
+ if (obj->index <= 0)
+ *indx = 0;
+ else
+ *indx = obj->index;
+ return(0);
+ default:
+ break;
+ }
+ return(-1);
+}
+
+/**
+ * xmlXPtrGetEndPoint:
+ * @obj: an range
+ * @node: the resulting node
+ * @indx: the resulting indx
+ *
+ * read the object and return the end point coordinates.
+ *
+ * Returns -1 in case of failure, 0 otherwise
+ */
+static int
+xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
+ if ((obj == NULL) || (node == NULL) || (indx == NULL))
+ return(-1);
+
+ switch (obj->type) {
+ case XPATH_POINT:
+ *node = obj->user;
+ if (obj->index <= 0)
+ *indx = 0;
+ else
+ *indx = obj->index;
+ return(0);
+ case XPATH_RANGE:
+ *node = obj->user;
+ if (obj->index <= 0)
+ *indx = 0;
+ else
+ *indx = obj->index;
+ return(0);
+ default:
+ break;
+ }
+ return(-1);
+}
+
+/**
+ * xmlXPtrStringRangeFunction:
+ * @ctxt: the XPointer Parser context
+ * @nargs: the number of args
+ *
+ * Function implementing the string-range() function
+ * range as described in 5.4.2
+ *
+ * ------------------------------
+ * [Definition: For each location in the location-set argument,
+ * string-range returns a set of string ranges, a set of substrings in a
+ * string. Specifically, the string-value of the location is searched for
+ * substrings that match the string argument, and the resulting location-set
+ * will contain a range location for each non-overlapping match.]
+ * An empty string is considered to match before each character of the
+ * string-value and after the final character. Whitespace in a string
+ * is matched literally, with no normalization except that provided by
+ * XML for line ends. The third argument gives the position of the first
+ * character to be in the resulting range, relative to the start of the
+ * match. The default value is 1, which makes the range start immediately
+ * before the first character of the matched string. The fourth argument
+ * gives the number of characters in the range; the default is that the
+ * range extends to the end of the matched string.
+ *
+ * Element boundaries, as well as entire embedded nodes such as processing
+ * instructions and comments, are ignored as defined in [XPath].
+ *
+ * If the string in the second argument is not found in the string-value
+ * of the location, or if a value in the third or fourth argument indicates
+ * a string that is beyond the beginning or end of the document, the
+ * expression fails.
+ *
+ * The points of the range-locations in the returned location-set will
+ * all be character points.
+ * ------------------------------
+ */
+static void
+xmlXPtrStringRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+ int i, startindex, endindex = 0, fendindex;
+ xmlNodePtr start, end = 0, fend;
+ xmlXPathObjectPtr set;
+ xmlLocationSetPtr oldset;
+ xmlLocationSetPtr newset;
+ xmlXPathObjectPtr string;
+ xmlXPathObjectPtr position = NULL;
+ xmlXPathObjectPtr number = NULL;
+ int found, pos = 0, num = 0;
+
+ /*
+ * Grab the arguments
+ */
+ if ((nargs < 2) || (nargs > 4))
+ XP_ERROR(XPATH_INVALID_ARITY);
+
+ if (nargs >= 4) {
+ CHECK_TYPE(XPATH_NUMBER);
+ number = valuePop(ctxt);
+ if (number != NULL)
+ num = (int) number->floatval;
+ }
+ if (nargs >= 3) {
+ CHECK_TYPE(XPATH_NUMBER);
+ position = valuePop(ctxt);
+ if (position != NULL)
+ pos = (int) position->floatval;
+ }
+ CHECK_TYPE(XPATH_STRING);
+ string = valuePop(ctxt);
+ if ((ctxt->value == NULL) ||
+ ((ctxt->value->type != XPATH_LOCATIONSET) &&
+ (ctxt->value->type != XPATH_NODESET)))
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+ set = valuePop(ctxt);
+ newset = xmlXPtrLocationSetCreate(NULL);
+ if (newset == NULL) {
+ xmlXPathFreeObject(set);
+ XP_ERROR(XPATH_MEMORY_ERROR);
+ }
+ if (set->nodesetval == NULL) {
+ goto error;
+ }
+ if (set->type == XPATH_NODESET) {
+ xmlXPathObjectPtr tmp;
+
+ /*
+ * First convert to a location set
+ */
+ tmp = xmlXPtrNewLocationSetNodeSet(set->nodesetval);
+ xmlXPathFreeObject(set);
+ if (tmp == NULL)
+ XP_ERROR(XPATH_MEMORY_ERROR)
+ set = tmp;
+ }
+ oldset = (xmlLocationSetPtr) set->user;
+
+ /*
+ * The loop is to search for each element in the location set
+ * the list of location set corresponding to that search
+ */
+ for (i = 0;i < oldset->locNr;i++) {
+#ifdef DEBUG_RANGES
+ xmlXPathDebugDumpObject(stdout, oldset->locTab[i], 0);
+#endif
+
+ xmlXPtrGetStartPoint(oldset->locTab[i], &start, &startindex);
+ xmlXPtrGetEndPoint(oldset->locTab[i], &end, &endindex);
+ xmlXPtrAdvanceChar(&start, &startindex, 0);
+ xmlXPtrGetLastChar(&end, &endindex);
+
+#ifdef DEBUG_RANGES
+ xmlGenericError(xmlGenericErrorContext,
+ "from index %d of ->", startindex);
+ xmlDebugDumpString(stdout, start->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+ xmlGenericError(xmlGenericErrorContext,
+ "to index %d of ->", endindex);
+ xmlDebugDumpString(stdout, end->content);
+ xmlGenericError(xmlGenericErrorContext, "\n");
+#endif
+ do {
+ fend = end;
+ fendindex = endindex;
+ found = xmlXPtrSearchString(string->stringval, &start, &startindex,
+ &fend, &fendindex);
+ if (found == 1) {
+ if (position == NULL) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrNewRange(start, startindex, fend, fendindex));
+ } else if (xmlXPtrAdvanceChar(&start, &startindex,
+ pos - 1) == 0) {
+ if ((number != NULL) && (num > 0)) {
+ int rindx;
+ xmlNodePtr rend;
+ rend = start;
+ rindx = startindex - 1;
+ if (xmlXPtrAdvanceChar(&rend, &rindx,
+ num) == 0) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrNewRange(start, startindex,
+ rend, rindx));
+ }
+ } else if ((number != NULL) && (num <= 0)) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrNewRange(start, startindex,
+ start, startindex));
+ } else {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPtrNewRange(start, startindex,
+ fend, fendindex));
+ }
+ }
+ start = fend;
+ startindex = fendindex;
+ if (string->stringval[0] == 0)
+ startindex++;
+ }
+ } while (found == 1);
+ }
+
+ /*
+ * Save the new value and cleanup
+ */
+error:
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+ xmlXPathFreeObject(set);
+ xmlXPathFreeObject(string);
+ if (position) xmlXPathFreeObject(position);
+ if (number) xmlXPathFreeObject(number);
+}
+
+/**
+ * xmlXPtrEvalRangePredicate:
+ * @ctxt: the XPointer Parser context
+ *
+ * [8] Predicate ::= '[' PredicateExpr ']'
+ * [9] PredicateExpr ::= Expr
+ *
+ * Evaluate a predicate as in xmlXPathEvalPredicate() but for
+ * a Location Set instead of a node set
+ */
+void
+xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt) {
+ const xmlChar *cur;
+ xmlXPathObjectPtr res;
+ xmlXPathObjectPtr obj, tmp;
+ xmlLocationSetPtr newset = NULL;
+ xmlLocationSetPtr oldset;
+ int i;
+
+ if (ctxt == NULL) return;
+
+ SKIP_BLANKS;
+ if (CUR != '[') {
+ XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);
+ }
+ NEXT;
+ SKIP_BLANKS;
+
+ /*
+ * Extract the old set, and then evaluate the result of the
+ * expression for all the element in the set. use it to grow
+ * up a new set.
+ */
+ CHECK_TYPE(XPATH_LOCATIONSET);
+ obj = valuePop(ctxt);
+ oldset = obj->user;
+ ctxt->context->node = NULL;
+
+ if ((oldset == NULL) || (oldset->locNr == 0)) {
+ ctxt->context->contextSize = 0;
+ ctxt->context->proximityPosition = 0;
+ xmlXPathEvalExpr(ctxt);
+ res = valuePop(ctxt);
+ if (res != NULL)
+ xmlXPathFreeObject(res);
+ valuePush(ctxt, obj);
+ CHECK_ERROR;
+ } else {
+ /*
+ * Save the expression pointer since we will have to evaluate
+ * it multiple times. Initialize the new set.
+ */
+ cur = ctxt->cur;
+ newset = xmlXPtrLocationSetCreate(NULL);
+
+ for (i = 0; i < oldset->locNr; i++) {
+ ctxt->cur = cur;
+
+ /*
+ * Run the evaluation with a node list made of a single item
+ * in the nodeset.
+ */
+ ctxt->context->node = oldset->locTab[i]->user;
+ tmp = xmlXPathNewNodeSet(ctxt->context->node);
+ valuePush(ctxt, tmp);
+ ctxt->context->contextSize = oldset->locNr;
+ ctxt->context->proximityPosition = i + 1;
+
+ xmlXPathEvalExpr(ctxt);
+ CHECK_ERROR;
+
+ /*
+ * The result of the evaluation need to be tested to
+ * decided whether the filter succeeded or not
+ */
+ res = valuePop(ctxt);
+ if (xmlXPathEvaluatePredicateResult(ctxt, res)) {
+ xmlXPtrLocationSetAdd(newset,
+ xmlXPathObjectCopy(oldset->locTab[i]));
+ }
+
+ /*
+ * Cleanup
+ */
+ if (res != NULL)
+ xmlXPathFreeObject(res);
+ if (ctxt->value == tmp) {
+ res = valuePop(ctxt);
+ xmlXPathFreeObject(res);
+ }
+
+ ctxt->context->node = NULL;
+ }
+
+ /*
+ * The result is used as the new evaluation set.
+ */
+ xmlXPathFreeObject(obj);
+ ctxt->context->node = NULL;
+ ctxt->context->contextSize = -1;
+ ctxt->context->proximityPosition = -1;
+ valuePush(ctxt, xmlXPtrWrapLocationSet(newset));
+ }
+ if (CUR != ']') {
+ XP_ERROR(XPATH_INVALID_PREDICATE_ERROR);
+ }
+
+ NEXT;
+ SKIP_BLANKS;
+}
+
+#define bottom_xpointer
+#include "elfgcchack.h"
+#endif
+
diff --git a/xstc/Makefile.am b/xstc/Makefile.am
new file mode 100644
index 0000000..5ef1819
--- /dev/null
+++ b/xstc/Makefile.am
@@ -0,0 +1,132 @@
+#
+# Definition for the tests from W3C
+#
+PYSCRIPTS=nist-test.py ms-test.py sun-test.py
+TESTDIR=Tests
+TESTDIRS=$(TESTDIR)/msxsdtest $(TESTDIR)/suntest $(TESTDIR)/Datatypes
+TARBALL=xsts-2002-01-16.tar.gz
+TARBALL_2=xsts-2004-01-14.tar.gz
+TSNAME=xmlschema2002-01-16
+TSNAME_2=xmlschema2004-01-14
+TARBALLURL=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME)/$(TARBALL)
+TARBALLURL_2=http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME_2)/$(TARBALL_2)
+MSTESTDEF=MSXMLSchema1-0-20020116.testSet
+SUNTESTDEF=SunXMLSchema1-0-20020116.testSet
+NISTTESTDEF=NISTXMLSchema1-0-20020116.testSet
+NISTTESTDEF_2=NISTXMLSchemaDatatypes.testSet
+
+#
+# The local data and scripts
+#
+EXTRA_DIST=xstc.py xstc-to-python.xsl
+#
+# Nothing is done by make, only make tests and
+# only if Python and Schemas are enabled.
+#
+all:
+
+#
+# Rule to load the test description and extract the informations
+#
+$(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Metadata/$(MSTTESTDEF) Tests/Metadata/$(SUNTESTDEF):
+ -@(if [ ! -d Tests ] ; then \
+ mkdir Tests ; \
+ fi)
+ -@(if [ ! -f $(TARBALL_2) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL_2) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL_2) $(TARBALL_2) ; else \
+ echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL_2) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL_2) ] ; then \
+ echo -n "extracting test data (NIST)..." ; \
+ $(TAR) -xzf $(TARBALL_2) --wildcards '*/Datatypes' '*/Metadata/$(NISTTESTDEF_2)' ; \
+ echo "done" ; \
+ fi)
+ -@(if [ ! -f $(TARBALL) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL) $(TARBALL) ; else \
+ echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL) ] ; then \
+ echo -n "extracting test data (Sun, Microsoft)..." ; \
+ $(TAR) -C Tests -xzf $(TARBALL) --wildcards '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
+ if [ -d Tests/suntest ] ; then rm -r Tests/suntest ; fi ; \
+ if [ -d Tests/msxsdtest ] ; then rm -r Tests/msxsdtest ; fi ; \
+ mv Tests/xmlschema2002-01-16/* Tests ; \
+ mv Tests/*.testSet Tests/Metadata ; \
+ rm -r Tests/xmlschema2002-01-16 ; \
+ echo "done" ; \
+ fi)
+
+#
+# The python tests are generated via XSLT
+#
+nist-test.py: Tests/Metadata/$(NISTTESTDEF_2) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (NIST)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor NIST-2 \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(NISTTESTDEF_2) > $@ ; \
+ chmod +x $@ ; fi )
+
+ms-test.py: Tests/Metadata/$(MSTTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Microsoft)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor MS \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(MSTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+sun-test.py: Tests/Metadata/$(SUNTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Sun)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor SUN \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(SUNTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+#
+# The actual test run if present. PYTHONPATH is updated to make sure
+# we run the version from the loacl build and not preinstalled bindings
+#
+pytests: $(PYSCRIPTS) $(TESTDIRS)
+ -@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then \
+ echo "## Running XML Schema tests (NIST)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then \
+ echo "## Running Schema tests (Sun)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then \
+ echo "## Running Schema tests (Microsoft)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi)
+
+tests:
+ -@(if [ -x $(PYTHON) ] ; then \
+ $(MAKE) pytests ; fi);
+
+#
+# Heavy, works well only on RHEL3
+#
+valgrind:
+ -@(if [ -x $(PYTHON) ] ; then \
+ echo '## Running the regression tests under Valgrind' ; \
+ $(MAKE) CHECKER='valgrind -q' pytests ; fi);
+
+CLEANFILES=$(PYSCRIPTS) test.log
+
diff --git a/xstc/Makefile.in b/xstc/Makefile.in
new file mode 100644
index 0000000..2a9f034
--- /dev/null
+++ b/xstc/Makefile.in
@@ -0,0 +1,668 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = xstc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASE_THREAD_LIBS = @BASE_THREAD_LIBS@
+C14N_OBJ = @C14N_OBJ@
+CATALOG_OBJ = @CATALOG_OBJ@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+CYGWIN_EXTRA_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@
+CYGWIN_EXTRA_PYTHON_LIBADD = @CYGWIN_EXTRA_PYTHON_LIBADD@
+DEBUG_OBJ = @DEBUG_OBJ@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOCB_OBJ = @DOCB_OBJ@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FTP_OBJ = @FTP_OBJ@
+GREP = @GREP@
+HAVE_ISINF = @HAVE_ISINF@
+HAVE_ISNAN = @HAVE_ISNAN@
+HTML_DIR = @HTML_DIR@
+HTML_OBJ = @HTML_OBJ@
+HTTP_OBJ = @HTTP_OBJ@
+ICONV_LIBS = @ICONV_LIBS@
+ICU_LIBS = @ICU_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML_MAJOR_VERSION = @LIBXML_MAJOR_VERSION@
+LIBXML_MICRO_VERSION = @LIBXML_MICRO_VERSION@
+LIBXML_MINOR_VERSION = @LIBXML_MINOR_VERSION@
+LIBXML_VERSION = @LIBXML_VERSION@
+LIBXML_VERSION_EXTRA = @LIBXML_VERSION_EXTRA@
+LIBXML_VERSION_INFO = @LIBXML_VERSION_INFO@
+LIBXML_VERSION_NUMBER = @LIBXML_VERSION_NUMBER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LZMA_CFLAGS = @LZMA_CFLAGS@
+LZMA_LIBS = @LZMA_LIBS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MODULE_EXTENSION = @MODULE_EXTENSION@
+MODULE_PLATFORM_LIBS = @MODULE_PLATFORM_LIBS@
+MV = @MV@
+M_LIBS = @M_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PYTHON = @PYTHON@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_SITE_PACKAGES = @PYTHON_SITE_PACKAGES@
+PYTHON_SUBDIR = @PYTHON_SUBDIR@
+PYTHON_TESTS = @PYTHON_TESTS@
+PYTHON_VERSION = @PYTHON_VERSION@
+RANLIB = @RANLIB@
+RDL_LIBS = @RDL_LIBS@
+READER_TEST = @READER_TEST@
+RELDATE = @RELDATE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STATIC_BINARIES = @STATIC_BINARIES@
+STRIP = @STRIP@
+TAR = @TAR@
+TEST_C14N = @TEST_C14N@
+TEST_CATALOG = @TEST_CATALOG@
+TEST_DEBUG = @TEST_DEBUG@
+TEST_HTML = @TEST_HTML@
+TEST_MODULES = @TEST_MODULES@
+TEST_PATTERN = @TEST_PATTERN@
+TEST_PHTML = @TEST_PHTML@
+TEST_PUSH = @TEST_PUSH@
+TEST_REGEXPS = @TEST_REGEXPS@
+TEST_SAX = @TEST_SAX@
+TEST_SCHEMAS = @TEST_SCHEMAS@
+TEST_SCHEMATRON = @TEST_SCHEMATRON@
+TEST_THREADS = @TEST_THREADS@
+TEST_VALID = @TEST_VALID@
+TEST_VTIME = @TEST_VTIME@
+TEST_XINCLUDE = @TEST_XINCLUDE@
+TEST_XPATH = @TEST_XPATH@
+TEST_XPTR = @TEST_XPTR@
+THREAD_CFLAGS = @THREAD_CFLAGS@
+THREAD_LIBS = @THREAD_LIBS@
+VERSION = @VERSION@
+VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
+WGET = @WGET@
+WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
+WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
+WIN32_EXTRA_PYTHON_LIBADD = @WIN32_EXTRA_PYTHON_LIBADD@
+WITH_C14N = @WITH_C14N@
+WITH_CATALOG = @WITH_CATALOG@
+WITH_DEBUG = @WITH_DEBUG@
+WITH_DOCB = @WITH_DOCB@
+WITH_FTP = @WITH_FTP@
+WITH_HTML = @WITH_HTML@
+WITH_HTTP = @WITH_HTTP@
+WITH_ICONV = @WITH_ICONV@
+WITH_ICU = @WITH_ICU@
+WITH_ISO8859X = @WITH_ISO8859X@
+WITH_LEGACY = @WITH_LEGACY@
+WITH_LZMA = @WITH_LZMA@
+WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
+WITH_MODULES = @WITH_MODULES@
+WITH_OUTPUT = @WITH_OUTPUT@
+WITH_PATTERN = @WITH_PATTERN@
+WITH_PUSH = @WITH_PUSH@
+WITH_READER = @WITH_READER@
+WITH_REGEXPS = @WITH_REGEXPS@
+WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
+WITH_SAX1 = @WITH_SAX1@
+WITH_SCHEMAS = @WITH_SCHEMAS@
+WITH_SCHEMATRON = @WITH_SCHEMATRON@
+WITH_THREADS = @WITH_THREADS@
+WITH_THREAD_ALLOC = @WITH_THREAD_ALLOC@
+WITH_TREE = @WITH_TREE@
+WITH_TRIO = @WITH_TRIO@
+WITH_VALID = @WITH_VALID@
+WITH_WRITER = @WITH_WRITER@
+WITH_XINCLUDE = @WITH_XINCLUDE@
+WITH_XPATH = @WITH_XPATH@
+WITH_XPTR = @WITH_XPTR@
+WITH_ZLIB = @WITH_ZLIB@
+XINCLUDE_OBJ = @XINCLUDE_OBJ@
+XMLLINT = @XMLLINT@
+XML_CFLAGS = @XML_CFLAGS@
+XML_INCLUDEDIR = @XML_INCLUDEDIR@
+XML_LIBDIR = @XML_LIBDIR@
+XML_LIBS = @XML_LIBS@
+XML_LIBTOOLLIBS = @XML_LIBTOOLLIBS@
+XPATH_OBJ = @XPATH_OBJ@
+XPTR_OBJ = @XPTR_OBJ@
+XSLTPROC = @XSLTPROC@
+Z_CFLAGS = @Z_CFLAGS@
+Z_LIBS = @Z_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#
+# Definition for the tests from W3C
+#
+PYSCRIPTS = nist-test.py ms-test.py sun-test.py
+TESTDIR = Tests
+TESTDIRS = $(TESTDIR)/msxsdtest $(TESTDIR)/suntest $(TESTDIR)/Datatypes
+TARBALL = xsts-2002-01-16.tar.gz
+TARBALL_2 = xsts-2004-01-14.tar.gz
+TSNAME = xmlschema2002-01-16
+TSNAME_2 = xmlschema2004-01-14
+TARBALLURL = http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME)/$(TARBALL)
+TARBALLURL_2 = http://www.w3.org/XML/2004/xml-schema-test-suite/$(TSNAME_2)/$(TARBALL_2)
+MSTESTDEF = MSXMLSchema1-0-20020116.testSet
+SUNTESTDEF = SunXMLSchema1-0-20020116.testSet
+NISTTESTDEF = NISTXMLSchema1-0-20020116.testSet
+NISTTESTDEF_2 = NISTXMLSchemaDatatypes.testSet
+
+#
+# The local data and scripts
+#
+EXTRA_DIST = xstc.py xstc-to-python.xsl
+CLEANFILES = $(PYSCRIPTS) test.log
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xstc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu xstc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+#
+# Nothing is done by make, only make tests and
+# only if Python and Schemas are enabled.
+#
+all:
+
+#
+# Rule to load the test description and extract the informations
+#
+$(TESTDIRS) Tests/Metadata/$(NISTTESTDEF_2) Tests/Metadata/$(MSTTESTDEF) Tests/Metadata/$(SUNTESTDEF):
+ -@(if [ ! -d Tests ] ; then \
+ mkdir Tests ; \
+ fi)
+ -@(if [ ! -f $(TARBALL_2) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL_2) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL_2) $(TARBALL_2) ; else \
+ echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL_2) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL_2) ] ; then \
+ echo -n "extracting test data (NIST)..." ; \
+ $(TAR) -xzf $(TARBALL_2) --wildcards '*/Datatypes' '*/Metadata/$(NISTTESTDEF_2)' ; \
+ echo "done" ; \
+ fi)
+ -@(if [ ! -f $(TARBALL) ] ; then \
+ if [ -f $(srcdir)/$(TARBALL) ] ; then \
+ $(LN_S) $(srcdir)/$(TARBALL) $(TARBALL) ; else \
+ echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
+ if [ -x "$(WGET)" ] ; then \
+ $(WGET) $(TARBALLURL) ; \
+ else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
+ -@(if [ -f $(TARBALL) ] ; then \
+ echo -n "extracting test data (Sun, Microsoft)..." ; \
+ $(TAR) -C Tests -xzf $(TARBALL) --wildcards '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
+ if [ -d Tests/suntest ] ; then rm -r Tests/suntest ; fi ; \
+ if [ -d Tests/msxsdtest ] ; then rm -r Tests/msxsdtest ; fi ; \
+ mv Tests/xmlschema2002-01-16/* Tests ; \
+ mv Tests/*.testSet Tests/Metadata ; \
+ rm -r Tests/xmlschema2002-01-16 ; \
+ echo "done" ; \
+ fi)
+
+#
+# The python tests are generated via XSLT
+#
+nist-test.py: Tests/Metadata/$(NISTTESTDEF_2) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (NIST)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor NIST-2 \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(NISTTESTDEF_2) > $@ ; \
+ chmod +x $@ ; fi )
+
+ms-test.py: Tests/Metadata/$(MSTTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Microsoft)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor MS \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(MSTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+sun-test.py: Tests/Metadata/$(SUNTESTDEF) xstc-to-python.xsl
+ -@(if [ -x $(XSLTPROC) ] ; then \
+ echo "Rebuilding script (Sun)" $@ ; \
+ $(XSLTPROC) --nonet --stringparam vendor SUN \
+ $(srcdir)/xstc-to-python.xsl \
+ $(srcdir)/Tests/Metadata/$(SUNTESTDEF) > $@ ; \
+ chmod +x $@ ; fi )
+
+#
+# The actual test run if present. PYTHONPATH is updated to make sure
+# we run the version from the loacl build and not preinstalled bindings
+#
+pytests: $(PYSCRIPTS) $(TESTDIRS)
+ -@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then \
+ echo "## Running XML Schema tests (NIST)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then \
+ echo "## Running Schema tests (Sun)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
+ -@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then \
+ echo "## Running Schema tests (Microsoft)"; \
+ PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
+ export PYTHONPATH; \
+ LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ; \
+ export LD_LIBRARY_PATH; \
+ $(CHECKER) $(PYTHON) ms-test.py -s -b $(srcdir) ; fi)
+
+tests:
+ -@(if [ -x $(PYTHON) ] ; then \
+ $(MAKE) pytests ; fi);
+
+#
+# Heavy, works well only on RHEL3
+#
+valgrind:
+ -@(if [ -x $(PYTHON) ] ; then \
+ echo '## Running the regression tests under Valgrind' ; \
+ $(MAKE) CHECKER='valgrind -q' pytests ; fi);
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/xstc/xstc-to-python.xsl b/xstc/xstc-to-python.xsl
new file mode 100755
index 0000000..78d55cd
--- /dev/null
+++ b/xstc/xstc-to-python.xsl
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:ts="TestSuite" version="1.0"
+ xmlns:xl="http://www.w3.org/1999/xlink">
+ <xsl:param name="vendor" select="'NIST'"/>
+ <xsl:output method="text"/>
+
+ <xsl:template match="/">
+ <xsl:text>#!/usr/bin/python -u
+# -*- coding: UTF-8 -*-
+#
+# This file is generated from the W3C test suite description file.
+#
+
+import xstc
+from xstc import XSTCTestRunner, XSTCTestGroup, XSTCSchemaTest, XSTCInstanceTest
+
+xstc.vendor = "</xsl:text><xsl:value-of select="$vendor"/><xsl:text>"
+
+r = XSTCTestRunner()
+
+# Group definitions.
+
+</xsl:text>
+
+ <xsl:apply-templates select="ts:testSet/ts:testGroup" mode="group-def"/>
+<xsl:text>
+
+# Test definitions.
+
+</xsl:text>
+ <xsl:apply-templates select="ts:testSet/ts:testGroup" mode="test-def"/>
+ <xsl:text>
+
+r.run()
+
+</xsl:text>
+
+ </xsl:template>
+
+ <!-- groupName, descr -->
+ <xsl:template match="ts:testGroup" mode="group-def">
+ <xsl:text>r.addGroup(XSTCTestGroup("</xsl:text>
+ <!-- group -->
+ <xsl:value-of select="@name"/><xsl:text>", "</xsl:text>
+ <!-- main schema -->
+ <xsl:value-of select="ts:schemaTest[1]/ts:schemaDocument/@xl:href"/><xsl:text>", """</xsl:text>
+ <!-- group-description -->
+ <xsl:call-template name="str">
+ <xsl:with-param name="str" select="ts:annotation/ts:documentation/text()"/>
+ </xsl:call-template>
+ <xsl:text>"""))
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="str">
+ <xsl:param name="str"/>
+ <xsl:choose>
+ <xsl:when test="contains($str, '&quot;')">
+ <xsl:call-template name="str">
+ <xsl:with-param name="str" select="substring-before($str, '&quot;')"/>
+ </xsl:call-template>
+ <xsl:text>'</xsl:text>
+ <xsl:call-template name="str">
+ <xsl:with-param name="str" select="substring-after($str, '&quot;')"/>
+ </xsl:call-template>
+
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="ts:testGroup" mode="test-def">
+ <xsl:param name="group" select="@name"/>
+ <xsl:for-each select="ts:schemaTest">
+ <!-- groupName, isSchema, Name, Accepted, File, Val, Descr -->
+ <xsl:text>r.addTest(XSTCSchemaTest("</xsl:text>
+ <!-- group -->
+ <xsl:value-of select="$group"/><xsl:text>", "</xsl:text>
+ <!-- test-name -->
+ <xsl:value-of select="@name"/><xsl:text>", </xsl:text>
+ <!-- accepted -->
+ <xsl:value-of select="number(ts:current/@status = 'accepted')"/><xsl:text>, "</xsl:text>
+ <!-- filename -->
+ <xsl:value-of select="ts:schemaDocument/@xl:href"/><xsl:text>", </xsl:text>
+ <!-- validity -->
+ <xsl:value-of select="number(ts:expected/@validity = 'valid')"/><xsl:text>, "</xsl:text>
+ <!-- test-description -->
+ <xsl:value-of select="ts:annotation/ts:documentation/text()"/><xsl:text>"))
+</xsl:text>
+ </xsl:for-each>
+ <xsl:for-each select="ts:instanceTest">
+ <!-- groupName, isSchema, Name, Accepted, File, Val, Descr -->
+ <xsl:text>r.addTest(XSTCInstanceTest("</xsl:text>
+ <!-- group -->
+ <xsl:value-of select="$group"/><xsl:text>", "</xsl:text>
+ <!-- test-name -->
+ <xsl:value-of select="@name"/><xsl:text>", </xsl:text>
+ <!-- accepted -->
+ <xsl:value-of select="number(ts:current/@status = 'accepted')"/><xsl:text>, "</xsl:text>
+ <!-- filename -->
+ <xsl:value-of select="ts:instanceDocument/@xl:href"/><xsl:text>", </xsl:text>
+ <!-- validity -->
+ <xsl:value-of select="number(ts:expected/@validity = 'valid')"/><xsl:text>, "</xsl:text>
+ <!-- test-description -->
+ <xsl:value-of select="ts:annotation/ts:documentation/text()"/><xsl:text>"))
+</xsl:text>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/xstc/xstc.py b/xstc/xstc.py
new file mode 100755
index 0000000..ca011bb
--- /dev/null
+++ b/xstc/xstc.py
@@ -0,0 +1,693 @@
+#!/usr/bin/env python
+
+#
+# This is the MS subset of the W3C test suite for XML Schemas.
+# This file is generated from the MS W3c test suite description file.
+#
+
+import sys, os
+import exceptions, optparse
+import libxml2
+
+opa = optparse.OptionParser()
+
+opa.add_option("-b", "--base", action="store", type="string", dest="baseDir",
+ default="",
+ help="""The base directory; i.e. the parent folder of the
+ "nisttest", "suntest" and "msxsdtest" directories.""")
+
+opa.add_option("-o", "--out", action="store", type="string", dest="logFile",
+ default="test.log",
+ help="The filepath of the log file to be created")
+
+opa.add_option("--log", action="store_true", dest="enableLog",
+ default=False,
+ help="Create the log file")
+
+opa.add_option("--no-test-out", action="store_true", dest="disableTestStdOut",
+ default=False,
+ help="Don't output test results")
+
+opa.add_option("-s", "--silent", action="store_true", dest="silent", default=False,
+ help="Disables display of all tests")
+
+opa.add_option("-v", "--verbose", action="store_true", dest="verbose",
+ default=False,
+ help="Displays all tests (only if --silent is not set)")
+
+opa.add_option("-x", "--max", type="int", dest="maxTestCount",
+ default="-1",
+ help="The maximum number of tests to be run")
+
+opa.add_option("-t", "--test", type="string", dest="singleTest",
+ default=None,
+ help="Runs the specified test only")
+
+opa.add_option("--tsw", "--test-starts-with", type="string", dest="testStartsWith",
+ default=None,
+ help="Runs the specified test(s), starting with the given string")
+
+opa.add_option("--rieo", "--report-internal-errors-only", action="store_true",
+ dest="reportInternalErrOnly", default=False,
+ help="Display erroneous tests of type 'internal' only")
+
+opa.add_option("--rueo", "--report-unimplemented-errors-only", action="store_true",
+ dest="reportUnimplErrOnly", default=False,
+ help="Display erroneous tests of type 'unimplemented' only")
+
+opa.add_option("--rmleo", "--report-mem-leak-errors-only", action="store_true",
+ dest="reportMemLeakErrOnly", default=False,
+ help="Display erroneous tests of type 'memory leak' only")
+
+opa.add_option("-c", "--combines", type="string", dest="combines",
+ default=None,
+ help="Combines to be run (all if omitted)")
+
+opa.add_option("--csw", "--csw", type="string", dest="combineStartsWith",
+ default=None,
+ help="Combines to be run (all if omitted)")
+
+opa.add_option("--rc", "--report-combines", action="store_true",
+ dest="reportCombines", default=False,
+ help="Display combine reports")
+
+opa.add_option("--rec", "--report-err-combines", action="store_true",
+ dest="reportErrCombines", default=False,
+ help="Display erroneous combine reports only")
+
+opa.add_option("--debug", action="store_true",
+ dest="debugEnabled", default=False,
+ help="Displays debug messages")
+
+opa.add_option("--info", action="store_true",
+ dest="info", default=False,
+ help="Displays info on the suite only. Does not run any test.")
+opa.add_option("--sax", action="store_true",
+ dest="validationSAX", default=False,
+ help="Use SAX2-driven validation.")
+opa.add_option("--tn", action="store_true",
+ dest="displayTestName", default=False,
+ help="Display the test name in every case.")
+
+(options, args) = opa.parse_args()
+
+if options.combines is not None:
+ options.combines = options.combines.split()
+
+################################################
+# The vars below are not intended to be changed.
+#
+
+msgSchemaNotValidButShould = "The schema should be valid."
+msgSchemaValidButShouldNot = "The schema should be invalid."
+msgInstanceNotValidButShould = "The instance should be valid."
+msgInstanceValidButShouldNot = "The instance should be invalid."
+vendorNIST = "NIST"
+vendorNIST_2 = "NIST-2"
+vendorSUN = "SUN"
+vendorMS = "MS"
+
+###################
+# Helper functions.
+#
+vendor = None
+
+def handleError(test, msg):
+ global options
+ if not options.silent:
+ test.addLibLog("'%s' LIB: %s" % (test.name, msg))
+ if msg.find("Unimplemented") > -1:
+ test.failUnimplemented()
+ elif msg.find("Internal") > -1:
+ test.failInternal()
+
+
+def fixFileNames(fileName):
+ if (fileName is None) or (fileName == ""):
+ return ""
+ dirs = fileName.split("/")
+ if dirs[1] != "Tests":
+ fileName = os.path.join(".", "Tests")
+ for dir in dirs[1:]:
+ fileName = os.path.join(fileName, dir)
+ return fileName
+
+class XSTCTestGroup:
+ def __init__(self, name, schemaFileName, descr):
+ global vendor, vendorNIST_2
+ self.name = name
+ self.descr = descr
+ self.mainSchema = True
+ self.schemaFileName = fixFileNames(schemaFileName)
+ self.schemaParsed = False
+ self.schemaTried = False
+
+ def setSchema(self, schemaFileName, parsed):
+ if not self.mainSchema:
+ return
+ self.mainSchema = False
+ self.schemaParsed = parsed
+ self.schemaTried = True
+
+class XSTCTestCase:
+
+ # <!-- groupName, Name, Accepted, File, Val, Descr
+ def __init__(self, isSchema, groupName, name, accepted, file, val, descr):
+ global options
+ #
+ # Constructor.
+ #
+ self.testRunner = None
+ self.isSchema = isSchema
+ self.groupName = groupName
+ self.name = name
+ self.accepted = accepted
+ self.fileName = fixFileNames(file)
+ self.val = val
+ self.descr = descr
+ self.failed = False
+ self.combineName = None
+
+ self.log = []
+ self.libLog = []
+ self.initialMemUsed = 0
+ self.memLeak = 0
+ self.excepted = False
+ self.bad = False
+ self.unimplemented = False
+ self.internalErr = False
+ self.noSchemaErr = False
+ self.failed = False
+ #
+ # Init the log.
+ #
+ if not options.silent:
+ if self.descr is not None:
+ self.log.append("'%s' descr: %s\n" % (self.name, self.descr))
+ self.log.append("'%s' exp validity: %d\n" % (self.name, self.val))
+
+ def initTest(self, runner):
+ global vendorNIST, vendorSUN, vendorMS, vendorNIST_2, options, vendor
+ #
+ # Get the test-group.
+ #
+ self.runner = runner
+ self.group = runner.getGroup(self.groupName)
+ if vendor == vendorMS or vendor == vendorSUN:
+ #
+ # Use the last given directory for the combine name.
+ #
+ dirs = self.fileName.split("/")
+ self.combineName = dirs[len(dirs) -2]
+ elif vendor == vendorNIST:
+ #
+ # NIST files are named in the following form:
+ # "NISTSchema-short-pattern-1.xsd"
+ #
+ tokens = self.name.split("-")
+ self.combineName = tokens[1]
+ elif vendor == vendorNIST_2:
+ #
+ # Group-names have the form: "atomic-normalizedString-length-1"
+ #
+ tokens = self.groupName.split("-")
+ self.combineName = "%s-%s" % (tokens[0], tokens[1])
+ else:
+ self.combineName = "unkown"
+ raise Exception("Could not compute the combine name of a test.")
+ if (not options.silent) and (self.group.descr is not None):
+ self.log.append("'%s' group-descr: %s\n" % (self.name, self.group.descr))
+
+
+ def addLibLog(self, msg):
+ """This one is intended to be used by the error handler
+ function"""
+ global options
+ if not options.silent:
+ self.libLog.append(msg)
+
+ def fail(self, msg):
+ global options
+ self.failed = True
+ if not options.silent:
+ self.log.append("'%s' ( FAILED: %s\n" % (self.name, msg))
+
+ def failNoSchema(self):
+ global options
+ self.failed = True
+ self.noSchemaErr = True
+ if not options.silent:
+ self.log.append("'%s' X NO-SCHEMA\n" % (self.name))
+
+ def failInternal(self):
+ global options
+ self.failed = True
+ self.internalErr = True
+ if not options.silent:
+ self.log.append("'%s' * INTERNAL\n" % self.name)
+
+ def failUnimplemented(self):
+ global options
+ self.failed = True
+ self.unimplemented = True
+ if not options.silent:
+ self.log.append("'%s' ? UNIMPLEMENTED\n" % self.name)
+
+ def failCritical(self, msg):
+ global options
+ self.failed = True
+ self.bad = True
+ if not options.silent:
+ self.log.append("'%s' ! BAD: %s\n" % (self.name, msg))
+
+ def failExcept(self, e):
+ global options
+ self.failed = True
+ self.excepted = True
+ if not options.silent:
+ self.log.append("'%s' # EXCEPTION: %s\n" % (self.name, e.__str__()))
+
+ def setUp(self):
+ #
+ # Set up Libxml2.
+ #
+ self.initialMemUsed = libxml2.debugMemory(1)
+ libxml2.initParser()
+ libxml2.lineNumbersDefault(1)
+ libxml2.registerErrorHandler(handleError, self)
+
+ def tearDown(self):
+ libxml2.schemaCleanupTypes()
+ libxml2.cleanupParser()
+ self.memLeak = libxml2.debugMemory(1) - self.initialMemUsed
+
+ def isIOError(self, file, docType):
+ err = None
+ try:
+ err = libxml2.lastError()
+ except:
+ # Suppress exceptions.
+ pass
+ if (err is None):
+ return False
+ if err.domain() == libxml2.XML_FROM_IO:
+ self.failCritical("failed to access the %s resource '%s'\n" % (docType, file))
+
+ def debugMsg(self, msg):
+ global options
+ if options.debugEnabled:
+ sys.stdout.write("'%s' DEBUG: %s\n" % (self.name, msg))
+
+ def finalize(self):
+ global options
+ """Adds additional info to the log."""
+ #
+ # Add libxml2 messages.
+ #
+ if not options.silent:
+ self.log.extend(self.libLog)
+ #
+ # Add memory leaks.
+ #
+ if self.memLeak != 0:
+ self.log.append("%s + memory leak: %d bytes\n" % (self.name, self.memLeak))
+
+ def run(self):
+ """Runs a test."""
+ global options
+
+ ##filePath = os.path.join(options.baseDir, self.fileName)
+ # filePath = "%s/%s/%s/%s" % (options.baseDir, self.test_Folder, self.schema_Folder, self.schema_File)
+ if options.displayTestName:
+ sys.stdout.write("'%s'\n" % self.name)
+ try:
+ self.validate()
+ except (Exception, libxml2.parserError, libxml2.treeError), e:
+ self.failExcept(e)
+
+def parseSchema(fileName):
+ schema = None
+ ctxt = libxml2.schemaNewParserCtxt(fileName)
+ try:
+ try:
+ schema = ctxt.schemaParse()
+ except:
+ pass
+ finally:
+ del ctxt
+ return schema
+
+
+class XSTCSchemaTest(XSTCTestCase):
+
+ def __init__(self, groupName, name, accepted, file, val, descr):
+ XSTCTestCase.__init__(self, 1, groupName, name, accepted, file, val, descr)
+
+ def validate(self):
+ global msgSchemaNotValidButShould, msgSchemaValidButShouldNot
+ schema = None
+ filePath = self.fileName
+ # os.path.join(options.baseDir, self.fileName)
+ valid = 0
+ try:
+ #
+ # Parse the schema.
+ #
+ self.debugMsg("loading schema: %s" % filePath)
+ schema = parseSchema(filePath)
+ self.debugMsg("after loading schema")
+ if schema is None:
+ self.debugMsg("schema is None")
+ self.debugMsg("checking for IO errors...")
+ if self.isIOError(file, "schema"):
+ return
+ self.debugMsg("checking schema result")
+ if (schema is None and self.val) or (schema is not None and self.val == 0):
+ self.debugMsg("schema result is BAD")
+ if (schema == None):
+ self.fail(msgSchemaNotValidButShould)
+ else:
+ self.fail(msgSchemaValidButShouldNot)
+ else:
+ self.debugMsg("schema result is OK")
+ finally:
+ self.group.setSchema(self.fileName, schema is not None)
+ del schema
+
+class XSTCInstanceTest(XSTCTestCase):
+
+ def __init__(self, groupName, name, accepted, file, val, descr):
+ XSTCTestCase.__init__(self, 0, groupName, name, accepted, file, val, descr)
+
+ def validate(self):
+ instance = None
+ schema = None
+ filePath = self.fileName
+ # os.path.join(options.baseDir, self.fileName)
+
+ if not self.group.schemaParsed and self.group.schemaTried:
+ self.failNoSchema()
+ return
+
+ self.debugMsg("loading instance: %s" % filePath)
+ parserCtxt = libxml2.newParserCtxt()
+ if (parserCtxt is None):
+ # TODO: Is this one necessary, or will an exception
+ # be already raised?
+ raise Exception("Could not create the instance parser context.")
+ if not options.validationSAX:
+ try:
+ try:
+ instance = parserCtxt.ctxtReadFile(filePath, None, libxml2.XML_PARSE_NOWARNING)
+ except:
+ # Suppress exceptions.
+ pass
+ finally:
+ del parserCtxt
+ self.debugMsg("after loading instance")
+ if instance is None:
+ self.debugMsg("instance is None")
+ self.failCritical("Failed to parse the instance for unknown reasons.")
+ return
+ try:
+ #
+ # Validate the instance.
+ #
+ self.debugMsg("loading schema: %s" % self.group.schemaFileName)
+ schema = parseSchema(self.group.schemaFileName)
+ try:
+ validationCtxt = schema.schemaNewValidCtxt()
+ #validationCtxt = libxml2.schemaNewValidCtxt(None)
+ if (validationCtxt is None):
+ self.failCritical("Could not create the validation context.")
+ return
+ try:
+ self.debugMsg("validating instance")
+ if options.validationSAX:
+ instance_Err = validationCtxt.schemaValidateFile(filePath, 0)
+ else:
+ instance_Err = validationCtxt.schemaValidateDoc(instance)
+ self.debugMsg("after instance validation")
+ self.debugMsg("instance-err: %d" % instance_Err)
+ if (instance_Err != 0 and self.val == 1) or (instance_Err == 0 and self.val == 0):
+ self.debugMsg("instance result is BAD")
+ if (instance_Err != 0):
+ self.fail(msgInstanceNotValidButShould)
+ else:
+ self.fail(msgInstanceValidButShouldNot)
+
+ else:
+ self.debugMsg("instance result is OK")
+ finally:
+ del validationCtxt
+ finally:
+ del schema
+ finally:
+ if instance is not None:
+ instance.freeDoc()
+
+
+####################
+# Test runner class.
+#
+
+class XSTCTestRunner:
+
+ CNT_TOTAL = 0
+ CNT_RAN = 1
+ CNT_SUCCEEDED = 2
+ CNT_FAILED = 3
+ CNT_UNIMPLEMENTED = 4
+ CNT_INTERNAL = 5
+ CNT_BAD = 6
+ CNT_EXCEPTED = 7
+ CNT_MEMLEAK = 8
+ CNT_NOSCHEMA = 9
+ CNT_NOTACCEPTED = 10
+ CNT_SCHEMA_TEST = 11
+
+ def __init__(self):
+ self.logFile = None
+ self.counters = self.createCounters()
+ self.testList = []
+ self.combinesRan = {}
+ self.groups = {}
+ self.curGroup = None
+
+ def createCounters(self):
+ counters = {self.CNT_TOTAL:0, self.CNT_RAN:0, self.CNT_SUCCEEDED:0,
+ self.CNT_FAILED:0, self.CNT_UNIMPLEMENTED:0, self.CNT_INTERNAL:0, self.CNT_BAD:0,
+ self.CNT_EXCEPTED:0, self.CNT_MEMLEAK:0, self.CNT_NOSCHEMA:0, self.CNT_NOTACCEPTED:0,
+ self.CNT_SCHEMA_TEST:0}
+
+ return counters
+
+ def addTest(self, test):
+ self.testList.append(test)
+ test.initTest(self)
+
+ def getGroup(self, groupName):
+ return self.groups[groupName]
+
+ def addGroup(self, group):
+ self.groups[group.name] = group
+
+ def updateCounters(self, test, counters):
+ if test.memLeak != 0:
+ counters[self.CNT_MEMLEAK] += 1
+ if not test.failed:
+ counters[self.CNT_SUCCEEDED] +=1
+ if test.failed:
+ counters[self.CNT_FAILED] += 1
+ if test.bad:
+ counters[self.CNT_BAD] += 1
+ if test.unimplemented:
+ counters[self.CNT_UNIMPLEMENTED] += 1
+ if test.internalErr:
+ counters[self.CNT_INTERNAL] += 1
+ if test.noSchemaErr:
+ counters[self.CNT_NOSCHEMA] += 1
+ if test.excepted:
+ counters[self.CNT_EXCEPTED] += 1
+ if not test.accepted:
+ counters[self.CNT_NOTACCEPTED] += 1
+ if test.isSchema:
+ counters[self.CNT_SCHEMA_TEST] += 1
+ return counters
+
+ def displayResults(self, out, all, combName, counters):
+ out.write("\n")
+ if all:
+ if options.combines is not None:
+ out.write("combine(s): %s\n" % str(options.combines))
+ elif combName is not None:
+ out.write("combine : %s\n" % combName)
+ out.write(" total : %d\n" % counters[self.CNT_TOTAL])
+ if all or options.combines is not None:
+ out.write(" ran : %d\n" % counters[self.CNT_RAN])
+ out.write(" (schemata) : %d\n" % counters[self.CNT_SCHEMA_TEST])
+ # out.write(" succeeded : %d\n" % counters[self.CNT_SUCCEEDED])
+ out.write(" not accepted : %d\n" % counters[self.CNT_NOTACCEPTED])
+ if counters[self.CNT_FAILED] > 0:
+ out.write(" failed : %d\n" % counters[self.CNT_FAILED])
+ out.write(" -> internal : %d\n" % counters[self.CNT_INTERNAL])
+ out.write(" -> unimpl. : %d\n" % counters[self.CNT_UNIMPLEMENTED])
+ out.write(" -> skip-invalid-schema : %d\n" % counters[self.CNT_NOSCHEMA])
+ out.write(" -> bad : %d\n" % counters[self.CNT_BAD])
+ out.write(" -> exceptions : %d\n" % counters[self.CNT_EXCEPTED])
+ out.write(" memory leaks : %d\n" % counters[self.CNT_MEMLEAK])
+
+ def displayShortResults(self, out, all, combName, counters):
+ out.write("Ran %d of %d tests (%d schemata):" % (counters[self.CNT_RAN],
+ counters[self.CNT_TOTAL], counters[self.CNT_SCHEMA_TEST]))
+ # out.write(" succeeded : %d\n" % counters[self.CNT_SUCCEEDED])
+ if counters[self.CNT_NOTACCEPTED] > 0:
+ out.write(" %d not accepted" % (counters[self.CNT_NOTACCEPTED]))
+ if counters[self.CNT_FAILED] > 0 or counters[self.CNT_MEMLEAK] > 0:
+ if counters[self.CNT_FAILED] > 0:
+ out.write(" %d failed" % (counters[self.CNT_FAILED]))
+ out.write(" (")
+ if counters[self.CNT_INTERNAL] > 0:
+ out.write(" %d internal" % (counters[self.CNT_INTERNAL]))
+ if counters[self.CNT_UNIMPLEMENTED] > 0:
+ out.write(" %d unimplemented" % (counters[self.CNT_UNIMPLEMENTED]))
+ if counters[self.CNT_NOSCHEMA] > 0:
+ out.write(" %d skip-invalid-schema" % (counters[self.CNT_NOSCHEMA]))
+ if counters[self.CNT_BAD] > 0:
+ out.write(" %d bad" % (counters[self.CNT_BAD]))
+ if counters[self.CNT_EXCEPTED] > 0:
+ out.write(" %d exception" % (counters[self.CNT_EXCEPTED]))
+ out.write(" )")
+ if counters[self.CNT_MEMLEAK] > 0:
+ out.write(" %d leaks" % (counters[self.CNT_MEMLEAK]))
+ out.write("\n")
+ else:
+ out.write(" all passed\n")
+
+ def reportCombine(self, combName):
+ global options
+
+ counters = self.createCounters()
+ #
+ # Compute evaluation counters.
+ #
+ for test in self.combinesRan[combName]:
+ counters[self.CNT_TOTAL] += 1
+ counters[self.CNT_RAN] += 1
+ counters = self.updateCounters(test, counters)
+ if options.reportErrCombines and (counters[self.CNT_FAILED] == 0) and (counters[self.CNT_MEMLEAK] == 0):
+ pass
+ else:
+ if options.enableLog:
+ self.displayResults(self.logFile, False, combName, counters)
+ self.displayResults(sys.stdout, False, combName, counters)
+
+ def displayTestLog(self, test):
+ sys.stdout.writelines(test.log)
+ sys.stdout.write("~~~~~~~~~~\n")
+
+ def reportTest(self, test):
+ global options
+
+ error = test.failed or test.memLeak != 0
+ #
+ # Only erroneous tests will be written to the log,
+ # except @verbose is switched on.
+ #
+ if options.enableLog and (options.verbose or error):
+ self.logFile.writelines(test.log)
+ self.logFile.write("~~~~~~~~~~\n")
+ #
+ # if not @silent, only erroneous tests will be
+ # written to stdout, except @verbose is switched on.
+ #
+ if not options.silent:
+ if options.reportInternalErrOnly and test.internalErr:
+ self.displayTestLog(test)
+ if options.reportMemLeakErrOnly and test.memLeak != 0:
+ self.displayTestLog(test)
+ if options.reportUnimplErrOnly and test.unimplemented:
+ self.displayTestLog(test)
+ if (options.verbose or error) and (not options.reportInternalErrOnly) and (not options.reportMemLeakErrOnly) and (not options.reportUnimplErrOnly):
+ self.displayTestLog(test)
+
+
+ def addToCombines(self, test):
+ found = False
+ if self.combinesRan.has_key(test.combineName):
+ self.combinesRan[test.combineName].append(test)
+ else:
+ self.combinesRan[test.combineName] = [test]
+
+ def run(self):
+
+ global options
+
+ if options.info:
+ for test in self.testList:
+ self.addToCombines(test)
+ sys.stdout.write("Combines: %d\n" % len(self.combinesRan))
+ sys.stdout.write("%s\n" % self.combinesRan.keys())
+ return
+
+ if options.enableLog:
+ self.logFile = open(options.logFile, "w")
+ try:
+ for test in self.testList:
+ self.counters[self.CNT_TOTAL] += 1
+ #
+ # Filter tests.
+ #
+ if options.singleTest is not None and options.singleTest != "":
+ if (test.name != options.singleTest):
+ continue
+ elif options.combines is not None:
+ if not options.combines.__contains__(test.combineName):
+ continue
+ elif options.testStartsWith is not None:
+ if not test.name.startswith(options.testStartsWith):
+ continue
+ elif options.combineStartsWith is not None:
+ if not test.combineName.startswith(options.combineStartsWith):
+ continue
+
+ if options.maxTestCount != -1 and self.counters[self.CNT_RAN] >= options.maxTestCount:
+ break
+ self.counters[self.CNT_RAN] += 1
+ #
+ # Run the thing, dammit.
+ #
+ try:
+ test.setUp()
+ try:
+ test.run()
+ finally:
+ test.tearDown()
+ finally:
+ #
+ # Evaluate.
+ #
+ test.finalize()
+ self.reportTest(test)
+ if options.reportCombines or options.reportErrCombines:
+ self.addToCombines(test)
+ self.counters = self.updateCounters(test, self.counters)
+ finally:
+ if options.reportCombines or options.reportErrCombines:
+ #
+ # Build a report for every single combine.
+ #
+ # TODO: How to sort a dict?
+ #
+ self.combinesRan.keys().sort(None)
+ for key in self.combinesRan.keys():
+ self.reportCombine(key)
+
+ #
+ # Display the final report.
+ #
+ if options.silent:
+ self.displayShortResults(sys.stdout, True, None, self.counters)
+ else:
+ sys.stdout.write("===========================\n")
+ self.displayResults(sys.stdout, True, None, self.counters)
diff --git a/xzlib.c b/xzlib.c
new file mode 100644
index 0000000..0dcb9f4
--- /dev/null
+++ b/xzlib.c
@@ -0,0 +1,798 @@
+/**
+ * xzlib.c: front end for the transparent suport of lzma compression
+ * at the I/O layer, based on an example file from lzma project
+ *
+ * See Copyright for the status of this software.
+ *
+ * Anders F Bjorklund <afb@users.sourceforge.net>
+ */
+#define IN_LIBXML
+#include "libxml.h"
+#ifdef HAVE_LZMA_H
+
+#include <string.h>
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+#include <lzma.h>
+
+#include "xzlib.h"
+#include <libxml/xmlmemory.h>
+
+/* values for xz_state how */
+#define LOOK 0 /* look for a gzip/lzma header */
+#define COPY 1 /* copy input directly */
+#define GZIP 2 /* decompress a gzip stream */
+#define LZMA 3 /* decompress a lzma stream */
+
+/* internal lzma file state data structure */
+typedef struct {
+ int mode; /* see lzma modes above */
+ int fd; /* file descriptor */
+ char *path; /* path or fd for error messages */
+ uint64_t pos; /* current position in uncompressed data */
+ unsigned int size; /* buffer size, zero if not allocated yet */
+ unsigned int want; /* requested buffer size, default is BUFSIZ */
+ unsigned char *in; /* input buffer */
+ unsigned char *out; /* output buffer (double-sized when reading) */
+ unsigned char *next; /* next output data to deliver or write */
+ unsigned int have; /* amount of output data unused at next */
+ int eof; /* true if end of input file reached */
+ uint64_t start; /* where the lzma data started, for rewinding */
+ uint64_t raw; /* where the raw data started, for seeking */
+ int how; /* 0: get header, 1: copy, 2: decompress */
+ int direct; /* true if last read direct, false if lzma */
+ /* seek request */
+ uint64_t skip; /* amount to skip (already rewound if backwards) */
+ int seek; /* true if seek request pending */
+ /* error information */
+ int err; /* error code */
+ char *msg; /* error message */
+ /* lzma stream */
+ int init; /* is the iniflate stream initialized */
+ lzma_stream strm; /* stream structure in-place (not a pointer) */
+ char padding1[32]; /* padding allowing to cope with possible
+ extensions of above structure without
+ too much side effect */
+#ifdef HAVE_ZLIB_H
+ /* zlib inflate or deflate stream */
+ z_stream zstrm; /* stream structure in-place (not a pointer) */
+#endif
+ char padding2[32]; /* padding allowing to cope with possible
+ extensions of above structure without
+ too much side effect */
+} xz_state, *xz_statep;
+
+static void
+xz_error(xz_statep state, int err, const char *msg)
+{
+ /* free previously allocated message and clear */
+ if (state->msg != NULL) {
+ if (state->err != LZMA_MEM_ERROR)
+ xmlFree(state->msg);
+ state->msg = NULL;
+ }
+
+ /* set error code, and if no message, then done */
+ state->err = err;
+ if (msg == NULL)
+ return;
+
+ /* for an out of memory error, save as static string */
+ if (err == LZMA_MEM_ERROR) {
+ state->msg = (char *) msg;
+ return;
+ }
+
+ /* construct error message with path */
+ if ((state->msg =
+ xmlMalloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
+ state->err = LZMA_MEM_ERROR;
+ state->msg = (char *) "out of memory";
+ return;
+ }
+ strcpy(state->msg, state->path);
+ strcat(state->msg, ": ");
+ strcat(state->msg, msg);
+ return;
+}
+
+static void
+xz_reset(xz_statep state)
+{
+ state->have = 0; /* no output data available */
+ state->eof = 0; /* not at end of file */
+ state->how = LOOK; /* look for gzip header */
+ state->direct = 1; /* default for empty file */
+ state->seek = 0; /* no seek request pending */
+ xz_error(state, LZMA_OK, NULL); /* clear error */
+ state->pos = 0; /* no uncompressed data yet */
+ state->strm.avail_in = 0; /* no input data yet */
+#ifdef HAVE_ZLIB_H
+ state->zstrm.avail_in = 0; /* no input data yet */
+#endif
+}
+
+static xzFile
+xz_open(const char *path, int fd, const char *mode ATTRIBUTE_UNUSED)
+{
+ xz_statep state;
+
+ /* allocate xzFile structure to return */
+ state = xmlMalloc(sizeof(xz_state));
+ if (state == NULL)
+ return NULL;
+ state->size = 0; /* no buffers allocated yet */
+ state->want = BUFSIZ; /* requested buffer size */
+ state->msg = NULL; /* no error message yet */
+ state->init = 0; /* initialization of zlib data */
+
+ /* save the path name for error messages */
+ state->path = xmlMalloc(strlen(path) + 1);
+ if (state->path == NULL) {
+ xmlFree(state);
+ return NULL;
+ }
+ strcpy(state->path, path);
+
+ /* open the file with the appropriate mode (or just use fd) */
+ state->fd = fd != -1 ? fd : open(path,
+#ifdef O_LARGEFILE
+ O_LARGEFILE |
+#endif
+#ifdef O_BINARY
+ O_BINARY |
+#endif
+ O_RDONLY, 0666);
+ if (state->fd == -1) {
+ xmlFree(state->path);
+ xmlFree(state);
+ return NULL;
+ }
+
+ /* save the current position for rewinding (only if reading) */
+ state->start = lseek(state->fd, 0, SEEK_CUR);
+ if (state->start == (uint64_t) - 1)
+ state->start = 0;
+
+ /* initialize stream */
+ xz_reset(state);
+
+ /* return stream */
+ return (xzFile) state;
+}
+
+static int
+xz_compressed(xzFile f) {
+ xz_statep state;
+
+ if (f == NULL)
+ return(-1);
+ state = (xz_statep) f;
+ if (state->init <= 0)
+ return(-1);
+
+ switch (state->how) {
+ case COPY:
+ return(0);
+ case GZIP:
+ case LZMA:
+ return(1);
+ }
+ return(-1);
+}
+
+xzFile
+__libxml2_xzopen(const char *path, const char *mode)
+{
+ return xz_open(path, -1, mode);
+}
+
+int
+__libxml2_xzcompressed(xzFile f) {
+ return xz_compressed(f);
+}
+
+xzFile
+__libxml2_xzdopen(int fd, const char *mode)
+{
+ char *path; /* identifier for error messages */
+ xzFile xz;
+
+ if (fd == -1 || (path = xmlMalloc(7 + 3 * sizeof(int))) == NULL)
+ return NULL;
+ sprintf(path, "<fd:%d>", fd); /* for debugging */
+ xz = xz_open(path, fd, mode);
+ xmlFree(path);
+ return xz;
+}
+
+static int
+xz_load(xz_statep state, unsigned char *buf, unsigned int len,
+ unsigned int *have)
+{
+ int ret;
+
+ *have = 0;
+ do {
+ ret = read(state->fd, buf + *have, len - *have);
+ if (ret <= 0)
+ break;
+ *have += ret;
+ } while (*have < len);
+ if (ret < 0) {
+ xz_error(state, -1, strerror(errno));
+ return -1;
+ }
+ if (ret == 0)
+ state->eof = 1;
+ return 0;
+}
+
+static int
+xz_avail(xz_statep state)
+{
+ lzma_stream *strm = &(state->strm);
+
+ if (state->err != LZMA_OK)
+ return -1;
+ if (state->eof == 0) {
+ /* avail_in is size_t, which is not necessary sizeof(unsigned) */
+ unsigned tmp = strm->avail_in;
+
+ if (xz_load(state, state->in, state->size, &tmp) == -1) {
+ strm->avail_in = tmp;
+ return -1;
+ }
+ strm->avail_in = tmp;
+ strm->next_in = state->in;
+ }
+ return 0;
+}
+
+#ifdef HAVE_ZLIB_H
+static int
+xz_avail_zstrm(xz_statep state)
+{
+ int ret;
+ state->strm.avail_in = state->zstrm.avail_in;
+ state->strm.next_in = state->zstrm.next_in;
+ ret = xz_avail(state);
+ state->zstrm.avail_in = (uInt) state->strm.avail_in;
+ state->zstrm.next_in = (Bytef *) state->strm.next_in;
+ return ret;
+}
+#endif
+
+static int
+is_format_xz(xz_statep state)
+{
+ lzma_stream *strm = &(state->strm);
+
+ return strm->avail_in >= 6 && memcmp(state->in, "\3757zXZ", 6) == 0;
+}
+
+static int
+is_format_lzma(xz_statep state)
+{
+ lzma_stream *strm = &(state->strm);
+
+ lzma_filter filter;
+ lzma_options_lzma *opt;
+ uint32_t dict_size;
+ uint64_t uncompressed_size;
+ size_t i;
+
+ if (strm->avail_in < 13)
+ return 0;
+
+ filter.id = LZMA_FILTER_LZMA1;
+ if (lzma_properties_decode(&filter, NULL, state->in, 5) != LZMA_OK)
+ return 0;
+
+ opt = filter.options;
+ dict_size = opt->dict_size;
+ free(opt); /* we can't use xmlFree on a string returned by zlib */
+
+ /* A hack to ditch tons of false positives: We allow only dictionary
+ * sizes that are 2^n or 2^n + 2^(n-1) or UINT32_MAX. LZMA_Alone
+ * created only files with 2^n, but accepts any dictionary size.
+ * If someone complains, this will be reconsidered.
+ */
+ if (dict_size != UINT32_MAX) {
+ uint32_t d = dict_size - 1;
+
+ d |= d >> 2;
+ d |= d >> 3;
+ d |= d >> 4;
+ d |= d >> 8;
+ d |= d >> 16;
+ ++d;
+ if (d != dict_size || dict_size == 0)
+ return 0;
+ }
+
+ /* Another hack to ditch false positives: Assume that if the
+ * uncompressed size is known, it must be less than 256 GiB.
+ * Again, if someone complains, this will be reconsidered.
+ */
+ uncompressed_size = 0;
+ for (i = 0; i < 8; ++i)
+ uncompressed_size |= (uint64_t) (state->in[5 + i]) << (i * 8);
+
+ if (uncompressed_size != UINT64_MAX
+ && uncompressed_size > (UINT64_C(1) << 38))
+ return 0;
+
+ return 1;
+}
+
+#ifdef HAVE_ZLIB_H
+
+/* Get next byte from input, or -1 if end or error. */
+#define NEXT() ((strm->avail_in == 0 && xz_avail(state) == -1) ? -1 : \
+ (strm->avail_in == 0 ? -1 : \
+ (strm->avail_in--, *(strm->next_in)++)))
+/* Same thing, but from zstrm */
+#define NEXTZ() ((strm->avail_in == 0 && xz_avail_zstrm(state) == -1) ? -1 : \
+ (strm->avail_in == 0 ? -1 : \
+ (strm->avail_in--, *(strm->next_in)++)))
+
+/* Get a four-byte little-endian integer and return 0 on success and the value
+ in *ret. Otherwise -1 is returned and *ret is not modified. */
+static int
+gz_next4(xz_statep state, unsigned long *ret)
+{
+ int ch;
+ unsigned long val;
+ z_streamp strm = &(state->zstrm);
+
+ val = NEXTZ();
+ val += (unsigned) NEXTZ() << 8;
+ val += (unsigned long) NEXTZ() << 16;
+ ch = NEXTZ();
+ if (ch == -1)
+ return -1;
+ val += (unsigned long) ch << 24;
+ *ret = val;
+ return 0;
+}
+#endif
+
+static int
+xz_head(xz_statep state)
+{
+ lzma_stream *strm = &(state->strm);
+ lzma_stream init = LZMA_STREAM_INIT;
+ int flags;
+ unsigned len;
+
+ /* allocate read buffers and inflate memory */
+ if (state->size == 0) {
+ /* allocate buffers */
+ state->in = xmlMalloc(state->want);
+ state->out = xmlMalloc(state->want << 1);
+ if (state->in == NULL || state->out == NULL) {
+ if (state->out != NULL)
+ xmlFree(state->out);
+ if (state->in != NULL)
+ xmlFree(state->in);
+ xz_error(state, LZMA_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ state->size = state->want;
+
+ /* allocate decoder memory */
+ state->strm = init;
+ state->strm.avail_in = 0;
+ state->strm.next_in = NULL;
+ if (lzma_auto_decoder(&state->strm, UINT64_MAX, 0) != LZMA_OK) {
+ xmlFree(state->out);
+ xmlFree(state->in);
+ state->size = 0;
+ xz_error(state, LZMA_MEM_ERROR, "out of memory");
+ return -1;
+ }
+#ifdef HAVE_ZLIB_H
+ /* allocate inflate memory */
+ state->zstrm.zalloc = Z_NULL;
+ state->zstrm.zfree = Z_NULL;
+ state->zstrm.opaque = Z_NULL;
+ state->zstrm.avail_in = 0;
+ state->zstrm.next_in = Z_NULL;
+ if (state->init == 0) {
+ if (inflateInit2(&(state->zstrm), -15) != Z_OK) {/* raw inflate */
+ xmlFree(state->out);
+ xmlFree(state->in);
+ state->size = 0;
+ xz_error(state, LZMA_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ state->init = 1;
+ }
+#endif
+ }
+
+ /* get some data in the input buffer */
+ if (strm->avail_in == 0) {
+ if (xz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in == 0)
+ return 0;
+ }
+
+ /* look for the xz magic header bytes */
+ if (is_format_xz(state) || is_format_lzma(state)) {
+ state->how = LZMA;
+ state->direct = 0;
+ return 0;
+ }
+#ifdef HAVE_ZLIB_H
+ /* look for the gzip magic header bytes 31 and 139 */
+ if (strm->next_in[0] == 31) {
+ strm->avail_in--;
+ strm->next_in++;
+ if (strm->avail_in == 0 && xz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in && strm->next_in[0] == 139) {
+ /* we have a gzip header, woo hoo! */
+ strm->avail_in--;
+ strm->next_in++;
+
+ /* skip rest of header */
+ if (NEXT() != 8) { /* compression method */
+ xz_error(state, LZMA_DATA_ERROR,
+ "unknown compression method");
+ return -1;
+ }
+ flags = NEXT();
+ if (flags & 0xe0) { /* reserved flag bits */
+ xz_error(state, LZMA_DATA_ERROR,
+ "unknown header flags set");
+ return -1;
+ }
+ NEXT(); /* modification time */
+ NEXT();
+ NEXT();
+ NEXT();
+ NEXT(); /* extra flags */
+ NEXT(); /* operating system */
+ if (flags & 4) { /* extra field */
+ len = (unsigned) NEXT();
+ len += (unsigned) NEXT() << 8;
+ while (len--)
+ if (NEXT() < 0)
+ break;
+ }
+ if (flags & 8) /* file name */
+ while (NEXT() > 0) ;
+ if (flags & 16) /* comment */
+ while (NEXT() > 0) ;
+ if (flags & 2) { /* header crc */
+ NEXT();
+ NEXT();
+ }
+ /* an unexpected end of file is not checked for here -- it will be
+ * noticed on the first request for uncompressed data */
+
+ /* set up for decompression */
+ inflateReset(&state->zstrm);
+ state->zstrm.adler = crc32(0L, Z_NULL, 0);
+ state->how = GZIP;
+ state->direct = 0;
+ return 0;
+ } else {
+ /* not a gzip file -- save first byte (31) and fall to raw i/o */
+ state->out[0] = 31;
+ state->have = 1;
+ }
+ }
+#endif
+
+ /* doing raw i/o, save start of raw data for seeking, copy any leftover
+ * input to output -- this assumes that the output buffer is larger than
+ * the input buffer, which also assures space for gzungetc() */
+ state->raw = state->pos;
+ state->next = state->out;
+ if (strm->avail_in) {
+ memcpy(state->next + state->have, strm->next_in, strm->avail_in);
+ state->have += strm->avail_in;
+ strm->avail_in = 0;
+ }
+ state->how = COPY;
+ state->direct = 1;
+ return 0;
+}
+
+static int
+xz_decomp(xz_statep state)
+{
+ int ret;
+ unsigned had;
+ unsigned long crc, len;
+ lzma_stream *strm = &(state->strm);
+
+ lzma_action action = LZMA_RUN;
+
+ /* fill output buffer up to end of deflate stream */
+ had = strm->avail_out;
+ do {
+ /* get more input for inflate() */
+ if (strm->avail_in == 0 && xz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in == 0) {
+ xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
+ return -1;
+ }
+ if (state->eof)
+ action = LZMA_FINISH;
+
+ /* decompress and handle errors */
+#ifdef HAVE_ZLIB_H
+ if (state->how == GZIP) {
+ state->zstrm.avail_in = (uInt) state->strm.avail_in;
+ state->zstrm.next_in = (Bytef *) state->strm.next_in;
+ state->zstrm.avail_out = (uInt) state->strm.avail_out;
+ state->zstrm.next_out = (Bytef *) state->strm.next_out;
+ ret = inflate(&state->zstrm, Z_NO_FLUSH);
+ if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
+ xz_error(state, Z_STREAM_ERROR,
+ "internal error: inflate stream corrupt");
+ return -1;
+ }
+ if (ret == Z_MEM_ERROR)
+ ret = LZMA_MEM_ERROR;
+ if (ret == Z_DATA_ERROR)
+ ret = LZMA_DATA_ERROR;
+ if (ret == Z_STREAM_END)
+ ret = LZMA_STREAM_END;
+ state->strm.avail_in = state->zstrm.avail_in;
+ state->strm.next_in = state->zstrm.next_in;
+ state->strm.avail_out = state->zstrm.avail_out;
+ state->strm.next_out = state->zstrm.next_out;
+ } else /* state->how == LZMA */
+#endif
+ ret = lzma_code(strm, action);
+ if (ret == LZMA_MEM_ERROR) {
+ xz_error(state, LZMA_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ if (ret == LZMA_DATA_ERROR) {
+ xz_error(state, LZMA_DATA_ERROR, "compressed data error");
+ return -1;
+ }
+ } while (strm->avail_out && ret != LZMA_STREAM_END);
+
+ /* update available output and crc check value */
+ state->have = had - strm->avail_out;
+ state->next = strm->next_out - state->have;
+#ifdef HAVE_ZLIB_H
+ state->zstrm.adler =
+ crc32(state->zstrm.adler, state->next, state->have);
+#endif
+
+ if (ret == LZMA_STREAM_END) {
+#ifdef HAVE_ZLIB_H
+ if (state->how == GZIP) {
+ if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
+ xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
+ return -1;
+ }
+ if (crc != state->zstrm.adler) {
+ xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
+ return -1;
+ }
+ if (len != (state->zstrm.total_out & 0xffffffffL)) {
+ xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
+ return -1;
+ }
+ state->strm.avail_in = 0;
+ state->strm.next_in = NULL;
+ state->strm.avail_out = 0;
+ state->strm.next_out = NULL;
+ } else
+#endif
+ if (strm->avail_in != 0 || !state->eof) {
+ xz_error(state, LZMA_DATA_ERROR, "trailing garbage");
+ return -1;
+ }
+ state->how = LOOK; /* ready for next stream, once have is 0 (leave
+ * state->direct unchanged to remember how) */
+ }
+
+ /* good decompression */
+ return 0;
+}
+
+static int
+xz_make(xz_statep state)
+{
+ lzma_stream *strm = &(state->strm);
+
+ if (state->how == LOOK) { /* look for lzma / gzip header */
+ if (xz_head(state) == -1)
+ return -1;
+ if (state->have) /* got some data from xz_head() */
+ return 0;
+ }
+ if (state->how == COPY) { /* straight copy */
+ if (xz_load(state, state->out, state->size << 1, &(state->have)) ==
+ -1)
+ return -1;
+ state->next = state->out;
+ } else if (state->how == LZMA || state->how == GZIP) { /* decompress */
+ strm->avail_out = state->size << 1;
+ strm->next_out = state->out;
+ if (xz_decomp(state) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+static int
+xz_skip(xz_statep state, uint64_t len)
+{
+ unsigned n;
+
+ /* skip over len bytes or reach end-of-file, whichever comes first */
+ while (len)
+ /* skip over whatever is in output buffer */
+ if (state->have) {
+ n = (uint64_t) state->have > len ?
+ (unsigned) len : state->have;
+ state->have -= n;
+ state->next += n;
+ state->pos += n;
+ len -= n;
+ }
+
+ /* output buffer empty -- return if we're at the end of the input */
+ else if (state->eof && state->strm.avail_in == 0)
+ break;
+
+ /* need more data to skip -- load up output buffer */
+ else {
+ /* get more output, looking for header if required */
+ if (xz_make(state) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+int
+__libxml2_xzread(xzFile file, void *buf, unsigned len)
+{
+ unsigned got, n;
+ xz_statep state;
+ lzma_stream *strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (xz_statep) file;
+ strm = &(state->strm);
+
+ /* check that we're reading and that there's no error */
+ if (state->err != LZMA_OK)
+ return -1;
+
+ /* since an int is returned, make sure len fits in one, otherwise return
+ * with an error (this avoids the flaw in the interface) */
+ if ((int) len < 0) {
+ xz_error(state, LZMA_BUF_ERROR,
+ "requested length does not fit in int");
+ return -1;
+ }
+
+ /* if len is zero, avoid unnecessary operations */
+ if (len == 0)
+ return 0;
+
+ /* process a skip request */
+ if (state->seek) {
+ state->seek = 0;
+ if (xz_skip(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* get len bytes to buf, or less than len if at the end */
+ got = 0;
+ do {
+ /* first just try copying data from the output buffer */
+ if (state->have) {
+ n = state->have > len ? len : state->have;
+ memcpy(buf, state->next, n);
+ state->next += n;
+ state->have -= n;
+ }
+
+ /* output buffer empty -- return if we're at the end of the input */
+ else if (state->eof && strm->avail_in == 0)
+ break;
+
+ /* need output data -- for small len or new stream load up our output
+ * buffer */
+ else if (state->how == LOOK || len < (state->size << 1)) {
+ /* get more output, looking for header if required */
+ if (xz_make(state) == -1)
+ return -1;
+ continue; /* no progress yet -- go back to memcpy() above */
+ /* the copy above assures that we will leave with space in the
+ * output buffer, allowing at least one gzungetc() to succeed */
+ }
+
+ /* large len -- read directly into user buffer */
+ else if (state->how == COPY) { /* read directly */
+ if (xz_load(state, buf, len, &n) == -1)
+ return -1;
+ }
+
+ /* large len -- decompress directly into user buffer */
+ else { /* state->how == LZMA */
+ strm->avail_out = len;
+ strm->next_out = buf;
+ if (xz_decomp(state) == -1)
+ return -1;
+ n = state->have;
+ state->have = 0;
+ }
+
+ /* update progress */
+ len -= n;
+ buf = (char *) buf + n;
+ got += n;
+ state->pos += n;
+ } while (len);
+
+ /* return number of bytes read into user buffer (will fit in int) */
+ return (int) got;
+}
+
+int
+__libxml2_xzclose(xzFile file)
+{
+ int ret;
+ xz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return LZMA_DATA_ERROR;
+ state = (xz_statep) file;
+
+ /* free memory and close file */
+ if (state->size) {
+ lzma_end(&(state->strm));
+#ifdef HAVE_ZLIB_H
+ if (state->init == 1)
+ inflateEnd(&(state->zstrm));
+ state->init = 0;
+#endif
+ xmlFree(state->out);
+ xmlFree(state->in);
+ }
+ xmlFree(state->path);
+ ret = close(state->fd);
+ xmlFree(state);
+ return ret ? ret : LZMA_OK;
+}
+#endif /* HAVE_LZMA_H */
diff --git a/xzlib.h b/xzlib.h
new file mode 100644
index 0000000..29ba55e
--- /dev/null
+++ b/xzlib.h
@@ -0,0 +1,19 @@
+/**
+ * xzlib.h: header for the front end for the transparent suport of lzma
+ * compression at the I/O layer
+ *
+ * See Copyright for the status of this software.
+ *
+ * Anders F Bjorklund <afb@users.sourceforge.net>
+ */
+
+#ifndef LIBXML2_XZLIB_H
+#define LIBXML2_XZLIB_H
+typedef void *xzFile; /* opaque lzma file descriptor */
+
+xzFile __libxml2_xzopen(const char *path, const char *mode);
+xzFile __libxml2_xzdopen(int fd, const char *mode);
+int __libxml2_xzread(xzFile file, void *buf, unsigned len);
+int __libxml2_xzclose(xzFile file);
+int __libxml2_xzcompressed(xzFile f);
+#endif /* LIBXML2_XZLIB_H */